[
  {
    "path": ".gitignore",
    "content": "lib/\nbin/\nbuild/\ncmake-build-debug/\ncmake-build-release/\n.idea\n.vscode\n__pycache__/\n*.py[cod]\n*$py.class\n\n"
  },
  {
    "path": "3rdparty/CMakeLists.txt",
    "content": "project(3rdparty)\nadd_subdirectory(eigen3)\nadd_subdirectory(ceres)\n"
  },
  {
    "path": "3rdparty/ceres/.clang-format",
    "content": "BasedOnStyle: Google\nBinPackArguments: false\nBinPackParameters: false\nPointerAlignment: Left\nDerivePointerAlignment: false\n"
  },
  {
    "path": "3rdparty/ceres/.travis.yml",
    "content": "language: cpp\n\nmatrix:\n  fast_finish: true\n  include:\n  - os: linux\n    dist: bionic\n    sudo: required\n    compiler: gcc\n    env: CERES_BUILD_TARGET=LINUX\n  - os: linux\n    dist: bionic\n    sudo: required\n    compiler: gcc\n    env: CERES_BUILD_TARGET=ANDROID\n  - os: osx\n    osx_image: xcode11.2\n    env: CERES_BUILD_TARGET=OSX\n  - os: osx\n    osx_image: xcode11.2\n    env: CERES_BUILD_TARGET=IOS\n\nenv:\n  # As per http://docs.travis-ci.com/user/languages/cpp/#OpenMP-projects don't be greedy with OpenMP.\n  - OMP_NUM_THREADS=4\n\nbefore_install:\n  - if [ $TRAVIS_OS_NAME = linux ]; then sudo apt-get update -qq; fi\n  - |\n    if [[ \"$CERES_BUILD_TARGET\" == \"ANDROID\" ]]; then\n      cd /tmp\n      wget https://dl.google.com/android/repository/android-ndk-r20b-linux-x86_64.zip\n      unzip -qq android-ndk-r20b-linux-x86_64.zip\n    fi\n\ninstall:\n  - if [ $TRAVIS_OS_NAME = linux ]; then $TRAVIS_BUILD_DIR/travis/install_travis_linux_deps.sh; fi\n  - if [ $TRAVIS_OS_NAME = osx ]; then $TRAVIS_BUILD_DIR/travis/install_travis_osx_deps.sh; fi\n\nbefore_script:\n  - mkdir /tmp/ceres-build\n  - cd /tmp/ceres-build\n\nscript:\n  # NOTE: TRAVIS_BUILD_DIR is actually the source directory for Ceres.\n  - |\n    if [[ \"$CERES_BUILD_TARGET\" == \"LINUX\" || \"$CERES_BUILD_TARGET\" == \"OSX\" ]]; then\n      cmake $TRAVIS_BUILD_DIR\n    fi\n  - |\n    if [[ \"$CERES_BUILD_TARGET\" == \"ANDROID\" ]]; then\n      cmake -DCMAKE_TOOLCHAIN_FILE=/tmp/android-ndk-r20b/build/cmake/android.toolchain.cmake -DEigen3_DIR=/usr/lib/cmake/eigen3 -DANDROID_ABI=arm64-v8a -DANDROID_STL=c++_shared -DANDROID_NATIVE_API_LEVEL=android-29 -DMINIGLOG=ON -DBUILD_EXAMPLES=OFF $TRAVIS_BUILD_DIR\n    fi\n  - |\n    if [[ \"$CERES_BUILD_TARGET\" == \"IOS\" ]]; then\n      cmake -DCMAKE_TOOLCHAIN_FILE=$TRAVIS_BUILD_DIR/cmake/iOS.cmake -DEigen3_DIR=/usr/local/share/eigen3/cmake -DIOS_PLATFORM=OS $TRAVIS_BUILD_DIR\n    fi\n  - make -j 4\n  - |\n    if [[ \"$CERES_BUILD_TARGET\" == \"LINUX\" || \"$CERES_BUILD_TARGET\" == \"OSX\" ]]; then\n      sudo make install\n      ctest --output-on-failure -j 4\n    fi\n\nnotifications:\n  email:\n    - alexs.mac@gmail.com\n    - sandwichmaker@gmail.com\n    - keir@google.com\n    - wjr@google.com\n"
  },
  {
    "path": "3rdparty/ceres/BUILD",
    "content": "# Ceres Solver - A fast non-linear least squares minimizer\n# Copyright 2018 Google Inc. All rights reserved.\n# http://ceres-solver.org/\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice,\n#   this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright notice,\n#   this list of conditions and the following disclaimer in the documentation\n#   and/or other materials provided with the distribution.\n# * Neither the name of Google Inc. nor the names of its contributors may be\n#   used to endorse or promote products derived from this software without\n#   specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n#\n# Author: mierle@gmail.com (Keir Mierle)\n#\n# These are Bazel rules to build Ceres. It's currently in Alpha state, and does\n# not support parameterization around threading choice or sparse backends.\n\nload(\"//:bazel/ceres.bzl\", \"ceres_library\")\n\nceres_library(\n    name = \"ceres\",\n    restrict_schur_specializations = False,\n)\n\ncc_library(\n    name = \"test_util\",\n    srcs = [\"internal/ceres/\" + x for x in [\n        \"evaluator_test_utils.cc\",\n        \"numeric_diff_test_utils.cc\",\n        \"test_util.cc\",\n        \"gmock_gtest_all.cc\",\n        \"gmock_main.cc\",\n        \"gmock/gmock.h\",\n        \"gmock/mock-log.h\",\n        \"gtest/gtest.h\",\n    ]],\n    hdrs = [\n        \"internal/ceres/gmock/gmock.h\",\n        \"internal/ceres/gmock/mock-log.h\",\n        \"internal/ceres/gtest/gtest.h\",\n    ],\n    copts = [\n        \"-Wno-sign-compare\",\n        \"-DCERES_TEST_SRCDIR_SUFFIX=\\\\\\\"data/\\\\\\\"\",\n    ],\n    includes = [\n        \"internal\",\n        \"internal/ceres\",\n    ],\n    deps = [\n        \"//:ceres\",\n        \"@com_github_gflags_gflags//:gflags\",\n    ],\n)\n\nCERES_TESTS = [\n    \"array_utils\",\n    \"autodiff_cost_function\",\n    \"autodiff_local_parameterization\",\n    \"autodiff\",\n    \"block_jacobi_preconditioner\",\n    \"block_random_access_dense_matrix\",\n    \"block_random_access_diagonal_matrix\",\n    \"block_random_access_sparse_matrix\",\n    \"block_sparse_matrix\",\n    \"canonical_views_clustering\",\n    \"c_api\",\n    \"compressed_col_sparse_matrix_utils\",\n    \"compressed_row_sparse_matrix\",\n    \"concurrent_queue\",\n    \"conditioned_cost_function\",\n    \"conjugate_gradients_solver\",\n    \"corrector\",\n    \"cost_function_to_functor\",\n    \"covariance\",\n    \"cubic_interpolation\",\n    \"dense_linear_solver\",\n    \"dense_sparse_matrix\",\n    \"detect_structure\",\n    \"dogleg_strategy\",\n    \"dynamic_autodiff_cost_function\",\n    \"dynamic_compressed_row_sparse_matrix\",\n    \"dynamic_numeric_diff_cost_function\",\n    \"dynamic_sparse_normal_cholesky_solver\",\n    \"dynamic_sparsity\",\n    \"evaluation_callback\",\n    \"evaluator\",\n    \"gradient_checker\",\n    \"gradient_checking_cost_function\",\n    \"gradient_problem_solver\",\n    \"gradient_problem\",\n    \"graph_algorithms\",\n    \"graph\",\n    \"householder_vector\",\n    \"implicit_schur_complement\",\n    \"inner_product_computer\",\n    \"invert_psd_matrix\",\n    \"is_close\",\n    \"iterative_refiner\",\n    \"iterative_schur_complement_solver\",\n    \"jet\",\n    \"levenberg_marquardt_strategy\",\n    \"line_search_minimizer\",\n    \"line_search_preprocessor\",\n    \"local_parameterization\",\n    \"loss_function\",\n    \"minimizer\",\n    \"normal_prior\",\n    \"numeric_diff_cost_function\",\n    \"ordered_groups\",\n    \"parallel_for\",\n    \"parallel_utils\",\n    \"parameter_block_ordering\",\n    \"parameter_block\",\n    \"partitioned_matrix_view\",\n    \"polynomial\",\n    \"problem\",\n    \"program\",\n    \"reorder_program\",\n    \"residual_block\",\n    \"residual_block_utils\",\n    \"rotation\",\n    \"schur_complement_solver\",\n    \"schur_eliminator\",\n    \"single_linkage_clustering\",\n    \"small_blas\",\n    \"solver\",\n    \"sparse_cholesky\",\n    \"sparse_normal_cholesky_solver\",\n    \"subset_preconditioner\",\n    \"system\",\n    \"thread_pool\",\n    \"tiny_solver_autodiff_function\",\n    \"tiny_solver_cost_function_adapter\",\n    \"tiny_solver\",\n    \"triplet_sparse_matrix\",\n    \"trust_region_minimizer\",\n    \"trust_region_preprocessor\",\n    \"visibility_based_preconditioner\",\n    \"visibility\",\n]\n\nTEST_COPTS = [\n    # Needed to silence GFlags complaints.\n    \"-Wno-sign-compare\",\n\n    # These two warnings don't work well in conjunction with GMock, and\n    # trigger incorrectly on parts of rotation_test. For now, disable them,\n    # but in the future disable these warnings only for rotation_test.\n    # TODO(keir): When the tests are macro-ified, apply these selectively.\n    \"-Wno-nonnull-compare\",\n    \"-Wno-address\",\n]\n\nTEST_DEPS = [\n    \"//:ceres\",\n    \"//:test_util\",\n    \"@com_github_eigen_eigen//:eigen\",\n    \"@com_github_gflags_gflags//:gflags\",\n]\n\n# Instantiate all the tests with a template.\n[cc_test(\n    name = test_name + \"_test\",\n    timeout = \"short\",\n    srcs = [\"internal/ceres/\" + test_name + \"_test.cc\"],\n    copts = TEST_COPTS,\n    deps = TEST_DEPS,\n) for test_name in CERES_TESTS]\n\n# Instantiate all the bundle adjustment tests. These are separate to\n# parallelize the execution of the tests; otherwise the tests take a long time.\n#\n# Note: While it is possible to run the Python script to generate the .cc files\n# as part of the build, it introduces an undesirable build-time Python\n# dependency that we'd prefer to avoid.\n[cc_test(\n    name = test_filename.split(\"/\")[-1][:-3],  # Remove .cc.\n    timeout = \"moderate\",\n    srcs = [test_filename],\n    copts = TEST_COPTS,\n\n    # This is the data set that is bundled for the testing.\n    data = [\":data/problem-16-22106-pre.txt\"],\n    deps = TEST_DEPS,\n) for test_filename in glob([\n    \"internal/ceres/generated_bundle_adjustment_tests/*_test.cc\",\n])]\n\n# Build the benchmarks.\n[cc_binary(\n    name = benchmark_name,\n    srcs = [\"internal/ceres/\" + benchmark_name + \".cc\"],\n    copts = TEST_COPTS,\n    deps = TEST_DEPS + [\"@com_github_google_benchmark//:benchmark\"],\n) for benchmark_name in [\n    \"autodiff_cost_function_benchmark\",\n    \"small_blas_gemm_benchmark\",\n    \"small_blas_gemv_benchmark\",\n]]\n"
  },
  {
    "path": "3rdparty/ceres/CMakeLists.txt",
    "content": "## Modified by WANG JIADONG <wangjiadong@sensetime.com> for adas sdk\nmessage(STATUS \"${BoldGreen}[3RDPARTY : Ceres]${ColourReset}\")\n\n# Ceres Solver - A fast non-linear least squares minimizer\n# Copyright 2015 Google Inc. All rights reserved.\n# http://ceres-solver.org/\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice,\n#   this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright notice,\n#   this list of conditions and the following disclaimer in the documentation\n#   and/or other materials provided with the distribution.\n# * Neither the name of Google Inc. nor the names of its contributors may be\n#   used to endorse or promote products derived from this software without\n#   specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n#\n# Authors: keir@google.com (Keir Mierle)\n#          alexs.mac@gmail.com (Alex Stewart)\n\ncmake_minimum_required(VERSION 3.5)\ncmake_policy(VERSION 3.5)\n\n# Set the C++ version (must be >= C++11) when compiling Ceres.\n#\n# Reflect a user-specified (via -D) CMAKE_CXX_STANDARD if present, otherwise\n# default to C++11.\nset(DEFAULT_CXX_STANDARD ${CMAKE_CXX_STANDARD})\nif (NOT DEFAULT_CXX_STANDARD)\n  set(DEFAULT_CXX_STANDARD 11)\nendif()\nset(CMAKE_CXX_STANDARD ${DEFAULT_CXX_STANDARD} CACHE STRING\n  \"C++ standard (minimum 11)\" FORCE)\n# Restrict CMAKE_CXX_STANDARD to the valid versions permitted and ensure that\n# if one was forced via -D that it is in the valid set.\nset(ALLOWED_CXX_STANDARDS 11 14 17)\nset_property(CACHE CMAKE_CXX_STANDARD PROPERTY STRINGS ${ALLOWED_CXX_STANDARDS})\nlist(FIND ALLOWED_CXX_STANDARDS ${CMAKE_CXX_STANDARD} POSITION)\nif (POSITION LESS 0)\n  message(FATAL_ERROR \"Invalid CMAKE_CXX_STANDARD: ${CMAKE_CXX_STANDARD}. \"\n    \"Must be one of: ${ALLOWED_CXX_STANDARDS}\")\nendif()\n# Specify the standard as a hard requirement, otherwise CMAKE_CXX_STANDARD is\n# interpreted as a suggestion that can decay *back* to lower versions.\nset(CMAKE_CXX_STANDARD_REQUIRED ON CACHE BOOL \"\")\nmark_as_advanced(CMAKE_CXX_STANDARD_REQUIRED)\n\n# MSVC versions < 2013 did not fully support >= C++11.\nif (MSVC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.0)\n  message(FATAL_ERROR \"Invalid CMAKE_CXX_COMPILER_VERSION: \"\n    \"${CMAKE_CXX_COMPILER_VERSION}. Ceres requires at least MSVC 2013 Update 4+\")\nendif()\n\nif(OPT_BUILD_QCOM)\n    message(STATUS \"Ceres Crosscompile for Qualcomm Platform\")\n    set(OPENMP OFF)\n    set(LAPACK OFF)\nelse()\n    set(OPENMP ON)\nendif()\n\n# On macOS, add the Homebrew prefix (with appropriate suffixes) to the\n# respective HINTS directories (after any user-specified locations).  This\n# handles Homebrew installations into non-standard locations (not /usr/local).\n# We do not use CMAKE_PREFIX_PATH for this as given the search ordering of\n# find_xxx(), doing so would override any user-specified HINTS locations with\n# the Homebrew version if it exists.\nif (CMAKE_SYSTEM_NAME MATCHES \"Darwin\")\n  find_program(HOMEBREW_EXECUTABLE brew)\n  mark_as_advanced(FORCE HOMEBREW_EXECUTABLE)\n  if (HOMEBREW_EXECUTABLE)\n    # Detected a Homebrew install, query for its install prefix.\n    execute_process(COMMAND ${HOMEBREW_EXECUTABLE} --prefix\n      OUTPUT_VARIABLE HOMEBREW_INSTALL_PREFIX\n      OUTPUT_STRIP_TRAILING_WHITESPACE)\n    message(STATUS \"Detected Homebrew with install prefix: \"\n      \"${HOMEBREW_INSTALL_PREFIX}, adding to CMake search paths.\")\n    list(APPEND HOMEBREW_INCLUDE_DIR_HINTS \"${HOMEBREW_INSTALL_PREFIX}/include\")\n  endif()\nendif()\n\nproject(Ceres C CXX)\n\n# NOTE: The 'generic' CMake variables CMAKE_[SOURCE/BINARY]_DIR should not be\n#       used.  Always use the project-specific variants (generated by CMake):\n#       <PROJECT_NAME_MATCHING_CASE>_[SOURCE/BINARY]_DIR, e.g.\n#       Ceres_SOURCE_DIR (note, *not* CERES_SOURCE_DIR) instead, as these will\n#       always point to the correct directories for the Ceres project, even if\n#       it is nested inside another source tree, whereas the 'generic'\n#       CMake variables refer to the *first* project() declaration, i.e. the\n#       top-level project, not Ceres, if Ceres is nested.\n\n# Make CMake aware of the cmake folder for local FindXXX scripts,\n# append rather than set in case the user has passed their own\n# additional paths via -D.\nlist(APPEND CMAKE_MODULE_PATH \"${Ceres_SOURCE_DIR}/cmake\")\ninclude(AddCompileFlagsIfSupported)\ninclude(UpdateCacheVariable)\n\n# Xcode 11.0-1 with macOS 10.15 (Catalina) broke alignment.\ninclude(DetectBrokenStackCheckMacOSXcodePairing)\ndetect_broken_stack_check_macos_xcode_pairing()\n\n# Set up the git hook to make Gerrit Change-Id: lines in commit messages.\ninclude(AddGerritCommitHook)\nadd_gerrit_commit_hook(${Ceres_SOURCE_DIR} ${Ceres_BINARY_DIR})\n\nset(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${Ceres_BINARY_DIR}/bin)\nset(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${Ceres_BINARY_DIR}/lib)\nset(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${Ceres_BINARY_DIR}/lib)\n# Set postfixes for generated libraries based on buildtype.\nset(CMAKE_RELEASE_POSTFIX \"\")\nset(CMAKE_DEBUG_POSTFIX \"-debug\")\n\n# Read the Ceres version from the source, such that we only ever have a single\n# definition of the Ceres version.\ninclude(ReadCeresVersionFromSource)\nread_ceres_version_from_source(${Ceres_SOURCE_DIR})\n\nenable_testing()\n\ninclude(CeresThreadingModels)\nif (OPENMP)\n  message(STATUS \"STill Building OPENMP ${OPENMP}\")\n  \n  include(PrettyPrintCMakeList)\n  find_available_ceres_threading_models(CERES_THREADING_MODELS_AVAILABLE)\n  pretty_print_cmake_list(PRETTY_CERES_THREADING_MODELS_AVAILABLE\n    ${CERES_THREADING_MODELS_AVAILABLE})\n  message(\"-- Detected available Ceres threading models: \"\n    \"${PRETTY_CERES_THREADING_MODELS_AVAILABLE}\")\n  set(CERES_THREADING_MODEL \"${CERES_THREADING_MODEL}\" CACHE STRING\n    \"Ceres threading back-end\" FORCE)\n  if (NOT CERES_THREADING_MODEL)\n    list(GET CERES_THREADING_MODELS_AVAILABLE 0 DEFAULT_THREADING_MODEL)\n    update_cache_variable(CERES_THREADING_MODEL ${DEFAULT_THREADING_MODEL})\n  endif()\n  set_property(CACHE CERES_THREADING_MODEL PROPERTY STRINGS\n    ${CERES_THREADING_MODELS_AVAILABLE})\nelse()\n  set(CERES_THREADING_MODEL \"CXX11_THREADS\" CACHE STRING\n  \"Ceres threading back-end\" FORCE)\n  set_property(CACHE CERES_THREADING_MODEL PROPERTY STRINGS\n    ${CERES_THREADING_MODELS_AVAILABLE})\nendif()\n\noption(MINIGLOG \"Use a stripped down version of glog.\" OFF)\noption(GFLAGS \"Enable Google Flags.\" ON)\noption(SUITESPARSE \"Enable SuiteSparse.\" ON)\noption(CXSPARSE \"Enable CXSparse.\" ON)\nif (APPLE)\n  option(ACCELERATESPARSE\n    \"Enable use of sparse solvers in Apple's Accelerate framework.\" ON)\nendif()\noption(LAPACK \"Enable use of LAPACK directly within Ceres.\" ON)\n# Template specializations for the Schur complement based solvers. If\n# compile time, binary size or compiler performance is an issue, you\n# may consider disabling this.\noption(SCHUR_SPECIALIZATIONS \"Enable fixed-size schur specializations.\" ON)\noption(CUSTOM_BLAS\n       \"Use handcoded BLAS routines (usually faster) instead of Eigen.\"\n       ON)\n# Enable the use of Eigen as a sparse linear algebra library for\n# solving the nonlinear least squares problems.\noption(EIGENSPARSE \"Enable Eigen as a sparse linear algebra library.\" ON)\noption(EXPORT_BUILD_DIR\n  \"Export build directory using CMake (enables external use without install).\" OFF)\noption(BUILD_TESTING \"Enable tests\" OFF)\noption(BUILD_DOCUMENTATION \"Build User's Guide (html)\" OFF)\noption(BUILD_EXAMPLES \"Build examples\" OFF)\noption(BUILD_BENCHMARKS \"Build Ceres benchmarking suite\" OFF)\noption(BUILD_SHARED_LIBS \"Build Ceres as a shared library.\" OFF)\noption(PROVIDE_UNINSTALL_TARGET \"Add a custom target to ease removal of installed targets\" ON)\nset(SANITIZERS \"\" CACHE STRING \"Semicolon-separated list of sanitizers to use (e.g address, memory, thread)\")\ninclude(EnableSanitizer)\nenable_sanitizer(${SANITIZERS})\nif (ANDROID)\n  option(ANDROID_STRIP_DEBUG_SYMBOLS \"Strip debug symbols from Android builds (reduces file sizes)\" ON)\nendif()\nif (MSVC)\n  option(MSVC_USE_STATIC_CRT\n    \"MS Visual Studio: Use static C-Run Time Library in place of shared.\" OFF)\n\n  if (BUILD_TESTING AND BUILD_SHARED_LIBS)\n    message(\n      \"-- Disabling tests. The flags BUILD_TESTING and BUILD_SHARED_LIBS\"\n      \" are incompatible with MSVC.\")\n    update_cache_variable(BUILD_TESTING OFF)\n  endif (BUILD_TESTING AND BUILD_SHARED_LIBS)\nendif (MSVC)\n# Allow user to specify a suffix for the library install directory, the only\n# really sensible option (other than \"\") being \"64\", such that:\n# ${CMAKE_INSTALL_PREFIX}/lib -> ${CMAKE_INSTALL_PREFIX}/lib64.\n#\n# Heuristic for determining LIB_SUFFIX. FHS recommends that 64-bit systems\n# install native libraries to lib64 rather than lib. Most distros seem to\n# follow this convention with a couple notable exceptions (Debian-based and\n# Arch-based distros) which we try to detect here.\nif (CMAKE_SYSTEM_NAME MATCHES \"Linux\" AND\n    NOT DEFINED LIB_SUFFIX AND\n    NOT CMAKE_CROSSCOMPILING AND\n    CMAKE_SIZEOF_VOID_P EQUAL \"8\" AND\n    NOT EXISTS \"/etc/debian_version\" AND\n    NOT EXISTS \"/etc/arch-release\")\n  message(\"-- Detected non-Debian/Arch-based 64-bit Linux distribution. \"\n    \"Defaulting to library install directory: lib${LIB_SUFFIX}. You can \"\n    \"override this by specifying LIB_SUFFIX.\")\n  set(LIB_SUFFIX \"64\")\nendif ()\n# Only create the cache variable (for the CMake GUI) after attempting to detect\n# the suffix *if not specified by the user* (NOT DEFINED LIB_SUFFIX in if())\n# s/t the user could override our autodetected suffix with \"\" if desired.\nset(LIB_SUFFIX \"${LIB_SUFFIX}\" CACHE STRING\n  \"Suffix of library install directory (to support lib/lib64).\" FORCE)\n\n# IOS is defined iff using the iOS.cmake CMake toolchain to build a static\n# library for iOS.\nif (IOS)\n  message(STATUS \"Building Ceres for iOS platform: ${IOS_PLATFORM}\")\n\n  # Ceres requires at least iOS 7.0+.\n  if (IOS_DEPLOYMENT_TARGET VERSION_LESS 7.0)\n    message(FATAL_ERROR \"Unsupported iOS version: ${IOS_DEPLOYMENT_TARGET}, Ceres \"\n      \"requires at least iOS version 7.0\")\n  endif()\n\n  update_cache_variable(MINIGLOG ON)\n  message(STATUS \"Building for iOS: Forcing use of miniglog instead of glog.\")\n\n  # Apple claims that the BLAS call dsyrk_ is a private API, and will not allow\n  # you to submit to the Apple Store if the symbol is present.\n  update_cache_variable(LAPACK OFF)\n  message(STATUS \"Building for iOS: SuiteSparse, CXSparse, LAPACK, gflags, \"\n    \"and OpenMP are not available.\")\n\n  update_cache_variable(BUILD_EXAMPLES OFF)\n  message(STATUS \"Building for iOS: Will not build examples.\")\nendif (IOS)\n\nunset(CERES_COMPILE_OPTIONS)\nmessage(\"-- Building with C++${CMAKE_CXX_STANDARD}\")\n\n# Eigen.\n# Eigen delivers Eigen3Config.cmake since v3.3.3\nfind_package(Eigen3 3.3 CONFIG REQUIRED\n  HINTS ${HOMEBREW_INCLUDE_DIR_HINTS})\nif (EIGEN3_FOUND)\n  message(\"-- Found Eigen version ${EIGEN3_VERSION_STRING}: ${EIGEN3_INCLUDE_DIRS}\")\n  if (CMAKE_SYSTEM_PROCESSOR MATCHES \"^(aarch64.*|AARCH64.*)\" AND\n      EIGEN3_VERSION_STRING VERSION_LESS 3.3.4)\n    # As per issue #289: https://github.com/ceres-solver/ceres-solver/issues/289\n    # the bundle_adjustment_test will fail for Eigen < 3.3.4 on aarch64.\n    message(FATAL_ERROR \"-- Ceres requires Eigen version >= 3.3.4 on aarch64. \"\n      \"Detected version of Eigen is: ${EIGEN3_VERSION_STRING}.\")\n  endif()\n\n  if (EIGENSPARSE)\n    message(\"-- Enabling use of Eigen as a sparse linear algebra library.\")\n    list(APPEND CERES_COMPILE_OPTIONS CERES_USE_EIGEN_SPARSE)\n  else (EIGENSPARSE)\n    message(\"-- Disabling use of Eigen as a sparse linear algebra library.\")\n    message(\"   This does not affect the covariance estimation algorithm \")\n    message(\"   which can still use the EIGEN_SPARSE_QR algorithm.\")\n    add_definitions(-DEIGEN_MPL2_ONLY)\n  endif (EIGENSPARSE)\nendif (EIGEN3_FOUND)\n\nif (LAPACK)\n  find_package(LAPACK QUIET)\n  set(LAPACK_FOUND OFF)\n  if (LAPACK_FOUND)\n    message(\"-- Found LAPACK library: ${LAPACK_LIBRARIES}\")\n  else (LAPACK_FOUND)\n    message(\"-- Did not find LAPACK library, disabling LAPACK support.\")\n    update_cache_variable(LAPACK OFF)\n    list(APPEND CERES_COMPILE_OPTIONS CERES_NO_LAPACK)\n  endif (LAPACK_FOUND)\nelse (LAPACK)\n  message(\"-- Building without LAPACK.\")\n  list(APPEND CERES_COMPILE_OPTIONS CERES_NO_LAPACK)\nendif (LAPACK)\n\nif (SUITESPARSE)\n  # By default, if SuiteSparse and all dependencies are found, Ceres is\n  # built with SuiteSparse support.\n\n  # Check for SuiteSparse and dependencies.\n  find_package(SuiteSparse)\n  if (SUITESPARSE_FOUND)\n    # On Ubuntu the system install of SuiteSparse (v3.4.0) up to at least\n    # Ubuntu 13.10 cannot be used to link shared libraries.\n    if (BUILD_SHARED_LIBS AND\n        SUITESPARSE_IS_BROKEN_SHARED_LINKING_UBUNTU_SYSTEM_VERSION)\n      message(FATAL_ERROR \"You are attempting to build Ceres as a shared \"\n        \"library on Ubuntu using a system package install of SuiteSparse \"\n        \"3.4.0. This package is broken and does not support the \"\n        \"construction of shared libraries (you can still build Ceres as \"\n        \"a static library).  If you wish to build a shared version of Ceres \"\n        \"you should uninstall the system install of SuiteSparse \"\n        \"(libsuitesparse-dev) and perform a source install of SuiteSparse \"\n        \"(we recommend that you use the latest version), \"\n        \"see http://ceres-solver.org/building.html for more information.\")\n    endif (BUILD_SHARED_LIBS AND\n      SUITESPARSE_IS_BROKEN_SHARED_LINKING_UBUNTU_SYSTEM_VERSION)\n\n    # By default, if all of SuiteSparse's dependencies are found, Ceres is\n    # built with SuiteSparse support.\n    message(\"-- Found SuiteSparse ${SUITESPARSE_VERSION}, \"\n            \"building with SuiteSparse.\")\n  else (SUITESPARSE_FOUND)\n    # Disable use of SuiteSparse if it cannot be found and continue.\n    message(\"-- Did not find all SuiteSparse dependencies, disabling \"\n      \"SuiteSparse support.\")\n    update_cache_variable(SUITESPARSE OFF)\n    list(APPEND CERES_COMPILE_OPTIONS CERES_NO_SUITESPARSE)\n  endif (SUITESPARSE_FOUND)\nelse (SUITESPARSE)\n  message(\"-- Building without SuiteSparse.\")\n  list(APPEND CERES_COMPILE_OPTIONS CERES_NO_SUITESPARSE)\nendif (SUITESPARSE)\n\n# CXSparse.\nif (CXSPARSE)\n  # Don't search with REQUIRED as we can continue without CXSparse.\n  find_package(CXSparse)\n  if (CXSPARSE_FOUND)\n    # By default, if CXSparse and all dependencies are found, Ceres is\n    # built with CXSparse support.\n    message(\"-- Found CXSparse version: ${CXSPARSE_VERSION}, \"\n      \"building with CXSparse.\")\n  else (CXSPARSE_FOUND)\n    # Disable use of CXSparse if it cannot be found and continue.\n    message(\"-- Did not find CXSparse, Building without CXSparse.\")\n    update_cache_variable(CXSPARSE OFF)\n    list(APPEND CERES_COMPILE_OPTIONS CERES_NO_CXSPARSE)\n  endif (CXSPARSE_FOUND)\nelse (CXSPARSE)\n  message(\"-- Building without CXSparse.\")\n  list(APPEND CERES_COMPILE_OPTIONS CERES_NO_CXSPARSE)\n  # Mark as advanced (remove from default GUI view) the CXSparse search\n  # variables in case user enabled CXSPARSE, FindCXSparse did not find it, so\n  # made search variables visible in GUI for user to set, but then user disables\n  # CXSPARSE instead of setting them.\n  mark_as_advanced(FORCE CXSPARSE_INCLUDE_DIR\n                         CXSPARSE_LIBRARY)\nendif (CXSPARSE)\n\nif (ACCELERATESPARSE)\n  find_package(AccelerateSparse)\n  if (AccelerateSparse_FOUND)\n    message(\"-- Found Apple's Accelerate framework with sparse solvers, \"\n      \"building with Accelerate sparse support.\")\n  else()\n    message(\"-- Failed to find Apple's Accelerate framework with sparse solvers, \"\n      \"building without Accelerate sparse support.\")\n    update_cache_variable(ACCELERATESPARSE OFF)\n    list(APPEND CERES_COMPILE_OPTIONS CERES_NO_ACCELERATE_SPARSE)\n  endif()\nelse()\n  message(\"-- Building without Apple's Accelerate sparse support.\")\n  list(APPEND CERES_COMPILE_OPTIONS CERES_NO_ACCELERATE_SPARSE)\n  mark_as_advanced(FORCE AccelerateSparse_INCLUDE_DIR\n                         AccelerateSparse_LIBRARY)\nendif()\n\n# Ensure that the user understands they have disabled all sparse libraries.\nif (NOT SUITESPARSE AND NOT CXSPARSE AND NOT EIGENSPARSE AND NOT ACCELERATESPARSE)\n  message(\"   ===============================================================\")\n  message(\"   Compiling without any sparse library: SuiteSparse, CXSparse \")\n  message(\"   EigenSparse & Apple's Accelerate are all disabled or unavailable.  \")\n  message(\"   No sparse linear solvers (SPARSE_NORMAL_CHOLESKY & SPARSE_SCHUR)\")\n  message(\"   will be available when Ceres is used.\")\n  message(\"   ===============================================================\")\nendif()\n\n# ANDROID define is set by the Android CMake toolchain file.\nif (ANDROID)\n  message(\"  ================================================================\")\n  if (ANDROID_STRIP_DEBUG_SYMBOLS)\n    # Strip debug information unconditionally to avoid +200MB library file sizes.\n    set( CMAKE_EXE_LINKER_FLAGS  \"${CMAKE_EXE_LINKER_FLAGS} -s\" )\n    set( CMAKE_SHARED_LINKER_FLAGS  \"${CMAKE_SHARED_LINKER_FLAGS} -s\" )\n    message(\"  Stripping debug information from Android build of Ceres library \")\n    message(\"  to avoid +200MB library files.\")\n  else()\n    message(\"  Warning: not stripping debug information from Android build of \")\n    message(\"  Ceres library.  This will result in a large (+200MB) library.\")\n  endif()\n  message(\"\")\n  message(\"  You can control whether debug information is stripped via the \")\n  message(\"  ANDROID_STRIP_DEBUG_SYMBOLS CMake option when configuring Ceres.\")\n  message(\"  ================================================================\")\nendif()\n\n# GFlags.\nif (GFLAGS)\n  # Don't search with REQUIRED as we can continue without gflags.\n  find_package(gflags 2.2.0 CONFIG\n    HINTS \"${HOMEBREW_INCLUDE_DIR_HINTS}\")\n  if (gflags_FOUND)\n    message(\"-- Found Google Flags version ${gflags_VERSION}: ${GFLAGS_INCLUDE_DIR}\")\n  else (gflags_FOUND)\n    message(\"-- Did not find Google Flags (gflags), Building without gflags \"\n      \"- no tests or tools will be built!\")\n    update_cache_variable(GFLAGS OFF)\n  endif (gflags_FOUND)\nelse (GFLAGS)\n  message(\"-- Google Flags disabled; no tests or tools will be built!\")\n  # Mark as advanced (remove from default GUI view) the gflags search\n  # variables in case user enabled GFLAGS, FindGflags did not find it, so\n  # made search variables visible in GUI for user to set, but then user disables\n  # GFLAGS instead of setting them.\n  mark_as_advanced(FORCE GFLAGS_INCLUDE_DIR\n                         GFLAGS_LIBRARY\n                         GFLAGS_NAMESPACE)\nendif (GFLAGS)\n\n# MiniGLog.\nset(MINIGLOG TRUE)\nif (MINIGLOG)\n  message(\"-- Compiling minimal glog substitute into Ceres.\")\n  set(GLOG_INCLUDE_DIRS internal/ceres/miniglog)\n  set(MINIGLOG_MAX_LOG_LEVEL 2 CACHE STRING \"The maximum message severity level to be logged\")\n  add_definitions(\"-DMAX_LOG_LEVEL=${MINIGLOG_MAX_LOG_LEVEL}\")\n  message(\"-- Using minimal glog substitute (include): ${GLOG_INCLUDE_DIRS}\")\n  message(\"-- Max log level for minimal glog substitute: ${MINIGLOG_MAX_LOG_LEVEL}\")\n\n  # Mark as advanced (remove from default GUI view) the glog search\n  # variables in case user disables MINIGLOG, FindGlog did not find it, so\n  # made search variables visible in GUI for user to set, but then user enables\n  # MINIGLOG instead of setting them.\n  mark_as_advanced(FORCE GLOG_INCLUDE_DIR\n                         GLOG_LIBRARY)\nelse (MINIGLOG)\n  unset(MINIGLOG_MAX_LOG_LEVEL CACHE)\n  # Don't search with REQUIRED so that configuration continues if not found and\n  # we can output an error messages explaining MINIGLOG option.\n  find_package(Glog)\n  if (NOT GLOG_FOUND)\n    message(FATAL_ERROR \"Can't find Google Log (glog). Please set either: \"\n      \"glog_DIR (newer CMake built versions of glog) or GLOG_INCLUDE_DIR & \"\n      \"GLOG_LIBRARY or enable MINIGLOG option to use minimal glog \"\n      \"implementation.\")\n  endif(NOT GLOG_FOUND)\n  # By default, assume gflags was found, updating the message if it was not.\n  set(GLOG_GFLAGS_DEPENDENCY_MESSAGE\n    \" Assuming glog was built with gflags support as gflags was found. \"\n    \"This will make gflags a public dependency of Ceres.\")\n  if (NOT gflags_FOUND)\n    set(GLOG_GFLAGS_DEPENDENCY_MESSAGE\n      \" Assuming glog was NOT built with gflags support as gflags was \"\n      \"not found.  If glog was built with gflags, please set the \"\n      \"gflags search locations such that it can be found by Ceres.  \"\n      \"Otherwise, Ceres may fail to link due to missing gflags symbols.\")\n  endif(NOT gflags_FOUND)\n  message(\"-- Found Google Log (glog).\" ${GLOG_GFLAGS_DEPENDENCY_MESSAGE})\nendif (MINIGLOG)\n\nif (NOT SCHUR_SPECIALIZATIONS)\n  list(APPEND CERES_COMPILE_OPTIONS CERES_RESTRICT_SCHUR_SPECIALIZATION)\n  message(\"-- Disabling Schur specializations (faster compiles)\")\nendif (NOT SCHUR_SPECIALIZATIONS)\n\nif (NOT CUSTOM_BLAS)\n  list(APPEND CERES_COMPILE_OPTIONS CERES_NO_CUSTOM_BLAS)\n  message(\"-- Disabling custom blas\")\nendif (NOT CUSTOM_BLAS)\n\nif (OPENMP)\n  set_ceres_threading_model(\"${CERES_THREADING_MODEL}\")\nelse()\n  set_ceres_threading_model(\"${CERES_THREADING_MODEL}\")\nendif()\n\nif (BUILD_BENCHMARKS)\n  find_package(benchmark QUIET)\n  if (benchmark_FOUND)\n     message(\"-- Found Google benchmark library. Building Ceres benchmarks.\")\n  else()\n     message(\"-- Failed to find Google benchmark library, disabling build of benchmarks.\")\n     update_cache_variable(BUILD_BENCHMARKS OFF)\n  endif()\n  mark_as_advanced(benchmark_DIR)\nendif()\n\nif (BUILD_SHARED_LIBS)\n  message(\"-- Building Ceres as a shared library.\")\n  # The CERES_BUILDING_SHARED_LIBRARY compile definition is NOT stored in\n  # CERES_COMPILE_OPTIONS as it must only be defined when Ceres is compiled\n  # not when it is used as it controls the CERES_EXPORT macro which provides\n  # dllimport/export support in MSVC.\n  add_definitions(-DCERES_BUILDING_SHARED_LIBRARY)\n  list(APPEND CERES_COMPILE_OPTIONS CERES_USING_SHARED_LIBRARY)\nelse (BUILD_SHARED_LIBS)\n  message(\"-- Building Ceres as a static library.\")\nendif (BUILD_SHARED_LIBS)\n\n# Change the default build type from Debug to Release, while still\n# supporting overriding the build type.\n#\n# The CACHE STRING logic here and elsewhere is needed to force CMake\n# to pay attention to the value of these variables.\nif (NOT CMAKE_BUILD_TYPE)\n  message(\"-- No build type specified; defaulting to CMAKE_BUILD_TYPE=Release.\")\n  set(CMAKE_BUILD_TYPE Release CACHE STRING\n    \"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel.\"\n    FORCE)\nelse (NOT CMAKE_BUILD_TYPE)\n  if (CMAKE_BUILD_TYPE STREQUAL \"Debug\")\n    message(\"\\n=================================================================================\")\n    message(\"\\n-- Build type: Debug. Performance will be terrible!\")\n    message(\"-- Add -DCMAKE_BUILD_TYPE=Release to the CMake command line to get an optimized build.\")\n    message(\"\\n=================================================================================\")\n  endif (CMAKE_BUILD_TYPE STREQUAL \"Debug\")\nendif (NOT CMAKE_BUILD_TYPE)\n\nif (MINGW)\n  # MinGW produces code that segfaults when performing matrix multiplications\n  # in Eigen when compiled with -O3 (see [1]), as such force the use of -O2\n  # which works.\n  #\n  # [1] http://eigen.tuxfamily.org/bz/show_bug.cgi?id=556\n  message(\"-- MinGW detected, forcing -O2 instead of -O3 in Release for Eigen due \"\n          \"to a MinGW bug: http://eigen.tuxfamily.org/bz/show_bug.cgi?id=556\")\n  string(REPLACE \"-O3\" \"-O2\" CMAKE_CXX_FLAGS_RELEASE \"${CMAKE_CXX_FLAGS_RELEASE}\")\n  update_cache_variable(CMAKE_CXX_FLAGS_RELEASE \"${CMAKE_CXX_FLAGS_RELEASE}\")\nendif (MINGW)\n\n# After the tweaks for the compile settings, disable some warnings on MSVC.\nif (MSVC)\n  # On MSVC, math constants are not included in <cmath> or <math.h> unless\n  # _USE_MATH_DEFINES is defined [1].  As we use M_PI in the examples, ensure\n  # that _USE_MATH_DEFINES is defined before the first inclusion of <cmath>.\n  #\n  # [1] https://msdn.microsoft.com/en-us/library/4hwaceh6.aspx\n  add_definitions(\"-D_USE_MATH_DEFINES\")\n  # Disable signed/unsigned int conversion warnings.\n  add_compile_options(\"/wd4018\" \"/wd4267\")\n  # Disable warning about using struct/class for the same symobl.\n  add_compile_options(\"/wd4099\")\n  # Disable warning about the insecurity of using \"std::copy\".\n  add_compile_options(\"/wd4996\")\n  # Disable performance warning about int-to-bool conversion.\n  add_compile_options(\"/wd4800\")\n  # Disable performance warning about fopen insecurity.\n  add_compile_options(\"/wd4996\")\n  # Disable warning about int64 to int32 conversion. Disabling\n  # this warning may not be correct; needs investigation.\n  # TODO(keir): Investigate these warnings in more detail.\n  add_compile_options(\"/wd4244\")\n  # It's not possible to use STL types in DLL interfaces in a portable and\n  # reliable way. However, that's what happens with Google Log and Google Flags\n  # on Windows. MSVC gets upset about this and throws warnings that we can't do\n  # much about. The real solution is to link static versions of Google Log and\n  # Google Test, but that seems tricky on Windows. So, disable the warning.\n  add_compile_options(\"/wd4251\")\n\n  # Add bigobj flag otherwise the build would fail due to large object files\n  # probably resulting from generated headers (like the fixed-size schur\n  # specializations).\n  add_compile_options(\"/bigobj\")\n\n  # Google Flags doesn't have their DLL import/export stuff set up correctly,\n  # which results in linker warnings. This is irrelevant for Ceres, so ignore\n  # the warnings.\n  set(CMAKE_EXE_LINKER_FLAGS \"${CMAKE_EXE_LINKER_FLAGS} /ignore:4049\")\n\n  # Update the C/CXX flags for MSVC to use either the static or shared\n  # C-Run Time (CRT) library based on the user option: MSVC_USE_STATIC_CRT.\n  list(APPEND C_CXX_FLAGS\n    CMAKE_CXX_FLAGS\n    CMAKE_CXX_FLAGS_DEBUG\n    CMAKE_CXX_FLAGS_RELEASE\n    CMAKE_CXX_FLAGS_MINSIZEREL\n    CMAKE_CXX_FLAGS_RELWITHDEBINFO)\n\n  foreach(FLAG_VAR ${C_CXX_FLAGS})\n    if (MSVC_USE_STATIC_CRT)\n      # Use static CRT.\n      if (${FLAG_VAR} MATCHES \"/MD\")\n        string(REGEX REPLACE \"/MD\" \"/MT\" ${FLAG_VAR} \"${${FLAG_VAR}}\")\n      endif (${FLAG_VAR} MATCHES \"/MD\")\n    else (MSVC_USE_STATIC_CRT)\n      # Use shared, not static, CRT.\n      if (${FLAG_VAR} MATCHES \"/MT\")\n        string(REGEX REPLACE \"/MT\" \"/MD\" ${FLAG_VAR} \"${${FLAG_VAR}}\")\n      endif (${FLAG_VAR} MATCHES \"/MT\")\n    endif (MSVC_USE_STATIC_CRT)\n  endforeach()\n\n  # Tuple sizes of 10 are used by Gtest.\n  add_definitions(\"-D_VARIADIC_MAX=10\")\n\n  include(CheckIfUnderscorePrefixedBesselFunctionsExist)\n  check_if_underscore_prefixed_bessel_functions_exist(\n    HAVE_UNDERSCORE_PREFIXED_BESSEL_FUNCTIONS)\n  if (HAVE_UNDERSCORE_PREFIXED_BESSEL_FUNCTIONS)\n    list(APPEND CERES_COMPILE_OPTIONS\n      CERES_MSVC_USE_UNDERSCORE_PREFIXED_BESSEL_FUNCTIONS)\n  endif()\nendif (MSVC)\n\nif (UNIX)\n  # Flags which we add to GCC to make it more picky about stuff\n  # we do care about,\n  add_cxx_compiler_flag_if_supported(CERES_STRICT_CXX_FLAGS\n                                     -Wmissing-declarations)\n  # Flags which we add to GCC to silence lots of annoying false-positives.\n  add_cxx_compiler_flag_if_supported(CERES_STRICT_CXX_FLAGS\n                                     -Wno-unknown-pragmas)\n  add_cxx_compiler_flag_if_supported(CERES_STRICT_CXX_FLAGS\n                                     -Wno-sign-compare)\n  add_cxx_compiler_flag_if_supported(CERES_STRICT_CXX_FLAGS\n                                     -Wno-unused-parameter)\n  add_cxx_compiler_flag_if_supported(CERES_STRICT_CXX_FLAGS\n                                     -Wno-missing-field-initializers)\n  set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} ${CERES_STRICT_CXX_FLAGS}\")\nendif (UNIX)\n\n# Use a larger inlining threshold for Clang, since it hobbles Eigen,\n# resulting in an unreasonably slow version of the blas routines. The\n# -Qunused-arguments is needed because CMake passes the inline\n# threshold to the linker and clang complains about it and dies.\nif (CMAKE_CXX_COMPILER_ID MATCHES \"Clang\") # Matches Clang & AppleClang.\n  set(CMAKE_CXX_FLAGS\n    \"${CMAKE_CXX_FLAGS} -Qunused-arguments -mllvm -inline-threshold=600\")\n\n  # Older versions of Clang (<= 2.9) do not support the 'return-type-c-linkage'\n  # option, so check for its presence before adding it to the default flags set.\n  include(CheckCXXCompilerFlag)\n  check_cxx_compiler_flag(\"-Wno-return-type-c-linkage\"\n                          HAVE_RETURN_TYPE_C_LINKAGE)\n  if (HAVE_RETURN_TYPE_C_LINKAGE)\n    set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -Wno-return-type-c-linkage\")\n  endif(HAVE_RETURN_TYPE_C_LINKAGE)\nendif ()\n\n# Configure the Ceres config.h compile options header using the current\n# compile options and put the configured header into the Ceres build\n# directory.  Note that the ceres/internal subdir in <build>/config where\n# the configured config.h is placed is important, because Ceres will be\n# built against this configured header, it needs to have the same relative\n# include path as it would if it were in the source tree (or installed).\nlist(REMOVE_DUPLICATES CERES_COMPILE_OPTIONS)\ninclude(CreateCeresConfig)\ncreate_ceres_config(\"${CERES_COMPILE_OPTIONS}\"\n  ${Ceres_BINARY_DIR}/config/ceres/internal)\n\nadd_subdirectory(internal/ceres)\n\n# Setup installation of Ceres public headers.\nfile(GLOB CERES_HDRS ${Ceres_SOURCE_DIR}/include/ceres/*.h)\n# install(FILES ${CERES_HDRS} DESTINATION include/ceres)\n\nfile(GLOB CERES_PUBLIC_INTERNAL_HDRS ${Ceres_SOURCE_DIR}/include/ceres/internal/*.h)\n# install(FILES ${CERES_PUBLIC_INTERNAL_HDRS} DESTINATION include/ceres/internal)\n\n# Also setup installation of Ceres config.h configured with the current\n# build options into the installed headers directory.\n# install(FILES ${Ceres_BINARY_DIR}/config/ceres/internal/config.h\n#         DESTINATION include/ceres/internal)\n\nif (MINIGLOG)\n  # Install miniglog header if being used as logging #includes appear in\n  # installed public Ceres headers.\n  # install(FILES ${Ceres_SOURCE_DIR}/internal/ceres/miniglog/glog/logging.h\n  #         DESTINATION include/ceres/internal/miniglog/glog)\nendif (MINIGLOG)\n\n# Ceres supports two mechanisms by which it can be detected & imported into\n# client code which uses CMake via find_package(Ceres):\n#\n#   1) Installation (e.g. to /usr/local), using CMake's install() function.\n#\n#   2) (Optional) Export of the current build directory into the local CMake\n#      package registry, using CMake's export() function.  This allows use of\n#      Ceres from other projects without requiring installation.\n#\n# In both cases, we need to generate a configured CeresConfig.cmake which\n# includes additional autogenerated files which in concert create an imported\n# target for Ceres in a client project when find_package(Ceres) is invoked.\n# The key distinctions are where this file is located, and whether client code\n# references installed copies of the compiled Ceres headers/libraries,\n# (option #1: installation), or the originals in the source/build directories\n# (option #2: export of build directory).\n#\n# NOTE: If Ceres is both exported and installed, provided that the installation\n#       path is present in CMAKE_MODULE_PATH when find_package(Ceres) is called,\n#       the installed version is preferred.\n\n# Build the list of Ceres components for CeresConfig.cmake from the current set\n# of compile options.\ninclude(CeresCompileOptionsToComponents)\nceres_compile_options_to_components(\"${CERES_COMPILE_OPTIONS}\"\n  CERES_COMPILED_COMPONENTS)\n\ninclude(CMakePackageConfigHelpers)\n\n# Create a CeresConfigVersion.cmake file containing the version information,\n# used by both export() & install().\nwrite_basic_package_version_file(\"${Ceres_BINARY_DIR}/CeresConfigVersion.cmake\"\n  VERSION ${CERES_VERSION}\n  COMPATIBILITY SameMajorVersion)\n\n# Install method #1: Put Ceres in CMAKE_INSTALL_PREFIX: /usr/local or equivalent.\n\n# Set the install path for the installed CeresConfig.cmake configuration file\n# relative to CMAKE_INSTALL_PREFIX.\nif (WIN32)\n  set(RELATIVE_CMAKECONFIG_INSTALL_DIR CMake)\nelse ()\n  set(RELATIVE_CMAKECONFIG_INSTALL_DIR lib${LIB_SUFFIX}/cmake/Ceres)\nendif ()\n\n# This \"exports\" for installation all targets which have been put into the\n# export set \"CeresExport\". This generates a CeresTargets.cmake file which,\n# when read in by a client project as part of find_package(Ceres) creates\n# imported library targets for Ceres (with dependency relations) which can be\n# used in target_link_libraries() calls in the client project to use Ceres.\n# install(EXPORT CeresExport\n#         DESTINATION ${RELATIVE_CMAKECONFIG_INSTALL_DIR} FILE CeresTargets.cmake)\n\n# Save the relative path from the installed CeresConfig.cmake file to the\n# install prefix.  We do not save an absolute path in case the installed package\n# is subsequently relocated after installation (on Windows).\nfile(RELATIVE_PATH INSTALL_ROOT_REL_CONFIG_INSTALL_DIR\n     ${CMAKE_INSTALL_PREFIX}/${RELATIVE_CMAKECONFIG_INSTALL_DIR}\n     ${CMAKE_INSTALL_PREFIX})\n\n# Configure a CeresConfig.cmake file for an installed version of Ceres from the\n# template, reflecting the current build options.\n#\n# NOTE: The -install suffix is necessary to distinguish the install version from\n#       the exported version, which must be named CeresConfig.cmake in\n#       Ceres_BINARY_DIR to be detected.  The suffix is removed when\n#       it is installed.\nset(SETUP_CERES_CONFIG_FOR_INSTALLATION TRUE)\nconfigure_file(\"${Ceres_SOURCE_DIR}/cmake/CeresConfig.cmake.in\"\n               \"${Ceres_BINARY_DIR}/CeresConfig-install.cmake\" @ONLY)\n\n# Install the configuration files into the same directory as the autogenerated\n# CeresTargets.cmake file.  We include the find_package() scripts for libraries\n# whose headers are included in the public API of Ceres and should thus be\n# present in CERES_INCLUDE_DIRS.\n# install(FILES \"${Ceres_BINARY_DIR}/CeresConfig-install.cmake\"\n#         RENAME CeresConfig.cmake\n#         DESTINATION ${RELATIVE_CMAKECONFIG_INSTALL_DIR})\n# install(FILES \"${Ceres_BINARY_DIR}/CeresConfigVersion.cmake\"\n#               \"${Ceres_SOURCE_DIR}/cmake/FindGlog.cmake\"\n#         DESTINATION ${RELATIVE_CMAKECONFIG_INSTALL_DIR})\n\nif (PROVIDE_UNINSTALL_TARGET)\n  # Create an uninstall target to remove all installed files.\n  configure_file(\"${Ceres_SOURCE_DIR}/cmake/uninstall.cmake.in\"\n                 \"${Ceres_BINARY_DIR}/cmake/uninstall.cmake\"\n                 @ONLY)\n  add_custom_target(uninstall\n                    COMMAND ${CMAKE_COMMAND} -P ${Ceres_BINARY_DIR}/cmake/uninstall.cmake)\nendif()\n\n# Install method #2: Put Ceres build into local CMake registry.\n#\n# Optionally export the Ceres build directory into the local CMake package\n# registry (~/.cmake/packages on *nix & OS X).  This allows the detection &\n# use of Ceres without requiring that it be installed.\nset(EXPORT_BUILD_DIR OFF)\nif (EXPORT_BUILD_DIR)\n  message(\"-- Export Ceres build directory to local CMake package registry.\")\n\n  # Save the relative path from the build directory to the source directory.\n  file(RELATIVE_PATH INSTALL_ROOT_REL_CONFIG_INSTALL_DIR\n    ${Ceres_BINARY_DIR}\n    ${Ceres_SOURCE_DIR})\n\n  # Analogously to install(EXPORT ...), export the Ceres target from the build\n  # directory as a package called Ceres into the local CMake package registry.\n  export(TARGETS ceres FILE ${Ceres_BINARY_DIR}/CeresTargets.cmake)\n  export(PACKAGE ${CMAKE_PROJECT_NAME})\n\n  # Configure a CeresConfig.cmake file for the export of the Ceres build\n  # directory from the template, reflecting the current build options.\n  set(SETUP_CERES_CONFIG_FOR_INSTALLATION FALSE)\n  configure_file(\"${Ceres_SOURCE_DIR}/cmake/CeresConfig.cmake.in\"\n    \"${Ceres_BINARY_DIR}/CeresConfig.cmake\" @ONLY)\n\nendif (EXPORT_BUILD_DIR)\n"
  },
  {
    "path": "3rdparty/ceres/CONTRIBUTING.md",
    "content": "---------------------------------\nDo not make GitHub pull requests!\n---------------------------------\n\nCeres development happens on\n[Gerrit](https://ceres-solver.googlesource.com/), including both\nrepository hosting and code reviews.\n\nThis GitHub Repository is a continuously updated mirror which is\nprimarily meant for issue tracking.\n\nPlease see our\n[Contributing to Ceres Guide](http://ceres-solver.org/contributing.html)\nfor more details.\n"
  },
  {
    "path": "3rdparty/ceres/LICENSE",
    "content": "Ceres Solver - A fast non-linear least squares minimizer\nCopyright 2015 Google Inc. All rights reserved.\nhttp://ceres-solver.org/\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice,\n  this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above copyright notice,\n  this list of conditions and the following disclaimer in the documentation\n  and/or other materials provided with the distribution.\n* Neither the name of Google Inc. nor the names of its contributors may be\n  used to endorse or promote products derived from this software without\n  specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "3rdparty/ceres/README.md",
    "content": "[![Build Status](https://travis-ci.org/ceres-solver/ceres-solver.svg?branch=master)](https://travis-ci.org/ceres-solver/ceres-solver)\n\nCeres Solver\n============\n\nCeres Solver is an open source C++ library for modeling and solving\nlarge, complicated optimization problems. It is a feature rich, mature\nand performant library which has been used in production at Google\nsince 2010. Ceres Solver can solve two kinds of problems.\n\n1. Non-linear Least Squares problems with bounds constraints.\n2. General unconstrained optimization problems.\n\nPlease see [ceres-solver.org](http://ceres-solver.org/) for more\ninformation.\n"
  },
  {
    "path": "3rdparty/ceres/WORKSPACE",
    "content": "# Ceres Solver - A fast non-linear least squares minimizer\n# Copyright 2018 Google Inc. All rights reserved.\n# http://ceres-solver.org/\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice,\n#   this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright notice,\n#   this list of conditions and the following disclaimer in the documentation\n#   and/or other materials provided with the distribution.\n# * Neither the name of Google Inc. nor the names of its contributors may be\n#   used to endorse or promote products derived from this software without\n#   specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n#\n# Authors: mierle@gmail.com (Keir Mierle)\n#\n# Bazel workspace file to enable building Ceres with Bazel.\n\nworkspace(name = \"com_google_ceres_solver\")\n\nload(\"@bazel_tools//tools/build_defs/repo:http.bzl\", \"http_archive\")\n\n# External dependency: Google Flags; has Bazel build already.\nhttp_archive(\n    name = \"com_github_gflags_gflags\",\n    sha256 = \"6e16c8bc91b1310a44f3965e616383dbda48f83e8c1eaa2370a215057b00cabe\",\n    strip_prefix = \"gflags-77592648e3f3be87d6c7123eb81cbad75f9aef5a\",\n    urls = [\n        \"https://mirror.bazel.build/github.com/gflags/gflags/archive/77592648e3f3be87d6c7123eb81cbad75f9aef5a.tar.gz\",\n        \"https://github.com/gflags/gflags/archive/77592648e3f3be87d6c7123eb81cbad75f9aef5a.tar.gz\",\n    ],\n)\n\n# External dependency: Google Log; has Bazel build already.\nhttp_archive(\n    name = \"com_github_google_glog\",\n    sha256 = \"7083af285bed3995b5dc2c982f7de39bced9f0e6fd78d631f3285490922a0c3d\",\n    strip_prefix = \"glog-3106945d8d3322e5cbd5658d482c9ffed2d892c0\",\n    urls = [\n        \"https://github.com/drigz/glog/archive/3106945d8d3322e5cbd5658d482c9ffed2d892c0.tar.gz\",\n    ],\n)\n\n# External dependency: Eigen; has no Bazel build.\nhttp_archive(\n    name = \"com_github_eigen_eigen\",\n    sha256 = \"dd254beb0bafc695d0f62ae1a222ff85b52dbaa3a16f76e781dce22d0d20a4a6\",\n    strip_prefix = \"eigen-eigen-5a0156e40feb\",\n    urls = [\n        \"http://bitbucket.org/eigen/eigen/get/3.3.4.tar.bz2\",\n    ],\n    build_file_content =\n\"\"\"\n# TODO(keir): Replace this with a better version, like from TensorFlow.\n# See https://github.com/ceres-solver/ceres-solver/issues/337.\ncc_library(\n    name = 'eigen',\n    srcs = [],\n    includes = ['.'],\n    hdrs = glob(['Eigen/**']),\n    visibility = ['//visibility:public'],\n)\n\"\"\"\n)\n\n# External dependency: Google Benchmark; has no Bazel build.\nhttp_archive(\n    name = \"com_github_google_benchmark\",\n    urls = [\"https://github.com/google/benchmark/archive/56f52ee228783547f544d9ac4a533574b9010e3f.zip\"],\n    sha256 = \"8c1c6e90cd320b07504fabb86400f390faff2e599183ebd9396908817968ae79\",\n    strip_prefix = \"benchmark-56f52ee228783547f544d9ac4a533574b9010e3f\",\n    build_file_content =\n\"\"\"\ncc_library(\n    name = \"benchmark\",\n    srcs = glob([\n        \"src/*.h\",\n        \"src/*.cc\",\n    ]),\n    hdrs = glob([\"include/benchmark/*.h\"]),\n    copts = [\n        \"-DHAVE_STD_REGEX\",\n    ],\n    includes = [\n        \"include\",\n    ],\n    visibility = [\"//visibility:public\"],\n)\n\"\"\"\n)\n"
  },
  {
    "path": "3rdparty/ceres/bazel/ceres.bzl",
    "content": "# Ceres Solver - A fast non-linear least squares minimizer\n# Copyright 2018 Google Inc. All rights reserved.\n# http://ceres-solver.org/\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice,\n#   this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright notice,\n#   this list of conditions and the following disclaimer in the documentation\n#   and/or other materials provided with the distribution.\n# * Neither the name of Google Inc. nor the names of its contributors may be\n#   used to endorse or promote products derived from this software without\n#   specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n#\n# Support for building Ceres Solver with a specific configuration.\n\nCERES_SRCS = [\"internal/ceres/\" + filename for filename in [\n    \"accelerate_sparse.cc\",\n    \"array_utils.cc\",\n    \"blas.cc\",\n    \"block_evaluate_preparer.cc\",\n    \"block_jacobian_writer.cc\",\n    \"block_jacobi_preconditioner.cc\",\n    \"block_random_access_dense_matrix.cc\",\n    \"block_random_access_diagonal_matrix.cc\",\n    \"block_random_access_matrix.cc\",\n    \"block_random_access_sparse_matrix.cc\",\n    \"block_sparse_matrix.cc\",\n    \"block_structure.cc\",\n    \"c_api.cc\",\n    \"callbacks.cc\",\n    \"canonical_views_clustering.cc\",\n    \"cgnr_solver.cc\",\n    \"compressed_col_sparse_matrix_utils.cc\",\n    \"compressed_row_jacobian_writer.cc\",\n    \"compressed_row_sparse_matrix.cc\",\n    \"conditioned_cost_function.cc\",\n    \"conjugate_gradients_solver.cc\",\n    \"context.cc\",\n    \"context_impl.cc\",\n    \"coordinate_descent_minimizer.cc\",\n    \"corrector.cc\",\n    \"covariance.cc\",\n    \"covariance_impl.cc\",\n    \"dense_normal_cholesky_solver.cc\",\n    \"dense_qr_solver.cc\",\n    \"dense_sparse_matrix.cc\",\n    \"detect_structure.cc\",\n    \"dogleg_strategy.cc\",\n    \"dynamic_compressed_row_jacobian_writer.cc\",\n    \"dynamic_compressed_row_sparse_matrix.cc\",\n    \"dynamic_sparse_normal_cholesky_solver.cc\",\n    \"eigensparse.cc\",\n    \"evaluator.cc\",\n    \"file.cc\",\n    \"function_sample.cc\",\n    \"gradient_checker.cc\",\n    \"gradient_checking_cost_function.cc\",\n    \"gradient_problem.cc\",\n    \"gradient_problem_solver.cc\",\n    \"is_close.cc\",\n    \"implicit_schur_complement.cc\",\n    \"inner_product_computer.cc\",\n    \"iterative_refiner.cc\",\n    \"iterative_schur_complement_solver.cc\",\n    \"lapack.cc\",\n    \"levenberg_marquardt_strategy.cc\",\n    \"line_search.cc\",\n    \"line_search_direction.cc\",\n    \"line_search_minimizer.cc\",\n    \"linear_least_squares_problems.cc\",\n    \"linear_operator.cc\",\n    \"line_search_preprocessor.cc\",\n    \"linear_solver.cc\",\n    \"local_parameterization.cc\",\n    \"loss_function.cc\",\n    \"low_rank_inverse_hessian.cc\",\n    \"minimizer.cc\",\n    \"normal_prior.cc\",\n    \"parallel_for_cxx.cc\",\n    \"parallel_for_openmp.cc\",\n    \"parallel_utils.cc\",\n    \"parameter_block_ordering.cc\",\n    \"partitioned_matrix_view.cc\",\n    \"polynomial.cc\",\n    \"preconditioner.cc\",\n    \"preprocessor.cc\",\n    \"problem.cc\",\n    \"problem_impl.cc\",\n    \"program.cc\",\n    \"reorder_program.cc\",\n    \"residual_block.cc\",\n    \"residual_block_utils.cc\",\n    \"schur_complement_solver.cc\",\n    \"schur_eliminator.cc\",\n    \"schur_jacobi_preconditioner.cc\",\n    \"schur_templates.cc\",\n    \"scratch_evaluate_preparer.cc\",\n    \"single_linkage_clustering.cc\",\n    \"solver.cc\",\n    \"solver_utils.cc\",\n    \"sparse_cholesky.cc\",\n    \"sparse_matrix.cc\",\n    \"sparse_normal_cholesky_solver.cc\",\n    \"split.cc\",\n    \"stringprintf.cc\",\n    \"subset_preconditioner.cc\",\n    \"suitesparse.cc\",\n    \"thread_pool.cc\",\n    \"thread_token_provider.cc\",\n    \"triplet_sparse_matrix.cc\",\n    \"trust_region_minimizer.cc\",\n    \"trust_region_preprocessor.cc\",\n    \"trust_region_step_evaluator.cc\",\n    \"trust_region_strategy.cc\",\n    \"types.cc\",\n    \"visibility_based_preconditioner.cc\",\n    \"visibility.cc\",\n    \"wall_time.cc\",\n]]\n\n# TODO(rodrigoq): add support to configure Ceres into various permutations,\n# like SuiteSparse or not, threading or not, glog or not, and so on.\n# See https://github.com/ceres-solver/ceres-solver/issues/335.\ndef ceres_library(name,\n                  restrict_schur_specializations=False):\n    # The path to internal/ depends on whether Ceres is the main workspace or\n    # an external repository.\n    if native.repository_name() != '@':\n        internal = 'external/%s/internal' % native.repository_name().lstrip('@')\n    else:\n        internal = 'internal'\n\n    # The fixed-size Schur eliminator template instantiations incur a large\n    # binary size penalty, and are slow to compile, so support disabling them.\n    schur_eliminator_copts = []\n    if restrict_schur_specializations:\n        schur_eliminator_copts.append(\"-DCERES_RESTRICT_SCHUR_SPECIALIZATION\")\n        schur_sources = [\n            \"internal/ceres/generated/schur_eliminator_d_d_d.cc\",\n            \"internal/ceres/generated/partitioned_matrix_view_d_d_d.cc\",\n        ]\n    else:\n        schur_sources = native.glob([\"internal/ceres/generated/*.cc\"])\n\n    native.cc_library(\n        name = name,\n\n        # Internal sources, options, and dependencies.\n        srcs = CERES_SRCS + schur_sources + native.glob([\n            \"include/ceres/internal/*.h\",\n        ]) + native.glob([\n            \"internal/ceres/*.h\",\n        ]),\n\n        # These headers are made available to other targets.\n        hdrs =\n            native.glob([\"include/ceres/*.h\"]) + native.glob([\n                \"include/ceres/internal/*.h\",\n            ]) +\n\n            # This is an empty config, since the Bazel-based build does not\n            # generate a config.h from config.h.in. This is fine, since Bazel\n            # properly handles propagating -D defines to dependent targets.\n            native.glob([\n                \"config/ceres/internal/config.h\",\n            ]),\n        copts = [\n            \"-I\" + internal,\n            \"-Wno-sign-compare\",\n        ] + schur_eliminator_copts,\n\n        # These include directories and defines are propagated to other targets\n        # depending on Ceres.\n        # TODO(keir): These defines are placeholders for now to facilitate getting\n        # started with a Bazel build. However, these should become configurable as\n        # part of a Skylark Ceres target macro.\n        # https://github.com/ceres-solver/ceres-solver/issues/396\n        defines = [\n            \"CERES_NO_SUITESPARSE\",\n            \"CERES_NO_CXSPARSE\",\n            \"CERES_NO_ACCELERATE_SPARSE\",\n            \"CERES_NO_LAPACK\",\n            \"CERES_USE_EIGEN_SPARSE\",\n            \"CERES_USE_CXX11_THREADS\",\n        ],\n        includes = [\n            \"config\",\n            \"include\",\n        ],\n        visibility = [\"//visibility:public\"],\n        deps = [\n            \"@com_github_eigen_eigen//:eigen\",\n            \"@com_github_google_glog//:glog\",\n        ],\n    )\n"
  },
  {
    "path": "3rdparty/ceres/cmake/AddCompileFlagsIfSupported.cmake",
    "content": "# Ceres Solver - A fast non-linear least squares minimizer\n# Copyright 2017 Google Inc. All rights reserved.\n# http://ceres-solver.org/\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice,\n#   this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright notice,\n#   this list of conditions and the following disclaimer in the documentation\n#   and/or other materials provided with the distribution.\n# * Neither the name of Google Inc. nor the names of its contributors may be\n#   used to endorse or promote products derived from this software without\n#   specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n#\n# Author: sergey.vfx@gmail.com (Sergey Sharybin)\n\nfunction(add_cxx_compiler_flag_if_supported\n    AGGREGATED_CXX_FLAGS_VAR\n    FLAG_TO_ADD_IF_SUPPORTED)\n  include(CheckCXXCompilerFlag)\n  # Use of whitespace or '-' in variable names (used by CheckCXXSourceCompiles\n  # as #defines) will trigger errors.\n  string(STRIP \"${FLAG_TO_ADD_IF_SUPPORTED}\" FLAG_TO_ADD_IF_SUPPORTED)\n  # Build an informatively named test result variable so that it will be evident\n  # which tests were performed/succeeded in the CMake output, e.g for -Wall:\n  #\n  # -- Performing Test CHECK_CXX_FLAG_Wall - Success\n  #\n  # NOTE: This variable is also used to cache test result.\n  string(REPLACE \"-\" \"_\" CHECK_CXX_FLAG\n    \"CHECK_CXX_FLAG${FLAG_TO_ADD_IF_SUPPORTED}\")\n  check_cxx_compiler_flag(${FLAG_TO_ADD_IF_SUPPORTED} ${CHECK_CXX_FLAG})\n  if (${CHECK_CXX_FLAG})\n    set(${AGGREGATED_CXX_FLAGS_VAR}\n      \"${${AGGREGATED_CXX_FLAGS_VAR}} ${FLAG_TO_ADD_IF_SUPPORTED}\" PARENT_SCOPE)\n  endif()\nendfunction()\n"
  },
  {
    "path": "3rdparty/ceres/cmake/AddGerritCommitHook.cmake",
    "content": "# Ceres Solver - A fast non-linear least squares minimizer\n# Copyright 2015 Google Inc. All rights reserved.\n# http://ceres-solver.org/\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice,\n#   this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright notice,\n#   this list of conditions and the following disclaimer in the documentation\n#   and/or other materials provided with the distribution.\n# * Neither the name of Google Inc. nor the names of its contributors may be\n#   used to endorse or promote products derived from this software without\n#   specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n#\n# Authors: keir@google.com (Keir Mierle)\n#          alexs.mac@gmail.com (Alex Stewart)\n\n# Set up the git hook to make Gerrit Change-Id: lines in commit messages.\nfunction(ADD_GERRIT_COMMIT_HOOK SOURCE_DIR BINARY_DIR)\n  if (NOT (EXISTS ${SOURCE_DIR} AND IS_DIRECTORY ${SOURCE_DIR}))\n    message(FATAL_ERROR \"Specified SOURCE_DIR: ${SOURCE_DIR} does not exist, \"\n      \"or is not a directory, cannot add Gerrit commit hook.\")\n  endif()\n  if (NOT (EXISTS ${BINARY_DIR} AND IS_DIRECTORY ${BINARY_DIR}))\n    message(FATAL_ERROR \"Specified BINARY_DIR: ${BINARY_DIR} does not exist, \"\n      \"or is not a directory, cannot add Gerrit commit hook.\")\n  endif()\n  unset (LOCAL_GIT_DIRECTORY)\n  if (EXISTS ${SOURCE_DIR}/.git)\n    if (IS_DIRECTORY ${SOURCE_DIR}/.git)\n      # .git directory can be found on Unix based system, or on Windows with\n      # Git Bash (shipped with msysgit).\n      set (LOCAL_GIT_DIRECTORY ${SOURCE_DIR}/.git)\n    else(IS_DIRECTORY ${SOURCE_DIR}/.git)\n      # .git is a file, this means Ceres is a git submodule of another project\n      # and our .git file contains the path to the git directory which manages\n      # Ceres, so we should add the gerrit hook there.\n      file(READ ${SOURCE_DIR}/.git GIT_SUBMODULE_FILE_CONTENTS)\n      # Strip any trailing newline characters, s/t we get a valid path.\n      string(REGEX REPLACE \"gitdir:[ ]*([^$].*)[\\n].*\" \"${SOURCE_DIR}/\\\\1\"\n        GIT_SUBMODULE_GIT_DIRECTORY_PATH \"${GIT_SUBMODULE_FILE_CONTENTS}\")\n      get_filename_component(GIT_SUBMODULE_GIT_DIRECTORY_PATH\n        \"${GIT_SUBMODULE_GIT_DIRECTORY_PATH}\" ABSOLUTE)\n      if (EXISTS ${GIT_SUBMODULE_GIT_DIRECTORY_PATH}\n          AND IS_DIRECTORY ${GIT_SUBMODULE_GIT_DIRECTORY_PATH})\n        set(LOCAL_GIT_DIRECTORY \"${GIT_SUBMODULE_GIT_DIRECTORY_PATH}\")\n      endif()\n    endif()\n  else (EXISTS ${SOURCE_DIR}/.git)\n    # TODO(keir) Add proper Windows support.\n  endif (EXISTS ${SOURCE_DIR}/.git)\n\n  if (EXISTS ${LOCAL_GIT_DIRECTORY})\n    if (NOT EXISTS ${LOCAL_GIT_DIRECTORY}/hooks/commit-msg)\n      message(STATUS \"Detected Ceres being used as a git submodule, adding \"\n        \"commit hook for Gerrit to: ${LOCAL_GIT_DIRECTORY}\")\n      # Download the hook only if it is not already present.\n      file(DOWNLOAD https://ceres-solver-review.googlesource.com/tools/hooks/commit-msg\n        ${BINARY_DIR}/commit-msg)\n\n      # Make the downloaded file executable, since it is not by default.\n      file(COPY ${BINARY_DIR}/commit-msg\n        DESTINATION ${LOCAL_GIT_DIRECTORY}/hooks/\n        FILE_PERMISSIONS\n        OWNER_READ OWNER_WRITE OWNER_EXECUTE\n        GROUP_READ GROUP_WRITE GROUP_EXECUTE\n        WORLD_READ WORLD_EXECUTE)\n    endif (NOT EXISTS ${LOCAL_GIT_DIRECTORY}/hooks/commit-msg)\n  endif (EXISTS ${LOCAL_GIT_DIRECTORY})\nendfunction()\n"
  },
  {
    "path": "3rdparty/ceres/cmake/AppendTargetProperty.cmake",
    "content": "# Ceres Solver - A fast non-linear least squares minimizer\n# Copyright 2015 Google Inc. All rights reserved.\n# http://ceres-solver.org/\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice,\n#   this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright notice,\n#   this list of conditions and the following disclaimer in the documentation\n#   and/or other materials provided with the distribution.\n# * Neither the name of Google Inc. nor the names of its contributors may be\n#   used to endorse or promote products derived from this software without\n#   specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n#\n# Author: alexs.mac@gmail.com (Alex Stewart)\n\n# Append item(s) to a property on a declared CMake target:\n#\n#    append_target_property(target property item_to_append1\n#                                           [... item_to_appendN])\n#\n# The set_target_properties() CMake function will overwrite the contents of the\n# specified target property.  This function instead appends to it, so can\n# be called multiple times with the same target & property to iteratively\n# populate it.\nfunction(append_target_property TARGET PROPERTY)\n  if (NOT TARGET ${TARGET})\n    message(FATAL_ERROR \"Invalid target: ${TARGET} cannot append: ${ARGN} \"\n      \"to property: ${PROPERTY}\")\n  endif()\n  if (NOT PROPERTY)\n    message(FATAL_ERROR \"Invalid property to update for target: ${TARGET}\")\n  endif()\n  # Get the initial state of the specified property for the target s/t\n  # we can append to it (not overwrite it).\n  get_target_property(INITIAL_PROPERTY_STATE ${TARGET} ${PROPERTY})\n  if (NOT INITIAL_PROPERTY_STATE)\n    # Ensure that if the state is unset, we do not insert the XXX-NOTFOUND\n    # returned by CMake into the property.\n    set(INITIAL_PROPERTY_STATE \"\")\n  endif()\n  # Delistify (remove ; separators) the potentially set of items to append\n  # to the specified target property.\n  string(REPLACE \";\" \" \" ITEMS_TO_APPEND \"${ARGN}\")\n  set_target_properties(${TARGET} PROPERTIES ${PROPERTY}\n    \"${INITIAL_PROPERTY_STATE} ${ITEMS_TO_APPEND}\")\nendfunction()\n"
  },
  {
    "path": "3rdparty/ceres/cmake/CeresCompileOptionsToComponents.cmake",
    "content": "# Ceres Solver - A fast non-linear least squares minimizer\n# Copyright 2016 Google Inc. All rights reserved.\n# http://ceres-solver.org/\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice,\n#   this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright notice,\n#   this list of conditions and the following disclaimer in the documentation\n#   and/or other materials provided with the distribution.\n# * Neither the name of Google Inc. nor the names of its contributors may be\n#   used to endorse or promote products derived from this software without\n#   specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n#\n# Authors: alexs.mac@gmail.com (Alex Stewart)\n#\n\n# Conditionally add a value to the output list based on whether the specified\n# value is found in the input list.\nfunction(update_output_if_found INPUT_LIST_VAR OUTPUT_LIST_VAR ITEM_TO_FIND VAR_TO_COPY_IF_FOUND VAR_TO_COPY_IF_NOT_FOUND)\n  list(FIND ${INPUT_LIST_VAR} \"${ITEM_TO_FIND}\" HAVE_ITEM)\n  # list(FIND ..) returns -1 if the element was not in the list, but CMake\n  # interprets if (VAR) to be true if VAR is any non-zero number, even\n  # negative ones, hence we have to explicitly check for >= 0.\n  if (HAVE_ITEM GREATER -1)\n    list(APPEND ${OUTPUT_LIST_VAR} \"${VAR_TO_COPY_IF_FOUND}\")\n  else()\n    list(APPEND ${OUTPUT_LIST_VAR} \"${VAR_TO_COPY_IF_NOT_FOUND}\")\n  endif()\n  set(${OUTPUT_LIST_VAR} ${${OUTPUT_LIST_VAR}} PARENT_SCOPE)\nendfunction()\n\n# Helpers for update_output_if_found() to improve legibility when dealing with\n# USE_XXX & NO_XXX option types in ceres_compile_options_to_components().\nmacro(add_to_output_if_found INPUT_LIST_VAR OUTPUT_LIST_VAR ITEM_TO_FIND VAR_TO_COPY_IF_FOUND)\n  update_output_if_found(${INPUT_LIST_VAR}\n    ${OUTPUT_LIST_VAR}\n    \"${ITEM_TO_FIND}\"\n    \"${VAR_TO_COPY_IF_FOUND}\"\n    \"\") # Copy nothing if not found.\nendmacro()\n\nmacro(add_to_output_if_not_found INPUT_LIST_VAR OUTPUT_LIST_VAR ITEM_TO_FIND VAR_TO_COPY_IF_NOT_FOUND)\n  update_output_if_found(${INPUT_LIST_VAR}\n    ${OUTPUT_LIST_VAR}\n    \"${ITEM_TO_FIND}\"\n    \"\" # Copy nothing if found\n    \"${VAR_TO_COPY_IF_NOT_FOUND}\")\nendmacro()\n\n# Convert the Ceres compile options specified by: CURRENT_CERES_COMPILE_OPTIONS\n# into the corresponding list of Ceres components (names), which may be used in:\n# find_package(Ceres COMPONENTS <XXX>).\nfunction(ceres_compile_options_to_components CURRENT_CERES_COMPILE_OPTIONS CERES_COMPONENTS_VAR)\n  # To enable users to specify that they want *a* sparse linear algebra backend\n  # without having to specify explicitly which one, for each sparse library we\n  # add the 'meta-module': SparseLinearAlgebraLibrary in addition to their own\n  # module name.\n  add_to_output_if_found(CURRENT_CERES_COMPILE_OPTIONS ${CERES_COMPONENTS_VAR}\n    CERES_USE_EIGEN_SPARSE \"EigenSparse;SparseLinearAlgebraLibrary\")\n  add_to_output_if_not_found(CURRENT_CERES_COMPILE_OPTIONS ${CERES_COMPONENTS_VAR}\n    CERES_NO_LAPACK \"LAPACK\")\n  add_to_output_if_not_found(CURRENT_CERES_COMPILE_OPTIONS ${CERES_COMPONENTS_VAR}\n    CERES_NO_SUITESPARSE \"SuiteSparse;SparseLinearAlgebraLibrary\")\n  add_to_output_if_not_found(CURRENT_CERES_COMPILE_OPTIONS ${CERES_COMPONENTS_VAR}\n    CERES_NO_CXSPARSE \"CXSparse;SparseLinearAlgebraLibrary\")\n  add_to_output_if_not_found(CURRENT_CERES_COMPILE_OPTIONS ${CERES_COMPONENTS_VAR}\n    CERES_NO_ACCELERATE_SPARSE \"AccelerateSparse;SparseLinearAlgebraLibrary\")\n  add_to_output_if_not_found(CURRENT_CERES_COMPILE_OPTIONS ${CERES_COMPONENTS_VAR}\n    CERES_RESTRICT_SCHUR_SPECIALIZATION \"SchurSpecializations\")\n  add_to_output_if_found(CURRENT_CERES_COMPILE_OPTIONS ${CERES_COMPONENTS_VAR}\n    CERES_USE_OPENMP \"OpenMP;Multithreading\")\n  # Remove duplicates of SparseLinearAlgebraLibrary if multiple sparse backends\n  # are present.\n  list(REMOVE_DUPLICATES ${CERES_COMPONENTS_VAR})\n  set(${CERES_COMPONENTS_VAR} \"${${CERES_COMPONENTS_VAR}}\" PARENT_SCOPE)\nendfunction()\n"
  },
  {
    "path": "3rdparty/ceres/cmake/CeresConfig.cmake.in",
    "content": "# Ceres Solver - A fast non-linear least squares minimizer\n# Copyright 2015 Google Inc. All rights reserved.\n# http://ceres-solver.org/\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice,\n#   this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright notice,\n#   this list of conditions and the following disclaimer in the documentation\n#   and/or other materials provided with the distribution.\n# * Neither the name of Google Inc. nor the names of its contributors may be\n#   used to endorse or promote products derived from this software without\n#   specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n#\n# Authors: pablo.speciale@gmail.com (Pablo Speciale)\n#          alexs.mac@gmail.com (Alex Stewart)\n#\n\n# Config file for Ceres Solver - Find Ceres & dependencies.\n#\n# This file is used by CMake when find_package(Ceres) is invoked and either\n# the directory containing this file either is present in CMAKE_MODULE_PATH\n# (if Ceres was installed), or exists in the local CMake package registry if\n# the Ceres build directory was exported.\n#\n# This module defines the following variables:\n#\n# Ceres_FOUND / CERES_FOUND: True if Ceres has been successfully\n#                            found. Both variables are set as although\n#                            FindPackage() only references Ceres_FOUND\n#                            in Config mode, given the conventions for\n#                            <package>_FOUND when FindPackage() is\n#                            called in Module mode, users could\n#                            reasonably expect to use CERES_FOUND\n#                            instead.\n#\n# CERES_VERSION: Version of Ceres found.\n#\n# CERES_LIBRARIES: Libraries for Ceres and all\n#                  dependencies against which Ceres was\n#                  compiled. This will not include any optional\n#                  dependencies that were disabled when Ceres was\n#                  compiled.\n#\n# NOTE: There is no equivalent of CERES_INCLUDE_DIRS as the exported\n#       CMake target already includes the definition of its public\n#       include directories.\n\ninclude(CMakeFindDependencyMacro)\n\n# Called if we failed to find Ceres or any of its required dependencies,\n# unsets all public (designed to be used externally) variables and reports\n# error message at priority depending upon [REQUIRED/QUIET/<NONE>] argument.\nmacro(CERES_REPORT_NOT_FOUND REASON_MSG)\n  # FindPackage() only references Ceres_FOUND, and requires it to be\n  # explicitly set FALSE to denote not found (not merely undefined).\n  set(Ceres_FOUND FALSE)\n  set(CERES_FOUND FALSE)\n  unset(CERES_INCLUDE_DIR)\n  unset(CERES_INCLUDE_DIRS)\n  unset(CERES_LIBRARIES)\n\n  # Reset the CMake module path to its state when this script was called.\n  set(CMAKE_MODULE_PATH ${CALLERS_CMAKE_MODULE_PATH})\n\n  # Note <package>_FIND_[REQUIRED/QUIETLY] variables defined by\n  # FindPackage() use the camelcase library name, not uppercase.\n  if (Ceres_FIND_QUIETLY)\n    message(STATUS \"Failed to find Ceres - \" ${REASON_MSG} ${ARGN})\n  elseif (Ceres_FIND_REQUIRED)\n    message(FATAL_ERROR \"Failed to find Ceres - \" ${REASON_MSG} ${ARGN})\n  else()\n    # Neither QUIETLY nor REQUIRED, use SEND_ERROR which emits an error\n    # that prevents generation, but continues configuration.\n    message(SEND_ERROR \"Failed to find Ceres - \" ${REASON_MSG} ${ARGN})\n  endif ()\n  return()\nendmacro(CERES_REPORT_NOT_FOUND)\n\n# ceres_pretty_print_cmake_list( OUTPUT_VAR [item1 [item2 ... ]] )\n#\n# Sets ${OUTPUT_VAR} in the caller's scope to a human-readable string\n# representation of the list passed as the remaining arguments formed\n# as: \"[item1, item2, ..., itemN]\".\nfunction(ceres_pretty_print_cmake_list OUTPUT_VAR)\n  string(REPLACE \";\" \", \" PRETTY_LIST_STRING \"[${ARGN}]\")\n  set(${OUTPUT_VAR} \"${PRETTY_LIST_STRING}\" PARENT_SCOPE)\nendfunction()\n\n# The list of (optional) components this version of Ceres was compiled with.\nset(CERES_COMPILED_COMPONENTS \"@CERES_COMPILED_COMPONENTS@\")\n\n# If Ceres was not installed, then by definition it was exported\n# from a build directory.\nset(CERES_WAS_INSTALLED @SETUP_CERES_CONFIG_FOR_INSTALLATION@)\n\n# Record the state of the CMake module path when this script was\n# called so that we can ensure that we leave it in the same state on\n# exit as it was on entry, but modify it locally.\nset(CALLERS_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})\n\n# Get the (current, i.e. installed) directory containing this file.\nget_filename_component(CERES_CURRENT_CONFIG_DIR\n  \"${CMAKE_CURRENT_LIST_FILE}\" PATH)\n\nif (CERES_WAS_INSTALLED)\n  # Reset CMake module path to the installation directory of this\n  # script, thus we will use the FindPackage() scripts shipped with\n  # Ceres to find Ceres' dependencies, even if the user has equivalently\n  # named FindPackage() scripts in their project.\n  set(CMAKE_MODULE_PATH ${CERES_CURRENT_CONFIG_DIR})\n\n  # Build the absolute root install directory as a relative path\n  # (determined when Ceres was configured & built) from the current\n  # install directory for this this file.  This allows for the install\n  # tree to be relocated, after Ceres was built, outside of CMake.\n  get_filename_component(CURRENT_ROOT_INSTALL_DIR\n    \"${CERES_CURRENT_CONFIG_DIR}/@INSTALL_ROOT_REL_CONFIG_INSTALL_DIR@\"\n    ABSOLUTE)\n  if (NOT EXISTS ${CURRENT_ROOT_INSTALL_DIR})\n    ceres_report_not_found(\n      \"Ceres install root: ${CURRENT_ROOT_INSTALL_DIR}, \"\n      \"determined from relative path from CeresConfig.cmake install location: \"\n      \"${CERES_CURRENT_CONFIG_DIR}, does not exist. Either the install \"\n      \"directory was deleted, or the install tree was only partially relocated \"\n      \"outside of CMake after Ceres was built.\")\n  endif (NOT EXISTS ${CURRENT_ROOT_INSTALL_DIR})\n\nelse(CERES_WAS_INSTALLED)\n  # Ceres was exported from the build tree.\n  set(CERES_EXPORTED_BUILD_DIR ${CERES_CURRENT_CONFIG_DIR})\n  get_filename_component(CERES_EXPORTED_SOURCE_DIR\n    \"${CERES_EXPORTED_BUILD_DIR}/@INSTALL_ROOT_REL_CONFIG_INSTALL_DIR@\"\n    ABSOLUTE)\n  if (NOT EXISTS ${CERES_EXPORTED_SOURCE_DIR})\n    ceres_report_not_found(\n      \"Ceres exported source directory: ${CERES_EXPORTED_SOURCE_DIR}, \"\n      \"determined from relative path from CeresConfig.cmake exported build \"\n      \"directory: ${CERES_EXPORTED_BUILD_DIR} does not exist.\")\n  endif()\n\n  # Reset CMake module path to the cmake directory in the Ceres source\n  # tree which was exported, thus we will use the FindPackage() scripts shipped\n  # with Ceres to find Ceres' dependencies, even if the user has equivalently\n  # named FindPackage() scripts in their project.\n  set(CMAKE_MODULE_PATH ${CERES_EXPORTED_SOURCE_DIR}/cmake)\nendif(CERES_WAS_INSTALLED)\n\n# Set the version.\nset(CERES_VERSION @CERES_VERSION@ )\n\ninclude(CMakeFindDependencyMacro)\nfind_dependency(Threads)\n\n# Eigen.\n# Flag set during configuration and build of Ceres.\nset(CERES_EIGEN_VERSION @EIGEN3_VERSION_STRING@)\n# Search quietly to control the timing of the error message if not found. The\n# search should be for an exact match, but for usability reasons do a soft\n# match and reject with an explanation below.\nfind_package(Eigen3 ${CERES_EIGEN_VERSION} CONFIG QUIET)\nif (EIGEN3_FOUND)\n  if (NOT EIGEN3_VERSION_STRING VERSION_EQUAL CERES_EIGEN_VERSION)\n    # CMake's VERSION check in FIND_PACKAGE() will accept any version >= the\n    # specified version. However, only version = is supported. Improve\n    # usability by explaining why we don't accept non-exact version matching.\n    ceres_report_not_found(\"Found Eigen dependency, but the version of Eigen \"\n      \"found (${EIGEN3_VERSION_STRING}) does not exactly match the version of Eigen \"\n      \"Ceres was compiled with (${CERES_EIGEN_VERSION}). This can cause subtle \"\n      \"bugs by triggering violations of the One Definition Rule. See the \"\n      \"Wikipedia article http://en.wikipedia.org/wiki/One_Definition_Rule \"\n      \"for more details\")\n  endif ()\n  message(STATUS \"Found required Ceres dependency: \"\n    \"Eigen version ${CERES_EIGEN_VERSION} in ${EIGEN3_INCLUDE_DIRS}\")\nelse (EIGEN3_FOUND)\n  ceres_report_not_found(\"Missing required Ceres \"\n    \"dependency: Eigen version ${CERES_EIGEN_VERSION}, please set \"\n    \"Eigen3_DIR.\")\nendif (EIGEN3_FOUND)\n\n# Glog.\n# Flag set during configuration and build of Ceres.\nset(CERES_USES_MINIGLOG @MINIGLOG@)\nset(CERES_USES_GFLAGS @GFLAGS@)\nset(CERES_GFLAGS_VERSION @gflags_VERSION@)\nif (CERES_USES_MINIGLOG)\n  # Output message at standard log level (not the lower STATUS) so that\n  # the message is output in GUI during configuration to warn user.\n  message(\"-- Found Ceres compiled with miniglog substitute \"\n    \"for glog, beware this will likely cause problems if glog is later linked.\")\nelse(CERES_USES_MINIGLOG)\n  # As imported CMake targets are not re-exported when a dependent target is\n  # exported, we must invoke find_package(XXX) here to reload the definition\n  # of their targets.  Without this, the dependency target names (e.g.\n  # 'gflags-shared') which will be present in the ceres target would not be\n  # defined, and so CMake will assume that they refer to a library name and\n  # fail to link correctly.\n\n  # Append the locations of glog when Ceres was built to the search path hints.\n  set(GLOG_WAS_BUILT_WITH_CMAKE @FOUND_INSTALLED_GLOG_CMAKE_CONFIGURATION@)\n  if (GLOG_WAS_BUILT_WITH_CMAKE)\n    set(glog_DIR \"@glog_DIR@\")\n    set(GLOG_PREFER_EXPORTED_GLOG_CMAKE_CONFIGURATION TRUE)\n  else()\n    list(APPEND GLOG_INCLUDE_DIR_HINTS \"@GLOG_INCLUDE_DIR@\")\n    get_filename_component(CERES_BUILD_GLOG_LIBRARY_DIR \"@GLOG_LIBRARY@\" PATH)\n    list(APPEND GLOG_LIBRARY_DIR_HINTS ${CERES_BUILD_GLOG_LIBRARY_DIR})\n  endif()\n  # Search quietly s/t we control the timing of the error message if not found.\n  find_package(Glog QUIET)\n  if (GLOG_FOUND)\n    message(STATUS \"Found required Ceres dependency: glog\")\n  else()\n    ceres_report_not_found(\"Missing required Ceres \"\n      \"dependency: glog. Searched using GLOG_INCLUDE_DIR_HINTS: \"\n      \"${GLOG_INCLUDE_DIR_HINTS} and glog_DIR: ${glog_DIR}.\")\n  endif()\n\n  # gflags is only a public dependency of Ceres via glog, thus is not required\n  # if Ceres was built with MINIGLOG.\n  if (CERES_USES_GFLAGS)\n    # Search quietly s/t we control the timing of the error message if not found.\n    find_package(gflags ${CERES_GFLAGS_VERSION} CONFIG QUIET)\n    if (gflags_FOUND)\n      message(STATUS \"Found required Ceres dependency: gflags\")\n    else()\n      ceres_report_not_found(\"Missing required Ceres \"\n        \"dependency: gflags.\")\n    endif()\n  endif()\nendif(CERES_USES_MINIGLOG)\n\n# Import exported Ceres targets, if they have not already been imported.\nif (NOT TARGET ceres AND NOT Ceres_BINARY_DIR)\n  include(${CERES_CURRENT_CONFIG_DIR}/CeresTargets.cmake)\nendif (NOT TARGET ceres AND NOT Ceres_BINARY_DIR)\n# Set the expected XX_LIBRARIES variable for FindPackage().\nset(CERES_LIBRARIES ceres)\n\n# Reset CMake module path to its state when this script was called.\nset(CMAKE_MODULE_PATH ${CALLERS_CMAKE_MODULE_PATH})\n\n# Build the detected Ceres version string to correctly capture whether it\n# was installed, or exported.\nceres_pretty_print_cmake_list(CERES_COMPILED_COMPONENTS_STRING\n  ${CERES_COMPILED_COMPONENTS})\nif (CERES_WAS_INSTALLED)\n  set(CERES_DETECTED_VERSION_STRING \"Ceres version: ${CERES_VERSION} \"\n    \"installed in: ${CURRENT_ROOT_INSTALL_DIR} with components: \"\n    \"${CERES_COMPILED_COMPONENTS_STRING}\")\nelse (CERES_WAS_INSTALLED)\n  set(CERES_DETECTED_VERSION_STRING \"Ceres version: ${CERES_VERSION} \"\n    \"exported from build directory: ${CERES_EXPORTED_BUILD_DIR} with \"\n    \"components: ${CERES_COMPILED_COMPONENTS_STRING}\")\nendif()\n\n# If the user called this script through find_package() whilst specifying\n# particular Ceres components that should be found via:\n# find_package(Ceres COMPONENTS XXX YYY), check the requested components against\n# those with which Ceres was compiled.  In this case, we should only report\n# Ceres as found if all the requested components have been found.\nif (Ceres_FIND_COMPONENTS)\n  foreach (REQUESTED_COMPONENT ${Ceres_FIND_COMPONENTS})\n    list(FIND CERES_COMPILED_COMPONENTS ${REQUESTED_COMPONENT} HAVE_REQUESTED_COMPONENT)\n    # list(FIND ..) returns -1 if the element was not in the list, but CMake\n    # interprets if (VAR) to be true if VAR is any non-zero number, even\n    # negative ones, hence we have to explicitly check for >= 0.\n    if (HAVE_REQUESTED_COMPONENT EQUAL -1)\n      # Check for the presence of all requested components before reporting\n      # not found, such that we report all of the missing components rather\n      # than just the first.\n      list(APPEND MISSING_CERES_COMPONENTS ${REQUESTED_COMPONENT})\n    endif()\n  endforeach()\n  if (MISSING_CERES_COMPONENTS)\n    ceres_pretty_print_cmake_list(REQUESTED_CERES_COMPONENTS_STRING\n      ${Ceres_FIND_COMPONENTS})\n    ceres_pretty_print_cmake_list(MISSING_CERES_COMPONENTS_STRING\n      ${MISSING_CERES_COMPONENTS})\n    ceres_report_not_found(\"Missing requested Ceres components: \"\n      \"${MISSING_CERES_COMPONENTS_STRING} (components requested: \"\n      \"${REQUESTED_CERES_COMPONENTS_STRING}). Detected \"\n      \"${CERES_DETECTED_VERSION_STRING}.\")\n  endif()\nendif()\n\n# As we use CERES_REPORT_NOT_FOUND() to abort, if we reach this point we have\n# found Ceres and all required dependencies.\nmessage(STATUS \"Found \" ${CERES_DETECTED_VERSION_STRING})\n\n# Set CERES_FOUND to be equivalent to Ceres_FOUND, which is set to\n# TRUE by FindPackage() if this file is found and run, and after which\n# Ceres_FOUND is not (explicitly, i.e. undefined does not count) set\n# to FALSE.\nset(CERES_FOUND TRUE)\n"
  },
  {
    "path": "3rdparty/ceres/cmake/CeresThreadingModels.cmake",
    "content": "# Ceres Solver - A fast non-linear least squares minimizer\n# Copyright 2018 Google Inc. All rights reserved.\n# http://ceres-solver.org/\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice,\n#   this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright notice,\n#   this list of conditions and the following disclaimer in the documentation\n#   and/or other materials provided with the distribution.\n# * Neither the name of Google Inc. nor the names of its contributors may be\n#   used to endorse or promote products derived from this software without\n#   specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n#\n# Author: alexs.mac@gmail.com (Alex Stewart)\n\n# Ordered by expected preference.\nset(CERES_THREADING_MODELS \"CXX11_THREADS;OPENMP;NO_THREADS\")\n\nfunction(find_available_ceres_threading_models CERES_THREADING_MODELS_AVAILABLE_VAR)\n  set(CERES_THREADING_MODELS_AVAILABLE ${CERES_THREADING_MODELS})\n  # Remove any threading models for which the dependencies are not available.\n  find_package(OpenMP QUIET)\n  if (NOT OPENMP_FOUND)\n    list(REMOVE_ITEM CERES_THREADING_MODELS_AVAILABLE \"OPENMP\")\n  endif()\n  if (NOT CERES_THREADING_MODELS_AVAILABLE)\n    # At least NO_THREADS should never be removed.  This check is purely\n    # protective against future threading model updates.\n    message(FATAL_ERROR \"Ceres bug: Removed all threading models.\")\n  endif()\n  set(${CERES_THREADING_MODELS_AVAILABLE_VAR}\n    ${CERES_THREADING_MODELS_AVAILABLE} PARENT_SCOPE)\nendfunction()\n\nmacro(set_ceres_threading_model_to_cxx11_threads)\n  list(APPEND CERES_COMPILE_OPTIONS CERES_USE_CXX11_THREADS)\nendmacro()\n\nmacro(set_ceres_threading_model_to_openmp)\n  find_package(OpenMP REQUIRED)\n  list(APPEND CERES_COMPILE_OPTIONS CERES_USE_OPENMP)\n  set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}\")\n  set(CMAKE_C_FLAGS \"${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}\")\nendmacro()\n\nmacro(set_ceres_threading_model_to_no_threads)\n  list(APPEND CERES_COMPILE_OPTIONS CERES_NO_THREADS)\nendmacro()\n\nmacro(set_ceres_threading_model CERES_THREADING_MODEL_TO_SET)\n  if (\"${CERES_THREADING_MODEL_TO_SET}\" STREQUAL \"CXX11_THREADS\")\n    set_ceres_threading_model_to_cxx11_threads()\n  elseif (\"${CERES_THREADING_MODEL_TO_SET}\" STREQUAL \"OPENMP\")\n    set_ceres_threading_model_to_openmp()\n  elseif (\"${CERES_THREADING_MODEL_TO_SET}\" STREQUAL \"NO_THREADS\")\n    set_ceres_threading_model_to_no_threads()\n  else()\n    include(PrettyPrintCMakeList)\n    find_available_ceres_threading_models(_AVAILABLE_THREADING_MODELS)\n    pretty_print_cmake_list(\n      _AVAILABLE_THREADING_MODELS ${_AVAILABLE_THREADING_MODELS})\n    message(FATAL_ERROR \"Unknown threading model specified: \"\n      \"'${CERES_THREADING_MODEL_TO_SET}'. Available threading models for \"\n      \"this platform are: ${_AVAILABLE_THREADING_MODELS}\")\n  endif()\n  message(\"-- Using Ceres threading model: ${CERES_THREADING_MODEL_TO_SET}\")\nendmacro()\n"
  },
  {
    "path": "3rdparty/ceres/cmake/CheckIfUnderscorePrefixedBesselFunctionsExist.cmake",
    "content": "# Ceres Solver - A fast non-linear least squares minimizer\n# Copyright 2017 Google Inc. All rights reserved.\n# http://ceres-solver.org/\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice,\n#   this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright notice,\n#   this list of conditions and the following disclaimer in the documentation\n#   and/or other materials provided with the distribution.\n# * Neither the name of Google Inc. nor the names of its contributors may be\n#   used to endorse or promote products derived from this software without\n#   specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n#\n# Author: alexs.mac@gmail.com (Alex Stewart)\n\n# Microsoft deprecated the POSIX Bessel functions: j[0,1,n]() in favour\n# of _j[0,1,n](), it appears since at least MSVC 2005 [1].  This function\n# checks if the underscore prefixed versions of the Bessel functions are\n# defined, and sets ${HAVE_UNDERSCORE_PREFIXED_BESSEL_FUNCTIONS_VAR} to\n# TRUE if they do.\n#\n# [1] https://msdn.microsoft.com/en-us/library/ms235384(v=vs.100).aspx\nfunction(check_if_underscore_prefixed_bessel_functions_exist\n    HAVE_UNDERSCORE_PREFIXED_BESSEL_FUNCTIONS_VAR)\n  include(CheckCXXSourceCompiles)\n  check_cxx_source_compiles(\n    \"#include <math.h>\n     int main(int argc, char * argv[]) {\n       double result;\n       result = _j0(1.2345);\n       result = _j1(1.2345);\n       result = _jn(2, 1.2345);\n       return 0;\n     }\"\n     HAVE_UNDERSCORE_PREFIXED_BESSEL_FUNCTIONS)\n   set(${HAVE_UNDERSCORE_PREFIXED_BESSEL_FUNCTIONS_VAR}\n     ${HAVE_UNDERSCORE_PREFIXED_BESSEL_FUNCTIONS}\n     PARENT_SCOPE)\nendfunction()\n"
  },
  {
    "path": "3rdparty/ceres/cmake/CreateCeresConfig.cmake",
    "content": "# Ceres Solver - A fast non-linear least squares minimizer\n# Copyright 2015 Google Inc. All rights reserved.\n# http://ceres-solver.org/\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice,\n#   this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright notice,\n#   this list of conditions and the following disclaimer in the documentation\n#   and/or other materials provided with the distribution.\n# * Neither the name of Google Inc. nor the names of its contributors may be\n#   used to endorse or promote products derived from this software without\n#   specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n#\n# Author: alexs.mac@gmail.com (Alex Stewart)\n\n# This must take place outside of CONFIGURE_CERES_CONFIG() in order that\n# we can determine where *this* file is, and thus the relative path to\n# config.h.in.  Inside of CONFIGURE_CERES_CONFIG(), CMAKE_CURRENT_LIST_DIR\n# refers to the caller of CONFIGURE_CERES_CONFIG(), not this file.\nset(CERES_CONFIG_IN_FILE \"${CMAKE_CURRENT_LIST_DIR}/config.h.in\")\n\n# CreateCeresConfig.cmake - Create the config.h for Ceres.\n#\n# This function configures the Ceres config.h file based on the current\n# compile options and copies it into the specified location.  It should be\n# called before Ceres is built so that the correct config.h is used when\n# Ceres is compiled.\n#\n# INPUTS:\n#   CURRENT_CERES_COMPILE_OPTIONS: List of currently enabled Ceres compile\n#                                  options. These are compared against the\n#                                  full list of valid options, which are read\n#                                  from config.h.in.  Any options present\n#                                  which are not part of the valid set will\n#                                  invoke an error.  Any valid option present\n#                                  will be enabled in the resulting config.h,\n#                                  all other options will be disabled.\n#\n#   CERES_CONFIG_OUTPUT_DIRECTORY: Path to output directory in which to save\n#                                  the configured config.h.  Typically this\n#                                  will be <src>/include/ceres/internal.\n\nfunction(CREATE_CERES_CONFIG CURRENT_CERES_COMPILE_OPTIONS CERES_CONFIG_OUTPUT_DIRECTORY)\n  # Create the specified output directory if it does not exist.\n  if (NOT EXISTS \"${CERES_CONFIG_OUTPUT_DIRECTORY}\")\n    message(STATUS \"Creating configured Ceres config.h output directory: \"\n      \"${CERES_CONFIG_OUTPUT_DIRECTORY}\")\n    file(MAKE_DIRECTORY \"${CERES_CONFIG_OUTPUT_DIRECTORY}\")\n  endif()\n  if (EXISTS \"${CERES_CONFIG_OUTPUT_DIRECTORY}\" AND\n      NOT IS_DIRECTORY \"${CERES_CONFIG_OUTPUT_DIRECTORY}\")\n    message(FATAL_ERROR \"Ceres Bug: Specified CERES_CONFIG_OUTPUT_DIRECTORY: \"\n      \"${CERES_CONFIG_OUTPUT_DIRECTORY} exists, but is not a directory.\")\n  endif()\n\n  # Read all possible configurable compile options from config.h.in, this avoids\n  # us having to hard-code in this file what the valid options are.\n  file(READ ${CERES_CONFIG_IN_FILE} CERES_CONFIG_IN_CONTENTS)\n  string(REGEX MATCHALL \"@[^@ $]+@\"\n    ALL_CONFIGURABLE_CERES_OPTIONS \"${CERES_CONFIG_IN_CONTENTS}\")\n  # Removing @ symbols at beginning and end of each option.\n  string(REPLACE \"@\" \"\"\n    ALL_CONFIGURABLE_CERES_OPTIONS \"${ALL_CONFIGURABLE_CERES_OPTIONS}\")\n\n  # Ensure that there are no repetitions in the current compile options.\n  list(REMOVE_DUPLICATES CURRENT_CERES_COMPILE_OPTIONS)\n\n  foreach (CERES_OPTION ${ALL_CONFIGURABLE_CERES_OPTIONS})\n    # Try and find the option in the list of current compile options, if it\n    # is present, then the option is enabled, otherwise it is disabled.\n    list(FIND CURRENT_CERES_COMPILE_OPTIONS ${CERES_OPTION} OPTION_ENABLED)\n\n    # list(FIND ..) returns -1 if the element was not in the list, but CMake\n    # interprets if (VAR) to be true if VAR is any non-zero number, even\n    # negative ones, hence we have to explicitly check for >= 0.\n    if (OPTION_ENABLED GREATER -1)\n      message(STATUS \"Enabling ${CERES_OPTION} in Ceres config.h\")\n      set(${CERES_OPTION} \"#define ${CERES_OPTION}\")\n\n      # Remove the item from the list of current options so that we can identify\n      # any options that were in CURRENT_CERES_COMPILE_OPTIONS, but not in\n      # ALL_CONFIGURABLE_CERES_OPTIONS (which is an error).\n      list(REMOVE_ITEM CURRENT_CERES_COMPILE_OPTIONS ${CERES_OPTION})\n    else()\n      set(${CERES_OPTION} \"// #define ${CERES_OPTION}\")\n    endif()\n  endforeach()\n\n  # CURRENT_CERES_COMPILE_OPTIONS should now be an empty list, any elements\n  # remaining were not present in ALL_CONFIGURABLE_CERES_OPTIONS read from\n  # config.h.in.\n  if (CURRENT_CERES_COMPILE_OPTIONS)\n    message(FATAL_ERROR \"Ceres Bug: CURRENT_CERES_COMPILE_OPTIONS contained \"\n      \"the following options which were not present in config.h.in: \"\n      \"${CURRENT_CERES_COMPILE_OPTIONS}\")\n  endif()\n\n  configure_file(${CERES_CONFIG_IN_FILE}\n    \"${CERES_CONFIG_OUTPUT_DIRECTORY}/config.h\" @ONLY)\nendfunction()\n"
  },
  {
    "path": "3rdparty/ceres/cmake/DetectBrokenStackCheckMacOSXcodePairing.cmake",
    "content": "# Ceres Solver - A fast non-linear least squares minimizer\n# Copyright 2019 Google Inc. All rights reserved.\n# http://ceres-solver.org/\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice,\n#   this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright notice,\n#   this list of conditions and the following disclaimer in the documentation\n#   and/or other materials provided with the distribution.\n# * Neither the name of Google Inc. nor the names of its contributors may be\n#   used to endorse or promote products derived from this software without\n#   specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n#\n# Author: alexs.mac@gmail.com (Alex Stewart)\n\n# As detailed in [1] the combination of macOS 10.15.x (Catalina) and\n# Xcode 11.0-1 enables by default a broken version of -fstack-check which\n# can break the alignment requirements for SIMD instructions resulting in\n# segfaults from within Eigen. This issue was apparently fixed in Xcode 11.2\n# despite not appearing in the official release notes.\n#\n# Although this can be worked around by compiling with -fno-stack-check, we\n# instead prevent generation as the update to Xcode 11.2 is free and failing\n# to include -fno-stack-check *everywhere* could still result in random\n# segfaults.\n#\n# [1]: https://forums.developer.apple.com/thread/121887\nfunction(detect_broken_stack_check_macos_xcode_pairing)\n  if (NOT APPLE)\n    return()\n  endif()\n\n  execute_process(COMMAND sw_vers -productVersion\n    OUTPUT_VARIABLE MACOS_VERSION\n    ERROR_QUIET\n    OUTPUT_STRIP_TRAILING_WHITESPACE)\n\n  if (MACOS_VERSION VERSION_LESS 10.15)\n    # Only 10.15 (Catalina) is likely to be affected, irrespective of the Xcode\n    # version. Although it is possible to recreate the issue on 10.14 (Mojave)\n    # and Xcode 11.0-1 if -fstack-check is forced on, this is not the default.\n    return()\n  endif()\n\n  execute_process(COMMAND xcodebuild -version\n    OUTPUT_VARIABLE XCODE_VERSION\n    ERROR_QUIET\n    OUTPUT_STRIP_TRAILING_WHITESPACE)\n  string(REGEX MATCH \"Xcode [0-9\\\\.]+\" XCODE_VERSION \"${XCODE_VERSION}\")\n  string(REGEX REPLACE \"Xcode ([0-9\\\\.]+)\" \"\\\\1\" XCODE_VERSION \"${XCODE_VERSION}\")\n\n  if ((XCODE_VERSION VERSION_EQUAL 11.0) OR\n      (XCODE_VERSION VERSION_EQUAL 11.1))\n    message(FATAL_ERROR \"Detected macOS version: ${MACOS_VERSION} and \"\n      \"Xcode version: ${XCODE_VERSION} which combined exhibit an \"\n      \"-fstack-check bug which can break alignment requirements for at least \"\n      \"AVX instructions as detailed here [1].\"\n      \"\\n\"\n      \"This bug affected Xcode 11.0 and 11.1 but only when used with 10.15 \"\n      \"(Catalina), and was fixed in Xcode 11.2. Without the fix in place, \"\n      \"random segfaults will occur in Eigen operations used by Ceres that use \"\n      \"AVX instructions.\"\n      \"\\n\"\n      \"Please update to at least Xcode 11.2.\"\n      \"\\n\"\n      \"[1]: https://forums.developer.apple.com/thread/121887\")\n  endif()\nendfunction()\n"
  },
  {
    "path": "3rdparty/ceres/cmake/EnableSanitizer.cmake",
    "content": "# Ceres Solver - A fast non-linear least squares minimizer\n# Copyright 2019 Google Inc. All rights reserved.\n# http://ceres-solver.org/\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice,\n#   this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright notice,\n#   this list of conditions and the following disclaimer in the documentation\n#   and/or other materials provided with the distribution.\n# * Neither the name of Google Inc. nor the names of its contributors may be\n#   used to endorse or promote products derived from this software without\n#   specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n#\n# Author: alexs.mac@gmail.com (Alex Stewart)\n\n# Usage: enable_sanitizer(REQUIRED_SANITIZERS) where REQUIRED_SANITIZERS should\n# contain the list of sanitizers to enable by updating CMAKE_CXX_FLAGS and\n# CMAKE_EXE_LINKER_FLAGS.\n#\n# The specified sanitizers will be checked both for compatibility with the\n# current compiler and with each other as some sanitizers are mutually\n# exclusive.\nmacro(enable_sanitizer)\n  # According to the Clang documentation [1] the following sanitizers are\n  # mututally exclusive.\n  # [1]: https://clang.llvm.org/docs/UsersManual.html#controlling-code-generation\n  set(INCOMPATIBLE_SANITIZERS address thread memory)\n  # Set the recommended additional common compile flags for any sanitizer to\n  # get the best possible output, e.g [2] but make them visible in the cache\n  # so that the user can edit them if required.\n  # [2]: https://clang.llvm.org/docs/AddressSanitizer.html#usage\n  set(COMMON_SANITIZER_COMPILE_OPTIONS\n    \"-g -fno-omit-frame-pointer -fno-optimize-sibling-calls\"\n    CACHE STRING \"Common compile flags enabled for any sanitizer\")\n\n  # Check that the specified list of sanitizers to enable does not include\n  # multiple entries from the incompatible list.\n  set(MERGED_SANITIZERS ${ARGN} ${INCOMPATIBLE_SANITIZERS})\n  list(LENGTH MERGED_SANITIZERS COMBINED_LENGTH)\n  list(REMOVE_DUPLICATES MERGED_SANITIZERS)\n  list(LENGTH MERGED_SANITIZERS COMBINED_LENGTH_NO_DUPLICATES)\n  math(EXPR VALID_LENGTH \"${COMBINED_LENGTH} - 1\")\n  if (COMBINED_LENGTH_NO_DUPLICATES LESS VALID_LENGTH)\n    include(PrettyPrintCMakeList)\n    pretty_print_cmake_list(REQUESTED_SANITIZERS ${ARGN})\n    pretty_print_cmake_list(\n      PRETTY_INCOMPATIBLE_SANITIZERS ${INCOMPATIBLE_SANITIZERS})\n    message(FATAL_ERROR \"Found incompatible sanitizers in requested set: \"\n      \"${REQUESTED_SANITIZERS}. The following sanitizers are mutually \"\n      \"exclusive: ${PRETTY_INCOMPATIBLE_SANITIZERS}\")\n  endif()\n\n  # Until CMake 3.14 and CMAKE_REQUIRED_LINK_OPTIONS there was no equivalent to\n  # CMAKE_REQUIRED_FLAGS for try_compile() for linker flags. However, in CMake\n  # 3.2 CMP0056 was introduced that when enabled passes CMAKE_EXE_LINKER_FLAGS\n  # to try_compile() which allows us to achieve the same effect.\n  cmake_policy(SET CMP0056 NEW)\n  include(CheckCXXCompilerFlag)\n\n  unset(ADDED_SANITIZER)\n  foreach(REQUESTED_SANITIZER ${ARGN})\n    set(SANITIZER_FLAG -fsanitize=${REQUESTED_SANITIZER})\n    # Save the current CMAKE_EXE_LINKER_FLAGS before modifying it to test for\n    # the existence of the sanitizer flag so that we can revert after the test.\n    set(INITIAL_CMAKE_EXE_LINKER_FLAGS \"${CMAKE_EXE_LINKER_FLAGS}\")\n    set(CMAKE_EXE_LINKER_FLAGS \"${CMAKE_EXE_LINKER_FLAGS} ${SANITIZER_FLAG}\")\n    check_cxx_compiler_flag(${SANITIZER_FLAG} HAVE_SANITIZER)\n    set(CMAKE_EXE_LINKER_FLAGS \"${INITIAL_CMAKE_EXE_LINKER_FLAGS}\")\n    if (NOT HAVE_SANITIZER)\n      message(FATAL_ERROR \"Specified sanitizer: ${REQUESTED_SANITIZER} is not \"\n        \"supported by the compiler.\")\n    endif()\n    message(STATUS \"Enabling sanitizer: ${REQUESTED_SANITIZER}\")\n    set(ADDED_SANITIZER TRUE)\n    # As per the Clang documentation, the sanitizer flags must be added to both\n    # the compiler and linker flags.\n    set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} ${SANITIZER_FLAG}\")\n    set(CMAKE_EXE_LINKER_FLAGS \"${CMAKE_EXE_LINKER_FLAGS} ${SANITIZER_FLAG}\")\n  endforeach()\n  if (ADDED_SANITIZER)\n    set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} ${COMMON_SANITIZER_COMPILE_OPTIONS}\")\n  endif()\nendmacro()\n"
  },
  {
    "path": "3rdparty/ceres/cmake/FindAccelerateSparse.cmake",
    "content": "# Ceres Solver - A fast non-linear least squares minimizer\n# Copyright 2018 Google Inc. All rights reserved.\n# http://ceres-solver.org/\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice,\n#   this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright notice,\n#   this list of conditions and the following disclaimer in the documentation\n#   and/or other materials provided with the distribution.\n# * Neither the name of Google Inc. nor the names of its contributors may be\n#   used to endorse or promote products derived from this software without\n#   specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n#\n# Author: alexs.mac@gmail.com (Alex Stewart)\n#\n\n# FindAccelerateSparse.cmake - Find the sparse solvers in Apple's Accelerate\n#                              framework, introduced in Xcode 9.0 (2017).\n#                              Note that this is distinct from the Accelerate\n#                              framework on its own, which existed in previous\n#                              versions but without the sparse solvers.\n#\n# This module defines the following variables which should be referenced\n# by the caller to use the library.\n#\n# AccelerateSparse_FOUND: TRUE iff an Accelerate framework including the sparse\n#                         solvers, and all dependencies, has been found.\n# AccelerateSparse_INCLUDE_DIRS: Include directories for Accelerate framework.\n# AccelerateSparse_LIBRARIES: Libraries for Accelerate framework and all\n#                             dependencies.\n#\n# The following variables are also defined by this module, but in line with\n# CMake recommended FindPackage() module style should NOT be referenced directly\n# by callers (use the plural variables detailed above instead).  These variables\n# do however affect the behaviour of the module via FIND_[PATH/LIBRARY]() which\n# are NOT re-called (i.e. search for library is not repeated) if these variables\n# are set with valid values _in the CMake cache_. This means that if these\n# variables are set directly in the cache, either by the user in the CMake GUI,\n# or by the user passing -DVAR=VALUE directives to CMake when called (which\n# explicitly defines a cache variable), then they will be used verbatim,\n# bypassing the HINTS variables and other hard-coded search locations.\n#\n# AccelerateSparse_INCLUDE_DIR: Include directory for Accelerate framework, not\n#                               including the include directory of any\n#                               dependencies.\n# AccelerateSparse_LIBRARY: Accelerate framework, not including the libraries of\n#                           any dependencies.\n\n# Called if we failed to find the Accelerate framework with the sparse solvers.\n# Unsets all public (designed to be used externally) variables and reports\n# error message at priority depending upon [REQUIRED/QUIET/<NONE>] argument.\nmacro(accelerate_sparse_report_not_found REASON_MSG)\n  unset(AccelerateSparse_FOUND)\n  unset(AccelerateSparse_INCLUDE_DIRS)\n  unset(AccelerateSparse_LIBRARIES)\n  # Make results of search visible in the CMake GUI if Accelerate has not\n  # been found so that user does not have to toggle to advanced view.\n  mark_as_advanced(CLEAR AccelerateSparse_INCLUDE_DIR\n                         AccelerateSparse_LIBRARY)\n\n  # Note <package>_FIND_[REQUIRED/QUIETLY] variables defined by FindPackage()\n  # use the camelcase library name, not uppercase.\n  if (AccelerateSparse_FIND_QUIETLY)\n    message(STATUS \"Failed to find Accelerate framework with sparse solvers - \"\n      ${REASON_MSG} ${ARGN})\n  elseif (AccelerateSparse_FIND_REQUIRED)\n    message(FATAL_ERROR \"Failed to find Accelerate framework with sparse solvers - \"\n      ${REASON_MSG} ${ARGN})\n  else()\n    # Neither QUIETLY nor REQUIRED, use no priority which emits a message\n    # but continues configuration and allows generation.\n    message(\"-- Failed to find Accelerate framework with sparse solvers - \"\n      ${REASON_MSG} ${ARGN})\n  endif()\n  return()\nendmacro()\n\nunset(AccelerateSparse_FOUND)\n\nfind_path(AccelerateSparse_INCLUDE_DIR NAMES Accelerate.h)\nif (NOT AccelerateSparse_INCLUDE_DIR OR\n    NOT EXISTS ${AccelerateSparse_INCLUDE_DIR})\n  accelerate_sparse_report_not_found(\n    \"Could not find Accelerate framework headers. Set \"\n    \"AccelerateSparse_INCLUDE_DIR to the directory containing Accelerate.h\")\nendif()\n\nfind_library(AccelerateSparse_LIBRARY NAMES Accelerate)\nif (NOT AccelerateSparse_LIBRARY OR\n    NOT EXISTS ${AccelerateSparse_LIBRARY})\n  accelerate_sparse_report_not_found(\n    \"Could not find Accelerate framework. Set AccelerateSparse_LIBRARY \"\n    \"to the Accelerate.framework directory\")\nendif()\n\nset(AccelerateSparse_FOUND TRUE)\n\n# Determine if the Accelerate framework detected includes the sparse solvers.\ninclude(CheckCXXSourceCompiles)\nset(CMAKE_REQUIRED_INCLUDES ${AccelerateSparse_INCLUDE_DIR})\nset(CMAKE_REQUIRED_LIBRARIES ${AccelerateSparse_LIBRARY})\ncheck_cxx_source_compiles(\n  \"#include <Accelerate.h>\n   int main() {\n     SparseMatrix_Double A;\n     SparseFactor(SparseFactorizationCholesky, A);\n     return 0;\n   }\"\n   ACCELERATE_FRAMEWORK_HAS_SPARSE_SOLVER)\nunset(CMAKE_REQUIRED_INCLUDES)\nunset(CMAKE_REQUIRED_LIBRARIES)\nif (NOT ACCELERATE_FRAMEWORK_HAS_SPARSE_SOLVER)\n  accelerate_sparse_report_not_found(\n    \"Detected Accelerate framework: ${AccelerateSparse_LIBRARY} does not \"\n    \"include the sparse solvers.\")\nendif()\n\nif (AccelerateSparse_FOUND)\n  set(AccelerateSparse_INCLUDE_DIRS ${AccelerateSparse_INCLUDE_DIR})\n  set(AccelerateSparse_LIBRARIES ${AccelerateSparse_LIBRARY})\nendif()\n\n# Handle REQUIRED / QUIET optional arguments and version.\ninclude(FindPackageHandleStandardArgs)\nfind_package_handle_standard_args(AccelerateSparse\n  REQUIRED_VARS AccelerateSparse_INCLUDE_DIRS AccelerateSparse_LIBRARIES)\nif (AccelerateSparse_FOUND)\n  mark_as_advanced(FORCE AccelerateSparse_INCLUDE_DIR\n                         AccelerateSparse_LIBRARY)\nendif()\n"
  },
  {
    "path": "3rdparty/ceres/cmake/FindCXSparse.cmake",
    "content": "# Ceres Solver - A fast non-linear least squares minimizer\n# Copyright 2015 Google Inc. All rights reserved.\n# http://ceres-solver.org/\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice,\n#   this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright notice,\n#   this list of conditions and the following disclaimer in the documentation\n#   and/or other materials provided with the distribution.\n# * Neither the name of Google Inc. nor the names of its contributors may be\n#   used to endorse or promote products derived from this software without\n#   specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n#\n# Author: alexs.mac@gmail.com (Alex Stewart)\n#\n\n# FindCXSparse.cmake - Find CXSparse libraries & dependencies.\n#\n# This module defines the following variables which should be referenced\n# by the caller to use the library.\n#\n# CXSPARSE_FOUND: TRUE iff CXSparse and all dependencies have been found.\n# CXSPARSE_INCLUDE_DIRS: Include directories for CXSparse.\n# CXSPARSE_LIBRARIES: Libraries for CXSparse and all dependencies.\n#\n# CXSPARSE_VERSION: Extracted from cs.h.\n# CXSPARSE_MAIN_VERSION: Equal to 3 if CXSPARSE_VERSION = 3.1.2\n# CXSPARSE_SUB_VERSION: Equal to 1 if CXSPARSE_VERSION = 3.1.2\n# CXSPARSE_SUBSUB_VERSION: Equal to 2 if CXSPARSE_VERSION = 3.1.2\n#\n# The following variables control the behaviour of this module:\n#\n# CXSPARSE_INCLUDE_DIR_HINTS: List of additional directories in which to\n#                             search for CXSparse includes,\n#                             e.g: /timbuktu/include.\n# CXSPARSE_LIBRARY_DIR_HINTS: List of additional directories in which to\n#                             search for CXSparse libraries, e.g: /timbuktu/lib.\n#\n# The following variables are also defined by this module, but in line with\n# CMake recommended FindPackage() module style should NOT be referenced directly\n# by callers (use the plural variables detailed above instead).  These variables\n# do however affect the behaviour of the module via FIND_[PATH/LIBRARY]() which\n# are NOT re-called (i.e. search for library is not repeated) if these variables\n# are set with valid values _in the CMake cache_. This means that if these\n# variables are set directly in the cache, either by the user in the CMake GUI,\n# or by the user passing -DVAR=VALUE directives to CMake when called (which\n# explicitly defines a cache variable), then they will be used verbatim,\n# bypassing the HINTS variables and other hard-coded search locations.\n#\n# CXSPARSE_INCLUDE_DIR: Include directory for CXSparse, not including the\n#                       include directory of any dependencies.\n# CXSPARSE_LIBRARY: CXSparse library, not including the libraries of any\n#                   dependencies.\n\n# Reset CALLERS_CMAKE_FIND_LIBRARY_PREFIXES to its value when\n# FindCXSparse was invoked.\nmacro(CXSPARSE_RESET_FIND_LIBRARY_PREFIX)\n  if (MSVC)\n    set(CMAKE_FIND_LIBRARY_PREFIXES \"${CALLERS_CMAKE_FIND_LIBRARY_PREFIXES}\")\n  endif (MSVC)\nendmacro(CXSPARSE_RESET_FIND_LIBRARY_PREFIX)\n\n# Called if we failed to find CXSparse or any of it's required dependencies,\n# unsets all public (designed to be used externally) variables and reports\n# error message at priority depending upon [REQUIRED/QUIET/<NONE>] argument.\nmacro(CXSPARSE_REPORT_NOT_FOUND REASON_MSG)\n  unset(CXSPARSE_FOUND)\n  unset(CXSPARSE_INCLUDE_DIRS)\n  unset(CXSPARSE_LIBRARIES)\n  # Make results of search visible in the CMake GUI if CXSparse has not\n  # been found so that user does not have to toggle to advanced view.\n  mark_as_advanced(CLEAR CXSPARSE_INCLUDE_DIR\n                         CXSPARSE_LIBRARY)\n\n  cxsparse_reset_find_library_prefix()\n\n  # Note <package>_FIND_[REQUIRED/QUIETLY] variables defined by FindPackage()\n  # use the camelcase library name, not uppercase.\n  if (CXSparse_FIND_QUIETLY)\n    message(STATUS \"Failed to find CXSparse - \" ${REASON_MSG} ${ARGN})\n  elseif (CXSparse_FIND_REQUIRED)\n    message(FATAL_ERROR \"Failed to find CXSparse - \" ${REASON_MSG} ${ARGN})\n  else()\n    # Neither QUIETLY nor REQUIRED, use no priority which emits a message\n    # but continues configuration and allows generation.\n    message(\"-- Failed to find CXSparse - \" ${REASON_MSG} ${ARGN})\n  endif ()\n  return()\nendmacro(CXSPARSE_REPORT_NOT_FOUND)\n\n# Protect against any alternative find_package scripts for this library having\n# been called previously (in a client project) which set CXSPARSE_FOUND, but not\n# the other variables we require / set here which could cause the search logic\n# here to fail.\nunset(CXSPARSE_FOUND)\n\n# Handle possible presence of lib prefix for libraries on MSVC, see\n# also CXSPARSE_RESET_FIND_LIBRARY_PREFIX().\nif (MSVC)\n  # Preserve the caller's original values for CMAKE_FIND_LIBRARY_PREFIXES\n  # s/t we can set it back before returning.\n  set(CALLERS_CMAKE_FIND_LIBRARY_PREFIXES \"${CMAKE_FIND_LIBRARY_PREFIXES}\")\n  # The empty string in this list is important, it represents the case when\n  # the libraries have no prefix (shared libraries / DLLs).\n  set(CMAKE_FIND_LIBRARY_PREFIXES \"lib\" \"\" \"${CMAKE_FIND_LIBRARY_PREFIXES}\")\nendif (MSVC)\n\n# On macOS, add the Homebrew prefix (with appropriate suffixes) to the\n# respective HINTS directories (after any user-specified locations).  This\n# handles Homebrew installations into non-standard locations (not /usr/local).\n# We do not use CMAKE_PREFIX_PATH for this as given the search ordering of\n# find_xxx(), doing so would override any user-specified HINTS locations with\n# the Homebrew version if it exists.\nif (CMAKE_SYSTEM_NAME MATCHES \"Darwin\")\n  find_program(HOMEBREW_EXECUTABLE brew)\n  mark_as_advanced(FORCE HOMEBREW_EXECUTABLE)\n  if (HOMEBREW_EXECUTABLE)\n    # Detected a Homebrew install, query for its install prefix.\n    execute_process(COMMAND ${HOMEBREW_EXECUTABLE} --prefix\n      OUTPUT_VARIABLE HOMEBREW_INSTALL_PREFIX\n      OUTPUT_STRIP_TRAILING_WHITESPACE)\n    message(STATUS \"Detected Homebrew with install prefix: \"\n      \"${HOMEBREW_INSTALL_PREFIX}, adding to CMake search paths.\")\n    list(APPEND CXSPARSE_INCLUDE_DIR_HINTS \"${HOMEBREW_INSTALL_PREFIX}/include\")\n    list(APPEND CXSPARSE_LIBRARY_DIR_HINTS \"${HOMEBREW_INSTALL_PREFIX}/lib\")\n  endif()\nendif()\n\n# Search user-installed locations first, so that we prefer user installs\n# to system installs where both exist.\n#\n# TODO: Add standard Windows search locations for CXSparse.\nlist(APPEND CXSPARSE_CHECK_INCLUDE_DIRS\n  /usr/local/include\n  /usr/local/homebrew/include # Mac OS X\n  /opt/local/var/macports/software # Mac OS X.\n  /opt/local/include\n  /usr/include)\nlist(APPEND CXSPARSE_CHECK_LIBRARY_DIRS\n  /usr/local/lib\n  /usr/local/homebrew/lib # Mac OS X.\n  /opt/local/lib\n  /usr/lib)\n# Additional suffixes to try appending to each search path.\nlist(APPEND CXSPARSE_CHECK_PATH_SUFFIXES\n  suitesparse) # Linux/Windows\n\n# Search supplied hint directories first if supplied.\nfind_path(CXSPARSE_INCLUDE_DIR\n  NAMES cs.h\n  HINTS ${CXSPARSE_INCLUDE_DIR_HINTS}\n  PATHS ${CXSPARSE_CHECK_INCLUDE_DIRS}\n  PATH_SUFFIXES ${CXSPARSE_CHECK_PATH_SUFFIXES})\nif (NOT CXSPARSE_INCLUDE_DIR OR\n    NOT EXISTS ${CXSPARSE_INCLUDE_DIR})\n  cxsparse_report_not_found(\n    \"Could not find CXSparse include directory, set CXSPARSE_INCLUDE_DIR \"\n    \"to directory containing cs.h\")\nendif (NOT CXSPARSE_INCLUDE_DIR OR\n       NOT EXISTS ${CXSPARSE_INCLUDE_DIR})\n\nfind_library(CXSPARSE_LIBRARY NAMES cxsparse\n  HINTS ${CXSPARSE_LIBRARY_DIR_HINTS}\n  PATHS ${CXSPARSE_CHECK_LIBRARY_DIRS}\n  PATH_SUFFIXES ${CXSPARSE_CHECK_PATH_SUFFIXES})\nif (NOT CXSPARSE_LIBRARY OR\n    NOT EXISTS ${CXSPARSE_LIBRARY})\n  cxsparse_report_not_found(\n    \"Could not find CXSparse library, set CXSPARSE_LIBRARY \"\n    \"to full path to libcxsparse.\")\nendif (NOT CXSPARSE_LIBRARY OR\n       NOT EXISTS ${CXSPARSE_LIBRARY})\n\n# Mark internally as found, then verify. CXSPARSE_REPORT_NOT_FOUND() unsets\n# if called.\nset(CXSPARSE_FOUND TRUE)\n\n# Extract CXSparse version from cs.h\nif (CXSPARSE_INCLUDE_DIR)\n  set(CXSPARSE_VERSION_FILE ${CXSPARSE_INCLUDE_DIR}/cs.h)\n  if (NOT EXISTS ${CXSPARSE_VERSION_FILE})\n    cxsparse_report_not_found(\n      \"Could not find file: ${CXSPARSE_VERSION_FILE} \"\n      \"containing version information in CXSparse install located at: \"\n      \"${CXSPARSE_INCLUDE_DIR}.\")\n  else (NOT EXISTS ${CXSPARSE_VERSION_FILE})\n    file(READ ${CXSPARSE_INCLUDE_DIR}/cs.h CXSPARSE_VERSION_FILE_CONTENTS)\n\n    string(REGEX MATCH \"#define CS_VER [0-9]+\"\n      CXSPARSE_MAIN_VERSION \"${CXSPARSE_VERSION_FILE_CONTENTS}\")\n    string(REGEX REPLACE \"#define CS_VER ([0-9]+)\" \"\\\\1\"\n      CXSPARSE_MAIN_VERSION \"${CXSPARSE_MAIN_VERSION}\")\n\n    string(REGEX MATCH \"#define CS_SUBVER [0-9]+\"\n      CXSPARSE_SUB_VERSION \"${CXSPARSE_VERSION_FILE_CONTENTS}\")\n    string(REGEX REPLACE \"#define CS_SUBVER ([0-9]+)\" \"\\\\1\"\n      CXSPARSE_SUB_VERSION \"${CXSPARSE_SUB_VERSION}\")\n\n    string(REGEX MATCH \"#define CS_SUBSUB [0-9]+\"\n      CXSPARSE_SUBSUB_VERSION \"${CXSPARSE_VERSION_FILE_CONTENTS}\")\n    string(REGEX REPLACE \"#define CS_SUBSUB ([0-9]+)\" \"\\\\1\"\n      CXSPARSE_SUBSUB_VERSION \"${CXSPARSE_SUBSUB_VERSION}\")\n\n    # This is on a single line s/t CMake does not interpret it as a list of\n    # elements and insert ';' separators which would result in 3.;1.;2 nonsense.\n    set(CXSPARSE_VERSION \"${CXSPARSE_MAIN_VERSION}.${CXSPARSE_SUB_VERSION}.${CXSPARSE_SUBSUB_VERSION}\")\n  endif (NOT EXISTS ${CXSPARSE_VERSION_FILE})\nendif (CXSPARSE_INCLUDE_DIR)\n\n# Catch the case when the caller has set CXSPARSE_LIBRARY in the cache / GUI and\n# thus FIND_LIBRARY was not called, but specified library is invalid, otherwise\n# we would report CXSparse as found.\n# TODO: This regex for CXSparse library is pretty primitive, we use lowercase\n#       for comparison to handle Windows using CamelCase library names, could\n#       this check be better?\nstring(TOLOWER \"${CXSPARSE_LIBRARY}\" LOWERCASE_CXSPARSE_LIBRARY)\nif (CXSPARSE_LIBRARY AND\n    EXISTS ${CXSPARSE_LIBRARY} AND\n    NOT \"${LOWERCASE_CXSPARSE_LIBRARY}\" MATCHES \".*cxsparse[^/]*\")\n  cxsparse_report_not_found(\n    \"Caller defined CXSPARSE_LIBRARY: \"\n    \"${CXSPARSE_LIBRARY} does not match CXSparse.\")\nendif (CXSPARSE_LIBRARY AND\n       EXISTS ${CXSPARSE_LIBRARY} AND\n       NOT \"${LOWERCASE_CXSPARSE_LIBRARY}\" MATCHES \".*cxsparse[^/]*\")\n\n# Set standard CMake FindPackage variables if found.\nif (CXSPARSE_FOUND)\n  set(CXSPARSE_INCLUDE_DIRS ${CXSPARSE_INCLUDE_DIR})\n  set(CXSPARSE_LIBRARIES ${CXSPARSE_LIBRARY})\nendif (CXSPARSE_FOUND)\n\ncxsparse_reset_find_library_prefix()\n\n# Handle REQUIRED / QUIET optional arguments and version.\ninclude(FindPackageHandleStandardArgs)\nfind_package_handle_standard_args(CXSparse\n  REQUIRED_VARS CXSPARSE_INCLUDE_DIRS CXSPARSE_LIBRARIES\n  VERSION_VAR CXSPARSE_VERSION)\n\n# Only mark internal variables as advanced if we found CXSparse, otherwise\n# leave them visible in the standard GUI for the user to set manually.\nif (CXSPARSE_FOUND)\n  mark_as_advanced(FORCE CXSPARSE_INCLUDE_DIR\n                         CXSPARSE_LIBRARY)\nendif (CXSPARSE_FOUND)\n"
  },
  {
    "path": "3rdparty/ceres/cmake/FindGlog.cmake",
    "content": "# Ceres Solver - A fast non-linear least squares minimizer\n# Copyright 2015 Google Inc. All rights reserved.\n# http://ceres-solver.org/\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice,\n#   this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright notice,\n#   this list of conditions and the following disclaimer in the documentation\n#   and/or other materials provided with the distribution.\n# * Neither the name of Google Inc. nor the names of its contributors may be\n#   used to endorse or promote products derived from this software without\n#   specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n#\n# Author: alexs.mac@gmail.com (Alex Stewart)\n#\n\n# FindGlog.cmake - Find Google glog logging library.\n#\n# This module defines the following variables:\n#\n# GLOG_FOUND: TRUE iff glog is found.\n# GLOG_INCLUDE_DIRS: Include directories for glog.\n# GLOG_LIBRARIES: Libraries required to link glog.\n# FOUND_INSTALLED_GLOG_CMAKE_CONFIGURATION: True iff the version of glog found\n#                                           was built & installed / exported\n#                                           as a CMake package.\n#\n# The following variables control the behaviour of this module:\n#\n# GLOG_PREFER_EXPORTED_GLOG_CMAKE_CONFIGURATION: TRUE/FALSE, iff TRUE then\n#                           then prefer using an exported CMake configuration\n#                           generated by glog > 0.3.4 over searching for the\n#                           glog components manually.  Otherwise (FALSE)\n#                           ignore any exported glog CMake configurations and\n#                           always perform a manual search for the components.\n#                           Default: TRUE iff user does not define this variable\n#                           before we are called, and does NOT specify either\n#                           GLOG_INCLUDE_DIR_HINTS or GLOG_LIBRARY_DIR_HINTS\n#                           otherwise FALSE.\n# GLOG_INCLUDE_DIR_HINTS: List of additional directories in which to\n#                         search for glog includes, e.g: /timbuktu/include.\n# GLOG_LIBRARY_DIR_HINTS: List of additional directories in which to\n#                         search for glog libraries, e.g: /timbuktu/lib.\n#\n# The following variables are also defined by this module, but in line with\n# CMake recommended FindPackage() module style should NOT be referenced directly\n# by callers (use the plural variables detailed above instead).  These variables\n# do however affect the behaviour of the module via FIND_[PATH/LIBRARY]() which\n# are NOT re-called (i.e. search for library is not repeated) if these variables\n# are set with valid values _in the CMake cache_. This means that if these\n# variables are set directly in the cache, either by the user in the CMake GUI,\n# or by the user passing -DVAR=VALUE directives to CMake when called (which\n# explicitly defines a cache variable), then they will be used verbatim,\n# bypassing the HINTS variables and other hard-coded search locations.\n#\n# GLOG_INCLUDE_DIR: Include directory for glog, not including the\n#                   include directory of any dependencies.\n# GLOG_LIBRARY: glog library, not including the libraries of any\n#               dependencies.\n\n# Reset CALLERS_CMAKE_FIND_LIBRARY_PREFIXES to its value when\n# FindGlog was invoked.\nmacro(GLOG_RESET_FIND_LIBRARY_PREFIX)\n  if (MSVC AND CALLERS_CMAKE_FIND_LIBRARY_PREFIXES)\n    set(CMAKE_FIND_LIBRARY_PREFIXES \"${CALLERS_CMAKE_FIND_LIBRARY_PREFIXES}\")\n  endif()\nendmacro(GLOG_RESET_FIND_LIBRARY_PREFIX)\n\n# Called if we failed to find glog or any of it's required dependencies,\n# unsets all public (designed to be used externally) variables and reports\n# error message at priority depending upon [REQUIRED/QUIET/<NONE>] argument.\nmacro(GLOG_REPORT_NOT_FOUND REASON_MSG)\n  unset(GLOG_FOUND)\n  unset(GLOG_INCLUDE_DIRS)\n  unset(GLOG_LIBRARIES)\n  # Make results of search visible in the CMake GUI if glog has not\n  # been found so that user does not have to toggle to advanced view.\n  mark_as_advanced(CLEAR GLOG_INCLUDE_DIR\n                         GLOG_LIBRARY)\n\n  glog_reset_find_library_prefix()\n\n  # Note <package>_FIND_[REQUIRED/QUIETLY] variables defined by FindPackage()\n  # use the camelcase library name, not uppercase.\n  if (Glog_FIND_QUIETLY)\n    message(STATUS \"Failed to find glog - \" ${REASON_MSG} ${ARGN})\n  elseif (Glog_FIND_REQUIRED)\n    message(FATAL_ERROR \"Failed to find glog - \" ${REASON_MSG} ${ARGN})\n  else()\n    # Neither QUIETLY nor REQUIRED, use no priority which emits a message\n    # but continues configuration and allows generation.\n    message(\"-- Failed to find glog - \" ${REASON_MSG} ${ARGN})\n  endif ()\n  return()\nendmacro(GLOG_REPORT_NOT_FOUND)\n\n# Protect against any alternative find_package scripts for this library having\n# been called previously (in a client project) which set GLOG_FOUND, but not\n# the other variables we require / set here which could cause the search logic\n# here to fail.\nunset(GLOG_FOUND)\n\n# -----------------------------------------------------------------\n# By default, if the user has expressed no preference for using an exported\n# glog CMake configuration over performing a search for the installed\n# components, and has not specified any hints for the search locations, then\n# prefer a glog exported configuration if available.\nif (NOT DEFINED GLOG_PREFER_EXPORTED_GLOG_CMAKE_CONFIGURATION\n    AND NOT GLOG_INCLUDE_DIR_HINTS\n    AND NOT GLOG_LIBRARY_DIR_HINTS)\n  message(STATUS \"No preference for use of exported glog CMake configuration \"\n    \"set, and no hints for include/library directories provided. \"\n    \"Defaulting to preferring an installed/exported glog CMake configuration \"\n    \"if available.\")\n  set(GLOG_PREFER_EXPORTED_GLOG_CMAKE_CONFIGURATION TRUE)\nendif()\n\n# On macOS, add the Homebrew prefix (with appropriate suffixes) to the\n# respective HINTS directories (after any user-specified locations).  This\n# handles Homebrew installations into non-standard locations (not /usr/local).\n# We do not use CMAKE_PREFIX_PATH for this as given the search ordering of\n# find_xxx(), doing so would override any user-specified HINTS locations with\n# the Homebrew version if it exists.\nif (CMAKE_SYSTEM_NAME MATCHES \"Darwin\")\n  find_program(HOMEBREW_EXECUTABLE brew)\n  mark_as_advanced(FORCE HOMEBREW_EXECUTABLE)\n  if (HOMEBREW_EXECUTABLE)\n    # Detected a Homebrew install, query for its install prefix.\n    execute_process(COMMAND ${HOMEBREW_EXECUTABLE} --prefix\n      OUTPUT_VARIABLE HOMEBREW_INSTALL_PREFIX\n      OUTPUT_STRIP_TRAILING_WHITESPACE)\n    message(STATUS \"Detected Homebrew with install prefix: \"\n      \"${HOMEBREW_INSTALL_PREFIX}, adding to CMake search paths.\")\n    list(APPEND GLOG_INCLUDE_DIR_HINTS \"${HOMEBREW_INSTALL_PREFIX}/include\")\n    list(APPEND GLOG_LIBRARY_DIR_HINTS \"${HOMEBREW_INSTALL_PREFIX}/lib\")\n  endif()\nendif()\n\nif (GLOG_PREFER_EXPORTED_GLOG_CMAKE_CONFIGURATION)\n  # Try to find an exported CMake configuration for glog, as generated by\n  # glog versions > 0.3.4\n  #\n  # We search twice, s/t we can invert the ordering of precedence used by\n  # find_package() for exported package build directories, and installed\n  # packages (found via CMAKE_SYSTEM_PREFIX_PATH), listed as items 6) and 7)\n  # respectively in [1].\n  #\n  # By default, exported build directories are (in theory) detected first, and\n  # this is usually the case on Windows.  However, on OS X & Linux, the install\n  # path (/usr/local) is typically present in the PATH environment variable\n  # which is checked in item 4) in [1] (i.e. before both of the above, unless\n  # NO_SYSTEM_ENVIRONMENT_PATH is passed).  As such on those OSs installed\n  # packages are usually detected in preference to exported package build\n  # directories.\n  #\n  # To ensure a more consistent response across all OSs, and as users usually\n  # want to prefer an installed version of a package over a locally built one\n  # where both exist (esp. as the exported build directory might be removed\n  # after installation), we first search with NO_CMAKE_PACKAGE_REGISTRY which\n  # means any build directories exported by the user are ignored, and thus\n  # installed directories are preferred.  If this fails to find the package\n  # we then research again, but without NO_CMAKE_PACKAGE_REGISTRY, so any\n  # exported build directories will now be detected.\n  #\n  # To prevent confusion on Windows, we also pass NO_CMAKE_BUILDS_PATH (which\n  # is item 5) in [1]), to not preferentially use projects that were built\n  # recently with the CMake GUI to ensure that we always prefer an installed\n  # version if available.\n  #\n  # NOTE: We use the NAMES option as glog erroneously uses 'google-glog' as its\n  #       project name when built with CMake, but exports itself as just 'glog'.\n  #       On Linux/OS X this does not break detection as the project name is\n  #       not used as part of the install path for the CMake package files,\n  #       e.g. /usr/local/lib/cmake/glog, where the <glog> suffix is hardcoded\n  #       in glog's CMakeLists.  However, on Windows the project name *is*\n  #       part of the install prefix: C:/Program Files/google-glog/[include,lib].\n  #       However, by default CMake checks:\n  #       C:/Program Files/<FIND_PACKAGE_ARGUMENT_NAME='glog'> which does not\n  #       exist and thus detection fails.  Thus we use the NAMES to force the\n  #       search to use both google-glog & glog.\n  #\n  # [1] http://www.cmake.org/cmake/help/v2.8.11/cmake.html#command:find_package\n  find_package(glog QUIET\n                    NAMES google-glog glog\n                    HINTS ${glog_DIR} ${HOMEBREW_INSTALL_PREFIX}\n                    NO_MODULE\n                    NO_CMAKE_PACKAGE_REGISTRY\n                    NO_CMAKE_BUILDS_PATH)\n  if (glog_FOUND)\n    message(STATUS \"Found installed version of glog: ${glog_DIR}\")\n  else()\n    # Failed to find an installed version of glog, repeat search allowing\n    # exported build directories.\n    message(STATUS \"Failed to find installed glog CMake configuration, \"\n      \"searching for glog build directories exported with CMake.\")\n    # Again pass NO_CMAKE_BUILDS_PATH, as we know that glog is exported and\n    # do not want to treat projects built with the CMake GUI preferentially.\n    find_package(glog QUIET\n                      NAMES google-glog glog\n                      NO_MODULE\n                      NO_CMAKE_BUILDS_PATH)\n    if (glog_FOUND)\n      message(STATUS \"Found exported glog build directory: ${glog_DIR}\")\n    endif(glog_FOUND)\n  endif(glog_FOUND)\n\n  set(FOUND_INSTALLED_GLOG_CMAKE_CONFIGURATION ${glog_FOUND})\n\n  if (FOUND_INSTALLED_GLOG_CMAKE_CONFIGURATION)\n    message(STATUS \"Detected glog version: ${glog_VERSION}\")\n    set(GLOG_FOUND ${glog_FOUND})\n    # glog wraps the include directories into the exported glog::glog target.\n    set(GLOG_INCLUDE_DIR \"\")\n    set(GLOG_LIBRARY glog::glog)\n  else (FOUND_INSTALLED_GLOG_CMAKE_CONFIGURATION)\n    message(STATUS \"Failed to find an installed/exported CMake configuration \"\n      \"for glog, will perform search for installed glog components.\")\n  endif (FOUND_INSTALLED_GLOG_CMAKE_CONFIGURATION)\nendif(GLOG_PREFER_EXPORTED_GLOG_CMAKE_CONFIGURATION)\n\nif (NOT GLOG_FOUND)\n  # Either failed to find an exported glog CMake configuration, or user\n  # told us not to use one.  Perform a manual search for all glog components.\n\n  # Handle possible presence of lib prefix for libraries on MSVC, see\n  # also GLOG_RESET_FIND_LIBRARY_PREFIX().\n  if (MSVC)\n    # Preserve the caller's original values for CMAKE_FIND_LIBRARY_PREFIXES\n    # s/t we can set it back before returning.\n    set(CALLERS_CMAKE_FIND_LIBRARY_PREFIXES \"${CMAKE_FIND_LIBRARY_PREFIXES}\")\n    # The empty string in this list is important, it represents the case when\n    # the libraries have no prefix (shared libraries / DLLs).\n    set(CMAKE_FIND_LIBRARY_PREFIXES \"lib\" \"\" \"${CMAKE_FIND_LIBRARY_PREFIXES}\")\n  endif (MSVC)\n\n  # Search user-installed locations first, so that we prefer user installs\n  # to system installs where both exist.\n  list(APPEND GLOG_CHECK_INCLUDE_DIRS\n    /usr/local/include\n    /usr/local/homebrew/include # Mac OS X\n    /opt/local/var/macports/software # Mac OS X.\n    /opt/local/include\n    /usr/include)\n  # Windows (for C:/Program Files prefix).\n  list(APPEND GLOG_CHECK_PATH_SUFFIXES\n    glog/include\n    glog/Include\n    Glog/include\n    Glog/Include\n    google-glog/include # CMake installs with project name prefix.\n    google-glog/Include)\n\n  list(APPEND GLOG_CHECK_LIBRARY_DIRS\n    /usr/local/lib\n    /usr/local/homebrew/lib # Mac OS X.\n    /opt/local/lib\n    /usr/lib)\n  # Windows (for C:/Program Files prefix).\n  list(APPEND GLOG_CHECK_LIBRARY_SUFFIXES\n    glog/lib\n    glog/Lib\n    Glog/lib\n    Glog/Lib\n    google-glog/lib # CMake installs with project name prefix.\n    google-glog/Lib)\n\n  # Search supplied hint directories first if supplied.\n  find_path(GLOG_INCLUDE_DIR\n    NAMES glog/logging.h\n    HINTS ${GLOG_INCLUDE_DIR_HINTS}\n    PATHS ${GLOG_CHECK_INCLUDE_DIRS}\n    PATH_SUFFIXES ${GLOG_CHECK_PATH_SUFFIXES})\n  if (NOT GLOG_INCLUDE_DIR OR\n      NOT EXISTS ${GLOG_INCLUDE_DIR})\n    glog_report_not_found(\n      \"Could not find glog include directory, set GLOG_INCLUDE_DIR \"\n      \"to directory containing glog/logging.h\")\n  endif (NOT GLOG_INCLUDE_DIR OR\n    NOT EXISTS ${GLOG_INCLUDE_DIR})\n\n  find_library(GLOG_LIBRARY NAMES glog\n    HINTS ${GLOG_LIBRARY_DIR_HINTS}\n    PATHS ${GLOG_CHECK_LIBRARY_DIRS}\n    PATH_SUFFIXES ${GLOG_CHECK_LIBRARY_SUFFIXES})\n  if (NOT GLOG_LIBRARY OR\n      NOT EXISTS ${GLOG_LIBRARY})\n    glog_report_not_found(\n      \"Could not find glog library, set GLOG_LIBRARY \"\n      \"to full path to libglog.\")\n  endif (NOT GLOG_LIBRARY OR\n    NOT EXISTS ${GLOG_LIBRARY})\n\n  # Mark internally as found, then verify. GLOG_REPORT_NOT_FOUND() unsets\n  # if called.\n  set(GLOG_FOUND TRUE)\n\n  # Glog does not seem to provide any record of the version in its\n  # source tree, thus cannot extract version.\n\n  # Catch case when caller has set GLOG_INCLUDE_DIR in the cache / GUI and\n  # thus FIND_[PATH/LIBRARY] are not called, but specified locations are\n  # invalid, otherwise we would report the library as found.\n  if (GLOG_INCLUDE_DIR AND\n      NOT EXISTS ${GLOG_INCLUDE_DIR}/glog/logging.h)\n    glog_report_not_found(\n      \"Caller defined GLOG_INCLUDE_DIR:\"\n      \" ${GLOG_INCLUDE_DIR} does not contain glog/logging.h header.\")\n  endif (GLOG_INCLUDE_DIR AND\n    NOT EXISTS ${GLOG_INCLUDE_DIR}/glog/logging.h)\n  # TODO: This regex for glog library is pretty primitive, we use lowercase\n  #       for comparison to handle Windows using CamelCase library names, could\n  #       this check be better?\n  string(TOLOWER \"${GLOG_LIBRARY}\" LOWERCASE_GLOG_LIBRARY)\n  if (GLOG_LIBRARY AND\n      NOT \"${LOWERCASE_GLOG_LIBRARY}\" MATCHES \".*glog[^/]*\")\n    glog_report_not_found(\n      \"Caller defined GLOG_LIBRARY: \"\n      \"${GLOG_LIBRARY} does not match glog.\")\n  endif (GLOG_LIBRARY AND\n    NOT \"${LOWERCASE_GLOG_LIBRARY}\" MATCHES \".*glog[^/]*\")\n\n  glog_reset_find_library_prefix()\n\nendif(NOT GLOG_FOUND)\n\n# Set standard CMake FindPackage variables if found.\nif (GLOG_FOUND)\n  set(GLOG_INCLUDE_DIRS ${GLOG_INCLUDE_DIR})\n  set(GLOG_LIBRARIES ${GLOG_LIBRARY})\nendif (GLOG_FOUND)\n\n# If we are using an exported CMake glog target, the include directories are\n# wrapped into the target itself, and do not have to be (and are not)\n# separately specified.  In which case, we should not add GLOG_INCLUDE_DIRS\n# to the list of required variables in order that glog be reported as found.\nif (FOUND_INSTALLED_GLOG_CMAKE_CONFIGURATION)\n  set(GLOG_REQUIRED_VARIABLES GLOG_LIBRARIES)\nelse()\n  set(GLOG_REQUIRED_VARIABLES GLOG_INCLUDE_DIRS GLOG_LIBRARIES)\nendif()\n\n# Handle REQUIRED / QUIET optional arguments.\ninclude(FindPackageHandleStandardArgs)\nfind_package_handle_standard_args(Glog DEFAULT_MSG\n  ${GLOG_REQUIRED_VARIABLES})\n\n# Only mark internal variables as advanced if we found glog, otherwise\n# leave them visible in the standard GUI for the user to set manually.\nif (GLOG_FOUND)\n  mark_as_advanced(FORCE GLOG_INCLUDE_DIR\n                         GLOG_LIBRARY\n                         glog_DIR) # Autogenerated by find_package(glog)\nendif (GLOG_FOUND)\n"
  },
  {
    "path": "3rdparty/ceres/cmake/FindSphinx.cmake",
    "content": "# Ceres Solver - A fast non-linear least squares minimizer\n# Copyright 2015 Google Inc. All rights reserved.\n# http://ceres-solver.org/\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice,\n#   this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright notice,\n#   this list of conditions and the following disclaimer in the documentation\n#   and/or other materials provided with the distribution.\n# * Neither the name of Google Inc. nor the names of its contributors may be\n#   used to endorse or promote products derived from this software without\n#   specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n#\n# Author: pablo.speciale@gmail.com (Pablo Speciale)\n#\n\n# Find the Sphinx documentation generator\n#\n# This modules defines\n#  SPHINX_EXECUTABLE\n#  SPHINX_FOUND\n\nfind_program(SPHINX_EXECUTABLE\n             NAMES sphinx-build\n             PATHS\n               /usr/bin\n               /usr/local/bin\n               /opt/local/bin\n             DOC \"Sphinx documentation generator\")\n\nif (NOT SPHINX_EXECUTABLE)\n  set(_Python_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)\n\n  foreach (_version ${_Python_VERSIONS})\n    set(_sphinx_NAMES sphinx-build-${_version})\n\n    find_program(SPHINX_EXECUTABLE\n                 NAMES ${_sphinx_NAMES}\n                 PATHS\n                   /usr/bin\n                   /usr/local/bin\n                   /opt/local/bin\n                 DOC \"Sphinx documentation generator\")\n  endforeach ()\nendif ()\n\ninclude(FindPackageHandleStandardArgs)\n\nfind_package_handle_standard_args(Sphinx DEFAULT_MSG SPHINX_EXECUTABLE)\n\nmark_as_advanced(SPHINX_EXECUTABLE)\n"
  },
  {
    "path": "3rdparty/ceres/cmake/FindSuiteSparse.cmake",
    "content": "# Ceres Solver - A fast non-linear least squares minimizer\n# Copyright 2015 Google Inc. All rights reserved.\n# http://ceres-solver.org/\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice,\n#   this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright notice,\n#   this list of conditions and the following disclaimer in the documentation\n#   and/or other materials provided with the distribution.\n# * Neither the name of Google Inc. nor the names of its contributors may be\n#   used to endorse or promote products derived from this software without\n#   specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n#\n# Author: alexs.mac@gmail.com (Alex Stewart)\n#\n\n# FindSuiteSparse.cmake - Find SuiteSparse libraries & dependencies.\n#\n# This module defines the following variables:\n#\n# SUITESPARSE_FOUND: TRUE iff SuiteSparse and all dependencies have been found.\n# SUITESPARSE_INCLUDE_DIRS: Include directories for all SuiteSparse components.\n# SUITESPARSE_LIBRARIES: Libraries for all SuiteSparse component libraries and\n#                        dependencies.\n# SUITESPARSE_VERSION: Extracted from UFconfig.h (<= v3) or\n#                      SuiteSparse_config.h (>= v4).\n# SUITESPARSE_MAIN_VERSION: Equal to 4 if SUITESPARSE_VERSION = 4.2.1\n# SUITESPARSE_SUB_VERSION: Equal to 2 if SUITESPARSE_VERSION = 4.2.1\n# SUITESPARSE_SUBSUB_VERSION: Equal to 1 if SUITESPARSE_VERSION = 4.2.1\n#\n# SUITESPARSE_IS_BROKEN_SHARED_LINKING_UBUNTU_SYSTEM_VERSION: TRUE iff running\n#     on Ubuntu, SUITESPARSE_VERSION is 3.4.0 and found SuiteSparse is a system\n#     install, in which case found version of SuiteSparse cannot be used to link\n#     a shared library due to a bug (static linking is unaffected).\n#\n# The following variables control the behaviour of this module:\n#\n# SUITESPARSE_INCLUDE_DIR_HINTS: List of additional directories in which to\n#                                search for SuiteSparse includes,\n#                                e.g: /timbuktu/include.\n# SUITESPARSE_LIBRARY_DIR_HINTS: List of additional directories in which to\n#                                search for SuiteSparse libraries,\n#                                e.g: /timbuktu/lib.\n#\n# The following variables define the presence / includes & libraries for the\n# SuiteSparse components searched for, the SUITESPARSE_XX variables are the\n# union of the variables for all components.\n#\n# == Symmetric Approximate Minimum Degree (AMD)\n# AMD_FOUND\n# AMD_INCLUDE_DIR\n# AMD_LIBRARY\n#\n# == Constrained Approximate Minimum Degree (CAMD)\n# CAMD_FOUND\n# CAMD_INCLUDE_DIR\n# CAMD_LIBRARY\n#\n# == Column Approximate Minimum Degree (COLAMD)\n# COLAMD_FOUND\n# COLAMD_INCLUDE_DIR\n# COLAMD_LIBRARY\n#\n# Constrained Column Approximate Minimum Degree (CCOLAMD)\n# CCOLAMD_FOUND\n# CCOLAMD_INCLUDE_DIR\n# CCOLAMD_LIBRARY\n#\n# == Sparse Supernodal Cholesky Factorization and Update/Downdate (CHOLMOD)\n# CHOLMOD_FOUND\n# CHOLMOD_INCLUDE_DIR\n# CHOLMOD_LIBRARY\n#\n# == Multifrontal Sparse QR (SuiteSparseQR)\n# SUITESPARSEQR_FOUND\n# SUITESPARSEQR_INCLUDE_DIR\n# SUITESPARSEQR_LIBRARY\n#\n# == Common configuration for all but CSparse (SuiteSparse version >= 4).\n# SUITESPARSE_CONFIG_FOUND\n# SUITESPARSE_CONFIG_INCLUDE_DIR\n# SUITESPARSE_CONFIG_LIBRARY\n#\n# == Common configuration for all but CSparse (SuiteSparse version < 4).\n# UFCONFIG_FOUND\n# UFCONFIG_INCLUDE_DIR\n#\n# Optional SuiteSparse Dependencies:\n#\n# == Serial Graph Partitioning and Fill-reducing Matrix Ordering (METIS)\n# METIS_FOUND\n# METIS_LIBRARY\n\n# Reset CALLERS_CMAKE_FIND_LIBRARY_PREFIXES to its value when\n# FindSuiteSparse was invoked.\nmacro(SUITESPARSE_RESET_FIND_LIBRARY_PREFIX)\n  if (MSVC)\n    set(CMAKE_FIND_LIBRARY_PREFIXES \"${CALLERS_CMAKE_FIND_LIBRARY_PREFIXES}\")\n  endif (MSVC)\nendmacro(SUITESPARSE_RESET_FIND_LIBRARY_PREFIX)\n\n# Called if we failed to find SuiteSparse or any of it's required dependencies,\n# unsets all public (designed to be used externally) variables and reports\n# error message at priority depending upon [REQUIRED/QUIET/<NONE>] argument.\nmacro(SUITESPARSE_REPORT_NOT_FOUND REASON_MSG)\n  unset(SUITESPARSE_FOUND)\n  unset(SUITESPARSE_INCLUDE_DIRS)\n  unset(SUITESPARSE_LIBRARIES)\n  unset(SUITESPARSE_VERSION)\n  unset(SUITESPARSE_MAIN_VERSION)\n  unset(SUITESPARSE_SUB_VERSION)\n  unset(SUITESPARSE_SUBSUB_VERSION)\n  # Do NOT unset SUITESPARSE_FOUND_REQUIRED_VARS here, as it is used by\n  # FindPackageHandleStandardArgs() to generate the automatic error message on\n  # failure which highlights which components are missing.\n\n  suitesparse_reset_find_library_prefix()\n\n  # Note <package>_FIND_[REQUIRED/QUIETLY] variables defined by FindPackage()\n  # use the camelcase library name, not uppercase.\n  if (SuiteSparse_FIND_QUIETLY)\n    message(STATUS \"Failed to find SuiteSparse - \" ${REASON_MSG} ${ARGN})\n  elseif (SuiteSparse_FIND_REQUIRED)\n    message(FATAL_ERROR \"Failed to find SuiteSparse - \" ${REASON_MSG} ${ARGN})\n  else()\n    # Neither QUIETLY nor REQUIRED, use no priority which emits a message\n    # but continues configuration and allows generation.\n    message(\"-- Failed to find SuiteSparse - \" ${REASON_MSG} ${ARGN})\n  endif (SuiteSparse_FIND_QUIETLY)\n\n  # Do not call return(), s/t we keep processing if not called with REQUIRED\n  # and report all missing components, rather than bailing after failing to find\n  # the first.\nendmacro(SUITESPARSE_REPORT_NOT_FOUND)\n\n# Protect against any alternative find_package scripts for this library having\n# been called previously (in a client project) which set SUITESPARSE_FOUND, but\n# not the other variables we require / set here which could cause the search\n# logic here to fail.\nunset(SUITESPARSE_FOUND)\n\n# Handle possible presence of lib prefix for libraries on MSVC, see\n# also SUITESPARSE_RESET_FIND_LIBRARY_PREFIX().\nif (MSVC)\n  # Preserve the caller's original values for CMAKE_FIND_LIBRARY_PREFIXES\n  # s/t we can set it back before returning.\n  set(CALLERS_CMAKE_FIND_LIBRARY_PREFIXES \"${CMAKE_FIND_LIBRARY_PREFIXES}\")\n  # The empty string in this list is important, it represents the case when\n  # the libraries have no prefix (shared libraries / DLLs).\n  set(CMAKE_FIND_LIBRARY_PREFIXES \"lib\" \"\" \"${CMAKE_FIND_LIBRARY_PREFIXES}\")\nendif (MSVC)\n\n# On macOS, add the Homebrew prefix (with appropriate suffixes) to the\n# respective HINTS directories (after any user-specified locations).  This\n# handles Homebrew installations into non-standard locations (not /usr/local).\n# We do not use CMAKE_PREFIX_PATH for this as given the search ordering of\n# find_xxx(), doing so would override any user-specified HINTS locations with\n# the Homebrew version if it exists.\nif (CMAKE_SYSTEM_NAME MATCHES \"Darwin\")\n  find_program(HOMEBREW_EXECUTABLE brew)\n  mark_as_advanced(FORCE HOMEBREW_EXECUTABLE)\n  if (HOMEBREW_EXECUTABLE)\n    # Detected a Homebrew install, query for its install prefix.\n    execute_process(COMMAND ${HOMEBREW_EXECUTABLE} --prefix\n      OUTPUT_VARIABLE HOMEBREW_INSTALL_PREFIX\n      OUTPUT_STRIP_TRAILING_WHITESPACE)\n    message(STATUS \"Detected Homebrew with install prefix: \"\n      \"${HOMEBREW_INSTALL_PREFIX}, adding to CMake search paths.\")\n    list(APPEND SUITESPARSE_INCLUDE_DIR_HINTS \"${HOMEBREW_INSTALL_PREFIX}/include\")\n    list(APPEND SUITESPARSE_LIBRARY_DIR_HINTS \"${HOMEBREW_INSTALL_PREFIX}/lib\")\n  endif()\nendif()\n\n# Specify search directories for include files and libraries (this is the union\n# of the search directories for all OSs).  Search user-specified hint\n# directories first if supplied, and search user-installed locations first\n# so that we prefer user installs to system installs where both exist.\nlist(APPEND SUITESPARSE_CHECK_INCLUDE_DIRS\n  /opt/local/include\n  /opt/local/include/ufsparse # Mac OS X\n  /usr/local/homebrew/include # Mac OS X\n  /usr/local/include\n  /usr/include)\nlist(APPEND SUITESPARSE_CHECK_LIBRARY_DIRS\n  /opt/local/lib\n  /opt/local/lib/ufsparse # Mac OS X\n  /usr/local/homebrew/lib # Mac OS X\n  /usr/local/lib\n  /usr/lib)\n# Additional suffixes to try appending to each search path.\nlist(APPEND SUITESPARSE_CHECK_PATH_SUFFIXES\n  suitesparse) # Windows/Ubuntu\n\n# Wrappers to find_path/library that pass the SuiteSparse search hints/paths.\n#\n# suitesparse_find_component(<component> [FILES name1 [name2 ...]]\n#                                        [LIBRARIES name1 [name2 ...]]\n#                                        [REQUIRED])\nmacro(suitesparse_find_component COMPONENT)\n  include(CMakeParseArguments)\n  set(OPTIONS REQUIRED)\n  set(MULTI_VALUE_ARGS FILES LIBRARIES)\n  cmake_parse_arguments(SUITESPARSE_FIND_${COMPONENT}\n    \"${OPTIONS}\" \"\" \"${MULTI_VALUE_ARGS}\" ${ARGN})\n\n  if (SUITESPARSE_FIND_${COMPONENT}_REQUIRED)\n    list(APPEND SUITESPARSE_FOUND_REQUIRED_VARS ${COMPONENT}_FOUND)\n  endif()\n\n  set(${COMPONENT}_FOUND TRUE)\n  if (SUITESPARSE_FIND_${COMPONENT}_FILES)\n    find_path(${COMPONENT}_INCLUDE_DIR\n      NAMES ${SUITESPARSE_FIND_${COMPONENT}_FILES}\n      HINTS ${SUITESPARSE_INCLUDE_DIR_HINTS}\n      PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS}\n      PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES})\n    if (${COMPONENT}_INCLUDE_DIR)\n      message(STATUS \"Found ${COMPONENT} headers in: \"\n        \"${${COMPONENT}_INCLUDE_DIR}\")\n      mark_as_advanced(${COMPONENT}_INCLUDE_DIR)\n    else()\n      # Specified headers not found.\n      set(${COMPONENT}_FOUND FALSE)\n      if (SUITESPARSE_FIND_${COMPONENT}_REQUIRED)\n        suitesparse_report_not_found(\n          \"Did not find ${COMPONENT} header (required SuiteSparse component).\")\n      else()\n        message(STATUS \"Did not find ${COMPONENT} header (optional \"\n          \"SuiteSparse component).\")\n        # Hide optional vars from CMake GUI even if not found.\n        mark_as_advanced(${COMPONENT}_INCLUDE_DIR)\n      endif()\n    endif()\n  endif()\n\n  if (SUITESPARSE_FIND_${COMPONENT}_LIBRARIES)\n    find_library(${COMPONENT}_LIBRARY\n      NAMES ${SUITESPARSE_FIND_${COMPONENT}_LIBRARIES}\n      HINTS ${SUITESPARSE_LIBRARY_DIR_HINTS}\n      PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}\n      PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES})\n    if (${COMPONENT}_LIBRARY)\n      message(STATUS \"Found ${COMPONENT} library: ${${COMPONENT}_LIBRARY}\")\n      mark_as_advanced(${COMPONENT}_LIBRARY)\n    else ()\n      # Specified libraries not found.\n      set(${COMPONENT}_FOUND FALSE)\n      if (SUITESPARSE_FIND_${COMPONENT}_REQUIRED)\n        suitesparse_report_not_found(\n          \"Did not find ${COMPONENT} library (required SuiteSparse component).\")\n      else()\n        message(STATUS \"Did not find ${COMPONENT} library (optional SuiteSparse \"\n          \"dependency)\")\n        # Hide optional vars from CMake GUI even if not found.\n        mark_as_advanced(${COMPONENT}_LIBRARY)\n      endif()\n    endif()\n  endif()\nendmacro()\n\n# Given the number of components of SuiteSparse, and to ensure that the\n# automatic failure message generated by FindPackageHandleStandardArgs()\n# when not all required components are found is helpful, we maintain a list\n# of all variables that must be defined for SuiteSparse to be considered found.\nunset(SUITESPARSE_FOUND_REQUIRED_VARS)\n\n# BLAS.\nfind_package(BLAS QUIET)\nif (NOT BLAS_FOUND)\n  suitesparse_report_not_found(\n    \"Did not find BLAS library (required for SuiteSparse).\")\nendif (NOT BLAS_FOUND)\nlist(APPEND SUITESPARSE_FOUND_REQUIRED_VARS BLAS_FOUND)\n\n# LAPACK.\nfind_package(LAPACK QUIET)\nif (NOT LAPACK_FOUND)\n  suitesparse_report_not_found(\n    \"Did not find LAPACK library (required for SuiteSparse).\")\nendif (NOT LAPACK_FOUND)\nlist(APPEND SUITESPARSE_FOUND_REQUIRED_VARS LAPACK_FOUND)\n\nsuitesparse_find_component(AMD REQUIRED FILES amd.h LIBRARIES amd)\nsuitesparse_find_component(CAMD REQUIRED FILES camd.h LIBRARIES camd)\nsuitesparse_find_component(COLAMD REQUIRED FILES colamd.h LIBRARIES colamd)\nsuitesparse_find_component(CCOLAMD REQUIRED FILES ccolamd.h LIBRARIES ccolamd)\nsuitesparse_find_component(CHOLMOD REQUIRED FILES cholmod.h LIBRARIES cholmod)\nsuitesparse_find_component(\n  SUITESPARSEQR REQUIRED FILES SuiteSparseQR.hpp LIBRARIES spqr)\nif (SUITESPARSEQR_FOUND)\n  # SuiteSparseQR may be compiled with Intel Threading Building Blocks,\n  # we assume that if TBB is installed, SuiteSparseQR was compiled with\n  # support for it, this will do no harm if it wasn't.\n  find_package(TBB QUIET)\n  if (TBB_FOUND)\n    message(STATUS \"Found Intel Thread Building Blocks (TBB) library \"\n      \"(${TBB_VERSION}) assuming SuiteSparseQR was compiled \"\n      \"with TBB.\")\n    # Add the TBB libraries to the SuiteSparseQR libraries (the only\n    # libraries to optionally depend on TBB).\n    list(APPEND SUITESPARSEQR_LIBRARY ${TBB_LIBRARIES})\n  else()\n    message(STATUS \"Did not find Intel TBB library, assuming SuiteSparseQR was \"\n      \"not compiled with TBB.\")\n  endif()\nendif(SUITESPARSEQR_FOUND)\n\n# UFconfig / SuiteSparse_config.\n#\n# If SuiteSparse version is >= 4 then SuiteSparse_config is required.\n# For SuiteSparse 3, UFconfig.h is required.\nsuitesparse_find_component(\n  SUITESPARSE_CONFIG FILES SuiteSparse_config.h LIBRARIES suitesparseconfig)\n\nif (SUITESPARSE_CONFIG_FOUND)\n  # SuiteSparse_config (SuiteSparse version >= 4) requires librt library for\n  # timing by default when compiled on Linux or Unix, but not on OSX (which\n  # does not have librt).\n  if (CMAKE_SYSTEM_NAME MATCHES \"Linux\" OR UNIX AND NOT APPLE)\n    suitesparse_find_component(LIBRT LIBRARIES rt)\n    if (LIBRT_FOUND)\n      message(STATUS \"Adding librt: ${LIBRT_LIBRARY} to \"\n        \"SuiteSparse_config libraries (required on Linux & Unix [not OSX] if \"\n        \"SuiteSparse is compiled with timing).\")\n      list(APPEND SUITESPARSE_CONFIG_LIBRARY ${LIBRT_LIBRARY})\n    else()\n      message(STATUS \"Could not find librt, but found SuiteSparse_config, \"\n        \"assuming that SuiteSparse was compiled without timing.\")\n    endif ()\n  endif (CMAKE_SYSTEM_NAME MATCHES \"Linux\" OR UNIX AND NOT APPLE)\nelse()\n  # Failed to find SuiteSparse_config (>= v4 installs), instead look for\n  # UFconfig header which should be present in < v4 installs.\n  suitesparse_find_component(UFCONFIG FILES UFconfig.h)\nendif ()\n\nif (NOT SUITESPARSE_CONFIG_FOUND AND\n    NOT UFCONFIG_FOUND)\n  suitesparse_report_not_found(\n    \"Failed to find either: SuiteSparse_config header & library (should be \"\n    \"present in all SuiteSparse >= v4 installs), or UFconfig header (should \"\n    \"be present in all SuiteSparse < v4 installs).\")\nendif()\n\n# Extract the SuiteSparse version from the appropriate header (UFconfig.h for\n# <= v3, SuiteSparse_config.h for >= v4).\nlist(APPEND SUITESPARSE_FOUND_REQUIRED_VARS SUITESPARSE_VERSION)\n\nif (UFCONFIG_FOUND)\n  # SuiteSparse version <= 3.\n  set(SUITESPARSE_VERSION_FILE ${UFCONFIG_INCLUDE_DIR}/UFconfig.h)\n  if (NOT EXISTS ${SUITESPARSE_VERSION_FILE})\n    suitesparse_report_not_found(\n      \"Could not find file: ${SUITESPARSE_VERSION_FILE} containing version \"\n      \"information for <= v3 SuiteSparse installs, but UFconfig was found \"\n      \"(only present in <= v3 installs).\")\n  else (NOT EXISTS ${SUITESPARSE_VERSION_FILE})\n    file(READ ${SUITESPARSE_VERSION_FILE} UFCONFIG_CONTENTS)\n\n    string(REGEX MATCH \"#define SUITESPARSE_MAIN_VERSION [0-9]+\"\n      SUITESPARSE_MAIN_VERSION \"${UFCONFIG_CONTENTS}\")\n    string(REGEX REPLACE \"#define SUITESPARSE_MAIN_VERSION ([0-9]+)\" \"\\\\1\"\n      SUITESPARSE_MAIN_VERSION \"${SUITESPARSE_MAIN_VERSION}\")\n\n    string(REGEX MATCH \"#define SUITESPARSE_SUB_VERSION [0-9]+\"\n      SUITESPARSE_SUB_VERSION \"${UFCONFIG_CONTENTS}\")\n    string(REGEX REPLACE \"#define SUITESPARSE_SUB_VERSION ([0-9]+)\" \"\\\\1\"\n      SUITESPARSE_SUB_VERSION \"${SUITESPARSE_SUB_VERSION}\")\n\n    string(REGEX MATCH \"#define SUITESPARSE_SUBSUB_VERSION [0-9]+\"\n      SUITESPARSE_SUBSUB_VERSION \"${UFCONFIG_CONTENTS}\")\n    string(REGEX REPLACE \"#define SUITESPARSE_SUBSUB_VERSION ([0-9]+)\" \"\\\\1\"\n      SUITESPARSE_SUBSUB_VERSION \"${SUITESPARSE_SUBSUB_VERSION}\")\n\n    # This is on a single line s/t CMake does not interpret it as a list of\n    # elements and insert ';' separators which would result in 4.;2.;1 nonsense.\n    set(SUITESPARSE_VERSION\n      \"${SUITESPARSE_MAIN_VERSION}.${SUITESPARSE_SUB_VERSION}.${SUITESPARSE_SUBSUB_VERSION}\")\n  endif (NOT EXISTS ${SUITESPARSE_VERSION_FILE})\nendif (UFCONFIG_FOUND)\n\nif (SUITESPARSE_CONFIG_FOUND)\n  # SuiteSparse version >= 4.\n  set(SUITESPARSE_VERSION_FILE\n    ${SUITESPARSE_CONFIG_INCLUDE_DIR}/SuiteSparse_config.h)\n  if (NOT EXISTS ${SUITESPARSE_VERSION_FILE})\n    suitesparse_report_not_found(\n      \"Could not find file: ${SUITESPARSE_VERSION_FILE} containing version \"\n      \"information for >= v4 SuiteSparse installs, but SuiteSparse_config was \"\n      \"found (only present in >= v4 installs).\")\n  else (NOT EXISTS ${SUITESPARSE_VERSION_FILE})\n    file(READ ${SUITESPARSE_VERSION_FILE} SUITESPARSE_CONFIG_CONTENTS)\n\n    string(REGEX MATCH \"#define SUITESPARSE_MAIN_VERSION [0-9]+\"\n      SUITESPARSE_MAIN_VERSION \"${SUITESPARSE_CONFIG_CONTENTS}\")\n    string(REGEX REPLACE \"#define SUITESPARSE_MAIN_VERSION ([0-9]+)\" \"\\\\1\"\n      SUITESPARSE_MAIN_VERSION \"${SUITESPARSE_MAIN_VERSION}\")\n\n    string(REGEX MATCH \"#define SUITESPARSE_SUB_VERSION [0-9]+\"\n      SUITESPARSE_SUB_VERSION \"${SUITESPARSE_CONFIG_CONTENTS}\")\n    string(REGEX REPLACE \"#define SUITESPARSE_SUB_VERSION ([0-9]+)\" \"\\\\1\"\n      SUITESPARSE_SUB_VERSION \"${SUITESPARSE_SUB_VERSION}\")\n\n    string(REGEX MATCH \"#define SUITESPARSE_SUBSUB_VERSION [0-9]+\"\n      SUITESPARSE_SUBSUB_VERSION \"${SUITESPARSE_CONFIG_CONTENTS}\")\n    string(REGEX REPLACE \"#define SUITESPARSE_SUBSUB_VERSION ([0-9]+)\" \"\\\\1\"\n      SUITESPARSE_SUBSUB_VERSION \"${SUITESPARSE_SUBSUB_VERSION}\")\n\n    # This is on a single line s/t CMake does not interpret it as a list of\n    # elements and insert ';' separators which would result in 4.;2.;1 nonsense.\n    set(SUITESPARSE_VERSION\n      \"${SUITESPARSE_MAIN_VERSION}.${SUITESPARSE_SUB_VERSION}.${SUITESPARSE_SUBSUB_VERSION}\")\n  endif (NOT EXISTS ${SUITESPARSE_VERSION_FILE})\nendif (SUITESPARSE_CONFIG_FOUND)\n\n# METIS (Optional dependency).\nsuitesparse_find_component(METIS LIBRARIES metis)\n\n# Only mark SuiteSparse as found if all required components and dependencies\n# have been found.\nset(SUITESPARSE_FOUND TRUE)\nforeach(REQUIRED_VAR ${SUITESPARSE_FOUND_REQUIRED_VARS})\n  if (NOT ${REQUIRED_VAR})\n    set(SUITESPARSE_FOUND FALSE)\n  endif (NOT ${REQUIRED_VAR})\nendforeach(REQUIRED_VAR ${SUITESPARSE_FOUND_REQUIRED_VARS})\n\nif (SUITESPARSE_FOUND)\n  list(APPEND SUITESPARSE_INCLUDE_DIRS\n    ${AMD_INCLUDE_DIR}\n    ${CAMD_INCLUDE_DIR}\n    ${COLAMD_INCLUDE_DIR}\n    ${CCOLAMD_INCLUDE_DIR}\n    ${CHOLMOD_INCLUDE_DIR}\n    ${SUITESPARSEQR_INCLUDE_DIR})\n  # Handle config separately, as otherwise at least one of them will be set\n  # to NOTFOUND which would cause any check on SUITESPARSE_INCLUDE_DIRS to fail.\n  if (SUITESPARSE_CONFIG_FOUND)\n    list(APPEND SUITESPARSE_INCLUDE_DIRS\n      ${SUITESPARSE_CONFIG_INCLUDE_DIR})\n  endif (SUITESPARSE_CONFIG_FOUND)\n  if (UFCONFIG_FOUND)\n    list(APPEND SUITESPARSE_INCLUDE_DIRS\n      ${UFCONFIG_INCLUDE_DIR})\n  endif (UFCONFIG_FOUND)\n  # As SuiteSparse includes are often all in the same directory, remove any\n  # repetitions.\n  list(REMOVE_DUPLICATES SUITESPARSE_INCLUDE_DIRS)\n\n  # Important: The ordering of these libraries is *NOT* arbitrary, as these\n  # could potentially be static libraries their link ordering is important.\n  list(APPEND SUITESPARSE_LIBRARIES\n    ${SUITESPARSEQR_LIBRARY}\n    ${CHOLMOD_LIBRARY}\n    ${CCOLAMD_LIBRARY}\n    ${CAMD_LIBRARY}\n    ${COLAMD_LIBRARY}\n    ${AMD_LIBRARY}\n    ${LAPACK_LIBRARIES}\n    ${BLAS_LIBRARIES})\n  if (SUITESPARSE_CONFIG_FOUND)\n    list(APPEND SUITESPARSE_LIBRARIES\n      ${SUITESPARSE_CONFIG_LIBRARY})\n  endif (SUITESPARSE_CONFIG_FOUND)\n  if (METIS_FOUND)\n    list(APPEND SUITESPARSE_LIBRARIES\n      ${METIS_LIBRARY})\n  endif (METIS_FOUND)\nendif()\n\n# Determine if we are running on Ubuntu with the package install of SuiteSparse\n# which is broken and does not support linking a shared library.\nset(SUITESPARSE_IS_BROKEN_SHARED_LINKING_UBUNTU_SYSTEM_VERSION FALSE)\nif (CMAKE_SYSTEM_NAME MATCHES \"Linux\" AND\n    SUITESPARSE_VERSION VERSION_EQUAL 3.4.0)\n  find_program(LSB_RELEASE_EXECUTABLE lsb_release)\n  if (LSB_RELEASE_EXECUTABLE)\n    # Any even moderately recent Ubuntu release (likely to be affected by\n    # this bug) should have lsb_release, if it isn't present we are likely\n    # on a different Linux distribution (should be fine).\n    execute_process(COMMAND ${LSB_RELEASE_EXECUTABLE} -si\n      OUTPUT_VARIABLE LSB_DISTRIBUTOR_ID\n      OUTPUT_STRIP_TRAILING_WHITESPACE)\n\n    if (LSB_DISTRIBUTOR_ID MATCHES \"Ubuntu\" AND\n        SUITESPARSE_LIBRARIES MATCHES \"/usr/lib/libamd\")\n      # We are on Ubuntu, and the SuiteSparse version matches the broken\n      # system install version and is a system install.\n      set(SUITESPARSE_IS_BROKEN_SHARED_LINKING_UBUNTU_SYSTEM_VERSION TRUE)\n      message(STATUS \"Found system install of SuiteSparse \"\n        \"${SUITESPARSE_VERSION} running on Ubuntu, which has a known bug \"\n        \"preventing linking of shared libraries (static linking unaffected).\")\n    endif (LSB_DISTRIBUTOR_ID MATCHES \"Ubuntu\" AND\n      SUITESPARSE_LIBRARIES MATCHES \"/usr/lib/libamd\")\n  endif (LSB_RELEASE_EXECUTABLE)\nendif (CMAKE_SYSTEM_NAME MATCHES \"Linux\" AND\n  SUITESPARSE_VERSION VERSION_EQUAL 3.4.0)\n\nsuitesparse_reset_find_library_prefix()\n\n# Handle REQUIRED and QUIET arguments to FIND_PACKAGE\ninclude(FindPackageHandleStandardArgs)\nif (SUITESPARSE_FOUND)\n  find_package_handle_standard_args(SuiteSparse\n    REQUIRED_VARS ${SUITESPARSE_FOUND_REQUIRED_VARS}\n    VERSION_VAR SUITESPARSE_VERSION\n    FAIL_MESSAGE \"Failed to find some/all required components of SuiteSparse.\")\nelse (SUITESPARSE_FOUND)\n  # Do not pass VERSION_VAR to FindPackageHandleStandardArgs() if we failed to\n  # find SuiteSparse to avoid a confusing autogenerated failure message\n  # that states 'not found (missing: FOO) (found version: x.y.z)'.\n  find_package_handle_standard_args(SuiteSparse\n    REQUIRED_VARS ${SUITESPARSE_FOUND_REQUIRED_VARS}\n    FAIL_MESSAGE \"Failed to find some/all required components of SuiteSparse.\")\nendif (SUITESPARSE_FOUND)\n"
  },
  {
    "path": "3rdparty/ceres/cmake/FindTBB.cmake",
    "content": "# The MIT License (MIT)\n#\n# Copyright (c) 2015 Justus Calvin\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in all\n# copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n# SOFTWARE.\n\n#\n# FindTBB\n# -------\n#\n# Find TBB include directories and libraries.\n#\n# Usage:\n#\n#  find_package(TBB [major[.minor]] [EXACT]\n#               [QUIET] [REQUIRED]\n#               [[COMPONENTS] [components...]]\n#               [OPTIONAL_COMPONENTS components...])\n#\n# where the allowed components are tbbmalloc and tbb_preview. Users may modify\n# the behavior of this module with the following variables:\n#\n# * TBB_ROOT_DIR          - The base directory the of TBB installation.\n# * TBB_INCLUDE_DIR       - The directory that contains the TBB headers files.\n# * TBB_LIBRARY           - The directory that contains the TBB library files.\n# * TBB_<library>_LIBRARY - The path of the TBB the corresponding TBB library.\n#                           These libraries, if specified, override the\n#                           corresponding library search results, where <library>\n#                           may be tbb, tbb_debug, tbbmalloc, tbbmalloc_debug,\n#                           tbb_preview, or tbb_preview_debug.\n# * TBB_USE_DEBUG_BUILD   - The debug version of tbb libraries, if present, will\n#                           be used instead of the release version.\n#\n# Users may modify the behavior of this module with the following environment\n# variables:\n#\n# * TBB_INSTALL_DIR\n# * TBBROOT\n# * LIBRARY_PATH\n#\n# This module will set the following variables:\n#\n# * TBB_FOUND             - Set to false, or undefined, if we haven’t found, or\n#                           don’t want to use TBB.\n# * TBB_<component>_FOUND - If False, optional <component> part of TBB sytem is\n#                           not available.\n# * TBB_VERSION           - The full version string\n# * TBB_VERSION_MAJOR     - The major version\n# * TBB_VERSION_MINOR     - The minor version\n# * TBB_INTERFACE_VERSION - The interface version number defined in\n#                           tbb/tbb_stddef.h.\n# * TBB_<library>_LIBRARY_RELEASE - The path of the TBB release version of\n#                           <library>, where <library> may be tbb, tbb_debug,\n#                           tbbmalloc, tbbmalloc_debug, tbb_preview, or\n#                           tbb_preview_debug.\n# * TBB_<library>_LIBRARY_DEGUG - The path of the TBB release version of\n#                           <library>, where <library> may be tbb, tbb_debug,\n#                           tbbmalloc, tbbmalloc_debug, tbb_preview, or\n#                           tbb_preview_debug.\n#\n# The following varibles should be used to build and link with TBB:\n#\n# * TBB_INCLUDE_DIRS - The include directory for TBB.\n# * TBB_LIBRARIES    - The libraries to link against to use TBB.\n# * TBB_DEFINITIONS  - Definitions to use when compiling code that uses TBB.\n\ninclude(FindPackageHandleStandardArgs)\n\nif(NOT TBB_FOUND)\n\n  ##################################\n  # Check the build type\n  ##################################\n\n  if(NOT DEFINED TBB_USE_DEBUG_BUILD)\n    if(CMAKE_BUILD_TYPE MATCHES \"(Debug|DEBUG|debug|RelWithDebInfo|RELWITHDEBINFO|relwithdebinfo)\")\n      set(TBB_USE_DEBUG_BUILD TRUE)\n    else()\n      set(TBB_USE_DEBUG_BUILD FALSE)\n    endif()\n  endif()\n\n  ##################################\n  # Set the TBB search directories\n  ##################################\n\n  # Define search paths based on user input and environment variables\n  set(TBB_SEARCH_DIR ${TBB_ROOT_DIR} $ENV{TBB_INSTALL_DIR} $ENV{TBBROOT})\n\n  # Define the search directories based on the current platform\n  if(CMAKE_SYSTEM_NAME STREQUAL \"Windows\")\n    set(TBB_DEFAULT_SEARCH_DIR \"C:/Program Files/Intel/TBB\"\n                               \"C:/Program Files (x86)/Intel/TBB\")\n\n    # Set the target architecture\n    if(CMAKE_SIZEOF_VOID_P EQUAL 8)\n      set(TBB_ARCHITECTURE \"intel64\")\n    else()\n      set(TBB_ARCHITECTURE \"ia32\")\n    endif()\n\n    # Set the TBB search library path search suffix based on the version of VC\n    if(WINDOWS_STORE)\n      set(TBB_LIB_PATH_SUFFIX \"lib/${TBB_ARCHITECTURE}/vc11_ui\")\n    elseif(MSVC14)\n      set(TBB_LIB_PATH_SUFFIX \"lib/${TBB_ARCHITECTURE}/vc14\")\n    elseif(MSVC12)\n      set(TBB_LIB_PATH_SUFFIX \"lib/${TBB_ARCHITECTURE}/vc12\")\n    elseif(MSVC11)\n      set(TBB_LIB_PATH_SUFFIX \"lib/${TBB_ARCHITECTURE}/vc11\")\n    elseif(MSVC10)\n      set(TBB_LIB_PATH_SUFFIX \"lib/${TBB_ARCHITECTURE}/vc10\")\n    endif()\n\n    # Add the library path search suffix for the VC independent version of TBB\n    list(APPEND TBB_LIB_PATH_SUFFIX \"lib/${TBB_ARCHITECTURE}/vc_mt\")\n\n  elseif(CMAKE_SYSTEM_NAME STREQUAL \"Darwin\")\n    # OS X\n    set(TBB_DEFAULT_SEARCH_DIR \"/opt/intel/tbb\")\n\n    # TODO: Check to see which C++ library is being used by the compiler.\n    if(NOT ${CMAKE_SYSTEM_VERSION} VERSION_LESS 13.0)\n      # The default C++ library on OS X 10.9 and later is libc++\n      set(TBB_LIB_PATH_SUFFIX \"lib/libc++\")\n    else()\n      set(TBB_LIB_PATH_SUFFIX \"lib\")\n    endif()\n  elseif(CMAKE_SYSTEM_NAME STREQUAL \"Linux\")\n    # Linux\n    set(TBB_DEFAULT_SEARCH_DIR \"/opt/intel/tbb\")\n\n    # TODO: Check compiler version to see the suffix should be <arch>/gcc4.1 or\n    #       <arch>/gcc4.1. For now, assume that the compiler is more recent than\n    #       gcc 4.4.x or later.\n    if(CMAKE_SYSTEM_PROCESSOR STREQUAL \"x86_64\")\n      set(TBB_LIB_PATH_SUFFIX \"lib/intel64/gcc4.4\")\n    elseif(CMAKE_SYSTEM_PROCESSOR MATCHES \"^i.86$\")\n      set(TBB_LIB_PATH_SUFFIX \"lib/ia32/gcc4.4\")\n    endif()\n  endif()\n\n  ##################################\n  # Find the TBB include dir\n  ##################################\n\n  find_path(TBB_INCLUDE_DIRS tbb/tbb.h\n      HINTS ${TBB_INCLUDE_DIR} ${TBB_SEARCH_DIR}\n      PATHS ${TBB_DEFAULT_SEARCH_DIR}\n      PATH_SUFFIXES include)\n\n  ##################################\n  # Find TBB components\n  ##################################\n\n  # Find each component\n  foreach(_comp tbb_preview tbbmalloc tbb)\n    # Search for the libraries\n    find_library(TBB_${_comp}_LIBRARY_RELEASE ${_comp}\n        HINTS ${TBB_LIBRARY} ${TBB_SEARCH_DIR}\n        PATHS ${TBB_DEFAULT_SEARCH_DIR}\n        PATH_SUFFIXES ${TBB_LIB_PATH_SUFFIX})\n\n    find_library(TBB_${_comp}_LIBRARY_DEBUG ${_comp}_debug\n        HINTS ${TBB_LIBRARY} ${TBB_SEARCH_DIR}\n        PATHS ${TBB_DEFAULT_SEARCH_DIR} ENV LIBRARY_PATH\n        PATH_SUFFIXES ${TBB_LIB_PATH_SUFFIX})\n\n\n    # Set the library to be used for the component\n    if(NOT TBB_${_comp}_LIBRARY)\n      if(TBB_USE_DEBUG_BUILD AND TBB_${_comp}_LIBRARY_DEBUG)\n        set(TBB_${_comp}_LIBRARY \"${TBB_${_comp}_LIBRARY_DEBUG}\")\n      elseif(TBB_${_comp}_LIBRARY_RELEASE)\n        set(TBB_${_comp}_LIBRARY \"${TBB_${_comp}_LIBRARY_RELEASE}\")\n      elseif(TBB_${_comp}_LIBRARY_DEBUG)\n        set(TBB_${_comp}_LIBRARY \"${TBB_${_comp}_LIBRARY_DEBUG}\")\n      endif()\n    endif()\n\n    # Set the TBB library list and component found variables\n    if(TBB_${_comp}_LIBRARY)\n      list(APPEND TBB_LIBRARIES \"${TBB_${_comp}_LIBRARY}\")\n      set(TBB_${_comp}_FOUND TRUE)\n    else()\n      set(TBB_${_comp}_FOUND FALSE)\n    endif()\n\n    mark_as_advanced(TBB_${_comp}_LIBRARY_RELEASE)\n    mark_as_advanced(TBB_${_comp}_LIBRARY_DEBUG)\n    mark_as_advanced(TBB_${_comp}_LIBRARY)\n\n  endforeach()\n\n  ##################################\n  # Set compile flags\n  ##################################\n\n  if(TBB_tbb_LIBRARY MATCHES \"debug\")\n    set(TBB_DEFINITIONS \"-DTBB_USE_DEBUG=1\")\n  endif()\n\n  ##################################\n  # Set version strings\n  ##################################\n\n  if(TBB_INCLUDE_DIRS)\n    file(READ \"${TBB_INCLUDE_DIRS}/tbb/tbb_stddef.h\" _tbb_version_file)\n    string(REGEX REPLACE \".*#define TBB_VERSION_MAJOR ([0-9]+).*\" \"\\\\1\"\n            TBB_VERSION_MAJOR \"${_tbb_version_file}\")\n    string(REGEX REPLACE \".*#define TBB_VERSION_MINOR ([0-9]+).*\" \"\\\\1\"\n            TBB_VERSION_MINOR \"${_tbb_version_file}\")\n    string(REGEX REPLACE \".*#define TBB_INTERFACE_VERSION ([0-9]+).*\" \"\\\\1\"\n            TBB_INTERFACE_VERSION \"${_tbb_version_file}\")\n    set(TBB_VERSION \"${TBB_VERSION_MAJOR}.${TBB_VERSION_MINOR}\")\n  endif()\n\n  find_package_handle_standard_args(TBB\n      REQUIRED_VARS TBB_INCLUDE_DIRS TBB_LIBRARIES\n      HANDLE_COMPONENTS\n      VERSION_VAR TBB_VERSION)\n\n  mark_as_advanced(TBB_INCLUDE_DIRS TBB_LIBRARIES)\n\n  unset(TBB_ARCHITECTURE)\n  unset(TBB_LIB_PATH_SUFFIX)\n  unset(TBB_DEFAULT_SEARCH_DIR)\n\nendif()\n"
  },
  {
    "path": "3rdparty/ceres/cmake/PrettyPrintCMakeList.cmake",
    "content": "# Ceres Solver - A fast non-linear least squares minimizer\n# Copyright 2018 Google Inc. All rights reserved.\n# http://ceres-solver.org/\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice,\n#   this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright notice,\n#   this list of conditions and the following disclaimer in the documentation\n#   and/or other materials provided with the distribution.\n# * Neither the name of Google Inc. nor the names of its contributors may be\n#   used to endorse or promote products derived from this software without\n#   specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n#\n# Authors: alexs.mac@gmail.com (Alex Stewart)\n\n# pretty_print_cmake_list( OUTPUT_VAR [item1 [item2 ... ]] )\n#\n# Sets ${OUTPUT_VAR} in the caller's scope to a human-readable string\n# representation of the list passed as the remaining arguments formed\n# as: \"[item1, item2, ..., itemN]\".\nfunction(pretty_print_cmake_list OUTPUT_VAR)\n  string(REPLACE \";\" \", \" PRETTY_LIST_STRING \"[${ARGN}]\")\n  set(${OUTPUT_VAR} \"${PRETTY_LIST_STRING}\" PARENT_SCOPE)\nendfunction()\n"
  },
  {
    "path": "3rdparty/ceres/cmake/ReadCeresVersionFromSource.cmake",
    "content": "# Ceres Solver - A fast non-linear least squares minimizer\n# Copyright 2015 Google Inc. All rights reserved.\n# http://ceres-solver.org/\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice,\n#   this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright notice,\n#   this list of conditions and the following disclaimer in the documentation\n#   and/or other materials provided with the distribution.\n# * Neither the name of Google Inc. nor the names of its contributors may be\n#   used to endorse or promote products derived from this software without\n#   specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n#\n# Author: alexs.mac@gmail.com (Alex Stewart)\n#\n\n# Extract Ceres version from <CERES_SOURCE_ROOT>/include/ceres/version.h\n# so that we only have a single definition of the Ceres version, not two\n# one in the source and one in the CMakeLists.txt.\nmacro(read_ceres_version_from_source CERES_SOURCE_ROOT)\n  set(CERES_VERSION_FILE ${CERES_SOURCE_ROOT}/include/ceres/version.h)\n  if (NOT EXISTS ${CERES_VERSION_FILE})\n    message(FATAL_ERROR \"Cannot find Ceres version.h file in specified \"\n      \"Ceres source directory: ${CERES_SOURCE_ROOT}, it is not here: \"\n      \"${CERES_VERSION_FILE}\")\n  endif()\n\n  file(READ ${CERES_VERSION_FILE} CERES_VERSION_FILE_CONTENTS)\n\n  string(REGEX MATCH \"#define CERES_VERSION_MAJOR [0-9]+\"\n    CERES_VERSION_MAJOR \"${CERES_VERSION_FILE_CONTENTS}\")\n  string(REGEX REPLACE \"#define CERES_VERSION_MAJOR ([0-9]+)\" \"\\\\1\"\n    CERES_VERSION_MAJOR \"${CERES_VERSION_MAJOR}\")\n  # NOTE: if (VAR) is FALSE if VAR is numeric and <= 0, as such we cannot use\n  #       it for testing version numbers, which might well be zero, at least\n  #       for the patch version, hence check for empty string explicitly.\n  if (\"${CERES_VERSION_MAJOR}\" STREQUAL \"\")\n    message(FATAL_ERROR \"Failed to extract Ceres major version from \"\n      \"${CERES_VERSION_FILE}\")\n  endif()\n\n  string(REGEX MATCH \"#define CERES_VERSION_MINOR [0-9]+\"\n    CERES_VERSION_MINOR \"${CERES_VERSION_FILE_CONTENTS}\")\n  string(REGEX REPLACE \"#define CERES_VERSION_MINOR ([0-9]+)\" \"\\\\1\"\n    CERES_VERSION_MINOR \"${CERES_VERSION_MINOR}\")\n  if (\"${CERES_VERSION_MINOR}\" STREQUAL \"\")\n    message(FATAL_ERROR \"Failed to extract Ceres minor version from \"\n      \"${CERES_VERSION_FILE}\")\n  endif()\n\n  string(REGEX MATCH \"#define CERES_VERSION_REVISION [0-9]+\"\n    CERES_VERSION_PATCH \"${CERES_VERSION_FILE_CONTENTS}\")\n  string(REGEX REPLACE \"#define CERES_VERSION_REVISION ([0-9]+)\" \"\\\\1\"\n    CERES_VERSION_PATCH \"${CERES_VERSION_PATCH}\")\n  if (\"${CERES_VERSION_PATCH}\" STREQUAL \"\")\n    message(FATAL_ERROR \"Failed to extract Ceres patch version from \"\n      \"${CERES_VERSION_FILE}\")\n  endif()\n\n  # This is on a single line s/t CMake does not interpret it as a list of\n  # elements and insert ';' separators which would result in 3.;2.;0 nonsense.\n  set(CERES_VERSION \"${CERES_VERSION_MAJOR}.${CERES_VERSION_MINOR}.${CERES_VERSION_PATCH}\")\n\n  message(STATUS \"Detected Ceres version: ${CERES_VERSION} from \"\n    \"${CERES_VERSION_FILE}\")\nendmacro()\n"
  },
  {
    "path": "3rdparty/ceres/cmake/UpdateCacheVariable.cmake",
    "content": "# Ceres Solver - A fast non-linear least squares minimizer\n# Copyright 2015 Google Inc. All rights reserved.\n# http://ceres-solver.org/\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice,\n#   this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright notice,\n#   this list of conditions and the following disclaimer in the documentation\n#   and/or other materials provided with the distribution.\n# * Neither the name of Google Inc. nor the names of its contributors may be\n#   used to endorse or promote products derived from this software without\n#   specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n#\n# Author: alexs.mac@gmail.com (Alex Stewart)\n\n# By default, there is no easy way in CMake to set the value of a cache\n# variable without reinitialising it, which involves resetting its\n# associated help string.  This is particularly annoying for CMake options\n# where they need to programmatically updated.\n#\n# This function automates this process by getting the current help string\n# for the cache variable to update, then reinitialising it with the new\n# value, but with the original help string.\nfunction(UPDATE_CACHE_VARIABLE VAR_NAME VALUE)\n  get_property(IS_DEFINED_IN_CACHE CACHE ${VAR_NAME} PROPERTY VALUE SET)\n  if (NOT IS_DEFINED_IN_CACHE)\n    message(FATAL_ERROR \"Specified variable to update in cache: \"\n      \"${VAR_NAME} has not been set in the cache.\")\n  endif()\n  get_property(HELP_STRING CACHE ${VAR_NAME} PROPERTY HELPSTRING)\n  get_property(VAR_TYPE CACHE ${VAR_NAME} PROPERTY TYPE)\n  set(${VAR_NAME} ${VALUE} CACHE ${VAR_TYPE} \"${HELP_STRING}\" FORCE)\nendfunction()\n"
  },
  {
    "path": "3rdparty/ceres/cmake/config.h.in",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: alexs.mac@gmail.com (Alex Stewart)\n\n// Configuration options for Ceres.\n//\n// Do not edit this file, it was automatically configured by CMake when\n// Ceres was compiled with the relevant configuration for the machine\n// on which Ceres was compiled.\n//\n// Ceres Developers: All options should have the same name as their mapped\n//                   CMake options, in the preconfigured version of this file\n//                   all options should be enclosed in '@'.\n\n#ifndef CERES_PUBLIC_INTERNAL_CONFIG_H_\n#define CERES_PUBLIC_INTERNAL_CONFIG_H_\n\n// If defined, use the LGPL code in Eigen.\n@CERES_USE_EIGEN_SPARSE@\n\n// If defined, Ceres was compiled without LAPACK.\n@CERES_NO_LAPACK@\n\n// If defined, Ceres was compiled without SuiteSparse.\n@CERES_NO_SUITESPARSE@\n\n// If defined, Ceres was compiled without CXSparse.\n@CERES_NO_CXSPARSE@\n\n// If defined, Ceres was compiled without Apple's Accelerate framework solvers.\n@CERES_NO_ACCELERATE_SPARSE@\n\n#if defined(CERES_NO_SUITESPARSE) &&              \\\n    defined(CERES_NO_ACCELERATE_SPARSE) &&        \\\n    defined(CERES_NO_CXSPARSE) &&                 \\\n    !defined(CERES_USE_EIGEN_SPARSE)  // NOLINT\n// If defined Ceres was compiled without any sparse linear algebra support.\n#define CERES_NO_SPARSE\n#endif\n\n// If defined, Ceres was compiled without Schur specializations.\n@CERES_RESTRICT_SCHUR_SPECIALIZATION@\n\n// If defined, Ceres was compiled to use Eigen instead of hardcoded BLAS\n// routines.\n@CERES_NO_CUSTOM_BLAS@\n\n// If defined, Ceres was compiled without multithreading support.\n@CERES_NO_THREADS@\n// If defined Ceres was compiled with OpenMP multithreading support.\n@CERES_USE_OPENMP@\n// If defined Ceres was compiled with C++11 thread support.\n@CERES_USE_CXX11_THREADS@\n\n// If defined, Ceres was built as a shared library.\n@CERES_USING_SHARED_LIBRARY@\n\n// If defined, Ceres was compiled with a version MSVC >= 2005 which\n// deprecated the standard POSIX names for bessel functions, replacing them\n// with underscore prefixed versions (e.g. j0() -> _j0()).\n@CERES_MSVC_USE_UNDERSCORE_PREFIXED_BESSEL_FUNCTIONS@\n\n#endif  // CERES_PUBLIC_INTERNAL_CONFIG_H_\n"
  },
  {
    "path": "3rdparty/ceres/cmake/iOS.cmake",
    "content": "# This file is part of the ios-cmake project. It was retrieved from\n# https://github.com/cristeab/ios-cmake.git, which is a fork of\n# https://code.google.com/p/ios-cmake/. Which in turn is based off of\n# the Platform/Darwin.cmake and Platform/UnixPaths.cmake files which\n# are included with CMake 2.8.4\n#\n# The ios-cmake project is licensed under the new BSD license.\n#\n# Copyright (c) 2014, Bogdan Cristea and LTE Engineering Software,\n# Kitware, Inc., Insight Software Consortium.  All rights reserved.\n\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions\n# are met:\n\n# 1. Redistributions of source code must retain the above copyright\n# notice, this list of conditions and the following disclaimer.\n#\n# 2. Redistributions in binary form must reproduce the above copyright\n# notice, this list of conditions and the following disclaimer in the\n# documentation and/or other materials provided with the distribution.\n#\n# 3. Neither the name of the copyright holder nor the names of its\n# contributors may be used to endorse or promote products derived from\n# this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n# \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\n# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\n# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\n# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN\n# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n#\n# This file is based off of the Platform/Darwin.cmake and\n# Platform/UnixPaths.cmake files which are included with CMake 2.8.4\n# It has been altered for iOS development.\n#\n# Updated by Alex Stewart (alexs.mac@gmail.com).\n\n# The following variables control the behaviour of this toolchain:\n#\n# IOS_PLATFORM: OS (default) or SIMULATOR or SIMULATOR64\n#    OS = Build for iPhoneOS.\n#    SIMULATOR = Build for x86 i386 iPhone Simulator.\n#    SIMULATOR64 = Build for x86 x86_64 iPhone Simulator.\n# CMAKE_OSX_SYSROOT: Path to the iOS SDK to use.  By default this is\n#    automatically determined from IOS_PLATFORM and xcodebuild, but\n#    can also be manually specified (although this should not be required).\n# CMAKE_IOS_DEVELOPER_ROOT: Path to the Developer directory for the iOS platform\n#    being compiled for.  By default this is automatically determined from\n#    CMAKE_OSX_SYSROOT, but can also be manually specified (although this should\n#    not be required).\n#\n# This toolchain defines the following variables for use externally:\n#\n# XCODE_VERSION: Version number (not including Build version) of Xcode detected.\n# IOS_SDK_VERSION: Version of iOS SDK being used.\n# CMAKE_OSX_ARCHITECTURES: Architectures being compiled for (generated from\n#    IOS_PLATFORM).\n#\n# This toolchain defines the following macros for use externally:\n#\n# set_xcode_property (TARGET XCODE_PROPERTY XCODE_VALUE)\n#   A convenience macro for setting xcode specific properties on targets\n#   example: set_xcode_property (myioslib IPHONEOS_DEPLOYMENT_TARGET \"3.1\").\n#\n# find_host_package (PROGRAM ARGS)\n#   A macro used to find executable programs on the host system, not within the\n#   iOS environment.  Thanks to the android-cmake project for providing the\n#   command.\n\n# Get the Xcode version being used.\nexecute_process(COMMAND xcodebuild -version\n  OUTPUT_VARIABLE XCODE_VERSION\n  ERROR_QUIET\n  OUTPUT_STRIP_TRAILING_WHITESPACE)\nstring(REGEX MATCH \"Xcode [0-9\\\\.]+\" XCODE_VERSION \"${XCODE_VERSION}\")\nstring(REGEX REPLACE \"Xcode ([0-9\\\\.]+)\" \"\\\\1\" XCODE_VERSION \"${XCODE_VERSION}\")\nmessage(STATUS \"Building with Xcode version: ${XCODE_VERSION}\")\n\n# Default to building for iPhoneOS if not specified otherwise, and we cannot\n# determine the platform from the CMAKE_OSX_ARCHITECTURES variable.  The use\n# of CMAKE_OSX_ARCHITECTURES is such that try_compile() projects can correctly\n# determine the value of IOS_PLATFORM from the root project, as\n# CMAKE_OSX_ARCHITECTURES is propagated to them by CMake.\nif (NOT DEFINED IOS_PLATFORM)\n  if (CMAKE_OSX_ARCHITECTURES)\n    if (CMAKE_OSX_ARCHITECTURES MATCHES \".*arm.*\")\n      set(IOS_PLATFORM \"OS\")\n    elseif (CMAKE_OSX_ARCHITECTURES MATCHES \"i386\")\n      set(IOS_PLATFORM \"SIMULATOR\")\n    elseif (CMAKE_OSX_ARCHITECTURES MATCHES \"x86_64\")\n      set(IOS_PLATFORM \"SIMULATOR64\")\n    endif()\n  endif()\n  if (NOT IOS_PLATFORM)\n    set(IOS_PLATFORM \"OS\")\n  endif()\nendif()\nset(IOS_PLATFORM ${IOS_PLATFORM} CACHE STRING\n  \"Type of iOS platform for which to build.\")\n\n# Determine the platform name and architectures for use in xcodebuild commands\n# from the specified IOS_PLATFORM name.\nif (IOS_PLATFORM STREQUAL \"OS\")\n  set(XCODE_IOS_PLATFORM iphoneos)\n  set(IOS_ARCH armv7 armv7s arm64)\nelseif (IOS_PLATFORM STREQUAL \"SIMULATOR\")\n  set(XCODE_IOS_PLATFORM iphonesimulator)\n  set(IOS_ARCH i386)\nelseif(IOS_PLATFORM STREQUAL \"SIMULATOR64\")\n  set(XCODE_IOS_PLATFORM iphonesimulator)\n  set(IOS_ARCH x86_64)\nelse()\n  message(FATAL_ERROR \"Invalid IOS_PLATFORM: ${IOS_PLATFORM}\")\nendif()\n\n# If user did not specify the SDK root to use, then query xcodebuild for it.\nif (NOT CMAKE_OSX_SYSROOT)\n  execute_process(COMMAND xcodebuild -version -sdk ${XCODE_IOS_PLATFORM} Path\n    OUTPUT_VARIABLE CMAKE_OSX_SYSROOT\n    ERROR_QUIET\n    OUTPUT_STRIP_TRAILING_WHITESPACE)\n  message(STATUS \"Using SDK: ${CMAKE_OSX_SYSROOT} for platform: ${IOS_PLATFORM}\")\nendif()\nif (NOT EXISTS ${CMAKE_OSX_SYSROOT})\n  message(FATAL_ERROR \"Invalid CMAKE_OSX_SYSROOT: ${CMAKE_OSX_SYSROOT} \"\n    \"does not exist.\")\nendif()\n# Get the SDK version information.\nexecute_process(COMMAND xcodebuild -sdk ${CMAKE_OSX_SYSROOT} -version SDKVersion\n  OUTPUT_VARIABLE IOS_SDK_VERSION\n  ERROR_QUIET\n  OUTPUT_STRIP_TRAILING_WHITESPACE)\n\n# Find the Developer root for the specific iOS platform being compiled for\n# from CMAKE_OSX_SYSROOT.  Should be ../../ from SDK specified in\n# CMAKE_OSX_SYSROOT.  There does not appear to be a direct way to obtain\n# this information from xcrun or xcodebuild.\nif (NOT CMAKE_IOS_DEVELOPER_ROOT)\n  get_filename_component(IOS_PLATFORM_SDK_DIR ${CMAKE_OSX_SYSROOT} PATH)\n  get_filename_component(CMAKE_IOS_DEVELOPER_ROOT ${IOS_PLATFORM_SDK_DIR} PATH)\nendif()\nif (NOT EXISTS ${CMAKE_IOS_DEVELOPER_ROOT})\n  message(FATAL_ERROR \"Invalid CMAKE_IOS_DEVELOPER_ROOT: \"\n    \"${CMAKE_IOS_DEVELOPER_ROOT} does not exist.\")\nendif()\n\n# Find the C & C++ compilers for the specified SDK.\nif (NOT CMAKE_C_COMPILER)\n  execute_process(COMMAND xcrun -sdk ${CMAKE_OSX_SYSROOT} -find clang\n    OUTPUT_VARIABLE CMAKE_C_COMPILER\n    ERROR_QUIET\n    OUTPUT_STRIP_TRAILING_WHITESPACE)\n  message(STATUS \"Using C compiler: ${CMAKE_C_COMPILER}\")\nendif()\nif (NOT CMAKE_CXX_COMPILER)\n  execute_process(COMMAND xcrun -sdk ${CMAKE_OSX_SYSROOT} -find clang++\n    OUTPUT_VARIABLE CMAKE_CXX_COMPILER\n    ERROR_QUIET\n    OUTPUT_STRIP_TRAILING_WHITESPACE)\n  message(STATUS \"Using CXX compiler: ${CMAKE_CXX_COMPILER}\")\nendif()\n\n# Find (Apple's) libtool.\nexecute_process(COMMAND xcrun -sdk ${CMAKE_OSX_SYSROOT} -find libtool\n  OUTPUT_VARIABLE IOS_LIBTOOL\n  ERROR_QUIET\n  OUTPUT_STRIP_TRAILING_WHITESPACE)\nmessage(STATUS \"Using libtool: ${IOS_LIBTOOL}\")\n# Configure libtool to be used instead of ar + ranlib to build static libraries.\n# This is required on Xcode 7+, but should also work on previous versions of\n# Xcode.\nset(CMAKE_C_CREATE_STATIC_LIBRARY\n  \"${IOS_LIBTOOL} -static -o <TARGET> <LINK_FLAGS> <OBJECTS> \")\nset(CMAKE_CXX_CREATE_STATIC_LIBRARY\n  \"${IOS_LIBTOOL} -static -o <TARGET> <LINK_FLAGS> <OBJECTS> \")\n\n# Get the version of Darwin (OS X) of the host.\nexecute_process(COMMAND uname -r\n  OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION\n  ERROR_QUIET\n  OUTPUT_STRIP_TRAILING_WHITESPACE)\n\n# Specify minimum version of deployment target.\n# Unless specified, the latest SDK version is used by default.\nset(IOS_DEPLOYMENT_TARGET \"${IOS_SDK_VERSION}\"\n    CACHE STRING \"Minimum iOS version to build for.\" )\nmessage(STATUS \"Building for minimum iOS version: ${IOS_DEPLOYMENT_TARGET}\"\n               \" (SDK version: ${IOS_SDK_VERSION})\")\nif (NOT IOS_DEPLOYMENT_TARGET VERSION_LESS 11.0)\n  # iOS 11+ does not support 32-bit architectures (armv7).\n  foreach(ARCH ${IOS_ARCH})\n    if (ARCH MATCHES \"armv7*\")\n      message(STATUS \"Removing iOS architecture: ${ARCH} from build as it is \"\n        \"not supported by the minimum iOS version to build for: \"\n        \"${IOS_DEPLOYMENT_TARGET} (iOS >= 11 requires 64-bit).\")\n    else()\n      list(APPEND VALID_IOS_ARCH_FOR_SDK_VERSION ${ARCH})\n    endif()\n  endforeach()\n  set(IOS_ARCH ${VALID_IOS_ARCH_FOR_SDK_VERSION})\nendif()\n\nmessage(STATUS \"Configuring iOS build for platform: ${IOS_PLATFORM}, \"\n  \"architecture(s): ${IOS_ARCH}\")\n\n# Standard settings.\nset(CMAKE_SYSTEM_NAME Darwin)\nset(CMAKE_SYSTEM_VERSION ${IOS_SDK_VERSION})\nset(UNIX TRUE)\nset(APPLE TRUE)\nset(IOS TRUE)\n# Force unset of OS X-specific deployment target (otherwise autopopulated),\n# required as of cmake 2.8.10.\nset(CMAKE_OSX_DEPLOYMENT_TARGET \"\" CACHE STRING\n  \"Must be empty for iOS builds.\" FORCE)\n# Set the architectures for which to build.\nset(CMAKE_OSX_ARCHITECTURES ${IOS_ARCH} CACHE STRING \"Build architecture for iOS\")\n\n# All iOS/Darwin specific settings - some may be redundant.\nset(CMAKE_SHARED_LIBRARY_PREFIX \"lib\")\nset(CMAKE_SHARED_LIBRARY_SUFFIX \".dylib\")\nset(CMAKE_SHARED_MODULE_PREFIX \"lib\")\nset(CMAKE_SHARED_MODULE_SUFFIX \".so\")\nset(CMAKE_MODULE_EXISTS 1)\nset(CMAKE_DL_LIBS \"\")\n\nset(CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG \"-compatibility_version \")\nset(CMAKE_C_OSX_CURRENT_VERSION_FLAG \"-current_version \")\nset(CMAKE_CXX_OSX_COMPATIBILITY_VERSION_FLAG \"${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}\")\nset(CMAKE_CXX_OSX_CURRENT_VERSION_FLAG \"${CMAKE_C_OSX_CURRENT_VERSION_FLAG}\")\n\n# Note that only Xcode 7+ supports the newer more specific:\n# -m${XCODE_IOS_PLATFORM}-version-min flags, older versions of Xcode use:\n# -m(ios/ios-simulator)-version-min instead.\nif (XCODE_VERSION VERSION_LESS 7.0)\n  if (IOS_PLATFORM STREQUAL \"OS\")\n    set(XCODE_IOS_PLATFORM_VERSION_FLAGS\n      \"-mios-version-min=${IOS_DEPLOYMENT_TARGET}\")\n  else()\n    # SIMULATOR or SIMULATOR64 both use -mios-simulator-version-min.\n    set(XCODE_IOS_PLATFORM_VERSION_FLAGS\n      \"-mios-simulator-version-min=${IOS_DEPLOYMENT_TARGET}\")\n  endif()\nelse()\n  # Xcode 7.0+ uses flags we can build directly from XCODE_IOS_PLATFORM.\n  set(XCODE_IOS_PLATFORM_VERSION_FLAGS\n    \"-m${XCODE_IOS_PLATFORM}-version-min=${IOS_DEPLOYMENT_TARGET}\")\nendif()\n\nset(CMAKE_C_FLAGS\n  \"${XCODE_IOS_PLATFORM_VERSION_FLAGS} -fobjc-abi-version=2 -fobjc-arc ${CMAKE_C_FLAGS}\")\n# Hidden visibilty is required for C++ on iOS.\nset(CMAKE_CXX_FLAGS\n  \"${XCODE_IOS_PLATFORM_VERSION_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden -fobjc-abi-version=2 -fobjc-arc ${CMAKE_CXX_FLAGS}\")\nset(CMAKE_CXX_FLAGS_RELEASE \"-DNDEBUG -O3 -fomit-frame-pointer -ffast-math ${CMAKE_CXX_FLAGS_RELEASE}\")\n\nset(CMAKE_C_LINK_FLAGS \"${XCODE_IOS_PLATFORM_VERSION_FLAGS} -Wl,-search_paths_first ${CMAKE_C_LINK_FLAGS}\")\nset(CMAKE_CXX_LINK_FLAGS \"${XCODE_IOS_PLATFORM_VERSION_FLAGS}  -Wl,-search_paths_first ${CMAKE_CXX_LINK_FLAGS}\")\n\n# In order to ensure that the updated compiler flags are used in try_compile()\n# tests, we have to forcibly set them in the CMake cache, not merely set them\n# in the local scope.\nlist(APPEND VARS_TO_FORCE_IN_CACHE\n  CMAKE_C_FLAGS\n  CMAKE_CXX_FLAGS\n  CMAKE_CXX_RELEASE\n  CMAKE_C_LINK_FLAGS\n  CMAKE_CXX_LINK_FLAGS)\nforeach(VAR_TO_FORCE ${VARS_TO_FORCE_IN_CACHE})\n  set(${VAR_TO_FORCE} \"${${VAR_TO_FORCE}}\" CACHE STRING \"\" FORCE)\nendforeach()\n\nset(CMAKE_PLATFORM_HAS_INSTALLNAME 1)\nset(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS \"-dynamiclib -headerpad_max_install_names\")\nset(CMAKE_SHARED_MODULE_CREATE_C_FLAGS \"-bundle -headerpad_max_install_names\")\nset(CMAKE_SHARED_MODULE_LOADER_C_FLAG \"-Wl,-bundle_loader,\")\nset(CMAKE_SHARED_MODULE_LOADER_CXX_FLAG \"-Wl,-bundle_loader,\")\nset(CMAKE_FIND_LIBRARY_SUFFIXES \".dylib\" \".so\" \".a\")\n\n# Hack: if a new cmake (which uses CMAKE_INSTALL_NAME_TOOL) runs on an old\n# build tree (where install_name_tool was hardcoded) and where\n# CMAKE_INSTALL_NAME_TOOL isn't in the cache and still cmake didn't fail in\n# CMakeFindBinUtils.cmake (because it isn't rerun) hardcode\n# CMAKE_INSTALL_NAME_TOOL here to install_name_tool, so it behaves as it did\n# before, Alex.\nif (NOT DEFINED CMAKE_INSTALL_NAME_TOOL)\n  find_program(CMAKE_INSTALL_NAME_TOOL install_name_tool)\nendif (NOT DEFINED CMAKE_INSTALL_NAME_TOOL)\n\n# Set the find root to the iOS developer roots and to user defined paths.\nset(CMAKE_FIND_ROOT_PATH ${CMAKE_IOS_DEVELOPER_ROOT} ${CMAKE_OSX_SYSROOT}\n  ${CMAKE_PREFIX_PATH} CACHE STRING  \"iOS find search path root\" FORCE)\n\n# Default to searching for frameworks first.\nset(CMAKE_FIND_FRAMEWORK FIRST)\n\n# Set up the default search directories for frameworks.\nset(CMAKE_SYSTEM_FRAMEWORK_PATH\n  ${CMAKE_OSX_SYSROOT}/System/Library/Frameworks\n  ${CMAKE_OSX_SYSROOT}/System/Library/PrivateFrameworks\n  ${CMAKE_OSX_SYSROOT}/Developer/Library/Frameworks)\n\n# Only search the specified iOS SDK, not the remainder of the host filesystem.\nset(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)\nset(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)\nset(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)\nset(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)\n\n# This little macro lets you set any XCode specific property.\nmacro(set_xcode_property TARGET XCODE_PROPERTY XCODE_VALUE)\n  set_property(TARGET ${TARGET} PROPERTY\n    XCODE_ATTRIBUTE_${XCODE_PROPERTY} ${XCODE_VALUE})\nendmacro(set_xcode_property)\n\n# This macro lets you find executable programs on the host system.\nmacro(find_host_package)\n  set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)\n  set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER)\n  set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER)\n  set(IOS FALSE)\n\n  find_package(${ARGN})\n\n  set(IOS TRUE)\n  set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)\n  set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)\n  set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)\nendmacro(find_host_package)\n"
  },
  {
    "path": "3rdparty/ceres/cmake/uninstall.cmake.in",
    "content": "# Ceres Solver - A fast non-linear least squares minimizer\n# Copyright 2015 Google Inc. All rights reserved.\n# http://ceres-solver.org/\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice,\n#   this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright notice,\n#   this list of conditions and the following disclaimer in the documentation\n#   and/or other materials provided with the distribution.\n# * Neither the name of Google Inc. nor the names of its contributors may be\n#   used to endorse or promote products derived from this software without\n#   specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n#\n# Author: arnaudgelas@gmail.com (Arnaud Gelas)\n#         alexs.mac@gmail.com (Alex Stewart)\n\nif (NOT EXISTS \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\")\n  message(FATAL_ERROR \"Cannot find install manifest: \"\n                      \"\\\"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\\\"\")\nendif (NOT EXISTS \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\")\n\nfile(READ \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\" INSTALL_MANIFEST)\nstring(REGEX REPLACE \"\\n\" \";\" INSTALL_MANIFEST \"${INSTALL_MANIFEST}\")\nlist(REVERSE INSTALL_MANIFEST)\n\nforeach (INSTALLED_FILE ${INSTALL_MANIFEST})\n  # Save the root ceres include install directory, e.g. /usr/local/include/ceres\n  # so that we can remove it at the end.\n  if (NOT CERES_INCLUDE_INSTALL_ROOT)\n    get_filename_component(FILE_NAME ${INSTALLED_FILE} NAME)\n    if (FILE_NAME STREQUAL ceres.h)\n      # Ensure that the directory is nested as we expect, as we are going to\n      # remove it, and we do not want to remove files pertaining to anyone else.\n      get_filename_component(PARENT_DIR ${INSTALLED_FILE} PATH)\n      get_filename_component(PARENT_DIR_NAME ${PARENT_DIR} NAME)\n      if (PARENT_DIR_NAME STREQUAL ceres AND IS_DIRECTORY ${PARENT_DIR})\n        set(CERES_INCLUDE_INSTALL_ROOT ${PARENT_DIR})\n      endif (PARENT_DIR_NAME STREQUAL ceres AND IS_DIRECTORY ${PARENT_DIR})\n    endif (FILE_NAME STREQUAL ceres.h)\n  endif (NOT CERES_INCLUDE_INSTALL_ROOT)\n\n  message(STATUS \"Uninstalling \\\"$ENV{DESTDIR}${INSTALLED_FILE}\\\"\")\n  if (EXISTS \"$ENV{DESTDIR}${INSTALLED_FILE}\")\n    execute_process(COMMAND @CMAKE_COMMAND@\n                    -E remove \"$ENV{DESTDIR}${INSTALLED_FILE}\"\n                    OUTPUT_VARIABLE RM_OUT\n                    RESULT_VARIABLE RM_RETVAL)\n    if (NOT ${RM_RETVAL} EQUAL 0)\n      message(FATAL_ERROR\n              \"Problem when removing \\\"$ENV{DESTDIR}${INSTALLED_FILE}\\\"\")\n    endif (NOT ${RM_RETVAL} EQUAL 0)\n  else (EXISTS \"$ENV{DESTDIR}${INSTALLED_FILE}\")\n    message(STATUS \"File \\\"$ENV{DESTDIR}${INSTALLED_FILE}\\\" does not exist.\")\n  endif (EXISTS \"$ENV{DESTDIR}${INSTALLED_FILE}\")\nendforeach(INSTALLED_FILE)\n\n# Removing Ceres include install directory.\nif (CERES_INCLUDE_INSTALL_ROOT AND\n    EXISTS ${CERES_INCLUDE_INSTALL_ROOT})\n  message(STATUS \"Removing Ceres include install directory: \"\n                 \"\\\"$ENV{DESTDIR}${CERES_INCLUDE_INSTALL_ROOT}\\\"\")\n  execute_process(COMMAND @CMAKE_COMMAND@\n                  -E remove_directory\n                  \"$ENV{DESTDIR}${CERES_INCLUDE_INSTALL_ROOT}\"\n                  OUTPUT_VARIABLE RM_OUT\n                  RESULT_VARIABLE RM_RETVAL)\n  if (NOT ${RM_RETVAL} EQUAL 0)\n    message(FATAL_ERROR\n      \"Failed to remove: \\\"$ENV{DESTDIR}${CERES_INCLUDE_INSTALL_ROOT\\\"\")\n  endif (NOT ${RM_RETVAL} EQUAL 0)\nelse (CERES_INCLUDE_INSTALL_ROOT AND\n    EXISTS ${CERES_INCLUDE_INSTALL_ROOT})\n  message(FATAL_ERROR \"Failed to find Ceres installed include directory \"\n                      \"(e.g. /usr/local/include/ceres), candidate: \"\n                      \"\\\"$ENV{DESTDIR}${CERES_INCLUDE_INSTALL_ROOT}\\\"\")\nendif (CERES_INCLUDE_INSTALL_ROOT AND\n  EXISTS ${CERES_INCLUDE_INSTALL_ROOT})\n"
  },
  {
    "path": "3rdparty/ceres/config/ceres/internal/config.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: alexs.mac@gmail.com (Alex Stewart)\n\n// Default (empty) configuration options for Ceres.\n//\n// IMPORTANT: Most users of Ceres will not use this file, when\n//            compiling Ceres with CMake, CMake will configure a new\n//            config.h with the currently selected Ceres compile\n//            options in <BUILD_DIR>/config, which will be added to\n//            the include path for compilation, and installed with the\n//            public Ceres headers.  However, for some users of Ceres\n//            who compile without CMake (Android), this file ensures\n//            that Ceres will compile, with the user either specifying\n//            manually the Ceres compile options, or passing them\n//            directly through the compiler.\n\n#ifndef CERES_PUBLIC_INTERNAL_CONFIG_H_\n#define CERES_PUBLIC_INTERNAL_CONFIG_H_\n\n\n#endif  // CERES_PUBLIC_INTERNAL_CONFIG_H_\n"
  },
  {
    "path": "3rdparty/ceres/data/2x2.foe",
    "content": "2 3\n0 1 0 1\n0 0 1 1\n0.586612685392731 1.157638405566669 0.846059486257292\n-0.0582774013402734 0.0339010363051084 -0.0501593018104054 0.0745568557931712\n0.0492112815304123 -0.0307820846538285 -0.123247230948424 0.104812330861557\n0.0562633568728865 0.0152832583489560 -0.0576215592718086 -0.0139673758425540\n\n"
  },
  {
    "path": "3rdparty/ceres/data/3x3.foe",
    "content": "3 8\n0 1 2 0 1 2 0 1 2\n0 0 0 1 1 1 2 2 2\n1.201143e-01 7.520515e-02 9.078330e-02 1.280545e-01 6.276734e-02 1.201840e-01 1.092460e-01 1.217102e-01\n-1.06290 1.81622 -0.80592 0.27489 0.13790 -0.49836 0.76669 -1.95329 1.32468\n-1.39695 1.62887 -0.27482 1.46226 -2.21903 0.82016 -0.12290 0.67906 -0.57683\n0.89899 0.27696 0.04805 -0.07191 0.00777 -0.00488 -0.80267 -0.31249 -0.03957\n-0.86612 1.66525 -1.03168 1.87671 -3.28802 1.92990 -1.22515 2.01814 -1.08079\n-0.37343 -0.23977 0.56955 -0.41741 0.05711 0.42774 -0.14881 0.02528 0.10072\n0.62783 0.27746 0.44180 -1.22190 -0.27753 -1.23532 0.54919 0.15855 0.68658\n0.46483 -1.12896 0.57926 0.22646 -0.25658 0.18881 0.57866 -1.13277 0.48707\n0.86662 0.19780 -1.06759 -1.92170 -0.10882 2.02231 1.14262 -0.09817 -1.03353\n\n"
  },
  {
    "path": "3rdparty/ceres/data/5x5.foe",
    "content": "5 24\n0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4\n0 0 0 0 0 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 4 4 4 4 4\n\n5.472286e-02 6.425581e-02 5.031088e-02 5.989018e-02 4.424956e-02 5.119065e-02 6.743059e-02 2.339211e-02 5.973362e-02 6.281576e-02 1.495131e-02 5.693016e-02 3.189429e-02 7.672358e-02 4.524088e-02 3.681065e-02 6.383650e-02 4.347603e-02 2.264134e-02 2.561474e-02 5.886950e-02 4.114462e-02 4.893348e-02 5.834900e-02\n\n   -0.31071 1.04120 -0.78749 -0.47895 0.56812 -0.02713 0.12199 -0.19871 0.01017 0.08976 -0.05437 0.19638 -0.11093 -0.02853 0.00427 -0.19578 0.29112 -0.05108 -0.08012 0.02944 -0.87865 1.54098 -0.60090 -0.14424 0.05388 \n   0.59362 0.07378 0.01163 0.11076 0.38838 -1.56819 -0.12448 -0.26775 -0.14495 -1.26480 1.69550 0.23647 0.50640 0.20682 1.71141 -0.93659 -0.27274 -0.40550 -0.30937 -1.27168 0.21164 0.09704 0.14615 0.14513 0.43322 \n   0.84855 -1.15931 -0.04677 1.55189 -1.20232 -0.84787 0.88787 0.05491 -0.59425 0.44273 0.10771 0.15608 -0.20982 -0.40088 0.46844 0.00920 -0.34651 0.07722 1.10449 -1.00405 -0.00980 0.27614 0.32393 -1.83075 1.34408 \n   -1.03323 1.88111 -1.43100 0.78609 -0.25928 -0.03655 0.21945 -0.13154 -0.10918 0.11203 0.09740 -0.02567 -0.23481 0.18294 -0.07056 0.20877 -0.12025 -0.27859 0.34269 -0.10385 0.70720 -1.63594 1.39715 -0.56761 0.10165 \n   0.53443 -0.08024 -0.11745 -0.03402 0.25033 -0.96043 0.15798 0.15981 0.10961 -0.24634 0.77044 -0.18866 -0.27562 0.18315 0.07681 -0.74267 0.51002 0.40930 -0.00294 -1.63639 0.40120 -0.42511 -0.15842 -0.28824 1.59764 \n   -0.88573 -0.33458 -0.01419 -0.01103 0.00077 0.47044 0.43260 0.04198 -0.00840 0.00150 0.57390 0.08128 0.04955 -0.00643 0.01470 0.50375 0.07196 0.02376 0.03349 0.03517 -0.67904 -0.28139 -0.05936 -0.03884 -0.02249 \n   -0.01311 -0.01988 0.10721 -0.08376 0.01636 -0.32442 0.98192 -1.44473 1.21759 -0.47859 0.89529 -2.36566 3.17358 -2.70415 1.10629 -0.96782 2.47203 -3.22965 2.76881 -1.14343 0.42498 -1.09401 1.42223 -1.22142 0.50653 \n   0.21862 -0.20464 0.03462 -0.03753 0.01527 0.13402 -0.07069 -0.00552 -0.04434 -0.02653 0.15630 0.02185 0.04572 -0.11760 -0.06958 0.15633 -0.00898 0.00952 -0.06227 -0.12147 0.37032 0.05372 0.10450 -0.22764 -0.32445 \n   -0.02092 -0.35567 0.54827 0.50360 -0.95729 0.42842 0.61450 -1.06896 -0.96641 1.79327 -1.49830 -0.13333 0.96113 0.66182 -1.14234 2.35571 -0.68686 -0.72675 -0.09191 0.23092 -1.29917 0.56449 0.33405 -0.11554 0.06663 \n   -0.15212 -0.31661 -0.10629 -0.68078 1.64419 0.60883 0.48936 0.35629 0.85845 -2.71321 -1.02463 -0.40494 -0.33908 -0.03011 1.32162 0.87303 0.38931 0.15034 -0.46469 -0.16997 -0.30057 -0.21769 -0.03504 0.29551 -0.03051 \n   -0.63745 1.09815 0.07905 -1.29684 0.78552 0.31671 -0.60369 -0.31422 1.37878 -0.84617 -0.08181 0.25602 0.09426 -0.69533 0.50771 -0.26215 0.08620 0.18111 0.24247 -0.35641 0.18171 0.29815 -0.90155 0.49852 -0.00995 \n   -0.24394 0.32079 -0.18885 -0.43086 0.61484 0.95412 -1.08795 0.41381 1.25966 -1.62800 -1.63362 1.77016 -0.41047 -1.74982 2.02167 1.69856 -1.82451 0.27727 1.56121 -1.66173 -0.80206 0.85485 -0.10948 -0.64836 0.67266 \n   0.60487 -0.01646 0.13186 0.13391 0.66691 -0.16619 0.00981 0.02774 -0.14688 -0.23655 -0.03876 0.01428 -0.05848 0.00855 0.01915 0.28643 0.01215 0.00615 0.02837 -0.27025 -0.67548 -0.06341 -0.09492 -0.01467 -0.16753 \n   0.77534 -1.90839 2.47496 -2.26067 1.01011 -0.36223 0.89421 -1.24538 1.23108 -0.59609 -0.44538 1.04742 -1.25543 1.08209 -0.44929 -0.10218 0.51811 -0.92194 0.90930 -0.42024 0.18932 -0.73810 1.25011 -1.24150 0.56562 \n   0.93435 -0.03480 0.04710 -0.40291 -0.92490 -0.66962 0.13901 0.00497 0.31148 0.63533 0.30957 -0.23678 -0.07453 -0.24971 0.25021 0.68393 0.03453 -0.00104 -0.20619 -0.21134 -1.23377 0.08326 0.02804 0.53578 0.24696 \n   -0.31333 -0.06452 -0.14492 0.32917 0.18505 0.37680 -0.05739 -0.20598 -0.39758 0.33795 0.15776 -0.10590 -0.08163 -0.26879 0.26603 0.13942 0.14388 0.15602 -0.85931 0.46755 -0.37693 0.14924 0.18844 1.29502 -1.31627 \n   -0.57261 -0.15101 -0.03142 0.04828 -0.09470 1.30126 0.29676 0.02642 -0.10865 0.12241 -1.04666 -0.17702 0.10930 0.48806 0.79384 0.35790 0.00519 -0.09722 -0.76968 -1.93132 -0.05982 0.03488 -0.03692 0.34823 1.14489 \n   0.02861 -0.04563 -0.39979 -0.34141 0.84996 -0.11996 0.09395 0.10138 0.81867 -0.96541 0.17159 -0.18584 0.25071 -0.22578 -0.06749 1.50317 -1.28229 -0.16426 -0.02308 0.15558 -1.66312 1.45438 0.22480 -0.25807 0.09117 \n   -0.55490 0.19579 0.22691 0.60510 -0.46819 0.06905 -0.09310 -0.00511 -0.26410 0.29786 -0.15810 0.19022 0.02614 -0.00490 -0.06838 0.11087 -0.14454 -0.04154 -0.16050 0.23955 -0.60009 0.80946 0.13003 0.34930 -0.69227 \n   0.02280 0.50837 0.09286 -0.70868 0.16414 -0.80301 0.17835 0.36944 0.75854 -0.61169 0.44842 -0.99949 0.04847 0.08457 0.35292 0.60861 -0.02401 -0.48740 0.41152 -0.41065 -0.34356 0.41056 -0.01730 -0.58536 0.53149 \n   1.54887 -0.44899 -0.27397 -0.36683 -0.36138 -1.38762 0.36466 0.10235 0.35630 0.40105 -0.17410 -0.05898 0.13052 -0.04032 0.38137 -0.82904 0.31802 -0.02420 -0.20938 0.57263 0.95569 -0.26814 0.08144 0.25318 -1.02387 \n   0.26344 -0.49099 0.61113 -1.33142 0.89974 0.05990 -0.07519 0.14265 -0.33453 0.30248 0.08324 -0.12872 0.07988 -0.24786 0.14599 0.17826 -0.18072 0.08816 -0.10930 0.12304 0.45104 -0.70917 0.41756 -0.41199 0.18098 \n   -0.46895 0.79795 -0.38564 0.04986 -0.04034 0.11811 -0.23006 0.26011 -0.13551 0.03185 -0.01839 -0.09632 0.18000 -0.13208 0.03061 0.11165 -0.25590 0.42916 -0.49657 0.24341 0.51922 -1.52509 2.17579 -1.86952 0.70906 \n   -1.59203 1.37214 -0.36807 0.42638 -0.00689 2.86095 -2.02733 0.40858 -0.61961 -0.28165 -1.77476 0.55742 -0.12732 0.31007 0.76569 0.19805 0.83530 -0.18053 0.29590 -1.07493 0.27739 -0.69004 0.21195 -0.37112 0.59251 \n\n\n"
  },
  {
    "path": "3rdparty/ceres/data/README.foe",
    "content": "The *.foe files contain coefficients provided by Stefan Roth, who agreed to\nrelease them under a BSD license. See his home page:\n\n  http://www.gris.informatik.tu-darmstadt.de/~sroth/research/foe/index.html\n\nThe coefficients in the *.foe files have been obtained by extracting the\nmatrices from the MATLAB files and performing matrix multiplication.\n\nThe format of the files is ASCII:\n  <s = filter size> <K = number of filters>\n  <alpha_1> ... <alpha_K>\n  <f_1,1> ... <f_1,s^2>\n  ...\n  <f_K,1> ... <f_K,s^2>\n"
  },
  {
    "path": "3rdparty/ceres/data/ceres_noisy.pgm",
    "content": "P2\n# PGM format\n # <width> <height> <levels> \n # <data> ... \n177 213 255 \n86 74 90 29 80 63 76 62 83 97 64 102 86 67 103 61 27 57 63 58 60 97 84 73 110 81 85 71 52 17 106 71 95 104 103 62 88 84 91 82 70 89 109 32 70 54 88 68 81 62 95 76 92 97 91 42 86 35 50 50 37 89 36 43 48 77 50 63 66 72 47 27 54 8 48 43 102 43 0 40 0 61 31 54 50 34 58 4 44 24 35 33 34 47 46 20 40 24 0 47 16 21 55 26 54 25 22 22 35 0 37 64 35 48 40 1 27 3 43 45 32 74 34 44 17 13 33 45 10 52 32 76 79 70 47 27 74 44 30 86 7 49 66 87 51 71 81 59 72 60 49 62 45 41 53 101 58 54 49 84 58 62 69 98 84 63 102 123 72 101 90 106 80 86 73 78 74 90 61 89 47 109 63 82 53 102 68 56 40 62 51 85 71 41 47 59 91 43 85 60 75 67 59 96 45 66 58 85 71 78 77 65 104 51 66 59 112 62 66 47 78 74 121 65 141 30 70 44 127 72 86 49 48 61 83 84 43 86 47 79 75 68 65 35 10 33 60 15 67 87 45 27 57 40 51 57 44 16 30 60 16 53 42 21 54 33 50 14 39 50 25 39 17 37 70 70 32 32 17 57 21 43 49 28 63 54 81 34 47 106 16 29 26 38 77 49 41 51 35 1 31 41 40 47 71 40 32 59 37 57 44 53 57 14 33 47 56 80 0 44 73 37 40 61 72 109 38 34 92 53 39 48 88 91 48 69 112 48 25 83 39 75 88 58 59 31 79 79 104 83 96 69 84 58 46 85 50 94 70 65 82 62 65 62 80 49 17 66 73 40 53 81 96 68 99 60 79 95 116 99 40 67 121 91 65 80 73 50 53 53 71 95 77 77 64 82 47 63 76 75 34 69 84 115 63 61 21 48 51 95 85 82 62 64 64 62 77 100 70 48 75 59 56 44 55 68 70 87 52 72 46 65 52 56 88 52 71 42 66 50 18 35 61 23 21 0 74 47 37 22 33 37 42 27 63 74 35 37 4 0 23 62 37 45 45 48 47 35 59 46 54 81 50 41 47 34 66 82 112 37 33 49 68 32 69 78 37 49 28 89 61 29 30 0 55 48 79 37 31 71 68 61 38 99 87 68 75 50 33 36 99 48 71 55 74 53 73 46 76 69 58 78 79 106 100 105 90 95 81 82 70 101 70 84 83 54 55 59 97 70 77 69 65 106 83 80 66 66 75 102 67 41 33 88 65 88 71 75 49 29 59 58 34 84 95 61 48 67 97 101 82 72 81 100 80 59 70 35 70 99 51 70 79 71 69 88 95 53 48 85 51 100 56 78 82 85 60 54 20 80 54 74 51 76 31 40 72 48 85 75 15 60 55 53 45 14 35 53 32 76 45 36 41 58 75 52 59 38 64 35 60 35 45 30 58 57 66 15 43 68 40 26 66 37 35 36 69 59 32 33 33 36 46 40 27 63 65 44 75 64 68 69 66 55 51 78 62 61 43 46 42 70 13 35 15 66 62 47 52 41 58 66 6 93 86 80 84 73 72 82 97 101 83 100 100 76 63 80 100 95 61 53 107 93 83 103 94 70 50 113 95 99 77 98 69 56 75 48 125 82 30 66 51 74 50 113 69 79 76 62 75 124 54 73 68 74 51 80 51 56 51 60 65 88 83 83 90 76 66 82 71 86 45 92 83 64 97 53 99 80 75 89 88 87 54 57 68 59 62 63 57 67 39 92 50 45 55 55 22 93 54 52 50 0 62 48 36 44 34 19 49 26 39 72 39 48 76 85 35 53 27 52 66 42 93 30 83 69 92 57 50 73 44 46 44 43 60 59 14 32 17 13 55 26 38 14 18 64 44 27 54 46 58 82 29 61 53 79 62 58 38 87 28 64 60 62 54 44 54 53 66 53 73 74 80 84 73 82 81 83 88 95 90 85 80 52 112 103 103 94 97 101 57 63 97 94 73 133 85 111 105 35 127 85 101 83 66 82 56 53 88 46 57 88 79 76 133 63 59 64 49 91 57 53 68 93 100 87 65 78 97 91 101 73 38 93 84 50 59 52 75 51 116 77 57 61 99 73 72 83 92 81 107 106 63 69 37 56 114 71 69 86 60 97 31 50 33 83 75 69 88 64 69 75 28 56 56 36 78 41 52 49 58 59 83 66 69 68 49 58 66 51 54 79 34 72 44 74 86 61 53 23 44 24 27 38 84 28 77 55 76 42 33 77 44 44 46 39 76 33 48 41 52 84 29 52 84 66 59 22 47 52 55 43 73 62 74 45 62 80 74 60 74 28 14 47 43 48 71 91 73 84 53 99 95 73 61 92 83 88 62 99 48 59 84 70 79 106 62 46 75 77 78 46 44 51 51 88 96 81 84 99 83 84 81 104 68 79 71 59 89 93 85 82 80 111 63 77 89 63 85 80 102 83 112 64 63 72 55 117 104 98 71 119 73 97 128 73 113 86 100 67 121 92 93 77 58 63 96 87 58 81 65 33 84 77 86 73 55 75 50 72 108 103 51 38 59 55 20 51 68 74 48 32 35 72 60 64 49 57 90 52 76 84 82 15 90 53 89 70 70 92 88 62 77 30 59 63 89 95 62 90 59 95 41 65 81 79 83 81 30 59 89 31 62 37 56 53 79 35 92 55 72 71 53 70 22 67 36 53 57 13 64 64 93 42 31 41 106 64 48 113 64 41 54 69 63 46 62 73 60 67 90 99 96 91 57 35 38 94 103 79 66 61 104 63 87 89 104 74 87 103 88 80 88 118 76 114 103 115 58 89 61 66 18 94 101 83 50 77 58 59 135 94 39 99 119 138 94 96 56 89 84 76 97 77 73 87 87 42 83 71 119 44 45 55 82 78 86 105 72 96 75 84 82 62 105 58 46 79 80 77 67 68 46 56 24 48 65 71 70 56 37 62 104 66 41 83 92 62 72 43 107 46 44 58 62 3 39 73 69 48 24 67 102 102 45 31 75 46 102 94 45 10 92 81 58 61 61 79 66 64 59 83 82 97 79 60 47 64 76 64 72 70 100 41 56 67 38 31 81 84 84 74 69 61 95 49 85 37 42 65 84 82 29 81 90 60 74 86 65 66 30 48 46 108 74 67 48 75 97 92 105 87 80 79 134 117 119 62 45 90 132 66 125 90 87 91 95 62 110 67 98 74 114 86 99 89 96 84 95 64 94 66 120 84 64 74 115 93 74 68 54 95 60 81 86 113 46 92 89 92 101 67 66 60 51 99 93 51 69 60 78 78 93 89 56 41 68 74 47 123 62 102 81 37 51 72 90 83 56 60 54 93 78 94 66 92 89 78 37 41 25 50 45 53 56 50 65 36 81 71 61 77 71 62 45 42 92 77 64 69 44 34 62 32 4 38 91 73 74 53 74 81 32 50 81 50 36 45 22 52 69 56 57 60 100 70 59 61 63 75 52 71 84 78 72 107 79 26 68 105 26 76 86 76 70 92 83 47 80 32 47 63 46 69 61 26 87 28 51 44 54 44 47 60 58 51 114 79 64 95 87 63 100 90 90 66 72 87 78 50 90 93 114 92 105 80 91 95 66 84 68 81 101 81 53 70 80 139 91 118 140 54 75 68 78 88 66 84 84 80 63 36 91 90 43 67 84 34 94 103 69 85 89 81 55 53 74 103 64 75 66 49 80 77 78 66 95 87 78 87 78 72 86 104 41 78 60 55 116 52 63 80 26 113 92 49 61 68 108 74 59 63 41 25 51 57 75 90 20 89 39 72 20 61 74 57 95 32 31 97 93 76 54 101 57 61 73 62 61 80 35 75 53 41 59 87 68 21 80 95 53 69 53 86 48 52 32 46 73 69 44 72 36 38 76 54 45 78 87 102 77 67 50 110 68 85 79 73 73 45 68 62 64 61 87 61 53 65 46 96 110 68 70 97 85 100 130 49 88 72 53 105 83 86 109 78 109 70 94 108 108 105 86 70 105 64 65 93 74 98 69 58 71 78 47 62 81 94 77 43 71 70 98 83 54 33 75 93 64 52 74 69 50 80 110 97 79 85 104 88 75 100 73 71 50 74 84 83 101 64 79 66 68 75 45 107 82 95 91 72 96 88 71 93 68 86 77 91 66 42 89 80 44 53 82 115 58 70 78 106 81 73 67 74 54 62 30 77 87 60 62 69 44 50 32 70 34 47 101 72 85 50 84 79 64 82 29 69 107 59 50 41 90 68 78 113 87 69 102 72 82 60 71 87 51 83 117 88 46 75 42 91 67 42 38 75 55 63 81 100 72 56 61 87 50 64 29 55 102 88 102 69 57 79 104 65 91 79 52 92 74 99 116 82 81 103 88 72 84 72 100 90 147 83 83 83 72 141 111 82 67 96 66 83 109 78 70 125 100 103 89 86 75 83 98 50 95 115 84 81 64 87 60 89 104 43 61 64 63 79 80 86 87 134 76 76 73 92 122 87 58 84 68 96 63 124 69 91 87 45 56 83 82 90 62 71 106 126 65 100 79 75 76 61 69 46 81 67 59 75 84 74 110 80 69 53 73 81 54 52 46 76 51 40 89 84 77 62 51 63 66 60 81 64 67 74 95 80 28 69 50 54 74 66 98 86 82 55 86 39 25 93 67 78 76 96 57 76 98 50 67 20 53 61 57 70 80 35 95 68 51 64 82 43 52 66 51 79 63 79 91 59 59 86 70 76 82 107 66 58 115 110 66 67 82 63 83 97 90 64 97 84 55 78 72 88 89 65 107 101 94 83 25 38 131 50 107 113 114 122 47 87 69 100 101 65 44 88 78 106 85 46 53 33 34 93 71 60 84 109 75 66 89 73 42 34 56 63 98 69 96 90 77 82 84 74 82 93 86 49 83 67 78 70 124 50 37 51 66 51 84 64 68 31 56 69 105 91 27 57 81 58 48 31 61 116 48 68 81 103 61 65 87 76 79 61 44 115 72 67 80 129 53 80 83 77 91 94 72 74 69 46 86 80 55 77 85 50 67 71 110 53 73 29 65 44 71 71 22 40 62 63 47 30 75 61 52 68 61 38 85 39 49 84 80 31 61 64 94 47 76 63 4 64 47 52 88 81 98 74 74 79 56 88 47 81 37 88 90 71 104 54 10 98 67 89 95 118 99 70 95 107 100 92 82 88 64 67 83 69 130 86 78 96 67 79 105 103 79 110 64 117 88 118 82 96 64 92 47 81 57 76 65 67 115 70 83 107 117 77 106 91 81 68 87 92 85 62 55 103 78 80 62 92 89 88 82 64 71 96 76 34 72 69 86 81 60 74 59 102 83 63 42 66 68 87 16 91 75 58 75 90 65 58 72 36 62 80 73 46 78 53 89 68 90 63 61 41 37 42 65 80 68 37 64 61 49 83 58 62 57 80 70 53 79 77 53 101 49 71 89 50 53 83 59 94 26 51 66 79 3 82 69 71 87 109 95 126 61 90 72 69 76 77 58 94 30 45 77 75 57 82 88 69 88 63 79 49 68 85 68 35 63 93 61 111 74 90 58 86 74 72 31 80 69 65 42 88 131 140 65 79 52 82 80 88 98 109 98 95 90 70 104 92 95 85 107 89 82 110 65 114 100 39 66 118 73 95 103 117 109 78 66 63 84 39 96 69 123 95 73 99 98 99 71 96 97 94 96 106 115 54 107 95 104 67 115 69 66 93 95 35 108 89 117 84 75 130 46 62 23 99 75 76 77 89 70 36 84 70 73 85 44 63 82 67 55 54 122 84 44 66 70 52 78 44 55 43 84 103 66 87 28 110 86 59 85 33 55 66 90 89 67 52 84 49 59 42 106 83 100 66 58 41 63 73 86 45 101 85 47 78 57 83 82 44 87 57 63 83 75 100 97 66 73 43 85 61 57 44 65 65 64 63 85 48 35 97 86 93 58 91 41 78 57 93 84 82 97 43 103 91 93 65 92 106 84 84 92 82 79 65 61 102 88 115 72 96 132 95 117 87 73 85 76 104 91 103 92 70 65 66 73 94 84 87 84 78 67 62 102 90 76 66 82 134 110 62 114 80 54 54 97 103 76 57 86 78 77 87 70 112 61 79 57 67 45 83 59 79 49 61 45 84 103 68 72 87 76 78 66 73 57 82 76 64 70 87 81 106 60 49 50 56 98 60 107 58 90 60 50 42 77 84 37 49 91 55 36 82 73 75 110 35 94 75 24 70 57 68 52 50 98 70 48 122 86 73 52 59 47 94 64 76 36 92 103 101 21 92 35 69 80 77 49 85 95 16 90 40 65 78 79 75 71 45 61 73 49 85 77 55 57 51 112 63 96 91 70 84 86 37 91 77 56 47 85 90 105 97 93 107 71 88 56 111 65 82 99 110 72 121 73 115 95 87 99 102 90 72 47 88 75 75 83 74 108 88 55 60 85 59 98 77 78 132 80 74 49 96 126 110 97 96 132 100 105 86 65 73 59 78 86 90 76 77 78 109 68 54 74 58 84 77 82 105 30 92 109 76 98 77 92 40 83 27 115 84 59 97 44 53 77 95 83 76 32 66 83 92 31 77 43 58 43 57 68 63 65 77 59 72 53 79 51 82 50 32 39 64 57 61 87 37 64 46 77 32 91 61 48 90 55 71 67 43 36 74 71 61 49 55 56 67 54 82 77 75 98 72 87 85 93 46 75 42 72 75 77 72 82 73 80 74 81 89 82 65 39 64 73 61 86 106 64 77 98 76 87 80 114 59 121 88 75 99 84 83 91 69 85 93 84 73 118 91 100 87 81 94 75 90 136 61 74 100 106 92 102 80 90 77 123 107 100 121 97 69 95 75 114 71 65 108 79 76 63 67 97 96 109 99 94 90 107 99 115 82 93 114 76 73 73 70 87 35 79 90 96 86 80 80 79 83 77 91 44 55 76 75 127 98 118 130 97 109 118 73 73 84 33 53 78 84 32 45 73 112 51 37 105 52 75 66 59 71 38 75 71 55 68 89 98 58 83 41 68 49 78 57 58 54 93 70 34 64 42 72 79 100 76 69 108 63 73 54 67 71 36 51 50 78 36 68 23 58 128 64 66 97 65 74 89 63 47 80 73 52 76 80 97 75 104 50 76 84 80 79 36 59 74 94 107 67 60 62 91 63 72 86 71 92 94 86 91 78 60 90 129 116 92 102 67 134 64 90 100 63 105 104 91 128 104 70 87 89 99 97 51 79 66 105 80 59 67 71 66 118 90 60 59 88 91 62 71 83 103 58 78 72 64 93 88 95 47 85 91 50 90 73 89 112 63 80 76 75 79 114 68 126 119 95 122 54 52 135 192 190 185 172 155 147 160 152 168 170 156 135 99 79 58 15 32 60 62 35 45 84 70 76 70 57 65 55 62 69 11 61 16 84 91 60 57 77 64 42 68 38 37 87 33 57 55 67 54 52 58 62 69 42 69 50 84 64 66 83 35 64 55 56 60 73 70 84 63 102 81 84 75 97 63 82 67 70 102 99 73 81 72 60 87 50 4 87 67 74 60 59 92 58 87 137 98 84 62 101 96 60 99 97 96 127 63 57 97 92 78 82 99 83 87 64 80 70 133 98 63 33 60 80 96 84 50 89 122 83 62 91 116 134 87 110 98 97 114 65 130 90 87 63 72 47 98 75 74 72 107 49 96 85 113 90 69 103 97 101 52 94 115 117 89 106 91 89 82 81 108 75 96 182 181 180 244 220 193 150 183 129 147 108 169 135 164 105 121 171 124 72 33 38 46 82 65 57 58 56 65 42 45 72 55 81 67 62 36 69 79 61 39 45 95 86 46 80 91 76 43 59 52 71 51 64 25 16 78 80 69 40 73 75 59 49 38 116 91 51 60 80 52 37 55 54 81 77 71 83 83 81 55 85 82 86 71 113 49 56 100 49 47 83 84 64 101 73 76 84 61 56 124 95 69 70 63 105 69 72 103 111 74 95 79 130 95 88 89 130 102 86 92 66 99 81 76 72 103 65 56 75 64 36 76 47 51 54 79 60 92 101 78 88 48 113 98 95 59 78 88 56 104 104 83 104 80 61 79 27 101 64 58 43 82 8 104 76 93 76 120 111 116 84 95 99 136 194 166 170 150 151 208 187 188 162 149 111 186 166 121 213 191 165 146 142 99 154 104 31 46 62 33 80 52 37 74 38 77 56 45 9 75 66 48 55 54 62 57 81 29 46 52 62 99 88 72 52 36 73 97 53 16 55 63 71 81 47 64 42 83 68 44 69 69 69 53 62 41 88 65 80 37 101 132 56 80 51 73 91 50 102 75 101 50 71 58 87 54 43 102 94 102 97 103 74 110 90 93 141 67 82 65 71 68 103 75 71 86 105 95 59 81 95 75 119 112 53 112 64 60 87 103 83 97 94 106 89 106 48 99 78 82 78 116 109 120 81 74 76 92 58 46 119 92 123 77 76 96 114 123 74 86 105 78 59 52 91 83 69 69 61 55 124 111 142 100 93 109 45 94 92 166 191 159 181 173 203 174 162 194 186 174 125 196 165 183 186 172 205 192 191 156 96 124 143 54 31 62 33 5 82 46 92 66 54 60 52 87 95 32 70 54 90 61 39 55 64 35 58 61 80 95 60 92 89 99 61 49 63 81 89 87 102 55 81 56 68 79 88 115 91 28 82 69 59 57 56 93 127 82 84 104 80 93 82 101 49 77 72 91 89 65 79 63 38 85 80 47 73 84 75 82 64 109 101 53 96 99 77 123 94 94 63 115 75 99 65 121 75 66 70 84 86 95 101 33 98 104 80 91 88 63 58 128 107 81 104 81 103 30 71 105 121 79 106 104 92 67 63 74 126 118 111 77 113 72 83 64 61 75 79 91 108 83 115 65 76 101 112 97 158 93 119 154 114 73 171 174 163 189 189 212 213 183 168 187 177 197 203 163 146 135 132 156 167 153 174 187 149 156 63 46 57 79 30 60 37 48 50 42 60 9 52 77 95 54 60 85 90 71 47 46 69 51 60 59 69 74 62 98 63 58 70 79 54 37 101 34 53 65 60 88 81 71 47 52 48 44 97 34 47 122 39 119 122 35 73 68 69 39 116 75 41 104 122 103 72 62 117 92 78 66 55 55 54 72 108 93 52 95 69 105 111 83 63 89 92 61 100 93 81 100 59 111 67 82 93 79 101 68 74 89 76 87 99 67 114 92 130 96 62 83 120 70 87 77 80 128 116 84 98 121 64 47 63 72 102 107 84 60 66 82 107 94 62 86 70 56 97 60 69 37 92 107 155 138 116 99 130 142 79 107 189 180 162 167 204 222 217 191 185 154 199 190 172 166 160 144 146 136 177 173 173 110 207 173 130 132 75 35 39 104 45 53 68 88 99 81 56 56 44 79 88 52 80 50 48 86 54 68 58 58 42 86 86 45 67 95 41 70 49 102 56 91 58 80 79 72 78 94 80 76 64 112 74 84 62 108 55 73 97 106 93 82 65 124 36 60 55 68 36 106 97 53 58 41 45 106 71 59 70 89 86 84 76 124 22 45 52 103 45 68 69 88 85 54 108 79 108 94 85 57 88 57 75 96 125 91 91 91 108 85 95 79 60 90 89 61 87 128 67 89 70 62 28 98 90 82 127 76 118 114 80 87 91 52 110 88 85 42 84 60 69 75 57 110 73 98 60 104 128 126 136 95 91 37 58 179 170 202 223 167 184 210 185 208 184 221 245 182 207 189 195 167 166 184 164 204 128 171 191 137 148 185 124 86 22 4 48 64 78 74 104 34 59 87 58 56 71 98 61 85 50 84 0 67 58 22 54 57 69 75 66 102 47 107 63 39 47 70 78 88 72 104 100 135 47 128 38 72 58 63 56 77 103 94 109 62 95 61 95 46 63 89 51 65 71 38 82 75 120 82 93 38 87 50 52 97 76 65 93 74 55 84 121 57 111 90 55 77 72 89 93 85 83 87 84 84 95 84 63 125 130 68 78 72 98 111 108 76 87 90 110 107 81 103 64 102 70 89 97 109 82 130 85 82 96 101 80 66 77 105 64 50 92 151 77 111 65 48 104 82 74 92 121 108 132 116 76 67 49 47 118 199 213 195 177 168 197 197 213 151 206 184 203 175 203 169 227 164 194 200 166 169 169 140 176 180 135 142 98 58 66 71 76 46 17 78 81 26 66 71 47 68 58 98 66 93 69 57 40 55 54 47 65 60 83 90 38 37 123 80 115 51 72 92 74 93 80 110 88 64 57 85 61 103 98 77 87 78 61 120 85 109 85 102 70 72 37 99 59 57 59 81 55 27 55 64 105 47 35 82 69 60 56 86 69 58 73 110 96 108 68 81 91 104 95 91 94 127 109 113 67 82 79 63 87 62 99 70 95 92 112 92 65 114 73 49 128 88 75 89 97 68 99 65 140 54 86 86 113 98 114 55 79 69 76 93 52 58 82 96 77 98 58 35 99 54 58 134 100 67 107 68 78 18 53 134 199 192 225 214 208 219 190 169 212 167 206 179 211 207 219 161 166 193 149 210 174 186 192 173 143 114 186 174 123 89 24 26 12 23 11 66 58 79 59 80 101 84 26 79 110 60 48 52 96 70 96 63 90 76 85 66 38 61 93 75 101 84 87 90 106 69 66 49 59 80 96 77 80 96 134 48 85 91 105 115 95 98 62 44 78 61 63 28 45 95 72 36 105 97 84 34 60 99 98 63 112 60 79 53 138 66 86 105 112 80 110 63 62 109 75 86 90 94 72 94 136 76 94 115 100 122 98 86 81 101 59 65 73 105 100 100 49 101 140 125 111 120 88 77 77 76 105 98 124 75 83 86 118 72 60 46 77 83 98 68 77 87 62 99 70 59 90 95 73 88 62 47 77 42 58 131 166 186 234 203 185 206 223 185 165 144 169 186 156 149 161 210 165 172 173 128 172 165 171 170 149 145 98 137 151 156 55 47 0 69 65 11 62 26 78 79 32 111 97 61 70 84 41 46 37 79 84 94 61 29 91 66 72 82 54 50 55 66 61 57 57 74 52 52 67 66 92 40 60 131 47 95 29 63 68 133 74 90 102 52 43 56 94 94 88 37 89 42 55 71 90 97 81 35 66 40 94 36 40 73 69 110 71 110 76 85 132 102 74 87 81 30 93 82 75 90 114 79 110 127 78 71 89 87 95 99 94 82 99 91 72 95 107 84 81 106 96 86 84 84 99 77 108 87 93 65 74 74 86 119 64 59 63 128 111 80 102 118 102 95 78 67 63 99 102 73 40 69 19 62 37 149 185 216 175 196 206 179 193 182 190 188 180 136 160 203 180 129 159 105 147 98 50 91 117 140 144 127 138 175 88 80 132 135 91 36 28 64 12 27 58 75 83 71 67 59 49 52 73 58 111 85 75 56 58 64 67 72 44 114 45 133 91 36 66 64 76 84 64 76 66 121 108 126 90 92 74 75 60 26 111 79 45 85 131 42 111 131 103 74 79 71 35 72 30 66 66 59 59 122 72 86 32 57 70 45 25 39 51 37 79 76 44 73 123 56 80 94 62 75 102 95 48 58 81 77 73 88 110 62 79 61 98 107 81 140 108 93 85 139 107 90 66 86 81 72 113 55 111 116 70 117 128 72 105 73 92 73 89 96 38 99 105 56 72 38 90 63 108 98 48 41 55 8 0 54 9 155 178 224 162 199 202 209 171 185 209 156 158 160 140 163 175 140 132 163 144 98 62 49 0 14 95 69 148 156 121 113 38 93 116 110 30 21 88 13 48 0 3 37 43 102 57 50 75 74 32 44 91 79 108 84 67 66 68 66 56 51 48 82 63 67 68 67 63 51 80 87 106 91 54 126 138 77 81 60 121 107 46 47 111 96 91 78 63 14 32 0 4 92 56 58 134 45 75 58 77 51 36 38 23 19 45 31 42 72 42 82 85 101 70 86 92 90 59 73 106 84 79 107 88 83 78 59 77 55 100 102 107 99 63 96 96 113 90 128 99 137 72 83 79 66 58 69 108 94 66 68 80 90 89 70 97 58 88 110 76 57 80 95 51 115 66 87 86 48 73 56 82 22 56 32 27 115 199 187 206 215 207 182 142 167 183 166 163 167 125 123 123 113 131 86 97 70 27 3 47 56 40 27 16 86 149 105 107 65 85 94 64 116 45 62 22 25 7 23 23 27 34 95 73 73 68 74 56 83 62 116 67 74 20 40 87 66 58 92 99 61 34 92 51 84 52 74 44 129 52 108 26 102 81 125 31 106 75 85 28 86 58 54 32 25 13 32 30 0 26 46 57 74 30 56 72 56 81 76 8 43 37 36 13 9 64 61 71 70 23 60 60 101 89 89 87 77 63 71 68 60 129 102 125 69 74 91 106 76 99 91 61 107 59 95 121 81 98 89 62 101 93 86 93 67 51 37 81 149 126 113 53 74 87 83 79 91 107 33 88 49 100 96 118 25 47 44 42 59 19 54 38 118 195 173 186 204 181 203 192 148 157 193 165 148 138 160 107 84 75 82 81 84 88 33 21 75 44 50 28 33 0 128 171 126 60 20 71 127 127 31 90 63 11 21 20 0 34 0 32 83 47 29 49 66 89 99 78 58 49 36 59 90 98 64 66 105 76 92 55 51 54 74 75 77 65 127 50 103 84 32 13 72 47 0 85 79 39 44 47 48 36 26 35 25 15 0 22 32 0 18 51 61 63 72 55 11 47 26 29 65 60 15 65 43 99 69 103 57 67 89 82 71 37 85 106 87 102 70 79 86 113 68 119 60 70 91 93 87 110 123 90 64 32 120 89 92 79 97 131 74 96 76 131 96 90 109 101 60 81 75 85 101 35 29 118 67 53 60 92 36 19 44 35 43 21 55 45 59 175 195 212 181 164 144 175 170 167 142 137 143 182 137 125 79 53 95 97 3 19 1 63 52 68 49 45 30 23 1 15 163 166 92 0 43 57 91 91 56 78 32 0 13 50 64 40 28 26 91 71 75 72 54 95 56 88 78 70 81 54 32 72 77 63 63 66 93 79 90 82 119 93 73 68 107 57 63 28 83 28 45 79 0 55 59 68 29 58 0 43 29 9 54 31 109 27 60 61 43 40 30 57 35 34 28 9 0 54 54 62 5 44 55 82 77 81 53 85 53 96 89 31 50 111 96 96 76 114 128 129 61 128 104 111 89 105 96 108 72 70 75 109 75 148 79 88 88 110 83 85 71 104 85 101 102 73 101 93 62 67 88 82 135 96 102 61 39 50 37 27 53 60 64 25 40 178 199 212 192 217 191 198 181 173 163 104 88 134 75 85 83 88 57 87 99 4 54 38 50 33 53 34 56 21 0 35 11 82 154 81 32 4 103 91 68 42 78 26 66 3 12 0 25 15 23 27 66 48 89 62 54 99 67 59 30 118 52 56 53 67 19 63 100 106 70 57 60 125 97 145 46 94 38 59 46 17 62 41 32 25 74 107 85 50 43 63 0 43 29 37 29 42 69 85 84 74 88 54 20 51 47 77 12 8 30 40 0 19 61 94 97 80 62 87 84 107 112 94 80 65 93 123 94 97 67 119 106 65 36 102 96 94 112 101 76 87 91 110 89 61 102 86 54 112 101 94 81 98 119 52 100 96 80 94 73 71 101 45 101 64 86 105 44 18 49 34 32 45 61 59 88 131 218 200 199 230 217 209 164 159 126 124 115 72 60 68 73 102 81 56 77 38 36 38 42 43 35 17 23 19 34 15 48 72 55 58 97 107 18 58 90 81 18 0 60 22 20 2 54 53 65 47 27 0 63 58 59 78 55 66 83 55 78 32 82 62 44 89 96 67 58 91 52 81 73 72 83 64 79 51 0 31 44 58 58 71 84 51 87 69 35 53 74 77 16 33 17 48 25 29 17 36 40 41 41 76 49 61 26 20 53 12 57 64 63 60 99 72 99 42 107 108 111 78 58 84 77 104 81 92 90 67 61 68 61 68 63 106 98 118 104 75 85 89 109 134 53 69 117 126 121 108 86 121 98 78 72 76 81 62 103 74 93 48 90 92 99 70 69 49 59 35 78 35 81 51 25 31 165 195 255 177 176 185 160 157 156 113 117 88 100 73 53 62 37 39 80 29 28 32 39 26 32 25 40 3 52 12 39 38 37 34 22 33 0 28 44 80 17 80 38 45 30 40 30 9 0 0 31 11 54 29 53 73 65 61 72 58 70 69 36 55 76 74 109 77 102 82 105 74 118 91 79 49 11 59 44 41 51 90 126 63 145 85 68 88 21 60 39 60 35 35 29 42 34 66 29 67 15 11 32 17 20 67 97 41 30 37 15 23 27 56 48 37 58 39 45 57 116 85 90 103 77 88 72 62 78 80 84 66 101 65 96 112 83 122 107 129 81 67 116 71 126 96 57 94 75 109 85 87 60 96 66 101 128 79 89 110 68 103 95 87 101 46 65 22 55 54 46 38 59 47 4 22 160 196 212 187 176 189 149 189 169 145 130 69 65 40 51 35 2 9 24 0 6 34 15 32 40 37 47 44 0 17 27 54 10 24 37 61 43 0 41 0 8 55 44 21 36 22 47 7 37 16 57 42 35 52 16 37 79 57 60 29 94 110 83 79 53 99 77 66 119 94 107 37 87 109 44 87 68 61 33 51 68 50 126 117 48 62 108 75 87 92 86 87 29 41 48 106 61 62 34 42 43 48 30 39 46 46 129 0 22 45 0 35 28 38 60 0 52 56 23 67 67 79 89 90 87 85 87 56 50 95 71 97 35 105 100 84 81 87 100 79 65 102 123 117 104 97 120 87 85 60 116 122 81 94 109 96 75 97 70 42 55 104 104 135 102 93 113 112 25 47 23 31 57 28 0 7 42 192 198 234 204 191 179 147 127 163 118 144 71 51 65 0 24 22 36 14 6 0 38 16 53 37 15 20 18 23 18 80 23 25 32 37 27 34 16 67 5 21 0 41 35 24 23 35 16 20 11 48 20 31 66 0 77 48 85 90 72 61 59 77 101 56 81 67 25 125 80 108 71 90 117 32 71 22 9 62 11 33 77 68 92 111 94 84 96 87 96 49 78 53 73 68 84 84 66 29 2 39 65 57 49 30 54 5 40 16 19 25 13 0 0 23 87 0 76 49 38 74 72 74 103 104 90 64 66 71 50 69 97 99 103 102 69 62 102 105 98 90 53 110 157 91 82 89 72 92 72 98 83 90 103 107 95 109 123 66 78 114 92 73 85 89 72 68 109 53 62 72 59 42 43 39 61 183 220 174 201 204 189 167 170 137 115 151 118 68 53 44 51 41 20 31 39 0 16 40 32 60 18 5 27 40 29 79 3 32 68 34 26 53 24 44 11 40 41 40 55 41 54 28 64 22 0 0 46 64 35 36 54 63 56 22 76 48 70 101 82 70 87 50 59 86 98 90 107 65 86 97 61 25 44 0 44 64 109 121 107 40 92 92 87 113 53 59 58 51 40 71 67 46 66 88 110 82 24 52 51 39 14 31 0 13 24 21 12 0 14 33 5 23 40 29 16 68 56 74 54 74 61 113 66 91 49 67 120 105 94 129 67 93 60 105 71 99 92 76 78 96 87 82 91 82 82 86 119 66 71 110 41 104 107 68 86 86 58 88 60 86 100 95 77 69 38 59 41 53 44 66 0 124 217 186 198 243 202 181 199 149 159 159 66 76 115 50 48 56 26 0 2 27 52 53 26 32 22 37 5 25 55 25 84 2 26 48 11 39 27 41 56 42 5 25 25 47 12 10 31 32 45 25 37 16 25 14 42 31 24 40 70 61 35 115 75 96 74 71 73 85 57 89 68 121 109 36 5 59 28 0 35 48 60 107 86 75 89 104 77 74 76 75 74 118 60 74 66 79 67 97 90 98 83 97 45 42 46 13 20 37 38 43 0 5 29 0 35 14 30 31 52 45 2 53 63 35 80 80 89 82 76 70 92 71 79 72 78 59 99 77 92 124 34 53 98 76 121 101 126 88 102 84 65 108 110 75 84 74 106 98 128 87 97 67 103 102 87 97 90 73 45 60 86 20 63 47 27 76 173 175 192 210 211 193 156 182 152 157 134 124 74 38 55 34 18 20 34 14 4 7 10 40 35 43 10 26 0 25 34 11 48 0 25 84 34 5 30 59 25 0 16 50 38 14 0 38 50 71 13 31 84 21 66 53 46 48 46 51 28 59 58 99 84 94 81 72 60 118 60 88 104 66 68 51 16 0 50 60 62 86 77 62 57 34 87 89 80 113 119 101 117 117 65 131 82 99 73 101 116 85 93 73 41 48 7 59 24 19 36 11 9 30 0 8 25 1 0 20 0 19 67 15 103 104 130 83 91 52 117 98 77 60 82 83 89 93 94 77 63 79 85 122 84 120 112 91 95 116 92 71 42 102 64 92 117 101 115 89 131 67 118 111 86 58 132 85 78 56 86 27 49 50 57 65 169 209 208 209 192 160 219 178 172 172 159 164 82 85 0 58 10 41 11 17 72 35 51 9 20 26 6 11 29 37 46 49 55 46 39 22 12 16 9 10 8 27 0 24 26 0 63 38 55 26 24 16 0 42 49 33 50 33 32 31 11 49 41 90 55 29 79 105 46 81 107 117 45 82 0 68 44 35 18 33 69 64 43 60 63 32 143 106 128 128 159 95 146 118 143 164 99 146 117 104 132 101 43 99 88 31 23 56 0 39 55 18 0 1 6 0 14 0 56 11 6 46 44 23 84 59 42 43 61 104 78 78 90 111 73 120 100 68 96 149 69 99 105 91 97 83 102 63 83 107 112 109 120 98 47 117 85 93 125 72 119 115 84 116 88 112 77 102 94 142 87 34 73 39 57 10 172 200 179 189 215 201 197 180 165 134 163 164 145 83 93 43 59 0 27 56 58 44 37 35 9 4 19 7 45 38 23 0 56 32 6 66 0 49 31 16 17 21 56 0 0 0 13 14 18 16 18 20 45 4 13 48 35 56 49 34 25 31 59 55 70 52 53 78 49 96 84 91 107 42 68 35 41 27 0 15 74 104 43 65 47 69 115 131 191 224 158 239 175 158 182 137 135 111 156 130 110 122 63 91 105 67 93 68 45 7 30 19 2 34 0 0 39 13 1 24 0 0 64 1 50 39 39 87 39 96 58 46 57 82 79 82 65 112 117 106 95 51 109 86 60 90 94 138 86 83 70 119 48 83 85 89 98 116 110 128 73 106 81 67 121 94 52 92 90 113 107 64 76 37 41 40 145 179 225 156 203 143 201 191 201 173 143 120 125 75 89 68 22 34 7 34 56 35 26 35 4 30 35 30 22 9 39 6 56 0 51 44 29 39 3 15 44 47 38 22 8 31 72 19 13 42 21 55 46 43 35 43 18 47 42 66 28 36 22 44 61 45 52 8 71 80 59 84 72 82 51 6 20 55 19 43 12 97 92 73 63 93 140 160 197 198 175 182 184 211 176 171 179 221 175 158 194 181 113 101 110 89 77 80 63 75 69 37 54 32 20 25 44 0 21 0 44 0 14 0 59 40 37 104 46 126 107 75 74 116 69 53 106 56 27 78 101 77 122 97 60 51 99 75 72 107 118 86 96 71 74 110 80 94 83 103 122 82 112 82 104 105 87 115 55 81 136 110 27 35 73 16 115 200 187 196 201 158 196 184 158 151 187 137 114 139 84 65 81 37 17 19 5 51 19 74 17 67 37 34 43 0 32 10 37 25 51 63 39 23 38 21 4 36 31 55 15 14 44 25 24 13 16 22 19 0 44 49 23 26 41 19 0 84 7 53 32 51 52 49 50 32 63 89 94 103 71 75 48 21 31 10 26 66 77 41 62 55 155 160 149 210 200 203 194 198 195 190 177 191 187 184 209 185 137 156 88 128 86 66 80 67 48 35 43 61 94 75 41 0 9 32 26 37 2 4 20 41 9 36 66 66 72 62 92 91 69 106 95 120 81 94 84 107 120 49 60 113 92 106 69 89 78 107 64 92 123 97 101 80 75 79 92 93 86 102 115 98 75 92 38 69 89 127 10 70 99 59 29 180 183 185 197 182 188 204 172 201 172 131 179 133 94 82 75 41 59 0 41 38 0 31 53 20 51 48 64 23 16 4 19 24 45 47 21 1 31 47 4 19 0 6 17 38 7 26 5 17 39 0 36 21 54 77 26 2 37 62 35 46 38 46 46 22 29 39 68 30 72 80 77 71 71 106 80 69 60 4 68 39 28 45 42 66 140 146 201 160 188 209 221 169 214 201 230 219 158 222 158 183 145 128 122 132 136 120 47 65 41 39 43 13 32 23 46 4 12 17 33 26 8 8 0 24 0 5 40 66 29 91 43 70 79 82 70 81 81 83 84 105 88 110 24 92 46 95 60 87 98 96 129 71 66 89 111 60 70 95 88 138 91 132 98 114 42 104 89 89 79 115 114 79 38 91 17 139 171 183 174 234 199 175 155 195 174 168 176 173 152 94 45 76 67 57 39 23 34 23 57 15 20 62 34 28 16 11 24 50 13 34 47 80 14 70 55 8 68 26 7 5 14 37 10 14 42 29 52 49 24 34 31 35 47 12 37 38 14 14 14 35 51 20 76 27 91 90 83 51 47 59 112 76 40 74 15 88 110 16 76 32 105 116 152 168 169 181 230 219 185 197 191 239 181 176 208 145 140 131 164 131 130 111 89 118 36 97 116 59 0 20 37 12 20 21 12 8 33 1 0 12 13 0 29 51 101 66 45 94 50 103 85 104 88 70 78 64 66 67 109 85 67 60 78 61 109 125 83 107 91 113 130 114 101 92 137 99 105 82 60 119 99 76 80 82 80 90 114 132 64 81 76 107 175 164 212 217 215 210 234 178 161 169 175 146 111 110 94 95 70 58 33 54 91 26 57 45 37 52 27 33 24 41 20 39 10 23 0 22 32 8 22 33 41 25 51 30 8 20 67 4 16 29 0 30 14 26 28 40 42 58 43 32 18 49 17 55 11 34 26 48 27 62 33 80 64 70 92 97 87 63 46 42 74 85 63 38 30 162 142 160 213 175 206 203 203 190 241 202 218 198 188 209 195 196 193 188 137 217 82 81 122 96 77 117 97 16 38 33 44 25 0 20 0 0 0 0 0 0 10 46 23 59 55 82 107 65 74 55 43 65 103 66 104 75 84 57 88 90 121 87 76 120 88 86 79 101 83 81 87 87 72 106 140 100 105 106 117 63 89 85 102 99 109 135 96 34 65 95 175 153 187 193 240 206 227 190 205 151 202 149 149 126 102 73 69 80 58 46 42 19 48 50 24 53 69 33 15 54 79 20 22 48 16 3 24 31 0 1 36 47 41 5 8 20 0 39 0 38 51 8 3 41 31 3 3 40 65 51 19 30 29 20 57 23 34 51 50 49 55 71 79 103 62 63 110 70 75 89 0 11 52 91 35 80 150 164 184 176 201 171 172 227 197 170 209 161 224 211 203 214 189 183 166 208 183 135 106 87 74 84 117 112 71 39 63 0 39 18 21 0 21 33 0 16 11 0 15 0 11 20 74 41 80 75 56 89 99 112 41 66 92 93 120 103 54 108 72 88 97 65 100 79 93 120 100 102 128 121 89 113 119 124 72 88 84 104 55 77 115 109 136 97 48 29 147 151 180 217 181 207 252 180 171 166 186 193 189 146 159 68 63 68 47 26 8 49 36 17 14 33 6 77 23 45 49 8 15 0 15 53 56 38 37 23 30 55 41 37 8 41 24 3 44 19 31 0 32 38 10 61 24 27 55 57 54 83 5 39 35 25 30 0 37 18 26 43 57 60 45 92 57 76 76 43 65 12 51 30 12 24 117 140 221 215 167 208 164 236 212 221 178 185 203 203 201 215 209 201 173 156 155 177 158 112 103 58 74 97 109 82 49 34 52 51 24 18 45 30 8 12 26 18 36 0 46 50 66 29 47 82 69 54 57 109 59 63 83 103 108 88 65 95 56 78 63 97 121 107 129 98 76 75 101 63 126 47 105 97 120 101 79 69 64 103 108 78 148 119 112 35 107 136 194 145 177 211 194 185 180 229 205 150 181 177 116 128 83 55 73 39 33 47 42 0 6 46 32 51 35 22 22 32 35 26 59 26 33 22 55 12 4 29 28 13 52 26 17 8 31 8 28 18 24 3 42 40 16 39 50 54 18 18 19 36 21 13 53 43 1 31 56 15 68 29 53 20 41 78 99 85 79 48 0 15 27 23 87 144 159 200 184 235 238 233 182 194 213 180 173 189 213 225 177 218 198 207 182 168 156 141 156 97 104 70 21 59 28 40 1 21 0 9 8 23 39 35 0 52 51 13 9 31 24 27 55 89 103 72 105 85 43 87 71 45 112 54 80 72 94 114 23 84 69 103 135 108 89 85 84 112 52 78 83 102 99 100 80 74 99 95 74 91 91 110 153 99 100 177 155 183 233 189 179 164 175 188 174 150 180 179 130 137 134 89 95 47 68 35 19 10 29 20 58 42 4 36 52 35 63 56 19 55 0 36 33 0 60 29 35 9 14 3 14 59 0 23 0 43 66 6 24 48 64 34 50 37 40 24 13 45 16 62 12 52 54 39 40 39 0 24 40 0 40 43 77 104 116 62 42 0 30 1 25 93 203 178 166 171 170 226 182 187 192 182 201 164 225 208 190 178 208 177 187 198 187 178 144 129 134 125 78 56 20 5 6 45 27 73 0 0 25 7 0 41 24 30 41 0 0 35 82 81 23 50 60 105 85 57 70 117 103 116 91 105 61 64 103 120 93 61 97 121 111 81 111 102 69 51 75 112 108 81 98 105 79 82 95 138 148 113 132 135 104 104 145 211 187 225 255 170 168 197 191 207 176 173 188 141 110 154 101 109 75 28 27 36 63 8 45 59 34 49 27 53 21 41 40 29 45 15 25 57 43 3 42 38 44 58 37 0 2 39 39 11 0 42 23 0 5 45 44 26 17 43 32 26 41 27 28 37 29 57 73 36 21 36 63 30 0 23 12 38 111 72 34 52 0 22 52 23 143 206 162 102 91 101 71 134 197 198 193 193 207 194 208 202 186 188 199 202 185 179 201 135 156 109 102 63 69 41 24 16 46 40 8 33 56 0 0 44 11 27 12 23 38 26 26 70 55 70 82 95 78 83 85 82 80 109 76 94 113 94 106 92 92 78 88 116 98 84 100 83 98 102 62 105 77 125 98 63 78 142 111 82 117 133 158 121 116 129 200 193 208 222 206 229 232 203 194 187 181 160 145 137 141 154 64 88 58 45 0 66 55 39 40 9 22 73 37 39 56 48 0 50 3 40 40 30 65 0 44 34 27 1 49 68 8 54 50 11 34 4 0 7 66 39 3 44 45 46 39 17 4 11 42 40 18 0 33 41 26 34 53 24 52 4 36 46 67 90 65 59 53 56 84 11 9 180 190 129 185 138 96 113 91 146 181 181 165 204 200 196 199 174 194 196 194 221 182 190 91 139 127 97 69 99 31 32 70 68 4 37 30 2 0 30 10 0 14 0 33 0 38 33 47 72 52 72 103 41 59 69 78 97 77 103 99 120 54 123 83 77 84 99 102 66 67 103 88 90 91 79 95 107 77 84 117 105 88 136 115 111 97 111 125 121 169 208 227 148 146 194 243 171 154 158 193 163 181 173 158 134 121 106 77 89 34 32 34 31 12 7 16 51 30 36 27 7 3 23 29 33 48 32 48 50 24 44 5 10 33 61 47 1 0 64 31 0 43 33 49 46 44 22 28 34 0 13 25 0 45 96 41 57 57 31 40 22 31 90 69 19 34 49 30 23 70 60 50 7 53 28 0 63 161 117 144 181 195 123 70 107 77 124 183 167 169 216 223 168 232 195 206 182 169 178 202 136 97 110 58 107 80 45 36 49 23 40 13 33 42 33 51 37 15 10 0 20 52 25 35 30 64 91 62 55 77 67 96 93 114 120 112 109 127 82 78 79 80 77 94 139 93 61 121 76 79 126 77 107 106 84 107 122 76 112 88 118 134 81 147 126 111 177 167 197 214 175 231 216 227 208 214 164 187 157 155 162 134 133 103 48 47 45 45 19 71 67 24 45 25 33 46 0 25 46 52 1 49 44 13 32 21 21 56 59 51 17 13 10 25 13 40 14 3 19 27 46 27 55 25 52 31 22 12 28 64 20 58 61 69 34 58 38 23 31 50 27 61 35 27 34 26 77 94 60 52 7 32 5 88 128 135 109 30 6 66 64 57 77 111 153 152 168 183 196 187 219 176 234 168 180 215 200 146 104 133 97 113 59 54 31 41 8 41 22 19 14 6 32 56 54 64 18 43 41 46 11 63 92 96 120 88 72 33 80 22 88 96 71 97 70 109 57 86 91 71 114 106 89 88 84 79 98 87 143 131 89 116 106 95 100 118 140 96 115 110 96 139 163 189 200 173 170 210 202 215 202 189 149 191 175 183 146 107 172 154 90 76 48 19 55 48 74 58 39 0 41 42 27 30 53 0 72 10 49 31 41 2 35 46 8 4 8 40 1 0 7 10 26 10 8 13 33 24 7 16 41 53 17 4 56 56 34 26 12 21 26 21 18 27 39 71 43 73 41 24 43 54 8 35 101 71 84 75 20 32 100 134 96 147 46 0 3 30 55 44 124 161 133 164 185 177 196 145 162 116 136 132 124 175 160 141 125 79 101 91 25 45 0 8 9 30 0 3 0 31 34 30 20 0 20 0 24 41 31 88 51 46 75 32 52 43 114 82 59 116 97 88 83 99 107 92 64 72 84 112 73 117 78 117 113 60 93 99 147 101 93 111 96 131 167 98 109 153 150 189 177 176 163 208 204 207 159 199 241 212 143 186 148 140 147 112 93 69 97 12 48 30 37 9 33 29 31 37 54 50 20 0 20 44 18 33 67 25 42 17 19 0 23 56 12 39 32 50 64 32 42 30 11 9 0 26 41 0 54 43 20 41 36 17 11 23 14 53 53 44 25 21 40 33 61 35 47 8 42 30 53 89 61 24 53 19 40 164 173 136 159 28 43 49 85 18 67 116 181 193 189 147 156 139 85 53 74 41 52 50 91 139 141 102 113 84 39 56 40 28 26 41 11 0 0 23 56 0 0 21 12 24 36 43 26 48 37 41 31 82 55 62 84 96 71 108 81 87 96 126 95 105 49 86 93 73 91 113 103 102 88 78 85 116 82 93 129 128 84 109 132 133 118 187 127 141 159 171 193 148 199 203 207 213 202 210 173 168 197 156 164 149 131 128 100 65 48 35 55 35 45 6 72 75 52 18 41 0 61 24 51 40 37 41 44 55 38 30 40 6 35 38 0 78 31 24 28 42 44 20 40 10 21 44 7 69 18 13 34 64 13 71 64 0 38 53 11 21 46 52 64 12 25 39 0 21 61 84 36 43 25 32 31 34 167 221 183 199 176 91 93 46 33 100 191 200 191 180 172 102 76 66 11 25 54 46 99 78 89 107 87 19 72 70 24 61 17 7 24 8 21 0 5 12 0 1 27 2 24 52 26 5 61 33 43 66 33 92 61 107 65 120 63 106 70 119 67 91 76 73 75 65 108 116 101 106 113 83 114 87 102 152 113 112 105 123 113 114 134 126 131 144 135 218 180 182 194 212 193 220 214 220 206 185 155 189 154 164 152 85 99 116 57 58 43 80 19 26 5 18 72 58 9 45 22 15 46 6 43 21 43 18 17 12 27 48 23 9 28 17 21 1 17 11 17 29 0 21 47 24 48 11 35 42 31 45 89 26 21 15 47 24 75 17 26 75 75 30 42 56 59 20 23 33 59 29 10 23 0 47 69 205 173 135 167 129 161 80 82 91 181 160 213 224 187 104 60 78 34 76 152 165 79 46 78 96 46 60 77 105 38 29 41 90 22 23 25 43 29 42 23 38 43 52 16 0 7 0 36 69 25 53 38 52 98 72 62 78 104 104 97 82 79 81 72 80 62 104 107 127 87 82 92 51 73 110 113 100 99 98 95 120 106 130 103 149 128 162 140 176 223 215 241 193 239 221 178 197 222 219 203 201 148 142 179 116 112 100 70 82 91 26 43 29 65 62 66 42 69 15 51 23 50 45 42 70 60 48 0 29 12 52 24 0 34 56 57 22 36 30 33 41 24 22 30 46 0 33 31 47 5 38 0 27 0 0 2 40 21 52 25 54 7 12 33 30 14 33 23 15 10 98 65 6 29 21 52 122 175 215 216 145 178 183 148 169 180 205 190 209 237 201 71 65 44 62 20 2 6 75 42 31 66 58 32 68 21 100 74 52 45 98 28 27 4 4 33 31 19 45 0 0 36 3 25 36 36 79 63 38 71 74 65 99 73 65 108 79 101 65 107 96 87 125 90 102 137 115 92 126 119 109 75 81 74 90 89 89 121 123 143 176 146 120 116 92 215 175 197 179 202 255 195 228 204 188 206 182 156 109 156 160 138 137 56 104 58 82 66 50 29 32 76 36 46 49 39 42 82 67 43 23 33 48 49 40 47 6 31 16 8 57 2 56 16 55 19 4 37 16 14 10 7 19 43 17 39 21 20 26 23 4 11 11 56 47 19 20 24 14 20 22 59 18 43 23 6 55 16 24 60 46 57 9 144 171 173 173 200 238 204 171 202 171 201 171 208 170 130 80 56 71 76 33 0 0 35 12 12 41 46 32 36 75 44 66 39 0 25 44 1 8 19 11 10 9 18 19 0 14 35 0 54 41 67 72 78 82 102 72 84 91 79 97 84 98 112 65 118 55 87 107 109 122 95 80 107 103 76 76 78 77 105 121 76 29 109 132 137 118 113 134 154 163 176 207 241 197 172 199 184 235 167 198 165 179 174 171 127 134 134 128 92 64 60 35 57 9 40 57 14 13 39 13 100 20 29 19 48 32 38 39 16 40 34 15 53 33 33 40 47 8 25 48 5 0 31 24 42 38 53 55 6 0 40 29 5 45 34 31 5 41 56 0 17 4 54 16 35 84 50 0 48 8 55 33 11 85 19 34 7 204 170 191 211 166 168 190 200 207 205 217 214 139 146 48 92 63 72 99 58 15 21 44 50 24 0 50 65 50 32 59 43 32 9 0 17 53 16 15 6 0 33 40 34 48 2 45 0 21 64 101 74 53 83 112 126 86 108 95 52 72 78 72 79 39 111 71 61 113 106 95 133 95 69 102 103 97 81 83 99 104 144 122 134 131 143 139 153 192 218 182 235 210 237 197 229 166 228 182 198 187 179 176 120 112 119 107 93 138 99 40 50 36 81 39 27 7 33 39 0 9 18 26 26 36 31 11 3 56 42 28 22 28 22 0 43 1 38 29 62 31 37 40 21 45 39 14 27 78 58 21 16 12 41 27 38 36 7 10 35 43 58 71 36 47 36 53 10 11 59 46 31 16 51 62 14 48 195 199 174 196 190 191 183 193 176 144 188 153 183 144 131 111 96 129 114 72 74 104 69 27 42 0 29 60 47 41 36 45 25 51 36 55 2 12 27 35 7 53 32 2 7 0 4 55 38 66 49 100 80 111 87 117 102 95 106 81 119 72 91 57 82 106 82 75 91 85 106 122 104 92 114 98 100 76 127 122 134 121 147 111 161 145 139 146 159 205 193 213 210 223 169 170 194 207 202 187 157 141 153 154 114 145 129 91 65 69 56 51 69 69 21 50 75 54 48 60 29 44 38 27 0 42 0 14 4 9 63 22 36 19 37 45 83 42 0 12 38 23 71 60 25 34 61 2 33 43 48 69 43 21 29 42 54 37 29 16 26 60 26 63 29 49 30 38 66 28 26 60 23 35 40 44 35 192 179 170 183 246 203 167 193 161 199 143 176 170 119 70 127 119 151 150 94 96 61 87 47 51 52 50 62 54 50 39 29 0 55 16 0 17 11 26 19 35 0 31 0 7 25 34 65 76 70 70 99 79 90 94 97 75 77 133 103 109 76 92 97 90 92 85 84 128 127 84 81 114 108 118 95 80 99 141 76 129 175 109 128 234 127 159 122 165 176 174 212 210 202 207 198 165 225 195 187 162 170 151 142 88 152 93 111 84 74 90 91 51 25 50 25 3 87 2 38 33 49 60 37 50 29 30 42 41 24 31 27 67 34 32 45 57 4 28 46 51 20 16 7 7 52 43 38 6 33 1 42 36 9 28 12 25 24 55 31 43 28 91 53 0 63 36 36 0 33 51 27 47 41 64 9 59 151 179 197 168 206 135 192 149 182 156 168 149 168 60 90 100 164 188 169 198 174 147 122 141 84 35 104 17 78 23 52 27 8 44 14 47 10 41 37 5 13 33 57 36 41 0 0 34 61 72 103 79 115 96 118 127 114 59 103 85 80 99 130 89 111 92 94 92 95 105 80 108 117 137 99 116 122 132 105 111 133 91 152 148 139 150 163 132 194 192 252 220 163 229 186 198 152 163 194 194 130 171 150 133 133 150 128 134 68 66 27 59 48 50 6 46 0 44 20 46 21 59 58 17 47 47 16 29 31 34 54 79 46 64 0 12 8 30 38 17 19 28 24 22 37 3 64 10 0 46 0 5 34 34 47 26 30 6 3 46 33 10 27 41 30 27 38 32 15 34 26 3 35 46 4 6 55 157 153 125 176 179 167 131 181 168 178 197 203 129 91 171 167 221 202 162 174 157 160 164 104 97 90 35 14 28 13 38 26 18 25 47 16 19 29 51 0 29 0 26 26 12 9 0 34 60 106 94 106 74 47 125 104 115 118 96 102 99 91 93 67 98 87 131 105 66 113 103 92 123 101 79 127 116 77 127 76 111 130 112 125 171 160 181 99 165 211 202 240 182 187 193 160 193 173 203 176 155 108 122 157 111 103 89 112 70 63 99 59 25 68 48 37 31 43 64 44 27 21 46 32 29 30 44 28 39 42 22 58 60 19 30 59 37 41 19 59 43 49 41 5 30 11 30 37 19 54 15 43 71 23 45 50 35 58 22 59 42 48 31 53 6 0 65 8 53 46 39 8 2 56 2 82 112 128 141 134 159 175 159 158 154 165 186 169 179 93 57 112 143 214 157 164 186 142 158 145 151 104 63 65 58 51 57 18 35 10 28 20 19 0 25 20 7 6 24 0 45 27 11 25 15 50 37 94 110 110 106 83 77 91 103 124 152 70 97 104 84 97 109 74 98 88 104 123 130 99 93 105 110 112 92 73 98 157 125 110 152 127 164 128 135 185 194 204 223 187 225 195 203 172 217 192 191 154 159 112 159 119 93 103 93 87 103 95 69 33 59 54 28 50 29 24 39 26 51 52 34 52 73 11 34 39 36 66 37 79 34 28 45 32 52 57 41 87 115 69 30 35 47 14 10 69 47 39 22 49 11 44 95 41 17 33 42 29 53 28 18 29 22 80 53 27 54 13 20 26 22 33 2 120 165 190 155 175 185 140 104 88 131 173 134 188 116 95 64 185 179 189 148 172 157 185 148 125 137 86 70 44 40 51 32 0 17 0 17 0 5 51 7 18 70 37 16 0 45 20 10 0 30 46 82 100 79 120 135 103 77 101 109 87 116 117 97 108 97 68 109 56 98 94 82 111 132 152 91 116 132 83 105 99 152 144 116 180 155 146 120 107 203 182 217 224 186 150 221 184 182 176 170 169 169 170 119 130 127 151 109 84 134 79 58 45 25 16 31 48 19 25 9 31 59 32 23 34 49 10 0 32 34 0 31 37 41 21 34 78 60 47 93 56 98 100 92 140 49 28 19 53 45 38 27 70 23 55 43 17 50 0 48 26 51 48 0 43 83 75 91 98 31 47 31 16 22 18 11 28 106 175 194 181 172 133 131 181 84 33 115 115 104 21 60 108 174 183 190 178 139 151 156 144 106 97 88 79 27 49 43 54 26 22 2 15 8 16 0 31 6 27 10 26 48 23 21 30 12 104 74 91 77 87 98 103 118 101 127 95 99 97 104 96 97 96 91 125 100 83 134 116 136 116 101 133 129 131 91 133 98 143 117 185 158 172 107 153 127 136 198 187 216 226 196 193 203 212 168 179 181 132 150 159 132 145 108 98 59 100 62 103 73 23 25 30 25 43 4 35 43 0 31 44 23 65 41 8 28 57 49 33 52 49 73 20 89 46 52 76 121 105 108 84 84 109 92 87 89 28 24 20 38 48 62 20 69 15 40 4 51 55 62 10 46 23 59 82 58 35 64 83 72 23 21 7 0 89 178 174 148 159 174 140 157 168 139 104 74 66 87 96 48 126 181 117 147 135 138 140 87 116 76 52 88 22 31 14 27 9 15 1 27 6 0 8 18 13 33 20 9 32 38 0 39 10 80 128 39 95 101 72 87 91 132 97 134 98 66 112 128 102 114 107 134 123 52 112 126 148 76 96 160 118 96 124 120 121 154 113 120 173 152 156 168 92 141 189 207 164 207 175 198 154 202 167 222 179 134 151 128 149 125 76 76 80 64 71 52 42 20 30 34 13 23 42 27 45 47 75 34 14 53 22 51 46 82 66 71 66 53 31 79 69 42 106 123 103 114 103 113 99 108 123 116 76 49 64 13 22 32 46 44 40 17 13 43 93 43 41 0 29 57 63 0 11 22 53 16 52 26 0 28 66 66 159 147 172 153 157 160 202 199 185 142 100 51 22 62 56 134 144 104 135 117 128 140 110 116 90 37 15 21 22 42 26 7 62 20 0 21 25 24 0 0 18 0 0 43 9 21 35 30 52 111 42 85 121 87 79 117 106 123 116 105 71 77 108 103 129 55 92 58 111 150 127 90 108 91 146 114 122 101 85 133 105 148 147 190 126 165 122 116 103 163 230 196 183 187 189 172 195 140 188 183 167 123 133 114 75 125 106 125 104 81 82 54 47 9 58 39 23 14 80 36 52 74 74 67 67 85 19 84 66 62 58 75 66 28 33 84 79 100 140 71 152 144 99 143 135 97 109 155 108 156 136 29 33 62 20 11 28 13 13 13 50 33 44 17 15 66 25 61 115 32 56 26 27 63 12 57 106 175 147 146 135 117 161 158 215 206 157 142 60 10 36 46 104 137 149 145 137 82 138 109 85 100 76 73 22 26 65 10 23 33 42 45 3 0 36 9 0 39 16 55 55 13 6 50 45 62 119 96 112 125 99 107 86 126 98 104 120 82 119 102 99 102 102 136 102 103 114 130 145 140 112 123 122 126 101 107 183 137 161 134 170 150 118 167 91 96 172 237 148 200 192 166 170 171 187 163 158 107 143 132 152 113 118 60 98 104 81 57 38 39 77 0 43 59 82 21 63 82 85 69 42 58 40 60 90 84 82 118 110 60 106 174 75 80 84 129 137 113 127 130 147 104 98 103 139 155 173 154 168 140 137 99 79 59 39 71 13 14 38 0 33 50 58 26 93 103 120 49 51 49 50 43 109 137 167 149 132 134 83 83 88 106 144 165 113 86 0 39 65 85 104 146 137 80 121 94 64 105 38 64 44 63 38 0 40 27 18 33 22 20 0 58 23 21 33 5 0 28 44 35 48 39 83 70 99 125 135 144 128 125 128 123 138 101 110 115 144 63 73 68 128 94 86 122 133 93 105 127 163 107 134 99 106 116 114 165 140 169 162 153 142 95 123 178 160 189 181 187 181 194 201 176 184 154 147 157 131 91 115 102 99 68 118 128 76 18 69 38 98 57 66 43 78 50 76 50 68 62 76 29 131 74 142 109 87 119 77 97 101 64 100 145 92 91 145 115 104 102 114 122 137 153 186 167 170 190 154 143 125 116 66 80 11 25 84 35 14 43 54 68 42 44 112 114 42 106 20 81 134 159 166 142 153 151 128 168 39 14 16 93 56 120 64 73 70 74 68 116 104 73 126 105 43 73 64 52 72 98 48 15 35 22 0 0 23 20 13 8 14 42 24 9 5 0 24 58 23 56 102 63 113 89 142 149 75 101 131 93 135 110 125 108 90 123 119 135 78 141 123 128 128 134 111 145 129 128 144 144 114 103 129 149 145 125 155 130 152 140 96 94 114 197 204 155 158 154 204 136 183 130 143 138 113 163 113 104 127 96 100 31 68 35 31 63 51 1 3 0 71 32 89 69 68 64 81 73 71 109 97 66 106 107 120 97 90 103 109 71 81 137 132 114 115 84 100 143 103 126 158 200 144 201 174 149 180 162 170 108 119 90 26 24 47 70 53 90 53 17 29 109 38 47 68 68 74 168 196 175 145 185 154 173 177 144 187 45 42 0 50 32 46 75 42 78 61 99 57 68 118 57 51 64 55 92 23 49 57 27 43 16 12 29 7 4 19 14 33 52 37 36 0 70 9 34 25 90 76 84 141 77 119 104 123 103 91 152 130 134 125 159 122 96 74 138 104 100 108 128 107 104 125 136 113 105 76 134 98 150 150 196 127 146 131 137 130 124 121 125 113 137 171 207 197 152 171 187 151 132 112 99 159 108 97 114 92 108 104 94 101 32 26 55 14 15 59 94 89 114 71 121 70 31 71 37 72 71 93 100 93 129 90 120 59 122 102 157 137 127 121 28 139 134 132 157 117 134 173 196 192 190 174 164 206 209 119 172 177 164 139 136 129 157 133 92 82 56 132 20 56 55 47 138 195 198 196 210 150 174 151 208 176 163 146 112 72 10 13 26 65 54 71 65 52 49 55 50 68 68 73 49 62 51 47 44 34 46 20 33 9 18 25 0 15 39 2 16 72 22 84 40 76 80 75 113 105 98 80 102 125 101 82 125 114 113 125 108 97 122 78 116 123 95 107 83 113 123 117 90 130 100 148 94 119 146 171 151 136 113 172 122 140 131 95 86 111 120 182 194 144 151 175 180 107 144 174 138 81 106 111 86 119 98 114 90 50 49 31 62 4 67 71 97 33 74 43 68 73 73 95 74 86 125 110 121 157 120 68 98 96 113 97 112 105 114 114 54 149 124 118 105 81 119 167 188 173 171 192 174 197 173 204 237 169 190 180 184 210 162 152 188 187 181 148 83 109 118 130 135 199 201 217 204 176 147 149 181 187 194 127 62 61 61 64 50 21 46 79 59 36 45 30 19 48 37 74 43 87 75 48 60 59 49 47 0 19 0 39 0 47 34 19 58 11 9 64 72 92 68 77 113 120 70 101 138 131 62 104 146 80 92 120 112 93 109 121 90 138 134 104 102 81 132 146 132 91 124 120 118 130 105 125 151 151 190 172 141 153 133 94 91 70 81 108 152 146 181 179 167 162 146 124 162 77 75 99 89 82 81 64 48 85 76 65 56 26 60 71 95 80 51 78 98 87 31 47 76 65 101 51 99 117 117 106 99 157 78 106 94 177 166 111 93 69 100 110 142 141 107 158 152 192 199 188 170 204 222 182 199 155 189 196 231 203 157 203 199 173 207 185 175 114 159 140 127 166 184 193 222 209 180 166 177 191 223 220 119 107 40 60 30 71 79 95 84 29 51 62 96 37 58 65 84 25 33 77 45 46 26 55 70 17 19 12 0 19 41 40 32 0 21 9 23 87 103 119 116 89 93 106 95 77 106 104 135 114 101 92 126 154 117 114 78 90 80 96 129 97 94 135 97 132 108 129 134 114 124 88 116 171 165 160 169 166 145 148 122 87 82 115 99 108 122 154 133 138 167 129 150 125 137 83 86 118 103 100 100 87 108 80 48 113 41 75 82 71 61 50 61 91 109 126 89 97 84 114 124 94 111 157 122 113 111 90 107 107 165 104 139 108 124 60 86 105 145 116 99 127 190 198 190 175 178 212 209 178 169 211 213 161 184 204 204 168 197 194 169 234 180 180 175 181 155 174 175 206 223 217 180 156 159 118 185 220 139 41 14 77 77 56 70 54 52 41 28 31 44 53 62 50 96 33 59 73 59 32 32 42 16 10 0 35 14 1 0 5 0 4 37 22 77 101 112 121 113 100 94 83 157 116 95 119 127 89 119 91 89 131 92 96 105 77 123 104 119 127 147 141 150 140 144 98 137 133 121 130 159 134 150 185 154 158 138 134 102 85 72 120 140 85 140 111 125 123 123 110 137 145 138 62 73 49 124 72 106 87 87 95 60 84 79 66 77 59 91 91 112 57 74 114 103 95 115 100 76 96 89 131 167 145 111 116 157 130 99 135 109 71 110 96 122 139 110 126 127 209 187 224 198 212 213 205 208 173 198 216 196 251 176 242 192 215 187 203 172 175 209 190 194 197 146 227 198 218 231 204 200 156 199 211 243 214 145 35 63 74 54 58 42 44 100 41 53 30 52 40 30 42 78 33 18 36 55 46 16 24 0 13 8 24 32 0 28 0 18 34 47 135 102 77 125 115 122 84 99 109 105 106 85 130 130 56 113 116 86 84 146 126 113 116 112 117 116 135 128 111 153 114 138 139 122 161 123 170 118 178 112 145 131 138 84 61 77 109 58 91 128 123 138 125 151 129 103 91 111 123 147 110 86 143 61 99 104 80 76 76 86 66 101 80 77 85 71 63 54 71 98 94 102 113 138 137 119 134 126 169 111 125 136 122 100 147 147 110 52 81 121 144 161 121 105 139 164 193 194 204 193 178 186 205 224 195 177 195 243 219 217 151 205 216 235 167 145 218 212 197 203 188 241 242 199 188 195 159 189 161 190 161 160 140 123 73 50 78 113 40 79 72 46 47 75 71 36 76 28 29 22 15 6 25 37 15 8 0 28 1 0 33 8 0 4 13 30 71 79 99 88 112 133 103 111 162 107 70 91 115 98 122 124 108 116 127 153 110 118 130 136 160 117 104 119 92 135 146 124 130 126 119 125 71 140 134 147 155 128 148 167 83 74 70 79 113 89 83 113 115 123 128 147 141 116 111 132 102 104 71 137 79 68 104 84 96 101 72 74 93 93 54 71 94 94 97 84 148 122 118 84 153 133 96 144 99 166 85 132 130 78 122 157 119 47 79 130 96 120 131 115 138 146 172 198 215 201 208 195 221 173 165 204 210 223 202 188 180 237 217 224 216 203 172 188 216 209 179 219 242 179 201 181 202 162 142 190 165 215 183 146 121 81 91 60 74 60 18 45 64 84 74 53 68 74 0 55 0 1 4 6 5 33 12 0 0 0 13 42 32 60 44 43 69 94 83 123 90 97 104 91 74 128 97 81 75 127 120 121 126 138 115 128 109 97 136 114 105 114 124 120 128 94 149 103 119 86 136 152 129 106 129 141 136 103 199 182 128 87 55 51 108 50 108 162 79 134 114 96 153 122 121 137 97 116 138 77 83 57 94 74 112 94 92 73 99 92 107 73 70 46 77 108 108 74 114 134 106 98 88 77 110 100 114 130 139 113 121 141 126 136 91 81 119 108 122 84 113 139 161 165 230 191 172 156 213 177 219 225 169 203 215 212 199 204 225 206 185 215 219 206 191 181 185 199 221 222 197 191 172 161 203 194 110 155 161 134 136 74 101 90 77 87 73 62 70 59 27 73 66 57 28 33 29 4 67 4 26 28 0 0 30 22 0 22 48 37 41 25 54 77 87 80 87 101 118 124 78 87 125 110 119 123 106 120 125 141 121 102 106 126 113 139 118 133 119 126 138 143 123 114 112 103 138 108 126 140 100 127 118 146 132 168 162 140 56 63 92 120 55 98 79 92 106 100 124 103 104 134 108 118 100 98 96 53 74 99 77 91 61 65 105 71 103 115 65 119 88 73 66 121 119 74 69 127 130 114 119 120 181 142 115 150 155 131 132 164 94 111 95 120 128 117 129 92 150 132 127 181 185 224 202 178 219 171 190 193 201 239 183 213 200 202 208 189 169 200 174 222 185 214 175 178 236 231 190 211 218 159 189 146 112 129 108 73 84 91 99 60 56 62 90 83 54 68 29 59 57 35 10 32 27 31 0 16 39 24 0 14 16 31 28 43 101 109 27 63 101 79 81 129 76 94 105 112 107 95 136 102 131 64 105 99 90 130 127 92 100 110 119 141 125 109 95 140 108 137 147 144 96 150 153 108 116 144 126 124 110 144 145 124 140 50 54 102 89 95 64 110 91 122 83 74 80 114 87 146 108 81 91 78 110 117 76 99 79 65 96 43 92 87 60 122 115 83 54 76 118 97 120 82 100 108 110 99 121 148 113 160 127 135 147 115 136 124 106 120 112 152 89 144 95 111 141 161 143 197 235 224 149 180 206 229 198 220 177 244 175 201 198 229 202 188 202 206 195 192 202 223 214 223 204 180 178 202 161 215 196 198 88 106 63 77 82 94 130 90 71 114 48 42 90 34 21 42 31 0 5 3 9 19 24 0 26 53 17 30 41 38 50 64 66 71 120 107 141 93 118 117 121 72 127 115 94 101 104 101 105 79 97 94 92 92 145 137 121 145 111 134 157 143 126 149 141 113 144 107 117 112 138 148 135 113 138 134 133 170 140 158 65 59 72 85 68 81 95 132 56 87 57 81 117 91 104 89 74 89 117 75 108 89 84 113 52 64 126 143 69 11 68 113 74 76 94 91 159 99 96 75 112 91 136 145 116 116 101 123 121 111 146 138 94 88 102 88 112 105 127 100 127 141 131 131 219 209 192 171 230 201 211 202 200 233 251 240 204 227 178 227 204 202 226 160 210 189 212 167 185 187 206 255 193 193 197 198 190 200 123 61 166 87 86 110 76 61 76 39 28 33 63 22 61 45 24 28 0 12 20 7 7 7 54 9 49 62 10 37 120 113 111 85 100 72 141 118 104 89 114 118 93 109 127 80 83 114 97 134 119 81 118 158 110 96 81 118 132 143 120 103 109 132 105 126 96 91 111 110 124 115 112 109 117 105 153 163 100 64 69 120 39 110 71 88 86 116 89 110 105 41 54 84 100 101 82 80 63 73 96 70 101 91 71 57 58 94 90 37 60 103 98 132 78 88 102 112 108 93 131 138 117 82 115 121 134 137 154 102 127 101 79 95 95 102 83 87 91 131 117 133 143 207 216 186 170 217 219 199 164 179 224 201 184 235 179 211 224 230 167 233 203 208 213 198 188 193 219 217 165 188 189 221 211 190 202 205 192 110 33 27 59 28 59 8 14 26 23 45 25 17 42 25 3 12 9 19 43 25 12 48 0 0 35 25 30 95 94 99 112 95 118 126 115 76 101 121 95 105 86 113 129 97 108 86 116 156 93 105 101 95 64 131 125 144 118 79 95 152 115 83 106 163 108 172 128 105 140 120 134 133 102 137 171 102 53 87 65 126 49 76 113 114 97 99 133 105 109 90 78 86 126 72 52 66 71 66 65 55 98 44 106 61 85 108 111 47 90 112 128 109 123 101 86 125 89 77 151 154 80 134 150 131 155 133 96 106 99 90 141 140 144 95 109 104 121 100 137 162 178 208 190 199 185 221 199 200 222 197 190 177 174 224 255 243 197 242 218 198 186 199 201 201 211 204 242 248 163 218 180 218 166 218 209 138 169 124 81 43 45 68 50 83 29 47 49 24 22 19 3 0 0 0 21 41 11 13 0 18 16 0 24 80 101 115 116 119 109 112 77 99 60 78 132 50 85 93 81 135 75 106 114 92 126 107 100 99 67 153 112 112 114 133 94 103 168 135 149 118 107 103 96 107 102 134 129 112 121 123 120 121 65 78 70 83 69 105 84 90 101 108 153 133 80 111 71 75 87 75 85 108 55 67 69 96 65 70 54 134 93 52 81 62 60 91 87 80 105 98 95 101 73 91 127 135 103 104 133 128 109 109 79 112 72 119 82 82 90 125 150 118 146 84 118 111 102 151 143 184 192 226 166 215 236 227 207 196 178 181 195 227 241 239 224 214 208 204 216 192 202 179 218 228 182 216 200 172 189 185 199 177 157 147 176 141 61 76 57 82 56 45 46 48 12 41 0 20 45 13 49 0 37 2 19 0 0 22 49 16 37 82 73 104 123 84 108 26 52 87 95 62 101 70 89 110 92 87 83 106 124 90 91 133 100 110 86 104 118 106 119 100 136 116 145 139 123 123 106 130 103 101 74 130 140 113 120 160 131 120 29 49 74 94 56 74 113 80 104 83 92 121 133 101 109 113 109 58 109 113 88 116 89 69 69 67 109 81 80 70 82 84 101 89 64 115 96 101 125 95 104 133 133 100 117 102 126 128 147 130 104 66 126 134 130 126 127 140 122 98 114 134 176 148 150 193 201 201 206 214 198 220 211 180 187 209 242 190 206 232 198 241 202 180 198 244 193 201 207 182 190 212 217 218 214 196 196 229 212 198 130 142 107 106 105 41 99 36 35 24 39 15 22 1 14 9 7 29 21 17 0 2 39 13 16 37 62 118 50 63 127 123 108 78 92 90 130 94 137 93 73 95 82 85 88 98 96 66 105 100 128 122 67 150 128 98 121 89 97 127 127 112 131 109 140 125 103 105 131 140 86 107 156 119 108 150 96 105 44 96 69 67 65 62 96 45 117 68 101 82 93 81 120 83 102 84 62 94 64 77 76 63 80 100 76 88 87 82 76 80 79 82 127 97 109 140 155 123 117 115 101 135 114 95 135 176 118 135 121 108 113 109 102 106 137 103 115 101 69 90 129 127 142 195 162 202 185 212 223 192 211 255 196 206 196 162 207 210 172 202 198 198 181 211 184 182 232 194 210 212 235 168 204 176 170 162 161 154 116 117 126 82 82 86 38 55 37 42 9 30 43 28 30 0 15 0 2 35 41 41 67 99 136 87 60 89 80 78 145 78 76 73 96 78 95 81 117 99 107 65 114 138 98 82 107 84 77 102 125 98 78 73 104 120 111 100 93 144 101 123 113 122 120 154 94 122 114 124 147 140 92 91 113 91 46 77 62 41 73 45 68 77 67 101 92 72 79 76 66 96 76 105 107 91 87 104 78 99 93 71 75 88 47 106 63 60 85 104 110 91 86 79 104 100 146 130 96 112 147 140 134 112 116 79 127 96 111 114 120 126 85 121 123 111 98 80 142 129 126 130 159 178 183 247 184 185 192 204 176 223 220 195 218 188 188 214 194 228 208 219 176 208 182 192 199 200 198 194 196 200 175 184 166 161 139 115 78 67 80 83 68 36 74 37 0 22 26 45 17 9 0 39 7 54 21 58 46 55 61 81 103 119 80 76 106 123 75 46 82 59 85 142 93 83 103 73 70 66 98 86 105 88 102 97 113 105 101 100 115 113 102 108 86 113 148 102 126 167 110 141 137 93 117 131 129 91 147 93 129 142 78 55 76 53 39 56 67 48 64 76 93 83 70 70 28 96 64 89 60 65 48 89 72 71 95 89 100 80 106 56 48 105 81 39 92 110 73 49 73 90 100 136 96 68 98 121 87 120 98 116 96 106 101 99 119 120 122 125 143 103 92 129 69 136 137 149 126 152 208 212 206 191 230 198 208 243 181 192 210 208 181 222 235 188 194 203 209 177 175 214 218 212 185 186 187 203 184 184 158 188 157 127 125 71 75 116 57 78 38 33 0 11 25 2 0 30 40 19 28 25 67 46 36 75 28 69 93 94 81 74 105 141 102 129 119 105 104 121 108 87 106 116 124 81 86 65 81 117 78 87 102 82 111 110 96 103 102 99 113 105 122 118 131 117 159 108 114 139 101 150 118 138 133 102 164 154 163 26 95 65 83 64 100 44 61 43 21 62 62 91 68 94 92 49 97 81 61 74 67 68 81 82 63 113 36 76 100 84 111 76 90 88 82 91 99 112 100 120 99 110 99 135 110 92 107 70 103 94 91 100 102 69 105 113 167 106 128 114 145 109 128 133 156 123 181 159 201 202 189 189 214 234 179 222 211 211 212 200 179 204 216 202 181 200 200 187 236 229 229 183 208 208 184 207 177 167 168 134 114 122 124 102 77 56 83 29 62 52 0 27 23 50 4 19 10 51 44 44 73 78 83 58 62 92 98 150 103 95 89 85 110 90 126 115 116 87 129 115 113 98 128 144 106 112 98 113 105 112 118 124 81 125 130 124 120 134 127 124 115 174 119 107 134 136 124 126 95 107 73 117 131 130 141 118 54 87 88 48 90 77 26 62 40 56 12 69 72 70 66 25 83 70 82 66 84 67 79 53 80 91 100 71 99 83 93 73 63 62 89 105 58 93 113 126 85 72 105 117 89 135 116 165 75 114 119 132 118 113 113 62 112 168 128 88 111 120 125 85 149 104 148 150 124 179 191 222 214 244 253 234 179 188 232 186 196 189 193 192 155 203 172 192 196 141 227 174 210 200 214 170 195 168 160 143 165 137 127 89 82 132 65 37 58 40 7 21 18 11 13 21 0 51 41 47 54 124 55 48 80 11 86 79 113 121 115 96 83 124 120 117 155 144 109 105 106 130 154 131 108 110 137 132 85 116 138 123 100 128 79 84 114 124 125 133 123 133 142 142 145 108 77 112 138 100 119 82 135 140 111 143 104 60 56 85 50 74 57 53 52 44 33 68 71 65 59 49 49 36 45 74 58 97 90 120 67 62 72 57 84 96 95 52 96 116 84 91 104 103 81 81 133 98 87 71 106 115 132 89 111 89 137 81 157 114 143 101 116 113 156 107 136 108 92 153 118 144 131 177 164 124 167 185 192 196 244 206 216 194 198 245 169 203 161 228 240 243 188 193 188 188 211 198 177 143 175 177 202 183 198 163 161 119 133 87 106 86 67 86 38 27 57 5 27 10 31 26 30 18 41 68 37 34 45 16 80 47 36 47 81 97 137 108 118 94 99 114 134 148 102 111 118 141 68 117 133 145 79 107 85 168 126 115 108 121 89 90 128 120 134 87 110 96 137 127 108 138 102 124 118 139 143 123 109 81 122 116 130 71 24 56 103 52 65 91 81 62 56 63 68 46 50 64 33 30 49 12 25 74 39 38 67 35 89 71 105 100 68 102 97 72 53 61 77 80 95 73 119 90 104 93 100 121 120 115 91 130 128 81 114 102 119 59 25 92 116 129 126 155 83 106 128 123 141 114 145 120 138 138 135 162 204 190 195 206 205 193 179 169 177 204 229 188 205 194 196 192 186 182 220 179 161 173 179 177 162 136 188 169 118 124 97 98 70 110 68 96 66 24 41 1 7 27 20 9 0 21 34 29 58 17 71 46 33 60 13 73 67 94 126 105 108 122 128 100 101 137 137 122 125 99 177 127 103 136 125 116 112 92 69 96 80 85 110 111 128 140 119 106 80 144 120 125 120 133 113 123 106 106 133 100 132 109 111 102 75 61 67 40 51 34 20 59 69 103 53 59 70 10 73 63 56 59 35 45 69 23 35 24 39 64 73 30 22 62 86 99 47 96 114 72 76 82 108 76 129 99 63 102 101 114 142 137 87 125 126 88 119 75 90 91 89 96 118 94 154 113 125 96 123 151 167 123 138 164 158 190 185 155 148 179 184 196 190 203 184 201 164 232 215 160 177 186 205 197 197 181 179 133 140 137 166 195 159 175 146 138 128 113 71 109 99 130 46 17 0 14 24 32 8 1 57 13 11 43 51 21 52 47 23 65 26 2 15 60 104 93 112 91 108 100 136 108 136 112 113 140 116 130 118 100 129 49 99 149 94 103 132 118 81 116 132 141 88 137 117 125 103 157 125 142 109 127 88 135 137 107 111 119 108 152 105 74 40 65 34 43 32 73 58 45 69 72 53 69 32 48 76 105 16 48 39 40 63 80 17 38 69 59 22 67 33 43 29 61 72 28 36 98 76 78 74 65 129 83 91 105 112 138 105 123 109 131 121 106 98 76 86 166 124 122 128 138 152 109 148 167 152 139 125 143 139 162 152 152 191 185 174 218 204 222 221 206 158 219 149 194 184 193 166 192 227 149 171 172 153 168 113 142 167 119 148 136 147 84 128 96 153 99 85 29 45 17 36 29 6 21 0 39 37 46 22 13 51 0 46 45 47 27 9 26 33 59 115 122 99 90 134 105 161 124 97 168 136 144 146 132 132 100 98 95 82 91 137 86 125 104 102 176 142 144 165 128 121 106 115 142 78 143 115 91 144 92 135 129 134 102 147 104 103 33 45 32 92 54 31 24 60 67 44 46 85 58 68 59 52 46 16 54 29 78 40 34 40 55 60 77 68 39 14 52 36 2 23 54 62 98 100 82 91 90 67 87 120 98 123 102 90 95 115 149 124 89 70 90 123 120 134 146 110 105 131 107 111 148 167 129 130 163 130 158 146 136 152 177 193 197 187 214 198 191 181 208 181 178 186 208 174 185 237 194 155 150 154 131 182 133 149 127 105 123 100 117 83 129 64 70 73 33 65 4 0 19 16 34 39 68 54 46 34 66 41 71 54 39 16 51 11 37 36 116 115 97 123 128 148 163 115 123 115 142 112 134 143 102 114 108 128 113 122 122 170 107 132 134 136 124 105 119 105 150 152 141 140 144 148 106 120 109 101 104 143 138 83 86 142 109 33 21 75 83 56 36 46 67 31 46 64 47 52 49 89 37 35 62 54 51 40 32 69 21 61 17 25 32 35 34 76 17 5 36 14 45 75 94 63 63 61 101 76 109 124 79 67 101 102 93 122 72 101 33 79 106 138 121 185 149 153 107 138 146 122 98 160 131 140 128 146 144 143 195 190 194 203 181 200 194 225 201 193 202 234 155 193 173 214 222 167 160 157 186 193 130 133 129 128 94 109 98 102 93 74 65 78 55 35 41 19 73 26 59 10 46 0 69 37 35 20 22 29 53 29 18 42 66 48 34 38 43 155 123 116 123 131 149 133 184 125 160 95 96 125 128 130 103 82 106 152 126 119 85 123 81 108 93 112 85 116 103 105 110 167 85 154 113 164 135 103 108 108 126 141 114 89 21 74 60 59 58 64 52 79 47 52 81 37 77 56 65 89 22 36 49 71 81 58 80 41 72 34 66 24 48 21 18 42 24 1 32 17 26 64 62 78 88 56 111 120 84 112 115 72 50 87 56 60 56 66 108 96 140 140 140 138 128 113 141 120 110 123 150 114 129 128 167 165 133 141 135 174 205 190 173 205 244 199 202 203 192 181 203 205 201 198 202 184 137 183 128 175 154 165 141 138 101 130 74 79 72 66 83 27 89 22 36 0 11 11 87 5 0 0 25 53 35 64 23 69 55 52 42 0 63 24 50 93 152 169 142 105 179 153 158 123 133 142 118 113 129 96 129 89 102 137 108 110 85 121 120 134 111 124 124 89 110 119 134 87 119 128 139 100 161 176 95 100 119 114 128 105 120 59 69 39 73 98 37 76 77 46 47 43 45 71 76 80 53 81 33 36 27 38 37 59 61 34 82 48 48 46 41 26 48 0 42 0 6 0 59 0 1 94 86 108 71 95 50 72 70 77 88 52 94 90 61 161 129 154 130 145 161 158 130 102 138 152 129 121 135 131 140 112 143 148 160 171 135 177 162 193 162 190 175 198 183 206 176 176 203 201 213 194 204 176 173 174 196 196 161 97 104 123 90 107 58 109 89 108 107 73 97 35 80 65 32 0 0 17 32 0 33 59 28 61 34 43 38 50 31 0 19 75 39 45 100 109 121 134 141 120 146 174 130 105 138 138 158 116 91 140 100 104 135 147 135 152 120 108 89 90 108 81 159 111 111 167 134 173 120 152 91 80 148 128 111 112 151 121 89 62 95 46 34 67 85 79 73 45 55 35 47 44 81 69 72 47 38 73 19 38 37 48 65 48 32 63 42 44 46 8 0 0 18 8 20 71 65 35 67 65 99 90 66 65 72 81 76 53 44 61 109 152 132 149 131 152 143 161 152 140 148 119 118 158 153 155 129 147 135 173 135 191 131 122 133 182 198 183 171 180 245 196 218 205 199 247 208 185 165 167 195 179 204 174 187 146 157 169 106 131 125 74 60 106 99 88 103 92 50 76 30 44 22 38 34 49 0 14 13 51 0 42 15 39 23 49 10 37 69 127 46 80 114 121 131 70 133 129 117 129 124 100 111 108 84 129 130 140 105 122 140 145 110 142 135 120 104 101 98 120 113 114 199 94 84 107 126 110 135 120 90 116 90 135 102 43 75 58 43 47 81 113 65 41 79 32 57 20 17 71 44 55 62 102 77 58 68 46 18 15 50 67 47 68 83 53 31 0 0 1 9 0 71 39 23 66 57 101 126 77 70 47 70 59 27 83 128 116 82 130 126 98 131 92 178 140 119 160 124 139 111 136 161 148 128 169 149 152 159 129 152 187 208 169 177 180 231 188 216 229 182 207 205 159 178 208 167 221 187 203 226 197 204 169 152 181 175 109 126 115 78 92 91 51 65 94 39 54 39 35 36 1 53 0 11 49 6 47 48 84 48 73 79 60 32 46 79 73 69 75 102 122 117 161 127 127 101 136 131 132 114 149 130 108 79 106 112 117 98 137 130 149 108 170 126 134 136 84 129 129 99 146 113 130 135 125 127 90 128 127 125 111 90 104 69 93 68 89 39 84 63 45 75 28 63 56 94 51 71 40 67 63 37 58 105 67 24 62 39 27 67 48 80 17 0 30 33 21 6 86 22 44 69 46 78 76 36 59 21 57 34 38 74 91 122 116 97 141 129 128 136 154 132 107 88 124 121 118 147 179 141 112 146 149 145 178 162 151 134 132 184 166 173 155 168 179 173 190 189 182 189 200 194 235 208 241 227 199 237 191 183 156 139 175 174 126 113 100 97 100 87 78 113 75 68 72 18 33 32 8 34 35 42 35 47 59 42 64 59 57 47 59 62 95 73 31 18 62 61 162 126 164 125 157 101 152 90 112 98 121 87 134 85 121 127 136 126 142 119 183 109 113 105 143 126 121 157 127 117 118 144 133 123 100 119 131 122 122 105 117 67 55 19 100 78 73 96 80 91 53 55 59 82 72 62 80 86 75 75 80 66 64 41 62 55 30 74 50 37 36 33 18 47 34 43 34 40 24 33 51 59 111 64 24 72 12 44 5 66 71 73 55 120 136 146 145 121 120 142 120 147 139 116 136 120 127 132 142 157 153 143 178 102 162 138 137 144 180 154 223 196 216 227 199 187 212 195 195 208 194 244 197 223 216 220 198 189 169 177 182 193 134 172 86 88 115 96 80 76 73 51 76 80 61 52 76 35 30 40 40 19 45 28 55 66 52 30 68 63 91 54 49 38 59 25 51 49 120 114 91 84 145 90 81 100 105 76 99 117 139 110 117 113 90 128 131 116 118 115 141 161 158 136 138 133 111 137 135 120 79 128 138 113 110 119 98 74 97 70 81 81 38 71 51 88 103 80 61 77 93 82 83 40 35 59 48 92 102 72 94 58 40 32 73 58 35 42 34 45 2 8 33 0 51 41 42 82 53 86 35 15 21 55 59 75 95 90 96 128 131 149 208 132 194 142 108 106 133 133 138 131 155 137 130 155 150 139 141 163 126 178 185 136 175 141 143 173 178 200 208 147 219 183 194 199 203 188 208 255 190 200 234 230 191 185 169 172 187 141 147 138 72 121 68 102 110 108 80 91 84 73 129 58 20 58 29 34 29 74 32 54 54 43 33 69 45 83 62 76 91 73 33 40 73 59 81 135 90 67 125 106 111 169 133 93 131 153 131 116 126 149 67 118 114 165 120 98 115 128 145 130 137 138 120 104 107 114 97 103 166 89 121 100 97 77 86 78 72 23 58 93 49 71 72 94 91 85 90 39 70 49 66 80 45 78 78 35 45 86 36 85 56 23 42 0 0 23 19 28 31 82 0 59 0 55 68 54 0 14 39 108 86 67 125 88 115 143 149 151 113 141 118 127 125 129 154 166 118 134 107 123 130 143 137 155 152 155 151 158 133 187 173 151 184 208 219 230 229 248 238 164 178 222 225 223 192 206 194 213 163 238 159 180 201 190 147 181 139 105 143 91 121 117 94 96 96 73 78 66 51 33 74 29 18 104 81 52 53 61 17 65 67 51 111 78 69 33 33 20 79 74 26 86 104 55 94 100 94 102 97 122 109 120 145 144 89 93 158 128 76 109 136 122 137 124 123 88 133 149 160 127 173 87 112 125 103 81 103 98 116 104 97 98 81 91 72 69 70 84 54 60 59 69 87 79 77 86 43 66 62 66 33 51 67 36 90 44 54 22 76 27 3 63 27 70 16 24 52 27 66 1 40 42 26 21 35 54 104 97 99 102 94 130 120 160 158 152 171 152 112 109 166 157 117 161 108 137 146 110 168 166 151 129 162 142 116 181 118 141 185 133 196 165 162 176 199 186 194 252 252 191 191 208 197 223 222 165 204 193 141 182 138 198 164 156 147 130 112 109 96 110 110 45 99 78 118 82 63 15 14 85 40 64 22 17 27 3 16 10 5 112 77 43 48 75 36 56 46 46 36 102 87 133 147 94 97 93 111 81 94 102 140 124 124 128 163 151 117 132 143 104 156 154 104 135 138 160 97 93 126 136 121 117 141 136 115 96 109 136 66 90 106 75 79 62 37 82 62 77 41 85 75 60 78 68 65 71 85 82 65 56 101 44 47 32 78 19 28 66 52 3 21 6 0 31 27 0 23 0 72 18 0 27 63 99 95 100 104 104 114 142 132 153 154 112 144 120 117 126 109 144 126 118 142 171 160 142 144 144 179 146 145 144 142 145 195 148 183 168 183 175 220 216 209 199 198 242 206 176 215 226 227 170 209 169 206 140 185 210 192 182 154 114 150 154 154 93 76 70 82 81 71 113 99 44 91 91 73 84 55 79 50 16 63 23 10 60 72 77 0 67 45 51 51 85 57 91 47 80 120 89 84 104 106 90 83 118 112 85 106 117 114 144 111 124 111 117 132 166 142 139 102 173 133 105 107 96 132 136 115 97 135 125 135 119 138 90 109 98 114 51 104 68 47 96 61 63 69 70 72 100 90 74 86 55 59 67 58 94 57 54 67 58 48 35 77 52 38 42 19 10 0 0 27 0 11 27 63 43 125 65 78 145 148 131 157 139 126 161 177 179 165 220 128 172 124 130 130 130 147 134 156 143 164 164 130 139 150 145 148 117 124 136 133 130 174 139 205 163 217 197 167 198 242 202 201 216 204 201 210 206 200 196 181 173 168 183 136 160 144 136 172 143 102 114 128 90 98 87 92 65 114 83 140 114 99 105 79 81 38 44 55 79 26 109 126 37 75 61 58 33 33 68 69 55 84 32 113 130 80 125 91 98 128 94 123 100 79 126 99 95 81 104 94 121 122 116 98 130 145 103 159 128 129 132 101 179 165 150 169 115 116 135 125 99 129 83 103 94 44 48 86 59 66 33 116 67 69 64 61 17 96 78 77 75 77 46 58 45 42 36 55 60 39 57 52 27 17 39 26 26 17 40 12 0 97 91 109 123 120 109 96 168 113 161 154 179 159 169 178 162 133 146 118 155 145 166 149 132 156 156 158 120 134 159 164 150 155 148 152 149 137 173 166 159 152 174 195 197 182 221 196 197 215 175 191 192 193 166 190 189 184 153 172 148 127 120 144 135 135 113 124 91 104 116 115 68 68 83 117 106 104 104 114 96 96 47 56 33 39 46 63 129 69 75 52 101 32 47 74 34 83 90 80 97 107 141 119 95 111 138 121 102 115 142 107 91 135 121 74 95 92 122 177 157 182 148 158 143 117 145 149 129 156 114 166 140 114 114 112 81 109 149 58 102 85 120 95 85 79 47 82 97 61 58 62 92 57 103 46 36 70 72 69 50 83 35 54 22 44 85 4 9 27 0 33 18 39 28 24 32 69 118 77 105 95 151 108 67 112 145 141 156 142 155 195 192 152 165 146 155 137 162 143 162 142 132 149 164 127 140 148 140 126 128 153 109 167 163 179 139 190 146 117 158 202 168 202 177 247 199 163 197 212 186 199 183 183 152 179 192 166 161 160 121 135 110 124 104 115 107 105 88 70 67 68 99 136 102 101 59 75 67 69 35 40 81 19 31 150 94 105 52 41 54 63 79 55 72 88 60 50 104 120 71 94 95 120 110 97 141 102 96 145 141 112 107 115 126 140 127 143 133 131 159 150 118 100 124 180 178 138 138 192 163 113 84 153 100 79 98 111 111 83 117 46 104 102 87 115 97 56 67 71 48 71 81 103 68 36 41 56 65 17 24 51 9 60 38 12 0 14 25 30 9 24 24 59 105 103 105 122 117 124 127 148 95 135 169 149 152 141 142 167 175 183 143 133 152 161 137 143 126 166 139 161 136 142 131 137 155 108 150 120 138 136 190 161 146 187 146 157 163 143 224 168 176 202 178 158 182 203 188 143 142 190 131 173 162 186 155 143 132 132 145 110 96 103 83 91 58 131 96 111 66 76 69 87 14 42 50 22 51 46 68 51 92 118 75 33 50 52 85 79 63 36 102 94 77 39 88 114 115 103 103 115 91 120 78 85 162 132 133 136 106 116 168 165 123 165 142 143 134 100 155 146 142 155 158 125 123 120 111 110 110 117 100 120 160 59 109 81 99 104 86 97 125 54 73 83 86 81 92 120 49 49 71 44 72 26 45 64 87 49 59 44 0 0 38 26 26 0 0 0 38 119 81 91 104 106 170 99 128 153 122 153 130 172 147 158 166 196 157 142 166 145 144 144 181 119 135 151 141 146 155 99 143 150 155 146 124 137 132 165 138 168 139 150 172 175 172 140 181 181 175 190 191 184 177 156 175 176 147 163 174 183 152 169 94 119 150 116 96 103 85 92 104 72 110 109 49 114 0 110 66 55 30 48 73 39 62 62 64 71 82 130 42 57 66 42 52 67 31 59 73 79 76 91 78 79 120 124 135 110 149 133 104 107 106 111 130 87 128 109 133 134 146 128 155 107 148 162 130 126 153 152 142 145 145 126 102 107 118 95 87 118 102 82 122 90 61 82 81 86 83 61 96 62 73 72 89 51 81 67 37 69 30 49 71 45 14 56 46 55 51 9 23 19 26 59 0 87 67 89 81 105 124 114 115 143 137 169 176 210 180 159 177 195 210 163 146 194 134 92 180 142 132 97 148 148 159 157 150 114 144 107 139 120 120 157 109 155 126 151 176 207 168 120 150 186 184 180 192 183 201 194 186 207 145 202 173 155 138 131 128 146 129 140 142 111 84 96 87 63 104 132 52 107 95 53 61 67 61 77 31 75 52 80 54 60 45 132 102 99 40 45 33 92 80 74 82 75 42 78 77 94 104 160 115 86 110 126 121 85 114 102 140 117 96 123 129 126 161 176 130 137 128 134 181 123 131 174 150 124 130 175 117 113 100 118 85 144 44 133 92 110 106 118 68 76 79 79 88 76 63 53 61 33 57 67 81 67 51 49 44 97 87 39 45 46 53 47 68 24 0 0 21 43 49 65 94 111 128 121 99 145 128 132 178 146 172 147 106 123 165 179 179 121 143 134 187 156 127 144 155 166 139 153 140 149 166 99 141 134 143 131 126 114 147 140 139 161 166 141 164 149 161 193 139 119 152 181 158 143 165 171 150 147 129 143 143 158 146 118 116 128 150 87 76 102 101 105 55 95 75 68 94 90 140 75 43 52 65 68 61 45 0 77 37 108 125 81 89 79 50 60 36 95 66 57 66 75 52 89 110 106 89 121 77 70 144 104 95 71 110 112 142 156 165 140 140 137 145 129 156 145 134 138 143 134 130 135 144 108 124 88 113 118 140 97 111 105 119 104 113 105 90 70 104 77 51 59 95 111 83 92 52 56 64 62 38 55 55 52 68 50 50 69 41 62 23 30 32 3 2 40 78 77 52 65 114 145 126 126 160 160 151 177 182 138 138 193 149 176 164 145 136 163 134 100 119 148 147 118 143 115 152 121 149 94 112 120 102 147 124 126 163 174 120 140 127 140 147 147 139 124 137 155 130 151 148 173 155 164 151 137 150 120 163 143 102 140 161 153 116 98 94 66 94 100 92 79 55 71 80 123 67 59 40 38 57 13 46 3 1 61 107 141 113 39 27 54 59 86 109 71 61 70 37 88 70 91 111 94 87 91 122 72 103 77 131 107 151 129 115 108 111 124 161 105 150 128 152 122 153 174 121 166 153 187 93 114 136 178 118 133 99 120 100 89 110 99 106 131 46 77 58 65 62 77 76 59 62 106 98 63 78 49 55 56 50 35 47 37 75 7 34 41 23 0 25 71 70 97 62 75 101 112 148 147 107 125 139 147 165 150 138 168 137 175 164 137 139 118 152 111 172 136 108 150 139 156 105 164 154 107 103 116 136 153 132 121 128 120 156 130 125 121 143 147 152 136 161 182 171 152 148 145 167 177 141 194 142 169 120 118 165 125 138 120 78 91 66 79 85 71 80 85 50 127 57 118 70 88 76 26 17 64 27 48 19 35 26 91 145 96 95 58 58 72 74 64 55 74 85 106 40 48 108 127 107 111 116 51 126 86 79 121 152 132 85 149 131 103 159 106 121 148 100 161 178 157 168 123 163 159 98 128 114 153 112 168 111 92 108 102 131 120 104 127 36 67 120 57 88 68 57 85 82 102 53 62 66 77 56 30 85 60 46 83 49 7 52 52 25 46 2 21 47 75 48 50 108 92 148 119 139 139 143 158 136 133 170 178 169 143 171 195 112 142 94 136 181 150 147 139 103 128 123 112 159 150 115 184 125 163 116 119 126 121 126 100 117 101 169 125 169 118 144 136 129 150 159 151 131 153 191 139 128 150 110 128 133 150 159 120 101 118 127 109 117 88 104 78 107 105 114 136 128 128 106 76 80 86 67 17 0 16 3 49 22 101 96 106 20 51 62 84 77 45 90 61 54 59 77 92 84 73 103 114 103 106 167 115 90 88 126 123 116 120 98 114 121 98 127 96 187 155 123 184 141 170 155 135 149 147 141 111 103 123 118 171 121 86 156 102 136 82 117 75 102 81 111 85 63 100 56 66 114 29 26 105 46 71 67 34 61 49 51 30 48 11 21 8 52 81 95 70 101 76 105 115 142 136 137 124 120 165 166 168 130 132 152 131 167 173 149 134 141 134 151 118 159 146 136 153 122 123 103 120 99 132 143 95 123 113 93 62 129 141 160 121 130 174 155 161 161 150 147 156 170 178 156 120 161 123 127 101 134 124 129 131 124 116 112 108 102 108 97 140 130 129 88 91 113 123 126 59 20 47 94 14 69 16 20 56 38 31 140 154 108 48 69 43 31 66 72 61 97 31 101 60 62 81 139 82 114 133 83 114 82 118 91 139 167 112 145 131 155 107 126 143 120 153 167 172 101 146 123 191 168 110 85 130 133 153 138 111 141 102 107 162 132 123 102 108 45 90 95 95 77 94 74 109 97 59 103 55 69 83 70 92 84 65 32 47 42 54 22 17 59 82 80 94 79 79 106 103 122 80 113 152 124 149 139 154 130 142 134 167 110 171 163 194 157 142 143 79 169 131 103 121 118 175 115 177 128 95 132 165 141 136 103 88 104 120 157 137 140 104 153 141 118 123 135 135 151 169 159 151 143 119 148 143 155 89 127 115 128 133 130 111 135 97 137 136 82 118 91 178 149 140 107 112 56 92 76 61 40 44 58 33 31 69 74 97 89 74 98 41 64 69 11 80 69 66 46 62 50 63 107 82 141 123 98 120 114 121 125 95 140 129 121 98 105 130 131 69 120 118 159 162 137 128 128 100 154 153 141 107 145 135 122 106 80 77 102 94 94 130 102 105 129 101 112 123 81 74 83 68 67 81 72 79 100 108 84 113 62 81 122 66 41 47 20 73 57 97 82 92 76 75 60 86 70 95 119 141 137 153 127 121 118 188 177 158 91 111 181 174 214 132 144 148 138 141 174 115 154 131 131 108 97 132 100 128 113 84 97 96 117 113 155 123 125 123 166 144 159 164 146 134 154 128 132 151 164 131 115 163 137 166 126 154 176 130 149 100 139 83 59 96 99 46 122 95 79 113 119 102 67 77 44 66 64 45 48 23 41 25 79 69 18 95 118 112 54 16 42 54 34 38 56 21 46 83 112 85 74 106 84 109 143 116 101 93 127 101 101 158 106 118 140 139 91 133 92 151 169 157 168 134 116 151 159 122 137 104 141 107 124 133 128 99 119 133 125 162 138 132 140 90 120 125 62 89 96 49 124 78 78 72 110 69 113 102 91 98 101 79 80 51 61 60 47 52 54 87 83 70 105 65 67 80 97 85 79 102 120 155 111 181 158 113 140 142 197 192 134 139 116 137 175 150 131 151 144 166 158 93 117 153 142 88 83 96 124 122 115 87 121 126 153 109 125 139 133 160 145 126 116 144 160 189 137 173 142 170 148 111 166 150 134 120 137 79 114 111 118 96 125 124 140 87 86 83 118 101 90 51 30 52 25 40 40 50 73 26 30 47 63 120 88 107 27 19 44 33 59 52 51 32 36 67 82 64 54 99 94 106 130 119 110 187 103 132 116 149 112 81 72 102 109 104 129 119 202 147 166 111 138 132 99 128 154 154 136 98 143 158 138 122 112 130 85 86 100 115 136 109 83 109 80 103 93 113 116 57 88 70 80 138 113 113 89 103 87 102 67 101 102 57 15 41 45 39 82 38 50 57 67 98 56 84 67 109 128 100 179 139 157 78 148 138 155 131 156 152 116 192 156 146 123 109 132 120 134 132 110 144 110 117 129 128 90 115 121 84 143 152 134 145 135 110 138 150 127 136 132 117 114 139 144 115 164 132 196 113 201 108 136 148 131 94 95 113 104 119 130 103 94 76 79 64 102 88 86 46 74 78 29 51 43 52 13 38 0 93 119 105 89 58 40 26 65 32 59 80 83 56 97 33 22 57 49 79 62 120 106 79 128 75 126 135 126 125 156 148 123 105 132 122 127 176 136 141 121 156 159 127 144 122 89 127 124 122 108 133 95 171 107 103 111 145 96 82 79 111 106 112 70 81 49 99 91 81 79 105 101 82 84 77 73 87 130 89 76 114 87 104 96 63 14 69 58 56 70 40 56 81 100 81 63 103 104 88 99 151 119 136 144 153 119 147 124 128 116 128 149 128 146 135 103 120 144 98 129 91 102 70 92 104 127 92 119 163 109 190 126 120 137 136 173 176 144 147 124 151 181 143 179 175 89 147 168 167 110 134 126 116 125 109 131 96 151 116 104 116 104 97 40 47 113 80 52 23 0 36 62 46 60 59 31 19 16 107 101 142 59 49 10 0 65 81 86 38 77 77 61 74 45 33 119 113 96 91 107 74 128 108 83 135 103 122 101 111 128 81 164 136 172 134 158 130 102 153 137 90 137 113 140 135 142 133 143 107 72 105 93 111 135 125 158 86 99 115 111 76 85 74 86 58 97 94 105 80 67 49 84 101 99 83 48 126 102 113 111 53 71 90 66 37 68 0 22 30 54 71 33 82 96 121 111 142 152 117 106 150 146 130 131 165 186 118 147 144 105 139 142 151 117 120 89 136 100 87 71 100 88 109 80 78 149 127 133 161 160 140 160 161 171 115 157 137 164 144 152 168 169 116 134 152 137 120 125 134 135 159 130 105 89 115 87 132 98 111 77 80 71 96 72 90 23 31 79 46 46 65 48 30 54 47 108 114 129 83 52 36 33 53 42 69 58 59 67 67 91 49 66 109 60 98 167 142 123 144 93 140 142 114 123 136 114 118 114 119 144 131 170 152 148 168 133 146 138 143 172 112 135 88 144 125 152 111 90 97 111 148 136 101 108 132 105 120 67 95 91 73 87 97 102 67 100 73 138 73 80 75 59 80 99 115 111 115 99 107 93 94 71 47 39 59 28 29 60 64 65 48 41 132 123 86 102 100 116 141 123 163 118 168 145 186 105 81 121 75 135 114 83 119 118 52 116 92 82 92 68 104 116 145 151 116 133 151 184 145 131 93 161 211 144 120 172 152 170 98 156 140 175 142 105 157 165 140 131 77 45 25 18 32 69 32 52 64 41 57 91 55 42 63 43 20 24 49 17 64 36 58 48 82 102 98 115 27 55 11 49 23 94 89 37 16 69 101 89 66 58 67 113 130 77 97 133 154 86 146 133 120 122 116 119 108 173 123 168 125 154 147 140 129 138 181 122 157 127 154 113 95 122 143 100 154 111 73 88 144 145 113 140 106 133 142 83 74 66 69 81 103 71 118 50 100 83 87 54 53 73 108 103 87 127 102 73 106 98 133 100 90 59 27 22 88 44 61 47 33 25 93 136 108 100 59 118 108 127 157 178 146 135 121 120 78 100 114 86 47 91 104 80 94 92 93 84 133 156 126 137 133 158 161 148 123 131 132 147 149 153 168 146 137 159 165 150 135 138 141 132 78 68 67 45 47 51 30 44 57 40 13 66 36 21 45 29 79 22 26 19 48 8 85 28 77 55 60 47 39 124 113 176 142 45 29 60 22 31 43 50 38 39 34 78 53 63 10 14 72 64 64 122 99 84 108 145 95 133 134 107 112 153 129 154 133 145 101 134 138 147 91 156 138 87 120 157 133 112 117 92 108 85 95 111 134 87 121 64 82 94 118 125 83 82 47 74 93 99 91 65 93 110 96 105 76 136 97 78 76 93 61 91 30 99 70 52 86 88 55 64 30 89 35 54 62 68 21 101 113 83 87 86 98 95 150 101 112 106 107 88 93 87 98 102 115 119 114 120 139 77 74 136 191 138 145 123 86 110 97 110 108 104 130 128 167 169 151 171 169 114 149 174 142 120 93 89 44 51 87 57 73 66 49 53 30 30 55 33 33 0 93 34 47 71 49 35 26 35 24 56 27 34 21 87 42 66 97 123 135 136 137 101 70 109 78 53 92 64 85 66 87 129 118 108 106 82 116 126 84 80 68 115 109 113 115 155 110 135 103 104 149 178 168 120 144 138 157 121 139 131 155 138 88 135 133 130 116 104 121 109 83 120 141 129 112 95 140 119 161 119 72 91 74 100 96 68 63 78 89 94 94 93 89 76 67 99 92 93 90 84 54 80 72 88 133 39 16 72 50 64 52 63 73 58 58 48 58 71 113 56 121 93 112 145 90 124 134 64 62 121 138 161 110 108 149 128 109 84 90 135 94 63 104 83 122 112 84 97 107 122 149 116 138 122 178 128 118 167 99 74 60 79 0 47 65 38 82 75 52 72 76 48 28 42 48 75 40 22 16 33 27 21 0 51 12 10 51 55 77 93 47 61 64 136 124 114 148 147 119 109 134 138 95 105 115 91 160 124 89 68 84 90 80 82 94 75 50 102 80 96 126 92 106 88 111 151 91 152 163 133 129 146 159 143 141 146 168 112 145 128 112 118 145 74 128 90 113 121 135 125 92 137 107 111 145 137 95 78 64 78 64 16 43 62 87 61 80 107 71 64 84 107 82 99 108 74 101 82 100 98 59 67 80 53 32 49 47 78 93 73 58 65 65 47 98 47 65 98 73 73 123 87 103 109 88 81 137 126 159 123 70 133 32 20 24 17 74 36 82 117 83 87 106 64 84 93 115 159 148 122 122 89 124 117 77 72 66 59 55 10 70 69 59 0 41 91 67 85 51 32 54 46 18 53 38 11 0 10 22 49 15 22 36 33 7 62 78 91 158 108 133 122 129 116 94 129 145 133 81 174 122 111 119 141 111 101 68 51 71 87 100 92 73 79 84 73 97 107 71 91 97 127 99 143 168 142 163 154 152 136 144 140 145 144 86 131 110 141 134 138 132 56 139 126 112 151 136 115 108 127 89 97 110 97 84 54 75 48 24 50 107 75 77 94 71 116 103 83 85 49 95 99 120 101 72 73 61 139 85 89 53 39 52 52 53 80 48 35 65 48 67 56 61 52 24 122 94 128 107 113 105 80 101 174 88 93 70 19 8 23 46 29 27 16 53 56 26 45 62 67 40 80 46 57 65 98 38 45 73 83 76 47 71 52 50 35 29 38 30 33 2 41 67 45 16 42 52 10 54 29 84 35 41 45 30 49 0 0 34 74 0 33 98 124 108 142 113 136 176 149 164 120 131 120 130 126 154 74 123 114 64 76 51 91 59 79 70 75 95 84 79 57 85 108 104 65 66 102 122 99 167 180 173 127 107 156 178 151 127 172 110 139 111 109 128 122 112 125 98 110 78 126 106 101 110 83 139 145 148 114 117 111 65 49 56 97 51 83 83 85 61 81 82 101 99 80 73 80 100 115 67 100 70 80 100 77 61 47 80 46 24 112 82 70 46 99 61 57 84 51 42 54 29 96 107 122 118 6 73 58 112 83 47 40 7 66 49 8 32 30 20 49 79 91 72 48 64 62 49 37 33 25 12 41 41 28 33 46 29 32 59 26 39 67 2 12 59 83 40 65 53 31 22 68 32 61 46 71 24 46 30 0 3 16 7 74 49 125 113 146 121 140 197 173 121 155 166 185 148 102 144 120 123 102 78 60 53 103 70 64 78 90 54 58 45 45 93 74 74 119 71 68 96 75 81 69 108 144 179 153 147 155 153 128 173 147 155 121 118 169 134 108 148 134 124 99 135 131 84 110 110 103 120 110 92 149 110 128 96 47 59 81 78 64 79 46 106 85 98 89 95 127 97 48 81 92 94 101 92 53 65 75 32 63 42 94 99 91 64 86 72 72 41 78 64 52 52 77 5 41 121 113 121 67 61 1 95 101 33 38 40 25 59 35 11 24 38 70 31 66 31 38 9 32 56 50 34 42 78 12 20 27 44 49 28 23 2 29 34 44 18 32 27 26 32 48 42 68 30 46 28 10 57 39 37 0 27 23 26 26 15 37 176 133 154 164 164 153 149 162 101 159 140 135 136 138 126 57 102 88 75 77 84 96 64 111 49 80 59 50 79 90 123 87 69 70 55 103 69 81 81 69 102 89 147 141 155 167 139 148 169 159 151 142 134 158 129 99 169 126 115 111 103 87 116 116 162 116 107 174 107 148 121 133 65 68 51 88 43 44 24 67 85 103 105 96 84 44 106 106 63 117 88 111 123 99 57 63 52 106 66 53 63 47 60 67 93 63 81 28 43 17 54 61 43 71 54 27 121 100 111 51 56 35 50 51 40 27 56 11 15 6 37 51 86 4 79 56 36 37 49 58 5 52 56 56 25 21 32 34 32 32 15 37 36 36 45 77 32 61 32 51 27 11 0 48 61 17 28 37 33 53 64 50 14 17 70 130 121 107 137 156 139 153 157 174 156 139 121 128 110 178 147 107 109 85 81 72 103 68 50 103 89 65 87 123 70 97 63 56 101 92 56 99 76 52 88 68 88 76 83 121 162 158 161 128 163 121 154 147 121 162 139 118 124 128 95 132 141 131 131 99 133 105 101 147 122 138 106 127 106 61 75 51 64 43 90 111 81 98 61 73 62 104 78 70 101 81 103 63 91 86 76 30 103 55 68 52 87 119 46 52 66 74 57 57 57 58 57 42 71 66 39 84 35 44 50 60 62 93 61 70 75 47 35 34 62 53 30 27 14 33 57 60 42 55 26 35 28 68 23 23 23 10 13 27 38 11 13 24 12 46 28 70 35 21 34 56 39 15 44 38 32 21 28 36 29 42 47 13 44 33 76 123 141 153 170 142 142 148 156 165 169 137 160 202 154 244 197 105 86 66 82 105 93 59 70 97 53 104 116 77 67 98 74 91 79 91 107 73 103 114 84 94 91 73 72 71 170 135 172 102 147 109 126 119 108 143 126 105 145 129 104 135 114 94 118 85 94 83 98 139 86 98 118 124 129 119 90 51 41 48 51 55 113 98 69 106 100 107 87 52 92 78 75 58 101 58 45 69 38 40 64 49 56 59 45 32 72 72 63 64 51 77 61 42 86 71 76 80 56 59 66 45 52 85 52 67 94 72 30 24 56 1 12 0 32 24 51 32 61 0 52 38 32 34 42 30 17 26 23 70 37 28 42 73 39 71 38 42 41 45 29 53 18 58 49 73 37 35 24 36 62 41 55 54 16 37 143 97 158 147 159 107 115 93 139 176 162 146 143 155 169 164 216 106 98 65 110 88 122 53 61 52 79 64 97 74 81 110 97 90 84 26 100 116 60 67 101 94 93 65 130 81 78 138 116 139 141 139 137 123 156 111 128 133 107 108 106 103 96 121 102 118 140 103 109 105 103 143 131 146 154 156 113 93 41 60 108 91 66 110 96 116 119 95 100 87 103 114 81 85 126 54 119 94 80 56 87 47 61 52 59 41 65 64 25 76 64 59 104 67 37 44 54 99 81 75 66 105 100 95 71 34 53 44 69 63 53 49 40 31 65 41 54 27 58 26 32 64 48 36 51 4 3 37 43 35 40 63 17 40 11 75 29 40 9 41 33 56 34 33 44 34 17 40 32 93 62 21 42 27 39 93 102 116 114 173 151 169 133 136 152 122 170 104 145 154 138 167 185 167 84 104 95 80 88 93 117 102 133 79 113 84 95 74 75 40 73 81 51 113 74 60 92 79 48 105 74 78 66 53 173 125 148 106 124 138 169 163 110 128 69 111 97 125 137 89 93 100 107 86 108 87 95 92 120 107 133 126 110 145 128 28 42 92 88 103 101 93 141 122 113 108 90 93 127 104 84 90 91 93 83 71 59 80 69 76 100 82 67 94 66 122 37 73 32 63 37 59 70 85 63 41 54 58 75 70 77 67 88 87 49 43 52 46 32 17 55 64 11 24 0 62 11 1 16 23 70 44 36 10 15 53 39 19 11 15 29 60 27 43 43 37 23 65 30 53 75 34 15 42 58 57 30 11 40 15 45 123 106 139 141 128 129 154 140 173 123 132 170 121 144 145 167 211 215 175 168 103 85 77 62 67 117 97 45 66 99 68 127 95 63 40 66 49 89 52 124 67 67 97 94 97 140 105 118 125 127 145 139 113 94 111 138 128 128 131 109 112 125 87 93 107 129 94 130 120 114 124 104 107 127 119 146 122 115 135 131 120 93 30 78 107 106 110 144 111 130 127 140 126 55 93 95 122 119 114 75 46 69 120 66 70 73 123 69 90 85 94 81 121 62 85 111 68 55 52 106 120 73 52 35 48 62 96 108 64 75 70 68 56 31 53 31 43 25 54 56 27 29 60 0 77 53 46 55 37 21 0 19 45 19 45 22 16 23 48 26 18 28 32 39 4 41 30 34 2 64 10 35 26 9 23 87 167 119 150 77 108 132 137 118 175 164 147 120 145 149 164 107 181 148 118 105 141 70 105 133 92 80 107 103 47 83 72 104 65 118 36 54 72 90 73 69 84 102 64 82 66 114 44 92 57 78 91 102 149 165 139 110 120 131 134 124 128 123 121 122 87 102 70 89 121 117 68 77 118 127 107 116 156 129 132 133 134 100 135 56 43 104 99 143 122 153 174 102 117 79 47 66 68 103 114 75 87 102 82 97 49 94 117 110 109 71 72 112 99 84 113 109 80 35 85 86 80 88 106 75 100 96 91 63 61 31 74 97 87 66 37 67 56 56 74 37 34 55 9 31 72 12 26 17 22 7 55 62 20 1 30 29 34 24 6 20 20 68 48 26 43 46 16 42 25 46 33 53 22 52 35 133 162 134 120 106 133 56 161 138 98 103 145 150 158 122 133 144 170 150 134 146 170 78 100 70 64 65 68 79 78 92 130 50 98 59 56 58 44 113 98 46 68 81 41 54 80 76 77 88 111 78 86 72 152 156 134 153 82 106 135 125 73 127 129 99 119 102 131 121 107 104 127 59 86 115 101 143 117 111 93 95 165 129 121 114 87 29 109 97 92 141 141 106 107 115 96 85 57 115 84 56 74 124 84 67 107 111 70 82 80 72 72 57 92 84 88 85 91 83 64 78 69 86 47 93 122 114 77 67 48 85 96 90 68 76 58 90 53 76 72 38 52 33 44 17 49 37 19 32 22 55 0 0 25 35 11 35 19 2 46 33 28 44 7 15 43 16 57 15 9 42 49 21 0 30 52 132 141 143 116 79 91 113 96 141 114 151 111 110 154 161 118 130 155 160 154 147 122 137 105 64 52 125 76 74 87 88 78 50 92 100 70 114 61 1 88 81 40 64 64 94 64 121 99 101 70 73 18 56 119 119 183 158 140 112 163 141 148 169 109 88 96 88 129 105 136 114 90 97 104 97 114 136 133 110 116 143 148 107 161 110 151 98 59 59 102 98 157 134 128 147 108 122 109 58 100 78 47 91 74 75 115 121 76 96 94 57 71 78 89 102 91 96 149 74 88 81 108 79 106 108 75 63 36 103 115 79 75 89 114 38 87 47 76 53 34 35 15 56 26 23 58 4 26 20 6 63 29 40 20 8 2 52 42 19 53 53 30 73 18 34 56 3 46 25 29 14 62 0 39 0 103 118 169 152 88 80 79 113 108 81 119 144 142 119 150 123 130 137 119 138 169 185 165 118 89 75 88 107 102 59 107 117 107 64 106 56 46 64 81 140 34 41 102 58 92 68 53 78 92 131 92 83 101 52 84 108 100 150 118 154 117 145 123 150 109 160 116 105 100 111 89 130 115 113 114 107 74 148 100 86 104 116 103 149 140 148 130 165 118 75 82 104 114 150 110 114 165 97 118 122 86 55 67 56 64 110 103 122 76 100 98 105 82 110 99 64 75 89 83 89 62 71 58 72 83 90 87 105 82 79 80 57 65 84 74 68 54 90 45 94 58 61 74 39 34 42 48 21 70 24 22 35 5 33 37 47 47 12 22 15 22 43 9 54 53 30 38 40 13 13 33 12 17 49 42 24 121 111 138 116 126 75 94 119 108 107 110 117 76 92 124 130 103 148 158 120 152 214 128 146 109 57 55 64 81 73 79 107 89 62 56 75 95 60 71 105 80 90 87 93 105 87 39 57 65 68 94 112 97 116 86 85 115 133 130 132 135 132 154 148 138 135 101 123 78 83 107 126 121 96 107 87 104 133 146 138 130 130 93 119 150 115 123 155 153 173 139 127 50 88 98 155 112 100 121 98 119 98 99 36 25 31 55 62 72 63 108 71 86 94 106 117 81 64 93 107 66 78 116 114 95 86 84 102 92 53 109 96 59 85 82 70 102 75 75 58 107 77 82 43 30 37 51 63 46 62 20 67 51 61 11 25 35 49 34 65 33 14 27 24 12 35 36 0 8 42 37 23 35 24 17 30 101 89 90 179 129 130 77 79 123 103 126 108 94 123 109 95 166 137 153 141 200 130 154 132 157 46 45 44 95 127 85 80 63 60 62 99 62 82 56 52 78 92 87 87 104 69 78 53 80 74 66 57 63 49 107 88 99 80 120 139 134 130 130 130 112 120 93 112 138 105 79 107 85 97 109 68 106 119 107 145 139 102 127 147 131 103 119 138 132 124 135 86 110 112 95 84 143 76 107 161 108 116 159 78 71 67 26 75 35 41 27 89 119 94 88 81 63 114 98 92 84 99 102 102 62 97 110 78 126 78 86 99 63 88 56 69 60 62 79 55 79 78 66 73 87 81 80 51 47 33 8 44 28 17 25 38 36 17 24 26 61 16 34 23 51 18 81 5 0 0 17 35 28 0 37 0 112 157 152 90 139 89 45 54 106 84 103 162 115 78 132 125 148 133 128 77 125 156 137 168 148 69 64 77 70 80 106 107 68 47 70 102 80 55 72 35 43 89 125 110 56 96 93 18 49 63 55 72 103 73 69 72 95 96 37 146 135 142 150 142 138 176 146 147 96 126 142 93 134 88 114 96 95 125 110 143 111 119 132 108 138 114 130 116 151 148 149 149 128 125 106 140 89 121 135 120 115 85 129 83 77 65 57 86 55 32 37 56 91 104 90 72 100 78 100 80 68 105 100 106 82 89 108 68 56 86 82 79 69 109 64 103 74 101 119 91 84 76 76 79 60 49 73 20 22 36 31 21 14 61 35 33 27 15 11 61 30 27 18 0 27 4 65 60 33 29 21 24 3 22 63 54 127 110 133 118 150 126 120 58 90 87 65 74 89 88 149 148 145 142 114 43 150 166 160 138 158 104 82 83 75 73 73 89 94 50 67 51 94 58 70 20 65 63 75 100 90 99 65 69 68 44 58 83 102 73 75 70 109 58 61 92 122 131 102 138 138 144 118 103 145 120 127 164 141 75 113 128 73 84 141 106 164 128 161 100 97 147 136 114 157 134 160 115 104 126 136 147 108 106 103 131 161 83 175 136 132 115 66 79 98 72 27 34 2 45 2 68 74 91 85 87 95 74 91 46 42 98 88 84 65 58 74 80 97 118 101 97 67 94 73 87 104 86 52 72 108 59 78 117 52 66 32 33 46 7 49 72 15 52 14 14 44 24 0 47 26 0 32 19 94 26 0 32 38 19 38 37 83 108 95 99 185 150 152 99 79 45 101 68 150 129 110 129 158 133 89 70 136 143 191 156 196 86 63 55 65 53 61 83 69 71 44 79 119 64 48 52 78 86 64 81 69 111 49 50 60 139 88 90 123 85 102 73 56 98 67 98 101 169 130 139 128 146 102 102 149 98 124 109 97 96 112 84 150 138 125 88 115 112 129 148 125 144 123 130 108 140 134 144 144 167 138 153 155 115 107 121 73 97 96 119 132 160 74 92 69 81 89 31 18 42 18 27 53 60 67 104 45 88 100 71 58 70 44 78 93 98 131 76 90 102 101 83 86 81 89 78 86 99 96 82 71 64 101 75 57 88 16 39 52 59 57 61 0 49 42 30 37 51 52 14 0 0 42 36 35 59 12 4 32 36 13 77 32 96 129 135 178 143 111 109 51 77 70 119 91 114 130 105 134 95 74 125 144 179 150 168 187 92 75 153 130 151 114 154 135 158 177 154 135 99 104 134 131 104 80 43 39 56 82 57 39 71 81 62 83 35 89 76 70 78 58 95 69 122 156 110 155 155 126 154 95 135 135 112 92 102 112 111 103 111 119 113 111 98 146 163 165 167 185 124 120 105 158 117 97 145 105 140 164 172 98 111 60 123 70 62 87 117 143 122 89 43 92 59 62 77 24 11 53 34 62 31 55 59 95 74 80 114 86 79 103 64 83 81 109 76 94 51 83 73 72 81 104 41 56 63 93 62 91 74 75 42 60 85 69 40 30 42 23 4 20 22 20 3 34 34 93 34 0 49 21 45 43 26 0 2 26 45 82 125 72 126 152 130 141 94 98 74 93 72 84 133 111 125 83 68 98 102 139 133 138 110 158 106 119 142 171 159 142 103 127 197 171 136 118 161 113 126 91 93 82 108 98 103 61 29 57 60 85 32 47 66 45 74 77 58 62 88 76 70 67 141 119 125 131 151 101 113 111 98 106 63 125 97 114 134 122 116 118 119 148 143 125 123 176 110 104 164 131 136 80 123 114 145 100 138 127 113 134 137 76 73 86 95 119 134 83 110 83 75 64 42 63 62 43 34 47 11 43 45 44 59 28 62 98 91 89 73 104 57 84 82 94 69 74 108 93 108 68 70 69 89 49 74 81 78 75 75 31 67 43 57 91 61 59 0 48 55 23 62 0 17 23 6 44 0 20 30 30 17 42 57 11 20 19 61 100 97 127 182 156 136 93 78 93 101 58 96 100 49 30 76 65 105 153 136 120 121 124 68 137 111 135 124 142 130 113 179 113 130 114 134 92 79 118 111 98 99 93 97 48 98 85 25 64 49 91 62 73 36 54 87 75 37 89 109 81 84 134 115 105 105 140 126 65 169 103 158 135 124 121 127 80 86 95 136 148 132 146 131 171 133 171 141 122 114 95 120 129 143 149 153 124 152 160 128 143 123 109 112 92 69 82 137 98 123 104 80 51 42 45 91 53 38 36 25 10 25 23 71 57 50 37 72 58 59 81 75 80 70 69 84 113 55 76 60 117 62 66 35 66 44 36 77 51 79 86 57 65 63 76 64 52 25 15 37 11 67 23 49 37 45 59 0 10 12 41 15 11 6 18 93 116 135 104 109 139 134 113 96 57 104 99 91 71 117 144 109 112 138 161 129 161 137 149 66 145 96 172 129 154 117 109 194 149 138 112 117 114 101 107 99 122 128 123 83 82 88 70 81 79 68 127 54 71 59 35 49 91 40 61 91 85 84 109 100 107 143 107 112 126 123 142 111 78 127 117 126 122 102 132 96 123 82 135 153 157 163 147 152 131 142 102 138 97 140 136 135 140 103 141 153 148 153 156 115 105 114 80 83 83 98 110 24 80 51 60 40 62 44 44 21 55 29 47 50 17 52 49 54 30 68 75 53 44 51 33 73 49 45 40 75 52 49 81 50 75 44 31 85 50 31 73 42 40 34 64 63 39 74 15 76 37 19 86 0 44 37 15 56 45 25 27 21 39 46 5 76 83 148 133 107 100 139 101 85 60 90 99 85 73 85 119 99 101 130 144 136 113 154 141 152 160 105 133 140 128 164 113 134 153 129 128 108 149 111 128 95 91 99 83 79 81 37 114 61 96 108 98 84 66 107 28 62 71 52 69 80 82 100 85 66 115 96 136 139 143 143 134 105 110 107 118 100 79 104 139 92 152 122 113 126 125 127 155 146 159 141 128 147 113 86 102 120 139 121 128 141 147 105 126 130 120 120 109 115 90 82 55 81 95 59 80 69 51 70 95 33 23 53 43 40 59 21 41 55 33 54 52 88 50 58 73 45 62 49 27 54 72 82 47 39 31 57 53 74 50 70 54 74 44 78 43 30 31 80 46 66 43 79 51 17 31 34 14 13 0 8 21 0 15 39 27 22 58 77 100 50 87 97 68 74 76 70 45 55 51 103 82 128 125 151 161 124 139 127 127 154 126 115 97 161 138 124 138 108 97 127 141 113 138 135 151 106 77 94 83 124 96 88 100 67 75 111 54 92 46 109 97 90 50 69 63 55 89 55 115 77 96 132 157 152 147 136 152 147 146 105 102 98 111 91 122 126 127 89 96 140 120 136 154 133 138 119 121 111 148 174 147 95 136 126 130 134 106 148 130 129 122 132 100 84 130 112 58 65 37 94 56 60 59 94 78 59 58 50 72 55 67 92 25 70 58 56 83 21 61 54 73 41 101 57 86 45 34 70 50 57 59 46 77 36 46 15 72 27 68 68 72 40 44 13 87 82 41 101 82 86 55 9 52 20 54 0 39 21 0 52 40 103 95 105 147 86 85 73 93 102 100 77 98 134 127 119 82 151 171 129 106 132 134 77 112 107 108 143 155 130 136 119 84 139 143 128 108 131 116 132 125 83 79 76 106 80 80 81 97 99 59 85 95 83 73 66 60 94 81 75 80 96 101 82 64 33 99 75 160 152 144 99 89 152 107 141 125 108 131 104 125 123 135 134 113 136 105 118 114 133 149 156 133 152 78 121 131 137 148 127 110 151 100 111 123 159 128 157 123 137 167 117 96 77 90 78 56 82 65 78 65 82 76 33 60 31 24 52 64 29 40 60 56 20 29 46 24 10 50 59 54 35 32 34 46 27 56 50 50 89 62 63 48 73 85 34 79 48 44 11 86 64 92 75 70 41 42 84 43 49 9 28 26 25 42 7 70 151 123 62 103 120 116 135 168 146 100 142 97 148 94 98 123 114 162 140 120 37 139 115 141 110 81 102 123 116 148 105 143 131 131 167 169 114 122 152 93 116 75 116 65 92 119 98 100 77 63 91 75 64 58 72 78 82 53 133 84 91 89 77 81 89 75 71 47 103 98 86 122 130 77 91 148 140 129 137 68 111 109 157 91 122 127 114 143 136 136 188 92 130 116 123 123 149 91 116 117 147 104 140 148 158 140 138 129 128 113 148 133 136 87 72 58 43 65 62 55 82 68 41 45 38 18 15 90 66 53 51 65 54 83 9 49 76 34 8 33 43 50 50 65 68 75 28 63 75 53 48 18 60 106 80 24 55 64 35 38 84 25 42 51 66 46 59 47 42 35 48 27 14 44 33 110 91 116 117 27 62 96 107 95 98 87 100 78 146 108 108 88 101 51 108 92 58 98 125 140 136 122 114 114 121 96 85 145 105 100 104 143 105 95 116 86 62 58 93 77 121 93 103 107 94 100 117 83 110 100 74 72 72 66 80 66 95 120 73 99 78 72 121 68 69 111 108 130 111 138 122 155 115 119 133 141 155 117 89 117 159 94 90 153 108 178 117 144 120 150 98 133 94 157 145 144 159 142 146 115 114 83 141 133 133 104 127 163 127 113 145 97 89 103 34 31 34 43 65 49 56 31 17 51 59 48 85 53 83 28 65 34 59 29 51 31 61 15 49 60 46 46 32 19 45 78 45 64 46 13 68 46 69 48 59 55 93 20 63 92 58 82 68 61 71 41 54 75 73 58 64 129 113 94 99 46 13 29 97 76 69 71 109 93 66 48 82 53 22 90 45 93 60 87 129 101 111 98 100 102 94 97 103 96 45 85 138 96 134 87 70 59 102 59 64 60 68 69 96 80 80 62 64 93 76 103 73 55 60 77 71 82 81 84 90 47 100 68 86 101 98 44 162 93 95 71 107 130 143 139 96 144 129 110 132 111 119 104 107 103 114 161 143 143 90 104 107 121 137 118 165 126 156 109 111 139 112 116 145 91 128 122 101 124 109 140 145 136 115 142 60 77 8 51 54 24 45 48 50 55 19 38 43 38 2 58 37 67 27 63 68 0 44 33 33 41 30 57 20 73 39 37 55 47 104 76 94 39 59 69 71 39 43 70 66 69 60 63 50 67 16 57 33 78 28 72 41 78 150 114 104 91 74 22 70 64 63 61 88 65 86 76 49 70 68 48 68 84 80 80 90 92 103 103 96 82 87 109 39 80 92 127 127 135 181 176 117 146 113 122 111 118 70 124 94 90 68 83 50 75 66 70 45 63 35 84 49 61 54 27 119 92 124 104 81 66 69 72 96 107 115 112 125 156 118 112 124 117 132 77 126 105 119 119 128 91 134 117 138 94 169 115 149 135 116 126 124 106 98 154 132 133 130 138 123 119 145 77 113 129 100 127 107 132 126 148 87 91 38 31 42 73 73 36 66 57 59 11 37 22 30 60 51 27 61 60 27 48 72 57 32 76 41 27 25 14 19 58 39 25 8 42 52 38 86 93 44 84 96 46 32 46 38 86 59 79 63 83 110 40 72 66 55 53 100 123 106 77 104 53 66 91 84 65 108 71 93 109 55 52 57 39 95 84 91 92 91 84 97 104 108 88 84 80 132 116 85 67 73 89 132 185 180 167 91 133 109 128 159 117 174 115 112 145 67 77 84 79 97 65 32 58 75 60 58 3 60 62 119 61 90 46 78 73 115 100 143 150 109 124 120 90 82 114 129 162 116 142 122 103 110 117 104 98 128 134 121 143 130 163 142 174 135 82 114 171 89 153 151 152 140 158 141 118 131 122 112 110 145 118 101 125 161 71 85 50 59 86 61 85 31 74 39 62 55 95 25 74 43 35 41 59 73 46 18 56 2 48 21 32 17 35 11 83 46 43 15 74 16 53 31 63 50 82 92 54 96 86 56 54 117 43 68 36 50 54 48 108 55 84 72 116 104 111 39 65 61 61 66 86 76 85 80 76 59 89 58 32 37 59 62 125 125 94 110 111 82 84 61 85 89 116 90 76 62 82 118 168 158 170 123 140 132 150 111 191 147 140 140 131 86 124 85 64 66 62 84 76 90 52 45 34 69 49 18 58 70 114 120 65 49 92 52 121 116 134 110 111 126 106 148 119 131 115 77 115 102 129 179 154 112 125 145 158 90 156 128 180 135 147 133 106 158 120 145 172 168 117 104 146 119 139 119 130 100 61 100 97 106 117 150 130 60 92 69 77 62 44 49 35 45 0 37 41 73 66 33 42 33 34 20 42 41 31 37 62 14 14 56 43 46 29 59 26 31 6 52 61 0 31 16 56 68 36 37 69 67 79 68 74 74 46 63 41 95 19 63 80 120 84 72 78 30 56 65 69 88 107 67 58 74 37 101 24 72 50 87 73 92 102 98 63 114 95 90 31 50 121 85 96 99 165 175 172 166 218 176 168 176 154 116 130 181 104 142 118 173 148 110 45 50 63 77 96 50 59 84 54 76 77 64 70 45 81 91 96 69 73 118 127 107 159 142 136 106 105 130 138 102 147 135 113 136 118 144 173 159 67 100 131 111 137 130 154 116 165 114 111 98 132 103 133 116 155 112 146 114 153 109 152 72 59 85 116 84 99 97 148 153 116 99 83 74 54 68 73 65 69 81 69 30 71 76 51 21 12 35 38 41 41 36 59 53 49 13 16 19 29 48 43 10 89 11 38 56 41 51 31 30 42 28 33 24 51 70 43 78 65 21 46 55 88 60 67 127 104 58 94 71 61 57 90 67 66 108 104 49 79 85 49 93 45 95 87 29 79 100 69 52 31 66 23 21 73 92 157 151 183 226 197 189 216 219 209 213 202 215 172 195 146 140 157 139 119 107 99 86 36 86 86 57 73 73 76 59 83 44 50 72 40 58 44 99 104 87 100 81 149 122 142 127 100 153 154 120 119 122 164 96 138 156 136 143 150 111 124 133 119 133 142 138 126 145 99 108 123 157 135 82 132 103 150 128 134 118 97 120 90 74 89 120 83 108 78 76 122 130 121 109 118 75 97 73 60 33 55 29 39 29 43 10 31 25 68 17 0 60 3 23 19 31 40 60 44 45 31 34 47 0 38 49 57 52 43 16 55 74 47 0 36 73 23 48 53 6 39 41 55 75 73 127 169 95 34 45 60 20 42 29 111 118 65 74 94 74 62 62 40 70 43 76 39 41 79 49 83 109 95 67 62 81 159 138 190 188 188 196 181 173 190 202 163 205 180 196 173 143 135 115 141 139 121 99 64 110 82 81 54 48 55 32 60 66 60 65 60 55 101 51 101 150 105 77 71 139 165 121 165 162 121 144 138 154 114 117 101 97 121 146 133 103 115 128 134 129 143 100 111 117 138 111 127 116 99 95 143 107 162 95 148 125 145 134 102 70 106 105 138 128 106 88 86 101 113 110 136 89 37 91 37 90 75 43 9 62 62 40 61 31 43 28 74 32 27 58 26 27 47 39 23 21 38 0 53 17 25 57 20 29 35 29 64 72 69 62 34 5 68 37 36 53 20 52 33 39 21 62 147 77 86 45 23 55 69 104 90 90 92 65 75 97 137 160 151 152 185 143 168 194 189 225 169 175 191 149 148 114 85 152 118 126 148 120 210 190 203 150 203 163 223 207 224 175 179 139 132 164 92 78 140 83 92 80 85 81 74 120 30 30 54 52 45 66 85 65 100 80 52 54 102 96 138 131 128 135 158 117 170 105 140 133 131 127 158 127 102 117 71 99 147 166 120 140 143 169 164 126 143 89 80 160 143 137 137 101 155 115 124 117 124 89 108 84 91 74 116 106 138 69 95 106 110 120 96 102 110 107 89 52 77 57 55 71 19 45 28 62 38 29 18 41 43 52 68 69 39 26 12 37 29 17 63 26 34 32 33 25 28 34 15 69 77 51 74 37 59 53 41 41 16 75 53 58 90 137 78 97 89 19 64 95 69 70 69 135 174 229 142 177 179 177 196 198 201 231 181 218 197 209 189 235 207 197 110 138 112 118 125 87 141 153 146 172 174 161 180 182 191 205 190 137 115 136 128 105 67 66 115 121 92 72 77 42 55 85 29 40 55 76 61 54 40 95 81 86 58 107 60 140 142 170 149 156 154 122 142 102 95 134 90 82 117 110 99 104 156 125 113 106 92 148 113 139 153 161 139 131 107 100 105 138 128 144 135 137 103 100 112 112 121 73 117 80 47 104 55 46 69 70 86 83 95 70 101 70 72 66 79 88 23 53 67 57 58 77 39 11 58 20 58 31 21 24 67 22 67 18 43 52 63 56 74 43 18 21 41 50 22 38 3 71 68 26 71 35 44 26 50 9 124 122 82 71 39 54 78 15 32 62 101 169 249 210 198 171 221 229 210 212 210 216 210 214 201 219 249 173 203 211 208 178 198 143 126 122 118 124 104 147 142 160 147 191 189 200 182 122 156 116 76 124 90 73 95 128 113 84 27 81 58 77 47 34 40 47 27 38 67 53 34 16 55 72 102 133 132 149 147 147 146 147 154 140 163 124 125 71 129 113 136 107 125 126 84 101 107 150 108 163 108 104 125 160 135 140 121 134 125 131 101 123 141 126 125 90 71 82 73 61 58 104 121 112 69 60 95 94 130 112 112 120 93 76 63 88 73 65 43 90 24 34 36 64 33 61 62 16 73 84 36 68 14 49 54 15 17 43 44 44 53 38 64 63 50 40 25 29 60 18 36 19 71 46 21 42 91 126 111 100 69 32 54 43 98 157 191 193 212 204 231 200 189 224 209 203 167 226 242 174 196 245 225 255 203 240 196 207 191 190 163 144 118 82 121 122 116 139 137 121 177 154 158 143 131 159 143 132 140 142 108 96 52 96 72 70 73 132 66 82 41 42 54 71 70 73 85 36 60 49 94 59 81 170 168 143 150 138 201 155 134 142 129 106 133 134 95 193 121 113 161 94 110 148 128 142 132 184 140 128 128 105 147 122 68 129 88 139 120 131 142 92 107 110 107 57 82 71 101 99 93 84 93 71 53 99 98 94 69 98 63 62 40 73 71 89 72 58 48 0 48 46 38 40 50 68 31 35 35 53 72 52 64 38 57 26 64 34 33 36 48 40 69 56 75 41 39 40 49 40 83 84 121 154 120 96 99 41 61 85 178 191 161 187 194 217 204 195 244 211 245 213 224 255 221 188 245 239 176 255 204 217 183 225 221 215 164 170 135 140 73 121 127 129 114 138 157 149 132 150 142 166 161 167 133 113 111 130 117 91 88 56 120 61 113 96 54 51 59 60 86 54 71 38 70 79 40 42 71 78 147 160 121 148 147 153 134 132 156 121 104 151 95 113 101 115 144 97 121 120 130 128 103 104 143 155 145 152 145 129 97 83 162 130 103 101 150 73 114 77 106 84 109 87 121 94 104 54 85 51 50 63 81 96 112 100 138 95 85 116 97 40 89 57 81 61 23 60 42 48 58 48 24 32 45 4 33 35 36 61 45 41 48 67 68 46 18 59 59 41 58 73 41 55 34 55 107 135 172 120 125 97 87 145 205 193 157 210 183 193 192 205 209 208 240 212 217 203 232 212 232 216 227 208 244 229 193 200 209 217 205 192 207 167 160 139 111 150 110 126 107 136 82 103 110 168 160 132 137 134 153 123 77 89 127 107 121 100 73 58 69 79 91 87 59 71 72 70 65 103 70 62 60 121 80 54 71 146 151 168 183 152 192 157 136 114 150 120 96 109 132 115 110 139 90 89 124 90 105 78 104 145 114 106 116 128 119 56 80 95 109 124 162 100 124 82 94 140 97 111 99 70 78 105 103 49 78 50 62 84 66 102 141 80 113 124 80 76 68 82 64 50 92 97 31 75 42 42 52 33 43 53 79 36 28 66 26 73 70 33 48 66 29 35 60 67 61 57 38 43 62 36 15 62 117 103 77 100 147 175 213 230 185 184 204 214 197 177 172 221 192 201 189 238 189 184 224 246 237 253 245 205 212 197 196 211 213 212 191 151 137 130 144 103 58 101 85 123 89 95 128 75 133 112 98 96 94 99 104 76 68 57 126 100 68 47 65 61 92 70 96 84 84 76 74 21 84 77 55 123 63 92 66 86 134 126 162 171 118 118 165 132 129 121 145 123 101 105 63 110 143 113 113 127 95 92 70 75 124 134 105 105 120 120 84 106 67 102 125 126 107 118 113 116 85 106 126 67 80 93 86 88 89 71 22 106 46 60 97 68 67 93 107 85 83 35 80 63 65 19 19 116 34 47 52 15 28 13 24 48 8 66 69 56 31 60 36 70 29 50 60 86 54 50 52 61 32 54 31 44 17 105 71 173 180 193 186 200 190 212 191 161 181 155 183 147 183 188 179 194 225 208 190 197 226 219 198 198 221 174 203 182 197 218 195 181 166 174 114 123 83 85 101 115 99 108 92 117 106 93 101 125 125 151 99 104 58 70 47 89 127 87 73 94 96 79 87 96 75 74 58 44 36 37 77 81 112 70 85 78 94 138 140 166 128 148 159 128 126 106 121 137 83 85 87 132 139 137 99 97 59 98 125 80 100 109 149 113 109 65 74 66 70 103 80 99 61 113 106 104 77 117 117 131 82 84 93 100 96 58 122 118 91 97 64 80 116 102 107 94 77 56 79 63 59 59 73 29 53 65 81 50 0 46 45 44 47 32 42 3 63 64 58 63 51 50 20 78 58 1 52 92 48 20 56 57 15 61 106 195 196 177 156 190 143 183 152 183 183 122 169 166 194 185 219 228 156 245 193 230 230 211 203 202 216 207 255 206 221 226 194 175 173 155 116 158 118 98 87 109 90 127 77 94 91 94 62 107 72 133 94 106 59 69 68 53 76 79 121 130 62 117 48 50 114 42 91 71 59 53 59 65 59 51 85 64 61 57 181 117 149 158 164 145 137 143 118 139 100 88 127 105 89 87 105 145 126 45 83 101 92 105 66 119 145 118 105 94 94 77 74 106 107 94 94 81 91 107 78 81 100 111 89 109 90 65 81 126 71 64 49 89 61 93 77 125 112 75 107 95 72 66 65 87 70 76 76 46 71 68 75 51 17 59 25 60 41 34 57 67 60 57 65 36 28 21 33 44 72 25 84 66 39 35 142 190 219 198 158 189 152 178 136 147 95 104 164 126 183 155 186 181 217 163 205 208 221 201 208 203 224 213 206 188 176 179 171 174 180 128 174 147 87 102 121 133 122 100 116 100 109 97 57 97 67 63 80 75 78 73 53 38 30 23 84 79 121 49 89 44 78 89 79 67 97 64 52 53 96 45 80 129 60 97 98 194 145 135 152 152 154 154 127 116 125 123 87 139 109 87 148 144 101 85 99 63 110 104 104 77 116 139 138 132 65 61 66 83 94 75 66 64 75 67 100 52 79 62 98 88 106 86 80 78 79 53 83 74 62 83 80 48 82 97 120 93 139 51 88 25 42 43 4 76 97 44 62 77 87 70 54 42 40 50 0 58 45 34 39 66 25 35 53 53 45 14 51 73 24 101 170 190 168 156 165 175 159 107 121 56 89 33 58 151 157 160 164 227 225 223 206 239 184 208 233 199 193 190 189 169 197 165 158 140 109 113 130 151 78 89 89 75 55 76 108 108 115 85 78 75 95 34 82 69 78 50 53 83 44 62 59 68 33 78 135 58 60 62 84 38 99 50 22 125 45 57 75 118 74 96 53 102 141 147 169 182 147 123 148 131 124 101 89 93 107 114 126 128 145 104 69 77 73 125 106 124 87 72 96 129 154 125 86 125 91 78 51 64 59 94 67 83 71 85 86 66 96 141 103 62 69 84 56 89 42 52 55 51 60 49 84 72 78 76 86 83 56 45 62 63 91 45 52 128 50 32 40 75 63 52 58 60 47 27 47 40 4 37 39 36 56 40 62 39 74 87 213 193 193 181 184 135 130 89 71 44 79 39 16 152 180 209 189 169 197 187 192 196 171 213 163 198 180 190 199 205 189 186 120 170 81 147 136 127 92 131 106 86 84 89 81 88 130 96 60 95 78 93 57 108 49 83 75 70 39 24 57 41 83 122 65 113 49 65 69 101 67 98 94 80 80 99 84 79 54 90 67 63 115 188 168 142 143 126 170 114 128 125 83 115 115 116 113 129 110 164 126 110 121 75 111 110 84 87 81 93 127 112 115 126 116 94 123 118 52 69 56 69 75 86 55 89 66 144 94 109 106 115 57 49 82 44 72 64 56 96 51 55 44 97 95 149 91 62 83 75 85 57 92 60 44 65 47 53 42 29 78 62 41 53 65 66 56 73 27 67 53 52 5 88 48 114 174 202 178 155 154 121 96 53 24 68 59 38 58 159 143 182 164 142 201 197 170 186 185 195 189 208 205 191 203 189 196 177 115 136 152 143 135 89 52 68 66 73 75 96 71 93 86 124 53 94 62 74 103 27 115 117 93 77 50 61 16 60 68 42 109 112 58 75 82 69 55 78 79 66 98 46 82 79 82 111 96 109 54 60 162 171 90 154 121 136 134 115 94 150 104 76 130 119 79 128 139 111 133 102 115 55 64 70 94 114 91 68 125 118 111 134 100 133 148 133 113 111 78 92 48 66 63 115 50 87 83 120 73 78 55 64 58 43 66 66 116 62 37 63 41 56 86 72 107 47 93 53 36 38 53 81 46 63 81 36 59 57 83 70 59 61 65 52 39 41 43 70 50 69 104 137 157 174 155 172 100 138 66 58 50 22 54 34 88 188 196 168 181 182 164 165 181 157 198 207 161 185 174 152 164 152 182 215 133 90 138 120 122 111 98 108 63 40 101 80 96 88 55 74 54 114 91 130 84 84 74 103 103 74 71 79 120 104 92 50 18 101 105 114 116 125 38 56 53 53 73 94 79 80 64 71 95 99 46 104 88 154 154 100 100 119 159 150 92 139 132 115 98 97 126 107 126 90 110 87 112 63 45 105 120 73 94 97 48 64 76 101 117 126 131 152 104 142 75 138 104 92 55 100 90 76 69 78 98 67 65 80 121 78 60 94 44 99 85 67 75 20 46 42 68 78 49 43 49 22 73 31 50 73 21 58 76 69 68 41 97 53 57 73 40 64 9 63 64 60 42 117 154 188 137 150 102 111 61 43 40 57 7 44 141 210 196 215 148 182 160 121 191 149 208 180 163 216 181 183 138 166 171 155 140 154 141 128 52 99 68 88 0 64 23 49 73 107 93 82 120 90 98 104 102 126 66 96 73 73 81 98 41 97 76 71 90 39 72 124 125 133 123 97 56 36 75 55 76 76 63 92 70 127 55 64 23 75 125 92 130 123 132 169 95 90 81 108 98 113 104 113 142 79 152 123 74 102 100 108 98 71 68 115 132 61 73 117 93 76 119 83 39 128 138 128 112 118 114 93 139 94 113 109 108 54 72 56 102 73 103 76 59 70 75 46 86 33 91 54 56 67 61 83 73 65 52 69 49 74 24 50 80 65 57 66 49 82 84 49 84 34 73 56 52 42 84 100 221 136 134 155 70 74 7 27 30 18 28 40 162 244 194 181 152 93 120 117 121 127 172 164 187 173 179 161 155 134 140 147 133 130 115 107 69 75 87 33 24 41 43 17 81 0 67 59 107 61 107 66 80 58 88 112 75 95 63 114 94 79 68 58 42 22 32 79 124 112 77 101 110 73 78 100 50 29 23 76 54 71 57 100 83 54 56 145 105 96 117 134 92 119 110 97 101 86 132 75 114 136 89 138 92 102 102 80 74 76 100 90 96 91 72 91 98 48 69 55 101 71 73 103 126 115 98 90 115 146 110 127 141 107 105 119 105 106 107 76 40 41 61 47 58 38 44 14 30 10 16 70 60 43 66 28 74 73 64 43 63 16 83 52 49 68 59 32 40 44 6 8 75 53 50 155 159 166 142 99 102 18 0 19 38 35 34 35 88 176 155 164 193 159 109 112 89 110 105 195 163 177 161 139 170 123 114 140 119 120 122 134 103 77 65 0 23 0 31 0 79 18 15 33 44 28 30 48 69 83 103 63 111 76 61 58 78 43 111 78 45 60 67 23 34 88 71 146 103 122 70 77 91 38 86 58 57 102 111 49 90 109 80 77 140 122 153 123 135 113 137 91 56 97 102 66 87 126 39 87 103 115 65 59 69 55 87 118 38 87 118 70 56 68 79 46 87 56 41 51 70 78 111 77 93 129 137 119 180 104 79 112 127 106 167 91 104 127 115 62 80 33 61 56 20 20 33 46 29 57 29 82 47 15 49 27 43 33 64 38 36 74 59 30 84 48 81 85 61 67 96 129 141 174 94 79 67 49 79 64 38 39 70 20 41 88 186 187 145 149 105 90 75 100 108 91 154 160 137 173 160 148 140 144 119 107 107 83 90 54 14 10 44 16 30 28 41 55 58 24 23 53 43 46 0 59 33 24 25 33 5 73 21 27 45 45 28 0 66 60 0 52 64 74 77 66 84 85 134 81 86 92 32 112 109 47 71 82 113 72 56 87 119 90 108 119 118 103 127 116 91 76 115 62 95 107 111 95 101 97 83 116 76 96 78 89 83 120 83 89 66 74 38 33 53 36 68 46 59 82 41 55 97 120 112 112 74 104 93 81 80 158 140 126 116 104 95 180 134 103 66 88 56 40 61 49 56 49 46 98 63 63 77 92 90 86 86 126 121 105 99 110 94 79 102 109 108 141 85 104 108 34 46 59 103 122 82 61 52 17 51 69 87 174 124 131 88 101 15 178 163 161 147 115 141 96 146 96 117 82 132 136 58 61 69 61 43 28 72 56 105 80 102 90 76 73 94 106 114 117 72 71 60 106 74 16 39 14 72 7 17 73 55 35 74 63 30 83 25 39 18 12 61 74 40 21 98 92 78 100 106 106 68 65 67 88 40 67 141 133 124 160 112 103 113 123 140 130 136 71 95 47 103 108 90 97 66 75 75 83 82 85 95 71 82 72 59 44 51 3 46 52 50 36 55 70 40 68 106 64 83 103 62 74 104 101 134 50 105 124 100 74 136 122 132 146 72 110 128 82 70 77 98 89 98 71 72 105 134 114 115 76 121 94 105 88 108 96 57 90 97 71 44 71 68 46 66 70 58 62 51 117 109 72 63 7 57 43 110 61 123 113 99 95 83 203 173 161 109 117 84 117 127 131 112 118 75 103 95 75 70 56 53 0 35 69 36 51 48 49 52 75 38 66 54 23 58 90 63 104 82 28 66 40 74 88 40 35 60 71 68 91 109 94 91 104 110 75 15 97 70 92 90 28 99 101 64 66 80 54 101 90 91 72 114 139 143 152 142 108 132 132 127 101 99 88 84 94 105 75 89 93 118 73 73 95 97 77 108 75 70 128 86 47 51 61 0 9 67 64 32 68 64 67 52 48 29 89 93 37 93 47 81 95 96 97 55 90 80 95 102 123 77 124 105 93 126 121 103 86 79 93 97 127 93 115 92 74 99 117 102 75 74 82 79 84 108 77 46 94 33 97 59 82 68 45 93 129 120 97 64 12 30 43 69 53 83 90 72 68 72 155 174 181 162 90 82 100 98 137 138 98 79 90 66 62 10 29 35 13 11 15 31 47 33 66 74 12 53 58 71 19 52 29 35 55 77 78 46 41 42 90 39 37 41 9 36 55 58 69 61 121 118 111 82 92 21 48 122 62 95 66 114 75 84 83 88 85 116 81 104 75 102 131 161 161 106 133 75 129 110 108 86 119 90 73 86 88 85 77 126 116 95 90 72 91 90 40 106 80 72 62 91 61 38 26 68 68 34 60 73 44 75 27 33 43 54 85 48 69 80 80 90 61 81 77 121 123 86 91 88 75 114 108 115 75 91 101 103 49 79 130 58 54 73 90 83 58 71 58 60 62 84 71 27 41 42 54 56 32 40 62 64 136 80 106 82 93 20 29 39 38 66 58 60 56 62 91 84 112 85 90 92 20 53 59 50 78 27 72 54 22 22 21 67 21 25 0 48 3 33 47 17 58 27 26 43 57 48 25 25 25 67 29 86 46 70 33 60 50 36 65 49 35 3 5 38 85 118 119 81 91 110 59 78 82 66 97 57 80 88 55 71 118 108 105 65 44 89 144 158 165 178 94 131 100 83 119 76 111 96 105 114 83 80 88 118 89 94 81 111 64 84 93 43 90 55 81 13 86 62 78 32 34 62 38 61 58 51 28 67 35 70 62 68 31 32 83 90 87 65 96 74 106 84 32 70 86 55 88 50 91 88 47 87 76 50 45 42 73 102 64 67 58 36 15 63 43 56 44 18 31 48 28 52 52 59 72 65 80 63 81 101 60 48 88 45 57 66 92 40 23 78 60 30 98 112 114 84 38 36 87 53 74 84 50 39 14 28 41 36 44 29 40 51 34 55 71 45 45 40 59 52 87 1 58 50 59 50 40 83 38 49 64 31 50 47 43 23 0 40 60 48 48 39 36 108 88 121 81 112 76 62 87 109 76 55 117 48 81 78 86 97 44 78 80 141 147 140 123 92 97 105 108 78 95 33 82 92 89 41 96 103 69 89 78 62 101 62 101 68 59 65 91 48 119 115 41 52 79 102 39 37 59 19 18 26 48 84 61 56 44 69 70 58 66 54 82 84 26 80 68 83 87 93 97 60 46 77 74 22 39 42 44 51 1 69 80 56 62 44 27 48 14 51 50 73 39 44 74 84 47 54 33 75 64 55 122 75 61 85 18 30 83 83 89 61 25 23 86 44 77 100 117 56 57 88 67 47 39 58 68 36 9 57 10 46 40 43 25 50 22 16 34 17 84 31 45 58 11 41 36 70 27 62 54 11 43 46 18 51 15 54 16 60 57 33 76 56 39 65 43 58 28 64 81 40 41 106 69 64 34 47 65 112 93 103 100 71 94 58 140 76 124 137 182 120 157 127 140 82 59 94 85 106 88 100 76 100 110 52 98 86 47 62 60 62 90 85 124 92 54 51 33 76 63 25 25 68 62 87 83 86 36 57 56 76 40 46 99 38 72 88 55 59 84 79 52 73 53 78 63 57 72 67 44 40 58 17 55 18 64 35 61 55 32 71 31 55 18 34 74 15 57 8 30 49 63 49 41 59 22 91 81 86 84 66 95 72 61 110 87 42 47 68 80 53 111 95 84 66 62 84 0 55 42 41 15 29 15 28 41 0 10 17 56 69 23 0 32 27 39 27 25 63 35 66 73 44 33 68 78 61 54 16 15 20 30 74 37 74 70 25 44 34 51 65 38 72 54 44 11 47 44 78 43 21 45 0 25 78 66 64 69 71 54 81 53 77 83 97 141 114 122 121 107 112 102 49 97 121 72 129 58 83 85 118 67 76 89 97 95 97 57 77 33 76 90 57 92 39 46 48 18 75 33 29 30 61 80 61 36 34 69 12 85 50 21 56 52 34 59 76 54 58 85 76 66 38 51 48 65 26 94 81 57 49 48 27 74 76 17 66 49 0 23 60 52 34 57 53 53 51 96 31 52 68 6 73 89 126 100 88 95 45 52 89 58 69 86 66 82 96 100 73 8 16 83 65 65 65 62 42 26 32 24 39 31 22 18 34 49 50 59 18 18 40 52 0 62 24 36 11 40 34 6 21 39 35 56 23 67 55 31 42 73 44 81 76 84 84 7 52 25 17 36 64 66 75 67 64 38 62 83 52 24 36 68 67 51 86 48 38 106 98 48 72 92 159 120 136 90 153 85 122 62 57 80 104 52 59 69 83 64 117 97 66 54 86 111 69 25 87 80 122 48 67 55 65 40 40 45 52 63 55 26 28 33 65 56 72 45 22 56 22 35 41 70 57 60 74 46 12 79 78 53 68 107 93 53 49 86 26 43 49 57 60 40 33 16 53 57 39 27 49 57 42 40 27 53 64 69 53 45 53 106 118 139 101 101 82 48 75 31 73 74 81 80 67 88 6 41 111 61 94 82 65 39 20 37 21 2 30 56 17 47 24 47 35 30 57 15 52 1 13 72 47 46 23 37 21 9 45 31 84 55 76 42 65 53 75 87 83 66 65 76 59 6 38 49 39 96 15 43 32 54 51 56 51 82 52 36 69 53 43 43 89 28 56 90 95 69 67 96 134 109 131 141 112 106 110 95 82 93 83 96 84 78 93 102 82 76 91 85 65 64 49 65 70 87 71 62 54 73 96 49 7 44 49 38 42 78 53 71 57 59 75 36 20 17 77 78 60 65 40 40 63 30 52 64 55 43 63 54 60 104 36 40 46 59 90 50 39 83 32 65 41 27 74 88 49 42 36 62 61 89 39 17 63 74 50 77 118 95 75 85 95 45 50 29 100 56 60 84 43 53 32 47 67 17 65 87 59 51 15 47 55 22 41 55 76 25 9 19 51 24 19 26 42 21 46 0 22 40 49 52 23 17 28 37 81 27 25 33 72 73 102 95 89 58 51 89 41 56 25 50 50 1 47 55 49 66 23 42 64 47 36 37 48 51 60 47 57 61 103 103 81 46 38 70 104 103 139 106 120 112 97 97 123 97 68 72 51 70 86 122 132 108 131 60 74 67 96 39 62 62 47 61 95 66 84 67 50 27 46 87 29 32 28 39 49 33 53 72 98 19 32 50 18 80 64 67 63 50 62 81 77 56 75 35 48 36 78 19 89 55 63 72 54 68 62 36 67 65 46 19 31 34 20 68 75 41 64 48 41 51 60 49 49 84 64 93 86 54 61 74 49 14 71 68 1 32 43 18 19 18 65 26 35 38 7 14 36 29 34 48 35 27 0 0 57 42 18 18 14 25 29 0 18 42 13 42 61 16 41 61 0 12 41 47 100 77 87 51 66 74 79 77 41 58 97 27 56 73 41 31 63 84 33 59 25 45 41 25 23 90 50 28 63 57 62 56 36 84 62 106 59 69 138 93 88 137 160 172 143 107 95 93 26 81 86 89 95 63 109 71 68 94 68 102 84 57 25 53 62 135 127 78 43 40 65 96 61 59 27 24 31 54 73 51 22 37 78 27 36 91 24 63 99 68 72 60 44 57 48 69 47 60 50 71 52 7 55 35 72 41 34 40 28 45 58 39 35 51 39 48 70 66 67 49 53 57 27 102 39 46 25 26 54 59 60 36 33 14 40 29 49 46 42 0 4 52 0 0 3 0 26 51 14 43 22 37 20 17 63 46 22 12 49 33 32 51 33 43 52 47 43 9 11 12 24 13 9 16 44 20 5 27 33 53 28 39 53 51 43 51 28 38 29 37 30 21 44 24 19 18 8 0 58 0 0 25 39 26 46 13 70 73 83 64 54 0 51 53 53 137 107 156 139 102 152 100 118 74 63 45 44 39 69 71 69 89 126 72 95 99 127 56 83 62 30 29 133 62 99 83 66 61 30 71 37 48 66 49 34 24 51 34 71 24 43 65 40 50 85 76 42 58 61 93 42 107 71 45 45 51 44 71 61 55 68 68 54 92 42 90 51 53 33 101 54 63 38 46 32 62 44 55 41 35 89 42 49 25 28 72 10 53 55 37 34 45 24 7 32 41 33 23 0 13 19 35 44 75 41 64 50 64 43 39 62 38 44 52 35 17 17 63 70 19 62 18 55 63 43 20 23 33 14 25 0 38 5 21 10 25 56 52 29 0 41 35 41 31 27 21 16 14 9 25 0 14 23 7 4 0 0 0 17 0 10 44 16 35 30 33 13 43 14 7 0 84 132 170 149 141 145 53 116 50 85 94 76 120 81 51 65 53 106 122 58 58 94 116 54 66 90 49 93 88 74 80 77 72 83 69 65 33 53 95 65 63 48 36 65 30 30 77 41 65 55 86 63 62 57 56 54 50 64 25 31 7 64 30 50 25 42 38 50 45 72 53 37 69 65 65 62 66 50 52 89 44 99 69 71 39 55 17 53 37 23 4 69 58 10 36 70 34 41 38 42 18 60 10 82 6 35 51 56 43 11 31 60 57 107 39 58 30 0 36 51 46 42 41 21 14 57 0 43 7 23 29 19 30 27 13 0 33 8 59 29 30 22 9 1 3 25 20 21 41 41 14 34 34 0 27 17 0 0 20 5 16 29 13 12 0 0 0 31 14 33 39 40 25 0 15 20 24 105 131 108 105 109 88 106 157 104 57 107 85 85 73 44 86 80 83 88 139 33 64 77 104 105 80 56 92 67 49 99 44 63 54 66 73 59 71 32 67 68 50 28 31 59 12 43 48 29 67 69 78 52 68 27 52 45 36 67 44 49 16 60 50 77 52 53 57 79 43 65 39 66 39 42 52 58 48 40 34 55 59 15 35 78 40 57 36 54 45 34 34 31 46 63 60 67 52 42 27 48 63 80 56 55 29 40 33 45 1 63 109 32 38 14 55 50 45 39 28 55 34 54 51 26 39 11 68 70 21 67 30 20 22 30 20 19 25 0 0 6 0 24 0 0 5 2 0 21 13 27 37 46 4 30 19 0 0 0 15 0 56 0 0 47 21 11 0 6 8 14 4 2 38 43 41 0 4 98 167 112 98 117 139 140 99 94 114 74 96 76 67 102 65 93 104 110 33 52 84 102 81 57 86 32 111 132 93 124 59 93 71 38 71 41 62 27 17 66 49 61 24 74 64 0 51 65 21 46 56 14 47 60 16 64 52 33 47 62 32 76 51 91 76 54 42 35 78 21 68 49 60 27 54 37 56 23 33 34 44 30 80 62 47 7 2 27 15 56 49 50 67 79 25 25 40 57 67 26 63 40 48 51 17 44 46 45 14 32 41 17 43 35 3 47 23 38 13 67 0 28 33 51 36 59 54 55 73 23 46 18 19 3 13 3 28 19 42 48 25 0 5 14 0 22 0 0 45 2 1 31 24 27 12 3 11 0 0 0 20 5 17 23 44 19 43 0 17 6 47 27 4 0 24 20 149 116 126 141 123 100 95 120 67 83 98 74 81 81 77 88 52 120 48 74 78 90 107 65 75 86 62 143 115 80 67 99 60 68 21 43 7 25 16 37 74 36 59 16 91 48 34 18 67 37 38 50 60 78 74 63 2 27 19 68 43 55 3 30 58 101 41 39 21 50 51 34 91 71 34 27 22 39 42 11 31 21 26 6 29 52 79 58 99 43 38 34 56 42 55 34 70 52 58 38 46 51 16 63 8 62 46 44 0 57 65 23 62 28 15 35 44 58 7 109 47 99 65 27 78 31 64 31 45 69 29 0 31 26 0 34 3 0 44 1 6 2 12 0 30 4 10 40 19 44 18 0 8 13 18 22 12 14 0 30 20 16 4 13 29 0 31 33 41 51 39 32 10 16 15 66 64 134 166 128 119 106 115 102 92 93 102 55 83 75 76 96 44 47 81 52 72 56 46 104 105 89 89 44 115 74 104 91 55 34 68 26 68 51 64 8 45 117 59 81 31 9 84 56 48 44 64 38 27 37 40 55 54 21 58 44 21 53 64 74 62 81 10 90 48 77 53 52 45 40 35 29 57 26 70 23 58 40 15 74 59 31 53 26 19 6 13 60 34 27 58 59 7 41 33 0 57 42 60 54 49 38 63 27 29 16 62 18 21 28 21 44 45 32 19 48 7 52 5 48 76 0 50 31 28 56 31 41 37 16 0 16 23 7 35 39 0 27 11 0 27 32 20 42 14 37 0 47 20 1 36 42 49 22 29 42 0 30 16 48 13 40 16 0 27 27 36 49 9 0 23 11 23 3 118 141 125 131 74 95 85 120 101 110 60 78 47 64 54 38 56 75 71 64 73 52 83 33 131 35 53 69 95 86 58 64 85 46 27 58 32 72 32 14 47 14 58 54 66 35 79 29 55 46 21 33 36 34 3 31 35 26 33 55 74 31 34 87 70 55 41 71 96 67 5 42 54 54 53 1 84 36 6 50 0 48 23 63 24 26 37 74 20 55 9 44 41 42 16 16 52 23 6 46 66 53 32 61 29 22 37 23 56 27 48 26 35 13 20 16 35 66 43 97 46 45 43 27 10 26 61 62 34 0 0 53 30 33 13 26 17 0 38 13 4 21 43 22 25 22 0 31 31 11 40 27 28 30 2 22 16 3 0 47 10 7 51 49 34 0 20 34 49 14 0 0 28 4 63 62 2 165 108 96 135 115 121 108 78 93 92 68 100 96 59 75 52 33 63 54 54 44 82 74 59 89 83 81 36 120 70 89 46 82 62 21 43 41 33 16 84 3 61 17 43 36 47 92 79 60 35 22 28 30 27 0 8 0 26 16 36 26 78 43 20 55 69 23 6 42 77 82 54 59 40 15 41 51 55 49 2 11 83 38 42 10 47 20 55 50 56 55 74 27 50 65 29 48 95 1 38 9 67 4 41 48 33 48 42 28 23 66 20 27 24 68 40 43 26 33 31 53 26 26 25 47 41 7 0 25 67 23 6 18 31 24 7 25 0 13 42 28 22 33 24 46 33 16 27 0 28 60 0 55 0 49 8 17 15 60 46 25 38 0 19 42 16 0 8 26 0 25 21 84 42 0 29 36 124 159 167 124 97 103 93 61 85 59 94 78 73 95 50 55 59 46 65 86 89 60 82 99 127 52 79 57 99 76 82 74 18 90 56 57 53 30 41 70 38 38 84 49 33 63 37 40 28 60 37 16 24 0 44 13 72 67 0 0 41 21 13 37 15 82 12 38 71 54 62 31 75 45 65 55 21 10 42 29 35 40 42 76 12 48 39 13 33 59 14 50 47 36 29 21 24 10 50 20 26 38 22 52 24 18 31 4 10 20 33 46 32 85 22 47 19 14 32 10 11 5 29 43 35 34 47 14 26 33 37 13 0 42 32 30 26 27 28 0 26 36 18 0 30 21 32 0 60 23 0 21 0 20 17 7 30 20 34 28 74 29 8 39 35 11 14 24 55 0 45 57 17 0 48 19 59 123 140 127 84 104 105 108 118 78 108 74 70 60 82 69 71 69 92 79 38 109 54 88 100 125 83 73 57 103 94 49 85 81 48 28 44 0 52 0 63 43 45 35 54 29 46 51 50 36 0 44 63 0 0 6 29 37 19 46 51 15 1 43 0 59 10 57 23 24 46 44 55 61 76 32 24 20 61 31 42 79 6 45 66 22 54 50 40 65 15 9 16 22 46 37 15 53 5 27 18 24 43 35 22 5 10 9 13 46 6 37 36 30 25 22 0 22 0 40 36 3 41 34 49 10 62 91 25 43 5 36 3 22 13 12 27 37 36 33 7 4 21 29 28 0 13 0 6 36 40 2 32 7 16 20 34 0 15 0 5 10 1 27 60 13 0 45 23 11 18 0 40 63 25 12 43 5 111 133 95 97 119 92 126 76 89 71 36 38 14 28 71 19 44 76 106 78 73 112 114 92 75 97 72 68 65 102 100 156 37 82 35 68 10 58 26 47 80 33 8 75 55 53 75 65 49 22 36 40 29 0 43 32 19 71 9 26 43 48 35 47 51 41 66 34 0 5 82 38 51 73 75 41 29 40 41 69 31 53 54 14 43 30 9 0 17 33 42 0 15 21 7 22 49 22 21 39 35 22 33 36 14 39 30 33 9 22 10 24 42 10 41 54 0 43 8 18 54 35 39 27 2 66 59 24 10 53 25 20 0 46 53 15 2 36 14 18 13 38 1 63 28 51 10 14 28 23 36 16 33 9 16 23 23 0 41 17 18 29 21 0 12 12 42 51 0 27 32 31 19 19 57 51 43 99 118 134 117 121 100 106 83 81 65 85 96 59 86 69 57 44 43 66 79 45 107 102 64 60 111 86 75 46 94 81 80 80 30 47 32 34 37 23 35 21 48 82 53 73 46 43 37 56 17 66 40 35 39 44 42 0 30 15 16 3 35 44 58 33 7 36 37 37 36 35 32 50 46 59 1 19 12 26 17 52 25 56 3 22 11 25 7 46 17 48 34 29 0 59 36 0 16 14 64 39 23 58 64 34 6 19 24 45 25 1 14 0 27 0 17 2 11 60 6 27 29 11 13 22 49 20 51 2 29 37 43 13 16 28 62 29 16 0 25 38 33 10 32 10 43 40 19 46 13 3 2 2 41 17 20 0 15 13 0 40 22 29 47 41 18 27 2 39 5 7 28 39 32 11 61 32 104 109 80 120 111 67 90 99 97 67 108 96 81 22 55 63 39 89 90 94 48 78 85 80 72 86 96 62 57 80 119 67 91 67 69 78 41 47 45 16 16 54 0 11 34 33 53 63 56 19 74 53 19 6 6 78 32 19 39 27 58 46 19 36 36 40 45 6 42 11 24 57 39 14 34 0 16 0 1 45 9 47 28 4 32 3 27 15 10 23 13 40 46 74 28 27 5 0 38 11 6 13 25 21 0 20 26 48 26 19 15 19 0 38 29 49 12 12 34 1 29 24 54 40 0 61 43 2 22 31 41 40 25 4 20 0 61 3 32 10 42 33 2 0 0 0 42 45 10 2 11 6 28 12 25 9 39 32 0 0 48 0 34 16 8 92 7 32 42 13 43 26 17 75 66 92 55 118 102 90 86 131 87 134 127 52 89 112 105 79 78 37 59 30 89 51 57 98 50 111 84 65 78 73 50 75 68 75 76 68 63 34 51 42 28 29 24 66 21 45 2 10 15 62 41 77 34 31 31 55 47 23 12 21 0 55 56 28 54 70 14 8 19 11 10 40 21 0 51 26 29 11 54 49 30 25 8 6 0 26 26 17 0 10 31 59 4 47 51 7 7 32 17 0 22 5 16 33 27 65 27 17 0 0 27 21 0 20 15 41 0 62 7 12 34 58 22 27 43 12 33 46 52 24 22 10 60 56 17 26 3 37 29 13 8 0 15 12 21 27 34 24 0 19 27 33 30 32 0 22 0 20 36 16 0 0 36 23 0 6 7 16 51 63 33 38 25 0 8 19 4 0 41 45 116 127 137 117 92 109 137 95 82 91 64 74 100 51 56 75 49 106 70 48 94 55 79 96 36 70 80 74 74 0 83 107 113 60 75 72 4 19 45 24 32 33 9 42 79 17 40 71 42 26 102 52 70 33 42 42 28 24 20 59 0 16 55 35 0 0 0 14 14 38 6 6 2 2 20 13 28 2 13 28 27 0 23 19 46 37 48 40 12 34 9 29 24 0 46 0 41 43 5 10 5 28 16 0 25 35 19 38 23 62 3 60 7 46 37 64 11 0 0 0 13 43 67 45 17 50 64 0 35 15 16 12 41 31 0 13 0 0 22 0 22 7 22 60 41 22 31 0 21 0 32 48 0 12 40 18 32 28 2 35 26 43 0 41 10 1 0 37 0 25 29 15 43 38 52 42 83 130 102 111 89 137 103 74 109 85 45 69 99 89 65 55 78 72 70 110 80 115 95 115 96 81 76 94 87 54 36 92 114 73 102 50 2 75 17 3 23 50 47 57 45 23 3 27 92 62 94 57 50 3 63 33 21 38 54 57 33 39 17 27 68 15 12 40 28 0 6 22 12 40 37 50 39 0 1 23 42 56 60 5 31 35 18 36 20 36 6 23 27 9 22 4 46 48 8 43 13 0 10 0 0 26 43 18 52 30 25 17 56 54 22 0 48 20 25 43 58 47 27 30 36 26 10 77 20 64 19 31 7 37 7 26 29 0 43 20 0 13 28 36 43 54 33 35 36 0 26 16 35 39 23 8 31 39 12 59 57 22 9 23 0 26 61 27 43 20 23 4 62 17 47 27 42 43 "
  },
  {
    "path": "3rdparty/ceres/data/libmv-ba-problems/Readme.txt",
    "content": "Problem files are created from Tears of Steel production files.\n\n- problem_01.bin is a final camera motion refinement step of 07_1a scene.\n- problem_02.bin is a final camera motion refinement step of 03_2a scene.\n- problem_03.bin is a final camera motion refinement step of 09_1a scene.\n"
  },
  {
    "path": "3rdparty/ceres/data/problem-16-22106-pre.txt",
    "content": "16 22106 83718\n0 0     -3.859900e+02 3.871200e+02\n1 0     -3.844000e+01 4.921200e+02\n2 0     -6.679200e+02 1.231100e+02\n7 0     -5.991800e+02 4.079300e+02\n12 0     -7.204300e+02 3.143400e+02\n13 0     -1.151300e+02 5.548999e+01\n0 1     3.838800e+02 -1.529999e+01\n1 1     5.597500e+02 -1.061500e+02\n10 1     3.531899e+02 1.649500e+02\n0 2     5.915500e+02 1.364400e+02\n1 2     8.638600e+02 -2.346997e+01\n2 2     4.947200e+02 1.125200e+02\n6 2     4.087800e+02 2.846700e+02\n7 2     4.246100e+02 3.101700e+02\n9 2     2.848900e+02 1.928900e+02\n10 2     5.826200e+02 3.637200e+02\n12 2     4.940601e+02 2.939500e+02\n13 2     7.968300e+02 -7.853003e+01\n15 2     7.798900e+02 4.082500e+02\n0 3     5.925000e+02 1.257500e+02\n1 3     8.610800e+02 -3.521997e+01\n2 3     4.985400e+02 1.015600e+02\n6 3     4.123100e+02 2.729200e+02\n7 3     4.267300e+02 2.995900e+02\n8 3     4.683800e+02 5.512000e+01\n9 3     2.879500e+02 1.839400e+02\n10 3     5.840500e+02 3.509700e+02\n12 3     4.973199e+02 2.825100e+02\n15 3     7.819500e+02 3.932600e+02\n0 4     3.487200e+02 5.583800e+02\n1 4     7.760300e+02 4.835300e+02\n2 4     7.780029e+00 3.263500e+02\n3 4     -1.372400e+02 -7.799988e+00\n5 4     7.500699e+02 -7.871997e+01\n6 4     -1.160900e+02 6.642200e+02\n8 4     8.704999e+01 2.563100e+02\n9 4     -1.471900e+02 3.578000e+02\n11 4     4.569200e+02 -1.971600e+02\n13 4     4.635800e+02 2.410300e+02\n14 4     6.482500e+02 -1.595700e+02\n0 5     1.401001e+01 9.642001e+01\n1 5     2.071300e+02 1.183600e+02\n3 5     1.859003e+01 -2.068000e+02\n4 5     -2.095300e+02 -4.217600e+02\n5 5     6.350900e+02 -5.616200e+02\n6 5     -6.738000e+01 1.258300e+02\n7 5     -9.081000e+01 2.093600e+02\n8 5     1.251800e+02 4.523999e+01\n9 5     -2.071997e+01 1.799200e+02\n10 5     -8.720001e+01 2.550200e+02\n13 5     3.672600e+02 -1.403400e+02\n15 5     -2.814001e+01 2.705200e+02\n0 6     2.027600e+02 3.409900e+02\n1 6     5.431801e+02 2.948100e+02\n2 6     -5.841998e+01 1.108300e+02\n6 6     -1.970800e+02 3.693100e+02\n9 6     -1.916600e+02 1.693800e+02\n10 6     1.095900e+02 5.662500e+02\n12 6     -4.534003e+01 3.656000e+02\n13 6     3.698700e+02 4.792999e+01\n14 6     5.376000e+02 -3.953000e+02\n0 7     2.784998e+01 6.340997e+01\n1 7     2.076700e+02 8.259000e+01\n3 7     5.706000e+01 -2.246000e+02\n4 7     -2.321000e+02 -4.337000e+02\n5 7     6.628300e+02 -5.977400e+02\n6 7     -3.060999e+01 9.716998e+01\n7 7     -6.769000e+01 1.800300e+02\n8 7     1.541100e+02 2.748001e+01\n10 7     -6.696997e+01 2.173500e+02\n12 7     -1.144000e+01 1.517900e+02\n13 7     3.881100e+02 -1.658300e+02\n15 7     -5.020020e+00 2.274200e+02\n0 8     -2.750000e+01 9.788000e+01\n1 8     1.702000e+02 1.310200e+02\n3 8     -3.317999e+01 -2.263400e+02\n4 8     -2.051100e+02 -3.883200e+02\n5 8     5.803199e+02 -5.634100e+02\n6 8     -1.245300e+02 1.102100e+02\n7 8     -1.350300e+02 2.014500e+02\n8 8     8.146002e+01 3.072000e+01\n10 8     -1.359700e+02 2.526800e+02\n12 8     -9.739001e+01 1.646700e+02\n13 8     3.259200e+02 -1.444000e+02\n15 8     -8.390997e+01 2.669100e+02\n0 9     -2.878700e+02 4.245500e+02\n1 9     6.648999e+01 5.046000e+02\n5 9     1.167700e+02 -2.296800e+02\n8 9     -3.860500e+02 1.203500e+02\n11 9     -1.079600e+02 -3.335700e+02\n13 9     -3.758002e+01 9.117999e+01\n14 9     3.228998e+01 -3.212400e+02\n0 10     2.057800e+02 4.791800e+02\n1 10     5.918000e+02 4.354700e+02\n3 10     -2.434800e+02 -9.378998e+01\n5 10     6.078101e+02 -1.671800e+02\n7 10     -2.639001e+01 5.679100e+02\n14 10     5.138800e+02 -2.489400e+02\n0 11     -3.105400e+02 3.763300e+02\n1 11     3.300000e+01 4.634700e+02\n2 11     -5.909000e+02 1.078800e+02\n7 11     -5.205800e+02 4.047900e+02\n8 11     -4.043000e+02 7.310999e+01\n11 11     -1.296200e+02 -3.755400e+02\n12 11     -6.313300e+02 3.121400e+02\n13 11     -5.696997e+01 4.944000e+01\n14 11     6.109985e+00 -3.718900e+02\n0 12     -2.168800e+02 -4.861600e+02\n1 12     -1.780400e+02 -3.683000e+02\n0 13     -3.132700e+02 4.044100e+02\n1 13     3.688000e+01 4.912400e+02\n7 13     -5.272300e+02 4.339600e+02\n10 13     -5.121800e+02 5.931300e+02\n11 13     -1.306200e+02 -3.524300e+02\n12 13     -6.389500e+02 3.464000e+02\n0 14     -4.466800e+02 2.216200e+02\n1 14     -1.351100e+02 3.486600e+02\n5 14     -6.496002e+01 -4.504900e+02\n7 14     -6.385100e+02 2.242000e+02\n10 14     -6.492300e+02 3.592700e+02\n11 14     -2.603000e+02 -5.149000e+02\n0 15     -3.948000e+02 3.086400e+02\n1 15     -6.462000e+01 4.186700e+02\n5 15     -3.280029e+00 -3.539900e+02\n7 15     -5.980400e+02 3.229200e+02\n8 15     -4.761100e+02 1.820007e+00\n10 15     -5.981700e+02 4.687200e+02\n11 15     -2.072500e+02 -4.353200e+02\n13 15     -1.271600e+02 -1.440002e+01\n14 15     -8.452002e+01 -4.475601e+02\n15 15     -6.041500e+02 5.064400e+02\n0 16     -3.705100e+02 3.271000e+02\n1 16     -3.682001e+01 4.306000e+02\n5 16     2.346997e+01 -3.346800e+02\n7 16     -5.754700e+02 3.454500e+02\n8 16     -4.551500e+02 2.050000e+01\n10 16     -5.711700e+02 4.937700e+02\n11 16     -1.851900e+02 -4.192400e+02\n12 16     -6.937400e+02 2.401900e+02\n15 16     -5.738200e+02 5.354800e+02\n0 17     -5.534700e+02 4.375600e+02\n1 17     -1.853700e+02 5.787300e+02\n11 17     -3.367200e+02 -3.189600e+02\n0 18     -4.341400e+02 4.274400e+02\n1 18     -7.542999e+01 5.424400e+02\n2 18     -7.231700e+02 1.731400e+02\n10 18     -6.657300e+02 6.132900e+02\n0 19     -5.044400e+02 3.330700e+02\n1 19     -1.632600e+02 4.683200e+02\n5 19     -1.100300e+02 -3.237900e+02\n7 19     -7.171000e+02 3.349000e+02\n8 19     -5.770300e+02 2.210999e+01\n10 19     -7.381500e+02 4.900900e+02\n15 19     -7.633900e+02 5.258700e+02\n0 20     -5.365200e+02 2.877000e+02\n1 20     -2.035200e+02 4.333000e+02\n7 20     -7.445700e+02 2.824400e+02\n13 20     -2.435300e+02 -3.773999e+01\n15 20     -7.996900e+02 4.587900e+02\n0 21     -5.267900e+02 2.775900e+02\n1 21     -1.966700e+02 4.214600e+02\n5 21     -1.414300e+02 -3.843900e+02\n7 21     -7.326900e+02 2.729400e+02\n10 21     -7.574700e+02 4.203400e+02\n11 21     -3.277800e+02 -4.606100e+02\n13 21     -2.362100e+02 -4.604999e+01\n14 21     -2.221800e+02 -4.812200e+02\n15 21     -7.843600e+02 4.459000e+02\n0 22     -4.797200e+02 4.078300e+02\n1 22     -1.228300e+02 5.340200e+02\n5 22     -7.429999e+01 -2.439400e+02\n7 22     -7.020000e+02 4.191500e+02\n8 22     -5.541900e+02 1.003900e+02\n11 22     -2.763800e+02 -3.458400e+02\n13 22     -1.917000e+02 7.029999e+01\n14 22     -1.567600e+02 -3.381400e+02\n0 23     -4.335900e+02 4.062700e+02\n1 23     -7.928003e+01 5.217400e+02\n2 23     -7.237600e+02 1.452100e+02\n5 23     -2.913000e+01 -2.471400e+02\n7 23     -6.527900e+02 4.227100e+02\n8 23     -5.123100e+02 9.954999e+01\n10 23     -6.613000e+02 5.869200e+02\n11 23     -2.364000e+02 -3.480900e+02\n13 23     -1.546000e+02 7.046997e+01\n14 23     -1.115200e+02 -3.399600e+02\n0 24     -5.171400e+02 3.709500e+02\n1 24     -1.664300e+02 5.075700e+02\n5 24     -1.168500e+02 -2.821500e+02\n7 24     -7.365900e+02 3.748800e+02\n8 24     -5.890700e+02 6.162000e+01\n10 24     -7.601400e+02 5.362900e+02\n11 24     -3.112400e+02 -3.771000e+02\n13 24     -2.233400e+02 3.629999e+01\n14 24     -1.986000e+02 -3.778700e+02\n15 24     -7.887000e+02 5.784900e+02\n0 25     -4.289100e+02 4.224400e+02\n1 25     -7.135999e+01 5.363700e+02\n2 25     -7.189300e+02 1.660800e+02\n4 25     3.250000e+00 -1.125400e+02\n5 25     -2.232001e+01 -2.294600e+02\n7 25     -6.505400e+02 4.405200e+02\n8 25     -5.083300e+02 1.163100e+02\n10 25     -6.577600e+02 6.075100e+02\n11 25     -2.316100e+02 -3.341900e+02\n12 25     -7.809300e+02 3.521600e+02\n13 25     -1.507800e+02 8.448001e+01\n14 25     -1.054500e+02 -3.228700e+02\n0 26     -5.069500e+02 4.007100e+02\n1 26     -1.502500e+02 5.334800e+02\n5 26     -1.021000e+02 -2.507300e+02\n7 26     -7.299800e+02 4.080800e+02\n8 26     -5.790900e+02 9.237000e+01\n10 26     -7.527500e+02 5.746400e+02\n11 26     -3.004900e+02 -3.519500e+02\n13 26     -2.141300e+02 6.309003e+01\n14 26     -1.845200e+02 -3.455300e+02\n0 27     -4.478900e+02 3.609900e+02\n1 27     -1.046800e+02 4.822400e+02\n5 27     -4.701001e+01 -2.956700e+02\n7 27     -6.602400e+02 3.726700e+02\n10 27     -6.716700e+02 5.292300e+02\n11 27     -2.528500e+02 -3.869000e+02\n12 27     -7.925600e+02 2.724600e+02\n13 27     -1.660900e+02 3.047998e+01\n15 27     -6.895500e+02 5.734000e+02\n0 28     -3.717700e+02 3.349400e+02\n1 28     -3.633002e+01 4.384600e+02\n4 28     -5.022998e+01 -1.328300e+02\n5 28     2.313000e+01 -3.257800e+02\n7 28     -5.778600e+02 3.534800e+02\n10 28     -5.736700e+02 5.032000e+02\n11 28     -1.857300e+02 -4.123600e+02\n13 28     -1.072800e+02 1.037000e+01\n14 28     -5.821002e+01 -4.180100e+02\n15 28     -5.771200e+02 5.461800e+02\n0 29     2.929399e+02 -2.407300e+02\n1 29     3.787000e+02 -3.008300e+02\n12 29     3.769700e+02 -1.269300e+02\n15 29     3.971500e+02 -1.510400e+02\n0 30     -2.287500e+02 4.542400e+02\n1 30     1.322000e+02 5.195400e+02\n2 30     -5.090100e+02 2.041600e+02\n4 30     4.530029e+00 -2.236600e+02\n8 30     -3.386600e+02 1.507000e+02\n11 30     -5.545001e+01 -3.074400e+02\n12 30     -5.499200e+02 4.199100e+02\n14 30     9.203003e+01 -2.891900e+02\n0 31     -4.568500e+02 3.491600e+02\n1 31     -1.144900e+02 4.727700e+02\n4 31     -3.435999e+01 -8.971997e+01\n7 31     -6.686900e+02 3.585800e+02\n8 31     -5.319300e+02 4.114999e+01\n11 31     -2.600300e+02 -3.975300e+02\n12 31     -8.016400e+02 2.550200e+02\n15 31     -6.988700e+02 5.560200e+02\n0 32     -3.717600e+02 3.534700e+02\n1 32     -3.197998e+01 4.563500e+02\n5 32     2.556000e+01 -3.052100e+02\n7 32     -5.805700e+02 3.736500e+02\n8 32     -4.570300e+02 4.829999e+01\n11 32     -1.844300e+02 -3.952500e+02\n12 32     -7.000700e+02 2.734700e+02\n13 32     -1.064700e+02 2.695001e+01\n14 32     -5.603003e+01 -3.973200e+02\n15 32     -5.806100e+02 5.728400e+02\n0 33     -3.686800e+02 4.200900e+02\n1 33     -1.358002e+01 5.199100e+02\n2 33     -6.536800e+02 1.625900e+02\n7 33     -5.868600e+02 4.445900e+02\n14 33     -4.654999e+01 -3.255900e+02\n0 34     -4.324200e+02 4.189200e+02\n1 34     -7.521002e+01 5.340000e+02\n2 34     -7.222900e+02 1.626000e+02\n7 34     -6.535700e+02 4.367300e+02\n10 34     -6.620400e+02 6.029000e+02\n14 34     -1.089800e+02 -3.260300e+02\n0 35     -3.240900e+02 3.997800e+02\n1 35     2.503003e+01 4.896100e+02\n2 35     -6.056300e+02 1.371600e+02\n7 35     -5.379100e+02 4.280500e+02\n10 35     -5.252000e+02 5.874300e+02\n14 35     -5.030029e+00 -3.471700e+02\n0 36     -3.227200e+02 4.045700e+02\n1 36     2.738000e+01 4.937000e+02\n2 36     -6.045500e+02 1.432400e+02\n5 36     8.033002e+01 -2.506500e+02\n7 36     -5.370200e+02 4.338700e+02\n8 36     -4.159600e+02 1.003900e+02\n10 36     -5.240400e+02 5.931200e+02\n11 36     -1.395000e+02 -3.507100e+02\n14 36     -3.229980e+00 -3.421200e+02\n0 37     -4.512100e+02 2.949200e+02\n1 37     -1.196900e+02 4.192700e+02\n7 37     -6.570100e+02 2.996800e+02\n12 37     -7.891500e+02 1.802900e+02\n15 37     -6.809600e+02 4.797900e+02\n0 38     -5.367500e+02 4.331500e+02\n1 38     -1.709100e+02 5.708900e+02\n5 38     -1.264100e+02 -2.160500e+02\n7 38     -7.673700e+02 4.398200e+02\n10 38     -7.968700e+02 6.137000e+02\n14 38     -2.089200e+02 -3.116900e+02\n0 39     -3.572000e+02 4.869300e+02\n1 39     1.285999e+01 5.821700e+02\n2 39     -6.419200e+02 2.459500e+02\n5 39     5.509003e+01 -1.631800e+02\n12 39     -7.054500e+02 4.434100e+02\n0 40     -1.078000e+02 5.097500e+02\n1 40     2.678101e+02 5.456900e+02\n2 40     -3.932500e+02 2.712600e+02\n3 40     -5.205600e+02 -5.933002e+01\n5 40     2.997200e+02 -1.402300e+02\n7 40     -3.341000e+02 5.671100e+02\n8 40     -2.438100e+02 2.049600e+02\n11 40     5.104999e+01 -2.584500e+02\n12 40     -4.236200e+02 5.055200e+02\n0 41     2.109985e+00 5.495000e+02\n1 41     3.916100e+02 5.594600e+02\n14 41     3.156400e+02 -1.853600e+02\n0 42     1.487500e+02 5.630600e+02\n1 42     5.527100e+02 5.382800e+02\n2 42     -1.632200e+02 3.308500e+02\n3 42     -2.981300e+02 -3.320007e+00\n4 42     4.272998e+01 -4.577200e+02\n5 42     5.509000e+02 -8.103003e+01\n6 42     -3.278400e+02 6.322900e+02\n9 42     -2.930800e+02 3.564300e+02\n11 42     2.764200e+02 -2.035800e+02\n12 42     -1.582800e+02 6.020600e+02\n13 42     3.058700e+02 2.321500e+02\n14 42     4.550200e+02 -1.650300e+02\n0 43     -1.188500e+02 5.298700e+02\n1 43     2.615601e+02 5.686500e+02\n2 43     -4.051700e+02 2.946100e+02\n5 43     2.900300e+02 -1.193800e+02\n7 43     -3.479300e+02 5.869700e+02\n12 43     -4.394600e+02 5.283000e+02\n0 44     -2.036300e+02 5.136900e+02\n1 44     1.714600e+02 5.725600e+02\n2 44     -4.865400e+02 2.763000e+02\n3 44     -6.126800e+02 -5.227002e+01\n5 44     2.067900e+02 -1.365200e+02\n7 44     -4.308400e+02 5.614800e+02\n11 44     -3.287000e+01 -2.564500e+02\n12 44     -5.319800e+02 4.973900e+02\n0 45     7.131000e+01 5.701300e+02\n1 45     4.704000e+02 5.640200e+02\n2 45     -2.320500e+02 3.384900e+02\n6 45     -4.131000e+02 6.261000e+02\n9 45     -3.520700e+02 3.614200e+02\n12 45     -2.403100e+02 6.003400e+02\n14 45     3.809399e+02 -1.618800e+02\n0 46     1.764301e+02 -3.612000e+01\n1 46     3.201801e+02 -5.872998e+01\n3 46     2.438500e+02 -2.726500e+02\n4 46     -3.235900e+02 -5.561801e+02\n6 46     1.748600e+02 3.790997e+01\n7 46     9.814001e+01 1.081400e+02\n8 46     3.133700e+02 -2.066000e+01\n10 46     1.146800e+02 1.174400e+02\n12 46     1.953900e+02 8.467999e+01\n13 46     5.342000e+02 -2.373600e+02\n15 46     2.092900e+02 1.120700e+02\n0 47     9.095001e+01 9.173999e+01\n1 47     2.778500e+02 9.273001e+01\n5 47     7.376600e+02 -5.687000e+02\n10 47     3.119995e+00 2.566800e+02\n12 47     5.871997e+01 1.968000e+02\n13 47     4.489900e+02 -1.384800e+02\n15 47     7.690997e+01 2.743000e+02\n0 48     -9.142999e+01 1.057600e+02\n1 48     1.259600e+02 1.531000e+02\n3 48     -1.718700e+02 -2.953600e+02\n5 48     4.640300e+02 -5.629301e+02\n6 48     -2.580300e+02 7.590997e+01\n7 48     -2.144800e+02 1.899300e+02\n9 48     -1.824600e+02 9.945999e+01\n10 48     -2.115500e+02 2.552300e+02\n12 48     -2.078700e+02 1.282100e+02\n15 48     -1.678100e+02 2.680300e+02\n0 49     5.475000e+02 2.152500e+02\n1 49     8.426700e+02 7.370001e+01\n3 49     2.869200e+02 -1.493700e+02\n7 49     3.703900e+02 3.780900e+02\n8 49     4.088600e+02 1.119200e+02\n9 49     2.248000e+02 2.411600e+02\n10 49     5.248199e+02 4.521400e+02\n13 49     7.440800e+02 -1.517999e+01\n15 49     7.092900e+02 5.130500e+02\n0 50     2.672998e+01 1.419700e+02\n1 50     2.359399e+02 1.589300e+02\n3 50     1.299988e+00 -1.743000e+02\n4 50     -1.827600e+02 -4.297900e+02\n5 50     6.362100e+02 -5.120300e+02\n7 50     -8.865997e+01 2.542000e+02\n10 50     -7.759998e+01 3.091700e+02\n12 50     -4.788000e+01 2.289800e+02\n15 50     -1.600000e+01 3.347100e+02\n0 51     2.051200e+02 8.492999e+01\n1 51     3.923500e+02 5.275000e+01\n3 51     1.980200e+02 -1.731900e+02\n6 51     1.469600e+02 1.702300e+02\n7 51     1.023100e+02 2.306500e+02\n8 51     2.876300e+02 7.006000e+01\n10 51     1.341600e+02 2.602300e+02\n12 51     1.784900e+02 2.176800e+02\n13 51     5.330400e+02 -1.343100e+02\n0 52     1.364400e+02 7.383002e+01\n1 52     3.163300e+02 6.177002e+01\n2 52     2.570699e+02 1.252300e+02\n3 52     1.561200e+02 -1.882000e+02\n4 52     -2.385800e+02 -5.203500e+02\n6 52     8.778003e+01 1.425800e+02\n7 52     3.813000e+01 2.088200e+02\n8 52     2.448400e+02 5.685001e+01\n9 52     9.975000e+01 1.989600e+02\n10 52     5.694000e+01 2.410000e+02\n12 52     1.123200e+02 1.938300e+02\n13 52     4.821000e+02 -1.478800e+02\n15 52     1.406899e+02 2.567300e+02\n0 53     9.415997e+01 7.465002e+01\n1 53     2.745400e+02 7.496002e+01\n2 53     2.158000e+02 1.186700e+02\n3 53     1.176500e+02 -1.953500e+02\n4 53     -2.327400e+02 -4.868101e+02\n6 53     4.244000e+01 1.312000e+02\n7 53     -3.820007e+00 2.030600e+02\n8 53     2.099300e+02 5.120999e+01\n10 53     8.090027e+00 2.374000e+02\n12 53     6.470001e+01 1.841200e+02\n13 53     4.458800e+02 -1.504200e+02\n15 53     8.301001e+01 2.520500e+02\n0 54     2.094600e+02 4.755000e+02\n1 54     5.947700e+02 4.311100e+02\n2 54     -9.934998e+01 2.337300e+02\n5 54     6.126899e+02 -1.718700e+02\n6 54     -2.449200e+02 5.317200e+02\n7 54     -2.227002e+01 5.645100e+02\n8 54     -2.030029e+00 1.810500e+02\n11 54     3.386700e+02 -2.766800e+02\n12 54     -7.845001e+01 5.086100e+02\n13 54     3.566000e+02 1.608400e+02\n14 54     5.184301e+02 -2.533000e+02\n0 55     2.328998e+01 1.258200e+02\n1 55     2.264301e+02 1.442700e+02\n2 55     1.037000e+02 1.328300e+02\n3 55     9.039978e+00 -1.848000e+02\n5 55     6.370400e+02 -5.291700e+02\n6 55     -7.306000e+01 1.592400e+02\n7 55     -8.800000e+01 2.388900e+02\n10 55     -7.959003e+01 2.902800e+02\n12 55     -4.472998e+01 2.127300e+02\n13 55     3.686300e+02 -1.156700e+02\n15 55     -1.884998e+01 3.122400e+02\n0 56     5.720001e+01 5.653998e+01\n1 56     2.327500e+02 6.775000e+01\n2 56     1.860400e+02 9.404999e+01\n3 56     9.217999e+01 -2.191300e+02\n5 56     7.025699e+02 -6.043900e+02\n6 56     9.239990e+00 9.994000e+01\n7 56     -3.756000e+01 1.791300e+02\n8 56     1.844500e+02 3.075000e+01\n10 56     -3.309998e+01 2.121200e+02\n12 56     2.802002e+01 1.539500e+02\n13 56     4.164399e+02 -1.688600e+02\n15 56     3.517999e+01 2.220200e+02\n0 57     2.094600e+02 4.755000e+02\n1 57     5.947700e+02 4.311100e+02\n2 57     -9.934998e+01 2.337300e+02\n4 57     -1.421002e+01 -4.918500e+02\n5 57     6.126899e+02 -1.718700e+02\n6 57     -2.449200e+02 5.317200e+02\n7 57     -2.227002e+01 5.645100e+02\n8 57     -2.030029e+00 1.810500e+02\n11 57     3.386700e+02 -2.766800e+02\n12 57     -7.845001e+01 5.086100e+02\n13 57     3.566000e+02 1.608400e+02\n14 57     5.184301e+02 -2.533000e+02\n0 58     4.862000e+02 3.568500e+02\n1 58     8.373101e+02 2.377200e+02\n2 58     2.756100e+02 2.385700e+02\n3 58     1.350000e+02 -8.741998e+01\n6 58     1.790800e+02 4.828700e+02\n7 58     2.788000e+02 4.965800e+02\n10 58     4.415699e+02 6.150400e+02\n12 58     2.906300e+02 4.753400e+02\n0 59     2.060300e+02 4.365100e+02\n1 59     5.802000e+02 3.907600e+02\n2 59     -9.892999e+01 1.913000e+02\n3 59     -2.388700e+02 -1.400200e+02\n5 59     6.091000e+02 -2.132700e+02\n7 59     -2.075000e+01 5.244800e+02\n8 59     -1.270020e+00 1.467800e+02\n9 59     -2.323400e+02 2.365900e+02\n11 59     3.393500e+02 -3.115000e+02\n12 59     -7.519000e+01 4.638100e+02\n13 59     3.544900e+02 1.278800e+02\n14 59     5.164200e+02 -2.941500e+02\n0 60     -4.165002e+01 5.609985e+00\n1 60     1.265400e+02 4.542999e+01\n2 60     8.404999e+01 2.940002e+00\n3 60     -1.890015e+00 -3.091900e+02\n7 60     -1.315700e+02 1.094200e+02\n8 60     9.983002e+01 -4.260999e+01\n15 60     -9.090997e+01 1.391400e+02\n0 61     2.959003e+01 4.290200e+02\n1 61     3.899600e+02 4.292200e+02\n2 61     -2.568600e+02 1.787500e+02\n3 61     -3.916600e+02 -1.522400e+02\n4 61     -2.870001e+01 -3.721900e+02\n5 61     4.313900e+02 -2.235600e+02\n7 61     -1.890500e+02 4.984500e+02\n8 61     -1.324900e+02 1.351900e+02\n12 61     -2.605200e+02 4.304000e+02\n13 61     2.142400e+02 1.112900e+02\n14 61     3.425699e+02 -3.088400e+02\n0 62     5.325100e+02 2.077600e+02\n1 62     8.242900e+02 6.931000e+01\n3 62     2.726200e+02 -1.621300e+02\n8 62     3.960000e+02 1.018100e+02\n9 62     2.106400e+02 2.263700e+02\n10 62     5.073800e+02 4.407300e+02\n15 62     6.888199e+02 4.992900e+02\n0 63     4.494000e+01 -1.564200e+02\n1 63     1.549000e+02 -1.363900e+02\n2 63     2.607600e+02 -1.221500e+02\n3 63     1.751700e+02 -4.234200e+02\n4 63     -3.924200e+02 -4.464200e+02\n6 63     7.772998e+01 -1.406899e+02\n7 63     -1.116998e+01 -3.394000e+01\n8 63     2.376300e+02 -1.508900e+02\n10 63     -2.477002e+01 -3.517999e+01\n12 63     8.328003e+01 -9.306000e+01\n15 63     4.648999e+01 -6.878998e+01\n0 64     -9.878998e+01 -2.223200e+02\n1 64     8.969971e+00 -1.575900e+02\n4 64     -4.192700e+02 -3.207200e+02\n7 64     -1.524300e+02 -1.325700e+02\n8 64     9.772998e+01 -2.745200e+02\n9 64     -1.782001e+01 -1.455200e+02\n10 64     -1.838900e+02 -1.263500e+02\n12 64     -8.770001e+01 -2.365600e+02\n13 64     2.947800e+02 -4.331300e+02\n15 64     -1.360200e+02 -1.772400e+02\n0 65     1.747400e+02 -2.422600e+02\n1 65     2.532100e+02 -2.607000e+02\n2 65     4.303300e+02 -1.697100e+02\n3 65     3.396500e+02 -4.645300e+02\n4 65     -4.870300e+02 -5.583000e+02\n6 65     2.523700e+02 -1.877200e+02\n7 65     1.332900e+02 -9.427002e+01\n8 65     3.775100e+02 -1.936000e+02\n9 65     2.568400e+02 -3.806000e+01\n10 65     1.335500e+02 -1.203600e+02\n12 65     2.635100e+02 -1.501700e+02\n15 65     2.334200e+02 -1.681500e+02\n0 66     1.431600e+02 6.653998e+01\n1 66     3.201100e+02 5.272998e+01\n2 66     2.679800e+02 1.219500e+02\n3 66     1.660500e+02 -1.911600e+02\n4 66     -2.442400e+02 -5.262800e+02\n6 66     9.925000e+01 1.375200e+02\n7 66     4.646002e+01 2.031500e+02\n8 66     2.531600e+02 5.389001e+01\n9 66     1.083700e+02 1.962100e+02\n10 66     6.596997e+01 2.332300e+02\n13 66     4.899100e+02 -1.530700e+02\n0 67     6.596002e+01 -8.371997e+01\n1 67     1.980900e+02 -7.198999e+01\n2 67     2.506200e+02 -4.296997e+01\n3 67     1.602700e+02 -3.486300e+02\n4 67     -3.414500e+02 -4.635500e+02\n6 67     7.146002e+01 -5.269000e+01\n7 67     -3.729980e+00 4.187000e+01\n8 67     2.328400e+02 -8.434003e+01\n10 67     -8.080017e+00 5.087000e+01\n12 67     8.314001e+01 -3.030029e+00\n13 67     4.426700e+02 -2.882900e+02\n0 68     7.303003e+01 -1.236000e+02\n1 68     1.933500e+02 -1.131800e+02\n3 68     1.819900e+02 -3.883000e+02\n7 68     9.419983e+00 2.760010e+00\n10 68     3.859985e+00 5.250000e+00\n13 68     4.529200e+02 -3.235100e+02\n15 68     7.971997e+01 -2.125000e+01\n0 69     5.801700e+02 1.987400e+02\n1 69     8.714900e+02 4.598999e+01\n2 69     4.654600e+02 1.690500e+02\n6 69     3.785400e+02 3.497600e+02\n7 69     4.049100e+02 3.676600e+02\n8 69     4.423500e+02 1.114100e+02\n9 69     2.583900e+02 2.396100e+02\n12 69     4.648900e+02 3.587100e+02\n13 69     7.781500e+02 -2.587000e+01\n0 70     1.219800e+02 -8.892999e+01\n1 70     2.503800e+02 -9.445001e+01\n2 70     3.099600e+02 -3.465997e+01\n3 70     2.155601e+02 -3.370200e+02\n4 70     -3.543000e+02 -5.099200e+02\n6 70     1.348500e+02 -4.078003e+01\n7 70     5.313000e+01 4.640997e+01\n8 70     2.824500e+02 -7.783002e+01\n10 70     5.728998e+01 5.051001e+01\n12 70     1.498200e+02 5.809998e+00\n13 70     4.931801e+02 -2.885300e+02\n15 70     1.422000e+02 3.288000e+01\n0 71     6.522500e+02 -5.717999e+01\n1 71     8.661000e+02 -2.480700e+02\n2 71     6.151000e+02 -5.621997e+01\n3 71     4.849600e+02 -3.596800e+02\n7 71     5.101200e+02 1.345800e+02\n8 71     5.629600e+02 -7.734998e+01\n10 71     6.687900e+02 1.433300e+02\n0 72     3.897998e+01 -9.863000e+01\n1 72     1.688199e+02 -7.881000e+01\n3 72     1.358100e+02 -3.759000e+02\n6 72     4.340997e+01 -8.114001e+01\n7 72     -2.895001e+01 2.152002e+01\n8 72     2.102200e+02 -1.069100e+02\n9 72     8.214001e+01 3.466998e+01\n10 72     -3.778998e+01 3.092999e+01\n12 72     5.390997e+01 -3.100000e+01\n13 72     4.186300e+02 -3.044400e+02\n15 72     3.117999e+01 8.489990e+00\n0 73     2.075300e+02 1.613000e+02\n1 73     4.285601e+02 1.255400e+02\n2 73     2.435300e+02 1.706300e+02\n3 73     1.331500e+02 -1.478300e+02\n10 73     1.313000e+02 3.507400e+02\n13 73     5.082000e+02 -7.570001e+01\n14 73     7.201700e+02 -5.638000e+02\n15 73     2.310699e+02 3.869100e+02\n0 74     2.095400e+02 3.241900e+02\n1 74     5.436300e+02 2.759900e+02\n7 74     4.840027e+00 4.178000e+02\n13 74     3.836700e+02 3.292999e+01\n14 74     5.553199e+02 -4.150100e+02\n0 75     1.646600e+02 -1.096000e+02\n1 75     2.880900e+02 -1.284900e+02\n3 75     2.568300e+02 -3.519400e+02\n6 75     1.827400e+02 -5.060999e+01\n7 75     9.727002e+01 3.253998e+01\n8 75     3.198900e+02 -9.028998e+01\n10 75     1.086600e+02 3.141998e+01\n13 75     5.305900e+02 -3.037100e+02\n15 75     2.032000e+02 1.056000e+01\n0 76     3.957001e+01 -9.128003e+01\n1 76     1.714500e+02 -7.182001e+01\n2 76     2.226899e+02 -6.179999e+01\n3 76     1.347200e+02 -3.671100e+02\n6 76     4.233002e+01 -7.196997e+01\n7 76     -2.952002e+01 2.909998e+01\n8 76     2.095000e+02 -9.896002e+01\n9 76     8.126001e+01 4.228998e+01\n10 76     -3.801001e+01 3.941998e+01\n13 76     4.187500e+02 -2.978500e+02\n15 76     3.091998e+01 1.852002e+01\n0 77     3.738000e+01 -1.083400e+02\n1 77     1.643700e+02 -8.750000e+01\n2 77     2.238000e+02 -8.284998e+01\n3 77     1.365900e+02 -3.869800e+02\n6 77     4.321002e+01 -9.517999e+01\n7 77     -2.981000e+01 1.145001e+01\n10 77     -3.771002e+01 1.984003e+01\n12 77     5.334003e+01 -4.489001e+01\n15 77     2.959998e+01 -4.690002e+00\n0 78     2.371300e+02 5.222300e+02\n1 78     6.381000e+02 4.729100e+02\n3 78     -2.219600e+02 -4.769000e+01\n9 78     -2.223800e+02 3.205000e+02\n0 79     3.245900e+02 5.168100e+02\n1 79     7.352600e+02 4.448800e+02\n4 79     4.119995e+00 -5.745100e+02\n5 79     7.284399e+02 -1.231900e+02\n6 79     -1.326600e+02 6.087100e+02\n9 79     -1.570300e+02 3.202900e+02\n11 79     4.401700e+02 -2.342200e+02\n0 80     5.932800e+02 1.561500e+02\n1 80     8.714800e+02 -2.419983e+00\n2 80     4.901300e+02 1.344100e+02\n3 80     3.528000e+02 -1.792000e+02\n6 80     4.045900e+02 3.092500e+02\n8 80     4.618700e+02 8.248001e+01\n9 80     2.800000e+02 2.117000e+02\n10 80     5.827700e+02 3.861300e+02\n12 80     4.896801e+02 3.178100e+02\n13 80     7.963000e+02 -6.135999e+01\n0 81     1.378000e+02 -1.078300e+02\n1 81     2.614399e+02 -1.178700e+02\n2 81     3.288800e+02 -5.229999e+01\n3 81     2.342800e+02 -3.555400e+02\n6 81     1.552700e+02 -5.659003e+01\n7 81     7.090997e+01 2.996997e+01\n8 81     2.982300e+02 -9.235999e+01\n10 81     7.731000e+01 3.041998e+01\n12 81     1.715800e+02 -1.119000e+01\n13 81     5.073800e+02 -3.039300e+02\n15 81     1.660100e+02 9.299988e+00\n0 82     1.180900e+02 4.264300e+02\n1 82     4.827500e+02 4.037700e+02\n2 82     -1.755100e+02 1.764400e+02\n3 82     -3.126400e+02 -1.555100e+02\n4 82     -3.728003e+01 -4.279600e+02\n7 82     -1.031100e+02 5.047800e+02\n8 82     -6.475000e+01 1.341400e+02\n9 82     -2.969500e+02 2.204900e+02\n13 82     2.849800e+02 1.135300e+02\n14 82     4.300800e+02 -3.091200e+02\n0 83     1.875300e+02 1.485999e+01\n1 83     3.485200e+02 -1.192999e+01\n2 83     3.299301e+02 8.263000e+01\n3 83     2.266600e+02 -2.272100e+02\n4 83     -2.874300e+02 -5.639100e+02\n7 83     9.904999e+01 1.593800e+02\n8 83     3.045100e+02 2.094000e+01\n10 83     1.211000e+02 1.772800e+02\n13 83     5.352700e+02 -1.932200e+02\n15 83     2.192000e+02 1.829900e+02\n0 84     1.012500e+02 -4.721002e+01\n1 84     2.425100e+02 -4.695001e+01\n2 84     2.761700e+02 7.289978e+00\n3 84     1.817000e+02 -2.992600e+02\n4 84     -3.192300e+02 -4.941700e+02\n7 84     2.585999e+01 8.460999e+01\n8 84     2.553500e+02 -4.210999e+01\n9 84     1.219900e+02 1.014100e+02\n10 84     2.822998e+01 9.665997e+01\n15 84     1.081400e+02 8.675000e+01\n0 85     1.011200e+02 -6.097998e+01\n1 85     2.378101e+02 -6.079999e+01\n2 85     2.810400e+02 -6.869995e+00\n3 85     1.873300e+02 -3.123900e+02\n7 85     2.800000e+01 7.090997e+01\n8 85     2.594400e+02 -5.442001e+01\n10 85     2.948999e+01 8.114001e+01\n13 85     4.722500e+02 -2.646400e+02\n0 86     1.825100e+02 -8.396002e+01\n1 86     3.130800e+02 -1.085700e+02\n2 86     3.623700e+02 -1.747998e+01\n3 86     2.641300e+02 -3.208200e+02\n6 86     1.925000e+02 -1.600000e+01\n8 86     3.272200e+02 -6.346997e+01\n10 86     1.267900e+02 6.278003e+01\n13 86     5.437600e+02 -2.792900e+02\n0 87     2.619995e+00 -4.784998e+01\n1 87     1.499200e+02 -1.878003e+01\n2 87     1.638300e+02 -2.902002e+01\n3 87     7.634003e+01 -3.364300e+02\n6 87     -1.867999e+01 -3.623999e+01\n7 87     -7.513000e+01 6.556000e+01\n8 87     1.618200e+02 -7.032001e+01\n9 87     3.042999e+01 6.702002e+01\n10 87     -8.562000e+01 8.606000e+01\n12 87     -7.359985e+00 1.709003e+01\n13 87     3.789301e+02 -2.633600e+02\n15 87     -2.513000e+01 7.285999e+01\n0 88     -1.764001e+01 -4.846002e+01\n1 88     1.317700e+02 -1.371002e+01\n2 88     1.380800e+02 -3.988000e+01\n3 88     5.256000e+01 -3.480800e+02\n4 88     -3.040000e+02 -3.959100e+02\n6 88     -4.419000e+01 -4.584998e+01\n7 88     -9.589001e+01 6.044000e+01\n8 88     1.415300e+02 -7.860999e+01\n9 88     1.297998e+01 5.758002e+01\n10 88     -1.081700e+02 8.295001e+01\n12 88     -3.196997e+01 8.429993e+00\n13 88     3.594200e+02 -2.663800e+02\n15 88     -5.103998e+01 6.888000e+01\n0 89     8.909003e+01 3.873300e+02\n1 89     4.421600e+02 3.724100e+02\n2 89     -1.972100e+02 1.303000e+02\n7 89     -1.251400e+02 4.616200e+02\n11 89     2.359100e+02 -3.608600e+02\n14 89     4.018600e+02 -3.511700e+02\n0 90     5.527700e+02 2.468200e+02\n1 90     8.579100e+02 1.050200e+02\n2 90     4.222900e+02 2.041800e+02\n3 90     2.845100e+02 -1.156200e+02\n7 90     3.712500e+02 4.096700e+02\n8 90     4.077200e+02 1.407300e+02\n9 90     2.208400e+02 2.677900e+02\n10 90     5.284900e+02 4.895400e+02\n11 90     6.797300e+02 -4.774800e+02\n12 90     4.213101e+02 4.013500e+02\n13 90     7.452400e+02 1.159998e+01\n15 90     7.128500e+02 5.575200e+02\n0 91     -5.580700e+02 3.910000e+02\n1 91     -2.000700e+02 5.359700e+02\n5 91     -1.539500e+02 -2.595000e+02\n7 91     -7.840600e+02 3.924600e+02\n10 91     -8.167200e+02 5.592100e+02\n11 91     -3.447500e+02 -3.585900e+02\n14 91     -2.358100e+02 -3.555900e+02\n0 92     -2.784100e+02 -4.636200e+02\n1 92     -2.255600e+02 -3.278400e+02\n4 92     -5.755000e+02 -1.689300e+02\n6 92     -2.134700e+02 -6.697100e+02\n0 93     -4.952300e+02 3.796100e+02\n1 93     -1.439600e+02 5.106800e+02\n10 93     -7.344400e+02 5.489400e+02\n14 93     -1.755300e+02 -3.688600e+02\n0 94     -5.432100e+02 3.561600e+02\n1 94     -1.940800e+02 4.993600e+02\n5 94     -1.446400e+02 -2.977500e+02\n14 94     -2.262900e+02 -3.938300e+02\n15 94     -8.224600e+02 5.540900e+02\n0 95     -3.520700e+02 4.695000e+02\n1 95     1.385999e+01 5.640500e+02\n2 95     -6.362600e+02 2.248700e+02\n5 95     5.790002e+01 -1.812400e+02\n7 95     -5.768300e+02 4.994100e+02\n11 95     -1.621600e+02 -2.941200e+02\n14 95     -2.632001e+01 -2.736800e+02\n0 96     -3.795500e+02 4.535100e+02\n1 96     -1.640997e+01 5.547800e+02\n7 96     -6.028400e+02 4.792600e+02\n11 96     -1.872100e+02 -3.079700e+02\n12 96     -7.260600e+02 3.983000e+02\n0 97     -3.508700e+02 3.998600e+02\n1 97     -8.800049e-01 4.957700e+02\n2 97     -6.348100e+02 1.374100e+02\n5 97     5.178998e+01 -2.556000e+02\n7 97     -5.657000e+02 4.252700e+02\n10 97     -5.581200e+02 5.855700e+02\n11 97     -1.642900e+02 -3.545300e+02\n14 97     -3.142999e+01 -3.471400e+02\n0 98     -4.993000e+02 4.040900e+02\n1 98     -1.422300e+02 5.350400e+02\n5 98     -9.415002e+01 -2.472300e+02\n8 98     -5.721500e+02 9.628000e+01\n10 98     -7.437100e+02 5.798600e+02\n0 99     -5.434000e+02 4.285100e+02\n1 99     -1.778800e+02 5.677600e+02\n5 99     -1.334200e+02 -2.205400e+02\n7 99     -7.737000e+02 4.342900e+02\n11 99     -3.285700e+02 -3.273300e+02\n13 99     -2.414700e+02 8.529001e+01\n14 99     -2.157300e+02 -3.166300e+02\n0 100     -4.288600e+02 3.977900e+02\n1 100     -7.672998e+01 5.124900e+02\n2 100     -7.188500e+02 1.338400e+02\n7 100     -6.465900e+02 4.138400e+02\n8 100     -5.081500e+02 9.078000e+01\n10 100     -6.542100e+02 5.764900e+02\n12 100     -7.765700e+02 3.205000e+02\n14 100     -1.080900e+02 -3.494400e+02\n0 101     -4.305600e+02 4.729600e+02\n1 101     -6.125000e+01 5.854000e+02\n2 101     -7.201900e+02 2.298600e+02\n5 101     -1.770001e+01 -1.766100e+02\n8 101     -5.107600e+02 1.656500e+02\n12 101     -7.913300e+02 4.157800e+02\n14 101     -1.012800e+02 -2.703700e+02\n0 102     -4.470000e+02 3.914400e+02\n1 102     -9.547998e+01 5.107100e+02\n5 102     -4.465002e+01 -2.619900e+02\n7 102     -6.648000e+02 4.050600e+02\n8 102     -5.245400e+02 8.395001e+01\n11 102     -2.490000e+02 -3.609200e+02\n12 102     -7.980000e+02 3.098200e+02\n13 102     -1.660700e+02 5.671002e+01\n14 102     -1.267400e+02 -3.562900e+02\n0 103     -5.123200e+02 4.442500e+02\n1 103     -1.454200e+02 5.758700e+02\n5 103     -1.008000e+02 -2.052600e+02\n7 103     -7.424600e+02 4.550500e+02\n14 103     -1.836900e+02 -3.003000e+02\n0 104     -4.244600e+02 4.563400e+02\n1 104     -5.928003e+01 5.681700e+02\n2 104     -7.138100e+02 2.086800e+02\n5 104     -1.378998e+01 -1.939400e+02\n11 104     -2.260300e+02 -3.049600e+02\n14 104     -9.726001e+01 -2.875500e+02\n0 105     -4.473600e+02 3.997000e+02\n1 105     -9.403003e+01 5.190600e+02\n7 105     -6.661600e+02 4.140400e+02\n10 105     -6.772900e+02 5.777700e+02\n12 105     -7.992300e+02 3.204300e+02\n14 105     -1.259200e+02 -3.472900e+02\n0 106     -4.846800e+02 3.848800e+02\n1 106     -1.327700e+02 5.132000e+02\n4 106     -1.228998e+01 -8.085999e+01\n11 106     -2.824800e+02 -3.661000e+02\n0 107     -5.400900e+02 4.395200e+02\n1 107     -1.726000e+02 5.776900e+02\n0 108     -1.249800e+02 1.093200e+02\n1 108     9.991998e+01 1.647000e+02\n2 108     -1.394900e+02 1.049988e+00\n5 108     4.123900e+02 -5.605900e+02\n6 108     -3.191900e+02 6.259003e+01\n7 108     -2.529300e+02 1.856300e+02\n10 108     -2.503500e+02 2.566600e+02\n12 108     -2.591900e+02 1.151500e+02\n15 108     -2.119900e+02 2.685300e+02\n0 109     -4.269300e+02 4.288600e+02\n1 109     -6.888000e+01 5.421700e+02\n4 109     6.320007e+00 -1.138800e+02\n5 109     -1.947998e+01 -2.230800e+02\n8 109     -5.064100e+02 1.223700e+02\n10 109     -6.571000e+02 6.152800e+02\n11 109     -2.305800e+02 -3.288500e+02\n12 109     -7.799600e+02 3.599700e+02\n13 109     -1.486900e+02 8.959000e+01\n14 109     -1.029600e+02 -3.166700e+02\n0 110     -3.159900e+02 4.188000e+02\n1 110     3.753003e+01 5.058000e+02\n2 110     -5.965700e+02 1.605000e+02\n4 110     -8.309998e+00 -1.725800e+02\n5 110     8.939001e+01 -2.363100e+02\n7 110     -5.316800e+02 4.487800e+02\n8 110     -4.091800e+02 1.139200e+02\n10 110     -5.177400e+02 6.110900e+02\n12 110     -6.438900e+02 3.634800e+02\n13 110     -5.966998e+01 8.534000e+01\n14 110     5.169983e+00 -3.271500e+02\n0 111     4.015997e+01 -2.316000e+02\n1 111     1.258000e+02 -2.071900e+02\n3 111     2.119200e+02 -4.950100e+02\n6 111     1.062500e+02 -2.247500e+02\n7 111     -1.280029e+00 -1.085000e+02\n8 111     2.610000e+02 -2.143600e+02\n9 111     1.468000e+02 -6.521002e+01\n12 111     1.055300e+02 -1.805500e+02\n13 111     4.427100e+02 -4.208100e+02\n15 111     4.958002e+01 -1.711500e+02\n0 112     -1.080017e+00 -2.227400e+02\n1 112     9.026001e+01 -1.856000e+02\n2 112     2.411500e+02 -2.042900e+02\n3 112     1.618700e+02 -5.037600e+02\n4 112     -4.353000e+02 -4.082500e+02\n6 112     5.341998e+01 -2.320601e+02\n7 112     -4.495001e+01 -1.079200e+02\n8 112     2.164700e+02 -2.190800e+02\n10 112     -7.192999e+01 -1.161300e+02\n12 112     5.128003e+01 -1.848300e+02\n13 112     4.029700e+02 -4.170200e+02\n15 112     -7.229980e+00 -1.643600e+02\n0 113     4.428003e+01 -2.320300e+02\n1 113     1.295900e+02 -2.088900e+02\n3 113     2.170400e+02 -4.930800e+02\n4 113     -4.512300e+02 -4.470800e+02\n6 113     1.116400e+02 -2.232300e+02\n7 113     3.140015e+00 -1.082200e+02\n8 113     2.655300e+02 -2.130100e+02\n9 113     1.514900e+02 -6.403003e+01\n10 113     -1.751001e+01 -1.228100e+02\n12 113     1.112700e+02 -1.790800e+02\n15 113     5.537000e+01 -1.710600e+02\n0 114     2.358002e+01 1.107400e+02\n1 114     2.209900e+02 1.296600e+02\n2 114     1.142900e+02 1.231500e+02\n5 114     6.428900e+02 -5.453199e+02\n6 114     -6.328003e+01 1.442300e+02\n7 114     -8.420001e+01 2.247100e+02\n10 114     -7.778998e+01 2.725600e+02\n12 114     -3.703003e+01 1.981100e+02\n15 114     -1.678998e+01 2.916800e+02\n0 115     -6.075000e+01 6.903998e+01\n1 115     1.311200e+02 1.112700e+02\n3 115     -6.425000e+01 -2.685400e+02\n4 115     -2.200000e+02 -3.615000e+02\n5 115     5.408400e+02 -5.975500e+02\n6 115     -1.587500e+02 6.437000e+01\n7 115     -1.654700e+02 1.666200e+02\n8 115     5.348999e+01 -2.940002e+00\n10 115     -1.710900e+02 2.135700e+02\n12 115     -1.326300e+02 1.202700e+02\n13 115     2.962500e+02 -1.713600e+02\n15 115     -1.245800e+02 2.222400e+02\n0 116     6.288000e+01 5.094800e+02\n1 116     4.458900e+02 5.034800e+02\n2 116     -2.343500e+02 2.716000e+02\n3 116     -3.673600e+02 -6.126001e+01\n5 116     4.666500e+02 -1.381900e+02\n6 116     -4.108600e+02 5.465100e+02\n7 116     -1.672900e+02 5.841000e+02\n8 116     -1.137100e+02 2.082200e+02\n9 116     -3.513900e+02 3.021800e+02\n12 116     -2.388900e+02 5.286800e+02\n14 116     3.737900e+02 -2.238600e+02\n0 117     1.317000e+02 1.395001e+01\n1 117     2.911500e+02 4.320007e+00\n2 117     2.825800e+02 7.484998e+01\n3 117     1.839000e+02 -2.350400e+02\n4 117     -2.794200e+02 -5.192500e+02\n6 117     1.100800e+02 7.967999e+01\n7 117     4.554999e+01 1.502600e+02\n8 117     2.629700e+02 1.398001e+01\n10 117     5.753003e+01 1.709900e+02\n13 117     4.893400e+02 -1.975900e+02\n0 118     -3.558002e+01 4.886500e+02\n1 118     3.372800e+02 5.066800e+02\n5 118     3.692400e+02 -1.619200e+02\n6 118     -5.169400e+02 4.991100e+02\n7 118     -2.602500e+02 5.525300e+02\n8 118     -1.865800e+02 1.867500e+02\n9 118     -4.264200e+02 2.774500e+02\n11 118     1.159300e+02 -2.747700e+02\n12 118     -3.409000e+02 4.898900e+02\n13 118     1.623800e+02 1.584100e+02\n14 118     2.793700e+02 -2.487000e+02\n0 119     5.560100e+02 2.534200e+02\n1 119     8.635000e+02 1.113800e+02\n2 119     4.238600e+02 2.117200e+02\n6 119     3.337600e+02 4.022500e+02\n8 119     4.084000e+02 1.468200e+02\n9 119     2.216400e+02 2.744500e+02\n10 119     5.315601e+02 4.979000e+02\n11 119     6.811801e+02 -4.702900e+02\n12 119     4.227600e+02 4.092000e+02\n15 119     7.162200e+02 5.676100e+02\n0 120     1.669983e+00 4.915200e+02\n1 120     3.769000e+02 5.000300e+02\n2 120     -2.892400e+02 2.497300e+02\n3 120     -4.201600e+02 -8.137000e+01\n4 120     9.349976e+00 -3.601500e+02\n5 120     4.059000e+02 -1.589400e+02\n6 120     -4.753500e+02 5.095500e+02\n7 120     -2.242000e+02 5.588000e+02\n8 120     -1.582600e+02 1.898000e+02\n9 120     -3.966600e+02 2.812700e+02\n11 120     1.491100e+02 -2.713700e+02\n12 120     -3.008100e+02 4.979900e+02\n0 121     -4.017999e+01 4.909500e+02\n1 121     3.326500e+02 5.100300e+02\n2 121     -3.277300e+02 2.496400e+02\n4 121     1.253998e+01 -3.354200e+02\n5 121     3.653000e+02 -1.590500e+02\n6 121     -5.220400e+02 5.028600e+02\n7 121     -2.650600e+02 5.543700e+02\n8 121     -1.896400e+02 1.897300e+02\n11 121     1.115200e+02 -2.725900e+02\n12 121     -3.452300e+02 4.936800e+02\n13 121     1.585000e+02 1.599200e+02\n14 121     2.747000e+02 -2.463600e+02\n0 122     1.183800e+02 4.099731e-01\n1 122     2.745200e+02 -5.500000e+00\n2 122     2.755601e+02 5.935999e+01\n3 122     1.777300e+02 -2.491600e+02\n4 122     -2.881500e+02 -5.126200e+02\n6 122     1.102200e+02 6.358002e+01\n7 122     3.548999e+01 1.349400e+02\n8 122     2.547200e+02 1.679993e+00\n10 122     4.467999e+01 1.536900e+02\n13 122     4.799600e+02 -2.103700e+02\n15 122     1.253100e+02 1.540400e+02\n0 123     5.598000e+02 1.577700e+02\n1 123     8.368101e+02 8.580017e+00\n7 123     3.901000e+02 3.244500e+02\n10 123     5.436700e+02 3.850400e+02\n12 123     4.510601e+02 3.059500e+02\n15 123     7.324301e+02 4.331700e+02\n0 124     -2.609003e+01 5.030800e+02\n1 124     3.511500e+02 5.191100e+02\n2 124     -3.154700e+02 2.647100e+02\n3 124     -4.451800e+02 -6.735999e+01\n4 124     1.872998e+01 -3.447100e+02\n5 124     3.791400e+02 -1.462800e+02\n6 124     -5.090400e+02 5.208800e+02\n7 124     -2.523900e+02 5.688900e+02\n12 124     -3.336100e+02 5.093400e+02\n0 125     1.272900e+02 4.483700e+02\n1 125     4.983199e+02 4.239100e+02\n2 125     -1.697500e+02 2.031000e+02\n3 125     -3.065200e+02 -1.292300e+02\n4 125     -2.490002e+01 -4.354399e+02\n5 125     5.297700e+02 -2.023700e+02\n7 125     -9.734998e+01 5.285700e+02\n8 125     -6.019000e+01 1.548200e+02\n12 125     -1.592700e+02 4.660300e+02\n13 125     2.917000e+02 1.336300e+02\n14 125     4.383800e+02 -2.847100e+02\n0 126     3.112600e+02 5.753000e+02\n1 126     7.379800e+02 5.111600e+02\n2 126     -2.534998e+01 3.437700e+02\n9 126     -1.761900e+02 3.721400e+02\n13 126     4.329700e+02 2.524900e+02\n14 126     6.101500e+02 -1.447200e+02\n0 127     -1.122400e+02 4.972900e+02\n1 127     2.604200e+02 5.344500e+02\n2 127     -3.962700e+02 2.573100e+02\n7 127     -3.367300e+02 5.540700e+02\n8 127     -2.457200e+02 1.946500e+02\n0 128     1.250900e+02 -3.498999e+01\n1 128     2.692700e+02 -4.201001e+01\n3 128     1.988500e+02 -2.805400e+02\n4 128     -3.145300e+02 -5.137000e+02\n6 128     1.215800e+02 2.328003e+01\n7 128     4.756000e+01 1.011500e+02\n8 128     2.721300e+02 -2.762000e+01\n10 128     5.510999e+01 1.133800e+02\n12 128     1.375300e+02 7.263000e+01\n13 128     4.903900e+02 -2.398400e+02\n15 128     1.388400e+02 1.067100e+02\n0 129     1.659399e+02 1.534003e+01\n1 129     3.262200e+02 -4.469971e+00\n2 129     3.132100e+02 8.178003e+01\n3 129     2.111200e+02 -2.282800e+02\n6 129     1.449500e+02 9.039001e+01\n7 129     7.853003e+01 1.570300e+02\n10 129     9.739001e+01 1.768100e+02\n12 129     1.673300e+02 1.397100e+02\n13 129     5.181801e+02 -1.937200e+02\n15 129     1.884900e+02 1.812900e+02\n0 130     4.867400e+02 3.696900e+02\n1 130     8.421801e+02 2.513500e+02\n3 130     1.328500e+02 -7.459998e+01\n7 130     2.772300e+02 5.095000e+02\n8 130     2.915100e+02 1.864100e+02\n9 130     8.914001e+01 3.028200e+02\n11 130     5.996200e+02 -3.592700e+02\n0 131     3.077200e+02 5.442700e+02\n1 131     7.244800e+02 4.785600e+02\n2 131     -2.483002e+01 3.105000e+02\n3 131     -1.684300e+02 -2.223999e+01\n5 131     7.096100e+02 -9.209003e+01\n8 131     6.031000e+01 2.463300e+02\n9 131     -1.744900e+02 3.460500e+02\n11 131     4.214200e+02 -2.109300e+02\n12 131     8.390015e+00 6.003700e+02\n13 131     4.314399e+02 2.256100e+02\n14 131     6.093000e+02 -1.768500e+02\n0 132     1.434000e+02 8.089001e+01\n1 132     3.259200e+02 6.684003e+01\n3 132     1.567900e+02 -1.824500e+02\n4 132     -2.348600e+02 -5.248500e+02\n6 132     9.050000e+01 1.517500e+02\n7 132     4.348999e+01 2.166000e+02\n8 132     2.464200e+02 6.223999e+01\n10 132     6.478003e+01 2.500600e+02\n12 132     1.168800e+02 2.025500e+02\n13 132     4.855200e+02 -1.415600e+02\n15 132     1.496100e+02 2.674000e+02\n0 133     1.866100e+02 5.805400e+02\n1 133     5.980500e+02 5.466600e+02\n5 133     5.882100e+02 -6.121002e+01\n6 133     -2.898800e+02 6.614100e+02\n11 133     3.086500e+02 -1.875400e+02\n13 133     3.352100e+02 2.485800e+02\n0 134     5.440002e+01 5.778800e+02\n1 134     4.545900e+02 5.760800e+02\n2 134     -2.480700e+02 3.471300e+02\n3 134     -3.791100e+02 1.395001e+01\n4 134     5.679999e+01 -3.992900e+02\n5 134     4.597300e+02 -6.746002e+01\n6 134     -4.331600e+02 6.325900e+02\n8 134     -1.247500e+02 2.680100e+02\n9 134     -3.662700e+02 3.687000e+02\n11 134     1.917200e+02 -1.956800e+02\n12 134     -2.596500e+02 6.068700e+02\n13 134     2.315500e+02 2.383200e+02\n14 134     3.646801e+02 -1.546200e+02\n0 135     4.948500e+02 4.219200e+02\n1 135     8.679500e+02 3.056400e+02\n7 135     2.783000e+02 5.618600e+02\n8 135     2.888300e+02 2.299800e+02\n9 135     8.448999e+01 3.488700e+02\n12 135     2.852800e+02 5.484700e+02\n0 136     1.682600e+02 5.214001e+01\n1 136     3.403600e+02 3.121002e+01\n2 136     2.987200e+02 1.127300e+02\n3 136     1.953600e+02 -1.985600e+02\n7 136     7.339001e+01 1.932300e+02\n10 136     9.602002e+01 2.196200e+02\n12 136     1.550000e+02 1.796100e+02\n13 136     5.131700e+02 -1.630100e+02\n0 137     5.222500e+02 3.573300e+02\n1 137     8.762100e+02 2.289500e+02\n2 137     3.168300e+02 2.542700e+02\n3 137     1.758000e+02 -7.090002e+01\n6 137     2.260400e+02 4.950800e+02\n7 137     3.148101e+02 5.036300e+02\n9 137     1.268500e+02 3.063100e+02\n10 137     4.845100e+02 6.198600e+02\n12 137     3.328600e+02 4.885400e+02\n0 138     -9.960022e+00 -1.144000e+01\n1 138     1.493199e+02 2.047998e+01\n2 138     1.350800e+02 3.349976e+00\n3 138     4.765997e+01 -3.071800e+02\n4 138     -2.793100e+02 -4.034400e+02\n6 138     -4.640002e+01 -1.309998e+00\n7 138     -9.453003e+01 9.913000e+01\n8 138     1.402200e+02 -4.420999e+01\n10 138     -1.040600e+02 1.275100e+02\n12 138     -3.332001e+01 5.365997e+01\n13 138     3.629500e+02 -2.332800e+02\n0 139     5.826500e+02 1.211600e+02\n1 139     8.492800e+02 -3.703998e+01\n2 139     4.884399e+02 9.165997e+01\n3 139     3.528600e+02 -2.210500e+02\n6 139     4.012000e+02 2.637400e+02\n7 139     4.175100e+02 2.932000e+02\n8 139     4.601400e+02 4.757999e+01\n9 139     2.795601e+02 1.753400e+02\n10 139     5.731801e+02 3.442700e+02\n12 139     4.870500e+02 2.732600e+02\n15 139     7.685699e+02 3.852300e+02\n0 140     3.710400e+02 5.120000e+02\n1 140     7.878400e+02 4.277700e+02\n2 140     3.257001e+01 2.777300e+02\n5 140     7.754800e+02 -1.263200e+02\n6 140     -8.391000e+01 6.117100e+02\n8 140     1.086300e+02 2.186100e+02\n9 140     -1.250300e+02 3.164000e+02\n11 140     4.834301e+02 -2.357800e+02\n12 140     7.819000e+01 5.725000e+02\n14 140     6.747400e+02 -2.056700e+02\n0 141     -5.090002e+01 4.513100e+02\n1 141     3.094900e+02 4.734500e+02\n2 141     -3.256200e+02 2.118900e+02\n3 141     -4.545500e+02 -1.188700e+02\n0 142     -4.115997e+01 1.206700e+02\n1 142     1.668500e+02 1.553900e+02\n2 142     1.952002e+01 9.678003e+01\n3 142     -7.147998e+01 -2.211200e+02\n4 142     -1.892900e+02 -3.756800e+02\n5 142     5.516801e+02 -5.381600e+02\n6 142     -1.621100e+02 1.279000e+02\n7 142     -1.557800e+02 2.196800e+02\n8 142     5.290002e+01 3.854001e+01\n9 142     -9.851001e+01 1.652400e+02\n10 142     -1.542200e+02 2.768500e+02\n12 142     -1.287000e+02 1.822200e+02\n13 142     3.051000e+02 -1.279500e+02\n15 142     -1.046100e+02 2.957100e+02\n0 143     2.126899e+02 4.965500e+02\n1 143     6.037800e+02 4.519600e+02\n2 143     -9.909998e+01 2.584600e+02\n3 143     -2.381100e+02 -7.434998e+01\n5 143     6.156200e+02 -1.511100e+02\n6 143     -2.451800e+02 5.581600e+02\n8 143     -1.659973e+00 2.000200e+02\n9 143     -2.354800e+02 2.950100e+02\n12 143     -7.872998e+01 5.340800e+02\n0 144     1.986400e+02 5.757000e+02\n1 144     6.106300e+02 5.389300e+02\n3 144     -2.585400e+02 1.010999e+01\n4 144     4.798999e+01 -4.916600e+02\n5 144     6.002700e+02 -6.533002e+01\n6 144     -2.759000e+02 6.579300e+02\n8 144     -1.950000e+01 2.687400e+02\n9 144     -2.569300e+02 3.700300e+02\n11 144     3.199600e+02 -1.908200e+02\n14 144     5.021100e+02 -1.502400e+02\n0 145     -2.119995e+00 -2.244000e+01\n1 145     1.531000e+02 7.520020e+00\n4 145     -2.866300e+02 -4.095500e+02\n6 145     -3.197998e+01 -9.650024e+00\n7 145     -8.403998e+01 9.054999e+01\n8 145     1.519800e+02 -4.875000e+01\n12 145     -2.002002e+01 4.591998e+01\n15 145     -3.453998e+01 1.073000e+02\n0 146     3.234998e+01 4.699707e-01\n1 146     1.913600e+02 2.010999e+01\n2 146     1.834800e+02 3.394000e+01\n3 146     9.253998e+01 -2.761600e+02\n4 146     -2.757200e+02 -4.385300e+02\n6 146     3.820007e+00 3.017999e+01\n7 146     -5.215997e+01 1.195300e+02\n8 146     1.798900e+02 -1.932999e+01\n13 146     4.027100e+02 -2.182200e+02\n15 146     8.530029e+00 1.421400e+02\n0 147     8.640002e+01 -3.359003e+01\n1 147     2.319900e+02 -2.896002e+01\n3 147     1.625800e+02 -2.893200e+02\n4 147     -3.070700e+02 -4.817500e+02\n6 147     7.817999e+01 1.485999e+01\n7 147     8.789978e+00 9.592001e+01\n9 147     1.048700e+02 1.097700e+02\n10 147     9.309998e+00 1.140300e+02\n12 147     9.184998e+01 6.613000e+01\n13 147     4.560699e+02 -2.421000e+02\n15 147     8.595001e+01 1.035000e+02\n0 148     4.340002e+01 1.379999e+01\n1 148     2.059100e+02 3.004999e+01\n2 148     1.903600e+02 5.101001e+01\n6 148     1.148999e+01 4.885999e+01\n7 148     -4.351001e+01 1.346200e+02\n12 148     2.672998e+01 1.028700e+02\n15 148     2.147998e+01 1.615600e+02\n0 149     2.114500e+02 5.230700e+02\n1 149     6.099900e+02 4.801700e+02\n2 149     -1.042500e+02 2.875300e+02\n6 149     -2.532700e+02 5.935300e+02\n8 149     -5.989990e+00 2.233900e+02\n9 149     -2.410700e+02 3.201700e+02\n11 149     3.359200e+02 -2.350100e+02\n12 149     -8.591998e+01 5.644500e+02\n13 149     3.563101e+02 2.021700e+02\n14 149     5.172800e+02 -2.030300e+02\n0 150     4.179999e+01 4.906900e+02\n1 150     4.184600e+02 4.889500e+02\n7 150     -1.850300e+02 5.626500e+02\n12 150     -2.576700e+02 5.040900e+02\n0 151     3.236500e+02 5.621100e+02\n1 151     7.479500e+02 4.937600e+02\n5 151     7.242300e+02 -7.563000e+01\n6 151     -1.427700e+02 6.644700e+02\n8 151     6.946002e+01 2.593400e+02\n9 151     -1.655300e+02 3.607800e+02\n13 151     4.432200e+02 2.425400e+02\n0 152     1.294800e+02 5.237900e+02\n1 152     5.207500e+02 5.015700e+02\n5 152     5.335500e+02 -1.214400e+02\n6 152     -3.401100e+02 5.786300e+02\n8 152     -6.428998e+01 2.232900e+02\n13 152     2.923500e+02 1.978800e+02\n14 152     4.387900e+02 -2.058500e+02\n0 153     2.565800e+02 5.710400e+02\n1 153     6.743600e+02 5.193900e+02\n2 153     -7.151001e+01 3.385400e+02\n5 153     6.569800e+02 -6.934003e+01\n6 153     -2.146100e+02 6.615100e+02\n8 153     2.165997e+01 2.646400e+02\n9 153     -2.147800e+02 3.660800e+02\n11 153     3.721600e+02 -1.920800e+02\n12 153     -4.853003e+01 6.236700e+02\n13 153     3.899399e+02 2.450600e+02\n0 154     3.088300e+02 5.534000e+02\n1 154     7.281801e+02 4.878900e+02\n2 154     -2.516998e+01 3.207000e+02\n3 154     -1.683300e+02 -1.315997e+01\n5 154     7.095200e+02 -8.552002e+01\n6 154     -1.567200e+02 6.500900e+02\n8 154     5.952002e+01 2.510900e+02\n9 154     -1.752700e+02 3.521800e+02\n11 154     4.213900e+02 -2.037600e+02\n12 154     7.630005e+00 6.107400e+02\n13 154     4.318500e+02 2.339500e+02\n14 154     6.095300e+02 -1.668700e+02\n0 155     2.007200e+02 2.082001e+01\n1 155     3.634800e+02 -9.919983e+00\n7 155     1.105000e+02 1.672700e+02\n10 155     1.368400e+02 1.860100e+02\n12 155     2.018900e+02 1.520900e+02\n15 155     2.353300e+02 1.931500e+02\n0 156     1.544200e+02 1.251001e+01\n1 156     3.130800e+02 -3.929993e+00\n2 156     3.039800e+02 7.734998e+01\n3 156     2.035400e+02 -2.320200e+02\n4 156     -2.841500e+02 -5.380100e+02\n6 156     1.344900e+02 8.403998e+01\n7 156     6.776001e+01 1.524200e+02\n9 156     1.421600e+02 1.602900e+02\n10 156     8.367999e+01 1.715000e+02\n13 156     5.091100e+02 -1.973400e+02\n15 156     1.725699e+02 1.753500e+02\n0 157     3.023300e+02 5.432700e+02\n1 157     7.184200e+02 4.791500e+02\n3 157     -1.720100e+02 -2.153003e+01\n4 157     2.196997e+01 -5.601200e+02\n5 157     7.036500e+02 -9.645001e+01\n6 157     -1.613200e+02 6.364500e+02\n9 157     -1.783100e+02 3.422100e+02\n11 157     4.167800e+02 -2.127900e+02\n12 157     3.080017e+00 5.979000e+02\n13 157     4.275800e+02 2.259100e+02\n0 158     3.971200e+02 5.727600e+02\n1 158     8.384399e+02 4.881200e+02\n5 158     7.981200e+02 -6.120001e+01\n6 158     -6.982001e+01 6.920900e+02\n9 158     -1.166000e+02 3.727700e+02\n11 158     4.993400e+02 -1.810400e+02\n0 159     4.323999e+01 5.559998e+00\n1 159     2.028199e+02 2.188000e+01\n2 159     1.937300e+02 4.312000e+01\n3 159     1.016600e+02 -2.669800e+02\n6 159     1.495001e+01 3.973999e+01\n7 159     -4.194000e+01 1.266500e+02\n8 159     1.888200e+02 -1.217001e+01\n10 159     -4.396997e+01 1.516300e+02\n12 159     2.898999e+01 9.321002e+01\n13 159     4.119800e+02 -2.128100e+02\n0 160     1.360700e+02 2.083002e+01\n1 160     2.975601e+02 9.580017e+00\n2 160     2.834399e+02 8.182001e+01\n3 160     1.841600e+02 -2.282500e+02\n4 160     -2.750500e+02 -5.220900e+02\n6 160     1.119400e+02 8.796002e+01\n7 160     4.856000e+01 1.575800e+02\n8 160     2.641100e+02 1.995001e+01\n10 160     6.184998e+01 1.792600e+02\n12 160     1.321700e+02 1.386300e+02\n13 160     4.918900e+02 -1.916100e+02\n15 160     1.465900e+02 1.842200e+02\n0 161     4.271700e+02 5.797700e+02\n1 161     8.769100e+02 4.885300e+02\n2 161     6.846997e+01 3.497200e+02\n3 161     -8.007001e+01 1.446002e+01\n6 161     -4.034998e+01 7.059900e+02\n8 161     1.376400e+02 2.762600e+02\n9 161     -9.678998e+01 3.798900e+02\n11 161     5.256899e+02 -1.738100e+02\n13 161     5.248300e+02 2.644100e+02\n14 161     7.225400e+02 -1.330100e+02\n0 162     4.886899e+02 3.777600e+02\n1 162     8.466700e+02 2.592600e+02\n2 162     2.730699e+02 2.592700e+02\n7 162     2.782400e+02 5.174200e+02\n12 162     2.880300e+02 4.982800e+02\n13 162     6.460601e+02 1.095900e+02\n0 163     2.382100e+02 4.838600e+02\n1 163     6.289500e+02 4.318200e+02\n4 163     -1.085999e+01 -5.121600e+02\n5 163     6.414200e+02 -1.609900e+02\n6 163     -2.165600e+02 5.499200e+02\n7 163     4.140015e+00 5.757800e+02\n9 163     -2.153200e+02 2.839400e+02\n11 163     3.647400e+02 -2.680300e+02\n12 163     -5.064001e+01 5.230300e+02\n14 163     5.456200e+02 -2.421300e+02\n0 164     2.618700e+02 4.796600e+02\n1 164     6.534500e+02 4.211900e+02\n4 164     -1.488000e+01 -5.278900e+02\n5 164     6.649000e+02 -1.647800e+02\n6 164     -1.915200e+02 5.489100e+02\n7 164     2.615002e+01 5.735600e+02\n8 164     3.454999e+01 1.869400e+02\n9 164     -1.979600e+02 2.806900e+02\n11 164     3.863400e+02 -2.706900e+02\n12 164     -2.628998e+01 5.209800e+02\n14 164     5.692800e+02 -2.456300e+02\n0 165     2.440002e+01 -3.365002e+01\n1 165     1.735300e+02 -1.089001e+01\n2 165     1.865700e+02 -3.869995e+00\n3 165     9.759003e+01 -3.123500e+02\n6 165     6.099976e+00 -1.170001e+01\n8 165     1.818000e+02 -5.117999e+01\n9 165     4.821002e+01 8.895001e+01\n10 165     -6.103998e+01 1.041500e+02\n12 165     1.795001e+01 4.059998e+01\n13 165     3.990000e+02 -2.487000e+02\n15 165     2.979980e+00 9.441000e+01\n0 166     3.053500e+02 5.600000e+02\n1 166     7.264399e+02 4.959200e+02\n3 166     -1.717100e+02 -6.830017e+00\n5 166     7.060200e+02 -7.821002e+01\n6 166     -1.615100e+02 6.584600e+02\n9 166     -1.785500e+02 3.580600e+02\n11 166     4.178400e+02 -1.984300e+02\n14 166     6.057800e+02 -1.597700e+02\n0 167     3.522800e+02 5.659100e+02\n1 167     7.826300e+02 4.910000e+02\n2 167     9.570007e+00 3.353500e+02\n3 167     -1.355400e+02 2.199707e-01\n5 167     7.532800e+02 -7.044000e+01\n6 167     -1.138200e+02 6.748700e+02\n8 167     8.888000e+01 2.633800e+02\n9 167     -1.461600e+02 3.651000e+02\n11 167     4.592100e+02 -1.904500e+02\n13 167     4.659200e+02 2.477200e+02\n14 167     6.510400e+02 -1.512900e+02\n0 168     4.340002e+01 1.379999e+01\n1 168     2.059100e+02 3.004999e+01\n9 168     4.921997e+01 1.348400e+02\n12 168     2.672998e+01 1.028700e+02\n0 169     5.065200e+02 3.321400e+02\n1 169     8.508600e+02 2.058500e+02\n2 169     3.046100e+02 2.228900e+02\n3 169     1.643800e+02 -1.018500e+02\n7 169     3.024301e+02 4.762100e+02\n9 169     1.177900e+02 2.793400e+02\n10 169     4.668700e+02 5.880300e+02\n13 169     6.680500e+02 7.373999e+01\n0 170     -1.005400e+02 4.959800e+02\n1 170     2.718600e+02 5.301500e+02\n7 170     -3.251000e+02 5.534800e+02\n8 170     -2.374100e+02 1.926400e+02\n11 170     5.808002e+01 -2.696400e+02\n0 171     9.150000e+01 5.075800e+02\n1 171     4.756400e+02 4.942300e+02\n2 171     -2.083000e+02 2.706500e+02\n3 171     -3.425700e+02 -6.331000e+01\n4 171     1.334998e+01 -4.170200e+02\n5 171     4.947100e+02 -1.397700e+02\n6 171     -3.790000e+02 5.501600e+02\n11 171     2.288101e+02 -2.535500e+02\n12 171     -2.078900e+02 5.303400e+02\n14 171     4.015400e+02 -2.242900e+02\n0 172     1.413101e+02 -5.045001e+01\n1 172     2.803101e+02 -6.185999e+01\n2 172     3.165400e+02 1.331000e+01\n3 172     2.192800e+02 -2.925400e+02\n4 172     -3.283800e+02 -5.257200e+02\n6 172     1.446200e+02 1.069000e+01\n7 172     6.608002e+01 8.850000e+01\n8 172     2.899400e+02 -3.823999e+01\n10 172     7.576001e+01 9.716998e+01\n12 172     1.617500e+02 5.902002e+01\n13 172     5.059700e+02 -2.519600e+02\n15 172     1.638000e+02 8.795999e+01\n0 173     -1.096700e+02 5.425200e+02\n1 173     2.738500e+02 5.792200e+02\n2 173     -3.969000e+02 3.091000e+02\n5 173     2.997100e+02 -1.063200e+02\n12 173     -4.312800e+02 5.443000e+02\n0 174     5.653003e+01 5.683900e+02\n1 174     4.543101e+02 5.660500e+02\n3 174     -3.767500e+02 3.419983e+00\n5 174     4.613400e+02 -7.701001e+01\n6 174     -4.291100e+02 6.222700e+02\n8 174     -1.224700e+02 2.603800e+02\n9 174     -3.632200e+02 3.593700e+02\n11 174     1.940000e+02 -2.030700e+02\n12 174     -2.559200e+02 5.967100e+02\n13 174     2.333900e+02 2.304700e+02\n14 174     3.668900e+02 -1.643100e+02\n0 175     -8.462000e+01 4.734700e+02\n1 175     2.827700e+02 5.036000e+02\n4 175     5.109985e+00 -3.073400e+02\n5 175     3.204600e+02 -1.785400e+02\n6 175     -5.701700e+02 4.689500e+02\n8 175     -2.234600e+02 1.716300e+02\n12 175     -3.921700e+02 4.653800e+02\n0 176     -1.002400e+02 5.035900e+02\n1 176     2.742600e+02 5.378600e+02\n2 176     -3.855200e+02 2.646100e+02\n3 176     -5.137000e+02 -6.644000e+01\n5 176     3.067100e+02 -1.460000e+02\n7 176     -3.259700e+02 5.618800e+02\n12 176     -4.141400e+02 4.998800e+02\n0 177     5.590100e+02 1.636700e+02\n1 177     8.379100e+02 1.507001e+01\n2 177     4.506000e+02 1.236000e+02\n6 177     3.605900e+02 3.030100e+02\n7 177     3.883101e+02 3.299500e+02\n8 177     4.295300e+02 7.464999e+01\n9 177     2.470000e+02 2.008100e+02\n10 177     5.418400e+02 3.917500e+02\n12 177     4.481899e+02 3.120300e+02\n15 177     7.307600e+02 4.412100e+02\n0 178     4.954600e+02 3.639700e+02\n1 178     8.494700e+02 2.431400e+02\n2 178     2.844800e+02 2.502800e+02\n3 178     1.439700e+02 -7.614001e+01\n7 178     2.869200e+02 5.055400e+02\n9 178     9.890002e+01 3.015000e+02\n11 178     6.080601e+02 -3.642600e+02\n12 178     2.995200e+02 4.866500e+02\n0 179     2.707001e+01 9.822000e+01\n1 179     2.195601e+02 1.164500e+02\n3 179     3.039001e+01 -2.009100e+02\n4 179     -2.096000e+02 -4.313700e+02\n5 179     6.505601e+02 -5.589000e+02\n6 179     -5.265002e+01 1.323600e+02\n8 179     1.367200e+02 5.010001e+01\n10 179     -7.258002e+01 2.582900e+02\n12 179     -2.834003e+01 1.865800e+02\n13 179     3.787900e+02 -1.373400e+02\n15 179     -1.064001e+01 2.747300e+02\n0 180     2.170001e+01 4.681500e+02\n1 180     3.919700e+02 4.705100e+02\n2 180     -2.681800e+02 2.240900e+02\n3 180     -4.007300e+02 -1.069400e+02\n4 180     -3.909973e+00 -3.706300e+02\n5 180     4.254100e+02 -1.816300e+02\n6 180     -4.486000e+02 4.856800e+02\n7 180     -2.018600e+02 5.373200e+02\n8 180     -1.412300e+02 1.702100e+02\n9 180     -3.777200e+02 2.595700e+02\n11 180     1.677100e+02 -2.915000e+02\n12 180     -2.755700e+02 4.752800e+02\n13 180     2.079100e+02 1.444900e+02\n14 180     3.349200e+02 -2.676200e+02\n0 181     8.965002e+01 5.364001e+01\n1 181     2.630699e+02 5.553998e+01\n2 181     2.217900e+02 1.008500e+02\n4 181     -2.463700e+02 -4.845699e+02\n5 181     7.424800e+02 -6.068800e+02\n6 181     4.707001e+01 1.081200e+02\n7 181     -3.690002e+00 1.816200e+02\n8 181     2.141900e+02 3.573001e+01\n10 181     4.809998e+00 2.122400e+02\n13 181     4.462100e+02 -1.684000e+02\n15 181     7.921002e+01 2.226400e+02\n0 182     6.813000e+01 -9.080017e+00\n1 182     2.219900e+02 5.700073e-01\n2 182     2.271300e+02 3.725000e+01\n3 182     1.343600e+02 -2.723600e+02\n4 182     -2.874900e+02 -4.672500e+02\n6 182     4.985999e+01 3.248999e+01\n7 182     -1.384003e+01 1.168300e+02\n8 182     2.161300e+02 -1.817001e+01\n10 182     -1.346997e+01 1.374300e+02\n12 182     6.396997e+01 8.482001e+01\n13 182     4.368500e+02 -2.229700e+02\n15 182     5.815002e+01 1.341800e+02\n0 183     -5.054999e+01 4.556200e+02\n1 183     3.113101e+02 4.775200e+02\n2 183     -3.267800e+02 2.161200e+02\n3 183     -4.558200e+02 -1.148800e+02\n5 183     3.585100e+02 -1.965400e+02\n6 183     -5.189700e+02 4.554200e+02\n7 183     -2.690500e+02 5.183200e+02\n8 183     -1.902300e+02 1.619000e+02\n11 183     1.025300e+02 -3.035500e+02\n12 183     -3.473500e+02 4.528100e+02\n13 183     1.549800e+02 1.301300e+02\n14 183     2.696899e+02 -2.829300e+02\n0 184     1.710900e+02 5.292500e+02\n1 184     5.675100e+02 4.967500e+02\n2 184     -1.398000e+02 2.940100e+02\n5 184     5.732900e+02 -1.150000e+02\n6 184     -2.969600e+02 5.931800e+02\n8 184     -3.559003e+01 2.278700e+02\n9 184     -2.712600e+02 3.251100e+02\n12 184     -1.283900e+02 5.660200e+02\n14 184     4.780400e+02 -1.987100e+02\n0 185     1.282000e+02 4.551100e+02\n1 185     5.009800e+02 4.307300e+02\n2 185     -1.695300e+02 2.104000e+02\n3 185     -3.062100e+02 -1.216600e+02\n4 185     -2.063000e+01 -4.365200e+02\n5 185     5.302600e+02 -1.953200e+02\n7 185     -9.759003e+01 5.356200e+02\n8 185     -6.012000e+01 1.613800e+02\n12 185     -1.605100e+02 4.739800e+02\n13 185     2.923300e+02 1.392100e+02\n14 185     4.391500e+02 -2.777100e+02\n0 186     -6.071997e+01 3.934998e+01\n1 186     1.210500e+02 8.322000e+01\n2 186     4.058002e+01 2.217999e+01\n3 186     -4.634003e+01 -2.916800e+02\n4 186     -2.399400e+02 -3.622400e+02\n6 186     -1.415700e+02 3.189001e+01\n7 186     -1.590200e+02 1.378000e+02\n8 186     6.619000e+01 -2.513000e+01\n9 186     -7.663000e+01 1.046200e+02\n12 186     -1.198200e+02 8.801001e+01\n0 187     1.971997e+01 9.695999e+01\n1 187     2.121700e+02 1.171500e+02\n2 187     1.175200e+02 1.122100e+02\n3 187     2.360999e+01 -2.037700e+02\n4 187     -2.095400e+02 -4.261700e+02\n5 187     6.421600e+02 -5.604500e+02\n6 187     -6.015997e+01 1.289600e+02\n7 187     -8.534003e+01 2.110400e+02\n10 187     -8.146002e+01 2.565900e+02\n12 187     -3.608002e+01 1.833200e+02\n13 187     3.715601e+02 -1.388400e+02\n15 187     -1.990997e+01 2.715300e+02\n0 188     -1.100600e+02 4.422800e+02\n1 188     2.488101e+02 4.786800e+02\n2 188     -3.909800e+02 1.910500e+02\n3 188     -5.225100e+02 -1.388500e+02\n5 188     2.934600e+02 -2.121600e+02\n7 188     -3.278700e+02 4.964900e+02\n11 188     4.962000e+01 -3.166000e+02\n12 188     -4.147700e+02 4.234400e+02\n14 188     2.064100e+02 -2.994700e+02\n0 189     -1.078000e+02 5.097500e+02\n1 189     2.678101e+02 5.456900e+02\n3 189     -5.205600e+02 -5.933002e+01\n5 189     2.997200e+02 -1.402300e+02\n7 189     -3.341000e+02 5.671100e+02\n8 189     -2.438100e+02 2.049600e+02\n0 190     -2.562000e+01 4.765700e+02\n1 190     3.445400e+02 4.917500e+02\n2 190     -3.136300e+02 2.323700e+02\n5 190     3.785000e+02 -1.747400e+02\n6 190     -5.035800e+02 4.852900e+02\n7 190     -2.489900e+02 5.408600e+02\n9 190     -4.171800e+02 2.654200e+02\n12 190     -3.279500e+02 4.766900e+02\n13 190     1.704100e+02 1.489100e+02\n14 190     2.888400e+02 -2.608000e+02\n0 191     -2.426001e+01 5.067999e+01\n1 191     1.561500e+02 8.445999e+01\n2 191     8.709003e+01 5.545001e+01\n3 191     -9.799805e-01 -2.589300e+02\n7 191     -1.214200e+02 1.577400e+02\n8 191     1.041000e+02 3.999939e-01\n10 191     -1.270600e+02 1.976700e+02\n12 191     -7.422998e+01 1.180200e+02\n13 191     3.395800e+02 -1.822700e+02\n15 191     -7.392999e+01 2.023800e+02\n0 192     2.979900e+02 5.761000e+02\n1 192     7.226899e+02 5.149500e+02\n2 192     -3.685999e+01 3.450000e+02\n0 193     8.165002e+01 -3.200073e-01\n1 193     2.376400e+02 5.229980e+00\n0 194     -3.080017e+00 4.811200e+02\n1 194     3.692000e+02 4.908300e+02\n2 194     -2.926300e+02 2.383300e+02\n3 194     -4.242400e+02 -9.319000e+01\n4 194     4.030029e+00 -3.564300e+02\n5 194     4.008300e+02 -1.695800e+02\n6 194     -4.791100e+02 4.961400e+02\n7 194     -2.273100e+02 5.482800e+02\n9 194     -3.998200e+02 2.710400e+02\n11 194     1.449600e+02 -2.803700e+02\n12 194     -3.041100e+02 4.850400e+02\n14 194     3.106801e+02 -2.551900e+02\n0 195     5.119995e+00 8.357001e+01\n1 195     1.939700e+02 1.072400e+02\n3 195     1.235999e+01 -2.208300e+02\n4 195     -2.162700e+02 -4.135000e+02\n6 195     -7.378003e+01 1.099300e+02\n12 195     -5.115997e+01 1.648900e+02\n15 195     -3.875000e+01 2.519300e+02\n0 196     9.795001e+01 5.679400e+02\n1 196     4.980699e+02 5.550300e+02\n2 196     -2.083500e+02 3.360000e+02\n3 196     -3.410400e+02 2.479980e+00\n4 196     4.865002e+01 -4.252700e+02\n5 196     5.013800e+02 -7.710999e+01\n6 196     -3.836600e+02 6.279600e+02\n8 196     -9.176001e+01 2.602100e+02\n9 196     -3.315000e+02 3.598700e+02\n11 196     2.302200e+02 -2.023400e+02\n12 196     -2.120900e+02 6.008300e+02\n13 196     2.652600e+02 2.319000e+02\n14 196     4.056801e+02 -1.635600e+02\n0 197     7.440997e+01 -2.972998e+01\n1 197     2.216400e+02 -2.159998e+01\n2 197     2.422900e+02 1.833002e+01\n3 197     1.495500e+02 -2.896000e+02\n4 197     -3.031600e+02 -4.726000e+02\n7 197     -3.770020e+00 9.754001e+01\n8 197     2.275100e+02 -3.357999e+01\n9 197     9.345001e+01 1.094900e+02\n10 197     -4.349976e+00 1.143800e+02\n12 197     7.798999e+01 6.290997e+01\n13 197     4.451700e+02 -2.400500e+02\n15 197     6.932001e+01 1.069300e+02\n0 198     -3.097998e+01 5.064700e+02\n1 198     3.464200e+02 5.235100e+02\n7 198     -2.580700e+02 5.715600e+02\n0 199     5.884301e+02 2.051100e+02\n1 199     8.823900e+02 5.046997e+01\n2 199     4.731300e+02 1.798200e+02\n3 199     3.342700e+02 -1.370200e+02\n6 199     3.870200e+02 3.605100e+02\n7 199     4.123199e+02 3.758500e+02\n8 199     4.487400e+02 1.195600e+02\n9 199     2.644800e+02 2.490500e+02\n10 199     5.736200e+02 4.439100e+02\n12 199     4.727800e+02 3.693500e+02\n15 199     7.676000e+02 5.043600e+02\n0 200     2.162200e+02 -1.194000e+01\n1 200     3.691200e+02 -4.721002e+01\n2 200     3.660601e+02 6.070001e+01\n3 200     2.613300e+02 -2.467600e+02\n7 200     1.311200e+02 1.375600e+02\n12 200     2.291300e+02 1.192600e+02\n13 200     5.627900e+02 -2.141400e+02\n15 200     2.609900e+02 1.505300e+02\n0 201     4.232001e+01 5.959998e+01\n1 201     2.197500e+02 7.495001e+01\n2 201     1.671400e+02 9.160999e+01\n3 201     7.359998e+01 -2.217400e+02\n6 201     -1.059003e+01 9.802002e+01\n7 201     -5.329999e+01 1.795000e+02\n10 201     -5.103998e+01 2.149400e+02\n12 201     8.070007e+00 1.525000e+02\n15 201     1.454999e+01 2.242300e+02\n0 202     5.592200e+02 2.350100e+02\n1 202     8.609399e+02 9.085999e+01\n3 202     2.938900e+02 -1.239100e+02\n7 202     3.790200e+02 3.990600e+02\n15 202     7.229600e+02 5.422100e+02\n0 203     2.084301e+02 5.401001e+01\n1 203     3.830800e+02 2.078003e+01\n2 203     3.284200e+02 1.169700e+02\n6 203     1.670100e+02 1.411300e+02\n8 203     3.046200e+02 5.012000e+01\n10 203     1.424200e+02 2.253100e+02\n12 203     1.968900e+02 1.887200e+02\n15 203     2.421200e+02 2.399700e+02\n0 204     5.598000e+02 1.577700e+02\n1 204     8.368101e+02 8.580017e+00\n7 204     3.901000e+02 3.244500e+02\n10 204     5.436700e+02 3.850400e+02\n12 204     4.510601e+02 3.059500e+02\n15 204     7.324301e+02 4.331700e+02\n0 205     5.809998e+01 -2.262000e+01\n1 205     2.093500e+02 -9.109985e+00\n3 205     1.304200e+02 -2.873300e+02\n4 205     -2.956700e+02 -4.594100e+02\n6 205     4.302002e+01 1.370001e+01\n7 205     -2.092999e+01 1.026700e+02\n8 205     2.109700e+02 -3.204999e+01\n12 205     5.623999e+01 6.640997e+01\n13 205     4.303700e+02 -2.343000e+02\n0 206     1.143900e+02 5.123999e+01\n1 206     2.860300e+02 4.620001e+01\n2 206     2.496600e+02 1.047100e+02\n3 206     1.504700e+02 -2.079400e+02\n4 206     -2.512900e+02 -5.048300e+02\n8 206     2.369300e+02 3.884000e+01\n9 206     9.448999e+01 1.810900e+02\n10 206     3.296002e+01 2.122500e+02\n12 206     9.726001e+01 1.651200e+02\n13 206     4.686400e+02 -1.679300e+02\n0 207     1.698999e+01 5.152700e+02\n1 207     3.979600e+02 5.207000e+02\n2 207     -2.764200e+02 2.778600e+02\n3 207     -4.079200e+02 -5.387000e+01\n4 207     2.245001e+01 -3.713800e+02\n5 207     4.217200e+02 -1.331200e+02\n6 207     -4.626000e+02 5.445600e+02\n9 207     -3.874500e+02 3.064200e+02\n11 207     1.610200e+02 -2.505500e+02\n12 207     -2.888500e+02 5.289300e+02\n13 207     2.033300e+02 1.839900e+02\n14 207     3.298101e+02 -2.191100e+02\n0 208     2.173999e+01 4.331400e+02\n1 208     3.828000e+02 4.357800e+02\n2 208     -2.655200e+02 1.830300e+02\n3 208     -3.988600e+02 -1.479400e+02\n4 208     -2.592999e+01 -3.674700e+02\n5 208     4.241400e+02 -2.203800e+02\n6 208     -4.422600e+02 4.391700e+02\n7 208     -1.973300e+02 5.017300e+02\n8 208     -1.385300e+02 1.378400e+02\n12 208     -2.690300e+02 4.329400e+02\n13 208     2.079301e+02 1.141100e+02\n14 208     3.347200e+02 -3.050500e+02\n0 209     4.454999e+01 5.764800e+02\n1 209     4.435601e+02 5.770000e+02\n2 209     -2.568100e+02 3.459400e+02\n3 209     -3.887500e+02 1.231000e+01\n4 209     5.653003e+01 -3.934700e+02\n5 209     4.502600e+02 -6.914001e+01\n6 209     -4.434800e+02 6.296100e+02\n8 209     -1.314800e+02 2.672900e+02\n12 209     -2.698800e+02 6.042700e+02\n13 209     2.239399e+02 2.368000e+02\n14 209     3.553500e+02 -1.563800e+02\n0 210     1.090000e+02 4.384998e+01\n1 210     2.784700e+02 4.057001e+01\n2 210     2.471400e+02 9.656000e+01\n6 210     7.388000e+01 1.034300e+02\n7 210     1.719000e+01 1.758800e+02\n8 210     2.345500e+02 3.201001e+01\n10 210     2.850000e+01 2.031600e+02\n12 210     9.396002e+01 1.554200e+02\n13 210     4.649700e+02 -1.746300e+02\n15 210     1.070300e+02 2.119700e+02\n0 211     5.716998e+01 5.062300e+02\n1 211     4.386500e+02 5.018300e+02\n2 211     -2.388700e+02 2.682200e+02\n3 211     -3.713800e+02 -6.481000e+01\n5 211     4.611700e+02 -1.412300e+02\n7 211     -1.720600e+02 5.804100e+02\n8 211     -1.173100e+02 2.056300e+02\n9 211     -3.543400e+02 2.992700e+02\n12 211     -2.438400e+02 5.249300e+02\n13 211     2.353400e+02 1.785000e+02\n14 211     3.687700e+02 -2.270700e+02\n0 212     -2.009998e+01 5.275900e+02\n1 212     3.629000e+02 5.424400e+02\n2 212     -3.120300e+02 2.914400e+02\n5 212     3.857200e+02 -1.208000e+02\n6 212     -5.065600e+02 5.533600e+02\n12 212     -3.308300e+02 5.384800e+02\n0 213     4.360999e+01 5.318700e+02\n1 213     4.311700e+02 5.313200e+02\n2 213     -2.544000e+02 2.976100e+02\n4 213     3.038000e+01 -3.889100e+02\n5 213     4.490100e+02 -1.122500e+02\n8 213     -1.292700e+02 2.333000e+02\n11 213     1.840300e+02 -2.346500e+02\n12 213     -2.630300e+02 5.547900e+02\n0 214     5.889001e+01 1.250000e+00\n1 214     2.164200e+02 1.319000e+01\n2 214     2.133500e+02 4.444000e+01\n3 214     1.205100e+02 -2.656100e+02\n4 214     -2.789900e+02 -4.601300e+02\n7 214     -2.498999e+01 1.254100e+02\n9 214     6.764001e+01 1.302000e+02\n10 214     -2.515002e+01 1.485200e+02\n13 214     4.270300e+02 -2.150100e+02\n15 214     4.432001e+01 1.468300e+02\n0 215     4.454999e+01 5.764800e+02\n1 215     4.435601e+02 5.770000e+02\n2 215     -2.568100e+02 3.459400e+02\n4 215     5.653003e+01 -3.934700e+02\n5 215     4.502600e+02 -6.914001e+01\n6 215     -4.434800e+02 6.296100e+02\n8 215     -1.314800e+02 2.672900e+02\n11 215     1.830800e+02 -1.971100e+02\n12 215     -2.698800e+02 6.042700e+02\n13 215     2.239399e+02 2.368000e+02\n14 215     3.553500e+02 -1.563800e+02\n0 216     3.796997e+01 -2.208002e+01\n1 216     1.894100e+02 -3.200012e+00\n2 216     1.986000e+02 1.359998e+01\n3 216     1.079700e+02 -2.953800e+02\n7 216     -4.265002e+01 9.839999e+01\n8 216     1.918400e+02 -3.703000e+01\n10 216     -4.703003e+01 1.193500e+02\n12 216     3.219000e+01 5.970001e+01\n13 216     4.107300e+02 -2.370300e+02\n15 216     1.921997e+01 1.121900e+02\n0 217     1.213500e+02 5.070001e+01\n1 217     2.924399e+02 4.426001e+01\n2 217     2.564700e+02 1.050700e+02\n3 217     1.570500e+02 -2.072400e+02\n4 217     -2.520800e+02 -5.089700e+02\n6 217     8.484998e+01 1.144600e+02\n8 217     2.430000e+02 3.904001e+01\n10 217     4.277002e+01 2.120700e+02\n12 217     1.063300e+02 1.661100e+02\n15 217     1.225400e+02 2.231700e+02\n0 218     4.856000e+01 5.450600e+02\n1 218     4.397200e+02 5.438400e+02\n2 218     -2.502400e+02 3.115400e+02\n5 218     4.533000e+02 -1.017200e+02\n6 218     -4.329700e+02 5.894200e+02\n8 218     -1.262900e+02 2.390100e+02\n9 218     -3.663900e+02 3.366000e+02\n12 218     -2.599400e+02 5.683900e+02\n13 218     2.277800e+02 2.107200e+02\n14 218     3.596300e+02 -1.876600e+02\n0 219     3.036899e+02 5.745200e+02\n1 219     7.287000e+02 5.121500e+02\n9 219     -1.811800e+02 3.709500e+02\n0 220     5.587000e+01 8.747000e+01\n1 220     2.421100e+02 9.870999e+01\n2 220     1.714800e+02 1.177200e+02\n3 220     7.465997e+01 -1.965700e+02\n4 220     -2.195900e+02 -4.568900e+02\n6 220     -6.239990e+00 1.318900e+02\n8 220     1.731200e+02 5.148999e+01\n10 220     -3.971002e+01 2.495200e+02\n12 220     1.647998e+01 1.852000e+02\n13 220     4.096899e+02 -1.432600e+02\n15 220     2.978003e+01 2.642500e+02\n0 221     8.166998e+01 9.720999e+01\n1 221     2.711200e+02 1.006900e+02\n2 221     1.860000e+02 1.324000e+02\n4 221     -2.166500e+02 -4.754600e+02\n5 221     7.192600e+02 -5.593199e+02\n6 221     1.291998e+01 1.515200e+02\n7 221     -2.166998e+01 2.220400e+02\n9 221     4.196002e+01 2.009100e+02\n12 221     3.763000e+01 2.043900e+02\n13 221     4.282800e+02 -1.318200e+02\n15 221     6.357001e+01 2.811800e+02\n0 222     9.183002e+01 -1.650024e+00\n1 222     2.468800e+02 7.899780e-01\n2 222     2.495601e+02 5.106000e+01\n3 222     1.541300e+02 -2.582100e+02\n6 222     7.392999e+01 4.877002e+01\n7 222     8.640015e+00 1.283900e+02\n10 222     1.322998e+01 1.483100e+02\n12 222     8.976001e+01 1.006000e+02\n15 222     8.946002e+01 1.475000e+02\n0 223     5.115699e+02 3.734200e+02\n1 223     8.698900e+02 2.490700e+02\n2 223     3.006700e+02 2.653500e+02\n3 223     1.595300e+02 -6.069000e+01\n6 223     2.087600e+02 5.106200e+02\n7 223     3.019100e+02 5.173200e+02\n8 223     3.135600e+02 1.971300e+02\n9 223     1.128200e+02 3.162600e+02\n11 223     6.219100e+02 -3.535300e+02\n13 223     6.696600e+02 1.092800e+02\n0 224     -4.229980e+00 9.957001e+01\n1 224     1.914200e+02 1.260800e+02\n3 224     -6.010010e+00 -2.129500e+02\n4 224     -2.053700e+02 -4.067000e+02\n6 224     -9.248001e+01 1.215700e+02\n7 224     -1.106000e+02 2.084600e+02\n12 224     -6.831000e+01 1.769500e+02\n13 224     3.487200e+02 -1.397800e+02\n15 224     -5.290997e+01 2.722100e+02\n0 225     5.784700e+02 1.036900e+02\n1 225     8.393199e+02 -5.426001e+01\n2 225     4.890601e+02 7.191998e+01\n3 225     3.543700e+02 -2.401000e+02\n6 225     4.009000e+02 2.427100e+02\n7 225     4.159500e+02 2.756800e+02\n8 225     4.597500e+02 3.113000e+01\n9 225     2.803500e+02 1.583800e+02\n10 225     5.696700e+02 3.234100e+02\n12 225     4.865500e+02 2.525900e+02\n15 225     7.651300e+02 3.600600e+02\n0 226     2.046300e+02 4.853800e+02\n1 226     5.915900e+02 4.425100e+02\n2 226     -1.063800e+02 2.466800e+02\n3 226     -2.445500e+02 -8.667999e+01\n4 226     -7.580017e+00 -4.894200e+02\n5 226     6.076600e+02 -1.609000e+02\n6 226     -2.533300e+02 5.456900e+02\n7 226     -2.826001e+01 5.734500e+02\n8 226     -6.830017e+00 1.902600e+02\n9 226     -2.409900e+02 2.845600e+02\n11 226     3.327400e+02 -2.682100e+02\n12 226     -8.658002e+01 5.217800e+02\n14 226     5.119200e+02 -2.397600e+02\n0 227     9.265002e+01 5.151800e+02\n1 227     4.788600e+02 5.018800e+02\n3 227     -3.400000e+02 -5.263000e+01\n5 227     4.982000e+02 -1.291700e+02\n6 227     -3.768500e+02 5.634500e+02\n9 227     -3.269600e+02 3.109400e+02\n13 227     2.626700e+02 1.875900e+02\n14 227     4.025601e+02 -2.168600e+02\n0 228     -8.965997e+01 4.681400e+02\n1 228     2.761801e+02 4.995300e+02\n2 228     -3.738200e+02 2.223600e+02\n6 228     -5.757300e+02 4.610700e+02\n7 228     -3.111800e+02 5.257000e+02\n8 228     -2.274200e+02 1.668300e+02\n11 228     6.779999e+01 -2.934700e+02\n0 229     5.912900e+02 1.399200e+02\n1 229     8.643900e+02 -1.982001e+01\n2 229     4.937300e+02 1.154700e+02\n3 229     3.578400e+02 -1.980100e+02\n7 229     4.238500e+02 3.131600e+02\n8 229     4.640900e+02 6.648001e+01\n9 229     2.831200e+02 1.954200e+02\n10 229     5.818400e+02 3.671300e+02\n13 229     7.965400e+02 -7.571002e+01\n15 229     7.788800e+02 4.128400e+02\n0 230     4.223700e+02 5.774600e+02\n1 230     8.710699e+02 4.870900e+02\n5 230     8.234600e+02 -5.541998e+01\n6 230     -4.466998e+01 7.018200e+02\n14 230     7.184301e+02 -1.355900e+02\n0 231     4.712600e+02 3.942700e+02\n1 231     8.337500e+02 2.816200e+02\n2 231     2.495300e+02 2.690200e+02\n3 231     1.093600e+02 -5.881000e+01\n7 231     2.585400e+02 5.306700e+02\n8 231     2.728400e+02 2.014200e+02\n9 231     6.865997e+01 3.174100e+02\n11 231     5.810200e+02 -3.366700e+02\n12 231     2.643600e+02 5.110100e+02\n13 231     6.277600e+02 1.219000e+02\n14 231     8.613300e+02 -3.119800e+02\n0 232     3.583700e+02 5.743400e+02\n1 232     7.926100e+02 4.987500e+02\n2 232     1.309998e+01 3.429000e+02\n3 232     -1.323800e+02 8.530029e+00\n5 232     7.585900e+02 -6.153003e+01\n6 232     -1.098900e+02 6.859100e+02\n9 232     -1.434400e+02 3.726500e+02\n11 232     4.636000e+02 -1.827700e+02\n13 232     4.701500e+02 2.550500e+02\n14 232     6.563700e+02 -1.428000e+02\n0 233     -3.472998e+01 1.007000e+02\n1 233     1.646700e+02 1.352800e+02\n2 233     4.415997e+01 8.964001e+01\n3 233     -4.614001e+01 -2.278100e+02\n4 233     -2.023400e+02 -3.823200e+02\n5 233     5.692600e+02 -5.595900e+02\n6 233     -1.366700e+02 1.106800e+02\n7 233     -1.437300e+02 2.034200e+02\n8 233     7.154999e+01 3.076999e+01\n10 233     -1.445000e+02 2.546100e+02\n12 233     -1.090100e+02 1.653800e+02\n13 233     3.179200e+02 -1.423400e+02\n15 233     -9.370001e+01 2.696000e+02\n0 234     2.446000e+02 1.934003e+01\n1 234     4.098900e+02 -2.551001e+01\n2 234     3.731600e+02 8.684003e+01\n3 234     2.664399e+02 -2.226600e+02\n7 234     1.517500e+02 1.705500e+02\n10 234     1.878500e+02 1.885000e+02\n13 234     5.796801e+02 -1.866900e+02\n15 234     2.967500e+02 1.970500e+02\n0 235     -9.320007e+00 1.190002e+00\n1 235     1.540400e+02 3.140997e+01\n4 235     -2.701100e+02 -4.044100e+02\n6 235     -4.963000e+01 1.328003e+01\n8 235     1.385800e+02 -3.310001e+01\n10 235     -1.025800e+02 1.401100e+02\n12 235     -3.445001e+01 6.779999e+01\n13 235     3.632900e+02 -2.228200e+02\n15 235     -4.577002e+01 1.363000e+02\n0 236     -2.603998e+01 3.287000e+01\n1 236     1.488900e+02 6.765002e+01\n2 236     9.525000e+01 3.962000e+01\n3 236     6.880005e+00 -2.732900e+02\n4 236     -2.470400e+02 -3.912800e+02\n6 236     -8.698999e+01 4.253003e+01\n7 236     -1.194600e+02 1.395800e+02\n10 236     -1.272300e+02 1.762600e+02\n12 236     -6.931000e+01 9.840997e+01\n13 236     3.410601e+02 -1.971600e+02\n15 236     -7.379999e+01 1.782400e+02\n0 237     1.095000e+02 5.719971e+00\n1 237     2.666100e+02 2.890015e+00\n2 237     2.643600e+02 6.240002e+01\n3 237     1.676000e+02 -2.473100e+02\n6 237     9.056000e+01 6.209998e+01\n7 237     2.502002e+01 1.387200e+02\n8 237     2.473600e+02 2.619995e+00\n10 237     3.306000e+01 1.589300e+02\n12 237     1.079300e+02 1.135600e+02\n13 237     4.715500e+02 -2.066600e+02\n15 237     1.124300e+02 1.599600e+02\n0 238     3.622000e+02 5.140900e+02\n1 238     7.775300e+02 4.329600e+02\n3 238     -1.198200e+02 -5.415997e+01\n5 238     7.657100e+02 -1.253900e+02\n6 238     -9.342001e+01 6.109500e+02\n9 238     -1.313500e+02 3.161100e+02\n11 238     4.745601e+02 -2.341600e+02\n13 238     4.770601e+02 2.044700e+02\n14 238     6.660699e+02 -2.043000e+02\n0 239     -1.937600e+02 5.080000e+02\n1 239     1.799800e+02 5.647200e+02\n2 239     -4.764000e+02 2.699200e+02\n3 239     -6.029600e+02 -5.914001e+01\n7 239     -4.201000e+02 5.567300e+02\n0 240     -6.419983e+00 4.749300e+02\n1 240     3.643000e+02 4.853200e+02\n2 240     -2.953700e+02 2.311900e+02\n5 240     3.972100e+02 -1.762300e+02\n6 240     -4.814500e+02 4.871600e+02\n7 240     -2.299000e+02 5.414700e+02\n8 240     -1.633100e+02 1.754200e+02\n9 240     -4.013200e+02 2.646900e+02\n11 240     1.426700e+02 -2.856600e+02\n12 240     -3.064500e+02 4.779300e+02\n0 241     -8.925000e+01 4.743600e+02\n1 241     2.780800e+02 5.054500e+02\n2 241     -3.734800e+02 2.290100e+02\n5 241     3.158700e+02 -1.778400e+02\n6 241     -5.758300e+02 4.688100e+02\n7 241     -3.113100e+02 5.319400e+02\n8 241     -2.275900e+02 1.721800e+02\n11 241     6.806000e+01 -2.881800e+02\n12 241     -3.971300e+02 4.648800e+02\n13 241     1.199800e+02 1.432200e+02\n14 241     2.272100e+02 -2.651000e+02\n0 242     -3.066998e+01 5.616400e+02\n1 242     3.604000e+02 5.797200e+02\n5 242     3.768700e+02 -8.644000e+01\n6 242     -5.252000e+02 5.962600e+02\n8 242     -1.873100e+02 2.524800e+02\n11 242     1.173800e+02 -2.123600e+02\n12 242     -3.481100e+02 5.767000e+02\n0 243     -2.281000e+01 5.676400e+02\n1 243     3.703800e+02 5.839900e+02\n2 243     -3.171800e+02 3.367100e+02\n5 243     3.847500e+02 -7.957001e+01\n0 244     2.101600e+02 5.526900e+02\n1 244     6.169399e+02 5.116100e+02\n2 244     -1.086700e+02 3.196200e+02\n3 244     -2.473600e+02 -1.428003e+01\n4 244     3.335999e+01 -4.975400e+02\n5 244     6.115900e+02 -8.892999e+01\n6 244     -2.600300e+02 6.309200e+02\n9 244     -2.459400e+02 3.484000e+02\n11 244     3.321899e+02 -2.099200e+02\n12 244     -9.263000e+01 5.982000e+02\n14 244     5.142200e+02 -1.729100e+02\n0 245     5.254999e+01 5.434800e+02\n1 245     4.438800e+02 5.416200e+02\n8 245     -1.233800e+02 2.388400e+02\n9 245     -3.631400e+02 3.357800e+02\n11 245     1.916300e+02 -2.250600e+02\n14 245     3.639600e+02 -1.890900e+02\n0 246     -1.074400e+02 5.323300e+02\n1 246     2.737900e+02 5.682100e+02\n2 246     -3.944500e+02 2.975100e+02\n12 246     -4.272000e+02 5.327200e+02\n0 247     2.832600e+02 5.630600e+02\n1 247     7.027700e+02 5.046500e+02\n2 247     -4.741998e+01 3.306100e+02\n3 247     -1.901800e+02 -3.729980e+00\n5 247     6.840400e+02 -7.585999e+01\n6 247     -1.852300e+02 6.577700e+02\n9 247     -1.951200e+02 3.600000e+02\n11 247     3.970699e+02 -1.968300e+02\n12 247     -1.896002e+01 6.183300e+02\n14 247     5.843400e+02 -1.585200e+02\n0 248     -1.050100e+02 5.271900e+02\n1 248     2.750800e+02 5.626500e+02\n2 248     -3.919500e+02 2.914700e+02\n4 248     3.735999e+01 -3.003400e+02\n5 248     3.033900e+02 -1.220400e+02\n8 248     -2.430200e+02 2.208200e+02\n11 248     5.312000e+01 -2.431600e+02\n12 248     -4.239300e+02 5.264400e+02\n0 249     -2.665000e+02 4.544700e+02\n1 249     9.477002e+01 5.290700e+02\n4 249     8.000000e+00 -2.028900e+02\n5 249     1.408600e+02 -1.985400e+02\n7 249     -4.864600e+02 4.922800e+02\n11 249     -8.852002e+01 -3.073100e+02\n12 249     -5.932500e+02 4.157800e+02\n0 250     5.981000e+01 -1.628000e+02\n1 250     1.671300e+02 -1.475200e+02\n2 250     2.783700e+02 -1.261000e+02\n3 250     1.921100e+02 -4.261801e+02\n6 250     9.641998e+01 -1.436700e+02\n13 250     4.482500e+02 -3.591200e+02\n15 250     6.758002e+01 -7.571002e+01\n0 251     3.272998e+01 -1.589800e+02\n1 251     1.432700e+02 -1.352100e+02\n2 251     2.468600e+02 -1.306200e+02\n3 251     1.623300e+02 -4.323600e+02\n4 251     -3.925200e+02 -4.357600e+02\n6 251     6.346997e+01 -1.494900e+02\n7 251     -2.340997e+01 -3.903998e+01\n8 251     2.261600e+02 -1.574600e+02\n10 251     -3.865997e+01 -3.960999e+01\n12 251     6.859003e+01 -1.014400e+02\n13 251     4.230699e+02 -3.576800e+02\n15 251     3.053003e+01 -7.390002e+01\n0 252     -7.710999e+01 -2.262700e+02\n1 252     2.562000e+01 -1.675100e+02\n3 252     5.309003e+01 -5.722800e+02\n4 252     -4.255500e+02 -3.400700e+02\n6 252     -5.690002e+01 -2.809900e+02\n7 252     -1.274000e+02 -1.310600e+02\n8 252     1.269500e+02 -2.653500e+02\n9 252     1.252002e+01 -1.321200e+02\n12 252     -5.470001e+01 -2.290400e+02\n15 252     -1.067800e+02 -1.796100e+02\n0 253     -1.627002e+01 -2.250500e+02\n1 253     7.664001e+01 -1.839000e+02\n2 253     2.226100e+02 -2.159300e+02\n3 253     1.458400e+02 -5.156801e+02\n4 253     -4.346400e+02 -3.952600e+02\n7 253     -6.025000e+01 -1.140700e+02\n8 253     2.034500e+02 -2.278900e+02\n10 253     -8.800000e+01 -1.212600e+02\n12 253     3.271002e+01 -1.953600e+02\n13 253     3.880100e+02 -4.217600e+02\n15 253     -2.653003e+01 -1.697300e+02\n0 254     -8.364001e+01 -2.469000e+02\n1 254     1.554999e+01 -1.858700e+02\n6 254     -6.142999e+01 -3.147400e+02\n7 254     -1.312900e+02 -1.541600e+02\n9 254     1.354999e+01 -1.698900e+02\n10 254     -1.631800e+02 -1.527000e+02\n12 254     -5.720001e+01 -2.630200e+02\n15 254     -1.123000e+02 -2.082300e+02\n0 255     -1.485000e+02 5.321100e+02\n1 255     2.316100e+02 5.779500e+02\n2 255     -4.335200e+02 2.976100e+02\n5 255     2.616899e+02 -1.170200e+02\n7 255     -3.778100e+02 5.865400e+02\n11 255     1.521002e+01 -2.399700e+02\n12 255     -4.723200e+02 5.275100e+02\n0 256     3.650000e+01 5.594500e+02\n1 256     4.306600e+02 5.614700e+02\n8 256     -1.365700e+02 2.518200e+02\n9 256     -3.779000e+02 3.509900e+02\n11 256     1.768900e+02 -2.116000e+02\n13 256     2.180000e+02 2.215800e+02\n0 257     3.623700e+02 5.779000e+02\n1 257     7.984301e+02 5.013700e+02\n5 257     7.630699e+02 -5.831000e+01\n11 257     4.673101e+02 -1.799900e+02\n13 257     4.734200e+02 2.579500e+02\n14 257     6.597300e+02 -1.391600e+02\n0 258     1.011200e+02 4.294100e+02\n1 258     4.655500e+02 4.112900e+02\n2 258     -1.927800e+02 1.802000e+02\n8 258     -7.879999e+01 1.366300e+02\n13 258     2.711000e+02 1.154100e+02\n14 258     4.128900e+02 -3.062900e+02\n0 259     -1.974100e+02 3.867000e+02\n1 259     1.473700e+02 4.454600e+02\n2 259     -4.744900e+02 1.223600e+02\n10 259     -3.695500e+02 5.820300e+02\n13 259     3.391998e+01 6.266998e+01\n14 259     1.186100e+02 -3.604500e+02\n0 260     6.696002e+01 6.401001e+01\n1 260     2.447100e+02 7.214001e+01\n2 260     1.921500e+02 1.032700e+02\n3 260     9.691998e+01 -2.107800e+02\n4 260     -2.364000e+02 -4.655800e+02\n5 260     7.118101e+02 -5.955400e+02\n6 260     1.645001e+01 1.114600e+02\n7 260     -2.900000e+01 1.881600e+02\n8 260     1.903500e+02 3.817001e+01\n9 260     4.746997e+01 1.775600e+02\n10 260     -2.273999e+01 2.222100e+02\n12 260     3.644000e+01 1.650400e+02\n13 260     4.234900e+02 -1.613100e+02\n15 260     4.735999e+01 2.336900e+02\n0 261     -3.140997e+01 1.115500e+02\n1 261     1.717600e+02 1.448600e+02\n2 261     4.096002e+01 9.821002e+01\n3 261     -5.034998e+01 -2.189100e+02\n4 261     -1.961500e+02 -3.845300e+02\n5 261     5.698300e+02 -5.475200e+02\n6 261     -1.392700e+02 1.227900e+02\n7 261     -1.429200e+02 2.145000e+02\n8 261     6.975000e+01 3.873999e+01\n10 261     -1.416700e+02 2.682200e+02\n12 261     -1.098500e+02 1.775400e+02\n13 261     3.180900e+02 -1.330000e+02\n15 261     -9.063000e+01 2.848200e+02\n0 262     3.697998e+01 1.866998e+01\n1 262     2.013199e+02 3.651001e+01\n2 262     1.805900e+02 5.353003e+01\n4 262     -2.642100e+02 -4.423800e+02\n6 262     2.010010e+00 5.165997e+01\n8 262     1.788700e+02 -3.549988e+00\n9 262     4.069000e+01 1.363100e+02\n12 262     1.703998e+01 1.058900e+02\n15 262     1.258002e+01 1.677300e+02\n0 263     2.417700e+02 5.731200e+02\n1 263     6.576500e+02 5.253700e+02\n2 263     -8.410999e+01 3.405500e+02\n4 263     4.381000e+01 -5.205200e+02\n5 263     6.425500e+02 -6.783002e+01\n6 263     -2.303500e+02 6.612000e+02\n8 263     1.091998e+01 2.655800e+02\n9 263     -2.257300e+02 3.674500e+02\n11 263     3.586300e+02 -1.913600e+02\n13 263     3.783000e+02 2.455500e+02\n14 263     5.433101e+02 -1.514300e+02\n0 264     2.159200e+02 5.201800e+02\n1 264     6.140900e+02 4.760000e+02\n3 264     -2.387400e+02 -4.929999e+01\n5 264     6.181500e+02 -1.240200e+02\n6 264     -2.494600e+02 5.982200e+02\n12 264     -8.278003e+01 5.678800e+02\n13 264     3.593700e+02 2.047700e+02\n14 264     5.210699e+02 -1.998400e+02\n0 265     1.049200e+02 4.273600e+02\n1 265     4.689000e+02 4.081600e+02\n2 265     -1.879400e+02 1.775400e+02\n7 265     -1.161300e+02 5.045300e+02\n8 265     -7.477002e+01 1.347000e+02\n9 265     -3.069500e+02 2.217800e+02\n13 265     2.741400e+02 1.135900e+02\n14 265     4.169301e+02 -3.086100e+02\n0 266     1.478199e+02 1.870300e+02\n1 266     3.776500e+02 1.678400e+02\n2 266     1.700700e+02 1.783900e+02\n8 266     1.827000e+02 1.084700e+02\n12 266     5.959003e+01 2.941700e+02\n13 266     4.501700e+02 -5.923999e+01\n14 266     6.443700e+02 -5.396899e+02\n15 266     1.460300e+02 4.141100e+02\n0 267     3.547998e+01 9.151999e+01\n1 267     2.247300e+02 1.076900e+02\n2 267     1.402700e+02 1.138600e+02\n4 267     -2.152400e+02 -4.391600e+02\n5 267     6.645000e+02 -5.671801e+02\n6 267     -3.645001e+01 1.286100e+02\n12 267     -1.356000e+01 1.829200e+02\n13 267     3.883900e+02 -1.414000e+02\n15 267     1.489990e+00 2.666000e+02\n0 268     1.698700e+02 4.897998e+01\n1 268     3.410400e+02 2.734003e+01\n3 268     1.984500e+02 -2.020800e+02\n4 268     -2.604800e+02 -5.484399e+02\n10 268     9.859998e+01 2.152800e+02\n15 268     1.894200e+02 2.274700e+02\n0 269     9.884003e+01 4.014001e+01\n1 269     2.674700e+02 3.944000e+01\n2 269     2.368800e+02 9.103003e+01\n3 269     1.411100e+02 -2.206300e+02\n4 269     -2.567100e+02 -4.916000e+02\n6 269     6.285999e+01 9.647998e+01\n7 269     8.090027e+00 1.704100e+02\n8 269     2.263600e+02 2.757999e+01\n10 269     1.671002e+01 1.976200e+02\n12 269     8.206000e+01 1.489000e+02\n13 269     4.565699e+02 -1.785800e+02\n15 269     9.353003e+01 2.053200e+02\n0 270     2.178000e+02 3.002930e-02\n1 270     3.743900e+02 -3.578998e+01\n2 270     3.622200e+02 7.148999e+01\n3 270     2.566200e+02 -2.365500e+02\n7 270     1.304400e+02 1.494900e+02\n8 270     3.309800e+02 1.116000e+01\n13 270     5.624100e+02 -2.036400e+02\n15 270     2.616801e+02 1.669200e+02\n0 271     7.344000e+01 2.595001e+01\n1 271     2.380200e+02 3.341998e+01\n4 271     -2.635600e+02 -4.718700e+02\n6 271     4.216998e+01 7.284003e+01\n8 271     2.104100e+02 1.148001e+01\n9 271     7.151001e+01 1.526300e+02\n10 271     -1.078998e+01 1.788900e+02\n13 271     4.370200e+02 -1.925100e+02\n15 271     6.092999e+01 1.828000e+02\n0 272     1.977002e+01 3.601001e+01\n1 272     1.909800e+02 5.821002e+01\n2 272     1.526200e+02 6.283002e+01\n4 272     -2.499200e+02 -4.284300e+02\n6 272     -2.714001e+01 6.441998e+01\n7 272     -7.188000e+01 1.520100e+02\n8 272     1.559900e+02 5.190002e+00\n9 272     1.645001e+01 1.431400e+02\n10 272     -7.431000e+01 1.847500e+02\n12 272     -1.059998e+01 1.190800e+02\n13 272     3.855300e+02 -1.895900e+02\n15 272     -1.287000e+01 1.888000e+02\n0 273     8.783002e+01 -8.509003e+01\n1 273     2.186300e+02 -7.996002e+01\n2 273     2.744500e+02 -3.715997e+01\n3 273     1.827400e+02 -3.424300e+02\n6 273     9.676001e+01 -4.582001e+01\n7 273     1.858002e+01 4.434998e+01\n8 273     2.527600e+02 -7.989001e+01\n9 273     1.221600e+02 6.509998e+01\n10 273     1.728003e+01 5.195001e+01\n13 273     4.625300e+02 -2.878400e+02\n15 273     9.527002e+01 3.387000e+01\n0 274     2.523600e+02 -1.251300e+02\n1 274     3.721400e+02 -1.718300e+02\n2 274     4.340000e+02 -5.158002e+01\n7 274     1.834200e+02 3.128998e+01\n9 274     2.523300e+02 5.822998e+01\n10 274     2.116801e+02 2.263000e+01\n15 274     3.262200e+02 9.500122e-01\n0 275     1.094000e+01 5.096800e+02\n1 275     3.913800e+02 5.166400e+02\n2 275     -2.821000e+02 2.717900e+02\n4 275     1.990997e+01 -3.671000e+02\n5 275     4.155000e+02 -1.389000e+02\n6 275     -4.689600e+02 5.365100e+02\n7 275     -2.175700e+02 5.793900e+02\n8 275     -1.527700e+02 2.075800e+02\n9 275     -3.920800e+02 3.007100e+02\n11 275     1.562200e+02 -2.550500e+02\n12 275     -2.945100e+02 5.220100e+02\n13 275     1.985200e+02 1.789700e+02\n14 275     3.239301e+02 -2.251200e+02\n0 276     5.522998e+01 4.937000e+02\n1 276     4.327600e+02 4.892400e+02\n2 276     -2.402700e+02 2.532400e+02\n3 276     -3.730500e+02 -7.915997e+01\n4 276     7.510010e+00 -3.930800e+02\n5 276     4.587000e+02 -1.556200e+02\n6 276     -4.165700e+02 5.245600e+02\n7 276     -1.725900e+02 5.671500e+02\n9 276     -3.550000e+02 2.860800e+02\n11 276     1.969100e+02 -2.672200e+02\n13 276     2.334600e+02 1.673100e+02\n14 276     3.669800e+02 -2.407100e+02\n0 277     -8.366998e+01 4.922300e+02\n1 277     2.885400e+02 5.224900e+02\n2 277     -3.693400e+02 2.516100e+02\n4 277     1.614001e+01 -3.096400e+02\n5 277     3.222200e+02 -1.585800e+02\n6 277     -5.727500e+02 4.949800e+02\n7 277     -3.080700e+02 5.516300e+02\n11 277     7.290997e+01 -2.723600e+02\n12 277     -3.941700e+02 4.883300e+02\n0 278     4.882000e+02 3.473600e+02\n1 278     8.363101e+02 2.270600e+02\n3 278     1.401100e+02 -9.559998e+01\n6 278     1.843000e+02 4.725500e+02\n7 278     2.817500e+02 4.880200e+02\n9 278     9.551001e+01 2.841400e+02\n11 278     6.044700e+02 -3.812000e+02\n12 278     2.944399e+02 4.649700e+02\n0 279     1.010800e+02 4.426600e+02\n1 279     4.688700e+02 4.248400e+02\n2 279     -1.934100e+02 1.951800e+02\n4 279     -2.631000e+01 -4.179900e+02\n5 279     5.033400e+02 -2.090000e+02\n6 279     -3.563900e+02 4.680400e+02\n7 279     -1.218900e+02 5.196600e+02\n8 279     -7.995001e+01 1.484400e+02\n12 279     -1.863600e+02 4.554300e+02\n13 279     2.706700e+02 1.265800e+02\n14 279     4.125300e+02 -2.923500e+02\n0 280     1.388700e+02 1.857700e+02\n1 280     3.689399e+02 1.690900e+02\n2 280     1.615100e+02 1.759800e+02\n3 280     5.517999e+01 -1.439200e+02\n7 280     8.820007e+00 3.100300e+02\n10 280     4.894000e+01 3.727000e+02\n13 280     4.410500e+02 -6.133002e+01\n14 280     6.328600e+02 -5.415000e+02\n15 280     1.333400e+02 4.109200e+02\n0 281     2.129399e+02 7.051001e+01\n1 281     3.936801e+02 3.546997e+01\n4 281     -2.513700e+02 -5.813000e+02\n6 281     1.644100e+02 1.581000e+02\n7 281     1.119200e+02 2.164900e+02\n10 281     1.460600e+02 2.450600e+02\n12 281     1.959500e+02 2.051900e+02\n13 281     5.449600e+02 -1.453300e+02\n15 281     2.463400e+02 2.631500e+02\n0 282     1.543800e+02 6.976001e+01\n1 282     3.325400e+02 5.253003e+01\n2 282     2.762900e+02 1.254100e+02\n3 282     1.739500e+02 -1.879000e+02\n5 282     8.142100e+02 -5.884100e+02\n6 282     1.088300e+02 1.434900e+02\n7 282     5.652002e+01 2.078000e+02\n8 282     2.613400e+02 5.648999e+01\n9 282     1.151000e+02 1.995500e+02\n10 282     7.823999e+01 2.381000e+02\n12 282     1.342400e+02 1.940700e+02\n13 282     4.983400e+02 -1.499700e+02\n0 283     -1.489700e+02 3.671800e+02\n1 283     1.916801e+02 4.137300e+02\n2 283     -4.242700e+02 9.923999e+01\n5 283     2.512200e+02 -2.933200e+02\n7 283     -3.549500e+02 4.145700e+02\n8 283     -2.677800e+02 6.939001e+01\n12 283     -4.420000e+02 3.280000e+02\n14 283     1.655601e+02 -3.810300e+02\n0 284     5.694700e+02 1.164700e+02\n1 284     8.336300e+02 -3.773999e+01\n2 284     4.747700e+02 7.984998e+01\n3 284     3.398400e+02 -2.328900e+02\n6 284     3.858500e+02 2.531600e+02\n7 284     4.050601e+02 2.859700e+02\n8 284     4.485000e+02 3.847000e+01\n9 284     2.686700e+02 1.650500e+02\n10 284     5.578600e+02 3.372300e+02\n12 284     4.722800e+02 2.626500e+02\n13 284     7.764000e+02 -9.970001e+01\n15 284     7.506200e+02 3.766000e+02\n0 285     -1.594300e+02 3.412100e+02\n1 285     1.742700e+02 3.907900e+02\n2 285     -4.335600e+02 6.600000e+01\n7 285     -3.631500e+02 3.857500e+02\n8 285     -2.760600e+02 4.295999e+01\n11 285     6.789978e+00 -4.074700e+02\n14 285     1.540800e+02 -4.097700e+02\n0 286     2.194399e+02 9.820007e+00\n1 286     3.796899e+02 -2.660999e+01\n2 286     3.582300e+02 8.053003e+01\n6 286     1.971600e+02 9.734998e+01\n7 286     1.299400e+02 1.588800e+02\n8 286     3.282000e+02 1.884000e+01\n13 286     5.613700e+02 -1.954300e+02\n0 287     2.269800e+02 3.979980e+00\n1 287     3.857500e+02 -3.477002e+01\n6 287     2.054000e+02 9.071997e+01\n7 287     1.383800e+02 1.543500e+02\n8 287     3.361800e+02 1.398999e+01\n12 287     2.339100e+02 1.369100e+02\n13 287     5.687100e+02 -2.002100e+02\n15 287     2.740900e+02 1.736700e+02\n0 288     2.409900e+02 -8.280029e+00\n1 288     3.966801e+02 -5.191998e+01\n2 288     3.834700e+02 6.285999e+01\n3 288     2.768800e+02 -2.444300e+02\n0 289     6.166998e+01 -1.004999e+01\n1 289     2.156700e+02 1.520020e+00\n2 289     2.210900e+02 3.401001e+01\n3 289     1.288900e+02 -2.751700e+02\n4 289     -2.874300e+02 -4.625500e+02\n6 289     4.314001e+01 2.897998e+01\n7 289     -1.996997e+01 1.147100e+02\n8 289     2.108900e+02 -2.035001e+01\n9 289     7.501001e+01 1.219900e+02\n10 289     -2.063000e+01 1.356200e+02\n12 289     5.637000e+01 8.215002e+01\n13 289     4.314800e+02 -2.244700e+02\n15 289     4.971002e+01 1.319600e+02\n0 290     7.127002e+01 -1.402002e+01\n1 290     2.236100e+02 -5.210022e+00\n2 290     2.328400e+02 3.358002e+01\n3 290     1.399900e+02 -2.769900e+02\n4 290     -2.920100e+02 -4.698400e+02\n9 290     8.484003e+01 1.217000e+02\n10 290     -9.299988e+00 1.327400e+02\n12 290     6.991998e+01 7.984003e+01\n13 290     4.403101e+02 -2.263500e+02\n15 290     6.306000e+01 1.285500e+02\n0 291     -1.437400e+02 9.188000e+01\n1 291     7.484003e+01 1.535500e+02\n2 291     -1.464800e+02 -1.478998e+01\n3 291     -2.391600e+02 -3.346200e+02\n4 291     -2.016400e+02 -2.890400e+02\n5 291     3.971100e+02 -5.811801e+02\n6 291     -3.277600e+02 3.748999e+01\n7 291     -2.677700e+02 1.657300e+02\n8 291     -7.640002e+01 -4.542001e+01\n10 291     -2.707300e+02 2.337000e+02\n12 291     -2.726200e+02 9.240002e+01\n13 291     1.897100e+02 -1.671500e+02\n15 291     -2.356300e+02 2.417000e+02\n0 292     3.199200e+02 5.215000e+02\n1 292     7.310200e+02 4.511900e+02\n3 292     -1.520900e+02 -4.469000e+01\n4 292     7.820007e+00 -5.671300e+02\n5 292     7.235300e+02 -1.176700e+02\n6 292     -1.375000e+02 6.152400e+02\n8 292     7.225000e+01 2.266600e+02\n12 292     2.546002e+01 5.790700e+02\n0 293     4.845000e+02 4.017500e+02\n1 293     8.500900e+02 2.865200e+02\n2 293     2.626300e+02 2.817200e+02\n3 293     1.219700e+02 -4.635999e+01\n6 293     1.654900e+02 5.334900e+02\n7 293     2.706200e+02 5.401300e+02\n8 293     2.833500e+02 2.106700e+02\n9 293     7.891998e+01 3.283200e+02\n0 294     1.423101e+02 5.101900e+02\n1 294     5.290400e+02 4.844900e+02\n2 294     -1.552800e+02 2.800200e+02\n3 294     -2.905900e+02 -5.292999e+01\n4 294     1.253003e+01 -4.519200e+02\n5 294     5.502200e+02 -1.352800e+02\n6 294     -3.161700e+02 5.657500e+02\n8 294     -4.903998e+01 2.158100e+02\n9 294     -2.829500e+02 3.122700e+02\n11 294     2.736200e+02 -2.494700e+02\n12 294     -1.508800e+02 5.440500e+02\n13 294     3.055601e+02 1.875200e+02\n14 294     4.550800e+02 -2.190800e+02\n0 295     2.506000e+01 5.105900e+02\n1 295     4.049100e+02 5.139700e+02\n2 295     -2.681600e+02 2.742000e+02\n3 295     -4.005900e+02 -5.906000e+01\n5 295     4.302500e+02 -1.367300e+02\n6 295     -4.524500e+02 5.427700e+02\n9 295     -3.802300e+02 3.037600e+02\n13 295     2.100200e+02 1.809200e+02\n14 295     3.378101e+02 -2.232600e+02\n0 296     8.390015e+00 5.011000e+02\n1 296     3.861899e+02 5.078600e+02\n4 296     1.452002e+01 -3.644300e+02\n6 296     -4.700600e+02 5.236000e+02\n7 296     -2.187500e+02 5.691900e+02\n8 296     -1.539000e+02 1.986000e+02\n9 296     -3.927700e+02 2.914000e+02\n11 296     1.544800e+02 -2.629900e+02\n12 296     -2.957300e+02 5.101100e+02\n0 297     2.356000e+01 4.950200e+02\n1 297     3.998700e+02 4.982400e+02\n2 297     -2.687000e+02 2.545300e+02\n3 297     -4.007800e+02 -7.721997e+01\n4 297     1.042999e+01 -3.739000e+02\n5 297     4.279301e+02 -1.543800e+02\n6 297     -4.513600e+02 5.199000e+02\n7 297     -2.034800e+02 5.651600e+02\n8 297     -1.416700e+02 1.942000e+02\n9 297     -3.795500e+02 2.865400e+02\n11 297     1.679200e+02 -2.674600e+02\n12 297     -2.778500e+02 5.057800e+02\n13 297     2.085900e+02 1.669700e+02\n14 297     3.361899e+02 -2.401300e+02\n0 298     2.341998e+01 4.865600e+02\n1 298     3.975500e+02 4.892700e+02\n2 298     -2.681200e+02 2.447300e+02\n6 298     -4.502100e+02 5.109200e+02\n7 298     -2.024500e+02 5.566500e+02\n8 298     -1.409900e+02 1.874700e+02\n9 298     -3.786500e+02 2.772400e+02\n11 298     1.685300e+02 -2.744900e+02\n14 298     3.359700e+02 -2.492300e+02\n0 299     -6.975000e+01 4.854000e+02\n1 299     3.008300e+02 5.118700e+02\n2 299     -3.557200e+02 2.423900e+02\n3 299     -4.850600e+02 -8.821997e+01\n4 299     1.121997e+01 -3.171000e+02\n5 299     3.354200e+02 -1.661000e+02\n6 299     -5.555600e+02 4.877400e+02\n7 299     -2.935600e+02 5.455100e+02\n8 299     -2.128600e+02 1.832300e+02\n11 299     8.512000e+01 -2.782100e+02\n12 299     -3.778000e+02 4.813500e+02\n13 299     1.352900e+02 1.537600e+02\n14 299     2.462300e+02 -2.530600e+02\n0 300     1.065000e+02 4.371900e+02\n1 300     4.730200e+02 4.177200e+02\n4 300     -3.032001e+01 -4.202400e+02\n6 300     -3.506500e+02 4.612100e+02\n7 300     -1.164000e+02 5.145300e+02\n8 300     -7.710999e+01 1.427600e+02\n13 300     2.755200e+02 1.224000e+02\n14 300     4.178700e+02 -2.980200e+02\n0 301     2.162000e+01 4.144300e+02\n1 301     3.780300e+02 4.168300e+02\n2 301     -2.639400e+02 1.605400e+02\n3 301     -3.982600e+02 -1.709800e+02\n5 301     4.230300e+02 -2.410300e+02\n6 301     -4.390500e+02 4.140200e+02\n7 301     -1.950600e+02 4.821900e+02\n8 301     -1.374900e+02 1.200700e+02\n12 301     -2.661200e+02 4.101700e+02\n13 301     2.078101e+02 9.763000e+01\n14 301     3.346300e+02 -3.253200e+02\n0 302     -1.309600e+02 3.790300e+02\n1 302     2.125500e+02 4.208000e+02\n2 302     -4.080000e+02 1.134700e+02\n5 302     2.691000e+02 -2.807800e+02\n7 302     -3.397500e+02 4.282400e+02\n8 302     -2.547200e+02 8.107999e+01\n13 302     8.701001e+01 5.920001e+01\n14 302     1.842400e+02 -3.675600e+02\n0 303     2.030029e+00 1.172500e+02\n1 303     2.040800e+02 1.421500e+02\n2 303     8.332001e+01 1.169800e+02\n3 303     -9.609985e+00 -2.001500e+02\n5 303     6.126500e+02 -5.407600e+02\n6 303     -9.573001e+01 1.411700e+02\n7 303     -1.082900e+02 2.265700e+02\n8 303     1.036900e+02 5.282999e+01\n12 303     -6.789001e+01 1.963800e+02\n15 303     -4.638000e+01 2.978800e+02\n0 304     2.316801e+02 -1.130005e+00\n1 304     3.891000e+02 -4.150000e+01\n2 304     3.716700e+02 7.027002e+01\n6 304     2.108000e+02 8.727002e+01\n7 304     1.433600e+02 1.500600e+02\n8 304     3.398200e+02 1.025000e+01\n10 304     1.749200e+02 1.635000e+02\n12 304     2.400699e+02 1.331500e+02\n0 305     6.727002e+01 1.339001e+01\n1 305     2.283600e+02 2.283002e+01\n2 305     2.173101e+02 5.772998e+01\n3 305     1.236500e+02 -2.523300e+02\n4 305     -2.706000e+02 -4.672100e+02\n6 305     4.026001e+01 5.959998e+01\n7 305     -1.877002e+01 1.385300e+02\n8 305     2.084500e+02 1.529999e+00\n9 305     7.071002e+01 1.413000e+02\n12 305     5.597998e+01 1.125400e+02\n15 305     5.417999e+01 1.648400e+02\n0 306     8.600000e+01 -6.080017e+00\n1 306     2.400300e+02 -1.890015e+00\n2 306     2.451600e+02 4.481000e+01\n3 306     1.505200e+02 -2.643400e+02\n4 306     -2.878800e+02 -4.817200e+02\n6 306     6.908002e+01 4.160999e+01\n7 306     3.419983e+00 1.227800e+02\n8 306     2.309400e+02 -1.166000e+01\n9 306     9.463000e+01 1.314000e+02\n10 306     6.469971e+00 1.424300e+02\n12 306     8.413000e+01 9.344000e+01\n13 306     4.521801e+02 -2.190300e+02\n15 306     8.175000e+01 1.406100e+02\n0 307     -1.712600e+02 4.999800e+02\n1 307     2.007500e+02 5.515500e+02\n2 307     -4.544100e+02 2.605100e+02\n3 307     -5.819300e+02 -7.006000e+01\n4 307     2.695001e+01 -2.603000e+02\n5 307     2.374500e+02 -1.502700e+02\n7 307     -3.964700e+02 5.506300e+02\n8 307     -2.938200e+02 1.956600e+02\n11 307     -5.159973e+00 -2.670400e+02\n12 307     -4.928500e+02 4.863000e+02\n13 307     5.535999e+01 1.612800e+02\n14 307     1.491500e+02 -2.400200e+02\n0 308     5.422200e+02 1.617100e+02\n1 308     8.197300e+02 1.792999e+01\n2 308     4.319200e+02 1.125400e+02\n6 308     3.398200e+02 2.938100e+02\n7 308     3.717200e+02 3.247200e+02\n8 308     4.138400e+02 6.657001e+01\n10 308     5.219800e+02 3.876400e+02\n12 308     4.296200e+02 3.017200e+02\n13 308     7.435300e+02 -6.346002e+01\n15 308     7.074800e+02 4.358400e+02\n0 309     -1.910999e+01 7.478003e+01\n1 309     1.695699e+02 1.060600e+02\n2 309     7.981000e+01 7.821997e+01\n5 309     5.992600e+02 -5.874100e+02\n6 309     -1.001200e+02 9.050000e+01\n7 309     -1.207300e+02 1.817300e+02\n8 309     9.840002e+01 1.998999e+01\n10 309     -1.235800e+02 2.262200e+02\n12 309     -7.746997e+01 1.459900e+02\n13 309     3.398900e+02 -1.614900e+02\n15 309     -6.973999e+01 2.363900e+02\n0 310     1.679200e+02 -1.114001e+01\n1 310     3.194399e+02 -3.152002e+01\n2 310     3.261700e+02 5.690997e+01\n3 310     2.247600e+02 -2.515500e+02\n7 310     8.563000e+01 1.313600e+02\n13 310     5.248700e+02 -2.161200e+02\n15 310     1.952100e+02 1.454200e+02\n0 311     1.453003e+01 -2.770001e+01\n1 311     1.666200e+02 -2.780029e+00\n2 311     1.730700e+02 -1.469971e+00\n3 311     8.445001e+01 -3.106100e+02\n4 311     -2.938700e+02 -4.236200e+02\n7 311     -6.537000e+01 8.806000e+01\n9 311     3.765997e+01 9.029999e+01\n10 311     -7.337000e+01 1.102500e+02\n12 311     3.109985e+00 4.485999e+01\n13 311     3.897600e+02 -2.445600e+02\n15 311     -1.107001e+01 1.009400e+02\n0 312     -5.080017e+00 -3.039001e+01\n1 312     1.482800e+02 -2.100220e-01\n2 312     1.488900e+02 -1.322998e+01\n3 312     5.948999e+01 -3.225700e+02\n6 312     -3.419000e+01 -2.021002e+01\n7 312     -8.590002e+01 8.148001e+01\n8 312     1.494900e+02 -5.820999e+01\n10 312     -9.666998e+01 1.055200e+02\n12 312     -2.270001e+01 3.397998e+01\n13 312     3.705601e+02 -2.489400e+02\n15 312     -3.771997e+01 9.537000e+01\n0 313     -1.665000e+02 4.893000e+02\n1 313     2.030900e+02 5.398800e+02\n2 313     -4.491800e+02 2.483700e+02\n3 313     -5.758700e+02 -8.247998e+01\n4 313     2.106000e+01 -2.618500e+02\n5 313     2.414200e+02 -1.608000e+02\n7 313     -3.903600e+02 5.403000e+02\n11 313     -6.699829e-01 -2.755900e+02\n13 313     5.945001e+01 1.526800e+02\n14 313     1.535699e+02 -2.506200e+02\n0 314     1.658600e+02 7.525000e+01\n1 314     3.462600e+02 5.467999e+01\n2 314     2.828500e+02 1.310400e+02\n3 314     1.800300e+02 -1.820800e+02\n6 314     1.164900e+02 1.532900e+02\n7 314     6.646997e+01 2.142700e+02\n10 314     9.146002e+01 2.457000e+02\n12 314     1.440100e+02 2.021300e+02\n13 314     5.061100e+02 -1.444300e+02\n15 314     1.808900e+02 2.629800e+02\n0 315     1.631000e+01 1.320001e+01\n1 315     1.814500e+02 3.546002e+01\n2 315     1.587600e+02 4.090997e+01\n4 315     -2.653400e+02 -4.263400e+02\n6 315     -2.196002e+01 3.845001e+01\n7 315     -6.892999e+01 1.283600e+02\n8 315     1.611800e+02 -1.335999e+01\n9 315     2.973999e+01 1.237800e+02\n10 315     -7.073999e+01 1.550200e+02\n12 315     -6.710022e+00 9.266998e+01\n13 315     3.862200e+02 -2.089500e+02\n0 316     5.439001e+01 -8.372998e+01\n1 316     1.880200e+02 -6.960999e+01\n2 316     2.385699e+02 -4.765002e+01\n4 316     -3.401300e+02 -4.546200e+02\n6 316     5.867999e+01 -5.760999e+01\n7 316     -1.469000e+01 3.934003e+01\n8 316     2.226400e+02 -8.789001e+01\n10 316     -2.065997e+01 4.898999e+01\n12 316     6.879999e+01 -6.710022e+00\n13 316     4.314900e+02 -2.895500e+02\n15 316     4.995001e+01 3.070001e+01\n0 317     1.692100e+02 2.459003e+01\n1 317     3.328900e+02 3.210022e+00\n3 317     2.082000e+02 -2.202100e+02\n4 317     -2.779500e+02 -5.489700e+02\n6 317     1.428800e+02 1.001000e+02\n7 317     8.046997e+01 1.660600e+02\n8 317     2.880800e+02 2.601999e+01\n10 317     1.003300e+02 1.864000e+02\n12 317     1.665900e+02 1.495500e+02\n13 317     5.195601e+02 -1.863900e+02\n15 317     1.916100e+02 1.939400e+02\n0 318     1.562700e+02 -2.485999e+01\n1 318     3.029600e+02 -4.112000e+01\n2 318     3.209200e+02 4.177002e+01\n3 318     2.210400e+02 -2.653500e+02\n4 318     -3.120800e+02 -5.394600e+02\n6 318     1.528000e+02 4.202002e+01\n7 318     7.615997e+01 1.161700e+02\n8 318     2.947000e+02 -1.535001e+01\n10 318     9.048999e+01 1.285700e+02\n12 318     1.713100e+02 9.083002e+01\n13 318     5.161100e+02 -2.292800e+02\n15 318     1.802700e+02 1.245000e+02\n0 319     1.997700e+02 2.460022e+00\n1 319     3.587000e+02 -2.772998e+01\n3 319     2.404800e+02 -2.373300e+02\n7 319     1.139700e+02 1.497000e+02\n8 319     3.175200e+02 1.129999e+01\n10 319     1.373000e+02 1.639400e+02\n13 319     5.487600e+02 -2.028500e+02\n15 319     2.378101e+02 1.680300e+02\n0 320     3.064800e+02 5.669800e+02\n1 320     7.299000e+02 5.033000e+02\n2 320     -2.882001e+01 3.351900e+02\n3 320     -1.717700e+02 3.599854e-01\n4 320     3.667999e+01 -5.645000e+02\n6 320     -1.618300e+02 6.670000e+02\n8 320     5.681000e+01 2.622200e+02\n9 320     -1.789200e+02 3.644500e+02\n11 320     4.176300e+02 -1.921100e+02\n13 320     4.294200e+02 2.453000e+02\n14 320     6.063199e+02 -1.532700e+02\n0 321     3.089900e+02 5.627800e+02\n1 321     7.313700e+02 4.981800e+02\n2 321     -2.604999e+01 3.311600e+02\n3 321     -1.692200e+02 -3.700012e+00\n4 321     3.390997e+01 -5.662100e+02\n6 321     -1.581600e+02 6.624500e+02\n9 321     -1.762900e+02 3.607700e+02\n11 321     4.197100e+02 -1.957200e+02\n13 321     4.314800e+02 2.421500e+02\n14 321     6.089700e+02 -1.570600e+02\n0 322     2.194100e+02 5.528200e+02\n1 322     6.260000e+02 5.093400e+02\n4 322     3.283002e+01 -5.037700e+02\n5 322     6.208199e+02 -8.903003e+01\n6 322     -2.506700e+02 6.321200e+02\n9 322     -2.393900e+02 3.483700e+02\n11 322     3.400000e+02 -2.090800e+02\n12 322     -8.363000e+01 5.990000e+02\n13 322     3.611200e+02 2.273000e+02\n14 322     5.229700e+02 -1.725100e+02\n0 323     2.053300e+02 5.657200e+02\n1 323     6.147700e+02 5.261700e+02\n2 323     -1.142300e+02 3.347100e+02\n4 323     4.170001e+01 -4.954100e+02\n5 323     6.067600e+02 -7.585999e+01\n6 323     -2.676400e+02 6.466200e+02\n8 323     -1.427002e+01 2.606100e+02\n9 323     -2.513500e+02 3.609000e+02\n11 323     3.268700e+02 -1.984600e+02\n12 323     -1.000000e+02 6.125300e+02\n13 323     3.500601e+02 2.378800e+02\n14 323     5.087800e+02 -1.597800e+02\n0 324     2.341400e+02 5.536200e+02\n1 324     6.425300e+02 5.067700e+02\n2 324     -8.877002e+01 3.205000e+02\n5 324     6.354399e+02 -8.708002e+01\n6 324     -2.352000e+02 6.368400e+02\n8 324     7.349976e+00 2.505200e+02\n11 324     3.530699e+02 -2.076500e+02\n12 324     -6.846997e+01 6.022400e+02\n0 325     6.463000e+01 5.706700e+02\n1 325     4.636300e+02 5.661600e+02\n2 325     -2.379100e+02 3.391100e+02\n4 325     5.207001e+01 -4.052100e+02\n5 325     4.694301e+02 -7.458002e+01\n6 325     -4.203500e+02 6.257400e+02\n8 325     -1.164400e+02 2.622000e+02\n9 325     -3.572000e+02 3.617200e+02\n11 325     2.014600e+02 -2.012000e+02\n12 325     -2.476400e+02 6.000400e+02\n14 325     3.746500e+02 -1.615100e+02\n0 326     8.132001e+01 5.738300e+02\n1 326     4.825900e+02 5.654000e+02\n2 326     -2.237000e+02 3.424300e+02\n3 326     -3.556800e+02 9.080017e+00\n4 326     5.288000e+01 -4.157300e+02\n5 326     4.855100e+02 -7.120001e+01\n6 326     -4.027400e+02 6.327200e+02\n8 326     -1.047400e+02 2.648700e+02\n9 326     -3.450200e+02 3.650500e+02\n11 326     2.157800e+02 -1.980500e+02\n12 326     -2.305400e+02 6.056300e+02\n13 326     2.530000e+02 2.365000e+02\n14 326     3.904000e+02 -1.576800e+02\n0 327     -1.433300e+02 5.387300e+02\n1 327     2.385400e+02 5.834100e+02\n2 327     -4.293700e+02 3.046900e+02\n3 327     -5.547100e+02 -2.510999e+01\n4 327     4.623999e+01 -2.794300e+02\n5 327     2.671200e+02 -1.104000e+02\n8 327     -2.733400e+02 2.312400e+02\n11 327     1.963000e+01 -2.341300e+02\n12 327     -4.682900e+02 5.355800e+02\n14 327     1.774301e+02 -2.000600e+02\n0 328     2.341400e+02 5.536200e+02\n1 328     6.425300e+02 5.067700e+02\n2 328     -8.877002e+01 3.205000e+02\n3 328     -2.281400e+02 -1.382001e+01\n4 328     3.290997e+01 -5.138600e+02\n5 328     6.354399e+02 -8.708002e+01\n6 328     -2.352000e+02 6.368400e+02\n8 328     7.349976e+00 2.505200e+02\n9 328     -2.288200e+02 3.498300e+02\n11 328     3.530699e+02 -2.076500e+02\n12 328     -6.846997e+01 6.022400e+02\n14 328     5.370000e+02 -1.707700e+02\n0 329     5.442500e+02 2.191100e+02\n1 329     8.395800e+02 7.838000e+01\n2 329     4.213101e+02 1.741100e+02\n3 329     2.842500e+02 -1.441000e+02\n7 329     3.667200e+02 3.815200e+02\n8 329     4.059500e+02 1.175900e+02\n9 329     2.211100e+02 2.429600e+02\n10 329     5.200699e+02 4.553600e+02\n11 329     6.768000e+02 -5.052100e+02\n13 329     7.402500e+02 -1.283002e+01\n15 329     7.037800e+02 5.173700e+02\n0 330     -2.756200e+02 4.454600e+02\n1 330     8.366998e+01 5.225300e+02\n2 330     -5.568500e+02 1.944100e+02\n8 330     -3.772300e+02 1.414800e+02\n0 331     -3.790700e+02 3.525100e+02\n1 331     -3.926001e+01 4.571100e+02\n2 331     -6.636800e+02 7.556000e+01\n5 331     1.821002e+01 -3.061700e+02\n7 331     -5.878700e+02 3.714900e+02\n8 331     -4.632500e+02 4.650000e+01\n11 331     -1.913800e+02 -3.960300e+02\n12 331     -7.084300e+02 2.708200e+02\n13 331     -1.124300e+02 2.551001e+01\n14 331     -6.352002e+01 -3.985600e+02\n15 331     -5.904500e+02 5.702300e+02\n0 332     -3.092900e+02 3.920100e+02\n1 332     3.800000e+01 4.781300e+02\n2 332     -5.895700e+02 1.274100e+02\n4 332     -2.388000e+01 -1.737700e+02\n5 332     9.226001e+01 -2.647400e+02\n7 332     -5.204800e+02 4.210400e+02\n12 332     -6.316700e+02 3.316300e+02\n13 332     -5.397998e+01 6.201001e+01\n14 332     1.045001e+01 -3.562800e+02\n0 333     -5.341300e+02 3.304900e+02\n1 333     -1.913800e+02 4.729700e+02\n4 333     -3.803998e+01 -4.675000e+01\n5 333     -1.401800e+02 -3.261100e+02\n10 333     -7.756700e+02 4.853000e+02\n11 333     -3.292000e+02 -4.124800e+02\n13 333     -2.391300e+02 2.500000e-01\n14 333     -2.211500e+02 -4.223300e+02\n15 333     -8.053500e+02 5.193700e+02\n0 334     -2.931100e+02 3.838400e+02\n1 334     5.190997e+01 4.669100e+02\n2 334     -5.725800e+02 1.177500e+02\n4 334     -2.948999e+01 -1.809200e+02\n5 334     1.076100e+02 -2.738900e+02\n7 334     -5.041000e+02 4.148000e+02\n8 334     -3.897800e+02 8.057999e+01\n10 334     -4.848500e+02 5.701100e+02\n12 334     -6.122600e+02 3.245500e+02\n14 334     2.464001e+01 -3.637200e+02\n0 335     -3.465500e+02 3.961100e+02\n1 335     2.599976e+00 4.912700e+02\n2 335     -6.290400e+02 1.320600e+02\n4 335     -1.812000e+01 -1.532300e+02\n5 335     5.559003e+01 -2.596100e+02\n7 335     -5.604900e+02 4.214800e+02\n8 335     -4.354800e+02 9.188000e+01\n10 335     -5.514000e+02 5.814400e+02\n11 335     -1.607600e+02 -3.583400e+02\n12 335     -6.767400e+02 3.311900e+02\n13 335     -8.526001e+01 6.444000e+01\n14 335     -2.738000e+01 -3.514400e+02\n0 336     -5.365800e+02 4.463500e+02\n1 336     -1.676700e+02 5.833900e+02\n5 336     -1.239700e+02 -2.021500e+02\n7 336     -7.691900e+02 4.545100e+02\n11 336     -3.215200e+02 -3.122800e+02\n14 336     -2.066400e+02 -2.978700e+02\n0 337     -4.297100e+02 4.486500e+02\n1 337     -6.595001e+01 5.618800e+02\n2 337     -7.196100e+02 1.992500e+02\n5 337     -1.971002e+01 -2.018700e+02\n8 337     -5.094000e+02 1.421500e+02\n12 337     -7.860800e+02 3.850300e+02\n14 337     -1.031900e+02 -2.957700e+02\n0 338     -4.169300e+02 4.488500e+02\n1 338     -5.362000e+01 5.591600e+02\n2 338     -7.057700e+02 1.993400e+02\n5 338     -6.950012e+00 -2.013300e+02\n12 338     -7.706900e+02 3.871500e+02\n14 338     -9.071997e+01 -2.950100e+02\n0 339     -2.633400e+02 4.381700e+02\n1 339     9.389001e+01 5.122700e+02\n7 339     -4.810400e+02 4.756600e+02\n0 340     -5.653700e+02 3.420700e+02\n1 340     -2.181600e+02 4.915900e+02\n5 340     -1.695800e+02 -3.117500e+02\n7 340     -7.846400e+02 3.380800e+02\n10 340     -8.174900e+02 4.971000e+02\n13 340     -2.643100e+02 9.669983e+00\n14 340     -2.510800e+02 -4.088900e+02\n15 340     -8.514600e+02 5.314300e+02\n0 341     -5.227900e+02 2.891500e+02\n1 341     -1.903200e+02 4.318900e+02\n5 341     -1.354100e+02 -3.717000e+02\n7 341     -7.300600e+02 2.856600e+02\n8 341     -5.946300e+02 -2.401999e+01\n10 341     -7.539200e+02 4.344600e+02\n11 341     -3.232300e+02 -4.490200e+02\n14 341     -2.162900e+02 -4.685400e+02\n15 341     -7.805900e+02 4.620600e+02\n0 342     -2.669400e+02 4.232500e+02\n1 342     8.663000e+01 4.985100e+02\n2 342     -5.465500e+02 1.673700e+02\n5 342     1.376600e+02 -2.314300e+02\n7 342     -4.827600e+02 4.593800e+02\n8 342     -3.686100e+02 1.202700e+02\n11 342     -8.972998e+01 -3.344100e+02\n12 342     -5.884400e+02 3.776100e+02\n14 342     5.295001e+01 -3.215900e+02\n0 343     -2.886900e+02 4.420400e+02\n1 343     6.996997e+01 5.226300e+02\n2 343     -5.697800e+02 1.905900e+02\n5 343     1.177300e+02 -2.111500e+02\n7 343     -5.074000e+02 4.772100e+02\n8 343     -3.880400e+02 1.379300e+02\n11 343     -1.082200e+02 -3.178300e+02\n12 343     -6.170700e+02 3.972900e+02\n13 343     -3.785999e+01 1.069800e+02\n14 343     3.303998e+01 -3.018800e+02\n0 344     -4.695800e+02 3.515900e+02\n1 344     -1.266900e+02 4.773900e+02\n7 344     -6.817000e+02 3.596400e+02\n0 345     -4.340500e+02 3.965300e+02\n1 345     -8.194000e+01 5.126900e+02\n4 345     -1.046997e+01 -1.069000e+02\n5 345     -3.094000e+01 -2.570500e+02\n7 345     -6.518200e+02 4.121600e+02\n8 345     -5.129400e+02 8.956000e+01\n10 345     -6.601300e+02 5.747600e+02\n11 345     -2.373800e+02 -3.564000e+02\n12 345     -7.826100e+02 3.183900e+02\n13 345     -1.551900e+02 6.187000e+01\n14 345     -1.130700e+02 -3.505900e+02\n0 346     -5.578100e+02 3.826000e+02\n1 346     -2.013700e+02 5.276900e+02\n4 346     -8.469971e+00 -4.221997e+01\n5 346     -1.523300e+02 -2.693300e+02\n11 346     -3.439200e+02 -3.663800e+02\n13 346     -2.545500e+02 4.509998e+01\n0 347     -3.046500e+02 3.981000e+02\n1 347     4.395001e+01 4.834000e+02\n2 347     -5.849000e+02 1.346300e+02\n4 347     -2.071002e+01 -1.764100e+02\n5 347     9.758002e+01 -2.584100e+02\n7 347     -5.174300e+02 4.282000e+02\n8 347     -3.999900e+02 9.420999e+01\n10 347     -5.008800e+02 5.866100e+02\n11 347     -1.235300e+02 -3.566900e+02\n12 347     -6.282700e+02 3.397800e+02\n13 347     -5.140997e+01 6.796002e+01\n14 347     1.428003e+01 -3.491000e+02\n0 348     -3.837400e+02 3.828800e+02\n1 348     -3.776001e+01 4.876500e+02\n5 348     1.923999e+01 -2.726300e+02\n7 348     -5.967600e+02 4.037500e+02\n10 348     -5.957600e+02 5.618800e+02\n11 348     -1.945000e+02 -3.692400e+02\n14 348     -6.346002e+01 -3.652700e+02\n0 349     -3.095300e+02 3.594800e+02\n1 349     3.001001e+01 4.466300e+02\n2 349     -5.897300e+02 8.600000e+01\n4 349     -4.169000e+01 -1.689400e+02\n5 349     8.785999e+01 -3.003000e+02\n7 349     -5.173000e+02 3.871700e+02\n10 349     -5.016100e+02 5.393000e+02\n11 349     -1.293700e+02 -3.908200e+02\n12 349     -6.282600e+02 2.904400e+02\n13 349     -5.657001e+01 3.420001e+01\n0 350     -4.067900e+02 4.235300e+02\n1 350     -4.909998e+01 5.322000e+02\n2 350     -6.931800e+02 1.677500e+02\n5 350     -9.997559e-02 -2.290000e+02\n7 350     -6.265400e+02 4.443300e+02\n8 350     -4.880700e+02 1.177900e+02\n10 350     -6.301100e+02 6.106800e+02\n11 350     -2.120000e+02 -3.332000e+02\n12 350     -7.529800e+02 3.571200e+02\n14 350     -8.295001e+01 -3.216600e+02\n0 351     -3.573200e+02 4.336400e+02\n1 351     7.199707e-01 5.306700e+02\n2 351     -6.424500e+02 1.799200e+02\n4 351     3.799988e+00 -1.515600e+02\n5 351     4.957001e+01 -2.189600e+02\n7 351     -5.772400e+02 4.606100e+02\n8 351     -4.460000e+02 1.292900e+02\n11 351     -1.684300e+02 -3.250500e+02\n12 351     -6.968000e+02 3.773800e+02\n14 351     -3.450000e+01 -3.110700e+02\n0 352     4.651200e+02 3.125500e+02\n1 352     8.009301e+02 1.959600e+02\n6 352     1.626900e+02 4.250500e+02\n7 352     2.633000e+02 4.495900e+02\n10 352     4.200900e+02 5.590200e+02\n11 352     5.889100e+02 -4.151100e+02\n12 352     2.756801e+02 4.195600e+02\n13 352     6.289000e+02 5.178998e+01\n14 352     8.680900e+02 -4.013400e+02\n0 353     -2.005400e+02 3.809300e+02\n1 353     1.427800e+02 4.405800e+02\n7 353     -4.102800e+02 4.227100e+02\n14 353     1.148500e+02 -3.662800e+02\n0 354     -2.126300e+02 3.498200e+02\n1 354     1.233800e+02 4.129800e+02\n2 354     -4.879400e+02 7.590002e+01\n5 354     1.847700e+02 -3.120700e+02\n7 354     -4.175700e+02 3.885400e+02\n10 354     -3.827200e+02 5.359100e+02\n11 354     -4.203998e+01 -3.998700e+02\n12 354     -5.133200e+02 2.950000e+02\n14 354     1.017800e+02 -4.007800e+02\n15 354     -3.572500e+02 5.880500e+02\n0 355     -1.818100e+02 3.305100e+02\n1 355     1.496300e+02 3.858700e+02\n5 355     2.138300e+02 -3.338600e+02\n7 355     -3.842000e+02 3.717300e+02\n14 355     1.311900e+02 -4.221000e+02\n15 355     -3.114200e+02 5.648000e+02\n0 356     4.688300e+02 2.972100e+02\n1 356     8.000500e+02 1.788700e+02\n6 356     1.717100e+02 4.079800e+02\n7 356     2.691700e+02 4.353200e+02\n10 356     4.253900e+02 5.411600e+02\n11 356     5.955200e+02 -4.298500e+02\n12 356     2.837200e+02 4.043800e+02\n0 357     -1.163100e+02 1.610000e+02\n1 357     1.540699e+02 2.060400e+02\n0 358     5.646500e+02 1.573300e+02\n1 358     8.417500e+02 6.669983e+00\n2 358     4.588300e+02 1.198800e+02\n6 358     3.696000e+02 2.981100e+02\n7 358     3.948800e+02 3.248200e+02\n8 358     4.363700e+02 7.166000e+01\n9 358     2.541100e+02 1.979000e+02\n10 358     5.489600e+02 3.847600e+02\n12 358     4.567500e+02 3.073700e+02\n13 358     7.669000e+02 -6.402002e+01\n15 358     7.395300e+02 4.333400e+02\n0 359     -1.346000e+02 1.004300e+02\n1 359     8.706000e+01 1.587100e+02\n0 360     1.808400e+02 7.787000e+01\n1 360     3.629399e+02 5.260999e+01\n10 360     1.082500e+02 2.504700e+02\n0 361     2.118600e+02 2.583002e+01\n1 361     3.770000e+02 -8.460022e+00\n7 361     1.198100e+02 1.735000e+02\n0 362     2.324500e+02 1.895001e+01\n1 362     3.965000e+02 -2.171002e+01\n10 362     1.738600e+02 1.870000e+02\n15 362     2.798500e+02 1.950100e+02\n0 363     2.394000e+02 8.409973e+00\n1 363     4.006200e+02 -3.447998e+01\n2 363     3.739399e+02 7.865002e+01\n6 363     2.147500e+02 9.991998e+01\n7 363     1.489100e+02 1.602600e+02\n10 363     1.829700e+02 1.755500e+02\n12 363     2.450200e+02 1.450800e+02\n15 363     2.905400e+02 1.814200e+02\n0 364     2.379200e+02 4.460022e+00\n1 364     3.975200e+02 -3.803003e+01\n6 364     2.153100e+02 9.621997e+01\n7 364     1.478700e+02 1.562500e+02\n12 364     2.444200e+02 1.410100e+02\n13 364     5.770400e+02 -1.990200e+02\n15 364     2.883199e+02 1.758900e+02\n0 365     2.871200e+02 5.590027e+00\n1 365     4.516100e+02 -5.294000e+01\n10 365     2.383600e+02 1.773100e+02\n12 365     2.906500e+02 1.485500e+02\n15 365     3.578600e+02 1.842300e+02\n0 366     2.328300e+02 -5.090027e+00\n1 366     3.888500e+02 -4.570001e+01\n7 366     1.453500e+02 1.460000e+02\n0 367     5.679100e+02 -1.303998e+01\n1 367     7.919800e+02 -1.736700e+02\n6 367     4.186600e+02 1.057900e+02\n7 367     4.209100e+02 1.600100e+02\n10 367     5.666700e+02 1.860900e+02\n12 367     5.032100e+02 1.170900e+02\n13 367     7.896600e+02 -2.163800e+02\n15 367     7.639100e+02 1.960700e+02\n0 368     2.408300e+02 -1.958002e+01\n1 368     3.929500e+02 -6.283002e+01\n7 368     1.550800e+02 1.332100e+02\n10 368     1.865700e+02 1.430100e+02\n15 368     2.961600e+02 1.434900e+02\n0 369     1.419200e+02 -3.238000e+01\n1 369     2.867800e+02 -4.452002e+01\n2 369     3.105601e+02 3.192999e+01\n3 369     2.125699e+02 -2.750400e+02\n6 369     1.385200e+02 3.065997e+01\n7 369     6.354999e+01 1.063500e+02\n8 369     2.847300e+02 -2.284000e+01\n10 369     7.444000e+01 1.181700e+02\n12 369     1.566100e+02 7.954999e+01\n15 369     1.615300e+02 1.124900e+02\n0 370     2.244700e+02 -3.670001e+01\n1 370     3.701600e+02 -7.479999e+01\n6 370     2.184900e+02 4.852002e+01\n7 370     1.429200e+02 1.144600e+02\n10 370     1.700800e+02 1.222400e+02\n15 370     2.755300e+02 1.178900e+02\n0 371     6.062800e+02 -4.853998e+01\n1 371     8.206000e+02 -2.234000e+02\n8 371     5.187900e+02 -8.857001e+01\n10 371     6.143900e+02 1.489900e+02\n12 371     5.577300e+02 9.309003e+01\n15 371     8.219100e+02 1.523100e+02\n0 372     5.569000e+01 -7.071002e+01\n1 372     1.919399e+02 -5.658002e+01\n8 372     2.209100e+02 -7.463000e+01\n13 372     4.322900e+02 -2.776700e+02\n0 373     6.385601e+02 -7.996002e+01\n1 373     8.443700e+02 -2.672600e+02\n2 373     6.068700e+02 -8.796997e+01\n3 373     4.790500e+02 -3.918600e+02\n7 373     4.997300e+02 1.099200e+02\n8 373     5.563600e+02 -1.026200e+02\n10 373     6.546700e+02 1.158800e+02\n12 373     6.037600e+02 7.117999e+01\n13 373     8.728101e+02 -2.674900e+02\n15 373     8.710000e+02 1.131900e+02\n0 374     8.717999e+01 -9.910999e+01\n1 374     2.140500e+02 -9.365002e+01\n4 374     -3.565200e+02 -4.805800e+02\n7 374     2.029999e+01 3.001001e+01\n12 374     1.121900e+02 -1.502002e+01\n13 374     4.636000e+02 -3.005800e+02\n15 374     9.634998e+01 1.439001e+01\n0 375     6.598800e+02 -8.965002e+01\n1 375     8.638199e+02 -2.850900e+02\n2 375     6.334200e+02 -8.566998e+01\n6 375     5.528199e+02 5.942999e+01\n7 375     5.219000e+02 1.050400e+02\n10 375     6.802000e+02 1.070400e+02\n12 375     6.312100e+02 6.896002e+01\n0 376     1.337900e+02 -1.142800e+02\n1 376     2.556600e+02 -1.231400e+02\n2 376     3.271400e+02 -6.101001e+01\n3 376     2.328900e+02 -3.635300e+02\n6 376     1.529900e+02 -6.546997e+01\n8 376     2.963300e+02 -9.945001e+01\n10 376     7.362000e+01 2.266998e+01\n15 376     1.622000e+02 5.999756e-02\n0 377     1.441899e+02 -2.469100e+02\n1 377     2.213199e+02 -2.556700e+02\n4 377     -4.844200e+02 -5.313000e+02\n7 377     1.041000e+02 -1.045600e+02\n10 377     9.938000e+01 -1.290300e+02\n15 377     1.927000e+02 -1.783000e+02\n0 378     1.492600e+02 -2.686000e+02\n1 378     2.226300e+02 -2.795200e+02\n0 379     3.262400e+02 -5.118500e+02\n1 379     3.308000e+02 -5.815900e+02\n10 379     3.359399e+02 -4.118900e+02\n0 380     -1.965800e+02 3.769900e+02\n1 380     1.458400e+02 4.357600e+02\n2 380     -4.733300e+02 1.096400e+02\n5 380     2.027000e+02 -2.828100e+02\n7 380     -4.052500e+02 4.186400e+02\n14 380     1.188000e+02 -3.713100e+02\n0 381     -1.965800e+02 3.769900e+02\n1 381     1.458400e+02 4.357600e+02\n2 381     -4.733300e+02 1.096400e+02\n5 381     2.027000e+02 -2.828100e+02\n7 381     -4.052500e+02 4.186400e+02\n14 381     1.188000e+02 -3.713100e+02\n0 382     4.910000e+02 3.664200e+02\n1 382     8.455200e+02 2.467400e+02\n2 382     2.787400e+02 2.502900e+02\n3 382     1.383000e+02 -7.588000e+01\n6 382     1.827400e+02 4.954100e+02\n7 382     2.821700e+02 5.069200e+02\n8 382     2.962500e+02 1.851800e+02\n9 382     9.396002e+01 3.020300e+02\n11 382     6.040000e+02 -3.624400e+02\n12 382     2.936500e+02 4.882000e+02\n13 382     6.498101e+02 1.011100e+02\n0 383     -1.997300e+02 3.489900e+02\n1 383     1.362700e+02 4.088000e+02\n5 383     1.974900e+02 -3.130400e+02\n7 383     -4.044700e+02 3.893600e+02\n8 383     -3.093400e+02 4.901001e+01\n10 383     -3.675100e+02 5.359200e+02\n14 383     1.144600e+02 -4.016800e+02\n0 384     4.610900e+02 3.292400e+02\n1 384     8.020900e+02 2.147000e+02\n6 384     1.534000e+02 4.416900e+02\n7 384     2.569900e+02 4.650300e+02\n8 384     2.747800e+02 1.447000e+02\n10 384     4.139000e+02 5.789200e+02\n11 384     5.828000e+02 -3.992700e+02\n12 384     2.672300e+02 4.352900e+02\n13 384     6.234100e+02 6.528998e+01\n14 384     8.598900e+02 -3.839500e+02\n0 385     -4.001400e+02 3.083900e+02\n1 385     -6.973999e+01 4.199100e+02\n7 385     -6.035100e+02 3.219000e+02\n8 385     -4.812800e+02 2.999878e-02\n11 385     -2.123500e+02 -4.348900e+02\n12 385     -7.261400e+02 2.109500e+02\n15 385     -6.118900e+02 5.057100e+02\n0 386     4.747100e+02 3.002200e+02\n1 386     8.067500e+02 1.807400e+02\n8 386     2.920500e+02 1.263000e+02\n0 387     1.025600e+02 1.854000e+02\n1 387     3.310500e+02 1.789900e+02\n15 387     8.379999e+01 4.051300e+02\n0 388     -1.405900e+02 1.010700e+02\n1 388     8.140002e+01 1.611000e+02\n2 388     -1.498900e+02 -7.479980e+00\n3 388     -2.425900e+02 -3.277500e+02\n5 388     3.975800e+02 -5.705800e+02\n6 388     -3.310800e+02 4.853003e+01\n7 388     -2.670200e+02 1.748200e+02\n10 388     -2.682900e+02 2.448300e+02\n12 388     -2.732300e+02 1.027100e+02\n13 388     1.903101e+02 -1.596000e+02\n15 388     -2.327500e+02 2.548800e+02\n0 389     5.276400e+02 1.122500e+02\n1 389     7.893000e+02 -2.978998e+01\n6 389     3.339300e+02 2.321200e+02\n8 389     4.105500e+02 1.876001e+01\n10 389     5.091500e+02 3.278700e+02\n12 389     4.234800e+02 2.420900e+02\n13 389     7.336600e+02 -1.091200e+02\n15 389     6.928000e+02 3.640600e+02\n0 390     -2.801500e+02 7.689001e+01\n1 390     -3.215002e+01 1.707600e+02\n0 391     7.131000e+01 8.439001e+01\n1 391     2.560800e+02 9.088000e+01\n2 391     1.857200e+02 1.202000e+02\n3 391     8.907001e+01 -1.945600e+02\n4 391     -2.234800e+02 -4.680200e+02\n5 391     7.113300e+02 -5.725300e+02\n6 391     1.098999e+01 1.340300e+02\n7 391     -2.912000e+01 2.084100e+02\n8 391     1.859000e+02 5.322000e+01\n10 391     -1.965997e+01 2.463600e+02\n12 391     3.347998e+01 1.875000e+02\n13 391     4.233199e+02 -1.444500e+02\n15 391     5.085999e+01 2.622300e+02\n0 392     5.550100e+02 8.695001e+01\n1 392     8.098000e+02 -6.457001e+01\n6 392     3.751600e+02 2.139700e+02\n7 392     3.947900e+02 2.545300e+02\n8 392     4.412700e+02 7.700012e+00\n12 392     4.622900e+02 2.236800e+02\n13 392     7.648900e+02 -1.273000e+02\n15 392     7.341899e+02 3.334300e+02\n0 393     5.449700e+02 8.473001e+01\n1 393     7.987700e+02 -6.409998e+01\n6 393     3.638600e+02 2.079100e+02\n7 393     3.851100e+02 2.503700e+02\n8 393     4.326600e+02 1.950012e+00\n10 393     5.316801e+02 2.976600e+02\n15 393     7.205000e+02 3.284900e+02\n0 394     5.759000e+02 8.564001e+01\n1 394     8.308900e+02 -7.270001e+01\n6 394     4.021600e+02 2.222100e+02\n9 394     2.827000e+02 1.422600e+02\n12 394     4.876500e+02 2.323400e+02\n0 395     1.180900e+02 6.912000e+01\n1 395     2.961300e+02 6.254999e+01\n4 395     -2.393300e+02 -5.063700e+02\n5 395     7.720601e+02 -5.888600e+02\n6 395     7.129999e+01 1.330000e+02\n7 395     2.154999e+01 2.016600e+02\n8 395     2.325100e+02 5.167001e+01\n9 395     8.815002e+01 1.937100e+02\n12 395     9.492999e+01 1.852200e+02\n13 395     4.683800e+02 -1.528000e+02\n15 395     1.164800e+02 2.477800e+02\n0 396     1.997800e+02 6.828003e+01\n1 396     3.792100e+02 3.723999e+01\n7 396     1.002700e+02 2.126000e+02\n10 396     1.315800e+02 2.415800e+02\n13 396     5.354800e+02 -1.479500e+02\n15 396     2.285400e+02 2.581300e+02\n0 397     2.140601e+02 6.432001e+01\n1 397     3.929000e+02 2.898999e+01\n2 397     3.282200e+02 1.257200e+02\n3 397     2.215699e+02 -1.863600e+02\n6 397     1.675700e+02 1.529900e+02\n7 397     1.146100e+02 2.107900e+02\n8 397     3.057000e+02 5.770001e+01\n10 397     1.482700e+02 2.377600e+02\n12 397     1.989301e+02 2.002800e+02\n13 397     5.470699e+02 -1.503700e+02\n15 397     2.490100e+02 2.546300e+02\n0 398     1.500244e-01 2.259003e+01\n1 398     1.686600e+02 5.064001e+01\n4 398     -2.571400e+02 -4.117300e+02\n6 398     -4.747998e+01 4.159003e+01\n8 398     1.398500e+02 -1.185001e+01\n10 398     -9.584003e+01 1.669300e+02\n15 398     -3.784998e+01 1.675900e+02\n0 399     2.468000e+02 1.119000e+01\n1 399     4.095100e+02 -3.407001e+01\n10 399     1.909500e+02 1.794200e+02\n13 399     5.820000e+02 -1.931000e+02\n15 399     3.009200e+02 1.862700e+02\n0 400     1.271500e+02 -7.719971e+00\n1 400     2.796300e+02 -1.547998e+01\n2 400     2.871400e+02 5.365002e+01\n3 400     1.888101e+02 -2.556800e+02\n4 400     -2.951100e+02 -5.156500e+02\n7 400     4.475000e+01 1.283900e+02\n10 400     5.444000e+01 1.450100e+02\n15 400     1.381300e+02 1.439900e+02\n0 401     5.588700e+02 -9.400024e+00\n1 401     7.837900e+02 -1.669400e+02\n7 401     4.113600e+02 1.618000e+02\n13 401     7.799500e+02 -2.143900e+02\n15 401     7.508300e+02 1.996800e+02\n0 402     3.372800e+02 -1.813000e+01\n1 402     5.023600e+02 -9.378998e+01\n10 402     2.991300e+02 1.550900e+02\n0 403     5.610601e+02 -1.765002e+01\n1 403     7.834301e+02 -1.762200e+02\n7 403     4.148500e+02 1.540000e+02\n10 403     5.590900e+02 1.800600e+02\n13 403     7.833900e+02 -2.217200e+02\n15 403     7.550300e+02 1.885800e+02\n0 404     2.069900e+02 -4.919000e+01\n1 404     3.477700e+02 -8.144000e+01\n2 404     3.726100e+02 2.254999e+01\n3 404     2.696801e+02 -2.825800e+02\n4 404     -3.385700e+02 -5.803500e+02\n6 404     2.072100e+02 3.038000e+01\n7 404     1.287500e+02 9.953000e+01\n8 404     3.378700e+02 -2.998001e+01\n13 404     5.602700e+02 -2.469600e+02\n15 404     2.529600e+02 9.845001e+01\n0 405     1.694399e+02 -5.629999e+01\n1 405     3.071200e+02 -7.666998e+01\n2 405     3.438400e+02 1.178003e+01\n3 405     2.444000e+02 -2.934000e+02\n6 405     1.737400e+02 1.240997e+01\n7 405     9.392999e+01 8.694000e+01\n8 405     3.127000e+02 -3.957001e+01\n10 405     1.082600e+02 9.334998e+01\n13 405     5.302600e+02 -2.555500e+02\n15 405     2.024600e+02 8.353000e+01\n0 406     1.122998e+01 -6.876001e+01\n1 406     1.512800e+02 -4.115997e+01\n3 406     9.463000e+01 -3.546500e+02\n4 406     -3.219600e+02 -4.185600e+02\n7 406     -6.257001e+01 4.615002e+01\n8 406     1.770400e+02 -8.715997e+01\n15 406     -1.054999e+01 4.541998e+01\n0 407     2.422700e+02 -7.672998e+01\n1 407     3.765400e+02 -1.201700e+02\n6 407     2.470100e+02 8.780029e+00\n7 407     1.655200e+02 7.698999e+01\n12 407     2.741899e+02 5.015997e+01\n15 407     3.055200e+02 6.550000e+01\n0 408     -5.030029e+00 -8.703003e+01\n1 408     1.317500e+02 -5.471002e+01\n7 408     -7.646997e+01 2.434003e+01\n10 408     -8.982001e+01 3.988000e+01\n15 408     -2.921002e+01 1.854999e+01\n0 409     2.586200e+02 -8.622998e+01\n1 409     3.918000e+02 -1.353600e+02\n3 409     3.171500e+02 -3.183400e+02\n6 409     2.629000e+02 1.109985e+00\n7 409     1.819399e+02 6.965002e+01\n10 409     2.150100e+02 6.840997e+01\n12 409     2.926700e+02 4.172998e+01\n13 409     6.044600e+02 -2.771500e+02\n15 409     3.295400e+02 5.471002e+01\n0 410     2.481899e+02 -8.792999e+01\n1 410     3.800400e+02 -1.337800e+02\n2 410     4.158300e+02 -1.757001e+01\n6 410     2.549500e+02 -3.450012e+00\n7 410     1.727700e+02 6.657001e+01\n8 410     3.743800e+02 -6.237000e+01\n10 410     2.027800e+02 6.514001e+01\n12 410     2.831000e+02 3.714001e+01\n13 410     5.967200e+02 -2.791100e+02\n15 410     3.154500e+02 5.134003e+01\n0 411     2.189900e+02 -9.837000e+01\n1 411     3.466000e+02 -1.348000e+02\n8 411     3.567100e+02 -7.451001e+01\n10 411     1.701300e+02 5.008002e+01\n12 411     2.563400e+02 1.898999e+01\n15 411     2.763500e+02 3.303003e+01\n0 412     4.278199e+02 -1.082700e+02\n1 412     5.681400e+02 -2.150300e+02\n7 412     3.393700e+02 7.059003e+01\n0 413     3.969700e+02 -1.637000e+02\n1 413     5.186400e+02 -2.613200e+02\n10 413     3.813000e+02 -6.010010e+00\n15 413     5.326400e+02 -3.428998e+01\n0 414     2.960400e+02 -2.422700e+02\n1 414     3.817500e+02 -3.036100e+02\n7 414     2.430500e+02 -7.734003e+01\n10 414     2.733000e+02 -1.064800e+02\n12 414     3.793300e+02 -1.294000e+02\n15 414     4.016000e+02 -1.526500e+02\n0 415     2.572000e+02 -2.577100e+02\n1 415     3.360800e+02 -3.051500e+02\n7 415     2.104301e+02 -9.814001e+01\n10 415     2.303600e+02 -1.286900e+02\n15 415     3.500900e+02 -1.784800e+02\n0 416     2.574800e+02 -2.610400e+02\n1 416     3.358800e+02 -3.085900e+02\n12 416     3.473400e+02 -1.589800e+02\n0 417     6.233800e+02 -2.664700e+02\n1 417     7.486200e+02 -4.518600e+02\n7 417     5.275500e+02 -6.054999e+01\n12 417     6.747000e+02 -1.105100e+02\n15 417     8.681801e+02 -1.453700e+02\n0 418     6.309700e+02 -3.364500e+02\n1 418     7.272100e+02 -5.261600e+02\n7 418     5.504800e+02 -1.220900e+02\n12 418     7.160500e+02 -1.751500e+02\n0 419     -1.681200e+02 -5.286200e+02\n1 419     -1.494200e+02 -4.227200e+02\n6 419     -3.721997e+01 -6.851300e+02\n7 419     -1.622200e+02 -4.542200e+02\n0 420     -1.720100e+02 -5.345300e+02\n1 420     -1.549000e+02 -4.269500e+02\n6 420     -3.839001e+01 -6.932000e+02\n7 420     -1.658200e+02 -4.606801e+02\n9 420     6.215002e+01 -4.610100e+02\n0 421     -7.948999e+01 -5.454500e+02\n1 421     -7.477002e+01 -4.681700e+02\n4 421     -6.968300e+02 -3.231800e+02\n7 421     -6.925000e+01 -4.514900e+02\n9 421     1.519900e+02 -4.324900e+02\n0 422     1.395900e+02 -5.392500e+02\n1 422     1.345700e+02 -5.387300e+02\n0 423     -8.203003e+01 -5.528900e+02\n1 423     -7.971997e+01 -4.739900e+02\n4 423     -7.027200e+02 -3.213900e+02\n7 423     -6.988000e+01 -4.587100e+02\n9 423     1.555100e+02 -4.370500e+02\n0 424     4.792600e+02 3.800900e+02\n1 424     8.376899e+02 2.642700e+02\n2 424     2.619399e+02 2.588700e+02\n3 424     1.218300e+02 -6.837000e+01\n7 424     2.687700e+02 5.183900e+02\n9 424     7.950000e+01 3.085800e+02\n11 424     5.906600e+02 -3.496700e+02\n12 424     2.766801e+02 4.987600e+02\n0 425     4.792600e+02 3.800900e+02\n1 425     8.376899e+02 2.642700e+02\n2 425     2.619399e+02 2.588700e+02\n3 425     1.218300e+02 -6.837000e+01\n8 425     2.827700e+02 1.925700e+02\n9 425     7.950000e+01 3.085800e+02\n11 425     5.906600e+02 -3.496700e+02\n12 425     2.766801e+02 4.987600e+02\n0 426     -2.814200e+02 3.579100e+02\n1 426     5.716998e+01 4.378300e+02\n4 426     -4.465002e+01 -1.845000e+02\n5 426     1.169900e+02 -3.031500e+02\n7 426     -4.880800e+02 3.882000e+02\n8 426     -3.786200e+02 5.554999e+01\n10 426     -4.668500e+02 5.391000e+02\n11 426     -1.035100e+02 -3.933900e+02\n13 426     -3.357001e+01 3.359998e+01\n14 426     3.444000e+01 -3.931500e+02\n0 427     5.180100e+02 3.551700e+02\n1 427     8.706600e+02 2.275800e+02\n3 427     1.722100e+02 -7.491998e+01\n6 427     2.212100e+02 4.917000e+02\n7 427     3.109800e+02 5.007000e+02\n8 427     3.229700e+02 1.852000e+02\n9 427     1.234000e+02 3.035100e+02\n11 427     6.311300e+02 -3.707900e+02\n0 428     4.733500e+02 3.347900e+02\n1 428     8.166600e+02 2.175500e+02\n2 428     2.659399e+02 2.104900e+02\n3 428     1.263900e+02 -1.142800e+02\n6 428     1.679500e+02 4.532100e+02\n7 428     2.687100e+02 4.727500e+02\n8 428     2.854300e+02 1.534300e+02\n9 428     8.413000e+01 2.675600e+02\n11 428     5.925300e+02 -3.921100e+02\n13 428     6.350000e+02 7.178998e+01\n14 428     8.744000e+02 -3.760500e+02\n0 429     4.733500e+02 3.347900e+02\n1 429     8.166600e+02 2.175500e+02\n2 429     2.659399e+02 2.104900e+02\n3 429     1.263900e+02 -1.142800e+02\n6 429     1.679500e+02 4.532100e+02\n7 429     2.687100e+02 4.727500e+02\n8 429     2.854300e+02 1.534300e+02\n9 429     8.413000e+01 2.675600e+02\n11 429     5.925300e+02 -3.921100e+02\n13 429     6.350000e+02 7.178998e+01\n14 429     8.744000e+02 -3.760500e+02\n0 430     -3.957400e+02 3.032900e+02\n1 430     -6.669000e+01 4.137700e+02\n4 430     -6.584003e+01 -1.164500e+02\n5 430     -5.049988e+00 -3.605700e+02\n7 430     -5.982100e+02 3.172600e+02\n8 430     -4.770200e+02 -4.700012e+00\n10 430     -5.983200e+02 4.627500e+02\n11 430     -2.087000e+02 -4.404200e+02\n12 430     -7.200200e+02 2.053400e+02\n13 430     -1.279700e+02 -1.825000e+01\n14 430     -8.590997e+01 -4.530900e+02\n15 430     -6.048000e+02 4.989300e+02\n0 431     2.489399e+02 2.751400e+02\n1 431     5.652400e+02 2.160500e+02\n0 432     8.095001e+01 2.646400e+02\n1 432     3.879399e+02 2.525400e+02\n11 432     2.280699e+02 -4.764200e+02\n0 433     2.328101e+02 2.296000e+02\n1 433     5.303800e+02 1.753400e+02\n11 433     3.749000e+02 -5.067300e+02\n0 434     5.442500e+02 2.191100e+02\n1 434     8.395800e+02 7.838000e+01\n11 434     6.768000e+02 -5.052100e+02\n0 435     -5.703003e+01 1.797000e+02\n1 435     2.186700e+02 2.077200e+02\n0 436     -1.236900e+02 1.571500e+02\n1 436     1.458700e+02 2.043300e+02\n5 436     3.201400e+02 -5.233600e+02\n7 436     -2.865500e+02 2.127600e+02\n13 436     1.346800e+02 -1.272300e+02\n0 437     5.932800e+02 1.561500e+02\n1 437     8.714800e+02 -2.419983e+00\n3 437     3.528000e+02 -1.792000e+02\n6 437     4.064900e+02 3.053700e+02\n9 437     2.800000e+02 2.117000e+02\n13 437     7.963000e+02 -6.135999e+01\n0 438     -1.011700e+02 1.023100e+02\n1 438     1.154300e+02 1.525100e+02\n4 438     -1.983000e+02 -3.214700e+02\n5 438     4.539600e+02 -5.665601e+02\n7 438     -2.235200e+02 1.855200e+02\n12 438     -2.180300e+02 1.226200e+02\n13 438     2.327100e+02 -1.535100e+02\n15 438     -1.808000e+02 2.618300e+02\n0 439     -2.606800e+02 6.635999e+01\n1 439     -1.788000e+01 1.558100e+02\n0 440     1.009900e+02 4.615002e+01\n1 440     2.713600e+02 4.508002e+01\n4 440     -2.526500e+02 -4.936000e+02\n5 440     7.580500e+02 -6.147100e+02\n6 440     6.375000e+01 1.033700e+02\n7 440     8.739990e+00 1.768400e+02\n8 440     2.268600e+02 3.223999e+01\n10 440     1.877002e+01 2.054700e+02\n12 440     8.334003e+01 1.557600e+02\n13 440     4.571200e+02 -1.729100e+02\n15 440     9.577002e+01 2.142000e+02\n0 441     5.588400e+02 -1.130005e+00\n1 441     7.863300e+02 -1.580900e+02\n6 441     4.039700e+02 1.157900e+02\n7 441     4.103101e+02 1.697100e+02\n10 441     5.554200e+02 1.989600e+02\n13 441     7.793700e+02 -2.071700e+02\n0 442     5.636100e+02 -1.400000e+01\n1 442     7.870900e+02 -1.731400e+02\n7 442     4.168101e+02 1.581500e+02\n10 442     5.613000e+02 1.852400e+02\n13 442     7.854900e+02 -2.179100e+02\n15 442     7.581500e+02 1.942500e+02\n0 443     2.107000e+02 -2.677002e+01\n1 443     3.587200e+02 -6.009998e+01\n2 443     3.669600e+02 4.639001e+01\n3 443     2.631801e+02 -2.601600e+02\n4 443     -3.221400e+02 -5.834500e+02\n6 443     2.024800e+02 5.659998e+01\n13 443     5.602500e+02 -2.270000e+02\n15 443     2.552000e+02 1.297300e+02\n0 444     3.321500e+02 -2.804999e+01\n1 444     4.925100e+02 -1.019000e+02\n10 444     2.939900e+02 1.438200e+02\n15 444     4.253600e+02 1.440100e+02\n0 445     5.853300e+02 -4.034998e+01\n1 445     8.013101e+02 -2.080300e+02\n7 445     4.418500e+02 1.371400e+02\n10 445     5.891801e+02 1.562100e+02\n13 445     8.118000e+02 -2.390400e+02\n15 445     7.916200e+02 1.605600e+02\n0 446     5.894000e+01 -7.514001e+01\n1 446     1.937800e+02 -6.164001e+01\n7 446     -1.198999e+01 4.928998e+01\n13 446     4.354600e+02 -2.808600e+02\n15 446     5.484003e+01 4.359003e+01\n0 447     6.084003e+01 -8.995001e+01\n1 447     1.915500e+02 -7.671002e+01\n2 447     2.469200e+02 -5.247998e+01\n3 447     1.571500e+02 -3.565600e+02\n6 447     6.741998e+01 -6.210999e+01\n7 447     -7.950012e+00 3.413000e+01\n8 447     2.293800e+02 -9.227002e+01\n9 447     1.002900e+02 5.173999e+01\n10 447     -1.329999e+01 4.242999e+01\n12 447     7.827002e+01 -1.165997e+01\n13 447     4.384301e+02 -2.948300e+02\n15 447     5.940002e+01 2.323999e+01\n0 448     -2.997800e+02 -1.247800e+02\n1 448     -1.229000e+02 -1.150000e+01\n6 448     -4.849900e+02 -3.105601e+02\n7 448     -3.985600e+02 -8.901001e+01\n13 448     4.829999e+01 -3.796200e+02\n0 449     -2.964100e+02 -1.297500e+02\n1 449     -1.213100e+02 -1.657001e+01\n0 450     -3.142600e+02 -1.516100e+02\n1 450     -1.456600e+02 -3.177002e+01\n8 450     -2.112500e+02 -3.353400e+02\n15 450     -4.303200e+02 -1.120900e+02\n0 451     -9.916998e+01 -5.071100e+02\n1 451     -7.831000e+01 -4.259500e+02\n4 451     -6.563100e+02 -3.065200e+02\n6 451     2.615997e+01 -6.306801e+02\n9 451     1.084000e+02 -4.134300e+02\n0 452     -1.916400e+02 3.504900e+02\n1 452     1.442300e+02 4.081100e+02\n5 452     2.057000e+02 -3.109900e+02\n7 452     -3.969100e+02 3.912100e+02\n8 452     -3.033500e+02 5.253000e+01\n12 452     -4.904400e+02 3.008100e+02\n13 452     3.788000e+01 3.231000e+01\n14 452     1.223000e+02 -3.994500e+02\n0 453     5.126700e+02 3.307700e+02\n1 453     8.569399e+02 2.028600e+02\n3 453     1.721200e+02 -1.002300e+02\n6 453     2.202200e+02 4.613400e+02\n7 453     3.085400e+02 4.761200e+02\n8 453     3.228100e+02 1.634500e+02\n9 453     1.231900e+02 2.795700e+02\n10 453     4.734000e+02 5.850400e+02\n12 453     3.277800e+02 4.557300e+02\n13 453     6.743101e+02 7.250000e+01\n0 454     5.010300e+02 2.699100e+02\n1 454     8.248500e+02 1.411900e+02\n6 454     2.212400e+02 3.882500e+02\n7 454     3.053800e+02 4.148200e+02\n8 454     3.241600e+02 1.102900e+02\n10 454     4.661100e+02 5.124500e+02\n12 454     3.291300e+02 3.859100e+02\n13 454     6.693800e+02 1.965002e+01\n15 454     6.407000e+02 5.810500e+02\n0 455     2.097100e+02 2.391700e+02\n1 455     5.102800e+02 1.911900e+02\n10 455     1.278100e+02 4.448500e+02\n0 456     5.849600e+02 1.399100e+02\n1 456     8.575800e+02 -1.781000e+01\n2 456     4.862300e+02 1.123900e+02\n3 456     3.498300e+02 -2.011300e+02\n6 456     3.995200e+02 2.855800e+02\n7 456     4.171100e+02 3.122100e+02\n8 456     4.584399e+02 6.438000e+01\n9 456     2.773800e+02 1.927600e+02\n10 456     5.735699e+02 3.664100e+02\n12 456     4.848500e+02 2.948400e+02\n15 456     7.698000e+02 4.121400e+02\n0 457     5.608000e+02 1.233600e+02\n1 457     8.270000e+02 -2.825000e+01\n2 457     4.633700e+02 8.251001e+01\n3 457     3.286700e+02 -2.308800e+02\n6 457     3.735800e+02 2.566400e+02\n7 457     3.954900e+02 2.909800e+02\n8 457     4.394399e+02 4.067999e+01\n9 457     2.586200e+02 1.665300e+02\n10 457     5.471300e+02 3.446300e+02\n12 457     4.605000e+02 2.662500e+02\n13 457     7.666300e+02 -9.508002e+01\n15 457     7.380400e+02 3.847400e+02\n0 458     5.260100e+02 1.044000e+02\n1 458     7.854200e+02 -3.765997e+01\n6 458     3.314500e+02 2.241000e+02\n7 458     3.629700e+02 2.660300e+02\n10 458     5.077100e+02 3.183400e+02\n12 458     4.216200e+02 2.334300e+02\n15 458     6.916700e+02 3.528900e+02\n0 459     2.668300e+02 1.025000e+02\n1 459     4.641899e+02 5.044000e+01\n6 459     1.915800e+02 2.022300e+02\n7 459     1.541600e+02 2.526700e+02\n10 459     2.059500e+02 2.880700e+02\n12 459     2.332000e+02 2.446400e+02\n13 459     5.772900e+02 -1.168500e+02\n15 459     3.186500e+02 3.147000e+02\n0 460     -2.902500e+02 6.751001e+01\n1 460     -4.489001e+01 1.648400e+02\n2 460     -4.304300e+02 -1.885100e+02\n4 460     -2.075200e+02 -1.697700e+02\n7 460     -4.352100e+02 1.006600e+02\n8 460     -2.909300e+02 -1.709300e+02\n13 460     9.000000e+00 -2.132000e+02\n15 460     -4.246200e+02 1.888700e+02\n0 461     -2.667400e+02 4.997998e+01\n1 461     -2.937000e+01 1.420300e+02\n2 461     -3.893800e+02 -1.972400e+02\n4 461     -2.209300e+02 -1.843400e+02\n7 461     -4.065600e+02 8.719000e+01\n13 461     3.467999e+01 -2.265600e+02\n15 461     -3.895300e+02 1.680100e+02\n0 462     5.466400e+02 4.350000e+01\n1 462     7.876600e+02 -1.077000e+02\n6 462     3.760300e+02 1.616400e+02\n7 462     3.919600e+02 2.106300e+02\n10 462     5.368600e+02 2.497700e+02\n12 462     4.629301e+02 1.725000e+02\n13 462     7.610300e+02 -1.677500e+02\n15 462     7.274200e+02 2.714000e+02\n0 463     6.003300e+02 4.421002e+01\n1 463     8.433600e+02 -1.237000e+02\n7 463     4.453000e+02 2.219700e+02\n8 463     4.930300e+02 -1.048001e+01\n10 463     6.013800e+02 2.565100e+02\n15 463     8.040900e+02 2.809900e+02\n0 464     6.378000e+02 -1.397998e+01\n1 464     8.644600e+02 -1.974000e+02\n0 465     6.451200e+02 -2.159003e+01\n1 465     8.698199e+02 -2.077600e+02\n2 465     5.976200e+02 -2.247998e+01\n3 465     4.658600e+02 -3.279000e+02\n6 465     5.165500e+02 1.297000e+02\n7 465     4.983300e+02 1.672900e+02\n8 465     5.489000e+02 -4.882001e+01\n10 465     6.571899e+02 1.839700e+02\n12 465     5.968101e+02 1.397600e+02\n13 465     8.716801e+02 -2.125700e+02\n0 466     6.316200e+02 -2.251001e+01\n1 466     8.551200e+02 -2.042100e+02\n7 466     4.848199e+02 1.642600e+02\n8 466     5.358101e+02 -5.454001e+01\n10 466     6.416801e+02 1.819100e+02\n12 466     5.798900e+02 1.339800e+02\n15 466     8.534399e+02 1.926200e+02\n0 467     2.149100e+02 -2.978003e+01\n1 467     3.622200e+02 -6.452002e+01\n7 467     1.337300e+02 1.193000e+02\n10 467     1.586100e+02 1.289000e+02\n15 467     2.619500e+02 1.256800e+02\n0 468     6.629700e+02 -1.130700e+02\n1 468     8.595699e+02 -3.105800e+02\n7 468     5.279600e+02 8.309000e+01\n0 469     1.465400e+02 -2.935000e+02\n1 469     2.156200e+02 -3.031600e+02\n4 469     -5.255900e+02 -5.258300e+02\n7 469     1.093900e+02 -1.536800e+02\n10 469     1.066400e+02 -1.816100e+02\n15 469     2.038700e+02 -2.411400e+02\n0 470     -7.092999e+01 -5.674000e+02\n1 470     -7.472998e+01 -4.907300e+02\n7 470     -5.523999e+01 -4.705100e+02\n9 470     1.755200e+02 -4.427900e+02\n0 471     -3.925800e+02 3.104100e+02\n1 471     -6.190002e+01 4.198800e+02\n4 471     -6.173999e+01 -1.191400e+02\n5 471     -4.600220e-01 -3.520000e+02\n7 471     -5.955700e+02 3.252800e+02\n8 471     -4.741300e+02 2.850006e+00\n10 471     -5.951100e+02 4.722900e+02\n12 471     -7.170800e+02 2.154400e+02\n15 471     -6.013000e+02 5.098800e+02\n0 472     4.840000e+02 3.215500e+02\n1 472     8.234900e+02 2.007000e+02\n2 472     2.813400e+02 2.023400e+02\n6 472     1.855200e+02 4.414400e+02\n7 472     2.810000e+02 4.619300e+02\n8 472     2.978900e+02 1.464700e+02\n9 472     9.762000e+01 2.609700e+02\n10 472     4.416000e+02 5.721100e+02\n11 472     6.053800e+02 -4.053000e+02\n12 472     2.960200e+02 4.359800e+02\n13 472     6.467100e+02 6.178003e+01\n0 473     -5.596997e+01 2.940400e+02\n1 473     2.620200e+02 3.177900e+02\n0 474     4.701100e+02 2.927400e+02\n1 474     7.998000e+02 1.736000e+02\n6 474     1.747600e+02 4.027400e+02\n7 474     2.709800e+02 4.311800e+02\n10 474     4.273900e+02 5.356700e+02\n11 474     5.984100e+02 -4.362100e+02\n12 474     2.866600e+02 3.987500e+02\n13 474     6.358600e+02 3.516998e+01\n14 474     8.785500e+02 -4.232100e+02\n0 475     4.902700e+02 2.925000e+02\n1 475     8.209500e+02 1.680700e+02\n6 475     2.012700e+02 4.103000e+02\n7 475     2.913199e+02 4.349000e+02\n8 475     3.091100e+02 1.250400e+02\n10 475     4.516200e+02 5.373600e+02\n11 475     6.167400e+02 -4.329200e+02\n12 475     3.107000e+02 4.066100e+02\n13 475     6.564900e+02 3.790002e+01\n0 476     5.095400e+02 2.713700e+02\n1 476     8.342800e+02 1.402000e+02\n6 476     2.345600e+02 3.919900e+02\n7 476     3.136600e+02 4.174300e+02\n8 476     3.314700e+02 1.139600e+02\n10 476     4.756100e+02 5.144100e+02\n11 476     6.394600e+02 -4.535400e+02\n12 476     3.398600e+02 3.897000e+02\n13 476     6.780300e+02 2.179999e+01\n0 477     5.101001e+01 2.494100e+02\n1 477     3.520699e+02 2.454000e+02\n11 477     2.004800e+02 -4.923300e+02\n0 478     3.032300e+02 1.964300e+02\n1 478     5.910000e+02 1.217800e+02\n10 478     2.394800e+02 4.038700e+02\n0 479     3.032300e+02 1.964300e+02\n1 479     5.910000e+02 1.217800e+02\n10 479     2.394800e+02 4.038700e+02\n0 480     5.531200e+02 1.886100e+02\n1 480     8.395300e+02 4.297998e+01\n2 480     4.372000e+02 1.454500e+02\n3 480     3.008000e+02 -1.705700e+02\n6 480     3.465700e+02 3.279600e+02\n7 480     3.790400e+02 3.524600e+02\n8 480     4.189600e+02 9.267999e+01\n9 480     2.347800e+02 2.186900e+02\n10 480     5.325100e+02 4.196700e+02\n12 480     4.349301e+02 3.364000e+02\n13 480     7.513101e+02 -3.842999e+01\n15 480     7.198101e+02 4.753200e+02\n0 481     9.606000e+01 9.609000e+01\n1 481     2.845100e+02 9.710999e+01\n2 481     2.033800e+02 1.337100e+02\n3 481     1.041100e+02 -1.818900e+02\n7 481     -7.070007e+00 2.230200e+02\n8 481     2.017100e+02 6.416000e+01\n12 481     5.679999e+01 2.050600e+02\n13 481     4.423500e+02 -1.340300e+02\n15 481     8.383002e+01 2.803400e+02\n0 482     1.157300e+02 6.115997e+01\n1 482     2.909600e+02 5.540002e+01\n3 482     1.434400e+02 -1.994200e+02\n7 482     2.053998e+01 1.936100e+02\n8 482     2.320700e+02 4.709000e+01\n15 482     1.141500e+02 2.363400e+02\n0 483     5.519000e+02 6.004999e+01\n1 483     7.979399e+02 -9.172998e+01\n6 483     3.789300e+02 1.823700e+02\n7 483     3.955400e+02 2.274900e+02\n12 483     4.654900e+02 1.928100e+02\n13 483     7.645000e+02 -1.521000e+02\n0 484     3.385800e+02 1.006000e+01\n1 484     5.134200e+02 -6.596002e+01\n15 484     4.303000e+02 1.972700e+02\n0 485     3.330200e+02 9.520020e+00\n1 485     5.058400e+02 -6.515997e+01\n10 485     2.915800e+02 1.868400e+02\n15 485     4.228600e+02 1.957300e+02\n0 486     1.951000e+02 -8.646997e+01\n1 486     3.252300e+02 -1.149400e+02\n3 486     2.745000e+02 -3.223000e+02\n8 486     3.379300e+02 -6.494000e+01\n15 486     2.417500e+02 4.616998e+01\n0 487     6.178101e+02 -2.824600e+02\n1 487     7.353900e+02 -4.663700e+02\n2 487     7.185800e+02 -2.293800e+02\n7 487     5.265000e+02 -7.560999e+01\n12 487     6.772900e+02 -1.271800e+02\n15 487     8.630300e+02 -1.674800e+02\n0 488     4.968300e+02 -4.150300e+02\n1 488     5.471899e+02 -5.521500e+02\n7 488     4.489200e+02 -2.155200e+02\n0 489     4.620601e+02 3.171800e+02\n1 489     7.992700e+02 2.017400e+02\n7 489     2.597300e+02 4.536800e+02\n11 489     5.846500e+02 -4.099600e+02\n13 489     6.255800e+02 5.540002e+01\n0 490     5.052300e+02 2.937700e+02\n1 490     8.369900e+02 1.653100e+02\n6 490     2.204800e+02 4.169100e+02\n7 490     3.064700e+02 4.384700e+02\n8 490     3.230700e+02 1.306400e+02\n10 490     4.693500e+02 5.410400e+02\n11 490     6.311300e+02 -4.313200e+02\n12 490     3.279500e+02 4.132400e+02\n13 490     6.715100e+02 4.033002e+01\n0 491     5.150300e+02 2.780500e+02\n1 491     8.422900e+02 1.457900e+02\n6 491     2.374100e+02 4.022400e+02\n7 491     3.182700e+02 4.250900e+02\n10 491     4.816801e+02 5.230300e+02\n12 491     3.440300e+02 3.986100e+02\n0 492     5.321997e+01 2.404100e+02\n1 492     3.508400e+02 2.365500e+02\n10 492     -5.633002e+01 4.302400e+02\n11 492     2.013000e+02 -5.004000e+02\n0 493     1.620200e+02 1.334600e+02\n1 493     3.603101e+02 1.174000e+02\n0 494     5.767000e+02 1.203300e+02\n1 494     8.428500e+02 -3.629999e+01\n2 494     4.823600e+02 8.821997e+01\n3 494     3.464200e+02 -2.246100e+02\n6 494     3.939600e+02 2.611000e+02\n7 494     4.119100e+02 2.913300e+02\n8 494     4.545400e+02 4.526999e+01\n9 494     2.747400e+02 1.721800e+02\n10 494     5.671700e+02 3.420300e+02\n12 494     4.799500e+02 2.707700e+02\n15 494     7.614800e+02 3.831300e+02\n0 495     6.238800e+02 -2.622998e+01\n1 495     8.460601e+02 -2.055600e+02\n7 495     4.780601e+02 1.585900e+02\n12 495     5.729399e+02 1.253100e+02\n13 495     8.503700e+02 -2.206900e+02\n15 495     8.439200e+02 1.860300e+02\n0 496     7.450000e+01 -7.554999e+01\n1 496     2.087600e+02 -6.629999e+01\n3 496     1.669600e+02 -3.365300e+02\n6 496     7.946997e+01 -3.940997e+01\n7 496     3.520020e+00 5.189001e+01\n8 496     2.389800e+02 -7.413000e+01\n13 496     4.504500e+02 -2.802300e+02\n15 496     7.559003e+01 4.496997e+01\n0 497     2.043700e+02 -7.975000e+01\n1 497     3.364600e+02 -1.112600e+02\n7 497     1.308100e+02 6.856000e+01\n10 497     1.508300e+02 6.959998e+01\n15 497     2.537800e+02 5.656000e+01\n0 498     2.184700e+02 3.290600e+02\n1 498     5.544399e+02 2.785100e+02\n11 498     3.565000e+02 -4.110100e+02\n0 499     5.538199e+02 9.189999e+01\n1 499     8.100300e+02 -5.890997e+01\n10 499     5.411801e+02 3.064200e+02\n12 499     4.599600e+02 2.316000e+02\n13 499     7.635699e+02 -1.230200e+02\n15 499     7.319600e+02 3.406000e+02\n0 500     6.073600e+02 -2.703600e+02\n1 500     7.292400e+02 -4.502300e+02\n7 500     5.132800e+02 -6.628998e+01\n12 500     6.590699e+02 -1.182000e+02\n0 501     -5.414300e+02 2.768800e+02\n1 501     -2.104700e+02 4.241600e+02\n7 501     -7.482800e+02 2.700500e+02\n10 501     -7.760300e+02 4.182300e+02\n11 501     -3.407900e+02 -4.607700e+02\n14 501     -2.370900e+02 -4.821600e+02\n15 501     -8.047800e+02 4.428400e+02\n0 502     -3.416400e+02 3.278400e+02\n1 502     -8.760010e+00 4.240600e+02\n5 502     5.304999e+01 -3.341600e+02\n7 502     -5.455500e+02 3.497900e+02\n11 502     -1.591700e+02 -4.188300e+02\n12 502     -6.592000e+02 2.461300e+02\n0 503     -5.241200e+02 4.458100e+02\n1 503     -1.560800e+02 5.803500e+02\n5 503     -1.117400e+02 -2.027400e+02\n7 503     -7.554500e+02 4.553800e+02\n8 503     -5.939700e+02 1.374300e+02\n14 503     -1.948800e+02 -2.983200e+02\n0 504     -5.198700e+02 4.467800e+02\n1 504     -1.519300e+02 5.801500e+02\n7 504     -7.511600e+02 4.565400e+02\n11 504     -3.080700e+02 -3.122200e+02\n14 504     -1.905900e+02 -2.976000e+02\n0 505     -5.307500e+02 3.480800e+02\n1 505     -1.850100e+02 4.889400e+02\n5 505     -1.312500e+02 -3.061300e+02\n8 505     -5.989700e+02 3.944000e+01\n11 505     -3.251300e+02 -3.975000e+02\n13 505     -2.338600e+02 1.642999e+01\n14 505     -2.129900e+02 -4.021500e+02\n15 505     -8.035600e+02 5.442300e+02\n0 506     1.310900e+02 5.681000e+02\n1 506     5.335000e+02 5.481300e+02\n2 506     -1.786800e+02 3.365900e+02\n3 506     -3.138300e+02 2.890015e+00\n4 506     4.709998e+01 -4.463800e+02\n5 506     5.337200e+02 -7.557001e+01\n6 506     -3.477600e+02 6.359500e+02\n9 506     -3.064300e+02 3.614300e+02\n11 506     2.592000e+02 -2.000300e+02\n12 506     -1.777800e+02 6.062700e+02\n13 506     2.915300e+02 2.349900e+02\n14 506     4.375100e+02 -1.611100e+02\n0 507     4.165000e+02 5.800300e+02\n1 507     8.640900e+02 4.913500e+02\n2 507     6.008002e+01 3.498300e+02\n3 507     -8.819000e+01 1.466998e+01\n5 507     8.177500e+02 -5.279999e+01\n6 507     -5.073999e+01 7.043300e+02\n9 507     -1.037700e+02 3.797800e+02\n14 507     7.121801e+02 -1.335000e+02\n0 508     2.876200e+02 5.574800e+02\n1 508     7.059700e+02 4.978600e+02\n2 508     -4.369000e+01 3.264600e+02\n3 508     -1.863000e+02 -9.979980e+00\n4 508     3.153998e+01 -5.498300e+02\n5 508     6.870300e+02 -8.212000e+01\n6 508     -1.806200e+02 6.512100e+02\n9 508     -1.915200e+02 3.548600e+02\n11 508     4.002000e+02 -2.021400e+02\n12 508     -1.538000e+01 6.131000e+02\n13 508     4.148800e+02 2.366400e+02\n0 509     3.268300e+02 5.809800e+02\n1 509     7.579800e+02 5.133800e+02\n14 509     6.243101e+02 -1.383400e+02\n0 510     2.991100e+02 5.657500e+02\n1 510     7.211801e+02 5.038200e+02\n2 510     -3.482001e+01 3.337200e+02\n4 510     3.646997e+01 -5.592900e+02\n5 510     6.997600e+02 -7.259998e+01\n6 510     -1.689700e+02 6.641500e+02\n9 510     -1.837100e+02 3.630400e+02\n11 510     4.111600e+02 -1.937600e+02\n13 510     4.237700e+02 2.437200e+02\n14 510     5.992900e+02 -1.548700e+02\n0 511     1.639000e+02 5.786700e+02\n1 511     5.731100e+02 5.504700e+02\n2 511     -1.520200e+02 3.478500e+02\n3 511     -2.882900e+02 1.340997e+01\n4 511     5.169000e+01 -4.685300e+02\n5 511     5.657100e+02 -6.364001e+01\n6 511     -3.149800e+02 6.547500e+02\n8 511     -4.521002e+01 2.704000e+02\n9 511     -2.842800e+02 3.718400e+02\n11 511     2.884800e+02 -1.896800e+02\n12 511     -1.456500e+02 6.220000e+02\n14 511     4.685500e+02 -1.488600e+02\n0 512     1.181700e+02 -3.924100e+02\n1 512     1.611899e+02 -3.903400e+02\n0 513     5.684200e+02 2.209500e+02\n1 513     8.660300e+02 7.335999e+01\n6 513     3.575200e+02 3.710300e+02\n7 513     3.899900e+02 3.874900e+02\n8 513     4.264900e+02 1.256100e+02\n10 513     5.476500e+02 4.613000e+02\n15 513     7.399100e+02 5.200300e+02\n0 514     5.007200e+02 4.029700e+02\n1 514     8.682100e+02 2.837500e+02\n3 514     1.403700e+02 -3.965002e+01\n6 514     1.867200e+02 5.385100e+02\n7 514     2.870900e+02 5.443400e+02\n8 514     2.981800e+02 2.168400e+02\n9 514     9.528998e+01 3.340400e+02\n11 514     6.066801e+02 -3.277200e+02\n0 515     3.352400e+02 4.606300e+02\n1 515     7.308600e+02 3.819600e+02\n2 515     1.044000e+01 2.219300e+02\n4 515     -3.202002e+01 -5.795400e+02\n5 515     7.415000e+02 -1.827600e+02\n6 515     -1.099200e+02 5.412200e+02\n7 515     9.770001e+01 5.621400e+02\n8 515     8.914001e+01 1.731400e+02\n9 515     -1.414500e+02 2.671000e+02\n12 515     5.277002e+01 5.102500e+02\n13 515     4.577000e+02 1.572900e+02\n14 515     6.443101e+02 -2.615100e+02\n0 516     3.702900e+02 5.021000e+02\n1 516     7.839301e+02 4.172200e+02\n2 516     3.350000e+01 2.671600e+02\n3 516     -1.126700e+02 -6.513000e+01\n5 516     7.755699e+02 -1.374000e+02\n6 516     -8.247000e+01 5.986800e+02\n8 516     1.086300e+02 2.091600e+02\n9 516     -1.236700e+02 3.072100e+02\n12 516     7.944000e+01 5.606000e+02\n13 516     4.835200e+02 1.950500e+02\n14 516     6.749800e+02 -2.158800e+02\n0 517     5.191600e+02 3.460900e+02\n1 517     8.685000e+02 2.180100e+02\n2 517     3.157500e+02 2.425800e+02\n3 517     1.748000e+02 -8.252002e+01\n7 517     3.125900e+02 4.923200e+02\n8 517     3.250200e+02 1.778800e+02\n9 517     1.255000e+02 2.963400e+02\n11 517     6.343800e+02 -3.800800e+02\n12 517     3.315400e+02 4.749600e+02\n13 517     6.796300e+02 8.731000e+01\n0 518     4.840000e+02 3.215500e+02\n1 518     8.234900e+02 2.007000e+02\n2 518     2.813400e+02 2.023400e+02\n6 518     1.855200e+02 4.414400e+02\n7 518     2.810000e+02 4.619300e+02\n8 518     2.978900e+02 1.464700e+02\n10 518     4.416000e+02 5.721100e+02\n11 518     6.053800e+02 -4.053000e+02\n13 518     6.467100e+02 6.178003e+01\n0 519     4.544000e+02 3.166200e+02\n1 519     7.909900e+02 2.029500e+02\n6 519     1.470400e+02 4.252700e+02\n7 519     2.519399e+02 4.516100e+02\n8 519     2.708800e+02 1.323200e+02\n10 519     4.070200e+02 5.628000e+02\n11 519     5.790500e+02 -4.121500e+02\n12 519     2.618199e+02 4.196700e+02\n13 519     6.178101e+02 5.371002e+01\n14 519     8.539100e+02 -3.985700e+02\n0 520     3.146400e+02 5.682200e+02\n1 520     7.393300e+02 5.025900e+02\n2 520     -2.184003e+01 3.367900e+02\n3 520     -1.647800e+02 1.950012e+00\n4 520     3.702002e+01 -5.700900e+02\n5 520     7.151500e+02 -6.946002e+01\n6 520     -1.534900e+02 6.701000e+02\n9 520     -1.728600e+02 3.660800e+02\n11 520     4.245100e+02 -1.907300e+02\n13 520     4.356600e+02 2.468200e+02\n14 520     6.141300e+02 -1.514400e+02\n0 521     5.044100e+02 4.060300e+02\n1 521     8.728600e+02 2.855500e+02\n2 521     2.847200e+02 2.939400e+02\n3 521     1.433600e+02 -3.402002e+01\n6 521     1.909300e+02 5.440500e+02\n7 521     2.907000e+02 5.473600e+02\n8 521     3.012600e+02 2.199000e+02\n11 521     6.091899e+02 -3.247200e+02\n13 521     6.591700e+02 1.354100e+02\n0 522     4.914200e+02 4.193500e+02\n1 522     8.635500e+02 3.034300e+02\n2 522     2.671801e+02 3.013700e+02\n3 522     1.256900e+02 -2.690002e+01\n6 522     1.704400e+02 5.561000e+02\n7 522     2.756100e+02 5.584100e+02\n8 522     2.869200e+02 2.269700e+02\n9 522     8.259998e+01 3.454000e+02\n11 522     5.951400e+02 -3.126700e+02\n12 522     2.822400e+02 5.447200e+02\n13 522     6.453800e+02 1.449900e+02\n0 523     4.670800e+02 3.837400e+02\n1 523     8.257700e+02 2.716400e+02\n2 523     2.466600e+02 2.572300e+02\n3 523     1.067700e+02 -7.020001e+01\n7 523     2.554301e+02 5.198200e+02\n8 523     2.705000e+02 1.915000e+02\n9 523     6.592999e+01 3.066000e+02\n11 523     5.789600e+02 -3.471500e+02\n12 523     2.617100e+02 4.983200e+02\n13 523     6.238500e+02 1.128500e+02\n14 523     8.567300e+02 -3.234700e+02\n0 524     5.823199e+02 2.087100e+02\n1 524     8.770900e+02 5.601001e+01\n2 524     4.645300e+02 1.805600e+02\n3 524     3.261000e+02 -1.369200e+02\n6 524     3.779900e+02 3.625500e+02\n7 524     4.057300e+02 3.781000e+02\n8 524     4.414900e+02 1.199900e+02\n9 524     2.574100e+02 2.491800e+02\n10 524     5.655200e+02 4.474300e+02\n11 524     7.179900e+02 -5.159200e+02\n13 524     7.785100e+02 -1.753003e+01\n15 524     7.588600e+02 5.085700e+02\n0 525     1.172998e+01 5.549800e+02\n1 525     4.042800e+02 5.623600e+02\n2 525     -2.854100e+02 3.220700e+02\n3 525     -4.175800e+02 -1.104999e+01\n4 525     4.594000e+01 -3.703100e+02\n5 525     4.167400e+02 -9.221997e+01\n6 525     -4.764500e+02 5.952900e+02\n8 525     -1.556200e+02 2.471400e+02\n11 525     1.550300e+02 -2.165200e+02\n12 525     -3.013800e+02 5.749700e+02\n13 525     1.990100e+02 2.170400e+02\n14 525     3.244000e+02 -1.791200e+02\n0 526     -2.115997e+01 1.203003e+01\n1 526     1.462300e+02 4.534003e+01\n3 526     2.245001e+01 -2.905300e+02\n7 526     -1.111400e+02 1.202600e+02\n10 526     -1.203400e+02 1.527900e+02\n15 526     -6.498999e+01 1.508000e+02\n0 527     -2.660600e+02 3.863100e+02\n1 527     7.883002e+01 4.619900e+02\n2 527     -5.442500e+02 1.199000e+02\n4 527     -3.041998e+01 -1.961200e+02\n5 527     1.348500e+02 -2.719900e+02\n7 527     -4.765800e+02 4.203100e+02\n8 527     -3.665600e+02 8.326999e+01\n10 527     -4.522000e+02 5.750800e+02\n11 527     -8.963000e+01 -3.674700e+02\n13 527     -2.085999e+01 5.890002e+01\n14 527     5.121997e+01 -3.620000e+02\n0 528     -3.153000e+02 4.062500e+02\n1 528     3.523999e+01 4.935800e+02\n2 528     -5.966100e+02 1.453500e+02\n7 528     -5.297700e+02 4.360000e+02\n10 528     -5.154900e+02 5.961900e+02\n11 528     -1.326400e+02 -3.494500e+02\n12 528     -6.421600e+02 3.488200e+02\n14 528     4.169983e+00 -3.403200e+02\n0 529     -5.645500e+02 3.069400e+02\n1 529     -2.251200e+02 4.580800e+02\n5 529     -1.745800e+02 -3.506900e+02\n15 529     -8.432800e+02 4.821000e+02\n0 530     -5.052600e+02 3.887900e+02\n1 530     -1.513800e+02 5.216900e+02\n8 530     -5.771600e+02 7.989001e+01\n14 530     -1.842900e+02 -3.590900e+02\n0 531     -4.252000e+02 3.101900e+02\n1 531     -9.251001e+01 4.271700e+02\n10 531     -6.345700e+02 4.680700e+02\n12 531     -7.581700e+02 2.080700e+02\n15 531     -6.465500e+02 5.041500e+02\n0 532     3.315200e+02 4.657300e+02\n1 532     7.279600e+02 3.881800e+02\n2 532     6.479980e+00 2.273500e+02\n3 532     -1.385500e+02 -1.044800e+02\n4 532     -2.794000e+01 -5.771899e+02\n5 532     7.370400e+02 -1.770500e+02\n6 532     -1.152400e+02 5.466200e+02\n7 532     9.366998e+01 5.672600e+02\n9 532     -1.451200e+02 2.721400e+02\n11 532     4.528199e+02 -2.789100e+02\n12 532     4.769000e+01 5.154700e+02\n14 532     6.399200e+02 -2.563000e+02\n0 533     1.181300e+02 4.194900e+02\n1 533     4.809000e+02 3.965800e+02\n2 533     -1.751100e+02 1.689300e+02\n3 533     -3.117800e+02 -1.626000e+02\n5 533     5.201200e+02 -2.338800e+02\n6 533     -3.332100e+02 4.418700e+02\n7 533     -1.025900e+02 4.977200e+02\n8 533     -6.452002e+01 1.278100e+02\n9 533     -2.963600e+02 2.145400e+02\n11 533     2.587300e+02 -3.310200e+02\n12 533     -1.640300e+02 4.308000e+02\n13 533     2.848300e+02 1.075000e+02\n14 533     4.299600e+02 -3.167900e+02\n0 534     3.352400e+02 4.606300e+02\n1 534     7.308600e+02 3.819600e+02\n2 534     1.044000e+01 2.219300e+02\n4 534     -3.202002e+01 -5.795400e+02\n5 534     7.415000e+02 -1.827600e+02\n6 534     -1.099200e+02 5.412200e+02\n7 534     9.770001e+01 5.621400e+02\n8 534     8.914001e+01 1.731400e+02\n9 534     -1.414500e+02 2.671000e+02\n11 534     4.572700e+02 -2.832000e+02\n12 534     5.277002e+01 5.102500e+02\n13 534     4.577000e+02 1.572900e+02\n14 534     6.443101e+02 -2.615100e+02\n0 535     -1.699500e+02 1.481200e+02\n1 535     9.758002e+01 2.082000e+02\n4 535     -1.733400e+02 -2.424900e+02\n5 535     2.694700e+02 -5.334100e+02\n7 535     -3.310200e+02 1.973500e+02\n9 535     -4.150600e+02 -2.106000e+01\n12 535     -3.876100e+02 8.940002e+01\n13 535     9.403003e+01 -1.380200e+02\n0 536     1.698999e+01 5.152700e+02\n1 536     3.979600e+02 5.207000e+02\n2 536     -2.764200e+02 2.778600e+02\n3 536     -4.079200e+02 -5.387000e+01\n5 536     4.217200e+02 -1.331200e+02\n6 536     -4.626000e+02 5.445600e+02\n8 536     -1.481700e+02 2.126300e+02\n11 536     1.610200e+02 -2.505500e+02\n13 536     2.033300e+02 1.839900e+02\n14 536     3.298101e+02 -2.191100e+02\n0 537     -6.969000e+01 4.670500e+02\n1 537     2.960900e+02 4.932700e+02\n2 537     -3.536400e+02 2.209800e+02\n3 537     -4.840400e+02 -1.094600e+02\n4 537     4.099731e-01 -3.158100e+02\n5 537     3.353101e+02 -1.855700e+02\n6 537     -5.512600e+02 4.636500e+02\n7 537     -2.907000e+02 5.265200e+02\n8 537     -2.109300e+02 1.662100e+02\n11 537     8.581000e+01 -2.942100e+02\n12 537     -3.735200e+02 4.592200e+02\n13 537     1.359000e+02 1.381500e+02\n14 537     2.463900e+02 -2.721700e+02\n0 538     1.676200e+02 3.628003e+01\n1 538     3.346400e+02 1.548999e+01\n2 538     3.032600e+02 1.004900e+02\n3 538     2.020900e+02 -2.110400e+02\n4 538     -2.687600e+02 -5.460000e+02\n6 538     1.350500e+02 1.146600e+02\n7 538     7.448999e+01 1.771900e+02\n8 538     2.818000e+02 3.538000e+01\n10 538     9.506000e+01 2.004100e+02\n12 538     1.591700e+02 1.624900e+02\n13 538     5.142500e+02 -1.767200e+02\n15 538     1.857700e+02 2.095200e+02\n0 539     3.371600e+02 4.397200e+02\n1 539     7.267700e+02 3.592200e+02\n2 539     1.590002e+01 1.992400e+02\n5 539     7.451600e+02 -2.052100e+02\n9 539     -1.363700e+02 2.473700e+02\n14 539     6.479100e+02 -2.835600e+02\n0 540     -1.282001e+01 -3.871002e+01\n1 540     1.381801e+02 -5.429993e+00\n2 540     1.414700e+02 -2.589001e+01\n3 540     5.739001e+01 -3.350000e+02\n6 540     -4.145001e+01 -3.269000e+01\n7 540     -9.240997e+01 7.142999e+01\n8 540     1.450700e+02 -6.814001e+01\n10 540     -1.036500e+02 9.464001e+01\n12 540     -2.910999e+01 2.133002e+01\n13 540     3.620699e+02 -2.566700e+02\n15 540     -4.650000e+01 8.272000e+01\n0 541     -4.654600e+02 3.989400e+02\n1 541     -1.114500e+02 5.223600e+02\n5 541     -6.175000e+01 -2.537300e+02\n10 541     -7.004300e+02 5.755700e+02\n12 541     -8.217700e+02 3.162800e+02\n14 541     -1.440200e+02 -3.477700e+02\n0 542     -1.008300e+02 5.394700e+02\n1 542     2.822700e+02 5.737900e+02\n4 542     4.382001e+01 -3.037200e+02\n8 542     -2.403300e+02 2.312800e+02\n11 542     5.671997e+01 -2.332500e+02\n0 543     -4.011300e+02 3.989200e+02\n1 543     -4.965002e+01 5.070600e+02\n2 543     -6.882600e+02 1.354100e+02\n7 543     -6.175900e+02 4.183500e+02\n10 543     -6.197100e+02 5.801700e+02\n11 543     -2.082900e+02 -3.549000e+02\n13 543     -1.289600e+02 6.503003e+01\n14 543     -8.060999e+01 -3.482800e+02\n0 544     -4.982000e+02 3.835000e+02\n1 544     -1.459800e+02 5.148000e+02\n5 544     -9.604999e+01 -2.696000e+02\n8 544     -5.709600e+02 7.414001e+01\n11 544     -2.940700e+02 -3.673900e+02\n0 545     -4.569700e+02 3.903600e+02\n1 545     -1.047500e+02 5.120500e+02\n4 545     -1.188000e+01 -9.303998e+01\n5 545     -5.428003e+01 -2.634700e+02\n8 545     -5.336000e+02 8.276999e+01\n11 545     -2.574400e+02 -3.614600e+02\n12 545     -8.107400e+02 3.063600e+02\n14 545     -1.358700e+02 -3.571000e+02\n0 546     3.194000e+01 5.193000e+02\n1 546     4.153800e+02 5.212200e+02\n2 546     -2.631100e+02 2.825200e+02\n3 546     -3.947100e+02 -4.965002e+01\n4 546     2.428998e+01 -3.809200e+02\n6 546     -4.465700e+02 5.532000e+02\n8 546     -1.370800e+02 2.162500e+02\n9 546     -3.762700e+02 3.109200e+02\n11 546     1.745200e+02 -2.462600e+02\n12 546     -2.731500e+02 5.361000e+02\n14 546     3.441600e+02 -2.148400e+02\n0 547     -4.891998e+01 4.394900e+02\n1 547     3.084700e+02 4.608700e+02\n2 547     -3.223600e+02 1.981800e+02\n5 547     3.609000e+02 -2.136300e+02\n6 547     -5.122600e+02 4.346400e+02\n7 547     -2.648800e+02 5.019600e+02\n11 547     1.040900e+02 -3.180600e+02\n12 547     -3.418800e+02 4.341300e+02\n14 547     2.724800e+02 -2.998300e+02\n0 548     -1.768800e+02 4.582700e+02\n1 548     1.850900e+02 5.110500e+02\n2 548     -4.577200e+02 2.103000e+02\n5 548     2.285500e+02 -1.950100e+02\n7 548     -3.963800e+02 5.060800e+02\n8 548     -2.967100e+02 1.554600e+02\n11 548     -1.025000e+01 -3.035300e+02\n12 548     -4.918500e+02 4.335800e+02\n13 548     5.065997e+01 1.252900e+02\n14 548     1.422700e+02 -2.836500e+02\n0 549     5.390015e+00 3.832700e+02\n1 549     3.533000e+02 3.895000e+02\n2 549     -2.765800e+02 1.224500e+02\n5 549     4.056700e+02 -2.752800e+02\n6 549     -4.512600e+02 3.694600e+02\n7 549     -2.063100e+02 4.484400e+02\n8 549     -1.478700e+02 8.979999e+01\n12 549     -2.773200e+02 3.706700e+02\n14 549     3.191000e+02 -3.597800e+02\n0 550     5.237000e+01 5.637500e+02\n1 550     4.486700e+02 5.619300e+02\n2 550     -2.488100e+02 3.316800e+02\n5 550     4.573600e+02 -8.179999e+01\n6 550     -4.327800e+02 6.141300e+02\n8 550     -1.255200e+02 2.556300e+02\n9 550     -3.661500e+02 3.549600e+02\n11 550     1.906600e+02 -2.075200e+02\n12 550     -2.591900e+02 5.910700e+02\n13 550     2.302500e+02 2.261900e+02\n14 550     3.628700e+02 -1.694600e+02\n0 551     1.263600e+02 4.268900e+02\n1 551     4.918000e+02 4.020300e+02\n3 551     -3.057800e+02 -1.548400e+02\n4 551     -3.802002e+01 -4.330699e+02\n7 551     -9.548999e+01 5.055300e+02\n9 551     -2.909700e+02 2.216400e+02\n11 551     2.660699e+02 -3.240500e+02\n12 551     -1.565400e+02 4.398100e+02\n0 552     3.608002e+01 1.054400e+02\n1 552     2.304399e+02 1.210100e+02\n2 552     1.329700e+02 1.242800e+02\n3 552     3.846002e+01 -1.920000e+02\n4 552     -2.061300e+02 -4.390800e+02\n5 552     6.608900e+02 -5.508600e+02\n6 552     -4.365002e+01 1.435800e+02\n7 552     -6.953003e+01 2.221000e+02\n10 552     -6.265997e+01 2.672000e+02\n13 552     3.862700e+02 -1.309300e+02\n15 552     8.900146e-01 2.860300e+02\n0 553     -1.206500e+02 1.614100e+02\n1 553     1.500699e+02 2.075200e+02\n7 553     -2.842000e+02 2.172100e+02\n13 553     1.355600e+02 -1.237800e+02\n0 554     7.070001e+01 5.805800e+02\n1 554     4.725800e+02 5.748500e+02\n2 554     -2.337300e+02 3.499000e+02\n4 554     5.732001e+01 -4.095100e+02\n5 554     4.752100e+02 -6.465997e+01\n6 554     -4.156600e+02 6.390400e+02\n8 554     -1.131000e+02 2.706000e+02\n9 554     -3.539400e+02 3.711100e+02\n11 554     2.058000e+02 -1.928300e+02\n12 554     -2.432100e+02 6.117600e+02\n13 554     2.443500e+02 2.417200e+02\n14 554     3.800900e+02 -1.513900e+02\n0 555     -1.956000e+02 4.695900e+02\n1 555     1.686600e+02 5.268000e+02\n2 555     -4.775600e+02 2.246000e+02\n4 555     1.121997e+01 -2.432300e+02\n5 555     2.107800e+02 -1.831400e+02\n7 555     -4.172400e+02 5.157300e+02\n11 555     -2.613000e+01 -2.939200e+02\n12 555     -5.156600e+02 4.444500e+02\n0 556     -1.917999e+01 8.673001e+01\n1 556     1.730800e+02 1.178200e+02\n3 556     -1.579999e+01 -2.289400e+02\n4 556     -2.131000e+02 -3.956300e+02\n5 556     5.946801e+02 -5.749000e+02\n6 556     -1.054600e+02 1.022300e+02\n7 556     -1.239300e+02 1.930300e+02\n8 556     9.547998e+01 2.754001e+01\n10 556     -1.250500e+02 2.401600e+02\n12 556     -8.151001e+01 1.576000e+02\n13 556     3.374700e+02 -1.515700e+02\n0 557     2.509003e+01 5.230300e+02\n1 557     4.084000e+02 5.268300e+02\n2 557     -2.695500e+02 2.857600e+02\n3 557     -4.012600e+02 -4.663000e+01\n4 557     2.638000e+01 -3.768300e+02\n5 557     4.304399e+02 -1.250500e+02\n6 557     -4.549300e+02 5.558300e+02\n8 557     -1.425400e+02 2.188200e+02\n9 557     -3.818800e+02 3.137000e+02\n11 557     1.675000e+02 -2.435500e+02\n14 557     3.370900e+02 -2.117800e+02\n0 558     -3.481000e+01 5.014200e+02\n1 558     3.412900e+02 5.196000e+02\n3 558     -4.534900e+02 -6.959003e+01\n4 558     1.802002e+01 -3.394800e+02\n5 558     3.705900e+02 -1.482200e+02\n6 558     -5.186000e+02 5.168800e+02\n7 558     -2.610600e+02 5.660600e+02\n11 558     1.160900e+02 -2.635600e+02\n12 558     -3.422500e+02 5.062600e+02\n0 559     -4.938000e+01 4.495500e+02\n1 559     3.104900e+02 4.711700e+02\n2 559     -3.242000e+02 2.101100e+02\n4 559     -1.002002e+01 -3.280900e+02\n5 559     3.605500e+02 -2.028200e+02\n6 559     -5.150400e+02 4.482100e+02\n7 559     -2.669000e+02 5.121800e+02\n8 559     -1.881200e+02 1.572000e+02\n11 559     1.031500e+02 -3.091700e+02\n12 559     -3.443700e+02 4.462500e+02\n13 559     1.570100e+02 1.251100e+02\n14 559     2.718700e+02 -2.892000e+02\n0 560     -9.952002e+01 1.833200e+02\n1 560     1.787000e+02 2.228000e+02\n8 560     -1.622400e+02 -6.032001e+01\n0 561     7.403003e+01 1.030400e+02\n1 561     2.657700e+02 1.082000e+02\n2 561     1.751800e+02 1.329300e+02\n5 561     7.065400e+02 -5.532500e+02\n6 561     1.979980e+00 1.530800e+02\n7 561     -3.048999e+01 2.265400e+02\n8 561     1.782900e+02 6.441000e+01\n10 561     -1.757001e+01 2.685800e+02\n12 561     2.723999e+01 2.067000e+02\n15 561     5.216998e+01 2.881000e+02\n0 562     3.609998e+01 6.625000e+01\n1 562     2.163400e+02 8.317001e+01\n2 562     1.568500e+02 9.460999e+01\n4 562     -2.316100e+02 -4.409600e+02\n5 562     6.733900e+02 -5.945800e+02\n6 562     -2.140002e+01 1.026000e+02\n7 562     -6.109998e+01 1.844900e+02\n9 562     1.742999e+01 1.695400e+02\n10 562     -5.813000e+01 2.212400e+02\n12 562     -1.979980e+00 1.571700e+02\n13 562     3.951100e+02 -1.629200e+02\n15 562     5.119995e+00 2.326000e+02\n0 563     1.157400e+02 4.487000e+01\n1 563     2.854900e+02 3.939001e+01\n4 563     -2.559400e+02 -5.055500e+02\n6 563     8.058002e+01 1.069400e+02\n9 563     9.765997e+01 1.769100e+02\n12 563     1.012000e+02 1.587400e+02\n15 563     1.160700e+02 2.142300e+02\n0 564     1.941998e+01 5.519300e+02\n1 564     4.115200e+02 5.649100e+02\n3 564     -4.081900e+02 -1.446997e+01\n5 564     4.249000e+02 -9.587000e+01\n6 564     -4.674000e+02 5.918600e+02\n0 565     7.039001e+01 8.942001e+01\n1 565     2.572100e+02 9.603000e+01\n2 565     1.819600e+02 1.245900e+02\n3 565     8.596002e+01 -1.907900e+02\n4 565     -2.189200e+02 -4.679100e+02\n5 565     7.090400e+02 -5.654000e+02\n6 565     6.950012e+00 1.403100e+02\n7 565     -3.088000e+01 2.131000e+02\n8 565     1.827700e+02 5.714001e+01\n9 565     3.846997e+01 1.944600e+02\n10 565     -2.104999e+01 2.520400e+02\n12 565     3.012000e+01 1.925500e+02\n13 565     4.218900e+02 -1.407800e+02\n15 565     4.900000e+01 2.692500e+02\n0 566     -1.444000e+01 5.471997e+01\n1 566     1.662400e+02 8.576001e+01\n2 566     9.942999e+01 6.292999e+01\n3 566     9.919983e+00 -2.511800e+02\n4 566     -2.343500e+02 -3.999400e+02\n5 566     6.099000e+02 -6.105601e+02\n6 566     -8.154999e+01 6.983002e+01\n7 566     -1.118100e+02 1.629800e+02\n8 566     1.133500e+02 6.609985e+00\n10 566     -1.161000e+02 2.032000e+02\n12 566     -6.216998e+01 1.253600e+02\n13 566     3.484800e+02 -1.780200e+02\n15 566     -6.113000e+01 2.094700e+02\n0 567     3.792999e+01 2.900000e+01\n1 567     2.056300e+02 4.620001e+01\n3 567     8.569000e+01 -2.484700e+02\n7 567     -5.150000e+01 1.486300e+02\n9 567     3.784003e+01 1.442000e+02\n10 567     -5.265997e+01 1.784700e+02\n13 567     4.039600e+02 -1.936400e+02\n15 567     1.239001e+01 1.817900e+02\n0 568     1.026900e+02 7.578003e+01\n1 568     2.832300e+02 7.342999e+01\n3 568     1.239700e+02 -1.920700e+02\n4 568     -2.325300e+02 -4.938900e+02\n5 568     7.517700e+02 -5.809100e+02\n6 568     5.107001e+01 1.352100e+02\n7 568     4.369995e+00 2.058200e+02\n8 568     2.162300e+02 5.404999e+01\n10 568     1.753998e+01 2.395100e+02\n12 568     7.376001e+01 1.877800e+02\n13 568     4.528700e+02 -1.485500e+02\n15 568     9.434998e+01 2.545600e+02\n0 569     1.609985e+00 7.213000e+01\n1 569     1.873101e+02 9.810999e+01\n3 569     2.271997e+01 -2.296200e+02\n4 569     -2.244900e+02 -4.132700e+02\n6 569     -6.921002e+01 9.544000e+01\n7 569     -9.779999e+01 1.832700e+02\n8 569     1.244100e+02 2.489999e+01\n9 569     -1.792999e+01 1.594300e+02\n10 569     -9.853003e+01 2.249000e+02\n12 569     -4.794000e+01 1.506300e+02\n13 569     3.616600e+02 -1.620700e+02\n15 569     -4.107001e+01 2.354200e+02\n0 570     4.410999e+01 5.340002e+01\n1 570     2.194000e+02 6.816998e+01\n2 570     1.715000e+02 8.733002e+01\n3 570     7.865002e+01 -2.262600e+02\n4 570     -2.408400e+02 -4.476100e+02\n5 570     6.855400e+02 -6.084000e+02\n6 570     -6.119995e+00 9.237000e+01\n7 570     -5.010999e+01 1.737700e+02\n8 570     1.722700e+02 2.504001e+01\n9 570     3.320001e+01 1.637000e+02\n10 570     -4.773999e+01 2.078000e+02\n12 570     1.252002e+01 1.466200e+02\n13 570     4.042300e+02 -1.719700e+02\n15 570     1.775000e+01 2.162000e+02\n0 571     7.944000e+01 4.854999e+01\n1 571     2.512700e+02 5.371002e+01\n3 571     1.181200e+02 -2.191300e+02\n4 571     -2.484500e+02 -4.757700e+02\n6 571     3.865002e+01 9.909003e+01\n7 571     -1.327002e+01 1.753400e+02\n8 571     2.075100e+02 2.964001e+01\n9 571     6.487000e+01 1.707300e+02\n10 571     -6.549988e+00 2.055800e+02\n12 571     5.719000e+01 1.523100e+02\n13 571     4.380200e+02 -1.732000e+02\n15 571     6.600000e+01 2.143800e+02\n0 572     7.039978e+00 2.109998e+01\n1 572     1.748199e+02 4.696997e+01\n3 572     5.345001e+01 -2.680400e+02\n4 572     -2.585100e+02 -4.177800e+02\n7 572     -8.228998e+01 1.348800e+02\n13 572     3.751500e+02 -2.032600e+02\n15 572     -2.803003e+01 1.667700e+02\n0 573     1.507300e+02 1.984003e+01\n1 573     3.117600e+02 4.469971e+00\n2 573     2.973600e+02 8.327002e+01\n3 573     1.964700e+02 -2.270100e+02\n4 573     -2.778700e+02 -5.339200e+02\n7 573     6.282001e+01 1.589100e+02\n8 573     2.759400e+02 2.151001e+01\n10 573     7.906000e+01 1.793600e+02\n12 573     1.492100e+02 1.415800e+02\n13 573     5.044000e+02 -1.914600e+02\n15 573     1.671500e+02 1.852300e+02\n0 574     2.055500e+02 5.421600e+02\n1 574     6.089301e+02 5.023400e+02\n2 574     -1.110600e+02 3.083800e+02\n3 574     -2.502400e+02 -2.651001e+01\n4 574     2.548999e+01 -4.936200e+02\n5 574     6.075601e+02 -1.001700e+02\n6 574     -2.628300e+02 6.182300e+02\n11 574     3.290601e+02 -2.195300e+02\n12 574     -9.571997e+01 5.874900e+02\n13 574     3.511100e+02 2.172900e+02\n14 574     5.105800e+02 -1.840500e+02\n0 575     3.303998e+01 4.507001e+01\n1 575     2.062400e+02 6.334998e+01\n3 575     7.388000e+01 -2.369600e+02\n6 575     -1.365997e+01 7.934998e+01\n8 575     1.676600e+02 1.619000e+01\n10 575     -6.000000e+01 1.953300e+02\n12 575     3.669983e+00 1.337500e+02\n15 575     3.859985e+00 2.023300e+02\n0 576     -1.535999e+01 9.692001e+01\n1 576     1.803400e+02 1.264200e+02\n2 576     7.331000e+01 9.742999e+01\n3 576     -1.921002e+01 -2.195000e+02\n4 576     -2.056600e+02 -3.978800e+02\n5 576     5.963500e+02 -5.619600e+02\n6 576     -1.068600e+02 1.152800e+02\n7 576     -1.223500e+02 2.044800e+02\n8 576     9.410999e+01 3.632001e+01\n10 576     -1.214900e+02 2.528000e+02\n12 576     -8.152002e+01 1.702100e+02\n13 576     3.381899e+02 -1.427700e+02\n15 576     -6.757001e+01 2.672100e+02\n0 577     3.095001e+01 8.842001e+01\n1 577     2.188500e+02 1.053700e+02\n2 577     1.365000e+02 1.085400e+02\n3 577     4.559003e+01 -2.054200e+02\n4 577     -2.170600e+02 -4.346600e+02\n5 577     6.564399e+02 -5.725100e+02\n6 577     -4.238000e+01 1.217700e+02\n7 577     -7.359998e+01 2.026400e+02\n8 577     1.447300e+02 4.373001e+01\n12 577     -2.019000e+01 1.760500e+02\n13 577     3.848400e+02 -1.454800e+02\n15 577     -6.869995e+00 2.597400e+02\n0 578     6.796002e+01 6.481000e+01\n1 578     2.442700e+02 7.279999e+01\n7 578     -2.856000e+01 1.896800e+02\n8 578     1.905700e+02 3.926999e+01\n10 578     -1.881000e+01 2.233800e+02\n13 578     4.241400e+02 -1.607700e+02\n15 578     4.823999e+01 2.346200e+02\n0 579     8.539001e+01 3.290002e+01\n1 579     2.520400e+02 3.616998e+01\n2 579     2.255699e+02 8.267999e+01\n3 579     1.305600e+02 -2.294400e+02\n4 579     -2.591100e+02 -4.806300e+02\n6 579     5.116998e+01 8.528003e+01\n7 579     -4.030029e+00 1.611700e+02\n8 579     2.157700e+02 2.029999e+01\n9 579     7.647998e+01 1.617000e+02\n10 579     2.030029e+00 1.885200e+02\n12 579     6.900000e+01 1.379400e+02\n13 579     4.452700e+02 -1.849200e+02\n15 579     7.621002e+01 1.939700e+02\n0 580     7.778998e+01 5.818400e+02\n1 580     4.803800e+02 5.744400e+02\n2 580     -2.271600e+02 3.513100e+02\n3 580     -3.593700e+02 1.658002e+01\n4 580     5.776001e+01 -4.142200e+02\n5 580     4.822900e+02 -6.301001e+01\n6 580     -4.079500e+02 6.425800e+02\n8 580     -1.076000e+02 2.718700e+02\n9 580     -3.484900e+02 3.727500e+02\n11 580     2.119400e+02 -1.915900e+02\n12 580     -2.356100e+02 6.146700e+02\n13 580     2.499100e+02 2.428100e+02\n14 580     3.868600e+02 -1.500600e+02\n0 581     2.610999e+01 5.411000e+02\n1 581     4.146000e+02 5.451100e+02\n2 581     -2.701000e+02 3.061600e+02\n3 581     -4.012800e+02 -2.577002e+01\n4 581     3.695001e+01 -3.791100e+02\n5 581     4.316700e+02 -1.065600e+02\n6 581     -4.571300e+02 5.791800e+02\n8 581     -1.427000e+02 2.348900e+02\n9 581     -3.832600e+02 3.317300e+02\n11 581     1.678900e+02 -2.275700e+02\n12 581     -2.832000e+02 5.597500e+02\n13 581     2.101600e+02 2.060600e+02\n14 581     3.383400e+02 -1.924800e+02\n0 582     2.271000e+02 1.054400e+02\n1 582     4.225300e+02 6.519000e+01\n15 582     2.623300e+02 3.124100e+02\n0 583     -5.793600e+02 3.882700e+02\n1 583     -2.205000e+02 5.380100e+02\n5 583     -1.750600e+02 -2.621100e+02\n7 583     -8.069700e+02 3.865000e+02\n11 583     -3.632600e+02 -3.609200e+02\n13 583     -2.725700e+02 4.937000e+01\n14 583     -2.571000e+02 -3.587600e+02\n0 584     -5.149600e+02 3.289400e+02\n1 584     -1.738800e+02 4.669800e+02\n4 584     -4.065997e+01 -5.652002e+01\n5 584     -1.211800e+02 -3.285100e+02\n8 584     -5.866800e+02 1.710999e+01\n10 584     -7.506200e+02 4.843000e+02\n11 584     -3.125800e+02 -4.151400e+02\n13 584     -2.237500e+02 -3.599854e-01\n14 584     -2.024700e+02 -4.242000e+02\n15 584     -7.774900e+02 5.195800e+02\n0 585     -2.889200e+02 3.896000e+02\n1 585     5.688000e+01 4.700500e+02\n4 585     -2.602002e+01 -1.840600e+02\n5 585     1.125500e+02 -2.679000e+02\n7 585     -5.006300e+02 4.216800e+02\n8 585     -3.861100e+02 8.720001e+01\n11 585     -1.102300e+02 -3.643400e+02\n12 585     -6.083600e+02 3.327600e+02\n13 585     -3.898999e+01 6.107001e+01\n14 585     2.903003e+01 -3.581400e+02\n0 586     -2.799800e+02 3.830700e+02\n1 586     6.433002e+01 4.622200e+02\n2 586     -5.588900e+02 1.169100e+02\n4 586     -3.084003e+01 -1.881000e+02\n5 586     1.209300e+02 -2.748400e+02\n7 586     -4.903900e+02 4.156700e+02\n8 586     -3.781400e+02 8.028000e+01\n10 586     -4.681900e+02 5.702400e+02\n11 586     -1.021500e+02 -3.699500e+02\n12 586     -5.965900e+02 3.253500e+02\n13 586     -3.183002e+01 5.600000e+01\n14 586     3.748999e+01 -3.651700e+02\n0 587     -3.774600e+02 3.310200e+02\n1 587     -4.258002e+01 4.361100e+02\n4 587     -5.178003e+01 -1.294700e+02\n5 587     1.709998e+01 -3.303200e+02\n7 587     -5.831500e+02 3.483100e+02\n8 587     -4.617200e+02 2.410999e+01\n10 587     -5.799100e+02 4.981800e+02\n11 587     -1.907400e+02 -4.154000e+02\n13 587     -1.118200e+02 6.289978e+00\n14 587     -6.416998e+01 -4.227600e+02\n15 587     -5.841700e+02 5.399800e+02\n0 588     2.557001e+01 5.648800e+02\n1 588     4.199500e+02 5.696700e+02\n2 588     -2.729100e+02 3.319400e+02\n3 588     -4.030300e+02 -3.599854e-01\n4 588     5.096002e+01 -3.808900e+02\n5 588     4.316100e+02 -8.154999e+01\n6 588     -4.624800e+02 6.106200e+02\n8 588     -1.449500e+02 2.565600e+02\n11 588     1.664800e+02 -2.077000e+02\n12 588     -2.879500e+02 5.879400e+02\n13 588     2.093600e+02 2.256400e+02\n14 588     3.375601e+02 -1.689700e+02\n0 589     4.678003e+01 5.680100e+02\n1 589     4.444800e+02 5.677700e+02\n3 589     -3.880000e+02 2.250000e+00\n5 589     4.538199e+02 -7.759998e+01\n8 589     -1.304000e+02 2.593000e+02\n11 589     1.869200e+02 -2.039300e+02\n12 589     -2.667600e+02 5.942700e+02\n0 590     2.721002e+01 5.561300e+02\n1 590     4.193500e+02 5.602600e+02\n2 590     -2.702300e+02 3.234500e+02\n4 590     4.588000e+01 -3.810200e+02\n5 590     4.329301e+02 -9.044000e+01\n6 590     -4.589800e+02 5.998600e+02\n8 590     -1.430400e+02 2.488700e+02\n11 590     1.678900e+02 -2.150400e+02\n12 590     -2.849700e+02 5.781800e+02\n13 590     2.108300e+02 2.187200e+02\n14 590     3.392900e+02 -1.775100e+02\n0 591     -5.142500e+02 3.236000e+02\n1 591     -1.745700e+02 4.620900e+02\n5 591     -1.210000e+02 -3.336200e+02\n7 591     -7.263000e+02 3.241100e+02\n8 591     -5.860600e+02 1.181000e+01\n10 591     -7.487800e+02 4.780600e+02\n11 591     -3.132700e+02 -4.195800e+02\n13 591     -2.233700e+02 -4.969971e+00\n14 591     -2.025100e+02 -4.298000e+02\n15 591     -7.754600e+02 5.123000e+02\n0 592     -3.440600e+02 3.319400e+02\n1 592     -1.044000e+01 4.287400e+02\n4 592     -5.407001e+01 -1.477400e+02\n5 592     5.077002e+01 -3.296000e+02\n7 592     -5.488900e+02 3.539500e+02\n8 592     -4.322200e+02 2.738000e+01\n10 592     -5.393300e+02 5.023300e+02\n11 592     -1.611800e+02 -4.151300e+02\n13 592     -8.526001e+01 8.799988e+00\n14 592     -3.089001e+01 -4.212200e+02\n15 592     -5.380900e+02 5.458500e+02\n0 593     -4.308100e+02 4.647000e+02\n1 593     -6.392999e+01 5.775500e+02\n2 593     -7.207500e+02 2.192800e+02\n5 593     -1.989001e+01 -1.854100e+02\n7 593     -6.588900e+02 4.855600e+02\n14 593     -1.022500e+02 -2.788100e+02\n0 594     -5.400900e+02 4.395200e+02\n1 594     -1.726000e+02 5.776900e+02\n5 594     -1.287400e+02 -2.091000e+02\n7 594     -7.722000e+02 4.468200e+02\n14 594     -2.113400e+02 -3.050100e+02\n0 595     -5.400900e+02 4.395200e+02\n1 595     -1.726000e+02 5.776900e+02\n5 595     -1.287400e+02 -2.091000e+02\n7 595     -7.722000e+02 4.468200e+02\n14 595     -2.113400e+02 -3.050100e+02\n0 596     -4.976700e+02 4.130600e+02\n1 596     -1.389500e+02 5.431100e+02\n10 596     -7.432600e+02 5.906200e+02\n0 597     -4.260000e+02 4.130900e+02\n1 597     -7.048999e+01 5.266300e+02\n2 597     -7.154000e+02 1.535600e+02\n7 597     -6.459800e+02 4.308200e+02\n10 597     -6.532000e+02 5.958600e+02\n13 597     -1.483300e+02 7.628998e+01\n14 597     -1.035600e+02 -3.330900e+02\n0 598     -5.227700e+02 2.777700e+02\n1 598     -1.923900e+02 4.201800e+02\n5 598     -1.369700e+02 -3.847900e+02\n7 598     -7.279000e+02 2.733000e+02\n10 598     -7.518400e+02 4.209100e+02\n11 598     -3.237200e+02 -4.606000e+02\n13 598     -2.323000e+02 -4.607001e+01\n14 598     -2.173500e+02 -4.814000e+02\n0 599     -5.171400e+02 3.709500e+02\n1 599     -1.664300e+02 5.075700e+02\n7 599     -7.365900e+02 3.748800e+02\n10 599     -7.601400e+02 5.362900e+02\n11 599     -3.112400e+02 -3.771000e+02\n13 599     -2.233400e+02 3.629999e+01\n14 599     -1.986000e+02 -3.778700e+02\n15 599     -7.887000e+02 5.784900e+02\n0 600     -4.552000e+02 2.017200e+02\n1 600     -1.497400e+02 3.323300e+02\n7 600     -6.428900e+02 2.034800e+02\n0 601     -4.556200e+02 1.969700e+02\n1 601     -1.517100e+02 3.280600e+02\n13 601     -1.727300e+02 -1.147100e+02\n0 602     -4.624600e+02 4.106200e+02\n1 602     -1.056500e+02 5.327800e+02\n4 602     -5.900269e-01 -9.360999e+01\n5 602     -5.690002e+01 -2.413900e+02\n8 602     -5.383400e+02 1.034900e+02\n10 602     -6.977500e+02 5.903700e+02\n11 602     -2.610600e+02 -3.438700e+02\n12 602     -8.203300e+02 3.317700e+02\n13 602     -1.775900e+02 7.315997e+01\n14 602     -1.392400e+02 -3.353000e+02\n0 603     -4.354500e+02 4.158500e+02\n1 603     -7.870001e+01 5.317500e+02\n2 603     -7.262200e+02 1.581800e+02\n4 603     2.700195e-01 -1.082400e+02\n5 603     -2.975000e+01 -2.362500e+02\n8 603     -5.136800e+02 1.095800e+02\n10 603     -6.655100e+02 5.991200e+02\n11 603     -2.373800e+02 -3.397100e+02\n12 603     -7.876600e+02 3.430400e+02\n0 604     -5.024300e+02 3.910900e+02\n1 604     -1.481100e+02 5.231400e+02\n4 604     -8.030029e+00 -7.071002e+01\n5 604     -9.894000e+01 -2.616700e+02\n7 604     -7.234300e+02 3.981200e+02\n8 604     -5.746000e+02 8.232999e+01\n10 604     -7.454900e+02 5.626000e+02\n11 604     -2.969800e+02 -3.603800e+02\n13 604     -2.104800e+02 5.435999e+01\n14 604     -1.810000e+02 -3.565500e+02\n0 605     -5.680000e+02 3.908800e+02\n1 605     -2.094100e+02 5.379300e+02\n5 605     -1.635600e+02 -2.595400e+02\n7 605     -7.947800e+02 3.905500e+02\n10 605     -8.292000e+02 5.579800e+02\n0 606     -3.654200e+02 4.007100e+02\n1 606     -1.490002e+01 5.004100e+02\n2 606     -6.497700e+02 1.380200e+02\n7 606     -5.810300e+02 4.243600e+02\n8 606     -4.504800e+02 9.551999e+01\n10 606     -5.779200e+02 5.851800e+02\n13 606     -1.000700e+02 6.804999e+01\n14 606     -4.532001e+01 -3.462600e+02\n0 607     1.865601e+02 -9.316998e+01\n1 607     3.145500e+02 -1.187900e+02\n6 607     1.999100e+02 -2.473999e+01\n7 607     1.155800e+02 5.270001e+01\n8 607     3.324300e+02 -7.071002e+01\n10 607     1.319300e+02 5.269000e+01\n13 607     5.474600e+02 -2.871800e+02\n15 607     2.305900e+02 3.558002e+01\n0 608     -3.446600e+02 3.363900e+02\n1 608     -9.890015e+00 4.331600e+02\n5 608     5.052002e+01 -3.244700e+02\n7 608     -5.498500e+02 3.586700e+02\n8 608     -4.326700e+02 3.176001e+01\n10 608     -5.409400e+02 5.076200e+02\n11 608     -1.621200e+02 -4.112100e+02\n12 608     -6.650200e+02 2.562900e+02\n13 608     -8.510999e+01 1.278998e+01\n15 608     -5.395800e+02 5.520000e+02\n0 609     -5.005100e+02 3.237300e+02\n1 609     -1.615500e+02 4.586100e+02\n5 609     -1.076900e+02 -3.344200e+02\n7 609     -7.114800e+02 3.257900e+02\n8 609     -5.733700e+02 1.188000e+01\n10 609     -7.320300e+02 4.792400e+02\n11 609     -3.006600e+02 -4.194300e+02\n13 609     -2.122600e+02 -4.419983e+00\n14 609     -1.886700e+02 -4.299300e+02\n15 609     -7.561000e+02 5.140500e+02\n0 610     -4.685500e+02 4.039200e+02\n1 610     -1.131500e+02 5.276600e+02\n5 610     -6.415002e+01 -2.482700e+02\n10 610     -7.047200e+02 5.810800e+02\n14 610     -1.461400e+02 -3.430100e+02\n0 611     -5.519600e+02 3.035600e+02\n1 611     -2.142500e+02 4.517200e+02\n5 611     -1.624900e+02 -3.550800e+02\n10 611     -7.932000e+02 4.498000e+02\n11 611     -3.476600e+02 -4.359100e+02\n14 611     -2.436600e+02 -4.522100e+02\n15 611     -8.247600e+02 4.787800e+02\n0 612     -5.401500e+02 2.888500e+02\n1 612     -2.064600e+02 4.352300e+02\n4 612     -6.025000e+01 -3.829999e+01\n5 612     -1.528700e+02 -3.716800e+02\n7 612     -7.485700e+02 2.832800e+02\n11 612     -3.385700e+02 -4.503300e+02\n13 612     -2.465900e+02 -3.690997e+01\n14 612     -2.337400e+02 -4.683700e+02\n15 612     -8.052400e+02 4.600000e+02\n0 613     -3.646500e+02 3.746500e+02\n1 613     -2.015002e+01 4.748400e+02\n2 613     -6.482100e+02 1.046700e+02\n5 613     3.537000e+01 -2.823300e+02\n7 613     -5.761100e+02 3.969300e+02\n8 613     -4.513700e+02 6.984000e+01\n11 613     -1.774100e+02 -3.767500e+02\n12 613     -6.949700e+02 3.014200e+02\n13 613     -1.002700e+02 4.540002e+01\n14 613     -4.712000e+01 -3.743500e+02\n0 614     -4.300400e+02 4.097000e+02\n1 614     -7.484998e+01 5.237200e+02\n4 614     -5.309998e+00 -1.107800e+02\n5 614     -2.490002e+01 -2.437900e+02\n7 614     -6.494900e+02 4.266500e+02\n8 614     -5.079200e+02 9.957001e+01\n0 615     -4.683500e+02 3.882400e+02\n1 615     -1.164100e+02 5.128400e+02\n4 615     -1.216998e+01 -8.788000e+01\n5 615     -6.625000e+01 -2.653200e+02\n8 615     -5.439000e+02 8.035001e+01\n10 615     -7.020500e+02 5.619400e+02\n11 615     -2.681100e+02 -3.631500e+02\n13 615     -1.835100e+02 5.333002e+01\n14 615     -1.483000e+02 -3.595800e+02\n0 616     -4.407600e+02 3.353003e+01\n1 616     -1.953500e+02 1.731700e+02\n2 616     -6.029200e+02 -2.553000e+02\n10 616     -6.158400e+02 1.350900e+02\n15 616     -6.269900e+02 1.212000e+02\n0 617     -5.401500e+02 2.888500e+02\n1 617     -2.064600e+02 4.352300e+02\n7 617     -7.485700e+02 2.832800e+02\n14 617     -2.337400e+02 -4.683700e+02\n15 617     -8.052400e+02 4.600000e+02\n0 618     -5.082700e+02 3.918700e+02\n1 618     -1.534800e+02 5.253800e+02\n7 618     -7.301700e+02 3.985100e+02\n8 618     -5.805700e+02 8.282001e+01\n10 618     -7.530300e+02 5.632900e+02\n11 618     -3.021800e+02 -3.592200e+02\n0 619     -5.212800e+02 2.832400e+02\n1 619     -1.902800e+02 4.253700e+02\n5 619     -1.347700e+02 -3.785000e+02\n7 619     -7.275500e+02 2.795400e+02\n8 619     -5.930600e+02 -3.173999e+01\n10 619     -7.511600e+02 4.275200e+02\n11 619     -3.223800e+02 -4.554400e+02\n13 619     -2.313500e+02 -4.097998e+01\n14 619     -2.157200e+02 -4.750300e+02\n15 619     -7.775000e+02 4.544100e+02\n0 620     -2.902500e+02 7.341998e+01\n1 620     -4.297998e+01 1.702100e+02\n7 620     -4.368900e+02 1.057600e+02\n15 620     -4.256900e+02 1.961000e+02\n0 621     -3.904400e+02 4.214000e+02\n1 621     -3.445001e+01 5.263900e+02\n2 621     -6.771600e+02 1.643400e+02\n5 621     1.521002e+01 -2.313600e+02\n7 621     -6.100000e+02 4.437400e+02\n8 621     -4.747500e+02 1.157600e+02\n10 621     -6.100600e+02 6.092000e+02\n12 621     -7.336600e+02 3.572100e+02\n13 621     -1.197300e+02 8.479001e+01\n14 621     -6.816998e+01 -3.244200e+02\n0 622     -2.832000e+02 4.189000e+02\n1 622     6.992999e+01 4.984300e+02\n4 622     -1.022998e+01 -1.902800e+02\n7 622     -4.988100e+02 4.533800e+02\n8 622     -3.825600e+02 1.164700e+02\n11 622     -1.041400e+02 -3.378900e+02\n12 622     -6.068400e+02 3.704600e+02\n13 622     -3.391998e+01 8.742001e+01\n14 622     3.665002e+01 -3.261900e+02\n0 623     -5.375000e+02 3.295800e+02\n1 623     -1.944400e+02 4.731600e+02\n10 623     -7.794900e+02 4.834300e+02\n11 623     -3.318100e+02 -4.129600e+02\n14 623     -2.247800e+02 -4.229700e+02\n15 623     -8.089600e+02 5.177000e+02\n0 624     -5.212800e+02 2.832400e+02\n1 624     -1.902800e+02 4.253700e+02\n5 624     -1.347700e+02 -3.785000e+02\n7 624     -7.275500e+02 2.795400e+02\n8 624     -5.930600e+02 -3.173999e+01\n10 624     -7.511600e+02 4.275200e+02\n11 624     -3.223800e+02 -4.554400e+02\n13 624     -2.313500e+02 -4.097998e+01\n15 624     -7.775000e+02 4.544100e+02\n0 625     -5.014100e+02 3.858100e+02\n1 625     -1.483700e+02 5.179500e+02\n5 625     -9.867999e+01 -2.668900e+02\n7 625     -7.219200e+02 3.926200e+02\n10 625     -7.435400e+02 5.562800e+02\n11 625     -2.965300e+02 -3.647000e+02\n14 625     -1.809800e+02 -3.620700e+02\n0 626     -2.941400e+02 4.484700e+02\n1 626     6.588000e+01 5.296400e+02\n2 626     -5.755900e+02 1.980700e+02\n4 626     6.640015e+00 -1.872500e+02\n5 626     1.130400e+02 -2.048200e+02\n7 626     -5.138400e+02 4.828100e+02\n8 626     -3.925700e+02 1.440700e+02\n11 626     -1.129400e+02 -3.127300e+02\n12 626     -6.243400e+02 4.042900e+02\n0 627     -3.431900e+02 3.499100e+02\n1 627     -5.059998e+00 4.458600e+02\n2 627     -6.242800e+02 7.377002e+01\n8 627     -4.316600e+02 4.560999e+01\n10 627     -5.408600e+02 5.243200e+02\n12 627     -6.648500e+02 2.741300e+02\n13 627     -8.346997e+01 2.465002e+01\n0 628     -4.905800e+02 3.828200e+02\n1 628     -1.387900e+02 5.127800e+02\n5 628     -8.870001e+01 -2.707600e+02\n8 628     -5.640200e+02 7.398001e+01\n10 628     -7.290100e+02 5.533100e+02\n11 628     -2.871500e+02 -3.668900e+02\n14 628     -1.705100e+02 -3.651800e+02\n0 629     -3.421700e+02 4.332100e+02\n1 629     1.506000e+01 5.264900e+02\n2 629     -6.264200e+02 1.783700e+02\n5 629     6.416998e+01 -2.196900e+02\n7 629     -5.614100e+02 4.616800e+02\n8 629     -4.325300e+02 1.288200e+02\n12 629     -6.790700e+02 3.776000e+02\n14 629     -1.990002e+01 -3.116900e+02\n0 630     -5.441000e+02 3.136800e+02\n1 630     -2.046500e+02 4.595100e+02\n5 630     -1.526200e+02 -3.439400e+02\n10 630     -7.854300e+02 4.633500e+02\n13 630     -2.483300e+02 -1.471002e+01\n14 630     -2.339600e+02 -4.405100e+02\n15 630     -8.155700e+02 4.942700e+02\n0 631     -4.262900e+02 4.639000e+02\n1 631     -5.928003e+01 5.755600e+02\n2 631     -7.158900e+02 2.185700e+02\n5 631     -1.469000e+01 -1.857400e+02\n7 631     -6.538800e+02 4.855200e+02\n12 631     -7.845900e+02 4.047800e+02\n14 631     -9.813000e+01 -2.797100e+02\n0 632     5.094000e+01 -8.045001e+01\n1 632     1.849800e+02 -6.440997e+01\n6 632     5.334003e+01 -5.484998e+01\n7 632     -1.956000e+01 4.296002e+01\n8 632     2.182100e+02 -8.522998e+01\n0 633     5.021500e+02 4.105300e+02\n1 633     8.718400e+02 2.911900e+02\n2 633     2.814100e+02 2.977600e+02\n3 633     1.399800e+02 -3.007001e+01\n6 633     1.876000e+02 5.494000e+02\n7 633     2.875200e+02 5.518200e+02\n8 633     2.988600e+02 2.235200e+02\n9 633     9.453003e+01 3.428700e+02\n11 633     6.070900e+02 -3.202500e+02\n12 633     2.976700e+02 5.388000e+02\n0 634     4.682200e+02 3.330700e+02\n1 634     8.108700e+02 2.167900e+02\n2 634     2.598800e+02 2.067600e+02\n6 634     1.613900e+02 4.494200e+02\n7 634     2.638000e+02 4.702700e+02\n10 634     4.220000e+02 5.841700e+02\n11 634     5.882600e+02 -3.947600e+02\n12 634     2.743400e+02 4.431800e+02\n13 634     6.297500e+02 6.975000e+01\n14 634     8.678400e+02 -3.783700e+02\n0 635     4.682200e+02 3.330700e+02\n1 635     8.108700e+02 2.167900e+02\n2 635     2.598800e+02 2.067600e+02\n6 635     1.613900e+02 4.494200e+02\n7 635     2.638000e+02 4.702700e+02\n8 635     2.805000e+02 1.505400e+02\n10 635     4.220000e+02 5.841700e+02\n11 635     5.882600e+02 -3.947600e+02\n12 635     2.743400e+02 4.431800e+02\n13 635     6.297500e+02 6.975000e+01\n14 635     8.678400e+02 -3.783700e+02\n0 636     4.679200e+02 3.224200e+02\n1 636     8.067800e+02 2.061000e+02\n6 636     1.623400e+02 4.386900e+02\n7 636     2.649100e+02 4.597900e+02\n8 636     2.819400e+02 1.420300e+02\n10 636     4.212300e+02 5.729600e+02\n12 636     2.746899e+02 4.330500e+02\n13 636     6.286500e+02 6.203998e+01\n14 636     8.673101e+02 -3.882600e+02\n0 637     4.882000e+02 3.473600e+02\n1 637     8.363101e+02 2.270600e+02\n3 637     1.401100e+02 -9.559998e+01\n6 637     1.843000e+02 4.725500e+02\n7 637     2.817500e+02 4.880200e+02\n10 637     4.449000e+02 6.036600e+02\n12 637     2.944399e+02 4.649700e+02\n0 638     5.877200e+02 1.234600e+02\n1 638     8.551100e+02 -3.570001e+01\n3 638     3.571400e+02 -2.153900e+02\n7 638     4.216300e+02 2.972800e+02\n8 638     4.627200e+02 5.251001e+01\n9 638     2.828900e+02 1.805900e+02\n12 638     4.915000e+02 2.787500e+02\n13 638     7.880500e+02 -8.720001e+01\n15 638     7.750200e+02 3.901900e+02\n0 639     1.585100e+02 -3.654999e+01\n1 639     3.020300e+02 -5.360999e+01\n2 639     3.274301e+02 3.060999e+01\n3 639     2.277400e+02 -2.763700e+02\n4 639     -3.212100e+02 -5.413199e+02\n6 639     1.575400e+02 3.084998e+01\n7 639     8.077002e+01 1.048400e+02\n8 639     2.996400e+02 -2.392999e+01\n9 639     1.618600e+02 1.224600e+02\n10 639     9.438000e+01 1.146800e+02\n12 639     1.766900e+02 7.856000e+01\n13 639     5.194100e+02 -2.391600e+02\n15 639     1.851400e+02 1.089200e+02\n0 640     5.766100e+02 1.101300e+02\n1 640     8.394900e+02 -4.678998e+01\n2 640     4.844399e+02 7.721002e+01\n3 640     3.497800e+02 -2.350000e+02\n6 640     3.967700e+02 2.488700e+02\n7 640     4.130400e+02 2.812900e+02\n8 640     4.566700e+02 3.606000e+01\n9 640     2.769200e+02 1.632200e+02\n10 640     5.670300e+02 3.299800e+02\n12 640     4.821200e+02 2.591800e+02\n13 640     7.842500e+02 -1.040000e+02\n15 640     7.616899e+02 3.689500e+02\n0 641     5.701600e+02 9.329001e+01\n1 641     8.273101e+02 -6.288000e+01\n2 641     4.818600e+02 5.610999e+01\n3 641     3.479700e+02 -2.558100e+02\n6 641     3.927200e+02 2.270600e+02\n7 641     4.087900e+02 2.633200e+02\n8 641     4.542900e+02 1.889999e+01\n9 641     2.754100e+02 1.454400e+02\n10 641     5.605900e+02 3.101200e+02\n12 641     4.788400e+02 2.370600e+02\n13 641     7.797500e+02 -1.204000e+02\n15 641     7.546500e+02 3.440800e+02\n0 642     4.958400e+02 3.920000e+02\n1 642     8.592900e+02 2.730200e+02\n2 642     2.779100e+02 2.772900e+02\n3 642     1.371700e+02 -5.009003e+01\n6 642     1.828500e+02 5.262600e+02\n7 642     2.836300e+02 5.326700e+02\n8 642     2.956200e+02 2.069300e+02\n9 642     9.240002e+01 3.248600e+02\n12 642     2.933101e+02 5.170800e+02\n13 642     6.516700e+02 1.229800e+02\n0 643     4.842500e+02 3.829300e+02\n1 643     8.438700e+02 2.659600e+02\n2 643     2.662200e+02 2.631500e+02\n3 643     1.263500e+02 -6.377002e+01\n6 643     1.693200e+02 5.125400e+02\n7 643     2.730500e+02 5.218800e+02\n8 643     2.861600e+02 1.958900e+02\n9 643     8.334003e+01 3.125000e+02\n12 643     2.813000e+02 5.029100e+02\n14 643     8.784600e+02 -3.225800e+02\n0 644     4.962800e+02 3.433800e+02\n1 644     8.436000e+02 2.205000e+02\n2 644     2.901500e+02 2.287300e+02\n3 644     1.502700e+02 -9.609998e+01\n6 644     1.962500e+02 4.691400e+02\n7 644     2.904000e+02 4.850300e+02\n8 644     3.056500e+02 1.671600e+02\n10 644     4.541801e+02 5.995500e+02\n11 644     6.129100e+02 -3.843600e+02\n12 644     3.061500e+02 4.622800e+02\n13 644     6.568199e+02 8.145001e+01\n0 645     5.924900e+02 1.460200e+02\n1 645     8.675601e+02 -1.382001e+01\n2 645     4.932800e+02 1.218000e+02\n3 645     3.563600e+02 -1.915600e+02\n6 645     4.069100e+02 2.951800e+02\n7 645     4.238700e+02 3.192500e+02\n8 645     4.638000e+02 7.163000e+01\n9 645     2.828400e+02 2.009200e+02\n10 645     5.821500e+02 3.736400e+02\n12 645     4.919600e+02 3.041400e+02\n15 645     7.801600e+02 4.214900e+02\n0 646     1.405000e+02 -2.517999e+01\n1 646     2.870100e+02 -3.660999e+01\n2 646     3.065100e+02 3.871002e+01\n3 646     2.084800e+02 -2.687100e+02\n4 646     -3.100700e+02 -5.267800e+02\n7 646     6.106000e+01 1.132900e+02\n8 646     2.830300e+02 -1.809000e+01\n9 646     1.445800e+02 1.283700e+02\n10 646     7.247998e+01 1.258200e+02\n12 646     1.545500e+02 8.571002e+01\n13 646     5.026300e+02 -2.308300e+02\n15 646     1.587800e+02 1.220000e+02\n0 647     2.659973e+00 -7.395001e+01\n1 647     1.424800e+02 -4.412000e+01\n2 647     1.698100e+02 -5.550000e+01\n3 647     8.544000e+01 -3.643000e+02\n4 647     -3.243700e+02 -4.111300e+02\n7 647     -7.090997e+01 3.938000e+01\n8 647     1.677000e+02 -9.425000e+01\n9 647     3.907001e+01 4.341998e+01\n10 647     -8.254999e+01 5.540997e+01\n13 647     3.810800e+02 -2.858200e+02\n15 647     -2.112000e+01 3.725000e+01\n0 648     5.611500e+02 2.203100e+02\n1 648     8.585800e+02 7.453998e+01\n2 648     4.385000e+02 1.820000e+02\n3 648     3.005500e+02 -1.360900e+02\n7 648     3.830100e+02 3.856400e+02\n8 648     4.205699e+02 1.223000e+02\n9 648     2.347100e+02 2.498200e+02\n10 648     5.401600e+02 4.592500e+02\n11 648     6.942600e+02 -5.045300e+02\n12 648     4.378900e+02 3.753500e+02\n13 648     7.564301e+02 -9.640015e+00\n15 648     7.273600e+02 5.216000e+02\n0 649     -3.608002e+01 4.551001e+01\n1 649     1.440400e+02 8.307999e+01\n3 649     -1.359003e+01 -2.703400e+02\n7 649     -1.333500e+02 1.494800e+02\n8 649     9.313000e+01 -8.130005e+00\n10 649     -1.400100e+02 1.905100e+02\n15 649     -8.900000e+01 1.942700e+02\n0 650     1.881200e+02 -4.754999e+01\n1 650     3.286000e+02 -7.384998e+01\n2 650     3.595699e+02 2.378998e+01\n3 650     2.597800e+02 -2.808200e+02\n10 650     1.299000e+02 1.057100e+02\n15 650     2.265900e+02 9.809000e+01\n0 651     1.745000e+02 -6.134003e+01\n1 651     3.109500e+02 -8.321002e+01\n2 651     3.520601e+02 7.900024e+00\n6 651     1.804400e+02 8.760010e+00\n7 651     9.977002e+01 8.285999e+01\n8 651     3.186500e+02 -4.273001e+01\n13 651     5.352000e+02 -2.597800e+02\n15 651     2.096200e+02 7.750000e+01\n0 652     -3.521002e+01 6.559998e+00\n1 652     1.327100e+02 4.463000e+01\n3 652     7.020020e+00 -3.032900e+02\n4 652     -2.646200e+02 -3.835800e+02\n6 652     -8.937000e+01 6.400024e+00\n7 652     -1.246900e+02 1.121000e+02\n8 652     1.066600e+02 -4.010001e+01\n10 652     -1.349000e+02 1.448400e+02\n13 652     3.350300e+02 -2.200300e+02\n15 652     -8.265002e+01 1.416000e+02\n0 653     7.090027e+00 -2.256000e+01\n1 653     1.611000e+02 4.890015e+00\n2 653     1.610700e+02 1.300049e-01\n3 653     7.327002e+01 -3.091200e+02\n4 653     -2.889000e+02 -4.176200e+02\n6 653     -1.978003e+01 -6.440002e+00\n7 653     -7.445001e+01 9.157001e+01\n8 653     1.610500e+02 -4.692999e+01\n9 653     2.689001e+01 9.154999e+01\n10 653     -8.271002e+01 1.153700e+02\n13 653     3.808199e+02 -2.409100e+02\n15 653     -2.181000e+01 1.070700e+02\n0 654     1.453003e+01 -2.770001e+01\n1 654     1.666200e+02 -2.780029e+00\n2 654     1.730700e+02 -1.469971e+00\n3 654     8.445001e+01 -3.106100e+02\n7 654     -6.537000e+01 8.806000e+01\n9 654     3.765997e+01 9.029999e+01\n10 654     -7.337000e+01 1.102500e+02\n13 654     3.897600e+02 -2.445600e+02\n15 654     -1.107001e+01 1.009400e+02\n0 655     2.440002e+01 -3.365002e+01\n1 655     1.735300e+02 -1.089001e+01\n2 655     1.865700e+02 -3.869995e+00\n9 655     4.821002e+01 8.895001e+01\n13 655     3.990000e+02 -2.487000e+02\n15 655     2.979980e+00 9.441000e+01\n0 656     1.463500e+02 -7.447998e+01\n1 656     2.793300e+02 -8.770001e+01\n2 656     3.284500e+02 -1.182001e+01\n3 656     2.316400e+02 -3.166800e+02\n6 656     1.559700e+02 -1.479999e+01\n7 656     7.470001e+01 6.515997e+01\n8 656     2.985900e+02 -5.920001e+01\n13 656     5.125300e+02 -2.734300e+02\n15 656     1.732400e+02 5.584003e+01\n0 657     1.463500e+02 -7.447998e+01\n1 657     2.793300e+02 -8.770001e+01\n2 657     3.284500e+02 -1.182001e+01\n3 657     2.316400e+02 -3.166800e+02\n4 657     -3.477900e+02 -5.306400e+02\n6 657     1.559700e+02 -1.479999e+01\n7 657     7.470001e+01 6.515997e+01\n8 657     2.985900e+02 -5.920001e+01\n10 657     8.410999e+01 7.044000e+01\n13 657     5.125300e+02 -2.734300e+02\n15 657     1.732400e+02 5.584003e+01\n0 658     -1.558002e+01 -2.339001e+01\n1 658     1.403900e+02 1.041998e+01\n2 658     1.333300e+02 -1.109003e+01\n3 658     4.621997e+01 -3.211100e+02\n6 658     -4.839001e+01 -1.781000e+01\n7 658     -9.795001e+01 8.639999e+01\n8 658     1.382400e+02 -5.651999e+01\n10 658     -1.091900e+02 1.125000e+02\n12 658     -3.600000e+01 3.671002e+01\n13 658     3.593500e+02 -2.439700e+02\n15 658     -5.233002e+01 1.035800e+02\n0 659     1.419000e+02 -8.204999e+01\n1 659     2.716700e+02 -9.356000e+01\n2 659     3.267500e+02 -2.135999e+01\n3 659     2.313600e+02 -3.251100e+02\n6 659     1.532400e+02 -2.525000e+01\n7 659     7.122998e+01 5.690002e+01\n8 659     2.967400e+02 -6.695001e+01\n10 659     7.928003e+01 6.106000e+01\n12 659     1.695600e+02 2.115997e+01\n15 659     1.681000e+02 4.503003e+01\n0 660     -6.535999e+01 -3.159973e+00\n1 660     1.038400e+02 4.370001e+01\n3 660     -3.322998e+01 -3.341800e+02\n4 660     -2.675800e+02 -3.576300e+02\n6 660     -1.307600e+02 -1.817999e+01\n7 660     -1.558700e+02 9.451999e+01\n8 660     7.354999e+01 -6.202002e+01\n10 660     -1.692000e+02 1.310600e+02\n12 660     -1.120300e+02 3.732001e+01\n13 660     3.043700e+02 -2.335300e+02\n15 660     -1.212800e+02 1.239200e+02\n0 661     4.910400e+02 4.087800e+02\n1 661     8.599200e+02 2.918800e+02\n2 661     2.692900e+02 2.910800e+02\n3 661     1.279500e+02 -3.687000e+01\n6 661     1.731100e+02 5.438200e+02\n7 661     2.769900e+02 5.478300e+02\n8 661     2.886600e+02 2.183700e+02\n9 661     8.481000e+01 3.365900e+02\n11 661     5.961899e+02 -3.219900e+02\n12 661     2.842400e+02 5.332900e+02\n13 661     6.460601e+02 1.359900e+02\n0 662     -1.821997e+01 -8.539978e+00\n1 662     1.426700e+02 2.546997e+01\n2 662     1.245300e+02 1.849976e+00\n3 662     3.771002e+01 -3.073300e+02\n7 662     -1.032800e+02 9.995001e+01\n10 662     -1.132200e+02 1.290900e+02\n13 662     3.553300e+02 -2.321300e+02\n15 662     -5.809998e+01 1.226200e+02\n0 663     -4.523999e+01 -8.880005e+00\n1 663     1.192800e+02 3.307001e+01\n2 663     8.427002e+01 -1.365002e+01\n3 663     -5.800171e-01 -3.258600e+02\n4 663     -2.734500e+02 -3.741400e+02\n6 663     -9.670001e+01 -1.528998e+01\n7 663     -1.328500e+02 9.382001e+01\n8 663     1.000300e+02 -5.750000e+01\n10 663     -1.447700e+02 1.246100e+02\n12 663     -8.100000e+01 3.979999e+01\n13 663     3.266100e+02 -2.359800e+02\n15 663     -9.384998e+01 1.185100e+02\n0 664     5.825000e+01 -6.165997e+01\n1 664     1.970000e+02 -4.839001e+01\n2 664     2.358800e+02 -2.100000e+01\n7 664     -1.485999e+01 6.237000e+01\n10 664     -1.945001e+01 7.520001e+01\n15 664     5.165002e+01 6.088000e+01\n0 665     5.825000e+01 -6.165997e+01\n1 665     1.970000e+02 -4.839001e+01\n2 665     2.358800e+02 -2.100000e+01\n3 665     1.454300e+02 -3.273000e+02\n4 665     -3.235300e+02 -4.581100e+02\n6 665     5.487000e+01 -2.915997e+01\n7 665     -1.485999e+01 6.237000e+01\n8 665     2.210100e+02 -6.589001e+01\n10 665     -1.945001e+01 7.520001e+01\n15 665     5.165002e+01 6.088000e+01\n0 666     8.319000e+01 -8.078003e+01\n1 666     2.152800e+02 -7.433002e+01\n2 666     2.686801e+02 -3.406000e+01\n3 666     1.769800e+02 -3.391700e+02\n4 666     -3.416400e+02 -4.782700e+02\n6 666     9.060999e+01 -4.294000e+01\n7 666     1.346997e+01 4.809003e+01\n8 666     2.479100e+02 -7.703998e+01\n9 666     1.173000e+02 6.719000e+01\n10 666     1.162000e+01 5.609998e+01\n12 666     1.032600e+02 6.580017e+00\n13 666     4.580300e+02 -2.839500e+02\n15 666     8.845001e+01 3.875000e+01\n0 667     8.887000e+01 -5.883002e+01\n1 667     2.268600e+02 -5.441998e+01\n2 667     2.678600e+02 -8.049988e+00\n3 667     1.751500e+02 -3.139500e+02\n6 667     9.113000e+01 -1.403003e+01\n7 667     1.550000e+01 7.112000e+01\n8 667     2.483900e+02 -5.500000e+01\n10 667     1.577002e+01 8.194000e+01\n13 667     4.608800e+02 -2.645700e+02\n15 667     9.290002e+01 6.919000e+01\n0 668     -3.055400e+02 3.808100e+02\n1 668     3.889001e+01 4.664900e+02\n2 668     -5.858600e+02 1.133400e+02\n5 668     9.441998e+01 -2.767700e+02\n7 668     -5.162100e+02 4.103100e+02\n8 668     -3.999800e+02 7.744000e+01\n10 668     -4.996900e+02 5.657100e+02\n11 668     -1.249400e+02 -3.713100e+02\n12 668     -6.265200e+02 3.185400e+02\n13 668     -5.290997e+01 5.307001e+01\n14 668     1.157001e+01 -3.676400e+02\n0 669     -3.972500e+02 4.260000e+02\n1 669     -4.004999e+01 5.326200e+02\n2 669     -6.844900e+02 1.705300e+02\n5 669     8.940002e+00 -2.262300e+02\n7 669     -6.177300e+02 4.479900e+02\n8 669     -4.813900e+02 1.204400e+02\n10 669     -6.191800e+02 6.142700e+02\n11 669     -2.040800e+02 -3.311600e+02\n12 669     -7.432500e+02 3.616200e+02\n13 669     -1.253000e+02 8.895999e+01\n14 669     -7.446002e+01 -3.191100e+02\n0 670     -4.685500e+02 4.039200e+02\n1 670     -1.131500e+02 5.276600e+02\n5 670     -6.415002e+01 -2.482700e+02\n8 670     -5.448600e+02 9.632001e+01\n10 670     -7.047200e+02 5.810800e+02\n11 670     -2.664800e+02 -3.487300e+02\n12 670     -8.267700e+02 3.222500e+02\n0 671     -4.407300e+02 3.924800e+02\n1 671     -8.929999e+01 5.103200e+02\n2 671     -7.320400e+02 1.271400e+02\n5 671     -3.796997e+01 -2.612900e+02\n7 671     -6.583500e+02 4.068300e+02\n10 671     -6.680600e+02 5.691400e+02\n11 671     -2.441600e+02 -3.590700e+02\n12 671     -7.901300e+02 3.119500e+02\n14 671     -1.203100e+02 -3.549500e+02\n0 672     -3.226000e+02 4.420100e+02\n1 672     3.657001e+01 5.305100e+02\n2 672     -6.049800e+02 1.910100e+02\n5 672     8.440002e+01 -2.104600e+02\n7 672     -5.421600e+02 4.733300e+02\n8 672     -4.164700e+02 1.388200e+02\n11 672     -1.379400e+02 -3.178900e+02\n12 672     -6.566500e+02 3.931600e+02\n0 673     -5.460400e+02 3.291900e+02\n1 673     -2.030100e+02 4.748500e+02\n5 673     -1.509500e+02 -3.255900e+02\n11 673     -3.403600e+02 -4.131400e+02\n13 673     -2.492600e+02 -1.630005e+00\n14 673     -2.336000e+02 -4.233200e+02\n15 673     -8.211700e+02 5.164300e+02\n0 674     -3.190000e+02 4.012700e+02\n1 674     3.051001e+01 4.899900e+02\n2 674     -6.004500e+02 1.391800e+02\n4 674     -1.729999e+01 -1.689000e+02\n5 674     8.359998e+01 -2.543400e+02\n7 674     -5.326300e+02 4.304800e+02\n8 674     -4.121900e+02 9.760001e+01\n10 674     -5.189800e+02 5.895700e+02\n11 674     -1.362800e+02 -3.533700e+02\n12 674     -6.457500e+02 3.422900e+02\n14 674     3.400269e-01 -3.453800e+02\n0 675     -4.754700e+02 3.916000e+02\n1 675     -1.224700e+02 5.176000e+02\n5 675     -7.303003e+01 -2.615400e+02\n10 675     -7.115300e+02 5.656300e+02\n11 675     -2.735600e+02 -3.597400e+02\n14 675     -1.546000e+02 -3.559000e+02\n0 676     -5.499400e+02 3.263300e+02\n1 676     -2.071800e+02 4.729600e+02\n4 676     -3.878003e+01 -3.798999e+01\n5 676     -1.567600e+02 -3.297100e+02\n10 676     -7.934800e+02 4.781000e+02\n11 676     -3.437700e+02 -4.159200e+02\n13 676     -2.523800e+02 -3.820007e+00\n14 676     -2.379200e+02 -4.264000e+02\n15 676     -8.261600e+02 5.112500e+02\n0 677     -3.459500e+02 3.427100e+02\n1 677     -9.530029e+00 4.397800e+02\n2 677     -6.270600e+02 6.437000e+01\n5 677     5.013000e+01 -3.173500e+02\n7 677     -5.523100e+02 3.651800e+02\n8 677     -4.346700e+02 3.810001e+01\n10 677     -5.433200e+02 5.152200e+02\n11 677     -1.629100e+02 -4.054300e+02\n14 677     -3.177002e+01 -4.093600e+02\n15 677     -5.427700e+02 5.608100e+02\n0 678     -4.371500e+02 4.083000e+02\n1 678     -8.239001e+01 5.245300e+02\n2 678     -7.277900e+02 1.474800e+02\n5 678     -3.225000e+01 -2.442800e+02\n7 678     -6.569400e+02 4.244000e+02\n10 678     -6.662500e+02 5.894100e+02\n12 678     -7.882500e+02 3.327500e+02\n13 678     -1.574200e+02 7.182001e+01\n14 678     -1.149100e+02 -3.381200e+02\n0 679     -5.499400e+02 3.263300e+02\n1 679     -2.071800e+02 4.729600e+02\n4 679     -3.878003e+01 -3.798999e+01\n5 679     -1.567600e+02 -3.297100e+02\n10 679     -7.934800e+02 4.781000e+02\n11 679     -3.437700e+02 -4.159200e+02\n13 679     -2.523800e+02 -3.820007e+00\n14 679     -2.379200e+02 -4.264000e+02\n15 679     -8.261600e+02 5.112500e+02\n0 680     -5.586300e+02 3.733500e+02\n1 680     -2.046400e+02 5.192100e+02\n4 680     -1.284003e+01 -3.965997e+01\n5 680     -1.570000e+02 -2.785000e+02\n7 680     -7.815000e+02 3.721900e+02\n10 680     -8.144100e+02 5.366600e+02\n14 680     -2.390800e+02 -3.748100e+02\n15 680     -8.478100e+02 5.766100e+02\n0 681     -5.680700e+02 3.392500e+02\n1 681     -2.211700e+02 4.893800e+02\n5 681     -1.722700e+02 -3.152600e+02\n7 681     -7.867800e+02 3.343900e+02\n10 681     -8.201400e+02 4.931700e+02\n11 681     -3.584500e+02 -4.039400e+02\n15 681     -8.544200e+02 5.271900e+02\n0 682     -4.011300e+02 3.989200e+02\n1 682     -4.965002e+01 5.070600e+02\n2 682     -6.882600e+02 1.354100e+02\n5 682     1.890015e+00 -2.555200e+02\n7 682     -6.175900e+02 4.183500e+02\n8 682     -4.834900e+02 9.289001e+01\n10 682     -6.197100e+02 5.801700e+02\n11 682     -2.082900e+02 -3.549000e+02\n12 682     -7.425600e+02 3.261200e+02\n13 682     -1.289600e+02 6.503003e+01\n14 682     -8.060999e+01 -3.482800e+02\n0 683     -4.119300e+02 3.940500e+02\n1 683     -6.138000e+01 5.050300e+02\n2 683     -7.000200e+02 1.290700e+02\n7 683     -6.282100e+02 4.120700e+02\n10 683     -6.326500e+02 5.731200e+02\n11 683     -2.182700e+02 -3.588600e+02\n12 683     -7.553000e+02 3.184300e+02\n13 683     -1.377100e+02 6.032001e+01\n0 684     -4.461100e+02 3.948200e+02\n1 684     -9.384003e+01 5.137900e+02\n4 684     -1.056000e+01 -1.001200e+02\n5 684     -4.327002e+01 -2.590600e+02\n8 684     -5.238700e+02 8.751999e+01\n10 684     -6.754900e+02 5.714600e+02\n11 684     -2.479000e+02 -3.576800e+02\n12 684     -7.974900e+02 3.136500e+02\n13 684     -1.652700e+02 5.981000e+01\n14 684     -1.253100e+02 -3.527300e+02\n0 685     -3.904400e+02 4.214000e+02\n1 685     -3.445001e+01 5.263900e+02\n2 685     -6.771600e+02 1.643400e+02\n7 685     -6.100000e+02 4.437400e+02\n8 685     -4.747500e+02 1.157600e+02\n10 685     -6.100600e+02 6.092000e+02\n13 685     -1.197300e+02 8.479001e+01\n14 685     -6.816998e+01 -3.244200e+02\n0 686     -3.480100e+02 4.070700e+02\n1 686     3.619995e+00 5.026600e+02\n2 686     -6.315600e+02 1.457500e+02\n5 686     5.571997e+01 -2.472600e+02\n7 686     -5.636300e+02 4.334100e+02\n8 686     -4.370000e+02 1.031100e+02\n10 686     -5.553800e+02 5.944600e+02\n13 686     -8.615997e+01 7.410999e+01\n14 686     -2.778998e+01 -3.394100e+02\n0 687     -5.602800e+02 3.419400e+02\n1 687     -2.129700e+02 4.899600e+02\n5 687     -1.649500e+02 -3.129000e+02\n7 687     -7.781200e+02 3.382500e+02\n10 687     -8.105400e+02 4.971400e+02\n15 687     -8.439600e+02 5.321400e+02\n0 688     -4.535200e+02 4.044000e+02\n1 688     -9.873999e+01 5.240400e+02\n5 688     -4.867999e+01 -2.492400e+02\n8 688     -5.296600e+02 9.545999e+01\n10 688     -6.860400e+02 5.832900e+02\n11 688     -2.539000e+02 -3.494200e+02\n12 688     -8.063900e+02 3.230800e+02\n0 689     -3.682700e+02 4.159400e+02\n1 689     -1.384998e+01 5.159400e+02\n2 689     -6.529400e+02 1.573800e+02\n5 689     3.628998e+01 -2.380700e+02\n10 689     -5.819200e+02 6.039900e+02\n11 689     -1.789700e+02 -3.401900e+02\n12 689     -7.060500e+02 3.532700e+02\n13 689     -1.022200e+02 8.076999e+01\n14 689     -4.684003e+01 -3.301300e+02\n0 690     -5.351800e+02 3.264900e+02\n1 690     -1.930600e+02 4.698500e+02\n5 690     -1.416000e+02 -3.302300e+02\n11 690     -3.307700e+02 -4.160600e+02\n15 690     -8.058800e+02 5.130900e+02\n0 691     -5.438100e+02 4.032300e+02\n1 691     -1.842700e+02 5.441100e+02\n4 691     1.950012e+00 -5.084003e+01\n5 691     -1.381300e+02 -2.472000e+02\n7 691     -7.700800e+02 4.065900e+02\n10 691     -8.007300e+02 5.749900e+02\n11 691     -3.313500e+02 -3.489000e+02\n13 691     -2.423400e+02 6.315002e+01\n14 691     -2.198400e+02 -3.431400e+02\n0 692     -5.035100e+02 1.737000e+02\n1 692     -2.038500e+02 3.174800e+02\n0 693     -5.039500e+02 3.728400e+02\n1 693     -1.537500e+02 5.073300e+02\n4 693     -1.826001e+01 -6.779999e+01\n5 693     -1.032600e+02 -2.821000e+02\n10 693     -7.436500e+02 5.396400e+02\n13 693     -2.124600e+02 3.858002e+01\n14 693     -1.850200e+02 -3.761100e+02\n15 693     -7.704200e+02 5.829500e+02\n0 694     -3.620300e+02 4.249400e+02\n1 694     -6.150024e+00 5.235000e+02\n2 694     -6.462700e+02 1.686300e+02\n5 694     4.364001e+01 -2.277800e+02\n7 694     -5.809900e+02 4.511900e+02\n8 694     -4.502500e+02 1.205400e+02\n10 694     -5.755500e+02 6.157800e+02\n13 694     -9.678998e+01 8.926999e+01\n0 695     -5.446200e+02 3.069500e+02\n1 695     -2.066100e+02 4.535000e+02\n4 695     -4.960999e+01 -3.839001e+01\n0 696     -5.446200e+02 3.069500e+02\n1 696     -2.066100e+02 4.535000e+02\n4 696     -4.960999e+01 -3.839001e+01\n5 696     -1.543800e+02 -3.512700e+02\n11 696     -3.409000e+02 -4.336400e+02\n15 696     -8.151600e+02 4.847300e+02\n0 697     -5.680700e+02 3.392500e+02\n1 697     -2.211700e+02 4.893800e+02\n5 697     -1.722700e+02 -3.152600e+02\n7 697     -7.867800e+02 3.343900e+02\n10 697     -8.201400e+02 4.931700e+02\n11 697     -3.584500e+02 -4.039400e+02\n13 697     -2.666400e+02 6.739990e+00\n14 697     -2.543400e+02 -4.120400e+02\n15 697     -8.544200e+02 5.271900e+02\n0 698     -4.896400e+02 3.967500e+02\n1 698     -1.347500e+02 5.257800e+02\n4 698     -5.820007e+00 -7.778998e+01\n5 698     -8.579999e+01 -2.554500e+02\n7 698     -7.108000e+02 4.058600e+02\n8 698     -5.631900e+02 8.856000e+01\n10 698     -7.304500e+02 5.708100e+02\n11 698     -2.853500e+02 -3.553000e+02\n13 698     -1.999700e+02 5.982001e+01\n0 699     -3.682700e+02 4.159400e+02\n1 699     -1.384998e+01 5.159400e+02\n2 699     -6.529400e+02 1.573800e+02\n5 699     3.628998e+01 -2.380700e+02\n7 699     -5.857300e+02 4.404800e+02\n10 699     -5.819200e+02 6.039900e+02\n11 699     -1.789700e+02 -3.401900e+02\n12 699     -7.060500e+02 3.532700e+02\n13 699     -1.022200e+02 8.076999e+01\n14 699     -4.684003e+01 -3.301300e+02\n0 700     -5.627800e+02 3.374100e+02\n1 700     -2.166500e+02 4.863300e+02\n4 700     -3.177002e+01 -3.290997e+01\n5 700     -1.675600e+02 -3.173700e+02\n7 700     -7.805900e+02 3.330000e+02\n10 700     -8.130800e+02 4.915400e+02\n11 700     -3.534800e+02 -4.058500e+02\n13 700     -2.621700e+02 5.500000e+00\n14 700     -2.489600e+02 -4.141100e+02\n15 700     -8.468900e+02 5.253200e+02\n0 701     -5.154500e+02 3.989800e+02\n1 701     -1.587500e+02 5.339400e+02\n4 701     -2.469971e+00 -6.473999e+01\n5 701     -1.110600e+02 -2.521600e+02\n7 701     -7.392700e+02 4.058400e+02\n8 701     -5.873700e+02 9.079001e+01\n10 701     -7.635800e+02 5.718800e+02\n11 701     -3.077000e+02 -3.528600e+02\n13 701     -2.210100e+02 6.146997e+01\n14 701     -1.932600e+02 -3.473400e+02\n0 702     -3.481700e+02 4.287100e+02\n1 702     8.409973e+00 5.233800e+02\n2 702     -6.317200e+02 1.735500e+02\n4 702     1.500244e-01 -1.559800e+02\n5 702     5.765997e+01 -2.244800e+02\n7 702     -5.668500e+02 4.561000e+02\n8 702     -4.382200e+02 1.234300e+02\n11 702     -1.610200e+02 -3.294500e+02\n12 702     -6.848800e+02 3.718600e+02\n13 702     -8.540997e+01 9.285001e+01\n14 702     -2.564001e+01 -3.165100e+02\n0 703     -4.444400e+02 4.115200e+02\n1 703     -8.848999e+01 5.295000e+02\n2 703     -7.360100e+02 1.517200e+02\n7 703     -6.651200e+02 4.271100e+02\n10 703     -6.761700e+02 5.925800e+02\n12 703     -7.981800e+02 3.358300e+02\n0 704     -3.777100e+02 -5.219971e+00\n1 704     -1.517500e+02 1.207100e+02\n7 704     -5.102800e+02 1.384998e+01\n15 704     -5.364400e+02 7.715002e+01\n0 705     -1.010000e+02 9.682001e+01\n1 705     1.130500e+02 1.471700e+02\n5 705     4.573700e+02 -5.723101e+02\n6 705     -2.621400e+02 6.419000e+01\n7 705     -2.217100e+02 1.801900e+02\n8 705     -2.595001e+01 -2.170999e+01\n10 705     -2.213400e+02 2.439400e+02\n12 705     -2.144400e+02 1.176800e+02\n13 705     2.351200e+02 -1.578100e+02\n15 705     -1.797000e+02 2.545900e+02\n0 706     2.707200e+02 5.072700e+02\n1 706     6.717000e+02 4.486800e+02\n2 706     -4.983002e+01 2.721700e+02\n3 706     -1.916600e+02 -6.103003e+01\n8 706     3.877002e+01 2.123000e+02\n9 706     -1.943200e+02 3.086500e+02\n11 706     3.917500e+02 -2.457700e+02\n0 707     9.453998e+01 5.453998e+01\n1 707     2.684200e+02 5.481000e+01\n3 707     1.301900e+02 -2.104900e+02\n6 707     5.042999e+01 1.101400e+02\n7 707     1.750000e+00 1.836100e+02\n8 707     2.159400e+02 3.707999e+01\n10 707     1.031000e+01 2.142000e+02\n12 707     7.040997e+01 1.630400e+02\n13 707     4.511500e+02 -1.671900e+02\n15 707     8.601001e+01 2.246100e+02\n0 708     1.415400e+02 1.271002e+01\n1 708     3.004800e+02 -4.998779e-02\n2 708     2.928900e+02 7.509998e+01\n3 708     1.935800e+02 -2.340400e+02\n7 708     5.564001e+01 1.506100e+02\n10 708     6.957001e+01 1.706000e+02\n15 708     1.554500e+02 1.740200e+02\n0 709     1.831899e+02 -9.880005e+00\n1 709     3.354600e+02 -3.509998e+01\n2 709     3.384301e+02 5.988000e+01\n3 709     2.374200e+02 -2.479000e+02\n4 709     -3.049600e+02 -5.610601e+02\n6 709     1.707100e+02 6.787000e+01\n7 709     9.947998e+01 1.347100e+02\n10 709     1.195600e+02 1.483100e+02\n12 709     1.935100e+02 1.155000e+02\n13 709     5.357600e+02 -2.143300e+02\n15 709     2.149200e+02 1.487900e+02\n0 710     2.474200e+02 -7.190002e+01\n1 710     3.840900e+02 -1.170200e+02\n2 710     4.100800e+02 -7.000732e-02\n6 710     2.491700e+02 1.462000e+01\n7 710     1.694900e+02 8.251001e+01\n8 710     3.700500e+02 -4.763000e+01\n10 710     1.998700e+02 8.325000e+01\n12 710     2.761899e+02 5.614001e+01\n13 710     5.942500e+02 -2.650200e+02\n15 710     3.119000e+02 7.275000e+01\n0 711     3.828500e+02 4.624500e+02\n1 711     7.862400e+02 3.712300e+02\n2 711     4.940002e+01 2.235800e+02\n5 711     7.909000e+02 -1.792800e+02\n7 711     1.415200e+02 5.687300e+02\n8 711     1.216900e+02 1.757100e+02\n9 711     -1.085600e+02 2.710300e+02\n11 711     5.021700e+02 -2.780300e+02\n12 711     1.000800e+02 5.185400e+02\n0 712     -2.638500e+02 5.716998e+01\n1 712     -2.428998e+01 1.479000e+02\n15 712     -3.875700e+02 1.775000e+02\n0 713     -3.100600e+02 2.223999e+01\n1 713     -8.017999e+01 1.282300e+02\n2 713     -4.243100e+02 -2.323300e+02\n10 713     -4.577600e+02 1.357700e+02\n13 713     2.270020e+00 -2.540400e+02\n15 713     -4.450300e+02 1.230800e+02\n0 714     -1.991900e+02 3.403800e+02\n1 714     1.349000e+02 4.002600e+02\n2 714     -4.744200e+02 6.362000e+01\n5 714     1.971700e+02 -3.227900e+02\n7 714     -4.030500e+02 3.801600e+02\n8 714     -3.091700e+02 4.048999e+01\n13 714     3.190002e+01 2.226001e+01\n14 714     1.145300e+02 -4.109100e+02\n0 715     1.565997e+01 4.723000e+02\n1 715     3.852100e+02 4.766000e+02\n2 715     -2.745200e+02 2.294400e+02\n4 715     -2.159973e+00 -3.669700e+02\n8 715     -1.465100e+02 1.732300e+02\n12 715     -2.831400e+02 4.769600e+02\n14 715     3.287600e+02 -2.641900e+02\n0 716     -4.524100e+02 4.170800e+02\n1 716     -9.478003e+01 5.364600e+02\n2 716     -7.448000e+02 1.592700e+02\n5 716     -4.665002e+01 -2.346300e+02\n8 716     -5.301900e+02 1.100900e+02\n10 716     -6.866900e+02 5.988900e+02\n12 716     -8.087200e+02 3.416800e+02\n14 716     -1.291300e+02 -3.285400e+02\n0 717     -1.152300e+02 -4.971801e+02\n1 717     -8.898999e+01 -4.119400e+02\n0 718     2.983400e+02 5.797000e+02\n1 718     7.240500e+02 5.188000e+02\n6 718     -1.736600e+02 6.797400e+02\n8 718     4.941998e+01 2.717200e+02\n9 718     -1.869300e+02 3.753300e+02\n11 718     4.077900e+02 -1.834200e+02\n13 718     4.225300e+02 2.551500e+02\n14 718     5.974700e+02 -1.410500e+02\n0 719     -2.752100e+02 4.217300e+02\n1 719     7.834003e+01 4.989600e+02\n7 719     -4.906300e+02 4.567900e+02\n8 719     -3.756900e+02 1.185100e+02\n12 719     -5.975000e+02 3.739800e+02\n13 719     -2.765002e+01 8.964999e+01\n0 720     -2.584900e+02 4.176100e+02\n1 720     9.407001e+01 4.912100e+02\n2 720     -5.376800e+02 1.606700e+02\n4 720     -1.309998e+01 -2.035700e+02\n5 720     1.450000e+02 -2.377200e+02\n7 720     -4.732600e+02 4.546900e+02\n8 720     -3.611800e+02 1.156200e+02\n10 720     -4.475700e+02 6.148700e+02\n11 720     -8.228003e+01 -3.391500e+02\n12 720     -5.778300e+02 3.724600e+02\n14 720     6.103998e+01 -3.272000e+02\n0 721     2.268500e+02 -3.420001e+01\n1 721     3.732500e+02 -7.283002e+01\n2 721     3.830000e+02 3.928003e+01\n3 721     2.781801e+02 -2.666900e+02\n6 721     2.202200e+02 5.207001e+01\n7 721     1.447500e+02 1.171300e+02\n10 721     1.724900e+02 1.248500e+02\n13 721     5.739900e+02 -2.327300e+02\n0 722     8.159998e+01 -1.626001e+01\n1 722     2.327400e+02 -1.034998e+01\n3 722     1.502900e+02 -2.765500e+02\n4 722     -2.946400e+02 -4.786300e+02\n8 722     2.299000e+02 -2.254001e+01\n9 722     9.551001e+01 1.225300e+02\n10 722     3.099976e+00 1.308500e+02\n12 722     8.226001e+01 7.813000e+01\n13 722     4.505000e+02 -2.278100e+02\n15 722     7.708002e+01 1.257200e+02\n0 723     1.575200e+02 -1.488100e+02\n1 723     2.663500e+02 -1.641800e+02\n2 723     3.714100e+02 -8.290997e+01\n3 723     2.768500e+02 -3.827700e+02\n7 723     9.881000e+01 -6.109985e+00\n10 723     1.036500e+02 -1.446997e+01\n13 723     5.328300e+02 -3.375100e+02\n15 723     1.983700e+02 -4.347998e+01\n0 724     5.065200e+02 3.321400e+02\n1 724     8.508600e+02 2.058500e+02\n7 724     3.024301e+02 4.762100e+02\n8 724     3.169000e+02 1.627200e+02\n9 724     1.177900e+02 2.793400e+02\n0 725     3.162800e+02 -1.061000e+02\n1 725     4.463101e+02 -1.743200e+02\n2 725     4.751899e+02 -2.903998e+01\n7 725     2.387600e+02 5.853998e+01\n10 725     2.827100e+02 5.144000e+01\n13 725     6.542800e+02 -2.911600e+02\n15 725     4.119500e+02 3.529999e+01\n0 726     1.968700e+02 -1.006100e+02\n1 726     3.230800e+02 -1.294400e+02\n3 726     2.793500e+02 -3.374800e+02\n15 726     2.460699e+02 2.717999e+01\n0 727     -2.704300e+02 4.298900e+02\n1 727     8.482001e+01 5.055900e+02\n2 727     -5.510300e+02 1.756100e+02\n4 727     -5.929993e+00 -1.977700e+02\n5 727     1.340800e+02 -2.253800e+02\n7 727     -4.871400e+02 4.659300e+02\n8 727     -3.726900e+02 1.253000e+02\n11 727     -9.279999e+01 -3.294600e+02\n12 727     -5.943900e+02 3.832700e+02\n13 727     -2.369000e+01 9.742001e+01\n14 727     4.984998e+01 -3.143500e+02\n0 728     -2.704300e+02 4.298900e+02\n1 728     8.482001e+01 5.055900e+02\n2 728     -5.510300e+02 1.756100e+02\n7 728     -4.871400e+02 4.659300e+02\n0 729     -1.444000e+01 5.471997e+01\n1 729     1.662400e+02 8.576001e+01\n3 729     9.919983e+00 -2.511800e+02\n7 729     -1.118100e+02 1.629800e+02\n10 729     -1.161000e+02 2.032000e+02\n15 729     -6.113000e+01 2.094700e+02\n0 730     3.272998e+01 -1.589800e+02\n1 730     1.432700e+02 -1.352100e+02\n3 730     1.623300e+02 -4.323600e+02\n7 730     -2.340997e+01 -3.903998e+01\n10 730     -3.865997e+01 -3.960999e+01\n12 730     6.859003e+01 -1.014400e+02\n13 730     4.230699e+02 -3.576800e+02\n15 730     3.053003e+01 -7.390002e+01\n0 731     1.433300e+02 3.609003e+01\n1 731     3.099000e+02 2.289001e+01\n7 731     5.244000e+01 1.737700e+02\n13 731     4.958500e+02 -1.784500e+02\n15 731     1.538101e+02 2.060200e+02\n0 732     1.433300e+02 3.609003e+01\n1 732     3.099000e+02 2.289001e+01\n7 732     5.244000e+01 1.737700e+02\n10 732     6.789001e+01 1.974100e+02\n13 732     4.958500e+02 -1.784500e+02\n15 732     1.538101e+02 2.060200e+02\n0 733     5.743900e+02 1.006100e+02\n1 733     8.342800e+02 -5.620001e+01\n2 733     4.823199e+02 6.721997e+01\n3 733     3.496899e+02 -2.460800e+02\n6 733     3.950700e+02 2.377900e+02\n8 733     4.567300e+02 2.734000e+01\n9 733     2.772700e+02 1.535200e+02\n10 733     5.644800e+02 3.195100e+02\n13 733     7.815601e+02 -1.119100e+02\n0 734     5.743900e+02 1.006100e+02\n1 734     8.342800e+02 -5.620001e+01\n2 734     4.823199e+02 6.721997e+01\n8 734     4.567300e+02 2.734000e+01\n10 734     5.644800e+02 3.195100e+02\n13 734     7.815601e+02 -1.119100e+02\n0 735     -4.454700e+02 4.019700e+02\n1 735     -9.166998e+01 5.206500e+02\n7 735     -6.646700e+02 4.164500e+02\n10 735     -6.753400e+02 5.801900e+02\n12 735     -7.974200e+02 3.229000e+02\n0 736     -2.699800e+02 4.510200e+02\n1 736     9.040997e+01 5.266300e+02\n2 736     -5.509500e+02 2.013700e+02\n5 736     1.368800e+02 -2.016000e+02\n7 736     -4.897000e+02 4.884700e+02\n11 736     -9.189001e+01 -3.102300e+02\n12 736     -5.969100e+02 4.113700e+02\n14 736     5.160999e+01 -2.924500e+02\n0 737     1.374800e+02 -1.700400e+02\n1 737     2.403700e+02 -1.786100e+02\n2 737     3.597300e+02 -1.100400e+02\n8 737     3.210400e+02 -1.413900e+02\n15 737     1.738000e+02 -7.496002e+01\n0 738     -2.369300e+02 4.013000e+02\n1 738     1.112900e+02 4.698100e+02\n2 738     -5.145200e+02 1.406600e+02\n7 738     -4.491900e+02 4.397200e+02\n12 738     -5.502100e+02 3.556800e+02\n0 739     -1.333700e+02 3.475700e+02\n1 739     2.024600e+02 3.900900e+02\n2 739     -4.080500e+02 7.475000e+01\n5 739     2.642500e+02 -3.154100e+02\n7 739     -3.379700e+02 3.953300e+02\n8 739     -2.550500e+02 5.023999e+01\n9 739     -4.910200e+02 1.235700e+02\n11 739     3.075000e+01 -4.017800e+02\n13 739     8.487000e+01 3.153003e+01\n14 739     1.805500e+02 -4.022400e+02\n0 740     4.585999e+01 5.623600e+02\n1 740     4.411801e+02 5.622900e+02\n8 740     -1.299800e+02 2.546500e+02\n9 740     -3.701800e+02 3.537600e+02\n11 740     1.846900e+02 -2.088000e+02\n12 740     -2.663200e+02 5.879400e+02\n0 741     -2.079500e+02 5.040800e+02\n1 741     1.648500e+02 5.643700e+02\n5 741     2.019600e+02 -1.461400e+02\n7 741     -4.339300e+02 5.513800e+02\n8 741     -3.234100e+02 1.989900e+02\n12 741     -5.347900e+02 4.857600e+02\n0 742     3.362000e+01 5.460700e+02\n1 742     4.239301e+02 5.484700e+02\n2 742     -2.638600e+02 3.123600e+02\n0 743     -2.146000e+02 4.062200e+02\n1 743     1.347600e+02 4.690900e+02\n2 743     -4.924900e+02 1.469700e+02\n8 743     -3.244800e+02 1.055300e+02\n11 743     -4.326001e+01 -3.492400e+02\n14 743     1.036500e+02 -3.393000e+02\n0 744     2.083199e+02 -5.617999e+01\n1 744     3.476200e+02 -8.885999e+01\n2 744     3.754301e+02 1.576001e+01\n6 744     2.099300e+02 2.334998e+01\n7 744     1.309400e+02 9.285999e+01\n8 744     3.399100e+02 -3.582001e+01\n10 744     1.539000e+02 9.752002e+01\n13 744     5.619200e+02 -2.527500e+02\n15 744     2.557800e+02 8.889001e+01\n0 745     2.495601e+02 -2.038600e+02\n1 745     3.420699e+02 -2.488700e+02\n2 745     4.735699e+02 -1.220500e+02\n6 745     3.059000e+02 -1.248400e+02\n7 745     1.964600e+02 -4.502002e+01\n8 745     4.175900e+02 -1.521900e+02\n10 745     2.160000e+02 -6.827002e+01\n12 745     3.274600e+02 -8.854999e+01\n13 745     6.197500e+02 -3.801300e+02\n15 745     3.314301e+02 -1.063700e+02\n0 746     7.065997e+01 -7.788000e+01\n1 746     2.041200e+02 -6.779999e+01\n2 746     2.538300e+02 -3.487000e+01\n3 746     1.643400e+02 -3.397700e+02\n7 746     2.100220e-01 4.853003e+01\n8 746     2.363800e+02 -7.737000e+01\n10 746     -3.000000e+00 5.840002e+01\n13 746     4.466300e+02 -2.827000e+02\n0 747     8.051001e+01 -3.753998e+01\n1 747     2.250699e+02 -3.104999e+01\n2 747     2.518000e+02 1.222998e+01\n3 747     1.586600e+02 -2.950800e+02\n4 747     -3.095200e+02 -4.772100e+02\n6 747     7.459998e+01 4.869995e+00\n7 747     3.719971e+00 9.082999e+01\n8 747     2.352100e+02 -3.894000e+01\n10 747     3.840027e+00 1.054600e+02\n12 747     8.787000e+01 5.606000e+01\n13 747     4.516801e+02 -2.463400e+02\n15 747     7.869000e+01 9.707001e+01\n0 748     -1.376600e+02 9.789999e+01\n1 748     8.312000e+01 1.573000e+02\n2 748     -1.431600e+02 -1.000000e+01\n3 748     -2.358400e+02 -3.296100e+02\n4 748     -1.984500e+02 -2.927300e+02\n5 748     4.018101e+02 -5.740699e+02\n6 748     -3.254200e+02 4.597998e+01\n7 748     -2.631200e+02 1.722700e+02\n8 748     -7.428003e+01 -4.056000e+01\n9 748     -2.361800e+02 6.791998e+01\n10 748     -2.643300e+02 2.415100e+02\n12 748     -2.687000e+02 1.002300e+02\n13 748     1.933800e+02 -1.619600e+02\n15 748     -2.283300e+02 2.509400e+02\n0 749     3.468500e+02 -6.328003e+01\n1 749     4.963700e+02 -1.422100e+02\n3 749     3.539700e+02 -3.031300e+02\n7 749     2.567500e+02 1.014200e+02\n8 749     4.228500e+02 -4.482999e+01\n9 749     2.739100e+02 1.014200e+02\n10 749     3.142100e+02 1.033700e+02\n12 749     3.663400e+02 7.783002e+01\n13 749     6.663000e+02 -2.540400e+02\n15 749     4.502400e+02 9.726001e+01\n0 750     6.509100e+02 -1.941998e+01\n1 750     8.767300e+02 -2.076400e+02\n2 750     6.027600e+02 -1.713000e+01\n7 750     5.037400e+02 1.709000e+02\n10 750     6.639600e+02 1.874800e+02\n0 751     1.421200e+02 -2.589000e+02\n1 751     2.176500e+02 -2.669900e+02\n2 751     3.999600e+02 -2.029600e+02\n6 751     2.201800e+02 -2.208199e+02\n7 751     1.032700e+02 -1.174600e+02\n9 751     2.335800e+02 -6.642999e+01\n12 751     2.286000e+02 -1.832900e+02\n15 751     1.921000e+02 -1.944500e+02\n0 752     5.428600e+02 1.565400e+02\n1 752     8.187400e+02 1.209998e+01\n2 752     4.349000e+02 1.087800e+02\n3 752     2.983600e+02 -2.065900e+02\n6 752     3.418300e+02 2.894000e+02\n7 752     3.730699e+02 3.203100e+02\n8 752     4.156100e+02 6.248001e+01\n10 752     5.233101e+02 3.819200e+02\n12 752     4.309000e+02 2.984600e+02\n13 752     7.446200e+02 -6.741998e+01\n0 753     1.284900e+02 -4.252002e+01\n1 753     2.702900e+02 -5.046997e+01\n2 753     3.015900e+02 1.851001e+01\n6 753     1.281100e+02 1.573999e+01\n7 753     5.217999e+01 9.409000e+01\n10 753     5.984003e+01 1.052100e+02\n13 753     4.943500e+02 -2.463300e+02\n15 753     1.445500e+02 9.679001e+01\n0 754     1.810400e+02 -1.095400e+02\n1 754     3.044399e+02 -1.331600e+02\n2 754     3.679800e+02 -4.710999e+01\n6 754     1.985100e+02 -4.565997e+01\n8 754     3.319000e+02 -8.792999e+01\n9 754     1.982100e+02 5.987000e+01\n12 754     2.191500e+02 -2.309998e+00\n15 754     2.256100e+02 1.290997e+01\n0 755     6.879999e+01 -7.390997e+01\n1 755     2.035100e+02 -6.334003e+01\n3 755     1.599100e+02 -3.359400e+02\n7 755     -2.219971e+00 5.273999e+01\n9 755     1.021200e+02 6.862000e+01\n15 755     6.778003e+01 4.671002e+01\n0 756     1.647200e+02 -4.734003e+01\n1 756     3.055400e+02 -6.654999e+01\n4 756     -3.300700e+02 -5.458700e+02\n6 756     1.671600e+02 2.137000e+01\n9 756     1.717400e+02 1.146000e+02\n15 756     1.950800e+02 9.514001e+01\n0 757     2.283002e+01 -5.015002e+01\n1 757     1.669800e+02 -2.727002e+01\n2 757     1.910800e+02 -2.273999e+01\n4 757     -3.108800e+02 -4.289500e+02\n7 757     -5.321002e+01 6.642999e+01\n9 757     5.317999e+01 7.234003e+01\n13 757     3.995699e+02 -2.638900e+02\n0 758     6.510800e+02 -7.752002e+01\n1 758     8.586200e+02 -2.691600e+02\n2 758     6.209000e+02 -7.833002e+01\n7 758     5.118300e+02 1.146000e+02\n8 758     5.674700e+02 -9.529999e+01\n12 758     6.183000e+02 7.908002e+01\n0 759     1.836700e+02 -3.548999e+01\n1 759     3.284500e+02 -6.073999e+01\n2 759     3.454700e+02 3.385999e+01\n3 759     2.438500e+02 -2.726500e+02\n4 759     -3.240800e+02 -5.615400e+02\n7 759     1.039600e+02 1.093900e+02\n9 759     1.756500e+02 1.257000e+02\n10 759     1.229800e+02 1.190400e+02\n0 760     -2.902500e+02 7.341998e+01\n1 760     -4.297998e+01 1.702100e+02\n7 760     -4.368900e+02 1.057600e+02\n15 760     -4.256900e+02 1.961000e+02\n0 761     -3.094700e+02 7.076001e+01\n1 761     -6.190997e+01 1.730000e+02\n13 761     -9.659973e+00 -2.120800e+02\n0 762     -3.094700e+02 7.076001e+01\n1 762     -6.190997e+01 1.730000e+02\n10 762     -4.642100e+02 1.923100e+02\n0 763     -2.406200e+02 4.220200e+02\n1 763     1.125100e+02 4.909900e+02\n2 763     -5.204100e+02 1.660500e+02\n5 763     1.630600e+02 -2.328700e+02\n7 763     -4.558700e+02 4.611200e+02\n8 763     -3.472300e+02 1.201800e+02\n11 763     -6.647998e+01 -3.354400e+02\n13 763     -2.899780e-01 9.157999e+01\n0 764     -2.283400e+02 2.496800e+02\n1 764     7.962000e+01 3.199400e+02\n7 764     -4.148000e+02 2.853400e+02\n15 764     -3.626500e+02 4.460000e+02\n0 765     -2.229900e+02 2.162600e+02\n1 765     7.207001e+01 2.870300e+02\n7 765     -4.021400e+02 2.539200e+02\n11 765     -5.725000e+01 -5.251600e+02\n0 766     -3.926400e+02 7.120001e+01\n1 766     -1.385100e+02 1.954600e+02\n10 766     -5.628500e+02 1.848500e+02\n0 767     -3.489300e+02 2.251400e+02\n1 767     -4.342999e+01 3.275500e+02\n7 767     -5.359800e+02 2.426300e+02\n11 767     -1.720300e+02 -5.144500e+02\n13 767     -8.379999e+01 -8.478998e+01\n0 768     -2.929600e+02 4.023100e+02\n1 768     5.603003e+01 4.844700e+02\n5 768     1.096200e+02 -2.534000e+02\n7 768     -5.061600e+02 4.344900e+02\n8 768     -3.903700e+02 9.960999e+01\n10 768     -4.871800e+02 5.930500e+02\n11 768     -1.133600e+02 -3.528000e+02\n12 768     -6.151500e+02 3.476600e+02\n13 768     -4.207001e+01 7.267999e+01\n14 768     2.596997e+01 -3.437600e+02\n0 769     -2.924900e+02 7.789001e+01\n1 769     -4.370001e+01 1.750400e+02\n5 769     1.493500e+02 -6.118000e+02\n7 769     -4.399600e+02 1.096200e+02\n13 769     4.219971e+00 -2.047100e+02\n15 769     -4.288300e+02 2.016600e+02\n0 770     -4.485300e+02 3.194900e+02\n1 770     -1.108600e+02 4.480500e+02\n11 770     -2.526600e+02 -4.248500e+02\n0 771     -5.339100e+02 3.950000e+02\n1 771     -1.766700e+02 5.346700e+02\n10 771     -7.849800e+02 5.646900e+02\n11 771     -3.236500e+02 -3.553300e+02\n13 771     -2.350000e+02 5.634998e+01\n0 772     -2.162300e+02 4.290000e+02\n1 772     1.386500e+02 4.917600e+02\n2 772     -4.956400e+02 1.745600e+02\n7 772     -4.320700e+02 4.710200e+02\n14 772     1.025000e+02 -3.150600e+02\n0 773     -5.226500e+02 3.506200e+02\n1 773     -1.767500e+02 4.896300e+02\n10 773     -7.634700e+02 5.110500e+02\n11 773     -3.184700e+02 -3.952200e+02\n15 773     -7.921300e+02 5.492600e+02\n0 774     -2.329900e+02 4.417800e+02\n1 774     1.248300e+02 5.082900e+02\n4 774     -1.719971e+00 -2.199400e+02\n5 774     1.722600e+02 -2.124200e+02\n8 774     -3.417000e+02 1.382900e+02\n11 774     -5.931000e+01 -3.181500e+02\n12 774     -5.530700e+02 4.046400e+02\n13 774     6.270020e+00 1.092300e+02\n0 775     -2.230200e+02 3.983300e+02\n1 775     1.244400e+02 4.634500e+02\n11 775     -5.106000e+01 -3.563400e+02\n14 775     9.422998e+01 -3.480500e+02\n0 776     -2.178500e+02 4.257700e+02\n1 776     1.362700e+02 4.891100e+02\n2 776     -4.974000e+02 1.699200e+02\n7 776     -4.330800e+02 4.678900e+02\n14 776     1.009000e+02 -3.184100e+02\n0 777     -2.650100e+02 4.342800e+02\n1 777     9.152002e+01 5.087800e+02\n2 777     -5.452200e+02 1.806700e+02\n4 777     -3.330017e+00 -2.016600e+02\n5 777     1.401900e+02 -2.198300e+02\n7 777     -4.821900e+02 4.712600e+02\n8 777     -3.677300e+02 1.311300e+02\n11 777     -8.762000e+01 -3.250700e+02\n12 777     -5.883600e+02 3.911600e+02\n13 777     -1.932001e+01 1.009800e+02\n14 777     5.540002e+01 -3.100800e+02\n0 778     -5.595001e+01 -6.734998e+01\n1 778     9.070001e+01 -2.083002e+01\n7 778     -1.324100e+02 3.392999e+01\n10 778     -1.508800e+02 5.669000e+01\n13 778     3.250699e+02 -2.870000e+02\n15 778     -1.002700e+02 3.763000e+01\n0 779     -3.225800e+02 3.456800e+02\n1 779     1.408002e+01 4.365200e+02\n2 779     -6.026500e+02 6.803998e+01\n14 779     -8.109985e+00 -4.063000e+02\n15 779     -5.099100e+02 5.679000e+02\n0 780     -4.260000e+02 4.130900e+02\n1 780     -7.048999e+01 5.266300e+02\n7 780     -6.459800e+02 4.308200e+02\n8 780     -5.056300e+02 1.067300e+02\n12 780     -7.752900e+02 3.409000e+02\n13 780     -1.483300e+02 7.628998e+01\n14 780     -1.035600e+02 -3.330900e+02\n0 781     -3.121600e+02 3.262100e+02\n1 781     2.019000e+01 4.149800e+02\n7 781     -5.151400e+02 3.515400e+02\n10 781     -4.992400e+02 4.984300e+02\n14 781     7.199707e-01 -4.277700e+02\n15 781     -4.911700e+02 5.422300e+02\n0 782     -2.162300e+02 4.290000e+02\n1 782     1.386500e+02 4.917600e+02\n2 782     -4.956400e+02 1.745600e+02\n5 782     1.878500e+02 -2.259500e+02\n7 782     -4.320700e+02 4.710200e+02\n12 782     -5.312900e+02 3.915200e+02\n14 782     1.025000e+02 -3.150600e+02\n0 783     -1.068800e+02 -5.352200e+02\n1 783     -9.588000e+01 -4.491500e+02\n0 784     -2.542200e+02 -4.306800e+02\n1 784     -1.916600e+02 -3.055700e+02\n6 784     -2.070200e+02 -6.229200e+02\n7 784     -2.756000e+02 -3.777100e+02\n9 784     -9.219000e+01 -4.241200e+02\n0 785     -1.492700e+02 -5.222000e+02\n1 785     -1.298300e+02 -4.230300e+02\n4 785     -6.566700e+02 -2.665200e+02\n7 785     -1.455100e+02 -4.435400e+02\n9 785     7.373999e+01 -4.432600e+02\n0 786     -1.916400e+02 -5.028400e+02\n1 786     -1.615900e+02 -3.914400e+02\n4 786     -6.289800e+02 -2.331000e+02\n6 786     -8.298001e+01 -6.696700e+02\n7 786     -1.943600e+02 -4.340400e+02\n9 786     1.991998e+01 -4.476500e+02\n0 787     -1.593900e+02 -5.170300e+02\n1 787     -1.371400e+02 -4.149100e+02\n6 787     -3.512000e+01 -6.683500e+02\n7 787     -1.568500e+02 -4.408900e+02\n0 788     7.440997e+01 -2.972998e+01\n1 788     2.216400e+02 -2.159998e+01\n3 788     1.495500e+02 -2.896000e+02\n4 788     -3.031600e+02 -4.726000e+02\n9 788     9.345001e+01 1.094900e+02\n15 788     6.932001e+01 1.069300e+02\n0 789     -1.494900e+02 -4.932800e+02\n1 789     -1.194200e+02 -3.964300e+02\n6 789     -4.008002e+01 -6.389301e+02\n7 789     -1.527300e+02 -4.157000e+02\n9 789     5.325000e+01 -4.242700e+02\n12 789     -5.852002e+01 -5.887700e+02\n0 790     -1.670400e+02 -4.871300e+02\n1 790     -1.334400e+02 -3.847700e+02\n6 790     -6.340997e+01 -6.403400e+02\n7 790     -1.720100e+02 -4.137200e+02\n9 790     3.415002e+01 -4.270000e+02\n0 791     -1.742400e+02 -5.134500e+02\n1 791     -1.496100e+02 -4.067300e+02\n6 791     -5.577002e+01 -6.718600e+02\n7 791     -1.730900e+02 -4.407700e+02\n0 792     -1.063300e+02 -2.346100e+02\n1 792     -5.399780e-01 -1.658000e+02\n4 792     -4.286100e+02 -3.113900e+02\n6 792     -1.079900e+02 -3.142000e+02\n10 792     -1.916700e+02 -1.418500e+02\n12 792     -9.962000e+01 -2.600400e+02\n13 792     2.841200e+02 -4.482800e+02\n15 792     -1.446000e+02 -1.945900e+02\n0 793     9.134003e+01 7.904999e+01\n1 793     2.732100e+02 7.985999e+01\n4 793     -2.294600e+02 -4.848199e+02\n10 793     4.099976e+00 2.415300e+02\n13 793     4.425601e+02 -1.474100e+02\n15 793     7.856000e+01 2.575000e+02\n0 794     5.969971e+00 -2.653300e+02\n1 794     8.969000e+01 -2.304000e+02\n4 794     -4.720000e+02 -4.068500e+02\n7 794     -3.465002e+01 -1.521300e+02\n10 794     -5.770001e+01 -1.645500e+02\n13 794     4.051600e+02 -4.592700e+02\n15 794     9.710022e+00 -2.210400e+02\n0 795     -3.157700e+02 3.880900e+02\n1 795     3.041998e+01 4.763600e+02\n2 795     -5.966200e+02 1.225800e+02\n7 795     -5.277900e+02 4.167800e+02\n10 795     -5.132200e+02 5.737900e+02\n12 795     -6.395100e+02 3.258900e+02\n14 795     2.159973e+00 -3.597000e+02\n0 796     -3.435300e+02 3.439500e+02\n1 796     -7.299988e+00 4.382500e+02\n2 796     -6.254900e+02 7.027002e+01\n4 796     -4.589001e+01 -1.493300e+02\n5 796     5.266998e+01 -3.131200e+02\n8 796     -4.324700e+02 4.354999e+01\n10 796     -5.407400e+02 5.167700e+02\n11 796     -1.605200e+02 -4.109900e+02\n12 796     -6.660300e+02 2.719200e+02\n15 796     -5.385900e+02 5.580100e+02\n0 797     -3.485900e+02 3.320300e+02\n1 797     -1.452002e+01 4.297100e+02\n8 797     -4.379200e+02 2.645999e+01\n10 797     -5.451300e+02 5.018600e+02\n11 797     -1.668500e+02 -4.156100e+02\n14 797     -3.520001e+01 -4.217200e+02\n0 798     -7.953200e+02 5.884998e+01\n1 798     -4.946900e+02 2.844400e+02\n0 799     -3.008500e+02 4.894800e+02\n1 799     6.883002e+01 5.716200e+02\n2 799     -5.833900e+02 2.485000e+02\n5 799     1.104700e+02 -1.609100e+02\n7 799     -5.267500e+02 5.259000e+02\n8 799     -3.991800e+02 1.835900e+02\n12 799     -6.391000e+02 4.545300e+02\n0 800     -4.203900e+02 3.213700e+02\n1 800     -8.544000e+01 4.362100e+02\n7 800     -6.261300e+02 3.327300e+02\n10 800     -6.313500e+02 4.833200e+02\n11 800     -2.291600e+02 -4.246100e+02\n15 800     -6.423300e+02 5.205100e+02\n0 801     -2.026800e+02 4.509300e+02\n1 801     1.574700e+02 5.101300e+02\n2 801     -4.831200e+02 2.012000e+02\n5 801     2.028300e+02 -2.024000e+02\n7 801     -4.214200e+02 4.956500e+02\n11 801     -3.226001e+01 -3.100300e+02\n12 801     -5.200100e+02 4.207900e+02\n13 801     3.029999e+01 1.177400e+02\n14 801     1.167800e+02 -2.917600e+02\n0 802     -2.415700e+02 4.378800e+02\n1 802     1.154400e+02 5.068400e+02\n2 802     -5.215600e+02 1.846300e+02\n5 802     1.636300e+02 -2.165600e+02\n7 802     -4.589400e+02 4.775600e+02\n8 802     -3.484700e+02 1.345800e+02\n12 802     -5.618500e+02 3.989000e+02\n0 803     -2.603100e+02 3.995400e+02\n1 803     8.787000e+01 4.740400e+02\n5 803     1.424400e+02 -2.572100e+02\n8 803     -3.619800e+02 9.817999e+01\n11 803     -8.362000e+01 -3.555000e+02\n12 803     -5.764000e+02 3.492200e+02\n13 803     -1.609998e+01 7.113000e+01\n0 804     -2.512900e+02 4.232900e+02\n1 804     1.013600e+02 4.952500e+02\n4 804     -1.325000e+01 -2.063900e+02\n0 805     -2.882400e+02 3.830100e+02\n1 805     5.626001e+01 4.645100e+02\n5 805     1.123700e+02 -2.749400e+02\n7 805     -4.987700e+02 4.147400e+02\n8 805     -3.851300e+02 8.081000e+01\n10 805     -4.786400e+02 5.696100e+02\n11 805     -1.094300e+02 -3.694900e+02\n12 805     -6.062100e+02 3.249500e+02\n13 805     -3.864001e+01 5.545001e+01\n14 805     2.916998e+01 -3.656800e+02\n0 806     -5.062200e+02 2.274800e+02\n1 806     -1.886100e+02 3.689100e+02\n4 806     -9.771997e+01 -4.825000e+01\n0 807     -2.458400e+02 4.419100e+02\n1 807     1.121300e+02 5.118800e+02\n2 807     -5.261800e+02 1.904400e+02\n5 807     1.598400e+02 -2.116100e+02\n7 807     -4.640100e+02 4.815100e+02\n12 807     -5.674700e+02 4.037900e+02\n14 807     7.438000e+01 -3.017000e+02\n0 808     -4.135000e+02 2.665000e+02\n1 808     -9.090002e+01 3.825700e+02\n7 808     -6.113800e+02 2.757200e+02\n0 809     -3.210500e+02 3.504600e+02\n1 809     1.646997e+01 4.405500e+02\n2 809     -6.014200e+02 7.427002e+01\n7 809     -5.280500e+02 3.762500e+02\n8 809     -4.124600e+02 4.589999e+01\n10 809     -5.141100e+02 5.268400e+02\n12 809     -6.393200e+02 2.779300e+02\n14 809     -6.359985e+00 -4.010600e+02\n15 809     -5.087100e+02 5.745400e+02\n0 810     -4.004900e+02 4.178400e+02\n1 810     -4.475000e+01 5.253300e+02\n2 810     -6.872900e+02 1.596600e+02\n5 810     5.109985e+00 -2.351000e+02\n7 810     -6.198500e+02 4.387200e+02\n8 810     -4.829500e+02 1.115400e+02\n10 810     -6.224200e+02 6.038800e+02\n12 810     -7.450600e+02 3.501300e+02\n0 811     -5.904200e+02 4.103300e+02\n1 811     -2.258000e+02 5.615000e+02\n7 811     -8.227000e+02 4.096400e+02\n11 811     -3.705600e+02 -3.413500e+02\n14 811     -2.644000e+02 -3.351100e+02\n0 812     -3.010700e+02 3.388300e+02\n1 812     3.335999e+01 4.248900e+02\n2 812     -5.797300e+02 6.257001e+01\n5 812     9.548999e+01 -3.253100e+02\n8 812     -3.955800e+02 3.748001e+01\n10 812     -4.883000e+02 5.106100e+02\n12 812     -6.172100e+02 2.719700e+02\n0 813     4.539001e+01 -7.023999e+01\n1 813     1.822600e+02 -5.247998e+01\n2 813     2.238600e+02 -3.510999e+01\n3 813     1.345300e+02 -3.407900e+02\n4 813     -3.291800e+02 -4.486500e+02\n7 813     -2.715002e+01 5.171997e+01\n9 813     7.952002e+01 6.470001e+01\n15 813     3.560999e+01 4.803003e+01\n0 814     -5.309000e+02 3.381200e+02\n1 814     -1.858000e+02 4.746300e+02\n15 814     -7.983900e+02 5.230200e+02\n0 815     -2.103900e+02 4.027200e+02\n1 815     1.381600e+02 4.648200e+02\n2 815     -4.851800e+02 1.476600e+02\n4 815     -2.338000e+01 -2.321400e+02\n8 815     -3.185800e+02 1.057700e+02\n14 815     1.065000e+02 -3.425200e+02\n0 816     -4.051600e+02 3.706200e+02\n1 816     -6.082001e+01 4.818000e+02\n2 816     -6.892400e+02 1.011800e+02\n4 816     -2.725000e+01 -1.196900e+02\n7 816     -6.159400e+02 3.887000e+02\n10 816     -6.202100e+02 5.444600e+02\n11 816     -2.144800e+02 -3.791000e+02\n13 816     -1.312300e+02 4.056000e+01\n0 817     -2.584200e+02 4.247400e+02\n1 817     9.535999e+01 4.977900e+02\n2 817     -5.378900e+02 1.690100e+02\n4 817     -8.809998e+00 -2.045000e+02\n5 817     1.460600e+02 -2.294400e+02\n7 817     -4.744400e+02 4.618800e+02\n8 817     -3.618100e+02 1.225500e+02\n11 817     -8.240002e+01 -3.334600e+02\n12 817     -5.790800e+02 3.808600e+02\n13 817     -1.432001e+01 9.320001e+01\n14 817     6.104999e+01 -3.199800e+02\n0 818     6.348500e+02 -3.428003e+01\n1 818     8.553199e+02 -2.183200e+02\n2 818     5.900000e+02 -4.187000e+01\n7 818     4.900800e+02 1.533500e+02\n8 818     5.420100e+02 -6.478998e+01\n12 818     5.877800e+02 1.202900e+02\n13 818     8.632000e+02 -2.259800e+02\n15 818     8.605400e+02 1.762500e+02\n0 819     -3.205300e+02 1.972600e+02\n1 819     -2.695001e+01 2.941100e+02\n7 819     -4.986100e+02 2.205100e+02\n0 820     -4.305600e+02 4.729600e+02\n1 820     -6.125000e+01 5.854000e+02\n2 820     -7.201900e+02 2.298600e+02\n5 820     -1.770001e+01 -1.766100e+02\n7 820     -6.595400e+02 4.945400e+02\n8 820     -5.107600e+02 1.656500e+02\n12 820     -7.913300e+02 4.157800e+02\n14 820     -1.012800e+02 -2.703700e+02\n0 821     -4.308100e+02 4.647000e+02\n1 821     -6.392999e+01 5.775500e+02\n2 821     -7.207500e+02 2.192800e+02\n7 821     -6.588900e+02 4.855600e+02\n8 821     -5.105000e+02 1.575200e+02\n12 821     -7.871400e+02 4.060500e+02\n14 821     -1.022500e+02 -2.788100e+02\n0 822     -4.004900e+02 4.178400e+02\n1 822     -4.475000e+01 5.253300e+02\n2 822     -6.872900e+02 1.596600e+02\n5 822     5.109985e+00 -2.351000e+02\n7 822     -6.198500e+02 4.387200e+02\n8 822     -4.829500e+02 1.115400e+02\n14 822     -7.804999e+01 -3.279900e+02\n0 823     -3.734200e+02 3.379100e+02\n1 823     -3.727002e+01 4.416700e+02\n7 823     -5.801700e+02 3.570900e+02\n10 823     -5.765200e+02 5.069300e+02\n15 823     -5.799000e+02 5.503400e+02\n0 824     -3.071100e+02 4.294400e+02\n1 824     4.870001e+01 5.142000e+02\n2 824     -5.888700e+02 1.748200e+02\n11 824     -1.250100e+02 -3.287400e+02\n14 824     1.409998e+01 -3.156000e+02\n0 825     -3.329800e+02 4.853700e+02\n1 825     3.612000e+01 5.749800e+02\n2 825     -6.166500e+02 2.436500e+02\n7 825     -5.592400e+02 5.182100e+02\n12 825     -6.763200e+02 4.446500e+02\n0 826     -2.904000e+02 1.073900e+02\n1 826     -2.917999e+01 2.005500e+02\n4 826     -1.849300e+02 -1.699400e+02\n8 826     -3.096200e+02 -1.429100e+02\n0 827     -3.051800e+02 2.200500e+02\n1 827     -4.619995e+00 3.117400e+02\n7 827     -4.880100e+02 2.447000e+02\n11 827     -1.323400e+02 -5.200400e+02\n0 828     -4.785100e+02 1.521900e+02\n1 828     -1.868400e+02 2.923800e+02\n7 828     -6.574200e+02 1.508100e+02\n0 829     -4.410600e+02 1.522700e+02\n1 829     -1.537500e+02 2.831900e+02\n7 829     -6.147700e+02 1.573200e+02\n13 829     -1.483600e+02 -1.510900e+02\n0 830     -4.872500e+02 1.293200e+02\n1 830     -2.036400e+02 2.734100e+02\n5 830     -8.926001e+01 -5.518199e+02\n7 830     -6.586600e+02 1.265500e+02\n0 831     -3.762000e+02 2.980700e+02\n1 831     -4.906000e+01 4.038200e+02\n5 831     1.398999e+01 -3.666600e+02\n7 831     -5.771500e+02 3.141500e+02\n10 831     -5.737000e+02 4.580600e+02\n14 831     -6.675000e+01 -4.587000e+02\n15 831     -5.763900e+02 4.939900e+02\n0 832     -4.639700e+02 1.373000e+02\n1 832     -1.799100e+02 2.749900e+02\n5 832     -6.634003e+01 -5.426899e+02\n7 832     -6.373000e+02 1.385500e+02\n10 832     -6.597800e+02 2.567000e+02\n13 832     -1.672200e+02 -1.651300e+02\n0 833     -4.395100e+02 1.569200e+02\n1 833     -1.507800e+02 2.869300e+02\n7 833     -6.153200e+02 1.622900e+02\n0 834     -2.964600e+02 1.998300e+02\n1 834     -3.260010e+00 2.904900e+02\n0 835     -4.403700e+02 1.406600e+02\n1 835     -1.573000e+02 2.721700e+02\n5 835     -3.790002e+01 -5.395800e+02\n0 836     -3.843900e+02 3.145400e+02\n1 836     -5.307001e+01 4.217900e+02\n5 836     7.919983e+00 -3.482100e+02\n7 836     -5.877800e+02 3.304700e+02\n10 836     -5.860700e+02 4.777700e+02\n11 836     -1.979000e+02 -4.305900e+02\n12 836     -7.083600e+02 2.212700e+02\n13 836     -1.182700e+02 -8.390015e+00\n14 836     -7.362000e+01 -4.414900e+02\n15 836     -5.908200e+02 5.162300e+02\n0 837     -3.130400e+02 4.296400e+02\n1 837     4.271002e+01 5.162500e+02\n2 837     -5.945500e+02 1.746300e+02\n5 837     9.254999e+01 -2.238300e+02\n7 837     -5.305600e+02 4.610900e+02\n8 837     -4.081100e+02 1.256000e+02\n12 837     -6.428600e+02 3.783000e+02\n14 837     8.309998e+00 -3.154300e+02\n0 838     -4.603600e+02 2.004100e+02\n1 838     -1.549400e+02 3.322900e+02\n7 838     -6.479200e+02 2.013000e+02\n10 838     -6.625500e+02 3.325400e+02\n13 838     -1.779400e+02 -1.117900e+02\n14 838     -1.555000e+02 -5.698000e+02\n0 839     -3.434500e+02 4.290000e+02\n1 839     1.303998e+01 5.223800e+02\n7 839     -5.619700e+02 4.570100e+02\n11 839     -1.566300e+02 -3.303500e+02\n12 839     -6.786900e+02 3.724400e+02\n0 840     -3.047600e+02 3.565500e+02\n1 840     3.381000e+01 4.429600e+02\n5 840     9.282001e+01 -3.032400e+02\n7 840     -5.120400e+02 3.847700e+02\n10 840     -4.951300e+02 5.357600e+02\n12 840     -6.212500e+02 2.884100e+02\n0 841     -3.071100e+02 4.294400e+02\n1 841     4.870001e+01 5.142000e+02\n2 841     -5.888700e+02 1.748200e+02\n7 841     -5.248400e+02 4.615700e+02\n8 841     -4.031500e+02 1.255000e+02\n11 841     -1.250100e+02 -3.287400e+02\n12 841     -6.364400e+02 3.790000e+02\n14 841     1.409998e+01 -3.156000e+02\n0 842     -3.909600e+02 2.903100e+02\n1 842     -6.497998e+01 4.002300e+02\n7 842     -5.915300e+02 3.037700e+02\n10 842     -5.908700e+02 4.473300e+02\n13 842     -1.246600e+02 -2.992999e+01\n14 842     -8.258002e+01 -4.679200e+02\n15 842     -5.956800e+02 4.813100e+02\n0 843     3.014200e+02 1.378998e+01\n1 843     4.705100e+02 -4.972998e+01\n7 843     2.033500e+02 1.717800e+02\n13 843     6.219399e+02 -1.890900e+02\n15 843     3.771500e+02 1.965600e+02\n0 844     2.946200e+02 6.059998e+00\n1 844     4.603000e+02 -5.469000e+01\n6 844     2.611300e+02 1.065700e+02\n7 844     1.990400e+02 1.637300e+02\n10 844     2.470900e+02 1.782500e+02\n12 844     2.981700e+02 1.480100e+02\n13 844     6.182400e+02 -1.962500e+02\n15 844     3.682100e+02 1.856500e+02\n0 845     3.198101e+02 -4.009998e+01\n1 845     4.737800e+02 -1.102000e+02\n7 845     2.281801e+02 1.209800e+02\n10 845     2.805300e+02 1.278100e+02\n15 845     4.092400e+02 1.256600e+02\n0 846     5.371002e+01 -2.197400e+02\n1 846     1.414200e+02 -1.999700e+02\n3 846     2.238500e+02 -4.717000e+02\n6 846     1.204400e+02 -2.036400e+02\n7 846     1.162000e+01 -9.337000e+01\n10 846     -7.530029e+00 -1.075500e+02\n12 846     1.206200e+02 -1.591500e+02\n13 846     4.558300e+02 -4.076300e+02\n15 846     6.628998e+01 -1.532900e+02\n0 847     2.295300e+02 3.507800e+02\n1 847     5.748101e+02 2.973500e+02\n2 847     -3.666998e+01 1.209000e+02\n7 847     1.827002e+01 4.452400e+02\n8 847     4.557001e+01 8.881000e+01\n13 847     3.905000e+02 5.741998e+01\n14 847     5.630699e+02 -3.842400e+02\n0 848     6.160699e+02 7.648999e+01\n1 848     8.704000e+02 -9.509998e+01\n2 848     5.386100e+02 6.320001e+01\n6 848     4.549200e+02 2.269100e+02\n7 848     4.567200e+02 2.565800e+02\n8 848     5.009600e+02 2.254999e+01\n9 848     3.224200e+02 1.534000e+02\n10 848     6.155400e+02 2.954900e+02\n12 848     5.389000e+02 2.359100e+02\n13 848     8.288700e+02 -1.281800e+02\n0 849     -2.112000e+01 6.328998e+01\n1 849     1.634301e+02 9.570999e+01\n3 849     -3.830017e+00 -2.467900e+02\n4 849     -2.268700e+02 -3.945800e+02\n5 849     5.984200e+02 -6.004301e+02\n7 849     -1.205300e+02 1.701400e+02\n8 849     1.022000e+02 1.151999e+01\n10 849     -1.249900e+02 2.122200e+02\n12 849     -7.410999e+01 1.329600e+02\n13 849     3.400699e+02 -1.712900e+02\n15 849     -7.121002e+01 2.201900e+02\n0 850     -3.488000e+01 6.392999e+01\n1 850     1.517600e+02 1.001900e+02\n4 850     -2.257800e+02 -3.836100e+02\n5 850     5.790800e+02 -6.004301e+02\n7 850     -1.360200e+02 1.680200e+02\n8 850     8.628998e+01 5.809998e+00\n10 850     -1.411400e+02 2.119200e+02\n12 850     -9.360999e+01 1.273700e+02\n15 850     -8.953998e+01 2.192600e+02\n0 851     2.194399e+02 9.820007e+00\n1 851     3.796899e+02 -2.660999e+01\n6 851     1.971600e+02 9.734998e+01\n7 851     1.299400e+02 1.588800e+02\n10 851     1.597000e+02 1.748100e+02\n12 851     2.249500e+02 1.432600e+02\n13 851     5.613700e+02 -1.954300e+02\n15 851     2.623800e+02 1.803500e+02\n0 852     2.298900e+02 -1.489001e+01\n1 852     3.827400e+02 -5.437000e+01\n2 852     3.767300e+02 5.716998e+01\n7 852     1.440400e+02 1.363900e+02\n15 852     2.802700e+02 1.491500e+02\n0 853     1.162800e+02 7.553998e+01\n1 853     2.965900e+02 6.923999e+01\n5 853     7.683500e+02 -5.810300e+02\n7 853     1.803998e+01 2.073600e+02\n0 854     3.145699e+02 -1.129900e+02\n1 854     4.416801e+02 -1.806100e+02\n7 854     2.389399e+02 5.171997e+01\n15 854     4.099000e+02 2.571997e+01\n0 855     9.907001e+01 4.190200e+02\n1 855     4.601899e+02 4.022300e+02\n2 855     -1.933900e+02 1.676400e+02\n3 855     -3.301000e+02 -1.618400e+02\n7 855     -1.207300e+02 4.951100e+02\n8 855     -7.809003e+01 1.246200e+02\n13 855     2.689399e+02 1.071300e+02\n0 856     -1.655100e+02 3.931300e+02\n1 856     1.832000e+02 4.442100e+02\n7 856     -3.756700e+02 4.385600e+02\n8 856     -2.836200e+02 9.129001e+01\n13 856     5.927002e+01 6.878003e+01\n14 856     1.500601e+02 -3.539800e+02\n0 857     -2.474900e+02 3.989600e+02\n1 857     9.951001e+01 4.691800e+02\n4 857     -2.491998e+01 -2.076200e+02\n5 857     1.537000e+02 -2.596600e+02\n10 857     -4.315500e+02 5.925900e+02\n11 857     -7.347998e+01 -3.569300e+02\n12 857     -5.630200e+02 3.472900e+02\n13 857     -6.599976e+00 7.040002e+01\n0 858     -4.431000e+02 1.441500e+02\n1 858     -1.585800e+02 2.760600e+02\n5 858     -4.257001e+01 -5.360900e+02\n7 858     -6.150100e+02 1.489100e+02\n8 858     -4.802400e+02 -1.445200e+02\n0 859     -2.796700e+02 1.873400e+02\n1 859     7.869995e+00 2.743400e+02\n7 859     -4.529300e+02 2.174600e+02\n0 860     1.940900e+02 3.448300e+02\n1 860     5.353500e+02 3.008200e+02\n6 860     -2.092500e+02 3.724300e+02\n10 860     9.866998e+01 5.694700e+02\n0 861     2.822500e+02 3.355200e+02\n1 861     6.248000e+02 2.674600e+02\n6 861     -1.005700e+02 3.854400e+02\n7 861     7.228998e+01 4.382400e+02\n11 861     4.167500e+02 -4.015000e+02\n0 862     2.822500e+02 3.355200e+02\n1 862     6.248000e+02 2.674600e+02\n6 862     -1.005700e+02 3.854400e+02\n7 862     7.228998e+01 4.382400e+02\n11 862     4.167500e+02 -4.015000e+02\n0 863     2.074200e+02 3.527900e+02\n1 863     5.525500e+02 3.051500e+02\n2 863     -6.121997e+01 1.197600e+02\n6 863     -1.992200e+02 3.849100e+02\n12 863     -4.413000e+01 3.782800e+02\n13 863     3.704800e+02 5.808002e+01\n14 863     5.382700e+02 -3.825200e+02\n0 864     1.129200e+02 4.379100e+02\n1 864     4.803101e+02 4.168300e+02\n2 864     -1.820100e+02 1.897500e+02\n4 864     -3.002002e+01 -4.253100e+02\n5 864     5.152000e+02 -2.139400e+02\n6 864     -3.425400e+02 4.644900e+02\n7 864     -1.098800e+02 5.160000e+02\n8 864     -6.991998e+01 1.447300e+02\n12 864     -1.727100e+02 4.517900e+02\n13 864     2.804500e+02 1.233300e+02\n0 865     2.664399e+02 4.854600e+02\n1 865     6.604000e+02 4.267100e+02\n5 865     6.704600e+02 -1.598200e+02\n7 865     3.041998e+01 5.801600e+02\n8 865     3.810999e+01 1.918500e+02\n11 865     3.899600e+02 -2.650800e+02\n12 865     -2.156000e+01 5.278700e+02\n13 865     4.016801e+02 1.734700e+02\n14 865     5.741300e+02 -2.400400e+02\n0 866     1.032200e+02 3.968900e+02\n1 866     4.594600e+02 3.777500e+02\n4 866     -5.378998e+01 -4.154900e+02\n7 866     -1.141600e+02 4.735100e+02\n11 866     2.467100e+02 -3.513000e+02\n0 867     1.380300e+02 4.573900e+02\n1 867     5.120000e+02 4.304300e+02\n4 867     -1.990002e+01 -4.434500e+02\n5 867     5.410900e+02 -1.924200e+02\n7 867     -8.783002e+01 5.386100e+02\n8 867     -5.232001e+01 1.630300e+02\n12 867     -1.493300e+02 4.779300e+02\n14 867     4.492500e+02 -2.752300e+02\n0 868     2.203998e+01 4.226100e+02\n1 868     3.805300e+02 4.249300e+02\n2 868     -2.641700e+02 1.699300e+02\n5 868     4.238600e+02 -2.320900e+02\n6 868     -4.397200e+02 4.248000e+02\n7 868     -1.956600e+02 4.906100e+02\n8 868     -1.375300e+02 1.277300e+02\n12 868     -2.668400e+02 4.199800e+02\n13 868     2.082400e+02 1.048000e+02\n14 868     3.351200e+02 -3.165900e+02\n0 869     -2.153600e+02 4.951600e+02\n1 869     1.553800e+02 5.569300e+02\n5 869     1.944200e+02 -1.558000e+02\n7 869     -4.400300e+02 5.407800e+02\n0 870     -1.612500e+02 4.608200e+02\n1 870     2.016400e+02 5.095500e+02\n2 870     -4.425900e+02 2.134600e+02\n4 870     3.580017e+00 -2.622900e+02\n5 870     2.443700e+02 -1.924200e+02\n7 870     -3.811800e+02 5.103100e+02\n8 870     -2.838900e+02 1.582700e+02\n12 870     -4.747000e+02 4.386100e+02\n13 870     6.315002e+01 1.282700e+02\n14 870     1.572000e+02 -2.808000e+02\n0 871     -1.986900e+02 4.088000e+02\n1 871     1.514301e+02 4.673600e+02\n2 871     -4.769100e+02 1.500400e+02\n5 871     2.037600e+02 -2.477600e+02\n7 871     -4.115400e+02 4.518400e+02\n10 871     -3.738600e+02 6.089700e+02\n12 871     -5.079100e+02 3.703000e+02\n14 871     1.186600e+02 -3.365400e+02\n0 872     -7.304999e+01 4.943700e+02\n1 872     2.998000e+02 5.218100e+02\n2 872     -3.592700e+02 2.541800e+02\n3 872     -4.881700e+02 -7.731000e+01\n4 872     1.644000e+01 -3.158600e+02\n5 872     3.326100e+02 -1.567700e+02\n6 872     -5.609700e+02 4.990600e+02\n7 872     -2.979100e+02 5.547400e+02\n8 872     -2.158100e+02 1.919500e+02\n11 872     8.222998e+01 -2.706000e+02\n12 872     -3.827800e+02 4.915400e+02\n14 872     2.432900e+02 -2.433900e+02\n0 873     -1.286400e+02 4.184100e+02\n1 873     2.241801e+02 4.589400e+02\n2 873     -4.082300e+02 1.621700e+02\n4 873     -2.365002e+01 -2.765100e+02\n5 873     2.734800e+02 -2.381400e+02\n7 873     -3.429800e+02 4.692800e+02\n8 873     -2.556600e+02 1.183900e+02\n11 873     3.401001e+01 -3.382800e+02\n12 873     -4.313500e+02 3.911100e+02\n13 873     8.863000e+01 9.345001e+01\n14 873     1.874399e+02 -3.250000e+02\n0 874     8.602002e+01 5.686800e+02\n1 874     4.859200e+02 5.589200e+02\n4 874     4.983002e+01 -4.182900e+02\n5 874     4.896801e+02 -7.606000e+01\n13 874     2.559301e+02 2.320900e+02\n0 875     5.134998e+01 5.853800e+02\n1 875     4.531700e+02 5.845900e+02\n3 875     -3.823800e+02 2.204999e+01\n5 875     4.567500e+02 -6.012000e+01\n11 875     1.887900e+02 -1.898200e+02\n13 875     2.291300e+02 2.443000e+02\n14 875     3.617800e+02 -1.471700e+02\n0 876     1.209400e+02 4.153400e+02\n1 876     4.828300e+02 3.916500e+02\n2 876     -1.717400e+02 1.645200e+02\n3 876     -3.088200e+02 -1.673700e+02\n5 876     5.234800e+02 -2.384100e+02\n7 876     -9.913000e+01 4.940400e+02\n9 876     -2.931200e+02 2.108700e+02\n0 877     9.196997e+01 4.388300e+02\n1 877     4.581500e+02 4.233400e+02\n7 877     -1.295700e+02 5.156700e+02\n0 878     -3.393600e+02 3.764600e+02\n1 878     4.809998e+00 4.706800e+02\n2 878     -6.212400e+02 1.073800e+02\n7 878     -5.502300e+02 4.015600e+02\n11 878     -1.550900e+02 -3.755300e+02\n12 878     -6.652900e+02 3.075700e+02\n0 879     -3.505300e+02 3.109400e+02\n1 879     -2.140997e+01 4.100000e+02\n7 879     -5.528800e+02 3.306800e+02\n15 879     -5.434600e+02 5.146800e+02\n0 880     -4.488000e+01 2.627600e+02\n1 880     2.614900e+02 2.844800e+02\n7 880     -2.316800e+02 3.247800e+02\n10 880     -1.737100e+02 4.472500e+02\n15 880     -1.133500e+02 4.892100e+02\n0 881     -1.588100e+02 -8.973999e+01\n1 881     -1.062000e+01 -1.258002e+01\n3 881     -9.242999e+01 -4.457600e+02\n6 881     -2.043100e+02 -1.510300e+02\n7 881     -2.354700e+02 -8.469971e+00\n8 881     1.294000e+01 -1.557800e+02\n10 881     -2.679900e+02 1.984998e+01\n12 881     -1.969000e+02 -9.057001e+01\n15 881     -2.360700e+02 -6.460022e+00\n0 882     -1.448000e+02 -9.584998e+01\n1 882     1.599731e-01 -2.267999e+01\n3 882     -7.247998e+01 -4.470000e+02\n7 882     -2.197400e+02 -1.184998e+01\n8 882     2.864001e+01 -1.577300e+02\n10 882     -2.516000e+02 1.471997e+01\n12 882     -1.766800e+02 -9.281000e+01\n13 882     2.465300e+02 -3.205200e+02\n15 882     -2.159400e+02 -1.240997e+01\n0 883     -1.467800e+02 -5.010100e+02\n1 883     -1.197900e+02 -4.044600e+02\n4 883     -6.388200e+02 -2.684100e+02\n6 883     -3.115997e+01 -6.462000e+02\n7 883     -1.483000e+02 -4.230200e+02\n9 883     6.147998e+01 -4.285400e+02\n0 884     3.420001e+01 -6.138000e+01\n1 884     1.745800e+02 -4.077002e+01\n3 884     1.193600e+02 -3.361800e+02\n7 884     -3.963000e+01 5.847998e+01\n8 884     1.983000e+02 -7.215997e+01\n10 884     -4.783002e+01 7.413000e+01\n13 884     4.110200e+02 -2.712000e+02\n15 884     1.931000e+01 5.865997e+01\n0 885     8.347998e+01 4.104999e+01\n1 885     2.526100e+02 4.494000e+01\n2 885     2.220100e+02 8.872998e+01\n4 885     -2.541200e+02 -4.793700e+02\n7 885     -7.580017e+00 1.689000e+02\n8 885     2.137300e+02 2.551001e+01\n10 885     -9.699707e-01 1.975300e+02\n12 885     6.559003e+01 1.461300e+02\n13 885     4.431600e+02 -1.787800e+02\n15 885     7.271002e+01 2.048800e+02\n0 886     3.024100e+02 -1.843100e+02\n1 886     4.042200e+02 -2.474300e+02\n2 886     5.030400e+02 -9.937000e+01\n6 886     3.445200e+02 -9.019000e+01\n7 886     2.414200e+02 -1.826001e+01\n8 886     4.454399e+02 -1.320300e+02\n10 886     2.745400e+02 -4.027002e+01\n12 886     3.731300e+02 -5.575000e+01\n13 886     6.589100e+02 -3.597800e+02\n15 886     4.022800e+02 -7.300000e+01\n0 887     -1.947700e+02 4.287600e+02\n1 887     1.602000e+02 4.861100e+02\n2 887     -4.741900e+02 1.747500e+02\n5 887     2.094200e+02 -2.261100e+02\n7 887     -4.101500e+02 4.731200e+02\n8 887     -3.091300e+02 1.266000e+02\n11 887     -2.513000e+01 -3.294800e+02\n12 887     -5.066300e+02 3.947200e+02\n0 888     -5.000000e-01 4.731100e+02\n1 888     3.698600e+02 4.819600e+02\n2 888     -2.895100e+02 2.290500e+02\n4 888     -9.199829e-01 -3.575300e+02\n5 888     4.033900e+02 -1.781400e+02\n6 888     -4.743100e+02 4.860000e+02\n7 888     -2.239800e+02 5.402500e+02\n8 888     -1.582000e+02 1.735300e+02\n9 888     -3.960300e+02 2.632000e+02\n11 888     1.479600e+02 -2.871000e+02\n12 888     -2.998300e+02 4.766300e+02\n13 888     1.895900e+02 1.469800e+02\n14 888     3.127700e+02 -2.637100e+02\n0 889     2.601100e+02 5.228600e+02\n1 889     6.624399e+02 4.680100e+02\n2 889     -5.446997e+01 2.948200e+02\n3 889     -1.949900e+02 -3.846002e+01\n4 889     1.278998e+01 -5.319800e+02\n5 889     6.676700e+02 -1.182300e+02\n6 889     -1.935400e+02 6.052500e+02\n11 889     3.793300e+02 -2.328000e+02\n12 889     -3.163000e+01 5.740700e+02\n0 890     2.227000e+02 9.576001e+01\n1 890     4.138900e+02 5.702002e+01\n3 890     2.042100e+02 -1.650400e+02\n7 890     1.151900e+02 2.414300e+02\n10 890     1.548700e+02 2.755000e+02\n12 890     1.928600e+02 2.328700e+02\n13 890     5.453900e+02 -1.241500e+02\n15 890     2.575500e+02 2.989100e+02\n0 891     1.557800e+02 -4.984998e+01\n1 891     2.953900e+02 -6.642999e+01\n6 891     1.581900e+02 1.490002e+01\n7 891     8.003998e+01 9.112000e+01\n8 891     3.007400e+02 -3.644000e+01\n15 891     1.829600e+02 9.101001e+01\n0 892     2.241200e+02 -5.234003e+01\n1 892     3.648900e+02 -9.032001e+01\n6 892     2.235100e+02 3.037000e+01\n7 892     1.450000e+02 9.838000e+01\n8 892     3.504900e+02 -3.157001e+01\n13 892     5.738500e+02 -2.488600e+02\n15 892     2.770400e+02 9.626999e+01\n0 893     1.882400e+02 -1.742300e+02\n1 893     2.902200e+02 -1.993600e+02\n6 893     2.332800e+02 -1.126600e+02\n8 893     3.601200e+02 -1.389800e+02\n10 893     1.424600e+02 -4.091998e+01\n12 893     2.507500e+02 -7.288000e+01\n15 893     2.436200e+02 -7.398999e+01\n0 894     2.917000e+02 -2.386700e+02\n1 894     3.774700e+02 -2.983800e+02\n6 894     3.495800e+02 -1.545300e+02\n7 894     2.394800e+02 -7.364001e+01\n12 894     3.759900e+02 -1.235100e+02\n15 894     3.955000e+02 -1.483000e+02\n0 895     2.917000e+02 -2.386700e+02\n1 895     3.774700e+02 -2.983800e+02\n6 895     3.495800e+02 -1.545300e+02\n7 895     2.394800e+02 -7.364001e+01\n12 895     3.759900e+02 -1.235100e+02\n15 895     3.955000e+02 -1.483000e+02\n0 896     2.195300e+02 8.667999e+01\n1 896     4.067200e+02 4.937000e+01\n6 896     1.582700e+02 1.777600e+02\n7 896     1.143800e+02 2.323200e+02\n10 896     1.525500e+02 2.644400e+02\n12 896     1.946400e+02 2.229800e+02\n13 896     5.457600e+02 -1.316900e+02\n15 896     2.541400e+02 2.860800e+02\n0 897     1.413101e+02 -5.045001e+01\n1 897     2.803101e+02 -6.185999e+01\n2 897     3.165400e+02 1.331000e+01\n3 897     2.192800e+02 -2.925400e+02\n7 897     6.608002e+01 8.850000e+01\n8 897     2.899400e+02 -3.823999e+01\n10 897     7.576001e+01 9.716998e+01\n13 897     5.059700e+02 -2.519600e+02\n15 897     1.638000e+02 8.795999e+01\n0 898     7.690002e+01 -5.635999e+01\n1 898     2.161400e+02 -4.856000e+01\n3 898     1.627800e+02 -3.153500e+02\n7 898     3.489990e+00 7.150000e+01\n8 898     2.372300e+02 -5.548001e+01\n10 898     1.469971e+00 8.446997e+01\n13 898     4.509800e+02 -2.628800e+02\n15 898     7.666998e+01 7.101001e+01\n0 899     1.340500e+02 -7.435999e+01\n1 899     2.668800e+02 -8.370001e+01\n2 899     3.178500e+02 -1.389001e+01\n6 899     1.438100e+02 -1.875000e+01\n7 899     6.253998e+01 6.321002e+01\n8 899     2.895400e+02 -6.089001e+01\n10 899     6.945001e+01 6.889001e+01\n13 899     5.021500e+02 -2.740000e+02\n15 899     1.565200e+02 5.442999e+01\n0 900     1.906700e+02 -9.381000e+01\n1 900     3.181700e+02 -1.207500e+02\n4 900     -3.702400e+02 -5.663101e+02\n6 900     2.042800e+02 -2.496002e+01\n7 900     1.199000e+02 5.244000e+01\n8 900     3.354600e+02 -7.194000e+01\n10 900     1.368000e+02 5.173999e+01\n12 900     2.252000e+02 1.848999e+01\n13 900     5.506700e+02 -2.877400e+02\n15 900     2.365900e+02 3.547998e+01\n0 901     1.730000e+02 -1.065400e+02\n1 901     2.960400e+02 -1.286500e+02\n6 901     1.899000e+02 -4.672998e+01\n0 902     -8.440002e+00 -2.145700e+02\n1 902     8.548999e+01 -1.757000e+02\n2 902     2.344600e+02 -1.953400e+02\n3 902     1.569000e+02 -4.949700e+02\n4 902     -4.273600e+02 -4.038100e+02\n6 902     4.645001e+01 -2.244399e+02\n7 902     -5.265997e+01 -1.011000e+02\n8 902     2.120700e+02 -2.116000e+02\n10 902     -8.056000e+01 -1.077900e+02\n12 902     4.328003e+01 -1.766000e+02\n13 902     3.968101e+02 -4.100900e+02\n15 902     -1.790997e+01 -1.542600e+02\n0 903     1.296400e+02 -2.712000e+02\n1 903     2.028199e+02 -2.755200e+02\n4 903     -5.032100e+02 -5.149700e+02\n6 903     2.077100e+02 -2.428101e+02\n7 903     9.189001e+01 -1.332300e+02\n10 903     8.485999e+01 -1.582400e+02\n12 903     2.159800e+02 -2.053400e+02\n15 903     1.771300e+02 -2.133000e+02\n0 904     3.498800e+02 -3.395400e+02\n1 904     4.140300e+02 -4.207400e+02\n10 904     3.443900e+02 -2.118300e+02\n12 904     4.534200e+02 -2.401800e+02\n0 905     9.102002e+01 -2.291000e+02\n1 905     1.731600e+02 -2.206600e+02\n2 905     3.508900e+02 -1.712800e+02\n3 905     2.655699e+02 -4.676400e+02\n4 905     -4.578000e+02 -4.880100e+02\n6 905     1.654600e+02 -1.994500e+02\n7 905     5.041998e+01 -9.554999e+01\n8 905     3.092900e+02 -1.943500e+02\n10 905     3.672998e+01 -1.139900e+02\n12 905     1.677600e+02 -1.571600e+02\n15 905     1.182600e+02 -1.607700e+02\n0 906     3.702900e+02 5.021000e+02\n1 906     7.839301e+02 4.172200e+02\n5 906     7.755699e+02 -1.374000e+02\n6 906     -8.247000e+01 5.986800e+02\n8 906     1.086300e+02 2.091600e+02\n11 906     4.850500e+02 -2.440200e+02\n12 906     7.944000e+01 5.606000e+02\n13 906     4.835200e+02 1.950500e+02\n14 906     6.749800e+02 -2.158800e+02\n0 907     1.467800e+02 4.686400e+02\n1 907     5.248400e+02 4.401000e+02\n6 907     -3.097200e+02 5.193100e+02\n7 907     -8.129999e+01 5.505700e+02\n12 907     -1.411700e+02 5.019000e+02\n13 907     3.090400e+02 1.575400e+02\n14 907     4.599700e+02 -2.554700e+02\n0 908     4.070007e+00 -2.673200e+02\n1 908     8.708002e+01 -2.318400e+02\n3 908     1.672600e+02 -5.763000e+02\n4 908     -4.731100e+02 -4.050100e+02\n6 908     6.020001e+01 -2.918101e+02\n7 908     -3.663000e+01 -1.547900e+02\n8 908     2.216800e+02 -2.755400e+02\n10 908     -6.057001e+01 -1.671200e+02\n12 908     6.162000e+01 -2.467700e+02\n13 908     4.035601e+02 -4.615200e+02\n15 908     7.539978e+00 -2.241600e+02\n0 909     -3.877200e+02 3.151900e+02\n1 909     -5.587000e+01 4.220400e+02\n5 909     2.250000e+00 -3.403000e+02\n8 909     -4.742300e+02 1.367999e+01\n10 909     -5.927300e+02 4.777000e+02\n14 909     -7.848999e+01 -4.479900e+02\n0 910     5.500000e+01 -1.015900e+02\n1 910     1.827400e+02 -8.640997e+01\n2 910     2.438500e+02 -6.828003e+01\n4 910     -3.533100e+02 -4.540601e+02\n6 910     6.400000e+01 -7.808002e+01\n8 910     2.266100e+02 -1.048000e+02\n9 910     9.803998e+01 3.744000e+01\n13 910     4.344100e+02 -3.059500e+02\n15 910     5.372998e+01 6.630005e+00\n0 911     4.129999e+01 -2.826001e+01\n1 911     1.907600e+02 -1.034998e+01\n4 911     -2.977300e+02 -4.453300e+02\n13 911     4.152500e+02 -2.426100e+02\n15 911     2.473999e+01 1.049000e+02\n0 912     1.628500e+02 -7.289001e+01\n1 912     2.950300e+02 -9.151001e+01\n2 912     3.425601e+02 -8.750000e+00\n6 912     1.713000e+02 -9.739990e+00\n7 912     8.979999e+01 6.859998e+01\n8 912     3.110900e+02 -5.614001e+01\n10 912     1.033500e+02 7.434998e+01\n13 912     5.258600e+02 -2.713800e+02\n15 912     1.957600e+02 6.060999e+01\n0 913     -3.440300e+02 8.167999e+01\n1 913     -8.998999e+01 1.925000e+02\n10 913     -5.069800e+02 2.030300e+02\n0 914     -3.925800e+02 3.104100e+02\n1 914     -6.190002e+01 4.198800e+02\n5 914     -4.600220e-01 -3.520000e+02\n7 914     -5.955700e+02 3.252800e+02\n10 914     -5.951100e+02 4.722900e+02\n13 914     -1.245800e+02 -1.171997e+01\n14 914     -8.103003e+01 -4.444900e+02\n15 914     -6.013000e+02 5.098800e+02\n0 915     -3.787500e+02 3.142200e+02\n1 915     -4.746997e+01 4.204400e+02\n7 915     -5.820000e+02 3.308700e+02\n0 916     -3.979300e+02 3.345000e+02\n1 916     -6.159998e+01 4.446300e+02\n7 916     -6.048100e+02 3.500000e+02\n8 916     -4.787500e+02 2.863000e+01\n10 916     -6.060500e+02 5.007500e+02\n12 916     -7.279800e+02 2.455700e+02\n14 916     -8.440002e+01 -4.186400e+02\n15 916     -6.137100e+02 5.424500e+02\n0 917     -3.694300e+02 3.035800e+02\n1 917     -4.120001e+01 4.074600e+02\n5 917     2.128998e+01 -3.606900e+02\n7 917     -5.708100e+02 3.205000e+02\n10 917     -5.660600e+02 4.656600e+02\n11 917     -1.852300e+02 -4.406900e+02\n13 917     -1.063800e+02 -1.748999e+01\n14 917     -5.912000e+01 -4.533300e+02\n15 917     -5.682200e+02 5.027300e+02\n0 918     -3.736400e+02 3.170300e+02\n1 918     -4.234003e+01 4.205900e+02\n4 918     -6.012000e+01 -1.298800e+02\n7 918     -5.769700e+02 3.335000e+02\n8 918     -4.574700e+02 9.209991e+00\n11 918     -1.880800e+02 -4.293400e+02\n12 918     -6.954800e+02 2.253600e+02\n15 918     -5.761500e+02 5.209600e+02\n0 919     -3.304400e+02 4.423900e+02\n1 919     2.882001e+01 5.327400e+02\n0 920     -5.263800e+02 4.349400e+02\n1 920     -1.607400e+02 5.704100e+02\n7 920     -7.564600e+02 4.432500e+02\n8 920     -5.969100e+02 1.265600e+02\n10 920     -7.838100e+02 6.164300e+02\n14 920     -1.985200e+02 -3.096600e+02\n0 921     -2.414100e+02 4.120700e+02\n1 921     1.128700e+02 4.797200e+02\n10 921     -4.251700e+02 6.084500e+02\n0 922     -1.655100e+02 3.931300e+02\n1 922     1.832000e+02 4.442100e+02\n2 922     -4.431200e+02 1.281700e+02\n4 922     -3.563000e+01 -2.526900e+02\n5 922     2.354700e+02 -2.667300e+02\n7 922     -3.756700e+02 4.385600e+02\n8 922     -2.836200e+02 9.129001e+01\n11 922     1.679993e+00 -3.612800e+02\n12 922     -4.680800e+02 3.536800e+02\n13 922     5.927002e+01 6.878003e+01\n14 922     1.500601e+02 -3.539800e+02\n0 923     1.823101e+02 4.016100e+02\n1 923     5.450300e+02 3.610400e+02\n0 924     2.054200e+02 4.107400e+02\n1 924     5.726400e+02 3.642000e+02\n2 924     -9.612000e+01 1.611800e+02\n7 924     -1.828998e+01 4.983000e+02\n8 924     7.700195e-01 1.231400e+02\n11 924     3.412200e+02 -3.349400e+02\n12 924     -7.097998e+01 4.334800e+02\n13 924     3.549200e+02 1.054400e+02\n14 924     5.173800e+02 -3.220600e+02\n0 925     4.975300e+02 4.076700e+02\n1 925     8.663800e+02 2.894400e+02\n2 925     2.764600e+02 2.931600e+02\n3 925     1.353000e+02 -3.503998e+01\n7 925     2.835400e+02 5.484000e+02\n9 925     9.094000e+01 3.383100e+02\n11 925     6.030000e+02 -3.231200e+02\n0 926     2.496700e+02 4.519700e+02\n1 926     6.326000e+02 3.954500e+02\n2 926     -6.241998e+01 2.098900e+02\n3 926     -2.044700e+02 -1.216600e+02\n5 926     6.531600e+02 -1.954700e+02\n6 926     -1.984400e+02 5.117500e+02\n7 926     1.852002e+01 5.447200e+02\n8 926     2.871997e+01 1.618900e+02\n9 926     -2.025200e+02 2.536300e+02\n11 926     3.785699e+02 -2.953900e+02\n12 926     -3.302002e+01 4.873800e+02\n13 926     3.891400e+02 1.442800e+02\n14 926     5.591500e+02 -2.752500e+02\n0 927     3.296600e+02 4.607700e+02\n1 927     7.244301e+02 3.833600e+02\n6 927     -1.167400e+02 5.398000e+02\n7 927     9.217999e+01 5.616600e+02\n8 927     8.477002e+01 1.727700e+02\n9 927     -1.462200e+02 2.662400e+02\n11 927     4.519301e+02 -2.832000e+02\n12 927     4.641998e+01 5.091100e+02\n13 927     4.528800e+02 1.573300e+02\n0 928     1.503400e+02 -1.133100e+02\n1 928     2.722800e+02 -1.272800e+02\n2 928     3.423500e+02 -5.682001e+01\n4 928     -3.783800e+02 -5.319700e+02\n6 928     1.697100e+02 -5.910999e+01\n7 928     8.410999e+01 2.645001e+01\n8 928     3.094900e+02 -9.595001e+01\n10 928     9.259003e+01 2.559003e+01\n12 928     1.871600e+02 -1.476001e+01\n15 928     1.845100e+02 3.479980e+00\n0 929     2.509800e+02 -7.922998e+01\n1 929     3.855601e+02 -1.258400e+02\n2 929     4.153199e+02 -7.549988e+00\n6 929     2.548700e+02 7.299988e+00\n7 929     1.740900e+02 7.571002e+01\n8 929     3.742500e+02 -5.429001e+01\n12 929     2.835400e+02 4.859003e+01\n15 929     3.179800e+02 6.339001e+01\n0 930     1.479700e+02 6.995001e+01\n1 930     3.261801e+02 5.450000e+01\n2 930     2.696899e+02 1.255700e+02\n3 930     1.676400e+02 -1.878300e+02\n4 930     -2.424200e+02 -5.298800e+02\n5 930     8.064301e+02 -5.877400e+02\n6 930     1.019600e+02 1.423800e+02\n8 930     2.555000e+02 5.659000e+01\n9 930     1.095600e+02 1.996400e+02\n15 930     1.571400e+02 2.530100e+02\n0 931     1.605300e+02 -1.143800e+02\n1 931     2.825300e+02 -1.317200e+02\n2 931     3.513500e+02 -5.603003e+01\n3 931     2.548300e+02 -3.583200e+02\n6 931     1.793200e+02 -5.727002e+01\n10 931     1.043100e+02 2.535999e+01\n15 931     1.982700e+02 3.539978e+00\n0 932     8.241998e+01 -2.235500e+02\n1 932     1.675500e+02 -2.126300e+02\n3 932     2.532700e+02 -4.665699e+02\n4 932     -4.518800e+02 -4.806000e+02\n6 932     1.533600e+02 -1.972800e+02\n7 932     4.042999e+01 -9.213000e+01\n10 932     2.541998e+01 -1.089400e+02\n12 932     1.554600e+02 -1.543800e+02\n13 932     4.820100e+02 -4.092100e+02\n0 933     5.863900e+02 8.251999e+01\n1 933     8.411899e+02 -7.921997e+01\n6 933     4.164400e+02 2.223100e+02\n7 933     4.269600e+02 2.564700e+02\n8 933     4.720601e+02 1.660001e+01\n9 933     2.938800e+02 1.443700e+02\n12 933     5.016100e+02 2.324500e+02\n15 933     7.789700e+02 3.316600e+02\n0 934     2.328600e+02 -8.790997e+01\n1 934     3.637100e+02 -1.286900e+02\n2 934     4.041700e+02 -1.772998e+01\n6 934     2.410500e+02 -6.869995e+00\n7 934     1.585000e+02 6.456000e+01\n12 934     2.675100e+02 3.450000e+01\n15 934     2.936100e+02 4.913000e+01\n0 935     3.473400e+02 -1.814600e+02\n1 935     4.518101e+02 -2.599600e+02\n2 935     5.374000e+02 -8.901001e+01\n6 935     3.849900e+02 -7.360999e+01\n7 935     2.832300e+02 -8.359985e+00\n10 935     3.257800e+02 -3.210999e+01\n12 935     4.182100e+02 -4.112000e+01\n15 935     4.641200e+02 -6.335999e+01\n0 936     2.955500e+02 -1.840100e+02\n1 936     3.972400e+02 -2.447300e+02\n7 936     2.354100e+02 -1.915997e+01\n8 936     4.414500e+02 -1.335900e+02\n10 936     2.669600e+02 -4.033002e+01\n12 936     3.662400e+02 -5.756000e+01\n13 936     6.533199e+02 -3.601000e+02\n15 936     3.927200e+02 -7.344000e+01\n0 937     2.383002e+01 -2.525500e+02\n1 937     1.074100e+02 -2.229400e+02\n2 937     2.706899e+02 -2.421300e+02\n3 937     1.915900e+02 -5.409800e+02\n4 937     -4.647600e+02 -4.252100e+02\n6 937     8.516998e+01 -2.624600e+02\n7 937     -1.666998e+01 -1.348500e+02\n8 937     2.427100e+02 -2.488500e+02\n9 937     1.296500e+02 -1.038600e+02\n10 937     -3.892999e+01 -1.480100e+02\n12 937     8.615997e+01 -2.178100e+02\n13 937     4.246000e+02 -4.445000e+02\n15 937     3.134998e+01 -2.014100e+02\n0 938     1.120100e+02 3.439001e+01\n1 938     2.783800e+02 3.004999e+01\n2 938     2.543800e+02 8.934003e+01\n6 938     8.090002e+01 9.462000e+01\n7 938     2.234998e+01 1.669800e+02\n10 938     3.296002e+01 1.924100e+02\n12 938     1.002800e+02 1.463700e+02\n15 938     1.122000e+02 1.994600e+02\n0 939     6.279500e+02 6.559998e+01\n1 939     8.796100e+02 -1.100600e+02\n2 939     5.539600e+02 5.823999e+01\n6 939     4.718400e+02 2.197900e+02\n7 939     4.698600e+02 2.484800e+02\n9 939     3.362500e+02 1.498300e+02\n10 939     6.304100e+02 2.839400e+02\n12 939     5.541000e+02 2.298400e+02\n15 939     8.387700e+02 3.143100e+02\n0 940     8.876001e+01 -1.673200e+02\n1 940     1.936700e+02 -1.604400e+02\n3 940     2.228800e+02 -4.196801e+02\n6 940     1.303700e+02 -1.367800e+02\n7 940     3.470001e+01 -3.646002e+01\n10 940     2.714001e+01 -4.323999e+01\n12 940     1.384200e+02 -9.157001e+01\n13 940     4.754301e+02 -3.598300e+02\n15 940     1.071200e+02 -7.769000e+01\n0 941     2.272200e+02 -9.220001e+01\n1 941     3.564900e+02 -1.313100e+02\n2 941     4.011300e+02 -2.341998e+01\n3 941     2.990200e+02 -3.252800e+02\n6 941     2.371500e+02 -1.353998e+01\n7 941     1.540000e+02 5.914001e+01\n8 941     3.613100e+02 -6.778998e+01\n12 941     2.626100e+02 2.759003e+01\n13 941     5.804900e+02 -2.839600e+02\n15 941     2.871899e+02 4.228003e+01\n0 942     8.971002e+01 5.170600e+02\n1 942     4.764800e+02 5.040700e+02\n2 942     -2.108600e+02 2.805300e+02\n3 942     -3.455700e+02 -5.246002e+01\n5 942     4.933700e+02 -1.298000e+02\n8 942     -9.398001e+01 2.161000e+02\n9 942     -3.315800e+02 3.108600e+02\n11 942     2.266100e+02 -2.458900e+02\n14 942     3.998300e+02 -2.150600e+02\n0 943     1.623700e+02 -1.006900e+02\n1 943     2.873199e+02 -1.183700e+02\n3 943     2.528900e+02 -3.431300e+02\n0 944     2.147400e+02 -1.093900e+02\n1 944     3.392300e+02 -1.440900e+02\n3 944     2.942700e+02 -3.455200e+02\n6 944     2.297500e+02 -3.645001e+01\n8 944     3.549200e+02 -8.476001e+01\n12 944     2.539399e+02 5.020020e+00\n15 944     2.720400e+02 1.762000e+01\n0 945     5.902700e+02 1.116100e+02\n1 945     8.544100e+02 -4.929999e+01\n6 945     4.131500e+02 2.570100e+02\n9 945     2.897600e+02 1.714900e+02\n12 945     4.980000e+02 2.668500e+02\n15 945     7.807300e+02 3.734100e+02\n0 946     6.587300e+02 -5.646997e+01\n1 946     8.735200e+02 -2.496000e+02\n2 946     6.224399e+02 -5.171002e+01\n3 946     4.921000e+02 -3.553800e+02\n6 946     5.413500e+02 9.692999e+01\n7 946     5.164200e+02 1.361900e+02\n8 946     5.686899e+02 -7.363000e+01\n10 946     6.762800e+02 1.446700e+02\n12 946     6.200900e+02 1.067700e+02\n0 947     1.582500e+02 -1.117800e+02\n1 947     2.807400e+02 -1.283200e+02\n6 947     1.768900e+02 -5.477002e+01\n8 947     3.152000e+02 -9.306000e+01\n15 947     1.948199e+02 6.739990e+00\n0 948     1.319900e+02 -9.564001e+01\n1 948     2.587300e+02 -1.041300e+02\n2 948     3.208400e+02 -3.928003e+01\n6 948     1.467500e+02 -4.406000e+01\n7 948     6.383002e+01 4.156000e+01\n8 948     2.913500e+02 -8.128998e+01\n12 948     1.624100e+02 1.809998e+00\n15 948     1.568400e+02 2.532001e+01\n0 949     6.647700e+02 -1.092700e+02\n1 949     8.631100e+02 -3.073300e+02\n2 949     6.443500e+02 -1.042900e+02\n6 949     5.642200e+02 3.952002e+01\n12 949     6.422500e+02 4.895001e+01\n0 950     6.072300e+02 1.314200e+02\n1 950     8.785300e+02 -3.364001e+01\n2 950     5.131899e+02 1.149800e+02\n3 950     3.762300e+02 -1.980300e+02\n6 950     4.292900e+02 2.850900e+02\n7 950     4.406700e+02 3.079400e+02\n8 950     4.807400e+02 6.570999e+01\n9 950     3.005400e+02 1.957200e+02\n10 950     6.011200e+02 3.589200e+02\n12 950     5.132700e+02 2.949100e+02\n13 950     8.132900e+02 -8.091998e+01\n15 950     8.022300e+02 4.034300e+02\n0 951     2.327800e+02 5.659973e+00\n1 951     3.921899e+02 -3.508002e+01\n2 951     3.702300e+02 7.620001e+01\n3 951     2.638900e+02 -2.318500e+02\n6 951     2.109000e+02 9.620001e+01\n7 951     1.433000e+02 1.567700e+02\n8 951     3.388600e+02 1.573001e+01\n10 951     1.755600e+02 1.716700e+02\n12 951     2.397700e+02 1.412700e+02\n13 951     5.727200e+02 -1.982900e+02\n15 951     2.819200e+02 1.768700e+02\n0 952     2.916500e+02 -2.743500e+02\n1 952     3.715601e+02 -3.348400e+02\n2 952     5.062700e+02 -2.261200e+02\n6 952     3.473100e+02 -2.069500e+02\n7 952     2.406300e+02 -1.133300e+02\n8 952     4.472300e+02 -2.337900e+02\n10 952     2.715601e+02 -1.444800e+02\n12 952     3.767600e+02 -1.765800e+02\n13 952     6.514000e+02 -4.496899e+02\n15 952     4.011899e+02 -1.972000e+02\n0 953     1.914000e+02 -9.075000e+01\n1 953     3.200100e+02 -1.179900e+02\n2 953     3.726300e+02 -2.360999e+01\n6 953     2.041300e+02 -2.066998e+01\n8 953     3.353000e+02 -6.890997e+01\n12 953     2.257800e+02 2.340002e+01\n15 953     2.371801e+02 3.970001e+01\n0 954     3.217400e+02 5.498100e+02\n1 954     7.421300e+02 4.810700e+02\n5 954     7.228199e+02 -8.873999e+01\n6 954     -1.426000e+02 6.483800e+02\n8 954     6.923999e+01 2.483500e+02\n9 954     -1.654100e+02 3.491400e+02\n12 954     2.134998e+01 6.084400e+02\n13 954     4.423900e+02 2.317500e+02\n14 954     6.225699e+02 -1.698800e+02\n0 955     6.072300e+02 1.314200e+02\n1 955     8.785300e+02 -3.364001e+01\n2 955     5.131899e+02 1.149800e+02\n3 955     3.762300e+02 -1.980300e+02\n6 955     4.292900e+02 2.850900e+02\n7 955     4.406700e+02 3.079400e+02\n8 955     4.807400e+02 6.570999e+01\n9 955     3.005400e+02 1.957200e+02\n10 955     6.011200e+02 3.589200e+02\n12 955     5.132700e+02 2.949100e+02\n13 955     8.132900e+02 -8.091998e+01\n0 956     2.363700e+02 4.490400e+02\n1 956     6.178500e+02 3.961700e+02\n2 956     -7.437000e+01 2.052200e+02\n8 956     1.853003e+01 1.584200e+02\n12 956     -4.742999e+01 4.817200e+02\n14 956     5.450699e+02 -2.797400e+02\n0 957     2.002900e+02 -2.431600e+02\n1 957     2.784301e+02 -2.708500e+02\n2 957     4.518300e+02 -1.677300e+02\n3 957     3.594000e+02 -4.613700e+02\n6 957     2.768000e+02 -1.811899e+02\n7 957     1.577800e+02 -9.126001e+01\n9 957     2.744600e+02 -3.476001e+01\n12 957     2.906899e+02 -1.454100e+02\n15 957     2.687800e+02 -1.661700e+02\n0 958     1.995400e+02 4.332600e+02\n1 958     5.723800e+02 3.892200e+02\n2 958     -1.038700e+02 1.860600e+02\n5 958     6.025200e+02 -2.170500e+02\n7 958     -2.656000e+01 5.204800e+02\n11 958     3.336200e+02 -3.147400e+02\n12 958     -8.141998e+01 4.594600e+02\n13 958     3.494200e+02 1.243200e+02\n14 958     5.103500e+02 -2.981800e+02\n0 959     3.465100e+02 4.712700e+02\n1 959     7.467900e+02 3.902000e+02\n2 959     1.795001e+01 2.333300e+02\n3 959     -1.278500e+02 -9.947998e+01\n5 959     7.521600e+02 -1.711600e+02\n6 959     -1.007600e+02 5.566500e+02\n7 959     1.067200e+02 5.737600e+02\n8 959     9.566998e+01 1.822600e+02\n9 959     -1.356000e+02 2.773500e+02\n11 959     4.670000e+02 -2.724600e+02\n12 959     6.178998e+01 5.233900e+02\n13 959     4.657400e+02 1.667200e+02\n14 959     6.542400e+02 -2.497000e+02\n0 960     3.535200e+02 5.241300e+02\n1 960     7.708300e+02 4.452500e+02\n2 960     1.626001e+01 2.905000e+02\n3 960     -1.290400e+02 -4.159998e+01\n5 960     7.566100e+02 -1.142200e+02\n6 960     -1.045600e+02 6.232700e+02\n8 960     9.413000e+01 2.278300e+02\n9 960     -1.388700e+02 3.267800e+02\n11 960     4.656000e+02 -2.261200e+02\n12 960     5.782001e+01 5.835100e+02\n13 960     4.687200e+02 2.129700e+02\n14 960     6.558101e+02 -1.936400e+02\n0 961     3.523199e+02 4.965000e+02\n1 961     7.612400e+02 4.158800e+02\n2 961     1.913000e+01 2.596900e+02\n5 961     7.567500e+02 -1.436700e+02\n6 961     -1.000900e+02 5.885600e+02\n8 961     9.645001e+01 2.037300e+02\n9 961     -1.353800e+02 3.011800e+02\n12 961     6.242999e+01 5.521400e+02\n13 961     4.694301e+02 1.889000e+02\n14 961     6.576100e+02 -2.227600e+02\n0 962     6.593101e+02 -1.004200e+02\n1 962     8.599200e+02 -2.959200e+02\n6 962     5.549200e+02 4.776001e+01\n7 962     5.227300e+02 9.460999e+01\n10 962     6.802400e+02 9.459003e+01\n12 962     6.337600e+02 5.733002e+01\n0 963     1.875200e+02 -1.716000e+02\n1 963     2.900400e+02 -1.965300e+02\n2 963     4.038000e+02 -1.030600e+02\n3 963     3.081000e+02 -4.022400e+02\n4 963     -4.316700e+02 -5.655900e+02\n6 963     2.317900e+02 -1.098700e+02\n7 963     1.309400e+02 -2.410999e+01\n10 963     1.412300e+02 -3.796002e+01\n12 963     2.490900e+02 -6.985999e+01\n13 963     5.605601e+02 -3.561100e+02\n15 963     2.423101e+02 -7.071997e+01\n0 964     1.710200e+02 -7.041998e+01\n1 964     3.047500e+02 -9.127002e+01\n2 964     3.495601e+02 -3.349976e+00\n3 964     2.507100e+02 -3.074900e+02\n6 964     1.796600e+02 -2.950012e+00\n7 964     9.789001e+01 7.319000e+01\n8 964     3.171700e+02 -5.198999e+01\n12 964     1.996801e+02 4.298999e+01\n13 964     5.334900e+02 -2.676400e+02\n15 964     2.062800e+02 6.453003e+01\n0 965     3.643101e+02 5.436300e+02\n1 965     7.904800e+02 4.636700e+02\n2 965     2.313000e+01 3.123900e+02\n6 965     -9.616000e+01 6.501900e+02\n0 966     3.404301e+02 5.572400e+02\n1 966     7.662300e+02 4.844300e+02\n2 966     8.800049e-01 3.260000e+02\n3 966     -1.435300e+02 -8.840027e+00\n6 966     -1.244900e+02 6.626500e+02\n9 966     -1.533400e+02 3.574400e+02\n11 966     4.498500e+02 -1.982300e+02\n13 966     4.569200e+02 2.393400e+02\n14 966     6.402800e+02 -1.611500e+02\n0 967     3.522400e+02 5.037500e+02\n1 967     7.633800e+02 4.236700e+02\n2 967     1.863000e+01 2.685600e+02\n3 967     -1.272500e+02 -6.372998e+01\n5 967     7.565699e+02 -1.358000e+02\n6 967     -1.010700e+02 5.977900e+02\n8 967     9.602002e+01 2.101300e+02\n9 967     -1.362800e+02 3.080200e+02\n11 967     4.677400e+02 -2.439000e+02\n12 967     6.152002e+01 5.608300e+02\n13 967     4.691500e+02 1.952100e+02\n14 967     6.570000e+02 -2.152200e+02\n0 968     1.253700e+02 -1.659000e+02\n1 968     2.293900e+02 -1.707200e+02\n2 968     3.476200e+02 -1.072000e+02\n7 968     7.067999e+01 -2.816998e+01\n13 968     5.082100e+02 -3.554100e+02\n15 968     1.567500e+02 -7.127002e+01\n0 969     1.985699e+02 -8.065997e+01\n1 969     3.300800e+02 -1.102400e+02\n2 969     3.751600e+02 -1.087000e+01\n6 969     2.086600e+02 -7.020020e+00\n7 969     1.253300e+02 6.723999e+01\n8 969     3.394900e+02 -5.820999e+01\n10 969     1.443100e+02 6.857001e+01\n12 969     2.312200e+02 3.678003e+01\n13 969     5.564800e+02 -2.750700e+02\n15 969     2.456100e+02 5.446002e+01\n0 970     4.773000e+02 3.380100e+02\n1 970     8.218800e+02 2.196900e+02\n6 970     1.725300e+02 4.578300e+02\n7 970     2.720699e+02 4.767800e+02\n8 970     2.883900e+02 1.576200e+02\n12 970     2.842600e+02 4.519300e+02\n14 970     8.788600e+02 -3.722700e+02\n0 971     5.531200e+02 1.886100e+02\n1 971     8.395300e+02 4.297998e+01\n6 971     3.465700e+02 3.279600e+02\n7 971     3.790400e+02 3.524600e+02\n10 971     5.325100e+02 4.196700e+02\n12 971     4.349301e+02 3.364000e+02\n13 971     7.513101e+02 -3.842999e+01\n15 971     7.198101e+02 4.753200e+02\n0 972     9.090002e+01 -1.124100e+02\n1 972     2.141000e+02 -1.077700e+02\n2 972     2.845000e+02 -6.879999e+01\n3 972     1.934000e+02 -3.723500e+02\n6 972     1.070700e+02 -7.741998e+01\n7 972     2.528003e+01 1.734998e+01\n8 972     2.607300e+02 -1.058400e+02\n10 972     2.344000e+01 2.053003e+01\n12 972     1.194200e+02 -3.008002e+01\n15 972     1.031600e+02 -3.109985e+00\n0 973     2.756801e+02 -1.995900e+02\n1 973     3.703900e+02 -2.533400e+02\n2 973     4.936700e+02 -1.139000e+02\n3 973     3.933600e+02 -4.097400e+02\n8 973     4.354000e+02 -1.451600e+02\n10 973     2.454301e+02 -6.044000e+01\n12 973     3.534600e+02 -7.712000e+01\n13 973     6.416100e+02 -3.744200e+02\n15 973     3.667500e+02 -9.733002e+01\n0 974     2.122100e+02 -6.633002e+01\n1 974     3.484399e+02 -1.000300e+02\n3 974     2.796200e+02 -2.982800e+02\n6 974     2.169400e+02 1.276001e+01\n7 974     1.362100e+02 8.367999e+01\n13 974     5.664301e+02 -2.611200e+02\n15 974     2.624000e+02 7.590997e+01\n0 975     4.965000e+02 4.113600e+02\n1 975     8.663900e+02 2.936400e+02\n6 975     1.785300e+02 5.486800e+02\n7 975     2.816400e+02 5.517400e+02\n9 975     8.903003e+01 3.410900e+02\n0 976     6.591300e+02 -8.606000e+01\n1 976     8.644200e+02 -2.807600e+02\n2 976     6.314200e+02 -8.240997e+01\n6 976     5.510300e+02 6.334998e+01\n7 976     5.206801e+02 1.082800e+02\n8 976     5.762400e+02 -9.917999e+01\n10 976     6.791801e+02 1.108600e+02\n12 976     6.294399e+02 7.278003e+01\n0 977     4.812300e+02 3.331100e+02\n1 977     8.243500e+02 2.133000e+02\n2 977     2.754100e+02 2.126000e+02\n3 977     1.358100e+02 -1.123100e+02\n6 977     1.792900e+02 4.537200e+02\n7 977     2.769100e+02 4.722600e+02\n8 977     2.928300e+02 1.555100e+02\n10 977     4.376100e+02 5.854700e+02\n12 977     2.904900e+02 4.471400e+02\n13 977     6.432700e+02 7.123999e+01\n0 978     1.053700e+02 -8.659003e+01\n1 978     2.351200e+02 -8.669000e+01\n2 978     2.927600e+02 -3.503003e+01\n4 978     -3.496500e+02 -4.959399e+02\n6 978     1.164700e+02 -4.178003e+01\n7 978     3.613000e+01 4.615997e+01\n8 978     2.678700e+02 -7.783002e+01\n12 978     1.301800e+02 6.190002e+00\n13 978     4.782200e+02 -2.874100e+02\n15 978     1.190800e+02 3.378003e+01\n0 979     6.551001e+01 -1.608900e+02\n1 979     1.730200e+02 -1.472100e+02\n2 979     2.845000e+02 -1.193300e+02\n10 979     -6.599731e-01 -3.806000e+01\n12 979     1.092000e+02 -9.133002e+01\n15 979     7.479999e+01 -7.221002e+01\n0 980     2.196600e+02 -1.063500e+02\n1 980     3.449700e+02 -1.427100e+02\n2 980     3.986300e+02 -4.007001e+01\n3 980     2.970000e+02 -3.419300e+02\n6 980     2.337100e+02 -3.152002e+01\n7 980     1.489500e+02 4.417999e+01\n8 980     3.581900e+02 -8.141998e+01\n10 980     1.716200e+02 4.095001e+01\n12 980     2.584399e+02 9.770020e+00\n13 980     5.754301e+02 -2.971100e+02\n15 980     2.782900e+02 2.240002e+01\n0 981     9.090002e+01 -1.124100e+02\n1 981     2.141000e+02 -1.077700e+02\n2 981     2.845000e+02 -6.879999e+01\n3 981     1.934000e+02 -3.723500e+02\n6 981     1.070700e+02 -7.741998e+01\n7 981     2.528003e+01 1.734998e+01\n8 981     2.607300e+02 -1.058400e+02\n10 981     2.344000e+01 2.053003e+01\n13 981     4.668000e+02 -3.118800e+02\n15 981     1.031600e+02 -3.109985e+00\n0 982     3.424200e+02 5.479100e+02\n1 982     7.656400e+02 4.737800e+02\n2 982     3.989990e+00 3.156500e+02\n5 982     7.444600e+02 -8.940002e+01\n6 982     -1.202700e+02 6.499000e+02\n8 982     8.415002e+01 2.470900e+02\n9 982     -1.497400e+02 3.487100e+02\n12 982     4.291998e+01 6.083700e+02\n13 982     4.592600e+02 2.320400e+02\n14 982     6.434100e+02 -1.703200e+02\n0 983     5.737400e+02 2.051000e+02\n1 983     8.666000e+02 5.477002e+01\n2 983     4.566700e+02 1.724500e+02\n3 983     3.188300e+02 -1.442700e+02\n6 983     3.688500e+02 3.549800e+02\n8 983     4.350400e+02 1.145800e+02\n9 983     2.503700e+02 2.424600e+02\n10 983     5.560800e+02 4.426900e+02\n12 983     4.560601e+02 3.634400e+02\n13 983     7.710601e+02 -2.121997e+01\n15 983     7.465800e+02 5.021100e+02\n0 984     2.247700e+02 -7.954999e+01\n1 984     3.577000e+02 -1.176300e+02\n2 984     3.957300e+02 -8.650024e+00\n3 984     2.931700e+02 -3.123100e+02\n6 984     2.318900e+02 4.899902e-01\n7 984     1.498900e+02 7.177002e+01\n8 984     3.567600e+02 -5.557999e+01\n10 984     1.746300e+02 7.251001e+01\n13 984     5.775000e+02 -2.727500e+02\n15 984     2.815900e+02 5.944000e+01\n0 985     4.820699e+02 3.294900e+02\n1 985     8.241400e+02 2.095100e+02\n2 985     2.771700e+02 2.094100e+02\n3 985     1.381500e+02 -1.158900e+02\n6 985     1.808800e+02 4.497500e+02\n7 985     2.782400e+02 4.692200e+02\n8 985     2.944500e+02 1.522700e+02\n9 985     9.420001e+01 2.666700e+02\n12 985     2.920400e+02 4.442100e+02\n13 985     6.444500e+02 6.817999e+01\n0 986     2.583300e+02 -2.060600e+02\n1 986     3.498900e+02 -2.535000e+02\n2 986     4.822600e+02 -1.205800e+02\n6 986     3.165300e+02 -1.238700e+02\n7 986     2.052900e+02 -4.507001e+01\n8 986     4.254000e+02 -1.512700e+02\n10 986     2.261000e+02 -6.909003e+01\n12 986     3.381801e+02 -8.807001e+01\n15 986     3.434000e+02 -1.080700e+02\n0 987     2.295900e+02 4.334800e+02\n1 987     6.051200e+02 3.812700e+02\n7 987     1.849976e+00 5.239700e+02\n8 987     1.615997e+01 1.433800e+02\n11 987     3.616801e+02 -3.138600e+02\n14 987     5.402100e+02 -2.962100e+02\n0 988     6.040200e+02 9.834000e+01\n1 988     8.644500e+02 -6.806000e+01\n2 988     5.189399e+02 7.921002e+01\n6 988     4.341000e+02 2.465500e+02\n7 988     4.417800e+02 2.750900e+02\n8 988     4.849600e+02 3.685001e+01\n9 988     3.058400e+02 1.661100e+02\n10 988     5.998700e+02 3.196300e+02\n13 988     8.143900e+02 -1.109800e+02\n15 988     8.017600e+02 3.563600e+02\n0 989     2.385200e+02 5.571900e+02\n1 989     6.320601e+02 5.114000e+02\n0 990     -8.845001e+01 1.102100e+02\n1 990     1.303500e+02 1.563400e+02\n3 990     -1.726000e+02 -2.913100e+02\n4 990     -1.948800e+02 -3.299800e+02\n5 990     4.661899e+02 -5.574800e+02\n6 990     -2.579200e+02 8.258002e+01\n7 990     -2.123600e+02 1.947900e+02\n8 990     -2.214001e+01 -1.228000e+01\n9 990     -1.828300e+02 1.029300e+02\n10 990     -2.081600e+02 2.609200e+02\n12 990     -2.063700e+02 1.336600e+02\n13 990     2.417700e+02 -1.461900e+02\n15 990     -1.641600e+02 2.744300e+02\n0 991     6.150024e+00 -1.955300e+02\n1 991     1.050500e+02 -1.617800e+02\n3 991     1.601400e+02 -4.695200e+02\n4 991     -4.149800e+02 -4.158500e+02\n6 991     5.346997e+01 -1.970200e+02\n7 991     -4.116998e+01 -7.925000e+01\n10 991     -6.550000e+01 -8.448999e+01\n12 991     5.228003e+01 -1.488700e+02\n13 991     4.079000e+02 -3.914300e+02\n15 991     -9.899902e-01 -1.264500e+02\n0 992     -7.892999e+01 -1.500600e+02\n1 992     4.146002e+01 -9.288000e+01\n4 992     -3.671300e+02 -3.478600e+02\n6 992     -6.965997e+01 -1.826801e+02\n7 992     -1.386400e+02 -5.173999e+01\n8 992     1.193800e+02 -1.782700e+02\n10 992     -1.687900e+02 -4.115997e+01\n12 992     -7.012000e+01 -1.283200e+02\n13 992     3.198800e+02 -3.603400e+02\n15 992     -1.211700e+02 -7.709998e+01\n0 993     2.009399e+02 -2.833000e+02\n1 993     2.718700e+02 -3.113900e+02\n2 993     4.500900e+02 -2.309100e+02\n3 993     3.602400e+02 -5.257500e+02\n4 993     -5.295600e+02 -5.746400e+02\n6 993     2.770400e+02 -2.349100e+02\n7 993     1.606600e+02 -1.335700e+02\n8 993     3.953000e+02 -2.414700e+02\n9 993     2.742400e+02 -8.825000e+01\n10 993     1.677200e+02 -1.642600e+02\n12 993     2.936700e+02 -2.011000e+02\n13 993     5.831300e+02 -4.590300e+02\n15 993     2.765200e+02 -2.204100e+02\n0 994     5.706600e+02 2.496800e+02\n1 994     8.774399e+02 1.026700e+02\n2 994     4.413900e+02 2.126100e+02\n7 994     3.880699e+02 4.140900e+02\n8 994     4.229000e+02 1.470500e+02\n12 994     4.409399e+02 4.073700e+02\n13 994     7.623700e+02 1.445001e+01\n15 994     7.380400e+02 5.658400e+02\n0 995     -1.084700e+02 5.510010e+00\n1 995     6.950000e+01 6.321002e+01\n2 995     -1.671002e+01 -4.022998e+01\n4 995     -2.572700e+02 -3.227500e+02\n6 995     -1.993400e+02 -2.951001e+01\n7 995     -2.048600e+02 9.338000e+01\n8 995     1.942999e+01 -7.422998e+01\n10 995     -2.201200e+02 1.364600e+02\n12 995     -1.753300e+02 2.810999e+01\n13 995     2.574500e+02 -2.317700e+02\n15 995     -1.797300e+02 1.295100e+02\n0 996     1.791998e+01 -1.128500e+02\n1 996     1.437900e+02 -8.609998e+01\n6 996     2.734998e+01 -1.034400e+02\n7 996     -4.722998e+01 4.070007e+00\n9 996     7.175000e+01 1.977002e+01\n10 996     -6.090002e+01 1.245001e+01\n12 996     3.462000e+01 -5.291998e+01\n13 996     4.027900e+02 -3.182700e+02\n15 996     4.450012e+00 -1.334003e+01\n0 997     9.071997e+01 -1.727000e+02\n1 997     1.940200e+02 -1.664600e+02\n4 997     -4.136800e+02 -4.840800e+02\n6 997     1.340500e+02 -1.425500e+02\n7 997     3.767999e+01 -4.179999e+01\n8 997     2.824800e+02 -1.544900e+02\n10 997     2.982001e+01 -4.928003e+01\n12 997     1.420700e+02 -9.796002e+01\n13 997     4.775500e+02 -3.643900e+02\n15 997     1.104700e+02 -8.466998e+01\n0 998     -2.015997e+01 -1.980700e+02\n1 998     7.846002e+01 -1.557900e+02\n2 998     2.189600e+02 -1.759400e+02\n3 998     1.400000e+02 -4.767200e+02\n4 998     -4.122000e+02 -3.965300e+02\n6 998     2.912000e+01 -2.080699e+02\n7 998     -6.684003e+01 -8.617999e+01\n10 998     -9.504999e+01 -9.044000e+01\n12 998     2.519000e+01 -1.589200e+02\n15 998     -3.587000e+01 -1.337700e+02\n0 999     1.806200e+02 -3.320800e+02\n1 999     2.423700e+02 -3.533000e+02\n6 999     2.575000e+02 -3.079900e+02\n7 999     1.447900e+02 -1.886400e+02\n8 999     3.773300e+02 -3.072400e+02\n9 999     2.605699e+02 -1.582000e+02\n10 999     1.500200e+02 -2.218900e+02\n12 999     2.752300e+02 -2.752500e+02\n13 999     5.619500e+02 -5.110100e+02\n15 999     2.568700e+02 -2.892400e+02\n0 1000     7.328003e+01 -2.245900e+02\n1 1000     1.584700e+02 -2.110100e+02\n3 1000     2.432400e+02 -4.695400e+02\n4 1000     -4.499400e+02 -4.716600e+02\n6 1000     1.430600e+02 -2.012900e+02\n7 1000     3.154999e+01 -9.433002e+01\n8 1000     2.900800e+02 -1.949900e+02\n10 1000     1.432001e+01 -1.105800e+02\n12 1000     1.441300e+02 -1.579900e+02\n13 1000     4.733000e+02 -4.099500e+02\n15 1000     9.314001e+01 -1.569700e+02\n0 1001     1.177002e+01 -2.121800e+02\n1 1001     1.040200e+02 -1.793900e+02\n2 1001     2.583800e+02 -1.807000e+02\n3 1001     1.783300e+02 -4.796000e+02\n4 1001     -4.290800e+02 -4.209400e+02\n6 1001     7.004999e+01 -2.118300e+02\n7 1001     -3.256000e+01 -9.400000e+01\n8 1001     2.321700e+02 -2.005600e+02\n10 1001     -5.702002e+01 -1.032000e+02\n12 1001     6.752002e+01 -1.649000e+02\n13 1001     4.166700e+02 -4.050300e+02\n15 1001     8.080017e+00 -1.484600e+02\n0 1002     -7.951001e+01 -1.602800e+02\n1 1002     3.750000e+01 -1.024800e+02\n3 1002     5.046002e+01 -4.694301e+02\n6 1002     -6.278998e+01 -1.924800e+02\n8 1002     1.259100e+02 -1.847300e+02\n10 1002     -1.677500e+02 -5.300000e+01\n12 1002     -6.471002e+01 -1.386100e+02\n13 1002     3.214399e+02 -3.682300e+02\n15 1002     -1.205100e+02 -9.041998e+01\n0 1003     2.884003e+01 -2.326500e+02\n1 1003     1.157700e+02 -2.051000e+02\n2 1003     2.794301e+02 -2.048800e+02\n3 1003     1.980300e+02 -5.023400e+02\n4 1003     -4.489500e+02 -4.329500e+02\n6 1003     9.208002e+01 -2.314200e+02\n7 1003     -1.273999e+01 -1.120300e+02\n8 1003     2.496400e+02 -2.200000e+02\n10 1003     -3.551001e+01 -1.245400e+02\n12 1003     9.142999e+01 -1.865900e+02\n13 1003     4.321100e+02 -4.233900e+02\n15 1003     3.465997e+01 -1.738400e+02\n0 1004     1.510999e+01 -2.211600e+02\n1 1004     1.050600e+02 -1.889900e+02\n3 1004     1.825600e+02 -4.924900e+02\n4 1004     -4.368600e+02 -4.229500e+02\n6 1004     7.521997e+01 -2.220400e+02\n7 1004     -2.809003e+01 -1.027800e+02\n8 1004     2.359900e+02 -2.101400e+02\n10 1004     -5.252002e+01 -1.129700e+02\n12 1004     7.312000e+01 -1.756300e+02\n13 1004     4.195601e+02 -4.136700e+02\n15 1004     1.445001e+01 -1.601900e+02\n0 1005     -9.291998e+01 -1.725700e+02\n1 1005     2.298999e+01 -1.107100e+02\n2 1005     1.072200e+02 -1.937400e+02\n3 1005     3.116998e+01 -4.978300e+02\n4 1005     -3.817800e+02 -3.350200e+02\n6 1005     -8.104001e+01 -2.165699e+02\n7 1005     -1.498300e+02 -7.709003e+01\n8 1005     1.093200e+02 -2.065200e+02\n12 1005     -8.160999e+01 -1.625800e+02\n15 1005     -1.372700e+02 -1.089800e+02\n0 1006     3.260900e+02 5.041400e+02\n1 1006     7.332100e+02 4.307100e+02\n2 1006     -3.679993e+00 2.694500e+02\n5 1006     7.299301e+02 -1.373800e+02\n6 1006     -1.291600e+02 5.952400e+02\n8 1006     7.753998e+01 2.109000e+02\n9 1006     -1.554600e+02 3.090600e+02\n11 1006     4.429100e+02 -2.447000e+02\n12 1006     3.451001e+01 5.590700e+02\n13 1006     4.467600e+02 1.971800e+02\n14 1006     6.294700e+02 -2.125700e+02\n0 1007     1.731899e+02 -3.053600e+02\n1 1007     2.393000e+02 -3.221800e+02\n2 1007     4.208500e+02 -2.721700e+02\n7 1007     1.348600e+02 -1.611700e+02\n8 1007     3.685700e+02 -2.746200e+02\n9 1007     2.536000e+02 -1.237900e+02\n0 1008     6.115100e+02 1.307700e+02\n1 1008     8.830300e+02 -3.560999e+01\n2 1008     5.180900e+02 1.165600e+02\n3 1008     3.807000e+02 -1.963500e+02\n7 1008     4.447000e+02 3.086200e+02\n8 1008     4.857900e+02 6.635001e+01\n9 1008     3.055900e+02 1.974400e+02\n10 1008     6.062800e+02 3.587200e+02\n12 1008     5.177600e+02 2.983100e+02\n13 1008     8.189500e+02 -8.148999e+01\n15 1008     8.091801e+02 4.027600e+02\n0 1009     6.722900e+02 -2.746400e+02\n1 1009     8.011300e+02 -4.799399e+02\n0 1010     -2.405000e+02 4.504400e+02\n1 1010     1.193800e+02 5.184300e+02\n2 1010     -5.208600e+02 2.016300e+02\n4 1010     3.419983e+00 -2.166100e+02\n5 1010     1.655100e+02 -2.034300e+02\n7 1010     -4.594600e+02 4.902900e+02\n11 1010     -6.595001e+01 -3.110900e+02\n12 1010     -5.628700e+02 4.141300e+02\n0 1011     -3.768000e+02 4.244100e+02\n1 1011     -2.038000e+01 5.260400e+02\n7 1011     -5.960200e+02 4.485500e+02\n8 1011     -4.628900e+02 1.192300e+02\n10 1011     -5.936200e+02 6.140200e+02\n12 1011     -7.178300e+02 3.625200e+02\n14 1011     -5.415002e+01 -3.212400e+02\n0 1012     -1.930900e+02 4.649800e+02\n1 1012     1.702000e+02 5.216600e+02\n5 1012     2.132600e+02 -1.881000e+02\n7 1012     -4.137900e+02 5.111600e+02\n12 1012     -5.112600e+02 4.391100e+02\n0 1013     -3.572000e+02 4.869300e+02\n1 1013     1.285999e+01 5.821700e+02\n8 1013     -4.472700e+02 1.800100e+02\n12 1013     -7.054500e+02 4.434100e+02\n0 1014     -2.410999e+01 -6.006000e+01\n1 1014     1.223700e+02 -2.302002e+01\n3 1014     4.754999e+01 -3.647300e+02\n7 1014     -1.012200e+02 4.715002e+01\n8 1014     1.367900e+02 -9.265002e+01\n10 1014     -1.148900e+02 6.882001e+01\n15 1014     -5.873999e+01 5.203003e+01\n0 1015     -3.400000e+01 5.159003e+01\n1 1015     1.479399e+02 8.788000e+01\n2 1015     7.423999e+01 5.045001e+01\n3 1015     -1.420001e+01 -2.633900e+02\n5 1015     5.839900e+02 -6.144900e+02\n6 1015     -1.075300e+02 5.845001e+01\n7 1015     -1.322000e+02 1.562800e+02\n8 1015     9.328998e+01 -2.929993e+00\n10 1015     -1.384400e+02 1.974700e+02\n12 1015     -8.712000e+01 1.143000e+02\n13 1015     3.292900e+02 -1.827400e+02\n15 1015     -8.691998e+01 2.025500e+02\n0 1016     2.770020e+00 -2.641300e+02\n1 1016     8.666998e+01 -2.280400e+02\n3 1016     1.651600e+02 -5.720400e+02\n4 1016     -4.702000e+02 -4.039000e+02\n6 1016     5.700000e+01 -2.884000e+02\n7 1016     -3.784998e+01 -1.518000e+02\n9 1016     1.076600e+02 -1.298300e+02\n10 1016     -6.135999e+01 -1.634100e+02\n12 1016     5.933002e+01 -2.431900e+02\n13 1016     4.017500e+02 -4.585200e+02\n15 1016     5.250000e+00 -2.199300e+02\n0 1017     1.194000e+01 -2.362400e+02\n1 1017     1.000000e+02 -2.038800e+02\n2 1017     2.575699e+02 -2.200700e+02\n3 1017     1.793000e+02 -5.193000e+02\n6 1017     7.050000e+01 -2.449301e+02\n7 1017     -2.998999e+01 -1.199700e+02\n8 1017     2.317300e+02 -2.316700e+02\n9 1017     1.193300e+02 -8.628003e+01\n12 1017     6.978003e+01 -1.992400e+02\n15 1017     1.248999e+01 -1.808600e+02\n0 1018     -4.795001e+01 -1.125400e+02\n1 1018     8.272998e+01 -6.623999e+01\n2 1018     1.339400e+02 -1.124000e+02\n3 1018     5.276001e+01 -4.182500e+02\n6 1018     -5.122998e+01 -1.292900e+02\n7 1018     -1.146500e+02 -8.479980e+00\n8 1018     1.347800e+02 -1.397900e+02\n9 1018     1.069000e+01 -3.119995e+00\n10 1018     -1.369800e+02 5.549988e+00\n12 1018     -4.622998e+01 -7.563000e+01\n13 1018     3.417000e+02 -3.245900e+02\n15 1018     -8.414001e+01 -2.197998e+01\n0 1019     -1.235200e+02 -3.454999e+01\n1 1019     4.216998e+01 2.923999e+01\n3 1019     -9.400000e+01 -3.935900e+02\n4 1019     -2.817700e+02 -3.116200e+02\n7 1019     -2.118000e+02 5.160999e+01\n9 1019     -1.152200e+02 1.562000e+01\n10 1019     -2.332000e+02 8.796002e+01\n13 1019     2.513900e+02 -2.670000e+02\n15 1019     -1.948500e+02 7.313000e+01\n0 1020     -8.408002e+01 -1.023800e+02\n1 1020     5.401001e+01 -4.628998e+01\n2 1020     8.032001e+01 -1.226500e+02\n3 1020     5.100098e-01 -4.301400e+02\n6 1020     -1.047700e+02 -1.355200e+02\n7 1020     -1.548600e+02 -6.590027e+00\n10 1020     -1.797100e+02 1.346002e+01\n12 1020     -9.784003e+01 -7.965997e+01\n15 1020     -1.335000e+02 -1.317999e+01\n0 1021     -2.776001e+01 -2.748999e+01\n1 1021     1.284500e+02 9.479980e+00\n2 1021     1.172800e+02 -2.412000e+01\n3 1021     3.183002e+01 -3.320800e+02\n4 1021     -2.880300e+02 -3.889500e+02\n6 1021     -6.508002e+01 -2.612000e+01\n10 1021     -1.244700e+02 1.044000e+02\n12 1021     -5.187000e+01 2.921997e+01\n15 1021     -6.840002e+01 9.557999e+01\n0 1022     -9.431000e+01 -2.284000e+02\n1 1022     1.146997e+01 -1.644900e+02\n3 1022     2.146002e+01 -5.957700e+02\n4 1022     -4.254600e+02 -3.238100e+02\n6 1022     -8.467999e+01 -2.971100e+02\n7 1022     -1.468600e+02 -1.381600e+02\n8 1022     1.038600e+02 -2.808800e+02\n9 1022     -1.313000e+01 -1.509400e+02\n12 1022     -7.940002e+01 -2.441800e+02\n13 1022     2.992000e+02 -4.389800e+02\n0 1023     -5.228003e+01 -1.177400e+02\n1 1023     7.704999e+01 -7.009003e+01\n7 1023     -1.181300e+02 -1.471997e+01\n8 1023     1.307700e+02 -1.469200e+02\n10 1023     -1.422200e+02 -1.270020e+00\n12 1023     -5.103003e+01 -8.401001e+01\n0 1024     1.392999e+01 -2.491600e+02\n1 1024     9.906000e+01 -2.166000e+02\n2 1024     2.582200e+02 -2.411800e+02\n3 1024     1.793400e+02 -5.404500e+02\n4 1024     -4.598800e+02 -4.170900e+02\n6 1024     7.251001e+01 -2.624900e+02\n7 1024     -2.723999e+01 -1.335300e+02\n8 1024     2.323000e+02 -2.481600e+02\n9 1024     1.195100e+02 -1.034500e+02\n10 1024     -5.067999e+01 -1.455900e+02\n12 1024     7.282001e+01 -2.176400e+02\n13 1024     4.146400e+02 -4.424900e+02\n15 1024     1.746997e+01 -1.982700e+02\n0 1025     -4.473999e+01 -1.136000e+02\n1 1025     8.521002e+01 -6.790002e+01\n3 1025     5.725000e+01 -4.181200e+02\n6 1025     -4.648999e+01 -1.286500e+02\n7 1025     -1.111400e+02 -8.669983e+00\n13 1025     3.448101e+02 -3.252200e+02\n15 1025     -7.962000e+01 -2.302002e+01\n0 1026     -5.559998e+00 -2.713200e+02\n1 1026     7.781000e+01 -2.326600e+02\n6 1026     4.728998e+01 -3.021700e+02\n7 1026     -4.589001e+01 -1.614800e+02\n8 1026     2.106300e+02 -2.848100e+02\n10 1026     -7.069000e+01 -1.730800e+02\n12 1026     4.940997e+01 -2.569500e+02\n13 1026     3.932100e+02 -4.672400e+02\n15 1026     -4.559998e+00 -2.307400e+02\n0 1027     -1.803998e+01 -1.305700e+02\n1 1027     1.039500e+02 -9.222998e+01\n2 1027     1.803100e+02 -1.162300e+02\n6 1027     -4.760010e+00 -1.360600e+02\n7 1027     -7.977002e+01 -2.014001e+01\n8 1027     1.715100e+02 -1.445500e+02\n10 1027     -1.005700e+02 -1.204999e+01\n12 1027     -9.400024e-01 -8.429999e+01\n13 1027     3.737100e+02 -3.369800e+02\n15 1027     -4.171002e+01 -4.232001e+01\n0 1028     -6.870001e+01 -1.079900e+02\n1 1028     6.592999e+01 -5.627002e+01\n3 1028     2.313000e+01 -4.268500e+02\n6 1028     -8.178000e+01 -1.345100e+02\n12 1028     -7.571002e+01 -7.952002e+01\n0 1029     4.084998e+01 -1.458900e+02\n1 1029     1.539900e+02 -1.246000e+02\n2 1029     2.533800e+02 -1.105900e+02\n6 1029     7.056000e+01 -1.298800e+02\n7 1029     -1.698999e+01 -2.365002e+01\n8 1029     2.319600e+02 -1.411900e+02\n10 1029     -3.058002e+01 -2.379999e+01\n15 1029     3.945001e+01 -5.520001e+01\n0 1030     4.169000e+01 -1.630300e+02\n1 1030     1.502600e+02 -1.416200e+02\n2 1030     2.577200e+02 -1.321000e+02\n3 1030     1.727200e+02 -4.334900e+02\n6 1030     7.523999e+01 -1.513000e+02\n7 1030     -1.366998e+01 -4.160999e+01\n10 1030     -2.814001e+01 -4.346997e+01\n13 1030     4.311600e+02 -3.604800e+02\n15 1030     4.288000e+01 -7.817999e+01\n0 1031     -4.346002e+01 -1.262000e+02\n1 1031     8.321002e+01 -8.056000e+01\n2 1031     1.432700e+02 -1.277500e+02\n3 1031     6.258002e+01 -4.329399e+02\n6 1031     -4.164001e+01 -1.443500e+02\n7 1031     -1.078300e+02 -2.219000e+01\n10 1031     -1.299500e+02 -1.021002e+01\n12 1031     -3.690002e+01 -9.153003e+01\n13 1031     3.468500e+02 -3.369100e+02\n15 1031     -7.607001e+01 -4.008002e+01\n0 1032     -4.346002e+01 -1.262000e+02\n1 1032     8.321002e+01 -8.056000e+01\n2 1032     1.432700e+02 -1.277500e+02\n3 1032     6.258002e+01 -4.329399e+02\n6 1032     -4.164001e+01 -1.443500e+02\n7 1032     -1.078300e+02 -2.219000e+01\n10 1032     -1.299500e+02 -1.021002e+01\n12 1032     -3.690002e+01 -9.153003e+01\n15 1032     -7.607001e+01 -4.008002e+01\n0 1033     6.128003e+01 -1.591400e+02\n1 1033     1.694600e+02 -1.444900e+02\n3 1033     1.926600e+02 -4.205300e+02\n6 1033     9.734998e+01 -1.384301e+02\n7 1033     5.520020e+00 -3.391998e+01\n8 1033     2.535600e+02 -1.488000e+02\n10 1033     -5.940002e+00 -3.771002e+01\n12 1033     1.036800e+02 -9.146002e+01\n13 1033     4.496300e+02 -3.551600e+02\n15 1033     6.881000e+01 -7.044000e+01\n0 1034     -2.969971e+00 -2.755500e+02\n1 1034     7.915002e+01 -2.373900e+02\n4 1034     -4.786100e+02 -3.977700e+02\n6 1034     5.078998e+01 -3.064500e+02\n7 1034     -4.287000e+01 -1.653100e+02\n8 1034     2.149900e+02 -2.883300e+02\n9 1034     1.020600e+02 -1.482500e+02\n10 1034     -6.782001e+01 -1.772600e+02\n12 1034     5.444000e+01 -2.609100e+02\n15 1034     -5.599976e-01 -2.360700e+02\n0 1035     3.500000e+01 -1.540800e+02\n1 1035     1.466400e+02 -1.312600e+02\n2 1035     2.485601e+02 -1.231700e+02\n3 1035     1.633500e+02 -4.249200e+02\n4 1035     -3.887800e+02 -4.379700e+02\n6 1035     6.515002e+01 -1.420601e+02\n7 1035     -2.176001e+01 -3.341998e+01\n8 1035     2.275400e+02 -1.513100e+02\n10 1035     -3.627002e+01 -3.394000e+01\n12 1035     7.058002e+01 -9.396002e+01\n13 1035     4.251500e+02 -3.528600e+02\n0 1036     -1.532001e+01 -2.716700e+02\n1 1036     6.912000e+01 -2.299600e+02\n4 1036     -4.730500e+02 -3.874200e+02\n6 1036     3.409003e+01 -3.076500e+02\n7 1036     -5.584998e+01 -1.638300e+02\n8 1036     2.008900e+02 -2.888800e+02\n9 1036     8.904999e+01 -1.491700e+02\n10 1036     -8.171997e+01 -1.741700e+02\n12 1036     3.635999e+01 -2.614100e+02\n13 1036     3.838101e+02 -4.686200e+02\n15 1036     -1.769000e+01 -2.327200e+02\n0 1037     -5.840027e+00 -2.478000e+02\n1 1037     8.158002e+01 -2.092700e+02\n2 1037     2.335400e+02 -2.491100e+02\n3 1037     1.556800e+02 -5.489100e+02\n4 1037     -4.551700e+02 -3.996200e+02\n6 1037     4.710999e+01 -2.700500e+02\n7 1037     -4.881000e+01 -1.361700e+02\n8 1037     2.109500e+02 -2.540000e+02\n15 1037     -9.729980e+00 -1.990600e+02\n0 1038     -8.609003e+01 -2.527200e+02\n1 1038     1.233002e+01 -1.905600e+02\n6 1038     -6.696997e+01 -3.223700e+02\n7 1038     -1.342300e+02 -1.612300e+02\n8 1038     1.174400e+02 -3.023300e+02\n10 1038     -1.654000e+02 -1.601900e+02\n13 1038     3.091300e+02 -4.604700e+02\n15 1038     -1.144900e+02 -2.166300e+02\n0 1039     3.800000e+01 -2.351400e+02\n1 1039     1.232900e+02 -2.100400e+02\n2 1039     2.899800e+02 -2.021100e+02\n3 1039     2.102800e+02 -5.009600e+02\n4 1039     -4.532000e+02 -4.407000e+02\n6 1039     1.032900e+02 -2.300900e+02\n7 1039     -3.070007e+00 -1.128600e+02\n8 1039     2.588900e+02 -2.192200e+02\n9 1039     1.447500e+02 -7.113000e+01\n10 1039     -2.452002e+01 -1.268200e+02\n12 1039     1.031900e+02 -1.859000e+02\n13 1039     4.403800e+02 -4.241600e+02\n15 1039     4.733002e+01 -1.761800e+02\n0 1040     8.042999e+01 -1.682400e+02\n1 1040     1.854100e+02 -1.588600e+02\n2 1040     3.022900e+02 -1.238900e+02\n3 1040     2.144100e+02 -4.241801e+02\n4 1040     -4.080500e+02 -4.754200e+02\n6 1040     1.211800e+02 -1.412600e+02\n7 1040     2.622998e+01 -3.904999e+01\n8 1040     2.724200e+02 -1.525700e+02\n10 1040     1.716998e+01 -4.521002e+01\n12 1040     1.287400e+02 -9.579999e+01\n13 1040     4.679700e+02 -3.613500e+02\n15 1040     9.604999e+01 -8.009998e+01\n0 1041     -6.539001e+01 -2.456000e+02\n1 1041     3.003998e+01 -1.876900e+02\n2 1041     1.460700e+02 -2.868900e+02\n4 1041     -4.428700e+02 -3.485300e+02\n6 1041     -3.684998e+01 -2.994000e+02\n7 1041     -1.120800e+02 -1.478900e+02\n8 1041     1.413900e+02 -2.814900e+02\n9 1041     2.813000e+01 -1.481400e+02\n10 1041     -1.425900e+02 -1.495000e+02\n12 1041     -3.542999e+01 -2.482300e+02\n15 1041     -8.847998e+01 -2.039000e+02\n0 1042     2.937200e+02 5.577100e+02\n1 1042     7.126200e+02 4.964200e+02\n2 1042     -3.815997e+01 3.260900e+02\n4 1042     3.170001e+01 -5.551000e+02\n5 1042     6.947000e+02 -8.097998e+01\n8 1042     4.906000e+01 2.553000e+02\n9 1042     -1.862400e+02 3.559400e+02\n11 1042     4.073800e+02 -2.007200e+02\n12 1042     -8.200012e+00 6.148000e+02\n13 1042     4.199100e+02 2.369500e+02\n14 1042     5.946300e+02 -1.629100e+02\n0 1043     -3.234800e+02 4.967500e+02\n1 1043     4.826001e+01 5.839200e+02\n2 1043     -6.068100e+02 2.568100e+02\n7 1043     -5.508900e+02 5.312600e+02\n12 1043     -6.664100e+02 4.593300e+02\n14 1043     3.500000e+00 -2.456200e+02\n0 1044     -3.130700e+02 4.875700e+02\n1 1044     5.625000e+01 5.723500e+02\n2 1044     -5.960700e+02 2.462600e+02\n7 1044     -5.390700e+02 5.224000e+02\n8 1044     -4.096600e+02 1.815200e+02\n12 1044     -6.532500e+02 4.497300e+02\n0 1045     -3.005100e+02 3.818100e+02\n1 1045     4.402002e+01 4.663300e+02\n2 1045     -5.802200e+02 1.148800e+02\n5 1045     9.981000e+01 -2.757900e+02\n7 1045     -5.111700e+02 4.119700e+02\n8 1045     -3.959200e+02 7.854001e+01\n10 1045     -4.935000e+02 5.675200e+02\n11 1045     -1.201500e+02 -3.706000e+02\n12 1045     -6.206700e+02 3.204000e+02\n13 1045     -4.871997e+01 5.419000e+01\n14 1045     1.678998e+01 -3.663500e+02\n0 1046     -5.196700e+02 2.803400e+02\n1 1046     -1.886400e+02 4.219000e+02\n5 1046     -1.314100e+02 -3.821800e+02\n7 1046     -7.239200e+02 2.768400e+02\n10 1046     -7.482200e+02 4.247600e+02\n14 1046     -2.122400e+02 -4.785800e+02\n15 1046     -7.739200e+02 4.509500e+02\n0 1047     -3.146500e+02 4.128500e+02\n1 1047     3.781000e+01 5.001500e+02\n7 1047     -5.297300e+02 4.431200e+02\n8 1047     -4.090600e+02 1.090500e+02\n10 1047     -5.149300e+02 6.051500e+02\n12 1047     -6.422900e+02 3.575900e+02\n0 1048     -4.552300e+02 3.607700e+02\n1 1048     -1.109600e+02 4.832300e+02\n7 1048     -6.679100e+02 3.711300e+02\n8 1048     -5.285200e+02 5.448999e+01\n10 1048     -6.810800e+02 5.286200e+02\n11 1048     -2.583600e+02 -3.879300e+02\n0 1049     -2.756200e+02 4.454600e+02\n1 1049     8.366998e+01 5.225300e+02\n5 1049     1.313100e+02 -2.074900e+02\n7 1049     -4.940300e+02 4.823200e+02\n8 1049     -3.772300e+02 1.414800e+02\n0 1050     -2.971100e+02 4.434100e+02\n1 1050     6.162000e+01 5.256900e+02\n2 1050     -5.787000e+02 1.922700e+02\n5 1050     1.095600e+02 -2.097100e+02\n7 1050     -5.162600e+02 4.773400e+02\n12 1050     -6.271800e+02 3.977200e+02\n14 1050     2.485999e+01 -3.007800e+02\n0 1051     -1.560800e+02 3.354300e+02\n1 1051     1.765601e+02 3.841800e+02\n7 1051     -3.597200e+02 3.796800e+02\n11 1051     9.760010e+00 -4.129600e+02\n14 1051     1.565200e+02 -4.165100e+02\n15 1051     -2.772300e+02 5.745200e+02\n0 1052     -2.405000e+02 4.504400e+02\n1 1052     1.193800e+02 5.184300e+02\n2 1052     -5.208600e+02 2.016300e+02\n5 1052     1.655100e+02 -2.034300e+02\n7 1052     -4.594600e+02 4.902900e+02\n11 1052     -6.595001e+01 -3.110900e+02\n12 1052     -5.628700e+02 4.141300e+02\n14 1052     8.004999e+01 -2.931400e+02\n0 1053     -2.155500e+02 2.253400e+02\n1 1053     8.248999e+01 2.937300e+02\n11 1053     -5.064001e+01 -5.163199e+02\n0 1054     -2.993900e+02 4.208000e+02\n1 1054     5.428003e+01 5.038600e+02\n2 1054     -5.805700e+02 1.638000e+02\n5 1054     1.047900e+02 -2.336000e+02\n7 1054     -5.155200e+02 4.530800e+02\n10 1054     -4.977100e+02 6.152900e+02\n11 1054     -1.182400e+02 -3.368300e+02\n12 1054     -6.259600e+02 3.692900e+02\n14 1054     2.090997e+01 -3.246800e+02\n0 1055     -2.251000e+02 4.544100e+02\n1 1055     1.358900e+02 5.190100e+02\n2 1055     -5.058200e+02 2.056600e+02\n7 1055     -4.445900e+02 4.972000e+02\n0 1056     -2.186700e+02 3.837000e+02\n1 1056     1.255100e+02 4.484100e+02\n4 1056     -3.632001e+01 -2.226200e+02\n14 1056     9.769000e+01 -3.632200e+02\n0 1057     -1.672400e+02 3.633500e+02\n1 1057     1.720500e+02 4.147300e+02\n2 1057     -4.427300e+02 9.409003e+01\n5 1057     2.312400e+02 -2.976200e+02\n7 1057     -3.741600e+02 4.082300e+02\n8 1057     -2.836800e+02 6.509000e+01\n13 1057     5.750000e+01 4.378998e+01\n0 1058     -3.282300e+02 4.206700e+02\n1 1058     2.595001e+01 5.104200e+02\n2 1058     -6.105400e+02 1.632400e+02\n5 1058     7.640997e+01 -2.335100e+02\n7 1058     -5.449500e+02 4.495300e+02\n10 1058     -5.335900e+02 6.130700e+02\n12 1058     -6.595200e+02 3.640400e+02\n13 1058     -6.991998e+01 8.645001e+01\n14 1058     -7.320007e+00 -3.250800e+02\n0 1059     -3.768000e+02 4.244100e+02\n1 1059     -2.038000e+01 5.260400e+02\n2 1059     -6.623000e+02 1.684000e+02\n7 1059     -5.960200e+02 4.485500e+02\n10 1059     -5.936200e+02 6.140200e+02\n11 1059     -1.855900e+02 -3.326200e+02\n12 1059     -7.178300e+02 3.625200e+02\n14 1059     -5.415002e+01 -3.212400e+02\n0 1060     -4.952300e+02 3.796100e+02\n1 1060     -1.439600e+02 5.106800e+02\n14 1060     -1.755300e+02 -3.688600e+02\n0 1061     -3.640100e+02 3.071900e+02\n1 1061     -3.520001e+01 4.096800e+02\n7 1061     -5.657500e+02 3.250700e+02\n10 1061     -5.601400e+02 4.703200e+02\n13 1061     -1.022000e+02 -1.363000e+01\n14 1061     -5.357001e+01 -4.488900e+02\n15 1061     -5.610000e+02 5.082400e+02\n0 1062     -3.324200e+02 2.079700e+02\n1 1062     -3.425000e+01 3.074300e+02\n7 1062     -5.136800e+02 2.290100e+02\n8 1062     -3.957000e+02 -8.112000e+01\n10 1062     -5.081200e+02 3.535100e+02\n13 1062     -6.390997e+01 -9.778998e+01\n14 1062     -1.185999e+01 -5.592400e+02\n0 1063     -7.641700e+02 4.679993e+00\n1 1063     -4.868100e+02 2.287100e+02\n0 1064     -7.930800e+02 1.850000e+01\n1 1064     -5.051500e+02 2.482000e+02\n0 1065     -8.141800e+02 -7.800293e-01\n1 1065     -5.285900e+02 2.364300e+02\n0 1066     -2.028600e+02 3.778900e+02\n1 1066     1.397200e+02 4.360400e+02\n2 1066     -4.797000e+02 1.132200e+02\n5 1066     1.977100e+02 -2.796700e+02\n7 1066     -4.105500e+02 4.202800e+02\n8 1066     -3.134500e+02 7.912000e+01\n11 1066     -3.247998e+01 -3.748600e+02\n12 1066     -5.067700e+02 3.335200e+02\n13 1066     2.909998e+01 5.446002e+01\n14 1066     1.123400e+02 -3.703200e+02\n0 1067     -1.930900e+02 4.649800e+02\n1 1067     1.702000e+02 5.216600e+02\n2 1067     -4.741700e+02 2.181800e+02\n7 1067     -4.137900e+02 5.111600e+02\n0 1068     -3.839200e+02 4.360300e+02\n1 1068     -2.475000e+01 5.393500e+02\n2 1068     -6.686900e+02 1.830400e+02\n12 1068     -7.277500e+02 3.766000e+02\n0 1069     -2.472800e+02 4.457100e+02\n1 1069     1.117700e+02 5.159900e+02\n2 1069     -5.276000e+02 1.949500e+02\n5 1069     1.588500e+02 -2.076500e+02\n7 1069     -4.657200e+02 4.852300e+02\n12 1069     -5.696500e+02 4.079700e+02\n14 1069     7.339001e+01 -2.978300e+02\n0 1070     -2.705600e+02 4.422100e+02\n1 1070     8.735999e+01 5.181100e+02\n2 1070     -5.514800e+02 1.902300e+02\n4 1070     1.419983e+00 -1.990600e+02\n5 1070     1.355000e+02 -2.115600e+02\n7 1070     -4.889800e+02 4.788200e+02\n8 1070     -3.747700e+02 1.369900e+02\n12 1070     -5.963200e+02 4.000200e+02\n13 1070     -2.403998e+01 1.072100e+02\n14 1070     5.026001e+01 -3.019200e+02\n0 1071     -2.181200e+02 4.644800e+02\n1 1071     1.452100e+02 5.271700e+02\n2 1071     -4.989900e+02 2.181700e+02\n4 1071     1.001001e+01 -2.306900e+02\n5 1071     1.894100e+02 -1.881100e+02\n7 1071     -4.384600e+02 5.081300e+02\n8 1071     -3.297300e+02 1.612000e+02\n11 1071     -4.545001e+01 -2.985800e+02\n12 1071     -5.394700e+02 4.353900e+02\n0 1072     -2.936100e+02 1.866200e+02\n1 1072     -5.630005e+00 2.773500e+02\n7 1072     -4.683000e+02 2.143800e+02\n0 1073     -4.469100e+02 2.484400e+02\n1 1073     -1.277100e+02 3.739800e+02\n7 1073     -6.442600e+02 2.514900e+02\n11 1073     -2.585300e+02 -4.899200e+02\n13 1073     -1.732900e+02 -6.972998e+01\n14 1073     -1.463800e+02 -5.154800e+02\n0 1074     -3.167800e+02 1.945600e+02\n1 1074     -2.423999e+01 2.908200e+02\n13 1074     -4.663000e+01 -1.080200e+02\n0 1075     -3.393600e+02 3.764600e+02\n1 1075     4.809998e+00 4.706800e+02\n2 1075     -6.212400e+02 1.073800e+02\n7 1075     -5.502300e+02 4.015600e+02\n10 1075     -5.401900e+02 5.574800e+02\n11 1075     -1.550900e+02 -3.755300e+02\n12 1075     -6.652900e+02 3.075700e+02\n0 1076     -1.851200e+02 4.395500e+02\n1 1076     1.723000e+02 4.947700e+02\n5 1076     2.193500e+02 -2.144400e+02\n7 1076     -4.021300e+02 4.856500e+02\n8 1076     -3.026100e+02 1.376500e+02\n12 1076     -4.980600e+02 4.099900e+02\n0 1077     -1.851200e+02 4.395500e+02\n1 1077     1.723000e+02 4.947700e+02\n2 1077     -4.649600e+02 1.875200e+02\n5 1077     2.193500e+02 -2.144400e+02\n7 1077     -4.021300e+02 4.856500e+02\n12 1077     -4.980600e+02 4.099900e+02\n0 1078     -3.047600e+02 3.565500e+02\n1 1078     3.381000e+01 4.429600e+02\n5 1078     9.282001e+01 -3.032400e+02\n7 1078     -5.120400e+02 3.847700e+02\n8 1078     -3.989100e+02 5.314001e+01\n10 1078     -4.951300e+02 5.357600e+02\n12 1078     -6.212500e+02 2.884100e+02\n14 1078     1.031000e+01 -3.939100e+02\n0 1079     -1.914700e+02 3.419300e+02\n1 1079     1.428101e+02 3.996500e+02\n2 1079     -4.663900e+02 6.602002e+01\n5 1079     2.052600e+02 -3.213800e+02\n7 1079     -3.952800e+02 3.825000e+02\n8 1079     -3.026400e+02 4.223001e+01\n12 1079     -4.884900e+02 2.879400e+02\n15 1079     -3.268300e+02 5.793500e+02\n0 1080     -2.149700e+02 4.000900e+02\n1 1080     1.330100e+02 4.632100e+02\n2 1080     -4.930200e+02 1.389000e+02\n4 1080     -2.651001e+01 -2.258700e+02\n5 1080     1.867800e+02 -2.567900e+02\n7 1080     -4.269200e+02 4.409700e+02\n8 1080     -3.249300e+02 9.916000e+01\n10 1080     -3.924900e+02 5.971300e+02\n11 1080     -4.375000e+01 -3.549000e+02\n12 1080     -5.250600e+02 3.569000e+02\n13 1080     2.027002e+01 7.384003e+01\n14 1080     1.024200e+02 -3.457100e+02\n0 1081     -3.383800e+02 4.730500e+02\n1 1081     2.803998e+01 5.646200e+02\n2 1081     -6.221700e+02 2.291200e+02\n5 1081     7.210999e+01 -1.773800e+02\n7 1081     -5.632100e+02 5.046500e+02\n14 1081     -1.271997e+01 -2.696200e+02\n0 1082     -2.904100e+02 4.371500e+02\n1 1082     6.702002e+01 5.177300e+02\n2 1082     -5.716400e+02 1.841400e+02\n7 1082     -5.085500e+02 4.714800e+02\n8 1082     -3.893900e+02 1.329800e+02\n12 1082     -6.183200e+02 3.907200e+02\n13 1082     -3.933002e+01 1.022700e+02\n14 1082     3.104999e+01 -3.074100e+02\n0 1083     -3.383800e+02 4.730500e+02\n1 1083     2.803998e+01 5.646200e+02\n2 1083     -6.221700e+02 2.291200e+02\n5 1083     7.210999e+01 -1.773800e+02\n7 1083     -5.632100e+02 5.046500e+02\n14 1083     -1.271997e+01 -2.696200e+02\n0 1084     -2.919700e+02 3.973300e+02\n1 1084     5.553003e+01 4.790900e+02\n4 1084     -2.182001e+01 -1.835800e+02\n5 1084     1.111900e+02 -2.591600e+02\n8 1084     -3.876800e+02 9.512000e+01\n11 1084     -1.125700e+02 -3.577700e+02\n13 1084     -4.078003e+01 6.808002e+01\n14 1084     2.728998e+01 -3.495800e+02\n0 1085     -2.859800e+02 3.706700e+02\n1 1085     5.592999e+01 4.519300e+02\n5 1085     1.133100e+02 -2.880200e+02\n7 1085     -4.939700e+02 4.022700e+02\n8 1085     -3.825700e+02 6.873001e+01\n10 1085     -4.735900e+02 5.552200e+02\n13 1085     -3.703003e+01 4.526001e+01\n14 1085     3.073999e+01 -3.781600e+02\n0 1086     -2.610000e+02 4.514500e+02\n1 1086     9.928998e+01 5.247300e+02\n11 1086     -8.377002e+01 -3.099300e+02\n12 1086     -5.865100e+02 4.125000e+02\n14 1086     6.034998e+01 -2.921900e+02\n0 1087     -2.246700e+02 3.929200e+02\n1 1087     1.217000e+02 4.583100e+02\n2 1087     -5.020700e+02 1.295900e+02\n7 1087     -4.352300e+02 4.324100e+02\n8 1087     -3.327200e+02 9.167999e+01\n10 1087     -4.029800e+02 5.871300e+02\n11 1087     -5.232001e+01 -3.612800e+02\n12 1087     -5.348100e+02 3.461600e+02\n0 1088     -2.899100e+02 3.551900e+02\n1 1088     4.854999e+01 4.375100e+02\n5 1088     1.077600e+02 -3.057800e+02\n7 1088     -4.963800e+02 3.851000e+02\n10 1088     -4.765900e+02 5.348900e+02\n13 1088     -4.060999e+01 3.048999e+01\n14 1088     2.525000e+01 -3.964500e+02\n0 1089     -2.610000e+02 4.514500e+02\n1 1089     9.928998e+01 5.247300e+02\n2 1089     -5.415900e+02 2.015700e+02\n5 1089     1.457900e+02 -2.019400e+02\n7 1089     -4.805500e+02 4.894600e+02\n8 1089     -3.650900e+02 1.471700e+02\n11 1089     -8.377002e+01 -3.099300e+02\n12 1089     -5.865100e+02 4.125000e+02\n14 1089     6.034998e+01 -2.921900e+02\n0 1090     -2.603400e+02 4.378200e+02\n1 1090     9.665997e+01 5.113600e+02\n7 1090     -4.780700e+02 4.756800e+02\n12 1090     -5.835200e+02 3.964400e+02\n14 1090     6.007001e+01 -3.062400e+02\n0 1091     -3.210500e+02 3.504600e+02\n1 1091     1.646997e+01 4.405500e+02\n2 1091     -6.014200e+02 7.427002e+01\n7 1091     -5.280500e+02 3.762500e+02\n10 1091     -5.141100e+02 5.268400e+02\n12 1091     -6.393200e+02 2.779300e+02\n14 1091     -6.359985e+00 -4.010600e+02\n15 1091     -5.087100e+02 5.745400e+02\n0 1092     -4.260000e+02 4.130900e+02\n1 1092     -7.048999e+01 5.266300e+02\n2 1092     -7.154000e+02 1.535600e+02\n5 1092     -2.066998e+01 -2.398500e+02\n8 1092     -5.056300e+02 1.067300e+02\n13 1092     -1.483300e+02 7.628998e+01\n14 1092     -1.035600e+02 -3.330900e+02\n0 1093     -3.669600e+02 3.336200e+02\n1 1093     -3.196997e+01 4.359000e+02\n7 1093     -5.727300e+02 3.527000e+02\n10 1093     -5.674500e+02 5.020000e+02\n13 1093     -1.035500e+02 9.219971e+00\n14 1093     -5.369000e+01 -4.196000e+02\n15 1093     -5.700400e+02 5.451000e+02\n0 1094     -3.787500e+02 3.142200e+02\n1 1094     -4.746997e+01 4.204400e+02\n5 1094     1.335999e+01 -3.488700e+02\n7 1094     -5.820000e+02 3.308700e+02\n10 1094     -5.795400e+02 4.774900e+02\n11 1094     -1.929300e+02 -4.307600e+02\n15 1094     -5.831200e+02 5.163200e+02\n0 1095     -3.797200e+02 2.986400e+02\n1 1095     -5.223999e+01 4.052600e+02\n7 1095     -5.809500e+02 3.137200e+02\n10 1095     -5.779800e+02 4.578300e+02\n13 1095     -1.150700e+02 -2.258002e+01\n15 1095     -5.815200e+02 4.951000e+02\n0 1096     -2.847500e+02 3.534100e+02\n1 1096     5.302002e+01 4.344200e+02\n5 1096     1.125500e+02 -3.074900e+02\n7 1096     -4.910400e+02 3.837300e+02\n8 1096     -3.811100e+02 5.057999e+01\n10 1096     -4.705100e+02 5.334300e+02\n11 1096     -1.069900e+02 -3.961900e+02\n12 1096     -5.971700e+02 2.867200e+02\n0 1097     -2.329900e+02 4.417800e+02\n1 1097     1.248300e+02 5.082900e+02\n2 1097     -5.134900e+02 1.915800e+02\n4 1097     -1.719971e+00 -2.199400e+02\n5 1097     1.722600e+02 -2.124200e+02\n8 1097     -3.417000e+02 1.382900e+02\n11 1097     -5.931000e+01 -3.181500e+02\n12 1097     -5.530700e+02 4.046400e+02\n13 1097     6.270020e+00 1.092300e+02\n14 1097     8.696997e+01 -3.011400e+02\n0 1098     -4.332000e+02 4.502900e+02\n1 1098     -6.913000e+01 5.632400e+02\n5 1098     -2.284998e+01 -2.001200e+02\n8 1098     -5.123800e+02 1.429600e+02\n12 1098     -7.906600e+02 3.863700e+02\n13 1098     -1.526600e+02 1.067600e+02\n14 1098     -1.061900e+02 -2.936900e+02\n0 1099     -2.324000e+02 4.496200e+02\n1 1099     1.272500e+02 5.161700e+02\n7 1099     -4.514500e+02 4.908800e+02\n8 1099     -3.411600e+02 1.463300e+02\n11 1099     -5.871002e+01 -3.115100e+02\n13 1099     6.869995e+00 1.157000e+02\n14 1099     8.783002e+01 -2.935600e+02\n0 1100     -2.287500e+02 4.542400e+02\n1 1100     1.322000e+02 5.195400e+02\n2 1100     -5.090100e+02 2.041600e+02\n4 1100     4.530029e+00 -2.236600e+02\n5 1100     1.777700e+02 -1.999900e+02\n8 1100     -3.386600e+02 1.507000e+02\n11 1100     -5.545001e+01 -3.074400e+02\n12 1100     -5.499200e+02 4.199100e+02\n13 1100     9.979980e+00 1.194400e+02\n14 1100     9.203003e+01 -2.891900e+02\n0 1101     2.829999e+01 -2.527000e+02\n1 1101     1.111600e+02 -2.244100e+02\n2 1101     2.763600e+02 -2.391800e+02\n3 1101     1.969301e+02 -5.376700e+02\n4 1101     -4.657900e+02 -4.292500e+02\n6 1101     9.113000e+01 -2.600800e+02\n7 1101     -1.203998e+01 -1.341300e+02\n8 1101     2.475400e+02 -2.469400e+02\n9 1101     1.342100e+02 -1.013900e+02\n12 1101     9.209003e+01 -2.160100e+02\n13 1101     4.289301e+02 -4.440900e+02\n15 1101     3.746997e+01 -2.012700e+02\n0 1102     -8.066998e+01 -2.277800e+02\n1 1102     2.253998e+01 -1.681300e+02\n4 1102     -4.261300e+02 -3.364900e+02\n6 1102     -6.256000e+01 -2.848199e+02\n7 1102     -1.312700e+02 -1.338900e+02\n12 1102     -5.979999e+01 -2.325100e+02\n15 1102     -1.111000e+02 -1.816300e+02\n0 1103     4.229980e+00 -2.477800e+02\n1 1103     9.120001e+01 -2.127300e+02\n6 1103     6.117999e+01 -2.639600e+02\n7 1103     -3.753003e+01 -1.338400e+02\n9 1103     1.099000e+02 -1.053900e+02\n10 1103     -6.247998e+01 -1.447400e+02\n12 1103     6.029999e+01 -2.184700e+02\n13 1103     4.057400e+02 -4.417700e+02\n15 1103     4.570007e+00 -1.976300e+02\n0 1104     -7.720001e+01 -2.337100e+02\n1 1104     2.445001e+01 -1.748200e+02\n6 1104     -5.760999e+01 -2.920800e+02\n8 1104     1.260800e+02 -2.753900e+02\n9 1104     1.217999e+01 -1.427000e+02\n12 1104     -5.434003e+01 -2.404900e+02\n13 1104     3.187200e+02 -4.404399e+02\n15 1104     -1.051600e+02 -1.897900e+02\n0 1105     2.338000e+01 -2.608000e+02\n1 1105     1.051300e+02 -2.309900e+02\n4 1105     -4.714500e+02 -4.230100e+02\n10 1105     -3.906000e+01 -1.572700e+02\n15 1105     3.214001e+01 -2.128200e+02\n0 1106     -2.195400e+02 4.963000e+02\n1 1106     1.512700e+02 5.592800e+02\n2 1106     -5.015200e+02 2.558700e+02\n5 1106     1.900000e+02 -1.546200e+02\n7 1106     -4.444300e+02 5.415900e+02\n8 1106     -3.327300e+02 1.909200e+02\n12 1106     -5.465900e+02 4.742200e+02\n0 1107     -1.976100e+02 4.003500e+02\n1 1107     1.506400e+02 4.592100e+02\n2 1107     -4.753700e+02 1.398200e+02\n5 1107     2.040699e+02 -2.561500e+02\n7 1107     -4.094000e+02 4.438900e+02\n8 1107     -3.104300e+02 1.002300e+02\n10 1107     -3.714800e+02 5.988900e+02\n12 1107     -5.054100e+02 3.606500e+02\n14 1107     1.191600e+02 -3.463100e+02\n0 1108     -1.852800e+02 4.464300e+02\n1 1108     1.740300e+02 5.013800e+02\n2 1108     -4.657700e+02 1.960000e+02\n7 1108     -4.035100e+02 4.927800e+02\n12 1108     -4.991100e+02 4.182300e+02\n14 1108     1.334100e+02 -2.962400e+02\n0 1109     -5.686100e+02 3.048600e+02\n1 1109     -2.292300e+02 4.570700e+02\n14 1109     -2.600900e+02 -4.501600e+02\n15 1109     -8.489100e+02 4.785700e+02\n0 1110     -3.717700e+02 3.349400e+02\n1 1110     -3.633002e+01 4.384600e+02\n4 1110     -5.022998e+01 -1.328300e+02\n5 1110     2.313000e+01 -3.257800e+02\n11 1110     -1.857300e+02 -4.123600e+02\n13 1110     -1.072800e+02 1.037000e+01\n14 1110     -5.821002e+01 -4.180100e+02\n15 1110     -5.771200e+02 5.461800e+02\n0 1111     -4.220900e+02 2.885300e+02\n1 1111     -9.476001e+01 4.060100e+02\n7 1111     -6.238000e+02 2.976400e+02\n11 1111     -2.331700e+02 -4.529800e+02\n12 1111     -7.503500e+02 1.803100e+02\n0 1112     -4.552300e+02 3.607700e+02\n1 1112     -1.109600e+02 4.832300e+02\n5 1112     -5.448999e+01 -2.954600e+02\n7 1112     -6.679100e+02 3.711300e+02\n8 1112     -5.285200e+02 5.448999e+01\n10 1112     -6.810800e+02 5.286200e+02\n11 1112     -2.583600e+02 -3.879300e+02\n12 1112     -8.007800e+02 2.700400e+02\n0 1113     -3.848900e+02 3.502600e+02\n1 1113     -4.544000e+01 4.564100e+02\n4 1113     -4.033002e+01 -1.275300e+02\n5 1113     1.177002e+01 -3.085200e+02\n7 1113     -5.937800e+02 3.681400e+02\n8 1113     -4.686200e+02 4.451001e+01\n10 1113     -5.912700e+02 5.196900e+02\n15 1113     -5.981800e+02 5.659500e+02\n0 1114     -1.136800e+02 -1.646002e+01\n1 1114     5.600000e+01 4.406000e+01\n10 1114     -2.234300e+02 1.103200e+02\n15 1114     -1.841700e+02 9.922000e+01\n0 1115     2.543400e+02 -6.270001e+01\n1 1115     3.939600e+02 -1.103300e+02\n12 1115     2.817900e+02 6.834998e+01\n15 1115     3.203800e+02 8.629999e+01\n0 1116     1.487200e+02 -2.025800e+02\n1 1116     2.413600e+02 -2.141100e+02\n7 1116     9.954999e+01 -6.078003e+01\n10 1116     9.984003e+01 -7.727002e+01\n15 1116     1.934800e+02 -1.175200e+02\n0 1117     2.673800e+02 -1.846600e+02\n1 1117     3.679399e+02 -2.360100e+02\n10 1117     2.342500e+02 -4.414001e+01\n0 1118     1.969900e+02 -2.866400e+02\n1 1118     2.674200e+02 -3.133200e+02\n12 1118     2.929700e+02 -1.972600e+02\n15 1118     2.716801e+02 -2.253400e+02\n0 1119     -1.186000e+02 5.679993e+00\n1 1119     5.995001e+01 6.614001e+01\n6 1119     -2.108200e+02 -3.300000e+01\n15 1119     -1.935700e+02 1.283400e+02\n0 1120     -1.074700e+02 8.532999e+01\n1 1120     1.020800e+02 1.380000e+02\n6 1120     -2.604000e+02 5.091998e+01\n7 1120     -2.252000e+02 1.687100e+02\n10 1120     -2.279100e+02 2.295200e+02\n12 1120     -2.159200e+02 1.055400e+02\n15 1120     -1.872500e+02 2.381000e+02\n0 1121     3.510800e+02 -5.694000e+01\n1 1121     5.034800e+02 -1.374800e+02\n7 1121     2.589000e+02 1.085000e+02\n10 1121     3.182700e+02 1.116500e+02\n12 1121     3.674600e+02 8.467999e+01\n15 1121     4.551801e+02 1.069800e+02\n0 1122     2.168199e+02 -2.115200e+02\n1 1122     3.059800e+02 -2.452200e+02\n6 1122     2.787600e+02 -1.419800e+02\n7 1122     1.671500e+02 -5.763000e+01\n10 1122     1.787000e+02 -8.067999e+01\n12 1122     2.963000e+02 -1.047400e+02\n15 1122     2.871300e+02 -1.209400e+02\n0 1123     4.850000e+01 -1.284300e+02\n1 1123     1.672800e+02 -1.102300e+02\n15 1123     4.773999e+01 -3.028998e+01\n0 1124     -2.634003e+01 -1.860900e+02\n1 1124     7.733002e+01 -1.426700e+02\n3 1124     1.230900e+02 -4.719200e+02\n4 1124     -4.025000e+02 -3.901000e+02\n6 1124     1.353998e+01 -1.990900e+02\n7 1124     -7.683002e+01 -7.600000e+01\n8 1124     1.861500e+02 -1.908700e+02\n10 1124     -1.043800e+02 -7.695001e+01\n12 1124     1.103003e+01 -1.489800e+02\n0 1125     -7.459003e+01 -1.558200e+02\n1 1125     4.353998e+01 -9.965002e+01\n2 1125     1.272700e+02 -1.618500e+02\n6 1125     -6.097998e+01 -1.870300e+02\n7 1125     -1.327500e+02 -5.606000e+01\n10 1125     -1.642800e+02 -4.753003e+01\n12 1125     -6.265997e+01 -1.333400e+02\n15 1125     -1.145200e+02 -8.403003e+01\n0 1126     -1.816800e+02 4.013000e+01\n1 1126     1.884998e+01 1.150300e+02\n6 1126     -3.333000e+02 -2.778003e+01\n7 1126     -2.936300e+02 1.103100e+02\n10 1126     -3.096000e+02 1.692100e+02\n15 1126     -2.817700e+02 1.663400e+02\n0 1127     -1.982100e+02 -4.210900e+02\n1 1127     -1.374800e+02 -3.145400e+02\n4 1127     -5.583200e+02 -2.286200e+02\n7 1127     -2.204800e+02 -3.562300e+02\n15 1127     -2.418700e+02 -4.595100e+02\n0 1128     2.043400e+02 1.025000e+01\n1 1128     3.638600e+02 -2.151001e+01\n2 1128     3.467500e+02 8.031000e+01\n3 1128     2.422900e+02 -2.286700e+02\n6 1128     1.834300e+02 9.428003e+01\n7 1128     1.157900e+02 1.575200e+02\n8 1128     3.189000e+02 1.845999e+01\n10 1128     1.422900e+02 1.739500e+02\n12 1128     2.095200e+02 1.413300e+02\n13 1128     5.493700e+02 -1.958800e+02\n15 1128     2.420200e+02 1.792100e+02\n0 1129     7.245001e+01 2.287000e+02\n1 1129     3.657300e+02 2.195500e+02\n5 1129     5.200000e+02 -4.416600e+02\n6 1129     -2.732700e+02 2.096200e+02\n7 1129     -1.066700e+02 3.100200e+02\n10 1129     -3.222998e+01 4.182300e+02\n11 1129     2.204000e+02 -5.117800e+02\n0 1130     2.294399e+02 -2.244000e+01\n1 1130     3.799700e+02 -6.183002e+01\n2 1130     3.796400e+02 5.100000e+01\n3 1130     2.742800e+02 -2.557900e+02\n7 1130     1.449000e+02 1.292500e+02\n10 1130     1.746300e+02 1.386400e+02\n13 1130     5.743600e+02 -2.224000e+02\n15 1130     2.808500e+02 1.379300e+02\n0 1131     6.270020e+00 1.627300e+02\n1 1131     2.267000e+02 1.840300e+02\n5 1131     5.970800e+02 -4.913300e+02\n6 1131     -1.263000e+02 1.877700e+02\n7 1131     -1.165300e+02 2.689700e+02\n12 1131     -8.745001e+01 2.387900e+02\n13 1131     3.388000e+02 -8.896002e+01\n14 1131     5.008900e+02 -5.727500e+02\n15 1131     -4.558002e+01 3.600900e+02\n0 1132     5.584800e+02 6.017999e+01\n1 1132     8.048900e+02 -9.384003e+01\n6 1132     3.868400e+02 1.851900e+02\n13 1132     7.711700e+02 -1.509900e+02\n15 1132     7.419301e+02 2.962400e+02\n0 1133     -1.641700e+02 -5.812000e+01\n1 1133     -3.179993e+00 1.819000e+01\n6 1133     -2.356000e+02 -1.214500e+02\n7 1133     -2.491000e+02 2.077002e+01\n10 1133     -2.777700e+02 5.615997e+01\n12 1133     -2.207400e+02 -5.967999e+01\n13 1133     2.178700e+02 -2.909800e+02\n15 1133     -2.467100e+02 3.545001e+01\n0 1134     1.582500e+02 -1.117800e+02\n1 1134     2.807400e+02 -1.283200e+02\n2 1134     3.487300e+02 -5.351001e+01\n6 1134     1.768900e+02 -5.477002e+01\n7 1134     9.128003e+01 2.933002e+01\n8 1134     3.152000e+02 -9.306000e+01\n10 1134     1.013900e+02 2.809003e+01\n15 1134     1.948199e+02 6.739990e+00\n0 1135     1.282400e+02 -2.364500e+02\n1 1135     2.073500e+02 -2.399100e+02\n6 1135     2.068800e+02 -1.951100e+02\n7 1135     8.825000e+01 -9.596997e+01\n13 1135     5.251899e+02 -4.162100e+02\n15 1135     1.689200e+02 -1.660700e+02\n0 1136     2.485300e+02 8.989999e+01\n1 1136     4.390100e+02 4.347998e+01\n6 1136     1.840600e+02 1.874300e+02\n12 1136     2.218900e+02 2.315600e+02\n13 1136     5.672000e+02 -1.275200e+02\n15 1136     2.939700e+02 2.944700e+02\n0 1137     1.822600e+02 -3.350400e+02\n1 1137     2.431300e+02 -3.568000e+02\n4 1137     -5.721600e+02 -5.497200e+02\n6 1137     2.589800e+02 -3.121000e+02\n7 1137     1.464399e+02 -1.916100e+02\n9 1137     2.615601e+02 -1.622200e+02\n10 1137     1.518200e+02 -2.249900e+02\n12 1137     2.769100e+02 -2.795300e+02\n13 1137     5.627900e+02 -5.142000e+02\n15 1137     2.595400e+02 -2.929700e+02\n0 1138     1.386300e+02 5.140002e+01\n1 1138     3.103600e+02 3.914001e+01\n7 1138     4.507001e+01 1.878600e+02\n10 1138     6.166998e+01 2.156800e+02\n12 1138     1.240400e+02 1.721600e+02\n15 1138     1.464301e+02 2.264500e+02\n0 1139     1.845601e+02 -1.734900e+02\n1 1139     2.867500e+02 -1.972500e+02\n2 1139     4.006000e+02 -1.051100e+02\n10 1139     1.378200e+02 -3.944000e+01\n12 1139     2.449600e+02 -7.009003e+01\n13 1139     5.579800e+02 -3.575200e+02\n15 1139     2.384301e+02 -7.340997e+01\n0 1140     6.478998e+01 1.655200e+02\n1 1140     2.846801e+02 1.703100e+02\n7 1140     -5.771997e+01 2.802500e+02\n10 1140     -3.506000e+01 3.407700e+02\n15 1140     3.396002e+01 3.725500e+02\n0 1141     7.290997e+01 2.326800e+02\n1 1141     3.677700e+02 2.232400e+02\n7 1141     -1.070200e+02 3.136400e+02\n10 1141     -3.210999e+01 4.230200e+02\n0 1142     -7.637000e+01 1.221700e+02\n1 1142     1.471200e+02 1.644800e+02\n3 1142     -1.719800e+02 -2.845000e+02\n5 1142     4.739900e+02 -5.449399e+02\n6 1142     -2.531800e+02 9.756000e+01\n8 1142     -1.952002e+01 -5.579987e+00\n9 1142     -1.828400e+02 1.077900e+02\n10 1142     -1.950500e+02 2.762000e+02\n12 1142     -1.988700e+02 1.476000e+02\n0 1143     5.919200e+02 1.301000e+02\n1 1143     8.617500e+02 -3.076001e+01\n8 1143     4.668101e+02 5.867999e+01\n10 1143     5.832500e+02 3.559000e+02\n15 1143     7.805900e+02 3.992100e+02\n0 1144     -9.047998e+01 -2.257300e+02\n1 1144     1.508002e+01 -1.630100e+02\n4 1144     -4.234800e+02 -3.277700e+02\n7 1144     -1.427900e+02 -1.341700e+02\n10 1144     -1.737900e+02 -1.297000e+02\n12 1144     -7.490002e+01 -2.371400e+02\n15 1144     -1.244500e+02 -1.810100e+02\n0 1145     -5.559003e+01 -1.577700e+02\n1 1145     6.067999e+01 -1.072600e+02\n4 1145     -3.760300e+02 -3.651600e+02\n6 1145     -3.959998e+01 -1.817100e+02\n7 1145     -1.127200e+02 -5.464001e+01\n8 1145     1.436900e+02 -1.783900e+02\n10 1145     -1.409500e+02 -4.753998e+01\n12 1145     -3.946997e+01 -1.288400e+02\n13 1145     3.426000e+02 -3.640900e+02\n15 1145     -8.875000e+01 -8.407001e+01\n0 1146     1.999301e+02 4.101600e+02\n1 1146     5.670500e+02 3.650500e+02\n14 1146     5.122500e+02 -3.227600e+02\n0 1147     -2.626900e+02 3.957100e+02\n1 1147     8.447998e+01 4.704800e+02\n2 1147     -5.419200e+02 1.332500e+02\n7 1147     -4.744300e+02 4.307100e+02\n8 1147     -3.646200e+02 9.347000e+01\n11 1147     -8.645001e+01 -3.585200e+02\n14 1147     5.544000e+01 -3.511100e+02\n0 1148     -2.654999e+01 5.105600e+02\n1 1148     3.518400e+02 5.265400e+02\n2 1148     -3.164200e+02 2.718400e+02\n6 1148     -5.107600e+02 5.311100e+02\n7 1148     -2.541200e+02 5.761800e+02\n8 1148     -1.809800e+02 2.081200e+02\n11 1148     1.233200e+02 -2.551500e+02\n12 1148     -3.347100e+02 5.184600e+02\n0 1149     -6.745001e+01 4.722900e+02\n1 1149     2.997400e+02 4.982900e+02\n2 1149     -3.526900e+02 2.274800e+02\n5 1149     3.372200e+02 -1.794700e+02\n6 1149     -5.506400e+02 4.713400e+02\n7 1149     -2.898300e+02 5.323900e+02\n12 1149     -3.731300e+02 4.663700e+02\n14 1149     2.479301e+02 -2.665000e+02\n0 1150     5.528003e+01 5.009998e+01\n1 1150     2.282000e+02 6.212000e+01\n6 1150     9.469971e+00 9.201001e+01\n8 1150     1.841000e+02 2.445001e+01\n12 1150     2.746997e+01 1.459500e+02\n0 1151     -1.230300e+02 4.888100e+02\n1 1151     2.472600e+02 5.284000e+02\n2 1151     -4.065900e+02 2.472200e+02\n3 1151     -5.345500e+02 -8.323999e+01\n0 1152     1.595699e+02 3.846997e+01\n1 1152     3.271000e+02 2.019000e+01\n15 1152     1.767000e+02 2.118300e+02\n0 1153     8.763000e+01 2.628700e+02\n1 1153     3.941100e+02 2.488800e+02\n5 1153     5.255699e+02 -4.054900e+02\n6 1153     -2.785400e+02 2.512200e+02\n9 1153     -2.432600e+02 1.031100e+02\n11 1153     2.343500e+02 -4.780200e+02\n12 1153     -1.379600e+02 2.648200e+02\n14 1153     4.387200e+02 -4.860800e+02\n0 1154     -5.470001e+01 -3.909003e+01\n1 1154     1.022700e+02 5.900024e+00\n3 1154     -1.679993e+00 -3.626000e+02\n7 1154     -1.378500e+02 6.140002e+01\n10 1154     -1.526200e+02 9.000000e+01\n13 1154     3.198400e+02 -2.634300e+02\n15 1154     -1.022300e+02 7.657001e+01\n0 1155     4.308002e+01 1.273400e+02\n1 1155     2.452800e+02 1.402200e+02\n15 1155     7.710022e+00 3.170300e+02\n0 1156     -4.457900e+02 6.670001e+01\n1 1156     -1.880500e+02 2.051700e+02\n13 1156     -1.327300e+02 -2.239200e+02\n15 1156     -6.386400e+02 1.655700e+02\n0 1157     -4.078300e+02 -2.659973e+00\n1 1157     -1.780500e+02 1.313700e+02\n15 1157     -5.773500e+02 7.614001e+01\n0 1158     2.538400e+02 -2.529100e+02\n1 1158     3.331200e+02 -2.989500e+02\n7 1158     2.073199e+02 -9.328003e+01\n10 1158     2.260500e+02 -1.235700e+02\n15 1158     3.444800e+02 -1.723600e+02\n0 1159     -3.046997e+01 -2.987000e+02\n1 1159     5.021997e+01 -2.510700e+02\n4 1159     -4.917200e+02 -3.707100e+02\n6 1159     1.756000e+01 -3.488700e+02\n7 1159     -6.916998e+01 -1.948800e+02\n10 1159     -9.625000e+01 -2.064800e+02\n12 1159     2.017999e+01 -3.031300e+02\n13 1159     3.668101e+02 -4.967200e+02\n0 1160     5.907600e+02 1.913000e+02\n1 1160     8.805200e+02 3.497998e+01\n6 1160     3.938200e+02 3.450600e+02\n7 1160     4.168500e+02 3.624900e+02\n0 1161     -4.320000e+02 1.152002e+01\n1 1161     -1.949400e+02 1.508500e+02\n15 1161     -6.122500e+02 9.173999e+01\n0 1162     -4.541300e+02 -8.520020e+00\n1 1162     -2.216900e+02 1.381600e+02\n10 1162     -6.264400e+02 8.384003e+01\n12 1162     -6.717100e+02 -1.567800e+02\n0 1163     -3.084800e+02 -4.711000e+02\n1 1163     -2.545100e+02 -3.248400e+02\n7 1163     -3.214100e+02 -4.283100e+02\n0 1164     5.257000e+02 3.572100e+02\n1 1164     8.796400e+02 2.278400e+02\n3 1164     1.794800e+02 -6.954999e+01\n7 1164     3.180100e+02 5.041200e+02\n9 1164     1.301800e+02 3.081400e+02\n11 1164     6.378900e+02 -3.690500e+02\n13 1164     6.851600e+02 9.717999e+01\n0 1165     5.564100e+02 2.491900e+02\n1 1165     8.627400e+02 1.072400e+02\n7 1165     3.759800e+02 4.109100e+02\n11 1165     6.825500e+02 -4.744700e+02\n12 1165     4.241600e+02 4.052100e+02\n0 1166     6.438199e+02 -1.434003e+01\n1 1166     8.708101e+02 -1.997400e+02\n2 1166     5.936200e+02 -1.513000e+01\n3 1166     4.613000e+02 -3.210700e+02\n6 1166     5.123900e+02 1.367900e+02\n7 1166     4.960900e+02 1.743400e+02\n8 1166     5.455200e+02 -4.341000e+01\n10 1166     6.553000e+02 1.930200e+02\n12 1166     5.926700e+02 1.467000e+02\n13 1166     8.696700e+02 -2.060900e+02\n0 1167     3.851200e+02 -1.748900e+02\n1 1167     5.013600e+02 -2.674600e+02\n10 1167     3.687200e+02 -2.044000e+01\n15 1167     5.176600e+02 -4.934003e+01\n0 1168     6.233002e+01 2.647500e+02\n1 1168     3.692700e+02 2.575700e+02\n6 1168     -3.102700e+02 2.460300e+02\n7 1168     -1.244600e+02 3.423300e+02\n0 1169     -4.758600e+02 1.870300e+02\n1 1169     -1.736700e+02 3.239400e+02\n7 1169     -6.614400e+02 1.851500e+02\n10 1169     -6.800400e+02 3.144800e+02\n13 1169     -1.890400e+02 -1.247000e+02\n0 1170     3.595000e+02 -3.301500e+02\n1 1170     4.278199e+02 -4.149800e+02\n0 1171     -1.202300e+02 -5.327900e+02\n1 1171     -1.072200e+02 -4.426801e+02\n0 1172     2.058199e+02 -7.012000e+01\n1 1172     3.404900e+02 -1.020600e+02\n10 1172     1.519900e+02 8.151001e+01\n15 1172     2.544100e+02 6.975000e+01\n0 1173     6.700012e+00 1.394700e+02\n1 1173     2.166000e+02 1.615900e+02\n7 1173     -1.090700e+02 2.485400e+02\n10 1173     -1.006000e+02 3.045600e+02\n15 1173     -4.282001e+01 3.287000e+02\n0 1174     8.346002e+01 -1.334400e+02\n1 1174     1.997800e+02 -1.259300e+02\n7 1174     2.296997e+01 -4.270020e+00\n10 1174     1.722998e+01 -4.580017e+00\n15 1174     9.553998e+01 -3.257001e+01\n0 1175     -5.432100e+02 3.561600e+02\n1 1175     -1.940800e+02 4.993600e+02\n5 1175     -1.446400e+02 -2.977500e+02\n0 1176     -4.113900e+02 3.130100e+02\n1 1176     -7.929999e+01 4.283500e+02\n7 1176     -6.158400e+02 3.267500e+02\n10 1176     -6.195100e+02 4.735700e+02\n12 1176     -7.407300e+02 2.153500e+02\n15 1176     -6.283400e+02 5.105100e+02\n0 1177     9.394000e+01 -2.201000e+02\n1 1177     1.800601e+02 -2.132600e+02\n0 1178     -1.398700e+02 1.633200e+02\n1 1178     1.322100e+02 2.144700e+02\n5 1178     3.029399e+02 -5.168101e+02\n13 1178     1.193400e+02 -1.240600e+02\n0 1179     2.544100e+02 1.025000e+01\n1 1179     4.171000e+02 -3.752002e+01\n6 1179     2.272000e+02 1.053600e+02\n10 1179     2.004000e+02 1.793200e+02\n12 1179     2.597300e+02 1.493100e+02\n0 1180     -2.299988e+00 1.266500e+02\n1 1180     2.034600e+02 1.516400e+02\n5 1180     6.019399e+02 -5.283400e+02\n6 1180     -1.098800e+02 1.509100e+02\n7 1180     -1.156600e+02 2.347000e+02\n10 1180     -1.098400e+02 2.889200e+02\n12 1180     -7.997998e+01 2.049500e+02\n13 1180     3.422300e+02 -1.173300e+02\n15 1180     -5.367999e+01 3.101300e+02\n0 1181     1.808199e+02 -3.279900e+02\n1 1181     2.431500e+02 -3.493400e+02\n4 1181     -5.654000e+02 -5.498000e+02\n12 1181     2.750601e+02 -2.698900e+02\n13 1181     5.622400e+02 -5.069500e+02\n15 1181     2.564301e+02 -2.835600e+02\n0 1182     5.420100e+02 2.018800e+02\n1 1182     8.323500e+02 6.070001e+01\n2 1182     4.213500e+02 1.537000e+02\n3 1182     2.848000e+02 -1.644700e+02\n6 1182     3.303600e+02 3.385500e+02\n7 1182     3.662200e+02 3.637400e+02\n8 1182     4.061100e+02 9.937000e+01\n9 1182     2.215900e+02 2.257800e+02\n10 1182     5.189200e+02 4.348800e+02\n13 1182     7.384600e+02 -2.809003e+01\n15 1182     7.031200e+02 4.917200e+02\n0 1183     -2.510600e+02 3.881000e+02\n1 1183     9.396997e+01 4.603200e+02\n2 1183     -5.296200e+02 1.230500e+02\n5 1183     1.494400e+02 -2.699800e+02\n7 1183     -4.619100e+02 4.240500e+02\n8 1183     -3.546800e+02 8.594000e+01\n10 1183     -4.344400e+02 5.789300e+02\n11 1183     -7.609003e+01 -3.654100e+02\n12 1183     -5.647800e+02 3.356300e+02\n13 1183     -9.020020e+00 6.144000e+01\n14 1183     6.601001e+01 -3.596000e+02\n0 1184     1.791998e+01 -1.128500e+02\n1 1184     1.437900e+02 -8.609998e+01\n6 1184     2.734998e+01 -1.034400e+02\n10 1184     -6.090002e+01 1.245001e+01\n13 1184     4.027900e+02 -3.182700e+02\n0 1185     2.679000e+02 -2.852800e+02\n1 1185     3.433199e+02 -3.372000e+02\n6 1185     3.310800e+02 -2.223101e+02\n0 1186     2.947000e+02 9.523001e+01\n1 1186     4.924500e+02 3.237000e+01\n7 1186     1.801200e+02 2.462200e+02\n15 1186     3.585400e+02 3.079800e+02\n0 1187     -9.478998e+01 -1.362600e+02\n1 1187     3.195001e+01 -7.550000e+01\n3 1187     1.151001e+01 -4.574399e+02\n4 1187     -3.539900e+02 -3.353800e+02\n6 1187     -9.973001e+01 -1.721400e+02\n7 1187     -1.579000e+02 -4.059003e+01\n8 1187     9.569000e+01 -1.707500e+02\n10 1187     -1.887000e+02 -2.676001e+01\n12 1187     -9.767999e+01 -1.172300e+02\n13 1187     3.022000e+02 -3.490000e+02\n15 1187     -1.436700e+02 -6.002002e+01\n0 1188     9.979980e+00 1.234800e+02\n1 1188     2.132700e+02 1.458000e+02\n5 1188     6.216700e+02 -5.326000e+02\n7 1188     -1.019000e+02 2.337400e+02\n10 1188     -9.417999e+01 2.855600e+02\n13 1188     3.564800e+02 -1.187600e+02\n15 1188     -3.617999e+01 3.071900e+02\n0 1189     6.434998e+01 -2.274600e+02\n1 1189     1.485400e+02 -2.103900e+02\n2 1189     3.226600e+02 -1.781000e+02\n3 1189     2.394100e+02 -4.750900e+02\n4 1189     -4.516500e+02 -4.652300e+02\n6 1189     1.360200e+02 -2.079301e+02\n7 1189     2.347998e+01 -9.872998e+01\n8 1189     2.853500e+02 -1.996300e+02\n9 1189     1.702100e+02 -4.858002e+01\n10 1189     4.969971e+00 -1.149000e+02\n12 1189     1.360300e+02 -1.643000e+02\n13 1189     4.671300e+02 -4.138100e+02\n15 1189     8.146997e+01 -1.622000e+02\n0 1190     1.034600e+02 -2.259998e+01\n1 1190     2.520900e+02 -2.353998e+01\n3 1190     1.748700e+02 -2.744800e+02\n4 1190     -3.018400e+02 -4.963300e+02\n9 1190     1.163900e+02 1.228800e+02\n10 1190     2.884998e+01 1.250700e+02\n15 1190     1.075900e+02 1.205600e+02\n0 1191     1.689800e+02 -3.128400e+02\n1 1191     2.337900e+02 -3.300200e+02\n4 1191     -5.487300e+02 -5.422400e+02\n0 1192     2.229999e+01 -4.344000e+01\n1 1192     1.692300e+02 -1.983002e+01\n3 1192     1.000200e+02 -3.226500e+02\n4 1192     -3.058800e+02 -4.294900e+02\n7 1192     -5.464001e+01 7.407001e+01\n9 1192     5.094000e+01 8.017001e+01\n10 1192     -6.259003e+01 9.297998e+01\n13 1192     3.983600e+02 -2.570800e+02\n15 1192     1.049988e+00 8.110999e+01\n0 1193     -1.068800e+02 -5.352200e+02\n1 1193     -9.588000e+01 -4.491500e+02\n4 1193     -6.803800e+02 -3.006500e+02\n6 1193     3.557001e+01 -6.620000e+02\n7 1193     -9.928003e+01 -4.474301e+02\n9 1193     1.218100e+02 -4.358700e+02\n0 1194     1.591600e+02 -1.443000e+02\n1 1194     2.699301e+02 -1.602700e+02\n2 1194     3.681300e+02 -7.994000e+01\n3 1194     2.734100e+02 -3.799700e+02\n4 1194     -4.038500e+02 -5.414200e+02\n7 1194     9.922998e+01 -1.510010e+00\n9 1194     2.015699e+02 3.325000e+01\n10 1194     1.056400e+02 -9.200012e+00\n12 1194     2.099301e+02 -4.490002e+01\n13 1194     5.332100e+02 -3.336000e+02\n15 1194     1.996700e+02 -3.719000e+01\n0 1195     -1.322200e+02 -5.330900e+02\n1 1195     -1.181400e+02 -4.389800e+02\n4 1195     -6.701800e+02 -2.790400e+02\n0 1196     -2.297100e+02 4.687300e+02\n1 1196     1.345200e+02 5.344700e+02\n2 1196     -5.095400e+02 2.235400e+02\n4 1196     1.396002e+01 -2.253200e+02\n7 1196     -4.507000e+02 5.116400e+02\n0 1197     -3.870001e+01 4.969300e+02\n1 1197     3.358900e+02 5.157100e+02\n5 1197     3.666600e+02 -1.534900e+02\n6 1197     -5.222300e+02 5.093500e+02\n7 1197     -2.643400e+02 5.608900e+02\n11 1197     1.123900e+02 -2.672700e+02\n12 1197     -3.456400e+02 4.992500e+02\n14 1197     2.763900e+02 -2.403400e+02\n0 1198     -1.564000e+02 4.736200e+02\n1 1198     2.094301e+02 5.213700e+02\n2 1198     -4.383600e+02 2.286500e+02\n7 1198     -3.777600e+02 5.244900e+02\n8 1198     -2.802700e+02 1.705400e+02\n12 1198     -4.712800e+02 4.550900e+02\n0 1199     -4.490002e+01 4.812200e+02\n1 1199     3.257200e+02 5.014500e+02\n4 1199     6.809998e+00 -3.311500e+02\n5 1199     3.594301e+02 -1.703700e+02\n6 1199     -5.267700e+02 4.865200e+02\n7 1199     -2.684600e+02 5.439400e+02\n8 1199     -1.934300e+02 1.793200e+02\n9 1199     -4.335500e+02 2.697700e+02\n11 1199     1.078600e+02 -2.815700e+02\n12 1199     -3.501900e+02 4.792200e+02\n13 1199     1.549500e+02 1.515100e+02\n14 1199     2.701500e+02 -2.563000e+02\n0 1200     -4.313300e+02 4.415300e+02\n1 1200     -6.903998e+01 5.552900e+02\n11 1200     -2.323200e+02 -3.173600e+02\n12 1200     -7.867100e+02 3.763400e+02\n0 1201     7.285999e+01 -1.606000e+02\n1 1201     1.805000e+02 -1.488400e+02\n10 1201     7.770020e+00 -3.677002e+01\n0 1202     -1.347800e+02 1.562600e+02\n1 1202     1.344000e+02 2.063400e+02\n5 1202     3.085200e+02 -5.244500e+02\n0 1203     -2.090800e+02 2.086200e+02\n1 1203     8.232001e+01 2.761900e+02\n5 1203     2.073500e+02 -4.666200e+02\n7 1203     -3.860300e+02 2.488100e+02\n10 1203     -3.616300e+02 3.663500e+02\n15 1203     -3.317100e+02 3.918700e+02\n0 1204     -5.419983e+00 5.036400e+02\n1 1204     3.721700e+02 5.143800e+02\n3 1204     -4.270200e+02 -6.746997e+01\n5 1204     3.996600e+02 -1.460800e+02\n6 1204     -4.856800e+02 5.247100e+02\n7 1204     -2.326900e+02 5.712800e+02\n9 1204     -4.042500e+02 2.937100e+02\n12 1204     -3.105400e+02 5.117600e+02\n14 1204     3.088500e+02 -2.323900e+02\n0 1205     5.796002e+01 5.110100e+02\n1 1205     4.405800e+02 5.061500e+02\n2 1205     -2.380700e+02 2.734100e+02\n5 1205     4.623101e+02 -1.369000e+02\n7 1205     -1.715400e+02 5.852900e+02\n11 1205     1.985100e+02 -2.523600e+02\n12 1205     -2.436600e+02 5.297800e+02\n14 1205     3.697200e+02 -2.223100e+02\n0 1206     -1.430500e+02 9.806000e+01\n1 1206     7.781000e+01 1.591500e+02\n5 1206     3.959301e+02 -5.739301e+02\n7 1206     -2.686100e+02 1.715800e+02\n10 1206     -2.705800e+02 2.412300e+02\n15 1206     -2.356600e+02 2.503900e+02\n0 1207     1.739001e+01 4.898999e+01\n1 1207     1.930000e+02 7.170001e+01\n7 1207     -7.706000e+01 1.644400e+02\n10 1207     -7.838000e+01 1.996200e+02\n15 1207     -1.764001e+01 2.061700e+02\n0 1208     5.453199e+02 1.546500e+02\n1 1208     8.208101e+02 9.369995e+00\n2 1208     4.374000e+02 1.071800e+02\n6 1208     3.457300e+02 2.879400e+02\n8 1208     4.185900e+02 6.159000e+01\n10 1208     5.265400e+02 3.795700e+02\n15 1208     7.126700e+02 4.262600e+02\n0 1209     1.198600e+02 3.070001e+01\n1 1209     2.845000e+02 2.444000e+01\n10 1209     4.245001e+01 1.890800e+02\n15 1209     1.229400e+02 1.955000e+02\n0 1210     1.198600e+02 3.070001e+01\n1 1210     2.845000e+02 2.444000e+01\n10 1210     4.245001e+01 1.890800e+02\n15 1210     1.229400e+02 1.955000e+02\n0 1211     4.785999e+01 -1.483600e+02\n1 1211     1.592500e+02 -1.301400e+02\n2 1211     2.622100e+02 -1.104100e+02\n7 1211     -9.630005e+00 -2.606000e+01\n15 1211     4.903003e+01 -5.815002e+01\n0 1212     -1.950200e+02 -5.251700e+02\n1 1212     -1.724400e+02 -4.105600e+02\n4 1212     -6.482600e+02 -2.308500e+02\n6 1212     -7.091998e+01 -6.946600e+02\n7 1212     -1.909600e+02 -4.567300e+02\n9 1212     3.446002e+01 -4.642700e+02\n0 1213     -1.994100e+02 -5.257900e+02\n1 1213     -1.767400e+02 -4.097100e+02\n4 1213     -6.466700e+02 -2.274600e+02\n6 1213     -7.602002e+01 -6.969500e+02\n7 1213     -1.952500e+02 -4.577600e+02\n9 1213     3.058002e+01 -4.658800e+02\n0 1214     -1.228800e+02 -5.434600e+02\n1 1214     -1.136300e+02 -4.512500e+02\n4 1214     -6.826300e+02 -2.875300e+02\n6 1214     2.454999e+01 -6.790601e+02\n7 1214     -1.134500e+02 -4.584500e+02\n9 1214     1.134300e+02 -4.469600e+02\n0 1215     1.019200e+02 6.264001e+01\n1 1215     2.778400e+02 6.100000e+01\n2 1215     2.311200e+02 1.107400e+02\n4 1215     -2.405700e+02 -4.940500e+02\n6 1215     5.716998e+01 1.208700e+02\n8 1215     2.205500e+02 4.406000e+01\n12 1215     7.837000e+01 1.744600e+02\n15 1215     9.484003e+01 2.367900e+02\n0 1216     5.761700e+02 1.422100e+02\n1 1216     8.490400e+02 -1.277002e+01\n2 1216     4.758199e+02 1.100300e+02\n3 1216     3.397400e+02 -2.037900e+02\n6 1216     3.865600e+02 2.858400e+02\n8 1216     4.491100e+02 6.326001e+01\n9 1216     2.678400e+02 1.906800e+02\n10 1216     5.634900e+02 3.684400e+02\n15 1216     7.570400e+02 4.138700e+02\n0 1217     7.347998e+01 9.970999e+01\n1 1217     2.642200e+02 1.052400e+02\n5 1217     7.077600e+02 -5.558600e+02\n6 1217     4.609985e+00 1.507700e+02\n7 1217     -3.059998e+01 2.231300e+02\n10 1217     -1.891998e+01 2.645500e+02\n15 1217     5.159003e+01 2.831500e+02\n0 1218     6.933002e+01 -4.026000e+02\n1 1218     1.091700e+02 -3.831000e+02\n7 1218     5.113000e+01 -2.782100e+02\n9 1218     2.104500e+02 -2.446800e+02\n0 1219     1.765002e+01 -5.825000e+01\n1 1219     1.602400e+02 -3.303003e+01\n3 1219     9.762000e+01 -3.404900e+02\n7 1219     -5.798999e+01 5.834003e+01\n10 1219     -6.683002e+01 7.604999e+01\n13 1219     3.944000e+02 -2.709000e+02\n15 1219     -2.989990e+00 6.091998e+01\n0 1220     1.031600e+02 -9.247998e+01\n1 1220     2.314200e+02 -9.194000e+01\n4 1220     -3.544300e+02 -4.939301e+02\n6 1220     1.150500e+02 -4.996997e+01\n7 1220     3.458002e+01 3.969000e+01\n8 1220     2.665400e+02 -8.426001e+01\n9 1220     1.367300e+02 6.041998e+01\n15 1220     1.168900e+02 2.576001e+01\n0 1221     -5.040997e+01 7.358002e+01\n1 1221     1.414399e+02 1.133200e+02\n4 1221     -2.184200e+02 -3.702500e+02\n5 1221     5.545000e+02 -5.912400e+02\n7 1221     -1.550000e+02 1.735600e+02\n10 1221     -1.598800e+02 2.215900e+02\n13 1221     3.073500e+02 -1.668400e+02\n15 1221     -1.116300e+02 2.301000e+02\n0 1222     -2.123300e+02 -4.298500e+02\n1 1222     -1.532500e+02 -3.184400e+02\n6 1222     -1.578600e+02 -6.016300e+02\n7 1222     -2.320100e+02 -3.679300e+02\n9 1222     -5.117999e+01 -4.062000e+02\n10 1222     -2.918500e+02 -3.788000e+02\n15 1222     -2.599600e+02 -4.734900e+02\n0 1223     -1.567700e+02 -8.123999e+01\n1 1223     -5.390015e+00 -5.330017e+00\n2 1223     -2.214001e+01 -1.312100e+02\n6 1223     -2.086200e+02 -1.427600e+02\n10 1223     -2.674600e+02 3.010999e+01\n0 1224     4.352002e+01 -1.658300e+02\n1 1224     1.515400e+02 -1.455100e+02\n7 1224     -1.145001e+01 -4.423999e+01\n13 1224     4.323101e+02 -3.629000e+02\n15 1224     4.558002e+01 -8.175000e+01\n0 1225     1.409998e+01 -1.531000e+01\n1 1225     1.698000e+02 9.929993e+00\n9 1225     3.206000e+01 1.010500e+02\n15 1225     -1.352002e+01 1.188900e+02\n0 1226     2.034500e+02 -1.532800e+02\n1 1226     3.116300e+02 -1.833000e+02\n13 1226     5.731899e+02 -3.379400e+02\n15 1226     2.613101e+02 -4.366998e+01\n0 1227     2.896002e+01 -2.093800e+02\n1 1227     1.211000e+02 -1.819800e+02\n7 1227     -1.546997e+01 -8.809998e+01\n10 1227     -3.712000e+01 -9.827002e+01\n15 1227     3.177002e+01 -1.427100e+02\n0 1228     1.721500e+02 5.396997e+01\n1 1228     3.451100e+02 3.169000e+01\n2 1228     3.004900e+02 1.156000e+02\n3 1228     1.970200e+02 -1.963400e+02\n6 1228     1.343100e+02 1.324300e+02\n7 1228     7.696002e+01 1.953500e+02\n8 1228     2.808200e+02 4.834000e+01\n10 1228     1.005400e+02 2.215700e+02\n12 1228     1.600300e+02 1.819000e+02\n13 1228     5.161400e+02 -1.614000e+02\n15 1228     1.921600e+02 2.346300e+02\n0 1229     -1.742400e+02 -5.134500e+02\n1 1229     -1.496100e+02 -4.067300e+02\n6 1229     -5.577002e+01 -6.718600e+02\n7 1229     -1.730900e+02 -4.407700e+02\n9 1229     4.588000e+01 -4.476500e+02\n0 1230     3.944200e+02 -1.019700e+02\n1 1230     5.352200e+02 -1.974700e+02\n3 1230     4.049700e+02 -3.353800e+02\n7 1230     3.066400e+02 7.115997e+01\n8 1230     4.658400e+02 -7.292999e+01\n10 1230     3.728199e+02 6.451001e+01\n12 1230     4.254500e+02 4.428003e+01\n15 1230     5.218800e+02 5.147998e+01\n0 1231     -3.597600e+02 4.365300e+02\n1 1231     -1.099976e+00 5.340200e+02\n0 1232     -5.069000e+01 4.999600e+02\n1 1232     3.242400e+02 5.222400e+02\n2 1232     -3.394500e+02 2.607800e+02\n3 1232     -4.680100e+02 -7.120001e+01\n5 1232     3.549100e+02 -1.497200e+02\n6 1232     -5.368000e+02 5.116100e+02\n7 1232     -2.767000e+02 5.630200e+02\n8 1232     -1.995600e+02 1.973700e+02\n12 1232     -3.597300e+02 5.022700e+02\n14 1232     2.643800e+02 -2.367800e+02\n0 1233     8.688000e+01 -2.149200e+02\n1 1233     1.753300e+02 -2.060500e+02\n4 1233     -4.455700e+02 -4.834399e+02\n6 1233     1.513000e+02 -1.876801e+02\n0 1234     1.634998e+01 -4.152002e+01\n1 1234     1.635500e+02 -1.652002e+01\n2 1234     1.800000e+02 -1.546002e+01\n3 1234     9.146002e+01 -3.240100e+02\n6 1234     -1.179993e+00 -2.328003e+01\n7 1234     -6.165002e+01 7.434003e+01\n12 1234     1.034998e+01 3.010999e+01\n13 1234     3.921500e+02 -2.565900e+02\n15 1234     -7.119995e+00 8.303000e+01\n0 1235     6.323000e+02 -9.014001e+01\n1 1235     8.343900e+02 -2.757100e+02\n7 1235     4.953199e+02 9.906000e+01\n10 1235     6.483900e+02 1.036600e+02\n13 1235     8.687600e+02 -2.776900e+02\n15 1235     8.630400e+02 9.832001e+01\n0 1236     1.106800e+02 -3.061900e+02\n1 1236     1.777100e+02 -3.037500e+02\n4 1236     -5.289600e+02 -4.929100e+02\n6 1236     1.875300e+02 -2.970000e+02\n7 1236     7.559998e+01 -1.738600e+02\n8 1236     3.236700e+02 -2.878000e+02\n10 1236     6.642999e+01 -2.001900e+02\n12 1236     1.966000e+02 -2.596000e+02\n13 1236     5.027500e+02 -4.892400e+02\n15 1236     1.569500e+02 -2.628200e+02\n0 1237     2.039500e+02 -7.190002e+00\n1 1237     3.575000e+02 -3.875000e+01\n2 1237     3.541600e+02 6.495001e+01\n4 1237     -3.060500e+02 -5.780100e+02\n0 1238     -2.704600e+02 5.494000e+01\n1 1238     -3.104999e+01 1.476900e+02\n7 1238     -4.119500e+02 9.100000e+01\n13 1238     2.940997e+01 -2.232900e+02\n15 1238     -3.959700e+02 1.732500e+02\n0 1239     -1.302200e+02 4.375400e+02\n1 1239     2.273800e+02 4.790000e+02\n2 1239     -4.103000e+02 1.855500e+02\n3 1239     -5.403000e+02 -1.442900e+02\n5 1239     2.732800e+02 -2.170200e+02\n7 1239     -3.469700e+02 4.895900e+02\n12 1239     -4.353200e+02 4.155400e+02\n14 1239     1.866600e+02 -3.046100e+02\n0 1240     -1.419200e+02 4.476600e+02\n1 1240     2.179301e+02 4.920800e+02\n2 1240     -4.226100e+02 1.975300e+02\n7 1240     -3.599100e+02 4.987100e+02\n12 1240     -4.510200e+02 4.260000e+02\n14 1240     1.755400e+02 -2.939800e+02\n0 1241     -1.536400e+02 4.797400e+02\n1 1241     2.137500e+02 5.269400e+02\n3 1241     -5.642600e+02 -9.271997e+01\n5 1241     2.531801e+02 -1.718700e+02\n7 1241     -3.760600e+02 5.313100e+02\n0 1242     -1.805100e+02 5.046400e+02\n1 1242     1.924600e+02 5.580500e+02\n2 1242     -4.635700e+02 2.653000e+02\n7 1242     -4.062300e+02 5.541700e+02\n0 1243     -2.071800e+02 4.982600e+02\n1 1243     1.639500e+02 5.583700e+02\n2 1243     -4.895000e+02 2.584600e+02\n3 1243     -6.161700e+02 -7.065997e+01\n5 1243     2.021200e+02 -1.523400e+02\n7 1243     -4.323600e+02 5.449600e+02\n11 1243     -3.639001e+01 -2.693900e+02\n12 1243     -5.330200e+02 4.783100e+02\n0 1244     -1.407001e+01 5.019400e+02\n1 1244     3.628300e+02 5.149800e+02\n2 1244     -3.046900e+02 2.621000e+02\n3 1244     -4.350700e+02 -6.940002e+01\n5 1244     3.909000e+02 -1.477800e+02\n7 1244     -2.407200e+02 5.685700e+02\n12 1244     -3.197500e+02 5.087200e+02\n14 1244     3.000000e+02 -2.342500e+02\n0 1245     -2.887000e+02 3.305200e+02\n1 1245     4.365002e+01 4.133100e+02\n2 1245     -5.662900e+02 4.919000e+01\n5 1245     1.062300e+02 -3.324000e+02\n7 1245     -4.918700e+02 3.589700e+02\n10 1245     -4.724000e+02 5.052800e+02\n11 1245     -1.109500e+02 -4.170100e+02\n13 1245     -4.028998e+01 9.440002e+00\n14 1245     2.432001e+01 -4.229700e+02\n15 1245     -4.601200e+02 5.508100e+02\n0 1246     -2.874200e+02 3.398100e+02\n1 1246     4.714001e+01 4.214500e+02\n2 1246     -5.652100e+02 6.078003e+01\n5 1246     1.086500e+02 -3.229700e+02\n10 1246     -4.715100e+02 5.162600e+02\n15 1246     -4.598300e+02 5.638200e+02\n0 1247     2.109985e+00 5.495000e+02\n1 1247     3.916100e+02 5.594600e+02\n6 1247     -4.854300e+02 5.858100e+02\n12 1247     -3.095800e+02 5.666100e+02\n14 1247     3.156400e+02 -1.853600e+02\n0 1248     -1.354400e+02 3.569700e+02\n1 1248     2.019200e+02 3.999800e+02\n2 1248     -4.113000e+02 8.641998e+01\n5 1248     2.621300e+02 -3.050800e+02\n7 1248     -3.419300e+02 4.048200e+02\n8 1248     -2.578500e+02 5.898001e+01\n11 1248     2.854999e+01 -3.931300e+02\n13 1248     8.278003e+01 3.942999e+01\n14 1248     1.780601e+02 -3.921800e+02\n0 1249     1.684100e+02 5.742400e+02\n1 1249     5.770900e+02 5.447600e+02\n6 1249     -3.080900e+02 6.498100e+02\n12 1249     -1.396400e+02 6.172300e+02\n0 1250     4.138199e+02 5.823000e+02\n1 1250     8.614000e+02 4.942100e+02\n3 1250     -9.075000e+01 1.733002e+01\n5 1250     8.144399e+02 -5.069000e+01\n6 1250     -5.451001e+01 7.060700e+02\n9 1250     -1.065700e+02 3.813800e+02\n13 1250     5.138600e+02 2.654200e+02\n14 1250     7.092300e+02 -1.314800e+02\n0 1251     -2.199707e-01 -8.090997e+01\n1 1251     1.375400e+02 -4.954999e+01\n3 1251     8.451001e+01 -3.742500e+02\n7 1251     -7.228998e+01 3.140002e+01\n8 1251     1.669500e+02 -1.027900e+02\n10 1251     -8.477002e+01 4.694000e+01\n15 1251     -2.359003e+01 2.721002e+01\n0 1252     2.712000e+01 1.357800e+02\n1 1252     2.340100e+02 1.533400e+02\n5 1252     6.379399e+02 -5.179900e+02\n7 1252     -8.689001e+01 2.490600e+02\n10 1252     -7.635999e+01 3.023200e+02\n12 1252     -4.453003e+01 2.232700e+02\n15 1252     -1.504999e+01 3.265100e+02\n0 1253     3.998400e+02 -8.966998e+01\n1 1253     5.461300e+02 -1.870200e+02\n3 1253     4.001700e+02 -3.287000e+02\n6 1253     3.778600e+02 2.535999e+01\n7 1253     3.088300e+02 8.289001e+01\n8 1253     4.636600e+02 -6.621997e+01\n9 1253     3.147700e+02 7.994000e+01\n12 1253     4.246801e+02 5.646997e+01\n13 1253     7.129399e+02 -2.749200e+02\n0 1254     -1.408300e+02 9.473001e+01\n1 1254     7.890002e+01 1.552300e+02\n2 1254     -1.456400e+02 -1.295001e+01\n3 1254     -2.373000e+02 -3.319500e+02\n6 1254     -3.263800e+02 4.128998e+01\n8 1254     -7.460999e+01 -4.345999e+01\n10 1254     -2.678700e+02 2.372600e+02\n12 1254     -2.705200e+02 9.571997e+01\n0 1255     -1.497500e+02 -4.809700e+02\n1 1255     -1.151100e+02 -3.851200e+02\n6 1255     -4.809003e+01 -6.260800e+02\n7 1255     -1.555400e+02 -4.038300e+02\n9 1255     4.431000e+01 -4.158400e+02\n12 1255     -6.459003e+01 -5.745100e+02\n0 1256     6.378000e+02 -1.397998e+01\n1 1256     8.644600e+02 -1.974000e+02\n2 1256     5.873199e+02 -1.871997e+01\n6 1256     5.055400e+02 1.344500e+02\n7 1256     4.904900e+02 1.733400e+02\n8 1256     5.404200e+02 -4.589001e+01\n10 1256     6.486600e+02 1.919500e+02\n12 1256     5.859399e+02 1.445400e+02\n13 1256     8.633900e+02 -2.070900e+02\n15 1256     8.621200e+02 2.046500e+02\n0 1257     -1.969100e+02 -4.433400e+02\n1 1257     -1.444600e+02 -3.354800e+02\n7 1257     -2.129000e+02 -3.768300e+02\n9 1257     -2.687000e+01 -4.089200e+02\n10 1257     -2.720300e+02 -3.907500e+02\n15 1257     -2.365700e+02 -4.883199e+02\n0 1258     -2.961300e+02 -2.394400e+02\n1 1258     -1.602100e+02 -1.183500e+02\n9 1258     -2.745500e+02 -3.079300e+02\n12 1258     -3.647200e+02 -3.592300e+02\n13 1258     7.903003e+01 -4.794500e+02\n15 1258     -3.951200e+02 -2.272900e+02\n0 1259     1.019200e+02 -5.572100e+02\n1 1259     9.270001e+01 -5.418900e+02\n0 1260     1.284600e+02 -3.142300e+02\n1 1260     1.940000e+02 -3.177400e+02\n7 1260     9.387000e+01 -1.789600e+02\n9 1260     2.242100e+02 -1.452800e+02\n15 1260     1.825699e+02 -2.712900e+02\n0 1261     3.398600e+02 5.600100e+02\n1 1261     7.667500e+02 4.878900e+02\n3 1261     -1.440500e+02 -5.659973e+00\n14 1261     6.392400e+02 -1.575900e+02\n0 1262     1.109800e+02 -7.403003e+01\n1 1262     2.439600e+02 -7.682001e+01\n7 1262     4.009003e+01 5.927002e+01\n10 1262     4.259998e+01 6.656000e+01\n13 1262     4.822500e+02 -2.757200e+02\n15 1262     1.249600e+02 5.152002e+01\n0 1263     7.921997e+01 -3.511000e+02\n1 1263     1.355500e+02 -3.364800e+02\n7 1263     5.031000e+01 -2.258400e+02\n9 1263     1.931600e+02 -1.991400e+02\n10 1263     3.528998e+01 -2.550100e+02\n13 1263     4.751000e+02 -5.359301e+02\n0 1264     6.224900e+02 2.196997e+01\n1 1264     8.597500e+02 -1.545400e+02\n2 1264     5.610100e+02 1.037000e+01\n3 1264     4.272100e+02 -2.975700e+02\n6 1264     4.778800e+02 1.687500e+02\n7 1264     4.703900e+02 2.050800e+02\n10 1264     6.275100e+02 2.325800e+02\n12 1264     5.606400e+02 1.786600e+02\n13 1264     8.426300e+02 -1.764200e+02\n15 1264     8.362900e+02 2.527600e+02\n0 1265     5.555200e+02 2.251600e+02\n1 1265     8.539700e+02 8.097000e+01\n2 1265     4.305500e+02 1.830800e+02\n3 1265     2.929500e+02 -1.348100e+02\n6 1265     3.405500e+02 3.706300e+02\n15 1265     7.192500e+02 5.269900e+02\n0 1266     5.846400e+02 6.363000e+01\n1 1266     8.330900e+02 -9.856000e+01\n2 1266     5.067900e+02 3.331000e+01\n7 1266     4.273900e+02 2.376700e+02\n15 1266     7.780300e+02 3.050000e+02\n0 1267     -5.847998e+01 -1.781100e+02\n1 1267     5.000000e+01 -1.256400e+02\n3 1267     8.666998e+01 -4.740800e+02\n4 1267     -3.906300e+02 -3.649800e+02\n6 1267     -2.704999e+01 -2.025300e+02\n7 1267     -1.106600e+02 -7.412000e+01\n8 1267     1.557100e+02 -1.909900e+02\n12 1267     -3.088000e+01 -1.502000e+02\n13 1267     3.462100e+02 -3.816100e+02\n0 1268     -7.334998e+01 7.842999e+01\n1 1268     1.249000e+02 1.238600e+02\n6 1268     -1.865500e+02 6.658002e+01\n7 1268     -1.823500e+02 1.721600e+02\n9 1268     -1.172900e+02 1.197500e+02\n15 1268     -1.422000e+02 2.333800e+02\n0 1269     5.624700e+02 9.985999e+01\n1 1269     8.216300e+02 -5.329999e+01\n6 1269     3.814100e+02 2.312100e+02\n7 1269     4.002600e+02 2.685000e+02\n9 1269     2.662500e+02 1.474400e+02\n10 1269     5.508000e+02 3.171600e+02\n12 1269     4.679399e+02 2.407000e+02\n13 1269     7.710800e+02 -1.153200e+02\n15 1269     7.430300e+02 3.522600e+02\n0 1270     5.629500e+02 6.810999e+01\n1 1270     8.121801e+02 -8.681000e+01\n6 1270     3.903900e+02 1.961400e+02\n7 1270     4.049301e+02 2.378800e+02\n10 1270     5.538800e+02 2.804500e+02\n12 1270     4.766801e+02 2.064500e+02\n15 1270     7.473500e+02 3.082500e+02\n0 1271     5.530000e+02 1.283300e+02\n1 1271     8.206500e+02 -2.052002e+01\n9 1271     2.501700e+02 1.678000e+02\n13 1271     7.581300e+02 -9.115997e+01\n15 1271     7.266500e+02 3.907400e+02\n0 1272     1.164900e+02 4.045300e+02\n1 1272     4.754800e+02 3.817400e+02\n2 1272     -1.750300e+02 1.509500e+02\n7 1272     -1.017300e+02 4.829800e+02\n11 1272     2.589100e+02 -3.443300e+02\n13 1272     2.841300e+02 9.473001e+01\n14 1272     4.291000e+02 -3.325100e+02\n0 1273     -3.003900e+02 4.627800e+02\n1 1273     6.291998e+01 5.454600e+02\n5 1273     1.088000e+02 -1.896600e+02\n8 1273     -3.977900e+02 1.570400e+02\n12 1273     -6.338000e+02 4.194600e+02\n0 1274     3.015002e+01 5.423100e+02\n1 1274     4.196700e+02 5.450500e+02\n2 1274     -2.668600e+02 3.076700e+02\n8 1274     -1.404500e+02 2.364000e+02\n12 1274     -2.795800e+02 5.619600e+02\n13 1274     2.134399e+02 2.072400e+02\n0 1275     -1.554700e+02 3.466200e+02\n1 1275     1.802600e+02 3.948100e+02\n2 1275     -4.299600e+02 7.309998e+01\n5 1275     2.419301e+02 -3.164000e+02\n7 1275     -3.598400e+02 3.919200e+02\n8 1275     -2.734600e+02 4.829999e+01\n14 1275     1.581400e+02 -4.036800e+02\n0 1276     2.295300e+02 3.507800e+02\n1 1276     5.748101e+02 2.973500e+02\n2 1276     -3.666998e+01 1.209000e+02\n7 1276     1.827002e+01 4.452400e+02\n9 1276     -1.741900e+02 1.786800e+02\n13 1276     3.905000e+02 5.741998e+01\n14 1276     5.630699e+02 -3.842400e+02\n0 1277     5.037000e+01 5.665800e+02\n1 1277     4.473900e+02 5.651500e+02\n2 1277     -2.509100e+02 3.346600e+02\n12 1277     -2.619000e+02 5.932400e+02\n0 1278     2.600699e+02 5.021900e+02\n1 1278     6.582400e+02 4.455300e+02\n2 1278     -5.987000e+01 2.651800e+02\n8 1278     3.182001e+01 2.062000e+02\n9 1278     -2.022300e+02 3.022500e+02\n0 1279     -2.752900e+02 1.188000e+01\n1 1279     -5.095001e+01 1.085200e+02\n0 1280     -2.535999e+01 5.428700e+02\n1 1280     3.615400e+02 5.596000e+02\n0 1281     -1.282001e+01 5.127800e+02\n1 1281     3.665601e+02 5.255200e+02\n2 1281     -3.041500e+02 2.744600e+02\n0 1282     3.222998e+01 4.259700e+02\n1 1282     3.922700e+02 4.257000e+02\n2 1282     -2.540100e+02 1.767500e+02\n6 1282     -4.262900e+02 4.319900e+02\n0 1283     -1.325200e+02 2.645400e+02\n1 1283     1.766801e+02 3.094400e+02\n0 1284     6.770020e+00 2.927800e+02\n1 1284     3.241000e+02 3.000000e+02\n5 1284     4.250200e+02 -3.728800e+02\n6 1284     -3.986200e+02 2.621900e+02\n0 1285     2.158400e+02 1.178998e+01\n1 1285     3.761801e+02 -2.365997e+01\n0 1286     -1.475700e+02 2.747700e+02\n1 1286     1.655800e+02 3.232200e+02\n11 1286     1.557001e+01 -4.692100e+02\n0 1287     4.222600e+02 1.825800e+02\n1 1287     7.135000e+02 7.206000e+01\n14 1287     8.440900e+02 -5.538000e+02\n0 1288     -3.228300e+02 -1.205500e+02\n1 1288     -1.424600e+02 -7.700195e-01\n0 1289     6.341998e+01 -1.413200e+02\n1 1289     1.765100e+02 -1.272300e+02\n0 1290     -1.704700e+02 2.243400e+02\n1 1290     1.251800e+02 2.808800e+02\n7 1290     -3.499800e+02 2.702200e+02\n10 1290     -3.171900e+02 3.893500e+02\n11 1290     -8.150024e+00 -5.172200e+02\n0 1291     1.327400e+02 -1.294600e+02\n1 1291     2.499301e+02 -1.376900e+02\n7 1291     6.903998e+01 7.539978e+00\n10 1291     7.314001e+01 5.260010e+00\n13 1291     5.047100e+02 -3.236600e+02\n15 1291     1.604700e+02 -2.077002e+01\n0 1292     4.133700e+02 -1.141400e+02\n1 1292     5.501801e+02 -2.161300e+02\n6 1292     4.056200e+02 7.210022e+00\n10 1292     3.958700e+02 5.362000e+01\n15 1292     5.498500e+02 3.859003e+01\n0 1293     -3.260800e+02 -1.264300e+02\n1 1293     -1.474800e+02 -5.390015e+00\n0 1294     -2.002900e+02 2.142300e+02\n1 1294     9.285999e+01 2.789700e+02\n0 1295     2.461300e+02 9.460999e+01\n1 1295     4.384600e+02 4.853998e+01\n10 1295     1.804800e+02 2.771800e+02\n15 1295     2.896000e+02 3.009500e+02\n0 1296     -7.406000e+01 4.981800e+02\n1 1296     3.001000e+02 5.260300e+02\n0 1297     -4.434700e+02 2.211900e+02\n1 1297     -1.322200e+02 3.476500e+02\n7 1297     -6.344700e+02 2.245900e+02\n10 1297     -6.446700e+02 3.594200e+02\n14 1297     -1.409300e+02 -5.462200e+02\n0 1298     -2.102100e+02 2.144700e+02\n1 1298     8.313000e+01 2.819700e+02\n5 1298     2.056200e+02 -4.604900e+02\n8 1298     -2.791800e+02 -5.709000e+01\n10 1298     -3.641400e+02 3.733000e+02\n11 1298     -4.591998e+01 -5.268700e+02\n14 1298     1.235100e+02 -5.494800e+02\n0 1299     -4.342800e+02 4.579400e+02\n1 1299     -6.795001e+01 5.718200e+02\n2 1299     -7.249000e+02 2.085500e+02\n12 1299     -7.933600e+02 3.937700e+02\n13 1299     -1.532200e+02 1.145200e+02\n14 1299     -1.061300e+02 -2.860500e+02\n0 1300     -2.800300e+02 5.162000e+01\n1 1300     -4.140997e+01 1.471400e+02\n0 1301     -1.192000e+02 4.594000e+01\n1 1301     7.526001e+01 1.040200e+02\n7 1301     -2.266900e+02 1.296600e+02\n10 1301     -2.369700e+02 1.825200e+02\n15 1301     -1.985000e+02 1.828900e+02\n0 1302     -3.988000e+01 4.734200e+02\n1 1302     3.286700e+02 4.920400e+02\n0 1303     -7.805600e+02 3.238000e+01\n1 1303     -4.905200e+02 2.575800e+02\n0 1304     -3.162900e+02 7.798999e+01\n1 1304     -6.558002e+01 1.816800e+02\n4 1304     -1.988700e+02 -1.538800e+02\n8 1304     -3.219900e+02 -1.686000e+02\n10 1304     -4.723300e+02 2.014200e+02\n0 1305     -1.693500e+02 2.284800e+02\n1 1305     1.276500e+02 2.845900e+02\n0 1306     2.593900e+02 -1.240900e+02\n1 1306     3.797900e+02 -1.734700e+02\n7 1306     1.898400e+02 3.323999e+01\n12 1306     3.064700e+02 2.800293e-01\n15 1306     3.350000e+02 3.140015e+00\n0 1307     -3.463600e+02 2.187700e+02\n1 1307     -4.363000e+01 3.210800e+02\n11 1307     -1.710300e+02 -5.210000e+02\n0 1308     -1.029500e+02 2.846500e+02\n1 1308     2.125699e+02 3.209100e+02\n0 1309     3.044200e+02 8.262000e+01\n1 1309     5.005500e+02 1.750000e+01\n15 1309     3.732300e+02 2.925600e+02\n0 1310     -3.967999e+01 2.383300e+02\n1 1310     2.576200e+02 2.595000e+02\n0 1311     6.543900e+02 -8.690997e+01\n1 1311     8.588300e+02 -2.800400e+02\n7 1311     5.160699e+02 1.060200e+02\n0 1312     3.355400e+02 -1.593300e+02\n1 1312     4.487800e+02 -2.342000e+02\n10 1312     3.099600e+02 -8.070007e+00\n0 1313     3.906100e+02 -4.239001e+01\n1 1313     5.562300e+02 -1.372600e+02\n7 1313     2.877400e+02 1.245200e+02\n15 1313     5.095601e+02 1.321200e+02\n0 1314     1.051000e+02 2.906700e+02\n1 1314     4.226400e+02 2.713000e+02\n6 1314     -2.770700e+02 2.873300e+02\n11 1314     2.512100e+02 -4.509900e+02\n13 1314     2.984200e+02 -1.070007e+00\n0 1315     -4.403100e+02 4.990997e+01\n1 1315     -1.889900e+02 1.882700e+02\n2 1315     -6.121700e+02 -2.412000e+02\n10 1315     -6.173500e+02 1.544600e+02\n13 1315     -1.228500e+02 -2.380900e+02\n15 1315     -6.279900e+02 1.436900e+02\n0 1316     4.091200e+02 -7.473999e+01\n1 1316     5.625900e+02 -1.750500e+02\n10 1316     3.870200e+02 9.704999e+01\n15 1316     5.394399e+02 9.091000e+01\n0 1317     2.166000e+02 -1.312500e+02\n1 1317     3.329900e+02 -1.663200e+02\n7 1317     1.518500e+02 2.012000e+01\n9 1317     2.336700e+02 5.002002e+01\n13 1317     5.786000e+02 -3.186200e+02\n15 1317     2.779301e+02 -1.187000e+01\n0 1318     5.099600e+02 -3.558600e+02\n1 1318     5.859200e+02 -4.980699e+02\n7 1318     4.462200e+02 -1.607100e+02\n0 1319     7.427002e+01 -1.336800e+02\n1 1319     1.905100e+02 -1.231600e+02\n10 1319     6.869995e+00 -5.650024e+00\n12 1319     1.107200e+02 -5.750000e+01\n0 1320     1.141500e+02 7.926999e+01\n1 1320     2.960200e+02 7.359003e+01\n2 1320     2.325601e+02 1.251600e+02\n6 1320     6.126001e+01 1.414600e+02\n15 1320     1.096500e+02 2.610500e+02\n0 1321     1.907700e+02 3.889700e+02\n1 1321     5.493199e+02 3.459600e+02\n0 1322     1.911801e+02 5.159998e+01\n1 1322     3.643199e+02 2.342999e+01\n6 1322     1.523000e+02 1.326800e+02\n8 1322     2.946900e+02 4.695999e+01\n10 1322     1.227800e+02 2.205900e+02\n12 1322     1.797900e+02 1.814300e+02\n15 1322     2.190800e+02 2.340000e+02\n0 1323     -1.415300e+02 7.046997e+01\n1 1323     6.856000e+01 1.325900e+02\n7 1323     -2.598400e+02 1.458800e+02\n10 1323     -2.656700e+02 2.090400e+02\n13 1323     1.984000e+02 -1.847100e+02\n15 1323     -2.305200e+02 2.129500e+02\n0 1324     1.906000e+02 3.807600e+02\n1 1324     5.458000e+02 3.378700e+02\n10 1324     9.114001e+01 6.127800e+02\n14 1324     5.099301e+02 -3.541900e+02\n0 1325     1.803000e+02 8.250000e+01\n1 1325     3.639900e+02 5.727002e+01\n6 1325     1.265200e+02 1.630700e+02\n8 1325     2.738300e+02 6.781000e+01\n12 1325     1.560900e+02 2.118700e+02\n13 1325     5.158600e+02 -1.372000e+02\n15 1325     1.998900e+02 2.747600e+02\n0 1326     2.966500e+02 3.648000e+02\n1 1326     6.521700e+02 2.933400e+02\n0 1327     -5.900269e-01 7.428003e+01\n1 1327     1.854900e+02 1.010100e+02\n15 1327     -4.522998e+01 2.383500e+02\n0 1328     1.679999e+01 -2.749300e+02\n1 1328     9.712000e+01 -2.428700e+02\n3 1328     1.822000e+02 -5.812500e+02\n6 1328     7.534998e+01 -2.955800e+02\n9 1328     1.216700e+02 -1.373900e+02\n10 1328     -4.439001e+01 -1.746500e+02\n0 1329     -1.196100e+02 5.309998e+00\n1 1329     5.879999e+01 6.602002e+01\n0 1330     7.520020e+00 -1.134600e+02\n1 1330     1.334500e+02 -8.371002e+01\n0 1331     -9.720001e+01 2.452000e+02\n1 1331     2.037600e+02 2.815500e+02\n5 1331     3.240601e+02 -4.268600e+02\n7 1331     -2.801500e+02 3.006900e+02\n10 1331     -2.329900e+02 4.210200e+02\n11 1331     6.115002e+01 -4.974600e+02\n14 1331     2.412700e+02 -5.128300e+02\n0 1332     -2.297000e+02 1.917500e+02\n1 1332     5.671002e+01 2.655500e+02\n0 1333     7.644000e+01 7.312000e+01\n1 1333     2.567600e+02 7.853998e+01\n0 1334     2.896700e+02 3.686700e+02\n1 1334     6.466600e+02 2.988800e+02\n0 1335     -1.207100e+02 2.795700e+02\n1 1335     1.932600e+02 3.209100e+02\n0 1336     -1.134700e+02 2.516200e+02\n1 1336     1.903199e+02 2.921600e+02\n0 1337     2.224700e+02 -2.759700e+02\n1 1337     2.947000e+02 -3.109400e+02\n10 1337     1.920699e+02 -1.531100e+02\n13 1337     6.024900e+02 -4.496801e+02\n0 1338     -1.820100e+02 -5.221000e+02\n1 1338     -1.596700e+02 -4.121400e+02\n0 1339     3.003600e+02 6.406000e+01\n1 1339     4.873300e+02 1.380005e+00\n15 1339     3.700200e+02 2.691400e+02\n0 1340     1.393000e+02 -1.402300e+02\n1 1340     2.519100e+02 -1.501600e+02\n10 1340     8.248999e+01 -6.349976e+00\n0 1341     -2.636900e+02 -4.504200e+02\n1 1341     -2.074100e+02 -3.204100e+02\n7 1341     -2.803300e+02 -3.985700e+02\n0 1342     3.183101e+02 7.558002e+01\n1 1342     5.134900e+02 6.500000e+00\n15 1342     3.937000e+02 2.841900e+02\n0 1343     -1.705500e+02 -5.043700e+02\n1 1343     -1.425300e+02 -3.998400e+02\n4 1343     -6.349400e+02 -2.497300e+02\n6 1343     -5.640997e+01 -6.585800e+02\n7 1343     -1.713100e+02 -4.306000e+02\n0 1344     -4.721100e+02 1.324300e+02\n1 1344     -1.890400e+02 2.722700e+02\n7 1344     -6.437500e+02 1.322100e+02\n10 1344     -6.674200e+02 2.491500e+02\n0 1345     2.255601e+02 3.711700e+02\n1 1345     5.787000e+02 3.189800e+02\n0 1346     -3.343800e+02 6.403003e+01\n1 1346     -8.712000e+01 1.733500e+02\n10 1346     -4.926300e+02 1.825000e+02\n0 1347     1.854000e+02 -1.299900e+02\n1 1347     3.020699e+02 -1.550300e+02\n0 1348     -3.689001e+01 8.929999e+01\n1 1348     1.587100e+02 1.249500e+02\n2 1348     4.816998e+01 7.885999e+01\n4 1348     -2.094800e+02 -3.809600e+02\n5 1348     5.698500e+02 -5.727000e+02\n6 1348     -1.327900e+02 9.703998e+01\n7 1348     -1.435300e+02 1.920200e+02\n10 1348     -1.456600e+02 2.408800e+02\n12 1348     -1.070500e+02 1.525900e+02\n13 1348     3.182700e+02 -1.521000e+02\n15 1348     -9.534003e+01 2.535700e+02\n0 1349     7.290400e+02 -3.458500e+02\n1 1349     8.370100e+02 -5.769900e+02\n0 1350     -1.369100e+02 2.398800e+02\n1 1350     1.630500e+02 2.869400e+02\n2 1350     -3.602500e+02 -2.131000e+01\n11 1350     2.428003e+01 -5.022800e+02\n13 1350     1.013300e+02 -5.964001e+01\n14 1350     1.981400e+02 -5.198700e+02\n0 1351     -1.084100e+02 1.314500e+02\n1 1351     1.244500e+02 1.810600e+02\n0 1352     -9.071002e+01 2.219800e+02\n1 1352     2.015400e+02 2.574600e+02\n0 1353     -1.266300e+02 2.507000e+02\n1 1353     1.770699e+02 2.946300e+02\n0 1354     3.365200e+02 -1.758100e+02\n1 1354     4.430699e+02 -2.504800e+02\n6 1354     3.720600e+02 -7.192999e+01\n7 1354     2.718600e+02 -4.880005e+00\n12 1354     4.044700e+02 -3.879999e+01\n13 1354     6.858000e+02 -3.504200e+02\n15 1354     4.484100e+02 -5.703998e+01\n0 1355     -1.573000e+02 -5.235699e+02\n1 1355     -1.360900e+02 -4.215500e+02\n4 1355     -6.568200e+02 -2.588400e+02\n6 1355     -3.020001e+01 -6.769500e+02\n7 1355     -1.533400e+02 -4.472200e+02\n0 1356     1.851001e+01 1.634100e+02\n1 1356     2.378800e+02 1.813800e+02\n10 1356     -8.912000e+01 3.337300e+02\n15 1356     -2.909998e+01 3.628900e+02\n0 1357     1.373000e+02 -5.511500e+02\n1 1357     1.294900e+02 -5.490699e+02\n10 1357     1.233000e+02 -4.772400e+02\n0 1358     1.531899e+02 -2.168900e+02\n1 1358     2.398800e+02 -2.294100e+02\n10 1358     1.064000e+02 -9.359998e+01\n0 1359     3.615601e+02 3.367999e+01\n1 1359     5.537000e+02 -5.104999e+01\n7 1359     2.448000e+02 1.923100e+02\n10 1359     3.212100e+02 2.189400e+02\n15 1359     4.602700e+02 2.334400e+02\n0 1360     1.748800e+02 -2.048800e+02\n1 1360     2.665900e+02 -2.250000e+02\n10 1360     1.301900e+02 -7.719000e+01\n0 1361     -1.070001e+01 1.477500e+02\n1 1361     2.050400e+02 1.743000e+02\n10 1361     -1.212600e+02 3.127100e+02\n15 1361     -6.692999e+01 3.374100e+02\n0 1362     -1.218300e+02 -1.159500e+02\n1 1362     1.440997e+01 -4.847998e+01\n12 1362     -1.392900e+02 -1.063800e+02\n13 1362     2.725601e+02 -3.350300e+02\n0 1363     2.748700e+02 9.776999e+01\n1 1363     4.719700e+02 4.357001e+01\n15 1363     3.301400e+02 3.091700e+02\n0 1364     -1.825400e+02 -5.257400e+02\n1 1364     -1.613200e+02 -4.152200e+02\n6 1364     -5.578998e+01 -6.891300e+02\n7 1364     -1.782200e+02 -4.544500e+02\n9 1364     4.647998e+01 -4.594399e+02\n0 1365     3.242900e+02 -1.597800e+02\n1 1365     4.370900e+02 -2.308300e+02\n7 1365     2.560400e+02 7.739990e+00\n15 1365     4.299100e+02 -3.677002e+01\n0 1366     4.071801e+02 -9.100000e+01\n1 1366     5.533700e+02 -1.906500e+02\n10 1366     3.866100e+02 7.803998e+01\n0 1367     -4.573400e+02 1.247700e+02\n1 1367     -1.783200e+02 2.615800e+02\n7 1367     -6.259500e+02 1.272000e+02\n0 1368     -2.346500e+02 1.941000e+02\n1 1368     5.323999e+01 2.690000e+02\n7 1368     -4.092100e+02 2.306500e+02\n0 1369     -1.349800e+02 -1.125300e+02\n1 1369     3.210022e+00 -4.115002e+01\n2 1369     2.795001e+01 -1.462300e+02\n4 1369     -3.324200e+02 -3.056100e+02\n6 1369     -1.597700e+02 -1.653700e+02\n7 1369     -2.050500e+02 -2.583002e+01\n8 1369     4.734998e+01 -1.657000e+02\n12 1369     -1.562400e+02 -1.066900e+02\n13 1369     2.599800e+02 -3.331100e+02\n15 1369     -2.010600e+02 -3.378998e+01\n0 1370     -4.516200e+02 3.200000e+01\n1 1370     -2.054000e+02 1.747100e+02\n0 1371     2.458600e+02 -4.685999e+01\n1 1371     3.897700e+02 -9.204999e+01\n0 1372     6.253998e+01 2.540400e+02\n1 1372     3.651500e+02 2.469600e+02\n6 1372     -3.034600e+02 2.341400e+02\n10 1372     -4.603998e+01 4.477000e+02\n0 1373     -1.244900e+02 2.816500e+02\n1 1373     1.903400e+02 3.238600e+02\n7 1373     -3.164300e+02 3.314100e+02\n10 1373     -2.697900e+02 4.618100e+02\n15 1373     -2.248500e+02 5.045400e+02\n0 1374     5.443500e+02 6.740997e+01\n1 1374     7.927400e+02 -8.203003e+01\n6 1374     3.669200e+02 1.872700e+02\n7 1374     3.865100e+02 2.333300e+02\n10 1374     5.321200e+02 2.769500e+02\n12 1374     4.546300e+02 1.979500e+02\n13 1374     7.560200e+02 -1.467800e+02\n15 1374     7.215200e+02 3.041500e+02\n0 1375     -3.343600e+02 5.840002e+01\n1 1375     -8.913000e+01 1.681400e+02\n13 1375     -2.903998e+01 -2.240800e+02\n0 1376     3.540500e+02 3.425000e+02\n1 1376     7.053199e+02 2.545000e+02\n0 1377     -9.887000e+01 -2.287000e+01\n1 1377     6.760999e+01 3.369000e+01\n10 1377     -2.051000e+02 1.044300e+02\n15 1377     -1.631500e+02 9.239001e+01\n0 1378     -1.501100e+02 2.812800e+02\n1 1378     1.657800e+02 3.298700e+02\n10 1378     -3.002300e+02 4.590900e+02\n0 1379     -2.468900e+02 -4.181600e+02\n1 1379     -1.805600e+02 -2.964600e+02\n0 1380     -2.472600e+02 -4.914100e+02\n1 1380     -2.074600e+02 -3.627800e+02\n6 1380     -1.559800e+02 -6.844200e+02\n0 1381     -8.036900e+02 4.720001e+01\n1 1381     -5.048500e+02 2.762400e+02\n0 1382     -7.918800e+02 3.725000e+01\n1 1382     -4.983700e+02 2.646300e+02\n0 1383     -8.758700e+02 -3.146997e+01\n1 1383     -5.881100e+02 2.234800e+02\n0 1384     -7.878000e+02 4.977002e+01\n1 1384     -4.913600e+02 2.749700e+02\n0 1385     2.548000e+02 1.432100e+02\n1 1385     4.686300e+02 9.382999e+01\n0 1386     2.988900e+02 -3.132001e+01\n1 1386     4.524301e+02 -9.387000e+01\n7 1386     2.091801e+02 1.283500e+02\n10 1386     2.556500e+02 1.352900e+02\n15 1386     3.787300e+02 1.347400e+02\n0 1387     -8.484900e+02 -4.218100e+02\n1 1387     -6.875000e+02 -1.201000e+02\n4 1387     -4.366800e+02 1.925700e+02\n0 1388     -2.385800e+02 -4.676200e+02\n1 1388     -1.909000e+02 -3.440600e+02\n4 1388     -5.880600e+02 -1.983000e+02\n6 1388     -1.620800e+02 -6.545500e+02\n7 1388     -2.500300e+02 -4.100900e+02\n9 1388     -4.902002e+01 -4.425601e+02\n0 1389     -2.102800e+02 -4.826400e+02\n1 1389     -1.712600e+02 -3.667300e+02\n6 1389     -1.189400e+02 -6.570100e+02\n7 1389     -2.160000e+02 -4.181500e+02\n9 1389     -1.034998e+01 -4.399399e+02\n0 1390     -1.453003e+01 5.276100e+02\n1 1390     3.690699e+02 5.409700e+02\n2 1390     -3.069400e+02 2.915400e+02\n3 1390     -4.366700e+02 -4.013000e+01\n12 1390     -3.244900e+02 5.390300e+02\n0 1391     8.804999e+01 5.524300e+02\n1 1391     4.835699e+02 5.416800e+02\n5 1391     4.925900e+02 -9.302002e+01\n0 1392     -2.009998e+01 5.275900e+02\n1 1392     3.629000e+02 5.424400e+02\n5 1392     3.857200e+02 -1.208000e+02\n0 1393     -7.234500e+02 -4.637000e+02\n1 1393     -6.032900e+02 -1.918100e+02\n4 1393     -4.874300e+02 1.253700e+02\n0 1394     -4.224300e+02 3.127300e+02\n1 1394     -8.946002e+01 4.293100e+02\n7 1394     -6.279500e+02 3.233700e+02\n0 1395     -4.224300e+02 3.127300e+02\n1 1395     -8.946002e+01 4.293100e+02\n5 1395     -3.198999e+01 -3.492300e+02\n7 1395     -6.279500e+02 3.233700e+02\n8 1395     -5.033800e+02 2.769989e+00\n10 1395     -6.325600e+02 4.716400e+02\n13 1395     -1.498500e+02 -1.157001e+01\n14 1395     -1.126000e+02 -4.425500e+02\n0 1396     -1.852800e+02 4.464300e+02\n1 1396     1.740300e+02 5.013800e+02\n2 1396     -4.657700e+02 1.960000e+02\n14 1396     1.334100e+02 -2.962400e+02\n0 1397     2.922900e+02 5.455800e+02\n1 1397     7.072100e+02 4.835500e+02\n2 1397     -3.809998e+01 3.122400e+02\n6 1397     -1.720300e+02 6.364300e+02\n11 1397     4.075000e+02 -2.113600e+02\n12 1397     -7.289978e+00 5.992800e+02\n13 1397     4.192000e+02 2.262200e+02\n14 1397     5.939800e+02 -1.760100e+02\n0 1398     3.590400e+02 4.616000e+02\n1 1398     7.585100e+02 3.768200e+02\n6 1398     -8.610999e+01 5.471600e+02\n12 1398     7.603998e+01 5.142300e+02\n14 1398     6.675200e+02 -2.589300e+02\n0 1399     2.094600e+02 4.110900e+02\n1 1399     5.772900e+02 3.638000e+02\n3 1399     -2.330800e+02 -1.694400e+02\n7 1399     -1.442999e+01 4.998600e+02\n11 1399     3.450400e+02 -3.334400e+02\n12 1399     -6.707001e+01 4.353400e+02\n14 1399     5.212800e+02 -3.209400e+02\n0 1400     9.700000e+01 5.010500e+02\n1 1400     4.799600e+02 4.857500e+02\n8 1400     -8.716998e+01 2.017100e+02\n11 1400     2.354900e+02 -2.592400e+02\n12 1400     -2.008000e+02 5.232000e+02\n14 1400     4.071100e+02 -2.312300e+02\n0 1401     2.584500e+02 -1.163500e+02\n1 1401     3.820800e+02 -1.654800e+02\n10 1401     2.176600e+02 3.359998e+01\n15 1401     3.332300e+02 1.370001e+01\n0 1402     2.832700e+02 -2.526500e+02\n1 1402     3.659399e+02 -3.089700e+02\n15 1402     3.853800e+02 -1.679700e+02\n0 1403     2.555100e+02 -2.739200e+02\n1 1403     3.308101e+02 -3.210800e+02\n10 1403     2.297900e+02 -1.476400e+02\n15 1403     3.501700e+02 -2.009700e+02\n0 1404     -2.033300e+02 -5.425800e+02\n1 1404     -1.862600e+02 -4.234300e+02\n4 1404     -6.612900e+02 -2.244000e+02\n0 1405     -2.790400e+02 1.921200e+02\n1 1405     1.021997e+01 2.786800e+02\n0 1406     1.016998e+01 1.088900e+02\n1 1406     2.077100e+02 1.313700e+02\n4 1406     -2.011000e+02 -4.176500e+02\n10 1406     -9.319000e+01 2.689500e+02\n15 1406     -3.454999e+01 2.872100e+02\n0 1407     -1.076200e+02 -7.999878e-01\n1 1407     6.779999e+01 5.681000e+01\n2 1407     -1.027002e+01 -4.391998e+01\n4 1407     -2.612600e+02 -3.237500e+02\n6 1407     -1.933800e+02 -3.572998e+01\n7 1407     -2.023500e+02 8.773001e+01\n8 1407     2.407001e+01 -7.790002e+01\n10 1407     -2.182800e+02 1.289400e+02\n13 1407     2.603500e+02 -2.367900e+02\n15 1407     -1.778300e+02 1.212100e+02\n0 1408     5.852200e+02 -4.465997e+01\n1 1408     7.995500e+02 -2.121300e+02\n7 1408     4.432700e+02 1.328400e+02\n10 1408     5.907400e+02 1.509900e+02\n13 1408     8.126000e+02 -2.429100e+02\n15 1408     7.924301e+02 1.545100e+02\n0 1409     -1.817100e+02 -5.149800e+02\n1 1409     -1.577700e+02 -4.044700e+02\n6 1409     -6.190997e+01 -6.769700e+02\n0 1410     6.263000e+02 -2.714000e+02\n1 1410     7.496200e+02 -4.584000e+02\n0 1411     -8.203003e+01 -5.528900e+02\n1 1411     -7.971997e+01 -4.739900e+02\n7 1411     -6.988000e+01 -4.587100e+02\n9 1411     1.555100e+02 -4.370500e+02\n0 1412     4.555300e+02 3.096600e+02\n1 1412     7.901400e+02 1.954800e+02\n0 1413     -6.789001e+01 2.277002e+01\n1 1413     1.095400e+02 6.891998e+01\n3 1413     -5.085999e+01 -3.130200e+02\n6 1413     -1.455400e+02 9.840027e+00\n7 1413     -1.634200e+02 1.200600e+02\n10 1413     -1.759100e+02 1.602600e+02\n15 1413     -1.281500e+02 1.586700e+02\n0 1414     1.859800e+02 6.128003e+01\n1 1414     3.623101e+02 3.476001e+01\n6 1414     1.434200e+02 1.437100e+02\n10 1414     1.159400e+02 2.312600e+02\n12 1414     1.709900e+02 1.922900e+02\n13 1414     5.260699e+02 -1.548900e+02\n15 1414     2.104500e+02 2.466500e+02\n0 1415     3.045900e+02 9.517001e+01\n1 1415     5.052700e+02 3.073999e+01\n15 1415     3.725100e+02 3.096000e+02\n0 1416     -3.426001e+01 -1.593000e+02\n1 1416     8.035999e+01 -1.151300e+02\n7 1416     -9.142999e+01 -5.264001e+01\n15 1416     -6.003998e+01 -8.423999e+01\n0 1417     2.159700e+02 -8.331000e+01\n1 1417     3.472200e+02 -1.188800e+02\n2 1417     3.902600e+02 -1.427002e+01\n6 1417     2.250600e+02 -6.640015e+00\n7 1417     1.423300e+02 6.641998e+01\n8 1417     3.517300e+02 -6.073999e+01\n10 1417     1.651200e+02 6.670001e+01\n12 1417     2.495800e+02 3.592999e+01\n13 1417     5.707800e+02 -2.770000e+02\n15 1417     2.703300e+02 5.295001e+01\n0 1418     6.380200e+02 -8.403003e+01\n1 1418     8.425900e+02 -2.710600e+02\n2 1418     6.080601e+02 -9.304999e+01\n3 1418     4.796801e+02 -3.965900e+02\n8 1418     5.568900e+02 -1.071300e+02\n10 1418     6.541700e+02 1.114600e+02\n12 1418     6.042500e+02 6.621002e+01\n13 1418     8.730100e+02 -2.714700e+02\n15 1418     8.708101e+02 1.074100e+02\n0 1419     2.799500e+02 -2.525000e+02\n1 1419     3.622800e+02 -3.079900e+02\n0 1420     -1.984500e+02 -4.523400e+02\n1 1420     -1.494200e+02 -3.434900e+02\n6 1420     -1.252100e+02 -6.191200e+02\n15 1420     -2.395900e+02 -5.016300e+02\n0 1421     6.409600e+02 -2.376900e+02\n1 1421     7.807300e+02 -4.299100e+02\n7 1421     5.367600e+02 -3.194000e+01\n0 1422     3.131600e+02 5.610999e+01\n1 1422     4.994399e+02 -1.137000e+01\n7 1422     2.051400e+02 2.125000e+02\n10 1422     2.642200e+02 2.384100e+02\n15 1422     3.891100e+02 2.562300e+02\n0 1423     2.955601e+02 -2.945100e+02\n1 1423     3.720400e+02 -3.567700e+02\n15 1423     4.097700e+02 -2.238700e+02\n0 1424     6.440400e+02 -2.656900e+02\n1 1424     7.728300e+02 -4.602200e+02\n7 1424     5.450200e+02 -5.642999e+01\n10 1424     6.760400e+02 -9.728998e+01\n12 1424     6.947800e+02 -1.037900e+02\n0 1425     6.004600e+02 -4.013100e+02\n1 1425     6.647300e+02 -5.791899e+02\n7 1425     5.383101e+02 -1.856300e+02\n12 1425     7.181300e+02 -2.458300e+02\n15 1425     8.504200e+02 -3.330400e+02\n0 1426     2.919800e+02 1.056700e+02\n1 1426     4.949700e+02 4.531000e+01\n15 1426     3.533600e+02 3.229900e+02\n0 1427     2.629800e+02 -2.766500e+02\n1 1427     3.389500e+02 -3.265200e+02\n6 1427     3.271200e+02 -2.117800e+02\n7 1427     2.151300e+02 -1.185800e+02\n10 1427     2.379900e+02 -1.500600e+02\n12 1427     3.517800e+02 -1.807000e+02\n13 1427     6.308900e+02 -4.505500e+02\n15 1427     3.601100e+02 -2.043500e+02\n0 1428     -2.116800e+02 -4.980400e+02\n1 1428     -1.779100e+02 -3.800500e+02\n0 1429     2.357500e+02 1.133700e+02\n1 1429     4.347600e+02 7.096997e+01\n7 1429     1.236000e+02 2.591900e+02\n10 1429     1.677700e+02 2.976900e+02\n13 1429     5.513400e+02 -1.096000e+02\n15 1429     2.734800e+02 3.249600e+02\n0 1430     4.141899e+02 -5.521997e+01\n1 1430     5.765601e+02 -1.584500e+02\n0 1431     2.993199e+02 -2.383000e+02\n1 1431     3.862500e+02 -3.002300e+02\n15 1431     4.058800e+02 -1.470900e+02\n0 1432     2.993199e+02 -2.383000e+02\n1 1432     3.862500e+02 -3.002300e+02\n15 1432     4.058800e+02 -1.470900e+02\n0 1433     2.897900e+02 -2.919000e+02\n1 1433     3.654900e+02 -3.519900e+02\n7 1433     2.412000e+02 -1.301200e+02\n10 1433     2.708900e+02 -1.641800e+02\n15 1433     4.012000e+02 -2.210500e+02\n0 1434     2.887500e+02 -3.011700e+02\n1 1434     3.626000e+02 -3.607900e+02\n10 1434     2.704399e+02 -1.754000e+02\n15 1434     4.011000e+02 -2.336100e+02\n0 1435     6.289200e+02 -2.264000e+02\n1 1435     7.716700e+02 -4.136500e+02\n0 1436     1.228900e+02 -5.840997e+01\n1 1436     2.603600e+02 -6.446002e+01\n2 1436     3.018300e+02 1.070007e+00\n7 1436     4.906000e+01 7.746997e+01\n8 1436     2.765700e+02 -4.876001e+01\n10 1436     5.447998e+01 8.640997e+01\n15 1436     1.389100e+02 7.432001e+01\n0 1437     1.228900e+02 -5.840997e+01\n1 1437     2.603600e+02 -6.446002e+01\n0 1438     3.646200e+02 4.431100e+02\n1 1438     7.591801e+02 3.554400e+02\n5 1438     7.740300e+02 -2.007400e+02\n14 1438     6.765500e+02 -2.776200e+02\n0 1439     -4.594900e+02 3.659700e+02\n1 1439     -1.140000e+02 4.894700e+02\n7 1439     -6.733600e+02 3.766800e+02\n11 1439     -2.613200e+02 -3.830300e+02\n15 1439     -7.060500e+02 5.787700e+02\n0 1440     4.780500e+02 2.870700e+02\n1 1440     8.064000e+02 1.656700e+02\n7 1440     2.801600e+02 4.269100e+02\n10 1440     4.370699e+02 5.299800e+02\n0 1441     4.796899e+02 2.740500e+02\n1 1441     8.033300e+02 1.504700e+02\n10 1441     4.398000e+02 5.126900e+02\n0 1442     9.452002e+01 4.871600e+02\n1 1442     4.743700e+02 4.727400e+02\n0 1443     -1.437500e+02 5.340300e+02\n1 1443     2.369700e+02 5.787300e+02\n2 1443     -4.292600e+02 2.996100e+02\n11 1443     1.915997e+01 -2.382700e+02\n0 1444     2.382700e+02 4.237100e+02\n1 1444     6.121200e+02 3.685700e+02\n0 1445     7.346000e+02 -3.049600e+02\n1 1445     8.614800e+02 -5.371899e+02\n7 1445     6.339500e+02 -7.679999e+01\n0 1446     5.424700e+02 1.423000e+02\n1 1446     8.140900e+02 -2.630005e+00\n2 1446     4.374600e+02 9.320001e+01\n0 1447     1.079000e+02 4.044600e+02\n1 1447     4.662300e+02 3.839900e+02\n9 1447     -3.023600e+02 1.988900e+02\n0 1448     3.324200e+02 4.924100e+02\n1 1448     7.370200e+02 4.169200e+02\n3 1448     -1.416400e+02 -7.702002e+01\n4 1448     -1.128003e+01 -5.787100e+02\n6 1448     -1.199400e+02 5.801900e+02\n8 1448     8.342999e+01 2.008600e+02\n11 1448     4.503400e+02 -2.540400e+02\n12 1448     4.354999e+01 5.452800e+02\n0 1449     1.534800e+02 5.590200e+02\n1 1449     5.562900e+02 5.324800e+02\n2 1449     -1.585700e+02 3.261100e+02\n6 1449     -3.216700e+02 6.279200e+02\n12 1449     -1.524200e+02 5.976100e+02\n14 1449     4.596100e+02 -1.694000e+02\n0 1450     -4.484100e+02 3.669000e+01\n1 1450     -2.007000e+02 1.781500e+02\n8 1450     -4.372900e+02 -2.226100e+02\n10 1450     -6.207900e+02 1.406500e+02\n13 1450     -1.246100e+02 -2.485900e+02\n15 1450     -6.376600e+02 1.243500e+02\n0 1451     -1.373400e+02 3.369300e+02\n1 1451     1.959700e+02 3.808800e+02\n9 1451     -4.934100e+02 1.115300e+02\n11 1451     2.723999e+01 -4.108800e+02\n0 1452     3.009399e+02 5.769700e+02\n1 1452     7.259800e+02 5.150200e+02\n2 1452     -3.420001e+01 3.450500e+02\n9 1452     -1.835000e+02 3.732100e+02\n13 1452     4.251400e+02 2.534600e+02\n14 1452     6.006400e+02 -1.432300e+02\n0 1453     3.326001e+01 5.712500e+02\n1 1453     4.303600e+02 5.744200e+02\n0 1454     -3.087700e+02 4.152400e+02\n1 1454     4.398999e+01 5.008400e+02\n2 1454     -5.900400e+02 1.571300e+02\n13 1454     -5.467999e+01 8.289999e+01\n0 1455     -2.257000e+02 -5.281500e+02\n1 1455     -2.007500e+02 -4.026000e+02\n4 1455     -6.445400e+02 -2.081200e+02\n6 1455     -1.044800e+02 -7.137200e+02\n0 1456     2.636300e+02 -1.106000e+02\n1 1456     3.904399e+02 -1.610300e+02\n7 1456     1.904500e+02 4.627002e+01\n10 1456     2.228500e+02 4.103998e+01\n13 1456     6.106500e+02 -2.985300e+02\n15 1456     3.395800e+02 2.210999e+01\n0 1457     -1.260600e+02 -2.896997e+01\n1 1457     4.176001e+01 3.484003e+01\n2 1457     -1.852002e+01 -7.578998e+01\n3 1457     -1.004500e+02 -3.887100e+02\n4 1457     -2.774400e+02 -3.099600e+02\n6 1457     -2.032000e+02 -7.347998e+01\n7 1457     -2.156400e+02 5.656000e+01\n8 1457     1.528003e+01 -1.046800e+02\n9 1457     -1.210400e+02 1.984998e+01\n10 1457     -2.366900e+02 9.412000e+01\n12 1457     -1.840300e+02 -1.478003e+01\n13 1457     2.477900e+02 -2.619800e+02\n15 1457     -1.989500e+02 8.022000e+01\n0 1458     -1.301400e+02 -3.666998e+01\n1 1458     3.644000e+01 2.884998e+01\n4 1458     -2.823700e+02 -3.059300e+02\n7 1458     -2.192700e+02 4.709003e+01\n9 1458     -1.250700e+02 7.679993e+00\n10 1458     -2.406300e+02 8.413000e+01\n15 1458     -2.033400e+02 6.842999e+01\n0 1459     -3.008500e+02 4.894800e+02\n1 1459     6.883002e+01 5.716200e+02\n2 1459     -5.833900e+02 2.485000e+02\n5 1459     1.104700e+02 -1.609100e+02\n7 1459     -5.267500e+02 5.259000e+02\n8 1459     -3.991800e+02 1.835900e+02\n12 1459     -6.391000e+02 4.545300e+02\n0 1460     -3.021000e+02 3.267300e+02\n1 1460     2.965997e+01 4.130000e+02\n5 1460     9.240002e+01 -3.362600e+02\n7 1460     -5.050500e+02 3.536700e+02\n15 1460     -4.779500e+02 5.438800e+02\n0 1461     5.703600e+02 3.279999e+01\n1 1461     8.086400e+02 -1.264500e+02\n6 1461     4.094600e+02 1.586400e+02\n7 1461     4.171899e+02 2.051600e+02\n10 1461     5.652600e+02 2.400000e+02\n12 1461     4.944900e+02 1.691200e+02\n13 1461     7.870601e+02 -1.742400e+02\n15 1461     7.619000e+02 2.599000e+02\n0 1462     5.755900e+02 2.723999e+01\n1 1462     8.122900e+02 -1.336700e+02\n6 1462     4.171400e+02 1.554700e+02\n7 1462     4.229399e+02 2.005800e+02\n10 1462     5.717300e+02 2.337200e+02\n13 1462     7.929399e+02 -1.783900e+02\n15 1462     7.697800e+02 2.530300e+02\n0 1463     6.118500e+02 1.180600e+02\n1 1463     8.788101e+02 -4.928998e+01\n6 1463     4.392200e+02 2.711500e+02\n7 1463     4.471400e+02 2.956000e+02\n8 1463     4.887000e+02 5.589001e+01\n9 1463     3.089800e+02 1.861500e+02\n10 1463     6.081400e+02 3.435700e+02\n12 1463     5.229000e+02 2.808000e+02\n13 1463     8.200500e+02 -9.227002e+01\n15 1463     8.106000e+02 3.852800e+02\n0 1464     2.097900e+02 -1.613800e+02\n1 1464     3.152000e+02 -1.938100e+02\n7 1464     1.510900e+02 -1.019000e+01\n13 1464     5.794000e+02 -3.452000e+02\n15 1464     2.712400e+02 -5.367999e+01\n0 1465     5.959399e+02 1.239001e+01\n1 1465     8.288700e+02 -1.558800e+02\n6 1465     4.472900e+02 1.475300e+02\n7 1465     4.458199e+02 1.902700e+02\n15 1465     8.004700e+02 2.351300e+02\n0 1466     5.924000e+02 -1.709998e+01\n1 1466     8.159800e+02 -1.859600e+02\n6 1466     4.500900e+02 1.117700e+02\n7 1466     4.457200e+02 1.609700e+02\n10 1466     5.954100e+02 1.841100e+02\n12 1466     5.331000e+02 1.225100e+02\n13 1466     8.160900e+02 -2.164300e+02\n15 1466     7.987100e+02 1.937700e+02\n0 1467     -2.487200e+02 3.923800e+02\n1 1467     9.778003e+01 4.641800e+02\n7 1467     -4.606000e+02 4.290100e+02\n13 1467     -6.750000e+00 6.572998e+01\n14 1467     6.912000e+01 -3.542500e+02\n0 1468     6.492600e+02 -9.402002e+01\n1 1468     8.516600e+02 -2.860400e+02\n2 1468     6.250900e+02 -9.690002e+01\n8 1468     5.705200e+02 -1.106200e+02\n0 1469     6.684500e+02 -6.559003e+01\n1 1469     8.807400e+02 -2.620900e+02\n2 1469     6.356600e+02 -5.552002e+01\n0 1470     -2.112600e+02 4.081500e+02\n1 1470     1.384700e+02 4.702700e+02\n7 1470     -4.241100e+02 4.499100e+02\n10 1470     -3.891900e+02 6.073800e+02\n12 1470     -5.218300e+02 3.669500e+02\n0 1471     -3.508700e+02 3.998600e+02\n1 1471     -8.800049e-01 4.957700e+02\n0 1472     -6.540300e+02 3.990300e+02\n1 1472     -2.671800e+02 5.643600e+02\n0 1473     -2.741800e+02 3.489100e+02\n1 1473     6.254999e+01 4.278900e+02\n8 1473     -3.716000e+02 4.542001e+01\n11 1473     -9.759003e+01 -4.001400e+02\n0 1474     -1.286400e+02 4.184100e+02\n1 1474     2.241801e+02 4.589400e+02\n2 1474     -4.082300e+02 1.621700e+02\n8 1474     -2.556600e+02 1.183900e+02\n0 1475     5.460022e+00 4.512000e+02\n1 1475     3.707400e+02 4.582400e+02\n2 1475     -2.824900e+02 2.033600e+02\n6 1475     -4.636600e+02 4.585900e+02\n7 1475     -2.152200e+02 5.182700e+02\n14 1475     3.187400e+02 -2.866800e+02\n0 1476     5.876001e+01 -1.161300e+02\n1 1476     1.822700e+02 -1.017900e+02\n3 1476     1.631700e+02 -3.863900e+02\n10 1476     -1.313000e+01 1.290997e+01\n13 1476     4.386100e+02 -3.180300e+02\n0 1477     -1.744100e+02 4.408500e+02\n1 1477     1.834301e+02 4.933400e+02\n2 1477     -4.541600e+02 1.894200e+02\n7 1477     -3.915400e+02 4.881900e+02\n0 1478     3.501801e+02 4.694700e+02\n1 1478     7.507200e+02 3.874700e+02\n2 1478     2.158002e+01 2.316100e+02\n3 1478     -1.242900e+02 -1.000400e+02\n5 1478     7.566100e+02 -1.728900e+02\n6 1478     -9.645001e+01 5.549800e+02\n7 1478     1.104800e+02 5.725800e+02\n9 1478     -1.324300e+02 2.757600e+02\n12 1478     6.601001e+01 5.217300e+02\n0 1479     1.890300e+02 5.320400e+02\n1 1479     5.882400e+02 4.950800e+02\n2 1479     -1.247500e+02 2.971400e+02\n5 1479     5.907100e+02 -1.117100e+02\n12 1479     -1.105600e+02 5.712600e+02\n0 1480     3.501801e+02 4.694700e+02\n1 1480     7.507200e+02 3.874700e+02\n0 1481     3.468400e+02 4.885300e+02\n1 1481     7.524900e+02 4.086400e+02\n5 1481     7.516000e+02 -1.523500e+02\n6 1481     -1.040900e+02 5.777700e+02\n12 1481     5.860999e+01 5.430100e+02\n14 1481     6.527900e+02 -2.313500e+02\n0 1482     -1.453003e+01 5.276100e+02\n1 1482     3.690699e+02 5.409700e+02\n2 1482     -3.069400e+02 2.915400e+02\n6 1482     -5.003500e+02 5.546900e+02\n12 1482     -3.244900e+02 5.390300e+02\n0 1483     -1.261000e+02 4.587000e+02\n1 1483     2.368500e+02 4.990100e+02\n8 1483     -2.557600e+02 1.573200e+02\n0 1484     2.248700e+02 3.568300e+02\n1 1484     5.722900e+02 3.044600e+02\n2 1484     -4.556000e+01 1.257900e+02\n7 1484     1.292999e+01 4.509100e+02\n8 1484     3.813000e+01 9.217999e+01\n9 1484     -1.826900e+02 1.824300e+02\n11 1484     3.610800e+02 -3.840600e+02\n13 1484     3.849000e+02 6.259003e+01\n14 1484     5.566700e+02 -3.765300e+02\n0 1485     3.370800e+02 4.563200e+02\n1 1485     7.315601e+02 3.766700e+02\n2 1485     1.215997e+01 2.175600e+02\n5 1485     7.429700e+02 -1.876800e+02\n6 1485     -1.078900e+02 5.358800e+02\n7 1485     1.001200e+02 5.579100e+02\n8 1485     9.059998e+01 1.696700e+02\n9 1485     -1.398200e+02 2.630400e+02\n12 1485     5.471997e+01 5.053200e+02\n13 1485     4.587100e+02 1.540900e+02\n14 1485     6.459500e+02 -2.656200e+02\n0 1486     -9.206000e+01 -1.545200e+02\n1 1486     2.722998e+01 -9.320001e+01\n3 1486     3.384003e+01 -4.693900e+02\n7 1486     -1.504200e+02 -5.797998e+01\n15 1486     -1.384100e+02 -8.475000e+01\n0 1487     -1.111100e+02 7.931000e+01\n1 1487     9.671997e+01 1.337000e+02\n4 1487     -2.114200e+02 -3.161400e+02\n5 1487     4.526801e+02 -5.926600e+02\n6 1487     -2.601500e+02 4.233002e+01\n7 1487     -2.275000e+02 1.619000e+02\n8 1487     -2.538000e+01 -3.395001e+01\n9 1487     -1.801800e+02 8.213000e+01\n10 1487     -2.310800e+02 2.224300e+02\n12 1487     -2.175000e+02 9.757001e+01\n13 1487     2.315400e+02 -1.730000e+02\n15 1487     -1.915300e+02 2.295100e+02\n0 1488     -1.432300e+02 2.879300e+02\n1 1488     1.747800e+02 3.346700e+02\n13 1488     8.309003e+01 -2.090002e+01\n14 1488     1.765500e+02 -4.687900e+02\n0 1489     1.071000e+02 2.950700e+02\n1 1489     4.263900e+02 2.752600e+02\n2 1489     -1.271500e+02 6.312000e+01\n4 1489     -1.143400e+02 -4.217400e+02\n6 1489     -2.779300e+02 2.928700e+02\n9 1489     -2.473000e+02 1.257500e+02\n15 1489     9.103003e+01 5.555300e+02\n0 1490     2.308800e+02 3.663200e+02\n1 1490     5.827100e+02 3.126200e+02\n7 1490     1.628998e+01 4.600900e+02\n9 1490     -1.835000e+02 1.874700e+02\n14 1490     5.585500e+02 -3.677600e+02\n0 1491     -6.870001e+01 -1.079900e+02\n1 1491     6.592999e+01 -5.627002e+01\n2 1491     1.034300e+02 -1.195000e+02\n3 1491     2.313000e+01 -4.268500e+02\n4 1491     -3.389500e+02 -3.548300e+02\n6 1491     -8.178000e+01 -1.345100e+02\n7 1491     -1.376800e+02 -8.770020e+00\n10 1491     -1.615500e+02 8.880005e+00\n12 1491     -7.571002e+01 -7.952002e+01\n13 1491     3.199399e+02 -3.232800e+02\n15 1491     -1.123900e+02 -1.882001e+01\n0 1492     2.390699e+02 4.596800e+02\n1 1492     6.232700e+02 4.057200e+02\n6 1492     -2.107600e+02 5.187800e+02\n7 1492     8.130005e+00 5.508500e+02\n9 1492     -2.108600e+02 2.605900e+02\n11 1492     3.686000e+02 -2.894900e+02\n0 1493     2.322998e+01 -5.966998e+01\n1 1493     1.652700e+02 -3.595001e+01\n15 1493     4.489990e+00 5.928998e+01\n0 1494     -1.416200e+02 2.954500e+02\n1 1494     1.790400e+02 3.414600e+02\n7 1494     -3.367400e+02 3.419500e+02\n10 1494     -2.913000e+02 4.763200e+02\n13 1494     8.282001e+01 -1.403998e+01\n14 1494     1.765601e+02 -4.598400e+02\n0 1495     1.881000e+02 -8.642999e+01\n1 1495     3.179000e+02 -1.124800e+02\n2 1495     3.689800e+02 -1.900000e+01\n6 1495     1.998100e+02 -1.644000e+01\n0 1496     -3.546002e+01 -7.402002e+01\n1 1496     1.077900e+02 -3.301001e+01\n2 1496     1.264800e+02 -7.509003e+01\n3 1496     4.314001e+01 -3.829600e+02\n6 1496     -5.703003e+01 -8.378003e+01\n7 1496     -1.103900e+02 3.117999e+01\n8 1496     1.305100e+02 -1.078200e+02\n10 1496     -1.261300e+02 5.181000e+01\n12 1496     -4.675000e+01 -2.960999e+01\n13 1496     3.461700e+02 -2.907500e+02\n15 1496     -7.178998e+01 3.191998e+01\n0 1497     1.285100e+02 -1.042600e+02\n1 1497     2.531300e+02 -1.115800e+02\n3 1497     2.252200e+02 -3.529300e+02\n8 1497     2.901700e+02 -9.010999e+01\n0 1498     -5.092999e+01 -8.328003e+01\n1 1498     8.928003e+01 -3.712000e+01\n3 1498     3.320001e+01 -3.926700e+02\n6 1498     -6.809998e+01 -9.787000e+01\n7 1498     -1.234300e+02 2.014001e+01\n12 1498     -6.047998e+01 -4.284998e+01\n15 1498     -9.178003e+01 1.752002e+01\n0 1499     1.596100e+02 6.104999e+01\n1 1499     3.347400e+02 4.250000e+01\n6 1499     1.183100e+02 1.364600e+02\n15 1499     1.740000e+02 2.427400e+02\n0 1500     2.804200e+02 -2.851600e+02\n1 1500     3.569500e+02 -3.416500e+02\n2 1500     5.015100e+02 -2.365700e+02\n10 1500     2.594800e+02 -1.575900e+02\n15 1500     3.871300e+02 -2.129600e+02\n0 1501     6.468900e+02 6.530029e+00\n1 1501     8.805699e+02 -1.784300e+02\n6 1501     5.111600e+02 1.604600e+02\n7 1501     4.963000e+02 1.950000e+02\n10 1501     6.572200e+02 2.177300e+02\n15 1501     8.722700e+02 2.344800e+02\n0 1502     -1.376600e+02 9.789999e+01\n1 1502     8.312000e+01 1.573000e+02\n2 1502     -1.431600e+02 -1.000000e+01\n3 1502     -2.358400e+02 -3.296100e+02\n5 1502     4.018101e+02 -5.740699e+02\n6 1502     -3.254200e+02 4.597998e+01\n7 1502     -2.631200e+02 1.722700e+02\n9 1502     -2.361800e+02 6.791998e+01\n10 1502     -2.643300e+02 2.415100e+02\n13 1502     1.933800e+02 -1.619600e+02\n15 1502     -2.283300e+02 2.509400e+02\n0 1503     5.860200e+02 3.084003e+01\n1 1503     8.242800e+02 -1.333000e+02\n7 1503     4.328300e+02 2.064900e+02\n0 1504     5.530000e+02 1.283300e+02\n1 1504     8.206500e+02 -2.052002e+01\n2 1504     4.530800e+02 8.410999e+01\n7 1504     3.871400e+02 2.943400e+02\n9 1504     2.501700e+02 1.678000e+02\n10 1504     5.375000e+02 3.494900e+02\n13 1504     7.581300e+02 -9.115997e+01\n15 1504     7.266500e+02 3.907400e+02\n0 1505     5.398900e+02 9.248001e+01\n1 1505     7.959700e+02 -5.442999e+01\n10 1505     5.247000e+02 3.056900e+02\n13 1505     7.484301e+02 -1.248000e+02\n15 1505     7.125400e+02 3.380800e+02\n0 1506     1.479301e+02 -1.095200e+02\n1 1506     2.711000e+02 -1.228700e+02\n6 1506     1.663000e+02 -5.540002e+01\n15 1506     1.802900e+02 8.440002e+00\n0 1507     2.323900e+02 -3.687000e+01\n1 1507     3.783199e+02 -7.740002e+01\n7 1507     1.504900e+02 1.149400e+02\n10 1507     1.791200e+02 1.223000e+02\n15 1507     2.864100e+02 1.184300e+02\n0 1508     1.758199e+02 -9.300000e+01\n1 1508     3.034700e+02 -1.152800e+02\n7 1508     1.055700e+02 5.165997e+01\n15 1508     2.160500e+02 3.458002e+01\n0 1509     2.927700e+02 -1.174300e+02\n1 1509     4.175699e+02 -1.775100e+02\n7 1509     2.192900e+02 4.441998e+01\n13 1509     6.378101e+02 -3.023800e+02\n15 1509     3.805200e+02 1.679999e+01\n0 1510     2.768800e+02 -1.020300e+02\n1 1510     4.072800e+02 -1.574900e+02\n6 1510     2.819300e+02 -1.334003e+01\n7 1510     2.004200e+02 5.579999e+01\n10 1510     2.368700e+02 5.177002e+01\n15 1510     3.568800e+02 3.571002e+01\n0 1511     -6.879999e+01 -1.548100e+02\n1 1511     4.928998e+01 -1.006300e+02\n6 1511     -5.587000e+01 -1.840200e+02\n7 1511     -1.273200e+02 -5.409003e+01\n10 1511     -1.565800e+02 -4.575000e+01\n15 1511     -1.068600e+02 -8.213000e+01\n0 1512     4.131801e+02 -9.753003e+01\n1 1512     5.569100e+02 -1.994300e+02\n6 1512     3.954100e+02 2.238000e+01\n7 1512     3.230100e+02 7.801001e+01\n10 1512     3.944800e+02 7.156000e+01\n12 1512     4.423600e+02 5.272998e+01\n15 1512     5.475900e+02 5.989001e+01\n0 1513     1.985800e+02 -1.432100e+02\n1 1513     3.100100e+02 -1.719600e+02\n2 1513     4.023700e+02 -7.209998e+01\n4 1513     -4.106100e+02 -5.745900e+02\n7 1513     1.367000e+02 5.919983e+00\n10 1513     1.509500e+02 -3.789978e+00\n12 1513     2.520699e+02 -3.359003e+01\n13 1513     5.665900e+02 -3.301400e+02\n15 1513     2.535200e+02 -3.048999e+01\n0 1514     2.181500e+02 -1.259100e+02\n1 1514     3.369700e+02 -1.616200e+02\n10 1514     1.718300e+02 1.817999e+01\n15 1514     2.787300e+02 -4.359985e+00\n0 1515     1.149400e+02 -1.358900e+02\n1 1515     2.297200e+02 -1.381500e+02\n2 1515     3.204200e+02 -8.410999e+01\n7 1515     5.376001e+01 -1.510010e+00\n10 1515     5.359998e+01 -4.260010e+00\n13 1515     4.923101e+02 -3.302600e+02\n15 1515     1.387400e+02 -3.148999e+01\n0 1516     -1.678800e+02 -6.285999e+01\n1 1516     -8.780029e+00 1.566998e+01\n3 1516     -1.266000e+02 -4.325699e+02\n4 1516     -2.947700e+02 -2.802400e+02\n6 1516     -2.342800e+02 -1.280200e+02\n8 1516     -1.051001e+01 -1.414700e+02\n13 1516     2.163900e+02 -2.955700e+02\n15 1516     -2.511500e+02 2.881000e+01\n0 1517     3.440997e+01 -2.502100e+02\n1 1517     1.175400e+02 -2.239200e+02\n2 1517     2.850100e+02 -2.291000e+02\n3 1517     2.049399e+02 -5.272000e+02\n6 1517     9.889001e+01 -2.523600e+02\n7 1517     -5.489990e+00 -1.291500e+02\n8 1517     2.543300e+02 -2.394200e+02\n9 1517     1.408300e+02 -9.203998e+01\n10 1517     -2.635999e+01 -1.437600e+02\n12 1517     1.000500e+02 -2.080700e+02\n13 1517     4.357800e+02 -4.396200e+02\n15 1517     4.533002e+01 -1.964700e+02\n0 1518     -2.744000e+01 -7.517999e+01\n1 1518     1.146800e+02 -3.633002e+01\n6 1518     -4.685999e+01 -8.233002e+01\n7 1518     -1.021200e+02 3.156000e+01\n10 1518     -1.171800e+02 5.098999e+01\n12 1518     -3.570001e+01 -2.859003e+01\n13 1518     3.520000e+02 -2.912900e+02\n15 1518     -6.132001e+01 3.156000e+01\n0 1519     2.191400e+02 -1.156600e+02\n1 1519     3.420000e+02 -1.522200e+02\n3 1519     2.999900e+02 -3.517800e+02\n7 1519     1.498199e+02 3.476001e+01\n10 1519     1.716800e+02 3.033002e+01\n15 1519     2.788199e+02 9.570007e+00\n0 1520     5.469700e+02 1.663100e+02\n1 1520     8.260400e+02 2.146997e+01\n3 1520     2.981801e+02 -1.958400e+02\n7 1520     3.753199e+02 3.300800e+02\n10 1520     5.274301e+02 3.930200e+02\n15 1520     7.137800e+02 4.428500e+02\n0 1521     1.990400e+02 -2.086400e+02\n1 1521     2.891500e+02 -2.362600e+02\n7 1521     1.495100e+02 -5.782001e+01\n13 1521     5.780699e+02 -3.876300e+02\n15 1521     2.625699e+02 -1.189700e+02\n0 1522     -8.770001e+01 -1.222400e+02\n1 1522     4.457001e+01 -6.458002e+01\n7 1522     -1.544900e+02 -2.647998e+01\n15 1522     -1.355700e+02 -4.022998e+01\n0 1523     1.461300e+02 -1.473500e+02\n1 1523     2.556899e+02 -1.590400e+02\n7 1523     8.748999e+01 -6.719971e+00\n10 1523     9.096997e+01 -1.390002e+01\n15 1523     1.823101e+02 -4.287000e+01\n0 1524     1.401200e+02 -2.656500e+02\n1 1524     2.142300e+02 -2.731500e+02\n4 1524     -4.998800e+02 -5.249600e+02\n6 1524     2.177900e+02 -2.309000e+02\n7 1524     1.015300e+02 -1.252300e+02\n9 1524     2.318800e+02 -7.591998e+01\n10 1524     9.662000e+01 -1.507500e+02\n12 1524     2.269100e+02 -1.932100e+02\n15 1524     1.903600e+02 -2.041900e+02\n0 1525     2.913900e+02 -1.721800e+02\n1 1525     3.979100e+02 -2.318900e+02\n10 1525     2.605699e+02 -2.734003e+01\n0 1526     1.285100e+02 -1.042600e+02\n1 1526     2.531300e+02 -1.115800e+02\n3 1526     2.252200e+02 -3.529300e+02\n6 1526     1.450600e+02 -5.521997e+01\n8 1526     2.901700e+02 -9.010999e+01\n0 1527     1.832001e+01 -9.403998e+01\n1 1527     1.503000e+02 -6.716998e+01\n3 1527     1.128500e+02 -3.802000e+02\n7 1527     -5.059998e+01 2.173999e+01\n10 1527     -6.107001e+01 3.353998e+01\n13 1527     3.999700e+02 -3.031900e+02\n15 1527     2.739990e+00 1.209998e+01\n0 1528     -5.870001e+01 -6.023999e+01\n1 1528     8.991998e+01 -1.338000e+01\n7 1528     -1.373500e+02 3.994000e+01\n8 1528     1.035100e+02 -1.042800e+02\n13 1528     3.209100e+02 -2.820200e+02\n15 1528     -1.057200e+02 4.698999e+01\n0 1529     2.871997e+01 -7.631000e+01\n1 1529     1.654700e+02 -5.395001e+01\n7 1529     -4.260999e+01 4.189001e+01\n8 1529     1.959500e+02 -8.832001e+01\n10 1529     -5.263000e+01 5.546002e+01\n13 1529     4.076899e+02 -2.856100e+02\n15 1529     1.432001e+01 3.740002e+01\n0 1530     3.488000e+02 -3.338900e+02\n1 1530     4.149800e+02 -4.149200e+02\n2 1530     5.651300e+02 -2.901200e+02\n3 1530     4.715800e+02 -5.839301e+02\n8 1530     4.983199e+02 -2.863600e+02\n9 1530     3.677900e+02 -1.338400e+02\n12 1530     4.478000e+02 -2.350800e+02\n0 1531     4.594000e+01 -1.329400e+02\n1 1531     1.631300e+02 -1.135900e+02\n2 1531     2.545000e+02 -9.578998e+01\n3 1531     1.675300e+02 -3.985300e+02\n7 1531     -1.392999e+01 -1.006000e+01\n10 1531     -2.545001e+01 -8.630005e+00\n15 1531     4.437000e+01 -3.677002e+01\n0 1532     -5.309003e+01 -5.527002e+01\n1 1532     9.814001e+01 -1.038000e+01\n3 1532     7.409973e+00 -3.762700e+02\n6 1532     -8.957001e+01 -7.128003e+01\n7 1532     -1.337500e+02 4.547998e+01\n10 1532     -1.492800e+02 7.148999e+01\n12 1532     -7.696002e+01 -1.597998e+01\n13 1532     3.238199e+02 -2.765600e+02\n15 1532     -9.812000e+01 5.503998e+01\n0 1533     2.964001e+01 -1.329999e+01\n1 1533     1.832800e+02 7.979980e+00\n7 1533     -5.152002e+01 1.055900e+02\n0 1534     5.528000e+02 2.237900e+02\n1 1534     8.505800e+02 8.076999e+01\n3 1534     2.907700e+02 -1.372500e+02\n7 1534     3.744500e+02 3.870900e+02\n8 1534     4.120300e+02 1.216700e+02\n9 1534     2.267200e+02 2.484400e+02\n10 1534     5.299301e+02 4.620000e+02\n11 1534     6.844800e+02 -5.002900e+02\n15 1534     7.152200e+02 5.250300e+02\n0 1535     1.992000e+02 -3.950012e+00\n1 1535     3.536801e+02 -3.389001e+01\n2 1535     3.497700e+02 6.740997e+01\n3 1535     2.459100e+02 -2.407800e+02\n6 1535     1.849200e+02 7.783002e+01\n7 1535     1.139200e+02 1.433100e+02\n8 1535     3.200100e+02 7.119995e+00\n10 1535     1.381700e+02 1.572900e+02\n12 1535     2.094800e+02 1.249700e+02\n13 1535     5.484200e+02 -2.080700e+02\n15 1535     2.368900e+02 1.592200e+02\n0 1536     -3.940002e+01 -3.296997e+01\n1 1536     1.169800e+02 7.619995e+00\n2 1536     1.040500e+02 -3.397998e+01\n6 1536     -7.857001e+01 -3.812000e+01\n7 1536     -1.215000e+02 7.188000e+01\n10 1536     -1.351100e+02 9.913000e+01\n12 1536     -6.516998e+01 1.744000e+01\n15 1536     -8.264001e+01 8.706000e+01\n0 1537     2.170001e+01 5.349976e+00\n1 1537     1.829800e+02 2.789001e+01\n2 1537     1.683700e+02 3.539001e+01\n7 1537     -6.389001e+01 1.224600e+02\n13 1537     3.920601e+02 -2.148300e+02\n15 1537     -6.260010e+00 1.478300e+02\n0 1538     2.149800e+02 -5.028003e+01\n1 1538     3.559200e+02 -8.491998e+01\n6 1538     2.145200e+02 3.146997e+01\n7 1538     1.360000e+02 9.967999e+01\n8 1538     3.437300e+02 -2.988000e+01\n10 1538     1.600900e+02 1.049600e+02\n15 1538     2.638199e+02 9.792001e+01\n0 1539     5.599399e+02 2.244500e+02\n1 1539     8.583199e+02 7.985001e+01\n2 1539     4.361700e+02 1.856800e+02\n3 1539     2.982500e+02 -1.332400e+02\n7 1539     3.812300e+02 3.893300e+02\n11 1539     6.918900e+02 -5.006300e+02\n15 1539     7.250699e+02 5.274900e+02\n0 1540     5.981899e+02 1.463500e+02\n1 1540     8.736899e+02 -1.496997e+01\n2 1540     4.988800e+02 1.253700e+02\n6 1540     4.138000e+02 2.981900e+02\n7 1540     4.297400e+02 3.206000e+02\n8 1540     4.691600e+02 7.426001e+01\n9 1540     2.878400e+02 2.041700e+02\n15 1540     7.875699e+02 4.230200e+02\n0 1541     6.451400e+02 -3.159973e+00\n1 1541     8.759100e+02 -1.885400e+02\n2 1541     5.920699e+02 -3.450012e+00\n15 1541     8.711000e+02 2.208400e+02\n0 1542     6.510699e+02 -4.563000e+01\n1 1542     8.685400e+02 -2.354000e+02\n2 1542     6.112000e+02 -4.425000e+01\n3 1542     4.803700e+02 -3.487500e+02\n7 1542     5.072800e+02 1.456600e+02\n0 1543     2.248400e+02 3.482600e+02\n1 1543     5.689301e+02 2.960700e+02\n2 1543     -4.060999e+01 1.191800e+02\n6 1543     -1.751700e+02 3.840800e+02\n7 1543     1.417999e+01 4.422000e+02\n11 1543     3.620900e+02 -3.920400e+02\n14 1543     5.585400e+02 -3.869900e+02\n0 1544     1.643900e+02 -5.173500e+02\n1 1544     1.679100e+02 -5.271300e+02\n10 1544     1.505500e+02 -4.351300e+02\n0 1545     -3.920001e+01 -2.059900e+02\n1 1545     5.690997e+01 -1.574200e+02\n2 1545     2.057600e+02 -1.861200e+02\n3 1545     1.294700e+02 -4.864301e+02\n4 1545     -4.145400e+02 -3.824900e+02\n6 1545     1.373999e+01 -2.217700e+02\n8 1545     1.873400e+02 -2.047300e+02\n10 1545     -1.159400e+02 -1.017500e+02\n12 1545     6.969971e+00 -1.717800e+02\n15 1545     -6.112000e+01 -1.469600e+02\n0 1546     2.937000e+02 -1.533800e+02\n1 1546     4.076801e+02 -2.137700e+02\n6 1546     3.192200e+02 -6.365997e+01\n7 1546     2.261600e+02 8.409973e+00\n8 1546     4.245800e+02 -1.152800e+02\n10 1546     2.616400e+02 -5.130005e+00\n13 1546     6.431000e+02 -3.350100e+02\n15 1546     3.865800e+02 -3.256000e+01\n0 1547     -2.694000e+01 -6.789001e+01\n1 1547     1.179400e+02 -2.978998e+01\n3 1547     4.684003e+01 -3.749100e+02\n6 1547     -5.090002e+01 -7.253998e+01\n7 1547     -1.028100e+02 3.890997e+01\n8 1547     1.355800e+02 -1.007600e+02\n10 1547     -1.176500e+02 6.001001e+01\n12 1547     -3.890002e+01 -1.878998e+01\n13 1547     3.514100e+02 -2.847600e+02\n15 1547     -6.138000e+01 4.151001e+01\n0 1548     2.369000e+02 -2.104100e+02\n1 1548     3.260500e+02 -2.505800e+02\n2 1548     4.697100e+02 -1.289700e+02\n3 1548     3.729800e+02 -4.250400e+02\n7 1548     1.868199e+02 -5.345001e+01\n10 1548     2.015100e+02 -7.737000e+01\n15 1548     3.144200e+02 -1.171100e+02\n0 1549     -6.400000e+01 -3.469000e+01\n1 1549     9.621997e+01 1.119000e+01\n10 1549     -1.627900e+02 9.328998e+01\n13 1549     3.082800e+02 -2.604900e+02\n15 1549     -1.146200e+02 8.062000e+01\n0 1550     2.312600e+02 7.885999e+01\n1 1550     4.164700e+02 3.771997e+01\n6 1550     1.744700e+02 1.726100e+02\n12 1550     2.083600e+02 2.184200e+02\n13 1550     5.562700e+02 -1.368800e+02\n15 1550     2.709301e+02 2.772900e+02\n0 1551     1.883400e+02 7.246997e+01\n1 1551     3.684700e+02 4.503998e+01\n13 1551     5.252800e+02 -1.452100e+02\n15 1551     2.123700e+02 2.622400e+02\n0 1552     1.619500e+02 7.865997e+01\n1 1552     3.437300e+02 5.877002e+01\n2 1552     2.770699e+02 1.327900e+02\n4 1552     -2.393000e+02 -5.403600e+02\n6 1552     1.107000e+02 1.548300e+02\n8 1552     2.624100e+02 6.289999e+01\n9 1552     1.158900e+02 2.052700e+02\n10 1552     8.534003e+01 2.504700e+02\n12 1552     1.382400e+02 2.040500e+02\n13 1552     5.017600e+02 -1.412900e+02\n15 1552     1.750100e+02 2.669200e+02\n0 1553     9.979980e+00 1.234800e+02\n1 1553     2.132700e+02 1.458000e+02\n2 1553     8.996997e+01 1.254500e+02\n3 1553     -1.099854e-01 -1.932200e+02\n4 1553     -1.921700e+02 -4.170800e+02\n5 1553     6.216700e+02 -5.326000e+02\n6 1553     -8.798999e+01 1.514700e+02\n7 1553     -1.019000e+02 2.337400e+02\n8 1553     1.108400e+02 5.931000e+01\n12 1553     -6.034003e+01 2.054200e+02\n13 1553     3.564800e+02 -1.187600e+02\n15 1553     -3.617999e+01 3.071900e+02\n0 1554     2.192000e+02 4.312500e+02\n1 1554     5.933600e+02 3.821600e+02\n7 1554     -7.739990e+00 5.206500e+02\n11 1554     3.524301e+02 -3.159600e+02\n14 1554     5.298800e+02 -2.991600e+02\n0 1555     7.971002e+01 5.098200e+02\n1 1555     4.644000e+02 4.997000e+02\n7 1555     -1.505900e+02 5.864500e+02\n0 1556     5.476000e+02 5.669983e+00\n1 1556     7.767200e+02 -1.477700e+02\n7 1556     3.980900e+02 1.739600e+02\n0 1557     5.538900e+02 -2.020020e+00\n1 1557     7.809900e+02 -1.576700e+02\n7 1557     4.055601e+02 1.677700e+02\n10 1557     5.491400e+02 1.976000e+02\n13 1557     7.740200e+02 -2.083600e+02\n0 1558     -7.835200e+02 -4.747000e+02\n1 1558     -6.539200e+02 -1.837500e+02\n4 1558     -4.844500e+02 1.621800e+02\n0 1559     -1.329600e+02 3.421400e+02\n1 1559     2.017900e+02 3.848300e+02\n2 1559     -4.076000e+02 6.815997e+01\n5 1559     2.642200e+02 -3.211400e+02\n7 1559     -3.370600e+02 3.901200e+02\n9 1559     -4.902400e+02 1.180600e+02\n14 1559     1.807300e+02 -4.080500e+02\n0 1560     -1.351000e+02 2.810500e+02\n1 1560     1.793800e+02 3.260900e+02\n7 1560     -3.265100e+02 3.300000e+02\n11 1560     2.895001e+01 -4.635000e+02\n0 1561     -1.396900e+02 -1.045900e+02\n1 1561     1.760010e+00 -3.215997e+01\n7 1561     -2.121400e+02 -1.912000e+01\n15 1561     -2.085000e+02 -2.378998e+01\n0 1562     -1.020700e+02 2.902500e+02\n1 1562     2.156200e+02 3.263300e+02\n2 1562     -3.523400e+02 2.284003e+01\n7 1562     -2.964700e+02 3.432000e+02\n9 1562     -4.381700e+02 8.114999e+01\n10 1562     -2.444600e+02 4.747400e+02\n13 1562     1.190000e+02 -1.521002e+01\n14 1562     2.213600e+02 -4.633700e+02\n0 1563     6.582001e+01 3.704400e+02\n1 1563     4.128199e+02 3.605900e+02\n7 1563     -1.462100e+02 4.424100e+02\n0 1564     4.066500e+02 -5.597998e+01\n1 1564     5.679700e+02 -1.559700e+02\n7 1564     3.062500e+02 1.145800e+02\n10 1564     3.822200e+02 1.185600e+02\n15 1564     5.337700e+02 1.157500e+02\n0 1565     7.267200e+02 -3.495300e+02\n1 1565     8.329301e+02 -5.799399e+02\n7 1565     6.372300e+02 -1.177500e+02\n12 1565     8.159700e+02 -1.609200e+02\n0 1566     1.400300e+02 5.453998e+01\n1 1566     3.132500e+02 4.234003e+01\n6 1566     1.020700e+02 1.226600e+02\n7 1566     4.595001e+01 1.918500e+02\n13 1566     4.897000e+02 -1.631600e+02\n15 1566     1.483101e+02 2.315700e+02\n0 1567     2.125300e+02 -2.050200e+02\n1 1567     3.042000e+02 -2.374900e+02\n7 1567     1.614900e+02 -5.208002e+01\n10 1567     1.733100e+02 -7.317999e+01\n15 1567     2.808101e+02 -1.126600e+02\n0 1568     1.279999e+01 -1.310700e+02\n1 1568     1.318200e+02 -1.017500e+02\n7 1568     -4.765002e+01 -1.409003e+01\n15 1568     -5.200195e-01 -3.865002e+01\n0 1569     3.296700e+02 4.448300e+02\n1 1569     7.201899e+02 3.666700e+02\n6 1569     -1.129800e+02 5.199600e+02\n7 1569     9.446997e+01 5.460000e+02\n14 1569     6.398500e+02 -2.786300e+02\n0 1570     5.004999e+01 -1.349200e+02\n1 1570     1.661899e+02 -1.168600e+02\n7 1570     -9.549988e+00 -1.146997e+01\n15 1570     5.040002e+01 -3.921002e+01\n0 1571     5.114301e+02 2.656300e+02\n1 1571     8.342700e+02 1.335600e+02\n7 1571     3.157600e+02 4.118700e+02\n0 1572     1.783199e+02 4.612000e+01\n1 1572     3.486100e+02 2.207001e+01\n2 1572     3.096899e+02 1.094700e+02\n7 1572     8.458002e+01 1.885800e+02\n10 1572     1.086300e+02 2.131300e+02\n13 1572     5.229900e+02 -1.676000e+02\n15 1572     2.017400e+02 2.247800e+02\n0 1573     -1.304900e+02 3.320100e+02\n1 1573     2.015300e+02 3.739100e+02\n9 1573     -4.863200e+02 1.073500e+02\n11 1573     3.325000e+01 -4.160600e+02\n0 1574     -1.991500e+02 4.754000e+02\n1 1574     1.661200e+02 5.338700e+02\n7 1574     -4.211700e+02 5.216700e+02\n0 1575     -4.563000e+01 4.858700e+02\n1 1575     3.259301e+02 5.062000e+02\n7 1575     -2.698300e+02 5.487000e+02\n0 1576     4.422998e+01 -1.178100e+02\n1 1576     1.676801e+02 -9.878003e+01\n7 1576     -1.996002e+01 3.890015e+00\n10 1576     -2.977002e+01 9.320007e+00\n12 1576     6.746002e+01 -5.064001e+01\n0 1577     2.655400e+02 -2.946100e+02\n1 1577     3.385699e+02 -3.464000e+02\n7 1577     2.198600e+02 -1.365700e+02\n10 1577     2.430900e+02 -1.703400e+02\n13 1577     6.328700e+02 -4.689000e+02\n0 1578     -1.286600e+02 3.400000e+02\n1 1578     2.036000e+02 3.810200e+02\n2 1578     -4.031700e+02 6.522998e+01\n8 1578     -2.506900e+02 4.372000e+01\n9 1578     -4.861900e+02 1.157300e+02\n13 1578     8.828998e+01 2.500000e+01\n0 1579     5.072998e+01 -4.587000e+01\n1 1579     1.945200e+02 -3.053003e+01\n2 1579     2.231000e+02 -6.609985e+00\n3 1579     1.326100e+02 -3.137800e+02\n7 1579     -2.465997e+01 7.678998e+01\n10 1579     -2.971997e+01 9.265002e+01\n13 1579     4.260601e+02 -2.566500e+02\n15 1579     3.981000e+01 8.150000e+01\n0 1580     -7.340997e+01 -6.217999e+01\n1 1580     7.590997e+01 -1.070001e+01\n7 1580     -1.521000e+02 3.608002e+01\n10 1580     -1.720400e+02 6.134998e+01\n15 1580     -1.247200e+02 4.257001e+01\n0 1581     1.997600e+02 -2.460600e+02\n1 1581     2.780300e+02 -2.735700e+02\n2 1581     4.506500e+02 -1.715600e+02\n7 1581     1.577300e+02 -9.404999e+01\n8 1581     3.959100e+02 -1.940700e+02\n9 1581     2.736100e+02 -3.862000e+01\n12 1581     2.891500e+02 -1.492600e+02\n0 1582     1.874500e+02 5.700073e-01\n1 1582     3.432300e+02 -2.575000e+01\n7 1582     1.019700e+02 1.457600e+02\n13 1582     5.380699e+02 -2.052500e+02\n15 1582     2.197500e+02 1.638400e+02\n0 1583     -1.517700e+02 3.691800e+02\n1 1583     1.892200e+02 4.162900e+02\n2 1583     -4.275800e+02 1.016300e+02\n5 1583     2.471801e+02 -2.916000e+02\n7 1583     -3.594500e+02 4.158600e+02\n10 1583     -3.125600e+02 5.648100e+02\n14 1583     1.629399e+02 -3.787600e+02\n0 1584     2.517000e+02 4.643600e+02\n1 1584     6.383101e+02 4.078700e+02\n7 1584     1.864001e+01 5.576700e+02\n0 1585     3.297000e+02 -9.410999e+01\n1 1585     4.651100e+02 -1.670000e+02\n7 1585     2.479700e+02 7.150000e+01\n10 1585     2.971300e+02 6.653998e+01\n15 1585     4.292300e+02 5.328003e+01\n0 1586     -1.027700e+02 3.830800e+02\n1 1586     2.419200e+02 4.176200e+02\n5 1586     2.975300e+02 -2.759500e+02\n7 1586     -3.127300e+02 4.358400e+02\n0 1587     -1.805100e+02 5.046400e+02\n1 1587     1.924600e+02 5.580500e+02\n2 1587     -4.635700e+02 2.653000e+02\n7 1587     -4.062300e+02 5.541700e+02\n12 1587     -5.038600e+02 4.887900e+02\n0 1588     -2.153600e+02 4.951600e+02\n1 1588     1.553800e+02 5.569300e+02\n7 1588     -4.400300e+02 5.407800e+02\n0 1589     -2.348999e+01 1.365002e+01\n1 1589     1.448500e+02 4.844000e+01\n6 1589     -7.506000e+01 2.167999e+01\n7 1589     -1.137600e+02 1.212100e+02\n10 1589     -1.224200e+02 1.545400e+02\n13 1589     3.464000e+02 -2.131400e+02\n15 1589     -6.847998e+01 1.525600e+02\n0 1590     1.426100e+02 4.696800e+02\n1 1590     5.203101e+02 4.419400e+02\n7 1590     -8.520001e+01 5.516700e+02\n0 1591     -3.921997e+01 5.119400e+02\n1 1591     3.376899e+02 5.316800e+02\n7 1591     -2.674000e+02 5.764800e+02\n0 1592     2.308800e+02 3.663200e+02\n1 1592     5.827100e+02 3.126200e+02\n7 1592     1.628998e+01 4.600900e+02\n0 1593     -2.079500e+02 5.040800e+02\n1 1593     1.648500e+02 5.643700e+02\n3 1593     -6.169900e+02 -6.316998e+01\n5 1593     2.019600e+02 -1.461400e+02\n7 1593     -4.339300e+02 5.513800e+02\n11 1593     -3.672998e+01 -2.645800e+02\n0 1594     2.819800e+02 -2.878700e+02\n1 1594     3.576200e+02 -3.448600e+02\n7 1594     2.336700e+02 -1.267900e+02\n10 1594     2.613400e+02 -1.604500e+02\n15 1594     3.895800e+02 -2.165500e+02\n0 1595     7.330200e+02 -3.359400e+02\n1 1595     8.460000e+02 -5.682500e+02\n7 1595     6.392500e+02 -1.045900e+02\n0 1596     1.504500e+02 4.714700e+02\n1 1596     5.294600e+02 4.417900e+02\n7 1596     -7.791998e+01 5.544500e+02\n0 1597     2.155300e+02 1.581700e+02\n1 1597     4.352000e+02 1.205400e+02\n7 1597     9.051001e+01 2.958600e+02\n10 1597     1.405500e+02 3.475600e+02\n15 1597     2.421500e+02 3.838400e+02\n0 1598     4.930699e+02 2.901300e+02\n1 1598     8.230000e+02 1.645200e+02\n6 1598     2.055100e+02 4.084700e+02\n7 1598     2.946899e+02 4.328900e+02\n8 1598     3.123900e+02 1.237200e+02\n11 1598     6.192800e+02 -4.353500e+02\n13 1598     6.594000e+02 3.597998e+01\n0 1599     2.893000e+02 -1.844300e+02\n1 1599     3.905300e+02 -2.431300e+02\n7 1599     2.292800e+02 -2.054999e+01\n10 1599     2.596700e+02 -4.184998e+01\n0 1600     7.903998e+01 -1.553600e+02\n1 1600     1.874399e+02 -1.456000e+02\n7 1600     2.320001e+01 -2.598999e+01\n10 1600     1.457001e+01 -3.022998e+01\n15 1600     9.216998e+01 -6.262000e+01\n0 1601     2.247700e+02 -7.954999e+01\n1 1601     3.577000e+02 -1.176300e+02\n7 1601     1.498900e+02 7.177002e+01\n15 1601     2.815900e+02 5.944000e+01\n0 1602     -3.023999e+01 -9.801001e+01\n1 1602     1.032700e+02 -5.726001e+01\n3 1602     6.665997e+01 -3.959800e+02\n7 1602     -9.884003e+01 9.559998e+00\n8 1602     1.481900e+02 -1.217700e+02\n15 1602     -6.215997e+01 4.600220e-01\n0 1603     3.721700e+02 1.706000e+01\n1 1603     5.579399e+02 -7.121997e+01\n7 1603     2.593700e+02 1.782200e+02\n0 1604     -6.478003e+01 -1.467900e+02\n1 1604     5.640997e+01 -9.420001e+01\n6 1604     -5.652002e+01 -1.743600e+02\n7 1604     -1.251800e+02 -4.559998e+01\n12 1604     -5.496997e+01 -1.205100e+02\n0 1605     3.247600e+02 -7.882001e+01\n1 1605     4.666600e+02 -1.501900e+02\n7 1605     2.398101e+02 8.470999e+01\n10 1605     2.902200e+02 8.373999e+01\n15 1605     4.209800e+02 7.376001e+01\n0 1606     1.966400e+02 4.289300e+02\n1 1606     5.680800e+02 3.853700e+02\n5 1606     5.998400e+02 -2.222200e+02\n7 1606     -2.876001e+01 5.159900e+02\n14 1606     5.076899e+02 -3.027500e+02\n0 1607     2.041998e+01 4.866300e+02\n1 1607     3.948199e+02 4.903500e+02\n4 1607     5.710022e+00 -3.715500e+02\n7 1607     -2.052500e+02 5.562400e+02\n11 1607     1.660200e+02 -2.746500e+02\n13 1607     2.063700e+02 1.595600e+02\n0 1608     -1.838300e+02 4.253100e+02\n1 1608     1.700500e+02 4.807700e+02\n2 1608     -4.626400e+02 1.707300e+02\n7 1608     -3.993600e+02 4.715100e+02\n11 1608     -1.585999e+01 -3.321500e+02\n0 1609     -1.484400e+02 3.554800e+02\n1 1609     1.886899e+02 4.020800e+02\n7 1609     -3.544600e+02 4.020100e+02\n0 1610     3.070601e+02 -2.515800e+02\n1 1610     3.926400e+02 -3.172500e+02\n7 1610     2.526700e+02 -8.694000e+01\n10 1610     2.860900e+02 -1.172300e+02\n12 1610     3.898600e+02 -1.409100e+02\n15 1610     4.187700e+02 -1.640700e+02\n0 1611     -8.640997e+01 2.255600e+02\n1 1611     2.073700e+02 2.598300e+02\n7 1611     -2.646500e+02 2.839400e+02\n0 1612     4.509301e+02 3.007600e+02\n1 1612     7.822100e+02 1.872800e+02\n6 1612     1.469800e+02 4.053700e+02\n7 1612     2.503400e+02 4.352200e+02\n14 1612     8.519100e+02 -4.165700e+02\n0 1613     -1.214200e+02 1.988700e+02\n1 1613     1.632200e+02 2.435000e+02\n7 1613     -2.935800e+02 2.530400e+02\n0 1614     -6.460022e+00 -1.241800e+02\n1 1614     1.157100e+02 -8.908002e+01\n2 1614     1.942900e+02 -1.023500e+02\n6 1614     9.400024e+00 -1.232700e+02\n7 1614     -6.841998e+01 -1.089001e+01\n8 1614     1.836500e+02 -1.336100e+02\n10 1614     -8.753998e+01 -3.789978e+00\n12 1614     1.273999e+01 -7.194000e+01\n15 1614     -2.726001e+01 -3.217999e+01\n0 1615     1.300049e-01 -8.644000e+01\n1 1615     1.366600e+02 -5.557001e+01\n2 1615     1.730600e+02 -7.401001e+01\n7 1615     -7.139001e+01 2.559003e+01\n10 1615     -8.417999e+01 4.110999e+01\n13 1615     3.801300e+02 -2.981000e+02\n15 1615     -2.252002e+01 1.984998e+01\n0 1616     -2.347100e+02 4.652800e+02\n1 1616     1.285200e+02 5.321300e+02\n2 1616     -5.155800e+02 2.193100e+02\n7 1616     -4.557400e+02 5.073600e+02\n0 1617     1.642400e+02 -1.268000e+02\n1 1617     2.822500e+02 -1.451200e+02\n7 1617     9.960999e+01 1.560999e+01\n10 1617     1.097700e+02 1.176001e+01\n15 1617     2.051200e+02 -1.284998e+01\n0 1618     -3.741500e+02 3.012600e+02\n1 1618     -4.646997e+01 4.062500e+02\n7 1618     -5.756000e+02 3.172600e+02\n10 1618     -5.722100e+02 4.617400e+02\n15 1618     -5.741700e+02 4.986300e+02\n0 1619     -4.398500e+02 3.730000e+02\n1 1619     -9.379999e+01 4.915600e+02\n7 1619     -6.539200e+02 3.865800e+02\n0 1620     1.732400e+02 -1.361400e+02\n1 1620     2.875100e+02 -1.570700e+02\n7 1620     1.105900e+02 8.210022e+00\n10 1620     1.213600e+02 1.530029e+00\n0 1621     3.204900e+02 -1.081700e+02\n1 1621     4.497700e+02 -1.779500e+02\n7 1621     2.431899e+02 5.687000e+01\n10 1621     2.879500e+02 4.945001e+01\n13 1621     6.583400e+02 -2.925100e+02\n15 1621     4.181600e+02 3.323999e+01\n0 1622     3.398400e+02 -1.708700e+02\n1 1622     4.485500e+02 -2.468100e+02\n7 1622     2.732500e+02 7.600098e-01\n13 1622     6.870800e+02 -3.450100e+02\n15 1622     4.528700e+02 -4.919000e+01\n0 1623     -1.049700e+02 -1.465400e+02\n1 1623     1.809998e+01 -8.188000e+01\n6 1623     -1.009300e+02 -1.882100e+02\n7 1623     -1.658500e+02 -5.248999e+01\n10 1623     -1.994100e+02 -4.010999e+01\n12 1623     -1.024800e+02 -1.321600e+02\n15 1623     -1.566900e+02 -7.563000e+01\n0 1624     2.812500e+02 2.976100e+02\n1 1624     6.085900e+02 2.294200e+02\n6 1624     -7.671997e+01 3.439100e+02\n7 1624     8.045001e+01 4.030700e+02\n0 1625     -9.351001e+01 4.989900e+02\n1 1625     2.796400e+02 5.315500e+02\n7 1625     -3.184200e+02 5.576100e+02\n0 1626     3.615900e+02 -2.313000e+01\n1 1626     5.291700e+02 -1.075600e+02\n7 1626     2.602200e+02 1.405800e+02\n10 1626     3.276801e+02 1.520200e+02\n12 1626     3.608600e+02 1.178900e+02\n13 1626     6.659301e+02 -2.210600e+02\n15 1626     4.668900e+02 1.545200e+02\n0 1627     2.477400e+02 4.607000e+02\n1 1627     6.329200e+02 4.051200e+02\n2 1627     -6.528998e+01 2.197800e+02\n5 1627     6.510900e+02 -1.859500e+02\n6 1627     -2.021800e+02 5.230300e+02\n7 1627     1.554999e+01 5.533800e+02\n8 1627     2.619000e+01 1.695100e+02\n9 1627     -2.051800e+02 2.623800e+02\n11 1627     3.758101e+02 -2.883300e+02\n12 1627     -3.654999e+01 4.980200e+02\n14 1627     5.566300e+02 -2.660100e+02\n0 1628     -1.524100e+02 -1.844000e+01\n1 1628     2.421997e+01 5.202002e+01\n6 1628     -2.517500e+02 -7.760999e+01\n7 1628     -2.480900e+02 6.001001e+01\n10 1628     -2.684900e+02 1.039900e+02\n15 1628     -2.350100e+02 9.114001e+01\n0 1629     1.309000e+02 4.706400e+02\n1 1629     5.079600e+02 4.461200e+02\n7 1629     -9.751001e+01 5.512600e+02\n0 1630     -3.097998e+01 5.064700e+02\n1 1630     3.464200e+02 5.235100e+02\n2 1630     -3.206500e+02 2.677400e+02\n6 1630     -5.153300e+02 5.237300e+02\n7 1630     -2.580700e+02 5.715600e+02\n0 1631     1.081800e+02 4.441900e+02\n1 1631     4.768400e+02 4.246400e+02\n7 1631     -1.148500e+02 5.221800e+02\n0 1632     -6.034998e+01 -1.425300e+02\n1 1632     6.220001e+01 -9.162000e+01\n7 1632     -1.218700e+02 -4.108002e+01\n10 1632     -1.482800e+02 -3.064001e+01\n15 1632     -9.677002e+01 -6.428003e+01\n0 1633     -5.640002e+01 -1.245300e+02\n1 1633     7.233002e+01 -7.545001e+01\n7 1633     -1.216700e+02 -2.340997e+01\n10 1633     -1.453200e+02 -9.429993e+00\n15 1633     -9.346002e+01 -3.946997e+01\n0 1634     3.089000e+02 2.220200e+02\n1 1634     6.072200e+02 1.456500e+02\n7 1634     1.242400e+02 3.373300e+02\n0 1635     -6.122998e+01 -1.301400e+02\n1 1635     6.616998e+01 -7.925000e+01\n2 1635     1.205700e+02 -1.413200e+02\n7 1635     -1.267700e+02 -2.966998e+01\n0 1636     2.158002e+01 7.165002e+01\n1 1636     2.048800e+02 9.242001e+01\n7 1636     -7.717999e+01 1.869400e+02\n15 1636     -1.484998e+01 2.375100e+02\n0 1637     3.331600e+02 -1.785600e+02\n1 1637     4.383800e+02 -2.519600e+02\n6 1637     3.707100e+02 -7.565997e+01\n7 1637     2.690100e+02 -8.090027e+00\n12 1637     4.024600e+02 -4.251001e+01\n15 1637     4.440900e+02 -6.121997e+01\n0 1638     -2.495200e+02 4.138300e+02\n1 1638     1.016400e+02 4.853200e+02\n7 1638     -4.638200e+02 4.516500e+02\n10 1638     -4.366200e+02 6.109300e+02\n11 1638     -7.464001e+01 -3.424400e+02\n0 1639     -3.600000e+01 5.080500e+02\n1 1639     3.412600e+02 5.265900e+02\n7 1639     -2.630200e+02 5.726600e+02\n11 1639     1.144900e+02 -2.575100e+02\n0 1640     -2.178500e+02 4.257700e+02\n1 1640     1.362700e+02 4.891100e+02\n2 1640     -4.974000e+02 1.699200e+02\n7 1640     -4.330800e+02 4.678900e+02\n14 1640     1.009000e+02 -3.184100e+02\n0 1641     -2.453000e+02 3.166000e+02\n1 1641     8.356000e+01 3.890700e+02\n7 1641     -4.465700e+02 3.501700e+02\n0 1642     4.923600e+02 2.779700e+02\n1 1642     8.184399e+02 1.518900e+02\n7 1642     2.955200e+02 4.207100e+02\n10 1642     4.549800e+02 5.203700e+02\n0 1643     -2.471700e+02 3.109100e+02\n1 1643     8.040002e+01 3.837800e+02\n7 1643     -4.474100e+02 3.429300e+02\n11 1643     -7.365997e+01 -4.349800e+02\n0 1644     -2.221900e+02 4.834700e+02\n1 1644     1.454100e+02 5.472000e+02\n2 1644     -5.036600e+02 2.410200e+02\n7 1644     -4.456600e+02 5.278400e+02\n11 1644     -4.962000e+01 -2.822400e+02\n12 1644     -5.475500e+02 4.582300e+02\n0 1645     -2.824000e+02 3.455800e+02\n1 1645     5.322998e+01 4.265400e+02\n7 1645     -4.875500e+02 3.763100e+02\n0 1646     4.103000e+02 -1.383002e+01\n1 1646     5.901200e+02 -1.153300e+02\n7 1646     2.990699e+02 1.532100e+02\n0 1647     -2.218700e+02 4.947300e+02\n1 1647     1.482600e+02 5.581200e+02\n2 1647     -5.042500e+02 2.538200e+02\n7 1647     -4.466800e+02 5.398700e+02\n0 1648     4.871300e+02 3.460300e+02\n1 1648     8.346400e+02 2.256200e+02\n3 1648     1.391700e+02 -9.700000e+01\n6 1648     1.834700e+02 4.702200e+02\n7 1648     2.809700e+02 4.863100e+02\n12 1648     2.942700e+02 4.635900e+02\n13 1648     6.479000e+02 8.285999e+01\n0 1649     5.541500e+02 3.502002e+01\n1 1649     7.925500e+02 -1.189200e+02\n6 1649     3.876900e+02 1.546600e+02\n7 1649     4.005601e+02 2.037400e+02\n15 1649     7.388700e+02 2.605400e+02\n0 1650     5.538900e+02 -2.020020e+00\n1 1650     7.809900e+02 -1.576700e+02\n7 1650     4.055601e+02 1.677700e+02\n0 1651     1.603199e+02 1.140002e+01\n1 1651     3.188600e+02 -6.710022e+00\n7 1651     7.360999e+01 1.522500e+02\n15 1651     1.811300e+02 1.745600e+02\n0 1652     1.842500e+02 -1.140002e+01\n1 1652     3.360400e+02 -3.702002e+01\n7 1652     1.008100e+02 1.335600e+02\n10 1652     1.209200e+02 1.467700e+02\n15 1652     2.166200e+02 1.469300e+02\n0 1653     2.668300e+02 -1.996300e+02\n1 1653     3.612800e+02 -2.502800e+02\n7 1653     2.119600e+02 -3.819000e+01\n10 1653     2.349700e+02 -6.153998e+01\n15 1653     3.548700e+02 -9.850000e+01\n0 1654     8.198999e+01 -5.556899e+02\n1 1654     7.340002e+01 -5.338300e+02\n7 1654     9.213000e+01 -4.270600e+02\n0 1655     6.360300e+02 -2.659200e+02\n1 1655     7.628700e+02 -4.565699e+02\n7 1655     5.396500e+02 -5.728003e+01\n10 1655     6.689800e+02 -9.765997e+01\n12 1655     6.872100e+02 -1.054500e+02\n0 1656     -1.207200e+02 -5.378800e+02\n1 1656     -1.096100e+02 -4.469600e+02\n6 1656     2.263000e+01 -6.717000e+02\n7 1656     -1.123500e+02 -4.532600e+02\n0 1657     6.245200e+02 4.994000e+01\n1 1657     8.707300e+02 -1.252200e+02\n7 1657     4.685400e+02 2.325000e+02\n10 1657     6.280900e+02 2.656400e+02\n13 1657     8.412900e+02 -1.507700e+02\n0 1658     -1.023900e+02 -1.308200e+02\n1 1658     2.675000e+01 -6.800000e+01\n2 1658     7.759998e+01 -1.511000e+02\n6 1658     -1.093600e+02 -1.722100e+02\n7 1658     -1.671800e+02 -3.744000e+01\n12 1658     -1.079600e+02 -1.159600e+02\n13 1658     2.940500e+02 -3.461400e+02\n15 1658     -1.548700e+02 -5.433002e+01\n0 1659     6.108400e+02 -1.376001e+01\n1 1659     8.364200e+02 -1.879900e+02\n6 1659     4.724500e+02 1.248300e+02\n7 1659     4.636100e+02 1.689200e+02\n12 1659     5.542900e+02 1.347500e+02\n13 1659     8.351200e+02 -2.103800e+02\n15 1659     8.240300e+02 2.016900e+02\n0 1660     -5.640002e+01 -1.245300e+02\n1 1660     7.233002e+01 -7.545001e+01\n2 1660     1.246100e+02 -1.335700e+02\n7 1660     -1.216700e+02 -2.340997e+01\n9 1660     3.260010e+00 -2.091998e+01\n10 1660     -1.453200e+02 -9.429993e+00\n15 1660     -9.346002e+01 -3.946997e+01\n0 1661     6.220601e+02 -9.549988e+00\n1 1661     8.492300e+02 -1.870700e+02\n6 1661     4.847300e+02 1.335300e+02\n7 1661     4.738400e+02 1.746000e+02\n10 1661     6.291400e+02 1.963800e+02\n13 1661     8.461500e+02 -2.049200e+02\n15 1661     8.391700e+02 2.087100e+02\n0 1662     -4.539978e+00 -8.406000e+01\n1 1662     1.330100e+02 -5.160999e+01\n2 1662     1.650200e+02 -7.367999e+01\n7 1662     -7.716998e+01 2.728003e+01\n9 1662     3.375000e+01 3.013000e+01\n0 1663     -4.210999e+01 -3.165997e+01\n1 1663     1.150300e+02 9.659973e+00\n7 1663     -1.247900e+02 7.196002e+01\n15 1663     -8.634998e+01 8.817999e+01\n0 1664     5.967000e+02 4.717999e+01\n1 1664     8.405200e+02 -1.194600e+02\n2 1664     5.239900e+02 2.231000e+01\n7 1664     4.409900e+02 2.241400e+02\n10 1664     5.952200e+02 2.591500e+02\n13 1664     8.126200e+02 -1.573300e+02\n15 1664     7.967500e+02 2.836000e+02\n0 1665     -1.341800e+02 -4.821100e+02\n1 1665     -1.013600e+02 -3.914000e+02\n6 1665     -2.926001e+01 -6.199500e+02\n7 1665     -1.398500e+02 -4.019200e+02\n0 1666     2.151001e+01 -9.000244e-01\n1 1666     1.812800e+02 2.188000e+01\n7 1666     -6.291998e+01 1.163100e+02\n10 1666     -6.791998e+01 1.425300e+02\n15 1666     -5.840027e+00 1.391500e+02\n0 1667     4.878003e+01 -9.489001e+01\n1 1667     1.789000e+02 -7.800000e+01\n2 1667     2.348900e+02 -6.201001e+01\n3 1667     1.464100e+02 -3.662300e+02\n6 1667     5.465002e+01 -7.284003e+01\n7 1667     -1.951001e+01 2.700000e+01\n9 1667     9.070001e+01 4.240002e+01\n15 1667     4.417999e+01 1.513000e+01\n0 1668     1.096200e+02 -1.075000e+02\n1 1668     2.337100e+02 -1.089700e+02\n7 1668     4.331000e+01 2.540997e+01\n10 1668     4.465002e+01 2.797998e+01\n15 1668     1.281500e+02 5.750000e+00\n0 1669     1.060300e+02 -1.135400e+02\n1 1669     2.285900e+02 -1.141800e+02\n7 1669     4.063000e+01 1.890002e+01\n15 1669     1.236600e+02 -2.450012e+00\n0 1670     1.008700e+02 -1.160400e+02\n1 1670     2.228900e+02 -1.146400e+02\n6 1670     1.186300e+02 -7.832001e+01\n7 1670     3.604999e+01 1.554999e+01\n8 1670     2.700100e+02 -1.070400e+02\n12 1670     1.318900e+02 -3.173999e+01\n15 1670     1.174500e+02 -6.739990e+00\n0 1671     -6.460022e+00 -1.241800e+02\n1 1671     1.157100e+02 -8.908002e+01\n7 1671     -6.841998e+01 -1.089001e+01\n10 1671     -8.753998e+01 -3.789978e+00\n15 1671     -2.726001e+01 -3.217999e+01\n0 1672     6.051300e+02 1.059003e+01\n1 1672     8.377600e+02 -1.607500e+02\n7 1672     4.544100e+02 1.904800e+02\n10 1672     6.081700e+02 2.175200e+02\n13 1672     8.254000e+02 -1.898000e+02\n15 1672     8.131700e+02 2.341900e+02\n0 1673     6.552800e+02 -7.784998e+01\n1 1673     8.628800e+02 -2.708100e+02\n2 1673     6.250699e+02 -7.629999e+01\n6 1673     5.443400e+02 7.058002e+01\n7 1673     5.159600e+02 1.151500e+02\n10 1673     6.741300e+02 1.198800e+02\n0 1674     6.475100e+02 -9.809998e+01\n1 1674     8.481700e+02 -2.893900e+02\n7 1674     5.110100e+02 9.422000e+01\n8 1674     5.679600e+02 -1.148100e+02\n10 1674     6.665400e+02 9.603003e+01\n0 1675     6.409200e+02 -6.972998e+01\n1 1675     8.500300e+02 -2.571100e+02\n2 1675     6.069800e+02 -7.534003e+01\n7 1675     5.007500e+02 1.205000e+02\n12 1675     6.039200e+02 8.446002e+01\n13 1675     8.739301e+02 -2.573000e+02\n15 1675     8.725699e+02 1.280700e+02\n0 1676     -9.584003e+01 -5.101500e+02\n1 1676     -7.628998e+01 -4.300400e+02\n4 1676     -6.597400e+02 -3.087200e+02\n6 1676     3.253998e+01 -6.311801e+02\n7 1676     -9.394000e+01 -4.204300e+02\n0 1677     5.796600e+02 -2.343100e+02\n1 1677     7.128500e+02 -4.028500e+02\n7 1677     4.808500e+02 -3.901001e+01\n15 1677     8.027700e+02 -1.070800e+02\n0 1678     6.253003e+01 4.162000e+01\n1 1678     2.330699e+02 5.163000e+01\n2 1678     1.991300e+02 8.290002e+01\n3 1678     1.048200e+02 -2.292100e+02\n6 1678     2.221997e+01 8.628998e+01\n7 1678     -2.873999e+01 1.659900e+02\n10 1678     -2.492999e+01 1.956500e+02\n12 1678     3.989001e+01 1.397100e+02\n13 1678     4.245200e+02 -1.802500e+02\n15 1678     4.417999e+01 2.027600e+02\n0 1679     -2.197500e+02 -4.192600e+02\n1 1679     -1.564900e+02 -3.062100e+02\n6 1679     -1.729000e+02 -5.934900e+02\n7 1679     -2.424600e+02 -3.587600e+02\n10 1679     -3.014500e+02 -3.670800e+02\n15 1679     -2.709800e+02 -4.600100e+02\n0 1680     -4.800000e+02 1.187200e+02\n1 1680     -2.010300e+02 2.618500e+02\n4 1680     -1.588000e+02 -5.770001e+01\n7 1680     -6.500300e+02 1.177500e+02\n10 1680     -6.752700e+02 2.326400e+02\n13 1680     -1.764700e+02 -1.816200e+02\n0 1681     1.543700e+02 -1.532400e+02\n1 1681     2.615300e+02 -1.678400e+02\n2 1681     3.706700e+02 -8.691998e+01\n7 1681     9.683002e+01 -1.091998e+01\n10 1681     1.010100e+02 -1.994000e+01\n13 1681     5.317100e+02 -3.413900e+02\n15 1681     1.942000e+02 -4.996002e+01\n0 1682     1.857000e+02 -2.067100e+02\n1 1682     2.764700e+02 -2.303600e+02\n7 1682     1.362100e+02 -5.820001e+01\n15 1682     2.442100e+02 -1.180800e+02\n0 1683     4.159100e+02 -3.787000e+01\n1 1683     5.855000e+02 -1.412400e+02\n6 1683     3.605900e+02 7.884998e+01\n7 1683     3.099100e+02 1.327500e+02\n10 1683     3.915500e+02 1.403200e+02\n12 1683     4.144301e+02 1.081400e+02\n13 1683     7.088101e+02 -2.312400e+02\n15 1683     5.449399e+02 1.416600e+02\n0 1684     3.675699e+02 -9.347998e+01\n1 1684     5.095699e+02 -1.798100e+02\n6 1684     3.523300e+02 1.359003e+01\n7 1684     2.804399e+02 7.457001e+01\n10 1684     3.409500e+02 7.100000e+01\n15 1684     4.828900e+02 5.912000e+01\n0 1685     3.574800e+02 -1.709900e+02\n1 1685     4.668400e+02 -2.531000e+02\n7 1685     2.894600e+02 2.530029e+00\n12 1685     4.234600e+02 -2.909998e+01\n15 1685     4.766801e+02 -4.798999e+01\n0 1686     3.235300e+02 -2.061000e+02\n1 1686     4.190699e+02 -2.764100e+02\n7 1686     2.650200e+02 -3.640997e+01\n15 1686     4.342500e+02 -1.000100e+02\n0 1687     1.393101e+02 -2.362000e+02\n1 1687     2.191600e+02 -2.438700e+02\n7 1687     9.840002e+01 -9.400000e+01\n10 1687     9.232001e+01 -1.170000e+02\n13 1687     5.343500e+02 -4.151300e+02\n0 1688     -1.934300e+02 -4.625100e+02\n1 1688     -1.481400e+02 -3.541600e+02\n6 1688     -1.125600e+02 -6.273199e+02\n7 1688     -2.054700e+02 -3.955700e+02\n9 1688     -1.060999e+01 -4.213600e+02\n0 1689     -1.654800e+02 -5.214700e+02\n1 1689     -1.445100e+02 -4.170400e+02\n6 1689     -3.909003e+01 -6.759301e+02\n7 1689     -1.616600e+02 -4.466100e+02\n0 1690     -1.744300e+02 -5.288300e+02\n1 1690     -1.550900e+02 -4.206500e+02\n4 1690     -6.564200e+02 -2.465300e+02\n6 1690     -4.453003e+01 -6.884399e+02\n7 1690     -1.690000e+02 -4.554200e+02\n9 1690     5.603998e+01 -4.582400e+02\n0 1691     2.295500e+02 1.402900e+02\n1 1691     4.407100e+02 9.854999e+01\n7 1691     1.094900e+02 2.821800e+02\n10 1691     1.586500e+02 3.283500e+02\n15 1691     2.630300e+02 3.614300e+02\n0 1692     5.569600e+02 6.853998e+01\n1 1692     8.060601e+02 -8.472998e+01\n6 1692     3.858100e+02 1.925200e+02\n7 1692     3.996500e+02 2.364000e+02\n10 1692     5.477000e+02 2.790500e+02\n0 1693     2.954100e+02 3.606000e+01\n1 1693     4.713700e+02 -2.540997e+01\n7 1693     1.939700e+02 1.924500e+02\n10 1693     2.452400e+02 2.131500e+02\n13 1693     6.132300e+02 -1.705700e+02\n15 1693     3.657200e+02 2.270100e+02\n0 1694     2.085601e+02 -2.008900e+02\n1 1694     3.016200e+02 -2.319900e+02\n7 1694     1.564500e+02 -4.890002e+01\n15 1694     2.749500e+02 -1.071700e+02\n0 1695     -7.651001e+01 -4.646997e+01\n1 1695     7.935999e+01 4.979980e+00\n7 1695     -1.590500e+02 5.113000e+01\n0 1696     -1.353700e+02 -3.563000e+01\n1 1696     3.260999e+01 3.104999e+01\n7 1696     -2.255200e+02 4.747998e+01\n10 1696     -2.468400e+02 8.596002e+01\n15 1696     -2.105800e+02 7.042999e+01\n0 1697     -4.571002e+01 -6.701001e+01\n1 1697     1.011000e+02 -2.377002e+01\n7 1697     -1.225100e+02 3.634998e+01\n15 1697     -8.626001e+01 3.987000e+01\n0 1698     -1.288000e+01 -1.082400e+02\n1 1698     1.159800e+02 -7.264001e+01\n7 1698     -7.941998e+01 3.140015e+00\n10 1698     -9.684003e+01 1.497998e+01\n13 1698     3.744100e+02 -3.168100e+02\n15 1698     -3.759998e+01 -1.139001e+01\n0 1699     -1.522998e+01 -1.660300e+02\n1 1699     9.647998e+01 -1.273400e+02\n7 1699     -7.056000e+01 -5.537000e+01\n10 1699     -9.346997e+01 -5.272998e+01\n15 1699     -3.301001e+01 -8.978998e+01\n0 1700     2.421801e+02 -2.172800e+02\n1 1700     3.294600e+02 -2.592000e+02\n7 1700     1.934200e+02 -5.785999e+01\n10 1700     2.089301e+02 -8.410999e+01\n15 1700     3.231100e+02 -1.252800e+02\n0 1701     3.548900e+02 -4.959003e+01\n1 1701     5.107200e+02 -1.312000e+02\n7 1701     2.605100e+02 1.155900e+02\n10 1701     3.223500e+02 1.206800e+02\n15 1701     4.598700e+02 1.178400e+02\n0 1702     3.692000e+02 -1.058200e+02\n1 1702     5.070300e+02 -1.927900e+02\n7 1702     2.849700e+02 6.378003e+01\n10 1702     3.432500e+02 5.735999e+01\n15 1702     4.870400e+02 4.226001e+01\n0 1703     2.662400e+02 -1.209300e+02\n1 1703     3.880500e+02 -1.723200e+02\n7 1703     1.955300e+02 3.720001e+01\n10 1703     2.264900e+02 2.891998e+01\n13 1703     6.167200e+02 -3.064300e+02\n15 1703     3.443600e+02 8.679993e+00\n0 1704     2.298400e+02 -1.207300e+02\n1 1704     3.501600e+02 -1.607600e+02\n2 1704     4.127200e+02 -5.263000e+01\n3 1704     3.104399e+02 -3.533500e+02\n7 1704     1.601801e+02 3.119000e+01\n10 1704     1.841000e+02 2.552002e+01\n13 1704     5.846000e+02 -3.089600e+02\n15 1704     2.938700e+02 3.989990e+00\n0 1705     6.677800e+02 -3.451700e+02\n1 1705     7.661400e+02 -5.502800e+02\n7 1705     5.847900e+02 -1.238500e+02\n12 1705     7.564100e+02 -1.734400e+02\n0 1706     3.346000e+02 -6.239001e+01\n1 1706     4.840900e+02 -1.378000e+02\n7 1706     2.454000e+02 1.007900e+02\n10 1706     2.992600e+02 1.033100e+02\n15 1706     4.329200e+02 9.723999e+01\n0 1707     3.980000e+02 -7.854999e+01\n1 1707     5.495300e+02 -1.756000e+02\n7 1707     3.039301e+02 9.270999e+01\n10 1707     3.745500e+02 9.176001e+01\n15 1707     5.243900e+02 8.345999e+01\n0 1708     3.710500e+02 -1.483000e+02\n1 1708     4.907500e+02 -2.348100e+02\n7 1708     2.968900e+02 2.576001e+01\n10 1708     3.498400e+02 8.989990e+00\n0 1709     3.394700e+02 -1.588900e+02\n1 1709     4.531600e+02 -2.348300e+02\n7 1709     2.699301e+02 1.092999e+01\n0 1710     3.394700e+02 -1.588900e+02\n1 1710     4.531600e+02 -2.348300e+02\n15 1710     4.507800e+02 -3.407001e+01\n0 1711     6.153003e+01 -1.299600e+02\n1 1711     1.797100e+02 -1.155800e+02\n7 1711     -9.997559e-02 -5.859985e+00\n15 1711     6.620001e+01 -3.020001e+01\n0 1712     3.124301e+02 -2.325300e+02\n1 1712     4.022300e+02 -2.986600e+02\n10 1712     2.910300e+02 -9.509998e+01\n15 1712     4.231400e+02 -1.370800e+02\n0 1713     1.760800e+02 -3.337800e+02\n1 1713     2.377600e+02 -3.529000e+02\n7 1713     1.406100e+02 -1.911500e+02\n0 1714     3.618300e+02 -1.139900e+02\n1 1714     4.951801e+02 -1.981800e+02\n7 1714     2.787500e+02 5.596997e+01\n10 1714     3.370800e+02 4.656000e+01\n15 1714     4.768500e+02 3.073999e+01\n0 1715     2.837000e+01 -2.092300e+02\n1 1715     1.206100e+02 -1.815000e+02\n7 1715     -1.560999e+01 -8.825000e+01\n0 1716     -7.509003e+01 -2.858700e+02\n1 1716     1.539001e+01 -2.257400e+02\n7 1716     -1.185700e+02 -1.939000e+02\n10 1716     -1.476700e+02 -1.974000e+02\n13 1716     3.162300e+02 -4.949600e+02\n15 1716     -9.337000e+01 -2.603200e+02\n0 1717     2.413900e+02 -2.636600e+02\n1 1717     3.161200e+02 -3.054400e+02\n7 1717     2.020100e+02 -1.018700e+02\n0 1718     -9.529999e+01 6.203998e+01\n1 1718     1.035300e+02 1.139300e+02\n7 1718     -2.072600e+02 1.476600e+02\n10 1718     -2.103000e+02 2.023500e+02\n13 1718     2.510900e+02 -1.880500e+02\n15 1718     -1.685600e+02 2.073000e+02\n0 1719     1.170700e+02 -2.646997e+01\n1 1719     2.632100e+02 -3.225000e+01\n3 1719     1.866700e+02 -2.766700e+02\n4 1719     -3.058200e+02 -5.067900e+02\n7 1719     3.501001e+01 1.050500e+02\n10 1719     4.438000e+01 1.222100e+02\n13 1719     4.822600e+02 -2.331600e+02\n15 1719     1.242000e+02 1.141700e+02\n0 1720     -4.510010e+00 4.708600e+02\n1 1720     3.647600e+02 4.805100e+02\n2 1720     -2.931300e+02 2.260500e+02\n3 1720     -4.245900e+02 -1.053200e+02\n6 1720     -4.786800e+02 4.819800e+02\n7 1720     -2.275400e+02 5.375500e+02\n8 1720     -1.618400e+02 1.710100e+02\n11 1720     1.443400e+02 -2.896100e+02\n12 1720     -3.041700e+02 4.735100e+02\n0 1721     -1.761000e+02 1.640800e+02\n1 1721     9.756000e+01 2.250600e+02\n7 1721     -3.416100e+02 2.113600e+02\n10 1721     -3.169000e+02 3.169500e+02\n0 1722     -1.067400e+02 5.801001e+01\n1 1722     9.201001e+01 1.120800e+02\n7 1722     -2.167900e+02 1.432200e+02\n10 1722     -2.234100e+02 1.980300e+02\n15 1722     -1.828100e+02 2.010800e+02\n0 1723     -1.427200e+02 -1.245700e+02\n1 1723     -8.789978e+00 -4.994000e+01\n6 1723     -1.600800e+02 -1.801300e+02\n7 1723     -2.098300e+02 -3.841998e+01\n10 1723     -2.454700e+02 -1.888000e+01\n12 1723     -1.595200e+02 -1.211600e+02\n15 1723     -2.102600e+02 -5.110999e+01\n0 1724     -1.551001e+01 1.079000e+02\n1 1724     1.840900e+02 1.369700e+02\n3 1724     -2.604999e+01 -2.138200e+02\n4 1724     -1.990800e+02 -3.971700e+02\n5 1724     5.920300e+02 -5.499500e+02\n7 1724     -1.248500e+02 2.140500e+02\n10 1724     -1.231900e+02 2.658000e+02\n13 1724     3.353500e+02 -1.345600e+02\n0 1725     -1.027800e+02 7.833002e+01\n1 1725     1.038000e+02 1.300300e+02\n5 1725     4.627600e+02 -5.922500e+02\n6 1725     -2.494100e+02 4.576001e+01\n7 1725     -2.187800e+02 1.627800e+02\n10 1725     -2.216000e+02 2.219000e+02\n13 1725     2.391200e+02 -1.724600e+02\n15 1725     -1.801700e+02 2.292200e+02\n0 1726     1.732001e+01 4.189900e+02\n1 1726     3.745601e+02 4.226200e+02\n7 1726     -1.995600e+02 4.864300e+02\n9 1726     -3.754300e+02 2.084800e+02\n12 1726     -2.713100e+02 4.155900e+02\n0 1727     1.157300e+02 6.115997e+01\n1 1727     2.909600e+02 5.540002e+01\n4 1727     -2.453500e+02 -5.064399e+02\n5 1727     7.735200e+02 -5.992300e+02\n7 1727     2.053998e+01 1.936100e+02\n15 1727     1.141500e+02 2.363400e+02\n0 1728     1.876001e+01 1.419100e+02\n1 1728     2.280100e+02 1.602500e+02\n4 1728     -1.811700e+02 -4.233400e+02\n5 1728     6.257100e+02 -5.113500e+02\n6 1728     -9.029999e+01 1.754800e+02\n7 1728     -9.634998e+01 2.529600e+02\n10 1728     -8.614001e+01 3.081700e+02\n12 1728     -5.840997e+01 2.280600e+02\n15 1728     -2.615002e+01 3.335600e+02\n0 1729     5.283002e+01 7.966000e+01\n1 1729     2.367200e+02 9.167001e+01\n7 1729     -4.703003e+01 2.008400e+02\n10 1729     -4.060999e+01 2.393900e+02\n15 1729     2.653003e+01 2.529900e+02\n0 1730     -3.187400e+02 -1.104900e+02\n1 1730     -1.347800e+02 7.270020e+00\n6 1730     -5.209400e+02 -3.020900e+02\n7 1730     -4.216800e+02 -7.742999e+01\n13 1730     2.662000e+01 -3.681300e+02\n15 1730     -4.415400e+02 -5.715997e+01\n0 1731     -3.734200e+02 3.379100e+02\n1 1731     -3.727002e+01 4.416700e+02\n7 1731     -5.801700e+02 3.570900e+02\n15 1731     -5.799000e+02 5.503400e+02\n0 1732     -3.764500e+02 4.379100e+02\n1 1732     -1.765002e+01 5.394700e+02\n7 1732     -5.977600e+02 4.631200e+02\n11 1732     -1.850500e+02 -3.209800e+02\n0 1733     1.770800e+02 5.228998e+01\n1 1733     3.495800e+02 2.838000e+01\n2 1733     3.049301e+02 1.150700e+02\n4 1733     -2.591800e+02 -5.543600e+02\n6 1733     1.392200e+02 1.320500e+02\n7 1733     8.210999e+01 1.943500e+02\n12 1733     1.653000e+02 1.811900e+02\n13 1733     5.205900e+02 -1.622700e+02\n15 1733     1.990300e+02 2.329100e+02\n0 1734     2.349700e+02 7.552002e+01\n1 1734     4.188900e+02 3.385999e+01\n7 1734     1.311500e+02 2.231800e+02\n15 1734     2.765500e+02 2.727700e+02\n0 1735     3.985999e+01 4.185999e+01\n1 1735     2.115300e+02 5.840997e+01\n6 1735     -5.770020e+00 7.929999e+01\n7 1735     -5.184003e+01 1.617700e+02\n10 1735     -5.113000e+01 1.938200e+02\n15 1735     1.357001e+01 1.993800e+02\n0 1736     2.404600e+02 4.520300e+02\n1 1736     6.225100e+02 3.979800e+02\n2 1736     -7.059998e+01 2.093000e+02\n5 1736     6.436400e+02 -1.954900e+02\n6 1736     -2.084400e+02 5.098100e+02\n7 1736     9.799988e+00 5.439500e+02\n9 1736     -2.093800e+02 2.532400e+02\n11 1736     3.699000e+02 -2.956500e+02\n12 1736     -4.254999e+01 4.864900e+02\n14 1736     5.495800e+02 -2.757300e+02\n0 1737     1.628900e+02 2.062000e+01\n1 1737     3.244500e+02 1.609985e+00\n10 1737     9.290002e+01 1.816700e+02\n12 1737     1.622900e+02 1.435100e+02\n15 1737     1.833000e+02 1.878000e+02\n0 1738     -1.010010e+00 -1.172500e+02\n1 1738     1.236900e+02 -8.445001e+01\n6 1738     1.042999e+01 -1.140900e+02\n7 1738     -6.477002e+01 -3.500000e+00\n10 1738     -8.210999e+01 4.919983e+00\n12 1738     1.529999e+01 -6.240002e+01\n13 1738     3.878101e+02 -3.234200e+02\n15 1738     -2.067999e+01 -2.202002e+01\n0 1739     3.579700e+02 4.841800e+02\n1 1739     7.640200e+02 4.010700e+02\n5 1739     7.632100e+02 -1.566700e+02\n6 1739     -9.153000e+01 5.744900e+02\n7 1739     1.157800e+02 5.881500e+02\n11 1739     4.754200e+02 -2.610500e+02\n12 1739     7.076001e+01 5.394500e+02\n0 1740     3.067999e+01 -2.038200e+02\n1 1740     1.250700e+02 -1.774000e+02\n6 1740     8.564001e+01 -1.962300e+02\n7 1740     -1.541998e+01 -8.246002e+01\n10 1740     -3.628003e+01 -9.132001e+01\n12 1740     8.554999e+01 -1.497000e+02\n15 1740     3.308002e+01 -1.346900e+02\n0 1741     1.310900e+02 5.681000e+02\n1 1741     5.335000e+02 5.481300e+02\n3 1741     -3.138300e+02 2.890015e+00\n11 1741     2.592000e+02 -2.000300e+02\n13 1741     2.915300e+02 2.349900e+02\n0 1742     -8.542999e+01 4.844300e+02\n1 1742     2.846300e+02 5.150300e+02\n7 1742     -3.088800e+02 5.432900e+02\n11 1742     7.146997e+01 -2.793600e+02\n0 1743     -1.042600e+02 4.815500e+02\n1 1743     2.646500e+02 5.165000e+02\n2 1743     -3.885000e+02 2.383700e+02\n7 1743     -3.271900e+02 5.381300e+02\n12 1743     -4.150500e+02 4.720900e+02\n0 1744     2.794000e+01 -4.606000e+01\n1 1744     1.731801e+02 -2.392999e+01\n2 1744     1.956700e+02 -1.526001e+01\n8 1744     1.892200e+02 -6.115002e+01\n10 1744     -5.625000e+01 9.121997e+01\n12 1744     2.725000e+01 2.765002e+01\n15 1744     8.979980e+00 7.828003e+01\n0 1745     2.000400e+02 2.596400e+02\n1 1745     5.080400e+02 2.142100e+02\n6 1745     -1.445200e+02 2.796500e+02\n7 1745     1.053998e+01 3.565700e+02\n15 1745     2.232000e+02 5.194900e+02\n0 1746     2.435601e+02 2.669000e+02\n1 1746     5.562200e+02 2.093800e+02\n6 1746     -9.944000e+01 3.002500e+02\n7 1746     5.153998e+01 3.697100e+02\n10 1746     1.631700e+02 4.814300e+02\n11 1746     3.839900e+02 -4.694500e+02\n0 1747     2.145200e+02 2.646400e+02\n1 1747     5.251200e+02 2.152400e+02\n7 1747     2.375000e+01 3.634300e+02\n15 1747     2.431500e+02 5.289100e+02\n0 1748     2.761400e+02 -2.479300e+02\n1 1748     3.587300e+02 -3.017400e+02\n7 1748     2.261899e+02 -8.559998e+01\n0 1749     3.198101e+02 -4.009998e+01\n1 1749     4.737800e+02 -1.102000e+02\n7 1749     2.281801e+02 1.209800e+02\n10 1749     2.805300e+02 1.278100e+02\n15 1749     4.092400e+02 1.256600e+02\n0 1750     -3.007400e+02 7.581000e+01\n1 1750     -5.181000e+01 1.753200e+02\n2 1750     -4.494900e+02 -1.849900e+02\n7 1750     -4.485200e+02 1.059900e+02\n10 1750     -4.533200e+02 1.999100e+02\n0 1751     -1.139900e+02 -1.052002e+01\n1 1751     5.781000e+01 4.935999e+01\n7 1751     -2.062000e+02 7.745001e+01\n10 1751     -2.245800e+02 1.170000e+02\n15 1751     -1.854100e+02 1.067800e+02\n0 1752     -4.464500e+02 -6.770020e+00\n1 1752     -2.146400e+02 1.378800e+02\n2 1752     -5.844800e+02 -2.929100e+02\n15 1752     -6.312000e+02 6.495001e+01\n0 1753     3.378199e+02 1.091900e+02\n1 1753     5.661000e+02 2.984003e+01\n10 1753     2.875500e+02 3.039800e+02\n15 1753     4.226100e+02 3.326400e+02\n0 1754     -4.046002e+01 -3.153500e+02\n1 1754     3.644000e+01 -2.652200e+02\n6 1754     1.020001e+01 -3.783600e+02\n10 1754     -1.060700e+02 -2.270700e+02\n12 1754     1.307001e+01 -3.317600e+02\n13 1754     3.580300e+02 -5.154399e+02\n0 1755     -3.053100e+02 1.050300e+02\n1 1755     -4.547998e+01 2.037200e+02\n4 1755     -1.847400e+02 -1.610500e+02\n0 1756     4.895200e+02 2.812700e+02\n1 1756     8.162700e+02 1.564000e+02\n10 1756     4.511000e+02 5.243900e+02\n0 1757     3.859700e+02 -7.710999e+01\n1 1757     5.366400e+02 -1.696900e+02\n10 1757     3.601600e+02 9.215002e+01\n15 1757     5.068900e+02 8.404999e+01\n0 1758     7.612000e+01 2.267400e+02\n1 1758     3.686500e+02 2.165900e+02\n5 1758     5.237600e+02 -4.443400e+02\n6 1758     -2.674500e+02 2.082300e+02\n14 1758     4.386500e+02 -5.257400e+02\n0 1759     2.820300e+02 -1.939200e+02\n1 1759     3.790800e+02 -2.500100e+02\n10 1759     2.520200e+02 -5.316998e+01\n15 1759     3.751801e+02 -8.867999e+01\n0 1760     3.343300e+02 -2.422500e+02\n1 1760     4.260100e+02 -3.185300e+02\n6 1760     3.807000e+02 -1.537500e+02\n10 1760     3.169600e+02 -1.026700e+02\n12 1760     4.143199e+02 -1.244600e+02\n15 1760     4.548199e+02 -1.478600e+02\n0 1761     2.406300e+02 1.175600e+02\n1 1761     4.415900e+02 7.345001e+01\n7 1761     1.263900e+02 2.651400e+02\n10 1761     1.734900e+02 3.029300e+02\n12 1761     1.995601e+02 2.576700e+02\n15 1761     2.795699e+02 3.322400e+02\n0 1762     7.394000e+01 -3.983700e+02\n1 1762     1.156700e+02 -3.810000e+02\n4 1762     -6.016300e+02 -4.578900e+02\n7 1762     5.496002e+01 -2.729600e+02\n9 1762     2.121899e+02 -2.405100e+02\n0 1763     2.672998e+01 -2.472900e+02\n1 1763     1.109700e+02 -2.187900e+02\n4 1763     -4.608300e+02 -4.285800e+02\n7 1763     -1.404999e+01 -1.285000e+02\n10 1763     -3.587000e+01 -1.417100e+02\n15 1763     3.434003e+01 -1.940300e+02\n0 1764     1.675300e+02 -3.207200e+02\n1 1764     2.304000e+02 -3.376300e+02\n4 1764     -5.559400e+02 -5.401200e+02\n10 1764     1.332700e+02 -2.106200e+02\n15 1764     2.365000e+02 -2.754500e+02\n0 1765     -2.937000e+02 3.555700e+02\n1 1765     4.450000e+01 4.388200e+02\n2 1765     -5.724000e+02 8.150000e+01\n5 1765     1.038400e+02 -3.039300e+02\n7 1765     -5.007600e+02 3.852700e+02\n8 1765     -3.895000e+02 5.242001e+01\n10 1765     -4.815700e+02 5.355500e+02\n12 1765     -6.083800e+02 2.894000e+02\n0 1766     -2.939100e+02 3.897700e+02\n1 1766     5.234998e+01 4.734600e+02\n2 1766     -5.743000e+02 1.256600e+02\n5 1766     1.068400e+02 -2.667700e+02\n7 1766     -5.060700e+02 4.212900e+02\n10 1766     -4.865000e+02 5.781800e+02\n11 1766     -1.154900e+02 -3.630800e+02\n13 1766     -4.364001e+01 6.178003e+01\n14 1766     2.365997e+01 -3.573900e+02\n0 1767     -4.234000e+02 3.188600e+02\n1 1767     -8.917999e+01 4.354400e+02\n0 1768     -8.675000e+01 -1.150800e+02\n1 1768     4.776001e+01 -5.803003e+01\n7 1768     -1.553000e+02 -1.941998e+01\n15 1768     -1.357600e+02 -3.083002e+01\n0 1769     -2.711200e+02 3.998500e+02\n1 1769     7.660999e+01 4.769900e+02\n5 1769     1.324000e+02 -2.565100e+02\n7 1769     -4.832200e+02 4.346400e+02\n10 1769     -4.599500e+02 5.917300e+02\n14 1769     4.837000e+01 -3.466600e+02\n0 1770     -1.506500e+02 3.184200e+02\n1 1770     1.780200e+02 3.656300e+02\n2 1770     -4.228800e+02 3.765997e+01\n7 1770     -3.512500e+02 3.629600e+02\n11 1770     1.487000e+01 -4.285500e+02\n13 1770     7.062000e+01 5.400024e+00\n14 1770     1.620601e+02 -4.347500e+02\n0 1771     4.118600e+02 3.293200e+02\n1 1771     7.635100e+02 2.250000e+02\n7 1771     1.970300e+02 4.492200e+02\n0 1772     9.364001e+01 1.733700e+02\n1 1772     3.185500e+02 1.700100e+02\n6 1772     -4.113000e+01 2.217000e+02\n7 1772     -3.335999e+01 2.918000e+02\n13 1772     4.079100e+02 -7.407001e+01\n14 1772     5.898000e+02 -5.570800e+02\n15 1772     7.315002e+01 3.875800e+02\n0 1773     -2.004500e+02 4.211700e+02\n1 1773     1.531400e+02 4.799100e+02\n5 1773     2.042100e+02 -2.341000e+02\n7 1773     -4.141600e+02 4.649900e+02\n11 1773     -2.990997e+01 -3.360500e+02\n0 1774     -2.172300e+02 -4.476100e+02\n1 1774     -1.645000e+02 -3.328000e+02\n6 1774     -1.500900e+02 -6.226400e+02\n7 1774     -2.333400e+02 -3.857000e+02\n9 1774     -4.319000e+01 -4.198700e+02\n10 1774     -2.961400e+02 -3.990100e+02\n15 1774     -2.649400e+02 -4.977700e+02\n0 1775     3.682200e+02 -5.900024e+00\n1 1775     5.436300e+02 -9.279999e+01\n7 1775     2.618000e+02 1.569300e+02\n15 1775     4.742900e+02 1.791700e+02\n0 1776     -3.338400e+02 -1.295600e+02\n1 1776     -1.558200e+02 -6.030029e+00\n7 1776     -4.337900e+02 -9.921997e+01\n13 1776     1.707001e+01 -3.861400e+02\n0 1777     -3.007800e+02 -4.712700e+02\n1 1777     -2.478700e+02 -3.270800e+02\n6 1777     -2.372200e+02 -6.886200e+02\n7 1777     -3.135800e+02 -4.267000e+02\n15 1777     -3.754800e+02 -5.418900e+02\n0 1778     -1.175600e+02 6.821002e+01\n1 1778     8.589001e+01 1.249200e+02\n5 1778     4.498199e+02 -6.040200e+02\n6 1778     -2.589700e+02 2.998999e+01\n7 1778     -2.308800e+02 1.507700e+02\n12 1778     -2.192300e+02 8.565997e+01\n15 1778     -1.989600e+02 2.133600e+02\n0 1779     4.696000e+02 2.831900e+02\n1 1779     7.961700e+02 1.636300e+02\n6 1779     1.755900e+02 3.923500e+02\n7 1779     2.715800e+02 4.218200e+02\n10 1779     4.271500e+02 5.245200e+02\n13 1779     6.357900e+02 2.703003e+01\n14 1779     8.791600e+02 -4.337300e+02\n0 1780     -1.632700e+02 1.368600e+02\n1 1780     1.000900e+02 1.957700e+02\n7 1780     -3.216000e+02 1.875400e+02\n10 1780     -2.983900e+02 2.859100e+02\n15 1780     -2.596800e+02 2.998600e+02\n0 1781     -7.470001e+01 -7.539978e+00\n1 1781     9.484003e+01 4.144000e+01\n6 1781     -1.440000e+02 -2.862000e+01\n7 1781     -1.657400e+02 8.804999e+01\n10 1781     -1.795300e+02 1.244500e+02\n15 1781     -1.329000e+02 1.163900e+02\n0 1782     -9.198999e+01 2.387200e+02\n1 1782     2.062000e+02 2.738600e+02\n4 1782     -1.294100e+02 -2.919200e+02\n7 1782     -2.735800e+02 2.951600e+02\n9 1782     -3.952100e+02 5.267999e+01\n10 1782     -2.258300e+02 4.140500e+02\n11 1782     6.517999e+01 -5.041400e+02\n0 1783     5.353000e+02 -4.153100e+02\n1 1783     5.886400e+02 -5.674000e+02\n7 1783     4.828800e+02 -2.100100e+02\n0 1784     5.679200e+02 -1.637300e+02\n1 1784     7.298101e+02 -3.268500e+02\n2 1784     5.999500e+02 -1.619200e+02\n6 1784     5.005500e+02 -4.283002e+01\n7 1784     4.538800e+02 2.307001e+01\n8 1784     5.445601e+02 -1.672700e+02\n12 1784     5.704301e+02 -2.714001e+01\n13 1784     8.330500e+02 -3.459200e+02\n0 1785     6.048600e+02 1.556000e+01\n1 1785     8.391801e+02 -1.557900e+02\n2 1785     5.423300e+02 -5.789978e+00\n6 1785     4.567200e+02 1.543900e+02\n7 1785     4.537200e+02 1.954100e+02\n10 1785     6.073800e+02 2.228400e+02\n13 1785     8.252500e+02 -1.846600e+02\n15 1785     8.124200e+02 2.410300e+02\n0 1786     -2.949600e+02 -4.225600e+02\n1 1786     -2.252800e+02 -2.852100e+02\n4 1786     -5.385700e+02 -1.580700e+02\n7 1786     -3.195200e+02 -3.781500e+02\n10 1786     -3.891400e+02 -3.799800e+02\n15 1786     -3.727700e+02 -4.751200e+02\n0 1787     2.579500e+02 2.537800e+02\n1 1787     5.661000e+02 1.921400e+02\n4 1787     -1.536100e+02 -5.348101e+02\n7 1787     6.928998e+01 3.593200e+02\n14 1787     6.309000e+02 -4.858400e+02\n0 1788     -3.112000e+01 7.253998e+01\n1 1788     1.577200e+02 1.069500e+02\n7 1788     -1.336900e+02 1.768400e+02\n15 1788     -8.559003e+01 2.312300e+02\n0 1789     -1.987300e+02 4.309000e+02\n1 1789     1.566300e+02 4.892500e+02\n2 1789     -4.780000e+02 1.768000e+02\n7 1789     -4.146500e+02 4.751000e+02\n8 1789     -3.128200e+02 1.299700e+02\n11 1789     -2.890997e+01 -3.269700e+02\n12 1789     -5.118900e+02 3.968300e+02\n0 1790     5.803600e+02 -3.591998e+01\n1 1790     7.974600e+02 -2.016700e+02\n7 1790     4.361700e+02 1.404500e+02\n13 1790     8.063199e+02 -2.359700e+02\n15 1790     7.843101e+02 1.660400e+02\n0 1791     -1.605800e+02 -5.223800e+02\n1 1791     -1.404000e+02 -4.194200e+02\n4 1791     -6.541700e+02 -2.585800e+02\n6 1791     -3.273999e+01 -6.749600e+02\n7 1791     -1.563300e+02 -4.461200e+02\n0 1792     -1.599700e+02 3.328200e+02\n1 1792     1.723500e+02 3.823500e+02\n2 1792     -4.332400e+02 5.552002e+01\n7 1792     -3.626900e+02 3.770100e+02\n8 1792     -2.753100e+02 3.454001e+01\n10 1792     -3.181500e+02 5.201600e+02\n11 1792     6.750000e+00 -4.157300e+02\n15 1792     -2.811500e+02 5.711300e+02\n0 1793     1.991700e+02 3.023500e+02\n1 1793     5.240601e+02 2.570000e+02\n6 1793     -1.740800e+02 3.264100e+02\n7 1793     -3.997803e-02 3.961800e+02\n12 1793     -3.138000e+01 3.283700e+02\n13 1793     3.768600e+02 1.546997e+01\n14 1793     5.470601e+02 -4.372600e+02\n15 1793     2.176899e+02 5.790700e+02\n0 1794     6.178900e+02 -2.750600e+02\n1 1794     7.380100e+02 -4.585601e+02\n7 1794     5.253300e+02 -6.948999e+01\n12 1794     6.747500e+02 -1.200400e+02\n15 1794     8.621899e+02 -1.581800e+02\n0 1795     -6.881000e+01 2.963000e+02\n1 1795     2.503300e+02 3.233800e+02\n7 1795     -2.640900e+02 3.532700e+02\n15 1795     -1.512000e+02 5.324500e+02\n0 1796     2.068600e+02 -3.262000e+01\n1 1796     3.528000e+02 -6.537000e+01\n7 1796     1.259000e+02 1.154600e+02\n10 1796     1.496200e+02 1.244800e+02\n13 1796     5.581000e+02 -2.331300e+02\n0 1797     -8.640997e+01 1.727400e+02\n1 1797     1.873800e+02 2.090500e+02\n7 1797     -2.518900e+02 2.335500e+02\n8 1797     -1.448700e+02 -6.462000e+01\n0 1798     6.169000e+01 2.409100e+02\n1 1798     3.594800e+02 2.343300e+02\n7 1798     -1.205700e+02 3.196100e+02\n10 1798     -4.708002e+01 4.304200e+02\n11 1798     2.095300e+02 -5.006100e+02\n14 1798     4.178101e+02 -5.111200e+02\n0 1799     -1.654800e+02 -5.214700e+02\n1 1799     -1.445100e+02 -4.170400e+02\n7 1799     -1.616600e+02 -4.466100e+02\n0 1800     7.228300e+02 -3.541600e+02\n1 1800     8.260200e+02 -5.831600e+02\n7 1800     6.350601e+02 -1.226200e+02\n12 1800     8.148500e+02 -1.665900e+02\n0 1801     2.001100e+02 -1.415002e+01\n1 1801     3.515400e+02 -4.440997e+01\n7 1801     1.165600e+02 1.330400e+02\n10 1801     1.398500e+02 1.450500e+02\n13 1801     5.504200e+02 -2.169400e+02\n15 1801     2.391000e+02 1.452400e+02\n0 1802     -4.340500e+02 3.349500e+02\n1 1802     -9.589001e+01 4.533700e+02\n7 1802     -6.434400e+02 3.453300e+02\n11 1802     -2.412300e+02 -4.111600e+02\n12 1802     -7.732600e+02 2.376700e+02\n15 1802     -6.645700e+02 5.381100e+02\n0 1803     5.315000e+02 2.037700e+02\n1 1803     8.220100e+02 6.527002e+01\n0 1804     5.852200e+02 3.553003e+01\n1 1804     8.248500e+02 -1.279500e+02\n10 1804     5.826700e+02 2.445300e+02\n13 1804     8.021600e+02 -1.694100e+02\n0 1805     4.965997e+01 9.989990e+00\n1 1805     2.105699e+02 2.438000e+01\n2 1805     1.992000e+02 4.953998e+01\n7 1805     -3.601001e+01 1.323200e+02\n10 1805     -3.691998e+01 1.576300e+02\n15 1805     3.077002e+01 1.576300e+02\n0 1806     -5.849976e+00 -1.989200e+02\n1 1806     9.229999e+01 -1.613500e+02\n7 1806     -5.308002e+01 -8.446002e+01\n10 1806     -7.884003e+01 -8.978003e+01\n15 1806     -1.632001e+01 -1.328400e+02\n0 1807     1.458000e+02 -4.640015e+00\n1 1807     2.995000e+02 -1.804999e+01\n2 1807     3.037400e+02 5.997998e+01\n7 1807     6.294000e+01 1.347900e+02\n10 1807     7.631000e+01 1.509200e+02\n15 1807     1.635300e+02 1.513000e+02\n0 1808     -4.192400e+02 2.982500e+02\n1 1808     -8.954999e+01 4.145900e+02\n7 1808     -6.215900e+02 3.090300e+02\n10 1808     -6.265100e+02 4.553800e+02\n11 1808     -2.292800e+02 -4.446100e+02\n12 1808     -7.497500e+02 1.930000e+02\n0 1809     -7.946800e+02 4.166998e+01\n1 1809     -4.998300e+02 2.688500e+02\n0 1810     -4.253800e+02 9.700000e+01\n1 1810     -1.589300e+02 2.279600e+02\n4 1810     -1.766600e+02 -8.925000e+01\n10 1810     -6.051500e+02 2.123400e+02\n0 1811     -4.875000e+02 1.690300e+02\n1 1811     -1.903100e+02 3.097900e+02\n7 1811     -6.696500e+02 1.661100e+02\n0 1812     -4.783500e+02 1.632000e+02\n1 1812     -1.840400e+02 3.024300e+02\n7 1812     -6.579100e+02 1.617000e+02\n0 1813     -3.877900e+02 3.610500e+02\n1 1813     -4.659003e+01 4.685100e+02\n7 1813     -5.977200e+02 3.797000e+02\n10 1813     -5.977300e+02 5.353100e+02\n11 1813     -1.983800e+02 -3.869100e+02\n0 1814     2.966000e+02 -7.200012e+00\n1 1814     4.582900e+02 -6.865997e+01\n6 1814     2.662400e+02 9.457001e+01\n7 1814     2.030900e+02 1.517300e+02\n10 1814     2.505900e+02 1.634800e+02\n12 1814     3.034900e+02 1.351700e+02\n13 1814     6.217400e+02 -2.065500e+02\n15 1814     3.724301e+02 1.679300e+02\n0 1815     -4.501500e+02 2.212300e+02\n1 1815     -1.384600e+02 3.492700e+02\n10 1815     -6.534000e+02 3.587200e+02\n0 1816     -4.937200e+02 4.044500e+02\n1 1816     -1.368700e+02 5.343600e+02\n10 1816     -7.376400e+02 5.807900e+02\n0 1817     -2.035700e+02 -4.645699e+02\n1 1817     -1.583000e+02 -3.527900e+02\n6 1817     -1.228700e+02 -6.343500e+02\n7 1817     -2.148600e+02 -3.993100e+02\n10 1817     -2.781600e+02 -4.173000e+02\n0 1818     1.174200e+02 2.546002e+01\n1 1818     2.815900e+02 1.920001e+01\n2 1818     2.661801e+02 8.201001e+01\n7 1818     3.060999e+01 1.589900e+02\n10 1818     4.092999e+01 1.825200e+02\n15 1818     1.211900e+02 1.876300e+02\n0 1819     -2.754800e+02 3.076600e+02\n1 1819     5.003998e+01 3.871400e+02\n10 1819     -4.522700e+02 4.776400e+02\n15 1819     -4.387900e+02 5.195600e+02\n0 1820     -4.485300e+02 3.194900e+02\n1 1820     -1.108600e+02 4.480500e+02\n11 1820     -2.526600e+02 -4.248500e+02\n0 1821     -2.954999e+01 4.789900e+02\n1 1821     3.409100e+02 4.952500e+02\n2 1821     -3.176800e+02 2.355100e+02\n6 1821     -5.087600e+02 4.878500e+02\n7 1821     -2.532600e+02 5.430800e+02\n14 1821     2.845500e+02 -2.585800e+02\n0 1822     1.679800e+02 4.954100e+02\n1 1822     5.541801e+02 4.623500e+02\n11 1822     2.986700e+02 -2.614200e+02\n0 1823     -2.526600e+02 3.320800e+02\n1 1823     7.984003e+01 4.045700e+02\n0 1824     -2.824400e+02 4.601600e+02\n1 1824     7.990002e+01 5.386500e+02\n7 1824     -5.038000e+02 4.967400e+02\n0 1825     -4.471500e+02 4.104100e+02\n1 1825     -9.147998e+01 5.290100e+02\n5 1825     -4.203998e+01 -2.420100e+02\n10 1825     -6.793000e+02 5.904000e+02\n12 1825     -8.011500e+02 3.337900e+02\n0 1826     -5.057001e+01 4.703300e+02\n1 1826     3.168600e+02 4.918600e+02\n4 1826     1.549988e+00 -3.280100e+02\n5 1826     3.551000e+02 -1.804000e+02\n6 1826     -5.293100e+02 4.745600e+02\n7 1826     -2.719100e+02 5.324700e+02\n11 1826     1.028500e+02 -2.907600e+02\n13 1826     1.515400e+02 1.425700e+02\n14 1826     2.657900e+02 -2.672000e+02\n0 1827     -1.947700e+02 4.287600e+02\n1 1827     1.602000e+02 4.861100e+02\n4 1827     -1.206000e+01 -2.402500e+02\n7 1827     -4.101500e+02 4.731200e+02\n8 1827     -3.091300e+02 1.266000e+02\n12 1827     -5.066300e+02 3.947200e+02\n0 1828     -4.213100e+02 9.700012e+00\n1 1828     -1.859000e+02 1.462100e+02\n2 1828     -5.605000e+02 -2.715100e+02\n13 1828     -9.632001e+01 -2.711400e+02\n15 1828     -5.972900e+02 9.072000e+01\n0 1829     -4.465800e+02 1.000800e+02\n1 1829     -1.773200e+02 2.361900e+02\n2 1829     -6.545300e+02 -2.002000e+02\n7 1829     -6.085200e+02 1.046000e+02\n13 1829     -1.408700e+02 -1.951500e+02\n0 1830     -2.543000e+02 -5.523800e+02\n1 1830     -2.354400e+02 -4.155500e+02\n4 1830     -6.572800e+02 -1.849400e+02\n6 1830     -1.219600e+02 -7.532600e+02\n7 1830     -2.445700e+02 -4.959600e+02\n9 1830     -1.150024e+00 -5.082600e+02\n0 1831     -2.669800e+02 -4.552100e+02\n1 1831     -2.118200e+02 -3.236100e+02\n4 1831     -5.711900e+02 -1.776200e+02\n6 1831     -2.055300e+02 -6.552500e+02\n7 1831     -2.822100e+02 -4.038700e+02\n9 1831     -8.638000e+01 -4.455400e+02\n0 1832     7.502002e+01 8.785001e+01\n1 1832     2.611899e+02 9.334000e+01\n2 1832     1.872400e+02 1.236000e+02\n5 1832     7.141899e+02 -5.687300e+02\n6 1832     1.297998e+01 1.387600e+02\n9 1832     4.184003e+01 1.949700e+02\n12 1832     3.603003e+01 1.917900e+02\n0 1833     -1.006100e+02 6.903998e+01\n1 1833     1.022300e+02 1.207400e+02\n3 1833     -1.492700e+02 -3.164500e+02\n5 1833     4.688800e+02 -6.022900e+02\n8 1833     -9.510010e+00 -3.644000e+01\n9 1833     -1.632700e+02 8.145999e+01\n10 1833     -2.177700e+02 2.112400e+02\n12 1833     -1.992400e+02 9.153003e+01\n15 1833     -1.761000e+02 2.167600e+02\n0 1834     2.330300e+02 -4.247998e+01\n1 1834     3.772700e+02 -8.321997e+01\n10 1834     1.803400e+02 1.157000e+02\n0 1835     -5.460999e+01 -1.149000e+02\n1 1835     7.628998e+01 -6.673999e+01\n0 1836     3.180100e+02 -2.449100e+02\n1 1836     4.061300e+02 -3.141000e+02\n10 1836     2.985000e+02 -1.078900e+02\n0 1837     2.206100e+02 2.391300e+02\n1 1837     5.213800e+02 1.881100e+02\n10 1837     1.396200e+02 4.460600e+02\n0 1838     -1.858800e+02 2.220700e+02\n1 1838     1.097700e+02 2.828500e+02\n0 1839     -1.957000e+02 2.128700e+02\n1 1839     9.690002e+01 2.765900e+02\n7 1839     -3.727400e+02 2.551000e+02\n10 1839     -3.460600e+02 3.727700e+02\n11 1839     -3.175000e+01 -5.286000e+02\n14 1839     1.411600e+02 -5.511801e+02\n15 1839     -3.137800e+02 3.995400e+02\n0 1840     2.526600e+02 1.384600e+02\n1 1840     4.638800e+02 9.045999e+01\n10 1840     1.858500e+02 3.285500e+02\n15 1840     2.951100e+02 3.619900e+02\n0 1841     1.479700e+02 6.995001e+01\n1 1841     3.261801e+02 5.450000e+01\n0 1842     2.110200e+02 5.103998e+01\n1 1842     3.847700e+02 1.684003e+01\n0 1843     2.110200e+02 5.103998e+01\n1 1843     3.847700e+02 1.684003e+01\n15 1843     2.463400e+02 2.360800e+02\n0 1844     3.641899e+02 -1.934003e+01\n1 1844     5.334800e+02 -1.045700e+02\n6 1844     3.124000e+02 8.835999e+01\n7 1844     2.615699e+02 1.443200e+02\n10 1844     3.297100e+02 1.568200e+02\n12 1844     3.612600e+02 1.219100e+02\n13 1844     6.667500e+02 -2.173600e+02\n15 1844     4.702900e+02 1.601100e+02\n0 1845     3.562000e+02 -3.010999e+01\n1 1845     5.204000e+02 -1.128400e+02\n7 1845     2.566200e+02 1.337300e+02\n10 1845     3.217000e+02 1.431900e+02\n15 1845     4.598800e+02 1.443700e+02\n0 1846     2.233400e+02 -2.628998e+01\n1 1846     3.721000e+02 -6.409998e+01\n7 1846     1.401600e+02 1.242000e+02\n15 1846     2.727500e+02 1.316300e+02\n0 1847     -1.235200e+02 -3.454999e+01\n1 1847     4.216998e+01 2.923999e+01\n10 1847     -2.332000e+02 8.796002e+01\n15 1847     -1.948500e+02 7.313000e+01\n0 1848     2.150100e+02 -7.503003e+01\n1 1848     3.487600e+02 -1.093900e+02\n6 1848     2.213500e+02 4.169983e+00\n7 1848     1.398900e+02 7.544000e+01\n8 1848     3.491100e+02 -5.148999e+01\n10 1848     1.632300e+02 7.675000e+01\n13 1848     5.691500e+02 -2.691500e+02\n15 1848     2.677300e+02 6.427002e+01\n0 1849     4.390002e+01 -1.347600e+02\n1 1849     1.604200e+02 -1.148800e+02\n7 1849     -1.554999e+01 -1.201001e+01\n15 1849     4.201001e+01 -3.953003e+01\n0 1850     1.414500e+02 -2.445200e+02\n1 1850     2.191500e+02 -2.525200e+02\n15 1850     1.884900e+02 -1.754300e+02\n0 1851     6.723400e+02 -2.669600e+02\n1 1851     8.044000e+02 -4.722300e+02\n0 1852     -1.308300e+02 2.355100e+02\n1 1852     1.674900e+02 2.811100e+02\n0 1853     3.295000e+02 2.076200e+02\n1 1853     6.230400e+02 1.252500e+02\n7 1853     1.469200e+02 3.265600e+02\n10 1853     2.690400e+02 4.194700e+02\n0 1854     -1.865500e+02 2.295200e+02\n1 1854     1.113800e+02 2.900400e+02\n7 1854     -3.676400e+02 2.722900e+02\n10 1854     -3.379800e+02 3.935800e+02\n13 1854     6.100000e+01 -7.141998e+01\n14 1854     1.471100e+02 -5.327900e+02\n0 1855     3.103300e+02 2.029400e+02\n1 1855     6.009200e+02 1.263500e+02\n7 1855     1.301500e+02 3.196300e+02\n0 1856     2.854100e+02 1.972100e+02\n1 1856     5.725900e+02 1.277100e+02\n10 1856     2.189399e+02 4.028400e+02\n0 1857     2.850800e+02 1.905900e+02\n1 1857     5.696600e+02 1.210400e+02\n0 1858     1.025600e+02 1.854000e+02\n1 1858     3.310500e+02 1.789900e+02\n0 1859     2.640100e+02 1.086300e+02\n1 1859     4.637500e+02 5.716998e+01\n7 1859     1.501100e+02 2.575200e+02\n0 1860     -4.733700e+02 9.832999e+01\n1 1860     -2.022800e+02 2.412600e+02\n0 1861     4.049700e+02 3.398999e+01\n1 1861     6.054399e+02 -6.608002e+01\n6 1861     3.028200e+02 1.425500e+02\n7 1861     2.817400e+02 1.954000e+02\n10 1861     3.726000e+02 2.233400e+02\n12 1861     3.651899e+02 1.704900e+02\n0 1862     -1.105400e+02 5.733002e+01\n1 1862     8.827002e+01 1.125000e+02\n7 1862     -2.208400e+02 1.416500e+02\n10 1862     -2.283200e+02 1.965400e+02\n15 1862     -1.881700e+02 1.995300e+02\n0 1863     2.103600e+02 -9.940997e+01\n1 1863     3.375400e+02 -1.327600e+02\n2 1863     3.894000e+02 -3.251001e+01\n6 1863     2.236900e+02 -2.584998e+01\n8 1863     3.504600e+02 -7.570001e+01\n13 1863     5.672700e+02 -2.916100e+02\n0 1864     1.805900e+02 -1.428900e+02\n1 1864     2.919500e+02 -1.659600e+02\n12 1864     2.322600e+02 -3.773999e+01\n13 1864     5.508400e+02 -3.307500e+02\n15 1864     2.288800e+02 -3.275000e+01\n0 1865     3.152800e+02 -2.396500e+02\n1 1865     4.038700e+02 -3.076200e+02\n7 1865     2.593199e+02 -7.214001e+01\n10 1865     2.946899e+02 -1.017700e+02\n15 1865     4.282400e+02 -1.466700e+02\n0 1866     -2.093800e+02 -4.262000e+02\n1 1866     -1.495900e+02 -3.157500e+02\n0 1867     -4.377100e+02 -5.234200e+02\n1 1867     -3.863700e+02 -3.305000e+02\n0 1868     1.171400e+02 1.835300e+02\n1 1868     3.457900e+02 1.729500e+02\n15 1868     1.043200e+02 4.048100e+02\n0 1869     2.932400e+02 6.726001e+01\n1 1869     4.805200e+02 7.090027e+00\n7 1869     1.851700e+02 2.218700e+02\n10 1869     2.396200e+02 2.495200e+02\n12 1869     2.725300e+02 2.115700e+02\n13 1869     6.046100e+02 -1.451600e+02\n15 1869     3.592300e+02 2.693700e+02\n0 1870     3.073900e+02 -1.112500e+02\n1 1870     4.351300e+02 -1.765700e+02\n15 1870     4.001500e+02 2.717999e+01\n0 1871     7.294000e+01 -1.191300e+02\n1 1871     1.946400e+02 -1.088200e+02\n7 1871     8.090027e+00 7.359985e+00\n15 1871     7.945001e+01 -1.460999e+01\n0 1872     2.686600e+02 -1.879800e+02\n1 1872     3.679800e+02 -2.395900e+02\n7 1872     2.106100e+02 -2.731000e+01\n10 1872     2.363800e+02 -4.791998e+01\n15 1872     3.561200e+02 -8.241998e+01\n0 1873     1.251100e+02 -2.094000e+02\n1 1873     2.151600e+02 -2.130900e+02\n0 1874     5.106899e+02 -3.267400e+02\n1 1874     5.982600e+02 -4.701200e+02\n0 1875     -2.646000e+02 -4.134500e+02\n1 1875     -1.945100e+02 -2.869500e+02\n0 1876     2.461000e+02 1.341500e+02\n1 1876     4.542000e+02 8.807001e+01\n7 1876     1.280800e+02 2.794800e+02\n10 1876     1.790800e+02 3.226400e+02\n15 1876     2.867800e+02 3.552300e+02\n0 1877     -1.464300e+02 6.528003e+01\n1 1877     6.200000e+01 1.288700e+02\n10 1877     -2.708500e+02 2.024200e+02\n15 1877     -2.359600e+02 2.051300e+02\n0 1878     2.659600e+02 4.088000e+01\n1 1878     4.399700e+02 -1.092999e+01\n7 1878     1.666400e+02 1.935300e+02\n10 1878     2.112200e+02 2.169100e+02\n15 1878     3.237000e+02 2.296800e+02\n0 1879     2.086300e+02 -1.337300e+02\n1 1879     3.244000e+02 -1.661600e+02\n7 1879     1.439500e+02 1.606000e+01\n10 1879     1.616500e+02 8.059998e+00\n13 1879     5.721500e+02 -3.216000e+02\n15 1879     2.666899e+02 -1.656000e+01\n0 1880     1.519301e+02 -1.443800e+02\n1 1880     2.625601e+02 -1.580400e+02\n4 1880     -4.027000e+02 -5.359200e+02\n7 1880     9.277002e+01 -2.469971e+00\n10 1880     9.806000e+01 -9.760010e+00\n13 1880     5.269700e+02 -3.340000e+02\n15 1880     1.903700e+02 -3.802002e+01\n0 1881     -1.293100e+02 -5.150000e+02\n1 1881     -1.091700e+02 -4.231100e+02\n7 1881     -1.263000e+02 -4.322400e+02\n0 1882     -2.706900e+02 3.847998e+01\n1 1882     -3.726001e+01 1.325700e+02\n0 1883     6.602600e+02 -3.143400e+02\n1 1883     7.701899e+02 -5.157000e+02\n7 1883     5.712200e+02 -9.676001e+01\n0 1884     -2.513900e+02 -4.256800e+02\n1 1884     -1.870700e+02 -3.017700e+02\n6 1884     -2.067500e+02 -6.152300e+02\n7 1884     -2.731000e+02 -3.718800e+02\n0 1885     3.218300e+02 5.463000e+01\n1 1885     5.091200e+02 -1.579999e+01\n0 1886     -2.702900e+02 2.750000e+01\n1 1886     -4.103003e+01 1.219500e+02\n0 1887     -2.102500e+02 -5.485500e+02\n1 1887     -1.948700e+02 -4.274400e+02\n4 1887     -6.646500e+02 -2.189000e+02\n6 1887     -7.339001e+01 -7.252200e+02\n7 1887     -1.996600e+02 -4.801300e+02\n9 1887     3.684998e+01 -4.843000e+02\n0 1888     3.997900e+02 -2.261700e+02\n1 1888     5.110800e+02 -3.252900e+02\n7 1888     3.237900e+02 -5.390997e+01\n0 1889     -1.127800e+02 -5.129200e+02\n1 1889     -9.290997e+01 -4.268200e+02\n0 1890     3.732400e+02 -2.179800e+02\n1 1890     4.803300e+02 -3.082600e+02\n10 1890     3.592500e+02 -7.117999e+01\n15 1890     5.078800e+02 -1.103400e+02\n0 1891     -3.827300e+02 -5.270400e+02\n1 1891     -3.398300e+02 -3.512200e+02\n0 1892     2.010000e+02 -2.765002e+01\n1 1892     3.481600e+02 -5.803998e+01\n2 1892     3.598300e+02 4.445001e+01\n7 1892     1.194200e+02 1.201200e+02\n10 1892     1.422900e+02 1.297200e+02\n15 1892     2.422300e+02 1.269800e+02\n0 1893     -4.076100e+02 7.799988e+00\n1 1893     -1.747100e+02 1.407400e+02\n15 1893     -5.789600e+02 8.976999e+01\n0 1894     -4.044900e+02 -1.035800e+02\n1 1894     -2.104900e+02 3.791998e+01\n0 1895     6.220500e+02 9.304999e+01\n1 1895     8.819399e+02 -7.894000e+01\n2 1895     5.401700e+02 8.334003e+01\n6 1895     4.574301e+02 2.475700e+02\n7 1895     4.603199e+02 2.736800e+02\n8 1895     5.024100e+02 3.895001e+01\n10 1895     6.211700e+02 3.154200e+02\n12 1895     5.403300e+02 2.571500e+02\n15 1895     8.271300e+02 3.519900e+02\n0 1896     4.241600e+02 -2.546997e+01\n1 1896     5.999500e+02 -1.316800e+02\n6 1896     3.597800e+02 9.282001e+01\n7 1896     3.145500e+02 1.447300e+02\n10 1896     4.001801e+02 1.566400e+02\n12 1896     4.160400e+02 1.209100e+02\n15 1896     5.556801e+02 1.599000e+02\n0 1897     1.297200e+02 -1.958900e+02\n1 1897     2.251801e+02 -2.013800e+02\n0 1898     3.291000e+02 2.031800e+02\n1 1898     6.211400e+02 1.208300e+02\n7 1898     1.475300e+02 3.226200e+02\n10 1898     2.691100e+02 4.144300e+02\n0 1899     3.536000e+02 -2.568400e+02\n1 1899     4.478500e+02 -3.406400e+02\n15 1899     4.855100e+02 -1.655400e+02\n0 1900     5.477200e+02 -3.788100e+02\n1 1900     6.170100e+02 -5.357900e+02\n0 1901     3.146801e+02 -2.196600e+02\n1 1901     4.069200e+02 -2.869700e+02\n7 1901     2.581200e+02 -5.154999e+01\n10 1901     2.920601e+02 -7.927002e+01\n0 1902     -1.816900e+02 -1.494100e+02\n1 1902     -3.396002e+01 -6.467999e+01\n15 1902     -2.543600e+02 -9.094000e+01\n0 1903     -4.022400e+02 -1.505800e+02\n1 1903     -2.249900e+02 -6.030029e+00\n0 1904     -1.393000e+02 -1.204800e+02\n1 1904     -4.109985e+00 -4.704999e+01\n6 1904     -1.581800e+02 -1.750900e+02\n7 1904     -2.074400e+02 -3.412000e+01\n10 1904     -2.416800e+02 -1.363000e+01\n15 1904     -2.059800e+02 -4.526001e+01\n0 1905     -6.913000e+01 -1.710200e+02\n1 1905     4.258002e+01 -1.155700e+02\n4 1905     -3.836000e+02 -3.564000e+02\n10 1905     -1.552600e+02 -6.446002e+01\n13 1905     3.349301e+02 -3.767200e+02\n15 1905     -1.056900e+02 -1.038000e+02\n0 1906     1.938199e+02 -8.215997e+01\n1 1906     3.247300e+02 -1.095400e+02\n2 1906     3.722700e+02 -1.404999e+01\n6 1906     2.044400e+02 -1.046002e+01\n8 1906     3.361000e+02 -6.013000e+01\n0 1907     2.001801e+02 4.268500e+02\n1 1907     5.714000e+02 3.822900e+02\n7 1907     -2.516998e+01 5.142200e+02\n11 1907     3.348500e+02 -3.203500e+02\n14 1907     5.112200e+02 -3.047100e+02\n0 1908     -4.263300e+02 8.130005e+00\n1 1908     -1.908900e+02 1.459700e+02\n15 1908     -6.036300e+02 8.834000e+01\n0 1909     1.462200e+02 -2.198500e+02\n1 1909     2.319399e+02 -2.298300e+02\n7 1909     1.018500e+02 -7.750000e+01\n10 1909     9.881000e+01 -9.783002e+01\n15 1909     1.919301e+02 -1.415700e+02\n0 1910     1.658002e+01 -2.784000e+02\n1 1910     9.626001e+01 -2.463500e+02\n4 1910     -4.836600e+02 -4.140800e+02\n10 1910     -4.428003e+01 -1.780600e+02\n12 1910     7.772998e+01 -2.556300e+02\n13 1910     4.144301e+02 -4.715500e+02\n0 1911     3.164001e+01 -2.663400e+02\n1 1911     1.122400e+02 -2.391200e+02\n6 1911     9.352002e+01 -2.787900e+02\n10 1911     -2.854999e+01 -1.633000e+02\n12 1911     9.590002e+01 -2.357700e+02\n15 1911     4.414001e+01 -2.194000e+02\n0 1912     2.382200e+02 -2.335400e+02\n1 1912     3.179500e+02 -2.743900e+02\n7 1912     1.936100e+02 -7.446997e+01\n8 1912     4.257300e+02 -1.701100e+02\n10 1912     2.057200e+02 -1.031100e+02\n15 1912     3.189500e+02 -1.479700e+02\n0 1913     -6.991998e+01 -5.719200e+02\n1 1913     -7.542999e+01 -4.955300e+02\n4 1913     -7.248700e+02 -3.299200e+02\n9 1913     1.787500e+02 -4.463000e+02\n10 1913     -1.120000e+02 -5.250100e+02\n0 1914     -7.866998e+01 -5.549399e+02\n1 1914     -7.695001e+01 -4.769200e+02\n7 1914     -6.609998e+01 -4.602900e+02\n0 1915     3.294000e+01 5.569000e+02\n1 1915     4.262800e+02 5.594000e+02\n2 1915     -2.654900e+02 3.236100e+02\n3 1915     -3.962600e+02 -8.880005e+00\n5 1915     4.383400e+02 -8.956000e+01\n8 1915     -1.391500e+02 2.493500e+02\n9 1915     -3.804000e+02 3.476300e+02\n12 1915     -2.790900e+02 5.798600e+02\n13 1915     2.155100e+02 2.195900e+02\n14 1915     3.451300e+02 -1.767500e+02\n0 1916     -5.910600e+02 1.203003e+01\n1 1916     -3.359600e+02 1.927800e+02\n7 1916     -7.433600e+02 -7.739990e+00\n0 1917     6.853003e+01 1.655100e+02\n1 1917     2.886700e+02 1.695500e+02\n10 1917     -3.090997e+01 3.413200e+02\n14 1917     5.690500e+02 -5.667500e+02\n0 1918     1.006700e+02 2.164001e+01\n1 1918     2.629700e+02 2.100000e+01\n15 1918     9.839001e+01 1.805500e+02\n0 1919     1.262700e+02 -6.010999e+01\n1 1919     2.628700e+02 -6.716998e+01\n2 1919     3.055000e+02 -2.600098e-01\n3 1919     2.097800e+02 -3.056100e+02\n4 1919     -3.330000e+02 -5.144100e+02\n6 1919     1.314700e+02 -5.140015e+00\n7 1919     5.287000e+01 7.604999e+01\n15 1919     1.438700e+02 7.256000e+01\n0 1920     1.340500e+02 -7.435999e+01\n1 1920     2.668800e+02 -8.370001e+01\n2 1920     3.178500e+02 -1.389001e+01\n7 1920     6.253998e+01 6.321002e+01\n8 1920     2.895400e+02 -6.089001e+01\n10 1920     6.945001e+01 6.889001e+01\n13 1920     5.021500e+02 -2.740000e+02\n15 1920     1.565200e+02 5.442999e+01\n0 1921     1.374300e+02 -4.444000e+01\n1 1921     2.787600e+02 -5.489001e+01\n2 1921     3.111600e+02 1.890997e+01\n3 1921     2.135601e+02 -2.875100e+02\n8 1921     2.849400e+02 -3.414999e+01\n10 1921     7.014001e+01 1.035600e+02\n15 1921     1.570900e+02 9.557999e+01\n0 1922     -4.289001e+01 5.042400e+02\n1 1922     3.336200e+02 5.244500e+02\n6 1922     -5.287400e+02 5.182900e+02\n0 1923     5.637400e+02 2.830300e+02\n1 1923     8.812100e+02 1.411700e+02\n6 1923     3.363600e+02 4.382000e+02\n9 1923     2.223800e+02 3.025200e+02\n12 1923     4.247000e+02 4.446700e+02\n0 1924     2.305601e+02 8.440002e+00\n1 1924     3.906500e+02 -3.144000e+01\n6 1924     2.082500e+02 9.839001e+01\n7 1924     1.406200e+02 1.590300e+02\n8 1924     3.372800e+02 1.776001e+01\n10 1924     1.725800e+02 1.747300e+02\n15 1924     2.782800e+02 1.802900e+02\n0 1925     8.735999e+01 3.816998e+01\n1 1925     2.556100e+02 4.103998e+01\n2 1925     2.272500e+02 8.688000e+01\n6 1925     5.215997e+01 9.067999e+01\n7 1925     -3.020020e+00 1.667600e+02\n8 1925     2.180900e+02 2.401999e+01\n10 1925     4.169983e+00 1.943700e+02\n12 1925     7.053003e+01 1.435300e+02\n15 1925     7.839001e+01 2.011900e+02\n0 1926     -1.073200e+02 7.290997e+01\n1 1926     9.760999e+01 1.262600e+02\n2 1926     -7.101001e+01 1.070007e+00\n3 1926     -1.610700e+02 -3.162000e+02\n5 1926     4.592200e+02 -5.986300e+02\n6 1926     -2.514200e+02 3.815002e+01\n7 1926     -2.223800e+02 1.565400e+02\n8 1926     -1.859998e+01 -3.617999e+01\n12 1926     -2.107000e+02 9.321997e+01\n13 1926     2.365000e+02 -1.773700e+02\n15 1926     -1.856400e+02 2.211700e+02\n0 1927     3.597800e+02 4.663700e+02\n1 1927     7.608500e+02 3.816900e+02\n2 1927     2.984998e+01 2.295600e+02\n5 1927     7.661500e+02 -1.757100e+02\n6 1927     -8.632001e+01 5.533400e+02\n7 1927     1.199000e+02 5.713200e+02\n9 1927     -1.254800e+02 2.731000e+02\n11 1927     4.798101e+02 -2.761200e+02\n0 1928     2.325500e+02 4.897800e+02\n1 1928     6.245000e+02 4.399500e+02\n2 1928     -8.213000e+01 2.500800e+02\n4 1928     -6.570007e+00 -5.082600e+02\n5 1928     6.346100e+02 -1.552900e+02\n6 1928     -2.243700e+02 5.551900e+02\n7 1928     -2.270020e+00 5.814000e+02\n8 1928     1.260999e+01 1.942100e+02\n9 1928     -2.207200e+02 2.892800e+02\n12 1928     -5.803998e+01 5.281500e+02\n13 1928     3.738900e+02 1.746400e+02\n14 1928     5.396100e+02 -2.365300e+02\n0 1929     1.684100e+02 5.742400e+02\n1 1929     5.770900e+02 5.447600e+02\n6 1929     -3.080900e+02 6.498100e+02\n12 1929     -1.396400e+02 6.172300e+02\n0 1930     -4.396002e+01 -5.401001e+01\n1 1930     1.069800e+02 -1.195001e+01\n2 1930     1.043100e+02 -6.290997e+01\n6 1930     -7.883002e+01 -6.617999e+01\n7 1930     -1.232600e+02 4.904999e+01\n8 1930     1.133100e+02 -9.584998e+01\n10 1930     -1.382900e+02 7.444000e+01\n12 1930     -6.563000e+01 -1.134998e+01\n13 1930     3.330000e+02 -2.753100e+02\n0 1931     4.921997e+01 -2.108002e+01\n1 1931     2.001500e+02 -5.809998e+00\n2 1931     2.111400e+02 1.864001e+01\n6 1931     3.228998e+01 1.264001e+01\n7 1931     -3.108002e+01 1.012600e+02\n10 1931     -3.447998e+01 1.220500e+02\n13 1931     4.210100e+02 -2.353700e+02\n15 1931     3.421002e+01 1.150300e+02\n0 1932     1.224100e+02 1.704999e+01\n1 1932     2.830100e+02 1.026001e+01\n2 1932     2.723199e+02 7.584003e+01\n6 1932     9.975000e+01 7.846002e+01\n7 1932     3.573999e+01 1.519100e+02\n10 1932     4.654999e+01 1.734000e+02\n12 1932     1.187000e+02 1.298900e+02\n15 1932     1.284700e+02 1.772400e+02\n0 1933     7.789001e+01 -2.520020e+00\n1 1933     2.334600e+02 4.349976e+00\n2 1933     2.353800e+02 4.648999e+01\n4 1933     -2.844900e+02 -4.752400e+02\n7 1933     -5.109985e+00 1.255400e+02\n9 1933     8.627002e+01 1.323700e+02\n10 1933     -2.760010e+00 1.465200e+02\n15 1933     7.053003e+01 1.444800e+02\n0 1934     -2.952300e+02 4.042100e+02\n1 1934     5.358002e+01 4.866000e+02\n8 1934     -3.941300e+02 1.017700e+02\n10 1934     -4.914800e+02 5.946500e+02\n11 1934     -1.164900e+02 -3.513300e+02\n12 1934     -6.217200e+02 3.526200e+02\n0 1935     -3.005700e+02 4.162900e+02\n1 1935     5.121002e+01 5.001600e+02\n7 1935     -5.155600e+02 4.479700e+02\n11 1935     -1.201200e+02 -3.401900e+02\n0 1936     3.069800e+02 -2.520001e+01\n1 1936     4.638500e+02 -9.040002e+01\n7 1936     2.151300e+02 1.347400e+02\n10 1936     2.642600e+02 1.441100e+02\n0 1937     2.810300e+02 5.156000e+01\n1 1937     4.608000e+02 -5.049988e+00\n7 1937     1.780800e+02 2.059000e+02\n10 1937     2.270400e+02 2.303300e+02\n13 1937     5.996700e+02 -1.579800e+02\n15 1937     3.437800e+02 2.461500e+02\n0 1938     3.213600e+02 -4.200012e+00\n1 1938     4.870500e+02 -7.415002e+01\n7 1938     2.238101e+02 1.564800e+02\n10 1938     2.787300e+02 1.694200e+02\n0 1939     3.474700e+02 -1.477400e+02\n1 1939     4.661500e+02 -2.267300e+02\n12 1939     4.014700e+02 -9.539978e+00\n0 1940     2.461100e+02 -3.064400e+02\n1 1940     3.152700e+02 -3.506700e+02\n7 1940     2.029000e+02 -1.518800e+02\n10 1940     2.219200e+02 -1.855700e+02\n15 1940     3.425500e+02 -2.464300e+02\n0 1941     3.163800e+02 4.352002e+01\n1 1941     4.978700e+02 -2.416998e+01\n7 1941     2.101400e+02 2.017000e+02\n10 1941     2.687900e+02 2.249100e+02\n15 1941     3.945900e+02 2.404700e+02\n0 1942     3.032900e+02 4.732001e+01\n1 1942     4.837700e+02 -1.714001e+01\n7 1942     1.980800e+02 2.040800e+02\n10 1942     2.530300e+02 2.272100e+02\n15 1942     3.751400e+02 2.441500e+02\n0 1943     3.105200e+02 6.516998e+01\n1 1943     5.000100e+02 -9.000244e-01\n7 1943     2.007600e+02 2.217300e+02\n15 1943     3.840400e+02 2.691400e+02\n0 1944     3.005100e+02 -2.069200e+02\n1 1944     3.936400e+02 -2.691200e+02\n7 1944     2.452400e+02 -3.941998e+01\n10 1944     2.740400e+02 -6.637000e+01\n0 1945     2.571700e+02 5.645001e+01\n1 1945     4.365100e+02 7.440002e+00\n7 1945     1.550900e+02 2.078400e+02\n13 1945     5.808900e+02 -1.549400e+02\n15 1945     3.091100e+02 2.497200e+02\n0 1946     1.838500e+02 5.806000e+01\n1 1946     3.585601e+02 3.223999e+01\n10 1946     1.137500e+02 2.274900e+02\n12 1946     1.706100e+02 1.880500e+02\n13 1946     5.250400e+02 -1.575000e+02\n15 1946     2.078600e+02 2.417700e+02\n0 1947     1.721200e+02 1.646997e+01\n1 1947     3.324700e+02 -5.479980e+00\n7 1947     8.408002e+01 1.591000e+02\n0 1948     -1.948500e+02 3.886600e+02\n1 1948     1.505800e+02 4.469300e+02\n2 1948     -4.720400e+02 1.247900e+02\n7 1948     -4.049500e+02 4.314400e+02\n8 1948     -3.071900e+02 8.839999e+01\n10 1948     -3.668900e+02 5.850100e+02\n12 1948     -4.999600e+02 3.455300e+02\n14 1948     1.212900e+02 -3.580500e+02\n0 1949     1.078900e+02 3.953400e+02\n1 1949     4.641801e+02 3.746000e+02\n7 1949     -1.090100e+02 4.722000e+02\n9 1949     -3.004900e+02 1.897300e+02\n10 1949     -7.840027e+00 6.216200e+02\n14 1949     4.208300e+02 -3.432200e+02\n0 1950     5.813300e+02 -5.246002e+01\n1 1950     7.916801e+02 -2.189400e+02\n0 1951     3.340400e+02 -6.696002e+01\n1 1951     4.813800e+02 -1.417200e+02\n7 1951     2.456000e+02 9.713000e+01\n15 1951     4.328400e+02 9.103000e+01\n0 1952     -7.240997e+01 -1.390800e+02\n1 1952     5.210999e+01 -8.466998e+01\n0 1953     -2.640015e+00 4.491400e+02\n1 1953     3.618600e+02 4.584500e+02\n0 1954     -2.640015e+00 4.491400e+02\n1 1954     3.618600e+02 4.584500e+02\n0 1955     4.431801e+02 3.067300e+02\n1 1955     7.764500e+02 1.956800e+02\n7 1955     2.421400e+02 4.399900e+02\n14 1955     8.409200e+02 -4.106000e+02\n0 1956     9.951001e+01 3.953700e+02\n1 1956     4.551100e+02 3.769100e+02\n0 1957     2.522200e+02 2.452700e+02\n1 1957     5.565900e+02 1.855000e+02\n0 1958     3.045699e+02 2.312800e+02\n1 1958     6.063300e+02 1.562600e+02\n10 1958     2.386000e+02 4.451300e+02\n0 1959     5.449700e+02 8.473001e+01\n1 1959     7.987700e+02 -6.409998e+01\n7 1959     3.851100e+02 2.503700e+02\n10 1959     5.316801e+02 2.976600e+02\n15 1959     7.205000e+02 3.284900e+02\n0 1960     5.771300e+02 6.128998e+01\n1 1960     8.245500e+02 -9.851001e+01\n7 1960     4.201300e+02 2.340200e+02\n10 1960     5.702100e+02 2.740400e+02\n15 1960     7.678800e+02 3.007300e+02\n0 1961     5.389900e+02 6.834998e+01\n1 1961     7.873101e+02 -7.904999e+01\n0 1962     6.026000e+02 1.275000e+01\n1 1962     8.357100e+02 -1.575300e+02\n6 1962     4.548199e+02 1.504600e+02\n7 1962     4.517800e+02 1.924200e+02\n15 1962     8.089500e+02 2.370300e+02\n0 1963     5.512400e+02 -4.807001e+01\n1 1963     7.600200e+02 -2.041200e+02\n0 1964     1.908600e+02 -1.184998e+01\n1 1964     3.430100e+02 -3.939001e+01\n7 1964     1.075500e+02 1.341500e+02\n15 1964     2.261400e+02 1.471200e+02\n0 1965     6.717300e+02 -1.257700e+02\n1 1965     8.649200e+02 -3.270100e+02\n0 1966     6.752100e+02 -1.287700e+02\n1 1966     8.677100e+02 -3.313700e+02\n0 1967     1.683500e+02 -3.827002e+01\n1 1967     3.112900e+02 -5.865997e+01\n6 1967     1.671000e+02 3.237000e+01\n15 1967     1.983500e+02 1.079700e+02\n0 1968     3.877100e+02 -1.012600e+02\n1 1968     5.284399e+02 -1.944200e+02\n12 1968     4.187800e+02 4.391998e+01\n0 1969     -1.778998e+01 -1.675000e+01\n1 1969     1.406600e+02 1.714001e+01\n0 1970     3.567800e+02 -1.420600e+02\n1 1970     4.782100e+02 -2.243500e+02\n0 1971     3.427400e+02 -1.432000e+02\n1 1971     4.632000e+02 -2.206600e+02\n0 1972     3.237000e+02 -1.781200e+02\n1 1972     4.287100e+02 -2.486000e+02\n0 1973     -8.780029e+00 -1.148100e+02\n1 1973     1.174500e+02 -7.970001e+01\n6 1973     6.799927e-01 -1.138500e+02\n0 1974     -1.015997e+01 -1.182000e+02\n1 1974     1.148500e+02 -8.294000e+01\n7 1974     -7.389001e+01 -5.750000e+00\n10 1974     -9.239001e+01 2.700012e+00\n15 1974     -3.309998e+01 -2.440002e+01\n0 1975     4.166998e+01 -1.371300e+02\n1 1975     1.567900e+02 -1.161100e+02\n0 1976     5.980800e+02 -2.867700e+02\n1 1976     7.111899e+02 -4.628199e+02\n0 1977     5.291000e+02 -3.514900e+02\n1 1977     6.081801e+02 -5.011700e+02\n0 1978     4.278800e+02 -4.738000e+02\n1 1978     4.502300e+02 -5.832200e+02\n0 1979     1.421000e+02 -5.576000e+02\n1 1979     1.305200e+02 -5.571600e+02\n6 1979     3.162400e+02 -5.764399e+02\n10 1979     1.292500e+02 -4.838600e+02\n0 1980     -9.681000e+01 -5.034000e+02\n1 1980     -7.478998e+01 -4.234600e+02\n6 1980     2.667999e+01 -6.249399e+02\n7 1980     -9.725000e+01 -4.143200e+02\n0 1981     -2.386300e+02 -4.850500e+02\n1 1981     -1.970700e+02 -3.598300e+02\n6 1981     -1.499000e+02 -6.732200e+02\n0 1982     1.118500e+02 4.041300e+02\n1 1982     4.702900e+02 3.824300e+02\n2 1982     -1.796200e+02 1.505800e+02\n7 1982     -1.066600e+02 4.817400e+02\n11 1982     2.544000e+02 -3.446300e+02\n13 1982     2.800200e+02 9.394000e+01\n14 1982     4.241100e+02 -3.334300e+02\n0 1983     4.147300e+02 3.320800e+02\n1 1983     7.681600e+02 2.270600e+02\n6 1983     4.995001e+01 4.167800e+02\n7 1983     1.995000e+02 4.519100e+02\n10 1983     3.593101e+02 5.774500e+02\n0 1984     3.653199e+02 3.046800e+02\n1 1984     7.022600e+02 2.127600e+02\n6 1984     1.321002e+01 3.743200e+02\n0 1985     5.619399e+02 2.017100e+02\n1 1985     8.531200e+02 5.458002e+01\n13 1985     7.591300e+02 -2.579999e+01\n15 1985     7.309800e+02 4.954500e+02\n0 1986     -9.797998e+01 2.419500e+02\n1 1986     2.016899e+02 2.785700e+02\n5 1986     3.239301e+02 -4.299600e+02\n7 1986     -2.806800e+02 2.974000e+02\n10 1986     -2.339200e+02 4.170700e+02\n11 1986     6.003003e+01 -5.006400e+02\n13 1986     1.352700e+02 -5.521997e+01\n14 1986     2.410100e+02 -5.161300e+02\n0 1987     -3.390800e+02 7.942999e+01\n1 1987     -8.609998e+01 1.888100e+02\n10 1987     -4.995800e+02 1.995800e+02\n0 1988     7.303800e+02 -2.733000e+02\n1 1988     8.704100e+02 -5.028199e+02\n0 1989     7.037800e+02 -2.929200e+02\n1 1989     8.303101e+02 -5.120900e+02\n7 1989     6.043900e+02 -7.154999e+01\n0 1990     5.922300e+02 -3.256900e+02\n1 1990     6.882400e+02 -5.002400e+02\n0 1991     2.570007e+00 -2.501700e+02\n1 1991     8.906000e+01 -2.144400e+02\n15 1991     2.679993e+00 -2.012700e+02\n0 1992     -2.669300e+02 -4.272100e+02\n1 1992     -2.019500e+02 -2.983900e+02\n0 1993     -1.070200e+02 4.434900e+02\n1 1993     2.521400e+02 4.792300e+02\n0 1994     1.135999e+01 4.205200e+02\n1 1994     3.688101e+02 4.255700e+02\n7 1994     -2.058600e+02 4.874100e+02\n0 1995     5.731300e+02 2.003000e+02\n1 1995     8.644800e+02 5.015997e+01\n13 1995     7.709500e+02 -2.544000e+01\n0 1996     5.569600e+02 6.853998e+01\n1 1996     8.060601e+02 -8.472998e+01\n0 1997     -2.502100e+02 4.004999e+01\n1 1997     -1.757001e+01 1.281400e+02\n10 1997     -3.903100e+02 1.629100e+02\n0 1998     2.067800e+02 -1.428300e+02\n1 1998     3.181700e+02 -1.743700e+02\n10 1998     1.600700e+02 -2.969971e+00\n15 1998     2.648300e+02 -2.878998e+01\n0 1999     -1.307200e+02 -9.263000e+01\n1 1999     1.550000e+01 -2.402002e+01\n0 2000     -5.522998e+01 -1.511400e+02\n1 2000     6.360999e+01 -1.011700e+02\n12 2000     -4.103998e+01 -1.222400e+02\n0 2001     5.056700e+02 -3.677600e+02\n1 2001     5.766899e+02 -5.086500e+02\n0 2002     1.095600e+02 -5.720699e+02\n1 2002     9.363000e+01 -5.592900e+02\n7 2002     1.232100e+02 -4.368000e+02\n10 2002     9.365997e+01 -5.040400e+02\n0 2003     1.072200e+02 4.085800e+02\n1 2003     4.662400e+02 3.883000e+02\n4 2003     -4.753003e+01 -4.185700e+02\n7 2003     -1.126900e+02 4.851800e+02\n8 2003     -7.153003e+01 1.178900e+02\n9 2003     -3.032100e+02 2.032900e+02\n11 2003     2.485699e+02 -3.414400e+02\n13 2003     2.753400e+02 9.701999e+01\n14 2003     4.184301e+02 -3.291900e+02\n0 2004     3.541998e+01 1.227700e+02\n1 2004     2.369800e+02 1.383500e+02\n4 2004     -1.946900e+02 -4.373800e+02\n5 2004     6.535500e+02 -5.317400e+02\n7 2004     -7.498999e+01 2.389000e+02\n10 2004     -6.564001e+01 2.876000e+02\n12 2004     -2.804999e+01 2.136200e+02\n13 2004     3.809399e+02 -1.175300e+02\n15 2004     -2.409973e+00 3.099000e+02\n0 2005     5.187400e+02 -3.591500e+02\n1 2005     5.941400e+02 -5.046600e+02\n7 2005     4.553500e+02 -1.619600e+02\n12 2005     6.156300e+02 -2.294600e+02\n0 2006     3.067500e+02 2.491400e+02\n1 2006     6.157700e+02 1.735400e+02\n0 2007     -8.620001e+01 1.911500e+02\n1 2007     1.946500e+02 2.265400e+02\n0 2008     5.568199e+02 -3.820000e+02\n1 2008     6.255300e+02 -5.424900e+02\n0 2009     6.429200e+02 -2.948200e+02\n1 2009     7.586100e+02 -4.889600e+02\n0 2010     -2.519700e+02 -4.703300e+02\n1 2010     -2.041300e+02 -3.420400e+02\n6 2010     -1.765100e+02 -6.642900e+02\n7 2010     -2.625700e+02 -4.147800e+02\n0 2011     6.160400e+02 -3.161300e+02\n1 2011     7.188700e+02 -4.996300e+02\n0 2012     6.264800e+02 -3.272900e+02\n1 2012     7.246899e+02 -5.156801e+02\n0 2013     5.143199e+02 -3.449300e+02\n1 2013     5.947600e+02 -4.890000e+02\n7 2013     4.477600e+02 -1.506200e+02\n13 2013     8.420500e+02 -5.097500e+02\n0 2014     -2.349200e+02 -4.552300e+02\n1 2014     -1.833300e+02 -3.340000e+02\n7 2014     -2.494500e+02 -3.972600e+02\n0 2015     5.400100e+02 1.135999e+01\n1 2015     7.709600e+02 -1.391900e+02\n6 2015     3.767700e+02 1.217400e+02\n7 2015     3.899900e+02 1.781200e+02\n10 2015     5.320601e+02 2.117800e+02\n12 2015     4.636300e+02 1.334500e+02\n0 2016     2.234800e+02 -1.117600e+02\n1 2016     3.476600e+02 -1.495400e+02\n7 2016     1.527500e+02 3.972998e+01\n10 2016     1.763800e+02 3.515997e+01\n0 2017     5.187400e+02 -3.591500e+02\n1 2017     5.941400e+02 -5.046600e+02\n12 2017     6.156300e+02 -2.294600e+02\n0 2018     -2.535900e+02 4.390000e+02\n1 2018     1.037500e+02 5.110400e+02\n0 2019     4.481000e+01 -2.099200e+02\n1 2019     1.365700e+02 -1.879100e+02\n6 2019     1.048000e+02 -1.972800e+02\n7 2019     1.699829e-01 -8.571997e+01\n10 2019     -1.940002e+01 -9.703998e+01\n12 2019     1.052000e+02 -1.519800e+02\n15 2019     5.292999e+01 -1.410100e+02\n0 2020     4.906300e+02 3.145700e+02\n1 2020     8.282600e+02 1.911200e+02\n2 2020     2.904500e+02 1.984400e+02\n7 2020     2.886000e+02 4.561700e+02\n9 2020     1.062500e+02 2.579100e+02\n13 2020     6.542300e+02 5.666998e+01\n0 2021     2.645001e+01 3.177002e+01\n1 2021     1.959800e+02 5.176001e+01\n2 2021     1.618700e+02 6.215002e+01\n4 2021     -2.533200e+02 -4.341600e+02\n7 2021     -6.403003e+01 1.491700e+02\n9 2021     2.625000e+01 1.425600e+02\n10 2021     -6.610999e+01 1.806700e+02\n13 2021     3.919399e+02 -1.922300e+02\n15 2021     -3.640015e+00 1.840500e+02\n0 2022     -1.226100e+02 -4.987900e+02\n1 2022     -9.622998e+01 -4.105900e+02\n0 2023     2.141899e+02 3.227800e+02\n1 2023     5.477100e+02 2.736300e+02\n7 2023     9.890015e+00 4.175200e+02\n14 2023     5.566300e+02 -4.141600e+02\n0 2024     1.444500e+02 -1.319600e+02\n1 2024     2.604600e+02 -1.437300e+02\n7 2024     8.215997e+01 7.669983e+00\n10 2024     8.709998e+01 3.599976e+00\n13 2024     5.169399e+02 -3.245700e+02\n15 2024     1.787000e+02 -2.239001e+01\n0 2025     5.956000e+01 2.671600e+02\n1 2025     3.673199e+02 2.607800e+02\n7 2025     -1.283000e+02 3.441100e+02\n10 2025     -5.125000e+01 4.626700e+02\n0 2026     4.252900e+02 -1.205800e+02\n1 2026     5.606100e+02 -2.267800e+02\n10 2026     4.098900e+02 4.635999e+01\n15 2026     5.665800e+02 2.965002e+01\n0 2027     6.870200e+02 -2.983700e+02\n1 2027     8.084200e+02 -5.104500e+02\n0 2028     5.107600e+02 -3.980600e+02\n1 2028     5.690200e+02 -5.406000e+02\n0 2029     -1.298400e+02 -5.172500e+02\n1 2029     -1.103900e+02 -4.250500e+02\n6 2029     -8.800049e-01 -6.545900e+02\n7 2029     -1.265500e+02 -4.347100e+02\n12 2029     -2.142999e+01 -6.074900e+02\n15 2029     -1.382300e+02 -5.804000e+02\n0 2030     -8.373999e+01 -5.225100e+02\n1 2030     -6.985999e+01 -4.451000e+02\n7 2030     -7.875000e+01 -4.301700e+02\n0 2031     -1.653100e+02 -5.051899e+02\n1 2031     -1.379300e+02 -4.021600e+02\n6 2031     -5.002002e+01 -6.586200e+02\n0 2032     -2.013900e+02 -5.017500e+02\n1 2032     -1.696300e+02 -3.872000e+02\n7 2032     -2.034200e+02 -4.349399e+02\n0 2033     -3.384998e+01 -4.023600e+02\n1 2033     1.810999e+01 -3.505400e+02\n7 2033     -5.637000e+01 -3.017500e+02\n15 2033     -2.370001e+01 -4.115300e+02\n0 2034     3.146400e+02 2.320700e+02\n1 2034     6.174301e+02 1.536000e+02\n10 2034     2.500400e+02 4.477900e+02\n11 2034     4.560500e+02 -5.011000e+02\n0 2035     7.184998e+01 -1.728100e+02\n1 2035     1.761000e+02 -1.606600e+02\n3 2035     2.068300e+02 -4.336899e+02\n6 2035     1.123100e+02 -1.496200e+02\n7 2035     1.810999e+01 -4.525000e+01\n10 2035     8.090027e+00 -5.142999e+01\n13 2035     4.601300e+02 -3.665500e+02\n15 2035     8.516998e+01 -8.740002e+01\n0 2036     2.871997e+01 -7.631000e+01\n1 2036     1.654700e+02 -5.395001e+01\n3 2036     1.185200e+02 -3.550000e+02\n7 2036     -4.260999e+01 4.189001e+01\n13 2036     4.076899e+02 -2.856100e+02\n15 2036     1.432001e+01 3.740002e+01\n0 2037     7.286300e+02 -3.030100e+02\n1 2037     8.551801e+02 -5.326700e+02\n7 2037     6.284900e+02 -7.608002e+01\n0 2038     1.392300e+02 -4.256500e+02\n1 2038     1.739200e+02 -4.306100e+02\n7 2038     1.206000e+02 -2.900600e+02\n0 2039     -2.692400e+02 -4.536600e+02\n1 2039     -2.134200e+02 -3.214400e+02\n6 2039     -2.102300e+02 -6.543700e+02\n0 2040     -3.375800e+02 -2.116100e+02\n1 2040     -1.882000e+02 -8.028003e+01\n6 2040     -4.707200e+02 -4.225400e+02\n9 2040     -3.381800e+02 -3.042500e+02\n0 2041     -4.144000e+02 3.309600e+02\n1 2041     -7.915002e+01 4.431300e+02\n7 2041     -6.222300e+02 3.470600e+02\n8 2041     -4.958000e+02 2.885001e+01\n10 2041     -6.259800e+02 4.961900e+02\n12 2041     -7.498100e+02 2.435900e+02\n15 2041     -6.364300e+02 5.359700e+02\n0 2042     1.219700e+02 4.253100e+02\n1 2042     4.866000e+02 4.016500e+02\n11 2042     2.619500e+02 -3.250100e+02\n0 2043     1.423101e+02 5.101900e+02\n1 2043     5.290400e+02 4.844900e+02\n6 2043     -3.161700e+02 5.657500e+02\n11 2043     2.736200e+02 -2.494700e+02\n12 2043     -1.508800e+02 5.440500e+02\n14 2043     4.550800e+02 -2.190800e+02\n0 2044     2.576700e+02 4.919400e+02\n1 2044     6.524100e+02 4.349100e+02\n2 2044     -6.015997e+01 2.537300e+02\n3 2044     -2.018200e+02 -7.981000e+01\n5 2044     6.606100e+02 -1.530200e+02\n6 2044     -1.979100e+02 5.636100e+02\n8 2044     3.063000e+01 1.976600e+02\n9 2044     -2.030100e+02 2.931500e+02\n12 2044     -3.251001e+01 5.345400e+02\n0 2045     3.064800e+02 5.669800e+02\n1 2045     7.299000e+02 5.033000e+02\n3 2045     -1.717700e+02 3.599854e-01\n9 2045     -1.789200e+02 3.644500e+02\n11 2045     4.176300e+02 -1.921100e+02\n0 2046     3.266600e+02 5.226100e+02\n1 2046     7.389200e+02 4.505000e+02\n3 2046     -1.520900e+02 -4.469000e+01\n11 2046     4.413400e+02 -2.290000e+02\n0 2047     2.576700e+02 4.919400e+02\n1 2047     6.524100e+02 4.349100e+02\n3 2047     -2.018200e+02 -7.981000e+01\n9 2047     -2.030100e+02 2.931500e+02\n11 2047     3.810000e+02 -2.599200e+02\n0 2048     3.374900e+02 2.644000e+01\n1 2048     5.177800e+02 -4.937000e+01\n10 2048     2.946600e+02 2.066800e+02\n15 2048     4.267900e+02 2.192900e+02\n0 2049     2.593900e+02 -1.240900e+02\n1 2049     3.797900e+02 -1.734700e+02\n7 2049     1.898400e+02 3.323999e+01\n10 2049     2.183600e+02 2.489001e+01\n12 2049     3.064700e+02 2.800293e-01\n13 2049     6.113199e+02 -3.096200e+02\n15 2049     3.350000e+02 3.140015e+00\n0 2050     2.449399e+02 -1.296300e+02\n1 2050     3.627300e+02 -1.739400e+02\n7 2050     1.772300e+02 2.553003e+01\n10 2050     2.030000e+02 1.684998e+01\n12 2050     2.948700e+02 -8.489990e+00\n13 2050     6.016300e+02 -3.157300e+02\n15 2050     3.158600e+02 -6.070007e+00\n0 2051     2.771300e+02 5.729000e+02\n1 2051     6.980400e+02 5.167900e+02\n2 2051     -5.409998e+01 3.411700e+02\n5 2051     6.775200e+02 -6.619000e+01\n9 2051     -2.004900e+02 3.689200e+02\n11 2051     3.912100e+02 -1.888500e+02\n13 2051     4.058800e+02 2.481900e+02\n14 2051     5.774600e+02 -1.490400e+02\n0 2052     -1.640600e+02 -5.389700e+02\n1 2052     -1.497600e+02 -4.330800e+02\n4 2052     -6.683100e+02 -2.548200e+02\n6 2052     -2.715997e+01 -6.937300e+02\n7 2052     -1.568800e+02 -4.630400e+02\n9 2052     7.248999e+01 -4.614600e+02\n0 2053     -1.042100e+02 3.997200e+02\n1 2053     2.452700e+02 4.350500e+02\n2 2053     -3.825700e+02 1.403600e+02\n6 2053     -5.786000e+02 3.674600e+02\n7 2053     -3.157000e+02 4.535200e+02\n9 2053     -4.721400e+02 1.822800e+02\n10 2053     -2.594600e+02 6.069900e+02\n14 2053     2.114399e+02 -3.443900e+02\n0 2054     3.429700e+02 5.711000e+02\n1 2054     7.731100e+02 4.986300e+02\n3 2054     -1.432400e+02 5.200012e+00\n5 2054     7.430200e+02 -6.547998e+01\n6 2054     -1.242500e+02 6.791000e+02\n9 2054     -1.533900e+02 3.692100e+02\n11 2054     4.507100e+02 -1.859100e+02\n0 2055     3.323500e+02 5.485900e+02\n1 2055     7.541801e+02 4.770100e+02\n2 2055     -4.510010e+00 3.162600e+02\n9 2055     -1.576600e+02 3.492600e+02\n11 2055     4.439000e+02 -2.064200e+02\n13 2055     4.508800e+02 2.320800e+02\n14 2055     6.330601e+02 -1.700800e+02\n0 2056     4.521100e+02 3.467600e+02\n1 2056     7.985900e+02 2.358800e+02\n2 2056     2.376600e+02 2.141000e+02\n6 2056     1.356300e+02 4.590800e+02\n8 2056     2.630200e+02 1.565900e+02\n9 2056     6.021002e+01 2.694200e+02\n0 2057     6.113199e+02 7.048999e+01\n1 2057     8.630601e+02 -9.937000e+01\n2 2057     5.341801e+02 5.484998e+01\n3 2057     3.995800e+02 -2.550600e+02\n9 2057     3.189500e+02 1.460900e+02\n12 2057     5.326500e+02 2.299000e+02\n15 2057     8.148600e+02 3.189400e+02\n0 2058     -1.414100e+02 3.438500e+02\n1 2058     1.938199e+02 3.889300e+02\n7 2058     -3.453900e+02 3.910500e+02\n13 2058     7.828998e+01 2.788000e+01\n14 2058     1.724301e+02 -4.062600e+02\n0 2059     8.594000e+01 5.495300e+02\n1 2059     4.807600e+02 5.391800e+02\n3 2059     -3.495400e+02 -1.656000e+01\n9 2059     -3.387900e+02 3.423100e+02\n0 2060     -1.808300e+02 -5.101000e+02\n1 2060     -1.542400e+02 -4.015600e+02\n6 2060     -6.471002e+01 -6.715100e+02\n7 2060     -1.797900e+02 -4.391500e+02\n9 2060     3.654999e+01 -4.474700e+02\n0 2061     1.359500e+02 -3.195100e+02\n1 2061     2.002300e+02 -3.258400e+02\n9 2061     2.322800e+02 -1.471300e+02\n10 2061     9.698999e+01 -2.132800e+02\n15 2061     1.931300e+02 -2.776300e+02\n0 2062     2.266200e+02 4.707400e+02\n1 2062     6.116300e+02 4.210600e+02\n2 2062     -8.515002e+01 2.291900e+02\n5 2062     6.296400e+02 -1.756000e+02\n6 2062     -2.266600e+02 5.304700e+02\n7 2062     -5.690002e+00 5.611900e+02\n8 2062     1.009998e+01 1.776300e+02\n9 2062     -2.220400e+02 2.703900e+02\n11 2062     3.558199e+02 -2.795100e+02\n12 2062     -6.028003e+01 5.059200e+02\n0 2063     -1.357500e+02 3.303300e+02\n1 2063     1.959600e+02 3.738200e+02\n7 2063     -3.379400e+02 3.774100e+02\n9 2063     -4.908600e+02 1.050900e+02\n14 2063     1.772700e+02 -4.215400e+02\n0 2064     1.135999e+01 4.205200e+02\n1 2064     3.688101e+02 4.255700e+02\n2 2064     -2.738200e+02 1.670900e+02\n7 2064     -2.058600e+02 4.874100e+02\n9 2064     -3.802400e+02 2.087900e+02\n13 2064     1.998900e+02 1.025200e+02\n0 2065     -2.078900e+02 -5.297200e+02\n1 2065     -1.857500e+02 -4.103900e+02\n6 2065     -8.257999e+01 -7.055200e+02\n7 2065     -2.027900e+02 -4.640100e+02\n9 2065     2.628998e+01 -4.724900e+02\n10 2065     -2.757600e+02 -4.931899e+02\n0 2066     -2.098900e+02 -4.509000e+02\n1 2066     -1.590800e+02 -3.381400e+02\n7 2066     -2.248300e+02 -3.877300e+02\n9 2066     -3.456000e+01 -4.196100e+02\n10 2066     -2.870500e+02 -4.025400e+02\n15 2066     -2.546800e+02 -5.017100e+02\n0 2067     -1.126900e+02 -5.096801e+02\n1 2067     -9.107001e+01 -4.235300e+02\n7 2067     -1.110000e+02 -4.240500e+02\n9 2067     9.925000e+01 -4.218800e+02\n0 2068     6.600800e+02 -9.315997e+01\n1 2068     8.630400e+02 -2.884900e+02\n6 2068     5.546801e+02 5.553998e+01\n8 2068     5.790800e+02 -1.050200e+02\n0 2069     -1.782600e+02 -4.842900e+02\n1 2069     -1.422500e+02 -3.788800e+02\n6 2069     -7.907999e+01 -6.432900e+02\n9 2069     2.059998e+01 -4.293100e+02\n0 2070     -1.758000e+02 -4.942500e+02\n1 2070     -1.441600e+02 -3.879600e+02\n6 2070     -6.546002e+01 -6.541300e+02\n7 2070     -1.767100e+02 -4.236400e+02\n9 2070     3.284003e+01 -4.359800e+02\n0 2071     5.381500e+02 -4.400024e-01\n1 2071     7.644800e+02 -1.505800e+02\n7 2071     3.893600e+02 1.663000e+02\n10 2071     5.304900e+02 1.979100e+02\n0 2072     -6.569000e+01 1.855900e+02\n1 2072     2.122600e+02 2.157500e+02\n5 2072     3.789100e+02 -4.911300e+02\n6 2072     -4.119600e+02 1.190300e+02\n7 2072     -2.345300e+02 2.487600e+02\n8 2072     -1.313600e+02 -5.270999e+01\n9 2072     -3.348700e+02 2.646997e+01\n0 2073     -9.496002e+01 9.504999e+01\n1 2073     1.181100e+02 1.439900e+02\n7 2073     -2.157300e+02 1.799900e+02\n15 2073     -1.716200e+02 2.541600e+02\n0 2074     5.503600e+02 -8.530029e+00\n1 2074     7.752900e+02 -1.632700e+02\n10 2074     5.450400e+02 1.904500e+02\n0 2075     5.227500e+02 1.194300e+02\n1 2075     7.866100e+02 -2.091998e+01\n7 2075     3.578199e+02 2.800300e+02\n10 2075     5.025200e+02 3.362700e+02\n12 2075     4.157100e+02 2.474800e+02\n13 2075     7.277900e+02 -1.032900e+02\n15 2075     6.852500e+02 3.739500e+02\n0 2076     -5.319800e+02 3.276600e+02\n1 2076     -1.902200e+02 4.704900e+02\n5 2076     -1.385200e+02 -3.289000e+02\n10 2076     -7.722000e+02 4.815300e+02\n13 2076     -2.377500e+02 -1.820007e+00\n15 2076     -8.016600e+02 5.159900e+02\n0 2077     1.594600e+02 5.195400e+02\n1 2077     5.521000e+02 4.894900e+02\n11 2077     2.894000e+02 -2.404400e+02\n0 2078     2.420900e+02 4.914900e+02\n1 2078     6.349000e+02 4.391000e+02\n7 2078     6.489990e+00 5.838300e+02\n11 2078     3.673400e+02 -2.605100e+02\n0 2079     4.097500e+02 3.583700e+02\n1 2079     7.738101e+02 2.556300e+02\n10 2079     3.503900e+02 6.091200e+02\n13 2079     5.437300e+02 7.839999e+01\n0 2080     3.713500e+02 3.354700e+02\n1 2080     7.207700e+02 2.427800e+02\n10 2080     3.081500e+02 5.770200e+02\n0 2081     2.120699e+02 3.120000e+02\n1 2081     5.411400e+02 2.632700e+02\n6 2081     -1.661800e+02 3.407600e+02\n0 2082     2.647500e+02 2.699100e+02\n1 2082     5.798600e+02 2.062600e+02\n0 2083     3.908800e+02 4.878800e+02\n1 2083     8.036100e+02 3.966500e+02\n2 2083     5.238000e+01 2.528300e+02\n3 2083     -9.488000e+01 -7.951001e+01\n5 2083     7.971300e+02 -1.517200e+02\n11 2083     5.060900e+02 -2.554500e+02\n12 2083     1.026500e+02 5.474600e+02\n14 2083     6.972100e+02 -2.292500e+02\n0 2084     2.428101e+02 2.530900e+02\n1 2084     5.497500e+02 1.961500e+02\n6 2084     -9.059000e+01 2.845200e+02\n7 2084     5.377002e+01 3.566600e+02\n15 2084     2.835900e+02 5.171500e+02\n0 2085     2.257600e+02 5.057900e+02\n1 2085     6.212800e+02 4.581600e+02\n11 2085     3.508800e+02 -2.490600e+02\n0 2086     1.679800e+02 4.954100e+02\n1 2086     5.541801e+02 4.623500e+02\n11 2086     2.986700e+02 -2.614200e+02\n0 2087     2.293900e+02 3.411300e+02\n1 2087     5.716801e+02 2.875500e+02\n7 2087     1.958002e+01 4.356800e+02\n13 2087     3.926400e+02 4.970001e+01\n14 2087     5.660699e+02 -3.940700e+02\n0 2088     -1.970300e+02 3.708000e+02\n1 2088     1.439800e+02 4.295500e+02\n2 2088     -4.733500e+02 1.005100e+02\n5 2088     2.019600e+02 -2.903300e+02\n7 2088     -4.048000e+02 4.120500e+02\n10 2088     -3.669100e+02 5.617900e+02\n13 2088     3.401001e+01 4.765997e+01\n14 2088     1.182000e+02 -3.792200e+02\n0 2089     2.861500e+02 3.603700e+02\n1 2089     6.387300e+02 2.914800e+02\n7 2089     7.084003e+01 4.613300e+02\n0 2090     2.027600e+02 3.409900e+02\n1 2090     5.431801e+02 2.948100e+02\n0 2091     2.186200e+02 4.891000e+02\n1 2091     6.087000e+02 4.425400e+02\n11 2091     3.460500e+02 -2.642800e+02\n0 2092     2.046899e+02 3.357800e+02\n1 2092     5.427600e+02 2.890000e+02\n0 2093     -2.450200e+02 4.735300e+02\n1 2093     1.201100e+02 5.431400e+02\n5 2093     1.634300e+02 -1.789100e+02\n7 2093     -4.674700e+02 5.151400e+02\n0 2094     -4.606500e+02 3.182500e+02\n1 2094     -1.230500e+02 4.437000e+02\n7 2094     -6.704400e+02 3.234000e+02\n10 2094     -6.809400e+02 4.760400e+02\n11 2094     -2.652800e+02 -4.251500e+02\n12 2094     -8.058300e+02 2.092800e+02\n15 2094     -6.983800e+02 5.113100e+02\n0 2095     -4.264500e+02 3.047700e+02\n1 2095     -9.359003e+01 4.227100e+02\n7 2095     -6.307900e+02 3.142100e+02\n11 2095     -2.359400e+02 -4.385200e+02\n0 2096     2.003000e+02 5.712300e+02\n1 2096     6.114700e+02 5.340300e+02\n2 2096     -1.187900e+02 3.403200e+02\n14 2096     5.038600e+02 -1.546600e+02\n0 2097     3.439000e+02 -1.877000e+02\n1 2097     4.461000e+02 -2.652200e+02\n2 2097     5.406100e+02 -9.403003e+01\n6 2097     3.861300e+02 -8.078998e+01\n10 2097     3.224100e+02 -3.979999e+01\n12 2097     4.180800e+02 -4.831000e+01\n0 2098     -1.756600e+02 -4.752000e+02\n1 2098     -1.365200e+02 -3.713800e+02\n6 2098     -8.273999e+01 -6.331500e+02\n7 2098     -1.848500e+02 -4.055400e+02\n9 2098     1.566998e+01 -4.230700e+02\n0 2099     -2.580200e+02 -4.118700e+02\n1 2099     -1.883900e+02 -2.872800e+02\n7 2099     -2.837100e+02 -3.593400e+02\n15 2099     -3.235100e+02 -4.551100e+02\n0 2100     7.315997e+01 3.523999e+01\n1 2100     2.407900e+02 4.248999e+01\n7 2100     -1.694000e+01 1.610600e+02\n10 2100     -1.237000e+01 1.891600e+02\n0 2101     3.279700e+02 -2.735999e+01\n1 2101     4.877000e+02 -1.000900e+02\n10 2101     2.887300e+02 1.437400e+02\n15 2101     4.190699e+02 1.445800e+02\n0 2102     3.061400e+02 1.069600e+02\n1 2102     5.128400e+02 4.121002e+01\n10 2102     2.505800e+02 2.978500e+02\n0 2103     5.460100e+02 8.729980e+00\n1 2103     7.764700e+02 -1.439800e+02\n6 2103     3.846200e+02 1.207600e+02\n7 2103     3.963700e+02 1.764500e+02\n10 2103     5.393500e+02 2.086500e+02\n12 2103     4.714301e+02 1.316800e+02\n13 2103     7.644900e+02 -2.000700e+02\n0 2104     3.819200e+02 -2.246000e+02\n1 2104     4.920900e+02 -3.188500e+02\n7 2104     3.072900e+02 -5.588000e+01\n15 2104     5.221000e+02 -1.180300e+02\n0 2105     -5.241998e+01 -1.557000e+02\n1 2105     6.483002e+01 -1.063000e+02\n7 2105     -1.102400e+02 -5.201001e+01\n15 2105     -8.344000e+01 -8.142999e+01\n0 2106     -4.784700e+02 1.599100e+02\n1 2106     -1.853800e+02 2.994200e+02\n0 2107     5.889500e+02 -3.244100e+02\n1 2107     6.851500e+02 -4.972900e+02\n0 2108     2.349200e+02 4.616998e+01\n1 2108     4.086000e+02 4.609985e+00\n15 2108     2.799399e+02 2.323900e+02\n0 2109     1.201300e+02 4.024700e+02\n1 2109     4.785800e+02 3.785300e+02\n5 2109     5.218500e+02 -2.525300e+02\n7 2109     -9.834003e+01 4.810400e+02\n8 2109     -6.166998e+01 1.122500e+02\n11 2109     2.625300e+02 -3.458300e+02\n0 2110     3.221300e+02 -3.034600e+02\n1 2110     3.980900e+02 -3.751600e+02\n7 2110     2.704500e+02 -1.380600e+02\n10 2110     3.093900e+02 -1.744400e+02\n15 2110     4.480800e+02 -2.329200e+02\n0 2111     -1.579400e+02 4.828998e+01\n1 2111     4.437000e+01 1.148000e+02\n2 2111     -1.266700e+02 -4.491998e+01\n4 2111     -2.261100e+02 -2.819800e+02\n7 2111     -2.706300e+02 1.220500e+02\n8 2111     -6.409998e+01 -7.239001e+01\n10 2111     -2.827700e+02 1.798300e+02\n15 2111     -2.506400e+02 1.795300e+02\n0 2112     4.940500e+02 2.599600e+02\n1 2112     8.146700e+02 1.321300e+02\n7 2112     2.992200e+02 4.037100e+02\n10 2112     4.580200e+02 4.999500e+02\n0 2113     -3.040100e+02 -1.138500e+02\n1 2113     -1.228700e+02 -2.800293e-01\n0 2114     5.438800e+02 6.919983e+00\n1 2114     7.735200e+02 -1.449000e+02\n0 2115     6.975000e+02 -3.552600e+02\n1 2115     7.955500e+02 -5.731300e+02\n12 2115     7.902400e+02 -1.745800e+02\n0 2116     2.381200e+02 -2.276300e+02\n1 2116     3.204100e+02 -2.680600e+02\n7 2116     1.917100e+02 -6.864001e+01\n10 2116     2.047900e+02 -9.659998e+01\n15 2116     3.181200e+02 -1.399900e+02\n0 2117     2.047600e+02 3.591400e+02\n1 2117     5.523400e+02 3.123800e+02\n10 2117     1.097700e+02 5.880300e+02\n0 2118     3.518199e+02 -1.932500e+02\n1 2118     4.520601e+02 -2.732400e+02\n10 2118     3.322700e+02 -4.526001e+01\n15 2118     4.715200e+02 -7.890002e+01\n0 2119     9.858002e+01 7.494000e+01\n1 2119     2.788900e+02 7.384998e+01\n2 2119     2.189200e+02 1.200600e+02\n8 2119     2.129400e+02 5.242999e+01\n15 2119     8.909998e+01 2.530600e+02\n0 2120     4.879301e+02 -4.324400e+02\n1 2120     5.305300e+02 -5.656700e+02\n0 2121     -2.169600e+02 3.892200e+02\n1 2121     1.284300e+02 4.529500e+02\n2 2121     -4.940000e+02 1.262800e+02\n5 2121     1.839300e+02 -2.688000e+02\n7 2121     -4.269100e+02 4.291700e+02\n10 2121     -3.932500e+02 5.833300e+02\n0 2122     2.990800e+02 -2.445500e+02\n1 2122     3.848400e+02 -3.068700e+02\n10 2122     2.766200e+02 -1.096300e+02\n15 2122     4.066801e+02 -1.555000e+02\n0 2123     -2.695700e+02 4.093400e+02\n1 2123     8.077002e+01 4.859200e+02\n7 2123     -4.838100e+02 4.448700e+02\n10 2123     -4.602500e+02 6.039600e+02\n11 2123     -9.290002e+01 -3.462800e+02\n0 2124     4.022300e+02 -1.099200e+02\n1 2124     5.399600e+02 -2.081400e+02\n6 2124     3.928200e+02 7.950012e+00\n12 2124     4.375300e+02 3.884998e+01\n13 2124     7.205000e+02 -2.912800e+02\n15 2124     5.330601e+02 4.109998e+01\n0 2125     6.223199e+02 -3.020100e+02\n1 2125     7.325000e+02 -4.879100e+02\n0 2126     9.788000e+01 5.696002e+01\n1 2126     2.722600e+02 5.583002e+01\n6 2126     5.528003e+01 1.139000e+02\n0 2127     2.128500e+02 3.471700e+02\n1 2127     5.559000e+02 2.982300e+02\n0 2128     5.438800e+02 6.919983e+00\n1 2128     7.735200e+02 -1.449000e+02\n6 2128     3.822600e+02 1.183500e+02\n10 2128     5.368199e+02 2.069200e+02\n0 2129     3.871200e+02 -1.767400e+02\n1 2129     5.033700e+02 -2.713500e+02\n10 2129     3.710300e+02 -2.297998e+01\n0 2130     2.574900e+02 1.066000e+02\n1 2130     4.556100e+02 5.739001e+01\n7 2130     1.448500e+02 2.552800e+02\n15 2130     3.047200e+02 3.189100e+02\n0 2131     -3.220900e+02 -1.312700e+02\n1 2131     -1.457800e+02 -1.112000e+01\n6 2131     -5.095900e+02 -3.259500e+02\n7 2131     -4.197100e+02 -9.871002e+01\n12 2131     -4.484700e+02 -2.481700e+02\n13 2131     2.882001e+01 -3.864000e+02\n0 2132     2.935900e+02 -2.491500e+02\n1 2132     3.778800e+02 -3.095600e+02\n15 2132     3.993300e+02 -1.621400e+02\n0 2133     9.592999e+01 -3.548999e+01\n1 2133     2.405900e+02 -3.363000e+01\n2 2133     2.668500e+02 1.856000e+01\n7 2133     1.859003e+01 9.589999e+01\n15 2133     9.944000e+01 1.020900e+02\n0 2134     -9.619000e+01 1.093600e+02\n1 2134     1.222800e+02 1.571300e+02\n7 2134     -2.202600e+02 1.931300e+02\n13 2134     2.348000e+02 -1.473300e+02\n0 2135     -3.759900e+02 -1.530100e+02\n1 2135     -2.019500e+02 -1.565997e+01\n7 2135     -4.708500e+02 -1.304400e+02\n0 2136     6.239200e+02 -3.343000e+02\n1 2136     7.204100e+02 -5.213400e+02\n7 2136     5.436700e+02 -1.215500e+02\n0 2137     6.040200e+02 9.834000e+01\n1 2137     8.644500e+02 -6.806000e+01\n7 2137     4.417800e+02 2.750900e+02\n10 2137     5.998700e+02 3.196300e+02\n15 2137     8.017600e+02 3.563600e+02\n0 2138     6.450100e+02 -3.384600e+02\n1 2138     7.429301e+02 -5.342300e+02\n7 2138     5.637900e+02 -1.213200e+02\n12 2138     7.312800e+02 -1.724800e+02\n0 2139     -1.860900e+02 1.607400e+02\n1 2139     8.669000e+01 2.247700e+02\n7 2139     -3.508200e+02 2.068000e+02\n10 2139     -3.284900e+02 3.120100e+02\n12 2139     -4.128400e+02 9.778998e+01\n15 2139     -2.942900e+02 3.294300e+02\n0 2140     -2.052000e+02 -4.443700e+02\n1 2140     -1.519600e+02 -3.329500e+02\n6 2140     -1.388300e+02 -6.141000e+02\n7 2140     -2.216300e+02 -3.807800e+02\n15 2140     -2.492200e+02 -4.925100e+02\n0 2141     4.958400e+02 3.920000e+02\n1 2141     8.592900e+02 2.730200e+02\n7 2141     2.836300e+02 5.326700e+02\n0 2142     5.261801e+02 2.554999e+01\n1 2142     7.613600e+02 -1.199100e+02\n6 2142     3.550100e+02 1.319400e+02\n7 2142     3.738900e+02 1.890400e+02\n12 2142     4.432100e+02 1.438000e+02\n15 2142     7.009900e+02 2.436400e+02\n0 2143     4.814800e+02 3.511200e+02\n1 2143     8.305500e+02 2.325400e+02\n6 2143     1.749300e+02 4.740800e+02\n7 2143     2.748500e+02 4.902000e+02\n9 2143     8.877002e+01 2.845600e+02\n10 2143     4.368500e+02 6.071900e+02\n0 2144     1.166900e+02 -2.141100e+02\n1 2144     2.050500e+02 -2.146100e+02\n10 2144     6.396002e+01 -9.410999e+01\n0 2145     3.406899e+02 -1.471002e+01\n1 2145     5.081200e+02 -9.172998e+01\n10 2145     3.030699e+02 1.597000e+02\n15 2145     4.367600e+02 1.637700e+02\n0 2146     2.122500e+02 -3.239900e+02\n1 2146     2.750601e+02 -3.559700e+02\n12 2146     3.100300e+02 -2.546400e+02\n15 2146     2.986100e+02 -2.742200e+02\n0 2147     9.303003e+01 3.131000e+01\n1 2147     2.587700e+02 3.265997e+01\n3 2147     1.400700e+02 -2.294100e+02\n7 2147     3.799988e+00 1.608900e+02\n10 2147     1.096002e+01 1.872600e+02\n13 2147     4.531400e+02 -1.864600e+02\n15 2147     8.678003e+01 1.928700e+02\n0 2148     8.840002e+01 1.746400e+02\n1 2148     3.157600e+02 1.731900e+02\n10 2148     -9.010010e+00 3.541500e+02\n13 2148     4.042600e+02 -7.387000e+01\n14 2148     5.847700e+02 -5.560500e+02\n15 2148     6.582001e+01 3.884300e+02\n0 2149     6.726500e+02 -3.699700e+02\n1 2149     7.603700e+02 -5.777200e+02\n12 2149     7.732200e+02 -1.953500e+02\n0 2150     -1.870700e+02 -4.946400e+02\n1 2150     -1.541400e+02 -3.855100e+02\n6 2150     -8.253000e+01 -6.584000e+02\n7 2150     -1.902900e+02 -4.253100e+02\n9 2150     1.888000e+01 -4.403101e+02\n0 2151     5.702800e+02 1.133400e+02\n1 2151     8.338700e+02 -4.173999e+01\n0 2152     3.285999e+01 2.102500e+02\n1 2152     3.190200e+02 2.124500e+02\n6 2152     -3.079200e+02 1.775200e+02\n10 2152     -7.676001e+01 3.924800e+02\n14 2152     3.961899e+02 -5.456700e+02\n0 2153     -4.490600e+02 9.573001e+01\n1 2153     -1.809900e+02 2.328000e+02\n5 2153     -3.827002e+01 -5.896899e+02\n7 2153     -6.101100e+02 1.003700e+02\n0 2154     3.095100e+02 -1.559998e+00\n1 2154     4.742500e+02 -6.729999e+01\n0 2155     3.051300e+02 -5.996002e+01\n1 2155     4.514800e+02 -1.268900e+02\n7 2155     2.203800e+02 9.984000e+01\n10 2155     2.646000e+02 1.039800e+02\n15 2155     3.894301e+02 9.607999e+01\n0 2156     1.283400e+02 1.472700e+02\n1 2156     3.387300e+02 1.360500e+02\n0 2157     3.061400e+02 1.069600e+02\n1 2157     5.128400e+02 4.121002e+01\n0 2158     2.445601e+02 -2.231100e+02\n1 2158     3.294900e+02 -2.659100e+02\n7 2158     1.970800e+02 -6.365002e+01\n15 2158     3.265900e+02 -1.326900e+02\n0 2159     2.454301e+02 -3.026100e+02\n1 2159     3.149700e+02 -3.465800e+02\n10 2159     2.209500e+02 -1.814100e+02\n15 2159     3.407400e+02 -2.413300e+02\n0 2160     -2.321300e+02 -4.391500e+02\n1 2160     -1.744800e+02 -3.203700e+02\n9 2160     -6.429999e+01 -4.198400e+02\n0 2161     8.588000e+01 -9.251001e+01\n1 2161     2.147300e+02 -8.678003e+01\n7 2161     1.760999e+01 3.684998e+01\n10 2161     1.588000e+01 4.327002e+01\n15 2161     9.370001e+01 2.328998e+01\n0 2162     4.389000e+02 3.154500e+02\n1 2162     7.747700e+02 2.058200e+02\n7 2162     2.363500e+02 4.475700e+02\n11 2162     5.639900e+02 -4.140000e+02\n13 2162     6.020400e+02 5.098999e+01\n14 2162     8.335699e+02 -4.016000e+02\n0 2163     -2.052000e+02 -4.443700e+02\n1 2163     -1.519600e+02 -3.329500e+02\n7 2163     -2.216300e+02 -3.807800e+02\n9 2163     -3.420001e+01 -4.139500e+02\n15 2163     -2.492200e+02 -4.925100e+02\n0 2164     -3.653998e+01 1.371100e+02\n1 2164     1.781100e+02 1.704000e+02\n4 2164     -1.802100e+02 -3.772900e+02\n5 2164     5.498700e+02 -5.212300e+02\n7 2164     -1.560200e+02 2.364100e+02\n10 2164     -1.507800e+02 2.977000e+02\n13 2164     3.034000e+02 -1.144100e+02\n15 2164     -1.002800e+02 3.190300e+02\n0 2165     9.252002e+01 5.800000e+01\n1 2165     2.674900e+02 5.895001e+01\n7 2165     -1.739990e+00 1.868100e+02\n10 2165     8.250000e+00 2.180900e+02\n0 2166     1.771400e+02 3.871997e+01\n1 2166     3.449900e+02 1.528998e+01\n0 2167     2.978900e+02 -2.879100e+02\n1 2167     3.755000e+02 -3.511400e+02\n10 2167     2.795400e+02 -1.590600e+02\n15 2167     4.119500e+02 -2.146400e+02\n0 2168     -1.863600e+02 -5.011600e+02\n1 2168     -1.559100e+02 -3.915700e+02\n7 2168     -1.882600e+02 -4.310500e+02\n0 2169     2.096100e+02 3.177002e+01\n1 2169     3.762800e+02 -1.179993e+00\n3 2169     2.347700e+02 -2.121200e+02\n7 2169     1.165600e+02 1.788000e+02\n10 2169     1.465800e+02 1.991500e+02\n15 2169     2.459800e+02 2.096800e+02\n0 2170     2.951899e+02 -3.065200e+02\n1 2170     3.691600e+02 -3.686000e+02\n0 2171     -2.439000e+02 -4.438900e+02\n1 2171     -1.867400e+02 -3.208700e+02\n7 2171     -2.580700e+02 -3.849200e+02\n0 2172     -1.479600e+02 -1.170700e+02\n1 2172     -1.009998e+01 -4.192999e+01\n10 2172     -2.522000e+02 -1.063000e+01\n15 2172     -2.177800e+02 -4.187000e+01\n0 2173     -1.880800e+02 1.580200e+02\n1 2173     8.390002e+01 2.225100e+02\n4 2173     -1.673900e+02 -2.328100e+02\n7 2173     -3.502900e+02 2.017700e+02\n8 2173     -2.310600e+02 -9.287000e+01\n9 2173     -4.348900e+02 -2.031000e+01\n10 2173     -3.299200e+02 3.070800e+02\n13 2173     8.031000e+01 -1.335800e+02\n0 2174     -1.157100e+02 -5.090100e+02\n1 2174     -9.419000e+01 -4.224300e+02\n4 2174     -6.536000e+02 -2.930000e+02\n6 2174     9.150024e+00 -6.399200e+02\n9 2174     9.502002e+01 -4.214600e+02\n0 2175     -1.188600e+02 7.346997e+01\n1 2175     8.653003e+01 1.298400e+02\n4 2175     -2.132800e+02 -3.116300e+02\n5 2175     4.460200e+02 -5.966100e+02\n10 2175     -2.402000e+02 2.143800e+02\n12 2175     -2.237800e+02 9.175000e+01\n13 2175     2.265601e+02 -1.763100e+02\n15 2175     -2.014100e+02 2.205000e+02\n0 2176     -1.788700e+02 -7.600098e-01\n1 2176     5.469971e+00 7.626001e+01\n4 2176     -2.537200e+02 -2.696100e+02\n6 2176     -2.971400e+02 -6.926001e+01\n10 2176     -3.018400e+02 1.212800e+02\n12 2176     -2.679000e+02 -8.020020e+00\n15 2176     -2.733600e+02 1.109600e+02\n0 2177     -1.799200e+02 -4.204999e+01\n1 2177     -1.197998e+01 3.822998e+01\n4 2177     -2.798800e+02 -2.711800e+02\n6 2177     -2.641700e+02 -1.113300e+02\n7 2177     -2.694100e+02 3.291998e+01\n10 2177     -2.978200e+02 7.321002e+01\n12 2177     -2.464000e+02 -4.945001e+01\n15 2177     -2.699400e+02 5.534998e+01\n0 2178     1.904500e+02 7.527002e+01\n1 2178     3.715900e+02 4.738000e+01\n2 2178     3.041600e+02 1.320700e+02\n4 2178     -2.451300e+02 -5.630300e+02\n6 2178     1.412900e+02 1.578800e+02\n7 2178     8.989001e+01 2.178500e+02\n9 2178     1.376300e+02 2.059000e+02\n10 2178     1.196000e+02 2.481600e+02\n12 2178     1.704000e+02 2.065900e+02\n13 2178     5.262600e+02 -1.432800e+02\n15 2178     2.148300e+02 2.663300e+02\n0 2179     -9.760010e+00 8.404999e+01\n1 2179     1.807500e+02 1.126700e+02\n4 2179     -2.151700e+02 -4.032200e+02\n5 2179     6.081500e+02 -5.767100e+02\n7 2179     -1.129100e+02 1.929200e+02\n10 2179     -1.137100e+02 2.380300e+02\n12 2179     -6.840002e+01 1.590600e+02\n15 2179     -5.826001e+01 2.505100e+02\n0 2180     3.408900e+02 -1.599900e+02\n1 2180     4.540601e+02 -2.365600e+02\n7 2180     2.713400e+02 1.016998e+01\n10 2180     3.163000e+02 -8.250000e+00\n12 2180     4.007200e+02 -2.253998e+01\n15 2180     4.527900e+02 -3.502002e+01\n0 2181     -1.670000e+02 -5.010200e+02\n1 2181     -1.385700e+02 -3.978000e+02\n0 2182     2.880800e+02 5.117999e+01\n1 2182     4.688000e+02 -7.619995e+00\n7 2182     1.839500e+02 2.062200e+02\n10 2182     2.353000e+02 2.305700e+02\n0 2183     3.206000e+01 4.216998e+01\n1 2183     2.043300e+02 6.031000e+01\n7 2183     -5.997998e+01 1.603800e+02\n10 2183     -6.100000e+01 1.930700e+02\n13 2183     3.965601e+02 -1.831400e+02\n15 2183     2.609985e+00 1.985800e+02\n0 2184     -4.359700e+02 1.031200e+02\n1 2184     -1.665100e+02 2.362200e+02\n4 2184     -1.721600e+02 -8.290997e+01\n0 2185     2.781000e+02 4.715997e+01\n1 2185     4.559700e+02 -8.320007e+00\n7 2185     1.763700e+02 2.016900e+02\n10 2185     2.241300e+02 2.238700e+02\n13 2185     5.984800e+02 -1.614100e+02\n15 2185     3.402700e+02 2.395100e+02\n0 2186     4.060200e+02 -4.694900e+02\n1 2186     4.291100e+02 -5.705100e+02\n0 2187     2.349200e+02 4.872500e+02\n1 2187     6.260100e+02 4.363100e+02\n9 2187     -2.185100e+02 2.867800e+02\n14 2187     5.420900e+02 -2.391500e+02\n0 2188     2.349200e+02 4.872500e+02\n1 2188     6.260100e+02 4.363100e+02\n9 2188     -2.185100e+02 2.867800e+02\n14 2188     5.420900e+02 -2.391500e+02\n0 2189     2.305900e+02 4.757200e+02\n1 2189     6.179600e+02 4.252400e+02\n14 2189     5.385800e+02 -2.514100e+02\n0 2190     3.757000e+02 4.710300e+02\n1 2190     7.808000e+02 3.823900e+02\n0 2191     1.369300e+02 4.621100e+02\n1 2191     5.117700e+02 4.355800e+02\n0 2192     2.130400e+02 4.303500e+02\n1 2192     5.865900e+02 3.827000e+02\n0 2193     -4.637000e+02 3.205800e+02\n1 2193     -1.255200e+02 4.465700e+02\n7 2193     -6.740200e+02 3.253400e+02\n10 2193     -6.852700e+02 4.782100e+02\n12 2193     -8.103700e+02 2.114300e+02\n15 2193     -7.033200e+02 5.141800e+02\n0 2194     -1.660999e+01 1.524400e+02\n1 2194     2.019500e+02 1.803700e+02\n10 2194     -1.286500e+02 3.176500e+02\n15 2194     -7.514001e+01 3.427800e+02\n0 2195     -1.196100e+02 5.309998e+00\n1 2195     5.879999e+01 6.602002e+01\n0 2196     6.198500e+02 -1.697998e+01\n1 2196     8.445699e+02 -1.947400e+02\n0 2197     3.075699e+02 -1.861100e+02\n1 2197     4.087300e+02 -2.508400e+02\n7 2197     2.467000e+02 -1.912000e+01\n10 2197     2.804000e+02 -4.159003e+01\n12 2197     3.799600e+02 -5.639001e+01\n15 2197     4.095601e+02 -7.487000e+01\n0 2198     6.396500e+02 -2.431300e+02\n1 2198     7.767700e+02 -4.345500e+02\n0 2199     7.181300e+02 -3.491400e+02\n1 2199     8.225400e+02 -5.756700e+02\n12 2199     8.066500e+02 -1.632100e+02\n0 2200     1.597700e+02 4.804700e+02\n1 2200     5.418500e+02 4.486100e+02\n2 2200     -1.446300e+02 2.393700e+02\n6 2200     -2.994400e+02 5.290100e+02\n7 2200     -7.009998e+01 5.643000e+02\n8 2200     -3.902002e+01 1.846600e+02\n13 2200     3.166899e+02 1.625900e+02\n14 2200     4.690000e+02 -2.497900e+02\n0 2201     3.801000e+02 4.858700e+02\n1 2201     7.904100e+02 3.971800e+02\n14 2201     6.863500e+02 -2.321500e+02\n0 2202     -5.678998e+01 4.667300e+02\n1 2202     3.091600e+02 4.892700e+02\n11 2202     9.709998e+01 -2.944800e+02\n0 2203     -5.409973e+00 4.560600e+02\n1 2203     3.603199e+02 4.659800e+02\n5 2203     3.977300e+02 -1.962800e+02\n6 2203     -4.766900e+02 4.626700e+02\n7 2203     -2.265000e+02 5.221600e+02\n14 2203     3.082400e+02 -2.818500e+02\n0 2204     1.997500e+02 4.465600e+02\n1 2204     5.761801e+02 4.031500e+02\n7 2204     -2.800000e+01 5.341500e+02\n0 2205     9.790997e+01 4.382700e+02\n1 2205     4.644399e+02 4.209800e+02\n7 2205     -1.240800e+02 5.149600e+02\n0 2206     2.056600e+02 4.068300e+02\n1 2206     5.717400e+02 3.602800e+02\n14 2206     5.176300e+02 -3.257100e+02\n0 2207     5.709003e+01 2.161600e+02\n1 2207     3.456400e+02 2.115800e+02\n10 2207     -4.853003e+01 4.022100e+02\n0 2208     2.998900e+02 1.934000e+02\n1 2208     5.860400e+02 1.196900e+02\n10 2208     2.369000e+02 4.000800e+02\n0 2209     -4.698200e+02 1.290900e+02\n1 2209     -1.881000e+02 2.687500e+02\n0 2210     -4.253800e+02 9.104001e+01\n1 2210     -1.614600e+02 2.224100e+02\n0 2211     1.939000e+02 7.363000e+01\n1 2211     3.744900e+02 4.465997e+01\n6 2211     1.453800e+02 1.575500e+02\n7 2211     9.379999e+01 2.170200e+02\n0 2212     5.673101e+02 -2.020020e+00\n1 2212     7.946100e+02 -1.623300e+02\n7 2212     4.190000e+02 1.703900e+02\n0 2213     4.803700e+02 -2.472500e+02\n1 2213     5.978000e+02 -3.787900e+02\n0 2214     6.236300e+02 -2.852000e+02\n1 2214     7.405300e+02 -4.711899e+02\n0 2215     7.254900e+02 -2.999600e+02\n1 2215     8.528500e+02 -5.283101e+02\n12 2215     7.903400e+02 -1.148900e+02\n0 2216     4.616801e+02 -4.580000e+02\n1 2216     4.919200e+02 -5.809100e+02\n0 2217     1.438600e+02 -5.546300e+02\n1 2217     1.332800e+02 -5.547400e+02\n4 2217     -7.696500e+02 -5.184399e+02\n7 2217     1.516200e+02 -4.131900e+02\n9 2217     3.356100e+02 -3.576500e+02\n10 2217     1.311300e+02 -4.801899e+02\n0 2218     -4.662300e+02 3.169300e+02\n1 2218     -1.280000e+02 4.437100e+02\n10 2218     -6.866900e+02 4.740800e+02\n11 2218     -2.708500e+02 -4.265800e+02\n0 2219     2.424301e+02 3.341800e+02\n1 2219     5.821700e+02 2.770900e+02\n9 2219     -1.542700e+02 1.720600e+02\n11 2219     3.787700e+02 -4.046100e+02\n13 2219     4.053300e+02 4.491998e+01\n14 2219     5.823800e+02 -4.006700e+02\n0 2220     4.864000e+02 2.788300e+02\n1 2220     8.120699e+02 1.540800e+02\n7 2220     2.893800e+02 4.200200e+02\n13 2220     6.537000e+02 2.463000e+01\n0 2221     4.763000e+01 2.496400e+02\n1 2221     3.488800e+02 2.468300e+02\n7 2221     -1.356100e+02 3.259900e+02\n10 2221     -6.359003e+01 4.406100e+02\n11 2221     1.964900e+02 -4.913101e+02\n0 2222     -4.258200e+02 2.355800e+02\n1 2222     -1.119300e+02 3.563000e+02\n5 2222     -4.473999e+01 -4.354800e+02\n13 2222     -1.552000e+02 -8.051001e+01\n14 2222     -1.241800e+02 -5.305100e+02\n0 2223     5.684200e+02 2.209500e+02\n1 2223     8.660300e+02 7.335999e+01\n7 2223     3.899900e+02 3.874900e+02\n10 2223     5.476500e+02 4.613000e+02\n0 2224     -4.811400e+02 1.771700e+02\n1 2224     -1.819800e+02 3.157200e+02\n7 2224     -6.644800e+02 1.756700e+02\n10 2224     -6.858700e+02 3.021500e+02\n13 2224     -1.911100e+02 -1.322400e+02\n0 2225     -7.151001e+01 1.750700e+02\n1 2225     2.028700e+02 2.073600e+02\n0 2226     -4.348300e+02 1.110500e+02\n1 2226     -1.629000e+02 2.432800e+02\n0 2227     4.728998e+01 1.147300e+02\n1 2227     2.443700e+02 1.270200e+02\n7 2227     -6.070001e+01 2.332600e+02\n15 2227     1.471997e+01 3.006100e+02\n0 2228     5.670001e+01 6.277002e+01\n1 2228     2.347700e+02 7.385999e+01\n7 2228     -3.903998e+01 1.850900e+02\n8 2228     1.815000e+02 3.459000e+01\n10 2228     -3.315997e+01 2.202500e+02\n13 2228     4.151801e+02 -1.633400e+02\n15 2228     3.337000e+01 2.305400e+02\n0 2229     5.526100e+02 2.772998e+01\n1 2229     7.888800e+02 -1.262900e+02\n10 2229     5.452700e+02 2.311200e+02\n0 2230     -1.164100e+02 9.330017e+00\n1 2230     6.342999e+01 6.879999e+01\n6 2230     -2.115100e+02 -2.819000e+01\n7 2230     -2.139100e+02 9.587000e+01\n0 2231     5.861300e+02 1.897998e+01\n1 2231     8.204000e+02 -1.458600e+02\n10 2231     5.849500e+02 2.247700e+02\n12 2231     5.159500e+02 1.613900e+02\n15 2231     7.852500e+02 2.429000e+02\n0 2232     5.861300e+02 1.897998e+01\n1 2232     8.204000e+02 -1.458600e+02\n15 2232     7.852500e+02 2.429000e+02\n0 2233     -1.755100e+02 -6.295001e+01\n1 2233     -1.566998e+01 1.684998e+01\n10 2233     -2.909400e+02 5.056000e+01\n15 2233     -2.616400e+02 2.767999e+01\n0 2234     1.094500e+02 -3.123800e+02\n1 2234     1.754301e+02 -3.094200e+02\n0 2235     7.439600e+02 -3.013100e+02\n1 2235     8.744500e+02 -5.377000e+02\n7 2235     6.409700e+02 -7.222998e+01\n0 2236     4.095500e+02 -4.713400e+02\n1 2236     4.324700e+02 -5.736700e+02\n0 2237     -4.627400e+02 1.279000e+02\n1 2237     -1.820800e+02 2.658600e+02\n0 2238     2.074600e+02 4.273200e+02\n1 2238     5.792800e+02 3.807100e+02\n7 2238     -1.834003e+01 5.151900e+02\n11 2238     3.410300e+02 -3.203100e+02\n0 2239     8.647998e+01 -1.172400e+02\n1 2239     2.085300e+02 -1.114600e+02\n2 2239     2.809700e+02 -7.590002e+01\n3 2239     1.907100e+02 -3.795300e+02\n7 2239     2.187000e+01 1.167999e+01\n10 2239     1.923999e+01 1.445001e+01\n13 2239     4.630100e+02 -3.162900e+02\n15 2239     9.809003e+01 -1.028003e+01\n0 2240     -1.934200e+02 2.071600e+02\n1 2240     9.691998e+01 2.705900e+02\n0 2241     6.120900e+02 -3.498500e+02\n1 2241     6.999700e+02 -5.322500e+02\n0 2242     2.150200e+02 3.379600e+02\n1 2242     5.544301e+02 2.886000e+02\n0 2243     6.217800e+02 -3.372100e+02\n1 2243     7.165601e+02 -5.233199e+02\n0 2244     -4.554000e+02 3.140500e+02\n1 2244     -1.196900e+02 4.397000e+02\n11 2244     -2.616700e+02 -4.286400e+02\n0 2245     6.326300e+02 -3.184700e+02\n1 2245     7.374000e+02 -5.093300e+02\n7 2245     5.486899e+02 -1.055200e+02\n0 2246     5.194900e+02 -1.426200e+02\n1 2246     6.850900e+02 -2.883400e+02\n0 2247     -2.005100e+02 1.658900e+02\n1 2247     7.510999e+01 2.331700e+02\n0 2248     2.196300e+02 1.633400e+02\n1 2248     4.398800e+02 1.244000e+02\n7 2248     9.390997e+01 3.018900e+02\n10 2248     1.450000e+02 3.542900e+02\n13 2248     5.204700e+02 -7.225000e+01\n14 2248     7.357100e+02 -5.597400e+02\n15 2248     2.470601e+02 3.915300e+02\n0 2249     5.465100e+02 1.409973e+00\n1 2249     7.744000e+02 -1.513900e+02\n7 2249     3.976200e+02 1.696000e+02\n12 2249     4.731100e+02 1.247000e+02\n13 2249     7.652500e+02 -2.061300e+02\n0 2250     3.593500e+02 -1.949200e+02\n1 2250     4.584900e+02 -2.772500e+02\n7 2250     2.975500e+02 -1.829999e+01\n10 2250     3.407800e+02 -4.604999e+01\n15 2250     4.817800e+02 -7.972998e+01\n0 2251     7.435999e+01 2.168300e+02\n1 2251     3.630900e+02 2.073800e+02\n6 2251     -2.620800e+02 1.973200e+02\n10 2251     -2.922998e+01 4.042300e+02\n0 2252     6.273999e+01 -5.301001e+01\n1 2252     2.036700e+02 -4.092999e+01\n9 2252     9.160999e+01 8.544000e+01\n13 2252     4.369900e+02 -2.616200e+02\n0 2253     -1.708200e+02 1.395500e+02\n1 2253     9.390002e+01 2.003400e+02\n5 2253     2.701899e+02 -5.439200e+02\n9 2253     -4.085600e+02 -2.696997e+01\n0 2254     -9.950012e+00 1.514300e+02\n1 2254     2.067200e+02 1.773100e+02\n6 2254     -1.394400e+02 1.713000e+02\n7 2254     -1.310100e+02 2.559100e+02\n10 2254     -1.212800e+02 3.166600e+02\n12 2254     -1.027700e+02 2.232800e+02\n13 2254     3.273500e+02 -9.934003e+01\n0 2255     6.306500e+02 -3.522300e+02\n1 2255     7.200601e+02 -5.420500e+02\n0 2256     3.310601e+02 -5.161700e+02\n1 2256     3.337500e+02 -5.872300e+02\n0 2257     2.523900e+02 2.968500e+02\n1 2257     5.776801e+02 2.367100e+02\n0 2258     2.523900e+02 2.968500e+02\n1 2258     5.776801e+02 2.367100e+02\n0 2259     -8.553998e+01 1.127800e+02\n1 2259     1.342100e+02 1.581100e+02\n7 2259     -2.102200e+02 1.976200e+02\n10 2259     -2.039200e+02 2.651300e+02\n15 2259     -1.595700e+02 2.791500e+02\n0 2260     5.698800e+02 -6.469971e+00\n1 2260     7.962200e+02 -1.675300e+02\n6 2260     4.191800e+02 1.145400e+02\n7 2260     4.221100e+02 1.667300e+02\n10 2260     5.685500e+02 1.938500e+02\n0 2261     6.333199e+02 -2.459800e+02\n1 2261     7.677200e+02 -4.354301e+02\n7 2261     5.320500e+02 -4.070001e+01\n10 2261     6.629399e+02 -7.602002e+01\n12 2261     6.748199e+02 -8.820001e+01\n0 2262     -1.003400e+02 2.950300e+02\n1 2262     2.190000e+02 3.303200e+02\n7 2262     -2.952400e+02 3.476600e+02\n11 2262     5.972998e+01 -4.501700e+02\n13 2262     1.190300e+02 -1.117999e+01\n14 2262     2.218700e+02 -4.583400e+02\n0 2263     6.878998e+01 2.654600e+02\n1 2263     3.759700e+02 2.564300e+02\n4 2263     -1.284000e+02 -3.967800e+02\n6 2263     -3.032300e+02 2.490600e+02\n7 2263     -1.199100e+02 3.438400e+02\n9 2263     -2.622600e+02 1.018400e+02\n11 2263     2.166700e+02 -4.757600e+02\n12 2263     -1.600700e+02 2.636500e+02\n13 2263     2.736000e+02 -2.379999e+01\n14 2263     4.166700e+02 -4.828600e+02\n0 2264     6.984003e+01 2.252200e+02\n1 2264     3.623000e+02 2.166700e+02\n5 2264     5.185300e+02 -4.453800e+02\n6 2264     -2.738500e+02 2.051300e+02\n7 2264     -1.083100e+02 3.065700e+02\n11 2264     2.182900e+02 -5.154600e+02\n13 2264     2.860200e+02 -5.745001e+01\n14 2264     4.325601e+02 -5.273700e+02\n0 2265     2.885300e+02 1.668700e+02\n1 2265     5.636300e+02 9.664001e+01\n0 2266     1.083500e+02 6.582001e+01\n1 2266     2.852800e+02 6.226001e+01\n15 2266     1.030100e+02 2.424000e+02\n0 2267     -1.722700e+02 3.806000e+01\n1 2267     2.725000e+01 1.106000e+02\n10 2267     -2.980200e+02 1.676800e+02\n12 2267     -2.800500e+02 3.266998e+01\n15 2267     -2.685600e+02 1.649700e+02\n0 2268     -3.670600e+02 3.609985e+00\n1 2268     -1.387500e+02 1.259200e+02\n7 2268     -5.001800e+02 2.529999e+01\n0 2269     3.721700e+02 1.706000e+01\n1 2269     5.579399e+02 -7.121997e+01\n6 2269     2.958900e+02 1.242200e+02\n7 2269     2.593700e+02 1.782200e+02\n13 2269     6.614000e+02 -1.878100e+02\n15 2269     4.776300e+02 2.111300e+02\n0 2270     2.930400e+02 -6.140015e+00\n1 2270     4.542600e+02 -6.640997e+01\n13 2270     6.192300e+02 -2.061100e+02\n15 2270     3.673600e+02 1.688800e+02\n0 2271     2.247200e+02 3.633100e+02\n1 2271     5.759600e+02 3.111400e+02\n7 2271     1.103003e+01 4.565500e+02\n13 2271     3.824700e+02 6.758002e+01\n14 2271     5.525699e+02 -3.710100e+02\n0 2272     4.637900e+02 2.925700e+02\n1 2272     7.929700e+02 1.750900e+02\n0 2273     -3.138300e+02 -1.118300e+02\n1 2273     -1.311300e+02 4.710022e+00\n13 2273     3.240002e+01 -3.690200e+02\n15 2273     -4.337300e+02 -5.825000e+01\n0 2274     6.401000e+02 -2.541200e+02\n1 2274     7.722600e+02 -4.459000e+02\n7 2274     5.404399e+02 -4.709003e+01\n0 2275     6.494900e+02 -2.772500e+02\n1 2275     7.734500e+02 -4.734600e+02\n7 2275     5.533500e+02 -6.637000e+01\n12 2275     7.061801e+02 -1.142400e+02\n0 2276     7.999878e-01 3.890002e+01\n1 2276     1.745200e+02 6.690002e+01\n6 2276     -5.078003e+01 5.790997e+01\n8 2276     1.383200e+02 -4.800110e-01\n12 2276     -3.503003e+01 1.138400e+02\n15 2276     -3.856000e+01 1.899900e+02\n0 2277     -4.426000e+02 -1.280029e+00\n1 2277     -2.087500e+02 1.418000e+02\n0 2278     1.438600e+02 -5.546300e+02\n1 2278     1.332800e+02 -5.547400e+02\n10 2278     1.311300e+02 -4.801899e+02\n0 2279     1.425200e+02 -5.496400e+02\n1 2279     1.338800e+02 -5.495200e+02\n7 2279     1.493199e+02 -4.089000e+02\n10 2279     1.296400e+02 -4.745699e+02\n0 2280     4.486600e+02 3.227000e+02\n1 2280     7.874900e+02 2.104000e+02\n10 2280     4.000200e+02 5.693300e+02\n13 2280     6.118101e+02 5.795001e+01\n0 2281     5.309800e+02 9.719971e+00\n1 2281     7.612700e+02 -1.381900e+02\n7 2281     3.808700e+02 1.746000e+02\n10 2281     5.214900e+02 2.089000e+02\n0 2282     6.412100e+02 -2.879900e+02\n1 2282     7.597300e+02 -4.815500e+02\n0 2283     1.055100e+02 4.190400e+02\n1 2283     4.676700e+02 3.995500e+02\n7 2283     -1.144600e+02 4.962000e+02\n14 2283     4.175900e+02 -3.174400e+02\n0 2284     3.778998e+01 2.125700e+02\n1 2284     3.247100e+02 2.133600e+02\n6 2284     -3.037000e+02 1.817500e+02\n10 2284     -7.169000e+01 3.950200e+02\n0 2285     6.187000e+02 1.388000e+01\n1 2285     8.530500e+02 -1.619100e+02\n2 2285     5.583101e+02 -1.099854e-01\n6 2285     4.747300e+02 1.590700e+02\n7 2285     4.677600e+02 1.962900e+02\n13 2285     8.397100e+02 -1.839400e+02\n0 2286     4.051001e+01 -4.373999e+01\n1 2286     1.854800e+02 -2.558002e+01\n15 2286     2.528003e+01 8.275000e+01\n0 2287     6.263000e+02 -2.714000e+02\n1 2287     7.496200e+02 -4.584000e+02\n7 2287     5.315699e+02 -6.494000e+01\n15 2287     8.727700e+02 -1.523200e+02\n0 2288     5.199500e+02 -3.962000e+02\n1 2288     5.797900e+02 -5.422000e+02\n7 2288     4.648900e+02 -1.953600e+02\n0 2289     2.144399e+02 3.622600e+02\n1 2289     5.632200e+02 3.130400e+02\n0 2290     5.727000e+02 6.035999e+01\n1 2290     8.199000e+02 -9.812000e+01\n6 2290     4.054000e+02 1.916800e+02\n7 2290     4.162300e+02 2.319300e+02\n13 2290     7.863300e+02 -1.490600e+02\n15 2290     7.621100e+02 2.986900e+02\n0 2291     2.272300e+02 -5.953998e+01\n1 2291     3.658900e+02 -9.771997e+01\n2 2291     3.910800e+02 1.309998e+01\n6 2291     2.277600e+02 2.459998e+01\n7 2291     1.489700e+02 9.229999e+01\n13 2291     5.773199e+02 -2.550100e+02\n15 2291     2.820200e+02 8.698999e+01\n0 2292     4.538500e+02 2.998300e+02\n1 2292     7.854399e+02 1.854600e+02\n7 2292     2.536400e+02 4.352100e+02\n10 2292     4.077100e+02 5.427600e+02\n0 2293     -2.743400e+02 4.808002e+01\n1 2293     -3.721997e+01 1.422400e+02\n0 2294     3.126600e+02 2.268000e+02\n1 2294     6.129301e+02 1.498300e+02\n0 2295     -4.801800e+02 1.323600e+02\n1 2295     -1.963600e+02 2.744100e+02\n7 2295     -6.531800e+02 1.315700e+02\n0 2296     2.306100e+02 1.237000e+01\n1 2296     3.922500e+02 -2.757001e+01\n0 2297     1.819600e+02 -2.236000e+02\n1 2297     2.658500e+02 -2.451200e+02\n15 2297     2.408101e+02 -1.413800e+02\n0 2298     -2.800400e+02 -4.605300e+02\n1 2298     -2.255600e+02 -3.243300e+02\n4 2298     -5.723100e+02 -1.686100e+02\n6 2298     -2.177600e+02 -6.669600e+02\n7 2298     -2.942300e+02 -4.115200e+02\n10 2298     -3.674100e+02 -4.221200e+02\n0 2299     1.907500e+02 3.311700e+02\n1 2299     5.263700e+02 2.881600e+02\n10 2299     9.573999e+01 5.536300e+02\n13 2299     3.619200e+02 3.909003e+01\n0 2300     -4.614900e+02 1.332900e+02\n1 2300     -1.790000e+02 2.705800e+02\n4 2300     -1.532400e+02 -6.894000e+01\n0 2301     2.359600e+02 -3.281200e+02\n1 2301     3.051700e+02 -3.681600e+02\n0 2302     -2.240000e+02 -4.203100e+02\n1 2302     -1.607700e+02 -3.058000e+02\n7 2302     -2.472000e+02 -3.612100e+02\n10 2302     -3.069500e+02 -3.695600e+02\n15 2302     -2.777300e+02 -4.629100e+02\n0 2303     3.169301e+02 2.182200e+02\n1 2303     6.142800e+02 1.396200e+02\n7 2303     1.336000e+02 3.349900e+02\n10 2303     2.550601e+02 4.313000e+02\n0 2304     3.294399e+02 2.119600e+02\n1 2304     6.250500e+02 1.298200e+02\n0 2305     5.099600e+02 -3.558600e+02\n1 2305     5.859200e+02 -4.980699e+02\n7 2305     4.462200e+02 -1.607100e+02\n0 2306     -2.282100e+02 -4.301600e+02\n1 2306     -1.680500e+02 -3.131400e+02\n0 2307     -6.701001e+01 -1.431000e+02\n1 2307     5.557001e+01 -8.992999e+01\n7 2307     -1.285100e+02 -4.273999e+01\n10 2307     -1.558400e+02 -3.182001e+01\n15 2307     -1.059400e+02 -6.569000e+01\n0 2308     4.921100e+02 4.303600e+02\n1 2308     8.678700e+02 3.150900e+02\n7 2308     2.746100e+02 5.694200e+02\n9 2308     8.071997e+01 3.544900e+02\n0 2309     -4.410000e+02 3.058600e+02\n1 2309     -1.073700e+02 4.272300e+02\n7 2309     -6.477600e+02 3.127300e+02\n10 2309     -6.546000e+02 4.617700e+02\n12 2309     -7.791100e+02 1.960800e+02\n15 2309     -6.684800e+02 4.963900e+02\n0 2310     -2.782200e+02 3.416300e+02\n1 2310     5.640002e+01 4.215000e+02\n7 2310     -4.827500e+02 3.722100e+02\n15 2310     -4.474200e+02 5.676100e+02\n0 2311     -4.632600e+02 1.645900e+02\n1 2311     -1.696300e+02 3.000100e+02\n7 2311     -6.421700e+02 1.660200e+02\n0 2312     -2.053600e+02 2.207900e+02\n1 2312     9.026001e+01 2.869200e+02\n7 2312     -3.847600e+02 2.610700e+02\n14 2312     1.275300e+02 -5.427100e+02\n15 2312     -3.282300e+02 4.089100e+02\n0 2313     -3.315700e+02 2.135700e+02\n1 2313     -3.137000e+01 3.122600e+02\n7 2313     -5.134400e+02 2.345800e+02\n10 2313     -5.077300e+02 3.602200e+02\n11 2313     -1.559900e+02 -5.257000e+02\n0 2314     -3.589200e+02 3.312200e+02\n1 2314     -2.431000e+01 4.312000e+02\n4 2314     -5.350000e+01 -1.393600e+02\n7 2314     -5.640600e+02 3.509100e+02\n10 2314     -5.568000e+02 4.997600e+02\n13 2314     -9.672998e+01 7.250000e+00\n15 2314     -5.579200e+02 5.428000e+02\n0 2315     -4.318900e+02 3.592800e+02\n1 2315     -8.641998e+01 4.763100e+02\n10 2315     -6.514200e+02 5.284900e+02\n15 2315     -6.659500e+02 5.730300e+02\n0 2316     -3.343600e+02 5.840002e+01\n1 2316     -8.913000e+01 1.681400e+02\n10 2316     -4.917200e+02 1.756800e+02\n0 2317     -3.791600e+02 3.809800e+02\n1 2317     -3.303003e+01 4.856000e+02\n7 2317     -5.923800e+02 4.027100e+02\n11 2317     -1.902500e+02 -3.702500e+02\n0 2318     -4.220900e+02 2.885300e+02\n1 2318     -9.476001e+01 4.060100e+02\n7 2318     -6.238000e+02 2.976400e+02\n11 2318     -2.331700e+02 -4.529800e+02\n12 2318     -7.503500e+02 1.803100e+02\n0 2319     -4.783500e+02 1.632000e+02\n1 2319     -1.840400e+02 3.024300e+02\n7 2319     -6.579100e+02 1.617000e+02\n13 2319     -1.857200e+02 -1.436500e+02\n0 2320     -4.342900e+02 2.598999e+01\n1 2320     -1.922300e+02 1.645000e+02\n10 2320     -6.081300e+02 1.262800e+02\n0 2321     5.408500e+02 -3.036100e+02\n1 2321     6.410900e+02 -4.579500e+02\n2 2321     6.709100e+02 -2.623900e+02\n7 2321     4.618300e+02 -1.081000e+02\n12 2321     6.099700e+02 -1.683300e+02\n0 2322     7.969000e+01 -5.538000e+02\n1 2322     7.210999e+01 -5.311200e+02\n6 2322     2.500100e+02 -5.985601e+02\n7 2322     8.963000e+01 -4.255900e+02\n9 2322     2.872100e+02 -3.788700e+02\n10 2322     5.760999e+01 -4.864900e+02\n12 2322     2.429700e+02 -5.702400e+02\n0 2323     -2.048600e+02 -5.259100e+02\n1 2323     -1.818600e+02 -4.086200e+02\n0 2324     4.021500e+02 -5.998999e+01\n1 2324     5.614900e+02 -1.584300e+02\n0 2325     -2.913600e+02 -4.287400e+02\n1 2325     -2.242600e+02 -2.918500e+02\n4 2325     -5.437100e+02 -1.609000e+02\n7 2325     -3.145700e+02 -3.831200e+02\n10 2325     -3.843000e+02 -3.861900e+02\n15 2325     -3.674900e+02 -4.829200e+02\n0 2326     1.838800e+02 1.577002e+01\n1 2326     3.443199e+02 -1.001001e+01\n15 2326     2.127800e+02 1.838800e+02\n0 2327     -6.850100e+02 -5.167800e+02\n1 2327     -5.893600e+02 -2.484600e+02\n0 2328     2.918600e+02 2.515002e+01\n1 2328     4.634500e+02 -3.466998e+01\n0 2329     -2.190500e+02 -1.187600e+02\n1 2329     -5.497998e+01 -2.744000e+01\n0 2330     -3.547998e+01 -1.650800e+02\n1 2330     7.690002e+01 -1.202200e+02\n0 2331     1.028700e+02 -3.379100e+02\n1 2331     1.643600e+02 -3.328100e+02\n10 2331     6.170001e+01 -2.370500e+02\n15 2331     1.520500e+02 -3.068100e+02\n0 2332     -1.396900e+02 -1.045900e+02\n1 2332     1.760010e+00 -3.215997e+01\n6 2332     -1.709700e+02 -1.597500e+02\n7 2332     -2.121400e+02 -1.912000e+01\n12 2332     -1.661700e+02 -1.003000e+02\n15 2332     -2.085000e+02 -2.378998e+01\n0 2333     2.822000e+02 -1.854500e+02\n1 2333     3.827500e+02 -2.415900e+02\n10 2333     2.514200e+02 -4.364001e+01\n15 2333     3.740100e+02 -7.715997e+01\n0 2334     9.456000e+01 -2.377000e+02\n1 2334     1.733500e+02 -2.299400e+02\n7 2334     5.584003e+01 -1.028800e+02\n10 2334     4.152002e+01 -1.238600e+02\n15 2334     1.237200e+02 -1.721300e+02\n0 2335     -2.456600e+02 -5.066600e+02\n1 2335     -2.114600e+02 -3.774100e+02\n7 2335     -2.474900e+02 -4.499000e+02\n9 2335     -2.697998e+01 -4.724100e+02\n10 2335     -3.224300e+02 -4.716300e+02\n0 2336     1.967600e+02 -1.084700e+02\n1 2336     3.204700e+02 -1.376400e+02\n6 2336     2.132700e+02 -4.047998e+01\n12 2336     2.355500e+02 1.770020e+00\n15 2336     2.471801e+02 1.628003e+01\n0 2337     9.898999e+01 -2.900100e+02\n1 2337     1.674900e+02 -2.828400e+02\n0 2338     1.758199e+02 -3.301300e+02\n1 2338     2.379200e+02 -3.498800e+02\n10 2338     1.440600e+02 -2.202400e+02\n15 2338     2.500699e+02 -2.869300e+02\n0 2339     7.603998e+01 -2.239400e+02\n1 2339     1.609600e+02 -2.107700e+02\n12 2339     1.484100e+02 -1.567800e+02\n0 2340     -6.608700e+02 -5.025400e+02\n1 2340     -5.654300e+02 -2.438800e+02\n0 2341     2.429301e+02 -2.412400e+02\n1 2341     3.195400e+02 -2.826600e+02\n10 2341     2.123400e+02 -1.116300e+02\n15 2341     3.268500e+02 -1.577100e+02\n0 2342     1.309400e+02 -4.132001e+01\n1 2342     2.730300e+02 -4.990002e+01\n15 2342     1.475000e+02 9.866000e+01\n0 2343     -3.165000e+02 -5.567400e+02\n1 2343     -2.923900e+02 -3.992300e+02\n0 2344     1.730500e+02 -2.690997e+01\n1 2344     3.196100e+02 -4.826001e+01\n0 2345     1.868600e+02 -1.329999e+01\n1 2345     3.378700e+02 -3.978003e+01\n10 2345     1.240300e+02 1.453100e+02\n15 2345     2.204500e+02 1.445100e+02\n0 2346     -1.409500e+02 -5.381400e+02\n1 2346     -1.285000e+02 -4.400601e+02\n0 2347     -3.547998e+01 -1.650800e+02\n1 2347     7.690002e+01 -1.202200e+02\n0 2348     2.918600e+02 2.515002e+01\n1 2348     4.634500e+02 -3.466998e+01\n15 2348     3.621600e+02 2.115900e+02\n0 2349     -8.226600e+02 -4.331899e+02\n1 2349     -6.712700e+02 -1.373000e+02\n0 2350     3.931100e+02 5.037000e+01\n1 2350     5.997500e+02 -4.578003e+01\n15 2350     5.050699e+02 2.602500e+02\n0 2351     2.555100e+02 -2.739200e+02\n1 2351     3.308101e+02 -3.210800e+02\n15 2351     3.501700e+02 -2.009700e+02\n0 2352     2.300000e+02 1.422998e+01\n1 2352     3.922300e+02 -2.534998e+01\n15 2352     2.766801e+02 1.886100e+02\n0 2353     1.315500e+02 -7.716998e+01\n1 2353     2.634399e+02 -8.534998e+01\n6 2353     1.416800e+02 -2.301001e+01\n8 2353     2.879800e+02 -6.406000e+01\n0 2354     1.408900e+02 3.380005e+00\n1 2354     2.969000e+02 -8.919983e+00\n7 2354     5.633002e+01 1.415100e+02\n10 2354     7.014001e+01 1.598000e+02\n15 2354     1.554200e+02 1.608700e+02\n0 2355     1.613101e+02 -1.474200e+02\n1 2355     2.708199e+02 -1.639800e+02\n7 2355     1.021100e+02 -4.010010e+00\n15 2355     2.030400e+02 -4.114001e+01\n0 2356     -2.523800e+02 -4.514700e+02\n1 2356     -1.975700e+02 -3.250200e+02\n0 2357     5.429600e+02 1.146002e+01\n1 2357     7.739000e+02 -1.401400e+02\n6 2357     3.795500e+02 1.230000e+02\n7 2357     3.926400e+02 1.789000e+02\n12 2357     4.668400e+02 1.341000e+02\n0 2358     1.894900e+02 -5.829999e+01\n1 2358     3.270601e+02 -8.545001e+01\n0 2359     -2.146900e+02 -5.141600e+02\n1 2359     -1.870400e+02 -3.939600e+02\n6 2359     -1.032700e+02 -6.927900e+02\n0 2360     1.993700e+02 -1.047998e+01\n1 2360     3.517800e+02 -4.076001e+01\n15 2360     2.375200e+02 1.504900e+02\n0 2361     2.821700e+02 -1.102002e+01\n1 2361     4.402700e+02 -6.766998e+01\n0 2362     -2.544400e+02 -5.490800e+02\n1 2362     -2.343600e+02 -4.123900e+02\n0 2363     -1.788500e+02 -5.044500e+02\n1 2363     -1.505400e+02 -3.973000e+02\n0 2364     1.945100e+02 1.037000e+01\n1 2364     3.535200e+02 -1.845001e+01\n7 2364     1.067500e+02 1.562300e+02\n10 2364     1.308100e+02 1.730900e+02\n12 2364     1.991000e+02 1.394900e+02\n15 2364     2.282700e+02 1.780700e+02\n0 2365     -3.039400e+02 -4.635100e+02\n1 2365     -2.478700e+02 -3.190700e+02\n4 2365     -5.702300e+02 -1.509300e+02\n7 2365     -3.186900e+02 -4.194400e+02\n9 2365     -1.165100e+02 -4.668600e+02\n15 2365     -3.803400e+02 -5.330900e+02\n0 2366     9.592999e+01 -3.548999e+01\n1 2366     2.405900e+02 -3.363000e+01\n2 2366     2.668500e+02 1.856000e+01\n7 2366     1.859003e+01 9.589999e+01\n0 2367     -4.015997e+01 -1.958500e+02\n1 2367     5.956000e+01 -1.470700e+02\n6 2367     6.679993e+00 -2.135100e+02\n7 2367     -8.767999e+01 -8.763000e+01\n10 2367     -1.185900e+02 -9.017999e+01\n12 2367     8.300171e-01 -1.630300e+02\n15 2367     -6.394000e+01 -1.333700e+02\n0 2368     7.221002e+01 -2.084700e+02\n1 2368     1.635200e+02 -1.950200e+02\n2 2368     3.156899e+02 -1.622000e+02\n4 2368     -4.379800e+02 -4.702200e+02\n7 2368     2.662000e+01 -7.953998e+01\n10 2368     1.172998e+01 -9.244000e+01\n15 2368     9.012000e+01 -1.356000e+02\n0 2369     9.642999e+01 -2.406500e+02\n1 2369     1.742400e+02 -2.333400e+02\n7 2369     5.842999e+01 -1.053700e+02\n10 2369     4.328998e+01 -1.268000e+02\n0 2370     7.190900e+02 -3.067200e+02\n1 2370     8.422900e+02 -5.325601e+02\n7 2370     6.207100e+02 -8.115997e+01\n0 2371     -1.993200e+02 -5.288600e+02\n1 2371     -1.778000e+02 -4.125600e+02\n4 2371     -6.498800e+02 -2.273500e+02\n6 2371     -7.321002e+01 -7.004200e+02\n7 2371     -1.943500e+02 -4.612800e+02\n10 2371     -2.661200e+02 -4.914500e+02\n0 2372     -1.258300e+02 -5.327400e+02\n1 2372     -1.123600e+02 -4.408300e+02\n6 2372     1.378003e+01 -6.691400e+02\n7 2372     -1.190600e+02 -4.490400e+02\n0 2373     2.983600e+02 -6.940997e+01\n1 2373     4.404000e+02 -1.316000e+02\n7 2373     2.143800e+02 9.057001e+01\n10 2373     2.585800e+02 9.296002e+01\n15 2373     3.828101e+02 8.363000e+01\n0 2374     2.636100e+02 -1.525500e+02\n1 2374     3.749500e+02 -2.029900e+02\n7 2374     1.989700e+02 6.130005e+00\n10 2374     2.271300e+02 -7.469971e+00\n15 2374     3.447600e+02 -3.482001e+01\n0 2375     -6.954800e+02 -3.586100e+02\n1 2375     -5.473900e+02 -1.086500e+02\n7 2375     -7.662400e+02 -4.024800e+02\n0 2376     3.121000e+02 -2.167400e+02\n1 2376     4.043000e+02 -2.832700e+02\n6 2376     3.637600e+02 -1.235300e+02\n7 2376     2.555800e+02 -4.866998e+01\n10 2376     2.889000e+02 -7.628003e+01\n12 2376     3.923000e+02 -9.138000e+01\n15 2376     4.199100e+02 -1.160100e+02\n0 2377     2.508199e+02 -2.885500e+02\n1 2377     3.235100e+02 -3.343400e+02\n7 2377     2.061000e+02 -1.317200e+02\n10 2377     2.256801e+02 -1.644800e+02\n15 2377     3.462300e+02 -2.214600e+02\n0 2378     6.435400e+02 -2.618600e+02\n1 2378     7.733700e+02 -4.554399e+02\n7 2378     5.445000e+02 -5.350000e+01\n0 2379     -2.140700e+02 -5.258199e+02\n1 2379     -1.897900e+02 -4.048500e+02\n6 2379     -9.287000e+01 -7.047100e+02\n7 2379     -2.098500e+02 -4.609700e+02\n10 2379     -2.831900e+02 -4.891300e+02\n0 2380     -8.576001e+01 -5.554500e+02\n1 2380     -8.408002e+01 -4.749399e+02\n4 2380     -7.042300e+02 -3.186700e+02\n7 2380     -7.278998e+01 -4.621801e+02\n9 2380     1.545000e+02 -4.401700e+02\n0 2381     6.045100e+02 -1.882001e+01\n1 2381     8.280900e+02 -1.916500e+02\n7 2381     4.584900e+02 1.621700e+02\n12 2381     5.480200e+02 1.255000e+02\n13 2381     8.296700e+02 -2.159600e+02\n15 2381     8.161400e+02 1.932000e+02\n0 2382     3.288600e+02 -1.204700e+02\n1 2382     4.559900e+02 -1.931900e+02\n7 2382     2.521700e+02 4.575000e+01\n0 2383     3.170400e+02 -1.916400e+02\n1 2383     4.161200e+02 -2.591900e+02\n6 2383     3.638800e+02 -9.321002e+01\n7 2383     2.562800e+02 -2.370001e+01\n8 2383     4.611300e+02 -1.347700e+02\n10 2383     2.918101e+02 -4.748999e+01\n12 2383     3.928900e+02 -5.983002e+01\n13 2383     6.730900e+02 -3.658000e+02\n15 2383     4.225800e+02 -8.173999e+01\n0 2384     9.445001e+01 -3.393200e+02\n1 2384     1.549700e+02 -3.307900e+02\n7 2384     6.309003e+01 -2.135600e+02\n15 2384     1.403000e+02 -3.097400e+02\n0 2385     -1.863600e+02 -5.011600e+02\n1 2385     -1.559100e+02 -3.915700e+02\n7 2385     -1.882600e+02 -4.310500e+02\n0 2386     6.484500e+02 -2.665200e+02\n1 2386     7.761100e+02 -4.620300e+02\n7 2386     5.499399e+02 -5.635999e+01\n0 2387     2.379301e+02 -7.466998e+01\n1 2387     3.729200e+02 -1.169500e+02\n6 2387     2.424600e+02 9.469971e+00\n10 2387     1.897700e+02 7.928998e+01\n15 2387     2.993000e+02 6.785999e+01\n0 2388     2.349500e+02 -7.266998e+01\n1 2388     3.705000e+02 -1.141600e+02\n6 2388     2.393900e+02 1.066998e+01\n7 2388     1.585699e+02 7.990997e+01\n15 2388     2.946100e+02 7.044000e+01\n0 2389     2.374800e+02 -8.256000e+01\n1 2389     3.703300e+02 -1.252700e+02\n10 2389     1.898199e+02 7.009998e+01\n15 2389     2.997100e+02 5.690997e+01\n0 2390     2.816899e+02 -2.410500e+02\n1 2390     3.655300e+02 -2.967100e+02\n6 2390     3.424400e+02 -1.601600e+02\n10 2390     2.563500e+02 -1.075200e+02\n15 2390     3.812700e+02 -1.529800e+02\n0 2391     -2.078900e+02 -5.297200e+02\n1 2391     -1.857500e+02 -4.103900e+02\n7 2391     -2.027900e+02 -4.640100e+02\n9 2391     2.628998e+01 -4.724900e+02\n10 2391     -2.757600e+02 -4.931899e+02\n0 2392     -1.670400e+02 -4.871300e+02\n1 2392     -1.334400e+02 -3.847700e+02\n7 2392     -1.720100e+02 -4.137200e+02\n9 2392     3.415002e+01 -4.270000e+02\n0 2393     2.322100e+02 -1.077300e+02\n1 2393     3.577400e+02 -1.484300e+02\n6 2393     2.450800e+02 -2.904999e+01\n7 2393     1.604900e+02 4.484998e+01\n12 2393     2.712900e+02 1.147998e+01\n15 2393     2.956000e+02 2.190002e+01\n0 2394     9.715002e+01 -2.360000e+02\n1 2394     1.765500e+02 -2.292000e+02\n7 2394     5.809003e+01 -1.006000e+02\n10 2394     4.390002e+01 -1.216800e+02\n15 2394     1.268400e+02 -1.694600e+02\n0 2395     -9.794000e+01 -5.127900e+02\n1 2395     -7.921997e+01 -4.317000e+02\n9 2395     1.121300e+02 -4.178700e+02\n0 2396     -1.033002e+01 -6.265002e+01\n1 2396     1.338600e+02 -2.939001e+01\n3 2396     6.678003e+01 -3.596900e+02\n7 2396     -8.628998e+01 4.769000e+01\n10 2396     -9.882001e+01 6.715997e+01\n15 2396     -3.996997e+01 5.057001e+01\n0 2397     7.500000e+01 -5.951001e+01\n1 2397     2.132800e+02 -5.109998e+01\n2 2397     2.536300e+02 -1.282001e+01\n7 2397     1.780029e+00 6.781000e+01\n13 2397     4.493199e+02 -2.660600e+02\n15 2397     7.420001e+01 6.646997e+01\n0 2398     2.949900e+02 1.098999e+01\n1 2398     4.621801e+02 -5.010999e+01\n15 2398     3.680200e+02 1.925400e+02\n0 2399     3.473400e+02 -1.814600e+02\n1 2399     4.518101e+02 -2.599600e+02\n15 2399     4.641200e+02 -6.335999e+01\n0 2400     1.777100e+02 -2.432300e+02\n1 2400     2.559800e+02 -2.631700e+02\n7 2400     1.357800e+02 -9.483002e+01\n10 2400     1.372500e+02 -1.210000e+02\n15 2400     2.378800e+02 -1.688800e+02\n0 2401     -1.720100e+02 -5.345300e+02\n1 2401     -1.549000e+02 -4.269500e+02\n6 2401     -3.839001e+01 -6.932000e+02\n7 2401     -1.658200e+02 -4.606801e+02\n9 2401     6.525000e+01 -4.612300e+02\n0 2402     -1.267000e+02 -5.418199e+02\n1 2402     -1.160400e+02 -4.483900e+02\n4 2402     -6.808900e+02 -2.847100e+02\n6 2402     1.902002e+01 -6.793500e+02\n7 2402     -1.172300e+02 -4.578101e+02\n9 2402     1.086500e+02 -4.481600e+02\n0 2403     -1.267000e+02 -5.418199e+02\n1 2403     -1.160400e+02 -4.483900e+02\n6 2403     1.902002e+01 -6.793500e+02\n7 2403     -1.172300e+02 -4.578101e+02\n9 2403     1.086500e+02 -4.481600e+02\n0 2404     -3.271700e+02 -1.862900e+02\n1 2404     -1.698700e+02 -6.004999e+01\n0 2405     2.622200e+02 -2.032300e+02\n1 2405     3.551600e+02 -2.523400e+02\n6 2405     3.188900e+02 -1.200100e+02\n7 2405     2.086000e+02 -4.223999e+01\n10 2405     2.303700e+02 -6.622998e+01\n12 2405     3.415800e+02 -8.442999e+01\n15 2405     3.489399e+02 -1.039400e+02\n0 2406     1.819600e+02 -2.236000e+02\n1 2406     2.658500e+02 -2.451200e+02\n10 2406     1.399700e+02 -9.741998e+01\n15 2406     2.408101e+02 -1.413800e+02\n0 2407     -2.351700e+02 -4.160700e+02\n1 2407     -1.692400e+02 -2.981500e+02\n0 2408     2.073600e+02 -3.413300e+02\n1 2408     2.666100e+02 -3.721300e+02\n15 2408     2.946899e+02 -2.985800e+02\n0 2409     6.745900e+02 -2.642000e+02\n1 2409     8.081899e+02 -4.704700e+02\n7 2409     5.728700e+02 -5.059003e+01\n0 2410     -1.808600e+02 -4.785800e+02\n1 2410     -1.427600e+02 -3.728800e+02\n6 2410     -8.648001e+01 -6.383900e+02\n7 2410     -1.886400e+02 -4.083600e+02\n9 2410     1.339001e+01 -4.267500e+02\n0 2411     2.854399e+02 2.347998e+01\n1 2411     4.558300e+02 -3.384003e+01\n7 2411     1.875500e+02 1.799500e+02\n13 2411     6.085100e+02 -1.811600e+02\n0 2412     3.746300e+02 -7.853998e+01\n1 2412     5.224100e+02 -1.671700e+02\n15 2412     4.912800e+02 8.119000e+01\n0 2413     1.552000e+02 -1.287300e+02\n1 2413     2.724900e+02 -1.439600e+02\n7 2413     9.163000e+01 1.200000e+01\n10 2413     9.990997e+01 8.349976e+00\n13 2413     5.253101e+02 -3.213200e+02\n15 2413     1.930200e+02 -1.682001e+01\n0 2414     2.741400e+02 -2.010700e+02\n1 2414     3.679000e+02 -2.537000e+02\n10 2414     2.436801e+02 -6.241998e+01\n15 2414     3.643600e+02 -9.956000e+01\n0 2415     2.955601e+02 -2.945100e+02\n1 2415     3.720400e+02 -3.567700e+02\n10 2415     2.776400e+02 -1.667200e+02\n15 2415     4.097700e+02 -2.238700e+02\n0 2416     2.336500e+02 -3.089100e+02\n1 2416     2.998000e+02 -3.489800e+02\n10 2416     2.081000e+02 -1.901200e+02\n15 2416     3.255400e+02 -2.513800e+02\n0 2417     2.996899e+02 -2.972200e+02\n1 2417     3.765100e+02 -3.606200e+02\n15 2417     4.162100e+02 -2.274100e+02\n0 2418     1.721500e+02 -3.259000e+02\n1 2418     2.344700e+02 -3.449700e+02\n10 2418     1.392900e+02 -2.159200e+02\n15 2418     2.430300e+02 -2.815900e+02\n0 2419     2.354100e+02 -3.228300e+02\n1 2419     3.003400e+02 -3.636800e+02\n10 2419     2.118101e+02 -2.059000e+02\n15 2419     3.308000e+02 -2.699600e+02\n0 2420     6.428101e+02 -2.702500e+02\n1 2420     7.688199e+02 -4.637900e+02\n7 2420     5.455800e+02 -6.126001e+01\n10 2420     6.760601e+02 -1.031200e+02\n12 2420     6.954900e+02 -1.094400e+02\n0 2421     -1.142700e+02 -5.166100e+02\n1 2421     -9.572998e+01 -4.298000e+02\n4 2421     -6.608800e+02 -2.940400e+02\n6 2421     1.676001e+01 -6.467600e+02\n7 2421     -1.112500e+02 -4.307800e+02\n9 2421     1.015100e+02 -4.259600e+02\n0 2422     3.210100e+02 2.409003e+01\n1 2422     4.967800e+02 -4.515997e+01\n15 2422     4.031400e+02 2.142900e+02\n0 2423     3.210100e+02 2.409003e+01\n1 2423     4.967800e+02 -4.515997e+01\n7 2423     2.183300e+02 1.837400e+02\n15 2423     4.031400e+02 2.142900e+02\n0 2424     3.305000e+02 2.431000e+01\n1 2424     5.081700e+02 -4.859003e+01\n10 2424     2.869500e+02 2.037100e+02\n15 2424     4.169900e+02 2.155800e+02\n0 2425     2.464900e+02 -2.454600e+02\n1 2425     3.227300e+02 -2.886600e+02\n6 2425     3.263800e+02 -1.661400e+02\n7 2425     2.032000e+02 -8.412000e+01\n10 2425     2.160100e+02 -1.161700e+02\n12 2425     3.441899e+02 -1.303700e+02\n15 2425     3.314600e+02 -1.633400e+02\n0 2426     -1.728800e+02 -5.236600e+02\n1 2426     -1.519900e+02 -4.165700e+02\n6 2426     -4.600000e+01 -6.817500e+02\n7 2426     -1.693300e+02 -4.505300e+02\n0 2427     -1.361000e+02 -5.394000e+02\n1 2427     -1.240900e+02 -4.431200e+02\n4 2427     -6.754200e+02 -2.761500e+02\n6 2427     5.770020e+00 -6.810000e+02\n7 2427     -1.278900e+02 -4.573800e+02\n9 2427     9.665997e+01 -4.497600e+02\n0 2428     5.371002e+01 -2.197400e+02\n1 2428     1.414200e+02 -1.999700e+02\n7 2428     1.162000e+01 -9.337000e+01\n10 2428     -7.530029e+00 -1.075500e+02\n13 2428     4.558300e+02 -4.076300e+02\n15 2428     6.628998e+01 -1.532900e+02\n0 2429     -2.494600e+02 -4.618400e+02\n1 2429     -1.986800e+02 -3.353400e+02\n4 2429     -5.805500e+02 -1.903300e+02\n6 2429     -1.793600e+02 -6.537700e+02\n7 2429     -2.624400e+02 -4.066800e+02\n9 2429     -6.400000e+01 -4.428500e+02\n0 2430     3.849301e+02 -7.440997e+01\n1 2430     5.363700e+02 -1.667300e+02\n7 2430     2.907800e+02 9.564001e+01\n10 2430     3.593700e+02 9.538000e+01\n15 2430     5.062000e+02 8.710001e+01\n0 2431     -1.322200e+02 -5.330900e+02\n1 2431     -1.181400e+02 -4.389800e+02\n6 2431     7.150024e+00 -6.720200e+02\n0 2432     9.102002e+01 -2.291000e+02\n1 2432     1.731600e+02 -2.206600e+02\n7 2432     5.041998e+01 -9.554999e+01\n10 2432     3.672998e+01 -1.139900e+02\n15 2432     1.182600e+02 -1.607700e+02\n0 2433     3.343300e+02 -2.422500e+02\n1 2433     4.260100e+02 -3.185300e+02\n6 2433     3.807000e+02 -1.537500e+02\n10 2433     3.169600e+02 -1.026700e+02\n12 2433     4.143199e+02 -1.244600e+02\n15 2433     4.548199e+02 -1.478600e+02\n0 2434     3.816500e+02 -2.076400e+02\n1 2434     4.932600e+02 -2.977600e+02\n0 2435     3.588800e+02 -2.168400e+02\n1 2435     4.572300e+02 -3.019900e+02\n10 2435     3.417800e+02 -7.114001e+01\n15 2435     4.839000e+02 -1.112400e+02\n0 2436     -1.550700e+02 -5.052000e+02\n1 2436     -1.282200e+02 -4.052600e+02\n7 2436     -1.547000e+02 -4.292700e+02\n0 2437     5.179000e+02 -1.455000e+02\n1 2437     6.820699e+02 -2.907400e+02\n6 2437     4.409600e+02 -4.048999e+01\n0 2438     -2.722900e+02 -4.550200e+02\n1 2438     -2.165400e+02 -3.219900e+02\n4 2438     -5.698100e+02 -1.736800e+02\n7 2438     -2.882700e+02 -4.051400e+02\n9 2438     -9.216998e+01 -4.481500e+02\n0 2439     2.337400e+02 -5.382300e+02\n1 2439     2.275200e+02 -5.721300e+02\n6 2439     3.962600e+02 -5.202600e+02\n7 2439     2.328600e+02 -3.799200e+02\n9 2439     3.899500e+02 -3.197000e+02\n0 2440     5.231600e+02 -2.988000e+02\n1 2440     6.234600e+02 -4.462400e+02\n0 2441     6.148300e+02 -3.753500e+02\n1 2441     6.918400e+02 -5.584900e+02\n7 2441     5.474700e+02 -1.599700e+02\n12 2441     7.212200e+02 -2.162600e+02\n0 2442     2.180000e+02 -2.206000e+01\n1 2442     3.677000e+02 -5.791998e+01\n6 2442     2.085000e+02 6.272998e+01\n10 2442     1.611000e+02 1.379500e+02\n15 2442     2.644500e+02 1.370300e+02\n0 2443     -1.247300e+02 -5.099000e+02\n1 2443     -1.025800e+02 -4.195600e+02\n4 2443     -6.523900e+02 -2.860400e+02\n6 2443     -2.001953e-02 -6.446100e+02\n7 2443     -1.233600e+02 -4.266000e+02\n9 2443     8.758002e+01 -4.253500e+02\n0 2444     5.575100e+02 3.767999e+01\n1 2444     7.966899e+02 -1.173200e+02\n15 2444     7.438600e+02 2.651600e+02\n0 2445     1.618101e+02 -5.557001e+01\n1 2445     2.996700e+02 -7.352002e+01\n2 2445     3.369600e+02 1.140002e+01\n6 2445     1.659500e+02 1.104999e+01\n8 2445     3.064500e+02 -3.991000e+01\n0 2446     -1.705500e+02 -5.043700e+02\n1 2446     -1.425300e+02 -3.998400e+02\n7 2446     -1.713100e+02 -4.306000e+02\n0 2447     6.623800e+02 -9.689001e+01\n1 2447     8.645100e+02 -2.935300e+02\n6 2447     5.578900e+02 5.228003e+01\n7 2447     5.253800e+02 9.839001e+01\n8 2447     5.813800e+02 -1.074800e+02\n10 2447     6.838600e+02 9.863000e+01\n12 2447     6.358800e+02 6.192999e+01\n0 2448     2.001300e+02 -2.140002e+01\n1 2448     3.492500e+02 -5.176001e+01\n15 2448     2.399000e+02 1.352900e+02\n0 2449     2.922900e+02 5.455800e+02\n1 2449     7.072100e+02 4.835500e+02\n2 2449     -3.809998e+01 3.122400e+02\n6 2449     -1.720300e+02 6.364300e+02\n11 2449     4.075000e+02 -2.113600e+02\n12 2449     -7.289978e+00 5.992800e+02\n13 2449     4.192000e+02 2.262200e+02\n14 2449     5.939800e+02 -1.760100e+02\n0 2450     3.404301e+02 5.572400e+02\n1 2450     7.662300e+02 4.844300e+02\n11 2450     4.498500e+02 -1.982300e+02\n13 2450     4.569200e+02 2.393400e+02\n14 2450     6.402800e+02 -1.611500e+02\n0 2451     2.292000e+02 4.660400e+02\n1 2451     6.136801e+02 4.155200e+02\n5 2451     6.319900e+02 -1.806300e+02\n6 2451     -2.231600e+02 5.252900e+02\n12 2451     -5.702002e+01 5.017400e+02\n0 2452     8.827002e+01 5.109900e+02\n1 2452     4.735200e+02 4.985800e+02\n11 2452     2.254600e+02 -2.510200e+02\n0 2453     2.237300e+02 4.586200e+02\n1 2453     6.058300e+02 4.091800e+02\n7 2453     -6.849976e+00 5.487900e+02\n0 2454     3.320100e+02 4.502900e+02\n1 2454     7.243700e+02 3.719600e+02\n6 2454     -1.118700e+02 5.282100e+02\n7 2454     9.587000e+01 5.518000e+02\n13 2454     4.551801e+02 1.484000e+02\n0 2455     3.703600e+02 4.929600e+02\n1 2455     7.811500e+02 4.073000e+02\n2 2455     3.481000e+01 2.574200e+02\n11 2455     4.858900e+02 -2.524800e+02\n14 2455     6.759600e+02 -2.251600e+02\n0 2456     3.002100e+02 5.588100e+02\n1 2456     7.202000e+02 4.959600e+02\n2 2456     -3.296002e+01 3.278000e+02\n3 2456     -1.759900e+02 -8.200012e+00\n5 2456     7.008800e+02 -7.960999e+01\n8 2456     5.345001e+01 2.560500e+02\n9 2456     -1.821700e+02 3.567200e+02\n11 2456     4.126899e+02 -1.994700e+02\n12 2456     -2.049988e+00 6.173400e+02\n13 2456     4.249100e+02 2.382700e+02\n0 2457     2.442000e+02 5.580200e+02\n1 2457     6.569800e+02 5.087400e+02\n11 2457     3.631600e+02 -2.034300e+02\n13 2457     3.808500e+02 2.335900e+02\n14 2457     5.467800e+02 -1.658100e+02\n0 2458     2.238300e+02 4.501300e+02\n1 2458     6.036000e+02 4.004800e+02\n7 2458     -5.679993e+00 5.409500e+02\n0 2459     3.326001e+01 5.712500e+02\n1 2459     4.303600e+02 5.744200e+02\n2 2459     -2.665000e+02 3.398400e+02\n5 2459     4.388700e+02 -7.481000e+01\n0 2460     3.564000e+02 4.500200e+02\n1 2460     7.521500e+02 3.650500e+02\n0 2461     4.393900e+02 5.041800e+02\n1 2461     8.669301e+02 4.018900e+02\n3 2461     -6.045001e+01 -6.187000e+01\n0 2462     3.886000e+02 5.048000e+02\n1 2462     8.061700e+02 4.154700e+02\n3 2462     -9.915002e+01 -6.134998e+01\n8 2462     1.204200e+02 2.112300e+02\n9 2462     -1.115500e+02 3.105700e+02\n0 2463     4.154800e+02 4.569600e+02\n1 2463     8.227000e+02 3.567400e+02\n6 2463     -2.720001e+01 5.532100e+02\n7 2463     1.723800e+02 5.666500e+02\n11 2463     5.342800e+02 -2.814100e+02\n0 2464     1.240500e+02 4.995200e+02\n1 2464     5.086500e+02 4.778600e+02\n7 2464     -1.067700e+02 5.801300e+02\n0 2465     3.995400e+02 4.502400e+02\n1 2465     8.017900e+02 3.537300e+02\n7 2465     1.590500e+02 5.582000e+02\n0 2466     1.361300e+02 4.510200e+02\n1 2466     5.083199e+02 4.239900e+02\n7 2466     -8.859003e+01 5.319900e+02\n8 2466     -5.253003e+01 1.573700e+02\n0 2467     2.213400e+02 4.726900e+02\n1 2467     6.070500e+02 4.244600e+02\n7 2467     -1.079999e+01 5.627600e+02\n11 2467     3.500500e+02 -2.787700e+02\n12 2467     -6.615997e+01 5.073500e+02\n0 2468     1.011400e+02 4.475500e+02\n1 2468     4.702900e+02 4.296800e+02\n7 2468     -1.220900e+02 5.245600e+02\n0 2469     4.164900e+02 4.543000e+02\n1 2469     8.230900e+02 3.535800e+02\n6 2469     -2.566998e+01 5.499400e+02\n7 2469     1.735300e+02 5.640500e+02\n0 2470     3.482000e+02 4.487400e+02\n1 2470     7.422100e+02 3.657600e+02\n2 2470     2.271002e+01 2.093000e+02\n9 2470     -1.310500e+02 2.563500e+02\n13 2470     4.684600e+02 1.480300e+02\n14 2470     6.579000e+02 -2.733700e+02\n0 2471     2.577800e+02 5.295900e+02\n1 2471     6.620800e+02 4.754400e+02\n4 2471     1.728998e+01 -5.304399e+02\n5 2471     6.645900e+02 -1.112600e+02\n6 2471     -1.978900e+02 6.128300e+02\n13 2471     3.961100e+02 2.112300e+02\n14 2471     5.660100e+02 -1.934800e+02\n0 2472     2.577800e+02 5.295900e+02\n1 2472     6.620800e+02 4.754400e+02\n11 2472     3.768101e+02 -2.269300e+02\n0 2473     1.543400e+02 5.057400e+02\n1 2473     5.426000e+02 4.766700e+02\n11 2473     2.853101e+02 -2.521700e+02\n0 2474     3.374200e+02 3.994100e+02\n1 2474     7.109500e+02 3.174200e+02\n11 2474     4.650900e+02 -3.384800e+02\n0 2475     1.353600e+02 5.149600e+02\n1 2475     5.238600e+02 4.912500e+02\n11 2475     2.670400e+02 -2.459000e+02\n12 2475     -1.623400e+02 5.445800e+02\n0 2476     4.140699e+02 4.594900e+02\n1 2476     8.229000e+02 3.595800e+02\n11 2476     5.314700e+02 -2.785500e+02\n0 2477     4.088300e+02 4.604200e+02\n1 2477     8.171600e+02 3.621500e+02\n0 2478     1.657200e+02 5.309900e+02\n1 2478     5.625100e+02 4.998500e+02\n5 2478     5.685200e+02 -1.133600e+02\n14 2478     4.736000e+02 -1.970700e+02\n0 2479     -1.042600e+02 4.815500e+02\n1 2479     2.646500e+02 5.165000e+02\n2 2479     -3.885000e+02 2.383700e+02\n3 2479     -5.171700e+02 -9.198999e+01\n7 2479     -3.271900e+02 5.381300e+02\n12 2479     -4.150500e+02 4.720900e+02\n0 2480     -3.280029e+00 4.738600e+02\n1 2480     3.668101e+02 4.833600e+02\n2 2480     -2.918200e+02 2.294600e+02\n5 2480     4.006000e+02 -1.774800e+02\n6 2480     -4.773300e+02 4.863300e+02\n7 2480     -2.267100e+02 5.406900e+02\n8 2480     -1.599800e+02 1.740300e+02\n12 2480     -3.028800e+02 4.768900e+02\n0 2481     -2.079500e+02 5.040800e+02\n1 2481     1.648500e+02 5.643700e+02\n5 2481     2.019600e+02 -1.461400e+02\n7 2481     -4.339300e+02 5.513800e+02\n0 2482     -3.528998e+01 4.782100e+02\n1 2482     3.349301e+02 4.961000e+02\n2 2482     -3.227700e+02 2.347500e+02\n5 2482     3.689200e+02 -1.728400e+02\n6 2482     -5.147000e+02 4.858000e+02\n7 2482     -2.585800e+02 5.420900e+02\n8 2482     -1.854900e+02 1.777700e+02\n12 2482     -3.387600e+02 4.782000e+02\n14 2482     2.793500e+02 -2.595200e+02\n0 2483     -1.896300e+02 4.249200e+02\n1 2483     1.641500e+02 4.812300e+02\n7 2483     -4.048400e+02 4.698600e+02\n12 2483     -5.005700e+02 3.914400e+02\n0 2484     -3.570001e+01 5.459700e+02\n1 2484     3.511600e+02 5.647900e+02\n2 2484     -3.278300e+02 3.114300e+02\n0 2485     -2.927900e+02 4.697100e+02\n1 2485     7.196997e+01 5.501600e+02\n2 2485     -5.753900e+02 2.244000e+02\n4 2485     1.828998e+01 -1.900900e+02\n5 2485     1.157600e+02 -1.822800e+02\n7 2485     -5.157800e+02 5.056700e+02\n0 2486     8.333002e+01 5.526001e+01\n1 2486     2.574100e+02 5.848999e+01\n6 2486     3.942999e+01 1.078900e+02\n15 2486     7.048999e+01 2.237900e+02\n0 2487     1.065500e+02 4.203998e+01\n1 2487     2.754200e+02 3.926001e+01\n6 2487     7.192999e+01 1.006900e+02\n12 2487     9.164001e+01 1.527500e+02\n15 2487     1.039200e+02 2.092200e+02\n0 2488     2.301001e+01 1.611900e+02\n1 2488     2.407000e+02 1.783100e+02\n10 2488     -8.375000e+01 3.314200e+02\n15 2488     -2.314001e+01 3.604600e+02\n0 2489     -1.148100e+02 7.317999e+01\n1 2489     9.044000e+01 1.286600e+02\n5 2489     4.514900e+02 -5.979900e+02\n10 2489     -2.346600e+02 2.146200e+02\n0 2490     1.271500e+02 -7.719971e+00\n1 2490     2.796300e+02 -1.547998e+01\n2 2490     2.871400e+02 5.365002e+01\n10 2490     5.444000e+01 1.450100e+02\n15 2490     1.381300e+02 1.439900e+02\n0 2491     2.121002e+01 8.856000e+01\n1 2491     2.112800e+02 1.084300e+02\n3 2491     3.189001e+01 -2.095800e+02\n4 2491     -2.154200e+02 -4.277400e+02\n5 2491     6.467800e+02 -5.705200e+02\n7 2491     -8.159998e+01 2.032200e+02\n8 2491     1.359900e+02 4.248999e+01\n15 2491     -1.752002e+01 2.610600e+02\n0 2492     -2.063000e+01 1.222600e+02\n1 2492     1.857800e+02 1.522300e+02\n15 2492     -7.740002e+01 3.009600e+02\n0 2493     -8.940002e+00 1.165000e+02\n1 2493     1.934301e+02 1.437200e+02\n3 2493     -2.407001e+01 -2.043500e+02\n4 2493     -1.940900e+02 -4.022300e+02\n5 2493     5.982300e+02 -5.403900e+02\n6 2493     -1.104100e+02 1.369400e+02\n7 2493     -1.199700e+02 2.240700e+02\n10 2493     -1.160500e+02 2.760700e+02\n12 2493     -8.203998e+01 1.909200e+02\n13 2493     3.396500e+02 -1.262800e+02\n15 2493     -6.120001e+01 2.948900e+02\n0 2494     -4.575000e+01 -1.726400e+02\n1 2494     6.398999e+01 -1.246300e+02\n6 2494     -1.838000e+01 -1.928199e+02\n7 2494     -9.952002e+01 -6.665002e+01\n8 2494     1.616400e+02 -1.855400e+02\n12 2494     -1.920001e+01 -1.406900e+02\n0 2495     -1.398000e+02 -1.006700e+02\n1 2495     3.270020e+00 -2.860999e+01\n7 2495     -2.132900e+02 -1.534998e+01\n10 2495     -2.449200e+02 9.640015e+00\n12 2495     -1.687100e+02 -9.590997e+01\n15 2495     -2.091100e+02 -1.840002e+01\n0 2496     6.158002e+01 -2.018700e+02\n1 2496     1.559399e+02 -1.852500e+02\n3 2496     2.172700e+02 -4.594900e+02\n6 2496     1.169300e+02 -1.841400e+02\n7 2496     1.478998e+01 -7.658002e+01\n10 2496     -8.900146e-01 -8.597998e+01\n12 2496     1.202000e+02 -1.397900e+02\n13 2496     4.573800e+02 -3.927100e+02\n15 2496     7.460999e+01 -1.280200e+02\n0 2497     1.240600e+02 -2.197200e+02\n1 2497     2.102800e+02 -2.225600e+02\n7 2497     8.028998e+01 -8.096997e+01\n10 2497     7.308002e+01 -9.979999e+01\n15 2497     1.615100e+02 -1.440100e+02\n0 2498     4.775000e+01 1.350600e+02\n1 2498     2.550400e+02 1.447100e+02\n10 2498     -5.167999e+01 3.029000e+02\n15 2498     1.315997e+01 3.281800e+02\n0 2499     3.393800e+02 4.957600e+02\n1 2499     7.457800e+02 4.180300e+02\n11 2499     4.565400e+02 -2.516900e+02\n14 2499     6.447700e+02 -2.240300e+02\n0 2500     3.739990e+00 4.936300e+02\n1 2500     3.789900e+02 5.018000e+02\n2 2500     -2.875600e+02 2.527600e+02\n5 2500     4.075800e+02 -1.566600e+02\n6 2500     -4.735800e+02 5.135400e+02\n7 2500     -2.223400e+02 5.619100e+02\n11 2500     1.506800e+02 -2.688100e+02\n14 2500     3.165500e+02 -2.422400e+02\n0 2501     -1.877500e+02 1.508700e+02\n1 2501     8.171997e+01 2.155600e+02\n12 2501     -4.101000e+02 8.723999e+01\n13 2501     7.904999e+01 -1.367700e+02\n0 2502     2.135999e+01 -7.044000e+01\n1 2502     1.606600e+02 -4.552002e+01\n2 2502     1.936801e+02 -4.477002e+01\n4 2502     -3.242500e+02 -4.261600e+02\n13 2502     3.986700e+02 -2.808500e+02\n15 2502     3.200012e+00 4.509003e+01\n0 2503     3.005800e+02 2.967999e+01\n1 2503     4.756899e+02 -3.248999e+01\n7 2503     1.995000e+02 1.868600e+02\n10 2503     2.515500e+02 2.065200e+02\n13 2503     6.178000e+02 -1.761600e+02\n15 2503     3.737500e+02 2.186900e+02\n0 2504     1.209400e+02 4.153400e+02\n1 2504     4.828300e+02 3.916500e+02\n2 2504     -1.717400e+02 1.645200e+02\n8 2504     -6.167999e+01 1.246300e+02\n13 2504     2.875100e+02 1.042400e+02\n0 2505     1.025600e+02 4.887500e+02\n1 2505     4.822700e+02 4.722300e+02\n0 2506     3.406700e+02 5.017200e+02\n1 2506     7.491500e+02 4.244700e+02\n13 2506     4.597800e+02 1.925000e+02\n14 2506     6.454800e+02 -2.182900e+02\n0 2507     5.885300e+02 -3.712000e+01\n1 2507     8.056899e+02 -2.056400e+02\n7 2507     4.448000e+02 1.409200e+02\n13 2507     8.147400e+02 -2.357800e+02\n15 2507     7.958900e+02 1.654000e+02\n0 2508     4.416000e+02 3.232500e+02\n1 2508     7.799200e+02 2.134300e+02\n13 2508     6.039700e+02 5.796997e+01\n14 2508     8.352800e+02 -3.923200e+02\n0 2509     -5.084300e+02 2.353000e+02\n1 2509     -1.889900e+02 3.766400e+02\n11 2509     -3.144200e+02 -5.010000e+02\n13 2509     -2.233100e+02 -8.378003e+01\n14 2509     -2.098500e+02 -5.302500e+02\n0 2510     -5.014300e+02 -4.304000e+02\n1 2510     -4.090800e+02 -2.286100e+02\n7 2510     -5.342400e+02 -4.298700e+02\n0 2511     -5.843000e+02 -4.661000e+02\n1 2511     -4.909300e+02 -2.347700e+02\n0 2512     5.917100e+02 -4.513000e+01\n1 2512     8.064800e+02 -2.149800e+02\n13 2512     8.190800e+02 -2.425400e+02\n0 2513     4.266998e+01 5.651800e+02\n1 2513     4.392600e+02 5.655000e+02\n11 2513     1.812000e+02 -2.070600e+02\n12 2513     -2.694200e+02 5.909800e+02\n13 2513     2.230400e+02 2.268600e+02\n14 2513     3.539301e+02 -1.680700e+02\n0 2514     4.896600e+02 3.985900e+02\n1 2514     8.552100e+02 2.820100e+02\n2 2514     2.695699e+02 2.823500e+02\n3 2514     1.288100e+02 -4.541998e+01\n7 2514     2.764500e+02 5.386600e+02\n9 2514     8.529999e+01 3.281600e+02\n13 2514     6.454600e+02 1.287800e+02\n0 2515     -5.014300e+02 -4.304000e+02\n1 2515     -4.090800e+02 -2.286100e+02\n7 2515     -5.342400e+02 -4.298700e+02\n0 2516     1.935300e+02 5.359000e+02\n1 2516     5.934700e+02 4.982000e+02\n13 2516     3.413900e+02 2.115700e+02\n14 2516     4.991600e+02 -1.909200e+02\n0 2517     -3.201300e+02 8.687000e+01\n1 2517     -6.548999e+01 1.907700e+02\n13 2517     -2.262000e+01 -1.992500e+02\n0 2518     -3.558002e+01 4.886500e+02\n1 2518     3.372800e+02 5.066800e+02\n5 2518     3.692400e+02 -1.619200e+02\n6 2518     -5.169400e+02 4.991100e+02\n11 2518     1.159300e+02 -2.747700e+02\n13 2518     1.623800e+02 1.584100e+02\n14 2518     2.793700e+02 -2.487000e+02\n0 2519     3.268300e+02 5.809800e+02\n1 2519     7.579800e+02 5.133800e+02\n13 2519     4.446100e+02 2.579700e+02\n14 2519     6.243101e+02 -1.383400e+02\n0 2520     5.472400e+02 1.313200e+02\n1 2520     8.156400e+02 -1.588000e+01\n2 2520     4.463101e+02 8.387000e+01\n7 2520     3.812200e+02 2.961500e+02\n15 2520     7.186700e+02 3.936700e+02\n0 2521     -3.268700e+02 8.632001e+01\n1 2521     -7.283002e+01 1.920400e+02\n8 2521     -3.345800e+02 -1.630800e+02\n13 2521     -2.647998e+01 -1.991700e+02\n0 2522     -1.492700e+02 -5.222000e+02\n1 2522     -1.298300e+02 -4.230300e+02\n4 2522     -6.566700e+02 -2.665200e+02\n6 2522     -1.987000e+01 -6.692800e+02\n7 2522     -1.455100e+02 -4.435400e+02\n9 2522     7.373999e+01 -4.432600e+02\n0 2523     -3.161600e+02 -1.340200e+02\n1 2523     -1.411600e+02 -1.528003e+01\n6 2523     -5.001900e+02 -3.267000e+02\n7 2523     -4.133700e+02 -1.001500e+02\n8 2523     -2.217800e+02 -3.226200e+02\n13 2523     3.515002e+01 -3.884100e+02\n0 2524     -3.884998e+01 2.909998e+01\n1 2524     1.364300e+02 6.758002e+01\n7 2524     -1.329300e+02 1.331600e+02\n10 2524     -1.419500e+02 1.710900e+02\n13 2524     3.280900e+02 -2.021200e+02\n15 2524     -9.058002e+01 1.717100e+02\n0 2525     -9.654999e+01 -1.420100e+02\n1 2525     2.803003e+01 -8.003998e+01\n4 2525     -3.584800e+02 -3.343300e+02\n10 2525     -1.904100e+02 -3.366998e+01\n12 2525     -9.503998e+01 -1.255000e+02\n15 2525     -1.463100e+02 -6.813000e+01\n0 2526     -1.342200e+02 -2.234200e+02\n1 2526     -1.959003e+01 -1.485700e+02\n10 2526     -2.244700e+02 -1.314400e+02\n15 2526     -1.822200e+02 -1.839800e+02\n0 2527     -4.069200e+02 -3.409003e+01\n1 2527     -1.883200e+02 1.020900e+02\n0 2528     -4.205700e+02 5.253998e+01\n1 2528     -1.697100e+02 1.852600e+02\n10 2528     -5.941700e+02 1.595100e+02\n13 2528     -1.061700e+02 -2.346900e+02\n0 2529     2.499301e+02 2.567300e+02\n1 2529     5.589100e+02 1.975900e+02\n7 2529     5.963000e+01 3.614400e+02\n10 2529     1.723200e+02 4.698700e+02\n13 2529     4.336801e+02 -1.835999e+01\n14 2529     6.202400e+02 -4.831600e+02\n0 2530     5.403700e+02 6.270020e+00\n1 2530     7.697800e+02 -1.446200e+02\n7 2530     3.908900e+02 1.731100e+02\n10 2530     5.329301e+02 2.061000e+02\n13 2530     7.589000e+02 -2.025800e+02\n0 2531     -2.760500e+02 5.921002e+01\n1 2531     -3.490002e+01 1.531500e+02\n2 2531     -4.072600e+02 -1.920700e+02\n4 2531     -2.144400e+02 -1.781900e+02\n7 2531     -4.185700e+02 9.482001e+01\n0 2532     4.416000e+02 3.232500e+02\n1 2532     7.799200e+02 2.134300e+02\n6 2532     1.274300e+02 4.270400e+02\n7 2532     2.376801e+02 4.559900e+02\n11 2532     5.646801e+02 -4.059300e+02\n12 2532     2.440800e+02 4.229600e+02\n13 2532     6.039700e+02 5.796997e+01\n14 2532     8.352800e+02 -3.923200e+02\n0 2533     2.422700e+02 -2.032500e+02\n1 2533     3.348000e+02 -2.456000e+02\n7 2533     1.894100e+02 -4.553998e+01\n10 2533     2.067700e+02 -6.807001e+01\n13 2533     6.132400e+02 -3.797200e+02\n0 2534     -1.179600e+02 -1.119900e+02\n1 2534     1.940997e+01 -4.546997e+01\n2 2534     4.485999e+01 -1.417500e+02\n3 2534     -3.233002e+01 -4.497700e+02\n7 2534     -1.881400e+02 -2.209998e+01\n8 2534     6.173999e+01 -1.617800e+02\n9 2534     -6.246002e+01 -3.126001e+01\n10 2534     -2.177100e+02 -1.729980e+00\n12 2534     -1.363100e+02 -1.012700e+02\n13 2534     2.739800e+02 -3.312200e+02\n15 2534     -1.778200e+02 -3.096002e+01\n0 2535     -1.641800e+02 -4.722100e+02\n1 2535     -1.247900e+02 -3.722300e+02\n6 2535     -7.092999e+01 -6.231600e+02\n7 2535     -1.725800e+02 -3.981600e+02\n9 2535     2.478003e+01 -4.151700e+02\n12 2535     -8.641998e+01 -5.689500e+02\n0 2536     -4.067900e+02 -7.838000e+01\n1 2536     -2.032800e+02 6.110999e+01\n10 2536     -5.605800e+02 6.789978e+00\n15 2536     -5.638600e+02 -2.663000e+01\n0 2537     -2.237500e+02 -4.426300e+02\n1 2537     -1.685500e+02 -3.262000e+02\n6 2537     -1.615400e+02 -6.195601e+02\n7 2537     -2.414300e+02 -3.829400e+02\n9 2537     -5.322998e+01 -4.192800e+02\n0 2538     -9.285999e+01 -5.755699e+02\n1 2538     -9.790002e+01 -4.910200e+02\n4 2538     -7.215800e+02 -3.136000e+02\n6 2538     7.964001e+01 -6.977400e+02\n7 2538     -7.475000e+01 -4.831600e+02\n9 2538     1.630699e+02 -4.559600e+02\n0 2539     -1.468400e+02 -5.165400e+02\n1 2539     -1.257500e+02 -4.187500e+02\n4 2539     -6.523500e+02 -2.682800e+02\n7 2539     -1.446700e+02 -4.376801e+02\n9 2539     7.216998e+01 -4.381500e+02\n0 2540     -2.494100e+02 -4.548400e+02\n1 2540     -1.961100e+02 -3.290100e+02\n4 2540     -5.746800e+02 -1.910600e+02\n6 2540     -1.835700e+02 -6.457400e+02\n7 2540     -2.632700e+02 -3.993600e+02\n9 2540     -6.839001e+01 -4.369600e+02\n0 2541     -2.027300e+02 -4.758199e+02\n1 2541     -1.614700e+02 -3.631600e+02\n6 2541     -1.135000e+02 -6.457500e+02\n7 2541     -2.102300e+02 -4.103500e+02\n0 2542     -1.833000e+02 -4.831400e+02\n1 2542     -1.468400e+02 -3.762200e+02\n6 2542     -8.597000e+01 -6.441500e+02\n7 2542     -1.896100e+02 -4.132500e+02\n9 2542     1.453003e+01 -4.305500e+02\n0 2543     6.433101e+02 -3.724300e+02\n1 2543     7.260000e+02 -5.678900e+02\n7 2543     5.681100e+02 -1.526200e+02\n0 2544     -2.350500e+02 3.958100e+02\n1 2544     1.121200e+02 4.639500e+02\n2 2544     -5.127600e+02 1.339900e+02\n7 2544     -4.464000e+02 4.345900e+02\n10 2544     -4.158800e+02 5.902300e+02\n11 2544     -6.164001e+01 -3.588400e+02\n0 2545     1.662500e+02 -2.439100e+02\n1 2545     2.437600e+02 -2.597600e+02\n2 2545     4.223800e+02 -1.749200e+02\n6 2545     2.440900e+02 -1.929100e+02\n8 2545     3.709400e+02 -1.971900e+02\n9 2545     2.505601e+02 -4.221997e+01\n10 2545     1.246000e+02 -1.233000e+02\n13 2545     5.568500e+02 -4.216700e+02\n15 2545     2.228800e+02 -1.714000e+02\n0 2546     1.280500e+02 -6.903003e+01\n1 2546     2.622100e+02 -7.639001e+01\n15 2546     1.476200e+02 6.053003e+01\n0 2547     -1.383800e+02 5.339000e+02\n1 2547     2.423700e+02 5.773500e+02\n2 2547     -4.238900e+02 2.995100e+02\n5 2547     2.714100e+02 -1.155100e+02\n12 2547     -4.617100e+02 5.303700e+02\n13 2547     8.151001e+01 1.914100e+02\n14 2547     1.819100e+02 -2.048000e+02\n0 2548     -4.878998e+01 -2.622998e+01\n1 2548     1.108400e+02 1.635999e+01\n2 2548     8.740997e+01 -3.390997e+01\n7 2548     -1.331600e+02 7.575000e+01\n13 2548     3.256899e+02 -2.511900e+02\n15 2548     -9.581000e+01 9.463000e+01\n0 2549     2.812000e+02 5.502100e+02\n1 2549     6.960200e+02 4.914300e+02\n13 2549     4.102700e+02 2.297800e+02\n14 2549     5.830601e+02 -1.716000e+02\n0 2550     -3.409000e+02 5.790002e+01\n1 2550     -9.532001e+01 1.695000e+02\n4 2550     -2.081600e+02 -1.385500e+02\n13 2550     -3.459003e+01 -2.247700e+02\n0 2551     1.984000e+02 9.372000e+01\n1 2551     3.880900e+02 6.253998e+01\n4 2551     -2.326200e+02 -5.676700e+02\n7 2551     9.302002e+01 2.357100e+02\n10 2551     1.274500e+02 2.711000e+02\n13 2551     5.278101e+02 -1.276800e+02\n15 2551     2.245100e+02 2.927800e+02\n0 2552     6.087000e+01 9.620999e+01\n1 2552     2.502500e+02 1.047400e+02\n2 2552     1.668000e+02 1.266100e+02\n4 2552     -2.145400e+02 -4.599100e+02\n5 2552     6.958500e+02 -5.597600e+02\n7 2552     -4.231000e+01 2.174100e+02\n10 2552     -3.331000e+01 2.589100e+02\n13 2552     4.111500e+02 -1.354400e+02\n15 2552     3.515997e+01 2.770800e+02\n0 2553     -3.220900e+02 -1.312700e+02\n1 2553     -1.457800e+02 -1.112000e+01\n7 2553     -4.197100e+02 -9.871002e+01\n12 2553     -4.484700e+02 -2.481700e+02\n13 2553     2.882001e+01 -3.864000e+02\n0 2554     4.039301e+02 -4.594000e+01\n1 2554     5.693400e+02 -1.450100e+02\n6 2554     3.550200e+02 6.763000e+01\n7 2554     3.016300e+02 1.229700e+02\n10 2554     3.783800e+02 1.298800e+02\n12 2554     4.068199e+02 9.809003e+01\n13 2554     7.016100e+02 -2.388900e+02\n15 2554     5.292600e+02 1.292300e+02\n0 2555     3.249100e+02 4.633700e+02\n1 2555     7.200000e+02 3.875200e+02\n5 2555     7.300500e+02 -1.806000e+02\n6 2555     -1.217900e+02 5.417500e+02\n7 2555     8.752002e+01 5.640200e+02\n12 2555     4.138000e+01 5.113200e+02\n13 2555     4.491300e+02 1.588900e+02\n14 2555     6.333600e+02 -2.591500e+02\n0 2556     -4.823999e+01 -1.106000e+01\n1 2556     1.156200e+02 3.100000e+01\n3 2556     -3.510010e+00 -3.292400e+02\n6 2556     -1.015800e+02 -1.858002e+01\n7 2556     -1.356600e+02 9.104001e+01\n12 2556     -8.608002e+01 3.702002e+01\n13 2556     3.238000e+02 -2.380300e+02\n15 2556     -9.752002e+01 1.153300e+02\n0 2557     -3.974300e+02 8.473999e+01\n1 2557     -1.385100e+02 2.093500e+02\n2 2557     -5.774600e+02 -2.004500e+02\n7 2557     -5.514200e+02 9.841000e+01\n10 2557     -5.694200e+02 2.003100e+02\n13 2557     -9.196997e+01 -2.061100e+02\n15 2557     -5.732900e+02 1.964600e+02\n0 2558     5.716500e+02 2.072900e+02\n1 2558     8.645601e+02 5.800000e+01\n2 2558     4.565100e+02 1.729200e+02\n8 2558     4.343300e+02 1.143300e+02\n9 2558     2.514500e+02 2.429300e+02\n12 2558     4.549200e+02 3.624800e+02\n13 2558     7.694100e+02 -2.021002e+01\n15 2558     7.430500e+02 5.050600e+02\n0 2559     2.878600e+02 5.395600e+02\n1 2559     7.002500e+02 4.783200e+02\n11 2559     4.040699e+02 -2.161600e+02\n13 2559     4.160500e+02 2.206500e+02\n14 2559     5.905300e+02 -1.821600e+02\n0 2560     4.948700e+02 2.937200e+02\n1 2560     8.260900e+02 1.680500e+02\n6 2560     2.069700e+02 4.131700e+02\n7 2560     2.958400e+02 4.367100e+02\n13 2560     6.608400e+02 3.928003e+01\n0 2561     5.155900e+02 -1.655300e+02\n1 2561     6.712400e+02 -3.098600e+02\n7 2561     4.070300e+02 1.284003e+01\n12 2561     5.187700e+02 -4.315002e+01\n13 2561     7.869000e+02 -3.520600e+02\n0 2562     5.210699e+02 2.247998e+01\n1 2562     7.550601e+02 -1.218400e+02\n7 2562     3.694100e+02 1.845500e+02\n13 2562     7.366200e+02 -1.909300e+02\n0 2563     1.202800e+02 2.165997e+01\n1 2563     2.818101e+02 1.559998e+01\n2 2563     2.685500e+02 7.971002e+01\n7 2563     3.251001e+01 1.559900e+02\n10 2563     4.456000e+01 1.774700e+02\n13 2563     4.785699e+02 -1.922700e+02\n15 2563     1.252500e+02 1.831700e+02\n0 2564     -2.928700e+02 -2.581100e+02\n1 2564     -1.645400e+02 -1.360400e+02\n9 2564     -2.586100e+02 -3.208500e+02\n10 2564     -4.057600e+02 -1.892500e+02\n13 2564     8.560999e+01 -4.956000e+02\n15 2564     -3.895900e+02 -2.530200e+02\n0 2565     1.807300e+02 -4.086300e+02\n1 2565     2.189000e+02 -4.269400e+02\n7 2565     1.586801e+02 -2.629100e+02\n13 2565     5.742800e+02 -5.831899e+02\n0 2566     5.917100e+02 -4.513000e+01\n1 2566     8.064800e+02 -2.149800e+02\n7 2566     4.489800e+02 1.337400e+02\n10 2566     5.969399e+02 1.514600e+02\n13 2566     8.190800e+02 -2.425400e+02\n0 2567     1.750100e+02 5.240700e+02\n1 2567     5.705300e+02 4.902200e+02\n9 2567     -2.685200e+02 3.201700e+02\n13 2567     3.272300e+02 2.006900e+02\n14 2567     4.815800e+02 -2.036700e+02\n0 2568     1.948101e+02 6.831000e+01\n1 2568     3.739600e+02 3.890002e+01\n6 2568     1.485100e+02 1.529500e+02\n7 2568     9.550000e+01 2.122700e+02\n10 2568     1.257400e+02 2.405200e+02\n12 2568     1.776200e+02 2.012400e+02\n13 2568     5.312700e+02 -1.480100e+02\n15 2568     2.220601e+02 2.575500e+02\n0 2569     4.912500e+02 3.079500e+02\n1 2569     8.271100e+02 1.845100e+02\n7 2569     2.904000e+02 4.501000e+02\n12 2569     3.078101e+02 4.246300e+02\n13 2569     6.556600e+02 5.098999e+01\n0 2570     1.588800e+02 -1.402800e+02\n1 2570     2.713400e+02 -1.563200e+02\n7 2570     9.788000e+01 1.840027e+00\n10 2570     1.045600e+02 -4.900024e+00\n12 2570     2.074800e+02 -4.138000e+01\n13 2570     5.316000e+02 -3.304700e+02\n15 2570     1.990601e+02 -3.182001e+01\n0 2571     9.884998e+01 4.211300e+02\n1 2571     4.607500e+02 4.034100e+02\n2 2571     -1.928300e+02 1.702800e+02\n7 2571     -1.210800e+02 4.975500e+02\n8 2571     -7.883002e+01 1.290800e+02\n9 2571     -3.113900e+02 2.150600e+02\n13 2571     2.693101e+02 1.078900e+02\n14 2571     4.109399e+02 -3.154000e+02\n0 2572     1.740997e+01 1.547700e+02\n1 2572     2.323300e+02 1.731800e+02\n5 2572     6.174000e+02 -4.977100e+02\n13 2572     3.534900e+02 -9.278998e+01\n15 2572     -2.983002e+01 3.489200e+02\n0 2573     5.560100e+02 8.385999e+01\n1 2573     8.094600e+02 -6.869000e+01\n2 2573     4.686300e+02 3.904999e+01\n6 2573     3.776600e+02 2.108200e+02\n12 2573     4.650800e+02 2.207700e+02\n13 2573     7.663800e+02 -1.304000e+02\n15 2573     7.358800e+02 3.285400e+02\n0 2574     -4.897100e+02 1.891200e+02\n1 2574     -1.854800e+02 3.292400e+02\n13 2574     -2.018200e+02 -1.237100e+02\n0 2575     -2.617600e+02 4.103200e+02\n1 2575     8.865997e+01 4.846500e+02\n5 2575     1.407000e+02 -2.457200e+02\n7 2575     -4.752800e+02 4.464400e+02\n10 2575     -4.504500e+02 6.053800e+02\n14 2575     5.691998e+01 -3.355700e+02\n0 2576     -1.475700e+02 2.747700e+02\n1 2576     1.655800e+02 3.232200e+02\n11 2576     1.557001e+01 -4.692100e+02\n14 2576     1.766400e+02 -4.821400e+02\n0 2577     3.967000e+02 3.297100e+02\n1 2577     7.471600e+02 2.295300e+02\n13 2577     5.400900e+02 5.378998e+01\n14 2577     7.531200e+02 -3.947600e+02\n0 2578     -2.415200e+02 3.098300e+02\n1 2578     8.558002e+01 3.813500e+02\n14 2578     6.938000e+01 -4.460699e+02\n0 2579     8.819000e+01 5.029900e+02\n1 2579     4.710100e+02 4.902100e+02\n2 2579     -2.109200e+02 2.641200e+02\n5 2579     4.910100e+02 -1.444700e+02\n6 2579     -3.817000e+02 5.430400e+02\n7 2579     -1.416900e+02 5.801400e+02\n8 2579     -9.385999e+01 2.029100e+02\n12 2579     -2.109500e+02 5.243500e+02\n14 2579     3.985400e+02 -2.294600e+02\n0 2580     3.653000e+02 4.925200e+02\n1 2580     7.751300e+02 4.080500e+02\n11 2580     4.812300e+02 -2.532000e+02\n14 2580     6.708199e+02 -2.261500e+02\n0 2581     3.732100e+02 4.803800e+02\n1 2581     7.807000e+02 3.932200e+02\n11 2581     4.905300e+02 -2.630000e+02\n14 2581     6.802800e+02 -2.382400e+02\n0 2582     7.153003e+01 4.973900e+02\n1 2582     4.518500e+02 4.888100e+02\n9 2582     -3.426700e+02 2.901800e+02\n14 2582     3.824600e+02 -2.361000e+02\n0 2583     -1.541800e+02 4.465800e+02\n1 2583     2.050699e+02 4.938800e+02\n2 2583     -4.349400e+02 1.961700e+02\n7 2583     -3.717200e+02 4.960000e+02\n12 2583     -4.639100e+02 4.220400e+02\n14 2583     1.637700e+02 -2.957300e+02\n0 2584     -4.539978e+00 4.522400e+02\n1 2584     3.609900e+02 4.620300e+02\n5 2584     3.979301e+02 -2.005700e+02\n7 2584     -2.248900e+02 5.184200e+02\n8 2584     -1.600200e+02 1.545300e+02\n11 2584     1.454100e+02 -3.054800e+02\n12 2584     -3.001000e+02 4.518300e+02\n13 2584     1.871100e+02 1.289200e+02\n14 2584     3.090900e+02 -2.858200e+02\n0 2585     2.434000e+02 4.505200e+02\n1 2585     6.256000e+02 3.957900e+02\n2 2585     -6.782001e+01 2.066600e+02\n5 2585     6.469399e+02 -1.971100e+02\n7 2585     1.281000e+01 5.427700e+02\n11 2585     3.726200e+02 -2.973000e+02\n12 2585     -3.917999e+01 4.850000e+02\n14 2585     5.528600e+02 -2.772800e+02\n0 2586     -1.382700e+02 3.330700e+02\n1 2586     1.940699e+02 3.772600e+02\n2 2586     -4.122300e+02 5.675000e+01\n7 2586     -3.415000e+02 3.799300e+02\n11 2586     2.653998e+01 -4.148100e+02\n14 2586     1.747500e+02 -4.185500e+02\n0 2587     -2.462300e+02 3.027000e+02\n1 2587     7.939001e+01 3.748600e+02\n7 2587     -4.453600e+02 3.347100e+02\n14 2587     6.341998e+01 -4.538800e+02\n15 2587     -3.957200e+02 5.173000e+02\n0 2588     2.361100e+02 4.285300e+02\n1 2588     6.110300e+02 3.745800e+02\n7 2588     8.789978e+00 5.197100e+02\n14 2588     5.470900e+02 -3.009900e+02\n0 2589     -3.102400e+02 3.990700e+02\n1 2589     3.842999e+01 4.853100e+02\n2 2589     -5.911700e+02 1.364600e+02\n7 2589     -5.235300e+02 4.290900e+02\n8 2589     -4.048300e+02 9.554001e+01\n10 2589     -5.078900e+02 5.879200e+02\n14 2589     8.609985e+00 -3.479500e+02\n0 2590     2.558800e+02 4.750500e+02\n1 2590     6.458000e+02 4.182700e+02\n6 2590     -1.966200e+02 5.421000e+02\n7 2590     2.175000e+01 5.687200e+02\n9 2590     -2.015400e+02 2.762600e+02\n13 2590     3.930601e+02 1.642200e+02\n14 2590     5.636700e+02 -2.507400e+02\n0 2591     2.434000e+02 4.505200e+02\n1 2591     6.256000e+02 3.957900e+02\n2 2591     -6.782001e+01 2.066600e+02\n5 2591     6.469399e+02 -1.971100e+02\n7 2591     1.281000e+01 5.427700e+02\n11 2591     3.726200e+02 -2.973000e+02\n12 2591     -3.917999e+01 4.850000e+02\n13 2591     3.840800e+02 1.427000e+02\n14 2591     5.528600e+02 -2.772800e+02\n0 2592     3.660999e+01 4.239800e+02\n1 2592     3.963600e+02 4.229100e+02\n7 2592     -1.814500e+02 4.940100e+02\n14 2592     3.497700e+02 -3.143900e+02\n0 2593     -1.650800e+02 2.297100e+02\n1 2593     1.319900e+02 2.845200e+02\n7 2593     -3.456400e+02 2.755200e+02\n14 2593     1.699000e+02 -5.320000e+02\n15 2593     -2.742700e+02 4.263800e+02\n0 2594     2.018101e+02 4.538600e+02\n1 2594     5.802900e+02 4.099000e+02\n2 2594     -1.048400e+02 2.097900e+02\n7 2594     -2.725000e+01 5.416600e+02\n14 2594     5.108400e+02 -2.759400e+02\n0 2595     -1.033600e+02 4.446700e+02\n1 2595     2.559700e+02 4.790200e+02\n7 2595     -3.210500e+02 4.999100e+02\n13 2595     1.091200e+02 1.177700e+02\n14 2595     2.133400e+02 -2.961100e+02\n0 2596     3.402600e+02 4.482500e+02\n1 2596     7.328101e+02 3.673300e+02\n7 2596     1.035900e+02 5.504300e+02\n13 2596     4.618500e+02 1.467300e+02\n14 2596     6.500601e+02 -2.746200e+02\n0 2597     5.031000e+01 5.031700e+02\n1 2597     4.311700e+02 4.999800e+02\n2 2597     -2.450600e+02 2.640200e+02\n3 2597     -3.778400e+02 -6.797998e+01\n5 2597     4.544399e+02 -1.457500e+02\n7 2597     -1.781600e+02 5.765000e+02\n13 2597     2.298500e+02 1.754300e+02\n14 2597     3.621400e+02 -2.306200e+02\n0 2598     2.297300e+02 4.244800e+02\n1 2598     6.028400e+02 3.719300e+02\n7 2598     3.179993e+00 5.149900e+02\n11 2598     3.628000e+02 -3.210700e+02\n14 2598     5.411500e+02 -3.053700e+02\n0 2599     1.081800e+02 4.441900e+02\n1 2599     4.768400e+02 4.246400e+02\n7 2599     -1.148500e+02 5.221800e+02\n14 2599     4.197100e+02 -2.902400e+02\n0 2600     -3.159900e+02 4.188000e+02\n1 2600     3.753003e+01 5.058000e+02\n4 2600     -8.309998e+00 -1.725800e+02\n7 2600     -5.316800e+02 4.487800e+02\n10 2600     -5.177400e+02 6.110900e+02\n11 2600     -1.329100e+02 -3.385700e+02\n13 2600     -5.966998e+01 8.534000e+01\n14 2600     5.169983e+00 -3.271500e+02\n0 2601     -1.998999e+01 4.817100e+02\n1 2601     3.516801e+02 4.955100e+02\n3 2601     -4.394000e+02 -9.270001e+01\n5 2601     3.841100e+02 -1.691600e+02\n6 2601     -4.982500e+02 4.933000e+02\n7 2601     -2.439500e+02 5.469500e+02\n12 2601     -3.224900e+02 4.839300e+02\n14 2601     2.941700e+02 -2.555400e+02\n0 2602     -6.985999e+01 4.916100e+02\n1 2602     3.024301e+02 5.180600e+02\n3 2602     -4.847000e+02 -8.039001e+01\n5 2602     3.355601e+02 -1.597600e+02\n6 2602     -5.564600e+02 4.960900e+02\n7 2602     -2.941800e+02 5.519500e+02\n11 2602     8.546997e+01 -2.724500e+02\n12 2602     -3.785700e+02 4.884300e+02\n14 2602     2.464500e+02 -2.465200e+02\n0 2603     -2.040002e+01 4.740200e+02\n1 2603     3.491100e+02 4.879000e+02\n2 2603     -3.082000e+02 2.296500e+02\n6 2603     -4.968800e+02 4.828700e+02\n7 2603     -2.434100e+02 5.389600e+02\n8 2603     -1.735200e+02 1.737500e+02\n11 2603     1.300100e+02 -2.869700e+02\n12 2603     -3.217400e+02 4.745800e+02\n14 2603     2.939000e+02 -2.635100e+02\n0 2604     -5.419983e+00 5.036400e+02\n1 2604     3.721700e+02 5.143800e+02\n2 2604     -2.960900e+02 2.638400e+02\n3 2604     -4.270200e+02 -6.746997e+01\n6 2604     -4.856800e+02 5.247100e+02\n7 2604     -2.326900e+02 5.712800e+02\n9 2604     -4.042500e+02 2.937100e+02\n12 2604     -3.105400e+02 5.117600e+02\n14 2604     3.088500e+02 -2.323900e+02\n0 2605     2.573000e+02 4.826700e+02\n1 2605     6.498101e+02 4.257400e+02\n7 2605     2.223999e+01 5.767100e+02\n14 2605     5.650100e+02 -2.424000e+02\n0 2606     3.631200e+02 4.522000e+02\n1 2606     7.605500e+02 3.655200e+02\n6 2606     -8.028000e+01 5.356300e+02\n7 2606     1.244700e+02 5.566200e+02\n11 2606     4.848400e+02 -2.892700e+02\n14 2606     6.728199e+02 -2.687900e+02\n0 2607     3.433500e+02 4.730400e+02\n1 2607     7.439900e+02 3.931700e+02\n6 2607     -1.045300e+02 5.582700e+02\n7 2607     1.036800e+02 5.752900e+02\n12 2607     5.815002e+01 5.254800e+02\n14 2607     6.507400e+02 -2.478100e+02\n0 2608     -9.950000e+01 4.735000e+02\n1 2608     2.674800e+02 5.072600e+02\n2 2608     -3.832100e+02 2.287500e+02\n3 2608     -5.125100e+02 -1.018300e+02\n5 2608     3.057500e+02 -1.783000e+02\n7 2608     -3.214900e+02 5.302200e+02\n12 2608     -4.081500e+02 4.634400e+02\n14 2608     2.172000e+02 -2.661800e+02\n0 2609     -3.528998e+01 4.782100e+02\n1 2609     3.349301e+02 4.961000e+02\n7 2609     -2.585800e+02 5.420900e+02\n14 2609     2.793500e+02 -2.595200e+02\n0 2610     -8.412000e+01 4.679700e+02\n1 2610     2.821100e+02 4.978700e+02\n2 2610     -3.683100e+02 2.222400e+02\n6 2610     -5.686000e+02 4.620600e+02\n7 2610     -3.053700e+02 5.261200e+02\n8 2610     -2.227300e+02 1.669500e+02\n12 2610     -3.905500e+02 4.586200e+02\n14 2610     2.318900e+02 -2.715300e+02\n0 2611     -1.191900e+02 4.217100e+02\n1 2611     2.348400e+02 4.603200e+02\n2 2611     -3.992100e+02 1.667300e+02\n5 2611     2.831600e+02 -2.339500e+02\n7 2611     -3.341000e+02 4.742000e+02\n8 2611     -2.479700e+02 1.223700e+02\n12 2611     -4.210400e+02 3.975000e+02\n14 2611     1.966300e+02 -3.214400e+02\n0 2612     -1.660800e+02 3.268100e+02\n1 2612     1.646899e+02 3.782500e+02\n7 2612     -3.681000e+02 3.701000e+02\n14 2612     1.466899e+02 -4.257200e+02\n0 2613     -4.282300e+02 4.445100e+02\n1 2613     -6.541998e+01 5.575700e+02\n2 2613     -7.176400e+02 1.939600e+02\n5 2613     -1.891998e+01 -2.060400e+02\n14 2613     -1.020900e+02 -2.998900e+02\n0 2614     2.991100e+02 5.657500e+02\n1 2614     7.211801e+02 5.038200e+02\n11 2614     4.111600e+02 -1.937600e+02\n13 2614     4.237700e+02 2.437200e+02\n14 2614     5.992900e+02 -1.548700e+02\n0 2615     1.947000e+02 4.025000e+02\n1 2615     5.585300e+02 3.585400e+02\n13 2615     3.473900e+02 9.781000e+01\n0 2616     3.651300e+02 4.565400e+02\n1 2616     7.640200e+02 3.695900e+02\n7 2616     1.259500e+02 5.609400e+02\n13 2616     4.814600e+02 1.557100e+02\n14 2616     6.744100e+02 -2.640500e+02\n0 2617     9.122998e+01 5.005800e+02\n1 2617     4.733300e+02 4.869200e+02\n2 2617     -2.080100e+02 2.614600e+02\n13 2617     2.618400e+02 1.756700e+02\n14 2617     4.013300e+02 -2.317900e+02\n0 2618     3.576300e+02 4.415700e+02\n1 2618     7.510100e+02 3.557100e+02\n2 2618     3.177002e+01 2.014900e+02\n14 2618     6.689500e+02 -2.804700e+02\n0 2619     3.118101e+02 -4.209003e+01\n1 2619     4.641400e+02 -1.088600e+02\n7 2619     2.221700e+02 1.187900e+02\n10 2619     2.716500e+02 1.242800e+02\n15 2619     3.983500e+02 1.215900e+02\n0 2620     -8.306000e+01 4.887400e+02\n1 2620     2.881899e+02 5.186700e+02\n3 2620     -4.969400e+02 -8.359003e+01\n5 2620     3.229900e+02 -1.617500e+02\n6 2620     -5.712400e+02 4.903600e+02\n7 2620     -3.067900e+02 5.481800e+02\n12 2620     -3.929200e+02 4.833000e+02\n0 2621     5.546500e+02 6.462000e+01\n1 2621     8.024700e+02 -8.803003e+01\n6 2621     3.812400e+02 1.886200e+02\n15 2621     7.366100e+02 3.016800e+02\n0 2622     5.286300e+02 7.982999e+01\n1 2622     7.803600e+02 -6.437000e+01\n6 2622     3.437000e+02 1.955800e+02\n7 2622     3.691500e+02 2.424000e+02\n10 2622     5.129301e+02 2.905300e+02\n15 2622     6.980601e+02 3.190800e+02\n0 2623     5.748000e+02 -3.094000e+01\n1 2623     7.933900e+02 -1.944900e+02\n13 2623     7.991700e+02 -2.316900e+02\n15 2623     7.755000e+02 1.721900e+02\n0 2624     4.120400e+02 -5.360999e+01\n1 2624     5.745699e+02 -1.554700e+02\n6 2624     3.669900e+02 6.271002e+01\n10 2624     3.883700e+02 1.218900e+02\n12 2624     4.187300e+02 9.296002e+01\n15 2624     5.411899e+02 1.193700e+02\n0 2625     -1.768700e+02 -1.341998e+01\n1 2625     2.460022e+00 6.371002e+01\n10 2625     -2.976500e+02 1.067500e+02\n15 2625     -2.690300e+02 9.419000e+01\n0 2626     3.923800e+02 -7.959003e+01\n1 2626     5.422000e+02 -1.744800e+02\n12 2626     4.118900e+02 6.471997e+01\n15 2626     5.161100e+02 8.142999e+01\n0 2627     5.221300e+02 1.089700e+02\n1 2627     7.829399e+02 -3.202002e+01\n7 2627     3.589399e+02 2.692800e+02\n13 2627     7.284301e+02 -1.128200e+02\n15 2627     6.856100e+02 3.587300e+02\n0 2628     1.301600e+02 -8.557001e+01\n1 2628     2.598300e+02 -9.353998e+01\n2 2628     3.164399e+02 -2.754999e+01\n6 2628     1.423400e+02 -3.328998e+01\n7 2628     6.053998e+01 5.113000e+01\n12 2628     1.579300e+02 1.390002e+01\n13 2628     4.996899e+02 -2.844700e+02\n15 2628     1.527700e+02 3.834003e+01\n0 2629     5.753000e+02 -1.632001e+01\n1 2629     7.984399e+02 -1.790700e+02\n6 2629     4.293900e+02 1.054200e+02\n7 2629     4.290200e+02 1.582700e+02\n10 2629     5.753600e+02 1.828500e+02\n15 2629     7.747400e+02 1.927400e+02\n0 2630     -4.037300e+02 7.899780e-01\n1 2630     -1.731400e+02 1.332300e+02\n15 2630     -5.715600e+02 8.139001e+01\n0 2631     -1.050500e+02 9.607001e+01\n1 2631     1.089900e+02 1.474400e+02\n7 2631     -2.256900e+02 1.787000e+02\n10 2631     -2.264300e+02 2.422800e+02\n15 2631     -1.850500e+02 2.530900e+02\n0 2632     -1.554100e+02 3.246997e+01\n1 2632     4.028998e+01 1.008800e+02\n7 2632     -2.642900e+02 1.072500e+02\n10 2632     -2.787100e+02 1.633100e+02\n15 2632     -2.448500e+02 1.593300e+02\n0 2633     2.648900e+02 1.321300e+02\n1 2633     4.748199e+02 8.026999e+01\n10 2633     2.007300e+02 3.221700e+02\n15 2633     3.127900e+02 3.547900e+02\n0 2634     7.091998e+01 5.552002e+01\n1 2634     2.460000e+02 6.253998e+01\n15 2634     5.377002e+01 2.226100e+02\n0 2635     9.669000e+01 -2.296100e+02\n1 2635     1.788000e+02 -2.229700e+02\n10 2635     4.242999e+01 -1.145400e+02\n15 2635     1.255300e+02 -1.612700e+02\n0 2636     2.837300e+02 1.129500e+02\n1 2636     4.881700e+02 5.484003e+01\n15 2636     3.411500e+02 3.312200e+02\n0 2637     3.950699e+02 -6.004999e+01\n1 2637     5.538101e+02 -1.561900e+02\n15 2637     5.183900e+02 1.085700e+02\n0 2638     3.010699e+02 -1.142400e+02\n1 2638     4.264500e+02 -1.771900e+02\n7 2638     2.257600e+02 4.846997e+01\n10 2638     2.652400e+02 3.991998e+01\n15 2638     3.911100e+02 2.200000e+01\n0 2639     2.858700e+02 8.606000e+01\n1 2639     4.794200e+02 2.784003e+01\n7 2639     1.749600e+02 2.388600e+02\n10 2639     2.290900e+02 2.702300e+02\n13 2639     5.950300e+02 -1.298000e+02\n15 2639     3.467200e+02 2.943500e+02\n0 2640     3.006899e+02 -9.897998e+01\n1 2640     4.331500e+02 -1.623700e+02\n15 2640     3.897700e+02 4.323999e+01\n0 2641     2.423000e+02 -2.341000e+02\n1 2641     3.220601e+02 -2.752900e+02\n12 2641     3.360300e+02 -1.197500e+02\n15 2641     3.246500e+02 -1.481800e+02\n0 2642     -8.358002e+01 -1.476700e+02\n1 2642     3.796002e+01 -8.919000e+01\n3 2642     3.331000e+01 -4.630000e+02\n4 2642     -3.643000e+02 -3.441200e+02\n6 2642     -7.640997e+01 -1.817700e+02\n7 2642     -1.440200e+02 -4.977002e+01\n8 2642     1.132100e+02 -1.774900e+02\n10 2642     -1.743200e+02 -3.896002e+01\n12 2642     -7.673999e+01 -1.270800e+02\n13 2642     3.148900e+02 -3.581900e+02\n15 2642     -1.275600e+02 -7.421002e+01\n0 2643     2.832000e+02 -1.192700e+02\n1 2643     4.064301e+02 -1.765600e+02\n10 2643     2.460000e+02 3.234998e+01\n15 2643     3.674600e+02 1.273999e+01\n0 2644     6.542999e+01 8.106000e+01\n1 2644     2.493400e+02 8.937000e+01\n7 2644     -3.441998e+01 2.042600e+02\n15 2644     4.282001e+01 2.568000e+02\n0 2645     2.424000e+02 -5.145001e+01\n1 2645     3.847400e+02 -9.509998e+01\n7 2645     1.619900e+02 1.018000e+02\n13 2645     5.884800e+02 -2.475700e+02\n15 2645     3.024000e+02 9.998001e+01\n0 2646     -1.806700e+02 -4.587000e+02\n1 2646     -1.351500e+02 -3.546100e+02\n6 2646     -9.950000e+01 -6.171500e+02\n7 2646     -1.928600e+02 -3.891900e+02\n15 2646     -2.141700e+02 -5.081700e+02\n0 2647     2.513300e+02 -5.188000e+01\n1 2647     3.940200e+02 -9.864001e+01\n7 2647     1.701200e+02 1.027700e+02\n10 2647     2.030800e+02 1.072500e+02\n13 2647     5.951100e+02 -2.470600e+02\n15 2647     3.148800e+02 1.006200e+02\n0 2648     -1.191200e+02 6.158002e+01\n1 2648     8.151001e+01 1.190300e+02\n15 2648     -2.005800e+02 2.042600e+02\n0 2649     1.998900e+02 5.196002e+01\n1 2649     3.731200e+02 2.096002e+01\n7 2649     1.036800e+02 1.967500e+02\n10 2649     1.327600e+02 2.222000e+02\n13 2649     5.386400e+02 -1.612300e+02\n15 2649     2.303101e+02 2.358200e+02\n0 2650     3.757700e+02 -1.415700e+02\n1 2650     4.985400e+02 -2.302400e+02\n6 2650     3.878200e+02 -2.879999e+01\n7 2650     2.993000e+02 3.241998e+01\n10 2650     3.546600e+02 1.684998e+01\n12 2650     4.272000e+02 3.229980e+00\n13 2650     7.081700e+02 -3.190900e+02\n15 2650     4.995400e+02 -5.030029e+00\n0 2651     2.419000e+02 -1.360900e+02\n1 2651     3.567600e+02 -1.789400e+02\n10 2651     1.997200e+02 8.940002e+00\n15 2651     3.116500e+02 -1.521997e+01\n0 2652     2.899600e+02 7.871997e+01\n1 2652     4.811899e+02 1.900000e+01\n7 2652     1.800000e+02 2.323700e+02\n10 2652     2.351300e+02 2.630000e+02\n15 2652     3.536100e+02 2.851000e+02\n0 2653     2.365100e+02 2.377100e+02\n1 2653     5.374100e+02 1.824700e+02\n10 2653     1.585100e+02 4.458700e+02\n15 2653     2.766200e+02 4.947700e+02\n0 2654     3.674100e+02 -4.353998e+01\n1 2654     5.265000e+02 -1.295200e+02\n7 2654     2.709000e+02 1.226400e+02\n10 2654     3.360400e+02 1.286700e+02\n15 2654     4.767500e+02 1.274300e+02\n0 2655     5.909003e+01 -1.289900e+02\n1 2655     1.769500e+02 -1.142900e+02\n7 2655     -2.900024e+00 -4.359985e+00\n12 2655     8.971997e+01 -5.747998e+01\n15 2655     6.198999e+01 -2.996002e+01\n0 2656     -2.553300e+02 1.971500e+02\n1 2656     3.469000e+01 2.772500e+02\n15 2656     -3.937500e+02 3.694400e+02\n0 2657     2.634600e+02 1.403200e+02\n1 2657     4.772400e+02 8.879999e+01\n15 2657     3.104301e+02 3.661800e+02\n0 2658     3.246200e+02 3.064001e+01\n1 2658     5.031899e+02 -4.046002e+01\n15 2658     4.075200e+02 2.234300e+02\n0 2659     -4.120200e+02 -1.395300e+02\n1 2659     -2.296700e+02 6.890015e+00\n7 2659     -5.123600e+02 -1.238800e+02\n15 2659     -5.652600e+02 -1.097200e+02\n0 2660     1.840000e+02 7.712000e+01\n1 2660     3.657600e+02 5.116998e+01\n10 2660     1.120200e+02 2.498900e+02\n15 2660     2.058199e+02 2.681400e+02\n0 2661     1.672800e+02 -2.189200e+02\n1 2661     2.528101e+02 -2.357100e+02\n2 2661     4.127100e+02 -1.482800e+02\n10 2661     1.236000e+02 -9.432001e+01\n15 2661     2.204301e+02 -1.372200e+02\n0 2662     2.136700e+02 4.422998e+01\n1 2662     3.852100e+02 9.440002e+00\n10 2662     1.497600e+02 2.144100e+02\n15 2662     2.505800e+02 2.273000e+02\n0 2663     8.458002e+01 -1.981400e+02\n1 2663     1.798101e+02 -1.892200e+02\n10 2663     2.521997e+01 -7.951001e+01\n15 2663     1.054700e+02 -1.200900e+02\n0 2664     1.892400e+02 2.778998e+01\n1 2664     3.541100e+02 2.999878e-01\n7 2664     9.887000e+01 1.720400e+02\n10 2664     1.230100e+02 1.931000e+02\n15 2664     2.188600e+02 2.010300e+02\n0 2665     -2.081600e+02 2.243300e+02\n1 2665     8.890997e+01 2.907800e+02\n8 2665     -2.814900e+02 -5.025000e+01\n11 2665     -4.283002e+01 -5.175000e+02\n13 2665     4.190997e+01 -7.652002e+01\n14 2665     1.235300e+02 -5.385699e+02\n15 2665     -3.325000e+02 4.134400e+02\n0 2666     2.149399e+02 8.926001e+01\n1 2666     4.026700e+02 5.328998e+01\n15 2666     2.476801e+02 2.888800e+02\n0 2667     2.836100e+02 6.241998e+01\n1 2667     4.670300e+02 4.640015e+00\n7 2667     1.780100e+02 2.142900e+02\n10 2667     2.291600e+02 2.411300e+02\n15 2667     3.465800e+02 2.610400e+02\n0 2668     3.080500e+02 -1.011400e+02\n1 2668     4.394500e+02 -1.670300e+02\n7 2668     2.302000e+02 6.165002e+01\n10 2668     2.727100e+02 5.613000e+01\n15 2668     4.005900e+02 4.110999e+01\n0 2669     2.934100e+02 5.926001e+01\n1 2669     4.772800e+02 -1.549988e+00\n7 2669     1.867800e+02 2.139200e+02\n15 2669     3.602800e+02 2.584900e+02\n0 2670     -4.575000e+01 -1.726400e+02\n1 2670     6.398999e+01 -1.246300e+02\n7 2670     -9.952002e+01 -6.665002e+01\n12 2670     -1.920001e+01 -1.406900e+02\n15 2670     -7.370001e+01 -1.030200e+02\n0 2671     7.221002e+01 -2.084700e+02\n1 2671     1.635200e+02 -1.950200e+02\n4 2671     -4.379800e+02 -4.702200e+02\n7 2671     2.662000e+01 -7.953998e+01\n10 2671     1.172998e+01 -9.244000e+01\n0 2672     -1.221300e+02 -2.121500e+02\n1 2672     -7.960022e+00 -1.409500e+02\n10 2672     -2.118800e+02 -1.174100e+02\n12 2672     -1.225100e+02 -2.357900e+02\n15 2672     -1.685800e+02 -1.664800e+02\n0 2673     -1.482700e+02 -6.701001e+01\n1 2673     7.909973e+00 5.179993e+00\n6 2673     -2.095500e+02 -1.248500e+02\n12 2673     -1.961800e+02 -6.485999e+01\n15 2673     -2.245900e+02 2.541998e+01\n0 2674     2.198900e+02 -1.431500e+02\n1 2674     3.314900e+02 -1.789200e+02\n15 2674     2.831300e+02 -2.812000e+01\n0 2675     2.521899e+02 3.796997e+01\n1 2675     4.243300e+02 -9.260010e+00\n10 2675     1.952200e+02 2.109000e+02\n15 2675     3.051600e+02 2.235900e+02\n0 2676     2.886899e+02 1.075300e+02\n1 2676     4.919100e+02 4.840002e+01\n15 2676     3.488199e+02 3.244800e+02\n0 2677     1.650800e+02 -1.297600e+02\n1 2677     2.820300e+02 -1.481500e+02\n10 2677     1.110700e+02 8.190002e+00\n15 2677     2.064600e+02 -1.675000e+01\n0 2678     2.477100e+02 8.548999e+01\n1 2678     4.366899e+02 3.954999e+01\n10 2678     1.849800e+02 2.661000e+02\n15 2678     2.935699e+02 2.886400e+02\n0 2679     2.700699e+02 6.460999e+01\n1 2679     4.535400e+02 1.159998e+01\n7 2679     1.659000e+02 2.168200e+02\n15 2679     3.266801e+02 2.627800e+02\n0 2680     3.859700e+02 -8.316998e+01\n1 2680     5.342100e+02 -1.760300e+02\n10 2680     3.611400e+02 8.490997e+01\n15 2680     5.077400e+02 7.578998e+01\n0 2681     2.647200e+02 1.228998e+01\n1 2681     4.287500e+02 -3.871002e+01\n7 2681     1.703800e+02 1.662900e+02\n10 2681     2.113800e+02 1.821000e+02\n13 2681     5.953400e+02 -1.916200e+02\n15 2681     3.248300e+02 1.896200e+02\n0 2682     3.248400e+02 -3.721997e+01\n1 2682     4.804900e+02 -1.089900e+02\n15 2682     4.159399e+02 1.306700e+02\n0 2683     2.651300e+02 -1.558500e+02\n1 2683     3.758600e+02 -2.065000e+02\n10 2683     2.287100e+02 -1.178003e+01\n15 2683     3.474399e+02 -3.906000e+01\n0 2684     3.875800e+02 -6.865997e+01\n1 2684     5.420900e+02 -1.622400e+02\n7 2684     2.919301e+02 1.004300e+02\n10 2684     3.619200e+02 1.023400e+02\n15 2684     5.088300e+02 9.591000e+01\n0 2685     1.232200e+02 -2.060200e+02\n1 2685     2.147200e+02 -2.089600e+02\n15 2685     1.588600e+02 -1.252300e+02\n0 2686     2.833400e+02 -1.157300e+02\n1 2686     4.080400e+02 -1.729500e+02\n10 2686     2.459900e+02 3.690997e+01\n13 2686     6.291700e+02 -3.013900e+02\n15 2686     3.673000e+02 1.787000e+01\n0 2687     2.330900e+02 -1.066400e+02\n1 2687     3.593900e+02 -1.474300e+02\n2 2687     4.080500e+02 -3.907001e+01\n10 2687     1.860200e+02 4.128998e+01\n12 2687     2.712900e+02 1.147998e+01\n15 2687     2.972600e+02 2.402002e+01\n0 2688     9.909998e+01 -1.340300e+02\n1 2688     2.146500e+02 -1.313700e+02\n10 2688     3.542999e+01 -3.599976e+00\n15 2688     1.168600e+02 -3.134998e+01\n0 2689     4.182000e+02 -9.870001e+01\n1 2689     5.620601e+02 -2.024500e+02\n10 2689     3.993101e+02 7.058002e+01\n15 2689     5.541500e+02 5.876001e+01\n0 2690     2.399700e+02 2.981000e+01\n1 2690     4.084600e+02 -1.323999e+01\n7 2690     1.450200e+02 1.808200e+02\n10 2690     1.811500e+02 2.003400e+02\n13 2690     5.736600e+02 -1.778800e+02\n15 2690     2.885601e+02 2.104600e+02\n0 2691     -1.757800e+02 -4.538900e+02\n1 2691     -1.290200e+02 -3.520400e+02\n6 2691     -9.550000e+01 -6.099399e+02\n15 2691     -2.072600e+02 -5.012300e+02\n0 2692     2.359399e+02 -1.369200e+02\n1 2692     3.507600e+02 -1.778800e+02\n7 2692     1.706500e+02 1.763000e+01\n10 2692     1.936500e+02 7.390015e+00\n15 2692     3.041300e+02 -1.725000e+01\n0 2693     -1.467999e+01 -2.672300e+02\n1 2693     7.052002e+01 -2.257200e+02\n6 2693     3.546997e+01 -3.011200e+02\n7 2693     -5.596002e+01 -1.590000e+02\n9 2693     8.975000e+01 -1.427700e+02\n10 2693     -8.150000e+01 -1.692600e+02\n12 2693     3.709998e+01 -2.545700e+02\n13 2693     3.844900e+02 -4.639800e+02\n15 2693     -1.750000e+01 -2.262400e+02\n0 2694     3.153199e+02 -1.900024e+00\n1 2694     4.808500e+02 -7.006000e+01\n15 2694     3.980400e+02 1.777100e+02\n0 2695     2.383700e+02 -1.284300e+02\n1 2695     3.566200e+02 -1.705400e+02\n7 2695     1.710300e+02 2.589001e+01\n10 2695     1.956400e+02 1.738000e+01\n12 2695     2.869500e+02 -9.349976e+00\n15 2695     3.067400e+02 -5.340027e+00\n0 2696     2.423000e+02 -2.341000e+02\n1 2696     3.220601e+02 -2.752900e+02\n12 2696     3.360300e+02 -1.197500e+02\n15 2696     3.246500e+02 -1.481800e+02\n0 2697     2.888400e+02 1.215300e+02\n1 2697     4.985000e+02 6.190002e+01\n15 2697     3.479200e+02 3.434900e+02\n0 2698     3.248400e+02 -3.721997e+01\n1 2698     4.804900e+02 -1.089900e+02\n13 2698     6.449100e+02 -2.317400e+02\n15 2698     4.159399e+02 1.306700e+02\n0 2699     5.863000e+01 -2.025800e+02\n1 2699     1.529100e+02 -1.849700e+02\n15 2699     7.050000e+01 -1.289500e+02\n0 2700     -1.464700e+02 -1.208100e+02\n1 2700     -1.090002e+01 -4.484998e+01\n10 2700     -2.505000e+02 -1.471997e+01\n12 2700     -1.660400e+02 -1.187800e+02\n15 2700     -2.156700e+02 -4.660999e+01\n0 2701     -1.762700e+02 -4.569600e+02\n1 2701     -1.306200e+02 -3.546900e+02\n15 2701     -2.082500e+02 -5.051200e+02\n0 2702     3.331600e+02 -1.785600e+02\n1 2702     4.383800e+02 -2.519600e+02\n6 2702     3.707100e+02 -7.565997e+01\n7 2702     2.690100e+02 -8.090027e+00\n10 2702     3.092300e+02 -3.072998e+01\n12 2702     4.024600e+02 -4.251001e+01\n13 2702     6.838101e+02 -3.528900e+02\n15 2702     4.440900e+02 -6.121997e+01\n0 2703     1.129800e+02 -2.066200e+02\n1 2703     2.041700e+02 -2.061500e+02\n15 2703     1.446100e+02 -1.274800e+02\n0 2704     1.324500e+02 -1.431400e+02\n1 2704     2.439800e+02 -1.507900e+02\n12 2704     1.796600e+02 -5.075000e+01\n15 2704     1.632400e+02 -3.871002e+01\n0 2705     4.090400e+02 -8.463000e+01\n1 2705     5.582200e+02 -1.852300e+02\n6 2705     3.832400e+02 3.303998e+01\n7 2705     3.155500e+02 8.879001e+01\n10 2705     3.877000e+02 8.564001e+01\n12 2705     4.312100e+02 6.365002e+01\n15 2705     5.400601e+02 7.659998e+01\n0 2706     3.037400e+02 8.848001e+01\n1 2706     5.011700e+02 2.406000e+01\n7 2706     1.892800e+02 2.420400e+02\n10 2706     2.500500e+02 2.749800e+02\n15 2706     3.718700e+02 3.000100e+02\n0 2707     9.909998e+01 -1.340300e+02\n1 2707     2.146500e+02 -1.313700e+02\n10 2707     3.542999e+01 -3.599976e+00\n15 2707     1.168600e+02 -3.134998e+01\n0 2708     3.682200e+02 -5.900024e+00\n1 2708     5.436300e+02 -9.279999e+01\n6 2708     3.073900e+02 1.021300e+02\n7 2708     2.618000e+02 1.569300e+02\n10 2708     3.331100e+02 1.728000e+02\n12 2708     3.582600e+02 1.351700e+02\n15 2708     4.742900e+02 1.791700e+02\n0 2709     3.263600e+02 -2.001001e+01\n1 2709     4.884301e+02 -9.178998e+01\n7 2709     2.306000e+02 1.414100e+02\n10 2709     2.868900e+02 1.511600e+02\n15 2709     4.163900e+02 1.541500e+02\n0 2710     -1.288300e+02 -1.107000e+02\n1 2710     9.919983e+00 -4.131000e+01\n7 2710     -1.992000e+02 -2.296997e+01\n10 2710     -2.310500e+02 -9.699707e-01\n13 2710     2.642600e+02 -3.310100e+02\n15 2710     -1.924500e+02 -3.064001e+01\n0 2711     2.479399e+02 1.572200e+02\n1 2711     4.680400e+02 1.102400e+02\n10 2711     1.783500e+02 3.504400e+02\n15 2711     2.867600e+02 3.873500e+02\n0 2712     -1.861400e+02 -4.601000e+02\n1 2712     -1.406900e+02 -3.543300e+02\n6 2712     -1.050500e+02 -6.211700e+02\n15 2712     -2.211600e+02 -5.106801e+02\n0 2713     3.584800e+02 -4.425000e+01\n1 2713     5.168700e+02 -1.275000e+02\n7 2713     2.626100e+02 1.209700e+02\n10 2713     3.258300e+02 1.269600e+02\n15 2713     4.646500e+02 1.251400e+02\n0 2714     3.128300e+02 9.304001e+01\n1 2714     5.143300e+02 2.565997e+01\n10 2714     2.598700e+02 2.819500e+02\n15 2714     3.847900e+02 3.078400e+02\n0 2715     3.241300e+02 6.745001e+01\n1 2715     5.172500e+02 -3.669983e+00\n10 2715     2.752500e+02 2.535700e+02\n15 2715     4.032500e+02 2.741600e+02\n0 2716     1.792300e+02 -1.135999e+01\n1 2716     3.308400e+02 -3.534998e+01\n2 2716     3.358700e+02 5.773999e+01\n15 2716     2.099000e+02 1.457300e+02\n0 2717     2.874000e+02 9.850000e+01\n1 2717     4.865000e+02 4.062000e+01\n10 2717     2.301300e+02 2.834200e+02\n15 2717     3.476500e+02 3.115200e+02\n0 2718     3.382600e+02 8.595001e+01\n1 2718     5.518900e+02 7.710022e+00\n10 2718     2.896300e+02 2.766000e+02\n15 2718     4.236600e+02 3.009900e+02\n0 2719     1.613101e+02 -1.474200e+02\n1 2719     2.708199e+02 -1.639800e+02\n7 2719     1.021100e+02 -4.010010e+00\n10 2719     1.085200e+02 -1.229999e+01\n15 2719     2.030400e+02 -4.114001e+01\n0 2720     2.466500e+02 -2.096700e+02\n1 2720     3.364100e+02 -2.532800e+02\n2 2720     4.754500e+02 -1.253000e+02\n6 2720     3.069900e+02 -1.309500e+02\n8 2720     4.191600e+02 -1.553000e+02\n10 2720     2.130000e+02 -7.545001e+01\n15 2720     3.278900e+02 -1.149300e+02\n0 2721     4.151801e+02 -4.896997e+01\n1 2721     5.800500e+02 -1.521100e+02\n7 2721     3.124800e+02 1.219100e+02\n13 2721     7.123400e+02 -2.406200e+02\n15 2721     5.452600e+02 1.262200e+02\n0 2722     -7.676001e+01 -1.396600e+02\n1 2722     4.795001e+01 -8.377002e+01\n6 2722     -7.506000e+01 -1.715699e+02\n7 2722     -1.389400e+02 -4.123999e+01\n10 2722     -1.668500e+02 -2.878003e+01\n12 2722     -7.271002e+01 -1.171700e+02\n13 2722     3.191600e+02 -3.515900e+02\n15 2722     -1.192500e+02 -6.240002e+01\n0 2723     -3.369995e+00 -1.055800e+02\n1 2723     1.261000e+02 -7.271002e+01\n6 2723     -6.500244e-01 -1.035300e+02\n7 2723     -7.007001e+01 7.150024e+00\n10 2723     -8.609998e+01 1.835999e+01\n12 2723     6.349976e+00 -5.175000e+01\n15 2723     -2.506000e+01 -6.609985e+00\n0 2724     3.875800e+02 -6.865997e+01\n1 2724     5.420900e+02 -1.622400e+02\n7 2724     2.919301e+02 1.004300e+02\n10 2724     3.619200e+02 1.023400e+02\n15 2724     5.088300e+02 9.591000e+01\n0 2725     1.251100e+02 -2.094000e+02\n1 2725     2.151600e+02 -2.130900e+02\n7 2725     7.847998e+01 -7.101001e+01\n10 2725     7.348999e+01 -8.789001e+01\n13 2725     5.145100e+02 -3.934100e+02\n15 2725     1.619700e+02 -1.297500e+02\n0 2726     -3.145900e+02 3.028998e+01\n1 2726     -8.106000e+01 1.366500e+02\n2 2726     -4.359100e+02 -2.260000e+02\n7 2726     -4.520500e+02 5.953998e+01\n10 2726     -4.651200e+02 1.444800e+02\n13 2726     -4.059998e+00 -2.470700e+02\n0 2727     3.196000e+02 3.231000e+01\n1 2727     4.977500e+02 -3.682001e+01\n15 2727     4.005100e+02 2.253500e+02\n0 2728     3.281600e+02 3.239990e+00\n1 2728     4.978500e+02 -6.882001e+01\n15 2728     4.161600e+02 1.854900e+02\n0 2729     4.207100e+02 -1.184800e+02\n1 2729     5.566000e+02 -2.229700e+02\n2 2729     5.518800e+02 -4.103003e+01\n6 2729     4.151000e+02 5.000000e+00\n7 2729     3.349200e+02 5.998999e+01\n8 2729     4.936400e+02 -7.934003e+01\n10 2729     4.043000e+02 4.826001e+01\n12 2729     4.604200e+02 3.510999e+01\n15 2729     5.598900e+02 3.190997e+01\n0 2730     2.887000e+02 -2.012000e+02\n1 2730     3.830800e+02 -2.594100e+02\n6 2730     3.427200e+02 -1.100900e+02\n10 2730     2.607700e+02 -6.129999e+01\n13 2730     6.528800e+02 -3.751200e+02\n15 2730     3.854100e+02 -9.820001e+01\n0 2731     9.358002e+01 -2.114100e+02\n1 2731     1.834600e+02 -2.045500e+02\n10 2731     3.694000e+01 -9.392999e+01\n15 2731     1.189800e+02 -1.371700e+02\n0 2732     -1.465800e+02 -1.123800e+02\n1 2732     -7.979980e+00 -3.745001e+01\n6 2732     -1.729100e+02 -1.689200e+02\n7 2732     -2.170900e+02 -2.772998e+01\n8 2732     3.726001e+01 -1.671500e+02\n10 2732     -2.511000e+02 -4.780029e+00\n12 2732     -1.701500e+02 -1.098400e+02\n15 2732     -2.168700e+02 -3.523999e+01\n0 2733     2.527300e+02 8.066000e+01\n1 2733     4.400000e+02 3.291998e+01\n7 2733     1.470100e+02 2.299100e+02\n10 2733     1.918300e+02 2.600400e+02\n15 2733     3.015900e+02 2.829500e+02\n0 2734     3.031700e+02 5.785999e+01\n1 2734     4.879600e+02 -5.969971e+00\n7 2734     1.960300e+02 2.135200e+02\n10 2734     2.524000e+02 2.395400e+02\n15 2734     3.744200e+02 2.579500e+02\n0 2735     2.899600e+02 7.871997e+01\n1 2735     4.811899e+02 1.900000e+01\n7 2735     1.800000e+02 2.323700e+02\n10 2735     2.351300e+02 2.630000e+02\n15 2735     3.536100e+02 2.851000e+02\n0 2736     2.280400e+02 -2.018300e+02\n1 2736     3.212900e+02 -2.396400e+02\n7 2736     1.754600e+02 -4.663000e+01\n10 2736     1.911600e+02 -6.815997e+01\n13 2736     6.000900e+02 -3.797600e+02\n15 2736     3.017300e+02 -1.063100e+02\n0 2737     3.580200e+02 -4.823999e+01\n1 2737     5.145900e+02 -1.311000e+02\n6 2737     3.255400e+02 6.021997e+01\n7 2737     2.633600e+02 1.176000e+02\n10 2737     3.258000e+02 1.226400e+02\n12 2737     3.703700e+02 9.395001e+01\n13 2737     6.713900e+02 -2.411100e+02\n15 2737     4.644200e+02 1.201500e+02\n0 2738     2.527300e+02 8.066000e+01\n1 2738     4.400000e+02 3.291998e+01\n10 2738     1.918300e+02 2.600400e+02\n15 2738     3.015900e+02 2.829500e+02\n0 2739     4.074200e+02 -6.912000e+01\n1 2739     5.630500e+02 -1.694100e+02\n15 2739     5.364200e+02 9.792001e+01\n0 2740     3.458000e+02 -1.628600e+02\n1 2740     4.582400e+02 -2.412700e+02\n3 2740     4.170200e+02 -3.754000e+02\n6 2740     3.728900e+02 -5.709003e+01\n7 2740     2.769000e+02 8.289978e+00\n8 2740     4.658700e+02 -1.129900e+02\n10 2740     3.224000e+02 -1.066998e+01\n13 2740     6.898900e+02 -3.390200e+02\n15 2740     4.601500e+02 -3.829999e+01\n0 2741     1.208200e+02 -2.616100e+02\n1 2741     1.956000e+02 -2.626300e+02\n4 2741     -4.918800e+02 -5.093300e+02\n10 2741     7.398999e+01 -1.477400e+02\n15 2741     1.633000e+02 -2.012000e+02\n0 2742     1.883199e+02 -2.438000e+02\n1 2742     2.662700e+02 -2.674100e+02\n4 2742     -4.914900e+02 -5.701400e+02\n6 2742     2.653000e+02 -1.863101e+02\n7 2742     1.465699e+02 -9.369000e+01\n9 2742     2.663900e+02 -3.796002e+01\n12 2742     2.775800e+02 -1.498200e+02\n15 2742     2.526500e+02 -1.682800e+02\n0 2743     8.142999e+01 -6.187000e+01\n1 2743     2.188300e+02 -5.551001e+01\n2 2743     2.609301e+02 -1.296002e+01\n7 2743     8.679993e+00 6.657001e+01\n10 2743     7.299988e+00 7.769000e+01\n15 2743     8.320001e+01 6.419000e+01\n0 2744     -4.669983e+00 -7.821997e+01\n1 2744     1.350000e+02 -4.645001e+01\n4 2744     -3.272800e+02 -4.050000e+02\n8 2744     1.620000e+02 -1.022900e+02\n15 2744     -3.028998e+01 3.023999e+01\n0 2745     3.062900e+02 -2.084003e+01\n1 2745     4.642900e+02 -8.581000e+01\n15 2745     3.880500e+02 1.505000e+02\n0 2746     2.282200e+02 -9.400024e+00\n1 2746     3.826000e+02 -4.858002e+01\n3 2746     2.690500e+02 -2.440500e+02\n7 2746     1.417900e+02 1.415600e+02\n10 2746     1.717500e+02 1.536500e+02\n15 2746     2.774301e+02 1.556700e+02\n0 2747     5.396801e+02 2.170600e+02\n1 2747     8.345100e+02 7.726001e+01\n7 2747     3.619500e+02 3.782200e+02\n10 2747     5.151600e+02 4.529100e+02\n15 2747     6.976000e+02 5.133500e+02\n0 2748     7.969000e+01 -1.247000e+02\n1 2748     1.997100e+02 -1.167300e+02\n7 2748     1.635999e+01 3.429993e+00\n10 2748     1.109003e+01 5.530029e+00\n15 2748     8.921002e+01 -2.108002e+01\n0 2749     3.598300e+02 -1.532400e+02\n1 2749     4.767100e+02 -2.363900e+02\n7 2749     2.874100e+02 1.940997e+01\n10 2749     3.379399e+02 1.030029e+00\n15 2749     4.785601e+02 -2.317999e+01\n0 2750     -6.334600e+02 -3.581300e+02\n1 2750     -4.965000e+02 -1.259200e+02\n4 2750     -4.288000e+02 6.032001e+01\n7 2750     -6.964900e+02 -3.870900e+02\n15 2750     -8.438100e+02 -4.383000e+02\n0 2751     4.025000e+02 -2.277200e+02\n1 2751     5.130300e+02 -3.297900e+02\n10 2751     3.940300e+02 -7.885999e+01\n15 2751     5.509700e+02 -1.199000e+02\n0 2752     3.550100e+02 -1.912200e+02\n1 2752     4.555900e+02 -2.720900e+02\n15 2752     4.757000e+02 -7.578998e+01\n0 2753     3.341998e+01 -1.218400e+02\n1 2753     1.551200e+02 -9.928003e+01\n2 2753     2.327700e+02 -9.133002e+01\n3 2753     1.463600e+02 -3.947800e+02\n6 2753     5.016998e+01 -1.071100e+02\n7 2753     -2.944000e+01 -1.750000e+00\n13 2753     4.189500e+02 -3.247000e+02\n15 2753     2.635999e+01 -2.346997e+01\n0 2754     5.660000e+02 6.378998e+01\n1 2754     8.137300e+02 -9.232001e+01\n6 2754     3.954800e+02 1.926700e+02\n10 2754     5.578199e+02 2.754600e+02\n12 2754     4.810200e+02 2.030400e+02\n15 2754     7.520200e+02 3.024500e+02\n0 2755     2.454800e+02 1.245400e+02\n1 2755     4.497200e+02 7.894000e+01\n15 2755     2.869000e+02 3.417000e+02\n0 2756     3.511700e+02 -1.722200e+02\n1 2756     4.598300e+02 -2.520000e+02\n6 2756     3.836300e+02 -6.347998e+01\n7 2756     2.846100e+02 1.280029e+00\n15 2756     4.682700e+02 -4.983002e+01\n0 2757     4.090900e+02 -7.369995e+00\n1 2757     5.916300e+02 -1.083600e+02\n6 2757     3.348000e+02 1.049300e+02\n10 2757     3.812300e+02 1.754800e+02\n15 2757     5.329000e+02 1.828800e+02\n0 2758     5.540002e+01 -1.153100e+02\n1 2758     1.793700e+02 -9.970001e+01\n7 2758     -9.619995e+00 7.869995e+00\n15 2758     5.582001e+01 -1.181000e+01\n0 2759     3.638101e+02 -4.284003e+01\n1 2759     5.233000e+02 -1.278200e+02\n15 2759     4.718199e+02 1.281600e+02\n0 2760     3.873000e+02 5.972998e+01\n1 2760     5.978000e+02 -3.465002e+01\n7 2760     2.589500e+02 2.157900e+02\n15 2760     4.959800e+02 2.717900e+02\n0 2761     1.913500e+02 -2.039000e+02\n1 2761     2.837400e+02 -2.292300e+02\n7 2761     1.408000e+02 -5.462000e+01\n10 2761     1.488100e+02 -7.428998e+01\n13 2761     5.696000e+02 -3.843000e+02\n15 2761     2.512700e+02 -1.140700e+02\n0 2762     3.583199e+02 -2.444900e+02\n1 2762     4.551400e+02 -3.295500e+02\n10 2762     3.447500e+02 -1.031800e+02\n15 2762     4.905100e+02 -1.481400e+02\n0 2763     1.805900e+02 -1.428900e+02\n1 2763     2.919500e+02 -1.659600e+02\n13 2763     5.508400e+02 -3.307500e+02\n15 2763     2.288800e+02 -3.275000e+01\n0 2764     -7.415002e+01 -1.522900e+02\n1 2764     4.527002e+01 -9.621002e+01\n4 2764     -3.693800e+02 -3.514900e+02\n10 2764     -1.629100e+02 -4.321997e+01\n15 2764     -1.144900e+02 -7.884998e+01\n0 2765     -4.452900e+02 3.102002e+01\n1 2765     -2.000500e+02 1.721600e+02\n15 2765     -6.330600e+02 1.168400e+02\n0 2766     3.249100e+02 4.003003e+01\n1 2766     5.068900e+02 -3.090002e+01\n15 2766     4.068800e+02 2.364300e+02\n0 2767     3.048000e+02 -2.429900e+02\n1 2767     3.916700e+02 -3.074000e+02\n6 2767     3.580800e+02 -1.596000e+02\n7 2767     2.505601e+02 -7.721002e+01\n10 2767     2.835601e+02 -1.066200e+02\n12 2767     3.873500e+02 -1.289100e+02\n15 2767     4.140900e+02 -1.526500e+02\n0 2768     2.324500e+02 1.895001e+01\n1 2768     3.965000e+02 -2.171002e+01\n10 2768     1.738600e+02 1.870000e+02\n15 2768     2.798500e+02 1.950100e+02\n0 2769     2.125100e+02 -7.659998e+01\n1 2769     3.455300e+02 -1.104800e+02\n2 2769     3.846500e+02 -6.469971e+00\n6 2769     2.199000e+02 7.199707e-01\n7 2769     1.380400e+02 7.292999e+01\n8 2769     3.472100e+02 -5.389001e+01\n15 2769     2.641100e+02 6.195001e+01\n0 2770     -1.105400e+02 5.733002e+01\n1 2770     8.827002e+01 1.125000e+02\n7 2770     -2.208400e+02 1.416500e+02\n10 2770     -2.283200e+02 1.965400e+02\n13 2770     2.392000e+02 -1.901100e+02\n15 2770     -1.881700e+02 1.995300e+02\n0 2771     -1.266300e+02 2.507000e+02\n1 2771     1.770699e+02 2.946300e+02\n15 2771     -2.241500e+02 4.613100e+02\n0 2772     2.763101e+02 6.141998e+01\n1 2772     4.592600e+02 6.460022e+00\n10 2772     2.207300e+02 2.409500e+02\n15 2772     3.361700e+02 2.591700e+02\n0 2773     1.366300e+02 -2.665600e+02\n1 2773     2.108900e+02 -2.723000e+02\n6 2773     2.136200e+02 -2.332900e+02\n7 2773     9.810999e+01 -1.265700e+02\n12 2773     2.223900e+02 -1.949700e+02\n15 2773     1.859301e+02 -2.047700e+02\n0 2774     6.996997e+01 -2.185200e+02\n1 2774     1.574500e+02 -2.038500e+02\n6 2774     1.367000e+02 -1.970601e+02\n7 2774     2.728998e+01 -8.914001e+01\n10 2774     1.046997e+01 -1.042700e+02\n12 2774     1.384600e+02 -1.534300e+02\n15 2774     8.791998e+01 -1.494200e+02\n0 2775     5.954800e+02 -8.300171e-01\n1 2775     8.241801e+02 -1.696300e+02\n6 2775     4.493900e+02 1.317200e+02\n7 2775     4.467000e+02 1.774500e+02\n8 2775     4.977000e+02 -5.128000e+01\n15 2775     8.010601e+02 2.167700e+02\n0 2776     5.264600e+02 1.977002e+01\n1 2776     7.597600e+02 -1.260800e+02\n15 2776     7.022100e+02 2.357400e+02\n0 2777     2.754000e+02 -1.058400e+02\n1 2777     4.041600e+02 -1.606900e+02\n7 2777     2.003400e+02 5.223999e+01\n10 2777     2.360300e+02 4.727002e+01\n15 2777     3.554200e+02 3.015997e+01\n0 2778     4.169700e+02 -1.124500e+02\n1 2778     5.547500e+02 -2.156000e+02\n12 2778     4.541600e+02 3.996997e+01\n15 2778     5.540601e+02 3.966998e+01\n0 2779     2.843300e+02 4.190002e+00\n1 2779     4.472400e+02 -5.323999e+01\n7 2779     1.900699e+02 1.608900e+02\n12 2779     2.900601e+02 1.468000e+02\n13 2779     6.115699e+02 -1.974600e+02\n15 2779     3.534200e+02 1.817100e+02\n0 2780     5.396801e+02 2.170600e+02\n1 2780     8.345100e+02 7.726001e+01\n7 2780     3.619500e+02 3.782200e+02\n15 2780     6.976000e+02 5.133500e+02\n0 2781     3.409100e+02 -7.708002e+01\n1 2781     4.839800e+02 -1.536400e+02\n10 2781     3.084399e+02 8.746997e+01\n15 2781     4.431000e+02 7.844000e+01\n0 2782     6.451400e+02 -3.159973e+00\n1 2782     8.759100e+02 -1.885400e+02\n2 2782     5.920699e+02 -3.450012e+00\n15 2782     8.711000e+02 2.208400e+02\n0 2783     -3.012400e+02 -4.570699e+02\n1 2783     -2.432800e+02 -3.144100e+02\n15 2783     -3.775200e+02 -5.226500e+02\n0 2784     3.152300e+02 1.040997e+01\n1 2784     4.852400e+02 -5.714001e+01\n7 2784     2.161700e+02 1.699000e+02\n10 2784     2.705200e+02 1.853700e+02\n15 2784     3.966801e+02 1.947500e+02\n0 2785     2.835200e+02 -2.377200e+02\n1 2785     3.678700e+02 -2.939300e+02\n10 2785     2.575601e+02 -1.036300e+02\n15 2785     3.830000e+02 -1.481400e+02\n0 2786     -5.935999e+01 -3.078003e+01\n1 2786     1.007100e+02 1.484998e+01\n10 2786     -1.588600e+02 9.889001e+01\n15 2786     -1.095400e+02 8.692999e+01\n0 2787     3.228000e+02 -3.114001e+01\n1 2787     4.803400e+02 -1.016500e+02\n7 2787     2.295800e+02 1.302400e+02\n10 2787     2.832000e+02 1.384000e+02\n15 2787     4.124700e+02 1.386500e+02\n0 2788     2.742200e+02 1.032300e+02\n1 2788     4.731899e+02 4.859998e+01\n7 2788     1.603700e+02 2.535300e+02\n10 2788     2.138300e+02 2.895400e+02\n13 2788     5.819000e+02 -1.165600e+02\n15 2788     3.286000e+02 3.165600e+02\n0 2789     4.100500e+02 -5.969000e+01\n1 2789     5.697900e+02 -1.607000e+02\n7 2789     3.104600e+02 1.113900e+02\n10 2789     3.866300e+02 1.144400e+02\n13 2789     7.112900e+02 -2.498100e+02\n15 2789     5.389301e+02 1.107100e+02\n0 2790     2.742200e+02 1.032300e+02\n1 2790     4.731899e+02 4.859998e+01\n7 2790     1.603700e+02 2.535300e+02\n10 2790     2.138300e+02 2.895400e+02\n13 2790     5.819000e+02 -1.165600e+02\n15 2790     3.286000e+02 3.165600e+02\n0 2791     -2.389400e+02 -4.072400e+02\n1 2791     -1.692600e+02 -2.890200e+02\n6 2791     -2.054500e+02 -5.901801e+02\n7 2791     -2.654600e+02 -3.511200e+02\n15 2791     -2.983700e+02 -4.463500e+02\n0 2792     -1.491000e+02 8.257999e+01\n1 2792     6.597998e+01 1.458600e+02\n6 2792     -3.267700e+02 2.659003e+01\n7 2792     -2.708200e+02 1.563100e+02\n10 2792     -2.759000e+02 2.226800e+02\n12 2792     -2.744500e+02 8.257001e+01\n15 2792     -2.422300e+02 2.284800e+02\n0 2793     -1.333600e+02 2.611400e+02\n1 2793     1.743400e+02 3.063800e+02\n2 2793     -3.696100e+02 -4.539978e+00\n7 2793     -3.214200e+02 3.109300e+02\n11 2793     2.816998e+01 -4.821400e+02\n15 2793     -2.349200e+02 4.749300e+02\n0 2794     2.300000e+01 -1.183400e+02\n1 2794     1.465300e+02 -9.275000e+01\n6 2794     3.665002e+01 -1.072100e+02\n7 2794     -4.042999e+01 -4.799805e-01\n10 2794     -5.459998e+01 6.590027e+00\n15 2794     1.220001e+01 -2.031000e+01\n0 2795     2.836801e+02 4.490997e+01\n1 2795     4.612400e+02 -1.216998e+01\n7 2795     1.816801e+02 2.002900e+02\n10 2795     2.307300e+02 2.222600e+02\n13 2795     6.027100e+02 -1.629600e+02\n15 2795     3.483199e+02 2.374100e+02\n0 2796     2.017500e+02 -2.729980e+00\n1 2796     3.573400e+02 -3.346997e+01\n10 2796     1.403900e+02 1.585800e+02\n15 2796     2.387300e+02 1.604900e+02\n0 2797     1.862100e+02 -3.429993e+00\n1 2797     3.409399e+02 -2.966998e+01\n15 2797     2.179900e+02 1.578400e+02\n0 2798     2.643101e+02 4.903003e+01\n1 2798     4.415500e+02 -2.049988e+00\n10 2798     2.081100e+02 2.250900e+02\n15 2798     3.207400e+02 2.406600e+02\n0 2799     1.407700e+02 -2.080800e+02\n1 2799     2.310000e+02 -2.168800e+02\n15 2799     1.829200e+02 -1.262000e+02\n0 2800     3.909100e+02 -2.004000e+02\n1 2800     5.074200e+02 -2.976700e+02\n10 2800     3.782700e+02 -4.882001e+01\n15 2800     5.309900e+02 -8.415997e+01\n0 2801     4.069600e+02 -4.923999e+01\n1 2801     5.710400e+02 -1.493400e+02\n6 2801     3.596600e+02 6.557001e+01\n15 2801     5.341600e+02 1.249500e+02\n0 2802     3.269100e+02 -1.510999e+01\n1 2802     4.903700e+02 -8.723999e+01\n10 2802     2.863900e+02 1.574800e+02\n15 2802     4.162700e+02 1.606600e+02\n0 2803     -4.474400e+02 4.096997e+01\n1 2803     -1.982000e+02 1.817200e+02\n10 2803     -6.251000e+02 1.427400e+02\n15 2803     -6.373800e+02 1.299500e+02\n0 2804     8.940002e+00 -1.093900e+02\n1 2804     1.365000e+02 -8.015002e+01\n6 2804     1.588000e+01 -1.030600e+02\n10 2804     -7.153998e+01 1.484998e+01\n12 2804     2.295001e+01 -5.185999e+01\n15 2804     -7.919983e+00 -1.014001e+01\n0 2805     4.030800e+02 -4.167999e+01\n1 2805     5.701000e+02 -1.407700e+02\n6 2805     3.509200e+02 7.184998e+01\n7 2805     2.995699e+02 1.268600e+02\n15 2805     5.278900e+02 1.343000e+02\n0 2806     1.531700e+02 -2.212300e+02\n1 2806     2.378300e+02 -2.332600e+02\n7 2806     1.084700e+02 -7.729999e+01\n10 2806     1.070600e+02 -9.829999e+01\n15 2806     2.015300e+02 -1.421000e+02\n0 2807     3.512200e+02 -1.375400e+02\n1 2807     4.742400e+02 -2.180000e+02\n2 2807     5.107200e+02 -6.154999e+01\n7 2807     2.755500e+02 3.246997e+01\n12 2807     4.001700e+02 1.150024e+00\n13 2807     6.861899e+02 -3.174600e+02\n15 2807     4.648000e+02 -3.059998e+00\n0 2808     2.452700e+02 -2.690002e+00\n1 2808     4.029800e+02 -4.733002e+01\n7 2808     1.558600e+02 1.502300e+02\n10 2808     1.905400e+02 1.633200e+02\n15 2808     3.001400e+02 1.671000e+02\n0 2809     2.399900e+02 -4.241998e+01\n1 2809     3.846100e+02 -8.534003e+01\n6 2809     2.342700e+02 4.585999e+01\n7 2809     1.578700e+02 1.103800e+02\n10 2809     1.891000e+02 1.168800e+02\n15 2809     2.976400e+02 1.119600e+02\n0 2810     4.297200e+02 -1.937000e+01\n1 2810     6.089000e+02 -1.271800e+02\n10 2810     4.057900e+02 1.635200e+02\n15 2810     5.629200e+02 1.690500e+02\n0 2811     3.295100e+02 -2.144000e+01\n1 2811     4.911801e+02 -9.439001e+01\n10 2811     2.902100e+02 1.509700e+02\n15 2811     4.207700e+02 1.527500e+02\n0 2812     4.149500e+02 -1.103800e+02\n1 2812     5.534200e+02 -2.127700e+02\n6 2812     4.048900e+02 1.113000e+01\n12 2812     4.507000e+02 4.151001e+01\n15 2812     5.510500e+02 4.233002e+01\n0 2813     9.415997e+01 7.465002e+01\n1 2813     2.745400e+02 7.496002e+01\n7 2813     -3.820007e+00 2.030600e+02\n10 2813     8.090027e+00 2.374000e+02\n13 2813     4.458800e+02 -1.504200e+02\n15 2813     8.301001e+01 2.520500e+02\n0 2814     2.424399e+02 -1.267700e+02\n1 2814     3.616801e+02 -1.704000e+02\n15 2814     3.121700e+02 -2.619995e+00\n0 2815     2.247600e+02 -3.867300e+02\n1 2815     2.680000e+02 -4.219200e+02\n6 2815     3.249100e+02 -3.530699e+02\n15 2815     3.238900e+02 -3.578800e+02\n0 2816     7.779999e+01 -1.347900e+02\n1 2816     1.932000e+02 -1.254300e+02\n10 2816     1.084003e+01 -6.950012e+00\n15 2816     8.794000e+01 -3.539001e+01\n0 2817     3.664001e+01 -2.053800e+02\n1 2817     1.303000e+02 -1.808200e+02\n7 2817     -9.030029e+00 -8.309998e+01\n15 2817     4.119000e+01 -1.360100e+02\n0 2818     1.095000e+02 5.719971e+00\n1 2818     2.666100e+02 2.890015e+00\n6 2818     9.056000e+01 6.209998e+01\n10 2818     3.306000e+01 1.589300e+02\n12 2818     1.079300e+02 1.135600e+02\n13 2818     4.715500e+02 -2.066600e+02\n15 2818     1.124300e+02 1.599600e+02\n0 2819     3.108600e+02 -2.003998e+01\n1 2819     4.700400e+02 -8.678003e+01\n6 2819     2.812200e+02 8.391998e+01\n7 2819     2.175300e+02 1.405500e+02\n10 2819     2.683800e+02 1.501400e+02\n15 2819     3.942000e+02 1.521900e+02\n0 2820     2.323000e+02 -1.290900e+02\n1 2820     3.501300e+02 -1.691700e+02\n7 2820     1.654200e+02 2.434003e+01\n10 2820     1.883600e+02 1.621997e+01\n15 2820     2.982800e+02 -6.770020e+00\n0 2821     1.756000e+01 -1.638700e+02\n1 2821     1.279200e+02 -1.354800e+02\n2 2821     2.303800e+02 -1.436900e+02\n6 2821     4.696002e+01 -1.617300e+02\n7 2821     -3.790002e+01 -4.725000e+01\n10 2821     -5.544000e+01 -4.696002e+01\n15 2821     1.121002e+01 -8.259003e+01\n0 2822     2.763101e+02 6.141998e+01\n1 2822     4.592600e+02 6.460022e+00\n10 2822     2.207300e+02 2.409500e+02\n15 2822     3.361700e+02 2.591700e+02\n0 2823     -1.170600e+02 7.690002e+01\n1 2823     8.976001e+01 1.326500e+02\n15 2823     -1.992900e+02 2.254100e+02\n0 2824     2.300000e+02 -1.312700e+02\n1 2824     3.464900e+02 -1.703000e+02\n7 2824     1.637700e+02 2.187000e+01\n12 2824     2.809600e+02 -1.451001e+01\n0 2825     2.427600e+02 2.486900e+02\n1 2825     5.484000e+02 1.913900e+02\n15 2825     2.833000e+02 5.112300e+02\n0 2826     5.758199e+02 1.525200e+02\n1 2826     8.518900e+02 -1.760010e+00\n10 2826     5.624100e+02 3.804400e+02\n13 2826     7.789399e+02 -6.669000e+01\n15 2826     7.554399e+02 4.281500e+02\n0 2827     5.758199e+02 1.525200e+02\n1 2827     8.518900e+02 -1.760010e+00\n2 2827     4.733700e+02 1.209600e+02\n3 2827     3.367800e+02 -1.935100e+02\n6 2827     3.851300e+02 2.970500e+02\n10 2827     5.624100e+02 3.804400e+02\n13 2827     7.789399e+02 -6.669000e+01\n15 2827     7.554399e+02 4.281500e+02\n0 2828     1.810300e+02 1.904200e+02\n1 2828     4.116500e+02 1.622200e+02\n15 2828     1.916200e+02 4.235300e+02\n0 2829     1.737900e+02 1.883000e+02\n1 2829     4.039399e+02 1.621700e+02\n10 2829     8.939001e+01 3.790200e+02\n13 2829     4.736300e+02 -5.632001e+01\n14 2829     6.740900e+02 -5.364800e+02\n15 2829     1.816000e+02 4.194500e+02\n0 2830     1.343300e+02 1.878700e+02\n1 2830     3.643700e+02 1.723700e+02\n15 2830     1.272800e+02 4.133300e+02\n0 2831     1.335800e+02 1.821900e+02\n1 2831     3.634399e+02 1.661000e+02\n7 2831     3.140015e+00 3.057400e+02\n10 2831     4.308002e+01 3.677000e+02\n0 2832     5.508500e+02 1.350900e+02\n1 2832     8.203500e+02 -1.273999e+01\n10 2832     5.343600e+02 3.567800e+02\n13 2832     7.549200e+02 -8.590997e+01\n15 2832     7.226400e+02 3.999700e+02\n0 2833     1.369700e+02 6.370001e+01\n1 2833     3.127000e+02 5.184003e+01\n2 2833     2.637200e+02 1.185300e+02\n5 2833     7.960800e+02 -5.954600e+02\n6 2833     9.409998e+01 1.327000e+02\n8 2833     2.496600e+02 5.038000e+01\n10 2833     5.873999e+01 2.289900e+02\n12 2833     1.175900e+02 1.837800e+02\n15 2833     1.425601e+02 2.429600e+02\n0 2834     6.019600e+02 -3.347998e+01\n1 2834     8.207700e+02 -2.061200e+02\n13 2834     8.281300e+02 -2.299300e+02\n15 2834     8.141000e+02 1.726600e+02\n0 2835     2.326600e+02 1.919983e+00\n1 2835     3.910000e+02 -3.889001e+01\n7 2835     1.437800e+02 1.530400e+02\n10 2835     1.759000e+02 1.675500e+02\n12 2835     2.405400e+02 1.372800e+02\n15 2835     2.820601e+02 1.717300e+02\n0 2836     1.842500e+02 -1.140002e+01\n1 2836     3.360400e+02 -3.702002e+01\n7 2836     1.008100e+02 1.335600e+02\n10 2836     1.209200e+02 1.467700e+02\n15 2836     2.166200e+02 1.469300e+02\n0 2837     -4.564600e+02 3.810999e+01\n1 2837     -2.078000e+02 1.815100e+02\n10 2837     -6.355600e+02 1.383700e+02\n15 2837     -6.495400e+02 1.247700e+02\n0 2838     2.028900e+02 -1.724600e+02\n1 2838     3.053700e+02 -2.018200e+02\n2 2838     4.176000e+02 -1.014300e+02\n3 2838     3.209000e+02 -3.995699e+02\n4 2838     -4.352700e+02 -5.788800e+02\n6 2838     2.469700e+02 -1.054200e+02\n13 2838     5.739100e+02 -3.552900e+02\n15 2838     2.633500e+02 -6.958002e+01\n0 2839     -6.966998e+01 -1.508100e+02\n1 2839     5.004999e+01 -9.633002e+01\n7 2839     -1.291900e+02 -5.046997e+01\n12 2839     -5.859998e+01 -1.264000e+02\n15 2839     -1.084100e+02 -7.663000e+01\n0 2840     5.763000e+02 -3.193500e+02\n1 2840     6.732500e+02 -4.870601e+02\n7 2840     4.978300e+02 -1.162300e+02\n12 2840     6.544500e+02 -1.740900e+02\n15 2840     8.078000e+02 -2.239900e+02\n0 2841     6.064500e+02 -3.915200e+02\n1 2841     6.761100e+02 -5.718400e+02\n10 2841     6.454399e+02 -2.458100e+02\n15 2841     8.576600e+02 -3.192500e+02\n0 2842     1.656801e+02 1.903400e+02\n1 2842     3.967200e+02 1.660800e+02\n10 2842     7.956000e+01 3.805100e+02\n14 2842     6.646700e+02 -5.348900e+02\n15 2842     1.700900e+02 4.211000e+02\n0 2843     1.985699e+02 1.781900e+02\n1 2843     4.249800e+02 1.450600e+02\n10 2843     1.189600e+02 3.698000e+02\n15 2843     2.165601e+02 4.089500e+02\n0 2844     1.029900e+02 1.754600e+02\n1 2844     3.260500e+02 1.685600e+02\n15 2844     8.571002e+01 3.921500e+02\n0 2845     7.731000e+01 1.769300e+02\n1 2845     3.018600e+02 1.782500e+02\n10 2845     -2.164001e+01 3.562200e+02\n15 2845     5.001001e+01 3.899900e+02\n0 2846     3.373500e+02 1.127800e+02\n1 2846     5.672600e+02 3.370001e+01\n7 2846     1.982200e+02 2.564300e+02\n10 2846     2.867100e+02 3.077200e+02\n15 2846     4.217000e+02 3.376600e+02\n0 2847     3.900900e+02 5.471997e+01\n1 2847     5.988900e+02 -4.060999e+01\n7 2847     2.630100e+02 2.117700e+02\n10 2847     3.536500e+02 2.458000e+02\n15 2847     5.008000e+02 2.653900e+02\n0 2848     2.176300e+02 6.246997e+01\n1 2848     3.958900e+02 2.590997e+01\n6 2848     1.716400e+02 1.520300e+02\n7 2848     1.178400e+02 2.095500e+02\n10 2848     1.522400e+02 2.363900e+02\n12 2848     2.026600e+02 1.989500e+02\n15 2848     2.539301e+02 2.526400e+02\n0 2849     6.187000e+02 1.388000e+01\n1 2849     8.530500e+02 -1.619100e+02\n2 2849     5.583101e+02 -1.099854e-01\n6 2849     4.747300e+02 1.590700e+02\n7 2849     4.677600e+02 1.962900e+02\n13 2849     8.397100e+02 -1.839400e+02\n15 2849     8.317800e+02 2.407100e+02\n0 2850     5.246300e+02 2.297998e+01\n1 2850     7.589700e+02 -1.222900e+02\n7 2850     3.727100e+02 1.860700e+02\n10 2850     5.130200e+02 2.236200e+02\n13 2850     7.404000e+02 -1.896700e+02\n15 2850     6.992900e+02 2.396100e+02\n0 2851     -2.608700e+02 5.846997e+01\n1 2851     -2.082001e+01 1.482600e+02\n2 2851     -3.879400e+02 -1.891100e+02\n7 2851     -4.027300e+02 9.620999e+01\n15 2851     -3.835200e+02 1.795000e+02\n0 2852     6.055900e+02 -4.496002e+01\n1 2852     8.214399e+02 -2.193300e+02\n7 2852     4.624399e+02 1.367300e+02\n10 2852     6.133400e+02 1.531600e+02\n12 2852     5.558600e+02 9.679999e+01\n15 2852     8.207200e+02 1.573600e+02\n0 2853     2.531500e+02 -1.329100e+02\n1 2853     3.700500e+02 -1.796400e+02\n7 2853     1.863000e+02 2.423999e+01\n10 2853     2.125699e+02 1.377002e+01\n15 2853     3.275800e+02 -9.369995e+00\n0 2854     -1.095001e+01 -1.688600e+02\n1 2854     9.877002e+01 -1.316500e+02\n7 2854     -6.571002e+01 -5.722998e+01\n10 2854     -8.809998e+01 -5.565997e+01\n15 2854     -2.701001e+01 -9.317999e+01\n0 2855     6.162000e+02 -2.603200e+02\n1 2855     7.431200e+02 -4.428600e+02\n12 2855     6.641000e+02 -1.060900e+02\n15 2855     8.571200e+02 -1.379300e+02\n0 2856     5.473600e+02 -4.178100e+02\n1 2856     5.999800e+02 -5.744399e+02\n15 2856     7.763400e+02 -3.619500e+02\n0 2857     -2.508100e+02 -4.110100e+02\n1 2857     -1.816700e+02 -2.889500e+02\n6 2857     -2.170800e+02 -5.999600e+02\n7 2857     -2.768900e+02 -3.575300e+02\n15 2857     -3.144300e+02 -4.536100e+02\n0 2858     3.946002e+01 1.352200e+02\n1 2858     2.447200e+02 1.487100e+02\n15 2858     2.080017e+00 3.273400e+02\n0 2859     6.135000e+02 -3.504999e+01\n1 2859     8.324200e+02 -2.119500e+02\n7 2859     4.693101e+02 1.479000e+02\n12 2859     5.622900e+02 1.112700e+02\n15 2859     8.306600e+02 1.716900e+02\n0 2860     -2.628900e+02 -4.097800e+02\n1 2860     -1.918600e+02 -2.840300e+02\n15 2860     -3.302100e+02 -4.537100e+02\n0 2861     -1.534900e+02 1.997300e+02\n1 2861     1.329200e+02 2.526900e+02\n15 2861     -2.547500e+02 3.872000e+02\n0 2862     6.373600e+02 -1.287300e+02\n1 2862     8.233700e+02 -3.170300e+02\n7 2862     5.082500e+02 6.483002e+01\n10 2862     6.570000e+02 5.962000e+01\n15 2862     8.744000e+02 4.553003e+01\n0 2863     5.944100e+02 -2.658500e+02\n1 2863     7.159000e+02 -4.402500e+02\n7 2863     5.015300e+02 -6.519000e+01\n12 2863     6.462700e+02 -1.177000e+02\n15 2863     8.271200e+02 -1.483300e+02\n0 2864     5.715100e+02 3.802002e+01\n1 2864     8.114600e+02 -1.211100e+02\n7 2864     4.175500e+02 2.106000e+02\n10 2864     5.654000e+02 2.458400e+02\n13 2864     7.877500e+02 -1.692700e+02\n15 2864     7.627000e+02 2.674100e+02\n0 2865     -4.792999e+01 6.363000e+01\n1 2865     1.404500e+02 1.022600e+02\n3 2865     -3.948999e+01 -2.627000e+02\n5 2865     5.609500e+02 -6.016400e+02\n7 2865     -1.496200e+02 1.645100e+02\n10 2865     -1.560700e+02 2.102700e+02\n15 2865     -1.069700e+02 2.171200e+02\n0 2866     1.300000e+01 3.478003e+01\n1 2866     1.845500e+02 5.928003e+01\n2 2866     1.439600e+02 5.769000e+01\n7 2866     -7.871002e+01 1.499500e+02\n10 2866     -8.209998e+01 1.832200e+02\n15 2866     -2.184003e+01 1.865700e+02\n0 2867     1.836700e+02 -3.548999e+01\n1 2867     3.284500e+02 -6.073999e+01\n2 2867     3.482600e+02 3.726001e+01\n3 2867     2.466100e+02 -2.688600e+02\n4 2867     -3.240800e+02 -5.615400e+02\n10 2867     1.229800e+02 1.190400e+02\n13 2867     5.403800e+02 -2.346900e+02\n0 2868     8.409998e+01 1.745800e+02\n1 2868     3.073900e+02 1.738100e+02\n10 2868     -1.363000e+01 3.536900e+02\n14 2868     5.822100e+02 -5.562500e+02\n15 2868     5.882001e+01 3.876300e+02\n0 2869     2.009900e+02 -9.335999e+01\n1 2869     3.293000e+02 -1.242100e+02\n3 2869     2.796200e+02 -3.293000e+02\n7 2869     1.294700e+02 5.453998e+01\n10 2869     1.484000e+02 5.383002e+01\n13 2869     5.592500e+02 -2.866600e+02\n15 2869     2.503400e+02 3.747998e+01\n0 2870     3.081000e+02 -1.240100e+02\n1 2870     4.314100e+02 -1.888200e+02\n7 2870     2.349000e+02 4.037000e+01\n10 2870     2.751700e+02 3.079999e+01\n15 2870     4.027800e+02 9.320007e+00\n0 2871     -2.086300e+02 -4.358500e+02\n1 2871     -1.524900e+02 -3.247500e+02\n7 2871     -2.269400e+02 -3.725800e+02\n10 2871     -2.866300e+02 -3.846500e+02\n15 2871     -2.542400e+02 -4.810000e+02\n0 2872     -3.798999e+01 -2.210022e+00\n1 2872     1.266600e+02 3.728998e+01\n3 2872     6.440002e+00 -3.142900e+02\n7 2872     -1.260900e+02 1.020300e+02\n13 2872     3.333300e+02 -2.283800e+02\n15 2872     -8.495001e+01 1.288200e+02\n0 2873     2.596400e+02 -2.616998e+01\n1 2873     4.130699e+02 -8.042999e+01\n7 2873     1.750800e+02 1.287600e+02\n10 2873     2.098400e+02 1.384100e+02\n13 2873     5.979200e+02 -2.227200e+02\n15 2873     3.238199e+02 1.361700e+02\n0 2874     -4.356100e+02 1.697998e+01\n1 2874     -1.963300e+02 1.567000e+02\n10 2874     -6.077000e+02 1.160600e+02\n15 2874     -6.180400e+02 9.914999e+01\n0 2875     -5.258800e+02 3.457000e+02\n1 2875     -1.810700e+02 4.859100e+02\n8 2875     -5.931200e+02 3.528000e+01\n15 2875     -7.961700e+02 5.416100e+02\n0 2876     -4.600400e+02 3.536600e+02\n1 2876     -1.169000e+02 4.773500e+02\n10 2876     -6.862300e+02 5.192000e+02\n11 2876     -2.629700e+02 -3.936100e+02\n15 2876     -7.051400e+02 5.614600e+02\n0 2877     -3.999800e+02 -8.962000e+01\n1 2877     -2.014600e+02 4.912000e+01\n7 2877     -5.124300e+02 -7.262000e+01\n10 2877     -5.513400e+02 -5.229980e+00\n12 2877     -5.668400e+02 -2.272900e+02\n13 2877     -5.263000e+01 -3.556400e+02\n15 2877     -5.551900e+02 -4.020001e+01\n0 2878     -2.477200e+02 7.371997e+01\n1 2878     -2.859985e+00 1.588000e+02\n7 2878     -3.934100e+02 1.133300e+02\n10 2878     -3.904900e+02 2.025000e+02\n15 2878     -3.673700e+02 2.019100e+02\n0 2879     6.159003e+01 -1.530000e+02\n1 2879     1.717100e+02 -1.377500e+02\n2 2879     2.784000e+02 -1.108400e+02\n7 2879     5.210022e+00 -2.695001e+01\n15 2879     6.832001e+01 -6.196002e+01\n0 2880     6.378700e+02 -8.973999e+01\n1 2880     8.408000e+02 -2.775400e+02\n3 2880     4.830699e+02 -4.026700e+02\n7 2880     5.007500e+02 1.002800e+02\n8 2880     5.579301e+02 -1.117100e+02\n10 2880     6.545200e+02 1.049100e+02\n13 2880     8.741200e+02 -2.766900e+02\n15 2880     8.713101e+02 9.964001e+01\n0 2881     1.128998e+01 -7.966998e+01\n1 2881     1.487200e+02 -5.217999e+01\n7 2881     -6.046997e+01 3.509003e+01\n10 2881     -7.229999e+01 4.982001e+01\n13 2881     3.911000e+02 -2.906300e+02\n15 2881     -7.909973e+00 3.028003e+01\n0 2882     7.919000e+01 -6.959998e+01\n1 2882     2.146300e+02 -6.209003e+01\n10 2882     6.349976e+00 6.839001e+01\n15 2882     8.159003e+01 5.357001e+01\n0 2883     5.857000e+02 1.492500e+02\n1 2883     8.611700e+02 -8.090027e+00\n15 2883     7.699800e+02 4.250200e+02\n0 2884     4.470001e+01 -9.640002e+01\n1 2884     1.745500e+02 -7.834998e+01\n2 2884     2.307700e+02 -6.654999e+01\n7 2884     -2.335999e+01 2.456000e+01\n15 2884     3.876001e+01 1.234003e+01\n0 2885     3.676001e+01 -2.410999e+01\n1 2885     1.878800e+02 -4.960022e+00\n2 2885     1.981500e+02 1.109003e+01\n10 2885     -4.821002e+01 1.167800e+02\n15 2885     1.779999e+01 1.091700e+02\n0 2886     1.300049e-01 -8.644000e+01\n1 2886     1.366600e+02 -5.557001e+01\n2 2886     1.730600e+02 -7.401001e+01\n3 2886     8.716998e+01 -3.803700e+02\n7 2886     -7.139001e+01 2.559003e+01\n10 2886     -8.417999e+01 4.110999e+01\n13 2886     3.801300e+02 -2.981000e+02\n15 2886     -2.252002e+01 1.984998e+01\n0 2887     5.955300e+02 3.727002e+01\n1 2887     8.362100e+02 -1.295400e+02\n15 2887     7.963800e+02 2.699400e+02\n0 2888     5.596600e+02 2.517700e+02\n1 2888     8.669500e+02 1.084500e+02\n7 2888     3.776700e+02 4.159600e+02\n10 2888     5.359900e+02 4.961200e+02\n15 2888     7.221500e+02 5.658800e+02\n0 2889     5.076899e+02 2.710700e+02\n1 2889     8.320699e+02 1.403800e+02\n10 2889     4.733800e+02 5.140900e+02\n15 2889     6.499100e+02 5.837900e+02\n0 2890     5.935100e+02 1.529999e+01\n1 2890     8.272300e+02 -1.521300e+02\n6 2890     4.429000e+02 1.492300e+02\n7 2890     4.426600e+02 1.927300e+02\n8 2890     4.927500e+02 -3.831000e+01\n10 2890     5.941500e+02 2.214800e+02\n13 2890     8.133800e+02 -1.865600e+02\n15 2890     7.966100e+02 2.389200e+02\n0 2891     6.931000e+01 2.942999e+01\n1 2891     2.355000e+02 3.771002e+01\n15 2891     5.482001e+01 1.867700e+02\n0 2892     6.100601e+02 1.171997e+01\n1 2892     8.436801e+02 -1.617300e+02\n7 2892     4.596300e+02 1.924000e+02\n13 2892     8.312300e+02 -1.876400e+02\n15 2892     8.201801e+02 2.363300e+02\n0 2893     -2.954999e+01 4.789900e+02\n1 2893     3.409100e+02 4.952500e+02\n2 2893     -3.176800e+02 2.355100e+02\n6 2893     -5.087600e+02 4.878500e+02\n7 2893     -2.532600e+02 5.430800e+02\n8 2893     -1.818700e+02 1.783600e+02\n12 2893     -3.331100e+02 4.795300e+02\n14 2893     2.845500e+02 -2.585800e+02\n0 2894     2.272998e+01 2.928300e+02\n1 2894     3.400000e+02 2.955400e+02\n4 2894     -1.085000e+02 -3.650700e+02\n5 2894     4.433199e+02 -3.730800e+02\n7 2894     -1.710200e+02 3.633800e+02\n8 2894     -1.020700e+02 2.717001e+01\n10 2894     -9.756000e+01 4.893800e+02\n11 2894     1.735600e+02 -4.506000e+02\n15 2894     -2.428003e+01 5.407800e+02\n0 2895     -6.353003e+01 1.815900e+02\n1 2895     2.130300e+02 2.113200e+02\n5 2895     3.809200e+02 -4.956200e+02\n6 2895     -4.062200e+02 1.158100e+02\n7 2895     -2.314000e+02 2.454900e+02\n10 2895     -1.866900e+02 3.488200e+02\n13 2895     1.807100e+02 -1.030000e+02\n14 2895     2.979600e+02 -5.813300e+02\n0 2896     -1.655400e+02 1.848900e+02\n1 2896     1.154100e+02 2.418700e+02\n0 2897     -1.609900e+02 1.763100e+02\n1 2897     1.165900e+02 2.326300e+02\n7 2897     -3.270800e+02 2.262800e+02\n0 2898     1.026900e+02 7.578003e+01\n1 2898     2.832300e+02 7.342999e+01\n0 2899     -1.049200e+02 4.899500e+02\n1 2899     2.661000e+02 5.254400e+02\n0 2900     2.862100e+02 5.111500e+02\n1 2900     6.900100e+02 4.487100e+02\n3 2900     -1.814900e+02 -5.740002e+01\n9 2900     -1.847300e+02 3.128000e+02\n11 2900     4.054100e+02 -2.416100e+02\n0 2901     1.609000e+02 7.003003e+01\n1 2901     3.394200e+02 5.126001e+01\n4 2901     -2.438400e+02 -5.399100e+02\n13 2901     5.033800e+02 -1.487700e+02\n15 2901     1.749500e+02 2.555900e+02\n0 2902     -6.516998e+01 1.918100e+02\n1 2902     2.153000e+02 2.215200e+02\n0 2903     -1.983000e+02 3.662200e+02\n1 2903     1.416000e+02 4.253700e+02\n2 2903     -4.743900e+02 9.682001e+01\n10 2903     -3.684800e+02 5.572000e+02\n14 2903     1.165600e+02 -3.827200e+02\n0 2904     -2.078800e+02 2.194000e+02\n1 2904     8.740002e+01 2.859600e+02\n7 2904     -3.870700e+02 2.592000e+02\n11 2904     -4.338000e+01 -5.220800e+02\n13 2904     4.371002e+01 -8.142999e+01\n14 2904     1.248500e+02 -5.447000e+02\n0 2905     -5.217999e+01 -2.827002e+01\n1 2905     1.075400e+02 1.565997e+01\n2 2905     8.128998e+01 -3.887000e+01\n4 2905     -2.855300e+02 -3.677200e+02\n7 2905     -1.370300e+02 7.301001e+01\n9 2905     -3.863000e+01 5.560999e+01\n15 2905     -1.005100e+02 9.166000e+01\n0 2906     8.221997e+01 -4.210999e+01\n1 2906     2.254600e+02 -3.600000e+01\n4 2906     -3.130500e+02 -4.779200e+02\n15 2906     8.172998e+01 9.147000e+01\n0 2907     1.695001e+01 3.983400e+02\n1 2907     3.690000e+02 4.020000e+02\n2 2907     -2.667400e+02 1.416700e+02\n6 2907     -4.408800e+02 3.924300e+02\n7 2907     -1.973400e+02 4.656400e+02\n9 2907     -3.728500e+02 1.883700e+02\n10 2907     -1.157500e+02 6.176200e+02\n14 2907     3.300900e+02 -3.426800e+02\n0 2908     1.523101e+02 2.163000e+01\n1 2908     3.140699e+02 5.880005e+00\n7 2908     6.390997e+01 1.613600e+02\n10 2908     8.087000e+01 1.820800e+02\n12 2908     1.504300e+02 1.426100e+02\n15 2908     1.688000e+02 1.876900e+02\n0 2909     1.633002e+01 5.691998e+01\n1 2909     1.949800e+02 7.992999e+01\n4 2909     -2.353700e+02 -4.254600e+02\n5 2909     6.503500e+02 -6.061400e+02\n7 2909     -8.116998e+01 1.731900e+02\n10 2909     -8.047998e+01 2.092400e+02\n12 2909     -2.278998e+01 1.396800e+02\n15 2909     -1.998999e+01 2.168200e+02\n0 2910     -1.471100e+02 1.803800e+02\n1 2910     1.312400e+02 2.327400e+02\n7 2910     -3.151400e+02 2.318600e+02\n0 2911     -3.069000e+01 -4.119000e+01\n1 2911     1.218700e+02 -3.059998e+00\n3 2911     3.285999e+01 -3.483900e+02\n6 2911     -6.452002e+01 -4.437000e+01\n13 2911     3.455100e+02 -2.618400e+02\n15 2911     -7.032001e+01 7.675000e+01\n0 2912     -4.664500e+02 1.884900e+02\n1 2912     -1.647100e+02 3.229500e+02\n7 2912     -6.514500e+02 1.884300e+02\n0 2913     -8.032400e+02 1.245001e+01\n1 2913     -5.157800e+02 2.455800e+02\n0 2914     -8.079200e+02 4.530029e+00\n1 2914     -5.215000e+02 2.391100e+02\n0 2915     -4.471500e+02 1.385800e+02\n1 2915     -1.642000e+02 2.718200e+02\n7 2915     -6.195300e+02 1.425600e+02\n0 2916     1.593300e+02 -8.340027e+00\n1 2916     3.116500e+02 -2.617999e+01\n2 2916     3.169399e+02 5.853998e+01\n7 2916     7.637000e+01 1.328900e+02\n15 2916     1.821400e+02 1.475900e+02\n0 2917     2.995001e+01 1.396000e+02\n1 2917     2.379200e+02 1.558000e+02\n15 2917     -1.146997e+01 3.315600e+02\n0 2918     -4.387000e+01 2.582600e+02\n1 2918     2.602900e+02 2.797000e+02\n7 2918     -2.294900e+02 3.212200e+02\n8 2918     -1.458800e+02 -3.630005e+00\n9 2918     -3.614700e+02 7.453003e+01\n10 2918     -1.716600e+02 4.425500e+02\n12 2918     -2.871800e+02 2.305700e+02\n13 2918     1.781400e+02 -3.782001e+01\n14 2918     2.956000e+02 -4.960601e+02\n15 2918     -1.111300e+02 4.834400e+02\n0 2919     -1.066000e+02 1.254600e+02\n1 2919     1.235300e+02 1.748500e+02\n5 2919     4.267400e+02 -5.445100e+02\n6 2919     -3.101100e+02 8.426001e+01\n7 2919     -2.394200e+02 2.031400e+02\n10 2919     -2.316700e+02 2.768600e+02\n15 2919     -1.894400e+02 2.927800e+02\n0 2920     8.547998e+01 -1.307001e+01\n1 2920     2.372200e+02 -8.700012e+00\n2 2920     2.477400e+02 3.826001e+01\n7 2920     4.530029e+00 1.160500e+02\n15 2920     8.251001e+01 1.311700e+02\n0 2921     7.159003e+01 1.109985e+00\n1 2921     2.286000e+02 9.549988e+00\n6 2921     4.983002e+01 4.431000e+01\n7 2921     -1.210999e+01 1.276100e+02\n12 2921     6.487000e+01 9.695001e+01\n15 2921     6.162000e+01 1.486400e+02\n0 2922     5.521997e+01 -6.075000e+01\n1 2922     1.944600e+02 -4.637000e+01\n3 2922     1.412200e+02 -3.268900e+02\n7 2922     -1.815002e+01 6.284003e+01\n9 2922     8.679999e+01 7.681000e+01\n10 2922     -2.325000e+01 7.698999e+01\n13 2922     4.308400e+02 -2.690100e+02\n15 2922     4.766998e+01 6.217999e+01\n0 2923     8.221997e+01 -4.210999e+01\n1 2923     2.254600e+02 -3.600000e+01\n15 2923     8.172998e+01 9.147000e+01\n0 2924     -2.407000e+02 3.948300e+02\n1 2924     1.062100e+02 4.643200e+02\n2 2924     -5.181000e+02 1.322300e+02\n7 2924     -4.517200e+02 4.323900e+02\n13 2924     -4.600220e-01 6.791998e+01\n14 2924     7.665997e+01 -3.519400e+02\n0 2925     2.229999e+01 -4.344000e+01\n1 2925     1.692300e+02 -1.983002e+01\n7 2925     -5.464001e+01 7.407001e+01\n15 2925     1.049988e+00 8.110999e+01\n0 2926     -1.896300e+02 2.109600e+02\n1 2926     1.015600e+02 2.732800e+02\n7 2926     -3.672200e+02 2.542600e+02\n10 2926     -3.391500e+02 3.716000e+02\n15 2926     -3.057500e+02 3.978600e+02\n0 2927     -1.896300e+02 2.109600e+02\n1 2927     1.015600e+02 2.732800e+02\n7 2927     -3.672200e+02 2.542600e+02\n0 2928     1.925300e+02 -1.703998e+01\n1 2928     3.427500e+02 -4.501001e+01\n2 2928     3.491500e+02 5.432001e+01\n7 2928     1.097900e+02 1.293400e+02\n10 2928     1.313400e+02 1.412900e+02\n15 2928     2.290601e+02 1.403100e+02\n0 2929     2.125400e+02 -3.581000e+01\n1 2929     3.577000e+02 -6.989001e+01\n2 2929     3.723900e+02 3.646997e+01\n3 2929     2.686100e+02 -2.694600e+02\n6 2929     2.079200e+02 4.652002e+01\n7 2929     1.318800e+02 1.134600e+02\n15 2929     2.590400e+02 1.174900e+02\n0 2930     1.180300e+02 -8.592999e+01\n1 2930     2.475000e+02 -8.985999e+01\n6 2930     1.306300e+02 -3.733002e+01\n7 2930     4.882001e+01 4.900000e+01\n8 2930     2.793900e+02 -7.479999e+01\n15 2930     1.363200e+02 3.612000e+01\n0 2931     2.404600e+02 4.520300e+02\n1 2931     6.225100e+02 3.979800e+02\n2 2931     -7.059998e+01 2.093000e+02\n5 2931     6.436400e+02 -1.954900e+02\n6 2931     -2.084400e+02 5.098100e+02\n7 2931     9.799988e+00 5.439500e+02\n12 2931     -4.254999e+01 4.864900e+02\n0 2932     -1.816800e+02 4.013000e+01\n1 2932     1.884998e+01 1.150300e+02\n6 2932     -3.333000e+02 -2.778003e+01\n7 2932     -2.936300e+02 1.103100e+02\n10 2932     -3.096000e+02 1.692100e+02\n12 2932     -2.919900e+02 3.219000e+01\n15 2932     -2.817700e+02 1.663400e+02\n0 2933     -2.109003e+01 5.270001e+01\n1 2933     1.595000e+02 8.550000e+01\n3 2933     1.820007e+00 -2.554900e+02\n4 2933     -2.346700e+02 -3.947300e+02\n5 2933     6.011899e+02 -6.124500e+02\n8 2933     1.069000e+02 3.079987e+00\n15 2933     -6.982001e+01 2.059300e+02\n0 2934     1.975800e+02 -1.119100e+02\n1 2934     3.206200e+02 -1.411300e+02\n2 2934     3.826300e+02 -4.802002e+01\n7 2934     1.286600e+02 3.539001e+01\n12 2934     2.372200e+02 -1.630005e+00\n13 2934     5.578101e+02 -3.035800e+02\n15 2934     2.485100e+02 1.172998e+01\n0 2935     3.734600e+02 4.770900e+02\n1 2935     7.795500e+02 3.896100e+02\n3 2935     -1.070400e+02 -9.110999e+01\n8 2935     1.135200e+02 1.878600e+02\n14 2935     6.802800e+02 -2.415200e+02\n0 2936     4.076001e+01 -1.056900e+02\n1 2936     1.685699e+02 -8.621002e+01\n2 2936     2.276300e+02 -7.870001e+01\n3 2936     1.397100e+02 -3.831400e+02\n7 2936     -2.617999e+01 1.451001e+01\n9 2936     8.512000e+01 2.872998e+01\n10 2936     -3.459998e+01 2.281000e+01\n13 2936     4.208000e+02 -3.108500e+02\n15 2936     3.470001e+01 -7.100220e-01\n0 2937     -3.052002e+01 7.652002e+01\n1 2937     1.595500e+02 1.112600e+02\n3 2937     -2.495001e+01 -2.421200e+02\n5 2937     5.829301e+02 -5.867600e+02\n6 2937     -1.215100e+02 8.925000e+01\n7 2937     -1.344900e+02 1.817700e+02\n8 2937     8.315997e+01 1.725000e+01\n10 2937     -1.375100e+02 2.277000e+02\n13 2937     3.270800e+02 -1.609600e+02\n15 2937     -8.589001e+01 2.379700e+02\n0 2938     1.881200e+02 -4.754999e+01\n1 2938     3.286000e+02 -7.384998e+01\n2 2938     3.595699e+02 2.378998e+01\n3 2938     2.597800e+02 -2.808200e+02\n6 2938     1.908200e+02 2.821997e+01\n8 2938     3.258300e+02 -2.923999e+01\n10 2938     1.299000e+02 1.057100e+02\n15 2938     2.265900e+02 9.809000e+01\n0 2939     2.043700e+02 -7.975000e+01\n1 2939     3.364600e+02 -1.112600e+02\n3 2939     2.771000e+02 -3.143100e+02\n7 2939     1.308100e+02 6.856000e+01\n13 2939     5.611300e+02 -2.744200e+02\n15 2939     2.537800e+02 5.656000e+01\n0 2940     -1.888000e+01 -7.396002e+01\n1 2940     1.232200e+02 -3.826001e+01\n3 2940     5.938000e+01 -3.761400e+02\n7 2940     -9.321002e+01 3.441998e+01\n10 2940     -1.073200e+02 5.369000e+01\n12 2940     -2.554999e+01 -2.358002e+01\n13 2940     3.605100e+02 -2.894300e+02\n0 2941     6.509100e+02 -1.941998e+01\n1 2941     8.767300e+02 -2.076400e+02\n2 2941     6.027600e+02 -1.713000e+01\n6 2941     5.226500e+02 1.341300e+02\n0 2942     -6.426001e+01 4.820100e+02\n1 2942     3.055900e+02 5.072000e+02\n3 2942     -4.795400e+02 -9.207001e+01\n5 2942     3.409700e+02 -1.691900e+02\n6 2942     -5.482900e+02 4.847400e+02\n7 2942     -2.875500e+02 5.428500e+02\n12 2942     -3.709900e+02 4.784100e+02\n0 2943     -1.173900e+02 5.528998e+01\n1 2943     8.067999e+01 1.123700e+02\n5 2943     4.550300e+02 -6.176899e+02\n7 2943     -2.272900e+02 1.385800e+02\n10 2943     -2.360400e+02 1.935800e+02\n15 2943     -1.974200e+02 1.958800e+02\n0 2944     7.053003e+01 -1.291000e+02\n1 2944     1.887400e+02 -1.178000e+02\n7 2944     8.880005e+00 -2.219971e+00\n12 2944     1.034200e+02 -5.434998e+01\n0 2945     1.404700e+02 7.392999e+01\n1 2945     3.204800e+02 6.123999e+01\n6 2945     9.196997e+01 1.440200e+02\n12 2945     1.167800e+02 1.949300e+02\n15 2945     1.461300e+02 2.583300e+02\n0 2946     6.282000e+02 -3.921600e+02\n1 2946     7.004700e+02 -5.816000e+02\n2 2946     8.024000e+02 -3.007300e+02\n0 2947     -8.542999e+01 4.844300e+02\n1 2947     2.846300e+02 5.150300e+02\n6 2947     -5.734800e+02 4.842500e+02\n7 2947     -3.088800e+02 5.432900e+02\n0 2948     1.329200e+02 7.653998e+01\n1 2948     3.137000e+02 6.552002e+01\n3 2948     1.505600e+02 -1.858000e+02\n7 2948     3.407001e+01 2.109200e+02\n10 2948     5.275000e+01 2.439600e+02\n13 2948     4.784900e+02 -1.454400e+02\n15 2948     1.356300e+02 2.597200e+02\n0 2949     2.428500e+02 -2.221002e+01\n1 2949     3.944900e+02 -6.626001e+01\n10 2949     1.902300e+02 1.409200e+02\n13 2949     5.843400e+02 -2.214600e+02\n15 2949     2.988900e+02 1.400900e+02\n0 2950     3.144301e+02 -9.860999e+01\n1 2950     4.472700e+02 -1.664100e+02\n7 2950     2.345800e+02 6.457001e+01\n10 2950     2.795601e+02 5.947998e+01\n12 2950     3.518600e+02 3.734998e+01\n13 2950     6.498300e+02 -2.854800e+02\n15 2950     4.084700e+02 4.519000e+01\n0 2951     -1.139700e+02 3.558500e+02\n1 2951     2.242500e+02 3.933300e+02\n2 2951     -3.895000e+02 8.601001e+01\n5 2951     2.839500e+02 -3.058200e+02\n6 2951     -5.822900e+02 3.058900e+02\n7 2951     -3.201000e+02 4.063100e+02\n8 2951     -2.402400e+02 5.941000e+01\n9 2951     -4.756500e+02 1.344100e+02\n10 2951     -2.660900e+02 5.524600e+02\n11 2951     4.827002e+01 -3.941900e+02\n12 2951     -4.039800e+02 3.185500e+02\n14 2951     1.999000e+02 -3.926600e+02\n0 2952     -1.172200e+02 2.844700e+02\n1 2952     1.987800e+02 3.246100e+02\n2 2952     -3.654000e+02 1.583002e+01\n7 2952     -3.095200e+02 3.354300e+02\n10 2952     -2.610300e+02 4.660400e+02\n15 2952     -2.149700e+02 5.096300e+02\n0 2953     9.551001e+01 -4.925000e+01\n1 2953     2.362700e+02 -4.734998e+01\n2 2953     2.714500e+02 4.059998e+00\n6 2953     9.400000e+01 -2.119995e+00\n7 2953     2.071997e+01 8.167999e+01\n10 2953     2.283002e+01 9.354999e+01\n15 2953     1.007300e+02 8.312000e+01\n0 2954     2.414500e+02 -1.645001e+01\n1 2954     3.948300e+02 -5.990997e+01\n2 2954     3.855601e+02 5.534003e+01\n13 2954     5.825300e+02 -2.169200e+02\n15 2954     2.979800e+02 1.480100e+02\n0 2955     1.910300e+02 -5.396997e+01\n1 2955     3.301100e+02 -8.115997e+01\n2 2955     3.609301e+02 1.684003e+01\n3 2955     2.597800e+02 -2.884600e+02\n6 2955     1.934700e+02 2.101001e+01\n8 2955     3.275100e+02 -3.512000e+01\n10 2955     1.333800e+02 9.844000e+01\n15 2955     2.318300e+02 8.989001e+01\n0 2956     5.641300e+02 1.416400e+02\n1 2956     8.366500e+02 -9.780029e+00\n2 2956     4.625100e+02 1.030700e+02\n6 2956     3.730200e+02 2.807200e+02\n9 2956     2.574100e+02 1.849600e+02\n15 2956     7.406400e+02 4.109700e+02\n0 2957     6.008900e+02 8.842001e+01\n1 2957     8.583600e+02 -7.777002e+01\n2 2957     5.183199e+02 6.760999e+01\n6 2957     4.329800e+02 2.343600e+02\n9 2957     3.056700e+02 1.564300e+02\n15 2957     7.984200e+02 3.417900e+02\n0 2958     6.480400e+02 -4.539978e+00\n1 2958     8.786000e+02 -1.910200e+02\n3 2958     4.624900e+02 -3.091600e+02\n6 2958     5.149700e+02 1.493300e+02\n10 2958     6.593800e+02 2.043200e+02\n12 2958     5.956400e+02 1.590100e+02\n15 2958     8.753199e+02 2.192700e+02\n0 2959     3.420001e+01 -6.138000e+01\n1 2959     1.745800e+02 -4.077002e+01\n7 2959     -3.963000e+01 5.847998e+01\n13 2959     4.110200e+02 -2.712000e+02\n15 2959     1.931000e+01 5.865997e+01\n0 2960     6.550000e+01 -1.187700e+02\n1 2960     1.877300e+02 -1.064200e+02\n3 2960     1.720100e+02 -3.865300e+02\n7 2960     7.600098e-01 6.400024e+00\n15 2960     6.931000e+01 -1.506000e+01\n0 2961     -6.701001e+01 -1.431000e+02\n1 2961     5.557001e+01 -8.992999e+01\n6 2961     -6.052002e+01 -1.716400e+02\n7 2961     -1.285100e+02 -4.273999e+01\n12 2961     -5.856000e+01 -1.177600e+02\n15 2961     -1.059400e+02 -6.569000e+01\n0 2962     1.149400e+02 -1.358900e+02\n1 2962     2.297200e+02 -1.381500e+02\n3 2962     2.295000e+02 -3.848100e+02\n7 2962     5.376001e+01 -1.510010e+00\n15 2962     1.387400e+02 -3.148999e+01\n0 2963     5.702800e+02 1.133400e+02\n1 2963     8.338700e+02 -4.173999e+01\n0 2964     2.407000e+02 -8.515002e+01\n1 2964     3.732400e+02 -1.286800e+02\n2 2964     4.087800e+02 -1.459003e+01\n3 2964     3.047300e+02 -3.170600e+02\n6 2964     2.468900e+02 -2.309998e+00\n7 2964     1.652700e+02 6.819000e+01\n10 2964     1.942500e+02 6.779999e+01\n12 2964     2.741700e+02 3.879999e+01\n13 2964     5.903101e+02 -2.769200e+02\n15 2964     3.044600e+02 5.390002e+01\n0 2965     -1.355100e+02 -1.239100e+02\n1 2965     -1.820007e+00 -5.170001e+01\n3 2965     -3.803003e+01 -4.616300e+02\n6 2965     -1.514300e+02 -1.772100e+02\n7 2965     -2.021000e+02 -3.695001e+01\n12 2965     -1.503600e+02 -1.186700e+02\n15 2965     -1.996900e+02 -5.006000e+01\n0 2966     5.416000e+02 2.120700e+02\n1 2966     8.350100e+02 7.142999e+01\n6 2966     3.268700e+02 3.518900e+02\n7 2966     3.648300e+02 3.739200e+02\n9 2966     2.193000e+02 2.348800e+02\n10 2966     5.181300e+02 4.477600e+02\n13 2966     7.378199e+02 -1.940997e+01\n15 2966     7.010300e+02 5.067300e+02\n0 2967     2.244900e+02 -6.821997e+01\n1 2967     3.604200e+02 -1.066000e+02\n2 2967     3.935500e+02 4.260010e+00\n6 2967     2.293800e+02 1.342999e+01\n7 2967     1.480601e+02 8.248999e+01\n13 2967     5.765200e+02 -2.627200e+02\n0 2968     3.890997e+01 6.983002e+01\n1 2968     2.204800e+02 8.556000e+01\n2 2968     1.549900e+02 9.815002e+01\n3 2968     6.517999e+01 -2.160600e+02\n4 2968     -2.295300e+02 -4.430500e+02\n5 2968     6.732900e+02 -5.895100e+02\n6 2968     -2.259998e+01 1.075700e+02\n7 2968     -5.884998e+01 1.886300e+02\n8 2968     1.593800e+02 3.507999e+01\n9 2968     1.947998e+01 1.730200e+02\n10 2968     -5.594000e+01 2.263600e+02\n12 2968     -2.599976e+00 1.619600e+02\n15 2968     8.989990e+00 2.377700e+02\n0 2969     5.731300e+02 2.003000e+02\n1 2969     8.644800e+02 5.015997e+01\n9 2969     2.513400e+02 2.381800e+02\n0 2970     1.940100e+02 -2.269100e+02\n1 2970     2.766600e+02 -2.520700e+02\n2 2970     4.423300e+02 -1.475100e+02\n10 2970     1.541500e+02 -1.004900e+02\n13 2970     5.781300e+02 -4.036800e+02\n0 2971     -4.504200e+02 3.205800e+02\n1 2971     -1.134700e+02 4.435400e+02\n10 2971     -6.693300e+02 4.793700e+02\n15 2971     -6.842500e+02 5.156100e+02\n0 2972     -5.952800e+02 3.672500e+02\n1 2972     -2.406800e+02 5.216800e+02\n0 2973     -5.876500e+02 3.641500e+02\n1 2973     -2.336900e+02 5.169400e+02\n0 2974     -4.718200e+02 3.210500e+02\n1 2974     -1.333100e+02 4.491300e+02\n7 2974     -6.825900e+02 3.248000e+02\n10 2974     -6.952100e+02 4.777200e+02\n11 2974     -2.750300e+02 -4.224600e+02\n15 2974     -7.144300e+02 5.131900e+02\n0 2975     -1.911500e+02 3.957001e+01\n1 2975     9.780029e+00 1.170500e+02\n4 2975     -2.273500e+02 -2.601100e+02\n7 2975     -3.024400e+02 1.085800e+02\n10 2975     -3.204300e+02 1.675200e+02\n15 2975     -2.944500e+02 1.647900e+02\n0 2976     2.151700e+02 3.261200e+02\n1 2976     5.499800e+02 2.762500e+02\n6 2976     -1.723300e+02 3.575100e+02\n7 2976     9.609985e+00 4.206500e+02\n11 2976     3.537400e+02 -4.133200e+02\n12 2976     -2.531000e+01 3.548200e+02\n13 2976     3.849600e+02 3.609003e+01\n14 2976     5.564600e+02 -4.108800e+02\n0 2977     2.091200e+02 3.185900e+02\n1 2977     5.407500e+02 2.705700e+02\n6 2977     -1.731300e+02 3.468000e+02\n7 2977     5.960022e+00 4.128100e+02\n10 2977     1.185400e+02 5.396300e+02\n12 2977     -2.787000e+01 3.460300e+02\n0 2978     2.896000e+02 1.908900e+02\n1 2978     5.743500e+02 1.202300e+02\n10 2978     2.244600e+02 3.956100e+02\n15 2978     3.541100e+02 4.375400e+02\n0 2979     2.508600e+02 5.622998e+01\n1 2979     4.294200e+02 9.530029e+00\n7 2979     1.498400e+02 2.070600e+02\n10 2979     1.917800e+02 2.324300e+02\n15 2979     3.012100e+02 2.487700e+02\n0 2980     2.508600e+02 5.622998e+01\n1 2980     4.294200e+02 9.530029e+00\n10 2980     1.917800e+02 2.324300e+02\n15 2980     3.012100e+02 2.487700e+02\n0 2981     2.820200e+02 4.060999e+01\n1 2981     4.577600e+02 -1.565002e+01\n7 2981     1.809700e+02 1.957700e+02\n10 2981     2.291899e+02 2.174800e+02\n15 2981     3.461899e+02 2.316900e+02\n0 2982     2.588199e+02 1.159003e+01\n1 2982     4.223500e+02 -3.745001e+01\n6 2982     2.298800e+02 1.072800e+02\n7 2982     1.657600e+02 1.654000e+02\n10 2982     2.050000e+02 1.808500e+02\n13 2982     5.910699e+02 -1.925200e+02\n15 2982     3.172900e+02 1.883100e+02\n0 2983     2.402000e+02 -7.190002e+00\n1 2983     3.961300e+02 -5.040002e+01\n10 2983     1.852200e+02 1.575500e+02\n12 2983     2.510300e+02 1.280400e+02\n15 2983     2.936600e+02 1.601200e+02\n0 2984     3.069800e+02 -2.520001e+01\n1 2984     4.638500e+02 -9.040002e+01\n6 2984     2.808700e+02 7.657001e+01\n7 2984     2.151300e+02 1.347400e+02\n10 2984     2.642600e+02 1.441100e+02\n15 2984     3.892800e+02 1.446400e+02\n0 2985     2.212400e+02 -4.875000e+01\n1 2985     3.631899e+02 -8.550000e+01\n6 2985     2.194300e+02 3.491998e+01\n7 2985     1.418000e+02 1.022100e+02\n8 2985     3.467600e+02 -2.807999e+01\n10 2985     1.677700e+02 1.076400e+02\n13 2985     5.712600e+02 -2.457300e+02\n15 2985     2.725800e+02 1.008400e+02\n0 2986     2.123101e+02 -8.308002e+01\n1 2986     3.438000e+02 -1.168600e+02\n6 2986     2.215400e+02 -5.909973e+00\n7 2986     1.388300e+02 6.673999e+01\n13 2986     5.679800e+02 -2.766700e+02\n15 2986     2.650400e+02 5.281000e+01\n0 2987     4.086000e+02 -3.022998e+01\n1 2987     5.812100e+02 -1.311000e+02\n6 2987     3.489700e+02 8.329999e+01\n7 2987     3.019100e+02 1.381300e+02\n10 2987     3.824000e+02 1.490100e+02\n13 2987     7.005500e+02 -2.260500e+02\n15 2987     5.342900e+02 1.514900e+02\n0 2988     -5.812000e+01 -1.624500e+02\n1 2988     5.664001e+01 -1.109900e+02\n4 2988     -3.795000e+02 -3.641100e+02\n10 2988     -1.430400e+02 -5.310999e+01\n12 2988     -3.898999e+01 -1.345600e+02\n13 2988     3.410300e+02 -3.683800e+02\n15 2988     -9.157001e+01 -9.081000e+01\n0 2989     3.074600e+02 -1.164300e+02\n1 2989     4.327300e+02 -1.817600e+02\n7 2989     2.332400e+02 4.751001e+01\n10 2989     2.738600e+02 3.850000e+01\n13 2989     6.501000e+02 -3.002900e+02\n15 2989     4.007800e+02 2.009998e+01\n0 2990     3.567800e+02 -1.420600e+02\n1 2990     4.782100e+02 -2.243500e+02\n6 2990     3.705100e+02 -3.490997e+01\n7 2990     2.819900e+02 2.914001e+01\n10 2990     3.330500e+02 1.460999e+01\n12 2990     4.081100e+02 -2.020020e+00\n15 2990     4.732700e+02 -8.400024e+00\n0 2991     -1.866000e+02 -5.198600e+02\n1 2991     -1.629900e+02 -4.088300e+02\n4 2991     -6.455600e+02 -2.370700e+02\n6 2991     -6.478998e+01 -6.851100e+02\n7 2991     -1.835100e+02 -4.499500e+02\n0 2992     -1.995200e+02 -5.390200e+02\n1 2992     -1.815800e+02 -4.216600e+02\n4 2992     -6.590800e+02 -2.266900e+02\n6 2992     -6.690997e+01 -7.115800e+02\n7 2992     -1.923400e+02 -4.711500e+02\n9 2992     4.045001e+01 -4.759900e+02\n0 2993     4.689100e+02 2.736200e+02\n1 2993     7.924900e+02 1.538500e+02\n10 2993     4.275100e+02 5.130700e+02\n0 2994     5.106700e+02 -1.979300e+02\n1 2994     6.521400e+02 -3.408400e+02\n7 2994     4.096400e+02 -1.703998e+01\n13 2994     7.912600e+02 -3.801700e+02\n0 2995     1.421000e+02 7.444000e+01\n1 2995     3.220601e+02 6.073999e+01\n15 2995     1.483300e+02 2.585300e+02\n0 2996     3.855900e+02 -9.565997e+01\n1 2996     5.285500e+02 -1.883900e+02\n10 2996     3.616200e+02 7.057001e+01\n15 2996     5.087500e+02 5.857001e+01\n0 2997     4.174800e+02 -1.062300e+02\n1 2997     5.575699e+02 -2.098300e+02\n15 2997     5.550800e+02 4.763000e+01\n0 2998     2.178900e+02 4.765997e+01\n1 2998     3.908400e+02 1.140002e+01\n7 2998     1.215700e+02 1.950100e+02\n15 2998     2.564100e+02 2.318400e+02\n0 2999     2.210100e+02 3.546997e+01\n1 2999     3.897900e+02 -1.330017e+00\n7 2999     1.265400e+02 1.841900e+02\n0 3000     2.104200e+02 1.877002e+01\n1 3000     3.733101e+02 -1.513000e+01\n10 3000     1.481300e+02 1.846700e+02\n12 3000     2.107800e+02 1.512200e+02\n15 3000     2.487900e+02 1.915400e+02\n0 3001     1.949100e+02 8.423999e+01\n1 3001     3.796100e+02 5.454999e+01\n7 3001     9.177002e+01 2.272400e+02\n13 3001     5.266801e+02 -1.341600e+02\n15 3001     2.200200e+02 2.792100e+02\n0 3002     3.091500e+02 4.294000e+01\n1 3002     4.897100e+02 -2.259003e+01\n7 3002     2.044200e+02 2.011300e+02\n10 3002     2.607100e+02 2.239800e+02\n13 3002     6.209000e+02 -1.633300e+02\n15 3002     3.845800e+02 2.387600e+02\n0 3003     1.275400e+02 -8.269000e+01\n1 3003     2.579100e+02 -9.001001e+01\n0 3004     9.858002e+01 7.494000e+01\n1 3004     2.788900e+02 7.384998e+01\n15 3004     8.909998e+01 2.530600e+02\n0 3005     2.357500e+02 -2.156000e+01\n1 3005     3.866500e+02 -6.317999e+01\n2 3005     3.839600e+02 5.090997e+01\n3 3005     2.775400e+02 -2.561400e+02\n6 3005     2.235500e+02 6.777002e+01\n7 3005     1.507900e+02 1.305700e+02\n10 3005     1.817600e+02 1.405400e+02\n13 3005     5.791200e+02 -2.216000e+02\n0 3006     2.181801e+02 1.522998e+01\n1 3006     3.797500e+02 -2.084998e+01\n2 3006     3.557300e+02 8.465997e+01\n7 3006     1.280100e+02 1.641200e+02\n0 3007     2.778300e+02 1.335999e+01\n1 3007     4.438800e+02 -4.196002e+01\n7 3007     1.824900e+02 1.692700e+02\n10 3007     2.271801e+02 1.853100e+02\n13 3007     6.045800e+02 -1.901400e+02\n15 3007     3.438000e+02 1.935200e+02\n0 3008     1.577700e+02 -1.971002e+01\n1 3008     3.067000e+02 -3.666998e+01\n2 3008     3.203900e+02 4.740997e+01\n10 3008     9.151001e+01 1.344600e+02\n15 3008     1.816600e+02 1.319000e+02\n0 3009     1.303100e+02 -6.083002e+01\n1 3009     2.666801e+02 -6.953998e+01\n2 3009     3.099200e+02 -7.700195e-01\n3 3009     2.139600e+02 -3.064200e+02\n6 3009     1.358200e+02 -4.869995e+00\n10 3009     6.396997e+01 8.340997e+01\n12 3009     1.517300e+02 4.372998e+01\n13 3009     4.979000e+02 -2.627800e+02\n0 3010     5.841998e+01 -1.117700e+02\n1 3010     1.833000e+02 -9.732001e+01\n2 3010     2.492400e+02 -7.916998e+01\n3 3010     1.603400e+02 -3.832300e+02\n7 3010     -7.450012e+00 1.191998e+01\n9 3010     1.034100e+02 2.917999e+01\n10 3010     -1.383002e+01 1.744000e+01\n13 3010     4.373400e+02 -3.143400e+02\n15 3010     5.912000e+01 -6.559998e+00\n0 3011     -1.337300e+02 2.434000e+02\n1 3011     1.674700e+02 2.894900e+02\n7 3011     -3.172000e+02 2.932800e+02\n11 3011     2.676001e+01 -4.996500e+02\n0 3012     6.622998e+01 -5.091998e+01\n1 3012     2.075200e+02 -3.985999e+01\n2 3012     2.405900e+02 -6.950012e+00\n3 3012     1.486000e+02 -3.139400e+02\n7 3012     -9.489990e+00 7.447998e+01\n9 3012     9.340997e+01 8.870999e+01\n10 3012     -1.284003e+01 8.831000e+01\n13 3012     4.395800e+02 -2.594400e+02\n15 3012     6.021997e+01 7.658002e+01\n0 3013     -4.831500e+02 1.408200e+02\n1 3013     -1.963000e+02 2.830400e+02\n0 3014     -3.471997e+01 -1.765100e+02\n1 3014     7.296002e+01 -1.313100e+02\n7 3014     -8.791998e+01 -6.809003e+01\n10 3014     -1.148100e+02 -6.684003e+01\n12 3014     -2.349976e+00 -1.428200e+02\n15 3014     -5.810999e+01 -1.064000e+02\n0 3015     -8.650024e+00 -1.853400e+02\n1 3015     9.452002e+01 -1.474000e+02\n15 3015     -2.294000e+01 -1.155300e+02\n0 3016     -1.663400e+02 -5.400000e+01\n1 3016     -4.200012e+00 2.271997e+01\n0 3017     -3.299600e+02 5.990997e+01\n1 3017     -8.462000e+01 1.682800e+02\n4 3017     -2.080200e+02 -1.453300e+02\n8 3017     -3.272700e+02 -1.840700e+02\n10 3017     -4.867400e+02 1.779600e+02\n0 3018     -7.786700e+02 -5.699399e+02\n1 3018     -6.785000e+02 -2.657700e+02\n0 3019     -2.828700e+02 2.522998e+01\n1 3019     -5.371997e+01 1.234900e+02\n4 3019     -2.336400e+02 -1.738100e+02\n0 3020     -4.614700e+02 1.414300e+02\n1 3020     -1.762900e+02 2.780700e+02\n13 3020     -1.650800e+02 -1.616500e+02\n0 3021     -3.299500e+02 6.496002e+01\n1 3021     -8.287000e+01 1.728100e+02\n0 3022     -7.246100e+02 -4.551000e+02\n1 3022     -6.015400e+02 -1.841100e+02\n4 3022     -4.815200e+02 1.251500e+02\n7 3022     -7.740100e+02 -5.072500e+02\n0 3023     2.781000e+02 4.715997e+01\n1 3023     4.559700e+02 -8.320007e+00\n7 3023     1.763700e+02 2.016900e+02\n10 3023     2.241300e+02 2.238700e+02\n13 3023     5.984800e+02 -1.614100e+02\n15 3023     3.402700e+02 2.395100e+02\n0 3024     8.553003e+01 5.119900e+02\n1 3024     4.702500e+02 5.003200e+02\n2 3024     -2.136600e+02 2.745300e+02\n5 3024     4.889399e+02 -1.345700e+02\n11 3024     2.232500e+02 -2.502300e+02\n12 3024     -2.152100e+02 5.352100e+02\n14 3024     3.957300e+02 -2.202800e+02\n0 3025     2.110800e+02 -4.546002e+01\n1 3025     3.536300e+02 -7.933002e+01\n6 3025     2.093700e+02 3.471002e+01\n7 3025     1.319000e+02 1.035500e+02\n8 3025     3.392300e+02 -2.712000e+01\n13 3025     5.629600e+02 -2.433900e+02\n15 3025     2.581100e+02 1.039800e+02\n0 3026     -5.227700e+02 2.777700e+02\n1 3026     -1.923900e+02 4.201800e+02\n10 3026     -7.518400e+02 4.209100e+02\n13 3026     -2.323000e+02 -4.607001e+01\n0 3027     8.795001e+01 5.142300e+02\n1 3027     4.734900e+02 5.020300e+02\n6 3027     -3.837600e+02 5.575700e+02\n14 3027     3.982400e+02 -2.179300e+02\n0 3028     3.351700e+02 -1.692600e+02\n1 3028     4.442700e+02 -2.439500e+02\n6 3028     3.667000e+02 -6.627002e+01\n7 3028     2.684600e+02 7.100220e-01\n10 3028     3.105699e+02 -1.921997e+01\n12 3028     3.997700e+02 -3.321002e+01\n15 3028     4.460000e+02 -4.844000e+01\n0 3029     9.941998e+01 -2.221300e+02\n1 3029     1.844500e+02 -2.163700e+02\n2 3029     3.511000e+02 -1.646000e+02\n3 3029     2.657000e+02 -4.615500e+02\n4 3029     -4.536500e+02 -4.937800e+02\n6 3029     1.693700e+02 -1.900900e+02\n7 3029     5.623999e+01 -8.712000e+01\n8 3029     3.112900e+02 -1.884600e+02\n10 3029     4.475000e+01 -1.048800e+02\n15 3029     1.282600e+02 -1.502100e+02\n0 3030     -2.331000e+02 4.626700e+02\n1 3030     1.298500e+02 5.293500e+02\n2 3030     -5.142200e+02 2.165100e+02\n5 3030     1.739800e+02 -1.895000e+02\n7 3030     -4.538600e+02 5.049100e+02\n11 3030     -5.906000e+01 -2.999100e+02\n12 3030     -5.566400e+02 4.312800e+02\n0 3031     -1.130600e+02 2.213600e+02\n1 3031     1.793800e+02 2.629300e+02\n0 3032     1.275400e+02 -8.269000e+01\n1 3032     2.579100e+02 -9.001001e+01\n6 3032     1.389300e+02 -3.046002e+01\n7 3032     5.750000e+01 5.382001e+01\n8 3032     2.853000e+02 -6.989001e+01\n0 3033     -7.657001e+01 -5.293400e+02\n1 3033     -6.578003e+01 -4.544200e+02\n6 3033     6.666998e+01 -6.426700e+02\n7 3033     -7.014001e+01 -4.352500e+02\n9 3033     1.437100e+02 -4.198400e+02\n0 3034     6.350000e+01 5.455100e+02\n1 3034     4.560400e+02 5.404900e+02\n2 3034     -2.357600e+02 3.126700e+02\n5 3034     4.689200e+02 -1.009000e+02\n0 3035     -6.870001e+01 -1.079900e+02\n1 3035     6.592999e+01 -5.627002e+01\n8 3035     1.101700e+02 -1.446100e+02\n12 3035     -7.571002e+01 -7.952002e+01\n0 3036     7.646002e+01 3.953998e+01\n1 3036     2.454800e+02 4.590002e+01\n6 3036     3.971002e+01 8.829999e+01\n15 3036     6.340002e+01 2.017500e+02\n0 3037     5.693101e+02 -1.829999e+01\n1 3037     7.916300e+02 -1.794100e+02\n12 3037     5.056300e+02 1.122300e+02\n13 3037     7.919301e+02 -2.207500e+02\n15 3037     7.662200e+02 1.891100e+02\n0 3038     -2.545100e+02 -4.579301e+02\n1 3038     -2.017600e+02 -3.300700e+02\n6 3038     -1.876100e+02 -6.525000e+02\n7 3038     -2.688100e+02 -4.043400e+02\n0 3039     -8.570001e+01 -5.800200e+02\n1 3039     -9.340997e+01 -4.975400e+02\n0 3040     2.525699e+02 4.495600e+02\n1 3040     6.349800e+02 3.920100e+02\n2 3040     -5.963000e+01 2.064500e+02\n5 3040     6.561700e+02 -1.979000e+02\n6 3040     -1.948900e+02 5.088700e+02\n7 3040     2.171002e+01 5.426100e+02\n11 3040     3.810200e+02 -2.980700e+02\n12 3040     -2.953003e+01 4.849100e+02\n14 3040     5.623101e+02 -2.782000e+02\n0 3041     2.394301e+02 4.442400e+02\n1 3041     6.192300e+02 3.898400e+02\n2 3041     -7.042999e+01 2.005300e+02\n3 3041     -2.117000e+02 -1.315100e+02\n5 3041     6.425400e+02 -2.039200e+02\n6 3041     -2.079500e+02 4.996500e+02\n7 3041     9.789978e+00 5.358800e+02\n8 3041     2.191998e+01 1.543200e+02\n11 3041     3.699399e+02 -3.035200e+02\n12 3041     -4.227002e+01 4.772600e+02\n14 3041     5.493600e+02 -2.842200e+02\n0 3042     -8.071997e+01 4.871600e+02\n1 3042     2.901899e+02 5.167300e+02\n7 3042     -3.044400e+02 5.469500e+02\n0 3043     -1.107600e+02 4.829200e+02\n1 3043     2.581899e+02 5.196900e+02\n7 3043     -3.335800e+02 5.385000e+02\n11 3043     4.882001e+01 -2.812700e+02\n12 3043     -4.220500e+02 4.721500e+02\n14 3043     2.067200e+02 -2.568600e+02\n0 3044     4.668900e+02 2.929900e+02\n1 3044     7.964900e+02 1.744600e+02\n6 3044     1.703200e+02 4.018800e+02\n7 3044     2.678199e+02 4.306700e+02\n10 3044     4.235601e+02 5.354000e+02\n0 3045     2.081300e+02 -4.190002e+00\n1 3045     3.626400e+02 -3.687000e+01\n7 3045     1.220400e+02 1.439600e+02\n10 3045     1.475500e+02 1.579100e+02\n13 3045     5.554900e+02 -2.080400e+02\n15 3045     2.486899e+02 1.598700e+02\n0 3046     7.687000e+01 -6.290002e+01\n1 3046     2.144600e+02 -5.498999e+01\n7 3046     4.340027e+00 6.501001e+01\n8 3046     2.380700e+02 -6.171002e+01\n0 3047     -1.008800e+02 -5.631899e+02\n1 3047     -1.007600e+02 -4.768800e+02\n6 3047     6.215002e+01 -6.885601e+02\n7 3047     -8.598999e+01 -4.728000e+02\n0 3048     9.122998e+01 5.005800e+02\n1 3048     4.733300e+02 4.869200e+02\n2 3048     -2.080100e+02 2.614600e+02\n7 3048     -1.385000e+02 5.778100e+02\n14 3048     4.013300e+02 -2.317900e+02\n0 3049     -2.369000e+01 4.888900e+02\n1 3049     3.499399e+02 5.040600e+02\n6 3049     -5.031000e+02 5.022500e+02\n7 3049     -2.481000e+02 5.544900e+02\n11 3049     1.265100e+02 -2.740000e+02\n14 3049     2.910300e+02 -2.477300e+02\n0 3050     -2.369000e+01 4.888900e+02\n1 3050     3.499399e+02 5.040600e+02\n2 3050     -3.123900e+02 2.471000e+02\n6 3050     -5.031000e+02 5.022500e+02\n7 3050     -2.481000e+02 5.544900e+02\n11 3050     1.265100e+02 -2.740000e+02\n14 3050     2.910300e+02 -2.477300e+02\n0 3051     2.103400e+02 4.235000e+02\n1 3051     5.810699e+02 3.761800e+02\n7 3051     -1.525000e+01 5.117800e+02\n11 3051     3.446500e+02 -3.230900e+02\n13 3051     3.580699e+02 1.167700e+02\n14 3051     5.211300e+02 -3.081600e+02\n0 3052     3.643600e+02 3.380600e+02\n1 3052     7.149200e+02 2.473100e+02\n6 3052     -1.021997e+01 4.098300e+02\n7 3052     1.504200e+02 4.514200e+02\n10 3052     2.992400e+02 5.795400e+02\n0 3053     4.138600e+02 -1.053000e+02\n1 3053     5.544399e+02 -2.076000e+02\n6 3053     4.015100e+02 1.494000e+01\n7 3053     3.250100e+02 7.102002e+01\n10 3053     3.953300e+02 6.250000e+01\n15 3053     5.491000e+02 4.900000e+01\n0 3054     7.700195e-01 -1.054100e+02\n1 3054     1.301600e+02 -7.312000e+01\n6 3054     4.469971e+00 -1.024900e+02\n7 3054     -6.627002e+01 8.250000e+00\n0 3055     9.363000e+01 2.669200e+02\n1 3055     4.018000e+02 2.511000e+02\n6 3055     -2.751800e+02 2.576400e+02\n7 3055     -9.428003e+01 3.487900e+02\n9 3055     -2.425100e+02 1.071000e+02\n11 3055     2.398400e+02 -4.738000e+02\n12 3055     -1.339500e+02 2.711700e+02\n13 3055     2.943199e+02 -2.100000e+01\n14 3055     4.430400e+02 -4.803199e+02\n0 3056     6.022998e+01 2.300100e+02\n1 3056     3.540800e+02 2.242100e+02\n5 3056     5.061500e+02 -4.405601e+02\n6 3056     -2.883400e+02 2.072200e+02\n7 3056     -1.188200e+02 3.094900e+02\n10 3056     -4.656000e+01 4.186400e+02\n13 3056     2.767000e+02 -5.422998e+01\n14 3056     4.209000e+02 -5.225800e+02\n0 3057     -4.515002e+01 -5.760010e+00\n1 3057     1.203000e+02 3.522998e+01\n6 3057     -9.864001e+01 -1.058002e+01\n7 3057     -1.330800e+02 9.692001e+01\n8 3057     9.871002e+01 -5.329999e+01\n10 3057     -1.450300e+02 1.296600e+02\n12 3057     -8.273999e+01 4.542999e+01\n0 3058     -6.569000e+01 -6.632001e+01\n1 3058     8.207001e+01 -1.683002e+01\n4 3058     -3.102300e+02 -3.579800e+02\n7 3058     -1.426600e+02 3.306000e+01\n10 3058     -1.624500e+02 5.715997e+01\n13 3058     3.170500e+02 -2.871500e+02\n15 3058     -1.136800e+02 3.796997e+01\n0 3059     -7.174000e+02 -3.620500e+02\n1 3059     -5.662000e+02 -1.057200e+02\n7 3059     -7.890600e+02 -4.098200e+02\n0 3060     1.162500e+02 4.582400e+02\n1 3060     4.889600e+02 4.368900e+02\n2 3060     -1.810200e+02 2.134800e+02\n3 3060     -3.171300e+02 -1.185900e+02\n5 3060     5.184500e+02 -1.918100e+02\n6 3060     -3.428600e+02 4.913200e+02\n7 3060     -1.091800e+02 5.373500e+02\n8 3060     -6.956000e+01 1.631600e+02\n12 3060     -1.732000e+02 4.759200e+02\n14 3060     4.270900e+02 -2.751900e+02\n0 3061     -7.790002e+01 4.967800e+02\n1 3061     2.954700e+02 5.253800e+02\n5 3061     3.282100e+02 -1.537600e+02\n11 3061     7.783002e+01 -2.685200e+02\n13 3061     1.287100e+02 1.630300e+02\n0 3062     -2.526000e+02 4.166700e+02\n1 3062     9.942999e+01 4.885800e+02\n2 3062     -5.320000e+02 1.595700e+02\n7 3062     -4.672500e+02 4.541000e+02\n13 3062     -9.809998e+00 8.648999e+01\n0 3063     6.368300e+02 -2.430500e+02\n1 3063     7.736801e+02 -4.335400e+02\n7 3063     5.343500e+02 -3.784998e+01\n12 3063     6.765601e+02 -8.473999e+01\n0 3064     6.244000e+02 -2.354700e+02\n1 3064     7.632500e+02 -4.208100e+02\n12 3064     6.608000e+02 -8.053003e+01\n0 3065     -2.347100e+02 4.652800e+02\n1 3065     1.285200e+02 5.321300e+02\n2 3065     -5.155800e+02 2.193100e+02\n7 3065     -4.557400e+02 5.073600e+02\n0 3066     -3.421900e+02 8.409000e+01\n1 3066     -8.733002e+01 1.940600e+02\n8 3066     -3.502400e+02 -1.687900e+02\n10 3066     -5.040200e+02 2.049800e+02\n13 3066     -4.228003e+01 -2.028000e+02\n0 3067     2.328300e+02 -5.090027e+00\n1 3067     3.888500e+02 -4.570001e+01\n7 3067     1.453500e+02 1.460000e+02\n10 3067     1.766100e+02 1.589900e+02\n15 3067     2.830699e+02 1.620900e+02\n0 3068     -4.213100e+02 9.700012e+00\n1 3068     -1.859000e+02 1.462100e+02\n13 3068     -9.632001e+01 -2.711400e+02\n15 3068     -5.972900e+02 9.072000e+01\n0 3069     2.097200e+02 3.879700e+02\n1 3069     5.688800e+02 3.399800e+02\n0 3070     4.538500e+02 2.998300e+02\n1 3070     7.854399e+02 1.854600e+02\n7 3070     2.536400e+02 4.352100e+02\n10 3070     4.077100e+02 5.427600e+02\n0 3071     1.028900e+02 9.723001e+01\n1 3071     2.925800e+02 9.416000e+01\n4 3071     -2.160500e+02 -4.943900e+02\n7 3071     -1.099976e+00 2.250800e+02\n8 3071     2.056700e+02 7.072000e+01\n15 3071     9.240997e+01 2.838300e+02\n0 3072     -3.309998e+00 1.091200e+02\n1 3072     1.956500e+02 1.353200e+02\n6 3072     -9.845999e+01 1.322700e+02\n7 3072     -1.123000e+02 2.181400e+02\n10 3072     -1.089500e+02 2.678900e+02\n12 3072     -7.150000e+01 1.866700e+02\n15 3072     -5.273999e+01 2.855800e+02\n0 3073     1.224900e+02 7.101001e+01\n1 3073     3.012200e+02 6.315997e+01\n6 3073     7.469000e+01 1.360000e+02\n7 3073     2.503003e+01 2.042300e+02\n8 3073     2.346700e+02 5.364999e+01\n10 3073     4.128003e+01 2.361100e+02\n15 3073     1.220300e+02 2.509300e+02\n0 3074     1.224900e+02 7.101001e+01\n1 3074     3.012200e+02 6.315997e+01\n6 3074     7.469000e+01 1.360000e+02\n7 3074     2.503003e+01 2.042300e+02\n8 3074     2.346700e+02 5.364999e+01\n10 3074     4.128003e+01 2.361100e+02\n15 3074     1.220300e+02 2.509300e+02\n0 3075     1.556600e+02 6.170001e+01\n1 3075     3.313500e+02 4.414001e+01\n2 3075     2.810500e+02 1.199300e+02\n6 3075     1.133200e+02 1.362700e+02\n7 3075     5.978003e+01 2.003300e+02\n8 3075     2.639700e+02 5.160999e+01\n10 3075     8.089001e+01 2.290600e+02\n15 3075     1.685900e+02 2.429500e+02\n0 3076     2.940800e+02 -9.000244e-01\n1 3076     4.570800e+02 -6.157001e+01\n7 3076     1.997200e+02 1.572600e+02\n10 3076     2.472200e+02 1.703800e+02\n15 3076     3.683101e+02 1.761800e+02\n0 3077     5.625200e+02 -9.530029e+00\n1 3077     7.874399e+02 -1.682200e+02\n6 3077     4.106900e+02 1.077700e+02\n7 3077     4.150300e+02 1.623000e+02\n10 3077     5.598700e+02 1.895900e+02\n12 3077     4.957800e+02 1.191600e+02\n15 3077     7.560500e+02 1.999300e+02\n0 3078     2.027700e+02 7.190002e+00\n1 3078     3.611801e+02 -2.409003e+01\n6 3078     1.820800e+02 9.091998e+01\n10 3078     1.400400e+02 1.707600e+02\n0 3079     5.693101e+02 -1.829999e+01\n1 3079     7.916300e+02 -1.794100e+02\n10 3079     5.686700e+02 1.803300e+02\n13 3079     7.919301e+02 -2.207500e+02\n15 3079     7.662200e+02 1.891100e+02\n0 3080     1.225200e+02 6.969971e+00\n1 3080     2.797500e+02 2.001953e-02\n2 3080     2.769301e+02 6.638000e+01\n7 3080     3.777002e+01 1.419700e+02\n10 3080     4.790997e+01 1.616400e+02\n15 3080     1.300100e+02 1.634700e+02\n0 3081     3.109900e+02 -2.745001e+01\n1 3081     4.677100e+02 -9.391998e+01\n6 3081     2.844900e+02 7.467999e+01\n7 3081     2.191899e+02 1.326500e+02\n10 3081     2.690000e+02 1.415300e+02\n15 3081     3.952300e+02 1.419900e+02\n0 3082     5.459301e+02 -2.940002e+01\n1 3082     7.616500e+02 -1.829300e+02\n15 3082     7.352500e+02 1.703700e+02\n0 3083     3.485100e+02 -5.958002e+01\n1 3083     4.994399e+02 -1.394600e+02\n10 3083     3.157600e+02 1.085100e+02\n0 3084     1.720601e+02 -4.067999e+01\n1 3084     3.144800e+02 -6.208002e+01\n2 3084     3.404900e+02 2.791998e+01\n6 3084     1.714600e+02 3.029999e+01\n7 3084     9.422998e+01 1.027100e+02\n10 3084     1.098000e+02 1.114500e+02\n0 3085     4.124800e+02 -1.009600e+02\n1 3085     5.546500e+02 -2.025300e+02\n6 3085     3.963600e+02 1.935999e+01\n7 3085     3.228700e+02 7.496997e+01\n10 3085     3.937400e+02 6.796997e+01\n12 3085     4.430500e+02 4.989001e+01\n0 3086     3.586000e+02 -1.093200e+02\n1 3086     4.940000e+02 -1.927900e+02\n0 3087     -1.133500e+02 6.250000e+00\n1 3087     6.517999e+01 6.519000e+01\n7 3087     -2.098300e+02 9.331000e+01\n10 3087     -2.257300e+02 1.367500e+02\n12 3087     -1.814000e+02 2.723999e+01\n15 3087     -1.862400e+02 1.297000e+02\n0 3088     1.994399e+02 -1.042900e+02\n1 3088     3.245400e+02 -1.340500e+02\n6 3088     2.154700e+02 -3.516998e+01\n12 3088     2.378300e+02 7.260010e+00\n13 3088     5.589100e+02 -2.964500e+02\n15 3088     2.503900e+02 2.213000e+01\n0 3089     1.710200e+02 -1.001100e+02\n1 3089     2.967000e+02 -1.206200e+02\n6 3089     1.869900e+02 -3.778998e+01\n7 3089     1.021100e+02 4.309003e+01\n10 3089     1.147200e+02 4.297998e+01\n15 3089     2.104900e+02 2.437000e+01\n0 3090     -9.508002e+01 -2.278998e+01\n1 3090     7.113000e+01 3.273999e+01\n2 3090     2.097998e+01 -5.590002e+01\n6 3090     -1.623100e+02 -5.348999e+01\n7 3090     -1.837900e+02 6.915002e+01\n10 3090     -2.013800e+02 1.046600e+02\n15 3090     -1.583300e+02 9.317999e+01\n0 3091     -9.508002e+01 -2.278998e+01\n1 3091     7.113000e+01 3.273999e+01\n6 3091     -1.623100e+02 -5.348999e+01\n0 3092     1.186900e+02 -1.106400e+02\n1 3092     2.416200e+02 -1.147200e+02\n2 3092     3.121700e+02 -6.000000e+01\n10 3092     5.556000e+01 2.585999e+01\n15 3092     1.406400e+02 3.070007e+00\n0 3093     -3.944000e+01 -7.653998e+01\n1 3093     1.030500e+02 -3.433002e+01\n7 3093     -1.133700e+02 2.832001e+01\n15 3093     -7.688000e+01 2.795001e+01\n0 3094     3.903003e+01 -1.021100e+02\n1 3094     1.679500e+02 -8.219000e+01\n6 3094     4.415002e+01 -8.533002e+01\n7 3094     -2.851001e+01 1.783002e+01\n9 3094     8.301001e+01 3.128003e+01\n10 3094     -3.753003e+01 2.660999e+01\n15 3094     3.148999e+01 3.869995e+00\n0 3095     -1.372700e+02 -1.096600e+02\n1 3095     1.909973e+00 -3.756000e+01\n2 3095     2.253003e+01 -1.454000e+02\n6 3095     -1.646200e+02 -1.637400e+02\n10 3095     -2.410200e+02 -7.199707e-01\n12 3095     -1.611900e+02 -1.049700e+02\n13 3095     2.568199e+02 -3.314100e+02\n0 3096     -6.407001e+01 -1.359500e+02\n1 3096     6.119000e+01 -8.420001e+01\n15 3096     -1.024500e+02 -5.577002e+01\n0 3097     -7.417999e+01 -1.479800e+02\n1 3097     4.678998e+01 -9.223999e+01\n6 3097     -6.563000e+01 -1.789100e+02\n7 3097     -1.345100e+02 -4.847998e+01\n10 3097     -1.634200e+02 -3.817999e+01\n15 3097     -1.149800e+02 -7.328003e+01\n0 3098     -3.654999e+01 -1.926500e+02\n1 3098     6.464001e+01 -1.457800e+02\n6 3098     7.450012e+00 -2.090300e+02\n7 3098     -8.488000e+01 -8.378003e+01\n10 3098     -1.153700e+02 -8.602002e+01\n12 3098     2.659973e+00 -1.585600e+02\n15 3098     -5.912000e+01 -1.287100e+02\n0 3099     9.642999e+01 -2.406500e+02\n1 3099     1.742400e+02 -2.333400e+02\n7 3099     5.842999e+01 -1.053700e+02\n10 3099     4.328998e+01 -1.268000e+02\n15 3099     1.263600e+02 -1.757900e+02\n0 3100     6.074800e+02 1.189300e+02\n1 3100     8.747800e+02 -4.696997e+01\n2 3100     5.173900e+02 1.023600e+02\n6 3100     4.332900e+02 2.714400e+02\n7 3100     4.425800e+02 2.957300e+02\n8 3100     4.834301e+02 5.545999e+01\n9 3100     3.039500e+02 1.854500e+02\n10 3100     6.022700e+02 3.439100e+02\n12 3100     5.172600e+02 2.810000e+02\n13 3100     8.154000e+02 -9.184998e+01\n15 3100     8.041200e+02 3.860600e+02\n0 3101     5.992900e+02 -3.138000e+01\n1 3101     8.183700e+02 -2.027300e+02\n7 3101     4.546400e+02 1.490400e+02\n0 3102     6.601899e+02 -5.525000e+01\n1 3102     8.749600e+02 -2.487200e+02\n7 3102     5.176000e+02 1.382900e+02\n0 3103     5.605400e+02 -2.134998e+01\n1 3103     7.811801e+02 -1.795300e+02\n7 3103     4.150900e+02 1.505900e+02\n10 3103     5.586000e+02 1.759700e+02\n13 3103     7.836899e+02 -2.250300e+02\n15 3103     7.544100e+02 1.835500e+02\n0 3104     2.149100e+02 -2.978003e+01\n1 3104     3.622200e+02 -6.452002e+01\n10 3104     1.586100e+02 1.289000e+02\n15 3104     2.619500e+02 1.256800e+02\n0 3105     3.641801e+02 -1.233900e+02\n1 3105     4.936300e+02 -2.084900e+02\n7 3105     2.841200e+02 4.722998e+01\n10 3105     3.396000e+02 3.596997e+01\n15 3105     4.816801e+02 1.760999e+01\n0 3106     -3.797998e+01 -1.044000e+02\n1 3106     9.347998e+01 -6.116998e+01\n3 3106     6.442999e+01 -4.023600e+02\n7 3106     -1.050900e+02 2.140015e+00\n10 3106     -1.261300e+02 1.559998e+01\n15 3106     -7.217999e+01 -9.700012e+00\n0 3107     3.095000e+02 -2.430300e+02\n1 3107     3.969100e+02 -3.091400e+02\n6 3107     3.617500e+02 -1.595400e+02\n7 3107     2.550500e+02 -7.681000e+01\n10 3107     2.895500e+02 -1.059000e+02\n12 3107     3.919100e+02 -1.284400e+02\n15 3107     4.207300e+02 -1.520200e+02\n0 3108     -8.841998e+01 -1.476200e+02\n1 3108     3.351001e+01 -8.767999e+01\n7 3108     -1.488600e+02 -5.076001e+01\n10 3108     -1.801400e+02 -3.942999e+01\n0 3109     5.489200e+02 2.250100e+02\n1 3109     8.470400e+02 8.342999e+01\n7 3109     3.702800e+02 3.878500e+02\n10 3109     5.256899e+02 4.633900e+02\n15 3109     7.098800e+02 5.262800e+02\n0 3110     5.863900e+02 8.251999e+01\n1 3110     8.411899e+02 -7.921997e+01\n6 3110     4.164400e+02 2.223100e+02\n7 3110     4.269600e+02 2.564700e+02\n8 3110     4.720601e+02 1.660001e+01\n9 3110     2.938800e+02 1.443700e+02\n12 3110     5.016100e+02 2.324500e+02\n15 3110     7.789700e+02 3.316600e+02\n0 3111     5.746100e+02 1.802002e+01\n1 3111     8.084800e+02 -1.432500e+02\n10 3111     5.715300e+02 2.228200e+02\n15 3111     7.695200e+02 2.405500e+02\n0 3112     5.851400e+02 -3.388000e+01\n1 3112     8.030500e+02 -2.010400e+02\n10 3112     5.888800e+02 1.633300e+02\n13 3112     8.105200e+02 -2.330600e+02\n0 3113     1.227500e+02 -6.240002e+01\n1 3113     2.590400e+02 -6.833002e+01\n0 3114     -1.267800e+02 -1.350800e+02\n1 3114     2.469971e+00 -6.442999e+01\n6 3114     -1.360700e+02 -1.854600e+02\n12 3114     -1.357600e+02 -1.280100e+02\n15 3114     -1.875500e+02 -6.308002e+01\n0 3115     2.320800e+02 -5.299700e+02\n1 3115     2.296899e+02 -5.637700e+02\n0 3116     5.619500e+02 7.409003e+01\n1 3116     8.128400e+02 -8.058002e+01\n6 3116     3.874700e+02 2.027000e+02\n7 3116     4.033000e+02 2.422800e+02\n10 3116     5.525300e+02 2.860600e+02\n12 3116     4.740000e+02 2.126900e+02\n15 3116     7.455900e+02 3.153600e+02\n0 3117     5.605400e+02 5.338000e+01\n1 3117     8.051100e+02 -1.017000e+02\n6 3117     3.910000e+02 1.784700e+02\n7 3117     4.046899e+02 2.228000e+02\n10 3117     5.519900e+02 2.623500e+02\n13 3117     7.741200e+02 -1.569900e+02\n15 3117     7.455100e+02 2.869600e+02\n0 3118     -6.684003e+01 -5.377002e+01\n1 3118     8.527002e+01 -5.239990e+00\n7 3118     -1.469900e+02 4.484998e+01\n15 3118     -1.168300e+02 5.433002e+01\n0 3119     -4.620001e+01 -6.035999e+01\n1 3119     1.027300e+02 -1.689001e+01\n7 3119     -1.248700e+02 4.226001e+01\n10 3119     -1.405300e+02 6.638000e+01\n15 3119     -8.856000e+01 4.915002e+01\n0 3120     1.246997e+01 -1.187400e+02\n1 3120     1.362600e+02 -8.979999e+01\n4 3120     -3.587900e+02 -4.206900e+02\n6 3120     2.602002e+01 -1.112700e+02\n12 3120     3.190002e+01 -6.040002e+01\n15 3120     -1.890015e+00 -2.229999e+01\n0 3121     -9.203003e+01 -1.113800e+02\n1 3121     4.432001e+01 -5.281000e+01\n7 3121     -1.618200e+02 -1.731000e+01\n10 3121     -1.881200e+02 2.340027e+00\n15 3121     -1.426700e+02 -2.646002e+01\n0 3122     6.180000e+02 -3.547200e+02\n1 3122     7.046600e+02 -5.396100e+02\n0 3123     5.248199e+02 -3.555500e+02\n1 3123     6.018199e+02 -5.035500e+02\n0 3124     5.095400e+02 2.713700e+02\n1 3124     8.342800e+02 1.402000e+02\n7 3124     3.136600e+02 4.174300e+02\n10 3124     4.756100e+02 5.144100e+02\n0 3125     5.319000e+01 -1.284300e+02\n1 3125     1.718300e+02 -1.116200e+02\n7 3125     -8.469971e+00 -4.210022e+00\n15 3125     5.392999e+01 -2.979999e+01\n0 3126     5.645200e+02 -2.906200e+02\n1 3126     6.727000e+02 -4.539301e+02\n6 3126     5.692600e+02 -1.647900e+02\n0 3127     5.485800e+02 -3.862700e+02\n1 3127     6.146700e+02 -5.436000e+02\n0 3128     9.835999e+01 -1.191500e+02\n1 3128     2.194700e+02 -1.173300e+02\n3 3128     2.025699e+02 -3.777800e+02\n7 3128     3.376001e+01 1.159003e+01\n10 3128     3.215002e+01 1.356000e+01\n13 3128     4.732500e+02 -3.169600e+02\n15 3128     1.131700e+02 -1.120001e+01\n0 3129     1.178003e+01 -2.057000e+02\n1 3129     1.057500e+02 -1.727100e+02\n7 3129     -3.388000e+01 -8.771002e+01\n10 3129     -5.846002e+01 -9.537000e+01\n13 3129     4.161899e+02 -3.994700e+02\n15 3129     6.859985e+00 -1.393400e+02\n0 3130     -8.933002e+01 4.807300e+02\n1 3130     2.796899e+02 5.121200e+02\n2 3130     -3.740100e+02 2.377600e+02\n4 3130     9.969971e+00 -3.052400e+02\n5 3130     3.161801e+02 -1.706800e+02\n6 3130     -5.773300e+02 4.782200e+02\n7 3130     -3.121400e+02 5.388600e+02\n8 3130     -2.278800e+02 1.777900e+02\n13 3130     1.200800e+02 1.497900e+02\n14 3130     2.273400e+02 -2.581200e+02\n0 3131     2.266200e+02 4.707400e+02\n1 3131     6.116300e+02 4.210600e+02\n2 3131     -8.515002e+01 2.291900e+02\n5 3131     6.296400e+02 -1.756000e+02\n6 3131     -2.266600e+02 5.304700e+02\n7 3131     -5.690002e+00 5.611900e+02\n8 3131     1.009998e+01 1.776300e+02\n9 3131     -2.220400e+02 2.703900e+02\n11 3131     3.558199e+02 -2.795100e+02\n12 3131     -6.028003e+01 5.059200e+02\n14 3131     5.344800e+02 -2.570200e+02\n0 3132     3.283400e+02 4.515700e+02\n1 3132     7.204800e+02 3.739700e+02\n2 3132     5.640015e+00 2.110200e+02\n7 3132     9.228003e+01 5.522500e+02\n8 3132     8.488000e+01 1.642500e+02\n9 3132     -1.453600e+02 2.578900e+02\n11 3132     4.519399e+02 -2.914400e+02\n12 3132     4.715997e+01 4.993500e+02\n13 3132     4.521899e+02 1.487700e+02\n14 3132     6.379200e+02 -2.717200e+02\n0 3133     7.747998e+01 4.978900e+02\n1 3133     4.582000e+02 4.877800e+02\n2 3133     -2.203900e+02 2.578000e+02\n7 3133     -1.512700e+02 5.738800e+02\n9 3133     -3.378800e+02 2.910600e+02\n11 3133     2.169100e+02 -2.627900e+02\n0 3134     3.438400e+02 5.373300e+02\n1 3134     7.634600e+02 4.620000e+02\n2 3134     7.140015e+00 3.053100e+02\n3 3134     -1.371200e+02 -2.859003e+01\n6 3134     -1.169200e+02 6.382000e+02\n8 3134     8.694000e+01 2.395100e+02\n9 3134     -1.472000e+02 3.392200e+02\n12 3134     4.626001e+01 5.985400e+02\n13 3134     4.605601e+02 2.229400e+02\n14 3134     6.452600e+02 -1.813100e+02\n0 3135     -3.071900e+02 -1.314300e+02\n1 3135     -1.319500e+02 -1.558002e+01\n15 3135     -4.232100e+02 -8.440997e+01\n0 3136     5.445000e+02 6.447998e+01\n1 3136     7.918900e+02 -8.523999e+01\n7 3136     3.869301e+02 2.305800e+02\n10 3136     5.329200e+02 2.738100e+02\n12 3136     4.558101e+02 1.943600e+02\n0 3137     1.707300e+02 2.299805e-01\n1 3137     3.256801e+02 -2.089001e+01\n7 3137     8.557001e+01 1.429800e+02\n13 3137     5.241500e+02 -2.066000e+02\n15 3137     1.964200e+02 1.609500e+02\n0 3138     -2.800000e+01 -1.421900e+02\n1 3138     9.215002e+01 -1.007100e+02\n7 3138     -8.914001e+01 -3.457001e+01\n10 3138     -1.108600e+02 -2.694000e+01\n15 3138     -5.332001e+01 -5.947998e+01\n0 3139     5.479200e+02 3.176001e+01\n1 3139     7.852500e+02 -1.201400e+02\n6 3139     3.811200e+02 1.486600e+02\n7 3139     3.948700e+02 1.992700e+02\n10 3139     5.393500e+02 2.360700e+02\n12 3139     4.680400e+02 1.595900e+02\n13 3139     7.635601e+02 -1.783500e+02\n0 3140     5.545601e+02 -6.239990e+00\n1 3140     7.807100e+02 -1.625500e+02\n7 3140     4.066801e+02 1.638700e+02\n10 3140     5.500601e+02 1.928200e+02\n13 3140     7.746100e+02 -2.121600e+02\n0 3141     -4.106900e+02 2.403400e+02\n1 3141     -9.556000e+01 3.568400e+02\n7 3141     -6.047700e+02 2.472200e+02\n11 3141     -2.266300e+02 -4.995800e+02\n13 3141     -1.429800e+02 -7.567999e+01\n0 3142     5.583500e+02 -1.409003e+01\n1 3142     7.818600e+02 -1.718100e+02\n7 3142     4.115500e+02 1.569300e+02\n10 3142     5.553900e+02 1.839700e+02\n15 3142     7.508400e+02 1.932200e+02\n0 3143     -4.319000e+02 1.807001e+01\n1 3143     -1.926200e+02 1.566800e+02\n2 3143     -5.800600e+02 -2.660000e+02\n8 3143     -4.137100e+02 -2.335300e+02\n15 3143     -6.128600e+02 1.008700e+02\n0 3144     -1.870700e+02 -4.946400e+02\n1 3144     -1.541400e+02 -3.855100e+02\n6 3144     -8.253000e+01 -6.584000e+02\n7 3144     -1.902900e+02 -4.253100e+02\n0 3145     -2.188600e+02 -5.248400e+02\n1 3145     -1.939500e+02 -4.023900e+02\n6 3145     -9.904999e+01 -7.050601e+02\n7 3145     -2.152500e+02 -4.609700e+02\n10 3145     -2.889200e+02 -4.888700e+02\n0 3146     6.234399e+02 1.492999e+01\n1 3146     8.585300e+02 -1.620200e+02\n7 3146     4.721500e+02 1.985700e+02\n15 3146     8.385500e+02 2.430700e+02\n0 3147     5.986500e+02 -5.030029e+00\n1 3147     8.262200e+02 -1.751000e+02\n6 3147     4.550300e+02 1.280300e+02\n12 3147     5.374500e+02 1.385300e+02\n13 3147     8.212400e+02 -2.046800e+02\n0 3148     6.556200e+02 -1.057200e+02\n1 3148     8.542500e+02 -3.002200e+02\n8 3148     5.773900e+02 -1.178400e+02\n10 3148     6.766500e+02 8.769000e+01\n0 3149     -7.039978e+00 -8.885999e+01\n1 3149     1.294200e+02 -5.567999e+01\n6 3149     -1.688000e+01 -8.859003e+01\n7 3149     -7.947998e+01 2.215997e+01\n10 3149     -9.387000e+01 3.790002e+01\n15 3149     -3.228998e+01 1.612000e+01\n0 3150     6.726300e+02 -2.801400e+02\n1 3150     7.993300e+02 -4.856600e+02\n12 3150     7.278900e+02 -1.108000e+02\n0 3151     -2.014900e+02 -5.202900e+02\n1 3151     -1.768000e+02 -4.041400e+02\n6 3151     -8.214999e+01 -6.928800e+02\n7 3151     -1.990100e+02 -4.536300e+02\n9 3151     2.487000e+01 -4.646000e+02\n0 3152     5.078000e+02 2.850300e+02\n1 3152     8.367800e+02 1.549500e+02\n6 3152     2.272700e+02 4.056400e+02\n7 3152     3.099301e+02 4.301200e+02\n8 3152     3.270800e+02 1.237600e+02\n10 3152     4.725699e+02 5.306100e+02\n12 3152     3.342400e+02 4.020900e+02\n13 3152     6.746700e+02 3.287000e+01\n0 3153     6.113199e+02 7.048999e+01\n1 3153     8.630601e+02 -9.937000e+01\n2 3153     5.341801e+02 5.484998e+01\n3 3153     3.995800e+02 -2.550600e+02\n15 3153     8.148600e+02 3.189400e+02\n0 3154     6.316500e+02 -2.953400e+02\n1 3154     7.448199e+02 -4.849800e+02\n7 3154     5.427900e+02 -8.416998e+01\n12 3154     6.977300e+02 -1.348600e+02\n0 3155     2.987000e+01 -5.041998e+01\n1 3155     1.734900e+02 -2.853003e+01\n3 3155     1.084200e+02 -3.268900e+02\n7 3155     -4.664001e+01 6.822998e+01\n10 3155     -5.394000e+01 8.585999e+01\n15 3155     1.233002e+01 7.260999e+01\n0 3156     4.651200e+02 3.125500e+02\n1 3156     8.009301e+02 1.959600e+02\n10 3156     4.200900e+02 5.590200e+02\n0 3157     2.162200e+02 -1.194000e+01\n1 3157     3.691200e+02 -4.721002e+01\n7 3157     1.311200e+02 1.375600e+02\n10 3157     1.581600e+02 1.496600e+02\n13 3157     5.627900e+02 -2.141400e+02\n15 3157     2.609900e+02 1.505300e+02\n0 3158     5.859003e+01 6.875000e+01\n1 3158     2.383500e+02 7.935001e+01\n6 3158     4.270020e+00 1.134600e+02\n7 3158     -3.859998e+01 1.912500e+02\n10 3158     -3.266998e+01 2.270400e+02\n15 3158     3.529999e+01 2.392400e+02\n0 3159     4.677002e+01 -2.700195e-01\n1 3159     2.044100e+02 1.546002e+01\n7 3159     -3.702002e+01 1.217500e+02\n10 3159     -3.910999e+01 1.455400e+02\n15 3159     2.828003e+01 1.431900e+02\n0 3160     5.155100e+02 -3.091000e+02\n1 3160     6.113900e+02 -4.536000e+02\n0 3161     -2.517999e+01 -1.597300e+02\n1 3161     8.903998e+01 -1.186600e+02\n7 3161     -8.254999e+01 -5.071002e+01\n10 3161     -1.054000e+02 -4.675000e+01\n15 3161     -4.725000e+01 -8.289001e+01\n0 3162     5.139700e+02 2.456300e+02\n1 3162     8.305200e+02 1.116300e+02\n6 3162     2.448900e+02 3.639500e+02\n7 3162     3.215100e+02 3.931900e+02\n8 3162     3.400900e+02 9.401001e+01\n12 3162     3.501899e+02 3.628100e+02\n15 3162     6.617500e+02 5.488300e+02\n0 3163     5.476000e+02 5.669983e+00\n1 3163     7.767200e+02 -1.477700e+02\n7 3163     3.980900e+02 1.739600e+02\n0 3164     6.593101e+02 -1.004200e+02\n1 3164     8.599200e+02 -2.959200e+02\n2 3164     6.362400e+02 -9.729999e+01\n6 3164     5.549200e+02 4.776001e+01\n7 3164     5.227300e+02 9.460999e+01\n10 3164     6.802400e+02 9.459003e+01\n12 3164     6.337600e+02 5.733002e+01\n0 3165     1.131000e+01 -7.510999e+01\n1 3165     1.499399e+02 -4.756000e+01\n2 3165     1.840100e+02 -5.520001e+01\n7 3165     -6.128003e+01 3.982001e+01\n8 3165     1.781800e+02 -9.313000e+01\n9 3165     4.852002e+01 4.578998e+01\n13 3165     3.904500e+02 -2.865100e+02\n15 3165     -9.130005e+00 3.672998e+01\n0 3166     1.030600e+02 -1.125100e+02\n1 3166     2.259301e+02 -1.116400e+02\n2 3166     2.968199e+02 -6.490997e+01\n6 3166     1.203600e+02 -7.309003e+01\n7 3166     3.764001e+01 1.991998e+01\n8 3166     2.709800e+02 -1.030200e+02\n10 3166     3.784003e+01 2.197998e+01\n15 3166     1.198300e+02 -1.320007e+00\n0 3167     1.245900e+02 -7.715002e+01\n1 3167     2.563900e+02 -8.345001e+01\n7 3167     5.371997e+01 5.871002e+01\n8 3167     2.816400e+02 -6.502002e+01\n0 3168     5.528600e+02 1.107001e+01\n1 3168     7.838400e+02 -1.437300e+02\n0 3169     2.149600e+02 5.134800e+02\n1 3169     6.112400e+02 4.689800e+02\n2 3169     -9.957001e+01 2.782500e+02\n9 3169     -2.360700e+02 3.126300e+02\n11 3169     3.409000e+02 -2.435500e+02\n0 3170     2.222998e+01 5.207300e+02\n1 3170     4.054399e+02 5.253900e+02\n4 3170     2.581000e+01 -3.756700e+02\n5 3170     4.276801e+02 -1.271700e+02\n12 3170     -2.830300e+02 5.371000e+02\n13 3170     2.078900e+02 1.889500e+02\n0 3171     2.881300e+02 5.708300e+02\n1 3171     7.098900e+02 5.117600e+02\n9 3171     -1.927600e+02 3.668700e+02\n11 3171     4.008199e+02 -1.901600e+02\n13 3171     4.147600e+02 2.472600e+02\n14 3171     5.877900e+02 -1.505900e+02\n0 3172     2.560601e+02 4.786300e+02\n1 3172     6.470699e+02 4.217500e+02\n2 3172     -6.021997e+01 2.394900e+02\n6 3172     -1.970400e+02 5.466000e+02\n7 3172     2.123999e+01 5.722300e+02\n14 3172     5.634200e+02 -2.471800e+02\n0 3173     4.428600e+02 3.021700e+02\n1 3173     7.749100e+02 1.907800e+02\n6 3173     1.358900e+02 4.044200e+02\n7 3173     2.422800e+02 4.353400e+02\n10 3173     3.945000e+02 5.446600e+02\n12 3173     2.516899e+02 3.996900e+02\n0 3174     6.101500e+02 2.919000e+01\n1 3174     8.490100e+02 -1.428300e+02\n7 3174     4.570300e+02 2.096600e+02\n10 3174     6.125900e+02 2.394900e+02\n13 3174     8.287500e+02 -1.717100e+02\n15 3174     8.178000e+02 2.608500e+02\n0 3175     2.954100e+02 3.606000e+01\n1 3175     4.713700e+02 -2.540997e+01\n7 3175     1.939700e+02 1.924500e+02\n10 3175     2.452400e+02 2.131500e+02\n13 3175     6.132300e+02 -1.705700e+02\n15 3175     3.657200e+02 2.270100e+02\n0 3176     2.121899e+02 1.196002e+01\n1 3176     3.727400e+02 -2.228998e+01\n2 3176     3.523600e+02 8.203998e+01\n4 3176     -2.933800e+02 -5.835500e+02\n7 3176     1.229000e+02 1.602900e+02\n10 3176     1.513700e+02 1.771600e+02\n13 3176     5.555000e+02 -1.938300e+02\n15 3176     2.525400e+02 1.827400e+02\n0 3177     7.378003e+01 -2.275000e+01\n1 3177     2.230800e+02 -1.457001e+01\n2 3177     2.392500e+02 2.520001e+01\n3 3177     1.457700e+02 -2.827200e+02\n7 3177     -5.659973e+00 1.044300e+02\n10 3177     -5.450012e+00 1.221000e+02\n13 3177     4.438500e+02 -2.340200e+02\n15 3177     6.765002e+01 1.163200e+02\n0 3178     1.903101e+02 -8.008002e+01\n1 3178     3.217800e+02 -1.068300e+02\n6 3178     2.003400e+02 -8.250000e+00\n7 3178     1.177400e+02 6.664001e+01\n8 3178     3.329600e+02 -5.867999e+01\n10 3178     1.355300e+02 6.831000e+01\n13 3178     5.499700e+02 -2.751100e+02\n0 3179     3.108600e+02 -1.078200e+02\n1 3179     4.397000e+02 -1.742300e+02\n10 3179     2.766600e+02 4.864001e+01\n12 3179     3.526600e+02 2.773999e+01\n13 3179     6.502300e+02 -2.927700e+02\n15 3179     4.047300e+02 3.209998e+01\n0 3180     -1.610800e+02 -7.560999e+01\n1 3180     -7.280029e+00 8.200073e-01\n7 3180     -2.413000e+02 4.630005e+00\n10 3180     -2.717300e+02 3.604999e+01\n12 3180     -2.066000e+02 -7.716998e+01\n15 3180     -2.404700e+02 1.253003e+01\n0 3181     2.506400e+02 4.744900e+02\n1 3181     6.399301e+02 4.188300e+02\n2 3181     -6.423999e+01 2.346100e+02\n5 3181     6.537800e+02 -1.707500e+02\n6 3181     -2.017400e+02 5.406900e+02\n7 3181     1.681000e+01 5.679200e+02\n11 3181     3.773800e+02 -2.751600e+02\n13 3181     3.891700e+02 1.635800e+02\n14 3181     5.587800e+02 -2.513900e+02\n0 3182     4.895200e+02 2.812700e+02\n1 3182     8.162700e+02 1.564000e+02\n6 3182     2.023300e+02 3.971300e+02\n7 3182     2.921200e+02 4.236000e+02\n8 3182     3.103300e+02 1.152300e+02\n10 3182     4.511000e+02 5.243900e+02\n12 3182     3.117700e+02 3.940700e+02\n13 3182     6.563900e+02 2.796997e+01\n0 3183     -1.026500e+02 3.716100e+02\n1 3183     2.387200e+02 4.062700e+02\n2 3183     -3.799300e+02 1.055800e+02\n5 3183     2.961801e+02 -2.888700e+02\n6 3183     -5.717600e+02 3.296600e+02\n7 3183     -3.116400e+02 4.237500e+02\n10 3183     -2.546100e+02 5.726600e+02\n13 3183     1.086200e+02 5.384998e+01\n14 3183     2.109000e+02 -3.754700e+02\n0 3184     2.255200e+02 1.619000e+01\n1 3184     3.882000e+02 -2.225000e+01\n7 3184     1.344900e+02 1.660500e+02\n10 3184     1.663100e+02 1.830600e+02\n12 3184     2.287700e+02 1.512300e+02\n13 3184     5.652700e+02 -1.897600e+02\n15 3184     2.705800e+02 1.903200e+02\n0 3185     5.725000e+02 -2.271002e+01\n1 3185     7.936500e+02 -1.851800e+02\n7 3185     4.266700e+02 1.516800e+02\n10 3185     5.726000e+02 1.757000e+02\n12 3185     5.107600e+02 1.084500e+02\n13 3185     7.959100e+02 -2.245900e+02\n15 3185     7.716500e+02 1.831300e+02\n0 3186     4.416998e+01 2.081000e+01\n1 3186     2.090300e+02 3.607001e+01\n3 3186     9.628003e+01 -2.530000e+02\n7 3186     -4.372998e+01 1.419400e+02\n10 3186     -4.463000e+01 1.698900e+02\n13 3186     4.104200e+02 -1.997000e+02\n15 3186     2.203003e+01 1.715400e+02\n0 3187     2.144800e+02 -2.142999e+01\n1 3187     3.640800e+02 -5.623999e+01\n2 3187     3.684301e+02 5.026001e+01\n3 3187     2.639301e+02 -2.565300e+02\n6 3187     2.047300e+02 6.281000e+01\n7 3187     1.312700e+02 1.276400e+02\n10 3187     1.573300e+02 1.383200e+02\n13 3187     5.628700e+02 -2.229700e+02\n15 3187     2.596600e+02 1.371700e+02\n0 3188     2.789600e+02 -1.416700e+02\n1 3188     3.946801e+02 -1.968900e+02\n7 3188     2.113900e+02 1.884003e+01\n10 3188     2.435000e+02 7.929993e+00\n0 3189     6.741998e+01 -2.257900e+02\n1 3189     1.520000e+02 -2.100600e+02\n6 3189     1.374100e+02 -2.046500e+02\n12 3189     1.375800e+02 -1.609300e+02\n13 3189     4.694100e+02 -4.115000e+02\n15 3189     8.475000e+01 -1.594500e+02\n0 3190     3.411100e+02 4.628500e+02\n1 3190     7.382500e+02 3.827300e+02\n4 3190     -3.103003e+01 -5.840800e+02\n5 3190     7.475100e+02 -1.800600e+02\n6 3190     -1.041700e+02 5.454100e+02\n7 3190     1.031400e+02 5.651500e+02\n9 3190     -1.371000e+02 2.694400e+02\n12 3190     5.850000e+01 5.134500e+02\n13 3190     4.621200e+02 1.597300e+02\n14 3190     6.498800e+02 -2.586300e+02\n0 3191     1.879600e+02 1.735000e+02\n1 3191     4.136000e+02 1.430900e+02\n7 3191     5.984003e+01 3.052500e+02\n13 3191     4.882100e+02 -6.777002e+01\n14 3191     6.931200e+02 -5.518101e+02\n15 3191     2.027900e+02 4.010400e+02\n0 3192     2.153500e+02 1.632700e+02\n1 3192     4.366500e+02 1.260600e+02\n13 3192     5.160300e+02 -7.287000e+01\n14 3192     7.303199e+02 -5.605300e+02\n15 3192     2.414100e+02 3.910000e+02\n0 3193     3.070000e+02 3.359985e+00\n1 3193     4.730601e+02 -6.165997e+01\n7 3193     2.099000e+02 1.626300e+02\n10 3193     2.605100e+02 1.774200e+02\n15 3193     3.859800e+02 1.838600e+02\n0 3194     7.598999e+01 6.549988e+00\n1 3194     2.343101e+02 1.359003e+01\n2 3194     2.299600e+02 5.403998e+01\n3 3194     1.355100e+02 -2.554400e+02\n7 3194     -8.900024e+00 1.336400e+02\n9 3194     8.073999e+01 1.394500e+02\n13 3194     4.420601e+02 -2.090200e+02\n15 3194     6.660999e+01 1.565900e+02\n0 3195     2.170001e+01 5.349976e+00\n1 3195     1.829800e+02 2.789001e+01\n2 3195     1.683700e+02 3.539001e+01\n3 3195     7.831000e+01 -2.746800e+02\n7 3195     -6.389001e+01 1.224600e+02\n9 3195     3.131000e+01 1.215000e+02\n13 3195     3.920601e+02 -2.148300e+02\n15 3195     -6.260010e+00 1.478300e+02\n0 3196     1.227500e+02 -6.240002e+01\n1 3196     2.590400e+02 -6.833002e+01\n7 3196     5.017999e+01 7.292999e+01\n10 3196     5.575000e+01 8.094000e+01\n13 3196     4.921200e+02 -2.654400e+02\n15 3196     1.394900e+02 6.890997e+01\n0 3197     3.519700e+02 5.393700e+02\n1 3197     7.739200e+02 4.623400e+02\n13 3197     4.674900e+02 2.256400e+02\n14 3197     6.537400e+02 -1.783200e+02\n0 3198     1.444900e+02 5.033300e+02\n1 3198     5.292400e+02 4.770100e+02\n5 3198     5.531500e+02 -1.421700e+02\n6 3198     -3.111300e+02 5.574800e+02\n11 3198     2.756300e+02 -2.556100e+02\n12 3198     -1.470300e+02 5.369500e+02\n13 3198     3.082000e+02 1.819500e+02\n14 3198     4.584000e+02 -2.259200e+02\n0 3199     2.402200e+02 1.280400e+02\n1 3199     4.450601e+02 8.400000e+01\n7 3199     1.238600e+02 2.730800e+02\n10 3199     1.714300e+02 3.151100e+02\n13 3199     5.496400e+02 -9.796997e+01\n15 3199     2.780800e+02 3.459000e+02\n0 3200     5.498900e+02 7.506000e+01\n1 3200     8.008800e+02 -7.548999e+01\n6 3200     3.719700e+02 1.975700e+02\n7 3200     3.909700e+02 2.418200e+02\n10 3200     5.379399e+02 2.864100e+02\n12 3200     4.592500e+02 2.073700e+02\n13 3200     7.608300e+02 -1.393000e+02\n15 3200     7.282400e+02 3.156900e+02\n0 3201     5.518900e+02 1.934003e+01\n1 3201     7.854399e+02 -1.324400e+02\n6 3201     3.892000e+02 1.359900e+02\n12 3201     4.746801e+02 1.480200e+02\n0 3202     4.532900e+02 3.257700e+02\n1 3202     7.931100e+02 2.129500e+02\n6 3202     1.443900e+02 4.357600e+02\n7 3202     2.502100e+02 4.603600e+02\n10 3202     4.057200e+02 5.735700e+02\n13 3202     6.166200e+02 6.137000e+01\n14 3202     8.506899e+02 -3.881800e+02\n0 3203     -7.488000e+01 3.237000e+01\n1 3203     1.071600e+02 7.998999e+01\n3 3203     -6.556000e+01 -3.081300e+02\n7 3203     -1.731500e+02 1.272600e+02\n10 3203     -1.835500e+02 1.706000e+02\n13 3203     2.888400e+02 -2.048700e+02\n15 3203     -1.384200e+02 1.705400e+02\n0 3204     1.469200e+02 -3.771002e+01\n1 3204     2.898199e+02 -5.109998e+01\n10 3204     8.042999e+01 1.127000e+02\n13 3204     5.090100e+02 -2.409000e+02\n15 3204     1.688700e+02 1.061200e+02\n0 3205     -1.131600e+02 4.358300e+02\n1 3205     2.444399e+02 4.740400e+02\n2 3205     -3.936000e+02 1.835700e+02\n3 3205     -5.256700e+02 -1.457700e+02\n4 3205     -1.434003e+01 -2.872200e+02\n5 3205     2.896700e+02 -2.190200e+02\n7 3205     -3.299400e+02 4.895700e+02\n8 3205     -2.440200e+02 1.356100e+02\n11 3205     4.692999e+01 -3.220500e+02\n12 3205     -4.168100e+02 4.152100e+02\n13 3205     1.012400e+02 1.093300e+02\n14 3205     2.033101e+02 -3.060200e+02\n0 3206     4.943700e+02 2.734400e+02\n1 3206     8.188101e+02 1.464800e+02\n6 3206     2.115400e+02 3.880700e+02\n7 3206     2.982300e+02 4.164500e+02\n8 3206     3.164400e+02 1.094600e+02\n10 3206     4.574900e+02 5.154600e+02\n13 3206     6.621200e+02 2.144000e+01\n0 3207     5.255800e+02 1.316200e+02\n1 3207     7.935500e+02 -8.830017e+00\n7 3207     3.590200e+02 2.919100e+02\n10 3207     5.045800e+02 3.494000e+02\n13 3207     7.292000e+02 -9.276001e+01\n15 3207     6.877400e+02 3.908500e+02\n0 3208     1.220000e+02 -1.286300e+02\n1 3208     2.401801e+02 -1.337000e+02\n7 3208     5.954999e+01 6.590027e+00\n13 3208     4.967700e+02 -3.237100e+02\n15 3208     1.477100e+02 -2.090997e+01\n0 3209     -2.346700e+02 -5.170500e+02\n1 3209     -2.051000e+02 -3.900500e+02\n4 3209     -6.308200e+02 -2.004800e+02\n6 3209     -1.240300e+02 -7.053900e+02\n7 3209     -2.331800e+02 -4.570800e+02\n9 3209     -8.669983e+00 -4.746200e+02\n10 3209     -3.083200e+02 -4.818101e+02\n0 3210     1.266200e+02 4.234003e+01\n1 3210     2.957300e+02 3.367999e+01\n7 3210     3.572998e+01 1.779200e+02\n15 3210     1.312300e+02 2.116600e+02\n0 3211     6.043199e+02 5.359003e+01\n1 3211     8.504700e+02 -1.145900e+02\n7 3211     4.476899e+02 2.323500e+02\n10 3211     6.030100e+02 2.678300e+02\n13 3211     8.193101e+02 -1.496400e+02\n15 3211     8.067200e+02 2.945800e+02\n0 3212     1.065500e+02 4.203998e+01\n1 3212     2.754200e+02 3.926001e+01\n2 3212     2.448000e+02 9.465997e+01\n6 3212     7.192999e+01 1.006900e+02\n7 3212     1.540002e+01 1.736300e+02\n12 3212     9.164001e+01 1.527500e+02\n15 3212     1.039200e+02 2.092200e+02\n0 3213     7.804999e+01 -1.167200e+02\n1 3213     2.009000e+02 -1.083300e+02\n3 3213     1.821700e+02 -3.815900e+02\n15 3213     8.627002e+01 -1.062000e+01\n0 3214     8.496002e+01 -7.869000e+01\n1 3214     2.170100e+02 -7.215997e+01\n13 3214     4.588600e+02 -2.816700e+02\n15 3214     8.923999e+01 4.270001e+01\n0 3215     8.475000e+01 -1.221600e+02\n1 3215     2.053900e+02 -1.155500e+02\n3 3215     1.917200e+02 -3.841200e+02\n10 3215     1.766998e+01 8.690002e+00\n13 3215     4.625300e+02 -3.207900e+02\n0 3216     7.012000e+01 -1.642500e+02\n1 3216     1.772600e+02 -1.518400e+02\n2 3216     2.912300e+02 -1.225700e+02\n10 3216     4.809998e+00 -4.171002e+01\n0 3217     5.857000e+02 1.492500e+02\n1 3217     8.611700e+02 -8.090027e+00\n3 3217     3.476400e+02 -1.924000e+02\n12 3217     4.834301e+02 3.048100e+02\n13 3217     7.893800e+02 -6.864001e+01\n15 3217     7.699800e+02 4.250200e+02\n0 3218     2.496700e+02 4.519700e+02\n1 3218     6.326000e+02 3.954500e+02\n5 3218     6.531600e+02 -1.954700e+02\n6 3218     -1.984400e+02 5.117500e+02\n7 3218     1.852002e+01 5.447200e+02\n8 3218     2.871997e+01 1.618900e+02\n9 3218     -2.025200e+02 2.536300e+02\n11 3218     3.785699e+02 -2.953900e+02\n12 3218     -3.302002e+01 4.873800e+02\n13 3218     3.891400e+02 1.442800e+02\n0 3219     -2.308700e+02 4.658000e+02\n1 3219     1.328400e+02 5.317300e+02\n2 3219     -5.116600e+02 2.199700e+02\n7 3219     -4.518100e+02 5.083700e+02\n11 3219     -5.695001e+01 -2.973800e+02\n0 3220     5.558400e+02 1.637600e+02\n1 3220     8.345601e+02 1.623999e+01\n2 3220     4.472600e+02 1.219400e+02\n7 3220     3.852000e+02 3.294200e+02\n10 3220     5.379700e+02 3.919000e+02\n12 3220     4.447200e+02 3.106900e+02\n15 3220     7.262100e+02 4.408800e+02\n0 3221     3.916998e+01 2.421997e+01\n1 3221     2.048900e+02 4.082001e+01\n7 3221     -4.953003e+01 1.437300e+02\n13 3221     4.058500e+02 -1.981600e+02\n0 3222     1.176500e+02 -9.650024e+00\n1 3222     2.696200e+02 -1.473999e+01\n2 3222     2.789800e+02 4.996997e+01\n6 3222     1.052400e+02 4.882001e+01\n7 3222     3.558002e+01 1.251200e+02\n10 3222     4.401001e+01 1.424900e+02\n13 3222     4.804700e+02 -2.187300e+02\n15 3222     1.252100e+02 1.403500e+02\n0 3223     6.590900e+02 -1.093300e+02\n1 3223     8.569500e+02 -3.054100e+02\n2 3223     6.386200e+02 -1.070200e+02\n7 3223     5.237000e+02 8.578000e+01\n8 3223     5.815800e+02 -1.196900e+02\n10 3223     6.809600e+02 8.428003e+01\n0 3224     3.814900e+02 4.780400e+02\n1 3224     7.900800e+02 3.881500e+02\n0 3225     1.020020e+00 -4.991998e+01\n1 3225     1.474000e+02 -2.021002e+01\n3 3225     7.595001e+01 -3.389500e+02\n7 3225     -7.641998e+01 6.284003e+01\n8 3225     1.611900e+02 -7.208002e+01\n13 3225     3.781801e+02 -2.653800e+02\n15 3225     -2.687000e+01 6.954999e+01\n0 3226     7.299805e-01 -9.421997e+01\n1 3226     1.346000e+02 -6.290002e+01\n3 3226     9.290997e+01 -3.866600e+02\n6 3226     -3.090027e+00 -9.091998e+01\n7 3226     -6.915997e+01 1.810999e+01\n8 3226     1.725500e+02 -1.139500e+02\n13 3226     3.821801e+02 -3.046600e+02\n15 3226     -2.092999e+01 9.039978e+00\n0 3227     -1.498700e+02 1.722000e+02\n1 3227     1.260800e+02 2.256300e+02\n0 3228     6.587300e+02 -5.646997e+01\n1 3228     8.735200e+02 -2.496000e+02\n3 3228     4.921000e+02 -3.553800e+02\n6 3228     5.413500e+02 9.692999e+01\n7 3228     5.164200e+02 1.361900e+02\n10 3228     6.762800e+02 1.446700e+02\n0 3229     4.563000e+01 -1.126900e+02\n1 3229     1.707200e+02 -9.398999e+01\n6 3229     5.725000e+01 -9.538000e+01\n7 3229     -1.933002e+01 8.630005e+00\n10 3229     -2.813000e+01 1.526001e+01\n12 3229     6.664001e+01 -4.550000e+01\n13 3229     4.272300e+02 -3.163900e+02\n15 3229     4.207001e+01 -9.530029e+00\n0 3230     1.127400e+02 -5.625100e+02\n1 3230     1.001800e+02 -5.510100e+02\n7 3230     1.243000e+02 -4.274800e+02\n10 3230     9.669000e+01 -4.928700e+02\n0 3231     5.013000e+01 -1.079600e+02\n1 3231     1.764200e+02 -9.101001e+01\n2 3231     2.387700e+02 -7.729999e+01\n3 3231     1.495500e+02 -3.818300e+02\n7 3231     -1.665002e+01 1.429999e+01\n10 3231     -2.459003e+01 2.165002e+01\n13 3231     4.292400e+02 -3.114100e+02\n15 3231     4.703003e+01 -2.309998e+00\n0 3232     1.016500e+02 -5.490900e+02\n1 3232     9.475000e+01 -5.345699e+02\n6 3232     2.694100e+02 -5.852000e+02\n9 3232     3.009600e+02 -3.687900e+02\n10 3232     8.281000e+01 -4.784800e+02\n0 3233     3.657700e+02 4.516800e+02\n1 3233     7.640601e+02 3.641200e+02\n13 3233     4.826200e+02 1.520200e+02\n14 3233     6.755200e+02 -2.687600e+02\n0 3234     3.646200e+02 4.431100e+02\n1 3234     7.591801e+02 3.554400e+02\n2 3234     3.798999e+01 2.036900e+02\n5 3234     7.740300e+02 -2.007400e+02\n6 3234     -7.470001e+01 5.248000e+02\n8 3234     1.119700e+02 1.585500e+02\n14 3234     6.765500e+02 -2.776200e+02\n0 3235     2.707001e+01 9.822000e+01\n1 3235     2.195601e+02 1.164500e+02\n3 3235     3.039001e+01 -2.009100e+02\n5 3235     6.505601e+02 -5.589000e+02\n7 3235     -7.758002e+01 2.136400e+02\n8 3235     1.367200e+02 5.010001e+01\n10 3235     -7.258002e+01 2.582900e+02\n12 3235     -2.834003e+01 1.865800e+02\n13 3235     3.787900e+02 -1.373400e+02\n15 3235     -1.064001e+01 2.747300e+02\n0 3236     2.742300e+02 -1.178400e+02\n1 3236     3.981801e+02 -1.718700e+02\n7 3236     2.022000e+02 4.115997e+01\n12 3236     3.193900e+02 9.000000e+00\n0 3237     2.258400e+02 -2.196500e+02\n1 3237     3.113900e+02 -2.559900e+02\n7 3237     1.779600e+02 -6.353998e+01\n8 3237     4.093400e+02 -1.646200e+02\n10 3237     1.897600e+02 -8.875000e+01\n12 3237     3.109000e+02 -1.101900e+02\n15 3237     3.003000e+02 -1.308600e+02\n0 3238     -9.766998e+01 -1.997998e+01\n1 3238     6.972998e+01 3.596002e+01\n15 3238     -1.624000e+02 9.614001e+01\n0 3239     1.749600e+02 -3.291998e+01\n1 3239     3.200100e+02 -5.540997e+01\n15 3239     2.068199e+02 1.163100e+02\n0 3240     9.900000e+01 -1.771002e+01\n1 3240     2.491801e+02 -1.684998e+01\n2 3240     2.633600e+02 3.728003e+01\n4 3240     -2.979800e+02 -4.924700e+02\n8 3240     2.454900e+02 -1.770001e+01\n10 3240     2.325000e+01 1.307600e+02\n15 3240     1.010900e+02 1.266300e+02\n0 3241     8.547998e+01 -1.307001e+01\n1 3241     2.372200e+02 -8.700012e+00\n2 3241     2.477400e+02 3.826001e+01\n7 3241     4.530029e+00 1.160500e+02\n15 3241     8.251001e+01 1.311700e+02\n0 3242     5.412500e+02 -3.814800e+02\n1 3242     6.093500e+02 -5.359399e+02\n13 3242     8.786600e+02 -5.402200e+02\n0 3243     4.866998e+01 -1.426001e+01\n1 3243     2.022000e+02 1.359985e+00\n2 3243     2.077500e+02 2.537000e+01\n3 3243     1.162400e+02 -2.838000e+02\n7 3243     -3.266998e+01 1.083400e+02\n9 3243     6.463000e+01 1.140900e+02\n10 3243     -3.559003e+01 1.296000e+02\n12 3243     4.191998e+01 7.237000e+01\n15 3243     3.270001e+01 1.247200e+02\n0 3244     3.190997e+01 -2.190002e+01\n1 3244     1.844100e+02 -1.669983e+00\n3 3244     1.026400e+02 -2.973300e+02\n4 3244     -2.921900e+02 -4.379700e+02\n7 3244     -4.831000e+01 9.722000e+01\n10 3244     -5.346002e+01 1.187300e+02\n13 3244     4.055200e+02 -2.374300e+02\n15 3244     1.119000e+01 1.119400e+02\n0 3245     6.551001e+01 -2.728003e+01\n1 3245     2.140000e+02 -1.664001e+01\n2 3245     2.319100e+02 1.815002e+01\n3 3245     1.399000e+02 -2.903300e+02\n4 3245     -2.998600e+02 -4.649500e+02\n6 3245     5.354999e+01 1.165997e+01\n8 3245     2.189500e+02 -3.434000e+01\n9 3245     8.484003e+01 1.086300e+02\n12 3245     6.690997e+01 6.366998e+01\n13 3245     4.368900e+02 -2.390000e+02\n15 3245     5.696997e+01 1.088800e+02\n0 3246     1.615997e+01 -1.585999e+01\n1 3246     1.713900e+02 8.710022e+00\n2 3246     1.705800e+02 1.104999e+01\n0 3247     9.688000e+01 8.909973e+00\n1 3247     2.551500e+02 9.750000e+00\n7 3247     1.206000e+01 1.397600e+02\n13 3247     4.604100e+02 -2.048000e+02\n15 3247     9.498999e+01 1.626300e+02\n0 3248     9.688000e+01 8.909973e+00\n1 3248     2.551500e+02 9.750000e+00\n2 3248     2.503800e+02 6.235999e+01\n7 3248     1.206000e+01 1.397600e+02\n9 3248     9.717999e+01 1.459100e+02\n13 3248     4.604100e+02 -2.048000e+02\n15 3248     9.498999e+01 1.626300e+02\n0 3249     1.288000e+02 -3.289001e+01\n1 3249     2.736200e+02 -4.089001e+01\n2 3249     2.984500e+02 2.890997e+01\n3 3249     2.015000e+02 -2.781400e+02\n4 3249     -3.136200e+02 -5.169500e+02\n7 3249     5.079999e+01 1.038100e+02\n10 3249     5.914001e+01 1.158900e+02\n13 3249     4.934100e+02 -2.381700e+02\n15 3249     1.436600e+02 1.099500e+02\n0 3250     -1.213100e+02 -9.731000e+01\n1 3250     2.207001e+01 -3.082001e+01\n0 3251     1.496000e+02 -6.377002e+01\n1 3251     2.851000e+02 -7.792999e+01\n2 3251     3.288700e+02 -1.400024e+00\n3 3251     2.318400e+02 -3.049300e+02\n4 3251     -3.398100e+02 -5.332200e+02\n6 3251     1.564900e+02 -2.770020e+00\n7 3251     7.640002e+01 7.622998e+01\n8 3251     2.995100e+02 -4.970999e+01\n10 3251     8.620001e+01 8.226001e+01\n13 3251     5.146801e+02 -2.640800e+02\n15 3251     1.762200e+02 7.016998e+01\n0 3252     6.450300e+02 -7.894000e+01\n1 3252     8.518600e+02 -2.684900e+02\n7 3252     5.059301e+02 1.123000e+02\n8 3252     5.607600e+02 -9.884998e+01\n10 3252     6.621700e+02 1.178300e+02\n13 3252     8.801100e+02 -2.656000e+02\n0 3253     5.939600e+02 1.189400e+02\n1 3253     8.603199e+02 -4.310999e+01\n3 3253     3.661700e+02 -2.163100e+02\n6 3253     4.163600e+02 2.671100e+02\n8 3253     4.713400e+02 5.081000e+01\n10 3253     5.867100e+02 3.433900e+02\n12 3253     5.011000e+02 2.771100e+02\n13 3253     8.014800e+02 -9.373999e+01\n15 3253     7.852700e+02 3.842900e+02\n0 3254     1.409998e+01 -1.531000e+01\n1 3254     1.698000e+02 9.929993e+00\n9 3254     3.206000e+01 1.010500e+02\n15 3254     -1.352002e+01 1.188900e+02\n0 3255     6.932001e+01 -8.859998e+01\n1 3255     1.998101e+02 -7.807001e+01\n2 3255     2.566500e+02 -4.750000e+01\n6 3255     7.723999e+01 -5.637000e+01\n13 3255     4.463199e+02 -2.920700e+02\n0 3256     2.859500e+02 -7.299805e-01\n1 3256     4.479600e+02 -5.878998e+01\n6 3256     2.566000e+02 9.970001e+01\n7 3256     1.924200e+02 1.566500e+02\n10 3256     2.377900e+02 1.701000e+02\n12 3256     2.922300e+02 1.411400e+02\n13 3256     6.131700e+02 -2.015400e+02\n15 3256     3.567400e+02 1.753200e+02\n0 3257     1.060500e+02 5.364001e+01\n1 3257     2.786700e+02 5.107001e+01\n3 3257     1.405500e+02 -2.078500e+02\n4 3257     -2.486800e+02 -4.976200e+02\n5 3257     7.630100e+02 -6.076600e+02\n6 3257     6.607001e+01 1.132000e+02\n7 3257     1.253003e+01 1.849400e+02\n12 3257     8.585999e+01 1.653500e+02\n0 3258     1.559700e+02 5.508002e+01\n1 3258     3.289399e+02 3.758002e+01\n4 3258     -2.541500e+02 -5.369399e+02\n6 3258     1.170200e+02 1.292200e+02\n12 3258     1.416900e+02 1.797400e+02\n13 3258     5.028101e+02 -1.619100e+02\n15 3258     1.694301e+02 2.338100e+02\n0 3259     5.276400e+02 1.122500e+02\n1 3259     7.893000e+02 -2.978998e+01\n6 3259     3.339300e+02 2.321200e+02\n7 3259     3.637500e+02 2.738800e+02\n12 3259     4.234800e+02 2.420900e+02\n13 3259     7.336600e+02 -1.091200e+02\n15 3259     6.928000e+02 3.640600e+02\n0 3260     -1.803998e+01 -1.305700e+02\n1 3260     1.039500e+02 -9.222998e+01\n2 3260     1.803100e+02 -1.162300e+02\n7 3260     -7.977002e+01 -2.014001e+01\n8 3260     1.715100e+02 -1.445500e+02\n9 3260     4.897998e+01 -4.260010e+00\n10 3260     -1.005700e+02 -1.204999e+01\n13 3260     3.737100e+02 -3.369800e+02\n15 3260     -4.171002e+01 -4.232001e+01\n0 3261     5.953700e+02 2.073999e+01\n1 3261     8.309900e+02 -1.471800e+02\n6 3261     4.435500e+02 1.571400e+02\n7 3261     4.440500e+02 1.982500e+02\n8 3261     4.934200e+02 -3.250000e+01\n10 3261     5.959301e+02 2.279300e+02\n13 3261     8.148199e+02 -1.814900e+02\n15 3261     7.988700e+02 2.466900e+02\n0 3262     2.096100e+02 3.177002e+01\n1 3262     3.762800e+02 -1.179993e+00\n7 3262     1.165600e+02 1.788000e+02\n10 3262     1.465800e+02 1.991500e+02\n15 3262     2.459800e+02 2.096800e+02\n0 3263     6.183002e+01 -8.526001e+01\n1 3263     1.938500e+02 -7.221002e+01\n2 3263     2.466500e+02 -4.576001e+01\n3 3263     1.567700e+02 -3.515100e+02\n6 3263     6.739001e+01 -5.575000e+01\n7 3263     -7.369995e+00 3.978998e+01\n8 3263     2.293000e+02 -8.704999e+01\n9 3263     9.960999e+01 5.638000e+01\n10 3263     -1.258002e+01 4.882001e+01\n15 3263     6.001001e+01 2.982001e+01\n0 3264     5.802800e+02 -2.303200e+02\n1 3264     7.155300e+02 -3.987700e+02\n6 3264     5.503500e+02 -1.027300e+02\n12 3264     6.152700e+02 -8.709003e+01\n13 3264     8.660000e+02 -4.023300e+02\n0 3265     -1.105600e+02 -5.196600e+02\n1 3265     -9.337000e+01 -4.339000e+02\n4 3265     -6.645800e+02 -2.971600e+02\n6 3265     2.169000e+01 -6.487600e+02\n7 3265     -1.069500e+02 -4.332000e+02\n9 3265     1.065800e+02 -4.265500e+02\n0 3266     1.849399e+02 -8.990002e+01\n1 3266     3.141000e+02 -1.151200e+02\n3 3266     2.668800e+02 -3.271000e+02\n6 3266     1.982600e+02 -2.127002e+01\n7 3266     1.139700e+02 5.567999e+01\n8 3266     3.306700e+02 -6.853998e+01\n10 3266     1.302100e+02 5.621002e+01\n12 3266     2.193199e+02 2.271002e+01\n0 3267     -5.502002e+01 5.017100e+02\n1 3267     3.198600e+02 5.249200e+02\n2 3267     -3.428500e+02 2.623400e+02\n6 3267     -5.415600e+02 5.129900e+02\n7 3267     -2.807600e+02 5.644000e+02\n0 3268     6.640300e+02 -5.582001e+01\n1 3268     8.793199e+02 -2.506800e+02\n2 3268     6.281899e+02 -4.776001e+01\n3 3268     4.971300e+02 -3.515200e+02\n7 3268     5.215500e+02 1.384300e+02\n10 3268     6.825699e+02 1.463200e+02\n0 3269     7.035999e+01 -7.369000e+01\n1 3269     2.050699e+02 -6.362000e+01\n7 3269     -6.799927e-01 5.284998e+01\n10 3269     -4.289978e+00 6.314001e+01\n0 3270     -9.830017e+00 -5.009003e+01\n1 3270     1.379700e+02 -1.740002e+01\n3 3270     6.296002e+01 -3.451000e+02\n6 3270     -3.246002e+01 -4.484003e+01\n7 3270     -8.771997e+01 6.070001e+01\n9 3270     1.896997e+01 5.940002e+01\n10 3270     -9.981000e+01 8.212000e+01\n12 3270     -2.150000e+01 8.940002e+00\n13 3270     3.674800e+02 -2.665600e+02\n15 3270     -4.134003e+01 6.779999e+01\n0 3271     3.582001e+01 -5.765997e+01\n1 3271     1.773300e+02 -3.776001e+01\n2 3271     2.086600e+02 -2.465002e+01\n3 3271     1.197000e+02 -3.314400e+02\n7 3271     -3.852002e+01 6.226001e+01\n8 3271     1.989400e+02 -6.859003e+01\n10 3271     -4.594000e+01 7.769000e+01\n13 3271     4.125300e+02 -2.682200e+02\n15 3271     2.116998e+01 6.378003e+01\n0 3272     5.865699e+02 1.602000e+02\n1 3272     8.655000e+02 2.690002e+00\n9 3272     2.729800e+02 2.106400e+02\n13 3272     7.888700e+02 -5.877002e+01\n15 3272     7.693300e+02 4.410400e+02\n0 3273     2.946002e+01 5.114000e+02\n1 3273     4.106600e+02 5.132900e+02\n2 3273     -2.646500e+02 2.722800e+02\n6 3273     -4.484200e+02 5.423900e+02\n7 3273     -1.995600e+02 5.825400e+02\n11 3273     1.727600e+02 -2.530000e+02\n12 3273     -2.746900e+02 5.260300e+02\n0 3274     2.799000e+02 -2.886300e+02\n1 3274     3.555100e+02 -3.453900e+02\n6 3274     3.412900e+02 -2.245900e+02\n10 3274     2.591801e+02 -1.617000e+02\n12 3274     3.695200e+02 -1.949500e+02\n15 3274     3.865200e+02 -2.175600e+02\n0 3275     -1.136500e+02 4.687000e+01\n1 3275     8.096997e+01 1.034400e+02\n4 3275     -2.306200e+02 -3.165700e+02\n6 3275     -2.374600e+02 1.023999e+01\n7 3275     -2.210900e+02 1.316300e+02\n10 3275     -2.307100e+02 1.842600e+02\n13 3275     2.398300e+02 -1.984200e+02\n15 3275     -1.913500e+02 1.850500e+02\n0 3276     2.334200e+02 8.420999e+01\n1 3276     4.208300e+02 4.221002e+01\n6 3276     1.738800e+02 1.780500e+02\n7 3276     1.279700e+02 2.317700e+02\n10 3276     1.682900e+02 2.634900e+02\n12 3276     2.088900e+02 2.235700e+02\n13 3276     5.569700e+02 -1.328900e+02\n15 3276     2.735100e+02 2.845100e+02\n0 3277     8.854999e+01 4.162000e+01\n1 3277     2.582500e+02 4.378003e+01\n2 3277     2.268000e+02 9.013000e+01\n3 3277     1.312700e+02 -2.217900e+02\n4 3277     -2.542900e+02 -4.838700e+02\n6 3277     5.165997e+01 9.503998e+01\n7 3277     -2.190002e+00 1.701600e+02\n8 3277     2.175100e+02 2.685999e+01\n10 3277     4.590027e+00 1.985700e+02\n12 3277     7.028998e+01 1.478200e+02\n13 3277     4.473300e+02 -1.782400e+02\n15 3277     7.934003e+01 2.062300e+02\n0 3278     -4.976001e+01 -8.676001e+01\n1 3278     8.916998e+01 -4.096002e+01\n6 3278     -6.407001e+01 -1.006700e+02\n7 3278     -1.212400e+02 1.685999e+01\n12 3278     -5.678003e+01 -4.591998e+01\n15 3278     -8.984003e+01 1.270001e+01\n0 3279     2.321100e+02 2.385700e+02\n1 3279     5.329000e+02 1.846400e+02\n6 3279     -9.364999e+01 2.662200e+02\n7 3279     4.648999e+01 3.417700e+02\n10 3279     1.528400e+02 4.460500e+02\n11 3279     3.731600e+02 -4.975100e+02\n13 3279     4.227000e+02 -3.469000e+01\n14 3279     6.071801e+02 -5.042500e+02\n0 3280     1.718199e+02 -2.437700e+02\n1 3280     2.498800e+02 -2.617700e+02\n2 3280     4.272900e+02 -1.729000e+02\n6 3280     2.494000e+02 -1.909800e+02\n7 3280     1.305600e+02 -9.648999e+01\n8 3280     3.756700e+02 -1.954500e+02\n10 3280     1.303500e+02 -1.223500e+02\n12 3280     2.602400e+02 -1.534500e+02\n13 3280     5.615699e+02 -4.207000e+02\n15 3280     2.300800e+02 -1.703800e+02\n0 3281     5.498199e+02 8.523001e+01\n1 3281     8.036899e+02 -6.500000e+01\n6 3281     3.694300e+02 2.096700e+02\n8 3281     4.365900e+02 3.589996e+00\n10 3281     5.371100e+02 2.983600e+02\n12 3281     4.567300e+02 2.200300e+02\n13 3281     7.596100e+02 -1.300900e+02\n15 3281     7.269900e+02 3.297100e+02\n0 3282     -2.704600e+02 5.494000e+01\n1 3282     -3.104999e+01 1.476900e+02\n2 3282     -3.992000e+02 -1.952900e+02\n7 3282     -4.119500e+02 9.100000e+01\n13 3282     2.940997e+01 -2.232900e+02\n15 3282     -3.959700e+02 1.732500e+02\n0 3283     2.255200e+02 1.619000e+01\n1 3283     3.882000e+02 -2.225000e+01\n2 3283     3.599100e+02 8.559998e+01\n7 3283     1.344900e+02 1.660500e+02\n10 3283     1.663100e+02 1.830600e+02\n13 3283     5.652700e+02 -1.897600e+02\n15 3283     2.705800e+02 1.903200e+02\n0 3284     1.184003e+01 -2.085500e+02\n1 3284     1.048700e+02 -1.760100e+02\n6 3284     6.945001e+01 -2.072000e+02\n15 3284     7.559998e+00 -1.439100e+02\n0 3285     5.385999e+01 2.145700e+02\n1 3285     3.415000e+02 2.108900e+02\n6 3285     -2.855200e+02 1.882600e+02\n7 3285     -1.220500e+02 2.941100e+02\n11 3285     2.019300e+02 -5.261400e+02\n14 3285     4.183400e+02 -5.404100e+02\n0 3286     -1.271600e+02 -2.413800e+02\n1 3286     -1.734003e+01 -1.682100e+02\n6 3286     -1.405500e+02 -3.368800e+02\n7 3286     -1.828700e+02 -1.607900e+02\n13 3286     2.590000e+02 -4.575300e+02\n15 3286     -1.699000e+02 -2.069100e+02\n0 3287     -2.932200e+02 6.162000e+01\n1 3287     -5.056000e+01 1.601100e+02\n4 3287     -2.110600e+02 -1.678600e+02\n0 3288     2.121899e+02 1.196002e+01\n1 3288     3.727400e+02 -2.228998e+01\n7 3288     1.229000e+02 1.602900e+02\n15 3288     2.525400e+02 1.827400e+02\n0 3289     6.389900e+02 -2.795700e+02\n1 3289     7.602200e+02 -4.716700e+02\n10 3289     6.721300e+02 -1.143000e+02\n12 3289     6.967200e+02 -1.185300e+02\n0 3290     6.459100e+02 -1.019300e+02\n1 3290     8.448800e+02 -2.927300e+02\n7 3290     5.103700e+02 9.047000e+01\n0 3291     -2.188600e+02 -5.248400e+02\n1 3291     -1.939500e+02 -4.023900e+02\n7 3291     -2.152500e+02 -4.609700e+02\n10 3291     -2.889200e+02 -4.888700e+02\n0 3292     8.465002e+01 3.567999e+01\n1 3292     2.519700e+02 3.952002e+01\n2 3292     2.258300e+02 8.387000e+01\n7 3292     -5.570007e+00 1.639000e+02\n13 3292     4.450800e+02 -1.835500e+02\n15 3292     7.478998e+01 1.969400e+02\n0 3293     4.895699e+02 2.866900e+02\n1 3293     8.182100e+02 1.617700e+02\n6 3293     2.016500e+02 4.028400e+02\n7 3293     2.914399e+02 4.287300e+02\n8 3293     3.094600e+02 1.196600e+02\n11 3293     6.165400e+02 -4.394900e+02\n12 3293     3.111600e+02 3.994000e+02\n13 3293     6.560000e+02 3.228003e+01\n0 3294     -1.673000e+02 -5.324800e+02\n1 3294     -1.497600e+02 -4.265200e+02\n6 3294     -3.415002e+01 -6.888400e+02\n7 3294     -1.614200e+02 -4.577000e+02\n9 3294     6.583002e+01 -4.576200e+02\n0 3295     5.986500e+02 -5.030029e+00\n1 3295     8.262200e+02 -1.751000e+02\n6 3295     4.550300e+02 1.280300e+02\n7 3295     4.503600e+02 1.741200e+02\n10 3295     6.016000e+02 1.989500e+02\n12 3295     5.374500e+02 1.385300e+02\n13 3295     8.212400e+02 -2.046800e+02\n0 3296     -1.994100e+02 -5.257900e+02\n1 3296     -1.767400e+02 -4.097100e+02\n4 3296     -6.466700e+02 -2.274600e+02\n6 3296     -7.602002e+01 -6.969500e+02\n7 3296     -1.952500e+02 -4.577600e+02\n9 3296     3.058002e+01 -4.658800e+02\n0 3297     5.468101e+02 9.845001e+01\n1 3297     8.044800e+02 -4.959998e+01\n6 3297     3.619000e+02 2.241700e+02\n7 3297     3.845500e+02 2.642700e+02\n8 3297     4.313101e+02 1.417001e+01\n10 3297     5.334600e+02 3.123300e+02\n12 3297     4.491200e+02 2.344700e+02\n13 3297     7.549100e+02 -1.182900e+02\n15 3297     7.211600e+02 3.483100e+02\n0 3298     -1.907900e+02 -5.160200e+02\n1 3298     -1.654200e+02 -4.037300e+02\n4 3298     -6.410600e+02 -2.343300e+02\n6 3298     -7.210999e+01 -6.820400e+02\n7 3298     -1.893900e+02 -4.474800e+02\n9 3298     3.201001e+01 -4.557000e+02\n0 3299     -1.973400e+02 -5.125500e+02\n1 3299     -1.699700e+02 -3.982100e+02\n6 3299     -8.235999e+01 -6.824600e+02\n0 3300     -1.065100e+02 -2.186300e+02\n1 3300     3.369995e+00 -1.522900e+02\n8 3300     8.745001e+01 -2.744600e+02\n9 3300     -2.891998e+01 -1.469600e+02\n15 3300     -1.464200e+02 -1.732600e+02\n0 3301     -8.239990e+00 -1.050400e+02\n1 3301     1.213800e+02 -7.059998e+01\n4 3301     -3.454200e+02 -4.034800e+02\n6 3301     -5.809998e+00 -1.044100e+02\n7 3301     -7.540002e+01 6.770020e+00\n10 3301     -9.138000e+01 1.816998e+01\n12 3301     1.299988e+00 -5.250000e+01\n0 3302     6.183002e+01 -2.230500e+02\n1 3302     1.475601e+02 -2.054700e+02\n2 3302     3.183600e+02 -1.739400e+02\n4 3302     -4.473000e+02 -4.634700e+02\n6 3302     1.317200e+02 -2.037800e+02\n7 3302     2.071002e+01 -9.504999e+01\n8 3302     2.818500e+02 -1.962000e+02\n9 3302     1.666600e+02 -4.544000e+01\n12 3302     1.322100e+02 -1.599000e+02\n13 3302     4.646500e+02 -4.100300e+02\n15 3302     7.751001e+01 -1.566400e+02\n0 3303     -5.026001e+01 -1.713500e+02\n1 3303     6.073999e+01 -1.219500e+02\n4 3303     -3.874900e+02 -3.704300e+02\n6 3303     -2.415997e+01 -1.932500e+02\n12 3303     -2.623999e+01 -1.410000e+02\n0 3304     6.351200e+02 -7.915002e+01\n1 3304     8.410900e+02 -2.652400e+02\n3 3304     4.752300e+02 -3.933800e+02\n7 3304     4.964100e+02 1.098900e+02\n8 3304     5.525100e+02 -1.035000e+02\n10 3304     6.505500e+02 1.169100e+02\n15 3304     8.657400e+02 1.141200e+02\n0 3305     3.509998e+01 -2.861100e+02\n1 3305     1.117100e+02 -2.598200e+02\n6 3305     9.928003e+01 -3.029399e+02\n7 3305     -1.469971e+00 -1.685000e+02\n9 3305     1.422800e+02 -1.434100e+02\n15 3305     5.228998e+01 -2.454000e+02\n0 3306     3.870300e+02 -8.845001e+01\n1 3306     5.329900e+02 -1.820000e+02\n0 3307     3.309998e+00 2.016998e+01\n1 3307     1.709399e+02 4.745001e+01\n2 3307     1.388200e+02 4.079999e+01\n6 3307     -4.178998e+01 4.040997e+01\n10 3307     -9.215997e+01 1.643300e+02\n12 3307     -2.637000e+01 9.532001e+01\n13 3307     3.718101e+02 -2.047300e+02\n15 3307     -3.303003e+01 1.647800e+02\n0 3308     2.905699e+02 -1.094600e+02\n1 3308     4.184500e+02 -1.694000e+02\n7 3308     2.157600e+02 5.150000e+01\n10 3308     2.536200e+02 4.466998e+01\n12 3308     3.323000e+02 2.146002e+01\n13 3308     6.336400e+02 -2.957200e+02\n0 3309     6.116400e+02 -5.423999e+01\n1 3309     8.241899e+02 -2.311400e+02\n2 3309     5.689600e+02 -7.614001e+01\n7 3309     4.696400e+02 1.291600e+02\n8 3309     5.243300e+02 -9.144000e+01\n10 3309     6.205800e+02 1.432100e+02\n13 3309     8.407800e+02 -2.476900e+02\n15 3309     8.301000e+02 1.450900e+02\n0 3310     9.891998e+01 -2.142000e+02\n1 3310     1.874100e+02 -2.092100e+02\n4 3310     -4.471300e+02 -4.922600e+02\n7 3310     5.396002e+01 -8.046002e+01\n10 3310     4.306000e+01 -9.634998e+01\n12 3310     1.680300e+02 -1.404900e+02\n13 3310     4.920200e+02 -3.994200e+02\n15 3310     1.267600e+02 -1.398300e+02\n0 3311     5.015601e+02 3.294500e+02\n1 3311     8.445800e+02 2.044200e+02\n2 3311     3.008000e+02 2.178600e+02\n10 3311     4.633900e+02 5.832700e+02\n0 3312     6.586200e+02 -9.719000e+01\n1 3312     8.603101e+02 -2.924600e+02\n2 3312     6.341500e+02 -9.471002e+01\n6 3312     5.532000e+02 5.046002e+01\n7 3312     5.217000e+02 9.745001e+01\n8 3312     5.782500e+02 -1.094700e+02\n10 3312     6.792800e+02 9.821997e+01\n12 3312     6.318101e+02 6.014001e+01\n0 3313     6.495500e+02 -8.421997e+01\n1 3313     8.547000e+02 -2.754600e+02\n2 3313     6.204000e+02 -8.679999e+01\n3 3313     4.920900e+02 -3.898500e+02\n7 3313     5.109500e+02 1.080200e+02\n8 3313     5.668800e+02 -1.019800e+02\n0 3314     8.434003e+01 4.352002e+01\n1 3314     2.542200e+02 4.753003e+01\n6 3314     4.720001e+01 9.577002e+01\n7 3314     -7.609985e+00 1.715000e+02\n8 3314     2.138400e+02 2.737000e+01\n10 3314     -3.099976e-01 2.003200e+02\n12 3314     6.579999e+01 1.485100e+02\n15 3314     7.333002e+01 2.080600e+02\n0 3315     1.115800e+02 7.295001e+01\n1 3315     2.910900e+02 6.820001e+01\n2 3315     2.337300e+02 1.206600e+02\n4 3315     -2.361700e+02 -5.007400e+02\n5 3315     7.627800e+02 -5.858400e+02\n6 3315     6.221002e+01 1.347600e+02\n9 3315     8.070001e+01 1.944800e+02\n10 3315     2.828998e+01 2.373400e+02\n12 3315     8.485999e+01 1.868800e+02\n13 3315     4.610800e+02 -1.510100e+02\n15 3315     1.068200e+02 2.517100e+02\n0 3316     1.553400e+02 4.934998e+01\n1 3316     3.265601e+02 3.207001e+01\n2 3316     2.884399e+02 1.101500e+02\n3 3316     1.866400e+02 -2.018400e+02\n4 3316     -2.581900e+02 -5.371000e+02\n6 3316     1.198000e+02 1.231500e+02\n7 3316     6.184003e+01 1.882600e+02\n10 3316     8.131000e+01 2.140000e+02\n12 3316     1.434200e+02 1.730000e+02\n13 3316     5.032500e+02 -1.665500e+02\n15 3316     1.696600e+02 2.257700e+02\n0 3317     -5.742999e+01 6.390015e+00\n1 3317     1.135800e+02 5.046997e+01\n2 3317     6.010999e+01 -5.809998e+00\n6 3317     -1.222800e+02 -2.219971e+00\n7 3317     -1.487900e+02 1.065800e+02\n12 3317     -1.040400e+02 5.381000e+01\n13 3317     3.118101e+02 -2.235100e+02\n15 3317     -1.120300e+02 1.378500e+02\n0 3318     -1.164100e+02 9.330017e+00\n1 3318     6.342999e+01 6.879999e+01\n2 3318     -2.820001e+01 -3.988000e+01\n6 3318     -2.115100e+02 -2.819000e+01\n7 3318     -2.139100e+02 9.587000e+01\n8 3318     1.034003e+01 -7.373999e+01\n0 3319     1.523300e+02 -1.385200e+02\n1 3319     2.654301e+02 -1.524900e+02\n2 3319     3.583700e+02 -7.869000e+01\n3 3319     2.631899e+02 -3.789600e+02\n4 3319     -3.981100e+02 -5.346500e+02\n7 3319     9.104999e+01 2.820007e+00\n9 3319     1.928300e+02 3.383002e+01\n10 3319     9.723999e+01 -3.549988e+00\n13 3319     5.254600e+02 -3.292900e+02\n15 3319     1.898900e+02 -3.032001e+01\n0 3320     -6.419983e+00 4.749300e+02\n1 3320     3.643000e+02 4.853200e+02\n2 3320     -2.953700e+02 2.311900e+02\n3 3320     -4.266800e+02 -1.003000e+02\n5 3320     3.972100e+02 -1.762300e+02\n7 3320     -2.299000e+02 5.414700e+02\n0 3321     5.052300e+02 2.937700e+02\n1 3321     8.369900e+02 1.653100e+02\n6 3321     2.204800e+02 4.169100e+02\n7 3321     3.064700e+02 4.384700e+02\n8 3321     3.230700e+02 1.306400e+02\n12 3321     3.279500e+02 4.132400e+02\n13 3321     6.715100e+02 4.033002e+01\n0 3322     4.852700e+02 3.173600e+02\n1 3322     8.236100e+02 1.957000e+02\n2 3322     2.836200e+02 1.989100e+02\n6 3322     1.879900e+02 4.377200e+02\n7 3322     2.828000e+02 4.581800e+02\n10 3322     4.436200e+02 5.670900e+02\n12 3322     2.986600e+02 4.323300e+02\n0 3323     5.601801e+02 8.995999e+01\n1 3323     8.162200e+02 -6.388000e+01\n7 3323     4.002100e+02 2.576100e+02\n8 3323     4.471100e+02 1.135001e+01\n10 3323     5.490601e+02 3.051000e+02\n12 3323     4.681600e+02 2.285800e+02\n13 3323     7.696100e+02 -1.246000e+02\n15 3323     7.415000e+02 3.375200e+02\n0 3324     6.383800e+02 -2.328003e+01\n1 3324     8.622300e+02 -2.073400e+02\n2 3324     5.901600e+02 -2.759998e+01\n6 3324     5.086200e+02 1.255500e+02\n7 3324     4.915400e+02 1.648600e+02\n8 3324     5.429399e+02 -5.270999e+01\n10 3324     6.495300e+02 1.810800e+02\n12 3324     5.888500e+02 1.355700e+02\n13 3324     8.650900e+02 -2.149300e+02\n15 3324     8.633900e+02 1.919600e+02\n0 3325     -1.863600e+02 -5.011600e+02\n1 3325     -1.559100e+02 -3.915700e+02\n6 3325     -7.758002e+01 -6.642700e+02\n7 3325     -1.882600e+02 -4.310500e+02\n9 3325     2.464001e+01 -4.439000e+02\n0 3326     -4.899700e+02 1.481400e+02\n1 3326     -1.997400e+02 2.915100e+02\n7 3326     -6.661700e+02 1.445500e+02\n0 3327     2.262100e+02 -3.730700e+02\n1 3327     2.795000e+02 -4.096000e+02\n0 3328     1.618300e+02 6.766998e+01\n1 3328     3.392800e+02 4.795001e+01\n0 3329     1.406500e+02 6.794000e+01\n1 3329     3.183700e+02 5.459998e+01\n3 3329     1.623600e+02 -1.899500e+02\n4 3329     -2.423500e+02 -5.241000e+02\n7 3329     4.346002e+01 2.041400e+02\n8 3329     2.504400e+02 5.475000e+01\n9 3329     1.051400e+02 1.971300e+02\n10 3329     6.272998e+01 2.344900e+02\n0 3330     9.077002e+01 -2.020001e+01\n1 3330     2.400200e+02 -1.690002e+01\n2 3330     2.564800e+02 3.237000e+01\n3 3330     1.628400e+02 -2.764700e+02\n4 3330     -2.991700e+02 -4.861400e+02\n7 3330     1.104999e+01 1.096900e+02\n9 3330     1.032300e+02 1.215400e+02\n10 3330     1.496002e+01 1.262000e+02\n13 3330     4.593800e+02 -2.308100e+02\n15 3330     8.991998e+01 1.222400e+02\n0 3331     1.763400e+02 1.340002e+01\n1 3331     3.354800e+02 -9.580017e+00\n4 3331     -2.872200e+02 -5.550100e+02\n7 3331     8.876001e+01 1.562000e+02\n10 3331     1.093500e+02 1.747200e+02\n13 3331     5.271200e+02 -1.951700e+02\n15 3331     2.028300e+02 1.795800e+02\n0 3332     1.426899e+02 -2.359985e+00\n1 3332     2.967600e+02 -1.415997e+01\n7 3332     5.866998e+01 1.373300e+02\n10 3332     7.204999e+01 1.540200e+02\n15 3332     1.578900e+02 1.545200e+02\n0 3333     1.470200e+02 5.727002e+01\n1 3333     3.203300e+02 4.257001e+01\n7 3333     5.219000e+01 1.937800e+02\n13 3333     4.948300e+02 -1.603900e+02\n15 3333     1.571200e+02 2.353500e+02\n0 3334     -4.183100e+02 3.546300e+02\n1 3334     -7.635999e+01 4.684200e+02\n7 3334     -6.288600e+02 3.689200e+02\n15 3334     -6.458200e+02 5.678800e+02\n0 3335     -5.005100e+02 3.237300e+02\n1 3335     -1.615500e+02 4.586100e+02\n10 3335     -7.320300e+02 4.792400e+02\n15 3335     -7.561000e+02 5.140500e+02\n0 3336     -3.105400e+02 3.763300e+02\n1 3336     3.300000e+01 4.634700e+02\n7 3336     -5.205800e+02 4.047900e+02\n0 3337     -4.687200e+02 3.241800e+02\n1 3337     -1.293900e+02 4.513000e+02\n7 3337     -6.799300e+02 3.286000e+02\n10 3337     -6.923500e+02 4.825000e+02\n11 3337     -2.719700e+02 -4.197300e+02\n12 3337     -8.170800e+02 2.152700e+02\n15 3337     -7.109000e+02 5.185400e+02\n0 3338     -1.432500e+02 3.274600e+02\n1 3338     1.877700e+02 3.729500e+02\n2 3338     -4.164600e+02 4.913000e+01\n7 3338     -3.452600e+02 3.734700e+02\n8 3338     -2.626800e+02 3.026001e+01\n11 3338     2.138000e+01 -4.202000e+02\n13 3338     7.675000e+01 1.338000e+01\n14 3338     1.698800e+02 -4.248900e+02\n0 3339     9.453998e+01 5.453998e+01\n1 3339     2.684200e+02 5.481000e+01\n3 3339     1.301900e+02 -2.104900e+02\n4 3339     -2.463800e+02 -4.877400e+02\n7 3339     1.750000e+00 1.836100e+02\n8 3339     2.159400e+02 3.707999e+01\n9 3339     7.608002e+01 1.787900e+02\n10 3339     1.031000e+01 2.142000e+02\n12 3339     7.040997e+01 1.630400e+02\n15 3339     8.601001e+01 2.246100e+02\n0 3340     -8.149900e+02 1.065997e+01\n1 3340     -5.254200e+02 2.465900e+02\n0 3341     -5.508800e+02 1.377002e+01\n1 3341     -3.000800e+02 1.837900e+02\n10 3341     -7.486900e+02 9.921997e+01\n13 3341     -2.173000e+02 -2.761600e+02\n0 3342     -4.271500e+02 4.084003e+01\n1 3342     -1.803400e+02 1.763600e+02\n0 3343     -4.697300e+02 1.127300e+02\n1 3343     -1.936500e+02 2.538700e+02\n0 3344     -4.274800e+02 4.346997e+01\n1 3344     -1.796800e+02 1.789500e+02\n15 3344     -6.103900e+02 1.362300e+02\n0 3345     -2.563000e+02 2.051700e+02\n1 3345     3.615997e+01 2.851200e+02\n5 3345     1.558700e+02 -4.701000e+02\n0 3346     -2.116700e+02 2.175300e+02\n1 3346     8.319000e+01 2.853800e+02\n10 3346     -3.654600e+02 3.765800e+02\n0 3347     -6.019100e+02 1.828003e+01\n1 3347     -3.432600e+02 2.009000e+02\n0 3348     -5.949400e+02 1.906000e+01\n1 3348     -3.370200e+02 2.000700e+02\n0 3349     -4.821700e+02 1.736900e+02\n1 3349     -1.841800e+02 3.130800e+02\n7 3349     -6.656500e+02 1.710400e+02\n10 3349     -6.866500e+02 2.980300e+02\n0 3350     -6.058200e+02 4.190997e+01\n1 3350     -3.390500e+02 2.235800e+02\n7 3350     -7.669100e+02 1.946002e+01\n0 3351     -4.937100e+02 1.654700e+02\n1 3351     -1.971400e+02 3.082200e+02\n7 3351     -6.753500e+02 1.613700e+02\n0 3352     -6.019400e+02 3.235999e+01\n1 3352     -3.378600e+02 2.141400e+02\n7 3352     -7.602000e+02 1.039001e+01\n0 3353     5.007100e+02 4.392700e+02\n1 3353     8.801500e+02 3.228500e+02\n2 3353     2.721200e+02 3.247300e+02\n3 3353     1.303400e+02 -4.760010e+00\n6 3353     1.769500e+02 5.818500e+02\n0 3354     -1.145900e+02 2.421000e+02\n1 3354     1.860699e+02 2.828400e+02\n0 3355     -9.198999e+01 2.387200e+02\n1 3355     2.062000e+02 2.738600e+02\n7 3355     -2.735800e+02 2.951600e+02\n10 3355     -2.258300e+02 4.140500e+02\n0 3356     -4.461400e+02 1.384003e+01\n1 3356     -2.073500e+02 1.567600e+02\n15 3356     -6.320100e+02 9.387000e+01\n0 3357     -1.480300e+02 2.824500e+02\n1 3357     1.679100e+02 3.305800e+02\n7 3357     -3.409200e+02 3.289000e+02\n11 3357     1.610999e+01 -4.623000e+02\n0 3358     -4.540100e+02 1.309400e+02\n1 3358     -1.730800e+02 2.664600e+02\n0 3359     -4.163300e+02 3.539900e+02\n1 3359     -7.482001e+01 4.675900e+02\n7 3359     -6.270700e+02 3.683700e+02\n15 3359     -6.435400e+02 5.672800e+02\n0 3360     -3.294700e+02 2.219200e+02\n1 3360     -2.698999e+01 3.196200e+02\n7 3360     -5.153500e+02 2.425300e+02\n13 3360     -6.596997e+01 -8.633002e+01\n14 3360     -1.312000e+01 -5.440000e+02\n0 3361     -8.021800e+02 5.010999e+01\n1 3361     -5.029200e+02 2.782200e+02\n0 3362     -8.710400e+02 -3.271997e+01\n1 3362     -5.846400e+02 2.220000e+02\n0 3363     -8.249400e+02 1.634003e+01\n1 3363     -5.320800e+02 2.535100e+02\n0 3364     -2.402700e+02 2.019000e+02\n1 3364     4.991998e+01 2.775400e+02\n7 3364     -4.160400e+02 2.381700e+02\n0 3365     1.917700e+02 1.198999e+01\n1 3365     3.513000e+02 -1.592999e+01\n7 3365     1.040000e+02 1.568700e+02\n10 3365     1.278300e+02 1.739600e+02\n15 3365     2.242200e+02 1.797900e+02\n0 3366     2.126899e+02 5.544900e+02\n1 3366     6.195699e+02 5.126600e+02\n0 3367     -4.565400e+02 3.694200e+02\n1 3367     -1.103900e+02 4.921300e+02\n10 3367     -6.838600e+02 5.391100e+02\n0 3368     -3.846300e+02 3.441800e+02\n1 3368     -4.656000e+01 4.505800e+02\n11 3368     -1.966900e+02 -4.031800e+02\n12 3368     -7.132800e+02 2.597600e+02\n15 3368     -5.966000e+02 5.578500e+02\n0 3369     5.249100e+02 -2.786700e+02\n1 3369     6.337900e+02 -4.270700e+02\n2 3369     6.424399e+02 -2.489600e+02\n0 3370     1.959200e+02 4.928700e+02\n1 3370     5.857600e+02 4.526800e+02\n11 3370     3.245800e+02 -2.623500e+02\n0 3371     -4.946200e+02 1.579800e+02\n1 3371     -2.003500e+02 3.019500e+02\n7 3371     -6.747400e+02 1.557200e+02\n0 3372     -5.516200e+02 1.956000e+01\n1 3372     -2.988600e+02 1.894000e+02\n0 3373     -4.628500e+02 1.231400e+02\n1 3373     -1.840600e+02 2.615900e+02\n0 3374     1.818000e+02 4.979600e+02\n1 3374     5.699600e+02 4.616100e+02\n11 3374     3.118400e+02 -2.586600e+02\n0 3375     1.527500e+02 4.929600e+02\n1 3375     5.367300e+02 4.638700e+02\n11 3375     2.850699e+02 -2.639800e+02\n0 3376     -2.563400e+02 -5.492200e+02\n1 3376     -2.358700e+02 -4.119700e+02\n4 3376     -6.542200e+02 -1.838500e+02\n0 3377     5.476001e+01 2.263600e+02\n1 3377     3.472300e+02 2.222100e+02\n6 3377     -2.926700e+02 2.013200e+02\n0 3378     -2.256400e+02 5.112800e+02\n1 3378     1.486700e+02 5.755300e+02\n0 3379     3.039001e+01 1.241000e+02\n1 3379     2.321500e+02 1.406700e+02\n0 3380     -1.070001e+01 1.477500e+02\n1 3380     2.050400e+02 1.743000e+02\n10 3380     -1.212600e+02 3.127100e+02\n0 3381     -3.582400e+02 -5.343199e+02\n1 3381     -3.211200e+02 -3.656400e+02\n0 3382     2.576700e+02 3.519400e+02\n1 3382     6.050500e+02 2.911900e+02\n0 3383     2.177100e+02 3.439300e+02\n1 3383     5.597200e+02 2.935900e+02\n14 3383     5.525699e+02 -3.916500e+02\n0 3384     3.025300e+02 1.977500e+02\n1 3384     5.910100e+02 1.230500e+02\n0 3385     2.027700e+02 1.641500e+02\n1 3385     4.249301e+02 1.300100e+02\n10 3385     1.255700e+02 3.537800e+02\n0 3386     2.378500e+02 1.381100e+02\n1 3386     4.473199e+02 9.479001e+01\n0 3387     -5.623999e+01 9.982001e+01\n1 3387     1.463800e+02 1.398900e+02\n0 3388     3.006899e+02 -9.897998e+01\n1 3388     4.331500e+02 -1.623700e+02\n0 3389     2.071600e+02 -2.177100e+02\n1 3389     2.932400e+02 -2.476200e+02\n0 3390     2.475200e+02 -2.791600e+02\n1 3390     3.213199e+02 -3.234400e+02\n15 3390     3.400900e+02 -2.086500e+02\n0 3391     5.434399e+02 -2.755200e+02\n1 3391     6.556899e+02 -4.307200e+02\n0 3392     5.378700e+02 -2.999600e+02\n1 3392     6.387000e+02 -4.531801e+02\n0 3393     1.577400e+02 -4.230700e+02\n1 3393     1.925400e+02 -4.341700e+02\n0 3394     2.586200e+02 1.402400e+02\n1 3394     4.715400e+02 9.063000e+01\n10 3394     1.928500e+02 3.311900e+02\n0 3395     5.376000e+02 -2.790900e+02\n1 3395     6.479700e+02 -4.318700e+02\n12 3395     5.958000e+02 -1.450300e+02\n0 3396     5.262500e+02 -3.299800e+02\n1 3396     6.141700e+02 -4.786801e+02\n7 3396     4.547800e+02 -1.338700e+02\n0 3397     -2.010000e+02 -5.155000e+02\n1 3397     -1.745100e+02 -3.996100e+02\n0 3398     6.282000e+02 -3.921600e+02\n1 3398     7.004700e+02 -5.816000e+02\n0 3399     4.147900e+02 -4.719600e+02\n1 3399     4.373300e+02 -5.762800e+02\n0 3400     4.147900e+02 -4.719600e+02\n1 3400     4.373300e+02 -5.762800e+02\n0 3401     -6.163000e+01 2.863900e+02\n1 3401     2.538300e+02 3.115300e+02\n15 3401     -1.392600e+02 5.200000e+02\n0 3402     2.554500e+02 2.663400e+02\n1 3402     5.685699e+02 2.058800e+02\n0 3403     1.575000e+01 1.381400e+02\n1 3403     2.240500e+02 1.581300e+02\n0 3404     -3.723700e+02 -2.400024e+00\n1 3404     -1.455100e+02 1.219900e+02\n7 3404     -5.053800e+02 1.701001e+01\n0 3405     1.020700e+02 -1.367800e+02\n1 3405     2.167700e+02 -1.349300e+02\n0 3406     3.441000e+02 -1.496600e+02\n1 3406     4.619900e+02 -2.268300e+02\n0 3407     4.451100e+02 3.320800e+02\n1 3407     7.865500e+02 2.218900e+02\n6 3407     1.299400e+02 4.410600e+02\n7 3407     2.401600e+02 4.654700e+02\n11 3407     5.671700e+02 -3.970800e+02\n12 3407     2.459301e+02 4.345600e+02\n0 3408     2.461000e+02 1.341500e+02\n1 3408     4.542000e+02 8.807001e+01\n0 3409     -8.107001e+01 -5.223800e+02\n1 3409     -6.703998e+01 -4.464100e+02\n0 3410     3.620300e+02 3.944600e+02\n1 3410     7.359399e+02 3.056500e+02\n0 3411     3.828400e+02 3.734500e+02\n1 3411     7.503000e+02 2.782800e+02\n0 3412     2.842700e+02 -7.735999e+01\n1 3412     4.242800e+02 -1.336200e+02\n0 3413     9.996002e+01 -3.462400e+02\n1 3413     1.592500e+02 -3.398200e+02\n7 3413     6.876001e+01 -2.178000e+02\n15 3413     1.491400e+02 -3.184700e+02\n0 3414     4.148400e+02 -3.094000e+01\n1 3414     5.874000e+02 -1.337600e+02\n0 3415     -1.471100e+02 1.803800e+02\n1 3415     1.312400e+02 2.327400e+02\n0 3416     -1.397400e+02 -5.341801e+02\n1 3416     -1.257900e+02 -4.372000e+02\n0 3417     2.404600e+02 -1.434200e+02\n1 3417     3.528000e+02 -1.862700e+02\n7 3417     1.769301e+02 1.221002e+01\n0 3418     6.084800e+02 -3.943200e+02\n1 3418     6.773800e+02 -5.756200e+02\n10 3418     6.472500e+02 -2.484300e+02\n15 3418     8.609301e+02 -3.227300e+02\n0 3419     -2.782200e+02 3.416300e+02\n1 3419     5.640002e+01 4.215000e+02\n7 3419     -4.827500e+02 3.722100e+02\n0 3420     -8.280029e+00 1.438900e+02\n1 3420     2.052900e+02 1.701600e+02\n7 3420     -1.265600e+02 2.492900e+02\n10 3420     -1.181800e+02 3.086500e+02\n15 3420     -6.317999e+01 3.329300e+02\n0 3421     9.790997e+01 -2.331100e+02\n1 3421     1.786700e+02 -2.266500e+02\n10 3421     4.440002e+01 -1.181300e+02\n15 3421     1.275300e+02 -1.656200e+02\n0 3422     2.031400e+02 -3.448200e+02\n1 3422     2.613900e+02 -3.739500e+02\n7 3422     1.676300e+02 -1.975700e+02\n13 3422     5.818800e+02 -5.221801e+02\n15 3422     2.895200e+02 -3.030600e+02\n0 3423     1.741300e+02 1.909600e+02\n1 3423     4.051200e+02 1.646500e+02\n7 3423     4.259003e+01 3.207700e+02\n15 3423     1.817800e+02 4.232300e+02\n0 3424     2.206000e+02 -4.219600e+02\n1 3424     2.549900e+02 -4.552800e+02\n0 3425     2.244600e+02 -2.435800e+02\n1 3425     3.025100e+02 -2.790200e+02\n15 3425     3.017700e+02 -1.634600e+02\n0 3426     2.514000e+02 -2.686100e+02\n1 3426     3.275100e+02 -3.142400e+02\n15 3426     3.437500e+02 -1.940700e+02\n0 3427     1.550400e+02 1.770600e+02\n1 3427     3.833199e+02 1.559200e+02\n14 3427     6.536600e+02 -5.506500e+02\n15 3427     1.571899e+02 4.013900e+02\n0 3428     2.971899e+02 -2.825300e+02\n1 3428     3.751100e+02 -3.451200e+02\n10 3428     2.780601e+02 -1.531700e+02\n15 3428     4.098700e+02 -2.073500e+02\n0 3429     4.233400e+02 -1.003700e+02\n1 3429     5.666400e+02 -2.054300e+02\n7 3429     3.328900e+02 7.687000e+01\n15 3429     5.620000e+02 5.721997e+01\n0 3430     2.764600e+02 -2.946900e+02\n1 3430     3.499500e+02 -3.492100e+02\n10 3430     2.562600e+02 -1.692300e+02\n0 3431     3.840500e+02 -6.404999e+01\n1 3431     5.400601e+02 -1.564000e+02\n10 3431     3.570900e+02 1.072400e+02\n15 3431     5.035500e+02 1.013200e+02\n0 3432     -4.010999e+01 -3.477300e+02\n1 3432     3.107001e+01 -2.957000e+02\n15 3432     -3.815002e+01 -3.368100e+02\n0 3433     -7.238000e+01 -2.567800e+02\n1 3433     2.278998e+01 -1.979600e+02\n15 3433     -9.565002e+01 -2.199800e+02\n0 3434     2.091801e+02 1.704300e+02\n1 3434     4.327400e+02 1.343500e+02\n10 3434     1.322200e+02 3.611500e+02\n13 3434     5.088300e+02 -6.796997e+01\n14 3434     7.205200e+02 -5.536600e+02\n0 3435     2.724100e+02 -8.515002e+01\n1 3435     4.063101e+02 -1.403600e+02\n10 3435     2.297600e+02 7.051001e+01\n15 3435     3.485000e+02 5.656000e+01\n0 3436     2.887500e+02 -3.011700e+02\n1 3436     3.626000e+02 -3.607900e+02\n10 3436     2.704399e+02 -1.754000e+02\n15 3436     4.011000e+02 -2.336100e+02\n0 3437     2.919399e+02 -7.979999e+01\n1 3437     4.322400e+02 -1.388400e+02\n15 3437     3.751801e+02 6.737000e+01\n0 3438     3.860699e+02 -2.395300e+02\n1 3438     4.934100e+02 -3.356700e+02\n0 3439     5.331000e+01 -3.934800e+02\n1 3439     9.816998e+01 -3.696000e+02\n0 3440     3.976700e+02 -1.376100e+02\n1 3440     5.233800e+02 -2.332600e+02\n7 3440     3.185000e+02 3.934998e+01\n0 3441     -5.130200e+02 1.065600e+02\n1 3441     -2.346400e+02 2.590800e+02\n0 3442     -5.074700e+02 1.693900e+02\n1 3442     -2.081000e+02 3.154400e+02\n0 3443     3.628998e+01 4.853800e+02\n1 3443     4.113300e+02 4.862700e+02\n2 3443     -2.555800e+02 2.445900e+02\n0 3444     7.003003e+01 5.466800e+02\n1 3444     4.630601e+02 5.401500e+02\n5 3444     4.746200e+02 -9.935999e+01\n6 3444     -4.090800e+02 5.957300e+02\n9 3444     -3.487500e+02 3.396600e+02\n12 3444     -2.374100e+02 5.727600e+02\n0 3445     2.208300e+02 5.205600e+02\n1 3445     6.189301e+02 4.749800e+02\n2 3445     -9.485999e+01 2.849200e+02\n3 3445     -2.344800e+02 -4.791998e+01\n9 3445     -2.329400e+02 3.184400e+02\n0 3446     -4.501500e+02 2.212300e+02\n1 3446     -1.384600e+02 3.492700e+02\n0 3447     2.406100e+02 -1.989900e+02\n1 3447     3.348400e+02 -2.408100e+02\n7 3447     1.864399e+02 -4.185999e+01\n10 3447     2.046200e+02 -6.339001e+01\n13 3447     6.100800e+02 -3.765100e+02\n15 3447     3.184900e+02 -1.007000e+02\n0 3448     2.047700e+02 -8.503003e+01\n1 3448     3.351100e+02 -1.165200e+02\n7 3448     1.319200e+02 6.341998e+01\n10 3448     1.525300e+02 6.389001e+01\n0 3449     2.897500e+02 -1.592800e+02\n1 3449     4.014000e+02 -2.186700e+02\n10 3449     2.577200e+02 -1.272998e+01\n15 3449     3.821100e+02 -4.121997e+01\n0 3450     3.502000e+02 -1.290900e+02\n1 3450     4.769000e+02 -2.094200e+02\n7 3450     2.726300e+02 3.960999e+01\n10 3450     3.246100e+02 2.825000e+01\n0 3451     5.243800e+02 1.153003e+01\n1 3451     7.547500e+02 -1.338800e+02\n0 3452     3.696700e+02 -1.242500e+02\n1 3452     4.992500e+02 -2.115700e+02\n7 3452     2.895100e+02 4.682001e+01\n12 3452     4.120000e+02 1.796002e+01\n15 3452     4.892900e+02 1.741998e+01\n0 3453     6.585999e+01 -1.843400e+02\n1 3453     1.672700e+02 -1.702700e+02\n7 3453     1.390997e+01 -5.794000e+01\n10 3453     2.510010e+00 -6.503998e+01\n15 3453     7.854999e+01 -1.038000e+02\n0 3454     2.346300e+02 1.417600e+02\n1 3454     4.460100e+02 9.876999e+01\n7 3454     1.144800e+02 2.848300e+02\n10 3454     1.645100e+02 3.301400e+02\n13 3454     5.402500e+02 -8.725000e+01\n15 3454     2.696200e+02 3.640500e+02\n0 3455     1.444000e+01 -1.728000e+02\n1 3455     1.222600e+02 -1.428300e+02\n15 3455     8.119995e+00 -9.484003e+01\n0 3456     9.691998e+01 -1.922600e+02\n1 3456     1.943600e+02 -1.872100e+02\n0 3457     -2.460100e+02 -4.746000e+02\n1 3457     -2.003400e+02 -3.481200e+02\n4 3457     -5.920200e+02 -1.922700e+02\n6 3457     -1.664500e+02 -6.656200e+02\n9 3457     -5.106000e+01 -4.503700e+02\n0 3458     -2.696002e+01 -2.073000e+02\n1 3458     7.026001e+01 -1.643100e+02\n7 3458     -7.184998e+01 -9.491998e+01\n0 3459     2.004500e+02 3.074600e+02\n1 3459     5.270900e+02 2.619900e+02\n0 3460     1.125800e+02 -9.183002e+01\n1 3460     2.409200e+02 -9.420001e+01\n10 3460     4.642999e+01 4.627002e+01\n0 3461     -7.876600e+02 1.467999e+01\n1 3461     -5.021000e+02 2.433800e+02\n0 3462     -7.880100e+02 5.853003e+01\n1 3462     -4.884400e+02 2.823800e+02\n0 3463     -7.867900e+02 1.479980e+00\n1 3463     -5.056800e+02 2.317100e+02\n0 3464     -9.797998e+01 2.419500e+02\n1 3464     2.016899e+02 2.785700e+02\n11 3464     6.003003e+01 -5.006400e+02\n13 3464     1.352700e+02 -5.521997e+01\n14 3464     2.410100e+02 -5.161300e+02\n0 3465     6.369995e+00 5.390015e+00\n1 3465     1.689100e+02 3.217999e+01\n7 3465     -7.995001e+01 1.196400e+02\n15 3465     -2.677002e+01 1.455100e+02\n0 3466     -4.832400e+02 1.682100e+02\n1 3466     -1.875800e+02 3.085600e+02\n0 3467     6.100000e+02 -4.796002e+01\n1 3467     8.244600e+02 -2.240500e+02\n7 3467     4.678000e+02 1.346600e+02\n12 3467     5.619900e+02 9.503998e+01\n15 3467     8.275800e+02 1.535500e+02\n0 3468     6.153900e+02 -2.373300e+02\n1 3468     7.519900e+02 -4.200900e+02\n15 3468     8.541200e+02 -1.067900e+02\n0 3469     5.291801e+02 1.221200e+02\n1 3469     7.943300e+02 -1.990002e+01\n15 3469     6.939500e+02 3.784400e+02\n0 3470     -9.370001e+01 -5.274900e+02\n1 3470     -8.110999e+01 -4.463101e+02\n0 3471     3.385699e+02 -3.065200e+02\n1 3471     4.155900e+02 -3.842000e+02\n10 3471     3.278900e+02 -1.760200e+02\n0 3472     1.286200e+02 -3.324000e+02\n1 3472     1.904800e+02 -3.361200e+02\n10 3472     9.002002e+01 -2.281300e+02\n0 3473     -2.384400e+02 -5.127100e+02\n1 3473     -2.069300e+02 -3.848700e+02\n4 3473     -6.261600e+02 -1.983900e+02\n6 3473     -1.306900e+02 -7.024399e+02\n9 3473     -1.542999e+01 -4.733300e+02\n0 3474     1.921500e+02 -2.163700e+02\n1 3474     2.791200e+02 -2.416700e+02\n13 3474     5.750500e+02 -3.948900e+02\n0 3475     -8.682001e+01 -5.662100e+02\n1 3475     -8.909003e+01 -4.845200e+02\n0 3476     6.739399e+02 -3.689200e+02\n1 3476     7.620699e+02 -5.770000e+02\n7 3476     5.953199e+02 -1.440700e+02\n0 3477     7.097600e+02 -3.570300e+02\n1 3477     8.092100e+02 -5.800300e+02\n10 3477     7.609800e+02 -1.949800e+02\n0 3478     6.456899e+02 -3.358900e+02\n1 3478     7.449100e+02 -5.315800e+02\n0 3479     6.262500e+02 -2.310700e+02\n1 3479     7.665800e+02 -4.175800e+02\n0 3480     1.176200e+02 -5.656801e+02\n1 3480     1.038700e+02 -5.559900e+02\n6 3480     2.968000e+02 -5.945000e+02\n7 3480     1.292900e+02 -4.292800e+02\n9 3480     3.237600e+02 -3.734700e+02\n10 3480     1.021700e+02 -4.960300e+02\n0 3481     7.357500e+02 -3.470100e+02\n1 3481     8.444800e+02 -5.813900e+02\n0 3482     -2.185500e+02 -1.090000e+02\n1 3482     -5.067999e+01 -1.853003e+01\n0 3483     -2.879200e+02 -2.568400e+02\n1 3483     -1.589900e+02 -1.363200e+02\n15 3483     -3.816700e+02 -2.496300e+02\n0 3484     -7.885999e+01 -5.640400e+02\n1 3484     -8.069000e+01 -4.855100e+02\n0 3485     6.440400e+02 -2.656900e+02\n1 3485     7.728300e+02 -4.602200e+02\n0 3486     -6.321997e+01 -5.703800e+02\n1 3486     -6.865997e+01 -4.962500e+02\n7 3486     -4.692999e+01 -4.714000e+02\n0 3487     3.202000e+02 -2.915800e+02\n1 3487     4.006600e+02 -3.630300e+02\n0 3488     -6.888800e+02 -4.802100e+02\n1 3488     -5.807400e+02 -2.162500e+02\n0 3489     -2.686200e+02 -5.319800e+02\n1 3489     -2.410800e+02 -3.925000e+02\n0 3490     3.963700e+02 -9.503003e+01\n1 3490     5.401700e+02 -1.911400e+02\n15 3490     5.239301e+02 6.084998e+01\n0 3491     5.067600e+02 4.207700e+02\n1 3491     8.803700e+02 3.011000e+02\n12 3491     2.991500e+02 5.519800e+02\n0 3492     3.951001e+01 1.799300e+02\n1 3492     2.655800e+02 1.914400e+02\n7 3492     -8.710999e+01 2.904000e+02\n15 3492     -1.869995e+00 3.886500e+02\n0 3493     -1.787700e+02 1.547500e+02\n1 3493     9.214001e+01 2.167800e+02\n7 3493     -3.415900e+02 2.024100e+02\n15 3493     -2.832800e+02 3.224000e+02\n0 3494     1.596100e+02 6.104999e+01\n1 3494     3.347400e+02 4.250000e+01\n6 3494     1.183100e+02 1.364600e+02\n10 3494     8.529999e+01 2.285800e+02\n15 3494     1.740000e+02 2.427400e+02\n0 3495     2.349200e+02 4.616998e+01\n1 3495     4.086000e+02 4.609985e+00\n10 3495     1.741000e+02 2.187100e+02\n15 3495     2.799399e+02 2.323900e+02\n0 3496     -1.688800e+02 -6.401001e+01\n1 3496     -9.869995e+00 1.432001e+01\n7 3496     -2.522700e+02 1.428998e+01\n10 3496     -2.825100e+02 4.904999e+01\n15 3496     -2.524100e+02 2.716998e+01\n0 3497     -1.192900e+02 -1.368700e+02\n1 3497     8.409973e+00 -6.848999e+01\n15 3497     -1.772600e+02 -6.453003e+01\n0 3498     1.624500e+02 -2.443800e+02\n1 3498     2.401300e+02 -2.595600e+02\n6 3498     2.399800e+02 -1.949800e+02\n7 3498     1.215500e+02 -9.871002e+01\n15 3498     2.173700e+02 -1.727600e+02\n0 3499     -3.390997e+01 -2.652200e+02\n1 3499     5.271997e+01 -2.176400e+02\n15 3499     -4.396002e+01 -2.262400e+02\n0 3500     3.335400e+02 -2.157600e+02\n1 3500     4.286400e+02 -2.901800e+02\n15 3500     4.500300e+02 -1.120700e+02\n0 3501     -1.318400e+02 -2.076800e+02\n1 3501     -1.488000e+01 -1.340900e+02\n15 3501     -1.817700e+02 -1.619100e+02\n0 3502     2.928300e+02 -2.972700e+02\n1 3502     3.682400e+02 -3.585700e+02\n15 3502     4.065400e+02 -2.279800e+02\n0 3503     -5.623999e+01 9.982001e+01\n1 3503     1.463800e+02 1.398900e+02\n10 3503     -1.699400e+02 2.510200e+02\n15 3503     -1.227200e+02 2.645700e+02\n0 3504     -6.246002e+01 8.648999e+01\n1 3504     1.362200e+02 1.285200e+02\n7 3504     -1.717500e+02 1.829800e+02\n10 3504     -1.757800e+02 2.351300e+02\n15 3504     -1.291000e+02 2.458800e+02\n0 3505     -7.032001e+01 5.439001e+01\n1 3505     1.183100e+02 9.992999e+01\n10 3505     -1.813100e+02 1.974200e+02\n15 3505     -1.352100e+02 2.015000e+02\n0 3506     2.960022e+00 -1.155000e+02\n1 3506     1.282200e+02 -8.407001e+01\n15 3506     -1.534998e+01 -1.909998e+01\n0 3507     3.218700e+02 -2.503000e+02\n1 3507     4.089301e+02 -3.215800e+02\n12 3507     4.024600e+02 -1.364400e+02\n15 3507     4.391300e+02 -1.604400e+02\n0 3508     -8.507001e+01 4.704999e+01\n1 3508     1.044500e+02 9.589999e+01\n7 3508     -1.885100e+02 1.389900e+02\n15 3508     -1.532800e+02 1.888100e+02\n0 3509     -4.158600e+02 -1.704400e+02\n1 3509     -2.437000e+02 -2.019000e+01\n15 3509     -5.674500e+02 -1.520300e+02\n0 3510     2.655400e+02 -2.946100e+02\n1 3510     3.385699e+02 -3.464000e+02\n7 3510     2.198600e+02 -1.365700e+02\n10 3510     2.430900e+02 -1.703400e+02\n15 3510     3.673900e+02 -2.279100e+02\n0 3511     -3.069600e+02 3.052002e+01\n1 3511     -7.392999e+01 1.347600e+02\n7 3511     -4.439800e+02 6.217999e+01\n10 3511     -4.553800e+02 1.473100e+02\n15 3511     -4.422200e+02 1.371900e+02\n0 3512     5.500699e+02 8.164001e+01\n1 3512     8.030300e+02 -6.866998e+01\n15 3512     7.279600e+02 3.246900e+02\n0 3513     3.316998e+01 -1.019400e+02\n1 3513     1.627300e+02 -8.032001e+01\n10 3513     -4.372998e+01 2.603003e+01\n15 3513     2.410999e+01 3.169983e+00\n0 3514     2.742300e+02 -1.178400e+02\n1 3514     3.981801e+02 -1.718700e+02\n0 3515     -7.470001e+01 1.003003e+01\n1 3515     1.002500e+02 5.845001e+01\n7 3515     -1.692500e+02 1.061900e+02\n10 3515     -1.809500e+02 1.451400e+02\n13 3515     2.915800e+02 -2.232800e+02\n15 3515     -1.354900e+02 1.410200e+02\n0 3516     1.775300e+02 -2.396700e+02\n1 3516     2.561500e+02 -2.594700e+02\n6 3516     2.541200e+02 -1.838900e+02\n10 3516     1.365000e+02 -1.169800e+02\n15 3516     2.367100e+02 -1.641400e+02\n0 3517     9.790997e+01 -2.331100e+02\n1 3517     1.786700e+02 -2.266500e+02\n6 3517     1.751100e+02 -2.009000e+02\n10 3517     4.440002e+01 -1.181300e+02\n15 3517     1.275300e+02 -1.656200e+02\n0 3518     2.660500e+02 -2.807200e+02\n1 3518     3.419500e+02 -3.319900e+02\n15 3518     3.663500e+02 -2.089500e+02\n0 3519     2.928300e+02 -2.972700e+02\n1 3519     3.682400e+02 -3.585700e+02\n15 3519     4.065400e+02 -2.279800e+02\n0 3520     4.428003e+01 -1.384900e+02\n1 3520     1.591300e+02 -1.184100e+02\n15 3520     4.284998e+01 -4.446997e+01\n0 3521     1.231500e+02 -4.759003e+01\n1 3521     2.637200e+02 -5.390997e+01\n10 3521     5.396002e+01 9.915997e+01\n15 3521     1.378000e+02 8.914999e+01\n0 3522     -4.080400e+02 -1.746000e+02\n1 3522     -2.382600e+02 -2.632001e+01\n7 3522     -5.009600e+02 -1.589000e+02\n15 3522     -5.561800e+02 -1.571600e+02\n0 3523     -3.084800e+02 -4.711000e+02\n1 3523     -2.545100e+02 -3.248400e+02\n7 3523     -3.214100e+02 -4.283100e+02\n15 3523     -3.862300e+02 -5.429399e+02\n0 3524     -4.758002e+01 -1.488700e+02\n1 3524     7.165997e+01 -1.013200e+02\n15 3524     -7.870001e+01 -7.125000e+01\n0 3525     -1.913500e+02 -3.662000e+01\n1 3525     -2.016998e+01 4.609003e+01\n10 3525     -3.119900e+02 7.854999e+01\n15 3525     -2.859300e+02 6.095001e+01\n0 3526     3.357700e+02 4.334100e+02\n1 3526     7.232700e+02 3.529800e+02\n14 3526     6.468199e+02 -2.905400e+02\n0 3527     1.222100e+02 4.111700e+02\n1 3527     4.831200e+02 3.870700e+02\n5 3527     5.245000e+02 -2.425900e+02\n8 3527     -6.006000e+01 1.212700e+02\n14 3527     4.346000e+02 -3.248400e+02\n0 3528     2.064700e+02 3.322400e+02\n1 3528     5.432600e+02 2.848900e+02\n6 3528     -1.856200e+02 3.614200e+02\n0 3529     -3.268600e+02 2.971000e+02\n1 3529     -3.450012e+00 3.910900e+02\n0 3530     -3.236200e+02 2.894900e+02\n1 3530     -2.080017e+00 3.827900e+02\n0 3531     -3.260400e+02 2.865900e+02\n1 3531     -4.979980e+00 3.806400e+02\n8 3531     -4.085300e+02 -1.701001e+01\n0 3532     -3.315100e+02 2.846300e+02\n1 3532     -1.097998e+01 3.800500e+02\n8 3532     -4.135600e+02 -1.928000e+01\n0 3533     4.430100e+02 2.801000e+02\n1 3533     7.670800e+02 1.679300e+02\n10 3533     3.961600e+02 5.183200e+02\n0 3534     -3.456100e+02 2.795700e+02\n1 3534     -2.584998e+01 3.787900e+02\n0 3535     -3.824300e+02 2.726600e+02\n1 3535     -6.089001e+01 3.810000e+02\n7 3535     -5.800700e+02 2.862600e+02\n10 3535     -5.776900e+02 4.270200e+02\n0 3536     4.477000e+02 2.449600e+02\n1 3536     7.614301e+02 1.295100e+02\n0 3537     6.429999e+01 2.427300e+02\n1 3537     3.629200e+02 2.352700e+02\n0 3538     4.428400e+02 2.426500e+02\n1 3538     7.552000e+02 1.286700e+02\n0 3539     4.546700e+02 2.414400e+02\n1 3539     7.675200e+02 1.237400e+02\n0 3540     4.602400e+02 2.344200e+02\n1 3540     7.709200e+02 1.150200e+02\n0 3541     3.079700e+02 2.333400e+02\n1 3541     6.110500e+02 1.574000e+02\n7 3541     1.208700e+02 3.475100e+02\n10 3541     2.422600e+02 4.480000e+02\n0 3542     2.030900e+02 2.332300e+02\n1 3542     5.008199e+02 1.873100e+02\n6 3542     -1.235500e+02 2.524200e+02\n0 3543     4.714800e+02 2.310300e+02\n1 3543     7.816000e+02 1.080600e+02\n0 3544     4.541801e+02 2.233200e+02\n1 3544     7.613000e+02 1.050200e+02\n0 3545     4.564500e+02 2.211100e+02\n1 3545     7.627200e+02 1.020500e+02\n0 3546     -3.174700e+02 1.995000e+02\n1 3546     -2.315997e+01 2.955100e+02\n0 3547     -2.441700e+02 1.909100e+02\n1 3547     4.285999e+01 2.685800e+02\n0 3548     -2.341300e+02 1.907000e+02\n1 3548     5.209998e+01 2.655700e+02\n7 3548     -4.071800e+02 2.281600e+02\n0 3549     -1.988900e+02 1.821700e+02\n1 3549     8.294000e+01 2.484300e+02\n0 3550     -1.365400e+02 1.802200e+02\n1 3550     1.417200e+02 2.298300e+02\n6 3550     -4.982500e+02 9.079999e+01\n0 3551     -1.996600e+02 1.792600e+02\n1 3551     8.070001e+01 2.456700e+02\n0 3552     2.027700e+02 1.641500e+02\n1 3552     4.249301e+02 1.300100e+02\n13 3552     5.031600e+02 -7.310999e+01\n14 3552     7.133600e+02 -5.604100e+02\n0 3553     4.940100e+02 1.501800e+02\n1 3553     7.790601e+02 1.701001e+01\n0 3554     5.297800e+02 1.154800e+02\n1 3554     7.926100e+02 -2.753003e+01\n6 3554     3.363400e+02 2.362300e+02\n7 3554     3.657300e+02 2.769200e+02\n10 3554     5.114700e+02 3.318100e+02\n12 3554     4.258600e+02 2.461200e+02\n0 3555     -1.444700e+02 8.860999e+01\n1 3555     7.291998e+01 1.505500e+02\n10 3555     -2.715400e+02 2.294200e+02\n12 3555     -2.723000e+02 8.919000e+01\n0 3556     4.173999e+01 8.716000e+01\n1 3556     2.291000e+02 1.017500e+02\n5 3556     6.732600e+02 -5.705900e+02\n8 3556     1.565700e+02 4.726999e+01\n10 3556     -5.428998e+01 2.469200e+02\n15 3556     1.001001e+01 2.619900e+02\n0 3557     -3.157200e+02 6.790997e+01\n1 3557     -6.875000e+01 1.720700e+02\n0 3558     1.808600e+02 5.801001e+01\n1 3558     3.555400e+02 3.302002e+01\n0 3559     -3.183000e+02 5.342999e+01\n1 3559     -7.609003e+01 1.593500e+02\n0 3560     2.643101e+02 4.903003e+01\n1 3560     4.415500e+02 -2.049988e+00\n10 3560     2.081100e+02 2.250900e+02\n0 3561     5.320300e+02 4.750000e+00\n1 3561     7.604500e+02 -1.434800e+02\n0 3562     5.585000e+02 -2.440997e+01\n1 3562     7.777400e+02 -1.822400e+02\n0 3563     -4.069200e+02 -3.409003e+01\n1 3563     -1.883200e+02 1.020900e+02\n0 3564     -4.153300e+02 -3.967999e+01\n1 3564     -1.977900e+02 9.929001e+01\n0 3565     2.821200e+02 -1.036900e+02\n1 3565     4.119900e+02 -1.608300e+02\n10 3565     2.435500e+02 5.033002e+01\n0 3566     3.378800e+02 -1.407200e+02\n1 3566     4.591400e+02 -2.167100e+02\n0 3567     6.007900e+02 -2.325800e+02\n1 3567     7.371200e+02 -4.087600e+02\n6 3567     5.705601e+02 -9.829999e+01\n0 3568     6.366200e+02 -2.371800e+02\n1 3568     7.761600e+02 -4.277500e+02\n12 3568     6.734000e+02 -7.884003e+01\n0 3569     6.390900e+02 -2.580100e+02\n1 3569     7.698500e+02 -4.496600e+02\n10 3569     6.701700e+02 -8.883002e+01\n12 3569     6.855900e+02 -9.809003e+01\n0 3570     6.369700e+02 -2.874800e+02\n1 3570     7.549700e+02 -4.789800e+02\n7 3570     5.443600e+02 -7.754999e+01\n0 3571     -3.871997e+01 -3.773300e+02\n1 3571     1.872998e+01 -3.235900e+02\n15 3571     -3.385999e+01 -3.783000e+02\n0 3572     5.199500e+02 -3.962000e+02\n1 3572     5.797900e+02 -5.422000e+02\n7 3572     4.648900e+02 -1.953600e+02\n0 3573     5.327000e+02 -4.023900e+02\n1 3573     5.910900e+02 -5.535400e+02\n0 3574     4.912400e+02 -4.362800e+02\n1 3574     5.322400e+02 -5.706801e+02\n0 3575     -1.723900e+02 -5.386400e+02\n1 3575     -1.568600e+02 -4.306000e+02\n7 3575     -1.636400e+02 -4.654399e+02\n0 3576     -8.317999e+01 -5.398900e+02\n1 3576     -7.610999e+01 -4.618600e+02\n6 3576     6.623999e+01 -6.566500e+02\n0 3577     -1.236100e+02 -5.481100e+02\n1 3577     -1.159600e+02 -4.550900e+02\n6 3577     2.710999e+01 -6.843101e+02\n0 3578     -6.676001e+01 -5.655400e+02\n1 3578     -7.020001e+01 -4.906100e+02\n0 3579     -6.321997e+01 -5.703800e+02\n1 3579     -6.865997e+01 -4.962500e+02\n0 3580     3.463199e+02 4.355400e+02\n1 3580     7.361100e+02 3.523700e+02\n0 3581     3.395900e+02 4.344500e+02\n1 3581     7.278800e+02 3.529600e+02\n0 3582     1.822600e+02 3.957800e+02\n1 3582     5.431100e+02 3.550500e+02\n0 3583     2.102100e+02 3.834500e+02\n1 3583     5.675400e+02 3.354000e+02\n0 3584     1.928800e+02 3.411200e+02\n1 3584     5.325400e+02 2.976700e+02\n6 3584     -2.074600e+02 3.677000e+02\n0 3585     1.928800e+02 3.411200e+02\n1 3585     5.325400e+02 2.976700e+02\n6 3585     -2.074600e+02 3.677000e+02\n9 3585     -2.005900e+02 1.675300e+02\n10 3585     9.667999e+01 5.653500e+02\n14 3585     5.264301e+02 -3.959800e+02\n0 3586     2.542500e+02 3.130700e+02\n1 3586     5.863101e+02 2.523700e+02\n0 3587     -3.202400e+02 3.047700e+02\n1 3587     5.119995e+00 3.967200e+02\n0 3588     4.451500e+02 2.820000e+02\n1 3588     7.705200e+02 1.688400e+02\n0 3589     5.767999e+01 2.428300e+02\n1 3589     3.561300e+02 2.373800e+02\n6 3589     -3.013600e+02 2.204600e+02\n0 3590     4.933700e+02 2.421900e+02\n1 3590     8.069200e+02 1.146000e+02\n0 3591     -4.465700e+02 2.253100e+02\n1 3591     -1.335700e+02 3.521100e+02\n0 3592     4.802600e+02 2.237800e+02\n1 3592     7.884900e+02 9.809000e+01\n0 3593     -1.707200e+02 2.199900e+02\n1 3593     1.234600e+02 2.767200e+02\n0 3594     4.643700e+02 2.069100e+02\n1 3594     7.669700e+02 8.438000e+01\n0 3595     -2.237000e+02 2.022900e+02\n1 3595     6.610999e+01 2.739900e+02\n0 3596     4.622600e+02 1.998900e+02\n1 3596     7.622500e+02 7.802002e+01\n0 3597     4.425900e+02 1.891700e+02\n1 3597     7.385200e+02 7.291998e+01\n0 3598     -2.342400e+02 1.852300e+02\n1 3598     4.994000e+01 2.605400e+02\n0 3599     -1.470000e+02 1.773100e+02\n1 3599     1.304300e+02 2.297900e+02\n9 3599     -4.094700e+02 2.679993e+00\n0 3600     5.767500e+02 4.435999e+01\n1 3600     8.186400e+02 -1.160600e+02\n0 3601     -2.620900e+02 3.757001e+01\n1 3601     -2.950000e+01 1.290400e+02\n0 3602     6.118800e+02 -1.940002e+00\n1 3602     8.410000e+02 -1.761200e+02\n0 3603     5.712200e+02 -3.020020e+00\n1 3603     7.981600e+02 -1.639700e+02\n6 3603     4.198100e+02 1.186400e+02\n0 3604     5.132400e+02 -1.137900e+02\n1 3604     6.900601e+02 -2.568600e+02\n0 3605     -6.967999e+01 -1.243300e+02\n1 3605     6.075000e+01 -7.146002e+01\n0 3606     -3.736500e+02 -1.577200e+02\n1 3606     -2.017600e+02 -2.065997e+01\n0 3607     5.218500e+02 -1.759100e+02\n1 3607     6.732600e+02 -3.224000e+02\n0 3608     2.354100e+02 -1.765400e+02\n1 3608     3.380200e+02 -2.176200e+02\n0 3609     5.704900e+02 -2.202100e+02\n1 3609     7.083500e+02 -3.850700e+02\n0 3610     -4.565300e+02 -2.496500e+02\n1 3610     -3.078200e+02 -8.040997e+01\n0 3611     5.463101e+02 -3.691800e+02\n1 3611     6.197600e+02 -5.256899e+02\n0 3612     5.463101e+02 -3.691800e+02\n1 3612     6.197600e+02 -5.256899e+02\n0 3613     6.572300e+02 -3.770800e+02\n1 3613     7.397200e+02 -5.782800e+02\n0 3614     5.549399e+02 -3.794600e+02\n1 3614     6.244900e+02 -5.390200e+02\n0 3615     -6.645001e+01 -5.023900e+02\n1 3615     -4.607001e+01 -4.327900e+02\n0 3616     -1.168300e+02 -5.232700e+02\n1 3616     -1.003700e+02 -4.348300e+02\n0 3617     -9.972998e+01 -5.541700e+02\n1 3617     -9.645001e+01 -4.692600e+02\n6 3617     5.769000e+01 -6.793500e+02\n0 3618     1.966100e+02 4.227700e+02\n1 3618     5.661899e+02 3.791600e+02\n0 3619     1.862000e+02 3.705400e+02\n1 3619     5.370400e+02 3.286800e+02\n10 3619     8.632001e+01 5.997500e+02\n0 3620     5.057600e+02 3.472300e+02\n1 3620     8.549000e+02 2.222600e+02\n0 3621     -4.508100e+02 2.235800e+02\n1 3621     -1.380800e+02 3.517300e+02\n0 3622     -1.238700e+02 2.231900e+02\n1 3622     1.697600e+02 2.675900e+02\n0 3623     4.654000e+02 1.971300e+02\n1 3623     7.644301e+02 7.459003e+01\n0 3624     -2.168100e+02 1.699700e+02\n1 3624     6.120001e+01 2.415500e+02\n0 3625     3.642100e+02 2.028003e+01\n1 3625     5.504200e+02 -6.591998e+01\n7 3625     2.510601e+02 1.799400e+02\n0 3626     4.124900e+02 1.770001e+01\n1 3626     6.063101e+02 -8.445001e+01\n0 3627     5.451300e+02 -3.520020e+00\n1 3627     7.715100e+02 -1.562300e+02\n7 3627     3.970300e+02 1.647000e+02\n10 3627     5.392600e+02 1.949700e+02\n13 3627     7.641200e+02 -2.109200e+02\n0 3628     -3.740900e+02 -1.708800e+02\n1 3628     -2.073200e+02 -3.244000e+01\n6 3628     -5.495800e+02 -3.930000e+02\n0 3629     -3.839700e+02 -1.716800e+02\n1 3629     -2.160300e+02 -3.019000e+01\n0 3630     4.526001e+01 -1.906900e+02\n1 3630     1.445800e+02 -1.699000e+02\n10 3630     -2.081000e+01 -7.492999e+01\n0 3631     6.269800e+02 -2.220000e+02\n1 3631     7.709000e+02 -4.076400e+02\n0 3632     6.010400e+02 -2.290000e+02\n1 3632     7.389900e+02 -4.054400e+02\n0 3633     6.634900e+02 -2.845700e+02\n1 3633     7.867400e+02 -4.867200e+02\n0 3634     6.419399e+02 -2.982200e+02\n1 3634     7.561300e+02 -4.918600e+02\n0 3635     4.829900e+02 -3.849800e+02\n1 3635     5.445601e+02 -5.170000e+02\n0 3636     -1.538400e+02 -5.241200e+02\n1 3636     -1.346100e+02 -4.234300e+02\n6 3636     -2.317999e+01 -6.737100e+02\n7 3636     -1.485500e+02 -4.466500e+02\n0 3637     -1.228800e+02 -5.434600e+02\n1 3637     -1.136300e+02 -4.512500e+02\n7 3637     -1.134500e+02 -4.584500e+02\n9 3637     1.134300e+02 -4.469600e+02\n0 3638     -1.276400e+02 -5.553400e+02\n1 3638     -1.224900e+02 -4.606100e+02\n0 3639     1.192900e+02 -5.608400e+02\n1 3639     1.073100e+02 -5.518500e+02\n6 3639     2.950600e+02 -5.900100e+02\n10 3639     1.026700e+02 -4.912300e+02\n0 3640     1.947000e+02 4.025000e+02\n1 3640     5.585300e+02 3.585400e+02\n8 3640     -5.359985e+00 1.155300e+02\n11 3640     3.329100e+02 -3.428900e+02\n0 3641     1.949000e+02 3.967100e+02\n1 3641     5.567400e+02 3.527100e+02\n13 3641     3.489200e+02 9.357001e+01\n14 3641     5.101300e+02 -3.366100e+02\n0 3642     3.808300e+02 3.537500e+02\n1 3642     7.395000e+02 2.588500e+02\n0 3643     3.664000e+02 3.329800e+02\n1 3643     7.150800e+02 2.410900e+02\n0 3644     -2.945600e+02 3.269700e+02\n1 3644     3.707001e+01 4.112100e+02\n0 3645     -3.092800e+02 2.976700e+02\n1 3645     1.403998e+01 3.868200e+02\n0 3646     -1.479100e+02 1.896400e+02\n1 3646     1.340200e+02 2.419900e+02\n0 3647     -1.838500e+02 1.884100e+02\n1 3647     9.937000e+01 2.502400e+02\n0 3648     -1.430000e+02 1.738300e+02\n1 3648     1.334400e+02 2.253100e+02\n0 3649     -1.785100e+02 1.701700e+02\n1 3649     9.740997e+01 2.314000e+02\n0 3650     -1.580300e+02 1.691500e+02\n1 3650     1.170400e+02 2.248200e+02\n0 3651     1.427000e+02 -2.158500e+02\n1 3651     2.300400e+02 -2.251500e+02\n0 3652     6.038000e+02 -2.239000e+02\n1 3652     7.445300e+02 -4.017600e+02\n0 3653     7.407800e+02 -3.102100e+02\n1 3653     8.664900e+02 -5.455699e+02\n7 3653     6.403500e+02 -8.056000e+01\n0 3654     6.008800e+02 -3.207200e+02\n1 3654     7.006801e+02 -4.982900e+02\n0 3655     1.785300e+02 -3.478600e+02\n1 3655     2.364800e+02 -3.683200e+02\n0 3656     5.537900e+02 -3.749800e+02\n1 3656     6.254200e+02 -5.342800e+02\n0 3657     5.553300e+02 -3.899300e+02\n1 3657     6.203101e+02 -5.498700e+02\n0 3658     4.078199e+02 3.688300e+02\n1 3658     7.772700e+02 2.668700e+02\n0 3659     3.833600e+02 3.638200e+02\n1 3659     7.464399e+02 2.684300e+02\n0 3660     -2.037800e+02 1.715100e+02\n1 3660     7.414001e+01 2.394200e+02\n0 3661     -3.433200e+02 2.838200e+02\n1 3661     -2.183002e+01 3.824500e+02\n0 3662     -3.433200e+02 2.838200e+02\n1 3662     -2.183002e+01 3.824500e+02\n0 3663     1.019200e+02 -5.572100e+02\n1 3663     9.270001e+01 -5.418900e+02\n0 3664     -3.409600e+02 3.075100e+02\n1 3664     -1.453003e+01 4.047500e+02\n5 3664     5.226001e+01 -3.571500e+02\n0 3665     -3.355800e+02 2.975200e+02\n1 3665     -1.195001e+01 3.935800e+02\n0 3666     -4.386700e+02 2.588500e+02\n1 3666     -1.170800e+02 3.819400e+02\n0 3667     -3.196000e+02 2.951400e+02\n1 3667     3.169983e+00 3.872400e+02\n0 3668     3.103400e+02 -2.624200e+02\n1 3668     3.943000e+02 -3.292400e+02\n12 3668     3.928300e+02 -1.560000e+02\n15 3668     4.252100e+02 -1.784000e+02\n0 3669     5.854800e+02 1.832900e+02\n1 3669     8.719600e+02 2.790002e+01\n10 3669     5.714600e+02 4.180400e+02\n0 3670     3.143000e+02 -6.234003e+01\n1 3670     4.607600e+02 -1.302700e+02\n7 3670     2.275900e+02 9.903000e+01\n10 3670     2.765000e+02 1.015800e+02\n13 3670     6.419399e+02 -2.549100e+02\n15 3670     4.045300e+02 9.470999e+01\n0 3671     -1.943400e+02 -4.537700e+02\n1 3671     -1.458200e+02 -3.457000e+02\n0 3672     -2.454900e+02 -5.802400e+02\n1 3672     -2.380600e+02 -4.433700e+02\n9 3672     2.703998e+01 -5.247300e+02\n0 3673     5.297998e+01 4.916900e+02\n1 3673     4.305300e+02 4.877600e+02\n0 3674     3.541000e+02 -3.287600e+02\n1 3674     4.227100e+02 -4.118300e+02\n0 3675     3.502000e+02 5.475600e+02\n1 3675     7.744600e+02 4.714700e+02\n0 3676     -1.582000e+02 3.185800e+02\n1 3676     1.703300e+02 3.680300e+02\n11 3676     7.719971e+00 -4.285300e+02\n0 3677     1.671100e+02 5.281900e+02\n1 3677     5.623000e+02 4.964500e+02\n0 3678     3.183101e+02 5.467600e+02\n1 3678     7.374800e+02 4.785200e+02\n0 3679     3.577900e+02 -2.521002e+01\n1 3679     5.244500e+02 -1.082500e+02\n15 3679     4.616700e+02 1.516500e+02\n0 3680     2.689700e+02 8.599854e-01\n1 3680     4.301300e+02 -5.165997e+01\n15 3680     3.329301e+02 1.749700e+02\n0 3681     1.849000e+02 8.101001e+01\n1 3681     3.680300e+02 5.467999e+01\n0 3682     -6.335900e+02 -3.714000e+02\n1 3682     -5.007100e+02 -1.376600e+02\n0 3683     6.331000e+01 -7.873999e+01\n1 3683     1.970100e+02 -6.648999e+01\n0 3684     3.761500e+02 4.847100e+02\n1 3684     7.849800e+02 3.965700e+02\n0 3685     -2.557600e+02 3.261600e+02\n1 3685     7.560999e+01 4.007000e+02\n2 3685     -5.339100e+02 4.198999e+01\n15 3685     -4.130800e+02 5.491900e+02\n0 3686     3.614100e+02 5.469100e+02\n1 3686     7.874301e+02 4.681100e+02\n5 3686     7.638500e+02 -8.973999e+01\n12 3686     6.201001e+01 6.103900e+02\n0 3687     3.814200e+02 4.817700e+02\n1 3687     7.907000e+02 3.924700e+02\n0 3688     3.277300e+02 5.120100e+02\n1 3688     7.376600e+02 4.391300e+02\n0 3689     2.613000e+01 -7.321002e+01\n1 3689     1.640400e+02 -4.987000e+01\n15 3689     1.040002e+01 4.140997e+01\n0 3690     2.374700e+02 3.866998e+01\n1 3690     4.087000e+02 -3.919983e+00\n13 3690     5.704301e+02 -1.700800e+02\n0 3691     2.532000e+02 4.583600e+02\n1 3691     6.381899e+02 4.012000e+02\n14 3691     5.624200e+02 -2.684300e+02\n0 3692     1.450300e+02 4.718600e+02\n1 3692     5.237200e+02 4.435500e+02\n0 3693     -3.520700e+02 4.695000e+02\n1 3693     1.385999e+01 5.640500e+02\n0 3694     2.675500e+02 -3.130005e+00\n1 3694     4.271500e+02 -5.508002e+01\n7 3694     1.764600e+02 1.520400e+02\n10 3694     2.165900e+02 1.648200e+02\n15 3694     3.312200e+02 1.692600e+02\n0 3695     3.455400e+02 4.671100e+02\n1 3695     7.446400e+02 3.861200e+02\n7 3695     1.063500e+02 5.697900e+02\n0 3696     2.078400e+02 3.443100e+02\n1 3696     5.495800e+02 2.968200e+02\n6 3696     -1.919300e+02 3.753800e+02\n13 3696     3.734301e+02 5.048999e+01\n14 3696     5.419200e+02 -3.921900e+02\n0 3697     3.526300e+02 4.851200e+02\n1 3697     7.581200e+02 4.034600e+02\n5 3697     7.574100e+02 -1.560300e+02\n6 3697     -9.751999e+01 5.747100e+02\n12 3697     6.495001e+01 5.400400e+02\n14 3697     6.591300e+02 -2.349300e+02\n0 3698     2.837600e+02 5.317600e+02\n1 3698     6.931600e+02 4.712600e+02\n0 3699     1.603199e+02 1.140002e+01\n1 3699     3.188600e+02 -6.710022e+00\n15 3699     1.811300e+02 1.745600e+02\n0 3700     1.945500e+02 4.797200e+02\n1 3700     5.797900e+02 4.386600e+02\n0 3701     4.637000e+01 3.815997e+01\n1 3701     2.164100e+02 5.312000e+01\n7 3701     -4.359003e+01 1.589000e+02\n10 3701     -4.028998e+01 1.885700e+02\n15 3701     2.290997e+01 1.954000e+02\n0 3702     2.333101e+02 -1.993100e+02\n1 3702     3.275200e+02 -2.388200e+02\n15 3702     3.086400e+02 -1.022000e+02\n0 3703     2.222200e+02 4.131800e+02\n1 3703     5.914000e+02 3.621300e+02\n13 3703     3.682600e+02 1.087300e+02\n14 3703     5.340900e+02 -3.185000e+02\n0 3704     2.238300e+02 4.501300e+02\n1 3704     6.036000e+02 4.004800e+02\n0 3705     1.524200e+02 5.251100e+02\n1 3705     5.460100e+02 4.970100e+02\n0 3706     1.149800e+02 5.046100e+02\n1 3706     5.001100e+02 4.851100e+02\n0 3707     1.885200e+02 5.347700e+02\n1 3707     5.879200e+02 4.980300e+02\n14 3707     4.944301e+02 -1.923200e+02\n0 3708     2.206700e+02 4.455200e+02\n1 3708     5.987800e+02 3.963300e+02\n6 3708     -2.281500e+02 4.973600e+02\n11 3708     3.519700e+02 -3.027600e+02\n12 3708     -6.178998e+01 4.758300e+02\n0 3709     3.547600e+02 5.406500e+02\n1 3709     7.775000e+02 4.628600e+02\n5 3709     7.571899e+02 -9.685999e+01\n14 3709     6.559700e+02 -1.770100e+02\n0 3710     3.585300e+02 5.440700e+02\n1 3710     7.833000e+02 4.658300e+02\n2 3710     1.787000e+01 3.122800e+02\n14 3710     6.592300e+02 -1.731700e+02\n0 3711     2.460200e+02 5.123500e+02\n1 3711     6.447800e+02 4.601300e+02\n0 3712     1.125800e+02 -9.183002e+01\n1 3712     2.409200e+02 -9.420001e+01\n0 3713     4.084998e+01 -1.458900e+02\n1 3713     1.539900e+02 -1.246000e+02\n7 3713     -1.698999e+01 -2.365002e+01\n0 3714     5.196801e+02 -1.669800e+02\n1 3714     6.749800e+02 -3.127100e+02\n7 3714     4.110200e+02 1.242999e+01\n12 3714     5.235100e+02 -4.290997e+01\n0 3715     -4.696500e+02 -2.280100e+02\n1 3715     -3.117300e+02 -5.715997e+01\n0 3716     3.643600e+02 3.380600e+02\n1 3716     7.149200e+02 2.473100e+02\n6 3716     -1.021997e+01 4.098300e+02\n0 3717     1.834500e+02 4.921300e+02\n1 3717     5.700800e+02 4.547800e+02\n11 3717     3.141500e+02 -2.638300e+02\n0 3718     2.477300e+02 3.510700e+02\n1 3718     5.948400e+02 2.927000e+02\n0 3719     4.505900e+02 2.879200e+02\n1 3719     7.781600e+02 1.739500e+02\n10 3719     4.047300e+02 5.283500e+02\n0 3720     -1.261000e+02 4.587000e+02\n1 3720     2.368500e+02 4.990100e+02\n2 3720     -4.080500e+02 2.109900e+02\n12 3720     -4.351000e+02 4.417300e+02\n0 3721     -1.191200e+02 6.158002e+01\n1 3721     8.151001e+01 1.190300e+02\n0 3722     -6.123999e+01 -1.658002e+01\n1 3722     1.030600e+02 2.931000e+01\n10 3722     -1.626100e+02 1.153800e+02\n0 3723     3.506000e+01 4.793400e+02\n1 3723     4.082200e+02 4.794900e+02\n0 3724     -3.329999e+01 -1.798800e+02\n1 3724     7.348999e+01 -1.349300e+02\n0 3725     1.370001e+01 -2.167300e+02\n1 3725     1.046900e+02 -1.842100e+02\n10 3725     -5.440002e+01 -1.081100e+02\n15 3725     1.159998e+01 -1.543600e+02\n0 3726     5.119995e+00 8.357001e+01\n1 3726     1.939700e+02 1.072400e+02\n10 3726     -9.602002e+01 2.386800e+02\n15 3726     -3.875000e+01 2.519300e+02\n0 3727     -8.681400e+02 -2.117999e+01\n1 3727     -5.789200e+02 2.306400e+02\n0 3728     -8.686800e+02 -3.962000e+01\n1 3728     -5.851400e+02 2.147000e+02\n0 3729     -8.730700e+02 -2.467999e+01\n1 3729     -5.837300e+02 2.291000e+02\n0 3730     -8.664600e+02 -6.396997e+01\n1 3730     -5.908600e+02 1.930800e+02\n0 3731     -3.163200e+02 1.749900e+02\n1 3731     -3.082001e+01 2.721900e+02\n0 3732     -2.743300e+02 1.901000e+02\n1 3732     1.378003e+01 2.755500e+02\n0 3733     -7.878000e+02 4.977002e+01\n1 3733     -4.913600e+02 2.749700e+02\n0 3734     -4.585100e+02 8.787000e+01\n1 3734     -1.921600e+02 2.279700e+02\n0 3735     -8.655500e+02 -2.790002e+01\n1 3735     -5.788600e+02 2.245000e+02\n0 3736     -4.439600e+02 4.770001e+01\n1 3736     -1.930400e+02 1.872300e+02\n0 3737     -4.439600e+02 4.770001e+01\n1 3737     -1.930400e+02 1.872300e+02\n0 3738     -4.101100e+02 4.865002e+01\n1 3738     -1.622100e+02 1.792800e+02\n0 3739     -4.596500e+02 2.849000e+02\n1 3739     -1.299700e+02 4.116200e+02\n7 3739     -6.641300e+02 2.878600e+02\n0 3740     -4.505200e+02 -5.200012e+00\n1 3740     -2.174800e+02 1.403100e+02\n2 3740     -5.892300e+02 -2.918400e+02\n0 3741     5.231400e+02 -1.409700e+02\n1 3741     6.897500e+02 -2.880200e+02\n0 3742     -5.900269e-01 7.428003e+01\n1 3742     1.854900e+02 1.010100e+02\n10 3742     -1.023600e+02 2.277400e+02\n0 3743     -8.755800e+02 -1.501001e+01\n1 3743     -5.826400e+02 2.383200e+02\n0 3744     -6.650800e+02 3.969300e+02\n1 3744     -2.734200e+02 5.594400e+02\n0 3745     2.899800e+02 1.971400e+02\n1 3745     5.774700e+02 1.261400e+02\n10 3745     2.246600e+02 4.031100e+02\n0 3746     3.177700e+02 2.223100e+02\n1 3746     6.168000e+02 1.433900e+02\n7 3746     1.328200e+02 3.386900e+02\n0 3747     2.475699e+02 3.360700e+02\n1 3747     5.878400e+02 2.776100e+02\n7 3747     3.841998e+01 4.342600e+02\n0 3748     3.557500e+02 5.011500e+02\n1 3748     7.669200e+02 4.202300e+02\n6 3748     -9.720001e+01 5.956200e+02\n12 3748     6.504999e+01 5.587200e+02\n14 3748     6.606500e+02 -2.178800e+02\n0 3749     -3.124100e+02 -1.242300e+02\n1 3749     -1.343100e+02 -7.119995e+00\n0 3750     -8.152002e+01 2.263600e+02\n1 3750     2.125400e+02 2.587400e+02\n0 3751     -4.087800e+02 -7.163000e+01\n1 3751     -2.032900e+02 6.776001e+01\n15 3751     -5.697800e+02 -1.771002e+01\n0 3752     3.493700e+02 5.610800e+02\n1 3752     7.769000e+02 4.861500e+02\n14 3752     6.485400e+02 -1.564900e+02\n0 3753     -8.940002e+00 1.165000e+02\n1 3753     1.934301e+02 1.437200e+02\n12 3753     -8.203998e+01 1.909200e+02\n0 3754     2.289200e+02 -4.129100e+02\n1 3754     2.644800e+02 -4.492300e+02\n0 3755     -2.479300e+02 -5.147600e+02\n1 3755     -2.161300e+02 -3.834800e+02\n6 3755     -1.408700e+02 -7.106100e+02\n0 3756     3.508900e+02 4.895400e+02\n1 3756     7.569800e+02 4.085500e+02\n5 3756     7.555601e+02 -1.514300e+02\n14 3756     6.567200e+02 -2.302000e+02\n0 3757     -5.680300e+02 6.010010e+00\n1 3757     -3.175100e+02 1.811600e+02\n10 3757     -7.683400e+02 8.898999e+01\n0 3758     3.438900e+02 5.194500e+02\n1 3758     7.582900e+02 4.428700e+02\n11 3758     4.577800e+02 -2.307700e+02\n0 3759     -8.515800e+02 -1.647400e+02\n1 3759     -6.108700e+02 1.015900e+02\n0 3760     -4.653700e+02 2.938900e+02\n1 3760     -1.337400e+02 4.215100e+02\n0 3761     -4.490600e+02 -1.869995e+00\n1 3761     -2.145100e+02 1.427600e+02\n0 3762     -3.421900e+02 8.409000e+01\n1 3762     -8.733002e+01 1.940600e+02\n0 3763     2.042300e+02 5.116700e+02\n1 3763     5.987300e+02 4.698800e+02\n0 3764     2.753500e+02 4.797900e+02\n1 3764     6.686500e+02 4.176800e+02\n0 3765     1.915400e+02 5.187800e+02\n1 3765     5.870601e+02 4.805600e+02\n11 3765     3.185400e+02 -2.397500e+02\n0 3766     2.834600e+02 4.919400e+02\n1 3766     6.832700e+02 4.300300e+02\n0 3767     -1.470100e+02 2.441600e+02\n1 3767     1.549200e+02 2.937500e+02\n0 3768     -1.509000e+02 2.841100e+02\n1 3768     1.654301e+02 3.331500e+02\n10 3768     -3.013700e+02 4.624200e+02\n0 3769     2.524700e+02 2.782700e+02\n1 3769     5.703199e+02 2.181600e+02\n6 3769     -9.717001e+01 3.146400e+02\n13 3769     4.298700e+02 -3.400269e-01\n14 3769     6.149500e+02 -4.600100e+02\n0 3770     -2.468900e+02 -4.181600e+02\n1 3770     -1.805600e+02 -2.964600e+02\n15 3770     -3.085500e+02 -4.615100e+02\n0 3771     -1.119900e+02 2.551600e+02\n1 3771     1.932600e+02 2.949900e+02\n10 3771     -2.522800e+02 4.309200e+02\n15 3771     -2.050000e+02 4.690900e+02\n0 3772     -4.729999e+01 3.028000e+02\n1 3772     2.741400e+02 3.239700e+02\n6 3772     -4.735700e+02 2.578700e+02\n0 3773     -2.393400e+02 1.980400e+02\n1 3773     4.997998e+01 2.737400e+02\n0 3774     -1.134700e+02 2.516200e+02\n1 3774     1.903199e+02 2.921600e+02\n0 3775     2.865300e+02 -1.205600e+02\n1 3775     4.092000e+02 -1.786200e+02\n10 3775     2.493199e+02 3.220001e+01\n0 3776     -6.734998e+01 2.869800e+02\n1 3776     2.483600e+02 3.139900e+02\n6 3776     -4.878000e+02 2.334900e+02\n15 3776     -1.473700e+02 5.197200e+02\n0 3777     -2.092200e+02 -4.780500e+02\n1 3777     -1.680400e+02 -3.631200e+02\n0 3778     -2.367600e+02 1.732500e+02\n1 3778     4.353003e+01 2.497500e+02\n0 3779     -1.410400e+02 1.554700e+02\n1 3779     1.282600e+02 2.073900e+02\n0 3780     -1.991400e+02 2.368000e+02\n1 3780     1.020700e+02 3.004300e+02\n0 3781     2.571700e+02 5.645001e+01\n1 3781     4.365100e+02 7.440002e+00\n0 3782     -4.862400e+02 1.795700e+02\n1 3782     -1.855100e+02 3.195200e+02\n0 3783     6.125601e+02 1.570007e+00\n1 3783     8.428800e+02 -1.727900e+02\n0 3784     2.412200e+02 4.719200e+02\n1 3784     6.286600e+02 4.184500e+02\n6 3784     -2.116700e+02 5.349400e+02\n12 3784     -4.559998e+01 5.094900e+02\n0 3785     3.608900e+02 -5.109003e+01\n1 3785     5.163900e+02 -1.350800e+02\n6 3785     3.295500e+02 5.815002e+01\n10 3785     3.291801e+02 1.197200e+02\n12 3785     3.743101e+02 9.254999e+01\n15 3785     4.685000e+02 1.164900e+02\n0 3786     5.511100e+02 2.385600e+02\n1 3786     8.532800e+02 9.694000e+01\n7 3786     3.708300e+02 4.013400e+02\n10 3786     5.267400e+02 4.793500e+02\n11 3786     6.798700e+02 -4.842100e+02\n15 3786     7.112100e+02 5.456200e+02\n0 3787     5.412700e+02 2.246500e+02\n1 3787     8.380000e+02 8.514999e+01\n10 3787     5.161300e+02 4.619600e+02\n15 3787     6.989100e+02 5.243900e+02\n0 3788     -1.237400e+02 -5.082200e+02\n1 3788     -1.015000e+02 -4.188300e+02\n0 3789     3.143199e+02 -2.083100e+02\n1 3789     4.081899e+02 -2.756200e+02\n10 3789     2.906000e+02 -6.626001e+01\n15 3789     4.215699e+02 -1.043700e+02\n0 3790     3.534900e+02 2.365002e+01\n1 3790     5.408500e+02 -5.859998e+01\n15 3790     4.508400e+02 2.176200e+02\n0 3791     4.765997e+01 -3.970300e+02\n1 3791     9.104999e+01 -3.707700e+02\n7 3791     2.870001e+01 -2.770400e+02\n13 3791     4.551000e+02 -5.821100e+02\n0 3792     2.928700e+02 2.025500e+02\n1 3792     5.824399e+02 1.310100e+02\n0 3793     3.640200e+02 -1.176300e+02\n1 3793     4.963101e+02 -2.025800e+02\n10 3793     3.392800e+02 4.256000e+01\n0 3794     1.550300e+02 1.847300e+02\n1 3794     3.843199e+02 1.635600e+02\n10 3794     6.765997e+01 3.737800e+02\n15 3794     1.562200e+02 4.130800e+02\n0 3795     3.866600e+02 -3.631000e+01\n1 3795     5.545601e+02 -1.299000e+02\n10 3795     3.579301e+02 1.397400e+02\n15 3795     5.046000e+02 1.402500e+02\n0 3796     7.959998e+01 2.567400e+02\n1 3796     3.834301e+02 2.449400e+02\n0 3797     2.124301e+02 2.073999e+01\n1 3797     3.756600e+02 -1.341998e+01\n10 3797     1.501500e+02 1.875100e+02\n15 3797     2.516300e+02 1.947200e+02\n0 3798     -1.863900e+02 -4.899399e+02\n1 3798     -1.518900e+02 -3.815300e+02\n7 3798     -1.912300e+02 -4.192300e+02\n0 3799     -3.653998e+01 1.371100e+02\n1 3799     1.781100e+02 1.704000e+02\n15 3799     -1.002800e+02 3.190300e+02\n0 3800     -5.451001e+01 2.389500e+02\n1 3800     2.431200e+02 2.641800e+02\n0 3801     2.336000e+02 1.346800e+02\n1 3801     4.424200e+02 9.187000e+01\n10 3801     1.635800e+02 3.232300e+02\n15 3801     2.689600e+02 3.553100e+02\n0 3802     6.199301e+02 -8.979980e+00\n1 3802     8.470300e+02 -1.860100e+02\n0 3803     5.782500e+02 -1.962000e+01\n1 3803     8.005699e+02 -1.838700e+02\n0 3804     2.455200e+02 1.044900e+02\n1 3804     4.416000e+02 5.914001e+01\n15 3804     2.880500e+02 3.140900e+02\n0 3805     -6.388000e+01 1.878600e+02\n1 3805     2.154000e+02 2.173600e+02\n0 3806     6.805601e+02 -1.204000e+02\n1 3806     8.764800e+02 -3.247300e+02\n0 3807     1.080700e+02 -3.521000e+02\n1 3807     1.659600e+02 -3.485300e+02\n15 3807     1.613400e+02 -3.252500e+02\n0 3808     2.615400e+02 -3.032700e+02\n1 3808     3.330100e+02 -3.519400e+02\n0 3809     1.079999e+01 -2.801100e+02\n1 3809     9.065997e+01 -2.461700e+02\n7 3809     -2.813000e+01 -1.668800e+02\n10 3809     -5.096997e+01 -1.809000e+02\n15 3809     1.878003e+01 -2.405000e+02\n0 3810     -1.801100e+02 -4.776001e+01\n1 3810     -1.408002e+01 3.265002e+01\n12 3810     -2.453300e+02 -5.460999e+01\n15 3810     -2.692800e+02 4.735999e+01\n0 3811     2.047600e+02 3.591400e+02\n1 3811     5.523400e+02 3.123800e+02\n10 3811     1.097700e+02 5.880300e+02\n0 3812     2.599000e+02 2.961200e+02\n1 3812     5.855200e+02 2.340100e+02\n0 3813     2.029000e+02 3.214100e+02\n1 3813     5.355800e+02 2.751500e+02\n0 3814     -1.397400e+02 -5.341801e+02\n1 3814     -1.257900e+02 -4.372000e+02\n0 3815     3.255100e+02 5.779000e+02\n1 3815     7.556600e+02 5.105000e+02\n2 3815     -1.679999e+01 3.458100e+02\n14 3815     6.241000e+02 -1.413200e+02\n0 3816     2.269800e+02 5.089400e+02\n1 3816     6.227400e+02 4.613600e+02\n0 3817     2.196500e+02 5.075300e+02\n1 3817     6.142900e+02 4.618100e+02\n0 3818     2.895200e+02 5.694700e+02\n1 3818     7.109301e+02 5.102700e+02\n14 3818     5.897200e+02 -1.519700e+02\n0 3819     6.192999e+01 2.501600e+02\n1 3819     3.633700e+02 2.432500e+02\n0 3820     -4.390900e+02 9.548999e+01\n1 3820     -1.721200e+02 2.297300e+02\n0 3821     -1.164500e+02 3.539500e+02\n1 3821     2.211899e+02 3.925500e+02\n0 3822     2.360900e+02 3.458000e+02\n1 3822     5.796000e+02 2.905300e+02\n0 3823     5.486100e+02 2.326400e+02\n1 3823     8.489000e+02 9.095001e+01\n11 3823     6.789700e+02 -4.923600e+02\n15 3823     7.085699e+02 5.365600e+02\n0 3824     -2.410999e+01 -6.006000e+01\n1 3824     1.223700e+02 -2.302002e+01\n0 3825     6.463300e+02 -2.384200e+02\n1 3825     7.867500e+02 -4.328100e+02\n10 3825     6.769700e+02 -6.565002e+01\n0 3826     -4.933002e+01 1.912800e+02\n1 3826     2.305500e+02 2.166700e+02\n7 3826     -2.178900e+02 2.584000e+02\n10 3826     -1.701300e+02 3.621800e+02\n0 3827     -1.302500e+02 -4.854900e+02\n1 3827     -9.903998e+01 -3.956300e+02\n0 3828     2.366700e+02 1.629500e+02\n1 3828     4.577500e+02 1.188900e+02\n15 3828     2.703000e+02 3.936500e+02\n0 3829     2.095601e+02 -4.036600e+02\n1 3829     2.479600e+02 -4.335601e+02\n0 3830     1.259900e+02 -2.508600e+02\n1 3830     2.032500e+02 -2.537900e+02\n10 3830     7.827002e+01 -1.347700e+02\n0 3831     8.819000e+01 5.029900e+02\n1 3831     4.710100e+02 4.902100e+02\n0 3832     -3.113800e+02 5.415002e+01\n1 3832     -6.946997e+01 1.579900e+02\n0 3833     -2.798400e+02 1.832400e+02\n1 3833     6.130005e+00 2.704400e+02\n0 3834     -4.627400e+02 1.279000e+02\n1 3834     -1.820800e+02 2.658600e+02\n0 3835     -4.540100e+02 1.309400e+02\n1 3835     -1.730800e+02 2.664600e+02\n0 3836     -7.824500e+02 6.409973e+00\n1 3836     -5.010200e+02 2.348600e+02\n0 3837     3.553199e+02 5.845900e+02\n1 3837     7.918300e+02 5.108400e+02\n14 3837     6.518700e+02 -1.327200e+02\n0 3838     -9.469000e+01 2.332200e+02\n1 3838     2.019399e+02 2.692100e+02\n10 3838     -2.270400e+02 4.071000e+02\n0 3839     -1.790000e+02 2.298700e+02\n1 3839     1.191000e+02 2.885500e+02\n0 3840     3.899200e+02 -8.769000e+01\n1 3840     5.365000e+02 -1.818300e+02\n0 3841     6.964700e+02 -3.105000e+02\n1 3841     8.135300e+02 -5.271500e+02\n7 3841     6.018101e+02 -8.823999e+01\n0 3842     7.478000e+02 -3.044500e+02\n1 3842     8.775000e+02 -5.424800e+02\n0 3843     -1.206700e+02 -5.135500e+02\n1 3843     -1.005900e+02 -4.245300e+02\n0 3844     6.432200e+02 -2.826000e+02\n1 3844     7.646400e+02 -4.767200e+02\n7 3844     5.489200e+02 -7.208002e+01\n0 3845     4.174800e+02 -1.062300e+02\n1 3845     5.575699e+02 -2.098300e+02\n0 3846     3.220900e+02 5.450000e+01\n1 3846     5.091200e+02 -1.579999e+01\n15 3846     4.012800e+02 2.561600e+02\n0 3847     6.752700e+02 -3.604000e+02\n1 3847     7.675500e+02 -5.690400e+02\n7 3847     5.947200e+02 -1.362300e+02\n12 3847     7.714500e+02 -1.856300e+02\n0 3848     3.429000e+02 -1.173100e+02\n1 3848     4.734399e+02 -1.942100e+02\n7 3848     2.634000e+02 5.001001e+01\n0 3849     -2.720800e+02 6.789001e+01\n1 3849     -2.806000e+01 1.603000e+02\n0 3850     -3.051800e+02 2.200500e+02\n1 3850     -4.619995e+00 3.117400e+02\n0 3851     -2.005100e+02 1.658900e+02\n1 3851     7.510999e+01 2.331700e+02\n0 3852     6.044500e+02 -2.826600e+02\n1 3852     7.206200e+02 -4.613300e+02\n3 3852     5.970100e+02 -5.292200e+02\n15 3852     8.427200e+02 -1.701300e+02\n0 3853     -1.564000e+02 4.736200e+02\n1 3853     2.094301e+02 5.213700e+02\n3 3853     -5.662200e+02 -1.005400e+02\n0 3854     3.870300e+02 5.432600e+02\n1 3854     8.165601e+02 4.578100e+02\n3 3854     -1.054700e+02 -2.231000e+01\n0 3855     3.161899e+02 5.366400e+02\n1 3855     7.319301e+02 4.681200e+02\n2 3855     -1.660999e+01 3.030400e+02\n0 3856     1.930400e+02 4.848500e+02\n1 3856     5.792500e+02 4.445900e+02\n9 3856     -2.492600e+02 2.829400e+02\n0 3857     1.974301e+02 5.010000e+02\n1 3857     5.879700e+02 4.604200e+02\n0 3858     1.538700e+02 4.865300e+02\n1 3858     5.368700e+02 4.567400e+02\n11 3858     2.876500e+02 -2.697500e+02\n0 3859     5.460999e+01 3.270020e+00\n1 3859     2.130699e+02 1.663000e+01\n10 3859     -3.041998e+01 1.502700e+02\n15 3859     3.809003e+01 1.492200e+02\n0 3860     2.277900e+02 2.324600e+02\n1 3860     5.258700e+02 1.796800e+02\n10 3860     1.485500e+02 4.386900e+02\n13 3860     4.206100e+02 -4.023999e+01\n14 3860     6.049399e+02 -5.116801e+02\n0 3861     3.121600e+02 5.358500e+02\n1 3861     7.269800e+02 4.682500e+02\n14 3861     6.150601e+02 -1.844900e+02\n0 3862     1.631899e+02 5.141800e+02\n1 3862     5.546801e+02 4.827400e+02\n14 3862     4.707800e+02 -2.149700e+02\n0 3863     3.511700e+02 5.524300e+02\n1 3863     7.772300e+02 4.761400e+02\n6 3863     -1.120700e+02 6.557800e+02\n14 3863     6.513300e+02 -1.655300e+02\n0 3864     3.501001e+01 1.502900e+02\n1 3864     2.470300e+02 1.645000e+02\n5 3864     6.414900e+02 -5.017800e+02\n6 3864     -7.541998e+01 1.878900e+02\n15 3864     -5.570007e+00 3.469600e+02\n0 3865     -4.559300e+02 9.592001e+01\n1 3865     -1.862700e+02 2.348400e+02\n0 3866     -1.615500e+02 1.761000e+02\n1 3866     1.161800e+02 2.325100e+02\n0 3867     2.499301e+02 2.567300e+02\n1 3867     5.589100e+02 1.975900e+02\n10 3867     1.723400e+02 4.696100e+02\n14 3867     6.202400e+02 -4.831600e+02\n0 3868     5.159003e+01 1.120000e+02\n1 3868     2.473199e+02 1.231500e+02\n0 3869     -2.152700e+02 -4.819900e+02\n1 3869     -1.749800e+02 -3.646300e+02\n0 3870     4.305601e+02 2.646400e+02\n1 3870     7.505400e+02 1.546700e+02\n14 3870     8.323700e+02 -4.596300e+02\n0 3871     2.502100e+02 2.601100e+02\n1 3871     5.606700e+02 2.007400e+02\n6 3871     -8.754999e+01 2.947200e+02\n0 3872     -1.414400e+02 2.309200e+02\n1 3872     1.555300e+02 2.795900e+02\n0 3873     3.310500e+02 -2.946997e+01\n1 3873     4.905300e+02 -1.032500e+02\n7 3873     2.359301e+02 1.323000e+02\n10 3873     2.925699e+02 1.412100e+02\n0 3874     -2.582900e+02 -4.258900e+02\n1 3874     -1.937700e+02 -2.999100e+02\n0 3875     -1.265900e+02 2.347200e+02\n1 3875     1.713000e+02 2.792500e+02\n0 3876     -5.109300e+02 1.390800e+02\n1 3876     -2.215400e+02 2.882900e+02\n0 3877     1.532800e+02 -5.453199e+02\n1 3877     1.460699e+02 -5.496200e+02\n10 3877     1.411800e+02 -4.688101e+02\n0 3878     6.810999e+01 2.601600e+02\n1 3878     3.733101e+02 2.514900e+02\n0 3879     6.651801e+02 -9.409003e+01\n1 3879     8.682400e+02 -2.915100e+02\n0 3880     5.255800e+02 1.316200e+02\n1 3880     7.935500e+02 -8.830017e+00\n0 3881     -6.502002e+01 -5.657400e+02\n1 3881     -6.877002e+01 -4.915900e+02\n0 3882     4.137600e+02 4.644800e+02\n1 3882     8.232500e+02 3.648400e+02\n7 3882     1.728101e+02 5.719100e+02\n0 3883     3.590100e+02 -9.198999e+01\n1 3883     4.996300e+02 -1.750100e+02\n0 3884     1.318000e+02 -1.791800e+02\n1 3884     2.321801e+02 -1.861200e+02\n10 3884     7.772998e+01 -5.196997e+01\n15 3884     1.673000e+02 -8.745001e+01\n0 3885     2.700200e+02 -2.902900e+02\n1 3885     3.462100e+02 -3.428200e+02\n15 3885     3.738300e+02 -2.203800e+02\n0 3886     6.350000e+01 1.584600e+02\n1 3886     2.816600e+02 1.642700e+02\n10 3886     -3.632001e+01 3.326500e+02\n15 3886     3.304999e+01 3.626100e+02\n0 3887     2.931500e+02 2.755300e+02\n1 3887     6.123600e+02 2.037200e+02\n6 3887     -4.896997e+01 3.234200e+02\n0 3888     1.597800e+02 4.938600e+02\n1 3888     5.449000e+02 4.627800e+02\n11 3888     2.915601e+02 -2.632400e+02\n0 3889     -7.145600e+02 -3.606100e+02\n1 3889     -5.637800e+02 -1.054700e+02\n0 3890     4.044301e+02 -2.188900e+02\n1 3890     5.186200e+02 -3.201200e+02\n7 3890     3.270100e+02 -4.696997e+01\n15 3890     5.530200e+02 -1.066300e+02\n0 3891     2.975300e+02 5.616200e+02\n1 3891     7.181500e+02 4.997200e+02\n11 3891     4.104900e+02 -1.973300e+02\n0 3892     -1.211300e+02 2.577600e+02\n1 3892     1.855000e+02 2.998300e+02\n15 3892     -2.179100e+02 4.719800e+02\n0 3893     3.991700e+02 4.590500e+02\n1 3893     8.039301e+02 3.633300e+02\n0 3894     5.173900e+02 -3.242000e+02\n1 3894     6.071500e+02 -4.690601e+02\n7 3894     4.457500e+02 -1.307900e+02\n10 3894     5.351500e+02 -1.769800e+02\n0 3895     3.556801e+02 5.722700e+02\n1 3895     7.885500e+02 4.970800e+02\n0 3896     1.578998e+01 5.728000e+02\n1 3896     4.119900e+02 5.802800e+02\n11 3896     1.574000e+02 -2.017100e+02\n0 3897     3.345100e+02 5.665900e+02\n1 3897     7.620200e+02 4.960300e+02\n0 3898     4.184900e+02 5.518500e+02\n1 3898     8.567400e+02 4.594800e+02\n0 3899     3.491200e+02 5.688000e+02\n1 3899     7.799399e+02 4.949000e+02\n2 3899     6.010010e+00 3.377600e+02\n6 3899     -1.185000e+02 6.772900e+02\n8 3899     8.573999e+01 2.654600e+02\n0 3900     4.167700e+02 5.471100e+02\n1 3900     8.530800e+02 4.545200e+02\n0 3901     3.217400e+02 5.498100e+02\n1 3901     7.421300e+02 4.810700e+02\n2 3901     -1.382001e+01 3.169400e+02\n5 3901     7.228199e+02 -8.873999e+01\n6 3901     -1.426000e+02 6.483800e+02\n13 3901     4.423900e+02 2.317500e+02\n14 3901     6.225699e+02 -1.698800e+02\n0 3902     1.534800e+02 5.844300e+02\n1 3902     5.630300e+02 5.586200e+02\n0 3903     1.786100e+02 5.222900e+02\n1 3903     5.738900e+02 4.876800e+02\n0 3904     4.154800e+02 4.569600e+02\n1 3904     8.227000e+02 3.567400e+02\n5 3904     8.242400e+02 -1.840300e+02\n7 3904     1.723800e+02 5.666500e+02\n0 3905     2.241200e+02 4.896700e+02\n1 3905     6.148101e+02 4.415100e+02\n7 3905     -1.060999e+01 5.802200e+02\n0 3906     3.494000e+02 4.652100e+02\n1 3906     7.481700e+02 3.827700e+02\n2 3906     2.133002e+01 2.264700e+02\n7 3906     1.101400e+02 5.677800e+02\n9 3906     -1.322200e+02 2.724700e+02\n11 3906     4.698800e+02 -2.787500e+02\n0 3907     3.776700e+02 4.556900e+02\n1 3907     7.782000e+02 3.652700e+02\n0 3908     3.094500e+02 3.915100e+02\n1 3908     6.772200e+02 3.168600e+02\n6 3908     -1.064000e+02 4.542900e+02\n7 3908     8.609998e+01 4.931200e+02\n13 3908     4.487600e+02 9.748001e+01\n0 3909     8.619995e+00 4.878003e+01\n1 3909     1.849700e+02 7.440997e+01\n0 3910     -6.125000e+01 -5.581899e+02\n1 3910     -6.187000e+01 -4.862200e+02\n7 3910     -4.803003e+01 -4.595500e+02\n10 3910     -1.038400e+02 -5.081600e+02\n0 3911     -6.941998e+01 -5.573400e+02\n1 3911     -6.990002e+01 -4.824800e+02\n0 3912     2.532100e+02 -1.057800e+02\n1 3912     3.803199e+02 -1.527600e+02\n10 3912     2.100601e+02 4.459998e+01\n0 3913     2.230699e+02 2.951800e+02\n1 3913     5.459600e+02 2.433600e+02\n0 3914     -7.797900e+02 -8.690002e+00\n1 3914     -5.035700e+02 2.209000e+02\n0 3915     -5.767800e+02 -4.369995e+00\n1 3915     -3.289900e+02 1.742900e+02\n0 3916     3.417999e+01 -1.272800e+02\n1 3916     1.539600e+02 -1.045300e+02\n6 3916     5.466998e+01 -1.124500e+02\n12 3916     6.090002e+01 -6.279999e+01\n15 3916     2.803998e+01 -3.064001e+01\n0 3917     8.151001e+01 2.450400e+02\n1 3917     3.810400e+02 2.330700e+02\n0 3918     3.536400e+02 -1.771800e+02\n1 3918     4.602500e+02 -2.577800e+02\n0 3919     -5.026001e+01 -1.713500e+02\n1 3919     6.073999e+01 -1.219500e+02\n0 3920     -2.931000e+01 -3.432200e+02\n1 3920     4.189001e+01 -2.954000e+02\n0 3921     3.959900e+02 -1.115002e+01\n1 3921     5.743101e+02 -1.071900e+02\n0 3922     1.822300e+02 -3.617900e+02\n1 3922     2.386300e+02 -3.844800e+02\n0 3923     1.943500e+02 -3.792200e+02\n1 3923     2.448700e+02 -4.044000e+02\n0 3924     5.209000e+02 -2.723900e+02\n1 3924     6.323199e+02 -4.189800e+02\n0 3925     5.113101e+02 -3.692700e+02\n1 3925     5.818000e+02 -5.120699e+02\n0 3926     6.195300e+02 -3.508800e+02\n1 3926     7.083600e+02 -5.362100e+02\n15 3926     8.716400e+02 -2.618500e+02\n0 3927     5.321997e+01 2.404100e+02\n1 3927     3.508400e+02 2.365500e+02\n7 3927     -1.286400e+02 3.178700e+02\n0 3928     2.054301e+02 5.152000e+02\n1 3928     6.011700e+02 4.733200e+02\n0 3929     2.996600e+02 5.306100e+02\n1 3929     7.110000e+02 4.660500e+02\n0 3930     2.630500e+02 -1.439900e+02\n1 3930     3.763700e+02 -1.937800e+02\n7 3930     1.973101e+02 1.469000e+01\n10 3930     2.251400e+02 2.010010e+00\n0 3931     3.664000e+02 3.329800e+02\n1 3931     7.150800e+02 2.410900e+02\n6 3931     -4.510010e+00 4.049200e+02\n0 3932     1.131200e+02 1.774000e+02\n1 3932     3.393500e+02 1.670200e+02\n0 3933     -7.881700e+02 -5.370699e+02\n1 3933     -6.757700e+02 -2.351400e+02\n0 3934     -7.023400e+02 -5.800000e+02\n1 3934     -6.223300e+02 -2.975100e+02\n0 3935     -1.417500e+02 2.733000e+02\n1 3935     1.707300e+02 3.201000e+02\n11 3935     2.106000e+01 -4.710100e+02\n15 3935     -2.478800e+02 4.904900e+02\n0 3936     -1.957000e+02 2.128700e+02\n1 3936     9.690002e+01 2.765900e+02\n0 3937     5.190200e+02 -2.590400e+02\n1 3937     6.357300e+02 -4.044200e+02\n0 3938     -5.558400e+02 6.359985e+00\n1 3938     -3.070600e+02 1.783900e+02\n0 3939     -7.390997e+01 -2.766700e+02\n1 3939     1.816998e+01 -2.170200e+02\n7 3939     -1.193100e+02 -1.846000e+02\n15 3939     -9.434998e+01 -2.472100e+02\n0 3940     -1.538400e+02 -5.241200e+02\n1 3940     -1.346100e+02 -4.234300e+02\n4 3940     -6.580100e+02 -2.633700e+02\n7 3940     -1.485500e+02 -4.466500e+02\n9 3940     7.290997e+01 -4.465500e+02\n0 3941     -6.892999e+01 -1.369000e+02\n1 3941     5.648999e+01 -8.354999e+01\n10 3941     -1.583100e+02 -2.481000e+01\n0 3942     7.225000e+01 -1.502002e+01\n1 3942     2.241899e+02 -6.080017e+00\n0 3943     -2.402002e+01 -3.137200e+02\n1 3943     5.326001e+01 -2.686700e+02\n15 3943     -2.222998e+01 -2.906400e+02\n0 3944     7.436300e+02 -3.300900e+02\n1 3944     8.617400e+02 -5.673000e+02\n0 3945     5.264600e+02 1.977002e+01\n1 3945     7.597600e+02 -1.260800e+02\n6 3945     3.567300e+02 1.258400e+02\n7 3945     3.751400e+02 1.833800e+02\n10 3945     5.151200e+02 2.210100e+02\n13 3945     7.426600e+02 -1.920900e+02\n15 3945     7.022100e+02 2.357400e+02\n0 3946     2.032900e+02 2.679400e+02\n1 3946     5.145500e+02 2.218500e+02\n0 3947     1.020700e+02 -1.367800e+02\n1 3947     2.167700e+02 -1.349300e+02\n0 3948     3.889900e+02 -2.935300e+02\n1 3948     4.735400e+02 -3.898700e+02\n0 3949     -1.070300e+02 2.439400e+02\n1 3949     1.937200e+02 2.829000e+02\n0 3950     -2.940400e+02 3.206400e+02\n1 3950     3.600000e+01 4.050600e+02\n0 3951     1.206400e+02 -2.166800e+02\n1 3951     2.079301e+02 -2.185600e+02\n0 3952     7.353998e+01 2.212100e+02\n1 3952     3.639200e+02 2.118800e+02\n6 3952     -2.664800e+02 2.018800e+02\n10 3952     -3.058002e+01 4.093000e+02\n13 3952     2.904600e+02 -5.984998e+01\n14 3952     4.381100e+02 -5.308600e+02\n0 3953     3.489800e+02 4.594600e+02\n1 3953     7.467500e+02 3.768100e+02\n6 3953     -9.589001e+01 5.422900e+02\n14 3953     6.581801e+02 -2.619300e+02\n0 3954     3.433700e+02 5.143500e+02\n1 3954     7.562800e+02 4.373800e+02\n5 3954     7.470300e+02 -1.253600e+02\n6 3954     -1.123500e+02 6.089400e+02\n11 3954     4.579399e+02 -2.347000e+02\n12 3954     5.020001e+01 5.714200e+02\n13 3954     4.615000e+02 2.036200e+02\n14 3954     6.472400e+02 -2.048100e+02\n0 3955     5.679200e+02 -1.637300e+02\n1 3955     7.298101e+02 -3.268500e+02\n15 3955     7.790300e+02 -1.144000e+01\n0 3956     3.585300e+02 5.440700e+02\n1 3956     7.833000e+02 4.658300e+02\n0 3957     1.528700e+02 4.748400e+02\n1 3957     5.328900e+02 4.445300e+02\n2 3957     -1.499500e+02 2.330200e+02\n5 3957     5.553800e+02 -1.732000e+02\n6 3957     -3.058900e+02 5.201600e+02\n0 3958     3.489800e+02 4.594600e+02\n1 3958     7.467500e+02 3.768100e+02\n6 3958     -9.589001e+01 5.422900e+02\n0 3959     4.030800e+02 3.782200e+02\n1 3959     7.753400e+02 2.777600e+02\n6 3959     6.890015e+00 4.630600e+02\n0 3960     2.554100e+02 2.566100e+02\n1 3960     5.646700e+02 1.958200e+02\n6 3960     -7.957001e+01 2.923900e+02\n11 3960     3.953500e+02 -4.787900e+02\n0 3961     1.155800e+02 4.476400e+02\n1 3961     4.856500e+02 4.260700e+02\n2 3961     -1.804500e+02 2.013600e+02\n6 3961     -3.413800e+02 4.774400e+02\n7 3961     -1.084500e+02 5.262200e+02\n0 3962     3.910000e+02 5.010600e+02\n1 3962     8.075900e+02 4.110500e+02\n6 3962     -6.108002e+01 6.023700e+02\n12 3962     1.004700e+02 5.629000e+02\n0 3963     1.960000e+02 3.141200e+02\n1 3963     5.252200e+02 2.695900e+02\n10 3963     1.032900e+02 5.322500e+02\n0 3964     5.127200e+02 -1.382800e+02\n1 3964     6.794500e+02 -2.813800e+02\n0 3965     2.431200e+02 3.373800e+02\n1 3965     5.840400e+02 2.800500e+02\n0 3966     3.106700e+02 -2.140400e+02\n1 3966     4.033300e+02 -2.797500e+02\n15 3966     4.174900e+02 -1.121300e+02\n0 3967     -1.640300e+02 1.335700e+02\n1 3967     9.802002e+01 1.931200e+02\n13 3967     1.043100e+02 -1.495800e+02\n0 3968     3.963700e+02 -9.503003e+01\n1 3968     5.401700e+02 -1.911400e+02\n15 3968     5.239301e+02 6.084998e+01\n0 3969     3.104700e+02 -1.954700e+02\n1 3969     4.077600e+02 -2.608900e+02\n12 3969     3.879100e+02 -6.421997e+01\n0 3970     -6.638000e+01 1.836700e+02\n1 3970     2.108500e+02 2.138500e+02\n0 3971     5.893300e+02 -1.253998e+01\n1 3971     8.141000e+02 -1.800900e+02\n7 3971     4.421000e+02 1.647900e+02\n15 3971     7.938900e+02 2.000600e+02\n0 3972     -4.263300e+02 8.130005e+00\n1 3972     -1.908900e+02 1.459700e+02\n0 3973     2.876801e+02 1.146100e+02\n1 3973     4.939900e+02 5.532001e+01\n10 3973     2.288700e+02 3.046200e+02\n0 3974     1.261600e+02 -1.929999e+01\n1 3974     2.749700e+02 -2.673999e+01\n15 3974     1.377900e+02 1.280300e+02\n0 3975     -8.484900e+02 -4.218100e+02\n1 3975     -6.875000e+02 -1.201000e+02\n4 3975     -4.366800e+02 1.925700e+02\n0 3976     -1.910000e+02 1.736500e+02\n1 3976     8.665997e+01 2.382800e+02\n0 3977     3.154301e+02 2.353200e+02\n1 3977     6.193800e+02 1.571100e+02\n6 3977     1.380005e+00 2.862100e+02\n0 3978     2.601100e+02 5.066200e+02\n1 3978     6.592500e+02 4.501200e+02\n0 3979     3.126600e+02 2.268000e+02\n1 3979     6.129301e+02 1.498300e+02\n0 3980     2.257600e+02 5.057900e+02\n1 3980     6.212800e+02 4.581600e+02\n0 3981     1.891400e+02 4.992400e+02\n1 3981     5.784900e+02 4.610000e+02\n11 3981     3.182100e+02 -2.573800e+02\n0 3982     2.537000e+02 5.034100e+02\n1 3982     6.514800e+02 4.486800e+02\n11 3982     3.766100e+02 -2.501400e+02\n0 3983     3.861801e+02 -1.212500e+02\n1 3983     5.176600e+02 -2.137000e+02\n0 3984     2.034800e+02 -2.024500e+02\n1 3984     2.961000e+02 -2.318000e+02\n7 3984     1.520300e+02 -5.121997e+01\n0 3985     -2.913600e+02 -4.287400e+02\n1 3985     -2.242600e+02 -2.918500e+02\n4 3985     -5.437100e+02 -1.609000e+02\n0 3986     -1.522300e+02 2.070700e+02\n1 3986     1.364200e+02 2.596600e+02\n0 3987     3.535400e+02 -1.147400e+02\n1 3987     4.861500e+02 -1.966000e+02\n0 3988     -1.487700e+02 2.272900e+02\n1 3988     1.470100e+02 2.779300e+02\n7 3988     -3.288500e+02 2.758500e+02\n0 3989     -1.024800e+02 2.453200e+02\n1 3989     1.982000e+02 2.830000e+02\n0 3990     5.914100e+02 -2.441600e+02\n1 3990     7.224800e+02 -4.174600e+02\n6 3990     5.683600e+02 -1.122600e+02\n0 3991     3.772500e+02 3.334600e+02\n1 3991     7.267100e+02 2.391700e+02\n0 3992     -3.273800e+02 3.021300e+02\n1 3992     -2.849976e+00 3.961200e+02\n0 3993     2.401600e+02 5.021400e+02\n1 3993     6.355500e+02 4.507400e+02\n0 3994     2.195200e+02 4.990000e+02\n1 3994     6.118199e+02 4.526700e+02\n0 3995     1.521200e+02 4.821100e+02\n1 3995     5.340800e+02 4.523600e+02\n0 3996     3.776700e+02 4.556900e+02\n1 3996     7.782000e+02 3.652700e+02\n6 3996     -6.579999e+01 5.430200e+02\n0 3997     -1.369400e+02 4.600600e+02\n1 3997     2.259600e+02 5.028800e+02\n2 3997     -4.182500e+02 2.122600e+02\n0 3998     -5.084300e+02 2.353000e+02\n1 3998     -1.889900e+02 3.766400e+02\n0 3999     -3.008500e+02 4.894800e+02\n1 3999     6.883002e+01 5.716200e+02\n5 3999     1.104700e+02 -1.609100e+02\n12 3999     -6.391000e+02 4.545300e+02\n0 4000     1.693900e+02 5.241200e+02\n1 4000     5.645400e+02 4.919000e+02\n0 4001     -1.076200e+02 -7.999878e-01\n1 4001     6.779999e+01 5.681000e+01\n0 4002     3.575400e+02 4.514500e+02\n1 4002     7.540200e+02 3.662600e+02\n0 4003     2.279200e+02 4.679700e+02\n1 4003     6.130300e+02 4.179300e+02\n7 4003     -3.770020e+00 5.587100e+02\n0 4004     2.363700e+02 2.802000e+02\n1 4004     5.540900e+02 2.246500e+02\n0 4005     -2.400300e+02 -4.172700e+02\n1 4005     -1.741500e+02 -2.980500e+02\n0 4006     1.221300e+02 -5.630699e+02\n1 4006     1.091400e+02 -5.550900e+02\n0 4007     3.660300e+02 -2.279200e+02\n1 4007     4.685800e+02 -3.152800e+02\n0 4008     -1.257000e+02 -5.287700e+02\n1 4008     -1.107300e+02 -4.369800e+02\n6 4008     1.119000e+01 -6.646700e+02\n7 4008     -1.200600e+02 -4.447800e+02\n0 4009     -8.133002e+01 -1.369100e+02\n1 4009     4.470001e+01 -8.003998e+01\n7 4009     -1.441000e+02 -3.890002e+01\n12 4009     -7.965002e+01 -1.155500e+02\n15 4009     -1.258000e+02 -5.946997e+01\n0 4010     7.259998e+01 7.681000e+01\n1 4010     2.543900e+02 8.314999e+01\n10 4010     -1.756000e+01 2.379500e+02\n15 4010     5.352002e+01 2.515600e+02\n0 4011     -7.015997e+01 -5.421002e+01\n1 4011     8.231000e+01 -4.330017e+00\n15 4011     -1.210300e+02 5.384003e+01\n0 4012     3.006899e+02 -9.897998e+01\n1 4012     4.331500e+02 -1.623700e+02\n15 4012     3.897700e+02 4.323999e+01\n0 4013     4.956000e+01 1.770900e+02\n1 4013     2.731700e+02 1.860900e+02\n7 4013     -7.596002e+01 2.900500e+02\n0 4014     3.790200e+02 -1.741300e+02\n1 4014     4.919500e+02 -2.645700e+02\n10 4014     3.619700e+02 -1.973999e+01\n15 4014     5.082900e+02 -4.975000e+01\n0 4015     1.943101e+02 3.486600e+02\n1 4015     5.371801e+02 3.046500e+02\n0 4016     -1.371000e+02 -4.897700e+02\n1 4016     -1.071700e+02 -3.973900e+02\n0 4017     -4.209998e+01 2.936200e+02\n1 4017     2.759301e+02 3.137600e+02\n0 4018     -2.623100e+02 2.737000e+01\n1 4018     -3.432001e+01 1.195600e+02\n0 4019     1.973500e+02 2.634200e+02\n1 4019     5.067700e+02 2.189500e+02\n6 4019     -1.505900e+02 2.830600e+02\n15 4019     2.191899e+02 5.247100e+02\n0 4020     -2.752200e+02 -4.254800e+02\n1 4020     -2.085600e+02 -2.941900e+02\n0 4021     2.213400e+02 4.726900e+02\n1 4021     6.070500e+02 4.244600e+02\n0 4022     2.658800e+02 2.739100e+02\n1 4022     5.824500e+02 2.100300e+02\n11 4022     4.048300e+02 -4.620900e+02\n0 4023     -1.858800e+02 4.746002e+01\n1 4023     1.763000e+01 1.231800e+02\n7 4023     -2.991600e+02 1.168800e+02\n10 4023     -3.147100e+02 1.775500e+02\n0 4024     2.328998e+01 1.258200e+02\n1 4024     2.264301e+02 1.442700e+02\n15 4024     -1.884998e+01 3.122400e+02\n0 4025     2.177100e+02 3.439300e+02\n1 4025     5.597200e+02 2.935900e+02\n0 4026     3.875500e+02 -1.805400e+02\n1 4026     5.040400e+02 -2.747700e+02\n10 4026     3.723300e+02 -2.640997e+01\n0 4027     4.147800e+02 -4.679100e+02\n1 4027     4.393199e+02 -5.724900e+02\n0 4028     -4.219000e+01 2.884500e+02\n1 4028     2.738800e+02 3.088500e+02\n7 4028     -2.353500e+02 3.490000e+02\n0 4029     7.190900e+02 -3.067200e+02\n1 4029     8.422900e+02 -5.325601e+02\n7 4029     6.207100e+02 -8.115997e+01\n12 4029     7.870100e+02 -1.229300e+02\n0 4030     2.219000e+01 -9.821997e+01\n1 4030     1.532800e+02 -7.301001e+01\n10 4030     -5.795001e+01 2.989001e+01\n0 4031     -1.337000e+02 -1.093400e+02\n1 4031     5.659973e+00 -3.838000e+01\n10 4031     -2.363200e+02 1.599731e-01\n0 4032     6.510699e+02 -4.563000e+01\n1 4032     8.685400e+02 -2.354000e+02\n0 4033     3.703600e+02 2.052002e+01\n1 4033     5.575000e+02 -6.714001e+01\n10 4033     3.342000e+02 2.034800e+02\n0 4034     5.852200e+02 3.553003e+01\n1 4034     8.248500e+02 -1.279500e+02\n10 4034     5.826700e+02 2.445300e+02\n0 4035     -1.405100e+02 -2.390015e+00\n1 4035     4.073999e+01 6.362000e+01\n10 4035     -2.566700e+02 1.236100e+02\n0 4036     -3.588500e+02 2.095200e+02\n1 4036     -5.829999e+01 3.155700e+02\n10 4036     -5.400000e+02 3.531100e+02\n0 4037     3.749399e+02 -1.139500e+02\n1 4037     5.091100e+02 -2.025700e+02\n10 4037     3.512900e+02 4.851001e+01\n15 4037     4.952800e+02 3.229999e+01\n0 4038     2.559600e+02 -1.262200e+02\n1 4038     3.757500e+02 -1.743100e+02\n10 4038     2.159399e+02 2.165997e+01\n0 4039     4.234301e+02 -6.226001e+01\n1 4039     5.831600e+02 -1.681600e+02\n10 4039     4.024399e+02 1.130900e+02\n15 4039     5.576200e+02 1.107000e+02\n0 4040     5.793400e+02 -2.460600e+02\n1 4040     7.079301e+02 -4.143100e+02\n7 4040     4.824700e+02 -4.934003e+01\n15 4040     8.029399e+02 -1.221800e+02\n0 4041     -1.809300e+02 3.891300e+02\n1 4041     1.639800e+02 4.434400e+02\n7 4041     -3.914600e+02 4.328600e+02\n11 4041     -1.334003e+01 -3.644600e+02\n0 4042     2.113199e+02 -5.448900e+02\n1 4042     2.032200e+02 -5.704500e+02\n0 4043     -7.275000e+02 -3.005900e+02\n1 4043     -5.546900e+02 -4.940002e+01\n0 4044     3.263900e+02 5.381400e+02\n1 4044     7.442200e+02 4.672200e+02\n13 4044     4.475000e+02 2.227700e+02\n0 4045     5.767500e+02 2.173100e+02\n1 4045     8.737500e+02 6.678998e+01\n10 4045     5.584800e+02 4.570800e+02\n15 4045     7.497300e+02 5.197300e+02\n0 4046     1.946200e+02 2.534000e+02\n1 4046     5.001300e+02 2.097900e+02\n7 4046     6.640015e+00 3.498300e+02\n10 4046     1.080500e+02 4.601600e+02\n15 4046     2.164500e+02 5.102500e+02\n0 4047     2.860601e+02 -1.822700e+02\n1 4047     3.882100e+02 -2.397900e+02\n7 4047     2.258101e+02 -1.888000e+01\n0 4048     7.002900e+02 -3.545200e+02\n1 4048     7.990200e+02 -5.733000e+02\n0 4049     3.603400e+02 -1.912000e+02\n1 4049     4.610601e+02 -2.738200e+02\n0 4050     3.861899e+02 -4.227002e+01\n1 4050     5.516100e+02 -1.361700e+02\n10 4050     3.573500e+02 1.328400e+02\n15 4050     5.038500e+02 1.322100e+02\n0 4051     -4.796997e+01 2.852300e+02\n1 4051     2.670699e+02 3.070200e+02\n0 4052     9.028998e+01 3.735700e+02\n1 4052     4.393400e+02 3.572700e+02\n0 4053     -1.145900e+02 2.421000e+02\n1 4053     1.860699e+02 2.828400e+02\n0 4054     1.788199e+02 5.081700e+02\n1 4054     5.695699e+02 4.729000e+02\n0 4055     3.103500e+02 5.325000e+02\n1 4055     7.238900e+02 4.652800e+02\n0 4056     2.937700e+02 4.842000e+02\n1 4056     6.918101e+02 4.177900e+02\n0 4057     3.524500e+02 4.594900e+02\n1 4057     7.504399e+02 3.758800e+02\n0 4058     3.948199e+02 4.635400e+02\n1 4058     8.000100e+02 3.690300e+02\n0 4059     2.471000e+02 5.043400e+02\n1 4059     6.440200e+02 4.511600e+02\n0 4060     1.721500e+02 5.078800e+02\n1 4060     5.621000e+02 4.742200e+02\n0 4061     1.459301e+02 4.810000e+02\n1 4061     5.268700e+02 4.527600e+02\n0 4062     3.524500e+02 4.594900e+02\n1 4062     7.504399e+02 3.758800e+02\n0 4063     1.740200e+02 5.140800e+02\n1 4063     5.664200e+02 4.799800e+02\n0 4064     3.655601e+02 5.595500e+02\n1 4064     7.961700e+02 4.807600e+02\n2 4064     2.151001e+01 3.273500e+02\n0 4065     3.677800e+02 4.735900e+02\n1 4065     7.717800e+02 3.870600e+02\n0 4066     1.946700e+02 5.102000e+02\n1 4066     5.874900e+02 4.709500e+02\n0 4067     1.280400e+02 4.935900e+02\n1 4067     5.120800e+02 4.704700e+02\n0 4068     3.629700e+02 4.638600e+02\n1 4068     7.636100e+02 3.781900e+02\n0 4069     4.239100e+02 4.590400e+02\n1 4069     8.336300e+02 3.566100e+02\n0 4070     1.897100e+02 5.089200e+02\n1 4070     5.814800e+02 4.707000e+02\n0 4071     2.524399e+02 5.150600e+02\n1 4071     6.516899e+02 4.614500e+02\n0 4072     2.747600e+02 5.141700e+02\n1 4072     6.787300e+02 4.547700e+02\n0 4073     4.192800e+02 4.598200e+02\n1 4073     8.282800e+02 3.589000e+02\n0 4074     4.189600e+02 4.515300e+02\n1 4074     8.260500e+02 3.494800e+02\n0 4075     2.837600e+02 5.317600e+02\n1 4075     6.931600e+02 4.712600e+02\n0 4076     2.747600e+02 5.141700e+02\n1 4076     6.787300e+02 4.547700e+02\n11 4076     3.956200e+02 -2.391600e+02\n0 4077     2.424900e+02 5.276600e+02\n1 4077     6.460601e+02 4.772200e+02\n0 4078     2.531600e+02 5.054600e+02\n1 4078     6.511500e+02 4.508400e+02\n0 4079     1.898600e+02 5.275400e+02\n1 4079     5.874700e+02 4.898700e+02\n0 4080     2.488300e+02 5.157800e+02\n1 4080     6.478000e+02 4.632000e+02\n0 4081     1.580601e+02 5.103900e+02\n1 4081     5.478800e+02 4.803400e+02\n0 4082     1.280400e+02 4.935900e+02\n1 4082     5.120800e+02 4.704700e+02\n0 4083     -1.820100e+02 -5.221000e+02\n1 4083     -1.596700e+02 -4.121400e+02\n0 4084     2.166600e+02 2.304700e+02\n1 4084     5.138500e+02 1.806400e+02\n6 4084     -1.061600e+02 2.533200e+02\n0 4085     3.103600e+02 2.662600e+02\n1 4085     6.269000e+02 1.896200e+02\n6 4085     -2.346002e+01 3.177200e+02\n0 4086     2.166600e+02 2.304700e+02\n1 4086     5.138500e+02 1.806400e+02\n6 4086     -1.061600e+02 2.533200e+02\n0 4087     -2.445000e+02 -4.823199e+02\n1 4087     -2.014800e+02 -3.555800e+02\n6 4087     -1.588800e+02 -6.730300e+02\n0 4088     2.363700e+02 2.802000e+02\n1 4088     5.540900e+02 2.246500e+02\n6 4088     -1.167000e+02 3.125200e+02\n0 4089     5.819800e+02 -2.655900e+02\n1 4089     7.022100e+02 -4.352400e+02\n6 4089     5.718199e+02 -1.357700e+02\n0 4090     -6.771002e+01 -5.216500e+02\n1 4090     -5.470001e+01 -4.499301e+02\n6 4090     7.108002e+01 -6.309700e+02\n0 4091     2.039700e+02 2.636800e+02\n1 4091     5.142600e+02 2.172500e+02\n6 4091     -1.429900e+02 2.860200e+02\n0 4092     -2.089900e+02 -5.652000e+02\n1 4092     -1.998300e+02 -4.422000e+02\n6 4092     -5.952002e+01 -7.438500e+02\n0 4093     5.524399e+02 -3.213500e+02\n1 4093     6.465200e+02 -4.795500e+02\n6 4093     5.756700e+02 -1.983101e+02\n0 4094     -2.719800e+02 -4.456600e+02\n1 4094     -2.126000e+02 -3.135500e+02\n6 4094     -2.178800e+02 -6.482300e+02\n0 4095     4.306700e+02 -4.716500e+02\n1 4095     4.540000e+02 -5.819700e+02\n6 4095     5.480300e+02 -3.819800e+02\n0 4096     2.435601e+02 2.669000e+02\n1 4096     5.562200e+02 2.093800e+02\n6 4096     -9.944000e+01 3.002500e+02\n0 4097     -5.057001e+01 1.943800e+02\n1 4097     2.305601e+02 2.200400e+02\n6 4097     -3.996500e+02 1.338800e+02\n0 4098     -7.819000e+01 1.989000e+02\n1 4098     2.051000e+02 2.318700e+02\n6 4098     -4.368100e+02 1.306400e+02\n0 4099     -5.909998e+01 1.990000e+02\n1 4099     2.236100e+02 2.268700e+02\n6 4099     -4.135700e+02 1.366600e+02\n0 4100     5.864700e+02 -2.664700e+02\n1 4100     7.068700e+02 -4.378400e+02\n6 4100     5.765699e+02 -1.352100e+02\n0 4101     6.463000e+01 2.249300e+02\n1 4101     3.562600e+02 2.176400e+02\n6 4101     -2.800600e+02 2.032500e+02\n0 4102     2.381700e+02 2.566900e+02\n1 4102     5.467200e+02 2.006700e+02\n6 4102     -9.900000e+01 2.871300e+02\n0 4103     -2.381900e+02 -5.526000e+02\n1 4103     -2.210800e+02 -4.210800e+02\n6 4103     -1.029700e+02 -7.447900e+02\n0 4104     2.921801e+02 9.857001e+01\n1 4104     4.915400e+02 3.809998e+01\n7 4104     1.768800e+02 2.504500e+02\n10 4104     2.352800e+02 2.860800e+02\n15 4104     3.544399e+02 3.129100e+02\n0 4105     1.984998e+01 1.536600e+02\n1 4105     2.346000e+02 1.718600e+02\n0 4106     5.363800e+02 4.219971e+00\n1 4106     7.650900e+02 -1.455700e+02\n7 4106     3.868700e+02 1.704400e+02\n10 4106     5.281400e+02 2.030800e+02\n0 4107     -1.647900e+02 -5.143199e+02\n1 4107     -1.412200e+02 -4.105500e+02\n0 4108     5.283800e+02 -4.068300e+02\n1 4108     5.847800e+02 -5.561000e+02\n7 4108     4.760699e+02 -2.032600e+02\n0 4109     3.277500e+02 -1.283700e+02\n1 4109     4.523700e+02 -2.008000e+02\n15 4109     4.309600e+02 6.469971e+00\n0 4110     5.241400e+02 -2.727700e+02\n1 4110     6.357000e+02 -4.207900e+02\n0 4111     2.091998e+01 1.565800e+02\n1 4111     2.366700e+02 1.743400e+02\n0 4112     3.635400e+02 4.608600e+02\n1 4112     7.635100e+02 3.746400e+02\n0 4113     1.042900e+02 -2.210900e+02\n1 4113     1.901200e+02 -2.176400e+02\n12 4113     1.786800e+02 -1.457600e+02\n0 4114     7.014001e+01 2.485100e+02\n1 4114     3.706801e+02 2.394800e+02\n0 4115     2.408400e+02 2.777300e+02\n1 4115     5.578800e+02 2.208900e+02\n6 4115     -1.106200e+02 3.109400e+02\n0 4116     3.206801e+02 2.287700e+02\n1 4116     6.224100e+02 1.491800e+02\n0 4117     7.700195e-01 -1.054100e+02\n1 4117     1.301600e+02 -7.312000e+01\n0 4118     -8.462900e+02 -1.607700e+02\n1 4118     -6.053700e+02 1.037200e+02\n0 4119     2.258800e+02 -3.915000e+02\n1 4119     2.675200e+02 -4.268600e+02\n0 4120     -2.256400e+02 5.112800e+02\n1 4120     1.486700e+02 5.755300e+02\n2 4120     -5.080500e+02 2.740200e+02\n0 4121     3.167600e+02 2.385000e+02\n1 4121     6.221700e+02 1.600200e+02\n0 4122     -3.050300e+02 -1.208800e+02\n1 4122     -1.261700e+02 -6.169983e+00\n0 4123     5.504800e+02 -2.923300e+02\n1 4123     6.560200e+02 -4.501700e+02\n6 4123     5.576100e+02 -1.708700e+02\n0 4124     -4.903600e+02 1.523900e+02\n1 4124     -1.984300e+02 2.954300e+02\n0 4125     3.133101e+02 1.506000e+01\n1 4125     4.845000e+02 -5.207001e+01\n0 4126     -4.747200e+02 1.707700e+02\n1 4126     -1.779900e+02 3.085200e+02\n0 4127     -1.564800e+02 2.191800e+02\n1 4127     1.367100e+02 2.722000e+02\n0 4128     -7.744500e+02 -5.683101e+02\n1 4128     -6.746100e+02 -2.655300e+02\n0 4129     -2.284400e+02 2.041600e+02\n1 4129     6.257001e+01 2.769900e+02\n0 4130     2.665000e+02 -2.315900e+02\n1 4130     3.509000e+02 -2.817600e+02\n10 4130     2.383700e+02 -9.772998e+01\n0 4131     3.190200e+02 -2.130000e+02\n1 4131     4.133600e+02 -2.809000e+02\n0 4132     -7.792000e+02 -4.716400e+02\n1 4132     -6.491700e+02 -1.821900e+02\n0 4133     -8.292200e+02 -4.361100e+02\n1 4133     -6.771500e+02 -1.377300e+02\n0 4134     -2.022600e+02 2.300900e+02\n1 4134     9.670001e+01 2.946800e+02\n10 4134     -3.556100e+02 3.925400e+02\n0 4135     2.058600e+02 3.159800e+02\n1 4135     5.362700e+02 2.687100e+02\n0 4136     -7.550100e+02 -4.539100e+02\n1 4136     -6.250000e+02 -1.741000e+02\n0 4137     -6.648700e+02 -4.973800e+02\n1 4137     -5.667000e+02 -2.376300e+02\n0 4138     2.024000e+02 -6.526001e+01\n1 4138     3.383101e+02 -9.610999e+01\n0 4139     -8.228003e+01 2.834700e+02\n1 4139     2.322900e+02 3.145400e+02\n0 4140     8.853998e+01 -5.571899e+02\n1 4140     7.948999e+01 -5.373900e+02\n0 4141     -2.678400e+02 -4.208300e+02\n1 4141     -2.004500e+02 -2.922200e+02\n0 4142     5.683002e+01 2.485300e+02\n1 4142     3.573800e+02 2.431500e+02\n0 4143     2.815002e+01 -1.807200e+02\n1 4143     1.321400e+02 -1.547100e+02\n15 4143     2.692999e+01 -1.037600e+02\n0 4144     -7.491200e+02 -4.744200e+02\n1 4144     -6.266200e+02 -1.935700e+02\n0 4145     -2.669300e+02 -4.272100e+02\n1 4145     -2.019500e+02 -2.983900e+02\n0 4146     -1.049000e+02 -5.723400e+02\n1 4146     -1.080100e+02 -4.834500e+02\n6 4146     6.346002e+01 -7.004000e+02\n0 4147     -7.756500e+02 -5.524000e+02\n1 4147     -6.707900e+02 -2.518300e+02\n4 4147     -5.422600e+02 1.665200e+02\n0 4148     -4.747200e+02 1.707700e+02\n1 4148     -1.779900e+02 3.085200e+02\n0 4149     -2.692400e+02 -4.536600e+02\n1 4149     -2.134200e+02 -3.214400e+02\n0 4150     -7.742000e+02 -5.566700e+02\n1 4150     -6.710700e+02 -2.556600e+02\n0 4151     -7.087000e+01 2.928700e+02\n1 4151     2.472100e+02 3.206400e+02\n10 4151     -2.077000e+02 4.808100e+02\n0 4152     -2.278800e+02 1.756500e+02\n1 4152     5.251001e+01 2.498100e+02\n0 4153     3.713000e+02 6.888000e+01\n1 4153     5.843000e+02 -2.053003e+01\n0 4154     -7.925900e+02 -5.380601e+02\n1 4154     -6.795000e+02 -2.347200e+02\n0 4155     -5.664500e+02 1.126001e+01\n1 4155     -3.143800e+02 1.856000e+02\n0 4156     4.064301e+02 3.721002e+01\n1 4156     6.083600e+02 -6.362000e+01\n0 4157     -4.668800e+02 -2.366500e+02\n1 4157     -3.123100e+02 -6.598999e+01\n0 4158     -4.416700e+02 -2.672500e+02\n1 4158     -3.005300e+02 -1.004800e+02\n0 4159     2.053700e+02 -3.814800e+02\n1 4159     2.550300e+02 -4.108900e+02\n0 4160     3.957500e+02 -7.880005e+00\n1 4160     5.770100e+02 -1.049600e+02\n0 4161     -1.103000e+02 -5.101300e+02\n1 4161     -8.976001e+01 -4.252100e+02\n0 4162     -1.852000e+02 -5.230500e+02\n1 4162     -1.628200e+02 -4.115800e+02\n0 4163     -1.552300e+02 1.880900e+02\n1 4163     1.264100e+02 2.420800e+02\n0 4164     5.788600e+02 -4.021002e+01\n1 4164     7.941300e+02 -2.059100e+02\n10 4164     5.830699e+02 1.547600e+02\n15 4164     7.839000e+02 1.582500e+02\n0 4165     -2.510900e+02 1.978700e+02\n1 4165     3.850000e+01 2.766300e+02\n15 4165     -3.882300e+02 3.713700e+02\n0 4166     3.677800e+02 4.735900e+02\n1 4166     7.717800e+02 3.870600e+02\n0 4167     2.936300e+02 4.769500e+02\n1 4167     6.891600e+02 4.101900e+02\n0 4168     -2.986500e+02 -5.702400e+02\n1 4168     -2.812600e+02 -4.168700e+02\n6 4168     -1.622500e+02 -7.952200e+02\n0 4169     -6.996997e+01 1.959700e+02\n1 4169     2.120400e+02 2.268700e+02\n0 4170     -5.839700e+02 -3.000000e+00\n1 4170     -3.346600e+02 1.772800e+02\n0 4171     -1.966000e+02 -4.997300e+02\n1 4171     -1.646300e+02 -3.869200e+02\n0 4172     -4.069400e+02 2.264400e+02\n1 4172     -9.707001e+01 3.433700e+02\n0 4173     -5.312700e+02 1.730900e+02\n1 4173     -2.281500e+02 3.246200e+02\n0 4174     6.191000e+02 -2.091400e+02\n1 4174     7.682200e+02 -3.920600e+02\n0 4175     -1.939800e+02 -5.571500e+02\n1 4175     -1.831300e+02 -4.398199e+02\n0 4176     -1.221800e+02 2.507700e+02\n1 4176     1.816000e+02 2.934500e+02\n0 4177     -5.438600e+02 -5.891998e+01\n1 4177     -3.186200e+02 1.160400e+02\n0 4178     -7.815100e+02 -5.667700e+02\n1 4178     -6.797300e+02 -2.622600e+02\n0 4179     -7.582300e+02 -5.648800e+02\n1 4179     -6.614300e+02 -2.676200e+02\n4 4179     -5.551600e+02 1.573400e+02\n0 4180     6.240300e+02 -3.306500e+02\n1 4180     7.213800e+02 -5.173300e+02\n0 4181     6.823000e+02 -3.147000e+02\n1 4181     7.957800e+02 -5.251500e+02\n0 4182     -5.893600e+02 -4.792500e+02\n1 4182     -4.988100e+02 -2.451200e+02\n10 4182     -7.345300e+02 -4.864700e+02\n0 4183     -8.401001e+01 -5.201001e+01\n1 4183     7.021002e+01 2.099976e+00\n0 4184     -7.234500e+02 -4.637000e+02\n1 4184     -6.032900e+02 -1.918100e+02\n0 4185     2.310100e+02 1.601200e+02\n1 4185     4.496000e+02 1.182300e+02\n0 4186     7.458199e+02 -3.291700e+02\n1 4186     8.653400e+02 -5.674600e+02\n0 4187     2.865800e+02 -1.010500e+02\n1 4187     4.175699e+02 -1.597300e+02\n0 4188     2.345000e+02 3.236400e+02\n1 4188     5.694301e+02 2.686600e+02\n0 4189     5.122400e+02 -1.919000e+02\n1 4189     6.562800e+02 -3.351900e+02\n0 4190     6.085300e+02 -2.837300e+02\n1 4190     7.243101e+02 -4.638700e+02\n0 4191     1.010800e+02 4.426600e+02\n1 4191     4.688700e+02 4.248400e+02\n0 4192     -2.090800e+02 2.086200e+02\n1 4192     8.232001e+01 2.761900e+02\n0 4193     -2.170900e+02 -4.219500e+02\n1 4193     -1.548800e+02 -3.097300e+02\n0 4194     3.762700e+02 -9.481000e+01\n1 4194     5.190500e+02 -1.844800e+02\n10 4194     3.513300e+02 7.108002e+01\n15 4194     4.956700e+02 5.848999e+01\n0 4195     2.929600e+02 -1.914100e+02\n1 4195     3.910601e+02 -2.511900e+02\n0 4196     2.336100e+02 -1.953300e+02\n1 4196     3.295200e+02 -2.349200e+02\n0 4197     -9.904999e+01 2.639300e+02\n1 4197     2.088101e+02 2.998900e+02\n0 4198     -7.327100e+02 -4.311800e+02\n1 4198     -6.004100e+02 -1.609100e+02\n0 4199     2.138101e+02 -3.928400e+02\n1 4199     2.547100e+02 -4.241100e+02\n0 4200     -7.771900e+02 -5.243199e+02\n1 4200     -6.640000e+02 -2.277200e+02\n4 4200     -5.212600e+02 1.642900e+02\n0 4201     -9.821002e+01 -5.551600e+02\n1 4201     -9.558002e+01 -4.706300e+02\n7 4201     -8.600000e+01 -4.657500e+02\n0 4202     5.111200e+02 -3.139000e+02\n1 4202     6.043199e+02 -4.572100e+02\n0 4203     -4.363900e+02 -2.605500e+02\n1 4203     -2.937900e+02 -9.539001e+01\n0 4204     -7.804999e+01 2.078500e+02\n1 4204     2.085500e+02 2.405300e+02\n0 4205     4.026600e+02 3.534600e+02\n1 4205     7.633000e+02 2.526100e+02\n0 4206     2.745900e+02 3.115600e+02\n1 4206     6.070200e+02 2.455100e+02\n0 4207     -8.107001e+01 -5.223800e+02\n1 4207     -6.703998e+01 -4.464100e+02\n0 4208     3.462400e+02 -7.534003e+01\n1 4208     4.903000e+02 -1.539200e+02\n10 4208     3.139700e+02 8.982001e+01\n0 4209     4.959800e+02 -4.098600e+02\n1 4209     5.483199e+02 -5.466700e+02\n0 4210     3.875500e+02 -1.805400e+02\n1 4210     5.040400e+02 -2.747700e+02\n0 4211     5.062300e+02 -2.049000e+02\n1 4211     6.449000e+02 -3.458000e+02\n0 4212     2.426400e+02 1.507600e+02\n1 4212     4.579200e+02 1.053300e+02\n0 4213     7.327600e+02 -3.501200e+02\n1 4213     8.394900e+02 -5.829200e+02\n0 4214     4.665601e+02 2.642000e+02\n1 4214     7.862500e+02 1.450000e+02\n0 4215     4.707000e+02 2.610400e+02\n1 4215     7.900400e+02 1.399800e+02\n0 4216     -1.814500e+02 -5.513199e+02\n1 4216     -1.691800e+02 -4.388700e+02\n0 4217     4.707000e+02 2.610400e+02\n1 4217     7.900400e+02 1.399800e+02\n0 4218     -4.726700e+02 1.610600e+02\n1 4218     -1.798800e+02 2.990300e+02\n0 4219     4.994500e+02 3.890000e+02\n1 4219     8.622800e+02 2.688600e+02\n0 4220     1.019400e+02 -5.411000e+02\n1 4220     9.845001e+01 -5.273800e+02\n0 4221     3.516700e+02 3.279600e+02\n1 4221     6.967400e+02 2.406200e+02\n0 4222     -2.015500e+02 1.874100e+02\n1 4222     8.215997e+01 2.538900e+02\n0 4223     6.405200e+02 -9.815997e+01\n1 4223     8.407200e+02 -2.874600e+02\n10 4223     6.599100e+02 9.509998e+01\n12 4223     6.116400e+02 5.194000e+01\n0 4224     -1.512400e+02 -5.387600e+02\n1 4224     -1.378800e+02 -4.382000e+02\n0 4225     3.418500e+02 -2.701700e+02\n1 4225     4.280200e+02 -3.506900e+02\n15 4225     4.686100e+02 -1.887800e+02\n0 4226     -2.223600e+02 -4.007200e+02\n1 4226     -1.520000e+02 -2.884200e+02\n7 4226     -2.503000e+02 -3.410300e+02\n15 4226     -2.769900e+02 -4.352200e+02\n0 4227     -3.149900e+02 -1.945000e+02\n1 4227     -1.616400e+02 -7.103003e+01\n10 4227     -4.384300e+02 -1.177500e+02\n15 4227     -4.260200e+02 -1.696100e+02\n0 4228     -1.452100e+02 1.301001e+01\n1 4228     4.241998e+01 7.957999e+01\n15 4228     -2.286100e+02 1.348200e+02\n0 4229     -1.910500e+02 -3.535500e+02\n1 4229     -1.089000e+02 -2.546400e+02\n15 4229     -2.405100e+02 -3.675900e+02\n0 4230     6.307600e+02 -1.201001e+01\n1 4230     8.582000e+02 -1.932400e+02\n15 4230     8.527000e+02 2.064000e+02\n0 4231     3.852900e+02 -4.812000e+01\n1 4231     5.484399e+02 -1.406800e+02\n15 4231     5.033300e+02 1.234000e+02\n0 4232     -8.176001e+01 5.832001e+01\n1 4232     1.111600e+02 1.068600e+02\n15 4232     -1.507500e+02 2.048800e+02\n0 4233     -1.847900e+02 -1.583400e+02\n1 4233     -3.934003e+01 -7.364001e+01\n15 4233     -2.570900e+02 -1.029300e+02\n0 4234     3.344900e+02 -1.696997e+01\n1 4234     4.991000e+02 -9.171002e+01\n15 4234     4.269600e+02 1.597200e+02\n0 4235     1.151200e+02 -5.371002e+01\n1 4235     2.537100e+02 -5.716998e+01\n15 4235     1.275600e+02 8.009000e+01\n0 4236     -1.426800e+02 1.004999e+01\n1 4236     4.391998e+01 7.614001e+01\n10 4236     -2.604900e+02 1.378600e+02\n15 4236     -2.254000e+02 1.303500e+02\n0 4237     -6.335900e+02 -3.205000e+02\n1 4237     -4.840400e+02 -9.297998e+01\n15 4237     -8.480500e+02 -3.871400e+02\n0 4238     1.228600e+02 -1.279400e+02\n1 4238     2.405300e+02 -1.330500e+02\n15 4238     1.486500e+02 -1.996002e+01\n0 4239     -7.915002e+01 -2.548100e+02\n1 4239     1.598999e+01 -1.949200e+02\n10 4239     -1.584200e+02 -1.625100e+02\n15 4239     -1.060000e+02 -2.187900e+02\n0 4240     -1.412900e+02 1.787500e+02\n1 4240     1.364500e+02 2.297600e+02\n0 4241     2.119900e+02 4.681900e+02\n1 4241     5.950400e+02 4.223000e+02\n0 4242     -1.054600e+02 2.952800e+02\n1 4242     2.143700e+02 3.319300e+02\n0 4243     2.826600e+02 3.542800e+02\n1 4243     6.332400e+02 2.864500e+02\n0 4244     3.967000e+02 3.297100e+02\n1 4244     7.471600e+02 2.295300e+02\n0 4245     2.176200e+02 -2.858600e+02\n1 4245     2.879399e+02 -3.195000e+02\n15 4245     2.996200e+02 -2.216300e+02\n0 4246     6.469000e+01 -3.997700e+02\n1 4246     1.060700e+02 -3.790000e+02\n0 4247     -2.532000e+02 -5.205601e+02\n1 4247     -2.232800e+02 -3.872900e+02\n0 4248     -4.779700e+02 2.043600e+02\n1 4248     -1.695200e+02 3.402200e+02\n0 4249     -5.854999e+01 -1.389000e+02\n1 4249     6.512000e+01 -8.883002e+01\n0 4250     2.354100e+02 -1.765400e+02\n1 4250     3.380200e+02 -2.176200e+02\n0 4251     -1.303600e+02 1.783400e+02\n1 4251     1.469100e+02 2.262600e+02\n0 4252     3.554800e+02 4.903003e+01\n1 4252     5.538800e+02 -3.404999e+01\n0 4253     2.687600e+02 3.308500e+02\n1 4253     6.083000e+02 2.665900e+02\n0 4254     2.635200e+02 3.216800e+02\n1 4254     6.004700e+02 2.579100e+02\n0 4255     2.049700e+02 2.323000e+02\n1 4255     5.023000e+02 1.859100e+02\n0 4256     -2.459200e+02 4.309003e+01\n1 4256     -1.248999e+01 1.296200e+02\n0 4257     4.207800e+02 3.430500e+02\n1 4257     7.796500e+02 2.366400e+02\n7 4257     2.025900e+02 4.628400e+02\n0 4258     1.686600e+02 4.759800e+02\n1 4258     5.499600e+02 4.413300e+02\n0 4259     5.258400e+02 -3.198400e+02\n1 4259     6.173500e+02 -4.679000e+02\n7 4259     4.521500e+02 -1.247800e+02\n0 4260     1.726100e+02 -5.745699e+02\n1 4260     1.533600e+02 -5.840000e+02\n7 4260     1.846600e+02 -4.260200e+02\n0 4261     3.793600e+02 3.635300e+02\n1 4261     7.421200e+02 2.691200e+02\n0 4262     1.881100e+02 3.743600e+02\n1 4262     5.406600e+02 3.320700e+02\n0 4263     1.940300e+02 3.244700e+02\n1 4263     5.272600e+02 2.804300e+02\n0 4264     3.229500e+02 2.493700e+02\n1 4264     6.331000e+02 1.690300e+02\n0 4265     -2.556700e+02 4.194000e+01\n1 4265     -2.196997e+01 1.312800e+02\n0 4266     5.427200e+02 -2.006700e+02\n1 4266     6.856400e+02 -3.549700e+02\n0 4267     -2.569600e+02 3.878998e+01\n1 4267     -2.426001e+01 1.287800e+02\n0 4268     4.121200e+02 3.020300e+02\n1 4268     7.518900e+02 1.967800e+02\n0 4269     -7.990002e+01 1.955500e+02\n1 4269     2.022000e+02 2.290700e+02\n0 4270     5.403400e+02 -3.547700e+02\n1 4270     6.191600e+02 -5.086600e+02\n0 4271     3.106500e+02 3.855700e+02\n1 4271     6.763199e+02 3.105200e+02\n0 4272     -1.972998e+01 -1.584500e+02\n1 4272     9.512000e+01 -1.186500e+02\n0 4273     5.755601e+02 -3.707800e+02\n1 4273     6.514900e+02 -5.384600e+02\n0 4274     3.102200e+02 2.218700e+02\n1 4274     6.089399e+02 1.448500e+02\n0 4275     2.583400e+02 3.163000e+02\n1 4275     5.912800e+02 2.546600e+02\n0 4276     -7.827002e+01 1.819400e+02\n1 4276     1.987500e+02 2.157100e+02\n0 4277     -5.782600e+02 8.969971e+00\n1 4277     -3.261300e+02 1.864500e+02\n10 4277     -7.793300e+02 9.206000e+01\n0 4278     5.351700e+02 -2.813000e+02\n1 4278     6.441400e+02 -4.330699e+02\n12 4278     5.943700e+02 -1.485300e+02\n0 4279     4.906300e+02 3.145700e+02\n1 4279     8.282600e+02 1.911200e+02\n0 4280     1.773000e+02 3.517600e+02\n1 4280     5.204600e+02 3.123800e+02\n13 4280     3.450400e+02 5.433002e+01\n0 4281     1.368300e+02 -5.448300e+02\n1 4281     1.304600e+02 -5.431400e+02\n15 4281     2.254500e+02 -5.838101e+02\n0 4282     -3.076700e+02 -2.385000e+02\n1 4282     -1.706800e+02 -1.133800e+02\n7 4282     -3.789200e+02 -2.002500e+02\n10 4282     -4.246200e+02 -1.683900e+02\n15 4282     -4.107000e+02 -2.280300e+02\n0 4283     -5.601001e+01 8.616000e+01\n1 4283     1.418300e+02 1.268900e+02\n15 4283     -1.213800e+02 2.452300e+02\n0 4284     9.187000e+01 -3.454500e+02\n1 4284     1.511100e+02 -3.365400e+02\n10 4284     4.910999e+01 -2.469400e+02\n15 4284     1.376500e+02 -3.188800e+02\n0 4285     -1.395100e+02 2.632300e+02\n1 4285     1.690200e+02 3.100900e+02\n15 4285     -2.431200e+02 4.764500e+02\n0 4286     -1.530800e+02 9.130005e+00\n1 4286     3.385999e+01 7.815997e+01\n15 4286     -2.389200e+02 1.283400e+02\n0 4287     5.809800e+02 -3.804900e+02\n1 4287     6.527400e+02 -5.508600e+02\n15 4287     8.199301e+02 -3.073000e+02\n0 4288     -1.282500e+02 -2.662100e+02\n1 4288     -2.338000e+01 -1.921400e+02\n15 4288     -1.671300e+02 -2.405500e+02\n0 4289     4.567600e+02 2.503600e+02\n1 4289     7.725400e+02 1.325700e+02\n0 4290     4.465800e+02 2.122000e+02\n1 4290     7.501700e+02 9.528000e+01\n0 4291     3.237000e+02 -1.781200e+02\n1 4291     4.287100e+02 -2.486000e+02\n0 4292     -2.703900e+02 -5.110800e+02\n1 4292     -2.351600e+02 -3.731200e+02\n0 4293     -1.414500e+02 -5.441899e+02\n1 4293     -1.307600e+02 -4.458300e+02\n0 4294     4.664600e+02 2.440700e+02\n1 4294     7.803600e+02 1.233400e+02\n0 4295     -1.463600e+02 -5.429100e+02\n1 4295     -1.349700e+02 -4.427500e+02\n0 4296     4.792100e+02 2.284600e+02\n1 4296     7.887600e+02 1.037400e+02\n0 4297     4.432300e+02 1.997600e+02\n1 4297     7.419100e+02 8.453000e+01\n0 4298     4.075500e+02 3.645000e+02\n1 4298     7.735200e+02 2.623300e+02\n0 4299     7.374800e+02 -2.789000e+02\n1 4299     8.762900e+02 -5.119000e+02\n0 4300     2.565601e+02 3.070100e+02\n1 4300     5.859900e+02 2.459400e+02\n0 4301     -2.458500e+02 -5.855000e+02\n1 4301     -2.396600e+02 -4.477600e+02\n0 4302     -8.454300e+02 -1.936300e+02\n1 4302     -6.148100e+02 7.507001e+01\n0 4303     6.582001e+01 3.704400e+02\n1 4303     4.128199e+02 3.605900e+02\n0 4304     -4.431000e+02 1.264700e+02\n1 4304     -1.648800e+02 2.596300e+02\n0 4305     2.309301e+02 4.678100e+02\n1 4305     6.166500e+02 4.167800e+02\n14 4305     5.395300e+02 -2.595200e+02\n0 4306     2.885100e+02 1.827500e+02\n1 4306     5.699800e+02 1.124300e+02\n0 4307     5.767500e+02 4.435999e+01\n1 4307     8.186400e+02 -1.160600e+02\n0 4308     2.533101e+02 -1.215400e+02\n1 4308     3.749500e+02 -1.688100e+02\n0 4309     5.571100e+02 -2.452300e+02\n1 4309     6.825200e+02 -4.054900e+02\n0 4310     3.608900e+02 -5.109003e+01\n1 4310     5.163900e+02 -1.350800e+02\n0 4311     3.780699e+02 4.018700e+02\n1 4311     7.570800e+02 3.090100e+02\n0 4312     -4.979700e+02 1.337400e+02\n1 4312     -2.117300e+02 2.803400e+02\n0 4313     -4.447700e+02 5.177002e+01\n1 4313     -1.926200e+02 1.910400e+02\n0 4314     5.248900e+02 -3.653900e+02\n1 4314     5.980300e+02 -5.135200e+02\n0 4315     2.780400e+02 5.275600e+02\n1 4315     6.855500e+02 4.679900e+02\n0 4316     -4.385000e+02 1.627100e+02\n1 4316     -1.480300e+02 2.921500e+02\n0 4317     4.231899e+02 3.665400e+02\n1 4317     7.925699e+02 2.600500e+02\n0 4318     1.687300e+02 -5.732500e+02\n1 4318     1.503199e+02 -5.816100e+02\n0 4319     5.666300e+02 -2.874800e+02\n1 4319     6.764399e+02 -4.518600e+02\n0 4320     -2.790900e+02 3.064001e+01\n1 4320     -4.804999e+01 1.275400e+02\n0 4321     3.783600e+02 4.485100e+02\n1 4321     7.769100e+02 3.575700e+02\n0 4322     5.052000e+02 -4.185700e+02\n1 4322     5.542600e+02 -5.589000e+02\n0 4323     7.419000e+01 4.792100e+02\n1 4323     4.509000e+02 4.699100e+02\n0 4324     3.012500e+02 3.281100e+02\n1 4324     6.419301e+02 2.549800e+02\n0 4325     3.867900e+02 4.717700e+02\n1 4325     7.937400e+02 3.802000e+02\n0 4326     -2.922900e+02 5.609003e+01\n1 4326     -5.096997e+01 1.546600e+02\n0 4327     1.233000e+02 3.676100e+02\n1 4327     4.708700e+02 3.424800e+02\n0 4328     4.908500e+02 -2.620500e+02\n1 4328     6.041899e+02 -3.975100e+02\n0 4329     5.424900e+02 -1.201001e+01\n1 4329     7.651899e+02 -1.640700e+02\n0 4330     -1.927300e+02 1.856900e+02\n1 4330     8.976001e+01 2.498200e+02\n0 4331     -7.519000e+01 -5.005601e+02\n1 4331     -5.359003e+01 -4.283100e+02\n0 4332     -3.047900e+02 -5.846500e+02\n1 4332     -2.920000e+02 -4.279200e+02\n0 4333     7.214700e+02 -3.076800e+02\n1 4333     8.453500e+02 -5.351899e+02\n0 4334     -3.119600e+02 -4.660699e+02\n1 4334     -2.558700e+02 -3.193400e+02\n0 4335     3.958199e+02 -2.854400e+02\n1 4335     4.842400e+02 -3.842900e+02\n0 4336     -5.146997e+01 2.417100e+02\n1 4336     2.471600e+02 2.660800e+02\n0 4337     5.290900e+02 -3.877200e+02\n1 4337     5.928800e+02 -5.371300e+02\n0 4338     -1.804600e+02 1.848600e+02\n1 4338     1.013600e+02 2.459600e+02\n0 4339     3.500400e+02 3.802700e+02\n1 4339     7.172800e+02 2.944100e+02\n0 4340     -1.206700e+02 -5.135500e+02\n1 4340     -1.005900e+02 -4.245300e+02\n0 4341     2.336300e+02 2.084100e+02\n1 4341     5.226700e+02 1.541000e+02\n0 4342     3.053700e+02 2.557400e+02\n1 4342     6.172700e+02 1.806600e+02\n0 4343     -2.238100e+02 1.988500e+02\n1 4343     6.467999e+01 2.705700e+02\n0 4344     5.113400e+02 -3.762900e+02\n1 4344     5.786700e+02 -5.191400e+02\n0 4345     -5.225000e+01 1.859000e+02\n1 4345     2.256400e+02 2.123600e+02\n0 4346     -3.116200e+02 1.041600e+02\n1 4346     -5.183002e+01 2.044500e+02\n0 4347     2.579600e+02 2.929400e+02\n1 4347     5.818199e+02 2.312800e+02\n0 4348     3.022200e+02 2.146500e+02\n1 4348     5.972300e+02 1.402000e+02\n0 4349     6.575000e+01 4.635200e+02\n1 4349     4.367900e+02 4.539400e+02\n0 4350     -2.791000e+02 -4.470900e+02\n1 4350     -2.204300e+02 -3.126600e+02\n0 4351     7.033600e+02 -2.859800e+02\n1 4351     8.323400e+02 -5.046600e+02\n0 4352     -7.856100e+02 -4.898700e+02\n1 4352     -6.598300e+02 -1.956100e+02\n0 4353     6.687700e+02 -2.740100e+02\n1 4353     7.973400e+02 -4.780601e+02\n0 4354     -1.189300e+02 1.793800e+02\n1 4354     1.584100e+02 2.242300e+02\n0 4355     5.866700e+02 -2.151001e+01\n1 4355     8.087300e+02 -1.888000e+02\n0 4356     -1.477100e+02 -4.782700e+02\n1 4356     -1.124300e+02 -3.830200e+02\n0 4357     6.811100e+02 -2.808800e+02\n1 4357     8.087900e+02 -4.901700e+02\n0 4358     -1.778900e+02 1.482900e+02\n1 4358     9.026001e+01 2.105600e+02\n0 4359     4.293700e+02 1.433200e+02\n1 4359     7.036600e+02 3.145001e+01\n0 4360     -2.966400e+02 -4.837200e+02\n1 4360     -2.486900e+02 -3.399500e+02\n0 4361     -6.775200e+02 -5.347900e+02\n1 4361     -5.890400e+02 -2.662600e+02\n0 4362     5.929200e+02 -3.521200e+02\n1 4362     6.778000e+02 -5.268300e+02\n0 4363     3.858800e+02 4.567800e+02\n1 4363     7.880699e+02 3.644000e+02\n0 4364     4.912400e+02 -4.362800e+02\n1 4364     5.322400e+02 -5.706801e+02\n0 4365     3.135200e+02 2.645000e+02\n1 4365     6.295300e+02 1.870000e+02\n0 4366     -4.217500e+02 9.264001e+01\n1 4366     -1.574800e+02 2.228000e+02\n0 4367     -7.804999e+01 2.078500e+02\n1 4367     2.085500e+02 2.405300e+02\n0 4368     -3.994500e+02 8.439999e+01\n1 4368     -1.394300e+02 2.094000e+02\n0 4369     3.180800e+02 3.881000e+02\n1 4369     6.853000e+02 3.110800e+02\n0 4370     4.081000e+02 3.544000e+02\n1 4370     7.700500e+02 2.515600e+02\n0 4371     -1.551500e+02 3.937000e+01\n1 4371     4.315002e+01 1.067300e+02\n0 4372     -1.023700e+02 6.206000e+01\n1 4372     9.789001e+01 1.147000e+02\n0 4373     2.157900e+02 5.006100e+02\n1 4373     6.077900e+02 4.553600e+02\n0 4374     -4.307700e+02 3.096997e+01\n1 4374     -1.869200e+02 1.683200e+02\n0 4375     -2.968900e+02 1.707300e+02\n1 4375     -1.459003e+01 2.630600e+02\n0 4376     2.461400e+02 3.136300e+02\n1 4376     5.775800e+02 2.553500e+02\n0 4377     -5.053300e+02 1.191000e+02\n1 4377     -2.235000e+02 2.686200e+02\n0 4378     -6.749300e+02 3.944500e+02\n1 4378     -2.801500e+02 5.601800e+02\n0 4379     5.354600e+02 -2.655900e+02\n1 4379     6.510200e+02 -4.175700e+02\n0 4380     -3.281700e+02 4.897998e+01\n1 4380     -8.753003e+01 1.580800e+02\n0 4381     -4.064000e+02 5.248999e+01\n1 4381     -1.571300e+02 1.818500e+02\n0 4382     3.199500e+02 2.540800e+02\n1 4382     6.321100e+02 1.746000e+02\n0 4383     -1.428300e+02 -5.086801e+02\n1 4383     -1.192700e+02 -4.129600e+02\n0 4384     3.828400e+02 3.734500e+02\n1 4384     7.503000e+02 2.782800e+02\n0 4385     -2.111700e+02 1.946400e+02\n1 4385     7.525000e+01 2.633700e+02\n0 4386     -2.329100e+02 1.812500e+02\n1 4386     4.997998e+01 2.564900e+02\n0 4387     4.030800e+02 3.782200e+02\n1 4387     7.753400e+02 2.777600e+02\n0 4388     -5.877100e+02 -4.677500e+02\n1 4388     -4.944500e+02 -2.352100e+02\n0 4389     -2.064900e+02 -4.874700e+02\n1 4389     -1.693300e+02 -3.725400e+02\n0 4390     -3.029500e+02 5.919000e+01\n1 4390     -5.987000e+01 1.603900e+02\n0 4391     -2.093400e+02 1.816900e+02\n1 4391     7.233002e+01 2.505600e+02\n0 4392     -1.929500e+02 1.902100e+02\n1 4392     9.123999e+01 2.546800e+02\n0 4393     4.174500e+02 1.950200e+02\n1 4393     7.129301e+02 8.610001e+01\n0 4394     2.232700e+02 4.090200e+02\n1 4394     5.906899e+02 3.576300e+02\n0 4395     6.469100e+02 -3.289000e+02\n1 4395     7.486000e+02 -5.251899e+02\n0 4396     3.712400e+02 4.323000e+02\n1 4396     7.623101e+02 3.426900e+02\n0 4397     -4.893800e+02 -1.316000e+02\n1 4397     -2.954000e+02 3.533002e+01\n0 4398     -4.355600e+02 -2.929200e+02\n1 4398     -3.042400e+02 -1.255800e+02\n0 4399     7.374800e+02 -2.789000e+02\n1 4399     8.762900e+02 -5.119000e+02\n0 4400     -3.955800e+02 -6.563000e+01\n1 4400     -1.891100e+02 7.001001e+01\n0 4401     -6.496900e+02 -3.366100e+02\n1 4401     -5.026300e+02 -1.025400e+02\n0 4402     -3.230900e+02 -2.063700e+02\n1 4402     -1.734500e+02 -7.967999e+01\n0 4403     6.923400e+02 -3.177600e+02\n1 4403     8.059700e+02 -5.325500e+02\n0 4404     1.983600e+02 3.122400e+02\n1 4404     5.271000e+02 2.671500e+02\n0 4405     3.730200e+02 1.109985e+00\n1 4405     5.519000e+02 -8.712000e+01\n0 4406     -7.846100e+02 -5.197500e+02\n1 4406     -6.680000e+02 -2.214600e+02\n0 4407     8.115997e+01 4.162400e+02\n1 4407     4.417200e+02 4.032000e+02\n0 4408     7.204200e+02 -3.484200e+02\n1 4408     8.258600e+02 -5.760100e+02\n0 4409     5.095400e+02 -3.264700e+02\n1 4409     5.975699e+02 -4.686100e+02\n0 4410     5.243400e+02 -1.939700e+02\n1 4410     6.689100e+02 -3.416600e+02\n0 4411     2.322500e+02 2.805400e+02\n1 4411     5.497600e+02 2.260100e+02\n0 4412     -4.173000e+02 -1.792400e+02\n1 4412     -2.482500e+02 -2.740997e+01\n0 4413     8.870001e+01 2.656100e+02\n1 4413     3.961801e+02 2.512300e+02\n0 4414     -2.834600e+02 3.784998e+01\n1 4414     -4.906000e+01 1.352800e+02\n0 4415     5.853900e+02 -2.084900e+02\n1 4415     7.303101e+02 -3.788500e+02\n0 4416     2.150200e+02 3.848800e+02\n1 4416     5.733900e+02 3.351700e+02\n0 4417     -6.983500e+02 -4.776200e+02\n1 4417     -5.876000e+02 -2.109600e+02\n0 4418     -3.265300e+02 -2.217900e+02\n1 4418     -1.822200e+02 -9.316998e+01\n0 4419     -4.690600e+02 -1.631000e+02\n1 4419     -2.885200e+02 1.099976e+00\n0 4420     1.533600e+02 -2.473900e+02\n1 4420     2.305800e+02 -2.591600e+02\n0 4421     -4.019700e+02 -1.176900e+02\n1 4421     -2.126200e+02 2.407001e+01\n0 4422     5.674200e+02 -4.087200e+02\n1 4422     6.254500e+02 -5.731000e+02\n0 4423     4.499100e+02 2.376600e+02\n1 4423     7.612900e+02 1.214100e+02\n0 4424     6.870200e+02 -2.983700e+02\n1 4424     8.084200e+02 -5.104500e+02\n0 4425     -7.264100e+02 -4.604600e+02\n1 4425     -6.044900e+02 -1.879900e+02\n0 4426     2.510000e+02 3.641900e+02\n1 4426     6.028000e+02 3.048300e+02\n0 4427     -4.290100e+02 2.626400e+02\n1 4427     -1.071500e+02 3.828700e+02\n0 4428     6.508199e+02 -3.066600e+02\n1 4428     7.628900e+02 -5.045100e+02\n0 4429     3.678500e+02 4.496800e+02\n1 4429     7.651000e+02 3.615200e+02\n0 4430     -3.318600e+02 -1.784100e+02\n1 4430     -1.713500e+02 -5.144000e+01\n0 4431     3.048199e+02 3.370000e+02\n1 4431     6.499200e+02 2.625700e+02\n0 4432     5.248900e+02 -3.653900e+02\n1 4432     5.980300e+02 -5.135200e+02\n0 4433     1.646899e+02 -5.208900e+02\n1 4433     1.669600e+02 -5.311200e+02\n0 4434     -3.298500e+02 3.456000e+01\n1 4434     -9.358002e+01 1.445500e+02\n0 4435     5.997400e+02 -3.487800e+02\n1 4435     6.868500e+02 -5.263000e+02\n0 4436     2.746400e+02 3.053100e+02\n1 4436     6.046801e+02 2.394700e+02\n0 4437     1.601400e+02 4.968500e+02\n1 4437     5.461200e+02 4.654600e+02\n0 4438     5.402000e+02 -1.624000e+02\n1 4438     6.999399e+02 -3.158900e+02\n0 4439     1.038200e+02 4.009000e+02\n1 4439     4.610000e+02 3.814000e+02\n0 4440     4.342100e+02 1.423100e+02\n1 4440     7.091500e+02 2.908002e+01\n0 4441     5.532900e+02 -4.105900e+02\n1 4441     6.097300e+02 -5.697900e+02\n0 4442     -4.365600e+02 -2.845100e+02\n1 4442     -3.021300e+02 -1.173900e+02\n0 4443     -4.263900e+02 -2.791200e+02\n1 4443     -2.913900e+02 -1.155200e+02\n0 4444     -3.075000e+02 -2.045100e+02\n1 4444     -1.584800e+02 -8.271002e+01\n0 4445     3.033700e+02 2.256300e+02\n1 4445     6.026600e+02 1.510100e+02\n0 4446     -6.090400e+02 3.631000e+01\n1 4446     -3.433100e+02 2.190800e+02\n0 4447     6.748800e+02 -2.718500e+02\n1 4447     8.051700e+02 -4.780800e+02\n0 4448     5.820800e+02 -3.777100e+02\n1 4448     6.553000e+02 -5.485500e+02\n0 4449     3.987300e+02 4.467500e+02\n1 4449     7.993900e+02 3.500900e+02\n0 4450     3.849301e+02 3.799200e+02\n1 4450     7.553500e+02 2.844400e+02\n0 4451     2.965100e+02 2.148400e+02\n1 4451     5.915300e+02 1.423500e+02\n0 4452     1.256500e+02 4.887600e+02\n1 4452     5.073400e+02 4.657200e+02\n0 4453     1.151900e+02 4.658300e+02\n1 4453     4.901899e+02 4.451300e+02\n0 4454     7.281801e+02 -2.809000e+02\n1 4454     8.643700e+02 -5.097500e+02\n0 4455     -3.317200e+02 4.304999e+01\n1 4455     -9.220001e+01 1.530800e+02\n0 4456     5.571002e+01 2.300400e+02\n1 4456     3.492700e+02 2.254700e+02\n0 4457     -4.771700e+02 1.037100e+02\n1 4457     -2.035500e+02 2.472100e+02\n0 4458     -4.130500e+02 -4.470601e+02\n1 4458     -3.384500e+02 -2.704900e+02\n0 4459     5.508700e+02 -3.385500e+02\n1 4459     6.369900e+02 -4.965601e+02\n0 4460     2.932600e+02 -1.703998e+01\n1 4460     4.506899e+02 -7.758002e+01\n0 4461     2.127700e+02 2.780800e+02\n1 4461     5.288000e+02 2.292500e+02\n0 4462     -5.239990e+00 1.254400e+02\n1 4462     2.003700e+02 1.514100e+02\n0 4463     -3.131800e+02 -1.186400e+02\n1 4463     -1.329600e+02 -2.039978e+00\n0 4464     6.784900e+02 -3.100200e+02\n1 4464     7.934399e+02 -5.188900e+02\n0 4465     7.324700e+02 -3.207700e+02\n1 4465     8.521100e+02 -5.527200e+02\n0 4466     5.870900e+02 -3.282500e+02\n1 4466     6.813800e+02 -4.996899e+02\n0 4467     -2.767500e+02 -4.748101e+02\n1 4467     -2.277200e+02 -3.383800e+02\n0 4468     5.719100e+02 -1.807600e+02\n1 4468     7.267300e+02 -3.461300e+02\n0 4469     -1.227500e+02 2.073200e+02\n1 4469     1.649399e+02 2.518900e+02\n0 4470     -7.378400e+02 -3.250400e+02\n1 4470     -5.714600e+02 -6.776001e+01\n0 4471     -7.282100e+02 -4.471801e+02\n1 4471     -6.020800e+02 -1.762800e+02\n0 4472     4.753500e+02 2.400200e+02\n1 4472     7.882600e+02 1.167700e+02\n0 4473     5.164301e+02 -3.371400e+02\n1 4473     6.006600e+02 -4.820699e+02\n0 4474     5.446100e+02 -3.602300e+02\n1 4474     6.216200e+02 -5.158800e+02\n0 4475     5.624900e+02 -4.004900e+02\n1 4475     6.240400e+02 -5.631000e+02\n0 4476     -2.130100e+02 -4.407000e+02\n1 4476     -1.578900e+02 -3.276900e+02\n0 4477     -1.901000e+02 -3.320300e+02\n1 4477     -1.001700e+02 -2.350200e+02\n0 4478     5.724100e+02 -2.836600e+02\n1 4478     6.841200e+02 -4.499700e+02\n0 4479     4.567600e+02 2.503600e+02\n1 4479     7.725400e+02 1.325700e+02\n0 4480     7.390500e+02 -2.872300e+02\n1 4480     8.750400e+02 -5.210800e+02\n0 4481     4.931000e+02 -1.004200e+02\n1 4481     6.736300e+02 -2.366100e+02\n0 4482     -7.215800e+02 -4.693600e+02\n1 4482     -6.035400e+02 -1.970400e+02\n0 4483     6.890997e+01 4.713900e+02\n1 4483     4.419600e+02 4.610200e+02\n0 4484     5.420699e+02 -2.624700e+02\n1 4484     6.595500e+02 -4.168900e+02\n0 4485     -2.731500e+02 -4.393300e+02\n1 4485     -2.118000e+02 -3.073500e+02\n0 4486     4.305601e+02 2.646400e+02\n1 4486     7.505400e+02 1.546700e+02\n0 4487     5.483300e+02 -3.641100e+02\n1 4487     6.242400e+02 -5.212200e+02\n0 4488     5.611500e+02 -2.667100e+02\n1 4488     6.787200e+02 -4.285100e+02\n0 4489     1.143900e+02 4.734600e+02\n1 4489     4.909399e+02 4.525700e+02\n0 4490     3.145699e+02 2.555100e+02\n1 4490     6.267700e+02 1.777200e+02\n0 4491     -4.669000e+01 2.884700e+02\n1 4491     2.699900e+02 3.100200e+02\n0 4492     -6.749300e+02 3.944500e+02\n1 4492     -2.801500e+02 5.601800e+02\n0 4493     -3.011100e+02 1.438200e+02\n1 4493     -2.788000e+01 2.391000e+02\n0 4494     -7.572500e+02 -4.583600e+02\n1 4494     -6.280600e+02 -1.774900e+02\n0 4495     -2.198200e+02 1.865400e+02\n1 4495     6.408002e+01 2.578800e+02\n0 4496     -6.143600e+02 5.340997e+01\n1 4496     -3.420100e+02 2.362600e+02\n0 4497     -9.277002e+01 1.484003e+01\n1 4497     8.803998e+01 6.734998e+01\n0 4498     -2.273400e+02 3.164700e+02\n1 4498     1.013000e+02 3.840600e+02\n0 4499     6.236300e+02 -2.852000e+02\n1 4499     7.405300e+02 -4.711899e+02\n0 4500     3.087900e+02 2.434400e+02\n1 4500     6.160900e+02 1.671600e+02\n0 4501     -1.902700e+02 2.000500e+02\n1 4501     9.721002e+01 2.628600e+02\n0 4502     4.366100e+02 3.027300e+02\n1 4502     7.685500e+02 1.932400e+02\n0 4503     -1.463900e+02 3.316998e+01\n1 4503     4.965002e+01 9.875000e+01\n0 4504     -2.480700e+02 3.478000e+02\n1 4504     8.820001e+01 4.198100e+02\n0 4505     5.062800e+02 -1.215200e+02\n1 4505     6.792400e+02 -2.620300e+02\n0 4506     5.784301e+02 -3.776800e+02\n1 4506     6.512100e+02 -5.471000e+02\n0 4507     1.101400e+02 4.740500e+02\n1 4507     4.868800e+02 4.540400e+02\n0 4508     -4.263900e+02 -2.791200e+02\n1 4508     -2.913900e+02 -1.155200e+02\n0 4509     2.764200e+02 5.113600e+02\n1 4509     6.787300e+02 4.511900e+02\n0 4510     -8.228003e+01 2.834700e+02\n1 4510     2.322900e+02 3.145400e+02\n0 4511     4.064301e+02 3.721002e+01\n1 4511     6.083600e+02 -6.362000e+01\n0 4512     2.018700e+02 2.140500e+02\n1 4512     4.919399e+02 1.686800e+02\n0 4513     4.620000e+02 2.376900e+02\n1 4513     7.737300e+02 1.177500e+02\n0 4514     6.099600e+02 -2.954900e+02\n1 4514     7.209700e+02 -4.763700e+02\n0 4515     4.951001e+01 3.786500e+02\n1 4515     3.990500e+02 3.730000e+02\n0 4516     2.099000e+02 3.916900e+02\n1 4516     5.705200e+02 3.435900e+02\n0 4517     -2.984900e+02 -9.215002e+01\n1 4517     -1.102100e+02 1.802002e+01\n0 4518     1.742700e+02 3.732200e+02\n1 4518     5.258000e+02 3.345400e+02\n0 4519     3.299800e+02 4.319200e+02\n1 4519     7.161000e+02 3.528000e+02\n0 4520     2.352100e+02 2.755700e+02\n1 4520     5.510200e+02 2.204600e+02\n0 4521     -3.275300e+02 -1.987100e+02\n1 4521     -1.742400e+02 -7.120001e+01\n0 4522     -7.958900e+02 -5.043400e+02\n1 4522     -6.721500e+02 -2.052800e+02\n0 4523     5.532900e+02 -4.105900e+02\n1 4523     6.097300e+02 -5.697900e+02\n0 4524     6.261600e+02 -2.169200e+02\n1 4524     7.727200e+02 -4.029800e+02\n0 4525     4.566300e+02 2.092600e+02\n1 4525     7.594000e+02 8.957001e+01\n0 4526     -1.270000e+02 1.647000e+02\n1 4526     1.452800e+02 2.124500e+02\n0 4527     2.345601e+02 3.714300e+02\n1 4527     5.886000e+02 3.166100e+02\n0 4528     5.482400e+02 -3.138000e+01\n1 4528     7.636500e+02 -1.858400e+02\n0 4529     3.429600e+02 -5.038500e+02\n1 4529     3.508500e+02 -5.800000e+02\n0 4530     6.210000e+02 -2.746100e+02\n1 4530     7.422000e+02 -4.595800e+02\n0 4531     2.269100e+02 2.127100e+02\n1 4531     5.175400e+02 1.602900e+02\n0 4532     6.866500e+02 -2.767000e+02\n1 4532     8.169600e+02 -4.883800e+02\n0 4533     -3.019000e+02 9.932001e+01\n1 4533     -4.452002e+01 1.979300e+02\n0 4534     -2.400300e+02 -4.172700e+02\n1 4534     -1.741500e+02 -2.980500e+02\n0 4535     2.908800e+02 3.244300e+02\n1 4535     6.295300e+02 2.539500e+02\n0 4536     -5.907500e+02 -4.649600e+02\n1 4536     -4.959900e+02 -2.319600e+02\n0 4537     5.995500e+02 -3.501001e+01\n1 4537     8.179500e+02 -2.070600e+02\n0 4538     2.042600e+02 5.043100e+02\n1 4538     5.963800e+02 4.624600e+02\n0 4539     -6.845800e+02 -4.375800e+02\n1 4539     -5.638700e+02 -1.805800e+02\n0 4540     -2.156800e+02 -4.420800e+02\n1 4540     -1.610000e+02 -3.282700e+02\n0 4541     2.427600e+02 2.486900e+02\n1 4541     5.484000e+02 1.913900e+02\n0 4542     7.103000e+02 -3.424800e+02\n1 4542     8.161400e+02 -5.661500e+02\n0 4543     2.838000e+02 1.762300e+02\n1 4543     5.621200e+02 1.074800e+02\n0 4544     2.468000e+02 3.103100e+02\n1 4544     5.773300e+02 2.518200e+02\n0 4545     5.515300e+02 -2.953800e+02\n1 4545     6.561500e+02 -4.539600e+02\n0 4546     3.136400e+02 1.901001e+01\n1 4546     4.859800e+02 -4.834003e+01\n0 4547     3.037800e+02 1.899800e+02\n1 4547     5.884800e+02 1.152200e+02\n0 4548     -4.180100e+02 -4.475000e+02\n1 4548     -3.428200e+02 -2.695300e+02\n0 4549     -4.197900e+02 2.437000e+01\n1 4549     -1.797200e+02 1.591700e+02\n0 4550     6.386500e+02 -2.434998e+01\n1 4550     8.620699e+02 -2.086800e+02\n0 4551     3.110900e+02 3.947200e+02\n1 4551     6.802800e+02 3.197400e+02\n0 4552     2.979800e+02 3.995700e+02\n1 4552     6.678800e+02 3.278400e+02\n0 4553     3.280000e+02 -4.515997e+01\n1 4553     4.822000e+02 -1.172600e+02\n0 4554     5.885500e+02 -2.505800e+02\n1 4554     7.159000e+02 -4.228400e+02\n0 4555     5.213700e+02 -3.723500e+02\n1 4555     5.914000e+02 -5.189100e+02\n0 4556     2.657400e+02 3.152000e+02\n1 4556     5.989800e+02 2.516000e+02\n0 4557     6.326300e+02 -3.184700e+02\n1 4557     7.374000e+02 -5.093300e+02\n0 4558     -1.499400e+02 2.112200e+02\n1 4558     1.401500e+02 2.629200e+02\n0 4559     3.907900e+02 -2.436100e+02\n1 4559     4.961700e+02 -3.416800e+02\n0 4560     -1.458500e+02 -8.500000e+00\n1 4560     3.353998e+01 5.956000e+01\n0 4561     2.260200e+02 -5.331899e+02\n1 4561     2.226500e+02 -5.647600e+02\n0 4562     -9.690997e+01 2.166800e+02\n1 4562     1.935200e+02 2.540600e+02\n0 4563     5.983300e+02 -2.458900e+02\n1 4563     7.291600e+02 -4.215400e+02\n0 4564     4.276500e+02 1.261500e+02\n1 4564     6.959200e+02 1.325000e+01\n0 4565     -3.675400e+02 -1.575400e+02\n1 4565     -1.961200e+02 -2.223999e+01\n0 4566     6.687700e+02 -2.740100e+02\n1 4566     7.973400e+02 -4.780601e+02\n0 4567     -7.819000e+01 1.989000e+02\n1 4567     2.051000e+02 2.318700e+02\n0 4568     -6.664600e+02 -5.467500e+02\n1 4568     -5.839800e+02 -2.801400e+02\n0 4569     4.696500e+02 2.282900e+02\n1 4569     7.790800e+02 1.058600e+02\n0 4570     -1.235500e+02 1.732200e+02\n1 4570     1.518101e+02 2.195700e+02\n0 4571     4.867500e+02 2.169600e+02\n1 4571     7.928300e+02 8.919000e+01\n0 4572     2.307300e+02 2.701500e+02\n1 4572     5.444200e+02 2.159800e+02\n0 4573     6.274399e+02 -1.171000e+02\n1 4573     8.167000e+02 -3.012400e+02\n0 4574     -2.775000e+01 -1.513600e+02\n1 4574     9.015997e+01 -1.096100e+02\n0 4575     1.683800e+02 -5.697500e+02\n1 4575     1.510900e+02 -5.780000e+02\n0 4576     -1.627200e+02 -4.764700e+02\n1 4576     -1.254800e+02 -3.769600e+02\n0 4577     1.392900e+02 4.728500e+02\n1 4577     5.177500e+02 4.463100e+02\n0 4578     3.073900e+02 3.504700e+02\n1 4578     6.578000e+02 2.755700e+02\n0 4579     5.283500e+02 -2.416300e+02\n1 4579     6.533700e+02 -3.909000e+02\n0 4580     2.206400e+02 1.983000e+02\n1 4580     5.051100e+02 1.477700e+02\n0 4581     1.075300e+02 4.987400e+02\n1 4581     4.904000e+02 4.807600e+02\n0 4582     5.952900e+02 -3.600700e+02\n1 4582     6.774900e+02 -5.355900e+02\n0 4583     5.303600e+02 -2.571400e+02\n1 4583     6.489600e+02 -4.078300e+02\n0 4584     -4.683800e+02 1.026600e+02\n1 4584     -1.954600e+02 2.440700e+02\n0 4585     -9.337000e+01 -2.217500e+02\n1 4585     1.331000e+01 -1.584500e+02\n0 4586     5.879999e+01 2.459900e+02\n1 4586     3.586700e+02 2.400400e+02\n0 4587     1.891200e+02 3.976700e+02\n1 4587     5.509200e+02 3.552800e+02\n0 4588     -4.872998e+01 1.966100e+02\n1 4588     2.330699e+02 2.219400e+02\n0 4589     6.429999e+01 2.427300e+02\n1 4589     3.629200e+02 2.352700e+02\n0 4590     2.369800e+02 3.290300e+02\n1 4590     5.742800e+02 2.733500e+02\n0 4591     1.679600e+02 3.393800e+02\n1 4591     5.060300e+02 3.025600e+02\n0 4592     1.255700e+02 -5.058900e+02\n1 4592     1.332400e+02 -5.023400e+02\n0 4593     1.867700e+02 3.539100e+02\n1 4593     5.315100e+02 3.121000e+02\n0 4594     2.312200e+02 -2.028500e+02\n1 4594     3.240699e+02 -2.416700e+02\n0 4595     -3.428900e+02 4.483002e+01\n1 4595     -1.017500e+02 1.576400e+02\n0 4596     -3.966700e+02 -9.440997e+01\n1 4596     -2.001200e+02 4.366998e+01\n0 4597     -4.256300e+02 2.606400e+02\n1 4597     -1.045600e+02 3.804700e+02\n0 4598     3.594700e+02 4.388300e+02\n1 4598     7.518700e+02 3.520700e+02\n0 4599     2.540699e+02 2.681700e+02\n1 4599     5.682800e+02 2.071000e+02\n0 4600     6.928900e+02 -2.954700e+02\n1 4600     8.161801e+02 -5.099301e+02\n0 4601     3.942900e+02 3.734900e+02\n1 4601     7.633800e+02 2.755300e+02\n0 4602     4.545900e+02 2.139500e+02\n1 4602     7.587700e+02 9.492001e+01\n0 4603     4.879301e+02 -4.136900e+02\n1 4603     5.381700e+02 -5.472600e+02\n0 4604     5.725100e+02 -3.360000e+02\n1 4604     6.621600e+02 -5.024900e+02\n0 4605     5.252100e+02 -3.879600e+02\n1 4605     5.889100e+02 -5.361000e+02\n0 4606     2.106899e+02 2.740300e+02\n1 4606     5.251000e+02 2.260300e+02\n0 4607     -1.673200e+02 1.311800e+02\n1 4607     9.426001e+01 1.914000e+02\n0 4608     4.514800e+02 1.948100e+02\n1 4608     7.496801e+02 7.626001e+01\n0 4609     -8.028200e+02 -4.399000e+02\n1 4609     -6.579800e+02 -1.484900e+02\n0 4610     5.508900e+02 -3.119000e+02\n1 4610     6.484700e+02 -4.698400e+02\n0 4611     -1.290100e+02 2.054100e+02\n1 4611     1.585800e+02 2.519000e+02\n0 4612     6.061801e+02 -3.453600e+02\n1 4612     6.957000e+02 -5.254600e+02\n0 4613     -4.865200e+02 1.143600e+02\n1 4613     -2.083300e+02 2.593700e+02\n0 4614     5.664000e+02 -2.556600e+02\n1 4614     6.887900e+02 -4.192700e+02\n0 4615     5.830800e+02 -3.239300e+02\n1 4615     6.791000e+02 -4.945800e+02\n0 4616     5.324800e+02 -2.256000e+01\n1 4616     7.499200e+02 -1.719400e+02\n0 4617     -7.625500e+02 -5.332100e+02\n1 4617     -6.546900e+02 -2.395200e+02\n0 4618     4.502000e+02 2.121800e+02\n1 4618     7.538000e+02 9.434000e+01\n0 4619     5.291000e+02 -3.514900e+02\n1 4619     6.081801e+02 -5.011700e+02\n0 4620     4.635601e+02 2.107100e+02\n1 4620     7.667300e+02 8.922000e+01\n0 4621     -3.397000e+02 -1.876300e+02\n1 4621     -1.815000e+02 -5.762000e+01\n0 4622     4.753500e+02 2.400200e+02\n1 4622     7.882600e+02 1.167700e+02\n0 4623     4.843800e+02 2.222100e+02\n1 4623     7.921300e+02 9.548999e+01\n0 4624     3.925601e+02 -2.277002e+01\n1 4624     5.665699e+02 -1.181700e+02\n0 4625     5.767400e+02 -3.616700e+02\n1 4625     6.556100e+02 -5.302300e+02\n0 4626     -7.378400e+02 -3.250400e+02\n1 4626     -5.714600e+02 -6.776001e+01\n0 4627     4.407000e+02 -2.495001e+01\n1 4627     6.182500e+02 -1.365500e+02\n0 4628     5.275100e+02 -2.672700e+02\n1 4628     6.415200e+02 -4.167400e+02\n0 4629     4.955500e+02 -4.241100e+02\n1 4629     5.420200e+02 -5.606700e+02\n0 4630     6.035400e+02 -3.415600e+02\n1 4630     6.937900e+02 -5.207000e+02\n0 4631     4.921600e+02 -1.397700e+02\n1 4631     6.564600e+02 -2.757300e+02\n0 4632     4.094000e+01 2.205800e+02\n1 4632     3.307400e+02 2.203100e+02\n0 4633     -3.275300e+02 -1.987100e+02\n1 4633     -1.742400e+02 -7.120001e+01\n0 4634     -7.413700e+02 -3.429100e+02\n1 4634     -5.795900e+02 -8.226001e+01\n0 4635     9.284998e+01 4.808300e+02\n1 4635     4.694399e+02 4.665500e+02\n0 4636     9.708002e+01 4.779800e+02\n1 4636     4.725900e+02 4.626800e+02\n0 4637     3.290400e+02 5.390300e+02\n1 4637     7.473101e+02 4.674500e+02\n0 4638     5.612700e+02 -3.130700e+02\n1 4638     6.593600e+02 -4.755601e+02\n0 4639     -2.132000e+02 -5.036801e+02\n1 4639     -1.810100e+02 -3.850500e+02\n0 4640     -2.963700e+02 3.953003e+01\n1 4640     -6.073999e+01 1.404100e+02\n0 4641     -1.589900e+02 -5.088600e+02\n1 4641     -1.338800e+02 -4.078100e+02\n0 4642     5.503600e+02 -8.530029e+00\n1 4642     7.752900e+02 -1.632700e+02\n0 4643     3.736000e+02 3.966000e+02\n1 4643     7.502000e+02 3.046200e+02\n0 4644     2.363900e+02 3.759700e+02\n1 4644     5.923199e+02 3.207800e+02\n0 4645     -2.873300e+02 1.820800e+02\n1 4645     -1.380005e+00 2.715000e+02\n0 4646     -3.448300e+02 2.133700e+02\n1 4646     -4.391998e+01 3.156400e+02\n0 4647     4.075900e+02 -4.109985e+00\n1 4647     5.912200e+02 -1.048400e+02\n0 4648     1.789399e+02 -2.035500e+02\n1 4648     2.710800e+02 -2.249200e+02\n0 4649     3.171100e+02 2.126800e+02\n1 4649     6.123199e+02 1.339800e+02\n0 4650     -6.881000e+01 2.963000e+02\n1 4650     2.503300e+02 3.233800e+02\n0 4651     5.051300e+02 -3.334700e+02\n1 4651     5.896801e+02 -4.741300e+02\n0 4652     -6.258100e+02 -2.367200e+02\n1 4652     -4.497700e+02 -2.112000e+01\n0 4653     5.693600e+02 -3.661400e+02\n1 4653     6.459700e+02 -5.315000e+02\n0 4654     5.606000e+02 -3.288000e+02\n1 4654     6.520601e+02 -4.905500e+02\n0 4655     7.074399e+02 -2.962000e+02\n1 4655     8.334399e+02 -5.166200e+02\n0 4656     4.630000e+02 4.010600e+02\n1 4656     8.270699e+02 2.909400e+02\n0 4657     -1.290100e+02 2.054100e+02\n1 4657     1.585800e+02 2.519000e+02\n0 4658     -7.148200e+02 -4.067400e+02\n1 4658     -5.783800e+02 -1.452200e+02\n0 4659     2.000100e+02 2.036700e+02\n1 4659     4.862200e+02 1.591100e+02\n0 4660     -2.632600e+02 4.292999e+01\n1 4660     -2.858002e+01 1.345200e+02\n0 4661     3.714700e+02 2.958200e+02\n1 4661     7.048600e+02 2.023800e+02\n0 4662     -3.176000e+02 -1.452100e+02\n1 4662     -1.466400e+02 -2.514001e+01\n0 4663     2.894600e+02 1.861600e+02\n1 4663     5.723700e+02 1.156300e+02\n0 4664     5.827900e+02 1.881200e+02\n1 4664     8.710601e+02 3.367999e+01\n0 4665     -1.029000e+02 -5.258300e+02\n1 4665     -8.870001e+01 -4.420400e+02\n0 4666     -1.227500e+02 2.073200e+02\n1 4666     1.649399e+02 2.518900e+02\n0 4667     -8.385800e+02 -8.929999e+01\n1 4667     -5.770200e+02 1.642600e+02\n0 4668     -3.747700e+02 -1.473400e+02\n1 4668     -1.989500e+02 -1.087000e+01\n0 4669     -9.590997e+01 2.047100e+02\n1 4669     1.903300e+02 2.421200e+02\n0 4670     4.902900e+02 -9.781000e+01\n1 4670     6.716600e+02 -2.328300e+02\n0 4671     -1.354100e+02 2.906500e+02\n1 4671     1.832700e+02 3.351700e+02\n0 4672     5.307100e+02 -3.903300e+02\n1 4672     5.938101e+02 -5.404800e+02\n0 4673     1.002500e+02 4.577700e+02\n1 4673     4.720000e+02 4.407100e+02\n0 4674     -7.678800e+02 -4.615300e+02\n1 4674     -6.371400e+02 -1.769400e+02\n0 4675     3.603400e+02 -1.912000e+02\n1 4675     4.610601e+02 -2.738200e+02\n0 4676     -1.206000e+02 2.344700e+02\n1 4676     1.767300e+02 2.773100e+02\n0 4677     -3.137800e+02 1.202800e+02\n1 4677     -4.816998e+01 2.203100e+02\n0 4678     4.882100e+02 2.209200e+02\n1 4678     7.957300e+02 9.295999e+01\n0 4679     4.218000e+02 3.748900e+02\n1 4679     7.942700e+02 2.694100e+02\n0 4680     2.025601e+02 4.914700e+02\n1 4680     5.914200e+02 4.491900e+02\n0 4681     -2.251900e+02 -3.793700e+02\n1 4681     -1.466500e+02 -2.679100e+02\n0 4682     3.598800e+02 3.588700e+02\n1 4682     7.183101e+02 2.695900e+02\n0 4683     1.986000e+02 2.228000e+02\n1 4683     4.921200e+02 1.781300e+02\n0 4684     5.018800e+02 -1.216000e+02\n1 4684     6.745601e+02 -2.609600e+02\n0 4685     4.828600e+02 1.474900e+02\n1 4685     7.658500e+02 1.758002e+01\n0 4686     6.417600e+02 -3.061100e+02\n1 4686     7.530900e+02 -5.003400e+02\n0 4687     -1.902500e+02 1.698900e+02\n1 4687     8.662000e+01 2.339700e+02\n0 4688     4.029700e+02 3.740000e+02\n1 4688     7.732400e+02 2.732900e+02\n0 4689     -2.927500e+02 -5.722900e+02\n1 4689     -2.767500e+02 -4.207800e+02\n0 4690     -2.834700e+02 -1.089300e+02\n1 4690     -1.019400e+02 -1.460022e+00\n0 4691     -8.633400e+02 -2.078998e+01\n1 4691     -5.748600e+02 2.305900e+02\n0 4692     -2.052200e+02 1.997800e+02\n1 4692     8.281000e+01 2.667200e+02\n0 4693     6.403998e+01 4.553600e+02\n1 4693     4.332200e+02 4.472400e+02\n0 4694     -3.212900e+02 5.141998e+01\n1 4694     -7.975000e+01 1.581000e+02\n0 4695     -1.683100e+02 2.001200e+02\n1 4695     1.182600e+02 2.570400e+02\n0 4696     -1.188600e+02 2.638400e+02\n1 4696     1.897100e+02 3.048600e+02\n0 4697     5.469800e+02 -2.982100e+02\n1 4697     6.497100e+02 -4.545300e+02\n0 4698     -1.163100e+02 -5.281400e+02\n1 4698     -1.018200e+02 -4.397200e+02\n0 4699     5.820800e+02 -3.777100e+02\n1 4699     6.553000e+02 -5.485500e+02\n0 4700     -2.691200e+02 -5.352200e+02\n1 4700     -2.425000e+02 -3.953300e+02\n0 4701     6.090997e+01 4.806400e+02\n1 4701     4.367400e+02 4.741300e+02\n0 4702     -3.343500e+02 2.350200e+02\n1 4702     -2.687000e+01 3.330900e+02\n0 4703     -2.790600e+02 -4.308300e+02\n1 4703     -2.141800e+02 -2.978300e+02\n0 4704     -2.238900e+02 1.801000e+02\n1 4704     5.796002e+01 2.529600e+02\n0 4705     3.908000e+02 -4.733000e+02\n1 4705     4.121000e+02 -5.682900e+02\n0 4706     -1.278500e+02 2.032100e+02\n1 4706     1.585601e+02 2.493100e+02\n0 4707     3.217300e+02 3.907600e+02\n1 4707     6.900800e+02 3.127700e+02\n0 4708     6.261200e+02 -4.359985e+00\n1 4708     8.552400e+02 -1.835500e+02\n0 4709     -4.180100e+02 -4.475000e+02\n1 4709     -3.428200e+02 -2.695300e+02\n0 4710     1.983600e+02 3.122400e+02\n1 4710     5.271000e+02 2.671500e+02\n0 4711     -1.988400e+02 -4.866899e+02\n1 4711     -1.618400e+02 -3.744400e+02\n0 4712     -7.221200e+02 -4.582400e+02\n1 4712     -6.005300e+02 -1.875300e+02\n0 4713     -1.347800e+02 1.562600e+02\n1 4713     1.344000e+02 2.063400e+02\n0 4714     -7.279800e+02 -3.909700e+02\n1 4714     -5.838400e+02 -1.276800e+02\n0 4715     -4.599100e+02 -2.436200e+02\n1 4715     -3.086500e+02 -7.423999e+01\n0 4716     -3.710300e+02 -3.460700e+02\n1 4716     -2.658000e+02 -1.926900e+02\n0 4717     6.874500e+02 -2.939000e+02\n1 4717     8.107600e+02 -5.061100e+02\n0 4718     5.283400e+02 -3.461900e+02\n1 4718     6.097300e+02 -4.953900e+02\n0 4719     3.780200e+02 -2.966000e+02\n1 4719     4.606700e+02 -3.888000e+02\n0 4720     6.516899e+02 -2.576400e+02\n1 4720     7.842000e+02 -4.545900e+02\n0 4721     5.485300e+02 -3.502900e+02\n1 4721     6.293300e+02 -5.078600e+02\n0 4722     5.786100e+02 -3.252900e+02\n1 4722     6.733500e+02 -4.941400e+02\n0 4723     5.247900e+02 -3.537700e+02\n1 4723     6.026600e+02 -5.020100e+02\n0 4724     7.076801e+02 -3.146500e+02\n1 4724     8.249200e+02 -5.358900e+02\n0 4725     5.349399e+02 -3.803200e+02\n1 4725     6.026400e+02 -5.322900e+02\n0 4726     -7.543200e+02 -4.680601e+02\n1 4726     -6.287300e+02 -1.864400e+02\n0 4727     6.597998e+01 3.524600e+02\n1 4727     4.064100e+02 3.427600e+02\n0 4728     5.091899e+02 -2.883100e+02\n1 4728     6.131899e+02 -4.301300e+02\n0 4729     -1.497000e+02 -5.046100e+02\n1 4729     -1.236200e+02 -4.068200e+02\n0 4730     3.995699e+02 4.400100e+02\n1 4730     7.976300e+02 3.429900e+02\n0 4731     -3.643800e+02 2.725100e+02\n1 4731     -4.664001e+01 3.769200e+02\n0 4732     4.878600e+02 1.658800e+02\n1 4732     7.780300e+02 3.510999e+01\n0 4733     5.292300e+02 -3.787900e+02\n1 4733     5.977700e+02 -5.283800e+02\n0 4734     3.727400e+02 4.026400e+02\n1 4734     7.515300e+02 3.114400e+02\n0 4735     1.209200e+02 -5.751899e+02\n1 4735     1.035200e+02 -5.659800e+02\n0 4736     8.373999e+01 4.532200e+02\n1 4736     4.538500e+02 4.401600e+02\n0 4737     3.826500e+02 3.529000e+02\n1 4737     7.413700e+02 2.572900e+02\n0 4738     -4.490600e+02 9.573001e+01\n1 4738     -1.809900e+02 2.328000e+02\n0 4739     -3.743100e+02 -1.763900e+02\n1 4739     -2.089100e+02 -3.751001e+01\n0 4740     7.276400e+02 -2.939700e+02\n1 4740     8.581200e+02 -5.231100e+02\n0 4741     4.158199e+02 -5.821997e+01\n1 4741     5.769399e+02 -1.612600e+02\n0 4742     -3.544900e+02 6.427002e+01\n1 4742     -1.059000e+02 1.791300e+02\n0 4743     4.683300e+02 1.990100e+02\n1 4743     7.668700e+02 7.464001e+01\n0 4744     3.344900e+02 -1.696997e+01\n1 4744     4.991000e+02 -9.171002e+01\n0 4745     7.210300e+02 -2.978500e+02\n1 4745     8.470100e+02 -5.232200e+02\n0 4746     -1.612700e+02 -5.721600e+02\n1 4746     -1.593000e+02 -4.645800e+02\n0 4747     -3.099900e+02 3.090200e+02\n1 4747     1.613000e+01 3.978200e+02\n0 4748     -4.071500e+02 -5.678400e+02\n1 4748     -3.751900e+02 -3.793300e+02\n0 4749     -2.622400e+02 -3.020020e+00\n1 4749     -4.435999e+01 9.110999e+01\n0 4750     -1.463500e+02 1.965000e+02\n1 4750     1.376100e+02 2.475600e+02\n0 4751     -1.064600e+02 2.401600e+02\n1 4751     1.927800e+02 2.791300e+02\n0 4752     5.524399e+02 -3.213500e+02\n1 4752     6.465200e+02 -4.795500e+02\n0 4753     -1.312100e+02 2.098200e+02\n1 4753     1.577400e+02 2.567900e+02\n0 4754     5.400000e+02 -1.502200e+02\n1 4754     7.042300e+02 -3.033700e+02\n0 4755     5.402000e+02 -1.624000e+02\n1 4755     6.999399e+02 -3.158900e+02\n0 4756     -1.526200e+02 -5.650024e+00\n1 4756     2.819000e+01 6.396997e+01\n0 4757     2.030200e+02 4.848000e+02\n1 4757     5.903199e+02 4.420100e+02\n0 4758     6.798500e+02 -2.968000e+02\n1 4758     8.004000e+02 -5.060300e+02\n0 4759     -9.581000e+01 1.141998e+01\n1 4759     8.390002e+01 6.504999e+01\n0 4760     -1.574900e+02 1.766600e+02\n1 4760     1.200900e+02 2.318700e+02\n0 4761     2.570500e+02 2.604600e+02\n1 4761     5.679600e+02 1.992800e+02\n0 4762     6.052300e+02 -2.331500e+02\n1 4762     7.421100e+02 -4.117400e+02\n0 4763     6.748101e+02 -3.056100e+02\n1 4763     7.906899e+02 -5.128700e+02\n0 4764     -2.155500e+02 2.253400e+02\n1 4764     8.248999e+01 2.937300e+02\n0 4765     2.709700e+02 5.320300e+02\n1 4765     6.791899e+02 4.746500e+02\n0 4766     -8.541500e+02 -4.293500e+02\n1 4766     -6.941400e+02 -1.252800e+02\n0 4767     2.421200e+02 4.055600e+02\n1 4767     6.102900e+02 3.491600e+02\n0 4768     -6.978998e+01 -5.856600e+02\n1 4768     -8.059998e+01 -5.081500e+02\n0 4769     -1.487800e+02 -1.003998e+01\n1 4769     3.002002e+01 5.914001e+01\n0 4770     3.627400e+02 3.414400e+02\n1 4770     7.143199e+02 2.512900e+02\n0 4771     5.320800e+02 -3.652200e+02\n1 4771     6.055800e+02 -5.163500e+02\n0 4772     7.096200e+02 -3.000500e+02\n1 4772     8.344500e+02 -5.213800e+02\n0 4773     -3.769800e+02 -1.759200e+02\n1 4773     -2.116900e+02 -3.631000e+01\n0 4774     3.022200e+02 2.146500e+02\n1 4774     5.972300e+02 1.402000e+02\n0 4775     3.099399e+02 2.173700e+02\n1 4775     6.067200e+02 1.408400e+02\n0 4776     -2.834700e+02 -1.089300e+02\n1 4776     -1.019400e+02 -1.460022e+00\n0 4777     -4.780800e+02 -1.423100e+02\n1 4777     -2.893400e+02 2.271997e+01\n0 4778     -4.605400e+02 -2.489400e+02\n1 4778     -3.110300e+02 -7.856000e+01\n0 4779     -2.598300e+02 -4.969000e+02\n1 4779     -2.207600e+02 -3.636900e+02\n0 4780     7.437500e+02 -2.886800e+02\n1 4780     8.795400e+02 -5.242500e+02\n0 4781     4.108500e+02 4.377600e+02\n1 4781     8.099100e+02 3.372300e+02\n0 4782     -8.265997e+01 2.071400e+02\n1 4782     2.039500e+02 2.409600e+02\n0 4783     3.462400e+02 -7.534003e+01\n1 4783     4.903000e+02 -1.539200e+02\n0 4784     7.541500e+02 -3.298900e+02\n1 4784     8.743199e+02 -5.716801e+02\n0 4785     -1.009700e+02 4.391300e+02\n1 4785     2.565800e+02 4.731500e+02\n0 4786     5.882800e+02 -3.548500e+02\n1 4786     6.717900e+02 -5.277500e+02\n0 4787     -6.637000e+01 -3.997200e+02\n1 4787     -1.073999e+01 -3.367100e+02\n0 4788     -6.078800e+02 1.373999e+01\n1 4788     -3.497900e+02 1.982200e+02\n0 4789     2.887700e+02 3.557800e+02\n1 4789     6.401100e+02 2.861000e+02\n0 4790     -3.098200e+02 2.952500e+02\n1 4790     1.298999e+01 3.849400e+02\n0 4791     4.946997e+01 2.140300e+02\n1 4791     3.370100e+02 2.114300e+02\n0 4792     -5.181100e+02 1.307400e+02\n1 4792     -2.309500e+02 2.825200e+02\n0 4793     7.005800e+02 -2.638700e+02\n1 4793     8.388500e+02 -4.806000e+02\n0 4794     -2.154400e+02 -4.374700e+02\n1 4794     -1.591600e+02 -3.239900e+02\n0 4795     3.899200e+02 -8.769000e+01\n1 4795     5.365000e+02 -1.818300e+02\n0 4796     -7.530700e+02 -4.743400e+02\n1 4796     -6.299100e+02 -1.925200e+02\n0 4797     -1.213000e+02 3.111000e+02\n1 4797     2.044900e+02 3.513000e+02\n0 4798     2.228199e+02 2.262700e+02\n1 4798     5.187700e+02 1.742400e+02\n0 4799     5.341200e+02 -3.588700e+02\n1 4799     6.108300e+02 -5.103199e+02\n0 4800     -2.683100e+02 3.057500e+02\n1 4800     5.834003e+01 3.840000e+02\n0 4801     -3.174400e+02 -2.135800e+02\n1 4801     -1.703700e+02 -8.800000e+01\n0 4802     -1.676500e+02 1.280900e+02\n1 4802     9.257001e+01 1.887500e+02\n0 4803     -2.971300e+02 3.216400e+02\n1 4803     3.359003e+01 4.067100e+02\n0 4804     -4.355600e+02 -2.929200e+02\n1 4804     -3.042400e+02 -1.255800e+02\n0 4805     -3.107300e+02 3.136300e+02\n1 4805     1.790002e+01 4.031100e+02\n0 4806     6.832600e+02 -3.008300e+02\n1 4806     8.023800e+02 -5.114000e+02\n0 4807     -4.613500e+02 8.545999e+01\n1 4807     -1.955900e+02 2.264200e+02\n0 4808     -4.378700e+02 1.440002e+00\n1 4808     -2.036100e+02 1.430700e+02\n0 4809     -2.961200e+02 3.018000e+02\n1 4809     2.838000e+01 3.861200e+02\n0 4810     2.206400e+02 1.983000e+02\n1 4810     5.051100e+02 1.477700e+02\n0 4811     -4.421997e+01 -1.335700e+02\n1 4811     8.047998e+01 -8.764001e+01\n0 4812     -7.580017e+00 2.829800e+02\n1 4812     3.062200e+02 2.940900e+02\n0 4813     6.307001e+01 2.328900e+02\n1 4813     3.577700e+02 2.260400e+02\n0 4814     -1.097500e+02 2.978400e+02\n1 4814     2.108900e+02 3.355100e+02\n0 4815     -2.551400e+02 -4.979700e+02\n1 4815     -2.169700e+02 -3.660900e+02\n0 4816     -2.790600e+02 -4.308300e+02\n1 4816     -2.141800e+02 -2.978300e+02\n0 4817     5.537000e+02 -3.818500e+02\n1 4817     6.221500e+02 -5.410300e+02\n0 4818     6.813000e+01 3.641400e+02\n1 4818     4.131500e+02 3.537000e+02\n0 4819     -7.556400e+02 -4.644000e+02\n1 4819     -6.287900e+02 -1.830200e+02\n0 4820     -2.864600e+02 -7.809998e+00\n1 4820     -7.700000e+01 9.529001e+01\n0 4821     2.752600e+02 2.850400e+02\n1 4821     5.971100e+02 2.185500e+02\n0 4822     -1.269000e+02 3.090200e+02\n1 4822     1.983600e+02 3.510100e+02\n0 4823     -4.897200e+02 1.247700e+02\n1 4823     -2.073500e+02 2.697600e+02\n0 4824     -7.606700e+02 -5.675900e+02\n1 4824     -6.639400e+02 -2.691400e+02\n0 4825     5.630000e+02 1.099976e+00\n1 4825     7.911200e+02 -1.572100e+02\n0 4826     2.167100e+02 2.265700e+02\n1 4826     5.122300e+02 1.768800e+02\n0 4827     6.929700e+02 -2.916000e+02\n1 4827     8.175400e+02 -5.063700e+02\n0 4828     2.375699e+02 1.065100e+02\n1 4828     4.338300e+02 6.346997e+01\n0 4829     -4.479200e+02 1.354300e+02\n1 4829     -1.664500e+02 2.687000e+02\n0 4830     -1.893500e+02 1.887200e+02\n1 4830     9.400000e+01 2.518400e+02\n0 4831     5.276000e+02 -3.928600e+02\n1 4831     5.895100e+02 -5.419000e+02\n0 4832     -8.033002e+01 -4.950800e+02\n1 4832     -5.603003e+01 -4.212900e+02\n0 4833     5.640800e+02 1.432001e+01\n1 4833     7.962500e+02 -1.438900e+02\n0 4834     3.055000e+02 2.067200e+02\n1 4834     5.975200e+02 1.310800e+02\n0 4835     6.679399e+02 -3.097600e+02\n1 4835     7.813700e+02 -5.141000e+02\n0 4836     3.033700e+02 2.256300e+02\n1 4836     6.026600e+02 1.510100e+02\n0 4837     2.258500e+02 3.034700e+02\n1 4837     5.519500e+02 2.510300e+02\n0 4838     -1.663700e+02 1.670000e+02\n1 4838     1.076800e+02 2.250300e+02\n0 4839     -1.308700e+02 -4.915500e+02\n1 4839     -1.016700e+02 -4.014800e+02\n0 4840     -1.076700e+02 3.093300e+02\n1 4840     2.173600e+02 3.460500e+02\n0 4841     -4.348900e+02 -2.878500e+02\n1 4841     -3.017400e+02 -1.213000e+02\n0 4842     2.968400e+02 2.313800e+02\n1 4842     5.982600e+02 1.586700e+02\n0 4843     2.374301e+02 2.620400e+02\n1 4843     5.482200e+02 2.062800e+02\n0 4844     -2.051300e+02 -3.876000e+02\n1 4844     -1.317100e+02 -2.819000e+02\n0 4845     -7.540700e+02 -4.242000e+02\n1 4845     -6.151400e+02 -1.488800e+02\n0 4846     -8.157500e+02 -4.341500e+02\n1 4846     -6.661300e+02 -1.397700e+02\n0 4847     3.462300e+02 4.850200e+02\n1 4847     7.507600e+02 4.050700e+02\n0 4848     5.913600e+02 -5.281000e+01\n1 4848     8.027100e+02 -2.220900e+02\n0 4849     4.035500e+02 -6.590027e+00\n1 4849     5.858800e+02 -1.056600e+02\n0 4850     6.004100e+02 -3.266300e+02\n1 4850     6.971100e+02 -5.044600e+02\n0 4851     -2.366000e+02 -4.243300e+02\n1 4851     -1.735100e+02 -3.054000e+02\n0 4852     -1.150600e+02 2.370900e+02\n1 4852     1.835200e+02 2.784200e+02\n0 4853     5.268700e+02 -3.569300e+02\n1 4853     6.035100e+02 -5.058700e+02\n0 4854     3.700300e+02 2.959500e+02\n1 4854     7.035400e+02 2.028400e+02\n0 4855     -1.358600e+02 3.046000e+02\n1 4855     1.879600e+02 3.487900e+02\n0 4856     -7.676100e+02 -2.635400e+02\n1 4856     -5.751200e+02 -6.280029e+00\n0 4857     4.878600e+02 1.658800e+02\n1 4857     7.780300e+02 3.510999e+01\n0 4858     6.501300e+02 -1.063100e+02\n1 4858     8.479600e+02 -2.989700e+02\n0 4859     3.561200e+02 3.679800e+02\n1 4859     7.179399e+02 2.803700e+02\n0 4860     -1.092400e+02 3.018400e+02\n1 4860     2.128400e+02 3.390100e+02\n0 4861     -1.797200e+02 -3.355400e+02\n1 4861     -9.213000e+01 -2.416000e+02\n0 4862     -3.124800e+02 4.640997e+01\n1 4862     -7.303998e+01 1.512400e+02\n0 4863     2.425500e+02 3.045600e+02\n1 4863     5.704600e+02 2.473200e+02\n0 4864     -2.241400e+02 -4.630400e+02\n1 4864     -1.761500e+02 -3.441900e+02\n0 4865     2.064700e+02 3.322400e+02\n1 4865     5.432600e+02 2.848900e+02\n0 4866     -1.783000e+02 1.284900e+02\n1 4866     8.263000e+01 1.917900e+02\n0 4867     -8.284998e+01 2.101900e+02\n1 4867     2.045900e+02 2.441300e+02\n0 4868     2.905699e+02 5.733800e+02\n1 4868     7.137600e+02 5.141000e+02\n0 4869     2.244500e+02 2.242300e+02\n1 4869     5.193000e+02 1.725100e+02\n0 4870     2.676400e+02 5.020900e+02\n1 4870     6.666100e+02 4.435000e+02\n0 4871     -2.842400e+02 -4.431100e+02\n1 4871     -2.230800e+02 -3.071900e+02\n0 4872     2.244301e+02 -5.428000e+02\n1 4872     2.164800e+02 -5.733300e+02\n0 4873     -5.026001e+01 -1.713500e+02\n1 4873     6.073999e+01 -1.219500e+02\n0 4874     -3.046600e+02 8.866000e+01\n1 4874     -5.071997e+01 1.884600e+02\n0 4875     8.865997e+01 3.973400e+02\n1 4875     4.438500e+02 3.814900e+02\n0 4876     5.030601e+02 -1.967400e+02\n1 4876     6.448000e+02 -3.369600e+02\n0 4877     3.649000e+02 4.179300e+02\n1 4877     7.496200e+02 3.290800e+02\n0 4878     8.635999e+01 3.610100e+02\n1 4878     4.307900e+02 3.457200e+02\n0 4879     -3.099900e+02 3.090200e+02\n1 4879     1.613000e+01 3.978200e+02\n0 4880     5.999000e+02 -3.570800e+02\n1 4880     6.837800e+02 -5.350500e+02\n0 4881     4.867500e+02 2.169600e+02\n1 4881     7.928300e+02 8.919000e+01\n0 4882     -3.230900e+02 -2.063700e+02\n1 4882     -1.734500e+02 -7.967999e+01\n0 4883     -1.247600e+02 2.402500e+02\n1 4883     1.751500e+02 2.840400e+02\n0 4884     7.059000e+02 -3.238800e+02\n1 4884     8.189500e+02 -5.448000e+02\n0 4885     -2.834600e+02 3.784998e+01\n1 4885     -4.906000e+01 1.352800e+02\n0 4886     5.466998e+01 2.551500e+02\n1 4886     3.581600e+02 2.503100e+02\n0 4887     1.240000e+02 4.680400e+02\n1 4887     4.999100e+02 4.451400e+02\n0 4888     -4.435900e+02 2.663300e+02\n1 4888     -1.192600e+02 3.899100e+02\n0 4889     4.701899e+02 2.497400e+02\n1 4889     7.857900e+02 1.276700e+02\n0 4890     4.892300e+02 2.287800e+02\n1 4890     7.992100e+02 1.009200e+02\n0 4891     2.936300e+02 4.769500e+02\n1 4891     6.891600e+02 4.101900e+02\n0 4892     -6.613500e+02 2.099800e+02\n1 4892     -3.300500e+02 3.890900e+02\n0 4893     2.613500e+02 3.031700e+02\n1 4893     5.896100e+02 2.407500e+02\n0 4894     6.043300e+02 -3.188100e+02\n1 4894     7.047300e+02 -4.978101e+02\n0 4895     -2.620400e+02 1.866700e+02\n1 4895     2.421997e+01 2.691900e+02\n0 4896     -4.550300e+02 1.100100e+02\n1 4896     -1.815200e+02 2.476500e+02\n0 4897     6.679399e+02 -3.097600e+02\n1 4897     7.813700e+02 -5.141000e+02\n0 4898     2.871100e+02 1.787000e+02\n1 4898     5.667000e+02 1.087900e+02\n0 4899     2.502100e+02 2.601100e+02\n1 4899     5.606700e+02 2.007400e+02\n0 4900     -3.518200e+02 2.825700e+02\n1 4900     -3.112000e+01 3.826900e+02\n0 4901     -6.208500e+02 1.178998e+01\n1 4901     -3.616800e+02 2.000300e+02\n0 4902     4.121200e+02 3.020300e+02\n1 4902     7.518900e+02 1.967800e+02\n0 4903     6.088400e+02 -2.363400e+02\n1 4903     7.450300e+02 -4.163800e+02\n0 4904     -1.690500e+02 2.149100e+02\n1 4904     1.231700e+02 2.713900e+02\n0 4905     -2.989600e+02 2.992000e+02\n1 4905     2.416998e+01 3.857300e+02\n0 4906     2.529000e+02 3.483800e+02\n1 4906     5.984000e+02 2.884800e+02\n0 4907     4.231899e+02 3.665400e+02\n1 4907     7.925699e+02 2.600500e+02\n0 4908     -3.251100e+02 3.114001e+01\n1 4908     -9.037000e+01 1.404300e+02\n0 4909     2.108900e+02 2.744300e+02\n1 4909     5.251000e+02 2.260300e+02\n0 4910     5.599301e+02 -3.973900e+02\n1 4910     6.223000e+02 -5.592000e+02\n0 4911     -1.611500e+02 -5.182100e+02\n1 4911     -1.393500e+02 -4.154400e+02\n0 4912     -1.745400e+02 -5.184500e+02\n1 4912     -1.516600e+02 -4.114400e+02\n0 4913     -3.880500e+02 -4.648500e+02\n1 4913     -3.230100e+02 -2.943100e+02\n0 4914     -4.499300e+02 3.845300e+02\n1 4914     -9.978998e+01 5.048700e+02\n0 4915     5.196100e+02 -3.101600e+02\n1 4915     6.153900e+02 -4.561899e+02\n0 4916     -4.061700e+02 -4.417100e+02\n1 4916     -3.306300e+02 -2.677900e+02\n0 4917     -7.708100e+02 -5.574399e+02\n1 4917     -6.685700e+02 -2.576300e+02\n0 4918     -1.007300e+02 2.369700e+02\n1 4918     1.973600e+02 2.742800e+02\n0 4919     3.429600e+02 -5.038500e+02\n1 4919     3.508500e+02 -5.800000e+02\n0 4920     5.144301e+02 -3.485200e+02\n1 4920     5.936300e+02 -4.927800e+02\n0 4921     5.695900e+02 -3.899900e+02\n1 4921     6.362000e+02 -5.555500e+02\n0 4922     -5.212200e+02 1.256600e+02\n1 4922     -2.355600e+02 2.786500e+02\n0 4923     5.560100e+02 2.534200e+02\n1 4923     8.635000e+02 1.113800e+02\n0 4924     2.205400e+02 2.517100e+02\n1 4924     5.264301e+02 2.007100e+02\n0 4925     6.271997e+01 4.605200e+02\n1 4925     4.330100e+02 4.520500e+02\n0 4926     -2.828700e+02 2.522998e+01\n1 4926     -5.371997e+01 1.234900e+02\n0 4927     1.138800e+02 4.525100e+02\n1 4927     4.852700e+02 4.314700e+02\n0 4928     -7.625500e+02 -5.332100e+02\n1 4928     -6.546900e+02 -2.395200e+02\n0 4929     3.070400e+02 3.706600e+02\n1 4929     6.657700e+02 2.964900e+02\n0 4930     -4.108002e+01 2.448900e+02\n1 4930     2.587000e+02 2.662000e+02\n0 4931     5.349800e+02 -3.979200e+02\n1 4931     5.953900e+02 -5.497500e+02\n0 4932     5.132400e+02 -1.137900e+02\n1 4932     6.900601e+02 -2.568600e+02\n0 4933     2.849800e+02 2.963600e+02\n1 4933     6.113500e+02 2.275800e+02\n0 4934     2.270800e+02 2.179100e+02\n1 4934     5.198400e+02 1.651900e+02\n0 4935     4.073800e+02 3.489300e+02\n1 4935     7.667900e+02 2.465600e+02\n0 4936     -2.156800e+02 -4.420800e+02\n1 4936     -1.610000e+02 -3.282700e+02\n0 4937     -2.532800e+02 -4.051600e+02\n1 4937     -1.819600e+02 -2.826800e+02\n0 4938     4.217700e+02 -2.181000e+01\n1 4938     5.991899e+02 -1.269600e+02\n0 4939     1.986300e+02 2.733800e+02\n1 4939     5.121000e+02 2.284200e+02\n0 4940     4.620300e+02 2.284300e+02\n1 4940     7.710699e+02 1.078000e+02\n0 4941     -6.262000e+01 1.612000e+02\n1 4941     1.804600e+02 1.968900e+02\n0 4942     6.843600e+02 -3.045400e+02\n1 4942     8.018300e+02 -5.154800e+02\n0 4943     4.064600e+02 4.186500e+02\n1 4943     7.960699e+02 3.189800e+02\n0 4944     -5.087000e+01 2.368700e+02\n1 4944     2.462500e+02 2.613100e+02\n0 4945     -3.396500e+02 7.378003e+01\n1 4945     -8.884003e+01 1.837000e+02\n0 4946     -3.674200e+02 2.351700e+02\n1 4946     -5.722998e+01 3.417000e+02\n0 4947     3.039001e+01 1.241000e+02\n1 4947     2.321500e+02 1.406700e+02\n0 4948     2.228199e+02 2.262700e+02\n1 4948     5.187700e+02 1.742400e+02\n0 4949     5.065500e+02 -2.651100e+02\n1 4949     6.197200e+02 -4.063300e+02\n0 4950     1.301600e+02 4.727500e+02\n1 4950     5.075900e+02 4.473600e+02\n0 4951     2.820699e+02 5.461500e+02\n1 4951     6.960400e+02 4.867100e+02\n0 4952     4.513900e+02 2.253800e+02\n1 4952     7.590601e+02 1.077900e+02\n0 4953     4.654600e+02 2.014300e+02\n1 4953     7.658000e+02 7.903000e+01\n0 4954     -4.156000e+01 2.490800e+02\n1 4954     2.595400e+02 2.705700e+02\n0 4955     5.524399e+02 -3.213500e+02\n1 4955     6.465200e+02 -4.795500e+02\n0 4956     -3.216400e+02 -2.152500e+02\n1 4956     -1.752200e+02 -8.841998e+01\n0 4957     -3.710300e+02 -3.460700e+02\n1 4957     -2.658000e+02 -1.926900e+02\n0 4958     -8.811400e+02 7.659973e+00\n1 4958     -5.798700e+02 2.591400e+02\n0 4959     7.137400e+02 -3.165400e+02\n1 4959     8.313900e+02 -5.400900e+02\n0 4960     4.906500e+02 1.695400e+02\n1 4960     7.821000e+02 3.816998e+01\n0 4961     4.803900e+02 -3.905500e+02\n1 4961     5.401300e+02 -5.217700e+02\n0 4962     -6.092600e+02 5.864001e+01\n1 4962     -3.361600e+02 2.391100e+02\n0 4963     5.093101e+02 -4.335900e+02\n1 4963     5.528101e+02 -5.752400e+02\n0 4964     2.275000e+02 5.219500e+02\n1 4964     6.277200e+02 4.750300e+02\n0 4965     -7.353500e+02 -3.904100e+02\n1 4965     -5.894200e+02 -1.252900e+02\n0 4966     -1.339400e+02 2.234400e+02\n1 4966     1.600400e+02 2.704300e+02\n0 4967     2.037500e+02 -4.142900e+02\n1 4967     2.402900e+02 -4.415900e+02\n0 4968     -2.735400e+02 -2.794900e+02\n1 4968     -1.544600e+02 -1.613500e+02\n0 4969     3.675601e+02 3.469300e+02\n1 4969     7.219800e+02 2.553200e+02\n0 4970     5.359900e+02 -2.032001e+01\n1 4970     7.545300e+02 -1.704800e+02\n0 4971     5.040699e+02 -3.761100e+02\n1 4971     5.712000e+02 -5.162300e+02\n0 4972     1.206400e+02 -2.166800e+02\n1 4972     2.079301e+02 -2.185600e+02\n0 4973     -7.594300e+02 -4.541500e+02\n1 4973     -6.284700e+02 -1.732000e+02\n0 4974     -7.767300e+02 3.354999e+01\n1 4974     -4.869900e+02 2.577900e+02\n0 4975     -2.620400e+02 1.866700e+02\n1 4975     2.421997e+01 2.691900e+02\n0 4976     -6.573300e+02 -5.494500e+02\n1 4976     -5.778700e+02 -2.853600e+02\n0 4977     -3.068300e+02 -2.341500e+02\n1 4977     -1.682600e+02 -1.095400e+02\n0 4978     -2.965100e+02 -1.149000e+02\n1 4978     -1.163000e+02 -3.520020e+00\n0 4979     3.490100e+02 -3.877300e+02\n1 4979     4.011100e+02 -4.685900e+02\n0 4980     -1.513600e+02 1.682900e+02\n1 4980     1.232700e+02 2.222100e+02\n0 4981     5.116200e+02 -2.635000e+02\n1 4981     6.259700e+02 -4.063800e+02\n0 4982     -1.673200e+02 1.311800e+02\n1 4982     9.426001e+01 1.914000e+02\n0 4983     2.431100e+02 -5.300000e+02\n1 4983     2.404301e+02 -5.680100e+02\n0 4984     -4.551200e+02 2.676900e+02\n1 4984     -1.296200e+02 3.942600e+02\n0 4985     4.092900e+02 1.974700e+02\n1 4985     7.051600e+02 9.112000e+01\n0 4986     3.590400e+02 3.869100e+02\n1 4986     7.289500e+02 2.998600e+02\n0 4987     1.947100e+02 2.215700e+02\n1 4987     4.879600e+02 1.778300e+02\n0 4988     -6.626800e+02 -5.059500e+02\n1 4988     -5.679500e+02 -2.459400e+02\n0 4989     8.664001e+01 3.664000e+02\n1 4989     4.328600e+02 3.510300e+02\n0 4990     2.018400e+02 2.476500e+02\n1 4990     5.056100e+02 2.018400e+02\n0 4991     -7.674300e+02 -4.820601e+02\n1 4991     -6.432000e+02 -1.946800e+02\n0 4992     4.868700e+02 2.424500e+02\n1 4992     8.000200e+02 1.166100e+02\n0 4993     5.653003e+01 2.363100e+02\n1 4993     3.523900e+02 2.313400e+02\n0 4994     3.973700e+02 3.859300e+02\n1 4994     7.716700e+02 2.874000e+02\n0 4995     -2.612700e+02 -5.543199e+02\n1 4995     -2.422600e+02 -4.153800e+02\n0 4996     7.085200e+02 -3.400900e+02\n1 4996     8.152800e+02 -5.622700e+02\n0 4997     -4.593900e+02 2.791800e+02\n1 4997     -1.310600e+02 4.060500e+02\n0 4998     4.006700e+02 -4.604100e+02\n1 4998     4.275900e+02 -5.596700e+02\n0 4999     4.202000e+02 -7.096997e+01\n1 4999     5.764700e+02 -1.749900e+02\n0 5000     5.106300e+02 -9.037000e+01\n1 5000     6.969600e+02 -2.326300e+02\n0 5001     -2.472600e+02 -4.914100e+02\n1 5001     -2.074600e+02 -3.627800e+02\n0 5002     -1.759600e+02 -5.546899e+02\n1 5002     -1.659800e+02 -4.436500e+02\n6 5002     -2.871002e+01 -7.157300e+02\n0 5003     -1.152300e+02 -4.971801e+02\n1 5003     -8.898999e+01 -4.119400e+02\n0 5004     7.009000e+02 -2.944100e+02\n1 5004     8.264800e+02 -5.120400e+02\n0 5005     2.137700e+02 -5.388800e+02\n1 5005     2.091801e+02 -5.653600e+02\n0 5006     6.602600e+02 -3.143400e+02\n1 5006     7.701899e+02 -5.157000e+02\n0 5007     6.073400e+02 -4.025700e+02\n1 5007     6.724600e+02 -5.838900e+02\n0 5008     -1.431800e+02 -5.329500e+02\n1 5008     -1.282100e+02 -4.349200e+02\n0 5009     -1.479300e+02 -5.186700e+02\n1 5009     -1.274000e+02 -4.203600e+02\n0 5010     7.263000e+01 3.457700e+02\n1 5010     4.106801e+02 3.343700e+02\n11 5010     2.200500e+02 -3.997100e+02\n0 5011     7.263000e+01 3.457700e+02\n1 5011     4.106801e+02 3.343700e+02\n11 5011     2.200500e+02 -3.997100e+02\n0 5012     7.156300e+02 -3.564900e+02\n1 5012     8.164700e+02 -5.823000e+02\n0 5013     5.395400e+02 -2.815500e+02\n1 5013     6.486000e+02 -4.353400e+02\n0 5014     -2.826600e+02 -3.959500e+02\n1 5014     -2.047900e+02 -2.651400e+02\n0 5015     -1.689300e+02 1.349700e+02\n1 5015     9.388000e+01 1.954500e+02\n0 5016     2.357800e+02 -5.259700e+02\n1 5016     2.346400e+02 -5.613101e+02\n0 5017     3.323500e+02 5.485900e+02\n1 5017     7.541801e+02 4.770100e+02\n0 5018     5.255699e+02 -3.500300e+02\n1 5018     6.051100e+02 -4.984800e+02\n0 5019     1.676700e+02 -5.657400e+02\n1 5019     1.524100e+02 -5.741400e+02\n0 5020     -2.604600e+02 -4.155400e+02\n1 5020     -1.919300e+02 -2.898200e+02\n0 5021     5.346801e+02 -3.425400e+02\n1 5021     6.180200e+02 -4.943101e+02\n0 5022     5.219399e+02 -3.792300e+02\n1 5022     5.892700e+02 -5.261300e+02\n0 5023     -1.022900e+02 1.961400e+02\n1 5023     1.810400e+02 2.358800e+02\n0 5024     5.402600e+02 -3.459500e+02\n1 5024     6.229301e+02 -5.000500e+02\n0 5025     4.935800e+02 5.884000e+02\n2 5025     1.198600e+02 3.585100e+02\n6 5025     2.440002e+01 7.282800e+02\n9 5025     -5.375000e+01 3.890400e+02\n0 5026     -5.098500e+02 5.860500e+02\n2 5026     -8.053000e+02 3.710600e+02\n0 5027     -5.098500e+02 5.860500e+02\n2 5027     -8.053000e+02 3.710600e+02\n0 5028     -1.006900e+02 5.848300e+02\n3 5028     -5.163800e+02 2.598999e+01\n12 5028     -4.286400e+02 5.964200e+02\n0 5029     3.836400e+02 5.850200e+02\n6 5029     -8.562000e+01 7.033700e+02\n14 5029     6.796400e+02 -1.306300e+02\n0 5030     4.395300e+02 5.839200e+02\n14 5030     7.344900e+02 -1.281300e+02\n0 5031     -3.764500e+02 5.836600e+02\n2 5031     -6.624800e+02 3.629700e+02\n13 5031     -1.034300e+02 2.222600e+02\n14 5031     -3.906000e+01 -1.587300e+02\n0 5032     3.233000e+02 5.837300e+02\n14 5032     6.198900e+02 -1.361600e+02\n0 5033     -1.105900e+02 5.830400e+02\n2 5033     -4.000800e+02 3.551200e+02\n0 5034     -6.054800e+02 5.817200e+02\n14 5034     -2.518700e+02 -1.620400e+02\n0 5035     4.570300e+02 5.814200e+02\n6 5035     -9.909973e+00 7.133300e+02\n14 5035     7.516801e+02 -1.294200e+02\n0 5036     -5.429900e+02 5.808700e+02\n14 5036     -1.947200e+02 -1.624400e+02\n0 5037     -4.753900e+02 5.808400e+02\n2 5037     -7.673100e+02 3.630800e+02\n8 5037     -5.501100e+02 2.697000e+02\n11 5037     -2.613700e+02 -2.026600e+02\n14 5037     -1.315200e+02 -1.622000e+02\n0 5038     -1.484700e+02 5.806800e+02\n2 5038     -4.359600e+02 3.534300e+02\n14 5038     1.741500e+02 -1.586300e+02\n0 5039     4.377400e+02 5.805300e+02\n2 5039     7.657001e+01 3.501000e+02\n3 5039     -7.300000e+01 1.515997e+01\n8 5039     1.440100e+02 2.764700e+02\n9 5039     -9.027002e+01 3.805700e+02\n11 5039     5.346899e+02 -1.726600e+02\n14 5039     7.325800e+02 -1.315900e+02\n0 5040     -1.073600e+02 5.790100e+02\n2 5040     -3.968900e+02 3.508000e+02\n0 5041     -1.073600e+02 5.790100e+02\n2 5041     -3.968900e+02 3.508000e+02\n0 5042     5.977100e+02 5.784700e+02\n6 5042     2.648800e+02 7.628800e+02\n0 5043     5.977100e+02 5.784700e+02\n6 5043     2.648800e+02 7.628800e+02\n0 5044     -2.224000e+02 5.770700e+02\n2 5044     -5.072100e+02 3.506700e+02\n3 5044     -6.298300e+02 2.160999e+01\n5 5044     1.938500e+02 -7.123999e+01\n12 5044     -5.635200e+02 5.721200e+02\n14 5044     1.043900e+02 -1.631900e+02\n0 5045     -1.196700e+02 5.767300e+02\n12 5045     -4.482900e+02 5.838500e+02\n0 5046     -5.212500e+02 5.752200e+02\n2 5046     -8.182400e+02 3.584400e+02\n8 5046     -5.899500e+02 2.646600e+02\n0 5047     -3.164900e+02 5.749900e+02\n5 5047     1.035300e+02 -7.288000e+01\n14 5047     1.597998e+01 -1.665700e+02\n0 5048     -3.164900e+02 5.749900e+02\n5 5048     1.035300e+02 -7.288000e+01\n14 5048     1.597998e+01 -1.665700e+02\n0 5049     -2.442300e+02 5.746700e+02\n14 5049     8.408002e+01 -1.659800e+02\n0 5050     3.701700e+02 5.744000e+02\n5 5050     7.704301e+02 -6.034998e+01\n6 5050     -9.714999e+01 6.890000e+02\n14 5050     6.678400e+02 -1.419600e+02\n0 5051     4.405300e+02 5.744000e+02\n9 5051     -8.690997e+01 3.754600e+02\n11 5051     5.391100e+02 -1.777300e+02\n14 5051     7.364100e+02 -1.376600e+02\n0 5052     5.722100e+02 5.739200e+02\n2 5052     3.185601e+02 4.733400e+02\n3 5052     1.736300e+02 1.369400e+02\n9 5052     1.233400e+02 4.955100e+02\n13 5052     7.072600e+02 2.798100e+02\n0 5053     1.491000e+02 5.720600e+02\n12 5053     -1.596000e+02 6.125200e+02\n0 5054     2.942700e+02 5.719900e+02\n14 5054     5.944200e+02 -1.488600e+02\n0 5055     3.713700e+02 5.720000e+02\n2 5055     2.416998e+01 3.414100e+02\n5 5055     7.719000e+02 -6.298999e+01\n6 5055     -9.579999e+01 6.857800e+02\n9 5055     -1.343300e+02 3.711900e+02\n0 5056     1.891600e+02 5.705200e+02\n6 5056     -2.857000e+02 6.493400e+02\n14 5056     4.935400e+02 -1.556500e+02\n0 5057     -4.676900e+02 5.701300e+02\n2 5057     -7.591300e+02 3.503800e+02\n5 5057     -4.040002e+01 -7.642999e+01\n8 5057     -5.429800e+02 2.595800e+02\n14 5057     -1.256200e+02 -1.724600e+02\n0 5058     3.685300e+02 5.688400e+02\n14 5058     6.664100e+02 -1.472100e+02\n0 5059     5.715601e+02 5.690900e+02\n2 5059     3.192400e+02 4.687600e+02\n3 5059     1.738800e+02 1.337100e+02\n6 5059     2.351700e+02 7.468500e+02\n0 5060     4.284000e+02 5.686500e+02\n13 5060     5.260800e+02 2.551300e+02\n14 5060     7.250100e+02 -1.439500e+02\n0 5061     5.443700e+02 5.680000e+02\n2 5061     2.905601e+02 4.590100e+02\n6 5061     2.010400e+02 7.386400e+02\n8 5061     3.070600e+02 3.543600e+02\n13 5061     6.812100e+02 2.723800e+02\n0 5062     5.443700e+02 5.680000e+02\n2 5062     2.905601e+02 4.590100e+02\n6 5062     2.010400e+02 7.386400e+02\n13 5062     6.812100e+02 2.723800e+02\n0 5063     -3.592200e+02 5.676100e+02\n11 5063     -1.649100e+02 -2.129600e+02\n14 5063     -2.435999e+01 -1.744700e+02\n0 5064     5.887400e+02 5.675100e+02\n2 5064     3.377700e+02 4.725700e+02\n3 5064     1.916801e+02 1.365400e+02\n6 5064     2.568300e+02 7.481500e+02\n0 5065     -3.703300e+02 5.670300e+02\n2 5065     -6.560500e+02 3.429400e+02\n14 5065     -3.495001e+01 -1.750500e+02\n0 5066     -1.160900e+02 5.667800e+02\n12 5066     -4.424200e+02 5.724900e+02\n0 5067     -4.737900e+02 5.665700e+02\n5 5067     -4.645001e+01 -8.013000e+01\n0 5068     -4.737900e+02 5.665700e+02\n2 5068     -7.657600e+02 3.461100e+02\n5 5068     -4.645001e+01 -8.013000e+01\n14 5068     -1.313600e+02 -1.761400e+02\n0 5069     -3.667900e+02 5.663700e+02\n2 5069     -6.524800e+02 3.418000e+02\n5 5069     5.476001e+01 -8.188000e+01\n12 5069     -7.302200e+02 5.413300e+02\n14 5069     -3.171997e+01 -1.756900e+02\n0 5070     5.985999e+01 5.662000e+02\n2 5070     -2.421000e+02 3.343200e+02\n0 5071     5.129100e+02 5.663300e+02\n6 5071     1.605900e+02 7.289000e+02\n9 5071     6.921002e+01 4.708000e+02\n13 5071     6.512600e+02 2.678200e+02\n14 5071     8.794800e+02 -1.328900e+02\n0 5072     -4.847700e+02 5.651100e+02\n8 5072     -5.572300e+02 2.547600e+02\n11 5072     -2.689300e+02 -2.154900e+02\n13 5072     -1.879900e+02 2.021400e+02\n0 5073     -3.792900e+02 5.641800e+02\n5 5073     4.258002e+01 -8.357001e+01\n0 5074     -3.225600e+02 5.639900e+02\n2 5074     -6.066300e+02 3.381800e+02\n0 5075     -3.225600e+02 5.639900e+02\n2 5075     -6.066300e+02 3.381800e+02\n12 5075     -6.776000e+02 5.443400e+02\n0 5076     6.172900e+02 5.637300e+02\n2 5076     3.690500e+02 4.782000e+02\n3 5076     2.212900e+02 1.422200e+02\n6 5076     2.929300e+02 7.510700e+02\n9 5076     1.663600e+02 5.011900e+02\n13 5076     7.512100e+02 2.757400e+02\n0 5077     4.357900e+02 5.632500e+02\n2 5077     7.846997e+01 3.328400e+02\n14 5077     7.328600e+02 -1.492800e+02\n0 5078     -4.722600e+02 5.628000e+02\n2 5078     -7.642900e+02 3.417300e+02\n0 5079     4.651400e+02 5.629000e+02\n14 5079     7.616801e+02 -1.474200e+02\n0 5080     -1.430300e+02 5.625600e+02\n2 5080     -4.298400e+02 3.327500e+02\n11 5080     1.903003e+01 -2.140200e+02\n0 5081     8.298999e+01 5.624600e+02\n6 5081     -3.995800e+02 6.189400e+02\n0 5082     3.034500e+02 5.623600e+02\n2 5082     -3.113000e+01 3.307500e+02\n6 5082     -1.647400e+02 6.607600e+02\n9 5082     -1.805700e+02 3.603400e+02\n0 5083     3.034500e+02 5.623600e+02\n2 5083     -3.113000e+01 3.307500e+02\n6 5083     -1.647400e+02 6.607600e+02\n9 5083     -1.805700e+02 3.603400e+02\n0 5084     4.187800e+02 5.625600e+02\n14 5084     7.165000e+02 -1.505600e+02\n0 5085     -4.984500e+02 5.621900e+02\n2 5085     -7.928700e+02 3.425800e+02\n7 5085     -7.466400e+02 5.857100e+02\n8 5085     -5.705100e+02 2.520700e+02\n14 5085     -1.548700e+02 -1.802400e+02\n0 5086     5.665900e+02 5.620200e+02\n3 5086     1.703800e+02 1.260600e+02\n0 5087     1.086500e+02 5.612900e+02\n3 5087     -3.293900e+02 -5.380005e+00\n0 5088     2.313700e+02 5.616700e+02\n14 5088     5.341400e+02 -1.629100e+02\n0 5089     -4.820100e+02 5.597400e+02\n7 5089     -7.283400e+02 5.844000e+02\n8 5089     -5.553700e+02 2.491900e+02\n11 5089     -2.674600e+02 -2.194300e+02\n14 5089     -1.400900e+02 -1.828900e+02\n0 5090     5.638800e+02 5.596100e+02\n3 5090     1.683600e+02 1.221400e+02\n0 5091     5.638800e+02 5.596100e+02\n3 5091     1.683600e+02 1.221400e+02\n0 5092     1.534800e+02 5.590200e+02\n14 5092     4.596100e+02 -1.694000e+02\n0 5093     -4.146400e+02 5.582800e+02\n2 5093     -7.026800e+02 3.338400e+02\n0 5094     -3.662200e+02 5.586400e+02\n5 5094     5.448999e+01 -8.965002e+01\n8 5094     -4.555500e+02 2.476400e+02\n11 5094     -1.711300e+02 -2.204300e+02\n12 5094     -7.279600e+02 5.312400e+02\n13 5094     -9.617999e+01 2.021500e+02\n14 5094     -3.172998e+01 -1.833500e+02\n0 5095     -3.662200e+02 5.586400e+02\n2 5095     -6.518900e+02 3.330100e+02\n13 5095     -9.617999e+01 2.021500e+02\n0 5096     -2.994100e+02 5.585800e+02\n8 5096     -4.000000e+02 2.476200e+02\n11 5096     -1.148800e+02 -2.202900e+02\n13 5096     -4.402002e+01 2.045700e+02\n14 5096     3.109003e+01 -1.826300e+02\n0 5097     -2.186300e+02 5.585700e+02\n2 5097     -5.030100e+02 3.295000e+02\n12 5097     -5.562300e+02 5.500800e+02\n0 5098     3.216600e+02 5.587100e+02\n3 5098     -1.585600e+02 -7.320007e+00\n9 5098     -1.671000e+02 3.575500e+02\n14 5098     6.219900e+02 -1.603700e+02\n0 5099     6.107400e+02 5.576700e+02\n2 5099     3.632300e+02 4.712800e+02\n3 5099     2.161400e+02 1.356000e+02\n6 5099     2.862500e+02 7.430400e+02\n8 5099     3.662800e+02 3.630700e+02\n9 5099     1.618400e+02 4.947700e+02\n11 5099     6.768000e+02 -1.835100e+02\n13 5099     7.456700e+02 2.705800e+02\n0 5100     -3.776700e+02 5.576100e+02\n2 5100     -6.639200e+02 3.314100e+02\n5 5100     4.359003e+01 -9.088000e+01\n8 5100     -4.647300e+02 2.464600e+02\n11 5100     -1.811600e+02 -2.211900e+02\n12 5100     -7.411300e+02 5.280500e+02\n14 5100     -4.253998e+01 -1.845200e+02\n0 5101     -3.776700e+02 5.576100e+02\n2 5101     -6.639200e+02 3.314100e+02\n5 5101     4.359003e+01 -9.088000e+01\n8 5101     -4.647300e+02 2.464600e+02\n12 5101     -7.411300e+02 5.280500e+02\n14 5101     -4.253998e+01 -1.845200e+02\n0 5102     6.440997e+01 5.573600e+02\n9 5102     -3.560200e+02 3.492200e+02\n0 5103     4.605000e+02 5.575500e+02\n14 5103     7.580500e+02 -1.533000e+02\n0 5104     -3.097800e+02 5.567500e+02\n2 5104     -5.935400e+02 3.291000e+02\n8 5104     -4.087300e+02 2.465700e+02\n11 5104     -1.234500e+02 -2.213600e+02\n14 5104     2.142999e+01 -1.846000e+02\n0 5105     1.557800e+02 5.563700e+02\n2 5105     -1.564700e+02 3.232200e+02\n9 5105     -2.870000e+02 3.500000e+02\n13 5105     3.110800e+02 2.266100e+02\n0 5106     -1.744000e+02 5.558400e+02\n2 5106     -4.599200e+02 3.251500e+02\n0 5107     5.734998e+01 5.561600e+02\n2 5107     -2.434100e+02 3.236100e+02\n6 5107     -4.255600e+02 6.057200e+02\n9 5107     -3.605500e+02 3.480200e+02\n0 5108     -5.009600e+02 5.551700e+02\n5 5108     -7.434998e+01 -9.190997e+01\n0 5109     4.373300e+02 5.551600e+02\n11 5109     5.390300e+02 -1.940900e+02\n14 5109     7.354700e+02 -1.575700e+02\n0 5110     5.909700e+02 5.551300e+02\n2 5110     3.430800e+02 4.635000e+02\n3 5110     1.968400e+02 1.284800e+02\n6 5110     2.623900e+02 7.370100e+02\n8 5110     3.494300e+02 3.577300e+02\n9 5110     1.439600e+02 4.884200e+02\n13 5110     7.272300e+02 2.670800e+02\n0 5111     -3.904900e+02 5.541100e+02\n2 5111     -6.770500e+02 3.286200e+02\n7 5111     -6.294100e+02 5.864900e+02\n12 5111     -7.568700e+02 5.238400e+02\n14 5111     -5.488000e+01 -1.875700e+02\n0 5112     -3.033200e+02 5.523500e+02\n2 5112     -5.883200e+02 3.234700e+02\n12 5112     -6.529200e+02 5.317200e+02\n0 5113     3.511700e+02 5.524300e+02\n14 5113     6.513300e+02 -1.655300e+02\n0 5114     -5.220400e+02 5.513300e+02\n8 5114     -5.918200e+02 2.418800e+02\n0 5115     -2.985400e+02 5.517000e+02\n2 5115     -5.824600e+02 3.239900e+02\n5 5115     1.185500e+02 -9.635999e+01\n12 5115     -6.472800e+02 5.317300e+02\n0 5116     5.396899e+02 5.503400e+02\n3 5116     1.456400e+02 1.065400e+02\n8 5116     3.064900e+02 3.394500e+02\n0 5117     -5.628200e+02 5.497400e+02\n14 5117     -2.169700e+02 -1.929000e+02\n0 5118     -3.057700e+02 5.482500e+02\n2 5118     -5.892700e+02 3.190400e+02\n12 5118     -6.547200e+02 5.265800e+02\n0 5119     -4.440600e+02 5.478200e+02\n14 5119     -1.044200e+02 -1.940800e+02\n0 5120     5.741100e+02 5.472900e+02\n2 5120     3.272200e+02 4.505000e+02\n3 5120     1.818400e+02 1.157500e+02\n6 5120     2.434300e+02 7.232000e+02\n0 5121     -3.221200e+02 5.470800e+02\n12 5121     -6.738200e+02 5.229900e+02\n14 5121     8.770020e+00 -1.943700e+02\n0 5122     -3.129300e+02 5.471000e+02\n5 5122     1.038700e+02 -1.016600e+02\n7 5122     -5.475100e+02 5.859200e+02\n12 5122     -6.635700e+02 5.234700e+02\n0 5123     6.023500e+02 5.472500e+02\n2 5123     3.572700e+02 4.598900e+02\n6 5123     2.786200e+02 7.301800e+02\n8 5123     3.611800e+02 3.542500e+02\n9 5123     1.566801e+02 4.849500e+02\n11 5123     6.705900e+02 -1.923600e+02\n13 5123     7.391700e+02 2.615900e+02\n0 5124     -4.497300e+02 5.466400e+02\n14 5124     -1.097500e+02 -1.955600e+02\n0 5125     -4.185100e+02 5.464000e+02\n2 5125     -7.058500e+02 3.190900e+02\n0 5126     2.988000e+02 5.462700e+02\n2 5126     -3.250000e+01 3.131300e+02\n3 5126     -1.756200e+02 -2.082001e+01\n5 5126     6.997600e+02 -9.321997e+01\n6 5126     -1.656000e+02 6.394200e+02\n11 5126     4.129600e+02 -2.104100e+02\n12 5126     -5.300293e-01 6.018500e+02\n14 5126     6.004399e+02 -1.746700e+02\n0 5127     -2.278100e+02 5.459200e+02\n2 5127     -5.114600e+02 3.150400e+02\n12 5127     -5.648000e+02 5.340300e+02\n0 5128     -2.278100e+02 5.459200e+02\n12 5128     -5.648000e+02 5.340300e+02\n0 5129     6.015601e+02 5.445300e+02\n3 5129     2.110000e+02 1.215300e+02\n0 5130     4.020200e+02 5.440500e+02\n6 5130     -5.862000e+01 6.571000e+02\n12 5130     1.027400e+02 6.125900e+02\n14 5130     7.019301e+02 -1.705100e+02\n0 5131     3.279100e+02 5.415400e+02\n14 5131     6.293500e+02 -1.777500e+02\n0 5132     3.454100e+02 5.416400e+02\n5 5132     7.473000e+02 -9.615002e+01\n9 5132     -1.476600e+02 3.424900e+02\n0 5133     -3.525300e+02 5.408000e+02\n5 5133     6.547998e+01 -1.073100e+02\n12 5133     -7.088900e+02 5.115700e+02\n0 5134     3.547600e+02 5.406500e+02\n14 5134     6.559700e+02 -1.770100e+02\n0 5135     -6.498000e+02 5.398600e+02\n5 5135     -2.346200e+02 -1.061900e+02\n13 5135     -3.327900e+02 1.725700e+02\n0 5136     -6.191000e+02 5.401100e+02\n5 5136     -1.873300e+02 -1.046300e+02\n11 5136     -3.809200e+02 -2.345600e+02\n14 5136     -2.707800e+02 -2.026400e+02\n0 5137     -6.191000e+02 5.401100e+02\n14 5137     -2.707800e+02 -2.026400e+02\n0 5138     -4.570300e+02 5.398800e+02\n5 5138     -3.403003e+01 -1.069400e+02\n8 5138     -5.344000e+02 2.307600e+02\n0 5139     3.194301e+02 5.400400e+02\n14 5139     6.212800e+02 -1.798000e+02\n0 5140     4.457700e+02 5.400100e+02\n14 5140     7.457800e+02 -1.719300e+02\n0 5141     5.942200e+02 5.399600e+02\n2 5141     3.504399e+02 4.509900e+02\n3 5141     2.040300e+02 1.163400e+02\n6 5141     2.707400e+02 7.208500e+02\n9 5141     1.512400e+02 4.770000e+02\n13 5141     7.319900e+02 2.552400e+02\n0 5142     -4.133000e+02 5.397100e+02\n2 5142     -7.018000e+02 3.115100e+02\n5 5142     7.159973e+00 -1.077700e+02\n7 5142     -6.518300e+02 5.687600e+02\n11 5142     -2.120500e+02 -2.357200e+02\n14 5142     -7.815002e+01 -2.022300e+02\n0 5143     -2.158300e+02 5.391400e+02\n2 5143     -4.996000e+02 3.066900e+02\n3 5143     -6.243600e+02 -2.178003e+01\n5 5143     1.968900e+02 -1.101400e+02\n7 5143     -4.468000e+02 5.871300e+02\n8 5143     -3.312600e+02 2.309900e+02\n12 5143     -5.498700e+02 5.266100e+02\n0 5144     -3.091700e+02 5.379500e+02\n7 5144     -5.423100e+02 5.769900e+02\n0 5145     2.523600e+02 5.382400e+02\n14 5145     5.568800e+02 -1.851500e+02\n0 5146     -1.451300e+02 5.369800e+02\n14 5146     1.758500e+02 -2.014300e+02\n0 5147     6.170100e+02 5.370400e+02\n2 5147     3.752500e+02 4.552800e+02\n3 5147     2.278101e+02 1.211000e+02\n6 5147     2.994500e+02 7.219300e+02\n9 5147     1.723700e+02 4.813300e+02\n13 5147     7.541600e+02 2.547300e+02\n0 5148     -3.256200e+02 5.351800e+02\n2 5148     -6.097300e+02 3.040200e+02\n7 5148     -5.588000e+02 5.723900e+02\n8 5148     -4.213700e+02 2.269600e+02\n11 5148     -1.378400e+02 -2.384700e+02\n12 5148     -6.762700e+02 5.083600e+02\n0 5149     2.726001e+01 5.348000e+02\n2 5149     -2.691000e+02 2.998500e+02\n6 5149     -4.552900e+02 5.722500e+02\n12 5149     -2.814000e+02 5.532700e+02\n0 5150     6.041200e+02 5.350400e+02\n2 5150     3.622900e+02 4.494600e+02\n0 5151     -5.371100e+02 5.346000e+02\n5 5151     -1.110100e+02 -1.109000e+02\n14 5151     -1.949400e+02 -2.076100e+02\n0 5152     -3.835200e+02 5.347500e+02\n7 5152     -6.194800e+02 5.657300e+02\n0 5153     -4.564000e+02 5.341900e+02\n2 5153     -7.475800e+02 3.065300e+02\n5 5153     -3.469000e+01 -1.134600e+02\n7 5153     -6.965900e+02 5.588600e+02\n8 5153     -5.328500e+02 2.251300e+02\n0 5154     3.905900e+02 5.339400e+02\n2 5154     4.565002e+01 3.015400e+02\n6 5154     -6.812000e+01 6.421200e+02\n0 5155     2.070800e+02 5.332800e+02\n5 5155     6.086500e+02 -1.098000e+02\n6 5155     -2.596300e+02 6.055200e+02\n12 5155     -9.216998e+01 5.750100e+02\n14 5155     5.123500e+02 -1.929700e+02\n0 5156     6.440000e+02 5.335700e+02\n6 5156     3.747000e+02 7.340900e+02\n0 5157     -3.082400e+02 5.325000e+02\n2 5157     -5.920200e+02 3.001800e+02\n7 5157     -5.402700e+02 5.707400e+02\n0 5158     -2.163100e+02 5.327800e+02\n7 5158     -4.464300e+02 5.802900e+02\n12 5158     -5.493400e+02 5.191100e+02\n0 5159     -6.104800e+02 5.317800e+02\n5 5159     -1.813100e+02 -1.132100e+02\n11 5159     -3.760600e+02 -2.416100e+02\n13 5159     -2.883900e+02 1.699500e+02\n14 5159     -2.640500e+02 -2.107400e+02\n0 5160     -5.592300e+02 5.318000e+02\n14 5160     -2.161500e+02 -2.105500e+02\n0 5161     -5.256200e+02 5.321300e+02\n5 5161     -9.921997e+01 -1.138600e+02\n14 5161     -1.830400e+02 -2.103500e+02\n0 5162     -1.232900e+02 5.320500e+02\n12 5162     -4.445400e+02 5.295400e+02\n0 5163     -1.232900e+02 5.320500e+02\n12 5163     -4.445400e+02 5.295400e+02\n0 5164     3.928199e+02 5.318100e+02\n14 5164     6.943800e+02 -1.835400e+02\n0 5165     1.614600e+02 5.305200e+02\n2 5165     -1.478600e+02 2.953200e+02\n5 5165     5.639500e+02 -1.134700e+02\n6 5165     -3.071600e+02 5.937100e+02\n0 5166     1.983900e+02 5.306900e+02\n9 5166     -2.521300e+02 3.271300e+02\n0 5167     -2.086100e+02 5.302100e+02\n5 5167     2.035699e+02 -1.190400e+02\n7 5167     -4.380500e+02 5.785700e+02\n12 5167     -5.399800e+02 5.171300e+02\n0 5168     1.531600e+02 5.299100e+02\n5 5168     5.554600e+02 -1.151200e+02\n0 5169     -6.990600e+02 5.296100e+02\n5 5169     -3.426800e+02 -1.213700e+02\n13 5169     -4.184000e+02 1.539200e+02\n0 5170     -1.044000e+01 5.294400e+02\n2 5170     -3.029200e+02 2.932100e+02\n5 5170     3.956400e+02 -1.187900e+02\n0 5171     3.945200e+02 5.295500e+02\n5 5171     7.985601e+02 -1.067200e+02\n6 5171     -6.334998e+01 6.378600e+02\n12 5171     9.808002e+01 5.952000e+02\n14 5171     6.962800e+02 -1.857700e+02\n0 5172     -3.181300e+02 5.289700e+02\n7 5172     -5.501900e+02 5.666300e+02\n8 5172     -4.148400e+02 2.209700e+02\n12 5172     -6.664700e+02 5.016000e+02\n0 5173     -3.181300e+02 5.289700e+02\n5 5173     9.747998e+01 -1.195500e+02\n7 5173     -5.501900e+02 5.666300e+02\n8 5173     -4.148400e+02 2.209700e+02\n0 5174     -2.238200e+02 5.288900e+02\n7 5174     -4.534700e+02 5.756500e+02\n11 5174     -5.059003e+01 -2.435400e+02\n12 5174     -5.573000e+02 5.134400e+02\n0 5175     4.458500e+02 5.279100e+02\n6 5175     -1.115002e+01 6.463600e+02\n13 5175     5.425200e+02 2.230900e+02\n14 5175     7.469000e+02 -1.840000e+02\n0 5176     -3.312400e+02 5.277200e+02\n2 5176     -6.153200e+02 2.953900e+02\n5 5176     8.478998e+01 -1.210900e+02\n14 5176     -1.369995e+00 -2.139600e+02\n0 5177     -9.821997e+01 5.264100e+02\n2 5177     -3.850700e+02 2.904600e+02\n5 5177     3.098199e+02 -1.226300e+02\n7 5177     -3.266700e+02 5.854000e+02\n12 5177     -4.157700e+02 5.270600e+02\n0 5178     -9.821997e+01 5.264100e+02\n2 5178     -3.850700e+02 2.904600e+02\n5 5178     3.098199e+02 -1.226300e+02\n12 5178     -4.157700e+02 5.270600e+02\n0 5179     -9.821997e+01 5.264100e+02\n2 5179     -3.850700e+02 2.904600e+02\n5 5179     3.098199e+02 -1.226300e+02\n7 5179     -3.266700e+02 5.854000e+02\n12 5179     -4.157700e+02 5.270600e+02\n0 5180     -5.376900e+02 5.262400e+02\n5 5180     -1.130100e+02 -1.203700e+02\n13 5180     -2.316500e+02 1.681300e+02\n14 5180     -1.965000e+02 -2.165100e+02\n0 5181     6.090300e+02 5.262000e+02\n6 5181     2.926700e+02 7.084300e+02\n0 5182     6.221400e+02 5.250200e+02\n3 5182     2.361500e+02 1.131200e+02\n9 5182     1.800800e+02 4.743800e+02\n0 5183     6.981000e+02 5.245800e+02\n6 5183     4.409600e+02 7.377000e+02\n0 5184     -4.390200e+02 5.238300e+02\n11 5184     -2.345000e+02 -2.482300e+02\n14 5184     -1.037800e+02 -2.187200e+02\n0 5185     -2.269900e+02 5.236600e+02\n7 5185     -4.559500e+02 5.701700e+02\n0 5186     9.133002e+01 5.236800e+02\n6 5186     -3.816800e+02 5.704200e+02\n0 5187     3.964500e+02 5.229200e+02\n5 5187     8.009301e+02 -1.133700e+02\n6 5187     -5.985999e+01 6.304400e+02\n14 5187     6.988101e+02 -1.925200e+02\n0 5188     -5.515300e+02 5.226200e+02\n5 5188     -1.267100e+02 -1.232300e+02\n7 5188     -7.983700e+02 5.373300e+02\n11 5188     -3.278000e+02 -2.486400e+02\n14 5188     -2.102900e+02 -2.199400e+02\n0 5189     6.113400e+02 5.224400e+02\n6 5189     2.965500e+02 7.048500e+02\n0 5190     -2.173800e+02 5.221300e+02\n2 5190     -5.006200e+02 2.867000e+02\n3 5190     -6.259500e+02 -4.217999e+01\n7 5190     -4.460100e+02 5.689300e+02\n8 5190     -3.318100e+02 2.150100e+02\n12 5190     -5.486000e+02 5.055600e+02\n0 5191     6.187600e+02 5.218200e+02\n2 5191     3.811000e+02 4.428000e+02\n6 5191     3.055500e+02 7.061300e+02\n0 5192     6.987600e+02 5.214200e+02\n6 5192     4.419800e+02 7.342000e+02\n9 5192     2.868700e+02 5.333700e+02\n0 5193     -3.168300e+02 5.212400e+02\n2 5193     -6.003700e+02 2.875300e+02\n0 5194     -3.168300e+02 5.212400e+02\n2 5194     -6.003700e+02 2.875300e+02\n7 5194     -5.476600e+02 5.583100e+02\n0 5195     2.978003e+01 5.208300e+02\n2 5195     -2.653400e+02 2.840500e+02\n6 5195     -4.497100e+02 5.549500e+02\n12 5195     -2.760100e+02 5.373100e+02\n0 5196     6.461300e+02 5.184900e+02\n2 5196     4.546899e+02 4.930000e+02\n11 5196     7.082600e+02 -2.155000e+02\n0 5197     2.687000e+01 5.175000e+02\n5 5197     4.314000e+02 -1.299600e+02\n6 5197     -4.523800e+02 5.503900e+02\n11 5197     1.704100e+02 -2.473500e+02\n0 5198     -5.270800e+02 5.168400e+02\n2 5198     -8.265800e+02 2.864000e+02\n5 5198     -1.041300e+02 -1.300100e+02\n7 5198     -7.697200e+02 5.320900e+02\n11 5198     -3.078100e+02 -2.548100e+02\n13 5198     -2.237400e+02 1.607100e+02\n14 5198     -1.876700e+02 -2.260800e+02\n0 5199     -4.024000e+02 5.157200e+02\n2 5199     -6.898700e+02 2.802200e+02\n7 5199     -6.357900e+02 5.434900e+02\n8 5199     -4.864100e+02 2.056100e+02\n11 5199     -2.034800e+02 -2.563900e+02\n12 5199     -7.643000e+02 4.708300e+02\n0 5200     -3.097600e+02 5.157000e+02\n2 5200     -5.931100e+02 2.802700e+02\n5 5200     1.046100e+02 -1.333200e+02\n7 5200     -5.394300e+02 5.531800e+02\n0 5201     1.525000e+01 5.155700e+02\n2 5201     -2.779900e+02 2.781800e+02\n5 5201     4.202400e+02 -1.326100e+02\n0 5202     1.065997e+01 5.148000e+02\n3 5202     -4.141600e+02 -5.469000e+01\n6 5202     -4.697100e+02 5.428500e+02\n0 5203     7.960999e+01 5.152400e+02\n5 5203     4.832700e+02 -1.321100e+02\n6 5203     -3.931800e+02 5.569700e+02\n8 5203     -1.016900e+02 2.137400e+02\n9 5203     -3.390100e+02 3.085400e+02\n12 5203     -2.217200e+02 5.374700e+02\n0 5204     7.573999e+01 5.147000e+02\n14 5204     3.870100e+02 -2.178600e+02\n0 5205     7.209003e+01 5.140300e+02\n2 5205     -2.259500e+02 2.768600e+02\n3 5205     -3.586800e+02 -5.535999e+01\n6 5205     -3.998900e+02 5.554700e+02\n7 5205     -1.582500e+02 5.899900e+02\n9 5205     -3.432900e+02 3.077000e+02\n14 5205     3.832900e+02 -2.187300e+02\n0 5206     -1.596000e+02 5.136100e+02\n12 5206     -4.820100e+02 5.036900e+02\n0 5207     -1.596000e+02 5.136100e+02\n12 5207     -4.820100e+02 5.036900e+02\n0 5208     -5.548800e+02 5.128500e+02\n5 5208     -1.317500e+02 -1.332700e+02\n0 5209     1.291998e+01 5.123900e+02\n5 5209     4.174399e+02 -1.354100e+02\n7 5209     -2.157200e+02 5.823300e+02\n11 5209     1.577800e+02 -2.527600e+02\n14 5209     3.259800e+02 -2.218700e+02\n0 5210     7.852002e+01 5.124100e+02\n2 5210     -2.204200e+02 2.749300e+02\n5 5210     4.819000e+02 -1.349200e+02\n6 5210     -3.940600e+02 5.534800e+02\n14 5210     3.891400e+02 -2.201200e+02\n0 5211     -3.188800e+02 5.118100e+02\n7 5211     -5.487900e+02 5.481200e+02\n0 5212     7.264001e+01 5.114000e+02\n2 5212     -2.251000e+02 2.739000e+02\n3 5212     -3.580800e+02 -5.890997e+01\n5 5212     4.765500e+02 -1.360900e+02\n6 5212     -3.998500e+02 5.510200e+02\n7 5212     -1.575800e+02 5.872200e+02\n8 5212     -1.050500e+02 2.105100e+02\n9 5212     -3.430000e+02 3.047700e+02\n14 5212     3.834900e+02 -2.214000e+02\n0 5213     6.330500e+02 5.115700e+02\n2 5213     4.427600e+02 4.820400e+02\n3 5213     2.959200e+02 1.470300e+02\n8 5213     4.272300e+02 3.684200e+02\n9 5213     2.326500e+02 5.064700e+02\n11 5213     6.983600e+02 -2.228800e+02\n0 5214     -9.803998e+01 5.112500e+02\n2 5214     -3.840800e+02 2.728500e+02\n0 5215     -3.347200e+02 5.106500e+02\n2 5215     -6.189700e+02 2.746300e+02\n7 5215     -5.646300e+02 5.450000e+02\n8 5215     -4.284900e+02 2.028200e+02\n12 5215     -6.829200e+02 4.759800e+02\n0 5216     5.244000e+01 5.103000e+02\n2 5216     -2.433600e+02 2.725800e+02\n3 5216     -3.758500e+02 -5.990997e+01\n5 5216     4.565500e+02 -1.373200e+02\n6 5216     -4.219600e+02 5.462700e+02\n7 5216     -1.770300e+02 5.839800e+02\n8 5216     -1.206600e+02 2.091900e+02\n9 5216     -3.586000e+02 3.031800e+02\n11 5216     1.935400e+02 -2.530400e+02\n0 5217     7.595001e+01 5.093400e+02\n2 5217     -2.220600e+02 2.715400e+02\n5 5217     4.791400e+02 -1.385700e+02\n7 5217     -1.540800e+02 5.854700e+02\n0 5218     6.116500e+02 5.094200e+02\n6 5218     3.026000e+02 6.912800e+02\n0 5219     5.666400e+02 5.065100e+02\n2 5219     3.296300e+02 4.117800e+02\n3 5219     1.849200e+02 7.909998e+01\n13 5219     7.094900e+02 2.250900e+02\n0 5220     6.637000e+01 5.052800e+02\n2 5220     -2.310400e+02 2.666900e+02\n3 5220     -3.642800e+02 -6.615997e+01\n5 5220     4.697600e+02 -1.429400e+02\n6 5220     -4.063700e+02 5.415900e+02\n8 5220     -1.107700e+02 2.041900e+02\n9 5220     -3.483600e+02 2.975900e+02\n12 5220     -2.342900e+02 5.240700e+02\n0 5221     1.099000e+02 5.053300e+02\n13 5221     2.765400e+02 1.805000e+02\n0 5222     4.620000e+02 5.056100e+02\n14 5222     7.659600e+02 -2.062500e+02\n0 5223     -4.085200e+02 5.048600e+02\n2 5223     -6.963000e+02 2.687800e+02\n5 5223     7.359985e+00 -1.435800e+02\n7 5223     -6.407100e+02 5.312400e+02\n8 5223     -4.916800e+02 1.968700e+02\n12 5223     -7.700400e+02 4.589900e+02\n0 5224     6.284998e+01 5.042400e+02\n7 5224     -1.663400e+02 5.788400e+02\n14 5224     3.741500e+02 -2.286600e+02\n0 5225     6.996100e+02 5.044000e+02\n2 5225     5.115300e+02 4.977400e+02\n6 5225     4.469301e+02 7.168600e+02\n8 5225     4.841200e+02 3.800900e+02\n0 5226     -1.860100e+02 5.034900e+02\n12 5226     -5.102000e+02 4.871900e+02\n0 5227     9.446002e+01 5.033800e+02\n6 5227     -3.749500e+02 5.448700e+02\n12 5227     -2.040400e+02 5.255600e+02\n0 5228     -3.665002e+01 5.029400e+02\n7 5228     -2.628800e+02 5.674600e+02\n0 5229     5.677600e+02 5.032200e+02\n2 5229     3.315300e+02 4.089800e+02\n3 5229     1.865500e+02 7.635999e+01\n6 5229     2.468400e+02 6.722000e+02\n8 5229     3.396700e+02 3.125900e+02\n0 5230     2.883002e+01 5.023300e+02\n6 5230     -4.474200e+02 5.305100e+02\n7 5230     -1.991400e+02 5.733600e+02\n0 5231     -6.885800e+02 5.018100e+02\n5 5231     -3.343700e+02 -1.481600e+02\n11 5231     -4.321800e+02 -2.639300e+02\n13 5231     -4.091900e+02 1.322900e+02\n14 5231     -4.127500e+02 -2.474400e+02\n0 5232     -9.401001e+01 5.015700e+02\n3 5232     -5.072000e+02 -6.814001e+01\n0 5233     -4.560999e+01 5.013100e+02\n6 5233     -5.311000e+02 5.149000e+02\n7 5233     -2.718100e+02 5.648700e+02\n0 5234     -6.257001e+01 5.003400e+02\n7 5234     -2.881200e+02 5.620900e+02\n0 5235     -2.138000e+01 5.005500e+02\n2 5235     -3.112900e+02 2.603600e+02\n6 5235     -5.030400e+02 5.173500e+02\n7 5235     -2.477900e+02 5.665100e+02\n12 5235     -3.275100e+02 5.061900e+02\n0 5236     6.633002e+01 5.002600e+02\n2 5236     -2.302900e+02 2.602700e+02\n5 5236     4.696801e+02 -1.482500e+02\n6 5236     -4.053400e+02 5.352200e+02\n7 5236     -1.625000e+02 5.748200e+02\n13 5236     2.422800e+02 1.735300e+02\n14 5236     3.774600e+02 -2.337300e+02\n0 5237     6.453900e+02 4.998200e+02\n3 5237     3.112800e+02 1.420600e+02\n6 5237     3.843400e+02 6.991900e+02\n0 5238     6.949100e+02 4.999800e+02\n2 5238     5.080800e+02 4.917700e+02\n3 5238     3.572200e+02 1.575300e+02\n6 5238     4.421801e+02 7.104600e+02\n8 5238     4.809399e+02 3.752800e+02\n9 5238     2.880500e+02 5.162700e+02\n0 5239     5.119500e+02 4.979000e+02\n2 5239     2.717200e+02 3.836700e+02\n3 5239     1.290600e+02 5.144000e+01\n6 5239     1.774200e+02 6.506800e+02\n8 5239     2.914200e+02 2.930100e+02\n9 5239     8.439001e+01 4.159900e+02\n0 5240     7.160500e+02 4.977700e+02\n6 5240     4.676801e+02 7.144500e+02\n0 5241     -6.421997e+01 4.973100e+02\n2 5241     -3.516900e+02 2.572300e+02\n7 5241     -2.900000e+02 5.589000e+02\n14 5241     2.517900e+02 -2.404800e+02\n0 5242     6.073999e+01 4.972100e+02\n7 5242     -1.671400e+02 5.712400e+02\n14 5242     3.726300e+02 -2.367500e+02\n0 5243     6.075601e+02 4.960300e+02\n6 5243     2.992200e+02 6.749900e+02\n8 5243     3.757500e+02 3.188100e+02\n0 5244     6.075601e+02 4.960300e+02\n6 5244     2.992200e+02 6.749900e+02\n8 5244     3.757500e+02 3.188100e+02\n0 5245     -6.902900e+02 4.953800e+02\n14 5245     -4.151900e+02 -2.542300e+02\n0 5246     -2.153600e+02 4.951600e+02\n2 5246     -4.975600e+02 2.547800e+02\n7 5246     -4.400300e+02 5.407800e+02\n0 5247     -3.339000e+02 4.918100e+02\n5 5247     7.846997e+01 -1.582100e+02\n7 5247     -5.611400e+02 5.249900e+02\n12 5247     -6.786600e+02 4.526400e+02\n0 5248     -3.339000e+02 4.918100e+02\n7 5248     -5.611400e+02 5.249900e+02\n12 5248     -6.786600e+02 4.526400e+02\n0 5249     -1.980500e+02 4.910800e+02\n7 5249     -4.220200e+02 5.383100e+02\n0 5250     -1.980500e+02 4.910800e+02\n7 5250     -4.220200e+02 5.383100e+02\n0 5251     7.643400e+02 4.904500e+02\n2 5251     5.778199e+02 5.074900e+02\n0 5252     -3.627500e+02 4.898600e+02\n14 5252     -3.458002e+01 -2.524200e+02\n0 5253     -3.627500e+02 4.898600e+02\n12 5253     -7.125900e+02 4.473400e+02\n14 5253     -3.458002e+01 -2.524200e+02\n0 5254     -1.085800e+02 4.895700e+02\n2 5254     -3.922900e+02 2.484300e+02\n0 5255     -3.959600e+02 4.886700e+02\n5 5255     1.739001e+01 -1.607000e+02\n7 5255     -6.257600e+02 5.151400e+02\n12 5255     -7.526000e+02 4.402600e+02\n0 5256     6.693700e+02 4.886000e+02\n3 5256     3.365500e+02 1.409600e+02\n6 5256     4.149800e+02 6.931800e+02\n9 5256     2.691700e+02 5.011700e+02\n11 5256     7.361600e+02 -2.407500e+02\n0 5257     6.651801e+02 4.879000e+02\n6 5257     4.099900e+02 6.910400e+02\n0 5258     -5.518500e+02 4.875500e+02\n7 5258     -7.928300e+02 4.984000e+02\n11 5258     -3.310700e+02 -2.779000e+02\n0 5259     -5.518500e+02 4.875500e+02\n7 5259     -7.928300e+02 4.984000e+02\n11 5259     -3.310700e+02 -2.779000e+02\n0 5260     -3.130700e+02 4.875700e+02\n7 5260     -5.390700e+02 5.224000e+02\n8 5260     -4.096600e+02 1.815200e+02\n0 5261     7.662700e+02 4.874100e+02\n2 5261     5.806300e+02 5.051700e+02\n6 5261     5.267500e+02 7.150800e+02\n0 5262     6.996000e+02 4.871400e+02\n2 5262     5.160000e+02 4.832300e+02\n6 5262     4.509399e+02 6.988500e+02\n8 5262     4.878500e+02 3.682500e+02\n11 5262     7.636500e+02 -2.404800e+02\n0 5263     -7.827002e+01 4.860300e+02\n2 5263     -3.637800e+02 2.433600e+02\n6 5263     -5.654000e+02 4.868600e+02\n0 5264     -4.153003e+01 4.853600e+02\n2 5264     -3.288400e+02 2.431200e+02\n7 5264     -2.655400e+02 5.486700e+02\n0 5265     5.955900e+02 4.850900e+02\n2 5265     3.635699e+02 4.025600e+02\n6 5265     2.840500e+02 6.602100e+02\n8 5265     3.670700e+02 3.061100e+02\n9 5265     1.636300e+02 4.349500e+02\n0 5266     7.038700e+02 4.847100e+02\n2 5266     5.208800e+02 4.826300e+02\n8 5266     4.917800e+02 3.676600e+02\n9 5266     2.998500e+02 5.087100e+02\n0 5267     4.984301e+02 4.839900e+02\n2 5267     2.591600e+02 3.661100e+02\n13 5267     6.452800e+02 1.995200e+02\n0 5268     -1.498600e+02 4.836300e+02\n12 5268     -4.662900e+02 4.686500e+02\n0 5269     3.377700e+02 4.841900e+02\n11 5269     4.565699e+02 -2.617200e+02\n14 5269     6.445200e+02 -2.363100e+02\n0 5270     -4.210200e+02 4.823300e+02\n2 5270     -7.098400e+02 2.410800e+02\n14 5270     -9.112000e+01 -2.607400e+02\n0 5271     -4.210200e+02 4.823300e+02\n2 5271     -7.098400e+02 2.410800e+02\n14 5271     -9.112000e+01 -2.607400e+02\n0 5272     -2.331000e+01 4.825200e+02\n14 5272     2.908800e+02 -2.546500e+02\n0 5273     6.399301e+02 4.827300e+02\n3 5273     3.100699e+02 1.264900e+02\n6 5273     3.816300e+02 6.788000e+02\n0 5274     6.685500e+02 4.825100e+02\n2 5274     4.861000e+02 4.688600e+02\n3 5274     3.375601e+02 1.361500e+02\n0 5275     6.685500e+02 4.825100e+02\n2 5275     4.861000e+02 4.688600e+02\n3 5275     3.375601e+02 1.361500e+02\n0 5276     -6.426001e+01 4.820100e+02\n2 5276     -3.499200e+02 2.387500e+02\n3 5276     -4.795400e+02 -9.207001e+01\n5 5276     3.409700e+02 -1.691900e+02\n6 5276     -5.482900e+02 4.847400e+02\n7 5276     -2.875500e+02 5.428500e+02\n12 5276     -3.709900e+02 4.784100e+02\n0 5277     -6.426001e+01 4.820100e+02\n2 5277     -3.499200e+02 2.387500e+02\n7 5277     -2.875500e+02 5.428500e+02\n12 5277     -3.709900e+02 4.784100e+02\n0 5278     6.919100e+02 4.818600e+02\n2 5278     5.096700e+02 4.765300e+02\n6 5278     4.430200e+02 6.917600e+02\n8 5278     4.821500e+02 3.623100e+02\n9 5278     2.896700e+02 5.028900e+02\n11 5278     7.576899e+02 -2.456400e+02\n0 5279     -1.042600e+02 4.815500e+02\n2 5279     -3.885000e+02 2.383700e+02\n3 5279     -5.171700e+02 -9.198999e+01\n7 5279     -3.271900e+02 5.381300e+02\n12 5279     -4.150500e+02 4.720900e+02\n0 5280     -5.817999e+01 4.814500e+02\n2 5280     -3.445600e+02 2.383300e+02\n6 5280     -5.415200e+02 4.854400e+02\n0 5281     -5.817999e+01 4.814500e+02\n2 5281     -3.445600e+02 2.383300e+02\n0 5282     -1.998999e+01 4.817100e+02\n2 5282     -3.090900e+02 2.390100e+02\n5 5282     3.841100e+02 -1.691600e+02\n6 5282     -4.982500e+02 4.933000e+02\n7 5282     -2.439500e+02 5.469500e+02\n9 5282     -4.136400e+02 2.715000e+02\n11 5282     1.301200e+02 -2.800100e+02\n12 5282     -3.224900e+02 4.839300e+02\n14 5282     2.941700e+02 -2.555400e+02\n0 5283     -4.315800e+02 4.810000e+02\n2 5283     -7.215000e+02 2.397100e+02\n5 5283     -1.753998e+01 -1.680300e+02\n7 5283     -6.620400e+02 5.032100e+02\n12 5283     -7.939900e+02 4.262000e+02\n14 5283     -1.015700e+02 -2.621300e+02\n0 5284     5.190800e+02 4.804100e+02\n2 5284     2.831700e+02 3.705800e+02\n6 5284     1.905200e+02 6.337500e+02\n12 5284     2.995200e+02 6.196400e+02\n0 5285     5.190800e+02 4.804100e+02\n6 5285     1.905200e+02 6.337500e+02\n12 5285     2.995200e+02 6.196400e+02\n0 5286     1.946002e+01 4.792500e+02\n7 5286     -2.051500e+02 5.487500e+02\n11 5286     1.652200e+02 -2.809700e+02\n14 5286     3.325699e+02 -2.564300e+02\n0 5287     -6.304300e+02 4.790900e+02\n5 5287     -2.241700e+02 -1.671700e+02\n0 5288     -6.304300e+02 4.790900e+02\n5 5288     -2.241700e+02 -1.671700e+02\n0 5289     -9.140997e+01 4.782000e+02\n7 5289     -3.138000e+02 5.359300e+02\n0 5290     7.069000e+02 4.779700e+02\n2 5290     5.256000e+02 4.779100e+02\n6 5290     4.616400e+02 6.910100e+02\n8 5290     4.953800e+02 3.632600e+02\n9 5290     3.032600e+02 5.047500e+02\n11 5290     7.725100e+02 -2.480200e+02\n0 5291     3.694000e+02 4.773600e+02\n2 5291     3.610999e+01 2.405600e+02\n8 5291     1.105000e+02 1.886100e+02\n14 5291     6.764100e+02 -2.416200e+02\n0 5292     -3.227002e+01 4.769000e+02\n2 5292     -3.196700e+02 2.331300e+02\n0 5293     -7.671997e+01 4.763500e+02\n7 5293     -2.980800e+02 5.370700e+02\n12 5293     -3.825900e+02 4.715100e+02\n14 5293     2.406100e+02 -2.612600e+02\n0 5294     -5.017999e+01 4.766100e+02\n6 5294     -5.311000e+02 4.805300e+02\n7 5294     -2.730100e+02 5.386500e+02\n12 5294     -3.547200e+02 4.738000e+02\n14 5294     2.651300e+02 -2.615800e+02\n0 5295     6.925800e+02 4.766300e+02\n2 5295     5.119000e+02 4.727100e+02\n8 5295     4.846801e+02 3.601400e+02\n9 5295     2.920500e+02 5.003700e+02\n11 5295     7.601100e+02 -2.489900e+02\n0 5296     -5.256200e+02 4.760900e+02\n5 5296     -1.087500e+02 -1.712600e+02\n7 5296     -7.622000e+02 4.882900e+02\n11 5296     -3.103800e+02 -2.872900e+02\n0 5297     -6.008002e+01 4.760900e+02\n6 5297     -5.430200e+02 4.785600e+02\n7 5297     -2.827600e+02 5.373500e+02\n9 5297     -4.456000e+02 2.639900e+02\n0 5298     3.480400e+02 4.760000e+02\n6 5298     -1.000500e+02 5.624000e+02\n12 5298     6.247998e+01 5.285900e+02\n0 5299     8.004800e+02 4.759600e+02\n6 5299     5.678700e+02 7.111600e+02\n0 5300     1.495800e+02 4.742500e+02\n2 5300     -1.528400e+02 2.322000e+02\n5 5300     5.521801e+02 -1.740300e+02\n11 5300     2.839500e+02 -2.801900e+02\n14 5300     4.592900e+02 -2.569800e+02\n0 5301     -9.950000e+01 4.735000e+02\n3 5301     -5.125100e+02 -1.018300e+02\n7 5301     -3.214900e+02 5.302200e+02\n14 5301     2.172000e+02 -2.661800e+02\n0 5302     3.306000e+02 4.736100e+02\n14 5302     6.381000e+02 -2.480700e+02\n0 5303     -5.448700e+02 4.707200e+02\n5 5303     -1.283200e+02 -1.765800e+02\n7 5303     -7.821300e+02 4.804600e+02\n14 5303     -2.111900e+02 -2.725400e+02\n0 5304     -3.393200e+02 4.702200e+02\n7 5304     -5.640000e+02 5.012600e+02\n0 5305     -7.604999e+01 4.705000e+02\n2 5305     -3.606400e+02 2.247700e+02\n6 5305     -5.600000e+02 4.667700e+02\n0 5306     -3.994000e+02 4.694100e+02\n2 5306     -6.865200e+02 2.249600e+02\n5 5306     1.212000e+01 -1.805600e+02\n0 5307     1.554399e+02 4.695500e+02\n3 5307     -2.809500e+02 -1.004200e+02\n0 5308     6.977700e+02 4.693800e+02\n6 5308     4.530800e+02 6.796600e+02\n0 5309     7.846899e+02 4.688200e+02\n2 5309     6.021801e+02 4.948900e+02\n6 5309     5.513101e+02 7.001100e+02\n0 5310     -5.147100e+02 4.681800e+02\n14 5310     -1.827800e+02 -2.751900e+02\n0 5311     -3.454999e+01 4.675400e+02\n7 5311     -2.567800e+02 5.308900e+02\n0 5312     -3.454999e+01 4.675400e+02\n5 5312     3.693700e+02 -1.842200e+02\n7 5312     -2.567800e+02 5.308900e+02\n13 5312     1.628800e+02 1.404500e+02\n14 5312     2.796801e+02 -2.707200e+02\n0 5313     -3.193000e+02 4.670400e+02\n2 5313     -6.019700e+02 2.213500e+02\n5 5313     9.046997e+01 -1.840200e+02\n7 5313     -5.424900e+02 5.003100e+02\n12 5313     -6.567600e+02 4.244800e+02\n0 5314     3.455400e+02 4.671100e+02\n6 5314     -1.010200e+02 5.507600e+02\n0 5315     -2.475300e+02 4.667400e+02\n2 5315     -5.277700e+02 2.209700e+02\n12 5315     -5.970800e+02 4.255800e+02\n0 5316     6.618300e+02 4.649800e+02\n2 5316     4.836899e+02 4.513300e+02\n0 5317     -4.150000e+02 4.645900e+02\n2 5317     -7.042700e+02 2.177700e+02\n12 5317     -7.715100e+02 4.078800e+02\n0 5318     -3.646600e+02 4.637200e+02\n2 5318     -6.494300e+02 2.174800e+02\n12 5318     -7.103200e+02 4.138400e+02\n0 5319     -3.646600e+02 4.637200e+02\n7 5319     -5.891900e+02 4.922400e+02\n0 5320     -5.329800e+02 4.634400e+02\n7 5320     -7.678000e+02 4.736800e+02\n14 5320     -2.006200e+02 -2.801000e+02\n0 5321     3.249100e+02 4.633700e+02\n14 5321     6.333600e+02 -2.591500e+02\n0 5322     6.771100e+02 4.636200e+02\n3 5322     3.503199e+02 1.230100e+02\n6 5322     4.300800e+02 6.674000e+02\n9 5322     2.816400e+02 4.844800e+02\n0 5323     -1.501500e+02 4.624900e+02\n2 5323     -4.315200e+02 2.153300e+02\n7 5323     -3.701200e+02 5.131800e+02\n0 5324     6.906100e+02 4.626900e+02\n3 5324     3.634600e+02 1.273600e+02\n0 5325     -2.518000e+02 4.618200e+02\n7 5325     -4.726800e+02 5.018500e+02\n0 5326     5.537100e+02 4.620700e+02\n2 5326     3.265300e+02 3.668100e+02\n3 5326     1.827800e+02 3.676001e+01\n6 5326     2.401200e+02 6.229400e+02\n12 5326     3.449700e+02 6.111500e+02\n0 5327     -4.261700e+02 4.606300e+02\n2 5327     -7.155700e+02 2.142400e+02\n8 5327     -5.064000e+02 1.532700e+02\n0 5328     -4.261700e+02 4.606300e+02\n2 5328     -7.155700e+02 2.142400e+02\n8 5328     -5.064000e+02 1.532700e+02\n0 5329     -2.469300e+02 4.600400e+02\n2 5329     -5.280200e+02 2.132100e+02\n5 5329     1.601200e+02 -1.922100e+02\n12 5329     -5.720800e+02 4.257200e+02\n14 5329     7.444000e+01 -2.821200e+02\n0 5330     -2.643800e+02 4.595400e+02\n2 5330     -5.455800e+02 2.120600e+02\n5 5330     1.428300e+02 -1.927900e+02\n8 5330     -3.688300e+02 1.553900e+02\n0 5331     6.896200e+02 4.597900e+02\n6 5331     4.460601e+02 6.679100e+02\n0 5332     8.189500e+02 4.588500e+02\n2 5332     6.369200e+02 4.977900e+02\n0 5333     2.044000e+02 4.575500e+02\n2 5333     -1.024700e+02 2.142900e+02\n6 5333     -2.483300e+02 5.092000e+02\n7 5333     -2.507001e+01 5.456700e+02\n12 5333     -8.145001e+01 4.877700e+02\n14 5333     5.139500e+02 -2.718300e+02\n0 5334     3.441899e+02 4.572000e+02\n14 5334     6.537100e+02 -2.645500e+02\n0 5335     -4.244600e+02 4.563400e+02\n5 5335     -1.378998e+01 -1.939400e+02\n8 5335     -5.050000e+02 1.494000e+02\n12 5335     -7.804700e+02 3.953300e+02\n14 5335     -9.726001e+01 -2.875500e+02\n0 5336     -5.409973e+00 4.560600e+02\n5 5336     3.977300e+02 -1.962800e+02\n14 5336     3.082400e+02 -2.818500e+02\n0 5337     6.295200e+02 4.556600e+02\n2 5337     4.528800e+02 4.318600e+02\n6 5337     3.754200e+02 6.471100e+02\n0 5338     8.270400e+02 4.549200e+02\n3 5338     4.854100e+02 1.636400e+02\n0 5339     3.514500e+02 4.524200e+02\n14 5339     6.605800e+02 -2.693600e+02\n0 5340     6.902100e+02 4.527200e+02\n2 5340     5.153300e+02 4.505600e+02\n3 5340     3.659000e+02 1.190400e+02\n6 5340     4.482900e+02 6.593800e+02\n0 5341     2.042300e+02 4.527000e+02\n6 5341     -2.470200e+02 5.029100e+02\n12 5341     -8.014001e+01 4.819200e+02\n14 5341     5.139500e+02 -2.771800e+02\n0 5342     6.157200e+02 4.513500e+02\n2 5342     4.396200e+02 4.228900e+02\n3 5342     2.945400e+02 9.226001e+01\n0 5343     -5.528100e+02 4.492700e+02\n5 5343     -1.396300e+02 -1.987500e+02\n14 5343     -2.220000e+02 -2.947900e+02\n0 5344     -3.107100e+02 4.494400e+02\n2 5344     -5.930600e+02 1.998600e+02\n0 5345     -3.107100e+02 4.494400e+02\n2 5345     -5.930600e+02 1.998600e+02\n0 5346     -2.730400e+02 4.495400e+02\n7 5346     -4.932400e+02 4.863900e+02\n0 5347     6.691000e+02 4.488900e+02\n2 5347     4.956300e+02 4.394500e+02\n0 5348     -6.128998e+01 4.481800e+02\n14 5348     2.571000e+02 -2.908200e+02\n0 5349     6.422300e+02 4.479300e+02\n2 5349     4.676500e+02 4.297700e+02\n3 5349     3.209700e+02 9.896002e+01\n6 5349     3.924900e+02 6.422700e+02\n8 5349     4.473000e+02 3.243000e+02\n9 5349     2.542900e+02 4.615000e+02\n0 5350     6.845300e+02 4.476700e+02\n2 5350     5.112100e+02 4.440700e+02\n6 5350     4.429700e+02 6.533800e+02\n9 5350     2.915800e+02 4.752200e+02\n13 5350     8.515900e+02 1.943900e+02\n0 5351     -4.258800e+02 4.471200e+02\n2 5351     -7.153200e+02 1.966600e+02\n11 5351     -2.273000e+02 -3.124500e+02\n0 5352     5.172800e+02 4.466600e+02\n6 5352     1.967000e+02 5.955700e+02\n9 5352     1.009900e+02 3.779400e+02\n0 5353     6.457900e+02 4.467200e+02\n2 5353     4.723800e+02 4.301500e+02\n3 5353     3.256000e+02 9.950000e+01\n6 5353     3.975900e+02 6.424300e+02\n9 5353     2.586000e+02 4.623800e+02\n13 5353     8.147200e+02 1.895500e+02\n0 5354     -4.224800e+02 4.455100e+02\n2 5354     -7.114100e+02 1.956800e+02\n5 5354     -1.350000e+01 -2.054200e+02\n12 5354     -7.768800e+02 3.822300e+02\n14 5354     -9.631000e+01 -2.986500e+02\n0 5355     5.353800e+02 4.453400e+02\n2 5355     3.106200e+02 3.430600e+02\n3 5355     1.676700e+02 1.265997e+01\n6 5355     2.207500e+02 5.978900e+02\n8 5355     3.223000e+02 2.591500e+02\n9 5355     1.189100e+02 3.819300e+02\n12 5355     3.274800e+02 5.851600e+02\n13 5355     6.856700e+02 1.714100e+02\n0 5356     3.353998e+01 4.440100e+02\n7 5356     -1.875200e+02 5.137700e+02\n14 5356     3.460100e+02 -2.933000e+02\n0 5357     5.180100e+02 4.439100e+02\n2 5357     2.913300e+02 3.358700e+02\n3 5357     1.487300e+02 6.239990e+00\n6 5357     1.989200e+02 5.920400e+02\n7 5357     2.991899e+02 5.869200e+02\n9 5357     1.025400e+02 3.756700e+02\n11 5357     6.153700e+02 -2.890100e+02\n13 5357     6.688700e+02 1.686700e+02\n0 5358     -2.971100e+02 4.434100e+02\n14 5358     2.485999e+01 -3.007800e+02\n0 5359     -2.536800e+02 4.428100e+02\n2 5359     -5.340800e+02 1.910900e+02\n7 5359     -4.718300e+02 4.815800e+02\n12 5359     -5.765100e+02 4.036000e+02\n0 5360     -2.536800e+02 4.428100e+02\n2 5360     -5.340800e+02 1.910900e+02\n7 5360     -4.718300e+02 4.815800e+02\n12 5360     -5.765100e+02 4.036000e+02\n0 5361     -3.058600e+02 4.413500e+02\n7 5361     -5.250000e+02 4.741900e+02\n8 5361     -4.022300e+02 1.375600e+02\n11 5361     -1.237200e+02 -3.184600e+02\n12 5361     -6.367800e+02 3.939800e+02\n14 5361     1.628998e+01 -3.028800e+02\n0 5362     2.084000e+02 4.416500e+02\n14 5362     5.196100e+02 -2.885700e+02\n0 5363     -1.824200e+02 4.405100e+02\n2 5363     -4.620800e+02 1.887700e+02\n7 5363     -3.993700e+02 4.868800e+02\n0 5364     -5.216998e+01 4.399500e+02\n2 5364     -3.255200e+02 1.992300e+02\n6 5364     -5.163200e+02 4.343200e+02\n7 5364     -2.683700e+02 5.020500e+02\n0 5365     -2.181000e+02 4.389000e+02\n2 5365     -4.980300e+02 1.869400e+02\n7 5365     -4.353200e+02 4.813000e+02\n11 5365     -4.617999e+01 -3.205800e+02\n0 5366     -3.074300e+02 4.380100e+02\n2 5366     -5.886700e+02 1.854500e+02\n0 5367     2.478300e+02 4.379700e+02\n12 5367     -3.203003e+01 4.716400e+02\n0 5368     7.362400e+02 4.361900e+02\n2 5368     5.652900e+02 4.520400e+02\n6 5368     5.055100e+02 6.546900e+02\n9 5368     3.376600e+02 4.833500e+02\n0 5369     7.362400e+02 4.361900e+02\n2 5369     5.652900e+02 4.520400e+02\n6 5369     5.055100e+02 6.546900e+02\n9 5369     3.376600e+02 4.833500e+02\n0 5370     -5.263800e+02 4.349400e+02\n7 5370     -7.564600e+02 4.432500e+02\n8 5370     -5.969100e+02 1.265600e+02\n10 5370     -7.838100e+02 6.164300e+02\n11 5370     -3.141800e+02 -3.220100e+02\n14 5370     -1.985200e+02 -3.096600e+02\n0 5371     -1.324200e+02 4.352000e+02\n3 5371     -5.430400e+02 -1.477900e+02\n0 5372     -3.914800e+02 4.345500e+02\n7 5372     -6.125400e+02 4.575100e+02\n0 5373     3.235300e+02 4.344700e+02\n14 5373     6.345100e+02 -2.901100e+02\n0 5374     -2.120400e+02 4.341900e+02\n2 5374     -4.915900e+02 1.807000e+02\n5 5374     1.921300e+02 -2.201700e+02\n7 5374     -4.288100e+02 4.770200e+02\n0 5375     -3.744000e+02 4.333800e+02\n2 5375     -6.595300e+02 1.802700e+02\n7 5375     -5.949000e+02 4.585600e+02\n12 5375     -7.171000e+02 3.749300e+02\n0 5376     5.453199e+02 4.333100e+02\n2 5376     3.244100e+02 3.383600e+02\n11 5376     6.417700e+02 -2.976700e+02\n12 5376     3.422500e+02 5.759900e+02\n0 5377     -1.379900e+02 4.298300e+02\n2 5377     -4.180600e+02 1.763000e+02\n7 5377     -3.540100e+02 4.804600e+02\n0 5378     5.442100e+02 4.293200e+02\n3 5378     1.810000e+02 3.469971e+00\n0 5379     -5.508100e+02 4.296300e+02\n7 5379     -7.820200e+02 4.345800e+02\n10 5379     -8.148600e+02 6.085400e+02\n14 5379     -2.229600e+02 -3.152700e+02\n0 5380     5.219000e+02 4.295700e+02\n2 5380     2.987400e+02 3.237100e+02\n6 5380     2.073400e+02 5.767900e+02\n7 5380     3.048000e+02 5.739700e+02\n13 5380     6.740500e+02 1.572500e+02\n0 5381     1.224000e+02 4.275200e+02\n14 5381     4.343101e+02 -3.081900e+02\n0 5382     6.053101e+02 4.272100e+02\n3 5382     2.905300e+02 6.804999e+01\n8 5382     4.197800e+02 2.991700e+02\n9 5382     2.272300e+02 4.331800e+02\n0 5383     6.079900e+02 4.271000e+02\n6 5383     3.559300e+02 6.109500e+02\n0 5384     -2.064100e+02 4.267000e+02\n7 5384     -4.219300e+02 4.697400e+02\n0 5385     -3.519800e+02 4.257800e+02\n7 5385     -5.706000e+02 4.526900e+02\n0 5386     -3.519800e+02 4.257800e+02\n7 5386     -5.706000e+02 4.526900e+02\n0 5387     -6.414100e+02 4.246600e+02\n13 5387     -3.527600e+02 7.246002e+01\n14 5387     -3.520500e+02 -3.246300e+02\n0 5388     -1.963700e+02 4.251400e+02\n7 5388     -4.116200e+02 4.692700e+02\n0 5389     -1.963700e+02 4.251400e+02\n7 5389     -4.116200e+02 4.692700e+02\n0 5390     2.989001e+01 4.250300e+02\n2 5390     -2.562400e+02 1.741500e+02\n6 5390     -4.298400e+02 4.297300e+02\n0 5391     -3.472000e+02 4.238800e+02\n2 5391     -6.312200e+02 1.676700e+02\n8 5391     -4.378900e+02 1.189400e+02\n0 5392     -2.302600e+02 4.231600e+02\n2 5392     -5.094500e+02 1.672500e+02\n7 5392     -4.455500e+02 4.634400e+02\n0 5393     -2.993900e+02 4.208000e+02\n5 5393     1.047900e+02 -2.336000e+02\n0 5394     -2.993900e+02 4.208000e+02\n5 5394     1.047900e+02 -2.336000e+02\n7 5394     -5.155200e+02 4.530800e+02\n0 5395     -3.558800e+02 4.206100e+02\n2 5395     -6.398200e+02 1.629700e+02\n7 5395     -5.736800e+02 4.465000e+02\n10 5395     -5.673800e+02 6.103300e+02\n0 5396     -3.558800e+02 4.206100e+02\n2 5396     -6.398200e+02 1.629700e+02\n7 5396     -5.736800e+02 4.465000e+02\n10 5396     -5.673800e+02 6.103300e+02\n0 5397     -3.558800e+02 4.206100e+02\n7 5397     -5.736800e+02 4.465000e+02\n10 5397     -5.673800e+02 6.103300e+02\n0 5398     -2.367400e+02 4.199300e+02\n10 5398     -4.217000e+02 6.189600e+02\n14 5398     8.184998e+01 -3.250900e+02\n0 5399     2.009301e+02 4.201100e+02\n7 5399     -2.367999e+01 5.074400e+02\n0 5400     4.841000e+02 4.192900e+02\n8 5400     2.797000e+02 2.246100e+02\n0 5401     7.601000e+02 4.193200e+02\n2 5401     5.925000e+02 4.453300e+02\n6 5401     5.364399e+02 6.427900e+02\n0 5402     -4.649500e+02 4.181100e+02\n5 5402     -5.788000e+01 -2.340700e+02\n8 5402     -5.403600e+02 1.105600e+02\n10 5402     -7.033300e+02 5.992600e+02\n14 5402     -1.405700e+02 -3.279400e+02\n0 5403     1.246400e+02 4.177500e+02\n2 5403     -1.686700e+02 1.673300e+02\n3 5403     -3.053200e+02 -1.642300e+02\n5 5403     5.275400e+02 -2.354100e+02\n6 5403     -3.244400e+02 4.415000e+02\n7 5403     -9.588000e+01 4.969000e+02\n8 5403     -5.832001e+01 1.269400e+02\n9 5403     -2.902000e+02 2.140800e+02\n12 5403     -1.558100e+02 4.303900e+02\n0 5404     -4.063100e+02 4.165200e+02\n5 5404     -6.400146e-01 -2.369400e+02\n8 5404     -4.883800e+02 1.100400e+02\n10 5404     -6.285100e+02 6.018000e+02\n0 5405     -3.268800e+02 4.149500e+02\n7 5405     -5.431600e+02 4.439700e+02\n0 5406     7.383500e+02 4.148400e+02\n2 5406     5.731000e+02 4.343600e+02\n0 5407     4.923000e+02 4.146700e+02\n2 5407     2.684800e+02 2.972300e+02\n6 5407     1.726100e+02 5.510000e+02\n8 5407     2.875100e+02 2.237600e+02\n9 5407     8.378998e+01 3.421400e+02\n11 5407     5.966400e+02 -3.167100e+02\n0 5408     -2.654900e+02 4.136800e+02\n2 5408     -5.454200e+02 1.551900e+02\n7 5408     -4.798600e+02 4.492800e+02\n0 5409     7.100100e+02 4.135000e+02\n3 5409     3.951500e+02 9.477002e+01\n6 5409     4.808900e+02 6.238800e+02\n0 5410     7.100100e+02 4.135000e+02\n3 5410     3.951500e+02 9.477002e+01\n6 5410     4.808900e+02 6.238800e+02\n0 5411     -3.004500e+02 4.130300e+02\n2 5411     -5.813300e+02 1.539800e+02\n5 5411     1.032600e+02 -2.421500e+02\n7 5411     -5.152900e+02 4.448200e+02\n12 5411     -6.250200e+02 3.594700e+02\n0 5412     7.129800e+02 4.124200e+02\n6 5412     4.847900e+02 6.236600e+02\n0 5413     7.129800e+02 4.124200e+02\n6 5413     4.847900e+02 6.236600e+02\n9 5413     3.240400e+02 4.589300e+02\n0 5414     -4.444400e+02 4.115200e+02\n7 5414     -6.651200e+02 4.271100e+02\n8 5414     -5.212100e+02 1.050400e+02\n10 5414     -6.761700e+02 5.925800e+02\n12 5414     -7.981800e+02 3.358300e+02\n0 5415     -2.071300e+02 4.098600e+02\n5 5415     1.950200e+02 -2.458800e+02\n7 5415     -4.206200e+02 4.524100e+02\n12 5415     -5.184200e+02 3.712600e+02\n14 5415     1.099400e+02 -3.351000e+02\n0 5416     -3.053400e+02 4.095500e+02\n2 5416     -5.862500e+02 1.498900e+02\n7 5416     -5.205200e+02 4.407600e+02\n10 5416     -5.033600e+02 6.008600e+02\n11 5416     -1.233800e+02 -3.464200e+02\n14 5416     1.421997e+01 -3.366600e+02\n0 5417     -3.053400e+02 4.095500e+02\n2 5417     -5.862500e+02 1.498900e+02\n5 5417     9.795001e+01 -2.457500e+02\n7 5417     -5.205200e+02 4.407600e+02\n11 5417     -1.233800e+02 -3.464200e+02\n12 5417     -6.311300e+02 3.549300e+02\n14 5417     1.421997e+01 -3.366600e+02\n0 5418     -4.492200e+02 4.080300e+02\n2 5418     -7.408100e+02 1.474800e+02\n5 5418     -4.404999e+01 -2.445900e+02\n7 5418     -6.696900e+02 4.228200e+02\n12 5418     -8.032200e+02 3.306700e+02\n0 5419     -3.132700e+02 4.082400e+02\n7 5419     -5.277900e+02 4.379100e+02\n10 5419     -5.127800e+02 5.987100e+02\n12 5419     -6.398500e+02 3.514100e+02\n14 5419     6.409973e+00 -3.385200e+02\n0 5420     7.025800e+02 4.071400e+02\n3 5420     3.898800e+02 8.688000e+01\n6 5420     4.735400e+02 6.138600e+02\n9 5420     3.162400e+02 4.505800e+02\n13 5420     8.738000e+02 1.635200e+02\n0 5421     6.680000e+02 4.060600e+02\n2 5421     5.054700e+02 4.019200e+02\n3 5421     3.577100e+02 7.387000e+01\n6 5421     4.341000e+02 6.052900e+02\n7 5421     4.641600e+02 5.839000e+02\n0 5422     7.145900e+02 4.059700e+02\n6 5422     4.892600e+02 6.172800e+02\n0 5423     5.428600e+02 4.048800e+02\n7 5423     3.288199e+02 5.533100e+02\n0 5424     -4.172100e+02 4.045900e+02\n2 5424     -7.064600e+02 1.426500e+02\n12 5424     -7.638000e+02 3.309400e+02\n14 5424     -9.665997e+01 -3.426100e+02\n0 5425     6.415800e+02 4.043000e+02\n2 5425     4.785400e+02 3.904400e+02\n6 5425     4.025500e+02 5.953200e+02\n7 5425     4.385100e+02 5.778000e+02\n11 5425     7.296500e+02 -3.191200e+02\n12 5425     4.863300e+02 6.021300e+02\n0 5426     6.599301e+02 4.046800e+02\n2 5426     4.972300e+02 3.977700e+02\n6 5426     4.242100e+02 6.012400e+02\n7 5426     4.563800e+02 5.815200e+02\n11 5426     7.462800e+02 -3.183700e+02\n12 5426     5.072000e+02 6.088000e+02\n0 5427     6.703700e+02 4.046500e+02\n2 5427     5.080800e+02 4.013700e+02\n6 5427     4.367600e+02 6.038200e+02\n11 5427     7.564399e+02 -3.178100e+02\n12 5427     5.190400e+02 6.125800e+02\n0 5428     -2.820000e+02 4.024500e+02\n10 5428     -4.737800e+02 5.944000e+02\n14 5428     3.779999e+01 -3.441500e+02\n0 5429     -3.918800e+02 4.020300e+02\n2 5429     -6.789400e+02 1.389500e+02\n7 5429     -6.087200e+02 4.225800e+02\n10 5429     -6.085900e+02 5.846200e+02\n12 5429     -7.325900e+02 3.314300e+02\n0 5430     7.001200e+02 4.016800e+02\n2 5430     5.387100e+02 4.098600e+02\n3 5430     3.893900e+02 8.160999e+01\n6 5430     4.723600e+02 6.091700e+02\n7 5430     4.960300e+02 5.849500e+02\n8 5430     5.055800e+02 3.067300e+02\n9 5430     3.158300e+02 4.464700e+02\n12 5430     5.534200e+02 6.186400e+02\n13 5430     8.722600e+02 1.592100e+02\n0 5431     -2.793400e+02 4.010300e+02\n7 5431     -4.917100e+02 4.351500e+02\n10 5431     -4.706700e+02 5.925500e+02\n0 5432     -3.019900e+02 4.004100e+02\n7 5432     -5.151400e+02 4.315500e+02\n0 5433     3.402002e+01 3.995000e+02\n7 5433     -1.809500e+02 4.683100e+02\n10 5433     -9.551001e+01 6.203000e+02\n0 5434     5.304900e+02 3.994700e+02\n7 5434     3.179000e+02 5.462700e+02\n0 5435     -2.648100e+02 3.987500e+02\n5 5435     1.378100e+02 -2.579900e+02\n7 5435     -4.765700e+02 4.339900e+02\n10 5435     -4.520300e+02 5.910200e+02\n14 5435     5.360999e+01 -3.478700e+02\n0 5436     -1.947800e+02 3.987500e+02\n2 5436     -4.722500e+02 1.378500e+02\n12 5436     -5.017800e+02 3.586300e+02\n0 5437     -1.947800e+02 3.987500e+02\n2 5437     -4.722500e+02 1.378500e+02\n5 5437     2.067500e+02 -2.584000e+02\n7 5437     -4.064500e+02 4.419500e+02\n8 5437     -3.077700e+02 9.864999e+01\n10 5437     -3.682500e+02 5.973400e+02\n12 5437     -5.017800e+02 3.586300e+02\n0 5438     -6.045500e+02 3.981200e+02\n5 5438     -2.050800e+02 -2.508400e+02\n7 5438     -8.382300e+02 3.929600e+02\n13 5438     -2.975800e+02 5.621997e+01\n14 5438     -2.866500e+02 -3.485700e+02\n0 5439     -3.528900e+02 3.979100e+02\n2 5439     -6.364400e+02 1.345900e+02\n0 5440     -3.579600e+02 3.974400e+02\n2 5440     -6.417200e+02 1.339300e+02\n7 5440     -5.725400e+02 4.217300e+02\n0 5441     -2.975400e+02 3.973800e+02\n2 5441     -5.781900e+02 1.365300e+02\n5 5441     1.044500e+02 -2.582900e+02\n7 5441     -5.105200e+02 4.291100e+02\n8 5441     -3.938900e+02 9.489999e+01\n14 5441     2.071997e+01 -3.485800e+02\n0 5442     -2.975400e+02 3.973800e+02\n14 5442     2.071997e+01 -3.485800e+02\n0 5443     -5.302100e+02 3.954800e+02\n7 5443     -7.544300e+02 3.997700e+02\n10 5443     -7.818600e+02 5.670200e+02\n14 5443     -2.077700e+02 -3.517200e+02\n0 5444     6.389900e+02 3.948800e+02\n2 5444     4.779301e+02 3.808900e+02\n6 5444     4.015600e+02 5.841500e+02\n8 5444     4.548800e+02 2.841200e+02\n11 5444     7.290601e+02 -3.281600e+02\n12 5444     4.854301e+02 5.908500e+02\n0 5445     -3.327500e+02 3.944500e+02\n2 5445     -6.149200e+02 1.305900e+02\n7 5445     -5.462700e+02 4.216100e+02\n10 5445     -5.347100e+02 5.802100e+02\n0 5446     -3.327500e+02 3.944500e+02\n2 5446     -6.149200e+02 1.305900e+02\n7 5446     -5.462700e+02 4.216100e+02\n0 5447     -3.327500e+02 3.944500e+02\n2 5447     -6.149200e+02 1.305900e+02\n7 5447     -5.462700e+02 4.216100e+02\n0 5448     -2.869800e+02 3.941700e+02\n2 5448     -5.661800e+02 1.321300e+02\n10 5448     -4.789800e+02 5.834300e+02\n11 5448     -1.080500e+02 -3.600100e+02\n12 5448     -6.065800e+02 3.389100e+02\n0 5449     -2.718400e+02 3.939400e+02\n13 5449     -2.490997e+01 6.617999e+01\n14 5449     4.656000e+01 -3.529700e+02\n0 5450     -2.603600e+02 3.938900e+02\n2 5450     -5.385100e+02 1.312900e+02\n7 5450     -4.718800e+02 4.294000e+02\n12 5450     -5.760000e+02 3.428300e+02\n0 5451     6.259301e+02 3.935500e+02\n2 5451     4.649500e+02 3.745500e+02\n7 5451     4.245500e+02 5.648700e+02\n0 5452     -4.956800e+02 3.932500e+02\n7 5452     -7.166100e+02 4.007500e+02\n8 5452     -5.687000e+02 8.456000e+01\n10 5452     -7.373700e+02 5.660400e+02\n0 5453     -4.706200e+02 3.931800e+02\n5 5453     -6.765997e+01 -2.600100e+02\n8 5453     -5.458200e+02 8.529001e+01\n10 5453     -7.057000e+02 5.677000e+02\n12 5453     -8.270800e+02 3.080700e+02\n0 5454     -3.021800e+02 3.928900e+02\n7 5454     -5.143700e+02 4.234100e+02\n0 5455     -3.021800e+02 3.928900e+02\n7 5455     -5.143700e+02 4.234100e+02\n10 5455     -4.974900e+02 5.808700e+02\n14 5455     1.627002e+01 -3.544000e+02\n0 5456     -4.322400e+02 3.914500e+02\n2 5456     -7.226100e+02 1.256300e+02\n5 5456     -3.013000e+01 -2.624200e+02\n7 5456     -6.495400e+02 4.069700e+02\n14 5456     -1.120000e+02 -3.561500e+02\n0 5457     -4.287900e+02 3.913700e+02\n2 5457     -7.182500e+02 1.253500e+02\n7 5457     -6.451500e+02 4.070500e+02\n8 5457     -5.076400e+02 8.406000e+01\n10 5457     -6.523700e+02 5.687800e+02\n11 5457     -2.323900e+02 -3.613500e+02\n14 5457     -1.086400e+02 -3.565800e+02\n0 5458     -4.287900e+02 3.913700e+02\n2 5458     -7.182500e+02 1.253500e+02\n7 5458     -6.451500e+02 4.070500e+02\n8 5458     -5.076400e+02 8.406000e+01\n10 5458     -6.523700e+02 5.687800e+02\n14 5458     -1.086400e+02 -3.565800e+02\n0 5459     5.635900e+02 3.915600e+02\n7 5459     3.510699e+02 5.435900e+02\n0 5460     -2.538700e+02 3.902700e+02\n2 5460     -5.321200e+02 1.264700e+02\n7 5460     -4.647300e+02 4.262800e+02\n14 5460     6.359998e+01 -3.573300e+02\n0 5461     -2.599800e+02 3.900700e+02\n7 5461     -4.709500e+02 4.254800e+02\n10 5461     -4.455700e+02 5.804600e+02\n14 5461     5.747998e+01 -3.571300e+02\n0 5462     2.329999e+01 3.893800e+02\n8 5462     -1.339100e+02 9.629001e+01\n14 5462     3.365000e+02 -3.524500e+02\n0 5463     2.329999e+01 3.893800e+02\n2 5463     -2.598100e+02 1.303100e+02\n6 5463     -4.318000e+02 3.820300e+02\n7 5463     -1.902900e+02 4.568800e+02\n8 5463     -1.339100e+02 9.629001e+01\n9 5463     -3.667300e+02 1.784000e+02\n10 5463     -1.074800e+02 6.065100e+02\n12 5463     -2.594300e+02 3.807400e+02\n14 5463     3.365000e+02 -3.524500e+02\n0 5464     7.172800e+02 3.893800e+02\n2 5464     5.590000e+02 4.048400e+02\n6 5464     4.951300e+02 6.003500e+02\n7 5464     5.141200e+02 5.758500e+02\n8 5464     5.222900e+02 3.023100e+02\n0 5465     -3.108700e+02 3.875800e+02\n2 5465     -5.913200e+02 1.222100e+02\n7 5465     -5.226700e+02 4.167500e+02\n10 5465     -5.064800e+02 5.726000e+02\n0 5466     -3.057500e+02 3.869400e+02\n2 5466     -5.856800e+02 1.214200e+02\n7 5466     -5.168700e+02 4.165300e+02\n10 5466     -5.004200e+02 5.728800e+02\n14 5466     1.215997e+01 -3.611000e+02\n0 5467     -1.323700e+02 3.867400e+02\n11 5467     3.125000e+01 -3.663500e+02\n12 5467     -4.282700e+02 3.525100e+02\n0 5468     -4.721300e+02 3.861700e+02\n8 5468     -5.467500e+02 7.829999e+01\n0 5469     -3.372800e+02 3.853600e+02\n5 5469     6.428998e+01 -2.708200e+02\n7 5469     -5.491800e+02 4.115900e+02\n0 5470     -3.372800e+02 3.853600e+02\n5 5470     6.428998e+01 -2.708200e+02\n7 5470     -5.491800e+02 4.115900e+02\n8 5470     -4.269600e+02 8.154999e+01\n0 5471     6.253800e+02 3.855500e+02\n2 5471     4.662300e+02 3.675900e+02\n0 5472     -2.741900e+02 3.840800e+02\n7 5472     -4.845700e+02 4.171800e+02\n10 5472     -4.616200e+02 5.714000e+02\n14 5472     4.310999e+01 -3.639300e+02\n0 5473     -5.169500e+02 3.842200e+02\n13 5473     -2.224500e+02 4.813000e+01\n0 5474     5.465400e+02 3.845200e+02\n2 5474     3.374301e+02 2.909500e+02\n3 5474     1.950400e+02 -3.571997e+01\n6 5474     2.504800e+02 5.335500e+02\n7 5474     3.354500e+02 5.339700e+02\n8 5474     3.436400e+02 2.166400e+02\n9 5474     1.435100e+02 3.387200e+02\n12 5474     3.547800e+02 5.259500e+02\n0 5475     -1.949800e+02 3.840000e+02\n2 5475     -4.718200e+02 1.190100e+02\n7 5475     -4.042600e+02 4.265700e+02\n8 5475     -3.073600e+02 8.356000e+01\n14 5475     1.208500e+02 -3.634300e+02\n0 5476     -1.949800e+02 3.840000e+02\n2 5476     -4.718200e+02 1.190100e+02\n14 5476     1.208500e+02 -3.634300e+02\n0 5477     2.746002e+01 3.841500e+02\n5 5477     4.279800e+02 -2.742700e+02\n6 5477     -4.263000e+02 3.763700e+02\n9 5477     -3.625800e+02 1.735200e+02\n10 5477     -1.021300e+02 6.011600e+02\n12 5477     -2.539700e+02 3.752100e+02\n0 5478     2.746002e+01 3.841500e+02\n5 5478     4.279800e+02 -2.742700e+02\n10 5478     -1.021300e+02 6.011600e+02\n12 5478     -2.539700e+02 3.752100e+02\n0 5479     -3.038800e+02 3.834300e+02\n2 5479     -5.845000e+02 1.171100e+02\n10 5479     -4.976300e+02 5.688900e+02\n11 5479     -1.224500e+02 -3.687200e+02\n0 5480     -3.569500e+02 3.825600e+02\n2 5480     -6.400500e+02 1.141900e+02\n7 5480     -5.692000e+02 4.057300e+02\n10 5480     -5.627900e+02 5.630700e+02\n14 5480     -3.894000e+01 -3.666300e+02\n0 5481     6.867700e+02 3.806800e+02\n2 5481     5.310300e+02 3.859800e+02\n0 5482     7.030400e+02 3.805600e+02\n2 5482     5.469301e+02 3.922200e+02\n3 5482     3.976400e+02 6.577002e+01\n6 5482     4.806801e+02 5.873800e+02\n7 5482     5.015100e+02 5.651900e+02\n9 5482     3.232200e+02 4.313900e+02\n12 5482     5.618700e+02 5.972000e+02\n13 5482     8.777000e+02 1.422700e+02\n0 5483     -2.691500e+02 3.801000e+02\n2 5483     -5.453800e+02 1.129500e+02\n11 5483     -9.245001e+01 -3.728400e+02\n0 5484     2.656000e+01 3.797300e+02\n2 5484     -2.558300e+02 1.194700e+02\n5 5484     4.269200e+02 -2.791100e+02\n6 5484     -4.263700e+02 3.694200e+02\n7 5484     -1.857000e+02 4.475200e+02\n9 5484     -3.628000e+02 1.685800e+02\n10 5484     -1.022800e+02 5.949800e+02\n11 5484     1.764000e+02 -3.695000e+02\n12 5484     -2.539900e+02 3.700700e+02\n14 5484     3.401100e+02 -3.626300e+02\n0 5485     5.531100e+02 3.797800e+02\n2 5485     3.458400e+02 2.890600e+02\n3 5485     2.032600e+02 -3.753003e+01\n6 5485     2.598300e+02 5.303700e+02\n7 5485     3.424600e+02 5.304900e+02\n8 5485     3.503700e+02 2.151200e+02\n9 5485     1.509200e+02 3.374500e+02\n11 5485     6.596801e+02 -3.465900e+02\n12 5485     3.634900e+02 5.230000e+02\n13 5485     7.097800e+02 1.193400e+02\n0 5486     6.292500e+02 3.796700e+02\n2 5486     4.716200e+02 3.631000e+02\n8 5486     4.494200e+02 2.694200e+02\n9 5486     2.595500e+02 4.051200e+02\n0 5487     7.130601e+02 3.789600e+02\n2 5487     5.577900e+02 3.942700e+02\n9 5487     3.323500e+02 4.337200e+02\n0 5488     5.586400e+02 3.762600e+02\n2 5488     3.527900e+02 2.881200e+02\n3 5488     2.101000e+02 -3.803998e+01\n6 5488     2.677100e+02 5.282800e+02\n7 5488     3.481300e+02 5.284000e+02\n12 5488     3.707600e+02 5.213000e+02\n0 5489     -4.771000e+02 3.760400e+02\n5 5489     -7.569000e+01 -2.784300e+02\n7 5489     -6.942600e+02 3.847800e+02\n14 5489     -1.578500e+02 -3.729000e+02\n0 5490     -5.828400e+02 3.742800e+02\n14 5490     -2.624600e+02 -3.740300e+02\n0 5491     -2.068100e+02 3.745300e+02\n7 5491     -4.150500e+02 4.149600e+02\n10 5491     -3.794400e+02 5.666900e+02\n0 5492     7.189200e+02 3.738700e+02\n2 5492     5.647500e+02 3.917500e+02\n6 5492     5.010300e+02 5.845700e+02\n7 5492     5.177600e+02 5.613500e+02\n8 5492     5.271899e+02 2.915100e+02\n9 5492     3.382700e+02 4.318100e+02\n12 5492     5.812400e+02 5.953300e+02\n0 5493     -2.151800e+02 3.734200e+02\n7 5493     -4.234900e+02 4.125000e+02\n10 5493     -3.911200e+02 5.727900e+02\n0 5494     6.963700e+02 3.734600e+02\n3 5494     3.937500e+02 5.735999e+01\n6 5494     4.752200e+02 5.780400e+02\n8 5494     5.085601e+02 2.849000e+02\n9 5494     3.196000e+02 4.240300e+02\n11 5494     7.892300e+02 -3.455100e+02\n0 5495     6.963700e+02 3.734600e+02\n2 5495     5.427200e+02 3.833100e+02\n3 5495     3.937500e+02 5.735999e+01\n6 5495     4.752200e+02 5.780400e+02\n7 5495     4.962100e+02 5.572500e+02\n8 5495     5.085601e+02 2.849000e+02\n9 5495     3.196000e+02 4.240300e+02\n12 5495     5.560601e+02 5.876300e+02\n0 5496     -3.687100e+02 3.730700e+02\n2 5496     -6.525600e+02 1.028000e+02\n7 5496     -5.802000e+02 3.945500e+02\n8 5496     -4.546700e+02 6.767001e+01\n10 5496     -5.757800e+02 5.505500e+02\n0 5497     -3.444400e+02 3.730800e+02\n2 5497     -6.267500e+02 1.035800e+02\n5 5497     5.492999e+01 -2.841600e+02\n7 5497     -5.553000e+02 3.978500e+02\n10 5497     -5.462500e+02 5.527300e+02\n14 5497     -2.751001e+01 -3.761700e+02\n0 5498     5.618600e+02 3.713400e+02\n2 5498     3.578199e+02 2.841900e+02\n3 5498     2.150500e+02 -4.194000e+01\n6 5498     2.730600e+02 5.235700e+02\n7 5498     3.521899e+02 5.237300e+02\n8 5498     3.600900e+02 2.106800e+02\n9 5498     1.614399e+02 3.330800e+02\n11 5498     6.694399e+02 -3.539400e+02\n12 5498     3.756899e+02 5.169200e+02\n13 5498     7.194301e+02 1.129900e+02\n0 5499     6.707600e+02 3.699600e+02\n2 5499     5.184301e+02 3.709000e+02\n3 5499     3.714399e+02 4.521997e+01\n8 5499     4.883300e+02 2.749700e+02\n9 5499     2.991899e+02 4.127400e+02\n12 5499     5.283400e+02 5.753500e+02\n0 5500     -1.983000e+02 3.662200e+02\n2 5500     -4.743900e+02 9.682001e+01\n10 5500     -3.684800e+02 5.572000e+02\n0 5501     -1.080017e+00 3.660600e+02\n14 5501     3.124800e+02 -3.789500e+02\n0 5502     7.885601e+02 3.658000e+02\n6 5502     5.813400e+02 5.950400e+02\n9 5502     3.965000e+02 4.484200e+02\n12 5502     6.606100e+02 6.093000e+02\n0 5503     -5.663000e+02 3.658400e+02\n7 5503     -7.891900e+02 3.637700e+02\n10 5503     -8.232700e+02 5.266900e+02\n13 5503     -2.634000e+02 3.010999e+01\n15 5503     -8.570900e+02 5.649100e+02\n0 5504     5.599800e+02 3.654000e+02\n11 5504     6.686300e+02 -3.596600e+02\n12 5504     3.753900e+02 5.092400e+02\n0 5505     6.784800e+02 3.650800e+02\n2 5505     5.265601e+02 3.691900e+02\n6 5505     4.562500e+02 5.639000e+02\n7 5505     4.798700e+02 5.461600e+02\n8 5505     4.949399e+02 2.736000e+02\n9 5505     3.061700e+02 4.115900e+02\n12 5505     5.379399e+02 5.729400e+02\n0 5506     6.100300e+02 3.645200e+02\n6 5506     3.738400e+02 5.428800e+02\n7 5506     4.125200e+02 5.341800e+02\n9 5506     2.456400e+02 3.860900e+02\n0 5507     6.100300e+02 3.645200e+02\n2 5507     4.553000e+02 3.419700e+02\n6 5507     3.738400e+02 5.428800e+02\n7 5507     4.125200e+02 5.341800e+02\n12 5507     4.596000e+02 5.492600e+02\n0 5508     6.870000e+02 3.641500e+02\n2 5508     5.360000e+02 3.711000e+02\n3 5508     3.881300e+02 4.652002e+01\n6 5508     4.670000e+02 5.660500e+02\n7 5508     4.888700e+02 5.474500e+02\n9 5508     3.142600e+02 4.144200e+02\n12 5508     5.483300e+02 5.752700e+02\n13 5508     8.644100e+02 1.272000e+02\n0 5509     -3.072100e+02 3.623300e+02\n2 5509     -5.864600e+02 8.981000e+01\n5 5509     9.164001e+01 -2.967500e+02\n7 5509     -5.152700e+02 3.905900e+02\n10 5509     -4.985000e+02 5.425800e+02\n0 5510     -3.938600e+02 3.614800e+02\n2 5510     -6.800700e+02 8.753003e+01\n15 5510     -6.129800e+02 5.811500e+02\n0 5511     7.694500e+02 3.611600e+02\n3 5511     4.633900e+02 7.322998e+01\n7 5511     5.673700e+02 5.570500e+02\n0 5512     -4.132500e+02 3.604300e+02\n7 5512     -6.249700e+02 3.759900e+02\n10 5512     -6.288500e+02 5.318100e+02\n11 5512     -2.213900e+02 -3.881300e+02\n13 5512     -1.401500e+02 3.152002e+01\n15 5512     -6.401300e+02 5.771800e+02\n0 5513     5.683700e+02 3.605800e+02\n3 5513     2.251700e+02 -4.837000e+01\n6 5513     2.842600e+02 5.137100e+02\n0 5514     4.871300e+02 3.595500e+02\n6 5514     1.801600e+02 4.861900e+02\n13 5514     6.466000e+02 9.445999e+01\n0 5515     6.884900e+02 3.590700e+02\n2 5515     5.383199e+02 3.673200e+02\n6 5515     4.693300e+02 5.603300e+02\n7 5515     4.902900e+02 5.420500e+02\n8 5515     5.043199e+02 2.721800e+02\n9 5515     3.159301e+02 4.105600e+02\n11 5515     7.852200e+02 -3.593200e+02\n12 5515     5.506801e+02 5.696400e+02\n0 5516     -3.020700e+02 3.581600e+02\n5 5516     9.682001e+01 -3.012400e+02\n7 5516     -5.095900e+02 3.867100e+02\n8 5516     -3.953900e+02 5.557001e+01\n0 5517     -2.890400e+02 3.581700e+02\n5 5517     1.089900e+02 -3.016800e+02\n14 5517     2.638000e+01 -3.918600e+02\n0 5518     9.429993e+00 3.578400e+02\n2 5518     -2.699100e+02 9.229999e+01\n5 5518     4.089100e+02 -3.032100e+02\n6 5518     -4.411500e+02 3.371600e+02\n7 5518     -1.994600e+02 4.229300e+02\n9 5518     -3.733300e+02 1.445800e+02\n10 5518     -1.203000e+02 5.666400e+02\n11 5518     1.619600e+02 -3.902400e+02\n14 5518     3.228900e+02 -3.875600e+02\n0 5519     -3.812800e+02 3.571100e+02\n2 5519     -6.662300e+02 8.128003e+01\n7 5519     -5.909300e+02 3.759400e+02\n0 5520     5.507100e+02 3.567100e+02\n2 5520     3.491100e+02 2.655600e+02\n3 5520     2.070699e+02 -5.959998e+01\n6 5520     2.629400e+02 5.033600e+02\n7 5520     3.431600e+02 5.078200e+02\n9 5520     1.541100e+02 3.171400e+02\n11 5520     6.614800e+02 -3.679300e+02\n0 5521     -3.905000e+02 3.567000e+02\n2 5521     -6.760000e+02 8.163000e+01\n5 5521     7.070007e+00 -3.010700e+02\n0 5522     -1.521600e+02 3.562500e+02\n7 5522     -3.580000e+02 4.024500e+02\n14 5522     1.620400e+02 -3.929600e+02\n0 5523     -3.783900e+02 3.561500e+02\n2 5523     -6.629100e+02 8.048999e+01\n7 5523     -5.878500e+02 3.752300e+02\n10 5523     -5.858500e+02 5.286000e+02\n14 5523     -6.334003e+01 -3.949900e+02\n15 5523     -5.903100e+02 5.750100e+02\n0 5524     -3.144100e+02 3.554700e+02\n7 5524     -5.216300e+02 3.824100e+02\n10 5524     -5.066000e+02 5.338200e+02\n12 5524     -6.320000e+02 2.849900e+02\n15 5524     -5.005000e+02 5.826800e+02\n0 5525     -1.943300e+02 3.531100e+02\n2 5525     -4.699900e+02 7.979999e+01\n7 5525     -3.992600e+02 3.938200e+02\n14 5525     1.199300e+02 -3.970500e+02\n0 5526     -1.943300e+02 3.531100e+02\n7 5526     -3.992600e+02 3.938200e+02\n14 5526     1.199300e+02 -3.970500e+02\n0 5527     6.296400e+02 3.525700e+02\n2 5527     4.790200e+02 3.386000e+02\n6 5527     4.007700e+02 5.357900e+02\n7 5527     4.335699e+02 5.257400e+02\n13 5527     8.100100e+02 1.105600e+02\n0 5528     6.326600e+02 3.527600e+02\n6 5528     4.045800e+02 5.369500e+02\n7 5528     4.364399e+02 5.266100e+02\n0 5529     6.266400e+02 3.517000e+02\n2 5529     4.760300e+02 3.363500e+02\n6 5529     3.972600e+02 5.338600e+02\n11 5529     7.273199e+02 -3.700700e+02\n12 5529     4.815601e+02 5.413100e+02\n0 5530     6.266400e+02 3.517000e+02\n2 5530     4.760300e+02 3.363500e+02\n7 5530     4.306600e+02 5.245400e+02\n0 5531     -3.210500e+02 3.504600e+02\n7 5531     -5.280500e+02 3.762500e+02\n12 5531     -6.393200e+02 2.779300e+02\n15 5531     -5.087100e+02 5.745400e+02\n0 5532     -2.853200e+02 3.507000e+02\n2 5532     -5.634300e+02 7.559998e+01\n7 5532     -4.915100e+02 3.806600e+02\n10 5532     -4.704000e+02 5.299300e+02\n15 5532     -4.593600e+02 5.796000e+02\n0 5533     -1.720100e+02 3.506900e+02\n2 5533     -4.467900e+02 7.778998e+01\n7 5533     -3.773600e+02 3.942800e+02\n14 5533     1.424700e+02 -3.993800e+02\n0 5534     -1.158800e+02 3.496400e+02\n6 5534     -5.832100e+02 2.974600e+02\n10 5534     -2.672000e+02 5.446400e+02\n0 5535     6.039700e+02 3.494100e+02\n2 5535     4.527600e+02 3.253700e+02\n3 5535     3.098700e+02 5.800171e-01\n6 5535     3.700100e+02 5.241500e+02\n7 5535     4.085699e+02 5.185100e+02\n9 5535     2.441100e+02 3.718600e+02\n10 5535     5.824000e+02 6.190200e+02\n11 5535     7.060900e+02 -3.729600e+02\n13 5535     7.853300e+02 1.050400e+02\n0 5536     -1.119100e+02 3.464700e+02\n2 5536     -3.863300e+02 7.428998e+01\n0 5537     5.414700e+02 3.457800e+02\n2 5537     3.414500e+02 2.511000e+02\n6 5537     2.533700e+02 4.879100e+02\n7 5537     3.350400e+02 4.956300e+02\n9 5537     1.478600e+02 3.043600e+02\n10 5537     5.071700e+02 6.084900e+02\n11 5537     6.552300e+02 -3.795500e+02\n0 5538     -5.457200e+02 3.455000e+02\n7 5538     -7.635800e+02 3.439900e+02\n10 5538     -7.930600e+02 5.029600e+02\n14 5538     -2.307500e+02 -4.053600e+02\n15 5538     -8.242000e+02 5.388400e+02\n0 5539     6.709500e+02 3.438300e+02\n2 5539     5.242600e+02 3.468200e+02\n6 5539     4.522200e+02 5.388700e+02\n7 5539     4.752600e+02 5.245800e+02\n8 5539     4.924900e+02 2.553300e+02\n12 5539     5.344600e+02 5.477100e+02\n0 5540     7.144200e+02 3.438700e+02\n2 5540     5.684399e+02 3.634100e+02\n3 5540     4.191700e+02 3.960999e+01\n6 5540     5.033500e+02 5.514700e+02\n7 5540     5.174500e+02 5.317800e+02\n8 5540     5.296801e+02 2.678000e+02\n12 5540     5.838700e+02 5.619800e+02\n0 5541     -5.474500e+02 3.435800e+02\n5 5541     -1.515700e+02 -3.114200e+02\n10 5541     -7.944500e+02 5.002000e+02\n0 5542     6.267300e+02 3.432100e+02\n2 5542     4.782900e+02 3.287500e+02\n3 5542     3.341300e+02 4.760010e+00\n0 5543     6.267300e+02 3.432100e+02\n2 5543     4.782900e+02 3.287500e+02\n3 5543     3.341300e+02 4.760010e+00\n6 5543     3.995400e+02 5.248400e+02\n7 5543     4.319900e+02 5.163800e+02\n8 5543     4.545400e+02 2.413100e+02\n9 5543     2.657300e+02 3.757500e+02\n10 5543     6.099700e+02 6.140700e+02\n11 5543     7.294301e+02 -3.776600e+02\n12 5543     4.839900e+02 5.321600e+02\n0 5544     1.876500e+02 3.427300e+02\n6 5544     -2.141500e+02 3.682900e+02\n10 5544     9.127002e+01 5.662700e+02\n0 5545     -5.173400e+02 3.421500e+02\n13 5545     -2.229300e+02 1.147998e+01\n15 5545     -7.836400e+02 5.378500e+02\n0 5546     -1.467800e+02 3.421100e+02\n2 5546     -4.215800e+02 6.766998e+01\n5 5546     2.500000e+02 -3.212200e+02\n7 5546     -3.507100e+02 3.881700e+02\n9 5546     -5.022800e+02 1.168900e+02\n0 5547     2.418400e+02 3.421400e+02\n11 5547     3.785300e+02 -3.974300e+02\n14 5547     5.795699e+02 -3.921300e+02\n0 5548     6.215300e+02 3.395000e+02\n2 5548     4.740500e+02 3.233200e+02\n6 5548     3.944300e+02 5.191600e+02\n7 5548     4.273500e+02 5.119800e+02\n9 5548     2.626000e+02 3.709500e+02\n10 5548     6.042600e+02 6.094100e+02\n0 5549     7.890200e+02 3.396000e+02\n2 5549     6.419100e+02 3.870000e+02\n0 5550     2.025200e+02 3.390300e+02\n5 5550     6.284500e+02 -3.183800e+02\n0 5551     -1.676000e+02 3.379600e+02\n7 5551     -3.710600e+02 3.813000e+02\n15 5551     -2.927000e+02 5.774700e+02\n0 5552     -8.788000e+02 3.375400e+02\n5 5552     -5.636000e+02 -3.157000e+02\n14 5552     -6.463000e+02 -4.216600e+02\n0 5553     6.074301e+02 3.371500e+02\n9 5553     2.501899e+02 3.637800e+02\n10 5553     5.870400e+02 6.046200e+02\n0 5554     5.816801e+02 3.364200e+02\n7 5554     3.879800e+02 5.017900e+02\n0 5555     6.363300e+02 3.360500e+02\n7 5555     4.422100e+02 5.110100e+02\n0 5556     6.363300e+02 3.360500e+02\n2 5556     4.902600e+02 3.258800e+02\n3 5556     3.459000e+02 2.460022e+00\n7 5556     4.422100e+02 5.110100e+02\n0 5557     -5.661300e+02 3.356800e+02\n5 5557     -1.720100e+02 -3.203900e+02\n0 5558     4.436400e+02 3.348100e+02\n2 5558     2.298500e+02 1.976700e+02\n7 5558     2.387000e+02 4.674900e+02\n0 5559     6.153300e+02 3.345700e+02\n6 5559     3.879500e+02 5.115500e+02\n8 5559     4.467800e+02 2.310500e+02\n9 5559     2.573000e+02 3.649100e+02\n10 5559     5.968400e+02 6.021800e+02\n0 5560     7.143199e+02 3.343200e+02\n7 5560     5.189700e+02 5.224200e+02\n0 5561     -1.631300e+02 3.338400e+02\n7 5561     -3.659800e+02 3.781700e+02\n11 5561     3.270020e+00 -4.146500e+02\n0 5562     6.436300e+02 3.335900e+02\n6 5562     4.222300e+02 5.188900e+02\n8 5562     4.712900e+02 2.384900e+02\n9 5562     2.829399e+02 3.742100e+02\n13 5562     8.258800e+02 9.637000e+01\n0 5563     -4.769000e+02 3.325900e+02\n7 5563     -6.880000e+02 3.375800e+02\n11 5563     -2.786200e+02 -4.116300e+02\n0 5564     -3.296100e+02 3.325700e+02\n2 5564     -6.090100e+02 5.089001e+01\n0 5565     6.370400e+02 3.326900e+02\n2 5565     4.923101e+02 3.234000e+02\n3 5565     3.477900e+02 -7.000732e-02\n7 5565     4.437200e+02 5.079600e+02\n13 5565     8.195900e+02 9.516000e+01\n0 5566     7.124600e+02 3.325600e+02\n2 5566     5.694800e+02 3.523800e+02\n6 5566     5.037500e+02 5.385500e+02\n7 5566     5.168900e+02 5.205500e+02\n8 5566     5.303300e+02 2.585700e+02\n9 5566     3.426801e+02 3.983500e+02\n10 5566     7.132100e+02 6.111700e+02\n0 5567     -3.824200e+02 3.315400e+02\n7 5567     -5.885400e+02 3.488600e+02\n10 5567     -5.864400e+02 4.988900e+02\n15 5567     -5.914500e+02 5.402100e+02\n0 5568     -5.296200e+02 3.295500e+02\n5 5568     -1.357000e+02 -3.271400e+02\n8 5568     -6.003900e+02 1.734000e+01\n10 5568     -7.692600e+02 4.833000e+02\n11 5568     -3.254500e+02 -4.133700e+02\n15 5568     -7.981700e+02 5.180500e+02\n0 5569     -5.107700e+02 3.290500e+02\n7 5569     -7.231000e+02 3.304700e+02\n0 5570     -4.003000e+02 3.289700e+02\n5 5570     -6.239990e+00 -3.316600e+02\n7 5570     -6.066000e+02 3.437600e+02\n8 5570     -4.819600e+02 2.123001e+01\n10 5570     -6.078400e+02 4.939400e+02\n11 5570     -2.118700e+02 -4.177200e+02\n12 5570     -7.303400e+02 2.370700e+02\n14 5570     -8.758002e+01 -4.247600e+02\n0 5571     -2.997300e+02 3.281900e+02\n2 5571     -5.781000e+02 4.581000e+01\n7 5571     -5.030000e+02 3.554000e+02\n15 5571     -4.750000e+02 5.462900e+02\n0 5572     -2.997300e+02 3.281900e+02\n7 5572     -5.030000e+02 3.554000e+02\n10 5572     -4.851600e+02 5.017500e+02\n15 5572     -4.750000e+02 5.462900e+02\n0 5573     -2.997300e+02 3.281900e+02\n2 5573     -5.781000e+02 4.581000e+01\n7 5573     -5.030000e+02 3.554000e+02\n15 5573     -4.750000e+02 5.462900e+02\n0 5574     -3.826600e+02 3.276700e+02\n7 5574     -5.881000e+02 3.447300e+02\n10 5574     -5.855300e+02 4.939500e+02\n0 5575     -5.054800e+02 3.269800e+02\n7 5575     -7.170200e+02 3.288400e+02\n14 5575     -1.932400e+02 -4.263900e+02\n15 5575     -7.635500e+02 5.178000e+02\n0 5576     -3.705100e+02 3.271000e+02\n5 5576     2.346997e+01 -3.346800e+02\n7 5576     -5.754700e+02 3.454500e+02\n8 5576     -4.551500e+02 2.050000e+01\n10 5576     -5.711700e+02 4.937700e+02\n11 5576     -1.851900e+02 -4.192400e+02\n0 5577     7.197700e+02 3.268900e+02\n2 5577     5.784399e+02 3.500900e+02\n3 5577     4.288400e+02 2.748999e+01\n6 5577     5.135500e+02 5.348400e+02\n7 5577     5.247400e+02 5.163100e+02\n8 5577     5.375200e+02 2.566000e+02\n9 5577     3.502000e+02 3.966600e+02\n10 5577     7.221200e+02 6.052400e+02\n12 5577     5.936899e+02 5.453300e+02\n0 5578     7.799600e+02 3.268100e+02\n7 5578     5.839500e+02 5.265900e+02\n10 5578     7.955601e+02 6.125100e+02\n0 5579     -4.548500e+02 3.261300e+02\n7 5579     -6.654700e+02 3.317900e+02\n12 5579     -8.001700e+02 2.199400e+02\n15 5579     -6.917500e+02 5.225800e+02\n0 5580     -4.574300e+02 3.239400e+02\n7 5580     -6.681400e+02 3.298100e+02\n10 5580     -6.783300e+02 4.831400e+02\n12 5580     -8.031800e+02 2.170300e+02\n15 5580     -6.948700e+02 5.197600e+02\n0 5581     2.042700e+02 3.239500e+02\n6 5581     -1.829100e+02 3.518500e+02\n0 5582     6.393600e+02 3.237200e+02\n2 5582     4.975000e+02 3.153400e+02\n6 5582     4.198900e+02 5.073700e+02\n7 5582     4.468700e+02 4.996400e+02\n9 5582     2.822400e+02 3.652800e+02\n0 5583     -3.139900e+02 3.232400e+02\n14 5583     -1.510010e+00 -4.313200e+02\n15 5583     -4.939600e+02 5.377600e+02\n0 5584     6.243800e+02 3.219000e+02\n2 5584     4.816600e+02 3.081100e+02\n7 5584     4.323800e+02 4.952900e+02\n10 5584     6.084200e+02 5.879900e+02\n11 5584     7.326400e+02 -3.983500e+02\n0 5585     6.243800e+02 3.219000e+02\n2 5585     4.816600e+02 3.081100e+02\n6 5585     4.021100e+02 5.009500e+02\n7 5585     4.323800e+02 4.952900e+02\n10 5585     6.084200e+02 5.879900e+02\n11 5585     7.326400e+02 -3.983500e+02\n12 5585     4.865300e+02 5.089400e+02\n0 5586     -4.591400e+02 3.213900e+02\n10 5586     -6.801500e+02 4.796900e+02\n12 5586     -8.044800e+02 2.133400e+02\n0 5587     4.978700e+02 3.212200e+02\n7 5587     2.949900e+02 4.639000e+02\n10 5587     4.581400e+02 5.731100e+02\n0 5588     -5.268400e+02 3.202300e+02\n7 5588     -7.389800e+02 3.186500e+02\n14 5588     -2.155300e+02 -4.335800e+02\n15 5588     -7.923500e+02 5.055500e+02\n0 5589     -5.711600e+02 3.197000e+02\n13 5589     -2.701100e+02 -1.058002e+01\n14 5589     -2.601100e+02 -4.337600e+02\n0 5590     -5.233900e+02 3.187000e+02\n5 5590     -1.314800e+02 -3.392300e+02\n7 5590     -7.354900e+02 3.175500e+02\n14 5590     -2.124400e+02 -4.351500e+02\n15 5590     -7.875600e+02 5.039300e+02\n0 5591     7.589800e+02 3.184400e+02\n3 5591     4.675400e+02 3.542999e+01\n6 5591     5.602600e+02 5.377200e+02\n7 5591     5.634600e+02 5.150200e+02\n8 5591     5.720601e+02 2.622100e+02\n9 5591     3.846200e+02 4.042300e+02\n10 5591     7.701899e+02 5.999500e+02\n12 5591     6.396400e+02 5.501600e+02\n0 5592     8.351300e+02 3.180300e+02\n3 5592     5.332300e+02 6.250000e+01\n12 5592     7.236200e+02 5.749200e+02\n0 5593     -5.031400e+02 3.169700e+02\n5 5593     -1.112400e+02 -3.416200e+02\n7 5593     -7.133900e+02 3.183200e+02\n8 5593     -5.754300e+02 5.570007e+00\n14 5593     -1.924800e+02 -4.372900e+02\n15 5593     -7.586800e+02 5.041800e+02\n0 5594     -4.555200e+02 3.169000e+02\n7 5594     -6.641000e+02 3.226900e+02\n10 5594     -6.746000e+02 4.744500e+02\n15 5594     -6.908800e+02 5.098700e+02\n0 5595     2.985999e+01 3.170000e+02\n14 5595     3.576100e+02 -4.300000e+02\n15 5595     -1.690997e+01 5.752400e+02\n0 5596     5.553300e+02 3.172300e+02\n2 5596     3.645100e+02 2.292800e+02\n6 5596     2.798500e+02 4.603900e+02\n9 5596     1.688600e+02 2.873000e+02\n10 5596     5.272100e+02 5.751300e+02\n12 5596     3.827600e+02 4.564300e+02\n0 5597     6.198900e+02 3.153200e+02\n6 5597     3.984700e+02 4.920000e+02\n7 5597     4.289500e+02 4.881000e+02\n9 5597     2.664200e+02 3.507600e+02\n0 5598     -5.103300e+02 3.136700e+02\n5 5598     -1.188500e+02 -3.451700e+02\n7 5598     -7.205000e+02 3.137800e+02\n10 5598     -7.424800e+02 4.658900e+02\n11 5598     -3.102800e+02 -4.283800e+02\n15 5598     -7.679500e+02 4.987000e+02\n0 5599     -5.103300e+02 3.136700e+02\n5 5599     -1.188500e+02 -3.451700e+02\n10 5599     -7.424800e+02 4.658900e+02\n15 5599     -7.679500e+02 4.987000e+02\n0 5600     8.358002e+01 3.108900e+02\n14 5600     4.179301e+02 -4.340400e+02\n15 5600     5.721002e+01 5.743400e+02\n0 5601     5.691500e+02 3.109200e+02\n2 5601     4.240800e+02 2.742100e+02\n6 5601     3.362800e+02 4.713000e+02\n7 5601     3.789000e+02 4.750500e+02\n9 5601     2.205400e+02 3.274300e+02\n10 5601     5.432600e+02 5.682600e+02\n11 5601     6.814100e+02 -4.122400e+02\n12 5601     4.241801e+02 4.775900e+02\n13 5601     7.545800e+02 6.840002e+01\n0 5602     -1.937600e+02 3.095900e+02\n2 5602     -4.666200e+02 2.460999e+01\n0 5603     -3.548000e+02 3.090100e+02\n7 5603     -5.566300e+02 3.285500e+02\n10 5603     -5.499700e+02 4.734900e+02\n0 5604     -2.100900e+02 3.067300e+02\n2 5604     -4.826200e+02 2.119000e+01\n7 5604     -4.091600e+02 3.439500e+02\n15 5604     -3.461900e+02 5.280200e+02\n0 5605     -2.100900e+02 3.067300e+02\n2 5605     -4.826200e+02 2.119000e+01\n5 5605     1.837900e+02 -3.602800e+02\n7 5605     -4.091600e+02 3.439500e+02\n13 5605     2.353998e+01 -7.950012e+00\n14 5605     1.027700e+02 -4.488800e+02\n0 5606     3.480200e+02 3.066600e+02\n6 5606     -8.020020e+00 3.715400e+02\n0 5607     -4.026200e+02 3.060000e+02\n7 5607     -6.054500e+02 3.193200e+02\n10 5607     -6.075000e+02 4.657600e+02\n15 5607     -6.148400e+02 5.020400e+02\n0 5608     6.218000e+02 3.060200e+02\n3 5608     3.399301e+02 -2.967999e+01\n8 5608     4.581801e+02 2.112000e+02\n9 5608     2.712200e+02 3.444200e+02\n10 5608     6.055900e+02 5.683500e+02\n11 5608     7.349500e+02 -4.140400e+02\n12 5608     4.870300e+02 4.904400e+02\n0 5609     3.653199e+02 3.046800e+02\n6 5609     1.321002e+01 3.743200e+02\n0 5610     -5.652700e+02 3.039200e+02\n10 5610     -8.105200e+02 4.497300e+02\n14 5610     -2.568300e+02 -4.510100e+02\n0 5611     4.669100e+02 3.042500e+02\n7 5611     2.662500e+02 4.419400e+02\n0 5612     -2.093500e+02 3.034800e+02\n5 5612     1.841100e+02 -3.636700e+02\n15 5612     -3.448400e+02 5.233800e+02\n0 5613     5.991700e+02 3.014000e+02\n6 5613     3.762400e+02 4.701300e+02\n0 5614     -5.364700e+02 2.998900e+02\n5 5614     -1.476300e+02 -3.594100e+02\n7 5614     -7.464500e+02 2.956500e+02\n10 5614     -7.733400e+02 4.472400e+02\n14 5614     -2.285700e+02 -4.559301e+02\n15 5614     -8.020200e+02 4.757800e+02\n0 5615     -2.195400e+02 2.992800e+02\n14 5615     9.078003e+01 -4.574700e+02\n0 5616     5.674200e+02 2.991700e+02\n2 5616     4.253400e+02 2.618800e+02\n3 5616     2.848800e+02 -6.017999e+01\n7 5616     3.787600e+02 4.631600e+02\n9 5616     2.214399e+02 3.169600e+02\n10 5616     5.417800e+02 5.538500e+02\n12 5616     4.252300e+02 4.635400e+02\n0 5617     6.046600e+02 2.990500e+02\n2 5617     4.664900e+02 2.783000e+02\n3 5617     3.246801e+02 -4.332001e+01\n6 5617     3.836700e+02 4.695000e+02\n9 5617     2.566700e+02 3.323500e+02\n10 5617     5.863000e+02 5.580000e+02\n0 5618     6.046600e+02 2.990500e+02\n2 5618     4.664900e+02 2.783000e+02\n3 5618     3.246801e+02 -4.332001e+01\n6 5618     3.836700e+02 4.695000e+02\n7 5618     4.160100e+02 4.697700e+02\n9 5618     2.566700e+02 3.323500e+02\n10 5618     5.863000e+02 5.580000e+02\n12 5618     4.692300e+02 4.769700e+02\n0 5619     7.788199e+02 2.986600e+02\n10 5619     7.952800e+02 5.783400e+02\n12 5619     6.668400e+02 5.363500e+02\n0 5620     -4.449300e+02 2.975900e+02\n7 5620     -6.508200e+02 3.032400e+02\n0 5621     5.898300e+02 2.963600e+02\n2 5621     4.512100e+02 2.694300e+02\n6 5621     3.658300e+02 4.611800e+02\n7 5621     4.016300e+02 4.644400e+02\n10 5621     5.689301e+02 5.529400e+02\n12 5621     4.521801e+02 4.680400e+02\n0 5622     6.761200e+02 2.966100e+02\n2 5622     5.422600e+02 3.055500e+02\n3 5622     3.961100e+02 -1.558002e+01\n6 5622     4.700400e+02 4.892000e+02\n7 5622     4.864600e+02 4.798900e+02\n9 5622     3.202400e+02 3.571000e+02\n10 5622     6.718199e+02 5.635300e+02\n11 5622     7.896801e+02 -4.220800e+02\n0 5623     6.517500e+02 2.948700e+02\n2 5623     5.177600e+02 2.938800e+02\n7 5623     4.628700e+02 4.739200e+02\n10 5623     6.427800e+02 5.585800e+02\n0 5624     -5.113800e+02 2.940500e+02\n5 5624     -1.231900e+02 -3.667900e+02\n7 5624     -7.186400e+02 2.923700e+02\n8 5624     -5.837800e+02 -1.964999e+01\n10 5624     -7.407400e+02 4.417400e+02\n14 5624     -2.039600e+02 -4.630500e+02\n15 5624     -7.657200e+02 4.707500e+02\n0 5625     7.032700e+02 2.919000e+02\n2 5625     5.711200e+02 3.120800e+02\n0 5626     -3.122800e+02 2.916900e+02\n12 5626     -6.299400e+02 1.865200e+02\n0 5627     -3.122800e+02 2.916900e+02\n2 5627     -5.526800e+02 1.070001e+01\n10 5627     -4.923900e+02 4.519200e+02\n15 5627     -4.932200e+02 4.896900e+02\n0 5628     3.838400e+02 2.915000e+02\n7 5628     1.797600e+02 4.112500e+02\n0 5629     -1.409000e+02 2.905100e+02\n7 5629     -3.354400e+02 3.375200e+02\n10 5629     -2.903300e+02 4.709600e+02\n0 5630     5.650400e+02 2.906200e+02\n2 5630     4.248900e+02 2.523800e+02\n6 5630     3.359800e+02 4.469400e+02\n7 5630     3.774700e+02 4.543600e+02\n12 5630     4.246600e+02 4.528700e+02\n13 5630     7.524000e+02 5.090997e+01\n0 5631     6.633900e+02 2.900300e+02\n2 5631     5.308700e+02 2.942600e+02\n6 5631     4.570200e+02 4.785500e+02\n7 5631     4.748500e+02 4.714300e+02\n11 5631     7.789100e+02 -4.288800e+02\n12 5631     5.392000e+02 4.877600e+02\n0 5632     6.633900e+02 2.900300e+02\n2 5632     5.308700e+02 2.942600e+02\n6 5632     4.570200e+02 4.785500e+02\n10 5632     6.564200e+02 5.540900e+02\n11 5632     7.789100e+02 -4.288800e+02\n12 5632     5.392000e+02 4.877600e+02\n0 5633     7.686899e+02 2.884500e+02\n6 5633     5.793300e+02 5.092600e+02\n0 5634     9.737000e+01 2.878200e+02\n6 5634     -2.844300e+02 2.818000e+02\n7 5634     -9.608002e+01 3.689100e+02\n11 5634     2.432800e+02 -4.537400e+02\n15 5634     7.866998e+01 5.445300e+02\n0 5635     7.546997e+01 2.875700e+02\n2 5635     -1.557000e+02 5.264001e+01\n5 5635     5.036100e+02 -3.771800e+02\n6 5635     -3.104000e+02 2.757500e+02\n13 5635     2.744399e+02 -5.619995e+00\n14 5635     4.174800e+02 -4.593300e+02\n15 5635     4.885999e+01 5.410500e+02\n0 5636     3.303998e+01 2.870300e+02\n7 5636     -1.594500e+02 3.592500e+02\n10 5636     -8.451001e+01 4.841600e+02\n11 5636     1.833900e+02 -4.561300e+02\n14 5636     3.707800e+02 -4.620800e+02\n15 5636     -9.380005e+00 5.339100e+02\n0 5637     4.808400e+02 2.865600e+02\n12 5637     3.007600e+02 3.963000e+02\n13 5637     6.474700e+02 3.114001e+01\n0 5638     6.689600e+02 2.861800e+02\n2 5638     5.375800e+02 2.927900e+02\n3 5638     3.921700e+02 -2.748999e+01\n6 5638     4.642500e+02 4.759900e+02\n7 5638     4.808101e+02 4.686000e+02\n9 5638     3.167900e+02 3.468600e+02\n10 5638     6.638400e+02 5.500300e+02\n11 5638     7.855300e+02 -4.326800e+02\n12 5638     5.461400e+02 4.854300e+02\n13 5638     8.562700e+02 6.001001e+01\n0 5639     -5.240700e+02 2.854700e+02\n7 5639     -7.307600e+02 2.817000e+02\n15 5639     -7.819200e+02 4.572700e+02\n0 5640     6.903998e+01 2.856700e+02\n6 5640     -3.168500e+02 2.717300e+02\n11 5640     2.169100e+02 -4.567900e+02\n0 5641     6.464600e+02 2.848900e+02\n7 5641     4.590000e+02 4.634900e+02\n0 5642     6.464600e+02 2.848900e+02\n2 5642     5.145500e+02 2.824100e+02\n6 5642     4.377200e+02 4.674200e+02\n7 5642     4.590000e+02 4.634900e+02\n8 5642     4.842000e+02 2.019100e+02\n0 5643     -5.482900e+02 2.845100e+02\n7 5643     -7.568100e+02 2.774400e+02\n15 5643     -8.158900e+02 4.527300e+02\n0 5644     8.922998e+01 2.822800e+02\n2 5644     -1.374600e+02 5.123999e+01\n6 5644     -2.903600e+02 2.736100e+02\n7 5644     -1.028200e+02 3.626900e+02\n11 5644     2.359200e+02 -4.595400e+02\n12 5644     -1.447400e+02 2.848000e+02\n0 5645     -5.805800e+02 2.787600e+02\n7 5645     -7.944200e+02 2.639600e+02\n13 5645     -2.906300e+02 -4.923999e+01\n0 5646     -5.128900e+02 2.780100e+02\n7 5646     -7.177100e+02 2.749600e+02\n8 5646     -5.849800e+02 -3.695001e+01\n10 5646     -7.398500e+02 4.218300e+02\n11 5646     -3.154700e+02 -4.607900e+02\n0 5647     -5.128900e+02 2.780100e+02\n7 5647     -7.177100e+02 2.749600e+02\n0 5648     6.776300e+02 2.745800e+02\n7 5648     4.909600e+02 4.594500e+02\n0 5649     -2.091300e+02 2.728200e+02\n14 5649     1.089100e+02 -4.858500e+02\n0 5650     6.336300e+02 2.722800e+02\n6 5650     4.256400e+02 4.496200e+02\n9 5650     2.892800e+02 3.220200e+02\n10 5650     6.226400e+02 5.294300e+02\n0 5651     6.336300e+02 2.722800e+02\n6 5651     4.256400e+02 4.496200e+02\n9 5651     2.892800e+02 3.220200e+02\n10 5651     6.226400e+02 5.294300e+02\n0 5652     3.326300e+02 2.713600e+02\n6 5652     -2.580017e+00 3.295300e+02\n0 5653     6.650699e+02 2.714500e+02\n6 5653     4.641400e+02 4.589400e+02\n0 5654     -3.854000e+02 2.709300e+02\n7 5654     -5.827600e+02 2.839100e+02\n11 5654     -2.010000e+02 -4.706200e+02\n13 5654     -1.204500e+02 -4.712000e+01\n14 5654     -7.871002e+01 -4.899800e+02\n15 5654     -5.843300e+02 4.548100e+02\n0 5655     -5.394700e+02 2.698600e+02\n5 5655     -1.554900e+02 -3.928600e+02\n7 5655     -7.449600e+02 2.628200e+02\n15 5655     -8.006900e+02 4.331900e+02\n0 5656     -5.394700e+02 2.698600e+02\n7 5656     -7.449600e+02 2.628200e+02\n15 5656     -8.006900e+02 4.331900e+02\n0 5657     3.400500e+02 2.702700e+02\n6 5657     7.070007e+00 3.306500e+02\n0 5658     6.464000e+02 2.698000e+02\n2 5658     5.187900e+02 2.683800e+02\n3 5658     3.753400e+02 -5.109998e+01\n6 5658     4.416300e+02 4.512800e+02\n7 5658     4.609800e+02 4.489700e+02\n8 5658     4.870500e+02 1.908600e+02\n9 5658     3.012800e+02 3.255000e+02\n10 5658     6.381400e+02 5.275900e+02\n11 5658     7.671600e+02 -4.500800e+02\n12 5658     5.245601e+02 4.602400e+02\n13 5658     8.362400e+02 4.351001e+01\n0 5659     -9.190002e+00 2.683300e+02\n6 5659     -4.010200e+02 2.296300e+02\n10 5659     -1.327600e+02 4.574900e+02\n15 5659     -6.534998e+01 5.020200e+02\n0 5660     -1.922500e+02 2.674800e+02\n11 5660     -2.544000e+01 -4.757400e+02\n14 5660     1.290200e+02 -4.911100e+02\n15 5660     -3.168100e+02 4.757000e+02\n0 5661     6.095400e+02 2.677300e+02\n2 5661     4.797700e+02 2.504200e+02\n6 5661     3.975500e+02 4.369000e+02\n7 5661     4.249399e+02 4.404900e+02\n8 5661     4.549900e+02 1.771800e+02\n9 5661     2.686200e+02 3.093000e+02\n10 5661     5.940300e+02 5.208800e+02\n13 5661     7.997400e+02 3.701001e+01\n0 5662     2.971200e+02 2.660100e+02\n6 5662     -3.864001e+01 3.140800e+02\n0 5663     -4.993600e+02 2.616600e+02\n7 5663     -7.008200e+02 2.591800e+02\n10 5663     -7.204300e+02 4.029400e+02\n14 5663     -1.965900e+02 -5.000000e+02\n0 5664     6.204399e+02 2.610800e+02\n2 5664     4.932200e+02 2.488100e+02\n3 5664     3.514000e+02 -7.062000e+01\n6 5664     4.124300e+02 4.330900e+02\n7 5664     4.365400e+02 4.358900e+02\n9 5664     2.802300e+02 3.081100e+02\n10 5664     6.074700e+02 5.142200e+02\n11 5664     7.433300e+02 -4.598100e+02\n12 5664     4.966100e+02 4.415700e+02\n13 5664     8.110300e+02 3.314001e+01\n15 5664     8.064800e+02 5.888400e+02\n0 5665     6.607400e+02 2.601200e+02\n8 5665     5.010601e+02 1.871900e+02\n0 5666     2.000400e+02 2.596400e+02\n6 5666     -1.445200e+02 2.796500e+02\n0 5667     6.059301e+02 2.592500e+02\n2 5667     4.780500e+02 2.408000e+02\n6 5667     3.950100e+02 4.266800e+02\n7 5667     4.223400e+02 4.317300e+02\n8 5667     4.530100e+02 1.692000e+02\n9 5667     2.673101e+02 3.006700e+02\n10 5667     5.903300e+02 5.104100e+02\n11 5667     7.291500e+02 -4.623100e+02\n13 5667     7.971801e+02 2.969000e+01\n15 5667     7.861801e+02 5.844000e+02\n0 5668     6.433700e+02 2.589700e+02\n2 5668     5.183101e+02 2.566700e+02\n3 5668     3.754399e+02 -6.217999e+01\n6 5668     4.406700e+02 4.383000e+02\n7 5668     4.594200e+02 4.381900e+02\n8 5668     4.858300e+02 1.811200e+02\n9 5668     3.010100e+02 3.155600e+02\n10 5668     6.347600e+02 5.146800e+02\n12 5668     5.235200e+02 4.469700e+02\n13 5668     8.346000e+02 3.389001e+01\n0 5669     -5.550000e+01 2.586800e+02\n5 5669     3.662800e+02 -4.114301e+02\n7 5669     -2.407800e+02 3.195700e+02\n14 5669     2.836801e+02 -4.960900e+02\n15 5669     -1.274500e+02 4.821200e+02\n0 5670     6.907300e+02 2.582700e+02\n2 5670     5.677800e+02 2.761200e+02\n6 5670     4.972800e+02 4.532300e+02\n8 5670     5.277400e+02 1.960000e+02\n9 5670     3.427100e+02 3.335800e+02\n10 5670     6.917300e+02 5.188600e+02\n12 5670     5.783700e+02 4.632500e+02\n0 5671     -7.068100e+02 2.567600e+02\n5 5671     -3.674600e+02 -4.049200e+02\n0 5672     -3.769000e+02 2.559000e+02\n5 5672     8.380005e+00 -4.140300e+02\n7 5672     -5.713500e+02 2.692700e+02\n14 5672     -7.164001e+01 -5.072800e+02\n0 5673     -1.984800e+02 2.560300e+02\n7 5673     -3.859700e+02 2.959100e+02\n10 5673     -3.542500e+02 4.239800e+02\n15 5673     -3.238100e+02 4.583900e+02\n0 5674     3.145699e+02 2.555100e+02\n6 5674     -1.202002e+01 3.077100e+02\n0 5675     5.835000e+02 2.553200e+02\n2 5675     4.544700e+02 2.268800e+02\n6 5675     3.682800e+02 4.145000e+02\n9 5675     2.475900e+02 2.880600e+02\n11 5675     7.078300e+02 -4.671400e+02\n12 5675     4.550000e+02 4.221800e+02\n13 5675     7.751300e+02 2.335999e+01\n15 5675     7.549500e+02 5.747800e+02\n0 5676     6.064100e+02 2.554900e+02\n2 5676     4.798000e+02 2.375800e+02\n3 5676     3.384100e+02 -8.157001e+01\n6 5676     3.959200e+02 4.217400e+02\n7 5676     4.233700e+02 4.279600e+02\n10 5676     5.913800e+02 5.062300e+02\n15 5676     7.874399e+02 5.788700e+02\n0 5677     6.183000e+02 2.545500e+02\n3 5677     3.511200e+02 -7.665002e+01\n15 5677     8.044399e+02 5.804400e+02\n0 5678     -3.739600e+02 2.539600e+02\n14 5678     -6.910999e+01 -5.096600e+02\n0 5679     -2.928998e+01 2.535000e+02\n14 5679     3.136600e+02 -5.011200e+02\n15 5679     -9.084003e+01 4.785000e+02\n0 5680     8.665300e+02 2.526300e+02\n2 5680     7.397500e+02 3.407700e+02\n0 5681     5.893700e+02 2.519500e+02\n2 5681     4.617500e+02 2.262500e+02\n6 5681     3.763700e+02 4.127500e+02\n10 5681     5.712500e+02 4.992700e+02\n0 5682     5.945800e+02 2.519800e+02\n2 5682     4.675400e+02 2.283400e+02\n6 5682     3.828000e+02 4.142300e+02\n7 5682     4.121400e+02 4.224300e+02\n8 5682     4.441600e+02 1.594600e+02\n10 5682     5.774100e+02 5.004000e+02\n12 5682     4.687700e+02 4.221500e+02\n15 5682     7.710100e+02 5.717300e+02\n0 5683     -2.108900e+02 2.507300e+02\n7 5683     -3.976400e+02 2.891600e+02\n0 5684     -1.982900e+02 2.502800e+02\n7 5684     -3.842500e+02 2.903200e+02\n10 5684     -3.532900e+02 4.167100e+02\n11 5684     -3.216998e+01 -4.922600e+02\n15 5684     -3.222700e+02 4.505900e+02\n0 5685     8.582900e+02 2.502400e+02\n3 5685     5.737800e+02 1.723999e+01\n7 5685     6.660400e+02 4.664800e+02\n9 5685     4.796200e+02 3.881200e+02\n12 5685     7.664399e+02 5.121200e+02\n0 5686     8.507800e+02 2.486600e+02\n3 5686     5.678800e+02 1.360999e+01\n7 5686     6.590900e+02 4.638700e+02\n9 5686     4.736100e+02 3.845200e+02\n0 5687     -5.554800e+02 2.486500e+02\n5 5687     -1.751800e+02 -4.160000e+02\n0 5688     7.564200e+02 2.479900e+02\n3 5688     4.866500e+02 -2.365002e+01\n8 5688     5.855400e+02 2.091600e+02\n12 5688     6.576400e+02 4.968500e+02\n0 5689     7.564200e+02 2.479900e+02\n3 5689     4.866500e+02 -2.365002e+01\n6 5689     5.755699e+02 4.629700e+02\n7 5689     5.704399e+02 4.472500e+02\n8 5689     5.855400e+02 2.091600e+02\n0 5690     8.481300e+02 2.478400e+02\n2 5690     7.233900e+02 3.286800e+02\n3 5690     5.660000e+02 1.119000e+01\n0 5691     6.035300e+02 2.472100e+02\n7 5691     4.215400e+02 4.194400e+02\n9 5691     2.675400e+02 2.902200e+02\n13 5691     7.961700e+02 1.890997e+01\n15 5691     7.838900e+02 5.669100e+02\n0 5692     8.759399e+02 2.469300e+02\n7 5692     6.826500e+02 4.662500e+02\n9 5692     4.936200e+02 3.912600e+02\n0 5693     5.821300e+02 2.464200e+02\n3 5693     3.159600e+02 -1.016500e+02\n6 5693     3.687300e+02 4.036300e+02\n12 5693     4.557400e+02 4.114600e+02\n15 5693     7.543199e+02 5.619700e+02\n0 5694     6.371100e+02 2.463200e+02\n3 5694     3.724301e+02 -7.647998e+01\n6 5694     4.363700e+02 4.223900e+02\n9 5694     2.991801e+02 3.027400e+02\n15 5694     8.317600e+02 5.705300e+02\n0 5695     6.343400e+02 2.450300e+02\n2 5695     5.122900e+02 2.395300e+02\n6 5695     4.332500e+02 4.202800e+02\n7 5695     4.524399e+02 4.229000e+02\n11 5695     7.614900e+02 -4.757200e+02\n0 5696     5.442800e+02 2.441300e+02\n2 5696     4.133500e+02 1.972600e+02\n3 5696     2.755900e+02 -1.217600e+02\n6 5696     3.216900e+02 3.882500e+02\n7 5696     3.629301e+02 4.055500e+02\n10 5696     5.184200e+02 4.858300e+02\n0 5697     6.500100e+02 2.428400e+02\n2 5697     5.297800e+02 2.442600e+02\n3 5697     3.865200e+02 -7.404999e+01\n6 5697     4.527300e+02 4.228000e+02\n7 5697     4.680500e+02 4.235300e+02\n9 5697     3.110000e+02 3.052700e+02\n10 5697     6.440601e+02 4.954400e+02\n12 5697     5.354000e+02 4.318300e+02\n15 5697     8.502300e+02 5.680400e+02\n0 5698     -4.114001e+01 2.415500e+02\n6 5698     -4.214300e+02 1.896900e+02\n0 5699     6.356600e+02 2.414700e+02\n6 5699     4.358400e+02 4.167900e+02\n7 5699     4.540300e+02 4.195600e+02\n8 5699     4.836000e+02 1.650900e+02\n10 5699     6.264100e+02 4.920000e+02\n11 5699     7.640699e+02 -4.788800e+02\n12 5699     5.191600e+02 4.256100e+02\n15 5699     8.296500e+02 5.631200e+02\n0 5700     4.740002e+01 2.400300e+02\n6 5700     -3.110800e+02 2.148500e+02\n0 5701     6.558800e+02 2.400300e+02\n7 5701     4.741000e+02 4.218100e+02\n10 5701     6.514399e+02 4.929000e+02\n0 5702     8.570200e+02 2.382100e+02\n2 5702     7.349500e+02 3.244600e+02\n0 5703     -1.427002e+01 2.375700e+02\n6 5703     -3.850400e+02 1.935200e+02\n0 5704     6.328800e+02 2.376400e+02\n9 5704     2.970100e+02 2.933300e+02\n0 5705     8.707300e+02 2.376700e+02\n2 5705     7.480200e+02 3.290200e+02\n3 5705     5.887800e+02 1.220001e+01\n7 5705     6.792900e+02 4.566500e+02\n12 5705     7.829800e+02 5.032800e+02\n0 5706     8.707300e+02 2.376700e+02\n3 5706     5.887800e+02 1.220001e+01\n0 5707     -6.968400e+02 2.370000e+02\n14 5707     -4.334000e+02 -5.297000e+02\n0 5708     -6.968400e+02 2.370000e+02\n14 5708     -4.334000e+02 -5.297000e+02\n0 5709     -4.860600e+02 2.350200e+02\n7 5709     -6.828500e+02 2.323700e+02\n10 5709     -6.997500e+02 3.719600e+02\n13 5709     -2.049000e+02 -8.307001e+01\n14 5709     -1.870000e+02 -5.305699e+02\n0 5710     -2.180000e+02 2.346700e+02\n7 5710     -4.010800e+02 2.725300e+02\n15 5710     -3.476700e+02 4.269600e+02\n0 5711     -5.909998e+01 2.340600e+02\n6 5711     -4.385000e+02 1.761300e+02\n7 5711     -2.387500e+02 2.957300e+02\n0 5712     5.438300e+02 2.324000e+02\n7 5712     3.639900e+02 3.936100e+02\n15 5712     7.021300e+02 5.364500e+02\n0 5713     6.630300e+02 2.317900e+02\n3 5713     4.030800e+02 -7.790002e+01\n15 5713     8.700100e+02 5.540400e+02\n0 5714     6.630300e+02 2.317900e+02\n2 5714     5.463800e+02 2.392700e+02\n3 5714     4.030800e+02 -7.790002e+01\n6 5714     4.711801e+02 4.153700e+02\n7 5714     4.824900e+02 4.151600e+02\n10 5714     6.607000e+02 4.839100e+02\n15 5714     8.700100e+02 5.540400e+02\n0 5715     6.072300e+02 2.310100e+02\n2 5715     4.874200e+02 2.137300e+02\n15 5715     7.911801e+02 5.440800e+02\n0 5716     5.220300e+02 2.306200e+02\n6 5716     2.593200e+02 3.500800e+02\n10 5716     4.936000e+02 4.677400e+02\n15 5716     6.746899e+02 5.289500e+02\n0 5717     6.314700e+02 2.297700e+02\n2 5717     5.130200e+02 2.232500e+02\n6 5717     4.336899e+02 4.021100e+02\n13 5717     8.262400e+02 7.250000e+00\n15 5717     8.253199e+02 5.458300e+02\n0 5718     -5.880005e+00 2.280800e+02\n5 5718     4.317300e+02 -4.439200e+02\n10 5718     -1.243500e+02 4.094800e+02\n11 5718     1.459700e+02 -5.135000e+02\n15 5718     -5.625000e+01 4.465100e+02\n0 5719     6.295601e+02 2.265600e+02\n3 5719     3.703500e+02 -9.796002e+01\n6 5719     4.319600e+02 3.979100e+02\n7 5719     4.499900e+02 4.043000e+02\n8 5719     4.809200e+02 1.509300e+02\n9 5719     2.964399e+02 2.838000e+02\n10 5719     6.206200e+02 4.739700e+02\n12 5719     5.154399e+02 4.063100e+02\n15 5719     8.233101e+02 5.413700e+02\n0 5720     6.295601e+02 2.265600e+02\n2 5720     5.115699e+02 2.192000e+02\n3 5720     3.703500e+02 -9.796002e+01\n6 5720     4.319600e+02 3.979100e+02\n10 5720     6.206200e+02 4.739700e+02\n13 5720     8.241801e+02 4.460022e+00\n0 5721     6.295601e+02 2.265600e+02\n2 5721     5.115699e+02 2.192000e+02\n3 5721     3.703500e+02 -9.796002e+01\n6 5721     4.319600e+02 3.979100e+02\n7 5721     4.499900e+02 4.043000e+02\n8 5721     4.809200e+02 1.509300e+02\n9 5721     2.964399e+02 2.838000e+02\n10 5721     6.206200e+02 4.739700e+02\n13 5721     8.241801e+02 4.460022e+00\n15 5721     8.233101e+02 5.413700e+02\n0 5722     4.998779e-02 2.244500e+02\n6 5722     -3.583000e+02 1.829800e+02\n10 5722     -1.162900e+02 4.062000e+02\n0 5723     -4.975700e+02 2.235900e+02\n7 5723     -6.932800e+02 2.185900e+02\n10 5723     -7.120000e+02 3.573000e+02\n11 5723     -3.068200e+02 -5.114900e+02\n0 5724     -1.133700e+02 2.224500e+02\n6 5724     -4.996500e+02 1.458700e+02\n0 5725     -6.840027e+00 2.220200e+02\n5 5725     4.323300e+02 -4.505300e+02\n6 5725     -3.652000e+02 1.783900e+02\n10 5725     -1.246400e+02 4.022800e+02\n13 5725     2.196200e+02 -6.578998e+01\n14 5725     3.478800e+02 -5.346000e+02\n15 5725     -5.673999e+01 4.380700e+02\n0 5726     -6.840027e+00 2.220200e+02\n6 5726     -3.652000e+02 1.783900e+02\n9 5726     -3.036100e+02 6.078003e+01\n10 5726     -1.246400e+02 4.022800e+02\n11 5726     1.448400e+02 -5.196400e+02\n14 5726     3.478800e+02 -5.346000e+02\n15 5726     -5.673999e+01 4.380700e+02\n0 5727     6.581200e+02 2.219600e+02\n2 5727     5.433600e+02 2.275600e+02\n7 5727     4.786100e+02 4.049100e+02\n10 5727     6.550000e+02 4.715600e+02\n0 5728     7.982800e+02 2.210800e+02\n7 5728     6.136500e+02 4.289900e+02\n10 5728     8.225800e+02 4.868900e+02\n0 5729     7.445000e+02 2.204000e+02\n2 5729     6.328101e+02 2.637900e+02\n6 5729     5.692600e+02 4.302600e+02\n7 5729     5.628800e+02 4.188300e+02\n8 5729     5.817300e+02 1.843100e+02\n0 5730     6.195699e+02 2.194300e+02\n2 5730     5.034100e+02 2.081100e+02\n3 5730     3.629200e+02 -1.086200e+02\n6 5730     4.218800e+02 3.866700e+02\n7 5730     4.411600e+02 3.954500e+02\n8 5730     4.736801e+02 1.417400e+02\n9 5730     2.894200e+02 2.741000e+02\n10 5730     6.093101e+02 4.641300e+02\n11 5730     7.536100e+02 -5.037600e+02\n12 5730     5.062600e+02 3.954900e+02\n15 5730     8.098800e+02 5.296100e+02\n0 5731     7.025400e+02 2.193600e+02\n2 5731     5.902500e+02 2.443700e+02\n6 5731     5.210200e+02 4.146900e+02\n0 5732     6.265699e+02 2.183100e+02\n2 5732     5.111899e+02 2.098800e+02\n6 5732     4.305900e+02 3.880300e+02\n7 5732     4.482200e+02 3.956600e+02\n9 5732     2.961700e+02 2.759000e+02\n10 5732     6.176100e+02 4.636500e+02\n12 5732     5.142900e+02 3.967100e+02\n13 5732     8.225699e+02 -3.099976e+00\n15 5732     8.197200e+02 5.292800e+02\n0 5733     -2.971002e+01 2.166300e+02\n6 5733     -3.891300e+02 1.653900e+02\n11 5733     1.222800e+02 -5.242400e+02\n0 5734     7.294100e+02 2.153000e+02\n2 5734     6.188300e+02 2.526300e+02\n3 5734     4.718500e+02 -6.287000e+01\n6 5734     5.531200e+02 4.202500e+02\n7 5734     5.489800e+02 4.114300e+02\n0 5735     6.033900e+02 2.112300e+02\n2 5735     4.877100e+02 1.925100e+02\n3 5735     3.480699e+02 -1.241000e+02\n6 5735     4.043800e+02 3.730000e+02\n7 5735     4.263500e+02 3.844400e+02\n8 5735     4.609000e+02 1.299500e+02\n12 5735     4.895699e+02 3.814100e+02\n15 5735     7.876400e+02 5.154400e+02\n0 5736     6.033900e+02 2.112300e+02\n7 5736     4.263500e+02 3.844400e+02\n0 5737     7.113000e+02 2.107600e+02\n2 5737     6.014800e+02 2.401700e+02\n3 5737     4.559301e+02 -7.506000e+01\n6 5737     5.334100e+02 4.088000e+02\n7 5737     5.319900e+02 4.036900e+02\n8 5737     5.557000e+02 1.657300e+02\n9 5737     3.723300e+02 3.043900e+02\n10 5737     7.190300e+02 4.644200e+02\n0 5738     3.584998e+01 2.095800e+02\n6 5738     -3.039000e+02 1.773600e+02\n0 5739     -2.439800e+02 2.078500e+02\n7 5739     -4.216600e+02 2.424600e+02\n0 5740     2.875000e+01 2.079700e+02\n6 5740     -3.117500e+02 1.732600e+02\n7 5740     -1.455300e+02 2.840200e+02\n10 5740     -8.121002e+01 3.893400e+02\n14 5740     3.924900e+02 -5.482600e+02\n0 5741     6.833500e+02 2.077000e+02\n3 5741     4.302400e+02 -9.045001e+01\n7 5741     5.051801e+02 3.955300e+02\n8 5741     5.320800e+02 1.548000e+02\n10 5741     6.861200e+02 4.573400e+02\n0 5742     -2.110200e+02 2.055600e+02\n14 5742     1.255800e+02 -5.597100e+02\n0 5743     5.884301e+02 2.051100e+02\n3 5743     3.342700e+02 -1.370200e+02\n6 5743     3.870200e+02 3.605100e+02\n7 5743     4.123199e+02 3.758500e+02\n8 5743     4.487400e+02 1.195600e+02\n9 5743     2.644800e+02 2.490500e+02\n12 5743     4.727800e+02 3.693500e+02\n15 5743     7.676000e+02 5.043600e+02\n0 5744     6.848400e+02 2.045200e+02\n6 5744     5.038400e+02 3.933100e+02\n0 5745     6.848400e+02 2.045200e+02\n6 5745     5.038400e+02 3.933100e+02\n8 5745     5.344301e+02 1.521100e+02\n0 5746     6.488500e+02 2.032300e+02\n2 5746     5.390400e+02 2.059100e+02\n8 5746     5.025200e+02 1.387300e+02\n12 5746     5.438700e+02 3.878100e+02\n0 5747     6.141801e+02 2.031900e+02\n3 5747     3.612700e+02 -1.268300e+02\n6 5747     4.195200e+02 3.671100e+02\n9 5747     2.883199e+02 2.584000e+02\n11 5747     7.518900e+02 -5.208600e+02\n15 5747     8.039800e+02 5.060700e+02\n0 5748     -1.634600e+02 2.025200e+02\n7 5748     -3.381300e+02 2.500900e+02\n10 5748     -3.070200e+02 3.636300e+02\n15 5748     -2.688900e+02 3.899800e+02\n0 5749     6.285699e+02 2.014800e+02\n2 5749     5.176801e+02 1.946300e+02\n15 5749     8.241500e+02 5.056700e+02\n0 5750     -1.777002e+01 2.006100e+02\n6 5750     -3.637100e+02 1.506300e+02\n10 5750     -1.349200e+02 3.757400e+02\n14 5750     3.429200e+02 -5.586899e+02\n0 5751     1.690002e+01 2.000300e+02\n6 5751     -3.203100e+02 1.608100e+02\n0 5752     -4.538300e+02 1.996000e+02\n7 5752     -6.400400e+02 2.013900e+02\n10 5752     -6.543000e+02 3.320500e+02\n14 5752     -1.473500e+02 -5.708800e+02\n0 5753     -1.672998e+01 1.978400e+02\n6 5753     -3.597400e+02 1.485200e+02\n10 5753     -1.336100e+02 3.728000e+02\n13 5753     2.172400e+02 -8.629999e+01\n14 5753     3.447000e+02 -5.614600e+02\n0 5754     5.522400e+02 1.980600e+02\n7 5754     3.769800e+02 3.620000e+02\n9 5754     2.323101e+02 2.270400e+02\n10 5754     5.302300e+02 4.314000e+02\n15 5754     7.172800e+02 4.885800e+02\n0 5755     -3.205300e+02 1.972600e+02\n7 5755     -4.986100e+02 2.205100e+02\n0 5756     -4.266998e+01 1.973500e+02\n14 5756     3.165100e+02 -5.631500e+02\n0 5757     -3.831000e+01 1.969800e+02\n7 5757     -2.099300e+02 2.640000e+02\n10 5757     -1.590700e+02 3.700200e+02\n12 5757     -2.535800e+02 1.713800e+02\n14 5757     3.209301e+02 -5.631700e+02\n0 5758     5.306801e+02 1.958100e+02\n2 5758     4.099301e+02 1.420700e+02\n3 5758     2.743300e+02 -1.757800e+02\n7 5758     3.557100e+02 3.557400e+02\n9 5758     2.118300e+02 2.149300e+02\n10 5758     5.060400e+02 4.267600e+02\n13 5758     7.278600e+02 -3.502002e+01\n15 5758     6.874100e+02 4.819000e+02\n0 5759     6.009800e+02 1.926400e+02\n3 5759     3.489700e+02 -1.435400e+02\n6 5759     4.059000e+02 3.514200e+02\n8 5759     4.627100e+02 1.139200e+02\n9 5759     2.774900e+02 2.442200e+02\n0 5760     5.907600e+02 1.913000e+02\n3 5760     3.410699e+02 -1.494500e+02\n6 5760     3.938200e+02 3.450600e+02\n7 5760     4.168500e+02 3.624900e+02\n8 5760     4.537400e+02 1.081100e+02\n9 5760     2.705100e+02 2.380200e+02\n10 5760     5.777500e+02 4.267500e+02\n12 5760     4.796899e+02 3.535900e+02\n15 5760     7.728000e+02 4.845400e+02\n0 5761     6.155000e+02 1.910900e+02\n7 5761     4.411500e+02 3.673200e+02\n12 5761     5.084200e+02 3.623900e+02\n0 5762     -6.078003e+01 1.903000e+02\n6 5762     -4.091300e+02 1.264400e+02\n0 5763     6.115000e+02 1.870900e+02\n6 5763     4.195000e+02 3.495900e+02\n7 5763     4.375699e+02 3.626200e+02\n9 5763     2.901300e+02 2.446400e+02\n10 5763     6.022800e+02 4.252900e+02\n0 5764     8.467400e+02 1.863700e+02\n7 5764     6.638600e+02 4.040000e+02\n0 5765     6.250800e+02 1.839700e+02\n3 5765     3.794301e+02 -1.385600e+02\n6 5765     4.379900e+02 3.500200e+02\n7 5765     4.511801e+02 3.621200e+02\n8 5765     4.860500e+02 1.151900e+02\n9 5765     3.036200e+02 2.476600e+02\n10 5765     6.182900e+02 4.227400e+02\n12 5765     5.217500e+02 3.593100e+02\n13 5765     8.250601e+02 -3.284998e+01\n15 5765     8.216000e+02 4.804500e+02\n0 5766     7.165800e+02 1.829900e+02\n6 5766     5.471100e+02 3.809300e+02\n7 5766     5.409900e+02 3.779700e+02\n0 5767     -1.023800e+02 1.815300e+02\n5 5767     3.369000e+02 -4.963300e+02\n14 5767     2.549900e+02 -5.828400e+02\n0 5768     -1.472800e+02 1.810200e+02\n5 5768     2.862500e+02 -4.975500e+02\n0 5769     6.085699e+02 1.807200e+02\n2 5769     5.021000e+02 1.649100e+02\n6 5769     4.187700e+02 3.402900e+02\n7 5769     4.359800e+02 3.562200e+02\n8 5769     4.721899e+02 1.067500e+02\n9 5769     2.895500e+02 2.376000e+02\n10 5769     5.991100e+02 4.172400e+02\n12 5769     5.031400e+02 3.491100e+02\n15 5769     7.987000e+02 4.731600e+02\n0 5770     2.063400e+02 1.785500e+02\n7 5770     7.753998e+01 3.140700e+02\n10 5770     1.281600e+02 3.709800e+02\n15 5770     2.273400e+02 4.105000e+02\n0 5771     8.379100e+02 1.785400e+02\n2 5771     7.343000e+02 2.631100e+02\n3 5771     5.804900e+02 -4.891998e+01\n7 5771     6.563700e+02 3.951300e+02\n0 5772     -2.613800e+02 1.778500e+02\n7 5772     -4.324400e+02 2.113100e+02\n10 5772     -4.189400e+02 3.253000e+02\n0 5773     7.109900e+02 1.780200e+02\n6 5773     5.423000e+02 3.742900e+02\n7 5773     5.363101e+02 3.727600e+02\n0 5774     9.656000e+01 1.769800e+02\n6 5774     -3.889001e+01 2.271300e+02\n10 5774     4.699707e-01 3.574100e+02\n15 5774     7.665002e+01 3.927800e+02\n0 5775     7.392200e+02 1.753200e+02\n7 5775     5.633900e+02 3.744500e+02\n10 5775     7.547800e+02 4.252400e+02\n0 5776     6.268500e+02 1.717800e+02\n3 5776     3.834800e+02 -1.494700e+02\n6 5776     4.427800e+02 3.374600e+02\n7 5776     4.545500e+02 3.510900e+02\n9 5776     3.075400e+02 2.383000e+02\n10 5776     6.209000e+02 4.091300e+02\n15 5776     8.251000e+02 4.635200e+02\n0 5777     7.130800e+02 1.697400e+02\n3 5777     4.705400e+02 -1.104100e+02\n6 5777     5.461000e+02 3.653200e+02\n8 5777     5.661100e+02 1.343100e+02\n9 5777     3.829800e+02 2.733600e+02\n10 5777     7.240400e+02 4.159700e+02\n12 5777     6.259200e+02 3.757400e+02\n0 5778     -1.413900e+02 1.685300e+02\n6 5778     -4.961100e+02 7.589001e+01\n0 5779     7.103000e+02 1.685300e+02\n2 5779     6.125601e+02 2.000700e+02\n6 5779     5.430699e+02 3.630100e+02\n7 5779     5.364600e+02 3.628600e+02\n8 5779     5.642200e+02 1.318900e+02\n10 5779     7.208600e+02 4.137800e+02\n12 5779     6.227300e+02 3.735700e+02\n0 5780     -8.200400e+02 1.674500e+02\n5 5780     -4.778900e+02 -4.994301e+02\n0 5781     6.270200e+02 1.674900e+02\n2 5781     5.254800e+02 1.608200e+02\n9 5781     3.095100e+02 2.349000e+02\n15 5781     8.259800e+02 4.572300e+02\n0 5782     7.390200e+02 1.676200e+02\n2 5782     6.416899e+02 2.119500e+02\n6 5782     5.761400e+02 3.718900e+02\n7 5782     5.644500e+02 3.673500e+02\n10 5782     7.549800e+02 4.160000e+02\n0 5783     6.936801e+02 1.665900e+02\n6 5783     5.236100e+02 3.549100e+02\n7 5783     5.203900e+02 3.581200e+02\n9 5783     3.676400e+02 2.620900e+02\n10 5783     7.002800e+02 4.100200e+02\n0 5784     6.090200e+02 1.653900e+02\n6 5784     4.232600e+02 3.235600e+02\n8 5784     4.750000e+02 9.392001e+01\n9 5784     2.929700e+02 2.243300e+02\n10 5784     6.011100e+02 3.991100e+02\n12 5784     5.067100e+02 3.322800e+02\n15 5784     8.009200e+02 4.515000e+02\n0 5785     6.090200e+02 1.653900e+02\n6 5785     4.232600e+02 3.235600e+02\n8 5785     4.750000e+02 9.392001e+01\n10 5785     6.011100e+02 3.991100e+02\n15 5785     8.009200e+02 4.515000e+02\n0 5786     7.229200e+02 1.649600e+02\n2 5786     6.265200e+02 2.025500e+02\n6 5786     5.583900e+02 3.639200e+02\n12 5786     6.377600e+02 3.747000e+02\n0 5787     -8.203900e+02 1.635600e+02\n5 5787     -4.756600e+02 -5.028199e+02\n0 5788     8.265900e+02 1.629900e+02\n7 5788     6.482200e+02 3.785000e+02\n0 5789     7.236899e+02 1.616900e+02\n2 5789     6.279800e+02 1.996100e+02\n3 5789     4.830300e+02 -1.127100e+02\n6 5789     5.602500e+02 3.604500e+02\n7 5789     5.500601e+02 3.590200e+02\n8 5789     5.767300e+02 1.315500e+02\n9 5789     3.950500e+02 2.710500e+02\n10 5789     7.369399e+02 4.075400e+02\n12 5789     6.397400e+02 3.710800e+02\n0 5790     5.599100e+02 1.606400e+02\n2 5790     4.537000e+02 1.212800e+02\n6 5790     3.638900e+02 2.999900e+02\n7 5790     3.906000e+02 3.271700e+02\n9 5790     2.501100e+02 1.989700e+02\n12 5790     4.477900e+02 3.088300e+02\n15 5790     7.333600e+02 4.371800e+02\n0 5791     -4.833700e+02 1.598600e+02\n7 5791     -6.624600e+02 1.577900e+02\n10 5791     -6.844200e+02 2.814000e+02\n0 5792     5.814600e+02 1.593400e+02\n6 5792     3.899500e+02 3.062600e+02\n9 5792     2.694900e+02 2.075400e+02\n12 5792     4.758600e+02 3.159200e+02\n13 5792     7.838900e+02 -6.048999e+01\n15 5792     7.627400e+02 4.382900e+02\n0 5793     6.441200e+02 1.594100e+02\n12 5793     5.489700e+02 3.398500e+02\n0 5794     8.485400e+02 1.588800e+02\n7 5794     6.689200e+02 3.783100e+02\n0 5795     6.487000e+02 1.584900e+02\n2 5795     5.515601e+02 1.622800e+02\n3 5795     4.112000e+02 -1.509300e+02\n6 5795     4.731300e+02 3.304600e+02\n7 5795     4.781899e+02 3.419700e+02\n8 5795     5.128700e+02 1.030300e+02\n9 5795     3.315000e+02 2.369200e+02\n10 5795     6.485100e+02 3.951800e+02\n12 5795     5.550300e+02 3.404500e+02\n15 5795     8.580300e+02 4.478600e+02\n0 5796     6.938500e+02 1.586200e+02\n7 5796     5.220800e+02 3.508600e+02\n0 5797     6.550699e+02 1.567800e+02\n6 5797     4.809900e+02 3.310300e+02\n10 5797     6.558400e+02 3.937600e+02\n0 5798     6.389800e+02 1.550000e+02\n7 5798     4.689301e+02 3.368900e+02\n10 5798     6.374800e+02 3.898600e+02\n15 5798     8.440900e+02 4.414400e+02\n0 5799     7.342300e+02 1.549400e+02\n2 5799     6.409399e+02 1.979700e+02\n3 5799     4.957900e+02 -1.135100e+02\n7 5799     5.616300e+02 3.545200e+02\n9 5799     4.065200e+02 2.702000e+02\n0 5800     6.587700e+02 1.541400e+02\n10 5800     6.607500e+02 3.911600e+02\n12 5800     5.685200e+02 3.384600e+02\n15 5800     8.724600e+02 4.435100e+02\n0 5801     6.552700e+02 1.537000e+02\n2 5801     5.595200e+02 1.607800e+02\n6 5801     4.817800e+02 3.277400e+02\n7 5801     4.848600e+02 3.389600e+02\n8 5801     5.194800e+02 1.018000e+02\n9 5801     3.377600e+02 2.360800e+02\n10 5801     6.560500e+02 3.906900e+02\n15 5801     8.672700e+02 4.425800e+02\n0 5802     6.552700e+02 1.537000e+02\n2 5802     5.595200e+02 1.607800e+02\n7 5802     4.848600e+02 3.389600e+02\n9 5802     3.377600e+02 2.360800e+02\n10 5802     6.560500e+02 3.906900e+02\n0 5803     7.150400e+02 1.522900e+02\n2 5803     6.218300e+02 1.865800e+02\n6 5803     5.526400e+02 3.473500e+02\n7 5803     5.431600e+02 3.483500e+02\n10 5803     7.273600e+02 3.953600e+02\n12 5803     6.324200e+02 3.579400e+02\n0 5804     7.282500e+02 1.527300e+02\n3 5804     4.904600e+02 -1.184200e+02\n9 5804     4.017800e+02 2.652000e+02\n10 5804     7.430100e+02 3.975500e+02\n0 5805     8.371801e+02 1.514800e+02\n7 5805     6.596600e+02 3.694700e+02\n0 5806     8.813900e+02 1.517600e+02\n2 5806     7.827900e+02 2.570800e+02\n7 5806     7.002600e+02 3.774800e+02\n0 5807     5.981801e+02 1.510800e+02\n2 5807     4.987300e+02 1.299600e+02\n3 5807     3.611200e+02 -1.839000e+02\n6 5807     4.135900e+02 3.033600e+02\n9 5807     2.876300e+02 2.080000e+02\n15 5807     7.879200e+02 4.293700e+02\n0 5808     7.490601e+02 1.512900e+02\n2 5808     6.582700e+02 2.032300e+02\n3 5808     5.122500e+02 -1.079700e+02\n7 5808     5.769000e+02 3.539900e+02\n9 5808     4.211700e+02 2.749100e+02\n0 5809     6.561400e+02 1.498200e+02\n3 5809     4.210500e+02 -1.555100e+02\n10 5809     6.579500e+02 3.860800e+02\n15 5809     8.694900e+02 4.367300e+02\n0 5810     6.645100e+02 1.499900e+02\n6 5810     4.939500e+02 3.271100e+02\n7 5810     4.945800e+02 3.367600e+02\n8 5810     5.293199e+02 1.019000e+02\n10 5810     6.675400e+02 3.870900e+02\n0 5811     6.891600e+02 1.489800e+02\n2 5811     5.964399e+02 1.720600e+02\n7 5811     5.186200e+02 3.405400e+02\n10 5811     6.962300e+02 3.883800e+02\n0 5812     6.516100e+02 1.484600e+02\n7 5812     4.815400e+02 3.329500e+02\n0 5813     7.181000e+02 1.484400e+02\n2 5813     6.261100e+02 1.843500e+02\n6 5813     5.576300e+02 3.440800e+02\n7 5813     5.471000e+02 3.450400e+02\n10 5813     7.310500e+02 3.914400e+02\n12 5813     6.372600e+02 3.545500e+02\n0 5814     7.422600e+02 1.482200e+02\n2 5814     6.504399e+02 1.951700e+02\n3 5814     5.048600e+02 -1.161100e+02\n6 5814     5.849500e+02 3.526300e+02\n7 5814     5.700300e+02 3.494600e+02\n8 5814     5.950800e+02 1.275100e+02\n9 5814     4.138600e+02 2.680600e+02\n10 5814     7.600800e+02 3.934200e+02\n12 5814     6.640200e+02 3.634700e+02\n0 5815     8.664600e+02 1.484200e+02\n2 5815     7.706000e+02 2.480800e+02\n0 5816     -1.102400e+02 1.459200e+02\n3 5816     -3.850700e+02 -4.165500e+02\n6 5816     -4.387700e+02 6.117999e+01\n0 5817     -1.102400e+02 1.459200e+02\n6 5817     -4.387700e+02 6.117999e+01\n0 5818     6.701000e+02 1.459500e+02\n6 5818     5.015900e+02 3.245400e+02\n7 5818     4.998000e+02 3.341900e+02\n0 5819     2.232100e+02 1.455000e+02\n7 5819     1.014100e+02 2.853700e+02\n10 5819     1.512000e+02 3.336000e+02\n15 5819     2.541801e+02 3.671400e+02\n0 5820     7.504900e+02 1.455100e+02\n2 5820     6.596899e+02 1.964100e+02\n3 5820     5.140900e+02 -1.145700e+02\n7 5820     5.788000e+02 3.482300e+02\n9 5820     4.220000e+02 2.693600e+02\n10 5820     7.697000e+02 3.913200e+02\n12 5820     6.743900e+02 3.636700e+02\n0 5821     1.458000e+02 1.450500e+02\n12 5821     8.332001e+01 2.596000e+02\n14 5821     6.654600e+02 -5.831000e+02\n15 5821     1.470100e+02 3.558500e+02\n0 5822     7.198900e+02 1.446000e+02\n2 5822     6.285900e+02 1.816300e+02\n6 5822     5.601200e+02 3.405900e+02\n7 5822     5.488400e+02 3.419200e+02\n8 5822     5.776801e+02 1.163200e+02\n9 5822     3.964900e+02 2.555500e+02\n10 5822     7.332600e+02 3.870400e+02\n12 5822     6.388400e+02 3.517500e+02\n0 5823     5.892100e+02 1.446600e+02\n2 5823     4.897300e+02 1.189900e+02\n0 5824     6.452400e+02 1.449100e+02\n2 5824     5.510100e+02 1.467500e+02\n6 5824     4.721801e+02 3.141000e+02\n7 5824     4.762600e+02 3.281000e+02\n12 5824     5.543900e+02 3.237500e+02\n13 5824     8.504000e+02 -6.410999e+01\n15 5824     8.546600e+02 4.283200e+02\n0 5825     8.579500e+02 1.445300e+02\n3 5825     6.087200e+02 -6.894000e+01\n7 5825     6.794800e+02 3.666300e+02\n9 5825     5.072400e+02 3.099200e+02\n12 5825     7.926801e+02 4.008100e+02\n0 5826     1.417900e+02 1.438400e+02\n2 5826     2.046801e+02 1.631400e+02\n3 5826     1.000600e+02 -1.545300e+02\n6 5826     4.091998e+01 2.114700e+02\n9 5826     5.717999e+01 2.234100e+02\n10 5826     5.653003e+01 3.234200e+02\n0 5827     8.213199e+02 1.436900e+02\n2 5827     7.294500e+02 2.254000e+02\n3 5827     5.782500e+02 -8.473999e+01\n9 5827     4.795400e+02 2.959100e+02\n0 5828     8.213199e+02 1.436900e+02\n2 5828     7.294500e+02 2.254000e+02\n3 5828     5.782500e+02 -8.473999e+01\n7 5828     6.459800e+02 3.594300e+02\n0 5829     5.340200e+02 1.423500e+02\n7 5829     3.662700e+02 3.050800e+02\n15 5829     6.982800e+02 4.078900e+02\n0 5830     -4.520400e+02 1.405000e+02\n7 5830     -6.243500e+02 1.436700e+02\n0 5831     8.489100e+02 1.402900e+02\n3 5831     6.026899e+02 -7.651001e+01\n7 5831     6.719700e+02 3.609300e+02\n0 5832     -4.542000e+02 1.386400e+02\n5 5832     -5.481000e+01 -5.418101e+02\n0 5833     6.759900e+02 1.383500e+02\n2 5833     5.857100e+02 1.554300e+02\n6 5833     5.108700e+02 3.184300e+02\n7 5833     5.074500e+02 3.277400e+02\n8 5833     5.412600e+02 9.659000e+01\n9 5833     3.609100e+02 2.323400e+02\n10 5833     6.820699e+02 3.746100e+02\n12 5833     5.916600e+02 3.286000e+02\n0 5834     8.695000e+02 1.385300e+02\n9 5834     5.174399e+02 3.101800e+02\n0 5835     -4.004999e+01 1.372700e+02\n5 5835     5.435500e+02 -5.210300e+02\n6 5835     -1.760000e+02 1.428200e+02\n7 5835     -1.602600e+02 2.355900e+02\n9 5835     -1.144200e+02 1.703900e+02\n10 5835     -1.547700e+02 2.970000e+02\n12 5835     -1.376000e+02 1.955400e+02\n13 5835     2.989600e+02 -1.146300e+02\n15 5835     -1.048200e+02 3.185800e+02\n0 5836     -8.840027e+00 1.377300e+02\n7 5836     -1.253900e+02 2.434200e+02\n10 5836     -1.184600e+02 3.006400e+02\n15 5836     -6.337000e+01 3.239500e+02\n0 5837     7.030500e+02 1.373300e+02\n6 5837     5.426700e+02 3.266800e+02\n12 5837     6.225100e+02 3.375500e+02\n0 5838     5.432800e+02 1.356200e+02\n7 5838     3.763900e+02 2.997400e+02\n0 5839     8.033700e+02 1.357100e+02\n2 5839     7.154200e+02 2.113000e+02\n3 5839     5.656700e+02 -9.851001e+01\n7 5839     6.300601e+02 3.487500e+02\n0 5840     7.045400e+02 1.344500e+02\n2 5840     6.163300e+02 1.645800e+02\n3 5840     4.736700e+02 -1.463200e+02\n6 5840     5.453500e+02 3.243100e+02\n0 5841     7.045400e+02 1.344500e+02\n3 5841     4.736700e+02 -1.463200e+02\n6 5841     5.453500e+02 3.243100e+02\n8 5841     5.666000e+02 1.031700e+02\n9 5841     3.861600e+02 2.410700e+02\n0 5842     7.075601e+02 1.342300e+02\n2 5842     6.194900e+02 1.657100e+02\n3 5842     4.765400e+02 -1.453400e+02\n6 5842     5.488400e+02 3.250300e+02\n10 5842     7.195100e+02 3.726400e+02\n12 5842     6.285200e+02 3.346500e+02\n0 5843     2.097998e+01 1.341400e+02\n5 5843     6.305601e+02 -5.200800e+02\n6 5843     -8.151999e+01 1.668000e+02\n10 5843     -8.325000e+01 2.996100e+02\n12 5843     -5.115002e+01 2.199200e+02\n15 5843     -2.288000e+01 3.231700e+02\n0 5844     8.018300e+02 1.333600e+02\n2 5844     7.150300e+02 2.085700e+02\n7 5844     6.291700e+02 3.462200e+02\n0 5845     5.422400e+02 1.329800e+02\n2 5845     4.396899e+02 8.328998e+01\n6 5845     3.475500e+02 2.615900e+02\n10 5845     5.247100e+02 3.540700e+02\n15 5845     7.107800e+02 3.956300e+02\n0 5846     7.231100e+02 1.322700e+02\n2 5846     6.359301e+02 1.711100e+02\n7 5846     5.537300e+02 3.305300e+02\n8 5846     5.831899e+02 1.079700e+02\n9 5846     4.025601e+02 2.474300e+02\n10 5846     7.382600e+02 3.725600e+02\n0 5847     -4.580000e+02 1.314800e+02\n7 5847     -6.280700e+02 1.338700e+02\n0 5848     7.696200e+02 1.316400e+02\n2 5848     6.826200e+02 1.919000e+02\n3 5848     5.357600e+02 -1.180400e+02\n7 5848     5.983000e+02 3.386400e+02\n9 5848     4.412400e+02 2.662800e+02\n10 5848     7.936700e+02 3.768000e+02\n12 5848     6.991600e+02 3.557400e+02\n0 5849     7.171801e+02 1.312500e+02\n7 5849     5.481600e+02 3.285300e+02\n10 5849     7.310601e+02 3.703900e+02\n0 5850     7.374900e+02 1.311700e+02\n2 5850     6.507700e+02 1.768200e+02\n6 5850     5.842400e+02 3.324800e+02\n7 5850     5.677500e+02 3.322900e+02\n10 5850     7.556600e+02 3.729000e+02\n12 5850     6.632000e+02 3.436500e+02\n0 5851     7.374900e+02 1.311700e+02\n7 5851     5.677500e+02 3.322900e+02\n10 5851     7.556600e+02 3.729000e+02\n0 5852     7.793400e+02 1.295500e+02\n2 5852     6.940601e+02 1.969200e+02\n9 5852     4.508300e+02 2.704900e+02\n10 5852     8.049500e+02 3.760800e+02\n0 5853     -3.369995e+00 1.295600e+02\n6 5853     -1.123300e+02 1.527000e+02\n12 5853     -8.154999e+01 2.060400e+02\n0 5854     7.082000e+02 1.289500e+02\n7 5854     5.396300e+02 3.245900e+02\n0 5855     7.082000e+02 1.289500e+02\n7 5855     5.396300e+02 3.245900e+02\n0 5856     7.738400e+02 1.290400e+02\n2 5856     6.877300e+02 1.913000e+02\n3 5856     5.405400e+02 -1.183400e+02\n9 5856     4.453000e+02 2.658800e+02\n10 5856     7.990800e+02 3.742200e+02\n12 5856     7.045900e+02 3.545000e+02\n0 5857     8.684301e+02 1.289500e+02\n2 5857     7.780601e+02 2.316300e+02\n12 5857     8.086801e+02 3.882000e+02\n0 5858     8.684301e+02 1.289500e+02\n2 5858     7.780601e+02 2.316300e+02\n12 5858     8.086801e+02 3.882000e+02\n0 5859     -4.389300e+02 1.286700e+02\n7 5859     -6.076400e+02 1.343700e+02\n0 5860     -5.127002e+01 1.284200e+02\n7 5860     -1.703500e+02 2.244500e+02\n8 5860     3.300000e+01 3.438000e+01\n9 5860     -1.226000e+02 1.581600e+02\n12 5860     -1.489900e+02 1.813900e+02\n15 5860     -1.186700e+02 3.049800e+02\n0 5861     -5.127002e+01 1.284200e+02\n7 5861     -1.703500e+02 2.244500e+02\n10 5861     -1.670000e+02 2.860800e+02\n12 5861     -1.489900e+02 1.813900e+02\n15 5861     -1.186700e+02 3.049800e+02\n0 5862     6.927300e+02 1.284700e+02\n6 5862     5.325100e+02 3.135200e+02\n0 5863     8.307200e+02 1.285800e+02\n7 5863     6.563700e+02 3.465600e+02\n0 5864     7.459900e+02 1.281800e+02\n2 5864     6.601700e+02 1.776600e+02\n3 5864     5.154399e+02 -1.321900e+02\n9 5864     4.231300e+02 2.535700e+02\n10 5864     7.656801e+02 3.703000e+02\n12 5864     6.734100e+02 3.434100e+02\n0 5865     7.109600e+02 1.276800e+02\n2 5865     6.246700e+02 1.610900e+02\n6 5865     5.544700e+02 3.193600e+02\n7 5865     5.426400e+02 3.240200e+02\n10 5865     7.239100e+02 3.657800e+02\n12 5865     6.338400e+02 3.297900e+02\n0 5866     -4.958800e+02 1.268700e+02\n7 5866     -6.679100e+02 1.228700e+02\n0 5867     8.055000e+02 1.260400e+02\n2 5867     7.201100e+02 2.024200e+02\n0 5868     -2.255600e+02 1.255100e+02\n6 5868     -5.743000e+02 -9.500122e-01\n7 5868     -3.826100e+02 1.664200e+02\n10 5868     -3.707000e+02 2.661100e+02\n15 5868     -3.436200e+02 2.756100e+02\n0 5869     8.520020e+00 1.239800e+02\n6 5869     -9.226999e+01 1.518000e+02\n7 5869     -1.032900e+02 2.343000e+02\n12 5869     -6.308002e+01 2.056100e+02\n15 5869     -3.873999e+01 3.073300e+02\n0 5870     8.520020e+00 1.239800e+02\n6 5870     -9.226999e+01 1.518000e+02\n7 5870     -1.032900e+02 2.343000e+02\n12 5870     -6.308002e+01 2.056100e+02\n15 5870     -3.873999e+01 3.073300e+02\n0 5871     7.973600e+02 1.240500e+02\n7 5871     6.261801e+02 3.366900e+02\n10 5871     8.272100e+02 3.709900e+02\n0 5872     8.594000e+02 1.231600e+02\n3 5872     6.175100e+02 -8.639001e+01\n7 5872     6.837600e+02 3.465800e+02\n9 5872     5.136700e+02 2.942500e+02\n0 5873     6.338300e+02 1.226600e+02\n2 5873     5.449700e+02 1.200700e+02\n7 5873     4.678700e+02 3.049100e+02\n9 5873     3.265601e+02 2.007100e+02\n10 5873     6.331500e+02 3.507200e+02\n13 5873     8.415400e+02 -8.496002e+01\n0 5874     7.778000e+02 1.222700e+02\n2 5874     6.936600e+02 1.864700e+02\n3 5874     5.464100e+02 -1.226500e+02\n7 5874     6.073900e+02 3.311200e+02\n10 5874     8.039900e+02 3.667900e+02\n12 5874     7.104600e+02 3.484700e+02\n0 5875     7.019900e+02 1.217300e+02\n6 5875     5.455500e+02 3.095900e+02\n7 5875     5.348600e+02 3.165500e+02\n12 5875     6.255100e+02 3.196200e+02\n0 5876     5.715200e+02 1.209600e+02\n3 5876     3.412600e+02 -2.269100e+02\n6 5876     3.873100e+02 2.587100e+02\n9 5876     2.697300e+02 1.701000e+02\n12 5876     4.736000e+02 2.680000e+02\n15 5876     7.530601e+02 3.830700e+02\n0 5877     6.533700e+02 1.205600e+02\n6 5877     4.887200e+02 2.905100e+02\n7 5877     4.875500e+02 3.063500e+02\n0 5878     8.223900e+02 1.200500e+02\n7 5878     6.500800e+02 3.369400e+02\n0 5879     8.313101e+02 1.199200e+02\n9 5879     4.935601e+02 2.808700e+02\n0 5880     8.313101e+02 1.199200e+02\n2 5880     7.460300e+02 2.067500e+02\n3 5880     5.946500e+02 -1.015200e+02\n7 5880     6.582700e+02 3.381500e+02\n9 5880     4.935601e+02 2.808700e+02\n0 5881     6.516300e+02 1.185000e+02\n2 5881     5.647500e+02 1.238400e+02\n3 5881     4.261600e+02 -1.873900e+02\n6 5881     4.867400e+02 2.875100e+02\n7 5881     4.859399e+02 3.040300e+02\n12 5881     5.683500e+02 2.973900e+02\n15 5881     8.663199e+02 3.920700e+02\n0 5882     6.516300e+02 1.185000e+02\n2 5882     5.647500e+02 1.238400e+02\n3 5882     4.261600e+02 -1.873900e+02\n6 5882     4.867400e+02 2.875100e+02\n7 5882     4.859399e+02 3.040300e+02\n12 5882     5.683500e+02 2.973900e+02\n15 5882     8.663199e+02 3.920700e+02\n0 5883     6.630000e+02 1.184100e+02\n2 5883     5.773400e+02 1.294100e+02\n6 5883     5.006200e+02 2.922300e+02\n7 5883     4.971801e+02 3.059200e+02\n9 5883     3.542900e+02 2.106700e+02\n10 5883     6.679600e+02 3.495500e+02\n12 5883     5.820601e+02 3.023100e+02\n13 5883     8.720000e+02 -8.484003e+01\n0 5884     7.396600e+02 1.177200e+02\n3 5884     5.126700e+02 -1.444100e+02\n7 5884     5.717000e+02 3.197400e+02\n0 5885     6.486801e+02 1.172900e+02\n2 5885     5.624600e+02 1.219400e+02\n6 5885     4.834399e+02 2.849600e+02\n7 5885     4.833800e+02 3.023300e+02\n9 5885     3.418199e+02 2.028200e+02\n10 5885     6.511100e+02 3.468300e+02\n12 5885     5.651300e+02 2.948400e+02\n13 5885     8.574000e+02 -8.759003e+01\n15 5885     8.621700e+02 3.897400e+02\n0 5886     2.493500e+02 1.162200e+02\n7 5886     1.350800e+02 2.634500e+02\n10 5886     1.836400e+02 3.014100e+02\n15 5886     2.922200e+02 3.307700e+02\n0 5887     6.921700e+02 1.157200e+02\n6 5887     5.355900e+02 2.992500e+02\n7 5887     5.259700e+02 3.089900e+02\n8 5887     5.599700e+02 8.334000e+01\n9 5887     3.802600e+02 2.206400e+02\n12 5887     6.153300e+02 3.091800e+02\n0 5888     8.228700e+02 1.157000e+02\n2 5888     7.391400e+02 1.996500e+02\n7 5888     6.508700e+02 3.327700e+02\n0 5889     7.839301e+02 1.147600e+02\n2 5889     7.016801e+02 1.820200e+02\n3 5889     5.544500e+02 -1.266400e+02\n7 5889     6.143500e+02 3.250600e+02\n9 5889     4.573500e+02 2.585500e+02\n10 5889     8.117500e+02 3.586700e+02\n12 5889     7.193700e+02 3.426400e+02\n0 5890     -8.106000e+01 1.143500e+02\n6 5890     -2.531000e+02 8.821002e+01\n15 5890     -1.546000e+02 2.809700e+02\n0 5891     7.105000e+02 1.146500e+02\n6 5891     5.571500e+02 3.052000e+02\n10 5891     7.242900e+02 3.504500e+02\n12 5891     6.368000e+02 3.155000e+02\n0 5892     8.776300e+02 1.128300e+02\n9 5892     5.307800e+02 2.937700e+02\n12 5892     8.231100e+02 3.742400e+02\n0 5893     7.203500e+02 1.118000e+02\n3 5893     4.966500e+02 -1.591200e+02\n9 5893     4.075400e+02 2.295800e+02\n10 5893     7.366600e+02 3.481400e+02\n0 5894     6.465800e+02 1.117600e+02\n2 5894     5.611600e+02 1.140100e+02\n3 5894     4.231000e+02 -1.965100e+02\n6 5894     4.821500e+02 2.776300e+02\n7 5894     4.820300e+02 2.962500e+02\n8 5894     5.208300e+02 6.362000e+01\n10 5894     6.487000e+02 3.398600e+02\n12 5894     5.640100e+02 2.875100e+02\n15 5894     8.598600e+02 3.816200e+02\n0 5895     7.899200e+02 1.115000e+02\n2 5895     7.083199e+02 1.837500e+02\n7 5895     6.202600e+02 3.230000e+02\n9 5895     4.631801e+02 2.587400e+02\n10 5895     8.191600e+02 3.551800e+02\n0 5896     7.463700e+02 1.107900e+02\n2 5896     6.659200e+02 1.617200e+02\n3 5896     5.212600e+02 -1.474500e+02\n7 5896     5.790400e+02 3.144000e+02\n9 5896     4.275500e+02 2.399700e+02\n10 5896     7.674000e+02 3.497800e+02\n12 5896     6.785800e+02 3.248100e+02\n0 5897     7.790300e+02 1.111800e+02\n3 5897     5.513199e+02 -1.322600e+02\n10 5897     8.060100e+02 3.535900e+02\n12 5897     7.148800e+02 3.367400e+02\n0 5898     7.790300e+02 1.111800e+02\n3 5898     5.513199e+02 -1.322600e+02\n10 5898     8.060100e+02 3.535900e+02\n12 5898     7.148800e+02 3.367400e+02\n0 5899     8.427000e+02 1.106900e+02\n3 5899     6.077000e+02 -1.037900e+02\n9 5899     5.047300e+02 2.790200e+02\n0 5900     -2.649400e+02 1.080000e+02\n5 5900     1.725400e+02 -5.783000e+02\n15 5900     -3.951700e+02 2.465500e+02\n0 5901     7.154700e+02 1.079200e+02\n6 5901     5.652400e+02 2.998500e+02\n10 5901     7.307300e+02 3.433400e+02\n0 5902     8.107200e+02 1.078700e+02\n7 5902     6.405900e+02 3.234500e+02\n0 5903     -1.180200e+02 1.073900e+02\n2 5903     -1.294200e+02 7.999878e-01\n5 5903     4.213700e+02 -5.638199e+02\n6 5903     -3.088300e+02 6.263000e+01\n7 5903     -2.452000e+02 1.844900e+02\n8 5903     -6.063000e+01 -3.185001e+01\n10 5903     -2.421900e+02 2.546900e+02\n12 5903     -2.495100e+02 1.147000e+02\n15 5903     -2.025500e+02 2.664800e+02\n0 5904     -1.180200e+02 1.073900e+02\n3 5904     -2.235200e+02 -3.190100e+02\n5 5904     4.213700e+02 -5.638199e+02\n6 5904     -3.088300e+02 6.263000e+01\n7 5904     -2.452000e+02 1.844900e+02\n8 5904     -6.063000e+01 -3.185001e+01\n10 5904     -2.421900e+02 2.546900e+02\n12 5904     -2.495100e+02 1.147000e+02\n15 5904     -2.025500e+02 2.664800e+02\n0 5905     6.671000e+02 1.069500e+02\n2 5905     5.851899e+02 1.199000e+02\n6 5905     5.078300e+02 2.814500e+02\n9 5905     3.603101e+02 2.029200e+02\n10 5905     6.733900e+02 3.367100e+02\n12 5905     5.889000e+02 2.914200e+02\n13 5905     8.776200e+02 -9.396002e+01\n0 5906     7.800500e+02 1.065600e+02\n7 5906     6.119600e+02 3.166200e+02\n10 5906     8.074900e+02 3.482400e+02\n12 5906     7.171100e+02 3.323900e+02\n0 5907     7.800500e+02 1.065600e+02\n7 5907     6.119600e+02 3.166200e+02\n10 5907     8.074900e+02 3.482400e+02\n12 5907     7.171100e+02 3.323900e+02\n0 5908     6.492400e+02 1.059300e+02\n3 5908     4.272900e+02 -1.999700e+02\n6 5908     4.869301e+02 2.727900e+02\n9 5908     3.446200e+02 1.937600e+02\n10 5908     6.526600e+02 3.334400e+02\n12 5908     5.686899e+02 2.825200e+02\n15 5908     8.640100e+02 3.740600e+02\n0 5909     6.394200e+02 1.056300e+02\n2 5909     5.554200e+02 1.040800e+02\n3 5909     4.178400e+02 -2.064900e+02\n0 5910     7.363400e+02 1.057500e+02\n2 5910     6.568300e+02 1.518900e+02\n0 5911     8.246500e+02 1.054600e+02\n2 5911     7.437800e+02 1.912100e+02\n3 5911     5.939399e+02 -1.155700e+02\n7 5911     6.538101e+02 3.237500e+02\n0 5912     7.753101e+02 1.047700e+02\n2 5912     6.963800e+02 1.688800e+02\n7 5912     6.075100e+02 3.140200e+02\n0 5913     7.302000e+02 1.046200e+02\n2 5913     6.510000e+02 1.479000e+02\n3 5913     5.080000e+02 -1.612400e+02\n7 5913     5.644600e+02 3.059000e+02\n9 5913     4.157800e+02 2.287500e+02\n10 5913     7.485500e+02 3.409200e+02\n0 5914     -2.930100e+02 1.020500e+02\n2 5914     -4.574500e+02 -1.615200e+02\n5 5914     1.414900e+02 -5.846300e+02\n7 5914     -4.469400e+02 1.328200e+02\n10 5914     -4.480700e+02 2.313600e+02\n15 5914     -4.332200e+02 2.344400e+02\n0 5915     3.815997e+01 1.021400e+02\n10 5915     -5.934003e+01 2.643200e+02\n12 5915     -1.534998e+01 1.946300e+02\n15 5915     3.919983e+00 2.818800e+02\n0 5916     3.815997e+01 1.021400e+02\n10 5916     -5.934003e+01 2.643200e+02\n12 5916     -1.534998e+01 1.946300e+02\n15 5916     3.919983e+00 2.818800e+02\n0 5917     6.391700e+02 1.014000e+02\n2 5917     5.566600e+02 1.006300e+02\n3 5917     4.189500e+02 -2.097500e+02\n6 5917     4.761500e+02 2.639300e+02\n7 5917     4.761801e+02 2.850900e+02\n8 5917     5.160900e+02 5.257999e+01\n9 5917     3.373400e+02 1.854400e+02\n10 5917     6.407800e+02 3.270800e+02\n13 5917     8.499399e+02 -1.030500e+02\n15 5917     8.506400e+02 3.661100e+02\n0 5918     -1.219600e+02 1.009600e+02\n6 5918     -3.085700e+02 5.414001e+01\n12 5918     -2.509400e+02 1.069000e+02\n0 5919     8.509000e+02 1.011800e+02\n2 5919     7.701600e+02 1.986100e+02\n3 5919     6.180400e+02 -1.083100e+02\n7 5919     6.788500e+02 3.243000e+02\n9 5919     5.131200e+02 2.744400e+02\n12 5919     7.967500e+02 3.519100e+02\n0 5920     6.489900e+02 9.754999e+01\n2 5920     5.681700e+02 1.012300e+02\n6 5920     4.891100e+02 2.628900e+02\n10 5920     6.525000e+02 3.232100e+02\n12 5920     5.702700e+02 2.725800e+02\n0 5921     8.804800e+02 9.773001e+01\n7 5921     7.068600e+02 3.267100e+02\n0 5922     -6.382001e+01 9.664999e+01\n3 5922     -9.146997e+01 -2.510300e+02\n5 5922     5.267500e+02 -5.658600e+02\n6 5922     -1.814500e+02 9.212000e+01\n7 5922     -1.753600e+02 1.926100e+02\n13 5922     2.863900e+02 -1.496700e+02\n15 5922     -1.314900e+02 2.599000e+02\n0 5923     7.407400e+02 9.675000e+01\n3 5923     5.199100e+02 -1.635000e+02\n0 5924     7.348900e+02 9.601999e+01\n7 5924     5.701000e+02 2.981800e+02\n10 5924     7.543000e+02 3.315000e+02\n0 5925     7.695800e+02 9.612000e+01\n3 5925     5.477400e+02 -1.498500e+02\n7 5925     6.029200e+02 3.048000e+02\n9 5925     4.508199e+02 2.379800e+02\n10 5925     7.963300e+02 3.346100e+02\n12 5925     7.085500e+02 3.170800e+02\n0 5926     8.414900e+02 9.439999e+01\n7 5926     6.711700e+02 3.166100e+02\n0 5927     4.487700e+02 9.357999e+01\n7 5927     2.859800e+02 2.384500e+02\n15 5927     5.864800e+02 3.255800e+02\n0 5928     7.448101e+02 9.370999e+01\n3 5928     5.253700e+02 -1.638300e+02\n7 5928     5.794700e+02 2.977500e+02\n9 5928     4.303500e+02 2.260400e+02\n10 5928     7.663400e+02 3.297400e+02\n0 5929     6.493500e+02 9.300000e+01\n2 5929     5.699700e+02 9.721002e+01\n3 5929     4.317300e+02 -2.127500e+02\n6 5929     4.908700e+02 2.586300e+02\n7 5929     4.872300e+02 2.788900e+02\n8 5929     5.273101e+02 4.939999e+01\n9 5929     3.485699e+02 1.832000e+02\n10 5929     6.534301e+02 3.180700e+02\n12 5929     5.723199e+02 2.683800e+02\n13 5929     8.613101e+02 -1.089900e+02\n15 5929     8.660400e+02 3.559700e+02\n0 5930     7.716000e+02 9.229001e+01\n7 5930     6.053000e+02 3.010500e+02\n10 5930     7.974900e+02 3.308200e+02\n12 5930     7.107100e+02 3.138700e+02\n0 5931     7.939399e+02 9.044000e+01\n2 5931     7.186801e+02 1.634600e+02\n9 5931     4.718500e+02 2.429600e+02\n10 5931     8.252100e+02 3.311500e+02\n0 5932     8.556400e+02 9.039001e+01\n2 5932     7.779200e+02 1.911000e+02\n0 5933     5.484301e+02 9.019000e+01\n6 5933     3.666200e+02 2.163000e+02\n7 5933     3.874600e+02 2.562800e+02\n12 5933     4.541500e+02 2.265900e+02\n13 5933     7.578700e+02 -1.254500e+02\n15 5933     7.244900e+02 3.367500e+02\n0 5934     6.549800e+02 9.017999e+01\n7 5934     4.931400e+02 2.772000e+02\n10 5934     6.602700e+02 3.154500e+02\n15 5934     8.740200e+02 3.527400e+02\n0 5935     6.549800e+02 9.017999e+01\n6 5935     4.980699e+02 2.573200e+02\n7 5935     4.931400e+02 2.772000e+02\n9 5935     3.541801e+02 1.831300e+02\n10 5935     6.602700e+02 3.154500e+02\n12 5935     5.791300e+02 2.672300e+02\n15 5935     8.740200e+02 3.527400e+02\n0 5936     1.070001e+01 8.919000e+01\n2 5936     1.122500e+02 1.027000e+02\n3 5936     1.942999e+01 -2.127000e+02\n5 5936     6.334301e+02 -5.696000e+02\n7 5936     -9.271997e+01 2.019800e+02\n12 5936     -4.375000e+01 1.719800e+02\n0 5937     1.070001e+01 8.919000e+01\n2 5937     1.122500e+02 1.027000e+02\n3 5937     1.942999e+01 -2.127000e+02\n6 5937     -6.660999e+01 1.168800e+02\n7 5937     -9.271997e+01 2.019800e+02\n10 5937     -9.052002e+01 2.459600e+02\n12 5937     -4.375000e+01 1.719800e+02\n15 5937     -3.165002e+01 2.602400e+02\n0 5938     -3.175000e+01 8.895999e+01\n2 5938     5.559003e+01 8.222998e+01\n3 5938     -3.473999e+01 -2.340100e+02\n4 5938     -2.102900e+02 -3.852800e+02\n5 5938     5.766899e+02 -5.722800e+02\n6 5938     -1.250200e+02 9.934003e+01\n7 5938     -1.379100e+02 1.929700e+02\n8 5938     8.015997e+01 2.422000e+01\n10 5938     -1.399200e+02 2.411100e+02\n12 5938     -9.965002e+01 1.546900e+02\n13 5938     3.237400e+02 -1.514700e+02\n15 5938     -8.846997e+01 2.537200e+02\n0 5939     6.008900e+02 8.842001e+01\n6 5939     4.329800e+02 2.343600e+02\n9 5939     3.056700e+02 1.564300e+02\n12 5939     5.168500e+02 2.443300e+02\n15 5939     7.984200e+02 3.417900e+02\n0 5940     7.450400e+02 8.831000e+01\n2 5940     6.708400e+02 1.393800e+02\n7 5940     5.807000e+02 2.927200e+02\n10 5940     7.673300e+02 3.230100e+02\n0 5941     7.450400e+02 8.831000e+01\n2 5941     6.708400e+02 1.393800e+02\n7 5941     5.807000e+02 2.927200e+02\n10 5941     7.673300e+02 3.230100e+02\n12 5941     6.827200e+02 2.998500e+02\n0 5942     7.400601e+02 8.629999e+01\n7 5942     5.763000e+02 2.899700e+02\n10 5942     7.624399e+02 3.205400e+02\n0 5943     6.178998e+01 8.612000e+01\n6 5943     -8.800049e-01 1.313800e+02\n7 5943     -3.896002e+01 2.081800e+02\n10 5943     -3.064001e+01 2.468900e+02\n13 5943     4.146300e+02 -1.442400e+02\n0 5944     6.763300e+02 8.632999e+01\n2 5944     6.008300e+02 1.045400e+02\n7 5944     5.147300e+02 2.779700e+02\n9 5944     3.744800e+02 1.897700e+02\n0 5945     5.406400e+02 8.529999e+01\n7 5945     3.802400e+02 2.499000e+02\n0 5946     -4.777100e+02 8.482001e+01\n7 5946     -6.385600e+02 8.487000e+01\n0 5947     4.552002e+01 8.501999e+01\n3 5947     6.226001e+01 -2.021200e+02\n5 5947     6.792900e+02 -5.724700e+02\n10 5947     -4.953003e+01 2.449500e+02\n13 5947     3.997700e+02 -1.462000e+02\n15 5947     1.577002e+01 2.598100e+02\n0 5948     6.052400e+02 8.512000e+01\n7 5948     4.448800e+02 2.623300e+02\n0 5949     7.612500e+02 8.372000e+01\n2 5949     6.884700e+02 1.415200e+02\n7 5949     5.966000e+02 2.911000e+02\n9 5949     4.467500e+02 2.243700e+02\n0 5950     2.262000e+02 8.284000e+01\n6 5950     1.689800e+02 1.743300e+02\n7 5950     1.215800e+02 2.296200e+02\n10 5950     1.608300e+02 2.608800e+02\n12 5950     2.029900e+02 2.205200e+02\n0 5951     6.776500e+02 8.307999e+01\n2 5951     6.029000e+02 1.015500e+02\n3 5951     4.639500e+02 -2.070900e+02\n6 5951     5.272500e+02 2.583700e+02\n7 5951     5.162800e+02 2.748700e+02\n8 5951     5.546400e+02 5.173999e+01\n9 5951     3.764200e+02 1.875800e+02\n10 5951     6.876300e+02 3.096900e+02\n12 5951     6.073900e+02 2.684900e+02\n0 5952     8.294000e+02 8.289001e+01\n2 5952     7.550900e+02 1.723300e+02\n7 5952     6.609900e+02 3.034500e+02\n12 5952     7.781700e+02 3.246500e+02\n0 5953     -1.278400e+02 8.157999e+01\n7 5953     -2.489000e+02 1.585800e+02\n0 5954     5.896002e+01 8.167001e+01\n2 5954     1.738100e+02 1.154900e+02\n0 5955     6.542999e+01 8.106000e+01\n3 5955     8.503003e+01 -1.986300e+02\n4 5955     -2.248900e+02 -4.635900e+02\n5 5955     7.049301e+02 -5.767800e+02\n6 5955     5.880005e+00 1.285500e+02\n7 5955     -3.441998e+01 2.042600e+02\n9 5955     3.700000e+01 1.881700e+02\n10 5955     -2.627002e+01 2.422400e+02\n13 5955     4.185000e+02 -1.476200e+02\n15 5955     4.282001e+01 2.568000e+02\n0 5956     7.169100e+02 8.112000e+01\n7 5956     5.544000e+02 2.801700e+02\n9 5956     4.109200e+02 2.033000e+02\n0 5957     7.480000e+02 8.042001e+01\n7 5957     5.847400e+02 2.857700e+02\n10 5957     7.715300e+02 3.139800e+02\n0 5958     7.480000e+02 8.042001e+01\n2 5958     6.761000e+02 1.338800e+02\n7 5958     5.847400e+02 2.857700e+02\n10 5958     7.715300e+02 3.139800e+02\n0 5959     5.984003e+01 7.884998e+01\n2 5959     1.767000e+02 1.133100e+02\n3 5959     8.133002e+01 -2.014900e+02\n4 5959     -2.255000e+02 -4.597500e+02\n5 5959     6.989301e+02 -5.787100e+02\n6 5959     8.300171e-01 1.249100e+02\n7 5959     -3.934998e+01 2.012000e+02\n8 5959     1.781000e+02 4.710999e+01\n9 5959     3.398999e+01 1.859300e+02\n12 5959     2.210999e+01 1.786600e+02\n0 5960     7.450000e+02 7.920999e+01\n2 5960     6.736000e+02 1.305400e+02\n3 5960     5.305900e+02 -1.770500e+02\n7 5960     5.819301e+02 2.839600e+02\n9 5960     4.349600e+02 2.149800e+02\n10 5960     7.679900e+02 3.123300e+02\n12 5960     6.851000e+02 2.902200e+02\n0 5961     7.450000e+02 7.920999e+01\n2 5961     6.736000e+02 1.305400e+02\n3 5961     5.305900e+02 -1.770500e+02\n7 5961     5.819301e+02 2.839600e+02\n9 5961     4.349600e+02 2.149800e+02\n10 5961     7.679900e+02 3.123300e+02\n12 5961     6.851000e+02 2.902200e+02\n0 5962     7.587600e+02 7.821002e+01\n7 5962     5.955400e+02 2.855200e+02\n10 5962     7.843800e+02 3.126100e+02\n12 5962     7.013000e+02 2.938700e+02\n0 5963     1.270000e+02 7.678998e+01\n8 5963     2.367700e+02 5.563000e+01\n0 5964     -5.358002e+01 7.621997e+01\n6 5964     -1.501500e+02 7.546997e+01\n8 5964     6.033002e+01 5.450012e+00\n15 5964     -1.158500e+02 2.334400e+02\n0 5965     4.340002e+01 7.587000e+01\n5 5965     6.794000e+02 -5.831400e+02\n6 5965     -1.782001e+01 1.153600e+02\n7 5965     -5.573999e+01 1.954900e+02\n15 5965     1.396997e+01 2.466900e+02\n0 5966     8.178800e+02 7.595001e+01\n2 5966     7.463800e+02 1.607200e+02\n3 5966     5.984200e+02 -1.452700e+02\n7 5966     6.513400e+02 2.944600e+02\n12 5966     7.671801e+02 3.130700e+02\n0 5967     -9.883002e+01 7.525000e+01\n5 5967     4.684500e+02 -5.954900e+02\n6 5967     -2.423000e+02 4.354999e+01\n7 5967     -2.136200e+02 1.606200e+02\n10 5967     -2.164100e+02 2.188100e+02\n12 5967     -2.002400e+02 9.814001e+01\n15 5967     -1.743900e+02 2.254300e+02\n0 5968     6.236801e+02 7.576001e+01\n2 5968     5.464301e+02 6.707001e+01\n12 5968     5.461200e+02 2.405000e+02\n15 5968     8.316600e+02 3.276600e+02\n0 5969     7.848000e+02 7.463000e+01\n7 5969     6.205601e+02 2.869800e+02\n0 5970     3.833002e+01 7.420001e+01\n6 5970     -2.331000e+01 1.120400e+02\n10 5970     -5.688000e+01 2.313500e+02\n12 5970     -3.000000e+00 1.664200e+02\n15 5970     7.500000e+00 2.435000e+02\n0 5971     7.611000e+02 7.354999e+01\n3 5971     5.480400e+02 -1.737700e+02\n7 5971     5.980601e+02 2.816900e+02\n10 5971     7.869600e+02 3.078700e+02\n12 5971     7.049800e+02 2.902600e+02\n0 5972     7.611000e+02 7.354999e+01\n3 5972     5.480400e+02 -1.737700e+02\n7 5972     5.980601e+02 2.816900e+02\n12 5972     7.049800e+02 2.902600e+02\n0 5973     5.192200e+02 7.313000e+01\n6 5973     3.335500e+02 1.838300e+02\n10 5973     5.025400e+02 2.813800e+02\n12 5973     4.231500e+02 1.946300e+02\n0 5974     7.745000e+02 7.215002e+01\n2 5974     7.048700e+02 1.371900e+02\n7 5974     6.109100e+02 2.827000e+02\n10 5974     8.029399e+02 3.072300e+02\n0 5975     2.192600e+02 7.134998e+01\n7 5975     1.178300e+02 2.180600e+02\n15 5975     2.554700e+02 2.651100e+02\n0 5976     -3.946900e+02 7.096002e+01\n7 5976     -5.463600e+02 8.539001e+01\n0 5977     -3.946900e+02 7.096002e+01\n7 5977     -5.463600e+02 8.539001e+01\n0 5978     8.464301e+02 7.088000e+01\n2 5978     7.750200e+02 1.688100e+02\n7 5978     6.786300e+02 2.948200e+02\n9 5978     5.180900e+02 2.497500e+02\n12 5978     7.998300e+02 3.178800e+02\n0 5979     -2.494900e+02 7.047998e+01\n7 5979     -3.939000e+02 1.096700e+02\n13 5979     4.447998e+01 -2.084300e+02\n15 5979     -3.692000e+02 1.974800e+02\n0 5980     5.938101e+02 6.996997e+01\n9 5980     3.034500e+02 1.373700e+02\n15 5980     7.904200e+02 3.153600e+02\n0 5981     7.015800e+02 7.010999e+01\n2 5981     6.309800e+02 1.000700e+02\n3 5981     4.920800e+02 -2.074400e+02\n6 5981     5.580800e+02 2.530800e+02\n9 5981     3.996600e+02 1.878400e+02\n10 5981     7.165500e+02 2.971200e+02\n0 5982     7.639000e+02 6.845001e+01\n2 5982     6.959200e+02 1.299200e+02\n3 5982     5.519399e+02 -1.766000e+02\n9 5982     4.534500e+02 2.139400e+02\n0 5983     7.680300e+02 6.845001e+01\n2 5983     7.000800e+02 1.311200e+02\n3 5983     5.557100e+02 -1.748800e+02\n7 5983     6.054399e+02 2.780000e+02\n9 5983     4.568700e+02 2.158000e+02\n10 5983     7.959600e+02 3.023000e+02\n12 5983     7.138600e+02 2.873700e+02\n0 5984     8.129100e+02 6.765002e+01\n2 5984     7.439700e+02 1.506300e+02\n12 5984     7.633400e+02 3.031400e+02\n0 5985     5.158199e+02 6.707001e+01\n6 5985     3.306200e+02 1.753400e+02\n7 5985     3.578900e+02 2.274300e+02\n10 5985     4.988500e+02 2.740800e+02\n12 5985     4.200900e+02 1.863100e+02\n13 5985     7.262600e+02 -1.511500e+02\n15 5985     6.815900e+02 2.996300e+02\n0 5986     1.367500e+02 6.644000e+01\n6 5986     9.304999e+01 1.355800e+02\n15 5986     1.427100e+02 2.469000e+02\n0 5987     5.127200e+02 6.608002e+01\n7 5987     3.551700e+02 2.257800e+02\n13 5987     7.234399e+02 -1.524500e+02\n15 5987     6.773300e+02 2.979300e+02\n0 5988     6.809800e+02 6.619000e+01\n10 5988     6.930601e+02 2.906500e+02\n12 5988     6.160400e+02 2.515200e+02\n0 5989     -2.902300e+02 6.537000e+01\n7 5989     -4.349900e+02 9.832001e+01\n0 5990     6.865601e+02 6.539001e+01\n2 5990     6.172600e+02 8.814001e+01\n6 5990     5.424100e+02 2.424600e+02\n7 5990     5.273800e+02 2.596800e+02\n8 5990     5.663600e+02 4.059000e+01\n9 5990     3.888800e+02 1.771500e+02\n10 5990     6.993600e+02 2.898000e+02\n12 5990     6.222600e+02 2.525600e+02\n0 5991     -2.590200e+02 6.492999e+01\n7 5991     -4.028500e+02 1.032500e+02\n15 5991     -3.822000e+02 1.891600e+02\n0 5992     -2.590200e+02 6.492999e+01\n7 5992     -4.028500e+02 1.032500e+02\n15 5992     -3.822000e+02 1.891600e+02\n0 5993     8.734301e+02 6.431000e+01\n2 5993     8.029700e+02 1.746900e+02\n0 5994     7.060000e+02 6.345001e+01\n2 5994     6.381700e+02 9.590002e+01\n6 5994     5.657600e+02 2.478900e+02\n7 5994     5.464500e+02 2.614100e+02\n9 5994     4.063199e+02 1.843900e+02\n10 5994     7.226100e+02 2.898800e+02\n12 5994     6.451600e+02 2.577500e+02\n0 5995     8.803199e+02 6.339001e+01\n2 5995     8.086400e+02 1.767400e+02\n0 5996     1.251200e+02 6.250000e+01\n6 5996     8.185999e+01 1.279900e+02\n10 5996     4.539001e+01 2.269200e+02\n15 5996     1.265300e+02 2.394300e+02\n0 5997     6.679100e+02 6.195001e+01\n6 5997     5.208300e+02 2.310700e+02\n0 5998     2.124301e+02 6.160999e+01\n6 5998     1.676500e+02 1.500700e+02\n7 5998     1.139100e+02 2.075900e+02\n10 5998     1.466300e+02 2.344500e+02\n12 5998     1.983000e+02 1.971900e+02\n15 5998     2.469700e+02 2.502300e+02\n0 5999     7.040300e+02 6.140997e+01\n2 5999     6.369500e+02 9.334998e+01\n3 5999     4.974301e+02 -2.141200e+02\n6 5999     5.649301e+02 2.443800e+02\n7 5999     5.447400e+02 2.592100e+02\n8 5999     5.833300e+02 4.344000e+01\n9 5999     4.055100e+02 1.817800e+02\n12 5999     6.433000e+02 2.548200e+02\n0 6000     8.588600e+02 6.085999e+01\n2 6000     7.899600e+02 1.652200e+02\n0 6001     -4.734600e+02 6.040997e+01\n2 6001     -6.642900e+02 -2.408700e+02\n13 6001     -1.562400e+02 -2.315700e+02\n15 6001     -6.758000e+02 1.528500e+02\n0 6002     1.022100e+02 5.903998e+01\n2 6002     2.322400e+02 1.082400e+02\n7 6002     7.500000e+00 1.893900e+02\n10 6002     1.917999e+01 2.201200e+02\n0 6003     6.798000e+02 5.829999e+01\n3 6003     4.743800e+02 -2.296600e+02\n7 6003     5.217200e+02 2.515000e+02\n9 6003     3.849399e+02 1.680900e+02\n10 6003     6.919399e+02 2.808800e+02\n0 6004     5.319700e+02 5.813000e+01\n6 6004     3.538500e+02 1.722000e+02\n7 6004     3.756700e+02 2.219200e+02\n13 6004     7.445900e+02 -1.568500e+02\n15 6004     7.055000e+02 2.896000e+02\n0 6005     5.476500e+02 5.741998e+01\n7 6005     3.916000e+02 2.241500e+02\n0 6006     7.834800e+02 5.683002e+01\n7 6006     6.217300e+02 2.698600e+02\n10 6006     8.148199e+02 2.905300e+02\n0 6007     7.834800e+02 5.683002e+01\n3 6007     5.739399e+02 -1.778200e+02\n7 6007     6.217300e+02 2.698600e+02\n9 6007     4.736400e+02 2.131700e+02\n10 6007     8.148199e+02 2.905300e+02\n12 6007     7.345900e+02 2.805900e+02\n0 6008     6.984301e+02 5.669000e+01\n6 6008     5.579000e+02 2.370400e+02\n7 6008     5.398199e+02 2.535100e+02\n10 6008     7.143500e+02 2.808900e+02\n0 6009     6.984301e+02 5.669000e+01\n7 6009     5.398199e+02 2.535100e+02\n10 6009     7.143500e+02 2.808900e+02\n0 6010     4.916600e+02 5.603003e+01\n7 6010     3.352400e+02 2.116300e+02\n10 6010     4.719100e+02 2.585400e+02\n13 6010     7.022100e+02 -1.645400e+02\n15 6010     6.494500e+02 2.806100e+02\n0 6011     -1.508300e+02 5.582001e+01\n7 6011     -2.657500e+02 1.303600e+02\n0 6012     7.865800e+02 5.440997e+01\n7 6012     6.250900e+02 2.682500e+02\n10 6012     8.199500e+02 2.875500e+02\n0 6013     6.668101e+02 5.383002e+01\n2 6013     6.000699e+02 6.646997e+01\n6 6013     5.222200e+02 2.219300e+02\n7 6013     5.096000e+02 2.445300e+02\n8 6013     5.514100e+02 2.335999e+01\n9 6013     3.747500e+02 1.582000e+02\n10 6013     6.767900e+02 2.742800e+02\n0 6014     6.668101e+02 5.383002e+01\n6 6014     5.222200e+02 2.219300e+02\n8 6014     5.514100e+02 2.335999e+01\n10 6014     6.767900e+02 2.742800e+02\n0 6015     6.668101e+02 5.383002e+01\n6 6015     5.222200e+02 2.219300e+02\n7 6015     5.096000e+02 2.445300e+02\n8 6015     5.514100e+02 2.335999e+01\n9 6015     3.747500e+02 1.582000e+02\n10 6015     6.767900e+02 2.742800e+02\n13 6015     8.845699e+02 -1.414200e+02\n0 6016     7.200900e+02 5.382001e+01\n6 6016     5.860100e+02 2.429700e+02\n8 6016     5.995000e+02 4.404001e+01\n9 6016     4.210500e+02 1.829600e+02\n12 6016     6.646500e+02 2.528500e+02\n0 6017     8.021997e+01 5.176001e+01\n12 6017     5.684003e+01 1.558600e+02\n0 6018     6.854800e+02 5.189001e+01\n6 6018     5.446400e+02 2.273600e+02\n8 6018     5.686400e+02 2.889001e+01\n9 6018     3.913199e+02 1.655200e+02\n12 6018     6.242200e+02 2.371500e+02\n0 6019     7.014301e+02 5.146997e+01\n2 6019     6.371899e+02 8.201001e+01\n3 6019     4.982600e+02 -2.246800e+02\n6 6019     5.636801e+02 2.329500e+02\n7 6019     5.436500e+02 2.490700e+02\n8 6019     5.825800e+02 3.447000e+01\n9 6019     4.053600e+02 1.725800e+02\n10 6019     7.181899e+02 2.750500e+02\n12 6019     6.426200e+02 2.427400e+02\n0 6020     7.014301e+02 5.146997e+01\n12 6020     6.426200e+02 2.427400e+02\n0 6021     7.014301e+02 5.146997e+01\n2 6021     6.371899e+02 8.201001e+01\n3 6021     4.982600e+02 -2.246800e+02\n6 6021     5.636801e+02 2.329500e+02\n7 6021     5.436500e+02 2.490700e+02\n9 6021     4.053600e+02 1.725800e+02\n10 6021     7.181899e+02 2.750500e+02\n0 6022     -2.480700e+02 5.071997e+01\n6 6022     -5.473400e+02 -9.357001e+01\n0 6023     7.934900e+02 4.951001e+01\n3 6023     5.862800e+02 -1.795300e+02\n7 6023     6.328700e+02 2.645100e+02\n0 6024     7.125699e+02 4.903998e+01\n2 6024     6.490800e+02 8.415997e+01\n3 6024     5.092400e+02 -2.220800e+02\n0 6025     8.064500e+02 4.915997e+01\n3 6025     5.974700e+02 -1.738900e+02\n0 6026     8.064500e+02 4.915997e+01\n3 6026     5.974700e+02 -1.738900e+02\n0 6027     7.989900e+02 4.844000e+01\n7 6027     6.373101e+02 2.649700e+02\n9 6027     4.879600e+02 2.136200e+02\n12 6027     7.548199e+02 2.781500e+02\n0 6028     7.267000e+02 4.656000e+01\n2 6028     6.647700e+02 8.954999e+01\n7 6028     5.687300e+02 2.492200e+02\n9 6028     4.285000e+02 1.799100e+02\n10 6028     7.481899e+02 2.724100e+02\n12 6028     6.726500e+02 2.473700e+02\n0 6029     8.043000e+02 4.441998e+01\n7 6029     6.429100e+02 2.619500e+02\n0 6030     7.098700e+02 4.326001e+01\n2 6030     6.432700e+02 7.597998e+01\n8 6030     5.889399e+02 2.945001e+01\n10 6030     7.291801e+02 2.666000e+02\n12 6030     6.525601e+02 2.354900e+02\n0 6031     7.098700e+02 4.326001e+01\n6 6031     5.752600e+02 2.265600e+02\n7 6031     5.528700e+02 2.428200e+02\n8 6031     5.916100e+02 2.979001e+01\n10 6031     7.291801e+02 2.666000e+02\n0 6032     6.808199e+02 4.284003e+01\n2 6032     6.177300e+02 6.228003e+01\n6 6032     5.422900e+02 2.151800e+02\n10 6032     6.950400e+02 2.629300e+02\n12 6032     6.218900e+02 2.250400e+02\n0 6033     6.808199e+02 4.284003e+01\n2 6033     6.177300e+02 6.228003e+01\n3 6033     4.811600e+02 -2.438700e+02\n6 6033     5.422900e+02 2.151800e+02\n7 6033     5.248600e+02 2.367600e+02\n8 6033     5.667800e+02 1.941000e+01\n9 6033     3.903000e+02 1.558600e+02\n10 6033     6.950400e+02 2.629300e+02\n12 6033     6.218900e+02 2.250400e+02\n0 6034     7.275200e+02 4.215997e+01\n2 6034     6.671700e+02 8.623999e+01\n9 6034     4.299500e+02 1.768600e+02\n0 6035     -6.478003e+01 4.150000e+01\n3 6035     -5.456000e+01 -2.933600e+02\n4 6035     -2.382600e+02 -3.583900e+02\n6 6035     -1.499000e+02 3.194000e+01\n7 6035     -1.640800e+02 1.391900e+02\n8 6035     5.966998e+01 -2.576999e+01\n9 6035     -8.329999e+01 1.029200e+02\n10 6035     -1.732200e+02 1.829400e+02\n12 6035     -1.270500e+02 8.853998e+01\n15 6035     -1.264800e+02 1.845100e+02\n0 6036     6.253003e+01 4.162000e+01\n2 6036     1.991300e+02 8.290002e+01\n6 6036     2.221997e+01 8.628998e+01\n12 6036     3.989001e+01 1.397100e+02\n15 6036     4.417999e+01 2.027600e+02\n0 6037     7.303600e+02 4.154999e+01\n7 6037     5.728900e+02 2.453600e+02\n9 6037     4.327200e+02 1.772600e+02\n10 6037     7.531100e+02 2.667700e+02\n12 6037     6.783000e+02 2.434600e+02\n0 6038     7.303600e+02 4.154999e+01\n3 6038     5.294800e+02 -2.186300e+02\n7 6038     5.728900e+02 2.453600e+02\n9 6038     4.327200e+02 1.772600e+02\n10 6038     7.531100e+02 2.667700e+02\n12 6038     6.783000e+02 2.434600e+02\n0 6039     8.040200e+02 4.166998e+01\n7 6039     6.430000e+02 2.593400e+02\n0 6040     5.208400e+02 4.053998e+01\n10 6040     5.071801e+02 2.440800e+02\n13 6040     7.345100e+02 -1.743500e+02\n15 6040     6.919500e+02 2.636400e+02\n0 6041     -4.791500e+02 3.996997e+01\n7 6041     -6.288600e+02 3.988000e+01\n15 6041     -6.812500e+02 1.242700e+02\n0 6042     -4.791500e+02 3.996997e+01\n7 6042     -6.288600e+02 3.988000e+01\n13 6042     -1.568700e+02 -2.493100e+02\n15 6042     -6.812500e+02 1.242700e+02\n0 6043     8.447998e+01 4.016998e+01\n7 6043     -6.289978e+00 1.680000e+02\n10 6043     1.699829e-01 1.964500e+02\n15 6043     7.397998e+01 2.036800e+02\n0 6044     8.447998e+01 4.016998e+01\n2 6044     2.234399e+02 8.764001e+01\n6 6044     4.770001e+01 9.213000e+01\n7 6044     -6.289978e+00 1.680000e+02\n10 6044     1.699829e-01 1.964500e+02\n15 6044     7.397998e+01 2.036800e+02\n0 6045     5.019800e+02 4.015002e+01\n7 6045     3.478101e+02 1.982400e+02\n10 6045     4.854000e+02 2.414100e+02\n13 6045     7.145300e+02 -1.775300e+02\n15 6045     6.658400e+02 2.600300e+02\n0 6046     7.121000e+02 4.012000e+01\n2 6046     6.513800e+02 7.613000e+01\n3 6046     5.121899e+02 -2.300500e+02\n6 6046     5.791500e+02 2.246500e+02\n7 6046     5.554700e+02 2.403400e+02\n8 6046     5.946100e+02 2.950000e+01\n9 6046     4.175601e+02 1.684400e+02\n12 6046     6.576100e+02 2.335600e+02\n0 6047     7.121000e+02 4.012000e+01\n3 6047     5.121899e+02 -2.300500e+02\n6 6047     5.791500e+02 2.246500e+02\n7 6047     5.554700e+02 2.403400e+02\n8 6047     5.946100e+02 2.950000e+01\n9 6047     4.175601e+02 1.684400e+02\n12 6047     6.576100e+02 2.335600e+02\n0 6048     -7.550000e+01 3.885999e+01\n3 6048     -7.083002e+01 -3.041100e+02\n7 6048     -1.755800e+02 1.337300e+02\n13 6048     2.864800e+02 -1.994800e+02\n15 6048     -1.404000e+02 1.787700e+02\n0 6049     5.342100e+02 3.873999e+01\n6 6049     3.622800e+02 1.507000e+02\n0 6050     6.594700e+02 3.865997e+01\n6 6050     5.179900e+02 2.017800e+02\n0 6051     7.340800e+02 3.863000e+01\n3 6051     5.340699e+02 -2.200600e+02\n9 6051     4.367700e+02 1.764400e+02\n10 6051     7.576600e+02 2.635200e+02\n12 6051     6.830800e+02 2.418700e+02\n0 6052     -4.284998e+01 3.632001e+01\n6 6052     -1.132000e+02 3.784003e+01\n7 6052     -1.386800e+02 1.389800e+02\n8 6052     8.832001e+01 -1.870999e+01\n15 6052     -9.650000e+01 1.807400e+02\n0 6053     6.575900e+02 3.671997e+01\n2 6053     5.942400e+02 4.412000e+01\n3 6053     4.589200e+02 -2.629500e+02\n6 6053     5.153300e+02 1.993300e+02\n7 6053     5.028700e+02 2.262000e+02\n8 6053     5.465699e+02 4.959991e+00\n9 6053     3.706000e+02 1.393300e+02\n10 6053     6.675900e+02 2.532000e+02\n0 6054     1.154800e+02 3.552002e+01\n2 6054     2.569301e+02 9.133002e+01\n10 6054     3.690997e+01 1.942900e+02\n12 6054     1.041000e+02 1.487600e+02\n15 6054     1.167700e+02 2.015900e+02\n0 6055     5.852200e+02 3.553003e+01\n6 6055     4.272400e+02 1.685500e+02\n10 6055     5.826700e+02 2.445300e+02\n12 6055     5.116400e+02 1.790900e+02\n13 6055     8.021600e+02 -1.694100e+02\n15 6055     7.824000e+02 2.660200e+02\n0 6056     1.080000e+02 3.529999e+01\n6 6056     7.677002e+01 9.401001e+01\n10 6056     2.801001e+01 1.933400e+02\n12 6056     9.594000e+01 1.460500e+02\n15 6056     1.065700e+02 2.000900e+02\n0 6057     8.129800e+02 3.509998e+01\n7 6057     6.521801e+02 2.548200e+02\n0 6058     8.129800e+02 3.509998e+01\n7 6058     6.521801e+02 2.548200e+02\n0 6059     5.224800e+02 3.467999e+01\n6 6059     3.475400e+02 1.416300e+02\n0 6060     6.536300e+02 3.472998e+01\n3 6060     4.551100e+02 -2.671500e+02\n6 6060     5.107600e+02 1.972200e+02\n8 6060     5.431400e+02 2.350006e+00\n9 6060     3.673900e+02 1.362100e+02\n12 6060     5.916100e+02 2.076000e+02\n0 6061     7.633800e+02 3.471002e+01\n3 6061     5.633400e+02 -2.082900e+02\n7 6061     6.054399e+02 2.450800e+02\n9 6061     4.622400e+02 1.871500e+02\n10 6061     7.933700e+02 2.622900e+02\n12 6061     7.183900e+02 2.486900e+02\n0 6062     8.089600e+02 3.458002e+01\n9 6062     4.988700e+02 2.061100e+02\n0 6063     7.439100e+02 3.414001e+01\n2 6063     6.860100e+02 8.559003e+01\n9 6063     4.458101e+02 1.778900e+02\n10 6063     7.699900e+02 2.590700e+02\n0 6064     8.786000e+02 3.403998e+01\n2 6064     8.167400e+02 1.491000e+02\n7 6064     7.134000e+02 2.660100e+02\n9 6064     5.523199e+02 2.349500e+02\n0 6065     6.749399e+02 3.363000e+01\n2 6065     6.137200e+02 5.010999e+01\n3 6065     4.771700e+02 -2.562700e+02\n6 6065     5.367500e+02 2.027800e+02\n7 6065     5.201200e+02 2.267200e+02\n9 6065     3.865699e+02 1.452200e+02\n10 6065     6.881801e+02 2.515500e+02\n12 6065     6.169900e+02 2.127000e+02\n0 6066     3.909973e+00 3.290997e+01\n3 6066     4.434003e+01 -2.594100e+02\n7 6066     -8.784998e+01 1.457600e+02\n10 6066     -9.315002e+01 1.802500e+02\n15 6066     -3.369000e+01 1.824200e+02\n0 6067     7.125000e+02 3.309998e+01\n2 6067     6.534500e+02 6.901001e+01\n6 6067     5.817900e+02 2.175300e+02\n7 6067     5.567500e+02 2.336500e+02\n8 6067     5.970300e+02 2.420001e+01\n10 6067     7.325500e+02 2.546600e+02\n12 6067     6.605601e+02 2.275100e+02\n0 6068     7.125000e+02 3.309998e+01\n3 6068     5.148300e+02 -2.362100e+02\n6 6068     5.817900e+02 2.175300e+02\n7 6068     5.567500e+02 2.336500e+02\n8 6068     5.970300e+02 2.420001e+01\n12 6068     6.605601e+02 2.275100e+02\n0 6069     7.212400e+02 3.302002e+01\n10 6069     7.428600e+02 2.557100e+02\n12 6069     6.699800e+02 2.302800e+02\n0 6070     1.228000e+02 3.271997e+01\n2 6070     2.649301e+02 9.007001e+01\n7 6070     3.347998e+01 1.674400e+02\n10 6070     4.597998e+01 1.916800e+02\n13 6070     4.794600e+02 -1.827500e+02\n15 6070     1.267400e+02 1.988800e+02\n0 6071     6.522100e+02 3.190997e+01\n2 6071     5.899399e+02 3.638000e+01\n3 6071     4.549100e+02 -2.704700e+02\n6 6071     5.100100e+02 1.918700e+02\n7 6071     4.981100e+02 2.206200e+02\n9 6071     3.666100e+02 1.328700e+02\n10 6071     6.618101e+02 2.467200e+02\n12 6071     5.905400e+02 2.017700e+02\n0 6072     7.531500e+02 3.206000e+01\n2 6072     6.961100e+02 8.841998e+01\n3 6072     5.546000e+02 -2.162600e+02\n10 6072     7.806400e+02 2.575600e+02\n12 6072     7.067700e+02 2.411900e+02\n0 6073     7.645200e+02 3.178998e+01\n2 6073     7.077800e+02 9.365002e+01\n0 6074     7.645200e+02 3.178998e+01\n2 6074     7.077800e+02 9.365002e+01\n3 6074     5.657800e+02 -2.103700e+02\n7 6074     6.068600e+02 2.425200e+02\n9 6074     4.642000e+02 1.848900e+02\n10 6074     7.944200e+02 2.593800e+02\n0 6075     7.300200e+02 3.144000e+01\n2 6075     6.724100e+02 7.632001e+01\n3 6075     5.328600e+02 -2.290200e+02\n7 6075     5.737800e+02 2.352700e+02\n10 6075     7.536300e+02 2.548600e+02\n0 6076     6.547000e+02 3.132001e+01\n2 6076     5.927900e+02 3.722998e+01\n6 6076     5.133700e+02 1.923100e+02\n12 6076     5.939000e+02 2.025100e+02\n15 6076     8.803400e+02 2.704300e+02\n0 6077     6.758700e+02 3.096002e+01\n3 6077     4.796100e+02 -2.580700e+02\n6 6077     5.392100e+02 1.998700e+02\n7 6077     5.218101e+02 2.243900e+02\n9 6077     3.885100e+02 1.432800e+02\n10 6077     6.892300e+02 2.489400e+02\n0 6078     7.559500e+02 2.984998e+01\n3 6078     5.584200e+02 -2.163600e+02\n7 6078     5.992800e+02 2.390500e+02\n9 6078     4.579700e+02 1.796900e+02\n12 6078     7.106700e+02 2.403400e+02\n0 6079     -8.295001e+01 2.935999e+01\n7 6079     -1.826000e+02 1.222500e+02\n15 6079     -1.487900e+02 1.655000e+02\n0 6080     5.141400e+02 2.952002e+01\n7 6080     3.614800e+02 1.907800e+02\n10 6080     5.001400e+02 2.298800e+02\n12 6080     4.278900e+02 1.439000e+02\n13 6080     7.286100e+02 -1.850100e+02\n15 6080     6.838600e+02 2.472200e+02\n0 6081     1.825000e+01 2.870001e+01\n2 6081     1.546200e+02 5.487000e+01\n6 6081     -2.566998e+01 5.522998e+01\n7 6081     -7.201001e+01 1.446700e+02\n10 6081     -7.544000e+01 1.762300e+02\n12 6081     -1.007001e+01 1.101400e+02\n15 6081     -1.406000e+01 1.789600e+02\n0 6082     1.728300e+02 2.777002e+01\n13 6082     5.215000e+02 -1.831700e+02\n0 6083     1.728300e+02 2.777002e+01\n13 6083     5.215000e+02 -1.831700e+02\n0 6084     5.233400e+02 2.716998e+01\n6 6084     3.506100e+02 1.323900e+02\n7 6084     3.709301e+02 1.895900e+02\n10 6084     5.110100e+02 2.286600e+02\n12 6084     4.392700e+02 1.441000e+02\n15 6084     6.970300e+02 2.454800e+02\n0 6085     -3.767400e+02 2.637000e+01\n7 6085     -5.163900e+02 4.498999e+01\n10 6085     -5.385400e+02 1.333000e+02\n0 6086     -3.767400e+02 2.637000e+01\n7 6086     -5.163900e+02 4.498999e+01\n10 6086     -5.385400e+02 1.333000e+02\n0 6087     7.390500e+02 2.606000e+01\n7 6087     5.833199e+02 2.319900e+02\n0 6088     7.390500e+02 2.606000e+01\n3 6088     5.431400e+02 -2.286700e+02\n0 6089     7.424500e+02 2.596002e+01\n7 6089     5.864900e+02 2.325700e+02\n10 6089     7.689200e+02 2.499600e+02\n0 6090     7.091000e+02 2.506000e+01\n2 6090     6.524600e+02 5.902002e+01\n3 6090     5.142300e+02 -2.462200e+02\n6 6090     5.797400e+02 2.067600e+02\n7 6090     5.544800e+02 2.252000e+02\n8 6090     5.955200e+02 1.532999e+01\n9 6090     4.188700e+02 1.537500e+02\n10 6090     7.291500e+02 2.450900e+02\n12 6090     6.584700e+02 2.163600e+02\n0 6091     -3.261900e+02 2.446997e+01\n7 6091     -4.627200e+02 5.179999e+01\n10 6091     -4.777800e+02 1.364300e+02\n15 6091     -4.687300e+02 1.241100e+02\n0 6092     -1.106400e+02 2.419000e+01\n2 6092     -3.451001e+01 -2.913000e+01\n6 6092     -2.167700e+02 -1.153998e+01\n7 6092     -2.120600e+02 1.113600e+02\n8 6092     6.489990e+00 -6.398999e+01\n10 6092     -2.246000e+02 1.580200e+02\n12 6092     -1.878400e+02 4.604999e+01\n13 6092     2.496000e+02 -2.163700e+02\n0 6093     -5.421997e+01 2.435999e+01\n2 6093     5.809003e+01 1.354999e+01\n3 6093     -2.945001e+01 -3.002800e+02\n8 6093     7.903998e+01 -3.295001e+01\n9 6093     -6.198999e+01 9.735999e+01\n10 6093     -1.591700e+02 1.638200e+02\n15 6093     -1.104800e+02 1.626700e+02\n0 6094     7.064100e+02 2.429999e+01\n12 6094     6.556300e+02 2.142800e+02\n0 6095     7.064100e+02 2.429999e+01\n7 6095     5.509800e+02 2.244500e+02\n12 6095     6.556300e+02 2.142800e+02\n0 6096     8.313199e+02 2.465997e+01\n2 6096     7.749100e+02 1.188200e+02\n0 6097     8.165997e+01 2.396997e+01\n7 6097     -6.239990e+00 1.521100e+02\n0 6098     6.661700e+02 2.150000e+01\n8 6098     5.574399e+02 -3.950012e+00\n0 6099     1.003100e+02 2.044000e+01\n2 6099     2.489301e+02 7.395001e+01\n7 6099     1.316998e+01 1.516000e+02\n10 6099     2.073999e+01 1.750000e+02\n12 6099     9.223999e+01 1.276400e+02\n15 6099     9.801001e+01 1.788000e+02\n0 6100     7.007500e+02 2.059003e+01\n6 6100     5.709700e+02 1.991400e+02\n7 6100     5.470699e+02 2.193100e+02\n8 6100     5.887400e+02 8.329987e+00\n10 6100     7.194900e+02 2.390100e+02\n12 6100     6.501100e+02 2.092800e+02\n0 6101     7.085500e+02 2.072998e+01\n2 6101     6.531400e+02 5.440002e+01\n3 6101     5.155000e+02 -2.502100e+02\n6 6101     5.800400e+02 2.021000e+02\n8 6101     5.953900e+02 1.154001e+01\n10 6101     7.288600e+02 2.400500e+02\n12 6101     6.584100e+02 2.116300e+02\n0 6102     8.186801e+02 2.059998e+01\n2 6102     7.640400e+02 1.087100e+02\n3 6102     6.183900e+02 -1.938700e+02\n7 6102     6.595601e+02 2.421600e+02\n9 6102     5.103199e+02 1.993500e+02\n12 6102     7.831200e+02 2.541600e+02\n0 6103     6.526899e+02 2.010999e+01\n2 6103     5.938800e+02 2.484998e+01\n3 6103     4.592500e+02 -2.811300e+02\n7 6103     5.002100e+02 2.091100e+02\n9 6103     3.706500e+02 1.233000e+02\n13 6103     8.739700e+02 -1.739500e+02\n15 6103     8.788400e+02 2.546800e+02\n0 6104     -1.049800e+02 1.881000e+01\n6 6104     -2.051500e+02 -1.485999e+01\n7 6104     -2.047300e+02 1.067500e+02\n10 6104     -2.171300e+02 1.520200e+02\n12 6104     -1.779600e+02 4.220001e+01\n0 6105     7.298199e+02 1.821997e+01\n2 6105     6.761100e+02 6.307001e+01\n7 6105     5.753700e+02 2.227200e+02\n9 6105     4.383500e+02 1.580300e+02\n10 6105     7.542700e+02 2.394900e+02\n0 6106     7.505300e+02 1.866998e+01\n2 6106     6.971801e+02 7.404999e+01\n7 6106     5.953500e+02 2.274700e+02\n10 6106     7.786000e+02 2.419400e+02\n12 6106     7.070500e+02 2.260900e+02\n0 6107     1.631100e+02 1.803998e+01\n12 6107     1.635600e+02 1.410500e+02\n0 6108     7.420900e+02 1.797998e+01\n2 6108     6.880699e+02 6.940997e+01\n7 6108     5.872800e+02 2.250100e+02\n12 6108     6.985699e+02 2.219800e+02\n0 6109     6.990400e+02 1.654999e+01\n3 6109     5.077400e+02 -2.595900e+02\n6 6109     5.701500e+02 1.938500e+02\n7 6109     5.459000e+02 2.151500e+02\n9 6109     4.122100e+02 1.425400e+02\n10 6109     7.178400e+02 2.344200e+02\n0 6110     6.990400e+02 1.654999e+01\n3 6110     5.077400e+02 -2.595900e+02\n6 6110     5.701500e+02 1.938500e+02\n7 6110     5.459000e+02 2.151500e+02\n9 6110     4.122100e+02 1.425400e+02\n10 6110     7.178400e+02 2.344200e+02\n0 6111     6.047998e+01 1.572998e+01\n7 6111     -2.608002e+01 1.403500e+02\n0 6112     -5.991200e+02 1.579999e+01\n7 6112     -7.532600e+02 -5.599976e+00\n0 6113     -3.034003e+01 1.477002e+01\n2 6113     9.689001e+01 1.883002e+01\n7 6113     -1.212900e+02 1.211400e+02\n10 6113     -1.304600e+02 1.551100e+02\n13 6113     3.391400e+02 -2.132300e+02\n15 6113     -7.708002e+01 1.530300e+02\n0 6114     3.133101e+02 1.506000e+01\n7 6114     2.136200e+02 1.741300e+02\n0 6115     8.398800e+02 1.521997e+01\n3 6115     6.390699e+02 -1.880000e+02\n9 6115     5.282500e+02 2.044700e+02\n0 6116     8.398800e+02 1.521997e+01\n3 6116     6.390699e+02 -1.880000e+02\n0 6117     6.728700e+02 1.429999e+01\n2 6117     6.174200e+02 2.900000e+01\n3 6117     4.818900e+02 -2.763900e+02\n6 6117     5.399500e+02 1.806600e+02\n8 6117     5.655601e+02 -7.630005e+00\n9 6117     3.901899e+02 1.276900e+02\n10 6117     6.871400e+02 2.288900e+02\n0 6118     6.728700e+02 1.429999e+01\n3 6118     4.818900e+02 -2.763900e+02\n6 6118     5.399500e+02 1.806600e+02\n8 6118     5.655601e+02 -7.630005e+00\n10 6118     6.871400e+02 2.288900e+02\n0 6119     8.368800e+02 1.460999e+01\n7 6119     6.771899e+02 2.400800e+02\n0 6120     -3.175400e+02 1.391998e+01\n7 6120     -4.513000e+02 4.308002e+01\n10 6120     -4.655700e+02 1.250200e+02\n15 6120     -4.553400e+02 1.110800e+02\n0 6121     -3.175400e+02 1.391998e+01\n7 6121     -4.513000e+02 4.308002e+01\n10 6121     -4.655700e+02 1.250200e+02\n15 6121     -4.553400e+02 1.110800e+02\n0 6122     1.912200e+02 1.404999e+01\n6 6122     1.697900e+02 9.520001e+01\n10 6122     1.268200e+02 1.774800e+02\n0 6123     7.378199e+02 1.404999e+01\n7 6123     5.830400e+02 2.209600e+02\n12 6123     6.931200e+02 2.166800e+02\n0 6124     7.842800e+02 1.395001e+01\n7 6124     6.277100e+02 2.293700e+02\n0 6125     7.345500e+02 1.373999e+01\n2 6125     6.818600e+02 6.085999e+01\n0 6126     7.515601e+02 1.352002e+01\n2 6126     6.998000e+02 6.921997e+01\n7 6126     5.974000e+02 2.222600e+02\n12 6126     7.089301e+02 2.207300e+02\n0 6127     5.839001e+01 1.294000e+01\n7 6127     -2.752002e+01 1.367700e+02\n10 6127     -2.696997e+01 1.619500e+02\n15 6127     4.209998e+01 1.629700e+02\n0 6128     6.462100e+02 1.275000e+01\n8 6128     5.415000e+02 -1.891000e+01\n9 6128     3.658700e+02 1.138700e+02\n0 6129     -3.205100e+02 1.246002e+01\n7 6129     -4.532600e+02 4.156000e+01\n10 6129     -4.694100e+02 1.224000e+02\n0 6130     -3.669000e+02 1.178003e+01\n7 6130     -5.020400e+02 3.220001e+01\n15 6130     -5.225700e+02 1.011300e+02\n0 6131     -3.669000e+02 1.178003e+01\n7 6131     -5.020400e+02 3.220001e+01\n15 6131     -5.225700e+02 1.011300e+02\n0 6132     -3.289200e+02 1.132001e+01\n7 6132     -4.619600e+02 3.856000e+01\n13 6132     -1.226001e+01 -2.639500e+02\n15 6132     -4.704700e+02 1.057400e+02\n0 6133     -3.151300e+02 1.146997e+01\n7 6133     -4.477100e+02 4.152002e+01\n15 6133     -4.514800e+02 1.081500e+02\n0 6134     5.400100e+02 1.135999e+01\n6 6134     3.767700e+02 1.217400e+02\n10 6134     5.320601e+02 2.117800e+02\n13 6134     7.577700e+02 -1.982300e+02\n0 6135     7.129200e+02 1.164001e+01\n2 6135     6.602900e+02 4.778003e+01\n7 6135     5.599100e+02 2.130500e+02\n9 6135     4.256100e+02 1.443500e+02\n10 6135     7.344200e+02 2.292500e+02\n12 6135     6.659900e+02 2.020600e+02\n0 6136     7.543900e+02 1.037000e+01\n2 6136     7.032000e+02 6.783002e+01\n3 6136     5.629200e+02 -2.356400e+02\n7 6136     5.999700e+02 2.199300e+02\n9 6136     4.609399e+02 1.630500e+02\n10 6136     7.838101e+02 2.325800e+02\n12 6136     7.136100e+02 2.182700e+02\n0 6137     1.246500e+02 8.590027e+00\n7 6137     3.962000e+01 1.438900e+02\n0 6138     2.394000e+02 8.409973e+00\n2 6138     3.739399e+02 7.865002e+01\n6 6138     2.147500e+02 9.991998e+01\n7 6138     1.489100e+02 1.602600e+02\n10 6138     1.829700e+02 1.755500e+02\n12 6138     2.450200e+02 1.450800e+02\n15 6138     2.905400e+02 1.814200e+02\n0 6139     4.053000e+02 7.840027e+00\n7 6139     2.885900e+02 1.720500e+02\n15 6139     5.262500e+02 2.031500e+02\n0 6140     4.053000e+02 7.840027e+00\n7 6140     2.885900e+02 1.720500e+02\n15 6140     5.262500e+02 2.031500e+02\n0 6141     6.408400e+02 7.489990e+00\n7 6141     4.901500e+02 1.947000e+02\n0 6142     5.554399e+02 7.119995e+00\n6 6142     3.974900e+02 1.241400e+02\n7 6142     4.057100e+02 1.771500e+02\n12 6142     4.834100e+02 1.355400e+02\n13 6142     7.747600e+02 -1.996000e+02\n0 6143     8.511100e+02 7.119995e+00\n2 6143     7.993500e+02 1.115200e+02\n3 6143     6.517000e+02 -1.899400e+02\n7 6143     6.914301e+02 2.354200e+02\n0 6144     8.511100e+02 7.119995e+00\n2 6144     7.993500e+02 1.115200e+02\n3 6144     6.517000e+02 -1.899400e+02\n7 6144     6.914301e+02 2.354200e+02\n12 6144     8.221600e+02 2.524400e+02\n0 6145     8.480300e+02 6.309998e+00\n3 6145     6.495300e+02 -1.920700e+02\n7 6145     6.887400e+02 2.342800e+02\n0 6146     7.113700e+02 5.900024e+00\n2 6146     6.604900e+02 4.065997e+01\n3 6146     5.233900e+02 -2.634900e+02\n7 6146     5.592300e+02 2.069200e+02\n9 6146     4.260500e+02 1.388100e+02\n10 6146     7.335300e+02 2.230600e+02\n0 6147     6.953500e+02 5.630005e+00\n2 6147     6.433101e+02 3.244000e+01\n3 6147     5.072600e+02 -2.721900e+02\n6 6147     5.685400e+02 1.801400e+02\n7 6147     5.437100e+02 2.037400e+02\n8 6147     5.875200e+02 -6.079987e+00\n9 6147     4.119700e+02 1.313700e+02\n10 6147     7.146200e+02 2.208300e+02\n12 6147     6.471200e+02 1.894600e+02\n0 6148     6.814399e+02 4.700012e+00\n3 6148     4.935900e+02 -2.811000e+02\n8 6148     5.754200e+02 -1.241000e+01\n0 6149     7.285601e+02 2.520020e+00\n2 6149     6.791801e+02 4.656000e+01\n3 6149     5.413800e+02 -2.570200e+02\n7 6149     5.762400e+02 2.073700e+02\n10 6149     7.535800e+02 2.209100e+02\n0 6150     7.285601e+02 2.520020e+00\n2 6150     6.791801e+02 4.656000e+01\n3 6150     5.413800e+02 -2.570200e+02\n7 6150     5.762400e+02 2.073700e+02\n9 6150     4.418500e+02 1.445200e+02\n0 6151     7.501899e+02 2.020020e+00\n2 6151     7.015300e+02 5.728003e+01\n7 6151     5.970100e+02 2.115400e+02\n12 6151     7.111100e+02 2.081100e+02\n0 6152     -3.547100e+02 7.100220e-01\n2 6152     -4.673000e+02 -2.612000e+02\n15 6152     -5.039700e+02 8.817001e+01\n0 6153     6.764700e+02 2.999878e-01\n7 6153     5.256600e+02 1.951300e+02\n10 6153     6.924600e+02 2.129200e+02\n0 6154     7.269700e+02 -2.190002e+00\n12 6154     6.854000e+02 1.930900e+02\n0 6155     6.516600e+02 -3.539978e+00\n2 6155     5.998400e+02 -7.899780e-01\n6 6155     5.199100e+02 1.515300e+02\n7 6155     5.027700e+02 1.859700e+02\n8 6155     5.508000e+02 -3.173001e+01\n10 6155     6.638400e+02 2.057100e+02\n12 6155     6.000200e+02 1.617500e+02\n13 6155     8.767200e+02 -1.956700e+02\n0 6156     7.387900e+02 -4.650024e+00\n10 6156     7.669500e+02 2.133100e+02\n12 6156     6.994399e+02 1.959000e+02\n0 6157     7.275300e+02 -5.460022e+00\n3 6157     5.433000e+02 -2.650300e+02\n7 6157     5.764200e+02 1.994800e+02\n12 6157     6.875400e+02 1.899900e+02\n0 6158     6.935500e+02 -6.299988e+00\n2 6158     6.450200e+02 1.937000e+01\n6 6158     5.695900e+02 1.663700e+02\n7 6158     5.435500e+02 1.921100e+02\n10 6158     7.132400e+02 2.068900e+02\n12 6158     6.481500e+02 1.760200e+02\n0 6159     6.935500e+02 -6.299988e+00\n2 6159     6.450200e+02 1.937000e+01\n6 6159     5.695900e+02 1.663700e+02\n7 6159     5.435500e+02 1.921100e+02\n9 6159     4.137500e+02 1.205800e+02\n10 6159     7.132400e+02 2.068900e+02\n12 6159     6.481500e+02 1.760200e+02\n0 6160     7.249700e+02 -6.030029e+00\n2 6160     6.780900e+02 3.634003e+01\n7 6160     5.739399e+02 1.985200e+02\n12 6160     6.842000e+02 1.889000e+02\n0 6161     7.249700e+02 -6.030029e+00\n2 6161     6.780900e+02 3.634003e+01\n7 6161     5.739399e+02 1.985200e+02\n12 6161     6.842000e+02 1.889000e+02\n0 6162     1.824700e+02 -7.179993e+00\n12 6162     1.924900e+02 1.177600e+02\n15 6162     2.139399e+02 1.527400e+02\n0 6163     3.378003e+01 -7.570007e+00\n7 6163     -4.915002e+01 1.120800e+02\n0 6164     3.055300e+02 -8.359985e+00\n7 6164     2.109700e+02 1.508900e+02\n10 6164     2.608700e+02 1.632300e+02\n15 6164     3.847200e+02 1.672600e+02\n0 6165     6.564301e+02 -9.719971e+00\n6 6165     5.269600e+02 1.478400e+02\n0 6166     8.483500e+02 -1.014001e+01\n7 6166     6.908800e+02 2.186900e+02\n0 6167     4.171899e+02 -1.103998e+01\n6 6167     3.444800e+02 1.039000e+02\n7 6167     3.046500e+02 1.567000e+02\n10 6167     3.911100e+02 1.722600e+02\n15 6167     5.448800e+02 1.789600e+02\n0 6168     -6.638000e+01 -1.175000e+01\n2 6168     5.428998e+01 -3.176001e+01\n3 6168     -3.088000e+01 -3.434000e+02\n6 6168     -1.282800e+02 -2.825000e+01\n8 6168     7.491998e+01 -6.933002e+01\n12 6168     -1.102500e+02 2.784003e+01\n0 6169     9.544000e+01 -1.157001e+01\n7 6169     1.413000e+01 1.194800e+02\n0 6170     9.544000e+01 -1.157001e+01\n3 6170     1.623300e+02 -2.661900e+02\n7 6170     1.413000e+01 1.194800e+02\n9 6170     1.049800e+02 1.302600e+02\n15 6170     9.741998e+01 1.328900e+02\n0 6171     6.550699e+02 -1.215997e+01\n3 6171     4.703700e+02 -3.103900e+02\n6 6171     5.228300e+02 1.470500e+02\n8 6171     5.557600e+02 -3.757001e+01\n9 6171     3.810100e+02 9.685001e+01\n10 6171     6.684800e+02 1.962900e+02\n12 6171     6.028101e+02 1.567600e+02\n0 6172     9.990997e+01 -1.253003e+01\n2 6172     2.622200e+02 4.190002e+01\n4 6172     -2.940100e+02 -4.932000e+02\n7 6172     1.853998e+01 1.187100e+02\n9 6172     1.083500e+02 1.304500e+02\n13 6172     4.654000e+02 -2.232700e+02\n15 6172     1.009800e+02 1.334700e+02\n0 6173     7.285200e+02 -1.245001e+01\n7 6173     5.781000e+02 1.928400e+02\n12 6173     6.911899e+02 1.823000e+02\n0 6174     7.250500e+02 -1.337000e+01\n3 6174     5.434399e+02 -2.744100e+02\n7 6174     5.750400e+02 1.916700e+02\n9 6174     4.432500e+02 1.294800e+02\n0 6175     7.250500e+02 -1.337000e+01\n3 6175     5.434399e+02 -2.744100e+02\n7 6175     5.750400e+02 1.916700e+02\n9 6175     4.432500e+02 1.294800e+02\n0 6176     8.761100e+02 -1.365997e+01\n3 6176     6.805000e+02 -1.965700e+02\n0 6177     -3.869800e+02 -1.456000e+01\n7 6177     -5.173900e+02 3.489990e+00\n15 6177     -5.469200e+02 6.328998e+01\n0 6178     4.866998e+01 -1.426001e+01\n2 6178     2.077500e+02 2.537000e+01\n7 6178     -3.266998e+01 1.083400e+02\n9 6178     6.463000e+01 1.140900e+02\n15 6178     3.270001e+01 1.247200e+02\n0 6179     7.072100e+02 -1.759998e+01\n2 6179     6.621100e+02 1.540997e+01\n7 6179     5.585601e+02 1.837900e+02\n0 6180     -3.784400e+02 -2.038000e+01\n7 6180     -5.066600e+02 -1.039978e+00\n15 6180     -5.343700e+02 5.622998e+01\n0 6181     7.344200e+02 -2.322998e+01\n2 6181     6.929600e+02 2.359998e+01\n3 6181     5.555601e+02 -2.785400e+02\n7 6181     5.852100e+02 1.839100e+02\n10 6181     7.623000e+02 1.915100e+02\n0 6182     4.406000e+01 -2.425000e+01\n2 6182     2.068600e+02 1.389001e+01\n3 6182     1.158200e+02 -2.946400e+02\n7 6182     -3.566998e+01 9.731000e+01\n10 6182     -4.009998e+01 1.175200e+02\n15 6182     2.784003e+01 1.102300e+02\n0 6183     5.166998e+01 -2.425000e+01\n12 6183     4.909003e+01 6.213000e+01\n0 6184     2.300000e+02 -2.400000e+01\n7 6184     1.462300e+02 1.273600e+02\n10 6184     1.755000e+02 1.370000e+02\n0 6185     7.068101e+02 -2.387000e+01\n9 6185     4.306500e+02 1.123100e+02\n0 6186     6.663000e+02 -2.459003e+01\n2 6186     6.214100e+02 -1.371002e+01\n3 6186     4.882400e+02 -3.183200e+02\n6 6186     5.426500e+02 1.340600e+02\n7 6186     5.195100e+02 1.688400e+02\n8 6186     5.683800e+02 -4.339001e+01\n10 6186     6.825100e+02 1.828500e+02\n0 6187     6.992700e+02 -2.433002e+01\n6 6187     5.814399e+02 1.487800e+02\n7 6187     5.515100e+02 1.758800e+02\n9 6187     4.236200e+02 1.082000e+02\n12 6187     6.598700e+02 1.579800e+02\n0 6188     6.992700e+02 -2.433002e+01\n2 6188     6.567700e+02 4.030029e+00\n3 6188     5.221200e+02 -2.992200e+02\n6 6188     5.814399e+02 1.487800e+02\n7 6188     5.515100e+02 1.758800e+02\n9 6188     4.236200e+02 1.082000e+02\n10 6188     7.219900e+02 1.865100e+02\n12 6188     6.598700e+02 1.579800e+02\n0 6189     -1.118300e+02 -2.528003e+01\n3 6189     -7.827002e+01 -3.732000e+02\n7 6189     -2.005000e+02 6.389001e+01\n15 6189     -1.807600e+02 8.742999e+01\n0 6190     7.186200e+02 -2.675000e+01\n3 6190     5.417900e+02 -2.906500e+02\n9 6190     4.408700e+02 1.154000e+02\n10 6190     7.442000e+02 1.856200e+02\n0 6191     7.186200e+02 -2.675000e+01\n2 6191     6.776400e+02 1.190997e+01\n3 6191     5.417900e+02 -2.906500e+02\n7 6191     5.706300e+02 1.772400e+02\n9 6191     4.408700e+02 1.154000e+02\n10 6191     7.442000e+02 1.856200e+02\n12 6191     6.823800e+02 1.631600e+02\n0 6192     7.794700e+02 -2.654999e+01\n2 6192     7.403600e+02 4.365002e+01\n12 6192     7.513400e+02 1.875800e+02\n0 6193     -1.100000e+02 -2.796997e+01\n7 6193     -1.978100e+02 6.178003e+01\n13 6193     2.658800e+02 -2.590400e+02\n0 6194     6.740800e+02 -2.776001e+01\n2 6194     6.314399e+02 -1.317999e+01\n6 6194     5.527200e+02 1.343100e+02\n8 6194     5.758900e+02 -4.301999e+01\n9 6194     4.026400e+02 9.295001e+01\n10 6194     6.916899e+02 1.798700e+02\n12 6194     6.313700e+02 1.437600e+02\n0 6195     7.837700e+02 -2.773999e+01\n7 6195     6.326100e+02 1.895500e+02\n0 6196     -2.446997e+01 -2.846997e+01\n2 6196     1.224200e+02 -2.156000e+01\n6 6196     -5.981000e+01 -2.620001e+01\n7 6196     -1.065200e+02 7.913000e+01\n12 6196     -4.696002e+01 2.848999e+01\n0 6197     2.185100e+02 -2.837000e+01\n7 6197     1.359600e+02 1.215100e+02\n0 6198     7.065100e+02 -2.846002e+01\n2 6198     6.655900e+02 3.729980e+00\n10 6198     7.299700e+02 1.827800e+02\n12 6198     6.685800e+02 1.566300e+02\n0 6199     7.335200e+02 -2.831000e+01\n2 6199     6.936700e+02 1.752002e+01\n0 6200     7.725800e+02 -2.909003e+01\n3 6200     5.944600e+02 -2.633200e+02\n7 6200     6.225100e+02 1.859000e+02\n10 6200     8.082800e+02 1.883200e+02\n0 6201     7.725800e+02 -2.909003e+01\n3 6201     5.944600e+02 -2.633200e+02\n10 6201     8.082800e+02 1.883200e+02\n0 6202     7.877200e+02 -2.889001e+01\n2 6202     7.494600e+02 4.573999e+01\n3 6202     6.091500e+02 -2.551700e+02\n7 6202     6.370300e+02 1.889800e+02\n10 6202     8.266500e+02 1.905200e+02\n0 6203     7.110500e+02 -3.031000e+01\n9 6203     4.354000e+02 1.091400e+02\n0 6204     6.276100e+02 -3.115002e+01\n7 6204     4.824200e+02 1.549300e+02\n0 6205     8.469500e+02 -3.083002e+01\n2 6205     8.078600e+02 7.345001e+01\n0 6206     8.469500e+02 -3.083002e+01\n2 6206     8.078600e+02 7.345001e+01\n0 6207     -1.109100e+02 -3.158002e+01\n7 6207     -1.980000e+02 5.790997e+01\n15 6207     -1.787700e+02 7.900000e+01\n0 6208     2.360000e+02 -3.145001e+01\n6 6208     2.267500e+02 5.671997e+01\n15 6208     2.908000e+02 1.264600e+02\n0 6209     2.775300e+02 -3.156000e+01\n7 6209     1.894200e+02 1.243500e+02\n0 6210     7.257500e+02 -3.232001e+01\n3 6210     5.502200e+02 -2.919900e+02\n7 6210     5.781300e+02 1.733900e+02\n9 6210     4.489399e+02 1.138600e+02\n12 6210     6.921400e+02 1.595600e+02\n0 6211     7.870699e+02 -3.177002e+01\n2 6211     7.493400e+02 4.288000e+01\n0 6212     2.377300e+02 -3.340002e+01\n7 6212     1.544500e+02 1.192000e+02\n10 6212     1.847400e+02 1.269500e+02\n0 6213     7.538000e+02 -3.340997e+01\n2 6213     7.158600e+02 2.409998e+01\n3 6213     5.778500e+02 -2.775500e+02\n7 6213     6.050699e+02 1.781700e+02\n9 6213     4.728500e+02 1.269300e+02\n10 6213     7.862100e+02 1.821600e+02\n12 6213     7.246600e+02 1.704600e+02\n0 6214     7.148101e+02 -3.384003e+01\n2 6214     6.760200e+02 2.530029e+00\n7 6214     5.678400e+02 1.698000e+02\n9 6214     4.399600e+02 1.078000e+02\n10 6214     7.403600e+02 1.770500e+02\n12 6214     6.804301e+02 1.541600e+02\n0 6215     -1.088200e+02 -3.512000e+01\n7 6215     -1.950200e+02 5.490997e+01\n0 6216     6.714700e+02 -3.509998e+01\n2 6216     6.302800e+02 -2.195001e+01\n3 6216     4.984200e+02 -3.262500e+02\n0 6217     6.702500e+02 -3.729999e+01\n3 6217     4.967800e+02 -3.290300e+02\n7 6217     5.250400e+02 1.576100e+02\n8 6217     5.747000e+02 -5.239999e+01\n9 6217     4.013600e+02 8.297000e+01\n12 6217     6.297900e+02 1.320000e+02\n0 6218     7.524200e+02 -3.722998e+01\n7 6218     6.042300e+02 1.739500e+02\n10 6218     7.846700e+02 1.768500e+02\n0 6219     -1.933100e+02 -3.906000e+01\n7 6219     -2.838800e+02 3.367999e+01\n10 6219     -3.141000e+02 7.547998e+01\n15 6219     -2.882600e+02 5.744000e+01\n0 6220     8.799200e+02 -3.901001e+01\n7 6220     7.238400e+02 1.973000e+02\n0 6221     2.935000e+02 -3.952002e+01\n7 6221     2.061000e+02 1.194600e+02\n0 6222     2.384600e+02 -4.013000e+01\n7 6222     1.565100e+02 1.125200e+02\n10 6222     1.866700e+02 1.191500e+02\n15 6222     2.955900e+02 1.145400e+02\n0 6223     6.997400e+02 -4.000000e+01\n6 6223     5.863101e+02 1.314900e+02\n7 6223     5.540100e+02 1.608400e+02\n9 6223     4.279600e+02 9.489001e+01\n10 6223     7.229399e+02 1.685600e+02\n0 6224     8.380800e+02 -3.996997e+01\n2 6224     8.026100e+02 6.004999e+01\n3 6224     6.584800e+02 -2.390700e+02\n12 6224     8.204700e+02 1.964900e+02\n0 6225     8.707600e+02 -4.009003e+01\n7 6225     7.155800e+02 1.943700e+02\n0 6226     1.048200e+02 -4.140997e+01\n2 6226     2.780500e+02 1.446002e+01\n6 6226     1.023200e+02 9.530029e+00\n7 6226     2.865997e+01 9.123001e+01\n8 6226     2.569800e+02 -3.685999e+01\n15 6226     1.122800e+02 9.509000e+01\n0 6227     2.399900e+02 -4.241998e+01\n6 6227     2.342700e+02 4.585999e+01\n7 6227     1.578700e+02 1.103800e+02\n10 6227     1.891000e+02 1.168800e+02\n0 6228     8.341200e+02 -4.323999e+01\n3 6228     6.556400e+02 -2.439700e+02\n7 6228     6.823199e+02 1.844400e+02\n12 6228     8.166600e+02 1.910600e+02\n0 6229     2.380500e+02 -4.322998e+01\n7 6229     1.566300e+02 1.096000e+02\n0 6230     2.380500e+02 -4.322998e+01\n7 6230     1.566300e+02 1.096000e+02\n0 6231     -1.804000e+02 -4.471002e+01\n6 6231     -2.636400e+02 -1.135700e+02\n7 6231     -2.691800e+02 3.096002e+01\n12 6231     -2.460900e+02 -5.163000e+01\n13 6231     1.999500e+02 -2.807400e+02\n0 6232     1.942100e+02 -4.572998e+01\n7 6232     1.162600e+02 1.009900e+02\n0 6233     6.927900e+02 -4.577002e+01\n2 6233     6.559700e+02 -2.102002e+01\n3 6233     5.228700e+02 -3.238600e+02\n6 6233     5.798300e+02 1.226200e+02\n8 6233     5.970100e+02 -5.051001e+01\n9 6233     4.236801e+02 8.704001e+01\n10 6233     7.152800e+02 1.611300e+02\n12 6233     6.578400e+02 1.319300e+02\n0 6234     -3.280800e+02 -4.587000e+01\n2 6234     -4.011600e+02 -2.936300e+02\n7 6234     -4.474000e+02 -1.684003e+01\n15 6234     -4.618600e+02 2.870001e+01\n0 6235     8.344200e+02 -4.619000e+01\n3 6235     6.570699e+02 -2.471700e+02\n9 6235     5.416200e+02 1.534000e+02\n0 6236     4.199829e-01 -4.627002e+01\n7 6236     -7.753998e+01 6.653003e+01\n0 6237     6.037600e+02 -4.922998e+01\n8 6237     5.162600e+02 -9.032001e+01\n10 6237     6.114900e+02 1.480200e+02\n15 6237     8.185200e+02 1.510300e+02\n0 6238     6.037600e+02 -4.922998e+01\n8 6238     5.162600e+02 -9.032001e+01\n15 6238     8.185200e+02 1.510300e+02\n0 6239     7.190699e+02 -4.884998e+01\n3 6239     5.495699e+02 -3.127600e+02\n9 6239     4.471801e+02 9.664001e+01\n0 6240     1.077600e+02 -4.989001e+01\n6 6240     1.084000e+02 5.999756e-01\n10 6240     3.676001e+01 9.408002e+01\n12 6240     1.235200e+02 4.997998e+01\n15 6240     1.174000e+02 8.401999e+01\n0 6241     6.765200e+02 -5.025000e+01\n2 6241     6.394100e+02 -3.546002e+01\n6 6241     5.610601e+02 1.105800e+02\n9 6241     4.100900e+02 7.465997e+01\n10 6241     6.964500e+02 1.540900e+02\n12 6241     6.398600e+02 1.199700e+02\n0 6242     -1.001300e+02 -5.047998e+01\n7 6242     -1.821000e+02 4.190997e+01\n0 6243     -3.925000e+01 -5.092999e+01\n8 6243     1.183000e+02 -9.064001e+01\n10 6243     -1.335500e+02 7.796997e+01\n0 6244     3.656899e+02 -5.134003e+01\n7 6244     2.711300e+02 1.157400e+02\n0 6245     8.342500e+02 -5.212000e+01\n9 6245     5.432700e+02 1.485300e+02\n0 6246     8.342500e+02 -5.212000e+01\n12 6246     8.192100e+02 1.818500e+02\n0 6247     -1.952700e+02 -5.292999e+01\n7 6247     -2.836400e+02 1.915002e+01\n10 6247     -3.150500e+02 5.821997e+01\n15 6247     -2.893700e+02 3.796997e+01\n0 6248     6.770800e+02 -5.295001e+01\n2 6248     6.418000e+02 -3.806000e+01\n3 6248     5.097200e+02 -3.410000e+02\n6 6248     5.633800e+02 1.072700e+02\n8 6248     5.848300e+02 -6.371002e+01\n12 6248     6.416500e+02 1.164400e+02\n0 6249     6.770800e+02 -5.295001e+01\n10 6249     6.976200e+02 1.510900e+02\n12 6249     6.416500e+02 1.164400e+02\n0 6250     3.360200e+02 -5.444000e+01\n7 6250     2.442900e+02 1.084800e+02\n15 6250     4.343000e+02 1.084400e+02\n0 6251     -3.787400e+02 -5.540997e+01\n2 6251     -4.602800e+02 -3.156100e+02\n7 6251     -4.983600e+02 -3.497998e+01\n12 6251     -5.554500e+02 -1.834400e+02\n15 6251     -5.302300e+02 8.799988e+00\n0 6252     -3.600100e+02 -5.496002e+01\n7 6252     -4.790100e+02 -3.162000e+01\n15 6252     -5.048000e+02 1.165997e+01\n0 6253     7.985100e+02 -5.578998e+01\n2 6253     7.678600e+02 2.453998e+01\n7 6253     6.504500e+02 1.656700e+02\n9 6253     5.153800e+02 1.292800e+02\n12 6253     7.807600e+02 1.630100e+02\n0 6254     3.510800e+02 -5.694000e+01\n7 6254     2.589000e+02 1.085000e+02\n12 6254     3.674600e+02 8.467999e+01\n15 6254     4.551801e+02 1.069800e+02\n0 6255     1.664000e+02 -5.765002e+01\n6 6255     1.710400e+02 9.950012e+00\n10 6255     1.052800e+02 9.164001e+01\n15 6255     1.980900e+02 8.176999e+01\n0 6256     7.043900e+02 -5.776001e+01\n7 6256     5.608900e+02 1.446100e+02\n0 6257     8.637400e+02 -5.904999e+01\n7 6257     7.118700e+02 1.754400e+02\n0 6258     -1.776100e+02 -5.928003e+01\n6 6258     -2.497100e+02 -1.271700e+02\n7 6258     -2.627200e+02 1.732001e+01\n10 6258     -2.935200e+02 5.358002e+01\n12 6258     -2.355900e+02 -6.541998e+01\n13 6258     2.066700e+02 -2.925900e+02\n15 6258     -2.651000e+02 3.217999e+01\n0 6259     7.911200e+02 -5.997998e+01\n3 6259     6.221600e+02 -2.826400e+02\n0 6260     -1.637000e+01 -6.119000e+01\n2 6260     1.450300e+02 -5.340002e+01\n7 6260     -9.266998e+01 4.790997e+01\n10 6260     -1.056100e+02 6.820001e+01\n15 6260     -4.803998e+01 5.157001e+01\n0 6261     -1.637000e+01 -6.119000e+01\n2 6261     1.450300e+02 -5.340002e+01\n7 6261     -9.266998e+01 4.790997e+01\n13 6261     3.618300e+02 -2.775700e+02\n0 6262     7.149700e+02 -6.082001e+01\n3 6262     5.500500e+02 -3.265500e+02\n7 6262     5.716300e+02 1.439500e+02\n9 6262     4.476500e+02 8.510001e+01\n0 6263     7.149700e+02 -6.082001e+01\n3 6263     5.500500e+02 -3.265500e+02\n7 6263     5.716300e+02 1.439500e+02\n12 6263     6.871801e+02 1.241100e+02\n0 6264     -1.788800e+02 -6.212000e+01\n2 6264     -6.588000e+01 -1.244700e+02\n3 6264     -1.429100e+02 -4.366200e+02\n6 6264     -2.514100e+02 -1.312200e+02\n7 6264     -2.636500e+02 1.414001e+01\n8 6264     -2.410999e+01 -1.439800e+02\n12 6264     -2.370100e+02 -6.934998e+01\n15 6264     -2.661100e+02 2.812000e+01\n0 6265     7.025900e+02 -6.188000e+01\n2 6265     6.715601e+02 -3.257001e+01\n7 6265     5.602900e+02 1.406200e+02\n9 6265     4.375100e+02 7.796002e+01\n12 6265     6.735699e+02 1.182500e+02\n0 6266     -2.290002e+01 -6.300000e+01\n2 6266     1.359200e+02 -5.933002e+01\n3 6266     5.087000e+01 -3.672000e+02\n7 6266     -9.927002e+01 4.453998e+01\n8 6266     1.393200e+02 -9.492999e+01\n10 6266     -1.131000e+02 6.554999e+01\n13 6266     3.556500e+02 -2.800400e+02\n15 6266     -5.648999e+01 4.840997e+01\n0 6267     7.136801e+02 -6.387000e+01\n7 6267     5.708199e+02 1.408200e+02\n10 6267     7.413700e+02 1.423300e+02\n0 6268     7.136801e+02 -6.387000e+01\n7 6268     5.708199e+02 1.408200e+02\n9 6268     4.471000e+02 8.194000e+01\n10 6268     7.413700e+02 1.423300e+02\n0 6269     7.136801e+02 -6.387000e+01\n2 6269     6.833400e+02 -2.815997e+01\n7 6269     5.708199e+02 1.408200e+02\n9 6269     4.471000e+02 8.194000e+01\n10 6269     7.413700e+02 1.423300e+02\n12 6269     6.864600e+02 1.207700e+02\n0 6270     7.095900e+02 -6.697998e+01\n2 6270     6.800699e+02 -3.401001e+01\n7 6270     5.671500e+02 1.370900e+02\n0 6271     -7.109985e+00 -6.790002e+01\n2 6271     1.589000e+02 -5.642999e+01\n10 6271     -9.397998e+01 6.175000e+01\n0 6272     -1.233002e+01 -7.135999e+01\n2 6272     1.522800e+02 -6.281000e+01\n3 6272     6.665997e+01 -3.704500e+02\n6 6272     -2.937000e+01 -7.165997e+01\n7 6272     -8.691998e+01 3.851001e+01\n10 6272     -9.979999e+01 5.672998e+01\n15 6272     -4.142999e+01 3.854999e+01\n0 6273     6.719200e+02 -7.135999e+01\n9 6273     4.132000e+02 5.404999e+01\n10 6273     6.927900e+02 1.288100e+02\n0 6274     2.908101e+02 -7.182001e+01\n6 6274     2.804800e+02 2.157001e+01\n10 6274     2.507200e+02 8.800000e+01\n12 6274     3.160100e+02 5.978998e+01\n13 6274     6.245601e+02 -2.637700e+02\n15 6274     3.730900e+02 7.859003e+01\n0 6275     7.760000e+02 -7.228998e+01\n7 6275     6.313900e+02 1.452300e+02\n0 6276     1.970100e+02 -7.359998e+01\n7 6276     1.230100e+02 7.367999e+01\n0 6277     4.153600e+02 -7.460999e+01\n7 6277     3.190699e+02 9.889001e+01\n15 6277     5.480900e+02 9.129001e+01\n0 6278     -1.680600e+02 -7.515997e+01\n7 6278     -2.486000e+02 3.809998e+00\n15 6278     -2.502200e+02 1.203003e+01\n0 6279     6.981899e+02 -7.559998e+01\n2 6279     6.702800e+02 -4.954999e+01\n3 6279     5.386801e+02 -3.511000e+02\n0 6280     9.012000e+01 -7.598999e+01\n8 6280     2.529800e+02 -7.102002e+01\n10 6280     1.860999e+01 6.233002e+01\n15 6280     9.708002e+01 4.609998e+01\n0 6281     -4.208200e+02 -7.790002e+01\n2 6281     -5.009100e+02 -3.479700e+02\n7 6281     -5.372000e+02 -6.519000e+01\n10 6281     -5.778000e+02 6.289978e+00\n13 6281     -7.510999e+01 -3.470000e+02\n0 6282     7.133400e+02 -7.809998e+01\n2 6282     6.870800e+02 -4.363000e+01\n7 6282     5.721801e+02 1.271500e+02\n9 6282     4.501000e+02 6.985999e+01\n10 6282     7.418800e+02 1.257500e+02\n0 6283     -1.750900e+02 -8.009998e+01\n2 6283     -5.858002e+01 -1.481000e+02\n3 6283     -1.360200e+02 -4.598300e+02\n4 6283     -3.057500e+02 -2.724300e+02\n6 6283     -2.433200e+02 -1.534600e+02\n8 6283     -1.846997e+01 -1.622100e+02\n9 6283     -1.497500e+02 -4.217999e+01\n12 6283     -2.284900e+02 -9.148999e+01\n15 6283     -2.583200e+02 4.799988e+00\n0 6284     7.772900e+02 -8.184998e+01\n2 6284     7.547400e+02 -1.196002e+01\n7 6284     6.341400e+02 1.370700e+02\n12 6284     7.638000e+02 1.273500e+02\n0 6285     7.480200e+02 -8.248999e+01\n7 6285     6.061000e+02 1.301200e+02\n9 6285     4.814100e+02 8.354001e+01\n0 6286     3.883002e+01 -8.396002e+01\n2 6286     2.205800e+02 -5.356000e+01\n3 6286     1.318500e+02 -3.589100e+02\n6 6286     4.000000e+01 -6.353998e+01\n7 6286     -3.121002e+01 3.621002e+01\n8 6286     2.073000e+02 -9.139001e+01\n10 6286     -3.925000e+01 4.770001e+01\n12 6286     5.077002e+01 -1.259003e+01\n13 6286     4.177400e+02 -2.910800e+02\n0 6287     3.883002e+01 -8.396002e+01\n4 6287     -3.359300e+02 -4.410000e+02\n7 6287     -3.121002e+01 3.621002e+01\n8 6287     2.073000e+02 -9.139001e+01\n9 6287     7.796997e+01 4.969000e+01\n0 6288     2.613800e+02 -8.452002e+01\n7 6288     1.848800e+02 7.328998e+01\n0 6289     6.458400e+02 -8.440002e+01\n7 6289     5.074100e+02 1.070800e+02\n0 6290     -8.679999e+01 -8.515997e+01\n2 6290     7.117999e+01 -1.023900e+02\n13 6290     3.000900e+02 -3.051500e+02\n15 6290     -1.396800e+02 9.859985e+00\n0 6291     5.875000e+01 -8.664001e+01\n9 6291     9.740002e+01 5.378998e+01\n0 6292     -4.131100e+02 -8.846997e+01\n7 6292     -5.265100e+02 -7.400000e+01\n10 6292     -5.672600e+02 -5.599976e+00\n15 6292     -5.731400e+02 -4.070001e+01\n0 6293     -4.131100e+02 -8.846997e+01\n7 6293     -5.265100e+02 -7.400000e+01\n10 6293     -5.672600e+02 -5.599976e+00\n15 6293     -5.731400e+02 -4.070001e+01\n0 6294     -1.535700e+02 -8.916998e+01\n6 6294     -1.990500e+02 -1.487100e+02\n7 6294     -2.302400e+02 -6.890015e+00\n12 6294     -1.911400e+02 -8.865997e+01\n0 6295     6.598800e+02 -8.965002e+01\n2 6295     6.334200e+02 -8.566998e+01\n6 6295     5.528199e+02 5.942999e+01\n9 6295     4.072300e+02 3.227002e+01\n0 6296     1.056700e+02 -9.014001e+01\n3 6296     2.005800e+02 -3.430000e+02\n6 6296     1.173900e+02 -4.646002e+01\n8 6296     2.684900e+02 -8.133002e+01\n10 6296     3.808002e+01 4.759998e+01\n15 6296     1.199600e+02 2.897998e+01\n0 6297     1.849399e+02 -8.990002e+01\n3 6297     2.668800e+02 -3.271000e+02\n6 6297     1.982600e+02 -2.127002e+01\n7 6297     1.139700e+02 5.567999e+01\n8 6297     3.306700e+02 -6.853998e+01\n12 6297     2.193199e+02 2.271002e+01\n0 6298     6.964600e+02 -9.003998e+01\n2 6298     6.732500e+02 -6.501001e+01\n12 6298     6.736600e+02 8.391998e+01\n0 6299     1.613400e+02 -9.319000e+01\n6 6299     1.755800e+02 -3.167999e+01\n10 6299     1.028200e+02 5.045001e+01\n15 6299     1.963000e+02 3.246997e+01\n0 6300     -6.484998e+01 -9.364001e+01\n2 6300     1.058000e+02 -9.908002e+01\n7 6300     -1.353800e+02 6.950012e+00\n10 6300     -1.585700e+02 2.532001e+01\n13 6300     3.239100e+02 -3.097100e+02\n15 6300     -1.092600e+02 1.020020e+00\n0 6301     3.803800e+02 -9.346997e+01\n7 6301     2.912500e+02 7.671997e+01\n0 6302     -2.709998e+01 -9.514001e+01\n10 6302     -1.152200e+02 2.827002e+01\n12 6302     -2.659998e+01 -4.782001e+01\n0 6303     -2.709998e+01 -9.514001e+01\n12 6303     -2.659998e+01 -4.782001e+01\n0 6304     8.289800e+02 -9.507001e+01\n7 6304     6.838101e+02 1.348600e+02\n0 6305     -6.198999e+01 -9.559003e+01\n7 6305     -1.320800e+02 5.739990e+00\n15 6305     -1.051200e+02 -9.500122e-01\n0 6306     1.565601e+02 -9.689001e+01\n6 6306     1.718900e+02 -3.771002e+01\n7 6306     8.777002e+01 4.423999e+01\n12 6306     1.899301e+02 6.859985e+00\n15 6306     1.905500e+02 2.671997e+01\n0 6307     6.623800e+02 -9.689001e+01\n7 6307     5.253800e+02 9.839001e+01\n10 6307     6.838600e+02 9.863000e+01\n12 6307     6.358800e+02 6.192999e+01\n0 6308     6.650300e+02 -9.726001e+01\n6 6308     5.608900e+02 5.320001e+01\n7 6308     5.278600e+02 9.894000e+01\n0 6309     -1.411600e+02 -9.759998e+01\n7 6309     -2.153200e+02 -1.277002e+01\n0 6310     -1.685700e+02 -9.853998e+01\n4 6310     -3.195800e+02 -2.755400e+02\n10 6310     -2.782800e+02 8.840027e+00\n15 6310     -2.466900e+02 -1.985999e+01\n0 6311     3.824600e+02 -9.862000e+01\n7 6311     2.945000e+02 7.244000e+01\n15 6311     5.041899e+02 5.432001e+01\n0 6312     6.926000e+02 -9.962000e+01\n2 6312     6.716700e+02 -7.720001e+01\n0 6313     4.233400e+02 -1.003700e+02\n7 6313     3.328900e+02 7.687000e+01\n0 6314     8.354100e+02 -1.032700e+02\n2 6314     8.190699e+02 -3.489990e+00\n9 6314     5.576801e+02 1.079800e+02\n0 6315     -1.486100e+02 -1.045600e+02\n6 6315     -1.809500e+02 -1.624600e+02\n7 6315     -2.210200e+02 -2.050000e+01\n0 6316     3.144301e+02 -1.052400e+02\n6 6316     3.200000e+02 -5.489990e+00\n0 6317     1.383199e+02 -1.053700e+02\n3 6317     2.342200e+02 -3.519800e+02\n10 6317     7.792999e+01 3.347998e+01\n0 6318     -4.759998e+01 -1.061100e+02\n2 6318     1.331200e+02 -1.041600e+02\n3 6318     5.187000e+01 -4.101000e+02\n7 6318     -1.151200e+02 -1.890015e+00\n10 6318     -1.372400e+02 1.314001e+01\n15 6318     -8.465997e+01 -1.323999e+01\n0 6319     -4.759998e+01 -1.061100e+02\n2 6319     1.331200e+02 -1.041600e+02\n3 6319     5.187000e+01 -4.101000e+02\n6 6319     -5.217999e+01 -1.213200e+02\n7 6319     -1.151200e+02 -1.890015e+00\n8 6319     1.342500e+02 -1.333600e+02\n12 6319     -4.732001e+01 -6.738000e+01\n15 6319     -8.465997e+01 -1.323999e+01\n0 6320     2.373700e+02 -1.061200e+02\n7 6320     1.652700e+02 4.690997e+01\n10 6320     1.923500e+02 4.331000e+01\n15 6320     3.029700e+02 2.497998e+01\n0 6321     1.107001e+01 -1.079600e+02\n7 6321     -5.515002e+01 7.570007e+00\n0 6322     -3.201001e+01 -1.085700e+02\n7 6322     -9.804999e+01 -8.200073e-01\n15 6322     -6.402002e+01 -1.471997e+01\n0 6323     7.009800e+02 -1.096800e+02\n2 6323     6.839500e+02 -8.351001e+01\n9 6323     4.485699e+02 3.646997e+01\n0 6324     7.319200e+02 -1.113700e+02\n2 6324     7.172000e+02 -6.790002e+01\n0 6325     7.319200e+02 -1.113700e+02\n2 6325     7.172000e+02 -6.790002e+01\n9 6325     4.765400e+02 5.035999e+01\n10 6325     7.663700e+02 8.947998e+01\n12 6325     7.204700e+02 7.425000e+01\n0 6326     1.834700e+02 -1.120600e+02\n2 6326     3.704900e+02 -5.017999e+01\n6 6326     2.017000e+02 -4.776001e+01\n7 6326     1.155000e+02 3.296997e+01\n8 6326     3.337600e+02 -9.015997e+01\n0 6327     -4.795001e+01 -1.125400e+02\n3 6327     5.276001e+01 -4.182500e+02\n6 6327     -5.122998e+01 -1.292900e+02\n7 6327     -1.146500e+02 -8.479980e+00\n10 6327     -1.369800e+02 5.549988e+00\n12 6327     -4.622998e+01 -7.563000e+01\n13 6327     3.417000e+02 -3.245900e+02\n15 6327     -8.414001e+01 -2.197998e+01\n0 6328     3.423199e+02 -1.123800e+02\n7 6328     2.620100e+02 5.478003e+01\n0 6329     8.517200e+02 -1.138600e+02\n7 6329     7.076600e+02 1.212400e+02\n0 6330     8.801200e+02 -1.146700e+02\n7 6330     7.372800e+02 1.310300e+02\n9 6330     6.085500e+02 1.378200e+02\n0 6331     7.165997e+01 -1.152000e+02\n2 6331     2.653199e+02 -7.872998e+01\n7 6331     6.849976e+00 1.071997e+01\n13 6331     4.502800e+02 -3.163900e+02\n15 6331     7.770001e+01 -9.559998e+00\n0 6332     -1.266600e+02 -1.168200e+02\n7 6332     -1.954000e+02 -2.857001e+01\n10 6332     -2.274600e+02 -7.989990e+00\n0 6333     -1.587000e+01 -1.184600e+02\n7 6333     -7.935999e+01 -7.219971e+00\n15 6333     -4.071002e+01 -2.597998e+01\n0 6334     -1.587000e+01 -1.184600e+02\n7 6334     -7.935999e+01 -7.219971e+00\n15 6334     -4.071002e+01 -2.597998e+01\n0 6335     4.067700e+02 -1.194000e+02\n7 6335     3.225601e+02 5.728003e+01\n0 6336     -1.164500e+02 -1.206700e+02\n7 6336     -1.839700e+02 -3.025000e+01\n10 6336     -2.153200e+02 -1.121997e+01\n12 6336     -1.299300e+02 -1.096300e+02\n15 6336     -1.750400e+02 -4.220001e+01\n0 6337     -1.132000e+02 -1.213500e+02\n7 6337     -1.810300e+02 -3.046002e+01\n10 6337     -2.115900e+02 -1.175000e+01\n15 6337     -1.708300e+02 -4.279999e+01\n0 6338     2.234800e+02 -1.218200e+02\n7 6338     1.550000e+02 2.933002e+01\n15 6338     2.853900e+02 1.460022e+00\n0 6339     7.484800e+02 -1.221400e+02\n2 6339     7.371300e+02 -6.948999e+01\n7 6339     6.119399e+02 9.226999e+01\n0 6340     -2.962100e+02 -1.232600e+02\n2 6340     -3.064600e+02 -3.509800e+02\n8 6340     -2.068100e+02 -3.103100e+02\n0 6341     8.179399e+02 -1.241800e+02\n2 6341     8.085601e+02 -3.357001e+01\n7 6341     6.776400e+02 1.045500e+02\n0 6342     -4.064100e+02 -1.259500e+02\n7 6342     -5.102600e+02 -1.092000e+02\n15 6342     -5.592100e+02 -9.040997e+01\n0 6343     -1.515900e+02 -1.258400e+02\n7 6343     -2.181900e+02 -4.162000e+01\n10 6343     -2.554500e+02 -2.139001e+01\n15 6343     -2.218200e+02 -5.416998e+01\n0 6344     7.272400e+02 -1.267000e+02\n7 6344     5.919800e+02 8.334000e+01\n0 6345     4.081899e+02 -1.275400e+02\n7 6345     3.256500e+02 5.001001e+01\n0 6346     1.502300e+02 -1.279700e+02\n7 6346     8.603003e+01 1.182001e+01\n10 6346     9.348999e+01 8.669983e+00\n15 6346     1.854600e+02 -1.633002e+01\n0 6347     8.761400e+02 -1.292400e+02\n9 6347     6.094200e+02 1.222200e+02\n0 6348     8.794500e+02 -1.290400e+02\n7 6348     7.380200e+02 1.167500e+02\n0 6349     7.644301e+02 -1.305000e+02\n2 6349     7.569301e+02 -6.920001e+01\n12 6349     7.617500e+02 6.687000e+01\n0 6350     -7.735999e+01 -1.308800e+02\n7 6350     -1.422400e+02 -3.306000e+01\n10 6350     -1.690600e+02 -1.871002e+01\n12 6350     -7.844000e+01 -1.089200e+02\n15 6350     -1.211100e+02 -5.072998e+01\n0 6351     7.371997e+01 -1.309000e+02\n6 6351     9.854999e+01 -1.024900e+02\n7 6351     1.266998e+01 -3.460022e+00\n12 6351     1.079400e+02 -5.496002e+01\n15 6351     8.201001e+01 -3.035999e+01\n0 6352     7.493800e+02 -1.336300e+02\n2 6352     7.422400e+02 -8.076001e+01\n9 6352     4.968900e+02 4.076001e+01\n12 6352     7.455000e+02 5.734998e+01\n0 6353     3.841801e+02 -1.341500e+02\n6 6353     3.914300e+02 -1.957001e+01\n12 6353     4.323400e+02 1.203998e+01\n0 6354     -1.229100e+02 -1.371400e+02\n7 6354     -1.861500e+02 -4.712000e+01\n15 6354     -1.818700e+02 -6.545001e+01\n0 6355     -4.690002e+00 -1.368100e+02\n2 6355     1.996500e+02 -1.164200e+02\n6 6355     1.479999e+01 -1.372600e+02\n7 6355     -6.491998e+01 -2.356000e+01\n12 6355     1.803998e+01 -8.684003e+01\n0 6356     -4.690002e+00 -1.368100e+02\n2 6356     1.996500e+02 -1.164200e+02\n6 6356     1.479999e+01 -1.372600e+02\n10 6356     -8.434998e+01 -1.812000e+01\n12 6356     1.803998e+01 -8.684003e+01\n15 6356     -2.307001e+01 -4.910999e+01\n0 6357     6.993800e+02 -1.367300e+02\n2 6357     6.903800e+02 -1.127200e+02\n3 6357     5.628900e+02 -4.129100e+02\n7 6357     5.667600e+02 6.796997e+01\n12 6357     6.892900e+02 3.290002e+01\n0 6358     8.354900e+02 -1.372000e+02\n7 6358     6.954000e+02 9.612000e+01\n0 6359     7.376700e+02 -1.391500e+02\n2 6359     7.313900e+02 -9.292999e+01\n7 6359     6.034700e+02 7.404999e+01\n0 6360     1.878400e+02 -1.394300e+02\n10 6360     1.382600e+02 -3.800049e-01\n12 6360     2.387400e+02 -3.284003e+01\n0 6361     -2.502002e+01 -1.403600e+02\n2 6361     1.722000e+02 -1.338300e+02\n3 6361     9.069000e+01 -4.375300e+02\n6 6361     -1.234998e+01 -1.521300e+02\n7 6361     -8.596002e+01 -3.191998e+01\n8 6361     1.655900e+02 -1.580900e+02\n10 6361     -1.075800e+02 -2.446997e+01\n12 6361     -8.789978e+00 -1.003400e+02\n0 6362     8.276300e+02 -1.407600e+02\n2 6362     8.234200e+02 -4.522998e+01\n7 6362     6.885800e+02 9.089001e+01\n9 6362     5.624100e+02 7.379999e+01\n0 6363     -1.042900e+02 -1.425500e+02\n2 6363     8.535999e+01 -1.592100e+02\n3 6363     9.429993e+00 -4.646600e+02\n6 6363     -1.029000e+02 -1.842300e+02\n7 6363     -1.660000e+02 -4.871997e+01\n10 6363     -1.987200e+02 -3.509003e+01\n0 6364     1.174400e+02 -1.436300e+02\n12 6364     1.635800e+02 -5.553998e+01\n0 6365     8.264500e+02 -1.441800e+02\n2 6365     8.234000e+02 -4.919000e+01\n3 6365     6.874700e+02 -3.441200e+02\n7 6365     6.880200e+02 8.735001e+01\n9 6365     5.628400e+02 7.023999e+01\n0 6366     5.221801e+02 -1.441400e+02\n6 6366     4.443900e+02 -3.771997e+01\n7 6366     4.080100e+02 3.346997e+01\n0 6367     -3.025300e+02 -1.446200e+02\n7 6367     -3.963800e+02 -1.081900e+02\n12 6367     -4.173900e+02 -2.568900e+02\n0 6368     -3.145200e+02 -1.474600e+02\n7 6368     -4.084800e+02 -1.131800e+02\n15 6368     -4.305700e+02 -1.062200e+02\n0 6369     -1.073300e+02 -1.482300e+02\n7 6369     -1.676500e+02 -5.494000e+01\n13 6369     2.946600e+02 -3.612500e+02\n0 6370     7.509700e+02 -1.481800e+02\n7 6370     6.177100e+02 6.809003e+01\n0 6371     7.509700e+02 -1.481800e+02\n7 6371     6.177100e+02 6.809003e+01\n10 6371     7.911899e+02 4.840002e+01\n12 6371     7.511400e+02 4.160999e+01\n0 6372     -1.177600e+02 -1.524600e+02\n2 6372     6.640997e+01 -1.818500e+02\n6 6372     -1.211700e+02 -2.035500e+02\n7 6372     -1.795100e+02 -6.232001e+01\n8 6372     7.756000e+01 -1.957300e+02\n10 6372     -2.137200e+02 -4.789001e+01\n12 6372     -1.210700e+02 -1.467700e+02\n0 6373     -1.146100e+02 -1.524600e+02\n2 6373     7.182001e+01 -1.788900e+02\n3 6373     -3.020020e+00 -4.848300e+02\n4 6373     -3.632200e+02 -3.195900e+02\n7 6373     -1.758700e+02 -6.159998e+01\n8 6373     8.184998e+01 -1.937000e+02\n10 6373     -2.099600e+02 -4.813000e+01\n13 6373     2.850601e+02 -3.664700e+02\n15 6373     -1.684500e+02 -8.508002e+01\n0 6374     3.802002e+01 -1.525300e+02\n2 6374     2.520000e+02 -1.201400e+02\n6 6374     6.862000e+01 -1.390400e+02\n7 6374     -1.879999e+01 -3.121002e+01\n10 6374     -3.334003e+01 -3.121997e+01\n12 6374     7.396002e+01 -9.073999e+01\n15 6374     3.678998e+01 -6.438000e+01\n0 6375     7.215800e+02 -1.532400e+02\n2 6375     7.196500e+02 -1.174800e+02\n7 6375     5.901899e+02 5.687000e+01\n9 6375     4.794100e+02 9.570007e+00\n0 6376     8.048300e+02 -1.533400e+02\n7 6376     6.689500e+02 7.427002e+01\n0 6377     8.740100e+02 -1.532600e+02\n3 6377     7.333700e+02 -3.263900e+02\n7 6377     7.330100e+02 8.850000e+01\n0 6378     8.774700e+02 -1.539100e+02\n7 6378     7.360800e+02 8.845999e+01\n9 6378     6.047400e+02 8.616000e+01\n0 6379     8.636801e+02 -1.542600e+02\n7 6379     7.237800e+02 8.560999e+01\n0 6380     7.903998e+01 -1.553600e+02\n2 6380     2.983101e+02 -1.076400e+02\n7 6380     2.320001e+01 -2.598999e+01\n15 6380     9.216998e+01 -6.262000e+01\n0 6381     8.425300e+02 -1.553400e+02\n9 6381     5.781801e+02 6.867999e+01\n0 6382     -8.090002e+01 -1.564300e+02\n12 6382     -6.914001e+01 -1.349200e+02\n0 6383     3.900000e+01 -1.570800e+02\n2 6383     2.537000e+02 -1.255900e+02\n3 6383     1.687100e+02 -4.280601e+02\n6 6383     7.066998e+01 -1.444100e+02\n7 6383     -1.717999e+01 -3.581000e+01\n8 6383     2.319400e+02 -1.531800e+02\n10 6383     -3.146997e+01 -3.664001e+01\n12 6383     7.614001e+01 -9.656000e+01\n15 6383     3.857001e+01 -7.040997e+01\n0 6384     8.105699e+02 -1.568900e+02\n7 6384     6.748500e+02 7.210999e+01\n9 6384     5.540200e+02 5.190002e+01\n0 6385     7.689600e+02 -1.591400e+02\n7 6385     6.361700e+02 6.135999e+01\n10 6385     8.139301e+02 3.744000e+01\n0 6386     7.286200e+02 -1.607200e+02\n2 6386     7.279399e+02 -1.210200e+02\n9 6386     4.865800e+02 6.950012e+00\n12 6386     7.288800e+02 1.829999e+01\n0 6387     2.903998e+01 -1.609000e+02\n2 6387     2.429100e+02 -1.348700e+02\n6 6387     5.956000e+01 -1.532700e+02\n8 6387     2.226700e+02 -1.602200e+02\n0 6388     7.291300e+02 -1.633700e+02\n2 6388     7.302700e+02 -1.233800e+02\n0 6389     2.071899e+02 -1.639600e+02\n6 6389     2.497600e+02 -9.460999e+01\n7 6389     1.488700e+02 -1.270001e+01\n10 6389     1.632400e+02 -2.673999e+01\n12 6389     2.688000e+02 -5.427002e+01\n15 6389     2.681700e+02 -5.748999e+01\n0 6390     2.094399e+02 -1.655900e+02\n6 6390     2.522100e+02 -9.603003e+01\n10 6390     1.657900e+02 -2.835999e+01\n12 6390     2.716200e+02 -5.646997e+01\n15 6390     2.708800e+02 -5.990997e+01\n0 6391     8.515699e+02 -1.665900e+02\n7 6391     7.137600e+02 7.115997e+01\n0 6392     8.515699e+02 -1.665900e+02\n7 6392     7.137600e+02 7.115997e+01\n0 6393     8.643900e+02 -1.700900e+02\n7 6393     7.267500e+02 7.115997e+01\n9 6393     5.994700e+02 6.748999e+01\n0 6394     7.350000e+02 -1.712100e+02\n2 6394     7.388300e+02 -1.287300e+02\n7 6394     6.051899e+02 4.247998e+01\n0 6395     3.275100e+02 -1.723700e+02\n7 6395     2.624500e+02 -3.260010e+00\n0 6396     8.657900e+02 -1.730300e+02\n3 6396     7.344600e+02 -3.501900e+02\n9 6396     6.015601e+02 6.526001e+01\n0 6397     3.661899e+02 -1.730900e+02\n7 6397     2.983800e+02 2.099976e+00\n15 6397     4.894399e+02 -4.941998e+01\n0 6398     8.630200e+02 -1.733700e+02\n3 6398     7.317600e+02 -3.517500e+02\n7 6398     7.252700e+02 6.740997e+01\n9 6398     5.990900e+02 6.359003e+01\n0 6399     -1.613300e+02 -1.750200e+02\n6 6399     -2.054900e+02 -2.727000e+02\n7 6399     -2.299900e+02 -1.008600e+02\n8 6399     7.200012e+00 -2.641400e+02\n10 6399     -2.614400e+02 -7.854999e+01\n13 6399     2.211700e+02 -4.000700e+02\n15 6399     -2.251300e+02 -1.221700e+02\n0 6400     1.270900e+02 -1.752600e+02\n7 6400     7.340997e+01 -3.896997e+01\n15 6400     1.601300e+02 -8.397998e+01\n0 6401     7.899200e+02 -1.756600e+02\n2 6401     7.972600e+02 -1.016200e+02\n3 6401     6.662300e+02 -3.970200e+02\n7 6401     6.579600e+02 5.007001e+01\n9 6401     5.422600e+02 2.613000e+01\n0 6402     7.389001e+01 -1.769100e+02\n6 6402     1.150300e+02 -1.547600e+02\n10 6402     1.065997e+01 -5.600000e+01\n15 6402     8.827002e+01 -9.265997e+01\n0 6403     7.927500e+02 -1.772900e+02\n2 6403     8.005100e+02 -1.015000e+02\n3 6403     6.695900e+02 -3.965700e+02\n0 6404     8.704700e+02 -1.806100e+02\n7 6404     7.335300e+02 6.191998e+01\n9 6404     6.066500e+02 6.103998e+01\n0 6405     8.137100e+02 -1.829600e+02\n2 6405     8.237400e+02 -9.541998e+01\n0 6406     3.654399e+02 -1.833500e+02\n7 6406     3.003500e+02 -6.950012e+00\n0 6407     8.253400e+02 -1.844900e+02\n3 6407     7.027800e+02 -3.842100e+02\n7 6407     6.921300e+02 4.903998e+01\n9 6407     5.735200e+02 3.626001e+01\n0 6408     8.684500e+02 -1.844700e+02\n7 6408     7.316899e+02 5.787000e+01\n9 6408     6.064100e+02 5.710999e+01\n0 6409     8.684500e+02 -1.844700e+02\n3 6409     7.410000e+02 -3.593300e+02\n7 6409     7.316899e+02 5.787000e+01\n9 6409     6.064100e+02 5.710999e+01\n0 6410     3.486200e+02 -1.885500e+02\n2 6410     5.446801e+02 -9.379999e+01\n6 6410     3.910300e+02 -8.010999e+01\n8 6410     4.812400e+02 -1.276800e+02\n0 6411     1.451700e+02 -1.887500e+02\n2 6411     3.692000e+02 -1.334700e+02\n7 6411     9.240997e+01 -4.856000e+01\n15 6411     1.867900e+02 -9.933002e+01\n0 6412     8.180900e+02 -1.888000e+02\n2 6412     8.297300e+02 -9.920001e+01\n7 6412     6.858900e+02 4.342999e+01\n0 6413     9.830017e+00 -1.921500e+02\n12 6413     5.546997e+01 -1.436500e+02\n0 6414     2.651500e+02 -1.930700e+02\n12 6414     3.388101e+02 -7.369000e+01\n0 6415     8.407200e+02 -1.930400e+02\n3 6415     7.198700e+02 -3.832100e+02\n9 6415     5.876000e+02 3.712000e+01\n0 6416     3.352000e+02 -1.937300e+02\n10 6416     3.129500e+02 -4.765997e+01\n12 6416     4.119800e+02 -5.701001e+01\n15 6416     4.488700e+02 -8.156000e+01\n0 6417     2.841100e+02 -1.942500e+02\n6 6417     3.333600e+02 -1.051700e+02\n10 6417     2.547300e+02 -5.314001e+01\n12 6417     3.591000e+02 -7.040002e+01\n15 6417     3.779800e+02 -8.872998e+01\n0 6418     1.067999e+01 -1.965200e+02\n7 6418     -3.759003e+01 -7.941998e+01\n15 6418     5.219971e+00 -1.277100e+02\n0 6419     7.744600e+02 -1.980800e+02\n7 6419     6.460300e+02 2.570001e+01\n12 6419     7.897500e+02 -2.429993e+00\n0 6420     3.279900e+02 -2.002400e+02\n7 6420     2.685699e+02 -2.953003e+01\n15 6420     4.393500e+02 -9.214001e+01\n0 6421     7.728300e+02 -2.001000e+02\n12 6421     7.897100e+02 -6.859985e+00\n0 6422     8.329800e+02 -2.010700e+02\n7 6422     7.014900e+02 3.497998e+01\n0 6423     -1.315000e+02 -2.015700e+02\n4 6423     -3.995200e+02 -2.958900e+02\n15 6423     -1.824300e+02 -1.535000e+02\n0 6424     -1.315000e+02 -2.015700e+02\n3 6424     -3.771002e+01 -5.859301e+02\n6 6424     -1.460400e+02 -2.827800e+02\n8 6424     5.564001e+01 -2.695800e+02\n9 6424     -6.377002e+01 -1.444900e+02\n12 6424     -1.382000e+02 -2.262300e+02\n13 6424     2.591300e+02 -4.181600e+02\n15 6424     -1.824300e+02 -1.535000e+02\n0 6425     1.637000e+01 -2.014100e+02\n10 6425     -5.291998e+01 -9.042999e+01\n12 6425     6.815997e+01 -1.520200e+02\n0 6426     8.322998e+01 -2.020000e+02\n7 6426     3.596002e+01 -7.166998e+01\n12 6426     1.438900e+02 -1.328200e+02\n0 6427     3.334600e+02 -2.018300e+02\n7 6427     2.732600e+02 -3.052002e+01\n10 6427     3.119500e+02 -5.679999e+01\n12 6427     4.107700e+02 -6.841998e+01\n15 6427     4.472900e+02 -9.303998e+01\n0 6428     9.960022e+00 -2.027000e+02\n6 6428     6.323999e+01 -2.026300e+02\n7 6428     -3.665002e+01 -8.553003e+01\n10 6428     -6.042999e+01 -9.254999e+01\n12 6428     6.140997e+01 -1.550200e+02\n15 6428     4.669983e+00 -1.361400e+02\n0 6429     -3.398100e+02 -2.030300e+02\n7 6429     -4.214900e+02 -1.726200e+02\n0 6430     -4.043100e+02 -2.045600e+02\n2 6430     -3.887800e+02 -4.572300e+02\n7 6430     -4.885700e+02 -1.865200e+02\n12 6430     -5.206400e+02 -3.568000e+02\n15 6430     -5.470600e+02 -1.967600e+02\n0 6431     1.687000e+01 -2.047300e+02\n6 6431     7.203003e+01 -2.019500e+02\n10 6431     -5.215997e+01 -9.381000e+01\n12 6431     7.053998e+01 -1.551000e+02\n15 6431     1.427002e+01 -1.374200e+02\n0 6432     7.852600e+02 -2.060300e+02\n2 6432     8.024700e+02 -1.363500e+02\n0 6433     8.686300e+02 -2.062200e+02\n3 6433     7.501200e+02 -3.813200e+02\n7 6433     7.345699e+02 3.728003e+01\n9 6433     6.126801e+02 3.910999e+01\n0 6434     7.823500e+02 -2.071200e+02\n2 6434     7.996899e+02 -1.387500e+02\n3 6434     6.730500e+02 -4.338800e+02\n12 6434     8.026100e+02 -1.071997e+01\n0 6435     -1.340997e+01 -2.081000e+02\n3 6435     1.488900e+02 -4.871600e+02\n6 6435     3.858002e+01 -2.180300e+02\n8 6435     2.066500e+02 -2.050200e+02\n12 6435     3.517999e+01 -1.696500e+02\n0 6436     2.930100e+02 -2.097200e+02\n7 6436     2.389800e+02 -4.300000e+01\n15 6436     3.920699e+02 -1.088900e+02\n0 6437     7.819600e+02 -2.095900e+02\n2 6437     8.000699e+02 -1.416300e+02\n7 6437     6.549500e+02 1.587000e+01\n12 6437     8.031300e+02 -1.407001e+01\n0 6438     8.438199e+02 -2.111900e+02\n3 6438     7.305601e+02 -4.007400e+02\n7 6438     7.126200e+02 2.759003e+01\n9 6438     5.956400e+02 2.315002e+01\n0 6439     2.168199e+02 -2.115200e+02\n7 6439     1.671500e+02 -5.763000e+01\n10 6439     1.787000e+02 -8.067999e+01\n15 6439     2.871300e+02 -1.209400e+02\n0 6440     -2.071997e+01 -2.121100e+02\n3 6440     1.406900e+02 -4.973700e+02\n4 6440     -4.232800e+02 -3.940400e+02\n6 6440     2.934998e+01 -2.268700e+02\n7 6440     -6.651001e+01 -1.011900e+02\n10 6440     -9.551001e+01 -1.059500e+02\n12 6440     2.579999e+01 -1.782800e+02\n15 6440     -3.470001e+01 -1.526400e+02\n0 6441     2.809800e+02 -2.116700e+02\n2 6441     5.070400e+02 -1.197600e+02\n6 6441     3.419600e+02 -1.215800e+02\n10 6441     2.530800e+02 -7.354999e+01\n12 6441     3.654100e+02 -8.721002e+01\n13 6441     6.497700e+02 -3.838000e+02\n15 6441     3.755000e+02 -1.128300e+02\n0 6442     -3.494900e+02 -2.151700e+02\n7 6442     -4.280600e+02 -1.860200e+02\n0 6443     -3.494900e+02 -2.151700e+02\n7 6443     -4.280600e+02 -1.860200e+02\n0 6444     8.505699e+02 -2.156500e+02\n3 6444     7.381700e+02 -4.003500e+02\n0 6445     9.176001e+01 -2.170300e+02\n7 6445     4.771997e+01 -8.390997e+01\n0 6446     9.176001e+01 -2.170300e+02\n7 6446     4.771997e+01 -8.390997e+01\n0 6447     -1.144000e+01 -2.182000e+02\n3 6447     1.512700e+02 -5.022700e+02\n6 6447     4.138000e+01 -2.311899e+02\n7 6447     -5.628003e+01 -1.057500e+02\n8 6447     2.089200e+02 -2.173000e+02\n10 6447     -8.271997e+01 -1.126200e+02\n12 6447     3.838000e+01 -1.831600e+02\n13 6447     3.933101e+02 -4.137700e+02\n15 6447     -2.148999e+01 -1.597000e+02\n0 6448     7.810400e+02 -2.201300e+02\n2 6448     8.026300e+02 -1.530600e+02\n12 6448     8.042700e+02 -2.571002e+01\n0 6449     2.009000e+02 -2.209100e+02\n6 6449     2.693800e+02 -1.555699e+02\n13 6449     5.835400e+02 -3.974900e+02\n0 6450     1.179300e+02 -2.241000e+02\n6 6450     1.889200e+02 -1.859301e+02\n12 6450     1.944100e+02 -1.448000e+02\n0 6451     -3.446100e+02 -2.259900e+02\n2 6451     -2.942400e+02 -4.569100e+02\n6 6451     -4.692000e+02 -4.417200e+02\n7 6451     -4.202800e+02 -1.955200e+02\n9 6451     -3.356000e+02 -3.169500e+02\n0 6452     1.491200e+02 -2.269200e+02\n7 6452     1.061600e+02 -8.303998e+01\n10 6452     1.022900e+02 -1.050400e+02\n15 6452     1.960900e+02 -1.501500e+02\n0 6453     2.324700e+02 -2.269800e+02\n7 6453     1.860699e+02 -6.910999e+01\n10 6453     1.983800e+02 -9.678003e+01\n15 6453     3.103000e+02 -1.394400e+02\n0 6454     1.863300e+02 -2.314400e+02\n6 6454     2.624000e+02 -1.701700e+02\n10 6454     1.454300e+02 -1.063900e+02\n12 6454     2.746200e+02 -1.324400e+02\n13 6454     5.742500e+02 -4.074400e+02\n15 6454     2.480601e+02 -1.519100e+02\n0 6455     1.395800e+02 -2.329600e+02\n6 6455     2.171100e+02 -1.871200e+02\n10 6455     9.237000e+01 -1.135000e+02\n12 6455     2.237200e+02 -1.473300e+02\n15 6455     1.841000e+02 -1.600500e+02\n0 6456     1.878101e+02 -2.339500e+02\n2 6456     4.414000e+02 -1.549200e+02\n3 6456     3.495200e+02 -4.494000e+02\n6 6456     2.649500e+02 -1.728600e+02\n8 6456     3.872300e+02 -1.810300e+02\n9 6456     2.648300e+02 -2.594000e+01\n12 6456     2.767200e+02 -1.353700e+02\n13 6456     5.749399e+02 -4.103800e+02\n15 6456     2.502300e+02 -1.547800e+02\n0 6457     -1.333500e+02 -2.343200e+02\n7 6457     -1.899000e+02 -1.552000e+02\n10 6457     -2.224600e+02 -1.436100e+02\n15 6457     -1.793400e+02 -1.979900e+02\n0 6458     2.940400e+02 -2.362000e+02\n7 6458     2.410100e+02 -7.134003e+01\n0 6459     1.930300e+02 -2.373200e+02\n2 6459     4.450100e+02 -1.585300e+02\n6 6459     2.693500e+02 -1.754399e+02\n10 6459     1.538000e+02 -1.124000e+02\n12 6459     2.824900e+02 -1.383700e+02\n0 6460     -2.840027e+00 -2.378700e+02\n6 6460     5.119000e+01 -2.541200e+02\n7 6460     -4.571002e+01 -1.248500e+02\n15 6460     -6.760010e+00 -1.852300e+02\n0 6461     2.886801e+02 -2.377900e+02\n12 6461     3.743800e+02 -1.220100e+02\n0 6462     3.353800e+02 -2.384700e+02\n6 6462     3.799300e+02 -1.490699e+02\n8 6462     4.715300e+02 -1.900800e+02\n10 6462     3.180500e+02 -9.862000e+01\n12 6462     4.136100e+02 -1.199700e+02\n15 6462     4.564100e+02 -1.425500e+02\n0 6463     1.442800e+02 -2.431700e+02\n3 6463     3.144900e+02 -4.718600e+02\n6 6463     2.223200e+02 -1.987500e+02\n7 6463     1.040200e+02 -1.002700e+02\n10 6463     9.871002e+01 -1.244300e+02\n12 6463     2.301100e+02 -1.598200e+02\n15 6463     1.923600e+02 -1.732300e+02\n0 6464     -1.821997e+01 -2.439700e+02\n4 6464     -4.498100e+02 -3.901700e+02\n13 6464     3.834500e+02 -4.407100e+02\n15 6464     -2.621997e+01 -1.954300e+02\n0 6465     1.838400e+02 -2.441300e+02\n2 6465     4.373199e+02 -1.724400e+02\n7 6465     1.419100e+02 -9.484998e+01\n15 6465     2.464399e+02 -1.695000e+02\n0 6466     2.982001e+01 -2.491500e+02\n2 6466     2.783700e+02 -2.328900e+02\n6 6466     9.254999e+01 -2.549900e+02\n7 6466     -1.071002e+01 -1.300600e+02\n10 6466     -3.214001e+01 -1.440300e+02\n13 6466     4.308700e+02 -4.401400e+02\n0 6467     -1.149600e+02 -2.495200e+02\n6 6467     -1.198800e+02 -3.401000e+02\n15 6467     -1.524300e+02 -2.161300e+02\n0 6468     1.569200e+02 -2.560000e+02\n2 6468     4.132800e+02 -1.969000e+02\n4 6468     -4.950600e+02 -5.407600e+02\n6 6468     2.343600e+02 -2.125000e+02\n9 6468     2.436500e+02 -6.153003e+01\n12 6468     2.445300e+02 -1.749900e+02\n0 6469     2.293600e+02 -2.583700e+02\n2 6469     4.773700e+02 -1.845400e+02\n3 6469     3.839100e+02 -4.781300e+02\n7 6469     1.865100e+02 -1.022800e+02\n0 6470     1.579200e+02 -2.644900e+02\n6 6470     2.353300e+02 -2.228700e+02\n10 6470     1.164800e+02 -1.473500e+02\n0 6471     5.819800e+02 -2.655900e+02\n6 6471     5.718199e+02 -1.357700e+02\n0 6472     6.157300e+02 -2.661000e+02\n7 6472     5.207500e+02 -6.139001e+01\n15 6472     8.568600e+02 -1.457800e+02\n0 6473     5.864700e+02 -2.664700e+02\n6 6473     5.765699e+02 -1.352100e+02\n0 6474     5.650900e+02 -2.718600e+02\n6 6474     5.596700e+02 -1.469399e+02\n0 6475     2.214500e+02 -2.727400e+02\n2 6475     4.680699e+02 -2.096600e+02\n6 6475     2.963900e+02 -2.144700e+02\n7 6475     1.792400e+02 -1.188400e+02\n10 6475     1.906500e+02 -1.500400e+02\n15 6475     3.026100e+02 -2.033700e+02\n0 6476     1.658002e+01 -2.784000e+02\n3 6476     1.813900e+02 -5.882000e+02\n6 6476     7.520001e+01 -3.012800e+02\n7 6476     -2.217999e+01 -1.641200e+02\n8 6476     2.333900e+02 -2.845600e+02\n9 6476     1.214600e+02 -1.423300e+02\n10 6476     -4.428003e+01 -1.780600e+02\n13 6476     4.144301e+02 -4.715500e+02\n15 6476     2.614001e+01 -2.375200e+02\n0 6477     -6.024100e+02 -2.802800e+02\n7 6477     -6.824100e+02 -3.019200e+02\n10 6477     -7.740400e+02 -2.544500e+02\n0 6478     2.784900e+02 -2.829700e+02\n2 6478     4.993199e+02 -2.348800e+02\n3 6478     4.043600e+02 -5.306000e+02\n6 6478     3.381000e+02 -2.187400e+02\n10 6478     2.566400e+02 -1.556700e+02\n12 6478     3.662500e+02 -1.884600e+02\n15 6478     3.839500e+02 -2.104800e+02\n0 6479     2.026600e+02 -2.865300e+02\n2 6479     4.519000e+02 -2.355800e+02\n3 6479     3.621400e+02 -5.303199e+02\n6 6479     2.784700e+02 -2.386100e+02\n7 6479     1.623500e+02 -1.365900e+02\n8 6479     3.966500e+02 -2.449200e+02\n12 6479     2.956899e+02 -2.049600e+02\n15 6479     2.793900e+02 -2.245100e+02\n0 6480     2.672400e+02 -3.047500e+02\n7 6480     2.223101e+02 -1.467700e+02\n10 6480     2.463600e+02 -1.814500e+02\n15 6480     3.717400e+02 -2.412500e+02\n0 6481     7.933000e+02 -3.047500e+02\n7 6481     6.840900e+02 -6.703998e+01\n0 6482     2.599200e+02 -3.086000e+02\n7 6482     2.155900e+02 -1.520100e+02\n10 6482     2.382900e+02 -1.867200e+02\n13 6482     6.269399e+02 -4.837600e+02\n15 6482     3.624301e+02 -2.476500e+02\n0 6483     1.284600e+02 -3.142300e+02\n7 6483     9.387000e+01 -1.789600e+02\n9 6483     2.242100e+02 -1.452800e+02\n10 6483     8.796002e+01 -2.070200e+02\n13 6483     5.183600e+02 -4.957800e+02\n15 6483     1.825699e+02 -2.712900e+02\n0 6484     7.768300e+02 -3.143200e+02\n7 6484     6.723300e+02 -7.808002e+01\n0 6485     -4.513000e+01 -3.150200e+02\n7 6485     -8.171997e+01 -2.154900e+02\n8 6485     1.735300e+02 -3.510000e+02\n9 6485     6.613000e+01 -2.160800e+02\n10 6485     -1.116300e+02 -2.272300e+02\n13 6485     3.535601e+02 -5.150500e+02\n15 6485     -5.109003e+01 -2.951400e+02\n0 6486     -1.728998e+01 -3.164300e+02\n2 6486     2.159000e+02 -3.681400e+02\n6 6486     3.408002e+01 -3.709600e+02\n7 6486     -5.394000e+01 -2.120600e+02\n8 6486     1.981800e+02 -3.473500e+02\n9 6486     8.922998e+01 -2.114200e+02\n10 6486     -7.931000e+01 -2.256300e+02\n12 6486     3.906000e+01 -3.257900e+02\n13 6486     3.778800e+02 -5.147100e+02\n15 6486     -1.297998e+01 -2.934300e+02\n0 6487     -1.997998e+01 -3.182400e+02\n7 6487     -5.656000e+01 -2.142200e+02\n9 6487     8.701001e+01 -2.141000e+02\n10 6487     -8.195001e+01 -2.280200e+02\n15 6487     -1.659998e+01 -2.961000e+02\n0 6488     1.642200e+02 -3.240000e+02\n7 6488     1.291300e+02 -1.823000e+02\n15 6488     2.325601e+02 -2.800400e+02\n0 6489     6.845699e+02 -3.250000e+02\n7 6489     5.948700e+02 -1.025900e+02\n0 6490     6.796400e+02 -3.502500e+02\n7 6490     5.970900e+02 -1.261500e+02\n0 6491     7.887200e+02 -3.576300e+02\n7 6491     6.916400e+02 -1.144500e+02\n0 6492     7.887200e+02 -3.576300e+02\n7 6492     6.916400e+02 -1.144500e+02\n0 6493     8.373999e+01 -3.641200e+02\n7 6493     5.637000e+01 -2.383300e+02\n15 6493     1.292500e+02 -3.446900e+02\n0 6494     7.391000e+02 -3.787100e+02\n7 6494     6.542700e+02 -1.416000e+02\n0 6495     -6.402002e+01 -3.854000e+02\n9 6495     7.197998e+01 -2.988500e+02\n0 6496     4.721000e+02 -3.929400e+02\n6 6496     5.408000e+02 -2.931500e+02\n0 6497     -2.826600e+02 -3.959500e+02\n6 6497     -2.671800e+02 -5.994600e+02\n0 6498     -2.556800e+02 -3.974600e+02\n7 6498     -2.852700e+02 -3.447800e+02\n15 6498     -3.225400e+02 -4.354301e+02\n0 6499     3.428101e+02 -3.985000e+02\n7 6499     3.050300e+02 -2.277900e+02\n0 6500     8.265997e+01 -4.121600e+02\n7 6500     6.528998e+01 -2.857200e+02\n0 6501     8.682600e+02 -4.124400e+02\n7 6501     7.690699e+02 -1.482700e+02\n0 6502     7.550200e+02 -4.131800e+02\n7 6502     6.753000e+02 -1.688900e+02\n0 6503     4.817800e+02 -4.166000e+02\n6 6503     5.640400e+02 -3.119399e+02\n0 6504     7.807000e+02 -4.166600e+02\n7 6504     6.979500e+02 -1.676700e+02\n0 6505     7.950699e+02 -4.167300e+02\n7 6505     7.097500e+02 -1.652900e+02\n0 6506     1.260010e+00 -4.220600e+02\n7 6506     -1.764001e+01 -3.148500e+02\n15 6506     2.658002e+01 -4.339800e+02\n0 6507     4.749900e+02 -4.221700e+02\n6 6507     5.607600e+02 -3.195200e+02\n0 6508     4.749900e+02 -4.221700e+02\n6 6508     5.607600e+02 -3.195200e+02\n0 6509     -2.115200e+02 -4.231900e+02\n7 6509     -2.334100e+02 -3.609200e+02\n0 6510     8.429800e+02 -4.355500e+02\n7 6510     7.532700e+02 -1.733000e+02\n0 6511     4.417900e+02 -4.385200e+02\n7 6511     4.034399e+02 -2.479800e+02\n15 6511     6.322300e+02 -4.027700e+02\n0 6512     4.377900e+02 -4.404800e+02\n6 6512     5.363101e+02 -3.495900e+02\n15 6512     6.267100e+02 -4.063300e+02\n0 6513     4.456600e+02 -4.513101e+02\n6 6513     5.502500e+02 -3.569100e+02\n0 6514     4.414900e+02 -4.536500e+02\n7 6514     4.068101e+02 -2.619400e+02\n0 6515     4.414900e+02 -4.536500e+02\n6 6515     5.474700e+02 -3.611300e+02\n0 6516     -1.765400e+02 -4.599000e+02\n7 6516     -1.887400e+02 -3.890400e+02\n15 6516     -2.085300e+02 -5.085200e+02\n0 6517     -2.006300e+02 -4.627000e+02\n7 6517     -2.123400e+02 -3.970800e+02\n9 6517     -1.678998e+01 -4.237400e+02\n0 6518     7.961700e+02 -4.660601e+02\n7 6518     7.209900e+02 -2.082700e+02\n0 6519     4.839399e+02 -4.672000e+02\n7 6519     4.488900e+02 -2.664700e+02\n0 6520     -3.074200e+02 -4.759200e+02\n7 6520     -3.191100e+02 -4.329399e+02\n0 6521     -1.350900e+02 -4.774301e+02\n7 6521     -1.419800e+02 -3.975800e+02\n0 6522     -2.929500e+02 -4.783300e+02\n6 6522     -2.204200e+02 -6.929900e+02\n7 6522     -3.034200e+02 -4.320900e+02\n0 6523     7.361300e+02 -4.788300e+02\n7 6523     6.738800e+02 -2.303600e+02\n0 6524     -2.481100e+02 -4.822300e+02\n6 6524     -1.635900e+02 -6.745400e+02\n0 6525     -1.555700e+02 -4.857300e+02\n4 6525     -6.232400e+02 -2.614500e+02\n6 6525     -5.196997e+01 -6.342100e+02\n7 6525     -1.606400e+02 -4.102500e+02\n12 6525     -6.896997e+01 -5.824700e+02\n0 6526     4.245500e+02 -4.892300e+02\n6 6526     5.525100e+02 -4.006801e+02\n12 6526     5.844800e+02 -3.858100e+02\n0 6527     7.376801e+02 -4.896100e+02\n7 6527     6.768600e+02 -2.398500e+02\n0 6528     -1.954700e+02 -4.933400e+02\n6 6528     -9.316000e+01 -6.609500e+02\n0 6529     4.225200e+02 -4.946700e+02\n6 6529     5.540200e+02 -4.066400e+02\n7 6529     3.993400e+02 -3.029600e+02\n0 6530     -2.772500e+02 -4.962900e+02\n6 6530     -1.903400e+02 -7.040400e+02\n0 6531     7.064500e+02 -4.961000e+02\n7 6531     6.522900e+02 -2.510300e+02\n10 6531     7.705400e+02 -3.546700e+02\n0 6532     -1.264500e+02 -5.005100e+02\n9 6532     7.916998e+01 -4.195100e+02\n0 6533     4.317600e+02 -5.027300e+02\n7 6533     4.097500e+02 -3.083000e+02\n0 6534     5.183000e+02 -5.097800e+02\n7 6534     4.898101e+02 -2.984300e+02\n10 6534     5.545900e+02 -3.895900e+02\n0 6535     -3.231800e+02 -5.107300e+02\n6 6535     -2.350700e+02 -7.436600e+02\n7 6535     -3.263900e+02 -4.705400e+02\n10 6535     -4.124100e+02 -4.859100e+02\n0 6536     -1.879700e+02 -5.124500e+02\n7 6536     -1.870000e+02 -4.425200e+02\n0 6537     -3.685999e+01 -5.168400e+02\n7 6537     -3.409998e+01 -4.148200e+02\n15 6537     -1.314001e+01 -5.675000e+02\n0 6538     5.332200e+02 -5.180800e+02\n10 6538     5.725100e+02 -3.969400e+02\n12 6538     7.101400e+02 -3.801600e+02\n0 6539     7.591300e+02 -5.225601e+02\n7 6539     7.020900e+02 -2.647000e+02\n0 6540     -1.993200e+02 -5.288600e+02\n7 6540     -1.943500e+02 -4.612800e+02\n10 6540     -2.661200e+02 -4.914500e+02\n0 6541     8.295900e+02 -5.307600e+02\n7 6541     7.617900e+02 -2.585500e+02\n0 6542     -1.384000e+02 -5.309301e+02\n6 6542     -1.429993e+00 -6.734200e+02\n0 6543     -4.566400e+02 -5.323400e+02\n7 6543     -4.608100e+02 -5.218000e+02\n0 6544     -9.317999e+01 -5.339399e+02\n6 6544     5.096002e+01 -6.549500e+02\n7 6544     -8.594000e+01 -4.427800e+02\n0 6545     3.645900e+02 -5.340800e+02\n12 6545     5.449200e+02 -4.507600e+02\n0 6546     -1.259100e+02 -5.377500e+02\n4 6546     -6.771800e+02 -2.851500e+02\n9 6546     1.060500e+02 -4.445400e+02\n0 6547     1.082200e+02 -5.405100e+02\n6 6547     2.709100e+02 -5.735400e+02\n10 6547     8.903998e+01 -4.683300e+02\n15 6547     1.859700e+02 -5.812200e+02\n0 6548     -8.076001e+01 -5.422100e+02\n6 6548     7.053003e+01 -6.580000e+02\n0 6549     7.011600e+02 -5.439399e+02\n7 6549     6.577800e+02 -2.942200e+02\n10 6549     7.685900e+02 -4.100000e+02\n0 6550     6.140002e+01 -5.459399e+02\n2 6550     4.178600e+02 -5.879200e+02\n6 6550     2.262800e+02 -5.985500e+02\n0 6551     3.604399e+02 -5.458400e+02\n12 6551     5.466600e+02 -4.644000e+02\n0 6552     -2.041000e+02 -5.464000e+02\n7 6552     -1.948200e+02 -4.793900e+02\n0 6553     3.443300e+02 -5.464900e+02\n7 6553     3.393300e+02 -3.656700e+02\n10 6553     3.588400e+02 -4.494301e+02\n0 6554     -1.489001e+01 -5.471400e+02\n7 6554     -5.049988e+00 -4.390500e+02\n0 6555     6.117999e+01 -5.487300e+02\n4 6555     -7.397900e+02 -4.436899e+02\n6 6555     2.272500e+02 -6.015900e+02\n7 6555     7.028003e+01 -4.248700e+02\n10 6555     3.565997e+01 -4.829200e+02\n0 6556     1.454800e+02 -5.496200e+02\n7 6556     1.521500e+02 -4.084800e+02\n10 6556     1.333400e+02 -4.740300e+02\n0 6557     -2.514300e+02 -5.498199e+02\n7 6557     -2.421200e+02 -4.930900e+02\n10 6557     -3.243400e+02 -5.220300e+02\n0 6558     1.591000e+02 -5.500800e+02\n6 6558     3.289400e+02 -5.620400e+02\n10 6558     1.479500e+02 -4.734000e+02\n0 6559     -7.452002e+01 -5.507500e+02\n4 6559     -7.027300e+02 -3.282700e+02\n9 6559     1.603500e+02 -4.321000e+02\n0 6560     1.111000e+02 -5.511300e+02\n7 6560     1.194500e+02 -4.165500e+02\n0 6561     3.295000e+02 -5.509000e+02\n12 6561     5.158800e+02 -4.796300e+02\n0 6562     2.389000e+02 -5.517700e+02\n6 6562     4.105600e+02 -5.312100e+02\n7 6562     2.418400e+02 -3.916300e+02\n10 6562     2.393800e+02 -4.667800e+02\n0 6563     2.535999e+01 -5.531899e+02\n2 6563     3.871500e+02 -6.072700e+02\n0 6564     6.512900e+02 -5.558101e+02\n7 6564     6.172500e+02 -3.139400e+02\n0 6565     5.790200e+02 -5.563500e+02\n7 6565     5.546500e+02 -3.283600e+02\n10 6565     6.291200e+02 -4.363900e+02\n0 6566     4.189001e+01 -5.591600e+02\n2 6566     4.087300e+02 -6.058900e+02\n7 6566     5.387000e+01 -4.386000e+02\n12 6566     2.028700e+02 -5.897300e+02\n0 6567     4.189001e+01 -5.591600e+02\n2 6567     4.087300e+02 -6.058900e+02\n7 6567     5.387000e+01 -4.386000e+02\n9 6567     2.612900e+02 -3.953200e+02\n12 6567     2.028700e+02 -5.897300e+02\n0 6568     1.920900e+02 -5.619500e+02\n7 6568     2.001000e+02 -4.103200e+02\n10 6568     1.871800e+02 -4.835601e+02\n0 6569     4.395200e+02 -5.620000e+02\n7 6569     4.309800e+02 -3.613200e+02\n0 6570     4.165300e+02 -5.624000e+02\n7 6570     4.099600e+02 -3.658900e+02\n0 6571     3.284998e+01 -5.628600e+02\n2 6571     4.026700e+02 -6.126899e+02\n12 6571     1.944600e+02 -5.979100e+02\n0 6572     1.294800e+02 -5.631600e+02\n6 6572     3.071900e+02 -5.868300e+02\n7 6572     1.400800e+02 -4.242400e+02\n10 6572     1.155500e+02 -4.914500e+02\n0 6573     2.425000e+02 -5.636600e+02\n7 6573     2.480699e+02 -4.016000e+02\n0 6574     2.425000e+02 -5.636600e+02\n6 6574     4.214200e+02 -5.409700e+02\n7 6574     2.480699e+02 -4.016000e+02\n12 6574     4.297900e+02 -5.231200e+02\n0 6575     2.425000e+02 -5.636600e+02\n6 6575     4.214200e+02 -5.409700e+02\n7 6575     2.480699e+02 -4.016000e+02\n12 6575     4.297900e+02 -5.231200e+02\n0 6576     -2.059003e+01 -5.640100e+02\n4 6576     -7.310200e+02 -3.733000e+02\n6 6576     1.506600e+02 -6.528900e+02\n7 6576     -6.099976e+00 -4.561400e+02\n9 6576     2.146000e+02 -4.211100e+02\n10 6576     -5.587000e+01 -5.100100e+02\n12 6576     1.321800e+02 -6.184200e+02\n0 6577     6.414200e+02 -5.646600e+02\n7 6577     6.109200e+02 -3.241200e+02\n10 6577     7.016700e+02 -4.397800e+02\n0 6578     1.414301e+02 -5.656600e+02\n6 6578     3.201800e+02 -5.851801e+02\n0 6579     7.461200e+02 -5.660100e+02\n7 6579     7.001200e+02 -3.049900e+02\n0 6580     -2.326001e+01 -5.674500e+02\n6 6580     1.500400e+02 -6.574600e+02\n10 6580     -5.853998e+01 -5.138900e+02\n0 6581     1.169400e+02 -5.690699e+02\n6 6581     2.981500e+02 -5.983300e+02\n0 6582     -2.151001e+01 -5.696300e+02\n7 6582     -5.719971e+00 -4.620400e+02\n10 6582     -5.622998e+01 -5.160000e+02\n0 6583     -2.151001e+01 -5.696300e+02\n6 6583     1.532200e+02 -6.585200e+02\n7 6583     -5.719971e+00 -4.620400e+02\n10 6583     -5.622998e+01 -5.160000e+02\n0 6584     3.813700e+02 -5.783400e+02\n7 6584     3.813900e+02 -3.873600e+02\n0 6585     6.638000e+01 -5.814301e+02\n7 6585     8.365002e+01 -4.547200e+02\n10 6585     4.528003e+01 -5.197700e+02\n0 6586     3.992100e+02 -5.812300e+02\n7 6586     3.986600e+02 -3.865500e+02\n10 6586     4.255900e+02 -4.837800e+02\n12 6586     6.065100e+02 -4.878400e+02\n0 6587     6.232001e+01 -5.842600e+02\n7 6587     8.039001e+01 -4.582800e+02\n10 6587     4.152002e+01 -5.234700e+02\n12 6587     2.395100e+02 -6.095200e+02\n0 6588     6.642700e+02 -5.854301e+02\n7 6588     6.351700e+02 -3.380700e+02\n10 6588     7.299600e+02 -4.611300e+02\n0 6589     6.642700e+02 -5.854301e+02\n7 6589     6.351700e+02 -3.380700e+02\n10 6589     7.299600e+02 -4.611300e+02\n0 6590     -5.850900e+02 5.859000e+02\n5 6590     -1.484300e+02 -5.990997e+01\n13 6590     -2.657700e+02 2.152800e+02\n14 6590     -2.329000e+02 -1.581000e+02\n0 6591     2.479500e+02 5.854900e+02\n2 6591     -8.077002e+01 3.547300e+02\n14 6591     5.482700e+02 -1.380900e+02\n0 6592     -5.220400e+02 5.850200e+02\n2 6592     -8.185600e+02 3.706600e+02\n5 6592     -8.931000e+01 -6.138000e+01\n8 6592     -5.912800e+02 2.736200e+02\n11 6592     -2.989000e+02 -1.990400e+02\n13 6592     -2.166500e+02 2.174400e+02\n0 6593     -5.285500e+02 5.832000e+02\n2 6593     -8.246900e+02 3.677000e+02\n5 6593     -9.444000e+01 -6.394000e+01\n8 6593     -5.952500e+02 2.711900e+02\n0 6594     3.718900e+02 5.831500e+02\n2 6594     2.300000e+01 3.527100e+02\n3 6594     -1.226300e+02 1.751001e+01\n6 6594     -9.760001e+01 6.989200e+02\n8 6594     9.970001e+01 2.775600e+02\n9 6594     -1.354300e+02 3.809600e+02\n11 6594     4.745800e+02 -1.744800e+02\n13 6594     4.805699e+02 2.632800e+02\n14 6594     6.685100e+02 -1.331500e+02\n0 6595     -3.304100e+02 5.822500e+02\n2 6595     -6.150600e+02 3.596400e+02\n5 6595     9.082001e+01 -6.604999e+01\n11 6595     -1.407400e+02 -2.009100e+02\n12 6595     -6.900300e+02 5.649700e+02\n13 6595     -6.778998e+01 2.230400e+02\n14 6595     3.669983e+00 -1.597000e+02\n0 6596     -3.304100e+02 5.822500e+02\n5 6596     9.082001e+01 -6.604999e+01\n11 6596     -1.407400e+02 -2.009100e+02\n12 6596     -6.900300e+02 5.649700e+02\n13 6596     -6.778998e+01 2.230400e+02\n14 6596     3.669983e+00 -1.597000e+02\n0 6597     -1.819300e+02 5.820100e+02\n2 6597     -4.679500e+02 3.550700e+02\n5 6597     2.324900e+02 -6.634003e+01\n13 6597     4.770001e+01 2.293700e+02\n14 6597     1.423700e+02 -1.578300e+02\n0 6598     4.443800e+02 5.820000e+02\n2 6598     8.172998e+01 3.515700e+02\n3 6598     -6.804999e+01 1.656000e+01\n6 6598     -2.362000e+01 7.112600e+02\n8 6598     1.492400e+02 2.779800e+02\n9 6598     -8.596997e+01 3.819800e+02\n11 6598     5.403600e+02 -1.711800e+02\n14 6598     7.388199e+02 -1.298500e+02\n0 6599     4.443800e+02 5.820000e+02\n2 6599     8.172998e+01 3.515700e+02\n6 6599     -2.362000e+01 7.112600e+02\n8 6599     1.492400e+02 2.779800e+02\n9 6599     -8.596997e+01 3.819800e+02\n14 6599     7.388199e+02 -1.298500e+02\n0 6600     -3.479300e+02 5.816400e+02\n2 6600     -6.326500e+02 3.596900e+02\n13 6600     -8.135999e+01 2.218600e+02\n14 6600     -1.269000e+01 -1.604800e+02\n0 6601     -4.694200e+02 5.806100e+02\n2 6601     -7.609300e+02 3.626500e+02\n8 6601     -5.445800e+02 2.689400e+02\n14 6601     -1.257300e+02 -1.621400e+02\n0 6602     -4.837800e+02 5.800200e+02\n2 6602     -7.768600e+02 3.621800e+02\n5 6602     -5.420001e+01 -6.667999e+01\n11 6602     -2.687900e+02 -2.038500e+02\n0 6603     -4.837800e+02 5.800200e+02\n5 6603     -5.420001e+01 -6.667999e+01\n0 6604     8.128003e+01 5.801000e+02\n2 6604     -2.243300e+02 3.495700e+02\n0 6605     8.128003e+01 5.801000e+02\n2 6605     -2.243300e+02 3.495700e+02\n0 6606     2.626899e+02 5.797400e+02\n2 6606     -6.744000e+01 3.481900e+02\n3 6606     -2.083300e+02 1.379999e+01\n5 6606     6.624399e+02 -5.985999e+01\n9 6606     -2.124000e+02 3.740700e+02\n0 6607     -3.099600e+02 5.784300e+02\n2 6607     -5.944800e+02 3.546000e+02\n5 6607     1.100900e+02 -6.981000e+01\n8 6607     -4.097300e+02 2.664000e+02\n12 6607     -6.651900e+02 5.627200e+02\n13 6607     -5.190997e+01 2.209000e+02\n14 6607     2.246997e+01 -1.631000e+02\n0 6608     -2.418300e+02 5.784000e+02\n5 6608     1.757100e+02 -6.992999e+01\n11 6608     -6.534003e+01 -2.026800e+02\n12 6608     -5.855200e+02 5.718100e+02\n0 6609     -5.672800e+02 5.771900e+02\n14 6609     -2.171000e+02 -1.664000e+02\n0 6610     -1.847600e+02 5.755200e+02\n2 6610     -4.705800e+02 3.483400e+02\n0 6611     -1.847600e+02 5.755200e+02\n2 6611     -4.705800e+02 3.483400e+02\n3 6611     -5.941400e+02 1.804999e+01\n5 6611     2.295400e+02 -7.314001e+01\n12 6611     -5.207400e+02 5.742600e+02\n13 6611     4.556000e+01 2.237300e+02\n14 6611     1.396000e+02 -1.643100e+02\n0 6612     2.736300e+02 5.754300e+02\n6 6612     -1.973900e+02 6.710900e+02\n0 6613     -4.390100e+02 5.732500e+02\n2 6613     -7.283000e+02 3.526500e+02\n11 6613     -2.314900e+02 -2.083400e+02\n14 6613     -9.821997e+01 -1.697400e+02\n0 6614     2.771300e+02 5.729000e+02\n2 6614     -5.409998e+01 3.411700e+02\n5 6614     6.775200e+02 -6.619000e+01\n13 6614     4.058800e+02 2.481900e+02\n14 6614     5.774600e+02 -1.490400e+02\n0 6615     -5.036200e+02 5.715200e+02\n2 6615     -7.985300e+02 3.532200e+02\n5 6615     -7.402002e+01 -7.534998e+01\n8 6615     -5.744400e+02 2.602800e+02\n14 6615     -1.589300e+02 -1.714200e+02\n0 6616     3.909100e+02 5.715500e+02\n2 6616     4.027002e+01 3.412600e+02\n5 6616     7.916899e+02 -6.314001e+01\n6 6616     -7.577002e+01 6.885000e+02\n8 6616     1.146400e+02 2.687400e+02\n9 6616     -1.205400e+02 3.715800e+02\n11 6616     4.938700e+02 -1.830600e+02\n13 6616     4.961200e+02 2.551400e+02\n14 6616     6.877900e+02 -1.433100e+02\n0 6617     4.225000e+02 5.712500e+02\n2 6617     6.608002e+01 3.406200e+02\n6 6617     -4.350000e+01 6.938900e+02\n9 6617     -9.875000e+01 3.715800e+02\n11 6617     5.225300e+02 -1.814900e+02\n0 6618     4.395800e+02 5.710000e+02\n2 6618     7.978998e+01 3.405400e+02\n11 6618     5.384399e+02 -1.808200e+02\n14 6618     7.359000e+02 -1.406700e+02\n0 6619     3.745300e+02 5.694400e+02\n2 6619     2.709998e+01 3.390800e+02\n5 6619     7.753900e+02 -6.571997e+01\n6 6619     -9.226001e+01 6.830700e+02\n8 6619     1.037300e+02 2.666500e+02\n9 6619     -1.314900e+02 3.692600e+02\n11 6619     4.787600e+02 -1.858800e+02\n13 6619     4.833800e+02 2.524800e+02\n14 6619     6.720200e+02 -1.464200e+02\n0 6620     -2.258200e+02 5.681900e+02\n5 6620     1.896300e+02 -8.059003e+01\n12 6620     -5.659700e+02 5.601700e+02\n0 6621     5.688000e+02 5.677000e+02\n2 6621     3.168600e+02 4.669800e+02\n3 6621     1.716200e+02 1.309000e+02\n6 6621     2.320700e+02 7.443300e+02\n8 6621     3.285800e+02 3.604900e+02\n9 6621     1.216700e+02 4.899900e+02\n13 6621     7.048300e+02 2.746200e+02\n0 6622     -1.460200e+02 5.671100e+02\n2 6622     -4.329500e+02 3.379700e+02\n3 6622     -5.577000e+02 7.539978e+00\n12 6622     -4.760300e+02 5.694500e+02\n14 6622     1.754000e+02 -1.714800e+02\n0 6623     2.684600e+02 5.668800e+02\n4 6623     3.889001e+01 -5.388700e+02\n6 6623     -1.998800e+02 6.603500e+02\n8 6623     3.128003e+01 2.625200e+02\n9 6623     -2.045500e+02 3.642700e+02\n11 6623     3.847600e+02 -1.932200e+02\n13 6623     3.995699e+02 2.425700e+02\n14 6623     5.694600e+02 -1.555400e+02\n0 6624     2.554200e+02 5.665400e+02\n2 6624     -7.215002e+01 3.341900e+02\n9 6624     -2.160000e+02 3.621500e+02\n11 6624     3.704500e+02 -1.957400e+02\n14 6624     5.566000e+02 -1.566600e+02\n0 6625     -4.456600e+02 5.654500e+02\n2 6625     -7.358200e+02 3.435300e+02\n13 6625     -1.580100e+02 2.043700e+02\n0 6626     4.295000e+02 5.647400e+02\n9 6626     -9.256000e+01 3.665400e+02\n0 6627     -4.489400e+02 5.641800e+02\n2 6627     -7.386800e+02 3.417800e+02\n8 6627     -5.268700e+02 2.538800e+02\n11 6627     -2.404800e+02 -2.159100e+02\n0 6628     1.274700e+02 5.637000e+02\n2 6628     -1.813900e+02 3.321500e+02\n3 6628     -3.167700e+02 -2.039978e+00\n5 6628     5.307300e+02 -8.000000e+01\n6 6628     -3.506100e+02 6.290000e+02\n9 6628     -3.084700e+02 3.570400e+02\n11 6628     2.565300e+02 -2.044200e+02\n12 6628     -1.802600e+02 6.004300e+02\n14 6628     4.352100e+02 -1.652100e+02\n0 6629     -9.821997e+01 5.612400e+02\n5 6629     3.117900e+02 -8.720001e+01\n0 6630     5.076100e+02 5.614900e+02\n2 6630     2.513101e+02 4.410100e+02\n3 6630     1.088400e+02 1.056200e+02\n6 6630     1.552800e+02 7.221800e+02\n9 6630     6.538000e+01 4.656000e+02\n11 6630     5.855800e+02 -1.867000e+02\n13 6630     6.465200e+02 2.635300e+02\n14 6630     8.741000e+02 -1.382800e+02\n0 6631     2.569200e+02 5.600700e+02\n2 6631     -6.921997e+01 3.274700e+02\n3 6631     -2.101000e+02 -6.650024e+00\n4 6631     3.537000e+01 -5.299700e+02\n5 6631     6.585500e+02 -7.957001e+01\n6 6631     -2.120900e+02 6.491300e+02\n8 6631     2.316998e+01 2.560900e+02\n9 6631     -2.127900e+02 3.564800e+02\n11 6631     3.739900e+02 -2.006900e+02\n12 6631     -4.634003e+01 6.118000e+02\n13 6631     3.905200e+02 2.360100e+02\n14 6631     5.589000e+02 -1.630800e+02\n0 6632     2.517100e+02 5.590300e+02\n2 6632     -7.439001e+01 3.262100e+02\n5 6632     6.522600e+02 -8.126001e+01\n6 6632     -2.180800e+02 6.464800e+02\n8 6632     1.885999e+01 2.548400e+02\n9 6632     -2.172800e+02 3.551600e+02\n11 6632     3.685200e+02 -2.020700e+02\n13 6632     3.863101e+02 2.349200e+02\n14 6632     5.536400e+02 -1.643200e+02\n0 6633     6.065100e+02 5.574100e+02\n8 6633     3.625300e+02 3.615500e+02\n9 6633     1.579900e+02 4.928800e+02\n11 6633     6.722200e+02 -1.840400e+02\n13 6633     7.416600e+02 2.699700e+02\n0 6634     2.665699e+02 5.571800e+02\n2 6634     -6.115997e+01 3.249600e+02\n8 6634     3.017999e+01 2.542500e+02\n0 6635     2.297100e+02 5.563700e+02\n2 6635     -9.240997e+01 3.233300e+02\n5 6635     6.307700e+02 -8.469000e+01\n8 6635     3.650024e+00 2.524800e+02\n12 6635     -7.309998e+01 6.045600e+02\n13 6635     3.698600e+02 2.314200e+02\n14 6635     5.333700e+02 -1.680200e+02\n0 6636     2.569200e+02 5.563800e+02\n12 6636     -4.437000e+01 6.087700e+02\n0 6637     5.626600e+02 5.566900e+02\n2 6637     3.130100e+02 4.552500e+02\n3 6637     1.681000e+02 1.200200e+02\n6 6637     2.272600e+02 7.312000e+02\n8 6637     3.253300e+02 3.510600e+02\n13 6637     7.001400e+02 2.653600e+02\n0 6638     4.269100e+02 5.554700e+02\n11 6638     5.293500e+02 -1.944400e+02\n13 6638     5.256600e+02 2.437100e+02\n14 6638     7.251899e+02 -1.577400e+02\n0 6639     -4.528300e+02 5.547900e+02\n2 6639     -7.439400e+02 3.319300e+02\n14 6639     -1.134200e+02 -1.874200e+02\n0 6640     -4.410500e+02 5.543000e+02\n7 6640     -6.829600e+02 5.822100e+02\n11 6640     -2.341400e+02 -2.235000e+02\n13 6640     -1.547300e+02 1.955600e+02\n14 6640     -1.023300e+02 -1.880300e+02\n0 6641     2.683400e+02 5.542900e+02\n2 6641     -5.881000e+01 3.215500e+02\n4 6641     3.071002e+01 -5.379500e+02\n5 6641     6.698600e+02 -8.591998e+01\n6 6641     -1.979000e+02 6.439000e+02\n8 6641     3.238000e+01 2.514500e+02\n9 6641     -2.035100e+02 3.513300e+02\n11 6641     3.859301e+02 -2.051500e+02\n12 6641     -3.231000e+01 6.069100e+02\n13 6641     4.008800e+02 2.319600e+02\n0 6642     -4.337200e+02 5.541800e+02\n5 6642     -1.040997e+01 -9.321997e+01\n7 6642     -6.752300e+02 5.822800e+02\n11 6642     -2.281600e+02 -2.238800e+02\n12 6642     -8.096100e+02 5.176800e+02\n13 6642     -1.492100e+02 1.956200e+02\n14 6642     -9.547998e+01 -1.882700e+02\n0 6643     3.513000e+01 5.537300e+02\n2 6643     -2.635300e+02 3.213100e+02\n3 6643     -3.949000e+02 -1.201001e+01\n5 6643     4.397300e+02 -9.247998e+01\n6 6643     -4.494300e+02 5.987900e+02\n8 6643     -1.370900e+02 2.471800e+02\n9 6643     -3.779600e+02 3.449400e+02\n0 6644     3.088300e+02 5.534000e+02\n11 6644     4.213900e+02 -2.037600e+02\n13 6644     4.318500e+02 2.339500e+02\n14 6644     6.095300e+02 -1.668700e+02\n0 6645     -4.299500e+02 5.531300e+02\n2 6645     -7.193300e+02 3.281900e+02\n5 6645     -6.989990e+00 -9.417999e+01\n0 6646     3.183500e+02 5.529400e+02\n12 6646     1.740997e+01 6.134500e+02\n13 6646     4.397400e+02 2.342000e+02\n0 6647     3.183500e+02 5.529400e+02\n2 6647     -1.709998e+01 3.200700e+02\n0 6648     5.026600e+02 5.527300e+02\n2 6648     2.480500e+02 4.317100e+02\n6 6648     1.508700e+02 7.116500e+02\n9 6648     6.259998e+01 4.574400e+02\n13 6648     6.429100e+02 2.560400e+02\n14 6648     8.700100e+02 -1.467900e+02\n0 6649     4.372900e+02 5.517200e+02\n9 6649     -8.567999e+01 3.550900e+02\n13 6649     5.335400e+02 2.416200e+02\n14 6649     7.348800e+02 -1.608300e+02\n0 6650     4.679399e+02 5.512000e+02\n14 6650     7.663700e+02 -1.588200e+02\n0 6651     -4.452800e+02 5.508900e+02\n14 6651     -1.060000e+02 -1.913900e+02\n0 6652     -6.175100e+02 5.502900e+02\n11 6652     -3.790000e+02 -2.265000e+02\n13 6652     -2.924300e+02 1.850400e+02\n14 6652     -2.673700e+02 -1.925700e+02\n0 6653     -6.175100e+02 5.502900e+02\n11 6653     -3.790000e+02 -2.265000e+02\n13 6653     -2.924300e+02 1.850400e+02\n14 6653     -2.673700e+02 -1.925700e+02\n0 6654     3.704999e+01 5.504600e+02\n9 6654     -3.746200e+02 3.425800e+02\n12 6654     -2.730200e+02 5.746800e+02\n0 6655     2.293600e+02 5.503800e+02\n4 6655     3.042999e+01 -5.100699e+02\n14 6655     5.332400e+02 -1.734200e+02\n0 6656     3.217400e+02 5.498100e+02\n2 6656     -1.382001e+01 3.169400e+02\n5 6656     7.228199e+02 -8.873999e+01\n6 6656     -1.426000e+02 6.483800e+02\n8 6656     6.923999e+01 2.483500e+02\n9 6656     -1.654100e+02 3.491400e+02\n11 6656     4.333400e+02 -2.061300e+02\n12 6656     2.134998e+01 6.084400e+02\n13 6656     4.423900e+02 2.317500e+02\n14 6656     6.225699e+02 -1.698800e+02\n0 6657     4.625300e+02 5.498300e+02\n13 6657     5.544600e+02 2.421200e+02\n14 6657     7.608900e+02 -1.608500e+02\n0 6658     2.065100e+02 5.494400e+02\n2 6658     -1.116900e+02 3.161000e+02\n5 6658     6.078900e+02 -9.265997e+01\n6 6658     -2.635700e+02 6.253600e+02\n12 6658     -9.622998e+01 5.929500e+02\n14 6658     5.108700e+02 -1.761300e+02\n0 6659     5.704000e+02 5.488100e+02\n6 6659     2.384400e+02 7.237000e+02\n0 6660     -7.284600e+02 5.483600e+02\n4 6660     7.520001e+01 4.651001e+01\n5 6660     -3.968600e+02 -1.037500e+02\n13 6660     -4.624500e+02 1.641900e+02\n14 6660     -4.727300e+02 -2.050400e+02\n0 6661     -3.254100e+02 5.484800e+02\n2 6661     -6.096500e+02 3.199000e+02\n5 6661     9.251001e+01 -9.964001e+01\n7 6661     -5.605900e+02 5.863000e+02\n13 6661     -6.459998e+01 1.952200e+02\n14 6661     5.640015e+00 -1.930300e+02\n0 6662     -3.254100e+02 5.484800e+02\n7 6662     -5.605900e+02 5.863000e+02\n0 6663     6.672700e+02 5.480800e+02\n2 6663     4.718101e+02 5.274200e+02\n3 6663     3.224200e+02 1.893400e+02\n6 6663     4.013400e+02 7.555700e+02\n0 6664     6.672700e+02 5.480800e+02\n2 6664     4.718101e+02 5.274200e+02\n3 6664     3.224200e+02 1.893400e+02\n6 6664     4.013400e+02 7.555700e+02\n13 6664     8.244800e+02 2.722000e+02\n0 6665     5.488101e+02 5.470600e+02\n2 6665     2.998400e+02 4.417900e+02\n6 6665     2.119200e+02 7.164800e+02\n8 6665     3.145300e+02 3.400300e+02\n9 6665     1.082500e+02 4.676700e+02\n13 6665     6.876300e+02 2.561900e+02\n0 6666     5.522998e+01 5.465200e+02\n2 6666     -2.440300e+02 3.138800e+02\n8 6666     -1.213200e+02 2.419300e+02\n9 6666     -3.612600e+02 3.393800e+02\n11 6666     1.934500e+02 -2.216500e+02\n12 6666     -2.534500e+02 5.724700e+02\n13 6666     2.327600e+02 2.125200e+02\n0 6667     5.522998e+01 5.465200e+02\n2 6667     -2.440300e+02 3.138800e+02\n8 6667     -1.213200e+02 2.419300e+02\n9 6667     -3.612600e+02 3.393800e+02\n11 6667     1.934500e+02 -2.216500e+02\n13 6667     2.327600e+02 2.125200e+02\n0 6668     5.295300e+02 5.432800e+02\n2 6668     2.799399e+02 4.320400e+02\n3 6668     1.366200e+02 9.771997e+01\n6 6668     1.880200e+02 7.081100e+02\n9 6668     9.075000e+01 4.579700e+02\n13 6668     6.697200e+02 2.514700e+02\n0 6669     6.541300e+02 5.425300e+02\n3 6669     3.072000e+02 1.785300e+02\n6 6669     3.841900e+02 7.458400e+02\n8 6669     4.387000e+02 3.953700e+02\n9 6669     2.437900e+02 5.355000e+02\n11 6669     7.106801e+02 -1.954500e+02\n0 6670     6.541300e+02 5.425300e+02\n6 6670     3.841900e+02 7.458400e+02\n0 6671     6.644700e+02 5.416800e+02\n2 6671     4.681400e+02 5.189000e+02\n3 6671     3.190000e+02 1.814200e+02\n6 6671     3.974400e+02 7.476900e+02\n8 6671     4.482800e+02 3.978400e+02\n9 6671     2.538600e+02 5.385400e+02\n13 6671     8.217200e+02 2.667900e+02\n0 6672     -5.940200e+02 5.412500e+02\n5 6672     -1.643400e+02 -1.041600e+02\n13 6672     -2.751700e+02 1.785800e+02\n14 6672     -2.471100e+02 -2.013300e+02\n0 6673     4.597200e+02 5.367000e+02\n14 6673     7.598700e+02 -1.740900e+02\n0 6674     4.516400e+02 5.358700e+02\n2 6674     9.490002e+01 3.052500e+02\n13 6674     5.466801e+02 2.298800e+02\n14 6674     7.521000e+02 -1.762500e+02\n0 6675     1.594600e+02 5.351600e+02\n12 6675     -1.414800e+02 5.712400e+02\n0 6676     6.692200e+02 5.349500e+02\n2 6676     4.732400e+02 5.140200e+02\n6 6676     4.037600e+02 7.415700e+02\n11 6676     7.260500e+02 -2.011900e+02\n0 6677     6.692200e+02 5.349500e+02\n2 6677     4.732400e+02 5.140200e+02\n6 6677     4.037600e+02 7.415700e+02\n8 6677     4.530300e+02 3.938100e+02\n11 6677     7.260500e+02 -2.011900e+02\n0 6678     1.561000e+02 5.324900e+02\n11 6678     2.853700e+02 -2.296200e+02\n12 6678     -1.447800e+02 5.677600e+02\n13 6678     3.123199e+02 2.066500e+02\n14 6678     4.629600e+02 -1.963300e+02\n0 6679     3.054600e+02 5.315000e+02\n14 6679     6.281899e+02 -1.844100e+02\n0 6680     -4.449200e+02 5.307200e+02\n5 6680     -2.384003e+01 -1.167700e+02\n0 6681     4.580500e+02 5.306100e+02\n2 6681     1.012500e+02 2.991400e+02\n13 6681     5.515000e+02 2.250900e+02\n14 6681     7.582500e+02 -1.811300e+02\n0 6682     -2.327002e+01 5.291400e+02\n3 6682     -4.445200e+02 -3.852002e+01\n0 6683     -4.445800e+02 5.269500e+02\n2 6683     -7.349800e+02 2.969500e+02\n12 6683     -8.181800e+02 4.827300e+02\n14 6683     -1.088600e+02 -2.154900e+02\n0 6684     6.056200e+02 5.269100e+02\n8 6684     3.681300e+02 3.402300e+02\n13 6684     7.445400e+02 2.454700e+02\n0 6685     -6.115000e+02 5.261600e+02\n13 6685     -2.895300e+02 1.651800e+02\n14 6685     -2.659300e+02 -2.166600e+02\n0 6686     7.179200e+02 5.238300e+02\n2 6686     5.278900e+02 5.230100e+02\n3 6686     3.750000e+02 1.859200e+02\n6 6686     4.662000e+02 7.420500e+02\n8 6686     4.977500e+02 4.006200e+02\n9 6686     3.048199e+02 5.435400e+02\n13 6686     8.749000e+02 2.583500e+02\n0 6687     -5.576600e+02 5.224700e+02\n5 6687     -1.324000e+02 -1.229300e+02\n7 6687     -8.053000e+02 5.366200e+02\n13 6687     -2.477100e+02 1.644800e+02\n14 6687     -2.160200e+02 -2.201200e+02\n0 6688     4.342700e+02 5.222100e+02\n2 6688     7.912000e+01 2.862400e+02\n3 6688     -7.040997e+01 -4.628003e+01\n12 6688     1.363700e+02 5.906900e+02\n0 6689     -2.933100e+02 5.189500e+02\n2 6689     -5.763800e+02 2.839000e+02\n12 6689     -6.353600e+02 4.916000e+02\n0 6690     3.657800e+02 5.180000e+02\n2 6690     2.762000e+01 2.834400e+02\n6 6690     -9.044000e+01 6.172400e+02\n12 6690     7.142999e+01 5.771100e+02\n13 6690     4.790000e+02 2.078600e+02\n0 6691     3.943700e+02 5.175900e+02\n2 6691     5.015002e+01 2.839400e+02\n6 6691     -6.353003e+01 6.221100e+02\n0 6692     7.169983e+00 5.138600e+02\n2 6692     -2.860500e+02 2.760800e+02\n5 6692     4.122900e+02 -1.345400e+02\n6 6692     -4.737700e+02 5.408100e+02\n7 6692     -2.216200e+02 5.830000e+02\n8 6692     -1.555800e+02 2.110900e+02\n9 6692     -3.957900e+02 3.045300e+02\n11 6692     1.528500e+02 -2.516500e+02\n14 6692     3.204100e+02 -2.209900e+02\n0 6693     7.169983e+00 5.138600e+02\n2 6693     -2.860500e+02 2.760800e+02\n5 6693     4.122900e+02 -1.345400e+02\n7 6693     -2.216200e+02 5.830000e+02\n8 6693     -1.555800e+02 2.110900e+02\n9 6693     -3.957900e+02 3.045300e+02\n14 6693     3.204100e+02 -2.209900e+02\n0 6694     -2.036300e+02 5.136900e+02\n3 6694     -6.126800e+02 -5.227002e+01\n0 6695     -1.720800e+02 5.126700e+02\n5 6695     2.377000e+02 -1.375700e+02\n7 6695     -3.987300e+02 5.635600e+02\n11 6695     -5.520020e+00 -2.567800e+02\n13 6695     5.498999e+01 1.719400e+02\n14 6695     1.488101e+02 -2.268900e+02\n0 6696     -1.720800e+02 5.126700e+02\n2 6696     -4.558900e+02 2.754000e+02\n7 6696     -3.987300e+02 5.635600e+02\n13 6696     5.498999e+01 1.719400e+02\n14 6696     1.488101e+02 -2.268900e+02\n0 6697     6.646100e+02 5.126200e+02\n2 6697     4.743000e+02 4.931100e+02\n3 6697     3.256300e+02 1.580900e+02\n6 6697     4.033700e+02 7.165900e+02\n8 6697     4.532900e+02 3.765700e+02\n9 6697     2.591700e+02 5.166800e+02\n11 6697     7.258300e+02 -2.200100e+02\n13 6697     8.243700e+02 2.438800e+02\n0 6698     -1.326001e+01 5.096800e+02\n2 6698     -3.041200e+02 2.716900e+02\n6 6698     -4.957700e+02 5.316700e+02\n7 6698     -2.411100e+02 5.765800e+02\n8 6698     -1.708200e+02 2.072300e+02\n9 6698     -4.109400e+02 2.998900e+02\n12 6698     -3.203200e+02 5.186100e+02\n0 6699     -1.326001e+01 5.096800e+02\n2 6699     -3.041200e+02 2.716900e+02\n6 6699     -4.957700e+02 5.316700e+02\n7 6699     -2.411100e+02 5.765800e+02\n8 6699     -1.708200e+02 2.072300e+02\n9 6699     -4.109400e+02 2.998900e+02\n12 6699     -3.203200e+02 5.186100e+02\n0 6700     -3.036300e+02 5.091200e+02\n2 6700     -5.867500e+02 2.721900e+02\n5 6700     1.098600e+02 -1.405800e+02\n7 6700     -5.322300e+02 5.465900e+02\n8 6700     -4.022400e+02 2.017600e+02\n11 6700     -1.199400e+02 -2.609500e+02\n12 6700     -6.457900e+02 4.781700e+02\n0 6701     -3.036300e+02 5.091200e+02\n2 6701     -5.867500e+02 2.721900e+02\n5 6701     1.098600e+02 -1.405800e+02\n7 6701     -5.322300e+02 5.465900e+02\n8 6701     -4.022400e+02 2.017600e+02\n11 6701     -1.199400e+02 -2.609500e+02\n12 6701     -6.457900e+02 4.781700e+02\n0 6702     -5.282200e+02 5.084400e+02\n2 6702     -8.279600e+02 2.765500e+02\n5 6702     -1.065000e+02 -1.380300e+02\n7 6702     -7.702400e+02 5.237300e+02\n8 6702     -5.973200e+02 1.996100e+02\n13 6702     -2.254100e+02 1.536400e+02\n14 6702     -1.902600e+02 -2.342300e+02\n0 6703     -5.213200e+02 5.083800e+02\n2 6703     -8.198000e+02 2.743800e+02\n5 6703     -9.971997e+01 -1.397800e+02\n7 6703     -7.618300e+02 5.238900e+02\n11 6703     -3.036700e+02 -2.608600e+02\n13 6703     -2.198200e+02 1.538000e+02\n14 6703     -1.833900e+02 -2.345400e+02\n0 6704     6.587700e+02 5.085400e+02\n2 6704     4.695000e+02 4.878800e+02\n3 6704     3.212400e+02 1.527200e+02\n6 6704     3.977400e+02 7.107500e+02\n8 6704     4.491400e+02 3.721800e+02\n9 6704     2.554100e+02 5.114900e+02\n11 6704     7.217100e+02 -2.246700e+02\n13 6704     8.194500e+02 2.399300e+02\n0 6705     3.569399e+02 5.068100e+02\n2 6705     2.159998e+01 2.722600e+02\n9 6705     -1.340400e+02 3.110600e+02\n13 6705     4.726801e+02 1.984100e+02\n14 6705     6.610300e+02 -2.118100e+02\n0 6706     3.569399e+02 5.068100e+02\n2 6706     2.159998e+01 2.722600e+02\n8 6706     9.883002e+01 2.135100e+02\n9 6706     -1.340400e+02 3.110600e+02\n13 6706     4.726801e+02 1.984100e+02\n14 6706     6.610300e+02 -2.118100e+02\n0 6707     -5.240600e+02 5.059200e+02\n2 6707     -8.231300e+02 2.734800e+02\n5 6707     -1.029400e+02 -1.407300e+02\n7 6707     -7.649600e+02 5.207000e+02\n11 6707     -3.061900e+02 -2.634800e+02\n14 6707     -1.862900e+02 -2.360400e+02\n0 6708     -6.940700e+02 5.057400e+02\n5 6708     -3.413400e+02 -1.434500e+02\n11 6708     -4.358600e+02 -2.605300e+02\n0 6709     2.108002e+01 5.054400e+02\n14 6709     3.338900e+02 -2.290300e+02\n0 6710     7.099900e+02 5.024300e+02\n2 6710     5.218500e+02 4.994300e+02\n6 6710     4.595400e+02 7.178200e+02\n9 6710     3.001200e+02 5.233900e+02\n0 6711     -6.774800e+02 5.004400e+02\n4 6711     5.347998e+01 1.750000e+01\n5 6711     -3.111300e+02 -1.501400e+02\n0 6712     5.696000e+02 4.994200e+02\n2 6712     3.336300e+02 4.065900e+02\n6 6712     2.495200e+02 6.689000e+02\n0 6713     3.452300e+02 4.973800e+02\n6 6713     -1.072000e+02 5.882000e+02\n11 6713     4.617700e+02 -2.496500e+02\n13 6713     4.639800e+02 1.897700e+02\n14 6713     6.508400e+02 -2.218300e+02\n0 6714     -6.858600e+02 4.959700e+02\n4 6714     5.140002e+01 2.528998e+01\n5 6714     -3.320000e+02 -1.542400e+02\n11 6714     -4.310900e+02 -2.686800e+02\n13 6714     -4.064100e+02 1.278800e+02\n14 6714     -4.097300e+02 -2.531500e+02\n0 6715     6.903101e+02 4.950500e+02\n2 6715     5.048500e+02 4.867700e+02\n6 6715     4.378400e+02 7.042800e+02\n8 6715     4.784900e+02 3.711000e+02\n9 6715     2.850900e+02 5.114100e+02\n13 6715     8.515100e+02 2.325600e+02\n0 6716     7.617900e+02 4.918000e+02\n2 6716     5.778199e+02 5.074900e+02\n3 6716     4.201000e+02 1.723900e+02\n6 6716     5.234200e+02 7.178500e+02\n8 6716     5.398101e+02 3.873700e+02\n9 6716     3.451100e+02 5.310100e+02\n0 6717     -6.183100e+02 4.905300e+02\n13 6717     -2.976000e+02 1.352900e+02\n14 6717     -2.782400e+02 -2.520400e+02\n0 6718     -3.162000e+01 4.905700e+02\n2 6718     -3.199100e+02 2.491300e+02\n7 6718     -2.564800e+02 5.550100e+02\n9 6718     -4.235300e+02 2.799200e+02\n0 6719     -3.162000e+01 4.905700e+02\n2 6719     -3.199100e+02 2.491300e+02\n7 6719     -2.564800e+02 5.550100e+02\n9 6719     -4.235300e+02 2.799200e+02\n0 6720     7.788900e+02 4.906400e+02\n6 6720     5.416899e+02 7.213600e+02\n0 6721     5.282600e+02 4.899400e+02\n3 6721     1.465600e+02 5.296002e+01\n6 6721     1.982200e+02 6.501000e+02\n8 6721     3.050600e+02 2.938500e+02\n9 6721     1.020500e+02 4.159200e+02\n0 6722     5.227200e+02 4.895900e+02\n2 6722     2.843199e+02 3.798500e+02\n6 6722     1.922200e+02 6.446500e+02\n9 6722     9.571997e+01 4.136000e+02\n0 6723     -3.038900e+02 4.874200e+02\n2 6723     -5.867000e+02 2.467700e+02\n7 6723     -5.296300e+02 5.236900e+02\n11 6723     -1.204600e+02 -2.788300e+02\n12 6723     -6.424900e+02 4.525900e+02\n0 6724     -2.243500e+02 4.869800e+02\n2 6724     -5.057700e+02 2.445600e+02\n5 6724     1.848900e+02 -1.642600e+02\n7 6724     -4.477100e+02 5.310500e+02\n8 6724     -3.360200e+02 1.817400e+02\n11 6724     -5.170001e+01 -2.791400e+02\n12 6724     -5.506600e+02 4.620900e+02\n0 6725     -1.751100e+02 4.870300e+02\n2 6725     -4.571400e+02 2.455700e+02\n7 6725     -3.989200e+02 5.366700e+02\n0 6726     -4.077600e+02 4.856900e+02\n14 6726     -7.834998e+01 -2.572300e+02\n0 6727     -3.539400e+02 4.855900e+02\n11 6727     -1.637700e+02 -2.804600e+02\n12 6727     -7.016200e+02 4.430400e+02\n14 6727     -2.726001e+01 -2.568400e+02\n0 6728     6.691000e+02 4.853600e+02\n2 6728     4.859500e+02 4.711400e+02\n3 6728     3.369600e+02 1.378900e+02\n6 6728     4.158100e+02 6.890800e+02\n8 6728     4.625300e+02 3.586800e+02\n9 6728     2.696600e+02 4.981100e+02\n11 6728     7.364600e+02 -2.437600e+02\n13 6728     8.321600e+02 2.225600e+02\n0 6729     6.655300e+02 4.814900e+02\n2 6729     4.831899e+02 4.697400e+02\n3 6729     3.345400e+02 1.363600e+02\n6 6729     4.124900e+02 6.873400e+02\n13 6729     8.293800e+02 2.193000e+02\n0 6730     7.043500e+02 4.799300e+02\n6 6730     4.581600e+02 6.923500e+02\n9 6730     3.005400e+02 5.054900e+02\n0 6731     7.559900e+02 4.799200e+02\n6 6731     5.166400e+02 7.047200e+02\n9 6731     3.422200e+02 5.204200e+02\n0 6732     -4.121997e+01 4.787800e+02\n2 6732     -3.280700e+02 2.351300e+02\n7 6732     -2.645600e+02 5.416000e+02\n0 6733     -4.121997e+01 4.787800e+02\n2 6733     -3.280700e+02 2.351300e+02\n6 6733     -5.216000e+02 4.850500e+02\n7 6733     -2.645600e+02 5.416000e+02\n12 6733     -3.452700e+02 4.776300e+02\n0 6734     2.317999e+01 4.778200e+02\n7 6734     -2.010900e+02 5.475200e+02\n0 6735     2.317999e+01 4.778200e+02\n7 6735     -2.010900e+02 5.475200e+02\n0 6736     -6.574500e+02 4.765100e+02\n5 6736     -2.812100e+02 -1.727300e+02\n0 6737     -5.509900e+02 4.763500e+02\n14 6737     -2.166600e+02 -2.664000e+02\n0 6738     -2.898500e+02 4.741900e+02\n2 6738     -5.719300e+02 2.298700e+02\n8 6738     -3.897600e+02 1.695800e+02\n12 6738     -6.237200e+02 4.368700e+02\n0 6739     4.982100e+02 4.728000e+02\n3 6739     1.201200e+02 2.520001e+01\n8 6739     2.831200e+02 2.708000e+02\n0 6740     2.610601e+02 4.695500e+02\n2 6740     -5.460999e+01 2.287100e+02\n5 6740     6.641000e+02 -1.763200e+02\n6 6740     -1.904500e+02 5.351900e+02\n7 6740     2.684998e+01 5.632500e+02\n8 6740     3.491998e+01 1.777600e+02\n9 6740     -1.969100e+02 2.708800e+02\n11 6740     3.870200e+02 -2.792300e+02\n12 6740     -2.519000e+01 5.084000e+02\n0 6741     6.363900e+02 4.693500e+02\n2 6741     4.566700e+02 4.466300e+02\n3 6741     3.101700e+02 1.144900e+02\n6 6741     3.805700e+02 6.641800e+02\n8 6741     4.379000e+02 3.385300e+02\n9 6741     2.450500e+02 4.759600e+02\n11 6741     7.101400e+02 -2.596700e+02\n13 6741     8.029900e+02 2.067900e+02\n0 6742     -3.825000e+01 4.682700e+02\n7 6742     -2.603100e+02 5.314700e+02\n14 6742     2.762600e+02 -2.698400e+02\n0 6743     6.919500e+02 4.667800e+02\n2 6743     5.138500e+02 4.640600e+02\n6 6743     4.469100e+02 6.753500e+02\n8 6743     4.848700e+02 3.491100e+02\n9 6743     2.928600e+02 4.896800e+02\n11 6743     7.611300e+02 -2.599800e+02\n0 6744     6.919500e+02 4.667800e+02\n2 6744     5.138500e+02 4.640600e+02\n6 6744     4.469100e+02 6.753500e+02\n8 6744     4.848700e+02 3.491100e+02\n9 6744     2.928600e+02 4.896800e+02\n11 6744     7.611300e+02 -2.599800e+02\n0 6745     7.703600e+02 4.671800e+02\n2 6745     5.893000e+02 4.891200e+02\n0 6746     5.513700e+02 4.652800e+02\n8 6746     3.330500e+02 2.802800e+02\n11 6746     6.414000e+02 -2.670600e+02\n13 6746     6.996801e+02 1.894400e+02\n0 6747     2.195500e+02 4.652100e+02\n2 6747     -9.065002e+01 2.233000e+02\n14 6747     5.282300e+02 -2.627800e+02\n0 6748     2.052600e+02 4.635100e+02\n6 6748     -2.491400e+02 5.155000e+02\n7 6748     -2.510999e+01 5.519000e+02\n8 6748     -4.760010e+00 1.703500e+02\n9 6748     -2.371400e+02 2.626300e+02\n12 6748     -8.225000e+01 4.935500e+02\n14 6748     5.145500e+02 -2.649800e+02\n0 6749     -1.833300e+02 4.623300e+02\n5 6749     2.234301e+02 -1.916700e+02\n8 6749     -3.005500e+02 1.583400e+02\n0 6750     8.306600e+02 4.616400e+02\n2 6750     6.484000e+02 5.047300e+02\n3 6750     4.872200e+02 1.707400e+02\n8 6750     5.989600e+02 3.841400e+02\n9 6750     4.065200e+02 5.298000e+02\n0 6751     1.084998e+01 4.584800e+02\n2 6751     -2.775200e+02 2.135400e+02\n6 6751     -4.593800e+02 4.697400e+02\n8 6751     -1.487000e+02 1.612300e+02\n12 6751     -2.856100e+02 4.612900e+02\n14 6751     3.240601e+02 -2.785100e+02\n0 6752     8.460699e+02 4.577100e+02\n2 6752     6.641500e+02 5.060500e+02\n3 6752     5.011100e+02 1.720500e+02\n9 6752     4.189399e+02 5.311100e+02\n0 6753     2.253998e+01 4.569500e+02\n2 6753     -2.655300e+02 2.111300e+02\n6 6753     -4.445100e+02 4.704300e+02\n7 6753     -1.990800e+02 5.261400e+02\n11 6753     1.695500e+02 -3.000400e+02\n12 6753     -2.717700e+02 4.615000e+02\n0 6754     8.412100e+02 4.565200e+02\n2 6754     6.585699e+02 5.035600e+02\n3 6754     4.968800e+02 1.697800e+02\n9 6754     4.147300e+02 5.291200e+02\n0 6755     3.575300e+02 4.546400e+02\n9 6755     -1.251700e+02 2.622400e+02\n0 6756     3.575300e+02 4.546400e+02\n9 6756     -1.251700e+02 2.622400e+02\n11 6756     4.795200e+02 -2.869400e+02\n0 6757     8.474100e+02 4.537700e+02\n2 6757     6.655800e+02 5.031500e+02\n9 6757     4.209100e+02 5.289000e+02\n0 6758     8.474100e+02 4.537700e+02\n2 6758     6.655800e+02 5.031500e+02\n3 6758     5.032000e+02 1.695900e+02\n9 6758     4.209100e+02 5.289000e+02\n0 6759     5.541600e+02 4.538900e+02\n8 6759     3.370800e+02 2.714700e+02\n13 6759     7.029301e+02 1.809200e+02\n0 6760     6.868199e+02 4.522600e+02\n2 6760     5.122200e+02 4.488500e+02\n3 6760     3.628000e+02 1.177700e+02\n6 6760     4.443600e+02 6.588800e+02\n8 6760     4.840200e+02 3.395600e+02\n9 6760     2.923900e+02 4.796000e+02\n13 6760     8.531899e+02 1.982800e+02\n0 6761     8.400400e+02 4.483400e+02\n9 6761     4.158600e+02 5.219100e+02\n0 6762     2.270300e+02 4.472700e+02\n3 6762     -2.223200e+02 -1.279400e+02\n7 6762     -2.309998e+00 5.370100e+02\n14 6762     5.367100e+02 -2.824000e+02\n0 6763     8.629800e+02 4.463800e+02\n3 6763     5.183000e+02 1.687300e+02\n0 6764     -2.260300e+02 4.413200e+02\n7 6764     -4.435800e+02 4.829000e+02\n0 6765     -1.212000e+02 4.404700e+02\n2 6765     -4.016400e+02 1.893700e+02\n3 6765     -5.316000e+02 -1.408800e+02\n7 6765     -3.380400e+02 4.936600e+02\n8 6765     -2.503300e+02 1.404700e+02\n12 6765     -4.264300e+02 4.200200e+02\n13 6765     9.528998e+01 1.130200e+02\n14 6765     1.962600e+02 -3.010700e+02\n0 6766     6.357300e+02 4.404100e+02\n9 6766     2.505200e+02 4.538200e+02\n0 6767     -4.335800e+02 4.384800e+02\n14 6767     -1.077600e+02 -3.067100e+02\n0 6768     6.323800e+02 4.375000e+02\n2 6768     4.604399e+02 4.169500e+02\n3 6768     3.145900e+02 8.683002e+01\n6 6768     3.834000e+02 6.286900e+02\n8 6768     4.408800e+02 3.139400e+02\n9 6768     2.485900e+02 4.505900e+02\n13 6768     8.024600e+02 1.808800e+02\n0 6769     6.380000e+02 4.364800e+02\n2 6769     4.662500e+02 4.179500e+02\n3 6769     3.204399e+02 8.817999e+01\n6 6769     3.900800e+02 6.292800e+02\n8 6769     4.455400e+02 3.152800e+02\n9 6769     2.533300e+02 4.515900e+02\n0 6770     7.416600e+02 4.361500e+02\n2 6770     5.716700e+02 4.536700e+02\n9 6770     3.400900e+02 4.859800e+02\n0 6771     8.422000e+02 4.332900e+02\n9 6771     4.207800e+02 5.121200e+02\n0 6772     8.513800e+02 4.333900e+02\n3 6772     5.122000e+02 1.551600e+02\n0 6773     7.410300e+02 4.321400e+02\n2 6773     5.708500e+02 4.502700e+02\n3 6773     4.182200e+02 1.199900e+02\n6 6773     5.115601e+02 6.519100e+02\n8 6773     5.325200e+02 3.401800e+02\n9 6773     3.421899e+02 4.819700e+02\n0 6774     7.410300e+02 4.321400e+02\n2 6774     5.708500e+02 4.502700e+02\n3 6774     4.182200e+02 1.199900e+02\n6 6774     5.115601e+02 6.519100e+02\n8 6774     5.325200e+02 3.401800e+02\n9 6774     3.421899e+02 4.819700e+02\n0 6775     -6.490200e+02 4.305500e+02\n13 6775     -3.645000e+02 7.646997e+01\n0 6776     -2.799500e+02 4.306900e+02\n7 6776     -4.968700e+02 4.657300e+02\n0 6777     6.871100e+02 4.294600e+02\n8 6777     4.888800e+02 3.236700e+02\n0 6778     -1.088300e+02 4.288900e+02\n2 6778     -3.895300e+02 1.754000e+02\n7 6778     -3.248600e+02 4.830000e+02\n8 6778     -2.401700e+02 1.298000e+02\n11 6778     5.128998e+01 -3.279800e+02\n13 6778     1.045000e+02 1.038300e+02\n0 6779     1.966400e+02 4.289300e+02\n2 6779     -1.055800e+02 1.810700e+02\n5 6779     5.998400e+02 -2.222200e+02\n7 6779     -2.876001e+01 5.159900e+02\n0 6780     7.491400e+02 4.262600e+02\n3 6780     4.268600e+02 1.180700e+02\n0 6781     -1.071700e+02 4.258500e+02\n2 6781     -3.871700e+02 1.719200e+02\n0 6782     -1.838300e+02 4.253100e+02\n2 6782     -4.626400e+02 1.707300e+02\n7 6782     -3.993600e+02 4.715100e+02\n0 6783     6.863101e+02 4.256300e+02\n6 6783     4.500200e+02 6.303100e+02\n8 6783     4.886600e+02 3.199800e+02\n11 6783     7.661899e+02 -2.967800e+02\n0 6784     6.950699e+02 4.242200e+02\n2 6784     5.277600e+02 4.271500e+02\n3 6784     3.780601e+02 9.841998e+01\n8 6784     4.963101e+02 3.223200e+02\n9 6784     3.058800e+02 4.616900e+02\n13 6784     8.644700e+02 1.765500e+02\n0 6785     -1.935800e+02 4.228500e+02\n7 6785     -4.084700e+02 4.670800e+02\n0 6786     -3.638900e+02 4.209100e+02\n5 6786     4.119000e+01 -2.331800e+02\n7 6786     -5.818500e+02 4.451000e+02\n11 6786     -1.742200e+02 -3.365800e+02\n0 6787     -4.035700e+02 4.194600e+02\n2 6787     -6.913100e+02 1.616800e+02\n5 6787     1.840027e+00 -2.339700e+02\n10 6787     -6.261300e+02 6.060000e+02\n0 6788     -4.035700e+02 4.194600e+02\n2 6788     -6.913100e+02 1.616800e+02\n5 6788     1.840027e+00 -2.339700e+02\n7 6788     -6.234100e+02 4.399400e+02\n10 6788     -6.262200e+02 6.061300e+02\n12 6788     -7.496700e+02 3.512500e+02\n13 6788     -1.297700e+02 8.339001e+01\n0 6789     -2.701800e+02 4.191800e+02\n5 6789     1.336700e+02 -2.355800e+02\n7 6789     -4.856000e+02 4.548800e+02\n13 6789     -2.381000e+01 8.810999e+01\n14 6789     4.915002e+01 -3.258700e+02\n0 6790     8.688199e+02 4.175300e+02\n3 6790     5.304301e+02 1.480400e+02\n0 6791     6.411600e+02 4.165900e+02\n2 6791     4.750601e+02 4.014700e+02\n6 6791     4.004800e+02 6.075900e+02\n12 6791     4.842400e+02 6.142600e+02\n13 6791     8.134900e+02 1.645500e+02\n0 6792     7.045100e+02 4.144800e+02\n2 6792     5.396801e+02 4.219700e+02\n3 6792     3.895900e+02 9.332001e+01\n6 6792     4.743199e+02 6.235000e+02\n8 6792     5.065699e+02 3.172100e+02\n9 6792     3.163300e+02 4.572500e+02\n11 6792     7.862900e+02 -3.062900e+02\n0 6793     4.928900e+02 4.115100e+02\n2 6793     2.705601e+02 2.949700e+02\n6 6793     1.750500e+02 5.482500e+02\n7 6793     2.781700e+02 5.512900e+02\n9 6793     8.496002e+01 3.395600e+02\n11 6793     5.979100e+02 -3.197600e+02\n0 6794     5.102200e+02 4.110500e+02\n7 6794     2.953900e+02 5.538800e+02\n9 6794     1.024300e+02 3.460800e+02\n0 6795     5.377000e+02 4.080000e+02\n2 6795     3.224200e+02 3.095900e+02\n3 6795     1.802800e+02 -1.800000e+01\n7 6795     3.234100e+02 5.554800e+02\n8 6795     3.315000e+02 2.318000e+02\n11 6795     6.392400e+02 -3.206300e+02\n13 6795     6.921100e+02 1.410500e+02\n0 6796     -3.480100e+02 4.070700e+02\n5 6796     5.571997e+01 -2.472600e+02\n13 6796     -8.615997e+01 7.410999e+01\n14 6796     -2.778998e+01 -3.394100e+02\n0 6797     7.909100e+02 4.045500e+02\n3 6797     4.695100e+02 1.148600e+02\n0 6798     -7.316400e+02 4.035700e+02\n13 6798     -4.692900e+02 4.341998e+01\n14 6798     -4.969100e+02 -3.517900e+02\n0 6799     5.402600e+02 4.039600e+02\n7 6799     3.264000e+02 5.517000e+02\n0 6800     5.402600e+02 4.039600e+02\n7 6800     3.264000e+02 5.517000e+02\n0 6801     -6.265900e+02 4.014300e+02\n5 6801     -2.514300e+02 -2.481700e+02\n7 6801     -8.703200e+02 3.890500e+02\n13 6801     -3.343300e+02 5.548999e+01\n14 6801     -3.314800e+02 -3.470700e+02\n0 6802     4.742300e+02 3.987700e+02\n2 6802     2.514900e+02 2.751400e+02\n7 6802     2.609600e+02 5.356100e+02\n13 6802     6.297400e+02 1.262500e+02\n14 6802     8.635400e+02 -3.066500e+02\n0 6803     5.982500e+02 3.978800e+02\n2 6803     4.340601e+02 3.680400e+02\n8 6803     4.191100e+02 2.742000e+02\n9 6803     2.273500e+02 4.077100e+02\n12 6803     4.379100e+02 5.805800e+02\n13 6803     7.737400e+02 1.444900e+02\n0 6804     -2.690400e+02 3.975900e+02\n5 6804     1.330200e+02 -2.593900e+02\n0 6805     -2.690400e+02 3.975900e+02\n5 6805     1.330200e+02 -2.593900e+02\n7 6805     -4.811500e+02 4.320500e+02\n10 6805     -4.572800e+02 5.889400e+02\n14 6805     4.945001e+01 -3.490300e+02\n0 6806     2.557001e+01 3.965900e+02\n5 6806     4.266100e+02 -2.622200e+02\n6 6806     -4.306200e+02 3.920200e+02\n7 6806     -1.892600e+02 4.646200e+02\n12 6806     -2.580200e+02 3.898300e+02\n14 6806     3.387100e+02 -3.441800e+02\n0 6807     -3.008200e+02 3.960600e+02\n7 6807     -5.141300e+02 4.267800e+02\n8 6807     -3.965000e+02 9.337000e+01\n10 6807     -4.952200e+02 5.852700e+02\n12 6807     -6.237200e+02 3.386900e+02\n0 6808     6.100200e+02 3.956700e+02\n2 6808     4.473500e+02 3.704400e+02\n3 6808     3.033800e+02 4.297998e+01\n6 6808     3.660300e+02 5.759000e+02\n7 6808     4.083900e+02 5.639400e+02\n8 6808     4.289700e+02 2.753400e+02\n9 6808     2.382600e+02 4.096600e+02\n13 6808     7.855100e+02 1.436200e+02\n0 6809     -4.066500e+02 3.947900e+02\n2 6809     -6.940400e+02 1.300800e+02\n5 6809     -3.849976e+00 -2.599000e+02\n7 6809     -6.228300e+02 4.133000e+02\n8 6809     -4.880300e+02 8.885999e+01\n10 6809     -6.261500e+02 5.744100e+02\n11 6809     -2.137800e+02 -3.584900e+02\n13 6809     -1.334900e+02 6.113000e+01\n14 6809     -8.651001e+01 -3.528500e+02\n0 6810     -4.066500e+02 3.947900e+02\n2 6810     -6.940400e+02 1.300800e+02\n10 6810     -6.261500e+02 5.744100e+02\n0 6811     -4.014200e+02 3.949400e+02\n7 6811     -6.163800e+02 4.138800e+02\n13 6811     -1.284800e+02 6.152002e+01\n0 6812     -2.742700e+02 3.922900e+02\n5 6812     1.276000e+02 -2.643300e+02\n7 6812     -4.855200e+02 4.262100e+02\n8 6812     -3.736400e+02 9.009000e+01\n10 6812     -4.628200e+02 5.825500e+02\n12 6812     -5.915800e+02 3.384200e+02\n0 6813     5.334800e+02 3.896300e+02\n2 6813     3.215900e+02 2.905300e+02\n3 6813     1.796900e+02 -3.648999e+01\n6 6813     2.323200e+02 5.352600e+02\n7 6813     3.215601e+02 5.367700e+02\n8 6813     3.308500e+02 2.168500e+02\n9 6813     1.299100e+02 3.377600e+02\n11 6813     6.391801e+02 -3.378900e+02\n12 6813     3.383400e+02 5.269200e+02\n13 6813     6.895100e+02 1.253100e+02\n0 6814     -5.529600e+02 3.879300e+02\n5 6814     -1.494200e+02 -2.638700e+02\n0 6815     5.965300e+02 3.880100e+02\n6 6815     3.514600e+02 5.640500e+02\n9 6815     2.278400e+02 3.991300e+02\n11 6815     6.911200e+02 -3.366900e+02\n12 6815     4.380100e+02 5.692300e+02\n13 6815     7.732400e+02 1.358200e+02\n0 6816     6.458600e+02 3.883500e+02\n2 6816     4.873199e+02 3.781800e+02\n3 6816     3.408500e+02 4.976001e+01\n7 6816     4.447000e+02 5.632800e+02\n8 6816     4.621899e+02 2.815900e+02\n12 6816     4.954200e+02 5.872700e+02\n13 6816     8.217300e+02 1.424300e+02\n0 6817     -5.416500e+02 3.840000e+02\n5 6817     -1.387900e+02 -2.675100e+02\n11 6817     -3.311900e+02 -3.658300e+02\n13 6817     -2.427600e+02 4.613000e+01\n14 6817     -2.209600e+02 -3.642200e+02\n0 6818     -9.573999e+01 3.841300e+02\n2 6818     -3.730600e+02 1.214400e+02\n5 6818     3.047700e+02 -2.750200e+02\n6 6818     -5.658700e+02 3.480800e+02\n7 6818     -3.054800e+02 4.378900e+02\n8 6818     -2.269700e+02 8.728000e+01\n9 6818     -4.632900e+02 1.662500e+02\n10 6818     -2.477900e+02 5.885700e+02\n12 6818     -3.880100e+02 3.552800e+02\n13 6818     1.151900e+02 6.540002e+01\n14 6818     2.192900e+02 -3.610800e+02\n0 6819     6.478300e+02 3.841900e+02\n2 6819     4.900500e+02 3.747200e+02\n3 6819     3.441400e+02 4.770001e+01\n6 6819     4.149300e+02 5.754600e+02\n7 6819     4.472100e+02 5.597100e+02\n8 6819     4.647700e+02 2.788000e+02\n9 6819     2.748300e+02 4.151500e+02\n11 6819     7.400500e+02 -3.375300e+02\n12 6819     4.981801e+02 5.829600e+02\n13 6819     8.238101e+02 1.388800e+02\n0 6820     -4.982000e+02 3.835000e+02\n5 6820     -9.604999e+01 -2.696000e+02\n8 6820     -5.709600e+02 7.414001e+01\n13 6820     -2.075800e+02 4.826001e+01\n14 6820     -1.780800e+02 -3.642700e+02\n0 6821     -5.414100e+02 3.801500e+02\n5 6821     -1.389800e+02 -2.719400e+02\n14 6821     -2.210400e+02 -3.680300e+02\n0 6822     -5.414100e+02 3.801500e+02\n14 6822     -2.210400e+02 -3.680300e+02\n0 6823     -5.043400e+02 3.792900e+02\n8 6823     -5.770300e+02 7.056000e+01\n10 6823     -7.454600e+02 5.478100e+02\n11 6823     -2.994200e+02 -3.702100e+02\n13 6823     -2.126700e+02 4.414001e+01\n14 6823     -1.842700e+02 -3.690800e+02\n0 6824     -4.916000e+02 3.743400e+02\n14 6824     -1.725700e+02 -3.742800e+02\n0 6825     5.510400e+02 3.743700e+02\n2 6825     3.451500e+02 2.824200e+02\n7 6825     3.410601e+02 5.246400e+02\n8 6825     3.497300e+02 2.096300e+02\n9 6825     1.505000e+02 3.313700e+02\n11 6825     6.584700e+02 -3.515300e+02\n0 6826     8.462200e+02 3.728600e+02\n2 6826     6.862300e+02 4.352100e+02\n3 6826     5.255900e+02 1.080700e+02\n0 6827     8.462200e+02 3.728600e+02\n2 6827     6.862300e+02 4.352100e+02\n3 6827     5.255900e+02 1.080700e+02\n7 6827     6.385000e+02 5.804000e+02\n9 6827     4.391500e+02 4.715300e+02\n0 6828     6.259301e+02 3.716000e+02\n2 6828     4.701500e+02 3.549300e+02\n3 6828     3.258000e+02 2.919000e+01\n6 6828     3.918400e+02 5.553700e+02\n7 6828     4.272000e+02 5.438400e+02\n12 6828     4.761400e+02 5.622600e+02\n0 6829     5.657600e+02 3.708600e+02\n2 6829     3.620900e+02 2.854600e+02\n3 6829     2.192300e+02 -4.007001e+01\n7 6829     3.562500e+02 5.240200e+02\n8 6829     3.634700e+02 2.120100e+02\n12 6829     3.805400e+02 5.177200e+02\n0 6830     -1.427400e+02 3.699100e+02\n13 6830     7.766998e+01 5.087000e+01\n0 6831     -5.405300e+02 3.694100e+02\n5 6831     -1.399300e+02 -2.832700e+02\n7 6831     -7.614300e+02 3.700700e+02\n10 6831     -7.900100e+02 5.328600e+02\n15 6831     -8.212900e+02 5.729800e+02\n0 6832     -1.088500e+02 3.697100e+02\n5 6832     2.895699e+02 -2.904700e+02\n8 6832     -2.374100e+02 7.345001e+01\n0 6833     5.096100e+02 3.696000e+02\n2 6833     2.990500e+02 2.608700e+02\n7 6833     2.999100e+02 5.124700e+02\n9 6833     1.117800e+02 3.098200e+02\n0 6834     5.585300e+02 3.690600e+02\n3 6834     2.122100e+02 -4.478003e+01\n7 6834     3.491801e+02 5.209800e+02\n8 6834     3.575300e+02 2.082400e+02\n11 6834     6.666400e+02 -3.561900e+02\n13 6834     7.166700e+02 1.109700e+02\n0 6835     5.674900e+02 3.677000e+02\n2 6835     3.648000e+02 2.831400e+02\n3 6835     2.217100e+02 -4.227002e+01\n6 6835     2.810900e+02 5.211900e+02\n8 6835     3.659300e+02 2.098300e+02\n9 6835     1.671801e+02 3.328000e+02\n13 6835     7.251899e+02 1.108600e+02\n0 6836     -4.073800e+02 3.658400e+02\n7 6836     -6.175700e+02 3.833800e+02\n0 6837     -4.109400e+02 3.640200e+02\n2 6837     -6.838500e+02 9.785999e+01\n10 6837     -6.269800e+02 5.360600e+02\n0 6838     5.671801e+02 3.637500e+02\n2 6838     3.654301e+02 2.791400e+02\n3 6838     2.224600e+02 -4.614001e+01\n6 6838     2.818000e+02 5.166100e+02\n7 6838     3.582800e+02 5.175000e+02\n8 6838     3.662000e+02 2.067100e+02\n9 6838     1.679800e+02 3.295000e+02\n12 6838     3.838700e+02 5.104100e+02\n13 6838     7.255400e+02 1.074900e+02\n0 6839     -1.965000e+02 3.636300e+02\n12 6839     -4.975400e+02 3.149500e+02\n0 6840     -1.965000e+02 3.636300e+02\n12 6840     -4.975400e+02 3.149500e+02\n14 6840     1.184600e+02 -3.853100e+02\n0 6841     -7.310200e+02 3.612600e+02\n13 6841     -4.601600e+02 8.289978e+00\n14 6841     -4.904900e+02 -3.961800e+02\n0 6842     -1.511700e+02 3.610000e+02\n2 6842     -4.269900e+02 9.106000e+01\n7 6842     -3.576300e+02 4.078800e+02\n13 6842     7.059998e+01 4.258002e+01\n14 6842     1.630200e+02 -3.876200e+02\n0 6843     6.780029e+00 3.605600e+02\n2 6843     -2.726600e+02 9.519000e+01\n5 6843     4.062200e+02 -3.006000e+02\n6 6843     -4.447100e+02 3.405200e+02\n7 6843     -2.023700e+02 4.250800e+02\n8 6843     -1.447400e+02 6.856000e+01\n9 6843     -3.758100e+02 1.475800e+02\n13 6843     1.966500e+02 4.981000e+01\n14 6843     3.201500e+02 -3.849500e+02\n0 6844     7.811400e+02 3.579200e+02\n2 6844     6.298500e+02 4.003800e+02\n3 6844     4.750200e+02 7.602002e+01\n7 6844     5.794301e+02 5.561200e+02\n9 6844     3.926300e+02 4.405800e+02\n0 6845     2.619995e+00 3.555100e+02\n5 6845     4.020800e+02 -3.059400e+02\n10 6845     -1.279900e+02 5.631800e+02\n0 6846     -5.636500e+02 3.529300e+02\n5 6846     -1.655100e+02 -3.001200e+02\n7 6846     -7.839500e+02 3.500300e+02\n10 6846     -8.168800e+02 5.107900e+02\n14 6846     -2.473400e+02 -3.968900e+02\n15 6846     -8.509400e+02 5.470200e+02\n0 6847     6.740100e+02 3.530200e+02\n2 6847     5.254000e+02 3.566700e+02\n7 6847     4.772300e+02 5.339300e+02\n9 6847     3.054000e+02 4.010000e+02\n13 6847     8.530699e+02 1.162300e+02\n0 6848     6.740100e+02 3.530200e+02\n2 6848     5.254000e+02 3.566700e+02\n6 6848     4.541899e+02 5.499500e+02\n7 6848     4.772300e+02 5.339300e+02\n8 6848     4.938800e+02 2.634800e+02\n9 6848     3.054000e+02 4.010000e+02\n0 6849     6.740100e+02 3.530200e+02\n2 6849     5.254000e+02 3.566700e+02\n6 6849     4.541899e+02 5.499500e+02\n7 6849     4.772300e+02 5.339300e+02\n8 6849     4.938800e+02 2.634800e+02\n9 6849     3.054000e+02 4.010000e+02\n12 6849     5.362300e+02 5.592600e+02\n0 6850     -3.839100e+02 3.517000e+02\n2 6850     -6.683300e+02 7.528998e+01\n5 6850     1.339001e+01 -3.064300e+02\n7 6850     -5.929100e+02 3.703800e+02\n8 6850     -4.672700e+02 4.617001e+01\n10 6850     -5.908300e+02 5.228900e+02\n11 6850     -1.955200e+02 -3.962500e+02\n14 6850     -6.846997e+01 -3.992100e+02\n15 6850     -5.970400e+02 5.685800e+02\n0 6851     -2.707900e+02 3.507700e+02\n7 6851     -4.772100e+02 3.817000e+02\n0 6852     -3.652100e+02 3.485300e+02\n11 6852     -1.791700e+02 -3.996300e+02\n13 6852     -1.016400e+02 2.267999e+01\n0 6853     1.893700e+02 3.485700e+02\n6 6853     -2.165300e+02 3.753800e+02\n0 6854     -4.090100e+02 3.469200e+02\n10 6854     -6.210300e+02 5.152300e+02\n11 6854     -2.175400e+02 -4.001100e+02\n13 6854     -1.372700e+02 1.971002e+01\n0 6855     2.184998e+01 3.469000e+02\n13 6855     2.115800e+02 3.953998e+01\n14 6855     3.397300e+02 -3.988100e+02\n0 6856     7.840300e+02 3.468200e+02\n2 6856     6.354301e+02 3.915300e+02\n3 6856     4.808900e+02 6.728998e+01\n6 6856     5.809800e+02 5.747100e+02\n7 6856     5.835000e+02 5.462000e+02\n8 6856     5.863400e+02 2.897000e+02\n9 6856     3.971600e+02 4.340500e+02\n12 6856     6.608900e+02 5.879500e+02\n0 6857     6.850800e+02 3.465300e+02\n2 6857     5.382200e+02 3.548200e+02\n3 6857     3.908400e+02 3.072998e+01\n6 6857     4.686200e+02 5.460200e+02\n7 6857     4.886500e+02 5.295600e+02\n8 6857     5.044000e+02 2.615900e+02\n9 6857     3.163500e+02 3.996900e+02\n12 6857     5.501600e+02 5.554000e+02\n13 6857     8.647200e+02 1.122400e+02\n0 6858     7.471700e+02 3.460200e+02\n3 6858     4.478600e+02 5.338000e+01\n7 6858     5.485200e+02 5.393200e+02\n0 6859     7.999301e+02 3.441600e+02\n2 6859     6.509800e+02 3.949800e+02\n0 6860     7.999301e+02 3.441600e+02\n2 6860     6.509800e+02 3.949800e+02\n3 6860     4.955300e+02 7.079999e+01\n7 6860     5.990500e+02 5.460100e+02\n9 6860     4.110400e+02 4.366200e+02\n12 6860     6.787900e+02 5.905900e+02\n0 6861     6.174000e+02 3.420100e+02\n7 6861     4.229900e+02 5.139600e+02\n0 6862     6.174000e+02 3.420100e+02\n3 6862     3.250699e+02 -3.599854e-01\n0 6863     7.822200e+02 3.413400e+02\n2 6863     6.352500e+02 3.860600e+02\n3 6863     4.810400e+02 6.253003e+01\n0 6864     7.469700e+02 3.412400e+02\n2 6864     6.014600e+02 3.737700e+02\n3 6864     4.494600e+02 4.994000e+01\n6 6864     5.412400e+02 5.586900e+02\n7 6864     5.491801e+02 5.351400e+02\n9 6864     3.694500e+02 4.170800e+02\n0 6865     6.141700e+02 3.407300e+02\n2 6865     4.656400e+02 3.213800e+02\n6 6865     3.847500e+02 5.183900e+02\n8 6865     4.442400e+02 2.354600e+02\n9 6865     2.550699e+02 3.696300e+02\n0 6866     -1.413400e+02 3.345900e+02\n2 6866     -4.146900e+02 5.798999e+01\n11 6866     2.326001e+01 -4.142600e+02\n0 6867     3.266998e+01 3.347400e+02\n7 6867     -1.708700e+02 4.037400e+02\n0 6868     -3.325700e+02 3.342300e+02\n2 6868     -6.119900e+02 5.241998e+01\n7 6868     -5.381000e+02 3.583200e+02\n14 6868     -2.026001e+01 -4.178000e+02\n0 6869     6.026000e+02 3.339700e+02\n2 6869     4.549600e+02 3.092700e+02\n3 6869     3.124800e+02 -1.364001e+01\n6 6869     3.723300e+02 5.070000e+02\n8 6869     4.352800e+02 2.263500e+02\n9 6869     2.463600e+02 3.591500e+02\n11 6869     7.085400e+02 -3.878900e+02\n0 6870     6.874200e+02 3.334200e+02\n7 6870     4.924900e+02 5.183500e+02\n9 6870     3.214200e+02 3.908500e+02\n0 6871     -5.044400e+02 3.330700e+02\n5 6871     -1.100300e+02 -3.237900e+02\n7 6871     -7.171000e+02 3.349000e+02\n8 6871     -5.770300e+02 2.210999e+01\n10 6871     -7.381500e+02 4.900900e+02\n14 6871     -1.913200e+02 -4.186800e+02\n15 6871     -7.633900e+02 5.258700e+02\n0 6872     8.152500e+02 3.327500e+02\n2 6872     6.683700e+02 3.906200e+02\n9 6872     4.255699e+02 4.328000e+02\n0 6873     8.152500e+02 3.327500e+02\n2 6873     6.683700e+02 3.906200e+02\n7 6873     6.149399e+02 5.375200e+02\n9 6873     4.255699e+02 4.328000e+02\n0 6874     6.597800e+02 3.318500e+02\n6 6874     4.420699e+02 5.226100e+02\n7 6874     4.657700e+02 5.110500e+02\n8 6874     4.862600e+02 2.429300e+02\n9 6874     2.974500e+02 3.786700e+02\n12 6874     5.246500e+02 5.312000e+02\n13 6874     8.419700e+02 9.726001e+01\n0 6875     8.237400e+02 3.315200e+02\n2 6875     6.772200e+02 3.924500e+02\n3 6875     5.193199e+02 6.894000e+01\n7 6875     6.231100e+02 5.378000e+02\n9 6875     4.329100e+02 4.352300e+02\n12 6875     7.079900e+02 5.851700e+02\n0 6876     8.237400e+02 3.315200e+02\n2 6876     6.772200e+02 3.924500e+02\n3 6876     5.193199e+02 6.894000e+01\n7 6876     6.231100e+02 5.378000e+02\n9 6876     4.329100e+02 4.352300e+02\n12 6876     7.079900e+02 5.851700e+02\n0 6877     5.730500e+02 3.296300e+02\n3 6877     2.834500e+02 -3.009003e+01\n10 6877     5.468900e+02 5.913400e+02\n13 6877     7.568900e+02 8.454999e+01\n0 6878     8.070000e+02 3.284800e+02\n3 6878     5.061801e+02 6.085999e+01\n7 6878     6.076200e+02 5.324800e+02\n10 6878     8.283700e+02 6.184200e+02\n0 6879     -4.694600e+02 3.278700e+02\n10 6879     -6.934400e+02 4.864500e+02\n11 6879     -2.724200e+02 -4.164200e+02\n12 6879     -8.184200e+02 2.197900e+02\n0 6880     6.535000e+02 3.280400e+02\n2 6880     5.104000e+02 3.251300e+02\n3 6880     3.651801e+02 2.059998e+00\n6 6880     4.353199e+02 5.161400e+02\n7 6880     4.600699e+02 5.064100e+02\n8 6880     4.809600e+02 2.375500e+02\n9 6880     2.928500e+02 3.735200e+02\n10 6880     6.427700e+02 5.986600e+02\n11 6880     7.593199e+02 -3.915900e+02\n12 6880     5.183900e+02 5.241400e+02\n13 6880     8.360800e+02 9.295999e+01\n0 6881     -4.659200e+02 3.271500e+02\n7 6881     -6.774500e+02 3.321800e+02\n10 6881     -6.893900e+02 4.863100e+02\n12 6881     -8.141300e+02 2.197300e+02\n15 6881     -7.076400e+02 5.229900e+02\n0 6882     -3.151300e+02 3.263200e+02\n7 6882     -5.183300e+02 3.513400e+02\n10 6882     -5.039800e+02 4.977100e+02\n13 6882     -6.190002e+01 4.859985e+00\n14 6882     -2.700012e+00 -4.275700e+02\n15 6882     -4.961200e+02 5.415400e+02\n0 6883     -2.431100e+02 3.259800e+02\n7 6883     -4.457100e+02 3.599400e+02\n15 6883     -3.958500e+02 5.510700e+02\n0 6884     -1.495100e+02 3.260000e+02\n7 6884     -3.513500e+02 3.712600e+02\n11 6884     1.598999e+01 -4.214600e+02\n14 6884     1.634100e+02 -4.265100e+02\n0 6885     7.522300e+02 3.246600e+02\n2 6885     6.108101e+02 3.600900e+02\n3 6885     4.591500e+02 3.850000e+01\n6 6885     5.513600e+02 5.426700e+02\n7 6885     5.562700e+02 5.197700e+02\n8 6885     5.650699e+02 2.652500e+02\n9 6885     3.774600e+02 4.067400e+02\n10 6885     7.616300e+02 6.067500e+02\n12 6885     6.306200e+02 5.539600e+02\n0 6886     7.522300e+02 3.246600e+02\n3 6886     4.591500e+02 3.850000e+01\n6 6886     5.513600e+02 5.426700e+02\n7 6886     5.562700e+02 5.197700e+02\n8 6886     5.650699e+02 2.652500e+02\n10 6886     7.616300e+02 6.067500e+02\n12 6886     6.306200e+02 5.539600e+02\n0 6887     -4.687200e+02 3.241800e+02\n7 6887     -6.799300e+02 3.286000e+02\n10 6887     -6.923500e+02 4.825000e+02\n11 6887     -2.719700e+02 -4.197300e+02\n12 6887     -8.170800e+02 2.152700e+02\n15 6887     -7.109000e+02 5.185400e+02\n0 6888     5.789100e+02 3.210500e+02\n2 6888     4.331700e+02 2.882900e+02\n3 6888     2.941300e+02 -3.360999e+01\n6 6888     3.492200e+02 4.864100e+02\n7 6888     3.899000e+02 4.875500e+02\n8 6888     4.187700e+02 2.097600e+02\n9 6888     2.294600e+02 3.402900e+02\n12 6888     4.362200e+02 4.920300e+02\n0 6889     -5.179100e+02 3.196500e+02\n7 6889     -7.295500e+02 3.193100e+02\n10 6889     -7.531800e+02 4.726500e+02\n14 6889     -2.066300e+02 -4.340900e+02\n15 6889     -7.801400e+02 5.059100e+02\n0 6890     -5.681000e+02 3.180100e+02\n5 6890     -1.759100e+02 -3.380700e+02\n10 6890     -8.166300e+02 4.670000e+02\n11 6890     -3.603700e+02 -4.226200e+02\n14 6890     -2.575800e+02 -4.357000e+02\n15 6890     -8.503400e+02 4.972600e+02\n0 6891     -3.990100e+02 3.177900e+02\n5 6891     -6.359985e+00 -3.443900e+02\n8 6891     -4.802000e+02 9.869995e+00\n12 6891     -7.255000e+02 2.214400e+02\n15 6891     -6.119300e+02 5.187100e+02\n0 6892     8.440800e+02 3.168400e+02\n2 6892     6.999800e+02 3.870100e+02\n3 6892     5.411899e+02 6.441998e+01\n7 6892     6.438700e+02 5.271600e+02\n0 6893     7.107400e+02 3.155600e+02\n2 6893     5.724399e+02 3.370100e+02\n6 6893     5.057400e+02 5.203800e+02\n7 6893     5.172900e+02 5.045900e+02\n0 6894     7.107400e+02 3.155600e+02\n2 6894     5.724399e+02 3.370100e+02\n0 6895     -1.985600e+02 3.131800e+02\n2 6895     -4.716900e+02 2.901001e+01\n7 6895     -3.983200e+02 3.517000e+02\n14 6895     1.136800e+02 -4.417100e+02\n15 6895     -3.315400e+02 5.385400e+02\n0 6896     7.503998e+01 3.137000e+02\n7 6896     -1.242200e+02 3.899000e+02\n15 6896     4.506000e+01 5.768300e+02\n0 6897     6.557800e+02 3.136300e+02\n3 6897     3.710800e+02 -9.280029e+00\n6 6897     4.423300e+02 5.019600e+02\n7 6897     4.643800e+02 4.929100e+02\n0 6898     6.178199e+02 3.094300e+02\n2 6898     4.781100e+02 2.932200e+02\n3 6898     3.354399e+02 -2.906000e+01\n6 6898     3.974400e+02 4.849800e+02\n7 6898     4.275900e+02 4.821100e+02\n8 6898     4.536801e+02 2.125900e+02\n9 6898     2.661700e+02 3.458800e+02\n10 6898     6.012900e+02 5.724800e+02\n11 6898     7.293800e+02 -4.118800e+02\n12 6898     4.825000e+02 4.920000e+02\n13 6898     8.034700e+02 7.303998e+01\n0 6899     -1.817100e+02 3.083300e+02\n7 6899     -3.810900e+02 3.487700e+02\n15 6899     -3.079100e+02 5.335600e+02\n0 6900     -5.725700e+02 3.007100e+02\n10 6900     -8.191200e+02 4.448200e+02\n13 6900     -2.711200e+02 -2.851001e+01\n0 6901     3.624000e+02 2.992900e+02\n6 6901     1.284998e+01 3.677300e+02\n14 6901     7.280100e+02 -4.292200e+02\n0 6902     4.494000e+02 2.980600e+02\n10 6902     4.024800e+02 5.397200e+02\n11 6902     5.767500e+02 -4.284800e+02\n12 6902     2.602200e+02 3.973000e+02\n0 6903     6.092600e+02 2.971400e+02\n2 6903     4.719500e+02 2.783900e+02\n3 6903     3.301300e+02 -4.315002e+01\n6 6903     3.900100e+02 4.689900e+02\n7 6903     4.206899e+02 4.688700e+02\n8 6903     4.487200e+02 2.001600e+02\n9 6903     2.615500e+02 3.326900e+02\n10 6903     5.918400e+02 5.565100e+02\n11 6903     7.229301e+02 -4.235400e+02\n12 6903     4.753300e+02 4.764800e+02\n13 6903     7.961000e+02 6.191998e+01\n0 6904     6.578101e+02 2.968900e+02\n2 6904     5.229600e+02 2.987200e+02\n3 6904     3.782800e+02 -2.253998e+01\n6 6904     4.485000e+02 4.843200e+02\n9 6904     3.045500e+02 3.510400e+02\n0 6905     -3.698700e+02 2.960300e+02\n7 6905     -5.701100e+02 3.125100e+02\n10 6905     -5.655600e+02 4.559200e+02\n11 6905     -1.858900e+02 -4.475600e+02\n0 6906     -4.479500e+02 2.954800e+02\n7 6906     -6.536000e+02 3.005400e+02\n10 6906     -6.621600e+02 4.489000e+02\n11 6906     -2.556300e+02 -4.463200e+02\n12 6906     -7.860100e+02 1.820200e+02\n15 6906     -6.763700e+02 4.809100e+02\n0 6907     8.781000e+01 2.943600e+02\n2 6907     -1.470300e+02 5.935999e+01\n7 6907     -1.070500e+02 3.737400e+02\n9 6907     -2.634700e+02 1.219400e+02\n0 6908     7.720601e+02 2.943900e+02\n7 6908     5.790500e+02 4.937600e+02\n8 6908     5.886200e+02 2.484000e+02\n12 6908     6.613900e+02 5.288500e+02\n0 6909     7.720601e+02 2.943900e+02\n3 6909     4.863600e+02 2.151001e+01\n6 6909     5.820500e+02 5.160900e+02\n8 6909     5.886200e+02 2.484000e+02\n9 6909     4.009800e+02 3.908400e+02\n10 6909     7.870601e+02 5.728100e+02\n0 6910     8.722000e+02 2.930700e+02\n2 6910     7.326000e+02 3.765600e+02\n3 6910     5.718199e+02 5.591998e+01\n0 6911     7.821000e+02 2.908900e+02\n7 6911     5.890601e+02 4.924300e+02\n10 6911     7.994399e+02 5.691400e+02\n0 6912     4.576400e+02 2.897600e+02\n6 6912     1.590700e+02 3.940500e+02\n7 6912     2.586200e+02 4.263200e+02\n12 6912     2.726100e+02 3.902900e+02\n14 6912     8.629600e+02 -4.288700e+02\n0 6913     4.576400e+02 2.897600e+02\n7 6913     2.586200e+02 4.263200e+02\n0 6914     -5.199400e+02 2.898500e+02\n7 6914     -7.275800e+02 2.873200e+02\n10 6914     -7.518400e+02 4.368600e+02\n15 6914     -7.770800e+02 4.640700e+02\n0 6915     -2.176900e+02 2.886500e+02\n7 6915     -4.135800e+02 3.248000e+02\n10 6915     -3.800800e+02 4.615100e+02\n14 6915     9.475000e+01 -4.683199e+02\n15 6915     -3.538300e+02 5.017700e+02\n0 6916     -5.129900e+02 2.882300e+02\n7 6916     -7.199000e+02 2.862500e+02\n0 6917     7.827100e+02 2.871800e+02\n2 6917     6.509100e+02 3.391300e+02\n3 6917     4.979301e+02 1.883002e+01\n7 6917     5.902800e+02 4.890700e+02\n10 6917     8.005100e+02 5.651100e+02\n0 6918     7.784600e+02 2.863700e+02\n2 6918     6.473700e+02 3.371300e+02\n3 6918     4.948500e+02 1.685999e+01\n7 6918     5.864600e+02 4.876100e+02\n8 6918     5.952900e+02 2.447900e+02\n10 6918     7.953400e+02 5.628800e+02\n12 6918     6.697800e+02 5.228800e+02\n0 6919     -4.596500e+02 2.849000e+02\n7 6919     -6.641300e+02 2.878600e+02\n0 6920     7.846600e+02 2.834700e+02\n3 6920     5.006600e+02 1.585999e+01\n7 6920     5.923800e+02 4.857700e+02\n10 6920     8.024700e+02 5.612700e+02\n0 6921     2.714500e+02 2.824700e+02\n13 6921     4.437300e+02 4.599976e+00\n0 6922     -4.022000e+02 2.820500e+02\n7 6922     -6.018900e+02 2.934800e+02\n0 6923     4.895200e+02 2.812700e+02\n6 6923     2.023300e+02 3.971300e+02\n7 6923     2.921200e+02 4.236000e+02\n8 6923     3.103300e+02 1.152300e+02\n10 6923     4.511000e+02 5.243900e+02\n12 6923     3.117700e+02 3.940700e+02\n13 6923     6.563900e+02 2.796997e+01\n0 6924     -5.544700e+02 2.807300e+02\n13 6924     -2.588600e+02 -4.437000e+01\n0 6925     6.622900e+02 2.800500e+02\n2 6925     5.324800e+02 2.842400e+02\n3 6925     3.876500e+02 -3.527002e+01\n6 6925     4.580500e+02 4.677700e+02\n7 6925     4.752900e+02 4.615100e+02\n8 6925     4.983900e+02 2.039200e+02\n10 6925     6.560400e+02 5.416600e+02\n12 6925     5.402900e+02 4.765300e+02\n13 6925     8.509000e+02 5.388000e+01\n0 6926     -5.227700e+02 2.777700e+02\n5 6926     -1.369700e+02 -3.847900e+02\n8 6926     -5.947800e+02 -3.810999e+01\n14 6926     -2.173500e+02 -4.814000e+02\n0 6927     5.800500e+02 2.758600e+02\n2 6927     4.445400e+02 2.453800e+02\n6 6927     3.587800e+02 4.362400e+02\n9 6927     2.394399e+02 3.036600e+02\n10 6927     5.582600e+02 5.274900e+02\n12 6927     4.454399e+02 4.440000e+02\n0 6928     5.837900e+02 2.747400e+02\n2 6928     4.491100e+02 2.457600e+02\n3 6928     3.090400e+02 -7.503998e+01\n6 6928     3.620900e+02 4.365200e+02\n0 6929     5.837900e+02 2.747400e+02\n3 6929     3.090400e+02 -7.503998e+01\n0 6930     6.662700e+02 2.742900e+02\n2 6930     5.384200e+02 2.807600e+02\n3 6930     3.938800e+02 -3.871997e+01\n7 6930     4.799600e+02 4.568800e+02\n13 6930     8.554399e+02 4.984003e+01\n0 6931     6.662700e+02 2.742900e+02\n2 6931     5.384200e+02 2.807600e+02\n6 6931     4.661899e+02 4.631100e+02\n8 6931     5.044800e+02 2.012700e+02\n9 6931     3.189900e+02 3.373800e+02\n12 6931     5.470500e+02 4.721200e+02\n13 6931     8.554399e+02 4.984003e+01\n0 6932     5.812800e+02 2.716500e+02\n2 6932     4.480400e+02 2.411600e+02\n3 6932     3.078700e+02 -7.879999e+01\n6 6932     3.611700e+02 4.312300e+02\n8 6932     4.286500e+02 1.705200e+02\n9 6932     2.414900e+02 3.004800e+02\n13 6932     7.710900e+02 3.665997e+01\n0 6933     7.717300e+02 2.707500e+02\n8 6933     5.931300e+02 2.302700e+02\n10 6933     7.881500e+02 5.434900e+02\n12 6933     6.662200e+02 5.052000e+02\n0 6934     8.472998e+01 2.668400e+02\n3 6934     -2.611200e+02 -2.893700e+02\n6 6934     -2.852700e+02 2.552900e+02\n7 6934     -1.037000e+02 3.478300e+02\n12 6934     -1.435700e+02 2.693500e+02\n13 6934     2.874500e+02 -2.201001e+01\n14 6934     4.343800e+02 -4.811100e+02\n0 6935     6.796400e+02 2.669400e+02\n7 6935     4.937000e+02 4.520200e+02\n12 6935     5.636500e+02 4.694100e+02\n0 6936     -1.803600e+02 2.659900e+02\n7 6936     -3.701100e+02 3.079800e+02\n11 6936     -1.471997e+01 -4.776500e+02\n13 6936     5.688000e+01 -4.035999e+01\n14 6936     1.427900e+02 -4.923400e+02\n15 6936     -3.003000e+02 4.748700e+02\n0 6937     8.129301e+02 2.637700e+02\n2 6937     6.859200e+02 3.297200e+02\n3 6937     5.313400e+02 1.094000e+01\n0 6938     -1.645500e+02 2.635000e+02\n7 6938     -3.531700e+02 3.082400e+02\n15 6938     -2.784000e+02 4.742500e+02\n0 6939     7.683199e+02 2.626000e+02\n3 6939     4.930100e+02 -6.830017e+00\n6 6939     5.851801e+02 4.815100e+02\n7 6939     5.798900e+02 4.630900e+02\n9 6939     4.063300e+02 3.657100e+02\n10 6939     7.843300e+02 5.331400e+02\n12 6939     6.642200e+02 4.934700e+02\n0 6940     8.568800e+02 2.604300e+02\n9 6940     4.765200e+02 3.955700e+02\n0 6941     8.631200e+02 2.604700e+02\n3 6941     5.762800e+02 2.783002e+01\n7 6941     6.693400e+02 4.770600e+02\n0 6942     6.628000e+02 2.574600e+02\n2 6942     5.384700e+02 2.633900e+02\n3 6942     3.954900e+02 -5.560999e+01\n9 6942     3.191500e+02 3.214800e+02\n0 6943     8.621500e+02 2.574700e+02\n9 6943     4.809800e+02 3.952100e+02\n0 6944     6.228800e+02 2.572000e+02\n3 6944     3.552100e+02 -7.285999e+01\n7 6944     4.394600e+02 4.323500e+02\n8 6944     4.689500e+02 1.730600e+02\n9 6944     2.833700e+02 3.059800e+02\n10 6944     6.108000e+02 5.102800e+02\n0 6945     -3.777002e+01 2.548700e+02\n7 6945     -2.226900e+02 3.182800e+02\n10 6945     -1.644100e+02 4.380500e+02\n13 6945     1.844900e+02 -4.103003e+01\n15 6945     -1.029700e+02 4.789200e+02\n0 6946     7.648000e+02 2.551200e+02\n2 6946     6.428400e+02 3.038200e+02\n3 6946     4.920300e+02 -1.485999e+01\n6 6946     5.832800e+02 4.731300e+02\n7 6946     5.775100e+02 4.553500e+02\n8 6946     5.910300e+02 2.170400e+02\n10 6946     7.803600e+02 5.233200e+02\n0 6947     2.984301e+02 2.518600e+02\n6 6947     -2.796997e+01 2.988500e+02\n0 6948     -5.547400e+02 2.517600e+02\n13 6948     -2.592100e+02 -7.046002e+01\n14 6948     -2.532800e+02 -5.105100e+02\n0 6949     7.630400e+02 2.508300e+02\n2 6949     6.420100e+02 2.953600e+02\n3 6949     4.916200e+02 -2.058002e+01\n6 6949     5.823800e+02 4.679700e+02\n9 6949     4.049600e+02 3.520800e+02\n10 6949     7.773700e+02 5.148600e+02\n0 6950     -1.465002e+01 2.503500e+02\n6 6950     -3.947100e+02 2.075800e+02\n10 6950     -1.367600e+02 4.353800e+02\n0 6951     -5.337400e+02 2.496000e+02\n5 6951     -1.505400e+02 -4.154100e+02\n14 6951     -2.307100e+02 -5.125500e+02\n0 6952     -5.197998e+01 2.492900e+02\n7 6952     -2.359800e+02 3.113700e+02\n10 6952     -1.808000e+02 4.306700e+02\n0 6953     4.763000e+01 2.496400e+02\n7 6953     -1.356100e+02 3.259900e+02\n10 6953     -6.359003e+01 4.406100e+02\n0 6954     6.096000e+02 2.481400e+02\n7 6954     4.278700e+02 4.217000e+02\n10 6954     5.956400e+02 4.977000e+02\n0 6955     -2.245700e+02 2.472800e+02\n7 6955     -4.108300e+02 2.839400e+02\n11 6955     -5.650000e+01 -4.951400e+02\n15 6955     -3.581600e+02 4.434700e+02\n0 6956     5.234200e+02 2.462000e+02\n7 6956     3.311000e+02 3.950600e+02\n10 6956     4.940500e+02 4.859400e+02\n15 6956     6.748000e+02 5.511800e+02\n0 6957     6.315400e+02 2.455800e+02\n6 6957     4.304100e+02 4.182700e+02\n7 6957     4.495200e+02 4.228200e+02\n9 6957     2.936600e+02 3.003700e+02\n11 6957     7.589301e+02 -4.761400e+02\n12 6957     5.141400e+02 4.267400e+02\n15 6957     8.238199e+02 5.690000e+02\n0 6958     3.335400e+02 2.423100e+02\n6 6958     1.707001e+01 2.983000e+02\n7 6958     1.434700e+02 3.590900e+02\n11 6958     4.734301e+02 -4.905000e+02\n0 6959     6.327700e+02 2.413000e+02\n3 6959     3.701300e+02 -8.297998e+01\n7 6959     4.513199e+02 4.190800e+02\n10 6959     6.236100e+02 4.922400e+02\n13 6959     8.260100e+02 1.735999e+01\n0 6960     -3.967999e+01 2.383300e+02\n6 6960     -4.173800e+02 1.867200e+02\n7 6960     -2.206100e+02 3.027500e+02\n10 6960     -1.646200e+02 4.188900e+02\n12 6960     -2.726100e+02 2.120700e+02\n14 6960     3.065100e+02 -5.178101e+02\n0 6961     8.789000e+02 2.379700e+02\n2 6961     7.546100e+02 3.319500e+02\n7 6961     6.866899e+02 4.586000e+02\n9 6961     4.980699e+02 3.856300e+02\n0 6962     -4.139300e+02 2.361500e+02\n13 6962     -1.445800e+02 -7.870001e+01\n14 6962     -1.110800e+02 -5.290900e+02\n0 6963     -6.938000e+01 2.313600e+02\n7 6963     -2.482700e+02 2.918700e+02\n0 6964     -4.563000e+01 2.310200e+02\n6 6964     -4.198500e+02 1.765200e+02\n0 6965     -3.719971e+00 2.308600e+02\n6 6965     -3.673900e+02 1.889300e+02\n10 6965     -1.217000e+02 4.136000e+02\n13 6965     2.203800e+02 -5.783002e+01\n0 6966     -1.685999e+01 2.304200e+02\n6 6966     -3.832600e+02 1.843500e+02\n0 6967     8.014399e+02 2.306000e+02\n3 6967     5.320400e+02 -2.075000e+01\n9 6967     4.420500e+02 3.543400e+02\n0 6968     5.139399e+02 2.291800e+02\n7 6968     3.246400e+02 3.773900e+02\n10 6968     4.853800e+02 4.651800e+02\n15 6968     6.634700e+02 5.258500e+02\n0 6969     6.615300e+02 2.289700e+02\n7 6969     4.810900e+02 4.123400e+02\n8 6969     5.083800e+02 1.636300e+02\n9 6969     3.244000e+02 2.988900e+02\n10 6969     6.587400e+02 4.806000e+02\n15 6969     8.679301e+02 5.500900e+02\n0 6970     7.279301e+02 2.292500e+02\n2 6970     6.132500e+02 2.646100e+02\n3 6970     4.657400e+02 -5.138000e+01\n6 6970     5.477300e+02 4.342400e+02\n7 6970     5.456200e+02 4.243800e+02\n8 6970     5.655800e+02 1.856600e+02\n9 6970     3.815000e+02 3.254800e+02\n10 6970     7.375400e+02 4.883900e+02\n0 6971     7.279301e+02 2.292500e+02\n2 6971     6.132500e+02 2.646100e+02\n6 6971     5.477300e+02 4.342400e+02\n7 6971     5.456200e+02 4.243800e+02\n9 6971     3.815000e+02 3.254800e+02\n0 6972     7.115601e+02 2.265900e+02\n2 6972     5.975699e+02 2.552700e+02\n3 6972     4.512800e+02 -6.095001e+01\n7 6972     5.301400e+02 4.189500e+02\n10 6972     7.183400e+02 4.832500e+02\n0 6973     7.115601e+02 2.265900e+02\n2 6973     5.975699e+02 2.552700e+02\n3 6973     4.512800e+02 -6.095001e+01\n6 6973     5.294399e+02 4.259400e+02\n7 6973     5.301400e+02 4.189500e+02\n8 6973     5.522100e+02 1.781900e+02\n9 6973     3.683900e+02 3.168700e+02\n10 6973     7.183400e+02 4.832500e+02\n0 6974     -3.509600e+02 2.260900e+02\n14 6974     -3.714001e+01 -5.396500e+02\n0 6975     -4.873600e+02 2.253900e+02\n10 6975     -6.995100e+02 3.605900e+02\n14 6975     -1.896900e+02 -5.417200e+02\n0 6976     5.644800e+02 2.201700e+02\n8 6976     4.234301e+02 1.239000e+02\n10 6976     5.445300e+02 4.595700e+02\n0 6977     -6.070007e+00 2.158300e+02\n6 6977     -3.592900e+02 1.717300e+02\n13 6977     2.221000e+02 -7.072998e+01\n14 6977     3.511899e+02 -5.412200e+02\n0 6978     6.052400e+02 2.156500e+02\n6 6978     4.051200e+02 3.774700e+02\n7 6978     4.274500e+02 3.893400e+02\n9 6978     2.772700e+02 2.648100e+02\n10 6978     5.924600e+02 4.590300e+02\n11 6978     7.395400e+02 -5.087000e+02\n15 6978     7.898700e+02 5.219500e+02\n0 6979     6.207900e+02 2.158500e+02\n2 6979     5.054700e+02 2.049700e+02\n6 6979     4.239500e+02 3.825000e+02\n13 6979     8.171000e+02 -5.760010e+00\n0 6980     -2.707001e+01 2.145500e+02\n6 6980     -3.849200e+02 1.634100e+02\n0 6981     -3.324200e+02 2.079700e+02\n7 6981     -5.136800e+02 2.290100e+02\n10 6981     -5.081200e+02 3.535100e+02\n13 6981     -6.390997e+01 -9.778998e+01\n14 6981     -1.185999e+01 -5.592400e+02\n0 6982     6.221400e+02 2.069200e+02\n7 6982     4.452300e+02 3.839900e+02\n0 6983     -4.310999e+01 2.067300e+02\n7 6983     -2.163000e+02 2.721900e+02\n10 6983     -1.655800e+02 3.813600e+02\n12 6983     -2.622600e+02 1.795800e+02\n13 6983     1.925900e+02 -8.087000e+01\n14 6983     3.135400e+02 -5.531300e+02\n0 6984     6.808700e+02 2.025900e+02\n6 6984     5.000300e+02 3.898900e+02\n7 6984     5.035601e+02 3.905900e+02\n8 6984     5.310699e+02 1.488100e+02\n9 6984     3.483800e+02 2.858900e+02\n0 6985     -1.607200e+02 2.002600e+02\n7 6985     -3.348700e+02 2.476800e+02\n10 6985     -3.034800e+02 3.609100e+02\n15 6985     -2.645400e+02 3.867400e+02\n0 6986     8.530200e+02 1.984600e+02\n2 6986     7.425900e+02 2.871900e+02\n0 6987     7.364200e+02 1.968800e+02\n2 6987     6.317300e+02 2.389500e+02\n3 6987     4.846700e+02 -7.601001e+01\n6 6987     5.660800e+02 4.018100e+02\n7 6987     5.582100e+02 3.945900e+02\n10 6987     7.497800e+02 4.509000e+02\n0 6988     -1.596997e+01 1.949100e+02\n5 6988     4.313000e+02 -4.798400e+02\n6 6988     -3.567200e+02 1.454600e+02\n9 6988     -2.946400e+02 4.339001e+01\n10 6988     -1.311000e+02 3.705300e+02\n13 6988     2.191400e+02 -8.834003e+01\n14 6988     3.474500e+02 -5.638600e+02\n0 6989     7.389900e+02 1.926000e+02\n7 6989     5.609900e+02 3.910100e+02\n8 6989     5.831300e+02 1.615400e+02\n10 6989     7.531200e+02 4.455600e+02\n0 6990     -2.194000e+01 1.916600e+02\n10 6990     -1.393900e+02 3.645200e+02\n13 6990     2.149800e+02 -9.187000e+01\n14 6990     3.417700e+02 -5.686000e+02\n0 6991     8.071997e+01 1.890500e+02\n13 6991     3.974800e+02 -6.178003e+01\n14 6991     5.758700e+02 -5.397900e+02\n15 6991     5.290997e+01 4.073000e+02\n0 6992     1.139300e+02 1.855700e+02\n7 6992     -1.559998e+01 3.065000e+02\n10 6992     1.989001e+01 3.698500e+02\n15 6992     9.972998e+01 4.072300e+02\n0 6993     -4.499000e+02 1.843600e+02\n5 6993     -6.012000e+01 -4.911600e+02\n7 6993     -6.328000e+02 1.872600e+02\n0 6994     6.174100e+02 1.829100e+02\n2 6994     5.113500e+02 1.713900e+02\n6 6994     4.287500e+02 3.460700e+02\n7 6994     4.442700e+02 3.596600e+02\n8 6994     4.790000e+02 1.119700e+02\n9 6994     2.968000e+02 2.433800e+02\n10 6994     6.095300e+02 4.207800e+02\n12 6994     5.125200e+02 3.554800e+02\n15 6994     8.113300e+02 4.775200e+02\n0 6995     6.241801e+02 1.806200e+02\n2 6995     5.184301e+02 1.722400e+02\n3 6995     3.789399e+02 -1.427800e+02\n6 6995     4.374600e+02 3.458400e+02\n7 6995     4.507900e+02 3.588700e+02\n9 6995     3.032400e+02 2.443900e+02\n10 6995     6.171300e+02 4.190100e+02\n15 6995     8.204301e+02 4.757200e+02\n0 6996     5.870100e+02 1.799200e+02\n3 6996     3.406400e+02 -1.628300e+02\n7 6996     4.139800e+02 3.506500e+02\n13 6996     7.875601e+02 -4.201001e+01\n0 6997     2.064001e+01 1.777000e+02\n7 6997     -1.068400e+02 2.845700e+02\n15 6997     -2.735999e+01 3.827900e+02\n0 6998     6.020800e+02 1.753400e+02\n3 6998     3.574301e+02 -1.580000e+02\n7 6998     4.299800e+02 3.493600e+02\n10 6998     5.917800e+02 4.099000e+02\n15 6998     7.898700e+02 4.654500e+02\n0 6999     6.875800e+02 1.736000e+02\n6 6999     5.150000e+02 3.604100e+02\n7 6999     5.138101e+02 3.637300e+02\n9 6999     3.612900e+02 2.652200e+02\n0 7000     6.875800e+02 1.736000e+02\n6 7000     5.150000e+02 3.604100e+02\n7 7000     5.138101e+02 3.637300e+02\n8 7000     5.430800e+02 1.281400e+02\n9 7000     3.612900e+02 2.652200e+02\n12 7000     5.952900e+02 3.703000e+02\n0 7001     6.035200e+02 1.720100e+02\n2 7001     4.986700e+02 1.533600e+02\n3 7001     3.602000e+02 -1.613500e+02\n7 7001     4.317800e+02 3.463700e+02\n8 7001     4.692400e+02 9.712000e+01\n9 7001     2.869000e+02 2.275700e+02\n10 7001     5.936200e+02 4.063700e+02\n12 7001     4.990699e+02 3.373000e+02\n13 7001     8.047000e+02 -4.620001e+01\n15 7001     7.923500e+02 4.600500e+02\n0 7002     7.394200e+02 1.711900e+02\n7 7002     5.641100e+02 3.708400e+02\n10 7002     7.548199e+02 4.204700e+02\n0 7003     -3.238800e+02 1.704500e+02\n7 7003     -4.962100e+02 1.941600e+02\n10 7003     -4.925300e+02 3.096300e+02\n12 7003     -5.867600e+02 7.158002e+01\n15 7003     -4.847000e+02 3.243400e+02\n0 7004     8.299600e+02 1.703600e+02\n2 7004     7.299500e+02 2.525600e+02\n7 7004     6.505300e+02 3.860600e+02\n9 7004     4.796400e+02 3.191100e+02\n0 7005     6.389700e+02 1.694400e+02\n3 7005     3.978900e+02 -1.459300e+02\n6 7005     4.581600e+02 3.390200e+02\n7 7005     4.668500e+02 3.508600e+02\n9 7005     3.195200e+02 2.415300e+02\n10 7005     6.352400e+02 4.073300e+02\n12 7005     5.407000e+02 3.486600e+02\n15 7005     8.426400e+02 4.620400e+02\n0 7006     5.430000e+02 1.691300e+02\n7 7006     3.715800e+02 3.318900e+02\n9 7006     2.301000e+02 1.977300e+02\n10 7006     5.224000e+02 3.963400e+02\n13 7006     7.433000e+02 -5.713000e+01\n0 7007     6.302100e+02 1.688000e+02\n7 7007     4.584700e+02 3.487000e+02\n9 7007     3.115300e+02 2.380500e+02\n15 7007     8.303600e+02 4.604800e+02\n0 7008     -9.501001e+01 1.663700e+02\n5 7008     3.494200e+02 -5.134800e+02\n0 7009     7.143101e+02 1.640200e+02\n2 7009     6.179600e+02 1.973700e+02\n3 7009     4.735699e+02 -1.151800e+02\n6 7009     5.489500e+02 3.597700e+02\n7 7009     5.410699e+02 3.592700e+02\n8 7009     5.685100e+02 1.301800e+02\n9 7009     3.867800e+02 2.688300e+02\n10 7009     7.257600e+02 4.089700e+02\n12 7009     6.286300e+02 3.702700e+02\n0 7010     7.129000e+02 1.603000e+02\n2 7010     6.175500e+02 1.929700e+02\n3 7010     4.734500e+02 -1.191200e+02\n6 7010     5.483300e+02 3.552400e+02\n7 7010     5.403101e+02 3.559900e+02\n8 7010     5.681500e+02 1.265200e+02\n9 7010     3.865601e+02 2.651900e+02\n12 7010     6.280100e+02 3.659000e+02\n0 7011     7.001801e+02 1.591700e+02\n2 7011     6.046600e+02 1.858000e+02\n3 7011     4.616899e+02 -1.261400e+02\n9 7011     3.758199e+02 2.591600e+02\n0 7012     8.699700e+02 1.587100e+02\n2 7012     7.703600e+02 2.583800e+02\n7 7012     6.887100e+02 3.821000e+02\n9 7012     5.124900e+02 3.246300e+02\n12 7012     8.023600e+02 4.192700e+02\n0 7013     7.045400e+02 1.583900e+02\n7 7013     5.320200e+02 3.523600e+02\n10 7013     7.142600e+02 4.015000e+02\n0 7014     7.045400e+02 1.583900e+02\n2 7014     6.093700e+02 1.875000e+02\n3 7014     4.657700e+02 -1.247400e+02\n6 7014     5.387100e+02 3.498700e+02\n7 7014     5.320200e+02 3.523600e+02\n8 7014     5.611000e+02 1.220800e+02\n9 7014     3.794900e+02 2.601300e+02\n10 7014     7.142600e+02 4.015000e+02\n12 7014     6.184301e+02 3.599600e+02\n0 7015     7.255100e+02 1.582300e+02\n2 7015     6.312400e+02 1.969300e+02\n6 7015     5.635200e+02 3.572700e+02\n10 7015     7.391700e+02 4.036400e+02\n12 7015     6.429600e+02 3.677800e+02\n0 7016     7.143600e+02 1.560600e+02\n2 7016     6.200699e+02 1.895400e+02\n3 7016     4.759100e+02 -1.223000e+02\n6 7016     5.509100e+02 3.509200e+02\n7 7016     5.422300e+02 3.518000e+02\n8 7016     5.703199e+02 1.234900e+02\n9 7016     3.889100e+02 2.626300e+02\n10 7016     7.261300e+02 3.994000e+02\n12 7016     6.305400e+02 3.612900e+02\n0 7017     7.143600e+02 1.560600e+02\n2 7017     6.200699e+02 1.895400e+02\n3 7017     4.759100e+02 -1.223000e+02\n6 7017     5.509100e+02 3.509200e+02\n7 7017     5.422300e+02 3.518000e+02\n8 7017     5.703199e+02 1.234900e+02\n9 7017     3.889100e+02 2.626300e+02\n10 7017     7.261300e+02 3.994000e+02\n12 7017     6.305400e+02 3.612900e+02\n0 7018     7.684900e+02 1.549300e+02\n7 7018     5.939100e+02 3.603800e+02\n10 7018     7.906100e+02 4.042300e+02\n0 7019     7.684900e+02 1.549300e+02\n7 7019     5.939100e+02 3.603800e+02\n0 7020     8.227400e+02 1.550400e+02\n3 7020     5.757200e+02 -7.503003e+01\n7 7020     6.456000e+02 3.703400e+02\n0 7021     8.227400e+02 1.550400e+02\n3 7021     5.757200e+02 -7.503003e+01\n7 7021     6.456000e+02 3.703400e+02\n0 7022     8.634399e+02 1.544100e+02\n7 7022     6.836000e+02 3.769900e+02\n9 7022     5.087100e+02 3.194600e+02\n0 7023     8.210500e+02 1.514000e+02\n7 7023     6.445300e+02 3.664800e+02\n0 7024     8.210500e+02 1.514000e+02\n2 7024     7.271700e+02 2.327200e+02\n7 7024     6.445300e+02 3.664800e+02\n0 7025     -5.794000e+01 1.504600e+02\n7 7025     -1.964500e+02 2.339700e+02\n8 7025     -3.151001e+01 4.599915e-01\n0 7026     6.465300e+02 1.474100e+02\n2 7026     5.514500e+02 1.510800e+02\n3 7026     4.120500e+02 -1.624700e+02\n9 7026     3.319200e+02 2.277500e+02\n13 7026     8.513500e+02 -6.087000e+01\n0 7027     7.090800e+02 1.466300e+02\n2 7027     6.173800e+02 1.789300e+02\n3 7027     4.746300e+02 -1.331000e+02\n6 7027     5.477300e+02 3.392500e+02\n7 7027     5.385200e+02 3.417600e+02\n8 7027     5.675300e+02 1.146000e+02\n9 7027     3.866100e+02 2.532900e+02\n0 7028     8.182400e+02 1.462600e+02\n2 7028     7.261801e+02 2.267600e+02\n7 7028     6.426200e+02 3.612900e+02\n0 7029     -2.129500e+02 1.442300e+02\n7 7029     -3.739500e+02 1.866300e+02\n8 7029     -2.504800e+02 -1.046700e+02\n10 7029     -3.580300e+02 2.896600e+02\n13 7029     5.928003e+01 -1.442600e+02\n15 7029     -3.287100e+02 3.029100e+02\n0 7030     8.290800e+02 1.446400e+02\n2 7030     7.369800e+02 2.294900e+02\n7 7030     6.532300e+02 3.619100e+02\n9 7030     4.855900e+02 2.993800e+02\n0 7031     6.733500e+02 1.442100e+02\n6 7031     5.073800e+02 3.243000e+02\n7 7031     5.038400e+02 3.328100e+02\n9 7031     3.574500e+02 2.364300e+02\n12 7031     5.891100e+02 3.343000e+02\n0 7032     -6.826001e+01 1.429300e+02\n7 7032     -2.049400e+02 2.253500e+02\n10 7032     -1.883600e+02 3.017400e+02\n0 7033     8.168500e+02 1.430700e+02\n2 7033     7.257800e+02 2.232200e+02\n3 7033     5.746899e+02 -8.691998e+01\n7 7033     6.417700e+02 3.581100e+02\n0 7034     6.701100e+02 1.425300e+02\n3 7034     4.378800e+02 -1.553600e+02\n7 7034     5.009301e+02 3.308300e+02\n8 7034     5.347500e+02 9.813000e+01\n0 7035     6.701100e+02 1.425300e+02\n3 7035     4.378800e+02 -1.553600e+02\n7 7035     5.009301e+02 3.308300e+02\n8 7035     5.347500e+02 9.813000e+01\n0 7036     1.431600e+02 1.416600e+02\n4 7036     -1.953100e+02 -5.160500e+02\n6 7036     4.407001e+01 2.085900e+02\n8 7036     2.094200e+02 9.041000e+01\n13 7036     4.645800e+02 -9.441998e+01\n0 7037     7.497800e+02 1.422400e+02\n2 7037     6.601500e+02 1.929100e+02\n3 7037     5.144500e+02 -1.179800e+02\n7 7037     5.781899e+02 3.450200e+02\n9 7037     4.224301e+02 2.662900e+02\n10 7037     7.692800e+02 3.873800e+02\n12 7037     6.744000e+02 3.599000e+02\n0 7038     7.270200e+02 1.412200e+02\n2 7038     6.374000e+02 1.816700e+02\n3 7038     4.929800e+02 -1.291800e+02\n6 7038     5.696200e+02 3.397800e+02\n7 7038     5.564500e+02 3.399500e+02\n8 7038     5.844900e+02 1.164600e+02\n9 7038     4.034800e+02 2.561200e+02\n10 7038     7.423400e+02 3.836700e+02\n12 7038     6.487500e+02 3.504500e+02\n0 7039     8.358300e+02 1.412400e+02\n2 7039     7.436400e+02 2.286700e+02\n7 7039     6.596500e+02 3.596400e+02\n9 7039     4.912900e+02 2.991200e+02\n0 7040     8.018800e+02 1.408200e+02\n2 7040     7.122100e+02 2.150700e+02\n7 7040     6.277400e+02 3.532700e+02\n0 7041     7.968800e+02 1.400000e+02\n2 7041     7.074000e+02 2.112200e+02\n3 7041     5.589200e+02 -9.785999e+01\n7 7041     6.234399e+02 3.517800e+02\n10 7041     8.255900e+02 3.904800e+02\n0 7042     8.189800e+02 1.395600e+02\n2 7042     7.284600e+02 2.204200e+02\n7 7042     6.441300e+02 3.552000e+02\n9 7042     4.789600e+02 2.914900e+02\n0 7043     8.189800e+02 1.395600e+02\n2 7043     7.284600e+02 2.204200e+02\n3 7043     5.776000e+02 -8.925000e+01\n7 7043     6.441300e+02 3.552000e+02\n0 7044     7.545800e+02 1.388100e+02\n2 7044     6.660300e+02 1.918700e+02\n3 7044     5.196400e+02 -1.187900e+02\n7 7044     5.830300e+02 3.428200e+02\n9 7044     4.270500e+02 2.657900e+02\n10 7044     7.754399e+02 3.837200e+02\n12 7044     6.805200e+02 3.578400e+02\n0 7045     -7.247000e+02 1.383000e+02\n5 7045     -3.647800e+02 -5.338199e+02\n0 7046     7.384100e+02 1.371000e+02\n2 7046     6.502600e+02 1.825600e+02\n7 7046     5.679301e+02 3.381100e+02\n10 7046     7.564100e+02 3.795600e+02\n12 7046     6.624700e+02 3.504600e+02\n0 7047     7.384100e+02 1.371000e+02\n2 7047     6.502600e+02 1.825600e+02\n7 7047     5.679301e+02 3.381100e+02\n10 7047     7.564100e+02 3.795600e+02\n12 7047     6.624700e+02 3.504600e+02\n0 7048     5.199399e+02 1.366400e+02\n7 7048     3.527200e+02 2.961000e+02\n8 7048     3.984100e+02 3.567999e+01\n13 7048     7.229100e+02 -8.846002e+01\n15 7048     6.791600e+02 3.973500e+02\n0 7049     8.210400e+02 1.355100e+02\n2 7049     7.317500e+02 2.176200e+02\n3 7049     5.807200e+02 -9.165997e+01\n7 7049     6.465601e+02 3.514300e+02\n9 7049     4.814700e+02 2.893900e+02\n0 7050     7.616801e+02 1.344200e+02\n2 7050     6.740300e+02 1.907200e+02\n3 7050     5.281500e+02 -1.195900e+02\n9 7050     4.346000e+02 2.647900e+02\n10 7050     7.837600e+02 3.795400e+02\n12 7050     6.897100e+02 3.555900e+02\n0 7051     -8.252002e+01 1.342100e+02\n7 7051     -2.168000e+02 2.148400e+02\n15 7051     -1.577700e+02 3.079700e+02\n0 7052     6.770300e+02 1.332100e+02\n3 7052     4.468400e+02 -1.607100e+02\n6 7052     5.130400e+02 3.135600e+02\n7 7052     5.087200e+02 3.230200e+02\n8 7052     5.427900e+02 9.323001e+01\n9 7052     3.624399e+02 2.289400e+02\n10 7052     6.837900e+02 3.688800e+02\n12 7052     5.942200e+02 3.240000e+02\n0 7053     8.115500e+02 1.327900e+02\n2 7053     7.236600e+02 2.115900e+02\n3 7053     5.734900e+02 -9.804999e+01\n7 7053     6.380300e+02 3.472500e+02\n9 7053     4.751600e+02 2.837200e+02\n0 7054     8.211700e+02 1.307400e+02\n7 7054     6.474000e+02 3.468200e+02\n0 7055     6.048500e+02 1.290800e+02\n3 7055     3.741400e+02 -2.004800e+02\n7 7055     4.384200e+02 3.054400e+02\n9 7055     2.991300e+02 1.932100e+02\n15 7055     7.987500e+02 4.009200e+02\n0 7056     8.100699e+02 1.286500e+02\n2 7056     7.233800e+02 2.072800e+02\n3 7056     5.733500e+02 -1.023200e+02\n7 7056     6.371600e+02 3.429000e+02\n9 7056     4.749301e+02 2.796400e+02\n0 7057     7.424200e+02 1.278200e+02\n8 7057     6.004100e+02 1.115100e+02\n9 7057     4.200601e+02 2.518100e+02\n10 7057     7.615699e+02 3.704500e+02\n12 7057     6.698300e+02 3.415700e+02\n0 7058     7.424200e+02 1.278200e+02\n7 7058     5.730500e+02 3.297700e+02\n9 7058     4.200601e+02 2.518100e+02\n12 7058     6.698300e+02 3.415700e+02\n0 7059     7.597700e+02 1.258200e+02\n7 7059     5.896899e+02 3.292500e+02\n0 7060     7.317100e+02 1.251900e+02\n3 7060     5.017300e+02 -1.409300e+02\n6 7060     5.789301e+02 3.242500e+02\n7 7060     5.624900e+02 3.260400e+02\n8 7060     5.915300e+02 1.056200e+02\n9 7060     4.109900e+02 2.456700e+02\n12 7060     6.579301e+02 3.347600e+02\n0 7061     7.317100e+02 1.251900e+02\n2 7061     6.469600e+02 1.681300e+02\n3 7061     5.017300e+02 -1.409300e+02\n6 7061     5.789301e+02 3.242500e+02\n7 7061     5.624900e+02 3.260400e+02\n8 7061     5.915300e+02 1.056200e+02\n9 7061     4.109900e+02 2.456700e+02\n10 7061     7.497700e+02 3.646800e+02\n12 7061     6.579301e+02 3.347600e+02\n0 7062     -2.578000e+02 1.237400e+02\n13 7062     2.403998e+01 -1.643600e+02\n0 7063     7.808800e+02 1.239800e+02\n2 7063     6.961200e+02 1.894100e+02\n3 7063     5.485300e+02 -1.198500e+02\n7 7063     6.100000e+02 3.333800e+02\n9 7063     4.524200e+02 2.647300e+02\n10 7063     8.075900e+02 3.691200e+02\n12 7063     7.138199e+02 3.514400e+02\n0 7064     8.030800e+02 1.237100e+02\n2 7064     7.189399e+02 1.995300e+02\n7 7064     6.314399e+02 3.371900e+02\n9 7064     4.710800e+02 2.745500e+02\n0 7065     7.453500e+02 1.219400e+02\n2 7065     6.614399e+02 1.713600e+02\n10 7065     7.654301e+02 3.630900e+02\n12 7065     6.744500e+02 3.364600e+02\n0 7066     -1.116700e+02 1.216600e+02\n5 7066     4.227800e+02 -5.485601e+02\n0 7067     7.977200e+02 1.209700e+02\n7 7067     6.265300e+02 3.341600e+02\n0 7068     6.366100e+02 1.199500e+02\n2 7068     5.484900e+02 1.177400e+02\n3 7068     4.102800e+02 -1.930700e+02\n6 7068     4.681000e+02 2.825800e+02\n8 7068     5.094700e+02 6.645001e+01\n9 7068     3.298900e+02 1.994700e+02\n15 7068     8.446400e+02 3.920500e+02\n0 7069     7.886801e+02 1.185300e+02\n3 7069     5.576899e+02 -1.209100e+02\n7 7069     6.183000e+02 3.296400e+02\n10 7069     8.175500e+02 3.635500e+02\n0 7070     7.886801e+02 1.185300e+02\n2 7070     7.054100e+02 1.880400e+02\n3 7070     5.576899e+02 -1.209100e+02\n7 7070     6.183000e+02 3.296400e+02\n9 7070     4.603500e+02 2.636700e+02\n12 7070     7.242100e+02 3.486800e+02\n0 7071     7.967600e+02 1.179200e+02\n7 7071     6.264600e+02 3.311300e+02\n0 7072     7.601300e+02 1.171100e+02\n2 7072     6.773000e+02 1.734400e+02\n3 7072     5.316899e+02 -1.356200e+02\n7 7072     5.912800e+02 3.229800e+02\n9 7072     4.371300e+02 2.505800e+02\n10 7072     7.832500e+02 3.588500e+02\n12 7072     6.922100e+02 3.365800e+02\n0 7073     7.601300e+02 1.171100e+02\n2 7073     6.773000e+02 1.734400e+02\n7 7073     5.912800e+02 3.229800e+02\n9 7073     4.371300e+02 2.505800e+02\n10 7073     7.832500e+02 3.588500e+02\n12 7073     6.922100e+02 3.365800e+02\n0 7074     8.200400e+02 1.171600e+02\n2 7074     7.362300e+02 2.004300e+02\n3 7074     5.857300e+02 -1.081300e+02\n7 7074     6.479900e+02 3.338800e+02\n0 7075     8.200400e+02 1.171600e+02\n2 7075     7.362300e+02 2.004300e+02\n3 7075     5.857300e+02 -1.081300e+02\n7 7075     6.479900e+02 3.338800e+02\n0 7076     -4.760800e+02 1.148800e+02\n7 7076     -6.428300e+02 1.153400e+02\n0 7077     -1.098400e+02 1.142000e+02\n5 7077     4.272100e+02 -5.560900e+02\n6 7077     -3.050100e+02 7.154999e+01\n7 7077     -2.391700e+02 1.921500e+02\n10 7077     -2.337800e+02 2.637800e+02\n13 7077     2.124399e+02 -1.471700e+02\n15 7077     -1.923500e+02 2.770900e+02\n0 7078     6.398300e+02 1.141100e+02\n2 7078     5.538199e+02 1.139400e+02\n3 7078     4.154399e+02 -1.971500e+02\n6 7078     4.736000e+02 2.782100e+02\n7 7078     4.751200e+02 2.974500e+02\n9 7078     3.346000e+02 1.962200e+02\n10 7078     6.408500e+02 3.418300e+02\n12 7078     5.555000e+02 2.882600e+02\n13 7078     8.488000e+02 -9.160999e+01\n15 7078     8.501200e+02 3.839400e+02\n0 7079     4.366100e+02 1.130500e+02\n13 7079     6.354100e+02 -1.221600e+02\n0 7080     6.436200e+02 1.126400e+02\n2 7080     5.582300e+02 1.137300e+02\n3 7080     4.201700e+02 -1.970600e+02\n6 7080     4.785601e+02 2.779600e+02\n7 7080     4.790000e+02 2.967500e+02\n8 7080     5.178300e+02 6.384000e+01\n9 7080     3.382800e+02 1.967000e+02\n10 7080     6.453400e+02 3.407100e+02\n12 7080     5.605100e+02 2.877200e+02\n13 7080     8.527900e+02 -9.264001e+01\n15 7080     8.554600e+02 3.827800e+02\n0 7081     8.715699e+02 1.118100e+02\n2 7081     7.862000e+02 2.174000e+02\n7 7081     6.966100e+02 3.381000e+02\n0 7082     7.497700e+02 1.103000e+02\n2 7082     6.692000e+02 1.623000e+02\n3 7082     5.245699e+02 -1.464300e+02\n7 7082     5.826100e+02 3.145600e+02\n9 7082     4.311200e+02 2.409600e+02\n10 7082     7.715200e+02 3.496000e+02\n12 7082     6.824100e+02 3.255200e+02\n0 7083     -2.826600e+02 1.094700e+02\n7 7083     -4.382900e+02 1.417800e+02\n10 7083     -4.369900e+02 2.413900e+02\n0 7084     6.413900e+02 1.098900e+02\n7 7084     4.774100e+02 2.937200e+02\n9 7084     3.370800e+02 1.937900e+02\n13 7084     8.507100e+02 -9.478998e+01\n15 7084     8.530400e+02 3.783000e+02\n0 7085     1.016998e+01 1.088900e+02\n2 7085     9.728003e+01 1.159800e+02\n4 7085     -2.011000e+02 -4.176500e+02\n5 7085     6.259700e+02 -5.479100e+02\n6 7085     -8.019000e+01 1.372900e+02\n7 7085     -9.783002e+01 2.203900e+02\n8 7085     1.149000e+02 5.172000e+01\n10 7085     -9.319000e+01 2.689500e+02\n12 7085     -5.396997e+01 1.914800e+02\n15 7085     -3.454999e+01 2.872100e+02\n0 7086     5.865000e+02 1.091000e+02\n9 7086     2.867400e+02 1.671300e+02\n0 7087     8.156300e+02 1.084200e+02\n7 7087     6.448800e+02 3.248700e+02\n9 7087     4.842400e+02 2.670900e+02\n0 7088     8.000200e+02 1.066500e+02\n7 7088     6.306899e+02 3.205900e+02\n9 7088     4.725200e+02 2.588600e+02\n12 7088     7.398600e+02 3.403100e+02\n0 7089     6.458101e+02 1.045400e+02\n3 7089     4.245300e+02 -2.035300e+02\n8 7089     5.211801e+02 5.762000e+01\n9 7089     3.419399e+02 1.906200e+02\n15 7089     8.591100e+02 3.713100e+02\n0 7090     8.154399e+02 1.038400e+02\n7 7090     6.452800e+02 3.205300e+02\n9 7090     4.854200e+02 2.628700e+02\n0 7091     8.154399e+02 1.038400e+02\n2 7091     7.358300e+02 1.858800e+02\n7 7091     6.452800e+02 3.205300e+02\n0 7092     7.608002e+01 1.025700e+02\n2 7092     1.802300e+02 1.338100e+02\n6 7092     6.840027e+00 1.538000e+02\n8 7092     1.819700e+02 6.500000e+01\n9 7092     3.564001e+01 2.029300e+02\n10 7092     -1.525000e+01 2.684600e+02\n12 7092     3.190002e+01 2.066200e+02\n15 7092     5.646002e+01 2.875800e+02\n0 7093     8.622000e+02 1.027000e+02\n7 7093     6.890800e+02 3.280100e+02\n0 7094     6.505800e+02 1.019700e+02\n6 7094     4.896000e+02 2.687500e+02\n7 7094     4.872100e+02 2.877400e+02\n9 7094     3.470800e+02 1.910300e+02\n10 7094     6.541300e+02 3.289300e+02\n12 7094     5.708800e+02 2.788000e+02\n0 7095     7.696600e+02 9.989999e+01\n2 7095     6.920100e+02 1.614500e+02\n3 7095     5.465300e+02 -1.464300e+02\n7 7095     6.025699e+02 3.082200e+02\n9 7095     4.500900e+02 2.413400e+02\n10 7095     7.956300e+02 3.394300e+02\n0 7096     6.447400e+02 9.779001e+01\n2 7096     5.635100e+02 9.959998e+01\n6 7096     4.837800e+02 2.619600e+02\n7 7096     4.821899e+02 2.824900e+02\n9 7096     3.430699e+02 1.850200e+02\n12 7096     5.654301e+02 2.718900e+02\n13 7096     8.556801e+02 -1.054800e+02\n15 7096     8.587100e+02 3.621600e+02\n0 7097     7.967200e+02 9.589999e+01\n2 7097     7.193900e+02 1.697400e+02\n7 7097     6.292200e+02 3.092200e+02\n9 7097     4.725601e+02 2.493700e+02\n12 7097     7.385900e+02 3.268000e+02\n0 7098     5.569800e+02 9.432001e+01\n6 7098     3.762500e+02 2.233200e+02\n8 7098     4.418500e+02 1.442001e+01\n0 7099     -8.246002e+01 9.414999e+01\n6 7099     -2.387300e+02 6.744000e+01\n7 7099     -2.021200e+02 1.806300e+02\n10 7099     -1.993300e+02 2.425400e+02\n12 7099     -1.914400e+02 1.202200e+02\n13 7099     2.516600e+02 -1.586300e+02\n15 7099     -1.544200e+02 2.535900e+02\n0 7100     7.940300e+02 9.379999e+01\n2 7100     7.189200e+02 1.665200e+02\n3 7100     5.707400e+02 -1.403400e+02\n7 7100     6.265500e+02 3.069700e+02\n9 7100     4.710900e+02 2.463400e+02\n10 7100     8.253000e+02 3.349900e+02\n0 7101     -4.471300e+02 9.244000e+01\n7 7101     -6.074500e+02 9.738000e+01\n0 7102     5.200100e+02 8.891000e+01\n6 7102     3.308100e+02 2.022700e+02\n7 7102     3.594500e+02 2.494100e+02\n10 7102     5.019700e+02 2.998600e+02\n12 7102     4.205300e+02 2.127300e+02\n13 7102     7.287000e+02 -1.310100e+02\n15 7102     6.845601e+02 3.305000e+02\n0 7103     8.478000e+02 8.929001e+01\n2 7103     7.712300e+02 1.864800e+02\n3 7103     6.194700e+02 -1.196700e+02\n7 7103     6.775800e+02 3.126600e+02\n9 7103     5.144800e+02 2.649300e+02\n12 7103     7.968000e+02 3.395600e+02\n0 7104     -8.502002e+01 8.864001e+01\n7 7104     -2.031900e+02 1.751400e+02\n10 7104     -2.016800e+02 2.359700e+02\n15 7104     -1.572000e+02 2.456700e+02\n0 7105     7.247200e+02 8.807999e+01\n3 7105     5.080800e+02 -1.787300e+02\n6 7105     5.805601e+02 2.797700e+02\n7 7105     5.613700e+02 2.883000e+02\n8 7105     5.947000e+02 7.107999e+01\n9 7105     4.154700e+02 2.121500e+02\n12 7105     6.597500e+02 2.889300e+02\n0 7106     7.483300e+02 8.741000e+01\n2 7106     6.744000e+02 1.400400e+02\n7 7106     5.839399e+02 2.925100e+02\n0 7107     7.884200e+02 8.364001e+01\n2 7107     7.153300e+02 1.548200e+02\n3 7107     5.690100e+02 -1.518900e+02\n7 7107     6.225601e+02 2.962700e+02\n9 7107     4.691400e+02 2.361400e+02\n10 7107     8.192000e+02 3.221100e+02\n12 7107     7.323800e+02 3.111000e+02\n0 7108     7.884200e+02 8.364001e+01\n2 7108     7.153300e+02 1.548200e+02\n12 7108     7.323800e+02 3.111000e+02\n0 7109     2.195000e+02 8.257999e+01\n7 7109     1.156900e+02 2.285500e+02\n0 7110     5.286300e+02 7.982999e+01\n6 7110     3.437000e+02 1.955800e+02\n7 7110     3.691500e+02 2.424000e+02\n0 7111     6.483900e+02 7.867999e+01\n2 7111     5.724900e+02 8.296997e+01\n7 7111     4.881600e+02 2.652900e+02\n0 7112     7.247200e+02 7.784998e+01\n7 7112     5.623101e+02 2.786800e+02\n8 7112     5.962100e+02 6.467999e+01\n9 7112     4.181000e+02 2.039600e+02\n0 7113     8.428900e+02 7.478003e+01\n3 7113     6.211801e+02 -1.339200e+02\n7 7113     6.752600e+02 2.978400e+02\n9 7113     5.148500e+02 2.515900e+02\n0 7114     6.899399e+02 7.363000e+01\n2 7114     6.184301e+02 9.810999e+01\n3 7114     4.793199e+02 -2.097900e+02\n6 7114     5.441801e+02 2.526600e+02\n7 7114     5.296600e+02 2.680800e+02\n8 7114     5.674900e+02 4.850000e+01\n9 7114     3.894100e+02 1.854000e+02\n10 7114     7.028900e+02 2.999400e+02\n12 7114     6.238500e+02 2.627200e+02\n0 7115     7.133600e+02 7.344000e+01\n2 7115     6.429100e+02 1.099300e+02\n3 7115     5.021700e+02 -1.980700e+02\n6 7115     5.718199e+02 2.616900e+02\n7 7115     5.522000e+02 2.724000e+02\n8 7115     5.878300e+02 5.707001e+01\n9 7115     4.097500e+02 1.957400e+02\n10 7115     7.308400e+02 3.022000e+02\n12 7115     6.509700e+02 2.717400e+02\n0 7116     8.800500e+02 7.269000e+01\n7 7116     7.094600e+02 3.027000e+02\n0 7117     -1.351500e+02 7.251001e+01\n7 7117     -2.536000e+02 1.490800e+02\n0 7118     1.758500e+02 7.234998e+01\n6 7118     1.280900e+02 1.527400e+02\n10 7118     1.027300e+02 2.432100e+02\n12 7118     1.556800e+02 2.019500e+02\n0 7119     7.489301e+02 7.202002e+01\n2 7119     6.793900e+02 1.252900e+02\n3 7119     5.364900e+02 -1.815100e+02\n7 7119     5.865200e+02 2.779300e+02\n10 7119     7.732500e+02 3.044500e+02\n0 7120     7.489301e+02 7.202002e+01\n2 7120     6.793900e+02 1.252900e+02\n3 7120     5.364900e+02 -1.815100e+02\n7 7120     5.865200e+02 2.779300e+02\n9 7120     4.401700e+02 2.101300e+02\n10 7120     7.732500e+02 3.044500e+02\n12 7120     6.914000e+02 2.835000e+02\n0 7121     -6.266998e+01 7.023999e+01\n7 7121     -1.680800e+02 1.672200e+02\n13 7121     2.943000e+02 -1.713800e+02\n0 7122     7.850601e+02 7.064001e+01\n7 7122     6.212100e+02 2.834200e+02\n10 7122     8.157800e+02 3.070200e+02\n0 7123     8.781899e+02 6.795001e+01\n2 7123     8.057200e+02 1.798500e+02\n7 7123     7.082000e+02 2.977900e+02\n9 7123     5.426100e+02 2.595400e+02\n0 7124     1.023800e+02 6.703003e+01\n2 7124     2.282700e+02 1.142800e+02\n6 7124     5.541998e+01 1.259900e+02\n9 7124     7.637000e+01 1.887000e+02\n15 7124     9.520001e+01 2.428500e+02\n0 7125     7.079500e+02 6.678003e+01\n2 7125     6.383600e+02 9.846997e+01\n6 7125     5.666600e+02 2.505300e+02\n7 7125     5.477000e+02 2.647900e+02\n8 7125     5.843600e+02 4.931000e+01\n9 7125     4.062300e+02 1.876400e+02\n10 7125     7.242700e+02 2.934100e+02\n12 7125     6.457000e+02 2.605500e+02\n0 7126     1.211100e+02 6.653003e+01\n13 7126     4.706899e+02 -1.547800e+02\n15 7126     1.209400e+02 2.444100e+02\n0 7127     1.723600e+02 6.462000e+01\n7 7127     7.552002e+01 2.051800e+02\n10 7127     1.002500e+02 2.339700e+02\n15 7127     1.916100e+02 2.488400e+02\n0 7128     6.708300e+02 6.296002e+01\n2 7128     6.008600e+02 7.788000e+01\n3 7128     4.633700e+02 -2.300600e+02\n6 7128     5.241600e+02 2.335600e+02\n7 7128     5.123500e+02 2.540600e+02\n8 7128     5.529301e+02 3.253000e+01\n9 7128     3.752800e+02 1.677800e+02\n10 7128     6.811801e+02 2.852500e+02\n12 7128     6.043300e+02 2.434200e+02\n0 7129     -2.869900e+02 6.264001e+01\n4 7129     -2.111600e+02 -1.712600e+02\n0 7130     -4.819500e+02 6.194000e+01\n7 7130     -6.375000e+02 6.097998e+01\n0 7131     7.948400e+02 6.147998e+01\n2 7131     7.284500e+02 1.369700e+02\n3 7131     5.827400e+02 -1.683100e+02\n7 7131     6.317200e+02 2.765500e+02\n9 7131     4.806000e+02 2.218200e+02\n12 7131     7.456400e+02 2.899700e+02\n0 7132     -3.027002e+01 5.992999e+01\n3 7132     -1.408002e+01 -2.550000e+02\n5 7132     5.871300e+02 -6.050900e+02\n6 7132     -1.080000e+02 6.954999e+01\n7 7132     -1.296700e+02 1.650300e+02\n8 7132     9.334003e+01 4.980011e+00\n13 7132     3.316100e+02 -1.754100e+02\n15 7132     -8.279999e+01 2.144300e+02\n0 7133     1.246500e+02 5.877002e+01\n7 7133     3.000000e+01 1.923900e+02\n15 7133     1.263000e+02 2.344100e+02\n0 7134     1.246500e+02 5.877002e+01\n7 7134     3.000000e+01 1.923900e+02\n8 7134     2.416500e+02 4.570001e+01\n10 7134     4.491998e+01 2.224300e+02\n15 7134     1.263000e+02 2.344100e+02\n0 7135     4.642999e+01 5.582001e+01\n2 7135     1.741300e+02 8.998999e+01\n3 7135     8.032001e+01 -2.236500e+02\n6 7135     -3.770020e+00 9.534998e+01\n7 7135     -4.801001e+01 1.768100e+02\n8 7135     1.742800e+02 2.710001e+01\n10 7135     -4.567999e+01 2.106700e+02\n0 7136     2.615300e+02 5.514001e+01\n7 7136     1.594399e+02 2.075400e+02\n10 7136     2.041000e+02 2.325600e+02\n15 7136     3.160699e+02 2.486800e+02\n0 7137     5.006100e+02 5.495001e+01\n7 7137     3.442600e+02 2.125900e+02\n0 7138     -3.723700e+02 5.152002e+01\n4 7138     -2.083500e+02 -1.197700e+02\n0 7139     7.619200e+02 5.117999e+01\n3 7139     5.564100e+02 -1.942300e+02\n7 7139     6.019100e+02 2.603600e+02\n10 7139     7.901500e+02 2.812800e+02\n0 7140     2.018300e+02 4.887000e+01\n8 7140     3.032000e+02 4.617001e+01\n10 7140     1.353900e+02 2.184500e+02\n13 7140     5.403800e+02 -1.640200e+02\n15 7140     2.330800e+02 2.314100e+02\n0 7141     5.310100e+02 4.860999e+01\n7 7141     3.759800e+02 2.128400e+02\n10 7141     5.183300e+02 2.550100e+02\n13 7141     7.443500e+02 -1.651200e+02\n15 7141     7.051700e+02 2.761200e+02\n0 7142     1.845400e+02 4.728003e+01\n13 7142     5.270900e+02 -1.662300e+02\n15 7142     2.101400e+02 2.270600e+02\n0 7143     4.999399e+02 4.372998e+01\n7 7143     3.444900e+02 2.017700e+02\n10 7143     4.824800e+02 2.450600e+02\n13 7143     7.119700e+02 -1.745100e+02\n15 7143     6.620900e+02 2.651700e+02\n0 7144     6.638400e+02 4.259003e+01\n2 7144     5.994399e+02 5.376001e+01\n3 7144     4.630800e+02 -2.535000e+02\n6 7144     5.213400e+02 2.086800e+02\n7 7144     5.081600e+02 2.332000e+02\n8 7144     5.512600e+02 1.276001e+01\n9 7144     3.745300e+02 1.476900e+02\n10 7144     6.747900e+02 2.609600e+02\n0 7145     7.192800e+02 4.252002e+01\n7 7145     5.621100e+02 2.441500e+02\n0 7146     3.874100e+02 4.192999e+01\n7 7146     2.636600e+02 1.997700e+02\n15 7146     4.980300e+02 2.471300e+02\n0 7147     7.345500e+02 4.197998e+01\n10 7147     7.547800e+02 2.691200e+02\n12 7147     6.830800e+02 2.452100e+02\n0 7148     6.956000e+02 4.108002e+01\n3 7148     4.959700e+02 -2.377400e+02\n6 7148     5.593199e+02 2.185100e+02\n7 7148     5.393500e+02 2.378100e+02\n8 7148     5.798199e+02 2.301999e+01\n10 7148     7.119399e+02 2.626700e+02\n12 7148     6.383000e+02 2.284200e+02\n0 7149     6.992800e+02 4.071997e+01\n2 7149     6.376300e+02 7.003003e+01\n3 7149     4.994800e+02 -2.360600e+02\n6 7149     5.640400e+02 2.201100e+02\n7 7149     5.430200e+02 2.382800e+02\n8 7149     5.829800e+02 2.497000e+01\n9 7149     4.063101e+02 1.623900e+02\n10 7149     7.165300e+02 2.623800e+02\n0 7150     5.068000e+02 3.960999e+01\n10 7150     4.893300e+02 2.415000e+02\n13 7150     7.177400e+02 -1.770100e+02\n15 7150     6.719200e+02 2.602800e+02\n0 7151     5.068000e+02 3.960999e+01\n7 7151     3.529900e+02 1.985700e+02\n12 7151     4.157300e+02 1.519000e+02\n15 7151     6.719200e+02 2.602800e+02\n0 7152     6.655699e+02 3.857001e+01\n2 7152     6.025601e+02 5.029999e+01\n3 7152     4.666600e+02 -2.570500e+02\n7 7152     5.104900e+02 2.291500e+02\n8 7152     5.534399e+02 1.006000e+01\n10 7152     6.767200e+02 2.562900e+02\n0 7153     7.149600e+02 3.828998e+01\n2 7153     6.547100e+02 7.646002e+01\n6 7153     5.831600e+02 2.238200e+02\n7 7153     5.584800e+02 2.390800e+02\n10 7153     7.353400e+02 2.619000e+02\n12 7153     6.617500e+02 2.335700e+02\n0 7154     -1.722700e+02 3.806000e+01\n12 7154     -2.800500e+02 3.266998e+01\n0 7155     7.039100e+02 3.825000e+01\n6 7155     5.701801e+02 2.193600e+02\n7 7155     5.476500e+02 2.369200e+02\n8 7155     5.872500e+02 2.470999e+01\n9 7155     4.114900e+02 1.624700e+02\n10 7155     7.218800e+02 2.603100e+02\n12 7155     6.487800e+02 2.293600e+02\n0 7156     8.648400e+02 3.784998e+01\n2 7156     8.020200e+02 1.463800e+02\n3 7156     6.525100e+02 -1.570100e+02\n7 7156     6.999301e+02 2.669300e+02\n9 7156     5.412800e+02 2.316200e+02\n12 7156     8.283400e+02 2.902900e+02\n0 7157     -1.907001e+01 3.750000e+01\n3 7157     1.307001e+01 -2.667600e+02\n4 7157     -2.444500e+02 -3.972900e+02\n6 7157     -7.951001e+01 5.015997e+01\n7 7157     -1.137300e+02 1.455100e+02\n13 7157     3.468700e+02 -1.926500e+02\n15 7157     -6.488000e+01 1.856800e+02\n0 7158     -4.839200e+02 3.719000e+01\n13 7158     -1.607400e+02 -2.519000e+02\n0 7159     6.911400e+02 3.522998e+01\n7 7159     5.357400e+02 2.313900e+02\n10 7159     7.078300e+02 2.549100e+02\n0 7160     7.039301e+02 3.396002e+01\n2 7160     6.448199e+02 6.538000e+01\n6 7160     5.712800e+02 2.147600e+02\n10 7160     7.228400e+02 2.545700e+02\n12 7160     6.502400e+02 2.240500e+02\n0 7161     7.094500e+02 3.420001e+01\n2 7161     6.502900e+02 6.848999e+01\n3 7161     5.119700e+02 -2.371000e+02\n6 7161     5.778700e+02 2.173600e+02\n7 7161     5.537400e+02 2.340500e+02\n9 7161     4.167100e+02 1.617900e+02\n10 7161     7.289399e+02 2.558200e+02\n0 7162     8.220400e+02 3.210999e+01\n2 7162     7.635000e+02 1.214500e+02\n3 7162     6.174200e+02 -1.815800e+02\n7 7162     6.611899e+02 2.536900e+02\n9 7162     5.100000e+02 2.100600e+02\n12 7162     7.838300e+02 2.682100e+02\n0 7163     8.778000e+02 3.131000e+01\n2 7163     8.168199e+02 1.459900e+02\n3 7163     6.654301e+02 -1.565800e+02\n7 7163     7.127900e+02 2.631300e+02\n9 7163     5.525500e+02 2.317000e+02\n0 7164     6.962200e+02 3.109998e+01\n2 7164     6.371600e+02 5.841998e+01\n3 7164     4.994900e+02 -2.472100e+02\n6 7164     5.628500e+02 2.085800e+02\n7 7164     5.411600e+02 2.284500e+02\n8 7164     5.824200e+02 1.526001e+01\n9 7164     4.063000e+02 1.526800e+02\n10 7164     7.133500e+02 2.509200e+02\n12 7164     6.419301e+02 2.176400e+02\n0 7165     7.175800e+02 3.096002e+01\n3 7165     5.205100e+02 -2.356700e+02\n7 7165     5.618000e+02 2.325100e+02\n10 7165     7.388800e+02 2.524700e+02\n12 7165     6.664800e+02 2.256100e+02\n0 7166     5.089399e+02 3.065997e+01\n7 7166     3.558101e+02 1.907700e+02\n10 7166     4.939600e+02 2.314800e+02\n13 7166     7.228101e+02 -1.848100e+02\n15 7166     6.764500e+02 2.482500e+02\n0 7167     7.450300e+02 3.064001e+01\n2 7167     6.877300e+02 8.292999e+01\n3 7167     5.471400e+02 -2.215800e+02\n7 7167     5.883900e+02 2.376300e+02\n9 7167     4.479700e+02 1.751500e+02\n10 7167     7.714800e+02 2.556500e+02\n12 7167     6.978000e+02 2.369300e+02\n0 7168     8.651700e+02 3.064001e+01\n2 7168     8.054600e+02 1.395500e+02\n7 7168     7.013300e+02 2.602500e+02\n0 7169     6.657300e+02 2.975000e+01\n2 7169     6.051899e+02 4.140997e+01\n3 7169     4.689800e+02 -2.649700e+02\n6 7169     5.269000e+02 1.949300e+02\n7 7169     5.116000e+02 2.212300e+02\n8 7169     5.557400e+02 2.690002e+00\n9 7169     3.795200e+02 1.375200e+02\n10 7169     6.777400e+02 2.459300e+02\n12 7169     6.070400e+02 2.045900e+02\n0 7170     7.120400e+02 3.004999e+01\n2 7170     6.538300e+02 6.566998e+01\n3 7170     5.151400e+02 -2.395700e+02\n6 7170     5.816500e+02 2.136200e+02\n7 7170     5.570000e+02 2.305900e+02\n8 7170     5.968900e+02 2.095001e+01\n9 7170     4.200100e+02 1.595900e+02\n0 7171     8.197400e+02 3.002002e+01\n2 7171     7.620601e+02 1.188400e+02\n3 7171     6.167300e+02 -1.847700e+02\n7 7171     6.589800e+02 2.514200e+02\n9 7171     5.092400e+02 2.074500e+02\n0 7172     8.197400e+02 3.002002e+01\n2 7172     7.620601e+02 1.188400e+02\n3 7172     6.167300e+02 -1.847700e+02\n7 7172     6.589800e+02 2.514200e+02\n9 7172     5.092400e+02 2.074500e+02\n0 7173     7.342800e+02 2.603003e+01\n2 7173     6.780000e+02 7.306000e+01\n3 7173     5.384100e+02 -2.315700e+02\n7 7173     5.789301e+02 2.307200e+02\n9 7173     4.397600e+02 1.665200e+02\n12 7173     6.865300e+02 2.274600e+02\n0 7174     7.736200e+02 2.489001e+01\n7 7174     6.163700e+02 2.377200e+02\n0 7175     -1.547500e+02 2.448999e+01\n7 7175     -2.611500e+02 9.994000e+01\n10 7175     -2.760900e+02 1.529700e+02\n15 7175     -2.434700e+02 1.477600e+02\n0 7176     6.625300e+02 2.366998e+01\n3 7176     4.682100e+02 -2.731600e+02\n7 7176     5.093199e+02 2.146500e+02\n0 7177     6.625300e+02 2.366998e+01\n2 7177     6.033000e+02 3.307001e+01\n3 7177     4.682100e+02 -2.731600e+02\n6 7177     5.246300e+02 1.865300e+02\n7 7177     5.093199e+02 2.146500e+02\n8 7177     5.538800e+02 -3.920013e+00\n9 7177     3.783600e+02 1.306300e+02\n12 7177     6.046200e+02 1.962100e+02\n0 7178     7.026000e+02 2.338000e+01\n2 7178     6.465699e+02 5.433002e+01\n3 7178     5.080900e+02 -2.511700e+02\n7 7178     5.484600e+02 2.223800e+02\n10 7178     7.217600e+02 2.427700e+02\n0 7179     8.711600e+02 2.240997e+01\n2 7179     8.130100e+02 1.348000e+02\n3 7179     6.631000e+02 -1.675000e+02\n7 7179     7.078600e+02 2.536300e+02\n9 7179     5.499301e+02 2.224100e+02\n0 7180     5.622800e+02 2.207001e+01\n6 7180     4.022900e+02 1.444200e+02\n7 7180     4.109700e+02 1.930300e+02\n10 7180     5.571400e+02 2.263100e+02\n13 7180     7.804600e+02 -1.847600e+02\n15 7180     7.519800e+02 2.435700e+02\n0 7181     -3.193400e+02 2.092999e+01\n7 7181     -4.545600e+02 4.984998e+01\n10 7181     -4.696200e+02 1.330900e+02\n13 7181     -6.169983e+00 -2.550400e+02\n15 7181     -4.584300e+02 1.203300e+02\n0 7182     4.416998e+01 2.081000e+01\n3 7182     9.628003e+01 -2.530000e+02\n8 7182     1.845500e+02 4.200134e-01\n0 7183     7.251400e+02 1.969000e+01\n7 7183     5.706500e+02 2.233200e+02\n10 7183     7.484100e+02 2.407100e+02\n0 7184     -3.438600e+02 1.891998e+01\n13 7184     -2.784998e+01 -2.583300e+02\n15 7184     -4.921700e+02 1.141500e+02\n0 7185     7.146801e+02 1.921002e+01\n7 7185     5.606400e+02 2.206200e+02\n10 7185     7.365699e+02 2.386500e+02\n0 7186     -3.667300e+02 1.771002e+01\n7 7186     -5.030500e+02 3.783002e+01\n13 7186     -4.833002e+01 -2.609900e+02\n15 7186     -5.234300e+02 1.091900e+02\n0 7187     7.330699e+02 1.790997e+01\n3 7187     5.403000e+02 -2.401000e+02\n9 7187     4.415699e+02 1.591600e+02\n10 7187     7.576400e+02 2.390400e+02\n0 7188     7.330699e+02 1.790997e+01\n3 7188     5.403000e+02 -2.401000e+02\n7 7188     5.784301e+02 2.230500e+02\n9 7188     4.415699e+02 1.591600e+02\n10 7188     7.576400e+02 2.390400e+02\n0 7189     -3.479600e+02 1.770001e+01\n7 7189     -4.838700e+02 4.140002e+01\n15 7189     -4.976500e+02 1.118300e+02\n0 7190     1.055500e+02 1.739001e+01\n4 7190     -2.740100e+02 -4.977800e+02\n8 7190     2.403300e+02 1.135001e+01\n12 7190     9.825000e+01 1.254300e+02\n13 7190     4.663900e+02 -1.970300e+02\n0 7191     7.961300e+02 1.731000e+01\n7 7191     6.385900e+02 2.344300e+02\n0 7192     6.432400e+02 1.384998e+01\n2 7192     5.851899e+02 1.357001e+01\n9 7192     3.636899e+02 1.132200e+02\n12 7192     5.847800e+02 1.787900e+02\n0 7193     -3.480100e+02 1.378003e+01\n2 7193     -4.665400e+02 -2.479500e+02\n7 7193     -4.824300e+02 3.803003e+01\n13 7193     -3.003003e+01 -2.629200e+02\n0 7194     -3.480100e+02 1.378003e+01\n4 7194     -2.331100e+02 -1.341400e+02\n7 7194     -4.824300e+02 3.803003e+01\n13 7194     -3.003003e+01 -2.629200e+02\n15 7194     -4.967900e+02 1.069600e+02\n0 7195     5.305000e+02 1.357001e+01\n7 7195     3.798300e+02 1.781200e+02\n10 7195     5.204200e+02 2.129200e+02\n13 7195     7.475200e+02 -1.978500e+02\n0 7196     6.795500e+02 1.175000e+01\n8 7196     5.723000e+02 -7.679993e+00\n0 7197     7.345699e+02 9.940002e+00\n2 7197     6.834600e+02 5.754999e+01\n7 7197     5.810900e+02 2.156500e+02\n12 7197     6.917300e+02 2.107800e+02\n0 7198     8.477200e+02 9.780029e+00\n9 7198     5.360601e+02 2.034900e+02\n0 7199     -8.258002e+01 9.250000e+00\n3 7199     -6.951001e+01 -3.371800e+02\n7 7199     -1.780400e+02 1.025400e+02\n10 7199     -1.902600e+02 1.434600e+02\n13 7199     2.825500e+02 -2.260200e+02\n15 7199     -1.454200e+02 1.377200e+02\n0 7200     6.830601e+02 7.619995e+00\n3 7200     4.941000e+02 -2.770600e+02\n6 7200     5.542300e+02 1.784100e+02\n8 7200     5.764200e+02 -8.320007e+00\n10 7200     7.001899e+02 2.225200e+02\n0 7201     -8.912000e+01 6.669983e+00\n7 7201     -1.853400e+02 9.759000e+01\n0 7202     -3.164500e+02 5.849976e+00\n7 7202     -4.476100e+02 3.545001e+01\n13 7202     7.800293e-01 -2.679600e+02\n15 7202     -4.529000e+02 1.000300e+02\n0 7203     -3.237900e+02 3.869995e+00\n7 7203     -4.545900e+02 3.275000e+01\n8 7203     -2.960300e+02 -2.230100e+02\n9 7203     -4.748400e+02 -1.534400e+02\n13 7203     -5.929993e+00 -2.700900e+02\n0 7204     -3.537000e+02 3.359985e+00\n8 7204     -3.252900e+02 -2.286800e+02\n15 7204     -5.032200e+02 9.178000e+01\n0 7205     8.570200e+02 3.580017e+00\n2 7205     8.064100e+02 1.108900e+02\n3 7205     6.584600e+02 -1.905000e+02\n0 7206     8.570200e+02 3.580017e+00\n2 7206     8.064100e+02 1.108900e+02\n3 7206     6.584600e+02 -1.905000e+02\n7 7206     6.971500e+02 2.334500e+02\n9 7206     5.449700e+02 2.024600e+02\n12 7206     8.299800e+02 2.507500e+02\n0 7207     5.974800e+02 2.419983e+00\n7 7207     4.492700e+02 1.808400e+02\n8 7207     5.003700e+02 -4.757999e+01\n10 7207     6.001100e+02 2.071400e+02\n12 7207     5.351899e+02 1.470600e+02\n13 7207     8.197000e+02 -1.978300e+02\n15 7207     8.043600e+02 2.216900e+02\n0 7208     8.529000e+02 2.760010e+00\n2 7208     8.024399e+02 1.084400e+02\n3 7208     6.550000e+02 -1.928200e+02\n7 7208     6.935699e+02 2.317100e+02\n9 7208     5.418600e+02 2.001000e+02\n12 7208     8.250000e+02 2.484500e+02\n0 7209     8.147800e+02 1.539978e+00\n2 7209     7.666100e+02 8.928003e+01\n7 7209     6.583199e+02 2.235100e+02\n0 7210     -9.681000e+01 1.229980e+00\n7 7210     -1.919700e+02 9.148001e+01\n0 7211     6.829301e+02 1.239990e+00\n2 7211     6.315601e+02 2.181000e+01\n6 7211     5.554500e+02 1.700300e+02\n7 7211     5.324100e+02 1.971100e+02\n9 7211     4.028800e+02 1.214300e+02\n10 7211     6.996500e+02 2.155200e+02\n0 7212     6.829301e+02 1.239990e+00\n7 7212     5.324100e+02 1.971100e+02\n12 7212     6.342200e+02 1.797500e+02\n0 7213     8.706801e+02 -8.200073e-01\n2 7213     8.190300e+02 1.135200e+02\n7 7213     7.100900e+02 2.321000e+02\n9 7213     5.557400e+02 2.047700e+02\n0 7214     1.674000e+02 -1.750000e+00\n3 7214     2.205601e+02 -2.431300e+02\n6 7214     1.520100e+02 7.253998e+01\n7 7214     8.341998e+01 1.396200e+02\n8 7214     2.952200e+02 6.459991e+00\n10 7214     1.007200e+02 1.565400e+02\n13 7214     5.218600e+02 -2.086500e+02\n15 7214     1.925100e+02 1.576700e+02\n0 7215     5.673101e+02 -2.020020e+00\n6 7215     4.152700e+02 1.176100e+02\n7 7215     4.190000e+02 1.703900e+02\n0 7216     3.600500e+02 -3.929993e+00\n12 7216     3.490900e+02 1.348600e+02\n0 7217     7.124200e+02 -4.070007e+00\n3 7217     5.274200e+02 -2.719700e+02\n7 7217     5.616400e+02 1.974600e+02\n10 7217     7.347300e+02 2.134500e+02\n0 7218     -4.505200e+02 -5.200012e+00\n2 7218     -5.892300e+02 -2.918400e+02\n0 7219     6.763300e+02 -5.469971e+00\n7 7219     5.267200e+02 1.892400e+02\n9 7219     3.988199e+02 1.130400e+02\n12 7219     6.285100e+02 1.698400e+02\n0 7220     1.000600e+02 -7.309998e+00\n6 7220     8.419000e+01 4.506000e+01\n8 7220     2.436000e+02 -9.440002e+00\n10 7220     2.502002e+01 1.433800e+02\n15 7220     1.007800e+02 1.408500e+02\n0 7221     6.882100e+02 -8.750000e+00\n2 7221     6.403700e+02 1.354999e+01\n3 7221     5.053199e+02 -2.906200e+02\n8 7221     5.843300e+02 -2.042001e+01\n10 7221     7.067700e+02 2.032700e+02\n0 7222     -1.788000e+02 -9.059998e+00\n2 7222     -1.051800e+02 -8.681000e+01\n3 7222     -1.868100e+02 -4.021500e+02\n6 7222     -2.898900e+02 -7.687000e+01\n10 7222     -3.003800e+02 1.118200e+02\n12 7222     -2.627100e+02 -1.548999e+01\n15 7222     -2.721000e+02 1.000700e+02\n0 7223     -3.808500e+02 -9.919983e+00\n7 7223     -5.119700e+02 8.719971e+00\n13 7223     -5.494000e+01 -2.858900e+02\n15 7223     -5.386300e+02 7.042999e+01\n0 7224     -1.139900e+02 -1.052002e+01\n6 7224     -1.934900e+02 -4.728998e+01\n7 7224     -2.062000e+02 7.745001e+01\n10 7224     -2.245800e+02 1.170000e+02\n12 7224     -1.736300e+02 1.083002e+01\n15 7224     -1.854100e+02 1.067800e+02\n0 7225     6.737300e+02 -1.128998e+01\n3 7225     4.909301e+02 -3.003400e+02\n6 7225     5.483199e+02 1.517600e+02\n9 7225     3.976100e+02 1.069800e+02\n0 7226     2.790500e+02 -1.502002e+01\n12 7226     2.903900e+02 1.252100e+02\n13 7226     6.103900e+02 -2.143300e+02\n0 7227     6.789399e+02 -1.497998e+01\n2 7227     6.326200e+02 2.400024e+00\n6 7227     5.553500e+02 1.505000e+02\n8 7227     5.780699e+02 -3.023001e+01\n9 7227     4.039301e+02 1.059000e+02\n10 7227     6.965699e+02 1.954000e+02\n12 7227     6.341700e+02 1.598700e+02\n0 7228     -3.799700e+02 -1.617999e+01\n2 7228     -4.885500e+02 -2.820500e+02\n7 7228     -5.093300e+02 2.900024e+00\n8 7228     -3.436500e+02 -2.485100e+02\n13 7228     -5.197998e+01 -2.908100e+02\n15 7228     -5.368700e+02 6.181000e+01\n0 7229     -6.517999e+01 -1.690002e+01\n2 7229     5.720001e+01 -3.603998e+01\n4 7229     -2.767700e+02 -3.570500e+02\n7 7229     -1.534700e+02 8.129001e+01\n8 7229     7.723999e+01 -7.340002e+01\n12 7229     -1.080700e+02 2.244000e+01\n15 7229     -1.191400e+02 1.051400e+02\n0 7230     -6.517999e+01 -1.690002e+01\n7 7230     -1.534700e+02 8.129001e+01\n10 7230     -1.668500e+02 1.143600e+02\n15 7230     -1.191400e+02 1.051400e+02\n0 7231     8.554100e+02 -1.792999e+01\n2 7231     8.114700e+02 8.984003e+01\n7 7231     6.992500e+02 2.123900e+02\n9 7231     5.495300e+02 1.850400e+02\n0 7232     6.441998e+01 -2.206000e+01\n3 7232     1.358900e+02 -2.858400e+02\n4 7232     -2.965100e+02 -4.640500e+02\n6 7232     4.997998e+01 1.635999e+01\n8 7232     2.157400e+02 -3.004001e+01\n15 7232     5.494000e+01 1.159800e+02\n0 7233     6.183400e+02 -2.188000e+01\n12 7233     5.636200e+02 1.271300e+02\n0 7234     -9.887000e+01 -2.287000e+01\n7 7234     -1.875900e+02 6.845001e+01\n12 7234     -1.486300e+02 2.479980e+00\n0 7235     2.418700e+02 -2.603998e+01\n7 7235     1.573300e+02 1.265300e+02\n15 7235     2.986600e+02 1.340200e+02\n0 7236     7.039900e+02 -2.590002e+01\n2 7236     6.628199e+02 4.619995e+00\n3 7236     5.274399e+02 -2.982500e+02\n7 7236     5.564100e+02 1.752200e+02\n9 7236     4.287200e+02 1.091000e+02\n10 7236     7.269200e+02 1.852200e+02\n12 7236     6.659500e+02 1.578500e+02\n0 7237     1.105100e+02 -2.696002e+01\n4 7237     -3.056500e+02 -5.022000e+02\n8 7237     2.577400e+02 -2.309000e+01\n9 7237     1.228500e+02 1.210600e+02\n15 7237     1.180800e+02 1.158800e+02\n0 7238     7.152100e+02 -2.714001e+01\n2 7238     6.743800e+02 1.001001e+01\n3 7238     5.384301e+02 -2.929200e+02\n7 7238     5.672400e+02 1.763700e+02\n10 7238     7.410000e+02 1.845200e+02\n12 7238     6.790800e+02 1.610600e+02\n0 7239     7.001100e+02 -2.785999e+01\n6 7239     5.834100e+02 1.447300e+02\n0 7240     6.699500e+02 -2.937000e+01\n2 7240     6.270000e+02 -1.651001e+01\n6 7240     5.482700e+02 1.320200e+02\n8 7240     5.732400e+02 -4.528000e+01\n10 7240     6.874301e+02 1.779000e+02\n12 7240     6.275100e+02 1.418600e+02\n0 7241     6.699500e+02 -2.937000e+01\n6 7241     5.482700e+02 1.320200e+02\n8 7241     5.732400e+02 -4.528000e+01\n10 7241     6.874301e+02 1.779000e+02\n12 7241     6.275100e+02 1.418600e+02\n0 7242     7.269800e+02 -2.934998e+01\n2 7242     6.868600e+02 1.317999e+01\n3 7242     5.508500e+02 -2.886100e+02\n7 7242     5.790200e+02 1.764600e+02\n9 7242     4.486400e+02 1.171400e+02\n10 7242     7.540800e+02 1.833300e+02\n12 7242     6.925000e+02 1.628700e+02\n0 7243     8.640601e+02 -3.066998e+01\n2 7243     8.239700e+02 8.170001e+01\n3 7243     6.773101e+02 -2.174600e+02\n7 7243     7.083199e+02 2.022800e+02\n9 7243     5.597700e+02 1.785100e+02\n0 7244     8.548600e+02 -3.153998e+01\n2 7244     8.154301e+02 7.688000e+01\n7 7244     6.998199e+02 1.995800e+02\n0 7245     8.584600e+02 -3.269000e+01\n2 7245     8.191899e+02 7.751001e+01\n3 7245     6.730800e+02 -2.221400e+02\n7 7245     7.035000e+02 1.992900e+02\n9 7245     5.562300e+02 1.748600e+02\n0 7246     8.584600e+02 -3.269000e+01\n2 7246     8.191899e+02 7.751001e+01\n7 7246     7.035000e+02 1.992900e+02\n0 7247     6.562400e+02 -3.442999e+01\n6 7247     5.333500e+02 1.191100e+02\n12 7247     6.127500e+02 1.287900e+02\n0 7248     -7.694000e+01 -3.503003e+01\n7 7248     -1.617800e+02 6.092999e+01\n10 7248     -1.786700e+02 9.207001e+01\n0 7249     7.750200e+02 -3.517999e+01\n2 7249     7.394600e+02 3.316998e+01\n3 7249     5.989301e+02 -2.674900e+02\n7 7249     6.255900e+02 1.806500e+02\n9 7249     4.906700e+02 1.353100e+02\n10 7249     8.117100e+02 1.822000e+02\n12 7249     7.483900e+02 1.768400e+02\n0 7250     7.750200e+02 -3.517999e+01\n2 7250     7.394600e+02 3.316998e+01\n3 7250     5.989301e+02 -2.674900e+02\n7 7250     6.255900e+02 1.806500e+02\n9 7250     4.906700e+02 1.353100e+02\n10 7250     8.117100e+02 1.822000e+02\n0 7251     -2.575300e+02 -3.546997e+01\n7 7251     -3.767000e+02 6.080017e+00\n12 7251     -4.113600e+02 -1.257300e+02\n13 7251     6.410999e+01 -2.990700e+02\n15 7251     -3.671100e+02 5.265002e+01\n0 7252     -2.575300e+02 -3.546997e+01\n7 7252     -3.767000e+02 6.080017e+00\n15 7252     -3.671100e+02 5.265002e+01\n0 7253     6.564001e+01 -3.604999e+01\n3 7253     1.430900e+02 -2.985900e+02\n9 7253     8.825000e+01 1.013300e+02\n0 7254     4.338600e+02 -3.722998e+01\n7 7254     3.265500e+02 1.354900e+02\n0 7255     6.900200e+02 -3.947998e+01\n2 7255     6.510900e+02 -1.642999e+01\n3 7255     5.178800e+02 -3.192200e+02\n6 7255     5.750100e+02 1.283900e+02\n7 7255     5.446899e+02 1.595400e+02\n9 7255     4.202200e+02 9.110999e+01\n12 7255     6.528199e+02 1.371200e+02\n0 7256     -4.794400e+02 -3.990997e+01\n7 7256     -6.094000e+02 -3.915997e+01\n0 7257     -4.056200e+02 -4.015002e+01\n7 7257     -5.307300e+02 -2.491998e+01\n13 7257     -7.050000e+01 -3.130800e+02\n15 7257     -5.695300e+02 2.570001e+01\n0 7258     8.420400e+02 -4.071997e+01\n3 7258     6.617000e+02 -2.376400e+02\n7 7258     6.891300e+02 1.885600e+02\n0 7259     1.355500e+02 -4.151001e+01\n2 7259     3.081500e+02 2.112000e+01\n7 7259     5.895001e+01 9.609000e+01\n10 7259     6.821997e+01 1.064600e+02\n13 7259     5.001100e+02 -2.449800e+02\n15 7259     1.541100e+02 9.919000e+01\n0 7260     6.668600e+02 -4.342999e+01\n8 7260     5.733800e+02 -5.959003e+01\n0 7261     7.233600e+02 -4.421997e+01\n2 7261     6.878600e+02 -2.549988e+00\n3 7261     5.524600e+02 -3.051500e+02\n7 7261     5.775000e+02 1.619300e+02\n9 7261     4.499800e+02 1.035900e+02\n10 7261     7.512700e+02 1.660600e+02\n12 7261     6.928600e+02 1.466600e+02\n0 7262     7.622800e+02 -4.377002e+01\n2 7262     7.275800e+02 1.728003e+01\n3 7262     5.899600e+02 -2.830400e+02\n7 7262     6.146000e+02 1.697400e+02\n9 7262     4.826600e+02 1.219200e+02\n10 7262     7.974000e+02 1.706000e+02\n12 7262     7.363800e+02 1.616000e+02\n0 7263     -4.809998e+00 -4.459003e+01\n7 7263     -8.316998e+01 6.726001e+01\n15 7263     -3.495001e+01 7.571997e+01\n0 7264     -4.715600e+02 -4.560999e+01\n7 7264     -5.993900e+02 -4.248999e+01\n0 7265     -1.852800e+02 -4.571997e+01\n2 7265     -8.252002e+01 -1.124400e+02\n4 7265     -2.811800e+02 -2.675500e+02\n6 7265     -2.685400e+02 -1.160900e+02\n7 7265     -2.742400e+02 2.890002e+01\n8 7265     -3.725000e+01 -1.335000e+02\n10 7265     -3.018700e+02 6.659998e+01\n12 7265     -2.510900e+02 -5.403003e+01\n15 7265     -2.748000e+02 4.753003e+01\n0 7266     -4.770001e+01 -4.532001e+01\n13 7266     3.278500e+02 -2.674600e+02\n15 7266     -9.175000e+01 6.908002e+01\n0 7267     -3.736900e+02 -5.283002e+01\n2 7267     -4.556700e+02 -3.126700e+02\n7 7267     -4.936200e+02 -3.195001e+01\n8 7267     -3.201500e+02 -2.744800e+02\n9 7267     -4.910900e+02 -2.073600e+02\n12 7267     -5.500700e+02 -1.800600e+02\n15 7267     -5.237500e+02 1.289001e+01\n0 7268     8.700800e+02 -5.253003e+01\n7 7268     7.167400e+02 1.828000e+02\n9 7268     5.705400e+02 1.640800e+02\n0 7269     7.026400e+02 -5.391998e+01\n2 7269     6.689900e+02 -2.484998e+01\n3 7269     5.361899e+02 -3.267500e+02\n7 7269     5.587100e+02 1.479500e+02\n9 7269     4.350100e+02 8.463000e+01\n10 7269     7.275200e+02 1.523100e+02\n12 7269     6.713700e+02 1.258700e+02\n0 7270     -1.748900e+02 -5.435999e+01\n6 7270     -2.511200e+02 -1.213100e+02\n7 7270     -2.611900e+02 2.252002e+01\n15 7270     -2.619500e+02 3.942999e+01\n0 7271     -4.682600e+02 -5.490997e+01\n2 7271     -5.805200e+02 -3.413700e+02\n7 7271     -5.934400e+02 -5.134998e+01\n12 7271     -6.724800e+02 -2.116200e+02\n13 7271     -1.244900e+02 -3.303400e+02\n0 7272     -3.718700e+02 -5.873999e+01\n2 7272     -4.488400e+02 -3.164300e+02\n7 7272     -4.898900e+02 -3.689001e+01\n8 7272     -3.155400e+02 -2.785300e+02\n9 7272     -4.845800e+02 -2.109600e+02\n12 7272     -5.451300e+02 -1.853700e+02\n0 7273     -4.402100e+02 -5.906000e+01\n2 7273     -5.389200e+02 -3.362000e+02\n8 7273     -3.866700e+02 -2.934500e+02\n10 7273     -5.999500e+02 2.669000e+01\n13 7273     -9.640997e+01 -3.314100e+02\n0 7274     2.700195e-01 -5.896997e+01\n2 7274     1.658800e+02 -4.191998e+01\n15 7274     -2.616998e+01 5.709003e+01\n0 7275     -4.035999e+01 -5.938000e+01\n7 7275     -1.187300e+02 4.417999e+01\n0 7276     6.710500e+02 -5.971002e+01\n6 7276     5.579301e+02 9.726001e+01\n8 7276     5.807600e+02 -7.179999e+01\n9 7276     4.086700e+02 6.394000e+01\n12 7276     6.363500e+02 1.066200e+02\n0 7277     6.956100e+02 -5.978998e+01\n2 7277     6.632500e+02 -3.427002e+01\n3 7277     5.307800e+02 -3.366800e+02\n7 7277     5.525601e+02 1.411100e+02\n9 7277     4.302000e+02 7.628003e+01\n10 7277     7.202300e+02 1.447900e+02\n12 7277     6.647700e+02 1.170600e+02\n0 7278     -6.581400e+02 -6.137000e+01\n13 7278     -2.991300e+02 -3.476200e+02\n0 7279     -4.148500e+02 -6.200000e+01\n2 7279     -5.021100e+02 -3.322200e+02\n7 7279     -5.348200e+02 -4.932001e+01\n8 7279     -3.595600e+02 -2.909300e+02\n10 7279     -5.728600e+02 2.398999e+01\n0 7280     -1.561800e+02 -6.240997e+01\n6 7280     -2.220900e+02 -1.225800e+02\n7 7280     -2.399000e+02 1.778003e+01\n10 7280     -2.681400e+02 5.178998e+01\n12 7280     -2.080200e+02 -6.234998e+01\n13 7280     2.259399e+02 -2.935300e+02\n15 7280     -2.355500e+02 3.065002e+01\n0 7281     -9.881000e+01 -6.283002e+01\n7 7281     -1.784300e+02 2.991998e+01\n10 7281     -2.013900e+02 5.772998e+01\n15 7281     -1.586700e+02 3.834998e+01\n0 7282     7.574800e+02 -6.259998e+01\n3 7282     5.930699e+02 -3.041200e+02\n7 7282     6.128700e+02 1.505500e+02\n10 7282     7.930699e+02 1.481100e+02\n12 7282     7.371000e+02 1.387200e+02\n0 7283     7.574800e+02 -6.259998e+01\n2 7283     7.288101e+02 -3.270020e+00\n3 7283     5.930699e+02 -3.041200e+02\n7 7283     6.128700e+02 1.505500e+02\n10 7283     7.930699e+02 1.481100e+02\n12 7283     7.371000e+02 1.387200e+02\n0 7284     2.975900e+02 -6.284998e+01\n8 7284     3.966700e+02 -4.187000e+01\n0 7285     7.914500e+02 -6.392999e+01\n2 7285     7.634900e+02 1.251001e+01\n3 7285     6.247900e+02 -2.865200e+02\n7 7285     6.448900e+02 1.564900e+02\n0 7286     2.044000e+01 -6.641998e+01\n7 7286     -5.321997e+01 5.009998e+01\n10 7286     -6.298999e+01 6.590002e+01\n0 7287     8.118600e+02 -6.721997e+01\n7 7287     6.644700e+02 1.575300e+02\n0 7288     -4.188100e+02 -6.800000e+01\n2 7288     -5.053400e+02 -3.389600e+02\n8 7288     -3.612800e+02 -2.962100e+02\n9 7288     -5.311300e+02 -2.332400e+02\n10 7288     -5.769700e+02 1.751001e+01\n13 7288     -7.554999e+01 -3.385800e+02\n15 7288     -5.831800e+02 -1.482001e+01\n0 7289     1.015800e+02 -6.897998e+01\n6 7289     1.075800e+02 -2.278998e+01\n0 7290     8.694600e+02 -6.903003e+01\n7 7290     7.183900e+02 1.669000e+02\n9 7290     5.754500e+02 1.505700e+02\n0 7291     -3.844200e+02 -6.948999e+01\n7 7291     -5.007600e+02 -4.990997e+01\n0 7292     -3.844200e+02 -6.948999e+01\n7 7292     -5.007600e+02 -4.990997e+01\n0 7293     3.824100e+02 -6.959998e+01\n7 7293     2.876200e+02 9.832001e+01\n0 7294     6.821801e+02 -7.006000e+01\n2 7294     6.494301e+02 -5.282001e+01\n3 7294     5.209200e+02 -3.549300e+02\n8 7294     5.924399e+02 -7.602002e+01\n9 7294     4.198500e+02 6.031000e+01\n10 7294     7.024900e+02 1.321700e+02\n12 7294     6.498101e+02 1.004000e+02\n0 7295     7.662200e+02 -7.062000e+01\n7 7295     6.218500e+02 1.447500e+02\n10 7295     8.041000e+02 1.405300e+02\n0 7296     2.944301e+02 -7.095001e+01\n7 7296     2.106801e+02 8.801001e+01\n13 7296     6.275200e+02 -2.630000e+02\n15 7296     3.780100e+02 8.035001e+01\n0 7297     7.627300e+02 -7.087000e+01\n2 7297     7.369200e+02 -8.919983e+00\n9 7297     4.903500e+02 1.002200e+02\n10 7297     7.997600e+02 1.387800e+02\n12 7297     7.445500e+02 1.328800e+02\n0 7298     -4.275000e+02 -7.171002e+01\n7 7298     -5.461700e+02 -6.046002e+01\n13 7298     -8.301001e+01 -3.419000e+02\n0 7299     8.578600e+02 -7.140997e+01\n7 7299     7.080500e+02 1.624300e+02\n9 7299     5.666899e+02 1.438700e+02\n0 7300     1.067800e+02 -7.239001e+01\n2 7300     2.906600e+02 -1.778003e+01\n13 7300     4.786100e+02 -2.748600e+02\n15 7300     1.190000e+02 5.331000e+01\n0 7301     6.814301e+02 -7.367999e+01\n6 7301     5.752200e+02 8.708002e+01\n9 7301     4.215500e+02 5.714001e+01\n12 7301     6.519500e+02 9.570001e+01\n0 7302     8.476700e+02 -7.971002e+01\n2 7302     8.227900e+02 2.696997e+01\n7 7302     6.992300e+02 1.531100e+02\n9 7302     5.604301e+02 1.330400e+02\n0 7303     -1.877200e+02 -8.026001e+01\n7 7303     -2.740300e+02 -9.760010e+00\n0 7304     3.357300e+02 -8.122998e+01\n7 7304     2.507200e+02 8.379999e+01\n0 7305     8.753600e+02 -8.150000e+01\n9 7305     5.827200e+02 1.435700e+02\n0 7306     2.202002e+01 -8.845001e+01\n3 7306     1.128300e+02 -3.720700e+02\n7 7306     -4.844000e+01 2.834998e+01\n0 7307     -4.154400e+02 -8.978003e+01\n7 7307     -5.290100e+02 -7.577002e+01\n8 7307     -3.474000e+02 -3.120700e+02\n10 7307     -5.703500e+02 -7.510010e+00\n13 7307     -6.742999e+01 -3.570000e+02\n15 7307     -5.765600e+02 -4.289001e+01\n0 7308     6.700900e+02 -9.071002e+01\n6 7308     5.658700e+02 6.323999e+01\n7 7308     5.318400e+02 1.063500e+02\n9 7308     4.168700e+02 3.696997e+01\n0 7309     6.910900e+02 -9.089001e+01\n2 7309     6.673300e+02 -6.952002e+01\n3 7309     5.372600e+02 -3.710800e+02\n7 7309     5.524399e+02 1.101300e+02\n9 7309     4.351700e+02 4.722998e+01\n0 7310     -3.320300e+02 -9.240002e+01\n7 7310     -4.399800e+02 -6.240997e+01\n13 7310     1.014001e+01 -3.532500e+02\n0 7311     6.986400e+02 -9.253998e+01\n2 7311     6.765000e+02 -6.675000e+01\n3 7311     5.461700e+02 -3.677200e+02\n7 7311     5.600000e+02 1.101600e+02\n9 7311     4.425500e+02 5.016998e+01\n10 7311     7.258700e+02 1.075700e+02\n12 7311     6.770200e+02 8.233002e+01\n0 7312     1.094700e+02 -9.326001e+01\n2 7312     2.985500e+02 -4.134003e+01\n6 7312     1.224200e+02 -4.871997e+01\n8 7312     2.725200e+02 -8.358002e+01\n10 7312     4.376001e+01 4.514001e+01\n12 7312     1.368500e+02 -9.500122e-01\n0 7313     1.684900e+02 -9.381000e+01\n2 7313     3.536400e+02 -3.010999e+01\n6 7313     1.830300e+02 -3.034003e+01\n8 7313     3.195300e+02 -7.401001e+01\n13 7313     5.328800e+02 -2.889800e+02\n15 7313     2.062800e+02 3.321002e+01\n0 7314     2.283101e+02 -9.534003e+01\n10 7314     1.810000e+02 5.434998e+01\n13 7314     5.813300e+02 -2.868900e+02\n0 7315     -4.181400e+02 -9.583002e+01\n2 7315     -4.843600e+02 -3.629800e+02\n7 7315     -5.296900e+02 -8.206000e+01\n8 7315     -3.480800e+02 -3.175700e+02\n10 7315     -5.716900e+02 -1.460999e+01\n12 7315     -5.885400e+02 -2.405100e+02\n15 7315     -5.785600e+02 -5.116998e+01\n0 7316     -4.647300e+02 -9.767999e+01\n7 7316     -5.795000e+02 -9.320001e+01\n8 7316     -3.969000e+02 -3.296400e+02\n0 7317     -4.704600e+02 -9.859998e+01\n7 7317     -5.851400e+02 -9.515997e+01\n13 7317     -1.162900e+02 -3.685700e+02\n0 7318     7.646500e+02 -9.958002e+01\n7 7318     6.241899e+02 1.170200e+02\n0 7319     1.389399e+02 -1.006700e+02\n2 7319     3.285699e+02 -4.448999e+01\n3 7319     2.334399e+02 -3.467100e+02\n6 7319     1.549400e+02 -4.838000e+01\n8 7319     2.982700e+02 -8.544000e+01\n15 7319     1.662800e+02 1.859998e+01\n0 7320     -3.911000e+02 -1.014000e+02\n7 7320     -4.999800e+02 -8.244000e+01\n9 7320     -4.754100e+02 -2.459400e+02\n13 7320     -4.154999e+01 -3.651200e+02\n15 7320     -5.411800e+02 -5.520001e+01\n0 7321     5.960999e+01 -1.022100e+02\n6 7321     6.915002e+01 -7.703998e+01\n7 7321     -7.440002e+00 2.194000e+01\n8 7321     2.306800e+02 -1.040800e+02\n13 7321     4.386100e+02 -3.055300e+02\n15 7321     6.021002e+01 6.690002e+00\n0 7322     4.090699e+02 -1.038600e+02\n6 7322     3.949700e+02 1.512000e+01\n10 7322     3.896700e+02 6.371002e+01\n12 7322     4.410900e+02 4.583002e+01\n0 7323     6.890800e+02 -1.038000e+02\n2 7323     6.686700e+02 -8.337000e+01\n3 7323     5.397800e+02 -3.850100e+02\n7 7323     5.523199e+02 9.754999e+01\n9 7323     4.361801e+02 3.559998e+01\n12 7323     6.679700e+02 6.627002e+01\n0 7324     -4.355000e+02 -1.051600e+02\n7 7324     -5.467900e+02 -9.489001e+01\n15 7324     -6.027100e+02 -6.751001e+01\n0 7325     2.418400e+02 -1.049100e+02\n2 7325     4.144301e+02 -3.697998e+01\n3 7325     3.123800e+02 -3.391200e+02\n6 7325     2.529900e+02 -2.454999e+01\n7 7325     1.692300e+02 4.890002e+01\n10 7325     1.972800e+02 4.497998e+01\n12 7325     2.801500e+02 1.616998e+01\n13 7325     5.929800e+02 -2.945900e+02\n15 7325     3.086200e+02 2.698999e+01\n0 7326     7.308300e+02 -1.054500e+02\n2 7326     7.140601e+02 -6.225000e+01\n7 7326     5.926300e+02 1.047600e+02\n9 7326     4.733900e+02 5.547998e+01\n10 7326     7.644800e+02 9.629999e+01\n12 7326     7.169700e+02 8.112000e+01\n0 7327     4.074600e+02 -1.076300e+02\n6 7327     3.966100e+02 1.131000e+01\n10 7327     3.883199e+02 5.925000e+01\n12 7327     4.423300e+02 4.190002e+01\n0 7328     3.108600e+02 -1.078200e+02\n6 7328     3.182600e+02 -8.780029e+00\n7 7328     2.343900e+02 5.633002e+01\n12 7328     3.526600e+02 2.773999e+01\n13 7328     6.502300e+02 -2.927700e+02\n15 7328     4.047300e+02 3.209998e+01\n0 7329     3.204900e+02 -1.081700e+02\n10 7329     2.879500e+02 4.945001e+01\n13 7329     6.583400e+02 -2.925100e+02\n15 7329     4.181600e+02 3.323999e+01\n0 7330     1.385699e+02 -1.116100e+02\n3 7330     2.362100e+02 -3.593400e+02\n7 7330     7.239001e+01 2.615997e+01\n0 7331     2.876899e+02 -1.117300e+02\n7 7331     2.134100e+02 4.865002e+01\n15 7331     3.728000e+02 2.401001e+01\n0 7332     4.075200e+02 -1.120200e+02\n7 7332     3.212200e+02 6.406000e+01\n12 7332     4.437300e+02 3.812000e+01\n0 7333     2.435699e+02 -1.155200e+02\n13 7333     5.960200e+02 -3.035800e+02\n0 7334     7.772300e+02 -1.167900e+02\n2 7334     7.654900e+02 -4.857001e+01\n3 7334     6.314500e+02 -3.458600e+02\n7 7334     6.381899e+02 1.031600e+02\n9 7334     5.156300e+02 6.878003e+01\n10 7334     8.205200e+02 8.719000e+01\n12 7334     7.726500e+02 8.757001e+01\n0 7335     -2.672998e+01 -1.174800e+02\n3 7335     8.212000e+01 -4.105601e+02\n7 7335     -9.106000e+01 -8.460022e+00\n15 7335     -5.534998e+01 -2.534003e+01\n0 7336     -1.450000e+01 -1.232500e+02\n7 7336     -7.759003e+01 -1.165002e+01\n0 7337     1.045000e+02 -1.284900e+02\n13 7337     4.815900e+02 -3.246700e+02\n0 7338     -3.001800e+02 -1.298200e+02\n2 7338     -3.060800e+02 -3.581100e+02\n6 7338     -4.816700e+02 -3.159100e+02\n13 7338     4.895001e+01 -3.834200e+02\n0 7339     -1.095700e+02 -1.310900e+02\n7 7339     -1.747500e+02 -3.951001e+01\n15 7339     -1.651600e+02 -5.562000e+01\n0 7340     -1.477400e+02 -1.345200e+02\n7 7340     -2.127400e+02 -4.928998e+01\n10 7340     -2.508900e+02 -3.090997e+01\n15 7340     -2.161500e+02 -6.537000e+01\n0 7341     2.477800e+02 -1.375900e+02\n7 7341     1.823700e+02 1.878003e+01\n10 7341     2.071801e+02 8.030029e+00\n15 7341     3.210699e+02 -1.609003e+01\n0 7342     6.888000e+02 -1.377100e+02\n7 7342     5.564600e+02 6.490002e+01\n9 7342     4.464600e+02 5.989990e+00\n0 7343     2.541100e+02 -1.426400e+02\n10 7343     2.155200e+02 2.169983e+00\n13 7343     6.134100e+02 -3.256300e+02\n0 7344     8.756400e+02 -1.447400e+02\n7 7344     7.332700e+02 9.679001e+01\n9 7344     5.997700e+02 9.220001e+01\n0 7345     1.133100e+02 -1.481500e+02\n7 7345     5.584998e+01 -1.284003e+01\n10 7345     5.279999e+01 -1.869000e+01\n0 7346     1.095000e+02 -1.510700e+02\n6 7346     1.488200e+02 -1.098300e+02\n12 7346     1.579600e+02 -6.467999e+01\n0 7347     8.240900e+02 -1.508300e+02\n2 7347     8.237900e+02 -5.742999e+01\n7 7347     6.866899e+02 8.056000e+01\n9 7347     5.631200e+02 6.327002e+01\n0 7348     -1.030000e+02 -1.513800e+02\n6 7348     -9.678000e+01 -1.932900e+02\n7 7348     -1.628600e+02 -5.712000e+01\n13 7348     2.987000e+02 -3.631900e+02\n15 7348     -1.536100e+02 -8.195001e+01\n0 7349     1.594700e+02 -1.532100e+02\n13 7349     5.358300e+02 -3.409400e+02\n15 7349     2.013500e+02 -4.914001e+01\n0 7350     7.596000e+02 -1.529200e+02\n2 7350     7.590601e+02 -9.507001e+01\n9 7350     5.115699e+02 2.966998e+01\n12 7350     7.623300e+02 3.991998e+01\n0 7351     7.196100e+02 -1.556500e+02\n2 7351     7.177000e+02 -1.209300e+02\n7 7351     5.883199e+02 5.440997e+01\n0 7352     -6.457001e+01 -1.566300e+02\n10 7352     -1.511000e+02 -4.716998e+01\n12 7352     -4.981000e+01 -1.302500e+02\n13 7352     3.342900e+02 -3.643400e+02\n0 7353     -1.350300e+02 -1.575100e+02\n4 7353     -3.648800e+02 -3.009900e+02\n7 7353     -1.986400e+02 -7.235999e+01\n12 7353     -1.470200e+02 -1.641700e+02\n15 7353     -1.950500e+02 -9.362000e+01\n0 7354     3.831700e+02 -1.591300e+02\n7 7354     3.098500e+02 1.682001e+01\n10 7354     3.646600e+02 -2.950012e+00\n15 7354     5.116700e+02 -2.835999e+01\n0 7355     7.953700e+02 -1.589500e+02\n2 7355     7.970100e+02 -8.148999e+01\n9 7355     5.421000e+02 4.233002e+01\n12 7355     8.041899e+02 4.802002e+01\n0 7356     3.790997e+01 -1.609000e+02\n2 7356     2.532900e+02 -1.308300e+02\n3 7356     1.687700e+02 -4.323800e+02\n6 7356     7.035999e+01 -1.492400e+02\n8 7356     2.317800e+02 -1.572400e+02\n10 7356     -3.234998e+01 -4.103003e+01\n12 7356     7.577002e+01 -1.015600e+02\n13 7356     4.283199e+02 -3.587600e+02\n15 7356     3.802002e+01 -7.567999e+01\n0 7357     -1.431000e+01 -1.607800e+02\n7 7357     -7.096997e+01 -4.970001e+01\n10 7357     -9.283002e+01 -4.675000e+01\n15 7357     -3.242999e+01 -8.221002e+01\n0 7358     7.344301e+02 -1.618900e+02\n7 7358     6.035800e+02 5.119000e+01\n0 7359     8.744900e+02 -1.618800e+02\n7 7359     7.344600e+02 8.029001e+01\n0 7360     8.744900e+02 -1.618800e+02\n7 7360     7.344600e+02 8.029001e+01\n0 7361     8.348600e+02 -1.688400e+02\n7 7361     6.987700e+02 6.572998e+01\n0 7362     7.695601e+02 -1.706700e+02\n7 7362     6.382800e+02 5.028003e+01\n0 7363     8.026899e+02 -1.718400e+02\n2 7363     8.090200e+02 -9.029999e+01\n7 7363     6.696400e+02 5.621997e+01\n12 7363     8.161801e+02 3.728998e+01\n0 7364     8.026899e+02 -1.718400e+02\n2 7364     8.090200e+02 -9.029999e+01\n7 7364     6.696400e+02 5.621997e+01\n12 7364     8.161801e+02 3.728998e+01\n0 7365     -6.364001e+01 -1.747400e+02\n6 7365     -3.478003e+01 -2.015800e+02\n10 7365     -1.482600e+02 -6.821002e+01\n12 7365     -3.841998e+01 -1.488600e+02\n13 7365     3.411300e+02 -3.795800e+02\n15 7365     -9.834998e+01 -1.073300e+02\n0 7366     7.493400e+02 -1.750100e+02\n2 7366     7.549500e+02 -1.242800e+02\n3 7366     6.279500e+02 -4.211300e+02\n7 7366     6.192000e+02 4.203998e+01\n10 7366     7.921801e+02 1.731000e+01\n0 7367     7.826500e+02 -1.751900e+02\n2 7367     7.893000e+02 -1.048000e+02\n7 7367     6.508199e+02 4.898999e+01\n9 7367     5.363800e+02 2.253003e+01\n0 7368     3.202002e+01 -1.753400e+02\n7 7368     -2.190997e+01 -5.557001e+01\n10 7368     -3.788000e+01 -5.820001e+01\n15 7368     3.153003e+01 -9.590997e+01\n0 7369     7.531100e+02 -1.754600e+02\n3 7369     6.313101e+02 -4.192700e+02\n7 7369     6.229399e+02 4.240002e+01\n0 7370     9.957001e+01 -1.784300e+02\n2 7370     3.252500e+02 -1.296700e+02\n3 7370     2.364900e+02 -4.290900e+02\n6 7370     1.452000e+02 -1.461400e+02\n8 7370     2.914700e+02 -1.576600e+02\n12 7370     1.536500e+02 -1.019100e+02\n0 7371     2.099600e+02 -1.784100e+02\n6 7371     2.549700e+02 -1.109700e+02\n7 7371     1.530000e+02 -2.697998e+01\n12 7371     2.744500e+02 -7.202002e+01\n15 7371     2.734500e+02 -7.676001e+01\n0 7372     7.543700e+02 -1.792900e+02\n2 7372     7.616600e+02 -1.260100e+02\n7 7372     6.249100e+02 3.887000e+01\n9 7372     5.143500e+02 4.190002e+00\n10 7372     7.987200e+02 1.279999e+01\n0 7373     7.543700e+02 -1.792900e+02\n2 7373     7.616600e+02 -1.260100e+02\n7 7373     6.249100e+02 3.887000e+01\n9 7373     5.143500e+02 4.190002e+00\n0 7374     7.543700e+02 -1.792900e+02\n2 7374     7.616600e+02 -1.260100e+02\n7 7374     6.249100e+02 3.887000e+01\n9 7374     5.143500e+02 4.190002e+00\n10 7374     7.987200e+02 1.279999e+01\n12 7374     7.637500e+02 8.080017e+00\n0 7375     5.896997e+01 -1.819800e+02\n7 7375     7.359985e+00 -5.710999e+01\n0 7376     8.427500e+02 -1.838500e+02\n7 7376     7.079700e+02 5.291998e+01\n0 7377     -9.187000e+01 -1.846800e+02\n2 7377     1.067300e+02 -2.117700e+02\n4 7377     -3.907500e+02 -3.338600e+02\n6 7377     -8.035999e+01 -2.318300e+02\n7 7377     -1.473000e+02 -9.019000e+01\n12 7377     -7.991998e+01 -1.779700e+02\n15 7377     -1.329100e+02 -1.255100e+02\n0 7378     2.125400e+02 -1.846700e+02\n6 7378     2.590900e+02 -1.175700e+02\n0 7379     -4.280200e+02 -1.852400e+02\n7 7379     -5.187000e+02 -1.718400e+02\n15 7379     -5.817900e+02 -1.735800e+02\n0 7380     3.317600e+02 -1.880500e+02\n6 7380     3.751200e+02 -8.459998e+01\n12 7380     4.059500e+02 -5.188000e+01\n0 7381     8.434900e+02 -1.879300e+02\n3 7381     7.203400e+02 -3.768200e+02\n7 7381     7.094399e+02 4.957001e+01\n9 7381     5.885400e+02 4.235999e+01\n0 7382     3.330699e+02 -1.914800e+02\n3 7382     4.297100e+02 -3.940900e+02\n10 7382     3.100400e+02 -4.528003e+01\n15 7382     4.451200e+02 -7.885999e+01\n0 7383     3.330699e+02 -1.914800e+02\n6 7383     3.783000e+02 -8.759003e+01\n10 7383     3.100400e+02 -4.528003e+01\n12 7383     4.090100e+02 -5.475000e+01\n15 7383     4.451200e+02 -7.885999e+01\n0 7384     -8.221002e+01 -1.924400e+02\n2 7384     1.230600e+02 -2.155100e+02\n3 7384     4.741998e+01 -5.199700e+02\n6 7384     -6.297998e+01 -2.366600e+02\n7 7384     -1.359700e+02 -9.559003e+01\n8 7384     1.229000e+02 -2.240900e+02\n9 7384     7.059998e+00 -8.876001e+01\n12 7384     -6.345001e+01 -1.837400e+02\n15 7384     -1.189000e+02 -1.342700e+02\n0 7385     7.932200e+02 -1.940000e+02\n7 7385     6.634600e+02 3.323999e+01\n0 7386     -8.933002e+01 -1.945800e+02\n6 7386     -7.596002e+01 -2.451899e+02\n10 7386     -1.764400e+02 -9.394000e+01\n15 7386     -1.280000e+02 -1.382800e+02\n0 7387     -4.972998e+01 -1.954700e+02\n2 7387     1.767900e+02 -1.902800e+02\n3 7387     1.005800e+02 -4.921300e+02\n4 7387     -4.051300e+02 -3.704900e+02\n6 7387     -1.163000e+01 -2.198000e+02\n7 7387     -9.871002e+01 -9.042999e+01\n8 7387     1.650700e+02 -2.059000e+02\n12 7387     -1.534003e+01 -1.692300e+02\n0 7388     3.196500e+02 -1.961600e+02\n6 7388     3.685700e+02 -9.609003e+01\n10 7388     2.953500e+02 -5.207001e+01\n12 7388     3.972400e+02 -6.296002e+01\n15 7388     4.272900e+02 -8.694000e+01\n0 7389     3.605300e+02 -1.995400e+02\n7 7389     2.994200e+02 -2.265997e+01\n15 7389     4.842100e+02 -8.640002e+01\n0 7390     2.250000e+01 -2.000100e+02\n6 7390     7.494000e+01 -1.960300e+02\n7 7390     -2.492999e+01 -8.090997e+01\n10 7390     -4.628998e+01 -8.867999e+01\n12 7390     7.453998e+01 -1.493300e+02\n15 7390     2.127002e+01 -1.312200e+02\n0 7391     3.242600e+02 -2.013300e+02\n7 7391     2.654000e+02 -3.062000e+01\n10 7391     3.014399e+02 -5.701001e+01\n15 7391     4.344700e+02 -9.328003e+01\n0 7392     7.809100e+02 -2.029100e+02\n12 7392     7.998500e+02 -6.710022e+00\n0 7393     7.705500e+02 -2.032500e+02\n2 7393     7.860300e+02 -1.411600e+02\n0 7394     7.705500e+02 -2.032500e+02\n2 7394     7.860300e+02 -1.411600e+02\n12 7394     7.884000e+02 -1.144000e+01\n0 7395     6.508002e+01 -2.038900e+02\n7 7395     1.808002e+01 -7.617999e+01\n10 7395     3.130005e+00 -8.773999e+01\n15 7395     7.971002e+01 -1.302700e+02\n0 7396     7.870000e+02 -2.074100e+02\n3 7396     6.763900e+02 -4.310500e+02\n12 7396     8.085900e+02 -8.859985e+00\n0 7397     8.559000e+02 -2.092800e+02\n7 7397     7.235300e+02 3.196997e+01\n9 7397     6.040900e+02 3.051001e+01\n0 7398     1.169700e+02 -2.101000e+02\n7 7398     7.084998e+01 -7.309003e+01\n10 7398     6.396997e+01 -8.928998e+01\n15 7398     1.510100e+02 -1.317800e+02\n0 7399     2.622700e+02 -2.100800e+02\n7 7399     2.102700e+02 -4.816998e+01\n10 7399     2.318900e+02 -7.391998e+01\n15 7399     3.497800e+02 -1.133200e+02\n0 7400     1.082500e+02 -2.104500e+02\n4 7400     -4.467000e+02 -5.000601e+02\n7 7400     6.207001e+01 -7.475000e+01\n10 7400     5.371002e+01 -9.023999e+01\n13 7400     5.001000e+02 -3.955900e+02\n15 7400     1.389200e+02 -1.331900e+02\n0 7401     2.545699e+02 -2.117400e+02\n2 7401     4.835800e+02 -1.252900e+02\n3 7401     3.854100e+02 -4.208000e+02\n6 7401     3.159000e+02 -1.300800e+02\n8 7401     4.259301e+02 -1.553500e+02\n12 7401     3.369500e+02 -9.442999e+01\n13 7401     6.266899e+02 -3.859500e+02\n0 7402     8.628900e+02 -2.146700e+02\n7 7402     7.305100e+02 2.854999e+01\n9 7402     6.108300e+02 2.967999e+01\n0 7403     2.717400e+02 -2.149500e+02\n6 7403     3.349900e+02 -1.278300e+02\n7 7403     2.198700e+02 -5.159003e+01\n8 7403     4.405500e+02 -1.546800e+02\n10 7403     2.417500e+02 -7.896997e+01\n12 7403     3.570800e+02 -9.321002e+01\n13 7403     6.421899e+02 -3.874500e+02\n15 7403     3.628300e+02 -1.187600e+02\n0 7404     2.403003e+01 -2.158300e+02\n7 7404     -1.889001e+01 -9.471002e+01\n13 7404     4.287800e+02 -4.070200e+02\n0 7405     -1.739990e+00 -2.185200e+02\n2 7405     2.409301e+02 -1.980700e+02\n3 7405     1.624200e+02 -4.974200e+02\n6 7405     5.350000e+01 -2.265601e+02\n7 7405     -4.509998e+01 -1.040100e+02\n8 7405     2.183000e+02 -2.139400e+02\n10 7405     -7.137000e+01 -1.122800e+02\n12 7405     5.063000e+01 -1.795300e+02\n13 7405     4.021300e+02 -4.129000e+02\n15 7405     -8.500000e+00 -1.589300e+02\n0 7406     8.416998e+01 -2.191500e+02\n3 7406     2.508500e+02 -4.634000e+02\n4 7406     -4.486900e+02 -4.812600e+02\n6 7406     1.519600e+02 -1.928900e+02\n8 7406     2.977100e+02 -1.896800e+02\n12 7406     1.548000e+02 -1.499400e+02\n0 7407     6.202002e+01 -2.192700e+02\n2 7407     3.162700e+02 -1.712000e+02\n4 7407     -4.441600e+02 -4.635400e+02\n13 7407     4.636500e+02 -4.070300e+02\n15 7407     7.729999e+01 -1.510200e+02\n0 7408     1.240600e+02 -2.197200e+02\n7 7408     8.028998e+01 -8.096997e+01\n10 7408     7.308002e+01 -9.979999e+01\n15 7408     1.615100e+02 -1.440100e+02\n0 7409     1.240600e+02 -2.197200e+02\n3 7409     2.861100e+02 -4.543101e+02\n4 7409     -4.572800e+02 -5.147600e+02\n6 7409     1.923300e+02 -1.799000e+02\n12 7409     1.991600e+02 -1.390000e+02\n13 7409     5.169200e+02 -4.022800e+02\n0 7410     7.062000e+01 -2.296600e+02\n7 7410     2.994000e+01 -9.954999e+01\n13 7410     4.735300e+02 -4.150400e+02\n0 7411     -4.236600e+02 -2.313700e+02\n6 7411     -5.721100e+02 -4.847100e+02\n7 7411     -5.024600e+02 -2.166700e+02\n8 7411     -2.882900e+02 -4.250100e+02\n10 7411     -5.630400e+02 -1.741000e+02\n15 7411     -5.704700e+02 -2.355700e+02\n0 7412     1.712400e+02 -2.352300e+02\n7 7412     1.294000e+02 -8.741998e+01\n10 7412     1.296800e+02 -1.121900e+02\n13 7412     5.617400e+02 -4.118700e+02\n15 7412     2.275300e+02 -1.588300e+02\n0 7413     1.341300e+02 -2.364900e+02\n10 7413     8.584998e+01 -1.177200e+02\n13 7413     5.298700e+02 -4.158100e+02\n15 7413     1.778500e+02 -1.651700e+02\n0 7414     1.775300e+02 -2.396700e+02\n3 7414     3.415200e+02 -4.592700e+02\n6 7414     2.541200e+02 -1.838900e+02\n7 7414     1.355300e+02 -9.119000e+01\n10 7414     1.365000e+02 -1.169800e+02\n13 7414     5.664800e+02 -4.160000e+02\n15 7414     2.367100e+02 -1.641400e+02\n0 7415     2.096000e+02 -2.421300e+02\n7 7415     1.661000e+02 -8.853003e+01\n10 7415     1.735600e+02 -1.166100e+02\n15 7415     2.811700e+02 -1.635300e+02\n0 7416     -1.319000e+01 -2.422800e+02\n3 7416     1.483000e+02 -5.445500e+02\n6 7416     3.890997e+01 -2.652100e+02\n12 7416     3.783002e+01 -2.184400e+02\n15 7416     -1.959003e+01 -1.928700e+02\n0 7417     1.065002e+01 -2.442300e+02\n4 7417     -4.554100e+02 -4.148700e+02\n6 7417     6.859003e+01 -2.569600e+02\n7 7417     -3.078003e+01 -1.294000e+02\n8 7417     2.293400e+02 -2.425000e+02\n9 7417     1.162400e+02 -9.802002e+01\n13 7417     4.120900e+02 -4.374000e+02\n0 7418     1.639900e+02 -2.470800e+02\n2 7418     4.194900e+02 -1.799300e+02\n4 7418     -4.889100e+02 -5.485800e+02\n6 7418     2.412400e+02 -1.978300e+02\n7 7418     1.229500e+02 -1.015600e+02\n9 7418     2.484100e+02 -4.673999e+01\n10 7418     1.220100e+02 -1.270300e+02\n12 7418     2.515100e+02 -1.600100e+02\n15 7418     2.201801e+02 -1.762800e+02\n0 7419     8.402500e+02 -2.479400e+02\n3 7419     7.424800e+02 -4.400900e+02\n0 7420     1.385300e+02 -2.477500e+02\n4 7420     -4.837300e+02 -5.266600e+02\n0 7421     -9.838000e+01 -2.497300e+02\n2 7421     9.544000e+01 -3.196400e+02\n7 7421     -1.480700e+02 -1.610800e+02\n8 7421     1.009700e+02 -3.055000e+02\n9 7421     -1.165997e+01 -1.772800e+02\n10 7421     -1.804900e+02 -1.581000e+02\n13 7421     2.949100e+02 -4.596700e+02\n15 7421     -1.312800e+02 -2.143100e+02\n0 7422     -1.322700e+02 -2.511600e+02\n7 7422     -1.860200e+02 -1.717800e+02\n15 7422     -1.750800e+02 -2.208700e+02\n0 7423     4.859985e+00 -2.510700e+02\n2 7423     2.444200e+02 -2.484800e+02\n3 7423     1.675200e+02 -5.480300e+02\n6 7423     5.946997e+01 -2.688101e+02\n8 7423     2.209500e+02 -2.537100e+02\n9 7423     1.099800e+02 -1.102100e+02\n10 7423     -6.058002e+01 -1.485200e+02\n12 7423     5.928998e+01 -2.232500e+02\n15 7423     6.950012e+00 -2.024400e+02\n0 7424     7.438400e+02 -2.688700e+02\n7 7424     6.340400e+02 -4.354999e+01\n0 7425     1.703998e+01 -2.898300e+02\n3 7425     1.823300e+02 -6.071600e+02\n7 7425     -2.115002e+01 -1.763900e+02\n9 7425     1.221900e+02 -1.579200e+02\n10 7425     -4.278003e+01 -1.915900e+02\n15 7425     2.871997e+01 -2.531500e+02\n0 7426     -3.164100e+02 -2.963500e+02\n7 7426     -3.736800e+02 -2.588300e+02\n10 7426     -4.280100e+02 -2.365700e+02\n0 7427     6.131700e+02 -3.002800e+02\n2 7427     7.264301e+02 -2.437400e+02\n15 7427     8.562900e+02 -1.931300e+02\n0 7428     3.245699e+02 -3.011300e+02\n7 7428     2.723900e+02 -1.352200e+02\n10 7428     3.124100e+02 -1.715700e+02\n15 7428     4.516400e+02 -2.294400e+02\n0 7429     3.245699e+02 -3.011300e+02\n7 7429     2.723900e+02 -1.352200e+02\n0 7430     2.644399e+02 -3.083400e+02\n10 7430     2.424500e+02 -1.860700e+02\n13 7430     6.310699e+02 -4.831200e+02\n15 7430     3.676200e+02 -2.465900e+02\n0 7431     2.605500e+02 -3.129600e+02\n3 7431     4.003300e+02 -5.717500e+02\n7 7431     2.170300e+02 -1.559000e+02\n9 7431     3.078900e+02 -1.245800e+02\n10 7431     2.393900e+02 -1.916500e+02\n13 7431     6.284000e+02 -4.877100e+02\n15 7431     3.637100e+02 -2.533300e+02\n0 7432     8.036300e+02 -3.150900e+02\n7 7432     6.953199e+02 -7.438000e+01\n0 7433     5.259900e+02 -3.263500e+02\n6 7433     5.532100e+02 -2.117900e+02\n7 7433     4.537700e+02 -1.312500e+02\n0 7434     5.175900e+02 -3.342900e+02\n7 7434     4.490800e+02 -1.396300e+02\n0 7435     1.641899e+02 -3.349200e+02\n7 7435     1.303800e+02 -1.936900e+02\n0 7436     1.689800e+02 -3.378400e+02\n7 7436     1.344600e+02 -1.965300e+02\n0 7437     1.843400e+02 -3.419300e+02\n7 7437     1.493000e+02 -1.983900e+02\n9 7437     2.644399e+02 -1.698500e+02\n10 7437     1.548500e+02 -2.330200e+02\n15 7437     2.631500e+02 -3.020700e+02\n0 7438     3.520601e+02 -3.488900e+02\n9 7438     3.774500e+02 -1.441000e+02\n10 7438     3.482700e+02 -2.222600e+02\n0 7439     1.873700e+02 -3.495800e+02\n9 7439     2.666000e+02 -1.780700e+02\n0 7440     7.425000e+02 -3.532100e+02\n7 7440     6.515300e+02 -1.183800e+02\n0 7441     8.426001e+01 -3.570500e+02\n7 7441     5.639001e+01 -2.310500e+02\n10 7441     4.190997e+01 -2.611000e+02\n15 7441     1.290100e+02 -3.352200e+02\n0 7442     7.182500e+02 -3.670000e+02\n7 7442     6.336100e+02 -1.348100e+02\n0 7443     8.716899e+02 -3.734000e+02\n7 7443     7.638400e+02 -1.139300e+02\n0 7444     7.159399e+02 -3.740900e+02\n7 7444     6.331700e+02 -1.413400e+02\n0 7445     7.159399e+02 -3.740900e+02\n7 7445     6.331700e+02 -1.413400e+02\n12 7445     8.174600e+02 -1.871200e+02\n0 7446     4.859700e+02 -3.779700e+02\n6 7446     5.453500e+02 -2.739600e+02\n0 7447     7.812900e+02 -3.815300e+02\n7 7447     6.908600e+02 -1.365300e+02\n0 7448     7.998600e+02 -3.822000e+02\n7 7448     7.067500e+02 -1.340600e+02\n0 7449     7.342100e+02 -3.834500e+02\n7 7449     6.511100e+02 -1.466800e+02\n0 7450     6.911000e+02 -3.854300e+02\n7 7450     6.145300e+02 -1.554800e+02\n0 7451     -3.974500e+02 -3.921700e+02\n7 7451     -4.350400e+02 -3.697600e+02\n10 7451     -5.129100e+02 -3.582700e+02\n15 7451     -5.152900e+02 -4.495900e+02\n0 7452     7.659200e+02 -3.954700e+02\n7 7452     6.809000e+02 -1.516400e+02\n0 7453     -3.949800e+02 -3.968500e+02\n6 7453     -4.089300e+02 -6.559100e+02\n7 7453     -4.304200e+02 -3.740800e+02\n15 7453     -5.118800e+02 -4.558000e+02\n0 7454     7.145900e+02 -3.981600e+02\n7 7454     6.373900e+02 -1.627800e+02\n0 7455     3.116700e+02 -4.027800e+02\n7 7455     2.766100e+02 -2.378100e+02\n0 7456     -1.458002e+01 -4.049400e+02\n7 7456     -3.587000e+01 -3.006100e+02\n15 7456     2.780029e+00 -4.128700e+02\n0 7457     7.115699e+02 -4.064000e+02\n7 7457     6.366500e+02 -1.707200e+02\n0 7458     4.879301e+02 -4.136900e+02\n6 7458     5.680601e+02 -3.072300e+02\n0 7459     1.453003e+01 -4.172300e+02\n7 7459     -5.690002e+00 -3.063200e+02\n0 7460     6.930200e+02 -4.181100e+02\n7 7460     6.229399e+02 -1.839700e+02\n0 7461     1.348900e+02 -4.240100e+02\n7 7461     1.161200e+02 -2.889900e+02\n0 7462     1.547800e+02 -4.331100e+02\n9 7462     2.758101e+02 -2.646400e+02\n0 7463     -2.034600e+02 -4.375200e+02\n4 7463     -5.701000e+02 -2.247200e+02\n6 7463     -1.409900e+02 -6.054301e+02\n7 7463     -2.215200e+02 -3.724400e+02\n9 7463     -3.763000e+01 -4.071400e+02\n10 7463     -2.806400e+02 -3.855100e+02\n15 7463     -2.470700e+02 -4.812700e+02\n0 7464     6.346200e+02 -4.373900e+02\n7 7464     5.769600e+02 -2.120200e+02\n0 7465     6.157100e+02 -4.396600e+02\n7 7465     5.609900e+02 -2.174300e+02\n10 7465     6.604700e+02 -2.996300e+02\n12 7465     7.535000e+02 -2.785300e+02\n0 7466     8.495601e+02 -4.418500e+02\n7 7466     7.600100e+02 -1.776700e+02\n0 7467     6.257900e+02 -4.430100e+02\n10 7467     6.719399e+02 -3.025900e+02\n12 7467     7.641100e+02 -2.787100e+02\n0 7468     7.667800e+02 -4.439301e+02\n7 7468     6.920100e+02 -1.943400e+02\n0 7469     4.168300e+02 -4.523101e+02\n6 7469     5.230200e+02 -3.689100e+02\n0 7470     4.168300e+02 -4.523101e+02\n2 7470     6.738000e+02 -3.995900e+02\n6 7470     5.230200e+02 -3.689100e+02\n0 7471     -1.954000e+02 -4.595900e+02\n2 7471     7.085999e+01 -6.120000e+02\n6 7471     -1.161100e+02 -6.252500e+02\n9 7471     -1.403998e+01 -4.199500e+02\n15 7471     -2.339400e+02 -5.117100e+02\n0 7472     -2.800400e+02 -4.605300e+02\n6 7472     -2.177600e+02 -6.669600e+02\n0 7473     -2.035700e+02 -4.645699e+02\n4 7473     -5.931900e+02 -2.244500e+02\n7 7473     -2.148600e+02 -3.993100e+02\n9 7473     -1.840997e+01 -4.263000e+02\n0 7474     -1.432200e+02 -4.752600e+02\n6 7474     -4.491998e+01 -6.167400e+02\n0 7475     -1.236200e+02 -4.800300e+02\n7 7475     -1.297600e+02 -3.972900e+02\n0 7476     5.532600e+02 -4.909200e+02\n10 7476     5.937200e+02 -3.647200e+02\n12 7476     7.169000e+02 -3.474400e+02\n15 7476     7.944500e+02 -4.617600e+02\n0 7477     7.132600e+02 -4.918101e+02\n7 7477     6.568400e+02 -2.467400e+02\n0 7478     8.009399e+02 -4.928700e+02\n7 7478     7.305100e+02 -2.311800e+02\n0 7479     7.012000e+02 -4.950800e+02\n7 7479     6.471600e+02 -2.512000e+02\n10 7479     7.636100e+02 -3.542000e+02\n0 7480     5.067900e+02 -4.970900e+02\n2 7480     7.818700e+02 -4.057000e+02\n12 7480     6.734600e+02 -3.681200e+02\n0 7481     8.572600e+02 -4.997500e+02\n7 7481     7.782500e+02 -2.269000e+02\n0 7482     -1.142900e+02 -5.007800e+02\n2 7482     1.966100e+02 -6.162100e+02\n4 7482     -6.466700e+02 -2.941400e+02\n9 7482     8.992999e+01 -4.156500e+02\n0 7483     7.398800e+02 -5.035300e+02\n7 7483     6.819500e+02 -2.515000e+02\n0 7484     7.398800e+02 -5.035300e+02\n7 7484     6.819500e+02 -2.515000e+02\n0 7485     -2.422300e+02 -5.052700e+02\n9 7485     -2.470001e+01 -4.694399e+02\n0 7486     -5.990002e+01 -5.090100e+02\n7 7486     -5.867999e+01 -4.119000e+02\n15 7486     -4.470001e+01 -5.599900e+02\n0 7487     -1.674600e+02 -5.184500e+02\n7 7487     -1.641900e+02 -4.443800e+02\n0 7488     5.283700e+02 -5.220100e+02\n10 7488     5.677200e+02 -4.020500e+02\n12 7488     7.068500e+02 -3.862500e+02\n0 7489     7.619399e+02 -5.257700e+02\n7 7489     7.049301e+02 -2.666100e+02\n0 7490     -3.227300e+02 -5.279399e+02\n7 7490     -3.216800e+02 -4.874800e+02\n0 7491     -1.066900e+02 -5.285400e+02\n4 7491     -6.738900e+02 -3.005600e+02\n6 7491     3.272998e+01 -6.557600e+02\n7 7491     -1.005000e+02 -4.406600e+02\n0 7492     -3.180500e+02 -5.299301e+02\n6 7492     -2.146300e+02 -7.617400e+02\n7 7492     -3.164200e+02 -4.882900e+02\n0 7493     -2.757100e+02 -5.309301e+02\n7 7493     -2.725500e+02 -4.797100e+02\n10 7493     -3.543100e+02 -5.036400e+02\n0 7494     -7.996997e+01 -5.318500e+02\n7 7494     -7.365997e+01 -4.381300e+02\n0 7495     4.013900e+02 -5.319000e+02\n6 7495     5.561899e+02 -4.492100e+02\n0 7496     -1.205700e+02 -5.401100e+02\n6 7496     2.484998e+01 -6.748600e+02\n0 7497     4.541998e+01 -5.445300e+02\n2 7497     4.012300e+02 -5.931500e+02\n7 7497     5.427002e+01 -4.241200e+02\n12 7497     1.997000e+02 -5.728000e+02\n0 7498     7.453600e+02 -5.447800e+02\n7 7498     6.953600e+02 -2.868600e+02\n0 7499     4.937000e+01 -5.462000e+02\n7 7499     5.747998e+01 -4.245800e+02\n0 7500     5.870699e+02 -5.479000e+02\n12 7500     7.794000e+02 -3.935400e+02\n0 7501     7.406000e+01 -5.483800e+02\n6 7501     2.409200e+02 -5.958000e+02\n10 7501     4.938000e+01 -4.800300e+02\n0 7502     1.373000e+02 -5.511500e+02\n7 7502     1.447500e+02 -4.111500e+02\n10 7502     1.233000e+02 -4.772400e+02\n0 7503     -3.413000e+01 -5.520200e+02\n7 7503     -2.233002e+01 -4.479000e+02\n9 7503     1.952500e+02 -4.183200e+02\n0 7504     1.538800e+02 -5.522000e+02\n2 7504     5.126200e+02 -5.596500e+02\n6 7504     3.253700e+02 -5.657900e+02\n0 7505     2.105500e+02 -5.536500e+02\n7 7505     2.154200e+02 -3.988000e+02\n0 7506     6.407800e+02 -5.545699e+02\n7 7506     6.080200e+02 -3.150900e+02\n0 7507     4.852002e+01 -5.554800e+02\n7 7507     6.050000e+01 -4.338800e+02\n0 7508     1.312600e+02 -5.561600e+02\n7 7508     1.397000e+02 -4.175200e+02\n10 7508     1.168100e+02 -4.837900e+02\n0 7509     -1.692999e+01 -5.575500e+02\n7 7509     -3.710022e+00 -4.496100e+02\n10 7509     -5.234998e+01 -5.022400e+02\n0 7510     -1.692999e+01 -5.575500e+02\n4 7510     -7.258100e+02 -3.761500e+02\n7 7510     -3.710022e+00 -4.496100e+02\n9 7510     2.133199e+02 -4.155300e+02\n10 7510     -5.234998e+01 -5.022400e+02\n0 7511     2.410900e+02 -5.579200e+02\n6 7511     4.165000e+02 -5.363500e+02\n7 7511     2.457000e+02 -3.968300e+02\n10 7511     2.422600e+02 -4.736500e+02\n0 7512     2.410900e+02 -5.579200e+02\n6 7512     4.165000e+02 -5.363500e+02\n7 7512     2.457000e+02 -3.968300e+02\n9 7512     4.083900e+02 -3.283500e+02\n10 7512     2.422600e+02 -4.736500e+02\n0 7513     7.184600e+02 -5.589200e+02\n7 7513     6.754800e+02 -3.036000e+02\n0 7514     1.979399e+02 -5.594600e+02\n2 7514     5.602900e+02 -5.501100e+02\n4 7514     -7.908900e+02 -5.691300e+02\n6 7514     3.741300e+02 -5.553400e+02\n7 7514     2.049301e+02 -4.068300e+02\n9 7514     3.787300e+02 -3.434700e+02\n10 7514     1.934800e+02 -4.799700e+02\n0 7515     8.059003e+01 -5.616500e+02\n7 7515     9.260999e+01 -4.323101e+02\n10 7515     5.926001e+01 -4.957700e+02\n12 7515     2.479700e+02 -5.783700e+02\n0 7516     1.846400e+02 -5.623101e+02\n7 7516     1.929000e+02 -4.122100e+02\n10 7516     1.786100e+02 -4.847600e+02\n0 7517     1.732400e+02 -5.636801e+02\n6 7517     3.513400e+02 -5.698800e+02\n0 7518     3.871002e+01 -5.650200e+02\n6 7518     2.144700e+02 -6.277000e+02\n7 7518     5.226001e+01 -4.447700e+02\n9 7518     2.629399e+02 -3.999100e+02\n0 7519     7.638000e+02 -5.677700e+02\n7 7519     7.153900e+02 -3.033000e+02\n0 7520     -5.201001e+01 -5.681801e+02\n7 7520     -3.622998e+01 -4.673000e+02\n10 7520     -9.197998e+01 -5.185300e+02\n0 7521     -5.201001e+01 -5.681801e+02\n7 7521     -3.622998e+01 -4.673000e+02\n10 7521     -9.197998e+01 -5.185300e+02\n0 7522     5.211500e+02 -5.684399e+02\n7 7522     5.060699e+02 -3.510100e+02\n0 7523     6.596500e+02 -5.736200e+02\n7 7523     6.284200e+02 -3.282400e+02\n0 7524     5.393400e+02 -5.774800e+02\n7 7524     5.243400e+02 -3.553100e+02\n0 7525     7.526899e+02 -5.781300e+02\n7 7525     7.082900e+02 -3.144000e+02\n0 7526     7.526899e+02 -5.781300e+02\n7 7526     7.082900e+02 -3.144000e+02\n0 7527     -5.946997e+01 -5.809800e+02\n7 7527     -4.035999e+01 -4.812400e+02\n0 7528     -5.946997e+01 -5.809800e+02\n4 7528     -7.360400e+02 -3.411200e+02\n7 7528     -4.035999e+01 -4.812400e+02\n0 7529     -4.220001e+01 -5.812800e+02\n4 7529     -7.412300e+02 -3.555600e+02\n7 7529     -2.315997e+01 -4.774600e+02\n9 7529     2.094500e+02 -4.403300e+02\n10 7529     -7.917999e+01 -5.323199e+02\n0 7530     -4.220001e+01 -5.812800e+02\n7 7530     -2.315997e+01 -4.774600e+02\n10 7530     -7.917999e+01 -5.323199e+02\n0 7531     6.854900e+02 -5.824800e+02\n7 7531     6.523700e+02 -3.311000e+02\n10 7531     7.535400e+02 -4.553400e+02\n0 7532     4.379200e+02 -5.833101e+02\n7 7532     4.344399e+02 -3.805100e+02\n10 7532     4.694399e+02 -4.815699e+02\n0 7533     7.415200e+02 -5.838400e+02\n7 7533     7.002200e+02 -3.217100e+02\n0 7534     9.138000e+01 -5.845699e+02\n7 7534     1.086100e+02 -4.524000e+02\n0 7535     -4.365002e+01 -5.849200e+02\n4 7535     -7.445500e+02 -3.547300e+02\n7 7535     -2.369000e+01 -4.813900e+02\n9 7535     2.109301e+02 -4.431200e+02\n10 7535     -8.045001e+01 -5.366200e+02\n0 7536     3.749301e+02 5.866700e+02\n2 7536     2.469000e+01 3.563600e+02\n11 7536     4.766400e+02 -1.713100e+02\n13 7536     4.824100e+02 2.664500e+02\n14 7536     6.706400e+02 -1.293900e+02\n0 7537     -5.551500e+02 5.843800e+02\n5 7537     -1.203700e+02 -6.346002e+01\n11 7537     -3.251000e+02 -2.007300e+02\n13 7537     -2.421700e+02 2.151100e+02\n14 7537     -2.047300e+02 -1.598800e+02\n0 7538     9.420001e+01 5.843900e+02\n5 7538     4.979399e+02 -6.091998e+01\n6 7538     -3.906200e+02 6.475900e+02\n8 7538     -9.573999e+01 2.742400e+02\n12 7538     -2.188200e+02 6.183200e+02\n13 7538     2.624700e+02 2.459000e+02\n14 7538     4.022200e+02 -1.469000e+02\n0 7539     9.420001e+01 5.843900e+02\n5 7539     4.979399e+02 -6.091998e+01\n6 7539     -3.906200e+02 6.475900e+02\n8 7539     -9.573999e+01 2.742400e+02\n11 7539     2.263300e+02 -1.891000e+02\n12 7539     -2.188200e+02 6.183200e+02\n13 7539     2.624700e+02 2.459000e+02\n14 7539     4.022200e+02 -1.469000e+02\n0 7540     4.216200e+02 5.833900e+02\n2 7540     6.375000e+01 3.529800e+02\n3 7540     -8.453998e+01 1.803998e+01\n5 7540     8.221600e+02 -4.934998e+01\n8 7540     1.336900e+02 2.785100e+02\n9 7540     -1.009600e+02 3.827800e+02\n11 7540     5.203900e+02 -1.712100e+02\n13 7540     5.201400e+02 2.669700e+02\n14 7540     7.170000e+02 -1.297800e+02\n0 7541     8.516998e+01 5.829600e+02\n3 7541     -3.526700e+02 1.922998e+01\n5 7541     4.902200e+02 -6.160999e+01\n6 7541     -3.997300e+02 6.451300e+02\n8 7541     -1.018300e+02 2.729500e+02\n9 7541     -3.427100e+02 3.745200e+02\n11 7541     2.185700e+02 -1.901900e+02\n12 7541     -2.278900e+02 6.166400e+02\n14 7541     3.936400e+02 -1.484100e+02\n0 7542     -4.516900e+02 5.812100e+02\n2 7542     -7.417400e+02 3.627600e+02\n5 7542     -2.357001e+01 -6.579999e+01\n0 7543     2.894500e+02 5.801500e+02\n2 7543     -4.492999e+01 3.464900e+02\n3 7543     -1.867200e+02 1.203998e+01\n4 7543     4.478003e+01 -5.531000e+02\n6 7543     -1.820400e+02 6.774400e+02\n8 7543     4.356000e+01 2.714500e+02\n9 7543     -1.927500e+02 3.740300e+02\n11 7543     4.008300e+02 -1.822800e+02\n13 7543     4.150900e+02 2.531200e+02\n14 7543     5.884600e+02 -1.424400e+02\n0 7544     6.296002e+01 5.794200e+02\n2 7544     -2.402100e+02 3.494200e+02\n3 7544     -3.718700e+02 1.571997e+01\n4 7544     5.715002e+01 -4.046800e+02\n5 7544     4.677700e+02 -6.600000e+01\n8 7544     -1.186800e+02 2.692400e+02\n12 7544     -2.511800e+02 6.093600e+02\n14 7544     3.730100e+02 -1.526000e+02\n0 7545     -7.678100e+02 5.745000e+02\n5 7545     -4.583300e+02 -7.941998e+01\n11 7545     -4.774400e+02 -2.061300e+02\n0 7546     1.550000e+01 5.720400e+02\n12 7546     -3.002500e+02 5.948400e+02\n14 7546     3.281000e+02 -1.624300e+02\n0 7547     5.658300e+02 5.717000e+02\n6 7547     2.270600e+02 7.480100e+02\n8 7547     3.252400e+02 3.624700e+02\n9 7547     1.182900e+02 4.918300e+02\n11 7547     6.339500e+02 -1.745400e+02\n0 7548     3.845100e+02 5.703700e+02\n2 7548     3.479999e+01 3.398200e+02\n3 7548     -1.118900e+02 4.690002e+00\n5 7548     7.846300e+02 -6.445001e+01\n6 7548     -8.294000e+01 6.860500e+02\n8 7548     1.093800e+02 2.674400e+02\n9 7548     -1.251400e+02 3.701500e+02\n11 7548     4.885100e+02 -1.844200e+02\n13 7548     4.911100e+02 2.537000e+02\n14 7548     6.818199e+02 -1.449800e+02\n0 7549     -3.304500e+02 5.701200e+02\n8 7549     -4.259100e+02 2.567100e+02\n11 7549     -1.413800e+02 -2.135500e+02\n12 7549     -6.871600e+02 5.473600e+02\n13 7549     -6.790997e+01 2.128500e+02\n14 7549     2.929993e+00 -1.718900e+02\n0 7550     4.673101e+02 5.693400e+02\n8 7550     1.654700e+02 2.680900e+02\n9 7550     -6.810999e+01 3.716700e+02\n0 7551     1.654600e+02 5.659000e+02\n4 7551     4.335999e+01 -4.692900e+02\n5 7551     5.673500e+02 -7.679999e+01\n6 7551     -3.096000e+02 6.388100e+02\n8 7551     -4.248999e+01 2.598700e+02\n9 7551     -2.800300e+02 3.597500e+02\n11 7551     2.910200e+02 -2.010200e+02\n0 7552     4.466500e+02 5.663400e+02\n3 7552     -6.337000e+01 9.699707e-01\n13 7552     5.409500e+02 2.546400e+02\n0 7553     5.636500e+02 5.640600e+02\n3 7553     1.674100e+02 1.262100e+02\n6 7553     2.267800e+02 7.389400e+02\n13 7553     7.004200e+02 2.710200e+02\n0 7554     -2.665997e+01 5.635700e+02\n5 7554     3.810000e+02 -8.326001e+01\n8 7554     -1.845700e+02 2.547700e+02\n11 7554     1.211000e+02 -2.102000e+02\n12 7554     -3.440600e+02 5.806700e+02\n0 7555     -2.665997e+01 5.635700e+02\n2 7555     -3.204700e+02 3.309800e+02\n3 7555     -4.487600e+02 -1.270020e+00\n8 7555     -1.845700e+02 2.547700e+02\n12 7555     -3.440600e+02 5.806700e+02\n0 7556     -3.516998e+01 5.625200e+02\n2 7556     -3.281400e+02 3.313000e+02\n5 7556     3.728800e+02 -8.458002e+01\n6 7556     -5.300700e+02 5.968700e+02\n8 7556     -1.904600e+02 2.541000e+02\n0 7557     4.261400e+02 5.620000e+02\n2 7557     7.016998e+01 3.306000e+02\n9 7557     -9.483002e+01 3.636900e+02\n13 7557     5.245400e+02 2.492000e+02\n14 7557     7.229900e+02 -1.516200e+02\n0 7558     4.654399e+02 5.612600e+02\n14 7558     7.623900e+02 -1.488500e+02\n0 7559     -3.553100e+02 5.609200e+02\n2 7559     -6.404300e+02 3.346100e+02\n4 7559     7.208002e+01 -1.659100e+02\n5 7559     6.525000e+01 -8.725000e+01\n8 7559     -4.467900e+02 2.498100e+02\n11 7559     -1.620100e+02 -2.186300e+02\n12 7559     -7.158500e+02 5.353500e+02\n13 7559     -8.767999e+01 2.043200e+02\n0 7560     5.795100e+02 5.563700e+02\n2 7560     3.309000e+02 4.598500e+02\n13 7560     7.161700e+02 2.662400e+02\n0 7561     4.195900e+02 5.538000e+02\n9 7561     -9.790997e+01 3.561000e+02\n11 7561     5.227500e+02 -1.965400e+02\n13 7561     5.203101e+02 2.422000e+02\n14 7561     7.183000e+02 -1.597700e+02\n0 7562     2.530100e+02 5.521800e+02\n2 7562     -7.208002e+01 3.197700e+02\n4 7562     3.038000e+01 -5.264301e+02\n5 7562     6.539800e+02 -8.863000e+01\n8 7562     2.103998e+01 2.499100e+02\n9 7562     -2.149000e+02 3.490200e+02\n11 7562     3.710400e+02 -2.080500e+02\n12 7562     -4.882001e+01 6.025900e+02\n13 7562     3.877900e+02 2.293100e+02\n14 7562     5.555800e+02 -1.708300e+02\n0 7563     4.134100e+02 5.526300e+02\n9 7563     -1.019200e+02 3.550900e+02\n11 7563     5.177900e+02 -1.976700e+02\n13 7563     5.152200e+02 2.407500e+02\n14 7563     7.122700e+02 -1.611700e+02\n0 7564     5.984600e+02 5.526000e+02\n2 7564     3.505699e+02 4.643400e+02\n3 7564     2.040800e+02 1.293900e+02\n6 7564     2.708500e+02 7.371600e+02\n8 7564     3.558900e+02 3.581300e+02\n9 7564     1.507600e+02 4.884100e+02\n11 7564     6.667200e+02 -1.887300e+02\n13 7564     7.339700e+02 2.662500e+02\n0 7565     4.069301e+02 5.508800e+02\n5 7565     8.095300e+02 -8.378998e+01\n6 7565     -5.509003e+01 6.662400e+02\n8 7565     1.281000e+02 2.512800e+02\n9 7565     -1.060300e+02 3.531200e+02\n11 7565     5.116000e+02 -1.997200e+02\n12 7565     1.063200e+02 6.199900e+02\n13 7565     5.102900e+02 2.389600e+02\n14 7565     7.060800e+02 -1.633200e+02\n0 7566     -4.520600e+02 5.499900e+02\n13 7566     -1.624000e+02 1.914100e+02\n14 7566     -1.111900e+02 -1.927600e+02\n0 7567     7.322998e+01 5.498800e+02\n2 7567     -2.277600e+02 3.174800e+02\n5 7567     4.780400e+02 -9.564001e+01\n11 7567     2.103000e+02 -2.179000e+02\n0 7568     6.052300e+02 5.500000e+02\n3 7568     2.127100e+02 1.282300e+02\n6 7568     2.818000e+02 7.343400e+02\n8 7568     3.633000e+02 3.565900e+02\n9 7568     1.582800e+02 4.884100e+02\n11 7568     6.729100e+02 -1.903300e+02\n0 7569     2.234600e+02 5.491300e+02\n5 7569     6.250500e+02 -9.248999e+01\n13 7569     3.646899e+02 2.255100e+02\n14 7569     5.271400e+02 -1.750100e+02\n0 7570     5.146600e+02 5.489000e+02\n2 7570     2.624700e+02 4.318600e+02\n3 7570     1.188600e+02 9.717999e+01\n6 7570     1.669600e+02 7.102800e+02\n8 7570     2.835000e+02 3.329700e+02\n9 7570     7.478998e+01 4.578900e+02\n11 7570     5.939800e+02 -1.967100e+02\n13 7570     6.546700e+02 2.542500e+02\n0 7571     6.412500e+02 5.482000e+02\n2 7571     4.417000e+02 5.161900e+02\n3 7571     2.937100e+02 1.787200e+02\n6 7571     3.673000e+02 7.494700e+02\n8 7571     4.264800e+02 3.963200e+02\n9 7571     2.315699e+02 5.358300e+02\n11 7571     6.978400e+02 -1.908700e+02\n13 7571     7.976899e+02 2.696100e+02\n0 7572     2.549500e+02 5.435000e+02\n4 7572     2.565997e+01 -5.275000e+02\n5 7572     6.564301e+02 -9.704999e+01\n11 7572     3.737900e+02 -2.152500e+02\n0 7573     4.056100e+02 5.428200e+02\n11 7573     5.110800e+02 -2.063800e+02\n14 7573     7.052500e+02 -1.716200e+02\n0 7574     -6.458000e+02 5.401400e+02\n4 7574     7.779999e+01 -1.388000e+01\n5 7574     -2.264200e+02 -1.063200e+02\n14 7574     -3.085600e+02 -2.048900e+02\n0 7575     6.436600e+02 5.403200e+02\n2 7575     4.463400e+02 5.107000e+02\n3 7575     2.986500e+02 1.734400e+02\n6 7575     3.721200e+02 7.418600e+02\n8 7575     4.305000e+02 3.918100e+02\n9 7575     2.353700e+02 5.309400e+02\n11 7575     7.015400e+02 -1.972200e+02\n13 7575     8.014301e+02 2.639900e+02\n0 7576     5.539001e+01 5.372200e+02\n2 7576     -2.430100e+02 3.032400e+02\n6 7576     -4.238600e+02 5.820300e+02\n9 7576     -3.597800e+02 3.301300e+02\n0 7577     6.645800e+02 5.339900e+02\n6 7577     3.987300e+02 7.395000e+02\n0 7578     -3.219100e+02 5.331000e+02\n2 7578     -6.059900e+02 3.012500e+02\n5 7578     9.447998e+01 -1.155600e+02\n8 7578     -4.187000e+02 2.239400e+02\n11 7578     -1.348000e+02 -2.408800e+02\n12 7578     -6.713800e+02 5.054300e+02\n0 7579     -1.833700e+02 5.308800e+02\n13 7579     4.703003e+01 1.872800e+02\n0 7580     -1.833700e+02 5.308800e+02\n4 7580     4.501001e+01 -2.567900e+02\n5 7580     2.287700e+02 -1.176300e+02\n7 7580     -4.118800e+02 5.824700e+02\n8 7580     -3.038500e+02 2.243500e+02\n11 7580     -1.406000e+01 -2.407000e+02\n12 7580     -5.104900e+02 5.222700e+02\n13 7580     4.703003e+01 1.872800e+02\n0 7581     -1.010800e+02 5.311900e+02\n4 7581     3.935999e+01 -3.029200e+02\n0 7582     -1.100700e+02 5.291800e+02\n8 7582     -2.470900e+02 2.227000e+02\n0 7583     4.388700e+02 5.240400e+02\n2 7583     8.419000e+01 2.901100e+02\n0 7584     -4.469200e+02 5.232500e+02\n2 7584     -7.373000e+02 2.931200e+02\n4 7584     5.872998e+01 -1.146700e+02\n7 7584     -6.842700e+02 5.479900e+02\n11 7584     -2.407000e+02 -2.485700e+02\n12 7584     -8.203500e+02 4.779800e+02\n13 7584     -1.601300e+02 1.700500e+02\n0 7585     7.156300e+02 5.167400e+02\n6 7585     4.628199e+02 7.333600e+02\n8 7585     4.955601e+02 3.929000e+02\n11 7585     7.710699e+02 -2.138500e+02\n0 7586     5.634900e+02 5.163900e+02\n2 7586     3.236600e+02 4.198900e+02\n9 7586     1.282900e+02 4.490200e+02\n13 7586     7.051700e+02 2.329900e+02\n0 7587     1.662800e+02 5.156000e+02\n11 7587     2.956000e+02 -2.441200e+02\n14 7587     4.735699e+02 -2.129500e+02\n0 7588     -1.571997e+01 5.130100e+02\n5 7588     3.898199e+02 -1.354600e+02\n6 7588     -4.993100e+02 5.363400e+02\n7 7588     -2.440600e+02 5.799200e+02\n11 7588     1.319400e+02 -2.531300e+02\n12 7588     -3.236800e+02 5.224800e+02\n0 7589     -6.972400e+02 5.115600e+02\n4 7589     5.927002e+01 2.998999e+01\n5 7589     -3.454800e+02 -1.375600e+02\n11 7589     -4.374300e+02 -2.559500e+02\n13 7589     -4.185800e+02 1.391300e+02\n14 7589     -4.230300e+02 -2.388100e+02\n0 7590     -2.172998e+01 5.083900e+02\n2 7590     -3.123600e+02 2.698600e+02\n4 7590     2.132001e+01 -3.473400e+02\n6 7590     -5.052200e+02 5.278700e+02\n8 7590     -1.777800e+02 2.054000e+02\n9 7590     -4.179900e+02 2.981500e+02\n11 7590     1.273400e+02 -2.574900e+02\n0 7591     -2.172998e+01 5.083900e+02\n2 7591     -3.123600e+02 2.698600e+02\n8 7591     -1.777800e+02 2.054000e+02\n9 7591     -4.179900e+02 2.981500e+02\n0 7592     -8.727002e+01 5.054900e+02\n2 7592     -3.731300e+02 2.659000e+02\n3 7592     -5.014700e+02 -6.484003e+01\n0 7593     -1.732001e+01 5.051800e+02\n2 7593     -3.077800e+02 2.673500e+02\n4 7593     1.912000e+01 -3.499100e+02\n6 7593     -4.997600e+02 5.253400e+02\n7 7593     -2.444600e+02 5.717700e+02\n8 7593     -1.739000e+02 2.028200e+02\n9 7593     -4.139300e+02 2.953500e+02\n12 7593     -3.241100e+02 5.135100e+02\n0 7594     -3.423400e+02 5.041300e+02\n5 7594     7.187000e+01 -1.459900e+02\n8 7594     -4.348000e+02 1.961400e+02\n11 7594     -1.532200e+02 -2.653400e+02\n0 7595     5.894500e+02 5.020800e+02\n2 7595     3.550000e+02 4.159700e+02\n3 7595     2.100699e+02 8.342999e+01\n6 7595     2.750300e+02 6.765100e+02\n8 7595     3.594500e+02 3.177800e+02\n13 7595     7.316400e+02 2.241500e+02\n0 7596     4.153700e+02 4.998700e+02\n12 7596     1.199400e+02 5.573100e+02\n0 7597     4.694000e+01 4.991400e+02\n6 7597     -4.272700e+02 5.292700e+02\n8 7597     -1.250200e+02 1.980900e+02\n12 7597     -2.542900e+02 5.138100e+02\n0 7598     7.117900e+02 4.979900e+02\n2 7598     5.264500e+02 4.964600e+02\n6 7598     4.620300e+02 7.130500e+02\n9 7598     3.018000e+02 5.201400e+02\n0 7599     -6.022998e+01 4.966600e+02\n7 7599     -2.856900e+02 5.583800e+02\n11 7599     9.304999e+01 -2.685800e+02\n0 7600     6.777002e+01 4.961700e+02\n2 7600     -2.288200e+02 2.560700e+02\n3 7600     -3.623600e+02 -7.600000e+01\n4 7600     8.090027e+00 -4.010100e+02\n5 7600     4.709600e+02 -1.525100e+02\n6 7600     -4.030900e+02 5.302200e+02\n7 7600     -1.605700e+02 5.709500e+02\n8 7600     -1.085000e+02 1.958100e+02\n9 7600     -3.457200e+02 2.888100e+02\n11 7600     2.082800e+02 -2.645700e+02\n12 7600     -2.311300e+02 5.131300e+02\n13 7600     2.435100e+02 1.705200e+02\n14 7600     3.789100e+02 -2.373000e+02\n0 7601     7.663199e+02 4.931800e+02\n2 7601     5.803300e+02 5.103100e+02\n3 7601     4.240400e+02 1.751200e+02\n6 7601     5.263101e+02 7.208000e+02\n8 7601     5.411801e+02 3.899800e+02\n9 7601     3.492200e+02 5.336700e+02\n0 7602     4.917999e+01 4.920200e+02\n4 7602     6.940002e+00 -3.892300e+02\n6 7602     -4.228000e+02 5.208500e+02\n7 7602     -1.781200e+02 5.647900e+02\n9 7602     -3.596500e+02 2.838600e+02\n11 7602     1.913400e+02 -2.694900e+02\n12 7602     -2.504100e+02 5.061600e+02\n0 7603     6.000300e+02 4.921300e+02\n2 7603     3.690000e+02 4.104900e+02\n3 7603     2.228400e+02 7.845001e+01\n6 7603     2.903000e+02 6.687100e+02\n8 7603     3.704800e+02 3.136400e+02\n9 7603     1.678800e+02 4.422900e+02\n13 7603     7.433600e+02 2.170500e+02\n0 7604     -4.927002e+01 4.908900e+02\n2 7604     -3.367100e+02 2.500000e+02\n4 7604     1.217999e+01 -3.295300e+02\n5 7604     3.558700e+02 -1.595500e+02\n6 7604     -5.328400e+02 4.990800e+02\n7 7604     -2.741200e+02 5.537200e+02\n8 7604     -1.971000e+02 1.873400e+02\n12 7604     -3.556600e+02 4.890200e+02\n13 7604     1.513199e+02 1.598300e+02\n14 7604     2.659500e+02 -2.465100e+02\n0 7605     -4.927002e+01 4.908900e+02\n2 7605     -3.367100e+02 2.500000e+02\n4 7605     1.217999e+01 -3.295300e+02\n5 7605     3.558700e+02 -1.595500e+02\n6 7605     -5.328400e+02 4.990800e+02\n7 7605     -2.741200e+02 5.537200e+02\n11 7605     1.034700e+02 -2.732600e+02\n12 7605     -3.556600e+02 4.890200e+02\n13 7605     1.513199e+02 1.598300e+02\n14 7605     2.659500e+02 -2.465100e+02\n0 7606     6.611899e+02 4.883900e+02\n3 7606     3.292500e+02 1.377800e+02\n6 7606     4.058300e+02 6.902800e+02\n9 7606     2.625500e+02 4.977200e+02\n0 7607     7.696700e+02 4.879200e+02\n2 7607     5.839500e+02 5.068500e+02\n3 7607     4.277800e+02 1.716800e+02\n6 7607     5.306300e+02 7.161900e+02\n8 7607     5.449500e+02 3.866800e+02\n9 7607     3.523101e+02 5.303600e+02\n0 7608     7.108700e+02 4.876600e+02\n2 7608     5.268199e+02 4.871300e+02\n3 7608     3.752700e+02 1.534700e+02\n6 7608     4.637800e+02 7.013900e+02\n8 7608     4.976801e+02 3.711200e+02\n9 7608     3.039800e+02 5.122300e+02\n13 7608     8.714700e+02 2.289300e+02\n0 7609     2.085400e+02 4.865000e+02\n7 7609     -2.427002e+01 5.763100e+02\n8 7609     -3.789978e+00 1.917500e+02\n11 7609     3.370699e+02 -2.671600e+02\n14 7609     5.166300e+02 -2.405200e+02\n0 7610     2.796700e+02 4.858900e+02\n14 7610     5.869100e+02 -2.382600e+02\n0 7611     7.839500e+02 4.843700e+02\n6 7611     5.471000e+02 7.151600e+02\n8 7611     5.569100e+02 3.873000e+02\n9 7611     3.645400e+02 5.319900e+02\n0 7612     1.183002e+01 4.838900e+02\n4 7612     4.330017e+00 -3.653800e+02\n5 7612     4.153900e+02 -1.667900e+02\n6 7612     -4.632700e+02 5.019000e+02\n7 7612     -2.135700e+02 5.522600e+02\n8 7612     -1.500200e+02 1.832800e+02\n9 7612     -3.882900e+02 2.740400e+02\n11 7612     1.578100e+02 -2.775300e+02\n12 7612     -2.890600e+02 4.897600e+02\n13 7612     1.995900e+02 1.570300e+02\n0 7613     -3.790997e+01 4.827600e+02\n4 7613     7.239990e+00 -3.357800e+02\n6 7613     -5.185400e+02 4.906500e+02\n7 7613     -2.616700e+02 5.458600e+02\n11 7613     1.139400e+02 -2.797100e+02\n12 7613     -3.423700e+02 4.810900e+02\n0 7614     3.669000e+02 4.830000e+02\n2 7614     3.385999e+01 2.467500e+02\n9 7614     -1.227700e+02 2.892600e+02\n11 7614     4.836700e+02 -2.611600e+02\n14 7614     6.741500e+02 -2.360700e+02\n0 7615     7.738101e+02 4.830400e+02\n2 7615     5.887700e+02 5.032300e+02\n3 7615     4.321700e+02 1.688300e+02\n6 7615     5.360100e+02 7.118500e+02\n8 7615     5.492600e+02 3.838700e+02\n9 7615     3.563900e+02 5.275700e+02\n0 7616     8.051300e+02 4.825900e+02\n3 7616     4.622600e+02 1.810000e+02\n6 7616     5.734900e+02 7.196500e+02\n8 7616     5.768000e+02 3.940900e+02\n9 7616     3.858500e+02 5.390100e+02\n0 7617     7.922200e+02 4.801700e+02\n2 7617     6.087400e+02 5.071900e+02\n3 7617     4.505699e+02 1.726800e+02\n6 7617     5.591200e+02 7.122800e+02\n8 7617     5.660500e+02 3.863600e+02\n9 7617     3.733600e+02 5.310800e+02\n0 7618     8.096100e+02 4.793000e+02\n2 7618     6.266600e+02 5.149800e+02\n3 7618     4.669000e+02 1.797200e+02\n0 7619     8.096100e+02 4.793000e+02\n2 7619     6.266600e+02 5.149800e+02\n3 7619     4.669000e+02 1.797200e+02\n0 7620     7.497500e+02 4.778700e+02\n3 7620     4.125900e+02 1.574900e+02\n0 7621     8.026801e+02 4.728100e+02\n2 7621     6.193000e+02 5.048300e+02\n3 7621     4.606100e+02 1.705300e+02\n6 7621     5.713500e+02 7.090400e+02\n8 7621     5.747800e+02 3.851300e+02\n9 7621     3.820699e+02 5.296400e+02\n0 7622     5.621600e+02 4.719000e+02\n2 7622     3.320100e+02 3.775600e+02\n6 7622     2.478600e+02 6.364200e+02\n13 7622     7.077200e+02 1.960800e+02\n0 7623     8.077600e+02 4.721100e+02\n2 7623     6.244200e+02 5.058600e+02\n3 7623     4.656100e+02 1.715300e+02\n6 7623     5.772000e+02 7.086100e+02\n8 7623     5.794600e+02 3.854200e+02\n9 7623     3.868000e+02 5.303900e+02\n0 7624     -4.282500e+02 4.692300e+02\n2 7624     -7.185300e+02 2.245500e+02\n4 7624     2.812000e+01 -1.177900e+02\n5 7624     -1.590997e+01 -1.805600e+02\n7 7624     -6.566600e+02 4.904800e+02\n8 7624     -5.090700e+02 1.616600e+02\n12 7624     -7.882100e+02 4.110400e+02\n0 7625     8.322100e+02 4.688500e+02\n3 7625     4.887100e+02 1.785300e+02\n0 7626     3.283900e+02 4.677800e+02\n3 7626     -1.417200e+02 -1.035700e+02\n5 7626     7.332900e+02 -1.754500e+02\n6 7626     -1.192600e+02 5.482100e+02\n7 7626     8.988000e+01 5.683900e+02\n8 7626     8.339001e+01 1.783800e+02\n9 7626     -1.482700e+02 2.728000e+02\n11 7626     4.490900e+02 -2.773700e+02\n12 7626     4.423999e+01 5.172000e+02\n13 7626     4.513700e+02 1.627300e+02\n14 7626     6.362700e+02 -2.545700e+02\n0 7627     7.575200e+02 4.665200e+02\n3 7627     4.229600e+02 1.511300e+02\n6 7627     5.223000e+02 6.906500e+02\n0 7628     8.393900e+02 4.653700e+02\n2 7628     6.578900e+02 5.126000e+02\n3 7628     4.958199e+02 1.779400e+02\n0 7629     7.674100e+02 4.650700e+02\n9 7629     3.550601e+02 5.128900e+02\n0 7630     8.251200e+02 4.646500e+02\n2 7630     6.427800e+02 5.048900e+02\n3 7630     4.818300e+02 1.711000e+02\n8 7630     5.949301e+02 3.840700e+02\n9 7630     4.021700e+02 5.293700e+02\n0 7631     6.357600e+02 4.641200e+02\n3 7631     3.110300e+02 1.094600e+02\n6 7631     3.805600e+02 6.580600e+02\n11 7631     7.097200e+02 -2.637500e+02\n0 7632     8.359500e+02 4.621700e+02\n2 7632     6.540000e+02 5.076000e+02\n3 7632     4.920900e+02 1.736000e+02\n9 7632     4.104900e+02 5.320600e+02\n0 7633     -5.563800e+02 4.613300e+02\n5 7633     -1.407900e+02 -1.863600e+02\n7 7633     -7.926700e+02 4.680900e+02\n11 7633     -3.365400e+02 -2.998200e+02\n13 7633     -2.501800e+02 1.131100e+02\n14 7633     -2.232700e+02 -2.827600e+02\n0 7634     7.760000e+02 4.561600e+02\n3 7634     4.413101e+02 1.493900e+02\n6 7634     5.438800e+02 6.846900e+02\n0 7635     5.146200e+02 4.552600e+02\n12 7635     3.003900e+02 5.917300e+02\n0 7636     8.235500e+02 4.549900e+02\n2 7636     6.423500e+02 4.960400e+02\n8 7636     5.941600e+02 3.772400e+02\n9 7636     4.016801e+02 5.220100e+02\n0 7637     5.067000e+02 4.550300e+02\n2 7637     2.755900e+02 3.422800e+02\n3 7637     1.337800e+02 1.204999e+01\n6 7637     1.814600e+02 6.019300e+02\n8 7637     2.943800e+02 2.596500e+02\n9 7637     8.882001e+01 3.805400e+02\n12 7637     2.913300e+02 5.884000e+02\n13 7637     6.566400e+02 1.765600e+02\n0 7638     5.067000e+02 4.550300e+02\n6 7638     1.814600e+02 6.019300e+02\n13 7638     6.566400e+02 1.765600e+02\n0 7639     5.067000e+02 4.550300e+02\n2 7639     2.755900e+02 3.422800e+02\n3 7639     1.337800e+02 1.204999e+01\n8 7639     2.943800e+02 2.596500e+02\n9 7639     8.882001e+01 3.805400e+02\n12 7639     2.913300e+02 5.884000e+02\n13 7639     6.566400e+02 1.765600e+02\n0 7640     -6.754300e+02 4.519100e+02\n5 7640     -3.334300e+02 -1.995700e+02\n0 7641     8.625400e+02 4.509000e+02\n3 7641     5.171899e+02 1.728000e+02\n0 7642     9.400024e+00 4.490800e+02\n2 7642     -2.785300e+02 1.987700e+02\n3 7642     -4.113700e+02 -1.327300e+02\n4 7642     -1.596002e+01 -3.611600e+02\n5 7642     4.119500e+02 -2.042900e+02\n9 7642     -3.854900e+02 2.367800e+02\n12 7642     -2.853000e+02 4.472700e+02\n13 7642     1.980100e+02 1.268800e+02\n0 7643     -3.024600e+02 4.478400e+02\n2 7643     -5.848600e+02 1.986200e+02\n7 7643     -5.227100e+02 4.818200e+02\n11 7643     -1.202400e+02 -3.125800e+02\n12 7643     -6.343200e+02 4.028900e+02\n0 7644     8.592500e+02 4.477400e+02\n2 7644     6.786899e+02 5.017900e+02\n3 7644     5.151400e+02 1.684300e+02\n9 7644     4.309700e+02 5.280300e+02\n0 7645     8.679200e+02 4.482100e+02\n2 7645     6.866200e+02 5.053900e+02\n3 7645     5.213300e+02 1.718300e+02\n0 7646     -3.152300e+02 4.447300e+02\n5 7646     9.334998e+01 -2.083000e+02\n12 7646     -6.468500e+02 3.971000e+02\n0 7647     5.311600e+02 4.444500e+02\n6 7647     2.149100e+02 5.950400e+02\n11 7647     6.265300e+02 -2.886900e+02\n12 7647     3.220699e+02 5.835200e+02\n0 7648     8.491500e+02 4.424900e+02\n2 7648     6.693300e+02 4.935700e+02\n0 7649     8.789301e+02 4.393000e+02\n2 7649     6.982400e+02 5.012000e+02\n3 7649     5.323700e+02 1.681200e+02\n9 7649     4.479500e+02 5.274200e+02\n0 7650     4.848000e+02 4.383100e+02\n2 7650     2.536300e+02 3.174600e+02\n3 7650     1.132200e+02 -1.228003e+01\n0 7651     6.210022e+00 4.377900e+02\n2 7651     -2.792300e+02 1.893500e+02\n4 7651     -2.157001e+01 -3.590300e+02\n6 7651     -4.596400e+02 4.421400e+02\n0 7652     6.901899e+02 4.369100e+02\n3 7652     3.701200e+02 1.065400e+02\n6 7652     4.519301e+02 6.431500e+02\n8 7652     4.895601e+02 3.296400e+02\n9 7652     2.986500e+02 4.688200e+02\n11 7652     7.670900e+02 -2.862100e+02\n0 7653     -3.972000e+02 4.340500e+02\n4 7653     7.320007e+00 -1.306200e+02\n7 7653     -6.185900e+02 4.571900e+02\n8 7653     -4.803400e+02 1.291000e+02\n11 7653     -2.031500e+02 -3.237600e+02\n0 7654     5.063700e+02 4.338400e+02\n6 7654     1.866500e+02 5.773000e+02\n7 7654     2.887800e+02 5.753100e+02\n8 7654     2.966100e+02 2.434200e+02\n9 7654     9.345001e+01 3.634400e+02\n11 7654     6.074399e+02 -2.996500e+02\n12 7654     2.961100e+02 5.657200e+02\n13 7654     6.587100e+02 1.591500e+02\n0 7655     5.063700e+02 4.338400e+02\n2 7655     2.800699e+02 3.219100e+02\n3 7655     1.386600e+02 -7.169983e+00\n6 7655     1.866500e+02 5.773000e+02\n7 7655     2.887800e+02 5.753100e+02\n8 7655     2.966100e+02 2.434200e+02\n9 7655     9.345001e+01 3.634400e+02\n11 7655     6.074399e+02 -2.996500e+02\n12 7655     2.961100e+02 5.657200e+02\n13 7655     6.587100e+02 1.591500e+02\n0 7656     -1.053900e+02 4.330800e+02\n2 7656     -3.854500e+02 1.807000e+02\n3 7656     -5.158700e+02 -1.499700e+02\n4 7656     -1.613000e+01 -2.921300e+02\n8 7656     -2.368700e+02 1.344300e+02\n11 7656     5.363000e+01 -3.252900e+02\n12 7656     -4.067400e+02 4.145400e+02\n13 7656     1.076000e+02 1.075000e+02\n14 7656     2.113500e+02 -3.082100e+02\n0 7657     -1.407800e+02 4.326900e+02\n5 7657     2.622600e+02 -2.226500e+02\n7 7657     -3.569400e+02 4.827900e+02\n0 7658     5.117100e+02 4.305900e+02\n6 7658     1.935100e+02 5.748700e+02\n7 7658     2.940100e+02 5.728900e+02\n12 7658     3.025100e+02 5.634100e+02\n13 7658     6.637300e+02 1.569300e+02\n0 7659     6.260200e+02 4.304500e+02\n6 7659     3.777800e+02 6.191400e+02\n0 7660     6.260200e+02 4.304500e+02\n6 7660     3.777800e+02 6.191400e+02\n8 7660     4.369500e+02 3.070400e+02\n9 7660     2.446700e+02 4.427200e+02\n11 7660     7.092100e+02 -2.958000e+02\n0 7661     -2.103300e+02 4.291300e+02\n2 7661     -4.893500e+02 1.744100e+02\n7 7661     -4.260700e+02 4.716300e+02\n11 7661     -3.926001e+01 -3.295000e+02\n0 7662     4.749600e+02 4.284900e+02\n2 7662     2.453700e+02 3.040700e+02\n3 7662     1.049600e+02 -2.507001e+01\n6 7662     1.458800e+02 5.627400e+02\n7 7662     2.577800e+02 5.646900e+02\n8 7662     2.702700e+02 2.290900e+02\n9 7662     6.371997e+01 3.474200e+02\n13 7662     6.276200e+02 1.509000e+02\n14 7662     8.586300e+02 -2.754800e+02\n0 7663     5.365300e+02 4.279900e+02\n7 7663     3.193700e+02 5.747400e+02\n9 7663     1.235800e+02 3.692500e+02\n11 7663     6.347600e+02 -3.022600e+02\n0 7664     6.286200e+02 4.268400e+02\n2 7664     4.593800e+02 4.056000e+02\n3 7664     3.139900e+02 7.642999e+01\n8 7664     4.403000e+02 3.045900e+02\n9 7664     2.481100e+02 4.408000e+02\n11 7664     7.121899e+02 -2.990400e+02\n12 7664     4.663300e+02 6.207400e+02\n13 7664     8.003800e+02 1.712600e+02\n0 7665     -2.249000e+02 4.260200e+02\n2 7665     -5.042000e+02 1.702600e+02\n5 7665     1.790200e+02 -2.284700e+02\n7 7665     -4.403800e+02 4.673200e+02\n8 7665     -3.339300e+02 1.239300e+02\n11 7665     -5.213000e+01 -3.314800e+02\n12 7665     -5.411200e+02 3.880400e+02\n13 7665     1.248999e+01 9.545999e+01\n0 7666     6.238800e+02 4.233600e+02\n6 7666     3.757700e+02 6.113300e+02\n0 7667     1.966100e+02 4.227700e+02\n2 7667     -1.048300e+02 1.737700e+02\n3 7667     -2.446700e+02 -1.579500e+02\n7 7667     -2.778998e+01 5.091900e+02\n11 7667     3.315000e+02 -3.248800e+02\n0 7668     6.357300e+02 4.208800e+02\n2 7668     4.679800e+02 4.032900e+02\n3 7668     3.223900e+02 7.427002e+01\n6 7668     3.913400e+02 6.115100e+02\n8 7668     4.471899e+02 3.024900e+02\n9 7668     2.555100e+02 4.388200e+02\n11 7668     7.202200e+02 -3.039100e+02\n12 7668     4.754800e+02 6.180400e+02\n13 7668     8.079500e+02 1.674600e+02\n0 7669     7.035601e+02 4.200800e+02\n6 7669     4.718700e+02 6.298700e+02\n9 7669     3.143600e+02 4.610600e+02\n0 7670     6.692700e+02 4.178500e+02\n2 7670     5.042000e+02 4.126700e+02\n3 7670     3.562800e+02 8.441998e+01\n6 7670     4.326200e+02 6.181000e+02\n8 7670     4.765900e+02 3.100400e+02\n9 7670     2.858700e+02 4.481700e+02\n0 7671     1.030500e+02 4.150000e+02\n2 7671     -1.890100e+02 1.628700e+02\n7 7671     -1.164800e+02 4.915500e+02\n0 7672     -4.865700e+02 4.095600e+02\n5 7672     -8.095001e+01 -2.421200e+02\n8 7672     -5.611500e+02 1.017100e+02\n10 7672     -7.286000e+02 5.868800e+02\n0 7673     -4.948800e+02 4.077200e+02\n5 7673     -8.909998e+01 -2.436100e+02\n8 7673     -5.677200e+02 9.976001e+01\n13 7673     -2.036700e+02 6.942999e+01\n14 7673     -1.713300e+02 -3.382700e+02\n0 7674     6.809600e+02 4.072700e+02\n3 7674     3.696801e+02 7.934998e+01\n6 7674     4.488600e+02 6.095900e+02\n7 7674     4.764700e+02 5.872600e+02\n8 7674     4.881400e+02 3.053700e+02\n0 7675     -3.266300e+02 4.056200e+02\n5 7675     7.625000e+01 -2.496600e+02\n10 7675     -5.265800e+02 5.957800e+02\n0 7676     8.710601e+02 4.042900e+02\n3 7676     5.362700e+02 1.399900e+02\n0 7677     -5.387800e+02 3.989800e+02\n4 7677     -6.300049e-01 -5.346997e+01\n0 7678     5.238600e+02 3.963900e+02\n2 7678     3.092500e+02 2.929100e+02\n3 7678     1.674800e+02 -3.440002e+01\n7 7678     3.110300e+02 5.417500e+02\n8 7678     3.209200e+02 2.192200e+02\n9 7678     1.192500e+02 3.392400e+02\n11 7678     6.291500e+02 -3.324200e+02\n12 7678     3.253400e+02 5.306700e+02\n13 7678     6.794301e+02 1.297400e+02\n0 7679     1.941998e+01 3.940300e+02\n2 7679     -2.641800e+02 1.365500e+02\n4 7679     -4.978003e+01 -3.629900e+02\n6 7679     -4.372600e+02 3.867200e+02\n7 7679     -1.944000e+02 4.609000e+02\n9 7679     -3.704300e+02 1.828800e+02\n10 7679     -1.120300e+02 6.104900e+02\n11 7679     1.696400e+02 -3.569400e+02\n13 7679     2.064000e+02 7.978000e+01\n0 7680     -2.596000e+02 3.922800e+02\n2 7680     -5.378300e+02 1.290500e+02\n4 7680     -2.745001e+01 -2.005200e+02\n5 7680     1.420400e+02 -2.652600e+02\n11 7680     -8.353003e+01 -3.619000e+02\n12 7680     -5.747200e+02 3.405300e+02\n13 7680     -1.559998e+01 6.490002e+01\n14 7680     5.808002e+01 -3.551100e+02\n0 7681     5.290400e+02 3.925200e+02\n3 7681     1.737200e+02 -3.576001e+01\n7 7681     3.167300e+02 5.389100e+02\n8 7681     3.260800e+02 2.175100e+02\n11 7681     6.341600e+02 -3.356400e+02\n0 7682     7.749399e+02 3.926100e+02\n2 7682     6.140800e+02 4.278800e+02\n7 7682     5.688000e+02 5.881100e+02\n9 7682     3.784301e+02 4.633200e+02\n0 7683     7.947900e+02 3.917100e+02\n2 7683     6.332200e+02 4.337100e+02\n6 7683     5.815900e+02 6.239400e+02\n9 7683     3.949399e+02 4.690900e+02\n0 7684     -5.629800e+02 3.885400e+02\n4 7684     -4.869995e+00 -3.937000e+01\n5 7684     -1.588400e+02 -2.633300e+02\n10 7684     -8.217700e+02 5.544200e+02\n11 7684     -3.487800e+02 -3.616500e+02\n0 7685     -5.629800e+02 3.885400e+02\n4 7685     -4.869995e+00 -3.937000e+01\n5 7685     -1.588400e+02 -2.633300e+02\n10 7685     -8.217700e+02 5.544200e+02\n0 7686     6.728300e+02 3.877800e+02\n6 7686     4.439301e+02 5.864300e+02\n7 7686     4.712400e+02 5.672700e+02\n8 7686     4.850900e+02 2.885000e+02\n11 7686     7.629800e+02 -3.329200e+02\n0 7687     3.317999e+01 3.868000e+02\n2 7687     -2.501300e+02 1.272200e+02\n5 7687     4.336899e+02 -2.715500e+02\n6 7687     -4.202700e+02 3.808700e+02\n7 7687     -1.802200e+02 4.551700e+02\n10 7687     -9.527002e+01 6.040700e+02\n11 7687     1.825000e+02 -3.625000e+02\n12 7687     -2.482500e+02 3.788000e+02\n13 7687     2.174800e+02 7.407001e+01\n14 7687     3.462900e+02 -3.556600e+02\n0 7688     4.308199e+02 3.867300e+02\n12 7688     1.792500e+02 4.553900e+02\n13 7688     5.542500e+02 1.038600e+02\n14 7688     7.684600e+02 -3.319200e+02\n0 7689     -6.978998e+01 3.836600e+02\n11 7689     8.773999e+01 -3.688600e+02\n12 7689     -3.557300e+02 3.705200e+02\n0 7690     1.003998e+01 3.830600e+02\n2 7690     -2.715300e+02 1.229300e+02\n6 7690     -4.455700e+02 3.704800e+02\n7 7690     -2.019700e+02 4.486000e+02\n11 7690     1.616100e+02 -3.672100e+02\n13 7690     1.993800e+02 7.026001e+01\n0 7691     5.421200e+02 3.833000e+02\n2 7691     3.336200e+02 2.877100e+02\n3 7691     1.912500e+02 -3.866998e+01\n6 7691     2.461400e+02 5.306300e+02\n7 7691     3.311300e+02 5.322000e+02\n8 7691     3.403400e+02 2.143400e+02\n9 7691     1.394600e+02 3.359700e+02\n11 7691     6.488000e+02 -3.436000e+02\n13 7691     6.993000e+02 1.208100e+02\n0 7692     -5.346100e+02 3.821800e+02\n5 7692     -1.321400e+02 -2.699100e+02\n13 7692     -2.370000e+02 4.542999e+01\n0 7693     -5.346100e+02 3.821800e+02\n5 7693     -1.321400e+02 -2.699100e+02\n11 7693     -3.260900e+02 -3.671000e+02\n13 7693     -2.370000e+02 4.542999e+01\n14 7693     -2.143600e+02 -3.657200e+02\n0 7694     -7.136500e+02 3.815100e+02\n13 7694     -4.489000e+02 2.598999e+01\n0 7695     3.038000e+01 3.812700e+02\n5 7695     4.307700e+02 -2.773500e+02\n7 7695     -1.823300e+02 4.489200e+02\n11 7695     1.802900e+02 -3.683300e+02\n13 7695     2.153199e+02 6.945001e+01\n14 7695     3.435000e+02 -3.612200e+02\n0 7696     -2.047600e+02 3.808100e+02\n2 7696     -4.815600e+02 1.150400e+02\n4 7696     -3.833002e+01 -2.299300e+02\n7 7696     -4.140900e+02 4.218000e+02\n10 7696     -3.782100e+02 5.746600e+02\n13 7696     2.823999e+01 5.751001e+01\n14 7696     1.114600e+02 -3.667200e+02\n0 7697     5.490601e+02 3.795600e+02\n2 7697     3.416100e+02 2.870200e+02\n3 7697     1.988600e+02 -3.917999e+01\n7 7697     3.385000e+02 5.295600e+02\n8 7697     3.468100e+02 2.134300e+02\n9 7697     1.473000e+02 3.354300e+02\n11 7697     6.555800e+02 -3.465900e+02\n12 7697     3.589800e+02 5.212000e+02\n13 7697     7.060699e+02 1.185700e+02\n0 7698     6.627400e+02 3.796600e+02\n6 7698     4.337200e+02 5.748400e+02\n8 7698     4.785100e+02 2.792000e+02\n9 7698     2.892200e+02 4.167000e+02\n0 7699     4.744900e+02 3.788100e+02\n7 7699     2.637000e+02 5.161400e+02\n11 7699     5.863800e+02 -3.506600e+02\n0 7700     6.110400e+02 3.783200e+02\n2 7700     4.539399e+02 3.550600e+02\n3 7700     3.091500e+02 2.872998e+01\n6 7700     3.718200e+02 5.583400e+02\n7 7700     4.115300e+02 5.475700e+02\n8 7700     4.341300e+02 2.633300e+02\n9 7700     2.433800e+02 3.973400e+02\n12 7700     4.572100e+02 5.643200e+02\n13 7700     7.894600e+02 1.296100e+02\n0 7701     6.110400e+02 3.783200e+02\n2 7701     4.539399e+02 3.550600e+02\n3 7701     3.091500e+02 2.872998e+01\n6 7701     3.718200e+02 5.583400e+02\n7 7701     4.115300e+02 5.475700e+02\n8 7701     4.341300e+02 2.633300e+02\n9 7701     2.433800e+02 3.973400e+02\n11 7701     7.062600e+02 -3.451100e+02\n12 7701     4.572100e+02 5.643200e+02\n13 7701     7.894600e+02 1.296100e+02\n0 7702     5.259100e+02 3.768000e+02\n2 7702     3.160000e+02 2.711500e+02\n6 7702     2.256900e+02 5.151300e+02\n8 7702     3.262200e+02 2.013900e+02\n12 7702     3.322900e+02 5.065500e+02\n0 7703     1.787000e+01 3.753900e+02\n7 7703     -1.934200e+02 4.419200e+02\n9 7703     -3.690000e+02 1.633900e+02\n10 7703     -1.121100e+02 5.891400e+02\n11 7703     1.695100e+02 -3.734500e+02\n13 7703     2.055400e+02 6.360999e+01\n14 7703     3.312500e+02 -3.684800e+02\n0 7704     5.557400e+02 3.745500e+02\n2 7704     3.501801e+02 2.849500e+02\n7 7704     3.457800e+02 5.258600e+02\n8 7704     3.532600e+02 2.118900e+02\n9 7704     1.548101e+02 3.338000e+02\n11 7704     6.626300e+02 -3.508800e+02\n12 7704     3.671600e+02 5.187100e+02\n13 7704     7.128600e+02 1.154000e+02\n0 7705     3.117999e+01 3.723800e+02\n2 7705     -2.513800e+02 1.109300e+02\n7 7705     -1.804700e+02 4.399800e+02\n8 7705     -1.271000e+02 8.075000e+01\n10 7705     -9.619000e+01 5.862700e+02\n11 7705     1.814500e+02 -3.762600e+02\n12 7705     -2.479000e+02 3.613600e+02\n13 7705     2.157500e+02 6.189001e+01\n14 7705     3.440699e+02 -3.707800e+02\n0 7706     1.000000e+00 3.715200e+02\n2 7706     -2.795800e+02 1.081300e+02\n7 7706     -2.096600e+02 4.356500e+02\n9 7706     -3.824600e+02 1.580100e+02\n10 7706     -1.320200e+02 5.820600e+02\n11 7706     1.539500e+02 -3.777400e+02\n13 7706     1.919000e+02 5.938000e+01\n14 7706     3.139800e+02 -3.727600e+02\n0 7707     6.825300e+02 3.711000e+02\n2 7707     5.297800e+02 3.761600e+02\n9 7707     3.082300e+02 4.177400e+02\n13 7707     8.598400e+02 1.323000e+02\n0 7708     7.213600e+02 3.694800e+02\n3 7708     4.190200e+02 6.177002e+01\n7 7708     5.204900e+02 5.590100e+02\n9 7708     3.411100e+02 4.301800e+02\n12 7708     5.910400e+02 5.858900e+02\n0 7709     7.848199e+02 3.671900e+02\n2 7709     6.304800e+02 4.092700e+02\n9 7709     3.930800e+02 4.486000e+02\n12 7709     6.562000e+02 6.101700e+02\n0 7710     7.848199e+02 3.671900e+02\n2 7710     6.304800e+02 4.092700e+02\n9 7710     3.930800e+02 4.486000e+02\n0 7711     4.010010e+00 3.661200e+02\n2 7711     -2.759500e+02 1.024000e+02\n4 7711     -6.485999e+01 -3.508400e+02\n6 7711     -4.491800e+02 3.468400e+02\n7 7711     -2.059100e+02 4.307200e+02\n9 7711     -3.791400e+02 1.529600e+02\n10 7711     -1.272100e+02 5.763300e+02\n11 7711     1.565800e+02 -3.829100e+02\n12 7711     -2.759700e+02 3.495500e+02\n13 7711     1.947900e+02 5.501001e+01\n14 7711     3.175699e+02 -3.783700e+02\n0 7712     -2.122900e+02 3.634200e+02\n4 7712     -4.785999e+01 -2.236300e+02\n7 7712     -4.191700e+02 4.027500e+02\n11 7712     -4.184998e+01 -3.875800e+02\n0 7713     -2.015200e+02 3.631100e+02\n2 7713     -4.770300e+02 9.310999e+01\n7 7713     -4.082500e+02 4.038000e+02\n8 7713     -3.117900e+02 6.406000e+01\n10 7713     -3.714500e+02 5.525300e+02\n13 7713     3.041998e+01 4.213000e+01\n0 7714     -2.015200e+02 3.631100e+02\n7 7714     -4.082500e+02 4.038000e+02\n8 7714     -3.117900e+02 6.406000e+01\n10 7714     -3.714500e+02 5.525300e+02\n0 7715     -7.061300e+02 3.586600e+02\n5 7715     -3.842100e+02 -2.971500e+02\n13 7715     -4.374400e+02 7.390015e+00\n14 7715     -4.631300e+02 -3.987200e+02\n0 7716     -3.971400e+02 3.590800e+02\n2 7716     -6.835600e+02 8.428998e+01\n7 7716     -6.078700e+02 3.763000e+02\n10 7716     -6.091700e+02 5.311200e+02\n13 7716     -1.269600e+02 3.054999e+01\n14 7716     -8.064001e+01 -3.913300e+02\n15 7716     -6.175700e+02 5.771300e+02\n0 7717     -1.626900e+02 3.575600e+02\n2 7717     -4.389700e+02 8.664001e+01\n7 7717     -3.687100e+02 4.026300e+02\n11 7717     3.530029e+00 -3.927700e+02\n14 7717     1.513400e+02 -3.917100e+02\n0 7718     -1.626900e+02 3.575600e+02\n2 7718     -4.389700e+02 8.664001e+01\n5 7718     2.349900e+02 -3.040600e+02\n14 7718     1.513400e+02 -3.917100e+02\n0 7719     -3.451400e+02 3.563700e+02\n2 7719     -6.262200e+02 8.208002e+01\n5 7719     5.278998e+01 -3.025900e+02\n7 7719     -5.534500e+02 3.797000e+02\n8 7719     -4.338300e+02 5.195999e+01\n10 7719     -5.455000e+02 5.320200e+02\n11 7719     -1.612800e+02 -3.931900e+02\n12 7719     -6.683800e+02 2.819700e+02\n15 7719     -5.437700e+02 5.800600e+02\n0 7720     -2.104900e+02 3.535100e+02\n5 7720     1.871900e+02 -3.079000e+02\n7 7720     -4.156900e+02 3.924300e+02\n8 7720     -3.185200e+02 5.392999e+01\n10 7720     -3.809000e+02 5.409400e+02\n0 7721     -4.392300e+02 3.478500e+02\n4 7721     -3.698999e+01 -9.794000e+01\n10 7721     -6.624600e+02 5.123500e+02\n15 7721     -6.771400e+02 5.536500e+02\n0 7722     5.860601e+02 3.481500e+02\n2 7722     4.329000e+02 3.165000e+02\n3 7722     2.913000e+02 -7.719971e+00\n6 7722     3.482800e+02 5.177100e+02\n7 7722     3.910200e+02 5.138900e+02\n8 7722     4.179800e+02 2.320900e+02\n9 7722     2.277900e+02 3.639200e+02\n12 7722     4.349200e+02 5.232000e+02\n13 7722     7.668400e+02 1.016900e+02\n0 7723     -4.014300e+02 3.474300e+02\n5 7723     -5.010010e+00 -3.112500e+02\n7 7723     -6.103300e+02 3.635100e+02\n11 7723     -2.117100e+02 -4.000200e+02\n14 7723     -8.634003e+01 -4.038800e+02\n0 7724     -1.202800e+02 3.416400e+02\n2 7724     -3.948700e+02 6.725000e+01\n7 7724     -3.247700e+02 3.905100e+02\n8 7724     -2.441100e+02 4.531000e+01\n9 7724     -4.789400e+02 1.187700e+02\n11 7724     4.264001e+01 -4.071100e+02\n13 7724     9.485999e+01 2.670001e+01\n0 7725     -2.999600e+02 3.409600e+02\n2 7725     -5.784200e+02 6.215002e+01\n4 7725     -5.306000e+01 -1.728800e+02\n15 7725     -4.777700e+02 5.644500e+02\n0 7726     8.128101e+02 3.398900e+02\n3 7726     5.084800e+02 7.107001e+01\n7 7726     6.117500e+02 5.441400e+02\n9 7726     4.218300e+02 4.379300e+02\n0 7727     -5.561600e+02 3.396700e+02\n5 7727     -1.602200e+02 -3.156900e+02\n7 7727     -7.738400e+02 3.359300e+02\n11 7727     -3.481400e+02 -4.040000e+02\n15 7727     -8.379600e+02 5.293800e+02\n0 7728     -5.627800e+02 3.374100e+02\n4 7728     -3.177002e+01 -3.290997e+01\n5 7728     -1.675600e+02 -3.173700e+02\n7 7728     -7.805900e+02 3.330000e+02\n10 7728     -8.130800e+02 4.915400e+02\n13 7728     -2.621700e+02 5.500000e+00\n14 7728     -2.489600e+02 -4.141100e+02\n15 7728     -8.468900e+02 5.253200e+02\n0 7729     6.169000e+02 3.376200e+02\n2 7729     4.692900e+02 3.195900e+02\n3 7729     3.263101e+02 -4.599976e+00\n6 7729     3.886500e+02 5.159600e+02\n7 7729     4.228700e+02 5.093500e+02\n9 7729     2.584500e+02 3.675700e+02\n10 7729     5.986500e+02 6.056000e+02\n11 7729     7.213500e+02 -3.835400e+02\n12 7729     4.730400e+02 5.230100e+02\n13 7729     7.992000e+02 9.645999e+01\n0 7730     6.169000e+02 3.376200e+02\n3 7730     3.263101e+02 -4.599976e+00\n6 7730     3.886500e+02 5.159600e+02\n7 7730     4.228700e+02 5.093500e+02\n8 7730     4.470000e+02 2.340800e+02\n9 7730     2.584500e+02 3.675700e+02\n10 7730     5.986500e+02 6.056000e+02\n11 7730     7.213500e+02 -3.835400e+02\n12 7730     4.730400e+02 5.230100e+02\n13 7730     7.992000e+02 9.645999e+01\n0 7731     6.117200e+02 3.372100e+02\n2 7731     4.641300e+02 3.174800e+02\n3 7731     3.211200e+02 -6.520020e+00\n7 7731     4.179399e+02 5.081700e+02\n8 7731     4.430000e+02 2.322400e+02\n9 7731     2.542800e+02 3.653300e+02\n10 7731     5.921899e+02 6.056300e+02\n11 7731     7.162300e+02 -3.837200e+02\n12 7731     4.678199e+02 5.210600e+02\n13 7731     7.940000e+02 9.592999e+01\n0 7732     8.262100e+02 3.349000e+02\n2 7732     6.782000e+02 3.962300e+02\n3 7732     5.203800e+02 7.253003e+01\n7 7732     6.249200e+02 5.414700e+02\n9 7732     4.340200e+02 4.382300e+02\n0 7733     -4.340500e+02 3.349500e+02\n10 7733     -6.505200e+02 4.985400e+02\n11 7733     -2.412300e+02 -4.111600e+02\n12 7733     -7.732600e+02 2.376700e+02\n15 7733     -6.645700e+02 5.381100e+02\n0 7734     7.263000e+01 3.332700e+02\n7 7734     -1.312400e+02 4.081200e+02\n11 7734     2.202300e+02 -4.116000e+02\n13 7734     2.590400e+02 3.179999e+01\n14 7734     3.980500e+02 -4.105200e+02\n0 7735     6.191000e+02 3.337600e+02\n2 7735     4.710400e+02 3.154200e+02\n3 7735     3.289200e+02 -7.440002e+00\n6 7735     3.914700e+02 5.111300e+02\n7 7735     4.255000e+02 5.056700e+02\n9 7735     2.609900e+02 3.646700e+02\n12 7735     4.754200e+02 5.178000e+02\n13 7735     8.010800e+02 9.329999e+01\n0 7736     -3.860900e+02 3.326100e+02\n5 7736     8.590027e+00 -3.277400e+02\n7 7736     -5.923100e+02 3.495500e+02\n8 7736     -4.695100e+02 2.551999e+01\n10 7736     -5.909300e+02 4.994900e+02\n12 7736     -7.135600e+02 2.447100e+02\n13 7736     -1.190100e+02 7.679993e+00\n14 7736     -7.273999e+01 -4.203400e+02\n15 7736     -5.968200e+02 5.413800e+02\n0 7737     6.699700e+02 3.321900e+02\n2 7737     5.264700e+02 3.358200e+02\n3 7737     3.801700e+02 1.267999e+01\n6 7737     4.542400e+02 5.262100e+02\n7 7737     4.758800e+02 5.132800e+02\n9 7737     3.068800e+02 3.828400e+02\n12 7737     5.360699e+02 5.352200e+02\n0 7738     6.699700e+02 3.321900e+02\n2 7738     5.264700e+02 3.358200e+02\n3 7738     3.801700e+02 1.267999e+01\n7 7738     4.758800e+02 5.132800e+02\n0 7739     -2.016400e+02 3.308300e+02\n7 7739     -4.042000e+02 3.698900e+02\n13 7739     2.959998e+01 1.409003e+01\n15 7739     -3.391900e+02 5.636000e+02\n0 7740     5.998300e+02 3.314100e+02\n2 7740     4.528500e+02 3.070000e+02\n6 7740     3.698200e+02 5.033700e+02\n8 7740     4.334399e+02 2.239600e+02\n9 7740     2.446700e+02 3.560100e+02\n0 7741     4.193900e+02 3.305000e+02\n6 7741     5.581000e+01 4.161900e+02\n0 7742     -5.149600e+02 3.289400e+02\n5 7742     -1.211800e+02 -3.285100e+02\n10 7742     -7.506200e+02 4.843000e+02\n15 7742     -7.774900e+02 5.195800e+02\n0 7743     8.138900e+02 3.274900e+02\n3 7743     5.120300e+02 6.210999e+01\n7 7743     6.143101e+02 5.322600e+02\n0 7744     4.755300e+02 3.267800e+02\n6 7744     1.732800e+02 4.442900e+02\n7 7744     2.718800e+02 4.654300e+02\n8 7744     2.877800e+02 1.474100e+02\n12 7744     2.841801e+02 4.379700e+02\n0 7745     -4.514200e+02 3.248300e+02\n7 7745     -6.620600e+02 3.311200e+02\n12 7745     -7.959300e+02 2.189900e+02\n0 7746     6.293000e+02 3.230500e+02\n3 7746     3.428199e+02 -1.196997e+01\n6 7746     4.076500e+02 5.032100e+02\n7 7746     4.371100e+02 4.972400e+02\n8 7746     4.607700e+02 2.264700e+02\n9 7746     2.729399e+02 3.601400e+02\n10 7746     6.141400e+02 5.899300e+02\n11 7746     7.370500e+02 -3.974200e+02\n12 7746     4.916899e+02 5.115500e+02\n0 7747     -1.859800e+02 3.192500e+02\n7 7747     -3.866400e+02 3.599200e+02\n15 7747     -3.150200e+02 5.488800e+02\n0 7748     4.826400e+02 3.144300e+02\n7 7748     2.806801e+02 4.547700e+02\n10 7748     4.409399e+02 5.631200e+02\n0 7749     5.347800e+02 3.134500e+02\n7 7749     3.328101e+02 4.626000e+02\n9 7749     1.487900e+02 2.737900e+02\n10 7749     5.026801e+02 5.684700e+02\n0 7750     5.347800e+02 3.134500e+02\n7 7750     3.328101e+02 4.626000e+02\n10 7750     5.026801e+02 5.684700e+02\n0 7751     7.808800e+02 3.110500e+02\n8 7751     5.924800e+02 2.634700e+02\n9 7751     4.053101e+02 4.073700e+02\n0 7752     6.090027e+00 3.090600e+02\n6 7752     -4.114300e+02 2.803400e+02\n0 7753     -5.740100e+02 3.080500e+02\n13 7753     -2.730000e+02 -2.109998e+01\n14 7753     -2.647300e+02 -4.467400e+02\n0 7754     8.356000e+01 3.071500e+02\n6 7754     -3.145400e+02 2.997100e+02\n11 7754     2.302400e+02 -4.356500e+02\n0 7755     7.622300e+02 3.041200e+02\n2 7755     6.251400e+02 3.456100e+02\n3 7755     4.735200e+02 2.469000e+01\n6 7755     5.669500e+02 5.234800e+02\n7 7755     5.681300e+02 5.017400e+02\n10 7755     7.737700e+02 5.831000e+02\n0 7756     -4.502800e+02 3.025200e+02\n7 7756     -6.569300e+02 3.075800e+02\n15 7756     -6.805800e+02 4.901800e+02\n0 7757     6.294399e+02 3.022300e+02\n2 7757     4.918900e+02 2.920600e+02\n6 7757     4.129300e+02 4.814600e+02\n7 7757     4.398700e+02 4.774400e+02\n9 7757     2.781600e+02 3.448800e+02\n10 7757     6.158300e+02 5.649000e+02\n12 7757     4.971500e+02 4.889300e+02\n13 7757     8.156200e+02 6.895001e+01\n0 7758     4.747100e+02 3.002200e+02\n6 7758     1.809700e+02 4.119600e+02\n8 7758     2.949400e+02 1.246600e+02\n12 7758     2.932500e+02 4.074000e+02\n13 7758     6.413900e+02 4.096997e+01\n0 7759     6.896997e+01 2.939100e+02\n6 7759     -3.229200e+02 2.810200e+02\n0 7760     -3.820200e+02 2.931800e+02\n11 7760     -1.970000e+02 -4.497200e+02\n13 7760     -1.172700e+02 -2.728998e+01\n14 7760     -7.237000e+01 -4.646700e+02\n0 7761     8.190200e+02 2.931000e+02\n2 7761     6.849800e+02 3.594900e+02\n0 7762     8.676500e+02 2.924100e+02\n2 7762     7.285300e+02 3.747300e+02\n3 7762     5.685699e+02 5.390997e+01\n7 7762     6.690699e+02 5.078800e+02\n0 7763     5.425000e+02 2.898500e+02\n2 7763     3.572900e+02 1.956900e+02\n8 7763     3.585200e+02 1.388700e+02\n9 7763     1.635300e+02 2.575500e+02\n10 7763     5.135000e+02 5.397800e+02\n0 7764     -5.401500e+02 2.888500e+02\n4 7764     -6.025000e+01 -3.829999e+01\n5 7764     -1.528700e+02 -3.716800e+02\n11 7764     -3.385700e+02 -4.503300e+02\n13 7764     -2.465900e+02 -3.690997e+01\n14 7764     -2.337400e+02 -4.683700e+02\n0 7765     5.317000e+02 2.884400e+02\n2 7765     3.449900e+02 1.905700e+02\n9 7765     1.525300e+02 2.528700e+02\n10 7765     5.001500e+02 5.373900e+02\n0 7766     5.317000e+02 2.884400e+02\n2 7766     3.449900e+02 1.905700e+02\n9 7766     1.525300e+02 2.528700e+02\n0 7767     8.739399e+02 2.885700e+02\n2 7767     7.357400e+02 3.738100e+02\n3 7767     5.748300e+02 5.306000e+01\n7 7767     6.756899e+02 5.052400e+02\n0 7768     -3.856900e+02 2.863600e+02\n5 7768     2.929993e+00 -3.792700e+02\n7 7768     -5.852500e+02 3.003000e+02\n8 7768     -4.677600e+02 -2.201001e+01\n10 7768     -5.835700e+02 4.430800e+02\n11 7768     -2.002100e+02 -4.556800e+02\n13 7768     -1.201200e+02 -3.332001e+01\n14 7768     -7.734003e+01 -4.722800e+02\n15 7768     -5.875200e+02 4.764700e+02\n0 7769     -5.393600e+02 2.839400e+02\n5 7769     -1.558300e+02 -3.781000e+02\n7 7769     -7.472700e+02 2.777400e+02\n10 7769     -7.738700e+02 4.263800e+02\n11 7769     -3.383000e+02 -4.548000e+02\n15 7769     -8.036500e+02 4.530600e+02\n0 7770     6.033500e+02 2.814400e+02\n3 7770     3.274399e+02 -5.964001e+01\n7 7770     4.168900e+02 4.524800e+02\n9 7770     2.589000e+02 3.180200e+02\n10 7770     5.849100e+02 5.379400e+02\n0 7771     7.624600e+02 2.812300e+02\n2 7771     6.335601e+02 3.266000e+02\n3 7771     4.823600e+02 7.210022e+00\n6 7771     5.741899e+02 5.000000e+02\n8 7771     5.834800e+02 2.360600e+02\n12 7771     6.533101e+02 5.125500e+02\n0 7772     5.146200e+02 2.810500e+02\n8 7772     3.346500e+02 1.237800e+02\n10 7772     4.810601e+02 5.269700e+02\n0 7773     -3.873500e+02 2.806600e+02\n7 7773     -5.862700e+02 2.941700e+02\n10 7773     -5.849200e+02 4.363900e+02\n15 7773     -5.889500e+02 4.682900e+02\n0 7774     -3.827300e+02 2.798000e+02\n5 7774     4.700012e+00 -3.870100e+02\n8 7774     -4.650500e+02 -2.910001e+01\n10 7774     -5.791000e+02 4.357600e+02\n0 7775     2.280300e+02 2.791600e+02\n6 7775     -1.261000e+02 3.086900e+02\n0 7776     7.752300e+02 2.794300e+02\n3 7776     4.940400e+02 1.044000e+01\n0 7777     -5.196800e+02 2.729400e+02\n7 7777     -7.246800e+02 2.679400e+02\n13 7777     -2.301700e+02 -5.064001e+01\n14 7777     -2.152500e+02 -4.872500e+02\n0 7778     6.746000e+02 2.697500e+02\n8 7778     5.113101e+02 1.995500e+02\n9 7778     3.257800e+02 3.355900e+02\n0 7779     6.693500e+02 2.681800e+02\n2 7779     5.427400e+02 2.762800e+02\n3 7779     3.976600e+02 -4.320001e+01\n6 7779     4.696600e+02 4.567600e+02\n8 7779     5.066000e+02 1.967800e+02\n9 7779     3.219600e+02 3.329900e+02\n10 7779     6.657300e+02 5.283700e+02\n12 7779     5.516899e+02 4.660300e+02\n13 7779     8.593300e+02 4.478003e+01\n0 7780     9.363000e+01 2.669200e+02\n7 7780     -9.428003e+01 3.487900e+02\n11 7780     2.398400e+02 -4.738000e+02\n0 7781     6.302600e+02 2.669600e+02\n7 7781     4.457500e+02 4.433600e+02\n10 7781     6.189301e+02 5.225100e+02\n0 7782     6.302600e+02 2.669600e+02\n2 7782     5.025900e+02 2.586700e+02\n6 7782     4.230700e+02 4.428300e+02\n7 7782     4.457500e+02 4.433600e+02\n9 7782     2.877500e+02 3.168100e+02\n10 7782     6.189301e+02 5.225100e+02\n0 7783     6.302600e+02 2.669600e+02\n6 7783     4.230700e+02 4.428300e+02\n7 7783     4.457500e+02 4.433600e+02\n9 7783     2.877500e+02 3.168100e+02\n10 7783     6.189301e+02 5.225100e+02\n11 7783     7.518300e+02 -4.529300e+02\n0 7784     8.095001e+01 2.646400e+02\n5 7784     5.175601e+02 -4.024200e+02\n7 7784     -1.068900e+02 3.448700e+02\n9 7784     -2.503800e+02 1.033500e+02\n12 7784     -1.460100e+02 2.657000e+02\n13 7784     2.852900e+02 -2.503998e+01\n14 7784     4.314600e+02 -4.849100e+02\n0 7785     6.035400e+02 2.641600e+02\n7 7785     4.191100e+02 4.361600e+02\n8 7785     4.496700e+02 1.718900e+02\n9 7785     2.635400e+02 3.029600e+02\n0 7786     -1.781400e+02 2.621000e+02\n7 7786     -3.667500e+02 3.048900e+02\n11 7786     -1.256000e+01 -4.825700e+02\n15 7786     -2.964100e+02 4.699600e+02\n0 7787     5.779800e+02 2.620800e+02\n2 7787     4.473101e+02 2.307700e+02\n3 7787     3.080000e+02 -8.976001e+01\n0 7788     5.779800e+02 2.620800e+02\n3 7788     3.080000e+02 -8.976001e+01\n6 7788     3.620400e+02 4.196900e+02\n8 7788     4.292000e+02 1.620400e+02\n9 7788     2.428300e+02 2.915600e+02\n12 7788     4.496600e+02 4.276900e+02\n0 7789     -4.204500e+02 2.617000e+02\n7 7789     -6.178200e+02 2.692100e+02\n0 7790     7.595699e+02 2.610900e+02\n2 7790     6.365100e+02 3.064700e+02\n3 7790     4.862100e+02 -1.195001e+01\n7 7790     5.715900e+02 4.602200e+02\n8 7790     5.854800e+02 2.200800e+02\n9 7790     3.993199e+02 3.622300e+02\n10 7790     7.736400e+02 5.303800e+02\n12 7790     6.576400e+02 4.968500e+02\n0 7791     -5.220400e+02 2.601700e+02\n5 7791     -1.372300e+02 -4.041200e+02\n10 7791     -7.483900e+02 3.992100e+02\n0 7792     6.310500e+02 2.554800e+02\n2 7792     5.066400e+02 2.476400e+02\n6 7792     4.267300e+02 4.305900e+02\n7 7792     4.474700e+02 4.325900e+02\n8 7792     4.765500e+02 1.742700e+02\n9 7792     2.911200e+02 3.078500e+02\n12 7792     5.104100e+02 4.392100e+02\n15 7792     8.221500e+02 5.826700e+02\n0 7793     -5.014600e+02 2.548400e+02\n7 7793     -7.017400e+02 2.519900e+02\n0 7794     7.566200e+02 2.549500e+02\n2 7794     6.351400e+02 2.999600e+02\n3 7794     4.854399e+02 -1.800000e+01\n6 7794     5.744301e+02 4.703900e+02\n7 7794     5.695800e+02 4.540100e+02\n8 7794     5.842700e+02 2.140900e+02\n9 7794     3.980800e+02 3.557700e+02\n10 7794     7.702900e+02 5.229900e+02\n0 7795     2.309301e+02 2.537800e+02\n6 7795     -1.052400e+02 2.815200e+02\n0 7796     -2.018300e+02 2.498600e+02\n7 7796     -3.875600e+02 2.889700e+02\n10 7796     -3.571400e+02 4.158600e+02\n11 7796     -3.489001e+01 -4.932400e+02\n13 7796     4.256000e+01 -5.565997e+01\n14 7796     1.241400e+02 -5.112900e+02\n0 7797     -4.984900e+02 2.493900e+02\n7 7797     -6.981800e+02 2.461300e+02\n11 7797     -3.053500e+02 -4.877300e+02\n0 7798     -4.984900e+02 2.493900e+02\n7 7798     -6.981800e+02 2.461300e+02\n0 7799     -4.077300e+02 2.483700e+02\n7 7799     -6.027600e+02 2.570500e+02\n8 7799     -4.876500e+02 -6.481000e+01\n14 7799     -1.057400e+02 -5.159000e+02\n0 7800     6.466998e+01 2.471100e+02\n6 7800     -2.960500e+02 2.271000e+02\n0 7801     -2.508002e+01 2.432800e+02\n3 7801     -3.618700e+02 -3.275500e+02\n8 7801     -1.222100e+02 -1.032999e+01\n9 7801     -3.349600e+02 6.984003e+01\n0 7802     -2.508002e+01 2.432800e+02\n4 7802     -1.327400e+02 -3.352100e+02\n9 7802     -3.349600e+02 6.984003e+01\n14 7802     3.208101e+02 -5.110400e+02\n0 7803     -1.640000e+02 2.383700e+02\n7 7803     -3.467600e+02 2.841400e+02\n8 7803     -2.463500e+02 -3.407001e+01\n11 7803     -1.320007e+00 -5.035300e+02\n13 7803     7.792999e+01 -6.228003e+01\n14 7803     1.686700e+02 -5.220000e+02\n15 7803     -2.740200e+02 4.390100e+02\n0 7804     8.732200e+02 2.355200e+02\n3 7804     5.918400e+02 1.208002e+01\n7 7804     6.824500e+02 4.557600e+02\n12 7804     7.871000e+02 5.034300e+02\n0 7805     7.070007e+00 2.226200e+02\n6 7805     -3.483800e+02 1.832100e+02\n0 7806     -1.380005e+00 2.203800e+02\n6 7806     -3.571300e+02 1.781200e+02\n0 7807     5.781000e+01 2.179500e+02\n4 7807     -1.558200e+02 -3.917700e+02\n6 7807     -2.830200e+02 1.928600e+02\n11 7807     2.060500e+02 -5.223800e+02\n0 7808     6.460601e+02 2.177700e+02\n2 7808     5.321801e+02 2.184000e+02\n3 7808     3.901400e+02 -9.823999e+01\n7 7808     4.671000e+02 3.982700e+02\n8 7808     4.974301e+02 1.494600e+02\n9 7808     3.138800e+02 2.839100e+02\n10 7808     6.402400e+02 4.647500e+02\n12 7808     5.371500e+02 4.038700e+02\n15 7808     8.477300e+02 5.319300e+02\n0 7809     -3.439001e+01 2.149300e+02\n5 7809     4.030400e+02 -4.581300e+02\n7 7809     -2.099500e+02 2.817800e+02\n10 7809     -1.549700e+02 3.919700e+02\n12 7809     -2.574000e+02 1.897400e+02\n13 7809     1.978500e+02 -7.275000e+01\n14 7809     3.199200e+02 -5.427900e+02\n0 7810     6.476700e+02 2.112200e+02\n2 7810     5.358400e+02 2.131200e+02\n9 7810     3.173400e+02 2.794000e+02\n13 7810     8.447000e+02 -5.950012e+00\n15 7810     8.511500e+02 5.222800e+02\n0 7811     -1.173999e+01 2.095700e+02\n5 7811     4.309200e+02 -4.641200e+02\n6 7811     -3.623100e+02 1.629700e+02\n0 7812     -1.173999e+01 2.095700e+02\n6 7812     -3.623100e+02 1.629700e+02\n0 7813     -1.692999e+01 2.085100e+02\n6 7813     -3.676500e+02 1.600600e+02\n0 7814     5.936200e+02 2.019400e+02\n2 7814     4.795601e+02 1.791100e+02\n3 7814     3.410100e+02 -1.375900e+02\n6 7814     3.943900e+02 3.588500e+02\n7 7814     4.177700e+02 3.737900e+02\n8 7814     4.537100e+02 1.190800e+02\n9 7814     2.701200e+02 2.486200e+02\n10 7814     5.795300e+02 4.414000e+02\n11 7814     7.312100e+02 -5.221300e+02\n12 7814     4.799301e+02 3.676400e+02\n13 7814     7.912000e+02 -2.101001e+01\n15 7814     7.752700e+02 5.008300e+02\n0 7815     5.936200e+02 2.019400e+02\n2 7815     4.795601e+02 1.791100e+02\n3 7815     3.410100e+02 -1.375900e+02\n6 7815     3.943900e+02 3.588500e+02\n7 7815     4.177700e+02 3.737900e+02\n8 7815     4.537100e+02 1.190800e+02\n9 7815     2.701200e+02 2.486200e+02\n10 7815     5.795300e+02 4.414000e+02\n11 7815     7.312100e+02 -5.221300e+02\n12 7815     4.799301e+02 3.676400e+02\n13 7815     7.912000e+02 -2.101001e+01\n0 7816     6.226801e+02 1.977900e+02\n2 7816     5.125400e+02 1.884500e+02\n3 7816     3.719800e+02 -1.269800e+02\n6 7816     4.309800e+02 3.646900e+02\n7 7816     4.469700e+02 3.752800e+02\n8 7816     4.808199e+02 1.256400e+02\n9 7816     2.971899e+02 2.582800e+02\n10 7816     6.139200e+02 4.393600e+02\n12 7816     5.147400e+02 3.735300e+02\n13 7816     8.207800e+02 -2.062000e+01\n15 7816     8.161600e+02 5.004800e+02\n0 7817     1.444399e+02 1.952800e+02\n10 7817     5.490002e+01 3.849100e+02\n13 7817     4.478101e+02 -5.248999e+01\n14 7817     6.402100e+02 -5.301801e+02\n15 7817     1.402700e+02 4.250900e+02\n0 7818     6.024500e+02 1.948500e+02\n3 7818     3.526100e+02 -1.398100e+02\n6 7818     4.075600e+02 3.541200e+02\n7 7818     4.278400e+02 3.686900e+02\n8 7818     4.634301e+02 1.165600e+02\n9 7818     2.804301e+02 2.467300e+02\n10 7818     5.912300e+02 4.333800e+02\n12 7818     4.926100e+02 3.630600e+02\n15 7818     7.888400e+02 4.922000e+02\n0 7819     8.679900e+02 1.891400e+02\n2 7819     7.599399e+02 2.848700e+02\n3 7819     6.017900e+02 -2.828998e+01\n7 7819     6.829301e+02 4.104400e+02\n9 7819     5.029399e+02 3.464800e+02\n0 7820     6.211000e+02 1.856500e+02\n2 7820     5.138199e+02 1.759900e+02\n3 7820     3.741600e+02 -1.392100e+02\n6 7820     4.322500e+02 3.510300e+02\n8 7820     4.818700e+02 1.155500e+02\n9 7820     2.992800e+02 2.474600e+02\n10 7820     6.133700e+02 4.243100e+02\n12 7820     5.160900e+02 3.600800e+02\n13 7820     8.209700e+02 -3.177002e+01\n15 7820     8.156000e+02 4.827300e+02\n0 7821     8.318600e+02 1.822500e+02\n2 7821     7.282000e+02 2.670600e+02\n3 7821     5.742200e+02 -4.515997e+01\n0 7822     -3.214200e+02 1.806000e+02\n7 7822     -4.955900e+02 2.044300e+02\n13 7822     -4.726001e+01 -1.205200e+02\n0 7823     7.151700e+02 1.790300e+02\n7 7823     5.404900e+02 3.742500e+02\n10 7823     7.263000e+02 4.264800e+02\n0 7824     -4.410999e+01 1.786400e+02\n5 7824     4.040900e+02 -4.990699e+02\n8 7824     -1.095200e+02 -5.442001e+01\n9 7824     -3.105500e+02 2.723999e+01\n10 7824     -1.634000e+02 3.470900e+02\n13 7824     1.987200e+02 -1.041900e+02\n14 7824     3.209200e+02 -5.839200e+02\n0 7825     -4.410999e+01 1.786400e+02\n5 7825     4.040900e+02 -4.990699e+02\n9 7825     -3.105500e+02 2.723999e+01\n10 7825     -1.634000e+02 3.470900e+02\n13 7825     1.987200e+02 -1.041900e+02\n14 7825     3.209200e+02 -5.839200e+02\n0 7826     7.218300e+02 1.741700e+02\n7 7826     5.475400e+02 3.710400e+02\n10 7826     7.337100e+02 4.221000e+02\n0 7827     -8.640997e+01 1.727400e+02\n7 7827     -2.518900e+02 2.335500e+02\n0 7828     -1.039400e+02 1.719500e+02\n7 7828     -2.691000e+02 2.299700e+02\n0 7829     2.021500e+02 1.689800e+02\n2 7829     2.341200e+02 1.765400e+02\n10 7829     1.246300e+02 3.593400e+02\n15 7829     2.228300e+02 3.971000e+02\n0 7830     4.200100e+02 1.688800e+02\n7 7830     2.415000e+02 3.037600e+02\n10 7830     3.787400e+02 3.834700e+02\n0 7831     5.269100e+02 1.683800e+02\n7 7831     3.557200e+02 3.281900e+02\n10 7831     5.036300e+02 3.940500e+02\n15 7831     6.861300e+02 4.431000e+02\n0 7832     8.190000e+02 1.685800e+02\n2 7832     7.197600e+02 2.470900e+02\n7 7832     6.402300e+02 3.825800e+02\n0 7833     8.190000e+02 1.685800e+02\n2 7833     7.197600e+02 2.470900e+02\n3 7833     5.678700e+02 -6.458002e+01\n7 7833     6.402300e+02 3.825800e+02\n0 7834     -2.316600e+02 1.659200e+02\n7 7834     -3.987000e+02 2.041100e+02\n13 7834     3.654999e+01 -1.271600e+02\n15 7834     -3.574800e+02 3.300100e+02\n0 7835     8.820200e+02 1.646200e+02\n2 7835     7.797100e+02 2.690400e+02\n3 7835     6.225900e+02 -4.264001e+01\n7 7835     6.994600e+02 3.895800e+02\n9 7835     5.201700e+02 3.331600e+02\n12 7835     8.144301e+02 4.300600e+02\n0 7836     8.228101e+02 1.639800e+02\n9 7836     4.750400e+02 3.119100e+02\n0 7837     7.375200e+02 1.633700e+02\n7 7837     5.643500e+02 3.634300e+02\n10 7837     7.534200e+02 4.107600e+02\n0 7838     -1.086800e+02 1.632000e+02\n5 7838     3.358600e+02 -5.167600e+02\n13 7838     1.461100e+02 -1.217400e+02\n0 7839     -1.086800e+02 1.632000e+02\n5 7839     3.358600e+02 -5.167600e+02\n7 7839     -2.719700e+02 2.212800e+02\n8 7839     -1.597100e+02 -7.485999e+01\n9 7839     -3.612700e+02 3.169983e+00\n13 7839     1.461100e+02 -1.217400e+02\n0 7840     7.091300e+02 1.614900e+02\n2 7840     6.134500e+02 1.916500e+02\n3 7840     4.696899e+02 -1.205800e+02\n6 7840     5.437900e+02 3.561800e+02\n7 7840     5.364100e+02 3.559500e+02\n8 7840     5.648199e+02 1.272000e+02\n9 7840     3.830800e+02 2.655300e+02\n10 7840     7.194500e+02 4.042100e+02\n12 7840     6.237000e+02 3.671000e+02\n0 7841     6.714000e+02 1.594500e+02\n6 7841     5.001700e+02 3.396900e+02\n7 7841     5.001400e+02 3.471100e+02\n8 7841     5.333101e+02 1.116100e+02\n9 7841     3.516200e+02 2.474000e+02\n13 7841     8.749301e+02 -4.785999e+01\n0 7842     6.445300e+02 1.574600e+02\n3 7842     4.067100e+02 -1.540300e+02\n6 7842     4.679000e+02 3.279300e+02\n7 7842     4.739000e+02 3.403400e+02\n8 7842     5.088700e+02 1.008700e+02\n9 7842     3.274100e+02 2.344000e+02\n10 7842     6.433300e+02 3.937300e+02\n12 7842     5.503300e+02 3.376100e+02\n13 7842     8.481400e+02 -5.279999e+01\n15 7842     8.518300e+02 4.460100e+02\n0 7843     2.111000e+02 1.559900e+02\n7 7843     8.584003e+01 2.924100e+02\n0 7844     -1.743100e+02 1.555600e+02\n5 7844     2.613500e+02 -5.248900e+02\n7 7844     -3.377400e+02 2.040200e+02\n0 7845     -1.138700e+02 1.557700e+02\n2 7845     -2.776200e+02 -8.057001e+01\n5 7845     3.322800e+02 -5.253101e+02\n7 7845     -2.761400e+02 2.136300e+02\n8 7845     -1.622500e+02 -8.059998e+01\n13 7845     1.430400e+02 -1.277600e+02\n0 7846     -1.216700e+02 1.531700e+02\n7 7846     -2.831600e+02 2.095800e+02\n8 7846     -1.684500e+02 -8.321997e+01\n13 7846     1.372500e+02 -1.304300e+02\n0 7847     7.058400e+02 1.510000e+02\n2 7847     6.131600e+02 1.813000e+02\n3 7847     4.699200e+02 -1.300700e+02\n6 7847     5.417000e+02 3.430300e+02\n7 7847     5.344100e+02 3.454200e+02\n8 7847     5.640400e+02 1.169300e+02\n9 7847     3.819900e+02 2.550500e+02\n10 7847     7.167900e+02 3.923200e+02\n12 7847     6.211899e+02 3.534000e+02\n0 7848     7.341500e+02 1.509100e+02\n2 7848     6.417300e+02 1.940200e+02\n3 7848     4.967800e+02 -1.173200e+02\n6 7848     5.753600e+02 3.526900e+02\n7 7848     5.618700e+02 3.504600e+02\n8 7848     5.886100e+02 1.266900e+02\n9 7848     4.068199e+02 2.667700e+02\n10 7848     7.502600e+02 3.958600e+02\n12 7848     6.542300e+02 3.636400e+02\n0 7849     -1.152500e+02 1.502500e+02\n9 7849     -3.597100e+02 -6.250000e+00\n0 7850     -1.152500e+02 1.502500e+02\n7 7850     -2.765800e+02 2.080100e+02\n9 7850     -3.597100e+02 -6.250000e+00\n13 7850     1.436000e+02 -1.325700e+02\n0 7851     -2.177700e+02 1.498500e+02\n7 7851     -3.805100e+02 1.910900e+02\n13 7851     5.304999e+01 -1.394300e+02\n0 7852     7.010800e+02 1.482000e+02\n2 7852     6.084301e+02 1.761100e+02\n6 7852     5.369500e+02 3.381400e+02\n7 7852     5.301899e+02 3.418900e+02\n8 7852     5.598500e+02 1.129300e+02\n10 7852     7.107400e+02 3.887400e+02\n12 7852     6.169100e+02 3.482300e+02\n0 7853     -2.793600e+02 1.458200e+02\n10 7853     -4.371600e+02 2.842200e+02\n13 7853     -9.299927e-01 -1.473700e+02\n0 7854     8.337600e+02 1.453300e+02\n2 7854     7.413500e+02 2.310000e+02\n3 7854     5.881300e+02 -7.800000e+01\n7 7854     6.570200e+02 3.632300e+02\n9 7854     4.884700e+02 3.014700e+02\n0 7855     7.127400e+02 1.446100e+02\n3 7855     4.782400e+02 -1.327800e+02\n7 7855     5.419500e+02 3.401900e+02\n8 7855     5.711500e+02 1.135700e+02\n12 7855     6.314100e+02 3.476500e+02\n0 7856     8.066200e+02 1.436600e+02\n2 7856     7.151500e+02 2.189200e+02\n3 7856     5.649800e+02 -9.131000e+01\n7 7856     6.318400e+02 3.568100e+02\n0 7857     6.624500e+02 1.433400e+02\n3 7857     4.295300e+02 -1.573000e+02\n6 7857     4.934500e+02 3.199300e+02\n7 7857     4.934000e+02 3.301900e+02\n9 7857     3.468800e+02 2.313600e+02\n10 7857     6.659399e+02 3.794500e+02\n12 7857     5.747900e+02 3.298700e+02\n0 7858     7.449600e+02 1.420600e+02\n2 7858     6.553300e+02 1.906300e+02\n9 7858     4.177200e+02 2.654300e+02\n10 7858     7.637300e+02 3.863000e+02\n12 7858     6.683700e+02 3.608100e+02\n0 7859     -2.105000e+02 1.402600e+02\n3 7859     -5.021200e+02 -4.454399e+02\n7 7859     -3.712100e+02 1.828100e+02\n8 7859     -2.467300e+02 -1.067300e+02\n10 7859     -3.548500e+02 2.849700e+02\n15 7859     -3.252900e+02 2.972700e+02\n0 7860     4.450012e+00 1.397400e+02\n10 7860     -1.039900e+02 3.047400e+02\n13 7860     3.454000e+02 -1.066900e+02\n0 7861     4.450012e+00 1.397400e+02\n7 7861     -1.127100e+02 2.481800e+02\n0 7862     7.133800e+02 1.397600e+02\n2 7862     6.234399e+02 1.735900e+02\n6 7862     5.538400e+02 3.330200e+02\n7 7862     5.435000e+02 3.359600e+02\n8 7862     5.726300e+02 1.102700e+02\n9 7862     3.919900e+02 2.488900e+02\n10 7862     7.262100e+02 3.803000e+02\n12 7862     6.335699e+02 3.434300e+02\n0 7863     -1.173700e+02 1.395700e+02\n5 7863     3.328400e+02 -5.431400e+02\n8 7863     -1.580700e+02 -9.159998e+01\n9 7863     -3.548700e+02 -1.306000e+01\n0 7864     -1.173700e+02 1.395700e+02\n5 7864     3.328400e+02 -5.431400e+02\n6 7864     -4.438900e+02 5.164001e+01\n8 7864     -1.580700e+02 -9.159998e+01\n9 7864     -3.548700e+02 -1.306000e+01\n0 7865     7.432000e+02 1.381300e+02\n2 7865     6.545400e+02 1.856900e+02\n7 7865     5.720300e+02 3.396400e+02\n9 7865     4.178199e+02 2.603000e+02\n10 7865     7.621700e+02 3.819300e+02\n0 7866     1.575000e+01 1.381400e+02\n6 7866     -9.185001e+01 1.691500e+02\n15 7866     -3.044000e+01 3.280200e+02\n0 7867     7.593900e+02 1.378600e+02\n2 7867     6.710000e+02 1.933200e+02\n3 7867     5.242600e+02 -1.172300e+02\n7 7867     5.878101e+02 3.425100e+02\n9 7867     4.311300e+02 2.669400e+02\n10 7867     7.822000e+02 3.830500e+02\n12 7867     6.866000e+02 3.587600e+02\n0 7868     -4.639700e+02 1.373000e+02\n13 7868     -1.672200e+02 -1.651300e+02\n0 7869     7.286899e+02 1.366600e+02\n2 7869     6.414100e+02 1.788600e+02\n3 7869     4.970500e+02 -1.316200e+02\n6 7869     5.725800e+02 3.347300e+02\n7 7869     5.585300e+02 3.358900e+02\n8 7869     5.869600e+02 1.133400e+02\n9 7869     4.060699e+02 2.533200e+02\n10 7869     7.450100e+02 3.788100e+02\n12 7869     6.515900e+02 3.454400e+02\n0 7870     7.906600e+02 1.357300e+02\n7 7870     6.179200e+02 3.463600e+02\n10 7870     8.185000e+02 3.840000e+02\n0 7871     6.809301e+02 1.343900e+02\n3 7871     4.505800e+02 -1.573900e+02\n6 7871     5.177700e+02 3.160800e+02\n7 7871     5.127400e+02 3.249400e+02\n8 7871     5.464100e+02 9.539001e+01\n9 7871     3.654800e+02 2.314900e+02\n10 7871     6.881400e+02 3.704700e+02\n0 7872     7.173900e+02 1.335000e+02\n2 7872     6.297700e+02 1.696000e+02\n3 7872     4.865000e+02 -1.412500e+02\n6 7872     5.605601e+02 3.276700e+02\n7 7872     5.480900e+02 3.306200e+02\n8 7872     5.781100e+02 1.063800e+02\n9 7872     3.972800e+02 2.457600e+02\n10 7872     7.315300e+02 3.735900e+02\n12 7872     6.400000e+02 3.379000e+02\n0 7873     7.173900e+02 1.335000e+02\n2 7873     6.297700e+02 1.696000e+02\n3 7873     4.865000e+02 -1.412500e+02\n6 7873     5.605601e+02 3.276700e+02\n7 7873     5.480900e+02 3.306200e+02\n8 7873     5.781100e+02 1.063800e+02\n9 7873     3.972800e+02 2.457600e+02\n10 7873     7.315300e+02 3.735900e+02\n12 7873     6.400000e+02 3.379000e+02\n0 7874     7.410300e+02 1.323600e+02\n2 7874     6.540100e+02 1.795100e+02\n3 7874     5.090800e+02 -1.307300e+02\n7 7874     5.707300e+02 3.342500e+02\n8 7874     5.984000e+02 1.142000e+02\n9 7874     4.174000e+02 2.549900e+02\n12 7874     6.668000e+02 3.461300e+02\n0 7875     -2.145500e+02 1.315200e+02\n10 7875     -3.581600e+02 2.743100e+02\n13 7875     6.097998e+01 -1.545300e+02\n0 7876     -2.228400e+02 1.308100e+02\n7 7876     -3.807600e+02 1.718700e+02\n8 7876     -2.537700e+02 -1.155000e+02\n10 7876     -3.675200e+02 2.729500e+02\n13 7876     5.356000e+01 -1.557700e+02\n15 7876     -3.399900e+02 2.834500e+02\n0 7877     -1.187000e+01 1.287800e+02\n7 7877     -1.263300e+02 2.344900e+02\n10 7877     -1.216100e+02 2.897100e+02\n12 7877     -9.222998e+01 2.027600e+02\n13 7877     3.330699e+02 -1.173100e+02\n15 7877     -6.692999e+01 3.108700e+02\n0 7878     7.555200e+02 1.262200e+02\n7 7878     5.856200e+02 3.307400e+02\n10 7878     7.786300e+02 3.674600e+02\n0 7879     7.555200e+02 1.262200e+02\n2 7879     6.702900e+02 1.801600e+02\n7 7879     5.856200e+02 3.307400e+02\n9 7879     4.298400e+02 2.580800e+02\n0 7880     7.148300e+02 1.256000e+02\n2 7880     6.294900e+02 1.608800e+02\n3 7880     4.864700e+02 -1.492600e+02\n6 7880     5.596100e+02 3.187600e+02\n7 7880     5.465900e+02 3.228300e+02\n8 7880     5.774399e+02 9.962000e+01\n9 7880     3.971100e+02 2.385600e+02\n10 7880     7.288500e+02 3.638400e+02\n12 7880     6.388700e+02 3.292300e+02\n0 7881     7.148300e+02 1.256000e+02\n2 7881     6.294900e+02 1.608800e+02\n3 7881     4.864700e+02 -1.492600e+02\n7 7881     5.465900e+02 3.228300e+02\n8 7881     5.774399e+02 9.962000e+01\n9 7881     3.971100e+02 2.385600e+02\n10 7881     7.288500e+02 3.638400e+02\n0 7882     8.630500e+02 1.253300e+02\n2 7882     7.740000e+02 2.259900e+02\n3 7882     6.198900e+02 -8.275000e+01\n7 7882     6.869700e+02 3.494000e+02\n9 7882     5.160601e+02 2.974600e+02\n12 7882     8.037300e+02 3.820800e+02\n0 7883     7.750800e+02 1.247900e+02\n7 7883     6.044200e+02 3.331300e+02\n9 7883     4.479000e+02 2.627900e+02\n12 7883     7.072300e+02 3.499400e+02\n0 7884     -4.687100e+02 1.246100e+02\n4 7884     -1.569300e+02 -6.431000e+01\n7 7884     -6.382600e+02 1.253400e+02\n10 7884     -6.620500e+02 2.402900e+02\n13 7884     -1.670900e+02 -1.766100e+02\n0 7885     7.534600e+02 1.223200e+02\n2 7885     6.692200e+02 1.756000e+02\n3 7885     5.238300e+02 -1.339300e+02\n7 7885     5.839301e+02 3.269700e+02\n9 7885     4.303800e+02 2.522300e+02\n10 7885     7.751801e+02 3.641300e+02\n12 7885     6.834700e+02 3.396600e+02\n0 7886     8.053900e+02 1.208400e+02\n2 7886     7.216801e+02 1.980900e+02\n3 7886     5.720400e+02 -1.109000e+02\n7 7886     6.335000e+02 3.346900e+02\n0 7887     8.053900e+02 1.208400e+02\n2 7887     7.216801e+02 1.980900e+02\n3 7887     5.720400e+02 -1.109000e+02\n7 7887     6.335000e+02 3.346900e+02\n0 7888     7.497200e+02 1.202100e+02\n3 7888     5.212800e+02 -1.376100e+02\n7 7888     5.809500e+02 3.240600e+02\n10 7888     7.708101e+02 3.611900e+02\n0 7889     7.497200e+02 1.202100e+02\n3 7889     5.212800e+02 -1.376100e+02\n7 7889     5.809500e+02 3.240600e+02\n10 7889     7.708101e+02 3.611900e+02\n0 7890     -2.765300e+02 1.200200e+02\n4 7890     -1.790100e+02 -1.785500e+02\n0 7891     6.932600e+02 1.199800e+02\n2 7891     6.083600e+02 1.456800e+02\n3 7891     4.668101e+02 -1.646800e+02\n6 7891     5.356801e+02 3.048300e+02\n7 7891     5.264600e+02 3.134600e+02\n8 7891     5.594800e+02 8.776001e+01\n9 7891     3.794500e+02 2.250700e+02\n10 7891     7.036899e+02 3.550700e+02\n12 7891     6.153900e+02 3.150100e+02\n0 7892     -2.260300e+02 1.197300e+02\n7 7892     -3.813900e+02 1.613000e+02\n15 7892     -3.429600e+02 2.677100e+02\n0 7893     7.450601e+02 1.179000e+02\n2 7893     6.622500e+02 1.672200e+02\n3 7893     5.174500e+02 -1.412900e+02\n7 7893     5.766700e+02 3.212200e+02\n9 7893     4.245601e+02 2.451300e+02\n10 7893     7.652900e+02 3.580900e+02\n12 7893     6.751300e+02 3.313500e+02\n0 7894     8.755900e+02 1.166500e+02\n2 7894     7.885300e+02 2.234700e+02\n3 7894     6.335400e+02 -8.484003e+01\n7 7894     6.995400e+02 3.434900e+02\n9 7894     5.277800e+02 2.958900e+02\n0 7895     6.994301e+02 1.157300e+02\n2 7895     6.167300e+02 1.449300e+02\n3 7895     4.749200e+02 -1.652700e+02\n6 7895     5.442400e+02 3.022200e+02\n7 7895     5.332600e+02 3.104100e+02\n8 7895     5.665300e+02 8.662000e+01\n9 7895     3.864900e+02 2.241100e+02\n10 7895     7.112800e+02 3.505100e+02\n12 7895     6.241899e+02 3.126000e+02\n0 7896     8.272800e+02 1.150300e+02\n3 7896     5.933300e+02 -1.070400e+02\n7 7896     6.549800e+02 3.331900e+02\n9 7896     4.915100e+02 2.754500e+02\n0 7897     8.386100e+02 1.155300e+02\n2 7897     7.537000e+02 2.059700e+02\n12 7897     7.797600e+02 3.622600e+02\n0 7898     8.142300e+02 1.145100e+02\n2 7898     7.311300e+02 1.946700e+02\n3 7898     5.818600e+02 -1.133700e+02\n0 7899     7.664700e+02 1.130500e+02\n3 7899     5.394301e+02 -1.358800e+02\n7 7899     5.976899e+02 3.203800e+02\n9 7899     4.436300e+02 2.502100e+02\n10 7899     7.909800e+02 3.546300e+02\n12 7899     7.002000e+02 3.345400e+02\n0 7900     -3.565002e+01 1.122100e+02\n4 7900     -1.947300e+02 -3.807200e+02\n5 7900     5.636899e+02 -5.466400e+02\n6 7900     -1.454900e+02 1.225300e+02\n7 7900     -1.477400e+02 2.140900e+02\n9 7900     -8.596002e+01 1.664600e+02\n12 7900     -1.157400e+02 1.761900e+02\n15 7900     -9.651001e+01 2.855000e+02\n0 7901     6.253400e+02 1.127300e+02\n2 7901     5.384500e+02 1.051400e+02\n3 7901     4.013000e+02 -2.064500e+02\n6 7901     4.568199e+02 2.710100e+02\n7 7901     4.612000e+02 2.934900e+02\n8 7901     5.012000e+02 5.703000e+01\n9 7901     3.219600e+02 1.886400e+02\n10 7901     6.239399e+02 3.387600e+02\n13 7901     8.343800e+02 -9.488000e+01\n15 7901     8.298101e+02 3.801700e+02\n0 7902     8.031000e+02 1.117400e+02\n7 7902     6.329000e+02 3.261100e+02\n0 7903     6.227600e+02 1.082800e+02\n2 7903     5.371899e+02 9.984998e+01\n7 7903     4.592400e+02 2.890300e+02\n8 7903     5.003900e+02 5.276999e+01\n10 7903     6.214900e+02 3.333700e+02\n15 7903     8.268199e+02 3.735400e+02\n0 7904     6.227600e+02 1.082800e+02\n2 7904     5.371899e+02 9.984998e+01\n7 7904     4.592400e+02 2.890300e+02\n8 7904     5.003900e+02 5.276999e+01\n9 7904     3.205000e+02 1.839100e+02\n10 7904     6.214900e+02 3.333700e+02\n15 7904     8.268199e+02 3.735400e+02\n0 7905     7.770500e+02 1.078700e+02\n2 7905     6.970300e+02 1.725300e+02\n3 7905     5.507200e+02 -1.358500e+02\n7 7905     6.086801e+02 3.173800e+02\n9 7905     4.536100e+02 2.505000e+02\n10 7905     8.040900e+02 3.495600e+02\n0 7906     7.770500e+02 1.078700e+02\n3 7906     5.507200e+02 -1.358500e+02\n0 7907     7.942400e+02 1.071100e+02\n3 7907     5.665500e+02 -1.285400e+02\n7 7907     6.249000e+02 3.196400e+02\n0 7908     7.616998e+01 1.064800e+02\n7 7908     -2.951001e+01 2.291300e+02\n10 7908     -1.638000e+01 2.726400e+02\n15 7908     5.492999e+01 2.930500e+02\n0 7909     2.792900e+02 1.046900e+02\n7 7909     1.645400e+02 2.554900e+02\n10 7909     2.195300e+02 2.912100e+02\n13 7909     5.848900e+02 -1.150200e+02\n15 7909     3.357000e+02 3.192200e+02\n0 7910     7.602500e+02 1.046300e+02\n2 7910     6.811200e+02 1.618400e+02\n3 7910     5.362200e+02 -1.465300e+02\n7 7910     5.934100e+02 3.108800e+02\n10 7910     7.844100e+02 3.438200e+02\n12 7910     6.955300e+02 3.228900e+02\n0 7911     7.683101e+02 1.043200e+02\n2 7911     6.893800e+02 1.651900e+02\n3 7911     5.439900e+02 -1.427700e+02\n7 7911     6.007400e+02 3.123900e+02\n9 7911     4.474000e+02 2.442000e+02\n0 7912     7.901899e+02 1.032000e+02\n2 7912     7.116000e+02 1.722600e+02\n3 7912     5.643400e+02 -1.341000e+02\n7 7912     6.217100e+02 3.148600e+02\n9 7912     4.655100e+02 2.522900e+02\n10 7912     8.198600e+02 3.454100e+02\n12 7912     7.294800e+02 3.322300e+02\n0 7913     7.150000e+02 1.031700e+02\n2 7913     6.354399e+02 1.395900e+02\n3 7913     4.932800e+02 -1.695000e+02\n6 7913     5.648101e+02 2.945400e+02\n7 7913     5.493300e+02 3.014800e+02\n9 7913     4.022400e+02 2.207700e+02\n10 7913     7.306300e+02 3.373800e+02\n12 7913     6.439600e+02 3.048400e+02\n0 7914     8.739301e+02 1.015300e+02\n3 7914     6.375300e+02 -9.878003e+01\n0 7915     7.837200e+02 9.985999e+01\n2 7915     7.067100e+02 1.680900e+02\n3 7915     5.589301e+02 -1.395700e+02\n9 7915     4.613600e+02 2.469900e+02\n0 7916     -9.979980e+00 9.578000e+01\n3 7916     -9.640015e+00 -2.189700e+02\n4 7916     -2.084100e+02 -4.027000e+02\n5 7916     6.042200e+02 -5.647500e+02\n6 7916     -9.891000e+01 1.149400e+02\n12 7916     -7.433002e+01 1.700100e+02\n0 7917     6.541600e+02 9.504001e+01\n3 7917     4.360300e+02 -2.089300e+02\n6 7917     4.958000e+02 2.623000e+02\n7 7917     4.916200e+02 2.817700e+02\n8 7917     5.304800e+02 5.164001e+01\n9 7917     3.518199e+02 1.858000e+02\n15 7917     8.725300e+02 3.596200e+02\n0 7918     7.561899e+02 9.503000e+01\n2 7918     6.798800e+02 1.507200e+02\n7 7918     5.904000e+02 3.012100e+02\n9 7918     4.396200e+02 2.316900e+02\n10 7918     7.800400e+02 3.322400e+02\n12 7918     6.934700e+02 3.111800e+02\n0 7919     8.399399e+02 9.395999e+01\n2 7919     7.614301e+02 1.866900e+02\n7 7919     6.699500e+02 3.159800e+02\n0 7920     8.399399e+02 9.395999e+01\n7 7920     6.699500e+02 3.159800e+02\n12 7920     7.869500e+02 3.416000e+02\n0 7921     7.175900e+02 9.323001e+01\n7 7921     5.540100e+02 2.922600e+02\n10 7921     7.339700e+02 3.250100e+02\n0 7922     7.900000e+02 9.098999e+01\n2 7922     7.146899e+02 1.620600e+02\n3 7922     5.680500e+02 -1.450000e+02\n7 7922     6.231400e+02 3.034200e+02\n9 7922     4.683500e+02 2.423800e+02\n10 7922     8.205100e+02 3.312600e+02\n12 7922     7.325200e+02 3.189300e+02\n0 7923     7.900000e+02 9.098999e+01\n2 7923     7.146899e+02 1.620600e+02\n3 7923     5.680500e+02 -1.450000e+02\n7 7923     6.231400e+02 3.034200e+02\n9 7923     4.683500e+02 2.423800e+02\n10 7923     8.205100e+02 3.312600e+02\n12 7923     7.325200e+02 3.189300e+02\n0 7924     7.336100e+02 8.963000e+01\n2 7924     6.585300e+02 1.355900e+02\n3 7924     5.162400e+02 -1.725200e+02\n7 7924     5.695000e+02 2.918700e+02\n9 7924     4.222500e+02 2.181800e+02\n12 7924     6.687600e+02 2.972800e+02\n0 7925     -1.560999e+01 8.862000e+01\n2 7925     7.827002e+01 9.032001e+01\n4 7925     -2.116900e+02 -3.985500e+02\n6 7925     -1.019000e+02 1.062900e+02\n7 7925     -1.202500e+02 1.953300e+02\n8 7925     9.828003e+01 3.051999e+01\n12 7925     -7.787000e+01 1.613500e+02\n15 7925     -6.687000e+01 2.552000e+02\n0 7926     -6.246002e+01 8.648999e+01\n7 7926     -1.717500e+02 1.829800e+02\n10 7926     -1.757800e+02 2.351300e+02\n15 7926     -1.291000e+02 2.458800e+02\n0 7927     7.468800e+02 8.401001e+01\n2 7927     6.742200e+02 1.366100e+02\n7 7927     5.831100e+02 2.891600e+02\n9 7927     4.353800e+02 2.196200e+02\n10 7927     7.697900e+02 3.183000e+02\n12 7927     6.862500e+02 2.966700e+02\n0 7928     7.468800e+02 8.401001e+01\n2 7928     6.742200e+02 1.366100e+02\n3 7928     5.309500e+02 -1.706000e+02\n7 7928     5.831100e+02 2.891600e+02\n9 7928     4.353800e+02 2.196200e+02\n10 7928     7.697900e+02 3.183000e+02\n12 7928     6.862500e+02 2.966700e+02\n0 7929     5.248101e+02 8.345001e+01\n6 7929     3.382800e+02 1.986000e+02\n0 7930     5.248101e+02 8.345001e+01\n6 7930     3.382800e+02 1.986000e+02\n7 7930     3.657000e+02 2.451100e+02\n10 7930     5.091700e+02 2.940600e+02\n15 7930     6.929900e+02 3.237500e+02\n0 7931     -2.633000e+02 8.301999e+01\n2 7931     -4.081700e+02 -1.701200e+02\n7 7931     -4.116500e+02 1.194600e+02\n13 7931     2.909003e+01 -1.991600e+02\n15 7931     -3.898500e+02 2.112800e+02\n0 7932     7.726200e+02 8.163000e+01\n2 7932     7.002500e+02 1.450200e+02\n7 7932     6.078199e+02 2.913700e+02\n10 7932     8.004301e+02 3.180600e+02\n12 7932     7.149900e+02 3.017900e+02\n0 7933     7.726200e+02 8.163000e+01\n2 7933     7.002500e+02 1.450200e+02\n7 7933     6.078199e+02 2.913700e+02\n10 7933     8.004301e+02 3.180600e+02\n12 7933     7.149900e+02 3.017900e+02\n0 7934     5.180200e+02 7.970001e+01\n6 7934     3.300500e+02 1.906800e+02\n7 7934     3.579301e+02 2.399300e+02\n12 7934     4.196801e+02 2.015800e+02\n13 7934     7.270300e+02 -1.391900e+02\n15 7934     6.830000e+02 3.169300e+02\n0 7935     6.268900e+02 7.873999e+01\n2 7935     5.485100e+02 7.123999e+01\n3 7935     4.130200e+02 -2.383700e+02\n6 7935     4.658300e+02 2.338700e+02\n7 7935     4.663800e+02 2.614500e+02\n9 7935     3.312800e+02 1.599900e+02\n10 7935     6.279900e+02 2.990800e+02\n12 7935     5.480000e+02 2.438100e+02\n13 7935     8.395800e+02 -1.244100e+02\n15 7935     8.356600e+02 3.328100e+02\n0 7936     7.716200e+02 7.377002e+01\n2 7936     7.014000e+02 1.374600e+02\n3 7936     5.569600e+02 -1.690200e+02\n7 7936     6.079200e+02 2.839500e+02\n10 7936     7.995900e+02 3.083700e+02\n12 7936     7.160900e+02 2.945000e+02\n0 7937     7.716200e+02 7.377002e+01\n2 7937     7.014000e+02 1.374600e+02\n3 7937     5.569600e+02 -1.690200e+02\n7 7937     6.079200e+02 2.839500e+02\n12 7937     7.160900e+02 2.945000e+02\n0 7938     -3.939001e+01 7.344000e+01\n3 7938     -3.508002e+01 -2.498500e+02\n10 7938     -1.469300e+02 2.230400e+02\n13 7938     3.192700e+02 -1.645300e+02\n0 7939     -3.112000e+01 7.253998e+01\n7 7939     -1.336900e+02 1.768400e+02\n13 7939     3.274900e+02 -1.652200e+02\n15 7939     -8.559003e+01 2.312300e+02\n0 7940     -1.215997e+01 7.133002e+01\n8 7940     1.091200e+02 2.017999e+01\n10 7940     -1.151200e+02 2.231700e+02\n15 7940     -5.997998e+01 2.325200e+02\n0 7941     -4.500200e+02 6.973999e+01\n10 7941     -6.315300e+02 1.767700e+02\n13 7941     -1.373200e+02 -2.223600e+02\n15 7941     -6.447400e+02 1.687600e+02\n0 7942     8.782200e+02 6.390002e+01\n3 7942     6.540100e+02 -1.283700e+02\n7 7942     7.087100e+02 2.940200e+02\n0 7943     5.619200e+02 6.340002e+01\n6 7943     3.900300e+02 1.900000e+02\n7 7943     4.043300e+02 2.330300e+02\n8 7943     4.520100e+02 -9.700012e+00\n10 7943     5.525699e+02 2.746200e+02\n12 7943     4.760699e+02 2.003000e+02\n13 7943     7.745601e+02 -1.478000e+02\n15 7943     7.459500e+02 3.014500e+02\n0 7944     7.684600e+02 6.340002e+01\n7 7944     6.068900e+02 2.732500e+02\n0 7945     1.430100e+02 6.221002e+01\n12 7945     1.251800e+02 1.834000e+02\n0 7946     -4.505200e+02 6.077002e+01\n10 7946     -6.318100e+02 1.661500e+02\n13 7946     -1.356500e+02 -2.298300e+02\n15 7946     -6.442200e+02 1.570800e+02\n0 7947     7.734900e+02 6.020001e+01\n3 7947     5.630300e+02 -1.800700e+02\n7 7947     6.113199e+02 2.714600e+02\n10 7947     8.037200e+02 2.936000e+02\n12 7947     7.227900e+02 2.804100e+02\n0 7948     8.042700e+02 5.856000e+01\n2 7948     7.386200e+02 1.390000e+02\n3 7948     5.916700e+02 -1.666500e+02\n7 7948     6.410200e+02 2.760400e+02\n9 7948     4.891100e+02 2.241300e+02\n12 7948     7.570500e+02 2.926700e+02\n0 7949     4.947600e+02 5.807001e+01\n7 7949     3.379900e+02 2.140800e+02\n10 7949     4.751100e+02 2.611900e+02\n13 7949     7.052800e+02 -1.625800e+02\n15 7949     6.535300e+02 2.838500e+02\n0 7950     7.786100e+02 5.535999e+01\n2 7950     7.150400e+02 1.231900e+02\n3 7950     5.707400e+02 -1.822300e+02\n7 7950     6.172300e+02 2.674900e+02\n9 7950     4.695500e+02 2.095800e+02\n10 7950     8.099200e+02 2.880700e+02\n12 7950     7.303101e+02 2.757800e+02\n0 7951     8.042200e+02 5.332001e+01\n9 7951     4.898199e+02 2.196100e+02\n0 7952     7.959500e+02 5.240997e+01\n2 7952     7.320200e+02 1.283100e+02\n3 7952     5.870300e+02 -1.759400e+02\n7 7952     6.342200e+02 2.679900e+02\n9 7952     4.844000e+02 2.151200e+02\n12 7952     7.497900e+02 2.812400e+02\n0 7953     -1.637700e+02 5.069000e+01\n2 7953     -1.370700e+02 -4.528003e+01\n3 7953     -2.238600e+02 -3.629200e+02\n4 7953     -2.240000e+02 -2.777100e+02\n6 7953     -3.190300e+02 -1.120001e+01\n7 7953     -2.772400e+02 1.238200e+02\n8 7953     -7.156000e+01 -7.253003e+01\n9 7953     -2.262500e+02 3.932001e+01\n10 7953     -2.896300e+02 1.832900e+02\n12 7953     -2.757000e+02 4.712000e+01\n13 7953     1.853101e+02 -2.024900e+02\n15 7953     -2.584500e+02 1.830200e+02\n0 7954     -4.709998e+01 5.058002e+01\n2 7954     5.529999e+01 4.216998e+01\n4 7954     -2.330800e+02 -3.736700e+02\n5 7954     5.659800e+02 -6.168600e+02\n6 7954     -1.261600e+02 5.122998e+01\n7 7954     -1.462500e+02 1.523000e+02\n8 7954     7.847998e+01 -9.529999e+00\n10 7954     -1.533400e+02 1.948900e+02\n12 7954     -1.048000e+02 1.072300e+02\n13 7954     3.157300e+02 -1.850900e+02\n15 7954     -1.040900e+02 1.995300e+02\n0 7955     7.146000e+02 5.028998e+01\n2 7955     6.506500e+02 8.672998e+01\n3 7955     5.115800e+02 -2.188300e+02\n6 7955     5.789600e+02 2.360500e+02\n7 7955     5.563199e+02 2.504400e+02\n8 7955     5.941100e+02 3.801001e+01\n9 7955     4.166000e+02 1.769400e+02\n0 7956     -4.775200e+02 4.922998e+01\n13 7956     -1.579500e+02 -2.415500e+02\n0 7957     5.674500e+02 4.823999e+01\n7 7957     4.118500e+02 2.192900e+02\n0 7958     7.091200e+02 4.779999e+01\n2 7958     6.461500e+02 8.189001e+01\n3 7958     5.068199e+02 -2.244500e+02\n6 7958     5.738101e+02 2.319900e+02\n7 7958     5.515300e+02 2.469500e+02\n8 7958     5.902200e+02 3.445999e+01\n9 7958     4.130300e+02 1.730300e+02\n10 7958     7.273199e+02 2.717100e+02\n12 7958     6.523900e+02 2.417900e+02\n0 7959     8.380300e+02 4.826001e+01\n3 7959     6.250500e+02 -1.604600e+02\n7 7959     6.737700e+02 2.717300e+02\n9 7959     5.173700e+02 2.287800e+02\n0 7960     5.082000e+02 4.745001e+01\n7 7960     3.534900e+02 2.065700e+02\n10 7960     4.923101e+02 2.502800e+02\n12 7960     4.156899e+02 1.615300e+02\n13 7960     7.205000e+02 -1.700000e+02\n15 7960     6.737700e+02 2.711800e+02\n0 7961     -4.683800e+02 4.678998e+01\n2 7961     -6.480700e+02 -2.513100e+02\n13 7961     -1.480000e+02 -2.428600e+02\n15 7961     -6.668500e+02 1.352300e+02\n0 7962     -8.507001e+01 4.704999e+01\n2 7962     -5.510010e+00 6.710022e+00\n3 7962     -9.472998e+01 -3.071500e+02\n6 7962     -1.880800e+02 2.607001e+01\n7 7962     -1.885100e+02 1.389900e+02\n8 7962     2.969000e+01 -3.526001e+01\n9 7962     -1.155800e+02 8.987000e+01\n12 7962     -1.600700e+02 8.204999e+01\n13 7962     2.728199e+02 -1.937700e+02\n0 7963     2.092900e+02 4.625000e+01\n4 7963     -2.680500e+02 -5.795200e+02\n7 7963     1.134800e+02 1.926600e+02\n13 7963     5.467200e+02 -1.654400e+02\n15 7963     2.443199e+02 2.289600e+02\n0 7964     7.940200e+02 4.353998e+01\n2 7964     7.324399e+02 1.195400e+02\n3 7964     5.872100e+02 -1.849700e+02\n7 7964     6.331400e+02 2.593300e+02\n9 7964     4.834800e+02 2.074200e+02\n12 7964     7.491801e+02 2.702000e+02\n0 7965     8.085601e+02 4.331000e+01\n3 7965     6.015300e+02 -1.781700e+02\n9 7965     4.992400e+02 2.135700e+02\n12 7965     7.704500e+02 2.754000e+02\n0 7966     8.631801e+02 4.119000e+01\n2 7966     8.003000e+02 1.490000e+02\n3 7966     6.497900e+02 -1.543500e+02\n7 7966     6.980400e+02 2.699000e+02\n9 7966     5.390200e+02 2.337500e+02\n0 7967     8.631801e+02 4.119000e+01\n2 7967     8.003000e+02 1.490000e+02\n3 7967     6.497900e+02 -1.543500e+02\n7 7967     6.980400e+02 2.699000e+02\n9 7967     5.390200e+02 2.337500e+02\n12 7967     8.258500e+02 2.930700e+02\n0 7968     6.785100e+02 4.037000e+01\n8 7968     5.652700e+02 1.576001e+01\n0 7969     7.622400e+02 4.012000e+01\n2 7969     7.027600e+02 1.010800e+02\n9 7969     4.597400e+02 1.909100e+02\n10 7969     7.914500e+02 2.687800e+02\n0 7970     7.995699e+02 3.978998e+01\n7 7970     6.389500e+02 2.567800e+02\n9 7970     4.896000e+02 2.080800e+02\n0 7971     -6.053800e+02 3.817999e+01\n7 7971     -7.663200e+02 1.557001e+01\n15 7971     -8.574000e+02 1.045800e+02\n0 7972     -6.053800e+02 3.817999e+01\n7 7972     -7.663200e+02 1.557001e+01\n0 7973     4.924800e+02 3.801001e+01\n7 7973     3.383400e+02 1.948600e+02\n10 7973     4.736500e+02 2.381700e+02\n15 7973     6.520200e+02 2.561700e+02\n0 7974     6.948300e+02 3.720001e+01\n3 7974     4.963000e+02 -2.426800e+02\n7 7974     5.390500e+02 2.339800e+02\n10 7974     7.114301e+02 2.574000e+02\n0 7975     8.254301e+02 3.657001e+01\n7 7975     6.637400e+02 2.588800e+02\n9 7975     5.115000e+02 2.153900e+02\n12 7975     7.861300e+02 2.757400e+02\n0 7976     -1.897500e+02 3.553998e+01\n7 7976     -3.002000e+02 1.042700e+02\n10 7976     -3.182900e+02 1.627100e+02\n12 7976     -3.002300e+02 2.246002e+01\n15 7976     -2.922700e+02 1.587800e+02\n0 7977     7.219900e+02 3.541998e+01\n2 7977     6.628500e+02 7.621997e+01\n7 7977     5.656500e+02 2.375000e+02\n0 7978     5.925400e+02 3.406000e+01\n6 7978     4.365500e+02 1.698300e+02\n7 7978     4.387300e+02 2.110500e+02\n10 7978     5.914000e+02 2.436600e+02\n15 7978     7.926500e+02 2.651900e+02\n0 7979     5.925400e+02 3.406000e+01\n6 7979     4.365500e+02 1.698300e+02\n7 7979     4.387300e+02 2.110500e+02\n10 7979     5.914000e+02 2.436600e+02\n15 7979     7.926500e+02 2.651900e+02\n0 7980     -1.122200e+02 3.278998e+01\n6 7980     -2.247400e+02 -3.789978e+00\n7 7980     -2.162000e+02 1.185300e+02\n10 7980     -2.273600e+02 1.678400e+02\n12 7980     -1.940600e+02 5.339001e+01\n13 7980     2.455800e+02 -2.100400e+02\n15 7980     -1.878600e+02 1.661700e+02\n0 7981     2.339100e+02 3.121002e+01\n13 7981     5.689500e+02 -1.765700e+02\n15 7981     2.804200e+02 2.118000e+02\n0 7982     8.272100e+02 3.046002e+01\n2 7982     7.690100e+02 1.220600e+02\n7 7982     6.659600e+02 2.533600e+02\n9 7982     5.142700e+02 2.109500e+02\n12 7982     7.892500e+02 2.688600e+02\n0 7983     5.128800e+02 2.726001e+01\n7 7983     3.603101e+02 1.878600e+02\n13 7983     7.273700e+02 -1.877900e+02\n15 7983     6.823000e+02 2.439500e+02\n0 7984     -8.380300e+02 2.585999e+01\n13 7984     -4.860100e+02 -2.824200e+02\n0 7985     8.188101e+02 2.571002e+01\n2 7985     7.623900e+02 1.142700e+02\n3 7985     6.168800e+02 -1.888700e+02\n7 7985     6.589100e+02 2.470700e+02\n9 7985     5.086700e+02 2.036100e+02\n0 7986     1.314600e+02 2.528003e+01\n7 7986     4.331000e+01 1.617300e+02\n13 7986     4.873600e+02 -1.881100e+02\n15 7986     1.399000e+02 1.898500e+02\n0 7987     1.314600e+02 2.528003e+01\n7 7987     4.331000e+01 1.617300e+02\n13 7987     4.873600e+02 -1.881100e+02\n0 7988     8.488400e+02 2.384998e+01\n2 7988     7.920800e+02 1.265000e+02\n9 7988     5.331600e+02 2.151400e+02\n12 7988     8.155601e+02 2.714000e+02\n0 7989     8.353900e+02 2.347998e+01\n2 7989     7.781500e+02 1.204200e+02\n3 7989     6.310900e+02 -1.823900e+02\n7 7989     6.737300e+02 2.488300e+02\n9 7989     5.217100e+02 2.094700e+02\n0 7990     5.579100e+02 2.253003e+01\n6 7990     3.964100e+02 1.420500e+02\n7 7990     4.064600e+02 1.921700e+02\n10 7990     5.519700e+02 2.256900e+02\n12 7990     4.823500e+02 1.529100e+02\n13 7990     7.754800e+02 -1.855000e+02\n0 7991     8.239700e+02 2.192999e+01\n2 7991     7.689900e+02 1.127000e+02\n3 7991     6.232900e+02 -1.895600e+02\n7 7991     6.641600e+02 2.443100e+02\n9 7991     5.138400e+02 2.023900e+02\n0 7992     5.861300e+02 1.897998e+01\n6 7992     4.325300e+02 1.504300e+02\n12 7992     5.159500e+02 1.613900e+02\n0 7993     6.711801e+02 1.848999e+01\n6 7993     5.362500e+02 1.849400e+02\n7 7993     5.182600e+02 2.114100e+02\n9 7993     3.873600e+02 1.302100e+02\n0 7994     2.298000e+02 1.496997e+01\n7 7994     1.385500e+02 1.656800e+02\n12 7994     2.330200e+02 1.511700e+02\n13 7994     5.687800e+02 -1.896100e+02\n0 7995     7.248500e+02 1.252002e+01\n2 7995     6.727700e+02 5.488000e+01\n7 7995     5.712400e+02 2.163900e+02\n9 7995     4.359200e+02 1.512000e+02\n10 7995     7.486700e+02 2.322900e+02\n0 7996     -1.211400e+02 1.073999e+01\n6 7996     -2.183100e+02 -2.923999e+01\n12 7996     -1.939100e+02 2.878003e+01\n0 7997     6.447300e+02 9.789978e+00\n2 7997     5.881000e+02 9.880005e+00\n3 7997     4.541899e+02 -2.969500e+02\n6 7997     5.081600e+02 1.641900e+02\n7 7997     4.938199e+02 1.977900e+02\n8 7997     5.410900e+02 -2.247000e+01\n9 7997     3.661100e+02 1.104200e+02\n10 7997     6.544100e+02 2.210000e+02\n12 7997     5.894399e+02 1.743200e+02\n15 7997     8.702200e+02 2.384900e+02\n0 7998     8.422000e+02 9.380005e+00\n3 7998     6.444000e+02 -1.920200e+02\n7 7998     6.831200e+02 2.359500e+02\n9 7998     5.319500e+02 2.008900e+02\n0 7999     6.389000e+02 5.520020e+00\n6 7999     5.001801e+02 1.571100e+02\n7 7999     4.882300e+02 1.927800e+02\n8 7999     5.362500e+02 -2.895001e+01\n9 7999     3.614000e+02 1.032300e+02\n12 7999     5.810300e+02 1.662400e+02\n0 8000     6.646300e+02 5.719971e+00\n2 8000     6.107000e+02 1.640997e+01\n6 8000     5.321400e+02 1.682600e+02\n8 8000     5.598400e+02 -1.823999e+01\n9 8000     3.853000e+02 1.171300e+02\n12 8000     6.118400e+02 1.779100e+02\n0 8001     6.646300e+02 5.719971e+00\n2 8001     6.107000e+02 1.640997e+01\n6 8001     5.321400e+02 1.682600e+02\n7 8001     5.137700e+02 1.978600e+02\n8 8001     5.598400e+02 -1.823999e+01\n9 8001     3.853000e+02 1.171300e+02\n10 8001     6.783600e+02 2.182200e+02\n12 8001     6.118400e+02 1.779100e+02\n0 8002     8.648101e+02 2.830017e+00\n2 8002     8.140800e+02 1.140200e+02\n3 8002     6.652700e+02 -1.871100e+02\n7 8002     7.047700e+02 2.340700e+02\n9 8002     5.514800e+02 2.051800e+02\n0 8003     5.420601e+02 1.599976e+00\n7 8003     3.931500e+02 1.689800e+02\n0 8004     5.420601e+02 1.599976e+00\n7 8004     3.931500e+02 1.689800e+02\n0 8005     6.660100e+02 1.479980e+00\n2 8005     6.129700e+02 1.321997e+01\n6 8005     5.347000e+02 1.645400e+02\n7 8005     5.156100e+02 1.945000e+02\n9 8005     3.874200e+02 1.141000e+02\n10 8005     6.799301e+02 2.138000e+02\n12 8005     6.140100e+02 1.752600e+02\n0 8006     -3.600700e+02 1.460022e+00\n4 8006     -2.387800e+02 -1.255300e+02\n13 8006     -3.854999e+01 -2.741400e+02\n15 8006     -5.130900e+02 8.889999e+01\n0 8007     6.784399e+02 -2.330017e+00\n2 8007     6.280300e+02 1.496002e+01\n7 8007     5.283600e+02 1.927700e+02\n8 8007     5.742800e+02 -1.942001e+01\n9 8007     3.995900e+02 1.164000e+02\n10 8007     6.949100e+02 2.100100e+02\n12 8007     6.297500e+02 1.743500e+02\n0 8008     6.784399e+02 -2.330017e+00\n2 8008     6.280300e+02 1.496002e+01\n6 8008     5.507300e+02 1.646300e+02\n7 8008     5.283600e+02 1.927700e+02\n8 8008     5.742800e+02 -1.942001e+01\n9 8008     3.995900e+02 1.164000e+02\n10 8008     6.949100e+02 2.100100e+02\n12 8008     6.297500e+02 1.743500e+02\n0 8009     6.319900e+02 -2.989990e+00\n7 8009     4.828300e+02 1.829300e+02\n15 8009     8.524500e+02 2.193000e+02\n0 8010     4.973999e+01 -3.250000e+00\n7 8010     -3.266998e+01 1.191300e+02\n0 8011     8.742900e+02 -3.510010e+00\n2 8011     8.244399e+02 1.122400e+02\n3 8011     6.747700e+02 -1.885200e+02\n7 8011     7.142300e+02 2.300500e+02\n9 8011     5.606100e+02 2.041400e+02\n0 8012     4.429993e+00 -4.650024e+00\n2 8012     1.516300e+02 1.678003e+01\n7 8012     -8.002002e+01 1.088900e+02\n10 8012     -8.797998e+01 1.359200e+02\n13 8012     3.766200e+02 -2.258200e+02\n15 8012     -2.802002e+01 1.312200e+02\n0 8013     8.691300e+02 -4.510010e+00\n2 8013     8.201300e+02 1.091500e+02\n3 8013     6.712800e+02 -1.914900e+02\n7 8013     7.094301e+02 2.281000e+02\n9 8013     5.561100e+02 2.012700e+02\n0 8014     5.913300e+02 -6.440002e+00\n7 8014     4.432800e+02 1.714300e+02\n10 8014     5.934000e+02 1.964900e+02\n15 8014     7.960699e+02 2.084900e+02\n0 8015     7.180601e+02 -6.859985e+00\n3 8015     5.371200e+02 -2.725100e+02\n7 8015     5.673500e+02 1.965600e+02\n9 8015     4.372000e+02 1.312500e+02\n12 8015     6.800400e+02 1.835800e+02\n0 8016     8.653500e+02 -7.210022e+00\n2 8016     8.176600e+02 1.046900e+02\n3 8016     6.692500e+02 -1.960300e+02\n7 8016     7.064000e+02 2.246500e+02\n9 8016     5.544100e+02 1.975000e+02\n0 8017     -5.520800e+02 -8.530029e+00\n4 8017     -2.223400e+02 -1.151001e+01\n10 8017     -7.465400e+02 7.314001e+01\n0 8018     8.570900e+02 -8.469971e+00\n7 8018     6.989000e+02 2.221100e+02\n9 8018     5.482300e+02 1.929800e+02\n0 8019     -5.565800e+02 -9.169983e+00\n4 8019     -2.221600e+02 -8.489990e+00\n0 8020     4.737000e+01 -9.700012e+00\n2 8020     2.052500e+02 2.946997e+01\n7 8020     -3.458002e+01 1.122000e+02\n10 8020     -3.721997e+01 1.343900e+02\n0 8021     -1.014000e+02 -1.110999e+01\n7 8021     -1.927600e+02 7.926001e+01\n10 8021     -2.098600e+02 1.178700e+02\n0 8022     7.025800e+02 -1.178003e+01\n3 8022     5.211899e+02 -2.853800e+02\n8 8022     5.983101e+02 -1.797000e+01\n9 8022     4.233300e+02 1.201800e+02\n0 8023     7.025800e+02 -1.178003e+01\n3 8023     5.211899e+02 -2.853800e+02\n6 8023     5.825100e+02 1.638800e+02\n7 8023     5.533600e+02 1.884000e+02\n9 8023     4.233300e+02 1.201800e+02\n0 8024     8.712400e+02 -1.214001e+01\n7 8024     7.127800e+02 2.210100e+02\n0 8025     5.967300e+02 -1.203003e+01\n7 8025     4.492900e+02 1.674800e+02\n10 8025     5.997000e+02 1.915600e+02\n12 8025     5.371200e+02 1.299700e+02\n15 8025     8.036500e+02 2.028800e+02\n0 8026     5.530200e+02 -1.512000e+01\n7 8026     4.071700e+02 1.548000e+02\n10 8026     5.492800e+02 1.824300e+02\n12 8026     4.862800e+02 1.091200e+02\n13 8026     7.750100e+02 -2.202000e+02\n0 8027     -2.608100e+02 -1.542999e+01\n3 8027     -4.431800e+02 -5.835000e+02\n4 8027     -2.612700e+02 -1.872200e+02\n8 8027     -2.234300e+02 -2.241100e+02\n13 8027     5.591998e+01 -2.821500e+02\n0 8028     2.360800e+02 -1.763000e+01\n10 8028     1.822700e+02 1.448300e+02\n13 8028     5.792800e+02 -2.181600e+02\n15 8028     2.895900e+02 1.455300e+02\n0 8029     -2.527002e+01 -1.945001e+01\n3 8029     3.144000e+01 -3.220200e+02\n0 8030     -3.846200e+02 -2.037000e+01\n2 8030     -4.915200e+02 -2.868100e+02\n7 8030     -5.131100e+02 -2.109985e+00\n8 8030     -3.463300e+02 -2.526600e+02\n13 8030     -5.478998e+01 -2.945400e+02\n15 8030     -5.426700e+02 5.510999e+01\n0 8031     7.158900e+02 -2.290997e+01\n2 8031     6.736100e+02 1.392999e+01\n3 8031     5.379600e+02 -2.886000e+02\n7 8031     5.674500e+02 1.803900e+02\n9 8031     4.380100e+02 1.173000e+02\n10 8031     7.407400e+02 1.898500e+02\n12 8031     6.782000e+02 1.660400e+02\n0 8032     5.642900e+02 -2.609998e+01\n7 8032     4.192300e+02 1.469800e+02\n15 8032     7.606600e+02 1.772100e+02\n0 8033     -3.692300e+02 -2.634998e+01\n8 8033     -3.280700e+02 -2.540500e+02\n0 8034     2.896700e+02 -2.697998e+01\n12 8034     3.043300e+02 1.140300e+02\n15 8034     3.651700e+02 1.396600e+02\n0 8035     -5.478003e+01 -3.122998e+01\n2 8035     7.840002e+01 -4.375000e+01\n3 8035     -5.640015e+00 -3.545800e+02\n4 8035     -2.877100e+02 -3.653400e+02\n7 8035     -1.393800e+02 6.925000e+01\n13 8035     3.192200e+02 -2.568100e+02\n15 8035     -1.034500e+02 8.698999e+01\n0 8036     6.792500e+02 -3.313000e+01\n3 8036     5.049700e+02 -3.195300e+02\n6 8036     5.602600e+02 1.306000e+02\n7 8036     5.333000e+02 1.632500e+02\n8 8036     5.819000e+02 -4.545001e+01\n9 8036     4.086000e+02 9.092001e+01\n10 8036     6.986600e+02 1.742200e+02\n12 8036     6.387100e+02 1.400500e+02\n0 8037     7.101200e+02 -3.308002e+01\n2 8037     6.701000e+02 9.400024e-01\n3 8037     5.353199e+02 -3.017700e+02\n7 8037     5.630100e+02 1.696500e+02\n9 8037     4.350300e+02 1.060400e+02\n12 8037     6.739200e+02 1.526700e+02\n0 8038     7.101200e+02 -3.308002e+01\n2 8038     6.701000e+02 9.400024e-01\n3 8038     5.353199e+02 -3.017700e+02\n7 8038     5.630100e+02 1.696500e+02\n9 8038     4.350300e+02 1.060400e+02\n12 8038     6.739200e+02 1.526700e+02\n0 8039     6.851200e+02 -3.414001e+01\n6 8039     5.681200e+02 1.313200e+02\n8 8039     5.874600e+02 -4.348001e+01\n9 8039     4.142400e+02 9.248001e+01\n0 8040     1.608900e+02 -3.459998e+01\n2 8040     3.289301e+02 3.321002e+01\n4 8040     -3.196200e+02 -5.426801e+02\n6 8040     1.588800e+02 3.422998e+01\n8 8040     3.010100e+02 -2.160999e+01\n13 8040     5.202800e+02 -2.370600e+02\n0 8041     -3.734000e+02 -3.585999e+01\n7 8041     -4.975100e+02 -1.528003e+01\n9 8041     -5.022300e+02 -1.949800e+02\n13 8041     -4.140997e+01 -3.073000e+02\n15 8041     -5.255900e+02 3.603998e+01\n0 8042     -3.734000e+02 -3.585999e+01\n7 8042     -4.975100e+02 -1.528003e+01\n15 8042     -5.255900e+02 3.603998e+01\n0 8043     6.660500e+02 -3.853003e+01\n2 8043     6.194500e+02 -2.778998e+01\n3 8043     4.907700e+02 -3.322400e+02\n6 8043     5.392500e+02 1.213000e+02\n7 8043     5.163101e+02 1.573200e+02\n8 8043     5.664399e+02 -5.423999e+01\n9 8043     3.930400e+02 8.012000e+01\n10 8043     6.775699e+02 1.699300e+02\n12 8043     6.184600e+02 1.310900e+02\n0 8044     -1.140500e+02 -3.959998e+01\n2 8044     5.809998e+00 -7.815997e+01\n7 8044     -2.000900e+02 4.859003e+01\n8 8044     3.429999e+01 -1.086800e+02\n13 8044     2.626700e+02 -2.698100e+02\n15 8044     -1.818100e+02 6.709998e+01\n0 8045     -4.712400e+02 -4.079999e+01\n2 8045     -5.942000e+02 -3.295800e+02\n7 8045     -6.002700e+02 -3.840997e+01\n8 8045     -4.295300e+02 -2.869500e+02\n0 8046     2.229999e+01 -4.344000e+01\n6 8046     6.820007e+00 -2.313000e+01\n7 8046     -5.464001e+01 7.407001e+01\n8 8046     1.821400e+02 -5.958002e+01\n10 8046     -6.259003e+01 9.297998e+01\n15 8046     1.049988e+00 8.110999e+01\n0 8047     -1.400100e+02 -4.612000e+01\n7 8047     -2.276200e+02 3.639001e+01\n0 8048     -3.355900e+02 -5.026001e+01\n2 8048     -4.080600e+02 -2.994500e+02\n7 8048     -4.541600e+02 -2.240002e+01\n9 8048     -4.509400e+02 -1.933600e+02\n13 8048     -3.549988e+00 -3.171100e+02\n0 8049     -1.360500e+02 -5.058002e+01\n7 8049     -2.221100e+02 3.266998e+01\n10 8049     -2.458700e+02 6.762000e+01\n15 8049     -2.089700e+02 4.910999e+01\n0 8050     -4.675100e+02 -5.075000e+01\n7 8050     -5.942000e+02 -4.629999e+01\n13 8050     -1.244500e+02 -3.267800e+02\n0 8051     2.886899e+02 -5.122998e+01\n2 8051     4.259800e+02 1.409998e+01\n6 8051     2.732300e+02 4.431000e+01\n7 8051     2.026600e+02 1.072600e+02\n8 8051     3.863000e+02 -3.426999e+01\n10 8051     2.453500e+02 1.111500e+02\n12 8051     3.091100e+02 8.384003e+01\n13 8051     6.205900e+02 -2.458600e+02\n15 8051     3.673700e+02 1.065700e+02\n0 8052     6.983500e+02 -5.690997e+01\n2 8052     6.650699e+02 -3.065002e+01\n3 8052     5.324700e+02 -3.323700e+02\n9 8052     4.313500e+02 8.076999e+01\n12 8052     6.672000e+02 1.205400e+02\n0 8053     7.269000e+02 -5.812000e+01\n2 8053     6.953500e+02 -1.578003e+01\n3 8053     5.614399e+02 -3.168000e+02\n7 8053     5.823500e+02 1.491300e+02\n9 8053     4.569301e+02 9.323999e+01\n12 8053     7.000601e+02 1.319600e+02\n0 8054     1.731200e+02 -5.882001e+01\n6 8054     1.780900e+02 1.076001e+01\n0 8055     -4.391300e+02 -6.659998e+01\n7 8055     -5.597500e+02 -5.771002e+01\n8 8055     -3.836200e+02 -2.998000e+02\n13 8055     -9.478003e+01 -3.385300e+02\n15 8055     -6.119600e+02 -1.559003e+01\n0 8056     7.107100e+02 -7.103998e+01\n7 8056     5.687400e+02 1.332900e+02\n9 8056     4.466801e+02 7.434003e+01\n10 8056     7.379301e+02 1.337900e+02\n12 8056     6.850900e+02 1.106700e+02\n0 8057     8.624000e+02 -7.256000e+01\n7 8057     7.122200e+02 1.622800e+02\n0 8058     1.109800e+02 -7.403003e+01\n2 8058     2.948700e+02 -1.852002e+01\n13 8058     4.822500e+02 -2.757200e+02\n15 8058     1.249600e+02 5.152002e+01\n0 8059     -4.531800e+02 -7.626001e+01\n8 8059     -3.939800e+02 -3.098300e+02\n0 8060     2.422700e+02 -7.672998e+01\n6 8060     2.470100e+02 8.780029e+00\n7 8060     1.655200e+02 7.698999e+01\n12 8060     2.741899e+02 5.015997e+01\n13 8060     5.909900e+02 -2.694100e+02\n0 8061     1.245900e+02 -7.715002e+01\n2 8061     3.088500e+02 -2.001001e+01\n7 8061     5.371997e+01 5.871002e+01\n13 8061     4.940699e+02 -2.772700e+02\n15 8061     1.440601e+02 4.976001e+01\n0 8062     -7.940002e+01 -7.765997e+01\n7 8062     -1.540400e+02 2.031000e+01\n15 8062     -1.312800e+02 2.075000e+01\n0 8063     2.469500e+02 -7.894000e+01\n2 8063     4.118400e+02 -6.750000e+00\n3 8063     3.074800e+02 -3.103100e+02\n6 8063     2.510000e+02 7.229980e+00\n7 8063     1.701500e+02 7.559003e+01\n8 8063     3.709300e+02 -5.389001e+01\n10 8063     2.005000e+02 7.539001e+01\n12 8063     2.789000e+02 4.847998e+01\n13 8063     5.946700e+02 -2.710000e+02\n15 8063     3.125601e+02 6.303998e+01\n0 8064     6.969600e+02 -8.098999e+01\n7 8064     5.568900e+02 1.209400e+02\n10 8064     7.227800e+02 1.201800e+02\n0 8065     6.969600e+02 -8.098999e+01\n3 8065     5.397900e+02 -3.575200e+02\n7 8065     5.568900e+02 1.209400e+02\n9 8065     4.374200e+02 5.901001e+01\n10 8065     7.227800e+02 1.201800e+02\n0 8066     6.926001e+01 -8.892999e+01\n2 8066     2.556899e+02 -4.845001e+01\n4 8066     -3.459600e+02 -4.659301e+02\n7 8066     4.400024e-01 3.708002e+01\n8 8066     2.369600e+02 -8.878003e+01\n10 8066     -4.090027e+00 4.523999e+01\n13 8066     4.460000e+02 -2.928100e+02\n15 8066     7.054999e+01 2.566998e+01\n0 8067     3.998400e+02 -8.966998e+01\n6 8067     3.778600e+02 2.535999e+01\n7 8067     3.088300e+02 8.289001e+01\n10 8067     3.784000e+02 7.903998e+01\n12 8067     4.246801e+02 5.646997e+01\n13 8067     7.129399e+02 -2.749200e+02\n15 8067     5.285699e+02 6.865997e+01\n0 8068     3.957001e+01 -9.128003e+01\n2 8068     2.226899e+02 -6.179999e+01\n3 8068     1.347200e+02 -3.671100e+02\n6 8068     4.233002e+01 -7.196997e+01\n7 8068     -2.952002e+01 2.909998e+01\n8 8068     2.095000e+02 -9.896002e+01\n10 8068     -3.801001e+01 3.941998e+01\n12 8068     5.246997e+01 -2.135999e+01\n13 8068     4.187500e+02 -2.978500e+02\n15 8068     3.091998e+01 1.852002e+01\n0 8069     3.957001e+01 -9.128003e+01\n4 8069     -3.429800e+02 -4.413000e+02\n6 8069     4.233002e+01 -7.196997e+01\n7 8069     -2.952002e+01 2.909998e+01\n8 8069     2.095000e+02 -9.896002e+01\n10 8069     -3.801001e+01 3.941998e+01\n13 8069     4.187500e+02 -2.978500e+02\n15 8069     3.091998e+01 1.852002e+01\n0 8070     -3.196997e+01 -9.309003e+01\n7 8070     -1.019000e+02 1.384998e+01\n15 8070     -6.532001e+01 6.400024e+00\n0 8071     -3.196997e+01 -9.309003e+01\n7 8071     -1.019000e+02 1.384998e+01\n15 8071     -6.532001e+01 6.400024e+00\n0 8072     6.945500e+02 -9.298999e+01\n2 8072     6.723000e+02 -6.995001e+01\n12 8072     6.728400e+02 7.910999e+01\n0 8073     5.358800e+02 -9.753003e+01\n7 8073     4.099000e+02 7.764001e+01\n12 8073     5.073800e+02 2.698999e+01\n0 8074     -3.023999e+01 -9.801001e+01\n7 8074     -9.884003e+01 9.559998e+00\n0 8075     7.373600e+02 -9.958002e+01\n2 8075     7.181700e+02 -5.201001e+01\n7 8075     5.975500e+02 1.117700e+02\n9 8075     4.768101e+02 6.366998e+01\n10 8075     7.714301e+02 1.041800e+02\n0 8076     7.315300e+02 -1.008900e+02\n2 8076     7.144399e+02 -5.677002e+01\n3 8076     5.823800e+02 -3.561900e+02\n7 8076     5.927700e+02 1.090400e+02\n9 8076     4.733700e+02 5.965997e+01\n12 8076     7.174100e+02 8.638000e+01\n0 8077     7.315300e+02 -1.008900e+02\n2 8077     7.144399e+02 -5.677002e+01\n7 8077     5.927700e+02 1.090400e+02\n9 8077     4.733700e+02 5.965997e+01\n12 8077     7.174100e+02 8.638000e+01\n0 8078     6.987500e+02 -1.022500e+02\n7 8078     5.613101e+02 1.009700e+02\n0 8079     5.602200e+02 -1.052400e+02\n12 8079     5.357800e+02 2.622998e+01\n0 8080     -9.021002e+01 -1.060200e+02\n7 8080     -1.605600e+02 -1.159003e+01\n15 8080     -1.402800e+02 -1.920001e+01\n0 8081     5.324100e+02 -1.071200e+02\n12 8081     5.075300e+02 1.689001e+01\n0 8082     2.954500e+02 -1.132800e+02\n7 8082     2.212700e+02 4.896997e+01\n15 8082     3.838600e+02 2.306000e+01\n0 8083     6.572800e+02 -1.135200e+02\n7 8083     5.227800e+02 8.142001e+01\n0 8084     -7.996997e+01 -1.158600e+02\n7 8084     -1.483700e+02 -1.928998e+01\n0 8085     7.272200e+02 -1.175600e+02\n7 8085     5.906801e+02 9.192001e+01\n0 8086     -3.228300e+02 -1.205500e+02\n2 8086     -3.418300e+02 -3.561700e+02\n6 8086     -5.184200e+02 -3.153300e+02\n13 8086     2.607001e+01 -3.773200e+02\n0 8087     6.539001e+01 -1.228500e+02\n10 8087     -4.969971e+00 5.789978e+00\n13 8087     4.457800e+02 -3.232500e+02\n0 8088     5.454100e+02 -1.252700e+02\n6 8088     4.567700e+02 -1.258002e+01\n7 8088     4.249100e+02 5.422998e+01\n12 8088     5.299500e+02 3.380005e+00\n0 8089     5.454100e+02 -1.252700e+02\n6 8089     4.567700e+02 -1.258002e+01\n8 8089     5.095400e+02 -1.476800e+02\n12 8089     5.299500e+02 3.380005e+00\n13 8089     8.012000e+02 -3.151200e+02\n0 8090     -1.087100e+02 -1.306600e+02\n3 8090     -5.150024e+00 -4.588600e+02\n6 8090     -1.164500e+02 -1.737400e+02\n7 8090     -1.719800e+02 -3.791998e+01\n10 8090     -2.035100e+02 -2.137000e+01\n15 8090     -1.612100e+02 -5.426001e+01\n0 8091     5.515900e+02 -1.321800e+02\n12 8091     5.387500e+02 -1.549988e+00\n0 8092     5.515900e+02 -1.321800e+02\n12 8092     5.387500e+02 -1.549988e+00\n0 8093     7.572200e+02 -1.322600e+02\n2 8093     7.493101e+02 -7.532001e+01\n7 8093     6.218900e+02 8.419000e+01\n9 8093     5.027400e+02 4.566998e+01\n0 8094     7.572200e+02 -1.322600e+02\n2 8094     7.493101e+02 -7.532001e+01\n7 8094     6.218900e+02 8.419000e+01\n9 8094     5.027400e+02 4.566998e+01\n10 8094     7.979500e+02 6.765002e+01\n12 8094     7.542000e+02 6.203003e+01\n0 8095     6.834003e+01 -1.396200e+02\n7 8095     9.510010e+00 -1.247998e+01\n10 8095     -4.099731e-01 -1.357001e+01\n15 8095     7.542999e+01 -4.290002e+01\n0 8096     -1.246300e+02 -1.449400e+02\n2 8096     5.726001e+01 -1.757100e+02\n3 8096     -1.727002e+01 -4.825200e+02\n6 8096     -1.309100e+02 -1.979200e+02\n8 8096     6.996997e+01 -1.901900e+02\n10 8096     -2.222300e+02 -4.013000e+01\n15 8096     -1.826300e+02 -7.613000e+01\n0 8097     2.680699e+02 -1.449900e+02\n7 8097     2.020400e+02 1.425000e+01\n13 8097     6.232300e+02 -3.276100e+02\n0 8098     8.236300e+02 -1.465500e+02\n2 8098     8.217900e+02 -5.291998e+01\n3 8098     6.861899e+02 -3.482400e+02\n7 8098     6.858400e+02 8.441000e+01\n9 8098     5.614700e+02 6.670001e+01\n0 8099     -1.241998e+01 -1.536300e+02\n2 8099     1.922200e+02 -1.429000e+02\n7 8099     -7.048999e+01 -4.260999e+01\n10 8099     -9.142999e+01 -3.832001e+01\n15 8099     -3.103003e+01 -7.275000e+01\n0 8100     -1.241998e+01 -1.536300e+02\n2 8100     1.922200e+02 -1.429000e+02\n7 8100     -7.048999e+01 -4.260999e+01\n10 8100     -9.142999e+01 -3.832001e+01\n15 8100     -3.103003e+01 -7.275000e+01\n0 8101     -8.634003e+01 -1.587700e+02\n2 8101     1.148300e+02 -1.657100e+02\n3 8101     3.891998e+01 -4.702300e+02\n4 8101     -3.719500e+02 -3.432300e+02\n6 8101     -7.188000e+01 -1.931500e+02\n7 8101     -1.436300e+02 -6.096997e+01\n8 8101     1.162000e+02 -1.847500e+02\n10 8101     -1.761400e+02 -5.233002e+01\n12 8101     -7.438000e+01 -1.387200e+02\n13 8101     3.158400e+02 -3.675000e+02\n15 8101     -1.298900e+02 -8.978003e+01\n0 8102     -1.381600e+02 -1.612000e+02\n4 8102     -3.669700e+02 -2.978000e+02\n10 8102     -2.361300e+02 -5.971002e+01\n15 8102     -1.980600e+02 -9.977002e+01\n0 8103     8.348900e+02 -1.632400e+02\n7 8103     6.981100e+02 7.109003e+01\n9 8103     5.744301e+02 5.867999e+01\n0 8104     8.687200e+02 -1.644600e+02\n3 8104     7.345900e+02 -3.399500e+02\n9 8104     6.017700e+02 7.359003e+01\n0 8105     3.520000e+02 -1.670500e+02\n6 8105     3.811600e+02 -5.939001e+01\n12 8105     4.163800e+02 -2.654999e+01\n0 8106     3.655000e+02 -1.676900e+02\n6 8106     3.959600e+02 -5.528998e+01\n10 8106     3.466600e+02 -1.456000e+01\n15 8106     4.887900e+02 -4.226001e+01\n0 8107     5.340027e+00 -1.691700e+02\n7 8107     -4.929999e+01 -5.423999e+01\n15 8107     -4.969971e+00 -9.133002e+01\n0 8108     -1.984003e+01 -1.724200e+02\n7 8108     -7.353003e+01 -6.191998e+01\n10 8108     -9.791998e+01 -6.103003e+01\n0 8109     2.633002e+01 -1.739600e+02\n7 8109     -2.758002e+01 -5.515002e+01\n10 8109     -4.440997e+01 -5.747998e+01\n0 8110     6.548900e+02 -1.790000e+02\n7 8110     5.352900e+02 2.290002e+01\n0 8111     2.791899e+02 -1.807800e+02\n10 8111     2.475400e+02 -3.871997e+01\n13 8111     6.382100e+02 -3.587400e+02\n0 8112     8.221600e+02 -1.817200e+02\n7 8112     6.888900e+02 5.071002e+01\n9 8112     5.702100e+02 3.790002e+01\n0 8113     8.221600e+02 -1.817200e+02\n7 8113     6.888900e+02 5.071002e+01\n0 8114     -2.096002e+01 -1.822600e+02\n6 8114     1.513000e+01 -1.937700e+02\n12 8114     1.438000e+01 -1.437500e+02\n0 8115     8.643600e+02 -1.880600e+02\n3 8115     7.386500e+02 -3.658800e+02\n7 8115     7.279399e+02 5.309998e+01\n9 8115     6.038500e+02 5.169000e+01\n0 8116     8.694000e+02 -1.888200e+02\n7 8116     7.332500e+02 5.410999e+01\n0 8117     3.676001e+01 -1.934300e+02\n2 8117     2.707200e+02 -1.607100e+02\n3 8117     1.880900e+02 -4.606500e+02\n4 8117     -4.197300e+02 -4.401300e+02\n6 8117     8.544000e+01 -1.848700e+02\n7 8117     -1.195001e+01 -7.156000e+01\n8 8117     2.441500e+02 -1.832700e+02\n10 8117     -3.032001e+01 -7.892999e+01\n12 8117     8.765002e+01 -1.382500e+02\n13 8117     4.334100e+02 -3.870500e+02\n15 8117     4.020001e+01 -1.199900e+02\n0 8118     -8.521002e+01 -1.990300e+02\n2 8118     1.171500e+02 -2.293900e+02\n3 8118     4.178998e+01 -5.344700e+02\n6 8118     -6.945001e+01 -2.492700e+02\n8 8118     1.178200e+02 -2.354200e+02\n9 8118     2.070007e+00 -1.008200e+02\n12 8118     -6.863000e+01 -1.962400e+02\n15 8118     -1.219700e+02 -1.443500e+02\n0 8119     3.119500e+02 -1.990100e+02\n2 8119     5.223101e+02 -1.068500e+02\n3 8119     4.192700e+02 -4.022100e+02\n6 8119     3.632600e+02 -1.006000e+02\n10 8119     2.873600e+02 -5.572998e+01\n12 8119     3.911500e+02 -6.714001e+01\n13 8119     6.719399e+02 -3.711100e+02\n15 8119     4.170000e+02 -9.171002e+01\n0 8120     2.085601e+02 -2.008900e+02\n7 8120     1.564500e+02 -4.890002e+01\n13 8120     5.836300e+02 -3.801700e+02\n15 8120     2.749500e+02 -1.071700e+02\n0 8121     -4.584998e+01 -2.068900e+02\n12 8121     -1.179993e+00 -1.759900e+02\n15 8121     -6.995001e+01 -1.491700e+02\n0 8122     8.512000e+01 -2.118700e+02\n6 8122     1.478800e+02 -1.852200e+02\n13 8122     4.808400e+02 -3.986400e+02\n15 8122     1.080100e+02 -1.387300e+02\n0 8123     8.512000e+01 -2.118700e+02\n6 8123     1.478800e+02 -1.852200e+02\n0 8124     6.546500e+02 -2.168300e+02\n12 8124     6.817200e+02 -5.535999e+01\n0 8125     -4.693600e+02 -2.189300e+02\n4 8125     -3.617000e+02 -5.058002e+01\n7 8125     -5.547100e+02 -2.138200e+02\n15 8125     -6.338500e+02 -2.256000e+02\n0 8126     -3.305900e+02 -2.199500e+02\n7 8126     -4.073900e+02 -1.870600e+02\n0 8127     2.615601e+02 -2.197400e+02\n2 8127     4.967100e+02 -1.286200e+02\n3 8127     3.979200e+02 -4.232100e+02\n6 8127     3.282100e+02 -1.352000e+02\n8 8127     4.364200e+02 -1.585100e+02\n10 8127     2.313900e+02 -8.504999e+01\n12 8127     3.488900e+02 -1.002800e+02\n13 8127     6.355300e+02 -3.920900e+02\n15 8127     3.495400e+02 -1.263300e+02\n0 8128     -3.222800e+02 -2.241000e+02\n7 8128     -3.973400e+02 -1.893600e+02\n0 8129     3.331000e+01 -2.300600e+02\n2 8129     2.842700e+02 -1.980400e+02\n3 8129     2.039700e+02 -4.967900e+02\n6 8129     9.763000e+01 -2.259301e+02\n8 8129     2.536500e+02 -2.147900e+02\n10 8129     -3.028003e+01 -1.220000e+02\n12 8129     9.684998e+01 -1.811300e+02\n13 8129     4.364100e+02 -4.208500e+02\n15 8129     4.065002e+01 -1.708200e+02\n0 8130     2.454301e+02 -2.316000e+02\n6 8130     3.203200e+02 -1.508800e+02\n8 8130     4.307100e+02 -1.680500e+02\n10 8130     2.137000e+02 -1.007200e+02\n12 8130     3.384800e+02 -1.156100e+02\n15 8130     3.285900e+02 -1.447000e+02\n0 8131     2.454301e+02 -2.316000e+02\n7 8131     1.997000e+02 -7.100000e+01\n10 8131     2.137000e+02 -1.007200e+02\n15 8131     3.285900e+02 -1.447000e+02\n0 8132     -4.719100e+02 -2.321000e+02\n4 8132     -3.695900e+02 -4.813000e+01\n0 8133     -3.184600e+02 -2.327600e+02\n7 8133     -3.919500e+02 -1.969100e+02\n10 8133     -4.384900e+02 -1.622800e+02\n0 8134     -3.366200e+02 -2.352100e+02\n7 8134     -4.099700e+02 -2.030700e+02\n0 8135     1.440000e+02 -2.364300e+02\n7 8135     1.031500e+02 -9.339001e+01\n10 8135     9.769000e+01 -1.166500e+02\n15 8135     1.905800e+02 -1.640100e+02\n0 8136     5.658700e+02 -2.382700e+02\n6 8136     5.414800e+02 -1.141600e+02\n7 8136     4.702800e+02 -4.335999e+01\n12 8136     6.039399e+02 -9.808002e+01\n0 8137     1.466998e+01 -2.433300e+02\n2 8137     2.597000e+02 -2.298800e+02\n3 8137     1.811300e+02 -5.286500e+02\n4 8137     -4.547600e+02 -4.186100e+02\n6 8137     7.353998e+01 -2.531300e+02\n7 8137     -2.698999e+01 -1.269500e+02\n8 8137     2.334800e+02 -2.395800e+02\n9 8137     1.205900e+02 -9.402002e+01\n10 8137     -5.087000e+01 -1.372000e+02\n12 8137     7.348999e+01 -2.074400e+02\n15 8137     1.747998e+01 -1.902800e+02\n0 8138     -8.870001e+01 -2.480700e+02\n7 8138     -1.376800e+02 -1.572700e+02\n9 8138     0.000000e+00 -1.691100e+02\n15 8138     -1.188300e+02 -2.111000e+02\n0 8139     1.611200e+02 -2.573600e+02\n2 8139     4.171801e+02 -1.971400e+02\n3 8139     3.285300e+02 -4.924301e+02\n6 8139     2.387300e+02 -2.127100e+02\n7 8139     1.210300e+02 -1.127800e+02\n8 8139     3.662000e+02 -2.153500e+02\n9 8139     2.471300e+02 -6.116998e+01\n10 8139     1.193200e+02 -1.388300e+02\n12 8139     2.493600e+02 -1.755500e+02\n15 8139     2.174600e+02 -1.901700e+02\n0 8140     3.265800e+02 -2.623900e+02\n7 8140     2.699900e+02 -9.576001e+01\n0 8141     -2.974800e+02 -2.635800e+02\n8 8141     -1.352100e+02 -4.185700e+02\n10 8141     -4.100800e+02 -1.968300e+02\n13 8141     8.398999e+01 -5.009600e+02\n15 8141     -3.936200e+02 -2.610600e+02\n0 8142     -8.832001e+01 -2.646200e+02\n2 8142     1.118700e+02 -3.349000e+02\n7 8142     -1.352800e+02 -1.741300e+02\n8 8142     1.142100e+02 -3.181200e+02\n9 8142     2.320007e+00 -1.890000e+02\n10 8142     -1.666900e+02 -1.738400e+02\n15 8142     -1.152500e+02 -2.327500e+02\n0 8143     6.301200e+02 -2.647100e+02\n2 8143     7.167000e+02 -2.156300e+02\n12 8143     6.804600e+02 -1.071600e+02\n0 8144     2.861801e+02 -2.769400e+02\n7 8144     2.359500e+02 -1.157700e+02\n10 8144     2.641801e+02 -1.483400e+02\n15 8144     3.933800e+02 -2.014800e+02\n0 8145     2.009399e+02 -2.833000e+02\n4 8145     -5.295600e+02 -5.746400e+02\n0 8146     -2.532900e+02 -2.865900e+02\n13 8146     1.336800e+02 -5.162300e+02\n0 8147     7.613400e+02 -2.899100e+02\n7 8147     6.538500e+02 -5.941998e+01\n0 8148     1.646000e+02 -3.142800e+02\n7 8148     1.292400e+02 -1.725100e+02\n0 8149     1.694100e+02 -3.166200e+02\n7 8149     1.337100e+02 -1.739000e+02\n15 8149     2.384200e+02 -2.693900e+02\n0 8150     1.694100e+02 -3.166200e+02\n7 8150     1.337100e+02 -1.739000e+02\n10 8150     1.347000e+02 -2.058900e+02\n15 8150     2.384200e+02 -2.693900e+02\n0 8151     1.619600e+02 -3.213700e+02\n13 8151     5.483300e+02 -5.009900e+02\n15 8151     2.287900e+02 -2.768500e+02\n0 8152     1.619600e+02 -3.213700e+02\n7 8152     1.270900e+02 -1.800800e+02\n10 8152     1.270700e+02 -2.116200e+02\n15 8152     2.287900e+02 -2.768500e+02\n0 8153     -3.901001e+01 -3.230100e+02\n4 8153     -5.110700e+02 -3.616800e+02\n6 8153     1.322998e+01 -3.872600e+02\n7 8153     -7.378998e+01 -2.225500e+02\n10 8153     -1.038100e+02 -2.357100e+02\n12 8153     1.623999e+01 -3.410400e+02\n13 8153     3.598300e+02 -5.225601e+02\n15 8153     -4.190002e+01 -3.051000e+02\n0 8154     2.075601e+02 -3.244400e+02\n2 8154     4.543900e+02 -2.959200e+02\n3 8154     3.668700e+02 -5.915800e+02\n4 8154     -5.686800e+02 -5.734700e+02\n6 8154     2.837500e+02 -2.886400e+02\n8 8154     3.992600e+02 -2.927900e+02\n12 8154     3.035400e+02 -2.569500e+02\n15 8154     2.928300e+02 -2.753700e+02\n0 8155     2.080400e+02 -3.351900e+02\n2 8155     4.551700e+02 -3.136400e+02\n7 8155     1.711400e+02 -1.871700e+02\n10 8155     1.815800e+02 -2.225400e+02\n12 8155     3.061801e+02 -2.721900e+02\n13 8155     5.859900e+02 -5.128000e+02\n15 8155     2.948800e+02 -2.899900e+02\n0 8156     6.139001e+01 -3.387300e+02\n2 8156     3.129900e+02 -3.607700e+02\n7 8156     2.922998e+01 -2.181700e+02\n8 8156     2.782100e+02 -3.439800e+02\n9 8156     1.687500e+02 -2.013200e+02\n10 8156     1.409998e+01 -2.425200e+02\n13 8156     4.544200e+02 -5.275500e+02\n15 8156     9.621002e+01 -3.133700e+02\n0 8157     7.245100e+02 -3.770100e+02\n7 8157     6.414700e+02 -1.425900e+02\n12 8157     8.268700e+02 -1.874600e+02\n0 8158     -1.484998e+01 -3.773400e+02\n7 8158     -3.797998e+01 -2.706200e+02\n15 8158     -2.460022e+00 -3.751700e+02\n0 8159     4.918000e+02 -3.837900e+02\n6 8159     5.539100e+02 -2.774301e+02\n0 8160     4.754900e+02 -3.905100e+02\n6 8160     5.425800e+02 -2.892000e+02\n7 8160     4.227100e+02 -1.980500e+02\n0 8161     4.754900e+02 -3.905100e+02\n7 8161     4.227100e+02 -1.980500e+02\n0 8162     4.803900e+02 -3.905500e+02\n6 8162     5.470699e+02 -2.880300e+02\n0 8163     6.253800e+02 -3.959400e+02\n7 8163     5.591300e+02 -1.767100e+02\n12 8163     7.407900e+02 -2.342600e+02\n0 8164     -2.577900e+02 -4.028600e+02\n6 8164     -2.310900e+02 -5.938101e+02\n7 8164     -2.856200e+02 -3.510900e+02\n9 8164     -1.159700e+02 -4.064700e+02\n0 8165     -1.842999e+01 -4.076700e+02\n7 8165     -3.954999e+01 -3.040700e+02\n15 8165     -2.270020e+00 -4.168200e+02\n0 8166     6.127400e+02 -4.086600e+02\n7 8166     5.508600e+02 -1.902800e+02\n15 8166     8.684900e+02 -3.421700e+02\n0 8167     4.451300e+02 -4.098300e+02\n6 8167     5.245800e+02 -3.184200e+02\n0 8168     7.888800e+02 -4.100000e+02\n7 8168     7.030000e+02 -1.604600e+02\n0 8169     -1.427400e+02 -4.175800e+02\n7 8169     -1.638500e+02 -3.402300e+02\n15 8169     -1.678300e+02 -4.463500e+02\n0 8170     5.531801e+02 -4.183500e+02\n10 8170     5.857400e+02 -2.817900e+02\n12 8170     6.793300e+02 -2.763000e+02\n15 8170     7.855200e+02 -3.625400e+02\n0 8171     4.685000e+02 -4.252200e+02\n6 8171     5.566801e+02 -3.246400e+02\n7 8171     4.250200e+02 -2.309900e+02\n0 8172     6.364600e+02 -4.262500e+02\n7 8172     5.756600e+02 -2.014100e+02\n12 8172     7.657700e+02 -2.591500e+02\n0 8173     8.707001e+01 -4.343000e+02\n7 8173     7.084998e+01 -3.085800e+02\n0 8174     8.363900e+02 -4.391801e+02\n7 8174     7.489500e+02 -1.774700e+02\n0 8175     4.448500e+02 -4.465400e+02\n7 8175     4.087500e+02 -2.548000e+02\n0 8176     7.566500e+02 -4.466000e+02\n7 8176     6.841000e+02 -1.982100e+02\n0 8177     5.584900e+02 -4.914399e+02\n10 8177     5.989399e+02 -3.645500e+02\n12 8177     7.215601e+02 -3.460100e+02\n0 8178     4.491899e+02 -4.968600e+02\n6 8178     5.800200e+02 -3.986500e+02\n0 8179     -1.762200e+02 -4.997200e+02\n6 8179     -6.653003e+01 -6.580601e+02\n0 8180     3.974000e+02 -5.090300e+02\n2 8180     6.997700e+02 -4.465601e+02\n0 8181     1.211000e+02 -5.207200e+02\n2 8181     4.575699e+02 -5.462800e+02\n0 8182     -3.100100e+02 -5.259000e+02\n7 8182     -3.091300e+02 -4.826200e+02\n0 8183     4.059998e+00 -5.358600e+02\n7 8183     1.141998e+01 -4.245300e+02\n0 8184     7.337000e+02 -5.367300e+02\n7 8184     6.838101e+02 -2.820500e+02\n0 8185     1.703003e+01 -5.399500e+02\n9 8185     2.272500e+02 -3.922100e+02\n0 8186     -6.926001e+01 -5.427000e+02\n4 8186     -6.973600e+02 -3.316900e+02\n7 8186     -5.963000e+01 -4.467400e+02\n9 8186     1.594399e+02 -4.256100e+02\n10 8186     -1.141300e+02 -4.916801e+02\n0 8187     2.316998e+01 -5.484100e+02\n2 8187     3.809900e+02 -6.041899e+02\n7 8187     3.265002e+01 -4.321700e+02\n9 8187     2.382600e+02 -3.951900e+02\n12 8187     1.749600e+02 -5.848800e+02\n0 8188     -7.789900e+02 -5.496300e+02\n4 8188     -5.396900e+02 1.681800e+02\n0 8189     5.079399e+02 -5.519200e+02\n7 8189     4.903000e+02 -3.379500e+02\n12 8189     7.018500e+02 -4.215900e+02\n0 8190     -1.462000e+01 -5.540400e+02\n4 8190     -7.225600e+02 -3.777100e+02\n7 8190     -2.830017e+00 -4.454301e+02\n9 8190     2.121500e+02 -4.122800e+02\n0 8191     5.840500e+02 -5.596700e+02\n7 8191     5.599700e+02 -3.307500e+02\n0 8192     -1.706000e+01 -5.618700e+02\n4 8192     -7.307900e+02 -3.766700e+02\n7 8192     -3.140015e+00 -4.537200e+02\n9 8192     2.168101e+02 -4.184600e+02\n12 8192     1.361600e+02 -6.147800e+02\n0 8193     9.625000e+01 -5.786899e+02\n7 8193     1.116000e+02 -4.460699e+02\n10 8193     7.879999e+01 -5.135900e+02\n0 8194     3.953800e+02 -5.785000e+02\n7 8194     3.944000e+02 -3.848300e+02\n0 8195     -2.902800e+02 -5.793101e+02\n6 8195     -1.458300e+02 -8.007900e+02\n7 8195     -2.749600e+02 -5.310699e+02\n0 8196     5.113000e+01 -5.800100e+02\n4 8196     -7.676700e+02 -4.369600e+02\n7 8196     6.826001e+01 -4.565300e+02\n9 8196     2.835699e+02 -4.046500e+02\n12 8196     2.233000e+02 -6.101700e+02\n0 8197     5.113000e+01 -5.800100e+02\n7 8197     6.826001e+01 -4.565300e+02\n0 8198     5.844600e+02 5.842200e+02\n2 8198     3.291600e+02 4.858500e+02\n3 8198     1.829900e+02 1.490700e+02\n6 8198     2.473700e+02 7.658200e+02\n11 8198     6.486000e+02 -1.628800e+02\n0 8199     -3.157900e+02 5.799700e+02\n2 8199     -6.001100e+02 3.569900e+02\n4 8199     8.027002e+01 -1.890700e+02\n5 8199     1.050400e+02 -6.722998e+01\n8 8199     -4.138200e+02 2.686500e+02\n12 8199     -6.719500e+02 5.657900e+02\n13 8199     -5.647998e+01 2.219400e+02\n0 8200     -2.322200e+02 5.789200e+02\n4 8200     7.429999e+01 -2.339200e+02\n11 8200     -5.744000e+01 -2.023300e+02\n13 8200     9.030029e+00 2.250700e+02\n0 8201     3.804399e+02 5.781400e+02\n2 8201     3.072998e+01 3.471500e+02\n5 8201     7.807900e+02 -5.644000e+01\n6 8201     -8.767001e+01 6.948300e+02\n9 8201     -1.283500e+02 3.768100e+02\n11 8201     4.839200e+02 -1.778900e+02\n13 8201     4.877800e+02 2.597600e+02\n14 8201     6.775900e+02 -1.375200e+02\n0 8202     -4.515500e+02 5.756100e+02\n2 8202     -7.419000e+02 3.558500e+02\n8 8202     -5.289600e+02 2.642600e+02\n11 8202     -2.417900e+02 -2.057300e+02\n13 8202     -1.622400e+02 2.126200e+02\n14 8202     -1.096600e+02 -1.671900e+02\n0 8203     -4.515500e+02 5.756100e+02\n2 8203     -7.419000e+02 3.558500e+02\n8 8203     -5.289600e+02 2.642600e+02\n13 8203     -1.622400e+02 2.126200e+02\n14 8203     -1.096600e+02 -1.671900e+02\n0 8204     9.291998e+01 5.758700e+02\n2 8204     -2.131700e+02 3.447200e+02\n3 8204     -3.460400e+02 1.128003e+01\n4 8204     5.329999e+01 -4.227600e+02\n5 8204     4.968500e+02 -6.883002e+01\n6 8204     -3.906000e+02 6.370900e+02\n9 8204     -3.361200e+02 3.673400e+02\n0 8205     5.939100e+02 5.744700e+02\n6 8205     2.617800e+02 7.576200e+02\n8 8205     3.489300e+02 3.716800e+02\n9 8205     1.430100e+02 5.021600e+02\n0 8206     3.287000e+02 5.698400e+02\n5 8206     7.290100e+02 -6.754999e+01\n8 8206     6.915002e+01 2.655300e+02\n13 8206     4.435300e+02 2.486100e+02\n0 8207     -5.894200e+02 5.691400e+02\n13 8207     -2.697400e+02 2.017300e+02\n14 8207     -2.387800e+02 -1.740500e+02\n0 8208     -5.894200e+02 5.691400e+02\n4 8208     8.903003e+01 -4.831000e+01\n5 8208     -1.547100e+02 -7.988000e+01\n11 8208     -3.541100e+02 -2.123700e+02\n13 8208     -2.697400e+02 2.017300e+02\n14 8208     -2.387800e+02 -1.740500e+02\n0 8209     -4.017400e+02 5.662000e+02\n2 8209     -6.890600e+02 3.424600e+02\n4 8209     7.765002e+01 -1.421000e+02\n5 8209     2.140002e+01 -8.178003e+01\n12 8209     -7.724300e+02 5.363400e+02\n13 8209     -1.238400e+02 2.069800e+02\n14 8209     -6.452002e+01 -1.763500e+02\n0 8210     -1.635600e+02 5.636400e+02\n2 8210     -4.496100e+02 3.346000e+02\n3 8210     -5.742500e+02 4.969971e+00\n4 8210     6.134998e+01 -2.703200e+02\n5 8210     2.492400e+02 -8.527002e+01\n12 8210     -4.947100e+02 5.624100e+02\n13 8210     6.228003e+01 2.151000e+02\n14 8210     1.593000e+02 -1.754300e+02\n0 8211     1.414001e+01 5.629700e+02\n6 8211     -4.756700e+02 6.064100e+02\n8 8211     -1.540300e+02 2.538300e+02\n11 8211     1.562900e+02 -2.093100e+02\n12 8211     -3.003800e+02 5.835400e+02\n0 8212     2.350500e+02 5.621200e+02\n8 8212     7.000000e+00 2.555500e+02\n13 8212     3.734900e+02 2.372800e+02\n0 8213     2.350500e+02 5.621200e+02\n8 8213     7.000000e+00 2.555500e+02\n13 8213     3.734900e+02 2.372800e+02\n0 8214     -4.870000e+02 5.610500e+02\n2 8214     -7.801600e+02 3.388500e+02\n4 8214     8.047998e+01 -9.821002e+01\n11 8214     -2.721500e+02 -2.185200e+02\n0 8215     4.125000e+02 5.601300e+02\n2 8215     5.953003e+01 3.287600e+02\n13 8215     5.140300e+02 2.469000e+02\n14 8215     7.103700e+02 -1.540400e+02\n0 8216     -3.447700e+02 5.576700e+02\n2 8216     -6.290100e+02 3.307900e+02\n0 8217     4.379600e+02 5.571900e+02\n6 8217     -2.428003e+01 6.807100e+02\n9 8217     -8.633002e+01 3.600500e+02\n11 8217     5.393700e+02 -1.923700e+02\n13 8217     5.346600e+02 2.460000e+02\n14 8217     7.358400e+02 -1.555400e+02\n0 8218     5.702100e+02 5.538300e+02\n2 8218     3.214301e+02 4.550200e+02\n3 8218     1.767800e+02 1.200900e+02\n6 8218     2.370500e+02 7.301100e+02\n8 8218     3.321500e+02 3.513400e+02\n11 8218     6.416400e+02 -1.886600e+02\n0 8219     -4.387500e+02 5.498700e+02\n13 8219     -1.530200e+02 1.924700e+02\n0 8220     -5.604300e+02 5.483100e+02\n4 8220     7.848999e+01 -5.996002e+01\n5 8220     -1.310600e+02 -9.815002e+01\n13 8220     -2.485000e+02 1.853800e+02\n14 8220     -2.149300e+02 -1.946300e+02\n0 8221     2.644800e+02 5.474600e+02\n11 8221     3.820100e+02 -2.115600e+02\n14 8221     5.669200e+02 -1.755700e+02\n0 8222     5.200699e+02 5.482500e+02\n6 8222     1.778200e+02 7.085000e+02\n9 8222     8.204999e+01 4.580600e+02\n11 8222     6.004500e+02 -1.982600e+02\n13 8222     6.591600e+02 2.538100e+02\n0 8223     2.139800e+02 5.474400e+02\n4 8223     2.979999e+01 -4.996300e+02\n5 8223     6.155300e+02 -9.433002e+01\n6 8223     -2.552900e+02 6.257800e+02\n8 8223     -6.349976e+00 2.458800e+02\n9 8223     -2.427100e+02 3.441500e+02\n11 8223     3.358600e+02 -2.135500e+02\n12 8223     -8.798999e+01 5.932400e+02\n13 8223     3.574200e+02 2.228900e+02\n0 8224     6.127200e+02 5.471100e+02\n2 8224     3.682100e+02 4.630500e+02\n9 8224     1.662200e+02 4.880600e+02\n11 8224     6.800200e+02 -1.927600e+02\n13 8224     7.489100e+02 2.624700e+02\n0 8225     -3.092500e+02 5.432800e+02\n4 8225     5.956000e+01 -1.887100e+02\n7 8225     -5.428700e+02 5.821100e+02\n11 8225     -1.236500e+02 -2.326800e+02\n12 8225     -6.581200e+02 5.192900e+02\n0 8226     -3.092500e+02 5.432800e+02\n2 8226     -5.932500e+02 3.124800e+02\n4 8226     5.956000e+01 -1.887100e+02\n5 8226     1.076700e+02 -1.057600e+02\n8 8226     -4.075800e+02 2.339400e+02\n12 8226     -6.581200e+02 5.192900e+02\n0 8227     2.122100e+02 5.384900e+02\n2 8227     -1.052400e+02 3.041000e+02\n4 8227     2.435999e+01 -4.977000e+02\n5 8227     6.137300e+02 -1.042800e+02\n6 8227     -2.552800e+02 6.130600e+02\n8 8227     -6.609985e+00 2.359900e+02\n9 8227     -2.425900e+02 3.353400e+02\n11 8227     3.347600e+02 -2.220200e+02\n14 8227     5.174301e+02 -1.873300e+02\n0 8228     -4.453500e+02 5.375400e+02\n2 8228     -7.359200e+02 3.102500e+02\n4 8228     6.570001e+01 -1.167700e+02\n5 8228     -2.334003e+01 -1.095000e+02\n7 8228     -6.855200e+02 5.635400e+02\n8 8228     -5.236100e+02 2.288300e+02\n11 8228     -2.388900e+02 -2.372400e+02\n12 8228     -8.209200e+02 4.963200e+02\n13 8228     -1.590200e+02 1.814500e+02\n14 8228     -1.082800e+02 -2.046000e+02\n0 8229     -1.093600e+02 5.373600e+02\n2 8229     -3.964200e+02 3.028900e+02\n5 8229     2.998600e+02 -1.116200e+02\n0 8230     -1.093600e+02 5.373600e+02\n2 8230     -3.964200e+02 3.028900e+02\n3 8230     -5.234300e+02 -2.703998e+01\n4 8230     4.334003e+01 -2.988100e+02\n5 8230     2.998600e+02 -1.116200e+02\n8 8230     -2.464900e+02 2.301300e+02\n11 8230     4.908002e+01 -2.350700e+02\n12 8230     -4.300100e+02 5.381500e+02\n0 8231     6.726600e+02 5.380800e+02\n9 8231     2.618000e+02 5.379800e+02\n0 8232     6.390200e+02 5.355100e+02\n2 8232     4.433400e+02 5.053000e+02\n3 8232     2.959100e+02 1.687500e+02\n8 8232     4.280200e+02 3.874900e+02\n9 8232     2.327900e+02 5.262300e+02\n11 8232     6.996300e+02 -2.012500e+02\n13 8232     7.978101e+02 2.597900e+02\n0 8233     2.532900e+02 5.354700e+02\n13 8233     3.899700e+02 2.157300e+02\n14 8233     5.588800e+02 -1.878400e+02\n0 8234     6.812600e+02 5.340100e+02\n2 8234     4.867300e+02 5.175300e+02\n3 8234     3.370000e+02 1.806900e+02\n6 8234     4.194400e+02 7.430000e+02\n8 8234     4.635800e+02 3.963200e+02\n9 8234     2.701100e+02 5.376500e+02\n13 8234     8.378400e+02 2.624200e+02\n0 8235     2.374900e+02 5.312500e+02\n3 8235     -2.227300e+02 -3.733002e+01\n9 8235     -2.227600e+02 3.283700e+02\n0 8236     -3.217100e+02 5.245300e+02\n2 8236     -6.054800e+02 2.904600e+02\n4 8236     5.034003e+01 -1.802200e+02\n5 8236     9.353998e+01 -1.246600e+02\n7 8236     -5.531600e+02 5.611200e+02\n8 8236     -4.178800e+02 2.161100e+02\n12 8236     -6.698300e+02 4.946400e+02\n0 8237     -3.217100e+02 5.245300e+02\n5 8237     9.353998e+01 -1.246600e+02\n0 8238     -4.340700e+02 5.215200e+02\n2 8238     -7.236900e+02 2.898900e+02\n4 8238     5.662000e+01 -1.209600e+02\n5 8238     -1.442999e+01 -1.258200e+02\n8 8238     -5.138700e+02 2.126000e+02\n13 8238     -1.504600e+02 1.690800e+02\n14 8238     -9.907001e+01 -2.201400e+02\n0 8239     -3.045200e+02 5.196600e+02\n2 8239     -5.879700e+02 2.849100e+02\n4 8239     4.660999e+01 -1.890100e+02\n7 8239     -5.344100e+02 5.578300e+02\n0 8240     -3.045200e+02 5.196600e+02\n2 8240     -5.879700e+02 2.849100e+02\n4 8240     4.660999e+01 -1.890100e+02\n5 8240     1.097300e+02 -1.297200e+02\n7 8240     -5.344100e+02 5.578300e+02\n8 8240     -4.026500e+02 2.124100e+02\n12 8240     -6.481200e+02 4.916800e+02\n0 8241     -4.428900e+02 5.194700e+02\n2 8241     -7.332600e+02 2.878700e+02\n4 8241     5.616998e+01 -1.160600e+02\n5 8241     -2.334003e+01 -1.280700e+02\n0 8242     -2.093200e+02 5.179400e+02\n2 8242     -4.922200e+02 2.807100e+02\n4 8242     3.915002e+01 -2.405800e+02\n5 8242     2.016400e+02 -1.320400e+02\n7 8242     -4.371800e+02 5.652800e+02\n8 8242     -3.254400e+02 2.109800e+02\n11 8242     -3.796997e+01 -2.529600e+02\n12 8242     -5.388200e+02 5.019700e+02\n0 8243     2.233002e+01 5.118200e+02\n14 8243     3.350800e+02 -2.223600e+02\n0 8244     7.546100e+02 5.115800e+02\n2 8244     5.670900e+02 5.252900e+02\n6 8244     5.112300e+02 7.389700e+02\n8 8244     5.306801e+02 4.023000e+02\n0 8245     -3.214700e+02 5.085300e+02\n2 8245     -6.052800e+02 2.718800e+02\n5 8245     9.208002e+01 -1.410300e+02\n7 8245     -5.504300e+02 5.440100e+02\n0 8246     4.514500e+02 5.093100e+02\n3 8246     -5.160999e+01 -5.521002e+01\n6 8246     -1.570007e+00 6.248900e+02\n9 8246     -6.904999e+01 3.180000e+02\n11 8246     5.592000e+02 -2.331300e+02\n0 8247     -9.799805e-01 5.069800e+02\n2 8247     -2.925500e+02 2.684500e+02\n3 8247     -4.228500e+02 -6.337000e+01\n4 8247     1.914001e+01 -3.601400e+02\n5 8247     4.040200e+02 -1.419700e+02\n6 8247     -4.815200e+02 5.307700e+02\n7 8247     -2.286600e+02 5.752200e+02\n8 8247     -1.606000e+02 2.050400e+02\n9 8247     -4.005000e+02 2.978800e+02\n12 8247     -3.065300e+02 5.170900e+02\n13 8247     1.894399e+02 1.760600e+02\n14 8247     3.126500e+02 -2.282300e+02\n0 8248     5.486300e+02 5.049500e+02\n2 8248     3.103300e+02 4.042000e+02\n3 8248     1.662800e+02 7.151001e+01\n6 8248     2.222400e+02 6.705100e+02\n9 8248     1.172500e+02 4.349000e+02\n11 8248     6.315500e+02 -2.328000e+02\n13 8248     6.922100e+02 2.223100e+02\n0 8249     6.924000e+02 5.050000e+02\n2 8249     5.039900e+02 4.958800e+02\n6 8249     4.379500e+02 7.157000e+02\n9 8249     2.839200e+02 5.196000e+02\n0 8250     7.233300e+02 5.049000e+02\n2 8250     5.347500e+02 5.060300e+02\n3 8250     3.819800e+02 1.700800e+02\n6 8250     4.741400e+02 7.226900e+02\n8 8250     5.043800e+02 3.860700e+02\n9 8250     3.113600e+02 5.285000e+02\n11 8250     7.804600e+02 -2.241000e+02\n0 8251     1.088300e+02 5.042000e+02\n2 8251     -1.923200e+02 2.657500e+02\n6 8251     -3.586600e+02 5.500800e+02\n7 8251     -1.218300e+02 5.837300e+02\n8 8251     -7.917999e+01 2.051700e+02\n9 8251     -3.149300e+02 2.986400e+02\n0 8252     4.523000e+02 5.007700e+02\n13 8252     5.492400e+02 1.999400e+02\n14 8252     7.568600e+02 -2.117700e+02\n0 8253     -6.929300e+02 4.989200e+02\n4 8253     5.340002e+01 2.923999e+01\n5 8253     -3.404700e+02 -1.505500e+02\n0 8254     3.525000e+01 4.969900e+02\n2 8254     -2.579400e+02 2.569600e+02\n3 8254     -3.900900e+02 -7.491998e+01\n4 8254     1.078998e+01 -3.814800e+02\n5 8254     4.395699e+02 -1.522200e+02\n6 8254     -4.386100e+02 5.249300e+02\n7 8254     -1.918700e+02 5.685100e+02\n9 8254     -3.704300e+02 2.884700e+02\n13 8254     2.180699e+02 1.693200e+02\n0 8255     7.367200e+02 4.967000e+02\n2 8255     5.498800e+02 5.021000e+02\n3 8255     3.962300e+02 1.675700e+02\n0 8256     -6.956700e+02 4.939800e+02\n4 8256     5.121997e+01 3.229999e+01\n11 8256     -4.378000e+02 -2.704000e+02\n0 8257     6.519200e+02 4.925100e+02\n2 8257     4.669600e+02 4.711700e+02\n3 8257     3.192500e+02 1.377400e+02\n6 8257     3.938100e+02 6.916400e+02\n9 8257     2.534800e+02 4.967700e+02\n0 8258     1.687000e+01 4.898100e+02\n4 8258     8.059998e+00 -3.692900e+02\n7 8258     -2.094900e+02 5.594700e+02\n11 8258     1.619000e+02 -2.721400e+02\n0 8259     1.687000e+01 4.898100e+02\n2 8259     -2.745500e+02 2.515000e+02\n7 8259     -2.094900e+02 5.594700e+02\n8 8259     -1.465800e+02 1.924600e+02\n11 8259     1.619000e+02 -2.721400e+02\n0 8260     -5.867999e+01 4.872100e+02\n4 8260     1.146002e+01 -3.237900e+02\n5 8260     3.458500e+02 -1.647900e+02\n6 8260     -5.432300e+02 4.920400e+02\n7 8260     -2.832300e+02 5.478400e+02\n8 8260     -2.053200e+02 1.833900e+02\n11 8260     9.521997e+01 -2.762400e+02\n0 8261     1.180300e+02 4.866400e+02\n2 8261     -1.799100e+02 2.494100e+02\n0 8262     8.101500e+02 4.856400e+02\n9 8262     3.874500e+02 5.440700e+02\n0 8263     -3.044100e+02 4.851700e+02\n2 8263     -5.889000e+02 2.424700e+02\n4 8263     2.770001e+01 -1.846600e+02\n5 8263     1.051100e+02 -1.659300e+02\n7 8263     -5.305700e+02 5.205200e+02\n8 8263     -4.037900e+02 1.786500e+02\n12 8263     -6.446900e+02 4.476100e+02\n0 8264     -2.960999e+01 4.845800e+02\n2 8264     -3.180100e+02 2.417700e+02\n3 8264     -4.488700e+02 -8.942999e+01\n6 8264     -5.093700e+02 4.951800e+02\n9 8264     -4.216900e+02 2.734700e+02\n13 8264     1.665300e+02 1.550800e+02\n0 8265     -2.960999e+01 4.845800e+02\n2 8265     -3.180100e+02 2.417700e+02\n4 8265     7.900024e+00 -3.408900e+02\n5 8265     3.754800e+02 -1.660700e+02\n6 8265     -5.093700e+02 4.951800e+02\n8 8265     -1.818500e+02 1.831100e+02\n9 8265     -4.216900e+02 2.734700e+02\n0 8266     1.970100e+02 4.843800e+02\n9 8266     -2.466400e+02 2.826700e+02\n11 8266     3.261200e+02 -2.694100e+02\n0 8267     5.065400e+02 4.842100e+02\n6 8267     1.749100e+02 6.331800e+02\n0 8268     5.065400e+02 4.842100e+02\n2 8268     2.683000e+02 3.689700e+02\n3 8268     1.262300e+02 3.746002e+01\n6 8268     1.749100e+02 6.331800e+02\n8 8268     2.890500e+02 2.811200e+02\n13 8268     6.532200e+02 2.007300e+02\n0 8269     6.868900e+02 4.835000e+02\n2 8269     5.044800e+02 4.767000e+02\n3 8269     3.545800e+02 1.429000e+02\n6 8269     4.370400e+02 6.923200e+02\n8 8269     4.779301e+02 3.648900e+02\n9 8269     2.850200e+02 5.027600e+02\n13 8269     8.493600e+02 2.239200e+02\n0 8270     5.284600e+02 4.809400e+02\n6 8270     2.022100e+02 6.370300e+02\n9 8270     1.035900e+02 4.083100e+02\n0 8271     5.284600e+02 4.809400e+02\n6 8271     2.022100e+02 6.370300e+02\n9 8271     1.035900e+02 4.083100e+02\n0 8272     -9.908002e+01 4.802400e+02\n2 8272     -3.833500e+02 2.373000e+02\n3 8272     -5.116200e+02 -9.320001e+01\n4 8272     9.849976e+00 -2.995400e+02\n5 8272     3.064700e+02 -1.722600e+02\n7 8272     -3.214600e+02 5.369800e+02\n8 8272     -2.355400e+02 1.783300e+02\n11 8272     5.959998e+01 -2.832900e+02\n13 8272     1.125200e+02 1.478300e+02\n14 8272     2.181000e+02 -2.596600e+02\n0 8273     -5.433002e+01 4.789200e+02\n4 8273     6.440002e+00 -3.256800e+02\n5 8273     3.503600e+02 -1.732100e+02\n6 8273     -5.366200e+02 4.815000e+02\n11 8273     9.946997e+01 -2.832800e+02\n0 8274     7.865900e+02 4.789600e+02\n2 8274     6.027300e+02 5.049200e+02\n3 8274     4.452100e+02 1.703300e+02\n6 8274     5.516700e+02 7.110600e+02\n8 8274     5.606400e+02 3.849200e+02\n0 8275     -5.560100e+02 4.769200e+02\n5 8275     -1.382200e+02 -1.702100e+02\n7 8275     -7.953300e+02 4.858100e+02\n11 8275     -3.356000e+02 -2.867200e+02\n13 8275     -2.485700e+02 1.259500e+02\n14 8275     -2.203900e+02 -2.662600e+02\n0 8276     2.404000e+02 4.759100e+02\n2 8276     -7.346002e+01 2.355200e+02\n5 8276     6.437200e+02 -1.695100e+02\n6 8276     -2.130000e+02 5.397300e+02\n7 8276     6.719971e+00 5.678800e+02\n9 8276     -2.126500e+02 2.762900e+02\n11 8276     3.667100e+02 -2.749600e+02\n13 8276     3.805300e+02 1.636700e+02\n14 8276     5.486300e+02 -2.505000e+02\n0 8277     -3.542100e+02 4.753200e+02\n2 8277     -6.384600e+02 2.310700e+02\n5 8277     5.722998e+01 -1.750700e+02\n0 8278     -3.542100e+02 4.753200e+02\n2 8278     -6.384600e+02 2.310700e+02\n5 8278     5.722998e+01 -1.750700e+02\n0 8279     2.039600e+02 4.751400e+02\n3 8279     -2.450100e+02 -9.798999e+01\n4 8279     -1.350000e+01 -4.874100e+02\n5 8279     6.057200e+02 -1.713600e+02\n6 8279     -2.527000e+02 5.316400e+02\n7 8279     -2.834003e+01 5.638300e+02\n8 8279     -7.159973e+00 1.812800e+02\n11 8279     3.327400e+02 -2.769200e+02\n13 8279     3.509800e+02 1.610700e+02\n0 8280     1.003003e+01 4.743400e+02\n4 8280     -7.999878e-01 -3.636900e+02\n5 8280     4.133900e+02 -1.765500e+02\n6 8280     -4.633000e+02 4.902500e+02\n7 8280     -2.139500e+02 5.426000e+02\n8 8280     -1.508400e+02 1.748900e+02\n11 8280     1.568700e+02 -2.855300e+02\n13 8280     1.982400e+02 1.487500e+02\n14 8280     3.234301e+02 -2.618100e+02\n0 8281     -9.460999e+01 4.719600e+02\n2 8281     -3.784300e+02 2.271800e+02\n3 8281     -5.076200e+02 -1.029400e+02\n4 8281     5.380005e+00 -3.016500e+02\n5 8281     3.104399e+02 -1.805300e+02\n6 8281     -5.814600e+02 4.656500e+02\n7 8281     -3.161600e+02 5.292400e+02\n8 8281     -2.317800e+02 1.703800e+02\n11 8281     6.366998e+01 -2.902800e+02\n12 8281     -4.022800e+02 4.620600e+02\n13 8281     1.158300e+02 1.411600e+02\n14 8281     2.221600e+02 -2.675100e+02\n0 8282     -4.205700e+02 4.709400e+02\n4 8282     2.889001e+01 -1.251600e+02\n5 8282     -6.059998e+00 -1.787300e+02\n8 8282     -4.998700e+02 1.641900e+02\n0 8283     -1.871300e+02 4.704400e+02\n2 8283     -4.677800e+02 2.255300e+02\n4 8283     1.096002e+01 -2.485500e+02\n5 8283     2.200300e+02 -1.819400e+02\n7 8283     -4.079500e+02 5.179700e+02\n11 8283     -1.820001e+01 -2.931600e+02\n12 8283     -5.053700e+02 4.472500e+02\n13 8283     4.303003e+01 1.354200e+02\n14 8283     1.331000e+02 -2.710400e+02\n0 8284     -1.039500e+02 4.694600e+02\n2 8284     -3.870600e+02 2.241400e+02\n3 8284     -5.158300e+02 -1.060100e+02\n5 8284     3.014301e+02 -1.829200e+02\n7 8284     -3.248300e+02 5.256300e+02\n0 8285     -1.039500e+02 4.694600e+02\n2 8285     -3.870600e+02 2.241400e+02\n3 8285     -5.158300e+02 -1.060100e+02\n7 8285     -3.248300e+02 5.256300e+02\n0 8286     -1.039500e+02 4.694600e+02\n4 8286     4.320007e+00 -2.958300e+02\n5 8286     3.014301e+02 -1.829200e+02\n7 8286     -3.248300e+02 5.256300e+02\n8 8286     -2.387400e+02 1.671600e+02\n0 8287     -5.339600e+02 4.680400e+02\n4 8287     3.515002e+01 -6.388000e+01\n0 8288     -8.840997e+01 4.635400e+02\n2 8288     -3.724400e+02 2.167900e+02\n3 8288     -5.018200e+02 -1.132800e+02\n7 8288     -3.099900e+02 5.204500e+02\n11 8288     6.895001e+01 -2.976000e+02\n0 8289     1.478998e+01 4.635300e+02\n2 8289     -2.743900e+02 2.178800e+02\n4 8289     -7.700012e+00 -3.654400e+02\n5 8289     4.175300e+02 -1.881100e+02\n6 8289     -4.559800e+02 4.761500e+02\n7 8289     -2.082300e+02 5.319700e+02\n8 8289     -1.464100e+02 1.649300e+02\n9 8289     -3.830000e+02 2.545700e+02\n12 8289     -2.826500e+02 4.672300e+02\n13 8289     2.020200e+02 1.393100e+02\n14 8289     3.277800e+02 -2.737500e+02\n0 8290     -2.265700e+02 4.619100e+02\n4 8290     9.150024e+00 -2.258000e+02\n5 8290     1.807300e+02 -1.908800e+02\n7 8290     -4.468500e+02 5.043900e+02\n8 8290     -3.372700e+02 1.601600e+02\n11 8290     -5.356000e+01 -3.005900e+02\n12 8290     -5.486800e+02 4.306200e+02\n0 8291     -5.270900e+02 4.607000e+02\n4 8291     3.075000e+01 -6.597998e+01\n5 8291     -1.126000e+02 -1.873000e+02\n7 8291     -7.607500e+02 4.707200e+02\n13 8291     -2.267700e+02 1.131300e+02\n14 8291     -1.955900e+02 -2.830600e+02\n0 8292     7.849900e+02 4.610200e+02\n9 8292     3.698400e+02 5.153400e+02\n0 8293     4.989500e+02 4.593400e+02\n2 8293     2.656200e+02 3.444000e+02\n3 8293     1.239600e+02 1.400000e+01\n6 8293     1.700700e+02 6.053400e+02\n8 8293     2.861300e+02 2.620200e+02\n9 8293     8.022998e+01 3.807100e+02\n11 8293     5.953700e+02 -2.747700e+02\n12 8293     2.812900e+02 5.921600e+02\n13 8293     6.484100e+02 1.802200e+02\n0 8294     -5.054999e+01 4.556200e+02\n13 8294     1.549800e+02 1.301300e+02\n14 8294     2.696899e+02 -2.829300e+02\n0 8295     1.421002e+01 4.531000e+02\n2 8295     -2.741200e+02 2.051400e+02\n4 8295     -1.378003e+01 -3.641300e+02\n5 8295     4.168101e+02 -1.989100e+02\n6 8295     -4.545100e+02 4.628700e+02\n7 8295     -2.073400e+02 5.206200e+02\n8 8295     -1.460400e+02 1.547600e+02\n9 8295     -3.821900e+02 2.435100e+02\n11 8295     1.612500e+02 -3.042300e+02\n13 8295     2.016000e+02 1.294800e+02\n14 8295     3.272400e+02 -2.851700e+02\n0 8296     7.919900e+02 4.531900e+02\n2 8296     6.136899e+02 4.843900e+02\n6 8296     5.636200e+02 6.858700e+02\n0 8297     8.426300e+02 4.518500e+02\n2 8297     6.616400e+02 4.996000e+02\n3 8297     4.996899e+02 1.661300e+02\n9 8297     4.175699e+02 5.255600e+02\n0 8298     8.705601e+02 4.518000e+02\n2 8298     6.895500e+02 5.112100e+02\n3 8298     5.245300e+02 1.768200e+02\n9 8298     4.402800e+02 5.358000e+02\n0 8299     -6.833500e+02 4.497000e+02\n4 8299     2.650000e+01 3.364001e+01\n5 8299     -3.547600e+02 -2.027600e+02\n13 8299     -4.205400e+02 8.617999e+01\n14 8299     -4.319900e+02 -3.027600e+02\n0 8300     5.021000e+02 4.474000e+02\n2 8300     2.719900e+02 3.327300e+02\n3 8300     1.304700e+02 3.049988e+00\n8 8300     2.910300e+02 2.518800e+02\n9 8300     8.609998e+01 3.723100e+02\n11 8300     6.000800e+02 -2.867200e+02\n12 8300     2.876600e+02 5.779700e+02\n13 8300     6.526100e+02 1.697700e+02\n0 8301     5.021000e+02 4.474000e+02\n2 8301     2.719900e+02 3.327300e+02\n3 8301     1.304700e+02 3.049988e+00\n6 8301     1.764600e+02 5.925400e+02\n8 8301     2.910300e+02 2.518800e+02\n9 8301     8.609998e+01 3.723100e+02\n11 8301     6.000800e+02 -2.867200e+02\n12 8301     2.876600e+02 5.779700e+02\n13 8301     6.526100e+02 1.697700e+02\n0 8302     5.237400e+02 4.469900e+02\n2 8302     2.965900e+02 3.409900e+02\n3 8302     1.541800e+02 1.146002e+01\n8 8302     3.110200e+02 2.579600e+02\n9 8302     1.070400e+02 3.804700e+02\n0 8303     3.499756e-01 4.453000e+02\n2 8303     -2.861300e+02 1.965200e+02\n4 8303     -1.684003e+01 -3.556100e+02\n5 8303     4.034900e+02 -2.071900e+02\n6 8303     -4.680100e+02 4.510300e+02\n7 8303     -2.194800e+02 5.118400e+02\n9 8303     -3.918500e+02 2.351000e+02\n11 8303     1.494800e+02 -3.118700e+02\n12 8303     -2.937500e+02 4.450600e+02\n13 8303     1.909301e+02 1.230200e+02\n14 8303     3.140000e+02 -2.932100e+02\n0 8304     1.358002e+01 4.450400e+02\n2 8304     -2.741200e+02 1.972100e+02\n3 8304     -4.071500e+02 -1.332400e+02\n4 8304     -1.803003e+01 -3.633400e+02\n5 8304     4.158400e+02 -2.074000e+02\n6 8304     -4.536400e+02 4.532100e+02\n7 8304     -2.068900e+02 5.129300e+02\n8 8304     -1.460100e+02 1.487100e+02\n11 8304     1.611700e+02 -3.115500e+02\n12 8304     -2.805600e+02 4.462300e+02\n13 8304     2.012200e+02 1.240300e+02\n14 8304     3.266600e+02 -2.925300e+02\n0 8305     -3.155000e+02 4.390100e+02\n7 8305     -5.348000e+02 4.705000e+02\n11 8305     -1.314500e+02 -3.205200e+02\n12 8305     -6.482700e+02 3.891700e+02\n13 8305     -5.938000e+01 1.030700e+02\n0 8306     -2.017400e+02 4.392600e+02\n4 8306     -5.710022e+00 -2.373100e+02\n5 8306     2.030800e+02 -2.151400e+02\n7 8306     -4.188300e+02 4.832800e+02\n11 8306     -3.159003e+01 -3.210500e+02\n0 8307     -2.054800e+02 4.331000e+02\n7 8307     -4.214700e+02 4.763100e+02\n11 8307     -3.464001e+01 -3.259900e+02\n0 8308     -2.274300e+02 4.323200e+02\n2 8308     -5.066200e+02 1.786200e+02\n4 8308     -7.330017e+00 -2.224600e+02\n5 8308     1.773700e+02 -2.221000e+02\n7 8308     -4.437700e+02 4.733700e+02\n8 8308     -3.360100e+02 1.301100e+02\n11 8308     -5.419000e+01 -3.265000e+02\n12 8308     -5.448700e+02 3.944000e+02\n14 8308     9.246002e+01 -3.115200e+02\n0 8309     -3.135500e+02 4.244500e+02\n2 8309     -5.949000e+02 1.682100e+02\n4 8309     -5.049988e+00 -1.744800e+02\n5 8309     9.198999e+01 -2.300400e+02\n7 8309     -5.304100e+02 4.552500e+02\n8 8309     -4.076900e+02 1.205500e+02\n12 8309     -6.421400e+02 3.716000e+02\n14 8309     7.539978e+00 -3.213000e+02\n0 8310     -4.150600e+02 4.214000e+02\n5 8310     -8.919983e+00 -2.308400e+02\n0 8311     -2.260500e+02 4.200200e+02\n2 8311     -5.055200e+02 1.640400e+02\n5 8311     1.772300e+02 -2.348800e+02\n7 8311     -4.414400e+02 4.612500e+02\n8 8311     -3.354300e+02 1.190100e+02\n11 8311     -5.383002e+01 -3.365700e+02\n12 8311     -5.420700e+02 3.811200e+02\n13 8311     1.096997e+01 9.054999e+01\n14 8311     9.171002e+01 -3.247000e+02\n0 8312     -4.428400e+02 4.191200e+02\n2 8312     -7.311700e+02 1.624600e+02\n5 8312     -3.459003e+01 -2.323700e+02\n8 8312     -5.203500e+02 1.129100e+02\n10 8312     -6.751100e+02 6.021800e+02\n12 8312     -7.945400e+02 3.466500e+02\n13 8312     -1.620000e+02 8.123001e+01\n0 8313     -2.481200e+02 4.186800e+02\n7 8313     -4.630900e+02 4.567900e+02\n10 8313     -4.354600e+02 6.169400e+02\n11 8313     -7.335999e+01 -3.384300e+02\n13 8313     -6.210022e+00 8.801001e+01\n14 8313     7.040997e+01 -3.267200e+02\n0 8314     -1.135900e+02 4.193100e+02\n2 8314     -3.938000e+02 1.636700e+02\n4 8314     -2.360999e+01 -2.854000e+02\n5 8314     2.884600e+02 -2.364300e+02\n7 8314     -3.281400e+02 4.726000e+02\n8 8314     -2.436700e+02 1.207200e+02\n13 8314     1.005700e+02 9.522000e+01\n14 8314     2.019900e+02 -3.234100e+02\n0 8315     -3.940600e+02 4.158200e+02\n2 8315     -6.809700e+02 1.576200e+02\n5 8315     1.090002e+01 -2.368800e+02\n12 8315     -7.373600e+02 3.487000e+02\n0 8316     -3.940600e+02 4.158200e+02\n2 8316     -6.809700e+02 1.576200e+02\n5 8316     1.090002e+01 -2.368800e+02\n12 8316     -7.373600e+02 3.487000e+02\n0 8317     -2.384300e+02 4.162500e+02\n2 8317     -5.162800e+02 1.608100e+02\n0 8318     -2.384300e+02 4.162500e+02\n2 8318     -5.162800e+02 1.608100e+02\n7 8318     -4.521200e+02 4.568400e+02\n8 8318     -3.438000e+02 1.167200e+02\n11 8318     -6.365002e+01 -3.391000e+02\n12 8318     -5.536000e+02 3.773100e+02\n0 8319     -3.550700e+02 4.155500e+02\n2 8319     -6.387000e+02 1.561200e+02\n4 8319     -6.840027e+00 -1.508800e+02\n5 8319     4.953003e+01 -2.391600e+02\n7 8319     -5.718800e+02 4.409800e+02\n11 8319     -1.672300e+02 -3.412300e+02\n12 8319     -6.901900e+02 3.532800e+02\n13 8319     -9.145001e+01 8.048999e+01\n0 8320     6.661700e+02 4.126200e+02\n2 8320     5.016500e+02 4.064100e+02\n3 8320     3.541899e+02 7.792999e+01\n6 8320     4.298900e+02 6.103700e+02\n8 8320     4.747600e+02 3.042700e+02\n9 8320     2.840699e+02 4.423400e+02\n11 8320     7.505000e+02 -3.098600e+02\n12 8320     5.123000e+02 6.175300e+02\n13 8320     8.381000e+02 1.636700e+02\n0 8321     -2.917500e+02 4.095200e+02\n2 8321     -5.702200e+02 1.522300e+02\n5 8321     1.128500e+02 -2.477900e+02\n8 8321     -3.879500e+02 1.064700e+02\n0 8322     -2.434300e+02 4.015100e+02\n13 8322     -2.630005e+00 7.359003e+01\n0 8323     6.104900e+02 4.009400e+02\n2 8323     4.464301e+02 3.753500e+02\n3 8323     3.025300e+02 4.778003e+01\n6 8323     3.654400e+02 5.824900e+02\n7 8323     4.081600e+02 5.692600e+02\n8 8323     4.286600e+02 2.800100e+02\n11 8323     7.011700e+02 -3.240700e+02\n12 8323     4.510400e+02 5.875400e+02\n13 8323     7.854600e+02 1.482200e+02\n0 8324     6.044600e+02 3.990900e+02\n2 8324     4.408000e+02 3.717900e+02\n3 8324     2.973199e+02 4.403003e+01\n6 8324     3.588300e+02 5.792100e+02\n7 8324     4.026100e+02 5.671900e+02\n8 8324     4.242700e+02 2.778100e+02\n9 8324     2.329100e+02 4.114200e+02\n11 8324     6.956600e+02 -3.258400e+02\n12 8324     4.448800e+02 5.849000e+02\n13 8324     7.799700e+02 1.464700e+02\n0 8325     -1.005800e+02 3.954000e+02\n2 8325     -3.790500e+02 1.351800e+02\n3 8325     -5.110000e+02 -1.961200e+02\n4 8325     -3.854999e+01 -2.908600e+02\n5 8325     3.000400e+02 -2.626100e+02\n6 8325     -5.739900e+02 3.625800e+02\n7 8325     -3.121500e+02 4.491300e+02\n8 8325     -2.319300e+02 9.807001e+01\n9 8325     -4.690500e+02 1.781700e+02\n12 8325     -3.958800e+02 3.687500e+02\n14 8325     2.144200e+02 -3.487400e+02\n0 8326     -3.092900e+02 3.920100e+02\n2 8326     -5.895700e+02 1.274100e+02\n5 8326     9.226001e+01 -2.647400e+02\n8 8326     -4.042100e+02 8.835001e+01\n12 8326     -6.316700e+02 3.316300e+02\n0 8327     -3.092900e+02 3.920100e+02\n2 8327     -5.895700e+02 1.274100e+02\n4 8327     -2.388000e+01 -1.737700e+02\n5 8327     9.226001e+01 -2.647400e+02\n7 8327     -5.204800e+02 4.210400e+02\n12 8327     -6.316700e+02 3.316300e+02\n13 8327     -5.397998e+01 6.201001e+01\n14 8327     1.045001e+01 -3.562800e+02\n0 8328     -3.111500e+02 3.861000e+02\n2 8328     -5.923200e+02 1.199900e+02\n7 8328     -5.234400e+02 4.150600e+02\n10 8328     -5.068500e+02 5.721000e+02\n0 8329     -3.111500e+02 3.861000e+02\n2 8329     -5.923200e+02 1.199900e+02\n4 8329     -2.647998e+01 -1.707800e+02\n7 8329     -5.234400e+02 4.150600e+02\n10 8329     -5.068500e+02 5.721000e+02\n11 8329     -1.302300e+02 -3.671100e+02\n0 8330     1.965997e+01 3.851000e+02\n2 8330     -2.630400e+02 1.253100e+02\n5 8330     4.204800e+02 -2.730400e+02\n8 8330     -1.370600e+02 9.185999e+01\n12 8330     -2.629100e+02 3.747400e+02\n13 8330     2.067300e+02 7.209998e+01\n14 8330     3.327100e+02 -3.575300e+02\n0 8331     1.965997e+01 3.851000e+02\n2 8331     -2.630400e+02 1.253100e+02\n4 8331     -5.463000e+01 -3.623000e+02\n5 8331     4.204800e+02 -2.730400e+02\n6 8331     -4.352900e+02 3.751900e+02\n7 8331     -1.929100e+02 4.519600e+02\n9 8331     -3.690200e+02 1.733900e+02\n10 8331     -1.100900e+02 6.012900e+02\n11 8331     1.708800e+02 -3.647300e+02\n12 8331     -2.629100e+02 3.747400e+02\n13 8331     2.067300e+02 7.209998e+01\n14 8331     3.327100e+02 -3.575300e+02\n0 8332     -5.495000e+02 3.840800e+02\n7 8332     -7.732600e+02 3.850000e+02\n14 8332     -2.275800e+02 -3.630200e+02\n0 8333     -3.219600e+02 3.834900e+02\n4 8333     -2.690997e+01 -1.653200e+02\n5 8333     7.873999e+01 -2.735400e+02\n7 8333     -5.333100e+02 4.113400e+02\n10 8333     -5.196600e+02 5.674200e+02\n11 8333     -1.392300e+02 -3.685300e+02\n12 8333     -6.459800e+02 3.193700e+02\n13 8333     -6.575000e+01 5.507001e+01\n0 8334     5.326500e+02 3.812100e+02\n2 8334     3.226801e+02 2.819500e+02\n3 8334     1.808600e+02 -4.457001e+01\n6 8334     2.334400e+02 5.252900e+02\n7 8334     3.218199e+02 5.283200e+02\n8 8334     3.317000e+02 2.095100e+02\n9 8334     1.307800e+02 3.303900e+02\n11 8334     6.400900e+02 -3.462700e+02\n12 8334     3.393500e+02 5.173300e+02\n13 8334     6.894399e+02 1.182200e+02\n0 8335     -4.870600e+02 3.793500e+02\n5 8335     -8.620001e+01 -2.747100e+02\n8 8335     -5.599700e+02 7.244000e+01\n11 8335     -2.843800e+02 -3.709800e+02\n0 8336     -4.870600e+02 3.793500e+02\n8 8336     -5.599700e+02 7.244000e+01\n11 8336     -2.843800e+02 -3.709800e+02\n0 8337     5.455000e+02 3.728900e+02\n2 8337     3.424600e+02 2.790600e+02\n6 8337     2.535000e+02 5.190700e+02\n7 8337     3.359399e+02 5.223600e+02\n8 8337     3.466600e+02 2.066900e+02\n9 8337     1.451400e+02 3.282700e+02\n13 8337     7.054000e+02 1.118300e+02\n0 8338     -2.176300e+02 3.683400e+02\n2 8338     -4.940700e+02 9.772998e+01\n4 8338     -4.454999e+01 -2.213800e+02\n5 8338     1.811000e+02 -2.924000e+02\n7 8338     -4.249900e+02 4.063000e+02\n8 8338     -3.251700e+02 6.762000e+01\n11 8338     -4.632001e+01 -3.835300e+02\n12 8338     -5.221700e+02 3.157600e+02\n0 8339     5.537000e+02 3.676700e+02\n6 8339     2.638200e+02 5.161700e+02\n7 8339     3.446300e+02 5.189500e+02\n11 8339     6.620100e+02 -3.578600e+02\n0 8340     6.726100e+02 3.643600e+02\n2 8340     5.214600e+02 3.647200e+02\n3 8340     3.744399e+02 3.919000e+01\n7 8340     4.743300e+02 5.431200e+02\n11 8340     7.685400e+02 -3.566700e+02\n0 8341     5.614000e+02 3.623000e+02\n3 8341     2.172700e+02 -4.982001e+01\n6 8341     2.757000e+02 5.128900e+02\n7 8341     3.529800e+02 5.150600e+02\n9 8341     1.630500e+02 3.260400e+02\n12 8341     3.780100e+02 5.066000e+02\n0 8342     5.477700e+02 3.612900e+02\n3 8342     2.023900e+02 -5.650000e+01\n6 8342     2.575600e+02 5.069000e+02\n7 8342     3.394500e+02 5.118300e+02\n8 8342     3.491700e+02 1.986900e+02\n9 8342     1.500800e+02 3.196700e+02\n11 8342     6.578000e+02 -3.643300e+02\n12 8342     3.613700e+02 4.998900e+02\n13 8342     7.065000e+02 1.028700e+02\n0 8343     -4.602100e+02 3.582700e+02\n10 8343     -6.865000e+02 5.249800e+02\n13 8343     -1.760100e+02 2.770001e+01\n15 8343     -7.060200e+02 5.680100e+02\n0 8344     4.934000e+02 3.566500e+02\n2 8344     2.810100e+02 2.422600e+02\n3 8344     1.432500e+02 -8.483002e+01\n6 8344     1.887300e+02 4.842200e+02\n9 8344     9.812000e+01 2.938600e+02\n10 8344     4.477200e+02 6.177300e+02\n11 8344     6.079200e+02 -3.712900e+02\n12 8344     2.987700e+02 4.764800e+02\n0 8345     8.403600e+02 3.565800e+02\n2 8345     6.850800e+02 4.198600e+02\n0 8346     -6.951500e+02 3.559300e+02\n13 8346     -4.274700e+02 4.820007e+00\n14 8346     -4.512300e+02 -4.028800e+02\n0 8347     5.539100e+02 3.530600e+02\n2 8347     3.536500e+02 2.636900e+02\n3 8347     2.113700e+02 -6.070001e+01\n6 8347     2.682900e+02 5.018900e+02\n7 8347     3.468101e+02 5.049400e+02\n9 8347     1.578400e+02 3.157400e+02\n12 8347     3.713500e+02 4.957400e+02\n13 8347     7.135699e+02 9.698999e+01\n0 8348     5.539100e+02 3.530600e+02\n2 8348     3.536500e+02 2.636900e+02\n3 8348     2.113700e+02 -6.070001e+01\n7 8348     3.468101e+02 5.049400e+02\n9 8348     1.578400e+02 3.157400e+02\n11 8348     6.653800e+02 -3.699800e+02\n12 8348     3.713500e+02 4.957400e+02\n13 8348     7.135699e+02 9.698999e+01\n0 8349     6.652800e+02 3.527900e+02\n2 8349     5.167300e+02 3.526800e+02\n3 8349     3.703500e+02 2.814001e+01\n6 8349     4.438800e+02 5.465900e+02\n7 8349     4.689200e+02 5.319400e+02\n8 8349     4.867800e+02 2.600900e+02\n9 8349     2.981000e+02 3.971100e+02\n11 8349     7.643900e+02 -3.668800e+02\n12 8349     5.261500e+02 5.549800e+02\n13 8349     8.450200e+02 1.148000e+02\n0 8350     -5.630000e+02 3.475200e+02\n4 8350     -2.648999e+01 -3.392999e+01\n5 8350     -1.658700e+02 -3.064500e+02\n11 8350     -3.533800e+02 -3.973500e+02\n0 8351     -5.630000e+02 3.475200e+02\n4 8351     -2.648999e+01 -3.392999e+01\n5 8351     -1.658700e+02 -3.064500e+02\n11 8351     -3.533800e+02 -3.973500e+02\n13 8351     -2.628100e+02 1.200000e+01\n0 8352     -4.115200e+02 3.466400e+02\n4 8352     -4.006000e+01 -1.127100e+02\n7 8352     -6.204700e+02 3.617200e+02\n8 8352     -4.913700e+02 3.954001e+01\n11 8352     -2.198100e+02 -4.004700e+02\n15 8352     -6.345100e+02 5.577700e+02\n0 8353     -3.600400e+02 3.467400e+02\n2 8353     -6.422700e+02 6.757001e+01\n4 8353     -4.459998e+01 -1.406200e+02\n8 8353     -4.459700e+02 4.070001e+01\n10 8353     -5.606900e+02 5.184200e+02\n12 8353     -6.846500e+02 2.668700e+02\n15 8353     -5.627400e+02 5.646900e+02\n0 8354     7.784500e+02 3.469900e+02\n6 8354     5.752500e+02 5.734700e+02\n7 8354     5.783000e+02 5.453800e+02\n8 8354     5.816600e+02 2.890500e+02\n9 8354     3.933900e+02 4.319700e+02\n12 8354     6.542700e+02 5.870300e+02\n0 8355     -5.533100e+02 3.444600e+02\n4 8355     -2.895001e+01 -3.865997e+01\n5 8355     -1.570800e+02 -3.101700e+02\n7 8355     -7.712200e+02 3.413400e+02\n10 8355     -8.016800e+02 5.008200e+02\n11 8355     -3.449000e+02 -3.998200e+02\n13 8355     -2.539100e+02 1.179999e+01\n15 8355     -8.345400e+02 5.364500e+02\n0 8356     8.242000e+02 3.419200e+02\n3 8356     5.167000e+02 7.734003e+01\n7 8356     6.221700e+02 5.476800e+02\n12 8356     7.059000e+02 5.965500e+02\n0 8357     8.242000e+02 3.419200e+02\n2 8357     6.746801e+02 4.015600e+02\n3 8357     5.167000e+02 7.734003e+01\n7 8357     6.221700e+02 5.476800e+02\n9 8357     4.303600e+02 4.429000e+02\n12 8357     7.059000e+02 5.965500e+02\n0 8358     8.579900e+02 3.414000e+02\n2 8358     7.060400e+02 4.125700e+02\n7 8358     6.533199e+02 5.521000e+02\n9 8358     4.564399e+02 4.517200e+02\n0 8359     3.695900e+02 3.310400e+02\n6 8359     1.150024e+00 4.034600e+02\n0 8360     -3.484100e+02 3.274000e+02\n7 8360     -5.529500e+02 3.483500e+02\n10 8360     -5.440400e+02 4.963500e+02\n11 8360     -1.658200e+02 -4.193200e+02\n13 8360     -8.869000e+01 4.619995e+00\n14 8360     -3.514001e+01 -4.266800e+02\n15 8360     -5.438300e+02 5.389900e+02\n0 8361     -1.738900e+02 3.214000e+02\n2 8361     -4.471900e+02 4.069000e+01\n7 8361     -3.747600e+02 3.634500e+02\n15 8361     -2.985800e+02 5.531000e+02\n0 8362     -5.491900e+02 3.195800e+02\n4 8362     -4.216998e+01 -3.788000e+01\n11 8362     -3.435200e+02 -4.220000e+02\n13 8362     -2.519400e+02 -8.770020e+00\n15 8362     -8.244400e+02 5.024500e+02\n0 8363     -5.015200e+02 3.187600e+02\n7 8363     -7.118500e+02 3.204100e+02\n10 8363     -7.320700e+02 4.730500e+02\n13 8363     -2.132700e+02 -8.539978e+00\n14 8363     -1.901200e+02 -4.349100e+02\n15 8363     -7.565400e+02 5.070400e+02\n0 8364     -4.609800e+02 3.141800e+02\n7 8364     -6.699900e+02 3.187100e+02\n10 8364     -6.804100e+02 4.708200e+02\n12 8364     -8.055000e+02 2.034500e+02\n15 8364     -6.977800e+02 5.051700e+02\n0 8365     -4.513900e+02 3.144700e+02\n7 8365     -6.601200e+02 3.201100e+02\n11 8365     -2.576400e+02 -4.292100e+02\n12 8365     -7.936800e+02 2.059500e+02\n15 8365     -6.847400e+02 5.068800e+02\n0 8366     -6.684500e+02 3.111900e+02\n13 8366     -3.934700e+02 -3.037000e+01\n14 8366     -4.142000e+02 -4.497300e+02\n0 8367     6.136500e+02 3.062500e+02\n2 8367     4.744000e+02 2.890800e+02\n3 8367     3.317600e+02 -3.294000e+01\n6 8367     3.930900e+02 4.806700e+02\n7 8367     4.241300e+02 4.785400e+02\n8 8367     4.508600e+02 2.088800e+02\n9 8367     2.631400e+02 3.417500e+02\n10 8367     5.966300e+02 5.679100e+02\n13 8367     7.996500e+02 7.025000e+01\n0 8368     6.136500e+02 3.062500e+02\n2 8368     4.744000e+02 2.890800e+02\n3 8368     3.317600e+02 -3.294000e+01\n6 8368     3.930900e+02 4.806700e+02\n7 8368     4.241300e+02 4.785400e+02\n8 8368     4.508600e+02 2.088800e+02\n9 8368     2.631400e+02 3.417500e+02\n10 8368     5.966300e+02 5.679100e+02\n11 8368     7.255300e+02 -4.147500e+02\n12 8368     4.780601e+02 4.882400e+02\n13 8368     7.996500e+02 7.025000e+01\n0 8369     6.709800e+02 3.054900e+02\n7 8369     4.802900e+02 4.875000e+02\n9 8369     3.141400e+02 3.630100e+02\n10 8369     6.648700e+02 5.728400e+02\n12 8369     5.440699e+02 5.071900e+02\n0 8370     7.767300e+02 3.037800e+02\n2 8370     6.411801e+02 3.518600e+02\n3 8370     4.883101e+02 3.096997e+01\n6 8370     5.848199e+02 5.273400e+02\n7 8370     5.824700e+02 5.037800e+02\n8 8370     5.903700e+02 2.569200e+02\n9 8370     4.029301e+02 3.999100e+02\n10 8370     7.923500e+02 5.844400e+02\n12 8370     6.633900e+02 5.404400e+02\n0 8371     6.148400e+02 3.004100e+02\n2 8371     4.771500e+02 2.833400e+02\n6 8371     3.955200e+02 4.740000e+02\n7 8371     4.258700e+02 4.722400e+02\n8 8371     4.530200e+02 2.040100e+02\n9 8371     2.658000e+02 3.367800e+02\n10 8371     5.983400e+02 5.605700e+02\n11 8371     7.274500e+02 -4.200600e+02\n12 8371     4.801899e+02 4.814500e+02\n13 8371     8.009301e+02 6.506000e+01\n0 8372     7.825400e+02 3.010500e+02\n8 8372     5.954900e+02 2.562900e+02\n0 8373     3.120001e+01 2.986800e+02\n4 8373     -1.057100e+02 -3.696800e+02\n7 8373     -1.651100e+02 3.695200e+02\n10 8373     -8.887000e+01 4.971000e+02\n11 8373     1.806100e+02 -4.453300e+02\n15 8373     -1.450000e+01 5.495600e+02\n0 8374     8.610800e+02 2.976300e+02\n2 8374     7.209000e+02 3.772400e+02\n3 8374     5.614399e+02 5.552002e+01\n12 8374     7.572000e+02 5.620700e+02\n0 8375     8.671801e+02 2.977200e+02\n2 8375     7.260800e+02 3.781700e+02\n7 8375     6.680100e+02 5.127800e+02\n9 8375     4.739800e+02 4.248600e+02\n12 8375     7.634200e+02 5.642500e+02\n0 8376     8.440002e+01 2.899500e+02\n4 8376     -1.152300e+02 -4.061800e+02\n6 8376     -3.012900e+02 2.807600e+02\n7 8376     -1.099400e+02 3.688400e+02\n11 8376     2.320300e+02 -4.521800e+02\n12 8376     -1.539000e+02 2.907900e+02\n15 8376     6.038000e+01 5.454100e+02\n0 8377     6.979800e+02 2.904000e+02\n2 8377     5.660000e+02 3.091300e+02\n3 8377     4.203199e+02 -1.151001e+01\n6 8377     4.976700e+02 4.904300e+02\n7 8377     5.087700e+02 4.778200e+02\n8 8377     5.269500e+02 2.232800e+02\n9 8377     3.410300e+02 3.615700e+02\n10 8377     6.986500e+02 5.584100e+02\n0 8378     6.635999e+01 2.889700e+02\n6 8378     -3.231000e+02 2.740200e+02\n0 8379     6.012200e+02 2.878700e+02\n2 8379     4.659000e+02 2.661200e+02\n3 8379     3.245200e+02 -5.495001e+01\n6 8379     3.818200e+02 4.560200e+02\n7 8379     4.142700e+02 4.583100e+02\n9 8379     2.560800e+02 3.217800e+02\n11 8379     7.171899e+02 -4.332600e+02\n13 8379     7.890400e+02 5.309003e+01\n0 8380     -5.614400e+02 2.828300e+02\n7 8380     -7.707100e+02 2.739200e+02\n10 8380     -8.019600e+02 4.238700e+02\n13 8380     -2.640300e+02 -4.287000e+01\n14 8380     -2.562400e+02 -4.749301e+02\n15 8380     -8.339400e+02 4.485000e+02\n0 8381     8.289001e+01 2.807300e+02\n2 8381     -1.436300e+02 4.838000e+01\n4 8381     -1.208200e+02 -4.055700e+02\n6 8381     -2.966900e+02 2.702800e+02\n7 8381     -1.084500e+02 3.598800e+02\n9 8381     -2.587100e+02 1.130200e+02\n11 8381     2.296300e+02 -4.614100e+02\n12 8381     -1.513100e+02 2.816000e+02\n13 8381     2.819100e+02 -1.125000e+01\n14 8381     4.272400e+02 -4.669900e+02\n15 8381     6.002002e+01 5.314800e+02\n0 8382     -2.459100e+02 2.799600e+02\n13 8382     -4.919983e+00 -3.275000e+01\n14 8382     6.602002e+01 -4.785601e+02\n0 8383     5.847500e+02 2.789600e+02\n2 8383     4.504301e+02 2.499000e+02\n10 8383     5.643600e+02 5.319200e+02\n13 8383     7.739800e+02 4.316998e+01\n0 8384     7.956000e+01 2.759700e+02\n7 8384     -1.108200e+02 3.548100e+02\n11 8384     2.267800e+02 -4.657900e+02\n12 8384     -1.505200e+02 2.764400e+02\n13 8384     2.818500e+02 -1.546002e+01\n0 8385     8.812000e+01 2.763900e+02\n4 8385     -1.240200e+02 -4.098800e+02\n7 8385     -1.026500e+02 3.571100e+02\n11 8385     2.344700e+02 -4.646800e+02\n15 8385     6.698999e+01 5.273400e+02\n0 8386     8.812000e+01 2.763900e+02\n4 8386     -1.240200e+02 -4.098800e+02\n6 8386     -2.865200e+02 2.655200e+02\n8 8386     -3.862000e+01 2.645001e+01\n9 8386     -2.515100e+02 1.119700e+02\n11 8386     2.344700e+02 -4.646800e+02\n12 8386     -1.434200e+02 2.787800e+02\n13 8386     2.878800e+02 -1.377002e+01\n14 8386     4.344900e+02 -4.704800e+02\n15 8386     6.698999e+01 5.273400e+02\n0 8387     7.656000e+02 2.763100e+02\n2 8387     6.380400e+02 3.228900e+02\n3 8387     4.869700e+02 3.619995e+00\n7 8387     5.754301e+02 4.757200e+02\n8 8387     5.873000e+02 2.329900e+02\n10 8387     7.798600e+02 5.491800e+02\n12 8387     6.584000e+02 5.078900e+02\n0 8388     -2.032100e+02 2.749200e+02\n7 8388     -3.953300e+02 3.136700e+02\n10 8388     -3.607500e+02 4.472700e+02\n15 8388     -3.312000e+02 4.851500e+02\n0 8389     -5.210022e+00 2.718900e+02\n9 8389     -3.334400e+02 9.072000e+01\n0 8390     -5.210022e+00 2.718900e+02\n4 8390     -1.179800e+02 -3.470300e+02\n6 8390     -3.988600e+02 2.347700e+02\n10 8390     -1.281500e+02 4.620800e+02\n15 8390     -5.979999e+01 5.074600e+02\n0 8391     9.398999e+01 2.718100e+02\n6 8391     -2.773300e+02 2.632500e+02\n7 8391     -9.578998e+01 3.533000e+02\n11 8391     2.409301e+02 -4.695200e+02\n12 8391     -1.355300e+02 2.759900e+02\n15 8391     7.608002e+01 5.212200e+02\n0 8392     -2.733002e+01 2.711700e+02\n7 8392     -2.159500e+02 3.360700e+02\n10 8392     -1.536800e+02 4.597400e+02\n15 8392     -8.990002e+01 5.041400e+02\n0 8393     -6.667500e+02 2.679500e+02\n13 8393     -3.808900e+02 -6.521997e+01\n14 8393     -4.030300e+02 -4.949700e+02\n0 8394     -5.240900e+02 2.656000e+02\n4 8394     -7.413000e+01 -4.408002e+01\n5 8394     -1.396200e+02 -3.968000e+02\n7 8394     -7.274000e+02 2.609400e+02\n8 8394     -5.946100e+02 -4.882001e+01\n10 8394     -7.517400e+02 4.060900e+02\n0 8395     3.069100e+02 2.613000e+02\n6 8395     -2.395001e+01 3.118800e+02\n0 8396     -1.842400e+02 2.590600e+02\n7 8396     -3.729300e+02 3.016000e+02\n10 8396     -3.379600e+02 4.297500e+02\n11 8396     -1.956000e+01 -4.832800e+02\n15 8396     -3.048000e+02 4.661200e+02\n0 8397     -5.480800e+02 2.536600e+02\n14 8397     -2.455900e+02 -5.090300e+02\n0 8398     -6.634500e+02 2.529600e+02\n13 8398     -3.746500e+02 -7.813000e+01\n14 8398     -3.971800e+02 -5.121600e+02\n0 8399     8.625900e+02 2.525400e+02\n3 8399     5.762800e+02 2.114001e+01\n7 8399     6.696000e+02 4.694700e+02\n0 8400     -5.421300e+02 2.505800e+02\n14 8400     -2.387200e+02 -5.119200e+02\n0 8401     6.482000e+02 2.495400e+02\n7 8401     4.648101e+02 4.298000e+02\n9 8401     3.066700e+02 3.095600e+02\n0 8402     8.794900e+02 2.476200e+02\n2 8402     7.528400e+02 3.405700e+02\n3 8402     5.925601e+02 2.290002e+01\n7 8402     6.861100e+02 4.674400e+02\n9 8402     4.962200e+02 3.929200e+02\n12 8402     7.895900e+02 5.160900e+02\n0 8403     -7.099976e+00 2.462300e+02\n4 8403     -1.326600e+02 -3.467000e+02\n6 8403     -3.824800e+02 2.054300e+02\n8 8403     -1.080100e+02 -5.670013e+00\n10 8403     -1.274200e+02 4.313900e+02\n11 8403     1.453700e+02 -4.957800e+02\n13 8403     2.127000e+02 -4.498999e+01\n14 8403     3.394100e+02 -5.070400e+02\n15 8403     -6.006000e+01 4.721400e+02\n0 8404     2.374700e+02 2.451700e+02\n5 8404     7.002300e+02 -4.197700e+02\n6 8404     -9.209000e+01 2.750100e+02\n7 8404     5.009003e+01 3.483600e+02\n10 8404     1.582800e+02 4.548600e+02\n11 8404     3.780400e+02 -4.911600e+02\n14 8404     6.107000e+02 -4.963199e+02\n15 8404     2.758600e+02 5.051600e+02\n0 8405     -5.502500e+02 2.406500e+02\n10 8405     -7.801900e+02 3.714600e+02\n13 8405     -2.564400e+02 -8.112000e+01\n14 8405     -2.509600e+02 -5.245900e+02\n0 8406     8.528800e+02 2.367800e+02\n2 8406     7.315400e+02 3.216300e+02\n3 8406     5.743500e+02 5.330017e+00\n7 8406     6.626801e+02 4.531300e+02\n12 8406     7.636600e+02 4.967600e+02\n0 8407     8.655300e+02 2.370300e+02\n2 8407     7.430800e+02 3.263500e+02\n3 8407     5.857200e+02 9.849976e+00\n7 8407     6.745601e+02 4.552300e+02\n9 8407     4.886899e+02 3.809200e+02\n12 8407     7.786100e+02 5.010800e+02\n0 8408     -7.028003e+01 2.356400e+02\n7 8408     -2.516300e+02 2.955100e+02\n0 8409     8.587200e+02 2.361200e+02\n2 8409     7.373400e+02 3.237100e+02\n7 8409     6.683700e+02 4.537300e+02\n9 8409     4.835100e+02 3.782800e+02\n0 8410     8.587200e+02 2.361200e+02\n7 8410     6.683700e+02 4.537300e+02\n9 8410     4.835100e+02 3.782800e+02\n0 8411     8.554700e+02 2.307900e+02\n2 8411     7.362700e+02 3.176300e+02\n3 8411     5.789301e+02 1.409973e+00\n7 8411     6.659900e+02 4.476400e+02\n9 8411     4.827300e+02 3.729600e+02\n0 8412     8.670800e+02 2.314800e+02\n3 8412     5.883500e+02 4.950012e+00\n7 8412     6.771899e+02 4.498600e+02\n9 8412     4.933101e+02 3.760700e+02\n0 8413     8.587600e+02 2.271800e+02\n2 8413     7.399000e+02 3.141400e+02\n0 8414     8.587600e+02 2.271800e+02\n2 8414     7.399000e+02 3.141400e+02\n0 8415     -3.392500e+02 2.222900e+02\n7 8415     -5.239300e+02 2.418900e+02\n0 8416     5.540699e+02 2.161700e+02\n7 8416     3.765800e+02 3.811900e+02\n15 8416     7.180601e+02 5.141300e+02\n0 8417     6.142000e+02 2.173200e+02\n9 8417     2.843101e+02 2.690400e+02\n15 8417     8.025200e+02 5.257300e+02\n0 8418     7.267400e+02 2.167500e+02\n2 8418     6.152200e+02 2.522200e+02\n6 8418     5.491300e+02 4.202400e+02\n7 8418     5.457000e+02 4.121400e+02\n8 8418     5.670100e+02 1.752800e+02\n9 8418     3.835100e+02 3.148000e+02\n10 8418     7.364301e+02 4.730300e+02\n0 8419     8.415200e+02 2.157700e+02\n2 8419     7.275400e+02 2.994200e+02\n0 8420     8.520800e+02 2.137700e+02\n2 8420     7.379800e+02 3.014700e+02\n3 8420     5.814301e+02 -1.384998e+01\n7 8420     6.654200e+02 4.311000e+02\n9 8420     4.849800e+02 3.596100e+02\n12 8420     7.698700e+02 4.730400e+02\n0 8421     -1.207001e+01 2.044200e+02\n5 8421     4.318300e+02 -4.706899e+02\n6 8421     -3.584900e+02 1.569400e+02\n9 8421     -2.972400e+02 4.890997e+01\n10 8421     -1.290800e+02 3.802200e+02\n0 8422     6.043300e+02 2.008900e+02\n3 8422     3.523300e+02 -1.337400e+02\n6 8422     4.073200e+02 3.606600e+02\n7 8422     4.283900e+02 3.744200e+02\n8 8422     4.634301e+02 1.214000e+02\n9 8422     2.799700e+02 2.518900e+02\n12 8422     4.924000e+02 3.696000e+02\n15 8422     7.901801e+02 5.005100e+02\n0 8423     6.086100e+02 1.962500e+02\n2 8423     4.976899e+02 1.799600e+02\n3 8423     3.566700e+02 -1.345400e+02\n6 8423     4.139800e+02 3.581400e+02\n7 8423     4.335400e+02 3.710900e+02\n9 8423     2.847000e+02 2.508700e+02\n10 8423     5.978400e+02 4.350600e+02\n12 8423     4.987400e+02 3.668500e+02\n13 8423     8.071200e+02 -2.383002e+01\n15 8423     7.967600e+02 4.957800e+02\n0 8424     7.304700e+02 1.914500e+02\n7 8424     5.531400e+02 3.888000e+02\n10 8424     7.432600e+02 4.432300e+02\n0 8425     6.070100e+02 1.859200e+02\n2 8425     4.983300e+02 1.697900e+02\n3 8425     3.592100e+02 -1.457600e+02\n6 8425     4.147800e+02 3.459100e+02\n7 8425     4.330000e+02 3.609700e+02\n8 8425     4.689900e+02 1.109300e+02\n9 8425     2.860000e+02 2.415200e+02\n10 8425     5.964900e+02 4.237000e+02\n12 8425     4.991700e+02 3.551300e+02\n13 8425     8.067600e+02 -3.316998e+01\n15 8425     7.957500e+02 4.805900e+02\n0 8426     -5.262000e+01 1.851000e+02\n8 8426     -1.203900e+02 -5.179001e+01\n9 8426     -3.224600e+02 2.919000e+01\n13 8426     1.894200e+02 -9.942999e+01\n14 8426     3.090300e+02 -5.771700e+02\n0 8427     7.334200e+02 1.853000e+02\n2 8427     6.323000e+02 2.257600e+02\n7 8427     5.572700e+02 3.836800e+02\n8 8427     5.810800e+02 1.535700e+02\n0 8428     7.334200e+02 1.853000e+02\n2 8428     6.323000e+02 2.257600e+02\n3 8428     4.857000e+02 -8.752002e+01\n6 8428     5.665699e+02 3.890000e+02\n7 8428     5.572700e+02 3.836800e+02\n8 8428     5.810800e+02 1.535700e+02\n0 8429     8.864001e+01 1.810700e+02\n10 8429     -9.210022e+00 3.615600e+02\n13 8429     4.038101e+02 -6.865997e+01\n0 8430     8.341500e+02 1.769200e+02\n3 8430     5.783300e+02 -5.108002e+01\n7 8430     6.534000e+02 3.930100e+02\n0 8431     8.341500e+02 1.769200e+02\n2 8431     7.319000e+02 2.607500e+02\n3 8431     5.783300e+02 -5.108002e+01\n7 8431     6.534000e+02 3.930100e+02\n9 8431     4.807600e+02 3.257900e+02\n0 8432     -3.217200e+02 1.750800e+02\n7 8432     -4.952000e+02 1.988900e+02\n10 8432     -4.914300e+02 3.150800e+02\n15 8432     -4.831400e+02 3.308700e+02\n0 8433     6.934399e+02 1.752000e+02\n3 8433     4.496899e+02 -1.145100e+02\n0 8434     6.934399e+02 1.752000e+02\n3 8434     4.496899e+02 -1.145100e+02\n6 8434     5.217900e+02 3.637900e+02\n7 8434     5.194900e+02 3.662400e+02\n8 8434     5.479200e+02 1.321300e+02\n9 8434     3.664000e+02 2.685700e+02\n0 8435     -2.410400e+02 1.688200e+02\n7 8435     -4.091400e+02 2.051900e+02\n15 8435     -3.705200e+02 3.324200e+02\n0 8436     7.306600e+02 1.688000e+02\n2 8436     6.360800e+02 2.106700e+02\n3 8436     4.909900e+02 -1.015600e+02\n7 8436     5.576300e+02 3.669600e+02\n10 8436     7.454800e+02 4.161500e+02\n0 8437     -1.038500e+02 1.671800e+02\n2 8437     -2.736800e+02 -6.952002e+01\n5 8437     3.397800e+02 -5.122000e+02\n7 8437     -2.681500e+02 2.252300e+02\n8 8437     -1.579900e+02 -7.104999e+01\n9 8437     -3.592300e+02 7.140015e+00\n13 8437     1.493199e+02 -1.177900e+02\n0 8438     -5.532600e+02 1.649600e+02\n7 8438     -7.394900e+02 1.510700e+02\n0 8439     -2.690900e+02 1.637700e+02\n8 8439     -3.130000e+02 -1.005700e+02\n0 8440     6.029500e+02 1.642500e+02\n2 8440     4.971100e+02 1.462800e+02\n3 8440     3.590601e+02 -1.680000e+02\n8 8440     4.676801e+02 9.164001e+01\n13 8440     8.057600e+02 -5.307001e+01\n0 8441     -2.434600e+02 1.590000e+02\n7 8441     -4.099200e+02 1.953600e+02\n15 8441     -3.711200e+02 3.204500e+02\n0 8442     -2.176500e+02 1.554900e+02\n5 8442     2.164600e+02 -5.249600e+02\n0 8443     -2.647700e+02 1.530000e+02\n7 8443     -4.298300e+02 1.868100e+02\n0 8444     8.390699e+02 1.531600e+02\n9 8444     4.899301e+02 3.095900e+02\n0 8445     6.372200e+02 1.481000e+02\n2 8445     5.419600e+02 1.455800e+02\n3 8445     4.026200e+02 -1.663200e+02\n6 8445     4.615200e+02 3.140500e+02\n7 8445     4.680500e+02 3.297000e+02\n8 8445     5.041899e+02 8.944000e+01\n9 8445     3.235100e+02 2.228200e+02\n10 8445     6.351300e+02 3.812700e+02\n12 8445     5.445500e+02 3.231700e+02\n13 8445     8.419200e+02 -6.246002e+01\n15 8445     8.424700e+02 4.314800e+02\n0 8446     -8.174500e+02 1.464700e+02\n4 8446     -1.123300e+02 1.230400e+02\n5 8446     -4.701100e+02 -5.221300e+02\n0 8447     -2.884003e+01 1.426300e+02\n4 8447     -1.776000e+02 -3.832900e+02\n5 8447     5.592100e+02 -5.153300e+02\n6 8447     -1.604700e+02 1.534100e+02\n7 8447     -1.487300e+02 2.434100e+02\n10 8447     -1.421600e+02 3.052200e+02\n13 8447     3.101801e+02 -1.090200e+02\n15 8447     -9.054999e+01 3.278600e+02\n0 8448     6.798700e+02 1.409200e+02\n2 8448     5.883199e+02 1.587200e+02\n3 8448     4.467600e+02 -1.527100e+02\n7 8448     5.107400e+02 3.312100e+02\n8 8448     5.419000e+02 9.959000e+01\n12 8448     5.927100e+02 3.353000e+02\n0 8449     -1.532800e+02 1.397500e+02\n7 8449     -3.110400e+02 1.905700e+02\n0 8450     7.048900e+02 1.395900e+02\n2 8450     6.151500e+02 1.696500e+02\n3 8450     4.721500e+02 -1.415600e+02\n6 8450     5.441300e+02 3.298600e+02\n8 8450     5.655699e+02 1.072300e+02\n9 8450     3.853000e+02 2.453600e+02\n10 8450     7.162300e+02 3.791200e+02\n12 8450     6.234301e+02 3.399900e+02\n0 8451     7.048900e+02 1.395900e+02\n6 8451     5.441300e+02 3.298600e+02\n8 8451     5.655699e+02 1.072300e+02\n9 8451     3.853000e+02 2.453600e+02\n10 8451     7.162300e+02 3.791200e+02\n12 8451     6.234301e+02 3.399900e+02\n0 8452     -4.493000e+02 1.387400e+02\n4 8452     -1.512400e+02 -7.678003e+01\n7 8452     -6.209200e+02 1.427800e+02\n0 8453     -3.017300e+02 1.375700e+02\n7 8453     -4.633600e+02 1.657700e+02\n15 8453     -4.480000e+02 2.813400e+02\n0 8454     7.098101e+02 1.357100e+02\n2 8454     6.204600e+02 1.686900e+02\n0 8455     7.338199e+02 1.342700e+02\n3 8455     5.017000e+02 -1.322700e+02\n6 8455     5.793300e+02 3.346700e+02\n7 8455     5.638300e+02 3.345000e+02\n9 8455     4.109000e+02 2.534700e+02\n10 8455     7.510699e+02 3.762000e+02\n12 8455     6.583199e+02 3.454500e+02\n0 8456     7.338199e+02 1.342700e+02\n2 8456     6.463700e+02 1.782400e+02\n3 8456     5.017000e+02 -1.322700e+02\n6 8456     5.793300e+02 3.346700e+02\n7 8456     5.638300e+02 3.345000e+02\n8 8456     5.919700e+02 1.134000e+02\n9 8456     4.109000e+02 2.534700e+02\n10 8456     7.510699e+02 3.762000e+02\n12 8456     6.583199e+02 3.454500e+02\n0 8457     7.833800e+02 1.314400e+02\n3 8457     5.504200e+02 -1.100700e+02\n7 8457     6.122600e+02 3.411300e+02\n0 8458     7.203700e+02 1.276200e+02\n3 8458     4.913900e+02 -1.451500e+02\n7 8458     5.520400e+02 3.253500e+02\n9 8458     4.018600e+02 2.419600e+02\n12 8458     6.451600e+02 3.325900e+02\n0 8459     7.548300e+02 1.290400e+02\n3 8459     5.235300e+02 -1.277700e+02\n9 8459     4.298400e+02 2.580800e+02\n12 8459     6.835900e+02 3.470700e+02\n0 8460     7.473199e+02 1.261800e+02\n3 8460     5.170800e+02 -1.334900e+02\n7 8460     5.782500e+02 3.290600e+02\n0 8461     -6.646002e+01 1.248100e+02\n7 8461     -1.935400e+02 2.124100e+02\n10 8461     -1.841000e+02 2.804500e+02\n15 8461     -1.363500e+02 2.976800e+02\n0 8462     7.036100e+02 1.175000e+02\n3 8462     4.788000e+02 -1.616500e+02\n6 8462     5.490601e+02 3.061700e+02\n7 8462     5.370400e+02 3.131000e+02\n8 8462     5.700800e+02 9.010001e+01\n9 8462     3.901600e+02 2.276300e+02\n12 8462     6.285601e+02 3.166800e+02\n0 8463     7.036100e+02 1.175000e+02\n3 8463     4.788000e+02 -1.616500e+02\n6 8463     5.490601e+02 3.061700e+02\n7 8463     5.370400e+02 3.131000e+02\n8 8463     5.700800e+02 9.010001e+01\n9 8463     3.901600e+02 2.276300e+02\n12 8463     6.285601e+02 3.166800e+02\n0 8464     -7.725000e+01 1.161700e+02\n4 8464     -1.926400e+02 -3.374200e+02\n5 8464     4.771400e+02 -5.509100e+02\n6 8464     -2.490500e+02 9.196002e+01\n7 8464     -2.027400e+02 2.019600e+02\n10 8464     -1.962800e+02 2.685000e+02\n12 8464     -1.962500e+02 1.424200e+02\n15 8464     -1.498700e+02 2.837800e+02\n0 8465     8.323800e+02 1.137200e+02\n2 8465     7.486500e+02 2.025800e+02\n3 8465     5.982400e+02 -1.059400e+02\n7 8465     6.599900e+02 3.331600e+02\n9 8465     4.955800e+02 2.770400e+02\n0 8466     8.323800e+02 1.137200e+02\n2 8466     7.486500e+02 2.025800e+02\n7 8466     6.599900e+02 3.331600e+02\n9 8466     4.955800e+02 2.770400e+02\n0 8467     8.323800e+02 1.137200e+02\n2 8467     7.486500e+02 2.025800e+02\n7 8467     6.599900e+02 3.331600e+02\n9 8467     4.955800e+02 2.770400e+02\n0 8468     7.186500e+02 1.118500e+02\n3 8468     4.962500e+02 -1.596700e+02\n7 8468     5.527000e+02 3.101700e+02\n12 8468     6.481600e+02 3.149200e+02\n0 8469     7.065300e+02 1.092600e+02\n2 8469     6.259000e+02 1.415600e+02\n3 8469     4.834700e+02 -1.679400e+02\n6 8469     5.539000e+02 2.981300e+02\n7 8469     5.405800e+02 3.058000e+02\n8 8469     5.739800e+02 8.401001e+01\n9 8469     3.937900e+02 2.221900e+02\n10 8469     7.197300e+02 3.439500e+02\n12 8469     6.334700e+02 3.085800e+02\n0 8470     7.634301e+02 1.084600e+02\n2 8470     6.830400e+02 1.667800e+02\n3 8470     5.376700e+02 -1.416400e+02\n7 8470     5.954399e+02 3.153100e+02\n10 8470     7.877800e+02 3.487700e+02\n0 8471     7.634301e+02 1.084600e+02\n2 8471     6.830400e+02 1.667800e+02\n3 8471     5.376700e+02 -1.416400e+02\n7 8471     5.954399e+02 3.153100e+02\n9 8471     4.419399e+02 2.452900e+02\n10 8471     7.877800e+02 3.487700e+02\n12 8471     6.976801e+02 3.283400e+02\n0 8472     5.027002e+01 1.064700e+02\n4 8472     -2.068800e+02 -4.498000e+02\n5 8472     6.778400e+02 -5.487000e+02\n6 8472     -2.752002e+01 1.500100e+02\n8 8472     1.560400e+02 6.237000e+01\n12 8472     -1.979980e+00 2.032300e+02\n13 8472     3.986300e+02 -1.286100e+02\n15 8472     1.956000e+01 2.893700e+02\n0 8473     6.321200e+02 1.059000e+02\n2 8473     5.481400e+02 9.828998e+01\n6 8473     4.663500e+02 2.623300e+02\n7 8473     4.684000e+02 2.877300e+02\n8 8473     5.093000e+02 5.017999e+01\n9 8473     3.304399e+02 1.824500e+02\n10 8473     6.315200e+02 3.305200e+02\n12 8473     5.484301e+02 2.719700e+02\n13 8473     8.416400e+02 -1.012400e+02\n15 8473     8.400100e+02 3.714500e+02\n0 8474     -7.760999e+01 1.051900e+02\n7 8474     -2.001900e+02 1.916000e+02\n10 8474     -1.944400e+02 2.564100e+02\n0 8475     5.842400e+02 1.035200e+02\n9 8475     2.859800e+02 1.610000e+02\n10 8475     5.758101e+02 3.230100e+02\n0 8476     5.842400e+02 1.035200e+02\n6 8476     4.068900e+02 2.433100e+02\n10 8476     5.758101e+02 3.230100e+02\n0 8477     7.545200e+02 1.021000e+02\n3 8477     5.313600e+02 -1.515700e+02\n7 8477     5.875601e+02 3.077600e+02\n10 8477     7.770900e+02 3.407500e+02\n0 8478     7.801300e+02 1.017500e+02\n2 8478     7.017900e+02 1.680600e+02\n3 8478     5.557200e+02 -1.396700e+02\n7 8478     6.123300e+02 3.120100e+02\n9 8478     4.575300e+02 2.468900e+02\n10 8478     8.079600e+02 3.428700e+02\n12 8478     7.184800e+02 3.271300e+02\n0 8479     8.070100e+02 1.019100e+02\n3 8479     5.795300e+02 -1.270800e+02\n7 8479     6.377400e+02 3.170200e+02\n9 8479     4.790400e+02 2.579700e+02\n12 8479     7.484700e+02 3.373400e+02\n0 8480     2.744700e+02 9.657001e+01\n7 8480     1.615400e+02 2.485700e+02\n10 8480     2.150400e+02 2.820400e+02\n13 8480     5.832800e+02 -1.207200e+02\n15 8480     3.298199e+02 3.078000e+02\n0 8481     7.845601e+02 9.356000e+01\n7 8481     6.175699e+02 3.050100e+02\n9 8481     4.628000e+02 2.420100e+02\n10 8481     8.139000e+02 3.339300e+02\n12 8481     7.250200e+02 3.193700e+02\n0 8482     7.097300e+02 9.248001e+01\n7 8482     5.455200e+02 2.895800e+02\n9 8482     4.010800e+02 2.086000e+02\n0 8483     -2.755800e+02 9.151001e+01\n7 8483     -4.268800e+02 1.251400e+02\n15 8483     -4.083900e+02 2.220500e+02\n0 8484     7.515300e+02 9.157999e+01\n2 8484     6.762900e+02 1.455700e+02\n7 8484     5.865100e+02 2.970400e+02\n9 8484     4.373000e+02 2.267900e+02\n10 8484     7.749600e+02 3.275000e+02\n12 8484     6.890500e+02 3.060700e+02\n0 8485     7.515300e+02 9.157999e+01\n2 8485     6.762900e+02 1.455700e+02\n3 8485     5.324500e+02 -1.625200e+02\n7 8485     5.865100e+02 2.970400e+02\n9 8485     4.373000e+02 2.267900e+02\n10 8485     7.749600e+02 3.275000e+02\n12 8485     6.890500e+02 3.060700e+02\n0 8486     -2.759300e+02 8.585001e+01\n5 8486     1.654300e+02 -6.031200e+02\n7 8486     -4.249600e+02 1.196600e+02\n15 8486     -4.075400e+02 2.145900e+02\n0 8487     5.498199e+02 8.523001e+01\n6 8487     3.694300e+02 2.096700e+02\n10 8487     5.371100e+02 2.983600e+02\n12 8487     4.567300e+02 2.200300e+02\n13 8487     7.596100e+02 -1.300900e+02\n15 8487     7.269900e+02 3.297100e+02\n0 8488     7.411300e+02 8.326001e+01\n2 8488     6.681600e+02 1.332400e+02\n9 8488     4.302100e+02 2.164800e+02\n10 8488     7.630601e+02 3.170700e+02\n12 8488     6.795601e+02 2.933300e+02\n0 8489     7.779800e+02 8.304999e+01\n2 8489     7.050601e+02 1.485900e+02\n3 8489     5.595500e+02 -1.573600e+02\n7 8489     6.128000e+02 2.936700e+02\n9 8489     4.608800e+02 2.310100e+02\n10 8489     8.068101e+02 3.203400e+02\n12 8489     7.202700e+02 3.056500e+02\n0 8490     5.563000e+02 8.032999e+01\n6 8490     3.788400e+02 2.069300e+02\n7 8490     3.971300e+02 2.473900e+02\n8 8490     4.441000e+02 1.980011e+00\n10 8490     5.459900e+02 2.925700e+02\n12 8490     4.659100e+02 2.171000e+02\n13 8490     7.669000e+02 -1.336500e+02\n15 8490     7.372000e+02 3.232200e+02\n0 8491     -2.537500e+02 7.923999e+01\n7 8491     -4.013200e+02 1.174200e+02\n15 8491     -3.769700e+02 2.089600e+02\n0 8492     9.134003e+01 7.904999e+01\n4 8492     -2.294600e+02 -4.848199e+02\n5 8492     7.378700e+02 -5.783300e+02\n6 8492     3.744000e+01 1.349200e+02\n10 8492     4.099976e+00 2.415300e+02\n12 8492     5.953003e+01 1.875600e+02\n15 8492     7.856000e+01 2.575000e+02\n0 8493     6.790100e+02 7.709003e+01\n2 8493     6.070400e+02 9.577002e+01\n3 8493     4.672500e+02 -2.126900e+02\n6 8493     5.311200e+02 2.521300e+02\n7 8493     5.186500e+02 2.691200e+02\n8 8493     5.584700e+02 4.707001e+01\n9 8493     3.800200e+02 1.830800e+02\n12 8493     6.113900e+02 2.620800e+02\n0 8494     7.494700e+02 7.722998e+01\n2 8494     6.786100e+02 1.311200e+02\n3 8494     5.357600e+02 -1.761600e+02\n7 8494     5.866700e+02 2.829000e+02\n9 8494     4.392000e+02 2.150900e+02\n12 8494     6.911500e+02 2.895300e+02\n0 8495     5.371200e+02 7.506000e+01\n6 8495     3.545400e+02 1.937600e+02\n7 8495     3.781100e+02 2.394400e+02\n10 8495     5.233000e+02 2.854800e+02\n13 8495     7.476500e+02 -1.408200e+02\n15 8495     7.107200e+02 3.137800e+02\n0 8496     6.850900e+02 7.133002e+01\n2 8496     6.134399e+02 9.404999e+01\n3 8496     4.743199e+02 -2.139600e+02\n6 8496     5.388800e+02 2.490100e+02\n7 8496     5.249600e+02 2.652700e+02\n9 8496     3.856600e+02 1.818700e+02\n12 8496     6.179500e+02 2.594000e+02\n0 8497     6.850900e+02 7.133002e+01\n2 8497     6.134399e+02 9.404999e+01\n3 8497     4.743199e+02 -2.139600e+02\n6 8497     5.388800e+02 2.490100e+02\n9 8497     3.856600e+02 1.818700e+02\n0 8498     4.060999e+01 6.467999e+01\n6 8498     -1.482001e+01 1.029100e+02\n7 8498     -5.604999e+01 1.840400e+02\n12 8498     4.919983e+00 1.571400e+02\n13 8498     3.998600e+02 -1.635000e+02\n15 8498     1.112000e+01 2.310800e+02\n0 8499     -2.859200e+02 5.776001e+01\n2 8499     -4.180400e+02 -1.963900e+02\n4 8499     -2.146100e+02 -1.721800e+02\n13 8499     1.526001e+01 -2.219500e+02\n0 8500     6.722700e+02 5.706000e+01\n2 8500     6.049399e+02 7.245001e+01\n6 8500     5.280601e+02 2.267900e+02\n7 8500     5.143900e+02 2.485600e+02\n0 8501     6.722700e+02 5.706000e+01\n7 8501     5.143900e+02 2.485600e+02\n0 8502     -4.748100e+02 5.521997e+01\n4 8502     -1.948300e+02 -5.896002e+01\n13 8502     -1.563200e+02 -2.355500e+02\n15 8502     -6.772600e+02 1.456400e+02\n0 8503     7.078000e+02 5.445001e+01\n3 8503     5.017600e+02 -2.182900e+02\n6 8503     5.703000e+02 2.389600e+02\n8 8503     5.868000e+02 3.985999e+01\n9 8503     4.094500e+02 1.780400e+02\n10 8503     7.259600e+02 2.791800e+02\n12 8503     6.486801e+02 2.489300e+02\n0 8504     1.259800e+02 5.322998e+01\n2 8504     2.590300e+02 1.090500e+02\n5 8504     7.866100e+02 -6.067400e+02\n8 8504     2.453400e+02 4.237000e+01\n10 8504     4.752002e+01 2.159900e+02\n15 8504     1.288500e+02 2.272900e+02\n0 8505     6.951000e+02 4.975000e+01\n2 8505     6.306700e+02 7.609998e+01\n6 8505     5.568300e+02 2.287300e+02\n7 8505     5.377100e+02 2.462900e+02\n9 8505     4.002000e+02 1.676300e+02\n10 8505     7.106801e+02 2.720100e+02\n0 8506     1.553400e+02 4.934998e+01\n4 8506     -2.581900e+02 -5.371000e+02\n10 8506     8.131000e+01 2.140000e+02\n0 8507     8.193300e+02 4.860999e+01\n2 8507     7.559600e+02 1.360000e+02\n3 8507     6.090200e+02 -1.683000e+02\n9 8507     5.034700e+02 2.216100e+02\n12 8507     7.760900e+02 2.858100e+02\n0 8508     -4.423400e+02 4.790002e+01\n2 8508     -6.142100e+02 -2.432000e+02\n0 8509     6.802100e+02 4.834998e+01\n3 8509     4.773800e+02 -2.380800e+02\n6 8509     5.395100e+02 2.190200e+02\n9 8509     3.877100e+02 1.582000e+02\n0 8510     7.143600e+02 4.285999e+01\n2 8510     6.526500e+02 7.978003e+01\n7 8510     5.572300e+02 2.433200e+02\n8 8510     5.958199e+02 3.239001e+01\n9 8510     4.182600e+02 1.714400e+02\n10 8510     7.342200e+02 2.665800e+02\n12 8510     6.596801e+02 2.383100e+02\n0 8511     8.201899e+02 3.502002e+01\n2 8511     7.611600e+02 1.243000e+02\n3 8511     6.145200e+02 -1.795500e+02\n7 8511     6.590400e+02 2.563700e+02\n9 8511     5.080601e+02 2.117000e+02\n12 8511     7.805500e+02 2.720200e+02\n0 8512     6.689600e+02 3.353998e+01\n2 8512     6.056600e+02 4.748999e+01\n3 8512     4.691801e+02 -2.589900e+02\n6 8512     5.292000e+02 2.005800e+02\n7 8512     5.138800e+02 2.256700e+02\n8 8512     5.583000e+02 5.200012e+00\n9 8512     3.801100e+02 1.425400e+02\n12 8512     6.084200e+02 2.107000e+02\n0 8513     8.382700e+02 3.257001e+01\n2 8513     7.801200e+02 1.312800e+02\n7 8513     6.768800e+02 2.580100e+02\n9 8513     5.232600e+02 2.183100e+02\n12 8513     8.019301e+02 2.778400e+02\n0 8514     7.349700e+02 3.215002e+01\n2 8514     6.781899e+02 7.908002e+01\n3 8514     5.390000e+02 -2.256300e+02\n9 8514     4.399399e+02 1.716000e+02\n12 8514     6.864200e+02 2.342600e+02\n0 8515     6.603700e+02 2.934003e+01\n2 8515     5.994200e+02 3.785999e+01\n7 8515     5.064399e+02 2.197700e+02\n8 8515     5.506600e+02 7.000732e-02\n9 8515     3.747600e+02 1.344600e+02\n10 8515     6.711300e+02 2.447200e+02\n0 8516     5.187900e+02 2.609003e+01\n7 8516     3.661600e+02 1.882000e+02\n0 8517     7.470100e+02 2.373999e+01\n2 8517     6.920900e+02 7.726001e+01\n3 8517     5.516700e+02 -2.269000e+02\n7 8517     5.911400e+02 2.314500e+02\n10 8517     7.739600e+02 2.477900e+02\n12 8517     7.018199e+02 2.303800e+02\n0 8518     7.470100e+02 2.373999e+01\n2 8518     6.920900e+02 7.726001e+01\n3 8518     5.516700e+02 -2.269000e+02\n7 8518     5.911400e+02 2.314500e+02\n10 8518     7.739600e+02 2.477900e+02\n12 8518     7.018199e+02 2.303800e+02\n0 8519     -7.788600e+02 2.295001e+01\n13 8519     -4.294100e+02 -2.812900e+02\n0 8520     -3.017700e+02 2.310999e+01\n4 8520     -2.327100e+02 -1.620300e+02\n7 8520     -4.367700e+02 5.491998e+01\n10 8520     -4.490600e+02 1.378800e+02\n15 8520     -4.347000e+02 1.256100e+02\n0 8521     -5.839001e+01 2.173999e+01\n3 8521     -3.484003e+01 -3.063500e+02\n7 8521     -1.530800e+02 1.209400e+02\n15 8521     -1.151300e+02 1.587600e+02\n0 8522     2.216000e+02 2.065997e+01\n10 8522     1.605700e+02 1.875200e+02\n13 8522     5.614900e+02 -1.867200e+02\n15 8522     2.642300e+02 1.961300e+02\n0 8523     7.039500e+02 1.770001e+01\n2 8523     6.498700e+02 4.879999e+01\n3 8523     5.129700e+02 -2.563600e+02\n6 8523     5.760699e+02 1.967300e+02\n7 8523     5.506899e+02 2.168400e+02\n8 8523     5.922500e+02 7.220001e+00\n9 8523     4.170601e+02 1.453200e+02\n10 8523     7.232900e+02 2.361700e+02\n12 8523     6.547500e+02 2.063500e+02\n0 8524     8.288199e+02 1.765002e+01\n2 8524     7.754200e+02 1.117300e+02\n3 8524     6.280300e+02 -1.917600e+02\n7 8524     6.697300e+02 2.413000e+02\n9 8524     5.198900e+02 2.021800e+02\n12 8524     7.940800e+02 2.578500e+02\n0 8525     7.496300e+02 1.631000e+01\n9 8525     4.561899e+02 1.652500e+02\n0 8526     4.753700e+02 1.403998e+01\n7 8526     3.292200e+02 1.708700e+02\n0 8527     5.588400e+02 1.134998e+01\n6 8527     4.013100e+02 1.294900e+02\n0 8528     6.051300e+02 1.059003e+01\n6 8528     4.583000e+02 1.485300e+02\n12 8528     5.413700e+02 1.586200e+02\n13 8528     8.254000e+02 -1.898000e+02\n15 8528     8.131700e+02 2.341900e+02\n0 8529     6.973300e+02 1.067999e+01\n2 8529     6.450900e+02 3.852002e+01\n3 8529     5.081600e+02 -2.661000e+02\n6 8529     5.701801e+02 1.867100e+02\n7 8529     5.452500e+02 2.089900e+02\n8 8529     5.886801e+02 -1.089996e+00\n9 8529     4.132000e+02 1.366100e+02\n10 8529     7.165601e+02 2.270000e+02\n12 8529     6.491200e+02 1.963100e+02\n0 8530     6.973300e+02 1.067999e+01\n2 8530     6.450900e+02 3.852002e+01\n3 8530     5.081600e+02 -2.661000e+02\n6 8530     5.701801e+02 1.867100e+02\n7 8530     5.452500e+02 2.089900e+02\n8 8530     5.886801e+02 -1.089996e+00\n9 8530     4.132000e+02 1.366100e+02\n10 8530     7.165601e+02 2.270000e+02\n12 8530     6.491200e+02 1.963100e+02\n0 8531     2.856600e+02 1.089001e+01\n7 8531     1.900200e+02 1.692200e+02\n15 8531     3.550400e+02 1.915700e+02\n0 8532     7.484900e+02 8.669983e+00\n2 8532     6.972200e+02 6.370001e+01\n3 8532     5.576500e+02 -2.400000e+02\n7 8532     5.946500e+02 2.172600e+02\n9 8532     4.563700e+02 1.594700e+02\n10 8532     7.772200e+02 2.301400e+02\n0 8533     -3.489200e+02 7.750000e+00\n4 8533     -2.367200e+02 -1.329300e+02\n15 8533     -4.973800e+02 9.904001e+01\n0 8534     7.166500e+02 7.960022e+00\n3 8534     5.283900e+02 -2.589200e+02\n7 8534     5.643500e+02 2.102200e+02\n9 8534     4.312400e+02 1.427800e+02\n10 8534     7.394600e+02 2.263300e+02\n0 8535     -4.023600e+02 6.789978e+00\n2 8535     -5.331200e+02 -2.681100e+02\n15 8535     -5.705200e+02 9.057999e+01\n0 8536     -4.180000e+02 4.130005e+00\n2 8536     -5.524000e+02 -2.749100e+02\n15 8536     -5.921500e+02 8.376001e+01\n0 8537     -8.388000e+01 4.349976e+00\n7 8537     -1.786500e+02 9.750000e+01\n15 8537     -1.464900e+02 1.310700e+02\n0 8538     -3.333900e+02 2.890015e+00\n13 8538     -1.331000e+01 -2.718700e+02\n0 8539     3.013400e+02 3.090027e+00\n12 8539     3.045800e+02 1.455900e+02\n0 8540     7.070800e+02 2.729980e+00\n2 8540     6.570500e+02 3.528998e+01\n3 8540     5.205699e+02 -2.689100e+02\n9 8540     4.229200e+02 1.344700e+02\n12 8540     6.616899e+02 1.908600e+02\n0 8541     7.070800e+02 2.729980e+00\n2 8541     6.570500e+02 3.528998e+01\n3 8541     5.205699e+02 -2.689100e+02\n9 8541     4.229200e+02 1.344700e+02\n12 8541     6.616899e+02 1.908600e+02\n0 8542     8.475400e+02 3.309998e+00\n2 8542     7.973000e+02 1.062400e+02\n3 8542     6.501600e+02 -1.951100e+02\n7 8542     6.885900e+02 2.310800e+02\n12 8542     8.187300e+02 2.467400e+02\n0 8543     8.475400e+02 3.309998e+00\n2 8543     7.973000e+02 1.062400e+02\n3 8543     6.501600e+02 -1.951100e+02\n7 8543     6.885900e+02 2.310800e+02\n9 8543     5.377200e+02 1.980600e+02\n12 8543     8.187300e+02 2.467400e+02\n0 8544     6.465699e+02 2.090027e+00\n2 8544     5.925300e+02 2.840027e+00\n3 8544     4.585300e+02 -3.037700e+02\n6 8544     5.115300e+02 1.565900e+02\n7 8544     4.968199e+02 1.906000e+02\n8 8544     5.449399e+02 -2.834000e+01\n9 8544     3.688600e+02 1.036300e+02\n10 8544     6.565200e+02 2.115700e+02\n13 8544     8.699399e+02 -1.908000e+02\n15 8544     8.725699e+02 2.282500e+02\n0 8545     6.465699e+02 2.090027e+00\n2 8545     5.925300e+02 2.840027e+00\n3 8545     4.585300e+02 -3.037700e+02\n6 8545     5.115300e+02 1.565900e+02\n7 8545     4.968199e+02 1.906000e+02\n8 8545     5.449399e+02 -2.834000e+01\n9 8545     3.688600e+02 1.036300e+02\n12 8545     5.921200e+02 1.661600e+02\n13 8545     8.699399e+02 -1.908000e+02\n15 8545     8.725699e+02 2.282500e+02\n0 8546     7.486100e+02 2.309998e+00\n7 8546     5.954200e+02 2.112200e+02\n10 8546     7.774600e+02 2.229300e+02\n12 8546     7.087700e+02 2.070300e+02\n0 8547     7.486100e+02 2.309998e+00\n3 8547     5.599100e+02 -2.464900e+02\n7 8547     5.954200e+02 2.112200e+02\n10 8547     7.774600e+02 2.229300e+02\n12 8547     7.087700e+02 2.070300e+02\n0 8548     7.486100e+02 2.309998e+00\n3 8548     5.599100e+02 -2.464900e+02\n7 8548     5.954200e+02 2.112200e+02\n9 8548     4.582200e+02 1.536200e+02\n10 8548     7.774600e+02 2.229300e+02\n12 8548     7.087700e+02 2.070300e+02\n0 8549     -4.131000e+02 4.899902e-01\n2 8549     -5.432000e+02 -2.767500e+02\n13 8549     -8.646997e+01 -2.786800e+02\n15 8549     -5.848100e+02 7.966998e+01\n0 8550     5.171000e+02 6.300049e-01\n7 8550     3.708400e+02 1.643800e+02\n10 8550     5.067100e+02 1.968200e+02\n0 8551     -4.213100e+02 -1.989990e+00\n13 8551     -9.363000e+01 -2.812700e+02\n0 8552     6.562400e+02 -1.809998e+00\n6 8552     5.239399e+02 1.561800e+02\n9 8552     3.792100e+02 1.064300e+02\n12 8552     6.040200e+02 1.661900e+02\n0 8553     6.562400e+02 -1.809998e+00\n3 8553     4.702900e+02 -3.008800e+02\n6 8553     5.239399e+02 1.561800e+02\n12 8553     6.040200e+02 1.661900e+02\n0 8554     -4.583300e+02 -3.289978e+00\n10 8554     -6.329200e+02 8.933002e+01\n13 8554     -1.280100e+02 -2.848300e+02\n15 8554     -6.469600e+02 6.883002e+01\n0 8555     8.481899e+02 -2.750000e+00\n3 8555     6.531400e+02 -2.004900e+02\n9 8555     5.400300e+02 1.930700e+02\n12 8555     8.212000e+02 2.400100e+02\n0 8556     -3.971300e+02 -6.239990e+00\n13 8556     -7.066998e+01 -2.829800e+02\n15 8556     -5.620300e+02 7.344000e+01\n0 8557     5.756400e+02 -8.530029e+00\n6 8557     4.277700e+02 1.139700e+02\n7 8557     4.282300e+02 1.657100e+02\n12 8557     5.116600e+02 1.251200e+02\n13 8557     7.970100e+02 -2.107200e+02\n0 8558     -3.343900e+02 -1.384998e+01\n4 8558     -2.521700e+02 -1.417600e+02\n13 8558     -1.025000e+01 -2.865600e+02\n0 8559     6.378000e+02 -1.397998e+01\n6 8559     5.055400e+02 1.344500e+02\n12 8559     5.859399e+02 1.445400e+02\n0 8560     8.752100e+02 -1.550000e+01\n3 8560     6.799100e+02 -1.983900e+02\n7 8560     7.163900e+02 2.187200e+02\n9 8560     5.636100e+02 1.954300e+02\n0 8561     -3.381700e+02 -1.808002e+01\n4 8561     -2.534300e+02 -1.391100e+02\n0 8562     6.095699e+02 -2.127002e+01\n7 8562     4.634600e+02 1.608700e+02\n15 8562     8.235100e+02 1.901800e+02\n0 8563     6.095699e+02 -2.127002e+01\n7 8563     4.634600e+02 1.608700e+02\n0 8564     7.216400e+02 -2.171997e+01\n2 8564     6.801200e+02 1.825000e+01\n3 8564     5.435500e+02 -2.842800e+02\n7 8564     5.728900e+02 1.827300e+02\n9 8564     4.428600e+02 1.211900e+02\n10 8564     7.473400e+02 1.920900e+02\n12 8564     6.852800e+02 1.706800e+02\n0 8565     7.487900e+02 -2.214001e+01\n2 8565     7.076100e+02 3.241998e+01\n7 8565     5.988500e+02 1.878000e+02\n9 8565     4.658500e+02 1.337500e+02\n10 8565     7.802400e+02 1.941200e+02\n0 8566     6.316200e+02 -2.251001e+01\n8 8566     5.358101e+02 -5.454001e+01\n10 8566     6.416801e+02 1.819100e+02\n12 8566     5.798900e+02 1.339800e+02\n0 8567     -4.917000e+02 -2.362000e+01\n13 8567     -1.532200e+02 -3.048500e+02\n0 8568     6.931100e+02 -2.540002e+01\n2 8568     6.503101e+02 -8.900146e-01\n3 8568     5.161100e+02 -3.046800e+02\n6 8568     5.744700e+02 1.450800e+02\n8 8568     5.928101e+02 -3.319000e+01\n9 8568     4.187300e+02 1.036500e+02\n10 8568     7.141899e+02 1.849200e+02\n12 8568     6.528000e+02 1.545300e+02\n0 8569     7.202600e+02 -3.328998e+01\n2 8569     6.812800e+02 6.489990e+00\n3 8569     5.458199e+02 -2.962400e+02\n7 8569     5.730100e+02 1.712700e+02\n9 8569     4.443800e+02 1.109600e+02\n10 8569     7.470000e+02 1.782000e+02\n12 8569     6.862500e+02 1.565600e+02\n0 8570     7.202600e+02 -3.328998e+01\n2 8570     6.812800e+02 6.489990e+00\n3 8570     5.458199e+02 -2.962400e+02\n7 8570     5.730100e+02 1.712700e+02\n9 8570     4.443800e+02 1.109600e+02\n10 8570     7.470000e+02 1.782000e+02\n0 8571     7.202600e+02 -3.328998e+01\n2 8571     6.812800e+02 6.489990e+00\n3 8571     5.458199e+02 -2.962400e+02\n9 8571     4.443800e+02 1.109600e+02\n10 8571     7.470000e+02 1.782000e+02\n0 8572     6.730699e+02 -3.400000e+01\n2 8572     6.309200e+02 -1.966998e+01\n3 8572     4.981400e+02 -3.234200e+02\n6 8572     5.529200e+02 1.276400e+02\n7 8572     5.271899e+02 1.615300e+02\n8 8572     5.766801e+02 -4.831000e+01\n9 8572     4.030601e+02 8.737000e+01\n12 8572     6.318000e+02 1.373000e+02\n0 8573     1.969800e+02 -3.446002e+01\n7 8573     1.157200e+02 1.122300e+02\n13 8573     5.493600e+02 -2.349500e+02\n15 8573     2.363500e+02 1.168800e+02\n0 8574     3.531500e+02 -3.808002e+01\n10 8574     3.184700e+02 1.343600e+02\n13 8574     6.636100e+02 -2.324100e+02\n15 8574     4.561400e+02 1.330700e+02\n0 8575     2.860601e+02 -4.152002e+01\n7 8575     1.986500e+02 1.164300e+02\n10 8575     2.418300e+02 1.230200e+02\n12 8575     3.039800e+02 9.475000e+01\n13 8575     6.182600e+02 -2.372700e+02\n15 8575     3.627400e+02 1.191800e+02\n0 8576     -3.670300e+02 -4.423999e+01\n4 8576     -2.657500e+02 -1.204600e+02\n7 8576     -4.887900e+02 -2.212000e+01\n8 8576     -3.179900e+02 -2.672500e+02\n9 8576     -4.897200e+02 -1.998200e+02\n15 8576     -5.154200e+02 2.588000e+01\n0 8577     -3.670300e+02 -4.423999e+01\n2 8577     -4.522300e+02 -3.031000e+02\n4 8577     -2.657500e+02 -1.204600e+02\n7 8577     -4.887900e+02 -2.212000e+01\n8 8577     -3.179900e+02 -2.672500e+02\n9 8577     -4.897200e+02 -1.998200e+02\n13 8577     -3.362000e+01 -3.143400e+02\n15 8577     -5.154200e+02 2.588000e+01\n0 8578     -4.203998e+01 -4.378998e+01\n3 8578     1.933002e+01 -3.581300e+02\n4 8578     -2.978800e+02 -3.761700e+02\n7 8578     -1.224700e+02 5.947998e+01\n10 8578     -1.369300e+02 8.566998e+01\n13 8578     3.346200e+02 -2.655600e+02\n15 8578     -8.458002e+01 7.190002e+01\n0 8579     -4.290100e+02 -4.527002e+01\n2 8579     -5.335500e+02 -3.213300e+02\n8 8579     -3.827000e+02 -2.808000e+02\n13 8579     -9.060999e+01 -3.193500e+02\n15 8579     -6.021900e+02 1.491998e+01\n0 8580     -1.732200e+02 -4.759998e+01\n2 8580     -6.482001e+01 -1.109400e+02\n4 8580     -2.835900e+02 -2.754600e+02\n6 8580     -2.518800e+02 -1.140600e+02\n7 8580     -2.608900e+02 2.895001e+01\n12 8580     -2.383100e+02 -5.191998e+01\n15 8580     -2.606500e+02 4.867999e+01\n0 8581     -5.988000e+01 -5.003998e+01\n7 8581     -1.412800e+02 4.969000e+01\n10 8581     -1.573900e+02 7.677002e+01\n13 8581     3.169600e+02 -2.732000e+02\n15 8581     -1.080700e+02 6.071997e+01\n0 8582     2.149800e+02 -5.028003e+01\n3 8582     2.763900e+02 -2.829100e+02\n4 8582     -3.408900e+02 -5.868900e+02\n15 8582     2.638199e+02 9.792001e+01\n0 8583     -4.208400e+02 -5.112000e+01\n7 8583     -5.442900e+02 -3.894000e+01\n15 8583     -5.895100e+02 8.440002e+00\n0 8584     -3.657500e+02 -5.077002e+01\n2 8584     -4.461700e+02 -3.069200e+02\n4 8584     -2.696500e+02 -1.213500e+02\n7 8584     -4.849900e+02 -2.753998e+01\n8 8584     -3.128000e+02 -2.699700e+02\n9 8584     -4.836700e+02 -2.025400e+02\n15 8584     -5.122100e+02 1.795001e+01\n0 8585     7.250900e+02 -5.301001e+01\n7 8585     5.801700e+02 1.534500e+02\n10 8585     7.536600e+02 1.563500e+02\n12 8585     6.965300e+02 1.373900e+02\n0 8586     7.250900e+02 -5.301001e+01\n2 8586     6.921300e+02 -1.075000e+01\n3 8586     5.575800e+02 -3.127900e+02\n7 8586     5.801700e+02 1.534500e+02\n9 8586     4.535699e+02 9.679999e+01\n10 8586     7.536600e+02 1.563500e+02\n12 8586     6.965300e+02 1.373900e+02\n0 8587     -4.370400e+02 -5.391998e+01\n2 8587     -5.397000e+02 -3.312800e+02\n7 8587     -5.604600e+02 -4.460999e+01\n8 8587     -3.874300e+02 -2.895900e+02\n10 8587     -6.006900e+02 3.216998e+01\n13 8587     -9.589001e+01 -3.273400e+02\n15 8587     -6.105400e+02 2.750000e+00\n0 8588     2.927300e+02 -6.303003e+01\n2 8588     4.332500e+02 2.739990e+00\n6 8588     2.805900e+02 3.273999e+01\n7 8588     2.080000e+02 9.582999e+01\n8 8588     3.911400e+02 -4.219000e+01\n10 8588     2.518300e+02 9.828003e+01\n12 8588     3.163400e+02 7.148999e+01\n13 8588     6.256600e+02 -2.560700e+02\n15 8588     3.745500e+02 9.107999e+01\n0 8589     -3.370500e+02 -6.694000e+01\n2 8589     -3.980700e+02 -3.139400e+02\n8 8589     -2.756200e+02 -2.768600e+02\n0 8590     7.846000e+02 -6.678998e+01\n2 8590     7.592800e+02 6.609985e+00\n0 8591     -3.311000e+02 -6.740002e+01\n2 8591     -3.901800e+02 -3.125900e+02\n7 8591     -4.450700e+02 -3.785999e+01\n8 8591     -2.696000e+02 -2.760700e+02\n9 8591     -4.332400e+02 -2.036000e+02\n0 8592     -1.707800e+02 -6.796002e+01\n7 8592     -2.532000e+02 1.006000e+01\n13 8592     2.153800e+02 -2.992200e+02\n15 8592     -2.538500e+02 2.109003e+01\n0 8593     -1.707800e+02 -6.796002e+01\n2 8593     -4.459998e+01 -1.247300e+02\n4 8593     -2.977100e+02 -2.782800e+02\n6 8593     -2.347500e+02 -1.337800e+02\n7 8593     -2.532000e+02 1.006000e+01\n8 8593     -1.050000e+01 -1.449100e+02\n10 8593     -2.839900e+02 4.402002e+01\n12 8593     -2.227900e+02 -7.246002e+01\n13 8593     2.153800e+02 -2.992200e+02\n15 8593     -2.538500e+02 2.109003e+01\n0 8594     1.280500e+02 -6.903003e+01\n4 8594     -3.403900e+02 -5.155699e+02\n12 8594     1.518300e+02 3.400000e+01\n15 8594     1.476200e+02 6.053003e+01\n0 8595     1.280500e+02 -6.903003e+01\n4 8595     -3.403900e+02 -5.155699e+02\n8 8595     2.833800e+02 -5.722000e+01\n15 8595     1.476200e+02 6.053003e+01\n0 8596     6.959900e+02 -6.853003e+01\n7 8596     5.540699e+02 1.324800e+02\n10 8596     7.212200e+02 1.346200e+02\n0 8597     6.748900e+02 -7.177002e+01\n2 8597     6.466700e+02 -5.835999e+01\n9 8597     4.169100e+02 5.582001e+01\n10 8597     6.967900e+02 1.292600e+02\n0 8598     8.235000e+02 -7.550000e+01\n2 8598     7.984100e+02 1.798999e+01\n7 8598     6.763199e+02 1.519000e+02\n9 8598     5.406500e+02 1.249400e+02\n12 8598     8.136801e+02 1.516700e+02\n0 8599     -4.695300e+02 -8.714001e+01\n7 8599     -5.874000e+02 -8.340997e+01\n8 8599     -4.073800e+02 -3.222300e+02\n13 8599     -1.179600e+02 -3.582400e+02\n0 8600     6.933199e+02 -9.177002e+01\n2 8600     6.700400e+02 -6.898999e+01\n7 8600     5.542700e+02 1.102400e+02\n9 8600     4.368300e+02 4.794000e+01\n0 8601     -4.017300e+02 -1.084200e+02\n2 8601     -4.535600e+02 -3.697700e+02\n7 8601     -5.097900e+02 -9.169000e+01\n8 8601     -3.230500e+02 -3.238100e+02\n15 8601     -5.552300e+02 -6.659003e+01\n0 8602     3.073900e+02 -1.112500e+02\n7 8602     2.322600e+02 5.241998e+01\n10 8602     2.738600e+02 4.453998e+01\n15 8602     4.001500e+02 2.717999e+01\n0 8603     5.384600e+02 -1.148100e+02\n7 8603     4.164500e+02 6.229999e+01\n0 8604     7.685300e+02 -1.172500e+02\n2 8604     7.566899e+02 -5.309998e+01\n7 8604     6.302300e+02 1.012200e+02\n9 8604     5.078199e+02 6.446002e+01\n10 8604     8.097400e+02 8.587000e+01\n12 8604     7.626700e+02 8.384003e+01\n0 8605     -2.677002e+01 -1.238100e+02\n2 8605     1.658700e+02 -1.136600e+02\n10 8605     -1.104900e+02 -5.409973e+00\n15 8605     -5.409003e+01 -3.421997e+01\n0 8606     -4.255300e+02 -1.261700e+02\n7 8606     -5.308900e+02 -1.136200e+02\n0 8607     6.882100e+02 -1.289100e+02\n2 8607     6.763400e+02 -1.115600e+02\n3 8607     5.491600e+02 -4.119200e+02\n7 8607     5.546200e+02 7.309998e+01\n9 8607     4.424600e+02 1.263000e+01\n0 8608     -4.032100e+02 -1.298200e+02\n7 8608     -5.061000e+02 -1.122100e+02\n15 8608     -5.541900e+02 -9.409003e+01\n0 8609     7.963900e+02 -1.418700e+02\n3 8609     6.589200e+02 -3.591500e+02\n9 8609     5.380601e+02 5.778003e+01\n0 8610     7.963900e+02 -1.418700e+02\n3 8610     6.589200e+02 -3.591500e+02\n0 8611     1.360100e+02 -1.450500e+02\n7 8611     7.665002e+01 -5.479980e+00\n10 8611     7.939001e+01 -1.231000e+01\n15 8611     1.684301e+02 -4.065002e+01\n0 8612     2.089700e+02 -1.479500e+02\n10 8612     1.644600e+02 -7.570007e+00\n13 8612     5.758101e+02 -3.330400e+02\n15 8612     2.690000e+02 -3.498999e+01\n0 8613     1.575200e+02 -1.488100e+02\n4 8613     -4.071600e+02 -5.411200e+02\n10 8613     1.036500e+02 -1.446997e+01\n12 8613     2.102100e+02 -4.964001e+01\n13 8613     5.328300e+02 -3.375100e+02\n15 8613     1.983700e+02 -4.347998e+01\n0 8614     -1.745400e+02 -1.522600e+02\n7 8614     -2.510200e+02 -8.332001e+01\n15 8614     -2.450900e+02 -9.277002e+01\n0 8615     6.159003e+01 -1.530000e+02\n2 8615     2.784000e+02 -1.108400e+02\n3 8615     1.915601e+02 -4.124301e+02\n4 8615     -3.931600e+02 -4.605900e+02\n6 8615     9.639001e+01 -1.302100e+02\n7 8615     5.210022e+00 -2.695001e+01\n8 8615     2.528400e+02 -1.417200e+02\n10 8615     -5.900024e+00 -2.963000e+01\n12 8615     1.026300e+02 -8.329999e+01\n15 8615     6.832001e+01 -6.196002e+01\n0 8616     2.868700e+02 -1.527800e+02\n2 8616     4.714700e+02 -7.792999e+01\n3 8616     3.676500e+02 -3.763200e+02\n6 8616     3.132700e+02 -6.366998e+01\n7 8616     2.199600e+02 8.940002e+00\n8 8616     4.199500e+02 -1.131300e+02\n10 8616     2.538900e+02 -5.369995e+00\n12 8616     3.431801e+02 -2.732001e+01\n13 8616     6.378101e+02 -3.342500e+02\n15 8616     3.771400e+02 -3.214001e+01\n0 8617     8.327300e+02 -1.526100e+02\n7 8617     6.950300e+02 8.113000e+01\n9 8617     5.688700e+02 6.627002e+01\n0 8618     1.727600e+02 -1.573100e+02\n13 8618     5.469800e+02 -3.439700e+02\n15 8618     2.198800e+02 -5.358002e+01\n0 8619     7.883900e+02 -1.580900e+02\n7 8619     6.545601e+02 6.652002e+01\n0 8620     8.763700e+02 -1.581700e+02\n3 8620     7.365900e+02 -3.295200e+02\n9 8620     6.048199e+02 8.220001e+01\n0 8621     7.202400e+02 -1.652800e+02\n2 8621     7.215100e+02 -1.305400e+02\n7 8621     5.902600e+02 4.523999e+01\n9 8621     4.814301e+02 -1.369995e+00\n0 8622     -1.522998e+01 -1.660300e+02\n7 8622     -7.056000e+01 -5.537000e+01\n10 8622     -9.346997e+01 -5.272998e+01\n0 8623     -4.270400e+02 -1.717700e+02\n7 8623     -5.205000e+02 -1.591300e+02\n9 8623     -4.666400e+02 -3.087500e+02\n13 8623     -5.884998e+01 -4.295300e+02\n15 8623     -5.818400e+02 -1.556800e+02\n0 8624     -1.334003e+01 -1.776100e+02\n6 8624     2.133002e+01 -1.868300e+02\n12 8624     2.121002e+01 -1.369900e+02\n0 8625     8.385800e+02 -1.777900e+02\n7 8625     7.033400e+02 5.778003e+01\n9 8625     5.819900e+02 4.848999e+01\n0 8626     2.651500e+02 -1.831900e+02\n7 8626     2.055800e+02 -2.266998e+01\n0 8627     -4.536700e+02 -1.871900e+02\n7 8627     -5.451100e+02 -1.791000e+02\n15 8627     -6.167300e+02 -1.803200e+02\n0 8628     -4.571997e+01 -1.922300e+02\n2 8628     1.870600e+02 -1.805700e+02\n4 8628     -4.036700e+02 -3.749400e+02\n6 8628     -4.390015e+00 -2.132600e+02\n7 8628     -9.504999e+01 -8.564001e+01\n8 8628     1.730500e+02 -1.992700e+02\n9 8628     5.972998e+01 -5.672998e+01\n10 8628     -1.256000e+02 -8.637000e+01\n12 8628     -9.559998e+00 -1.620300e+02\n0 8629     -1.354600e+02 -1.955000e+02\n2 8629     3.297998e+01 -2.713700e+02\n3 8629     -4.103998e+01 -5.810601e+02\n7 8629     -1.955800e+02 -1.136400e+02\n8 8629     5.154999e+01 -2.642000e+02\n9 8629     -6.603003e+01 -1.408500e+02\n10 8629     -2.289800e+02 -9.950000e+01\n12 8629     -1.435200e+02 -2.199700e+02\n13 8629     2.562100e+02 -4.131800e+02\n15 8629     -1.884400e+02 -1.460200e+02\n0 8630     -1.085999e+01 -2.006800e+02\n7 8630     -5.721002e+01 -8.690002e+01\n10 8630     -8.477002e+01 -9.265997e+01\n13 8630     3.940400e+02 -3.969900e+02\n0 8631     3.056500e+02 -2.014200e+02\n6 8631     3.583000e+02 -1.053000e+02\n7 8631     2.482000e+02 -3.378998e+01\n8 8631     4.571801e+02 -1.419200e+02\n10 8631     2.802800e+02 -5.938000e+01\n0 8632     -4.696002e+01 -2.020800e+02\n4 8632     -4.095800e+02 -3.756100e+02\n6 8632     2.260010e+00 -2.211200e+02\n7 8632     -9.315997e+01 -9.463000e+01\n10 8632     -1.257600e+02 -9.796002e+01\n12 8632     -4.830017e+00 -1.704200e+02\n15 8632     -7.210999e+01 -1.427700e+02\n0 8633     -4.696002e+01 -2.020800e+02\n6 8633     2.260010e+00 -2.211200e+02\n7 8633     -9.315997e+01 -9.463000e+01\n10 8633     -1.257600e+02 -9.796002e+01\n12 8633     -4.830017e+00 -1.704200e+02\n15 8633     -7.210999e+01 -1.427700e+02\n0 8634     8.512600e+02 -2.016100e+02\n3 8634     7.327500e+02 -3.868000e+02\n7 8634     7.181200e+02 3.776001e+01\n9 8634     5.977900e+02 3.508002e+01\n0 8635     -4.434900e+02 -2.061600e+02\n7 8635     -5.294800e+02 -1.957400e+02\n0 8636     2.895300e+02 -2.066400e+02\n7 8636     2.348700e+02 -4.083002e+01\n10 8636     2.618800e+02 -6.728003e+01\n15 8636     3.867100e+02 -1.050600e+02\n0 8637     7.750500e+02 -2.074100e+02\n2 8637     7.920300e+02 -1.435600e+02\n12 8637     7.946899e+02 -1.412000e+01\n0 8638     8.565800e+02 -2.160600e+02\n3 8638     7.434399e+02 -3.982000e+02\n7 8638     7.245800e+02 2.542999e+01\n9 8638     6.063199e+02 2.504999e+01\n0 8639     9.710022e+00 -2.267600e+02\n4 8639     -4.412200e+02 -4.172400e+02\n0 8640     1.698800e+02 -2.308300e+02\n10 8640     1.281600e+02 -1.080100e+02\n13 8640     5.599100e+02 -4.084900e+02\n15 8640     2.258400e+02 -1.531800e+02\n0 8641     2.329700e+02 -2.339000e+02\n6 8641     3.087600e+02 -1.573500e+02\n12 8641     3.250000e+02 -1.220600e+02\n15 8641     3.133300e+02 -1.477300e+02\n0 8642     1.553800e+02 -2.428900e+02\n2 8642     4.125900e+02 -1.769900e+02\n6 8642     2.329500e+02 -1.959000e+02\n7 8642     1.145500e+02 -9.895001e+01\n9 8642     2.411000e+02 -4.398999e+01\n12 8642     2.423800e+02 -1.577900e+02\n15 8642     2.066700e+02 -1.712700e+02\n0 8643     2.753000e+02 -2.723900e+02\n6 8643     3.371400e+02 -2.025000e+02\n7 8643     2.265000e+02 -1.107200e+02\n12 8643     3.631200e+02 -1.712300e+02\n13 8643     6.404900e+02 -4.449100e+02\n15 8643     3.775601e+02 -1.963600e+02\n0 8644     -1.366998e+01 -2.784900e+02\n6 8644     3.665002e+01 -3.165400e+02\n9 8644     9.031000e+01 -1.601200e+02\n10 8644     -7.914001e+01 -1.820600e+02\n12 8644     3.922998e+01 -2.711500e+02\n13 8644     3.845300e+02 -4.749399e+02\n15 8644     -1.421997e+01 -2.417600e+02\n0 8645     5.079999e+01 -2.960900e+02\n2 8645     3.007900e+02 -2.974600e+02\n3 8645     2.217500e+02 -5.965100e+02\n4 8645     -5.074300e+02 -4.416100e+02\n6 8645     1.183400e+02 -3.088600e+02\n8 8645     2.681100e+02 -2.937000e+02\n9 8645     1.560900e+02 -1.486200e+02\n10 8645     -2.719971e+00 -1.950500e+02\n13 8645     4.467300e+02 -4.852900e+02\n15 8645     7.477002e+01 -2.568900e+02\n0 8646     2.952600e+02 -3.018100e+02\n7 8646     2.458000e+02 -1.403100e+02\n10 8646     2.780800e+02 -1.746800e+02\n15 8646     4.108600e+02 -2.337000e+02\n0 8647     3.229600e+02 -3.115200e+02\n7 8647     2.725900e+02 -1.453100e+02\n10 8647     3.110900e+02 -1.829200e+02\n15 8647     4.506801e+02 -2.437400e+02\n0 8648     3.490200e+02 -3.287600e+02\n12 8648     4.457000e+02 -2.295800e+02\n0 8649     7.352900e+02 -3.496500e+02\n7 8649     6.447500e+02 -1.162900e+02\n0 8650     3.781200e+02 -3.648600e+02\n6 8650     4.415200e+02 -2.934000e+02\n10 8650     3.800601e+02 -2.382400e+02\n0 8651     3.781200e+02 -3.648600e+02\n2 8651     5.879900e+02 -3.356100e+02\n6 8651     4.415200e+02 -2.934000e+02\n8 8651     5.187900e+02 -3.226000e+02\n9 8651     3.868900e+02 -1.711500e+02\n10 8651     3.800601e+02 -2.382400e+02\n0 8652     6.069000e+01 -4.007700e+02\n7 8652     4.215002e+01 -2.779100e+02\n0 8653     4.660100e+02 -4.124600e+02\n7 8653     4.191600e+02 -2.199400e+02\n0 8654     4.497300e+02 -4.217700e+02\n6 8654     5.361100e+02 -3.282600e+02\n0 8655     7.659000e+02 -4.296200e+02\n7 8655     6.882500e+02 -1.817700e+02\n0 8656     -2.640400e+02 -4.333700e+02\n6 8656     -2.173800e+02 -6.305100e+02\n7 8656     -2.847700e+02 -3.819300e+02\n0 8657     7.387600e+02 -4.620000e+02\n7 8657     6.727700e+02 -2.153600e+02\n0 8658     -2.404700e+02 -4.731300e+02\n4 8658     -5.917500e+02 -1.965400e+02\n6 8658     -1.611700e+02 -6.609800e+02\n9 8658     -4.762000e+01 -4.468800e+02\n0 8659     7.290300e+02 -4.849800e+02\n7 8659     6.686100e+02 -2.369400e+02\n0 8660     -1.220400e+02 -5.043700e+02\n4 8660     -6.479400e+02 -2.877100e+02\n6 8660     -1.320007e+00 -6.374900e+02\n9 8660     8.519000e+01 -4.205000e+02\n0 8661     -1.220400e+02 -5.043700e+02\n6 8661     -1.320007e+00 -6.374900e+02\n9 8661     8.519000e+01 -4.205000e+02\n0 8662     -1.887200e+02 -5.090300e+02\n4 8662     -6.358400e+02 -2.357100e+02\n6 8662     -7.465002e+01 -6.742700e+02\n9 8662     2.884998e+01 -4.509600e+02\n0 8663     4.131801e+02 -5.131899e+02\n6 8663     5.561100e+02 -4.275100e+02\n0 8664     -8.703998e+01 -5.321600e+02\n6 8664     5.684003e+01 -6.501300e+02\n9 8664     1.360700e+02 -4.256900e+02\n0 8665     -5.278998e+01 -5.379700e+02\n9 8665     1.689100e+02 -4.155200e+02\n0 8666     -3.100500e+02 -5.421600e+02\n7 8666     -3.055800e+02 -4.978700e+02\n0 8667     1.482500e+02 -5.450000e+02\n2 8667     5.016500e+02 -5.560601e+02\n9 8667     3.327800e+02 -3.508500e+02\n12 8667     3.156300e+02 -5.368500e+02\n0 8668     1.178998e+01 -5.465300e+02\n2 8668     3.714700e+02 -6.051300e+02\n7 8668     2.175000e+01 -4.327800e+02\n9 8668     2.286400e+02 -3.994000e+02\n0 8669     -7.810999e+01 -5.504600e+02\n4 8669     -7.012800e+02 -3.248700e+02\n9 8669     1.571000e+02 -4.335800e+02\n0 8670     1.617800e+02 -5.545900e+02\n6 8670     3.344400e+02 -5.654600e+02\n0 8671     4.665002e+01 -5.559800e+02\n2 8671     4.117400e+02 -6.021200e+02\n7 8671     5.766998e+01 -4.346899e+02\n0 8672     7.635999e+01 -5.571300e+02\n2 8672     4.409800e+02 -5.909700e+02\n4 8672     -7.518000e+02 -4.573500e+02\n9 8672     2.860300e+02 -3.818900e+02\n10 8672     5.396002e+01 -4.903800e+02\n12 8672     2.414100e+02 -5.751899e+02\n0 8673     -1.137000e+01 -5.588800e+02\n9 8673     2.176300e+02 -4.158400e+02\n0 8674     1.127400e+02 -5.625100e+02\n2 8674     4.837500e+02 -5.827700e+02\n7 8674     1.243000e+02 -4.274800e+02\n9 8674     3.195000e+02 -3.728600e+02\n10 8674     9.669000e+01 -4.928700e+02\n0 8675     7.812800e+02 -5.644100e+02\n7 8675     7.295300e+02 -2.970400e+02\n0 8676     5.164100e+02 -5.765200e+02\n7 8676     5.037300e+02 -3.587600e+02\n0 8677     5.709100e+02 5.825100e+02\n2 8677     3.153900e+02 4.802900e+02\n3 8677     1.700800e+02 1.435900e+02\n6 8677     2.309000e+02 7.619600e+02\n8 8677     3.274000e+02 3.717000e+02\n9 8677     1.203300e+02 5.017600e+02\n11 8677     6.367800e+02 -1.648900e+02\n13 8677     7.051000e+02 2.869100e+02\n0 8678     -5.064300e+02 5.795300e+02\n2 8678     -8.016200e+02 3.630600e+02\n4 8678     9.139001e+01 -9.056000e+01\n5 8678     -7.553998e+01 -6.688000e+01\n8 8678     -5.774300e+02 2.683200e+02\n11 8678     -2.864000e+02 -2.034600e+02\n13 8678     -2.045600e+02 2.138100e+02\n14 8678     -1.602400e+02 -1.632700e+02\n0 8679     2.704200e+02 5.783700e+02\n2 8679     -6.034998e+01 3.461500e+02\n3 8679     -2.014900e+02 1.166998e+01\n4 8679     4.523999e+01 -5.400699e+02\n5 8679     6.705400e+02 -6.128003e+01\n6 8679     -2.011700e+02 6.734100e+02\n8 8679     3.071997e+01 2.710600e+02\n9 8679     -2.059200e+02 3.730300e+02\n11 8679     3.841899e+02 -1.848800e+02\n13 8679     4.008300e+02 2.522900e+02\n14 8679     5.704500e+02 -1.438800e+02\n0 8680     4.591100e+02 5.779900e+02\n3 8680     -5.679999e+01 1.290002e+01\n11 8680     5.551600e+02 -1.737100e+02\n13 8680     5.497600e+02 2.649800e+02\n14 8680     7.536000e+02 -1.331500e+02\n0 8681     4.662000e+02 5.785500e+02\n3 8681     -5.014001e+01 1.379999e+01\n0 8682     1.988101e+02 5.700300e+02\n2 8682     -1.204000e+02 3.392200e+02\n4 8682     4.377002e+01 -4.904900e+02\n5 8682     6.000300e+02 -7.182001e+01\n6 8682     -2.754300e+02 6.507800e+02\n8 8682     -1.884998e+01 2.650200e+02\n11 8682     3.197100e+02 -1.969200e+02\n13 8682     3.451801e+02 2.413400e+02\n0 8683     2.630699e+02 5.697100e+02\n2 8683     -6.520001e+01 3.383200e+02\n4 8683     4.094000e+01 -5.350400e+02\n5 8683     6.631400e+02 -7.021997e+01\n6 8683     -2.079300e+02 6.617900e+02\n9 8683     -2.103400e+02 3.656000e+02\n11 8683     3.787900e+02 -1.922800e+02\n13 8683     3.958101e+02 2.451300e+02\n14 8683     5.640900e+02 -1.529700e+02\n0 8684     -7.203700e+02 5.672700e+02\n4 8684     8.498999e+01 3.676001e+01\n0 8685     -3.498500e+02 5.666800e+02\n5 8685     7.092999e+01 -8.157001e+01\n0 8686     6.083300e+02 5.666500e+02\n2 8686     3.585699e+02 4.780700e+02\n3 8686     2.116801e+02 1.421100e+02\n6 8686     2.810600e+02 7.521000e+02\n8 8686     3.624000e+02 3.690400e+02\n9 8686     1.577400e+02 5.004900e+02\n13 8686     7.420100e+02 2.772200e+02\n0 8687     6.083300e+02 5.666500e+02\n3 8687     2.116801e+02 1.421100e+02\n6 8687     2.810600e+02 7.521000e+02\n9 8687     1.577400e+02 5.004900e+02\n13 8687     7.420100e+02 2.772200e+02\n0 8688     -5.954600e+02 5.662600e+02\n5 8688     -1.610900e+02 -7.807001e+01\n0 8689     -1.445000e+02 5.642000e+02\n2 8689     -4.316800e+02 3.364400e+02\n0 8690     -1.445000e+02 5.642000e+02\n2 8690     -4.316800e+02 3.364400e+02\n0 8691     3.847400e+02 5.638300e+02\n2 8691     3.640997e+01 3.340900e+02\n5 8691     7.863199e+02 -7.126001e+01\n6 8691     -8.050000e+01 6.794300e+02\n9 8691     -1.233800e+02 3.652400e+02\n11 8691     4.892200e+02 -1.901800e+02\n13 8691     4.916400e+02 2.487000e+02\n14 8691     6.826000e+02 -1.512400e+02\n0 8692     -1.570000e+02 5.621200e+02\n3 8692     -5.689200e+02 3.997803e-02\n0 8693     -1.570000e+02 5.621200e+02\n2 8693     -4.436000e+02 3.311900e+02\n3 8693     -5.689200e+02 3.997803e-02\n4 8693     6.089001e+01 -2.740200e+02\n5 8693     2.543300e+02 -8.856000e+01\n11 8693     6.809998e+00 -2.149000e+02\n13 8693     6.635999e+01 2.131500e+02\n14 8693     1.641300e+02 -1.783600e+02\n0 8694     2.562000e+01 5.478600e+02\n2 8694     -2.715100e+02 3.149300e+02\n3 8694     -4.020000e+02 -1.746002e+01\n4 8694     4.146002e+01 -3.794100e+02\n5 8694     4.310100e+02 -9.840997e+01\n6 8694     -4.594200e+02 5.894900e+02\n8 8694     -1.440500e+02 2.421000e+02\n12 8694     -2.853500e+02 5.689000e+02\n13 8694     2.095601e+02 2.125400e+02\n14 8694     3.377400e+02 -1.854000e+02\n0 8695     2.256200e+02 5.472700e+02\n2 8695     -9.446002e+01 3.149700e+02\n4 8695     2.877002e+01 -5.075601e+02\n5 8695     6.275900e+02 -9.379999e+01\n6 8695     -2.425900e+02 6.279400e+02\n9 8695     -2.338800e+02 3.447000e+02\n12 8695     -7.576001e+01 5.943600e+02\n0 8696     2.256200e+02 5.472700e+02\n2 8696     -9.446002e+01 3.149700e+02\n4 8696     2.877002e+01 -5.075601e+02\n5 8696     6.275900e+02 -9.379999e+01\n6 8696     -2.425900e+02 6.279400e+02\n8 8696     2.150024e+00 2.453400e+02\n9 8696     -2.338800e+02 3.447000e+02\n12 8696     -7.576001e+01 5.943600e+02\n0 8697     -4.124100e+02 5.449700e+02\n2 8697     -7.007500e+02 3.175300e+02\n4 8697     6.731000e+01 -1.347400e+02\n5 8697     8.880005e+00 -1.027000e+02\n7 8697     -6.509700e+02 5.741000e+02\n8 8697     -4.954700e+02 2.351900e+02\n11 8697     -2.110600e+02 -2.316600e+02\n12 8697     -7.813300e+02 5.089800e+02\n13 8697     -1.324200e+02 1.888500e+02\n14 8697     -7.640002e+01 -1.972400e+02\n0 8698     2.382100e+02 5.426000e+02\n2 8698     -8.342999e+01 3.088700e+02\n3 8698     -2.236600e+02 -2.554999e+01\n4 8698     2.528003e+01 -5.156801e+02\n5 8698     6.398000e+02 -9.912000e+01\n8 8698     1.148999e+01 2.406200e+02\n9 8698     -2.240300e+02 3.397600e+02\n11 8698     3.581300e+02 -2.171400e+02\n12 8698     -6.217999e+01 5.894900e+02\n13 8698     3.764301e+02 2.203300e+02\n14 8698     5.418800e+02 -1.815900e+02\n0 8699     2.319900e+02 5.396300e+02\n2 8699     -8.848999e+01 3.055100e+02\n14 8699     5.361801e+02 -1.854500e+02\n0 8700     2.319900e+02 5.396300e+02\n2 8700     -8.848999e+01 3.055100e+02\n14 8700     5.361801e+02 -1.854500e+02\n0 8701     1.091998e+01 5.373700e+02\n2 8701     -2.840800e+02 3.023100e+02\n4 8701     3.575000e+01 -3.694300e+02\n5 8701     4.163700e+02 -1.105500e+02\n6 8701     -4.738500e+02 5.719100e+02\n9 8701     -3.950100e+02 3.274600e+02\n11 8701     1.553700e+02 -2.314800e+02\n12 8701     -2.990200e+02 5.535100e+02\n13 8701     1.984301e+02 2.017300e+02\n14 8701     3.239399e+02 -1.972200e+02\n0 8702     2.655601e+02 5.367900e+02\n6 8702     -1.911300e+02 6.228600e+02\n11 8702     3.846300e+02 -2.199000e+02\n0 8703     2.530699e+02 5.354800e+02\n4 8703     2.060999e+01 -5.268199e+02\n5 8703     6.562200e+02 -1.054800e+02\n0 8704     6.064800e+02 5.351600e+02\n2 8704     3.650400e+02 4.503500e+02\n3 8704     2.183400e+02 1.163400e+02\n6 8704     2.875300e+02 7.180200e+02\n8 8704     3.673000e+02 3.466500e+02\n11 8704     6.777200e+02 -2.032200e+02\n13 8704     7.444700e+02 2.522700e+02\n0 8705     5.945000e+02 5.338100e+02\n2 8705     3.525900e+02 4.450700e+02\n3 8705     2.064800e+02 1.110800e+02\n6 8705     2.727600e+02 7.128600e+02\n8 8705     3.570000e+02 3.418400e+02\n9 8705     1.531400e+02 4.714400e+02\n11 8705     6.669100e+02 -2.052200e+02\n13 8705     7.330400e+02 2.497000e+02\n0 8706     1.333300e+02 5.320100e+02\n4 8706     2.551001e+01 -4.460601e+02\n11 8706     2.651400e+02 -2.306900e+02\n0 8707     1.643000e+02 5.323900e+02\n12 8707     -1.367800e+02 5.681900e+02\n0 8708     -5.962200e+02 5.312400e+02\n4 8708     7.196997e+01 -3.995001e+01\n5 8708     -1.679800e+02 -1.144700e+02\n11 8708     -3.625700e+02 -2.433600e+02\n13 8708     -2.787800e+02 1.696100e+02\n14 8708     -2.527400e+02 -2.117000e+02\n0 8709     -5.962200e+02 5.312400e+02\n4 8709     7.196997e+01 -3.995001e+01\n5 8709     -1.679800e+02 -1.144700e+02\n13 8709     -2.787800e+02 1.696100e+02\n14 8709     -2.527400e+02 -2.117000e+02\n0 8710     -6.116800e+02 5.286000e+02\n14 8710     -2.657700e+02 -2.138700e+02\n0 8711     4.454800e+02 5.269800e+02\n2 8711     9.067999e+01 2.948500e+02\n11 8711     5.520699e+02 -2.179800e+02\n12 8711     1.494500e+02 5.981300e+02\n13 8711     5.420200e+02 2.213500e+02\n14 8711     7.461801e+02 -1.857400e+02\n0 8712     6.047000e+02 5.274700e+02\n6 8712     2.866300e+02 7.080800e+02\n8 8712     3.668000e+02 3.397900e+02\n13 8712     7.433300e+02 2.452400e+02\n0 8713     6.667300e+02 5.205700e+02\n2 8713     4.740900e+02 5.004900e+02\n3 8713     3.251500e+02 1.642600e+02\n6 8713     4.037500e+02 7.255300e+02\n8 8713     4.533700e+02 3.830500e+02\n9 8713     2.591300e+02 5.224500e+02\n13 8713     8.255900e+02 2.501800e+02\n0 8714     6.667300e+02 5.205700e+02\n2 8714     4.740900e+02 5.004900e+02\n3 8714     3.251500e+02 1.642600e+02\n6 8714     4.037500e+02 7.255300e+02\n8 8714     4.533700e+02 3.830500e+02\n9 8714     2.591300e+02 5.224500e+02\n13 8714     8.255900e+02 2.501800e+02\n0 8715     -1.025700e+02 5.146300e+02\n4 8715     3.015997e+01 -3.005400e+02\n5 8715     3.050900e+02 -1.352400e+02\n8 8715     -2.401200e+02 2.098000e+02\n0 8716     5.345400e+02 5.143700e+02\n2 8716     2.925900e+02 4.076800e+02\n3 8716     1.490500e+02 7.462000e+01\n8 8716     3.080800e+02 3.126200e+02\n9 8716     1.027800e+02 4.377000e+02\n0 8717     2.342200e+02 5.074100e+02\n9 8717     -2.225400e+02 3.073700e+02\n0 8718     6.381400e+02 5.073800e+02\n2 8718     4.487000e+02 4.803100e+02\n6 8718     3.738300e+02 7.060300e+02\n8 8718     4.316200e+02 3.665600e+02\n9 8718     2.374800e+02 5.046900e+02\n13 8718     8.002100e+02 2.372500e+02\n0 8719     6.534700e+02 5.030400e+02\n2 8719     4.654700e+02 4.818100e+02\n3 8719     3.176801e+02 1.466100e+02\n6 8719     3.933500e+02 7.046200e+02\n8 8719     4.462600e+02 3.675700e+02\n9 8719     2.526200e+02 5.064200e+02\n11 8719     7.183800e+02 -2.289000e+02\n13 8719     8.151400e+02 2.351400e+02\n0 8720     1.675000e+01 5.003900e+02\n2 8720     -2.754600e+02 2.613700e+02\n3 8720     -4.072000e+02 -7.045001e+01\n5 8720     4.211500e+02 -1.483900e+02\n6 8720     -4.603400e+02 5.252500e+02\n7 8720     -2.108200e+02 5.698500e+02\n13 8720     2.033700e+02 1.711600e+02\n14 8720     3.298000e+02 -2.350300e+02\n0 8721     1.675000e+01 5.003900e+02\n2 8721     -2.754600e+02 2.613700e+02\n3 8721     -4.072000e+02 -7.045001e+01\n4 8721     1.464001e+01 -3.700500e+02\n5 8721     4.211500e+02 -1.483900e+02\n7 8721     -2.108200e+02 5.698500e+02\n13 8721     2.033700e+02 1.711600e+02\n14 8721     3.298000e+02 -2.350300e+02\n0 8722     -6.085400e+02 4.965900e+02\n4 8722     5.523999e+01 -2.990997e+01\n5 8722     -1.847800e+02 -1.492700e+02\n7 8722     -8.571200e+02 5.017600e+02\n14 8722     -2.677700e+02 -2.468200e+02\n0 8723     -5.759800e+02 4.939800e+02\n4 8723     5.078003e+01 -4.553998e+01\n5 8723     -1.546100e+02 -1.539000e+02\n0 8724     1.065997e+01 4.924800e+02\n2 8724     -2.809100e+02 2.512900e+02\n4 8724     1.077002e+01 -3.645400e+02\n6 8724     -4.678100e+02 5.141700e+02\n7 8724     -2.157000e+02 5.611300e+02\n8 8724     -1.515800e+02 1.913200e+02\n9 8724     -3.918200e+02 2.835100e+02\n13 8724     1.986200e+02 1.640000e+02\n14 8724     3.239000e+02 -2.431600e+02\n0 8725     -7.012300e+02 4.914900e+02\n4 8725     4.992999e+01 3.767999e+01\n5 8725     -3.688000e+02 -1.535100e+02\n11 8725     -4.409100e+02 -2.732000e+02\n0 8726     -4.123700e+02 4.784600e+02\n2 8726     -7.001800e+02 2.375100e+02\n8 8726     -4.944200e+02 1.724300e+02\n11 8726     -2.144400e+02 -2.860800e+02\n12 8726     -7.693900e+02 4.277300e+02\n14 8726     -8.348999e+01 -2.644500e+02\n0 8727     -6.630200e+02 4.762500e+02\n4 8727     4.187000e+01 1.228998e+01\n11 8727     -4.174300e+02 -2.854100e+02\n0 8728     -5.474800e+02 4.758000e+02\n4 8728     4.019000e+01 -5.821002e+01\n5 8728     -1.290100e+02 -1.713500e+02\n0 8729     -6.125600e+02 4.737000e+02\n11 8729     -3.828700e+02 -2.884100e+02\n13 8729     -2.940000e+02 1.211300e+02\n14 8729     -2.755900e+02 -2.693600e+02\n0 8730     7.835699e+02 4.720300e+02\n2 8730     6.015400e+02 4.974700e+02\n3 8730     4.437900e+02 1.636000e+02\n6 8730     5.497100e+02 7.029200e+02\n0 8731     6.426899e+02 4.705000e+02\n2 8731     4.626801e+02 4.499600e+02\n3 8731     3.160800e+02 1.183200e+02\n9 8731     2.502900e+02 4.794700e+02\n13 8731     8.089700e+02 2.090400e+02\n0 8732     7.326000e+02 4.691000e+02\n2 8732     5.529500e+02 4.780200e+02\n6 8732     4.926300e+02 6.866400e+02\n9 8732     3.259900e+02 5.051700e+02\n0 8733     8.299988e+00 4.648000e+02\n2 8733     -2.806500e+02 2.196200e+02\n4 8733     -6.080017e+00 -3.618200e+02\n5 8733     4.112900e+02 -1.866000e+02\n6 8733     -4.632700e+02 4.775900e+02\n7 8733     -2.143600e+02 5.327200e+02\n8 8733     -1.513600e+02 1.663400e+02\n9 8733     -3.885000e+02 2.550800e+02\n11 8733     1.566100e+02 -2.934300e+02\n12 8733     -2.891100e+02 4.686300e+02\n14 8733     3.216700e+02 -2.719400e+02\n0 8734     5.223700e+02 4.614900e+02\n2 8734     2.910400e+02 3.538900e+02\n3 8734     1.487200e+02 2.353003e+01\n6 8734     1.992300e+02 6.133400e+02\n9 8734     1.021200e+02 3.909300e+02\n11 8734     6.156500e+02 -2.719600e+02\n12 8734     3.079200e+02 6.000200e+02\n0 8735     5.223700e+02 4.614900e+02\n2 8735     2.910400e+02 3.538900e+02\n3 8735     1.487200e+02 2.353003e+01\n6 8735     1.992300e+02 6.133400e+02\n9 8735     1.021200e+02 3.909300e+02\n11 8735     6.156500e+02 -2.719600e+02\n12 8735     3.079200e+02 6.000200e+02\n0 8736     3.991700e+02 4.590500e+02\n5 8736     8.088600e+02 -1.816300e+02\n6 8736     -4.322998e+01 5.534400e+02\n0 8737     -2.457200e+02 4.578200e+02\n4 8737     8.559998e+00 -2.147500e+02\n5 8737     1.613400e+02 -1.946900e+02\n7 8737     -4.658200e+02 4.983500e+02\n8 8737     -3.524600e+02 1.543300e+02\n11 8737     -7.092999e+01 -3.042700e+02\n0 8738     7.809200e+02 4.516300e+02\n3 8738     4.472200e+02 1.477400e+02\n0 8739     -1.483900e+02 4.506400e+02\n2 8739     -4.297500e+02 2.011100e+02\n4 8739     -3.070007e+00 -2.685600e+02\n5 8739     2.559399e+02 -2.030300e+02\n7 8739     -3.668200e+02 5.011600e+02\n8 8739     -2.732500e+02 1.490800e+02\n12 8739     -4.589500e+02 4.283400e+02\n13 8739     7.365002e+01 1.203300e+02\n14 8739     1.695000e+02 -2.911100e+02\n0 8740     5.151200e+02 4.511900e+02\n3 8740     1.436800e+02 1.152002e+01\n6 8740     1.929300e+02 5.998400e+02\n8 8740     3.026000e+02 2.588100e+02\n9 8740     9.769000e+01 3.803100e+02\n11 8740     6.112400e+02 -2.827900e+02\n0 8741     -2.587400e+02 4.458300e+02\n2 8741     -5.396200e+02 1.944300e+02\n5 8741     1.472700e+02 -2.075700e+02\n7 8741     -4.774600e+02 4.844100e+02\n0 8742     -2.222100e+02 4.443900e+02\n2 8742     -5.019900e+02 1.931600e+02\n4 8742     -1.070007e+00 -2.262600e+02\n5 8742     1.833900e+02 -2.093400e+02\n7 8742     -4.399200e+02 4.866400e+02\n8 8742     -3.328900e+02 1.411800e+02\n11 8742     -5.052002e+01 -3.167900e+02\n12 8742     -5.411200e+02 4.095800e+02\n13 8742     1.520001e+01 1.115300e+02\n14 8742     9.817999e+01 -2.988300e+02\n0 8743     -1.795100e+02 4.432500e+02\n4 8743     -5.250000e+00 -2.497200e+02\n5 8743     2.248300e+02 -2.110700e+02\n8 8743     -2.981900e+02 1.408800e+02\n11 8743     -1.192999e+01 -3.166600e+02\n13 8743     4.844000e+01 1.121100e+02\n0 8744     -4.277600e+02 4.390000e+02\n2 8744     -7.171000e+02 1.868000e+02\n4 8744     1.197998e+01 -1.150600e+02\n5 8744     -1.885999e+01 -2.121900e+02\n8 8744     -5.072100e+02 1.321500e+02\n11 8744     -2.295500e+02 -3.199800e+02\n12 8744     -7.822000e+02 3.727800e+02\n13 8744     -1.484300e+02 9.854001e+01\n14 8744     -1.019800e+02 -3.056200e+02\n0 8745     -5.330300e+02 4.381000e+02\n4 8745     1.941998e+01 -6.056000e+01\n5 8745     -1.217400e+02 -2.109100e+02\n11 8745     -3.192500e+02 -3.194000e+02\n13 8745     -2.327800e+02 9.375000e+01\n14 8745     -2.044600e+02 -3.065200e+02\n0 8746     -6.023400e+02 4.350300e+02\n14 8746     -2.721300e+02 -3.082800e+02\n0 8747     -2.390700e+02 4.294100e+02\n2 8747     -5.188600e+02 1.748600e+02\n4 8747     -8.000000e+00 -2.156200e+02\n5 8747     1.657600e+02 -2.250000e+02\n7 8747     -4.550200e+02 4.692400e+02\n8 8747     -3.459500e+02 1.271400e+02\n11 8747     -6.445001e+01 -3.291000e+02\n12 8747     -5.573000e+02 3.895200e+02\n13 8747     1.119995e+00 9.762000e+01\n14 8747     8.022998e+01 -3.151400e+02\n0 8748     6.287600e+02 4.192300e+02\n2 8748     4.616200e+02 3.983900e+02\n3 8748     3.159000e+02 6.991998e+01\n7 8748     4.258700e+02 5.851500e+02\n13 8748     8.011000e+02 1.645500e+02\n0 8749     -3.050700e+02 4.161400e+02\n2 8749     -5.862500e+02 1.581000e+02\n4 8749     -1.031000e+01 -1.778800e+02\n5 8749     9.857001e+01 -2.387500e+02\n8 8749     -4.008500e+02 1.123100e+02\n10 8749     -5.039700e+02 6.093500e+02\n12 8749     -6.316700e+02 3.626600e+02\n14 8749     1.553998e+01 -3.295200e+02\n0 8750     6.867100e+02 4.137700e+02\n8 8750     4.918101e+02 3.125800e+02\n9 8750     3.013500e+02 4.513000e+02\n0 8751     -3.725500e+02 4.107300e+02\n2 8751     -6.574700e+02 1.508800e+02\n4 8751     -7.729980e+00 -1.408700e+02\n5 8751     3.137000e+01 -2.430800e+02\n7 8751     -5.896500e+02 4.340900e+02\n8 8751     -4.592800e+02 1.051300e+02\n10 8751     -5.865000e+02 5.978000e+02\n11 8751     -1.828600e+02 -3.446700e+02\n12 8751     -7.111400e+02 3.455000e+02\n13 8751     -1.054700e+02 7.662000e+01\n14 8751     -5.134003e+01 -3.351600e+02\n0 8752     -2.154700e+02 4.075600e+02\n4 8752     -2.215002e+01 -2.264600e+02\n5 8752     1.871400e+02 -2.489900e+02\n7 8752     -4.285100e+02 4.485700e+02\n10 8752     -3.940100e+02 6.060300e+02\n11 8752     -4.415997e+01 -3.484500e+02\n12 8752     -5.262200e+02 3.654800e+02\n14 8752     1.021100e+02 -3.381000e+02\n0 8753     2.121997e+01 4.075000e+02\n2 8753     -2.633000e+02 1.518400e+02\n3 8753     -3.972500e+02 -1.793800e+02\n5 8753     4.226700e+02 -2.484400e+02\n6 8753     -4.376700e+02 4.047900e+02\n7 8753     -1.942400e+02 4.748800e+02\n8 8753     -1.372100e+02 1.132100e+02\n12 8753     -2.650100e+02 4.014700e+02\n13 8753     2.077900e+02 9.151001e+01\n14 8753     3.345400e+02 -3.328000e+02\n0 8754     8.692999e+01 4.030700e+02\n7 8754     -1.301400e+02 4.779600e+02\n0 8755     -3.211900e+02 3.938900e+02\n2 8755     -6.025600e+02 1.301600e+02\n4 8755     -2.115997e+01 -1.669500e+02\n5 8755     8.046997e+01 -2.622300e+02\n7 8755     -5.340400e+02 4.223400e+02\n8 8755     -4.136700e+02 9.032999e+01\n10 8755     -5.203300e+02 5.803800e+02\n11 8755     -1.372500e+02 -3.596900e+02\n12 8755     -6.469500e+02 3.328000e+02\n13 8755     -6.472998e+01 6.407001e+01\n14 8755     -2.440002e+00 -3.532500e+02\n0 8756     -7.103500e+02 3.870000e+02\n13 8756     -4.471300e+02 3.033002e+01\n0 8757     6.937300e+02 3.814000e+02\n3 8757     3.889600e+02 6.292999e+01\n6 8757     4.701300e+02 5.854300e+02\n7 8757     4.921400e+02 5.642100e+02\n8 8757     5.040800e+02 2.896900e+02\n9 8757     3.149500e+02 4.285000e+02\n12 8757     5.511700e+02 5.952700e+02\n13 8757     8.686899e+02 1.416600e+02\n0 8758     -6.678500e+02 3.800900e+02\n13 8758     -4.069600e+02 2.751001e+01\n14 8758     -4.229500e+02 -3.759100e+02\n0 8759     -1.309600e+02 3.790300e+02\n7 8759     -3.397500e+02 4.282400e+02\n11 8759     3.226001e+01 -3.734000e+02\n0 8760     4.618000e+02 3.792900e+02\n2 8760     2.408900e+02 2.508100e+02\n6 8760     1.412000e+02 5.007300e+02\n7 8760     2.503900e+02 5.149500e+02\n8 8760     2.660100e+02 1.861100e+02\n9 8760     6.228003e+01 3.002500e+02\n12 8760     2.560300e+02 4.915400e+02\n0 8761     5.608600e+02 3.767300e+02\n6 8761     2.704400e+02 5.296000e+02\n7 8761     3.509700e+02 5.289800e+02\n13 8761     7.175200e+02 1.180300e+02\n0 8762     9.789978e+00 3.631600e+02\n2 8762     -2.696400e+02 9.791998e+01\n5 8762     4.100000e+02 -2.979300e+02\n6 8762     -4.410700e+02 3.435300e+02\n7 8762     -1.995300e+02 4.282500e+02\n8 8762     -1.414500e+02 7.098001e+01\n9 8762     -3.728000e+02 1.494000e+02\n10 8762     -1.198300e+02 5.729400e+02\n11 8762     1.626400e+02 -3.854500e+02\n0 8763     -3.036600e+02 3.506700e+02\n7 8763     -5.098800e+02 3.786100e+02\n8 8763     -3.972300e+02 4.738000e+01\n10 8763     -4.936000e+02 5.281700e+02\n11 8763     -1.235500e+02 -3.985800e+02\n13 8763     -5.152002e+01 2.698999e+01\n14 8763     1.163000e+01 -4.004000e+02\n15 8763     -4.844500e+02 5.774800e+02\n0 8764     -3.036600e+02 3.506700e+02\n2 8764     -5.828300e+02 7.460999e+01\n4 8764     -4.715002e+01 -1.717600e+02\n5 8764     9.359998e+01 -3.097700e+02\n8 8764     -3.972300e+02 4.738000e+01\n10 8764     -4.936000e+02 5.281700e+02\n11 8764     -1.235500e+02 -3.985800e+02\n15 8764     -4.844500e+02 5.774800e+02\n0 8765     2.028400e+02 3.488300e+02\n2 8765     -6.516998e+01 1.152300e+02\n6 8765     -2.012900e+02 3.782000e+02\n9 8765     -1.976700e+02 1.729800e+02\n12 8765     -4.897998e+01 3.723700e+02\n0 8766     2.028400e+02 3.488300e+02\n6 8766     -2.012900e+02 3.782000e+02\n0 8767     -7.024800e+02 3.481600e+02\n4 8767     -2.231000e+01 5.257001e+01\n13 8767     -4.321600e+02 -1.090027e+00\n14 8767     -4.572500e+02 -4.099200e+02\n0 8768     -6.529400e+02 3.483200e+02\n13 8768     -3.865800e+02 1.960022e+00\n14 8768     -4.016100e+02 -4.094200e+02\n0 8769     5.324200e+02 3.477400e+02\n3 8769     1.894000e+02 -7.540997e+01\n6 8769     2.418400e+02 4.875000e+02\n7 8769     3.262100e+02 4.960200e+02\n8 8769     3.375700e+02 1.835200e+02\n9 8769     1.385300e+02 3.030900e+02\n10 8769     4.965800e+02 6.095700e+02\n12 8769     3.471500e+02 4.815100e+02\n13 8769     6.928900e+02 9.031000e+01\n0 8770     -3.286800e+02 3.441000e+02\n4 8770     -4.822998e+01 -1.575700e+02\n5 8770     6.787000e+01 -3.161000e+02\n7 8770     -5.347600e+02 3.687500e+02\n8 8770     -4.189200e+02 3.919000e+01\n15 8770     -5.178200e+02 5.662300e+02\n0 8771     7.951700e+02 3.394500e+02\n2 8771     6.481801e+02 3.889500e+02\n3 8771     4.928800e+02 6.547998e+01\n7 8771     5.948600e+02 5.408000e+02\n9 8771     4.082800e+02 4.315600e+02\n12 8771     6.740500e+02 5.840700e+02\n0 8772     -1.806900e+02 3.367000e+02\n2 8772     -4.553300e+02 5.909998e+01\n7 8772     -3.838000e+02 3.783600e+02\n8 8772     -2.935100e+02 3.692001e+01\n13 8772     4.671002e+01 1.971002e+01\n15 8772     -3.110100e+02 5.736500e+02\n0 8773     -3.281800e+02 3.358600e+02\n4 8773     -5.332001e+01 -1.566300e+02\n7 8773     -5.330500e+02 3.595000e+02\n11 8773     -1.469500e+02 -4.118800e+02\n15 8773     -5.160400e+02 5.531400e+02\n0 8774     7.177400e+02 3.333100e+02\n6 8774     5.094900e+02 5.424800e+02\n7 8774     5.220800e+02 5.211200e+02\n8 8774     5.341200e+02 2.621500e+02\n9 8774     3.460800e+02 4.021300e+02\n10 8774     7.194500e+02 6.113000e+02\n12 8774     5.897900e+02 5.528400e+02\n0 8775     5.302600e+02 3.288700e+02\n7 8775     3.263199e+02 4.772900e+02\n10 8775     4.956000e+02 5.856600e+02\n13 8775     6.929000e+02 7.371997e+01\n0 8776     5.302600e+02 3.288700e+02\n7 8776     3.263199e+02 4.772900e+02\n10 8776     4.956000e+02 5.856600e+02\n0 8777     6.388700e+02 3.286400e+02\n2 8777     4.939700e+02 3.200000e+02\n3 8777     3.503900e+02 -3.229980e+00\n6 8777     4.163500e+02 5.132400e+02\n7 8777     4.456700e+02 5.044300e+02\n9 8777     2.793700e+02 3.683900e+02\n10 8777     6.249700e+02 5.977300e+02\n11 8777     7.435900e+02 -3.906400e+02\n13 8777     8.204700e+02 9.198999e+01\n0 8778     6.606200e+02 3.277600e+02\n2 8778     5.177200e+02 3.279700e+02\n3 8778     3.725601e+02 4.979980e+00\n6 8778     4.440699e+02 5.184200e+02\n7 8778     4.671500e+02 5.072000e+02\n8 8778     4.872700e+02 2.398600e+02\n9 8778     2.994000e+02 3.762300e+02\n10 8778     6.511200e+02 5.992500e+02\n11 8778     7.660601e+02 -3.915200e+02\n12 8778     5.266300e+02 5.269000e+02\n13 8778     8.430900e+02 9.382001e+01\n0 8779     -1.218800e+02 3.262200e+02\n2 8779     -3.946000e+02 4.888000e+01\n7 8779     -3.244200e+02 3.742100e+02\n9 8779     -4.775700e+02 1.020800e+02\n11 8779     4.081000e+01 -4.210600e+02\n14 8779     1.910100e+02 -4.251900e+02\n0 8780     2.095400e+02 3.241900e+02\n6 8780     -1.775200e+02 3.532300e+02\n9 8780     -1.767900e+02 1.607800e+02\n0 8781     5.821002e+01 3.229600e+02\n7 8781     -1.435600e+02 3.959100e+02\n10 8781     -5.916998e+01 5.290400e+02\n11 8781     2.066200e+02 -4.219000e+02\n0 8782     6.368500e+02 3.162000e+02\n3 8782     3.526200e+02 -1.501001e+01\n6 8782     4.188000e+02 4.980900e+02\n7 8782     4.454800e+02 4.919600e+02\n8 8782     4.693300e+02 2.228200e+02\n9 8782     2.815800e+02 3.579000e+02\n10 8782     6.233600e+02 5.835900e+02\n11 8782     7.457700e+02 -4.041600e+02\n12 8782     5.022900e+02 5.059700e+02\n13 8782     8.213400e+02 8.078000e+01\n0 8783     -1.666000e+02 3.143800e+02\n2 8783     -4.400400e+02 3.122998e+01\n7 8783     -3.668100e+02 3.568000e+02\n8 8783     -2.800800e+02 1.623999e+01\n13 8783     5.760999e+01 7.600098e-01\n14 8783     1.455100e+02 -4.397700e+02\n0 8784     -5.399300e+02 3.125900e+02\n4 8784     -4.723999e+01 -4.153003e+01\n10 8784     -7.795500e+02 4.627400e+02\n11 8784     -3.362400e+02 -4.283900e+02\n15 8784     -8.098400e+02 4.935900e+02\n0 8785     -5.399300e+02 3.125900e+02\n4 8785     -4.723999e+01 -4.153003e+01\n10 8785     -7.795500e+02 4.627400e+02\n11 8785     -3.362400e+02 -4.283900e+02\n15 8785     -8.098400e+02 4.935900e+02\n0 8786     -5.621300e+02 3.069300e+02\n10 8786     -8.060800e+02 4.534600e+02\n11 8786     -3.558600e+02 -4.328900e+02\n13 8786     -2.632600e+02 -2.140997e+01\n14 8786     -2.530100e+02 -4.479800e+02\n0 8787     -4.264500e+02 3.047700e+02\n7 8787     -6.307900e+02 3.142100e+02\n10 8787     -6.383000e+02 4.612800e+02\n11 8787     -2.359400e+02 -4.385200e+02\n15 8787     -6.486600e+02 4.969700e+02\n0 8788     5.351899e+02 3.027600e+02\n7 8788     3.345699e+02 4.529200e+02\n10 8788     5.028101e+02 5.552700e+02\n0 8789     -3.887100e+02 3.011400e+02\n7 8789     -5.921000e+02 3.167800e+02\n11 8789     -2.027400e+02 -4.419200e+02\n0 8790     -2.473000e+02 2.972400e+02\n7 8790     -4.455400e+02 3.285100e+02\n11 8790     -7.413000e+01 -4.480400e+02\n13 8790     -8.530029e+00 -1.864001e+01\n14 8790     6.214001e+01 -4.603900e+02\n15 8790     -3.962200e+02 5.095500e+02\n0 8791     -4.880005e+00 2.948900e+02\n5 8791     4.114200e+02 -3.719200e+02\n7 8791     -1.993900e+02 3.611400e+02\n9 8791     -3.480900e+02 1.040800e+02\n10 8791     -1.298000e+02 4.895500e+02\n11 8791     1.482800e+02 -4.488600e+02\n13 8791     2.025900e+02 -5.619995e+00\n14 8791     3.266700e+02 -4.556801e+02\n15 8791     -6.315997e+01 5.391200e+02\n0 8792     -4.880005e+00 2.948900e+02\n5 8792     4.114200e+02 -3.719200e+02\n7 8792     -1.993900e+02 3.611400e+02\n10 8792     -1.298000e+02 4.895500e+02\n11 8792     1.482800e+02 -4.488600e+02\n13 8792     2.025900e+02 -5.619995e+00\n14 8792     3.266700e+02 -4.556801e+02\n15 8792     -6.315997e+01 5.391200e+02\n0 8793     7.609800e+02 2.944300e+02\n3 8793     4.759700e+02 1.678998e+01\n6 8793     5.682200e+02 5.136500e+02\n7 8793     5.687500e+02 4.922000e+02\n8 8793     5.786100e+02 2.452100e+02\n9 8793     3.926600e+02 3.868000e+02\n10 8793     7.752900e+02 5.699800e+02\n12 8793     6.471700e+02 5.255800e+02\n0 8794     7.854999e+01 2.928600e+02\n7 8794     -1.165300e+02 3.711400e+02\n0 8795     -5.163700e+02 2.893400e+02\n5 8795     -1.293300e+02 -3.718300e+02\n0 8796     -5.653400e+02 2.764500e+02\n7 8796     -7.741600e+02 2.668000e+02\n10 8796     -8.062300e+02 4.157600e+02\n11 8796     -3.619500e+02 -4.607000e+02\n13 8796     -2.678700e+02 -4.889001e+01\n14 8796     -2.613600e+02 -4.822500e+02\n15 8796     -8.385900e+02 4.393100e+02\n0 8797     -5.345100e+02 2.752300e+02\n4 8797     -6.860999e+01 -3.965002e+01\n5 8797     -1.495400e+02 -3.875200e+02\n7 8797     -7.405100e+02 2.689500e+02\n10 8797     -7.666600e+02 4.165500e+02\n13 8797     -2.423400e+02 -4.898999e+01\n14 8797     -2.300900e+02 -4.844600e+02\n0 8798     -5.454900e+02 2.719500e+02\n5 8798     -1.633200e+02 -3.912800e+02\n15 8798     -8.096000e+02 4.355200e+02\n0 8799     7.456000e+01 2.688000e+02\n4 8799     -1.276800e+02 -4.010900e+02\n6 8799     -2.982400e+02 2.545800e+02\n7 8799     -1.138800e+02 3.466900e+02\n9 8799     -2.577600e+02 1.043800e+02\n11 8799     2.225200e+02 -4.747000e+02\n12 8799     -1.546600e+02 2.677100e+02\n13 8799     2.790800e+02 -2.252002e+01\n0 8800     5.820400e+02 2.680700e+02\n8 8800     4.293500e+02 1.685100e+02\n9 8800     2.424900e+02 2.971800e+02\n10 8800     5.616899e+02 5.180000e+02\n12 8800     4.492800e+02 4.364200e+02\n13 8800     7.717800e+02 3.410999e+01\n0 8801     2.421200e+02 2.604500e+02\n6 8801     -9.610001e+01 2.921800e+02\n7 8801     5.206000e+01 3.633000e+02\n10 8801     1.630100e+02 4.741000e+02\n11 8801     3.837400e+02 -4.765000e+02\n13 8801     4.267400e+02 -1.646002e+01\n0 8802     -6.791000e+02 2.567500e+02\n13 8802     -3.903300e+02 -7.687000e+01\n14 8802     -4.162100e+02 -5.090900e+02\n0 8803     2.135000e+02 2.553700e+02\n5 8803     6.695100e+02 -4.093199e+02\n6 8803     -1.266300e+02 2.792500e+02\n7 8803     2.500000e+01 3.544300e+02\n10 8803     1.297000e+02 4.640000e+02\n0 8804     6.019900e+02 2.543100e+02\n2 8804     4.749900e+02 2.332500e+02\n3 8804     3.344100e+02 -8.521002e+01\n6 8804     3.909000e+02 4.182400e+02\n7 8804     4.192700e+02 4.258600e+02\n8 8804     4.504700e+02 1.626300e+02\n9 8804     2.643400e+02 2.942100e+02\n10 8804     5.857600e+02 5.039900e+02\n12 8804     4.763900e+02 4.254500e+02\n13 8804     7.934301e+02 2.450000e+01\n0 8805     6.243000e+02 2.534600e+02\n6 8805     4.193500e+02 4.256400e+02\n7 8805     4.412100e+02 4.292200e+02\n0 8806     6.243000e+02 2.534600e+02\n3 8806     3.572200e+02 -7.617999e+01\n6 8806     4.193500e+02 4.256400e+02\n7 8806     4.412100e+02 4.292200e+02\n8 8806     4.706801e+02 1.701500e+02\n9 8806     2.861100e+02 3.030900e+02\n13 8806     8.159700e+02 2.664001e+01\n15 8806     8.130100e+02 5.787800e+02\n0 8807     -7.051300e+02 2.521700e+02\n13 8807     -4.126600e+02 -8.092999e+01\n14 8807     -4.443800e+02 -5.125500e+02\n0 8808     5.870100e+02 2.443000e+02\n7 8808     4.051200e+02 4.135800e+02\n9 8808     2.535900e+02 2.799000e+02\n10 8808     5.686000e+02 4.906200e+02\n15 8808     7.609399e+02 5.600300e+02\n0 8809     -8.539001e+01 2.406600e+02\n7 8809     -2.673600e+02 2.978700e+02\n8 8809     -1.744800e+02 -2.139999e+01\n9 8809     -3.902000e+02 5.490002e+01\n11 8809     7.052002e+01 -5.024700e+02\n0 8810     6.586100e+02 2.401900e+02\n2 8810     5.398900e+02 2.480700e+02\n7 8810     4.770800e+02 4.227200e+02\n8 8810     5.042800e+02 1.744600e+02\n9 8810     3.200100e+02 3.092400e+02\n10 8810     6.549500e+02 4.935900e+02\n13 8810     8.521600e+02 2.083002e+01\n0 8811     -5.434600e+02 2.388500e+02\n5 8811     -1.622400e+02 -4.265200e+02\n13 8811     -2.498900e+02 -8.066998e+01\n14 8811     -2.427100e+02 -5.246100e+02\n0 8812     6.518800e+02 2.369400e+02\n3 8812     3.903101e+02 -7.847998e+01\n7 8812     4.704399e+02 4.178600e+02\n10 8812     6.463900e+02 4.895600e+02\n13 8812     8.456700e+02 1.547998e+01\n15 8812     8.534100e+02 5.603100e+02\n0 8813     6.653199e+02 2.372400e+02\n2 8813     5.471700e+02 2.453600e+02\n3 8813     4.033400e+02 -7.156000e+01\n6 8813     4.721600e+02 4.222500e+02\n7 8813     4.841000e+02 4.206000e+02\n8 8813     5.097500e+02 1.713400e+02\n10 8813     6.627600e+02 4.906500e+02\n12 8813     5.536200e+02 4.317900e+02\n15 8813     8.728900e+02 5.624700e+02\n0 8814     6.947300e+02 2.368900e+02\n2 8814     5.792500e+02 2.582100e+02\n6 8814     5.088101e+02 4.314800e+02\n7 8814     5.131801e+02 4.262100e+02\n8 8814     5.368101e+02 1.808400e+02\n9 8814     3.527200e+02 3.188500e+02\n0 8815     6.130800e+02 2.329100e+02\n2 8815     4.926000e+02 2.181100e+02\n3 8815     3.519000e+02 -1.001000e+02\n8 8815     4.649900e+02 1.502200e+02\n0 8816     5.858199e+02 2.256800e+02\n2 8816     4.640400e+02 1.979200e+02\n3 8816     3.252300e+02 -1.193000e+02\n6 8816     3.780900e+02 3.810900e+02\n7 8816     4.065699e+02 3.952800e+02\n10 8816     5.682600e+02 4.681600e+02\n13 8816     7.802400e+02 -2.549988e+00\n15 8816     7.613600e+02 5.334000e+02\n0 8817     5.858199e+02 2.256800e+02\n2 8817     4.640400e+02 1.979200e+02\n6 8817     3.780900e+02 3.810900e+02\n7 8817     4.065699e+02 3.952800e+02\n8 8817     4.412800e+02 1.344000e+02\n9 8817     2.561100e+02 2.640800e+02\n10 8817     5.682600e+02 4.681600e+02\n12 8817     4.646400e+02 3.891500e+02\n13 8817     7.802400e+02 -2.549988e+00\n0 8818     6.225500e+02 2.248100e+02\n3 8818     3.640200e+02 -1.024500e+02\n6 8818     4.240300e+02 3.938500e+02\n7 8818     4.431899e+02 4.012900e+02\n8 8818     4.749900e+02 1.470000e+02\n9 8818     2.901100e+02 2.797100e+02\n10 8818     6.127000e+02 4.710000e+02\n12 8818     5.083400e+02 4.021200e+02\n13 8818     8.177800e+02 2.109985e+00\n15 8818     8.133900e+02 5.381100e+02\n0 8819     -3.203998e+01 2.197800e+02\n6 8819     -3.958500e+02 1.683300e+02\n0 8820     5.475000e+02 2.152500e+02\n3 8820     2.869200e+02 -1.493700e+02\n7 8820     3.703900e+02 3.780900e+02\n8 8820     4.088600e+02 1.119200e+02\n9 8820     2.248000e+02 2.411600e+02\n0 8821     -8.548999e+01 2.113800e+02\n7 8821     -2.594400e+02 2.722700e+02\n0 8822     6.845200e+02 2.112000e+02\n2 8822     5.736899e+02 2.291000e+02\n3 8822     4.305100e+02 -8.621997e+01\n6 8822     5.013600e+02 4.005500e+02\n7 8822     5.055000e+02 3.993100e+02\n8 8822     5.318300e+02 1.573000e+02\n9 8822     3.479399e+02 2.940100e+02\n10 8822     6.865800e+02 4.616600e+02\n12 8822     5.824000e+02 4.105000e+02\n0 8823     6.922300e+02 2.087700e+02\n2 8823     5.835500e+02 2.303700e+02\n3 8823     4.386801e+02 -8.496997e+01\n6 8823     5.127600e+02 4.009300e+02\n7 8823     5.140300e+02 3.986500e+02\n8 8823     5.404500e+02 1.585400e+02\n9 8823     3.576400e+02 2.961100e+02\n10 8823     6.968600e+02 4.599800e+02\n12 8823     5.938000e+02 4.114300e+02\n0 8824     -3.397900e+02 2.076300e+02\n13 8824     -7.120001e+01 -9.876001e+01\n0 8825     -3.397900e+02 2.076300e+02\n7 8825     -5.213800e+02 2.272200e+02\n10 8825     -5.160800e+02 3.518500e+02\n0 8826     6.130000e+02 2.068600e+02\n2 8826     4.997100e+02 1.924800e+02\n3 8826     3.594100e+02 -1.234900e+02\n6 8826     4.173800e+02 3.709900e+02\n7 8826     4.365000e+02 3.819800e+02\n8 8826     4.705300e+02 1.294600e+02\n9 8826     2.864301e+02 2.609300e+02\n10 8826     6.025601e+02 4.486100e+02\n13 8826     8.108600e+02 -1.453998e+01\n15 8826     8.019800e+02 5.110000e+02\n0 8827     5.880100e+02 1.993300e+02\n2 8827     4.742100e+02 1.738500e+02\n3 8827     3.356200e+02 -1.427100e+02\n6 8827     3.883800e+02 3.535900e+02\n8 8827     4.491200e+02 1.146900e+02\n10 8827     5.736400e+02 4.371700e+02\n12 8827     4.744700e+02 3.625400e+02\n13 8827     7.861700e+02 -2.437000e+01\n15 8827     7.676500e+02 4.963700e+02\n0 8828     9.875000e+01 1.897600e+02\n10 8828     1.450012e+00 3.732200e+02\n13 8828     4.102400e+02 -6.072998e+01\n14 8828     5.927200e+02 -5.389399e+02\n0 8829     -3.179400e+02 1.861500e+02\n4 8829     -1.371000e+02 -1.535600e+02\n0 8830     -3.179400e+02 1.861500e+02\n4 8830     -1.371000e+02 -1.535600e+02\n0 8831     5.975500e+02 1.821000e+02\n3 8831     3.515601e+02 -1.546200e+02\n6 8831     4.061400e+02 3.371800e+02\n7 8831     4.263300e+02 3.542500e+02\n8 8831     4.622700e+02 1.035500e+02\n9 8831     2.799800e+02 2.333400e+02\n10 8831     5.881000e+02 4.165100e+02\n12 8831     4.917000e+02 3.457700e+02\n13 8831     7.970601e+02 -3.796997e+01\n15 8831     7.861200e+02 4.724600e+02\n0 8832     7.590002e+01 1.794700e+02\n10 8832     -2.365997e+01 3.587000e+02\n13 8832     3.952000e+02 -7.034003e+01\n14 8832     5.726000e+02 -5.512500e+02\n15 8832     4.738000e+01 3.933600e+02\n0 8833     7.172800e+02 1.577700e+02\n6 8833     5.542500e+02 3.537500e+02\n7 8833     5.449200e+02 3.537600e+02\n0 8834     7.103199e+02 1.551800e+02\n7 8834     5.383900e+02 3.500400e+02\n10 8834     7.215800e+02 3.980900e+02\n0 8835     7.103199e+02 1.551800e+02\n2 8835     6.163000e+02 1.869500e+02\n3 8835     4.725900e+02 -1.248700e+02\n6 8835     5.465400e+02 3.486300e+02\n7 8835     5.383900e+02 3.500400e+02\n8 8835     5.670699e+02 1.215000e+02\n9 8835     3.855699e+02 2.600200e+02\n10 8835     7.215800e+02 3.980900e+02\n12 8835     6.261500e+02 3.589900e+02\n0 8836     7.103199e+02 1.551800e+02\n2 8836     6.163000e+02 1.869500e+02\n3 8836     4.725900e+02 -1.248700e+02\n6 8836     5.465400e+02 3.486300e+02\n7 8836     5.383900e+02 3.500400e+02\n8 8836     5.670699e+02 1.215000e+02\n9 8836     3.855699e+02 2.600200e+02\n10 8836     7.215800e+02 3.980900e+02\n12 8836     6.261500e+02 3.589900e+02\n0 8837     2.301700e+02 1.524900e+02\n2 8837     2.760699e+02 1.769100e+02\n3 8837     1.660400e+02 -1.404000e+02\n7 8837     1.075500e+02 2.935700e+02\n9 8837     1.114800e+02 2.416000e+02\n10 8837     1.583800e+02 3.425100e+02\n13 8837     5.333700e+02 -7.937000e+01\n0 8838     6.487600e+02 1.497100e+02\n6 8838     4.755800e+02 3.211400e+02\n9 8838     3.336300e+02 2.300600e+02\n15 8838     8.591801e+02 4.355900e+02\n0 8839     5.924900e+02 1.460200e+02\n3 8839     3.563600e+02 -1.915600e+02\n6 8839     4.069100e+02 2.951800e+02\n7 8839     4.238700e+02 3.192500e+02\n8 8839     4.638000e+02 7.163000e+01\n12 8839     4.919600e+02 3.041400e+02\n15 8839     7.801600e+02 4.214900e+02\n0 8840     7.068600e+02 1.460800e+02\n3 8840     4.678500e+02 -1.361400e+02\n6 8840     5.406600e+02 3.364300e+02\n8 8840     5.620900e+02 1.118900e+02\n9 8840     3.814399e+02 2.499600e+02\n12 8840     6.206100e+02 3.464600e+02\n0 8841     7.305601e+02 1.458000e+02\n2 8841     6.396300e+02 1.874600e+02\n3 8841     4.948101e+02 -1.235900e+02\n6 8841     5.723300e+02 3.460000e+02\n7 8841     5.592200e+02 3.448300e+02\n8 8841     5.864900e+02 1.214000e+02\n9 8841     4.044100e+02 2.614900e+02\n10 8841     7.464000e+02 3.891600e+02\n12 8841     6.513101e+02 3.568100e+02\n0 8842     6.964900e+02 1.451000e+02\n2 8842     6.052000e+02 1.711600e+02\n7 8842     5.260500e+02 3.380800e+02\n9 8842     3.757600e+02 2.464100e+02\n12 8842     6.131200e+02 3.428900e+02\n0 8843     3.952002e+01 1.426700e+02\n7 8843     -7.492999e+01 2.580100e+02\n15 8843     1.190002e+00 3.375900e+02\n0 8844     -8.149000e+02 1.402900e+02\n4 8844     -1.157500e+02 1.222000e+02\n0 8845     -8.149000e+02 1.402900e+02\n4 8845     -1.157500e+02 1.222000e+02\n0 8846     7.201300e+02 1.401800e+02\n2 8846     6.305300e+02 1.774700e+02\n3 8846     4.867600e+02 -1.336600e+02\n7 8846     5.498101e+02 3.376100e+02\n8 8846     5.788300e+02 1.132100e+02\n9 8846     3.977700e+02 2.525100e+02\n10 8846     7.341899e+02 3.815800e+02\n0 8847     7.382300e+02 1.405900e+02\n2 8847     6.490800e+02 1.865100e+02\n3 8847     5.039700e+02 -1.245800e+02\n6 8847     5.829500e+02 3.430700e+02\n7 8847     5.671801e+02 3.412300e+02\n8 8847     5.943000e+02 1.198400e+02\n9 8847     4.129399e+02 2.605200e+02\n10 8847     7.558800e+02 3.839000e+02\n12 8847     6.616801e+02 3.537900e+02\n0 8848     -2.205300e+02 1.371300e+02\n3 8848     -5.115700e+02 -4.500699e+02\n7 8848     -3.801500e+02 1.786600e+02\n8 8848     -2.548400e+02 -1.105800e+02\n13 8848     5.387000e+01 -1.504800e+02\n15 8848     -3.378800e+02 2.917500e+02\n0 8849     6.989100e+02 1.373300e+02\n2 8849     6.098300e+02 1.646700e+02\n3 8849     4.673199e+02 -1.463700e+02\n6 8849     5.379399e+02 3.254200e+02\n7 8849     5.296300e+02 3.310000e+02\n8 8849     5.610699e+02 1.034900e+02\n9 8849     3.805800e+02 2.411400e+02\n10 8849     7.092400e+02 3.757000e+02\n12 8849     6.177200e+02 3.356300e+02\n0 8850     -2.804500e+02 1.344900e+02\n7 8850     -4.421100e+02 1.663100e+02\n0 8851     6.501200e+02 1.305000e+02\n2 8851     5.601000e+02 1.348100e+02\n3 8851     4.214900e+02 -1.771600e+02\n7 8851     4.830200e+02 3.150600e+02\n8 8851     5.200601e+02 7.981000e+01\n9 8851     3.392800e+02 2.144900e+02\n10 8851     6.518000e+02 3.625300e+02\n13 8851     8.561300e+02 -7.540002e+01\n0 8852     -2.314300e+02 1.293700e+02\n7 8852     -3.918100e+02 1.683000e+02\n15 8852     -3.554100e+02 2.789900e+02\n0 8853     6.975699e+02 1.299400e+02\n3 8853     4.677500e+02 -1.544600e+02\n6 8853     5.387100e+02 3.164100e+02\n7 8853     5.295900e+02 3.230600e+02\n9 8853     3.811100e+02 2.343000e+02\n12 8853     6.197000e+02 3.266800e+02\n0 8854     6.319000e+02 1.264100e+02\n2 8854     5.402600e+02 1.230700e+02\n3 8854     4.023400e+02 -1.892200e+02\n6 8854     4.587500e+02 2.902200e+02\n7 8854     4.656100e+02 3.076200e+02\n8 8854     5.025900e+02 7.150000e+01\n9 8854     3.224500e+02 2.039100e+02\n10 8854     6.279200e+02 3.583500e+02\n12 8854     5.407200e+02 3.005800e+02\n13 8854     8.388300e+02 -8.164001e+01\n0 8855     6.319000e+02 1.264100e+02\n2 8855     5.402600e+02 1.230700e+02\n3 8855     4.023400e+02 -1.892200e+02\n6 8855     4.587500e+02 2.902200e+02\n7 8855     4.656100e+02 3.076200e+02\n8 8855     5.025900e+02 7.150000e+01\n9 8855     3.224500e+02 2.039100e+02\n10 8855     6.279200e+02 3.583500e+02\n12 8855     5.407200e+02 3.005800e+02\n13 8855     8.388300e+02 -8.164001e+01\n0 8856     7.808900e+02 1.263800e+02\n3 8856     5.472700e+02 -1.152300e+02\n7 8856     6.094500e+02 3.365400e+02\n9 8856     4.513900e+02 2.690700e+02\n10 8856     8.067400e+02 3.727200e+02\n0 8857     7.061700e+02 1.250700e+02\n2 8857     6.211000e+02 1.564900e+02\n3 8857     4.787000e+02 -1.538000e+02\n7 8857     5.385699e+02 3.207100e+02\n9 8857     3.904700e+02 2.343400e+02\n0 8858     7.569000e+02 1.223300e+02\n7 8858     5.874600e+02 3.273500e+02\n9 8858     4.333000e+02 2.533500e+02\n10 8858     7.786801e+02 3.645200e+02\n0 8859     7.646100e+02 1.218100e+02\n3 8859     5.346300e+02 -1.293500e+02\n7 8859     5.949000e+02 3.281700e+02\n10 8859     7.882600e+02 3.648800e+02\n12 8859     6.961600e+02 3.429900e+02\n0 8860     -4.115997e+01 1.206700e+02\n4 8860     -1.892900e+02 -3.756800e+02\n5 8860     5.516801e+02 -5.381600e+02\n6 8860     -1.621100e+02 1.279000e+02\n10 8860     -1.542200e+02 2.768500e+02\n12 8860     -1.287000e+02 1.822200e+02\n15 8860     -1.046100e+02 2.957100e+02\n0 8861     8.075000e+02 1.215200e+02\n7 8861     6.362400e+02 3.358900e+02\n9 8861     4.753101e+02 2.738600e+02\n0 8862     8.162000e+02 1.183400e+02\n2 8862     7.319900e+02 1.997600e+02\n3 8862     5.823800e+02 -1.089800e+02\n7 8862     6.442700e+02 3.342300e+02\n9 8862     4.819000e+02 2.745000e+02\n0 8863     -2.876600e+02 1.162200e+02\n4 8863     -1.804200e+02 -1.714800e+02\n7 8863     -4.450000e+02 1.465800e+02\n10 8863     -4.436000e+02 2.477800e+02\n15 8863     -4.280200e+02 2.531600e+02\n0 8864     2.673999e+01 1.172400e+02\n3 8864     1.873999e+01 -1.879200e+02\n4 8864     -1.972600e+02 -4.315700e+02\n5 8864     6.447500e+02 -5.379100e+02\n6 8864     -6.284003e+01 1.521200e+02\n7 8864     -8.258002e+01 2.323000e+02\n8 8864     1.279500e+02 6.248001e+01\n10 8864     -7.589001e+01 2.815000e+02\n12 8864     -3.521997e+01 2.061800e+02\n13 8864     3.746500e+02 -1.216500e+02\n0 8865     7.337900e+02 1.167400e+02\n2 8865     6.514301e+02 1.612400e+02\n3 8865     5.077300e+02 -1.482400e+02\n7 8865     5.661200e+02 3.178200e+02\n8 8865     5.958199e+02 9.920001e+01\n9 8865     4.155200e+02 2.395100e+02\n10 8865     7.520500e+02 3.554200e+02\n12 8865     6.630900e+02 3.259900e+02\n0 8866     6.325300e+02 1.158600e+02\n2 8866     5.455200e+02 1.114600e+02\n7 8866     4.675500e+02 2.976000e+02\n15 8866     8.393600e+02 3.856800e+02\n0 8867     7.523199e+02 1.162100e+02\n2 8867     6.696899e+02 1.691500e+02\n3 8867     5.245601e+02 -1.399100e+02\n7 8867     5.837000e+02 3.207500e+02\n9 8867     4.305800e+02 2.467700e+02\n10 8867     7.739200e+02 3.568800e+02\n12 8867     6.831600e+02 3.325700e+02\n0 8868     7.734399e+02 1.147800e+02\n2 8868     6.914301e+02 1.775000e+02\n3 8868     5.451700e+02 -1.312100e+02\n7 8868     6.043000e+02 3.231200e+02\n9 8868     4.488800e+02 2.545100e+02\n10 8868     7.993400e+02 3.573400e+02\n12 8868     7.078900e+02 3.387300e+02\n0 8869     6.491300e+02 1.114900e+02\n2 8869     5.649800e+02 1.158800e+02\n6 8869     4.857900e+02 2.791400e+02\n7 8869     4.852000e+02 2.965600e+02\n8 8869     5.232100e+02 6.498999e+01\n9 8869     3.440300e+02 1.984100e+02\n12 8869     5.675500e+02 2.891700e+02\n13 8869     8.590200e+02 -9.257001e+01\n15 8869     8.639100e+02 3.815900e+02\n0 8870     6.491300e+02 1.114900e+02\n2 8870     5.649800e+02 1.158800e+02\n6 8870     4.857900e+02 2.791400e+02\n7 8870     4.852000e+02 2.965600e+02\n13 8870     8.590200e+02 -9.257001e+01\n15 8870     8.639100e+02 3.815900e+02\n0 8871     6.659600e+02 1.107500e+02\n6 8871     5.064200e+02 2.829600e+02\n7 8871     5.013300e+02 2.994800e+02\n8 8871     5.380601e+02 6.916000e+01\n13 8871     8.759000e+02 -9.103998e+01\n0 8872     7.431600e+02 1.103500e+02\n2 8872     6.630601e+02 1.594000e+02\n3 8872     5.185500e+02 -1.494900e+02\n7 8872     5.759800e+02 3.134200e+02\n9 8872     4.253800e+02 2.382200e+02\n10 8872     7.636200e+02 3.490300e+02\n12 8872     6.754700e+02 3.222800e+02\n0 8873     7.236600e+02 1.094000e+02\n2 8873     6.428400e+02 1.488400e+02\n3 8873     5.005100e+02 -1.597300e+02\n6 8873     5.741700e+02 3.039500e+02\n7 8873     5.573300e+02 3.087800e+02\n9 8873     4.086700e+02 2.291500e+02\n10 8873     7.404900e+02 3.456000e+02\n12 8873     6.535300e+02 3.140400e+02\n0 8874     7.556200e+02 1.085400e+02\n2 8874     6.758400e+02 1.634200e+02\n3 8874     5.308199e+02 -1.451700e+02\n7 8874     5.877700e+02 3.139700e+02\n9 8874     4.361400e+02 2.421700e+02\n10 8874     7.785200e+02 3.481900e+02\n12 8874     6.896000e+02 3.254800e+02\n0 8875     -8.441998e+01 1.071600e+02\n2 8875     -7.240997e+01 2.678003e+01\n4 8875     -1.974400e+02 -3.327000e+02\n5 8875     4.722500e+02 -5.616000e+02\n6 8875     -2.507100e+02 7.973999e+01\n7 8875     -2.075000e+02 1.926400e+02\n9 8875     -1.773800e+02 1.024600e+02\n10 8875     -2.030000e+02 2.578400e+02\n12 8875     -2.001700e+02 1.316600e+02\n13 8875     2.461500e+02 -1.485200e+02\n15 8875     -1.581300e+02 2.713400e+02\n0 8876     7.317900e+02 1.044900e+02\n3 8876     5.093700e+02 -1.604000e+02\n8 8876     5.958800e+02 8.723001e+01\n9 8876     4.169399e+02 2.283600e+02\n12 8876     6.627100e+02 3.107700e+02\n0 8877     3.571002e+01 9.951001e+01\n4 8877     -2.095800e+02 -4.397500e+02\n8 8877     1.456100e+02 5.385001e+01\n0 8878     7.439900e+02 9.714001e+01\n2 8878     6.671200e+02 1.467900e+02\n3 8878     5.232700e+02 -1.610900e+02\n7 8878     5.783500e+02 3.009500e+02\n9 8878     4.286600e+02 2.280800e+02\n10 8878     7.656200e+02 3.331900e+02\n12 8878     6.787200e+02 3.084600e+02\n0 8879     7.915200e+02 9.326001e+01\n2 8879     7.155500e+02 1.654800e+02\n3 8879     5.684900e+02 -1.418800e+02\n7 8879     6.242100e+02 3.059300e+02\n9 8879     4.686600e+02 2.448500e+02\n10 8879     8.222600e+02 3.341300e+02\n0 8880     7.915200e+02 9.326001e+01\n2 8880     7.155500e+02 1.654800e+02\n3 8880     5.684900e+02 -1.418800e+02\n7 8880     6.242100e+02 3.059300e+02\n9 8880     4.686600e+02 2.448500e+02\n10 8880     8.222600e+02 3.341300e+02\n0 8881     7.398101e+02 9.073999e+01\n2 8881     6.653000e+02 1.394500e+02\n3 8881     5.221500e+02 -1.686400e+02\n7 8881     5.752700e+02 2.948900e+02\n9 8881     4.272100e+02 2.216100e+02\n10 8881     7.608900e+02 3.255200e+02\n12 8881     6.765699e+02 3.005900e+02\n0 8882     -2.877600e+02 8.916000e+01\n2 8882     -4.424300e+02 -1.706900e+02\n4 8882     -1.951200e+02 -1.720600e+02\n7 8882     -4.387500e+02 1.213800e+02\n15 8882     -4.235500e+02 2.187300e+02\n0 8883     7.736400e+02 8.869000e+01\n2 8883     6.994700e+02 1.522600e+02\n3 8883     5.545200e+02 -1.547100e+02\n7 8883     6.074900e+02 2.984900e+02\n9 8883     4.556200e+02 2.334900e+02\n10 8883     8.003300e+02 3.268800e+02\n12 8883     7.137800e+02 3.100100e+02\n0 8884     -7.961700e+02 8.164001e+01\n13 8884     -4.587900e+02 -2.312900e+02\n0 8885     -6.289001e+01 8.212000e+01\n4 8885     -2.106600e+02 -3.590100e+02\n5 8885     5.323900e+02 -5.812700e+02\n6 8885     -1.725200e+02 8.010999e+01\n8 8885     4.341998e+01 5.709991e+00\n9 8885     -1.049500e+02 1.318400e+02\n10 8885     -1.756600e+02 2.298000e+02\n12 8885     -1.427200e+02 1.346800e+02\n13 8885     2.907900e+02 -1.605800e+02\n15 8885     -1.290100e+02 2.394200e+02\n0 8886     7.664600e+02 7.872998e+01\n2 8886     6.955000e+02 1.393200e+02\n3 8886     5.509800e+02 -1.666600e+02\n7 8886     6.026801e+02 2.882800e+02\n9 8886     4.529500e+02 2.232200e+02\n10 8886     7.940100e+02 3.152200e+02\n12 8886     7.095500e+02 2.954600e+02\n0 8887     6.160699e+02 7.648999e+01\n12 8887     5.389000e+02 2.359100e+02\n0 8888     7.866500e+02 7.717999e+01\n2 8888     7.152400e+02 1.479400e+02\n3 8888     5.695500e+02 -1.584100e+02\n7 8888     6.216899e+02 2.898800e+02\n9 8888     4.687600e+02 2.304700e+02\n10 8888     8.173800e+02 3.145700e+02\n12 8888     7.315800e+02 3.037800e+02\n0 8889     7.426400e+02 7.356000e+01\n2 8889     6.728101e+02 1.233500e+02\n3 8889     5.306200e+02 -1.833900e+02\n7 8889     5.799600e+02 2.778900e+02\n9 8889     4.341100e+02 2.079400e+02\n10 8889     7.651300e+02 3.053500e+02\n12 8889     6.834600e+02 2.803900e+02\n0 8890     -2.806900e+02 6.997998e+01\n7 8890     -4.269400e+02 1.042000e+02\n0 8891     2.129399e+02 7.051001e+01\n4 8891     -2.513700e+02 -5.813000e+02\n10 8891     1.460600e+02 2.450600e+02\n13 8891     5.449600e+02 -1.453300e+02\n15 8891     2.463400e+02 2.631500e+02\n0 8892     7.762700e+02 7.009003e+01\n2 8892     7.077600e+02 1.365800e+02\n3 8892     5.632800e+02 -1.696200e+02\n7 8892     6.134200e+02 2.813400e+02\n9 8892     4.636400e+02 2.208000e+02\n10 8892     8.058199e+02 3.054100e+02\n12 8892     7.231000e+02 2.921700e+02\n0 8893     8.430100e+02 6.481000e+01\n2 8893     7.740400e+02 1.610400e+02\n3 8893     6.243900e+02 -1.434300e+02\n7 8893     6.764500e+02 2.881400e+02\n9 8893     5.168400e+02 2.433100e+02\n12 8893     7.961801e+02 3.102900e+02\n0 8894     1.258002e+01 6.407001e+01\n3 8894     3.757001e+01 -2.291300e+02\n5 8894     6.438700e+02 -5.971100e+02\n10 8894     -8.542999e+01 2.157900e+02\n0 8895     7.156500e+02 6.246997e+01\n2 8895     6.473300e+02 9.935999e+01\n3 8895     5.078199e+02 -2.070400e+02\n6 8895     5.760000e+02 2.503400e+02\n7 8895     5.555400e+02 2.623500e+02\n8 8895     5.917100e+02 4.891000e+01\n9 8895     4.130500e+02 1.880200e+02\n10 8895     7.336700e+02 2.889800e+02\n12 8895     6.547000e+02 2.603300e+02\n0 8896     7.700601e+02 6.096997e+01\n2 8896     7.039000e+02 1.249700e+02\n3 8896     5.608900e+02 -1.808800e+02\n7 8896     6.082800e+02 2.714800e+02\n9 8896     4.605699e+02 2.108700e+02\n10 8896     7.992200e+02 2.938100e+02\n12 8896     7.189900e+02 2.791500e+02\n0 8897     7.902100e+02 5.904999e+01\n2 8897     7.241600e+02 1.326100e+02\n3 8897     5.790000e+02 -1.727100e+02\n7 8897     6.277100e+02 2.734100e+02\n9 8897     4.766899e+02 2.179200e+02\n10 8897     8.228500e+02 2.938800e+02\n12 8897     7.397300e+02 2.862300e+02\n0 8898     6.875800e+02 5.700000e+01\n2 8898     6.203900e+02 8.071997e+01\n3 8898     4.819700e+02 -2.266200e+02\n6 8898     5.455601e+02 2.339600e+02\n7 8898     5.291899e+02 2.518900e+02\n8 8898     5.685800e+02 3.437000e+01\n9 8898     3.914399e+02 1.709100e+02\n10 8898     7.010900e+02 2.798900e+02\n12 8898     6.249200e+02 2.441800e+02\n0 8899     2.034000e+02 5.508002e+01\n7 8899     1.069900e+02 2.005300e+02\n10 8899     1.374800e+02 2.264600e+02\n12 8899     1.930200e+02 1.895000e+02\n13 8899     5.415200e+02 -1.583000e+02\n15 8899     2.360200e+02 2.407200e+02\n0 8900     3.289978e+00 5.370001e+01\n4 8900     -2.365900e+02 -4.148500e+02\n6 8900     -5.820001e+01 7.633002e+01\n7 8900     -9.077002e+01 1.645900e+02\n13 8900     3.662300e+02 -1.770000e+02\n0 8901     1.472800e+02 5.319000e+01\n4 8901     -2.543900e+02 -5.313300e+02\n5 8901     8.125900e+02 -6.072300e+02\n6 8901     1.108700e+02 1.250400e+02\n8 8901     2.624300e+02 4.503000e+01\n12 8901     1.340900e+02 1.756500e+02\n13 8901     4.966200e+02 -1.635100e+02\n15 8901     1.589900e+02 2.301800e+02\n0 8902     1.472800e+02 5.319000e+01\n3 8902     1.774400e+02 -2.000800e+02\n5 8902     8.125900e+02 -6.072300e+02\n8 8902     2.624300e+02 4.503000e+01\n13 8902     4.966200e+02 -1.635100e+02\n0 8903     6.172400e+02 5.231000e+01\n2 8903     5.463600e+02 3.948999e+01\n3 8903     4.116100e+02 -2.698600e+02\n7 8903     4.611700e+02 2.333800e+02\n9 8903     3.298199e+02 1.332600e+02\n10 8903     6.190100e+02 2.674100e+02\n0 8904     8.114800e+02 4.921002e+01\n2 8904     7.471300e+02 1.341800e+02\n7 8904     6.489800e+02 2.685300e+02\n9 8904     4.965500e+02 2.197600e+02\n0 8905     2.178900e+02 4.765997e+01\n7 8905     1.215700e+02 1.950100e+02\n15 8905     2.564100e+02 2.318400e+02\n0 8906     6.691801e+02 4.556000e+01\n3 8906     4.676899e+02 -2.479600e+02\n6 8906     5.268400e+02 2.137900e+02\n8 8906     5.551801e+02 1.729001e+01\n9 8906     3.785601e+02 1.523500e+02\n10 8906     6.810000e+02 2.642100e+02\n0 8907     8.686500e+02 4.577002e+01\n3 8907     6.532000e+02 -1.480300e+02\n7 8907     7.028700e+02 2.752700e+02\n9 8907     5.422100e+02 2.394800e+02\n0 8908     5.317900e+02 4.540002e+01\n6 8908     3.573000e+02 1.570400e+02\n7 8908     3.774301e+02 2.094500e+02\n10 8908     5.196300e+02 2.509000e+02\n12 8908     4.460900e+02 1.678600e+02\n15 8908     7.068000e+02 2.722200e+02\n0 8909     5.317900e+02 4.540002e+01\n7 8909     3.774301e+02 2.094500e+02\n12 8909     4.460900e+02 1.678600e+02\n0 8910     5.684900e+02 4.547998e+01\n6 8910     4.030800e+02 1.721200e+02\n10 8910     5.625200e+02 2.540100e+02\n13 8910     7.833400e+02 -1.627600e+02\n15 8910     7.581300e+02 2.774300e+02\n0 8911     7.034700e+02 4.496997e+01\n2 8911     6.432700e+02 7.597998e+01\n3 8911     5.045000e+02 -2.301800e+02\n7 8911     5.468199e+02 2.431000e+02\n9 8911     4.115100e+02 1.678300e+02\n0 8912     5.143500e+02 4.060999e+01\n7 8912     3.605200e+02 2.011900e+02\n10 8912     4.996899e+02 2.428000e+02\n13 8912     7.278900e+02 -1.755200e+02\n15 8912     6.834301e+02 2.624000e+02\n0 8913     5.143500e+02 4.060999e+01\n7 8913     3.605200e+02 2.011900e+02\n10 8913     4.996899e+02 2.428000e+02\n15 8913     6.834301e+02 2.624000e+02\n0 8914     -1.115200e+02 4.034998e+01\n7 8914     -2.170400e+02 1.255500e+02\n10 8914     -2.273200e+02 1.766300e+02\n13 8914     2.438000e+02 -2.039500e+02\n15 8914     -1.878200e+02 1.760500e+02\n0 8915     4.637000e+01 3.815997e+01\n9 8915     4.107001e+01 1.537300e+02\n13 8915     4.101200e+02 -1.851800e+02\n15 8915     2.290997e+01 1.954000e+02\n0 8916     7.156000e+02 3.497998e+01\n2 8916     6.566000e+02 7.214001e+01\n3 8916     5.175500e+02 -2.329100e+02\n7 8916     5.594800e+02 2.360000e+02\n9 8916     4.220400e+02 1.653400e+02\n10 8916     7.360900e+02 2.576800e+02\n12 8916     6.634800e+02 2.300600e+02\n0 8917     -1.841300e+02 3.397998e+01\n3 8917     -2.312900e+02 -3.772700e+02\n4 8917     -2.321200e+02 -2.646700e+02\n6 8917     -3.311800e+02 -3.576001e+01\n7 8917     -2.939200e+02 1.042300e+02\n12 8917     -2.923000e+02 2.456000e+01\n15 8917     -2.845200e+02 1.575500e+02\n0 8918     7.057000e+02 2.892999e+01\n2 8918     6.454600e+02 6.215997e+01\n3 8918     5.091500e+02 -2.436000e+02\n6 8918     5.742900e+02 2.105600e+02\n8 8918     5.916100e+02 1.784000e+01\n9 8918     4.151700e+02 1.564100e+02\n12 8918     6.504600e+02 2.212000e+02\n0 8919     6.770200e+02 2.758002e+01\n2 8919     6.175800e+02 4.470001e+01\n3 8919     4.817500e+02 -2.612900e+02\n6 8919     5.412700e+02 1.967400e+02\n7 8919     5.228199e+02 2.210900e+02\n8 8919     5.665500e+02 4.959991e+00\n9 8919     3.906000e+02 1.409600e+02\n10 8919     6.904100e+02 2.448500e+02\n12 8919     6.209000e+02 2.063400e+02\n0 8920     6.770200e+02 2.758002e+01\n2 8920     6.175800e+02 4.470001e+01\n3 8920     4.817500e+02 -2.612900e+02\n6 8920     5.412700e+02 1.967400e+02\n7 8920     5.228199e+02 2.210900e+02\n8 8920     5.665500e+02 4.959991e+00\n9 8920     3.906000e+02 1.409600e+02\n10 8920     6.904100e+02 2.448500e+02\n0 8921     -1.199500e+02 2.700000e+01\n4 8921     -2.422700e+02 -3.136000e+02\n7 8921     -2.223900e+02 1.117100e+02\n10 8921     -2.357600e+02 1.600300e+02\n12 8921     -2.001700e+02 4.566998e+01\n15 8921     -1.978200e+02 1.570600e+02\n0 8922     -1.058700e+02 2.583002e+01\n7 8922     -2.077200e+02 1.128900e+02\n10 8922     -2.190900e+02 1.602000e+02\n15 8922     -1.787300e+02 1.575600e+02\n0 8923     8.808002e+01 2.638000e+01\n2 8923     2.332300e+02 7.665002e+01\n4 8923     -2.642900e+02 -4.832600e+02\n7 8923     -3.300171e-01 1.552100e+02\n8 8923     2.226800e+02 1.582999e+01\n12 8923     7.540997e+01 1.320200e+02\n15 8923     8.016998e+01 1.859800e+02\n0 8924     2.285900e+02 2.459003e+01\n3 8924     2.510601e+02 -2.174900e+02\n7 8924     1.355400e+02 1.743100e+02\n10 8924     1.686600e+02 1.930400e+02\n13 8924     5.652100e+02 -1.830600e+02\n0 8925     2.285900e+02 2.459003e+01\n2 8925     3.578199e+02 9.223999e+01\n3 8925     2.510601e+02 -2.174900e+02\n6 8925     1.980600e+02 1.142800e+02\n7 8925     1.355400e+02 1.743100e+02\n8 8925     3.290400e+02 2.962000e+01\n10 8925     1.686600e+02 1.930400e+02\n12 8925     2.277900e+02 1.602800e+02\n13 8925     5.652100e+02 -1.830600e+02\n15 8925     2.732300e+02 2.020800e+02\n0 8926     -4.342300e+02 2.407001e+01\n8 8926     -4.200500e+02 -2.304400e+02\n0 8927     7.190400e+02 1.909003e+01\n3 8927     5.260699e+02 -2.461700e+02\n7 8927     5.649000e+02 2.211800e+02\n9 8927     4.283400e+02 1.537200e+02\n10 8927     7.413000e+02 2.390700e+02\n0 8928     -1.771200e+02 1.802002e+01\n4 8928     -2.423100e+02 -2.703400e+02\n6 8928     -3.093300e+02 -4.842999e+01\n15 8928     -2.726300e+02 1.363000e+02\n0 8929     6.897200e+02 1.781000e+01\n2 8929     6.342500e+02 4.184998e+01\n3 8929     4.977800e+02 -2.638200e+02\n6 8929     5.588800e+02 1.912500e+02\n7 8929     5.365200e+02 2.143800e+02\n8 8929     5.797800e+02 1.750000e+00\n9 8929     4.039700e+02 1.388100e+02\n10 8929     7.067400e+02 2.347300e+02\n0 8930     8.681300e+02 1.734998e+01\n2 8930     8.131300e+02 1.275400e+02\n3 8930     6.630400e+02 -1.734200e+02\n7 8930     7.059600e+02 2.479700e+02\n9 8930     5.492200e+02 2.167500e+02\n0 8931     -7.628998e+01 1.622998e+01\n7 8931     -1.720500e+02 1.111600e+02\n15 8931     -1.382100e+02 1.485100e+02\n0 8932     8.103199e+02 1.535999e+01\n2 8932     7.577000e+02 9.990997e+01\n7 8932     6.519700e+02 2.356100e+02\n9 8932     5.045300e+02 1.917400e+02\n12 8932     7.750900e+02 2.456100e+02\n0 8933     8.103199e+02 1.535999e+01\n7 8933     6.519700e+02 2.356100e+02\n9 8933     5.045300e+02 1.917400e+02\n0 8934     -1.544500e+02 1.377002e+01\n7 8934     -2.583200e+02 9.029999e+01\n10 8934     -2.744600e+02 1.413800e+02\n15 8934     -2.415800e+02 1.344200e+02\n0 8935     7.308400e+02 8.429993e+00\n2 8935     6.804800e+02 5.397998e+01\n3 8935     5.414399e+02 -2.504000e+02\n7 8935     5.776200e+02 2.135800e+02\n9 8935     4.421100e+02 1.505900e+02\n10 8935     7.563199e+02 2.280400e+02\n12 8935     6.874399e+02 2.068800e+02\n0 8936     6.970601e+02 -1.130005e+00\n2 8936     6.482000e+02 2.588000e+01\n3 8936     5.128600e+02 -2.783700e+02\n6 8936     5.723101e+02 1.732100e+02\n9 8936     4.162800e+02 1.261100e+02\n12 8936     6.502800e+02 1.829200e+02\n0 8937     -1.138100e+02 -2.359985e+00\n7 8937     -2.079800e+02 8.512000e+01\n10 8937     -2.253900e+02 1.270000e+02\n15 8937     -1.858400e+02 1.184100e+02\n0 8938     -4.837800e+02 -6.859985e+00\n2 8938     -6.354300e+02 -3.024100e+02\n13 8938     -1.500800e+02 -2.897000e+02\n0 8939     7.329700e+02 -6.159973e+00\n2 8939     6.868000e+02 3.972998e+01\n3 8939     5.486000e+02 -2.632300e+02\n7 8939     5.817800e+02 1.996300e+02\n9 8939     4.478900e+02 1.390800e+02\n10 8939     7.597300e+02 2.113100e+02\n12 8939     6.942300e+02 1.909400e+02\n0 8940     -3.722200e+02 -8.159973e+00\n2 8940     -4.843100e+02 -2.730700e+02\n7 8940     -5.028300e+02 1.246002e+01\n13 8940     -4.691998e+01 -2.830000e+02\n15 8940     -5.269400e+02 7.388000e+01\n0 8941     -3.722200e+02 -8.159973e+00\n13 8941     -4.691998e+01 -2.830000e+02\n15 8941     -5.269400e+02 7.388000e+01\n0 8942     6.737200e+02 -7.590027e+00\n2 8942     6.239700e+02 7.969971e+00\n3 8942     4.898900e+02 -2.969100e+02\n6 8942     5.465500e+02 1.573600e+02\n7 8942     5.245100e+02 1.870600e+02\n8 8942     5.707500e+02 -2.513000e+01\n9 8942     3.962200e+02 1.103300e+02\n10 8942     6.899000e+02 2.034200e+02\n12 8942     6.255699e+02 1.672700e+02\n0 8943     6.481200e+02 -1.083002e+01\n2 8943     5.973199e+02 -1.008002e+01\n6 8943     5.164700e+02 1.421700e+02\n7 8943     4.999200e+02 1.784400e+02\n8 8943     5.486700e+02 -3.913000e+01\n9 8943     3.744301e+02 9.429001e+01\n10 8943     6.594900e+02 1.974900e+02\n12 8943     5.966200e+02 1.519700e+02\n13 8943     8.739600e+02 -2.028300e+02\n0 8944     7.086899e+02 -1.077002e+01\n2 8944     6.623400e+02 2.278003e+01\n3 8944     5.263500e+02 -2.809200e+02\n7 8944     5.588300e+02 1.906600e+02\n9 8944     4.282700e+02 1.239800e+02\n10 8944     7.309100e+02 2.031400e+02\n12 8944     6.666899e+02 1.774000e+02\n0 8945     -3.647500e+02 -1.298999e+01\n2 8945     -4.694700e+02 -2.756500e+02\n7 8945     -4.923900e+02 8.859985e+00\n8 8945     -3.287700e+02 -2.436800e+02\n13 8945     -3.746002e+01 -2.871700e+02\n0 8946     -3.701400e+02 -1.485999e+01\n2 8946     -4.778700e+02 -2.791800e+02\n7 8946     -5.000400e+02 5.159973e+00\n8 8946     -3.348200e+02 -2.461800e+02\n13 8946     -4.331000e+01 -2.893100e+02\n15 8946     -5.245200e+02 6.414001e+01\n0 8947     6.854301e+02 -1.721997e+01\n2 8947     6.397700e+02 3.809998e+00\n3 8947     5.056400e+02 -3.001100e+02\n6 8947     5.631400e+02 1.507900e+02\n7 8947     5.370300e+02 1.798300e+02\n8 8947     5.839301e+02 -2.945001e+01\n9 8947     4.096801e+02 1.072800e+02\n10 8947     7.042000e+02 1.936800e+02\n12 8947     6.416200e+02 1.601400e+02\n0 8948     6.994600e+02 -1.695001e+01\n2 8948     6.565601e+02 1.078998e+01\n9 8948     4.233300e+02 1.141800e+02\n10 8948     7.223700e+02 1.944800e+02\n0 8949     -8.183002e+01 -2.338000e+01\n7 8949     -1.701600e+02 7.106000e+01\n10 8949     -1.860600e+02 1.054600e+02\n15 8949     -1.410900e+02 9.414001e+01\n0 8950     -4.427800e+02 -2.392999e+01\n10 8950     -6.097400e+02 6.741998e+01\n13 8950     -1.073100e+02 -3.007200e+02\n15 8950     -6.204700e+02 4.353998e+01\n0 8951     7.109200e+02 -2.606000e+01\n3 8951     5.334100e+02 -2.939000e+02\n7 8951     5.631700e+02 1.764000e+02\n10 8951     7.352500e+02 1.856400e+02\n12 8951     6.730400e+02 1.609800e+02\n0 8952     7.109200e+02 -2.606000e+01\n2 8952     6.690900e+02 8.500000e+00\n3 8952     5.334100e+02 -2.939000e+02\n7 8952     5.631700e+02 1.764000e+02\n9 8952     4.340500e+02 1.123900e+02\n10 8952     7.352500e+02 1.856400e+02\n12 8952     6.730400e+02 1.609800e+02\n0 8953     -3.952700e+02 -2.913000e+01\n2 8953     -4.998500e+02 -2.975000e+02\n8 8953     -3.535700e+02 -2.609100e+02\n13 8953     -6.295001e+01 -3.033000e+02\n15 8953     -5.566200e+02 4.284998e+01\n0 8954     -4.279600e+02 -3.053003e+01\n2 8954     -5.426400e+02 -3.074300e+02\n13 8954     -9.296002e+01 -3.062700e+02\n15 8954     -6.008400e+02 3.584998e+01\n0 8955     6.857900e+02 -3.108002e+01\n3 8955     5.105900e+02 -3.142100e+02\n7 8955     5.393700e+02 1.665300e+02\n8 8955     5.871300e+02 -4.070999e+01\n0 8956     6.857900e+02 -3.108002e+01\n3 8956     5.105900e+02 -3.142100e+02\n7 8956     5.393700e+02 1.665300e+02\n0 8957     -7.296002e+01 -3.458002e+01\n7 8957     -1.588300e+02 6.172998e+01\n10 8957     -1.743200e+02 9.334998e+01\n15 8957     -1.276700e+02 7.969000e+01\n0 8958     -3.227002e+01 -3.610999e+01\n2 8958     1.133700e+02 -3.453003e+01\n3 8958     2.809003e+01 -3.440700e+02\n4 8958     -2.936700e+02 -3.839700e+02\n7 8958     -1.139200e+02 6.940002e+01\n10 8958     -1.272600e+02 9.572998e+01\n13 8958     3.437400e+02 -2.576700e+02\n15 8958     -7.342999e+01 8.397000e+01\n0 8959     8.675500e+02 -3.632001e+01\n9 8959     5.627000e+02 1.738900e+02\n0 8960     3.462000e+01 -4.004999e+01\n4 8960     -3.038300e+02 -4.393000e+02\n7 8960     -4.392999e+01 8.064001e+01\n10 8960     -4.965002e+01 9.896002e+01\n13 8960     4.090000e+02 -2.524600e+02\n0 8961     -4.531300e+02 -4.131000e+01\n7 8961     -5.795700e+02 -3.548999e+01\n13 8961     -1.135000e+02 -3.168100e+02\n0 8962     6.964700e+02 -4.101001e+01\n2 8962     6.574399e+02 -1.409003e+01\n3 8962     5.235900e+02 -3.169500e+02\n7 8962     5.505500e+02 1.596000e+02\n9 8962     4.250200e+02 9.316000e+01\n10 8962     7.192900e+02 1.668900e+02\n12 8962     6.595900e+02 1.390900e+02\n0 8963     8.363300e+02 -4.159998e+01\n2 8963     8.008101e+02 5.773999e+01\n3 8963     6.570100e+02 -2.413000e+02\n7 8963     6.839399e+02 1.866500e+02\n9 8963     5.416801e+02 1.580000e+02\n12 8963     8.189900e+02 1.939400e+02\n0 8964     7.042700e+02 -4.175000e+01\n2 8964     6.666200e+02 -1.083002e+01\n3 8964     5.319600e+02 -3.128800e+02\n7 8964     5.585800e+02 1.597000e+02\n9 8964     4.325900e+02 9.614001e+01\n10 8964     7.285400e+02 1.665300e+02\n12 8964     6.695699e+02 1.410200e+02\n0 8965     7.042700e+02 -4.175000e+01\n9 8965     4.325900e+02 9.614001e+01\n12 8965     6.695699e+02 1.410200e+02\n0 8966     6.734900e+02 -4.628003e+01\n2 8966     6.354700e+02 -3.251001e+01\n3 8966     5.039800e+02 -3.362300e+02\n6 8966     5.568300e+02 1.137700e+02\n7 8966     5.297000e+02 1.493400e+02\n8 8966     5.799900e+02 -5.908002e+01\n9 8966     4.067500e+02 7.678998e+01\n12 8966     6.355699e+02 1.231800e+02\n0 8967     1.557800e+02 -4.984998e+01\n2 8967     3.289600e+02 1.800000e+01\n7 8967     8.003998e+01 9.112000e+01\n8 8967     3.007400e+02 -3.644000e+01\n15 8967     1.829600e+02 9.101001e+01\n0 8968     6.969301e+02 -5.339001e+01\n3 8968     5.303700e+02 -3.296400e+02\n7 8968     5.531600e+02 1.475100e+02\n9 8968     4.301000e+02 8.214001e+01\n0 8969     6.969301e+02 -5.339001e+01\n3 8969     5.303700e+02 -3.296400e+02\n9 8969     4.301000e+02 8.214001e+01\n0 8970     -4.719700e+02 -5.420001e+01\n2 8970     -5.870700e+02 -3.420000e+02\n8 8970     -4.257800e+02 -2.979800e+02\n0 8971     -4.504900e+02 -5.509998e+01\n2 8971     -5.571500e+02 -3.365100e+02\n0 8972     1.857000e+02 -6.013000e+01\n10 8972     1.280500e+02 9.059003e+01\n13 8972     5.430100e+02 -2.577900e+02\n0 8973     1.745000e+02 -6.134003e+01\n12 8973     2.003000e+02 5.306000e+01\n15 8973     2.096200e+02 7.750000e+01\n0 8974     6.764900e+02 -6.003998e+01\n3 8974     5.129700e+02 -3.488200e+02\n6 8974     5.633900e+02 9.960999e+01\n8 8974     5.854399e+02 -6.954999e+01\n9 8974     4.135699e+02 6.613000e+01\n12 8974     6.419500e+02 1.095500e+02\n0 8975     8.090699e+02 -6.742999e+01\n2 8975     7.814600e+02 1.758002e+01\n7 8975     6.618700e+02 1.566400e+02\n9 8975     5.267000e+02 1.241000e+02\n12 8975     7.944900e+02 1.536100e+02\n0 8976     8.090699e+02 -6.742999e+01\n7 8976     6.618700e+02 1.566400e+02\n0 8977     -4.054400e+02 -6.789001e+01\n2 8977     -4.874300e+02 -3.340900e+02\n7 8977     -5.230200e+02 -5.197998e+01\n13 8977     -6.340002e+01 -3.368200e+02\n15 8977     -5.652400e+02 -1.078998e+01\n0 8978     1.922100e+02 -6.983002e+01\n6 8978     1.996900e+02 2.960022e+00\n7 8978     1.185900e+02 7.685999e+01\n13 8978     5.505900e+02 -2.662400e+02\n0 8979     1.922100e+02 -6.983002e+01\n2 8979     3.669500e+02 3.400269e-01\n6 8979     1.996900e+02 2.960022e+00\n7 8979     1.185900e+02 7.685999e+01\n10 8979     1.370000e+02 8.022998e+01\n15 8979     2.360400e+02 6.821997e+01\n0 8980     7.175400e+02 -7.152002e+01\n2 8980     6.899399e+02 -3.483002e+01\n3 8980     5.572600e+02 -3.359200e+02\n7 8980     5.753700e+02 1.342100e+02\n9 8980     4.525300e+02 7.715997e+01\n10 8980     7.465601e+02 1.336000e+02\n12 8980     6.930400e+02 1.126300e+02\n0 8981     6.904800e+02 -7.228003e+01\n2 8981     6.632900e+02 -5.085999e+01\n3 8981     5.324399e+02 -3.526900e+02\n7 8981     5.500300e+02 1.277800e+02\n9 8981     4.306801e+02 6.288000e+01\n10 8981     7.153000e+02 1.297600e+02\n12 8981     6.641300e+02 9.995001e+01\n0 8982     8.639399e+02 -7.184003e+01\n3 8982     6.944700e+02 -2.556500e+02\n7 8982     7.141100e+02 1.629100e+02\n9 8982     5.722800e+02 1.459600e+02\n0 8983     8.328900e+02 -7.414001e+01\n2 8983     8.082100e+02 2.470001e+01\n7 8983     6.853600e+02 1.550400e+02\n0 8984     -4.167200e+02 -8.106000e+01\n2 8984     -4.939900e+02 -3.499100e+02\n7 8984     -5.318600e+02 -6.757001e+01\n8 8984     -3.539700e+02 -3.054200e+02\n10 8984     -5.732000e+02 3.250000e+00\n13 8984     -7.016998e+01 -3.497200e+02\n15 8984     -5.779200e+02 -3.204999e+01\n0 8985     5.059998e+00 -8.241998e+01\n3 8985     9.237000e+01 -3.736500e+02\n4 8985     -3.316100e+02 -4.131300e+02\n6 8985     -5.320007e+00 -7.602002e+01\n7 8985     -6.658002e+01 3.040997e+01\n8 8985     1.730800e+02 -1.018700e+02\n10 8985     -7.847998e+01 4.535999e+01\n13 8985     3.845400e+02 -2.933200e+02\n15 8985     -1.651001e+01 2.571997e+01\n0 8986     1.062000e+01 -8.826001e+01\n3 8986     1.014200e+02 -3.780500e+02\n10 8986     -7.202002e+01 3.922998e+01\n15 8986     -8.520020e+00 1.897998e+01\n0 8987     -4.037400e+02 -9.257001e+01\n2 8987     -4.673500e+02 -3.549800e+02\n7 8987     -5.158500e+02 -7.622998e+01\n9 8987     -4.970400e+02 -2.443000e+02\n10 8987     -5.566800e+02 -9.909973e+00\n13 8987     -5.625000e+01 -3.583900e+02\n15 8987     -5.600400e+02 -4.484003e+01\n0 8988     2.009900e+02 -9.335999e+01\n2 8988     3.795500e+02 -2.659003e+01\n3 8988     2.796200e+02 -3.293000e+02\n7 8988     1.294700e+02 5.453998e+01\n10 8988     1.484000e+02 5.383002e+01\n13 8988     5.592500e+02 -2.866600e+02\n15 8988     2.503400e+02 3.747998e+01\n0 8989     9.350000e+01 -9.385999e+01\n2 8989     2.825000e+02 -4.648999e+01\n3 8989     1.914800e+02 -3.504600e+02\n4 8989     -3.535600e+02 -4.855601e+02\n6 8989     1.053200e+02 -5.519000e+01\n7 8989     2.548999e+01 3.653003e+01\n8 8989     2.589600e+02 -8.754999e+01\n9 8989     1.298100e+02 5.733002e+01\n10 8989     2.488000e+01 4.202002e+01\n12 8989     1.179400e+02 -7.159973e+00\n13 8989     4.681700e+02 -2.949200e+02\n15 8989     1.047100e+02 2.229999e+01\n0 8990     -6.890997e+01 -1.005100e+02\n7 8990     -1.394000e+02 -9.199829e-01\n10 8990     -1.630200e+02 1.697998e+01\n13 8990     3.199900e+02 -3.168600e+02\n15 8990     -1.142100e+02 -8.270020e+00\n0 8991     -2.129999e+01 -1.041800e+02\n7 8991     -8.762000e+01 5.530029e+00\n10 8991     -1.065200e+02 1.803998e+01\n0 8992     7.584800e+02 -1.039900e+02\n2 8992     7.418400e+02 -4.677002e+01\n7 8992     6.191300e+02 1.120600e+02\n9 8992     4.963400e+02 6.823999e+01\n10 8992     7.970200e+02 9.970001e+01\n12 8992     7.476400e+02 9.202002e+01\n0 8993     7.584800e+02 -1.039900e+02\n7 8993     6.191300e+02 1.120600e+02\n0 8994     7.067200e+02 -1.080700e+02\n2 8994     6.895800e+02 -7.846997e+01\n3 8994     5.603900e+02 -3.789900e+02\n7 8994     5.699399e+02 9.698999e+01\n9 8994     4.536700e+02 4.085999e+01\n12 8994     6.908700e+02 6.815002e+01\n0 8995     8.441300e+02 -1.094400e+02\n3 8995     6.903600e+02 -3.011500e+02\n7 8995     7.004500e+02 1.234300e+02\n9 8995     5.669900e+02 1.062700e+02\n0 8996     2.499900e+02 -1.149200e+02\n13 8996     6.008400e+02 -3.035600e+02\n15 8996     3.209800e+02 1.423999e+01\n0 8997     2.388600e+02 -1.192400e+02\n10 8997     1.941899e+02 2.769000e+01\n13 8997     5.915601e+02 -3.080400e+02\n0 8998     2.145900e+02 -1.218800e+02\n10 8998     1.668800e+02 2.237000e+01\n13 8998     5.729900e+02 -3.116000e+02\n15 8998     2.738700e+02 9.400024e-01\n0 8999     7.745500e+02 -1.216200e+02\n2 8999     7.647400e+02 -5.495001e+01\n3 8999     6.314200e+02 -3.520500e+02\n7 8999     6.361700e+02 9.826001e+01\n9 8999     5.152900e+02 6.331000e+01\n10 8999     8.172700e+02 8.203003e+01\n12 8999     7.714700e+02 8.128003e+01\n0 9000     1.962600e+02 -1.238600e+02\n13 9000     5.586899e+02 -3.142200e+02\n0 9001     -1.031600e+02 -1.279100e+02\n10 9001     -1.992400e+02 -1.766998e+01\n12 9001     -1.105200e+02 -1.125300e+02\n15 9001     -1.563400e+02 -5.029999e+01\n0 9002     1.186400e+02 -1.459800e+02\n13 9002     4.998400e+02 -3.380700e+02\n15 9002     1.453199e+02 -4.484998e+01\n0 9003     2.937000e+02 -1.533800e+02\n10 9003     2.616400e+02 -5.130005e+00\n13 9003     6.431000e+02 -3.350100e+02\n15 9003     3.865800e+02 -3.256000e+01\n0 9004     8.540200e+02 -1.542800e+02\n9 9004     5.877100e+02 7.503998e+01\n0 9005     7.654600e+02 -1.586300e+02\n2 9005     7.660601e+02 -9.728003e+01\n7 9005     6.324200e+02 6.115997e+01\n9 9005     5.172000e+02 2.800000e+01\n0 9006     -4.229300e+02 -1.653300e+02\n7 9006     -5.187400e+02 -1.512900e+02\n15 9006     -5.774400e+02 -1.459600e+02\n0 9007     -4.491800e+02 -1.945800e+02\n7 9007     -5.392200e+02 -1.849600e+02\n15 9007     -6.101300e+02 -1.891000e+02\n0 9008     -4.124200e+02 -2.098600e+02\n7 9008     -4.958800e+02 -1.927300e+02\n8 9008     -2.860500e+02 -4.053900e+02\n15 9008     -5.576200e+02 -2.043200e+02\n0 9009     -9.428998e+01 -2.145700e+02\n4 9009     -4.150700e+02 -3.258400e+02\n7 9009     -1.481700e+02 -1.243300e+02\n10 9009     -1.795800e+02 -1.187400e+02\n12 9009     -8.201001e+01 -2.263800e+02\n15 9009     -1.317000e+02 -1.672100e+02\n0 9010     7.879999e+01 -2.194900e+02\n3 9010     2.453900e+02 -4.652500e+02\n4 9010     -4.473000e+02 -4.762400e+02\n8 9010     2.925400e+02 -1.909300e+02\n12 9010     1.478600e+02 -1.512500e+02\n13 9010     4.774100e+02 -4.055900e+02\n15 9010     1.001100e+02 -1.496900e+02\n0 9011     -8.409973e+00 -2.207400e+02\n2 9011     2.326300e+02 -2.050200e+02\n3 9011     1.568100e+02 -5.044600e+02\n7 9011     -5.313000e+01 -1.075700e+02\n8 9011     2.094600e+02 -2.184600e+02\n0 9012     1.464200e+02 -2.222000e+02\n4 9012     -4.637300e+02 -5.336500e+02\n6 9012     2.173600e+02 -1.746899e+02\n12 9012     2.269800e+02 -1.342700e+02\n13 9012     5.367500e+02 -4.027100e+02\n15 9012     1.919500e+02 -1.443600e+02\n0 9013     -1.064500e+02 -2.224300e+02\n2 9013     7.865997e+01 -2.881300e+02\n3 9013     3.450012e+00 -5.953900e+02\n4 9013     -4.180300e+02 -3.141800e+02\n6 9013     -1.039500e+02 -2.949600e+02\n7 9013     -1.606600e+02 -1.345400e+02\n8 9013     8.785999e+01 -2.796900e+02\n9 9013     -2.871997e+01 -1.515300e+02\n10 9013     -1.920300e+02 -1.275800e+02\n12 9013     -9.798999e+01 -2.411400e+02\n15 9013     -1.459500e+02 -1.782400e+02\n0 9014     1.340700e+02 -2.244000e+02\n3 9014     2.977600e+02 -4.550400e+02\n4 9014     -4.631500e+02 -5.233700e+02\n6 9014     2.052000e+02 -1.812200e+02\n8 9014     3.403400e+02 -1.840100e+02\n10 9014     8.525000e+01 -1.040300e+02\n12 9014     2.121801e+02 -1.408200e+02\n0 9015     -4.327600e+02 -2.273100e+02\n10 9015     -5.744300e+02 -1.699500e+02\n12 9015     -5.455600e+02 -3.935700e+02\n15 9015     -5.829100e+02 -2.315400e+02\n0 9016     1.042200e+02 -2.333700e+02\n4 9016     -4.644000e+02 -4.991300e+02\n6 9016     1.815600e+02 -2.002200e+02\n7 9016     6.362000e+01 -9.803998e+01\n8 9016     3.217700e+02 -1.957000e+02\n10 9016     5.225000e+01 -1.171600e+02\n12 9016     1.841800e+02 -1.581300e+02\n15 9016     1.358400e+02 -1.645700e+02\n0 9017     8.603003e+01 -2.359200e+02\n4 9017     -4.631000e+02 -4.843400e+02\n6 9017     1.646500e+02 -2.078900e+02\n7 9017     4.722998e+01 -1.031800e+02\n9 9017     1.938101e+02 -4.784998e+01\n12 9017     1.656200e+02 -1.660800e+02\n0 9018     1.002600e+02 -2.463500e+02\n3 9018     2.872700e+02 -4.757600e+02\n4 9018     -4.736700e+02 -4.980500e+02\n6 9018     1.855800e+02 -2.126300e+02\n7 9018     6.383002e+01 -1.100900e+02\n8 9018     3.254200e+02 -2.031300e+02\n9 9018     2.109500e+02 -4.864001e+01\n10 9018     4.944000e+01 -1.333100e+02\n12 9018     1.867700e+02 -1.714300e+02\n15 9018     1.326100e+02 -1.831400e+02\n0 9019     3.378998e+01 -2.523300e+02\n2 9019     2.835000e+02 -2.339000e+02\n3 9019     2.029600e+02 -5.320900e+02\n4 9019     -4.666700e+02 -4.338500e+02\n6 9019     9.764001e+01 -2.560300e+02\n7 9019     -6.229980e+00 -1.322200e+02\n8 9019     2.529900e+02 -2.441800e+02\n9 9019     1.397200e+02 -9.662000e+01\n10 9019     -2.728003e+01 -1.467900e+02\n12 9019     9.914001e+01 -2.123700e+02\n13 9019     4.347200e+02 -4.424301e+02\n15 9019     4.469000e+01 -1.998800e+02\n0 9020     9.640997e+01 -2.529200e+02\n3 9020     2.866600e+02 -4.834800e+02\n4 9020     -4.781900e+02 -4.931899e+02\n6 9020     1.829100e+02 -2.225300e+02\n7 9020     6.160999e+01 -1.172100e+02\n8 9020     3.239900e+02 -2.106200e+02\n9 9020     2.106801e+02 -5.596002e+01\n10 9020     4.458002e+01 -1.408200e+02\n12 9020     1.834000e+02 -1.815500e+02\n15 9020     1.265900e+02 -1.926300e+02\n0 9021     -9.659003e+01 -2.566900e+02\n2 9021     9.553003e+01 -3.327500e+02\n6 9021     -8.626999e+01 -3.361000e+02\n7 9021     -1.468100e+02 -1.687100e+02\n9 9021     -1.187000e+01 -1.886500e+02\n10 9021     -1.769800e+02 -1.657600e+02\n12 9021     -8.021002e+01 -2.823500e+02\n13 9021     2.951500e+02 -4.667700e+02\n15 9021     -1.271800e+02 -2.234700e+02\n0 9022     3.717999e+01 -2.601100e+02\n2 9022     2.871500e+02 -2.465300e+02\n3 9022     2.072900e+02 -5.444700e+02\n4 9022     -4.739400e+02 -4.356500e+02\n6 9022     1.015300e+02 -2.661600e+02\n8 9022     2.561700e+02 -2.533300e+02\n9 9022     1.428199e+02 -1.068100e+02\n12 9022     1.036900e+02 -2.232500e+02\n15 9022     5.134998e+01 -2.101700e+02\n0 9023     -8.377100e+02 -2.841200e+02\n4 9023     -3.494200e+02 1.713600e+02\n0 9024     6.524301e+02 -2.906800e+02\n7 9024     5.586801e+02 -7.829999e+01\n0 9025     7.943000e+02 -3.126200e+02\n7 9025     6.869301e+02 -7.400000e+01\n0 9026     7.605100e+02 -3.245000e+02\n7 9026     6.605000e+02 -9.028998e+01\n0 9027     1.593199e+02 -3.288100e+02\n7 9027     1.253900e+02 -1.880600e+02\n10 9027     1.248700e+02 -2.207900e+02\n15 9027     2.266300e+02 -2.876200e+02\n0 9028     7.524000e+02 -3.435800e+02\n7 9028     6.582100e+02 -1.081400e+02\n0 9029     7.285200e+02 -3.590000e+02\n7 9029     6.399301e+02 -1.257800e+02\n0 9030     2.976801e+02 -3.742200e+02\n7 9030     2.622700e+02 -2.096400e+02\n0 9031     6.829100e+02 -3.806800e+02\n7 9031     6.059100e+02 -1.529800e+02\n0 9032     -2.086300e+02 -4.358500e+02\n7 9032     -2.269400e+02 -3.725800e+02\n10 9032     -2.866300e+02 -3.846500e+02\n15 9032     -2.542400e+02 -4.810000e+02\n0 9033     -1.673300e+02 -4.561700e+02\n6 9033     -8.500000e+01 -6.081100e+02\n0 9034     7.416500e+02 -4.746600e+02\n7 9034     6.769600e+02 -2.259400e+02\n0 9035     5.660800e+02 -4.774600e+02\n2 9035     8.144301e+02 -3.753100e+02\n10 9035     6.066899e+02 -3.473300e+02\n12 9035     7.212100e+02 -3.299200e+02\n15 9035     8.104399e+02 -4.409900e+02\n0 9036     4.739200e+02 -4.815900e+02\n7 9036     4.441600e+02 -2.822100e+02\n0 9037     1.312100e+02 -5.101899e+02\n2 9037     4.607600e+02 -5.304399e+02\n10 9037     1.123400e+02 -4.310900e+02\n0 9038     1.221300e+02 -5.193500e+02\n7 9038     1.215600e+02 -3.850700e+02\n9 9038     2.949900e+02 -3.441300e+02\n0 9039     -9.452002e+01 -5.352300e+02\n6 9039     5.022998e+01 -6.576899e+02\n0 9040     4.511200e+02 -5.363600e+02\n7 9040     4.351600e+02 -3.352400e+02\n0 9041     1.332001e+01 -5.372200e+02\n2 9041     3.610300e+02 -5.981400e+02\n7 9041     2.013000e+01 -4.235200e+02\n9 9041     2.223600e+02 -3.917300e+02\n0 9042     -3.228600e+02 -5.392500e+02\n4 9042     -6.299800e+02 -1.347200e+02\n6 9042     -2.132000e+02 -7.748800e+02\n9 9042     -7.626001e+01 -5.289100e+02\n0 9043     7.084900e+02 -5.384500e+02\n7 9043     6.626801e+02 -2.876400e+02\n0 9044     4.688600e+02 -5.411200e+02\n2 9044     7.842300e+02 -4.484301e+02\n7 9044     4.529301e+02 -3.362800e+02\n0 9045     5.215002e+01 -5.483800e+02\n2 9045     4.134500e+02 -5.933900e+02\n7 9045     6.189001e+01 -4.265300e+02\n0 9046     6.433002e+01 -5.505900e+02\n2 9046     4.237900e+02 -5.907200e+02\n7 9046     7.333002e+01 -4.258500e+02\n0 9047     2.890015e+00 -5.507500e+02\n7 9047     1.302002e+01 -4.390300e+02\n9 9047     2.244700e+02 -4.039300e+02\n0 9048     7.644000e+01 -5.504000e+02\n2 9048     4.434000e+02 -5.839800e+02\n9 9048     2.870200e+02 -3.765600e+02\n10 9048     5.821997e+01 -4.834700e+02\n0 9049     1.225800e+02 -5.585400e+02\n2 9049     4.888900e+02 -5.761500e+02\n6 9049     2.979200e+02 -5.855601e+02\n0 9050     5.597100e+02 -5.600300e+02\n7 9050     5.387500e+02 -3.364800e+02\n0 9051     3.437000e+01 -5.611801e+02\n2 9051     4.025400e+02 -6.099000e+02\n12 9051     1.945800e+02 -5.942100e+02\n0 9052     4.227002e+01 -5.707400e+02\n2 9052     4.178300e+02 -6.160800e+02\n4 9052     -7.553500e+02 -4.284300e+02\n7 9052     5.707001e+01 -4.496100e+02\n9 9052     2.695500e+02 -4.023400e+02\n0 9053     -1.515600e+02 5.830800e+02\n2 9053     -4.391600e+02 3.558500e+02\n3 9053     -5.631100e+02 2.551001e+01\n4 9053     7.128998e+01 -2.789100e+02\n5 9053     2.616100e+02 -6.509998e+01\n8 9053     -2.825300e+02 2.706500e+02\n11 9053     1.203003e+01 -1.977100e+02\n12 9053     -4.848700e+02 5.873700e+02\n13 9053     7.160999e+01 2.316000e+02\n0 9054     7.778998e+01 5.818400e+02\n4 9054     5.776001e+01 -4.142200e+02\n11 9054     2.119400e+02 -1.915900e+02\n0 9055     -5.182300e+02 5.786300e+02\n2 9055     -8.148000e+02 3.619800e+02\n4 9055     9.128998e+01 -8.444000e+01\n5 9055     -8.678998e+01 -6.803003e+01\n8 9055     -5.877800e+02 2.667300e+02\n11 9055     -2.963200e+02 -2.045900e+02\n13 9055     -2.138900e+02 2.123400e+02\n14 9055     -1.715000e+02 -1.648000e+02\n0 9056     2.821000e+02 5.773400e+02\n2 9056     -5.131000e+01 3.432800e+02\n4 9056     4.338000e+01 -5.470200e+02\n5 9056     6.823000e+02 -6.352002e+01\n9 9056     -1.981000e+02 3.714900e+02\n11 9056     3.940699e+02 -1.849500e+02\n13 9056     4.098199e+02 2.522900e+02\n14 9056     5.815200e+02 -1.444100e+02\n0 9057     -5.300100e+02 5.768300e+02\n2 9057     -8.283400e+02 3.606500e+02\n5 9057     -9.840997e+01 -6.959003e+01\n8 9057     -5.987300e+02 2.655400e+02\n0 9058     -4.625600e+02 5.758400e+02\n2 9058     -7.536500e+02 3.557700e+02\n4 9058     8.632001e+01 -1.121100e+02\n5 9058     -3.475000e+01 -7.171997e+01\n8 9058     -5.383700e+02 2.640400e+02\n13 9058     -1.707300e+02 2.121900e+02\n14 9058     -1.199900e+02 -1.676000e+02\n0 9059     -4.625600e+02 5.758400e+02\n2 9059     -7.536500e+02 3.557700e+02\n13 9059     -1.707300e+02 2.121900e+02\n0 9060     -2.526700e+02 5.744100e+02\n2 9060     -5.384800e+02 3.490400e+02\n11 9060     -7.467999e+01 -2.063600e+02\n13 9060     -6.460022e+00 2.198900e+02\n14 9060     7.616998e+01 -1.663400e+02\n0 9061     5.128101e+02 5.733600e+02\n6 9061     1.585800e+02 7.379900e+02\n13 9061     6.504100e+02 2.740400e+02\n0 9062     -3.565600e+02 5.724900e+02\n13 9062     -8.878003e+01 2.144100e+02\n0 9063     -3.565600e+02 5.724900e+02\n2 9063     -6.422300e+02 3.499300e+02\n4 9063     7.881000e+01 -1.665200e+02\n5 9063     6.541998e+01 -7.452002e+01\n11 9063     -1.635800e+02 -2.084500e+02\n13 9063     -8.878003e+01 2.144100e+02\n0 9064     1.189001e+01 5.716300e+02\n2 9064     -2.859000e+02 3.395800e+02\n4 9064     5.771002e+01 -3.715600e+02\n8 9064     -1.556300e+02 2.611700e+02\n12 9064     -3.037600e+02 5.931200e+02\n13 9064     1.986700e+02 2.303800e+02\n0 9065     3.685800e+02 5.637900e+02\n2 9065     2.423999e+01 3.326100e+02\n3 9065     -1.225100e+02 -1.880005e+00\n5 9065     7.708700e+02 -7.288000e+01\n6 9065     -9.566000e+01 6.746600e+02\n8 9065     1.007900e+02 2.613000e+02\n9 9065     -1.342000e+02 3.636000e+02\n11 9065     4.747000e+02 -1.909600e+02\n13 9065     4.789301e+02 2.468100e+02\n14 9065     6.669900e+02 -1.525900e+02\n0 9066     5.905900e+02 5.621900e+02\n2 9066     3.411700e+02 4.686800e+02\n3 9066     1.950800e+02 1.329900e+02\n6 9066     2.604100e+02 7.433600e+02\n8 9066     3.482600e+02 3.615800e+02\n9 9066     1.425200e+02 4.919800e+02\n13 9066     7.261400e+02 2.721500e+02\n0 9067     1.372500e+02 5.619700e+02\n3 9067     -3.082500e+02 -3.900024e+00\n4 9067     4.227002e+01 -4.503000e+02\n5 9067     5.407900e+02 -8.246002e+01\n8 9067     -6.220001e+01 2.556800e+02\n12 9067     -1.695300e+02 5.998800e+02\n0 9068     5.161500e+02 5.594500e+02\n3 9068     1.182400e+02 1.069300e+02\n6 9068     1.667200e+02 7.229500e+02\n8 9068     2.832600e+02 3.409900e+02\n9 9068     7.369000e+01 4.669600e+02\n11 9068     5.934700e+02 -1.876100e+02\n13 9068     6.547600e+02 2.630200e+02\n0 9069     5.395200e+02 5.590700e+02\n2 9069     2.876600e+02 4.497800e+02\n3 9069     1.437900e+02 1.141600e+02\n6 9069     1.977700e+02 7.275500e+02\n8 9069     3.045300e+02 3.467600e+02\n9 9069     9.690997e+01 4.739700e+02\n11 9069     6.141100e+02 -1.864900e+02\n13 9069     6.779700e+02 2.648000e+02\n0 9070     -5.168100e+02 5.569600e+02\n2 9070     -8.142100e+02 3.358800e+02\n4 9070     8.033002e+01 -8.266998e+01\n5 9070     -8.865002e+01 -8.944000e+01\n8 9070     -5.871400e+02 2.466400e+02\n11 9070     -2.966400e+02 -2.214600e+02\n13 9070     -2.139900e+02 1.946200e+02\n14 9070     -1.730500e+02 -1.857900e+02\n0 9071     2.037400e+02 5.565800e+02\n2 9071     -1.143600e+02 3.233700e+02\n4 9071     3.642999e+01 -4.937500e+02\n5 9071     6.054000e+02 -8.538000e+01\n6 9071     -2.673500e+02 6.347000e+02\n8 9071     -1.451001e+01 2.520000e+02\n9 9071     -2.511300e+02 3.516800e+02\n11 9071     3.262500e+02 -2.066400e+02\n12 9071     -9.978998e+01 6.016000e+02\n13 9071     3.492000e+02 2.300300e+02\n14 9071     5.079301e+02 -1.692200e+02\n0 9072     3.170200e+02 5.564700e+02\n2 9072     -1.629999e+01 3.239900e+02\n3 9072     -1.601200e+02 -9.609985e+00\n9 9072     -1.679100e+02 3.552100e+02\n13 9072     4.392400e+02 2.371100e+02\n0 9073     3.439001e+01 5.496700e+02\n4 9073     4.148999e+01 -3.848200e+02\n12 9073     -2.762300e+02 5.712700e+02\n13 9073     2.157300e+02 2.125600e+02\n0 9074     5.704000e+02 5.458900e+02\n2 9074     3.244301e+02 4.483700e+02\n3 9074     1.796100e+02 1.135300e+02\n6 9074     2.395300e+02 7.201100e+02\n8 9074     3.343400e+02 3.448100e+02\n13 9074     7.088500e+02 2.565900e+02\n0 9075     5.973500e+02 5.424000e+02\n2 9075     3.529000e+02 4.535500e+02\n3 9075     2.066700e+02 1.192000e+02\n6 9075     2.738300e+02 7.233500e+02\n8 9075     3.579000e+02 3.492800e+02\n9 9075     1.531600e+02 4.791100e+02\n11 9075     6.673500e+02 -1.972800e+02\n13 9075     7.344800e+02 2.570500e+02\n0 9076     -7.142800e+02 5.408200e+02\n4 9076     7.447998e+01 3.715002e+01\n5 9076     -3.690300e+02 -1.050100e+02\n0 9077     4.206801e+02 5.360200e+02\n2 9077     6.891998e+01 3.044300e+02\n3 9077     -7.867999e+01 -2.953003e+01\n6 9077     -3.825000e+01 6.521300e+02\n8 9077     1.392100e+02 2.403000e+02\n9 9077     -9.431000e+01 3.410700e+02\n11 9077     5.258199e+02 -2.112500e+02\n12 9077     1.221700e+02 6.067800e+02\n13 9077     5.214600e+02 2.273100e+02\n14 9077     7.208600e+02 -1.777200e+02\n0 9078     2.245000e+02 5.331700e+02\n2 9078     -9.370001e+01 2.987200e+02\n3 9078     -2.337900e+02 -3.376001e+01\n9 9078     -2.324200e+02 3.304500e+02\n13 9078     3.667300e+02 2.122600e+02\n14 9078     5.296600e+02 -1.912500e+02\n0 9079     -7.039800e+02 5.314000e+02\n4 9079     6.754999e+01 3.234998e+01\n5 9079     -3.532700e+02 -1.163600e+02\n13 9079     -4.260100e+02 1.584400e+02\n14 9079     -4.294800e+02 -2.150400e+02\n0 9080     3.475699e+02 5.305300e+02\n2 9080     1.141998e+01 3.005300e+02\n5 9080     7.502100e+02 -1.071600e+02\n8 9080     8.959003e+01 2.356400e+02\n9 9080     -1.437000e+02 3.347900e+02\n13 9080     4.608300e+02 2.160600e+02\n14 9080     6.457300e+02 -1.897700e+02\n0 9081     6.651200e+02 5.285900e+02\n2 9081     4.714900e+02 5.072100e+02\n3 9081     3.218500e+02 1.710200e+02\n6 9081     3.998200e+02 7.343700e+02\n8 9081     4.500900e+02 3.885900e+02\n9 9081     2.556600e+02 5.286000e+02\n11 9081     7.228500e+02 -2.064400e+02\n13 9081     8.231500e+02 2.565400e+02\n0 9082     2.233900e+02 5.264500e+02\n2 9082     -9.409003e+01 2.909100e+02\n9 9082     -2.326800e+02 3.243700e+02\n0 9083     6.778003e+01 5.114200e+02\n4 9083     1.634998e+01 -4.022900e+02\n5 9083     4.714200e+02 -1.370400e+02\n6 9083     -4.048500e+02 5.478400e+02\n8 9083     -1.092100e+02 2.080000e+02\n9 9083     -3.465100e+02 3.015800e+02\n11 9083     2.071800e+02 -2.519700e+02\n12 9083     -2.331100e+02 5.293000e+02\n13 9083     2.432400e+02 1.831600e+02\n14 9083     3.786100e+02 -2.215500e+02\n0 9084     -6.791900e+02 4.969600e+02\n4 9084     5.258002e+01 1.992999e+01\n11 9084     -4.268000e+02 -2.681800e+02\n0 9085     -6.791900e+02 4.969600e+02\n4 9085     5.258002e+01 1.992999e+01\n11 9085     -4.268000e+02 -2.681800e+02\n0 9086     -1.516800e+02 4.912200e+02\n3 9086     -5.607800e+02 -8.015997e+01\n0 9087     4.988900e+02 4.818800e+02\n6 9087     1.655300e+02 6.300600e+02\n8 9087     2.820600e+02 2.782400e+02\n9 9087     7.604999e+01 3.995900e+02\n11 9087     5.914399e+02 -2.559100e+02\n12 9087     2.761400e+02 6.147400e+02\n13 9087     6.466500e+02 1.984700e+02\n0 9088     4.988900e+02 4.818800e+02\n8 9088     2.820600e+02 2.782400e+02\n9 9088     7.604999e+01 3.995900e+02\n12 9088     2.761400e+02 6.147400e+02\n13 9088     6.466500e+02 1.984700e+02\n0 9089     6.324600e+02 4.793100e+02\n3 9089     3.040200e+02 1.206400e+02\n6 9089     3.733400e+02 6.728200e+02\n8 9089     4.329800e+02 3.436800e+02\n9 9089     2.389600e+02 4.814400e+02\n13 9089     7.978500e+02 2.138300e+02\n0 9090     5.134399e+02 4.659700e+02\n2 9090     2.801500e+02 3.547000e+02\n3 9090     1.382400e+02 2.413000e+01\n8 9090     2.983800e+02 2.695800e+02\n9 9090     9.287000e+01 3.914900e+02\n11 9090     6.078800e+02 -2.697900e+02\n12 9090     2.968300e+02 6.017200e+02\n13 9090     6.618400e+02 1.863400e+02\n0 9091     5.887100e+02 4.614500e+02\n2 9091     3.618600e+02 3.766200e+02\n3 9091     2.176600e+02 4.739001e+01\n8 9091     3.663700e+02 2.875500e+02\n13 9091     7.343101e+02 1.910700e+02\n0 9092     5.352000e+02 4.546000e+02\n2 9092     3.070200e+02 3.504500e+02\n3 9092     1.646500e+02 2.202002e+01\n8 9092     3.195700e+02 2.654900e+02\n9 9092     1.164400e+02 3.893200e+02\n13 9092     6.841400e+02 1.782500e+02\n0 9093     -6.067100e+02 4.540200e+02\n13 9093     -2.904800e+02 1.049800e+02\n14 9093     -2.729900e+02 -2.888100e+02\n0 9094     6.798000e+02 4.536000e+02\n2 9094     5.047700e+02 4.473200e+02\n3 9094     3.559900e+02 1.166400e+02\n6 9094     4.357100e+02 6.574800e+02\n8 9094     4.778300e+02 3.381000e+02\n9 9094     2.859700e+02 4.770600e+02\n13 9094     8.461300e+02 1.984700e+02\n0 9095     -8.290002e+01 4.488400e+02\n2 9095     -3.645200e+02 1.997900e+02\n5 9095     3.203500e+02 -2.063500e+02\n7 9095     -3.021000e+02 5.055700e+02\n11 9095     7.384003e+01 -3.111000e+02\n13 9095     1.253100e+02 1.212500e+02\n14 9095     2.331000e+02 -2.919300e+02\n0 9096     -6.542200e+02 4.443000e+02\n4 9096     2.592999e+01 1.196997e+01\n5 9096     -2.921800e+02 -2.031900e+02\n11 9096     -4.134400e+02 -3.121900e+02\n0 9097     -5.627000e+02 4.419500e+02\n4 9097     2.422998e+01 -4.615997e+01\n5 9097     -1.500700e+02 -2.054500e+02\n7 9097     -7.975200e+02 4.475300e+02\n13 9097     -2.562600e+02 9.639999e+01\n14 9097     -2.327800e+02 -3.019000e+02\n0 9098     8.432000e+02 4.420900e+02\n2 9098     6.639399e+02 4.914000e+02\n3 9098     5.020000e+02 1.588000e+02\n9 9098     4.190200e+02 5.187200e+02\n0 9099     8.572900e+02 4.357700e+02\n2 9099     6.787800e+02 4.905800e+02\n3 9099     5.153400e+02 1.582400e+02\n9 9099     4.316200e+02 5.180600e+02\n0 9100     7.214301e+02 4.244100e+02\n2 9100     5.538400e+02 4.367400e+02\n3 9100     4.026899e+02 1.072900e+02\n6 9100     4.926100e+02 6.387700e+02\n8 9100     5.185900e+02 3.291100e+02\n0 9101     6.783800e+02 4.049800e+02\n2 9101     5.160699e+02 4.045700e+02\n3 9101     3.677500e+02 7.667999e+01\n6 9101     4.461500e+02 6.066000e+02\n7 9101     4.743600e+02 5.847200e+02\n8 9101     4.866200e+02 3.029700e+02\n12 9101     5.282800e+02 6.146400e+02\n13 9101     8.515000e+02 1.589900e+02\n0 9102     6.783800e+02 4.049800e+02\n2 9102     5.160699e+02 4.045700e+02\n3 9102     3.677500e+02 7.667999e+01\n6 9102     4.461500e+02 6.066000e+02\n7 9102     4.743600e+02 5.847200e+02\n8 9102     4.866200e+02 3.029700e+02\n9 9102     2.966100e+02 4.415200e+02\n12 9102     5.282800e+02 6.146400e+02\n13 9102     8.515000e+02 1.589900e+02\n0 9103     7.088900e+02 4.044400e+02\n3 9103     3.967200e+02 8.703003e+01\n6 9103     4.821200e+02 6.138500e+02\n8 9103     5.119700e+02 3.110500e+02\n9 9103     3.226400e+02 4.509400e+02\n0 9104     7.088900e+02 4.044400e+02\n2 9104     5.467000e+02 4.149500e+02\n3 9104     3.967200e+02 8.703003e+01\n6 9104     4.821200e+02 6.138500e+02\n8 9104     5.119700e+02 3.110500e+02\n9 9104     3.226400e+02 4.509400e+02\n0 9105     -2.753200e+02 3.933400e+02\n7 9105     -4.864800e+02 4.267600e+02\n10 9105     -4.639100e+02 5.830300e+02\n0 9106     6.997700e+02 3.934900e+02\n2 9106     5.412100e+02 4.019200e+02\n3 9106     3.915500e+02 7.485999e+01\n6 9106     4.746500e+02 5.999200e+02\n7 9106     4.970200e+02 5.765800e+02\n8 9106     5.073400e+02 3.006400e+02\n9 9106     3.176600e+02 4.399000e+02\n12 9106     5.553101e+02 6.094800e+02\n13 9106     8.734000e+02 1.522000e+02\n0 9107     6.438000e+02 3.901900e+02\n2 9107     4.844399e+02 3.790300e+02\n3 9107     3.385000e+02 5.196997e+01\n6 9107     4.087800e+02 5.811800e+02\n7 9107     4.423600e+02 5.644000e+02\n8 9107     4.602900e+02 2.831900e+02\n9 9107     2.698199e+02 4.186600e+02\n11 9107     7.345200e+02 -3.319400e+02\n12 9107     4.923500e+02 5.880200e+02\n13 9107     8.192600e+02 1.434100e+02\n0 9108     6.285601e+02 3.889100e+02\n2 9108     4.687100e+02 3.713600e+02\n3 9108     3.240100e+02 4.471997e+01\n7 9108     4.275800e+02 5.608300e+02\n8 9108     4.472700e+02 2.764700e+02\n9 9108     2.569301e+02 4.117000e+02\n11 9108     7.206700e+02 -3.339700e+02\n12 9108     4.748000e+02 5.807000e+02\n13 9108     8.043800e+02 1.407300e+02\n0 9109     6.285601e+02 3.889100e+02\n2 9109     4.687100e+02 3.713600e+02\n3 9109     3.240100e+02 4.471997e+01\n7 9109     4.275800e+02 5.608300e+02\n8 9109     4.472700e+02 2.764700e+02\n9 9109     2.569301e+02 4.117000e+02\n11 9109     7.206700e+02 -3.339700e+02\n12 9109     4.748000e+02 5.807000e+02\n13 9109     8.043800e+02 1.407300e+02\n0 9110     6.673600e+02 3.820900e+02\n2 9110     5.113600e+02 3.768700e+02\n6 9110     4.390601e+02 5.741100e+02\n7 9110     4.668300e+02 5.604600e+02\n8 9110     4.820601e+02 2.792000e+02\n9 9110     2.925100e+02 4.166200e+02\n12 9110     5.208101e+02 5.815400e+02\n0 9111     7.926300e+02 3.768900e+02\n2 9111     6.350300e+02 4.197400e+02\n3 9111     4.800200e+02 9.340002e+01\n7 9111     5.877900e+02 5.757700e+02\n9 9111     3.961200e+02 4.568600e+02\n0 9112     -5.171800e+02 3.672300e+02\n4 9112     -2.210999e+01 -5.419000e+01\n13 9112     -2.234800e+02 3.157001e+01\n14 9112     -1.992300e+02 -3.838800e+02\n15 9112     -7.881300e+02 5.730000e+02\n0 9113     7.807000e+02 3.626100e+02\n2 9113     6.278199e+02 4.040000e+02\n3 9113     4.733300e+02 7.864001e+01\n6 9113     5.734600e+02 5.894700e+02\n7 9113     5.783101e+02 5.600200e+02\n8 9113     5.798000e+02 3.003900e+02\n9 9113     3.907600e+02 4.429900e+02\n12 9113     6.526801e+02 6.030900e+02\n0 9114     6.819100e+02 3.563400e+02\n2 9114     5.326000e+02 3.622600e+02\n3 9114     3.851801e+02 3.747998e+01\n6 9114     4.625699e+02 5.549200e+02\n7 9114     4.842900e+02 5.381800e+02\n8 9114     4.998300e+02 2.677000e+02\n11 9114     7.792200e+02 -3.624500e+02\n12 9114     5.438900e+02 5.645500e+02\n0 9115     -5.480500e+02 3.510000e+02\n5 9115     -1.505300e+02 -3.031600e+02\n10 9115     -7.933800e+02 5.097800e+02\n13 9115     -2.490300e+02 1.802002e+01\n14 9115     -2.320200e+02 -3.992500e+02\n15 9115     -8.290100e+02 5.462600e+02\n0 9116     5.424900e+02 3.416400e+02\n2 9116     3.440100e+02 2.476500e+02\n3 9116     2.023300e+02 -7.682001e+01\n6 9116     2.572600e+02 4.838200e+02\n7 9116     3.369301e+02 4.914400e+02\n8 9116     3.485000e+02 1.814600e+02\n9 9116     1.503101e+02 3.017500e+02\n10 9116     5.097000e+02 6.032100e+02\n11 9116     6.567900e+02 -3.825900e+02\n12 9116     3.609200e+02 4.778600e+02\n13 9116     7.037200e+02 8.592999e+01\n0 9117     7.803600e+02 3.408600e+02\n7 9117     5.807600e+02 5.397000e+02\n8 9117     5.846500e+02 2.848000e+02\n9 9117     3.962800e+02 4.277500e+02\n12 9117     6.572000e+02 5.793300e+02\n0 9118     8.496300e+02 3.414200e+02\n2 9118     6.982700e+02 4.102600e+02\n3 9118     5.381600e+02 8.542999e+01\n7 9118     6.457900e+02 5.510700e+02\n9 9118     4.497600e+02 4.505100e+02\n12 9118     7.334700e+02 6.047200e+02\n0 9119     8.496300e+02 3.414200e+02\n2 9119     6.982700e+02 4.102600e+02\n3 9119     5.381600e+02 8.542999e+01\n7 9119     6.457900e+02 5.510700e+02\n9 9119     4.497600e+02 4.505100e+02\n12 9119     7.334700e+02 6.047200e+02\n0 9120     5.228700e+02 3.374500e+02\n3 9120     1.823800e+02 -8.960999e+01\n6 9120     2.332200e+02 4.712900e+02\n7 9120     3.183101e+02 4.838400e+02\n8 9120     3.319300e+02 1.713900e+02\n9 9120     1.326100e+02 2.900900e+02\n10 9120     4.871801e+02 5.947900e+02\n12 9120     3.398000e+02 4.658100e+02\n13 9120     6.852600e+02 7.947000e+01\n0 9121     6.693101e+02 3.369700e+02\n2 9121     5.247000e+02 3.396500e+02\n3 9121     3.784800e+02 1.634003e+01\n6 9121     4.524200e+02 5.307500e+02\n7 9121     4.745500e+02 5.173800e+02\n8 9121     4.930000e+02 2.493900e+02\n9 9121     3.048700e+02 3.862200e+02\n10 9121     6.611600e+02 6.112800e+02\n12 9121     5.343700e+02 5.397000e+02\n13 9121     8.507000e+02 1.023900e+02\n0 9122     6.693101e+02 3.369700e+02\n3 9122     3.784800e+02 1.634003e+01\n6 9122     4.524200e+02 5.307500e+02\n7 9122     4.745500e+02 5.173800e+02\n0 9123     4.462000e+01 3.348600e+02\n7 9123     -1.584800e+02 4.059900e+02\n13 9123     2.346700e+02 3.103998e+01\n14 9123     3.679200e+02 -4.102400e+02\n0 9124     8.162000e+02 3.283600e+02\n2 9124     6.710601e+02 3.869700e+02\n3 9124     5.138600e+02 6.396997e+01\n7 9124     6.170100e+02 5.333600e+02\n9 9124     4.285800e+02 4.305400e+02\n12 9124     7.009500e+02 5.795400e+02\n0 9125     6.051500e+02 3.233700e+02\n2 9125     4.602600e+02 3.008700e+02\n3 9125     3.183800e+02 -2.191998e+01\n6 9125     3.776200e+02 4.954600e+02\n7 9125     4.130900e+02 4.932700e+02\n9 9125     2.506400e+02 3.510100e+02\n12 9125     4.640400e+02 5.015900e+02\n13 9125     7.886000e+02 8.317001e+01\n0 9126     4.840002e+01 3.207300e+02\n7 9126     -1.525000e+02 3.928500e+02\n10 9126     -7.082001e+01 5.253400e+02\n11 9126     1.977300e+02 -4.239600e+02\n0 9127     4.620601e+02 3.171800e+02\n10 9127     4.155601e+02 5.649700e+02\n11 9127     5.846500e+02 -4.099600e+02\n13 9127     6.255800e+02 5.540002e+01\n0 9128     6.612600e+02 3.139600e+02\n3 9128     3.769800e+02 -6.510010e+00\n6 9128     4.480300e+02 5.039100e+02\n7 9128     4.694900e+02 4.941400e+02\n9 9128     3.030601e+02 3.657800e+02\n10 9128     6.528800e+02 5.825800e+02\n11 9128     7.699700e+02 -4.047400e+02\n12 9128     5.300500e+02 5.128700e+02\n13 9128     8.457400e+02 8.223001e+01\n0 9129     7.373800e+02 3.086200e+02\n2 9129     6.000200e+02 3.404000e+02\n3 9129     4.502900e+02 1.928003e+01\n7 9129     5.432400e+02 5.023100e+02\n9 9129     3.684399e+02 3.891100e+02\n10 9129     7.428199e+02 5.862700e+02\n0 9130     6.561500e+02 3.013100e+02\n3 9130     3.756700e+02 -1.963000e+01\n7 9130     4.663400e+02 4.808600e+02\n10 9130     6.474399e+02 5.669500e+02\n12 9130     5.279399e+02 4.972600e+02\n0 9131     6.561500e+02 3.013100e+02\n2 9131     5.203101e+02 3.016800e+02\n3 9131     3.756700e+02 -1.963000e+01\n6 9131     4.455000e+02 4.887000e+02\n7 9131     4.663400e+02 4.808600e+02\n9 9131     3.019800e+02 3.541000e+02\n12 9131     5.279399e+02 4.972600e+02\n0 9132     5.966700e+02 2.971400e+02\n2 9132     4.586899e+02 2.725900e+02\n3 9132     3.173500e+02 -4.871002e+01\n6 9132     3.743700e+02 4.644600e+02\n7 9132     4.081300e+02 4.665000e+02\n8 9132     4.377100e+02 1.954800e+02\n9 9132     2.496600e+02 3.271900e+02\n10 9132     5.768500e+02 5.544600e+02\n11 9132     7.115200e+02 -4.248600e+02\n12 9132     4.606700e+02 4.714100e+02\n13 9132     7.837300e+02 6.009003e+01\n0 9133     6.689200e+02 2.947200e+02\n7 9133     4.795500e+02 4.771800e+02\n10 9133     6.622800e+02 5.608400e+02\n0 9134     6.095100e+02 2.889500e+02\n7 9134     4.220000e+02 4.608600e+02\n0 9135     -3.775500e+02 2.870700e+02\n5 9135     1.281000e+01 -3.787000e+02\n0 9136     7.056899e+02 2.847000e+02\n2 9136     5.754100e+02 3.063100e+02\n3 9136     4.279800e+02 -1.346002e+01\n6 9136     5.077300e+02 4.860300e+02\n7 9136     5.166700e+02 4.735300e+02\n8 9136     5.343500e+02 2.205400e+02\n9 9136     3.487000e+02 3.594900e+02\n10 9136     7.071600e+02 5.527300e+02\n12 9136     5.880400e+02 4.962000e+02\n0 9137     -1.351000e+02 2.810500e+02\n7 9137     -3.265100e+02 3.300000e+02\n0 9138     6.152002e+01 2.608000e+02\n4 9138     -1.306100e+02 -3.914100e+02\n7 9138     -1.253600e+02 3.388800e+02\n11 9138     2.099300e+02 -4.809000e+02\n0 9139     6.132100e+02 2.609200e+02\n2 9139     4.853400e+02 2.445100e+02\n3 9139     3.440400e+02 -7.459998e+01\n6 9139     4.034900e+02 4.295300e+02\n7 9139     4.292700e+02 4.341600e+02\n10 9139     5.989301e+02 5.124800e+02\n11 9139     7.362000e+02 -4.604500e+02\n13 9139     8.041100e+02 3.133002e+01\n0 9140     6.515000e+02 2.592200e+02\n2 9140     5.265400e+02 2.601100e+02\n3 9140     3.832600e+02 -5.875000e+01\n6 9140     4.503199e+02 4.410100e+02\n7 9140     4.670601e+02 4.397600e+02\n8 9140     4.933700e+02 1.837600e+02\n9 9140     3.078900e+02 3.188500e+02\n10 9140     6.444200e+02 5.161400e+02\n11 9140     7.744301e+02 -4.603900e+02\n12 9140     5.327600e+02 4.499900e+02\n13 9140     8.424500e+02 3.483002e+01\n0 9141     -4.164400e+02 2.557600e+02\n7 9141     -6.149600e+02 2.618600e+02\n11 9141     -2.304600e+02 -4.839600e+02\n0 9142     -3.999200e+02 2.516200e+02\n5 9142     -1.665997e+01 -4.174900e+02\n7 9142     -5.942500e+02 2.614500e+02\n0 9143     -6.244000e+01 2.305000e+02\n7 9143     -2.420200e+02 2.920900e+02\n10 9143     -1.905200e+02 4.067100e+02\n13 9143     1.691500e+02 -6.278998e+01\n14 9143     2.840200e+02 -5.278400e+02\n0 9144     7.216100e+02 2.255000e+02\n2 9144     6.085000e+02 2.588500e+02\n3 9144     4.612600e+02 -5.725000e+01\n6 9144     5.420100e+02 4.284800e+02\n7 9144     5.396899e+02 4.200300e+02\n8 9144     5.614700e+02 1.810200e+02\n9 9144     3.773700e+02 3.203200e+02\n10 9144     7.302100e+02 4.836000e+02\n0 9145     -7.039001e+01 2.200200e+02\n7 9145     -2.466300e+02 2.819200e+02\n10 9145     -1.985100e+02 3.936400e+02\n0 9146     6.338000e+02 2.183600e+02\n2 9146     5.182100e+02 2.131000e+02\n3 9146     3.770900e+02 -1.033000e+02\n6 9146     4.387300e+02 3.902300e+02\n7 9146     4.550900e+02 3.969900e+02\n8 9146     4.854900e+02 1.452800e+02\n9 9146     3.015200e+02 2.786600e+02\n10 9146     6.258800e+02 4.646200e+02\n13 9146     8.292500e+02 -1.989990e+00\n15 9146     8.302400e+02 5.306400e+02\n0 9147     7.195601e+02 2.115200e+02\n2 9147     6.099100e+02 2.445900e+02\n3 9147     4.637700e+02 -7.069000e+01\n6 9147     5.426200e+02 4.124900e+02\n7 9147     5.398800e+02 4.060900e+02\n8 9147     5.623800e+02 1.690100e+02\n9 9147     3.786400e+02 3.085000e+02\n0 9148     7.709600e+02 2.119800e+02\n7 9148     5.882700e+02 4.157500e+02\n10 9148     7.895100e+02 4.731400e+02\n0 9149     7.042100e+02 1.964200e+02\n2 9149     5.984399e+02 2.227000e+02\n3 9149     4.541200e+02 -9.095001e+01\n6 9149     5.287500e+02 3.895600e+02\n7 9149     5.269500e+02 3.884000e+02\n8 9149     5.529200e+02 1.504900e+02\n9 9149     3.692700e+02 2.893400e+02\n10 9149     7.111400e+02 4.463500e+02\n0 9150     -5.330700e+02 1.926500e+02\n13 9150     -2.423900e+02 -1.217000e+02\n0 9151     8.012700e+02 1.921500e+02\n7 9151     6.199700e+02 4.019000e+02\n0 9152     8.797998e+01 1.842200e+02\n10 9152     -1.048999e+01 3.658500e+02\n13 9152     4.031600e+02 -6.622998e+01\n14 9152     5.833400e+02 -5.456899e+02\n0 9153     -2.827600e+02 1.758500e+02\n7 9153     -4.539600e+02 2.070000e+02\n0 9154     -2.600900e+02 1.744400e+02\n7 9154     -4.298300e+02 2.086400e+02\n0 9155     6.978600e+02 1.564900e+02\n2 9155     6.032800e+02 1.828800e+02\n3 9155     4.602300e+02 -1.294100e+02\n6 9155     5.316899e+02 3.459700e+02\n7 9155     5.258300e+02 3.492000e+02\n8 9155     5.564800e+02 1.185800e+02\n9 9155     3.743500e+02 2.561200e+02\n12 9155     6.119900e+02 3.567300e+02\n0 9156     8.065601e+02 1.387600e+02\n2 9156     7.189800e+02 2.151600e+02\n7 9156     6.323500e+02 3.521900e+02\n9 9156     4.722200e+02 2.887200e+02\n0 9157     6.905100e+02 1.357600e+02\n2 9157     6.010100e+02 1.596700e+02\n3 9157     4.596500e+02 -1.516000e+02\n7 9157     5.217700e+02 3.280400e+02\n8 9157     5.538700e+02 9.947000e+01\n9 9157     3.731200e+02 2.365800e+02\n10 9157     6.989900e+02 3.734500e+02\n12 9157     6.088101e+02 3.307900e+02\n0 9158     6.905100e+02 1.357600e+02\n2 9158     6.010100e+02 1.596700e+02\n3 9158     4.596500e+02 -1.516000e+02\n7 9158     5.217700e+02 3.280400e+02\n8 9158     5.538700e+02 9.947000e+01\n9 9158     3.731200e+02 2.365800e+02\n10 9158     6.989900e+02 3.734500e+02\n12 9158     6.088101e+02 3.307900e+02\n0 9159     7.719000e+02 1.316500e+02\n2 9159     6.849900e+02 1.939100e+02\n3 9159     5.381000e+02 -1.157600e+02\n7 9159     6.009700e+02 3.394100e+02\n10 9159     7.965100e+02 3.772700e+02\n0 9160     8.209700e+02 1.270500e+02\n2 9160     7.346600e+02 2.102400e+02\n3 9160     5.843900e+02 -9.900000e+01\n7 9160     6.479000e+02 3.436700e+02\n9 9160     4.832700e+02 2.829800e+02\n0 9161     7.230200e+02 1.257700e+02\n3 9161     4.946300e+02 -1.458300e+02\n8 9161     5.848300e+02 1.019200e+02\n12 9161     6.483700e+02 3.308900e+02\n0 9162     7.388500e+02 1.263000e+02\n3 9162     5.089500e+02 -1.374200e+02\n0 9163     7.847300e+02 1.074100e+02\n2 9163     7.048400e+02 1.754700e+02\n3 9163     5.579200e+02 -1.327200e+02\n7 9163     6.158000e+02 3.181400e+02\n9 9163     4.599900e+02 2.531700e+02\n10 9163     8.131400e+02 3.497400e+02\n12 9163     7.221700e+02 3.347200e+02\n0 9164     8.740000e+02 1.055100e+02\n7 9164     6.998000e+02 3.297600e+02\n9 9164     5.295300e+02 2.853200e+02\n12 9164     8.212900e+02 3.621900e+02\n0 9165     8.346200e+02 1.039500e+02\n2 9165     7.534200e+02 1.941500e+02\n3 9165     6.031000e+02 -1.132700e+02\n7 9165     6.630000e+02 3.240600e+02\n9 9165     4.997100e+02 2.702200e+02\n0 9166     -4.808200e+02 9.864001e+01\n7 9166     -6.453300e+02 9.863000e+01\n0 9167     5.538199e+02 9.189999e+01\n10 9167     5.411801e+02 3.064200e+02\n12 9167     4.599600e+02 2.316000e+02\n15 9167     7.319600e+02 3.406000e+02\n0 9168     7.544000e+02 8.710999e+01\n2 9168     6.801400e+02 1.422600e+02\n3 9168     5.365100e+02 -1.650400e+02\n7 9168     5.897000e+02 2.932700e+02\n0 9169     8.355300e+02 8.767001e+01\n7 9169     6.659301e+02 3.086800e+02\n0 9170     8.355300e+02 8.767001e+01\n7 9170     6.659301e+02 3.086800e+02\n0 9171     7.120699e+02 8.112000e+01\n2 9171     6.391500e+02 1.161000e+02\n3 9171     4.982300e+02 -1.916700e+02\n6 9171     5.675900e+02 2.688500e+02\n7 9171     5.496300e+02 2.794100e+02\n8 9171     5.851700e+02 6.254001e+01\n9 9171     4.059500e+02 2.011800e+02\n12 9171     6.464800e+02 2.785900e+02\n0 9172     7.735500e+02 7.766998e+01\n2 9172     7.024700e+02 1.425800e+02\n3 9172     5.577400e+02 -1.642200e+02\n7 9172     6.093199e+02 2.879700e+02\n9 9172     4.587000e+02 2.253100e+02\n10 9172     8.019200e+02 3.139500e+02\n12 9172     7.172700e+02 2.995000e+02\n0 9173     7.735500e+02 7.766998e+01\n2 9173     7.024700e+02 1.425800e+02\n3 9173     5.577400e+02 -1.642200e+02\n7 9173     6.093199e+02 2.879700e+02\n9 9173     4.587000e+02 2.253100e+02\n10 9173     8.019200e+02 3.139500e+02\n12 9173     7.172700e+02 2.995000e+02\n0 9174     8.114700e+02 7.453003e+01\n3 9174     5.933199e+02 -1.494200e+02\n7 9174     6.452800e+02 2.916600e+02\n9 9174     4.893000e+02 2.373200e+02\n12 9174     7.592400e+02 3.078600e+02\n0 9175     8.694200e+02 6.523999e+01\n2 9175     7.990900e+02 1.744200e+02\n3 9175     6.466000e+02 -1.296100e+02\n7 9175     7.007900e+02 2.946000e+02\n9 9175     5.372600e+02 2.547100e+02\n0 9176     -4.385900e+02 5.647998e+01\n10 9176     -6.143100e+02 1.629000e+02\n13 9176     -1.231400e+02 -2.321800e+02\n15 9176     -6.251800e+02 1.534600e+02\n0 9177     -3.893100e+02 5.328998e+01\n2 9177     -5.498900e+02 -2.262300e+02\n7 9177     -5.374300e+02 6.840997e+01\n8 9177     -3.870100e+02 -2.005300e+02\n10 9177     -5.592400e+02 1.629700e+02\n13 9177     -7.876001e+01 -2.331900e+02\n15 9177     -5.607600e+02 1.540900e+02\n0 9178     5.514600e+02 5.021002e+01\n6 9178     3.803000e+02 1.710500e+02\n10 9178     5.420800e+02 2.585400e+02\n0 9179     5.514600e+02 5.021002e+01\n6 9179     3.803000e+02 1.710500e+02\n7 9179     3.979800e+02 2.177300e+02\n10 9179     5.420800e+02 2.585400e+02\n13 9179     7.648199e+02 -1.608700e+02\n15 9179     7.341100e+02 2.819500e+02\n0 9180     -4.689000e+02 4.942999e+01\n13 9180     -1.497600e+02 -2.398000e+02\n0 9181     -4.689000e+02 4.942999e+01\n2 9181     -6.509900e+02 -2.485000e+02\n13 9181     -1.497600e+02 -2.398000e+02\n0 9182     -3.389400e+02 4.859003e+01\n4 9182     -2.129500e+02 -1.393800e+02\n0 9183     5.158199e+02 4.847998e+01\n10 9183     5.000699e+02 2.527700e+02\n13 9183     7.280000e+02 -1.673000e+02\n15 9183     6.838800e+02 2.742500e+02\n0 9184     -4.185400e+02 4.403003e+01\n2 9184     -5.808100e+02 -2.404500e+02\n13 9184     -1.016100e+02 -2.414300e+02\n0 9185     -4.714400e+02 4.146997e+01\n2 9185     -6.514500e+02 -2.576600e+02\n13 9185     -1.496100e+02 -2.475600e+02\n0 9186     -5.746997e+01 3.532001e+01\n7 9186     -1.545200e+02 1.349100e+02\n13 9186     3.071899e+02 -1.990600e+02\n15 9186     -1.154900e+02 1.766400e+02\n0 9187     -8.625200e+02 3.031000e+01\n13 9187     -5.079100e+02 -2.796100e+02\n0 9188     6.446899e+02 1.831000e+01\n2 9188     5.850100e+02 1.866998e+01\n3 9188     4.509500e+02 -2.881200e+02\n6 9188     5.044800e+02 1.737600e+02\n7 9188     4.925000e+02 2.059400e+02\n8 9188     5.389200e+02 -1.537000e+01\n10 9188     6.533101e+02 2.309100e+02\n12 9188     5.852700e+02 1.834400e+02\n13 9188     8.660000e+02 -1.765000e+02\n0 9189     -8.014200e+02 3.659973e+00\n13 9189     -4.464200e+02 -2.997800e+02\n0 9190     -1.821997e+01 -8.539978e+00\n3 9190     3.771002e+01 -3.073300e+02\n4 9190     -2.757400e+02 -3.983900e+02\n6 9190     -5.875000e+01 4.699707e-01\n8 9190     1.302500e+02 -4.347000e+01\n12 9190     -4.504999e+01 5.535999e+01\n13 9190     3.553300e+02 -2.321300e+02\n0 9191     -2.148999e+01 -1.817999e+01\n2 9191     1.213600e+02 -8.750000e+00\n7 9191     -1.057900e+02 9.051999e+01\n10 9191     -1.164800e+02 1.178400e+02\n15 9191     -6.126001e+01 1.099700e+02\n0 9192     -2.148999e+01 -1.817999e+01\n2 9192     1.213600e+02 -8.750000e+00\n3 9192     3.573999e+01 -3.191200e+02\n7 9192     -1.057900e+02 9.051999e+01\n10 9192     -1.164800e+02 1.178400e+02\n13 9192     3.526200e+02 -2.397100e+02\n15 9192     -6.126001e+01 1.099700e+02\n0 9193     2.105000e+02 -1.900000e+01\n7 9193     1.269200e+02 1.296700e+02\n8 9193     3.299000e+02 -4.579987e+00\n9 9193     1.906400e+02 1.418900e+02\n10 9193     1.520300e+02 1.407500e+02\n12 9193     2.231200e+02 1.100100e+02\n13 9193     5.587900e+02 -2.208800e+02\n15 9193     2.537000e+02 1.400900e+02\n0 9194     8.191500e+02 -1.931000e+01\n2 9194     7.767400e+02 7.066998e+01\n7 9194     6.649600e+02 2.045400e+02\n9 9194     5.216200e+02 1.685400e+02\n12 9194     7.935100e+02 2.100000e+02\n0 9195     1.855900e+02 -2.277002e+01\n2 9195     3.393199e+02 4.641998e+01\n3 9195     2.412400e+02 -2.599000e+02\n9 9195     1.751200e+02 1.370500e+02\n0 9196     -3.363800e+02 -2.613000e+01\n13 9196     -1.009003e+01 -2.965100e+02\n0 9197     8.506700e+02 -2.696002e+01\n2 9197     8.101500e+02 7.914001e+01\n3 9197     6.647100e+02 -2.206700e+02\n7 9197     6.954399e+02 2.034100e+02\n9 9197     5.487400e+02 1.758100e+02\n0 9198     8.506700e+02 -2.696002e+01\n2 9198     8.101500e+02 7.914001e+01\n3 9198     6.647100e+02 -2.206700e+02\n7 9198     6.954399e+02 2.034100e+02\n9 9198     5.487400e+02 1.758100e+02\n0 9199     -3.509700e+02 -3.110999e+01\n4 9199     -2.602600e+02 -1.303300e+02\n7 9199     -4.749400e+02 -5.429993e+00\n9 9199     -4.815600e+02 -1.864200e+02\n15 9199     -4.962900e+02 4.565002e+01\n0 9200     -1.456200e+02 -3.142999e+01\n7 9200     -2.363500e+02 4.915997e+01\n15 9200     -2.241800e+02 7.396002e+01\n0 9201     7.486700e+02 -3.177002e+01\n3 9201     5.724600e+02 -2.788600e+02\n0 9202     8.425300e+02 -3.500000e+01\n2 9202     8.048800e+02 6.740997e+01\n3 9202     6.604200e+02 -2.319900e+02\n7 9202     6.887900e+02 1.940800e+02\n9 9202     5.438000e+02 1.669600e+02\n0 9203     8.425300e+02 -3.500000e+01\n2 9203     8.048800e+02 6.740997e+01\n3 9203     6.604200e+02 -2.319900e+02\n7 9203     6.887900e+02 1.940800e+02\n9 9203     5.438000e+02 1.669600e+02\n0 9204     7.566700e+02 -3.816998e+01\n2 9204     7.199600e+02 2.120001e+01\n3 9204     5.826000e+02 -2.805000e+02\n7 9204     6.085699e+02 1.740600e+02\n9 9204     4.762800e+02 1.246700e+02\n10 9204     7.904800e+02 1.766600e+02\n12 9204     7.284800e+02 1.673000e+02\n0 9205     7.130900e+02 -4.009998e+01\n2 9205     6.758500e+02 -4.789978e+00\n3 9205     5.414500e+02 -3.072600e+02\n9 9205     4.401500e+02 1.014600e+02\n10 9205     7.386899e+02 1.691600e+02\n0 9206     -4.676300e+02 -4.721997e+01\n2 9206     -5.848100e+02 -3.335100e+02\n7 9206     -5.947300e+02 -4.382001e+01\n13 9206     -1.255100e+02 -3.232600e+02\n0 9207     3.295699e+02 -5.501001e+01\n7 9207     2.389100e+02 1.071200e+02\n10 9207     2.928500e+02 1.116800e+02\n15 9207     4.253700e+02 1.072000e+02\n0 9208     -3.974400e+02 -6.895001e+01\n2 9208     -4.759300e+02 -3.334700e+02\n7 9208     -5.140400e+02 -5.097998e+01\n8 9208     -3.377300e+02 -2.916100e+02\n9 9208     -5.068400e+02 -2.267600e+02\n13 9208     -5.446002e+01 -3.367100e+02\n15 9208     -5.522200e+02 -1.017999e+01\n0 9209     2.135999e+01 -7.044000e+01\n13 9209     3.986700e+02 -2.808500e+02\n15 9209     3.200012e+00 4.509003e+01\n0 9210     -4.129700e+02 -7.359998e+01\n7 9210     -5.296500e+02 -6.206000e+01\n13 9210     -6.878003e+01 -3.431100e+02\n0 9211     3.308900e+02 -8.217999e+01\n13 9211     6.587600e+02 -2.704300e+02\n15 9211     4.298101e+02 7.013000e+01\n0 9212     7.050400e+02 -8.302002e+01\n2 9212     6.796700e+02 -5.329999e+01\n3 9212     5.485400e+02 -3.548900e+02\n7 9212     5.651600e+02 1.209700e+02\n9 9212     4.456000e+02 6.190002e+01\n10 9212     7.330601e+02 1.195600e+02\n12 9212     6.812000e+02 9.526001e+01\n0 9213     2.547300e+02 -1.052200e+02\n13 9213     6.040200e+02 -2.942500e+02\n15 9213     3.266100e+02 2.820001e+01\n0 9214     2.740400e+02 -1.139600e+02\n7 9214     2.009200e+02 4.459003e+01\n10 9214     2.346400e+02 3.800000e+01\n13 9214     6.190800e+02 -3.000800e+02\n15 9214     3.535500e+02 1.892999e+01\n0 9215     3.385601e+02 -1.142800e+02\n7 9215     2.584301e+02 5.360999e+01\n0 9216     1.697600e+02 -1.181100e+02\n3 9216     2.638900e+02 -3.605200e+02\n10 9216     1.148300e+02 2.219000e+01\n13 9216     5.355100e+02 -3.115400e+02\n15 9216     2.114700e+02 -5.200195e-01\n0 9217     8.276100e+02 -1.230200e+02\n9 9217     5.578300e+02 8.831000e+01\n0 9218     9.490997e+01 -1.266100e+02\n7 9218     3.288000e+01 3.349976e+00\n15 9218     1.109300e+02 -2.221002e+01\n0 9219     2.215601e+02 -1.318500e+02\n2 9219     4.150400e+02 -6.045001e+01\n0 9220     7.878900e+02 -1.317300e+02\n2 9220     7.806200e+02 -5.746997e+01\n9 9220     5.274700e+02 6.153003e+01\n0 9221     -2.423999e+01 -1.437000e+02\n7 9221     -8.456000e+01 -3.564001e+01\n10 9221     -1.064000e+02 -2.832001e+01\n15 9221     -4.834003e+01 -6.109998e+01\n0 9222     -1.918500e+02 -1.480700e+02\n4 9222     -3.519600e+02 -2.456100e+02\n13 9222     1.772800e+02 -3.814800e+02\n15 9222     -2.684900e+02 -9.091998e+01\n0 9223     2.870100e+02 -1.579200e+02\n3 9223     3.703600e+02 -3.848000e+02\n7 9223     2.214700e+02 2.340027e+00\n10 9223     2.541700e+02 -1.123999e+01\n13 9223     6.384100e+02 -3.392800e+02\n15 9223     3.783600e+02 -3.941998e+01\n0 9224     7.744399e+02 -1.663100e+02\n2 9224     7.790601e+02 -1.008800e+02\n7 9224     6.424399e+02 5.545001e+01\n12 9224     7.837000e+02 3.090997e+01\n0 9225     -4.347500e+02 -1.719200e+02\n7 9225     -5.296700e+02 -1.597900e+02\n15 9225     -5.932700e+02 -1.562300e+02\n0 9226     3.026700e+02 -1.737200e+02\n7 9226     2.392100e+02 -8.530029e+00\n10 9226     2.740900e+02 -2.759998e+01\n13 9226     6.558900e+02 -3.506900e+02\n15 9226     4.017300e+02 -5.873999e+01\n0 9227     8.283700e+02 -1.783200e+02\n7 9227     6.945800e+02 5.519000e+01\n0 9228     2.070500e+02 -1.802300e+02\n7 9228     1.517000e+02 -2.832001e+01\n13 9228     5.790699e+02 -3.624100e+02\n0 9229     1.068600e+02 -2.245500e+02\n10 9229     5.332001e+01 -1.067400e+02\n12 9229     1.840500e+02 -1.484000e+02\n15 9229     1.377700e+02 -1.522000e+02\n0 9230     1.571300e+02 -2.293400e+02\n13 9230     5.484200e+02 -4.081300e+02\n0 9231     1.571300e+02 -2.293400e+02\n6 9231     2.320000e+02 -1.776100e+02\n10 9231     1.120200e+02 -1.071200e+02\n15 9231     2.079100e+02 -1.524900e+02\n0 9232     5.735999e+01 -2.864000e+02\n3 9232     2.279800e+02 -5.762900e+02\n8 9232     2.732800e+02 -2.786400e+02\n0 9233     9.820007e+00 -2.885200e+02\n3 9233     1.732600e+02 -6.079500e+02\n4 9233     -4.909200e+02 -4.081800e+02\n6 9233     6.734998e+01 -3.156600e+02\n7 9233     -2.859003e+01 -1.762300e+02\n9 9233     1.149000e+02 -1.589900e+02\n10 9233     -5.050000e+01 -1.904700e+02\n12 9233     7.138000e+01 -2.713500e+02\n15 9233     1.870001e+01 -2.517700e+02\n0 9234     5.529999e+01 -3.069000e+02\n2 9234     3.061700e+02 -3.131200e+02\n8 9234     2.726400e+02 -3.056100e+02\n10 9234     2.909973e+00 -2.069300e+02\n12 9234     1.300600e+02 -2.811000e+02\n15 9234     8.221002e+01 -2.709000e+02\n0 9235     1.086800e+02 -3.095200e+02\n4 9235     -5.313600e+02 -4.909800e+02\n10 9235     6.440002e+01 -2.043900e+02\n15 9235     1.547300e+02 -2.678600e+02\n0 9236     1.222400e+02 -3.168600e+02\n7 9236     8.775000e+01 -1.826900e+02\n13 9236     5.124600e+02 -4.991700e+02\n0 9237     6.120900e+02 -3.498500e+02\n7 9237     5.363900e+02 -1.376300e+02\n15 9237     8.609399e+02 -2.615300e+02\n0 9238     7.636700e+02 -3.561100e+02\n7 9238     6.703600e+02 -1.176100e+02\n0 9239     7.783199e+02 -3.581000e+02\n7 9239     6.830601e+02 -1.165800e+02\n0 9240     -2.720900e+02 -4.327800e+02\n6 9240     -2.289300e+02 -6.339600e+02\n7 9240     -2.948000e+02 -3.834400e+02\n0 9241     7.839100e+02 -4.352300e+02\n7 9241     7.050100e+02 -1.834000e+02\n0 9242     4.605300e+02 -4.360300e+02\n6 9242     5.551801e+02 -3.379000e+02\n7 9242     4.194900e+02 -2.425200e+02\n0 9243     4.512100e+02 -4.516801e+02\n6 9243     5.554600e+02 -3.554399e+02\n7 9243     4.153500e+02 -2.582100e+02\n0 9244     4.397600e+02 -4.595699e+02\n2 9244     6.968000e+02 -3.976100e+02\n6 9244     5.487000e+02 -3.665100e+02\n7 9244     4.068300e+02 -2.675500e+02\n0 9245     7.483500e+02 -4.666100e+02\n7 9245     6.810800e+02 -2.174100e+02\n0 9246     -1.442000e+02 -4.773400e+02\n6 9246     -4.603003e+01 -6.192000e+02\n9 9246     4.689001e+01 -4.113600e+02\n12 9246     -5.977002e+01 -5.688400e+02\n0 9247     5.286400e+02 -5.053400e+02\n12 9247     6.972100e+02 -3.689600e+02\n0 9248     -7.807800e+02 -5.380800e+02\n4 9248     -5.303400e+02 1.679000e+02\n0 9249     4.688800e+02 -5.542000e+02\n7 9249     4.551500e+02 -3.483900e+02\n0 9250     7.383500e+02 -5.648199e+02\n7 9250     6.932400e+02 -3.058300e+02\n0 9251     -5.044200e+02 5.573600e+02\n11 9251     -2.867300e+02 -2.208900e+02\n13 9251     -2.048400e+02 1.957500e+02\n0 9252     -5.044200e+02 5.573600e+02\n2 9252     -8.006400e+02 3.372100e+02\n4 9252     8.034998e+01 -8.866998e+01\n5 9252     -7.732001e+01 -8.784003e+01\n8 9252     -5.760300e+02 2.486400e+02\n11 9252     -2.867300e+02 -2.208900e+02\n13 9252     -2.048400e+02 1.957500e+02\n0 9253     2.998700e+02 5.527900e+02\n3 9253     -1.761000e+02 -1.352002e+01\n13 9253     4.249100e+02 2.334100e+02\n0 9254     5.521700e+02 5.531700e+02\n2 9254     3.029700e+02 4.487700e+02\n3 9254     1.585400e+02 1.135600e+02\n6 9254     2.151200e+02 7.243200e+02\n8 9254     3.171200e+02 3.458700e+02\n9 9254     1.109600e+02 4.740600e+02\n11 9254     6.262000e+02 -1.908900e+02\n0 9255     5.804800e+02 5.491800e+02\n2 9255     3.334100e+02 4.543000e+02\n6 9255     2.510600e+02 7.271900e+02\n8 9255     3.418400e+02 3.503300e+02\n9 9255     1.365900e+02 4.797900e+02\n11 9255     6.517500e+02 -1.923000e+02\n13 9255     7.178300e+02 2.609400e+02\n0 9256     3.949500e+02 5.410000e+02\n2 9256     4.794000e+01 3.087800e+02\n3 9256     -9.894000e+01 -2.444000e+01\n5 9256     7.976500e+02 -9.552002e+01\n6 9256     -6.578003e+01 6.510300e+02\n8 9256     1.205300e+02 2.424500e+02\n9 9256     -1.128800e+02 3.433700e+02\n11 9256     5.016400e+02 -2.093500e+02\n12 9256     9.578003e+01 6.070100e+02\n13 9256     5.006200e+02 2.296100e+02\n14 9256     6.946700e+02 -1.740700e+02\n0 9257     7.217700e+02 5.125200e+02\n2 9257     5.329800e+02 5.130500e+02\n3 9257     3.800300e+02 1.770000e+02\n6 9257     4.717500e+02 7.313800e+02\n8 9257     5.023000e+02 3.927300e+02\n9 9257     3.086899e+02 5.346900e+02\n11 9257     7.772000e+02 -2.167700e+02\n0 9258     3.556300e+02 5.025500e+02\n2 9258     1.990997e+01 2.647200e+02\n3 9258     -1.261100e+02 -6.808002e+01\n5 9258     7.590500e+02 -1.388400e+02\n8 9258     9.734003e+01 2.078800e+02\n9 9258     -1.350600e+02 3.047400e+02\n11 9258     4.695400e+02 -2.471900e+02\n14 9258     6.602600e+02 -2.166600e+02\n0 9259     7.173400e+02 4.898500e+02\n2 9259     5.331000e+02 4.908900e+02\n3 9259     3.810200e+02 1.569000e+02\n6 9259     4.709800e+02 7.051600e+02\n8 9259     5.018900e+02 3.738600e+02\n9 9259     3.090601e+02 5.156500e+02\n0 9260     -1.848300e+02 4.849900e+02\n7 9260     -4.078400e+02 5.343200e+02\n0 9261     1.174800e+02 4.833300e+02\n7 9261     -1.113800e+02 5.628400e+02\n0 9262     7.623101e+02 4.804300e+02\n2 9262     5.816400e+02 4.988500e+02\n6 9262     5.246200e+02 7.064200e+02\n8 9262     5.410200e+02 3.790600e+02\n9 9262     3.482300e+02 5.228000e+02\n0 9263     7.492700e+02 4.745300e+02\n2 9263     5.682400e+02 4.882700e+02\n3 9263     4.137300e+02 1.544900e+02\n6 9263     5.114200e+02 6.972900e+02\n9 9263     3.389301e+02 5.153700e+02\n0 9264     8.242600e+02 4.750800e+02\n9 9264     3.962500e+02 5.385200e+02\n0 9265     3.007001e+01 4.731000e+02\n4 9265     -2.510010e+00 -3.792400e+02\n8 9265     -1.329100e+02 1.776400e+02\n12 9265     -2.631800e+02 4.863500e+02\n0 9266     6.301899e+02 4.630000e+02\n2 9266     4.513400e+02 4.392400e+02\n3 9266     3.057100e+02 1.072200e+02\n6 9266     3.745300e+02 6.555400e+02\n8 9266     4.344700e+02 3.318500e+02\n9 9266     2.406100e+02 4.690700e+02\n11 9266     7.058400e+02 -2.662500e+02\n13 9266     7.973500e+02 2.011700e+02\n0 9267     7.715100e+02 4.614500e+02\n2 9267     5.927300e+02 4.840000e+02\n6 9267     5.387500e+02 6.877900e+02\n0 9268     7.379200e+02 4.590200e+02\n2 9268     5.606700e+02 4.717900e+02\n3 9268     4.076801e+02 1.396700e+02\n6 9268     5.016200e+02 6.792800e+02\n9 9268     3.335500e+02 5.005600e+02\n0 9269     7.379200e+02 4.590200e+02\n2 9269     5.606700e+02 4.717900e+02\n3 9269     4.076801e+02 1.396700e+02\n6 9269     5.016200e+02 6.792800e+02\n9 9269     3.335500e+02 5.005600e+02\n0 9270     7.069600e+02 4.387600e+02\n2 9270     5.358700e+02 4.441700e+02\n3 9270     3.854500e+02 1.135100e+02\n6 9270     4.714500e+02 6.496300e+02\n8 9270     5.035300e+02 3.356300e+02\n9 9270     3.123700e+02 4.758200e+02\n13 9270     8.741500e+02 1.895800e+02\n0 9271     7.335500e+02 4.253100e+02\n2 9271     5.650200e+02 4.414900e+02\n3 9271     4.131600e+02 1.120700e+02\n6 9271     5.039301e+02 6.429500e+02\n8 9271     5.279000e+02 3.330100e+02\n9 9271     3.369700e+02 4.742700e+02\n0 9272     6.586100e+02 4.155300e+02\n2 9272     4.931801e+02 4.070600e+02\n3 9272     3.457600e+02 7.821002e+01\n6 9272     4.205000e+02 6.130800e+02\n8 9272     4.675900e+02 3.054000e+02\n9 9272     2.771200e+02 4.431900e+02\n11 9272     7.433000e+02 -3.077200e+02\n12 9272     5.026899e+02 6.208200e+02\n13 9272     8.306300e+02 1.658900e+02\n0 9273     6.498700e+02 4.058300e+02\n3 9273     3.405900e+02 6.590002e+01\n0 9274     5.464800e+02 3.967500e+02\n7 9274     3.339800e+02 5.461400e+02\n8 9274     3.432300e+02 2.259900e+02\n13 9274     7.036600e+02 1.325200e+02\n0 9275     5.688600e+02 3.827500e+02\n7 9275     3.578199e+02 5.365800e+02\n0 9276     -6.196700e+02 3.782400e+02\n4 9276     -9.840027e+00 -9.699707e-01\n11 9276     -3.952900e+02 -3.695800e+02\n0 9277     -6.999400e+02 3.635600e+02\n13 9277     -4.328600e+02 1.221002e+01\n14 9277     -4.566000e+02 -3.935000e+02\n0 9278     8.138199e+02 3.616700e+02\n3 9278     5.017500e+02 8.938000e+01\n7 9278     6.099800e+02 5.645100e+02\n9 9278     4.173000e+02 4.537400e+02\n12 9278     6.893101e+02 6.138500e+02\n0 9279     -7.082900e+02 3.555700e+02\n13 9279     -4.380100e+02 5.169983e+00\n14 9279     -4.639500e+02 -4.017800e+02\n0 9280     -7.082900e+02 3.555700e+02\n13 9280     -4.380100e+02 5.169983e+00\n14 9280     -4.639500e+02 -4.017800e+02\n0 9281     -5.770100e+02 3.558000e+02\n4 9281     -2.026001e+01 -2.828998e+01\n5 9281     -1.734000e+02 -2.967500e+02\n13 9281     -2.722000e+02 2.225000e+01\n14 9281     -2.593100e+02 -3.922900e+02\n0 9282     7.162100e+02 3.528100e+02\n3 9282     4.182900e+02 4.706000e+01\n7 9282     5.178199e+02 5.394000e+02\n0 9283     8.098300e+02 3.468500e+02\n2 9283     6.598900e+02 4.005800e+02\n7 9283     6.080200e+02 5.499800e+02\n9 9283     4.176200e+02 4.415500e+02\n12 9283     6.886100e+02 5.965100e+02\n0 9284     8.406000e+02 3.330400e+02\n7 9284     6.397600e+02 5.411200e+02\n9 9284     4.457400e+02 4.409400e+02\n0 9285     7.681700e+02 3.204700e+02\n2 9285     6.318700e+02 3.666800e+02\n6 9285     5.709200e+02 5.435900e+02\n9 9285     3.925000e+02 4.097200e+02\n12 9285     6.500200e+02 5.564500e+02\n0 9286     6.852000e+02 3.163600e+02\n2 9286     5.453800e+02 3.272400e+02\n3 9286     3.990699e+02 5.049988e+00\n7 9286     4.926600e+02 5.003800e+02\n9 9286     3.227900e+02 3.757200e+02\n10 9286     6.810100e+02 5.884600e+02\n0 9287     6.272000e+02 3.070400e+02\n2 9287     4.882600e+02 2.951400e+02\n6 9287     4.085800e+02 4.850000e+02\n7 9287     4.369200e+02 4.813500e+02\n8 9287     4.621100e+02 2.133400e+02\n9 9287     2.746500e+02 3.472100e+02\n10 9287     6.123300e+02 5.700800e+02\n13 9287     8.124500e+02 7.234998e+01\n0 9288     -4.520200e+02 3.031200e+02\n7 9288     -6.589300e+02 3.095600e+02\n0 9289     -1.938400e+02 3.009900e+02\n13 9289     3.777002e+01 -1.147998e+01\n14 9289     1.206600e+02 -4.543199e+02\n0 9290     -1.938400e+02 3.009900e+02\n13 9290     3.777002e+01 -1.147998e+01\n14 9290     1.206600e+02 -4.543199e+02\n0 9291     6.297500e+02 2.888700e+02\n2 9291     4.961100e+02 2.794500e+02\n3 9291     3.533400e+02 -4.128998e+01\n6 9291     4.169400e+02 4.670700e+02\n8 9291     4.685601e+02 2.004200e+02\n9 9291     2.815400e+02 3.345100e+02\n10 9291     6.167900e+02 5.491300e+02\n11 9291     7.454500e+02 -4.306900e+02\n12 9291     5.010500e+02 4.754200e+02\n13 9291     8.175200e+02 5.771997e+01\n0 9292     6.443199e+02 2.882900e+02\n2 9292     5.088500e+02 2.840900e+02\n3 9292     3.662000e+02 -3.665002e+01\n6 9292     4.313900e+02 4.700200e+02\n7 9292     4.547900e+02 4.666100e+02\n8 9292     4.801000e+02 2.040900e+02\n10 9292     6.318400e+02 5.493400e+02\n12 9292     5.157100e+02 4.787200e+02\n13 9292     8.295000e+02 5.870001e+01\n0 9293     5.729700e+02 2.885800e+02\n2 9293     4.341300e+02 2.554000e+02\n3 9293     2.941300e+02 -6.653003e+01\n6 9293     3.466900e+02 4.490300e+02\n7 9293     3.855300e+02 4.545200e+02\n8 9293     4.176300e+02 1.824500e+02\n9 9293     2.289900e+02 3.118300e+02\n10 9293     5.494399e+02 5.420700e+02\n13 9293     7.612200e+02 5.087000e+01\n0 9294     6.516400e+02 2.758400e+02\n2 9294     5.222500e+02 2.764800e+02\n3 9294     3.781400e+02 -4.347998e+01\n6 9294     4.460000e+02 4.599000e+02\n7 9294     4.647300e+02 4.560800e+02\n8 9294     4.898400e+02 1.973400e+02\n9 9294     3.040800e+02 3.325200e+02\n10 9294     6.433900e+02 5.359000e+02\n11 9294     7.719800e+02 -4.444400e+02\n13 9294     8.426801e+02 4.856000e+01\n0 9295     7.289000e+02 2.705900e+02\n2 9295     6.024100e+02 3.022000e+02\n6 9295     5.382500e+02 4.764500e+02\n7 9295     5.408300e+02 4.639600e+02\n8 9295     5.575200e+02 2.156900e+02\n9 9295     3.711801e+02 3.567500e+02\n10 9295     7.362400e+02 5.380700e+02\n0 9296     -5.260600e+02 2.550600e+02\n13 9296     -2.350900e+02 -6.584003e+01\n14 9296     -2.227500e+02 -5.062900e+02\n0 9297     6.587000e+01 2.513700e+02\n6 9297     -2.970600e+02 2.320300e+02\n11 9297     2.140800e+02 -4.903000e+02\n13 9297     2.770400e+02 -3.558002e+01\n14 9297     4.209800e+02 -4.983000e+02\n0 9298     6.164600e+02 1.819100e+02\n6 9298     4.275500e+02 3.450700e+02\n7 9298     4.424200e+02 3.588200e+02\n10 9298     6.081899e+02 4.193800e+02\n12 9298     5.114800e+02 3.544300e+02\n15 9298     8.092500e+02 4.761200e+02\n0 9299     6.164600e+02 1.819100e+02\n6 9299     4.275500e+02 3.450700e+02\n10 9299     6.081899e+02 4.193800e+02\n12 9299     5.114800e+02 3.544300e+02\n0 9300     6.001899e+02 1.814300e+02\n7 9300     4.263300e+02 3.542500e+02\n10 9300     5.881000e+02 4.165100e+02\n15 9300     7.861200e+02 4.724600e+02\n0 9301     8.459000e+02 1.798900e+02\n2 9301     7.421801e+02 2.680700e+02\n3 9301     5.872700e+02 -4.483002e+01\n7 9301     6.640300e+02 3.977100e+02\n9 9301     4.889700e+02 3.318100e+02\n0 9302     7.057700e+02 1.663600e+02\n3 9302     4.631000e+02 -1.166400e+02\n7 9302     5.324399e+02 3.603200e+02\n10 9302     7.156400e+02 4.113300e+02\n12 9302     6.141700e+02 3.691600e+02\n0 9303     7.200100e+02 1.675700e+02\n3 9303     4.781700e+02 -1.073000e+02\n7 9303     5.458900e+02 3.646800e+02\n8 9303     5.753800e+02 1.363800e+02\n9 9303     3.947200e+02 2.758600e+02\n10 9303     7.324000e+02 4.139200e+02\n0 9304     -2.649700e+02 1.631700e+02\n7 9304     -4.316100e+02 1.967400e+02\n0 9305     7.300300e+02 1.606000e+02\n2 9305     6.352200e+02 2.032800e+02\n3 9305     4.898101e+02 -1.090800e+02\n7 9305     5.570900e+02 3.592700e+02\n10 9305     7.448700e+02 4.067500e+02\n0 9306     8.609500e+02 1.339900e+02\n2 9306     7.688600e+02 2.320500e+02\n7 9306     6.833000e+02 3.567200e+02\n0 9307     6.704800e+02 1.272800e+02\n2 9307     5.829900e+02 1.408200e+02\n3 9307     4.429200e+02 -1.700600e+02\n6 9307     5.070300e+02 3.030900e+02\n7 9307     5.033800e+02 3.155300e+02\n8 9307     5.384100e+02 8.410001e+01\n9 9307     3.583600e+02 2.196400e+02\n10 9307     6.760900e+02 3.600800e+02\n12 9307     5.882200e+02 3.122400e+02\n0 9308     8.411200e+02 1.265700e+02\n2 9308     7.530300e+02 2.184200e+02\n3 9308     6.005100e+02 -9.094000e+01\n7 9308     6.663900e+02 3.466400e+02\n9 9308     4.989700e+02 2.904700e+02\n0 9309     6.955601e+02 1.107200e+02\n2 9309     6.129700e+02 1.366200e+02\n0 9310     8.036700e+02 9.263000e+01\n7 9310     6.356801e+02 3.081400e+02\n9 9310     4.790601e+02 2.496700e+02\n12 9310     7.475400e+02 3.265500e+02\n0 9311     -9.760010e+00 8.404999e+01\n2 9311     8.801001e+01 8.963000e+01\n3 9311     -2.580017e+00 -2.260500e+02\n5 9311     6.081500e+02 -5.767100e+02\n6 9311     -9.160999e+01 1.037400e+02\n7 9311     -1.129100e+02 1.929200e+02\n8 9311     1.060600e+02 2.942999e+01\n10 9311     -1.137100e+02 2.380300e+02\n12 9311     -6.840002e+01 1.590600e+02\n13 9311     3.465000e+02 -1.528900e+02\n15 9311     -5.826001e+01 2.505100e+02\n0 9312     -9.760010e+00 8.404999e+01\n2 9312     8.801001e+01 8.963000e+01\n4 9312     -2.151700e+02 -4.032200e+02\n5 9312     6.081500e+02 -5.767100e+02\n6 9312     -9.160999e+01 1.037400e+02\n7 9312     -1.129100e+02 1.929200e+02\n8 9312     1.060600e+02 2.942999e+01\n10 9312     -1.137100e+02 2.380300e+02\n12 9312     -6.840002e+01 1.590600e+02\n13 9312     3.465000e+02 -1.528900e+02\n15 9312     -5.826001e+01 2.505100e+02\n0 9313     8.398700e+02 8.100000e+01\n2 9313     7.654399e+02 1.759000e+02\n7 9313     6.711700e+02 3.035400e+02\n12 9313     7.911400e+02 3.260900e+02\n0 9314     8.561100e+02 7.166998e+01\n2 9314     7.844399e+02 1.733500e+02\n3 9314     6.328900e+02 -1.316400e+02\n7 9314     6.878000e+02 2.969200e+02\n9 9314     5.256500e+02 2.537400e+02\n12 9314     8.106300e+02 3.218500e+02\n0 9315     -3.952400e+02 6.115002e+01\n13 9315     -8.484003e+01 -2.262200e+02\n0 9316     8.580100e+02 5.098999e+01\n2 9316     7.912400e+02 1.551900e+02\n3 9316     6.413900e+02 -1.483600e+02\n9 9316     5.315601e+02 2.391700e+02\n12 9316     8.172200e+02 3.013100e+02\n0 9317     6.871000e+02 4.546002e+01\n3 9317     4.864600e+02 -2.409800e+02\n6 9317     5.483600e+02 2.198100e+02\n9 9317     3.949800e+02 1.580600e+02\n12 9317     6.271700e+02 2.278800e+02\n0 9318     6.871000e+02 4.546002e+01\n9 9318     3.949800e+02 1.580600e+02\n0 9319     8.297000e+02 4.337000e+01\n2 9319     7.672500e+02 1.364400e+02\n3 9319     6.195100e+02 -1.674000e+02\n9 9319     5.123800e+02 2.221100e+02\n12 9319     7.881700e+02 2.842900e+02\n0 9320     6.501000e+02 3.765002e+01\n2 9320     5.860800e+02 4.104999e+01\n3 9320     4.510400e+02 -2.662800e+02\n6 9320     5.062000e+02 1.972900e+02\n7 9320     4.953000e+02 2.255300e+02\n8 9320     5.403600e+02 2.959991e+00\n10 9320     6.590000e+02 2.529400e+02\n12 9320     5.872100e+02 2.070400e+02\n0 9321     -3.556300e+02 1.095001e+01\n7 9321     -4.909500e+02 3.282001e+01\n0 9322     -1.654000e+02 6.900024e+00\n7 9322     -2.685000e+02 8.134000e+01\n10 9322     -2.876500e+02 1.310400e+02\n12 9322     -2.558200e+02 3.530029e+00\n13 9322     1.955300e+02 -2.386800e+02\n0 9323     7.913700e+02 3.510010e+00\n2 9323     7.432700e+02 7.944000e+01\n7 9323     6.362200e+02 2.208100e+02\n12 9323     7.574301e+02 2.255000e+02\n0 9324     -4.235500e+02 -5.070007e+00\n13 9324     -9.472998e+01 -2.843500e+02\n0 9325     -3.542100e+02 -7.789978e+00\n7 9325     -4.854000e+02 1.467999e+01\n15 9325     -5.054000e+02 7.514001e+01\n0 9326     -4.252300e+02 -1.901001e+01\n2 9326     -5.468700e+02 -2.971800e+02\n13 9326     -9.265997e+01 -2.964000e+02\n15 9326     -5.991300e+02 5.173999e+01\n0 9327     2.102600e+02 -1.906000e+01\n2 9327     3.629000e+02 5.254999e+01\n3 9327     2.590800e+02 -2.545000e+02\n7 9327     1.269200e+02 1.296700e+02\n8 9327     3.299000e+02 -4.579987e+00\n9 9327     1.906400e+02 1.418900e+02\n10 9327     1.520300e+02 1.407500e+02\n12 9327     2.231200e+02 1.100100e+02\n13 9327     5.587900e+02 -2.208800e+02\n15 9327     2.537000e+02 1.400900e+02\n0 9328     8.611200e+02 -2.171997e+01\n2 9328     8.182400e+02 8.876001e+01\n3 9328     6.712600e+02 -2.109600e+02\n7 9328     7.045500e+02 2.100900e+02\n9 9328     5.551500e+02 1.843200e+02\n0 9329     7.120699e+02 -5.356000e+01\n7 9329     5.673800e+02 1.505600e+02\n10 9329     7.381899e+02 1.543000e+02\n0 9330     7.120699e+02 -5.356000e+01\n2 9330     6.750500e+02 -1.856000e+01\n3 9330     5.428500e+02 -3.210100e+02\n7 9330     5.673800e+02 1.505600e+02\n10 9330     7.381899e+02 1.543000e+02\n0 9331     6.962100e+02 -6.484998e+01\n2 9331     6.655900e+02 -3.952002e+01\n3 9331     5.336500e+02 -3.421100e+02\n7 9331     5.538800e+02 1.364300e+02\n0 9332     7.476300e+02 -7.002002e+01\n2 9332     7.218199e+02 -1.678998e+01\n7 9332     6.043500e+02 1.418000e+02\n0 9333     7.476300e+02 -7.002002e+01\n2 9333     7.218199e+02 -1.678998e+01\n7 9333     6.043500e+02 1.418000e+02\n10 9333     7.821200e+02 1.392900e+02\n12 9333     7.295800e+02 1.266600e+02\n0 9334     -4.531700e+02 -7.204999e+01\n7 9334     -5.736400e+02 -6.584998e+01\n13 9334     -1.064400e+02 -3.437000e+02\n0 9335     -3.998400e+02 -8.198999e+01\n7 9335     -5.152600e+02 -6.578998e+01\n8 9335     -3.366000e+02 -3.029300e+02\n15 9335     -5.585500e+02 -3.065997e+01\n0 9336     -4.222800e+02 -9.059003e+01\n13 9336     -7.250000e+01 -3.593200e+02\n0 9337     2.304200e+02 -9.751001e+01\n2 9337     4.043000e+02 -2.996997e+01\n3 9337     3.023900e+02 -3.317500e+02\n6 9337     2.407400e+02 -1.977002e+01\n7 9337     1.574900e+02 5.428998e+01\n8 9337     3.637200e+02 -7.314001e+01\n10 9337     1.838100e+02 5.233002e+01\n13 9337     5.831100e+02 -2.889100e+02\n15 9337     2.918700e+02 3.566998e+01\n0 9338     -5.598999e+01 -1.041100e+02\n7 9338     -1.240100e+02 -1.140015e+00\n15 9338     -9.571002e+01 -1.173999e+01\n0 9339     -4.335300e+02 -1.108600e+02\n2 9339     -4.931900e+02 -3.803700e+02\n13 9339     -7.776001e+01 -3.751100e+02\n0 9340     -4.034003e+01 -1.147800e+02\n7 9340     -1.058200e+02 -8.770020e+00\n0 9341     -4.497200e+02 -1.146100e+02\n2 9341     -5.132300e+02 -3.893700e+02\n7 9341     -5.591100e+02 -1.072300e+02\n8 9341     -3.723200e+02 -3.397300e+02\n13 9341     -9.275000e+01 -3.812800e+02\n0 9342     7.548101e+02 -1.181400e+02\n2 9342     7.428101e+02 -6.160999e+01\n3 9342     6.106801e+02 -3.596400e+02\n7 9342     6.171801e+02 9.779001e+01\n9 9342     4.970601e+02 5.728998e+01\n10 9342     7.939100e+02 8.370001e+01\n12 9342     7.478500e+02 7.667999e+01\n0 9343     7.398800e+02 -1.222900e+02\n7 9343     6.025900e+02 9.007001e+01\n0 9344     1.829700e+02 -1.280200e+02\n10 9344     1.312800e+02 1.184998e+01\n13 9344     5.476400e+02 -3.184300e+02\n15 9344     2.308500e+02 -1.212000e+01\n0 9345     8.369600e+02 -1.291400e+02\n7 9345     6.958000e+02 1.031800e+02\n9 9345     5.664000e+02 8.642999e+01\n0 9346     -5.112000e+01 -1.406900e+02\n7 9346     -1.134000e+02 -3.778003e+01\n15 9346     -8.408002e+01 -6.015997e+01\n0 9347     -9.246997e+01 -1.501100e+02\n6 9347     -8.378000e+01 -1.876700e+02\n7 9347     -1.520800e+02 -5.390997e+01\n10 9347     -1.845400e+02 -4.282001e+01\n12 9347     -8.490997e+01 -1.326100e+02\n15 9347     -1.399500e+02 -7.860999e+01\n0 9348     -4.542100e+02 -1.638000e+02\n7 9348     -5.517300e+02 -1.560300e+02\n15 9348     -6.198000e+02 -1.485100e+02\n0 9349     1.326600e+02 -1.645100e+02\n10 9349     7.738000e+01 -3.553003e+01\n13 9349     5.139399e+02 -3.525000e+02\n15 9349     1.665900e+02 -6.884998e+01\n0 9350     1.326600e+02 -1.645100e+02\n10 9350     7.738000e+01 -3.553003e+01\n13 9350     5.139399e+02 -3.525000e+02\n15 9350     1.665900e+02 -6.884998e+01\n0 9351     5.097600e+02 -1.650300e+02\n7 9351     4.008900e+02 1.253998e+01\n0 9352     8.526899e+02 -1.962600e+02\n3 9352     7.329399e+02 -3.782400e+02\n9 9352     5.978000e+02 3.983002e+01\n0 9353     1.622700e+02 -2.179200e+02\n10 9353     1.166300e+02 -9.421997e+01\n13 9353     5.488400e+02 -3.980800e+02\n15 9353     2.133500e+02 -1.366200e+02\n0 9354     1.940100e+02 -2.269100e+02\n10 9354     1.541500e+02 -1.004900e+02\n13 9354     5.781300e+02 -4.036800e+02\n15 9354     2.582100e+02 -1.446100e+02\n0 9355     3.221700e+02 -2.406900e+02\n2 9355     5.260699e+02 -1.718600e+02\n6 9355     3.706900e+02 -1.524900e+02\n7 9355     2.654200e+02 -7.306000e+01\n8 9355     4.650200e+02 -1.909800e+02\n9 9355     3.326100e+02 -3.533002e+01\n10 9355     3.030900e+02 -1.019900e+02\n12 9355     4.026300e+02 -1.224900e+02\n15 9355     4.383101e+02 -1.472000e+02\n0 9356     -7.188000e+01 -2.726500e+02\n7 9356     -1.167800e+02 -1.773800e+02\n10 9356     -1.465000e+02 -1.800600e+02\n15 9356     -9.189001e+01 -2.398100e+02\n0 9357     3.156000e+02 -2.748700e+02\n7 9357     2.614900e+02 -1.096900e+02\n10 9357     2.986500e+02 -1.417200e+02\n12 9357     3.979800e+02 -1.731000e+02\n13 9357     6.690100e+02 -4.488900e+02\n15 9357     4.348199e+02 -1.946900e+02\n0 9358     3.426200e+02 -2.913100e+02\n6 9358     3.889600e+02 -2.209301e+02\n8 9358     4.781000e+02 -2.563500e+02\n9 9358     3.455300e+02 -1.067800e+02\n15 9358     4.746300e+02 -2.147000e+02\n0 9359     -1.882001e+01 -2.961900e+02\n2 9359     2.122600e+02 -3.388200e+02\n4 9359     -4.936000e+02 -3.809000e+02\n6 9359     3.009003e+01 -3.458400e+02\n7 9359     -5.763000e+01 -1.911900e+02\n8 9359     1.958300e+02 -3.248000e+02\n9 9359     8.534003e+01 -1.867300e+02\n10 9359     -8.314001e+01 -2.022200e+02\n12 9359     3.437000e+01 -3.001500e+02\n13 9359     3.774399e+02 -4.952800e+02\n15 9359     -1.813000e+01 -2.660700e+02\n0 9360     -3.301001e+01 -3.304900e+02\n4 9360     -5.189600e+02 -3.626700e+02\n7 9360     -6.758002e+01 -2.285900e+02\n10 9360     -9.603003e+01 -2.428100e+02\n12 9360     1.928998e+01 -3.560100e+02\n13 9360     3.619000e+02 -5.306801e+02\n15 9360     -3.248999e+01 -3.130800e+02\n0 9361     7.146400e+02 -3.453200e+02\n12 9361     8.011700e+02 -1.609300e+02\n0 9362     7.516600e+02 -3.533100e+02\n7 9362     6.596200e+02 -1.168200e+02\n0 9363     2.035200e+02 -3.569700e+02\n2 9363     4.574100e+02 -3.391300e+02\n8 9363     4.015400e+02 -3.301900e+02\n9 9363     2.807800e+02 -1.776900e+02\n10 9363     1.797300e+02 -2.512500e+02\n13 9363     5.823500e+02 -5.307900e+02\n0 9364     4.877600e+02 -4.210200e+02\n7 9364     4.409200e+02 -2.246300e+02\n0 9365     4.444200e+02 -4.449600e+02\n6 9365     5.452000e+02 -3.515800e+02\n0 9366     4.674500e+02 -4.442400e+02\n7 9366     4.290699e+02 -2.483200e+02\n0 9367     5.436000e+02 -4.492100e+02\n12 9367     6.849000e+02 -3.091000e+02\n0 9368     5.573101e+02 -4.525699e+02\n12 9368     7.010900e+02 -3.078500e+02\n0 9369     8.415400e+02 -4.606200e+02\n7 9369     7.576600e+02 -1.955400e+02\n0 9370     8.415400e+02 -4.606200e+02\n7 9370     7.576600e+02 -1.955400e+02\n0 9371     7.608500e+02 -4.691500e+02\n7 9371     6.925900e+02 -2.168000e+02\n0 9372     -1.850300e+02 -4.696200e+02\n7 9372     -1.943300e+02 -3.997500e+02\n0 9373     -1.395600e+02 -4.812400e+02\n7 9373     -1.446200e+02 -4.018200e+02\n9 9373     4.689001e+01 -4.113600e+02\n0 9374     -1.420000e+02 -5.171200e+02\n4 9374     -6.533100e+02 -2.721800e+02\n6 9374     -1.740997e+01 -6.595601e+02\n9 9374     7.507001e+01 -4.366500e+02\n0 9375     7.523101e+02 -5.411801e+02\n7 9375     7.001000e+02 -2.817400e+02\n9 9375     7.102400e+02 -1.802300e+02\n0 9376     1.697998e+01 -5.527100e+02\n7 9376     2.765997e+01 -4.387000e+02\n0 9377     1.697998e+01 -5.527100e+02\n7 9377     2.765997e+01 -4.387000e+02\n0 9378     4.227900e+02 -5.566200e+02\n2 9378     7.559600e+02 -4.742700e+02\n7 9378     4.129301e+02 -3.593600e+02\n0 9379     7.275500e+02 -5.672200e+02\n7 9379     6.850000e+02 -3.106400e+02\n0 9380     7.610601e+02 5.036300e+02\n2 9380     5.723000e+02 5.186000e+02\n3 9380     4.167400e+02 1.830100e+02\n6 9380     5.198600e+02 7.293400e+02\n0 9381     7.935100e+02 4.664400e+02\n2 9381     6.119200e+02 4.962700e+02\n3 9381     4.540601e+02 1.625400e+02\n8 9381     5.684000e+02 3.776400e+02\n9 9381     3.757600e+02 5.222700e+02\n0 9382     5.876300e+02 4.388100e+02\n2 9382     3.684700e+02 3.563300e+02\n3 9382     2.239399e+02 2.725000e+01\n13 9382     7.370400e+02 1.716200e+02\n0 9383     -5.279500e+02 4.138900e+02\n10 9383     -7.822500e+02 5.907000e+02\n14 9383     -2.027800e+02 -3.311100e+02\n0 9384     6.375800e+02 4.153600e+02\n2 9384     4.720100e+02 3.948400e+02\n3 9384     3.262900e+02 6.684003e+01\n6 9384     3.951600e+02 6.017400e+02\n8 9384     4.501000e+02 2.960800e+02\n9 9384     2.587000e+02 4.331100e+02\n12 9384     4.793300e+02 6.076100e+02\n13 9384     8.101600e+02 1.594500e+02\n0 9385     -5.916700e+02 4.023800e+02\n13 9385     -2.811100e+02 6.196002e+01\n14 9385     -2.664200e+02 -3.429400e+02\n0 9386     5.750000e+02 3.945700e+02\n2 9386     3.653101e+02 3.102800e+02\n3 9386     2.215601e+02 -1.590002e+01\n7 9386     3.619301e+02 5.484000e+02\n8 9386     3.666800e+02 2.317800e+02\n13 9386     7.293600e+02 1.340600e+02\n0 9387     7.915900e+02 3.906100e+02\n2 9387     6.306400e+02 4.341500e+02\n3 9387     4.743800e+02 1.057600e+02\n6 9387     5.785500e+02 6.252800e+02\n8 9387     5.827700e+02 3.269800e+02\n9 9387     3.929500e+02 4.696300e+02\n0 9388     -5.294200e+02 3.873800e+02\n4 9388     -8.260010e+00 -5.614001e+01\n5 9388     -1.258300e+02 -2.655100e+02\n10 9388     -7.787700e+02 5.560900e+02\n11 9388     -3.213800e+02 -3.630600e+02\n0 9389     6.552700e+02 3.873000e+02\n2 9389     4.973700e+02 3.804600e+02\n3 9389     3.509000e+02 5.362000e+01\n6 9389     4.235900e+02 5.810800e+02\n7 9389     4.544600e+02 5.638500e+02\n8 9389     4.710000e+02 2.830000e+02\n9 9389     2.811600e+02 4.202000e+02\n12 9389     5.062900e+02 5.886200e+02\n13 9389     8.311100e+02 1.421900e+02\n0 9390     6.552700e+02 3.873000e+02\n2 9390     4.973700e+02 3.804600e+02\n3 9390     3.509000e+02 5.362000e+01\n6 9390     4.235900e+02 5.810800e+02\n7 9390     4.544600e+02 5.638500e+02\n8 9390     4.710000e+02 2.830000e+02\n11 9390     7.460400e+02 -3.342400e+02\n12 9390     5.062900e+02 5.886200e+02\n13 9390     8.311100e+02 1.421900e+02\n0 9391     -4.632300e+02 3.532100e+02\n7 9391     -6.776500e+02 3.627600e+02\n15 9391     -7.105100e+02 5.592700e+02\n0 9392     5.824100e+02 3.046500e+02\n2 9392     4.406000e+02 2.747600e+02\n7 9392     3.931300e+02 4.708300e+02\n8 9392     4.231500e+02 1.976200e+02\n9 9392     2.356400e+02 3.298500e+02\n10 9392     5.599700e+02 5.625900e+02\n0 9393     7.837400e+02 2.890500e+02\n2 9393     6.529600e+02 3.398100e+02\n3 9393     4.973300e+02 2.044000e+01\n10 9393     8.033400e+02 5.661200e+02\n0 9394     6.818300e+02 2.855500e+02\n2 9394     5.509500e+02 2.977400e+02\n3 9394     4.050000e+02 -2.245001e+01\n6 9394     4.795601e+02 4.794500e+02\n7 9394     4.937100e+02 4.707500e+02\n8 9394     5.138500e+02 2.144800e+02\n9 9394     3.278101e+02 3.516200e+02\n10 9394     6.796400e+02 5.507100e+02\n12 9394     5.610800e+02 4.888200e+02\n0 9395     6.623800e+02 2.672700e+02\n2 9395     5.359000e+02 2.725000e+02\n3 9395     3.914800e+02 -4.659998e+01\n6 9395     4.611100e+02 4.537500e+02\n7 9395     4.768101e+02 4.492500e+02\n8 9395     5.011801e+02 1.937900e+02\n9 9395     3.158500e+02 3.295500e+02\n10 9395     6.569700e+02 5.265000e+02\n12 9395     5.429800e+02 4.627100e+02\n13 9395     8.519500e+02 4.339001e+01\n0 9396     6.901100e+02 2.489400e+02\n2 9396     5.701500e+02 2.672200e+02\n3 9396     4.250400e+02 -5.057001e+01\n6 9396     4.992000e+02 4.430200e+02\n7 9396     5.071600e+02 4.365600e+02\n8 9396     5.295500e+02 1.886000e+02\n9 9396     3.451100e+02 3.262200e+02\n10 9396     6.912700e+02 5.081400e+02\n12 9396     5.805100e+02 4.529700e+02\n0 9397     -7.901001e+01 2.293000e+02\n7 9397     -2.572500e+02 2.878700e+02\n0 9398     -5.478000e+02 2.212100e+02\n13 9398     -2.569300e+02 -9.658002e+01\n14 9398     -2.530200e+02 -5.440000e+02\n0 9399     6.494600e+02 2.212500e+02\n2 9399     5.349900e+02 2.233800e+02\n3 9399     3.928700e+02 -9.358002e+01\n6 9399     4.579200e+02 3.999900e+02\n7 9399     4.706801e+02 4.024200e+02\n8 9399     5.000900e+02 1.541900e+02\n9 9399     3.164600e+02 2.881700e+02\n10 9399     6.448900e+02 4.692100e+02\n12 9399     5.403700e+02 4.100800e+02\n13 9399     8.454600e+02 2.750000e+00\n15 9399     8.523900e+02 5.369900e+02\n0 9400     6.494600e+02 2.212500e+02\n2 9400     5.349900e+02 2.233800e+02\n6 9400     4.579200e+02 3.999900e+02\n7 9400     4.706801e+02 4.024200e+02\n8 9400     5.000900e+02 1.541900e+02\n9 9400     3.164600e+02 2.881700e+02\n10 9400     6.448900e+02 4.692100e+02\n13 9400     8.454600e+02 2.750000e+00\n15 9400     8.523900e+02 5.369900e+02\n0 9401     5.446500e+02 2.169500e+02\n7 9401     3.667100e+02 3.802800e+02\n0 9402     7.706600e+02 1.975000e+02\n2 9402     6.610300e+02 2.525200e+02\n3 9402     5.143300e+02 -6.232001e+01\n10 9402     7.903900e+02 4.555800e+02\n0 9403     -1.758100e+02 1.749300e+02\n7 9403     -3.435500e+02 2.225700e+02\n0 9404     7.602800e+02 1.739300e+02\n7 9404     5.792500e+02 3.787000e+02\n10 9404     7.741300e+02 4.295600e+02\n0 9405     -2.517600e+02 1.651000e+02\n7 9405     -4.198400e+02 2.008400e+02\n0 9406     6.257300e+02 1.626100e+02\n2 9406     5.246600e+02 1.561700e+02\n3 9406     3.853800e+02 -1.577600e+02\n6 9406     4.430200e+02 3.273500e+02\n7 9406     4.547500e+02 3.418600e+02\n8 9406     4.902300e+02 9.864001e+01\n9 9406     3.084301e+02 2.309600e+02\n10 9406     6.207400e+02 3.980300e+02\n12 9406     5.267500e+02 3.367900e+02\n13 9406     8.287300e+02 -5.107001e+01\n15 9406     8.250800e+02 4.504200e+02\n0 9407     7.477100e+02 1.628700e+02\n7 9407     5.729800e+02 3.648500e+02\n10 9407     7.654100e+02 4.119700e+02\n0 9408     8.199000e+02 1.411000e+02\n2 9408     7.291300e+02 2.229500e+02\n3 9408     5.785100e+02 -8.759998e+01\n7 9408     6.449000e+02 3.569600e+02\n9 9408     4.788101e+02 2.940000e+02\n0 9409     7.433600e+02 1.028000e+02\n2 9409     6.640000e+02 1.534300e+02\n3 9409     5.193000e+02 -1.550000e+02\n7 9409     5.768000e+02 3.069900e+02\n9 9409     4.267300e+02 2.332000e+02\n10 9409     7.644700e+02 3.400500e+02\n12 9409     6.757600e+02 3.163200e+02\n0 9410     5.477002e+01 7.323999e+01\n2 9410     1.793400e+02 1.069800e+02\n3 9410     8.453998e+01 -2.073900e+02\n4 9410     -2.301000e+02 -4.571801e+02\n5 9410     6.999301e+02 -5.871300e+02\n6 9410     2.600098e-01 1.160900e+02\n7 9410     -4.357001e+01 1.948500e+02\n8 9410     1.799900e+02 4.175000e+01\n12 9410     1.934003e+01 1.703900e+02\n0 9411     5.994900e+02 3.588000e+01\n6 9411     4.453900e+02 1.742200e+02\n7 9411     4.465300e+02 2.156600e+02\n10 9411     6.005900e+02 2.480300e+02\n13 9411     8.165500e+02 -1.668100e+02\n15 9411     8.028500e+02 2.691100e+02\n0 9412     1.734998e+01 2.738000e+01\n4 9412     -2.512300e+02 -4.219200e+02\n8 9412     1.564400e+02 -2.429993e+00\n13 9412     3.816899e+02 -1.959500e+02\n15 9412     -1.504999e+01 1.768700e+02\n0 9413     8.038800e+02 2.814001e+01\n2 9413     7.472300e+02 1.093000e+02\n3 9413     6.031300e+02 -1.941800e+02\n7 9413     6.441600e+02 2.466300e+02\n9 9413     4.964800e+02 1.989700e+02\n12 9413     7.639000e+02 2.565300e+02\n0 9414     -8.105500e+02 2.342999e+01\n13 9414     -4.593000e+02 -2.825800e+02\n0 9415     6.569800e+02 2.282001e+01\n3 9415     4.597100e+02 -2.781500e+02\n7 9415     5.022500e+02 2.125500e+02\n10 9415     6.649900e+02 2.371300e+02\n0 9416     -3.360600e+02 -4.159973e+00\n4 9416     -2.446700e+02 -1.404400e+02\n7 9416     -4.661600e+02 2.292999e+01\n15 9416     -4.795400e+02 8.501999e+01\n0 9417     -6.634003e+01 -1.648999e+01\n7 9417     -1.543800e+02 8.050000e+01\n10 9417     -1.689100e+02 1.148200e+02\n0 9418     -6.634003e+01 -1.648999e+01\n7 9418     -1.543800e+02 8.050000e+01\n10 9418     -1.689100e+02 1.148200e+02\n0 9419     -3.590200e+02 -2.370001e+01\n7 9419     -4.860700e+02 -1.280029e+00\n13 9419     -3.162000e+01 -2.969100e+02\n15 9419     -5.079800e+02 5.406000e+01\n0 9420     2.919399e+02 -7.979999e+01\n10 9420     2.520800e+02 7.846002e+01\n13 9420     6.263000e+02 -2.719700e+02\n15 9420     3.751801e+02 6.737000e+01\n0 9421     -4.066100e+02 -9.709003e+01\n7 9421     -5.176900e+02 -8.158002e+01\n15 9421     -5.619400e+02 -4.940997e+01\n0 9422     -1.471800e+02 -1.049100e+02\n7 9422     -2.187300e+02 -2.153003e+01\n10 9422     -2.532600e+02 4.419983e+00\n15 9422     -2.190700e+02 -2.457001e+01\n0 9423     -4.304600e+02 -1.255600e+02\n7 9423     -5.362200e+02 -1.136100e+02\n0 9424     3.497100e+02 -1.992500e+02\n10 9424     3.299500e+02 -5.214001e+01\n12 9424     4.279100e+02 -5.751001e+01\n15 9424     4.683400e+02 -8.845001e+01\n0 9425     2.293300e+02 -2.251400e+02\n2 9425     4.738700e+02 -1.386700e+02\n3 9425     3.781700e+02 -4.334301e+02\n6 9425     3.005700e+02 -1.501600e+02\n7 9425     1.835900e+02 -6.840002e+01\n8 9425     4.159800e+02 -1.673200e+02\n10 9425     1.944200e+02 -9.471997e+01\n12 9425     3.179399e+02 -1.138800e+02\n15 9425     3.056000e+02 -1.375800e+02\n0 9426     1.213900e+02 -2.304900e+02\n6 9426     1.969600e+02 -1.908101e+02\n7 9426     8.145001e+01 -9.159998e+01\n12 9426     2.010800e+02 -1.503400e+02\n15 9426     1.599500e+02 -1.589100e+02\n0 9427     -2.963500e+02 -2.493200e+02\n13 9427     8.209003e+01 -4.884800e+02\n15 9427     -3.943800e+02 -2.421200e+02\n0 9428     -1.440002e+00 -2.506500e+02\n4 9428     -4.583900e+02 -4.031100e+02\n9 9428     1.038100e+02 -1.133100e+02\n15 9428     -3.169983e+00 -2.022100e+02\n0 9429     2.627002e+01 -2.754200e+02\n2 9429     2.709800e+02 -2.780700e+02\n4 9429     -4.832300e+02 -4.233900e+02\n7 9429     -1.222998e+01 -1.590900e+02\n8 9429     2.446400e+02 -2.729400e+02\n9 9429     1.317600e+02 -1.340400e+02\n10 9429     -3.340002e+01 -1.738800e+02\n13 9429     4.243300e+02 -4.669301e+02\n15 9429     3.869000e+01 -2.325800e+02\n0 9430     2.627002e+01 -2.754200e+02\n4 9430     -4.832300e+02 -4.233900e+02\n6 9430     8.778003e+01 -2.917000e+02\n8 9430     2.446400e+02 -2.729400e+02\n10 9430     -3.340002e+01 -1.738800e+02\n12 9430     9.057001e+01 -2.483100e+02\n15 9430     3.869000e+01 -2.325800e+02\n0 9431     3.326700e+02 -2.996500e+02\n9 9431     3.428199e+02 -1.128500e+02\n10 9431     3.208199e+02 -1.681200e+02\n13 9431     6.837200e+02 -4.729500e+02\n15 9431     4.619301e+02 -2.255300e+02\n0 9432     -4.771997e+01 -3.302400e+02\n4 9432     -5.138200e+02 -3.538300e+02\n6 9432     2.289978e+00 -3.986600e+02\n7 9432     -8.258002e+01 -2.318000e+02\n10 9432     -1.126600e+02 -2.451000e+02\n12 9432     5.580017e+00 -3.514600e+02\n13 9432     3.504700e+02 -5.300601e+02\n15 9432     -5.195001e+01 -3.159300e+02\n0 9433     7.577800e+02 -3.341500e+02\n7 9433     6.609301e+02 -9.907001e+01\n0 9434     -3.095001e+01 -3.522800e+02\n7 9434     -6.238000e+01 -2.487300e+02\n10 9434     -9.150000e+01 -2.653600e+02\n0 9435     8.485300e+02 -4.100100e+02\n7 9435     7.528600e+02 -1.502800e+02\n0 9436     -1.528500e+02 -4.840500e+02\n6 9436     -4.865002e+01 -6.318101e+02\n7 9436     -1.580100e+02 -4.079600e+02\n9 9436     4.517999e+01 -4.206400e+02\n0 9437     -3.066998e+01 -5.586200e+02\n7 9437     -1.678003e+01 -4.527500e+02\n0 9438     -3.066998e+01 -5.586200e+02\n7 9438     -1.678003e+01 -4.527500e+02\n0 9439     -9.859998e+01 -5.671899e+02\n7 9439     -8.290002e+01 -4.764700e+02\n0 9440     -1.433100e+02 5.719100e+02\n2 9440     -4.304900e+02 3.427100e+02\n4 9440     6.472998e+01 -2.825600e+02\n5 9440     2.694301e+02 -7.644000e+01\n8 9440     -2.746100e+02 2.612300e+02\n11 9440     1.934998e+01 -2.064500e+02\n12 9440     -4.738000e+02 5.752500e+02\n0 9441     -1.433100e+02 5.719100e+02\n2 9441     -4.304900e+02 3.427100e+02\n4 9441     6.472998e+01 -2.825600e+02\n5 9441     2.694301e+02 -7.644000e+01\n8 9441     -2.746100e+02 2.612300e+02\n11 9441     1.934998e+01 -2.064500e+02\n12 9441     -4.738000e+02 5.752500e+02\n0 9442     1.552100e+02 5.541200e+02\n2 9442     -1.613300e+02 3.194100e+02\n4 9442     3.184003e+01 -4.548101e+02\n6 9442     -3.235200e+02 6.210500e+02\n8 9442     -5.185999e+01 2.490000e+02\n11 9442     2.796801e+02 -2.112900e+02\n12 9442     -1.549200e+02 5.904600e+02\n13 9442     3.077200e+02 2.242500e+02\n14 9442     4.567300e+02 -1.753200e+02\n0 9443     4.355400e+02 5.532600e+02\n2 9443     7.909998e+01 3.209900e+02\n3 9443     -6.696997e+01 -1.270001e+01\n6 9443     -2.607001e+01 6.744200e+02\n8 9443     1.472800e+02 2.537100e+02\n9 9443     -8.647998e+01 3.553500e+02\n13 9443     5.326200e+02 2.423500e+02\n14 9443     7.335200e+02 -1.598500e+02\n0 9444     6.568800e+02 5.320900e+02\n2 9444     4.619000e+02 5.087500e+02\n3 9444     3.130699e+02 1.721700e+02\n9 9444     2.493300e+02 5.325000e+02\n13 9444     8.156200e+02 2.606200e+02\n0 9445     1.250400e+02 5.075100e+02\n2 9445     -1.729400e+02 2.730100e+02\n14 9445     4.362700e+02 -2.231700e+02\n0 9446     9.192999e+01 5.035700e+02\n2 9446     -2.065900e+02 2.666900e+02\n3 9446     -3.406300e+02 -6.852002e+01\n6 9446     -3.760200e+02 5.487700e+02\n8 9446     -9.002002e+01 2.058400e+02\n12 9446     -2.040500e+02 5.313200e+02\n13 9446     2.633400e+02 1.778400e+02\n0 9447     7.477300e+02 4.901400e+02\n3 9447     4.074399e+02 1.672000e+02\n8 9447     5.264200e+02 3.841500e+02\n9 9447     3.331700e+02 5.274200e+02\n0 9448     8.094301e+02 4.053100e+02\n2 9448     6.435400e+02 4.500500e+02\n9 9448     4.036300e+02 4.830100e+02\n0 9449     5.292000e+02 3.793300e+02\n2 9449     3.210100e+02 2.792500e+02\n7 9449     3.190200e+02 5.257500e+02\n8 9449     3.294300e+02 2.064300e+02\n9 9449     1.297400e+02 3.282300e+02\n11 9449     6.370000e+02 -3.511100e+02\n13 9449     6.867000e+02 1.164700e+02\n0 9450     5.185200e+02 3.320600e+02\n3 9450     1.783200e+02 -9.623999e+01\n7 9450     3.143700e+02 4.780700e+02\n9 9450     1.289200e+02 2.841200e+02\n13 9450     6.808101e+02 7.539001e+01\n0 9451     7.758600e+02 9.169000e+01\n2 9451     7.010200e+02 1.571500e+02\n3 9451     5.552700e+02 -1.505100e+02\n7 9451     6.097400e+02 3.014300e+02\n9 9451     4.570400e+02 2.372400e+02\n10 9451     8.033700e+02 3.305400e+02\n12 9451     7.169399e+02 3.160200e+02\n0 9452     6.443500e+02 7.939999e+01\n2 9452     5.681300e+02 8.097998e+01\n6 9452     4.883800e+02 2.416000e+02\n7 9452     4.839600e+02 2.646100e+02\n8 9452     5.248700e+02 3.609000e+01\n10 9452     6.488900e+02 3.018700e+02\n12 9452     5.719000e+02 2.510800e+02\n0 9453     8.382000e+02 5.423999e+01\n2 9453     7.712900e+02 1.493700e+02\n3 9453     6.241400e+02 -1.544100e+02\n7 9453     6.719500e+02 2.773900e+02\n12 9453     7.942200e+02 2.973600e+02\n0 9454     -3.195001e+01 4.551001e+01\n7 9454     -1.287000e+02 1.501700e+02\n0 9455     -6.402002e+01 2.719000e+01\n2 9455     3.979999e+01 8.049988e+00\n3 9455     -4.792999e+01 -3.037700e+02\n6 9455     -1.432600e+02 1.709998e+01\n7 9455     -1.606700e+02 1.257000e+02\n8 9455     6.459998e+01 -3.564999e+01\n10 9455     -1.703600e+02 1.658600e+02\n12 9455     -1.218000e+02 7.333002e+01\n13 9455     3.003600e+02 -2.075600e+02\n15 9455     -1.229700e+02 1.651600e+02\n0 9456     -3.798999e+01 -2.210022e+00\n3 9456     6.440002e+00 -3.142900e+02\n4 9456     -2.700000e+02 -3.809500e+02\n6 9456     -8.832001e+01 -3.880005e+00\n7 9456     -1.260900e+02 1.020300e+02\n8 9456     1.071200e+02 -4.787000e+01\n13 9456     3.333300e+02 -2.283800e+02\n15 9456     -8.495001e+01 1.288200e+02\n0 9457     3.008101e+02 -3.688000e+01\n7 9457     2.117700e+02 1.229300e+02\n10 9457     2.576899e+02 1.293600e+02\n13 9457     6.284800e+02 -2.323800e+02\n15 9457     3.815000e+02 1.276400e+02\n0 9458     2.222000e+02 -8.471002e+01\n3 9458     2.906200e+02 -3.281400e+02\n7 9458     1.493700e+02 6.545001e+01\n10 9458     1.750900e+02 6.592999e+01\n13 9458     5.763000e+02 -2.780300e+02\n15 9458     2.794000e+02 5.190997e+01\n0 9459     -4.252002e+01 -2.284500e+02\n3 9459     1.208200e+02 -5.207900e+02\n4 9459     -4.319900e+02 -3.724000e+02\n10 9459     -1.190100e+02 -1.269600e+02\n12 9459     6.500244e-01 -2.016000e+02\n15 9459     -6.481000e+01 -1.772300e+02\n0 9460     2.831000e+02 -2.696900e+02\n7 9460     2.348300e+02 -1.098900e+02\n0 9461     6.073600e+02 -2.703600e+02\n7 9461     5.132800e+02 -6.628998e+01\n12 9461     6.590699e+02 -1.182000e+02\n0 9462     1.067100e+02 -3.989600e+02\n7 9462     7.884998e+01 -2.701900e+02\n0 9463     6.496400e+02 -4.262600e+02\n12 9463     7.783199e+02 -2.558500e+02\n0 9464     -9.920001e+01 -5.228400e+02\n7 9464     -9.429999e+01 -4.329399e+02\n0 9465     3.417300e+02 5.261000e+02\n5 9465     7.437300e+02 -1.106300e+02\n6 9465     -1.183300e+02 6.308000e+02\n0 9466     1.610699e+02 5.158800e+02\n2 9466     -1.434900e+02 2.803100e+02\n3 9466     -2.776400e+02 -5.529999e+01\n4 9466     1.625000e+01 -4.615900e+02\n5 9466     5.640100e+02 -1.265700e+02\n6 9466     -3.041200e+02 5.769900e+02\n8 9466     -3.887000e+01 2.184900e+02\n11 9466     2.897500e+02 -2.429200e+02\n12 9466     -1.370000e+02 5.523100e+02\n13 9466     3.189200e+02 1.920400e+02\n0 9467     7.707100e+02 4.710600e+02\n2 9467     5.881000e+02 4.932700e+02\n3 9467     4.329100e+02 1.587100e+02\n6 9467     5.350500e+02 7.002900e+02\n8 9467     5.481600e+02 3.757100e+02\n0 9468     7.107700e+02 3.821800e+02\n2 9468     5.546801e+02 3.956500e+02\n3 9468     4.054399e+02 7.022998e+01\n6 9468     4.896801e+02 5.913600e+02\n8 9468     5.187300e+02 2.954300e+02\n9 9468     3.292300e+02 4.347300e+02\n0 9469     -2.267100e+02 3.143600e+02\n5 9469     1.669100e+02 -3.551700e+02\n15 9469     -3.690600e+02 5.334900e+02\n0 9470     6.506100e+02 9.950000e+01\n3 9470     4.282200e+02 -2.051200e+02\n6 9470     4.887000e+02 2.675000e+02\n8 9470     5.248000e+02 5.685999e+01\n10 9470     6.571000e+02 3.274000e+02\n12 9470     5.701500e+02 2.777900e+02\n0 9471     7.936500e+02 4.969000e+01\n2 9471     7.323000e+02 1.251500e+02\n3 9471     5.872800e+02 -1.795800e+02\n7 9471     6.331899e+02 2.645000e+02\n9 9471     4.836200e+02 2.118100e+02\n12 9471     7.491000e+02 2.757400e+02\n0 9472     2.964001e+01 -1.329999e+01\n10 9472     -5.653003e+01 1.278100e+02\n13 9472     4.039500e+02 -2.294500e+02\n15 9472     7.489990e+00 1.229900e+02\n0 9473     -3.617999e+01 -1.914100e+02\n7 9473     -8.464001e+01 -8.370001e+01\n10 9473     -1.143500e+02 -8.457001e+01\n0 9474     9.609998e+01 -2.348600e+02\n4 9474     -4.652900e+02 -4.943700e+02\n10 9474     4.213000e+01 -1.189400e+02\n15 9474     1.243100e+02 -1.667800e+02\n0 9475     -2.591998e+01 -2.383600e+02\n7 9475     -6.713000e+01 -1.305600e+02\n15 9475     -3.912000e+01 -1.898700e+02\n0 9476     7.784998e+01 -2.487200e+02\n6 9476     1.597600e+02 -2.264200e+02\n8 9476     3.067800e+02 -2.155500e+02\n10 9476     2.232001e+01 -1.363600e+02\n12 9476     1.595600e+02 -1.854100e+02\n15 9476     1.009200e+02 -1.878200e+02\n0 9477     5.363000e+01 -2.854100e+02\n2 9477     3.045400e+02 -2.792000e+02\n4 9477     -4.987500e+02 -4.466500e+02\n6 9477     1.234100e+02 -2.953700e+02\n8 9477     2.723600e+02 -2.799200e+02\n9 9477     1.569600e+02 -1.329400e+02\n10 9477     -5.200195e-01 -1.833300e+02\n12 9477     1.271600e+02 -2.533800e+02\n15 9477     7.667999e+01 -2.421100e+02\n0 9478     4.615002e+01 -3.400600e+02\n7 9478     1.404999e+01 -2.214500e+02\n10 9478     -1.679993e+00 -2.450400e+02\n15 9478     7.654999e+01 -3.159200e+02\n0 9479     8.332001e+01 -3.583900e+02\n4 9479     -5.701800e+02 -4.629800e+02\n6 9479     1.643700e+02 -3.853900e+02\n12 9479     1.717300e+02 -3.477600e+02\n15 9479     1.270800e+02 -3.365300e+02\n0 9480     9.876001e+01 -3.815800e+02\n6 9480     1.867000e+02 -3.978101e+02\n7 9480     7.252002e+01 -2.514300e+02\n9 9480     2.096000e+02 -2.298700e+02\n0 9481     -2.215200e+02 -4.706500e+02\n7 9481     -2.316500e+02 -4.087600e+02\n0 9482     4.210999e+01 5.000400e+02\n5 9482     4.466801e+02 -1.474100e+02\n0 9483     4.210999e+01 5.000400e+02\n2 9483     -2.510400e+02 2.585000e+02\n3 9483     -3.837700e+02 -7.765997e+01\n5 9483     4.466801e+02 -1.474100e+02\n6 9483     -4.299400e+02 5.301900e+02\n8 9483     -1.265700e+02 1.983900e+02\n12 9483     -2.572000e+02 5.155100e+02\n13 9483     2.241400e+02 1.702000e+02\n14 9483     3.549000e+02 -2.367400e+02\n0 9484     7.307400e+02 1.163300e+02\n2 9484     6.501000e+02 1.593600e+02\n3 9484     5.060100e+02 -1.492800e+02\n7 9484     5.635400e+02 3.164600e+02\n9 9484     4.135500e+02 2.384100e+02\n10 9484     7.486600e+02 3.548900e+02\n0 9485     7.964301e+02 1.117000e+02\n2 9485     7.150400e+02 1.869700e+02\n3 9485     5.661899e+02 -1.214300e+02\n0 9486     6.914399e+02 9.219000e+01\n7 9486     5.281700e+02 2.858600e+02\n10 9486     7.037100e+02 3.200100e+02\n0 9487     8.024399e+02 7.631000e+01\n2 9487     7.335900e+02 1.549200e+02\n3 9487     5.852900e+02 -1.511600e+02\n7 9487     6.376400e+02 2.917600e+02\n9 9487     4.843700e+02 2.371600e+02\n12 9487     7.530500e+02 3.089900e+02\n0 9488     8.024399e+02 7.631000e+01\n3 9488     5.852900e+02 -1.511600e+02\n7 9488     6.376400e+02 2.917600e+02\n9 9488     4.843700e+02 2.371600e+02\n0 9489     2.306300e+02 -2.677002e+01\n2 9489     3.793400e+02 4.601001e+01\n3 9489     2.755900e+02 -2.615700e+02\n7 9489     1.450000e+02 1.254100e+02\n10 9489     1.766500e+02 1.328400e+02\n13 9489     5.757900e+02 -2.268500e+02\n15 9489     2.827200e+02 1.316400e+02\n0 9490     -7.919000e+01 -1.328300e+02\n3 9490     3.023999e+01 -4.423300e+02\n7 9490     -1.415100e+02 -3.309998e+01\n15 9490     -1.188300e+02 -5.114001e+01\n0 9491     3.559003e+01 -1.855100e+02\n7 9491     -1.637000e+01 -6.487000e+01\n10 9491     -3.106000e+01 -6.683002e+01\n15 9491     3.971997e+01 -1.083600e+02\n0 9492     1.789100e+02 5.503200e+02\n2 9492     -1.351800e+02 3.180900e+02\n3 9492     -2.733700e+02 -1.865002e+01\n5 9492     5.813600e+02 -9.194000e+01\n6 9492     -2.925700e+02 6.223600e+02\n8 9492     -3.121997e+01 2.472800e+02\n9 9492     -2.683400e+02 3.446900e+02\n13 9492     3.292000e+02 2.232100e+02\n14 9492     4.837800e+02 -1.765900e+02\n0 9493     7.288000e+01 5.325700e+02\n2 9493     -2.269800e+02 2.965200e+02\n3 9493     -3.607900e+02 -3.753998e+01\n4 9493     3.067999e+01 -4.068600e+02\n5 9493     4.776600e+02 -1.115900e+02\n6 9493     -4.038500e+02 5.801500e+02\n8 9493     -1.073400e+02 2.305200e+02\n12 9493     -2.316100e+02 5.588300e+02\n13 9493     2.467300e+02 2.028400e+02\n14 9493     3.831300e+02 -1.999600e+02\n0 9494     7.288000e+01 5.325700e+02\n4 9494     3.067999e+01 -4.068600e+02\n5 9494     4.776600e+02 -1.115900e+02\n11 9494     2.102100e+02 -2.325400e+02\n12 9494     -2.316100e+02 5.588300e+02\n13 9494     2.467300e+02 2.028400e+02\n14 9494     3.831300e+02 -1.999600e+02\n0 9495     1.063800e+02 5.140500e+02\n5 9495     5.072800e+02 -1.325600e+02\n0 9496     1.063800e+02 5.140500e+02\n5 9496     5.072800e+02 -1.325600e+02\n13 9496     2.725800e+02 1.850900e+02\n14 9496     4.147400e+02 -2.208100e+02\n0 9497     3.018600e+02 4.925500e+02\n13 9497     4.285200e+02 1.819700e+02\n14 9497     6.081300e+02 -2.282900e+02\n0 9498     7.225200e+02 4.869400e+02\n2 9498     5.362000e+02 4.906400e+02\n3 9498     3.838500e+02 1.551400e+02\n8 9498     5.052700e+02 3.735300e+02\n9 9498     3.141700e+02 5.169100e+02\n0 9499     7.391899e+02 5.934003e+01\n2 9499     6.718300e+02 1.080600e+02\n3 9499     5.306801e+02 -1.980500e+02\n7 9499     5.776400e+02 2.642800e+02\n9 9499     4.350900e+02 1.954600e+02\n12 9499     6.818500e+02 2.657400e+02\n0 9500     2.358700e+02 -6.192999e+01\n2 9500     3.988199e+02 1.165002e+01\n7 9500     1.565900e+02 8.942001e+01\n13 9500     5.851200e+02 -2.550600e+02\n15 9500     2.929000e+02 8.420001e+01\n0 9501     1.039200e+02 -1.378300e+02\n13 9501     4.842800e+02 -3.351500e+02\n0 9502     -2.321000e+02 4.416500e+02\n4 9502     2.600098e-01 -2.186200e+02\n5 9502     1.741400e+02 -2.098200e+02\n0 9503     -2.321000e+02 4.416500e+02\n2 9503     -5.086800e+02 1.927000e+02\n4 9503     2.600098e-01 -2.186200e+02\n5 9503     1.741400e+02 -2.098200e+02\n7 9503     -4.547600e+02 4.821600e+02\n8 9503     -3.376500e+02 1.426800e+02\n11 9503     -5.935999e+01 -3.173400e+02\n12 9503     -5.504700e+02 4.103000e+02\n0 9504     7.844600e+02 1.901000e+02\n3 9504     5.267800e+02 -6.932001e+01\n7 9504     6.010400e+02 3.967500e+02\n0 9505     7.290000e+02 8.301001e+01\n7 9505     5.668800e+02 2.834500e+02\n1 9506     2.632600e+02 5.856400e+02\n2 9506     -4.080600e+02 3.136300e+02\n5 9506     2.886801e+02 -1.026800e+02\n8 9506     -2.560400e+02 2.386200e+02\n12 9506     -4.445600e+02 5.474300e+02\n1 9507     5.008400e+02 5.857200e+02\n2 9507     -2.153700e+02 3.668600e+02\n3 9507     -3.476900e+02 3.248999e+01\n6 9507     -3.940600e+02 6.631800e+02\n8 9507     -9.750000e+01 2.845100e+02\n9 9507     -3.389300e+02 3.868100e+02\n1 9508     6.144800e+02 5.855700e+02\n6 9508     -2.929900e+02 7.084300e+02\n1 9509     -5.626001e+01 5.838100e+02\n2 9509     -7.145300e+02 2.290200e+02\n7 9509     -6.540600e+02 4.948900e+02\n8 9509     -5.057800e+02 1.653500e+02\n1 9510     -5.626001e+01 5.838100e+02\n2 9510     -7.145300e+02 2.290200e+02\n7 9510     -6.540600e+02 4.948900e+02\n1 9511     -3.419983e+00 5.840600e+02\n8 9511     -4.608400e+02 1.785100e+02\n14 9511     -4.546997e+01 -2.573500e+02\n1 9512     6.113600e+02 5.836300e+02\n5 9512     5.898600e+02 -2.603998e+01\n6 9512     -2.946400e+02 7.052600e+02\n1 9513     5.079399e+02 5.832000e+02\n6 9513     -3.865000e+02 6.629600e+02\n1 9514     6.296997e+01 5.824700e+02\n2 9514     -5.920300e+02 2.595000e+02\n7 9514     -5.360800e+02 5.346400e+02\n12 9514     -6.500600e+02 4.646600e+02\n1 9515     6.296997e+01 5.824700e+02\n12 9515     -6.500600e+02 4.646600e+02\n1 9516     6.296997e+01 5.824700e+02\n7 9516     -5.360800e+02 5.346400e+02\n12 9516     -6.500600e+02 4.646600e+02\n1 9517     5.945601e+02 5.807600e+02\n6 9517     -3.081500e+02 6.952900e+02\n1 9518     6.027800e+02 5.801300e+02\n5 9518     5.842200e+02 -3.047998e+01\n1 9519     6.027800e+02 5.801300e+02\n5 9519     5.842200e+02 -3.047998e+01\n9 9519     -2.734900e+02 4.020300e+02\n1 9520     2.612700e+02 5.797100e+02\n2 9520     -4.079900e+02 3.064700e+02\n5 9520     2.883700e+02 -1.085900e+02\n12 9520     -4.437100e+02 5.400100e+02\n1 9521     2.612700e+02 5.797100e+02\n5 9521     2.883700e+02 -1.085900e+02\n1 9522     2.612700e+02 5.797100e+02\n2 9522     -4.079900e+02 3.064700e+02\n12 9522     -4.437100e+02 5.400100e+02\n1 9523     5.988199e+02 5.793400e+02\n2 9523     -1.410700e+02 3.800200e+02\n3 9523     -2.776800e+02 4.498999e+01\n1 9524     5.988199e+02 5.793400e+02\n2 9524     -1.410700e+02 3.800200e+02\n1 9525     -6.763000e+01 5.784900e+02\n2 9525     -7.255800e+02 2.192400e+02\n5 9525     -2.339001e+01 -1.849000e+02\n7 9525     -6.631500e+02 4.850400e+02\n8 9525     -5.145500e+02 1.579700e+02\n14 9525     -1.068300e+02 -2.789500e+02\n1 9526     -5.928003e+01 5.755600e+02\n7 9526     -6.538800e+02 4.855200e+02\n1 9527     6.971700e+02 5.693200e+02\n2 9527     -7.060999e+01 3.888700e+02\n6 9527     -2.160200e+02 7.228700e+02\n1 9528     -1.554500e+02 5.684400e+02\n8 9528     -5.911200e+02 1.260700e+02\n10 9528     -7.769200e+02 6.162700e+02\n11 9528     -3.091200e+02 -3.224800e+02\n1 9529     8.070007e+00 5.662300e+02\n2 9529     -6.428400e+02 2.253900e+02\n5 9529     5.272998e+01 -1.805200e+02\n7 9529     -5.831600e+02 4.993800e+02\n12 9529     -7.034400e+02 4.223900e+02\n14 9529     -3.196002e+01 -2.729600e+02\n1 9530     8.070007e+00 5.662300e+02\n2 9530     -6.428400e+02 2.253900e+02\n5 9530     5.272998e+01 -1.805200e+02\n7 9530     -5.831600e+02 4.993800e+02\n12 9530     -7.034400e+02 4.223900e+02\n14 9530     -3.196002e+01 -2.729600e+02\n1 9531     -6.595001e+01 5.618800e+02\n2 9531     -7.196100e+02 1.992500e+02\n8 9531     -5.094000e+02 1.421500e+02\n14 9531     -1.031900e+02 -2.957700e+02\n1 9532     2.192100e+02 5.615100e+02\n2 9532     -4.404200e+02 2.761600e+02\n7 9532     -3.833300e+02 5.666200e+02\n1 9533     -1.727400e+02 5.590200e+02\n5 9533     -1.275300e+02 -2.288800e+02\n11 9533     -3.233700e+02 -3.336700e+02\n14 9533     -2.097300e+02 -3.243900e+02\n1 9534     -1.727400e+02 5.590200e+02\n10 9534     -7.936500e+02 5.983200e+02\n1 9535     -1.727400e+02 5.590200e+02\n5 9535     -1.275300e+02 -2.288800e+02\n7 9535     -7.645600e+02 4.269200e+02\n10 9535     -7.936500e+02 5.983200e+02\n14 9535     -2.097300e+02 -3.243900e+02\n1 9536     6.351700e+02 5.587900e+02\n5 9536     6.149100e+02 -4.297998e+01\n6 9536     -2.639600e+02 6.880200e+02\n1 9537     -6.541998e+01 5.575700e+02\n2 9537     -7.176400e+02 1.939600e+02\n5 9537     -1.891998e+01 -2.060400e+02\n12 9537     -7.837800e+02 3.806400e+02\n1 9538     6.721700e+02 5.528400e+02\n2 9538     -8.283002e+01 3.691800e+02\n4 9538     5.928003e+01 -5.253800e+02\n6 9538     -2.301200e+02 6.958100e+02\n8 9538     1.213000e+01 2.885900e+02\n11 9538     3.609600e+02 -1.683600e+02\n1 9539     4.302100e+02 5.486300e+02\n11 9539     1.793100e+02 -2.216700e+02\n12 9539     -2.708300e+02 5.700200e+02\n14 9539     3.504800e+02 -1.852000e+02\n1 9540     1.649800e+02 5.461200e+02\n7 9540     -4.272100e+02 5.334700e+02\n1 9541     6.777200e+02 5.448400e+02\n11 9541     3.675500e+02 -1.732500e+02\n14 9541     5.535500e+02 -1.298400e+02\n1 9542     6.284399e+02 5.418400e+02\n2 9542     -1.097000e+02 3.507400e+02\n6 9542     -2.623700e+02 6.673100e+02\n9 9542     -2.480600e+02 3.755100e+02\n11 9542     3.320100e+02 -1.853800e+02\n13 9542     3.555000e+02 2.510900e+02\n14 9542     5.153300e+02 -1.436900e+02\n1 9543     3.921300e+02 5.409100e+02\n12 9543     -3.029300e+02 5.477500e+02\n1 9544     -8.815002e+01 5.398600e+02\n5 9544     -3.917999e+01 -2.303000e+02\n10 9544     -6.801500e+02 6.051800e+02\n12 9544     -8.008800e+02 3.484300e+02\n14 9544     -1.216400e+02 -3.239500e+02\n1 9545     -8.106000e+01 5.399100e+02\n2 9545     -7.287500e+02 1.678300e+02\n1 9546     -1.948300e+02 5.396600e+02\n10 9546     -8.113100e+02 5.660200e+02\n14 9546     -2.300400e+02 -3.502000e+02\n1 9547     -1.285999e+01 5.389700e+02\n7 9547     -5.928000e+02 4.641600e+02\n1 9548     4.275300e+02 5.389200e+02\n5 9548     4.424900e+02 -1.101700e+02\n1 9549     6.798800e+02 5.384800e+02\n2 9549     -7.350000e+01 3.574600e+02\n1 9550     4.178400e+02 5.368500e+02\n6 9550     -4.516000e+02 5.710900e+02\n9 9550     -3.795100e+02 3.250100e+02\n1 9551     -1.489001e+01 5.365200e+02\n2 9551     -6.590500e+02 1.830500e+02\n1 9552     3.085601e+02 5.338400e+02\n7 9552     -2.940200e+02 5.689200e+02\n12 9552     -3.781300e+02 5.085500e+02\n1 9553     7.238000e+01 5.324100e+02\n8 9553     -3.881400e+02 1.473600e+02\n1 9554     1.946700e+02 5.303800e+02\n3 9554     -5.821600e+02 -9.465002e+01\n1 9555     -1.396100e+02 5.297600e+02\n5 9555     -9.082001e+01 -2.523600e+02\n10 9555     -7.383200e+02 5.737600e+02\n1 9556     2.952200e+02 5.282700e+02\n2 9556     -3.636100e+02 2.599300e+02\n1 9557     -1.505200e+02 5.265400e+02\n5 9557     -1.015100e+02 -2.584100e+02\n8 9557     -5.777900e+02 8.510001e+01\n14 9557     -1.835600e+02 -3.534900e+02\n1 9558     3.357300e+02 5.264800e+02\n2 9558     -3.302300e+02 2.679600e+02\n7 9558     -2.679800e+02 5.708500e+02\n1 9559     3.001000e+02 5.260300e+02\n2 9559     -3.599800e+02 2.585100e+02\n1 9560     -1.534800e+02 5.253800e+02\n7 9560     -7.301700e+02 3.985100e+02\n10 9560     -7.530300e+02 5.632900e+02\n1 9561     -3.696997e+01 5.251100e+02\n10 9561     -6.124200e+02 6.067700e+02\n1 9562     3.198600e+02 5.249200e+02\n2 9562     -3.428500e+02 2.623400e+02\n7 9562     -2.807600e+02 5.644000e+02\n1 9563     7.785000e+02 5.239000e+02\n5 9563     7.404800e+02 -4.134998e+01\n6 9563     -1.308600e+02 7.065700e+02\n14 9563     6.376899e+02 -1.243600e+02\n1 9564     -2.020900e+02 5.229200e+02\n10 9564     -8.127400e+02 5.421100e+02\n15 9564     -8.462500e+02 5.826600e+02\n1 9565     7.856000e+01 5.222500e+02\n2 9565     -5.613500e+02 1.927400e+02\n5 9565     1.258700e+02 -2.090500e+02\n11 9565     -1.006100e+02 -3.164600e+02\n12 9565     -6.075500e+02 4.014800e+02\n1 9566     3.350100e+02 5.220300e+02\n6 9566     -5.257700e+02 5.168600e+02\n1 9567     -1.164200e+02 5.209300e+02\n10 9567     -7.058500e+02 5.717300e+02\n1 9568     1.078900e+02 5.207700e+02\n7 9568     -4.710500e+02 4.889600e+02\n1 9569     8.103998e+01 5.196100e+02\n5 9569     1.288300e+02 -2.113400e+02\n12 9569     -6.036200e+02 3.992700e+02\n1 9570     4.294800e+02 5.190500e+02\n12 9570     -2.599400e+02 5.386800e+02\n1 9571     -3.046002e+01 5.178000e+02\n7 9571     -6.028200e+02 4.363300e+02\n1 9572     -3.046002e+01 5.178000e+02\n2 9572     -6.705600e+02 1.548700e+02\n7 9572     -6.028200e+02 4.363300e+02\n12 9572     -7.257400e+02 3.477400e+02\n1 9573     2.901899e+02 5.167300e+02\n6 9573     -5.681000e+02 4.895800e+02\n7 9573     -3.044400e+02 5.469500e+02\n11 9573     7.565002e+01 -2.763800e+02\n12 9573     -3.897000e+02 4.833600e+02\n1 9574     4.271002e+01 5.162500e+02\n5 9574     9.254999e+01 -2.238300e+02\n1 9575     1.071500e+02 5.161700e+02\n12 9575     -5.745800e+02 4.062100e+02\n1 9576     2.757600e+02 5.157800e+02\n2 9576     -3.785300e+02 2.411000e+02\n5 9576     3.119500e+02 -1.681000e+02\n6 9576     -5.827100e+02 4.804600e+02\n8 9576     -2.312700e+02 1.809300e+02\n1 9577     3.924399e+02 5.145900e+02\n7 9577     -2.155500e+02 5.778300e+02\n1 9578     3.295400e+02 5.140000e+02\n5 9578     3.610699e+02 -1.565400e+02\n6 9578     -5.280600e+02 5.038200e+02\n7 9578     -2.693600e+02 5.570300e+02\n9 9578     -4.341900e+02 2.826000e+02\n12 9578     -3.510200e+02 4.948300e+02\n1 9579     7.433002e+01 5.136000e+02\n2 9579     -5.630100e+02 1.813800e+02\n7 9579     -4.999200e+02 4.698800e+02\n12 9579     -6.084300e+02 3.894300e+02\n1 9580     4.304900e+02 5.137500e+02\n2 9580     -2.493900e+02 2.780300e+02\n5 9580     4.506899e+02 -1.327100e+02\n6 9580     -4.295700e+02 5.511700e+02\n12 9580     -2.567900e+02 5.331800e+02\n1 9581     9.389001e+01 5.122700e+02\n2 9581     -5.434600e+02 1.856800e+02\n7 9581     -4.810400e+02 4.756600e+02\n1 9582     1.011200e+02 5.116400e+02\n2 9582     -5.361200e+02 1.870100e+02\n5 9582     1.498300e+02 -2.141600e+02\n7 9582     -4.738400e+02 4.776100e+02\n12 9582     -5.789100e+02 3.988400e+02\n14 9582     6.434998e+01 -3.047500e+02\n1 9583     -1.610000e+02 5.109800e+02\n5 9583     -1.112100e+02 -2.774700e+02\n7 9583     -7.319600e+02 3.804600e+02\n8 9583     -5.844100e+02 6.585999e+01\n10 9583     -7.556000e+02 5.429200e+02\n14 9583     -1.932400e+02 -3.727900e+02\n15 9583     -7.829100e+02 5.858900e+02\n1 9584     6.245400e+02 5.097700e+02\n2 9584     -1.023300e+02 3.194800e+02\n8 9584     -4.510010e+00 2.489400e+02\n1 9585     8.439500e+02 5.094400e+02\n5 9585     7.964600e+02 -4.094000e+01\n6 9585     -7.365997e+01 7.154700e+02\n8 9585     1.151000e+02 2.857600e+02\n9 9585     -1.194800e+02 3.904000e+02\n1 9586     2.834500e+02 5.082400e+02\n5 9586     3.207000e+02 -1.734700e+02\n6 9586     -5.712400e+02 4.753800e+02\n1 9587     -1.092100e+02 5.074000e+02\n7 9587     -6.773500e+02 3.966200e+02\n10 9587     -6.915100e+02 5.581000e+02\n12 9587     -8.121100e+02 2.992800e+02\n1 9588     2.577100e+02 5.072900e+02\n2 9588     -3.917800e+02 2.260100e+02\n7 9588     -3.301000e+02 5.272500e+02\n1 9589     6.410500e+02 5.073500e+02\n2 9589     -9.041998e+01 3.205400e+02\n8 9589     5.580017e+00 2.501500e+02\n9 9589     -2.305300e+02 3.495300e+02\n12 9589     -7.064001e+01 6.018200e+02\n1 9590     -1.696400e+02 5.069400e+02\n7 9590     -7.391700e+02 3.729500e+02\n8 9590     -5.920400e+02 5.951999e+01\n11 9590     -3.149100e+02 -3.783000e+02\n13 9590     -2.261500e+02 3.513000e+01\n15 9590     -7.927900e+02 5.759000e+02\n1 9591     8.439800e+02 5.070200e+02\n14 9591     6.917400e+02 -1.248500e+02\n1 9592     -1.255100e+02 5.061600e+02\n10 9592     -7.097400e+02 5.505100e+02\n12 9592     -8.307900e+02 2.903300e+02\n1 9593     3.259301e+02 5.062000e+02\n2 9593     -3.330400e+02 2.432100e+02\n5 9593     3.593101e+02 -1.651000e+02\n6 9593     -5.280500e+02 4.933000e+02\n7 9593     -2.698300e+02 5.487000e+02\n9 9593     -4.344100e+02 2.743100e+02\n11 9593     1.067400e+02 -2.774200e+02\n1 9594     4.731899e+02 5.050100e+02\n14 9594     3.973500e+02 -2.153000e+02\n1 9595     -1.029400e+02 5.046900e+02\n7 9595     -6.698100e+02 3.960000e+02\n8 9595     -5.294100e+02 7.609000e+01\n11 9595     -2.544100e+02 -3.673400e+02\n14 9595     -1.332400e+02 -3.645800e+02\n1 9596     -1.029400e+02 5.046900e+02\n7 9596     -6.698100e+02 3.960000e+02\n8 9596     -5.294100e+02 7.609000e+01\n11 9596     -2.544100e+02 -3.673400e+02\n14 9596     -1.332400e+02 -3.645800e+02\n1 9597     3.720800e+02 5.032100e+02\n6 9597     -4.813700e+02 5.118200e+02\n12 9597     -3.064400e+02 4.999500e+02\n1 9598     1.794000e+02 5.023600e+02\n12 9598     -4.938200e+02 4.213000e+02\n1 9599     6.192000e+02 5.027700e+02\n2 9599     -1.041400e+02 3.113800e+02\n12 9599     -8.708002e+01 5.895200e+02\n1 9600     4.262500e+02 5.011500e+02\n6 9600     -4.288300e+02 5.351500e+02\n9 9600     -3.632900e+02 2.952500e+02\n11 9600     1.879400e+02 -2.592200e+02\n12 9600     -2.561700e+02 5.187300e+02\n1 9601     7.099600e+02 5.005100e+02\n6 9601     -1.772600e+02 6.563700e+02\n11 9601     4.041600e+02 -1.984700e+02\n1 9602     7.367000e+02 5.006300e+02\n2 9602     -2.285999e+01 3.346800e+02\n13 9602     4.350200e+02 2.454600e+02\n14 9602     6.131700e+02 -1.532900e+02\n1 9603     4.091998e+01 4.999500e+02\n10 9603     -5.114200e+02 6.063700e+02\n1 9604     9.000244e-01 4.996900e+02\n7 9604     -5.651900e+02 4.291300e+02\n10 9604     -5.579600e+02 5.901500e+02\n14 9604     -2.978998e+01 -3.430300e+02\n1 9605     7.468300e+02 4.973100e+02\n6 9605     -1.455000e+02 6.675500e+02\n9 9605     -1.675300e+02 3.632200e+02\n1 9606     7.468300e+02 4.973100e+02\n6 9606     -1.455000e+02 6.675500e+02\n1 9607     5.821700e+02 4.958100e+02\n14 9607     4.902400e+02 -1.958900e+02\n1 9608     6.789301e+02 4.960700e+02\n14 9608     5.679600e+02 -1.715200e+02\n1 9609     7.983400e+02 4.960900e+02\n6 9609     -1.024200e+02 6.869000e+02\n11 9609     4.700699e+02 -1.830200e+02\n1 9610     3.800800e+02 4.952100e+02\n7 9610     -2.194600e+02 5.559200e+02\n1 9611     3.740400e+02 4.944500e+02\n2 9611     -2.898000e+02 2.433800e+02\n5 9611     4.042800e+02 -1.645500e+02\n6 9611     -4.758700e+02 5.026000e+02\n1 9612     4.309900e+02 4.941300e+02\n2 9612     -2.427800e+02 2.581400e+02\n6 9612     -4.190900e+02 5.300600e+02\n8 9612     -1.197600e+02 1.974800e+02\n9 9612     -3.572400e+02 2.905000e+02\n12 9612     -2.464300e+02 5.140800e+02\n1 9613     7.073800e+02 4.942400e+02\n12 9613     -1.129999e+01 6.098700e+02\n1 9614     1.409900e+02 4.937000e+02\n7 9614     -4.307300e+02 4.737500e+02\n1 9615     8.597998e+01 4.929800e+02\n2 9615     -5.462000e+02 1.602000e+02\n8 9615     -3.682400e+02 1.144000e+02\n10 9615     -4.568600e+02 6.139400e+02\n1 9616     1.340300e+02 4.907600e+02\n2 9616     -4.997100e+02 1.722200e+02\n7 9616     -4.358300e+02 4.684400e+02\n1 9617     2.753998e+01 4.898900e+02\n2 9617     -6.032500e+02 1.389400e+02\n5 9617     8.073999e+01 -2.550100e+02\n12 9617     -6.484900e+02 3.408400e+02\n1 9618     2.254999e+01 4.891700e+02\n2 9618     -6.084000e+02 1.353700e+02\n10 9618     -5.282800e+02 5.866000e+02\n11 9618     -1.430000e+02 -3.555200e+02\n12 9618     -6.542000e+02 3.373000e+02\n1 9619     5.995500e+02 4.887900e+02\n14 9619     5.060200e+02 -1.979800e+02\n1 9620     8.627400e+02 4.890300e+02\n3 9620     -8.823999e+01 1.141998e+01\n5 9620     8.174200e+02 -5.645001e+01\n6 9620     -5.114001e+01 6.999400e+02\n8 9620     1.301600e+02 2.722600e+02\n9 9620     -1.041700e+02 3.770200e+02\n11 9620     5.154500e+02 -1.768100e+02\n1 9621     5.546500e+02 4.885400e+02\n14 9621     4.688101e+02 -2.098400e+02\n1 9622     1.590601e+02 4.871000e+02\n2 9622     -4.753900e+02 1.755700e+02\n1 9623     6.303003e+01 4.860000e+02\n7 9623     -5.004700e+02 4.382300e+02\n10 9623     -4.802700e+02 5.971900e+02\n1 9624     3.643000e+02 4.853200e+02\n3 9624     -4.266800e+02 -1.003000e+02\n5 9624     3.972100e+02 -1.762300e+02\n6 9624     -4.814500e+02 4.871600e+02\n7 9624     -2.299000e+02 5.414700e+02\n9 9624     -4.013200e+02 2.646900e+02\n11 9624     1.426700e+02 -2.856600e+02\n12 9624     -3.064500e+02 4.779300e+02\n1 9625     1.066600e+02 4.851400e+02\n10 9625     -4.304000e+02 6.128900e+02\n1 9626     1.066600e+02 4.851400e+02\n7 9626     -4.587000e+02 4.534500e+02\n10 9626     -4.304000e+02 6.128900e+02\n1 9627     4.552400e+02 4.849200e+02\n7 9627     -1.528200e+02 5.703300e+02\n1 9628     4.552400e+02 4.849200e+02\n2 9628     -2.219600e+02 2.545300e+02\n7 9628     -1.528200e+02 5.703300e+02\n1 9629     -7.396002e+01 4.845600e+02\n7 9629     -6.312300e+02 3.869900e+02\n1 9630     8.554600e+02 4.820500e+02\n6 9630     -5.394000e+01 6.915200e+02\n1 9631     3.428003e+01 4.818600e+02\n2 9631     -5.941900e+02 1.306500e+02\n5 9631     8.848999e+01 -2.618800e+02\n7 9631     -5.262600e+02 4.237300e+02\n10 9631     -5.109200e+02 5.813600e+02\n14 9631     5.030029e+00 -3.528600e+02\n1 9632     7.241998e+01 4.774200e+02\n4 9632     -2.157001e+01 -1.921600e+02\n8 9632     -3.745900e+02 9.838000e+01\n10 9632     -4.646200e+02 5.906000e+02\n12 9632     -5.947500e+02 3.479000e+02\n1 9633     3.429200e+02 4.776200e+02\n7 9633     -2.449800e+02 5.276600e+02\n1 9634     7.660999e+01 4.769900e+02\n5 9634     1.324000e+02 -2.565100e+02\n12 9634     -5.888200e+02 3.485300e+02\n14 9634     4.837000e+01 -3.466600e+02\n1 9635     3.041998e+01 4.763600e+02\n2 9635     -5.966200e+02 1.225800e+02\n7 9635     -5.277900e+02 4.167800e+02\n10 9635     -5.132200e+02 5.737900e+02\n14 9635     2.159973e+00 -3.597000e+02\n1 9636     9.496997e+01 4.764600e+02\n7 9636     -4.660300e+02 4.407600e+02\n14 9636     6.585999e+01 -3.424100e+02\n1 9637     9.847998e+01 4.763800e+02\n7 9637     -4.626600e+02 4.420000e+02\n1 9638     1.655699e+02 4.724200e+02\n10 9638     -3.608200e+02 6.196200e+02\n1 9639     7.620200e+02 4.719800e+02\n14 9639     6.409600e+02 -1.728900e+02\n1 9640     9.963000e+01 4.702500e+02\n14 9640     6.820001e+01 -3.479200e+02\n1 9641     1.032000e+02 4.701900e+02\n8 9641     -3.492000e+02 9.851001e+01\n12 9641     -5.592700e+02 3.521200e+02\n14 9641     7.327002e+01 -3.466700e+02\n1 9642     -7.635999e+01 4.684200e+02\n10 9642     -6.332900e+02 5.234300e+02\n12 9642     -7.560500e+02 2.670300e+02\n15 9642     -6.458200e+02 5.678800e+02\n1 9643     -2.034200e+02 4.625400e+02\n5 9643     -1.515200e+02 -3.404100e+02\n10 9643     -7.846400e+02 4.671700e+02\n14 9643     -2.327500e+02 -4.370601e+02\n15 9643     -8.154800e+02 4.987400e+02\n1 9644     -2.034200e+02 4.625400e+02\n5 9644     -1.515200e+02 -3.404100e+02\n15 9644     -8.154800e+02 4.987400e+02\n1 9645     -1.619800e+02 4.625400e+02\n7 9645     -7.136500e+02 3.295000e+02\n10 9645     -7.346000e+02 4.831100e+02\n15 9645     -7.586100e+02 5.189300e+02\n1 9646     3.084700e+02 4.608700e+02\n5 9646     3.609000e+02 -2.136300e+02\n14 9646     2.724800e+02 -2.998300e+02\n1 9647     -1.969900e+02 4.590800e+02\n10 9647     -7.754700e+02 4.658900e+02\n15 9647     -8.048100e+02 4.974900e+02\n1 9648     7.665997e+01 4.590500e+02\n2 9648     -5.452800e+02 1.165100e+02\n7 9648     -4.776800e+02 4.164900e+02\n12 9648     -5.818600e+02 3.268600e+02\n1 9649     1.310100e+02 4.583800e+02\n2 9649     -4.928900e+02 1.333200e+02\n7 9649     -4.268900e+02 4.356300e+02\n10 9649     -3.930500e+02 5.906200e+02\n12 9649     -5.246700e+02 3.505300e+02\n14 9649     1.012700e+02 -3.513600e+02\n1 9650     9.247998e+01 4.574900e+02\n10 9650     -4.352300e+02 5.758000e+02\n1 9651     3.560500e+02 4.539300e+02\n7 9651     -2.260300e+02 5.094000e+02\n1 9652     1.539700e+02 4.537700e+02\n10 9652     -3.655900e+02 5.939800e+02\n1 9653     4.744000e+01 4.513800e+02\n2 9653     -5.726400e+02 9.695001e+01\n7 9653     -5.023800e+02 3.982400e+02\n10 9653     -4.833200e+02 5.510200e+02\n12 9653     -6.104300e+02 3.047600e+02\n14 9653     2.219000e+01 -3.812200e+02\n1 9654     1.422700e+02 4.510300e+02\n5 9654     1.966600e+02 -2.652000e+02\n7 9654     -4.140800e+02 4.324300e+02\n12 9654     -5.102300e+02 3.468000e+02\n1 9655     3.900400e+02 4.444800e+02\n2 9655     -2.619100e+02 1.942600e+02\n3 9655     -3.949800e+02 -1.369400e+02\n5 9655     4.286899e+02 -2.094600e+02\n6 9655     -4.389300e+02 4.524200e+02\n9 9655     -3.716200e+02 2.340300e+02\n13 9655     2.115100e+02 1.228200e+02\n1 9656     5.328900e+02 4.445300e+02\n2 9656     -1.499500e+02 2.330200e+02\n5 9656     5.553800e+02 -1.732000e+02\n6 9656     -3.058900e+02 5.201600e+02\n7 9656     -7.596997e+01 5.580000e+02\n8 9656     -4.367999e+01 1.788700e+02\n14 9656     4.623500e+02 -2.560500e+02\n1 9657     4.782001e+01 4.432500e+02\n2 9657     -5.702600e+02 8.775000e+01\n5 9657     1.065500e+02 -2.992200e+02\n11 9657     -1.132900e+02 -3.898900e+02\n14 9657     2.419000e+01 -3.896900e+02\n1 9658     8.618700e+02 4.423600e+02\n14 9658     7.264500e+02 -1.756100e+02\n1 9659     5.203101e+02 4.419400e+02\n7 9659     -8.520001e+01 5.516700e+02\n1 9660     5.294600e+02 4.417900e+02\n2 9660     -1.532400e+02 2.284400e+02\n6 9660     -3.078900e+02 5.155400e+02\n7 9660     -7.791998e+01 5.544500e+02\n8 9660     -4.604999e+01 1.756800e+02\n12 9660     -1.395600e+02 4.960200e+02\n14 9660     4.598800e+02 -2.599800e+02\n1 9661     -5.964001e+01 4.414100e+02\n10 9661     -6.026200e+02 4.986100e+02\n15 9661     -6.097800e+02 5.397900e+02\n1 9662     -5.964001e+01 4.414100e+02\n10 9662     -6.026200e+02 4.986100e+02\n15 9662     -6.097800e+02 5.397900e+02\n1 9663     3.643199e+02 4.396100e+02\n3 9663     -4.146600e+02 -1.501500e+02\n6 9663     -4.613000e+02 4.335600e+02\n7 9663     -2.140100e+02 4.983700e+02\n12 9663     -2.876700e+02 4.284900e+02\n1 9664     2.368000e+02 4.371700e+02\n5 9664     2.890900e+02 -2.573700e+02\n12 9664     -4.092400e+02 3.721600e+02\n1 9665     5.836200e+02 4.372000e+02\n6 9665     -2.582900e+02 5.352400e+02\n14 9665     5.065699e+02 -2.493800e+02\n1 9666     3.726600e+02 4.367200e+02\n6 9666     -4.523600e+02 4.346600e+02\n7 9666     -2.065500e+02 4.987600e+02\n1 9667     4.491998e+01 4.356700e+02\n2 9667     -5.708800e+02 7.679999e+01\n7 9667     -4.988500e+02 3.814800e+02\n10 9667     -4.797500e+02 5.318500e+02\n15 9667     -4.692600e+02 5.811200e+02\n1 9668     6.271700e+02 4.332900e+02\n5 9668     6.393000e+02 -1.600800e+02\n14 9668     5.440500e+02 -2.415000e+02\n1 9669     6.241000e+02 4.323800e+02\n5 9669     6.366899e+02 -1.614800e+02\n6 9669     -2.210800e+02 5.483100e+02\n12 9669     -5.495001e+01 5.220000e+02\n14 9669     5.416400e+02 -2.431300e+02\n1 9670     5.815900e+02 4.322900e+02\n6 9670     -2.579300e+02 5.292700e+02\n1 9671     3.220001e+01 4.314100e+02\n10 9671     -4.930500e+02 5.219200e+02\n11 9671     -1.241100e+02 -4.035100e+02\n14 9671     1.046997e+01 -4.064900e+02\n15 9671     -4.843900e+02 5.695100e+02\n1 9672     5.817300e+02 4.302300e+02\n6 9672     -2.567100e+02 5.268100e+02\n12 9672     -8.947998e+01 5.039400e+02\n1 9673     3.610800e+02 4.285000e+02\n2 9673     -2.812000e+02 1.681800e+02\n7 9673     -2.132500e+02 4.872200e+02\n14 9673     3.171600e+02 -3.186900e+02\n1 9674     -2.037900e+02 4.261600e+02\n5 9674     -1.494700e+02 -3.810700e+02\n7 9674     -7.422000e+02 2.748200e+02\n10 9674     -7.682700e+02 4.232300e+02\n14 9674     -2.300900e+02 -4.778101e+02\n15 9674     -7.969400e+02 4.488700e+02\n1 9675     5.144900e+02 4.257200e+02\n12 9675     -1.457400e+02 4.739500e+02\n1 9676     3.946899e+02 4.253400e+02\n14 9676     3.474000e+02 -3.108300e+02\n1 9677     2.358199e+02 4.244700e+02\n5 9677     2.900699e+02 -2.707400e+02\n6 9677     -5.836700e+02 3.496600e+02\n7 9677     -3.204700e+02 4.402900e+02\n12 9677     -4.050700e+02 3.578900e+02\n14 9677     2.048300e+02 -3.573800e+02\n1 9678     -5.640997e+01 4.233100e+02\n7 9678     -5.921400e+02 3.308900e+02\n8 9678     -4.710600e+02 8.250000e+00\n1 9679     1.433000e+02 4.227900e+02\n2 9679     -4.719800e+02 9.446997e+01\n7 9679     -4.030900e+02 4.052800e+02\n10 9679     -3.653300e+02 5.546000e+02\n1 9680     -4.009998e+01 4.227700e+02\n10 9680     -5.717100e+02 4.840700e+02\n15 9680     -5.751500e+02 5.230000e+02\n1 9681     4.378003e+01 4.222700e+02\n2 9681     -5.684400e+02 6.052002e+01\n7 9681     -4.952000e+02 3.680800e+02\n11 9681     -1.126700e+02 -4.091300e+02\n15 9681     -4.642900e+02 5.628400e+02\n1 9682     6.286600e+02 4.211600e+02\n14 9682     5.486000e+02 -2.524400e+02\n1 9683     -1.177002e+01 4.206800e+02\n7 9683     -5.466800e+02 3.456500e+02\n10 9683     -5.372100e+02 4.926700e+02\n14 9683     -3.056000e+01 -4.302000e+02\n1 9684     -1.196900e+02 4.192700e+02\n7 9684     -6.570100e+02 2.996800e+02\n15 9684     -6.809600e+02 4.797900e+02\n1 9685     6.226899e+02 4.196600e+02\n6 9685     -2.169900e+02 5.335900e+02\n7 9685     3.250000e+00 5.632200e+02\n1 9686     7.273600e+02 4.193600e+02\n5 9686     7.273900e+02 -1.486200e+02\n6 9686     -1.288100e+02 5.782700e+02\n14 9686     6.295601e+02 -2.282800e+02\n1 9687     6.354200e+02 4.188800e+02\n2 9687     -6.798999e+01 2.330200e+02\n7 9687     1.279999e+01 5.659900e+02\n13 9687     3.857900e+02 1.621900e+02\n14 9687     5.549100e+02 -2.528400e+02\n1 9688     6.354200e+02 4.188800e+02\n2 9688     -6.798999e+01 2.330200e+02\n7 9688     1.279999e+01 5.659900e+02\n13 9688     3.857900e+02 1.621900e+02\n14 9688     5.549100e+02 -2.528400e+02\n1 9689     6.197800e+02 4.165700e+02\n5 9689     6.366000e+02 -1.773700e+02\n1 9690     3.490200e+02 4.148100e+02\n2 9690     -2.870400e+02 1.491400e+02\n5 9690     3.970300e+02 -2.507600e+02\n6 9690     -4.656600e+02 3.969900e+02\n7 9690     -2.187800e+02 4.704000e+02\n14 9690     3.095300e+02 -3.357000e+02\n1 9691     7.558500e+02 4.127500e+02\n14 9691     6.542300e+02 -2.267400e+02\n1 9692     7.558500e+02 4.127500e+02\n6 9692     -1.033300e+02 5.836600e+02\n14 9692     6.542300e+02 -2.267400e+02\n1 9693     3.207100e+02 4.108100e+02\n7 9693     -2.418300e+02 4.572500e+02\n1 9694     6.176500e+02 4.100300e+02\n3 9694     -2.183400e+02 -1.120500e+02\n6 9694     -2.171800e+02 5.208500e+02\n12 9694     -5.147998e+01 4.967300e+02\n1 9695     6.176500e+02 4.100300e+02\n6 9695     -2.171800e+02 5.208500e+02\n12 9695     -5.147998e+01 4.967300e+02\n1 9696     6.251200e+02 4.098700e+02\n6 9696     -2.107100e+02 5.240100e+02\n12 9696     -4.503003e+01 4.993100e+02\n1 9697     6.301400e+02 4.096400e+02\n6 9697     -2.061000e+02 5.261500e+02\n12 9697     -4.026001e+01 5.013700e+02\n1 9698     7.524900e+02 4.086400e+02\n14 9698     6.527900e+02 -2.313500e+02\n1 9699     7.612700e+02 4.086700e+02\n5 9699     7.588400e+02 -1.500100e+02\n6 9699     -9.695001e+01 5.815600e+02\n14 9699     6.599100e+02 -2.290300e+02\n1 9700     7.866200e+02 4.073400e+02\n14 9700     6.800000e+02 -2.240200e+02\n1 9701     4.864000e+02 4.067400e+02\n12 9701     -1.628100e+02 4.434800e+02\n1 9702     6.178400e+02 4.068500e+02\n6 9702     -2.166100e+02 5.170400e+02\n9 9702     -2.155600e+02 2.594100e+02\n1 9703     1.904600e+02 4.062100e+02\n2 9703     -4.234500e+02 8.989001e+01\n12 9703     -4.424800e+02 3.175400e+02\n1 9704     8.143900e+02 4.054200e+02\n14 9704     7.024900e+02 -2.182500e+02\n1 9705     -6.251001e+01 4.035500e+02\n5 9705     3.200073e-01 -3.704200e+02\n7 9705     -5.902900e+02 3.081700e+02\n10 9705     -5.894400e+02 4.522600e+02\n15 9705     -5.940900e+02 4.868300e+02\n1 9706     1.753900e+02 4.031500e+02\n5 9706     2.360699e+02 -3.086200e+02\n1 9707     7.316801e+02 4.012400e+02\n14 9707     6.386100e+02 -2.435100e+02\n1 9708     4.788700e+02 3.995700e+02\n3 9708     -3.143100e+02 -1.597800e+02\n7 9708     -1.050800e+02 5.000600e+02\n12 9708     -1.668800e+02 4.331800e+02\n1 9709     4.788700e+02 3.995700e+02\n3 9709     -3.143100e+02 -1.597800e+02\n5 9709     5.178000e+02 -2.310600e+02\n6 9709     -3.359800e+02 4.452500e+02\n7 9709     -1.050800e+02 5.000600e+02\n8 9709     -6.623999e+01 1.309200e+02\n9 9709     -2.984400e+02 2.174300e+02\n11 9709     2.563500e+02 -3.286300e+02\n12 9709     -1.668800e+02 4.331800e+02\n14 9709     4.279399e+02 -3.133700e+02\n1 9710     6.367400e+02 3.979100e+02\n5 9710     6.561700e+02 -1.916400e+02\n6 9710     -1.972300e+02 5.170600e+02\n9 9710     -2.017400e+02 2.575100e+02\n11 9710     3.794000e+02 -2.915400e+02\n12 9710     -3.233002e+01 4.926800e+02\n13 9710     3.899500e+02 1.477300e+02\n14 9710     5.616300e+02 -2.718300e+02\n1 9711     6.125900e+02 3.969600e+02\n7 9711     2.809998e+00 5.403900e+02\n1 9712     2.334900e+02 3.929000e+02\n2 9712     -3.807700e+02 8.865002e+01\n7 9712     -3.116400e+02 4.093300e+02\n14 9712     2.089399e+02 -3.905000e+02\n1 9713     1.477700e+02 3.889200e+02\n7 9713     -3.866200e+02 3.740300e+02\n1 9714     8.023199e+02 3.890000e+02\n6 9714     -5.676001e+01 5.778600e+02\n1 9715     1.675200e+02 3.876100e+02\n7 9715     -3.684000e+02 3.803600e+02\n11 9715     1.590027e+00 -4.120600e+02\n14 9715     1.480000e+02 -4.147900e+02\n15 9715     -2.894700e+02 5.759100e+02\n1 9716     7.666300e+02 3.854900e+02\n6 9716     -8.326001e+01 5.591700e+02\n1 9717     7.666300e+02 3.854900e+02\n6 9717     -8.326001e+01 5.591700e+02\n12 9717     7.877002e+01 5.252500e+02\n1 9718     7.355699e+02 3.841000e+02\n5 9718     7.450601e+02 -1.794200e+02\n6 9718     -1.067300e+02 5.457300e+02\n12 9718     5.589001e+01 5.141900e+02\n14 9718     6.474200e+02 -2.579900e+02\n1 9719     1.513000e+01 3.820500e+02\n10 9719     -4.873700e+02 4.539000e+02\n1 9720     1.513000e+01 3.820500e+02\n10 9720     -4.873700e+02 4.539000e+02\n1 9721     6.090601e+02 3.811900e+02\n6 9721     -2.127100e+02 4.855900e+02\n1 9722     6.781899e+02 3.808800e+02\n2 9722     -2.556000e+01 2.070700e+02\n6 9722     -1.532500e+02 5.164200e+02\n7 9722     5.834998e+01 5.458200e+02\n9 9722     -1.717300e+02 2.528500e+02\n14 9722     6.013400e+02 -2.767300e+02\n1 9723     6.781899e+02 3.808800e+02\n7 9723     5.834998e+01 5.458200e+02\n1 9724     7.511600e+02 3.790900e+02\n6 9724     -9.276001e+01 5.467600e+02\n11 9724     4.734100e+02 -2.799700e+02\n12 9724     6.953003e+01 5.140200e+02\n1 9725     5.011600e+02 3.763800e+02\n7 9725     -7.929999e+01 4.865100e+02\n14 9725     4.527000e+02 -3.306100e+02\n1 9726     8.196997e+01 3.743500e+02\n14 9726     6.609998e+01 -4.542300e+02\n15 9726     -3.917700e+02 5.169000e+02\n1 9727     5.119500e+02 3.727700e+02\n7 9727     -6.939001e+01 4.866600e+02\n1 9728     8.727002e+01 3.708300e+02\n7 9728     -4.367300e+02 3.331600e+02\n14 9728     7.179999e+01 -4.565800e+02\n15 9728     -3.836500e+02 5.150900e+02\n1 9729     6.371200e+02 3.689300e+02\n2 9729     -5.065997e+01 1.843400e+02\n14 9729     5.706200e+02 -2.994000e+02\n1 9730     6.090000e+02 3.676800e+02\n7 9730     9.179993e+00 5.130900e+02\n1 9731     5.865900e+02 3.670100e+02\n7 9731     -8.130005e+00 5.055000e+02\n1 9732     7.133000e+02 3.660800e+02\n14 9732     6.344600e+02 -2.809300e+02\n1 9733     -8.691998e+01 3.595000e+02\n7 9733     -5.968600e+02 2.536600e+02\n14 9733     -9.978003e+01 -5.202500e+02\n1 9734     6.913600e+02 3.574100e+02\n12 9734     2.781000e+01 4.699600e+02\n1 9735     8.749700e+02 3.505400e+02\n12 9735     2.676801e+02 5.901500e+02\n1 9736     -3.109300e+02 3.301400e+02\n5 9736     -2.470900e+02 -5.178300e+02\n7 9736     -8.103200e+02 1.312200e+02\n13 9736     -3.124100e+02 -1.580700e+02\n1 9737     8.783400e+02 3.296100e+02\n2 9737     2.669800e+02 3.284800e+02\n6 9737     1.711400e+02 5.867500e+02\n1 9738     8.783400e+02 3.296100e+02\n2 9738     2.669800e+02 3.284800e+02\n6 9738     1.711400e+02 5.867500e+02\n1 9739     -2.920500e+02 3.245800e+02\n7 9739     -7.858000e+02 1.344100e+02\n1 9740     -1.281100e+02 3.243200e+02\n7 9740     -6.161600e+02 2.052100e+02\n14 9740     -1.211200e+02 -5.705601e+02\n1 9741     -1.043900e+02 3.174400e+02\n7 9741     -5.882500e+02 2.089800e+02\n1 9742     8.735601e+02 3.048200e+02\n12 9742     2.906801e+02 5.514200e+02\n1 9743     8.807900e+02 3.052200e+02\n6 9743     1.877700e+02 5.657900e+02\n12 9743     2.974700e+02 5.549200e+02\n1 9744     8.807900e+02 3.052200e+02\n6 9744     1.877700e+02 5.657900e+02\n12 9744     2.974700e+02 5.549200e+02\n1 9745     4.908500e+02 2.999200e+02\n6 9745     -2.460700e+02 3.491400e+02\n11 9745     2.976200e+02 -4.083100e+02\n1 9746     4.439200e+02 2.993700e+02\n11 9746     2.586600e+02 -4.209200e+02\n13 9746     2.987100e+02 2.552002e+01\n1 9747     5.023101e+02 2.893100e+02\n6 9747     -2.255500e+02 3.451900e+02\n7 9747     -3.465997e+01 4.153300e+02\n10 9747     7.126001e+01 5.451800e+02\n11 9747     3.106700e+02 -4.141300e+02\n1 9748     8.668900e+02 2.769500e+02\n3 9748     1.424100e+02 -4.287000e+01\n1 9749     4.414301e+02 2.634300e+02\n6 9749     -2.522100e+02 2.899200e+02\n10 9749     2.233002e+01 4.944200e+02\n14 9749     4.704000e+02 -4.562200e+02\n15 9749     1.163600e+02 5.479500e+02\n1 9750     5.227800e+02 2.602600e+02\n6 9750     -1.787200e+02 3.292800e+02\n10 9750     1.062800e+02 5.221400e+02\n14 9750     5.442300e+02 -4.339900e+02\n15 9750     2.151700e+02 5.833000e+02\n1 9751     4.606600e+02 2.513000e+02\n5 9751     5.845900e+02 -3.824100e+02\n6 9751     -2.228800e+02 2.892900e+02\n11 9751     2.891600e+02 -4.585800e+02\n12 9751     -8.173999e+01 2.970500e+02\n13 9751     3.360699e+02 -5.590027e+00\n14 9751     4.959301e+02 -4.624399e+02\n15 9751     1.450800e+02 5.422800e+02\n1 9752     4.200900e+02 2.493900e+02\n5 9752     5.496000e+02 -3.959100e+02\n6 9752     -2.559600e+02 2.660300e+02\n14 9752     4.620400e+02 -4.765601e+02\n15 9752     9.937000e+01 5.211600e+02\n1 9753     4.200900e+02 2.493900e+02\n6 9753     -2.559600e+02 2.660300e+02\n10 9753     8.479980e+00 4.714400e+02\n11 9753     2.569000e+02 -4.705200e+02\n12 9753     -1.157700e+02 2.778500e+02\n15 9753     9.937000e+01 5.211600e+02\n1 9754     6.639900e+02 2.459600e+02\n12 9754     9.215002e+01 3.765800e+02\n1 9755     4.293400e+02 2.446200e+02\n10 9755     1.958002e+01 4.695800e+02\n1 9756     4.597100e+02 2.409500e+02\n6 9756     -2.132400e+02 2.791900e+02\n1 9757     8.390500e+02 2.400300e+02\n10 9757     4.424700e+02 6.179600e+02\n1 9758     -4.210200e+02 2.396800e+02\n7 9758     -8.686100e+02 -4.539978e+00\n13 9758     -3.584300e+02 -2.666000e+02\n1 9759     6.703400e+02 2.338500e+02\n10 9759     2.632300e+02 5.493200e+02\n1 9760     -3.655200e+02 2.321400e+02\n13 9760     -3.035900e+02 -2.558200e+02\n1 9761     8.376200e+02 2.304600e+02\n2 9761     2.791801e+02 2.336300e+02\n6 9761     1.835600e+02 4.757600e+02\n10 9761     4.446801e+02 6.080800e+02\n1 9762     4.186100e+02 2.290800e+02\n10 9762     1.650000e+01 4.492700e+02\n1 9763     8.762100e+02 2.289500e+02\n3 9763     1.758000e+02 -7.090002e+01\n6 9763     2.260400e+02 4.950800e+02\n7 9763     3.148101e+02 5.036300e+02\n9 9763     1.268500e+02 3.063100e+02\n10 9763     4.845100e+02 6.198600e+02\n12 9763     3.328600e+02 4.885400e+02\n1 9764     8.291998e+01 2.262700e+02\n10 9764     -3.343800e+02 3.124100e+02\n1 9765     -2.889500e+02 2.229500e+02\n7 9765     -7.140900e+02 4.244000e+01\n1 9766     4.255900e+02 2.213700e+02\n10 9766     2.715997e+01 4.438000e+02\n1 9767     5.067700e+02 2.189500e+02\n10 9767     1.105300e+02 4.720900e+02\n1 9768     8.696899e+02 2.131700e+02\n2 9768     3.194399e+02 2.393100e+02\n3 9768     1.782400e+02 -8.554999e+01\n6 9768     2.285800e+02 4.773300e+02\n9 9768     1.291400e+02 2.935700e+02\n10 9768     4.835800e+02 6.015900e+02\n1 9769     3.786400e+02 2.124200e+02\n6 9769     -2.540800e+02 2.100100e+02\n10 9769     -1.559003e+01 4.158200e+02\n1 9770     4.385699e+02 2.124300e+02\n10 9770     4.620001e+01 4.386400e+02\n11 9770     2.847000e+02 -4.992000e+02\n1 9771     3.639200e+02 2.118800e+02\n6 9771     -2.664800e+02 2.018800e+02\n10 9771     -3.058002e+01 4.093000e+02\n11 9771     2.209700e+02 -5.191000e+02\n1 9772     5.224000e+02 2.113400e+02\n15 9772     2.422500e+02 5.226100e+02\n1 9773     5.348500e+02 2.096100e+02\n10 9773     1.428000e+02 4.734700e+02\n1 9774     8.060100e+02 2.097200e+02\n7 9774     2.621700e+02 4.624600e+02\n1 9775     5.857000e+02 2.043700e+02\n10 9775     1.951899e+02 4.874400e+02\n1 9776     8.631300e+02 2.028600e+02\n2 9776     3.185100e+02 2.280600e+02\n3 9776     1.779500e+02 -9.656000e+01\n6 9776     2.276300e+02 4.648500e+02\n7 9776     3.138500e+02 4.783300e+02\n9 9776     1.287700e+02 2.842200e+02\n10 9776     4.814600e+02 5.886400e+02\n13 9776     6.802300e+02 7.504999e+01\n1 9777     8.631300e+02 2.028600e+02\n2 9777     3.185100e+02 2.280600e+02\n6 9777     2.276300e+02 4.648500e+02\n7 9777     3.138500e+02 4.783300e+02\n9 9777     1.287700e+02 2.842200e+02\n10 9777     4.814600e+02 5.886400e+02\n11 9777     6.359900e+02 -3.933000e+02\n13 9777     6.802300e+02 7.504999e+01\n1 9778     7.959900e+02 2.022100e+02\n6 9778     1.534800e+02 4.273400e+02\n10 9778     4.124301e+02 5.634800e+02\n12 9778     2.675100e+02 4.221400e+02\n1 9779     5.550500e+02 1.976400e+02\n6 9779     -8.938000e+01 2.890300e+02\n1 9780     3.947900e+02 1.959000e+02\n6 9780     -2.223600e+02 2.034900e+02\n1 9781     5.774600e+02 1.961900e+02\n10 9781     1.909100e+02 4.755000e+02\n1 9782     8.546100e+02 1.933600e+02\n3 9782     1.747900e+02 -1.085100e+02\n6 9782     2.234400e+02 4.508200e+02\n10 9782     4.760400e+02 5.755600e+02\n1 9783     6.930100e+02 1.871000e+02\n6 9783     3.066998e+01 3.477000e+02\n1 9784     4.440500e+02 1.860300e+02\n10 9784     6.384003e+01 4.135400e+02\n1 9785     -1.664200e+02 1.839100e+02\n15 9785     -5.963400e+02 1.503500e+02\n1 9786     1.456700e+02 1.832500e+02\n7 9786     -2.249700e+02 2.183900e+02\n10 9786     -2.125900e+02 2.950100e+02\n1 9787     1.521000e+02 1.819400e+02\n4 9787     -1.798600e+02 -3.269200e+02\n5 9787     4.475601e+02 -5.286100e+02\n6 9787     -2.930800e+02 1.059400e+02\n8 9787     -4.796997e+01 -8.980011e+00\n10 9787     -2.054500e+02 2.961700e+02\n12 9787     -2.252000e+02 1.536400e+02\n15 9787     -1.585700e+02 3.152400e+02\n1 9788     -2.764001e+01 1.785700e+02\n2 9788     -4.263900e+02 -1.710200e+02\n13 9788     1.485999e+01 -1.973100e+02\n1 9789     8.227400e+02 1.747200e+02\n10 9789     4.506600e+02 5.454200e+02\n1 9790     8.227400e+02 1.747200e+02\n10 9790     4.506600e+02 5.454200e+02\n1 9791     2.864399e+02 1.727800e+02\n15 9791     3.501001e+01 3.767200e+02\n1 9792     1.026700e+02 1.674700e+02\n7 9792     -2.524000e+02 1.882600e+02\n10 9792     -2.491300e+02 2.605000e+02\n15 9792     -2.105000e+02 2.725500e+02\n1 9793     3.694700e+02 1.652700e+02\n10 9793     5.138000e+01 3.683800e+02\n14 9793     6.372300e+02 -5.453900e+02\n15 9793     1.370800e+02 4.060900e+02\n1 9794     3.694700e+02 1.652700e+02\n10 9794     5.138000e+01 3.683800e+02\n14 9794     6.372300e+02 -5.453900e+02\n15 9794     1.370800e+02 4.060900e+02\n1 9795     4.088500e+02 1.645300e+02\n15 9795     1.859700e+02 4.251400e+02\n1 9796     9.106000e+01 1.630600e+02\n6 9796     -3.254500e+02 5.533002e+01\n12 9796     -2.662800e+02 1.089000e+02\n15 9796     -2.220200e+02 2.620700e+02\n1 9797     4.006000e+02 1.627800e+02\n15 9797     1.774600e+02 4.184300e+02\n1 9798     4.006000e+02 1.627800e+02\n10 9798     8.583002e+01 3.784300e+02\n15 9798     1.774600e+02 4.184300e+02\n1 9799     2.419800e+02 1.607700e+02\n15 9799     -9.099976e+00 3.400300e+02\n1 9800     1.858600e+02 1.565000e+02\n10 9800     -1.324700e+02 2.862900e+02\n15 9800     -7.984998e+01 3.062700e+02\n1 9801     7.999399e+02 1.566700e+02\n10 9801     4.344900e+02 5.186900e+02\n1 9802     1.553003e+01 1.532000e+02\n5 9802     2.248700e+02 -6.173000e+02\n7 9802     -3.723600e+02 1.160200e+02\n10 9802     -3.671100e+02 2.043600e+02\n15 9802     -3.401100e+02 2.042500e+02\n1 9803     8.687500e+02 1.527700e+02\n7 9803     3.376899e+02 4.405600e+02\n1 9804     -2.446700e+02 1.515500e+02\n10 9804     -6.618400e+02 8.878003e+01\n1 9805     6.683500e+02 1.475300e+02\n6 9805     4.848999e+01 3.021000e+02\n1 9806     -1.935500e+02 1.463700e+02\n15 9806     -6.078400e+02 8.735001e+01\n1 9807     1.248700e+02 1.444100e+02\n15 9807     -1.632100e+02 2.568700e+02\n1 9808     8.042600e+02 1.442400e+02\n6 9808     1.966500e+02 3.786000e+02\n7 9808     2.863000e+02 4.093300e+02\n10 9808     4.433300e+02 5.077100e+02\n12 9808     3.066600e+02 3.761900e+02\n15 9808     6.141899e+02 5.754100e+02\n1 9809     4.357000e+02 1.430400e+02\n10 9809     1.311000e+02 3.720600e+02\n1 9810     5.077900e+02 1.431200e+02\n10 9810     1.492900e+02 3.938100e+02\n1 9811     6.101200e+02 1.416700e+02\n10 9811     2.490900e+02 4.317200e+02\n1 9812     4.366400e+02 1.385300e+02\n7 9812     8.370001e+01 3.118500e+02\n10 9812     1.353500e+02 3.673700e+02\n15 9812     2.347200e+02 4.069500e+02\n1 9813     8.752700e+02 1.345100e+02\n6 9813     3.337200e+02 4.291500e+02\n8 9813     4.085000e+02 1.667500e+02\n10 9813     5.352800e+02 5.254100e+02\n1 9814     3.601300e+02 1.299600e+02\n12 9814     8.459003e+01 2.627000e+02\n14 9814     6.668400e+02 -5.800699e+02\n1 9815     1.285400e+02 1.285000e+02\n7 9815     -1.808400e+02 1.796300e+02\n15 9815     -1.400400e+02 2.418000e+02\n1 9816     2.355400e+02 1.278100e+02\n5 9816     6.607800e+02 -5.425900e+02\n6 9816     -4.575000e+01 1.516200e+02\n8 9816     1.423000e+02 6.276001e+01\n12 9816     -1.959003e+01 2.052600e+02\n15 9816     3.510010e+00 2.970200e+02\n1 9817     7.775000e+02 1.281300e+02\n10 9817     4.221200e+02 4.813200e+02\n1 9818     9.223999e+01 1.253900e+02\n10 9818     -2.311300e+02 2.120000e+02\n15 9818     -1.913000e+02 2.176500e+02\n1 9819     4.605601e+02 1.248300e+02\n15 9819     2.696100e+02 4.016500e+02\n1 9820     3.465800e+02 1.227500e+02\n6 9820     4.309998e+01 2.035000e+02\n10 9820     5.415002e+01 3.160700e+02\n15 9820     1.385800e+02 3.447300e+02\n1 9821     8.230100e+02 1.222300e+02\n10 9821     4.711000e+02 4.927900e+02\n1 9822     4.691700e+02 1.203700e+02\n15 9822     2.809900e+02 3.997800e+02\n1 9823     2.146997e+01 1.129200e+02\n10 9823     -3.050200e+02 1.681000e+02\n1 9824     5.965500e+02 1.132000e+02\n10 9824     2.499800e+02 3.973000e+02\n1 9825     1.744700e+02 1.083100e+02\n2 9825     8.651001e+01 8.284998e+01\n3 9825     -4.299988e+00 -2.322600e+02\n4 9825     -2.191800e+02 -4.002100e+02\n5 9825     6.049301e+02 -5.849399e+02\n6 9825     -9.378000e+01 9.528003e+01\n7 9825     -1.166800e+02 1.863300e+02\n8 9825     1.044100e+02 2.376999e+01\n10 9825     -1.183000e+02 2.305800e+02\n13 9825     3.438300e+02 -1.583100e+02\n15 9825     -6.323999e+01 2.403600e+02\n1 9826     6.209100e+02 1.069200e+02\n10 9826     2.765100e+02 3.999200e+02\n15 9826     4.155300e+02 4.436900e+02\n1 9827     4.345400e+02 1.061200e+02\n15 9827     2.500400e+02 3.668600e+02\n1 9828     2.466300e+02 1.057000e+02\n15 9828     3.010999e+01 2.759700e+02\n1 9829     2.447000e+02 1.036500e+02\n5 9829     6.898700e+02 -5.634900e+02\n6 9829     -1.184998e+01 1.378800e+02\n10 9829     -3.795001e+01 2.551000e+02\n12 9829     1.112000e+01 1.916800e+02\n15 9829     2.921997e+01 2.721300e+02\n1 9830     6.391801e+02 9.801999e+01\n15 9830     4.414301e+02 4.415100e+02\n1 9831     7.052300e+02 9.750000e+01\n15 9831     5.167800e+02 4.717600e+02\n1 9832     2.153400e+02 9.678000e+01\n5 9832     6.611899e+02 -5.804800e+02\n7 9832     -6.978998e+01 1.955700e+02\n10 9832     -6.729999e+01 2.357200e+02\n1 9833     -1.547998e+01 9.607999e+01\n7 9833     -3.660400e+02 5.338000e+01\n10 9833     -3.699500e+02 1.287800e+02\n1 9834     -1.547998e+01 9.607999e+01\n7 9834     -3.660400e+02 5.338000e+01\n1 9835     1.493800e+02 9.425000e+01\n7 9835     -1.349100e+02 1.621900e+02\n13 9835     3.268500e+02 -1.776100e+02\n15 9835     -8.916998e+01 2.112200e+02\n1 9836     8.461600e+02 9.466000e+01\n10 9836     5.205800e+02 4.744000e+02\n15 9836     7.034200e+02 5.391800e+02\n1 9837     1.680699e+02 9.151999e+01\n10 9837     -1.169500e+02 2.100700e+02\n1 9838     1.680699e+02 9.151999e+01\n2 9838     9.537000e+01 6.839001e+01\n10 9838     -1.169500e+02 2.100700e+02\n1 9839     6.245100e+02 9.026001e+01\n10 9839     2.873400e+02 3.846700e+02\n1 9840     1.164100e+02 8.862000e+01\n7 9840     -1.674300e+02 1.402200e+02\n10 9840     -1.766900e+02 1.844100e+02\n1 9841     8.553400e+02 8.807001e+01\n2 9841     4.292300e+02 1.898100e+02\n3 9841     2.914000e+02 -1.288100e+02\n7 9841     3.756600e+02 3.948800e+02\n9 9841     2.269399e+02 2.559000e+02\n10 9841     5.323199e+02 4.711900e+02\n11 9841     6.857400e+02 -4.933900e+02\n12 9841     4.273199e+02 3.855700e+02\n15 9841     7.177100e+02 5.359900e+02\n1 9842     2.814600e+02 8.626999e+01\n13 9842     4.446600e+02 -1.391300e+02\n1 9843     5.739500e+02 8.560001e+01\n15 9843     3.733199e+02 3.960200e+02\n1 9844     4.630699e+02 8.356000e+01\n10 9844     1.884900e+02 3.212300e+02\n15 9844     2.980400e+02 3.537000e+02\n1 9845     2.438600e+02 8.281000e+01\n6 9845     7.450012e+00 1.199900e+02\n9 9845     3.809998e+01 1.823100e+02\n10 9845     -2.790997e+01 2.331200e+02\n1 9846     2.661600e+02 8.203000e+01\n3 9846     1.045500e+02 -1.942900e+02\n1 9847     6.067000e+02 8.029001e+01\n10 9847     2.751400e+02 3.673400e+02\n15 9847     4.142900e+02 4.052100e+02\n1 9848     4.789399e+02 8.004999e+01\n10 9848     2.038300e+02 3.233700e+02\n15 9848     3.168600e+02 3.566100e+02\n1 9849     4.789399e+02 8.004999e+01\n15 9849     3.168600e+02 3.566100e+02\n1 9850     5.785300e+02 7.901999e+01\n15 9850     3.815100e+02 3.898500e+02\n1 9851     4.891200e+02 7.845001e+01\n15 9851     3.285601e+02 3.598300e+02\n1 9852     4.809200e+02 7.751001e+01\n10 9852     2.070699e+02 3.216500e+02\n1 9853     4.809200e+02 7.751001e+01\n10 9853     2.070699e+02 3.216500e+02\n1 9854     2.695699e+02 7.621002e+01\n5 9854     7.358900e+02 -5.837100e+02\n6 9854     3.664001e+01 1.293700e+02\n10 9854     2.130005e+00 2.364900e+02\n12 9854     5.873999e+01 1.819800e+02\n15 9854     7.609998e+01 2.509100e+02\n1 9855     8.804500e+02 7.466998e+01\n15 9855     7.539399e+02 5.319700e+02\n1 9856     6.209003e+01 6.509003e+01\n10 9856     -2.289700e+02 1.351200e+02\n15 9856     -1.902200e+02 1.280500e+02\n1 9857     1.936801e+02 6.506000e+01\n6 9857     -3.056000e+01 7.189001e+01\n1 9858     8.614200e+02 6.410999e+01\n6 9858     3.588500e+02 3.596000e+02\n7 9858     3.900699e+02 3.781700e+02\n8 9858     4.280400e+02 1.170700e+02\n9 9858     2.430300e+02 2.446900e+02\n10 9858     5.474100e+02 4.497100e+02\n11 9858     7.015300e+02 -5.127700e+02\n12 9858     4.467300e+02 3.679700e+02\n15 9858     7.366400e+02 5.102100e+02\n1 9859     3.187800e+02 6.364001e+01\n6 9859     8.912000e+01 1.460100e+02\n1 9860     8.088600e+02 6.345001e+01\n15 9860     6.578600e+02 4.809000e+02\n1 9861     8.745500e+02 6.185999e+01\n3 9861     3.215500e+02 -1.342000e+02\n6 9861     3.728800e+02 3.658200e+02\n7 9861     4.016200e+02 3.818900e+02\n10 9861     5.619700e+02 4.521700e+02\n15 9861     7.531200e+02 5.139200e+02\n1 9862     7.936300e+02 6.059003e+01\n15 9862     6.407600e+02 4.701300e+02\n1 9863     7.936300e+02 6.059003e+01\n6 9863     2.334700e+02 2.953200e+02\n15 9863     6.407600e+02 4.701300e+02\n1 9864     2.354301e+02 6.001001e+01\n3 9864     1.003900e+02 -2.222700e+02\n6 9864     1.878998e+01 9.487000e+01\n10 9864     -2.615997e+01 2.055100e+02\n12 9864     3.714001e+01 1.487200e+02\n15 9864     4.301001e+01 2.140000e+02\n1 9865     4.714000e+02 5.915002e+01\n15 9865     3.213800e+02 3.280000e+02\n1 9866     2.343500e+02 5.713000e+01\n15 9866     4.289001e+01 2.099300e+02\n1 9867     8.799000e+02 5.490002e+01\n6 9867     3.821700e+02 3.626200e+02\n8 9867     4.445400e+02 1.210400e+02\n15 9867     7.624500e+02 5.086200e+02\n1 9868     2.842200e+02 5.215997e+01\n2 9868     2.419600e+02 1.075300e+02\n10 9868     2.887000e+01 2.177300e+02\n15 9868     1.076100e+02 2.291000e+02\n1 9869     4.348600e+02 5.159003e+01\n10 9869     1.780200e+02 2.776300e+02\n15 9869     2.848400e+02 3.020100e+02\n1 9870     8.685400e+02 4.866998e+01\n10 9870     5.606300e+02 4.370800e+02\n12 9870     4.610100e+02 3.593800e+02\n15 9870     7.519900e+02 4.958400e+02\n1 9871     3.660200e+02 4.772998e+01\n15 9871     2.079500e+02 2.641800e+02\n1 9872     3.804200e+02 4.723999e+01\n10 9872     1.276100e+02 2.520400e+02\n15 9872     2.248600e+02 2.707000e+02\n1 9873     5.130601e+02 4.716998e+01\n15 9873     3.708101e+02 3.329300e+02\n1 9874     2.959200e+02 4.615002e+01\n9 9874     9.976001e+01 1.848000e+02\n10 9874     4.396997e+01 2.163900e+02\n1 9875     1.876200e+02 4.540997e+01\n7 9875     -6.842999e+01 1.397400e+02\n13 9875     3.877900e+02 -2.002600e+02\n15 9875     -1.001001e+01 1.712300e+02\n1 9876     5.928003e+01 4.423999e+01\n10 9876     -2.202400e+02 1.116800e+02\n1 9877     5.928003e+01 4.423999e+01\n7 9877     -2.015700e+02 7.359003e+01\n15 9877     -1.802600e+02 1.010000e+02\n1 9878     5.928003e+01 4.423999e+01\n6 9878     -1.857200e+02 -5.115002e+01\n10 9878     -2.202400e+02 1.116800e+02\n12 9878     -1.669500e+02 6.929993e+00\n1 9879     5.928003e+01 4.423999e+01\n6 9879     -1.857200e+02 -5.115002e+01\n12 9879     -1.669500e+02 6.929993e+00\n1 9880     6.244000e+01 4.303003e+01\n10 9880     -2.164200e+02 1.117200e+02\n1 9881     6.244000e+01 4.303003e+01\n10 9881     -2.164200e+02 1.117200e+02\n1 9882     8.356899e+02 4.312000e+01\n8 9882     4.163000e+02 9.075000e+01\n13 9882     7.480200e+02 -3.954999e+01\n15 9882     7.146700e+02 4.732800e+02\n1 9883     4.951500e+02 4.245001e+01\n15 9883     3.558400e+02 3.192900e+02\n1 9884     7.163000e+01 4.208002e+01\n10 9884     -2.062400e+02 1.149500e+02\n15 9884     -1.637300e+02 1.047200e+02\n1 9885     1.622200e+02 3.983002e+01\n10 9885     -9.760999e+01 1.529500e+02\n1 9886     3.322500e+02 3.981000e+01\n15 9886     1.720800e+02 2.381900e+02\n1 9887     2.610000e+02 3.785999e+01\n2 9887     2.346500e+02 8.721002e+01\n10 9887     1.122998e+01 1.933200e+02\n15 9887     8.690002e+01 2.000600e+02\n1 9888     2.610000e+02 3.785999e+01\n2 9888     2.346500e+02 8.721002e+01\n10 9888     1.122998e+01 1.933200e+02\n12 9888     7.859003e+01 1.435600e+02\n15 9888     8.690002e+01 2.000600e+02\n1 9889     4.421600e+02 3.665997e+01\n15 9889     3.017000e+02 2.874400e+02\n1 9890     3.274200e+02 3.450000e+01\n15 9890     1.693300e+02 2.294700e+02\n1 9891     3.858400e+02 3.203998e+01\n10 9891     1.400300e+02 2.380800e+02\n15 9891     2.398600e+02 2.547700e+02\n1 9892     2.455500e+02 3.171002e+01\n7 9892     -8.979980e+00 1.546700e+02\n12 9892     6.475000e+01 1.289900e+02\n1 9893     3.745000e+02 2.865997e+01\n15 9893     2.281100e+02 2.453900e+02\n1 9894     4.444100e+02 2.633002e+01\n10 9894     1.982500e+02 2.552400e+02\n1 9895     2.773900e+02 2.494000e+01\n15 9895     1.137500e+02 1.928600e+02\n1 9896     2.350100e+02 2.406000e+01\n2 9896     2.225200e+02 6.359998e+01\n6 9896     4.598999e+01 6.275000e+01\n7 9896     -1.301001e+01 1.432700e+02\n8 9896     2.130000e+02 4.160004e+00\n9 9896     7.488000e+01 1.464400e+02\n10 9896     -1.003998e+01 1.677100e+02\n12 9896     6.196997e+01 1.157100e+02\n15 9896     6.209003e+01 1.698700e+02\n1 9897     4.428400e+02 2.253003e+01\n10 9897     1.982600e+02 2.515300e+02\n1 9898     4.459399e+02 2.220001e+01\n10 9898     2.013500e+02 2.518600e+02\n15 9898     3.129900e+02 2.718600e+02\n1 9899     8.699800e+02 1.963000e+01\n6 9899     3.915800e+02 3.251500e+02\n10 9899     5.725200e+02 4.081500e+02\n15 9899     7.669700e+02 4.617500e+02\n1 9900     8.699800e+02 1.963000e+01\n10 9900     5.725200e+02 4.081500e+02\n1 9901     6.502200e+02 1.921997e+01\n15 9901     4.981500e+02 3.534600e+02\n1 9902     -1.717800e+02 1.776001e+01\n2 9902     -3.959200e+02 -3.590800e+02\n6 9902     -5.743600e+02 -3.200100e+02\n7 9902     -4.641100e+02 -8.629999e+01\n8 9902     -2.775500e+02 -3.151600e+02\n15 9902     -4.965300e+02 -6.415997e+01\n1 9903     -6.260010e+00 1.481000e+01\n10 9903     -2.788800e+02 5.115997e+01\n15 9903     -2.481600e+02 2.963000e+01\n1 9904     8.379100e+02 1.507001e+01\n7 9904     3.883101e+02 3.299500e+02\n8 9904     4.295300e+02 7.464999e+01\n9 9904     2.470000e+02 2.008100e+02\n1 9905     8.298800e+02 1.428003e+01\n2 9905     4.436600e+02 1.174500e+02\n6 9905     3.526100e+02 2.974200e+02\n15 9905     7.212300e+02 4.362300e+02\n1 9906     2.118300e+02 1.401001e+01\n2 9906     2.083400e+02 4.219000e+01\n10 9906     -3.056000e+01 1.472400e+02\n15 9906     3.821997e+01 1.454100e+02\n1 9907     4.494399e+02 1.271997e+01\n15 9907     3.221300e+02 2.616100e+02\n1 9908     3.482800e+02 1.078998e+01\n10 9908     1.130700e+02 2.009800e+02\n15 9908     2.068700e+02 2.107100e+02\n1 9909     2.798900e+02 9.299988e+00\n10 9909     4.447998e+01 1.713900e+02\n15 9909     1.258200e+02 1.746300e+02\n1 9910     8.409200e+02 9.320007e+00\n6 9910     3.666200e+02 2.993500e+02\n15 9910     7.370000e+02 4.358400e+02\n1 9911     6.395100e+02 7.500000e+00\n15 9911     4.921700e+02 3.345100e+02\n1 9912     2.910900e+02 6.419983e+00\n7 9912     4.435999e+01 1.519300e+02\n15 9912     1.402100e+02 1.767800e+02\n1 9913     4.615500e+02 4.719971e+00\n15 9913     3.397200e+02 2.586000e+02\n1 9914     2.232600e+02 3.080017e+00\n7 9914     -1.378003e+01 1.196100e+02\n10 9914     -1.350000e+01 1.409400e+02\n15 9914     5.825000e+01 1.381400e+02\n1 9915     2.516600e+02 3.130005e+00\n2 9915     2.516000e+02 5.508002e+01\n3 9915     1.560500e+02 -2.540900e+02\n6 9915     7.610999e+01 5.444000e+01\n7 9915     1.165997e+01 1.325400e+02\n10 9915     1.658002e+01 1.526800e+02\n12 9915     9.228003e+01 1.063100e+02\n15 9915     9.373999e+01 1.531400e+02\n1 9916     4.577300e+02 2.989990e+00\n10 9916     2.205000e+02 2.370200e+02\n15 9916     3.362400e+02 2.541200e+02\n1 9917     7.859800e+02 2.809998e+00\n15 9917     6.732500e+02 4.013800e+02\n1 9918     4.471400e+02 1.979980e+00\n10 9918     2.115200e+02 2.315000e+02\n15 9918     3.249900e+02 2.481400e+02\n1 9919     1.251400e+02 7.999878e-01\n6 9919     -6.141998e+01 -3.850000e+01\n12 9919     -4.903998e+01 1.620001e+01\n1 9920     2.022000e+02 1.359985e+00\n3 9920     1.162400e+02 -2.838000e+02\n7 9920     -3.266998e+01 1.083400e+02\n15 9920     3.270001e+01 1.247200e+02\n1 9921     6.330000e+02 8.300171e-01\n10 9921     3.375699e+02 2.969700e+02\n15 9921     4.884700e+02 3.233100e+02\n1 9922     5.028400e+02 -6.599731e-01\n10 9922     2.629500e+02 2.505500e+02\n15 9922     3.870800e+02 2.708600e+02\n1 9923     8.051100e+02 -4.199829e-01\n15 9923     6.980699e+02 4.066900e+02\n1 9924     4.585400e+02 -1.679993e+00\n15 9924     3.394800e+02 2.488600e+02\n1 9925     4.835200e+02 -2.159973e+00\n10 9925     2.464399e+02 2.420300e+02\n15 9925     3.672600e+02 2.605800e+02\n1 9926     2.550601e+02 -4.630005e+00\n2 9926     2.602300e+02 5.065002e+01\n6 9926     8.526001e+01 4.859003e+01\n10 9926     2.433002e+01 1.462800e+02\n15 9926     1.027500e+02 1.451400e+02\n1 9927     1.970400e+02 -4.719971e+00\n2 9927     2.073000e+02 1.771997e+01\n15 9927     2.953998e+01 1.148700e+02\n1 9928     2.294301e+02 -4.869995e+00\n2 9928     2.378600e+02 3.671002e+01\n7 9928     -4.599976e+00 1.154700e+02\n10 9928     -3.270020e+00 1.349800e+02\n15 9928     7.021002e+01 1.312900e+02\n1 9929     2.294301e+02 -4.869995e+00\n2 9929     2.378600e+02 3.671002e+01\n4 9929     -2.907300e+02 -4.745200e+02\n7 9929     -4.599976e+00 1.154700e+02\n10 9929     -3.270020e+00 1.349800e+02\n15 9929     7.021002e+01 1.312900e+02\n1 9930     8.519301e+02 -4.919983e+00\n15 9930     7.567800e+02 4.245400e+02\n1 9931     8.519301e+02 -4.919983e+00\n2 9931     4.744900e+02 1.176500e+02\n15 9931     7.567800e+02 4.245400e+02\n1 9932     2.139301e+02 -6.940002e+00\n2 9932     2.252000e+02 2.622998e+01\n9 9932     7.889001e+01 1.154200e+02\n10 9932     -1.888000e+01 1.263200e+02\n15 9932     5.203998e+01 1.208800e+02\n1 9933     8.432500e+02 -7.219971e+00\n2 9933     4.675100e+02 1.104600e+02\n15 9933     7.477500e+02 4.173400e+02\n1 9934     4.296000e+02 -8.250000e+00\n15 9934     3.103101e+02 2.273800e+02\n1 9935     2.915500e+02 -9.280029e+00\n6 9935     1.203100e+02 6.615997e+01\n10 9935     6.406000e+01 1.569000e+02\n12 9935     1.393300e+02 1.163600e+02\n15 9935     1.493199e+02 1.577300e+02\n1 9936     1.668000e+02 -1.103003e+01\n2 9936     1.797000e+02 -8.469971e+00\n6 9936     -1.229980e+00 -1.654999e+01\n7 9936     -6.102002e+01 8.082001e+01\n8 9936     1.755200e+02 -5.494000e+01\n10 9936     -6.917999e+01 1.015000e+02\n15 9936     -6.159973e+00 9.113000e+01\n1 9937     7.976500e+02 -1.139001e+01\n15 9937     6.941200e+02 3.901500e+02\n1 9938     7.862900e+02 -1.317999e+01\n15 9938     6.811700e+02 3.825900e+02\n1 9939     7.862900e+02 -1.317999e+01\n6 9939     3.210500e+02 2.452900e+02\n10 9939     4.995601e+02 3.438100e+02\n12 9939     4.115200e+02 2.549700e+02\n15 9939     6.811700e+02 3.825900e+02\n1 9940     2.693800e+02 -1.601001e+01\n10 9940     4.435999e+01 1.406400e+02\n15 9940     1.255400e+02 1.384300e+02\n1 9941     2.693800e+02 -1.601001e+01\n2 9941     2.794900e+02 4.825000e+01\n15 9941     1.255400e+02 1.384300e+02\n1 9942     1.480400e+02 -1.660999e+01\n15 9942     -2.785999e+01 7.363000e+01\n1 9943     2.491801e+02 -1.684998e+01\n2 9943     2.633600e+02 3.728003e+01\n15 9943     1.010900e+02 1.266300e+02\n1 9944     2.520601e+02 -1.698999e+01\n15 9944     1.053700e+02 1.282100e+02\n1 9945     3.364399e+02 -1.704999e+01\n10 9945     1.128600e+02 1.675300e+02\n15 9945     2.070000e+02 1.710800e+02\n1 9946     8.531100e+02 -1.866998e+01\n6 9946     3.952900e+02 2.827900e+02\n9 9946     2.748101e+02 1.898400e+02\n13 9946     7.861000e+02 -7.854999e+01\n1 9947     4.184000e+02 -2.035999e+01\n10 9947     1.940100e+02 1.971200e+02\n15 9947     3.037800e+02 2.072800e+02\n1 9948     3.119100e+02 -2.112000e+01\n10 9948     9.002002e+01 1.533600e+02\n15 9948     1.800400e+02 1.539200e+02\n1 9949     1.321600e+02 -2.640997e+01\n7 9949     -8.921002e+01 4.946002e+01\n9 9949     1.857001e+01 4.832001e+01\n15 9949     -4.369000e+01 5.346997e+01\n1 9950     3.901300e+02 -2.662000e+01\n15 9950     2.742100e+02 1.864900e+02\n1 9951     8.212700e+02 -2.788000e+01\n6 9951     3.672300e+02 2.543900e+02\n8 9951     4.352400e+02 3.822000e+01\n9 9951     2.541400e+02 1.633200e+02\n15 9951     7.307400e+02 3.822800e+02\n1 9952     3.283300e+02 -2.900000e+01\n6 9952     1.623600e+02 6.884998e+01\n10 9952     1.102700e+02 1.517000e+02\n12 9952     1.845500e+02 1.171200e+02\n15 9952     2.037400e+02 1.524800e+02\n1 9953     5.000699e+02 -2.904999e+01\n15 9953     3.988101e+02 2.355400e+02\n1 9954     8.470300e+02 -2.902002e+01\n2 9954     4.825100e+02 9.602002e+01\n3 9954     3.471200e+02 -2.164100e+02\n6 9954     3.950400e+02 2.696400e+02\n7 9954     4.127500e+02 2.987300e+02\n9 9954     2.746700e+02 1.791800e+02\n12 9954     4.803800e+02 2.786500e+02\n15 9954     7.622200e+02 3.936200e+02\n1 9955     3.371600e+02 -2.966998e+01\n10 9955     1.197300e+02 1.545100e+02\n15 9955     2.149100e+02 1.561900e+02\n1 9956     3.732300e+02 -3.014001e+01\n12 9956     2.219500e+02 1.372400e+02\n15 9956     2.571300e+02 1.732400e+02\n1 9957     8.319500e+02 -3.028003e+01\n2 9957     4.691500e+02 8.477002e+01\n6 9957     3.797400e+02 2.590200e+02\n8 9957     4.444700e+02 4.220001e+01\n9 9957     2.637800e+02 1.687100e+02\n10 9957     5.531600e+02 3.443000e+02\n12 9957     4.664500e+02 2.687400e+02\n15 9957     7.447400e+02 3.845600e+02\n1 9958     1.127800e+02 -3.208002e+01\n15 9958     -6.648999e+01 3.551001e+01\n1 9959     7.925601e+02 -3.234003e+01\n10 9959     5.129700e+02 3.271100e+02\n15 9959     6.977700e+02 3.627600e+02\n1 9960     4.164200e+02 -3.316998e+01\n10 9960     1.976100e+02 1.830800e+02\n15 9960     3.083199e+02 1.907900e+02\n1 9961     4.164200e+02 -3.316998e+01\n10 9961     1.976100e+02 1.830800e+02\n15 9961     3.083199e+02 1.907900e+02\n1 9962     6.289001e+01 -3.350000e+01\n2 9962     8.540997e+01 -9.770001e+01\n3 9962     5.309998e+00 -4.062500e+02\n6 9962     -9.998999e+01 -1.127300e+02\n12 9962     -9.315002e+01 -5.679999e+01\n1 9963     4.673700e+02 -3.352002e+01\n15 9963     3.655800e+02 2.149200e+02\n1 9964     3.653500e+02 -3.440002e+01\n10 9964     1.489500e+02 1.610500e+02\n15 9964     2.497800e+02 1.640900e+02\n1 9965     3.273700e+02 -3.722998e+01\n10 9965     1.129800e+02 1.427300e+02\n15 9965     2.071400e+02 1.419100e+02\n1 9966     3.237000e+02 -3.790002e+01\n15 9966     2.031400e+02 1.392300e+02\n1 9967     -1.818400e+02 -3.842999e+01\n6 9967     -5.151800e+02 -3.795900e+02\n1 9968     4.104500e+02 -3.840002e+01\n10 9968     1.940300e+02 1.759000e+02\n1 9969     -2.353000e+02 -3.953998e+01\n15 9969     -5.428400e+02 -1.714800e+02\n1 9970     3.342400e+02 -4.029999e+01\n15 9970     2.162500e+02 1.420400e+02\n1 9971     3.824500e+02 -4.002002e+01\n13 9971     5.679700e+02 -2.046300e+02\n15 9971     2.727500e+02 1.659500e+02\n1 9972     2.193000e+02 -4.142999e+01\n15 9972     7.703998e+01 8.157999e+01\n1 9973     2.193000e+02 -4.142999e+01\n2 9973     2.534100e+02 -1.099854e-01\n15 9973     7.703998e+01 8.157999e+01\n1 9974     1.818000e+02 -4.259998e+01\n9 9974     7.394000e+01 7.259998e+01\n15 9974     2.960999e+01 6.047998e+01\n1 9975     4.426000e+02 -4.453998e+01\n10 9975     2.267900e+02 1.822800e+02\n15 9975     3.435500e+02 1.898400e+02\n1 9976     2.548600e+02 -4.688000e+01\n2 9976     2.869700e+02 1.423999e+01\n6 9976     1.122100e+02 8.890015e+00\n8 9976     2.647100e+02 -3.762000e+01\n10 9976     4.178003e+01 1.020300e+02\n12 9976     1.274900e+02 5.857001e+01\n15 9976     1.234700e+02 9.325000e+01\n1 9977     3.691200e+02 -4.721002e+01\n7 9977     1.311200e+02 1.375600e+02\n10 9977     1.581600e+02 1.496600e+02\n1 9978     4.577300e+02 -4.864001e+01\n10 9978     2.423800e+02 1.838600e+02\n1 9979     4.577300e+02 -4.864001e+01\n10 9979     2.423800e+02 1.838600e+02\n1 9980     5.431600e+02 -4.948999e+01\n15 9980     4.478199e+02 2.293700e+02\n1 9981     4.864600e+02 -5.020001e+01\n15 9981     3.944200e+02 2.037700e+02\n1 9982     8.599399e+02 -5.031000e+01\n6 9982     4.199100e+02 2.594000e+02\n7 9982     4.315300e+02 2.872500e+02\n15 9982     7.880800e+02 3.748900e+02\n1 9983     2.028800e+02 -5.183002e+01\n2 9983     2.438101e+02 -2.109003e+01\n7 9983     -7.960022e+00 6.209003e+01\n9 9983     9.665002e+01 7.729999e+01\n1 9984     4.748500e+02 -5.438000e+01\n10 9984     2.603500e+02 1.849600e+02\n15 9984     3.842400e+02 1.933100e+02\n1 9985     2.169900e+02 -6.013000e+01\n2 9985     2.625601e+02 -1.870001e+01\n10 9985     7.900024e+00 7.215997e+01\n15 9985     8.321002e+01 5.710999e+01\n1 9986     3.845200e+02 -6.090997e+01\n10 9986     1.786700e+02 1.418500e+02\n15 9986     2.854600e+02 1.415600e+02\n1 9987     8.019900e+02 -6.103003e+01\n6 9987     3.651000e+02 2.123800e+02\n8 9987     4.335601e+02 5.600006e+00\n12 9987     4.524700e+02 2.222800e+02\n15 9987     7.230100e+02 3.336600e+02\n1 9988     1.775699e+02 -6.603003e+01\n2 9988     2.263900e+02 -5.115002e+01\n3 9988     1.373000e+02 -3.569900e+02\n10 9988     -3.346997e+01 4.809003e+01\n15 9988     3.584003e+01 2.866998e+01\n1 9989     7.628998e+01 -6.673999e+01\n8 9989     1.270200e+02 -1.452600e+02\n1 9990     3.323300e+02 -6.771997e+01\n2 9990     3.558500e+02 2.996002e+01\n6 9990     1.886700e+02 3.534003e+01\n8 9990     3.235900e+02 -2.394000e+01\n10 9990     1.304400e+02 1.133500e+02\n15 9990     2.281400e+02 1.075000e+02\n1 9991     2.701200e+02 -6.871002e+01\n2 9991     3.121801e+02 1.979980e+00\n1 9992     2.926400e+02 -7.007001e+01\n15 9992     1.813800e+02 8.409000e+01\n1 9993     2.591100e+02 -7.229999e+01\n15 9993     1.424399e+02 6.335999e+01\n1 9994     2.864500e+02 -7.303998e+01\n7 9994     7.521997e+01 8.145999e+01\n10 9994     8.577002e+01 8.865002e+01\n15 9994     1.756300e+02 7.720001e+01\n1 9995     2.996700e+02 -7.352002e+01\n2 9995     3.369600e+02 1.140002e+01\n1 9996     4.631100e+02 -7.446002e+01\n10 9996     2.574800e+02 1.599100e+02\n15 9996     3.807700e+02 1.635800e+02\n1 9997     2.965900e+02 -7.569000e+01\n2 9997     3.351700e+02 8.099976e+00\n6 9997     1.645400e+02 7.559998e+00\n1 9998     7.948101e+02 -7.537000e+01\n7 9998     3.858400e+02 2.397000e+02\n10 9998     5.323400e+02 2.848100e+02\n15 9998     7.212500e+02 3.133200e+02\n1 9999     7.948101e+02 -7.537000e+01\n7 9999     3.858400e+02 2.397000e+02\n1 10000     -1.611600e+02 -7.703998e+01\n7 10000     -3.926900e+02 -1.636900e+02\n8 10000     -1.849400e+02 -3.725100e+02\n1 10001     8.303900e+02 -7.702002e+01\n6 10001     4.043600e+02 2.165300e+02\n9 10001     2.844000e+02 1.383100e+02\n12 10001     4.896700e+02 2.265900e+02\n15 10001     7.647000e+02 3.288200e+02\n1 10002     3.783199e+02 -7.740002e+01\n7 10002     1.504900e+02 1.149400e+02\n10 10002     1.791200e+02 1.223000e+02\n15 10002     2.864100e+02 1.184300e+02\n1 10003     2.389900e+02 -7.823999e+01\n6 10003     1.164200e+02 -3.052002e+01\n7 10003     3.664001e+01 5.566998e+01\n8 10003     2.681000e+02 -6.814001e+01\n12 10003     1.306400e+02 1.777002e+01\n15 10003     1.202400e+02 4.672998e+01\n1 10004     4.583700e+02 -7.828003e+01\n15 10004     3.778600e+02 1.577500e+02\n1 10005     3.828900e+02 -7.846997e+01\n10 10005     1.845100e+02 1.231100e+02\n1 10006     -4.952100e+02 -8.444000e+01\n15 10006     -8.697000e+02 -3.833300e+02\n1 10007     1.236900e+02 -8.445001e+01\n7 10007     -6.477002e+01 -3.500000e+00\n1 10008     3.148999e+01 -8.495001e+01\n15 10008     -1.387400e+02 -7.271002e+01\n1 10009     2.590400e+02 -8.697998e+01\n6 10009     1.391800e+02 -2.709003e+01\n12 10009     1.545100e+02 2.012000e+01\n15 10009     1.492000e+02 4.612000e+01\n1 10010     8.121801e+02 -8.681000e+01\n6 10010     3.903900e+02 1.961400e+02\n10 10010     5.538800e+02 2.804500e+02\n12 10010     4.766801e+02 2.064500e+02\n15 10010     7.473500e+02 3.082500e+02\n1 10011     3.038400e+02 -8.735999e+01\n2 10011     3.481200e+02 -3.499756e-01\n6 10011     1.771800e+02 -4.998779e-02\n1 10012     3.877200e+02 -8.834003e+01\n7 10012     1.614500e+02 1.091200e+02\n10 10012     1.925000e+02 1.150000e+02\n15 10012     3.024900e+02 1.098200e+02\n1 10013     8.146400e+02 -8.840997e+01\n12 10013     4.801600e+02 2.070600e+02\n15 10013     7.512400e+02 3.075900e+02\n1 10014     4.833700e+02 -8.921997e+01\n10 10014     2.810300e+02 1.525700e+02\n15 10014     4.098800e+02 1.551700e+02\n1 10015     1.733800e+02 -8.956000e+01\n2 10015     2.345601e+02 -7.896997e+01\n3 10015     1.466500e+02 -3.832800e+02\n13 10015     4.261500e+02 -3.118700e+02\n15 10015     4.235999e+01 -2.510010e+00\n1 10016     4.450200e+02 -8.996997e+01\n10 10016     2.471801e+02 1.366700e+02\n15 10016     3.686000e+02 1.360100e+02\n1 10017     8.785100e+02 -9.084998e+01\n6 10017     4.605601e+02 2.358100e+02\n10 10017     6.221100e+02 3.020400e+02\n12 10017     5.435500e+02 2.459300e+02\n15 10017     8.290200e+02 3.365000e+02\n1 10018     8.163700e+02 -9.150000e+01\n6 10018     3.974300e+02 1.952500e+02\n10 10018     5.602900e+02 2.768800e+02\n12 10018     4.835200e+02 2.055400e+02\n15 10018     7.545500e+02 3.049000e+02\n1 10019     3.774399e+02 -9.246997e+01\n10 10019     1.843000e+02 1.069700e+02\n15 10019     2.931700e+02 9.979001e+01\n1 10020     5.640997e+01 -9.420001e+01\n7 10020     -1.251800e+02 -4.559998e+01\n1 10021     -4.800700e+02 -9.548999e+01\n15 10021     -8.411500e+02 -3.883100e+02\n1 10022     5.004999e+01 -9.633002e+01\n6 10022     -5.909003e+01 -1.800900e+02\n7 10022     -1.291900e+02 -5.046997e+01\n10 10022     -1.577800e+02 -4.101001e+01\n12 10022     -5.859998e+01 -1.264000e+02\n15 10022     -1.084100e+02 -7.663000e+01\n1 10023     2.342200e+02 -9.646997e+01\n2 10023     2.962200e+02 -4.579999e+01\n1 10024     4.009998e+01 -9.698999e+01\n6 10024     -6.667999e+01 -1.865300e+02\n15 10024     -1.201100e+02 -8.233002e+01\n1 10025     8.561600e+02 -9.696997e+01\n15 10025     8.053600e+02 3.182800e+02\n1 10026     8.087000e+02 -9.821997e+01\n10 10026     5.547800e+02 2.679700e+02\n15 10026     7.485400e+02 2.934500e+02\n1 10027     2.498199e+02 -9.909003e+01\n7 10027     5.383002e+01 4.190997e+01\n15 10027     1.429301e+02 2.647998e+01\n1 10028     8.660699e+02 -1.001100e+02\n3 10028     4.018300e+02 -2.537400e+02\n1 10029     3.072000e+02 -1.007700e+02\n2 10029     3.558700e+02 -1.210999e+01\n6 10029     1.866100e+02 -1.096002e+01\n7 10029     1.037000e+02 6.577002e+01\n10 10029     1.183900e+02 6.816998e+01\n12 10029     2.065601e+02 3.396002e+01\n1 10030     2.352900e+02 -1.016200e+02\n2 10030     3.003600e+02 -4.995001e+01\n6 10030     1.240000e+02 -5.659998e+01\n8 10030     2.735600e+02 -8.990002e+01\n13 10030     4.826400e+02 -2.986700e+02\n1 10031     4.112800e+02 -1.015800e+02\n15 10031     3.344399e+02 1.050300e+02\n1 10032     3.368500e+02 -1.022700e+02\n10 10032     1.483200e+02 7.932001e+01\n15 10032     2.498101e+02 6.757001e+01\n1 10033     2.910100e+02 -1.034700e+02\n2 10033     3.453700e+02 -2.197998e+01\n6 10033     1.740900e+02 -2.350000e+01\n15 10033     1.955800e+02 4.257001e+01\n1 10034     1.539600e+02 -1.045300e+02\n2 10034     2.372800e+02 -9.512000e+01\n3 10034     1.512900e+02 -3.981400e+02\n6 10034     5.466998e+01 -1.124500e+02\n7 10034     -2.731000e+01 -6.719971e+00\n10 10034     -4.025000e+01 -2.450012e+00\n12 10034     6.090002e+01 -6.279999e+01\n15 10034     2.803998e+01 -3.064001e+01\n1 10035     2.695800e+02 -1.057000e+02\n2 10035     3.299200e+02 -3.534003e+01\n15 10035     1.703101e+02 2.873999e+01\n1 10036     4.793800e+02 -1.064700e+02\n15 10036     4.136300e+02 1.326600e+02\n1 10037     3.539200e+02 -1.068600e+02\n10 10037     1.672200e+02 8.188000e+01\n15 10037     2.725200e+02 7.040002e+01\n1 10038     6.010699e+02 -1.083100e+02\n10 10038     3.896899e+02 1.791100e+02\n1 10039     2.456899e+02 -1.102800e+02\n15 10039     1.433600e+02 1.096002e+01\n1 10040     6.000200e+02 -1.111200e+02\n10 10040     3.892900e+02 1.763400e+02\n1 10041     3.732800e+02 -1.130900e+02\n15 10041     2.974600e+02 7.315002e+01\n1 10042     4.824600e+02 -1.137300e+02\n10 10042     2.891700e+02 1.269700e+02\n15 10042     4.200200e+02 1.250700e+02\n1 10043     3.756500e+02 -1.145200e+02\n10 10043     1.911500e+02 8.296997e+01\n1 10044     7.457001e+01 -1.180900e+02\n6 10044     -1.528003e+01 -1.817000e+02\n7 10044     -9.442999e+01 -5.716998e+01\n10 10044     -1.200700e+02 -5.256000e+01\n12 10044     -1.504999e+01 -1.303200e+02\n15 10044     -6.457001e+01 -8.990997e+01\n1 10045     2.761100e+02 -1.184500e+02\n2 10045     3.413000e+02 -4.509003e+01\n6 10045     1.685800e+02 -4.775000e+01\n7 10045     8.371002e+01 3.604999e+01\n10 10045     9.295001e+01 3.640997e+01\n12 10045     1.862100e+02 -2.729980e+00\n15 10045     1.843700e+02 1.613000e+01\n1 10046     8.405200e+02 -1.194600e+02\n2 10046     5.239900e+02 2.231000e+01\n1 10047     7.778800e+02 -1.204800e+02\n10 10047     5.318101e+02 2.332900e+02\n1 10048     4.671899e+02 -1.209900e+02\n15 10048     4.071500e+02 1.093100e+02\n1 10049     1.905100e+02 -1.231600e+02\n10 10049     6.869995e+00 -5.650024e+00\n15 10049     8.347998e+01 -3.340002e+01\n1 10050     6.124000e+02 -1.229600e+02\n10 10050     4.073300e+02 1.692500e+02\n15 10050     5.644200e+02 1.757600e+02\n1 10051     4.819301e+02 -1.239000e+02\n15 10051     4.239800e+02 1.128700e+02\n1 10052     2.914500e+02 -1.247400e+02\n3 10052     2.575300e+02 -3.469200e+02\n6 10052     1.842200e+02 -4.453998e+01\n8 10052     3.211900e+02 -8.531000e+01\n12 10052     2.033700e+02 -3.400269e-01\n15 10052     2.061200e+02 1.646002e+01\n1 10053     3.072700e+02 -1.246100e+02\n2 10053     3.671100e+02 -3.676001e+01\n3 10053     2.679301e+02 -3.395400e+02\n6 10053     1.977100e+02 -3.484998e+01\n8 10053     3.311100e+02 -7.917999e+01\n10 10053     1.277300e+02 4.359003e+01\n12 10053     2.183000e+02 8.770020e+00\n13 10053     5.443300e+02 -2.942600e+02\n15 10053     2.255100e+02 2.520001e+01\n1 10054     3.372800e+02 -1.245800e+02\n15 10054     2.607400e+02 4.065997e+01\n1 10055     4.784700e+02 -1.261200e+02\n15 10055     4.207100e+02 1.081400e+02\n1 10056     3.395699e+02 -1.262400e+02\n10 10056     1.602000e+02 5.612000e+01\n15 10056     2.645900e+02 3.997998e+01\n1 10057     3.069100e+02 -1.272100e+02\n3 10057     2.685699e+02 -3.423600e+02\n6 10057     1.978400e+02 -3.797998e+01\n10 10057     1.276200e+02 4.075000e+01\n12 10057     2.184600e+02 5.770020e+00\n15 10057     2.257200e+02 2.172998e+01\n1 10058     2.936801e+02 -1.278000e+02\n2 10058     3.577400e+02 -4.626001e+01\n6 10058     1.872300e+02 -4.652002e+01\n12 10058     2.069700e+02 -2.590027e+00\n15 10058     2.102500e+02 1.421997e+01\n1 10059     3.826100e+02 -1.278800e+02\n10 10059     2.031700e+02 7.184003e+01\n1 10060     3.331000e+02 -1.293400e+02\n3 10060     2.856899e+02 -3.334100e+02\n7 10060     1.349200e+02 5.110999e+01\n1 10061     6.093101e+02 -1.299400e+02\n10 10061     4.080200e+02 1.608800e+02\n1 10062     8.096100e+02 -1.305000e+02\n7 10062     4.193700e+02 2.021700e+02\n10 10062     5.681600e+02 2.360400e+02\n15 10062     7.648700e+02 2.556500e+02\n1 10063     7.789500e+02 -1.308500e+02\n6 10063     3.803800e+02 1.347500e+02\n1 10064     4.935100e+02 -1.336800e+02\n10 10064     3.072200e+02 1.115300e+02\n15 10064     4.417800e+02 1.063400e+02\n1 10065     7.800100e+02 -1.336500e+02\n10 10065     5.390800e+02 2.208100e+02\n1 10066     8.162200e+02 -1.336700e+02\n15 10066     7.745100e+02 2.551100e+02\n1 10067     2.358500e+02 -1.346400e+02\n15 10067     1.438900e+02 -2.414001e+01\n1 10068     8.209200e+02 -1.350800e+02\n15 10068     7.806801e+02 2.558700e+02\n1 10069     1.279200e+02 -1.354800e+02\n6 10069     4.696002e+01 -1.617300e+02\n13 10069     4.091801e+02 -3.641200e+02\n1 10070     4.405601e+02 -1.357300e+02\n7 10070     2.160300e+02 8.709000e+01\n1 10071     -3.606500e+02 -1.383800e+02\n15 10071     -6.467100e+02 -3.707100e+02\n1 10072     3.298101e+02 -1.404600e+02\n10 10072     1.554100e+02 3.676001e+01\n15 10072     2.590000e+02 1.728998e+01\n1 10073     2.357900e+02 -1.463000e+02\n10 10073     6.378003e+01 -9.250000e+00\n15 10073     1.510800e+02 -3.794000e+01\n1 10074     4.660601e+02 -1.470500e+02\n15 10074     4.183300e+02 7.741998e+01\n1 10075     6.714001e+01 -1.473800e+02\n3 10075     1.222100e+02 -4.787800e+02\n7 10075     -8.209003e+01 -8.440002e+01\n8 10075     1.840500e+02 -1.970900e+02\n10 10075     -1.116500e+02 -8.666998e+01\n15 10075     -5.521997e+01 -1.294200e+02\n1 10076     1.659000e+02 -1.475800e+02\n2 10076     2.772400e+02 -1.261900e+02\n1 10077     1.659000e+02 -1.475800e+02\n2 10077     2.772400e+02 -1.261900e+02\n3 10077     1.910100e+02 -4.270800e+02\n6 10077     9.485999e+01 -1.443000e+02\n7 10077     3.390015e+00 -3.865997e+01\n12 10077     1.013500e+02 -9.758002e+01\n1 10078     8.353400e+02 -1.479700e+02\n2 10078     5.350699e+02 -2.700012e+00\n6 10078     4.490500e+02 1.585200e+02\n15 10078     8.044399e+02 2.479100e+02\n1 10079     4.176100e+02 -1.484200e+02\n7 10079     2.034700e+02 6.721002e+01\n1 10080     5.526200e+02 -1.490200e+02\n10 10080     3.649000e+02 1.193600e+02\n1 10081     6.427002e+01 -1.508900e+02\n15 10081     -5.748999e+01 -1.354500e+02\n1 10082     4.867200e+02 -1.522700e+02\n10 10082     3.107400e+02 9.040002e+01\n15 10082     4.452100e+02 8.125000e+01\n1 10083     8.334900e+02 -1.522800e+02\n6 10083     4.496700e+02 1.535200e+02\n1 10084     4.270001e+01 -1.534200e+02\n15 10084     -8.792999e+01 -1.514100e+02\n1 10085     3.756000e+02 -1.551900e+02\n15 10085     3.198700e+02 2.291998e+01\n1 10086     2.766200e+02 -1.552800e+02\n15 10086     2.046600e+02 -2.796997e+01\n1 10087     3.468900e+02 -1.570400e+02\n7 10087     1.558800e+02 3.235999e+01\n1 10088     2.506600e+02 -1.621500e+02\n7 10088     8.506000e+01 -1.091998e+01\n1 10089     3.470000e+02 -1.624000e+02\n15 10089     2.907800e+02 -5.200195e-01\n1 10090     8.566700e+02 -1.626300e+02\n6 10090     4.786801e+02 1.597200e+02\n1 10091     8.406700e+02 -1.631800e+02\n6 10091     4.621700e+02 1.488000e+02\n12 10091     5.449800e+02 1.591000e+02\n15 10091     8.171300e+02 2.329500e+02\n1 10092     2.342400e+02 -1.655300e+02\n13 10092     5.109500e+02 -3.491500e+02\n1 10093     3.048900e+02 -1.656100e+02\n12 10093     2.422300e+02 -3.140997e+01\n1 10094     4.210601e+02 -1.659900e+02\n15 10094     3.777300e+02 3.231000e+01\n1 10095     1.902200e+02 -1.677900e+02\n10 10095     2.659003e+01 -5.257001e+01\n1 10096     3.582800e+02 -1.685400e+02\n10 10096     1.960400e+02 2.007001e+01\n1 10097     8.166200e+02 -1.690100e+02\n10 10097     5.900200e+02 2.009000e+02\n1 10098     3.049700e+02 -1.698500e+02\n10 10098     1.447800e+02 -3.679993e+00\n12 10098     2.457500e+02 -3.434003e+01\n15 10098     2.467400e+02 -3.046002e+01\n1 10099     4.467200e+02 -1.700700e+02\n12 10099     3.536400e+02 3.434003e+01\n15 10099     4.098500e+02 4.066998e+01\n1 10100     2.800000e+02 -1.724300e+02\n7 10100     1.138600e+02 -6.969971e+00\n1 10101     3.874900e+02 -1.735700e+02\n10 10101     2.269100e+02 2.739001e+01\n15 10101     3.446500e+02 6.630005e+00\n1 10102     9.810999e+01 -1.748400e+02\n7 10102     -3.959003e+01 -9.310999e+01\n13 10102     4.107900e+02 -4.040400e+02\n1 10103     1.647800e+02 -1.754100e+02\n15 10103     7.892999e+01 -1.115500e+02\n1 10104     5.409301e+02 -1.772400e+02\n15 10104     5.162400e+02 7.790997e+01\n1 10105     2.736100e+02 -1.799300e+02\n7 10105     1.116100e+02 -1.659998e+01\n1 10106     2.736100e+02 -1.799300e+02\n7 10106     1.116100e+02 -1.659998e+01\n1 10107     2.388101e+02 -1.819100e+02\n6 10107     1.824500e+02 -1.277500e+02\n1 10108     8.175500e+02 -1.819800e+02\n12 10108     5.325800e+02 1.278900e+02\n1 10109     8.175500e+02 -1.819800e+02\n12 10109     5.325800e+02 1.278900e+02\n1 10110     7.975500e+02 -1.856200e+02\n6 10110     4.311400e+02 9.920001e+01\n7 10110     4.302300e+02 1.530400e+02\n10 10110     5.769000e+02 1.766400e+02\n12 10110     5.145800e+02 1.108600e+02\n15 10110     7.763400e+02 1.849000e+02\n1 10111     4.766500e+02 -1.861300e+02\n15 10111     4.507100e+02 3.600000e+01\n1 10112     -2.135200e+02 -1.884000e+02\n7 10112     -3.713400e+02 -2.874000e+02\n15 10112     -4.192300e+02 -3.465000e+02\n1 10113     1.798101e+02 -1.892200e+02\n15 10113     1.054700e+02 -1.200900e+02\n1 10114     8.495900e+02 -1.926700e+02\n6 10114     4.878900e+02 1.293700e+02\n15 10114     8.415000e+02 2.030200e+02\n1 10115     8.714500e+02 -1.926400e+02\n6 10115     5.090500e+02 1.433700e+02\n12 10115     5.894600e+02 1.531000e+02\n15 10115     8.675601e+02 2.133500e+02\n1 10116     5.366700e+02 -1.942000e+02\n10 10116     3.722600e+02 6.821002e+01\n1 10117     8.052500e+02 -1.940800e+02\n6 10117     4.438300e+02 9.734998e+01\n1 10118     8.685400e+02 -1.941300e+02\n3 10118     4.561400e+02 -3.192500e+02\n10 10118     6.505200e+02 1.972700e+02\n12 10118     5.872300e+02 1.503000e+02\n15 10118     8.648600e+02 2.107000e+02\n1 10119     8.716000e+02 -1.959500e+02\n6 10119     5.120000e+02 1.410500e+02\n12 10119     5.922300e+02 1.509200e+02\n1 10120     8.716000e+02 -1.959500e+02\n6 10120     5.120000e+02 1.410500e+02\n10 10120     6.547300e+02 1.965900e+02\n12 10120     5.922300e+02 1.509200e+02\n15 10120     8.690900e+02 2.100100e+02\n1 10121     2.678101e+02 -1.966500e+02\n12 10121     2.283300e+02 -8.362000e+01\n15 10121     2.153500e+02 -8.266998e+01\n1 10122     2.412800e+02 -1.971200e+02\n6 10122     1.902300e+02 -1.428101e+02\n1 10123     2.412800e+02 -1.971200e+02\n6 10123     1.902300e+02 -1.428101e+02\n1 10124     6.942999e+01 -1.989300e+02\n4 10124     -4.470700e+02 -3.879400e+02\n6 10124     2.798999e+01 -2.683600e+02\n7 10124     -6.427002e+01 -1.330200e+02\n9 10124     8.402002e+01 -1.106800e+02\n10 10124     -9.196997e+01 -1.402900e+02\n12 10124     2.741998e+01 -2.210700e+02\n15 10124     -2.990002e+01 -1.931200e+02\n1 10125     1.564500e+02 -1.990300e+02\n7 10125     2.337000e+01 -8.571002e+01\n15 10125     8.398999e+01 -1.438900e+02\n1 10126     1.564500e+02 -1.990300e+02\n7 10126     2.337000e+01 -8.571002e+01\n15 10126     8.398999e+01 -1.438900e+02\n1 10127     7.930200e+02 -2.005500e+02\n15 10127     7.788199e+02 1.650100e+02\n1 10128     8.595300e+02 -2.004100e+02\n6 10128     5.023101e+02 1.291700e+02\n1 10129     -3.130600e+02 -2.012400e+02\n7 10129     -4.576700e+02 -3.516900e+02\n15 10129     -5.417000e+02 -4.217900e+02\n1 10130     8.813500e+02 -2.049000e+02\n2 10130     6.055400e+02 -1.162000e+01\n9 10130     3.813800e+02 9.264001e+01\n10 10130     6.674700e+02 1.918600e+02\n1 10131     8.813500e+02 -2.049000e+02\n2 10131     6.055400e+02 -1.162000e+01\n6 10131     5.249100e+02 1.405200e+02\n9 10131     3.813800e+02 9.264001e+01\n10 10131     6.674700e+02 1.918600e+02\n1 10132     3.903500e+02 -2.067500e+02\n10 10132     2.426700e+02 -5.020020e+00\n15 10132     3.640900e+02 -3.158002e+01\n1 10133     3.903500e+02 -2.067500e+02\n10 10133     2.426700e+02 -5.020020e+00\n15 10133     3.640900e+02 -3.158002e+01\n1 10134     8.514301e+02 -2.076900e+02\n2 10134     5.813101e+02 -3.678998e+01\n6 10134     4.982700e+02 1.165700e+02\n10 10134     6.393101e+02 1.766500e+02\n15 10134     8.510601e+02 1.861100e+02\n1 10135     2.232400e+02 -2.082600e+02\n15 10135     1.678900e+02 -1.198000e+02\n1 10136     3.587500e+02 -2.079600e+02\n15 10136     3.286700e+02 -4.906000e+01\n1 10137     5.153700e+02 -2.077400e+02\n10 10137     3.594500e+02 4.621997e+01\n1 10138     8.539399e+02 -2.094500e+02\n15 10138     8.549500e+02 1.854200e+02\n1 10139     8.798000e+02 -2.100300e+02\n6 10139     5.269500e+02 1.341400e+02\n8 10139     5.575300e+02 -4.494000e+01\n9 10139     3.836200e+02 8.897000e+01\n1 10140     3.987600e+02 -2.103400e+02\n10 10140     2.523600e+02 -5.630005e+00\n1 10141     8.078500e+02 -2.120200e+02\n6 10141     4.558800e+02 8.295001e+01\n10 10141     5.967200e+02 1.550700e+02\n1 10142     2.097800e+02 -2.128800e+02\n10 10142     6.808002e+01 -9.064001e+01\n15 10142     1.556600e+02 -1.330900e+02\n1 10143     1.901200e+02 -2.176400e+02\n6 10143     1.743900e+02 -1.877600e+02\n12 10143     1.786800e+02 -1.457600e+02\n1 10144     4.802400e+02 -2.181300e+02\n10 10144     3.315500e+02 2.103003e+01\n15 10144     4.717600e+02 -5.499878e-01\n1 10145     8.799900e+02 -2.184500e+02\n2 10145     6.115699e+02 -2.294000e+01\n6 10145     5.311000e+02 1.265300e+02\n9 10145     3.865100e+02 8.364001e+01\n12 10145     6.106100e+02 1.363700e+02\n1 10146     8.799900e+02 -2.184500e+02\n12 10146     6.106100e+02 1.363700e+02\n1 10147     8.589399e+02 -2.189200e+02\n2 10147     5.939600e+02 -3.931000e+01\n3 10147     4.628300e+02 -3.443800e+02\n6 10147     5.113199e+02 1.119600e+02\n9 10147     3.720100e+02 6.915997e+01\n15 10147     8.653600e+02 1.770600e+02\n1 10148     8.589399e+02 -2.189200e+02\n2 10148     5.939600e+02 -3.931000e+01\n3 10148     4.628300e+02 -3.443800e+02\n6 10148     5.113199e+02 1.119600e+02\n9 10148     3.720100e+02 6.915997e+01\n15 10148     8.653600e+02 1.770600e+02\n1 10149     9.628998e+01 -2.264700e+02\n15 10149     1.759003e+01 -2.119700e+02\n1 10150     1.843500e+02 -2.273800e+02\n7 10150     6.307001e+01 -9.614001e+01\n1 10151     -2.410500e+02 -2.303000e+02\n6 10151     -3.445900e+02 -5.999200e+02\n7 10151     -3.702100e+02 -3.389200e+02\n9 10151     -2.130100e+02 -4.162400e+02\n15 10151     -4.282900e+02 -4.157200e+02\n1 10152     1.780100e+02 -2.316800e+02\n15 10152     1.300600e+02 -1.717800e+02\n1 10153     3.569500e+02 -2.320900e+02\n10 10153     2.219900e+02 -4.497998e+01\n1 10154     -4.944500e+02 -2.352100e+02\n7 10154     -6.181400e+02 -4.870800e+02\n10 10154     -7.342500e+02 -4.731100e+02\n15 10154     -7.672200e+02 -5.799000e+02\n1 10155     2.824500e+02 -2.351500e+02\n6 10155     2.541300e+02 -1.476700e+02\n10 10155     1.507100e+02 -8.026001e+01\n12 10155     2.693800e+02 -1.091400e+02\n15 10155     2.539500e+02 -1.209300e+02\n1 10156     3.174600e+02 -2.356500e+02\n15 10156     2.955699e+02 -1.036300e+02\n1 10157     3.271801e+02 -2.371300e+02\n7 10157     1.784700e+02 -4.234998e+01\n15 10157     3.073700e+02 -1.004400e+02\n1 10158     5.230100e+02 -2.382400e+02\n15 10158     5.308600e+02 -2.419983e+00\n1 10159     8.259600e+02 -2.393200e+02\n2 10159     5.755400e+02 -8.103998e+01\n12 10159     5.714301e+02 8.291998e+01\n15 10159     8.358400e+02 1.364500e+02\n1 10160     8.259600e+02 -2.393200e+02\n2 10160     5.755400e+02 -8.103998e+01\n15 10160     8.358400e+02 1.364500e+02\n1 10161     8.254399e+02 -2.427100e+02\n8 10161     5.309100e+02 -9.862000e+01\n15 10161     8.366300e+02 1.323600e+02\n1 10162     -2.093100e+02 -2.447700e+02\n15 10162     -3.781200e+02 -4.152300e+02\n1 10163     3.703500e+02 -2.465500e+02\n6 10163     3.230200e+02 -1.076900e+02\n10 10163     2.420601e+02 -5.383002e+01\n12 10163     3.479500e+02 -7.228998e+01\n15 10163     3.630400e+02 -8.935999e+01\n1 10164     3.703500e+02 -2.465500e+02\n6 10164     3.230200e+02 -1.076900e+02\n10 10164     2.420601e+02 -5.383002e+01\n12 10164     3.479500e+02 -7.228998e+01\n15 10164     3.630400e+02 -8.935999e+01\n1 10165     4.162500e+02 -2.462400e+02\n10 10165     2.852400e+02 -3.389001e+01\n1 10166     4.116899e+02 -2.497700e+02\n15 10166     4.124200e+02 -7.216998e+01\n1 10167     4.116899e+02 -2.497700e+02\n15 10167     4.124200e+02 -7.216998e+01\n1 10168     3.612800e+02 -2.502800e+02\n7 10168     2.119600e+02 -3.819000e+01\n1 10169     2.366300e+02 -2.514100e+02\n9 10169     2.445100e+02 -3.600000e+01\n12 10169     2.445500e+02 -1.488800e+02\n15 10169     2.097700e+02 -1.645200e+02\n1 10170     4.127800e+02 -2.531800e+02\n6 10170     3.552300e+02 -8.997998e+01\n10 10170     2.855300e+02 -4.215997e+01\n15 10170     4.151500e+02 -7.551001e+01\n1 10171     3.853400e+02 -2.541000e+02\n10 10171     2.606400e+02 -5.473999e+01\n15 10171     3.848300e+02 -9.054999e+01\n1 10172     2.154800e+02 -2.545000e+02\n6 10172     2.168500e+02 -2.063800e+02\n7 10172     9.871997e+01 -1.063100e+02\n10 10172     9.290002e+01 -1.302000e+02\n12 10172     2.242500e+02 -1.677500e+02\n15 10172     1.853900e+02 -1.801400e+02\n1 10173     3.771500e+02 -2.571600e+02\n15 10173     3.771000e+02 -9.823999e+01\n1 10174     4.639399e+02 -2.578700e+02\n10 10174     3.362500e+02 -2.510999e+01\n15 10174     4.764800e+02 -5.496002e+01\n1 10175     8.422500e+02 -2.595400e+02\n8 10175     5.508900e+02 -9.909003e+01\n1 10176     -6.213900e+02 -2.601200e+02\n4 10176     -5.456000e+02 1.293900e+02\n1 10177     -1.319200e+02 -2.605500e+02\n15 10177     -2.677300e+02 -3.880900e+02\n1 10178     -1.417999e+01 -2.638600e+02\n9 10178     2.990002e+01 -2.520000e+02\n15 10178     -1.093500e+02 -3.229800e+02\n1 10179     5.076000e+02 -2.644100e+02\n10 10179     3.728500e+02 -1.531000e+01\n1 10180     -2.027200e+02 -2.674100e+02\n6 10180     -2.620100e+02 -5.994500e+02\n9 10180     -1.418200e+02 -4.116700e+02\n1 10181     -4.429999e+01 -2.674000e+02\n10 10181     -1.970500e+02 -2.698400e+02\n13 10181     2.768300e+02 -5.553700e+02\n1 10182     2.746400e+02 -2.703000e+02\n15 10182     2.648300e+02 -1.675900e+02\n1 10183     8.356801e+02 -2.726100e+02\n15 10183     8.635000e+02 1.026300e+02\n1 10184     8.596000e+02 -2.726000e+02\n9 10184     3.987800e+02 3.685999e+01\n10 10184     6.716400e+02 1.168900e+02\n1 10185     -2.083100e+02 -2.795200e+02\n7 10185     -3.082600e+02 -3.634400e+02\n9 10185     -1.336000e+02 -4.210400e+02\n12 10185     -2.628000e+02 -5.452600e+02\n15 10185     -3.555100e+02 -4.571899e+02\n1 10186     5.025699e+02 -2.799700e+02\n15 10186     5.223700e+02 -6.363000e+01\n1 10187     3.838700e+02 -2.805000e+02\n10 10187     2.690200e+02 -8.246002e+01\n1 10188     8.583600e+02 -2.867300e+02\n6 10188     5.484800e+02 5.401001e+01\n12 10188     6.269500e+02 6.378003e+01\n1 10189     8.583600e+02 -2.867300e+02\n6 10189     5.484800e+02 5.401001e+01\n1 10190     2.818400e+02 -2.886000e+02\n4 10190     -5.087700e+02 -5.833000e+02\n15 10190     2.801200e+02 -1.866200e+02\n1 10191     4.144399e+02 -2.901400e+02\n15 10191     4.339000e+02 -1.195200e+02\n1 10192     -2.273900e+02 -2.903200e+02\n7 10192     -3.178800e+02 -3.838000e+02\n10 10192     -3.884200e+02 -3.866200e+02\n15 10192     -3.724600e+02 -4.827400e+02\n1 10193     -2.620700e+02 -2.931400e+02\n7 10193     -3.493800e+02 -4.049800e+02\n15 10193     -4.163800e+02 -5.071801e+02\n1 10194     4.149399e+02 -2.929800e+02\n10 10194     3.014800e+02 -8.203003e+01\n15 10194     4.355601e+02 -1.226700e+02\n1 10195     8.625699e+02 -2.992800e+02\n6 10195     5.602300e+02 4.600000e+01\n7 10195     5.260400e+02 9.314001e+01\n9 10195     4.132300e+02 2.242999e+01\n10 10195     6.843500e+02 9.241998e+01\n1 10196     8.627400e+02 -3.031500e+02\n10 10196     6.857300e+02 8.853003e+01\n1 10197     -2.572300e+02 -3.055300e+02\n9 10197     -1.400900e+02 -4.658199e+02\n1 10198     3.263500e+02 -3.061900e+02\n15 10198     3.386100e+02 -1.850600e+02\n1 10199     8.681600e+02 -3.090000e+02\n2 10199     6.500601e+02 -1.009400e+02\n10 10199     6.932200e+02 8.528003e+01\n1 10200     8.715100e+02 -3.095800e+02\n6 10200     5.735100e+02 4.322998e+01\n9 10200     4.238500e+02 2.223999e+01\n1 10201     3.859700e+02 -3.130400e+02\n15 10201     4.095500e+02 -1.626700e+02\n1 10202     3.567700e+02 -3.161300e+02\n10 10202     2.524600e+02 -1.311400e+02\n15 10202     3.775699e+02 -1.816200e+02\n1 10203     2.879399e+02 -3.195000e+02\n7 10203     1.765400e+02 -1.333700e+02\n1 10204     2.547400e+02 -3.219800e+02\n6 10204     2.631900e+02 -2.605400e+02\n7 10204     1.483199e+02 -1.522500e+02\n10 10204     1.532900e+02 -1.837000e+02\n1 10205     1.985800e+02 -3.227600e+02\n7 10205     9.919000e+01 -1.810200e+02\n1 10206     3.953900e+02 -3.228600e+02\n7 10206     2.557700e+02 -9.056000e+01\n15 10206     4.239399e+02 -1.697800e+02\n1 10207     3.447600e+02 -3.305700e+02\n15 10207     3.690800e+02 -2.058700e+02\n1 10208     3.447600e+02 -3.305700e+02\n10 10208     2.451200e+02 -1.517700e+02\n1 10209     3.419500e+02 -3.319900e+02\n15 10209     3.663500e+02 -2.089500e+02\n1 10210     1.590900e+02 -3.370200e+02\n10 10210     5.726001e+01 -2.443100e+02\n15 10210     1.474500e+02 -3.157300e+02\n1 10211     7.976600e+02 -3.373600e+02\n15 10211     8.574301e+02 1.003998e+01\n1 10212     7.742700e+02 -3.382000e+02\n10 10212     6.239500e+02 1.977002e+01\n15 10212     8.334399e+02 -2.270020e+00\n1 10213     -4.035900e+02 -3.395800e+02\n6 10213     -3.762000e+02 -8.437100e+02\n1 10214     7.459200e+02 -3.398700e+02\n15 10214     8.038199e+02 -1.769000e+01\n1 10215     3.262500e+02 -3.568900e+02\n15 10215     3.575000e+02 -2.477000e+02\n1 10216     8.020900e+02 -3.670100e+02\n10 10216     6.614800e+02 3.070007e+00\n1 10217     3.770200e+02 -3.740300e+02\n15 10217     4.225000e+02 -2.426800e+02\n1 10218     -6.719400e+02 -3.817300e+02\n4 10218     -6.586200e+02 1.514000e+02\n1 10219     2.802200e+02 -3.844200e+02\n7 10219     1.887100e+02 -1.970700e+02\n1 10220     -9.514001e+01 -3.982900e+02\n6 10220     -1.731000e+01 -6.208199e+02\n1 10221     5.513199e+02 -4.095000e+02\n15 10221     6.315800e+02 -1.964800e+02\n1 10222     7.844000e+02 -4.211400e+02\n10 10222     6.698199e+02 -5.565997e+01\n1 10223     7.817600e+02 -4.219200e+02\n10 10223     6.682000e+02 -5.773999e+01\n1 10224     7.817600e+02 -4.219200e+02\n10 10224     6.682000e+02 -5.773999e+01\n1 10225     7.606300e+02 -4.310500e+02\n15 10225     8.695300e+02 -1.152700e+02\n1 10226     -6.715997e+01 -4.365200e+02\n7 10226     -8.252002e+01 -4.213400e+02\n15 10226     -7.810999e+01 -5.692400e+02\n1 10227     2.229900e+02 -4.479399e+02\n6 10227     2.965500e+02 -4.163500e+02\n1 10228     9.237000e+01 -4.613800e+02\n15 10228     1.332700e+02 -5.054000e+02\n1 10229     5.081899e+02 -4.680300e+02\n10 10229     4.462800e+02 -2.187900e+02\n15 10229     6.157400e+02 -2.872300e+02\n1 10230     -2.405800e+02 -4.701801e+02\n10 10230     -3.029300e+02 -5.858000e+02\n1 10231     6.128700e+02 -4.713800e+02\n10 10231     5.420000e+02 -1.771200e+02\n1 10232     -5.643400e+02 -4.729700e+02\n4 10232     -7.409000e+02 5.394000e+01\n1 10233     -2.315900e+02 -4.765300e+02\n7 10233     -2.016600e+02 -5.461500e+02\n10 10233     -2.891600e+02 -5.883600e+02\n1 10234     -2.315900e+02 -4.765300e+02\n7 10234     -2.016600e+02 -5.461500e+02\n10 10234     -2.891600e+02 -5.883600e+02\n1 10235     9.403998e+01 -4.775200e+02\n10 10235     5.340997e+01 -4.203101e+02\n15 10235     1.443800e+02 -5.245500e+02\n1 10236     7.651300e+02 -4.793800e+02\n10 10236     6.797000e+02 -1.196200e+02\n1 10237     7.206801e+02 -4.799100e+02\n15 10237     8.539800e+02 -1.911100e+02\n1 10238     1.074100e+02 -4.814500e+02\n10 10238     6.883002e+01 -4.176899e+02\n15 10238     1.625500e+02 -5.215300e+02\n1 10239     5.852200e+02 -4.878700e+02\n6 10239     5.462000e+02 -2.381000e+02\n1 10240     -8.947998e+01 -4.930100e+02\n7 10240     -6.570001e+01 -4.803199e+02\n1 10241     -6.535200e+02 -4.939700e+02\n4 10241     -7.697700e+02 1.218600e+02\n1 10242     7.103000e+02 -4.944800e+02\n15 10242     8.510699e+02 -2.133700e+02\n1 10243     2.707400e+02 -5.006801e+02\n7 10243     2.301000e+02 -3.008300e+02\n10 10243     2.402700e+02 -3.583600e+02\n12 10243     3.879100e+02 -4.059301e+02\n1 10244     1.655500e+02 -5.255000e+02\n10 10244     1.476600e+02 -4.338400e+02\n15 10244     2.564500e+02 -5.415699e+02\n1 10245     8.608002e+01 -5.258900e+02\n7 10245     9.748999e+01 -4.143200e+02\n10 10245     6.881000e+01 -4.741801e+02\n1 10246     -1.638000e+02 -5.277300e+02\n4 10246     -7.641000e+02 -2.740200e+02\n6 10246     6.515997e+01 -7.828800e+02\n7 10246     -1.086400e+02 -5.504100e+02\n9 10246     1.639700e+02 -5.153400e+02\n10 10246     -1.871300e+02 -6.054100e+02\n1 10247     1.887700e+02 -5.504500e+02\n10 10247     1.834700e+02 -4.483400e+02\n1 10248     1.578700e+02 -5.551801e+02\n10 10248     1.548400e+02 -4.685200e+02\n1 10249     7.734399e+02 -5.585400e+02\n12 10249     7.668500e+02 -1.749400e+02\n1 10250     7.377600e+02 -5.638900e+02\n12 10250     7.503500e+02 -1.971400e+02\n1 10251     6.855601e+02 -5.671600e+02\n10 10251     6.507700e+02 -2.367400e+02\n15 10251     8.645500e+02 -3.085300e+02\n1 10252     2.429900e+02 -5.740800e+02\n10 10252     2.478900e+02 -4.462600e+02\n1 10253     9.856000e+01 -5.853199e+02\n2 10253     5.177200e+02 -6.047900e+02\n7 10253     1.427000e+02 -4.551500e+02\n9 10253     3.484700e+02 -3.886400e+02\n10 10253     1.125500e+02 -5.284301e+02\n1 10254     5.931801e+02 5.849000e+02\n5 10254     5.743500e+02 -2.856000e+01\n6 10254     -3.111900e+02 6.993800e+02\n11 10254     2.939301e+02 -1.610700e+02\n1 10255     4.835601e+02 5.839600e+02\n5 10255     4.829800e+02 -5.345001e+01\n14 10255     3.870000e+02 -1.405400e+02\n1 10256     1.285999e+01 5.821700e+02\n2 10256     -6.419200e+02 2.459500e+02\n8 10256     -4.472700e+02 1.800100e+02\n12 10256     -7.054500e+02 4.434100e+02\n1 10257     5.874200e+02 5.795400e+02\n2 10257     -1.499800e+02 3.776800e+02\n5 10257     5.706600e+02 -3.489001e+01\n6 10257     -3.143500e+02 6.909100e+02\n8 10257     -4.372998e+01 2.944200e+02\n9 10257     -2.834900e+02 3.984800e+02\n11 10257     2.910100e+02 -1.661500e+02\n14 10257     4.724200e+02 -1.206500e+02\n1 10258     6.389000e+02 5.771800e+02\n6 10258     -2.684300e+02 7.089300e+02\n1 10259     6.389000e+02 5.771800e+02\n6 10259     -2.684300e+02 7.089300e+02\n13 10259     3.547000e+02 2.788600e+02\n14 10259     5.139800e+02 -1.106200e+02\n1 10260     8.240100e+02 5.742100e+02\n14 10260     6.562000e+02 -7.376001e+01\n1 10261     8.063500e+02 5.723700e+02\n2 10261     -7.700195e-01 4.101100e+02\n6 10261     -1.291300e+02 7.637400e+02\n8 10261     8.008002e+01 3.227200e+02\n1 10262     6.287700e+02 5.701700e+02\n14 10262     5.081400e+02 -1.193700e+02\n1 10263     8.184000e+02 5.695200e+02\n2 10263     7.679993e+00 4.094100e+02\n14 10263     6.537500e+02 -7.859003e+01\n1 10264     6.090500e+02 5.686200e+02\n5 10264     5.909900e+02 -3.983002e+01\n6 10264     -2.904800e+02 6.879800e+02\n1 10265     6.090500e+02 5.686200e+02\n5 10265     5.909900e+02 -3.983002e+01\n6 10265     -2.904800e+02 6.879800e+02\n8 10265     -2.758002e+01 2.903900e+02\n9 10265     -2.668300e+02 3.940200e+02\n1 10266     7.953600e+02 5.681500e+02\n14 10266     6.368700e+02 -8.412000e+01\n1 10267     -1.778800e+02 5.677600e+02\n5 10267     -1.334200e+02 -2.205400e+02\n11 10267     -3.285700e+02 -3.273300e+02\n13 10267     -2.414700e+02 8.529001e+01\n14 10267     -2.157300e+02 -3.166300e+02\n1 10268     -5.928003e+01 5.681700e+02\n11 10268     -2.260300e+02 -3.049600e+02\n14 10268     -9.726001e+01 -2.875500e+02\n1 10269     4.308300e+02 5.660000e+02\n9 10269     -3.788600e+02 3.550300e+02\n11 10269     1.758600e+02 -2.078800e+02\n14 10269     3.470300e+02 -1.698000e+02\n1 10270     4.308300e+02 5.660000e+02\n6 10270     -4.512800e+02 6.113800e+02\n8 10270     -1.374700e+02 2.555900e+02\n9 10270     -3.788600e+02 3.550300e+02\n11 10270     1.758600e+02 -2.078800e+02\n14 10270     3.470300e+02 -1.698000e+02\n1 10271     5.766100e+02 5.647300e+02\n5 10271     5.663800e+02 -4.920001e+01\n6 10271     -3.168300e+02 6.717900e+02\n14 10271     4.676100e+02 -1.358800e+02\n1 10272     5.766100e+02 5.647300e+02\n5 10272     5.663800e+02 -4.920001e+01\n6 10272     -3.168300e+02 6.717900e+02\n14 10272     4.676100e+02 -1.358800e+02\n1 10273     -6.913000e+01 5.632400e+02\n8 10273     -5.123800e+02 1.429600e+02\n13 10273     -1.526600e+02 1.067600e+02\n14 10273     -1.061900e+02 -2.936900e+02\n1 10274     6.988199e+02 5.619000e+02\n2 10274     -6.728003e+01 3.820000e+02\n6 10274     -2.116600e+02 7.151600e+02\n11 10274     3.775400e+02 -1.568000e+02\n1 10275     8.301600e+02 5.610600e+02\n14 10275     6.648800e+02 -8.335999e+01\n1 10276     4.239301e+02 5.484700e+02\n2 10276     -2.638600e+02 3.123600e+02\n4 10276     4.148999e+01 -3.848200e+02\n6 10276     -4.502200e+02 5.877600e+02\n9 10276     -3.782600e+02 3.368800e+02\n11 10276     1.744800e+02 -2.214400e+02\n12 10276     -2.762300e+02 5.712700e+02\n13 10276     2.157300e+02 2.125600e+02\n1 10277     7.665997e+01 5.464800e+02\n2 10277     -5.695400e+02 2.211800e+02\n7 10277     -5.098600e+02 5.036000e+02\n11 10277     -1.068900e+02 -2.963600e+02\n1 10278     4.707000e+02 5.395900e+02\n2 10278     -2.231100e+02 3.152600e+02\n5 10278     4.819399e+02 -9.797998e+01\n9 10278     -3.432400e+02 3.409900e+02\n1 10279     -2.205000e+02 5.380100e+02\n13 10279     -2.725700e+02 4.937000e+01\n14 10279     -2.571000e+02 -3.587600e+02\n1 10280     3.975300e+02 5.327800e+02\n2 10280     -2.807300e+02 2.897300e+02\n5 10280     4.183500e+02 -1.219800e+02\n6 10280     -4.691500e+02 5.583300e+02\n8 10280     -1.516500e+02 2.222200e+02\n11 10280     1.575700e+02 -2.407900e+02\n12 10280     -2.947800e+02 5.409700e+02\n13 10280     2.002700e+02 1.924500e+02\n14 10280     3.263900e+02 -2.087800e+02\n1 10281     -1.733300e+02 5.314300e+02\n7 10281     -7.535700e+02 3.970800e+02\n11 10281     -3.202700e+02 -3.575400e+02\n13 10281     -2.325000e+02 5.526001e+01\n14 10281     -2.079100e+02 -3.542900e+02\n1 10282     -1.733300e+02 5.314300e+02\n7 10282     -7.535700e+02 3.970800e+02\n14 10282     -2.079100e+02 -3.542900e+02\n1 10283     7.811100e+02 5.298700e+02\n2 10283     -3.570007e+00 3.685300e+02\n3 10283     -1.480900e+02 3.364001e+01\n6 10283     -1.313700e+02 7.128900e+02\n11 10283     4.457500e+02 -1.631100e+02\n14 10283     6.377800e+02 -1.190800e+02\n1 10284     5.583900e+02 5.287200e+02\n3 10284     -2.925700e+02 -1.027002e+01\n11 10284     2.829800e+02 -2.098900e+02\n1 10285     8.714301e+02 5.260100e+02\n2 10285     5.323999e+01 3.806600e+02\n5 10285     8.124500e+02 -2.212000e+01\n6 10285     -6.015997e+01 7.400800e+02\n11 10285     5.091400e+02 -1.490600e+02\n1 10286     2.954700e+02 5.253800e+02\n2 10286     -3.646000e+02 2.565900e+02\n5 10286     3.282100e+02 -1.537600e+02\n6 10286     -5.671700e+02 5.013200e+02\n7 10286     -3.034200e+02 5.567000e+02\n12 10286     -3.887300e+02 4.941400e+02\n1 10287     -3.823999e+01 5.198800e+02\n7 10287     -6.111800e+02 4.355500e+02\n11 10287     -2.004700e+02 -3.416500e+02\n12 10287     -7.355400e+02 3.463900e+02\n13 10287     -1.215400e+02 7.844000e+01\n14 10287     -7.106000e+01 -3.321600e+02\n1 10288     8.677900e+02 5.190400e+02\n2 10288     5.328998e+01 3.730900e+02\n3 10288     -9.434003e+01 3.759998e+01\n5 10288     8.119100e+02 -2.921997e+01\n6 10288     -5.990997e+01 7.309500e+02\n8 10288     1.254000e+02 2.938700e+02\n9 10288     -1.104600e+02 4.001800e+02\n11 10288     5.092100e+02 -1.544100e+02\n13 10288     5.115900e+02 2.830100e+02\n14 10288     7.057000e+02 -1.103300e+02\n1 10289     3.628300e+02 5.149800e+02\n2 10289     -3.046900e+02 2.621000e+02\n5 10289     3.909000e+02 -1.477800e+02\n6 10289     -4.950100e+02 5.211800e+02\n7 10289     -2.407200e+02 5.685700e+02\n8 10289     -1.708300e+02 2.001800e+02\n9 10289     -4.107200e+02 2.921100e+02\n12 10289     -3.197500e+02 5.087200e+02\n14 10289     3.000000e+02 -2.342500e+02\n1 10290     7.335800e+02 5.117100e+02\n11 10290     4.168199e+02 -1.859000e+02\n13 10290     4.295200e+02 2.519500e+02\n14 10290     6.062300e+02 -1.453200e+02\n1 10291     6.395100e+02 5.107000e+02\n6 10291     -2.405400e+02 6.390700e+02\n1 10292     2.016400e+02 5.095500e+02\n3 10292     -5.711100e+02 -1.160100e+02\n4 10292     3.580017e+00 -2.622900e+02\n5 10292     2.443700e+02 -1.924200e+02\n7 10292     -3.811800e+02 5.103100e+02\n13 10292     6.315002e+01 1.282700e+02\n14 10292     1.572000e+02 -2.808000e+02\n1 10293     7.222500e+02 5.086400e+02\n2 10293     -3.483002e+01 3.389200e+02\n9 10293     -1.846200e+02 3.672400e+02\n11 10293     4.111600e+02 -1.897100e+02\n13 10293     4.243500e+02 2.476900e+02\n14 10293     5.985100e+02 -1.505400e+02\n1 10294     8.770400e+02 5.083600e+02\n14 10294     7.159800e+02 -1.166900e+02\n1 10295     4.064001e+01 5.049000e+02\n8 10295     -4.075400e+02 1.146400e+02\n1 10296     8.532000e+02 5.019600e+02\n13 10296     5.071100e+02 2.692000e+02\n14 10296     7.010100e+02 -1.268800e+02\n1 10297     3.781000e+01 5.001500e+02\n7 10297     -5.297300e+02 4.431200e+02\n8 10297     -4.090600e+02 1.090500e+02\n10 10297     -5.149300e+02 6.051500e+02\n11 10297     -1.315200e+02 -3.429000e+02\n12 10297     -6.422900e+02 3.575900e+02\n14 10297     5.710022e+00 -3.329100e+02\n1 10298     4.311700e+02 4.999800e+02\n5 10298     4.544399e+02 -1.457500e+02\n6 10298     -4.227600e+02 5.350400e+02\n8 10298     -1.220200e+02 2.021800e+02\n12 10298     -2.504000e+02 5.186000e+02\n1 10299     2.692400e+02 4.909900e+02\n2 10299     -3.773100e+02 2.109800e+02\n7 10299     -3.142200e+02 5.151500e+02\n1 10300     9.942999e+01 4.885800e+02\n7 10300     -4.672500e+02 4.541000e+02\n1 10301     1.016400e+02 4.853200e+02\n7 10301     -4.638200e+02 4.516500e+02\n11 10301     -7.464001e+01 -3.424400e+02\n13 10301     -7.469971e+00 8.403000e+01\n14 10301     6.884003e+01 -3.315900e+02\n1 10302     3.406899e+02 4.802000e+02\n5 10302     3.776600e+02 -1.869500e+02\n7 10302     -2.480600e+02 5.290900e+02\n11 10302     1.245300e+02 -2.950700e+02\n13 10302     1.698800e+02 1.383800e+02\n14 10302     2.881100e+02 -2.733900e+02\n1 10303     1.065200e+02 4.701000e+02\n7 10303     -4.536800e+02 4.384000e+02\n10 10303     -4.239500e+02 5.954500e+02\n12 10303     -5.556600e+02 3.534300e+02\n1 10304     -1.774500e+02 4.648900e+02\n11 10304     -3.155000e+02 -4.171600e+02\n13 10304     -2.265500e+02 -2.450012e+00\n14 10304     -2.058600e+02 -4.272400e+02\n1 10305     4.428003e+01 4.626800e+02\n2 10305     -5.787100e+02 1.104700e+02\n5 10305     1.010200e+02 -2.797000e+02\n7 10305     -5.099100e+02 4.082500e+02\n8 10305     -3.939900e+02 7.526001e+01\n10 10305     -4.918500e+02 5.628600e+02\n11 10305     -1.194000e+02 -3.739300e+02\n12 10305     -6.183300e+02 3.165800e+02\n13 10305     -4.781000e+01 5.114001e+01\n14 10305     1.778998e+01 -3.702500e+02\n1 10306     -1.745700e+02 4.620900e+02\n7 10306     -7.263000e+02 3.241100e+02\n11 10306     -3.132700e+02 -4.195800e+02\n1 10307     5.430800e+02 4.522800e+02\n7 10307     -7.039001e+01 5.677100e+02\n1 10308     -4.658002e+01 4.436000e+02\n7 10308     -5.899600e+02 3.548000e+02\n8 10308     -4.665700e+02 3.073001e+01\n10 10308     -5.881700e+02 5.058000e+02\n11 10308     -1.956300e+02 -4.099600e+02\n12 10308     -7.108000e+02 2.502600e+02\n13 10308     -1.163000e+02 1.221997e+01\n15 10308     -5.935100e+02 5.491000e+02\n1 10309     -4.658002e+01 4.436000e+02\n7 10309     -5.899600e+02 3.548000e+02\n8 10309     -4.665700e+02 3.073001e+01\n10 10309     -5.881700e+02 5.058000e+02\n1 10310     6.148101e+02 4.415100e+02\n7 10310     -1.060999e+01 5.802200e+02\n1 10311     -6.200000e+01 4.387300e+02\n7 10311     -6.031700e+02 3.444100e+02\n8 10311     -4.781300e+02 1.898999e+01\n13 10311     -1.279800e+02 4.270020e+00\n15 10311     -6.110800e+02 5.342100e+02\n1 10312     7.659500e+02 4.368900e+02\n5 10312     7.542400e+02 -1.232100e+02\n6 10312     -1.057000e+02 6.115100e+02\n8 10312     9.296997e+01 2.202400e+02\n9 10312     -1.394200e+02 3.188600e+02\n11 10312     4.651400e+02 -2.334100e+02\n14 10312     6.547800e+02 -2.035500e+02\n1 10313     -8.917999e+01 4.354400e+02\n10 10313     -6.349200e+02 4.798500e+02\n1 10314     4.591998e+01 4.309300e+02\n7 10314     -4.963900e+02 3.774600e+02\n11 10314     -1.124600e+02 -4.006500e+02\n1 10315     7.595900e+02 4.310400e+02\n6 10315     -1.071900e+02 6.047900e+02\n1 10316     7.595900e+02 4.310400e+02\n6 10316     -1.071900e+02 6.047900e+02\n1 10317     -2.123999e+01 4.248200e+02\n2 10317     -6.374200e+02 6.065002e+01\n7 10317     -5.578200e+02 3.461700e+02\n8 10317     -4.400100e+02 2.041000e+01\n15 10317     -5.499300e+02 5.352400e+02\n1 10318     2.295000e+02 4.244100e+02\n2 10318     -3.933300e+02 1.238600e+02\n1 10319     2.295000e+02 4.244100e+02\n2 10319     -3.933300e+02 1.238600e+02\n7 10319     -3.265100e+02 4.378500e+02\n1 10320     5.075000e+01 4.242600e+02\n7 10320     -4.891100e+02 3.728000e+02\n8 10320     -3.805200e+02 4.014001e+01\n11 10320     -1.070300e+02 -4.059700e+02\n1 10321     3.595100e+02 4.233100e+02\n2 10321     -2.810100e+02 1.622600e+02\n5 10321     4.050200e+02 -2.393900e+02\n6 10321     -4.591100e+02 4.122600e+02\n7 10321     -2.128900e+02 4.820400e+02\n9 10321     -3.856600e+02 2.047100e+02\n13 10321     1.938000e+02 9.804001e+01\n14 10321     3.170200e+02 -3.243700e+02\n1 10322     4.644399e+02 4.209800e+02\n7 10322     -1.240800e+02 5.149600e+02\n12 10322     -1.885100e+02 4.494900e+02\n1 10323     5.651300e+02 4.202000e+02\n13 10323     3.358199e+02 1.446400e+02\n14 10323     4.926300e+02 -2.724500e+02\n1 10324     6.078199e+02 4.192100e+02\n7 10324     -8.659973e+00 5.584800e+02\n12 10324     -6.332001e+01 5.025500e+02\n1 10325     5.485999e+01 4.172600e+02\n5 10325     1.167100e+02 -3.257100e+02\n7 10325     -4.830300e+02 3.669300e+02\n10 10325     -4.610700e+02 5.142300e+02\n13 10325     -3.250000e+01 1.550000e+01\n14 10325     3.471997e+01 -4.152900e+02\n1 10326     1.720500e+02 4.147300e+02\n5 10326     2.312400e+02 -2.976200e+02\n7 10326     -3.741600e+02 4.082300e+02\n10 10326     -3.305200e+02 5.564800e+02\n11 10326     -5.200195e-01 -3.879200e+02\n13 10326     5.750000e+01 4.378998e+01\n1 10327     2.437400e+02 4.144100e+02\n2 10327     -3.779800e+02 1.173000e+02\n5 10327     2.993600e+02 -2.784500e+02\n7 10327     -3.100900e+02 4.339000e+02\n10 10327     -2.529200e+02 5.842100e+02\n14 10327     2.138400e+02 -3.653800e+02\n1 10328     -2.141000e+02 4.127600e+02\n7 10328     -7.473500e+02 2.570400e+02\n10 10328     -7.753000e+02 4.033100e+02\n1 10329     2.465000e+02 4.124200e+02\n2 10329     -3.748800e+02 1.155200e+02\n5 10329     3.021801e+02 -2.805400e+02\n7 10329     -3.068900e+02 4.325200e+02\n8 10329     -2.283300e+02 8.226001e+01\n9 10329     -4.644000e+02 1.608400e+02\n10 10329     -2.493200e+02 5.811400e+02\n12 10329     -3.893700e+02 3.476800e+02\n1 10330     3.107700e+02 4.119900e+02\n7 10330     -2.514800e+02 4.561900e+02\n1 10331     -2.269400e+02 4.112800e+02\n7 10331     -7.606400e+02 2.510200e+02\n10 10331     -7.901700e+02 3.971800e+02\n13 10331     -2.601200e+02 -6.252002e+01\n14 10331     -2.532200e+02 -4.998300e+02\n1 10332     3.374700e+02 4.111600e+02\n7 10332     -2.276100e+02 4.631600e+02\n13 10332     1.800800e+02 8.310001e+01\n14 10332     2.999700e+02 -3.422800e+02\n1 10333     5.604600e+02 4.084800e+02\n2 10333     -1.241500e+02 2.052300e+02\n4 10333     -2.700000e+01 -4.721899e+02\n5 10333     5.847500e+02 -1.977200e+02\n8 10333     -2.096002e+01 1.573800e+02\n1 10334     2.449700e+02 4.065400e+02\n7 10334     -3.061400e+02 4.266000e+02\n10 10334     -2.484000e+02 5.754400e+02\n14 10334     2.169100e+02 -3.729800e+02\n1 10335     -4.906000e+01 4.038200e+02\n14 10335     -6.675000e+01 -4.587000e+02\n1 10336     2.353600e+02 4.035200e+02\n5 10336     2.934700e+02 -2.924600e+02\n1 10337     2.353600e+02 4.035200e+02\n5 10337     2.934700e+02 -2.924600e+02\n6 10337     -5.742800e+02 3.242600e+02\n7 10337     -3.133900e+02 4.202800e+02\n9 10337     -4.696200e+02 1.479800e+02\n1 10338     1.449800e+02 4.020800e+02\n7 10338     -3.949100e+02 3.858700e+02\n1 10339     6.224600e+02 4.019200e+02\n2 10339     -7.172998e+01 2.124100e+02\n6 10339     -2.099800e+02 5.134500e+02\n7 10339     8.659973e+00 5.472000e+02\n11 10339     3.687800e+02 -2.928700e+02\n1 10340     6.224600e+02 4.019200e+02\n2 10340     -7.172998e+01 2.124100e+02\n6 10340     -2.099800e+02 5.134500e+02\n7 10340     8.659973e+00 5.472000e+02\n9 10340     -2.104200e+02 2.567400e+02\n11 10340     3.687800e+02 -2.928700e+02\n1 10341     4.951899e+02 3.999900e+02\n2 10341     -1.650100e+02 1.767100e+02\n5 10341     5.322400e+02 -2.267500e+02\n12 10341     -1.525900e+02 4.395700e+02\n14 10341     4.416600e+02 -3.092600e+02\n1 10342     6.287200e+02 3.984900e+02\n2 10342     -6.567999e+01 2.112300e+02\n6 10342     -2.027600e+02 5.133600e+02\n7 10342     1.477002e+01 5.463700e+02\n9 10342     -2.057000e+02 2.555200e+02\n12 10342     -3.728998e+01 4.892500e+02\n1 10343     6.287200e+02 3.984900e+02\n6 10343     -2.027600e+02 5.133600e+02\n7 10343     1.477002e+01 5.463700e+02\n9 10343     -2.057000e+02 2.555200e+02\n12 10343     -3.728998e+01 4.892500e+02\n1 10344     7.608600e+02 3.944500e+02\n6 10344     -9.167001e+01 5.661900e+02\n7 10344     1.157300e+02 5.817700e+02\n14 10344     6.641600e+02 -2.419100e+02\n1 10345     5.981801e+02 3.922900e+02\n3 10345     -2.264400e+02 -1.344000e+02\n1 10346     6.433700e+02 3.911100e+02\n7 10346     2.803003e+01 5.441100e+02\n11 10346     3.877200e+02 -2.964500e+02\n13 10346     3.985500e+02 1.447200e+02\n14 10346     5.709399e+02 -2.749100e+02\n1 10347     6.504900e+02 3.846500e+02\n8 10347     4.270001e+01 1.577900e+02\n1 10348     6.685300e+02 3.843100e+02\n7 10348     4.990002e+01 5.459100e+02\n14 10348     5.925601e+02 -2.761900e+02\n1 10349     4.908000e+02 3.833800e+02\n2 10349     -1.639500e+02 1.578400e+02\n7 10349     -9.035999e+01 4.893000e+02\n9 10349     -2.862800e+02 2.053600e+02\n13 10349     2.941600e+02 9.973001e+01\n14 10349     4.414800e+02 -3.266400e+02\n1 10350     4.943700e+02 3.808900e+02\n2 10350     -1.600200e+02 1.558600e+02\n3 10350     -2.980800e+02 -1.753600e+02\n7 10350     -8.659003e+01 4.881500e+02\n9 10350     -2.832000e+02 2.042100e+02\n11 10350     2.736300e+02 -3.402700e+02\n12 10350     -1.452500e+02 4.196700e+02\n13 10350     2.971300e+02 9.876001e+01\n14 10350     4.455800e+02 -3.281400e+02\n1 10351     5.110601e+02 3.791900e+02\n2 10351     -1.467200e+02 1.593300e+02\n7 10351     -7.242999e+01 4.920200e+02\n8 10351     -4.083002e+01 1.207200e+02\n9 10351     -2.713700e+02 2.074000e+02\n13 10351     3.093600e+02 1.017000e+02\n14 10351     4.606200e+02 -3.249100e+02\n1 10352     5.209700e+02 3.758100e+02\n3 10352     -2.763600e+02 -1.727200e+02\n7 10352     -6.307001e+01 4.922600e+02\n11 10352     2.968500e+02 -3.380000e+02\n14 10352     4.702000e+02 -3.251400e+02\n1 10353     6.312100e+02 3.761800e+02\n3 10353     -1.987600e+02 -1.422300e+02\n7 10353     2.371002e+01 5.274500e+02\n12 10353     -2.637000e+01 4.681900e+02\n13 10353     3.923199e+02 1.292000e+02\n14 10353     5.636500e+02 -2.940200e+02\n1 10354     6.430300e+02 3.734400e+02\n2 10354     -4.796002e+01 1.901200e+02\n3 10354     -1.898900e+02 -1.415600e+02\n5 10354     6.681100e+02 -2.139400e+02\n7 10354     3.384003e+01 5.286700e+02\n8 10354     4.153003e+01 1.471400e+02\n9 10354     -1.893500e+02 2.375600e+02\n11 10354     3.933900e+02 -3.103600e+02\n13 10354     4.009700e+02 1.298900e+02\n14 10354     5.744600e+02 -2.934600e+02\n1 10355     6.296700e+02 3.728200e+02\n2 10355     -5.802002e+01 1.861200e+02\n7 10355     2.319000e+01 5.240300e+02\n12 10355     -2.691998e+01 4.639300e+02\n14 10355     5.625601e+02 -2.975400e+02\n1 10356     5.199600e+02 3.722000e+02\n7 10356     -6.277002e+01 4.885100e+02\n14 10356     4.700400e+02 -3.294100e+02\n1 10357     6.512800e+02 3.726000e+02\n7 10357     4.056000e+01 5.303900e+02\n14 10357     5.823600e+02 -2.922500e+02\n1 10358     6.341801e+02 3.710900e+02\n2 10358     -5.389001e+01 1.855700e+02\n3 10358     -1.958000e+02 -1.459800e+02\n7 10358     2.783002e+01 5.239600e+02\n14 10358     5.677600e+02 -2.978900e+02\n1 10359     2.456801e+02 3.630900e+02\n7 10359     -2.901000e+02 3.850000e+02\n8 10359     -2.166000e+02 3.735001e+01\n1 10360     -8.952002e+01 3.568000e+02\n7 10360     -5.983500e+02 2.500200e+02\n1 10361     1.934700e+02 3.410400e+02\n7 10361     -3.244100e+02 3.468800e+02\n11 10361     3.491998e+01 -4.473400e+02\n1 10362     1.934700e+02 3.410400e+02\n7 10362     -3.244100e+02 3.468800e+02\n11 10362     3.491998e+01 -4.473400e+02\n1 10363     -9.171997e+01 3.393900e+02\n7 10363     -5.897000e+02 2.338300e+02\n11 10363     -2.182700e+02 -5.141899e+02\n1 10364     -3.165600e+02 3.351700e+02\n5 10364     -2.569200e+02 -5.136300e+02\n7 10364     -8.191000e+02 1.334900e+02\n1 10365     4.388800e+02 3.314100e+02\n11 10365     2.432300e+02 -3.949700e+02\n13 10365     2.779399e+02 4.721997e+01\n14 10365     4.216200e+02 -3.920500e+02\n1 10366     -1.325500e+02 3.289800e+02\n7 10366     -6.236000e+02 2.073100e+02\n10 10366     -6.342600e+02 3.376100e+02\n1 10367     4.685300e+02 3.256100e+02\n7 10367     -8.201001e+01 4.325100e+02\n13 10367     3.021300e+02 5.085999e+01\n14 10367     4.517400e+02 -3.884300e+02\n1 10368     4.685300e+02 3.256100e+02\n7 10368     -8.201001e+01 4.325100e+02\n14 10368     4.517400e+02 -3.884300e+02\n1 10369     4.884399e+02 3.048500e+02\n2 10369     -1.064500e+02 1.010000e+02\n5 10369     5.725500e+02 -3.215100e+02\n6 10369     -2.529500e+02 3.528400e+02\n10 10369     4.948999e+01 5.562700e+02\n11 10369     2.937900e+02 -4.049200e+02\n13 10369     3.269000e+02 4.116998e+01\n14 10369     4.834000e+02 -4.020300e+02\n1 10370     5.098800e+02 2.967300e+02\n7 10370     -3.297998e+01 4.235500e+02\n1 10371     5.098800e+02 2.967300e+02\n7 10371     -3.297998e+01 4.235500e+02\n1 10372     4.972100e+02 2.965000e+02\n6 10372     -2.372100e+02 3.492400e+02\n1 10373     4.437300e+02 2.956200e+02\n13 10373     3.004500e+02 2.295001e+01\n1 10374     4.399301e+02 2.951200e+02\n14 10374     4.480601e+02 -4.262300e+02\n1 10375     5.156000e+02 2.931500e+02\n5 10375     6.044000e+02 -3.260500e+02\n6 10375     -2.185100e+02 3.546200e+02\n9 10375     -2.069900e+02 1.602300e+02\n10 10375     8.229999e+01 5.535700e+02\n14 10375     5.149301e+02 -4.058500e+02\n1 10376     4.482300e+02 2.924000e+02\n10 10376     1.433002e+01 5.278200e+02\n11 10376     2.646300e+02 -4.259900e+02\n13 10376     3.054000e+02 2.142999e+01\n14 10376     4.563500e+02 -4.260400e+02\n1 10377     4.643700e+02 2.903800e+02\n9 10377     -2.357700e+02 1.442800e+02\n11 10377     2.786899e+02 -4.236300e+02\n14 10377     4.728800e+02 -4.236000e+02\n1 10378     -1.002002e+01 2.895300e+02\n7 10378     -4.800900e+02 2.232900e+02\n1 10379     4.235000e+02 2.889900e+02\n6 10379     -2.951700e+02 3.040800e+02\n1 10380     4.640900e+02 2.865400e+02\n6 10380     -2.558500e+02 3.229000e+02\n11 10380     2.797800e+02 -4.271100e+02\n1 10381     1.085500e+02 2.860000e+02\n7 10381     -3.678600e+02 2.675600e+02\n8 10381     -2.632200e+02 -4.700000e+01\n10 10381     -3.379900e+02 3.876800e+02\n11 10381     -2.421002e+01 -5.168199e+02\n15 10381     -3.050300e+02 4.172100e+02\n1 10382     8.529700e+02 2.780400e+02\n2 10382     2.696000e+02 2.773200e+02\n3 10382     1.287200e+02 -4.975000e+01\n6 10382     1.731100e+02 5.282300e+02\n7 10382     2.763800e+02 5.347900e+02\n1 10383     -1.414100e+02 2.737600e+02\n7 10383     -5.969200e+02 1.541700e+02\n13 10383     -1.323900e+02 -1.550200e+02\n1 10384     5.007800e+02 2.713000e+02\n6 10384     -2.082800e+02 3.276500e+02\n12 10384     -6.202002e+01 3.302000e+02\n1 10385     -1.416300e+02 2.700600e+02\n5 10385     -2.006000e+01 -5.375000e+02\n13 10385     -1.304800e+02 -1.581200e+02\n1 10386     4.278199e+02 2.673900e+02\n11 10386     2.568000e+02 -4.526000e+02\n15 10386     9.796002e+01 5.471000e+02\n1 10387     4.756500e+02 2.660400e+02\n15 10387     1.552700e+02 5.674800e+02\n1 10388     -3.027700e+02 2.646600e+02\n7 10388     -7.570400e+02 7.438000e+01\n1 10389     5.065500e+02 2.642800e+02\n6 10389     -1.963300e+02 3.238800e+02\n10 10389     8.704999e+01 5.202200e+02\n15 10389     1.922300e+02 5.802400e+02\n1 10390     4.357700e+02 2.635300e+02\n10 10390     1.658002e+01 4.921600e+02\n13 10390     3.128500e+02 -3.250000e+00\n1 10391     4.340400e+02 2.603800e+02\n10 10391     1.621002e+01 4.879600e+02\n11 10391     2.652000e+02 -4.576300e+02\n14 10391     4.667000e+02 -4.618500e+02\n15 10391     1.096900e+02 5.411800e+02\n1 10392     4.544800e+02 2.594500e+02\n6 10392     -2.363400e+02 2.930900e+02\n1 10393     4.455800e+02 2.581000e+02\n6 10393     -2.427300e+02 2.870200e+02\n12 10393     -1.007700e+02 2.960500e+02\n1 10394     4.196600e+02 2.522600e+02\n5 10394     5.463000e+02 -3.930400e+02\n6 10394     -2.594600e+02 2.683100e+02\n10 10394     6.200012e+00 4.740600e+02\n11 10394     2.547900e+02 -4.683100e+02\n12 10394     -1.177400e+02 2.798500e+02\n13 10394     3.070601e+02 -1.539001e+01\n14 10394     4.587100e+02 -4.735200e+02\n15 10394     9.664001e+01 5.245200e+02\n1 10395     4.340300e+02 2.439800e+02\n5 10395     5.644500e+02 -3.965600e+02\n6 10395     -2.401600e+02 2.688500e+02\n11 10395     2.695300e+02 -4.713400e+02\n1 10396     4.278400e+02 2.384400e+02\n6 10396     -2.380600e+02 2.599100e+02\n1 10397     -4.643700e+02 2.353000e+02\n13 10397     -3.955500e+02 -2.840500e+02\n1 10398     3.810400e+02 2.330700e+02\n6 10398     -2.733000e+02 2.300800e+02\n10 10398     -2.357001e+01 4.385200e+02\n11 10398     2.286200e+02 -4.953000e+02\n14 10398     4.385800e+02 -5.053800e+02\n1 10399     4.438300e+02 2.170500e+02\n7 10399     -4.208002e+01 3.367500e+02\n11 10399     2.874600e+02 -4.927800e+02\n13 10399     3.439100e+02 -3.522998e+01\n14 10399     5.057500e+02 -5.010100e+02\n1 10400     5.920699e+02 2.168900e+02\n6 10400     -7.815002e+01 3.244000e+02\n1 10401     4.253400e+02 2.164500e+02\n10 10401     2.915997e+01 4.384700e+02\n11 10401     2.712200e+02 -4.983101e+02\n13 10401     3.309900e+02 -4.054999e+01\n14 10401     4.897600e+02 -5.074100e+02\n1 10402     4.406100e+02 2.146000e+02\n7 10402     -4.381000e+01 3.332200e+02\n11 10402     2.850900e+02 -4.957500e+02\n1 10403     4.372800e+02 2.083800e+02\n10 10403     4.732001e+01 4.340100e+02\n1 10404     6.076001e+01 2.055300e+02\n10 10404     -3.460900e+02 2.801600e+02\n15 10404     -3.154500e+02 2.927300e+02\n1 10405     5.896700e+02 1.926000e+02\n6 10405     -5.572998e+01 3.017300e+02\n1 10406     6.206500e+02 1.895200e+02\n6 10406     -2.792999e+01 3.150700e+02\n1 10407     5.654700e+02 1.831800e+02\n6 10407     -6.676001e+01 2.818200e+02\n10 10407     1.845000e+02 4.574800e+02\n11 10407     4.012000e+02 -4.897500e+02\n15 10407     3.067700e+02 5.088400e+02\n1 10408     8.769700e+02 1.815300e+02\n2 10408     3.423800e+02 2.195500e+02\n7 10408     3.335601e+02 4.662100e+02\n1 10409     -1.900200e+02 1.784700e+02\n15 10409     -6.240400e+02 1.307200e+02\n1 10410     2.935300e+02 1.745200e+02\n15 10410     4.262000e+01 3.826600e+02\n1 10411     9.154999e+01 1.695100e+02\n5 10411     3.999900e+02 -5.595000e+02\n7 10411     -2.635200e+02 1.854800e+02\n12 10411     -2.717800e+02 1.140300e+02\n15 10411     -2.256800e+02 2.700200e+02\n1 10412     2.886700e+02 1.695500e+02\n7 10412     -5.500000e+01 2.813400e+02\n10 10412     -3.090997e+01 3.413200e+02\n14 10412     5.690500e+02 -5.667500e+02\n1 10413     5.585000e+02 1.605900e+02\n7 10413     7.913000e+01 3.318400e+02\n10 10413     1.898000e+02 4.315100e+02\n1 10414     -3.049988e+00 1.484400e+02\n8 10414     -2.432900e+02 -1.652000e+02\n10 10414     -3.842900e+02 1.911600e+02\n15 10414     -3.609800e+02 1.887400e+02\n1 10415     8.132001e+01 1.484200e+02\n10 10415     -2.610500e+02 2.313700e+02\n12 10415     -2.617500e+02 9.215997e+01\n15 10415     -2.247900e+02 2.390900e+02\n1 10416     1.303998e+01 1.472600e+02\n7 10416     -3.712100e+02 1.099500e+02\n10 10416     -3.668500e+02 1.969300e+02\n15 10416     -3.397300e+02 1.957900e+02\n1 10417     1.717600e+02 1.448600e+02\n10 10417     -1.416700e+02 2.682200e+02\n1 10418     5.684003e+01 1.352500e+02\n5 10418     3.944301e+02 -6.049600e+02\n15 10418     -2.472500e+02 2.107400e+02\n1 10419     4.140300e+02 1.353100e+02\n15 10419     2.056700e+02 3.919900e+02\n1 10420     -8.907001e+01 1.339100e+02\n7 10420     -4.578300e+02 5.359003e+01\n13 10420     -9.070007e+00 -2.516100e+02\n1 10421     5.325699e+02 1.270500e+02\n10 10421     1.810900e+02 3.861600e+02\n1 10422     4.662800e+02 1.226300e+02\n15 10422     2.764000e+02 4.011700e+02\n1 10423     5.329500e+02 1.219700e+02\n10 10423     1.836300e+02 3.819500e+02\n1 10424     6.188400e+02 1.046500e+02\n15 10424     4.144600e+02 4.398500e+02\n1 10425     8.482100e+02 1.042800e+02\n15 10425     7.014800e+02 5.521100e+02\n1 10426     8.606899e+02 1.011000e+02\n2 10426     4.267500e+02 2.031500e+02\n3 10426     2.887800e+02 -1.154400e+02\n8 10426     4.115100e+02 1.406900e+02\n10 10426     5.326801e+02 4.868600e+02\n13 10426     7.491200e+02 1.015997e+01\n15 10426     7.180601e+02 5.542700e+02\n1 10427     4.685100e+02 9.589001e+01\n15 10427     2.968500e+02 3.710100e+02\n1 10428     -5.040997e+01 9.334000e+01\n7 10428     -3.963600e+02 3.547998e+01\n1 10429     1.844100e+02 9.203000e+01\n15 10429     -4.113000e+01 2.265800e+02\n1 10430     1.844100e+02 9.203000e+01\n15 10430     -4.113000e+01 2.265800e+02\n1 10431     6.187200e+02 8.839999e+01\n10 10431     2.815000e+02 3.802400e+02\n15 10431     4.226300e+02 4.202400e+02\n1 10432     1.137000e+02 8.601999e+01\n7 10432     -1.696000e+02 1.362700e+02\n10 10432     -1.790800e+02 1.803300e+02\n1 10433     6.002600e+02 8.445001e+01\n10 10433     2.669700e+02 3.692400e+02\n1 10434     -4.359998e+01 8.348999e+01\n7 10434     -3.836000e+02 2.996002e+01\n9 10434     -3.972000e+02 -1.443400e+02\n13 10434     5.621002e+01 -2.777800e+02\n1 10435     8.505800e+02 8.076999e+01\n7 10435     3.744500e+02 3.870900e+02\n8 10435     4.120300e+02 1.216700e+02\n1 10436     5.869301e+02 8.045999e+01\n10 10436     2.554301e+02 3.600700e+02\n15 10436     3.908300e+02 3.962200e+02\n1 10437     8.722998e+01 7.994000e+01\n15 10437     -1.684700e+02 1.588800e+02\n1 10438     6.082700e+02 7.442999e+01\n10 10438     2.790000e+02 3.621700e+02\n1 10439     -4.503998e+01 7.346002e+01\n7 10439     -3.781400e+02 2.084003e+01\n10 10439     -3.880700e+02 9.179999e+01\n1 10440     6.199951e-01 7.260999e+01\n7 10440     -2.810400e+02 6.776001e+01\n15 10440     -2.768200e+02 1.050600e+02\n1 10441     6.729900e+02 6.965002e+01\n7 10441     2.126600e+02 3.009100e+02\n1 10442     4.404100e+02 6.859003e+01\n15 10442     2.820699e+02 3.249100e+02\n1 10443     8.636600e+02 6.650000e+01\n2 10443     4.478000e+02 1.792800e+02\n7 10443     3.907600e+02 3.810700e+02\n10 10443     5.482500e+02 4.531200e+02\n1 10444     6.786600e+02 6.345001e+01\n7 10444     2.198000e+02 2.986500e+02\n1 10445     6.754900e+02 6.148999e+01\n7 10445     2.188600e+02 2.952100e+02\n1 10446     2.905100e+02 5.942999e+01\n15 10446     1.109300e+02 2.416300e+02\n1 10447     2.905100e+02 5.942999e+01\n15 10447     1.109300e+02 2.416300e+02\n1 10448     5.544000e+01 5.923999e+01\n7 10448     -2.150300e+02 8.454999e+01\n10 10448     -2.330600e+02 1.262100e+02\n12 10448     -1.864600e+02 1.833002e+01\n15 10448     -1.947800e+02 1.176400e+02\n1 10449     3.018101e+02 5.898999e+01\n2 10449     2.495400e+02 1.202700e+02\n5 10449     7.805200e+02 -5.893300e+02\n6 10449     7.891998e+01 1.341200e+02\n7 10449     2.820001e+01 2.016600e+02\n10 10449     4.439001e+01 2.329500e+02\n12 10449     1.021100e+02 1.858000e+02\n13 10449     4.740400e+02 -1.533200e+02\n1 10450     8.764900e+02 5.915997e+01\n3 10450     3.251801e+02 -1.350900e+02\n9 10450     2.565601e+02 2.508000e+02\n10 10450     5.645400e+02 4.505600e+02\n11 10450     7.164000e+02 -5.128800e+02\n12 10450     4.630400e+02 3.730700e+02\n15 10450     7.568400e+02 5.116100e+02\n1 10451     8.184000e+02 5.735999e+01\n2 10451     4.099301e+02 1.420700e+02\n6 10451     3.160500e+02 3.282400e+02\n9 10451     2.118300e+02 2.149300e+02\n12 10451     4.065000e+02 3.362200e+02\n15 10451     6.874100e+02 4.819000e+02\n1 10452     3.528003e+01 5.387000e+01\n10 10452     -2.565100e+02 1.109300e+02\n1 10453     6.992400e+02 4.571997e+01\n13 10453     6.085100e+02 -8.790997e+01\n1 10454     4.330000e+02 4.033002e+01\n7 10454     1.378400e+02 2.341900e+02\n1 10455     2.397300e+02 3.797998e+01\n2 10455     2.155000e+02 7.629999e+01\n3 10455     1.227200e+02 -2.346100e+02\n4 10455     -2.602600e+02 -4.723101e+02\n6 10455     4.200000e+01 7.796002e+01\n8 10455     2.097500e+02 1.517999e+01\n10 10455     -1.245001e+01 1.844700e+02\n15 10455     5.941998e+01 1.892500e+02\n1 10456     9.738000e+01 3.685999e+01\n7 10456     -1.601200e+02 8.520999e+01\n15 10456     -1.265100e+02 1.117500e+02\n1 10457     1.318700e+02 3.273999e+01\n3 10457     1.709998e+01 -3.131700e+02\n7 10457     -1.181500e+02 1.007900e+02\n10 10457     -1.285900e+02 1.314600e+02\n12 10457     -6.356000e+01 5.154999e+01\n13 10457     3.411400e+02 -2.306000e+02\n15 10457     -7.547998e+01 1.256500e+02\n1 10458     3.585601e+02 3.223999e+01\n10 10458     1.137500e+02 2.274900e+02\n1 10459     4.237900e+02 3.028003e+01\n15 10459     2.845601e+02 2.708000e+02\n1 10460     2.859600e+02 2.717999e+01\n2 10460     2.620300e+02 9.042999e+01\n3 10460     1.633000e+02 -2.209400e+02\n4 10460     -2.639600e+02 -5.090800e+02\n8 10460     2.465300e+02 2.660001e+01\n10 10460     4.235999e+01 1.927100e+02\n12 10460     1.096600e+02 1.480900e+02\n15 10460     1.233200e+02 1.998400e+02\n1 10461     2.028199e+02 2.188000e+01\n2 10461     1.937300e+02 4.312000e+01\n7 10461     -4.194000e+01 1.266500e+02\n9 10461     5.142999e+01 1.282500e+02\n10 10461     -4.396997e+01 1.516300e+02\n13 10461     4.119800e+02 -2.128100e+02\n15 10461     2.271002e+01 1.505600e+02\n1 10462     8.187400e+02 1.209998e+01\n3 10462     2.983600e+02 -2.065900e+02\n10 10462     5.233101e+02 3.819200e+02\n13 10462     7.446200e+02 -6.741998e+01\n15 10462     7.089301e+02 4.289100e+02\n1 10463     4.294200e+02 9.530029e+00\n7 10463     1.498400e+02 2.070600e+02\n1 10464     9.683002e+01 8.549988e+00\n7 10464     -1.450200e+02 6.045001e+01\n10 10464     -1.600800e+02 8.989001e+01\n15 10464     -1.110500e+02 7.694000e+01\n1 10465     -2.322700e+02 3.989990e+00\n7 10465     -5.134400e+02 -1.278100e+02\n15 10465     -5.664000e+02 -1.149600e+02\n1 10466     -1.681500e+02 5.399780e-01\n6 10466     -5.492300e+02 -3.341200e+02\n8 10466     -2.588400e+02 -3.250800e+02\n1 10467     -3.229980e+00 7.899780e-01\n15 10467     -2.354600e+02 1.425000e+01\n1 10468     1.894100e+02 -3.200012e+00\n7 10468     -4.265002e+01 9.839999e+01\n10 10468     -4.703003e+01 1.193500e+02\n13 10468     4.107300e+02 -2.370300e+02\n1 10469     8.061200e+02 -3.929993e+00\n6 10469     3.385000e+02 2.662600e+02\n7 10469     3.682500e+02 3.017400e+02\n10 10469     5.163199e+02 3.605900e+02\n13 10469     7.397100e+02 -8.412000e+01\n15 10469     7.012900e+02 4.034300e+02\n1 10470     2.469399e+02 -6.840027e+00\n15 10470     9.295001e+01 1.377900e+02\n1 10471     2.469399e+02 -6.840027e+00\n15 10471     9.295001e+01 1.377900e+02\n1 10472     5.265800e+02 -6.909973e+00\n15 10472     4.137400e+02 2.745000e+02\n1 10473     3.112900e+02 -1.713000e+01\n10 10473     8.789001e+01 1.562200e+02\n15 10473     1.772900e+02 1.577600e+02\n1 10474     5.076000e+02 -2.212000e+01\n15 10474     4.025200e+02 2.484300e+02\n1 10475     -4.618000e+02 -2.453003e+01\n10 10475     -8.212100e+02 -2.161400e+02\n15 10475     -8.625600e+02 -2.843600e+02\n1 10476     2.673900e+02 -3.628003e+01\n10 10476     5.097998e+01 1.184600e+02\n1 10477     3.430100e+02 -3.939001e+01\n7 10477     1.075500e+02 1.341500e+02\n1 10478     -1.407001e+01 -4.640997e+01\n10 10478     -2.529100e+02 -1.700000e+01\n1 10479     8.398400e+02 -5.089001e+01\n2 10479     4.874301e+02 7.384003e+01\n6 10479     3.995100e+02 2.456300e+02\n15 10479     7.641500e+02 3.642200e+02\n1 10480     3.545500e+02 -5.556000e+01\n15 10480     2.484900e+02 1.332000e+02\n1 10481     8.030300e+02 -6.841998e+01\n15 10481     7.277100e+02 3.253700e+02\n1 10482     1.261000e+02 -7.271002e+01\n10 10482     -8.609998e+01 1.835999e+01\n15 10482     -2.506000e+01 -6.609985e+00\n1 10483     3.268400e+02 -7.342999e+01\n8 10483     3.229000e+02 -3.010001e+01\n15 10483     2.237900e+02 9.753000e+01\n1 10484     6.863000e+01 -7.722998e+01\n15 10484     -9.663000e+01 -4.325000e+01\n1 10485     4.590000e+02 -7.715002e+01\n10 10485     2.548900e+02 1.557900e+02\n1 10486     8.819399e+02 -7.894000e+01\n6 10486     4.574301e+02 2.475700e+02\n7 10486     4.603199e+02 2.736800e+02\n8 10486     5.024100e+02 3.895001e+01\n9 10486     3.237100e+02 1.702400e+02\n10 10486     6.211700e+02 3.154200e+02\n12 10486     5.403300e+02 2.571500e+02\n15 10486     8.271300e+02 3.519900e+02\n1 10487     1.597600e+02 -8.208002e+01\n10 10487     -4.654999e+01 2.316998e+01\n1 10488     1.651700e+02 -8.315002e+01\n10 10488     -3.964001e+01 2.439001e+01\n1 10489     5.325200e+02 -8.654999e+01\n7 10489     2.505200e+02 1.575500e+02\n15 10489     4.584000e+02 1.806400e+02\n1 10490     3.315800e+02 -9.016998e+01\n15 10490     2.381300e+02 7.914001e+01\n1 10491     3.448900e+02 -9.153003e+01\n13 10491     5.607900e+02 -2.561200e+02\n1 10492     1.427800e+02 -9.337000e+01\n3 10492     1.321600e+02 -3.971700e+02\n6 10492     3.448999e+01 -1.098900e+02\n7 10492     -4.321002e+01 -1.989990e+00\n10 10492     -5.778003e+01 4.510010e+00\n12 10492     4.071002e+01 -5.939001e+01\n15 10492     7.799988e+00 -2.284998e+01\n1 10493     3.016600e+02 -9.346002e+01\n7 10493     9.588000e+01 6.981000e+01\n15 10493     2.032900e+02 6.078003e+01\n1 10494     3.095000e+02 -9.460999e+01\n8 10494     3.205600e+02 -5.335001e+01\n1 10495     4.827700e+02 -9.535999e+01\n10 10495     2.831801e+02 1.463200e+02\n1 10496     5.047400e+02 -1.008300e+02\n10 10496     3.031801e+02 1.490500e+02\n15 10496     4.372800e+02 1.509000e+02\n1 10497     1.985900e+02 -1.034200e+02\n2 10497     2.680400e+02 -7.459003e+01\n15 10497     8.160999e+01 -5.989990e+00\n1 10498     4.903003e+01 -1.045100e+02\n10 10498     -1.545200e+02 -4.979999e+01\n1 10499     6.083002e+01 -1.104800e+02\n6 10499     -3.503998e+01 -1.844100e+02\n7 10499     -1.113100e+02 -5.727002e+01\n8 10499     1.468400e+02 -1.803400e+02\n10 10499     -1.388700e+02 -5.109998e+01\n12 10499     -3.507001e+01 -1.317000e+02\n15 10499     -8.659003e+01 -8.801001e+01\n1 10500     1.549200e+02 -1.183500e+02\n7 10500     -1.887000e+01 -1.756000e+01\n1 10501     -1.385100e+02 -1.232900e+02\n4 10501     -4.044800e+02 -1.802700e+02\n1 10502     4.642400e+02 -1.272600e+02\n10 10502     2.784200e+02 1.063900e+02\n1 10503     5.013900e+02 -1.280600e+02\n7 10503     2.518700e+02 1.142700e+02\n15 10503     4.471100e+02 1.165600e+02\n1 10504     1.529399e+02 -1.291100e+02\n4 10504     -3.872200e+02 -4.435900e+02\n7 10504     -1.626001e+01 -2.847998e+01\n8 10504     2.329700e+02 -1.448400e+02\n10 10504     -3.027002e+01 -2.853998e+01\n15 10504     4.001001e+01 -6.079999e+01\n1 10505     5.265000e+02 -1.295200e+02\n7 10505     2.709000e+02 1.226400e+02\n10 10505     3.360400e+02 1.286700e+02\n15 10505     4.767500e+02 1.274300e+02\n1 10506     8.362100e+02 -1.295400e+02\n15 10506     7.963800e+02 2.699400e+02\n1 10507     2.999800e+02 -1.316300e+02\n15 10507     2.195200e+02 1.250000e+01\n1 10508     8.242800e+02 -1.333000e+02\n6 10508     4.291600e+02 1.643300e+02\n7 10508     4.328300e+02 2.064900e+02\n10 10508     5.846100e+02 2.387600e+02\n1 10509     1.523400e+02 -1.365200e+02\n6 10509     7.487000e+01 -1.432500e+02\n1 10510     3.878900e+02 -1.380600e+02\n6 10510     2.618400e+02 -3.130005e+00\n1 10511     3.449700e+02 -1.427100e+02\n10 10511     1.716200e+02 4.095001e+01\n15 10511     2.782900e+02 2.240002e+01\n1 10512     3.678101e+02 -1.447500e+02\n2 10512     4.136000e+02 -3.338000e+01\n3 10512     3.105100e+02 -3.351300e+02\n6 10512     2.515800e+02 -2.078998e+01\n8 10512     3.719000e+02 -7.533002e+01\n10 10512     1.948500e+02 4.870001e+01\n12 10512     2.785900e+02 1.957001e+01\n1 10513     3.678101e+02 -1.447500e+02\n2 10513     4.136000e+02 -3.338000e+01\n6 10513     2.515800e+02 -2.078998e+01\n8 10513     3.719000e+02 -7.533002e+01\n10 10513     1.948500e+02 4.870001e+01\n12 10513     2.785900e+02 1.957001e+01\n1 10514     3.722000e+02 -1.464900e+02\n7 10514     1.709600e+02 5.196002e+01\n15 10514     3.118900e+02 3.151001e+01\n1 10515     8.025100e+02 -1.536800e+02\n15 10515     7.674800e+02 2.253000e+02\n1 10516     -6.241400e+02 -1.602000e+02\n4 10516     -4.636600e+02 1.441600e+02\n1 10517     2.309000e+02 -1.627500e+02\n7 10517     6.958002e+01 -2.073999e+01\n1 10518     -4.827200e+02 -1.728900e+02\n15 10518     -7.926300e+02 -4.906000e+02\n1 10519     3.058400e+02 -1.781700e+02\n7 10519     1.370700e+02 -6.900024e-01\n1 10520     4.146300e+02 -1.778800e+02\n7 10520     2.176801e+02 4.362000e+01\n1 10521     3.541801e+02 -1.823600e+02\n7 10521     1.763101e+02 1.592999e+01\n1 10522     3.961300e+02 -1.848800e+02\n3 10522     3.554800e+02 -3.507600e+02\n7 10522     2.083600e+02 3.084003e+01\n10 10522     2.409700e+02 2.025000e+01\n1 10523     3.662600e+02 -1.891000e+02\n7 10523     1.888300e+02 1.532001e+01\n1 10524     4.980500e+02 -1.903700e+02\n7 10524     2.768000e+02 6.332001e+01\n1 10525     -3.878100e+02 -1.934400e+02\n7 10525     -5.376000e+02 -3.866800e+02\n1 10526     1.833400e+02 -1.945000e+02\n7 10526     4.189001e+01 -7.053998e+01\n13 10526     4.818300e+02 -3.904500e+02\n15 10526     1.132000e+02 -1.245600e+02\n1 10527     1.833400e+02 -1.945000e+02\n15 10527     1.132000e+02 -1.245600e+02\n1 10528     2.432200e+02 -1.995700e+02\n6 10528     1.932700e+02 -1.436801e+02\n1 10529     1.358600e+02 -2.018100e+02\n13 10529     4.528600e+02 -4.114300e+02\n1 10530     8.158002e+01 -2.092700e+02\n15 10530     -9.729980e+00 -1.990600e+02\n1 10531     -6.313300e+02 -2.110600e+02\n4 10531     -5.049500e+02 1.429500e+02\n1 10532     -6.367500e+02 -2.204400e+02\n4 10532     -5.136900e+02 1.462700e+02\n1 10533     -2.566900e+02 -2.238500e+02\n7 10533     -3.896000e+02 -3.415600e+02\n1 10534     4.661500e+02 -2.267300e+02\n7 10534     2.746000e+02 2.251001e+01\n10 10534     3.226700e+02 6.750000e+00\n12 10534     4.014700e+02 -9.539978e+00\n15 10534     4.612300e+02 -1.725000e+01\n1 10535     2.269000e+02 -2.279800e+02\n3 10535     2.985900e+02 -4.511300e+02\n8 10535     3.418300e+02 -1.805800e+02\n15 10535     1.848600e+02 -1.419800e+02\n1 10536     8.207800e+02 -2.299300e+02\n8 10536     5.209800e+02 -9.310999e+01\n1 10537     2.764700e+02 -2.303600e+02\n15 10537     2.442100e+02 -1.180800e+02\n1 10538     8.446400e+02 -2.310400e+02\n15 10538     8.539399e+02 1.556200e+02\n1 10539     -4.959900e+02 -2.319600e+02\n15 10539     -7.716200e+02 -5.763700e+02\n1 10540     -3.150500e+02 -2.336300e+02\n10 10540     -5.192200e+02 -3.715300e+02\n1 10541     -2.162000e+02 -2.340600e+02\n7 10541     -3.445700e+02 -3.292200e+02\n1 10542     -2.162000e+02 -2.340600e+02\n7 10542     -3.445700e+02 -3.292200e+02\n1 10543     -6.302700e+02 -2.378000e+02\n4 10543     -5.267200e+02 1.389200e+02\n1 10544     -2.060300e+02 -2.419300e+02\n4 10544     -5.013900e+02 -1.609700e+02\n1 10545     5.448999e+01 -2.430600e+02\n13 10545     3.694399e+02 -4.886899e+02\n1 10546     8.439399e+02 -2.453000e+02\n7 10546     4.912100e+02 1.267600e+02\n9 10546     3.744600e+02 4.272998e+01\n10 10546     6.464399e+02 1.364500e+02\n13 10546     8.640400e+02 -2.509200e+02\n15 10546     8.602900e+02 1.382900e+02\n1 10547     5.309998e+01 -2.462600e+02\n15 10547     -3.191998e+01 -2.620100e+02\n1 10548     8.244200e+02 -2.467200e+02\n7 10548     4.753600e+02 1.170700e+02\n8 10548     5.316300e+02 -1.019800e+02\n10 10548     6.262300e+02 1.283100e+02\n12 10548     5.736801e+02 7.482001e+01\n15 10548     8.371899e+02 1.271600e+02\n1 10549     5.138000e+02 -2.507600e+02\n10 10549     3.758000e+02 2.400024e+00\n1 10550     5.064800e+02 -2.515800e+02\n10 10550     3.704100e+02 -1.510010e+00\n15 10550     5.189100e+02 -2.672998e+01\n1 10551     2.251600e+02 -2.538400e+02\n10 10551     1.017900e+02 -1.258500e+02\n15 10551     1.963300e+02 -1.739800e+02\n1 10552     5.621997e+01 -2.556800e+02\n10 10552     -8.819000e+01 -2.074300e+02\n1 10553     2.345000e+02 -2.571000e+02\n10 10553     1.134900e+02 -1.244700e+02\n1 10554     -2.014700e+02 -2.582100e+02\n15 10554     -3.601100e+02 -4.271700e+02\n1 10555     4.986400e+02 -2.642600e+02\n15 10555     5.142600e+02 -4.694000e+01\n1 10556     4.661100e+02 -2.666800e+02\n6 10556     4.014200e+02 -7.159003e+01\n7 10556     2.970800e+02 -7.780029e+00\n12 10556     4.351000e+02 -3.962000e+01\n15 10556     4.843900e+02 -6.438000e+01\n1 10557     4.039700e+02 -2.688300e+02\n7 10557     2.530699e+02 -3.463000e+01\n1 10558     3.167300e+02 -2.688400e+02\n6 10558     3.099000e+02 -1.523000e+02\n10 10558     2.027800e+02 -9.882001e+01\n12 10558     3.275100e+02 -1.166000e+02\n15 10558     3.158500e+02 -1.426800e+02\n1 10559     -6.090400e+02 -2.711700e+02\n4 10559     -5.538000e+02 1.186500e+02\n1 10560     4.969100e+02 -2.770400e+02\n15 10560     5.159900e+02 -6.301001e+01\n1 10561     4.112100e+02 -2.782400e+02\n15 10561     4.260300e+02 -1.064600e+02\n1 10562     4.112100e+02 -2.782400e+02\n15 10562     4.260300e+02 -1.064600e+02\n1 10563     2.260200e+02 -2.799300e+02\n10 10563     1.109300e+02 -1.527200e+02\n15 10563     2.076700e+02 -2.061000e+02\n1 10564     5.014700e+02 -2.841500e+02\n15 10564     5.220200e+02 -6.962000e+01\n1 10565     6.935800e+02 -2.901400e+02\n7 10565     4.119100e+02 3.682001e+01\n12 10565     5.184800e+02 -1.660999e+01\n1 10566     -3.948800e+02 -2.934600e+02\n10 10566     -5.784200e+02 -4.801000e+02\n1 10567     -2.484900e+02 -2.940100e+02\n6 10567     -2.762000e+02 -6.612900e+02\n15 10567     -3.974200e+02 -5.004100e+02\n1 10568     7.802800e+02 -3.044600e+02\n7 10568     4.758101e+02 5.882001e+01\n10 10568     6.146400e+02 5.484998e+01\n15 10568     8.222300e+02 3.958002e+01\n1 10569     3.553400e+02 -3.129500e+02\n10 10569     2.500100e+02 -1.289300e+02\n1 10570     -2.336800e+02 -3.195900e+02\n15 10570     -3.611900e+02 -5.233600e+02\n1 10571     4.979200e+02 -3.232900e+02\n15 10571     5.306200e+02 -1.206900e+02\n1 10572     -6.411700e+02 -3.297700e+02\n4 10572     -6.085600e+02 1.350300e+02\n1 10573     2.234500e+02 -3.314900e+02\n7 10573     1.252100e+02 -1.758700e+02\n13 10573     5.468000e+02 -4.966700e+02\n1 10574     7.715601e+02 -3.318900e+02\n15 10574     8.271700e+02 3.599976e+00\n1 10575     -1.404300e+02 -3.465800e+02\n10 10575     -2.629000e+02 -4.014000e+02\n1 10576     -6.795000e+02 -3.487700e+02\n4 10576     -6.290900e+02 1.616000e+02\n1 10577     3.330100e+02 -3.519400e+02\n10 10577     2.401200e+02 -1.794300e+02\n1 10578     6.070500e+02 -3.551700e+02\n10 10578     4.828199e+02 -6.656000e+01\n1 10579     2.466500e+02 -3.626300e+02\n7 10579     1.504600e+02 -1.949100e+02\n10 10579     1.565600e+02 -2.294400e+02\n13 10579     5.654700e+02 -5.181500e+02\n1 10580     3.115601e+02 -3.648100e+02\n15 10580     3.419399e+02 -2.656800e+02\n1 10581     3.093600e+02 -3.683700e+02\n10 10581     2.208300e+02 -2.071000e+02\n15 10581     3.428600e+02 -2.713500e+02\n1 10582     -3.693300e+02 -3.773800e+02\n6 10582     -2.937200e+02 -8.432800e+02\n1 10583     5.879200e+02 -3.819100e+02\n7 10583     3.897900e+02 -7.275000e+01\n10 10583     4.783900e+02 -1.003700e+02\n15 10583     6.552200e+02 -1.461300e+02\n1 10584     -6.751300e+02 -3.842700e+02\n4 10584     -6.620200e+02 1.536800e+02\n1 10585     -6.312200e+02 -3.955400e+02\n4 10585     -6.692000e+02 1.183000e+02\n1 10586     -1.548500e+02 -3.974700e+02\n4 10586     -6.338500e+02 -2.422600e+02\n6 10586     -6.837000e+01 -6.661400e+02\n7 10586     -1.820400e+02 -4.343400e+02\n1 10587     -1.596700e+02 -4.121400e+02\n6 10587     -5.758002e+01 -6.852200e+02\n7 10587     -1.786100e+02 -4.514301e+02\n1 10588     -6.473900e+02 -4.140900e+02\n4 10588     -6.885600e+02 1.283400e+02\n1 10589     -3.395600e+02 -4.165600e+02\n7 10589     -3.406700e+02 -5.571100e+02\n1 10590     -6.759600e+02 -4.247300e+02\n4 10590     -7.019000e+02 1.488900e+02\n1 10591     -1.497600e+02 -4.265200e+02\n4 10591     -6.619300e+02 -2.526500e+02\n6 10591     -3.415002e+01 -6.888400e+02\n9 10591     6.583002e+01 -4.576200e+02\n1 10592     -6.766200e+02 -4.289200e+02\n4 10592     -7.058900e+02 1.487600e+02\n1 10593     8.420900e+02 -4.516200e+02\n7 10593     5.834100e+02 -2.403003e+01\n12 10593     7.292800e+02 -6.515002e+01\n1 10594     7.499600e+02 -4.636899e+02\n7 10594     5.333900e+02 -6.803998e+01\n1 10595     -2.807400e+02 -4.727200e+02\n6 10595     -9.748001e+01 -8.413300e+02\n7 10595     -2.485800e+02 -5.712300e+02\n1 10596     5.612100e+02 -4.867900e+02\n7 10596     4.240400e+02 -1.628300e+02\n15 10596     6.843800e+02 -2.817000e+02\n1 10597     2.150400e+02 -5.538600e+02\n2 10597     5.502300e+02 -5.174900e+02\n1 10598     8.092100e+02 -5.800300e+02\n10 10598     7.609800e+02 -1.949800e+02\n1 10599     1.155800e+02 -5.877900e+02\n10 10599     1.307600e+02 -5.222700e+02\n1 10600     6.001600e+02 5.836800e+02\n2 10600     -1.417500e+02 3.838300e+02\n4 10600     7.095001e+01 -4.810601e+02\n5 10600     5.806300e+02 -2.809003e+01\n8 10600     -3.713000e+01 2.995200e+02\n9 10600     -2.768400e+02 4.042800e+02\n11 10600     2.994399e+02 -1.603100e+02\n13 10600     3.282200e+02 2.753900e+02\n14 10600     4.816600e+02 -1.139800e+02\n1 10601     4.614600e+02 5.831500e+02\n3 10601     -3.743700e+02 2.303998e+01\n4 10601     6.123999e+01 -4.032100e+02\n6 10601     -4.286900e+02 6.443500e+02\n8 10601     -1.209100e+02 2.756100e+02\n9 10601     -3.625000e+02 3.769700e+02\n14 10601     3.692000e+02 -1.464900e+02\n1 10602     6.216500e+02 5.813100e+02\n2 10602     -1.259800e+02 3.860100e+02\n4 10602     7.121997e+01 -4.935601e+02\n5 10602     5.987600e+02 -2.557001e+01\n6 10602     -2.847200e+02 7.070600e+02\n8 10602     -2.395001e+01 3.012200e+02\n9 10602     -2.634300e+02 4.061600e+02\n11 10602     3.158101e+02 -1.579600e+02\n13 10602     3.427300e+02 2.781100e+02\n14 10602     4.994100e+02 -1.112300e+02\n1 10603     6.356899e+02 5.810600e+02\n2 10603     -1.162900e+02 3.882000e+02\n4 10603     7.200000e+01 -5.015900e+02\n5 10603     6.102800e+02 -2.296002e+01\n6 10603     -2.728700e+02 7.113700e+02\n8 10603     -1.590997e+01 3.034500e+02\n9 10603     -2.549700e+02 4.086300e+02\n11 10603     3.260400e+02 -1.553100e+02\n13 10603     3.518900e+02 2.809300e+02\n14 10603     5.104500e+02 -1.081200e+02\n1 10604     6.174301e+02 5.766400e+02\n2 10604     -1.276000e+02 3.813100e+02\n5 10604     5.970000e+02 -3.077002e+01\n9 10604     -2.645300e+02 4.020200e+02\n11 10604     3.143400e+02 -1.625800e+02\n1 10605     6.174301e+02 5.766400e+02\n2 10605     -1.276000e+02 3.813100e+02\n3 10605     -2.646900e+02 4.638000e+01\n5 10605     5.970000e+02 -3.077002e+01\n8 10605     -2.528003e+01 2.977800e+02\n9 10605     -2.645300e+02 4.020200e+02\n11 10605     3.143400e+02 -1.625800e+02\n13 10605     3.409600e+02 2.741600e+02\n14 10605     4.972500e+02 -1.156800e+02\n1 10606     6.300500e+02 5.758100e+02\n2 10606     -1.186200e+02 3.828500e+02\n3 10606     -2.565200e+02 4.739001e+01\n5 10606     6.070500e+02 -2.875000e+01\n8 10606     -1.789001e+01 2.983100e+02\n9 10606     -2.571500e+02 4.029000e+02\n11 10606     3.231700e+02 -1.606100e+02\n13 10606     3.492200e+02 2.757700e+02\n14 10606     5.072400e+02 -1.142200e+02\n1 10607     5.987900e+02 5.745600e+02\n5 10607     5.818000e+02 -3.695001e+01\n13 10607     3.293000e+02 2.685700e+02\n14 10607     4.831100e+02 -1.222500e+02\n1 10608     5.987900e+02 5.745600e+02\n2 10608     -1.397800e+02 3.744800e+02\n3 10608     -2.760200e+02 3.937000e+01\n5 10608     5.818000e+02 -3.695001e+01\n9 10608     -2.746500e+02 3.957100e+02\n11 10608     3.011801e+02 -1.678000e+02\n13 10608     3.293000e+02 2.685700e+02\n1 10609     8.622000e+02 5.715400e+02\n13 10609     4.960200e+02 3.174900e+02\n14 10609     6.850100e+02 -6.890002e+01\n1 10610     5.850200e+02 5.711400e+02\n2 10610     -1.494600e+02 3.694500e+02\n9 10610     -2.824200e+02 3.912400e+02\n11 10610     2.915300e+02 -1.726600e+02\n14 10610     4.730000e+02 -1.279500e+02\n1 10611     5.748600e+02 5.689900e+02\n6 10611     -3.212300e+02 6.743900e+02\n8 10611     -4.915002e+01 2.842400e+02\n11 10611     2.844600e+02 -1.763500e+02\n14 10611     4.653700e+02 -1.319600e+02\n1 10612     5.880200e+02 5.675600e+02\n2 10612     -1.454200e+02 3.668000e+02\n3 10612     -2.812700e+02 3.229999e+01\n4 10612     6.166998e+01 -4.759000e+02\n5 10612     5.750601e+02 -4.484998e+01\n6 10612     -3.075600e+02 6.793100e+02\n8 10612     -3.990002e+01 2.856900e+02\n9 10612     -2.788800e+02 3.892100e+02\n11 10612     2.955500e+02 -1.742400e+02\n14 10612     4.764000e+02 -1.306000e+02\n1 10613     7.991700e+02 5.668900e+02\n2 10613     -3.369995e+00 4.038000e+02\n5 10613     7.447200e+02 -1.650024e+00\n6 10613     -1.319900e+02 7.560800e+02\n9 10613     -1.596300e+02 4.255100e+02\n11 10613     4.465400e+02 -1.338700e+02\n13 10613     4.589000e+02 3.033100e+02\n14 10613     6.401400e+02 -8.487000e+01\n1 10614     5.982600e+02 5.668000e+02\n2 10614     -1.380000e+02 3.681200e+02\n4 10614     6.190002e+01 -4.816700e+02\n5 10614     5.832300e+02 -4.369000e+01\n6 10614     -2.988600e+02 6.823000e+02\n8 10614     -3.379999e+01 2.869900e+02\n14 10614     4.845800e+02 -1.290400e+02\n1 10615     6.192300e+02 5.662400e+02\n4 10615     6.287000e+01 -4.935300e+02\n6 10615     -2.806500e+02 6.898400e+02\n11 10615     3.184100e+02 -1.696500e+02\n14 10615     5.014100e+02 -1.243800e+02\n1 10616     6.115500e+02 5.655500e+02\n2 10616     -1.283600e+02 3.697300e+02\n3 10616     -2.658500e+02 3.441998e+01\n9 10616     -2.646800e+02 3.917200e+02\n14 10616     4.950300e+02 -1.271500e+02\n1 10617     6.768000e+02 5.634600e+02\n13 10617     3.821300e+02 2.763400e+02\n1 10618     6.214600e+02 5.611000e+02\n2 10618     -1.199500e+02 3.669400e+02\n3 10618     -2.579300e+02 3.238000e+01\n8 10618     -1.894000e+01 2.864400e+02\n9 10618     -2.569500e+02 3.894100e+02\n14 10618     5.045500e+02 -1.285700e+02\n1 10619     6.214600e+02 5.611000e+02\n6 10619     -2.764800e+02 6.849800e+02\n8 10619     -1.894000e+01 2.864400e+02\n14 10619     5.045500e+02 -1.285700e+02\n1 10620     6.397800e+02 5.536100e+02\n8 10620     -6.239990e+00 2.836100e+02\n14 10620     5.217000e+02 -1.307900e+02\n1 10621     6.741500e+02 5.459900e+02\n4 10621     5.558002e+01 -5.270400e+02\n5 10621     6.500800e+02 -4.603003e+01\n6 10621     -2.259200e+02 6.910300e+02\n14 10621     5.503400e+02 -1.291000e+02\n1 10622     6.741500e+02 5.459900e+02\n11 10622     3.645500e+02 -1.733800e+02\n13 10622     3.842600e+02 2.639000e+02\n14 10622     5.503400e+02 -1.291000e+02\n1 10623     6.608000e+02 5.386500e+02\n4 10623     5.065997e+01 -5.207100e+02\n11 10623     3.569301e+02 -1.809000e+02\n1 10624     -1.114400e+02 5.370000e+02\n10 10624     -7.069000e+02 5.934600e+02\n1 10625     8.592600e+02 5.363000e+02\n13 10625     5.028101e+02 2.938100e+02\n14 10625     6.943400e+02 -9.746002e+01\n1 10626     -6.927002e+01 5.319600e+02\n2 10626     -7.133800e+02 1.617700e+02\n5 10626     -1.919000e+01 -2.340700e+02\n8 10626     -5.041000e+02 1.128700e+02\n10 10626     -6.528500e+02 6.028000e+02\n11 10626     -2.292600e+02 -3.377200e+02\n12 10626     -7.743800e+02 3.483700e+02\n1 10627     -4.085999e+01 5.282500e+02\n2 10627     -6.841400e+02 1.646100e+02\n5 10627     8.659973e+00 -2.313500e+02\n7 10627     -6.169500e+02 4.430100e+02\n8 10627     -4.806300e+02 1.153600e+02\n10 10627     -6.180800e+02 6.088800e+02\n11 10627     -2.035500e+02 -3.349500e+02\n12 10627     -7.420000e+02 3.554700e+02\n1 10628     1.985800e+02 5.273600e+02\n5 10628     2.391200e+02 -1.751200e+02\n7 10628     -3.899600e+02 5.264900e+02\n8 10628     -2.902800e+02 1.744000e+02\n12 10628     -4.849100e+02 4.573000e+02\n1 10629     3.070400e+02 5.267700e+02\n2 10629     -3.528500e+02 2.605600e+02\n3 10629     -4.815900e+02 -7.100000e+01\n4 10629     1.959003e+01 -3.202100e+02\n5 10629     3.392100e+02 -1.492600e+02\n6 10629     -5.543500e+02 5.090500e+02\n7 10629     -2.927100e+02 5.615800e+02\n8 10629     -2.115000e+02 1.975800e+02\n11 10629     8.715002e+01 -2.652200e+02\n12 10629     -3.772800e+02 5.010600e+02\n1 10630     -9.402002e+01 5.240400e+02\n5 10630     -4.396997e+01 -2.480600e+02\n14 10630     -1.263500e+02 -3.418800e+02\n1 10631     6.518000e+02 5.165700e+02\n2 10631     -8.397998e+01 3.322500e+02\n6 10631     -2.298100e+02 6.514000e+02\n8 10631     1.139001e+01 2.589600e+02\n12 10631     -6.479999e+01 6.134200e+02\n13 10631     3.765400e+02 2.377000e+02\n14 10631     5.415200e+02 -1.604900e+02\n1 10632     8.323999e+01 5.109100e+02\n2 10632     -5.540800e+02 1.806700e+02\n8 10632     -3.751700e+02 1.306300e+02\n11 10632     -9.414001e+01 -3.244100e+02\n12 10632     -5.982000e+02 3.897400e+02\n14 10632     4.729999e+01 -3.101100e+02\n1 10633     1.574700e+02 5.101300e+02\n5 10633     2.028300e+02 -2.024000e+02\n11 10633     -3.226001e+01 -3.100300e+02\n12 10633     -5.200100e+02 4.207900e+02\n1 10634     8.507800e+02 5.061200e+02\n2 10634     4.750000e+01 3.603400e+02\n5 10634     8.029000e+02 -4.303003e+01\n6 10634     -6.681000e+01 7.140100e+02\n8 10634     1.203100e+02 2.843100e+02\n9 10634     -1.149400e+02 3.886400e+02\n11 10634     5.018199e+02 -1.663700e+02\n13 10634     5.046300e+02 2.715900e+02\n14 10634     6.977100e+02 -1.238200e+02\n1 10635     8.442500e+02 5.028800e+02\n2 10635     4.419000e+01 3.563800e+02\n3 10635     -1.029600e+02 2.116998e+01\n5 10635     7.985400e+02 -4.725000e+01\n6 10635     -7.070001e+01 7.079900e+02\n8 10635     1.178000e+02 2.809100e+02\n9 10635     -1.174600e+02 3.850400e+02\n11 10635     4.985699e+02 -1.697100e+02\n13 10635     5.013800e+02 2.681100e+02\n14 10635     6.938199e+02 -1.279900e+02\n1 10636     -3.221997e+01 4.988800e+02\n7 10636     -5.969900e+02 4.163200e+02\n13 10636     -1.135500e+02 6.241998e+01\n1 10637     7.834003e+01 4.989600e+02\n2 10637     -5.550400e+02 1.650200e+02\n4 10637     -9.619995e+00 -1.951100e+02\n5 10637     1.292100e+02 -2.332300e+02\n7 10637     -4.906300e+02 4.567900e+02\n8 10637     -3.756900e+02 1.185100e+02\n11 10637     -9.678003e+01 -3.358000e+02\n12 10637     -5.975000e+02 3.739800e+02\n13 10637     -2.765002e+01 8.964999e+01\n14 10637     4.466998e+01 -3.236300e+02\n1 10638     8.546500e+02 4.949400e+02\n6 10638     -6.023999e+01 7.040600e+02\n9 10638     -1.099700e+02 3.809300e+02\n1 10639     7.748300e+02 4.921100e+02\n5 10639     7.462200e+02 -7.103003e+01\n9 10639     -1.510700e+02 3.645500e+02\n1 10640     -1.019400e+02 4.885800e+02\n7 10640     -6.620000e+02 3.805600e+02\n11 10640     -2.519600e+02 -3.812900e+02\n1 10641     -4.519000e+01 4.879400e+02\n7 10641     -6.035400e+02 4.018100e+02\n1 10642     4.862000e+02 4.860300e+02\n4 10642     9.559998e+00 -4.233800e+02\n5 10642     5.052400e+02 -1.449300e+02\n7 10642     -1.277900e+02 5.810200e+02\n1 10643     3.382700e+02 4.841300e+02\n7 10643     -2.518500e+02 5.318700e+02\n1 10644     5.021002e+01 4.801500e+02\n12 10644     -6.199400e+02 3.435500e+02\n1 10645     -1.369500e+02 4.770900e+02\n7 10645     -6.914500e+02 3.559200e+02\n15 10645     -7.306900e+02 5.519300e+02\n1 10646     1.005900e+02 4.594600e+02\n5 10646     1.567600e+02 -2.684600e+02\n8 10646     -3.478900e+02 8.757999e+01\n11 10646     -7.045001e+01 -3.648800e+02\n14 10646     7.290002e+01 -3.581600e+02\n1 10647     3.001001e+01 4.466300e+02\n2 10647     -5.897300e+02 8.600000e+01\n4 10647     -4.169000e+01 -1.689400e+02\n5 10647     8.785999e+01 -3.003000e+02\n7 10647     -5.173000e+02 3.871700e+02\n11 10647     -1.293700e+02 -3.908200e+02\n13 10647     -5.657001e+01 3.420001e+01\n1 10648     -2.315997e+01 4.401000e+02\n5 10648     3.745001e+01 -3.197200e+02\n8 10648     -4.450100e+02 3.434000e+01\n12 10648     -6.821500e+02 2.582400e+02\n13 10648     -9.617999e+01 1.575000e+01\n14 10648     -4.310999e+01 -4.122700e+02\n15 10648     -5.602900e+02 5.549700e+02\n1 10649     7.670400e+02 4.300000e+02\n5 10649     7.580800e+02 -1.290000e+02\n6 10649     -1.008100e+02 6.060200e+02\n9 10649     -1.360800e+02 3.141200e+02\n11 10649     4.685500e+02 -2.382100e+02\n13 10649     4.695601e+02 2.008600e+02\n1 10650     4.643600e+02 4.292900e+02\n2 10650     -1.983200e+02 1.985600e+02\n7 10650     -1.270100e+02 5.219300e+02\n13 10650     2.665900e+02 1.290500e+02\n1 10651     4.734998e+01 4.262600e+02\n2 10651     -5.665200e+02 6.626001e+01\n7 10651     -4.933100e+02 3.732900e+02\n13 10651     -3.956000e+01 2.121997e+01\n1 10652     8.657900e+02 4.224700e+02\n6 10652     -2.577002e+01 6.362800e+02\n1 10653     2.481700e+02 4.213000e+02\n5 10653     3.022900e+02 -2.704800e+02\n6 10653     -5.698500e+02 3.525400e+02\n9 10653     -4.662400e+02 1.696700e+02\n10 10653     -2.504400e+02 5.927500e+02\n12 10653     -3.917800e+02 3.599800e+02\n1 10654     2.321300e+02 4.199400e+02\n7 10654     -3.222700e+02 4.351400e+02\n9 10654     -4.772600e+02 1.654900e+02\n1 10655     2.321300e+02 4.199400e+02\n2 10655     -3.899300e+02 1.181500e+02\n8 10655     -2.404800e+02 8.479001e+01\n1 10656     3.599200e+02 4.183000e+02\n6 10656     -4.566700e+02 4.067300e+02\n9 10656     -3.837700e+02 2.017400e+02\n1 10657     3.639600e+02 4.158200e+02\n7 10657     -2.063700e+02 4.763400e+02\n9 10657     -3.804400e+02 1.985800e+02\n14 10657     3.224900e+02 -3.309900e+02\n1 10658     7.696600e+02 4.153000e+02\n13 10658     4.750800e+02 1.899800e+02\n1 10659     3.151600e+02 4.129800e+02\n7 10659     -2.478500e+02 4.580300e+02\n1 10660     2.387200e+02 4.062700e+02\n2 10660     -3.799300e+02 1.055800e+02\n5 10660     2.961801e+02 -2.888700e+02\n6 10660     -5.717600e+02 3.296600e+02\n7 10660     -3.116400e+02 4.237500e+02\n9 10660     -4.679200e+02 1.519300e+02\n14 10660     2.109000e+02 -3.754700e+02\n1 10661     4.770800e+02 4.039200e+02\n4 10661     -3.812000e+01 -4.232200e+02\n6 10661     -3.411200e+02 4.474400e+02\n8 10661     -6.919000e+01 1.326800e+02\n1 10662     3.630900e+02 4.033600e+02\n2 10662     -2.716100e+02 1.414400e+02\n5 10662     4.120400e+02 -2.589100e+02\n6 10662     -4.467600e+02 3.906500e+02\n7 10662     -2.027300e+02 4.647300e+02\n1 10663     5.008900e+02 4.020800e+02\n7 10663     -8.742999e+01 5.096100e+02\n11 10663     2.737900e+02 -3.213500e+02\n12 10663     -1.476000e+02 4.449100e+02\n14 10663     4.467000e+02 -3.047100e+02\n1 10664     2.266200e+02 4.000300e+02\n7 10664     -3.199500e+02 4.138400e+02\n9 10664     -4.756300e+02 1.417400e+02\n1 10665     7.938600e+02 3.994700e+02\n13 10665     4.939900e+02 1.846300e+02\n14 10665     6.886500e+02 -2.292400e+02\n1 10666     5.987800e+02 3.963300e+02\n5 10666     6.235200e+02 -2.032300e+02\n7 10666     -8.179993e+00 5.349800e+02\n13 10666     3.658700e+02 1.363400e+02\n14 10666     5.303800e+02 -2.841100e+02\n1 10667     -6.451100e+02 3.935700e+02\n4 10667     -1.046700e+02 2.193800e+02\n1 10668     7.557100e+02 3.895600e+02\n2 10668     2.456000e+01 2.349900e+02\n6 10668     -9.210999e+01 5.605300e+02\n7 10668     1.166200e+02 5.779400e+02\n9 10668     -1.287900e+02 2.799600e+02\n12 10668     6.921997e+01 5.259300e+02\n13 10668     4.729500e+02 1.693500e+02\n1 10669     7.795500e+02 3.896100e+02\n6 10669     -7.390997e+01 5.692900e+02\n13 10669     4.871300e+02 1.745200e+02\n14 10669     6.802800e+02 -2.415200e+02\n1 10670     6.447000e+02 3.864400e+02\n2 10670     -5.107001e+01 2.063200e+02\n4 10670     -3.559003e+01 -5.262400e+02\n5 10670     6.661600e+02 -2.003500e+02\n6 10670     -1.841700e+02 5.098000e+02\n9 10670     -1.926900e+02 2.508400e+02\n12 10670     -1.925000e+01 4.852000e+02\n14 10670     5.718400e+02 -2.781900e+02\n1 10671     2.314301e+02 3.864600e+02\n2 10671     -3.800400e+02 8.095001e+01\n5 10671     2.931200e+02 -3.109400e+02\n6 10671     -5.709000e+02 3.012700e+02\n7 10671     -3.104700e+02 4.033900e+02\n8 10671     -2.328400e+02 5.467001e+01\n9 10671     -4.673700e+02 1.296200e+02\n10 10671     -2.557800e+02 5.461300e+02\n11 10671     5.584003e+01 -3.990600e+02\n14 10671     2.089200e+02 -3.970000e+02\n1 10672     6.390699e+02 3.832900e+02\n5 10672     6.619700e+02 -2.057800e+02\n6 10672     -1.877700e+02 5.018300e+02\n7 10672     2.753998e+01 5.368300e+02\n9 10672     -1.948600e+02 2.454900e+02\n11 10672     3.870900e+02 -3.036900e+02\n12 10672     -2.271002e+01 4.777500e+02\n13 10672     3.960200e+02 1.368600e+02\n14 10672     5.681801e+02 -2.847800e+02\n1 10673     4.833900e+02 3.818500e+02\n2 10673     -1.685600e+02 1.539100e+02\n5 10673     5.263700e+02 -2.478800e+02\n7 10673     -9.501001e+01 4.855000e+02\n9 10673     -2.895900e+02 2.019100e+02\n14 10673     4.365699e+02 -3.300900e+02\n1 10674     6.250601e+02 3.806600e+02\n7 10674     1.741998e+01 5.294000e+02\n8 10674     2.769000e+01 1.486600e+02\n11 10674     3.768600e+02 -3.091800e+02\n13 10674     3.869800e+02 1.311800e+02\n14 10674     5.569900e+02 -2.913300e+02\n1 10675     6.419800e+02 3.795600e+02\n2 10675     -5.092999e+01 1.971900e+02\n1 10676     6.714200e+02 3.777500e+02\n7 10676     5.421997e+01 5.411600e+02\n14 10676     5.962900e+02 -2.814000e+02\n1 10677     4.817900e+02 3.755100e+02\n2 10677     -1.686200e+02 1.463200e+02\n3 10677     -3.056400e+02 -1.846700e+02\n5 10677     5.251600e+02 -2.550900e+02\n7 10677     -9.491998e+01 4.790800e+02\n8 10677     -5.889001e+01 1.102500e+02\n9 10677     -2.895500e+02 1.953200e+02\n11 10677     2.654100e+02 -3.480900e+02\n13 10677     2.896600e+02 9.151999e+01\n14 10677     4.359200e+02 -3.369800e+02\n1 10678     5.127500e+02 3.740500e+02\n7 10678     -6.920001e+01 4.879600e+02\n9 10678     -2.690600e+02 2.032600e+02\n13 10678     3.115699e+02 9.887000e+01\n1 10679     4.775601e+02 3.692200e+02\n2 10679     -1.695600e+02 1.387800e+02\n3 10679     -3.073200e+02 -1.927600e+02\n7 10679     -9.635999e+01 4.721300e+02\n9 10679     -2.905200e+02 1.887200e+02\n13 10679     2.878600e+02 8.554999e+01\n14 10679     4.338600e+02 -3.442000e+02\n1 10680     4.775601e+02 3.692200e+02\n7 10680     -9.635999e+01 4.721300e+02\n14 10680     4.338600e+02 -3.442000e+02\n1 10681     5.174000e+02 3.674200e+02\n2 10681     -1.383800e+02 1.487300e+02\n7 10681     -6.340002e+01 4.834200e+02\n9 10681     -2.643800e+02 1.982600e+02\n13 10681     3.163101e+02 9.432001e+01\n14 10681     4.692000e+02 -3.345900e+02\n1 10682     4.714100e+02 3.352600e+02\n13 10682     2.987800e+02 5.860999e+01\n14 10682     4.475601e+02 -3.786300e+02\n1 10683     -6.327002e+01 3.250300e+02\n13 10683     -9.833002e+01 -9.229999e+01\n14 10683     -5.434998e+01 -5.498600e+02\n15 10683     -5.517200e+02 3.831300e+02\n1 10684     -1.420500e+02 3.227500e+02\n7 10684     -6.289000e+02 1.978100e+02\n10 10684     -6.415700e+02 3.262800e+02\n14 10684     -1.343600e+02 -5.766600e+02\n1 10685     -1.452000e+02 3.192400e+02\n7 10685     -6.302500e+02 1.935700e+02\n13 10685     -1.618600e+02 -1.198700e+02\n1 10686     8.638700e+02 3.184400e+02\n2 10686     2.586300e+02 3.122400e+02\n7 10686     2.698900e+02 5.708200e+02\n9 10686     7.514001e+01 3.544800e+02\n12 10686     2.744301e+02 5.572000e+02\n14 10686     8.729600e+02 -2.709800e+02\n1 10687     6.882700e+02 3.100500e+02\n13 10687     4.595601e+02 9.531000e+01\n14 10687     6.486600e+02 -3.389100e+02\n1 10688     5.127300e+02 3.005700e+02\n5 10688     5.968800e+02 -3.193100e+02\n6 10688     -2.284800e+02 3.605900e+02\n7 10688     -3.328003e+01 4.276300e+02\n10 10688     7.626001e+01 5.607400e+02\n11 10688     3.152000e+02 -4.024500e+02\n13 10688     3.460000e+02 4.420001e+01\n14 10688     5.073300e+02 -3.989200e+02\n1 10689     4.669200e+02 2.985500e+02\n6 10689     -2.655900e+02 3.353400e+02\n11 10689     2.782300e+02 -4.159500e+02\n14 10689     4.692200e+02 -4.150200e+02\n1 10690     5.541700e+02 2.978600e+02\n2 10690     -5.248999e+01 1.163900e+02\n6 10690     -1.891400e+02 3.793800e+02\n9 10690     -1.871600e+02 1.740000e+02\n13 10690     3.764600e+02 5.282001e+01\n14 10690     5.458400e+02 -3.891300e+02\n1 10691     4.662900e+02 2.937900e+02\n6 10691     -2.614600e+02 3.309400e+02\n11 10691     2.792200e+02 -4.203000e+02\n1 10692     -2.904300e+02 2.840600e+02\n7 10692     -7.569700e+02 9.706000e+01\n1 10693     4.229000e+02 2.672800e+02\n6 10693     -2.724000e+02 2.838000e+02\n11 10693     2.527900e+02 -4.543200e+02\n13 10693     3.012600e+02 -3.710022e+00\n15 10693     9.115997e+01 5.445600e+02\n1 10694     -3.545000e+02 2.600800e+02\n13 10694     -3.098600e+02 -2.292300e+02\n1 10695     -3.545000e+02 2.600800e+02\n7 10695     -8.110500e+02 4.451001e+01\n13 10695     -3.098600e+02 -2.292300e+02\n1 10696     -2.025500e+02 2.569700e+02\n4 10696     -1.620000e+02 -5.831000e+01\n7 10696     -6.474000e+02 1.123800e+02\n10 10696     -6.732600e+02 2.258500e+02\n1 10697     4.207100e+02 2.563000e+02\n11 10697     2.540900e+02 -4.644200e+02\n12 10697     -1.199700e+02 2.836800e+02\n15 10697     9.525000e+01 5.298100e+02\n1 10698     4.207100e+02 2.563000e+02\n6 10698     -2.627000e+02 2.726700e+02\n11 10698     2.540900e+02 -4.644200e+02\n12 10698     -1.199700e+02 2.836800e+02\n15 10698     9.525000e+01 5.298100e+02\n1 10699     4.266300e+02 2.542600e+02\n5 10699     5.510500e+02 -3.894000e+02\n6 10699     -2.561400e+02 2.736000e+02\n10 10699     1.176001e+01 4.789400e+02\n11 10699     2.600699e+02 -4.646700e+02\n14 10699     4.637600e+02 -4.699200e+02\n1 10700     4.087600e+02 2.495000e+02\n6 10700     -2.655100e+02 2.605900e+02\n11 10700     2.473600e+02 -4.739600e+02\n12 10700     -1.253400e+02 2.726300e+02\n15 10700     8.565997e+01 5.153000e+02\n1 10701     4.183000e+02 2.451200e+02\n6 10701     -2.536900e+02 2.611600e+02\n12 10701     -1.139800e+02 2.734200e+02\n1 10702     4.426899e+02 2.436000e+02\n6 10702     -2.298500e+02 2.731400e+02\n11 10702     2.771000e+02 -4.699600e+02\n1 10703     3.491300e+02 2.386400e+02\n10 10703     -5.917999e+01 4.321800e+02\n11 10703     1.993500e+02 -4.987100e+02\n1 10704     3.763700e+02 2.334600e+02\n4 10704     -1.423100e+02 -4.040300e+02\n5 10704     5.195699e+02 -4.247900e+02\n6 10704     -2.767000e+02 2.269600e+02\n11 10704     2.249000e+02 -4.966200e+02\n1 10705     -3.399600e+02 2.325100e+02\n7 10705     -7.751000e+02 2.744000e+01\n1 10706     8.579700e+02 2.316200e+02\n3 10706     1.573900e+02 -7.915997e+01\n7 10706     2.981899e+02 4.994400e+02\n9 10706     1.106800e+02 2.995800e+02\n1 10707     3.489399e+02 2.293100e+02\n7 10707     -1.268100e+02 3.113500e+02\n10 10707     -5.522998e+01 4.213600e+02\n11 10707     2.021700e+02 -5.081000e+02\n13 10707     2.691000e+02 -5.284998e+01\n14 10707     4.108600e+02 -5.206899e+02\n1 10708     -5.017900e+02 2.182600e+02\n13 10708     -4.208600e+02 -3.098100e+02\n1 10709     -1.658200e+02 2.182600e+02\n15 10709     -6.181500e+02 1.941400e+02\n1 10710     3.806000e+02 2.164700e+02\n6 10710     -2.567100e+02 2.145600e+02\n7 10710     -9.273999e+01 3.130200e+02\n10 10710     -1.470001e+01 4.215600e+02\n13 10710     2.994399e+02 -5.265997e+01\n14 10710     4.502100e+02 -5.215300e+02\n1 10711     3.806000e+02 2.164700e+02\n4 10711     -1.514300e+02 -4.114600e+02\n5 10711     5.358199e+02 -4.403400e+02\n6 10711     -2.567100e+02 2.145600e+02\n7 10711     -9.273999e+01 3.130200e+02\n1 10712     3.867500e+02 2.133400e+02\n5 10712     5.426600e+02 -4.420601e+02\n6 10712     -2.483200e+02 2.147600e+02\n13 10712     3.059500e+02 -5.319000e+01\n14 10712     4.576300e+02 -5.228199e+02\n1 10713     2.137100e+02 2.106200e+02\n7 10713     -2.300500e+02 2.452200e+02\n1 10714     4.346300e+02 2.054900e+02\n6 10714     -1.981800e+02 2.337500e+02\n1 10715     1.372300e+02 2.031800e+02\n6 10715     -4.720000e+02 6.309003e+01\n1 10716     -3.794400e+02 2.022400e+02\n13 10716     -2.977800e+02 -2.854100e+02\n1 10717     5.653900e+02 1.871000e+02\n5 10717     7.220000e+02 -4.154900e+02\n6 10717     -7.079999e+01 2.846100e+02\n10 10717     1.831900e+02 4.615900e+02\n13 10717     4.421500e+02 -2.395001e+01\n14 10717     6.318600e+02 -4.912900e+02\n1 10718     4.488900e+02 1.855200e+02\n10 10718     6.833002e+01 4.142600e+02\n1 10719     -2.919000e+01 1.740100e+02\n2 10719     -4.244700e+02 -1.756200e+02\n4 10719     -2.012800e+02 -1.758600e+02\n5 10719     1.638500e+02 -6.094399e+02\n7 10719     -4.269100e+02 1.149900e+02\n13 10719     1.439001e+01 -2.014100e+02\n15 10719     -4.112600e+02 2.075600e+02\n1 10720     2.929000e+02 1.702900e+02\n7 10720     -5.219000e+01 2.831500e+02\n10 10720     -2.777002e+01 3.443100e+02\n14 10720     5.716300e+02 -5.641000e+02\n15 10720     4.357001e+01 3.761100e+02\n1 10721     2.929000e+02 1.702900e+02\n7 10721     -5.219000e+01 2.831500e+02\n15 10721     4.357001e+01 3.761100e+02\n1 10722     8.120699e+02 1.540800e+02\n6 10722     2.000400e+02 3.917500e+02\n7 10722     2.893800e+02 4.200200e+02\n8 10722     3.085900e+02 1.112800e+02\n13 10722     6.537000e+02 2.463000e+01\n1 10723     3.200012e+00 1.478500e+02\n7 10723     -3.804700e+02 1.059300e+02\n15 10723     -3.529800e+02 1.908700e+02\n1 10724     3.200012e+00 1.478500e+02\n7 10724     -3.804700e+02 1.059300e+02\n15 10724     -3.529800e+02 1.908700e+02\n1 10725     2.387300e+02 1.473800e+02\n15 10725     -5.599976e+00 3.220100e+02\n1 10726     -5.062000e+01 1.396000e+02\n7 10726     -4.249000e+02 7.579999e+01\n1 10727     6.632001e+01 1.391500e+02\n4 10727     -2.103900e+02 -2.880500e+02\n10 10727     -2.717300e+02 2.152000e+02\n13 10727     1.927200e+02 -1.804500e+02\n1 10728     6.632001e+01 1.391500e+02\n4 10728     -2.103900e+02 -2.880500e+02\n5 10728     4.006300e+02 -5.980900e+02\n10 10728     -2.717300e+02 2.152000e+02\n12 10728     -2.681900e+02 7.632001e+01\n13 10728     1.927200e+02 -1.804500e+02\n1 10729     2.369800e+02 1.383500e+02\n7 10729     -7.498999e+01 2.389000e+02\n1 10730     2.437200e+02 1.312500e+02\n15 10730     1.107001e+01 3.052800e+02\n1 10731     6.439399e+02 1.197800e+02\n7 10731     1.647900e+02 3.294400e+02\n1 10732     1.233400e+02 1.069100e+02\n15 10732     -1.330000e+02 2.128300e+02\n1 10733     1.233400e+02 1.069100e+02\n15 10733     -1.330000e+02 2.128300e+02\n1 10734     1.737800e+02 1.011300e+02\n4 10734     -2.231100e+02 -4.015300e+02\n1 10735     -1.995100e+02 9.213000e+01\n15 10735     -5.794600e+02 1.496997e+01\n1 10736     6.358199e+02 8.951999e+01\n7 10736     1.747400e+02 3.039000e+02\n15 10736     4.419000e+02 4.307000e+02\n1 10737     6.727200e+02 8.254999e+01\n10 10737     3.374301e+02 3.955300e+02\n1 10738     1.828900e+02 7.954001e+01\n6 10738     -5.526001e+01 7.728998e+01\n7 10738     -9.151001e+01 1.664900e+02\n8 10738     1.345700e+02 1.326001e+01\n13 10738     3.681300e+02 -1.764200e+02\n1 10739     8.749200e+02 6.652002e+01\n7 10739     4.005000e+02 3.861100e+02\n8 10739     4.367100e+02 1.261200e+02\n9 10739     2.528000e+02 2.546600e+02\n12 10739     4.594200e+02 3.778800e+02\n15 10739     7.518300e+02 5.211900e+02\n1 10740     2.282000e+02 6.212000e+01\n3 10740     9.159998e+01 -2.266400e+02\n4 10740     -2.448300e+02 -4.561600e+02\n8 10740     1.841000e+02 2.445001e+01\n9 10740     4.257001e+01 1.636800e+02\n1 10741     -4.172600e+02 6.152002e+01\n15 10741     -8.578700e+02 -1.459600e+02\n1 10742     9.133002e+01 5.514001e+01\n15 10742     -1.464900e+02 1.310700e+02\n1 10743     5.973600e+02 5.398999e+01\n10 10743     2.790800e+02 3.367200e+02\n1 10744     3.299700e+02 5.140997e+01\n15 10744     1.631000e+02 2.511200e+02\n1 10745     1.917800e+02 4.444000e+01\n7 10745     -6.392999e+01 1.409000e+02\n10 10745     -6.707001e+01 1.707900e+02\n1 10746     4.631400e+02 4.326001e+01\n15 10746     3.204301e+02 3.052600e+02\n1 10747     4.631400e+02 4.326001e+01\n10 10747     2.073199e+02 2.801500e+02\n15 10747     3.204301e+02 3.052600e+02\n1 10748     -7.070007e+00 4.128998e+01\n4 10748     -2.770900e+02 -2.743200e+02\n6 10748     -2.634600e+02 -1.039900e+02\n8 10748     -3.272998e+01 -1.264700e+02\n10 10748     -2.924800e+02 7.906000e+01\n15 10748     -2.637700e+02 6.210999e+01\n1 10749     5.619000e+01 4.179999e+01\n7 10749     -2.027300e+02 7.003998e+01\n1 10750     1.528998e+01 2.850000e+01\n15 10750     -2.295700e+02 5.760999e+01\n1 10751     1.227300e+02 2.338000e+01\n2 10751     9.865997e+01 -1.634003e+01\n3 10751     1.254999e+01 -3.269300e+02\n4 10751     -2.788600e+02 -3.799500e+02\n6 10751     -8.379001e+01 -1.896002e+01\n7 10751     -1.237500e+02 8.851999e+01\n13 10751     3.350900e+02 -2.405000e+02\n1 10752     -1.881300e+02 2.325000e+01\n7 10752     -4.836100e+02 -8.850000e+01\n15 10752     -5.210600e+02 -6.609998e+01\n1 10753     8.567400e+02 -1.130005e+00\n9 10753     2.686500e+02 2.032100e+02\n15 10753     7.610500e+02 4.313400e+02\n1 10754     4.945000e+02 -1.160999e+01\n15 10754     3.840699e+02 2.542900e+02\n1 10755     -1.714800e+02 -1.765997e+01\n8 10755     -2.476400e+02 -3.396500e+02\n9 10755     -3.931700e+02 -2.610400e+02\n1 10756     3.974700e+02 -1.721002e+01\n10 10756     1.741700e+02 1.911200e+02\n1 10757     -1.771000e+02 -2.265002e+01\n2 10757     -3.518700e+02 -3.918500e+02\n6 10757     -5.291700e+02 -3.612400e+02\n7 10757     -4.427800e+02 -1.242800e+02\n8 10757     -2.461300e+02 -3.441600e+02\n9 10757     -3.921800e+02 -2.667100e+02\n13 10757     9.989990e+00 -4.069800e+02\n1 10758     8.517700e+02 -2.603998e+01\n7 10758     4.156600e+02 3.028600e+02\n1 10759     4.890500e+02 -2.740002e+01\n10 10759     2.619900e+02 2.182200e+02\n15 10759     3.863600e+02 2.330300e+02\n1 10760     2.477100e+02 -3.284003e+01\n4 10760     -3.095200e+02 -4.952400e+02\n1 10761     1.846300e+02 -3.515997e+01\n4 10761     -3.152300e+02 -4.433300e+02\n6 10761     3.402002e+01 -2.602002e+01\n8 10761     2.040000e+02 -6.200000e+01\n9 10761     7.294000e+01 7.867999e+01\n10 10761     -3.803003e+01 8.446002e+01\n12 10761     4.465002e+01 2.559998e+01\n15 10761     2.877002e+01 7.073999e+01\n1 10762     8.647800e+02 -4.046002e+01\n3 10762     3.683400e+02 -2.128000e+02\n6 10762     4.196300e+02 2.710000e+02\n8 10762     4.737700e+02 5.420999e+01\n12 10762     5.044100e+02 2.803800e+02\n1 10763     8.919983e+00 -4.570001e+01\n2 10763     3.521002e+01 -1.463400e+02\n3 10763     -4.039001e+01 -4.543199e+02\n8 10763     5.410999e+01 -1.658900e+02\n10 10763     -2.295600e+02 -5.880005e+00\n12 10763     -1.477000e+02 -1.072700e+02\n15 10763     -1.917100e+02 -3.646997e+01\n1 10764     3.645100e+02 -4.977002e+01\n6 10764     2.012100e+02 6.987000e+01\n10 10764     1.551000e+02 1.459600e+02\n12 10764     2.267900e+02 1.156900e+02\n1 10765     3.645100e+02 -4.977002e+01\n10 10765     1.551000e+02 1.459600e+02\n1 10766     1.947600e+02 -5.108002e+01\n8 10766     2.210600e+02 -6.935999e+01\n1 10767     4.712900e+02 -5.198999e+01\n15 10767     3.790400e+02 1.944600e+02\n1 10768     1.970100e+02 -6.648999e+01\n6 10768     6.715002e+01 -4.812000e+01\n9 10768     9.927002e+01 6.281000e+01\n1 10769     7.788000e+01 -7.491998e+01\n4 10769     -3.517700e+02 -3.687100e+02\n6 10769     -5.276001e+01 -1.425200e+02\n7 10769     -1.161200e+02 -1.907001e+01\n9 10769     9.409973e+00 -1.494000e+01\n10 10769     -1.389400e+02 -5.750000e+00\n12 10769     -4.769000e+01 -8.901001e+01\n13 10769     3.393900e+02 -3.339100e+02\n15 10769     -8.622998e+01 -3.540997e+01\n1 10770     2.103900e+02 -7.581000e+01\n2 10770     2.646500e+02 -3.876001e+01\n3 10770     1.732800e+02 -3.436000e+02\n6 10770     8.640997e+01 -4.745001e+01\n7 10770     8.969971e+00 4.446997e+01\n8 10770     2.445500e+02 -8.071002e+01\n10 10770     5.929993e+00 5.228003e+01\n13 10770     4.543800e+02 -2.867700e+02\n15 10770     8.296002e+01 3.492999e+01\n1 10771     3.730601e+02 -8.273999e+01\n2 10771     3.877300e+02 2.921997e+01\n7 10771     1.484200e+02 1.082200e+02\n8 10771     3.509600e+02 -2.378000e+01\n10 10771     1.760800e+02 1.160600e+02\n15 10771     2.828700e+02 1.109900e+02\n1 10772     3.730601e+02 -8.273999e+01\n2 10772     3.877300e+02 2.921997e+01\n6 10772     2.243800e+02 4.483002e+01\n1 10773     2.475000e+02 -8.985999e+01\n3 10773     2.113300e+02 -3.350600e+02\n4 10773     -3.513000e+02 -5.073700e+02\n6 10773     1.306300e+02 -3.733002e+01\n7 10773     4.882001e+01 4.900000e+01\n8 10773     2.793900e+02 -7.479999e+01\n1 10774     3.522600e+02 -9.470001e+01\n6 10774     2.171500e+02 2.058002e+01\n8 10774     3.449700e+02 -3.919000e+01\n1 10775     3.267100e+02 -1.057500e+02\n8 10775     3.355800e+02 -5.585999e+01\n1 10776     3.267100e+02 -1.057500e+02\n8 10776     3.355800e+02 -5.585999e+01\n1 10777     5.391000e+02 -1.208100e+02\n10 10777     3.434000e+02 1.427000e+02\n15 10777     4.858900e+02 1.440700e+02\n1 10778     2.850699e+02 -1.263400e+02\n7 10778     9.428998e+01 3.294000e+01\n8 10778     3.169300e+02 -8.954999e+01\n10 10778     1.051800e+02 3.200000e+01\n12 10778     1.994200e+02 -6.059998e+00\n13 10778     5.281300e+02 -3.030400e+02\n1 10779     -4.946500e+02 -1.297900e+02\n7 10779     -6.922300e+02 -3.898800e+02\n15 10779     -8.385800e+02 -4.423900e+02\n1 10780     1.731700e+02 -1.293900e+02\n15 10780     6.713000e+01 -5.000000e+01\n1 10781     8.289800e+02 -1.354100e+02\n7 10781     4.384399e+02 2.064000e+02\n10 10781     5.894399e+02 2.391500e+02\n1 10782     8.289800e+02 -1.354100e+02\n7 10782     4.384399e+02 2.064000e+02\n15 10782     7.912000e+02 2.591900e+02\n1 10783     7.757001e+01 -1.377100e+02\n3 10783     1.158900e+02 -4.696700e+02\n4 10783     -3.979800e+02 -3.874800e+02\n6 10783     6.599976e+00 -1.954600e+02\n7 10783     -8.032001e+01 -7.192999e+01\n8 10783     1.805800e+02 -1.880900e+02\n10 10783     -1.080500e+02 -7.207001e+01\n15 10783     -5.026001e+01 -1.121800e+02\n1 10784     4.854200e+02 -1.400400e+02\n7 10784     2.474500e+02 9.967001e+01\n10 10784     3.024500e+02 1.016200e+02\n15 10784     4.358900e+02 9.514001e+01\n1 10785     6.060800e+02 -1.410400e+02\n7 10785     3.238000e+02 1.393100e+02\n1 10786     1.866998e+01 -1.488800e+02\n2 10786     1.073200e+02 -2.551600e+02\n3 10786     3.403998e+01 -5.605800e+02\n4 10786     -4.123000e+02 -3.313200e+02\n6 10786     -7.697998e+01 -2.689000e+02\n8 10786     1.117800e+02 -2.549700e+02\n9 10786     -4.900024e+00 -1.223500e+02\n10 10786     -1.739600e+02 -1.124200e+02\n15 10786     -1.254000e+02 -1.605400e+02\n1 10787     2.225800e+02 -1.536400e+02\n7 10787     5.789001e+01 -1.627002e+01\n1 10788     -3.799200e+02 -1.575500e+02\n7 10788     -5.534900e+02 -3.493300e+02\n1 10789     2.556899e+02 -1.590400e+02\n7 10789     8.748999e+01 -6.719971e+00\n1 10790     8.241801e+02 -1.696300e+02\n6 10790     4.493900e+02 1.317200e+02\n8 10790     4.977000e+02 -5.128000e+01\n10 10790     5.975300e+02 2.033100e+02\n13 10790     8.172900e+02 -2.011000e+02\n1 10791     2.380005e+00 -1.723000e+02\n10 10791     -1.858400e+02 -1.457200e+02\n1 10792     -6.465900e+02 -1.911500e+02\n4 10792     -4.901300e+02 1.559700e+02\n1 10793     5.436300e+02 -1.957400e+02\n10 10793     3.792300e+02 6.921997e+01\n1 10794     1.590300e+02 -1.976900e+02\n15 10794     8.584003e+01 -1.409300e+02\n1 10795     -2.398900e+02 -1.972600e+02\n7 10795     -3.914700e+02 -3.089500e+02\n13 10795     6.008002e+01 -5.749200e+02\n1 10796     -2.189900e+02 -2.192300e+02\n6 10796     -3.354100e+02 -5.710500e+02\n9 10796     -2.086200e+02 -3.968600e+02\n15 10796     -4.064800e+02 -3.879000e+02\n1 10797     -6.329100e+02 -2.244800e+02\n4 10797     -5.154500e+02 1.426200e+02\n1 10798     4.619900e+02 -2.268300e+02\n12 10798     3.981801e+02 -1.215002e+01\n1 10799     -6.424200e+02 -2.348100e+02\n4 10799     -5.256000e+02 1.480300e+02\n1 10800     -3.874300e+02 -2.347100e+02\n7 10800     -5.088200e+02 -4.235400e+02\n15 10800     -6.198800e+02 -5.110400e+02\n1 10801     5.583002e+01 -2.371600e+02\n10 10801     -9.504999e+01 -1.873100e+02\n15 10801     -3.198999e+01 -2.495100e+02\n1 10802     -5.209003e+01 -2.427100e+02\n10 10802     -2.156700e+02 -2.467400e+02\n1 10803     8.420300e+02 -2.431600e+02\n2 10803     5.916600e+02 -7.088000e+01\n8 10803     5.435500e+02 -8.809998e+01\n10 10803     6.426899e+02 1.387700e+02\n12 10803     5.880500e+02 9.031000e+01\n1 10804     -6.305800e+02 -2.447200e+02\n4 10804     -5.329700e+02 1.380800e+02\n1 10805     5.279900e+02 -2.464700e+02\n10 10805     3.858800e+02 1.207001e+01\n15 10805     5.381500e+02 -1.071002e+01\n1 10806     8.328800e+02 -2.502000e+02\n15 10806     8.492000e+02 1.271000e+02\n1 10807     -6.209100e+02 -2.518100e+02\n4 10807     -5.385800e+02 1.302400e+02\n1 10808     4.345000e+02 -2.553300e+02\n10 10808     3.076300e+02 -3.570001e+01\n15 10808     4.420100e+02 -6.741998e+01\n1 10809     -2.084700e+02 -2.582300e+02\n15 10809     -3.676300e+02 -4.316000e+02\n1 10810     -3.881100e+02 -2.587200e+02\n7 10810     -4.940400e+02 -4.455601e+02\n10 10810     -5.910300e+02 -4.384100e+02\n15 10810     -6.059800e+02 -5.419500e+02\n1 10811     8.368199e+02 -2.592900e+02\n2 10811     5.962200e+02 -8.832001e+01\n7 10811     4.906400e+02 1.126800e+02\n8 10811     5.467300e+02 -1.026600e+02\n12 10811     5.925100e+02 7.242999e+01\n13 10811     8.631700e+02 -2.645900e+02\n15 10811     8.581000e+02 1.186900e+02\n1 10812     4.075500e+02 -2.649700e+02\n2 10812     5.223101e+02 -1.068500e+02\n3 10812     4.192700e+02 -4.022100e+02\n7 10812     2.537800e+02 -3.031000e+01\n13 10812     6.719399e+02 -3.711100e+02\n1 10813     3.874600e+02 -2.653700e+02\n7 10813     2.394200e+02 -3.913000e+01\n1 10814     3.476700e+02 -2.686600e+02\n7 10814     2.120699e+02 -5.759003e+01\n1 10815     8.408000e+02 -2.775400e+02\n2 10815     6.098199e+02 -9.856000e+01\n7 10815     5.007500e+02 1.002800e+02\n8 10815     5.579301e+02 -1.117100e+02\n9 10815     3.875400e+02 2.069000e+01\n10 10815     6.545200e+02 1.049100e+02\n12 10815     6.060400e+02 5.956000e+01\n13 10815     8.741200e+02 -2.766900e+02\n15 10815     8.713101e+02 9.964001e+01\n1 10816     8.481700e+02 -2.893900e+02\n2 10816     6.221200e+02 -1.019600e+02\n7 10816     5.110100e+02 9.422000e+01\n8 10816     5.679600e+02 -1.148100e+02\n9 10816     3.982300e+02 1.838000e+01\n10 10816     6.665400e+02 9.603003e+01\n12 10816     6.186500e+02 5.451001e+01\n1 10817     -6.864400e+02 -3.218400e+02\n4 10817     -6.049200e+02 1.693800e+02\n1 10818     -6.827400e+02 -3.252300e+02\n4 10818     -6.078600e+02 1.663600e+02\n1 10819     2.216300e+02 -3.251900e+02\n10 10819     1.193200e+02 -2.015900e+02\n13 10819     5.420900e+02 -4.914399e+02\n1 10820     5.178500e+02 -3.255800e+02\n7 10820     3.279800e+02 -5.021997e+01\n15 10820     5.529100e+02 -1.134600e+02\n1 10821     3.552300e+02 -3.343300e+02\n7 10821     2.292600e+02 -1.181700e+02\n1 10822     -7.038600e+02 -3.362500e+02\n4 10822     -6.191600e+02 1.811000e+02\n1 10823     -1.939500e+02 -3.406600e+02\n6 10823     -1.687500e+02 -6.539500e+02\n7 10823     -2.548200e+02 -4.085200e+02\n9 10823     -5.492999e+01 -4.413101e+02\n1 10824     -6.386400e+02 -3.452800e+02\n4 10824     -6.227100e+02 1.308600e+02\n1 10825     -1.458200e+02 -3.457000e+02\n2 10825     6.746002e+01 -6.067000e+02\n6 10825     -1.190900e+02 -6.184800e+02\n7 10825     -2.082700e+02 -3.871700e+02\n9 10825     -1.703998e+01 -4.152300e+02\n15 10825     -2.331900e+02 -5.036200e+02\n1 10826     3.079500e+02 -3.481400e+02\n15 10826     3.332500e+02 -2.471700e+02\n1 10827     7.988600e+02 -3.521600e+02\n7 10827     5.102400e+02 3.082001e+01\n10 10827     6.514600e+02 1.616998e+01\n12 10827     6.329100e+02 -1.329999e+01\n15 10827     8.672900e+02 -6.130005e+00\n1 10828     3.051700e+02 -3.681600e+02\n10 10828     2.167000e+02 -2.088000e+02\n15 10828     3.373700e+02 -2.735700e+02\n1 10829     3.094301e+02 -3.728400e+02\n15 10829     3.445000e+02 -2.767800e+02\n1 10830     9.628998e+01 -3.744200e+02\n7 10830     3.508002e+01 -2.775000e+02\n1 10831     -1.376700e+02 -3.783100e+02\n6 10831     -7.322998e+01 -6.377400e+02\n1 10832     -1.161100e+02 -3.912400e+02\n2 10832     1.488700e+02 -6.171500e+02\n7 10832     -1.519000e+02 -4.092000e+02\n9 10832     4.991998e+01 -4.192000e+02\n12 10832     -5.877002e+01 -5.802400e+02\n1 10833     -1.358400e+02 -3.920000e+02\n6 10833     -5.935999e+01 -6.483700e+02\n7 10833     -1.696700e+02 -4.217000e+02\n9 10833     3.944000e+01 -4.321800e+02\n1 10834     5.919500e+02 -3.925500e+02\n7 10834     3.977400e+02 -7.870001e+01\n10 10834     4.868400e+02 -1.094100e+02\n12 10834     5.308600e+02 -1.422200e+02\n13 10834     7.863300e+02 -4.371500e+02\n15 10834     6.654000e+02 -1.563800e+02\n1 10835     -6.426300e+02 -3.948500e+02\n4 10835     -6.695400e+02 1.270300e+02\n1 10836     -8.362000e+01 -4.153100e+02\n2 10836     2.013101e+02 -6.120200e+02\n7 10836     -1.101600e+02 -4.124400e+02\n9 10836     9.263000e+01 -4.117100e+02\n1 10837     -2.832300e+02 -4.536200e+02\n7 10837     -2.636000e+02 -5.571500e+02\n1 10838     8.555800e+02 -4.720601e+02\n2 10838     7.692700e+02 -1.888700e+02\n7 10838     6.009500e+02 -3.338000e+01\n1 10839     8.689301e+02 -4.987000e+02\n7 10839     6.202700e+02 -4.758002e+01\n1 10840     -2.874600e+02 -5.139200e+02\n4 10840     -7.592200e+02 -1.730700e+02\n1 10841     7.086801e+02 -5.237600e+02\n7 10841     5.379200e+02 -1.277500e+02\n15 10841     8.644200e+02 -2.470600e+02\n1 10842     7.759100e+02 -5.284100e+02\n7 10842     5.810800e+02 -1.036800e+02\n12 10842     7.467100e+02 -1.519600e+02\n1 10843     8.744500e+02 -5.377000e+02\n7 10843     6.409700e+02 -7.222998e+01\n1 10844     8.230800e+02 -5.429301e+02\n7 10844     6.149200e+02 -9.566998e+01\n1 10845     -2.859985e+00 -5.548400e+02\n7 10845     4.389001e+01 -4.836200e+02\n1 10846     6.988600e+02 5.842000e+02\n4 10846     7.862000e+01 -5.380100e+02\n5 10846     6.612700e+02 -5.549988e+00\n8 10846     1.959998e+01 3.164000e+02\n11 10846     3.716100e+02 -1.385400e+02\n13 10846     3.930400e+02 2.985100e+02\n14 10846     5.600400e+02 -8.857001e+01\n1 10847     6.506400e+02 5.796200e+02\n2 10847     -1.047800e+02 3.900900e+02\n5 10847     6.235900e+02 -2.064001e+01\n6 10847     -2.590900e+02 7.162200e+02\n8 10847     -6.380005e+00 3.050700e+02\n9 10847     -2.459000e+02 4.102300e+02\n11 10847     3.372600e+02 -1.532200e+02\n14 10847     5.243400e+02 -1.054200e+02\n1 10848     5.964500e+02 5.789000e+02\n4 10848     6.834998e+01 -4.794500e+02\n5 10848     5.787700e+02 -3.320001e+01\n6 10848     -3.060600e+02 6.943400e+02\n8 10848     -3.789001e+01 2.956900e+02\n1 10849     5.964500e+02 5.789000e+02\n2 10849     -1.431900e+02 3.793800e+02\n4 10849     6.834998e+01 -4.794500e+02\n5 10849     5.787700e+02 -3.320001e+01\n6 10849     -3.060600e+02 6.943400e+02\n9 10849     -2.774300e+02 3.998000e+02\n1 10850     5.908300e+02 5.757500e+02\n3 10850     -2.822000e+02 3.946002e+01\n4 10850     6.612000e+01 -4.765400e+02\n6 10850     -3.093000e+02 6.885500e+02\n9 10850     -2.803400e+02 3.978200e+02\n11 10850     2.948400e+02 -1.679300e+02\n1 10851     8.574301e+02 5.745900e+02\n13 10851     4.923300e+02 3.189500e+02\n1 10852     6.110000e+02 5.745200e+02\n2 10852     -1.313500e+02 3.777100e+02\n3 10852     -2.682900e+02 4.289001e+01\n4 10852     6.678003e+01 -4.880200e+02\n5 10852     5.918400e+02 -3.400000e+01\n6 10852     -2.913300e+02 6.951800e+02\n8 10852     -2.853003e+01 2.945200e+02\n9 10852     -2.677000e+02 3.989400e+02\n11 10852     3.100900e+02 -1.648900e+02\n13 10852     3.372000e+02 2.710800e+02\n14 10852     4.927300e+02 -1.193100e+02\n1 10853     -2.670800e+02 5.734100e+02\n13 10853     -3.851800e+02 5.913000e+01\n14 10853     -3.928500e+02 -3.398900e+02\n1 10854     6.335100e+02 5.721300e+02\n2 10854     -1.149700e+02 3.790100e+02\n3 10854     -2.526100e+02 4.347998e+01\n4 10854     6.731000e+01 -5.015601e+02\n5 10854     6.107600e+02 -3.107001e+01\n6 10854     -2.707800e+02 7.017700e+02\n8 10854     -1.470001e+01 2.968700e+02\n9 10854     -2.535300e+02 4.001400e+02\n14 10854     5.112200e+02 -1.165200e+02\n1 10855     4.262700e+02 5.670900e+02\n3 10855     -3.985300e+02 -2.199707e-01\n4 10855     4.973999e+01 -3.839400e+02\n6 10855     -4.560000e+02 6.111200e+02\n8 10855     -1.407300e+02 2.561800e+02\n9 10855     -3.824200e+02 3.546600e+02\n11 10855     1.718100e+02 -2.080900e+02\n14 10855     3.428800e+02 -1.692900e+02\n1 10856     -5.734700e+02 5.653000e+02\n4 10856     -1.160999e+01 1.966200e+02\n1 10857     4.551801e+02 5.488200e+02\n2 10857     -2.393500e+02 3.203000e+02\n3 10857     -3.709800e+02 -1.246002e+01\n5 10857     4.662900e+02 -9.244000e+01\n6 10857     -4.205100e+02 6.026900e+02\n8 10857     -1.171500e+02 2.472500e+02\n9 10857     -3.576900e+02 3.449300e+02\n11 10857     1.994600e+02 -2.157600e+02\n12 10857     -2.481600e+02 5.794600e+02\n1 10858     6.210900e+02 5.473100e+02\n3 10858     -2.541700e+02 1.922998e+01\n4 10858     5.341998e+01 -4.965900e+02\n5 10858     6.066100e+02 -5.588000e+01\n6 10858     -2.713900e+02 6.709500e+02\n11 10858     3.253900e+02 -1.824400e+02\n1 10859     6.781899e+02 5.422700e+02\n2 10859     -7.500000e+01 3.610100e+02\n6 10859     -2.209000e+02 6.866200e+02\n13 10859     3.879800e+02 2.628900e+02\n14 10859     5.550200e+02 -1.306700e+02\n1 10860     6.781899e+02 5.422700e+02\n2 10860     -7.500000e+01 3.610100e+02\n4 10860     5.452002e+01 -5.300100e+02\n6 10860     -2.209000e+02 6.866200e+02\n9 10860     -2.188900e+02 3.858200e+02\n13 10860     3.879800e+02 2.628900e+02\n14 10860     5.550200e+02 -1.306700e+02\n1 10861     3.037400e+02 5.307800e+02\n5 10861     3.358000e+02 -1.462200e+02\n6 10861     -5.600500e+02 5.115700e+02\n7 10861     -2.973400e+02 5.646100e+02\n8 10861     -2.147000e+02 2.004500e+02\n12 10861     -3.820300e+02 5.030100e+02\n1 10862     7.772400e+02 5.175900e+02\n2 10862     -2.119995e+00 3.567700e+02\n9 10862     -1.568500e+02 3.842800e+02\n13 10862     4.563400e+02 2.651900e+02\n1 10863     6.222200e+02 5.142100e+02\n4 10863     3.559003e+01 -5.003800e+02\n6 10863     -2.564200e+02 6.353000e+02\n9 10863     -2.434600e+02 3.508300e+02\n11 10863     3.348800e+02 -2.073400e+02\n1 10864     8.533000e+02 5.110000e+02\n5 10864     8.047800e+02 -3.603998e+01\n6 10864     -6.739001e+01 7.203500e+02\n9 10864     -1.153300e+02 3.938900e+02\n11 10864     5.020100e+02 -1.623700e+02\n13 10864     5.050200e+02 2.748700e+02\n14 10864     6.980100e+02 -1.199500e+02\n1 10865     6.882001e+01 5.102700e+02\n5 10865     1.175600e+02 -2.241000e+02\n11 10865     -1.069500e+02 -3.285100e+02\n12 10865     -6.152400e+02 3.817700e+02\n1 10866     7.393300e+02 5.025900e+02\n4 10866     3.702002e+01 -5.700900e+02\n5 10866     7.151500e+02 -6.946002e+01\n6 10866     -1.534900e+02 6.701000e+02\n8 10866     6.253998e+01 2.638200e+02\n13 10866     4.356600e+02 2.468200e+02\n1 10867     6.537900e+02 5.010000e+02\n4 10867     3.000000e+01 -5.197500e+02\n11 10867     3.628199e+02 -2.099900e+02\n13 10867     3.799301e+02 2.269800e+02\n1 10868     7.646100e+02 5.003100e+02\n3 10868     -1.495200e+02 4.809998e+00\n14 10868     6.339600e+02 -1.475800e+02\n1 10869     1.041400e+02 4.896300e+02\n4 10869     -1.337000e+01 -2.094100e+02\n7 10869     -4.630900e+02 4.567900e+02\n8 10869     -3.531900e+02 1.162300e+02\n11 10869     -7.335999e+01 -3.384300e+02\n12 10869     -5.665200e+02 3.750400e+02\n1 10870     -8.721002e+01 4.879700e+02\n5 10870     -3.167999e+01 -2.846600e+02\n7 10870     -6.462000e+02 3.854000e+02\n10 10870     -6.534400e+02 5.434100e+02\n1 10871     8.525000e+01 4.810900e+02\n7 10871     -4.748600e+02 4.420900e+02\n11 10871     -8.707001e+01 -3.489700e+02\n12 10871     -5.842100e+02 3.588600e+02\n1 10872     7.098400e+02 4.784500e+02\n4 10872     2.134003e+01 -5.553000e+02\n9 10872     -1.829100e+02 3.389300e+02\n11 10872     4.106600e+02 -2.150300e+02\n13 10872     4.221899e+02 2.237500e+02\n1 10873     3.578000e+02 4.559400e+02\n5 10873     3.972400e+02 -2.063600e+02\n7 10873     -2.252500e+02 5.121600e+02\n9 10873     -3.968000e+02 2.365000e+02\n13 10873     1.861100e+02 1.238100e+02\n1 10874     3.832700e+02 4.541500e+02\n2 10874     -2.685500e+02 2.020400e+02\n3 10874     -4.020000e+02 -1.300500e+02\n4 10874     -1.575000e+01 -3.675400e+02\n5 10874     4.226899e+02 -2.023800e+02\n6 10874     -4.472300e+02 4.602800e+02\n7 10874     -2.020800e+02 5.180500e+02\n8 10874     -1.409700e+02 1.529500e+02\n9 10874     -3.770000e+02 2.401800e+02\n12 10874     -2.741600e+02 4.524100e+02\n14 10874     3.325400e+02 -2.879900e+02\n1 10875     6.898400e+02 4.421100e+02\n4 10875     -3.699951e-01 -5.476200e+02\n6 10875     -1.692600e+02 5.871300e+02\n12 10875     -4.239990e+00 5.548400e+02\n1 10876     -7.801400e+02 4.205900e+02\n4 10876     -8.607001e+01 2.574500e+02\n1 10877     3.708700e+02 4.207500e+02\n2 10877     -2.711200e+02 1.625500e+02\n5 10877     4.153500e+02 -2.391000e+02\n6 10877     -4.475100e+02 4.148700e+02\n1 10878     4.964800e+02 4.166700e+02\n4 10878     -2.869000e+01 -4.348800e+02\n1 10879     6.567800e+02 4.169700e+02\n3 10879     -1.924100e+02 -9.470001e+01\n6 10879     -1.856200e+02 5.464400e+02\n1 10880     5.935800e+02 4.141800e+02\n7 10880     -1.765997e+01 5.494000e+02\n1 10881     4.934800e+02 4.084400e+02\n4 10881     -3.392999e+01 -4.332100e+02\n5 10881     5.291200e+02 -2.182600e+02\n6 10881     -3.267700e+02 4.621200e+02\n7 10881     -9.600000e+01 5.129700e+02\n12 10881     -1.574800e+02 4.482300e+02\n13 10881     2.915699e+02 1.204100e+02\n1 10882     1.470300e+02 4.010300e+02\n2 10882     -4.624600e+02 6.913000e+01\n5 10882     2.091899e+02 -3.185300e+02\n7 10882     -3.918900e+02 3.856500e+02\n8 10882     -2.991300e+02 4.447000e+01\n13 10882     4.078003e+01 2.596002e+01\n14 10882     1.259400e+02 -4.068600e+02\n1 10883     7.478400e+02 3.990100e+02\n13 10883     4.649301e+02 1.741200e+02\n1 10884     -6.214100e+02 3.982700e+02\n4 10884     -1.008400e+02 2.062400e+02\n1 10885     6.482900e+02 3.978500e+02\n2 10885     -5.110999e+01 2.158500e+02\n3 10885     -1.928100e+02 -1.155700e+02\n8 10885     3.815002e+01 1.675600e+02\n11 10885     3.897800e+02 -2.893800e+02\n14 10885     5.723000e+02 -2.687600e+02\n1 10886     4.977700e+02 3.959300e+02\n3 10886     -2.993000e+02 -1.578500e+02\n4 10886     -4.103998e+01 -4.371600e+02\n5 10886     5.355500e+02 -2.297400e+02\n6 10886     -3.188700e+02 4.501500e+02\n7 10886     -8.839001e+01 5.028500e+02\n8 10886     -5.364001e+01 1.323800e+02\n9 10886     -2.851800e+02 2.192800e+02\n1 10887     7.024500e+02 3.966000e+02\n5 10887     7.063300e+02 -1.761500e+02\n6 10887     -1.465400e+02 5.430600e+02\n7 10887     6.832001e+01 5.660400e+02\n11 10887     4.306100e+02 -2.782600e+02\n1 10888     6.623600e+02 3.942800e+02\n3 10888     -1.825600e+02 -1.157800e+02\n5 10888     6.799700e+02 -1.889800e+02\n6 10888     -1.713500e+02 5.236400e+02\n7 10888     4.208002e+01 5.523700e+02\n8 10888     4.782001e+01 1.671100e+02\n9 10888     -1.841700e+02 2.590000e+02\n11 10888     4.024200e+02 -2.890200e+02\n12 10888     -7.109985e+00 4.966600e+02\n14 10888     5.852400e+02 -2.676000e+02\n1 10889     6.623600e+02 3.942800e+02\n2 10889     -4.128998e+01 2.143200e+02\n3 10889     -1.825600e+02 -1.157800e+02\n5 10889     6.799700e+02 -1.889800e+02\n6 10889     -1.713500e+02 5.236400e+02\n7 10889     4.208002e+01 5.523700e+02\n8 10889     4.782001e+01 1.671100e+02\n9 10889     -1.841700e+02 2.590000e+02\n11 10889     4.024200e+02 -2.890200e+02\n12 10889     -7.109985e+00 4.966600e+02\n13 10889     4.091801e+02 1.501400e+02\n14 10889     5.852400e+02 -2.676000e+02\n1 10890     2.279301e+02 3.902300e+02\n2 10890     -3.847100e+02 8.378998e+01\n5 10890     2.887200e+02 -3.083000e+02\n6 10890     -5.764800e+02 3.041900e+02\n7 10890     -3.156100e+02 4.050000e+02\n8 10890     -2.362000e+02 5.741000e+01\n9 10890     -4.713400e+02 1.324600e+02\n10 10890     -2.609900e+02 5.503600e+02\n11 10890     5.212000e+01 -3.957900e+02\n13 10890     1.038200e+02 3.828003e+01\n14 10890     2.043600e+02 -3.947400e+02\n1 10891     4.549800e+02 3.885000e+02\n2 10891     -1.931000e+02 1.525100e+02\n7 10891     -1.210200e+02 4.820500e+02\n11 10891     2.407100e+02 -3.433500e+02\n13 10891     2.680000e+02 9.454999e+01\n14 10891     4.093400e+02 -3.320200e+02\n1 10892     1.676801e+02 3.828600e+02\n7 10892     -3.672700e+02 3.755500e+02\n1 10893     5.792800e+02 3.807100e+02\n3 10893     -2.365400e+02 -1.530700e+02\n7 10893     -1.834003e+01 5.151900e+02\n11 10893     3.410300e+02 -3.203100e+02\n14 10893     5.183101e+02 -3.055800e+02\n1 10894     -6.171500e+02 3.776400e+02\n4 10894     -1.118700e+02 2.013900e+02\n1 10895     6.490900e+02 3.772900e+02\n7 10895     3.722998e+01 5.342300e+02\n14 10895     5.780500e+02 -2.880900e+02\n1 10896     7.512700e+02 3.748600e+02\n6 10896     -9.113000e+01 5.416600e+02\n9 10896     -1.284100e+02 2.658200e+02\n1 10897     7.512700e+02 3.748600e+02\n6 10897     -9.113000e+01 5.416600e+02\n9 10897     -1.284100e+02 2.658200e+02\n14 10897     6.629399e+02 -2.620600e+02\n1 10898     7.830400e+02 3.699600e+02\n2 10898     4.823999e+01 2.220100e+02\n13 10898     4.936801e+02 1.599600e+02\n14 10898     6.894900e+02 -2.593900e+02\n1 10899     -6.090000e+02 3.691200e+02\n4 10899     -1.165500e+02 1.959000e+02\n1 10900     6.424200e+02 3.685200e+02\n2 10900     -4.545001e+01 1.855200e+02\n5 10900     6.702800e+02 -2.185400e+02\n7 10900     3.546002e+01 5.243300e+02\n8 10900     4.295001e+01 1.431700e+02\n11 10900     3.941700e+02 -3.145500e+02\n13 10900     4.016400e+02 1.261700e+02\n14 10900     5.755200e+02 -2.981200e+02\n1 10901     -3.021200e+02 3.629700e+02\n5 10901     -2.584700e+02 -4.795601e+02\n1 10902     4.542500e+02 3.503100e+02\n7 10902     -1.065000e+02 4.484600e+02\n1 10903     -3.540100e+02 3.446100e+02\n5 10903     -3.060200e+02 -5.132000e+02\n1 10904     -6.190000e+02 3.412400e+02\n4 10904     -1.326600e+02 1.986000e+02\n1 10905     1.782600e+02 3.186900e+02\n7 10905     -3.249100e+02 3.227000e+02\n11 10905     2.796002e+01 -4.705700e+02\n15 10905     -2.372300e+02 4.922800e+02\n1 10906     -1.092300e+02 3.160000e+02\n7 10906     -5.927900e+02 2.057600e+02\n1 10907     5.155699e+02 3.044500e+02\n2 10907     -8.639001e+01 1.084300e+02\n5 10907     5.971300e+02 -3.142900e+02\n6 10907     -2.289700e+02 3.660700e+02\n9 10907     -2.157600e+02 1.662000e+02\n10 10907     7.688000e+01 5.658800e+02\n11 10907     3.153000e+02 -3.984200e+02\n12 10907     -7.476001e+01 3.630100e+02\n13 10907     3.461899e+02 4.803003e+01\n1 10908     5.155699e+02 3.044500e+02\n2 10908     -8.639001e+01 1.084300e+02\n6 10908     -2.289700e+02 3.660700e+02\n9 10908     -2.157600e+02 1.662000e+02\n10 10908     7.688000e+01 5.658800e+02\n11 10908     3.153000e+02 -3.984200e+02\n1 10909     5.324000e+02 3.048200e+02\n8 10909     1.383002e+01 8.332001e+01\n9 10909     -2.071100e+02 1.713900e+02\n10 10909     9.322998e+01 5.731900e+02\n1 10910     4.536899e+02 3.018800e+02\n2 10910     -1.302600e+02 8.754999e+01\n6 10910     -2.812600e+02 3.321100e+02\n9 10910     -2.518700e+02 1.464800e+02\n11 10910     2.657200e+02 -4.161700e+02\n13 10910     3.042500e+02 2.956000e+01\n14 10910     4.547800e+02 -4.156100e+02\n1 10911     4.871000e+02 2.837300e+02\n6 10911     -2.335600e+02 3.316600e+02\n1 10912     1.062300e+02 2.808100e+02\n10 10912     -3.404700e+02 3.817900e+02\n11 10912     -2.603998e+01 -5.216500e+02\n13 10912     6.171002e+01 -8.002002e+01\n14 10912     1.475800e+02 -5.441000e+02\n15 10912     -3.037600e+02 4.091100e+02\n1 10913     -1.501600e+02 2.696100e+02\n4 10913     -1.521600e+02 -8.609003e+01\n1 10914     -1.955300e+02 2.656700e+02\n10 10914     -6.706800e+02 2.391000e+02\n1 10915     -2.674600e+02 2.623700e+02\n7 10915     -7.185200e+02 8.820001e+01\n1 10916     -1.359500e+02 2.601600e+02\n4 10916     -1.564900e+02 -9.638000e+01\n13 10916     -1.212000e+02 -1.638500e+02\n1 10917     -4.027500e+02 2.568400e+02\n7 10917     -8.616700e+02 1.898999e+01\n13 10917     -3.528300e+02 -2.479700e+02\n1 10918     4.127000e+02 2.539400e+02\n6 10918     -2.641900e+02 2.656000e+02\n11 10918     2.492800e+02 -4.688500e+02\n1 10919     -1.477200e+02 2.370000e+02\n4 10919     -1.705800e+02 -9.412000e+01\n10 10919     -5.979000e+02 2.259200e+02\n13 10919     -1.160600e+02 -1.861700e+02\n1 10920     -1.548300e+02 2.359000e+02\n4 10920     -1.718100e+02 -9.028003e+01\n1 10921     3.938400e+02 2.338900e+02\n7 10921     -9.167999e+01 3.313400e+02\n11 10921     2.392100e+02 -4.916600e+02\n1 10922     4.131801e+02 2.280000e+02\n5 10922     5.570699e+02 -4.187600e+02\n6 10922     -2.396700e+02 2.425700e+02\n7 10922     -7.252002e+01 3.344300e+02\n10 10922     1.150000e+01 4.460600e+02\n11 10922     2.575100e+02 -4.912300e+02\n13 10922     3.156000e+02 -3.494000e+01\n14 10922     4.704200e+02 -4.995500e+02\n1 10923     4.075400e+02 2.251700e+02\n5 10923     5.543700e+02 -4.239200e+02\n6 10923     -2.416500e+02 2.368300e+02\n1 10924     4.504301e+02 2.253200e+02\n6 10924     -2.042300e+02 2.602300e+02\n1 10925     1.787000e+02 2.228000e+02\n8 10925     -1.622400e+02 -6.032001e+01\n9 10925     -3.666800e+02 1.728003e+01\n1 10926     4.290699e+02 2.194800e+02\n4 10926     -1.464900e+02 -4.396899e+02\n5 10926     5.776300e+02 -4.227800e+02\n6 10926     -2.172800e+02 2.435900e+02\n7 10926     -5.546997e+01 3.330100e+02\n10 10926     3.145001e+01 4.429900e+02\n11 10926     2.737500e+02 -4.951000e+02\n13 10926     3.315000e+02 -3.741998e+01\n14 10926     4.906600e+02 -5.035601e+02\n1 10927     4.290699e+02 2.194800e+02\n6 10927     -2.172800e+02 2.435900e+02\n1 10928     4.485400e+02 2.196600e+02\n4 10928     -1.440700e+02 -4.498000e+02\n10 10928     5.150000e+01 4.506800e+02\n11 10928     2.899900e+02 -4.892500e+02\n1 10929     3.914301e+02 2.171300e+02\n6 10929     -2.472300e+02 2.221100e+02\n1 10930     5.896600e+02 1.998500e+02\n7 10930     8.241998e+01 3.733500e+02\n14 10930     6.460100e+02 -4.713400e+02\n1 10931     5.497500e+02 1.961500e+02\n7 10931     5.377002e+01 3.566600e+02\n11 10931     3.839301e+02 -4.827500e+02\n1 10932     8.199100e+02 1.934900e+02\n6 10932     1.854100e+02 4.326600e+02\n7 10932     2.806801e+02 4.547700e+02\n8 10932     2.979100e+02 1.401900e+02\n10 10932     4.409399e+02 5.631200e+02\n12 10932     2.960900e+02 4.277500e+02\n13 10932     6.461400e+02 5.538000e+01\n1 10933     5.425400e+02 1.834800e+02\n6 10933     -8.595001e+01 2.712300e+02\n7 10933     5.448999e+01 3.447000e+02\n11 10933     3.817000e+02 -4.958300e+02\n13 10933     4.295300e+02 -3.234003e+01\n14 10933     6.159100e+02 -5.015400e+02\n15 10933     2.817800e+02 4.979200e+02\n1 10934     6.004999e+01 1.801600e+02\n9 10934     -4.143600e+02 -5.003003e+01\n13 10934     8.203998e+01 -1.706400e+02\n1 10935     5.336300e+02 1.789800e+02\n10 10935     1.547200e+02 4.414500e+02\n11 10935     3.758800e+02 -5.022700e+02\n15 10935     2.725900e+02 4.893800e+02\n1 10936     -3.607500e+02 1.713200e+02\n7 10936     -7.556800e+02 -3.953998e+01\n1 10937     -1.258002e+01 1.565700e+02\n7 10937     -4.000400e+02 1.074200e+02\n1 10938     2.105900e+02 1.245700e+02\n2 10938     1.089000e+02 1.145600e+02\n3 10938     1.585999e+01 -2.022000e+02\n4 10938     -2.055600e+02 -4.226900e+02\n5 10938     6.349800e+02 -5.542700e+02\n6 10938     -6.919000e+01 1.333300e+02\n8 10938     1.237000e+02 4.985001e+01\n9 10938     -2.270001e+01 1.843000e+02\n15 10938     -2.700000e+01 2.799600e+02\n1 10939     5.893101e+02 1.094100e+02\n10 10939     2.443700e+02 3.907500e+02\n1 10940     4.737800e+02 1.057600e+02\n15 10940     2.961600e+02 3.845700e+02\n1 10941     5.870699e+02 8.507001e+01\n15 10941     3.896700e+02 4.015000e+02\n1 10942     8.594399e+02 8.375000e+01\n3 10942     2.964600e+02 -1.292200e+02\n6 10942     3.451700e+02 3.768600e+02\n8 10942     4.175500e+02 1.286200e+02\n9 10942     2.316500e+02 2.560100e+02\n11 10942     6.907600e+02 -4.955100e+02\n12 10942     4.336500e+02 3.844000e+02\n1 10943     1.833199e+02 4.726001e+01\n2 10943     1.530500e+02 5.028998e+01\n6 10943     -2.738000e+01 4.928998e+01\n10 10943     -7.796002e+01 1.699600e+02\n12 10943     -1.169000e+01 1.043400e+02\n15 10943     -1.673999e+01 1.719000e+02\n1 10944     5.091600e+02 2.607001e+01\n10 10944     2.559900e+02 2.803300e+02\n15 10944     3.791400e+02 3.056100e+02\n1 10945     5.091600e+02 2.607001e+01\n15 10945     3.791400e+02 3.056100e+02\n1 10946     4.508500e+02 2.417999e+01\n13 10946     5.824100e+02 -1.395000e+02\n15 10946     3.170000e+02 2.768100e+02\n1 10947     3.834003e+01 1.996997e+01\n10 10947     -2.334600e+02 7.579999e+01\n15 10947     -1.951900e+02 5.892999e+01\n1 10948     4.289399e+02 2.859985e+00\n7 10948     1.525601e+02 2.021100e+02\n15 10948     3.037200e+02 2.403900e+02\n1 10949     3.541100e+02 2.999878e-01\n7 10949     9.887000e+01 1.720400e+02\n1 10950     4.970800e+02 -4.880005e+00\n7 10950     2.006899e+02 2.176400e+02\n1 10951     5.027300e+02 -6.809998e+00\n15 10951     3.902700e+02 2.644000e+02\n1 10952     -1.739400e+02 -1.316998e+01\n7 10952     -4.457300e+02 -1.140200e+02\n1 10953     -1.573400e+02 -1.692999e+01\n2 10953     -3.387800e+02 -3.754300e+02\n7 10953     -4.273400e+02 -1.090700e+02\n8 10953     -2.341700e+02 -3.302700e+02\n13 10953     2.287000e+01 -3.944300e+02\n1 10954     1.688900e+02 -3.716998e+01\n4 10954     -3.183600e+02 -4.326500e+02\n7 10954     -4.679999e+01 5.862000e+01\n10 10954     -5.482001e+01 7.471002e+01\n1 10955     8.437600e+02 -4.102002e+01\n6 10955     3.985100e+02 2.556500e+02\n7 10955     4.137900e+02 2.883800e+02\n8 10955     4.582200e+02 4.101999e+01\n9 10955     2.773000e+02 1.695600e+02\n10 10955     5.688800e+02 3.370700e+02\n1 10956     3.511300e+02 -4.390997e+01\n2 10956     3.538400e+02 5.746997e+01\n1 10957     2.668800e+02 -4.654999e+01\n2 10957     2.968400e+02 1.978998e+01\n7 10957     4.782001e+01 9.562000e+01\n8 10957     2.730400e+02 -3.254001e+01\n10 10957     5.478998e+01 1.072700e+02\n13 10957     4.905300e+02 -2.452400e+02\n15 10957     1.384700e+02 1.003500e+02\n1 10958     2.299399e+02 -6.007001e+01\n2 10958     2.743400e+02 -1.117999e+01\n3 10958     1.807000e+02 -3.169900e+02\n7 10958     2.079999e+01 6.747998e+01\n13 10958     4.658600e+02 -2.675300e+02\n15 10958     9.996997e+01 6.395001e+01\n1 10959     8.465300e+02 -6.490002e+01\n2 10959     5.004900e+02 6.876001e+01\n3 10959     3.651100e+02 -2.431300e+02\n6 10959     4.132900e+02 2.380700e+02\n7 10959     4.252200e+02 2.700100e+02\n9 10959     2.902000e+02 1.565600e+02\n10 10959     5.807300e+02 3.154800e+02\n13 10959     7.972600e+02 -1.147500e+02\n15 10959     7.786700e+02 3.510500e+02\n1 10960     -6.514300e+02 -7.027002e+01\n4 10960     -3.966600e+02 1.731300e+02\n1 10961     2.331400e+02 -7.920001e+01\n8 10961     2.636700e+02 -7.197998e+01\n1 10962     2.974600e+02 -7.841998e+01\n6 10962     1.667500e+02 5.140015e+00\n8 10962     3.080100e+02 -4.432001e+01\n13 10962     5.244000e+02 -2.600900e+02\n1 10963     1.939500e+02 -8.104999e+01\n4 10963     -3.480800e+02 -4.618600e+02\n1 10964     2.289600e+02 -8.632001e+01\n2 10964     2.874000e+02 -3.853003e+01\n4 10964     -3.498900e+02 -4.910300e+02\n6 10964     1.103100e+02 -4.660999e+01\n8 10964     2.629800e+02 -8.084003e+01\n1 10965     4.903700e+02 -8.723999e+01\n15 10965     4.162700e+02 1.606600e+02\n1 10966     3.897700e+02 -9.204999e+01\n6 10966     2.413200e+02 4.103003e+01\n7 10966     1.649200e+02 1.061900e+02\n10 10966     1.915200e+02 1.095500e+02\n13 10966     5.910100e+02 -2.434300e+02\n15 10966     3.069100e+02 1.064500e+02\n1 10967     4.989399e+02 -1.006200e+02\n10 10967     2.976899e+02 1.477200e+02\n15 10967     4.306899e+02 1.492400e+02\n1 10968     4.989399e+02 -1.006200e+02\n10 10968     2.976899e+02 1.477200e+02\n15 10968     4.306899e+02 1.492400e+02\n1 10969     2.085300e+02 -1.114600e+02\n2 10969     2.809700e+02 -7.590002e+01\n7 10969     2.187000e+01 1.167999e+01\n9 10969     1.287500e+02 3.298999e+01\n1 10970     2.531300e+02 -1.115800e+02\n3 10970     2.252200e+02 -3.529300e+02\n1 10971     5.140900e+02 -1.196300e+02\n7 10971     2.557100e+02 1.258600e+02\n1 10972     -1.737600e+02 -1.274100e+02\n13 10972     7.483002e+01 -4.930900e+02\n1 10973     1.415000e+02 -1.291500e+02\n7 10973     -2.712000e+01 -3.427002e+01\n1 10974     -1.307001e+01 -1.314200e+02\n10 10974     -2.218400e+02 -1.098400e+02\n1 10975     5.457900e+02 -1.368500e+02\n10 10975     3.531400e+02 1.292500e+02\n1 10976     2.559000e+02 -1.464200e+02\n7 10976     7.965997e+01 3.469971e+00\n10 10976     8.419000e+01 -8.499756e-01\n15 10976     1.748500e+02 -2.800000e+01\n1 10977     4.577500e+02 -1.487900e+02\n7 10977     2.323101e+02 8.254001e+01\n1 10978     1.205300e+02 -1.709000e+02\n7 10978     -2.370001e+01 -7.978003e+01\n15 10978     2.325000e+01 -1.296800e+02\n1 10979     -4.607300e+02 -1.823400e+02\n7 10979     -6.185500e+02 -4.171500e+02\n15 10979     -7.554500e+02 -4.893700e+02\n1 10980     4.732800e+02 -1.817800e+02\n7 10980     2.589000e+02 6.158002e+01\n1 10981     -6.591300e+02 -1.893500e+02\n4 10981     -4.896400e+02 1.652900e+02\n1 10982     8.582000e+02 -1.932400e+02\n10 10982     6.411100e+02 1.940400e+02\n15 10982     8.527000e+02 2.064000e+02\n1 10983     -4.543900e+02 -1.987200e+02\n7 10983     -6.016000e+02 -4.296400e+02\n1 10984     8.159500e+02 -2.079300e+02\n7 10984     4.532000e+02 1.442200e+02\n1 10985     4.706200e+02 -2.225700e+02\n7 10985     2.757800e+02 2.765002e+01\n1 10986     -2.165100e+02 -2.235300e+02\n4 10986     -4.871400e+02 -1.489100e+02\n7 10986     -3.522700e+02 -3.202000e+02\n9 10986     -2.014200e+02 -3.970200e+02\n15 10986     -4.021000e+02 -3.927400e+02\n1 10987     8.186200e+02 -2.366500e+02\n7 10987     4.672600e+02 1.222500e+02\n8 10987     5.228500e+02 -9.865002e+01\n10 10987     6.175900e+02 1.352700e+02\n13 10987     8.383700e+02 -2.542900e+02\n15 10987     8.257700e+02 1.362400e+02\n1 10988     8.406899e+02 -2.490400e+02\n2 10988     5.943000e+02 -7.692999e+01\n7 10988     4.902200e+02 1.223000e+02\n8 10988     5.459800e+02 -9.329999e+01\n15 10988     8.583900e+02 1.325500e+02\n1 10989     -3.690600e+02 -2.530700e+02\n15 10989     -5.845100e+02 -5.237100e+02\n1 10990     4.232400e+02 -2.537300e+02\n7 10990     2.590900e+02 -1.427002e+01\n1 10991     8.660400e+02 -2.540500e+02\n2 10991     6.186100e+02 -6.132001e+01\n6 10991     5.378199e+02 8.573999e+01\n7 10991     5.121899e+02 1.297600e+02\n9 10991     3.931200e+02 5.203003e+01\n12 10991     6.168800e+02 9.541998e+01\n1 10992     8.549301e+02 -2.628200e+02\n2 10992     6.132600e+02 -7.621997e+01\n3 10992     4.843101e+02 -3.797600e+02\n7 10992     5.064100e+02 1.180600e+02\n8 10992     5.613900e+02 -9.313000e+01\n9 10992     3.889301e+02 3.920001e+01\n12 10992     6.102300e+02 8.210999e+01\n13 10992     8.797700e+02 -2.598400e+02\n1 10993     -1.974300e+02 -2.651200e+02\n6 10993     -2.588800e+02 -5.933199e+02\n15 10993     -3.496800e+02 -4.326400e+02\n1 10994     4.003101e+02 -2.651700e+02\n7 10994     2.482000e+02 -3.378998e+01\n1 10995     -3.771900e+02 -2.672800e+02\n10 10995     -5.719200e+02 -4.404900e+02\n15 10995     -5.847100e+02 -5.448700e+02\n1 10996     -2.111100e+02 -2.731700e+02\n6 10996     -2.638800e+02 -6.112100e+02\n7 10996     -3.140900e+02 -3.600900e+02\n15 10996     -3.624600e+02 -4.515000e+02\n1 10997     -3.996000e+02 -2.788300e+02\n10 10997     -5.919800e+02 -4.667100e+02\n15 10997     -6.073900e+02 -5.751200e+02\n1 10998     3.881000e+02 -2.892900e+02\n10 10998     2.751801e+02 -9.003998e+01\n1 10999     3.881000e+02 -2.892900e+02\n10 10999     2.751801e+02 -9.003998e+01\n1 11000     3.898300e+02 -3.031600e+02\n15 11000     4.098800e+02 -1.492600e+02\n1 11001     -3.883500e+02 -3.039300e+02\n10 11001     -5.646600e+02 -4.881300e+02\n1 11002     -3.883500e+02 -3.039300e+02\n10 11002     -5.646600e+02 -4.881300e+02\n1 11003     -2.902100e+02 -3.049100e+02\n7 11003     -3.680500e+02 -4.305100e+02\n15 11003     -4.454000e+02 -5.391200e+02\n1 11004     7.774200e+02 -3.051300e+02\n3 11004     4.806300e+02 -4.369000e+02\n7 11004     4.741400e+02 5.720001e+01\n15 11004     8.189700e+02 3.715997e+01\n1 11005     7.780400e+02 -3.180300e+02\n7 11005     4.804000e+02 4.771997e+01\n10 11005     6.177100e+02 4.045001e+01\n15 11005     8.262900e+02 2.232001e+01\n1 11006     1.992200e+02 -3.199400e+02\n2 11006     3.899700e+02 -2.950800e+02\n7 11006     9.902002e+01 -1.773100e+02\n8 11006     3.431400e+02 -2.930300e+02\n1 11007     2.002300e+02 -3.258400e+02\n10 11007     9.698999e+01 -2.132800e+02\n1 11008     3.899000e+02 -3.441200e+02\n7 11008     2.559000e+02 -1.124100e+02\n10 11008     2.911400e+02 -1.448700e+02\n1 11009     -6.716500e+02 -3.566600e+02\n4 11009     -6.363000e+02 1.544600e+02\n1 11010     6.961100e+02 -4.057700e+02\n7 11010     4.719700e+02 -4.729999e+01\n1 11011     -1.818600e+02 -4.086200e+02\n6 11011     -8.182999e+01 -7.004800e+02\n7 11011     -1.990900e+02 -4.619700e+02\n10 11011     -2.718700e+02 -4.906700e+02\n1 11012     7.813800e+02 -4.164700e+02\n12 11012     6.688700e+02 -6.829999e+01\n1 11013     2.404900e+02 -4.263000e+02\n10 11013     1.811000e+02 -2.969100e+02\n1 11014     8.108800e+02 -4.293800e+02\n7 11014     5.550900e+02 -2.034003e+01\n1 11015     -6.528700e+02 -4.634600e+02\n4 11015     -7.375000e+02 1.258100e+02\n1 11016     8.395200e+02 -4.652200e+02\n2 11016     7.573700e+02 -1.918300e+02\n7 11016     5.877100e+02 -3.483002e+01\n9 11016     5.141400e+02 -4.935999e+01\n12 11016     7.372900e+02 -7.622998e+01\n1 11017     -5.791100e+02 -4.980601e+02\n4 11017     -7.680500e+02 6.103003e+01\n1 11018     2.191400e+02 -5.519500e+02\n10 11018     2.127600e+02 -4.346000e+02\n1 11019     8.182500e+02 5.746600e+02\n3 11019     -1.391500e+02 7.626001e+01\n1 11020     7.159600e+02 5.738200e+02\n4 11020     7.372998e+01 -5.486100e+02\n6 11020     -2.023200e+02 7.335100e+02\n14 11020     5.747300e+02 -9.635999e+01\n1 11021     7.159600e+02 5.738200e+02\n4 11021     7.372998e+01 -5.486100e+02\n6 11021     -2.023200e+02 7.335100e+02\n11 11021     3.861899e+02 -1.447100e+02\n1 11022     6.354200e+02 5.645800e+02\n2 11022     -1.113700e+02 3.731900e+02\n4 11022     6.337000e+01 -5.032000e+02\n5 11022     6.143800e+02 -3.709998e+01\n6 11022     -2.658900e+02 6.946600e+02\n11 11022     3.309600e+02 -1.670900e+02\n14 11022     5.149800e+02 -1.221300e+02\n1 11023     6.909600e+02 5.641300e+02\n4 11023     6.708002e+01 -5.354500e+02\n5 11023     6.594200e+02 -2.562000e+01\n6 11023     -2.190000e+02 7.154100e+02\n8 11023     1.989001e+01 3.001100e+02\n14 11023     5.583900e+02 -1.105600e+02\n1 11024     6.909600e+02 5.641300e+02\n5 11024     6.594200e+02 -2.562000e+01\n6 11024     -2.190000e+02 7.154100e+02\n8 11024     1.989001e+01 3.001100e+02\n9 11024     -2.182900e+02 4.046200e+02\n14 11024     5.583900e+02 -1.105600e+02\n1 11025     7.082000e+02 5.636800e+02\n2 11025     -6.131000e+01 3.857700e+02\n3 11025     -2.023700e+02 5.071002e+01\n4 11025     6.770001e+01 -5.451400e+02\n6 11025     -2.044100e+02 7.204900e+02\n8 11025     2.960999e+01 3.026100e+02\n9 11025     -2.081600e+02 4.078100e+02\n11 11025     3.835900e+02 -1.534800e+02\n1 11026     -5.957001e+01 5.617400e+02\n4 11026     1.770001e+01 -1.184500e+02\n1 11027     5.802000e+02 5.602400e+02\n3 11027     -2.853200e+02 2.494000e+01\n5 11027     5.694800e+02 -5.356000e+01\n8 11027     -4.309998e+01 2.789300e+02\n9 11027     -2.821600e+02 3.809200e+02\n13 11027     3.196500e+02 2.542000e+02\n14 11027     4.717600e+02 -1.386400e+02\n1 11028     5.802000e+02 5.602400e+02\n2 11028     -1.492400e+02 3.584700e+02\n4 11028     5.701001e+01 -4.718400e+02\n5 11028     5.694800e+02 -5.356000e+01\n6 11028     -3.121500e+02 6.675900e+02\n8 11028     -4.309998e+01 2.789300e+02\n9 11028     -2.821600e+02 3.809200e+02\n11 11028     2.910400e+02 -1.815400e+02\n13 11028     3.196500e+02 2.542000e+02\n14 11028     4.717600e+02 -1.386400e+02\n1 11029     5.896000e+02 5.583600e+02\n2 11029     -1.419000e+02 3.581400e+02\n3 11029     -2.782700e+02 2.378003e+01\n4 11029     5.671002e+01 -4.774500e+02\n5 11029     5.778600e+02 -5.292999e+01\n6 11029     -3.030700e+02 6.695000e+02\n8 11029     -3.721002e+01 2.788900e+02\n9 11029     -2.758200e+02 3.816000e+02\n11 11029     2.988700e+02 -1.813300e+02\n13 11029     3.264000e+02 2.546700e+02\n14 11029     4.797900e+02 -1.385000e+02\n1 11030     6.059500e+02 5.574000e+02\n2 11030     -1.302200e+02 3.605500e+02\n3 11030     -2.672400e+02 2.635999e+01\n4 11030     5.733002e+01 -4.868800e+02\n5 11030     5.914500e+02 -5.028003e+01\n6 11030     -2.886500e+02 6.746100e+02\n8 11030     -2.734998e+01 2.811400e+02\n9 11030     -2.659500e+02 3.836600e+02\n11 11030     3.109399e+02 -1.784200e+02\n13 11030     3.372800e+02 2.575800e+02\n14 11030     4.930000e+02 -1.353700e+02\n1 11031     6.275800e+02 5.567900e+02\n5 11031     6.096000e+02 -4.603003e+01\n11 11031     3.273400e+02 -1.745200e+02\n13 11031     3.516500e+02 2.618900e+02\n1 11032     6.785300e+02 5.536300e+02\n4 11032     6.065002e+01 -5.290601e+02\n5 11032     6.519399e+02 -3.776001e+01\n6 11032     -2.253700e+02 6.993400e+02\n9 11032     -2.223600e+02 3.947500e+02\n11 11032     3.655900e+02 -1.661100e+02\n1 11033     6.656801e+02 5.459700e+02\n3 11033     -2.243500e+02 2.681000e+01\n4 11033     5.521002e+01 -5.229399e+02\n5 11033     6.442000e+02 -4.741998e+01\n6 11033     -2.316900e+02 6.862800e+02\n9 11033     -2.268500e+02 3.859400e+02\n13 11033     3.790601e+02 2.623200e+02\n14 11033     5.440100e+02 -1.311000e+02\n1 11034     8.700100e+02 5.425600e+02\n6 11034     -6.765997e+01 7.557400e+02\n1 11035     8.700100e+02 5.425600e+02\n6 11035     -6.765997e+01 7.557400e+02\n8 11035     1.202000e+02 3.111300e+02\n9 11035     -1.162100e+02 4.191100e+02\n11 11035     5.027100e+02 -1.381200e+02\n13 11035     5.072600e+02 2.996500e+02\n14 11035     6.994600e+02 -9.048999e+01\n1 11036     7.690300e+02 5.241200e+02\n2 11036     -9.929993e+00 3.622500e+02\n3 11036     -1.535300e+02 2.584003e+01\n9 11036     -1.633500e+02 3.880600e+02\n11 11036     4.394500e+02 -1.697300e+02\n13 11036     4.495200e+02 2.678500e+02\n14 11036     6.301000e+02 -1.264300e+02\n1 11037     7.645400e+02 5.133600e+02\n2 11037     -9.130005e+00 3.519100e+02\n4 11037     4.559003e+01 -5.840500e+02\n5 11037     7.326500e+02 -5.353998e+01\n6 11037     -1.376600e+02 6.917300e+02\n9 11037     -1.622500e+02 3.794700e+02\n11 11037     4.398600e+02 -1.776800e+02\n13 11037     4.492800e+02 2.594900e+02\n14 11037     6.300800e+02 -1.363800e+02\n1 11038     8.601200e+02 5.047000e+02\n5 11038     8.109700e+02 -4.240002e+01\n9 11038     -1.109900e+02 3.885000e+02\n11 11038     5.085900e+02 -1.661700e+02\n14 11038     7.049301e+02 -1.229800e+02\n1 11039     -7.906000e+02 4.936800e+02\n4 11039     -4.584003e+01 2.636500e+02\n1 11040     -9.216998e+01 4.941100e+02\n4 11040     -2.140997e+01 -1.019600e+02\n5 11040     -3.928003e+01 -2.798600e+02\n7 11040     -6.544700e+02 3.890300e+02\n11 11040     -2.436600e+02 -3.750800e+02\n12 11040     -7.843700e+02 2.908600e+02\n1 11041     -1.617900e+02 4.822400e+02\n4 11041     -3.119000e+01 -6.421997e+01\n13 11041     -2.136400e+02 1.596997e+01\n14 11041     -1.995200e+02 -4.065400e+02\n1 11042     2.519900e+02 4.744400e+02\n5 11042     2.990200e+02 -2.148600e+02\n7 11042     -3.227600e+02 4.944900e+02\n11 11042     5.350000e+01 -3.185000e+02\n12 11042     -4.076900e+02 4.221600e+02\n13 11042     1.075500e+02 1.130400e+02\n14 11042     2.115900e+02 -3.021000e+02\n1 11043     7.162800e+02 4.519100e+02\n3 11043     -1.761600e+02 -5.007001e+01\n9 11043     -1.813600e+02 3.196000e+02\n11 11043     4.231300e+02 -2.330400e+02\n1 11044     -1.257400e+02 4.171600e+02\n10 11044     -6.720700e+02 4.443000e+02\n11 11044     -2.634000e+02 -4.491600e+02\n12 11044     -7.950200e+02 1.767200e+02\n15 11044     -6.874500e+02 4.753700e+02\n1 11045     2.414700e+02 4.124500e+02\n2 11045     -3.794000e+02 1.136800e+02\n6 11045     -5.727100e+02 3.382700e+02\n7 11045     -3.114700e+02 4.310800e+02\n8 11045     -2.317600e+02 8.129999e+01\n12 11045     -3.944600e+02 3.475000e+02\n13 11045     1.096800e+02 5.971997e+01\n14 11045     2.123101e+02 -3.680700e+02\n1 11046     6.283300e+02 4.103500e+02\n2 11046     -6.965002e+01 2.227300e+02\n6 11046     -2.080500e+02 5.258100e+02\n9 11046     -2.095200e+02 2.653300e+02\n1 11047     6.283300e+02 4.103500e+02\n2 11047     -6.965002e+01 2.227300e+02\n6 11047     -2.080500e+02 5.258100e+02\n9 11047     -2.095200e+02 2.653300e+02\n1 11048     6.435200e+02 4.026800e+02\n2 11048     -5.709998e+01 2.192100e+02\n5 11048     6.607500e+02 -1.855800e+02\n6 11048     -1.924300e+02 5.247800e+02\n7 11048     2.410999e+01 5.540600e+02\n8 11048     3.334998e+01 1.701500e+02\n9 11048     -1.985900e+02 2.623700e+02\n11 11048     3.839600e+02 -2.877000e+02\n12 11048     -2.713000e+01 4.991900e+02\n1 11049     4.889900e+02 3.951400e+02\n4 11049     -4.178998e+01 -4.323800e+02\n11 11049     2.657900e+02 -3.305000e+02\n12 11049     -1.559400e+02 4.324300e+02\n1 11050     -6.212400e+02 3.916900e+02\n4 11050     -1.046500e+02 2.060800e+02\n1 11051     5.122500e+02 3.918700e+02\n2 11051     -1.503800e+02 1.708000e+02\n3 11051     -2.883100e+02 -1.609700e+02\n7 11051     -7.584998e+01 5.029100e+02\n8 11051     -4.366998e+01 1.298800e+02\n11 11051     2.851100e+02 -3.275200e+02\n12 11051     -1.338700e+02 4.377200e+02\n13 11051     3.083199e+02 1.125700e+02\n14 11051     4.592500e+02 -3.112600e+02\n1 11052     5.122500e+02 3.918700e+02\n2 11052     -1.503800e+02 1.708000e+02\n8 11052     -4.366998e+01 1.298800e+02\n11 11052     2.851100e+02 -3.275200e+02\n12 11052     -1.338700e+02 4.377200e+02\n13 11052     3.083199e+02 1.125700e+02\n14 11052     4.592500e+02 -3.112600e+02\n1 11053     6.243000e+02 3.874500e+02\n2 11053     -6.578003e+01 1.993100e+02\n5 11053     6.482300e+02 -2.051800e+02\n7 11053     1.476001e+01 5.353100e+02\n8 11053     2.606000e+01 1.536800e+02\n11 11053     3.743000e+02 -3.037500e+02\n12 11053     -3.670001e+01 4.771700e+02\n13 11053     3.851400e+02 1.358100e+02\n14 11053     5.543800e+02 -2.854000e+02\n1 11054     6.335699e+02 3.864800e+02\n5 11054     6.564200e+02 -2.036200e+02\n11 11054     3.818101e+02 -3.023200e+02\n13 11054     3.914399e+02 1.373700e+02\n14 11054     5.624000e+02 -2.836700e+02\n1 11055     6.335699e+02 3.864800e+02\n2 11055     -5.915002e+01 2.007100e+02\n5 11055     6.564200e+02 -2.036200e+02\n7 11055     2.206000e+01 5.371500e+02\n8 11055     3.144000e+01 1.548600e+02\n11 11055     3.818101e+02 -3.023200e+02\n12 11055     -2.875000e+01 4.789100e+02\n13 11055     3.914399e+02 1.373700e+02\n14 11055     5.624000e+02 -2.836700e+02\n1 11056     -6.194000e+02 3.840800e+02\n4 11056     -1.086300e+02 2.034500e+02\n1 11057     4.838300e+02 3.832500e+02\n2 11057     -1.694600e+02 1.555800e+02\n3 11057     -3.061300e+02 -1.758900e+02\n4 11057     -4.923999e+01 -4.298000e+02\n7 11057     -9.560999e+01 4.863700e+02\n8 11057     -5.932001e+01 1.181900e+02\n9 11057     -2.901600e+02 2.040400e+02\n11 11057     2.649301e+02 -3.409300e+02\n13 11057     2.893700e+02 9.820999e+01\n14 11057     4.354800e+02 -3.283500e+02\n1 11058     -6.549600e+02 3.753200e+02\n4 11058     -1.151100e+02 2.235000e+02\n1 11059     4.735200e+02 3.753900e+02\n2 11059     -1.745500e+02 1.447000e+02\n7 11059     -1.014700e+02 4.762800e+02\n13 11059     2.840500e+02 8.938000e+01\n14 11059     4.289100e+02 -3.392500e+02\n1 11060     4.735200e+02 3.753900e+02\n2 11060     -1.745500e+02 1.447000e+02\n4 11060     -5.457001e+01 -4.239100e+02\n7 11060     -1.014700e+02 4.762800e+02\n8 11060     -6.452002e+01 1.085000e+02\n11 11060     2.587300e+02 -3.497600e+02\n13 11060     2.840500e+02 8.938000e+01\n14 11060     4.289100e+02 -3.392500e+02\n1 11061     6.049200e+02 3.700100e+02\n3 11061     -2.148300e+02 -1.551000e+02\n7 11061     5.309998e+00 5.139200e+02\n8 11061     1.891998e+01 1.358400e+02\n13 11061     3.754500e+02 1.179700e+02\n14 11061     5.432500e+02 -3.071400e+02\n1 11062     2.664200e+02 3.116900e+02\n7 11062     -2.429400e+02 3.489100e+02\n1 11063     -3.433500e+02 3.101900e+02\n5 11063     -2.718400e+02 -5.493300e+02\n1 11064     5.357300e+02 2.949600e+02\n10 11064     1.021500e+02 5.630800e+02\n1 11065     5.231200e+02 2.936600e+02\n5 11065     6.122100e+02 -3.226700e+02\n6 11065     -2.111200e+02 3.597100e+02\n8 11065     1.753003e+01 7.503000e+01\n9 11065     -2.019700e+02 1.631900e+02\n10 11065     9.034998e+01 5.574400e+02\n12 11065     -6.015997e+01 3.571600e+02\n13 11065     3.575900e+02 4.262000e+01\n14 11065     5.219000e+02 -4.015500e+02\n1 11066     5.231200e+02 2.936600e+02\n6 11066     -2.111200e+02 3.597100e+02\n10 11066     9.034998e+01 5.574400e+02\n12 11066     -6.015997e+01 3.571600e+02\n1 11067     -3.583100e+02 2.676200e+02\n7 11067     -8.191500e+02 5.025000e+01\n13 11067     -3.184500e+02 -2.247100e+02\n1 11068     -1.569700e+02 2.663300e+02\n4 11068     -1.542900e+02 -8.303998e+01\n1 11069     -4.509100e+02 2.456700e+02\n13 11069     -3.899100e+02 -2.712100e+02\n1 11070     -4.509100e+02 2.456700e+02\n13 11070     -3.899100e+02 -2.712100e+02\n1 11071     4.241000e+02 2.462800e+02\n6 11071     -2.499100e+02 2.656500e+02\n11 11071     2.608500e+02 -4.731600e+02\n1 11072     4.056899e+02 2.449600e+02\n4 11072     -1.333900e+02 -4.172700e+02\n5 11072     5.362900e+02 -4.061000e+02\n7 11072     -9.003003e+01 3.441700e+02\n11 11072     2.445300e+02 -4.790600e+02\n12 11072     -1.274600e+02 2.660700e+02\n14 11072     4.508500e+02 -4.859200e+02\n1 11073     -4.021700e+02 2.406800e+02\n7 11073     -8.474700e+02 4.830017e+00\n13 11073     -3.406600e+02 -2.613700e+02\n1 11074     3.819500e+02 2.274500e+02\n4 11074     -1.452400e+02 -4.088100e+02\n5 11074     5.300200e+02 -4.291500e+02\n6 11074     -2.672300e+02 2.251100e+02\n7 11074     -9.842999e+01 3.223100e+02\n11 11074     2.309100e+02 -5.006600e+02\n1 11075     3.958700e+02 2.274100e+02\n4 11075     -1.442400e+02 -4.172600e+02\n5 11075     5.412800e+02 -4.258199e+02\n6 11075     -2.552400e+02 2.330200e+02\n7 11075     -8.684003e+01 3.265700e+02\n11 11075     2.430601e+02 -4.963900e+02\n1 11076     8.236600e+02 2.165100e+02\n3 11076     1.328100e+02 -1.107000e+02\n7 11076     2.754200e+02 4.743000e+02\n8 11076     2.908600e+02 1.564400e+02\n9 11076     8.998999e+01 2.710000e+02\n1 11077     3.946801e+02 2.111300e+02\n10 11077     1.119995e+00 4.206800e+02\n1 11078     3.946801e+02 2.111300e+02\n5 11078     5.520900e+02 -4.415000e+02\n6 11078     -2.389900e+02 2.177300e+02\n13 11078     3.119500e+02 -5.259998e+01\n14 11078     4.655601e+02 -5.221100e+02\n1 11079     4.234301e+02 2.088400e+02\n10 11079     3.164001e+01 4.301800e+02\n1 11080     3.880900e+02 2.070900e+02\n6 11080     -2.415500e+02 2.091000e+02\n10 11080     -1.950012e+00 4.138100e+02\n1 11081     7.720400e+02 1.978600e+02\n13 11081     6.021500e+02 4.407001e+01\n1 11082     5.786300e+02 1.905700e+02\n10 11082     1.958000e+02 4.704300e+02\n1 11083     5.494200e+02 1.820700e+02\n6 11083     -7.845001e+01 2.725200e+02\n7 11083     6.112000e+01 3.453600e+02\n10 11083     1.705500e+02 4.503900e+02\n11 11083     3.875100e+02 -4.957600e+02\n13 11083     4.351801e+02 -3.165997e+01\n14 11083     6.233900e+02 -5.010500e+02\n1 11084     -3.502002e+01 1.647900e+02\n2 11084     -4.219000e+02 -1.849600e+02\n7 11084     -4.269400e+02 1.042000e+02\n8 11084     -2.833200e+02 -1.678800e+02\n13 11084     1.578003e+01 -2.108500e+02\n15 11084     -4.129500e+02 1.923700e+02\n1 11085     2.489600e+02 1.562000e+02\n7 11085     -7.492999e+01 2.580100e+02\n1 11086     5.728600e+02 1.531000e+02\n10 11086     2.077100e+02 4.295700e+02\n1 11087     -3.626300e+02 1.481200e+02\n13 11087     -2.519300e+02 -3.258300e+02\n1 11088     -6.698999e+01 1.316400e+02\n2 11088     -4.182000e+02 -2.226400e+02\n4 11088     -2.295100e+02 -1.637300e+02\n7 11088     -4.357100e+02 6.137000e+01\n10 11088     -4.461900e+02 1.449900e+02\n13 11088     1.070001e+01 -2.470700e+02\n1 11089     1.478800e+02 1.240800e+02\n7 11089     -1.546300e+02 1.865700e+02\n10 11089     -1.574700e+02 2.373100e+02\n13 11089     3.071500e+02 -1.555500e+02\n15 11089     -1.093100e+02 2.473800e+02\n1 11090     5.925000e+02 8.034000e+01\n10 11090     2.610200e+02 3.612200e+02\n1 11091     2.693199e+02 6.835999e+01\n7 11091     -4.760010e+00 1.955500e+02\n10 11091     5.679993e+00 2.292200e+02\n1 11092     2.693199e+02 6.835999e+01\n4 11092     -2.369300e+02 -4.845300e+02\n7 11092     -4.760010e+00 1.955500e+02\n10 11092     5.679993e+00 2.292200e+02\n1 11093     4.786899e+02 5.253998e+01\n7 11093     1.620100e+02 2.585600e+02\n1 11094     3.054000e+02 4.792999e+01\n4 11094     -2.484600e+02 -5.177200e+02\n5 11094     7.909800e+02 -6.007500e+02\n6 11094     9.067999e+01 1.261500e+02\n12 11094     1.137100e+02 1.775000e+02\n15 11094     1.356600e+02 2.350600e+02\n1 11095     3.489800e+02 3.914001e+01\n7 11095     7.639001e+01 2.027900e+02\n1 11096     -1.651700e+02 2.188000e+01\n2 11096     -3.916800e+02 -3.522900e+02\n7 11096     -4.589800e+02 -7.946997e+01\n13 11096     -5.400024e+00 -3.661800e+02\n1 11097     4.007300e+02 1.008002e+01\n7 11097     1.291600e+02 1.975900e+02\n1 11098     -1.644000e+02 2.520020e+00\n7 11098     -4.464000e+02 -9.602002e+01\n13 11098     5.349976e+00 -3.820100e+02\n1 11099     -1.590800e+02 -2.534003e+01\n7 11099     -4.223800e+02 -1.174700e+02\n8 11099     -2.283500e+02 -3.379200e+02\n13 11099     2.645001e+01 -4.032900e+02\n1 11100     4.287500e+02 -3.871002e+01\n7 11100     1.703800e+02 1.662900e+02\n1 11101     -2.105000e+02 -4.034003e+01\n6 11101     -5.447500e+02 -4.034399e+02\n7 11101     -4.638800e+02 -1.555900e+02\n15 11101     -5.098100e+02 -1.589200e+02\n1 11102     -1.876500e+02 -4.225000e+01\n7 11102     -4.401200e+02 -1.468100e+02\n8 11102     -2.397100e+02 -3.634500e+02\n13 11102     1.146997e+01 -4.277200e+02\n1 11103     -3.440100e+02 -7.087000e+01\n7 11103     -5.755700e+02 -2.516000e+02\n1 11104     -6.532200e+02 -8.106000e+01\n4 11104     -4.051100e+02 1.741800e+02\n1 11105     -3.017800e+02 -9.407001e+01\n13 11105     -5.434998e+01 -5.106899e+02\n1 11106     1.409200e+02 -9.402002e+01\n7 11106     -4.423999e+01 -3.619995e+00\n13 11106     4.062500e+02 -3.254900e+02\n1 11107     -4.844600e+02 -9.651001e+01\n15 11107     -8.460900e+02 -3.922800e+02\n1 11108     8.451801e+02 -1.110000e+02\n2 11108     5.239700e+02 3.260999e+01\n6 11108     4.377600e+02 1.971000e+02\n7 11108     4.419100e+02 2.334900e+02\n8 11108     4.881801e+02 -1.470001e+00\n10 11108     5.968800e+02 2.693500e+02\n12 11108     5.211500e+02 2.072000e+02\n13 11108     8.131500e+02 -1.492200e+02\n15 11108     7.990100e+02 2.961700e+02\n1 11109     2.387200e+02 -1.123300e+02\n7 11109     4.910999e+01 2.502002e+01\n13 11109     4.888900e+02 -3.066000e+02\n1 11110     3.641100e+02 -1.130400e+02\n3 11110     2.942500e+02 -3.058500e+02\n6 11110     2.345800e+02 7.869995e+00\n7 11110     1.533800e+02 7.817999e+01\n12 11110     2.604000e+02 5.084003e+01\n1 11111     6.115500e+02 -1.178800e+02\n10 11111     4.038300e+02 1.733400e+02\n15 11111     5.604700e+02 1.807300e+02\n1 11112     -4.966000e+02 -1.194000e+02\n15 11112     -8.483300e+02 -4.298600e+02\n1 11113     3.721000e+02 -1.239600e+02\n6 11113     2.440000e+02 2.929993e+00\n7 11113     1.628700e+02 7.225000e+01\n8 11113     3.658000e+02 -5.539999e+01\n10 11113     1.916400e+02 7.142999e+01\n12 11113     2.711500e+02 4.522998e+01\n1 11114     1.254700e+02 -1.325600e+02\n7 11114     -4.169000e+01 -4.587000e+01\n10 11114     -5.945001e+01 -4.540997e+01\n15 11114     6.510010e+00 -8.096997e+01\n1 11115     5.697500e+02 -1.338700e+02\n7 11115     2.950300e+02 1.328200e+02\n10 11115     3.731400e+02 1.420800e+02\n13 11115     6.946600e+02 -2.298600e+02\n15 11115     5.228000e+02 1.437800e+02\n1 11116     2.294200e+02 -1.488300e+02\n7 11116     6.073999e+01 -9.609985e+00\n1 11117     3.162500e+02 -1.526200e+02\n7 11117     1.295900e+02 2.421002e+01\n1 11118     4.550100e+02 -1.571200e+02\n7 11118     2.354301e+02 7.447998e+01\n1 11119     -5.018700e+02 -1.692800e+02\n7 11119     -6.725400e+02 -4.309500e+02\n15 11119     -8.236400e+02 -4.992000e+02\n1 11120     -4.283100e+02 -2.064700e+02\n7 11120     -5.697800e+02 -4.223200e+02\n1 11121     3.919600e+02 -2.127800e+02\n3 11121     3.649301e+02 -3.817800e+02\n6 11121     3.085200e+02 -7.002002e+01\n7 11121     2.145699e+02 3.630005e+00\n8 11121     4.167700e+02 -1.168800e+02\n1 11122     2.860200e+02 -2.185200e+02\n7 11122     1.367100e+02 -4.588000e+01\n1 11123     1.448400e+02 -2.195200e+02\n6 11123     1.348200e+02 -2.206000e+02\n15 11123     8.156000e+01 -1.754900e+02\n1 11124     2.308000e+02 -2.318400e+02\n7 11124     1.020700e+02 -7.894000e+01\n1 11125     8.301200e+02 -2.579800e+02\n2 11125     5.900601e+02 -9.201001e+01\n7 11125     4.854301e+02 1.103800e+02\n8 11125     5.412600e+02 -1.054300e+02\n13 11125     8.580300e+02 -2.665900e+02\n15 11125     8.504600e+02 1.166000e+02\n1 11126     -6.655500e+02 -2.606400e+02\n4 11126     -5.493400e+02 1.616600e+02\n1 11127     8.475601e+02 -2.621900e+02\n2 11127     6.071801e+02 -8.122998e+01\n7 11127     5.005000e+02 1.154200e+02\n9 11127     3.852600e+02 3.488000e+01\n10 11127     6.556400e+02 1.225000e+02\n13 11127     8.738900e+02 -2.624700e+02\n1 11128     8.475601e+02 -2.621900e+02\n2 11128     6.071801e+02 -8.122998e+01\n8 11128     5.560500e+02 -9.734003e+01\n9 11128     3.852600e+02 3.488000e+01\n12 11128     6.038300e+02 7.815002e+01\n13 11128     8.738900e+02 -2.624700e+02\n1 11129     -3.875300e+02 -2.651000e+02\n10 11129     -5.866600e+02 -4.453500e+02\n15 11129     -6.006500e+02 -5.502300e+02\n1 11130     -1.884200e+02 -2.677100e+02\n6 11130     -2.496000e+02 -5.872500e+02\n15 11130     -3.379700e+02 -4.312600e+02\n1 11131     8.355900e+02 -2.675300e+02\n7 11131     4.927200e+02 1.058200e+02\n8 11131     5.495200e+02 -1.081800e+02\n10 11131     6.458700e+02 1.121300e+02\n13 11131     8.655200e+02 -2.712200e+02\n15 11131     8.607300e+02 1.085800e+02\n1 11132     -1.827300e+02 -2.727000e+02\n15 11132     -3.267300e+02 -4.333700e+02\n1 11133     -2.947800e+02 -2.772800e+02\n15 11133     -4.685900e+02 -5.067000e+02\n1 11134     -1.731700e+02 -2.799500e+02\n6 11134     -2.193100e+02 -5.856100e+02\n7 11134     -2.752400e+02 -3.450300e+02\n15 11134     -3.100400e+02 -4.364399e+02\n1 11135     8.542500e+02 -3.002200e+02\n2 11135     6.331899e+02 -1.051600e+02\n7 11135     5.195699e+02 8.894000e+01\n8 11135     5.773900e+02 -1.178400e+02\n9 11135     4.076899e+02 1.625000e+01\n10 11135     6.766500e+02 8.769000e+01\n1 11136     3.896400e+02 -3.083900e+02\n15 11136     4.117800e+02 -1.551000e+02\n1 11137     5.001600e+02 -3.160800e+02\n15 11137     5.304500e+02 -1.097300e+02\n1 11138     -6.300300e+02 -3.173200e+02\n4 11138     -5.965000e+02 1.283400e+02\n1 11139     -6.790700e+02 -3.182800e+02\n4 11139     -6.013200e+02 1.640300e+02\n1 11140     -6.500000e+02 -3.179400e+02\n4 11140     -5.980900e+02 1.430800e+02\n1 11141     -6.039100e+02 -3.263500e+02\n4 11141     -6.021200e+02 1.073800e+02\n1 11142     4.877500e+02 -3.276300e+02\n10 11142     3.690699e+02 -8.642999e+01\n1 11143     3.174500e+02 -3.595600e+02\n10 11143     2.258900e+02 -1.930900e+02\n15 11143     3.474800e+02 -2.545600e+02\n1 11144     -6.547800e+02 -3.816800e+02\n4 11144     -6.581700e+02 1.384200e+02\n1 11145     -3.403000e+02 -3.884600e+02\n9 11145     -1.029700e+02 -5.663400e+02\n1 11146     -1.728800e+02 -3.871800e+02\n6 11146     -9.795001e+01 -6.760100e+02\n1 11147     -6.816300e+02 -4.244900e+02\n4 11147     -7.023100e+02 1.535900e+02\n1 11148     -1.497600e+02 -4.330800e+02\n6 11148     -2.715997e+01 -6.937300e+02\n7 11148     -1.568800e+02 -4.630400e+02\n1 11149     -2.847700e+02 -4.571000e+02\n6 11149     -1.189400e+02 -8.322900e+02\n1 11150     8.041200e+02 -4.659399e+02\n7 11150     5.686700e+02 -4.917999e+01\n12 11150     7.190300e+02 -9.398999e+01\n1 11151     -2.293700e+02 -4.700200e+02\n4 11151     -7.106500e+02 -2.054100e+02\n6 11151     -5.482001e+01 -7.930900e+02\n7 11151     -2.038200e+02 -5.392800e+02\n10 11151     -2.902200e+02 -5.805400e+02\n1 11152     5.827200e+02 -4.827700e+02\n7 11152     4.368900e+02 -1.510600e+02\n9 11152     4.486600e+02 -1.414600e+02\n12 11152     5.917200e+02 -2.186500e+02\n1 11153     9.475000e+01 -5.345699e+02\n4 11153     -7.524200e+02 -4.804200e+02\n9 11153     3.009600e+02 -3.687900e+02\n1 11154     4.099800e+02 5.872100e+02\n12 11154     -3.050900e+02 6.223100e+02\n1 11155     8.077100e+02 5.784400e+02\n2 11155     -1.650024e+00 4.145600e+02\n3 11155     -1.460000e+02 7.828003e+01\n5 11155     7.482600e+02 9.559998e+00\n6 11155     -1.302200e+02 7.700100e+02\n8 11155     7.934998e+01 3.266400e+02\n9 11155     -1.584700e+02 4.351400e+02\n13 11155     4.617000e+02 3.125400e+02\n14 11155     6.430800e+02 -7.384003e+01\n1 11156     8.650900e+02 5.727700e+02\n2 11156     3.515002e+01 4.186800e+02\n3 11156     -1.116300e+02 8.172998e+01\n6 11156     -8.378000e+01 7.837200e+02\n13 11156     4.974800e+02 3.188900e+02\n14 11156     6.865200e+02 -6.734003e+01\n1 11157     6.441100e+02 5.715000e+02\n2 11157     -1.102300e+02 3.819900e+02\n3 11157     -2.495000e+02 4.658002e+01\n5 11157     6.159800e+02 -2.681000e+01\n6 11157     -2.649700e+02 7.057100e+02\n9 11157     -2.491600e+02 4.027600e+02\n11 11157     3.347000e+02 -1.604800e+02\n13 11157     3.587400e+02 2.758100e+02\n14 11157     5.187500e+02 -1.142500e+02\n1 11158     5.814900e+02 5.680300e+02\n2 11158     -1.507400e+02 3.657300e+02\n3 11158     -2.863900e+02 2.996997e+01\n4 11158     6.157001e+01 -4.718600e+02\n5 11158     5.691100e+02 -4.591998e+01\n6 11158     -3.143500e+02 6.772400e+02\n8 11158     -4.414001e+01 2.855100e+02\n9 11158     -2.835100e+02 3.872600e+02\n13 11158     3.189700e+02 2.598600e+02\n14 11158     4.707500e+02 -1.320700e+02\n1 11159     5.814900e+02 5.680300e+02\n2 11159     -1.507400e+02 3.657300e+02\n3 11159     -2.863900e+02 2.996997e+01\n4 11159     6.157001e+01 -4.718600e+02\n5 11159     5.691100e+02 -4.591998e+01\n9 11159     -2.835100e+02 3.872600e+02\n13 11159     3.189700e+02 2.598600e+02\n14 11159     4.707500e+02 -1.320700e+02\n1 11160     5.814900e+02 5.680300e+02\n2 11160     -1.507400e+02 3.657300e+02\n8 11160     -4.414001e+01 2.855100e+02\n9 11160     -2.835100e+02 3.872600e+02\n13 11160     3.189700e+02 2.598600e+02\n14 11160     4.707500e+02 -1.320700e+02\n1 11161     6.550900e+02 5.568300e+02\n4 11161     6.040997e+01 -5.155699e+02\n5 11161     6.329500e+02 -3.966998e+01\n6 11161     -2.453800e+02 6.941700e+02\n8 11161     1.919983e+00 2.885000e+02\n11 11161     3.471000e+02 -1.689500e+02\n13 11161     3.700800e+02 2.678000e+02\n14 11161     5.329399e+02 -1.240600e+02\n1 11162     6.388700e+02 5.561900e+02\n2 11162     -1.085300e+02 3.654200e+02\n4 11162     5.817999e+01 -5.001801e+02\n5 11162     6.174900e+02 -4.462000e+01\n11 11162     3.348900e+02 -1.727600e+02\n13 11162     3.581500e+02 2.635400e+02\n14 11162     5.186600e+02 -1.290800e+02\n1 11163     6.471300e+02 5.378100e+02\n2 11163     -9.465002e+01 3.500500e+02\n3 11163     -2.340800e+02 1.603003e+01\n4 11163     4.952002e+01 -5.127400e+02\n5 11163     6.310601e+02 -5.895001e+01\n6 11163     -2.443400e+02 6.701200e+02\n8 11163     2.039978e+00 2.732700e+02\n11 11163     3.468500e+02 -1.840700e+02\n13 11163     3.689301e+02 2.525000e+02\n1 11164     6.471300e+02 5.378100e+02\n3 11164     -2.336900e+02 4.463000e+01\n4 11164     4.952002e+01 -5.127400e+02\n6 11164     -2.443400e+02 6.701200e+02\n8 11164     2.039978e+00 2.732700e+02\n11 11164     3.468500e+02 -1.840700e+02\n13 11164     3.689301e+02 2.525000e+02\n1 11165     -1.047000e+02 5.207900e+02\n5 11165     -5.484003e+01 -2.542300e+02\n8 11165     -5.350600e+02 9.067999e+01\n10 11165     -6.914400e+02 5.757600e+02\n12 11165     -8.136800e+02 3.167900e+02\n1 11166     6.372800e+02 5.145700e+02\n2 11166     -9.466998e+01 3.308400e+02\n4 11166     3.696997e+01 -5.092400e+02\n5 11166     6.284800e+02 -8.153998e+01\n6 11166     -2.432400e+02 6.410300e+02\n9 11166     -2.345400e+02 3.588800e+02\n12 11166     -7.634998e+01 6.070200e+02\n13 11166     3.672700e+02 2.330400e+02\n14 11166     5.301400e+02 -1.650200e+02\n1 11167     3.975500e+02 4.892700e+02\n9 11167     -3.786500e+02 2.772400e+02\n11 11167     1.685300e+02 -2.744900e+02\n1 11168     -7.835600e+02 4.805900e+02\n4 11168     -5.212000e+01 2.600100e+02\n1 11169     3.300000e+01 4.634700e+02\n7 11169     -5.205800e+02 4.047900e+02\n11 11169     -1.296200e+02 -3.755400e+02\n12 11169     -6.313300e+02 3.121400e+02\n13 11169     -5.696997e+01 4.944000e+01\n1 11170     6.529500e+02 4.293200e+02\n3 11170     -2.003300e+02 -8.458002e+01\n5 11170     6.623300e+02 -1.580300e+02\n6 11170     -1.951300e+02 5.572400e+02\n7 11170     2.304999e+01 5.809300e+02\n9 11170     -2.010500e+02 2.876200e+02\n11 11170     3.830900e+02 -2.639500e+02\n12 11170     -2.959998e+01 5.288300e+02\n14 11170     5.661899e+02 -2.382500e+02\n1 11171     4.630300e+02 3.675800e+02\n2 11171     -1.792800e+02 1.329900e+02\n7 11171     -1.065300e+02 4.661100e+02\n11 11171     2.541500e+02 -3.579200e+02\n1 11172     4.769000e+02 3.679400e+02\n2 11172     -1.688900e+02 1.376200e+02\n9 11172     -2.893800e+02 1.872700e+02\n1 11173     7.018900e+02 3.654700e+02\n2 11173     -4.349976e+00 1.985600e+02\n6 11173     -1.268000e+02 5.097000e+02\n7 11173     8.173999e+01 5.382900e+02\n8 11173     7.759998e+01 1.549800e+02\n9 11173     -1.528800e+02 2.457000e+02\n11 11173     4.413101e+02 -3.033200e+02\n12 11173     3.670001e+01 4.828800e+02\n13 11173     4.419000e+02 1.390100e+02\n1 11174     -6.258100e+02 3.428600e+02\n4 11174     -1.321900e+02 2.030700e+02\n1 11175     -6.380900e+02 3.422300e+02\n4 11175     -1.324100e+02 2.099100e+02\n1 11176     1.885699e+02 3.423400e+02\n7 11176     -3.288200e+02 3.463700e+02\n13 11176     9.057001e+01 -1.071997e+01\n14 11176     1.859900e+02 -4.560601e+02\n1 11177     4.929000e+02 3.027500e+02\n2 11177     -1.013700e+02 1.003300e+02\n5 11177     5.778300e+02 -3.231600e+02\n6 11177     -2.475100e+02 3.524300e+02\n8 11177     -8.390015e+00 7.142999e+01\n9 11177     -2.277800e+02 1.583300e+02\n13 11177     3.316801e+02 4.047998e+01\n14 11177     4.893900e+02 -4.030400e+02\n1 11178     5.248000e+02 3.024500e+02\n2 11178     -7.633002e+01 1.093400e+02\n6 11178     -2.173700e+02 3.675900e+02\n10 11178     8.734003e+01 5.677400e+02\n1 11179     4.597600e+02 2.934500e+02\n2 11179     -1.195400e+02 8.484998e+01\n5 11179     5.532200e+02 -3.408100e+02\n6 11179     -2.679100e+02 3.275000e+02\n8 11179     -2.381000e+01 5.875000e+01\n9 11179     -2.426600e+02 1.449600e+02\n11 11179     2.738300e+02 -4.220700e+02\n13 11179     3.124399e+02 2.510999e+01\n14 11179     4.650500e+02 -4.217200e+02\n1 11180     -9.820007e+00 2.924700e+02\n7 11180     -4.815000e+02 2.258700e+02\n13 11180     -3.692999e+01 -1.030600e+02\n14 11180     2.195001e+01 -5.679000e+02\n1 11181     5.230601e+02 2.860300e+02\n2 11181     -6.466998e+01 1.002900e+02\n6 11181     -2.044100e+02 3.527100e+02\n9 11181     -1.965500e+02 1.600800e+02\n10 11181     9.345001e+01 5.496200e+02\n12 11181     -5.525000e+01 3.514600e+02\n13 11181     3.607400e+02 3.665002e+01\n14 11181     5.261000e+02 -4.092800e+02\n1 11182     5.366000e+02 2.859800e+02\n6 11182     -1.918300e+02 3.599900e+02\n12 11182     -4.219000e+01 3.569400e+02\n1 11183     5.366000e+02 2.859800e+02\n2 11183     -5.357001e+01 1.050700e+02\n6 11183     -1.918300e+02 3.599900e+02\n9 11183     -1.874500e+02 1.644700e+02\n12 11183     -4.219000e+01 3.569400e+02\n13 11183     3.732100e+02 4.165002e+01\n14 11183     5.423800e+02 -4.028000e+02\n1 11184     -1.051001e+01 2.835100e+02\n7 11184     -4.760900e+02 2.183700e+02\n1 11185     -1.410000e+02 2.671300e+02\n13 11185     -1.290500e+02 -1.605000e+02\n1 11186     4.314399e+02 2.650800e+02\n11 11186     2.603900e+02 -4.536300e+02\n12 11186     -1.167000e+02 2.950600e+02\n15 11186     1.034200e+02 5.465300e+02\n1 11187     4.387400e+02 2.548300e+02\n6 11187     -2.440800e+02 2.803900e+02\n11 11187     2.704700e+02 -4.609400e+02\n12 11187     -1.018600e+02 2.901700e+02\n1 11188     -3.693300e+02 2.113700e+02\n7 11188     -7.907300e+02 -6.890015e+00\n1 11189     5.535200e+02 1.893600e+02\n10 11189     1.725600e+02 4.598800e+02\n11 11189     3.881899e+02 -4.888100e+02\n1 11190     -8.444000e+01 1.809100e+02\n4 11190     -2.007900e+02 -1.433300e+02\n8 11190     -3.341300e+02 -1.749800e+02\n1 11191     1.396700e+02 1.651400e+02\n7 11191     -2.100700e+02 2.055700e+02\n15 11191     -1.590700e+02 2.892800e+02\n1 11192     9.153998e+01 1.606900e+02\n4 11192     -1.958900e+02 -2.965000e+02\n5 11192     4.070900e+02 -5.680200e+02\n7 11192     -2.586900e+02 1.784400e+02\n10 11192     -2.573800e+02 2.482100e+02\n15 11192     -2.198800e+02 2.593700e+02\n1 11193     5.925300e+02 1.301100e+02\n7 11193     1.221600e+02 3.195200e+02\n10 11193     2.378199e+02 4.130100e+02\n1 11194     2.076700e+02 8.259000e+01\n6 11194     -3.060999e+01 9.716998e+01\n7 11194     -6.769000e+01 1.800300e+02\n8 11194     1.541100e+02 2.748001e+01\n10 11194     -6.696997e+01 2.173500e+02\n12 11194     -1.144000e+01 1.517900e+02\n13 11194     3.881100e+02 -1.658300e+02\n15 11194     -5.020020e+00 2.274200e+02\n1 11195     2.385200e+02 8.292001e+01\n3 11195     8.453998e+01 -2.073900e+02\n5 11195     6.999301e+02 -5.871300e+02\n7 11195     -3.839001e+01 1.948300e+02\n8 11195     1.799900e+02 4.175000e+01\n9 11195     3.684998e+01 1.810300e+02\n10 11195     -3.222998e+01 2.312500e+02\n13 11195     4.155300e+02 -1.559400e+02\n15 11195     3.541998e+01 2.438600e+02\n1 11196     1.925400e+02 6.033002e+01\n3 11196     6.059003e+01 -2.476100e+02\n4 11196     -2.469500e+02 -4.279200e+02\n7 11196     -7.188000e+01 1.546900e+02\n8 11196     1.543600e+02 7.549988e+00\n9 11196     1.615002e+01 1.445400e+02\n12 11196     -1.242999e+01 1.226500e+02\n15 11196     -1.262000e+01 1.926600e+02\n1 11197     4.257600e+02 5.401001e+01\n2 11197     3.269500e+02 1.463000e+02\n3 11197     2.172600e+02 -1.678100e+02\n7 11197     1.260900e+02 2.423500e+02\n8 11197     3.062700e+02 7.647000e+01\n15 11197     2.723300e+02 3.011000e+02\n1 11198     2.022800e+02 3.092999e+01\n7 11198     -4.651001e+01 1.340700e+02\n1 11199     2.022800e+02 3.092999e+01\n4 11199     -2.682000e+02 -4.426500e+02\n7 11199     -4.651001e+01 1.340700e+02\n8 11199     1.830700e+02 -7.269989e+00\n12 11199     2.060999e+01 1.000200e+02\n1 11200     3.643199e+02 2.342999e+01\n15 11200     2.190800e+02 2.340000e+02\n1 11201     -2.193500e+02 9.199829e-01\n15 11201     -5.497000e+02 -1.122300e+02\n1 11202     2.621100e+02 -1.378998e+01\n2 11202     2.715900e+02 4.662000e+01\n3 11202     1.745800e+02 -2.615600e+02\n7 11202     2.757001e+01 1.225400e+02\n9 11202     1.170500e+02 1.337500e+02\n10 11202     3.412000e+01 1.395400e+02\n15 11202     1.147500e+02 1.375700e+02\n1 11203     4.629500e+02 -2.490997e+01\n6 11203     2.424000e+02 1.384200e+02\n7 11203     1.881600e+02 1.915700e+02\n12 11203     2.809200e+02 1.803800e+02\n13 11203     6.085000e+02 -1.706300e+02\n1 11204     1.970000e+02 -4.839001e+01\n2 11204     2.358800e+02 -2.100000e+01\n1 11205     3.349399e+02 -4.890997e+01\n7 11205     1.055000e+02 1.224600e+02\n10 11205     1.259500e+02 1.339800e+02\n1 11206     1.965100e+02 -8.934998e+01\n2 11206     2.541100e+02 -6.321997e+01\n3 11206     1.651600e+02 -3.669300e+02\n4 11206     -3.530200e+02 -4.599500e+02\n7 11206     1.090027e+00 2.528003e+01\n13 11206     4.409500e+02 -3.035200e+02\n1 11207     3.861400e+02 -9.237000e+01\n3 11207     2.948900e+02 -2.830200e+02\n13 11207     5.878800e+02 -2.447900e+02\n15 11207     3.018101e+02 1.037700e+02\n1 11208     -5.107200e+02 -9.454999e+01\n4 11208     -4.059200e+02 7.503003e+01\n1 11209     -4.863300e+02 -1.099700e+02\n15 11209     -8.400300e+02 -4.112800e+02\n1 11210     -3.928700e+02 -1.259700e+02\n7 11210     -5.876300e+02 -3.282400e+02\n1 11211     -4.618400e+02 -1.281000e+02\n15 11211     -7.930700e+02 -4.184700e+02\n1 11212     2.905400e+02 -1.380900e+02\n7 11212     1.030800e+02 2.501001e+01\n1 11213     2.893900e+02 -1.490200e+02\n2 11213     3.677600e+02 -6.758002e+01\n3 11213     2.716899e+02 -3.680200e+02\n7 11213     1.075000e+02 1.540002e+01\n10 11213     1.203700e+02 1.153998e+01\n13 11213     5.391500e+02 -3.193400e+02\n15 11213     2.162200e+02 -1.345001e+01\n1 11214     4.711300e+02 -1.559500e+02\n7 11214     2.464900e+02 8.272000e+01\n1 11215     4.607300e+02 -1.698800e+02\n7 11215     2.470800e+02 6.734998e+01\n1 11216     -4.932000e+02 -1.752700e+02\n15 11216     -8.062000e+02 -5.012200e+02\n1 11217     -5.122500e+02 -1.964100e+02\n7 11217     -6.641600e+02 -4.606801e+02\n15 11217     -8.194100e+02 -5.401801e+02\n1 11218     4.562700e+02 -1.971400e+02\n7 11218     2.541700e+02 4.252002e+01\n1 11219     -2.425700e+02 -2.132700e+02\n4 11219     -4.798200e+02 -1.282600e+02\n6 11219     -3.678800e+02 -5.856300e+02\n7 11219     -3.826600e+02 -3.241400e+02\n15 11219     -4.421400e+02 -3.949500e+02\n1 11220     -2.425700e+02 -2.132700e+02\n4 11220     -4.798200e+02 -1.282600e+02\n6 11220     -3.678800e+02 -5.856300e+02\n7 11220     -3.826600e+02 -3.241400e+02\n9 11220     -2.337300e+02 -4.074700e+02\n15 11220     -4.421400e+02 -3.949500e+02\n1 11221     -2.196300e+02 -2.130100e+02\n4 11221     -4.782000e+02 -1.444800e+02\n9 11221     -2.160100e+02 -3.929200e+02\n1 11222     -4.802900e+02 -2.181200e+02\n15 11222     -7.583000e+02 -5.479100e+02\n1 11223     -3.938400e+02 -2.193000e+02\n7 11223     -5.252300e+02 -4.122000e+02\n1 11224     -2.491800e+02 -2.213000e+02\n4 11224     -4.874200e+02 -1.258900e+02\n9 11224     -2.305200e+02 -4.170200e+02\n15 11224     -4.456700e+02 -4.090700e+02\n1 11225     2.776899e+02 -2.245100e+02\n7 11225     1.341300e+02 -5.378998e+01\n1 11226     -4.040100e+02 -2.280700e+02\n7 11226     -5.294600e+02 -4.259400e+02\n1 11227     2.388500e+02 -2.424500e+02\n7 11227     1.150400e+02 -8.416998e+01\n1 11228     -6.119100e+02 -2.550300e+02\n4 11228     -5.405800e+02 1.234400e+02\n1 11229     -3.762000e+02 -2.697400e+02\n7 11229     -4.745500e+02 -4.483700e+02\n10 11229     -5.697800e+02 -4.433400e+02\n15 11229     -5.822000e+02 -5.483900e+02\n1 11230     -4.001400e+02 -2.754600e+02\n7 11230     -4.939700e+02 -4.656600e+02\n15 11230     -6.099700e+02 -5.692600e+02\n1 11231     -4.001400e+02 -2.754600e+02\n7 11231     -4.939700e+02 -4.656600e+02\n1 11232     -1.883500e+02 -2.762400e+02\n15 11232     -3.315500e+02 -4.439000e+02\n1 11233     -1.883500e+02 -2.762400e+02\n6 11233     -2.371300e+02 -5.923900e+02\n15 11233     -3.315500e+02 -4.439000e+02\n1 11234     -1.819600e+02 -2.826800e+02\n6 11234     -2.244100e+02 -5.964301e+02\n15 11234     -3.180900e+02 -4.459301e+02\n1 11235     2.602200e+02 -2.897800e+02\n10 11235     1.501500e+02 -1.468400e+02\n1 11236     -1.969800e+02 -2.945200e+02\n6 11236     -2.265500e+02 -6.191400e+02\n1 11237     7.688000e+02 -2.996300e+02\n7 11237     4.661500e+02 5.788000e+01\n12 11237     5.758700e+02 1.109003e+01\n15 11237     8.070200e+02 3.898999e+01\n1 11238     -3.094200e+02 -3.009600e+02\n15 11238     -4.730700e+02 -5.489800e+02\n1 11239     -3.048900e+02 -3.090300e+02\n15 11239     -4.630000e+02 -5.544399e+02\n1 11240     2.458002e+01 -3.279500e+02\n15 11240     -2.398999e+01 -3.801100e+02\n1 11241     7.960699e+02 -3.438100e+02\n7 11241     5.046500e+02 3.573999e+01\n15 11241     8.596300e+02 1.210022e+00\n1 11242     4.440601e+02 -3.493100e+02\n10 11242     3.402200e+02 -1.282400e+02\n15 11242     4.854200e+02 -1.784100e+02\n1 11243     7.151600e+02 -4.895400e+02\n3 11243     6.199100e+02 -5.454000e+02\n9 11243     4.949100e+02 -9.773999e+01\n1 11244     6.760800e+02 5.649200e+02\n2 11244     -8.312000e+01 3.810300e+02\n3 11244     -2.225300e+02 4.528998e+01\n4 11244     6.631000e+01 -5.270699e+02\n5 11244     6.479301e+02 -2.782001e+01\n6 11244     -2.311300e+02 7.104000e+02\n8 11244     1.140997e+01 2.979200e+02\n9 11244     -2.265200e+02 4.028500e+02\n11 11244     3.602300e+02 -1.588300e+02\n13 11244     3.819600e+02 2.776400e+02\n14 11244     5.470100e+02 -1.128100e+02\n1 11245     7.192400e+02 4.893000e+02\n11 11245     4.140601e+02 -2.044200e+02\n13 11245     4.249100e+02 2.334100e+02\n1 11246     1.318300e+02 4.674100e+02\n13 11246     1.965997e+01 7.992999e+01\n14 11246     1.021100e+02 -3.381000e+02\n1 11247     6.429600e+02 4.121200e+02\n2 11247     -6.016998e+01 2.288800e+02\n3 11247     -2.039300e+02 -1.032000e+02\n5 11247     6.579100e+02 -1.768800e+02\n6 11247     -1.969200e+02 5.345500e+02\n7 11247     1.995001e+01 5.630700e+02\n8 11247     3.047998e+01 1.775300e+02\n9 11247     -2.017100e+02 2.707900e+02\n11 11247     3.800100e+02 -2.793800e+02\n12 11247     -3.128003e+01 5.080000e+02\n14 11247     5.628101e+02 -2.571900e+02\n1 11248     7.451300e+02 3.991600e+02\n2 11248     1.410999e+01 2.410300e+02\n3 11248     -1.317400e+02 -9.082001e+01\n6 11248     -1.057100e+02 5.641400e+02\n8 11248     9.223999e+01 1.881000e+02\n9 11248     -1.388200e+02 2.838700e+02\n12 11248     5.641998e+01 5.304000e+02\n13 11248     4.624900e+02 1.730900e+02\n1 11249     -4.942500e+02 2.409500e+02\n13 11249     -4.270700e+02 -2.893900e+02\n1 11250     4.179399e+02 1.491600e+02\n10 11250     1.085300e+02 3.709500e+02\n1 11251     2.246100e+02 1.392000e+02\n2 11251     1.079300e+02 1.255900e+02\n15 11251     -1.731000e+01 3.045700e+02\n1 11252     6.624500e+02 1.115000e+02\n10 11252     3.126400e+02 4.206900e+02\n1 11253     8.686899e+02 8.238000e+01\n7 11253     3.885800e+02 3.954700e+02\n9 11253     2.392000e+02 2.599800e+02\n10 11253     5.480900e+02 4.701400e+02\n11 11253     6.995200e+02 -4.952300e+02\n13 11253     7.623101e+02 -1.059998e+00\n15 11253     7.366899e+02 5.358300e+02\n1 11254     2.194000e+02 6.816998e+01\n2 11254     1.715000e+02 8.733002e+01\n3 11254     7.865002e+01 -2.262600e+02\n4 11254     -2.408400e+02 -4.476100e+02\n6 11254     -6.119995e+00 9.237000e+01\n7 11254     -5.010999e+01 1.737700e+02\n8 11254     1.722700e+02 2.504001e+01\n9 11254     3.320001e+01 1.637000e+02\n10 11254     -4.773999e+01 2.078000e+02\n12 11254     1.252002e+01 1.466200e+02\n13 11254     4.042300e+02 -1.719700e+02\n1 11255     1.602400e+02 -3.303003e+01\n15 11255     -2.989990e+00 6.091998e+01\n1 11256     8.603199e+02 -4.310999e+01\n2 11256     5.022900e+02 9.641998e+01\n3 11256     3.661700e+02 -2.163100e+02\n6 11256     4.163600e+02 2.671100e+02\n7 11256     4.291801e+02 2.935400e+02\n8 11256     4.713400e+02 5.081000e+01\n9 11256     2.912300e+02 1.804200e+02\n12 11256     5.011000e+02 2.771100e+02\n13 11256     8.014800e+02 -9.373999e+01\n15 11256     7.852700e+02 3.842900e+02\n1 11257     3.606700e+02 -5.257001e+01\n2 11257     3.629000e+02 5.254999e+01\n3 11257     2.590800e+02 -2.545000e+02\n7 11257     1.269200e+02 1.296700e+02\n10 11257     1.520300e+02 1.407500e+02\n13 11257     5.587900e+02 -2.208800e+02\n15 11257     2.537000e+02 1.400900e+02\n1 11258     -5.210600e+02 -7.490997e+01\n4 11258     -3.927700e+02 8.369000e+01\n1 11259     1.531600e+02 -8.089001e+01\n3 11259     1.256900e+02 -3.872200e+02\n7 11259     -4.158002e+01 1.183002e+01\n10 11259     -5.307001e+01 2.113000e+01\n13 11259     4.075300e+02 -3.123100e+02\n15 11259     1.278998e+01 -2.710022e+00\n1 11260     1.531600e+02 -8.089001e+01\n7 11260     -4.158002e+01 1.183002e+01\n15 11260     1.278998e+01 -2.710022e+00\n1 11261     -4.731200e+02 -1.173500e+02\n15 11261     -8.175700e+02 -4.126500e+02\n1 11262     -1.434300e+02 -1.289600e+02\n13 11262     1.040700e+02 -4.804900e+02\n1 11263     6.156000e+01 -1.352700e+02\n3 11263     1.057400e+02 -4.750400e+02\n4 11263     -3.977300e+02 -3.768300e+02\n6 11263     -6.570007e+00 -2.033000e+02\n7 11263     -9.394000e+01 -7.734998e+01\n8 11263     1.706300e+02 -1.927500e+02\n10 11263     -1.238500e+02 -7.671997e+01\n12 11263     -1.054999e+01 -1.520700e+02\n15 11263     -6.902002e+01 -1.179700e+02\n1 11264     -5.197700e+02 -1.445400e+02\n4 11264     -4.447900e+02 7.300000e+01\n1 11265     4.789500e+02 -1.621700e+02\n7 11265     2.552100e+02 7.925000e+01\n1 11266     3.114900e+02 -1.758800e+02\n7 11266     1.402500e+02 3.130005e+00\n1 11267     -5.387800e+02 -1.769000e+02\n4 11267     -4.715300e+02 8.132999e+01\n7 11267     -7.071700e+02 -4.602900e+02\n1 11268     -2.311300e+02 -2.169700e+02\n4 11268     -4.819100e+02 -1.371500e+02\n6 11268     -3.511900e+02 -5.801600e+02\n7 11268     -3.695000e+02 -3.219500e+02\n15 11268     -4.245400e+02 -3.929600e+02\n1 11269     2.483600e+02 -2.330000e+02\n7 11269     1.162700e+02 -7.232001e+01\n1 11270     -3.578500e+02 -2.530800e+02\n7 11270     -4.674700e+02 -4.241500e+02\n10 11270     -5.574300e+02 -4.144600e+02\n15 11270     -5.685200e+02 -5.165100e+02\n1 11271     -2.854600e+02 -2.536100e+02\n15 11271     -4.739600e+02 -4.698101e+02\n1 11272     -2.949700e+02 -2.658700e+02\n7 11272     -3.981700e+02 -3.995800e+02\n15 11272     -4.762900e+02 -4.936300e+02\n1 11273     -2.173000e+02 -2.823200e+02\n6 11273     -2.610300e+02 -6.239500e+02\n9 11273     -1.413400e+02 -4.278600e+02\n15 11273     -3.635800e+02 -4.668900e+02\n1 11274     -2.173000e+02 -2.823200e+02\n6 11274     -2.610300e+02 -6.239500e+02\n9 11274     -1.322700e+02 -4.287800e+02\n15 11274     -3.635800e+02 -4.668900e+02\n1 11275     2.485500e+02 -2.843600e+02\n10 11275     1.358000e+02 -1.468200e+02\n1 11276     7.873800e+02 -3.133900e+02\n7 11276     4.847100e+02 5.381000e+01\n9 11276     3.954301e+02 -9.219971e+00\n10 11276     6.247500e+02 4.816998e+01\n15 11276     8.340300e+02 3.185999e+01\n1 11277     -1.571900e+02 -3.148800e+02\n6 11277     -1.674600e+02 -6.028500e+02\n15 11277     -2.687800e+02 -4.713300e+02\n1 11278     2.299800e+02 -3.205000e+02\n4 11278     -5.402200e+02 -5.379600e+02\n6 11278     2.412600e+02 -2.765200e+02\n12 11278     2.547400e+02 -2.423400e+02\n1 11279     6.492500e+02 -3.463400e+02\n7 11279     4.111801e+02 -2.302002e+01\n1 11280     -3.948000e+02 -4.373400e+02\n4 11280     -6.905000e+02 -7.167999e+01\n1 11281     7.965400e+02 -4.374600e+02\n9 11281     4.833700e+02 -5.287000e+01\n12 11281     6.937500e+02 -7.644000e+01\n1 11282     7.989100e+02 -4.749800e+02\n7 11282     5.691100e+02 -5.695001e+01\n1 11283     6.938700e+02 -5.728400e+02\n7 11283     5.550900e+02 -1.688300e+02\n12 11283     7.348101e+02 -2.249700e+02\n1 11284     7.236200e+02 4.047900e+02\n2 11284     -2.450012e+00 2.422400e+02\n5 11284     7.286700e+02 -1.632500e+02\n6 11284     -1.257900e+02 5.626500e+02\n8 11284     7.878998e+01 1.890300e+02\n9 11284     -1.530200e+02 2.843700e+02\n11 11284     4.443500e+02 -2.664000e+02\n12 11284     3.748999e+01 5.302400e+02\n13 11284     4.475300e+02 1.735400e+02\n1 11285     -1.757000e+02 2.909200e+02\n7 11285     -6.438400e+02 1.546800e+02\n1 11286     5.878600e+02 1.806200e+02\n7 11286     9.187000e+01 3.580100e+02\n10 11286     2.068300e+02 4.628100e+02\n11 11286     4.194500e+02 -4.863900e+02\n13 11286     4.603000e+02 -2.278998e+01\n14 11286     6.555400e+02 -4.906300e+02\n1 11287     1.605300e+02 -1.083002e+01\n15 11287     -1.490002e+01 8.892001e+01\n1 11288     3.403800e+02 -2.362000e+01\n7 11288     9.796997e+01 1.463200e+02\n1 11289     2.789800e+02 -7.427002e+01\n15 11289     1.674000e+02 7.282001e+01\n1 11290     2.789800e+02 -7.427002e+01\n13 11290     5.090500e+02 -2.624100e+02\n15 11290     1.674000e+02 7.282001e+01\n1 11291     -4.734600e+02 -1.048300e+02\n15 11291     -8.261900e+02 -3.956000e+02\n1 11292     -4.950700e+02 -1.617700e+02\n7 11292     -6.720100e+02 -4.193600e+02\n15 11292     -8.196300e+02 -4.843400e+02\n1 11293     -9.179993e+00 -1.673300e+02\n2 11293     5.473999e+01 -3.294800e+02\n6 11293     -1.259100e+02 -3.283300e+02\n7 11293     -1.736900e+02 -1.558600e+02\n8 11293     6.932001e+01 -3.104600e+02\n9 11293     -4.662000e+01 -1.876100e+02\n12 11293     -1.162900e+02 -2.729100e+02\n13 11293     2.691899e+02 -4.536600e+02\n15 11293     -1.580900e+02 -2.002300e+02\n1 11294     -4.401700e+02 -1.827400e+02\n7 11294     -5.972500e+02 -4.050800e+02\n1 11295     3.138199e+02 -1.895200e+02\n7 11295     1.479800e+02 -6.729980e+00\n1 11296     -6.352400e+02 -2.047100e+02\n4 11296     -5.008200e+02 1.469500e+02\n1 11297     2.030400e+02 -2.326500e+02\n7 11297     8.145001e+01 -9.159998e+01\n1 11298     -4.133000e+02 -2.358800e+02\n7 11298     -5.342700e+02 -4.408900e+02\n1 11299     -2.412000e+01 -2.365800e+02\n10 11299     -1.877100e+02 -2.269900e+02\n1 11300     3.109600e+02 -2.631900e+02\n2 11300     4.738700e+02 -1.386700e+02\n7 11300     1.835900e+02 -6.840002e+01\n1 11301     4.376899e+02 -3.294700e+02\n10 11301     3.308300e+02 -1.091300e+02\n15 11301     4.719700e+02 -1.555200e+02\n1 11302     3.929200e+02 -3.806100e+02\n3 11302     4.311700e+02 -5.703300e+02\n7 11302     2.671200e+02 -1.439800e+02\n9 11302     3.348101e+02 -1.219100e+02\n13 11302     6.718600e+02 -4.808700e+02\n1 11303     8.021400e+02 -4.612100e+02\n7 11303     5.634301e+02 -4.376001e+01\n1 11304     5.920300e+02 5.029500e+02\n4 11304     2.744000e+01 -4.844700e+02\n5 11304     5.933199e+02 -1.003900e+02\n6 11304     -2.778900e+02 6.134100e+02\n12 11304     -1.102600e+02 5.842700e+02\n13 11304     3.387000e+02 2.143900e+02\n14 11304     4.963800e+02 -1.880400e+02\n1 11305     3.145500e+02 4.417000e+02\n7 11305     -2.604500e+02 4.824200e+02\n1 11306     4.996500e+02 3.912200e+02\n2 11306     -1.600500e+02 1.698700e+02\n7 11306     -8.590002e+01 4.989400e+02\n8 11306     -5.151001e+01 1.292600e+02\n13 11306     2.987500e+02 1.080400e+02\n14 11306     4.471700e+02 -3.164000e+02\n1 11307     4.996500e+02 3.912200e+02\n2 11307     -1.600500e+02 1.698700e+02\n4 11307     -4.373999e+01 -4.384500e+02\n7 11307     -8.590002e+01 4.989400e+02\n8 11307     -5.151001e+01 1.292600e+02\n9 11307     -2.829100e+02 2.164500e+02\n1 11308     7.150400e+02 3.823400e+02\n5 11308     7.274399e+02 -1.860000e+02\n6 11308     -1.229500e+02 5.336300e+02\n7 11308     8.546997e+01 5.581600e+02\n12 11308     3.959998e+01 5.051300e+02\n13 11308     4.468700e+02 1.517200e+02\n14 11308     6.306200e+02 -2.674500e+02\n1 11309     1.945200e+02 -3.053003e+01\n3 11309     1.326100e+02 -3.137800e+02\n4 11309     -3.112700e+02 -4.529200e+02\n10 11309     -2.971997e+01 9.265002e+01\n1 11310     -5.234500e+02 -1.583400e+02\n15 11310     -8.620900e+02 -4.981300e+02\n1 11311     3.407600e+02 -2.295500e+02\n7 11311     1.844500e+02 -2.834998e+01\n1 11312     4.335500e+02 -2.705700e+02\n3 11312     4.254500e+02 -4.009301e+02\n7 11312     2.723199e+02 -2.396997e+01\n1 11313     -6.429700e+02 -3.160600e+02\n4 11313     -5.968500e+02 1.382200e+02\n1 11314     -6.659000e+02 -3.424700e+02\n4 11314     -6.211800e+02 1.508300e+02\n1 11315     -3.891900e+02 -4.134600e+02\n4 11315     -6.662500e+02 -6.981000e+01\n1 11316     -3.891900e+02 -4.134600e+02\n4 11316     -6.662500e+02 -6.981000e+01\n1 11317     8.104600e+02 -4.429301e+02\n7 11317     5.587600e+02 -3.144000e+01\n1 11318     5.179700e+02 4.679100e+02\n4 11318     3.799988e+00 -4.433300e+02\n5 11318     5.397300e+02 -1.533000e+02\n6 11318     -3.282300e+02 5.440500e+02\n8 11318     -5.869000e+01 1.981600e+02\n1 11319     -6.174900e+02 -2.701500e+02\n4 11319     -5.537900e+02 1.249500e+02\n1 11320     -6.499400e+02 -3.573000e+02\n4 11320     -6.329900e+02 1.381500e+02\n1 11321     1.130900e+02 -3.577200e+02\n4 11321     -5.777800e+02 -4.422100e+02\n12 11321     1.492700e+02 -3.692100e+02\n1 11322     7.103000e+02 4.831700e+02\n2 11322     -3.935999e+01 3.144500e+02\n4 11322     2.620001e+01 -5.565200e+02\n5 11322     6.959000e+02 -9.185999e+01\n6 11322     -1.726600e+02 6.392700e+02\n8 11322     4.810999e+01 2.457500e+02\n9 11322     -1.872600e+02 3.449700e+02\n13 11322     4.178500e+02 2.271100e+02\n14 11322     5.943600e+02 -1.721900e+02\n1 11323     -7.299988e+00 4.382500e+02\n4 11323     -4.589001e+01 -1.493300e+02\n5 11323     5.266998e+01 -3.131200e+02\n8 11323     -4.324700e+02 4.354999e+01\n11 11323     -1.605200e+02 -4.109900e+02\n12 11323     -6.660300e+02 2.719200e+02\n1 11324     7.492600e+02 4.812000e+02\n2 11324     -7.739990e+00 3.199700e+02\n3 11324     -1.506600e+02 -1.712000e+01\n4 11324     2.829999e+01 -5.765900e+02\n5 11324     7.288300e+02 -8.503998e+01\n6 11324     -1.362100e+02 6.526400e+02\n9 11324     -1.596000e+02 3.508100e+02\n11 11324     4.377400e+02 -2.036200e+02\n13 11324     4.471500e+02 2.341100e+02\n14 11324     6.276300e+02 -1.673500e+02\n1 11325     2.656600e+02 -1.464100e+02\n7 11325     8.583002e+01 9.750000e+00\n1 11326     3.214800e+02 -2.010000e+02\n7 11326     1.537700e+02 -1.364001e+01\n1 11327     5.451200e+02 4.103000e+02\n2 11327     -1.328600e+02 1.993900e+02\n8 11327     -2.837000e+01 1.549600e+02\n1 11328     4.261100e+02 -1.995800e+02\n7 11328     2.341100e+02 2.864001e+01\n1 11329     1.132000e+02 5.717300e+02\n7 11329     -4.839000e+02 5.384600e+02\n1 11330     9.176001e+01 4.307700e+02\n8 11330     -3.505700e+02 6.167001e+01\n2 11331     -3.985600e+02 6.101100e+02\n13 11331     1.203700e+02 4.388500e+02\n2 11332     -1.020700e+02 6.029800e+02\n14 11332     5.390100e+02 9.669000e+01\n2 11333     -1.042800e+02 5.994000e+02\n5 11333     6.444301e+02 1.854700e+02\n2 11334     2.489001e+01 5.924100e+02\n14 11334     6.840400e+02 1.011600e+02\n2 11335     -6.031000e+01 5.870600e+02\n3 11335     -1.997000e+02 2.443600e+02\n5 11335     6.945601e+02 1.768800e+02\n11 11335     3.864399e+02 8.440002e+00\n14 11335     5.846400e+02 8.562000e+01\n2 11336     -2.541200e+02 5.845300e+02\n3 11336     -3.814900e+02 2.435300e+02\n4 11336     1.833800e+02 -4.234000e+02\n11 11336     1.892200e+02 -1.479999e+01\n14 11336     3.726300e+02 6.198999e+01\n2 11337     -2.911500e+02 5.838600e+02\n5 11337     4.350300e+02 1.537900e+02\n2 11338     -6.446002e+01 5.808200e+02\n3 11338     -2.039800e+02 2.379300e+02\n5 11338     6.894500e+02 1.706500e+02\n14 11338     5.802800e+02 7.998001e+01\n2 11339     3.402002e+01 5.775500e+02\n11 11339     4.891899e+02 1.342999e+01\n13 11339     5.089500e+02 4.538900e+02\n2 11340     -6.669000e+01 5.720100e+02\n4 11340     1.781500e+02 -5.708199e+02\n2 11341     -2.611500e+02 5.710000e+02\n14 11341     3.645800e+02 4.883002e+01\n2 11342     -6.033002e+01 5.613000e+02\n13 11342     4.156899e+02 4.275500e+02\n2 11343     -1.847200e+02 5.532900e+02\n14 11343     4.450800e+02 4.031000e+01\n2 11344     -3.371800e+02 5.504900e+02\n3 11344     -4.600100e+02 2.132800e+02\n5 11344     3.829500e+02 1.174000e+02\n6 11344     -5.647900e+02 8.643200e+02\n14 11344     2.845400e+02 2.353003e+01\n2 11345     -7.595001e+01 5.503900e+02\n5 11345     6.731300e+02 1.395900e+02\n11 11345     3.712100e+02 -2.246997e+01\n14 11345     5.656600e+02 4.988000e+01\n2 11346     -7.595001e+01 5.503900e+02\n5 11346     6.731300e+02 1.395900e+02\n11 11346     3.712100e+02 -2.246997e+01\n14 11346     5.656600e+02 4.988000e+01\n2 11347     -3.834800e+02 5.499500e+02\n5 11347     3.350500e+02 1.136500e+02\n2 11348     -1.668000e+02 5.501800e+02\n5 11348     5.688101e+02 1.319700e+02\n14 11348     4.648500e+02 4.031000e+01\n2 11349     -1.749900e+02 5.496900e+02\n5 11349     5.587200e+02 1.297200e+02\n2 11350     -1.855300e+02 5.490600e+02\n5 11350     5.471100e+02 1.284200e+02\n14 11350     4.437100e+02 3.692999e+01\n2 11351     -1.855300e+02 5.490600e+02\n14 11351     4.437100e+02 3.692999e+01\n2 11352     3.057100e+02 5.486300e+02\n3 11352     1.599700e+02 2.070700e+02\n6 11352     2.216900e+02 8.453400e+02\n8 11352     3.202300e+02 4.271600e+02\n9 11352     1.111600e+02 5.608100e+02\n13 11352     7.036899e+02 3.458300e+02\n2 11353     -3.769200e+02 5.476600e+02\n5 11353     3.414900e+02 1.117800e+02\n2 11354     8.534003e+01 5.476500e+02\n11 11354     5.475800e+02 -5.219971e+00\n14 11354     7.558300e+02 6.629999e+01\n2 11355     -3.191800e+02 5.461800e+02\n6 11355     -5.413200e+02 8.635500e+02\n8 11355     -1.847600e+02 4.257800e+02\n14 11355     3.029000e+02 2.053003e+01\n2 11356     -3.060900e+02 5.457400e+02\n6 11356     -5.247500e+02 8.652800e+02\n8 11356     -1.734400e+02 4.255900e+02\n2 11357     -3.109300e+02 5.440500e+02\n6 11357     -5.311300e+02 8.621200e+02\n2 11358     2.700400e+02 5.435500e+02\n3 11358     1.253400e+02 2.024100e+02\n6 11358     1.791000e+02 8.457000e+02\n9 11358     7.940997e+01 5.557600e+02\n13 11358     6.724800e+02 3.482300e+02\n2 11359     -2.225300e+02 5.428600e+02\n6 11359     -4.179900e+02 8.803500e+02\n11 11359     2.201500e+02 -4.332001e+01\n13 11359     2.637600e+02 3.934500e+02\n14 11359     4.034700e+02 2.647998e+01\n2 11360     -5.370000e+02 5.419100e+02\n8 11360     -3.647800e+02 4.165000e+02\n2 11361     -4.363400e+02 5.418600e+02\n3 11361     -5.552300e+02 2.070400e+02\n5 11361     2.803500e+02 1.023700e+02\n14 11361     1.850500e+02 7.059998e+00\n2 11362     -2.695700e+02 5.419600e+02\n11 11362     1.740400e+02 -4.772998e+01\n13 11362     2.216700e+02 3.884600e+02\n14 11362     3.536500e+02 2.184003e+01\n2 11363     -3.314900e+02 5.412600e+02\n6 11363     -5.569900e+02 8.532000e+02\n8 11363     -1.955700e+02 4.209200e+02\n2 11364     -1.304400e+02 5.416000e+02\n4 11364     1.595400e+02 -5.126500e+02\n11 11364     3.140200e+02 -3.507001e+01\n13 11364     3.483400e+02 4.035900e+02\n14 11364     5.040900e+02 3.544000e+01\n2 11365     -1.199500e+02 5.414500e+02\n3 11365     -2.554500e+02 2.003200e+02\n4 11365     1.595400e+02 -5.213700e+02\n8 11365     -1.882001e+01 4.260700e+02\n14 11365     5.156600e+02 3.653998e+01\n2 11366     3.735500e+02 5.417200e+02\n6 11366     3.011400e+02 8.276400e+02\n2 11367     -1.792200e+02 5.411800e+02\n5 11367     5.529700e+02 1.211100e+02\n13 11367     3.025800e+02 3.973900e+02\n14 11367     4.498199e+02 2.965997e+01\n2 11368     -2.327900e+02 5.388500e+02\n6 11368     -4.303200e+02 8.731500e+02\n2 11369     -2.378000e+02 5.383700e+02\n6 11369     -4.367500e+02 8.712700e+02\n2 11370     3.019600e+02 5.386100e+02\n3 11370     1.558500e+02 1.979900e+02\n6 11370     2.163000e+02 8.355900e+02\n2 11371     3.073700e+02 5.382300e+02\n3 11371     1.613300e+02 1.977300e+02\n6 11371     2.233700e+02 8.338700e+02\n9 11371     1.118500e+02 5.521000e+02\n2 11372     -5.976900e+02 5.377700e+02\n5 11372     1.233000e+02 8.865002e+01\n2 11373     3.505200e+02 5.373900e+02\n9 11373     1.494900e+02 5.521200e+02\n11 11373     6.649900e+02 -1.209700e+02\n2 11374     -5.406300e+02 5.367000e+02\n3 11374     -6.557700e+02 2.049400e+02\n8 11374     -3.673100e+02 4.123900e+02\n2 11375     -1.503800e+02 5.366400e+02\n14 11375     4.816500e+02 2.850000e+01\n2 11376     2.569100e+02 5.362600e+02\n3 11376     1.126200e+02 1.950500e+02\n6 11376     1.637500e+02 8.383500e+02\n8 11376     2.804100e+02 4.171800e+02\n9 11376     6.797998e+01 5.482900e+02\n2 11377     -1.328100e+02 5.356900e+02\n5 11377     6.059600e+02 1.199500e+02\n2 11378     -1.288400e+02 5.354100e+02\n3 11378     -2.635900e+02 1.958400e+02\n5 11378     6.094000e+02 1.195000e+02\n2 11379     -1.244800e+02 5.349200e+02\n5 11379     6.153300e+02 1.197300e+02\n2 11380     -3.008000e+02 5.339300e+02\n5 11380     4.201700e+02 1.046100e+02\n6 11380     -5.168400e+02 8.509400e+02\n2 11381     -1.412400e+02 5.338400e+02\n3 11381     -2.761600e+02 1.943300e+02\n5 11381     5.956300e+02 1.175300e+02\n11 11381     3.028400e+02 -4.196002e+01\n2 11382     2.819700e+02 5.340900e+02\n6 11382     1.891000e+02 8.317800e+02\n8 11382     2.980700e+02 4.151100e+02\n11 11382     6.084301e+02 -1.102500e+02\n2 11383     3.313300e+02 5.339700e+02\n3 11383     1.837600e+02 1.940300e+02\n6 11383     2.507600e+02 8.250800e+02\n2 11384     -1.655900e+02 5.332500e+02\n6 11384     -3.441400e+02 8.818900e+02\n11 11384     2.774900e+02 -4.484998e+01\n2 11385     2.844301e+02 5.330700e+02\n3 11385     1.394600e+02 1.929500e+02\n6 11385     1.940800e+02 8.278000e+02\n8 11385     3.020400e+02 4.143900e+02\n11 11385     6.111000e+02 -1.136500e+02\n13 11385     6.826200e+02 3.352300e+02\n2 11386     -3.457600e+02 5.320100e+02\n5 11386     3.725900e+02 9.975000e+01\n14 11386     2.748800e+02 6.210022e+00\n2 11387     -3.286600e+02 5.315400e+02\n5 11387     3.901500e+02 1.004300e+02\n6 11387     -5.516700e+02 8.419500e+02\n8 11387     -1.925000e+02 4.133100e+02\n11 11387     1.172600e+02 -6.133002e+01\n14 11387     2.920900e+02 6.719971e+00\n2 11388     -6.177700e+02 5.311500e+02\n5 11388     1.034300e+02 8.177002e+01\n2 11389     2.860200e+02 5.308900e+02\n6 11389     1.988900e+02 8.280600e+02\n8 11389     3.044100e+02 4.136700e+02\n9 11389     9.434003e+01 5.449400e+02\n11 11389     6.149500e+02 -1.133400e+02\n2 11390     -3.330700e+02 5.302300e+02\n6 11390     -5.578900e+02 8.388000e+02\n11 11390     1.128300e+02 -6.275000e+01\n2 11391     -2.441200e+02 5.306000e+02\n3 11391     -3.724000e+02 1.926000e+02\n14 11391     3.803000e+02 1.359998e+01\n2 11392     -2.391000e+02 5.304500e+02\n6 11392     -4.378700e+02 8.612500e+02\n11 11392     2.038400e+02 -5.362000e+01\n14 11392     3.853101e+02 1.413000e+01\n2 11393     -1.284998e+01 5.305900e+02\n14 11393     6.375300e+02 3.817999e+01\n2 11394     -1.363200e+02 5.294800e+02\n5 11394     6.014399e+02 1.133400e+02\n8 11394     -3.265002e+01 4.160300e+02\n13 11394     3.419000e+02 3.925500e+02\n14 11394     4.967400e+02 2.310999e+01\n2 11395     -1.363200e+02 5.294800e+02\n5 11395     6.014399e+02 1.133400e+02\n8 11395     -3.265002e+01 4.160300e+02\n13 11395     3.419000e+02 3.925500e+02\n14 11395     4.967400e+02 2.310999e+01\n2 11396     -5.493200e+02 5.282800e+02\n11 11396     -8.054999e+01 -8.065997e+01\n2 11397     -1.207500e+02 5.279300e+02\n3 11397     -2.566100e+02 1.889200e+02\n5 11397     6.187700e+02 1.141600e+02\n8 11397     -1.975000e+01 4.158900e+02\n14 11397     5.140300e+02 2.410999e+01\n2 11398     4.109900e+02 5.280200e+02\n6 11398     3.438200e+02 8.063800e+02\n2 11399     -4.960200e+02 5.273800e+02\n11 11399     -3.475000e+01 -7.673999e+01\n2 11400     -2.333900e+02 5.276500e+02\n14 11400     3.912100e+02 1.172998e+01\n2 11401     -2.240000e+02 5.277000e+02\n3 11401     -3.538200e+02 1.889000e+02\n6 11401     -4.184800e+02 8.609700e+02\n14 11401     4.008700e+02 1.273999e+01\n2 11402     -1.237900e+02 5.260800e+02\n3 11402     -2.597700e+02 1.861900e+02\n5 11402     6.154200e+02 1.112000e+02\n8 11402     -2.210999e+01 4.137500e+02\n2 11403     -1.237900e+02 5.260800e+02\n5 11403     6.154200e+02 1.112000e+02\n2 11404     5.334399e+02 5.261300e+02\n8 11404     5.018700e+02 4.034100e+02\n2 11405     -2.979400e+02 5.248800e+02\n5 11405     4.227200e+02 9.629999e+01\n6 11405     -5.115200e+02 8.405000e+02\n14 11405     3.237100e+02 3.570007e+00\n2 11406     1.182400e+02 5.249200e+02\n14 11406     7.951801e+02 4.759003e+01\n2 11407     3.259998e+01 5.236700e+02\n5 11407     8.025699e+02 1.227100e+02\n8 11407     1.085200e+02 4.156600e+02\n2 11408     2.814900e+02 5.237100e+02\n6 11408     1.928600e+02 8.188600e+02\n8 11408     3.011000e+02 4.082900e+02\n13 11408     6.806500e+02 3.296100e+02\n2 11409     5.591300e+02 5.203900e+02\n3 11409     4.043900e+02 1.840700e+02\n8 11409     5.241899e+02 3.981000e+02\n2 11410     3.231000e+01 5.202900e+02\n3 11410     -1.142800e+02 1.795900e+02\n5 11410     8.019399e+02 1.180900e+02\n8 11410     1.079600e+02 4.116700e+02\n11 11410     4.879500e+02 -3.603998e+01\n13 11410     5.032500e+02 4.041200e+02\n2 11411     2.529100e+02 5.186900e+02\n3 11411     1.090400e+02 1.790000e+02\n6 11411     1.587600e+02 8.177000e+02\n2 11412     5.881400e+02 5.180000e+02\n3 11412     4.315900e+02 1.824300e+02\n2 11413     -2.186400e+02 5.172300e+02\n6 11413     -4.107800e+02 8.487400e+02\n14 11413     4.063300e+02 3.559998e+00\n2 11414     -2.186400e+02 5.172300e+02\n3 11414     -3.490400e+02 1.790200e+02\n6 11414     -4.107800e+02 8.487400e+02\n2 11415     -2.186400e+02 5.172300e+02\n3 11415     -3.490400e+02 1.790200e+02\n6 11415     -4.107800e+02 8.487400e+02\n11 11415     2.236000e+02 -6.237000e+01\n14 11415     4.063300e+02 3.559998e+00\n2 11416     4.493700e+02 5.171900e+02\n3 11416     3.009000e+02 1.797500e+02\n6 11416     3.756700e+02 7.489500e+02\n8 11416     4.320601e+02 3.967400e+02\n2 11417     -2.519100e+02 5.163500e+02\n5 11417     4.713199e+02 9.151001e+01\n6 11417     -4.524500e+02 8.399400e+02\n14 11417     3.713500e+02 -3.400269e-01\n2 11418     -1.461100e+02 5.161800e+02\n3 11418     -2.805200e+02 1.770700e+02\n4 11418     1.468400e+02 -4.970800e+02\n5 11418     5.888500e+02 1.009400e+02\n6 11418     -3.181300e+02 8.655900e+02\n8 11418     -4.046002e+01 4.057000e+02\n11 11418     2.971300e+02 -5.621002e+01\n13 11418     3.321801e+02 3.810000e+02\n14 11418     4.851500e+02 9.890015e+00\n2 11419     -2.421800e+02 5.155000e+02\n6 11419     -4.400000e+02 8.411800e+02\n14 11419     3.815000e+02 -9.002686e-02\n2 11420     -2.561000e+02 5.142700e+02\n5 11420     4.663300e+02 8.934003e+01\n2 11421     -1.105300e+02 5.131600e+02\n6 11421     -2.730200e+02 8.691100e+02\n8 11421     -1.154999e+01 4.036800e+02\n2 11422     4.979301e+02 5.129300e+02\n3 11422     3.463400e+02 1.762400e+02\n8 11422     4.723800e+02 3.925500e+02\n9 11422     2.789399e+02 5.339100e+02\n2 11423     4.979301e+02 5.129300e+02\n6 11423     4.313600e+02 7.364600e+02\n2 11424     5.068900e+02 5.122500e+02\n3 11424     3.556200e+02 1.757000e+02\n9 11424     2.868700e+02 5.333700e+02\n2 11425     5.517100e+02 5.122800e+02\n9 11425     3.245400e+02 5.347200e+02\n2 11426     4.799200e+02 5.110100e+02\n6 11426     4.109300e+02 7.372300e+02\n2 11427     -3.302900e+02 5.090500e+02\n5 11427     3.864399e+02 7.959003e+01\n6 11427     -5.514000e+02 8.133000e+02\n2 11428     -1.310500e+02 5.087600e+02\n5 11428     6.051300e+02 9.356000e+01\n2 11429     2.630000e+02 5.090900e+02\n6 11429     1.697200e+02 8.043300e+02\n9 11429     7.384998e+01 5.252300e+02\n11 11429     5.948500e+02 -1.280700e+02\n2 11430     5.441000e+02 5.060000e+02\n3 11430     3.903400e+02 1.704800e+02\n2 11431     2.737100e+02 5.051600e+02\n6 11431     1.819900e+02 7.973000e+02\n8 11431     2.928000e+02 3.919300e+02\n9 11431     8.390002e+01 5.221500e+02\n13 11431     6.725000e+02 3.149000e+02\n2 11432     -2.553800e+02 5.046600e+02\n13 11432     2.329399e+02 3.599200e+02\n2 11433     2.647200e+02 5.032500e+02\n6 11433     1.748300e+02 7.943600e+02\n8 11433     2.868300e+02 3.909700e+02\n9 11433     7.745001e+01 5.190600e+02\n13 11433     6.643800e+02 3.145000e+02\n2 11434     5.992400e+02 5.029300e+02\n3 11434     4.419500e+02 1.686400e+02\n2 11435     -1.299100e+02 5.023900e+02\n13 11435     3.452900e+02 3.700300e+02\n2 11436     4.669600e+02 5.018500e+02\n3 11436     3.183400e+02 1.658500e+02\n6 11436     3.951700e+02 7.284600e+02\n2 11437     5.167200e+02 5.021500e+02\n6 11437     4.535601e+02 7.215300e+02\n8 11437     4.890400e+02 3.838600e+02\n9 11437     2.955300e+02 5.252200e+02\n2 11438     1.166998e+01 5.012800e+02\n5 11438     7.742000e+02 9.781000e+01\n8 11438     9.066998e+01 3.967300e+02\n2 11439     -6.403003e+01 5.006700e+02\n6 11439     -2.124400e+02 8.644700e+02\n2 11440     -6.690997e+01 4.990400e+02\n3 11440     -2.068200e+02 1.592800e+02\n5 11440     6.788500e+02 8.923999e+01\n6 11440     -2.162100e+02 8.613100e+02\n11 11440     3.801400e+02 -6.192999e+01\n13 11440     4.051801e+02 3.752100e+02\n14 11440     5.728800e+02 1.270020e+00\n2 11441     -3.180000e+02 4.982400e+02\n5 11441     3.986700e+02 6.998999e+01\n2 11442     -3.384400e+02 4.968000e+02\n3 11442     -4.620300e+02 1.612400e+02\n6 11442     -5.601100e+02 7.957800e+02\n8 11442     -1.997600e+02 3.853400e+02\n2 11443     -2.515400e+02 4.963000e+02\n11 11443     1.911300e+02 -8.098999e+01\n14 11443     3.703400e+02 -1.819000e+01\n2 11444     -1.685400e+02 4.941600e+02\n6 11444     -3.448400e+02 8.310200e+02\n8 11444     -5.887000e+01 3.868900e+02\n2 11445     -3.067700e+02 4.909800e+02\n14 11445     3.125699e+02 -2.796002e+01\n2 11446     4.450800e+02 4.909900e+02\n3 11446     2.975800e+02 1.550900e+02\n8 11446     4.289000e+02 3.751400e+02\n2 11447     -4.014000e+02 4.900800e+02\n5 11447     3.114900e+02 5.721997e+01\n14 11447     2.167000e+02 -3.590002e+01\n2 11448     3.205200e+02 4.896300e+02\n9 11448     1.252400e+02 5.110700e+02\n11 11448     6.417400e+02 -1.565500e+02\n2 11449     8.856000e+01 4.874500e+02\n8 11449     1.549300e+02 3.867800e+02\n11 11449     5.512700e+02 -5.609003e+01\n2 11450     3.265500e+02 4.874400e+02\n6 11450     2.440600e+02 7.680800e+02\n11 11450     6.462200e+02 -1.609400e+02\n2 11451     3.445100e+02 4.877700e+02\n6 11451     2.642500e+02 7.668000e+02\n2 11452     7.898999e+01 4.871200e+02\n14 11452     7.444399e+02 4.630005e+00\n2 11453     3.213700e+02 4.870300e+02\n3 11453     1.755900e+02 1.499900e+02\n6 11453     2.375300e+02 7.685300e+02\n8 11453     3.316000e+02 3.766900e+02\n9 11453     1.250600e+02 5.074500e+02\n11 11453     6.406700e+02 -1.600400e+02\n2 11454     1.181000e+01 4.867900e+02\n6 11454     -1.150400e+02 8.643200e+02\n11 11454     4.646700e+02 -6.437000e+01\n2 11455     1.181000e+01 4.867900e+02\n3 11455     -1.329900e+02 1.476400e+02\n6 11455     -1.150400e+02 8.643200e+02\n11 11455     4.646700e+02 -6.437000e+01\n2 11456     5.622100e+02 4.858300e+02\n3 11456     4.080500e+02 1.530900e+02\n2 11457     8.759003e+01 4.839700e+02\n3 11457     -6.257001e+01 1.446900e+02\n6 11457     -1.737000e+01 8.774700e+02\n11 11457     5.496700e+02 -5.890002e+01\n13 11457     5.556801e+02 3.794900e+02\n14 11457     7.546100e+02 2.400024e+00\n2 11458     -1.210900e+02 4.825400e+02\n5 11458     6.134100e+02 6.731000e+01\n8 11458     -2.054999e+01 3.784400e+02\n14 11458     5.103500e+02 -2.072998e+01\n2 11459     -1.210900e+02 4.825400e+02\n14 11459     5.103500e+02 -2.072998e+01\n2 11460     6.546002e+01 4.823400e+02\n6 11460     -4.627002e+01 8.712100e+02\n2 11461     6.546002e+01 4.823400e+02\n6 11461     -4.627002e+01 8.712100e+02\n2 11462     3.693400e+02 4.826100e+02\n6 11462     2.935500e+02 7.560800e+02\n9 11462     1.665200e+02 5.047500e+02\n2 11463     -6.600400e+02 4.806700e+02\n3 11463     -7.757600e+02 1.541800e+02\n2 11464     8.481000e+01 4.786400e+02\n11 11464     5.462600e+02 -6.354999e+01\n2 11465     -3.225800e+02 4.781300e+02\n5 11465     3.921801e+02 5.090002e+01\n11 11465     1.216900e+02 -1.009700e+02\n2 11466     4.610400e+02 4.782700e+02\n8 11466     4.423500e+02 3.647300e+02\n2 11467     8.753998e+01 4.772200e+02\n3 11467     -6.246002e+01 1.391600e+02\n11 11467     5.495300e+02 -6.384003e+01\n13 11467     5.550500e+02 3.742900e+02\n14 11467     7.542300e+02 -3.179993e+00\n2 11468     1.650000e+01 4.755100e+02\n3 11468     -1.293100e+02 1.368600e+02\n13 11468     4.838500e+02 3.644400e+02\n14 11468     6.681899e+02 -1.342999e+01\n2 11469     4.538800e+02 4.744700e+02\n3 11469     3.070200e+02 1.401900e+02\n6 11469     3.787600e+02 6.970400e+02\n9 11469     2.430100e+02 4.993800e+02\n11 11469     7.079301e+02 -2.336900e+02\n2 11470     -3.055200e+02 4.731100e+02\n5 11470     4.097800e+02 4.752002e+01\n6 11470     -5.163600e+02 7.732100e+02\n14 11470     3.127800e+02 -4.407001e+01\n2 11471     3.699500e+02 4.728400e+02\n6 11471     2.939100e+02 7.442500e+02\n2 11472     3.572200e+02 4.721200e+02\n6 11472     2.789900e+02 7.452100e+02\n8 11472     3.612300e+02 3.644900e+02\n9 11472     1.562200e+02 4.955900e+02\n13 11472     7.406500e+02 2.723300e+02\n2 11473     -2.961900e+02 4.696700e+02\n6 11473     -5.039300e+02 7.712200e+02\n13 11473     1.959399e+02 3.291400e+02\n14 11473     3.221300e+02 -4.659003e+01\n2 11474     -2.961900e+02 4.696700e+02\n6 11474     -5.039300e+02 7.712200e+02\n13 11474     1.959399e+02 3.291400e+02\n14 11474     3.221300e+02 -4.659003e+01\n2 11475     5.844000e+01 4.688800e+02\n3 11475     -8.996002e+01 1.303500e+02\n11 11475     5.159600e+02 -7.462000e+01\n13 11475     5.247800e+02 3.634000e+02\n14 11475     7.178400e+02 -1.569000e+01\n2 11476     -6.163500e+02 4.679000e+02\n3 11476     -7.334800e+02 1.407100e+02\n14 11476     9.989990e+00 -6.838000e+01\n2 11477     -1.266998e+01 4.671800e+02\n3 11477     -1.564100e+02 1.290000e+02\n6 11477     -1.455000e+02 8.333700e+02\n11 11477     4.380900e+02 -8.292999e+01\n13 11477     4.550000e+02 3.545200e+02\n14 11477     6.337500e+02 -2.416998e+01\n2 11478     3.557400e+02 4.663400e+02\n8 11478     3.598400e+02 3.597500e+02\n2 11479     6.144000e+01 4.648900e+02\n6 11479     -5.122998e+01 8.483800e+02\n8 11479     1.320800e+02 3.686300e+02\n14 11479     7.211600e+02 -1.937000e+01\n2 11480     -2.565000e+02 4.640200e+02\n5 11480     4.611700e+02 4.157001e+01\n2 11481     -7.979980e+00 4.628800e+02\n5 11481     7.456600e+02 5.792999e+01\n6 11481     -1.396000e+02 8.286200e+02\n11 11481     4.428700e+02 -8.610999e+01\n2 11482     6.913000e+01 4.630500e+02\n3 11482     -7.973999e+01 1.251400e+02\n14 11482     7.305601e+02 -2.008002e+01\n2 11483     6.913000e+01 4.630500e+02\n3 11483     -7.973999e+01 1.251400e+02\n6 11483     -4.134998e+01 8.471300e+02\n14 11483     7.305601e+02 -2.008002e+01\n2 11484     -6.764100e+02 4.624800e+02\n14 11484     -4.452002e+01 -7.640002e+01\n2 11485     4.613600e+02 4.606500e+02\n3 11485     3.143700e+02 1.279100e+02\n6 11485     3.867800e+02 6.800200e+02\n8 11485     4.423700e+02 3.503600e+02\n2 11486     -2.912600e+02 4.595900e+02\n13 11486     1.994900e+02 3.213800e+02\n14 11486     3.266000e+02 -5.520001e+01\n2 11487     -3.940997e+01 4.586300e+02\n3 11487     -1.817800e+02 1.205600e+02\n14 11487     6.016400e+02 -3.475000e+01\n2 11488     1.425200e+02 4.574500e+02\n6 11488     5.362000e+01 8.578400e+02\n8 11488     2.001300e+02 3.636500e+02\n2 11489     4.136600e+02 4.571900e+02\n6 11489     3.442300e+02 7.188900e+02\n2 11490     4.587900e+02 4.571500e+02\n6 11490     3.834900e+02 6.761900e+02\n2 11491     -6.017800e+02 4.562800e+02\n11 11491     -1.260700e+02 -1.333700e+02\n2 11492     3.022000e+02 4.548500e+02\n6 11492     2.146000e+02 7.318300e+02\n2 11493     -4.312600e+02 4.544900e+02\n5 11493     2.785200e+02 2.367999e+01\n2 11494     -3.409003e+01 4.534500e+02\n5 11494     7.131899e+02 4.587000e+01\n2 11495     -2.565002e+01 4.531200e+02\n6 11495     -1.625800e+02 8.120700e+02\n2 11496     3.293500e+02 4.523800e+02\n6 11496     2.461000e+02 7.250200e+02\n11 11496     6.490000e+02 -1.926200e+02\n2 11497     4.043800e+02 4.523300e+02\n6 11497     3.329200e+02 7.145900e+02\n2 11498     -3.490600e+02 4.519200e+02\n11 11498     9.682001e+01 -1.225000e+02\n2 11499     -3.015002e+01 4.519700e+02\n14 11499     6.120300e+02 -4.067999e+01\n2 11500     -2.638700e+02 4.509800e+02\n5 11500     4.524500e+02 2.879999e+01\n11 11500     1.790200e+02 -1.170200e+02\n14 11500     3.546100e+02 -6.123999e+01\n2 11501     4.864800e+02 4.489100e+02\n6 11501     4.146800e+02 6.623900e+02\n2 11502     1.763900e+02 4.482500e+02\n6 11502     9.759003e+01 8.538200e+02\n2 11503     -4.643200e+02 4.475400e+02\n3 11503     -5.850900e+02 1.164700e+02\n5 11503     2.444500e+02 1.609998e+01\n2 11504     4.598000e+02 4.475600e+02\n6 11504     3.843900e+02 6.646700e+02\n8 11504     4.409800e+02 3.395900e+02\n9 11504     2.476801e+02 4.772200e+02\n2 11505     -1.739200e+02 4.459300e+02\n4 11505     1.070600e+02 -4.655500e+02\n6 11505     -3.487200e+02 7.701200e+02\n8 11505     -6.378998e+01 3.487300e+02\n9 11505     -3.071500e+02 4.585000e+02\n11 11505     2.675699e+02 -1.138900e+02\n2 11506     3.589700e+02 4.456300e+02\n6 11506     2.801700e+02 7.125000e+02\n2 11507     5.892500e+02 4.456600e+02\n6 11507     5.323199e+02 6.437400e+02\n2 11508     -2.592500e+02 4.435500e+02\n3 11508     -3.882800e+02 1.085200e+02\n6 11508     -4.552500e+02 7.467100e+02\n14 11508     3.590699e+02 -6.735999e+01\n2 11509     2.919500e+02 4.437600e+02\n6 11509     2.025000e+02 7.197800e+02\n9 11509     1.008000e+02 4.690100e+02\n2 11510     6.261100e+02 4.433900e+02\n6 11510     5.743700e+02 6.356000e+02\n8 11510     5.791300e+02 3.334800e+02\n9 11510     3.887300e+02 4.771400e+02\n2 11511     -2.549988e+00 4.405900e+02\n3 11511     -1.476500e+02 1.024300e+02\n14 11511     6.427100e+02 -5.015997e+01\n2 11512     -1.885400e+02 4.397800e+02\n9 11512     -3.192200e+02 4.521700e+02\n11 11512     2.532700e+02 -1.206900e+02\n2 11513     -4.373700e+02 4.393800e+02\n5 11513     2.709600e+02 1.017999e+01\n2 11514     -3.499900e+02 4.390800e+02\n5 11514     3.598700e+02 1.337000e+01\n6 11514     -5.683200e+02 7.215500e+02\n2 11515     -3.499900e+02 4.390800e+02\n6 11515     -5.683200e+02 7.215500e+02\n2 11516     -2.642200e+02 4.384100e+02\n14 11516     3.533800e+02 -7.238000e+01\n2 11517     -2.642200e+02 4.384100e+02\n14 11517     3.533800e+02 -7.238000e+01\n2 11518     -2.642200e+02 4.384100e+02\n3 11518     -3.933300e+02 1.035400e+02\n14 11518     3.533800e+02 -7.238000e+01\n2 11519     -2.706200e+02 4.378600e+02\n3 11519     -3.990300e+02 1.027700e+02\n8 11519     -1.440400e+02 3.393800e+02\n2 11520     -6.555000e+02 4.373100e+02\n5 11520     6.050000e+01 -6.799927e-01\n2 11521     -6.555000e+02 4.373100e+02\n5 11521     6.050000e+01 -6.799927e-01\n2 11522     -3.592600e+02 4.375400e+02\n5 11522     3.500900e+02 1.157001e+01\n6 11522     -5.798700e+02 7.175000e+02\n11 11522     8.646997e+01 -1.334400e+02\n2 11523     1.969200e+02 4.365600e+02\n3 11523     3.927002e+01 1.001000e+02\n6 11523     1.246100e+02 8.444100e+02\n2 11524     -3.560200e+02 4.359200e+02\n6 11524     -5.754400e+02 7.160900e+02\n2 11525     -3.560200e+02 4.359200e+02\n6 11525     -5.754400e+02 7.160900e+02\n2 11526     5.515400e+02 4.349500e+02\n6 11526     4.885100e+02 6.368200e+02\n2 11527     6.367800e+02 4.341800e+02\n6 11527     5.859700e+02 6.230800e+02\n2 11528     -4.721600e+02 4.325500e+02\n5 11528     2.353300e+02 2.719971e+00\n14 11528     1.435800e+02 -9.059003e+01\n2 11529     -4.721600e+02 4.325500e+02\n3 11529     -5.928800e+02 1.019400e+02\n14 11529     1.435800e+02 -9.059003e+01\n2 11530     -3.300500e+02 4.323400e+02\n6 11530     -5.424400e+02 7.176200e+02\n8 11530     -1.924500e+02 3.339400e+02\n2 11531     -2.576600e+02 4.324700e+02\n5 11531     4.573500e+02 1.198999e+01\n6 11531     -4.524200e+02 7.338800e+02\n8 11531     -1.330100e+02 3.366800e+02\n11 11531     1.842000e+02 -1.303100e+02\n14 11531     3.598800e+02 -7.757001e+01\n2 11532     4.812000e+01 4.329200e+02\n6 11532     -6.745001e+01 8.044200e+02\n2 11533     -3.725700e+02 4.319800e+02\n3 11533     -4.964200e+02 9.935999e+01\n5 11533     3.360500e+02 5.890015e+00\n11 11533     7.434003e+01 -1.388800e+02\n2 11534     -5.821002e+01 4.320900e+02\n4 11534     9.437000e+01 -5.553000e+02\n5 11534     6.822000e+02 2.334003e+01\n6 11534     -2.020700e+02 7.785500e+02\n8 11534     3.257001e+01 3.395700e+02\n11 11534     3.883800e+02 -1.157800e+02\n2 11535     5.085999e+01 4.318700e+02\n3 11535     -9.692999e+01 9.475000e+01\n5 11535     8.151300e+02 2.990997e+01\n6 11535     -6.423999e+01 8.028000e+02\n11 11535     5.069700e+02 -1.069500e+02\n13 11535     5.140601e+02 3.312400e+02\n14 11535     7.064600e+02 -5.313000e+01\n2 11536     -6.613600e+02 4.297800e+02\n14 11536     -3.335999e+01 -1.027300e+02\n2 11537     9.791998e+01 4.298400e+02\n6 11537     -4.039978e+00 8.116900e+02\n2 11538     -7.890997e+01 4.288400e+02\n13 11538     3.887300e+02 3.174800e+02\n2 11539     -6.187000e+01 4.290400e+02\n3 11539     -2.017700e+02 9.196002e+01\n5 11539     6.783000e+02 2.002002e+01\n6 11539     -2.061500e+02 7.739900e+02\n14 11539     5.752100e+02 -6.523999e+01\n2 11540     -6.187000e+01 4.290400e+02\n6 11540     -2.061500e+02 7.739900e+02\n14 11540     5.752100e+02 -6.523999e+01\n2 11541     6.248101e+02 4.288400e+02\n6 11541     5.719200e+02 6.190400e+02\n8 11541     5.780300e+02 3.215500e+02\n2 11542     -3.534800e+02 4.284800e+02\n5 11542     3.559399e+02 4.090027e+00\n8 11542     -2.113800e+02 3.307900e+02\n2 11543     -6.559998e+01 4.278200e+02\n3 11543     -2.060200e+02 9.082001e+01\n4 11543     9.238000e+01 -5.484200e+02\n5 11543     6.731600e+02 1.842999e+01\n6 11543     -2.114700e+02 7.713200e+02\n14 11543     5.700601e+02 -6.701001e+01\n2 11544     -3.520700e+02 4.255800e+02\n5 11544     3.570900e+02 1.000000e+00\n6 11544     -5.692200e+02 7.043900e+02\n8 11544     -2.108100e+02 3.282600e+02\n2 11545     -3.520700e+02 4.255800e+02\n3 11545     -4.772600e+02 9.245001e+01\n5 11545     3.570900e+02 1.000000e+00\n6 11545     -5.692200e+02 7.043900e+02\n8 11545     -2.108100e+02 3.282600e+02\n2 11546     -6.291998e+01 4.253200e+02\n3 11546     -2.035100e+02 8.871997e+01\n5 11546     6.759399e+02 1.558002e+01\n6 11546     -2.077500e+02 7.681800e+02\n13 11546     4.038101e+02 3.154000e+02\n14 11546     5.729100e+02 -6.921002e+01\n2 11547     3.293800e+02 4.254800e+02\n3 11547     1.846800e+02 9.233002e+01\n6 11547     2.458900e+02 6.926000e+02\n8 11547     3.392900e+02 3.272700e+02\n9 11547     1.342000e+02 4.548400e+02\n13 11547     7.110200e+02 2.370100e+02\n2 11548     3.147300e+02 4.238200e+02\n3 11548     1.699100e+02 9.023999e+01\n6 11548     2.280700e+02 6.921100e+02\n9 11548     1.208200e+02 4.521700e+02\n2 11549     -5.005500e+02 4.233700e+02\n5 11549     2.065900e+02 -6.919983e+00\n2 11550     -3.426300e+02 4.223500e+02\n3 11550     -4.675800e+02 9.160999e+01\n5 11550     3.660900e+02 -1.950012e+00\n11 11550     1.023900e+02 -1.426200e+02\n13 11550     1.544900e+02 2.906600e+02\n2 11551     -2.941100e+02 4.211300e+02\n14 11551     3.212100e+02 -9.003998e+01\n2 11552     -4.672998e+01 4.208600e+02\n14 11552     5.912300e+02 -7.172998e+01\n2 11553     -4.672998e+01 4.208600e+02\n14 11553     5.912300e+02 -7.172998e+01\n2 11554     -6.312000e+01 4.199900e+02\n4 11554     8.896002e+01 -5.501300e+02\n8 11554     2.846997e+01 3.300100e+02\n9 11554     -2.109100e+02 4.383600e+02\n11 11554     3.831500e+02 -1.245300e+02\n2 11555     4.522200e+02 4.196800e+02\n3 11555     3.068800e+02 8.947998e+01\n6 11555     3.740500e+02 6.333900e+02\n9 11555     2.415500e+02 4.527500e+02\n2 11556     -3.840400e+02 4.184500e+02\n14 11556     2.293900e+02 -9.819000e+01\n2 11557     -5.789978e+00 4.153200e+02\n3 11557     -1.501200e+02 7.901001e+01\n13 11557     4.571801e+02 3.121300e+02\n2 11558     -6.370001e+01 4.142500e+02\n3 11558     -2.045600e+02 7.815997e+01\n5 11558     6.739900e+02 5.409973e+00\n6 11558     -2.077900e+02 7.552100e+02\n2 11559     2.657500e+02 4.121200e+02\n6 11559     1.714100e+02 6.858000e+02\n2 11560     3.945200e+02 4.120400e+02\n3 11560     2.466700e+02 8.033002e+01\n6 11560     3.188100e+02 6.660500e+02\n9 11560     1.893900e+02 4.440600e+02\n2 11561     -5.290800e+02 4.113200e+02\n5 11561     1.775800e+02 -1.881000e+01\n8 11561     -3.564200e+02 3.129200e+02\n14 11561     8.746002e+01 -1.121800e+02\n2 11562     5.305400e+02 4.115900e+02\n8 11562     4.992200e+02 3.088200e+02\n9 11562     3.088800e+02 4.480900e+02\n2 11563     3.242600e+02 4.089300e+02\n6 11563     2.383400e+02 6.722200e+02\n2 11564     -5.627200e+02 4.080500e+02\n5 11564     1.451000e+02 -2.253003e+01\n14 11564     5.566998e+01 -1.165200e+02\n2 11565     -6.702002e+01 4.076100e+02\n6 11565     -2.135500e+02 7.456000e+02\n14 11565     5.663199e+02 -8.601001e+01\n2 11566     -3.535200e+02 4.067500e+02\n3 11566     -4.788000e+02 7.415002e+01\n5 11566     3.535100e+02 -1.632001e+01\n6 11566     -5.687900e+02 6.807000e+02\n11 11566     9.153998e+01 -1.569000e+02\n2 11567     4.024000e+02 4.063600e+02\n6 11567     3.291900e+02 6.582600e+02\n8 11567     3.975600e+02 3.089800e+02\n9 11567     1.976400e+02 4.383200e+02\n13 11567     7.723300e+02 2.076100e+02\n2 11568     4.524800e+02 4.053700e+02\n6 11568     3.736500e+02 6.158600e+02\n8 11568     4.341500e+02 3.039700e+02\n9 11568     2.418600e+02 4.398900e+02\n11 11568     7.058800e+02 -2.981500e+02\n2 11569     5.590000e+02 4.048400e+02\n6 11569     4.951300e+02 6.003500e+02\n7 11569     5.141200e+02 5.758500e+02\n8 11569     5.222900e+02 3.023100e+02\n12 11569     5.757100e+02 6.110400e+02\n2 11570     5.686500e+02 4.043100e+02\n6 11570     5.064500e+02 5.985500e+02\n2 11571     5.686500e+02 4.043100e+02\n6 11571     5.064500e+02 5.985500e+02\n2 11572     -5.798800e+02 4.036100e+02\n3 11572     -6.998300e+02 7.615997e+01\n5 11572     1.279500e+02 -2.684998e+01\n12 11572     -6.548700e+02 6.175400e+02\n2 11573     -5.798800e+02 4.036100e+02\n3 11573     -6.998300e+02 7.615997e+01\n5 11573     1.279500e+02 -2.684998e+01\n12 11573     -6.548700e+02 6.175400e+02\n2 11574     -5.752500e+02 4.034200e+02\n8 11574     -3.941900e+02 3.056200e+02\n2 11575     -3.671100e+02 4.009300e+02\n6 11575     -5.849200e+02 6.715800e+02\n2 11576     -1.035700e+02 4.011100e+02\n5 11576     6.257500e+02 -1.009998e+01\n2 11577     5.239600e+02 3.993900e+02\n8 11577     4.936899e+02 2.988800e+02\n9 11577     3.045699e+02 4.374000e+02\n12 11577     5.375699e+02 6.080000e+02\n2 11578     4.972300e+02 3.977700e+02\n6 11578     4.242100e+02 6.012400e+02\n12 11578     5.072000e+02 6.088000e+02\n2 11579     6.388600e+02 3.960100e+02\n6 11579     5.856300e+02 5.791800e+02\n2 11580     -1.570200e+02 3.956800e+02\n5 11580     5.642300e+02 -1.796997e+01\n9 11580     -2.901400e+02 4.143600e+02\n2 11581     -2.595600e+02 3.949700e+02\n14 11581     3.558101e+02 -1.116200e+02\n2 11582     3.840027e+00 3.947300e+02\n9 11582     -1.530800e+02 4.173600e+02\n13 11582     4.654900e+02 2.960000e+02\n2 11583     -6.517400e+02 3.935900e+02\n5 11583     6.035999e+01 -3.745001e+01\n2 11584     -6.638600e+02 3.928600e+02\n5 11584     4.889001e+01 -3.890002e+01\n12 11584     -7.507100e+02 5.929300e+02\n2 11585     -5.756900e+02 3.924800e+02\n12 11585     -6.488000e+02 6.055700e+02\n2 11586     5.469301e+02 3.922200e+02\n3 11586     3.976400e+02 6.577002e+01\n6 11586     4.806801e+02 5.873800e+02\n9 11586     3.232200e+02 4.313900e+02\n12 11586     5.618700e+02 5.972000e+02\n2 11587     -5.995500e+02 3.915200e+02\n11 11587     -1.263700e+02 -1.778700e+02\n2 11588     -5.832600e+02 3.911500e+02\n8 11588     -4.007800e+02 2.958200e+02\n2 11589     -5.832600e+02 3.911500e+02\n8 11589     -4.007800e+02 2.958200e+02\n2 11590     2.620900e+02 3.909400e+02\n9 11590     7.594000e+01 4.224500e+02\n14 11590     8.826400e+02 -1.912300e+02\n2 11591     -2.506400e+02 3.903700e+02\n3 11591     -3.816200e+02 5.650000e+01\n5 11591     4.607000e+02 -2.691998e+01\n14 11591     3.645300e+02 -1.153700e+02\n2 11592     -3.729980e+00 3.904000e+02\n6 11592     -1.325200e+02 7.392700e+02\n2 11593     -3.729980e+00 3.904000e+02\n6 11593     -1.325200e+02 7.392700e+02\n2 11594     1.004500e+02 3.898200e+02\n6 11594     -4.500122e-01 7.620100e+02\n2 11595     -2.509400e+02 3.863100e+02\n5 11595     4.599301e+02 -3.063000e+01\n6 11595     -4.402800e+02 6.792100e+02\n8 11595     -1.277200e+02 2.997400e+02\n14 11595     3.641600e+02 -1.190200e+02\n2 11596     5.244500e+02 3.851000e+02\n3 11596     3.764100e+02 5.869000e+01\n7 11596     4.797100e+02 5.631000e+02\n8 11596     4.935000e+02 2.865000e+02\n2 11597     -4.042900e+02 3.842600e+02\n3 11597     -5.283500e+02 5.301001e+01\n14 11597     2.069100e+02 -1.294400e+02\n2 11598     -4.225700e+02 3.841600e+02\n5 11598     2.810200e+02 -3.923999e+01\n12 11598     -4.684200e+02 6.203500e+02\n14 11598     1.892300e+02 -1.304500e+02\n2 11599     -5.493700e+02 3.835600e+02\n5 11599     1.555800e+02 -4.342999e+01\n11 11599     -8.502002e+01 -1.819900e+02\n12 11599     -6.169700e+02 6.006000e+02\n2 11600     -5.364300e+02 3.837000e+02\n12 11600     -6.018900e+02 6.027800e+02\n2 11601     -3.267000e+02 3.828700e+02\n6 11601     -5.335500e+02 6.584900e+02\n2 11602     -7.365000e+02 3.807700e+02\n5 11602     -1.753998e+01 -5.040997e+01\n2 11603     5.076801e+02 3.809400e+02\n7 11603     4.640601e+02 5.624400e+02\n2 11604     -3.485900e+02 3.807000e+02\n11 11604     9.490002e+01 -1.754700e+02\n2 11605     -6.471002e+01 3.806600e+02\n6 11605     -2.079200e+02 7.134100e+02\n9 11605     -2.105300e+02 4.028000e+02\n14 11605     5.681700e+02 -1.118500e+02\n2 11606     -3.364400e+02 3.802100e+02\n3 11606     -4.632000e+02 4.741998e+01\n6 11606     -5.452300e+02 6.525100e+02\n8 11606     -1.980200e+02 2.924400e+02\n14 11606     2.749301e+02 -1.299600e+02\n2 11607     2.876100e+02 3.786700e+02\n6 11607     1.956600e+02 6.424500e+02\n2 11608     -6.781600e+02 3.768300e+02\n14 11608     -5.194000e+01 -1.478600e+02\n2 11609     -7.898300e+02 3.747700e+02\n8 11609     -5.684400e+02 2.782100e+02\n11 11609     -2.778100e+02 -1.951300e+02\n2 11610     -6.044700e+02 3.749700e+02\n5 11610     1.023400e+02 -5.206000e+01\n8 11610     -4.181400e+02 2.826300e+02\n12 11610     -6.800300e+02 5.835400e+02\n2 11611     1.026300e+02 3.751400e+02\n3 11611     -4.815002e+01 4.002002e+01\n9 11611     -6.846002e+01 4.033400e+02\n11 11611     5.654800e+02 -1.490700e+02\n14 11611     7.662400e+02 -1.046200e+02\n2 11612     1.283100e+02 3.746400e+02\n14 11612     7.983500e+02 -1.028400e+02\n2 11613     -6.544300e+02 3.738700e+02\n5 11613     5.589001e+01 -5.494000e+01\n2 11614     -3.215000e+02 3.734700e+02\n5 11614     3.837800e+02 -4.556000e+01\n6 11614     -5.261500e+02 6.484900e+02\n2 11615     -2.406900e+02 3.732700e+02\n5 11615     4.698300e+02 -4.259998e+01\n6 11615     -4.263000e+02 6.658300e+02\n14 11615     3.739700e+02 -1.302700e+02\n2 11616     -2.263000e+02 3.735200e+02\n8 11616     -1.068900e+02 2.894700e+02\n9 11616     -3.487500e+02 3.925200e+02\n2 11617     4.934200e+02 3.735500e+02\n6 11617     4.188700e+02 5.734200e+02\n8 11617     4.679100e+02 2.773800e+02\n2 11618     1.002800e+02 3.730400e+02\n9 11618     -7.046997e+01 4.008000e+02\n11 11618     5.626600e+02 -1.515300e+02\n13 11618     5.582400e+02 2.871800e+02\n14 11618     7.629900e+02 -1.069700e+02\n2 11619     -3.789400e+02 3.724800e+02\n3 11619     -5.037500e+02 4.084998e+01\n5 11619     3.238600e+02 -4.890002e+01\n12 11619     -4.163200e+02 6.138900e+02\n14 11619     2.316600e+02 -1.389300e+02\n2 11620     1.049600e+02 3.720200e+02\n3 11620     -4.628998e+01 3.637000e+01\n8 11620     1.677600e+02 2.941600e+02\n9 11620     -6.690002e+01 4.003000e+02\n11 11620     5.679200e+02 -1.521900e+02\n13 11620     5.630800e+02 2.861900e+02\n14 11620     7.688000e+02 -1.081100e+02\n2 11621     5.184301e+02 3.709000e+02\n3 11621     3.714399e+02 4.521997e+01\n8 11621     4.883300e+02 2.749700e+02\n9 11621     2.991899e+02 4.127400e+02\n2 11622     -2.465200e+02 3.703500e+02\n5 11622     4.633300e+02 -4.603003e+01\n6 11622     -4.330700e+02 6.606700e+02\n14 11622     3.679100e+02 -1.336100e+02\n2 11623     -3.954900e+02 3.702500e+02\n12 11623     -4.353900e+02 6.092500e+02\n2 11624     -3.854000e+02 3.697900e+02\n8 11624     -2.378700e+02 2.825300e+02\n11 11624     6.094000e+01 -1.859300e+02\n12 11624     -4.238500e+02 6.094200e+02\n2 11625     -3.935100e+02 3.694100e+02\n5 11625     3.093000e+02 -5.185999e+01\n2 11626     -7.775600e+02 3.679900e+02\n11 11626     -2.686400e+02 -1.991900e+02\n2 11627     -7.465400e+02 3.670000e+02\n8 11627     -5.335600e+02 2.732100e+02\n2 11628     -1.265400e+02 3.660700e+02\n9 11628     -2.626800e+02 3.889900e+02\n14 11628     4.972400e+02 -1.301800e+02\n2 11629     8.695001e+01 3.659500e+02\n13 11629     5.431700e+02 2.799900e+02\n2 11630     -5.799988e+00 3.637300e+02\n3 11630     -1.503800e+02 2.835999e+01\n11 11630     4.424100e+02 -1.666200e+02\n13 11630     4.529500e+02 2.699000e+02\n14 11630     6.342300e+02 -1.237900e+02\n2 11631     -2.859200e+02 3.641000e+02\n5 11631     4.201600e+02 -5.277002e+01\n2 11632     -2.265300e+02 3.641300e+02\n6 11632     -4.086200e+02 6.576100e+02\n8 11632     -1.070300e+02 2.820200e+02\n9 11632     -3.485700e+02 3.841200e+02\n2 11633     9.915997e+01 3.642500e+02\n9 11633     -7.159998e+01 3.935800e+02\n11 11633     5.605699e+02 -1.592000e+02\n2 11634     6.348400e+02 3.638900e+02\n3 11634     4.815200e+02 4.178003e+01\n12 11634     6.576100e+02 5.556800e+02\n2 11635     -3.098100e+02 3.635200e+02\n5 11635     3.950800e+02 -5.431000e+01\n12 11635     -3.342300e+02 6.148600e+02\n2 11636     -2.346000e+02 3.633700e+02\n6 11636     -4.177700e+02 6.547100e+02\n11 11636     2.050200e+02 -1.826700e+02\n2 11637     -2.346000e+02 3.633700e+02\n6 11637     -4.177700e+02 6.547100e+02\n2 11638     1.457700e+02 3.634000e+02\n8 11638     2.030900e+02 2.886100e+02\n9 11638     -3.191998e+01 3.941500e+02\n14 11638     8.202200e+02 -1.126300e+02\n2 11639     -3.225600e+02 3.630500e+02\n6 11639     -5.265800e+02 6.355600e+02\n12 11639     -3.488500e+02 6.125400e+02\n2 11640     -3.320100e+02 3.623100e+02\n12 11640     -3.600700e+02 6.103500e+02\n2 11641     1.013900e+02 3.621700e+02\n6 11641     1.289978e+00 7.283600e+02\n9 11641     -6.946002e+01 3.915600e+02\n11 11641     5.634500e+02 -1.609200e+02\n14 11641     7.638900e+02 -1.180500e+02\n2 11642     -2.460400e+02 3.608700e+02\n3 11642     -3.769000e+02 2.740002e+01\n12 11642     -2.582200e+02 6.218700e+02\n2 11643     -2.460400e+02 3.608700e+02\n3 11643     -3.769000e+02 2.740002e+01\n5 11643     4.632200e+02 -5.453003e+01\n12 11643     -2.582200e+02 6.218700e+02\n2 11644     5.001600e+02 3.609700e+02\n6 11644     4.250300e+02 5.582900e+02\n9 11644     2.833500e+02 4.037600e+02\n12 11644     5.083600e+02 5.659300e+02\n2 11645     -3.927700e+02 3.600800e+02\n5 11645     3.087500e+02 -5.996002e+01\n12 11645     -4.315400e+02 5.990400e+02\n2 11646     -1.236500e+02 3.601600e+02\n4 11646     5.765997e+01 -4.920400e+02\n5 11646     5.989200e+02 -5.006000e+01\n6 11646     -2.804600e+02 6.767100e+02\n11 11646     3.179399e+02 -1.765400e+02\n13 11646     3.431100e+02 2.580500e+02\n2 11647     6.444000e+01 3.575000e+02\n5 11647     8.232000e+02 -4.519000e+01\n6 11647     -4.628003e+01 7.137600e+02\n8 11647     1.342300e+02 2.818400e+02\n9 11647     -1.004800e+02 3.870600e+02\n2 11648     2.943300e+02 3.568800e+02\n9 11648     1.048700e+02 3.935500e+02\n13 11648     6.736600e+02 1.853800e+02\n2 11649     -3.302100e+02 3.558600e+02\n5 11649     3.731801e+02 -6.231000e+01\n6 11649     -5.349900e+02 6.249900e+02\n2 11650     -2.214300e+02 3.540300e+02\n6 11650     -4.009900e+02 6.468400e+02\n2 11651     -3.319800e+02 3.528700e+02\n6 11651     -5.369400e+02 6.217200e+02\n2 11652     -2.444500e+02 3.513200e+02\n6 11652     -4.290500e+02 6.380400e+02\n12 11652     -2.555300e+02 6.117400e+02\n2 11653     -5.305900e+02 3.504600e+02\n12 11653     -5.915100e+02 5.680800e+02\n2 11654     7.657001e+01 3.501000e+02\n6 11654     -2.994000e+01 7.084900e+02\n8 11654     1.440100e+02 2.764700e+02\n14 11654     7.325800e+02 -1.315900e+02\n2 11655     5.784399e+02 3.500900e+02\n7 11655     5.247400e+02 5.163100e+02\n2 11656     2.637200e+02 3.488200e+02\n6 11656     1.681400e+02 6.114100e+02\n9 11656     7.894000e+01 3.853900e+02\n12 11656     2.796000e+02 5.971600e+02\n2 11657     -3.276100e+02 3.466700e+02\n6 11657     -5.305900e+02 6.147800e+02\n2 11658     1.452800e+02 3.465900e+02\n6 11658     5.652002e+01 7.192500e+02\n2 11659     3.862000e+02 3.465400e+02\n7 11659     3.829100e+02 5.789200e+02\n9 11659     1.844900e+02 3.881900e+02\n2 11660     3.944700e+02 3.463600e+02\n3 11660     2.490200e+02 1.867999e+01\n6 11660     3.173700e+02 5.898400e+02\n8 11660     3.901300e+02 2.605900e+02\n12 11660     4.163199e+02 5.820100e+02\n13 11660     7.579200e+02 1.580200e+02\n2 11661     2.995500e+02 3.456900e+02\n8 11661     3.139200e+02 2.614100e+02\n9 11661     1.096700e+02 3.845200e+02\n2 11662     6.491100e+02 3.452700e+02\n3 11662     4.963900e+02 2.481000e+01\n8 11662     5.976100e+02 2.512900e+02\n2 11663     6.491100e+02 3.452700e+02\n3 11663     4.963900e+02 2.481000e+01\n10 11663     7.997600e+02 5.726800e+02\n2 11664     -3.316000e+02 3.445900e+02\n6 11664     -5.357800e+02 6.111900e+02\n2 11665     -3.316000e+02 3.445900e+02\n6 11665     -5.357800e+02 6.111900e+02\n2 11666     -2.436100e+02 3.442700e+02\n5 11666     4.637700e+02 -7.028003e+01\n6 11666     -4.273100e+02 6.298800e+02\n2 11667     -4.701001e+01 3.433400e+02\n5 11667     6.854900e+02 -6.394000e+01\n6 11667     -1.856300e+02 6.718100e+02\n8 11667     4.160999e+01 2.682900e+02\n9 11667     -1.951000e+02 3.705900e+02\n2 11668     6.453101e+02 3.429200e+02\n8 11668     5.933500e+02 2.488600e+02\n9 11668     4.063900e+02 3.920600e+02\n2 11669     6.453101e+02 3.429200e+02\n10 11669     7.944700e+02 5.707700e+02\n2 11670     -6.275000e+01 3.427400e+02\n6 11670     -2.039600e+02 6.682100e+02\n2 11671     6.564600e+02 3.414600e+02\n3 11671     5.028300e+02 2.147998e+01\n10 11671     8.076000e+02 5.655300e+02\n2 11672     -6.890997e+01 3.411700e+02\n3 11672     -2.096800e+02 7.150024e+00\n4 11672     4.417999e+01 -5.335000e+02\n8 11672     2.394000e+01 2.671600e+02\n9 11672     -2.127800e+02 3.690000e+02\n11 11672     3.753600e+02 -1.892600e+02\n2 11673     -1.187900e+02 3.403200e+02\n11 11673     3.218700e+02 -1.946200e+02\n12 11673     -1.054200e+02 6.191100e+02\n2 11674     4.819500e+02 3.374800e+02\n7 11674     4.360000e+02 5.241500e+02\n2 11675     6.831500e+02 3.376400e+02\n3 11675     5.283300e+02 1.858002e+01\n7 11675     6.200500e+02 4.802900e+02\n2 11676     -9.979980e+00 3.368800e+02\n14 11676     6.283000e+02 -1.504500e+02\n2 11677     3.804999e+01 3.360200e+02\n6 11677     -7.795001e+01 6.828800e+02\n2 11678     1.084000e+02 3.359600e+02\n6 11678     1.033002e+01 6.979600e+02\n8 11678     1.709700e+02 2.655100e+02\n9 11678     -6.303003e+01 3.693000e+02\n14 11678     7.705200e+02 -1.432700e+02\n2 11679     -5.754800e+02 3.349300e+02\n12 11679     -6.418200e+02 5.442200e+02\n2 11680     4.559800e+02 3.336300e+02\n6 11680     3.745700e+02 5.339300e+02\n9 11680     2.467800e+02 3.795900e+02\n11 11680     7.093500e+02 -3.661000e+02\n2 11681     -7.440002e+00 3.324700e+02\n3 11681     -1.514000e+02 -2.609985e+00\n6 11681     -1.347400e+02 6.678200e+02\n14 11681     6.313500e+02 -1.546500e+02\n2 11682     -6.566600e+02 3.312200e+02\n8 11682     -4.598400e+02 2.465500e+02\n2 11683     5.148101e+02 3.303900e+02\n3 11683     3.696100e+02 7.140015e+00\n7 11683     4.650200e+02 5.105200e+02\n2 11684     -3.167700e+02 3.296400e+02\n5 11684     3.844600e+02 -8.570001e+01\n6 11684     -5.161400e+02 5.970400e+02\n12 11684     -3.396900e+02 5.778600e+02\n2 11685     -2.554999e+01 3.268200e+02\n6 11685     -1.575300e+02 6.573900e+02\n12 11685     6.750000e+00 6.172500e+02\n2 11686     4.902600e+02 3.258800e+02\n6 11686     4.126800e+02 5.196400e+02\n9 11686     2.760100e+02 3.734100e+02\n2 11687     4.902600e+02 3.258800e+02\n3 11687     3.459000e+02 2.460022e+00\n6 11687     4.126800e+02 5.196400e+02\n8 11687     4.641801e+02 2.382500e+02\n9 11687     2.760100e+02 3.734100e+02\n12 11687     4.965500e+02 5.273600e+02\n2 11688     2.721200e+02 3.247300e+02\n3 11688     1.303400e+02 -4.760010e+00\n12 11688     2.876600e+02 5.696500e+02\n2 11689     -7.001900e+02 3.239900e+02\n8 11689     -4.950500e+02 2.400800e+02\n12 11689     -7.825900e+02 5.155700e+02\n2 11690     -1.564700e+02 3.232200e+02\n13 11690     3.110800e+02 2.266100e+02\n2 11691     2.987400e+02 3.237100e+02\n7 11691     3.048000e+02 5.739700e+02\n2 11692     4.685800e+02 3.231000e+02\n7 11692     4.229900e+02 5.139600e+02\n2 11693     -8.038000e+01 3.221900e+02\n6 11693     -2.250700e+02 6.400100e+02\n2 11694     5.329200e+02 3.220200e+02\n6 11694     4.603101e+02 5.100000e+02\n8 11694     4.992700e+02 2.351600e+02\n2 11695     -5.854900e+02 3.217100e+02\n12 11695     -6.509200e+02 5.295400e+02\n2 11696     -9.041998e+01 3.205400e+02\n8 11696     5.580017e+00 2.501500e+02\n9 11696     -2.305300e+02 3.495300e+02\n2 11697     6.286000e+02 3.198500e+02\n3 11697     4.780300e+02 7.000122e-01\n6 11697     5.687400e+02 4.939200e+02\n8 11697     5.795500e+02 2.308500e+02\n2 11698     -5.799200e+02 3.191700e+02\n12 11698     -6.443500e+02 5.284400e+02\n2 11699     4.870400e+02 3.173600e+02\n6 11699     4.083800e+02 5.111700e+02\n8 11699     4.612600e+02 2.320400e+02\n9 11699     2.732500e+02 3.664000e+02\n12 11699     4.924800e+02 5.186200e+02\n2 11700     -3.997900e+02 3.174400e+02\n5 11700     2.975601e+02 -9.900000e+01\n2 11701     4.015500e+02 3.172700e+02\n6 11701     3.234800e+02 5.554700e+02\n8 11701     3.954500e+02 2.368300e+02\n9 11701     1.976400e+02 3.630500e+02\n2 11702     -4.697700e+02 3.167200e+02\n5 11702     2.267400e+02 -1.010800e+02\n2 11703     -2.812100e+02 3.149300e+02\n5 11703     4.204301e+02 -9.840997e+01\n6 11703     -4.716200e+02 5.868000e+02\n11 11703     1.575100e+02 -2.227200e+02\n12 11703     -2.968700e+02 5.680300e+02\n14 11703     3.277100e+02 -1.854400e+02\n2 11704     3.078800e+02 3.145300e+02\n3 11704     1.654800e+02 -1.364001e+01\n7 11704     3.112100e+02 5.630000e+02\n13 11704     6.798900e+02 1.478800e+02\n2 11705     4.793199e+02 3.140600e+02\n6 11705     3.991500e+02 5.066500e+02\n7 11705     4.306801e+02 5.012600e+02\n9 11705     2.665300e+02 3.621000e+02\n10 11705     6.071899e+02 5.959600e+02\n12 11705     4.830000e+02 5.131200e+02\n2 11706     4.021100e+02 3.133900e+02\n6 11706     3.245700e+02 5.513100e+02\n8 11706     3.965900e+02 2.338300e+02\n9 11706     1.986899e+02 3.598700e+02\n2 11707     -9.701001e+01 3.131200e+02\n12 11707     -7.832001e+01 5.917900e+02\n2 11708     -3.250000e+01 3.131300e+02\n3 11708     -1.756200e+02 -2.082001e+01\n6 11708     -1.656000e+02 6.394200e+02\n2 11709     4.322500e+02 3.128100e+02\n3 11709     2.906000e+02 -1.191998e+01\n6 11709     3.467700e+02 5.129800e+02\n7 11709     3.893101e+02 5.101800e+02\n9 11709     2.267400e+02 3.603700e+02\n10 11709     5.588000e+02 6.112700e+02\n11 11709     6.886000e+02 -3.793800e+02\n12 11709     4.340800e+02 5.185200e+02\n2 11710     5.269000e+02 3.111000e+02\n8 11710     4.937300e+02 2.260900e+02\n10 11710     6.567900e+02 5.754400e+02\n12 11710     5.354000e+02 5.070500e+02\n2 11711     -2.616300e+02 3.096000e+02\n6 11711     -4.467100e+02 5.846900e+02\n2 11712     3.883199e+02 3.094500e+02\n3 11712     2.441600e+02 -1.667999e+01\n6 11712     3.087300e+02 5.473800e+02\n9 11712     1.867100e+02 3.560600e+02\n2 11713     4.310601e+02 3.091300e+02\n8 11713     4.156900e+02 2.256800e+02\n2 11714     4.013900e+02 3.087400e+02\n3 11714     2.566700e+02 -1.684003e+01\n6 11714     3.241600e+02 5.457600e+02\n9 11714     1.980800e+02 3.557700e+02\n2 11715     3.811500e+02 3.071300e+02\n3 11715     2.370000e+02 -1.890997e+01\n7 11715     3.741200e+02 5.411800e+02\n9 11715     1.804000e+02 3.535000e+02\n13 11715     7.416100e+02 1.274300e+02\n2 11716     -1.094300e+02 3.066800e+02\n6 11716     -2.601200e+02 6.153300e+02\n2 11717     -1.094300e+02 3.066800e+02\n6 11717     -2.601200e+02 6.153300e+02\n9 11717     -2.464100e+02 3.372400e+02\n2 11718     5.249600e+02 3.066400e+02\n8 11718     4.919100e+02 2.217100e+02\n2 11719     5.249600e+02 3.066400e+02\n6 11719     4.508199e+02 4.929200e+02\n7 11719     4.709301e+02 4.846500e+02\n8 11719     4.919100e+02 2.217100e+02\n9 11719     3.055300e+02 3.580400e+02\n10 11719     6.531899e+02 5.710500e+02\n12 11719     5.332600e+02 5.018700e+02\n2 11720     7.404999e+01 3.059400e+02\n14 11720     7.264500e+02 -1.756100e+02\n2 11721     -4.617000e+02 3.049300e+02\n12 11721     -5.060400e+02 5.300400e+02\n2 11722     5.392300e+02 3.041100e+02\n6 11722     4.662000e+02 4.883900e+02\n7 11722     4.832900e+02 4.790700e+02\n8 11722     5.040900e+02 2.195100e+02\n9 11722     3.174700e+02 3.565500e+02\n2 11723     2.886899e+02 3.024300e+02\n12 11723     3.043400e+02 5.432400e+02\n2 11724     4.247700e+02 3.022600e+02\n6 11724     3.381000e+02 5.026700e+02\n10 11724     5.489800e+02 6.013500e+02\n12 11724     4.256400e+02 5.083600e+02\n2 11725     3.928101e+02 3.019200e+02\n6 11725     3.139700e+02 5.385500e+02\n9 11725     1.913800e+02 3.495900e+02\n12 11725     4.135601e+02 5.326200e+02\n13 11725     7.515800e+02 1.208600e+02\n2 11726     5.698101e+02 3.014000e+02\n6 11726     5.011400e+02 4.810900e+02\n2 11727     -3.946700e+02 3.009300e+02\n5 11727     3.017600e+02 -1.136300e+02\n2 11728     3.259100e+02 3.010000e+02\n7 11728     3.247300e+02 5.455100e+02\n13 11728     6.930900e+02 1.323500e+02\n2 11729     -1.535999e+01 3.006500e+02\n13 11729     4.389399e+02 2.181300e+02\n14 11729     6.188000e+02 -1.864100e+02\n2 11730     -5.875000e+02 2.989100e+02\n5 11730     1.111600e+02 -1.178700e+02\n7 11730     -5.357900e+02 5.701900e+02\n8 11730     -4.031400e+02 2.227800e+02\n12 11730     -6.505700e+02 5.053300e+02\n2 11731     5.922300e+02 2.984200e+02\n10 11731     7.236600e+02 5.363000e+02\n12 11731     6.062700e+02 4.857100e+02\n2 11732     -4.335200e+02 2.976100e+02\n5 11732     2.616899e+02 -1.170200e+02\n11 11732     1.521002e+01 -2.399700e+02\n12 11732     -4.723200e+02 5.275100e+02\n2 11733     -1.383200e+02 2.976300e+02\n14 11733     4.792700e+02 -1.955100e+02\n2 11734     6.013500e+02 2.972300e+02\n10 11734     7.336400e+02 5.320000e+02\n2 11735     4.262900e+02 2.968900e+02\n10 11735     5.496899e+02 5.949300e+02\n2 11736     -2.568600e+02 2.958500e+02\n13 11736     2.211801e+02 1.989400e+02\n2 11737     9.115997e+01 2.960700e+02\n12 11737     1.488900e+02 5.995400e+02\n2 11738     3.875900e+02 2.949800e+02\n12 11738     4.072600e+02 5.246600e+02\n2 11739     2.626100e+02 2.936100e+02\n12 11739     2.775900e+02 5.361100e+02\n14 11739     8.766400e+02 -2.909300e+02\n2 11740     -9.717999e+01 2.932400e+02\n14 11740     5.252400e+02 -1.964600e+02\n2 11741     5.375800e+02 2.927900e+02\n6 11741     4.642500e+02 4.759900e+02\n7 11741     4.808101e+02 4.686000e+02\n9 11741     3.167900e+02 3.468600e+02\n2 11742     -3.188900e+02 2.922200e+02\n5 11742     3.785300e+02 -1.200100e+02\n6 11742     -5.157900e+02 5.531800e+02\n11 11742     1.213900e+02 -2.399600e+02\n12 11742     -3.398400e+02 5.383900e+02\n2 11743     3.786801e+02 2.922000e+02\n3 11743     2.352100e+02 -3.316998e+01\n7 11743     3.700200e+02 5.260800e+02\n2 11744     -5.869700e+02 2.909500e+02\n8 11744     -4.024300e+02 2.166000e+02\n12 11744     -6.481300e+02 4.979600e+02\n2 11745     -5.869700e+02 2.909500e+02\n12 11745     -6.481300e+02 4.979600e+02\n2 11746     3.847100e+02 2.907300e+02\n7 11746     3.750400e+02 5.237200e+02\n12 11746     4.038300e+02 5.201800e+02\n2 11747     2.140997e+01 2.884300e+02\n13 11747     4.735400e+02 2.111300e+02\n14 11747     6.618400e+02 -1.957300e+02\n2 11748     5.364800e+02 2.885100e+02\n6 11748     4.629200e+02 4.710700e+02\n10 11748     6.613800e+02 5.449800e+02\n12 11748     5.449100e+02 4.804100e+02\n2 11749     5.364800e+02 2.885100e+02\n10 11749     6.613800e+02 5.449800e+02\n2 11750     -5.933500e+02 2.875400e+02\n7 11750     -5.406400e+02 5.592300e+02\n11 11750     -1.249200e+02 -2.504000e+02\n2 11751     -5.789200e+02 2.876400e+02\n7 11751     -5.259800e+02 5.607600e+02\n8 11751     -3.961600e+02 2.143700e+02\n2 11752     -1.262100e+02 2.869500e+02\n14 11752     4.927100e+02 -2.044200e+02\n2 11753     -3.252300e+02 2.866100e+02\n3 11753     -4.546300e+02 -4.490002e+01\n6 11753     -5.226500e+02 5.446600e+02\n2 11754     -3.252300e+02 2.866100e+02\n6 11754     -5.226500e+02 5.446600e+02\n2 11755     -3.850400e+02 2.853800e+02\n5 11755     3.098700e+02 -1.269600e+02\n2 11756     2.638199e+02 2.848400e+02\n6 11756     1.669400e+02 5.367300e+02\n12 11756     2.785000e+02 5.264900e+02\n14 11756     8.772400e+02 -3.000900e+02\n2 11757     3.165699e+02 2.850500e+02\n7 11757     3.167100e+02 5.326300e+02\n9 11757     1.253600e+02 3.323700e+02\n12 11757     3.324900e+02 5.212400e+02\n2 11758     3.165699e+02 2.850500e+02\n6 11758     2.268100e+02 5.298100e+02\n7 11758     3.167100e+02 5.326300e+02\n9 11758     1.253600e+02 3.323700e+02\n11 11758     6.346500e+02 -3.412900e+02\n12 11758     3.324900e+02 5.212400e+02\n2 11759     3.327400e+02 2.834400e+02\n3 11759     1.902000e+02 -4.264001e+01\n6 11759     2.442300e+02 5.260900e+02\n8 11759     3.398000e+02 2.105000e+02\n9 11759     1.395800e+02 3.320400e+02\n11 11759     6.481600e+02 -3.472900e+02\n12 11759     3.491600e+02 5.186700e+02\n2 11760     3.788400e+02 2.836900e+02\n3 11760     2.357000e+02 -4.148999e+01\n6 11760     2.972400e+02 5.196500e+02\n8 11760     3.766600e+02 2.101200e+02\n9 11760     1.792000e+02 3.338900e+02\n12 11760     3.979399e+02 5.137900e+02\n2 11761     3.832000e+02 2.831000e+02\n3 11761     2.394600e+02 -4.210999e+01\n9 11761     1.836100e+02 3.334500e+02\n12 11761     4.024600e+02 5.127100e+02\n2 11762     -5.827300e+02 2.826000e+02\n12 11762     -6.424800e+02 4.895300e+02\n2 11763     -2.720800e+02 2.825400e+02\n8 11763     -1.442200e+02 2.168700e+02\n14 11763     3.341200e+02 -2.151100e+02\n2 11764     4.294500e+02 2.826600e+02\n6 11764     3.420600e+02 4.799500e+02\n10 11764     5.498000e+02 5.767900e+02\n12 11764     4.301200e+02 4.858900e+02\n2 11765     4.294500e+02 2.826600e+02\n6 11765     3.420600e+02 4.799500e+02\n12 11765     4.301200e+02 4.858900e+02\n2 11766     5.145500e+02 2.824100e+02\n6 11766     4.377200e+02 4.674200e+02\n8 11766     4.842000e+02 2.019100e+02\n9 11766     2.976200e+02 3.369500e+02\n2 11767     -2.605600e+02 2.817000e+02\n6 11767     -4.432300e+02 5.523100e+02\n11 11767     1.770500e+02 -2.466400e+02\n2 11768     3.308800e+02 2.815700e+02\n7 11768     3.284100e+02 5.264400e+02\n9 11768     1.375000e+02 3.300300e+02\n2 11769     -1.576800e+02 2.811600e+02\n12 11769     -1.539500e+02 5.451300e+02\n14 11769     4.530601e+02 -2.176300e+02\n2 11770     5.293700e+02 2.810400e+02\n6 11770     4.543400e+02 4.638200e+02\n7 11770     4.719399e+02 4.590100e+02\n9 11770     3.103600e+02 3.365500e+02\n10 11770     6.520500e+02 5.391600e+02\n11 11770     7.775300e+02 -4.415700e+02\n2 11771     -3.992400e+02 2.806300e+02\n7 11771     -3.408900e+02 5.750800e+02\n11 11771     4.612000e+01 -2.514400e+02\n2 11772     -5.781500e+02 2.800400e+02\n5 11772     1.186200e+02 -1.340200e+02\n2 11773     -1.603600e+02 2.796000e+02\n3 11773     -2.972200e+02 -5.196002e+01\n6 11773     -3.225100e+02 5.644900e+02\n8 11773     -5.428998e+01 2.161400e+02\n9 11773     -2.890900e+02 3.125200e+02\n2 11774     3.452400e+02 2.788600e+02\n6 11774     2.587000e+02 5.191600e+02\n2 11775     3.452400e+02 2.788600e+02\n6 11775     2.587000e+02 5.191600e+02\n2 11776     4.746400e+02 2.775000e+02\n6 11776     3.929800e+02 4.676200e+02\n7 11776     4.230400e+02 4.673700e+02\n2 11777     5.929500e+02 2.773800e+02\n6 11777     5.257300e+02 4.508400e+02\n2 11778     -4.958800e+02 2.771300e+02\n7 11778     -4.404100e+02 5.610500e+02\n12 11778     -5.425500e+02 4.965900e+02\n2 11779     -4.958800e+02 2.771300e+02\n7 11779     -4.404100e+02 5.610500e+02\n12 11779     -5.425500e+02 4.965900e+02\n2 11780     -5.060200e+02 2.763800e+02\n7 11780     -4.509100e+02 5.592000e+02\n2 11781     -3.099976e-01 2.755600e+02\n14 11781     6.351801e+02 -2.094200e+02\n2 11782     3.444800e+02 2.747500e+02\n6 11782     2.578600e+02 5.145100e+02\n8 11782     3.489000e+02 2.035000e+02\n9 11782     1.499301e+02 3.251200e+02\n11 11782     6.582600e+02 -3.587200e+02\n2 11783     -5.839900e+02 2.743900e+02\n5 11783     1.124900e+02 -1.388700e+02\n7 11783     -5.295400e+02 5.487700e+02\n12 11783     -6.430400e+02 4.804700e+02\n2 11784     -2.573300e+02 2.728200e+02\n11 11784     1.799200e+02 -2.533200e+02\n2 11785     5.266500e+02 2.715500e+02\n6 11785     4.505200e+02 4.556400e+02\n7 11785     4.688600e+02 4.518800e+02\n9 11785     3.075100e+02 3.296400e+02\n10 11785     6.472100e+02 5.293800e+02\n12 11785     5.329700e+02 4.641100e+02\n13 11785     8.438199e+02 4.497998e+01\n2 11786     -3.083500e+02 2.707100e+02\n6 11786     -5.008500e+02 5.295000e+02\n2 11787     3.111300e+02 2.704700e+02\n6 11787     2.203700e+02 5.144500e+02\n2 11788     5.050300e+02 2.701600e+02\n3 11788     3.621500e+02 -4.976001e+01\n6 11788     4.264900e+02 4.551200e+02\n8 11788     4.759301e+02 1.927600e+02\n9 11788     2.896400e+02 3.266500e+02\n10 11788     6.240000e+02 5.346500e+02\n12 11788     5.102000e+02 4.637700e+02\n2 11789     -5.991000e+02 2.693500e+02\n7 11789     -5.445000e+02 5.425300e+02\n2 11790     -2.320100e+02 2.693700e+02\n6 11790     -4.074900e+02 5.457500e+02\n8 11790     -1.104700e+02 2.074000e+02\n9 11790     -3.483300e+02 3.008000e+02\n2 11791     -5.937700e+02 2.687200e+02\n7 11791     -5.388700e+02 5.426400e+02\n8 11791     -4.078000e+02 1.991700e+02\n2 11792     -2.499400e+02 2.691700e+02\n7 11792     -1.834000e+02 5.807400e+02\n2 11793     -1.543100e+02 2.685100e+02\n5 11793     5.489600e+02 -1.471200e+02\n6 11793     -3.148400e+02 5.506300e+02\n8 11793     -4.890997e+01 2.067100e+02\n12 11793     -1.503600e+02 5.309500e+02\n2 11794     3.218900e+02 2.673300e+02\n6 11794     2.325100e+02 5.088900e+02\n7 11794     3.202700e+02 5.148600e+02\n11 11794     6.387700e+02 -3.584200e+02\n2 11795     -2.849400e+02 2.667900e+02\n5 11795     4.120500e+02 -1.432500e+02\n6 11795     -4.718700e+02 5.305600e+02\n8 11795     -1.544700e+02 2.035100e+02\n12 11795     -2.973700e+02 5.165000e+02\n14 11795     3.205400e+02 -2.293200e+02\n2 11796     -2.849400e+02 2.667900e+02\n5 11796     4.120500e+02 -1.432500e+02\n6 11796     -4.718700e+02 5.305600e+02\n7 11796     -2.204200e+02 5.750800e+02\n8 11796     -1.544700e+02 2.035100e+02\n12 11796     -2.973700e+02 5.165000e+02\n14 11796     3.205400e+02 -2.293200e+02\n2 11797     -2.849400e+02 2.667900e+02\n7 11797     -2.204200e+02 5.750800e+02\n8 11797     -1.544700e+02 2.035100e+02\n12 11797     -2.973700e+02 5.165000e+02\n14 11797     3.205400e+02 -2.293200e+02\n2 11798     -4.604500e+02 2.664000e+02\n3 11798     -5.870400e+02 -6.353998e+01\n7 11798     -4.035900e+02 5.549100e+02\n2 11799     6.045601e+02 2.658500e+02\n6 11799     5.378900e+02 4.368600e+02\n2 11800     3.881000e+02 2.655800e+02\n6 11800     3.066100e+02 4.979700e+02\n8 11800     3.838000e+02 1.946900e+02\n2 11801     3.881000e+02 2.655800e+02\n6 11801     3.066100e+02 4.979700e+02\n12 11801     4.069900e+02 4.928800e+02\n2 11802     6.460699e+02 2.653300e+02\n9 11802     4.294399e+02 3.305500e+02\n2 11803     4.547300e+02 2.652900e+02\n3 11803     3.136700e+02 -5.609998e+01\n6 11803     3.701200e+02 4.567700e+02\n7 11803     4.046500e+02 4.600300e+02\n9 11803     2.469700e+02 3.208800e+02\n12 11803     4.565200e+02 4.640300e+02\n2 11804     4.547300e+02 2.652900e+02\n3 11804     3.136700e+02 -5.609998e+01\n6 11804     3.701200e+02 4.567700e+02\n7 11804     4.046500e+02 4.600300e+02\n9 11804     2.469700e+02 3.208800e+02\n10 11804     5.719399e+02 5.474400e+02\n12 11804     4.565200e+02 4.640300e+02\n2 11805     5.446300e+02 2.651000e+02\n8 11805     5.078400e+02 1.876400e+02\n9 11805     3.229700e+02 3.237600e+02\n10 11805     6.645300e+02 5.145700e+02\n12 11805     5.524000e+02 4.537200e+02\n2 11806     5.446300e+02 2.651000e+02\n10 11806     6.645300e+02 5.145700e+02\n12 11806     5.524000e+02 4.537200e+02\n2 11807     -4.688300e+02 2.641900e+02\n8 11807     -3.056600e+02 1.982900e+02\n12 11807     -5.102000e+02 4.871900e+02\n2 11808     5.838300e+02 2.630800e+02\n7 11808     5.186700e+02 4.292500e+02\n2 11809     5.039000e+02 2.624700e+02\n7 11809     4.475200e+02 4.472900e+02\n10 11809     6.216100e+02 5.266900e+02\n2 11810     5.039000e+02 2.624700e+02\n7 11810     4.475200e+02 4.472900e+02\n10 11810     6.216100e+02 5.266900e+02\n2 11811     -7.226000e+02 2.622000e+02\n8 11811     -5.119100e+02 1.916700e+02\n11 11811     -2.296000e+02 -2.689200e+02\n12 11811     -7.984700e+02 4.484000e+02\n2 11812     1.623999e+01 2.614700e+02\n6 11812     -1.038400e+02 5.885300e+02\n12 11812     5.879999e+01 5.530000e+02\n2 11813     3.523300e+02 2.593400e+02\n3 11813     2.105200e+02 -6.534003e+01\n10 11813     5.203500e+02 6.136100e+02\n2 11814     4.070007e+00 2.587800e+02\n12 11814     4.428998e+01 5.481200e+02\n14 11814     6.394800e+02 -2.256400e+02\n2 11815     2.924600e+02 2.587500e+02\n8 11815     3.064800e+02 1.912600e+02\n12 11815     3.072900e+02 4.948900e+02\n2 11816     5.655500e+02 2.590800e+02\n6 11816     4.934900e+02 4.342900e+02\n10 11816     6.850500e+02 4.994500e+02\n2 11817     5.817200e+02 2.589300e+02\n8 11817     5.407100e+02 1.817700e+02\n9 11817     3.567500e+02 3.200700e+02\n10 11817     7.027900e+02 4.935200e+02\n2 11818     1.357001e+01 2.577700e+02\n6 11818     -1.070500e+02 5.844800e+02\n8 11818     9.189001e+01 2.018100e+02\n2 11819     -5.015200e+02 2.558700e+02\n5 11819     1.900000e+02 -1.546200e+02\n7 11819     -4.444300e+02 5.415900e+02\n2 11820     -5.015200e+02 2.558700e+02\n7 11820     -4.444300e+02 5.415900e+02\n12 11820     -5.465900e+02 4.742200e+02\n2 11821     -2.450300e+02 2.556000e+02\n6 11821     -4.226500e+02 5.265100e+02\n2 11822     1.896002e+01 2.534900e+02\n5 11822     7.555601e+02 -1.514300e+02\n6 11822     -1.000900e+02 5.797800e+02\n12 11822     6.238000e+01 5.441600e+02\n2 11823     1.896002e+01 2.534900e+02\n3 11823     -1.265800e+02 -7.860999e+01\n6 11823     -1.000900e+02 5.797800e+02\n12 11823     6.238000e+01 5.441600e+02\n2 11824     5.210800e+02 2.521600e+02\n6 11824     4.434200e+02 4.331300e+02\n7 11824     4.611400e+02 4.330400e+02\n8 11824     4.885300e+02 1.775000e+02\n10 11824     6.365699e+02 5.077000e+02\n12 11824     5.261899e+02 4.418300e+02\n15 11824     8.411801e+02 5.823300e+02\n2 11825     -6.776400e+02 2.514900e+02\n5 11825     2.340997e+01 -1.580100e+02\n2 11826     -3.800200e+02 2.514000e+02\n3 11826     -5.084100e+02 -7.958002e+01\n2 11827     -3.587300e+02 2.505900e+02\n7 11827     -2.969200e+02 5.526400e+02\n12 11827     -3.816200e+02 4.888900e+02\n2 11828     4.978199e+02 2.494300e+02\n6 11828     4.176400e+02 4.334000e+02\n7 11828     4.407200e+02 4.356500e+02\n8 11828     4.698500e+02 1.757800e+02\n9 11828     2.841500e+02 3.090400e+02\n10 11828     6.126100e+02 5.132100e+02\n12 11828     5.014500e+02 4.416800e+02\n2 11829     5.461200e+02 2.488900e+02\n10 11829     6.623300e+02 4.950800e+02\n15 11829     8.717800e+02 5.677300e+02\n2 11830     -3.167600e+02 2.475000e+02\n12 11830     -3.330000e+02 4.918300e+02\n2 11831     2.815200e+02 2.465300e+02\n6 11831     1.862800e+02 4.910200e+02\n9 11831     9.675000e+01 2.986400e+02\n10 11831     4.488101e+02 6.220000e+02\n11 11831     6.057500e+02 -3.663600e+02\n2 11832     -2.815300e+02 2.450700e+02\n5 11832     4.130200e+02 -1.633700e+02\n7 11832     -2.159700e+02 5.554900e+02\n2 11833     -3.741000e+02 2.436800e+02\n3 11833     -5.027800e+02 -8.681000e+01\n5 11833     3.164900e+02 -1.650000e+02\n6 11833     -5.778000e+02 4.850100e+02\n12 11833     -3.990800e+02 4.797500e+02\n2 11834     -3.741000e+02 2.436800e+02\n6 11834     -5.778000e+02 4.850100e+02\n12 11834     -3.990800e+02 4.797500e+02\n2 11835     -3.637800e+02 2.433600e+02\n6 11835     -5.654000e+02 4.868600e+02\n2 11836     -8.700000e+01 2.432900e+02\n6 11836     -2.296300e+02 5.460500e+02\n12 11836     -6.326001e+01 5.196500e+02\n14 11836     5.336400e+02 -2.442200e+02\n2 11837     -4.139300e+02 2.431800e+02\n3 11837     -5.418800e+02 -8.753998e+01\n2 11838     -3.330400e+02 2.432100e+02\n11 11838     1.067400e+02 -2.774200e+02\n2 11839     4.677700e+02 2.419100e+02\n3 11839     3.269800e+02 -7.798999e+01\n6 11839     3.836800e+02 4.291000e+02\n8 11839     4.450000e+02 1.701200e+02\n9 11839     2.586600e+02 3.012300e+02\n10 11839     5.803101e+02 5.157200e+02\n12 11839     4.694200e+02 4.370800e+02\n15 11839     7.738000e+02 5.899100e+02\n2 11840     -3.402600e+02 2.416800e+02\n6 11840     -5.364800e+02 4.900900e+02\n2 11841     -3.022700e+02 2.417700e+02\n5 11841     3.909100e+02 -1.660000e+02\n6 11841     -4.909300e+02 4.981000e+02\n12 11841     -3.159400e+02 4.880000e+02\n2 11842     -7.796002e+01 2.415900e+02\n3 11842     -2.182400e+02 -9.063000e+01\n7 11842     2.450012e+00 5.732900e+02\n14 11842     5.435400e+02 -2.452900e+02\n2 11843     -8.920001e+01 2.407400e+02\n6 11843     -2.323200e+02 5.425400e+02\n12 11843     -6.587000e+01 5.170000e+02\n2 11844     4.780500e+02 2.408000e+02\n7 11844     4.223400e+02 4.317300e+02\n8 11844     4.530100e+02 1.692000e+02\n2 11845     -6.021997e+01 2.394900e+02\n6 11845     -1.970400e+02 5.466000e+02\n9 11845     -2.014700e+02 2.805900e+02\n2 11846     -1.006600e+02 2.391000e+02\n6 11846     -2.464700e+02 5.380100e+02\n2 11847     -4.850100e+02 2.387000e+02\n7 11847     -4.262300e+02 5.282200e+02\n2 11848     -1.317900e+02 2.380200e+02\n6 11848     -2.845700e+02 5.302500e+02\n8 11848     -2.884998e+01 1.837400e+02\n12 11848     -1.168300e+02 5.085000e+02\n2 11849     -6.346000e+02 2.375200e+02\n7 11849     -5.768100e+02 5.106600e+02\n2 11850     -5.857800e+02 2.373400e+02\n11 11850     -1.202400e+02 -2.853900e+02\n2 11851     -3.257300e+02 2.369600e+02\n5 11851     3.660900e+02 -1.703700e+02\n11 11851     1.132400e+02 -2.814800e+02\n2 11852     -9.497998e+01 2.368500e+02\n6 11852     -2.395600e+02 5.366600e+02\n2 11853     -3.148100e+02 2.345300e+02\n12 11853     -3.301000e+02 4.790200e+02\n2 11854     -5.716300e+02 2.339800e+02\n12 11854     -6.244600e+02 4.407300e+02\n2 11855     -3.639500e+02 2.336900e+02\n3 11855     -4.934800e+02 -9.667999e+01\n6 11855     -5.649000e+02 4.759400e+02\n12 11855     -3.863500e+02 4.708600e+02\n2 11856     8.071400e+02 2.326000e+02\n3 11856     6.500800e+02 -7.579999e+01\n7 11856     7.182500e+02 3.475800e+02\n9 11856     5.428900e+02 3.037500e+02\n2 11857     -6.206800e+02 2.320000e+02\n7 11857     -5.620500e+02 5.076700e+02\n2 11858     -3.445100e+02 2.292900e+02\n3 11858     -4.746100e+02 -1.016200e+02\n6 11858     -5.408100e+02 4.749100e+02\n8 11858     -2.037600e+02 1.727500e+02\n2 11859     -1.841300e+02 2.294000e+02\n14 11859     4.251400e+02 -2.603200e+02\n2 11860     7.574301e+02 2.269400e+02\n3 11860     6.040300e+02 -8.228998e+01\n7 11860     6.715300e+02 3.544600e+02\n9 11860     5.020100e+02 2.981000e+02\n12 11860     7.850500e+02 3.853800e+02\n2 11861     -3.917800e+02 2.260100e+02\n7 11861     -3.301000e+02 5.272500e+02\n2 11862     -4.800100e+02 2.260700e+02\n3 11862     -6.074300e+02 -1.036100e+02\n2 11863     -6.428400e+02 2.253900e+02\n5 11863     5.272998e+01 -1.805200e+02\n12 11863     -7.034400e+02 4.223900e+02\n2 11864     8.549988e+00 2.255400e+02\n6 11864     -1.132500e+02 5.444200e+02\n2 11865     7.327700e+02 2.247300e+02\n9 11865     4.822300e+02 2.952600e+02\n2 11866     -2.602200e+02 2.232700e+02\n5 11866     4.336100e+02 -1.826900e+02\n14 11866     3.431500e+02 -2.676400e+02\n2 11867     4.492500e+02 2.229600e+02\n6 11867     3.624000e+02 4.109100e+02\n12 11867     4.494500e+02 4.183400e+02\n2 11868     -4.160400e+02 2.215400e+02\n5 11868     2.719200e+02 -1.847900e+02\n7 11868     -3.542700e+02 5.206400e+02\n2 11869     -1.709300e+02 2.203900e+02\n14 11869     4.381899e+02 -2.683700e+02\n2 11870     2.127002e+01 2.203600e+02\n7 11870     1.105400e+02 5.624400e+02\n2 11871     -3.831400e+02 2.201600e+02\n12 11871     -4.071400e+02 4.544600e+02\n2 11872     -3.780800e+02 2.193900e+02\n5 11872     3.101899e+02 -1.870400e+02\n6 11872     -5.804700e+02 4.565000e+02\n8 11872     -2.308900e+02 1.644200e+02\n2 11873     -3.915800e+02 2.186800e+02\n3 11873     -5.207200e+02 -1.118300e+02\n8 11873     -2.421400e+02 1.636800e+02\n12 11873     -4.167800e+02 4.514100e+02\n2 11874     5.285400e+02 2.184700e+02\n7 11874     4.642900e+02 3.998700e+02\n9 11874     3.100400e+02 2.840900e+02\n10 11874     6.375699e+02 4.667100e+02\n2 11875     -4.184800e+02 2.181300e+02\n5 11875     2.685900e+02 -1.881600e+02\n2 11876     -4.825000e+02 2.171300e+02\n12 11876     -5.209400e+02 4.364700e+02\n2 11877     -4.825000e+02 2.171300e+02\n12 11877     -5.209400e+02 4.364700e+02\n2 11878     5.139900e+02 2.171300e+02\n6 11878     4.340400e+02 3.954100e+02\n8 11878     4.827800e+02 1.483600e+02\n9 11878     2.986200e+02 2.813400e+02\n15 11878     8.248199e+02 5.371100e+02\n2 11879     4.666600e+02 2.152000e+02\n12 11879     4.676000e+02 4.076600e+02\n2 11880     -6.861500e+02 2.148400e+02\n5 11880     1.241998e+01 -1.885800e+02\n12 11880     -7.506200e+02 4.059600e+02\n2 11881     -5.898300e+02 2.143600e+02\n5 11881     1.012900e+02 -1.903400e+02\n2 11882     -5.004100e+02 2.136700e+02\n7 11882     -4.395200e+02 5.041600e+02\n2 11883     -4.182500e+02 2.122600e+02\n5 11883     2.686200e+02 -1.933100e+02\n2 11884     4.238600e+02 2.117200e+02\n8 11884     4.084000e+02 1.468200e+02\n9 11884     2.216400e+02 2.744500e+02\n15 11884     7.162200e+02 5.676100e+02\n2 11885     -3.709900e+02 2.109100e+02\n14 11885     2.283700e+02 -2.818600e+02\n2 11886     4.364301e+02 2.110100e+02\n6 11886     3.474600e+02 3.995900e+02\n7 11886     3.835601e+02 4.134200e+02\n8 11886     4.188100e+02 1.461900e+02\n9 11886     2.323101e+02 2.743000e+02\n10 11886     5.435200e+02 4.927200e+02\n12 11886     4.356200e+02 4.066200e+02\n2 11887     -4.986100e+02 2.103900e+02\n12 11887     -5.385900e+02 4.281700e+02\n2 11888     -2.350800e+02 2.094100e+02\n12 11888     -2.370400e+02 4.641600e+02\n2 11889     -7.059998e+01 2.093000e+02\n3 11889     -2.119500e+02 -1.224900e+02\n5 11889     6.436400e+02 -1.954900e+02\n6 11889     -2.084400e+02 5.098100e+02\n7 11889     9.799988e+00 5.439500e+02\n9 11889     -2.093800e+02 2.532400e+02\n14 11889     5.495800e+02 -2.757300e+02\n2 11890     -3.781500e+02 2.073200e+02\n7 11890     -3.144900e+02 5.116700e+02\n2 11891     -3.903800e+02 2.067600e+02\n12 11891     -4.146300e+02 4.398900e+02\n2 11892     -4.310500e+02 2.064000e+02\n12 11892     -4.612800e+02 4.334500e+02\n2 11893     5.265200e+02 2.065800e+02\n6 11893     4.476200e+02 3.826200e+02\n8 11893     4.932700e+02 1.409300e+02\n10 11893     6.325900e+02 4.544500e+02\n12 11893     5.308199e+02 3.920400e+02\n2 11894     -3.285800e+02 2.045700e+02\n3 11894     -4.570900e+02 -1.261800e+02\n5 11894     3.550601e+02 -2.078100e+02\n6 11894     -5.205100e+02 4.406000e+02\n7 11894     -2.714000e+02 5.068500e+02\n14 11894     2.665800e+02 -2.941400e+02\n2 11895     -8.940002e+01 2.047200e+02\n6 11895     -2.311200e+02 5.006600e+02\n2 11896     6.967700e+02 2.018900e+02\n7 11896     6.128000e+02 3.448600e+02\n2 11897     -5.479800e+02 2.014800e+02\n12 11897     -5.936300e+02 4.114400e+02\n2 11898     -5.354800e+02 2.010900e+02\n5 11898     1.518100e+02 -2.023200e+02\n14 11898     6.651001e+01 -2.927000e+02\n2 11899     -5.354800e+02 2.010900e+02\n8 11899     -3.603900e+02 1.473900e+02\n2 11900     -3.194500e+02 2.002800e+02\n6 11900     -5.090600e+02 4.373600e+02\n7 11900     -2.621500e+02 5.033900e+02\n2 11901     -3.194500e+02 2.002800e+02\n6 11901     -5.090600e+02 4.373600e+02\n7 11901     -2.621500e+02 5.033900e+02\n2 11902     -7.571002e+01 2.001900e+02\n12 11902     -4.817999e+01 4.762900e+02\n2 11903     4.922700e+02 1.999700e+02\n6 11903     4.089500e+02 3.799100e+02\n8 11903     4.647100e+02 1.357000e+02\n9 11903     2.803101e+02 2.669600e+02\n10 11903     5.963500e+02 4.601800e+02\n2 11904     5.018199e+02 1.987000e+02\n3 11904     3.616200e+02 -1.176100e+02\n6 11904     4.198100e+02 3.771900e+02\n9 11904     2.885300e+02 2.663200e+02\n10 11904     6.060400e+02 4.545900e+02\n12 11904     5.041100e+02 3.859600e+02\n15 11904     8.059000e+02 5.182000e+02\n2 11905     6.409399e+02 1.979700e+02\n12 11905     6.535400e+02 3.677900e+02\n2 11906     -4.692200e+02 1.966400e+02\n12 11906     -5.038100e+02 4.181000e+02\n2 11907     6.743700e+02 1.966200e+02\n12 11907     6.898300e+02 3.619000e+02\n2 11908     -5.981000e+02 1.959400e+02\n5 11908     9.042999e+01 -2.064200e+02\n12 11908     -6.509300e+02 3.984700e+02\n2 11909     5.056700e+02 1.954000e+02\n6 11909     4.237300e+02 3.728000e+02\n10 11909     6.090601e+02 4.494000e+02\n12 11909     5.079200e+02 3.817700e+02\n15 11909     8.097600e+02 5.118200e+02\n2 11910     7.121600e+02 1.943800e+02\n3 11910     5.638700e+02 -1.145200e+02\n7 11910     6.234100e+02 3.327900e+02\n2 11911     7.251500e+02 1.945700e+02\n9 11911     4.759900e+02 2.696200e+02\n2 11912     -2.813400e+02 1.938800e+02\n6 11912     -4.619800e+02 4.471200e+02\n2 11913     2.892500e+02 1.932500e+02\n6 11913     1.939400e+02 4.303400e+02\n12 11913     3.039399e+02 4.256900e+02\n2 11914     2.892500e+02 1.932500e+02\n6 11914     1.939400e+02 4.303400e+02\n12 11914     3.039399e+02 4.256900e+02\n2 11915     -5.294700e+02 1.924100e+02\n12 11915     -5.712900e+02 4.047300e+02\n2 11916     2.966300e+02 1.922800e+02\n6 11916     2.024000e+02 4.283200e+02\n2 11917     6.499399e+02 1.923200e+02\n6 11917     5.837100e+02 3.498700e+02\n7 11917     5.687800e+02 3.471600e+02\n10 11917     7.577100e+02 3.912900e+02\n12 11917     6.628600e+02 3.607200e+02\n2 11918     -4.674400e+02 1.900200e+02\n7 11918     -4.045300e+02 4.874300e+02\n2 11919     4.882400e+02 1.894600e+02\n7 11919     4.261100e+02 3.814100e+02\n10 11919     5.900300e+02 4.491200e+02\n2 11920     6.880601e+02 1.885900e+02\n10 11920     7.987000e+02 3.714200e+02\n2 11921     -1.900000e+01 1.866100e+02\n13 11921     4.274200e+02 1.291500e+02\n2 11922     7.144399e+02 1.867100e+02\n3 11922     5.659600e+02 -1.217500e+02\n7 11922     6.260601e+02 3.262200e+02\n12 11922     7.329200e+02 3.462200e+02\n2 11923     7.569399e+02 1.859100e+02\n7 11923     6.650699e+02 3.150500e+02\n9 11923     5.024399e+02 2.635400e+02\n2 11924     7.569399e+02 1.859100e+02\n7 11924     6.650699e+02 3.150500e+02\n9 11924     5.024399e+02 2.635400e+02\n2 11925     7.112900e+02 1.850600e+02\n10 11925     8.225800e+02 3.575800e+02\n2 11926     7.282800e+02 1.848700e+02\n12 11926     7.494301e+02 3.421400e+02\n2 11927     -5.507100e+02 1.844900e+02\n5 11927     1.355100e+02 -2.163400e+02\n12 11927     -5.945900e+02 3.944500e+02\n2 11928     -4.310000e+02 1.846700e+02\n7 11928     -3.672900e+02 4.865500e+02\n12 11928     -4.585500e+02 4.112800e+02\n2 11929     -4.024800e+02 1.845000e+02\n3 11929     -5.323700e+02 -1.462400e+02\n7 11929     -3.382600e+02 4.892800e+02\n2 11930     -4.024800e+02 1.845000e+02\n5 11930     2.819301e+02 -2.180900e+02\n7 11930     -3.382600e+02 4.892800e+02\n2 11931     -5.065997e+01 1.843400e+02\n14 11931     5.706200e+02 -2.994000e+02\n2 11932     5.099399e+02 1.843600e+02\n3 11932     3.700000e+02 -1.312300e+02\n6 11932     4.282700e+02 3.597600e+02\n8 11932     4.785200e+02 1.222600e+02\n9 11932     2.955601e+02 2.538100e+02\n10 11932     6.114600e+02 4.351600e+02\n15 11932     8.128199e+02 4.948900e+02\n2 11933     -5.115200e+02 1.832600e+02\n5 11933     1.731700e+02 -2.182800e+02\n2 11934     -5.684400e+02 1.813600e+02\n5 11934     1.181800e+02 -2.189700e+02\n7 11934     -5.052700e+02 4.691800e+02\n8 11934     -3.871200e+02 1.307200e+02\n11 11934     -1.072600e+02 -3.242300e+02\n12 11934     -6.141600e+02 3.884400e+02\n14 11934     3.346002e+01 -3.098600e+02\n2 11935     6.928400e+02 1.810900e+02\n3 11935     5.458800e+02 -1.279200e+02\n12 11935     7.095200e+02 3.426100e+02\n2 11936     6.259800e+02 1.801500e+02\n6 11936     5.568500e+02 3.393400e+02\n10 11936     7.301100e+02 3.859800e+02\n12 11936     6.365100e+02 3.497900e+02\n2 11937     -5.655900e+02 1.793400e+02\n7 11937     -5.019100e+02 4.680900e+02\n2 11938     -6.556300e+02 1.779300e+02\n7 11938     -5.908800e+02 4.574000e+02\n2 11939     -4.223800e+02 1.770000e+02\n11 11939     2.165002e+01 -3.267400e+02\n2 11940     5.095000e+02 1.766100e+02\n6 11940     4.273400e+02 3.526300e+02\n10 11940     6.091100e+02 4.276100e+02\n15 11940     8.106000e+02 4.870600e+02\n2 11941     5.228300e+02 1.752800e+02\n6 11941     4.423600e+02 3.486100e+02\n10 11941     6.223500e+02 4.209300e+02\n15 11941     8.261200e+02 4.778400e+02\n2 11942     -5.306600e+02 1.742700e+02\n7 11942     -4.674000e+02 4.667900e+02\n12 11942     -5.715300e+02 3.864600e+02\n2 11943     4.667700e+02 1.744700e+02\n10 11943     5.670800e+02 4.409000e+02\n2 11944     4.667700e+02 1.744700e+02\n10 11944     5.670800e+02 4.409000e+02\n2 11945     -6.560500e+02 1.716400e+02\n7 11945     -5.902700e+02 4.520900e+02\n10 11945     -5.866200e+02 6.178400e+02\n12 11945     -7.116300e+02 3.663100e+02\n2 11946     -6.000200e+02 1.716000e+02\n10 11946     -5.217000e+02 6.218700e+02\n2 11947     -5.447900e+02 1.703600e+02\n12 11947     -5.867000e+02 3.810900e+02\n2 11948     6.235000e+02 1.704200e+02\n6 11948     5.534200e+02 3.296100e+02\n10 11948     7.248199e+02 3.771100e+02\n2 11949     -7.842999e+01 1.701300e+02\n13 11949     3.717500e+02 1.133700e+02\n14 11949     5.380300e+02 -3.129400e+02\n2 11950     -7.230900e+02 1.689200e+02\n5 11950     -2.652002e+01 -2.275900e+02\n8 11950     -5.127000e+02 1.177600e+02\n12 11950     -7.866100e+02 3.536000e+02\n2 11951     6.925000e+02 1.679300e+02\n10 11951     7.980400e+02 3.463300e+02\n2 11952     4.916600e+02 1.670100e+02\n6 11952     4.070200e+02 3.444600e+02\n8 11952     4.635200e+02 1.091200e+02\n9 11952     2.805601e+02 2.390600e+02\n10 11952     5.894700e+02 4.234600e+02\n12 11952     4.919399e+02 3.532800e+02\n15 11952     7.870100e+02 4.802000e+02\n2 11953     3.636400e+02 1.664700e+02\n7 11953     3.471100e+02 4.121200e+02\n2 11954     5.086200e+02 1.667900e+02\n6 11954     4.258000e+02 3.410400e+02\n2 11955     5.086200e+02 1.667900e+02\n6 11955     4.258000e+02 3.410400e+02\n2 11956     -6.374100e+02 1.650800e+02\n5 11956     5.184003e+01 -2.313000e+02\n7 11956     -5.713700e+02 4.489300e+02\n11 11956     -1.659800e+02 -3.348600e+02\n13 11956     -8.985999e+01 8.673001e+01\n14 11956     -3.178003e+01 -3.235800e+02\n2 11957     6.572000e+02 1.648300e+02\n10 11957     7.590300e+02 3.570600e+02\n2 11958     6.602300e+02 1.636300e+02\n9 11958     4.234800e+02 2.412900e+02\n12 11958     6.732600e+02 3.268600e+02\n2 11959     6.298300e+02 1.632400e+02\n6 11959     5.600601e+02 3.212800e+02\n10 11959     7.298900e+02 3.664700e+02\n2 11960     -6.566200e+02 1.621800e+02\n7 11960     -5.900300e+02 4.438300e+02\n12 11960     -7.113500e+02 3.569500e+02\n2 11961     -6.566200e+02 1.621800e+02\n7 11961     -5.900300e+02 4.438300e+02\n10 11961     -5.866700e+02 6.084200e+02\n12 11961     -7.113500e+02 3.569500e+02\n2 11962     6.151801e+02 1.616300e+02\n6 11962     5.434600e+02 3.208300e+02\n7 11962     5.333199e+02 3.260400e+02\n9 11962     3.849399e+02 2.380500e+02\n12 11962     6.224301e+02 3.304200e+02\n2 11963     5.254800e+02 1.608200e+02\n6 11963     4.443000e+02 3.332600e+02\n9 11963     3.095100e+02 2.349000e+02\n2 11964     7.535200e+02 1.599500e+02\n7 11964     6.581200e+02 2.919300e+02\n2 11965     7.535200e+02 1.599500e+02\n12 11965     7.750200e+02 3.110800e+02\n2 11966     3.629500e+02 1.593700e+02\n10 11966     5.126000e+02 4.967200e+02\n12 11966     3.789800e+02 3.808600e+02\n2 11967     3.629500e+02 1.593700e+02\n6 11967     2.755500e+02 3.827500e+02\n10 11967     5.126000e+02 4.967200e+02\n12 11967     3.789800e+02 3.808600e+02\n2 11968     5.570500e+02 1.588500e+02\n6 11968     4.791000e+02 3.257700e+02\n12 11968     5.608101e+02 3.356200e+02\n15 11968     8.640100e+02 4.409300e+02\n2 11969     -7.371900e+02 1.584200e+02\n5 11969     -3.970001e+01 -2.359000e+02\n8 11969     -5.233300e+02 1.089900e+02\n10 11969     -6.772200e+02 5.983700e+02\n12 11969     -7.999800e+02 3.419500e+02\n14 11969     -1.221500e+02 -3.294300e+02\n2 11970     -7.073900e+02 1.584800e+02\n12 11970     -7.668800e+02 3.462300e+02\n2 11971     -6.059400e+02 1.584000e+02\n7 11971     -5.397900e+02 4.459900e+02\n14 11971     -2.650024e+00 -3.294500e+02\n2 11972     6.834200e+02 1.587100e+02\n9 11972     4.437500e+02 2.358900e+02\n10 11972     7.855699e+02 3.393600e+02\n12 11972     6.989900e+02 3.157000e+02\n2 11973     6.989200e+02 1.586100e+02\n9 11973     4.560601e+02 2.390400e+02\n2 11974     -6.932300e+02 1.580400e+02\n10 11974     -6.285100e+02 6.018000e+02\n2 11975     -4.582300e+02 1.562900e+02\n8 11975     -2.961700e+02 1.133900e+02\n12 11975     -4.864400e+02 3.794800e+02\n2 11976     -4.582300e+02 1.562900e+02\n12 11976     -4.864400e+02 3.794800e+02\n2 11977     6.474500e+02 1.554900e+02\n3 11977     5.047600e+02 -1.537400e+02\n9 11977     4.127000e+02 2.345400e+02\n10 11977     7.472900e+02 3.503000e+02\n12 11977     6.590800e+02 3.200100e+02\n2 11978     -5.420200e+02 1.547400e+02\n10 11978     -4.520700e+02 6.087200e+02\n2 11979     7.756100e+02 1.545900e+02\n3 11979     6.264399e+02 -1.498200e+02\n7 11979     6.767000e+02 2.814800e+02\n2 11980     7.756100e+02 1.545900e+02\n3 11980     6.264399e+02 -1.498200e+02\n7 11980     6.767000e+02 2.814800e+02\n2 11981     -6.406800e+02 1.534000e+02\n12 11981     -6.923200e+02 3.502500e+02\n2 11982     -5.898800e+02 1.536000e+02\n10 11982     -5.082200e+02 6.042500e+02\n12 11982     -6.349700e+02 3.571600e+02\n2 11983     -4.074500e+02 1.523400e+02\n7 11983     -3.416500e+02 4.608000e+02\n8 11983     -2.557300e+02 1.106500e+02\n12 11983     -4.293300e+02 3.817000e+02\n2 11984     7.755500e+02 1.520400e+02\n3 11984     6.260000e+02 -1.523000e+02\n7 11984     6.760601e+02 2.789100e+02\n2 11985     -1.418000e+02 1.506800e+02\n14 11985     4.655699e+02 -3.328900e+02\n2 11986     -1.796200e+02 1.505800e+02\n7 11986     -1.066600e+02 4.817400e+02\n2 11987     -4.051000e+02 1.498600e+02\n5 11987     2.755601e+02 -2.489700e+02\n12 11987     -4.260300e+02 3.803400e+02\n2 11988     6.756300e+02 1.496400e+02\n10 11988     7.750000e+02 3.330700e+02\n2 11989     -2.770000e+02 1.484100e+02\n6 11989     -4.540100e+02 3.978500e+02\n9 11989     -3.821600e+02 1.927500e+02\n2 11990     6.959399e+02 1.485400e+02\n9 11990     4.532500e+02 2.306000e+02\n10 11990     7.965500e+02 3.233300e+02\n12 11990     7.110000e+02 3.066000e+02\n2 11991     6.959399e+02 1.485400e+02\n12 11991     7.110000e+02 3.066000e+02\n2 11992     -5.834200e+02 1.481000e+02\n7 11992     -5.168900e+02 4.394700e+02\n10 11992     -5.000600e+02 5.992900e+02\n2 11993     -7.378400e+02 1.465400e+02\n10 11993     -6.775500e+02 5.875500e+02\n12 11993     -7.998000e+02 3.302100e+02\n2 11994     1.188100e+02 1.458200e+02\n3 11994     2.203003e+01 -1.720700e+02\n8 11994     1.336600e+02 7.679001e+01\n12 11994     -2.590002e+01 2.286900e+02\n2 11995     3.146100e+02 1.444200e+02\n3 11995     2.067900e+02 -1.696900e+02\n8 11995     2.956700e+02 7.354999e+01\n2 11996     7.052800e+02 1.437700e+02\n12 11996     7.208400e+02 3.003400e+02\n2 11997     -3.233000e+02 1.435000e+02\n3 11997     -4.537800e+02 -1.886100e+02\n6 11997     -5.060500e+02 3.799500e+02\n8 11997     -1.844500e+02 1.046500e+02\n9 11997     -4.195200e+02 1.865300e+02\n2 11998     -7.143000e+02 1.431400e+02\n14 11998     -1.033500e+02 -3.412900e+02\n2 11999     7.194301e+02 1.430200e+02\n12 11999     7.355699e+02 2.986200e+02\n2 12000     8.313199e+02 1.428300e+02\n3 12000     6.794700e+02 -1.590200e+02\n7 12000     7.252300e+02 2.565800e+02\n9 12000     5.646300e+02 2.296100e+02\n2 12001     8.313199e+02 1.428300e+02\n3 12001     6.794700e+02 -1.590200e+02\n7 12001     7.252300e+02 2.565800e+02\n9 12001     5.646300e+02 2.296100e+02\n2 12002     -5.594500e+02 1.425800e+02\n7 12002     -4.947100e+02 4.359600e+02\n2 12003     -5.383400e+02 1.425500e+02\n14 12003     5.801001e+01 -3.444300e+02\n2 12004     -5.847600e+02 1.412300e+02\n5 12004     9.845001e+01 -2.531500e+02\n7 12004     -5.177700e+02 4.336800e+02\n10 12004     -5.014400e+02 5.926200e+02\n14 12004     1.458002e+01 -3.440200e+02\n2 12005     -6.700600e+02 1.402700e+02\n10 12005     -5.991200e+02 5.858400e+02\n2 12006     -2.614400e+02 1.405300e+02\n12 12006     -2.613000e+02 3.906700e+02\n2 12007     -3.085300e+02 1.386400e+02\n5 12007     3.732600e+02 -2.645700e+02\n6 12007     -4.876800e+02 3.762000e+02\n7 12007     -2.456400e+02 4.548100e+02\n9 12007     -4.057600e+02 1.837400e+02\n2 12008     -3.183600e+02 1.380900e+02\n5 12008     3.637000e+02 -2.648600e+02\n6 12008     -4.983900e+02 3.741700e+02\n8 12008     -1.786900e+02 1.009900e+02\n9 12008     -4.141600e+02 1.824700e+02\n2 12009     -6.813900e+02 1.376100e+02\n10 12009     -6.126600e+02 5.822600e+02\n2 12010     -6.813900e+02 1.376100e+02\n7 12010     -6.113200e+02 4.209200e+02\n2 12011     -3.925000e+02 1.377100e+02\n7 12011     -3.255500e+02 4.499600e+02\n2 12012     -6.940100e+02 1.354400e+02\n7 12012     -6.235800e+02 4.171600e+02\n2 12013     -5.911200e+02 1.339400e+02\n7 12013     -5.232500e+02 4.255800e+02\n10 12013     -5.076600e+02 5.840900e+02\n12 12013     -6.344800e+02 3.373800e+02\n14 12013     8.099976e+00 -3.511300e+02\n2 12014     5.245300e+02 1.331200e+02\n6 12014     4.423600e+02 3.029800e+02\n2 12015     5.245300e+02 1.331200e+02\n6 12015     4.423600e+02 3.029800e+02\n2 12016     -7.049100e+02 1.327500e+02\n12 12016     -7.613900e+02 3.216300e+02\n2 12017     -6.389600e+02 1.324100e+02\n10 12017     -5.626100e+02 5.807500e+02\n2 12018     -6.604100e+02 1.310400e+02\n10 12018     -5.868200e+02 5.780300e+02\n12 12018     -7.113800e+02 3.258300e+02\n2 12019     -7.182800e+02 1.299400e+02\n7 12019     -6.455700e+02 4.106600e+02\n8 12019     -5.081100e+02 8.725000e+01\n10 12019     -6.528500e+02 5.725800e+02\n11 12019     -2.326100e+02 -3.579800e+02\n12 12019     -7.753400e+02 3.162000e+02\n14 12019     -1.078800e+02 -3.527400e+02\n2 12020     -4.722000e+02 1.299200e+02\n7 12020     -4.054700e+02 4.351000e+02\n10 12020     -3.673600e+02 5.895000e+02\n12 12020     -5.006400e+02 3.503700e+02\n2 12021     -4.722000e+02 1.299200e+02\n7 12021     -4.054700e+02 4.351000e+02\n10 12021     -3.673600e+02 5.895000e+02\n12 12021     -5.006400e+02 3.503700e+02\n2 12022     7.636300e+02 1.292200e+02\n7 12022     6.616300e+02 2.604100e+02\n2 12023     -6.233900e+02 1.278400e+02\n7 12023     -5.541000e+02 4.183400e+02\n10 12023     -5.433400e+02 5.762300e+02\n2 12024     -4.991100e+02 1.281100e+02\n5 12024     1.794700e+02 -2.665500e+02\n8 12024     -3.300400e+02 8.976999e+01\n12 12024     -5.311900e+02 3.444600e+02\n2 12025     6.072800e+02 1.278900e+02\n6 12025     5.332900e+02 2.859900e+02\n8 12025     5.585699e+02 7.325000e+01\n10 12025     6.981000e+02 3.364700e+02\n12 12025     6.134100e+02 2.961100e+02\n2 12026     6.072800e+02 1.278900e+02\n6 12026     5.332900e+02 2.859900e+02\n8 12026     5.585699e+02 7.325000e+01\n12 12026     6.134100e+02 2.961100e+02\n2 12027     -5.923700e+02 1.275700e+02\n7 12027     -5.263000e+02 4.197900e+02\n13 12027     -5.937000e+01 6.133002e+01\n2 12028     -5.632700e+02 1.268600e+02\n10 12028     -4.755500e+02 5.791100e+02\n2 12029     2.848400e+02 1.269300e+02\n7 12029     6.671002e+01 2.090800e+02\n12 12029     1.447200e+02 1.963100e+02\n2 12030     -5.970100e+02 1.261000e+02\n7 12030     -5.284100e+02 4.195700e+02\n8 12030     -4.091200e+02 8.723999e+01\n12 12030     -6.402700e+02 3.291600e+02\n2 12031     3.101300e+02 1.250900e+02\n3 12031     2.049600e+02 -1.875200e+02\n7 12031     9.321002e+01 2.081300e+02\n12 12031     1.757700e+02 1.965600e+02\n13 12031     5.290300e+02 -1.521900e+02\n2 12032     5.600100e+02 1.244200e+02\n3 12032     4.215500e+02 -1.868600e+02\n6 12032     4.813500e+02 2.886500e+02\n8 12032     5.200300e+02 7.178000e+01\n15 12032     8.601400e+02 3.952200e+02\n2 12033     -6.114700e+02 1.242200e+02\n10 12033     -5.308400e+02 5.741900e+02\n2 12034     -4.782900e+02 1.238200e+02\n10 12034     -3.741900e+02 5.834800e+02\n2 12035     -6.007800e+02 1.235100e+02\n5 12035     8.191998e+01 -2.679800e+02\n7 12035     -5.314000e+02 4.170100e+02\n8 12035     -4.121800e+02 8.522000e+01\n2 12036     8.026200e+02 1.233800e+02\n7 12036     6.958600e+02 2.456500e+02\n9 12036     5.417600e+02 2.125000e+02\n12 12036     8.260100e+02 2.653600e+02\n2 12037     -7.240200e+02 1.230700e+02\n7 12037     -6.507200e+02 4.046100e+02\n12 12037     -7.812700e+02 3.093600e+02\n14 12037     -1.139600e+02 -3.583000e+02\n2 12038     -2.583600e+02 1.231800e+02\n3 12038     -3.930100e+02 -2.085800e+02\n5 12038     4.249900e+02 -2.755200e+02\n6 12038     -4.295200e+02 3.734500e+02\n9 12038     -3.650600e+02 1.715900e+02\n10 12038     -1.054100e+02 5.983800e+02\n11 12038     1.745500e+02 -3.665700e+02\n12 12038     -2.571300e+02 3.729400e+02\n14 12038     3.379200e+02 -3.596100e+02\n2 12039     -2.583600e+02 1.231800e+02\n5 12039     4.249900e+02 -2.755200e+02\n14 12039     3.379200e+02 -3.596100e+02\n2 12040     1.719400e+02 1.224000e+02\n8 12040     1.743300e+02 5.501999e+01\n9 12040     2.903003e+01 1.935800e+02\n10 12040     -3.163000e+01 2.528600e+02\n2 12041     1.719400e+02 1.224000e+02\n8 12041     1.743300e+02 5.501999e+01\n2 12042     1.545100e+02 1.221300e+02\n12 12042     1.830017e+00 1.920200e+02\n2 12043     6.973700e+02 1.221400e+02\n10 12043     7.919600e+02 2.941800e+02\n2 12044     6.973700e+02 1.221400e+02\n9 12044     4.550500e+02 2.084400e+02\n10 12044     7.919600e+02 2.941800e+02\n12 12044     7.105000e+02 2.777300e+02\n2 12045     -5.321800e+02 1.214400e+02\n12 12045     -5.674500e+02 3.339700e+02\n2 12046     2.621300e+02 1.211400e+02\n8 12046     2.490300e+02 5.301001e+01\n2 12047     2.285400e+02 1.204400e+02\n5 12047     7.567200e+02 -5.845699e+02\n6 12047     5.644000e+01 1.333700e+02\n8 12047     2.206000e+02 5.228000e+01\n2 12048     2.558800e+02 1.206800e+02\n8 12048     2.433600e+02 5.251001e+01\n2 12049     7.098999e+01 1.198400e+02\n6 12049     -1.073300e+02 1.466400e+02\n7 12049     -1.156600e+02 2.313800e+02\n10 12049     -1.103900e+02 2.846500e+02\n12 12049     -7.759003e+01 2.006500e+02\n2 12050     -3.835500e+02 1.187400e+02\n5 12050     2.934900e+02 -2.767800e+02\n2 12051     -3.835500e+02 1.187400e+02\n5 12051     2.934900e+02 -2.767800e+02\n2 12052     2.314399e+02 1.185000e+02\n8 12052     2.230100e+02 5.107001e+01\n2 12053     2.314399e+02 1.185000e+02\n5 12053     7.589301e+02 -5.872900e+02\n8 12053     2.230100e+02 5.107001e+01\n10 12053     2.401001e+01 2.334800e+02\n15 12053     1.016400e+02 2.477700e+02\n2 12054     2.245500e+02 1.169200e+02\n6 12054     5.175000e+01 1.290000e+02\n10 12054     1.598999e+01 2.334000e+02\n12 12054     7.366998e+01 1.814200e+02\n15 12054     9.232001e+01 2.473500e+02\n2 12055     -3.814800e+02 1.163800e+02\n6 12055     -5.752000e+02 3.407600e+02\n12 12055     -3.971300e+02 3.494700e+02\n2 12056     5.565900e+02 1.159400e+02\n6 12056     4.765500e+02 2.802600e+02\n2 12057     1.598500e+02 1.143800e+02\n3 12057     6.490002e+01 -2.005700e+02\n6 12057     -1.670001e+01 1.275500e+02\n12 12057     5.169983e+00 1.817900e+02\n2 12058     1.598500e+02 1.143800e+02\n3 12058     6.490002e+01 -2.005700e+02\n5 12058     6.827400e+02 -5.720400e+02\n6 12058     -1.670001e+01 1.275500e+02\n10 12058     -4.632001e+01 2.456800e+02\n12 12058     5.169983e+00 1.817900e+02\n15 12058     1.970001e+01 2.606800e+02\n2 12059     -3.931800e+02 1.142100e+02\n9 12059     -4.799200e+02 1.592300e+02\n14 12059     1.986200e+02 -3.673500e+02\n2 12060     5.538199e+02 1.139400e+02\n3 12060     4.154399e+02 -1.971500e+02\n6 12060     4.736000e+02 2.782100e+02\n9 12060     3.346000e+02 1.962200e+02\n12 12060     5.555000e+02 2.882600e+02\n13 12060     8.488000e+02 -9.160999e+01\n2 12061     6.937400e+02 1.134200e+02\n9 12061     4.521899e+02 2.008600e+02\n10 12061     7.847400e+02 2.851500e+02\n2 12062     5.421600e+02 1.132900e+02\n15 12062     8.357100e+02 3.886000e+02\n2 12063     9.704999e+01 1.115000e+02\n5 12063     6.229000e+02 -5.533000e+02\n6 12063     -8.145999e+01 1.310700e+02\n10 12063     -9.667999e+01 2.632400e+02\n15 12063     -3.859998e+01 2.803500e+02\n2 12064     -6.069700e+02 1.108500e+02\n5 12064     7.431000e+01 -2.783000e+02\n7 12064     -5.365700e+02 4.060800e+02\n10 12064     -5.243300e+02 5.619600e+02\n2 12065     -4.763500e+02 1.107100e+02\n7 12065     -4.085700e+02 4.188300e+02\n10 12065     -3.713800e+02 5.708300e+02\n12 12065     -5.037700e+02 3.312000e+02\n2 12066     1.613000e+01 1.108100e+02\n3 12066     -7.617999e+01 -2.080900e+02\n2 12067     -4.812400e+02 1.107700e+02\n10 12067     -3.770900e+02 5.705100e+02\n2 12068     2.142400e+02 1.099000e+02\n6 12068     3.994000e+01 1.194900e+02\n2 12069     -6.480000e+02 1.088800e+02\n8 12069     -4.512800e+02 7.260999e+01\n10 12069     -5.705600e+02 5.571000e+02\n2 12070     2.517600e+02 1.091600e+02\n5 12070     7.783500e+02 -6.041700e+02\n6 12070     8.025000e+01 1.192100e+02\n10 12070     3.988000e+01 2.176800e+02\n12 12070     1.018500e+02 1.712100e+02\n15 12070     1.203500e+02 2.292300e+02\n2 12071     6.231899e+02 1.087900e+02\n10 12071     7.104900e+02 3.093300e+02\n2 12072     -5.900700e+02 1.078200e+02\n7 12072     -5.202200e+02 4.043000e+02\n10 12072     -5.045700e+02 5.596400e+02\n2 12073     2.361600e+02 1.071800e+02\n6 12073     6.294000e+01 1.164200e+02\n7 12073     1.116998e+01 1.881400e+02\n8 12073     2.266800e+02 4.114999e+01\n12 12073     8.416998e+01 1.687500e+02\n2 12074     -6.147300e+02 1.068100e+02\n10 12074     -5.328600e+02 5.572600e+02\n2 12075     -6.147300e+02 1.068100e+02\n12 12075     -6.579700e+02 3.082900e+02\n2 12076     2.437100e+02 1.054700e+02\n13 12076     4.646400e+02 -1.665900e+02\n2 12077     -3.714700e+02 1.050000e+02\n6 12077     -5.626000e+02 3.301600e+02\n2 12078     9.835999e+01 1.048500e+02\n6 12078     -8.031000e+01 1.219900e+02\n10 12078     -9.907001e+01 2.538700e+02\n15 12078     -4.146002e+01 2.691600e+02\n2 12079     4.910500e+02 1.047500e+02\n6 12079     4.040700e+02 2.773000e+02\n10 12079     5.773101e+02 3.573600e+02\n12 12079     4.895601e+02 2.866700e+02\n2 12080     5.083101e+02 1.045900e+02\n3 12080     3.720100e+02 -2.085500e+02\n6 12080     4.233900e+02 2.739300e+02\n8 12080     4.767600e+02 5.709000e+01\n9 12080     2.965000e+02 1.867800e+02\n12 12080     5.078000e+02 2.837500e+02\n15 12080     7.940900e+02 3.923400e+02\n2 12081     7.088300e+02 1.045800e+02\n10 12081     7.986801e+02 2.699500e+02\n12 12081     7.218300e+02 2.571400e+02\n2 12082     7.088300e+02 1.045800e+02\n10 12082     7.986801e+02 2.699500e+02\n12 12082     7.218300e+02 2.571400e+02\n2 12083     3.406300e+02 1.041200e+02\n4 12083     -2.744500e+02 -5.830000e+02\n7 12083     1.180700e+02 1.851300e+02\n13 12083     5.510100e+02 -1.722700e+02\n15 12083     2.497300e+02 2.180300e+02\n2 12084     3.662000e+01 1.036600e+02\n5 12084     5.683800e+02 -5.387500e+02\n6 12084     -1.429700e+02 1.315800e+02\n2 12085     5.340601e+02 1.029500e+02\n6 12085     4.511801e+02 2.694200e+02\n2 12086     4.985400e+02 1.015600e+02\n6 12086     4.123100e+02 2.729200e+02\n8 12086     4.683800e+02 5.512000e+01\n9 12086     2.879500e+02 1.839400e+02\n10 12086     5.840500e+02 3.509700e+02\n12 12086     4.973199e+02 2.825100e+02\n2 12087     6.092700e+02 1.014500e+02\n6 12087     5.340000e+02 2.575700e+02\n8 12087     5.599700e+02 5.148999e+01\n9 12087     3.819900e+02 1.878500e+02\n10 12087     6.939399e+02 3.073400e+02\n12 12087     6.143600e+02 2.676000e+02\n2 12088     6.092700e+02 1.014500e+02\n8 12088     5.599700e+02 5.148999e+01\n9 12088     3.819900e+02 1.878500e+02\n10 12088     6.939399e+02 3.073400e+02\n12 12088     6.143600e+02 2.676000e+02\n2 12089     7.168199e+02 1.016000e+02\n9 12089     4.712000e+02 1.916600e+02\n2 12090     -5.874400e+02 1.011100e+02\n10 12090     -5.010500e+02 5.530900e+02\n12 12090     -6.270900e+02 3.057700e+02\n2 12091     2.007600e+02 1.007200e+02\n13 12091     4.295400e+02 -1.653600e+02\n2 12092     5.566600e+02 1.006300e+02\n3 12092     4.189500e+02 -2.097500e+02\n6 12092     4.761500e+02 2.639300e+02\n7 12092     4.761801e+02 2.850900e+02\n8 12092     5.160900e+02 5.257999e+01\n9 12092     3.373400e+02 1.854400e+02\n13 12092     8.499399e+02 -1.030500e+02\n2 12093     6.133700e+02 1.003300e+02\n6 12093     5.384800e+02 2.558100e+02\n10 12093     6.984399e+02 3.041600e+02\n12 12093     6.173101e+02 2.658000e+02\n2 12094     6.133700e+02 1.003300e+02\n6 12094     5.384800e+02 2.558100e+02\n10 12094     6.984399e+02 3.041600e+02\n2 12095     -6.513400e+02 9.965002e+01\n7 12095     -5.784300e+02 3.922400e+02\n10 12095     -5.736600e+02 5.482300e+02\n2 12096     -6.560300e+02 9.907001e+01\n10 12096     -5.793100e+02 5.474700e+02\n2 12097     -8.365997e+01 9.910999e+01\n7 12097     -3.310999e+01 4.199400e+02\n2 12098     4.593700e+02 9.883002e+01\n15 12098     7.361100e+02 4.066800e+02\n2 12099     6.236400e+02 9.884003e+01\n9 12099     3.948000e+02 1.864000e+02\n10 12099     7.092500e+02 2.983800e+02\n2 12100     8.641998e+01 9.679999e+01\n10 12100     -1.118900e+02 2.479200e+02\n2 12101     9.128998e+01 9.662000e+01\n5 12101     6.125000e+02 -5.693101e+02\n6 12101     -8.832999e+01 1.120500e+02\n8 12101     1.092300e+02 3.553000e+01\n10 12101     -1.088200e+02 2.456800e+02\n12 12101     -6.465002e+01 1.669200e+02\n15 12101     -5.285999e+01 2.593800e+02\n2 12102     2.823999e+01 9.609998e+01\n5 12102     5.588000e+02 -5.441400e+02\n6 12102     -1.517300e+02 1.233700e+02\n2 12103     1.006100e+02 9.240002e+01\n6 12103     -7.869000e+01 1.054800e+02\n2 12104     2.569301e+02 9.133002e+01\n6 12104     8.422998e+01 9.702002e+01\n10 12104     3.690997e+01 1.942900e+02\n12 12104     1.041000e+02 1.487600e+02\n2 12105     5.382000e+02 9.165002e+01\n6 12105     4.558300e+02 2.568000e+02\n2 12106     7.283000e+02 9.131000e+01\n10 12106     8.160900e+02 2.477200e+02\n12 12106     7.415500e+02 2.390000e+02\n2 12107     4.490002e+01 9.079999e+01\n6 12107     -1.358900e+02 1.127500e+02\n2 12108     -4.234500e+02 8.989001e+01\n12 12108     -4.424800e+02 3.175400e+02\n2 12109     -3.839100e+02 8.917999e+01\n6 12109     -5.761100e+02 3.104100e+02\n12 12109     -3.979900e+02 3.221100e+02\n2 12110     7.006300e+02 8.858002e+01\n10 12110     7.864100e+02 2.560500e+02\n2 12111     2.272500e+02 8.688000e+01\n6 12111     5.215997e+01 9.067999e+01\n8 12111     2.180900e+02 2.401999e+01\n12 12111     7.053003e+01 1.435300e+02\n2 12112     2.188000e+02 8.629999e+01\n6 12112     4.307001e+01 9.037000e+01\n10 12112     -4.809998e+00 1.962500e+02\n12 12112     6.103998e+01 1.434200e+02\n15 12112     6.802002e+01 2.033000e+02\n2 12113     -4.271200e+02 8.557001e+01\n7 12113     -3.580000e+02 4.024500e+02\n14 12113     1.620400e+02 -3.929600e+02\n2 12114     2.455500e+02 8.566998e+01\n8 12114     2.330000e+02 2.260001e+01\n10 12114     2.222998e+01 1.895100e+02\n12 12114     9.019000e+01 1.418600e+02\n15 12114     9.938000e+01 1.960100e+02\n2 12115     3.599100e+02 8.559998e+01\n8 12115     3.302700e+02 2.307999e+01\n2 12116     6.160800e+02 8.559003e+01\n12 12116     6.211500e+02 2.491600e+02\n2 12117     5.964100e+02 8.471002e+01\n6 12117     5.192800e+02 2.423400e+02\n12 12117     5.997200e+02 2.528200e+02\n2 12118     5.964100e+02 8.471002e+01\n6 12118     5.192800e+02 2.423400e+02\n12 12118     5.997200e+02 2.528200e+02\n2 12119     -6.495300e+02 8.459003e+01\n7 12119     -5.753800e+02 3.800900e+02\n10 12119     -5.708000e+02 5.334000e+02\n12 12119     -6.943100e+02 2.809500e+02\n15 12119     -5.737300e+02 5.810900e+02\n2 12120     -6.222100e+02 8.456000e+01\n10 12120     -5.397800e+02 5.344900e+02\n12 12120     -6.640300e+02 2.846000e+02\n2 12121     6.716500e+02 8.409003e+01\n10 12121     7.544600e+02 2.637500e+02\n12 12121     6.800601e+02 2.399500e+02\n2 12122     6.716500e+02 8.409003e+01\n10 12122     7.544600e+02 2.637500e+02\n12 12122     6.800601e+02 2.399500e+02\n2 12123     4.868300e+02 8.319000e+01\n6 12123     3.992900e+02 2.548600e+02\n7 12123     4.154800e+02 2.857300e+02\n10 12123     5.699600e+02 3.357800e+02\n15 12123     7.654900e+02 3.746200e+02\n2 12124     1.906500e+02 8.262000e+01\n5 12124     7.032000e+02 -6.194399e+02\n6 12124     1.322998e+01 8.569000e+01\n10 12124     -3.406000e+01 1.968800e+02\n15 12124     3.406000e+01 2.042300e+02\n2 12125     1.906500e+02 8.262000e+01\n6 12125     1.322998e+01 8.569000e+01\n2 12126     4.525200e+02 8.253003e+01\n6 12126     3.612300e+02 2.583000e+02\n12 12126     4.490699e+02 2.681400e+02\n15 12126     7.251500e+02 3.882400e+02\n2 12127     4.768300e+02 8.246997e+01\n3 12127     3.421700e+02 -2.306100e+02\n6 12127     3.884500e+02 2.548600e+02\n9 12127     2.700100e+02 1.669300e+02\n15 12127     7.533101e+02 3.784700e+02\n2 12128     1.702500e+02 8.083002e+01\n5 12128     6.822900e+02 -6.149399e+02\n6 12128     -8.030029e+00 8.465002e+01\n10 12128     -5.260999e+01 2.009000e+02\n12 12128     9.340027e+00 1.389200e+02\n15 12128     1.215997e+01 2.082600e+02\n2 12129     3.467500e+02 8.031000e+01\n3 12129     2.422900e+02 -2.286700e+02\n6 12129     1.834300e+02 9.428003e+01\n8 12129     3.189000e+02 1.845999e+01\n12 12129     2.095200e+02 1.413300e+02\n13 12129     5.493700e+02 -1.958800e+02\n2 12130     4.497500e+02 8.066998e+01\n6 12130     3.584800e+02 2.573400e+02\n15 12130     7.219399e+02 3.878900e+02\n2 12131     6.390100e+02 7.996002e+01\n8 12131     5.846200e+02 3.257999e+01\n2 12132     6.550699e+02 7.967999e+01\n3 12132     5.159500e+02 -2.263800e+02\n6 12132     5.833199e+02 2.285500e+02\n10 12132     7.367500e+02 2.648900e+02\n12 12132     6.619900e+02 2.385000e+02\n2 12133     6.123800e+02 7.773999e+01\n8 12133     5.620800e+02 3.206000e+01\n12 12133     6.161400e+02 2.418800e+02\n2 12134     -5.733600e+02 7.651001e+01\n10 12134     -4.827700e+02 5.308700e+02\n12 12134     -6.085300e+02 2.839800e+02\n2 12135     -4.709900e+02 7.663000e+01\n14 12135     1.181200e+02 -4.001800e+02\n2 12136     6.724100e+02 7.632001e+01\n3 12136     5.328600e+02 -2.290200e+02\n7 12136     5.737800e+02 2.352700e+02\n2 12137     -4.155100e+02 7.583002e+01\n7 12137     -3.451900e+02 3.955800e+02\n9 12137     -4.971100e+02 1.241200e+02\n14 12137     1.732900e+02 -4.015000e+02\n2 12138     -4.155100e+02 7.583002e+01\n14 12138     1.732900e+02 -4.015000e+02\n2 12139     2.723199e+02 7.584003e+01\n10 12139     4.654999e+01 1.734000e+02\n2 12140     -5.269100e+02 7.482001e+01\n7 12140     -4.538900e+02 3.853200e+02\n2 12141     6.260601e+02 7.508002e+01\n6 12141     5.510300e+02 2.269200e+02\n9 12141     3.960500e+02 1.662500e+02\n2 12142     6.600200e+02 7.479999e+01\n7 12142     5.625400e+02 2.366400e+02\n2 12143     6.509700e+02 7.276001e+01\n10 12143     7.306400e+02 2.587900e+02\n2 12144     6.850400e+02 7.241998e+01\n9 12144     4.461700e+02 1.663800e+02\n10 12144     7.659000e+02 2.455100e+02\n2 12145     -6.845900e+02 7.203998e+01\n15 12145     -6.167200e+02 5.637700e+02\n2 12146     4.903998e+01 7.210999e+01\n5 12146     5.684600e+02 -5.805699e+02\n6 12146     -1.319300e+02 8.853998e+01\n10 12146     -1.476500e+02 2.324600e+02\n12 12146     -1.068500e+02 1.440400e+02\n15 12146     -9.739001e+01 2.434200e+02\n2 12147     -6.639900e+02 7.140002e+01\n5 12147     1.796002e+01 -3.097000e+02\n2 12148     6.483900e+02 7.100000e+01\n3 12148     5.097300e+02 -2.347400e+02\n6 12148     5.757700e+02 2.197400e+02\n10 12148     7.277900e+02 2.588800e+02\n2 12149     -6.381900e+02 7.012000e+01\n7 12149     -5.639300e+02 3.688500e+02\n11 12149     -1.720200e+02 -4.008100e+02\n2 12150     4.959100e+02 6.902002e+01\n10 12150     5.763700e+02 3.175400e+02\n15 12150     7.733101e+02 3.534400e+02\n2 12151     4.959100e+02 6.902002e+01\n10 12151     5.763700e+02 3.175400e+02\n15 12151     7.733101e+02 3.534400e+02\n2 12152     -6.108800e+02 6.821997e+01\n10 12152     -5.250100e+02 5.192900e+02\n2 12153     5.212500e+02 6.848999e+01\n10 12153     6.005699e+02 3.077500e+02\n15 12153     8.022000e+02 3.420400e+02\n2 12154     2.248600e+02 6.672998e+01\n15 12154     6.591998e+01 1.743000e+02\n2 12155     3.981100e+02 6.659998e+01\n8 12155     3.625900e+02 8.549988e+00\n2 12156     2.822900e+02 6.582001e+01\n10 12156     5.314001e+01 1.599200e+02\n2 12157     5.019800e+02 6.516998e+01\n6 12157     4.151200e+02 2.338900e+02\n8 12157     4.715400e+02 2.547000e+01\n12 12157     5.000300e+02 2.442600e+02\n2 12158     -6.033600e+02 6.440997e+01\n12 12158     -6.405400e+02 2.678700e+02\n2 12159     -6.033600e+02 6.440997e+01\n10 12159     -5.157700e+02 5.176000e+02\n11 12159     -1.417300e+02 -4.056700e+02\n15 12159     -5.103000e+02 5.638700e+02\n2 12160     4.676000e+02 6.396002e+01\n15 12160     7.392300e+02 3.595000e+02\n2 12161     2.225200e+02 6.359998e+01\n7 12161     -1.301001e+01 1.432700e+02\n9 12161     7.488000e+01 1.464400e+02\n2 12162     -6.484400e+02 6.338000e+01\n11 12162     -1.797500e+02 -4.047300e+02\n2 12163     -4.272200e+02 6.190002e+01\n15 12163     -2.725300e+02 5.787500e+02\n2 12164     -1.091600e+02 6.227002e+01\n13 12164     3.132300e+02 -2.001953e-02\n2 12165     -1.091600e+02 6.227002e+01\n13 12165     3.132300e+02 -2.001953e-02\n14 12165     4.666801e+02 -4.542000e+02\n2 12166     2.199301e+02 6.179999e+01\n4 12166     -2.701700e+02 -4.691400e+02\n2 12167     5.969000e+02 6.182001e+01\n10 12167     6.735800e+02 2.706700e+02\n2 12168     -5.620000e+02 6.073999e+01\n5 12168     1.113100e+02 -3.236700e+02\n2 12169     -5.620000e+02 6.073999e+01\n5 12169     1.113100e+02 -3.236700e+02\n2 12170     -4.070300e+02 5.982001e+01\n11 12170     3.090002e+01 -4.127200e+02\n2 12171     -1.262500e+02 5.976001e+01\n6 12171     -2.770700e+02 2.873300e+02\n2 12172     3.069100e+02 5.871997e+01\n15 12172     1.685000e+02 1.492900e+02\n2 12173     3.069100e+02 5.871997e+01\n15 12173     1.685000e+02 1.492900e+02\n2 12174     6.971200e+02 5.756000e+01\n9 12174     4.557800e+02 1.542200e+02\n2 12175     1.012400e+02 5.475000e+01\n3 12175     1.160999e+01 -2.587400e+02\n5 12175     6.092300e+02 -6.199399e+02\n6 12175     -7.995001e+01 6.009003e+01\n10 12175     -1.173600e+02 1.928800e+02\n12 12175     -6.138000e+01 1.157600e+02\n15 12175     -6.239001e+01 1.975100e+02\n2 12176     3.592999e+01 5.387000e+01\n6 12176     -1.459200e+02 6.900000e+01\n2 12177     -6.014100e+02 5.221002e+01\n7 12177     -5.263400e+02 3.582500e+02\n2 12178     -6.014100e+02 5.221002e+01\n7 12178     -5.263400e+02 3.582500e+02\n2 12179     4.844900e+02 5.197998e+01\n6 12179     3.953400e+02 2.227800e+02\n8 12179     4.560300e+02 1.592999e+01\n12 12179     4.808300e+02 2.331000e+02\n15 12179     7.570601e+02 3.371700e+02\n2 12180     -5.957600e+02 5.187000e+01\n15 12180     -4.992100e+02 5.513100e+02\n2 12181     1.602900e+02 5.148999e+01\n6 12181     -1.991998e+01 5.067999e+01\n12 12181     -4.440002e+00 1.050300e+02\n15 12181     -1.001001e+01 1.712300e+02\n2 12182     4.821899e+02 4.934003e+01\n3 12182     3.482900e+02 -2.624700e+02\n6 12182     3.933200e+02 2.199300e+02\n9 12182     2.758300e+02 1.395600e+02\n15 12182     7.541700e+02 3.352800e+02\n2 12183     6.242800e+02 4.957001e+01\n6 12183     5.480400e+02 2.008800e+02\n9 12183     3.952600e+02 1.450100e+02\n2 12184     5.299600e+02 4.894000e+01\n6 12184     4.450800e+02 2.133400e+02\n2 12185     1.392300e+02 4.878998e+01\n6 12185     -4.139001e+01 4.916998e+01\n10 12185     -8.946002e+01 1.732900e+02\n15 12185     -3.038000e+01 1.749100e+02\n2 12186     6.602900e+02 4.778003e+01\n9 12186     4.256100e+02 1.443500e+02\n10 12186     7.344200e+02 2.292500e+02\n12 12186     6.659900e+02 2.020600e+02\n2 12187     1.454200e+02 4.590997e+01\n3 12187     5.552002e+01 -2.659400e+02\n6 12187     -3.532001e+01 4.528998e+01\n7 12187     -8.025000e+01 1.372600e+02\n12 12187     -1.959003e+01 1.004900e+02\n15 12187     -2.533002e+01 1.694700e+02\n2 12188     1.454200e+02 4.590997e+01\n12 12188     -1.959003e+01 1.004900e+02\n15 12188     -2.533002e+01 1.694700e+02\n2 12189     1.908900e+02 4.600000e+01\n6 12189     1.178998e+01 4.277002e+01\n10 12189     -4.571997e+01 1.558000e+02\n2 12190     -5.834800e+02 4.506000e+01\n7 12190     -5.081800e+02 3.541500e+02\n15 12190     -4.820900e+02 5.447500e+02\n2 12191     -1.473999e+01 4.485999e+01\n3 12191     -1.040000e+02 -2.717300e+02\n2 12192     9.570001e+01 4.444000e+01\n6 12192     -8.610999e+01 4.846002e+01\n2 12193     9.570001e+01 4.444000e+01\n6 12193     -8.610999e+01 4.846002e+01\n10 12193     -1.248600e+02 1.827700e+02\n2 12194     2.715200e+02 4.440002e+01\n15 12194     1.139600e+02 1.350000e+02\n2 12195     6.473101e+02 4.398999e+01\n6 12195     5.731700e+02 1.919600e+02\n8 12195     5.901899e+02 3.420013e+00\n10 12195     7.205000e+02 2.317400e+02\n12 12195     6.520500e+02 2.013900e+02\n2 12196     1.743400e+02 4.329999e+01\n6 12196     -5.239990e+00 4.044000e+01\n10 12196     -6.117999e+01 1.571800e+02\n15 12196     2.409973e+00 1.565800e+02\n2 12197     6.081000e+01 4.319000e+01\n8 12197     8.302002e+01 -8.010010e+00\n2 12198     6.081000e+01 4.319000e+01\n8 12198     8.302002e+01 -8.010010e+00\n2 12199     5.815997e+01 4.188000e+01\n5 12199     5.675400e+02 -6.175699e+02\n6 12199     -1.241800e+02 5.097998e+01\n2 12200     2.746899e+02 4.213000e+01\n9 12200     1.188500e+02 1.306300e+02\n15 12200     1.169500e+02 1.310300e+02\n2 12201     6.543600e+02 4.153003e+01\n6 12201     5.811500e+02 1.879500e+02\n9 12201     4.207100e+02 1.394500e+02\n12 12201     6.595300e+02 1.974800e+02\n2 12202     6.543600e+02 4.153003e+01\n6 12202     5.811500e+02 1.879500e+02\n9 12202     4.207100e+02 1.394500e+02\n12 12202     6.595300e+02 1.974800e+02\n2 12203     1.489100e+02 3.992999e+01\n6 12203     -3.204999e+01 3.782001e+01\n15 12203     -2.456000e+01 1.596500e+02\n2 12204     3.906600e+02 4.014001e+01\n3 12204     2.847600e+02 -2.657400e+02\n6 12204     2.296700e+02 5.540002e+01\n12 12204     2.583000e+02 9.858002e+01\n2 12205     2.109399e+02 3.965002e+01\n15 12205     4.052002e+01 1.415100e+02\n2 12206     2.109399e+02 3.965002e+01\n15 12206     4.052002e+01 1.415100e+02\n2 12207     2.198700e+02 3.910999e+01\n6 12207     4.238000e+01 3.434998e+01\n10 12207     -2.015002e+01 1.410400e+02\n12 12207     5.660999e+01 8.712000e+01\n15 12207     5.027002e+01 1.384100e+02\n2 12208     2.633600e+02 3.728003e+01\n4 12208     -2.979800e+02 -4.924700e+02\n10 12208     2.325000e+01 1.307600e+02\n15 12208     1.010900e+02 1.266300e+02\n2 12209     2.378600e+02 3.671002e+01\n7 12209     -4.599976e+00 1.154700e+02\n10 12209     -3.270020e+00 1.349800e+02\n2 12210     5.226000e+02 3.677002e+01\n6 12210     4.365400e+02 2.015900e+02\n10 12210     5.963101e+02 2.743500e+02\n15 12210     7.976400e+02 3.019300e+02\n2 12211     7.884998e+01 3.513000e+01\n6 12211     -1.032500e+02 4.031000e+01\n2 12212     1.469400e+02 3.427002e+01\n6 12212     -3.396002e+01 3.214001e+01\n10 12212     -8.746002e+01 1.550400e+02\n12 12212     -1.929999e+01 8.684003e+01\n15 12212     -2.760999e+01 1.535800e+02\n2 12213     1.469400e+02 3.427002e+01\n6 12213     -3.396002e+01 3.214001e+01\n8 12213     1.501300e+02 -1.832999e+01\n10 12213     -8.746002e+01 1.550400e+02\n12 12213     -1.929999e+01 8.684003e+01\n15 12213     -2.760999e+01 1.535800e+02\n2 12214     1.469400e+02 3.427002e+01\n10 12214     -8.746002e+01 1.550400e+02\n2 12215     5.067900e+02 3.331000e+01\n6 12215     4.188000e+02 2.002800e+02\n7 12215     4.273900e+02 2.376700e+02\n2 12216     2.940200e+02 3.215002e+01\n15 12216     1.381900e+02 1.153700e+02\n2 12217     6.565500e+02 3.214001e+01\n3 12217     5.200300e+02 -2.714200e+02\n7 12217     5.545900e+02 2.008400e+02\n8 12217     5.987800e+02 -6.309998e+00\n10 12217     7.273000e+02 2.155500e+02\n2 12218     6.528500e+02 3.153003e+01\n3 12218     5.163300e+02 -2.727800e+02\n6 12218     5.784700e+02 1.782500e+02\n7 12218     5.512900e+02 2.009200e+02\n9 12218     4.197300e+02 1.312000e+02\n10 12218     7.233300e+02 2.165100e+02\n12 12218     6.569399e+02 1.878000e+02\n2 12219     6.965300e+02 3.059998e+01\n9 12219     4.563000e+02 1.318300e+02\n12 12219     7.040200e+02 1.800500e+02\n2 12220     6.965300e+02 3.059998e+01\n9 12220     4.563000e+02 1.318300e+02\n2 12221     3.941400e+02 3.007001e+01\n3 12221     2.889700e+02 -2.751800e+02\n2 12222     3.941400e+02 3.007001e+01\n3 12222     2.889700e+02 -2.751800e+02\n2 12223     3.985699e+02 2.896002e+01\n3 12223     2.928800e+02 -2.765400e+02\n6 12223     2.379200e+02 4.444000e+01\n2 12224     5.198700e+02 2.870001e+01\n6 12224     4.335699e+02 1.932500e+02\n10 12224     5.919000e+02 2.672500e+02\n12 12224     5.174399e+02 2.032400e+02\n2 12225     6.774900e+02 2.720001e+01\n3 12225     5.396600e+02 -2.754400e+02\n7 12225     5.715400e+02 1.913400e+02\n9 12225     4.402600e+02 1.286800e+02\n2 12226     8.130601e+02 2.710999e+01\n7 12226     6.901700e+02 1.557500e+02\n2 12227     1.510200e+02 2.671997e+01\n6 12227     -3.009003e+01 2.397998e+01\n2 12228     5.245200e+02 2.633002e+01\n6 12228     4.383800e+02 1.901400e+02\n12 12228     5.220400e+02 2.002500e+02\n2 12229     -3.797300e+02 2.540997e+01\n7 12229     -3.175200e+02 3.479300e+02\n10 12229     -2.674200e+02 4.826100e+02\n11 12229     4.159998e+01 -4.469300e+02\n14 12229     1.984100e+02 -4.559900e+02\n2 12230     -1.027500e+02 2.570001e+01\n3 12230     -2.018400e+02 -2.952400e+02\n2 12231     4.015400e+02 2.560999e+01\n13 12231     5.910100e+02 -2.434300e+02\n2 12232     6.836200e+02 2.548999e+01\n7 12232     5.776500e+02 1.879300e+02\n2 12233     2.570900e+02 2.515002e+01\n6 12233     8.087000e+01 1.948999e+01\n10 12233     1.290002e+01 1.186500e+02\n2 12234     1.912600e+02 2.434003e+01\n6 12234     1.152002e+01 1.901001e+01\n10 12234     -5.104999e+01 1.321200e+02\n15 12234     1.416998e+01 1.274600e+02\n2 12235     7.129399e+02 2.439001e+01\n3 12235     5.753700e+02 -2.760000e+02\n9 12235     4.701500e+02 1.276800e+02\n10 12235     7.844700e+02 1.853400e+02\n2 12236     -6.352400e+02 2.394000e+01\n7 12236     -5.561300e+02 3.321000e+02\n8 12236     -4.396000e+02 6.859985e+00\n2 12237     5.968700e+02 2.323999e+01\n6 12237     5.174900e+02 1.776600e+02\n8 12237     5.491100e+02 -1.123001e+01\n9 12237     3.735000e+02 1.224700e+02\n10 12237     6.661000e+02 2.307700e+02\n12 12237     5.980200e+02 1.872500e+02\n15 12237     8.818000e+02 2.510600e+02\n2 12238     -6.660999e+01 2.131000e+01\n5 12238     4.737500e+02 -5.701899e+02\n6 12238     -2.452600e+02 7.098999e+01\n10 12238     -2.039700e+02 2.477100e+02\n12 12238     -1.968400e+02 1.234100e+02\n15 12238     -1.588900e+02 2.592700e+02\n2 12239     1.456300e+02 2.116998e+01\n3 12239     5.671002e+01 -2.896800e+02\n6 12239     -3.532001e+01 1.753003e+01\n8 12239     1.492500e+02 -2.938000e+01\n10 12239     -9.153003e+01 1.414800e+02\n15 12239     -3.245001e+01 1.378700e+02\n2 12240     1.860200e+02 2.046997e+01\n6 12240     5.700012e+00 1.473999e+01\n12 12240     1.882001e+01 6.825000e+01\n15 12240     7.580017e+00 1.241000e+02\n2 12241     -4.778600e+02 1.992999e+01\n15 12241     -3.395600e+02 5.275300e+02\n2 12242     8.284003e+01 1.928003e+01\n6 12242     -9.920001e+01 2.192999e+01\n8 12242     9.896002e+01 -2.897000e+01\n15 12242     -8.850000e+01 1.592500e+02\n2 12243     1.793500e+02 1.841998e+01\n3 12243     8.952002e+01 -2.910000e+02\n15 12243     -1.300049e-01 1.237800e+02\n2 12244     4.014800e+02 1.841998e+01\n10 12244     1.939900e+02 1.031200e+02\n15 12244     3.042800e+02 9.603000e+01\n2 12245     2.773900e+02 1.833002e+01\n6 12245     1.020900e+02 1.262000e+01\n15 12245     1.125200e+02 9.942999e+01\n2 12246     -1.309200e+02 1.684003e+01\n5 12246     4.284500e+02 -5.390900e+02\n6 12246     -3.097200e+02 8.884998e+01\n10 12246     -2.261900e+02 2.835500e+02\n2 12247     -7.846997e+01 1.671002e+01\n6 12247     -2.587700e+02 6.233002e+01\n10 12247     -2.197200e+02 2.410400e+02\n12 12247     -2.115400e+02 1.155800e+02\n15 12247     -1.779700e+02 2.512000e+02\n2 12248     1.749500e+02 1.671002e+01\n12 12248     7.169983e+00 6.472998e+01\n15 12248     -4.890015e+00 1.228700e+02\n2 12249     7.466500e+02 1.577002e+01\n3 12249     6.084301e+02 -2.840100e+02\n7 12249     6.308199e+02 1.636600e+02\n9 12249     4.981400e+02 1.215900e+02\n2 12250     1.714800e+02 1.565002e+01\n3 12250     8.196997e+01 -2.939000e+02\n6 12250     -9.099976e+00 1.042999e+01\n10 12250     -7.084998e+01 1.285300e+02\n12 12250     3.700012e+00 6.421002e+01\n15 12250     -8.530029e+00 1.227800e+02\n2 12251     1.516500e+02 1.496997e+01\n7 12251     -8.002002e+01 1.073300e+02\n10 12251     -8.782001e+01 1.333800e+02\n15 12251     -2.788000e+01 1.290400e+02\n2 12252     6.908300e+02 1.440997e+01\n3 12252     5.546801e+02 -2.876600e+02\n9 12252     4.522200e+02 1.180100e+02\n12 12252     6.968500e+02 1.643400e+02\n2 12253     6.908300e+02 1.440997e+01\n3 12253     5.546801e+02 -2.876600e+02\n9 12253     4.522200e+02 1.180100e+02\n12 12253     6.968500e+02 1.643400e+02\n2 12254     7.445601e+02 1.420001e+01\n10 12254     8.142200e+02 1.593800e+02\n2 12255     2.255100e+02 1.201001e+01\n9 12255     8.001001e+01 1.034400e+02\n15 12255     4.820001e+01 1.030100e+02\n2 12256     3.533000e+02 1.220001e+01\n10 12256     1.220800e+02 9.425000e+01\n2 12257     6.324700e+02 1.108002e+01\n6 12257     5.546300e+02 1.595600e+02\n10 12257     6.989900e+02 2.037000e+02\n2 12258     1.635800e+02 1.071002e+01\n15 12258     -1.787000e+01 1.190800e+02\n2 12259     6.621100e+02 1.026001e+01\n3 12259     5.267200e+02 -2.932500e+02\n10 12259     7.285601e+02 1.911000e+02\n2 12260     3.445500e+02 7.729980e+00\n6 12260     1.743500e+02 8.150024e+00\n10 12260     1.081500e+02 8.860999e+01\n15 12260     2.018900e+02 7.787000e+01\n2 12261     3.445500e+02 7.729980e+00\n6 12261     1.743500e+02 8.150024e+00\n10 12261     1.081500e+02 8.860999e+01\n15 12261     2.018900e+02 7.787000e+01\n2 12262     2.372200e+02 6.330017e+00\n10 12262     -1.244000e+01 1.027800e+02\n2 12263     5.618700e+02 6.510010e+00\n6 12263     4.783900e+02 1.651200e+02\n2 12264     1.694400e+02 6.150024e+00\n3 12264     8.040997e+01 -3.032300e+02\n8 12264     1.679900e+02 -4.257001e+01\n9 12264     3.356000e+01 9.662000e+01\n10 12264     -7.454999e+01 1.189700e+02\n12 12264     8.400269e-01 5.342999e+01\n15 12264     -1.310999e+01 1.117800e+02\n2 12265     2.741600e+02 5.219971e+00\n10 12265     2.559998e+01 9.496002e+01\n2 12266     -6.278003e+01 5.179993e+00\n5 12266     4.684500e+02 -5.954900e+02\n6 12266     -2.423000e+02 4.354999e+01\n12 12266     -2.002400e+02 9.814001e+01\n2 12267     2.815800e+02 5.080017e+00\n10 12267     3.335999e+01 9.359003e+01\n15 12267     1.134700e+02 8.316000e+01\n2 12268     2.006300e+02 4.200012e+00\n3 12268     1.101300e+02 -3.039100e+02\n10 12268     -4.817999e+01 1.087500e+02\n15 12268     1.809003e+01 1.001700e+02\n2 12269     3.908800e+02 3.260010e+00\n7 12269     1.457300e+02 8.217001e+01\n2 12270     5.866899e+02 3.739990e+00\n3 12270     4.535200e+02 -3.033700e+02\n6 12270     5.054200e+02 1.582700e+02\n7 12270     4.918400e+02 1.922900e+02\n8 12270     5.401700e+02 -2.725000e+01\n2 12271     2.992600e+02 3.000000e+00\n10 12271     5.219000e+01 8.859003e+01\n2 12272     -4.824700e+02 1.429993e+00\n10 12272     -3.761400e+02 4.630700e+02\n13 12272     2.148999e+01 -2.301001e+01\n14 12272     9.946997e+01 -4.677500e+02\n2 12273     2.534100e+02 -1.099854e-01\n15 12273     7.703998e+01 8.157999e+01\n2 12274     6.838900e+02 3.002930e-02\n3 12274     5.489301e+02 -3.019400e+02\n9 12274     4.467700e+02 1.062100e+02\n12 12274     6.888900e+02 1.498100e+02\n2 12275     2.748400e+02 -2.899780e-01\n15 12275     1.035600e+02 7.715002e+01\n2 12276     6.060699e+02 -3.599854e-01\n8 12276     5.563000e+02 -3.160001e+01\n10 12276     6.699600e+02 2.028300e+02\n2 12277     -7.297998e+01 -9.899902e-01\n5 12277     4.552900e+02 -6.004800e+02\n6 12277     -2.543400e+02 3.454999e+01\n7 12277     -2.257600e+02 1.542500e+02\n12 12277     -2.135700e+02 9.032001e+01\n15 12277     -1.913000e+02 2.176500e+02\n2 12278     2.048800e+02 -1.409973e+00\n3 12278     1.146100e+02 -3.095300e+02\n10 12278     -4.540002e+01 1.018800e+02\n2 12279     6.332500e+02 -1.549988e+00\n3 12279     4.993700e+02 -3.057400e+02\n6 12279     5.560500e+02 1.459900e+02\n9 12279     4.044600e+02 1.025000e+02\n12 12279     6.350800e+02 1.555200e+02\n2 12280     6.878600e+02 -2.549988e+00\n9 12280     4.499800e+02 1.035900e+02\n12 12280     6.928600e+02 1.466600e+02\n2 12281     6.519800e+02 -3.909973e+00\n6 12281     5.763500e+02 1.411100e+02\n2 12282     7.501700e+02 -3.989990e+00\n7 12282     6.313900e+02 1.452300e+02\n10 12282     8.154100e+02 1.394800e+02\n2 12283     3.725200e+02 -4.609985e+00\n6 12283     2.049100e+02 2.700195e-01\n7 12283     1.230100e+02 7.367999e+01\n8 12283     3.364200e+02 -5.203000e+01\n12 12283     2.273300e+02 4.429999e+01\n2 12284     3.078900e+02 -5.020020e+00\n6 12284     1.336800e+02 -1.000000e+01\n2 12285     6.697100e+02 -5.650024e+00\n3 12285     5.352200e+02 -3.082700e+02\n10 12285     7.325601e+02 1.709500e+02\n12 12285     6.733400e+02 1.462200e+02\n2 12286     5.933600e+02 -5.729980e+00\n3 12286     4.606500e+02 -3.118600e+02\n6 12286     5.123199e+02 1.473200e+02\n15 12286     8.713900e+02 2.177900e+02\n2 12287     5.799301e+02 -6.390015e+00\n6 12287     4.981300e+02 1.485600e+02\n10 12287     6.438000e+02 2.068900e+02\n15 12287     8.557400e+02 2.227000e+02\n2 12288     -1.498900e+02 -7.479980e+00\n5 12288     3.975800e+02 -5.705800e+02\n9 12288     -2.422100e+02 6.962000e+01\n2 12289     -5.707001e+01 -7.500000e+00\n8 12289     -8.489990e+00 -4.413000e+01\n9 12289     -1.596600e+02 7.453998e+01\n2 12290     6.671000e+02 -7.450012e+00\n3 12290     5.324800e+02 -3.098100e+02\n12 12290     6.702100e+02 1.446400e+02\n2 12291     1.797000e+02 -8.469971e+00\n3 12291     9.103998e+01 -3.164600e+02\n7 12291     -6.102002e+01 8.082001e+01\n8 12291     1.755200e+02 -5.494000e+01\n9 12291     4.262000e+01 8.492999e+01\n10 12291     -6.917999e+01 1.015000e+02\n15 12291     -6.159973e+00 9.113000e+01\n2 12292     2.954301e+02 -8.739990e+00\n6 12292     1.201200e+02 -1.498999e+01\n10 12292     4.534003e+01 7.684998e+01\n15 12292     1.279700e+02 6.354999e+01\n2 12293     3.107500e+02 -9.729980e+00\n6 12293     1.365000e+02 -1.500000e+01\n15 12293     1.486899e+02 5.991998e+01\n2 12294     3.684900e+02 -1.071002e+01\n6 12294     2.003400e+02 -8.250000e+00\n2 12295     4.139900e+02 -1.109003e+01\n6 12295     2.532900e+02 3.059998e+00\n2 12296     -5.757001e+01 -1.208002e+01\n8 12296     -9.679993e+00 -4.826001e+01\n2 12297     6.949600e+02 -1.215997e+01\n3 12297     5.599399e+02 -3.138400e+02\n10 12297     7.562300e+02 1.533500e+02\n12 12297     6.992400e+02 1.356600e+02\n2 12298     -1.281000e+02 -1.358002e+01\n3 12298     -2.198600e+02 -3.332100e+02\n2 12299     -6.211700e+02 -1.517999e+01\n12 12299     -6.521600e+02 1.859000e+02\n2 12300     -5.719000e+01 -1.513000e+01\n8 12300     -8.890015e+00 -5.132999e+01\n2 12301     5.844100e+02 -1.492999e+01\n15 12301     8.590500e+02 2.105800e+02\n2 12302     2.339500e+02 -1.676001e+01\n8 12302     2.202700e+02 -6.270001e+01\n2 12303     -5.549000e+02 -1.738000e+01\n14 12303     2.838000e+01 -4.808900e+02\n2 12304     5.190000e+02 -1.751001e+01\n3 12304     4.019800e+02 -3.191600e+02\n2 12305     3.496899e+02 -1.903998e+01\n6 12305     1.790700e+02 -1.966998e+01\n10 12305     1.088000e+02 6.159998e+01\n12 12305     1.982900e+02 2.565002e+01\n15 12305     2.032800e+02 4.579999e+01\n2 12306     -3.602500e+02 -2.131000e+01\n13 12306     1.013300e+02 -5.964001e+01\n2 12307     -1.195100e+02 -2.216998e+01\n5 12307     4.180699e+02 -5.984399e+02\n6 12307     -2.998700e+02 2.559003e+01\n12 12307     -2.492700e+02 8.052002e+01\n2 12308     6.225200e+02 -2.217999e+01\n6 12308     5.434399e+02 1.263300e+02\n8 12308     5.693800e+02 -4.976001e+01\n12 12308     6.225500e+02 1.360400e+02\n2 12309     -2.001953e-02 -2.251001e+01\n3 12309     -8.621997e+01 -3.366400e+02\n6 12309     -1.816700e+02 -8.039978e+00\n2 12310     6.033900e+02 -2.222998e+01\n10 12310     6.631200e+02 1.824700e+02\n15 12310     8.800200e+02 1.930600e+02\n2 12311     6.033900e+02 -2.222998e+01\n10 12311     6.631200e+02 1.824700e+02\n2 12312     9.078998e+01 -2.282001e+01\n10 12312     -1.428800e+02 1.149700e+02\n2 12313     9.078998e+01 -2.282001e+01\n9 12313     -3.125000e+01 6.912000e+01\n10 12313     -1.428800e+02 1.149700e+02\n15 12313     -9.160999e+01 1.062900e+02\n2 12314     3.090900e+02 -2.379999e+01\n15 12314     1.427100e+02 4.398999e+01\n2 12315     6.264700e+02 -2.673999e+01\n3 12315     4.945300e+02 -3.307100e+02\n6 12315     5.476500e+02 1.212600e+02\n7 12315     5.220900e+02 1.563700e+02\n9 12315     3.990699e+02 8.106000e+01\n12 12315     6.263000e+02 1.310600e+02\n2 12316     5.850000e+01 -2.837000e+01\n3 12316     -2.658002e+01 -3.400800e+02\n6 12316     -1.237200e+02 -2.653003e+01\n2 12317     1.110700e+02 -2.875000e+01\n3 12317     2.534003e+01 -3.386300e+02\n2 12318     2.329900e+02 -2.888000e+01\n6 12318     5.375000e+01 -3.885999e+01\n10 12318     -2.389001e+01 6.834998e+01\n15 12318     4.732001e+01 5.257001e+01\n2 12319     5.161700e+02 -2.997998e+01\n8 12319     4.644200e+02 -6.877002e+01\n2 12320     2.945900e+02 -3.048999e+01\n7 12320     3.801001e+01 4.958002e+01\n2 12321     6.427000e+02 -3.258002e+01\n3 12321     5.106300e+02 -3.359000e+02\n6 12321     5.649000e+02 1.129900e+02\n12 12321     6.433199e+02 1.222600e+02\n2 12322     6.427000e+02 -3.258002e+01\n3 12322     5.106300e+02 -3.359000e+02\n6 12322     5.649000e+02 1.129900e+02\n8 12322     5.856600e+02 -5.942999e+01\n12 12322     6.433199e+02 1.222600e+02\n2 12323     5.915699e+02 -3.419000e+01\n12 12323     5.889399e+02 1.286600e+02\n2 12324     5.813101e+02 -3.678998e+01\n6 12324     4.982700e+02 1.165700e+02\n12 12324     5.790000e+02 1.267700e+02\n2 12325     5.934301e+02 -3.660999e+01\n12 12325     5.905500e+02 1.257800e+02\n2 12326     6.225300e+02 -3.657001e+01\n3 12326     4.914700e+02 -3.408400e+02\n6 12326     5.434100e+02 1.112200e+02\n7 12326     5.189700e+02 1.485400e+02\n8 12326     5.704900e+02 -6.253998e+01\n9 12326     3.973600e+02 7.244000e+01\n2 12327     6.225300e+02 -3.657001e+01\n3 12327     4.914700e+02 -3.408400e+02\n7 12327     5.189700e+02 1.485400e+02\n2 12328     7.510100e+02 -3.728998e+01\n7 12328     6.275699e+02 1.174100e+02\n2 12329     4.941998e+01 -3.862000e+01\n3 12329     -3.565997e+01 -3.499400e+02\n2 12330     4.237700e+02 -3.859998e+01\n3 12330     3.200100e+02 -3.405100e+02\n2 12331     -1.499300e+02 -3.920001e+01\n3 12331     -2.374400e+02 -3.572900e+02\n2 12332     1.046100e+02 -4.031000e+01\n3 12332     1.963000e+01 -3.498400e+02\n15 12332     -8.251001e+01 8.079999e+01\n2 12333     1.046100e+02 -4.031000e+01\n3 12333     1.963000e+01 -3.498400e+02\n2 12334     4.031899e+02 -4.040002e+01\n10 12334     1.789300e+02 4.057001e+01\n2 12335     2.320699e+02 -4.095001e+01\n6 12335     5.190002e+01 -5.125000e+01\n8 12335     2.175800e+02 -8.231000e+01\n9 12335     8.732001e+01 5.983002e+01\n10 12335     -2.616998e+01 5.670001e+01\n15 12335     4.420001e+01 3.904999e+01\n2 12336     2.523199e+02 -4.259998e+01\n10 12336     -6.469971e+00 5.084003e+01\n2 12337     -2.759998e+01 -4.287000e+01\n3 12337     -1.112600e+02 -3.564800e+02\n2 12338     1.115600e+02 -4.319000e+01\n8 12338     1.198100e+02 -8.126001e+01\n15 12338     -7.635999e+01 7.459003e+01\n2 12339     5.804200e+02 -4.301001e+01\n12 12339     5.780699e+02 1.208300e+02\n2 12340     6.776000e+02 -4.272998e+01\n10 12340     7.322300e+02 1.303200e+02\n2 12341     2.789100e+02 -4.338000e+01\n6 12341     1.014300e+02 -5.221997e+01\n8 12341     2.567200e+02 -8.560999e+01\n2 12342     3.253199e+02 -4.335999e+01\n15 12342     1.622600e+02 1.982001e+01\n2 12343     1.380800e+02 -4.667999e+01\n8 12343     1.411400e+02 -8.526001e+01\n15 12343     -5.288000e+01 6.084998e+01\n2 12344     3.961899e+02 -4.673999e+01\n10 12344     1.655100e+02 3.365997e+01\n15 12344     2.712600e+02 1.334998e+01\n2 12345     1.352600e+02 -4.742999e+01\n10 12345     -1.124900e+02 7.589001e+01\n15 12345     -5.560999e+01 6.094000e+01\n2 12346     5.913900e+02 -5.117999e+01\n12 12346     5.883400e+02 1.107300e+02\n2 12347     1.832100e+02 -5.135999e+01\n3 12347     9.632001e+01 -3.582200e+02\n6 12347     2.219971e+00 -6.100000e+01\n9 12347     4.746002e+01 4.927002e+01\n15 12347     -1.007001e+01 4.140002e+01\n2 12348     -1.248700e+02 -5.320001e+01\n8 12348     -6.365002e+01 -7.971997e+01\n2 12349     1.045700e+02 -5.464001e+01\n15 12349     -8.372998e+01 6.462000e+01\n2 12350     1.045700e+02 -5.464001e+01\n15 12350     -8.372998e+01 6.462000e+01\n2 12351     2.175300e+02 -5.582001e+01\n3 12351     1.294100e+02 -3.614400e+02\n8 12351     2.054900e+02 -9.417999e+01\n15 12351     2.642999e+01 2.620001e+01\n2 12352     -4.353003e+01 -5.628003e+01\n6 12352     -2.270700e+02 -4.613000e+01\n2 12353     7.171200e+02 -5.700000e+01\n3 12353     5.849600e+02 -3.562100e+02\n7 12353     5.956801e+02 1.082800e+02\n2 12354     3.494700e+02 -5.806000e+01\n3 12354     2.532400e+02 -3.606500e+02\n2 12355     2.381801e+02 -5.931000e+01\n6 12355     5.840002e+01 -6.975000e+01\n2 12356     3.237000e+02 -5.937000e+01\n6 12356     1.494800e+02 -6.416998e+01\n15 12356     1.574000e+02 2.140015e+00\n2 12357     3.237000e+02 -5.937000e+01\n8 12357     2.939800e+02 -9.766998e+01\n2 12358     6.042900e+02 -6.188000e+01\n3 12358     4.749399e+02 -3.661200e+02\n15 12358     8.728000e+02 1.452800e+02\n2 12359     1.630200e+02 -6.312000e+01\n3 12359     7.750000e+01 -3.701700e+02\n4 12359     -3.245400e+02 -4.050600e+02\n6 12359     -1.862000e+01 -7.179999e+01\n8 12359     1.611200e+02 -9.882001e+01\n10 12359     -9.112000e+01 5.364001e+01\n12 12359     -8.380005e+00 -1.914001e+01\n15 12359     -3.119000e+01 3.488000e+01\n2 12360     3.255000e+02 -6.384003e+01\n3 12360     2.315699e+02 -3.664300e+02\n6 12360     1.514700e+02 -6.867999e+01\n10 12360     7.175000e+01 2.010999e+01\n12 12360     1.672400e+02 -2.356000e+01\n15 12360     1.596700e+02 -3.200012e+00\n2 12361     8.576001e+01 -6.832001e+01\n6 12361     -9.723001e+01 -7.345001e+01\n12 12361     -8.467999e+01 -1.800000e+01\n2 12362     2.069100e+02 -6.966998e+01\n6 12362     2.590002e+01 -7.970001e+01\n10 12362     -5.342999e+01 3.596997e+01\n15 12362     1.308002e+01 1.429999e+01\n2 12363     1.607400e+02 -7.101001e+01\n15 12363     -3.415002e+01 2.732001e+01\n2 12364     1.692800e+02 -7.098999e+01\n3 12364     8.372998e+01 -3.774600e+02\n8 12364     1.653400e+02 -1.054200e+02\n9 12364     3.646002e+01 3.269000e+01\n15 12364     -2.564001e+01 2.446997e+01\n2 12365     2.877900e+02 -7.503998e+01\n15 12365     1.065100e+02 -1.006000e+01\n2 12366     2.636700e+02 -7.559003e+01\n6 12366     8.465002e+01 -8.490002e+01\n12 12366     9.606000e+01 -3.682001e+01\n15 12366     7.652002e+01 -6.010010e+00\n2 12367     2.663500e+02 -7.572998e+01\n10 12367     3.700012e+00 1.715002e+01\n15 12367     7.947998e+01 -6.969971e+00\n2 12368     5.689600e+02 -7.614001e+01\n12 12368     5.649900e+02 8.891998e+01\n2 12369     9.273999e+01 -7.675000e+01\n3 12369     1.051001e+01 -3.850900e+02\n2 12370     5.666500e+02 -7.745001e+01\n7 12370     4.670000e+02 1.286500e+02\n10 12370     6.178500e+02 1.427400e+02\n15 12370     8.260699e+02 1.448100e+02\n2 12371     7.540000e+02 -7.758002e+01\n3 12371     6.228400e+02 -3.752400e+02\n9 12371     5.068199e+02 4.376001e+01\n2 12372     7.461000e+02 -7.862000e+01\n3 12372     6.150200e+02 -3.766400e+02\n9 12372     4.999700e+02 4.248999e+01\n10 12372     7.934800e+02 6.557001e+01\n12 12372     7.502700e+02 5.888000e+01\n2 12373     5.894700e+02 -8.025000e+01\n8 12373     5.413300e+02 -9.579999e+01\n2 12374     -1.128100e+02 -8.228998e+01\n8 12374     -5.732001e+01 -1.060100e+02\n2 12375     6.337800e+02 -8.235999e+01\n8 12375     5.791400e+02 -9.976001e+01\n2 12376     1.250300e+02 -8.706000e+01\n3 12376     4.321002e+01 -3.940400e+02\n6 12376     -5.888000e+01 -1.015300e+02\n8 12376     1.291500e+02 -1.187400e+02\n2 12377     1.185999e+01 -8.908002e+01\n3 12377     -6.919000e+01 -4.006300e+02\n2 12378     7.271600e+02 -8.908002e+01\n9 12378     4.849399e+02 3.366998e+01\n12 12378     7.295300e+02 5.129999e+01\n2 12379     3.465002e+01 -9.081000e+01\n3 12379     -4.626001e+01 -4.006899e+02\n2 12380     3.429999e+01 -9.482001e+01\n3 12380     -4.639001e+01 -4.050699e+02\n12 12380     -1.379400e+02 -4.347998e+01\n2 12381     3.429999e+01 -9.482001e+01\n3 12381     -4.639001e+01 -4.050699e+02\n2 12382     8.466998e+01 -9.446002e+01\n15 12382     -1.281100e+02 1.292999e+01\n2 12383     2.372800e+02 -9.512000e+01\n3 12383     1.512900e+02 -3.981400e+02\n6 12383     5.466998e+01 -1.124500e+02\n12 12383     6.090002e+01 -6.279999e+01\n2 12384     8.001500e+02 -9.665997e+01\n9 12384     5.444301e+02 3.003998e+01\n2 12385     8.879999e+01 -9.713000e+01\n15 12385     -1.247100e+02 8.859985e+00\n2 12386     8.540997e+01 -9.770001e+01\n3 12386     5.309998e+00 -4.062500e+02\n6 12386     -9.998999e+01 -1.127300e+02\n12 12386     -9.315002e+01 -5.679999e+01\n2 12387     1.679999e+01 -9.783002e+01\n3 12387     -6.421997e+01 -4.080300e+02\n2 12388     -1.439700e+02 -9.984003e+01\n3 12388     -2.293500e+02 -4.176300e+02\n2 12389     2.023199e+02 -1.025000e+02\n10 12389     -8.072998e+01 -6.469971e+00\n15 12389     -1.876001e+01 -3.522998e+01\n2 12390     5.108000e+02 -1.026700e+02\n8 12390     4.511801e+02 -1.351800e+02\n10 12390     2.785100e+02 -4.752002e+01\n12 12390     3.793199e+02 -6.113000e+01\n13 12390     6.632700e+02 -3.648300e+02\n15 12390     4.068300e+02 -8.151001e+01\n2 12391     1.136200e+02 -1.037100e+02\n15 12391     -1.024200e+02 -6.210022e+00\n2 12392     4.802000e+02 -1.085500e+02\n3 12392     3.794399e+02 -4.051000e+02\n2 12393     1.787400e+02 -1.095000e+02\n3 12393     9.639001e+01 -4.138400e+02\n10 12393     -1.009300e+02 -5.869995e+00\n15 12393     -4.250000e+01 -3.489001e+01\n2 12394     1.787400e+02 -1.095000e+02\n3 12394     9.639001e+01 -4.138400e+02\n6 12394     -6.359985e+00 -1.294800e+02\n8 12394     1.707600e+02 -1.387800e+02\n10 12394     -1.009300e+02 -5.869995e+00\n12 12394     -2.830017e+00 -7.756000e+01\n15 12394     -4.250000e+01 -3.489001e+01\n2 12395     1.795200e+02 -1.128300e+02\n3 12395     9.733002e+01 -4.171100e+02\n6 12395     -5.830017e+00 -1.327000e+02\n12 12395     -2.179993e+00 -8.096002e+01\n15 12395     -4.234003e+01 -3.841998e+01\n2 12396     5.080200e+02 -1.147200e+02\n3 12396     4.070000e+02 -4.098400e+02\n2 12397     5.380100e+02 -1.161500e+02\n8 12397     4.755200e+02 -1.461500e+02\n2 12398     6.833700e+02 -1.158300e+02\n3 12398     5.562800e+02 -4.155300e+02\n12 12398     6.820400e+02 3.096997e+01\n2 12399     7.091700e+02 -1.174500e+02\n7 12399     5.817900e+02 5.946997e+01\n2 12400     1.962800e+02 -1.181300e+02\n6 12400     1.134003e+01 -1.388101e+02\n12 12400     1.465002e+01 -8.765997e+01\n15 12400     -2.678003e+01 -4.959998e+01\n2 12401     1.962800e+02 -1.181300e+02\n6 12401     1.134003e+01 -1.388101e+02\n8 12401     1.848000e+02 -1.464900e+02\n2 12402     1.962800e+02 -1.181300e+02\n3 12402     1.138600e+02 -4.216100e+02\n8 12402     1.848000e+02 -1.464900e+02\n15 12402     -2.678003e+01 -4.959998e+01\n2 12403     2.023101e+02 -1.181300e+02\n8 12403     1.899300e+02 -1.458900e+02\n12 12403     2.087000e+01 -8.663000e+01\n15 12403     -2.009003e+01 -4.970001e+01\n2 12404     -4.226001e+01 -1.182500e+02\n3 12404     -1.199600e+02 -4.300500e+02\n2 12405     -3.847600e+02 -1.203700e+02\n3 12405     -5.046300e+02 -4.531899e+02\n2 12406     -3.212000e+01 -1.210900e+02\n3 12406     -1.103800e+02 -4.320100e+02\n8 12406     3.010010e+00 -1.419800e+02\n2 12407     1.830900e+02 -1.214500e+02\n3 12407     1.011900e+02 -4.252500e+02\n6 12407     -1.820007e+00 -1.411500e+02\n8 12407     1.742800e+02 -1.486500e+02\n12 12407     1.599976e+00 -8.947998e+01\n2 12408     -7.129999e+01 -1.242400e+02\n3 12408     -1.491000e+02 -4.364100e+02\n2 12409     -3.193600e+02 -1.242800e+02\n5 12409     2.771000e+02 -5.699800e+02\n2 12410     2.245200e+02 -1.248500e+02\n6 12410     4.029999e+01 -1.447800e+02\n12 12410     4.465997e+01 -9.517999e+01\n2 12411     3.704600e+02 -1.251900e+02\n15 12411     1.882700e+02 -9.001001e+01\n2 12412     2.537000e+02 -1.255900e+02\n3 12412     1.687100e+02 -4.280601e+02\n4 12412     -3.918800e+02 -4.412000e+02\n7 12412     -1.717999e+01 -3.581000e+01\n8 12412     2.319400e+02 -1.531800e+02\n15 12412     3.857001e+01 -7.040997e+01\n2 12413     -3.900100e+02 -1.277300e+02\n3 12413     -5.091500e+02 -4.607600e+02\n2 12414     9.270001e+01 -1.273500e+02\n3 12414     1.295001e+01 -4.340601e+02\n6 12414     -9.220999e+01 -1.406899e+02\n12 12414     -8.551001e+01 -8.551001e+01\n2 12415     9.270001e+01 -1.273500e+02\n3 12415     1.295001e+01 -4.340601e+02\n6 12415     -9.220999e+01 -1.406899e+02\n12 12415     -8.551001e+01 -8.551001e+01\n2 12416     2.670200e+02 -1.289700e+02\n3 12416     1.818600e+02 -4.309800e+02\n6 12416     8.462000e+01 -1.475699e+02\n12 12416     9.022998e+01 -9.977002e+01\n15 12416     5.433002e+01 -7.816998e+01\n2 12417     2.670200e+02 -1.289700e+02\n6 12417     8.462000e+01 -1.475699e+02\n15 12417     5.433002e+01 -7.816998e+01\n2 12418     4.815800e+02 -1.293200e+02\n7 12418     1.989399e+02 -5.579999e+01\n10 12418     2.164700e+02 -8.167999e+01\n12 12418     3.326200e+02 -1.000600e+02\n15 12418     3.319200e+02 -1.222100e+02\n2 12419     1.302400e+02 -1.322300e+02\n3 12419     5.000000e+01 -4.378700e+02\n6 12419     -5.471997e+01 -1.480000e+02\n12 12419     -4.926001e+01 -9.450000e+01\n15 12419     -8.822998e+01 -4.051001e+01\n2 12420     1.649000e+02 -1.330100e+02\n6 12420     -1.970001e+01 -1.511300e+02\n2 12421     2.780601e+02 -1.328600e+02\n3 12421     1.919900e+02 -4.335900e+02\n6 12421     9.591998e+01 -1.504301e+02\n10 12421     -7.869995e+00 -4.810999e+01\n12 12421     1.022700e+02 -1.039400e+02\n15 12421     6.656000e+01 -8.357001e+01\n2 12422     3.214200e+02 -1.334200e+02\n6 12422     1.412500e+02 -1.492400e+02\n12 12422     1.495800e+02 -1.047400e+02\n15 12422     1.188600e+02 -9.409003e+01\n2 12423     -7.897998e+01 -1.387500e+02\n3 12423     -1.569800e+02 -4.519301e+02\n2 12424     -7.897998e+01 -1.387500e+02\n3 12424     -1.569800e+02 -4.519301e+02\n2 12425     1.157001e+01 -1.392300e+02\n8 12425     3.560999e+01 -1.593700e+02\n2 12426     2.296100e+02 -1.393300e+02\n3 12426     1.464500e+02 -4.412600e+02\n6 12426     4.578998e+01 -1.581700e+02\n2 12427     2.613199e+02 -1.394400e+02\n3 12427     1.764000e+02 -4.402800e+02\n6 12427     7.873999e+01 -1.570000e+02\n12 12427     8.453998e+01 -1.100900e+02\n2 12428     1.365500e+02 -1.428800e+02\n7 12428     -1.138100e+02 -3.372998e+01\n10 12428     -1.374400e+02 -2.258002e+01\n15 12428     -8.475000e+01 -5.502002e+01\n2 12429     7.755200e+02 -1.430400e+02\n12 12429     7.770500e+02 -1.134003e+01\n2 12430     -3.790400e+02 -1.441100e+02\n5 12430     2.167400e+02 -5.813500e+02\n8 12430     -2.459800e+02 -1.329000e+02\n13 12430     5.653998e+01 -1.769400e+02\n2 12431     2.498199e+02 -1.450800e+02\n15 12431     3.298999e+01 -8.933002e+01\n2 12432     -2.599100e+02 -1.456900e+02\n3 12432     -3.716400e+02 -4.751899e+02\n2 12433     -2.359400e+02 -1.519400e+02\n6 12433     -4.051600e+02 -3.326001e+01\n2 12434     -1.300000e+01 -1.543500e+02\n6 12434     -1.994900e+02 -1.688101e+02\n8 12434     1.601001e+01 -1.701100e+02\n9 12434     -1.099000e+02 -4.434998e+01\n2 12435     8.069000e+02 -1.550500e+02\n12 12435     8.103500e+02 -2.906000e+01\n2 12436     2.490002e+01 -1.571300e+02\n3 12436     -4.958002e+01 -4.648000e+02\n6 12436     -1.636300e+02 -1.810900e+02\n12 12436     -1.633900e+02 -1.219900e+02\n15 12436     -2.148200e+02 -5.139001e+01\n2 12437     -1.078998e+01 -1.572500e+02\n6 12437     -1.967400e+02 -1.721700e+02\n2 12438     2.706899e+02 -1.575200e+02\n10 12438     -2.692999e+01 -7.425000e+01\n2 12439     1.255600e+02 -1.592900e+02\n3 12439     4.875000e+01 -4.636700e+02\n13 12439     3.253900e+02 -3.621800e+02\n2 12440     4.190900e+02 -1.649100e+02\n6 12440     2.403800e+02 -1.859399e+02\n12 12440     2.499100e+02 -1.475100e+02\n2 12441     3.249399e+02 -1.662100e+02\n4 12441     -4.442100e+02 -4.734399e+02\n2 12442     -4.765997e+01 -1.668800e+02\n3 12442     -1.249200e+02 -4.784900e+02\n6 12442     -2.321600e+02 -1.715900e+02\n8 12442     -1.051001e+01 -1.779800e+02\n9 12442     -1.401100e+02 -5.715002e+01\n2 12443     -4.506300e+02 -1.674800e+02\n7 12443     -4.439100e+02 1.259400e+02\n2 12444     4.064399e+02 -1.681900e+02\n3 12444     3.174399e+02 -4.636300e+02\n2 12445     4.264700e+02 -1.690900e+02\n15 12445     2.285900e+02 -1.669700e+02\n2 12446     5.306000e+02 -1.701600e+02\n8 12446     4.693101e+02 -1.889200e+02\n2 12447     7.885900e+02 -1.713300e+02\n7 12447     6.312600e+02 -1.415997e+01\n2 12448     -3.830300e+02 -1.771500e+02\n13 12448     4.447998e+01 -2.084300e+02\n2 12449     7.109003e+01 -1.837800e+02\n3 12449     -3.900024e+00 -4.896600e+02\n6 12449     -1.164000e+02 -2.060300e+02\n8 12449     8.158002e+01 -1.977400e+02\n2 12450     -3.469971e+00 -1.864800e+02\n3 12450     -7.927002e+01 -4.959600e+02\n2 12451     4.202300e+02 -1.910600e+02\n6 12451     2.421300e+02 -2.067100e+02\n10 12451     1.235500e+02 -1.343900e+02\n12 12451     2.531100e+02 -1.695800e+02\n15 12451     2.222200e+02 -1.851200e+02\n2 12452     -3.967800e+02 -1.914600e+02\n7 12452     -4.098400e+02 9.451001e+01\n15 12452     -3.927900e+02 1.778100e+02\n2 12453     -4.550700e+02 -1.946800e+02\n10 12453     -4.643400e+02 1.875400e+02\n2 12454     1.229500e+02 -1.973900e+02\n6 12454     -6.451001e+01 -2.214200e+02\n2 12455     3.506000e+01 -1.985400e+02\n6 12455     -1.516300e+02 -2.157000e+02\n2 12456     2.608000e+02 -1.982400e+02\n6 12456     7.365997e+01 -2.260601e+02\n10 12456     -5.332001e+01 -1.160900e+02\n2 12457     3.251001e+01 -2.007200e+02\n8 12457     5.058002e+01 -2.096800e+02\n2 12458     2.726400e+02 -2.009500e+02\n6 12458     8.534003e+01 -2.285000e+02\n7 12458     -1.898999e+01 -1.089700e+02\n8 12458     2.439000e+02 -2.165900e+02\n12 12458     8.403003e+01 -1.830300e+02\n2 12459     2.647400e+02 -2.021900e+02\n3 12459     1.859800e+02 -5.003500e+02\n6 12459     7.741998e+01 -2.301600e+02\n2 12460     3.228003e+01 -2.081000e+02\n8 12460     5.053003e+01 -2.152700e+02\n2 12461     1.061000e+02 -2.079600e+02\n6 12461     -8.079001e+01 -2.281899e+02\n2 12462     4.033600e+02 -2.080100e+02\n6 12462     2.234700e+02 -2.245000e+02\n9 12462     2.361899e+02 -7.072998e+01\n12 12462     2.330200e+02 -1.869100e+02\n2 12463     -5.651001e+01 -2.088300e+02\n3 12463     -1.344600e+02 -5.218700e+02\n2 12464     4.051600e+02 -2.107600e+02\n3 12464     3.174100e+02 -5.062000e+02\n4 12464     -5.006100e+02 -5.322900e+02\n6 12464     2.259800e+02 -2.259200e+02\n9 12464     2.387700e+02 -7.222998e+01\n12 12464     2.357500e+02 -1.887500e+02\n15 12464     2.015601e+02 -2.010900e+02\n2 12465     -3.008400e+02 -2.128800e+02\n3 12465     -4.078300e+02 -5.437500e+02\n2 12466     1.895200e+02 -2.180800e+02\n3 12466     1.140500e+02 -5.190900e+02\n2 12467     3.596899e+02 -2.190400e+02\n6 12467     1.738900e+02 -2.466100e+02\n2 12468     -3.241600e+02 -2.194000e+02\n3 12468     -4.312300e+02 -5.515900e+02\n2 12469     4.982000e+02 -2.216700e+02\n3 12469     4.029600e+02 -5.168900e+02\n2 12470     4.496997e+01 -2.257300e+02\n3 12470     -2.996997e+01 -5.330800e+02\n2 12471     4.496997e+01 -2.257300e+02\n3 12471     -2.996997e+01 -5.330800e+02\n2 12472     2.538800e+02 -2.266200e+02\n12 12472     6.621002e+01 -2.047100e+02\n2 12473     4.668500e+02 -2.284500e+02\n6 12473     2.956900e+02 -2.295900e+02\n8 12473     4.102200e+02 -2.385000e+02\n2 12474     6.694000e+01 -2.290700e+02\n6 12474     -1.176000e+02 -2.444399e+02\n8 12474     7.885999e+01 -2.327200e+02\n2 12475     2.687900e+02 -2.352200e+02\n3 12475     1.897000e+02 -5.335100e+02\n6 12475     8.307001e+01 -2.565000e+02\n2 12476     -4.225400e+02 -2.369900e+02\n10 12476     -4.590900e+02 1.283000e+02\n15 12476     -4.471500e+02 1.149600e+02\n2 12477     4.725300e+02 -2.382300e+02\n6 12477     3.012400e+02 -2.404200e+02\n12 12477     3.197300e+02 -2.078800e+02\n2 12478     1.885100e+02 -2.402200e+02\n3 12478     1.136800e+02 -5.413300e+02\n8 12478     1.743400e+02 -2.468300e+02\n2 12479     2.552900e+02 -2.408400e+02\n6 12479     6.997998e+01 -2.621700e+02\n12 12479     7.059003e+01 -2.170900e+02\n2 12480     -4.321600e+02 -2.421100e+02\n7 12480     -4.532600e+02 4.156000e+01\n2 12481     5.065699e+02 -2.420700e+02\n8 12481     4.463700e+02 -2.476500e+02\n2 12482     -4.277800e+02 -2.428200e+02\n7 12482     -4.509400e+02 3.969000e+01\n2 12483     -3.235999e+01 -2.448000e+02\n3 12483     -1.094200e+02 -5.571300e+02\n2 12484     3.295400e+02 -2.450700e+02\n6 12484     1.457100e+02 -2.639900e+02\n2 12485     6.522800e+02 -2.457000e+02\n9 12485     4.324700e+02 -9.745001e+01\n2 12486     2.068800e+02 -2.468200e+02\n6 12486     2.021002e+01 -2.676700e+02\n12 12486     1.910999e+01 -2.197300e+02\n2 12487     1.785000e+02 -2.476900e+02\n3 12487     1.027100e+02 -5.505601e+02\n6 12487     -8.169983e+00 -2.685699e+02\n8 12487     1.669000e+02 -2.515000e+02\n9 12487     5.410999e+01 -1.130900e+02\n2 12488     -4.882100e+02 -2.525300e+02\n10 12488     -5.215900e+02 1.193000e+02\n15 12488     -5.187200e+02 1.040700e+02\n2 12489     5.187100e+02 -2.547800e+02\n12 12489     3.994100e+02 -1.947700e+02\n2 12490     -3.288900e+02 -2.557400e+02\n7 12490     -3.795400e+02 1.784003e+01\n12 12490     -4.170000e+02 -1.130300e+02\n15 12490     -3.688800e+02 6.916998e+01\n2 12491     -3.979800e+02 -2.558400e+02\n3 12491     -5.067600e+02 -5.919700e+02\n2 12492     4.936400e+02 -2.572300e+02\n6 12492     3.301100e+02 -2.433900e+02\n2 12493     2.709399e+02 -2.616000e+02\n3 12493     1.921700e+02 -5.605400e+02\n9 12493     1.300400e+02 -1.200800e+02\n2 12494     4.682300e+02 -2.619300e+02\n6 12494     2.975300e+02 -2.603900e+02\n2 12495     7.616000e+02 -2.625200e+02\n12 12495     7.114800e+02 -1.741600e+02\n2 12496     3.355900e+02 -2.639800e+02\n12 12496     1.570600e+02 -2.405100e+02\n2 12497     2.439200e+02 -2.682900e+02\n3 12497     1.667500e+02 -5.682300e+02\n6 12497     5.866998e+01 -2.850601e+02\n8 12497     2.209800e+02 -2.692900e+02\n9 12497     1.086700e+02 -1.267400e+02\n12 12497     5.990997e+01 -2.400000e+02\n15 12497     5.289978e+00 -2.171600e+02\n2 12498     3.603998e+01 -2.695100e+02\n3 12498     -3.848999e+01 -5.784900e+02\n6 12498     -1.468200e+02 -2.763800e+02\n8 12498     5.456000e+01 -2.628500e+02\n2 12499     3.696997e+01 -2.728200e+02\n3 12499     -3.722998e+01 -5.820800e+02\n6 12499     -1.454700e+02 -2.793700e+02\n2 12500     4.238000e+01 -2.733700e+02\n3 12500     -3.202002e+01 -5.823000e+02\n2 12501     3.215997e+01 -2.795600e+02\n3 12501     -4.221002e+01 -5.899900e+02\n6 12501     -1.505000e+02 -2.855100e+02\n9 12501     -6.681000e+01 -1.474800e+02\n10 12501     -2.283200e+02 -1.086400e+02\n12 12501     -1.430900e+02 -2.286100e+02\n13 12501     2.554800e+02 -4.197000e+02\n2 12502     2.944000e+01 -2.810400e+02\n3 12502     -4.497998e+01 -5.913500e+02\n2 12503     -4.687400e+02 -2.840900e+02\n7 12503     -4.948700e+02 -1.030029e+00\n8 12503     -3.286400e+02 -2.505100e+02\n9 12503     -5.061300e+02 -1.848700e+02\n12 12503     -5.566600e+02 -1.441600e+02\n15 12503     -5.198000e+02 5.577002e+01\n2 12504     8.976001e+01 -2.843300e+02\n3 12504     1.545001e+01 -5.908500e+02\n2 12505     1.471002e+01 -2.857800e+02\n3 12505     -5.902002e+01 -5.956899e+02\n2 12506     3.047100e+02 -2.905500e+02\n6 12506     1.210400e+02 -3.027200e+02\n12 12506     1.254600e+02 -2.615900e+02\n2 12507     -2.803003e+01 -2.917200e+02\n3 12507     -1.047900e+02 -6.045699e+02\n8 12507     5.440002e+00 -2.757300e+02\n9 12507     -1.181800e+02 -1.603900e+02\n2 12508     4.620601e+02 -2.964400e+02\n3 12508     3.750500e+02 -5.926200e+02\n2 12509     6.697998e+01 -2.971400e+02\n3 12509     -7.400024e+00 -6.050900e+02\n2 12510     6.428998e+01 -3.008900e+02\n3 12510     -1.029999e+01 -6.102900e+02\n6 12510     -1.175700e+02 -3.053199e+02\n9 12510     -3.951001e+01 -1.638200e+02\n2 12511     3.828900e+02 -3.029300e+02\n6 12511     2.050400e+02 -3.065200e+02\n9 12511     2.226100e+02 -1.505800e+02\n2 12512     1.222300e+02 -3.065300e+02\n6 12512     -6.127002e+01 -3.157500e+02\n2 12513     1.603900e+02 -3.095900e+02\n6 12513     -2.315002e+01 -3.191600e+02\n2 12514     3.348500e+02 -3.101500e+02\n3 12514     2.557900e+02 -6.078900e+02\n2 12515     3.348500e+02 -3.101500e+02\n3 12515     2.557900e+02 -6.078900e+02\n6 12515     1.534400e+02 -3.188101e+02\n2 12516     2.385500e+02 -3.124300e+02\n3 12516     1.624600e+02 -6.133101e+02\n2 12517     4.528700e+02 -3.137200e+02\n12 12517     3.036500e+02 -2.723500e+02\n2 12518     4.568199e+02 -3.148000e+02\n12 12518     3.075100e+02 -2.730000e+02\n2 12519     4.414100e+02 -3.153900e+02\n12 12519     2.895200e+02 -2.747200e+02\n15 12519     2.755100e+02 -2.902300e+02\n2 12520     2.402100e+02 -3.166500e+02\n6 12520     5.687000e+01 -3.260000e+02\n2 12521     3.301600e+02 -3.208600e+02\n3 12521     2.514800e+02 -6.193800e+02\n6 12521     1.489600e+02 -3.277200e+02\n8 12521     2.924100e+02 -3.126700e+02\n12 12521     1.568400e+02 -2.889900e+02\n2 12522     3.387800e+02 -3.222300e+02\n3 12522     2.605300e+02 -6.194800e+02\n2 12523     3.494000e+01 -3.344900e+02\n6 12523     -1.445400e+02 -3.308700e+02\n9 12523     -6.234003e+01 -1.929000e+02\n2 12524     3.183002e+01 -3.354100e+02\n6 12524     -1.483400e+02 -3.322300e+02\n12 12524     -1.375900e+02 -2.753300e+02\n2 12525     1.392300e+02 -3.394900e+02\n6 12525     -4.278003e+01 -3.429500e+02\n2 12526     2.396100e+02 -3.435600e+02\n6 12526     5.767999e+01 -3.487800e+02\n2 12527     5.525699e+02 -3.582800e+02\n12 12527     4.259700e+02 -3.056700e+02\n2 12528     -2.997000e+02 -3.666000e+02\n6 12528     -4.747700e+02 -3.269800e+02\n7 12528     -3.957500e+02 -1.030200e+02\n12 12528     -4.172800e+02 -2.510900e+02\n15 12528     -4.132700e+02 -9.462000e+01\n2 12529     3.391600e+02 -3.769200e+02\n6 12529     1.583300e+02 -3.807100e+02\n2 12530     1.907200e+02 -3.852400e+02\n6 12530     7.539978e+00 -3.904000e+02\n2 12531     1.737200e+02 -3.967800e+02\n6 12531     -8.440002e+00 -3.994900e+02\n12 12531     -5.150024e+00 -3.512900e+02\n2 12532     3.461100e+02 -3.988400e+02\n6 12532     1.665500e+02 -3.976400e+02\n2 12533     3.581801e+02 -4.147400e+02\n6 12533     1.745100e+02 -4.241100e+02\n2 12534     3.639800e+02 -4.355400e+02\n6 12534     1.795300e+02 -4.426899e+02\n2 12535     1.359985e+00 -4.361500e+02\n6 12535     -1.782500e+02 -4.335800e+02\n12 12535     -1.705000e+02 -3.731700e+02\n2 12536     1.359985e+00 -4.361500e+02\n12 12536     -1.705000e+02 -3.731700e+02\n2 12537     4.210800e+02 -4.378101e+02\n6 12537     2.427900e+02 -4.338500e+02\n8 12537     3.666700e+02 -4.096400e+02\n2 12538     -3.085800e+02 -4.486600e+02\n8 12538     -2.163800e+02 -3.935800e+02\n2 12539     1.096002e+01 -4.489301e+02\n6 12539     -1.679500e+02 -4.455900e+02\n2 12540     -2.498900e+02 -4.536300e+02\n12 12540     -3.911400e+02 -3.589900e+02\n2 12541     -2.942400e+02 -4.569100e+02\n6 12541     -4.692000e+02 -4.417200e+02\n8 12541     -2.062500e+02 -4.005400e+02\n2 12542     3.780900e+02 -4.720699e+02\n12 12542     2.016200e+02 -4.370699e+02\n2 12543     1.836500e+02 -4.773700e+02\n6 12543     9.002686e-02 -4.805699e+02\n2 12544     2.034399e+02 -4.896100e+02\n6 12544     2.032001e+01 -4.911300e+02\n2 12545     3.365900e+02 -5.006500e+02\n6 12545     1.524700e+02 -5.026400e+02\n12 12545     1.532800e+02 -4.654301e+02\n2 12546     5.595300e+02 -5.023300e+02\n7 12546     2.280800e+02 -3.579200e+02\n2 12547     4.832800e+02 -5.042800e+02\n15 12547     2.531801e+02 -5.134800e+02\n2 12548     1.109900e+02 -5.214800e+02\n15 12548     -1.561400e+02 -4.218900e+02\n2 12549     4.378700e+02 -5.882800e+02\n6 12549     2.452800e+02 -5.994100e+02\n2 12550     -1.658100e+02 -5.889301e+02\n7 12550     -3.702100e+02 -3.389200e+02\n2 12551     3.604900e+02 -5.962000e+02\n7 12551     2.002002e+01 -4.213600e+02\n2 12552     5.188500e+02 -6.085300e+02\n9 12552     3.500300e+02 -3.910100e+02\n2 12553     5.357700e+02 -6.098700e+02\n10 12553     1.253500e+02 -5.392900e+02\n2 12554     -6.160900e+02 6.208400e+02\n11 12554     -1.151400e+02 -7.780029e+00\n2 12555     -2.138500e+02 6.009900e+02\n3 12555     -3.424800e+02 2.593700e+02\n13 12555     2.746600e+02 4.418300e+02\n14 12555     4.162800e+02 8.150000e+01\n2 12556     -2.862900e+02 5.994300e+02\n3 12556     -4.113400e+02 2.589500e+02\n5 12556     4.407900e+02 1.669700e+02\n13 12556     2.097600e+02 4.315100e+02\n14 12556     3.395200e+02 7.185999e+01\n2 12557     -1.509100e+02 5.970600e+02\n5 12557     5.905601e+02 1.784000e+02\n2 12558     -1.243700e+02 5.970600e+02\n11 12558     3.205699e+02 9.989990e+00\n2 12559     -2.143200e+02 5.967300e+02\n11 12559     2.289301e+02 -4.000244e-01\n14 12559     4.153199e+02 7.812000e+01\n2 12560     -1.669400e+02 5.936800e+02\n5 12560     5.722300e+02 1.731300e+02\n14 12560     4.667300e+02 8.012000e+01\n2 12561     -2.794000e+01 5.913400e+02\n3 12561     -1.694700e+02 2.476400e+02\n13 12561     4.486500e+02 4.561900e+02\n14 12561     6.225400e+02 9.329001e+01\n2 12562     1.089001e+01 5.910900e+02\n13 12562     4.866500e+02 4.611100e+02\n14 12562     6.674399e+02 9.807999e+01\n2 12563     -2.884000e+02 5.905100e+02\n3 12563     -4.129700e+02 2.505100e+02\n4 12563     1.881899e+02 -4.010100e+02\n5 12563     4.382400e+02 1.588200e+02\n2 12564     -2.476001e+01 5.888700e+02\n13 12564     4.515100e+02 4.547900e+02\n2 12565     -8.609985e+00 5.886400e+02\n3 12565     -1.519900e+02 2.454600e+02\n5 12565     7.574700e+02 1.840700e+02\n2 12566     -9.317999e+01 5.852600e+02\n13 12566     3.853600e+02 4.435900e+02\n2 12567     -3.589001e+01 5.799600e+02\n3 12567     -1.771300e+02 2.370900e+02\n13 12567     4.410500e+02 4.473300e+02\n14 12567     6.133000e+02 8.292999e+01\n2 12568     2.653003e+01 5.793600e+02\n3 12568     -1.195100e+02 2.359100e+02\n5 12568     8.005500e+02 1.791300e+02\n11 12568     4.810500e+02 1.337000e+01\n13 12568     5.017700e+02 4.539000e+02\n14 12568     6.859399e+02 8.956000e+01\n2 12569     2.653003e+01 5.793600e+02\n11 12569     4.810500e+02 1.337000e+01\n13 12569     5.017700e+02 4.539000e+02\n14 12569     6.859399e+02 8.956000e+01\n2 12570     -6.921002e+01 5.785100e+02\n3 12570     -2.086600e+02 2.356500e+02\n5 12570     6.832300e+02 1.680000e+02\n13 12570     4.082000e+02 4.411100e+02\n14 12570     5.750500e+02 7.728998e+01\n2 12571     -1.773200e+02 5.775600e+02\n3 12571     -3.087600e+02 2.356300e+02\n4 12571     1.811300e+02 -4.811600e+02\n5 12571     5.590800e+02 1.561300e+02\n11 12571     2.667000e+02 -1.163000e+01\n13 12571     3.069500e+02 4.273200e+02\n14 12571     4.545000e+02 6.389001e+01\n2 12572     -1.664200e+02 5.763900e+02\n3 12572     -2.990700e+02 2.364000e+02\n5 12572     5.710800e+02 1.571600e+02\n2 12573     -6.771002e+01 5.751200e+02\n3 12573     -2.069900e+02 2.324700e+02\n4 12573     1.805500e+02 -5.698199e+02\n5 12573     6.853400e+02 1.649400e+02\n11 12573     3.794500e+02 -1.280029e+00\n13 12573     4.094700e+02 4.385300e+02\n14 12573     5.762200e+02 7.403998e+01\n2 12574     -1.665700e+02 5.733000e+02\n4 12574     1.794301e+02 -4.889301e+02\n5 12574     5.707700e+02 1.535600e+02\n11 12574     2.772500e+02 -1.307001e+01\n2 12575     -1.813500e+02 5.709200e+02\n5 12575     5.536200e+02 1.495500e+02\n14 12575     4.501500e+02 5.690002e+01\n2 12576     -1.879600e+02 5.655800e+02\n11 12576     2.557100e+02 -2.265002e+01\n2 12577     3.588000e+01 5.652300e+02\n3 12577     -1.105800e+02 2.222100e+02\n5 12577     8.112700e+02 1.659900e+02\n11 12577     4.920200e+02 3.210022e+00\n13 12577     5.102800e+02 4.432800e+02\n14 12577     6.964200e+02 7.726001e+01\n2 12578     3.588000e+01 5.652300e+02\n3 12578     -1.105800e+02 2.222100e+02\n5 12578     8.112700e+02 1.659900e+02\n11 12578     4.920200e+02 3.210022e+00\n14 12578     6.964200e+02 7.726001e+01\n2 12579     -1.729900e+02 5.635500e+02\n14 12579     4.581300e+02 5.063000e+01\n2 12580     -1.816700e+02 5.589900e+02\n5 12580     5.518400e+02 1.384600e+02\n8 12580     -7.152002e+01 4.394500e+02\n14 12580     4.483900e+02 4.629999e+01\n2 12581     2.589001e+01 5.545000e+02\n5 12581     7.973900e+02 1.538800e+02\n11 12581     4.809900e+02 -6.409973e+00\n2 12582     -1.570800e+02 5.522700e+02\n4 12582     1.666801e+02 -4.929000e+02\n5 12582     5.794500e+02 1.335000e+02\n11 12582     2.865400e+02 -2.951001e+01\n13 12582     3.237700e+02 4.090500e+02\n2 12583     4.796997e+01 5.518700e+02\n11 12583     5.056100e+02 -5.960022e+00\n13 12583     5.216700e+02 4.335300e+02\n14 12583     7.107100e+02 6.584003e+01\n2 12584     -4.075700e+02 5.516200e+02\n8 12584     -2.583000e+02 4.270600e+02\n2 12585     -3.766400e+02 5.514800e+02\n5 12585     3.422600e+02 1.154500e+02\n8 12585     -2.319800e+02 4.281500e+02\n2 12586     -1.819700e+02 5.514600e+02\n3 12586     -3.139400e+02 2.112700e+02\n4 12586     1.662700e+02 -4.738900e+02\n5 12586     5.514100e+02 1.306000e+02\n8 12586     -7.090002e+01 4.328000e+02\n11 12586     2.612400e+02 -3.251001e+01\n13 12586     3.009600e+02 4.052700e+02\n14 12586     4.479000e+02 3.889001e+01\n2 12587     2.644301e+02 5.516400e+02\n3 12587     1.200100e+02 2.101300e+02\n8 12587     2.866700e+02 4.303500e+02\n2 12588     2.602600e+02 5.508500e+02\n8 12588     2.831900e+02 4.295100e+02\n9 12588     7.071997e+01 5.608800e+02\n2 12589     2.835100e+02 5.493800e+02\n3 12589     1.390900e+02 2.091800e+02\n6 12589     1.952900e+02 8.510300e+02\n8 12589     3.020100e+02 4.287700e+02\n9 12589     9.189001e+01 5.621600e+02\n13 12589     6.847500e+02 3.513800e+02\n2 12590     -2.012400e+02 5.488200e+02\n3 12590     -3.320300e+02 2.092000e+02\n11 12590     2.419200e+02 -3.610999e+01\n2 12591     -1.377500e+02 5.482900e+02\n3 12591     -2.726300e+02 2.073700e+02\n5 12591     6.010300e+02 1.315100e+02\n8 12591     -3.460999e+01 4.309000e+02\n11 12591     3.062500e+02 -3.041998e+01\n13 12591     3.418600e+02 4.078400e+02\n14 12591     4.962300e+02 4.059998e+01\n2 12592     -2.076700e+02 5.474900e+02\n8 12592     -9.245001e+01 4.292500e+02\n13 12592     2.778199e+02 3.997300e+02\n14 12592     4.201300e+02 3.312000e+01\n2 12593     2.672800e+02 5.466200e+02\n3 12593     1.229600e+02 2.052000e+02\n8 12593     2.887400e+02 4.266100e+02\n2 12594     2.777700e+02 5.462200e+02\n3 12594     1.331000e+02 2.050400e+02\n6 12594     1.873200e+02 8.470900e+02\n8 12594     2.967100e+02 4.256600e+02\n9 12594     8.569000e+01 5.578400e+02\n13 12594     6.786400e+02 3.488200e+02\n2 12595     2.538600e+02 5.452500e+02\n8 12595     2.772800e+02 4.248200e+02\n9 12595     6.403003e+01 5.562200e+02\n2 12596     -1.411800e+02 5.443000e+02\n3 12596     -2.761000e+02 2.039400e+02\n5 12596     5.954900e+02 1.267100e+02\n8 12596     -3.682001e+01 4.279700e+02\n2 12597     -2.748500e+02 5.435000e+02\n14 12597     3.490000e+02 2.298999e+01\n2 12598     3.202900e+02 5.430000e+02\n3 12598     1.735900e+02 2.024500e+02\n6 12598     2.383800e+02 8.367400e+02\n8 12598     3.317900e+02 4.229000e+02\n9 12598     1.231700e+02 5.561600e+02\n2 12599     -2.313800e+02 5.422700e+02\n6 12599     -4.289800e+02 8.776200e+02\n8 12599     -1.118300e+02 4.244100e+02\n13 12599     2.559200e+02 3.921900e+02\n14 12599     3.942000e+02 2.521002e+01\n2 12600     2.828900e+02 5.426100e+02\n6 12600     1.944900e+02 8.424600e+02\n9 12600     9.084998e+01 5.553000e+02\n13 12600     6.833800e+02 3.452800e+02\n2 12601     -1.253400e+02 5.418500e+02\n3 12601     -2.612600e+02 2.014300e+02\n4 12601     1.598300e+02 -5.169399e+02\n5 12601     6.149000e+02 1.258500e+02\n13 12601     3.529500e+02 4.044000e+02\n14 12601     5.096100e+02 3.633002e+01\n2 12602     2.663500e+02 5.408400e+02\n3 12602     1.219200e+02 1.999300e+02\n6 12602     1.743300e+02 8.426800e+02\n8 12602     2.881100e+02 4.214700e+02\n9 12602     7.653003e+01 5.530700e+02\n11 12602     5.977300e+02 -1.017500e+02\n13 12602     6.694800e+02 3.464500e+02\n2 12603     -3.731300e+02 5.400700e+02\n14 12603     2.475500e+02 1.056000e+01\n2 12604     -4.218300e+02 5.393300e+02\n3 12604     -5.404300e+02 2.044600e+02\n4 12604     1.616300e+02 -3.084600e+02\n5 12604     2.952200e+02 1.007800e+02\n11 12604     3.196002e+01 -6.295001e+01\n13 12604     9.165997e+01 3.708400e+02\n14 12604     1.997000e+02 5.869995e+00\n2 12605     -2.197300e+02 5.396900e+02\n8 12605     -1.024300e+02 4.228300e+02\n11 12605     2.229500e+02 -4.512000e+01\n2 12606     -1.373600e+02 5.392900e+02\n3 12606     -2.720700e+02 1.989600e+02\n5 12606     6.013800e+02 1.228100e+02\n11 12606     3.072000e+02 -3.734003e+01\n14 12606     4.967000e+02 3.212000e+01\n2 12607     -2.454800e+02 5.379300e+02\n6 12607     -4.460300e+02 8.685900e+02\n2 12608     -2.409100e+02 5.376000e+02\n6 12608     -4.416200e+02 8.690100e+02\n2 12609     3.119900e+02 5.373100e+02\n3 12609     1.655500e+02 1.969300e+02\n6 12609     2.285500e+02 8.320300e+02\n8 12609     3.245400e+02 4.185100e+02\n9 12609     1.159200e+02 5.512600e+02\n11 12609     6.347100e+02 -1.131800e+02\n13 12609     7.083600e+02 3.363600e+02\n2 12610     5.564500e+02 5.356400e+02\n8 12610     5.214700e+02 4.109600e+02\n2 12611     -5.661300e+02 5.348200e+02\n3 12611     -6.810200e+02 2.035700e+02\n5 12611     1.523000e+02 8.702002e+01\n8 12611     -3.883200e+02 4.097600e+02\n13 12611     -2.533002e+01 3.534200e+02\n14 12611     6.116998e+01 -8.919983e+00\n2 12612     -5.529500e+02 5.350200e+02\n3 12612     -6.677900e+02 2.023900e+02\n5 12612     1.655400e+02 8.819000e+01\n8 12612     -3.768800e+02 4.094800e+02\n11 12612     -8.383002e+01 -7.704999e+01\n13 12612     -1.488000e+01 3.547500e+02\n14 12612     7.328998e+01 -8.250000e+00\n2 12613     -4.973400e+02 5.345700e+02\n4 12613     1.610200e+02 -2.624900e+02\n5 12613     2.190601e+02 9.172998e+01\n8 12613     -3.314600e+02 4.122200e+02\n11 12613     -3.579999e+01 -7.171997e+01\n14 12613     1.256300e+02 -4.169983e+00\n2 12614     -3.260300e+02 5.337000e+02\n6 12614     -5.485000e+02 8.457700e+02\n2 12615     -5.877000e+02 5.322600e+02\n14 12615     4.132001e+01 -1.298999e+01\n2 12616     -1.720200e+02 5.319700e+02\n3 12616     -3.048100e+02 1.926200e+02\n4 12616     1.552800e+02 -4.787600e+02\n5 12616     5.608101e+02 1.128900e+02\n6 12616     -3.525300e+02 8.791600e+02\n8 12616     -6.223999e+01 4.175700e+02\n13 12616     3.092400e+02 3.908300e+02\n14 12616     4.574100e+02 2.202002e+01\n2 12617     -3.074900e+02 5.314100e+02\n5 12617     4.127500e+02 1.020200e+02\n6 12617     -5.246800e+02 8.470400e+02\n14 12617     3.136200e+02 8.809998e+00\n2 12618     -2.248700e+02 5.312000e+02\n3 12618     -3.542000e+02 1.927800e+02\n13 12618     2.609600e+02 3.845100e+02\n14 12618     4.006500e+02 1.632001e+01\n2 12619     -5.139400e+02 5.304400e+02\n5 12619     2.025400e+02 8.690997e+01\n2 12620     -1.677500e+02 5.304000e+02\n4 12620     1.532400e+02 -4.815100e+02\n6 12620     -3.472100e+02 8.779100e+02\n8 12620     -5.928003e+01 4.165800e+02\n11 12620     2.754301e+02 -4.700000e+01\n2 12621     -4.622700e+02 5.300700e+02\n5 12621     2.529700e+02 9.012000e+01\n2 12622     -4.167200e+02 5.295900e+02\n11 12622     3.532001e+01 -6.917999e+01\n2 12623     2.517600e+02 5.294000e+02\n8 12623     2.764500e+02 4.122100e+02\n9 12623     6.359003e+01 5.424500e+02\n2 12624     3.000800e+02 5.288700e+02\n3 12624     1.542800e+02 1.891200e+02\n8 12624     3.152900e+02 4.119100e+02\n9 12624     1.057900e+02 5.438700e+02\n11 12624     6.254301e+02 -1.178700e+02\n13 12624     6.971200e+02 3.316800e+02\n2 12625     -2.415200e+02 5.279800e+02\n3 12625     -3.700300e+02 1.896800e+02\n4 12625     1.537200e+02 -4.265900e+02\n6 12625     -4.402900e+02 8.575400e+02\n8 12625     -1.203400e+02 4.126100e+02\n11 12625     2.017600e+02 -5.640002e+01\n13 12625     2.463101e+02 3.801300e+02\n14 12625     3.825800e+02 1.120001e+01\n2 12626     -4.238700e+02 5.277500e+02\n13 12626     8.940997e+01 3.620300e+02\n2 12627     -1.174400e+02 5.265800e+02\n3 12627     -2.532900e+02 1.865300e+02\n4 12627     1.514600e+02 -5.213400e+02\n2 12628     1.991998e+01 5.256400e+02\n8 12628     9.762000e+01 4.163700e+02\n11 12628     4.739600e+02 -3.165002e+01\n2 12629     2.788400e+02 5.250000e+02\n6 12629     1.891000e+02 8.216800e+02\n8 12629     2.981300e+02 4.088400e+02\n11 12629     6.074700e+02 -1.178200e+02\n2 12630     2.788400e+02 5.250000e+02\n6 12630     1.891000e+02 8.216800e+02\n8 12630     2.981300e+02 4.088400e+02\n11 12630     6.074700e+02 -1.178200e+02\n2 12631     4.478199e+02 5.243200e+02\n3 12631     2.996000e+02 1.864000e+02\n8 12631     4.316000e+02 4.026200e+02\n9 12631     2.361600e+02 5.429000e+02\n2 12632     5.250200e+02 5.246900e+02\n8 12632     4.953199e+02 4.020100e+02\n2 12633     -3.032300e+02 5.233900e+02\n4 12633     1.520300e+02 -3.830400e+02\n5 12633     4.169600e+02 9.440002e+01\n6 12633     -5.187900e+02 8.377300e+02\n14 12633     3.181200e+02 1.669983e+00\n2 12634     -1.494000e+02 5.234900e+02\n3 12634     -2.832200e+02 1.839500e+02\n4 12634     1.499000e+02 -4.952900e+02\n5 12634     5.859800e+02 1.062400e+02\n6 12634     -3.232000e+02 8.736600e+02\n14 12634     4.810100e+02 1.696997e+01\n2 12635     -1.550500e+02 5.223500e+02\n3 12635     -2.888800e+02 1.833500e+02\n5 12635     5.792200e+02 1.050500e+02\n6 12635     -3.303100e+02 8.708800e+02\n11 12635     2.885800e+02 -5.246997e+01\n13 12635     3.244600e+02 3.851000e+02\n14 12635     4.758500e+02 1.489001e+01\n2 12636     -2.354500e+02 5.205500e+02\n11 12636     2.073000e+02 -6.192999e+01\n13 12636     2.512900e+02 3.745400e+02\n14 12636     3.887000e+02 5.010010e+00\n2 12637     -1.515300e+02 5.207600e+02\n3 12637     -2.855400e+02 1.822100e+02\n6 12637     -3.252200e+02 8.692400e+02\n8 12637     -4.534003e+01 4.089100e+02\n11 12637     2.919900e+02 -5.303998e+01\n14 12637     4.795601e+02 1.321997e+01\n2 12638     -5.618700e+02 5.189500e+02\n5 12638     1.553800e+02 7.460999e+01\n11 12638     -9.146002e+01 -8.720001e+01\n13 12638     -2.222998e+01 3.422600e+02\n14 12638     6.404999e+01 -2.202002e+01\n2 12639     5.094301e+02 5.188800e+02\n3 12639     3.574900e+02 1.822800e+02\n2 12640     -1.860900e+02 5.178100e+02\n5 12640     5.435900e+02 9.658002e+01\n11 12640     2.565400e+02 -5.871002e+01\n2 12641     2.609301e+02 5.175200e+02\n6 12641     1.679400e+02 8.152300e+02\n9 12641     7.178998e+01 5.324700e+02\n2 12642     5.974200e+02 5.173300e+02\n3 12642     4.395900e+02 1.817400e+02\n8 12642     5.562300e+02 3.945400e+02\n2 12643     -7.969900e+02 5.169500e+02\n5 12643     -5.669000e+01 5.937000e+01\n8 12643     -5.749200e+02 3.891600e+02\n14 12643     -1.435800e+02 -3.982001e+01\n2 12644     -2.282800e+02 5.169600e+02\n6 12644     -4.231400e+02 8.462600e+02\n11 12644     2.145900e+02 -6.335999e+01\n2 12645     -2.282800e+02 5.169600e+02\n6 12645     -4.231400e+02 8.462600e+02\n2 12646     -2.282800e+02 5.169600e+02\n6 12646     -4.231400e+02 8.462600e+02\n11 12646     2.145900e+02 -6.335999e+01\n2 12647     -1.516600e+02 5.170600e+02\n11 12647     2.918800e+02 -5.632001e+01\n2 12648     -7.996000e+02 5.145000e+02\n5 12648     -5.963000e+01 5.809003e+01\n14 12648     -1.461100e+02 -4.135999e+01\n2 12649     -5.839500e+02 5.141600e+02\n11 12649     -1.102700e+02 -9.233002e+01\n14 12649     4.313000e+01 -2.738000e+01\n2 12650     5.566400e+02 5.121400e+02\n3 12650     4.024399e+02 1.761800e+02\n6 12650     4.998400e+02 7.258900e+02\n8 12650     5.227400e+02 3.909600e+02\n9 12650     3.295601e+02 5.342500e+02\n2 12651     5.087000e+01 5.114900e+02\n11 12651     5.086200e+02 -3.956000e+01\n2 12652     -6.879700e+02 5.104200e+02\n5 12652     3.740002e+01 6.046997e+01\n14 12652     -5.117999e+01 -3.773999e+01\n2 12653     5.803300e+02 5.103100e+02\n3 12653     4.240400e+02 1.751200e+02\n2 12654     -5.658300e+02 5.079600e+02\n3 12654     -6.819200e+02 1.781300e+02\n5 12654     1.508300e+02 6.428998e+01\n13 12654     -2.584003e+01 3.338700e+02\n14 12654     5.944000e+01 -3.156000e+01\n2 12655     -1.108800e+02 5.069500e+02\n13 12655     3.635300e+02 3.762300e+02\n14 12655     5.226200e+02 3.539978e+00\n2 12656     -2.388200e+02 5.065100e+02\n3 12656     -3.677300e+02 1.690700e+02\n6 12656     -4.350100e+02 8.307900e+02\n8 12656     -1.179200e+02 3.956900e+02\n11 12656     2.045400e+02 -7.234003e+01\n13 12656     2.478101e+02 3.631200e+02\n14 12656     3.845900e+02 -8.119995e+00\n2 12657     6.484000e+02 5.047300e+02\n3 12657     4.872200e+02 1.707400e+02\n8 12657     5.989600e+02 3.841400e+02\n9 12657     4.065200e+02 5.298000e+02\n2 12658     3.246002e+01 5.026000e+02\n5 12658     7.999900e+02 1.009600e+02\n8 12658     1.080400e+02 3.981100e+02\n2 12659     8.010010e+00 5.006800e+02\n6 12659     -1.207100e+02 8.807700e+02\n11 12659     4.610699e+02 -5.297998e+01\n14 12659     6.599000e+02 1.059998e+01\n2 12660     -9.053003e+01 4.996800e+02\n5 12660     6.513199e+02 8.770001e+01\n2 12661     7.104500e+02 4.996300e+02\n3 12661     5.445601e+02 1.666200e+02\n2 12662     -2.486600e+02 4.965600e+02\n5 12662     4.726500e+02 7.287000e+01\n6 12662     -4.467200e+02 8.156900e+02\n8 12662     -1.258800e+02 3.871900e+02\n11 12662     1.938900e+02 -8.113000e+01\n2 12663     2.602800e+02 4.919400e+02\n6 12663     1.667200e+02 7.830500e+02\n13 12663     6.591100e+02 3.057900e+02\n2 12664     2.602800e+02 4.919400e+02\n3 12664     1.167100e+02 1.539400e+02\n8 12664     2.823900e+02 3.827600e+02\n9 12664     7.062000e+01 5.120400e+02\n11 12664     5.921400e+02 -1.410100e+02\n2 12665     -1.373999e+01 4.916500e+02\n5 12665     7.424500e+02 8.688000e+01\n8 12665     6.941998e+01 3.886600e+02\n2 12666     -2.936200e+02 4.911600e+02\n5 12666     4.239500e+02 6.497998e+01\n6 12666     -5.031300e+02 7.986300e+02\n8 12666     -1.630300e+02 3.818800e+02\n11 12666     1.505500e+02 -8.878003e+01\n14 12666     3.264399e+02 -2.657001e+01\n2 12667     1.583600e+02 4.895600e+02\n3 12667     2.770020e+00 1.513000e+02\n8 12667     2.134000e+02 3.895700e+02\n14 12667     8.437900e+02 1.721997e+01\n2 12668     -3.380500e+02 4.888600e+02\n5 12668     3.771200e+02 6.039001e+01\n6 12668     -5.583500e+02 7.861800e+02\n11 12668     1.077300e+02 -9.414001e+01\n2 12669     -3.306800e+02 4.879500e+02\n5 12669     3.841700e+02 5.964001e+01\n2 12670     -3.306800e+02 4.879500e+02\n5 12670     3.841700e+02 5.964001e+01\n2 12671     -7.248800e+02 4.876100e+02\n5 12671     2.590027e+00 3.885999e+01\n14 12671     -8.514001e+01 -5.898999e+01\n2 12672     2.585601e+02 4.873000e+02\n6 12672     1.646800e+02 7.779600e+02\n8 12672     2.816800e+02 3.779700e+02\n13 12672     6.575000e+02 3.022000e+02\n2 12673     -3.195200e+02 4.825300e+02\n5 12673     3.957100e+02 5.534998e+01\n8 12673     -1.846900e+02 3.741200e+02\n11 12673     1.252300e+02 -9.741998e+01\n2 12674     -3.195200e+02 4.825300e+02\n8 12674     -1.846900e+02 3.741200e+02\n11 12674     1.252300e+02 -9.741998e+01\n2 12675     -1.950600e+02 4.818300e+02\n13 12675     2.860800e+02 3.484100e+02\n2 12676     -3.087100e+02 4.814000e+02\n11 12676     1.361400e+02 -9.696002e+01\n14 12676     3.105601e+02 -3.698999e+01\n2 12677     7.621997e+01 4.817300e+02\n6 12677     -3.207001e+01 8.729300e+02\n13 12677     5.445000e+02 3.770300e+02\n2 12678     6.903003e+01 4.811700e+02\n6 12678     -4.115997e+01 8.697200e+02\n2 12679     -1.563900e+02 4.803400e+02\n3 12679     -2.911800e+02 1.420700e+02\n6 12679     -3.285800e+02 8.161000e+02\n8 12679     -4.914001e+01 3.765300e+02\n14 12679     4.712400e+02 -2.521002e+01\n2 12680     -1.449300e+02 4.800000e+02\n6 12680     -3.144000e+02 8.188700e+02\n8 12680     -3.963000e+01 3.765700e+02\n2 12681     -3.300900e+02 4.782700e+02\n5 12681     3.843500e+02 5.077002e+01\n2 12682     -3.300900e+02 4.782700e+02\n5 12682     3.843500e+02 5.077002e+01\n6 12682     -5.475400e+02 7.743600e+02\n8 12682     -1.933500e+02 3.706800e+02\n11 12682     1.153400e+02 -1.012600e+02\n2 12683     -3.300900e+02 4.782700e+02\n11 12683     1.153400e+02 -1.012600e+02\n2 12684     -6.742900e+02 4.775100e+02\n3 12684     -7.906700e+02 1.504600e+02\n13 12684     -1.095400e+02 3.022800e+02\n14 12684     -4.115997e+01 -6.457001e+01\n2 12685     -6.162900e+02 4.776900e+02\n3 12685     -7.329100e+02 1.505800e+02\n2 12686     -6.162900e+02 4.776900e+02\n11 12686     -1.385400e+02 -1.184800e+02\n2 12687     -3.031700e+02 4.760700e+02\n6 12687     -5.137000e+02 7.773100e+02\n14 12687     3.153500e+02 -4.091998e+01\n2 12688     -1.536800e+02 4.748600e+02\n6 12688     -3.252500e+02 8.099900e+02\n11 12688     2.886801e+02 -9.007001e+01\n14 12688     4.741000e+02 -3.017999e+01\n2 12689     -1.798999e+01 4.750200e+02\n6 12689     -1.527000e+02 8.419200e+02\n11 12689     4.319200e+02 -7.742999e+01\n13 12689     4.502400e+02 3.601100e+02\n14 12689     6.276400e+02 -1.750000e+01\n2 12690     6.027200e+02 4.743300e+02\n9 12690     3.684800e+02 5.029900e+02\n2 12691     -8.789978e+00 4.738800e+02\n3 12691     -1.526100e+02 1.354600e+02\n14 12691     6.383000e+02 -1.716998e+01\n2 12692     -5.994800e+02 4.735900e+02\n13 12692     -5.309003e+01 3.059100e+02\n14 12692     2.589001e+01 -6.294000e+01\n2 12693     -2.453003e+01 4.737400e+02\n3 12693     -1.668400e+02 1.355100e+02\n5 12693     7.273800e+02 6.725000e+01\n6 12693     -1.609300e+02 8.388700e+02\n8 12693     6.081000e+01 3.737500e+02\n11 12693     4.259700e+02 -7.862000e+01\n14 12693     6.208500e+02 -1.846002e+01\n2 12694     -2.087300e+02 4.724300e+02\n3 12694     -3.399100e+02 1.352600e+02\n8 12694     -9.320001e+01 3.690600e+02\n2 12695     5.119000e+02 4.727100e+02\n6 12695     4.460500e+02 6.877600e+02\n8 12695     4.846801e+02 3.601400e+02\n9 12695     2.920500e+02 5.003700e+02\n11 12695     7.601100e+02 -2.489900e+02\n2 12696     -1.592300e+02 4.719000e+02\n6 12696     -3.322100e+02 8.046600e+02\n13 12696     3.173199e+02 3.437400e+02\n14 12696     4.677900e+02 -3.288000e+01\n2 12697     4.887000e+01 4.719600e+02\n3 12697     -9.841998e+01 1.341100e+02\n5 12697     8.179200e+02 7.328003e+01\n6 12697     -6.702002e+01 8.541600e+02\n8 12697     1.218500e+02 3.737100e+02\n13 12697     5.159100e+02 3.659300e+02\n14 12697     7.069900e+02 -1.245001e+01\n2 12698     3.432300e+02 4.718200e+02\n3 12698     1.969900e+02 1.359300e+02\n6 12698     2.628100e+02 7.464900e+02\n2 12699     -6.462700e+02 4.710400e+02\n3 12699     -7.633800e+02 1.441300e+02\n2 12700     -7.665000e+02 4.705200e+02\n14 12700     -1.220200e+02 -7.556000e+01\n2 12701     -2.026900e+02 4.695500e+02\n13 12701     2.781200e+02 3.376000e+02\n2 12702     -7.106800e+02 4.674400e+02\n5 12702     1.348999e+01 2.260999e+01\n13 12702     -1.367900e+02 2.926100e+02\n14 12702     -7.379999e+01 -7.432001e+01\n2 12703     -6.124600e+02 4.662700e+02\n3 12703     -7.294300e+02 1.394600e+02\n13 12703     -6.310999e+01 2.990300e+02\n2 12704     -7.659000e+02 4.653500e+02\n5 12704     -3.548999e+01 1.828003e+01\n8 12704     -5.497600e+02 3.504900e+02\n2 12705     -1.039001e+01 4.645700e+02\n3 12705     -1.541400e+02 1.265600e+02\n6 12705     -1.427100e+02 8.304400e+02\n14 12705     6.359399e+02 -2.640002e+01\n2 12706     -2.273800e+02 4.642300e+02\n6 12706     -4.166500e+02 7.787400e+02\n8 12706     -1.083800e+02 3.617800e+02\n11 12706     2.130700e+02 -1.049900e+02\n2 12707     -1.409003e+01 4.623500e+02\n6 12707     -1.471700e+02 8.266900e+02\n11 12707     4.363800e+02 -8.675000e+01\n13 12707     4.530800e+02 3.504500e+02\n14 12707     6.313101e+02 -2.908002e+01\n2 12708     1.758002e+01 4.608000e+02\n13 12708     4.838700e+02 3.526000e+02\n2 12709     4.540900e+02 4.572900e+02\n6 12709     3.782800e+02 6.778700e+02\n2 12710     1.092300e+02 4.558900e+02\n6 12710     1.053003e+01 8.481600e+02\n2 12711     1.092300e+02 4.558900e+02\n6 12711     1.053003e+01 8.481600e+02\n2 12712     -3.225300e+02 4.531000e+02\n3 12712     -4.480400e+02 1.186600e+02\n5 12712     3.895800e+02 2.765002e+01\n11 12712     1.215400e+02 -1.195500e+02\n14 12712     2.935800e+02 -6.335999e+01\n2 12713     -3.426300e+02 4.513700e+02\n5 12713     3.689301e+02 2.516998e+01\n2 12714     -3.563300e+02 4.510900e+02\n3 12714     -4.804900e+02 1.170800e+02\n6 12714     -5.770800e+02 7.343400e+02\n8 12714     -2.149700e+02 3.483800e+02\n11 12714     8.865002e+01 -1.238400e+02\n2 12715     -6.441998e+01 4.510500e+02\n13 12715     4.039399e+02 3.360600e+02\n14 12715     5.725601e+02 -4.439001e+01\n2 12716     -6.897000e+02 4.494200e+02\n8 12716     -4.878100e+02 3.389600e+02\n11 12716     -1.979300e+02 -1.420400e+02\n2 12717     -2.605200e+02 4.481000e+02\n3 12717     -3.891200e+02 1.130100e+02\n5 12717     4.559301e+02 2.682001e+01\n6 12717     -4.571400e+02 7.524200e+02\n8 12717     -1.355300e+02 3.480400e+02\n11 12717     1.818600e+02 -1.190600e+02\n2 12718     -6.235999e+01 4.473700e+02\n3 12718     -2.031200e+02 1.096700e+02\n5 12718     6.786200e+02 3.813000e+01\n8 12718     2.896002e+01 3.521000e+02\n11 12718     3.835100e+02 -1.035300e+02\n13 12718     4.055500e+02 3.331600e+02\n14 12718     5.744900e+02 -4.797998e+01\n2 12719     -1.879500e+02 4.471800e+02\n8 12719     -7.540002e+01 3.487800e+02\n11 12719     2.539200e+02 -1.146000e+02\n14 12719     4.354900e+02 -5.881000e+01\n2 12720     -1.828998e+01 4.467900e+02\n3 12720     -1.614400e+02 1.093000e+02\n5 12720     7.313700e+02 4.144000e+01\n6 12720     -1.526100e+02 8.072100e+02\n11 12720     4.310500e+02 -9.919000e+01\n13 12720     4.479200e+02 3.372300e+02\n14 12720     6.256899e+02 -4.383002e+01\n2 12721     -2.937200e+02 4.454900e+02\n14 12721     3.234100e+02 -6.807001e+01\n2 12722     -1.375900e+02 4.447600e+02\n5 12722     5.904000e+02 3.007001e+01\n11 12722     3.038800e+02 -1.128700e+02\n2 12723     4.071400e+02 4.443100e+02\n3 12723     2.586600e+02 1.113700e+02\n6 12723     3.358600e+02 7.046500e+02\n8 12723     4.016000e+02 3.415200e+02\n9 12723     2.001500e+02 4.731100e+02\n2 12724     -1.507800e+02 4.426700e+02\n5 12724     5.762400e+02 2.796002e+01\n2 12725     -1.043700e+02 4.421400e+02\n6 12725     -2.608400e+02 7.807800e+02\n2 12726     -5.884400e+02 4.417800e+02\n14 12726     3.413000e+01 -8.926001e+01\n2 12727     -2.527002e+01 4.403400e+02\n11 12727     4.238600e+02 -1.063400e+02\n13 12727     4.410200e+02 3.313400e+02\n14 12727     6.171000e+02 -5.122998e+01\n2 12728     -6.072400e+02 4.400300e+02\n11 12728     -1.320300e+02 -1.451500e+02\n13 12728     -5.996997e+01 2.808100e+02\n14 12728     1.623999e+01 -9.183002e+01\n2 12729     4.064399e+02 4.388100e+02\n3 12729     2.583199e+02 1.060100e+02\n6 12729     3.348200e+02 6.979700e+02\n8 12729     4.006500e+02 3.365800e+02\n9 12729     1.994500e+02 4.682200e+02\n13 12729     7.797400e+02 2.349600e+02\n2 12730     -6.012600e+02 4.375600e+02\n3 12730     -7.197300e+02 1.099100e+02\n11 12730     -1.270000e+02 -1.458500e+02\n13 12730     -5.508002e+01 2.795900e+02\n14 12730     2.190997e+01 -9.362000e+01\n2 12731     -3.679100e+02 4.375800e+02\n5 12731     3.414900e+02 1.077002e+01\n8 12731     -2.237400e+02 3.366600e+02\n2 12732     5.128199e+02 4.375600e+02\n6 12732     4.441600e+02 6.454600e+02\n9 12732     2.930800e+02 4.697800e+02\n2 12733     5.128199e+02 4.375600e+02\n3 12733     3.636300e+02 1.072500e+02\n6 12733     4.441600e+02 6.454600e+02\n9 12733     2.930800e+02 4.697800e+02\n2 12734     6.258800e+02 4.377000e+02\n6 12734     5.736700e+02 6.291300e+02\n9 12734     3.890800e+02 4.722400e+02\n2 12735     -2.925000e+02 4.369400e+02\n6 12735     -4.960100e+02 7.312800e+02\n14 12735     3.239500e+02 -7.553998e+01\n2 12736     -8.623999e+01 4.355000e+02\n5 12736     6.496400e+02 2.538000e+01\n6 12736     -2.376900e+02 7.771400e+02\n8 12736     9.219971e+00 3.417900e+02\n13 12736     3.827600e+02 3.218500e+02\n14 12736     5.469301e+02 -6.054999e+01\n2 12737     5.370001e+01 4.330100e+02\n3 12737     -9.419000e+01 9.598999e+01\n8 12737     1.257200e+02 3.425200e+02\n13 12737     5.170500e+02 3.326000e+02\n14 12737     7.099301e+02 -5.148999e+01\n2 12738     -3.909600e+02 4.318100e+02\n3 12738     -5.139700e+02 9.953003e+01\n14 12738     2.235900e+02 -8.646002e+01\n2 12739     -7.341998e+01 4.298600e+02\n13 12739     3.942400e+02 3.182100e+02\n14 12739     5.610100e+02 -6.537000e+01\n2 12740     -7.341998e+01 4.298600e+02\n3 12740     -2.134700e+02 9.307001e+01\n14 12740     5.610100e+02 -6.537000e+01\n2 12741     3.835100e+02 4.300100e+02\n6 12741     3.075000e+02 6.886600e+02\n2 12742     -3.962900e+02 4.293200e+02\n13 12742     1.088700e+02 2.893900e+02\n14 12742     2.176000e+02 -8.920001e+01\n2 12743     -3.962900e+02 4.293200e+02\n3 12743     -5.198200e+02 9.727002e+01\n13 12743     1.088700e+02 2.893900e+02\n14 12743     2.176000e+02 -8.920001e+01\n2 12744     5.359998e+01 4.280300e+02\n3 12744     -9.429999e+01 9.129999e+01\n6 12744     -6.020001e+01 7.999000e+02\n8 12744     1.256500e+02 3.386900e+02\n9 12744     -1.119100e+02 4.483900e+02\n13 12744     5.166200e+02 3.289700e+02\n14 12744     7.096300e+02 -5.584998e+01\n2 12745     -7.676001e+01 4.269200e+02\n5 12745     6.600100e+02 1.721997e+01\n6 12745     -2.250400e+02 7.682700e+02\n2 12746     -7.676001e+01 4.269200e+02\n5 12746     6.600100e+02 1.721997e+01\n2 12747     -7.214200e+02 4.260000e+02\n13 12747     -1.456900e+02 2.633100e+02\n2 12748     -1.529700e+02 4.262200e+02\n13 12748     3.202700e+02 3.075900e+02\n2 12749     -2.954100e+02 4.243500e+02\n5 12749     4.161600e+02 2.510010e+00\n14 12749     3.202500e+02 -8.728998e+01\n2 12750     -2.954100e+02 4.243500e+02\n5 12750     4.161600e+02 2.510010e+00\n6 12750     -4.982400e+02 7.153800e+02\n11 12750     1.473700e+02 -1.396800e+02\n14 12750     3.202500e+02 -8.728998e+01\n2 12751     -2.950012e+00 4.243800e+02\n3 12751     -1.472000e+02 8.840997e+01\n5 12751     7.477000e+02 1.796002e+01\n6 12751     -1.319900e+02 7.806100e+02\n8 12751     7.832001e+01 3.337500e+02\n9 12751     -1.599100e+02 4.434200e+02\n13 12751     4.609800e+02 3.199200e+02\n14 12751     6.421100e+02 -6.569000e+01\n2 12752     -2.191300e+02 4.237600e+02\n5 12752     4.979200e+02 4.929993e+00\n2 12753     -3.142100e+02 4.217600e+02\n5 12753     3.959301e+02 -9.299927e-01\n14 12753     3.006700e+02 -9.089001e+01\n2 12754     -1.835800e+02 4.200100e+02\n5 12754     5.368500e+02 3.289978e+00\n6 12754     -3.590300e+02 7.340400e+02\n8 12754     -7.189001e+01 3.265100e+02\n9 12754     -3.141600e+02 4.338800e+02\n11 12754     2.572900e+02 -1.359100e+02\n2 12755     -4.891000e+02 4.185400e+02\n5 12755     2.174700e+02 -1.042999e+01\n8 12755     -3.235200e+02 3.198200e+02\n2 12756     -5.909900e+02 4.176200e+02\n8 12756     -4.080100e+02 3.164600e+02\n2 12757     -6.646002e+01 4.159800e+02\n3 12757     -2.069300e+02 7.959998e+01\n8 12757     2.554999e+01 3.264000e+02\n2 12758     -3.597700e+02 4.155800e+02\n3 12758     -4.849100e+02 8.209003e+01\n11 12758     8.609003e+01 -1.502800e+02\n13 12758     1.391300e+02 2.818500e+02\n14 12758     2.536700e+02 -9.959998e+01\n2 12759     -5.265400e+02 4.137000e+02\n5 12759     1.803400e+02 -1.614001e+01\n8 12759     -3.543300e+02 3.155400e+02\n11 12759     -6.442999e+01 -1.597600e+02\n2 12760     -6.003998e+01 4.125800e+02\n4 12760     8.408002e+01 -5.517000e+02\n11 12760     3.871500e+02 -1.305300e+02\n14 12760     5.758199e+02 -8.045001e+01\n2 12761     5.042000e+02 4.126700e+02\n3 12761     3.562800e+02 8.441998e+01\n8 12761     4.765900e+02 3.100400e+02\n2 12762     3.239301e+02 4.122500e+02\n6 12762     2.382400e+02 6.770700e+02\n8 12762     3.335200e+02 3.142300e+02\n2 12763     -4.795400e+02 4.111800e+02\n8 12763     -3.161300e+02 3.151200e+02\n2 12764     5.268700e+02 4.108800e+02\n6 12764     4.593300e+02 6.124600e+02\n9 12764     3.054399e+02 4.470800e+02\n12 12764     5.404500e+02 6.211400e+02\n2 12765     -5.444700e+02 4.100800e+02\n5 12765     1.627900e+02 -2.023999e+01\n8 12765     -3.688500e+02 3.116300e+02\n11 12765     -7.940002e+01 -1.630700e+02\n13 12765     -1.140997e+01 2.641100e+02\n14 12765     7.316998e+01 -1.138800e+02\n2 12766     3.960100e+02 4.084400e+02\n3 12766     2.487000e+02 7.669000e+01\n6 12766     3.210500e+02 6.617800e+02\n2 12767     -2.849300e+02 4.078800e+02\n5 12767     4.252100e+02 -1.233002e+01\n2 12768     -5.378700e+02 4.073800e+02\n8 12768     -3.637000e+02 3.098600e+02\n11 12768     -7.402002e+01 -1.639400e+02\n13 12768     -6.369995e+00 2.627500e+02\n14 12768     7.908002e+01 -1.155500e+02\n2 12769     -1.529500e+02 4.074600e+02\n9 12769     -2.874500e+02 4.242100e+02\n13 12769     3.192000e+02 2.923700e+02\n14 12769     4.707900e+02 -9.346002e+01\n2 12770     -5.452800e+02 4.062000e+02\n3 12770     -6.660100e+02 7.720001e+01\n2 12771     -5.614400e+02 4.034400e+02\n5 12771     1.456500e+02 -2.670001e+01\n8 12771     -3.830600e+02 3.067000e+02\n11 12771     -9.456000e+01 -1.677100e+02\n12 12771     -6.337400e+02 6.202300e+02\n14 12771     5.654999e+01 -1.202600e+02\n2 12772     -7.674300e+02 4.023900e+02\n5 12772     -4.271997e+01 -3.419000e+01\n8 12772     -5.501100e+02 2.998600e+02\n2 12773     -5.583300e+02 4.028100e+02\n11 12773     -9.198999e+01 -1.691400e+02\n12 12773     -6.299700e+02 6.198200e+02\n2 12774     -1.310100e+02 4.019000e+02\n5 12774     5.933900e+02 -1.150000e+01\n6 12774     -2.925200e+02 7.237000e+02\n8 12774     -2.814001e+01 3.138500e+02\n9 12774     -2.681100e+02 4.203100e+02\n2 12775     -5.927300e+02 4.008000e+02\n8 12775     -4.081000e+02 3.034400e+02\n12 12775     -6.696000e+02 6.125900e+02\n14 12775     2.720001e+01 -1.238400e+02\n2 12776     -5.814200e+02 4.004900e+02\n3 12776     -7.014400e+02 7.291998e+01\n2 12777     -1.424000e+02 4.003200e+02\n3 12777     -2.785100e+02 6.458002e+01\n5 12777     5.806899e+02 -1.351001e+01\n6 12777     -3.064000e+02 7.192000e+02\n8 12777     -3.810999e+01 3.120100e+02\n9 12777     -2.778900e+02 4.184300e+02\n11 12777     2.973700e+02 -1.485400e+02\n13 12777     3.277300e+02 2.873500e+02\n14 12777     4.813500e+02 -9.956000e+01\n2 12778     -1.389400e+02 4.006800e+02\n5 12778     5.846300e+02 -1.290997e+01\n6 12778     -3.026200e+02 7.204400e+02\n9 12778     -2.748200e+02 4.191000e+02\n2 12779     5.732001e+01 4.000400e+02\n3 12779     -9.101001e+01 6.414001e+01\n5 12779     8.199800e+02 -1.799988e+00\n6 12779     -5.510999e+01 7.648000e+02\n8 12779     1.284800e+02 3.159000e+02\n9 12779     -1.081600e+02 4.238600e+02\n11 12779     5.138900e+02 -1.324400e+02\n13 12779     5.177400e+02 3.054200e+02\n14 12779     7.121500e+02 -8.367999e+01\n2 12780     -6.022400e+02 3.991200e+02\n12 12780     -6.807200e+02 6.089700e+02\n14 12780     1.832001e+01 -1.256800e+02\n2 12781     -6.022400e+02 3.991200e+02\n12 12781     -6.807200e+02 6.089700e+02\n14 12781     1.832001e+01 -1.256800e+02\n2 12782     -5.378300e+02 3.989000e+02\n5 12782     1.681000e+02 -2.984003e+01\n14 12782     7.842999e+01 -1.230900e+02\n2 12783     -5.378300e+02 3.989000e+02\n5 12783     1.681000e+02 -2.984003e+01\n2 12784     -1.402300e+02 3.974000e+02\n5 12784     5.826899e+02 -1.617999e+01\n9 12784     -2.761600e+02 4.158800e+02\n2 12785     -5.328300e+02 3.965000e+02\n5 12785     1.727900e+02 -3.178998e+01\n8 12785     -3.595500e+02 3.012400e+02\n11 12785     -6.973999e+01 -1.722900e+02\n12 12785     -5.990400e+02 6.164700e+02\n14 12785     8.309003e+01 -1.250900e+02\n2 12786     -5.608200e+02 3.952800e+02\n3 12786     -6.813500e+02 6.762000e+01\n5 12786     1.458100e+02 -3.384003e+01\n11 12786     -9.428003e+01 -1.740300e+02\n12 12786     -6.314900e+02 6.106000e+02\n2 12787     -3.271500e+02 3.954200e+02\n4 12787     8.540002e+01 -3.508900e+02\n6 12787     -5.375600e+02 6.734200e+02\n8 12787     -1.914700e+02 3.056100e+02\n11 12787     1.138500e+02 -1.644700e+02\n2 12788     -7.690000e+02 3.950900e+02\n8 12788     -5.513500e+02 2.942700e+02\n11 12788     -2.610400e+02 -1.818700e+02\n2 12789     -2.511100e+02 3.947900e+02\n4 12789     8.234003e+01 -4.028000e+02\n5 12789     4.604100e+02 -2.371997e+01\n11 12789     1.894000e+02 -1.593300e+02\n13 12789     2.311600e+02 2.745400e+02\n14 12789     3.643700e+02 -1.115600e+02\n2 12790     6.046997e+01 3.941800e+02\n9 12790     -1.050100e+02 4.187700e+02\n14 12790     7.159500e+02 -8.898999e+01\n2 12791     -7.508500e+02 3.932800e+02\n14 12791     -1.144700e+02 -1.369600e+02\n2 12792     -7.346800e+02 3.935900e+02\n5 12792     -1.479999e+01 -3.982001e+01\n8 12792     -5.235500e+02 2.938000e+02\n2 12793     -1.333600e+02 3.921100e+02\n5 12793     5.911500e+02 -2.032001e+01\n6 12793     -2.940700e+02 7.124900e+02\n8 12793     -2.981000e+01 3.062400e+02\n9 12793     -2.698300e+02 4.115300e+02\n11 12793     3.087400e+02 -1.527600e+02\n14 12793     4.920300e+02 -1.049600e+02\n2 12794     -7.599200e+02 3.898800e+02\n11 12794     -2.545300e+02 -1.848300e+02\n2 12795     6.381300e+02 3.881800e+02\n3 12795     4.839399e+02 6.448999e+01\n12 12795     6.630601e+02 5.836700e+02\n2 12796     -3.352200e+02 3.880600e+02\n14 12796     2.771600e+02 -1.235500e+02\n2 12797     4.285999e+01 3.877800e+02\n11 12797     4.976600e+02 -1.439900e+02\n2 12798     -5.304400e+02 3.872200e+02\n8 12798     -3.571600e+02 2.937700e+02\n12 12798     -5.952700e+02 6.072200e+02\n14 12798     8.450000e+01 -1.326000e+02\n2 12799     -5.304400e+02 3.872200e+02\n14 12799     8.450000e+01 -1.326000e+02\n2 12800     -5.304400e+02 3.872200e+02\n12 12800     -5.952700e+02 6.072200e+02\n2 12801     -6.501900e+02 3.872000e+02\n5 12801     6.115997e+01 -4.357001e+01\n12 12801     -7.343000e+02 5.891100e+02\n14 12801     -2.641998e+01 -1.384000e+02\n2 12802     -7.911400e+02 3.861000e+02\n5 12802     -6.448999e+01 -4.742999e+01\n8 12802     -5.690900e+02 2.860400e+02\n11 12802     -2.777400e+02 -1.882400e+02\n14 12802     -1.496800e+02 -1.442200e+02\n2 12803     -7.911400e+02 3.861000e+02\n5 12803     -6.448999e+01 -4.742999e+01\n8 12803     -5.690900e+02 2.860400e+02\n11 12803     -2.777400e+02 -1.882400e+02\n14 12803     -1.496800e+02 -1.442200e+02\n2 12804     -5.237900e+02 3.858900e+02\n5 12804     1.808200e+02 -4.070001e+01\n12 12804     -5.876100e+02 6.069200e+02\n2 12805     -5.237900e+02 3.858900e+02\n3 12805     -6.450900e+02 5.729999e+01\n5 12805     1.808200e+02 -4.070001e+01\n14 12805     9.113000e+01 -1.336800e+02\n2 12806     -1.259800e+02 3.860100e+02\n5 12806     5.987600e+02 -2.557001e+01\n6 12806     -2.847200e+02 7.070600e+02\n8 12806     -2.395001e+01 3.012200e+02\n2 12807     -1.128800e+02 3.855500e+02\n9 12807     -2.520000e+02 4.063700e+02\n14 12807     5.139800e+02 -1.106200e+02\n2 12808     -6.532300e+02 3.848300e+02\n5 12808     5.803003e+01 -4.498999e+01\n8 12808     -4.574500e+02 2.892200e+02\n11 12808     -1.710200e+02 -1.844800e+02\n12 12808     -7.374600e+02 5.867400e+02\n13 12808     -9.603003e+01 2.382600e+02\n14 12808     -2.928998e+01 -1.402000e+02\n2 12809     -6.532300e+02 3.848300e+02\n11 12809     -1.710200e+02 -1.844800e+02\n12 12809     -7.374600e+02 5.867400e+02\n2 12810     -4.753900e+02 3.848100e+02\n3 12810     -5.975100e+02 5.544000e+01\n5 12810     2.277900e+02 -4.004999e+01\n11 12810     -2.039001e+01 -1.780900e+02\n14 12810     1.375300e+02 -1.319400e+02\n2 12811     -4.162000e+02 3.821200e+02\n5 12811     2.871600e+02 -4.082001e+01\n12 12811     -4.607500e+02 6.189200e+02\n2 12812     -4.162000e+02 3.821200e+02\n5 12812     2.871600e+02 -4.082001e+01\n2 12813     -4.162000e+02 3.821200e+02\n5 12813     2.871600e+02 -4.082001e+01\n12 12813     -4.607500e+02 6.189200e+02\n2 12814     -5.642400e+02 3.816200e+02\n5 12814     1.410700e+02 -4.578003e+01\n12 12814     -6.335800e+02 5.960400e+02\n2 12815     -5.642400e+02 3.816200e+02\n12 12815     -6.335800e+02 5.960400e+02\n2 12816     -7.496800e+02 3.795800e+02\n5 12816     -2.940997e+01 -5.185999e+01\n8 12816     -5.358000e+02 2.829000e+02\n2 12817     -2.475900e+02 3.789600e+02\n3 12817     -3.783300e+02 4.470001e+01\n6 12817     -4.346200e+02 6.703800e+02\n13 12817     2.337100e+02 2.625500e+02\n14 12817     3.674600e+02 -1.258800e+02\n2 12818     4.294200e+02 3.789000e+02\n6 12818     3.463500e+02 5.889400e+02\n9 12818     2.226400e+02 4.175500e+02\n2 12819     -7.602300e+02 3.768000e+02\n5 12819     -3.870001e+01 -5.482001e+01\n8 12819     -5.445300e+02 2.801700e+02\n11 12819     -2.555400e+02 -1.932200e+02\n2 12820     -5.701800e+02 3.771500e+02\n11 12820     -1.028500e+02 -1.882800e+02\n12 12820     -6.404600e+02 5.901600e+02\n2 12821     -1.463500e+02 3.771100e+02\n9 12821     -2.803400e+02 3.978200e+02\n13 12821     3.238600e+02 2.692200e+02\n2 12822     -7.726300e+02 3.764500e+02\n5 12822     -4.952002e+01 -5.535999e+01\n8 12822     -5.543500e+02 2.791800e+02\n14 12822     -1.347100e+02 -1.516700e+02\n2 12823     -4.030700e+02 3.759800e+02\n11 12823     4.465997e+01 -1.810700e+02\n2 12824     -1.268600e+02 3.758300e+02\n5 12824     5.965900e+02 -3.590997e+01\n14 12824     4.976500e+02 -1.211500e+02\n2 12825     -1.268600e+02 3.758300e+02\n5 12825     5.965900e+02 -3.590997e+01\n14 12825     4.976500e+02 -1.211500e+02\n2 12826     -3.650100e+02 3.751000e+02\n3 12826     -4.904700e+02 4.302002e+01\n5 12826     3.385400e+02 -4.600000e+01\n6 12826     -5.798700e+02 6.402500e+02\n12 12826     -4.003700e+02 6.188500e+02\n14 12826     2.453700e+02 -1.360100e+02\n2 12827     -1.168600e+02 3.740500e+02\n5 12827     6.083600e+02 -3.744000e+01\n6 12827     -2.723300e+02 6.931300e+02\n2 12828     -1.168600e+02 3.740500e+02\n5 12828     6.083600e+02 -3.744000e+01\n6 12828     -2.723300e+02 6.931300e+02\n9 12828     -2.548900e+02 3.959400e+02\n11 12828     3.253300e+02 -1.677400e+02\n2 12829     -6.611200e+02 3.736900e+02\n8 12829     -4.638700e+02 2.799000e+02\n14 12829     -3.709998e+01 -1.495300e+02\n2 12830     -6.611200e+02 3.736900e+02\n8 12830     -4.638700e+02 2.799000e+02\n13 12830     -1.022500e+02 2.304700e+02\n14 12830     -3.709998e+01 -1.495300e+02\n2 12831     -6.007500e+02 3.734300e+02\n5 12831     1.055200e+02 -5.392999e+01\n12 12831     -6.752900e+02 5.818000e+02\n2 12832     -6.007500e+02 3.734300e+02\n5 12832     1.055200e+02 -5.392999e+01\n11 12832     -1.287300e+02 -1.911100e+02\n12 12832     -6.752900e+02 5.818000e+02\n14 12832     1.753003e+01 -1.480400e+02\n2 12833     -3.830800e+02 3.722700e+02\n3 12833     -5.087400e+02 4.066998e+01\n5 12833     3.199399e+02 -4.927002e+01\n8 12833     -2.359700e+02 2.850900e+02\n11 12833     6.309003e+01 -1.837100e+02\n12 12833     -4.211600e+02 6.129900e+02\n13 12833     1.180700e+02 2.473500e+02\n14 12833     2.274301e+02 -1.393100e+02\n2 12834     -1.426500e+02 3.718000e+02\n6 12834     -3.041700e+02 6.853800e+02\n9 12834     -2.766900e+02 3.935300e+02\n11 12834     2.986801e+02 -1.705300e+02\n2 12835     3.930601e+02 3.713700e+02\n3 12835     2.472300e+02 4.291998e+01\n6 12835     3.165000e+02 6.172000e+02\n9 12835     1.893800e+02 4.093400e+02\n13 12835     7.594399e+02 1.791300e+02\n2 12836     6.347700e+02 3.704100e+02\n6 12836     5.793000e+02 5.478200e+02\n7 12836     5.797100e+02 5.224000e+02\n8 12836     5.855100e+02 2.722700e+02\n9 12836     3.975699e+02 4.155000e+02\n12 12836     6.580699e+02 5.620400e+02\n2 12837     -2.514300e+02 3.694900e+02\n5 12837     4.578800e+02 -4.715997e+01\n6 12837     -4.390200e+02 6.585000e+02\n14 12837     3.627100e+02 -1.347600e+02\n2 12838     -2.514300e+02 3.694900e+02\n5 12838     4.578800e+02 -4.715997e+01\n6 12838     -4.390200e+02 6.585000e+02\n11 12838     1.890400e+02 -1.788300e+02\n2 12839     -5.741900e+02 3.688900e+02\n8 12839     -3.931200e+02 2.784300e+02\n12 12839     -6.437300e+02 5.816900e+02\n2 12840     -7.580900e+02 3.659000e+02\n11 12840     -2.541800e+02 -1.998700e+02\n2 12841     -7.640800e+02 3.648400e+02\n11 12841     -2.588600e+02 -2.009100e+02\n2 12842     7.920001e+01 3.646700e+02\n13 12842     5.360100e+02 2.777300e+02\n14 12842     7.359700e+02 -1.173200e+02\n2 12843     9.333002e+01 3.640000e+02\n14 12843     7.538300e+02 -1.166300e+02\n2 12844     9.333002e+01 3.640000e+02\n11 12844     5.545500e+02 -1.593300e+02\n14 12844     7.538300e+02 -1.166300e+02\n2 12845     -2.098400e+02 3.618100e+02\n11 12845     2.299100e+02 -1.826500e+02\n2 12846     -5.837000e+01 3.618300e+02\n3 12846     -1.983600e+02 2.784003e+01\n4 12846     5.590002e+01 -5.453400e+02\n9 12846     -2.038500e+02 3.876500e+02\n11 12846     3.869700e+02 -1.721700e+02\n13 12846     4.052300e+02 2.662500e+02\n14 12846     5.758300e+02 -1.272900e+02\n2 12847     5.977500e+02 3.607500e+02\n7 12847     5.442900e+02 5.224400e+02\n8 12847     5.551500e+02 2.655000e+02\n9 12847     3.669399e+02 4.064000e+02\n10 12847     7.469000e+02 6.113700e+02\n12 12847     6.161300e+02 5.561000e+02\n2 12848     6.222500e+02 3.599400e+02\n8 12848     5.746200e+02 2.647300e+02\n9 12848     3.870000e+02 4.069700e+02\n10 12848     7.741899e+02 6.019700e+02\n12 12848     6.429900e+02 5.532600e+02\n2 12849     -6.326500e+02 3.596900e+02\n5 12849     7.439001e+01 -6.641998e+01\n13 12849     -8.135999e+01 2.218600e+02\n14 12849     -1.269000e+01 -1.604800e+02\n2 12850     6.004700e+02 3.572300e+02\n9 12850     3.688000e+02 4.036700e+02\n2 12851     1.045001e+01 3.568700e+02\n9 12851     -1.462000e+02 3.847000e+02\n13 12851     4.686700e+02 2.660100e+02\n14 12851     6.537800e+02 -1.298400e+02\n2 12852     -4.679500e+02 3.550700e+02\n13 12852     4.770001e+01 2.293700e+02\n2 12853     7.235999e+01 3.529000e+02\n6 12853     -3.441998e+01 7.122100e+02\n8 12853     1.420000e+02 2.794500e+02\n14 12853     7.286600e+02 -1.279600e+02\n2 12854     -6.384100e+02 3.433300e+02\n11 12854     -1.598100e+02 -2.123700e+02\n2 12855     -2.591400e+02 3.428900e+02\n11 12855     1.811900e+02 -1.994800e+02\n13 12855     2.224800e+02 2.343200e+02\n14 12855     3.536500e+02 -1.593100e+02\n2 12856     -1.804800e+02 3.416400e+02\n5 12856     5.324600e+02 -7.042999e+01\n9 12856     -3.078800e+02 3.653500e+02\n2 12857     6.608002e+01 3.406200e+02\n9 12857     -9.875000e+01 3.715800e+02\n11 12857     5.225300e+02 -1.814900e+02\n13 12857     5.213900e+02 2.571400e+02\n14 12857     7.190400e+02 -1.416700e+02\n2 12858     -6.750700e+02 3.398900e+02\n5 12858     3.416998e+01 -8.334998e+01\n12 12858     -7.561000e+02 5.366700e+02\n2 12859     -2.579500e+02 3.395400e+02\n6 12859     -4.437500e+02 6.215300e+02\n8 12859     -1.325300e+02 2.616400e+02\n9 12859     -3.740900e+02 3.614100e+02\n12 12859     -2.704300e+02 5.971200e+02\n2 12860     -5.791200e+02 3.368100e+02\n12 12860     -6.442000e+02 5.462400e+02\n2 12861     4.030100e+02 3.357900e+02\n6 12861     3.261600e+02 5.769900e+02\n8 12861     3.971300e+02 2.520200e+02\n9 12861     1.989100e+02 3.793900e+02\n2 12862     -1.488000e+02 3.341800e+02\n14 12862     4.702100e+02 -1.616800e+02\n2 12863     3.933600e+02 3.341600e+02\n6 12863     3.156700e+02 5.761400e+02\n8 12863     3.891500e+02 2.497400e+02\n13 12863     7.553700e+02 1.478600e+02\n2 12864     5.133500e+02 3.335800e+02\n3 12864     3.676600e+02 1.028998e+01\n6 12864     4.391500e+02 5.252500e+02\n7 12864     4.636899e+02 5.134500e+02\n8 12864     4.833300e+02 2.442600e+02\n9 12864     2.953800e+02 3.805100e+02\n10 12864     6.478700e+02 6.076800e+02\n12 12864     5.217900e+02 5.336200e+02\n13 12864     8.396801e+02 9.953000e+01\n2 12865     -5.865700e+02 3.315900e+02\n11 12865     -1.176200e+02 -2.194700e+02\n13 12865     -4.644000e+01 2.051100e+02\n14 12865     2.809003e+01 -1.821700e+02\n2 12866     -5.865700e+02 3.315900e+02\n11 12866     -1.176200e+02 -2.194700e+02\n13 12866     -4.644000e+01 2.051100e+02\n2 12867     -1.511700e+02 3.313800e+02\n8 12867     -4.487000e+01 2.578000e+02\n9 12867     -2.827700e+02 3.569000e+02\n2 12868     -5.099300e+02 3.302500e+02\n5 12868     1.890601e+02 -8.982001e+01\n2 12869     9.516998e+01 3.293500e+02\n3 12869     -5.510999e+01 -3.969971e+00\n6 12869     -6.640015e+00 6.870800e+02\n8 12869     1.598400e+02 2.602800e+02\n9 12869     -7.390002e+01 3.633200e+02\n11 12869     5.560200e+02 -1.882200e+02\n13 12869     5.496200e+02 2.504300e+02\n14 12869     7.542200e+02 -1.507100e+02\n2 12870     -4.453003e+01 3.291600e+02\n4 12870     3.429999e+01 -5.506700e+02\n5 12870     6.875200e+02 -7.771997e+01\n6 12870     -1.806000e+02 6.563500e+02\n8 12870     4.379999e+01 2.577900e+02\n9 12870     -1.918100e+02 3.584300e+02\n11 12870     4.006000e+02 -1.985300e+02\n12 12870     -1.590997e+01 6.173300e+02\n14 12870     5.874399e+02 -1.602600e+02\n2 12871     5.149900e+02 3.254600e+02\n8 12871     4.849100e+02 2.379900e+02\n12 12871     5.230200e+02 5.244000e+02\n2 12872     7.191998e+01 3.240600e+02\n5 12872     8.295300e+02 -7.853998e+01\n6 12872     -3.553998e+01 6.755100e+02\n8 12872     1.412300e+02 2.555400e+02\n2 12873     -5.883200e+02 3.234700e+02\n12 12873     -6.529200e+02 5.317200e+02\n2 12874     -3.893900e+02 3.217400e+02\n12 12874     -4.225800e+02 5.591700e+02\n2 12875     -7.409600e+02 3.195000e+02\n14 12875     -1.130100e+02 -1.986400e+02\n2 12876     1.298300e+02 3.191600e+02\n3 12876     -2.264001e+01 -1.296002e+01\n6 12876     3.685999e+01 6.826000e+02\n8 12876     1.885900e+02 2.524700e+02\n9 12876     -4.467999e+01 3.557800e+02\n2 12877     -1.069000e+01 3.159000e+02\n6 12877     -1.382100e+02 6.473400e+02\n2 12878     4.829600e+02 3.144400e+02\n3 12878     3.392600e+02 -8.750000e+00\n6 12878     4.040200e+02 5.078600e+02\n7 12878     4.343400e+02 5.013000e+02\n8 12878     4.582700e+02 2.292700e+02\n9 12878     2.702000e+02 3.636000e+02\n11 12878     7.333199e+02 -3.929800e+02\n12 12878     4.882100e+02 5.154900e+02\n13 12878     8.103101e+02 8.947000e+01\n2 12879     3.839800e+02 3.140100e+02\n3 12879     2.395900e+02 -1.238000e+01\n6 12879     3.039600e+02 5.536400e+02\n7 12879     3.776200e+02 5.472000e+02\n9 12879     1.831000e+02 3.598200e+02\n13 12879     7.450800e+02 1.325000e+02\n2 12880     -4.080600e+02 3.136300e+02\n8 12880     -2.560400e+02 2.386200e+02\n11 12880     3.826001e+01 -2.274200e+02\n2 12881     -4.748999e+01 3.132100e+02\n11 12881     3.976600e+02 -2.108800e+02\n12 12881     -1.885999e+01 5.997200e+02\n14 12881     5.839200e+02 -1.755100e+02\n2 12882     3.882800e+02 3.135900e+02\n3 12882     2.440500e+02 -1.228003e+01\n6 12882     3.089700e+02 5.521400e+02\n9 12882     1.864600e+02 3.593700e+02\n12 12882     4.088900e+02 5.453900e+02\n13 12882     7.485500e+02 1.310100e+02\n2 12883     3.047300e+02 3.109700e+02\n3 12883     1.625500e+02 -1.722998e+01\n7 12883     3.090400e+02 5.602400e+02\n8 12883     3.172000e+02 2.339500e+02\n9 12883     1.150300e+02 3.544600e+02\n11 12883     6.260699e+02 -3.146100e+02\n12 12883     3.213600e+02 5.514700e+02\n13 12883     6.778101e+02 1.456500e+02\n2 12884     -5.880400e+02 3.101700e+02\n12 12884     -6.519000e+02 5.175800e+02\n2 12885     -7.275800e+02 3.096100e+02\n5 12885     -1.644000e+01 -1.101200e+02\n14 12885     -1.012800e+02 -2.048800e+02\n2 12886     -4.084003e+01 3.094200e+02\n9 12886     -1.882400e+02 3.412800e+02\n14 12886     5.910900e+02 -1.783800e+02\n2 12887     3.121801e+02 3.079500e+02\n8 12887     3.233500e+02 2.310700e+02\n13 12887     6.834600e+02 1.405500e+02\n2 12888     -7.308000e+02 3.072400e+02\n8 12888     -5.197400e+02 2.262400e+02\n2 12889     3.086300e+02 3.071100e+02\n3 12889     1.667500e+02 -2.094000e+01\n7 12889     3.113000e+02 5.554300e+02\n8 12889     3.202800e+02 2.303100e+02\n9 12889     1.184800e+02 3.513800e+02\n11 12889     6.282400e+02 -3.196200e+02\n12 12889     3.248199e+02 5.463900e+02\n13 12889     6.801500e+02 1.414000e+02\n2 12890     -3.884800e+02 3.062900e+02\n12 12890     -4.209300e+02 5.424800e+02\n2 12891     -5.893100e+02 3.024400e+02\n12 12891     -6.529900e+02 5.082100e+02\n2 12892     1.208700e+02 3.027100e+02\n3 12892     -3.081000e+01 -2.971002e+01\n6 12892     2.610999e+01 6.610500e+02\n9 12892     -5.116998e+01 3.410100e+02\n12 12892     1.850100e+02 6.114000e+02\n2 12893     4.311200e+02 3.010800e+02\n6 12893     3.454600e+02 4.999400e+02\n7 12893     3.876100e+02 4.991600e+02\n8 12893     4.159800e+02 2.195600e+02\n9 12893     2.262700e+02 3.503900e+02\n10 12893     5.552200e+02 5.977400e+02\n12 12893     4.324301e+02 5.063700e+02\n13 12893     7.634600e+02 8.901001e+01\n2 12894     -1.182900e+02 2.987400e+02\n3 12894     -2.561800e+02 -3.491998e+01\n5 12894     5.992000e+02 -1.096600e+02\n6 12894     -2.696600e+02 6.041900e+02\n8 12894     -1.703998e+01 2.320400e+02\n9 12894     -2.533800e+02 3.296900e+02\n12 12894     -1.021300e+02 5.747100e+02\n13 12894     3.435000e+02 2.096100e+02\n14 12894     5.015200e+02 -1.934300e+02\n2 12895     -1.339600e+02 2.954000e+02\n5 12895     5.824200e+02 -1.129400e+02\n6 12895     -2.870800e+02 5.974300e+02\n8 12895     -2.965002e+01 2.294800e+02\n12 12895     -1.191300e+02 5.692300e+02\n13 12895     3.289399e+02 2.058600e+02\n2 12896     5.898400e+02 2.953000e+02\n3 12896     4.423300e+02 -2.347998e+01\n6 12896     5.234399e+02 4.718000e+02\n7 12896     5.277500e+02 4.595800e+02\n8 12896     5.463000e+02 2.111500e+02\n9 12896     3.623199e+02 3.501400e+02\n2 12897     3.423500e+02 2.952600e+02\n3 12897     2.001801e+02 -3.106000e+01\n7 12897     3.397900e+02 5.363200e+02\n9 12897     1.476400e+02 3.424800e+02\n2 12898     4.632900e+02 2.949700e+02\n3 12898     3.213000e+02 -2.821002e+01\n6 12898     3.813000e+02 4.886100e+02\n7 12898     4.155000e+02 4.859700e+02\n9 12898     2.537700e+02 3.465500e+02\n10 12898     5.871200e+02 5.782700e+02\n13 12898     7.909301e+02 7.704999e+01\n2 12899     3.905699e+02 2.934400e+02\n3 12899     2.462400e+02 -3.187000e+01\n9 12899     1.894200e+02 3.427500e+02\n13 12899     7.482300e+02 1.140800e+02\n2 12900     -4.704600e+02 2.923100e+02\n7 12900     -4.159200e+02 5.777100e+02\n2 12901     2.800601e+02 2.904500e+02\n3 12901     1.391600e+02 -3.753003e+01\n13 12901     6.550500e+02 1.333300e+02\n2 12902     3.108199e+02 2.889600e+02\n3 12902     1.694100e+02 -3.808002e+01\n6 12902     2.202000e+02 5.351700e+02\n8 12902     3.219300e+02 2.157300e+02\n9 12902     1.209100e+02 3.359700e+02\n12 12902     3.269000e+02 5.263900e+02\n2 12903     3.108199e+02 2.889600e+02\n6 12903     2.202000e+02 5.351700e+02\n8 12903     3.219300e+02 2.157300e+02\n9 12903     1.209100e+02 3.359700e+02\n12 12903     3.269000e+02 5.263900e+02\n2 12904     -6.493300e+02 2.884500e+02\n5 12904     5.272998e+01 -1.270500e+02\n12 12904     -7.191000e+02 4.858300e+02\n14 12904     -3.296002e+01 -2.204400e+02\n2 12905     -6.493300e+02 2.884500e+02\n14 12905     -3.296002e+01 -2.204400e+02\n2 12906     -1.822400e+02 2.859600e+02\n13 12906     2.858800e+02 1.958500e+02\n2 12907     3.620900e+02 2.854600e+02\n3 12907     2.192300e+02 -4.007001e+01\n6 12907     2.782300e+02 5.243000e+02\n7 12907     3.562500e+02 5.240200e+02\n8 12907     3.634700e+02 2.120100e+02\n9 12907     1.647500e+02 3.349300e+02\n12 12907     3.805400e+02 5.177200e+02\n13 12907     7.235699e+02 1.132500e+02\n2 12908     -5.957300e+02 2.842800e+02\n5 12908     1.023300e+02 -1.305800e+02\n2 12909     3.578199e+02 2.841900e+02\n6 12909     2.730600e+02 5.235700e+02\n7 12909     3.521899e+02 5.237300e+02\n12 12909     3.756899e+02 5.169200e+02\n2 12910     5.324800e+02 2.842400e+02\n6 12910     4.580500e+02 4.677700e+02\n7 12910     4.752900e+02 4.615100e+02\n8 12910     4.983900e+02 2.039200e+02\n9 12910     3.125000e+02 3.397700e+02\n12 12910     5.402900e+02 4.765300e+02\n13 12910     8.509000e+02 5.388000e+01\n2 12911     3.373101e+02 2.836600e+02\n6 12911     2.494400e+02 5.255400e+02\n8 12911     3.432500e+02 2.109000e+02\n9 12911     1.432500e+02 3.323200e+02\n12 12911     3.544000e+02 5.179500e+02\n13 12911     7.016200e+02 1.167200e+02\n2 12912     -1.210900e+02 2.822000e+02\n6 12912     -2.734300e+02 5.838700e+02\n8 12912     -2.003998e+01 2.188400e+02\n9 12912     -2.550500e+02 3.152300e+02\n12 12912     -1.056200e+02 5.564500e+02\n2 12913     3.549900e+02 2.810400e+02\n3 12913     2.122100e+02 -4.478003e+01\n8 12913     3.575300e+02 2.082400e+02\n9 12913     1.588500e+02 3.306000e+02\n13 12913     7.166700e+02 1.109700e+02\n2 12914     -6.408900e+02 2.806400e+02\n12 12914     -7.084700e+02 4.792300e+02\n2 12915     -4.790000e+02 2.806500e+02\n7 12915     -4.232000e+02 5.661700e+02\n2 12916     3.654301e+02 2.791400e+02\n8 12916     3.662000e+02 2.067100e+02\n9 12916     1.679800e+02 3.295000e+02\n12 12916     3.838700e+02 5.104100e+02\n13 12916     7.255400e+02 1.074900e+02\n2 12917     4.869995e+00 2.783500e+02\n6 12917     -1.190000e+02 6.061700e+02\n8 12917     8.438000e+01 2.179300e+02\n9 12917     -1.481900e+02 3.162600e+02\n12 12917     4.434003e+01 5.691300e+02\n2 12918     -7.509003e+01 2.774200e+02\n5 12918     6.439100e+02 -1.325900e+02\n6 12918     -2.178600e+02 5.844200e+02\n8 12918     1.796002e+01 2.154400e+02\n9 12918     -2.161700e+02 3.118700e+02\n12 12918     -5.277002e+01 5.552100e+02\n2 12919     4.900300e+02 2.773700e+02\n6 12919     4.110600e+02 4.655100e+02\n7 12919     4.378500e+02 4.642700e+02\n9 12919     2.766200e+02 3.321700e+02\n2 12920     6.391400e+02 2.710000e+02\n8 12920     5.872900e+02 1.891100e+02\n2 12921     -4.714600e+02 2.694700e+02\n7 12921     -4.149500e+02 5.566000e+02\n2 12922     7.320200e+02 2.665700e+02\n3 12922     5.780000e+02 -4.601001e+01\n7 12922     6.545400e+02 3.991500e+02\n2 12923     -2.450600e+02 2.640200e+02\n5 12923     4.544399e+02 -1.457500e+02\n6 12923     -4.227600e+02 5.350400e+02\n7 12923     -1.781600e+02 5.765000e+02\n8 12923     -1.220200e+02 2.021800e+02\n9 12923     -3.598000e+02 2.954900e+02\n12 12923     -2.504000e+02 5.186000e+02\n2 12924     -7.178800e+02 2.614300e+02\n8 12924     -5.091000e+02 1.902300e+02\n12 12924     -7.932500e+02 4.480900e+02\n13 12924     -1.470700e+02 1.490900e+02\n2 12925     -6.238800e+02 2.614800e+02\n5 12925     7.370001e+01 -1.497000e+02\n7 12925     -5.682400e+02 5.329900e+02\n11 12925     -1.510600e+02 -2.687300e+02\n12 12925     -6.868500e+02 4.618900e+02\n14 12925     -1.158002e+01 -2.425000e+02\n2 12926     1.913000e+01 2.596900e+02\n8 12926     9.645001e+01 2.037300e+02\n12 12926     6.242999e+01 5.521400e+02\n13 12926     4.694301e+02 1.889000e+02\n2 12927     -4.895000e+02 2.584600e+02\n7 12927     -4.323600e+02 5.449600e+02\n12 12927     -5.330200e+02 4.783100e+02\n2 12928     5.183101e+02 2.566700e+02\n8 12928     4.858300e+02 1.811200e+02\n2 12929     3.416200e+02 2.559600e+02\n6 12929     2.544200e+02 4.935700e+02\n10 12929     5.094200e+02 6.132100e+02\n2 12930     -4.978998e+01 2.546200e+02\n5 12930     6.721500e+02 -1.515200e+02\n9 12930     -1.934100e+02 2.933000e+02\n2 12931     -4.378700e+02 2.520000e+02\n5 12931     2.527000e+02 -1.577200e+02\n7 12931     -3.792200e+02 5.448300e+02\n14 12931     1.645500e+02 -2.468800e+02\n2 12932     3.811700e+02 2.515200e+02\n3 12932     2.392000e+02 -7.353998e+01\n8 12932     3.789900e+02 1.831400e+02\n9 12932     1.825000e+02 3.050700e+02\n12 12932     3.997100e+02 4.776500e+02\n13 12932     7.357500e+02 8.089999e+01\n2 12933     -8.977002e+01 2.502300e+02\n6 12933     -2.336900e+02 5.537800e+02\n12 12933     -6.667999e+01 5.273600e+02\n14 12933     5.310400e+02 -2.372200e+02\n2 12934     6.140800e+02 2.484200e+02\n3 12934     4.673700e+02 -6.625000e+01\n6 12934     5.469301e+02 4.159800e+02\n7 12934     5.436400e+02 4.083400e+02\n9 12934     3.823000e+02 3.116300e+02\n2 12935     -5.806800e+02 2.468500e+02\n7 12935     -5.237400e+02 5.249600e+02\n2 12936     -2.848800e+02 2.447800e+02\n4 12936     6.710022e+00 -3.624200e+02\n9 12936     -3.930600e+02 2.772900e+02\n2 12937     -1.450200e+02 2.433000e+02\n8 12937     -4.000000e+01 1.873600e+02\n9 12937     -2.739400e+02 2.804800e+02\n2 12938     4.924100e+02 2.414700e+02\n3 12938     3.511200e+02 -7.665002e+01\n6 12938     4.113600e+02 4.258400e+02\n9 12938     2.794600e+02 3.024200e+02\n12 12938     4.957200e+02 4.334100e+02\n15 12938     8.044399e+02 5.804400e+02\n2 12939     -3.090900e+02 2.390100e+02\n3 12939     -4.394000e+02 -9.270001e+01\n7 12939     -2.439500e+02 5.469500e+02\n9 12939     -4.136400e+02 2.715000e+02\n14 12939     2.941700e+02 -2.555400e+02\n2 12940     -3.611300e+02 2.370400e+02\n8 12940     -2.171400e+02 1.790700e+02\n12 12940     -3.835400e+02 4.746700e+02\n2 12941     2.679800e+02 2.352500e+02\n13 12941     6.392100e+02 9.073001e+01\n2 12942     -1.043100e+02 2.340100e+02\n7 12942     -2.728003e+01 5.639000e+02\n11 12942     3.342300e+02 -2.767200e+02\n12 12942     -8.425000e+01 5.081500e+02\n2 12943     -6.638600e+02 2.331400e+02\n12 12943     -7.283700e+02 4.270500e+02\n14 12943     -5.059003e+01 -2.667100e+02\n2 12944     -2.701300e+02 2.314200e+02\n4 12944     -2.399902e-01 -3.701400e+02\n5 12944     4.237300e+02 -1.747700e+02\n6 12944     -4.514800e+02 4.937200e+02\n8 12944     -1.426300e+02 1.759600e+02\n12 12944     -2.781600e+02 4.828100e+02\n2 12945     -7.497998e+01 2.280200e+02\n5 12945     6.405400e+02 -1.781700e+02\n6 12945     -2.145600e+02 5.301500e+02\n7 12945     5.250000e+00 5.604000e+02\n8 12945     1.840002e+01 1.762900e+02\n12 12945     -4.860999e+01 5.052600e+02\n14 12945     5.461500e+02 -2.581100e+02\n2 12946     -7.169500e+02 2.270300e+02\n8 12946     -5.081000e+02 1.636900e+02\n2 12947     -3.705500e+02 2.256300e+02\n12 12947     -3.932800e+02 4.616700e+02\n2 12948     4.891700e+02 2.238300e+02\n6 12948     4.065100e+02 4.061900e+02\n8 12948     4.617300e+02 1.551400e+02\n9 12948     2.770300e+02 2.866300e+02\n11 12948     7.397300e+02 -4.827800e+02\n12 12948     4.912100e+02 4.144700e+02\n2 12949     4.891700e+02 2.238300e+02\n6 12949     4.065100e+02 4.061900e+02\n8 12949     4.617300e+02 1.551400e+02\n10 12949     5.982300e+02 4.874300e+02\n2 12950     -7.491998e+01 2.227300e+02\n3 12950     -2.158400e+02 -1.094000e+02\n5 12950     6.400200e+02 -1.813100e+02\n6 12950     -2.143900e+02 5.252500e+02\n7 12950     5.039978e+00 5.564000e+02\n8 12950     1.839001e+01 1.730600e+02\n11 12950     3.653600e+02 -2.842700e+02\n12 12950     -4.847998e+01 5.007100e+02\n13 12950     3.785000e+02 1.540200e+02\n14 12950     5.456500e+02 -2.627800e+02\n2 12951     -7.011300e+02 2.215300e+02\n5 12951     -1.330017e+00 -1.837800e+02\n2 12952     -5.506300e+02 2.189100e+02\n12 12952     -5.995300e+02 4.273900e+02\n2 12953     -7.158900e+02 2.185700e+02\n5 12953     -1.469000e+01 -1.857400e+02\n7 12953     -6.538800e+02 4.855200e+02\n8 12953     -5.070800e+02 1.573600e+02\n2 12954     -4.004500e+02 2.181500e+02\n7 12954     -3.384600e+02 5.192000e+02\n2 12955     8.058800e+02 2.179200e+02\n3 12955     6.499100e+02 -8.940002e+01\n7 12955     7.153199e+02 3.336900e+02\n9 12955     5.421200e+02 2.915200e+02\n2 12956     5.429600e+02 2.171000e+02\n6 12956     4.670500e+02 3.919100e+02\n7 12956     4.776000e+02 3.948600e+02\n9 12956     3.236200e+02 2.830300e+02\n10 12956     6.525300e+02 4.598700e+02\n2 12957     3.734100e+02 2.165000e+02\n6 12957     2.888100e+02 4.450100e+02\n9 12957     1.758101e+02 2.762500e+02\n13 12957     7.253400e+02 5.464001e+01\n2 12958     -1.782400e+02 2.126800e+02\n3 12958     -3.145200e+02 -1.195700e+02\n7 12958     -1.062900e+02 5.369800e+02\n8 12958     -6.704999e+01 1.626300e+02\n13 12958     2.848101e+02 1.403100e+02\n14 12958     4.297600e+02 -2.761100e+02\n2 12959     3.149800e+02 2.117100e+02\n8 12959     3.247100e+02 1.537400e+02\n12 12959     3.305200e+02 4.421000e+02\n13 12959     6.756300e+02 6.277002e+01\n2 12960     -2.632700e+02 2.083600e+02\n6 12960     -4.407800e+02 4.674200e+02\n12 12960     -2.678000e+02 4.588900e+02\n14 12960     3.392000e+02 -2.823500e+02\n2 12961     6.481100e+02 2.054600e+02\n8 12961     5.934700e+02 1.358900e+02\n2 12962     6.332100e+02 2.047300e+02\n6 12962     5.659200e+02 3.648300e+02\n9 12962     3.993300e+02 2.755100e+02\n2 12963     7.385699e+02 2.038200e+02\n3 12963     5.882300e+02 -1.049600e+02\n7 12963     6.510699e+02 3.364800e+02\n9 12963     4.874399e+02 2.779200e+02\n2 12964     -6.532100e+02 2.029800e+02\n13 12964     -1.003400e+02 1.126100e+02\n2 12965     6.446700e+02 2.024300e+02\n6 12965     5.787900e+02 3.607200e+02\n9 12965     4.085900e+02 2.740100e+02\n2 12966     5.858600e+02 2.023100e+02\n6 12966     5.134700e+02 3.689200e+02\n7 12966     5.132100e+02 3.710700e+02\n8 12966     5.416600e+02 1.346000e+02\n9 12966     3.596500e+02 2.711200e+02\n12 12966     5.942500e+02 3.791300e+02\n2 12967     -2.419600e+02 2.012200e+02\n7 12967     -1.729300e+02 5.199900e+02\n2 12968     -8.726001e+01 2.008200e+02\n3 12968     -2.274600e+02 -1.309000e+02\n5 12968     6.235200e+02 -2.032300e+02\n7 12968     -8.179993e+00 5.349800e+02\n13 12968     3.658700e+02 1.363400e+02\n14 12968     5.303800e+02 -2.841100e+02\n2 12969     6.764700e+02 2.004500e+02\n9 12969     4.356600e+02 2.732900e+02\n2 12970     4.614100e+02 1.988600e+02\n6 12970     3.749500e+02 3.832000e+02\n2 12971     6.179600e+02 1.973700e+02\n3 12971     4.735699e+02 -1.151800e+02\n8 12971     5.685100e+02 1.301800e+02\n9 12971     3.867800e+02 2.688300e+02\n10 12971     7.257600e+02 4.089700e+02\n12 12971     6.286300e+02 3.702700e+02\n2 12972     5.090800e+02 1.968900e+02\n6 12972     4.279900e+02 3.747300e+02\n9 12972     2.947800e+02 2.652700e+02\n12 12972     5.119000e+02 3.834300e+02\n13 12972     8.195601e+02 -1.309003e+01\n2 12973     -6.100000e+02 1.954800e+02\n7 12973     -5.481600e+02 4.767300e+02\n2 12974     2.930100e+02 1.928200e+02\n7 12974     2.904000e+02 4.501000e+02\n10 12974     4.511300e+02 5.562300e+02\n12 12974     3.078101e+02 4.246300e+02\n13 12974     6.556600e+02 5.098999e+01\n2 12975     6.476600e+02 1.899200e+02\n6 12975     5.812000e+02 3.472400e+02\n10 12975     7.550800e+02 3.891800e+02\n2 12976     -3.742200e+02 1.896600e+02\n5 12976     3.104100e+02 -2.161900e+02\n7 12976     -3.111800e+02 4.945300e+02\n8 12976     -2.276800e+02 1.406100e+02\n14 12976     2.219900e+02 -3.033800e+02\n2 12977     6.017800e+02 1.892700e+02\n10 12977     7.072100e+02 4.060800e+02\n2 12978     -4.112700e+02 1.890200e+02\n12 12978     -4.370000e+02 4.189900e+02\n2 12979     -4.112700e+02 1.890200e+02\n12 12979     -4.370000e+02 4.189900e+02\n2 12980     4.345900e+02 1.892000e+02\n3 12980     2.964600e+02 -1.292200e+02\n8 12980     4.175500e+02 1.286200e+02\n9 12980     2.316500e+02 2.560100e+02\n12 12980     4.336500e+02 3.844000e+02\n13 12980     7.539200e+02 -2.919983e+00\n2 12981     5.534700e+02 1.888100e+02\n7 12981     4.827700e+02 3.671100e+02\n9 12981     3.321600e+02 2.601600e+02\n2 12982     6.516801e+02 1.887300e+02\n3 12982     5.056300e+02 -1.224500e+02\n7 12982     5.696700e+02 3.429500e+02\n8 12982     5.964399e+02 1.216200e+02\n10 12982     7.594200e+02 3.855700e+02\n12 12982     6.642700e+02 3.559900e+02\n2 12983     8.242300e+02 1.891300e+02\n7 12983     7.266899e+02 3.018900e+02\n9 12983     5.579399e+02 2.679800e+02\n2 12984     -6.476100e+02 1.856700e+02\n5 12984     4.352002e+01 -2.143100e+02\n7 12984     -5.836800e+02 4.645000e+02\n8 12984     -4.504900e+02 1.331100e+02\n14 12984     -3.947998e+01 -3.066200e+02\n2 12985     7.146300e+02 1.834700e+02\n3 12985     5.667200e+02 -1.250100e+02\n7 12985     6.260601e+02 3.230300e+02\n10 12985     8.259399e+02 3.544300e+02\n12 12985     7.338300e+02 3.426900e+02\n2 12986     -2.854600e+02 1.801300e+02\n5 12986     4.022800e+02 -2.228300e+02\n6 12986     -4.658300e+02 4.312700e+02\n7 12986     -2.179800e+02 4.972400e+02\n8 12986     -1.547900e+02 1.349900e+02\n9 12986     -3.906700e+02 2.201900e+02\n14 12986     3.136801e+02 -3.078500e+02\n2 12987     7.140699e+02 1.799900e+02\n3 12987     5.665500e+02 -1.285400e+02\n9 12987     4.675800e+02 2.569600e+02\n10 12987     8.250100e+02 3.515100e+02\n2 12988     -6.841600e+02 1.795300e+02\n14 12988     -7.383002e+01 -3.121200e+02\n2 12989     -2.740200e+02 1.771700e+02\n5 12989     4.139900e+02 -2.253500e+02\n6 12989     -4.520700e+02 4.310700e+02\n12 12989     -2.787700e+02 4.262700e+02\n2 12990     -1.685400e+02 1.766300e+02\n3 12990     -3.057800e+02 -1.548400e+02\n4 12990     -3.802002e+01 -4.330699e+02\n7 12990     -9.548999e+01 5.055300e+02\n9 12990     -2.909700e+02 2.216400e+02\n11 12990     2.660699e+02 -3.240500e+02\n12 12990     -1.565400e+02 4.398100e+02\n2 12991     6.211600e+02 1.767500e+02\n6 12991     5.517700e+02 3.375400e+02\n7 12991     5.419500e+02 3.401900e+02\n8 12991     5.711500e+02 1.135700e+02\n9 12991     3.901700e+02 2.521300e+02\n10 12991     7.234100e+02 3.844500e+02\n12 12991     6.314100e+02 3.476500e+02\n2 12992     -6.451700e+02 1.742200e+02\n7 12992     -5.798800e+02 4.552600e+02\n2 12993     6.284900e+02 1.740400e+02\n3 12993     4.846500e+02 -1.363100e+02\n10 12993     7.309800e+02 3.793700e+02\n2 12994     6.327800e+02 1.734000e+02\n3 12994     4.889301e+02 -1.372300e+02\n10 12994     7.353400e+02 3.762800e+02\n12 12994     6.437300e+02 3.414900e+02\n2 12995     6.930000e+02 1.715400e+02\n3 12995     5.444900e+02 -1.373400e+02\n7 12995     6.041500e+02 3.175300e+02\n9 12995     4.494100e+02 2.494300e+02\n10 12995     7.993400e+02 3.502100e+02\n12 12995     7.084500e+02 3.321700e+02\n2 12996     -7.287500e+02 1.678300e+02\n5 12996     -3.140997e+01 -2.285200e+02\n8 12996     -5.170100e+02 1.168500e+02\n12 12996     -7.924900e+02 3.517300e+02\n14 12996     -1.155100e+02 -3.223000e+02\n2 12997     -5.747400e+02 1.681400e+02\n8 12997     -3.916600e+02 1.201700e+02\n2 12998     -5.747400e+02 1.681400e+02\n12 12998     -6.199000e+02 3.745600e+02\n2 12999     7.382000e+02 1.661300e+02\n12 12999     7.580601e+02 3.195800e+02\n2 13000     -7.113700e+02 1.649700e+02\n5 13000     -1.641998e+01 -2.317100e+02\n2 13001     8.213101e+02 1.646300e+02\n3 13001     6.683300e+02 -1.388900e+02\n7 13001     7.198199e+02 2.794700e+02\n9 13001     5.558199e+02 2.474100e+02\n2 13002     8.213101e+02 1.646300e+02\n3 13002     6.683300e+02 -1.388900e+02\n7 13002     7.198199e+02 2.794700e+02\n9 13002     5.558199e+02 2.474100e+02\n2 13003     6.269100e+02 1.640500e+02\n7 13003     5.447400e+02 3.267600e+02\n2 13004     2.757000e+02 1.627900e+02\n3 13004     1.648200e+02 -1.540600e+02\n2 13005     6.692000e+02 1.623000e+02\n7 13005     5.826100e+02 3.145600e+02\n9 13005     4.311200e+02 2.409600e+02\n2 13006     8.163700e+02 1.623600e+02\n3 13006     6.633500e+02 -1.401400e+02\n7 13006     7.150900e+02 2.786600e+02\n9 13006     5.517400e+02 2.456000e+02\n2 13007     1.916200e+02 1.615000e+02\n6 13007     3.992999e+01 2.040700e+02\n8 13007     2.060900e+02 8.720001e+01\n12 13007     6.187000e+01 2.575900e+02\n14 13007     6.559000e+02 -5.853400e+02\n2 13008     6.920100e+02 1.614500e+02\n3 13008     5.465300e+02 -1.464300e+02\n7 13008     6.025699e+02 3.082200e+02\n10 13008     7.956300e+02 3.394300e+02\n2 13009     6.855000e+02 1.612500e+02\n3 13009     5.401500e+02 -1.468700e+02\n7 13009     5.968700e+02 3.097000e+02\n9 13009     4.451300e+02 2.407200e+02\n10 13009     7.885400e+02 3.420400e+02\n12 13009     7.015601e+02 3.217500e+02\n2 13010     -7.284300e+02 1.598800e+02\n7 13010     -6.590700e+02 4.343500e+02\n8 13010     -5.161300e+02 1.110200e+02\n2 13011     2.016700e+02 1.602500e+02\n3 13011     9.752002e+01 -1.574200e+02\n2 13012     2.778300e+02 1.598200e+02\n3 13012     1.673900e+02 -1.566900e+02\n8 13012     2.696800e+02 9.057999e+01\n2 13013     3.605601e+02 1.570400e+02\n6 13013     2.729600e+02 3.803100e+02\n8 13013     3.609400e+02 1.077600e+02\n10 13013     5.096100e+02 4.955100e+02\n12 13013     3.761899e+02 3.788700e+02\n2 13014     -4.924000e+02 1.560400e+02\n8 13014     -3.244600e+02 1.125800e+02\n11 13014     -4.315997e+01 -3.434800e+02\n2 13015     6.706200e+02 1.543500e+02\n10 13015     7.702500e+02 3.403100e+02\n2 13016     -4.894000e+02 1.538900e+02\n8 13016     -3.224400e+02 1.105000e+02\n12 13016     -5.224100e+02 3.716200e+02\n2 13017     6.453000e+02 1.528600e+02\n9 13017     4.106100e+02 2.326500e+02\n10 13017     7.436600e+02 3.483300e+02\n2 13018     -5.090600e+02 1.512000e+02\n7 13018     -4.455500e+02 4.481900e+02\n2 13019     -6.885200e+02 1.500200e+02\n5 13019     3.200012e+00 -2.431700e+02\n7 13019     -6.194000e+02 4.305500e+02\n10 13019     -6.215500e+02 5.942500e+02\n12 13019     -7.448100e+02 3.407200e+02\n2 13020     -3.147400e+02 1.489200e+02\n5 13020     3.683199e+02 -2.546200e+02\n2 13021     -1.967800e+02 1.489500e+02\n14 13021     4.054200e+02 -3.356900e+02\n2 13022     -5.875800e+02 1.431500e+02\n7 13022     -5.206900e+02 4.351800e+02\n14 13022     1.250000e+01 -3.422700e+02\n2 13023     -2.891400e+02 1.417500e+02\n7 13023     -2.199400e+02 4.641300e+02\n13 13023     1.858101e+02 8.325000e+01\n14 13023     3.071000e+02 -3.424400e+02\n2 13024     3.197600e+02 1.418700e+02\n3 13024     2.114399e+02 -1.717700e+02\n2 13025     5.314200e+02 1.411900e+02\n7 13025     4.587600e+02 3.268300e+02\n10 13025     6.240000e+02 3.790700e+02\n12 13025     5.329500e+02 3.206500e+02\n13 13025     8.323300e+02 -6.446997e+01\n2 13026     -3.157000e+02 1.389900e+02\n5 13026     3.668300e+02 -2.639400e+02\n2 13027     -5.824000e+02 1.387100e+02\n14 13027     1.710999e+01 -3.464700e+02\n2 13028     -6.463300e+02 1.380300e+02\n5 13028     4.169000e+01 -2.539800e+02\n7 13028     -5.763700e+02 4.252300e+02\n10 13028     -5.707300e+02 5.858300e+02\n14 13028     -4.126001e+01 -3.460700e+02\n2 13029     -5.868700e+02 1.370100e+02\n5 13029     9.550000e+01 -2.568600e+02\n8 13029     -4.017500e+02 9.537000e+01\n2 13030     -4.882300e+02 1.366900e+02\n5 13030     1.911400e+02 -2.571100e+02\n8 13030     -3.209800e+02 9.845001e+01\n13 13030     2.348999e+01 7.228003e+01\n2 13031     8.317300e+02 1.361100e+02\n7 13031     7.241100e+02 2.501600e+02\n9 13031     5.649600e+02 2.240800e+02\n2 13032     -6.084000e+02 1.353700e+02\n12 13032     -6.542000e+02 3.373000e+02\n2 13033     -3.737700e+02 1.357100e+02\n3 13033     -5.057700e+02 -1.951600e+02\n7 13033     -3.064300e+02 4.454700e+02\n8 13033     -2.272300e+02 9.801999e+01\n9 13033     -4.644600e+02 1.795300e+02\n10 13033     -2.483200e+02 5.970600e+02\n12 13033     -3.899000e+02 3.679700e+02\n13 13033     1.153000e+02 7.566998e+01\n14 13033     2.194900e+02 -3.478800e+02\n2 13034     3.111700e+02 1.351700e+02\n3 13034     2.050699e+02 -1.777400e+02\n2 13035     -3.117500e+02 1.344500e+02\n6 13035     -4.903700e+02 3.699400e+02\n7 13035     -2.491700e+02 4.509400e+02\n8 13035     -1.735400e+02 9.823999e+01\n12 13035     -3.173800e+02 3.736200e+02\n2 13036     -6.209500e+02 1.313400e+02\n7 13036     -5.520700e+02 4.217100e+02\n10 13036     -5.418600e+02 5.806000e+02\n2 13037     -4.896600e+02 1.313200e+02\n7 13037     -4.230200e+02 4.346500e+02\n8 13037     -3.224500e+02 9.292999e+01\n2 13038     6.703800e+02 1.302100e+02\n7 13038     5.790300e+02 2.845900e+02\n10 13038     7.646801e+02 3.132000e+02\n2 13039     6.781000e+01 1.301800e+02\n5 13039     6.035300e+02 -5.185000e+02\n6 13039     -1.105100e+02 1.614800e+02\n10 13039     -1.066100e+02 3.007800e+02\n12 13039     -7.879999e+01 2.146600e+02\n15 13039     -4.996997e+01 3.238200e+02\n2 13040     3.121600e+02 1.286000e+02\n4 13040     -2.519000e+02 -5.695400e+02\n8 13040     2.933800e+02 5.817001e+01\n12 13040     1.810400e+02 1.999100e+02\n2 13041     2.515200e+02 1.278800e+02\n3 13041     1.505600e+02 -1.858000e+02\n2 13042     2.570699e+02 1.252300e+02\n3 13042     1.561200e+02 -1.882000e+02\n4 13042     -2.385800e+02 -5.203500e+02\n6 13042     8.778003e+01 1.425800e+02\n8 13042     2.448400e+02 5.685001e+01\n12 13042     1.123200e+02 1.938300e+02\n13 13042     4.821000e+02 -1.478800e+02\n2 13043     1.995300e+02 1.249400e+02\n4 13043     -2.237600e+02 -4.791801e+02\n5 13043     7.274800e+02 -5.702700e+02\n6 13043     2.597998e+01 1.404300e+02\n8 13043     1.974200e+02 5.691000e+01\n12 13043     4.937000e+01 1.933700e+02\n2 13044     5.753700e+02 1.232100e+02\n6 13044     4.979399e+02 2.858200e+02\n9 13044     3.525200e+02 2.050400e+02\n12 13044     5.794900e+02 2.956800e+02\n2 13045     2.679800e+02 1.219500e+02\n3 13045     1.660500e+02 -1.911600e+02\n4 13045     -2.442400e+02 -5.262800e+02\n6 13045     9.925000e+01 1.375200e+02\n7 13045     4.646002e+01 2.031500e+02\n8 13045     2.531600e+02 5.389001e+01\n10 13045     6.596997e+01 2.332300e+02\n13 13045     4.899100e+02 -1.530700e+02\n2 13046     2.495400e+02 1.202700e+02\n4 13046     -2.403000e+02 -5.119700e+02\n5 13046     7.805200e+02 -5.893300e+02\n6 13046     7.891998e+01 1.341200e+02\n8 13046     2.385400e+02 5.206000e+01\n10 13046     4.439001e+01 2.329500e+02\n12 13046     1.021100e+02 1.858000e+02\n2 13047     6.912000e+02 1.189000e+02\n7 13047     5.960900e+02 2.697900e+02\n2 13048     -6.384900e+02 1.176000e+02\n7 13048     -5.678800e+02 4.081800e+02\n10 13048     -5.609800e+02 5.657900e+02\n2 13049     -4.810300e+02 1.172500e+02\n7 13049     -4.136800e+02 4.239300e+02\n14 13049     1.116700e+02 -3.648600e+02\n2 13050     -3.839700e+02 1.144900e+02\n6 13050     -5.782500e+02 3.379400e+02\n7 13050     -3.162300e+02 4.310100e+02\n8 13050     -2.358200e+02 8.126999e+01\n9 13050     -4.723800e+02 1.566300e+02\n13 13050     1.059100e+02 6.008002e+01\n14 13050     2.077200e+02 -3.675300e+02\n2 13051     -6.400500e+02 1.141900e+02\n14 13051     -3.894000e+01 -3.666300e+02\n2 13052     6.858002e+01 1.125200e+02\n6 13052     -1.104100e+02 1.369400e+02\n2 13053     4.436100e+02 1.120000e+02\n7 13053     3.819301e+02 3.213100e+02\n2 13054     1.203003e+01 1.113700e+02\n6 13054     -1.675400e+02 1.508100e+02\n2 13055     -4.397700e+02 1.112500e+02\n7 13055     -3.715600e+02 4.232200e+02\n2 13056     7.007300e+02 1.104600e+02\n3 13056     5.564100e+02 -1.942300e+02\n7 13056     6.019100e+02 2.603600e+02\n9 13056     4.575000e+02 1.993400e+02\n12 13056     7.145400e+02 2.640500e+02\n2 13057     8.149301e+02 1.093700e+02\n3 13057     6.661899e+02 -1.914600e+02\n9 13057     5.525400e+02 2.013600e+02\n2 13058     8.149301e+02 1.093700e+02\n3 13058     6.661899e+02 -1.914600e+02\n9 13058     5.525400e+02 2.013600e+02\n2 13059     2.116500e+02 1.082800e+02\n3 13059     1.148200e+02 -2.052300e+02\n4 13059     -2.385200e+02 -4.799800e+02\n5 13059     7.338400e+02 -5.950601e+02\n6 13059     3.719000e+01 1.175200e+02\n8 13059     2.060300e+02 4.228000e+01\n10 13059     -1.429993e+00 2.248900e+02\n12 13059     5.771997e+01 1.706700e+02\n13 13059     4.400200e+02 -1.595300e+02\n15 13059     7.202002e+01 2.368100e+02\n2 13060     -6.444000e+01 1.055900e+02\n3 13060     -2.002200e+02 -2.244100e+02\n8 13060     2.126001e+01 7.562000e+01\n10 13060     9.720001e+01 5.586200e+02\n12 13060     -5.327002e+01 3.587100e+02\n2 13061     1.593000e+02 1.048900e+02\n3 13061     6.490002e+01 -2.094100e+02\n5 13061     6.794000e+02 -5.831400e+02\n7 13061     -5.573999e+01 1.954900e+02\n10 13061     -5.156000e+01 2.337500e+02\n15 13061     1.396997e+01 2.466900e+02\n2 13062     -2.824700e+02 1.043100e+02\n7 13062     -2.124300e+02 4.319800e+02\n14 13062     3.108600e+02 -3.760300e+02\n2 13063     4.108002e+01 1.043300e+02\n8 13063     6.946002e+01 4.317001e+01\n2 13064     -2.520900e+02 1.028200e+02\n7 13064     -1.813800e+02 4.335900e+02\n10 13064     -9.815002e+01 5.784900e+02\n14 13064     3.425800e+02 -3.776900e+02\n2 13065     -2.520900e+02 1.028200e+02\n5 13065     4.288000e+02 -2.939700e+02\n6 13065     -4.207600e+02 3.525000e+02\n7 13065     -1.813800e+02 4.335900e+02\n8 13065     -1.280800e+02 7.442001e+01\n9 13065     -3.589700e+02 1.543300e+02\n14 13065     3.425800e+02 -3.776900e+02\n2 13066     -2.395000e+02 1.013200e+02\n5 13066     4.441600e+02 -2.956300e+02\n7 13066     -1.685700e+02 4.331400e+02\n8 13066     -1.172900e+02 7.344000e+01\n2 13067     2.261600e+02 1.006500e+02\n6 13067     5.172998e+01 1.076400e+02\n2 13068     1.730900e+02 9.729999e+01\n6 13068     -3.559998e+00 1.045100e+02\n10 13068     -4.262000e+01 2.198800e+02\n2 13069     8.228000e+02 9.496002e+01\n3 13069     6.748199e+02 -2.049200e+02\n9 13069     5.586899e+02 1.894600e+02\n2 13070     1.742600e+02 9.301001e+01\n6 13070     -3.520020e+00 9.962000e+01\n8 13070     1.750500e+02 2.998001e+01\n9 13070     3.271002e+01 1.690700e+02\n15 13070     2.160999e+01 2.251900e+02\n2 13071     6.950100e+02 9.288000e+01\n9 13071     4.540300e+02 1.836900e+02\n2 13072     6.950100e+02 9.288000e+01\n9 13072     4.540300e+02 1.836900e+02\n12 13072     7.050699e+02 2.465200e+02\n2 13073     -5.903000e+02 9.182001e+01\n7 13073     -5.188500e+02 3.918700e+02\n12 13073     -6.292700e+02 2.963400e+02\n2 13074     4.330900e+02 9.145001e+01\n6 13074     3.403700e+02 2.713700e+02\n7 13074     3.709700e+02 3.050300e+02\n13 13074     7.420800e+02 -8.077002e+01\n2 13075     -4.388400e+02 9.125000e+01\n11 13075     2.510010e+00 -3.894000e+02\n2 13076     7.313400e+02 8.982001e+01\n7 13076     6.274800e+02 2.330600e+02\n10 13076     8.189100e+02 2.449500e+02\n2 13077     7.313400e+02 8.982001e+01\n7 13077     6.274800e+02 2.330600e+02\n9 13077     4.838300e+02 1.826200e+02\n10 13077     8.189100e+02 2.449500e+02\n2 13078     1.189600e+02 8.584998e+01\n3 13078     2.781000e+01 -2.284600e+02\n5 13078     6.345400e+02 -5.916801e+02\n6 13078     -6.065997e+01 9.520001e+01\n12 13078     -4.012000e+01 1.504200e+02\n2 13079     1.796700e+02 8.559003e+01\n13 13079     4.098400e+02 -1.750200e+02\n2 13080     5.757400e+02 8.516998e+01\n3 13080     4.387900e+02 -2.246000e+02\n7 13080     4.916200e+02 2.660700e+02\n9 13080     3.535800e+02 1.731400e+02\n10 13080     6.575100e+02 3.023200e+02\n13 13080     8.651000e+02 -1.202600e+02\n2 13081     4.463101e+02 8.387000e+01\n7 13081     3.812200e+02 2.961500e+02\n15 13081     7.186700e+02 3.936700e+02\n2 13082     -1.242700e+02 8.346997e+01\n8 13082     -2.991998e+01 5.707999e+01\n11 13082     2.687100e+02 -4.227700e+02\n12 13082     -1.212900e+02 3.292800e+02\n13 13082     3.075900e+02 2.422998e+01\n14 13082     4.593300e+02 -4.226400e+02\n2 13083     5.363300e+02 8.277002e+01\n7 13083     4.570699e+02 2.741900e+02\n2 13084     -1.040200e+02 8.184003e+01\n6 13084     -2.505500e+02 3.229700e+02\n2 13085     2.750000e+01 8.163000e+01\n3 13085     -6.289001e+01 -2.351400e+02\n8 13085     5.834998e+01 2.520999e+01\n9 13085     -9.140002e+01 1.536400e+02\n2 13086     -6.434000e+02 8.015997e+01\n5 13086     3.728003e+01 -3.032100e+02\n7 13086     -5.691000e+02 3.767500e+02\n8 13086     -4.472300e+02 5.042001e+01\n10 13086     -5.625600e+02 5.300100e+02\n12 13086     -6.870300e+02 2.778300e+02\n14 13086     -4.458002e+01 -3.954000e+02\n15 13086     -5.646500e+02 5.767600e+02\n2 13087     5.512900e+02 7.941998e+01\n7 13087     4.695601e+02 2.677400e+02\n9 13087     3.332300e+02 1.670100e+02\n2 13088     -6.037300e+02 7.809003e+01\n7 13088     -5.305800e+02 3.795100e+02\n2 13089     -4.921900e+02 7.588000e+01\n8 13089     -3.239300e+02 4.962000e+01\n13 13089     1.769000e+01 2.982001e+01\n2 13090     -4.717700e+02 7.323999e+01\n5 13090     2.006200e+02 -3.143600e+02\n7 13090     -4.012800e+02 3.878700e+02\n8 13090     -3.070700e+02 4.720001e+01\n12 13090     -4.951600e+02 2.944100e+02\n2 13091     -5.649300e+02 7.127002e+01\n11 13091     -1.094300e+02 -4.016600e+02\n14 13091     2.734003e+01 -4.039700e+02\n15 13091     -4.600200e+02 5.745000e+02\n2 13092     6.805900e+02 7.037000e+01\n3 13092     5.410400e+02 -2.343400e+02\n9 13092     4.424200e+02 1.642700e+02\n12 13092     6.892100e+02 2.243900e+02\n2 13093     6.596700e+02 6.860999e+01\n12 13093     6.664800e+02 2.256100e+02\n2 13094     4.848999e+01 6.823999e+01\n3 13094     -4.073999e+01 -2.473000e+02\n2 13095     2.979999e+01 6.820001e+01\n8 13095     5.940002e+01 1.388000e+01\n2 13096     -3.768300e+02 6.745001e+01\n7 13096     -3.069600e+02 3.920600e+02\n2 13097     1.950400e+02 6.762000e+01\n3 13097     1.017500e+02 -2.438100e+02\n6 13097     1.723999e+01 6.827002e+01\n7 13097     -3.650000e+01 1.504100e+02\n8 13097     1.907300e+02 8.549988e+00\n9 13097     5.128998e+01 1.485900e+02\n10 13097     -3.537000e+01 1.785600e+02\n15 13097     3.229999e+01 1.820500e+02\n2 13098     -5.789200e+02 6.712000e+01\n14 13098     1.453003e+01 -4.072300e+02\n2 13099     6.407200e+02 6.637000e+01\n3 13099     5.020800e+02 -2.392100e+02\n6 13099     5.667800e+02 2.164500e+02\n9 13099     4.089000e+02 1.598700e+02\n10 13099     7.185100e+02 2.584200e+02\n12 13099     6.458300e+02 2.259900e+02\n2 13100     5.242900e+02 6.596002e+01\n6 13100     4.390800e+02 2.322700e+02\n7 13100     4.448800e+02 2.623300e+02\n12 13100     5.228400e+02 2.424400e+02\n2 13101     6.622800e+02 6.585999e+01\n9 13101     4.267400e+02 1.600300e+02\n12 13101     6.686500e+02 2.220900e+02\n2 13102     6.753003e+01 6.206000e+01\n5 13102     5.813000e+02 -5.995800e+02\n8 13102     8.864001e+01 7.000000e+00\n2 13103     4.895601e+02 6.247998e+01\n6 13103     4.021400e+02 2.331400e+02\n8 13103     4.612100e+02 2.382999e+01\n9 13103     2.823600e+02 1.506400e+02\n10 13103     5.689600e+02 3.131400e+02\n12 13103     4.876400e+02 2.430100e+02\n2 13104     -4.122300e+02 5.675000e+01\n7 13104     -3.415000e+02 3.799300e+02\n2 13105     -4.332400e+02 5.552002e+01\n8 13105     -2.753100e+02 3.454001e+01\n11 13105     6.750000e+00 -4.157300e+02\n2 13106     6.303003e+01 5.334998e+01\n8 13106     8.460999e+01 -1.000977e-02\n2 13107     6.678101e+02 5.107001e+01\n7 13107     5.667100e+02 2.144500e+02\n9 13107     4.320900e+02 1.480100e+02\n12 13107     6.743199e+02 2.061400e+02\n2 13108     7.792600e+02 5.059003e+01\n9 13108     5.242800e+02 1.513900e+02\n2 13109     2.382700e+02 4.948999e+01\n3 13109     1.438700e+02 -2.603900e+02\n6 13109     6.173999e+01 4.640997e+01\n12 13109     7.708002e+01 9.845001e+01\n2 13110     6.097900e+02 4.896997e+01\n7 13110     5.161100e+02 2.261100e+02\n10 13110     6.832900e+02 2.514400e+02\n2 13111     1.690500e+02 4.826001e+01\n4 13111     -2.634500e+02 -4.340601e+02\n6 13111     -1.051001e+01 4.614001e+01\n7 13111     -6.146997e+01 1.348800e+02\n8 13111     1.689700e+02 -7.089996e+00\n15 13111     -1.679993e+00 1.638400e+02\n2 13112     3.645200e+02 4.328998e+01\n3 13112     2.613700e+02 -2.628400e+02\n2 13113     8.018800e+02 4.178003e+01\n9 13113     5.431899e+02 1.448900e+02\n2 13114     3.665300e+02 4.078003e+01\n6 13114     2.013000e+02 5.042999e+01\n13 13114     5.583400e+02 -2.317000e+02\n2 13115     6.604900e+02 4.065997e+01\n3 13115     5.233900e+02 -2.634900e+02\n7 13115     5.592300e+02 2.069200e+02\n9 13115     4.260500e+02 1.388100e+02\n12 13115     6.656400e+02 1.958300e+02\n2 13116     4.870500e+02 3.665997e+01\n6 13116     3.981100e+02 2.056200e+02\n9 13116     2.798101e+02 1.292700e+02\n12 13116     4.842100e+02 2.149500e+02\n2 13117     -6.107001e+01 3.116998e+01\n8 13117     -7.760010e+00 -1.004999e+01\n2 13118     2.912700e+02 3.028003e+01\n3 13118     1.948700e+02 -2.769500e+02\n7 13118     4.404999e+01 1.052000e+02\n13 13118     4.874500e+02 -2.365200e+02\n2 13119     -5.944400e+02 2.090997e+01\n8 13119     -4.225600e+02 -1.079999e+01\n10 13119     -5.101200e+02 4.456500e+02\n12 13119     -6.215700e+02 2.249900e+02\n2 13120     -1.332400e+02 1.971997e+01\n3 13120     -2.307100e+02 -3.015500e+02\n8 13120     -6.209003e+01 -1.498999e+01\n2 13121     5.915100e+02 1.984003e+01\n3 13121     4.571100e+02 -2.863700e+02\n6 13121     5.116600e+02 1.745600e+02\n7 13121     4.978000e+02 2.057000e+02\n9 13121     3.690000e+02 1.191000e+02\n10 13121     6.609800e+02 2.300100e+02\n13 13121     8.721100e+02 -1.766200e+02\n2 13122     5.915100e+02 1.984003e+01\n8 13122     5.439200e+02 -1.464001e+01\n2 13123     4.888000e+01 1.820001e+01\n3 13123     -3.803003e+01 -2.949000e+02\n4 13123     -2.443200e+02 -3.650800e+02\n6 13123     -1.336800e+02 2.598999e+01\n9 13123     -6.875000e+01 1.014400e+02\n2 13124     6.138000e+02 1.728998e+01\n6 13124     5.359800e+02 1.684400e+02\n8 13124     5.639200e+02 -1.751999e+01\n9 13124     3.879399e+02 1.176500e+02\n10 13124     6.819100e+02 2.175000e+02\n2 13125     -5.821997e+01 1.503998e+01\n3 13125     -1.494600e+02 -3.025300e+02\n5 13125     4.790900e+02 -5.812900e+02\n6 13125     -2.363700e+02 6.097998e+01\n8 13125     -6.500000e+00 -2.364999e+01\n12 13125     -1.910500e+02 1.141000e+02\n13 13125     2.517100e+02 -1.632500e+02\n2 13126     6.332200e+02 1.457001e+01\n6 13126     5.566899e+02 1.631500e+02\n7 13126     5.329600e+02 1.909300e+02\n9 13126     4.040900e+02 1.165100e+02\n2 13127     2.348900e+02 1.325000e+01\n13 13127     4.385699e+02 -2.430000e+02\n2 13128     2.348900e+02 1.325000e+01\n13 13128     4.385699e+02 -2.430000e+02\n2 13129     -4.887500e+02 1.034003e+01\n5 13129     1.764700e+02 -3.687300e+02\n14 13129     9.503998e+01 -4.576100e+02\n15 13129     -3.536100e+02 5.164100e+02\n2 13130     6.393300e+02 1.065997e+01\n3 13130     5.040699e+02 -2.934300e+02\n6 13130     5.627000e+02 1.582000e+02\n9 13130     4.095200e+02 1.130600e+02\n2 13131     6.393300e+02 1.065997e+01\n3 13131     5.040699e+02 -2.934300e+02\n6 13131     5.627000e+02 1.582000e+02\n7 13131     5.365900e+02 1.865200e+02\n9 13131     4.095200e+02 1.130600e+02\n10 13131     7.044600e+02 2.013200e+02\n2 13132     1.429700e+02 9.330017e+00\n6 13132     -3.867999e+01 4.460022e+00\n10 13132     -9.660999e+01 1.298000e+02\n15 13132     -3.823999e+01 1.242100e+02\n2 13133     -5.740997e+01 8.869995e+00\n3 13133     -1.477100e+02 -3.085900e+02\n6 13133     -2.369800e+02 5.040997e+01\n2 13134     4.027200e+02 8.059998e+00\n3 13134     2.979000e+02 -2.959200e+02\n13 13134     5.878500e+02 -2.586000e+02\n2 13135     3.260601e+02 5.679993e+00\n6 13135     1.540600e+02 2.950012e+00\n13 13135     5.130200e+02 -2.595400e+02\n2 13136     -1.547998e+01 4.359985e+00\n3 13136     -1.025900e+02 -3.111500e+02\n6 13136     -1.970300e+02 2.582001e+01\n8 13136     2.272998e+01 -3.645001e+01\n9 13136     -1.242900e+02 8.700000e+01\n12 13136     -1.669900e+02 8.184998e+01\n2 13137     1.976300e+02 2.260010e+00\n15 13137     1.477002e+01 9.820001e+01\n2 13138     5.865500e+02 -1.900024e-01\n6 13138     5.052900e+02 1.539100e+02\n8 13138     5.399500e+02 -3.073999e+01\n12 13138     5.860100e+02 1.637700e+02\n2 13139     6.951700e+02 -1.369995e+00\n9 13139     4.561000e+02 1.050100e+02\n2 13140     4.166100e+02 -3.239990e+00\n8 13140     3.756100e+02 -5.047000e+01\n2 13141     4.166100e+02 -3.239990e+00\n8 13141     3.756100e+02 -5.047000e+01\n2 13142     -1.278900e+02 -5.070007e+00\n3 13142     -2.215500e+02 -3.250800e+02\n2 13143     5.417000e+02 -9.960022e+00\n7 13143     4.517800e+02 1.924200e+02\n2 13144     -5.250000e+00 -1.273999e+01\n6 13144     -1.866800e+02 4.340027e+00\n9 13144     -1.140400e+02 7.283002e+01\n2 13145     2.762300e+02 -1.273999e+01\n7 13145     2.245001e+01 6.604999e+01\n8 13145     2.544800e+02 -5.958002e+01\n10 13145     2.340997e+01 7.559998e+01\n15 13145     1.020800e+02 6.181000e+01\n2 13146     2.762300e+02 -1.273999e+01\n7 13146     2.245001e+01 6.604999e+01\n8 13146     2.544800e+02 -5.958002e+01\n10 13146     2.340997e+01 7.559998e+01\n15 13146     1.020800e+02 6.181000e+01\n2 13147     3.722700e+02 -1.404999e+01\n8 13147     3.361000e+02 -6.013000e+01\n2 13148     -5.599976e-01 -1.508002e+01\n6 13148     -1.823200e+02 1.199951e-01\n2 13149     1.956700e+02 -1.526001e+01\n15 13149     8.979980e+00 7.828003e+01\n2 13150     -4.733002e+01 -2.122998e+01\n6 13150     -2.288700e+02 1.130005e+00\n8 13150     -2.440002e+00 -5.685001e+01\n12 13150     -1.969400e+02 5.785999e+01\n2 13151     2.781000e+02 -2.239001e+01\n3 13151     1.851900e+02 -3.268300e+02\n6 13151     1.010800e+02 -3.057001e+01\n10 13151     2.340002e+01 6.527002e+01\n15 13151     1.021800e+02 4.989001e+01\n2 13152     5.383400e+02 -2.562000e+01\n3 13152     4.219399e+02 -3.263400e+02\n8 13152     4.839200e+02 -6.492999e+01\n2 13153     3.820500e+02 -2.960999e+01\n12 13153     2.373800e+02 1.860999e+01\n2 13154     3.820500e+02 -2.960999e+01\n3 13154     2.820100e+02 -3.318100e+02\n6 13154     2.147000e+02 -2.385999e+01\n7 13154     1.308100e+02 5.246002e+01\n8 13154     3.436700e+02 -7.283002e+01\n10 13154     1.503300e+02 5.125000e+01\n12 13154     2.373800e+02 1.860999e+01\n13 13154     5.603600e+02 -2.888000e+02\n2 13155     3.521997e+01 -3.104999e+01\n12 13155     -1.270600e+02 3.163000e+01\n2 13156     3.521997e+01 -3.104999e+01\n8 13156     6.091998e+01 -6.851001e+01\n12 13156     -1.270600e+02 3.163000e+01\n2 13157     3.577100e+02 -3.214001e+01\n10 13157     1.169500e+02 4.765997e+01\n13 13157     5.365000e+02 -2.908400e+02\n2 13158     6.715601e+02 -3.257001e+01\n7 13158     5.602900e+02 1.406200e+02\n9 13158     4.375100e+02 7.796002e+01\n2 13159     6.800699e+02 -3.401001e+01\n3 13159     5.465601e+02 -3.348000e+02\n7 13159     5.671500e+02 1.370900e+02\n2 13160     2.139301e+02 -3.541998e+01\n7 13160     -3.503003e+01 5.241998e+01\n10 13160     -4.298999e+01 6.647998e+01\n13 13160     4.151200e+02 -2.770100e+02\n15 13160     2.525000e+01 4.998999e+01\n2 13161     6.596200e+02 -3.627002e+01\n3 13161     5.271899e+02 -3.386700e+02\n6 13161     5.834500e+02 1.066400e+02\n8 13161     5.997100e+02 -6.296002e+01\n9 13161     4.269800e+02 7.472998e+01\n12 13161     6.612200e+02 1.157600e+02\n2 13162     3.887000e+01 -3.756000e+01\n8 13162     6.392999e+01 -7.391998e+01\n2 13163     3.887000e+01 -3.756000e+01\n8 13163     6.392999e+01 -7.391998e+01\n2 13164     2.358199e+02 -3.959003e+01\n6 13164     5.615997e+01 -4.971002e+01\n10 13164     -2.265002e+01 5.734998e+01\n2 13165     2.985500e+02 -4.134003e+01\n10 13165     4.376001e+01 4.514001e+01\n2 13166     4.088300e+02 -4.292999e+01\n8 13166     3.674400e+02 -8.406000e+01\n2 13167     3.852400e+02 -4.713000e+01\n6 13167     2.172700e+02 -4.296997e+01\n8 13167     3.465200e+02 -8.759003e+01\n12 13167     2.396600e+02 -1.000000e+00\n2 13168     -6.588900e+02 -5.325000e+01\n14 13168     -7.164001e+01 -5.072800e+02\n2 13169     1.676001e+01 -5.341998e+01\n6 13169     -1.676000e+02 -5.000000e+01\n12 13169     -1.494400e+02 7.330017e+00\n2 13170     -1.440200e+02 -5.453998e+01\n3 13170     -2.302000e+02 -3.723400e+02\n8 13170     -7.900000e+01 -8.077002e+01\n2 13171     -1.440200e+02 -5.453998e+01\n8 13171     -7.900000e+01 -8.077002e+01\n2 13172     6.462400e+02 -5.492999e+01\n6 13172     5.675500e+02 8.934998e+01\n8 13172     5.886801e+02 -7.771997e+01\n9 13172     4.167800e+02 5.848999e+01\n12 13172     6.461100e+02 9.834998e+01\n2 13173     4.370300e+02 -5.838000e+01\n3 13173     3.352600e+02 -3.580500e+02\n7 13173     1.798600e+02 2.203003e+01\n10 13173     2.061500e+02 1.244000e+01\n13 13173     6.042200e+02 -3.189900e+02\n15 13173     3.185200e+02 -1.164001e+01\n2 13174     4.673400e+02 -6.209003e+01\n3 13174     3.626700e+02 -3.609500e+02\n10 13174     2.510100e+02 9.080017e+00\n13 13174     6.358000e+02 -3.228500e+02\n15 13174     3.734900e+02 -1.509003e+01\n2 13175     7.397000e+02 -7.296002e+01\n3 13175     6.083800e+02 -3.707200e+02\n9 13175     4.954600e+02 4.757001e+01\n2 13176     -9.485999e+01 -7.358002e+01\n6 13176     -2.779100e+02 -5.556000e+01\n8 13176     -4.164001e+01 -9.842999e+01\n12 13176     -2.465800e+02 3.809998e+00\n2 13177     -1.209003e+01 -7.659998e+01\n3 13177     -9.396997e+01 -3.886400e+02\n6 13177     -1.961700e+02 -7.540997e+01\n8 13177     2.065002e+01 -1.050100e+02\n9 13177     -1.157100e+02 2.016998e+01\n2 13178     7.049700e+02 -7.708002e+01\n7 13178     5.829700e+02 9.397000e+01\n2 13179     3.465200e+02 -7.846002e+01\n3 13179     2.527200e+02 -3.794600e+02\n2 13180     3.681300e+02 -7.994000e+01\n4 13180     -4.038500e+02 -5.414200e+02\n7 13180     9.922998e+01 -1.510010e+00\n9 13180     2.015699e+02 3.325000e+01\n13 13180     5.332100e+02 -3.336000e+02\n2 13181     -1.125000e+01 -8.040002e+01\n6 13181     -1.953600e+02 -7.885999e+01\n8 13181     2.147998e+01 -1.084500e+02\n2 13182     8.808002e+01 -8.060999e+01\n6 13182     -9.695001e+01 -9.207001e+01\n2 13183     7.970100e+02 -8.148999e+01\n7 13183     6.606100e+02 6.694000e+01\n2 13184     7.067400e+02 -8.253998e+01\n9 13184     4.678700e+02 3.791998e+01\n12 13184     7.085500e+02 6.125000e+01\n2 13185     6.277800e+02 -8.487000e+01\n6 13185     5.463400e+02 6.146002e+01\n9 13185     4.019100e+02 3.265002e+01\n10 13185     6.750300e+02 1.098000e+02\n2 13186     6.277800e+02 -8.487000e+01\n8 13186     5.724900e+02 -1.010100e+02\n2 13187     -1.118600e+02 -8.584003e+01\n3 13187     -1.930500e+02 -4.009000e+02\n8 13187     -5.713000e+01 -1.092200e+02\n2 13188     7.339900e+02 -8.640002e+01\n7 13188     6.061899e+02 7.908002e+01\n9 13188     4.905601e+02 3.594000e+01\n10 13188     7.785800e+02 6.345001e+01\n2 13189     -1.137800e+02 -9.159998e+01\n3 13189     -1.955000e+02 -4.059500e+02\n6 13189     -2.996300e+02 -8.309998e+01\n8 13189     -5.928003e+01 -1.142000e+02\n2 13190     -2.708700e+02 -9.723999e+01\n6 13190     -4.419700e+02 4.596997e+01\n9 13190     -3.538800e+02 -1.642999e+01\n2 13191     1.105200e+02 -9.959998e+01\n3 13191     2.915002e+01 -4.067300e+02\n6 13191     -7.450000e+01 -1.155900e+02\n8 13191     1.158500e+02 -1.290900e+02\n2 13192     7.323800e+02 -1.011800e+02\n9 13192     4.895400e+02 2.376001e+01\n2 13193     1.338400e+02 -1.080300e+02\n3 13193     5.251001e+01 -4.143000e+02\n6 13193     -5.122998e+01 -1.251600e+02\n7 13193     -1.145700e+02 -5.239990e+00\n10 13193     -1.368400e+02 9.330017e+00\n12 13193     -4.602002e+01 -7.112000e+01\n15 13193     -8.394000e+01 -1.760999e+01\n2 13194     2.705601e+02 -1.090000e+02\n10 13194     -1.328998e+01 -2.659003e+01\n2 13195     1.299600e+02 -1.115500e+02\n7 13195     -1.176100e+02 -7.239990e+00\n2 13196     7.275200e+02 -1.124200e+02\n7 13196     5.977600e+02 5.873999e+01\n2 13197     5.353300e+02 -1.132600e+02\n8 13197     4.726899e+02 -1.436300e+02\n2 13198     -2.184998e+01 -1.141700e+02\n3 13198     -1.012300e+02 -4.254100e+02\n7 13198     -2.259500e+02 2.076001e+01\n10 13198     -2.518000e+02 5.421002e+01\n13 13198     2.383700e+02 -2.922000e+02\n15 13198     -2.166200e+02 3.325000e+01\n2 13199     -8.866998e+01 -1.147500e+02\n3 13199     -1.665100e+02 -4.281400e+02\n6 13199     -2.746700e+02 -1.182700e+02\n8 13199     -4.169000e+01 -1.351500e+02\n12 13199     -2.570800e+02 -5.550000e+01\n2 13200     9.391998e+01 -1.143700e+02\n3 13200     1.378003e+01 -4.216700e+02\n6 13200     -9.101999e+01 -1.284900e+02\n15 13200     -1.204400e+02 -1.007001e+01\n2 13201     9.048999e+01 -1.154800e+02\n3 13201     1.053998e+01 -4.226200e+02\n6 13201     -9.450000e+01 -1.293200e+02\n8 13201     1.004400e+02 -1.411000e+02\n10 13201     -1.711100e+02 1.609003e+01\n12 13201     -8.814001e+01 -7.354999e+01\n15 13201     -1.236900e+02 -9.919983e+00\n2 13202     1.803100e+02 -1.162300e+02\n13 13202     3.737100e+02 -3.369800e+02\n2 13203     7.196500e+02 -1.174800e+02\n9 13203     4.794100e+02 9.570007e+00\n12 13203     7.193600e+02 2.371997e+01\n2 13204     7.900000e+01 -1.183500e+02\n3 13204     -9.299927e-01 -4.261700e+02\n8 13204     9.066998e+01 -1.426700e+02\n10 13204     -1.795600e+02 1.687000e+01\n15 13204     -1.335900e+02 -9.070007e+00\n2 13205     4.822600e+02 -1.205800e+02\n7 13205     2.052900e+02 -4.507001e+01\n8 13205     4.254000e+02 -1.512700e+02\n2 13206     7.177000e+02 -1.209300e+02\n7 13206     5.883199e+02 5.440997e+01\n2 13207     8.453998e+01 -1.220200e+02\n3 13207     4.739990e+00 -4.299100e+02\n6 13207     -1.004800e+02 -1.353100e+02\n7 13207     -1.514200e+02 -7.070007e+00\n8 13207     9.531000e+01 -1.463600e+02\n10 13207     -1.757200e+02 1.228003e+01\n2 13208     8.453998e+01 -1.220200e+02\n3 13208     4.739990e+00 -4.299100e+02\n6 13208     -1.004800e+02 -1.353100e+02\n7 13208     -1.514200e+02 -7.070007e+00\n8 13208     9.531000e+01 -1.463600e+02\n10 13208     -1.757200e+02 1.228003e+01\n15 13208     -1.289000e+02 -1.457001e+01\n2 13209     5.345699e+02 -1.218300e+02\n8 13209     4.721100e+02 -1.514500e+02\n2 13210     1.370200e+02 -1.238100e+02\n10 13210     -1.346600e+02 -6.380005e+00\n13 13210     3.430900e+02 -3.337200e+02\n15 13210     -8.097998e+01 -3.532001e+01\n2 13211     2.912100e+02 -1.268000e+02\n3 13211     2.043400e+02 -4.272300e+02\n10 13211     5.880005e+00 -4.553998e+01\n2 13212     3.365699e+02 -1.294100e+02\n13 13212     4.954399e+02 -3.708300e+02\n2 13213     4.590100e+02 -1.320900e+02\n3 13213     3.624399e+02 -4.276600e+02\n8 13213     4.049000e+02 -1.613600e+02\n2 13214     5.229500e+02 -1.320700e+02\n8 13214     4.611899e+02 -1.594700e+02\n9 13214     3.285400e+02 -4.640015e+00\n2 13215     -5.133002e+01 -1.325300e+02\n3 13215     -1.280800e+02 -4.445900e+02\n8 13215     -1.342999e+01 -1.511200e+02\n9 13215     -1.439900e+02 -2.969000e+01\n12 13215     -2.250100e+02 -8.042999e+01\n2 13216     3.016998e+01 -1.330900e+02\n3 13216     -4.729999e+01 -4.418600e+02\n8 13216     5.129999e+01 -1.538000e+02\n2 13217     1.619700e+02 -1.347000e+02\n3 13217     8.097998e+01 -4.395100e+02\n6 13217     -2.271002e+01 -1.525900e+02\n7 13217     -9.366998e+01 -3.115002e+01\n10 13217     -1.151900e+02 -2.237000e+01\n12 13217     -1.851001e+01 -1.004400e+02\n2 13218     1.844300e+02 -1.343600e+02\n3 13218     1.027100e+02 -4.379700e+02\n6 13218     -6.199951e-01 -1.534900e+02\n8 13218     1.747300e+02 -1.589100e+02\n9 13218     5.367999e+01 -1.884003e+01\n12 13218     3.210022e+00 -1.026000e+02\n15 13218     -3.856000e+01 -6.196002e+01\n2 13219     7.776300e+02 -1.342500e+02\n9 13219     5.276500e+02 -2.070007e+00\n2 13220     5.259700e+02 -1.347700e+02\n8 13220     4.641500e+02 -1.615000e+02\n2 13221     7.661000e+02 -1.364600e+02\n7 13221     6.268199e+02 2.856000e+01\n9 13221     5.183400e+02 -4.179993e+00\n2 13222     7.661000e+02 -1.364600e+02\n7 13222     6.268199e+02 2.856000e+01\n9 13222     5.183400e+02 -4.179993e+00\n2 13223     -8.459003e+01 -1.378600e+02\n3 13223     -1.630300e+02 -4.510000e+02\n6 13223     -2.693700e+02 -1.387500e+02\n8 13223     -3.876001e+01 -1.530200e+02\n9 13223     -1.730000e+02 -3.487000e+01\n2 13224     -5.872800e+02 -1.418900e+02\n8 13224     -4.089100e+02 -1.289700e+02\n2 13225     -3.156300e+02 -1.420500e+02\n8 13225     -1.965800e+02 -1.324500e+02\n2 13226     4.344200e+02 -1.418200e+02\n6 13226     2.612400e+02 -1.551400e+02\n8 13226     3.840700e+02 -1.692900e+02\n15 13226     2.562400e+02 -1.318000e+02\n2 13227     5.316200e+02 -1.428600e+02\n8 13227     4.698700e+02 -1.670500e+02\n2 13228     5.316200e+02 -1.428600e+02\n8 13228     4.698700e+02 -1.670500e+02\n2 13229     7.592900e+02 -1.429900e+02\n9 13229     5.130000e+02 -9.909973e+00\n2 13230     8.212200e+02 -1.463700e+02\n3 13230     6.939900e+02 -4.405400e+02\n7 13230     6.719200e+02 6.380005e+00\n12 13230     8.260800e+02 -2.273999e+01\n2 13231     7.209003e+01 -1.484700e+02\n8 13231     8.310999e+01 -1.683700e+02\n2 13232     -1.977002e+01 -1.526800e+02\n3 13232     -9.602002e+01 -4.628700e+02\n6 13232     -2.060900e+02 -1.658700e+02\n8 13232     1.020001e+01 -1.684100e+02\n9 13232     -1.164000e+02 -4.371002e+01\n2 13233     2.882001e+01 -1.561900e+02\n8 13233     4.773999e+01 -1.744000e+02\n2 13234     -3.113000e+01 -1.566500e+02\n3 13234     -1.079300e+02 -4.673300e+02\n6 13234     -2.170300e+02 -1.665300e+02\n9 13234     -1.256100e+02 -4.787000e+01\n2 13235     -4.515002e+01 -1.567800e+02\n3 13235     -1.220000e+02 -4.672500e+02\n2 13236     6.959003e+01 -1.591200e+02\n8 13236     8.008002e+01 -1.777600e+02\n2 13237     -2.761100e+02 -1.594000e+02\n8 13237     -1.673500e+02 -1.479200e+02\n2 13238     8.221600e+02 -1.599600e+02\n7 13238     6.709399e+02 -5.140015e+00\n2 13239     4.353500e+02 -1.617400e+02\n6 13239     2.577700e+02 -1.799900e+02\n8 13239     3.816300e+02 -1.867300e+02\n12 13239     2.693101e+02 -1.425200e+02\n2 13240     4.725800e+02 -1.634400e+02\n6 13240     2.999900e+02 -1.740100e+02\n12 13240     3.162800e+02 -1.388300e+02\n2 13241     3.945800e+02 -1.684600e+02\n7 13241     9.346002e+01 -9.498999e+01\n2 13242     -3.608002e+01 -1.704700e+02\n6 13242     -2.206400e+02 -1.763300e+02\n2 13243     3.778998e+01 -1.846900e+02\n6 13243     -1.491300e+02 -2.042500e+02\n12 13243     -1.471000e+02 -1.463900e+02\n2 13244     3.778998e+01 -1.846900e+02\n6 13244     -1.491300e+02 -2.042500e+02\n7 13244     -1.994200e+02 -5.906000e+01\n8 13244     5.491998e+01 -1.971700e+02\n12 13244     -1.471000e+02 -1.463900e+02\n2 13245     1.909301e+02 -1.844800e+02\n3 13245     1.146400e+02 -4.848101e+02\n8 13245     1.764600e+02 -2.034500e+02\n2 13246     2.177400e+02 -1.861000e+02\n3 13246     1.414100e+02 -4.851899e+02\n2 13247     4.095500e+02 -1.864900e+02\n3 13247     3.210400e+02 -4.819700e+02\n6 13247     2.298600e+02 -2.052600e+02\n2 13248     -4.444300e+02 -1.887000e+02\n7 13248     -4.452700e+02 1.017900e+02\n10 13248     -4.510200e+02 1.939600e+02\n13 13248     -2.500000e-01 -2.115700e+02\n15 13248     -4.368200e+02 1.913200e+02\n2 13249     3.878800e+02 -1.884300e+02\n6 13249     2.068400e+02 -2.109500e+02\n7 13249     8.866998e+01 -1.086600e+02\n12 13249     2.125400e+02 -1.719300e+02\n2 13250     8.088199e+02 -1.913000e+02\n7 13250     6.385200e+02 -4.142999e+01\n2 13251     2.375300e+02 -1.947000e+02\n7 13251     -4.989001e+01 -1.008900e+02\n15 13251     -1.365002e+01 -1.548600e+02\n2 13252     2.655601e+02 -1.976800e+02\n3 13252     1.863400e+02 -4.968700e+02\n6 13252     7.790002e+01 -2.252800e+02\n8 13252     2.378400e+02 -2.131100e+02\n15 13252     1.859998e+01 -1.647600e+02\n2 13253     -3.066200e+02 -2.085600e+02\n3 13253     -4.140100e+02 -5.399301e+02\n2 13254     -3.300400e+02 -2.094800e+02\n3 13254     -4.383000e+02 -5.415699e+02\n2 13255     4.561400e+02 -2.123800e+02\n6 13255     2.842900e+02 -2.178600e+02\n8 13255     4.017900e+02 -2.261800e+02\n2 13256     2.313300e+02 -2.129300e+02\n6 13256     4.396002e+01 -2.395699e+02\n2 13257     3.769301e+02 -2.148400e+02\n8 13257     3.314900e+02 -2.293400e+02\n2 13258     4.725601e+02 -2.198400e+02\n6 13258     3.015600e+02 -2.218500e+02\n2 13259     3.644200e+02 -2.219000e+02\n8 13259     3.191900e+02 -2.358900e+02\n2 13260     1.114200e+02 -2.241000e+02\n3 13260     3.627002e+01 -5.289800e+02\n6 13260     -7.534998e+01 -2.429800e+02\n2 13261     -3.574100e+02 -2.263100e+02\n7 13261     -3.910800e+02 5.248999e+01\n2 13262     5.098600e+02 -2.319200e+02\n6 13262     3.509700e+02 -2.115400e+02\n8 13262     4.500900e+02 -2.390400e+02\n12 13262     3.810000e+02 -1.818200e+02\n2 13263     -3.342100e+02 -2.331600e+02\n3 13263     -4.404800e+02 -5.662000e+02\n2 13264     1.204900e+02 -2.357700e+02\n6 13264     -6.562000e+01 -2.534200e+02\n9 13264     5.109985e+00 -1.052800e+02\n12 13264     -6.481000e+01 -2.006300e+02\n2 13265     5.117000e+02 -2.363500e+02\n8 13265     4.515400e+02 -2.426400e+02\n2 13266     -5.010010e+00 -2.377400e+02\n3 13266     -8.148999e+01 -5.480400e+02\n6 13266     -1.882400e+02 -2.419800e+02\n8 13266     2.223999e+01 -2.359500e+02\n9 13266     -1.005700e+02 -1.143000e+02\n2 13267     5.038400e+02 -2.390200e+02\n8 13267     4.443700e+02 -2.452700e+02\n2 13268     -4.003100e+02 -2.426200e+02\n8 13268     -2.713400e+02 -2.160200e+02\n2 13269     -6.498500e+02 -2.443800e+02\n13 13269     -1.482900e+02 -2.373400e+02\n15 13269     -6.653500e+02 1.439200e+02\n2 13270     -4.358200e+02 -2.467100e+02\n8 13270     -3.000200e+02 -2.198500e+02\n9 13270     -4.813000e+02 -1.515200e+02\n15 13270     -4.656800e+02 1.037900e+02\n2 13271     -3.267100e+02 -2.493600e+02\n3 13271     -4.310200e+02 -5.820400e+02\n2 13272     3.303998e+01 -2.505300e+02\n3 13272     -4.157001e+01 -5.591500e+02\n6 13272     -1.509800e+02 -2.602200e+02\n7 13272     -1.975100e+02 -1.009400e+02\n8 13272     5.176001e+01 -2.482900e+02\n9 13272     -6.737000e+01 -1.232100e+02\n12 13272     -1.451900e+02 -2.026800e+02\n2 13273     1.275000e+02 -2.561300e+02\n6 13273     -5.764001e+01 -2.715100e+02\n12 13273     -5.592999e+01 -2.196800e+02\n2 13274     1.864600e+02 -2.572700e+02\n3 13274     1.121000e+02 -5.588900e+02\n2 13275     3.428400e+02 -2.588700e+02\n3 13275     2.615601e+02 -5.549700e+02\n6 13275     1.599200e+02 -2.751600e+02\n9 13275     1.892300e+02 -1.148900e+02\n2 13276     4.908199e+02 -2.616100e+02\n6 13276     3.277300e+02 -2.465400e+02\n8 13276     4.326801e+02 -2.642300e+02\n12 13276     3.540699e+02 -2.167700e+02\n2 13277     3.394500e+02 -2.624100e+02\n8 13277     3.000000e+02 -2.666100e+02\n2 13278     4.705400e+02 -2.666300e+02\n6 13278     2.996000e+02 -2.648800e+02\n2 13279     3.262000e+01 -2.669900e+02\n8 13279     5.170001e+01 -2.599400e+02\n2 13280     5.857001e+01 -2.680900e+02\n6 13280     -1.247800e+02 -2.768600e+02\n9 13280     -4.562000e+01 -1.363600e+02\n12 13280     -1.190500e+02 -2.215300e+02\n15 13280     -1.652700e+02 -1.540400e+02\n2 13281     3.119800e+02 -2.695200e+02\n3 13281     2.318101e+02 -5.672300e+02\n10 13281     4.429993e+00 -1.778900e+02\n15 13281     8.296997e+01 -2.364000e+02\n2 13282     4.676899e+02 -2.699700e+02\n6 13282     2.969200e+02 -2.676400e+02\n12 13282     3.161200e+02 -2.361000e+02\n2 13283     4.888101e+02 -2.723100e+02\n6 13283     3.252800e+02 -2.560200e+02\n7 13283     2.155900e+02 -1.520100e+02\n8 13283     4.309000e+02 -2.726500e+02\n12 13283     3.516300e+02 -2.261500e+02\n13 13283     6.269399e+02 -4.837600e+02\n2 13284     5.214301e+02 -2.725000e+02\n8 13284     4.613700e+02 -2.708800e+02\n2 13285     5.173300e+02 -2.739200e+02\n8 13285     4.574100e+02 -2.723200e+02\n2 13286     -4.319600e+02 -2.767400e+02\n7 13286     -4.652000e+02 3.799988e+00\n9 13286     -4.741400e+02 -1.763900e+02\n2 13287     -3.531900e+02 -2.786000e+02\n3 13287     -4.568100e+02 -6.134000e+02\n9 13287     -4.054000e+02 -1.727100e+02\n2 13288     -3.531900e+02 -2.786000e+02\n3 13288     -4.568100e+02 -6.134000e+02\n8 13288     -2.374800e+02 -2.481000e+02\n9 13288     -4.054000e+02 -1.727100e+02\n2 13289     4.260400e+02 -2.809300e+02\n4 13289     -5.482100e+02 -5.466100e+02\n8 13289     3.750400e+02 -2.811900e+02\n2 13290     -3.527500e+02 -2.826800e+02\n8 13290     -2.371900e+02 -2.517000e+02\n9 13290     -4.038400e+02 -1.761100e+02\n13 13290     3.715997e+01 -3.100800e+02\n2 13291     3.643900e+02 -2.835300e+02\n4 13291     -5.245800e+02 -4.872500e+02\n6 13291     1.833700e+02 -2.930699e+02\n7 13291     6.802002e+01 -1.720300e+02\n8 13291     3.206900e+02 -2.839100e+02\n9 13291     2.075800e+02 -1.345000e+02\n12 13291     1.900100e+02 -2.556000e+02\n13 13291     4.981801e+02 -4.856700e+02\n2 13292     2.244100e+02 -2.961600e+02\n13 13292     3.869100e+02 -4.706500e+02\n2 13293     2.813900e+02 -3.023900e+02\n8 13293     2.525700e+02 -2.965800e+02\n12 13293     1.028300e+02 -2.711800e+02\n2 13294     3.356500e+02 -3.058600e+02\n6 13294     1.542400e+02 -3.149800e+02\n2 13295     1.131300e+02 -3.081900e+02\n7 13295     -1.366600e+02 -1.557600e+02\n2 13296     3.196801e+02 -3.101100e+02\n3 13296     2.411899e+02 -6.086500e+02\n2 13297     3.196801e+02 -3.101100e+02\n6 13297     1.379600e+02 -3.189100e+02\n9 13297     1.720100e+02 -1.583400e+02\n10 13297     1.566998e+01 -2.076600e+02\n12 13297     1.441800e+02 -2.791200e+02\n15 13297     9.744000e+01 -2.721300e+02\n2 13298     3.372700e+02 -3.122000e+02\n6 13298     1.556300e+02 -3.216400e+02\n9 13298     1.863500e+02 -1.598600e+02\n2 13299     -4.516300e+02 -3.137000e+02\n9 13299     -4.872700e+02 -2.082300e+02\n13 13299     -3.560999e+01 -3.240100e+02\n2 13300     -4.516300e+02 -3.137000e+02\n9 13300     -4.872700e+02 -2.082300e+02\n13 13300     -3.560999e+01 -3.240100e+02\n15 13300     -5.220500e+02 8.809998e+00\n2 13301     1.114500e+02 -3.142900e+02\n6 13301     -7.171997e+01 -3.216600e+02\n12 13301     -6.737000e+01 -2.696300e+02\n2 13302     1.157900e+02 -3.146400e+02\n6 13302     -6.696997e+01 -3.223700e+02\n2 13303     1.226400e+02 -3.153900e+02\n6 13303     -6.050000e+01 -3.234800e+02\n12 13303     -5.641998e+01 -2.722300e+02\n2 13304     1.226400e+02 -3.153900e+02\n8 13304     1.225400e+02 -3.036300e+02\n2 13305     3.924301e+02 -3.157600e+02\n3 13305     3.111300e+02 -6.131000e+02\n6 13305     2.153300e+02 -3.190699e+02\n8 13305     3.454800e+02 -3.101000e+02\n12 13305     2.271300e+02 -2.838500e+02\n2 13306     1.095100e+02 -3.173800e+02\n12 13306     -6.934003e+01 -2.722500e+02\n2 13307     2.430800e+02 -3.196700e+02\n6 13307     5.969000e+01 -3.302700e+02\n2 13308     5.307001e+01 -3.214700e+02\n6 13308     -1.276800e+02 -3.221000e+02\n9 13308     -4.815997e+01 -1.816600e+02\n12 13308     -1.190000e+02 -2.661800e+02\n2 13309     3.840300e+02 -3.270000e+02\n8 13309     3.388600e+02 -3.179700e+02\n2 13310     2.019900e+02 -3.311500e+02\n12 13310     2.148999e+01 -2.920200e+02\n2 13311     8.134003e+01 -3.345500e+02\n6 13311     -9.976001e+01 -3.365601e+02\n8 13311     9.028998e+01 -3.162000e+02\n9 13311     -2.401001e+01 -1.903700e+02\n2 13312     8.134003e+01 -3.345500e+02\n8 13312     9.028998e+01 -3.162000e+02\n2 13313     2.678101e+02 -3.372800e+02\n6 13313     8.533002e+01 -3.445900e+02\n2 13314     -5.356900e+02 -3.393800e+02\n8 13314     -3.852600e+02 -2.964400e+02\n2 13315     4.800000e+01 -3.436100e+02\n6 13315     -1.319100e+02 -3.400800e+02\n2 13316     6.600000e+01 -3.470500e+02\n6 13316     -1.135400e+02 -3.445000e+02\n13 13316     2.767200e+02 -4.679200e+02\n2 13317     5.446002e+01 -3.559200e+02\n6 13317     -1.251800e+02 -3.526100e+02\n2 13318     -1.715600e+02 -3.711800e+02\n13 13318     1.287700e+02 -4.238300e+02\n2 13319     3.442700e+02 -3.756100e+02\n6 13319     1.633500e+02 -3.793700e+02\n8 13319     3.031300e+02 -3.574500e+02\n12 13319     1.703000e+02 -3.422000e+02\n2 13320     1.904301e+02 -3.791900e+02\n6 13320     7.489990e+00 -3.856600e+02\n2 13321     -3.040600e+02 -3.814600e+02\n7 13321     -4.037100e+02 -1.181900e+02\n8 13321     -2.075800e+02 -3.365600e+02\n15 13321     -4.264100e+02 -1.141900e+02\n2 13322     -1.264800e+02 -3.860600e+02\n8 13322     -7.153998e+01 -3.480600e+02\n2 13323     -2.803700e+02 -4.077200e+02\n6 13323     -4.551000e+02 -3.799900e+02\n2 13324     1.695001e+01 -4.161801e+02\n6 13324     -1.637700e+02 -4.175500e+02\n2 13325     3.063000e+01 -4.200200e+02\n6 13325     -1.503300e+02 -4.216000e+02\n9 13325     -6.120001e+01 -2.643100e+02\n12 13325     -1.455100e+02 -3.637400e+02\n2 13326     -3.050100e+02 -4.224000e+02\n7 13326     -4.178600e+02 -1.604300e+02\n8 13326     -2.122300e+02 -3.713600e+02\n13 13326     3.270001e+01 -4.403300e+02\n2 13327     3.582100e+02 -4.395800e+02\n6 13327     1.743800e+02 -4.462300e+02\n2 13328     3.979999e+01 -4.522400e+02\n13 13328     2.434900e+02 -5.375400e+02\n2 13329     1.087000e+01 -4.539200e+02\n6 13329     -1.682200e+02 -4.490500e+02\n2 13330     2.790601e+02 -4.546300e+02\n12 13330     9.520001e+01 -4.184800e+02\n2 13331     -3.265800e+02 -4.571801e+02\n8 13331     -2.314500e+02 -4.005500e+02\n2 13332     1.854700e+02 -4.571400e+02\n6 13332     1.229980e+00 -4.637600e+02\n2 13333     1.705600e+02 -4.601700e+02\n12 13333     -1.509003e+01 -4.181801e+02\n2 13334     1.700200e+02 -4.705500e+02\n6 13334     -1.340997e+01 -4.745900e+02\n9 13334     5.696002e+01 -2.976900e+02\n2 13335     5.650024e+00 -4.715400e+02\n13 13335     2.188101e+02 -5.434600e+02\n2 13336     -4.229200e+02 -4.871000e+02\n7 13336     -5.214400e+02 -2.125200e+02\n10 13336     -5.831700e+02 -1.671300e+02\n15 13336     -5.931100e+02 -2.278900e+02\n2 13337     6.263000e+02 -4.934500e+02\n9 13337     4.279500e+02 -2.948700e+02\n2 13338     7.192400e+02 -5.332800e+02\n9 13338     5.031000e+02 -3.208200e+02\n12 13338     5.527800e+02 -5.259900e+02\n2 13339     7.007600e+02 -5.349700e+02\n6 13339     5.188300e+02 -5.393000e+02\n7 13339     3.308400e+02 -4.140300e+02\n9 13339     4.888800e+02 -3.235100e+02\n10 13339     3.400100e+02 -5.064100e+02\n12 13339     5.319900e+02 -5.275900e+02\n2 13340     7.427200e+02 -5.404100e+02\n6 13340     5.591500e+02 -5.461700e+02\n7 13340     3.634700e+02 -4.264300e+02\n9 13340     5.218500e+02 -3.253400e+02\n10 13340     3.755100e+02 -5.263700e+02\n12 13340     5.738600e+02 -5.376100e+02\n2 13341     5.260500e+02 -5.421700e+02\n9 13341     3.512300e+02 -3.385200e+02\n2 13342     6.156600e+02 -5.464500e+02\n9 13342     4.225400e+02 -3.373200e+02\n2 13343     2.989000e+02 -5.514301e+02\n15 13343     1.667999e+01 -5.137300e+02\n2 13344     5.030100e+02 -5.610200e+02\n9 13344     3.329100e+02 -3.551700e+02\n2 13345     4.913800e+02 -5.797300e+02\n9 13345     3.253700e+02 -3.702600e+02\n2 13346     2.475200e+02 -5.826600e+02\n7 13346     -6.215997e+01 -3.899600e+02\n15 13346     -4.446002e+01 -5.287700e+02\n2 13347     5.262200e+02 -5.949800e+02\n9 13347     3.547900e+02 -3.803300e+02\n2 13348     2.923800e+02 -5.968101e+02\n7 13348     -3.444000e+01 -4.111900e+02\n15 13348     -1.276001e+01 -5.622000e+02\n2 13349     3.432700e+02 -6.016400e+02\n9 13349     2.076000e+02 -3.955000e+02\n10 13349     -3.902002e+01 -4.734500e+02\n2 13350     3.382000e+02 -6.018600e+02\n7 13350     9.002686e-02 -4.234300e+02\n15 13350     3.001001e+01 -5.848500e+02\n2 13351     -1.634600e+02 6.097900e+02\n3 13351     -2.952500e+02 2.666500e+02\n13 13351     3.207600e+02 4.542700e+02\n14 13351     4.705699e+02 9.425000e+01\n2 13352     -1.732300e+02 5.946500e+02\n4 13352     1.913300e+02 -4.866500e+02\n5 13352     5.650300e+02 1.736400e+02\n13 13352     3.117000e+02 4.423000e+02\n14 13352     4.600800e+02 8.056000e+01\n2 13353     -2.180800e+02 5.898300e+02\n4 13353     1.874000e+02 -4.507900e+02\n11 13353     2.253101e+02 -6.789978e+00\n14 13353     4.113199e+02 7.016998e+01\n2 13354     -2.180800e+02 5.898300e+02\n11 13354     2.253101e+02 -6.789978e+00\n14 13354     4.113199e+02 7.016998e+01\n2 13355     -1.818800e+02 5.863200e+02\n4 13355     1.855300e+02 -4.785500e+02\n13 13355     3.032100e+02 4.338400e+02\n14 13355     4.502500e+02 7.172998e+01\n2 13356     -1.651800e+02 5.857700e+02\n3 13356     -2.975200e+02 2.444300e+02\n4 13356     1.861700e+02 -4.917500e+02\n11 13356     2.790400e+02 -3.349976e+00\n13 13356     3.186600e+02 4.358100e+02\n14 13356     4.681899e+02 7.321002e+01\n2 13357     -1.775100e+02 5.842400e+02\n4 13357     1.860100e+02 -4.821700e+02\n5 13357     5.597600e+02 1.635900e+02\n11 13357     2.662900e+02 -6.000000e+00\n13 13357     3.071899e+02 4.327000e+02\n14 13357     4.548900e+02 7.013000e+01\n2 13358     -9.202002e+01 5.799400e+02\n3 13358     -2.297400e+02 2.371000e+02\n5 13358     6.575400e+02 1.662400e+02\n11 13358     3.541500e+02 -7.000732e-02\n13 13358     3.864900e+02 4.398500e+02\n14 13358     5.488800e+02 7.583002e+01\n2 13359     -2.944000e+01 5.791600e+02\n5 13359     7.317600e+02 1.730800e+02\n2 13360     -1.642999e+01 5.789500e+02\n3 13360     -1.592000e+02 2.361400e+02\n5 13360     7.475400e+02 1.745600e+02\n13 13360     4.597400e+02 4.486600e+02\n14 13360     6.360000e+02 8.484000e+01\n2 13361     -8.750000e+01 5.781100e+02\n3 13361     -2.253800e+02 2.350800e+02\n4 13361     1.810601e+02 -5.537600e+02\n5 13361     6.625400e+02 1.656700e+02\n13 13361     3.909800e+02 4.379400e+02\n14 13361     5.542200e+02 7.389001e+01\n2 13362     -9.589001e+01 5.760800e+02\n3 13362     -2.330700e+02 2.337900e+02\n4 13362     1.805800e+02 -5.458900e+02\n5 13362     6.520300e+02 1.628500e+02\n11 13362     3.495800e+02 -3.580017e+00\n13 13362     3.825800e+02 4.361400e+02\n14 13362     5.442100e+02 7.179999e+01\n2 13363     -2.170001e+01 5.754700e+02\n11 13363     4.301500e+02 5.440002e+00\n13 13363     4.544900e+02 4.451400e+02\n14 13363     6.295699e+02 8.012000e+01\n2 13364     8.492999e+01 5.753800e+02\n11 13364     5.474700e+02 1.788000e+01\n14 13364     7.566899e+02 9.373001e+01\n2 13365     -1.914700e+02 5.735200e+02\n4 13365     1.794301e+02 -4.694200e+02\n11 13365     2.519800e+02 -1.542999e+01\n13 13365     2.936300e+02 4.228300e+02\n2 13366     3.192999e+01 5.735000e+02\n3 13366     -1.141500e+02 2.308800e+02\n5 13366     8.076899e+02 1.741700e+02\n11 13366     4.879700e+02 9.669983e+00\n13 13366     5.073300e+02 4.501000e+02\n14 13366     6.925900e+02 8.513000e+01\n2 13367     3.192999e+01 5.735000e+02\n11 13367     4.879700e+02 9.669983e+00\n14 13367     6.925900e+02 8.513000e+01\n2 13368     -1.947998e+01 5.712300e+02\n5 13368     7.431899e+02 1.661300e+02\n11 13368     4.321100e+02 1.880005e+00\n14 13368     6.323700e+02 7.709003e+01\n2 13369     -1.947998e+01 5.712300e+02\n11 13369     4.321100e+02 1.880005e+00\n14 13369     6.323700e+02 7.709003e+01\n2 13370     -1.846600e+02 5.700000e+02\n11 13370     2.584500e+02 -1.840997e+01\n2 13371     -1.811700e+02 5.663000e+02\n3 13371     -3.127800e+02 2.262100e+02\n4 13371     1.745100e+02 -4.765300e+02\n8 13371     -7.029999e+01 4.454300e+02\n11 13371     2.621899e+02 -2.042999e+01\n14 13371     4.494500e+02 5.326001e+01\n2 13372     -1.845500e+02 5.604000e+02\n4 13372     1.716700e+02 -4.734800e+02\n5 13372     5.494700e+02 1.392600e+02\n14 13372     4.456000e+02 4.713000e+01\n2 13373     -6.807001e+01 5.605900e+02\n3 13373     -2.075100e+02 2.172200e+02\n4 13373     1.720000e+02 -5.672700e+02\n5 13373     6.836500e+02 1.511000e+02\n8 13373     2.358002e+01 4.432500e+02\n11 13373     3.795300e+02 -1.244000e+01\n13 13373     4.078300e+02 4.269000e+02\n14 13373     5.744600e+02 6.087000e+01\n2 13374     -1.727500e+02 5.587700e+02\n13 13374     3.099100e+02 4.117200e+02\n14 13374     4.582300e+02 4.616998e+01\n2 13375     8.379999e+01 5.583000e+02\n8 13375     1.509700e+02 4.447100e+02\n11 13375     5.461700e+02 3.460022e+00\n13 13375     5.585300e+02 4.433700e+02\n14 13375     7.545800e+02 7.644000e+01\n2 13376     3.703003e+01 5.561100e+02\n8 13376     1.117300e+02 4.413800e+02\n11 13376     4.929800e+02 -4.000000e+00\n14 13376     6.977300e+02 6.806000e+01\n2 13377     2.582000e+02 5.550700e+02\n8 13377     2.817300e+02 4.329300e+02\n9 13377     6.764001e+01 5.663100e+02\n2 13378     2.800400e+02 5.547500e+02\n3 13378     1.349900e+02 2.130300e+02\n6 13378     1.904500e+02 8.575800e+02\n8 13378     2.990000e+02 4.327400e+02\n9 13378     8.831000e+01 5.657800e+02\n13 13378     6.811600e+02 3.549000e+02\n2 13379     5.197998e+01 5.530700e+02\n14 13379     7.156100e+02 6.775000e+01\n2 13380     3.205000e+02 5.518400e+02\n3 13380     1.732400e+02 2.108100e+02\n8 13380     3.319800e+02 4.299700e+02\n2 13381     -4.203000e+02 5.505400e+02\n8 13381     -2.681700e+02 4.265200e+02\n2 13382     -3.501001e+01 5.505200e+02\n5 13382     7.229900e+02 1.435400e+02\n8 13382     5.121997e+01 4.356900e+02\n11 13382     4.148900e+02 -1.712000e+01\n13 13382     4.397200e+02 4.222100e+02\n2 13383     2.982300e+02 5.489500e+02\n3 13383     1.531400e+02 2.076100e+02\n6 13383     2.125700e+02 8.466200e+02\n8 13383     3.147300e+02 4.276800e+02\n9 13383     1.049900e+02 5.610000e+02\n11 13383     6.216899e+02 -1.015300e+02\n2 13384     -1.274800e+02 5.484400e+02\n3 13384     -2.630800e+02 2.074100e+02\n5 13384     6.128900e+02 1.324600e+02\n8 13384     -2.569000e+01 4.316500e+02\n11 13384     3.167000e+02 -2.901001e+01\n13 13384     3.509301e+02 4.090600e+02\n2 13385     -3.097100e+02 5.481000e+02\n3 13385     -4.339000e+02 2.098400e+02\n4 13385     1.654100e+02 -3.813300e+02\n5 13385     4.118800e+02 1.167300e+02\n6 13385     -5.297500e+02 8.676200e+02\n8 13385     -1.766500e+02 4.270500e+02\n11 13385     1.356600e+02 -4.732001e+01\n13 13385     1.870000e+02 3.890000e+02\n2 13386     -2.257300e+02 5.460500e+02\n11 13386     2.168000e+02 -4.128003e+01\n13 13386     2.612400e+02 3.957400e+02\n14 13386     4.002600e+02 2.904999e+01\n2 13387     4.420000e+02 5.456000e+02\n8 13387     4.261700e+02 4.205000e+02\n2 13388     -3.229900e+02 5.452000e+02\n3 13388     -4.452300e+02 2.072700e+02\n11 13388     1.237700e+02 -5.021997e+01\n13 13388     1.756400e+02 3.854200e+02\n14 13388     2.988000e+02 1.973999e+01\n2 13389     -1.229900e+02 5.445600e+02\n3 13389     -2.584100e+02 2.037900e+02\n4 13389     1.618199e+02 -5.193000e+02\n5 13389     6.175100e+02 1.292300e+02\n8 13389     -2.116998e+01 4.283100e+02\n2 13390     2.616500e+02 5.431100e+02\n3 13390     1.174500e+02 2.022100e+02\n6 13390     1.694000e+02 8.466300e+02\n8 13390     2.841500e+02 4.234200e+02\n9 13390     7.234003e+01 5.551100e+02\n11 13390     5.938900e+02 -9.778003e+01\n13 13390     6.654301e+02 3.494600e+02\n2 13391     -2.405300e+02 5.416800e+02\n6 13391     -4.409800e+02 8.744900e+02\n8 13391     -1.193700e+02 4.237200e+02\n13 13391     2.478600e+02 3.908300e+02\n14 13391     3.845200e+02 2.387000e+01\n2 13392     -1.832200e+02 5.413400e+02\n11 13392     2.587000e+02 -4.007001e+01\n13 13392     2.992400e+02 3.971300e+02\n2 13393     -2.483200e+02 5.412300e+02\n3 13393     -3.757000e+02 2.022300e+02\n6 13393     -4.512100e+02 8.720600e+02\n2 13394     -1.055000e+02 5.412800e+02\n4 13394     1.604399e+02 -5.328600e+02\n5 13394     6.377600e+02 1.282200e+02\n8 13394     -7.409973e+00 4.269800e+02\n13 13394     3.715601e+02 4.065600e+02\n14 13394     5.317800e+02 3.829999e+01\n2 13395     -1.417000e+02 5.389900e+02\n3 13395     -2.762800e+02 1.988800e+02\n4 13395     1.588199e+02 -5.034100e+02\n5 13395     5.958700e+02 1.220200e+02\n8 13395     -3.700000e+01 4.233100e+02\n11 13395     3.023900e+02 -3.790002e+01\n13 13395     3.377300e+02 4.000300e+02\n14 13395     4.914800e+02 3.178003e+01\n2 13396     -4.541100e+02 5.375000e+02\n3 13396     -5.724000e+02 2.034800e+02\n4 13396     1.617800e+02 -2.880400e+02\n5 13396     2.622300e+02 9.770001e+01\n8 13396     -2.965900e+02 4.147400e+02\n2 13397     5.432100e+02 5.370500e+02\n8 13397     5.112600e+02 4.125500e+02\n2 13398     -7.672300e+02 5.349400e+02\n5 13398     -3.087000e+01 7.333002e+01\n8 13398     -5.517500e+02 4.042300e+02\n11 13398     -2.568000e+02 -9.153998e+01\n13 13398     -1.771600e+02 3.325200e+02\n14 13398     -1.185400e+02 -2.610999e+01\n2 13399     2.745001e+01 5.319600e+02\n5 13399     7.960000e+02 1.317100e+02\n8 13399     1.019300e+02 4.215800e+02\n11 13399     4.818600e+02 -2.537000e+01\n2 13400     -4.767800e+02 5.298700e+02\n4 13400     1.578800e+02 -2.738300e+02\n5 13400     2.391100e+02 8.865997e+01\n13 13400     4.628998e+01 3.582300e+02\n2 13401     -3.015400e+02 5.291200e+02\n4 13401     1.548300e+02 -3.846400e+02\n5 13401     4.187500e+02 9.975000e+01\n6 13401     -5.175200e+02 8.450100e+02\n13 13401     1.934200e+02 3.745400e+02\n14 13401     3.200900e+02 7.119995e+00\n2 13402     -3.015400e+02 5.291200e+02\n5 13402     4.187500e+02 9.975000e+01\n6 13402     -5.175200e+02 8.450100e+02\n13 13402     1.934200e+02 3.745400e+02\n14 13402     3.200900e+02 7.119995e+00\n2 13403     -4.909200e+02 5.281600e+02\n5 13403     2.245500e+02 8.682001e+01\n14 13403     1.308800e+02 -8.789978e+00\n2 13404     4.780100e+02 5.281000e+02\n3 13404     3.277500e+02 1.898300e+02\n2 13405     -2.588300e+02 5.260800e+02\n3 13405     -3.866200e+02 1.887300e+02\n6 13405     -4.624300e+02 8.516800e+02\n14 13405     3.640100e+02 8.219971e+00\n2 13406     5.086300e+02 5.257400e+02\n3 13406     3.565300e+02 1.882700e+02\n9 13406     2.879500e+02 5.454400e+02\n2 13407     -1.361800e+02 5.254300e+02\n3 13407     -2.713300e+02 1.856600e+02\n4 13407     1.514399e+02 -5.060000e+02\n5 13407     6.010300e+02 1.099100e+02\n8 13407     -3.278003e+01 4.129200e+02\n13 13407     3.419399e+02 3.895900e+02\n2 13408     4.824100e+02 5.250500e+02\n3 13408     3.316400e+02 1.870400e+02\n8 13408     4.598800e+02 4.032800e+02\n9 13408     2.654900e+02 5.438100e+02\n2 13409     4.104200e+02 5.228800e+02\n3 13409     2.596400e+02 1.845200e+02\n6 13409     3.436900e+02 7.997500e+02\n8 13409     4.051500e+02 4.052200e+02\n2 13410     -3.253000e+02 5.227900e+02\n4 13410     1.519900e+02 -3.678100e+02\n2 13411     -2.889600e+02 5.203000e+02\n8 13411     -1.594900e+02 4.054400e+02\n13 13411     2.040601e+02 3.692400e+02\n2 13412     5.034200e+02 5.205200e+02\n3 13412     3.519500e+02 1.834800e+02\n6 13412     4.390000e+02 7.432000e+02\n8 13412     4.778000e+02 3.986600e+02\n9 13412     2.841600e+02 5.404400e+02\n2 13413     -4.975700e+02 5.198900e+02\n5 13413     2.176899e+02 7.915997e+01\n8 13413     -3.317000e+02 3.999100e+02\n11 13413     -3.656000e+01 -8.231000e+01\n13 13413     2.904999e+01 3.492700e+02\n14 13413     1.247100e+02 -1.631000e+01\n2 13414     5.671400e+02 5.196000e+02\n3 13414     4.116000e+02 1.832700e+02\n6 13414     5.111000e+02 7.317700e+02\n8 13414     5.303800e+02 3.969000e+02\n9 13414     3.373600e+02 5.413700e+02\n2 13415     -2.617700e+02 5.182500e+02\n5 13415     4.602600e+02 9.285999e+01\n2 13416     -3.338900e+02 5.178400e+02\n8 13416     -1.971200e+02 4.023300e+02\n11 13416     1.121100e+02 -7.201001e+01\n2 13417     9.803998e+01 5.159400e+02\n3 13417     -5.315002e+01 1.765100e+02\n8 13417     1.630500e+02 4.100500e+02\n11 13417     5.619399e+02 -3.015002e+01\n14 13417     7.694600e+02 3.684998e+01\n2 13418     5.001500e+02 5.161900e+02\n3 13418     3.494600e+02 1.792700e+02\n6 13418     4.346000e+02 7.391700e+02\n8 13418     4.748700e+02 3.952700e+02\n9 13418     2.812700e+02 5.366700e+02\n2 13419     5.655000e+02 5.149200e+02\n3 13419     4.097300e+02 1.789500e+02\n6 13419     5.091000e+02 7.280500e+02\n8 13419     5.295300e+02 3.934000e+02\n9 13419     3.360200e+02 5.369000e+02\n2 13420     -2.157300e+02 5.143700e+02\n4 13420     1.457600e+02 -4.436300e+02\n14 13420     4.095601e+02 1.679993e+00\n2 13421     6.300000e+01 5.128500e+02\n3 13421     -8.547998e+01 1.727000e+02\n8 13421     1.337000e+02 4.065000e+02\n11 13421     5.222400e+02 -3.750000e+01\n2 13422     5.858800e+02 5.129600e+02\n8 13422     5.463700e+02 3.920200e+02\n9 13422     3.536000e+02 5.358100e+02\n2 13423     -6.994700e+02 5.116300e+02\n5 13423     2.754999e+01 6.071997e+01\n13 13423     -1.275300e+02 3.248100e+02\n14 13423     -6.070001e+01 -3.728003e+01\n2 13424     5.678199e+02 5.106500e+02\n3 13424     4.128000e+02 1.752800e+02\n6 13424     5.114100e+02 7.226200e+02\n8 13424     5.306200e+02 3.897900e+02\n9 13424     3.388800e+02 5.333900e+02\n2 13425     6.242300e+02 5.106800e+02\n3 13425     4.645699e+02 1.759300e+02\n2 13426     6.242300e+02 5.106800e+02\n3 13426     4.645699e+02 1.759300e+02\n2 13427     3.440002e+01 5.094100e+02\n3 13427     -1.122700e+02 1.695200e+02\n13 13427     5.037100e+02 3.949000e+02\n14 13427     6.911700e+02 2.189001e+01\n2 13428     -1.734700e+02 5.083100e+02\n6 13428     -3.525600e+02 8.483700e+02\n8 13428     -6.369000e+01 3.984200e+02\n11 13428     2.695100e+02 -6.467999e+01\n2 13429     2.705500e+02 5.084600e+02\n3 13429     1.265300e+02 1.694100e+02\n6 13429     1.794500e+02 8.024900e+02\n8 13429     2.911200e+02 3.951400e+02\n9 13429     8.113000e+01 5.251200e+02\n11 13429     6.017600e+02 -1.302000e+02\n13 13429     6.697100e+02 3.182400e+02\n2 13430     -2.449100e+02 5.074000e+02\n3 13430     -3.734300e+02 1.703800e+02\n4 13430     1.432100e+02 -4.217100e+02\n8 13430     -1.221500e+02 3.971500e+02\n11 13430     1.980700e+02 -7.210999e+01\n2 13431     5.686400e+02 5.061700e+02\n3 13431     4.136000e+02 1.711500e+02\n6 13431     5.129399e+02 7.176900e+02\n9 13431     3.388300e+02 5.290100e+02\n2 13432     6.344000e+02 5.059700e+02\n3 13432     4.739301e+02 1.720100e+02\n2 13433     -1.105000e+02 5.033600e+02\n5 13433     6.275200e+02 8.895001e+01\n8 13433     -1.151001e+01 3.960100e+02\n11 13433     3.322500e+02 -6.415997e+01\n2 13434     7.228900e+02 5.024100e+02\n3 13434     5.543600e+02 1.695300e+02\n2 13435     2.804999e+01 5.013500e+02\n3 13435     -1.184000e+02 1.608500e+02\n11 13435     4.823500e+02 -5.103998e+01\n13 13435     4.972000e+02 3.876800e+02\n2 13436     6.699399e+02 4.973100e+02\n3 13436     5.070900e+02 1.643900e+02\n2 13437     -3.142100e+02 4.945100e+02\n3 13437     -4.390800e+02 1.586800e+02\n5 13437     4.022000e+02 6.701001e+01\n11 13437     1.305200e+02 -8.766998e+01\n13 13437     1.810500e+02 3.464200e+02\n2 13438     -7.440900e+02 4.928000e+02\n5 13438     -1.351001e+01 4.212000e+01\n13 13438     -1.606700e+02 3.076700e+02\n14 13438     -1.009300e+02 -5.553998e+01\n2 13439     -7.440900e+02 4.928000e+02\n13 13439     -1.606700e+02 3.076700e+02\n14 13439     -1.009300e+02 -5.553998e+01\n2 13440     -3.297200e+02 4.926300e+02\n3 13440     -4.546400e+02 1.582300e+02\n11 13440     1.158000e+02 -9.040002e+01\n13 13440     1.674301e+02 3.441000e+02\n14 13440     2.887600e+02 -2.812000e+01\n2 13441     -3.297200e+02 4.926300e+02\n8 13441     -1.929400e+02 3.815100e+02\n11 13441     1.158000e+02 -9.040002e+01\n14 13441     2.887600e+02 -2.812000e+01\n2 13442     9.165002e+01 4.920900e+02\n3 13442     -5.876001e+01 1.519200e+02\n8 13442     1.576200e+02 3.902300e+02\n2 13443     7.902002e+01 4.900200e+02\n11 13443     5.397500e+02 -5.565997e+01\n13 13443     5.472600e+02 3.828900e+02\n14 13443     7.443199e+02 6.859985e+00\n2 13444     -3.025300e+02 4.879400e+02\n5 13444     4.141200e+02 6.084998e+01\n14 13444     3.165000e+02 -3.041998e+01\n2 13445     9.563000e+01 4.869700e+02\n11 13445     5.590300e+02 -5.515997e+01\n13 13445     5.640000e+02 3.834300e+02\n2 13446     2.012900e+02 4.849300e+02\n3 13446     4.304999e+01 1.465900e+02\n8 13446     2.497500e+02 3.878500e+02\n2 13447     1.353998e+01 4.824800e+02\n5 13447     7.742500e+02 7.853003e+01\n6 13447     -1.130200e+02 8.584800e+02\n8 13447     9.217999e+01 3.811300e+02\n11 13447     4.665100e+02 -6.823999e+01\n2 13448     -8.159973e+00 4.812800e+02\n3 13448     -1.521300e+02 1.411400e+02\n5 13448     7.468700e+02 7.458002e+01\n6 13448     -1.409400e+02 8.506900e+02\n8 13448     7.382001e+01 3.792700e+02\n11 13448     4.422000e+02 -7.209003e+01\n13 13448     4.601000e+02 3.660900e+02\n14 13448     6.391300e+02 -1.104999e+01\n2 13449     4.574900e+02 4.813800e+02\n3 13449     3.085800e+02 1.443400e+02\n6 13449     3.819000e+02 7.024200e+02\n8 13449     4.376500e+02 3.654600e+02\n9 13449     2.442200e+02 5.039700e+02\n11 13449     7.090000e+02 -2.295200e+02\n2 13450     3.732000e+02 4.793700e+02\n3 13450     2.257800e+02 1.436900e+02\n6 13450     2.985300e+02 7.510100e+02\n8 13450     3.744500e+02 3.692700e+02\n9 13450     1.701600e+02 5.021000e+02\n13 13450     7.555500e+02 2.760100e+02\n2 13451     5.823199e+02 4.785300e+02\n6 13451     5.267600e+02 6.832900e+02\n2 13452     5.823199e+02 4.785300e+02\n6 13452     5.267600e+02 6.832900e+02\n2 13453     -6.976000e+02 4.751100e+02\n5 13453     2.609003e+01 2.956000e+01\n13 13453     -1.269900e+02 2.989800e+02\n14 13453     -6.182001e+01 -6.731000e+01\n2 13454     -3.099976e-01 4.742900e+02\n13 13454     4.677000e+02 3.608400e+02\n2 13455     -3.798999e+01 4.721600e+02\n6 13455     -1.784800e+02 8.335900e+02\n8 13455     4.971002e+01 3.720000e+02\n2 13456     -1.538500e+02 4.674700e+02\n3 13456     -2.887100e+02 1.302100e+02\n4 13456     1.174900e+02 -4.830300e+02\n6 13456     -3.250100e+02 8.001800e+02\n8 13456     -4.722998e+01 3.657700e+02\n11 13456     2.886100e+02 -9.540002e+01\n2 13457     5.160999e+01 4.655000e+02\n5 13457     8.200601e+02 6.566998e+01\n6 13457     -6.363000e+01 8.472500e+02\n8 13457     1.236000e+02 3.689600e+02\n2 13458     -1.033002e+01 4.600000e+02\n5 13458     7.426400e+02 5.428003e+01\n6 13458     -1.428000e+02 8.239500e+02\n8 13458     7.214001e+01 3.625500e+02\n11 13458     4.404000e+02 -8.850000e+01\n13 13458     4.567300e+02 3.492700e+02\n14 13458     6.358700e+02 -3.041998e+01\n2 13459     -4.706100e+02 4.588600e+02\n3 13459     -5.900700e+02 1.285800e+02\n5 13459     2.392300e+02 2.584003e+01\n11 13459     -1.371002e+01 -1.242800e+02\n14 13459     1.470000e+02 -6.731000e+01\n2 13460     -1.049600e+02 4.590800e+02\n5 13460     6.305699e+02 4.704999e+01\n6 13460     -2.629100e+02 8.016100e+02\n8 13460     -6.549988e+00 3.604300e+02\n13 13460     3.672200e+02 3.390500e+02\n14 13460     5.280900e+02 -3.996997e+01\n2 13461     -3.950100e+02 4.533200e+02\n4 13461     1.175500e+02 -3.154100e+02\n5 13461     3.148101e+02 2.428003e+01\n8 13461     -2.468200e+02 3.490400e+02\n2 13462     -2.569700e+02 4.503900e+02\n4 13462     1.118000e+02 -4.057600e+02\n5 13462     4.595500e+02 2.877002e+01\n6 13462     -4.531600e+02 7.560800e+02\n13 13462     2.292800e+02 3.173400e+02\n14 13462     3.619399e+02 -6.102002e+01\n2 13463     -1.052400e+02 4.497500e+02\n4 13463     1.074700e+02 -5.192400e+02\n5 13463     6.289500e+02 3.871997e+01\n8 13463     -7.049988e+00 3.539800e+02\n13 13463     3.658101e+02 3.314500e+02\n14 13463     5.265601e+02 -4.792999e+01\n2 13464     4.971997e+01 4.488500e+02\n3 13464     -9.762000e+01 1.116200e+02\n5 13464     8.161500e+02 4.759998e+01\n6 13464     -6.628003e+01 8.241400e+02\n13 13464     5.148900e+02 3.459600e+02\n14 13464     7.064100e+02 -3.590002e+01\n2 13465     4.971997e+01 4.488500e+02\n3 13465     -9.762000e+01 1.116200e+02\n13 13465     5.148900e+02 3.459600e+02\n2 13466     6.034998e+01 4.477900e+02\n13 13466     5.238700e+02 3.465200e+02\n2 13467     9.640997e+01 4.480100e+02\n6 13467     -6.640015e+00 8.357400e+02\n8 13467     1.607400e+02 3.564200e+02\n2 13468     -6.895000e+02 4.439000e+02\n5 13468     3.065002e+01 4.070007e+00\n11 13468     -1.974400e+02 -1.455500e+02\n13 13468     -1.214700e+02 2.776800e+02\n14 13468     -5.665002e+01 -9.246002e+01\n2 13469     -4.998999e+01 4.382800e+02\n4 13469     9.804999e+01 -5.630200e+02\n5 13469     6.928400e+02 2.997998e+01\n8 13469     3.938000e+01 3.444600e+02\n2 13470     -4.998999e+01 4.382800e+02\n5 13470     6.928400e+02 2.997998e+01\n2 13471     -1.782200e+02 4.375900e+02\n4 13471     1.020100e+02 -4.608300e+02\n5 13471     5.447400e+02 2.148999e+01\n6 13471     -3.536300e+02 7.581800e+02\n8 13471     -6.726001e+01 3.413700e+02\n11 13471     2.632300e+02 -1.208900e+02\n14 13471     4.446500e+02 -6.675000e+01\n2 13472     -1.782200e+02 4.375900e+02\n3 13472     -3.120600e+02 1.019400e+02\n4 13472     1.020100e+02 -4.608300e+02\n5 13472     5.447400e+02 2.148999e+01\n6 13472     -3.536300e+02 7.581800e+02\n9 13472     -3.105300e+02 4.507000e+02\n11 13472     2.632300e+02 -1.208900e+02\n14 13472     4.446500e+02 -6.675000e+01\n2 13473     -5.171200e+02 4.365900e+02\n13 13473     1.121002e+01 2.854200e+02\n14 13473     1.009400e+02 -8.963000e+01\n2 13474     -4.539001e+01 4.367100e+02\n4 13474     9.698999e+01 -5.664000e+02\n8 13474     4.337000e+01 3.440400e+02\n2 13475     1.680100e+02 4.365100e+02\n8 13475     2.211800e+02 3.460900e+02\n9 13475     -1.578998e+01 4.577400e+02\n2 13476     4.569700e+02 4.349200e+02\n6 13476     3.806900e+02 6.503400e+02\n9 13476     2.455699e+02 4.659100e+02\n11 13476     7.103800e+02 -2.709700e+02\n2 13477     -5.283002e+01 4.343000e+02\n5 13477     6.888600e+02 2.614001e+01\n6 13477     -1.955400e+02 7.825200e+02\n8 13477     3.683002e+01 3.412500e+02\n2 13478     4.132400e+02 4.346500e+02\n3 13478     2.650200e+02 1.026500e+02\n6 13478     3.428100e+02 6.925800e+02\n8 13478     4.066200e+02 3.335700e+02\n9 13478     2.057000e+02 4.658300e+02\n2 13479     -1.536100e+02 4.342500e+02\n6 13479     -3.227600e+02 7.600800e+02\n8 13479     -4.707001e+01 3.400200e+02\n2 13480     2.842500e+02 4.335600e+02\n6 13480     1.940700e+02 7.075700e+02\n9 13480     9.464001e+01 4.597800e+02\n13 13480     6.733300e+02 2.524900e+02\n2 13481     -2.672500e+02 4.321600e+02\n3 13481     -3.960000e+02 9.696997e+01\n4 13481     1.030800e+02 -3.966700e+02\n5 13481     4.469800e+02 1.223999e+01\n6 13481     -4.644200e+02 7.314400e+02\n14 13481     3.498800e+02 -7.697998e+01\n2 13482     -7.174800e+02 4.278600e+02\n5 13482     3.690002e+00 -1.062000e+01\n2 13483     -5.988500e+02 4.270700e+02\n13 13483     -5.342999e+01 2.723300e+02\n14 13483     2.352002e+01 -1.023600e+02\n2 13484     -5.239700e+02 4.261200e+02\n11 13484     -6.214001e+01 -1.508000e+02\n2 13485     -6.549988e+00 4.257700e+02\n5 13485     7.436400e+02 2.075000e+01\n6 13485     -1.372300e+02 7.827000e+02\n9 13485     -1.634500e+02 4.434900e+02\n14 13485     6.375400e+02 -6.537000e+01\n2 13486     -4.569000e+01 4.256200e+02\n4 13486     9.032001e+01 -5.643600e+02\n5 13486     6.963600e+02 1.769000e+01\n6 13486     -1.862900e+02 7.737800e+02\n13 13486     4.202700e+02 3.170000e+02\n14 13486     5.928800e+02 -6.721997e+01\n2 13487     -6.914000e+02 4.251000e+02\n5 13487     2.696002e+01 -1.191998e+01\n2 13488     -5.307000e+02 4.245400e+02\n11 13488     -6.756000e+01 -1.522200e+02\n2 13489     3.859985e+00 4.239000e+02\n5 13489     7.561400e+02 1.867999e+01\n6 13489     -1.235600e+02 7.824300e+02\n8 13489     8.414001e+01 3.340400e+02\n9 13489     -1.542100e+02 4.432900e+02\n11 13489     4.552700e+02 -1.172900e+02\n2 13490     -1.051900e+02 4.233500e+02\n3 13490     -2.432600e+02 8.626001e+01\n4 13490     9.113000e+01 -5.153400e+02\n5 13490     6.264900e+02 1.141998e+01\n6 13490     -2.610700e+02 7.567200e+02\n8 13490     -6.789978e+00 3.314500e+02\n13 13490     3.643700e+02 3.093800e+02\n14 13490     5.252600e+02 -7.485999e+01\n2 13491     -7.303003e+01 4.227800e+02\n11 13491     3.724700e+02 -1.249500e+02\n13 13491     3.941200e+02 3.126900e+02\n14 13491     5.611899e+02 -7.165997e+01\n2 13492     -3.641300e+02 4.214400e+02\n3 13492     -4.887100e+02 8.909998e+01\n4 13492     1.002100e+02 -3.315400e+02\n5 13492     3.439399e+02 -3.590027e+00\n6 13492     -5.837400e+02 6.966400e+02\n11 13492     8.226001e+01 -1.472900e+02\n14 13492     2.497600e+02 -9.428998e+01\n2 13493     3.236600e+02 4.198900e+02\n6 13493     2.386200e+02 6.858700e+02\n8 13493     3.333900e+02 3.216200e+02\n9 13493     1.282900e+02 4.490200e+02\n2 13494     5.483002e+01 4.186800e+02\n6 13494     -5.926001e+01 7.869600e+02\n8 13494     1.258700e+02 3.307100e+02\n9 13494     -1.105200e+02 4.403400e+02\n2 13495     2.001400e+02 4.187100e+02\n3 13495     4.250000e+01 8.294000e+01\n8 13495     2.480000e+02 3.336800e+02\n9 13495     1.207001e+01 4.444100e+02\n2 13496     -5.796500e+02 4.142600e+02\n3 13496     -6.997600e+02 8.585999e+01\n11 13496     -1.096800e+02 -1.618700e+02\n14 13496     3.966998e+01 -1.117900e+02\n2 13497     2.912300e+02 4.134700e+02\n8 13497     3.072100e+02 3.179400e+02\n9 13497     1.007000e+02 4.426800e+02\n2 13498     3.506400e+02 4.124800e+02\n3 13498     2.052600e+02 8.014001e+01\n8 13498     3.553600e+02 3.153900e+02\n2 13499     -6.623999e+01 4.114000e+02\n3 13499     -2.067200e+02 7.529999e+01\n4 13499     8.392999e+01 -5.457700e+02\n5 13499     6.709000e+02 3.950012e+00\n6 13499     -2.113400e+02 7.525900e+02\n8 13499     2.565997e+01 3.230300e+02\n9 13499     -2.133800e+02 4.307000e+02\n11 13499     3.796899e+02 -1.312100e+02\n13 13499     3.998700e+02 3.042400e+02\n14 13499     5.683600e+02 -8.178003e+01\n2 13500     -8.563000e+01 4.107600e+02\n4 13500     8.353003e+01 -5.296100e+02\n5 13500     6.481500e+02 1.140015e+00\n8 13500     9.830017e+00 3.225100e+02\n2 13501     4.487000e+01 4.111100e+02\n5 13501     8.060200e+02 1.031000e+01\n6 13501     -7.096002e+01 7.790700e+02\n8 13501     1.184700e+02 3.260900e+02\n2 13502     3.999100e+02 4.104900e+02\n3 13502     2.527500e+02 7.881000e+01\n6 13502     3.263400e+02 6.645800e+02\n8 13502     3.954600e+02 3.131500e+02\n9 13502     1.947900e+02 4.429500e+02\n13 13502     7.703199e+02 2.115600e+02\n2 13503     1.025900e+02 4.102400e+02\n13 13503     5.642800e+02 3.182200e+02\n2 13504     -5.641100e+02 4.084800e+02\n5 13504     1.434500e+02 -2.182001e+01\n8 13504     -3.852000e+02 3.098400e+02\n2 13505     1.472998e+01 4.081300e+02\n3 13505     -1.305500e+02 7.235999e+01\n9 13505     -1.444200e+02 4.295200e+02\n13 13505     4.768800e+02 3.083800e+02\n2 13506     -5.819800e+02 4.040600e+02\n3 13506     -7.026600e+02 7.659998e+01\n5 13506     1.260800e+02 -2.664001e+01\n8 13506     -3.994600e+02 3.059600e+02\n12 13506     -6.580200e+02 6.173500e+02\n13 13506     -4.120001e+01 2.570700e+02\n14 13506     3.714001e+01 -1.207900e+02\n2 13507     -5.819800e+02 4.040600e+02\n8 13507     -3.994600e+02 3.059600e+02\n2 13508     -2.755100e+02 4.022300e+02\n4 13508     8.731000e+01 -3.870800e+02\n5 13508     4.350500e+02 -1.665997e+01\n6 13508     -4.717700e+02 6.934500e+02\n8 13508     -1.478900e+02 3.119900e+02\n2 13509     -3.334600e+02 3.981000e+02\n3 13509     -4.601000e+02 6.439001e+01\n11 13509     1.096600e+02 -1.612400e+02\n2 13510     -7.025400e+02 3.974200e+02\n5 13510     1.423999e+01 -3.596997e+01\n11 13510     -2.099300e+02 -1.778700e+02\n13 13510     -1.326400e+02 2.439000e+02\n14 13510     -7.231000e+01 -1.317000e+02\n2 13511     -5.472200e+02 3.976000e+02\n5 13511     1.588400e+02 -3.104999e+01\n11 13511     -8.247998e+01 -1.716500e+02\n12 13511     -6.161100e+02 6.159700e+02\n14 13511     6.929999e+01 -1.248000e+02\n2 13512     -5.472200e+02 3.976000e+02\n11 13512     -8.247998e+01 -1.716500e+02\n12 13512     -6.161100e+02 6.159700e+02\n2 13513     1.184300e+02 3.975200e+02\n9 13513     -5.642999e+01 4.232500e+02\n13 13513     5.792700e+02 3.094000e+02\n14 13513     7.873199e+02 -8.078003e+01\n2 13514     5.500000e+01 3.966200e+02\n6 13514     -5.802002e+01 7.605300e+02\n8 13514     1.267200e+02 3.130200e+02\n9 13514     -1.099700e+02 4.203200e+02\n11 13514     5.112200e+02 -1.357000e+02\n13 13514     5.153000e+02 3.021300e+02\n14 13514     7.094200e+02 -8.758002e+01\n2 13515     -1.493200e+02 3.957900e+02\n5 13515     5.731300e+02 -1.809998e+01\n6 13515     -3.140900e+02 7.124900e+02\n9 13515     -2.839000e+02 4.144900e+02\n13 13515     3.217300e+02 2.839200e+02\n14 13515     4.740699e+02 -1.036000e+02\n2 13516     -4.732700e+02 3.953000e+02\n4 13516     9.225000e+01 -2.625700e+02\n11 13516     -1.759998e+01 -1.703000e+02\n2 13517     -1.277300e+02 3.943800e+02\n4 13517     7.588000e+01 -4.934200e+02\n5 13517     5.976801e+02 -1.790002e+01\n6 13517     -2.874500e+02 7.162600e+02\n8 13517     -2.535999e+01 3.078200e+02\n9 13517     -2.654000e+02 4.137200e+02\n11 13517     3.143000e+02 -1.512600e+02\n13 13517     3.417400e+02 2.847200e+02\n14 13517     4.979500e+02 -1.031400e+02\n2 13518     -7.636100e+02 3.927700e+02\n4 13518     1.025200e+02 -1.102200e+02\n5 13518     -4.037000e+01 -4.146002e+01\n2 13519     -1.416800e+02 3.933300e+02\n4 13519     7.540997e+01 -4.822600e+02\n6 13519     -3.050400e+02 7.108600e+02\n9 13519     -2.772000e+02 4.123900e+02\n11 13519     2.996100e+02 -1.536500e+02\n13 13519     3.288101e+02 2.824900e+02\n14 13519     4.824100e+02 -1.056700e+02\n2 13520     -4.224900e+02 3.921700e+02\n5 13520     2.814200e+02 -3.245001e+01\n11 13520     2.776001e+01 -1.705400e+02\n2 13521     7.000000e+00 3.911400e+02\n3 13521     -1.383000e+02 5.526001e+01\n13 13521     4.677400e+02 2.934600e+02\n2 13522     7.000000e+00 3.911400e+02\n13 13522     4.677400e+02 2.934600e+02\n2 13523     -5.940100e+02 3.882900e+02\n12 13523     -6.696600e+02 5.992200e+02\n14 13523     2.500000e+01 -1.342200e+02\n2 13524     6.045001e+01 3.875400e+02\n6 13524     -5.123999e+01 7.501900e+02\n9 13524     -1.048500e+02 4.129300e+02\n2 13525     -7.484400e+02 3.846400e+02\n8 13525     -5.351000e+02 2.870600e+02\n2 13526     6.299399e+02 3.845300e+02\n3 13526     4.760000e+02 6.046002e+01\n8 13526     5.816400e+02 2.840800e+02\n9 13526     3.933600e+02 4.273600e+02\n12 13526     6.536700e+02 5.809600e+02\n2 13527     4.623999e+01 3.830600e+02\n6 13527     -6.896997e+01 7.434100e+02\n8 13527     1.195600e+02 3.026500e+02\n9 13527     -1.169900e+02 4.090000e+02\n2 13528     4.623999e+01 3.830600e+02\n5 13528     8.041899e+02 -1.882001e+01\n6 13528     -6.896997e+01 7.434100e+02\n8 13528     1.195600e+02 3.026500e+02\n9 13528     -1.169900e+02 4.090000e+02\n11 13528     5.009500e+02 -1.474200e+02\n13 13528     5.055400e+02 2.906900e+02\n14 13528     6.978500e+02 -1.009800e+02\n2 13529     5.649200e+02 3.810000e+02\n3 13529     4.147100e+02 5.584003e+01\n6 13529     4.998000e+02 5.719300e+02\n7 13529     5.158900e+02 5.498700e+02\n8 13529     5.268700e+02 2.822700e+02\n9 13529     3.380800e+02 4.224000e+02\n12 13529     5.801700e+02 5.820200e+02\n2 13530     -3.870300e+02 3.787900e+02\n8 13530     -2.394900e+02 2.903400e+02\n11 13530     5.873999e+01 -1.796700e+02\n12 13530     -4.265600e+02 6.191000e+02\n2 13531     1.416100e+02 3.787500e+02\n6 13531     5.204999e+01 7.581900e+02\n13 13531     6.010800e+02 2.953700e+02\n2 13532     4.805000e+02 3.775800e+02\n6 13532     4.043200e+02 5.806100e+02\n12 13532     4.882000e+02 5.874600e+02\n2 13533     -3.811700e+02 3.757900e+02\n5 13533     3.221600e+02 -4.604999e+01\n8 13533     -2.344600e+02 2.880300e+02\n11 13533     6.471997e+01 -1.811300e+02\n12 13533     -4.196300e+02 6.171900e+02\n13 13533     1.191900e+02 2.499400e+02\n14 13533     2.290900e+02 -1.363500e+02\n2 13534     -5.921600e+02 3.750600e+02\n8 13534     -4.076000e+02 2.833500e+02\n11 13534     -1.211600e+02 -1.893200e+02\n12 13534     -6.656600e+02 5.854500e+02\n2 13535     1.201900e+02 3.744200e+02\n6 13535     2.647998e+01 7.477900e+02\n8 13535     1.815600e+02 2.968700e+02\n9 13535     -5.354999e+01 4.032800e+02\n13 13535     5.792500e+02 2.898700e+02\n14 13535     7.889800e+02 -1.040400e+02\n2 13536     -2.941300e+02 3.731900e+02\n4 13536     7.290002e+01 -3.714300e+02\n5 13536     4.127500e+02 -4.563000e+01\n11 13536     1.472500e+02 -1.782400e+02\n14 13536     3.180601e+02 -1.339000e+02\n2 13537     -2.941300e+02 3.731900e+02\n5 13537     4.127500e+02 -4.563000e+01\n6 13537     -4.923300e+02 6.544300e+02\n13 13537     1.929500e+02 2.550100e+02\n14 13537     3.180601e+02 -1.339000e+02\n2 13538     3.888700e+02 3.728400e+02\n3 13538     2.431899e+02 4.354999e+01\n6 13538     3.119400e+02 6.210000e+02\n8 13538     3.858500e+02 2.818200e+02\n9 13538     1.856700e+02 4.095600e+02\n13 13538     7.561899e+02 1.814500e+02\n2 13539     -5.704400e+02 3.725300e+02\n5 13539     1.344000e+02 -5.377002e+01\n8 13539     -3.898000e+02 2.816900e+02\n13 13539     -3.298999e+01 2.350700e+02\n14 13539     4.591998e+01 -1.472400e+02\n2 13540     -5.704400e+02 3.725300e+02\n8 13540     -3.898000e+02 2.816900e+02\n13 13540     -3.298999e+01 2.350700e+02\n14 13540     4.591998e+01 -1.472400e+02\n2 13541     4.332600e+02 3.721500e+02\n3 13541     2.899100e+02 4.479999e+01\n6 13541     3.506000e+02 5.813200e+02\n8 13541     4.178600e+02 2.777400e+02\n9 13541     2.262700e+02 4.120000e+02\n12 13541     4.367900e+02 5.860600e+02\n2 13542     4.332600e+02 3.721500e+02\n3 13542     2.899100e+02 4.479999e+01\n6 13542     3.506000e+02 5.813200e+02\n8 13542     4.178600e+02 2.777400e+02\n9 13542     2.262700e+02 4.120000e+02\n12 13542     4.367900e+02 5.860600e+02\n2 13543     -8.919000e+01 3.714100e+02\n3 13543     -2.279900e+02 3.685999e+01\n8 13543     6.450012e+00 2.908200e+02\n2 13544     -2.123600e+02 3.708100e+02\n4 13544     6.709003e+01 -4.270900e+02\n5 13544     5.008600e+02 -4.415002e+01\n8 13544     -9.531000e+01 2.871300e+02\n9 13544     -3.363000e+02 3.903700e+02\n2 13545     -2.189300e+02 3.695500e+02\n4 13545     6.696997e+01 -4.222800e+02\n8 13545     -1.009400e+02 2.866500e+02\n9 13545     -3.422200e+02 3.887900e+02\n11 13545     2.210800e+02 -1.769800e+02\n13 13545     2.582400e+02 2.577500e+02\n2 13546     -2.315700e+02 3.673900e+02\n3 13546     -3.630900e+02 3.363000e+01\n5 13546     4.790500e+02 -4.792999e+01\n6 13546     -4.147100e+02 6.610500e+02\n8 13546     -1.111000e+02 2.840900e+02\n9 13546     -3.530400e+02 3.868300e+02\n13 13546     2.470100e+02 2.552500e+02\n14 13546     3.833900e+02 -1.350900e+02\n2 13547     -6.561700e+02 3.671500e+02\n5 13547     5.345001e+01 -6.057001e+01\n8 13547     -4.594600e+02 2.750100e+02\n11 13547     -1.735300e+02 -1.971300e+02\n14 13547     -3.354999e+01 -1.553200e+02\n2 13548     -2.378700e+02 3.663500e+02\n4 13548     6.622998e+01 -4.085200e+02\n5 13548     4.721000e+02 -4.952002e+01\n6 13548     -4.223100e+02 6.577900e+02\n8 13548     -1.164600e+02 2.835300e+02\n13 13548     2.414600e+02 2.538500e+02\n14 13548     3.766100e+02 -1.365200e+02\n2 13549     -2.378700e+02 3.663500e+02\n5 13549     4.721000e+02 -4.952002e+01\n8 13549     -1.164600e+02 2.835300e+02\n9 13549     -3.583100e+02 3.857300e+02\n13 13549     2.414600e+02 2.538500e+02\n2 13550     -2.454800e+02 3.655400e+02\n3 13550     -3.764200e+02 3.209003e+01\n4 13550     6.619000e+01 -4.032600e+02\n5 13550     4.641801e+02 -5.039001e+01\n6 13550     -4.317000e+02 6.552100e+02\n8 13550     -1.229200e+02 2.824500e+02\n11 13550     1.944500e+02 -1.816000e+02\n13 13550     2.348300e+02 2.526300e+02\n14 13550     3.686899e+02 -1.378200e+02\n2 13551     -2.454800e+02 3.655400e+02\n4 13551     6.619000e+01 -4.032600e+02\n5 13551     4.641801e+02 -5.039001e+01\n6 13551     -4.317000e+02 6.552100e+02\n8 13551     -1.229200e+02 2.824500e+02\n11 13551     1.944500e+02 -1.816000e+02\n13 13551     2.348300e+02 2.526300e+02\n14 13551     3.686899e+02 -1.378200e+02\n2 13552     -5.105900e+02 3.636100e+02\n3 13552     -6.320700e+02 3.423999e+01\n8 13552     -3.408800e+02 2.773900e+02\n11 13552     -5.416998e+01 -1.951300e+02\n12 13552     -5.706400e+02 5.874900e+02\n14 13552     1.010700e+02 -1.534900e+02\n2 13553     -7.337200e+02 3.624400e+02\n5 13553     -1.681000e+01 -6.582001e+01\n8 13553     -5.226300e+02 2.699100e+02\n11 13553     -2.355300e+02 -2.019800e+02\n14 13553     -1.023500e+02 -1.613300e+02\n2 13554     -2.354900e+02 3.588700e+02\n4 13554     6.185999e+01 -4.097300e+02\n5 13554     4.746899e+02 -5.681000e+01\n6 13554     -4.179800e+02 6.486600e+02\n8 13554     -1.139300e+02 2.770900e+02\n9 13554     -3.554800e+02 3.787300e+02\n12 13554     -2.451800e+02 6.204800e+02\n2 13555     4.012000e+01 3.584500e+02\n3 13555     -1.068000e+02 2.346002e+01\n5 13555     7.934200e+02 -4.542999e+01\n6 13555     -7.640002e+01 7.097400e+02\n8 13555     1.141900e+02 2.823900e+02\n9 13555     -1.212500e+02 3.867200e+02\n11 13555     4.940300e+02 -1.685300e+02\n13 13555     4.972800e+02 2.693800e+02\n14 13555     6.886600e+02 -1.263800e+02\n2 13556     2.897998e+01 3.568600e+02\n5 13556     7.785900e+02 -4.834998e+01\n6 13556     -9.150000e+01 7.043600e+02\n9 13556     -1.314500e+02 3.843000e+02\n11 13556     4.801700e+02 -1.716900e+02\n2 13557     -5.323999e+01 3.482000e+02\n13 13557     4.077700e+02 2.535600e+02\n2 13558     -5.323999e+01 3.482000e+02\n11 13558     3.917500e+02 -1.834500e+02\n13 13558     4.077700e+02 2.535600e+02\n2 13559     7.981000e+01 3.473700e+02\n6 13559     -2.410999e+01 7.053600e+02\n8 13559     1.477300e+02 2.741100e+02\n9 13559     -8.653003e+01 3.782900e+02\n11 13559     5.403800e+02 -1.749200e+02\n13 13559     5.368199e+02 2.633900e+02\n14 13559     7.380200e+02 -1.346000e+02\n2 13560     1.173500e+02 3.446700e+02\n3 13560     -3.437000e+01 1.007001e+01\n6 13560     2.158002e+01 7.115100e+02\n8 13560     1.784800e+02 2.730500e+02\n9 13560     -5.534003e+01 3.774300e+02\n13 13560     5.729200e+02 2.645400e+02\n14 13560     7.823800e+02 -1.342000e+02\n2 13561     1.173500e+02 3.446700e+02\n3 13561     -3.437000e+01 1.007001e+01\n6 13561     2.158002e+01 7.115100e+02\n8 13561     1.784800e+02 2.730500e+02\n9 13561     -5.534003e+01 3.774300e+02\n13 13561     5.729200e+02 2.645400e+02\n14 13561     7.823800e+02 -1.342000e+02\n2 13562     1.217500e+02 3.431300e+02\n6 13562     2.753003e+01 7.104000e+02\n8 13562     1.820700e+02 2.717600e+02\n9 13562     -5.135999e+01 3.761400e+02\n13 13562     5.769700e+02 2.632800e+02\n14 13562     7.877400e+02 -1.356200e+02\n2 13563     -7.446997e+01 3.414200e+02\n3 13563     -2.149400e+02 7.460022e+00\n4 13563     4.390997e+01 -5.275400e+02\n6 13563     -2.191200e+02 6.649400e+02\n9 13563     -2.182800e+02 3.691000e+02\n13 13563     3.876400e+02 2.470200e+02\n14 13563     5.545300e+02 -1.497400e+02\n2 13564     1.136200e+02 3.411300e+02\n6 13564     1.684998e+01 7.062200e+02\n8 13564     1.759200e+02 2.700100e+02\n9 13564     -5.885999e+01 3.740200e+02\n2 13565     -4.369800e+02 3.381300e+02\n11 13565     1.263000e+01 -2.108000e+02\n2 13566     -7.082900e+02 3.355000e+02\n13 13566     -1.379200e+02 2.006400e+02\n2 13567     5.774600e+02 3.350900e+02\n3 13567     4.287000e+02 1.313000e+01\n7 13567     5.221801e+02 5.010300e+02\n10 13567     7.175900e+02 5.866200e+02\n2 13568     4.875500e+02 3.285200e+02\n3 13568     3.437900e+02 5.320007e+00\n8 13568     4.623700e+02 2.408300e+02\n10 13568     6.191600e+02 6.112900e+02\n12 13568     4.939100e+02 5.307300e+02\n13 13568     8.158900e+02 1.006600e+02\n2 13569     8.600000e+01 3.273300e+02\n6 13569     -1.771997e+01 6.825300e+02\n8 13569     1.524600e+02 2.583600e+02\n9 13569     -8.134003e+01 3.609500e+02\n11 13569     5.452300e+02 -1.911200e+02\n13 13569     5.398000e+02 2.477100e+02\n14 13569     7.425400e+02 -1.534900e+02\n2 13570     6.638000e+01 3.218400e+02\n5 13570     8.227500e+02 -8.009003e+01\n6 13570     -4.253998e+01 6.722200e+02\n8 13570     1.361800e+02 2.535700e+02\n2 13571     5.076001e+01 3.185900e+02\n8 13571     1.228700e+02 2.513500e+02\n13 13571     5.046500e+02 2.375500e+02\n14 13571     6.992300e+02 -1.647400e+02\n2 13572     3.504999e+01 3.154400e+02\n5 13572     7.831200e+02 -8.877002e+01\n9 13572     -1.237800e+02 3.491100e+02\n2 13573     3.951000e+02 3.116200e+02\n3 13573     2.504900e+02 -1.392999e+01\n6 13573     3.167400e+02 5.496200e+02\n8 13573     3.903600e+02 2.322100e+02\n9 13573     1.928101e+02 3.582900e+02\n13 13573     7.545300e+02 1.287700e+02\n2 13574     6.313101e+02 3.032600e+02\n3 13574     4.813400e+02 -1.300000e+01\n7 13574     5.661801e+02 4.580100e+02\n2 13575     -1.362700e+02 3.024800e+02\n11 13575     3.024200e+02 -2.244700e+02\n14 13575     4.812500e+02 -1.908800e+02\n2 13576     1.140900e+02 3.009200e+02\n6 13576     1.698999e+01 6.571500e+02\n8 13576     1.757500e+02 2.378500e+02\n9 13576     -5.804999e+01 3.389300e+02\n12 13576     1.767100e+02 6.083600e+02\n13 13576     5.657800e+02 2.281700e+02\n14 13576     7.756899e+02 -1.780600e+02\n2 13577     5.646500e+02 3.009500e+02\n7 13577     5.060900e+02 4.703100e+02\n9 13577     3.396200e+02 3.549700e+02\n10 13577     6.948199e+02 5.497800e+02\n2 13578     3.092500e+02 2.929100e+02\n8 13578     3.209200e+02 2.192200e+02\n9 13578     1.192500e+02 3.392400e+02\n12 13578     3.253400e+02 5.306700e+02\n2 13579     -3.919500e+02 2.914700e+02\n3 13579     -5.187700e+02 -3.922998e+01\n5 13579     3.033900e+02 -1.220400e+02\n11 13579     5.312000e+01 -2.431600e+02\n2 13580     3.548800e+02 2.870500e+02\n3 13580     2.120200e+02 -3.889001e+01\n6 13580     2.700900e+02 5.268400e+02\n8 13580     3.573500e+02 2.133900e+02\n9 13580     1.584500e+02 3.360800e+02\n12 13580     3.728800e+02 5.199700e+02\n2 13581     4.247100e+02 2.836200e+02\n6 13581     3.375200e+02 4.815800e+02\n7 13581     3.803400e+02 4.838000e+02\n9 13581     2.208600e+02 3.355600e+02\n13 13581     7.562800e+02 7.601001e+01\n2 13582     3.451500e+02 2.824200e+02\n8 13582     3.497300e+02 2.096300e+02\n9 13582     1.505000e+02 3.313700e+02\n2 13583     -2.427500e+02 2.818400e+02\n3 13583     -3.749200e+02 -5.163000e+01\n6 13583     -4.209100e+02 5.559900e+02\n8 13583     -1.197100e+02 2.159700e+02\n9 13583     -3.580100e+02 3.105700e+02\n11 13583     1.941600e+02 -2.461500e+02\n12 13583     -2.495000e+02 5.383000e+02\n13 13583     2.328199e+02 1.885000e+02\n14 13583     3.659800e+02 -2.150700e+02\n2 13584     -2.711500e+02 2.729500e+02\n3 13584     -4.021100e+02 -5.917999e+01\n5 13584     4.271200e+02 -1.362000e+02\n8 13584     -1.435400e+02 2.100700e+02\n13 13584     2.077800e+02 1.814100e+02\n14 13584     3.347800e+02 -2.222300e+02\n2 13585     -1.516100e+02 2.729700e+02\n3 13585     -2.864300e+02 -5.944000e+01\n8 13585     -4.638000e+01 2.100600e+02\n9 13585     -2.792700e+02 3.064800e+02\n2 13586     -5.867500e+02 2.721900e+02\n7 13586     -5.322300e+02 5.465900e+02\n2 13587     -2.537000e+02 2.709600e+02\n6 13587     -4.342100e+02 5.415000e+02\n2 13588     3.650400e+02 2.704000e+02\n3 13588     2.226200e+02 -5.479999e+01\n6 13588     2.810400e+02 5.066800e+02\n7 13588     3.573600e+02 5.091100e+02\n9 13588     1.681700e+02 3.217700e+02\n12 13588     3.835800e+02 5.003300e+02\n13 13588     7.242500e+02 1.004700e+02\n2 13589     -1.448400e+02 2.640600e+02\n8 13589     -4.085999e+01 2.031300e+02\n9 13589     -2.721600e+02 2.992200e+02\n2 13590     -2.387300e+02 2.636900e+02\n13 13590     2.356400e+02 1.759200e+02\n14 13590     3.691700e+02 -2.304200e+02\n2 13591     -1.581700e+02 2.605500e+02\n3 13591     -2.930500e+02 -7.227002e+01\n8 13591     -5.165997e+01 2.008500e+02\n9 13591     -2.845800e+02 2.956400e+02\n2 13592     3.584301e+02 2.525300e+02\n7 13592     3.499200e+02 4.933100e+02\n9 13592     1.625100e+02 3.063200e+02\n2 13593     6.152200e+02 2.522200e+02\n3 13593     4.684800e+02 -6.277002e+01\n6 13593     5.491300e+02 4.202400e+02\n8 13593     5.670100e+02 1.752800e+02\n9 13593     3.835100e+02 3.148000e+02\n2 13594     4.504301e+02 2.499000e+02\n6 13594     3.642900e+02 4.412300e+02\n7 13594     4.002500e+02 4.454400e+02\n8 13594     4.315601e+02 1.777500e+02\n9 13594     2.433600e+02 3.079600e+02\n10 13594     5.643600e+02 5.319200e+02\n2 13595     4.491100e+02 2.457600e+02\n6 13595     3.620900e+02 4.365200e+02\n2 13596     -3.739700e+02 2.396300e+02\n12 13596     -3.988100e+02 4.755800e+02\n2 13597     2.948700e+02 2.339300e+02\n9 13597     1.088000e+02 2.877800e+02\n12 13597     3.100699e+02 4.677800e+02\n13 13597     6.612800e+02 8.444000e+01\n2 13598     5.636000e+02 2.329900e+02\n6 13598     4.903101e+02 4.065100e+02\n9 13598     3.405601e+02 2.973200e+02\n2 13599     5.636000e+02 2.329900e+02\n6 13599     4.903101e+02 4.065100e+02\n8 13599     5.236899e+02 1.608600e+02\n12 13599     5.716700e+02 4.162400e+02\n2 13600     5.767700e+02 2.302500e+02\n7 13600     5.084500e+02 3.998700e+02\n9 13600     3.508800e+02 2.948200e+02\n10 13600     6.899399e+02 4.617300e+02\n2 13601     -4.492500e+02 2.276400e+02\n11 13601     -1.500000e+00 -2.909600e+02\n2 13602     -6.855800e+02 2.263900e+02\n5 13602     1.377002e+01 -1.788700e+02\n8 13602     -4.828200e+02 1.639200e+02\n11 13602     -2.029100e+02 -2.930100e+02\n12 13602     -7.519000e+02 4.180700e+02\n14 13602     -7.003998e+01 -2.718600e+02\n2 13603     4.377002e+01 2.241500e+02\n14 13603     6.844600e+02 -2.574400e+02\n2 13604     4.398800e+02 2.242200e+02\n3 13604     3.010900e+02 -9.576001e+01\n6 13604     3.524400e+02 4.141600e+02\n7 13604     3.882200e+02 4.251500e+02\n9 13604     2.354301e+02 2.859500e+02\n10 13604     5.499000e+02 5.060500e+02\n13 13604     7.624100e+02 2.459998e+01\n15 13604     7.377200e+02 5.778600e+02\n2 13605     -1.598500e+02 2.232100e+02\n3 13605     -2.963800e+02 -1.108700e+02\n5 13605     5.431600e+02 -1.840100e+02\n6 13605     -3.171500e+02 5.057000e+02\n8 13605     -5.173999e+01 1.709600e+02\n13 13605     3.021300e+02 1.490500e+02\n14 13605     4.510100e+02 -2.658700e+02\n2 13606     6.363101e+02 2.173600e+02\n3 13606     4.904000e+02 -9.508002e+01\n6 13606     5.707200e+02 3.793100e+02\n9 13606     4.019900e+02 2.863100e+02\n2 13607     7.279800e+02 2.152100e+02\n7 13607     6.425601e+02 3.496700e+02\n9 13607     4.782900e+02 2.871900e+02\n2 13608     -5.931100e+02 2.118200e+02\n5 13608     9.835999e+01 -1.925300e+02\n8 13608     -4.070800e+02 1.541300e+02\n2 13609     6.373900e+02 2.073100e+02\n3 13609     4.921100e+02 -1.049000e+02\n6 13609     5.707700e+02 3.659800e+02\n8 13609     5.852200e+02 1.375500e+02\n2 13610     -1.902300e+02 2.050500e+02\n4 13610     -2.142999e+01 -4.214600e+02\n5 13610     5.080400e+02 -1.997200e+02\n6 13610     -3.530600e+02 4.800100e+02\n7 13610     -1.185500e+02 5.289400e+02\n8 13610     -7.637000e+01 1.563300e+02\n12 13610     -1.830700e+02 4.662000e+02\n13 13610     2.735200e+02 1.340500e+02\n14 13610     4.164100e+02 -2.829800e+02\n2 13611     6.234000e+02 2.029900e+02\n3 13611     4.783900e+02 -1.097500e+02\n8 13611     5.729000e+02 1.344500e+02\n9 13611     3.912400e+02 2.737000e+02\n12 13611     6.348400e+02 3.753700e+02\n2 13612     6.540500e+02 2.006900e+02\n3 13612     5.081801e+02 -1.108200e+02\n8 13612     5.990699e+02 1.316100e+02\n9 13612     4.172000e+02 2.728500e+02\n2 13613     -7.096100e+02 1.991600e+02\n11 13613     -2.225500e+02 -3.110400e+02\n2 13614     3.266000e+02 1.969500e+02\n7 13614     3.187900e+02 4.475600e+02\n13 13614     6.840200e+02 4.817999e+01\n2 13615     -5.216100e+02 1.965200e+02\n12 13615     -5.629200e+02 4.118400e+02\n2 13616     -5.216100e+02 1.965200e+02\n8 13616     -3.478000e+02 1.439500e+02\n11 13616     -6.595001e+01 -3.110900e+02\n12 13616     -5.629200e+02 4.118400e+02\n2 13617     6.217400e+02 1.953900e+02\n8 13617     5.718500e+02 1.277700e+02\n9 13617     3.902500e+02 2.669600e+02\n10 13617     7.289301e+02 4.057900e+02\n12 13617     6.324301e+02 3.672900e+02\n2 13618     4.216300e+02 1.876000e+02\n3 13618     2.857700e+02 -1.326000e+02\n8 13618     4.080100e+02 1.263900e+02\n9 13618     2.218400e+02 2.526600e+02\n12 13618     4.214700e+02 3.823400e+02\n2 13619     -6.125700e+02 1.855400e+02\n14 13619     -7.580017e+00 -3.060600e+02\n2 13620     -9.950000e+01 1.857700e+02\n7 13620     -2.215997e+01 5.199000e+02\n8 13620     -1.729980e+00 1.425900e+02\n11 13620     3.374900e+02 -3.159000e+02\n2 13621     6.787000e+02 1.822500e+02\n10 13621     7.867400e+02 3.685200e+02\n2 13622     -3.075300e+02 1.767000e+02\n7 13622     -2.394700e+02 4.911300e+02\n2 13623     8.189900e+02 1.748000e+02\n3 13623     6.655000e+02 -1.294400e+02\n7 13623     7.195900e+02 2.894400e+02\n9 13623     5.539900e+02 2.558700e+02\n2 13624     6.970300e+02 1.725300e+02\n3 13624     5.507200e+02 -1.358500e+02\n9 13624     4.536100e+02 2.505000e+02\n2 13625     6.297700e+02 1.696000e+02\n3 13625     4.865000e+02 -1.412500e+02\n6 13625     5.605601e+02 3.276700e+02\n8 13625     5.781100e+02 1.063800e+02\n9 13625     3.972800e+02 2.457600e+02\n12 13625     6.400000e+02 3.379000e+02\n2 13626     1.844100e+02 1.619400e+02\n3 13626     8.031000e+01 -1.568700e+02\n2 13627     5.037300e+02 1.608900e+02\n6 13627     4.210800e+02 3.341800e+02\n9 13627     2.910400e+02 2.341100e+02\n12 13627     5.056700e+02 3.432500e+02\n2 13628     -3.201400e+02 1.588900e+02\n5 13628     3.645500e+02 -2.422200e+02\n6 13628     -5.051100e+02 4.002300e+02\n7 13628     -2.512900e+02 4.761900e+02\n8 13628     -1.833400e+02 1.177800e+02\n2 13629     7.180400e+02 1.590700e+02\n7 13629     6.258300e+02 3.001100e+02\n2 13630     -6.611700e+02 1.576400e+02\n5 13630     2.915002e+01 -2.377500e+02\n7 13630     -5.935100e+02 4.398900e+02\n10 13630     -5.904900e+02 6.040400e+02\n2 13631     5.225100e+02 1.573300e+02\n3 13631     3.836000e+02 -1.562700e+02\n9 13631     3.067800e+02 2.310200e+02\n12 13631     5.237100e+02 3.376000e+02\n2 13632     -2.698300e+02 1.551700e+02\n5 13632     4.156500e+02 -2.458700e+02\n6 13632     -4.450600e+02 4.070500e+02\n8 13632     -1.429100e+02 1.150100e+02\n9 13632     -3.760300e+02 1.991800e+02\n2 13633     -5.893300e+02 1.472000e+02\n8 13633     -4.029700e+02 1.035500e+02\n12 13633     -6.336200e+02 3.514600e+02\n2 13634     -3.744600e+02 1.446800e+02\n7 13634     -3.079900e+02 4.577500e+02\n2 13635     3.239700e+02 1.433300e+02\n6 13635     1.663800e+02 1.819700e+02\n8 13635     3.037300e+02 7.354999e+01\n12 13635     2.018400e+02 2.276300e+02\n13 13635     5.516801e+02 -1.288600e+02\n2 13636     -6.567500e+02 1.424000e+02\n10 13636     -5.845700e+02 5.889700e+02\n11 13636     -1.826600e+02 -3.497900e+02\n2 13637     -6.273000e+02 1.424900e+02\n7 13637     -5.596200e+02 4.306900e+02\n10 13637     -5.507800e+02 5.908100e+02\n2 13638     -6.273000e+02 1.424900e+02\n10 13638     -5.507800e+02 5.908100e+02\n2 13639     5.507600e+02 1.426400e+02\n8 13639     5.121801e+02 8.770999e+01\n12 13639     5.539000e+02 3.197800e+02\n2 13640     5.507600e+02 1.426400e+02\n6 13640     4.716100e+02 3.100700e+02\n12 13640     5.539000e+02 3.197800e+02\n2 13641     3.302500e+02 1.402900e+02\n3 13641     2.214100e+02 -1.729400e+02\n8 13641     3.088900e+02 7.101001e+01\n2 13642     -3.012900e+02 1.396700e+02\n5 13642     3.800200e+02 -2.638600e+02\n6 13642     -4.802900e+02 3.781400e+02\n9 13642     -4.003900e+02 1.851000e+02\n2 13643     6.428101e+02 1.391600e+02\n3 13643     5.059399e+02 -1.712800e+02\n8 13643     5.924600e+02 7.964999e+01\n9 13643     4.092200e+02 2.202700e+02\n10 13643     7.375500e+02 3.344200e+02\n12 13643     6.575699e+02 3.007500e+02\n2 13644     -7.256200e+02 1.387700e+02\n10 13644     -6.615100e+02 5.804100e+02\n11 13644     -2.372500e+02 -3.522500e+02\n12 13644     -7.840600e+02 3.254600e+02\n2 13645     7.711899e+02 1.347300e+02\n7 13645     6.693800e+02 2.640200e+02\n9 13645     5.157000e+02 2.214500e+02\n2 13646     3.189100e+02 1.327300e+02\n8 13646     2.974300e+02 6.300000e+01\n2 13647     -5.625500e+02 1.280400e+02\n8 13647     -3.815900e+02 8.831000e+01\n2 13648     -1.938200e+02 1.272600e+02\n13 13648     2.662600e+02 7.578998e+01\n14 13648     4.069301e+02 -3.556800e+02\n2 13649     3.745001e+01 1.268900e+02\n3 13649     -5.687000e+01 -1.922600e+02\n8 13649     6.903003e+01 6.344000e+01\n2 13650     -6.383200e+02 1.231000e+02\n7 13650     -5.683000e+02 4.129200e+02\n10 13650     -5.614400e+02 5.717000e+02\n11 13650     -1.683700e+02 -3.639500e+02\n2 13651     5.915100e+02 1.220700e+02\n9 13651     3.659000e+02 2.043900e+02\n10 13651     6.806400e+02 3.360900e+02\n2 13652     -2.599800e+02 1.191500e+02\n11 13652     1.728900e+02 -3.692400e+02\n2 13653     1.921500e+02 1.177800e+02\n3 13653     9.596997e+01 -1.959800e+02\n8 13653     1.909700e+02 5.123999e+01\n9 13653     4.653998e+01 1.911200e+02\n2 13654     -7.143200e+02 1.168400e+02\n4 13654     -1.728998e+01 -1.071700e+02\n7 13654     -6.405800e+02 4.000400e+02\n10 13654     -6.545400e+02 5.612900e+02\n2 13655     2.085999e+01 1.159300e+02\n8 13655     5.581000e+01 5.491000e+01\n2 13656     -2.780600e+02 1.149000e+02\n9 13656     -3.812100e+02 1.640900e+02\n11 13656     1.552600e+02 -3.724200e+02\n2 13657     -7.633002e+01 1.093400e+02\n6 13657     -2.173700e+02 3.675900e+02\n9 13657     -2.074800e+02 1.671700e+02\n10 13657     8.734003e+01 5.677400e+02\n12 13657     -6.440997e+01 3.641500e+02\n13 13657     3.529800e+02 4.903003e+01\n14 13657     5.159900e+02 -3.931400e+02\n2 13658     -6.252800e+02 1.088500e+02\n5 13658     5.650000e+01 -2.777200e+02\n7 13658     -5.552300e+02 4.041400e+02\n11 13658     -1.584200e+02 -3.735800e+02\n2 13659     5.384500e+02 1.051400e+02\n3 13659     4.013000e+02 -2.064500e+02\n6 13659     4.568199e+02 2.710100e+02\n8 13659     5.012000e+02 5.703000e+01\n9 13659     3.219600e+02 1.886400e+02\n10 13659     6.239399e+02 3.387600e+02\n13 13659     8.343800e+02 -9.488000e+01\n2 13660     2.496600e+02 1.047100e+02\n3 13660     1.504700e+02 -2.079400e+02\n4 13660     -2.512900e+02 -5.048300e+02\n8 13660     2.369300e+02 3.884000e+01\n9 13660     9.448999e+01 1.810900e+02\n13 13660     4.686400e+02 -1.679300e+02\n2 13661     4.301300e+02 1.037700e+02\n7 13661     3.694200e+02 3.165500e+02\n10 13661     5.189399e+02 3.782900e+02\n13 13661     7.409600e+02 -6.970001e+01\n15 13661     7.037400e+02 4.251800e+02\n2 13662     5.748101e+02 1.032800e+02\n8 13662     5.310800e+02 5.414999e+01\n2 13663     8.257001e+01 1.025000e+02\n3 13663     -9.000000e+00 -2.142900e+02\n6 13663     -9.664001e+01 1.208000e+02\n8 13663     1.023900e+02 4.045999e+01\n12 13663     -7.121002e+01 1.753500e+02\n13 13663     3.461300e+02 -1.402800e+02\n2 13664     7.027600e+02 1.010800e+02\n7 13664     6.038300e+02 2.499200e+02\n10 13664     7.914500e+02 2.687800e+02\n2 13665     3.595500e+02 9.857001e+01\n13 13665     5.689500e+02 -1.765700e+02\n2 13666     1.523100e+02 9.558002e+01\n5 13666     6.685100e+02 -5.913600e+02\n12 13666     -6.489990e+00 1.590200e+02\n2 13667     -2.996400e+02 9.384003e+01\n5 13667     3.778000e+02 -3.014600e+02\n7 13667     -2.299400e+02 4.213300e+02\n8 13667     -1.666400e+02 6.598999e+01\n10 13667     -1.566900e+02 5.663200e+02\n2 13668     7.827002e+01 9.032001e+01\n7 13668     -1.202500e+02 1.953300e+02\n8 13668     9.828003e+01 3.051999e+01\n2 13669     1.064900e+02 8.745001e+01\n3 13669     1.596997e+01 -2.281600e+02\n4 13669     -2.222800e+02 -4.117400e+02\n7 13669     -1.001800e+02 1.862900e+02\n8 13669     1.205100e+02 2.676999e+01\n9 13669     -2.345001e+01 1.610100e+02\n10 13669     -1.000200e+02 2.281800e+02\n12 13669     -5.169000e+01 1.535000e+02\n13 13669     3.590400e+02 -1.591200e+02\n2 13670     -1.364400e+02 8.521002e+01\n4 13670     -9.777002e+01 -4.263800e+02\n5 13670     5.362000e+02 -3.368600e+02\n11 13670     2.597200e+02 -4.182800e+02\n12 13670     -1.338800e+02 3.312800e+02\n13 13670     2.989500e+02 2.773999e+01\n14 13670     4.485000e+02 -4.179200e+02\n2 13671     -2.745100e+02 8.244000e+01\n13 13671     1.934800e+02 3.850000e+01\n14 13671     3.161300e+02 -3.988500e+02\n2 13672     6.315699e+02 8.101001e+01\n9 13672     4.009000e+02 1.709400e+02\n12 13672     6.369700e+02 2.410900e+02\n2 13673     6.315699e+02 8.101001e+01\n9 13673     4.009000e+02 1.709400e+02\n12 13673     6.369700e+02 2.410900e+02\n2 13674     3.007300e+02 7.806000e+01\n13 13674     5.060601e+02 -1.967100e+02\n2 13675     -3.125200e+02 7.615997e+01\n5 13675     3.614700e+02 -3.173500e+02\n6 13675     -4.907700e+02 3.099500e+02\n8 13675     -1.779200e+02 5.239001e+01\n2 13676     -5.870300e+02 7.073999e+01\n8 13676     -4.009400e+02 4.420999e+01\n2 13677     4.114301e+02 7.053998e+01\n3 13677     2.997800e+02 -2.369000e+02\n8 13677     3.755100e+02 1.310001e+01\n2 13678     5.650024e+00 6.558002e+01\n5 13678     5.317100e+02 -5.688800e+02\n6 13678     -1.753700e+02 9.026001e+01\n8 13678     4.084998e+01 1.264999e+01\n9 13678     -1.093100e+02 1.389300e+02\n2 13679     -6.270600e+02 6.437000e+01\n7 13679     -5.523100e+02 3.651800e+02\n8 13679     -4.346700e+02 3.810001e+01\n10 13679     -5.433200e+02 5.152200e+02\n11 13679     -1.629100e+02 -4.054300e+02\n14 13679     -3.177002e+01 -4.093600e+02\n2 13680     -5.784200e+02 6.215002e+01\n13 13680     -4.881000e+01 1.829999e+01\n2 13681     -5.784200e+02 6.215002e+01\n13 13681     -4.881000e+01 1.829999e+01\n2 13682     -5.563900e+02 5.769000e+01\n7 13682     -4.830300e+02 3.669300e+02\n8 13682     -3.762200e+02 3.500000e+01\n11 13682     -1.032300e+02 -4.137600e+02\n13 13682     -3.250000e+01 1.550000e+01\n14 13682     3.471997e+01 -4.152900e+02\n15 13682     -4.496100e+02 5.656400e+02\n2 13683     -3.589300e+02 5.804999e+01\n10 13683     -2.283200e+02 5.281000e+02\n2 13684     -6.028200e+02 5.742999e+01\n11 13684     -1.417800e+02 -4.104700e+02\n15 13684     -5.092200e+02 5.556900e+02\n2 13685     -3.646200e+02 5.631000e+01\n6 13685     -5.509200e+02 2.784000e+02\n7 13685     -2.947500e+02 3.837600e+02\n11 13685     6.929999e+01 -4.160600e+02\n2 13686     -1.551400e+02 5.652002e+01\n4 13686     -1.132900e+02 -4.023700e+02\n9 13686     -2.696800e+02 1.193700e+02\n2 13687     3.786000e+02 5.501001e+01\n3 13687     2.727900e+02 -2.523400e+02\n2 13688     2.365000e+02 5.376001e+01\n15 13688     7.467999e+01 1.546000e+02\n2 13689     6.465699e+02 5.433002e+01\n3 13689     5.080900e+02 -2.511700e+02\n6 13689     5.721600e+02 2.024000e+02\n8 13689     5.896899e+02 1.119000e+01\n9 13689     4.134900e+02 1.494000e+02\n12 13689     6.511700e+02 2.120200e+02\n2 13690     7.351200e+02 4.596997e+01\n9 13690     4.878800e+02 1.459100e+02\n10 13690     8.111200e+02 1.962400e+02\n12 13690     7.456600e+02 1.911100e+02\n2 13691     -1.412200e+02 4.458002e+01\n8 13691     -4.370001e+01 2.426001e+01\n9 13691     -2.574400e+02 1.093600e+02\n2 13692     6.762300e+02 4.441998e+01\n3 13692     5.387100e+02 -2.592100e+02\n7 13692     5.739800e+02 2.051600e+02\n9 13692     4.393700e+02 1.415800e+02\n10 13692     7.510400e+02 2.184900e+02\n12 13692     6.827700e+02 1.967500e+02\n2 13693     1.574200e+02 4.329999e+01\n8 13693     1.593800e+02 -1.170001e+01\n12 13693     -7.750000e+00 9.619000e+01\n2 13694     2.906600e+02 4.192999e+01\n7 13694     4.569000e+01 1.166000e+02\n2 13695     6.431300e+02 4.184003e+01\n3 13695     5.067100e+02 -2.637200e+02\n6 13695     5.686300e+02 1.899900e+02\n7 13695     5.444000e+02 2.118400e+02\n8 13695     5.872000e+02 1.459991e+00\n12 13695     6.476000e+02 1.994800e+02\n2 13696     -3.951400e+02 4.021997e+01\n13 13696     9.221997e+01 7.250000e+00\n14 13696     1.888900e+02 -4.333700e+02\n2 13697     7.395400e+02 3.670001e+01\n3 13697     5.990601e+02 -2.636700e+02\n9 13697     4.905699e+02 1.387700e+02\n2 13698     1.324900e+02 3.241998e+01\n6 13698     -4.891998e+01 3.109998e+01\n2 13699     -1.242999e+01 2.659003e+01\n8 13699     2.669000e+01 -1.916000e+01\n2 13700     6.698400e+02 2.598999e+01\n10 13700     7.395900e+02 2.035400e+02\n2 13701     1.726600e+02 2.228998e+01\n9 13701     3.552002e+01 1.104700e+02\n10 13701     -6.766998e+01 1.351100e+02\n15 13701     -4.950012e+00 1.309000e+02\n2 13702     4.172800e+02 2.151001e+01\n8 13702     3.784400e+02 -2.831000e+01\n2 13703     6.711899e+02 1.803998e+01\n3 13703     5.358700e+02 -2.847700e+02\n7 13703     5.663400e+02 1.844400e+02\n9 13703     4.358500e+02 1.207100e+02\n2 13704     7.193300e+02 1.814001e+01\n3 13704     5.817500e+02 -2.834300e+02\n10 13704     7.884399e+02 1.742900e+02\n2 13705     7.193300e+02 1.814001e+01\n3 13705     5.817500e+02 -2.834300e+02\n10 13705     7.884399e+02 1.742900e+02\n12 13705     7.277000e+02 1.639000e+02\n2 13706     -4.479000e+02 1.571997e+01\n13 13706     4.926001e+01 -1.265002e+01\n15 13706     -3.017300e+02 5.221500e+02\n2 13707     7.374700e+02 6.200012e+00\n9 13707     4.909500e+02 1.132700e+02\n10 13707     8.047900e+02 1.547200e+02\n2 13708     8.404999e+01 2.940002e+00\n8 13708     9.983002e+01 -4.260999e+01\n2 13709     5.998400e+02 -7.899780e-01\n8 13709     5.508000e+02 -3.173001e+01\n10 13709     6.638400e+02 2.057100e+02\n2 13710     4.421002e+01 -1.539978e+00\n3 13710     -4.147998e+01 -3.141800e+02\n9 13710     -7.226001e+01 8.541000e+01\n2 13711     3.288700e+02 -1.400024e+00\n6 13711     1.564900e+02 -2.770020e+00\n8 13711     2.995100e+02 -4.970999e+01\n13 13711     5.146801e+02 -2.640800e+02\n2 13712     -5.617999e+01 -3.270020e+00\n3 13712     -1.452900e+02 -3.198900e+02\n8 13712     -7.859985e+00 -3.994000e+01\n9 13712     -1.599100e+02 7.825000e+01\n2 13713     2.142300e+02 -8.030029e+00\n10 13713     -3.764001e+01 9.335999e+01\n2 13714     -1.630100e+02 -1.345001e+01\n8 13714     -8.895001e+01 -4.357999e+01\n2 13715     7.239100e+02 -1.415997e+01\n7 13715     6.070300e+02 1.434300e+02\n10 13715     7.866200e+02 1.392800e+02\n2 13716     -6.640997e+01 -1.550000e+01\n3 13716     -1.542700e+02 -3.325900e+02\n4 13716     -2.277600e+02 -3.106300e+02\n8 13716     -1.740002e+01 -5.104999e+01\n2 13717     -6.378003e+01 -1.857001e+01\n3 13717     -1.505200e+02 -3.346900e+02\n2 13718     3.689800e+02 -1.900000e+01\n7 13718     1.175500e+02 6.058002e+01\n2 13719     7.276400e+02 -2.090002e+01\n9 13719     4.833700e+02 8.989999e+01\n12 13719     7.336000e+02 1.221200e+02\n2 13720     1.175800e+02 -2.153998e+01\n6 13720     -6.444000e+01 -2.633002e+01\n2 13721     -5.338000e+01 -2.514001e+01\n8 13721     -7.940002e+00 -5.964001e+01\n2 13722     1.315600e+02 -2.513000e+01\n12 13722     -3.865002e+01 2.346997e+01\n13 13722     3.563800e+02 -2.545900e+02\n15 13722     -5.619000e+01 8.675000e+01\n2 13723     3.552800e+02 -2.577002e+01\n3 13723     2.573700e+02 -3.293200e+02\n2 13724     3.939500e+02 -3.506000e+01\n3 13724     2.927100e+02 -3.369000e+02\n7 13724     1.442300e+02 4.745001e+01\n8 13724     3.544500e+02 -7.796002e+01\n13 13724     5.715800e+02 -2.936600e+02\n15 13724     2.713600e+02 2.726001e+01\n2 13725     -2.003998e+01 -3.590002e+01\n6 13725     -2.033400e+02 -2.103003e+01\n2 13726     7.334700e+02 -3.663000e+01\n9 13726     4.892400e+02 7.715997e+01\n2 13727     7.103500e+02 -4.046002e+01\n10 13727     7.659800e+02 1.190100e+02\n2 13728     7.103500e+02 -4.046002e+01\n9 13728     4.693199e+02 7.325000e+01\n10 13728     7.659800e+02 1.190100e+02\n2 13729     3.773900e+02 -4.294000e+01\n3 13729     2.767400e+02 -3.401400e+02\n6 13729     2.092100e+02 -3.888000e+01\n8 13729     3.399300e+02 -8.391998e+01\n12 13729     2.313300e+02 3.599976e+00\n15 13729     2.405000e+02 1.975000e+01\n2 13730     4.331000e+02 -4.659003e+01\n3 13730     3.298900e+02 -3.476300e+02\n2 13731     7.758500e+02 -5.050000e+01\n9 13731     5.241400e+02 6.715997e+01\n2 13732     -1.534700e+02 -6.123999e+01\n3 13732     -2.386200e+02 -3.791000e+02\n6 13732     -3.380700e+02 -3.462000e+01\n8 13732     -8.701001e+01 -8.644000e+01\n2 13733     -4.459003e+01 -6.192999e+01\n8 13733     -3.369995e+00 -9.148999e+01\n2 13734     7.751801e+02 -6.264001e+01\n3 13734     6.423500e+02 -3.594400e+02\n7 13734     6.450000e+02 8.831000e+01\n9 13734     5.237900e+02 5.700000e+01\n2 13735     -2.707600e+02 -7.272998e+01\n8 13735     -1.566500e+02 -7.437000e+01\n2 13736     5.673999e+01 -7.276001e+01\n6 13736     -1.282500e+02 -7.907001e+01\n12 13736     -1.159900e+02 -2.240997e+01\n2 13737     5.746100e+02 -7.312000e+01\n7 13737     4.744900e+02 1.306600e+02\n8 13737     5.290100e+02 -8.923999e+01\n2 13738     2.866300e+02 -7.445001e+01\n12 13738     1.215400e+02 -3.528003e+01\n2 13739     7.630800e+02 -7.946002e+01\n9 13739     5.141000e+02 4.304999e+01\n2 13740     1.156800e+02 -8.591998e+01\n8 13740     1.209300e+02 -1.173200e+02\n2 13741     7.010010e+00 -9.126001e+01\n3 13741     -7.371997e+01 -4.027200e+02\n2 13742     7.697900e+02 -9.140997e+01\n7 13742     6.363600e+02 6.521997e+01\n10 13742     8.150601e+02 4.247998e+01\n2 13743     7.698800e+02 -9.653003e+01\n9 13743     5.198300e+02 2.878998e+01\n2 13744     -9.221002e+01 -1.032100e+02\n3 13744     -1.717100e+02 -4.166100e+02\n2 13745     -4.749400e+02 -1.051800e+02\n7 13745     -4.416700e+02 1.990800e+02\n8 13745     -3.187800e+02 -9.946002e+01\n2 13746     6.386200e+02 -1.070200e+02\n9 13746     4.119700e+02 1.484003e+01\n12 13746     6.354600e+02 4.682001e+01\n2 13747     4.934200e+02 -1.091500e+02\n6 13747     3.312300e+02 -1.051200e+02\n12 13747     3.564600e+02 -7.017999e+01\n13 13747     6.444700e+02 -3.694800e+02\n2 13748     5.010000e+02 -1.089800e+02\n10 13748     2.588000e+02 -5.577002e+01\n12 13748     3.631600e+02 -7.154999e+01\n15 13748     3.833300e+02 -9.153003e+01\n2 13749     -7.796997e+01 -1.098100e+02\n3 13749     -1.569600e+02 -4.236500e+02\n2 13750     -8.252002e+01 -1.124400e+02\n3 13750     -1.612000e+02 -4.254900e+02\n8 13750     -3.725000e+01 -1.335000e+02\n2 13751     -7.679999e+01 -1.142000e+02\n3 13751     -1.553100e+02 -4.269100e+02\n6 13751     -2.634900e+02 -1.182400e+02\n8 13751     -3.267999e+01 -1.350700e+02\n12 13751     -2.473100e+02 -5.608002e+01\n2 13752     5.127400e+02 -1.142400e+02\n10 13752     2.672700e+02 -6.523999e+01\n12 13752     3.764500e+02 -7.826001e+01\n15 13752     3.931000e+02 -1.028100e+02\n2 13753     -7.987000e+01 -1.178400e+02\n3 13753     -1.574600e+02 -4.307600e+02\n6 13753     -2.659700e+02 -1.221600e+02\n12 13753     -2.493500e+02 -5.982001e+01\n2 13754     8.816998e+01 -1.190500e+02\n3 13754     8.409973e+00 -4.264500e+02\n6 13754     -9.703000e+01 -1.323200e+02\n7 13754     -1.489700e+02 -5.049988e+00\n8 13754     9.734998e+01 -1.427700e+02\n10 13754     -1.728600e+02 1.376001e+01\n12 13754     -9.040002e+01 -7.678998e+01\n13 13754     3.095300e+02 -3.193900e+02\n15 13754     -1.259500e+02 -1.223999e+01\n2 13755     5.131300e+02 -1.190200e+02\n3 13755     4.113900e+02 -4.143300e+02\n2 13756     7.718800e+02 -1.285100e+02\n7 13756     6.329000e+02 3.412000e+01\n9 13756     5.226600e+02 2.979980e+00\n12 13756     7.738400e+02 4.049988e+00\n2 13757     7.884600e+02 -1.375800e+02\n7 13757     6.463101e+02 2.156000e+01\n2 13758     8.201000e+02 -1.418000e+02\n7 13758     6.716899e+02 1.064001e+01\n2 13759     -3.174100e+02 -1.466600e+02\n7 13759     -3.328600e+02 1.395200e+02\n10 13759     -3.190300e+02 2.291000e+02\n2 13760     -3.174100e+02 -1.466600e+02\n3 13760     -4.319800e+02 -4.777400e+02\n5 13760     2.698600e+02 -5.986400e+02\n7 13760     -3.328600e+02 1.395200e+02\n10 13760     -3.190300e+02 2.291000e+02\n2 13761     5.110999e+01 -1.501700e+02\n3 13761     -2.491998e+01 -4.574900e+02\n8 13761     6.579999e+01 -1.691800e+02\n2 13762     -1.614001e+01 -1.504400e+02\n3 13762     -9.192999e+01 -4.598101e+02\n2 13763     -1.645001e+01 -1.558200e+02\n3 13763     -9.210999e+01 -4.659900e+02\n6 13763     -2.027200e+02 -1.687800e+02\n9 13763     -1.129300e+02 -4.615997e+01\n12 13763     -1.949600e+02 -1.082800e+02\n13 13763     2.317700e+02 -3.285500e+02\n2 13764     3.435800e+02 -1.603800e+02\n3 13764     2.571600e+02 -4.576500e+02\n7 13764     5.107001e+01 -8.158002e+01\n8 13764     3.045500e+02 -1.847100e+02\n10 13764     3.915997e+01 -9.807001e+01\n12 13764     1.654000e+02 -1.419700e+02\n15 13764     1.224300e+02 -1.416600e+02\n2 13765     5.066000e+02 -1.603500e+02\n3 13765     4.081200e+02 -4.549900e+02\n9 13765     3.166400e+02 -2.857001e+01\n2 13766     5.114600e+02 -1.606700e+02\n8 13766     4.507500e+02 -1.832100e+02\n9 13766     3.201899e+02 -2.946997e+01\n2 13767     5.114600e+02 -1.606700e+02\n8 13767     4.507500e+02 -1.832100e+02\n9 13767     3.201899e+02 -2.946997e+01\n2 13768     2.460999e+01 -1.617000e+02\n3 13768     -4.903998e+01 -4.690699e+02\n2 13769     3.413101e+02 -1.730800e+02\n3 13769     2.568000e+02 -4.697000e+02\n8 13769     3.007800e+02 -1.958300e+02\n2 13770     1.082500e+02 -1.744300e+02\n6 13770     -8.004001e+01 -2.010200e+02\n7 13770     -1.503400e+02 -6.569000e+01\n8 13770     1.106400e+02 -1.912700e+02\n12 13770     -8.227002e+01 -1.462600e+02\n13 13770     3.095300e+02 -3.714000e+02\n15 13770     -1.381800e+02 -9.457001e+01\n2 13771     3.722300e+02 -1.745200e+02\n3 13771     2.873101e+02 -4.697300e+02\n4 13771     -4.690700e+02 -5.026500e+02\n6 13771     1.870900e+02 -2.030800e+02\n8 13771     3.269300e+02 -1.976400e+02\n9 13771     2.107200e+02 -4.357001e+01\n12 13771     1.898500e+02 -1.623600e+02\n2 13772     5.160601e+02 -1.750900e+02\n6 13772     3.580800e+02 -1.596000e+02\n8 13772     4.556200e+02 -1.929500e+02\n9 13772     3.240900e+02 -4.100000e+01\n12 13772     3.873500e+02 -1.289100e+02\n2 13773     1.312700e+02 -1.777100e+02\n10 13773     -1.649600e+02 -6.615002e+01\n12 13773     -6.032001e+01 -1.517000e+02\n2 13774     2.428101e+02 -1.863200e+02\n6 13774     5.440002e+01 -2.174500e+02\n8 13774     2.192700e+02 -2.052500e+02\n12 13774     5.154999e+01 -1.698300e+02\n2 13775     -3.922300e+02 -1.873800e+02\n3 13775     -5.054600e+02 -5.215200e+02\n13 13775     3.637000e+01 -2.164400e+02\n2 13776     -4.620001e+01 -1.942500e+02\n6 13776     -2.293700e+02 -1.955100e+02\n8 13776     -8.229980e+00 -1.999400e+02\n9 13776     -1.378500e+02 -7.998999e+01\n12 13776     -2.136200e+02 -1.354000e+02\n2 13777     2.318000e+02 -1.984600e+02\n6 13777     4.370001e+01 -2.273400e+02\n7 13777     -5.388000e+01 -1.032600e+02\n8 13777     2.099200e+02 -2.138800e+02\n12 13777     4.095001e+01 -1.796600e+02\n2 13778     3.974000e+02 -1.994700e+02\n6 13778     2.166400e+02 -2.185300e+02\n9 13778     2.311600e+02 -6.367999e+01\n12 13778     2.249399e+02 -1.798100e+02\n2 13779     3.974000e+02 -1.994700e+02\n3 13779     3.100500e+02 -4.947600e+02\n6 13779     2.166400e+02 -2.185300e+02\n7 13779     9.957001e+01 -1.157600e+02\n8 13779     3.492400e+02 -2.166200e+02\n9 13779     2.311600e+02 -6.367999e+01\n10 13779     9.378998e+01 -1.404200e+02\n12 13779     2.249399e+02 -1.798100e+02\n2 13780     3.584301e+02 -2.007100e+02\n3 13780     2.750200e+02 -4.965699e+02\n2 13781     3.948101e+02 -2.083600e+02\n3 13781     3.090300e+02 -5.032900e+02\n9 13781     2.304399e+02 -7.073999e+01\n2 13782     -3.128400e+02 -2.101800e+02\n3 13782     -4.198000e+02 -5.417900e+02\n2 13783     3.933101e+02 -2.162300e+02\n3 13783     3.073700e+02 -5.105900e+02\n8 13783     3.460500e+02 -2.303600e+02\n9 13783     2.286899e+02 -7.791998e+01\n2 13784     -5.278200e+02 -2.246200e+02\n7 13784     -5.214000e+02 6.792999e+01\n2 13785     8.221997e+01 -2.243100e+02\n6 13785     -1.036100e+02 -2.414700e+02\n12 13785     -1.014200e+02 -1.865400e+02\n15 13785     -1.523200e+02 -1.259800e+02\n2 13786     3.552500e+02 -2.256800e+02\n6 13786     1.704200e+02 -2.522800e+02\n2 13787     2.650500e+02 -2.265900e+02\n3 13787     1.863000e+02 -5.252200e+02\n7 13787     -2.320001e+01 -1.244800e+02\n9 13787     1.249800e+02 -9.041998e+01\n2 13788     1.313300e+02 -2.268500e+02\n6 13788     -5.609998e+01 -2.473800e+02\n12 13788     -5.596997e+01 -1.950900e+02\n2 13789     4.977200e+02 -2.283700e+02\n3 13789     4.028400e+02 -5.234399e+02\n8 13789     4.390699e+02 -2.371600e+02\n9 13789     3.111700e+02 -8.544000e+01\n2 13790     1.268600e+02 -2.293500e+02\n3 13790     5.141998e+01 -5.336899e+02\n6 13790     -5.973999e+01 -2.489399e+02\n8 13790     1.272500e+02 -2.348100e+02\n9 13790     1.078998e+01 -9.990002e+01\n12 13790     -5.934003e+01 -1.962800e+02\n2 13791     3.506300e+02 -2.308400e+02\n3 13791     2.681400e+02 -5.267200e+02\n2 13792     3.327500e+02 -2.332300e+02\n6 13792     1.489600e+02 -2.535400e+02\n8 13792     2.942300e+02 -2.437500e+02\n2 13793     1.084700e+02 -2.355900e+02\n6 13793     -7.702002e+01 -2.529900e+02\n12 13793     -7.562000e+01 -1.999400e+02\n2 13794     4.945900e+02 -2.352900e+02\n8 13794     4.358700e+02 -2.429200e+02\n2 13795     2.720000e+02 -2.367200e+02\n3 13795     1.928300e+02 -5.355500e+02\n9 13795     1.309600e+02 -9.919000e+01\n2 13796     9.820001e+01 -2.391700e+02\n6 13796     -8.709000e+01 -2.549500e+02\n2 13797     -4.148900e+02 -2.410700e+02\n8 13797     -2.827900e+02 -2.149900e+02\n2 13798     7.264301e+02 -2.437400e+02\n9 13798     4.925300e+02 -9.253003e+01\n15 13798     8.562900e+02 -1.931300e+02\n2 13799     -3.383500e+02 -2.508800e+02\n3 13799     -4.431800e+02 -5.835000e+02\n8 13799     -2.234300e+02 -2.241100e+02\n9 13799     -3.954600e+02 -1.481700e+02\n13 13799     5.591998e+01 -2.821500e+02\n2 13800     -3.980600e+02 -2.515100e+02\n3 13800     -5.069200e+02 -5.872600e+02\n2 13801     -3.980600e+02 -2.515100e+02\n3 13801     -5.069200e+02 -5.872600e+02\n2 13802     5.266100e+02 -2.521300e+02\n6 13802     3.737000e+02 -2.209500e+02\n2 13803     5.224100e+02 -2.522200e+02\n10 13803     3.068600e+02 -1.569400e+02\n2 13804     3.477100e+02 -2.534300e+02\n8 13804     3.062600e+02 -2.606300e+02\n2 13805     4.915500e+02 -2.543000e+02\n6 13805     3.275600e+02 -2.412300e+02\n8 13805     4.327900e+02 -2.589100e+02\n12 13805     3.532700e+02 -2.112100e+02\n2 13806     2.742500e+02 -2.593200e+02\n6 13806     8.948999e+01 -2.768700e+02\n12 13806     9.223999e+01 -2.336000e+02\n2 13807     -3.511300e+02 -2.643100e+02\n3 13807     -4.561400e+02 -5.988900e+02\n4 13807     -2.664500e+02 -1.759900e+02\n7 13807     -4.006200e+02 9.909973e+00\n8 13807     -2.351000e+02 -2.362000e+02\n9 13807     -4.055200e+02 -1.609000e+02\n10 13807     -4.147400e+02 8.092999e+01\n13 13807     4.291998e+01 -2.935500e+02\n2 13808     4.743700e+02 -2.662900e+02\n6 13808     3.030500e+02 -2.651600e+02\n8 13808     4.154500e+02 -2.694100e+02\n2 13809     2.228600e+02 -2.699700e+02\n3 13809     1.459900e+02 -5.710000e+02\n6 13809     3.842999e+01 -2.861000e+02\n9 13809     9.171997e+01 -1.291200e+02\n12 13809     3.897998e+01 -2.404200e+02\n2 13810     3.858800e+02 -2.777100e+02\n3 13810     3.020400e+02 -5.743199e+02\n2 13811     -3.211500e+02 -2.804400e+02\n4 13811     -2.818100e+02 -1.830100e+02\n13 13811     5.856000e+01 -3.121900e+02\n2 13812     9.578998e+01 -2.811500e+02\n6 13812     -8.745001e+01 -2.905100e+02\n2 13813     -3.742600e+02 -2.852300e+02\n7 13813     -4.236400e+02 -1.009003e+01\n9 13813     -4.233100e+02 -1.800700e+02\n13 13813     2.301001e+01 -3.092000e+02\n2 13814     2.826801e+02 -2.903800e+02\n6 13814     9.928003e+01 -3.029399e+02\n2 13815     4.161801e+02 -2.912100e+02\n8 13815     3.656900e+02 -2.900300e+02\n2 13816     -3.104999e+01 -2.925800e+02\n3 13816     -1.082100e+02 -6.059000e+02\n8 13816     2.950012e+00 -2.778900e+02\n9 13816     -1.217300e+02 -1.619400e+02\n2 13817     2.826400e+02 -2.947200e+02\n6 13817     9.937000e+01 -3.067600e+02\n15 13817     5.334003e+01 -2.497900e+02\n2 13818     -2.971997e+01 -2.976400e+02\n3 13818     -1.065200e+02 -6.117800e+02\n8 13818     4.299988e+00 -2.821100e+02\n9 13818     -1.194400e+02 -1.663300e+02\n2 13819     2.881300e+02 -3.009800e+02\n6 13819     1.053500e+02 -3.114900e+02\n12 13819     1.101500e+02 -2.699800e+02\n2 13820     -1.470001e+01 -3.013800e+02\n12 13820     -1.778400e+02 -2.350200e+02\n2 13821     -3.422100e+02 -3.038300e+02\n7 13821     -4.067900e+02 -3.276001e+01\n8 13821     -2.317300e+02 -2.693000e+02\n13 13821     3.883002e+01 -3.303200e+02\n2 13822     -3.422100e+02 -3.038300e+02\n7 13822     -4.067900e+02 -3.276001e+01\n13 13822     3.883002e+01 -3.303200e+02\n2 13823     -3.582100e+02 -3.054700e+02\n13 13823     2.852002e+01 -3.292000e+02\n2 13824     3.398500e+02 -3.057400e+02\n3 13824     2.603000e+02 -6.035699e+02\n9 13824     1.883199e+02 -1.536800e+02\n2 13825     -3.458400e+02 -3.064600e+02\n7 13825     -4.097800e+02 -3.578998e+01\n9 13825     -3.966400e+02 -1.954800e+02\n2 13826     3.910699e+02 -3.067700e+02\n6 13826     2.149400e+02 -3.069301e+02\n8 13826     3.441200e+02 -3.017500e+02\n12 13826     2.273199e+02 -2.713400e+02\n2 13827     -4.151900e+02 -3.114100e+02\n8 13827     -2.887000e+02 -2.746400e+02\n2 13828     3.311500e+02 -3.121800e+02\n6 13828     1.497400e+02 -3.207500e+02\n8 13828     2.930600e+02 -3.057500e+02\n2 13829     -3.980700e+02 -3.139400e+02\n8 13829     -2.756200e+02 -2.768600e+02\n2 13830     8.203998e+01 -3.234800e+02\n8 13830     9.035999e+01 -3.073200e+02\n9 13830     -2.394000e+01 -1.806000e+02\n2 13831     8.203998e+01 -3.234800e+02\n6 13831     -9.960999e+01 -3.286801e+02\n8 13831     9.035999e+01 -3.073200e+02\n2 13832     1.224300e+02 -3.251700e+02\n6 13832     -6.038000e+01 -3.321801e+02\n2 13833     -5.457300e+02 -3.283100e+02\n15 13833     -6.157600e+02 8.349976e+00\n2 13834     3.087800e+02 -3.308600e+02\n6 13834     1.269900e+02 -3.367300e+02\n10 13834     7.070007e+00 -2.197300e+02\n12 13834     1.337000e+02 -2.967700e+02\n13 13834     4.520400e+02 -5.072300e+02\n2 13835     5.931899e+02 -3.323400e+02\n9 13835     3.909399e+02 -1.683100e+02\n2 13836     -3.591600e+02 -3.367400e+02\n7 13836     -4.300500e+02 -6.645001e+01\n2 13837     5.871002e+01 -3.385500e+02\n7 13837     -1.693300e+02 -1.630700e+02\n8 13837     7.265997e+01 -3.176100e+02\n9 13837     -4.297998e+01 -1.948800e+02\n12 13837     -1.112100e+02 -2.812300e+02\n13 13837     2.719301e+02 -4.606400e+02\n15 13837     -1.539500e+02 -2.116100e+02\n2 13838     4.917999e+01 -3.397700e+02\n6 13838     -1.308200e+02 -3.369500e+02\n8 13838     6.609003e+01 -3.190600e+02\n12 13838     -1.194400e+02 -2.815000e+02\n2 13839     8.120001e+01 -3.422500e+02\n8 13839     8.953998e+01 -3.216500e+02\n2 13840     8.120001e+01 -3.422500e+02\n8 13840     8.953998e+01 -3.216500e+02\n2 13841     -4.574900e+02 -3.472400e+02\n13 13841     -4.709998e+01 -3.525100e+02\n2 13842     -3.018600e+02 -3.573300e+02\n6 13842     -4.769900e+02 -3.145500e+02\n8 13842     -2.037100e+02 -3.159500e+02\n2 13843     -4.370200e+02 -3.627700e+02\n15 13843     -5.377600e+02 -6.187000e+01\n2 13844     -4.206200e+02 -3.637600e+02\n13 13844     -2.727002e+01 -3.720700e+02\n2 13845     6.177300e+02 -3.678500e+02\n8 13845     5.408500e+02 -3.525900e+02\n2 13846     5.009600e+02 -3.705500e+02\n8 13846     4.361500e+02 -3.573500e+02\n2 13847     2.125000e+01 -3.753100e+02\n6 13847     -1.575100e+02 -3.701600e+02\n9 13847     -7.212000e+01 -2.278200e+02\n12 13847     -1.462400e+02 -3.120700e+02\n2 13848     3.521899e+02 -3.811200e+02\n8 13848     3.102400e+02 -3.621300e+02\n13 13848     4.814200e+02 -5.522300e+02\n2 13849     -2.882000e+02 -3.866800e+02\n8 13849     -1.952300e+02 -3.411700e+02\n2 13850     2.989301e+02 -3.898100e+02\n7 13850     1.844000e+01 -2.354700e+02\n15 13850     8.196997e+01 -3.334900e+02\n2 13851     -3.475500e+02 -3.911400e+02\n6 13851     -5.234000e+02 -3.599800e+02\n7 13851     -4.382000e+02 -1.231700e+02\n8 13851     -2.425200e+02 -3.436100e+02\n9 13851     -3.882300e+02 -2.656700e+02\n13 13851     1.323999e+01 -4.060100e+02\n2 13852     -2.836600e+02 -3.926200e+02\n6 13852     -4.583300e+02 -3.607900e+02\n8 13852     -1.927500e+02 -3.462300e+02\n2 13853     3.643700e+02 -4.075400e+02\n6 13853     1.818100e+02 -4.146100e+02\n7 13853     5.894000e+01 -2.681100e+02\n12 13853     1.852600e+02 -3.792300e+02\n2 13854     -2.820007e+00 -4.119301e+02\n6 13854     -1.836400e+02 -4.144800e+02\n7 13854     -2.271800e+02 -2.170900e+02\n9 13854     -8.952002e+01 -2.598200e+02\n10 13854     -2.692000e+02 -2.100000e+02\n12 13854     -1.776600e+02 -3.540400e+02\n13 13854     2.167800e+02 -5.045000e+02\n2 13855     3.610200e+02 -4.117000e+02\n6 13855     1.786000e+02 -4.210400e+02\n12 13855     1.818000e+02 -3.859200e+02\n2 13856     -3.406900e+02 -4.172900e+02\n8 13856     -2.394100e+02 -3.663300e+02\n9 13856     -3.798700e+02 -2.871500e+02\n2 13857     1.396997e+01 -4.194600e+02\n6 13857     -1.658500e+02 -4.200400e+02\n12 13857     -1.597100e+02 -3.611500e+02\n2 13858     -2.609985e+00 -4.404500e+02\n7 13858     -2.238800e+02 -2.335300e+02\n9 13858     -8.816998e+01 -2.831500e+02\n12 13858     -1.738100e+02 -3.774400e+02\n13 13858     2.162900e+02 -5.208800e+02\n2 13859     5.822800e+02 -4.481300e+02\n9 13859     3.900000e+02 -2.614600e+02\n2 13860     -3.770000e+02 -4.682500e+02\n6 13860     -5.555100e+02 -4.587300e+02\n7 13860     -4.833300e+02 -1.978900e+02\n8 13860     -2.726300e+02 -4.084600e+02\n9 13860     -4.075600e+02 -3.324300e+02\n13 13860     -2.431000e+01 -4.671100e+02\n2 13861     -2.759000e+02 -4.728400e+02\n13 13861     3.985999e+01 -4.890601e+02\n2 13862     -3.859300e+02 -4.745800e+02\n6 13862     -5.629100e+02 -4.667700e+02\n2 13863     -3.911200e+02 -4.865300e+02\n15 13863     -5.646700e+02 -2.343400e+02\n2 13864     6.271400e+02 -5.167000e+02\n9 13864     4.297900e+02 -3.134900e+02\n2 13865     6.629800e+02 -5.569800e+02\n7 13865     2.867600e+02 -4.315900e+02\n9 13865     4.605000e+02 -3.424400e+02\n10 13865     2.837900e+02 -5.213300e+02\n2 13866     6.733300e+02 -5.580000e+02\n9 13866     4.688101e+02 -3.433300e+02\n12 13866     4.935200e+02 -5.545200e+02\n2 13867     6.751100e+02 -5.773900e+02\n9 13867     4.713900e+02 -3.589400e+02\n2 13868     6.792900e+02 -5.787600e+02\n9 13868     4.746300e+02 -3.586700e+02\n2 13869     -1.163000e+01 -5.871500e+02\n7 13869     -2.594000e+02 -3.587200e+02\n2 13870     3.940699e+02 -5.939800e+02\n12 13870     1.921100e+02 -5.741500e+02\n2 13871     4.051500e+02 -6.013500e+02\n12 13871     2.012100e+02 -5.842600e+02\n2 13872     4.469301e+02 -6.163300e+02\n7 13872     7.940997e+01 -4.555601e+02\n2 13873     -2.901400e+02 5.956100e+02\n4 13873     1.917100e+02 -4.011900e+02\n5 13873     4.374200e+02 1.645200e+02\n13 13873     2.069399e+02 4.291500e+02\n14 13873     3.363199e+02 6.909003e+01\n2 13874     -2.204900e+02 5.952400e+02\n3 13874     -3.487200e+02 2.538100e+02\n4 13874     1.914301e+02 -4.506600e+02\n11 13874     2.226400e+02 -1.270020e+00\n13 13874     2.682500e+02 4.368700e+02\n14 13874     4.088101e+02 7.590002e+01\n2 13875     -4.929999e+01 5.954200e+02\n3 13875     -1.899300e+02 2.519700e+02\n13 13875     4.279900e+02 4.577700e+02\n14 13875     5.975000e+02 9.570001e+01\n2 13876     -2.099100e+02 5.936700e+02\n3 13876     -3.391600e+02 2.525100e+02\n4 13876     1.905400e+02 -4.585100e+02\n13 13876     2.778400e+02 4.370100e+02\n14 13876     4.201300e+02 7.576001e+01\n2 13877     -1.976001e+01 5.905100e+02\n3 13877     -1.619300e+02 2.467200e+02\n5 13877     7.433900e+02 1.838700e+02\n13 13877     4.561700e+02 4.564800e+02\n14 13877     6.313000e+02 9.348999e+01\n2 13878     -3.909973e+00 5.912600e+02\n11 13878     4.467100e+02 1.872998e+01\n13 13878     4.721500e+02 4.591400e+02\n14 13878     6.501500e+02 9.609000e+01\n2 13879     -6.412000e+01 5.891100e+02\n3 13879     -2.029800e+02 2.457700e+02\n5 13879     6.899700e+02 1.775300e+02\n11 13879     3.820100e+02 9.460022e+00\n13 13879     4.131400e+02 4.495400e+02\n14 13879     5.802600e+02 8.653000e+01\n2 13880     -1.932500e+02 5.841200e+02\n4 13880     1.847300e+02 -4.697400e+02\n11 13880     2.505500e+02 -8.090027e+00\n14 13880     4.375000e+02 6.806000e+01\n2 13881     -1.014200e+02 5.714700e+02\n3 13881     -2.386100e+02 2.297100e+02\n5 13881     6.454500e+02 1.572000e+02\n11 13881     3.440200e+02 -6.440002e+00\n14 13881     5.382100e+02 6.716998e+01\n2 13882     -2.899400e+02 5.583500e+02\n4 13882     1.706300e+02 -3.959600e+02\n5 13882     4.338500e+02 1.281200e+02\n8 13882     -1.606100e+02 4.362100e+02\n13 13882     2.048000e+02 3.985500e+02\n14 13882     3.336100e+02 3.409998e+01\n2 13883     -2.899400e+02 5.583500e+02\n5 13883     4.338500e+02 1.281200e+02\n8 13883     -1.606100e+02 4.362100e+02\n13 13883     2.048000e+02 3.985500e+02\n14 13883     3.336100e+02 3.409998e+01\n2 13884     -1.940002e+01 5.530300e+02\n3 13884     -1.625300e+02 2.110100e+02\n5 13884     7.414500e+02 1.476500e+02\n8 13884     6.481000e+01 4.384700e+02\n11 13884     4.314200e+02 -1.366998e+01\n14 13884     6.308500e+02 5.835999e+01\n2 13885     -1.379999e+01 5.532900e+02\n8 13885     6.944000e+01 4.380100e+02\n11 13885     4.375500e+02 -1.222998e+01\n2 13886     -1.379999e+01 5.532900e+02\n5 13886     7.484600e+02 1.484500e+02\n8 13886     6.944000e+01 4.380100e+02\n11 13886     4.375500e+02 -1.222998e+01\n13 13886     4.605800e+02 4.271200e+02\n14 13886     6.376200e+02 5.987000e+01\n2 13887     9.159973e+00 5.533500e+02\n3 13887     -1.355800e+02 2.114000e+02\n5 13887     7.768900e+02 1.508200e+02\n2 13888     9.159973e+00 5.533500e+02\n5 13888     7.768900e+02 1.508200e+02\n8 13888     8.848999e+01 4.386800e+02\n11 13888     4.628500e+02 -9.659973e+00\n14 13888     6.638300e+02 6.216998e+01\n2 13889     -9.626001e+01 5.522800e+02\n4 13889     1.670100e+02 -5.421500e+02\n8 13889     4.699707e-01 4.353200e+02\n13 13889     3.806600e+02 4.162300e+02\n14 13889     5.425601e+02 4.940997e+01\n2 13890     -7.146002e+01 5.514200e+02\n4 13890     1.656700e+02 -5.628800e+02\n5 13890     6.787300e+02 1.406200e+02\n11 13890     3.758800e+02 -2.078998e+01\n13 13890     4.045400e+02 4.188200e+02\n14 13890     5.708199e+02 5.163000e+01\n2 13891     -7.146002e+01 5.514200e+02\n3 13891     -2.105800e+02 2.101400e+02\n8 13891     2.138000e+01 4.344800e+02\n11 13891     3.758800e+02 -2.078998e+01\n2 13892     -3.002100e+02 5.505300e+02\n3 13892     -4.250900e+02 2.120100e+02\n4 13892     1.663500e+02 -3.882400e+02\n5 13892     4.221200e+02 1.197000e+02\n6 13892     -5.175300e+02 8.730500e+02\n8 13892     -1.690700e+02 4.290600e+02\n11 13892     1.447600e+02 -4.392999e+01\n13 13892     1.956899e+02 3.917900e+02\n14 13892     3.225300e+02 2.667999e+01\n2 13893     -2.794500e+02 5.510800e+02\n3 13893     -4.041600e+02 2.117400e+02\n4 13893     1.664200e+02 -4.028200e+02\n8 13893     -1.517300e+02 4.304300e+02\n13 13893     2.137300e+02 3.938500e+02\n14 13893     3.440300e+02 2.856000e+01\n2 13894     -4.744000e+01 5.513200e+02\n3 13894     -1.879400e+02 2.106600e+02\n11 13894     4.016400e+02 -1.784998e+01\n13 13894     4.277700e+02 4.215600e+02\n14 13894     5.984900e+02 5.407001e+01\n2 13895     -4.829300e+02 5.483200e+02\n8 13895     -3.202700e+02 4.227200e+02\n2 13896     4.747998e+01 5.456000e+02\n8 13896     1.205300e+02 4.336900e+02\n11 13896     5.047900e+02 -1.153003e+01\n13 13896     5.203600e+02 4.280300e+02\n14 13896     7.094600e+02 5.946002e+01\n2 13897     -1.792200e+02 5.455700e+02\n3 13897     -3.115500e+02 2.058400e+02\n4 13897     1.631500e+02 -4.751400e+02\n5 13897     5.540400e+02 1.256500e+02\n13 13897     3.032500e+02 4.012900e+02\n14 13897     4.508101e+02 3.407001e+01\n2 13898     2.562600e+02 5.401500e+02\n3 13898     1.121300e+02 1.988900e+02\n6 13898     1.628900e+02 8.439100e+02\n8 13898     2.800400e+02 4.210600e+02\n9 13898     6.765997e+01 5.522800e+02\n13 13898     6.606600e+02 3.477000e+02\n2 13899     -6.796800e+02 5.390300e+02\n3 13899     -7.914500e+02 2.104600e+02\n8 13899     -4.811300e+02 4.101000e+02\n2 13900     -6.476100e+02 5.379200e+02\n8 13900     -4.549500e+02 4.097000e+02\n2 13901     -1.673100e+02 5.381100e+02\n3 13901     -2.997900e+02 1.983300e+02\n4 13901     1.585000e+02 -4.833300e+02\n8 13901     -5.827002e+01 4.225900e+02\n2 13902     -1.788800e+02 5.355300e+02\n5 13902     5.535500e+02 1.158400e+02\n8 13902     -6.812000e+01 4.204600e+02\n11 13902     2.642700e+02 -4.433002e+01\n13 13902     3.031899e+02 3.928000e+02\n2 13903     -1.350700e+02 5.355800e+02\n3 13903     -2.704100e+02 1.938200e+02\n4 13903     1.570500e+02 -5.079700e+02\n5 13903     6.027300e+02 1.198900e+02\n8 13903     -3.212000e+01 4.214500e+02\n2 13904     4.654301e+02 5.337200e+02\n3 13904     3.164600e+02 1.949400e+02\n6 13904     3.943600e+02 7.647800e+02\n8 13904     4.459900e+02 4.104600e+02\n9 13904     2.514800e+02 5.516900e+02\n11 13904     7.134301e+02 -1.817600e+02\n2 13905     -2.534900e+02 5.316000e+02\n4 13905     1.556899e+02 -4.186700e+02\n6 13905     -4.561200e+02 8.593600e+02\n8 13905     -1.299900e+02 4.152800e+02\n13 13905     2.362100e+02 3.818900e+02\n14 13905     3.705500e+02 1.376001e+01\n2 13906     -2.624600e+02 5.312500e+02\n4 13906     1.557200e+02 -4.121300e+02\n2 13907     2.904999e+01 5.258700e+02\n3 13907     -1.172100e+02 1.851100e+02\n5 13907     7.988300e+02 1.251400e+02\n8 13907     1.053500e+02 4.171200e+02\n13 13907     5.003199e+02 4.089000e+02\n2 13908     -1.942500e+02 5.247800e+02\n3 13908     -3.257800e+02 1.865700e+02\n4 13908     1.514301e+02 -4.607100e+02\n5 13908     5.351000e+02 1.044000e+02\n6 13908     -3.804000e+02 8.648800e+02\n8 13908     -8.114001e+01 4.110600e+02\n11 13908     2.485900e+02 -5.404999e+01\n13 13908     2.886200e+02 3.811500e+02\n14 13908     4.330300e+02 1.335999e+01\n2 13909     -4.691600e+02 5.245800e+02\n5 13909     2.464301e+02 8.509003e+01\n11 13909     -1.133002e+01 -7.640002e+01\n13 13909     5.223999e+01 3.549600e+02\n14 13909     1.523101e+02 -1.042999e+01\n2 13910     -2.201000e+02 5.237700e+02\n3 13910     -3.500500e+02 1.864900e+02\n4 13910     1.508800e+02 -4.415200e+02\n6 13910     -4.128700e+02 8.572700e+02\n8 13910     -1.023700e+02 4.095000e+02\n11 13910     2.224200e+02 -5.777002e+01\n14 13910     4.051700e+02 9.630005e+00\n2 13911     5.958900e+02 5.240500e+02\n3 13911     4.383700e+02 1.874100e+02\n8 13911     5.552400e+02 4.008100e+02\n2 13912     5.958900e+02 5.240500e+02\n8 13912     5.552400e+02 4.008100e+02\n2 13913     6.082300e+02 5.241200e+02\n3 13913     4.495100e+02 1.881300e+02\n6 13913     5.585200e+02 7.304700e+02\n9 13913     3.727100e+02 5.461900e+02\n2 13914     -2.284400e+02 5.234700e+02\n3 13914     -3.579300e+02 1.856900e+02\n4 13914     1.508900e+02 -4.354800e+02\n6 13914     -4.238100e+02 8.544400e+02\n11 13914     2.144400e+02 -5.872998e+01\n13 13914     2.576600e+02 3.777900e+02\n14 13914     3.963600e+02 8.570007e+00\n2 13915     -9.595001e+01 5.227200e+02\n4 13915     1.484301e+02 -5.377100e+02\n8 13915     9.199829e-01 4.112500e+02\n13 13915     3.790699e+02 3.916300e+02\n14 13915     5.411200e+02 2.069000e+01\n2 13916     -7.681900e+02 5.221300e+02\n14 13916     -1.175300e+02 -3.342999e+01\n2 13917     -7.450000e+02 5.216100e+02\n13 13917     -1.605300e+02 3.279300e+02\n14 13917     -9.940997e+01 -3.223999e+01\n2 13918     6.190400e+02 5.216000e+02\n3 13918     4.600601e+02 1.859500e+02\n8 13918     5.739800e+02 3.991700e+02\n9 13918     3.823400e+02 5.439600e+02\n2 13919     5.717400e+02 5.207400e+02\n8 13919     5.345800e+02 3.983500e+02\n9 13919     3.420900e+02 5.414900e+02\n2 13920     -3.069500e+02 5.196500e+02\n3 13920     -4.316300e+02 1.828900e+02\n4 13920     1.499000e+02 -3.799400e+02\n6 13920     -5.228100e+02 8.317600e+02\n8 13920     -1.737100e+02 4.045700e+02\n2 13921     -3.069500e+02 5.196500e+02\n4 13921     1.499000e+02 -3.799400e+02\n6 13921     -5.228100e+02 8.317600e+02\n11 13921     1.383200e+02 -6.853998e+01\n13 13921     1.885699e+02 3.667800e+02\n14 13921     3.140500e+02 -2.080017e+00\n2 13922     -5.222000e+02 5.178400e+02\n4 13922     1.529800e+02 -2.463600e+02\n5 13922     1.933101e+02 7.567999e+01\n11 13922     -5.762000e+01 -8.565997e+01\n13 13922     8.859985e+00 3.449900e+02\n14 13922     1.008300e+02 -2.012000e+01\n2 13923     -1.586700e+02 5.181900e+02\n11 13923     2.846200e+02 -5.634003e+01\n2 13924     6.886200e+02 5.175200e+02\n3 13924     5.232300e+02 1.825700e+02\n2 13925     5.565900e+02 5.174100e+02\n3 13925     4.018400e+02 1.812200e+02\n6 13925     4.981700e+02 7.311700e+02\n8 13925     5.218199e+02 3.955700e+02\n9 13925     3.289800e+02 5.389500e+02\n2 13926     -1.660500e+02 5.165800e+02\n3 13926     -2.993700e+02 1.775500e+02\n4 13926     1.465601e+02 -4.814500e+02\n5 13926     5.663800e+02 9.840002e+01\n6 13926     -3.436100e+02 8.607100e+02\n8 13926     -5.784003e+01 4.058400e+02\n11 13926     2.774600e+02 -5.772998e+01\n14 13926     4.634800e+02 8.419983e+00\n2 13927     5.246700e+02 5.145100e+02\n3 13927     3.720800e+02 1.782300e+02\n8 13927     4.955601e+02 3.929000e+02\n9 13927     3.012600e+02 5.361300e+02\n2 13928     5.942100e+02 5.132500e+02\n3 13928     4.371400e+02 1.777500e+02\n6 13928     5.416899e+02 7.213600e+02\n9 13928     3.607000e+02 5.360400e+02\n2 13929     5.942100e+02 5.132500e+02\n3 13929     4.371400e+02 1.777500e+02\n2 13930     -6.780900e+02 5.087800e+02\n13 13930     -1.119900e+02 3.244000e+02\n2 13931     -5.072900e+02 5.095700e+02\n4 13931     1.492700e+02 -2.538500e+02\n11 13931     -4.528003e+01 -9.028998e+01\n13 13931     2.071997e+01 3.402500e+02\n14 13931     1.146900e+02 -2.637000e+01\n2 13932     -1.016400e+02 5.093100e+02\n6 13932     -2.616000e+02 8.685100e+02\n2 13933     -1.016400e+02 5.093100e+02\n6 13933     -2.616000e+02 8.685100e+02\n2 13934     -1.801800e+02 5.075300e+02\n4 13934     1.412900e+02 -4.693199e+02\n5 13934     5.497100e+02 8.838000e+01\n6 13934     -3.607500e+02 8.453900e+02\n8 13934     -6.888000e+01 3.977600e+02\n11 13934     2.626801e+02 -6.647998e+01\n14 13934     4.474100e+02 -1.859985e+00\n2 13935     4.987300e+02 5.068000e+02\n6 13935     4.328700e+02 7.299300e+02\n2 13936     -6.828200e+02 5.056100e+02\n4 13936     1.503101e+02 -1.594700e+02\n5 13936     4.215002e+01 5.598999e+01\n8 13936     -4.823900e+02 3.831000e+02\n11 13936     -1.904400e+02 -1.040000e+02\n13 13936     -1.153600e+02 3.216000e+02\n14 13936     -4.659003e+01 -4.191998e+01\n2 13937     -5.964900e+02 5.035200e+02\n4 13937     1.474301e+02 -2.041400e+02\n5 13937     1.212000e+02 5.896002e+01\n8 13937     -4.122300e+02 3.842400e+02\n11 13937     -1.209700e+02 -1.003400e+02\n13 13937     -4.969000e+01 3.276200e+02\n14 13937     3.084998e+01 -3.745001e+01\n2 13938     -3.272200e+02 5.023600e+02\n3 13938     -4.513100e+02 1.670200e+02\n4 13938     1.413600e+02 -3.646000e+02\n5 13938     3.899800e+02 7.373999e+01\n6 13938     -5.470400e+02 8.057800e+02\n14 13938     2.926200e+02 -1.867999e+01\n2 13939     -3.042300e+02 5.020200e+02\n3 13939     -4.300300e+02 1.656900e+02\n4 13939     1.406500e+02 -3.799000e+02\n5 13939     4.137900e+02 7.429999e+01\n6 13939     -5.169400e+02 8.102900e+02\n8 13939     -1.720100e+02 3.902400e+02\n13 13939     1.899399e+02 3.531500e+02\n14 13939     3.157200e+02 -1.784998e+01\n2 13940     -8.572998e+01 5.003800e+02\n3 13940     -2.236500e+02 1.618700e+02\n4 13940     1.359300e+02 -5.429800e+02\n5 13940     6.571200e+02 8.917999e+01\n6 13940     -2.397600e+02 8.586100e+02\n8 13940     9.940002e+00 3.940200e+02\n2 13941     -1.600600e+02 4.985200e+02\n5 13941     5.708600e+02 8.067999e+01\n6 13941     -3.349400e+02 8.386200e+02\n11 13941     2.817300e+02 -7.257001e+01\n13 13941     3.177400e+02 3.641900e+02\n2 13942     -1.600600e+02 4.985200e+02\n11 13942     2.817300e+02 -7.257001e+01\n2 13943     -1.126700e+02 4.966500e+02\n4 13943     1.339000e+02 -5.207500e+02\n5 13943     6.254700e+02 8.306000e+01\n11 13943     3.313800e+02 -6.867999e+01\n13 13943     3.618300e+02 3.684900e+02\n14 13943     5.207600e+02 -5.450012e+00\n2 13944     -7.512500e+02 4.939100e+02\n14 13944     -1.057500e+02 -5.683002e+01\n2 13945     -1.011800e+02 4.923600e+02\n4 13945     1.307700e+02 -5.290900e+02\n6 13945     -2.598200e+02 8.441900e+02\n8 13945     -3.520020e+00 3.864900e+02\n2 13946     -8.602002e+01 4.920800e+02\n6 13946     -2.408200e+02 8.468700e+02\n8 13946     9.090027e+00 3.860700e+02\n2 13947     -1.063600e+02 4.876300e+02\n5 13947     6.318600e+02 7.516998e+01\n6 13947     -2.658700e+02 8.378700e+02\n11 13947     3.380800e+02 -7.528998e+01\n13 13947     3.677400e+02 3.622400e+02\n2 13948     6.390997e+01 4.875100e+02\n8 13948     1.343700e+02 3.868300e+02\n11 13948     5.225500e+02 -5.828003e+01\n13 13948     5.318700e+02 3.800800e+02\n14 13948     7.257000e+02 4.000000e+00\n2 13949     3.611400e+02 4.883400e+02\n6 13949     2.854000e+02 7.656400e+02\n8 13949     3.655900e+02 3.785700e+02\n9 13949     1.599301e+02 5.106200e+02\n13 13949     7.455699e+02 2.860500e+02\n2 13950     -3.259800e+02 4.858000e+02\n4 13950     1.320800e+02 -3.632200e+02\n6 13950     -5.431000e+02 7.839300e+02\n8 13950     -1.899600e+02 3.759600e+02\n2 13951     -3.259800e+02 4.858000e+02\n4 13951     1.320800e+02 -3.632200e+02\n5 13951     3.893400e+02 5.723999e+01\n6 13951     -5.431000e+02 7.839300e+02\n11 13951     1.192700e+02 -9.540997e+01\n14 13951     2.926400e+02 -3.408002e+01\n2 13952     -2.599900e+02 4.865300e+02\n4 13952     1.310300e+02 -4.080700e+02\n5 13952     4.592500e+02 6.231000e+01\n6 13952     -4.601500e+02 8.008300e+02\n8 13952     -1.353300e+02 3.791100e+02\n11 13952     1.816700e+02 -9.012000e+01\n13 13952     2.276000e+02 3.446900e+02\n14 13952     3.604200e+02 -2.900000e+01\n2 13953     3.781899e+02 4.864000e+02\n3 13953     2.301400e+02 1.503400e+02\n6 13953     3.046200e+02 7.594400e+02\n9 13953     1.741300e+02 5.079400e+02\n2 13954     -2.075600e+02 4.846800e+02\n3 13954     -3.379600e+02 1.479900e+02\n4 13954     1.293800e+02 -4.459301e+02\n11 13954     2.344600e+02 -8.635999e+01\n13 13954     2.744301e+02 3.496600e+02\n14 13954     4.164500e+02 -2.484998e+01\n2 13955     -6.921997e+01 4.817200e+02\n3 13955     -2.088500e+02 1.437100e+02\n4 13955     1.241800e+02 -5.537100e+02\n5 13955     6.743700e+02 7.184998e+01\n6 13955     -2.184000e+02 8.384300e+02\n8 13955     2.312000e+01 3.787000e+02\n13 13955     4.019100e+02 3.611400e+02\n14 13955     5.693000e+02 -1.521002e+01\n2 13956     -2.114001e+01 4.794200e+02\n3 13956     -1.640000e+02 1.402000e+02\n8 13956     6.245001e+01 3.777400e+02\n11 13956     4.297500e+02 -7.342999e+01\n13 13956     4.487100e+02 3.645500e+02\n2 13957     -6.127600e+02 4.716000e+02\n3 13957     -7.294300e+02 1.449900e+02\n4 13957     1.324500e+02 -1.925700e+02\n13 13957     -6.306000e+01 3.040900e+02\n14 13957     1.376001e+01 -6.459998e+01\n2 13958     -5.999756e-02 4.681000e+02\n3 13958     -1.444000e+02 1.294300e+02\n11 13958     4.516100e+02 -8.076001e+01\n14 13958     6.489301e+02 -2.195001e+01\n2 13959     5.687000e+01 4.655900e+02\n3 13959     -9.138000e+01 1.267700e+02\n5 13959     8.271600e+02 6.527002e+01\n6 13959     -5.676001e+01 8.477500e+02\n8 13959     1.283500e+02 3.691500e+02\n11 13959     5.145900e+02 -7.754999e+01\n13 13959     5.231300e+02 3.604500e+02\n14 13959     7.159700e+02 -1.902002e+01\n2 13960     -2.879000e+02 4.649100e+02\n3 13960     -4.153600e+02 1.293400e+02\n4 13960     1.205900e+02 -3.862900e+02\n5 13960     4.275400e+02 4.071002e+01\n6 13960     -4.933800e+02 7.672900e+02\n8 13960     -1.582000e+02 3.610600e+02\n14 13960     3.304399e+02 -5.001001e+01\n2 13961     1.468400e+02 4.597700e+02\n3 13961     -7.280029e+00 1.225200e+02\n6 13961     5.916998e+01 8.623200e+02\n8 13961     2.037300e+02 3.658700e+02\n13 13961     6.144399e+02 3.662300e+02\n14 13961     8.269500e+02 -1.433002e+01\n2 13962     1.468400e+02 4.597700e+02\n8 13962     2.037300e+02 3.658700e+02\n9 13962     -3.379999e+01 4.787100e+02\n14 13962     8.269500e+02 -1.433002e+01\n2 13963     -2.407001e+01 4.577500e+02\n5 13963     7.255000e+02 5.116998e+01\n6 13963     -1.603500e+02 8.187000e+02\n8 13963     6.054999e+01 3.607600e+02\n11 13963     4.250800e+02 -9.163000e+01\n13 13963     4.432600e+02 3.458900e+02\n14 13963     6.196200e+02 -3.406000e+01\n2 13964     -4.384800e+02 4.558900e+02\n5 13964     2.712000e+02 2.484998e+01\n8 13964     -2.825500e+02 3.505600e+02\n2 13965     -3.281500e+02 4.496400e+02\n3 13965     -4.541100e+02 1.145900e+02\n4 13965     1.127100e+02 -3.572900e+02\n5 13965     3.834100e+02 2.289001e+01\n6 13965     -5.420300e+02 7.386600e+02\n8 13965     -1.916600e+02 3.466800e+02\n11 13965     1.159800e+02 -1.247000e+02\n2 13966     -3.281500e+02 4.496400e+02\n4 13966     1.127100e+02 -3.572900e+02\n5 13966     3.834100e+02 2.289001e+01\n6 13966     -5.420300e+02 7.386600e+02\n8 13966     -1.916600e+02 3.466800e+02\n11 13966     1.159800e+02 -1.247000e+02\n2 13967     -7.169983e+00 4.499000e+02\n3 13967     -1.508200e+02 1.127100e+02\n5 13967     7.457900e+02 4.454999e+01\n6 13967     -1.376700e+02 8.126700e+02\n8 13967     7.528003e+01 3.548200e+02\n11 13967     4.433300e+02 -9.659003e+01\n13 13967     4.585500e+02 3.408100e+02\n14 13967     6.385601e+02 -4.026001e+01\n2 13968     5.917600e+02 4.505100e+02\n6 13968     5.353000e+02 6.499400e+02\n8 13968     5.505400e+02 3.402900e+02\n9 13968     3.587100e+02 4.843900e+02\n2 13969     5.917600e+02 4.505100e+02\n3 13969     4.372600e+02 1.206400e+02\n6 13969     5.353000e+02 6.499400e+02\n8 13969     5.505400e+02 3.402900e+02\n9 13969     3.587100e+02 4.843900e+02\n2 13970     -1.351001e+01 4.493100e+02\n13 13970     4.528800e+02 3.396400e+02\n14 13970     6.315400e+02 -4.135999e+01\n2 13971     -1.351001e+01 4.493100e+02\n3 13971     -1.568400e+02 1.104300e+02\n5 13971     7.381700e+02 4.515997e+01\n6 13971     -1.460600e+02 8.124300e+02\n8 13971     6.992999e+01 3.553000e+02\n11 13971     4.366000e+02 -9.698999e+01\n13 13971     4.528800e+02 3.396400e+02\n14 13971     6.315400e+02 -4.135999e+01\n2 13972     -3.373999e+01 4.479100e+02\n4 13972     1.030700e+02 -5.784800e+02\n6 13972     -1.719700e+02 8.043400e+02\n8 13972     5.270001e+01 3.526100e+02\n11 13972     4.145300e+02 -1.011800e+02\n14 13972     6.077400e+02 -4.478998e+01\n2 13973     9.591998e+01 4.479400e+02\n3 13973     -5.648999e+01 1.092200e+02\n6 13973     -6.640015e+00 8.357400e+02\n8 13973     1.607400e+02 3.564200e+02\n11 13973     5.579900e+02 -8.882001e+01\n2 13974     -3.830200e+02 4.452200e+02\n3 13974     -5.065000e+02 1.123100e+02\n5 13974     3.265300e+02 1.728998e+01\n8 13974     -2.363300e+02 3.431500e+02\n11 13974     6.465002e+01 -1.291500e+02\n13 13974     1.207400e+02 3.026300e+02\n14 13974     2.322400e+02 -7.422998e+01\n2 13975     1.481000e+02 4.428200e+02\n6 13975     6.085999e+01 8.404500e+02\n8 13975     2.044400e+02 3.525900e+02\n9 13975     -3.213000e+01 4.643200e+02\n2 13976     -2.971300e+02 4.400900e+02\n4 13976     1.080100e+02 -3.773800e+02\n5 13976     4.160699e+02 1.759998e+01\n6 13976     -5.022400e+02 7.352900e+02\n8 13976     -1.656600e+02 3.412300e+02\n13 13976     1.938000e+02 3.063900e+02\n14 13976     3.195601e+02 -7.254999e+01\n2 13977     -2.879200e+02 4.412100e+02\n4 13977     1.080600e+02 -3.834500e+02\n5 13977     4.254500e+02 1.866998e+01\n6 13977     -4.913100e+02 7.382200e+02\n8 13977     -1.581600e+02 3.424100e+02\n11 13977     1.555200e+02 -1.268300e+02\n2 13978     -9.369995e+00 4.412400e+02\n3 13978     -1.528500e+02 1.034100e+02\n5 13978     7.420800e+02 3.588000e+01\n6 13978     -1.409400e+02 8.022200e+02\n8 13978     7.279999e+01 3.485400e+02\n11 13978     4.407300e+02 -1.041900e+02\n13 13978     4.561700e+02 3.330900e+02\n14 13978     6.357300e+02 -4.959003e+01\n2 13979     8.412000e+01 4.407900e+02\n6 13979     -2.171002e+01 8.229900e+02\n11 13979     5.444500e+02 -9.598999e+01\n13 13979     5.477800e+02 3.419400e+02\n2 13980     1.827500e+02 4.403800e+02\n3 13980     2.622998e+01 1.042000e+02\n6 13980     1.058300e+02 8.459100e+02\n2 13981     3.843300e+02 4.394900e+02\n3 13981     2.367900e+02 1.062700e+02\n6 13981     3.071800e+02 7.023500e+02\n8 13981     3.826200e+02 3.371100e+02\n9 13981     1.807200e+02 4.677800e+02\n13 13981     7.590000e+02 2.392600e+02\n2 13982     -5.369995e+00 4.362000e+02\n3 13982     -1.495000e+02 9.857001e+01\n5 13982     7.457500e+02 3.033002e+01\n6 13982     -1.354200e+02 7.969700e+02\n11 13982     4.445500e+02 -1.083500e+02\n13 13982     4.597100e+02 3.290100e+02\n2 13983     2.869000e+01 4.366800e+02\n13 13983     4.932000e+02 3.336200e+02\n2 13984     -6.608002e+01 4.373300e+02\n4 13984     9.784998e+01 -5.492300e+02\n5 13984     6.732400e+02 2.776001e+01\n6 13984     -2.124400e+02 7.834200e+02\n8 13984     2.569000e+01 3.437300e+02\n11 13984     3.796899e+02 -1.122800e+02\n2 13985     -2.759100e+02 4.336200e+02\n4 13985     1.024400e+02 -3.905400e+02\n5 13985     4.377000e+02 1.082001e+01\n6 13985     -4.744800e+02 7.287400e+02\n2 13986     -6.204600e+02 4.330200e+02\n3 13986     -7.389800e+02 1.062900e+02\n2 13987     -5.880900e+02 4.295600e+02\n3 13987     -7.062300e+02 1.018100e+02\n13 13987     -4.471997e+01 2.746300e+02\n14 13987     3.400000e+01 -9.971997e+01\n2 13988     7.280029e+00 4.308500e+02\n5 13988     7.614399e+02 2.672998e+01\n6 13988     -1.191500e+02 7.929000e+02\n8 13988     8.694000e+01 3.405300e+02\n2 13989     -8.991998e+01 4.239700e+02\n3 13989     -2.286600e+02 8.931000e+01\n13 13989     3.784301e+02 3.120900e+02\n14 13989     5.420601e+02 -7.179999e+01\n2 13990     -1.688800e+02 4.212200e+02\n3 13990     -3.025200e+02 8.566998e+01\n4 13990     9.275000e+01 -4.662000e+02\n5 13990     5.539200e+02 5.710022e+00\n8 13990     -5.962000e+01 3.281900e+02\n9 13990     -3.012600e+02 4.362800e+02\n11 13990     2.730000e+02 -1.331900e+02\n13 13990     3.062100e+02 3.022100e+02\n2 13991     -2.868100e+02 4.203900e+02\n3 13991     -4.159600e+02 8.594000e+01\n4 13991     9.682001e+01 -3.816100e+02\n5 13991     4.246700e+02 -9.699707e-01\n6 13991     -4.877100e+02 7.122900e+02\n8 13991     -1.570100e+02 3.255900e+02\n13 13991     2.014900e+02 2.913800e+02\n14 13991     3.286300e+02 -9.065002e+01\n2 13992     3.515002e+01 4.186800e+02\n3 13992     -1.116300e+02 8.172998e+01\n6 13992     -8.378000e+01 7.837200e+02\n9 13992     -1.274200e+02 4.395900e+02\n13 13992     4.974800e+02 3.188900e+02\n14 13992     6.865200e+02 -6.734003e+01\n2 13993     -5.836700e+02 4.175200e+02\n3 13993     -7.031100e+02 8.966998e+01\n2 13994     -5.580400e+02 4.183100e+02\n3 13994     -6.778800e+02 8.931000e+01\n4 13994     1.062600e+02 -2.169600e+02\n13 13994     -2.166998e+01 2.696400e+02\n2 13995     -4.804800e+02 4.169000e+02\n4 13995     1.030200e+02 -2.607200e+02\n5 13995     2.259100e+02 -1.160999e+01\n8 13995     -3.163800e+02 3.191500e+02\n2 13996     -3.038700e+02 4.171600e+02\n5 13996     4.064200e+02 -4.900024e+00\n2 13997     3.098500e+02 4.127300e+02\n3 13997     1.657000e+02 7.987000e+01\n6 13997     2.221000e+02 6.802900e+02\n8 13997     3.223700e+02 3.159500e+02\n9 13997     1.167900e+02 4.421900e+02\n11 13997     6.315200e+02 -2.254600e+02\n13 13997     6.928800e+02 2.295900e+02\n2 13998     3.776300e+02 4.129400e+02\n3 13998     2.312300e+02 8.102002e+01\n6 13998     3.003000e+02 6.698100e+02\n8 13998     3.776700e+02 3.151000e+02\n13 13998     7.512800e+02 2.173800e+02\n2 13999     -7.042700e+02 4.116100e+02\n4 13999     1.085700e+02 -1.404700e+02\n8 13999     -4.994100e+02 3.084600e+02\n13 13999     -1.332500e+02 2.533800e+02\n2 14000     -7.042700e+02 4.116100e+02\n13 14000     -1.332500e+02 2.533800e+02\n2 14001     -4.062500e+02 4.090700e+02\n3 14001     -5.301000e+02 7.713000e+01\n5 14001     2.997700e+02 -1.623999e+01\n2 14002     -9.528003e+01 4.079500e+02\n4 14002     8.287000e+01 -5.209900e+02\n5 14002     6.364600e+02 -1.690002e+00\n6 14002     -2.477000e+02 7.418600e+02\n8 14002     1.539978e+00 3.202600e+02\n13 14002     3.725100e+02 3.017700e+02\n2 14003     -5.496700e+02 4.059000e+02\n8 14003     -3.728600e+02 3.085000e+02\n2 14004     -5.433100e+02 4.042100e+02\n4 14004     9.897998e+01 -2.240500e+02\n5 14004     1.635700e+02 -2.592999e+01\n8 14004     -3.675200e+02 3.060300e+02\n11 14004     -7.859998e+01 -1.678000e+02\n14 14004     7.381000e+01 -1.192000e+02\n2 14005     -6.666998e+01 4.020700e+02\n3 14005     -2.075500e+02 6.620001e+01\n4 14005     7.769000e+01 -5.433600e+02\n6 14005     -2.119700e+02 7.394800e+02\n8 14005     2.551001e+01 3.152300e+02\n9 14005     -2.135200e+02 4.221000e+02\n13 14005     3.984200e+02 2.962400e+02\n14 14005     5.667000e+02 -9.126001e+01\n2 14006     -6.666998e+01 4.020700e+02\n6 14006     -2.119700e+02 7.394800e+02\n9 14006     -2.135200e+02 4.221000e+02\n2 14007     -2.929100e+02 3.997300e+02\n3 14007     -4.213000e+02 6.628003e+01\n8 14007     -1.621300e+02 3.089200e+02\n11 14007     1.487000e+02 -1.583200e+02\n2 14008     -5.794300e+02 3.985200e+02\n3 14008     -7.001100e+02 7.165997e+01\n4 14008     9.772998e+01 -2.037500e+02\n5 14008     1.280100e+02 -3.250000e+01\n12 14008     -6.537700e+02 6.104400e+02\n13 14008     -3.915002e+01 2.533500e+02\n14 14008     3.934998e+01 -1.256900e+02\n2 14009     -3.714100e+02 3.995300e+02\n5 14009     3.339500e+02 -2.363000e+01\n11 14009     7.501001e+01 -1.626200e+02\n2 14010     -3.039500e+02 3.983500e+02\n3 14010     -4.317900e+02 6.510999e+01\n4 14010     8.628998e+01 -3.678700e+02\n5 14010     4.048500e+02 -2.177002e+01\n6 14010     -5.066500e+02 6.821300e+02\n11 14010     1.388400e+02 -1.594800e+02\n2 14011     -1.372100e+02 3.968100e+02\n4 14011     7.728003e+01 -4.866600e+02\n5 14011     5.873900e+02 -1.673999e+01\n6 14011     -2.991500e+02 7.157100e+02\n8 14011     -3.334003e+01 3.089400e+02\n9 14011     -2.734300e+02 4.158200e+02\n2 14012     -1.144400e+02 3.970500e+02\n3 14012     -2.512600e+02 6.159003e+01\n4 14012     7.675000e+01 -5.044000e+02\n5 14012     6.133700e+02 -1.465997e+01\n6 14012     -2.708500e+02 7.226100e+02\n8 14012     -1.440997e+01 3.102200e+02\n13 14012     3.536899e+02 2.877900e+02\n14 14012     5.125800e+02 -1.000800e+02\n2 14013     -3.108200e+02 3.944700e+02\n3 14013     -4.386300e+02 6.121997e+01\n6 14013     -5.146200e+02 6.768700e+02\n2 14014     -3.108200e+02 3.944700e+02\n3 14014     -4.386300e+02 6.121997e+01\n4 14014     8.469000e+01 -3.626600e+02\n5 14014     3.970500e+02 -2.560999e+01\n6 14014     -5.146200e+02 6.768700e+02\n8 14014     -1.770000e+02 3.042800e+02\n11 14014     1.313500e+02 -1.639200e+02\n13 14014     1.793500e+02 2.697100e+02\n14 14014     3.019900e+02 -1.152700e+02\n2 14015     -5.452100e+02 3.928500e+02\n4 14015     9.389001e+01 -2.218800e+02\n5 14015     1.604500e+02 -3.508002e+01\n8 14015     -3.690700e+02 2.987300e+02\n11 14015     -8.001001e+01 -1.750200e+02\n14 14015     7.188000e+01 -1.281500e+02\n2 14016     -2.160800e+02 3.903400e+02\n3 14016     -3.484800e+02 5.634003e+01\n5 14016     4.978800e+02 -2.684003e+01\n6 14016     -3.970600e+02 6.902300e+02\n8 14016     -9.859000e+01 3.028800e+02\n9 14016     -3.405900e+02 4.076500e+02\n11 14016     2.233100e+02 -1.621000e+02\n2 14017     -1.212200e+02 3.899000e+02\n4 14017     7.334998e+01 -4.977100e+02\n5 14017     6.045000e+02 -2.175000e+01\n6 14017     -2.794500e+02 7.127000e+02\n8 14017     -2.009003e+01 3.048400e+02\n2 14018     -1.212200e+02 3.899000e+02\n4 14018     7.334998e+01 -4.977100e+02\n5 14018     6.045000e+02 -2.175000e+01\n6 14018     -2.794500e+02 7.127000e+02\n8 14018     -2.009003e+01 3.048400e+02\n2 14019     -3.410600e+02 3.861500e+02\n5 14019     3.639700e+02 -3.571002e+01\n6 14019     -5.515600e+02 6.577900e+02\n8 14019     -2.013700e+02 2.972700e+02\n11 14019     1.020000e+02 -1.719100e+02\n2 14020     -8.235000e+02 3.855100e+02\n4 14020     1.011200e+02 -8.301001e+01\n8 14020     -5.946400e+02 2.848500e+02\n2 14021     -8.235000e+02 3.855100e+02\n4 14021     1.011200e+02 -8.301001e+01\n5 14021     -9.033002e+01 -4.996002e+01\n8 14021     -5.946400e+02 2.848500e+02\n2 14022     5.202002e+01 3.853500e+02\n8 14022     1.233700e+02 3.036500e+02\n9 14022     -1.123000e+02 4.105100e+02\n2 14023     5.202002e+01 3.853500e+02\n5 14023     8.109100e+02 -1.744000e+01\n6 14023     -6.301001e+01 7.442400e+02\n8 14023     1.233700e+02 3.036500e+02\n9 14023     -1.123000e+02 4.105100e+02\n2 14024     -3.553200e+02 3.838700e+02\n11 14024     8.956000e+01 -1.741700e+02\n2 14025     -1.770100e+02 3.842500e+02\n3 14025     -3.109500e+02 4.926001e+01\n4 14025     7.296002e+01 -4.549900e+02\n5 14025     5.415601e+02 -2.934003e+01\n6 14025     -3.478600e+02 6.935800e+02\n8 14025     -6.594000e+01 2.994900e+02\n2 14026     -1.770100e+02 3.842500e+02\n3 14026     -3.109500e+02 4.926001e+01\n4 14026     7.296002e+01 -4.549900e+02\n5 14026     5.415601e+02 -2.934003e+01\n8 14026     -6.594000e+01 2.994900e+02\n9 14026     -3.066100e+02 4.036500e+02\n11 14026     2.637600e+02 -1.623900e+02\n2 14027     1.285000e+02 3.812300e+02\n3 14027     -2.391998e+01 4.700000e+01\n6 14027     3.533002e+01 7.586900e+02\n8 14027     1.874000e+02 3.020300e+02\n9 14027     -4.739001e+01 4.096000e+02\n13 14027     5.878900e+02 2.969800e+02\n14 14027     7.990400e+02 -9.546002e+01\n2 14028     -8.247700e+02 3.799200e+02\n4 14028     9.890002e+01 -8.173999e+01\n5 14028     -9.316998e+01 -5.463000e+01\n11 14028     -3.017400e+02 -1.935900e+02\n13 14028     -2.198100e+02 2.237300e+02\n2 14029     -5.406100e+02 3.801900e+02\n4 14029     8.745001e+01 -2.233400e+02\n5 14029     1.639800e+02 -4.737000e+01\n8 14029     -3.649700e+02 2.871400e+02\n11 14029     -7.678998e+01 -1.849600e+02\n12 14029     -6.055300e+02 5.967100e+02\n13 14029     -8.919983e+00 2.421100e+02\n14 14029     7.491998e+01 -1.399600e+02\n2 14030     5.853700e+02 3.800400e+02\n7 14030     5.348500e+02 5.448500e+02\n9 14030     3.553900e+02 4.224300e+02\n2 14031     -5.492400e+02 3.779000e+02\n3 14031     -6.703500e+02 5.053998e+01\n4 14031     8.734998e+01 -2.183100e+02\n5 14031     1.553100e+02 -4.846997e+01\n8 14031     -3.723300e+02 2.866700e+02\n12 14031     -6.160400e+02 5.940000e+02\n14 14031     6.683002e+01 -1.410900e+02\n2 14032     1.150100e+02 3.779600e+02\n6 14032     1.820001e+01 7.517900e+02\n9 14032     -5.873999e+01 4.062100e+02\n2 14033     -1.880005e+00 3.760600e+02\n3 14033     -1.464500e+02 4.109003e+01\n5 14033     7.442600e+02 -2.929999e+01\n6 14033     -1.292900e+02 7.221300e+02\n8 14033     7.914001e+01 2.958700e+02\n9 14033     -1.573500e+02 4.012000e+02\n11 14033     4.478900e+02 -1.567300e+02\n13 14033     4.579900e+02 2.804900e+02\n14 14033     6.400800e+02 -1.117900e+02\n2 14034     -1.113700e+02 3.731900e+02\n6 14034     -2.658900e+02 6.946600e+02\n8 14034     -1.129999e+01 2.917100e+02\n2 14035     -1.006400e+02 3.725100e+02\n5 14035     6.265900e+02 -3.707001e+01\n2 14036     -1.006400e+02 3.725100e+02\n5 14036     6.265900e+02 -3.707001e+01\n13 14036     3.651600e+02 2.720900e+02\n2 14037     -7.965800e+02 3.699900e+02\n4 14037     9.387000e+01 -9.371997e+01\n8 14037     -5.732500e+02 2.740500e+02\n11 14037     -2.822900e+02 -1.990700e+02\n2 14038     -3.204900e+02 3.686000e+02\n5 14038     3.845800e+02 -5.053003e+01\n12 14038     -3.471700e+02 6.187500e+02\n2 14039     -2.601800e+02 3.694200e+02\n4 14039     6.928003e+01 -3.936900e+02\n6 14039     -4.500500e+02 6.564600e+02\n8 14039     -1.349300e+02 2.849200e+02\n11 14039     1.801300e+02 -1.790200e+02\n13 14039     2.222000e+02 2.545600e+02\n14 14039     3.534399e+02 -1.346900e+02\n2 14040     2.077002e+01 3.681600e+02\n3 14040     -1.250600e+02 3.290997e+01\n13 14040     4.795000e+02 2.767900e+02\n14 14040     6.667400e+02 -1.170400e+02\n2 14041     2.077002e+01 3.681600e+02\n3 14041     -1.250600e+02 3.290997e+01\n6 14041     -1.014500e+02 7.188800e+02\n9 14041     -1.383000e+02 3.948800e+02\n13 14041     4.795000e+02 2.767900e+02\n2 14042     2.077002e+01 3.681600e+02\n3 14042     -1.250600e+02 3.290997e+01\n9 14042     -1.383000e+02 3.948800e+02\n13 14042     4.795000e+02 2.767900e+02\n14 14042     6.667400e+02 -1.170400e+02\n2 14043     5.837000e+01 3.684900e+02\n6 14043     -5.346997e+01 7.262400e+02\n8 14043     1.294400e+02 2.904600e+02\n9 14043     -1.060000e+02 3.959900e+02\n11 14043     5.146200e+02 -1.585500e+02\n13 14043     5.161500e+02 2.794900e+02\n14 14043     7.113900e+02 -1.147400e+02\n2 14044     -7.727500e+02 3.651900e+02\n4 14044     9.159998e+01 -1.041700e+02\n2 14045     -2.527200e+02 3.642400e+02\n3 14045     -3.844800e+02 3.134003e+01\n4 14045     6.590997e+01 -3.984600e+02\n5 14045     4.568101e+02 -5.197998e+01\n8 14045     -1.282700e+02 2.810300e+02\n11 14045     1.880900e+02 -1.827400e+02\n14 14045     3.613400e+02 -1.393800e+02\n2 14046     6.501300e+02 3.642300e+02\n9 14046     4.112400e+02 4.108100e+02\n12 14046     6.758600e+02 5.551500e+02\n2 14047     -9.528998e+01 3.596400e+02\n4 14047     5.498999e+01 -5.136300e+02\n5 14047     6.314500e+02 -4.976001e+01\n6 14047     -2.454500e+02 6.820100e+02\n8 14047     1.640015e+00 2.814800e+02\n14 14047     5.317100e+02 -1.340600e+02\n2 14048     -2.842500e+02 3.588400e+02\n4 14048     6.445001e+01 -3.754700e+02\n5 14048     4.209700e+02 -5.878003e+01\n6 14048     -4.795200e+02 6.381300e+02\n8 14048     -1.548500e+02 2.768700e+02\n11 14048     1.561700e+02 -1.888400e+02\n12 14048     -3.040400e+02 6.133200e+02\n13 14048     2.009700e+02 2.449200e+02\n2 14049     9.572998e+01 3.595000e+02\n3 14049     -5.585999e+01 2.415997e+01\n6 14049     -5.580017e+00 7.243900e+02\n8 14049     1.605000e+02 2.843600e+02\n9 14049     -7.489001e+01 3.892200e+02\n11 14049     5.575300e+02 -1.629800e+02\n13 14049     5.530100e+02 2.752300e+02\n14 14049     7.569900e+02 -1.207900e+02\n2 14050     1.465400e+02 3.581000e+02\n6 14050     5.879999e+01 7.337000e+02\n9 14050     -3.137000e+01 3.896300e+02\n2 14051     8.483002e+01 3.568600e+02\n3 14051     -6.459998e+01 2.194000e+01\n9 14051     -8.309998e+01 3.873100e+02\n11 14051     5.453600e+02 -1.657700e+02\n13 14051     5.419000e+02 2.722000e+02\n14 14051     7.435500e+02 -1.240600e+02\n2 14052     1.370100e+02 3.557500e+02\n6 14052     4.653003e+01 7.290100e+02\n2 14053     -3.924300e+02 3.548200e+02\n3 14053     -5.179200e+02 2.387000e+01\n4 14053     6.856000e+01 -3.067700e+02\n5 14053     3.088199e+02 -6.489001e+01\n11 14053     5.463000e+01 -1.965700e+02\n12 14053     -4.304300e+02 5.933300e+02\n2 14054     -2.514300e+02 3.551500e+02\n3 14054     -3.823800e+02 2.204999e+01\n4 14054     6.098999e+01 -3.978800e+02\n5 14054     4.567500e+02 -6.012000e+01\n6 14054     -4.380500e+02 6.414400e+02\n8 14054     -1.276100e+02 2.741900e+02\n11 14054     1.887900e+02 -1.898200e+02\n12 14054     -2.643800e+02 6.148300e+02\n13 14054     2.291300e+02 2.443000e+02\n14 14054     3.617800e+02 -1.471700e+02\n2 14055     -2.588000e+02 3.528600e+02\n4 14055     6.022998e+01 -3.928300e+02\n8 14055     -1.336600e+02 2.721900e+02\n11 14055     1.826300e+02 -1.916300e+02\n13 14055     2.229500e+02 2.416100e+02\n2 14056     1.137900e+02 3.521100e+02\n13 14056     5.709900e+02 2.711600e+02\n2 14057     1.137900e+02 3.521100e+02\n6 14057     1.696002e+01 7.192400e+02\n8 14057     1.753200e+02 2.785500e+02\n9 14057     -5.915997e+01 3.830000e+02\n14 14057     7.790500e+02 -1.269600e+02\n2 14058     4.182001e+01 3.492300e+02\n3 14058     -1.055800e+02 1.417999e+01\n5 14058     7.947300e+02 -5.396997e+01\n6 14058     -7.400000e+01 7.003000e+02\n8 14058     1.156600e+02 2.750900e+02\n9 14058     -1.195600e+02 3.787800e+02\n11 14058     4.953101e+02 -1.755600e+02\n13 14058     4.982500e+02 2.620700e+02\n14 14058     6.900699e+02 -1.350900e+02\n2 14059     3.072998e+01 3.471500e+02\n5 14059     7.733700e+02 -5.789001e+01\n8 14059     1.015400e+02 2.718200e+02\n11 14059     4.768500e+02 -1.790700e+02\n2 14060     -9.309998e+00 3.444400e+02\n3 14060     -1.530500e+02 9.489990e+00\n4 14060     4.079999e+01 -5.829200e+02\n5 14060     7.318700e+02 -6.127002e+01\n6 14060     -1.381300e+02 6.832800e+02\n8 14060     7.334998e+01 2.704200e+02\n9 14060     -1.617900e+02 3.733700e+02\n11 14060     4.399600e+02 -1.834300e+02\n2 14061     5.795000e+02 3.433800e+02\n7 14061     5.261600e+02 5.093900e+02\n9 14061     3.524100e+02 3.909300e+02\n10 14061     7.219800e+02 5.964500e+02\n2 14062     5.795000e+02 3.433800e+02\n7 14062     5.261600e+02 5.093900e+02\n9 14062     3.524100e+02 3.909300e+02\n10 14062     7.219800e+02 5.964500e+02\n2 14063     -7.644800e+02 3.394700e+02\n5 14063     -4.582001e+01 -8.627002e+01\n8 14063     -5.471700e+02 2.504300e+02\n11 14063     -2.597000e+02 -2.184500e+02\n2 14064     3.854000e+02 3.368500e+02\n7 14064     3.809800e+02 5.687000e+02\n8 14064     3.825300e+02 2.528100e+02\n9 14064     1.839301e+02 3.790000e+02\n13 14064     7.489100e+02 1.513000e+02\n2 14065     -2.312700e+02 3.220000e+02\n5 14065     4.754900e+02 -9.078003e+01\n2 14066     -2.339100e+02 3.167000e+02\n5 14066     4.710300e+02 -9.626001e+01\n8 14066     -1.143700e+02 2.441100e+02\n12 14066     -2.427200e+02 5.766100e+02\n14 14066     3.758101e+02 -1.832100e+02\n2 14067     -4.106000e+01 3.165400e+02\n9 14067     -1.882600e+02 3.482400e+02\n11 14067     4.043700e+02 -2.075200e+02\n13 14067     4.170000e+02 2.299900e+02\n2 14068     3.056400e+02 3.163100e+02\n3 14068     1.634500e+02 -1.210999e+01\n7 14068     3.093900e+02 5.652800e+02\n8 14068     3.181800e+02 2.381300e+02\n9 14068     1.155600e+02 3.594400e+02\n12 14068     3.215601e+02 5.572100e+02\n13 14068     6.792300e+02 1.494700e+02\n2 14069     -3.913900e+02 3.125700e+02\n5 14069     3.058900e+02 -1.027600e+02\n2 14070     -8.851001e+01 3.109200e+02\n8 14070     7.140015e+00 2.430800e+02\n9 14070     -2.286200e+02 3.419100e+02\n13 14070     3.725300e+02 2.223100e+02\n14 14070     5.367100e+02 -1.791100e+02\n2 14071     -4.035000e+02 3.105000e+02\n3 14071     -5.296800e+02 -1.970001e+01\n8 14071     -2.520900e+02 2.356300e+02\n2 14072     -1.007200e+02 3.088800e+02\n8 14072     -2.859985e+00 2.438700e+02\n11 14072     3.397200e+02 -2.179200e+02\n2 14073     -5.263000e+01 3.042000e+02\n3 14073     -1.939900e+02 -2.827002e+01\n8 14073     3.703003e+01 2.371300e+02\n9 14073     -1.976100e+02 3.373600e+02\n2 14074     -5.795001e+01 3.016300e+02\n3 14074     -1.983600e+02 -3.188000e+01\n8 14074     3.150000e+01 2.346400e+02\n9 14074     -2.014300e+02 3.341400e+02\n2 14075     -8.236900e+02 2.937200e+02\n8 14075     -5.948500e+02 2.130900e+02\n2 14076     -3.171100e+02 2.938500e+02\n3 14076     -4.460200e+02 -3.783002e+01\n5 14076     3.808199e+02 -1.184900e+02\n6 14076     -5.130700e+02 5.557300e+02\n8 14076     -1.815600e+02 2.244700e+02\n2 14077     -3.262000e+02 2.919000e+02\n6 14077     -5.243300e+02 5.509100e+02\n2 14078     -4.431700e+02 2.826100e+02\n7 14078     -3.871100e+02 5.715800e+02\n2 14079     3.709900e+02 2.821100e+02\n7 14079     3.636000e+02 5.190100e+02\n9 14079     1.720100e+02 3.322600e+02\n12 14079     3.897800e+02 5.128000e+02\n2 14080     3.494301e+02 2.773700e+02\n3 14080     2.071100e+02 -4.833002e+01\n6 14080     2.638200e+02 5.161700e+02\n8 14080     3.530700e+02 2.047400e+02\n9 14080     1.542400e+02 3.271700e+02\n11 14080     6.620100e+02 -3.578600e+02\n12 14080     3.672200e+02 5.090300e+02\n2 14081     -4.055500e+02 2.761900e+02\n4 14081     3.081000e+01 -2.906100e+02\n5 14081     2.878900e+02 -1.364800e+02\n2 14082     4.769301e+02 2.736400e+02\n7 14082     4.248000e+02 4.627400e+02\n9 14082     2.653300e+02 3.287000e+02\n2 14083     3.160000e+02 2.711500e+02\n8 14083     3.262200e+02 2.013900e+02\n12 14083     3.322900e+02 5.065500e+02\n2 14084     -6.161700e+02 2.696100e+02\n5 14084     8.133002e+01 -1.429100e+02\n7 14084     -5.617700e+02 5.409000e+02\n2 14085     3.938600e+02 2.689200e+02\n3 14085     2.503000e+02 -5.482001e+01\n6 14085     3.135400e+02 5.007300e+02\n8 14085     3.891100e+02 1.973700e+02\n9 14085     1.922300e+02 3.215000e+02\n2 14086     4.314600e+02 2.648000e+02\n6 14086     3.442000e+02 4.598500e+02\n8 14086     4.155900e+02 1.898500e+02\n9 14086     2.273101e+02 3.197600e+02\n2 14087     -8.859003e+01 2.629100e+02\n3 14087     -2.270800e+02 -6.940997e+01\n5 14087     6.279600e+02 -1.462800e+02\n8 14087     9.020020e+00 2.048500e+02\n9 14087     -2.241100e+02 3.005700e+02\n2 14088     -1.777300e+02 2.613000e+02\n4 14088     6.450012e+00 -4.372300e+02\n5 14088     5.272900e+02 -1.485600e+02\n9 14088     -3.031100e+02 2.948800e+02\n2 14089     -8.033002e+01 2.599200e+02\n6 14089     -2.221700e+02 5.664300e+02\n12 14089     -5.573999e+01 5.384900e+02\n2 14090     -1.094600e+02 2.582800e+02\n3 14090     -2.491900e+02 -7.515002e+01\n8 14090     -1.087000e+01 1.992900e+02\n2 14091     -7.249300e+02 2.566100e+02\n5 14091     -1.944000e+01 -1.543600e+02\n2 14092     -7.249300e+02 2.566100e+02\n4 14092     4.214001e+01 -1.174400e+02\n5 14092     -1.944000e+01 -1.543600e+02\n2 14093     -7.249300e+02 2.566100e+02\n4 14093     4.214001e+01 -1.174400e+02\n5 14093     -1.944000e+01 -1.543600e+02\n13 14093     -1.521500e+02 1.455500e+02\n2 14094     3.904500e+02 2.570900e+02\n3 14094     2.474200e+02 -6.653003e+01\n6 14094     3.092900e+02 4.877100e+02\n8 14094     3.862300e+02 1.888000e+02\n2 14095     -5.919000e+02 2.534200e+02\n4 14095     3.278003e+01 -1.840600e+02\n5 14095     1.031600e+02 -1.568000e+02\n8 14095     -4.061500e+02 1.872300e+02\n2 14096     -5.919000e+02 2.534200e+02\n4 14096     3.278003e+01 -1.840600e+02\n5 14096     1.031600e+02 -1.568000e+02\n2 14097     -1.073100e+02 2.529800e+02\n6 14097     -2.549800e+02 5.527700e+02\n8 14097     -8.510010e+00 1.960800e+02\n12 14097     -8.802002e+01 5.274600e+02\n2 14098     -4.350600e+02 2.523200e+02\n3 14098     -5.627700e+02 -7.827002e+01\n4 14098     2.197998e+01 -2.707800e+02\n5 14098     2.565100e+02 -1.568700e+02\n8 14098     -2.777000e+02 1.899700e+02\n2 14099     -4.350600e+02 2.523200e+02\n3 14099     -5.627700e+02 -7.827002e+01\n4 14099     2.197998e+01 -2.707800e+02\n5 14099     2.565100e+02 -1.568700e+02\n8 14099     -2.777000e+02 1.899700e+02\n2 14100     -1.702700e+02 2.505800e+02\n3 14100     -3.068700e+02 -8.375000e+01\n5 14100     5.312100e+02 -1.615500e+02\n7 14100     -1.002200e+02 5.687000e+02\n8 14100     -6.110999e+01 1.920100e+02\n12 14100     -1.663400e+02 5.130600e+02\n2 14101     -4.459003e+01 2.509400e+02\n5 14101     6.789301e+02 -1.539900e+02\n14 14101     5.822600e+02 -2.347600e+02\n2 14102     3.385999e+01 2.467500e+02\n6 14102     -8.187000e+01 5.746500e+02\n8 14102     1.085900e+02 1.925900e+02\n9 14102     -1.227700e+02 2.892600e+02\n14 14102     6.741500e+02 -2.360700e+02\n2 14103     7.295699e+02 2.460700e+02\n7 14103     6.494600e+02 3.790500e+02\n9 14103     4.797400e+02 3.129900e+02\n2 14104     2.609900e+02 2.455800e+02\n7 14104     2.672300e+02 5.062200e+02\n2 14105     -3.835100e+02 2.439600e+02\n4 14105     1.359998e+01 -2.998500e+02\n7 14105     -3.220600e+02 5.433000e+02\n8 14105     -2.358600e+02 1.830800e+02\n12 14105     -4.099400e+02 4.779000e+02\n13 14105     1.120100e+02 1.527900e+02\n14 14105     2.181300e+02 -2.530500e+02\n2 14106     -4.501001e+01 2.406900e+02\n3 14106     -1.872300e+02 -9.114001e+01\n5 14106     6.773000e+02 -1.650000e+02\n6 14106     -1.784900e+02 5.508600e+02\n7 14106     3.775000e+01 5.753200e+02\n13 14106     4.072900e+02 1.695000e+02\n14 14106     5.811200e+02 -2.445500e+02\n2 14107     -4.501001e+01 2.406900e+02\n3 14107     -1.872300e+02 -9.114001e+01\n5 14107     6.773000e+02 -1.650000e+02\n6 14107     -1.784900e+02 5.508600e+02\n7 14107     3.775000e+01 5.753200e+02\n8 14107     4.319000e+01 1.869300e+02\n9 14107     -1.888700e+02 2.816000e+02\n11 14107     3.976801e+02 -2.698100e+02\n13 14107     4.072900e+02 1.695000e+02\n14 14107     5.811200e+02 -2.445500e+02\n2 14108     -3.657300e+02 2.401100e+02\n6 14108     -5.675500e+02 4.822800e+02\n8 14108     -2.210100e+02 1.812100e+02\n13 14108     1.269600e+02 1.512100e+02\n2 14109     -3.657300e+02 2.401100e+02\n4 14109     1.035999e+01 -3.104900e+02\n5 14109     3.249100e+02 -1.684800e+02\n6 14109     -5.675500e+02 4.822800e+02\n7 14109     -3.036200e+02 5.422100e+02\n8 14109     -2.210100e+02 1.812100e+02\n11 14109     7.596997e+01 -2.803400e+02\n12 14109     -3.890400e+02 4.766300e+02\n13 14109     1.269600e+02 1.512100e+02\n2 14110     -3.657300e+02 2.401100e+02\n3 14110     -4.942800e+02 -8.946002e+01\n5 14110     3.249100e+02 -1.684800e+02\n6 14110     -5.675500e+02 4.822800e+02\n7 14110     -3.036200e+02 5.422100e+02\n8 14110     -2.210100e+02 1.812100e+02\n11 14110     7.596997e+01 -2.803400e+02\n13 14110     1.269600e+02 1.512100e+02\n2 14111     -2.747600e+02 2.381800e+02\n4 14111     2.049988e+00 -3.676400e+02\n8 14111     -1.467900e+02 1.807600e+02\n2 14112     2.998700e+02 2.370500e+02\n7 14112     2.993500e+02 4.905400e+02\n9 14112     1.123900e+02 2.908500e+02\n13 14112     6.660800e+02 8.579001e+01\n2 14113     -7.346002e+01 2.355200e+02\n5 14113     6.437200e+02 -1.695100e+02\n6 14113     -2.130000e+02 5.397300e+02\n7 14113     6.719971e+00 5.678800e+02\n8 14113     1.983002e+01 1.825900e+02\n9 14113     -2.126500e+02 2.762900e+02\n11 14113     3.667100e+02 -2.749600e+02\n12 14113     -4.729999e+01 5.134700e+02\n13 14113     3.805300e+02 1.636700e+02\n14 14113     5.486300e+02 -2.505000e+02\n2 14114     -1.228200e+02 2.324800e+02\n5 14114     5.879700e+02 -1.744000e+02\n6 14114     -2.718000e+02 5.254700e+02\n2 14115     4.412000e+02 2.306800e+02\n6 14115     3.539800e+02 4.212700e+02\n8 14115     4.233800e+02 1.622700e+02\n9 14115     2.364301e+02 2.915700e+02\n13 14115     7.640800e+02 2.909998e+01\n2 14116     4.412000e+02 2.306800e+02\n6 14116     3.539800e+02 4.212700e+02\n9 14116     2.364301e+02 2.915700e+02\n2 14117     -5.097998e+01 2.273200e+02\n7 14117     3.065997e+01 5.618600e+02\n9 14117     -1.935300e+02 2.692800e+02\n11 14117     3.901400e+02 -2.809900e+02\n13 14117     4.006200e+02 1.581300e+02\n14 14117     5.731600e+02 -2.579300e+02\n2 14118     7.371200e+02 2.209600e+02\n7 14118     6.513700e+02 3.530200e+02\n9 14118     4.860900e+02 2.923000e+02\n2 14119     -1.691900e+02 2.201600e+02\n3 14119     -3.053000e+02 -1.114600e+02\n5 14119     5.318400e+02 -1.858100e+02\n8 14119     -5.978003e+01 1.688900e+02\n12 14119     -1.604000e+02 4.837600e+02\n13 14119     2.929900e+02 1.460700e+02\n14 14119     4.401000e+02 -2.688700e+02\n2 14120     -5.875400e+02 2.160800e+02\n4 14120     1.659998e+01 -1.829000e+02\n5 14120     1.036300e+02 -1.883100e+02\n7 14120     -5.274900e+02 4.973800e+02\n8 14120     -4.023500e+02 1.579600e+02\n11 14120     -1.223600e+02 -2.988200e+02\n2 14121     4.413900e+02 2.126100e+02\n7 14121     3.880699e+02 4.140900e+02\n8 14121     4.229000e+02 1.470500e+02\n12 14121     4.409399e+02 4.073700e+02\n2 14122     -3.570001e+01 2.106800e+02\n6 14122     -1.649200e+02 5.177900e+02\n7 14122     4.772998e+01 5.481600e+02\n8 14122     5.248999e+01 1.627200e+02\n9 14122     -1.798300e+02 2.550900e+02\n12 14122     1.300049e-01 4.915400e+02\n2 14123     -1.695300e+02 2.104000e+02\n5 14123     5.302600e+02 -1.953200e+02\n7 14123     -9.759003e+01 5.356200e+02\n8 14123     -6.012000e+01 1.613800e+02\n12 14123     -1.605100e+02 4.739800e+02\n2 14124     -1.822000e+02 2.072100e+02\n3 14124     -3.193300e+02 -1.259100e+02\n4 14124     -2.145001e+01 -4.268900e+02\n5 14124     5.166100e+02 -1.984800e+02\n6 14124     -3.444900e+02 4.830500e+02\n7 14124     -1.107600e+02 5.308000e+02\n8 14124     -7.023999e+01 1.579000e+02\n12 14124     -1.740700e+02 4.690100e+02\n2 14125     -2.400000e+02 2.061300e+02\n7 14125     -1.714100e+02 5.252600e+02\n12 14125     -2.411200e+02 4.604500e+02\n13 14125     2.306000e+02 1.326900e+02\n14 14125     3.633300e+02 -2.828400e+02\n2 14126     -7.437000e+01 2.052200e+02\n5 14126     6.387300e+02 -1.992400e+02\n6 14126     -2.130900e+02 5.042800e+02\n7 14126     5.530029e+00 5.397700e+02\n11 14126     3.655900e+02 -2.995100e+02\n12 14126     -4.742999e+01 4.817200e+02\n14 14126     5.450699e+02 -2.797400e+02\n2 14127     3.187500e+02 2.035600e+02\n8 14127     3.276200e+02 1.464200e+02\n2 14128     3.187500e+02 2.035600e+02\n8 14128     3.276200e+02 1.464200e+02\n9 14128     1.290900e+02 2.635100e+02\n10 14128     4.773300e+02 5.613200e+02\n2 14129     3.273700e+02 2.018800e+02\n12 14129     3.429700e+02 4.307100e+02\n2 14130     -5.915002e+01 2.007100e+02\n5 14130     6.564200e+02 -2.036200e+02\n7 14130     2.206000e+01 5.371500e+02\n8 14130     3.144000e+01 1.548600e+02\n12 14130     -2.875000e+01 4.789100e+02\n13 14130     3.914399e+02 1.373700e+02\n14 14130     5.624000e+02 -2.836700e+02\n2 14131     3.572900e+02 1.956900e+02\n3 14131     2.174600e+02 -1.266000e+02\n8 14131     3.585200e+02 1.388700e+02\n9 14131     1.635300e+02 2.575500e+02\n10 14131     5.135000e+02 5.397800e+02\n2 14132     -2.792300e+02 1.893500e+02\n6 14132     -4.596400e+02 4.421400e+02\n7 14132     -2.120400e+02 5.056100e+02\n11 14132     1.562000e+02 -3.169600e+02\n2 14133     -1.879400e+02 1.888900e+02\n13 14133     2.755200e+02 1.224000e+02\n2 14134     -2.728200e+02 1.882500e+02\n3 14134     -4.059200e+02 -1.432400e+02\n4 14134     -2.245001e+01 -3.629300e+02\n5 14134     4.161801e+02 -2.157100e+02\n6 14134     -4.515500e+02 4.430900e+02\n7 14134     -2.059100e+02 5.055400e+02\n8 14134     -1.449200e+02 1.419000e+02\n9 14134     -3.803300e+02 2.282500e+02\n12 14134     -2.787600e+02 4.370100e+02\n13 14134     2.016400e+02 1.172200e+02\n14 14134     3.270500e+02 -3.008300e+02\n2 14135     -2.728200e+02 1.882500e+02\n4 14135     -2.245001e+01 -3.629300e+02\n5 14135     4.161801e+02 -2.157100e+02\n6 14135     -4.515500e+02 4.430900e+02\n7 14135     -2.059100e+02 5.055400e+02\n8 14135     -1.449200e+02 1.419000e+02\n9 14135     -3.803300e+02 2.282500e+02\n13 14135     2.016400e+02 1.172200e+02\n14 14135     3.270500e+02 -3.008300e+02\n2 14136     6.209399e+02 1.816100e+02\n6 14136     5.515800e+02 3.415600e+02\n7 14136     5.418300e+02 3.442300e+02\n8 14136     5.709600e+02 1.167200e+02\n9 14136     3.895000e+02 2.557500e+02\n10 14136     7.251899e+02 3.906500e+02\n12 14136     6.315000e+02 3.520100e+02\n2 14137     -4.289500e+02 1.798700e+02\n4 14137     -1.304999e+01 -2.665500e+02\n11 14137     1.544000e+01 -3.255200e+02\n2 14138     -2.809600e+02 1.798700e+02\n6 14138     -4.602200e+02 4.323500e+02\n2 14139     6.463700e+02 1.782400e+02\n3 14139     5.017000e+02 -1.322700e+02\n6 14139     5.793300e+02 3.346700e+02\n7 14139     5.638300e+02 3.345000e+02\n8 14139     5.919700e+02 1.134000e+02\n9 14139     4.109000e+02 2.534700e+02\n10 14139     7.510699e+02 3.762000e+02\n12 14139     6.583199e+02 3.454500e+02\n2 14140     3.540900e+02 1.716800e+02\n7 14140     3.397200e+02 4.195100e+02\n8 14140     3.560400e+02 1.201700e+02\n10 14140     5.062800e+02 5.135600e+02\n12 14140     3.698700e+02 3.954500e+02\n13 14140     7.041600e+02 2.196997e+01\n2 14141     7.546500e+02 1.656100e+02\n9 14141     5.014399e+02 2.461500e+02\n2 14142     -5.627900e+02 1.635700e+02\n8 14142     -3.825600e+02 1.164700e+02\n2 14143     3.671500e+02 1.632000e+02\n6 14143     2.809000e+02 3.855900e+02\n12 14143     3.834600e+02 3.838800e+02\n13 14143     7.138300e+02 1.272998e+01\n2 14144     -5.276300e+02 1.616500e+02\n7 14144     -4.630900e+02 4.567900e+02\n2 14145     -4.135700e+02 1.545900e+02\n4 14145     -2.588000e+01 -2.728000e+02\n7 14145     -3.482500e+02 4.625600e+02\n10 14145     -2.975200e+02 6.187100e+02\n11 14145     2.828998e+01 -3.436200e+02\n2 14146     -4.135700e+02 1.545900e+02\n4 14146     -2.588000e+01 -2.728000e+02\n7 14146     -3.482500e+02 4.625600e+02\n10 14146     -2.975200e+02 6.187100e+02\n11 14146     2.828998e+01 -3.436200e+02\n2 14147     6.798800e+02 1.507200e+02\n9 14147     4.396200e+02 2.316900e+02\n10 14147     7.800400e+02 3.322400e+02\n12 14147     6.934700e+02 3.111800e+02\n2 14148     -6.092000e+02 1.502400e+02\n4 14148     -1.179999e+01 -1.654500e+02\n5 14148     7.677002e+01 -2.443100e+02\n7 14148     -5.421300e+02 4.393700e+02\n8 14148     -4.194600e+02 1.054400e+02\n2 14149     1.103500e+02 1.488700e+02\n6 14149     -6.471002e+01 1.815700e+02\n8 14149     1.273800e+02 7.973001e+01\n2 14150     1.103500e+02 1.488700e+02\n3 14150     1.271997e+01 -1.695900e+02\n4 14150     -1.827800e+02 -4.389800e+02\n5 14150     6.503101e+02 -5.106801e+02\n6 14150     -6.471002e+01 1.815700e+02\n8 14150     1.273800e+02 7.973001e+01\n12 14150     -3.334003e+01 2.337400e+02\n13 14150     3.777500e+02 -1.006900e+02\n2 14151     -6.355300e+02 1.431600e+02\n4 14151     -1.297998e+01 -1.513800e+02\n11 14151     -1.651100e+02 -3.504700e+02\n2 14152     -6.355300e+02 1.431600e+02\n4 14152     -1.297998e+01 -1.513800e+02\n5 14152     5.134003e+01 -2.504700e+02\n11 14152     -1.651100e+02 -3.504700e+02\n2 14153     -6.666700e+02 1.412200e+02\n7 14153     -5.973800e+02 4.252700e+02\n11 14153     -1.906600e+02 -3.510500e+02\n2 14154     -6.218800e+02 1.396700e+02\n8 14154     -4.295400e+02 9.706000e+01\n10 14154     -5.439000e+02 5.889200e+02\n12 14154     -6.691300e+02 3.393600e+02\n2 14155     -2.763400e+02 1.399500e+02\n6 14155     -4.526200e+02 3.886800e+02\n7 14155     -2.076000e+02 4.632100e+02\n9 14155     -3.815500e+02 1.858500e+02\n2 14156     6.653000e+02 1.394500e+02\n3 14156     5.221500e+02 -1.686400e+02\n9 14156     4.272100e+02 2.216100e+02\n10 14156     7.608900e+02 3.255200e+02\n12 14156     6.765699e+02 3.005900e+02\n2 14157     3.244301e+02 1.299400e+02\n3 14157     2.169000e+02 -1.824200e+02\n8 14157     3.024400e+02 6.103000e+01\n2 14158     -6.674000e+02 1.295200e+02\n4 14158     -1.587000e+01 -1.342200e+02\n5 14158     1.976001e+01 -2.617200e+02\n7 14158     -5.970600e+02 4.160400e+02\n14 14158     -6.264001e+01 -3.535300e+02\n2 14159     -5.148500e+02 1.268100e+02\n5 14159     1.706500e+02 -2.658900e+02\n8 14159     -3.425100e+02 8.923001e+01\n10 14159     -4.184200e+02 5.837000e+02\n13 14159     2.309998e+00 6.445001e+01\n2 14160     6.458199e+02 1.274000e+02\n3 14160     5.041300e+02 -1.806000e+02\n6 14160     5.762400e+02 2.820700e+02\n8 14160     5.909200e+02 7.314001e+01\n9 14160     4.118600e+02 2.122500e+02\n10 14160     7.385500e+02 3.221200e+02\n2 14161     6.458199e+02 1.274000e+02\n6 14161     5.762400e+02 2.820700e+02\n8 14161     5.909200e+02 7.314001e+01\n9 14161     4.118600e+02 2.122500e+02\n10 14161     7.385500e+02 3.221200e+02\n12 14161     6.553101e+02 2.929900e+02\n2 14162     -2.987600e+02 1.246800e+02\n5 14162     3.822100e+02 -2.749700e+02\n8 14162     -1.661700e+02 9.125000e+01\n12 14162     -3.036400e+02 3.683900e+02\n2 14163     6.758002e+01 1.227000e+02\n8 14163     9.167999e+01 5.872000e+01\n2 14164     6.856400e+02 1.228900e+02\n9 14164     4.448800e+02 2.080900e+02\n10 14164     7.788199e+02 3.000600e+02\n2 14165     -5.518500e+02 1.221200e+02\n4 14165     -2.859998e+01 -1.922800e+02\n5 14165     1.275200e+02 -2.701400e+02\n7 14165     -4.842200e+02 4.209200e+02\n10 14165     -4.612000e+02 5.762600e+02\n11 14165     -9.623999e+01 -3.658700e+02\n12 14165     -5.897800e+02 3.319400e+02\n13 14165     -2.671002e+01 6.012000e+01\n14 14165     4.394000e+01 -3.597500e+02\n2 14166     -2.571500e+02 1.159300e+02\n11 14166     1.755200e+02 -3.724600e+02\n2 14167     1.349400e+02 1.082300e+02\n4 14167     -2.170400e+02 -4.342100e+02\n6 14167     -4.263000e+01 1.224000e+02\n7 14167     -7.287000e+01 2.037500e+02\n2 14168     -1.673400e+02 1.042900e+02\n8 14168     -5.952002e+01 7.573999e+01\n13 14168     2.809600e+02 5.109003e+01\n14 14168     4.256100e+02 -3.872900e+02\n2 14169     6.971000e+02 1.026300e+02\n9 14169     4.553101e+02 1.925600e+02\n12 14169     7.088700e+02 2.558500e+02\n2 14170     -6.466998e+01 1.002900e+02\n13 14170     3.607400e+02 3.665002e+01\n14 14170     5.261000e+02 -4.092800e+02\n2 14171     7.423999e+01 1.004600e+02\n8 14171     9.532001e+01 3.950000e+01\n2 14172     6.481600e+02 9.217999e+01\n6 14172     5.769100e+02 2.423200e+02\n8 14172     5.922700e+02 4.276999e+01\n9 14172     4.143900e+02 1.815900e+02\n10 14172     7.321000e+02 2.814800e+02\n12 14172     6.560200e+02 2.521600e+02\n2 14173     1.628003e+01 8.921002e+01\n4 14173     -1.940900e+02 -3.711100e+02\n5 14173     5.466801e+02 -5.466300e+02\n6 14173     -1.647300e+02 1.178400e+02\n12 14173     -1.320400e+02 1.722400e+02\n2 14174     7.305300e+02 7.819000e+01\n9 14174     4.835300e+02 1.729700e+02\n10 14174     8.149500e+02 2.326700e+02\n12 14174     7.441300e+02 2.252100e+02\n2 14175     -3.973800e+02 7.689001e+01\n7 14175     -3.273800e+02 3.979900e+02\n2 14176     7.940002e+00 7.153998e+01\n3 14176     -8.069000e+01 -2.457600e+02\n5 14176     5.362800e+02 -5.634600e+02\n6 14176     -1.726300e+02 9.739001e+01\n7 14176     -1.686400e+02 1.962300e+02\n8 14176     4.359003e+01 1.742999e+01\n12 14176     -1.410800e+02 1.522400e+02\n13 14176     2.933000e+02 -1.472100e+02\n2 14177     -3.641800e+02 7.106000e+01\n6 14177     -5.514500e+02 2.945100e+02\n7 14177     -2.946200e+02 3.961300e+02\n8 14177     -2.191600e+02 4.897000e+01\n9 14177     -4.533000e+02 1.227900e+02\n11 14177     7.075000e+01 -4.059200e+02\n2 14178     4.056801e+02 7.088000e+01\n3 14178     2.947500e+02 -2.376100e+02\n8 14178     3.699700e+02 1.232999e+01\n2 14179     5.004900e+02 6.876001e+01\n6 14179     4.132900e+02 2.380700e+02\n9 14179     2.902000e+02 1.565600e+02\n10 14179     5.807300e+02 3.154800e+02\n15 14179     7.786700e+02 3.510500e+02\n2 14180     4.164000e+02 6.165997e+01\n3 14180     3.054700e+02 -2.457000e+02\n2 14181     -4.705800e+02 4.354999e+01\n7 14181     -3.981200e+02 3.634800e+02\n15 14181     -3.305900e+02 5.543000e+02\n2 14182     2.133500e+02 4.444000e+01\n13 14182     4.270300e+02 -2.150100e+02\n2 14183     2.133500e+02 4.444000e+01\n13 14183     4.270300e+02 -2.150100e+02\n2 14184     -6.640997e+01 4.182001e+01\n3 14184     -1.620900e+02 -2.780700e+02\n8 14184     -9.840027e+00 2.799988e-01\n9 14184     -1.737100e+02 1.147200e+02\n2 14185     -1.984003e+01 3.894000e+01\n5 14185     5.059399e+02 -5.836200e+02\n6 14185     -2.009900e+02 6.770001e+01\n12 14185     -1.676300e+02 1.227000e+02\n13 14185     2.712900e+02 -1.636900e+02\n2 14186     -4.221900e+02 2.421997e+01\n11 14186     9.809998e+00 -4.417300e+02\n2 14187     5.771600e+02 1.188000e+01\n7 14187     4.844500e+02 2.019200e+02\n9 14187     3.571801e+02 1.117100e+02\n2 14188     2.940000e+02 -1.349976e+00\n13 14188     4.843600e+02 -2.623500e+02\n15 14188     1.278600e+02 7.287000e+01\n2 14189     8.147500e+02 -4.650024e+00\n3 14189     6.755300e+02 -3.011000e+02\n7 14189     6.872500e+02 1.280000e+02\n9 14189     5.544000e+02 1.064800e+02\n2 14190     7.957500e+02 -1.334998e+01\n7 14190     6.696600e+02 1.252200e+02\n9 14190     5.388300e+02 9.882001e+01\n12 14190     8.081200e+02 1.194200e+02\n2 14191     7.411100e+02 -2.427002e+01\n9 14191     4.946200e+02 8.810001e+01\n2 14192     1.266300e+02 -3.481000e+01\n3 14192     4.102002e+01 -3.440800e+02\n4 14192     -2.985100e+02 -3.897400e+02\n6 14192     -5.587000e+01 -4.096997e+01\n8 14192     1.322200e+02 -7.490997e+01\n9 14192     -4.199829e-01 6.090002e+01\n12 14192     -4.342999e+01 1.340002e+01\n2 14193     4.340500e+02 -4.171997e+01\n3 14193     3.282900e+02 -3.429000e+02\n2 14194     5.678800e+02 -4.291998e+01\n8 14194     5.069900e+02 -8.065002e+01\n2 14195     4.445601e+02 -4.685999e+01\n3 14195     3.402200e+02 -3.474600e+02\n9 14195     2.601400e+02 6.244000e+01\n2 14196     7.001400e+02 -4.732001e+01\n7 14196     5.826300e+02 1.204300e+02\n9 14196     4.615100e+02 6.733002e+01\n10 14196     7.537300e+02 1.163000e+02\n12 14196     7.028900e+02 9.902002e+01\n2 14197     1.953800e+02 -4.960999e+01\n3 14197     1.078800e+02 -3.558500e+02\n2 14198     -1.262200e+02 -5.689001e+01\n6 14198     -3.081800e+02 -2.990997e+01\n10 14198     -2.896300e+02 1.631700e+02\n2 14199     6.109200e+02 -5.987000e+01\n7 14199     5.054399e+02 1.335600e+02\n8 14199     5.588500e+02 -7.975000e+01\n9 14199     3.865400e+02 5.382001e+01\n12 14199     6.083400e+02 9.896002e+01\n2 14200     6.314200e+02 -8.240997e+01\n6 14200     5.510300e+02 6.334998e+01\n7 14200     5.206801e+02 1.082800e+02\n8 14200     5.762400e+02 -9.917999e+01\n9 14200     4.053400e+02 3.528003e+01\n10 14200     6.791801e+02 1.108600e+02\n12 14200     6.294399e+02 7.278003e+01\n2 14201     7.426000e+02 -9.396002e+01\n9 14201     4.976000e+02 3.004999e+01\n12 14201     7.457800e+02 4.365002e+01\n2 14202     -9.804999e+01 -1.064300e+02\n8 14202     -4.864001e+01 -1.274200e+02\n2 14203     6.438600e+02 -1.087300e+02\n7 14203     5.279600e+02 8.309000e+01\n9 14203     4.161899e+02 1.378998e+01\n2 14204     5.109800e+02 -1.146000e+02\n3 14204     4.094900e+02 -4.099800e+02\n8 14204     4.502200e+02 -1.460700e+02\n2 14205     -1.951001e+01 -1.189800e+02\n6 14205     -2.045000e+02 -1.255300e+02\n2 14206     7.374200e+02 -1.191500e+02\n9 14206     4.941801e+02 8.679993e+00\n2 14207     7.374200e+02 -1.191500e+02\n9 14207     4.941801e+02 8.679993e+00\n2 14208     3.207000e+02 -1.241300e+02\n8 14208     2.875800e+02 -1.539100e+02\n2 14209     3.076200e+02 -1.260000e+02\n6 14209     1.268800e+02 -1.429000e+02\n13 14209     4.717300e+02 -3.637400e+02\n2 14210     3.076200e+02 -1.260000e+02\n6 14210     1.268800e+02 -1.429000e+02\n8 14210     2.771300e+02 -1.542600e+02\n13 14210     4.717300e+02 -3.637400e+02\n2 14211     7.040601e+02 -1.256100e+02\n9 14211     4.665000e+02 2.289978e+00\n2 14212     -5.422998e+01 -1.282300e+02\n3 14212     -1.305600e+02 -4.401600e+02\n6 14212     -2.394200e+02 -1.375100e+02\n7 14212     -2.564500e+02 7.700012e+00\n12 14212     -2.266400e+02 -7.591998e+01\n13 14212     2.122000e+02 -3.012900e+02\n2 14213     7.616200e+02 -1.340000e+02\n12 14213     7.630100e+02 -2.100220e-01\n2 14214     -1.372998e+01 -1.421900e+02\n3 14214     -8.962000e+01 -4.519600e+02\n6 14214     -2.009900e+02 -1.582300e+02\n8 14214     1.469000e+01 -1.607300e+02\n13 14214     2.333800e+02 -3.214200e+02\n2 14215     5.228500e+02 -1.553600e+02\n8 14215     4.612200e+02 -1.764000e+02\n9 14215     3.289200e+02 -2.304999e+01\n2 14216     -9.898999e+01 -1.578600e+02\n3 14216     -1.772000e+02 -4.712700e+02\n2 14217     5.145001e+01 -1.610900e+02\n3 14217     -2.233002e+01 -4.681899e+02\n2 14218     -2.826300e+02 -1.662700e+02\n8 14218     -1.734100e+02 -1.537200e+02\n13 14218     1.161400e+02 -2.110000e+02\n2 14219     -9.796997e+01 -1.718100e+02\n3 14219     -1.768500e+02 -4.857100e+02\n6 14219     -2.811600e+02 -1.688199e+02\n9 14219     -1.829600e+02 -6.395001e+01\n2 14220     3.661400e+02 -1.723300e+02\n7 14220     6.362000e+01 -9.803998e+01\n2 14221     3.661400e+02 -1.723300e+02\n3 14221     2.804399e+02 -4.682800e+02\n9 14221     2.056200e+02 -4.212000e+01\n2 14222     7.770800e+02 -1.779000e+02\n7 14222     6.151200e+02 -2.078003e+01\n2 14223     2.224600e+02 -1.812300e+02\n3 14223     1.445500e+02 -4.813300e+02\n7 14223     -6.376001e+01 -9.053003e+01\n8 14223     2.024300e+02 -2.003900e+02\n12 14223     2.946997e+01 -1.643500e+02\n15 14223     -3.226001e+01 -1.399500e+02\n2 14224     2.882001e+01 -1.823800e+02\n8 14224     4.703003e+01 -1.955600e+02\n2 14225     2.100000e+02 -1.819700e+02\n3 14225     1.329900e+02 -4.822600e+02\n4 14225     -4.142800e+02 -3.900000e+02\n8 14225     1.917600e+02 -2.007200e+02\n2 14226     3.617200e+02 -1.824400e+02\n6 14226     1.751600e+02 -2.152000e+02\n8 14226     3.173900e+02 -2.046500e+02\n12 14226     1.755000e+02 -1.734300e+02\n2 14227     -4.304300e+02 -1.885100e+02\n4 14227     -2.075200e+02 -1.697700e+02\n8 14227     -2.909300e+02 -1.709300e+02\n13 14227     9.000000e+00 -2.132000e+02\n2 14228     2.397500e+02 -1.910300e+02\n10 14228     -7.626001e+01 -1.052700e+02\n2 14229     -2.876900e+02 -1.966300e+02\n13 14229     1.053000e+02 -2.391700e+02\n2 14230     3.377200e+02 -1.991500e+02\n6 14230     1.517200e+02 -2.255601e+02\n2 14231     -3.429500e+02 -2.066300e+02\n7 14231     -3.733500e+02 7.347998e+01\n10 14231     -3.743200e+02 1.542700e+02\n2 14232     4.739301e+02 -2.066200e+02\n3 14232     3.810000e+02 -5.005601e+02\n6 14232     3.036200e+02 -2.094399e+02\n7 14232     1.842500e+02 -1.166000e+02\n8 14232     4.160300e+02 -2.216500e+02\n12 14232     3.216899e+02 -1.760500e+02\n13 14232     6.064900e+02 -4.448500e+02\n2 14233     4.739301e+02 -2.066200e+02\n3 14233     3.810000e+02 -5.005601e+02\n8 14233     4.160300e+02 -2.216500e+02\n2 14234     -3.240100e+02 -2.089700e+02\n7 14234     -3.597400e+02 6.897998e+01\n8 14234     -2.087300e+02 -1.891100e+02\n15 14234     -3.326800e+02 1.387600e+02\n2 14235     1.024500e+02 -2.152700e+02\n6 14235     -8.467001e+01 -2.346899e+02\n12 14235     -8.434003e+01 -1.804900e+02\n2 14236     2.417400e+02 -2.210200e+02\n6 14236     5.521997e+01 -2.459301e+02\n8 14236     2.184400e+02 -2.319400e+02\n12 14236     5.352002e+01 -1.994300e+02\n13 14236     4.027200e+02 -4.273300e+02\n2 14237     -3.087400e+02 -2.251500e+02\n7 14237     -3.538900e+02 4.990997e+01\n8 14237     -1.977000e+02 -2.032200e+02\n13 14237     8.228003e+01 -2.630700e+02\n15 14237     -3.290900e+02 1.104000e+02\n2 14238     4.325000e+01 -2.257300e+02\n3 14238     -3.137000e+01 -5.334399e+02\n6 14238     -1.419400e+02 -2.398199e+02\n8 14238     5.945001e+01 -2.295800e+02\n12 14238     -1.369300e+02 -1.830100e+02\n2 14239     4.325000e+01 -2.257300e+02\n6 14239     -1.419400e+02 -2.398199e+02\n8 14239     5.945001e+01 -2.295800e+02\n12 14239     -1.369300e+02 -1.830100e+02\n2 14240     -3.206000e+02 -2.267600e+02\n3 14240     -4.272600e+02 -5.583700e+02\n7 14240     -3.640900e+02 4.996002e+01\n8 14240     -2.082200e+02 -2.038100e+02\n13 14240     7.354999e+01 -2.622600e+02\n2 14241     2.597000e+02 -2.298800e+02\n3 14241     1.811300e+02 -5.286500e+02\n4 14241     -4.547600e+02 -4.186100e+02\n8 14241     2.334800e+02 -2.395800e+02\n9 14241     1.205900e+02 -9.402002e+01\n13 14241     4.163500e+02 -4.356200e+02\n2 14242     3.557600e+02 -2.312100e+02\n8 14242     3.124500e+02 -2.432700e+02\n2 14243     -3.289000e+02 -2.372600e+02\n3 14243     -4.348600e+02 -5.700300e+02\n2 14244     4.634900e+02 -2.371700e+02\n6 14244     2.926300e+02 -2.394000e+02\n8 14244     4.070900e+02 -2.471900e+02\n2 14245     -1.721997e+01 -2.377800e+02\n6 14245     -1.994500e+02 -2.396200e+02\n9 14245     -1.111100e+02 -1.153100e+02\n2 14246     2.651300e+02 -2.376600e+02\n3 14246     1.869300e+02 -5.339800e+02\n6 14246     7.984998e+01 -2.570699e+02\n9 14246     1.255100e+02 -9.876001e+01\n12 14246     8.019000e+01 -2.125700e+02\n13 14246     4.205800e+02 -4.395300e+02\n2 14247     2.830601e+02 -2.381000e+02\n8 14247     2.532700e+02 -2.461100e+02\n2 14248     -6.152300e+02 -2.493500e+02\n8 14248     -4.394000e+02 -2.188400e+02\n10 14248     -6.241100e+02 1.451200e+02\n13 14248     -1.263400e+02 -2.447700e+02\n15 14248     -6.366800e+02 1.327800e+02\n2 14249     1.830100e+02 -2.489900e+02\n3 14249     1.080100e+02 -5.507400e+02\n6 14249     -3.830017e+00 -2.697900e+02\n8 14249     1.704200e+02 -2.529700e+02\n9 14249     5.817999e+01 -1.138700e+02\n2 14250     4.957000e+02 -2.582100e+02\n3 14250     4.034399e+02 -5.523800e+02\n9 14250     3.111100e+02 -1.091900e+02\n2 14251     -3.586200e+02 -2.695500e+02\n7 14251     -4.079500e+02 5.000000e+00\n9 14251     -4.115300e+02 -1.656800e+02\n13 14251     3.640002e+01 -2.973400e+02\n2 14252     3.613000e+02 -2.700300e+02\n8 14252     3.171500e+02 -2.739000e+02\n2 14253     4.588700e+02 -2.705600e+02\n6 14253     2.881300e+02 -2.657600e+02\n2 14254     -4.808002e+01 -2.706700e+02\n3 14254     -1.252200e+02 -5.839000e+02\n6 14254     -2.280300e+02 -2.640200e+02\n8 14254     -9.750000e+00 -2.600700e+02\n2 14255     -3.544300e+02 -2.737800e+02\n3 14255     -4.587500e+02 -6.082600e+02\n7 14255     -4.052700e+02 6.300049e-01\n8 14255     -2.382900e+02 -2.437700e+02\n9 14255     -4.072200e+02 -1.690300e+02\n13 14255     3.896002e+01 -3.007700e+02\n2 14256     -2.664900e+02 -2.744400e+02\n13 14256     9.414001e+01 -3.186000e+02\n2 14257     -3.234400e+02 -2.752900e+02\n4 14257     -2.787600e+02 -1.844700e+02\n7 14257     -3.823900e+02 -4.229980e+00\n8 14257     -2.132100e+02 -2.458600e+02\n9 14257     -3.795700e+02 -1.683500e+02\n13 14257     5.931000e+01 -3.074100e+02\n2 14258     1.900400e+02 -2.772400e+02\n7 14258     -8.681000e+01 -1.546500e+02\n8 14258     1.754100e+02 -2.769100e+02\n9 14258     6.603003e+01 -1.368000e+02\n2 14259     1.139200e+02 -2.778900e+02\n6 14259     -7.056000e+01 -2.856600e+02\n8 14259     1.155400e+02 -2.725900e+02\n12 14259     -6.695001e+01 -2.348500e+02\n2 14260     1.045500e+02 -2.803100e+02\n3 14260     3.009998e+01 -5.859399e+02\n6 14260     -7.903000e+01 -2.899301e+02\n7 14260     -1.427900e+02 -1.341700e+02\n8 14260     1.088000e+02 -2.739100e+02\n12 14260     -7.490002e+01 -2.371400e+02\n2 14261     5.676801e+02 -2.824200e+02\n8 14261     4.998300e+02 -2.813500e+02\n9 14261     3.689500e+02 -1.278200e+02\n2 14262     2.101300e+02 -2.962400e+02\n6 14262     2.500000e+01 -3.095100e+02\n13 14262     3.761899e+02 -4.683199e+02\n2 14263     3.368300e+02 -2.958000e+02\n3 14263     2.566300e+02 -5.930100e+02\n6 14263     1.547000e+02 -3.060500e+02\n8 14263     2.972100e+02 -2.924800e+02\n12 14263     1.606700e+02 -2.667700e+02\n2 14264     -4.524900e+02 -2.972800e+02\n4 14264     -2.621800e+02 -1.222200e+02\n7 14264     -4.880500e+02 -1.609003e+01\n8 14264     -3.172100e+02 -2.617700e+02\n9 14264     -4.902900e+02 -1.946400e+02\n13 14264     -3.209998e+01 -3.090200e+02\n15 14264     -5.120600e+02 3.427002e+01\n2 14265     1.079300e+02 -2.970800e+02\n8 14265     1.116600e+02 -2.878700e+02\n2 14266     2.694000e+01 -3.006300e+02\n3 14266     -4.675000e+01 -6.109500e+02\n13 14266     2.502200e+02 -4.328600e+02\n2 14267     -8.739990e+00 -3.023100e+02\n9 14267     -1.010700e+02 -1.693200e+02\n13 14267     2.318000e+02 -4.205700e+02\n2 14268     -4.128000e+02 -3.044000e+02\n7 14268     -4.580800e+02 -2.594000e+01\n15 14268     -4.770100e+02 1.707001e+01\n2 14269     9.496002e+01 -3.067100e+02\n8 14269     1.011300e+02 -2.947400e+02\n2 14270     4.301400e+02 -3.078000e+02\n8 14270     3.786000e+02 -3.023400e+02\n2 14271     3.840601e+02 -3.094400e+02\n6 14271     2.066800e+02 -3.112400e+02\n2 14272     2.459800e+02 -3.128300e+02\n4 14272     -4.936600e+02 -4.032000e+02\n6 14272     6.271997e+01 -3.235500e+02\n8 14272     2.229700e+02 -3.045200e+02\n12 14272     6.627002e+01 -2.792100e+02\n2 14273     4.019399e+02 -3.182700e+02\n8 14273     3.537100e+02 -3.112200e+02\n2 14274     -4.056800e+02 -3.195300e+02\n8 14274     -2.819400e+02 -2.819700e+02\n13 14274     -6.919983e+00 -3.355200e+02\n15 14274     -4.812000e+02 -7.210022e+00\n2 14275     4.060300e+02 -3.222500e+02\n8 14275     3.573200e+02 -3.140400e+02\n2 14276     1.234600e+02 -3.337800e+02\n6 14276     -5.916998e+01 -3.392200e+02\n8 14276     1.232200e+02 -3.170200e+02\n13 14276     3.129600e+02 -4.737200e+02\n2 14277     6.796997e+01 -3.435500e+02\n6 14277     -1.143700e+02 -3.409900e+02\n2 14278     -3.880000e+02 -3.455400e+02\n7 14278     -4.541700e+02 -7.309998e+01\n2 14279     -3.681200e+02 -3.470800e+02\n6 14279     -5.474500e+02 -3.032000e+02\n7 14279     -4.404000e+02 -7.573999e+01\n9 14279     -4.124500e+02 -2.304700e+02\n13 14279     1.075000e+01 -3.648100e+02\n2 14280     -4.269400e+02 -3.486800e+02\n7 14280     -4.847400e+02 -7.316998e+01\n9 14280     -4.621600e+02 -2.361400e+02\n15 14280     -5.200500e+02 -4.428003e+01\n2 14281     3.254200e+02 -3.556800e+02\n8 14281     2.882900e+02 -3.402100e+02\n2 14282     1.813000e+02 -3.726400e+02\n6 14282     -2.349976e+00 -3.792600e+02\n12 14282     -3.200073e-01 -3.320900e+02\n2 14283     3.576100e+02 -3.733300e+02\n12 14283     1.850800e+02 -3.405700e+02\n2 14284     -2.899200e+02 -3.755200e+02\n8 14284     -1.955600e+02 -3.321400e+02\n2 14285     -3.188300e+02 -3.759700e+02\n6 14285     -4.938200e+02 -3.399600e+02\n7 14285     -4.126800e+02 -1.113100e+02\n8 14285     -2.189000e+02 -3.311100e+02\n13 14285     3.602002e+01 -3.979300e+02\n2 14286     -5.609400e+02 -3.808900e+02\n8 14286     -4.087700e+02 -3.309700e+02\n13 14286     -1.205200e+02 -3.670800e+02\n2 14287     -3.001700e+02 -3.970200e+02\n6 14287     -4.750900e+02 -3.653900e+02\n7 14287     -4.053700e+02 -1.334100e+02\n2 14288     -2.772800e+02 -4.038199e+02\n12 14288     -4.049000e+02 -2.981200e+02\n2 14289     5.564100e+02 -4.271200e+02\n8 14289     4.837200e+02 -4.032500e+02\n2 14290     4.940002e+00 -4.517000e+02\n6 14290     -1.739900e+02 -4.469301e+02\n12 14290     -1.658800e+02 -3.868500e+02\n2 14291     6.131000e+02 -4.820200e+02\n10 14291     2.978900e+02 -4.174301e+02\n2 14292     -3.865800e+02 -5.007400e+02\n8 14292     -2.825000e+02 -4.361000e+02\n12 14292     -5.279800e+02 -4.084800e+02\n2 14293     6.222000e+02 -5.302000e+02\n9 14293     4.267500e+02 -3.245900e+02\n2 14294     5.187900e+02 -5.360601e+02\n9 14294     3.441500e+02 -3.345100e+02\n2 14295     4.755300e+02 -5.446700e+02\n9 14295     3.101400e+02 -3.427500e+02\n2 14296     4.877300e+02 -5.510601e+02\n9 14296     3.200601e+02 -3.479500e+02\n10 14296     1.266600e+02 -4.589800e+02\n15 14296     2.319800e+02 -5.699200e+02\n2 14297     6.494200e+02 -5.832300e+02\n6 14297     4.568900e+02 -5.965400e+02\n7 14297     2.618700e+02 -4.556700e+02\n2 14298     4.857200e+02 -5.921100e+02\n9 14298     3.221100e+02 -3.804300e+02\n2 14299     4.134500e+02 -5.933900e+02\n7 14299     6.189001e+01 -4.265300e+02\n2 14300     3.837300e+02 -5.958900e+02\n9 14300     2.408000e+02 -3.889000e+02\n2 14301     5.693300e+02 -5.961899e+02\n9 14301     3.888000e+02 -3.789200e+02\n2 14302     3.866500e+02 -6.056200e+02\n9 14302     2.448199e+02 -3.959600e+02\n2 14303     4.313800e+02 -6.075800e+02\n7 14303     7.189001e+01 -4.430900e+02\n12 14303     2.249900e+02 -5.928800e+02\n2 14304     -2.309000e+02 5.949200e+02\n3 14304     -3.587200e+02 2.535500e+02\n4 14304     1.911400e+02 -4.426300e+02\n13 14304     2.584800e+02 4.351700e+02\n14 14304     3.969900e+02 7.440002e+01\n2 14305     -2.549600e+02 5.939900e+02\n4 14305     1.895400e+02 -4.241100e+02\n14 14305     3.724600e+02 7.146997e+01\n2 14306     -9.278998e+01 5.895400e+02\n14 14306     5.474700e+02 8.389001e+01\n2 14307     3.287000e+01 5.894600e+02\n3 14307     -1.139200e+02 2.459200e+02\n13 14307     5.085300e+02 4.634100e+02\n14 14307     6.935601e+02 1.003200e+02\n2 14308     -1.005700e+02 5.863300e+02\n3 14308     -2.373500e+02 2.446000e+02\n4 14308     1.861300e+02 -5.436500e+02\n5 14308     6.477100e+02 1.711300e+02\n11 14308     3.454200e+02 3.400024e+00\n13 14308     3.789800e+02 4.432200e+02\n14 14308     5.397700e+02 8.007001e+01\n2 14309     -1.740600e+02 5.660300e+02\n5 14309     5.617600e+02 1.453400e+02\n8 14309     -6.409998e+01 4.443700e+02\n11 14309     2.696600e+02 -2.009003e+01\n13 14309     3.092400e+02 4.185500e+02\n14 14309     4.576000e+02 5.371002e+01\n2 14310     2.628003e+01 5.667300e+02\n3 14310     -1.197800e+02 2.246200e+02\n5 14310     7.994100e+02 1.658000e+02\n11 14310     4.815200e+02 3.390015e+00\n13 14310     5.007100e+02 4.434600e+02\n14 14310     6.851300e+02 7.765997e+01\n2 14311     -1.944800e+02 5.637600e+02\n3 14311     -3.248400e+02 2.238500e+02\n8 14311     -8.114001e+01 4.425200e+02\n2 14312     -1.944800e+02 5.637600e+02\n4 14312     1.733500e+02 -4.658000e+02\n13 14312     2.903700e+02 4.142200e+02\n14 14312     4.348600e+02 4.942999e+01\n2 14313     1.489001e+01 5.634400e+02\n14 14313     6.722500e+02 7.279999e+01\n2 14314     1.489001e+01 5.634400e+02\n11 14314     4.694500e+02 -7.899780e-01\n13 14314     4.897600e+02 4.389600e+02\n14 14314     6.722500e+02 7.279999e+01\n2 14315     -2.173999e+01 5.614200e+02\n5 14315     7.392600e+02 1.560700e+02\n8 14315     6.285999e+01 4.446900e+02\n11 14315     4.291100e+02 -6.820007e+00\n13 14315     4.531300e+02 4.327200e+02\n14 14315     6.286100e+02 6.658002e+01\n2 14316     -2.849200e+02 5.545800e+02\n5 14316     4.387200e+02 1.246900e+02\n8 14316     -1.562800e+02 4.330100e+02\n14 14316     3.383600e+02 3.122998e+01\n2 14317     -1.336200e+02 5.518500e+02\n3 14317     -2.690400e+02 2.109900e+02\n5 14317     6.053600e+02 1.353100e+02\n8 14317     -3.114001e+01 4.341800e+02\n11 14317     3.089301e+02 -2.532001e+01\n2 14318     -3.200600e+02 5.504500e+02\n4 14318     1.658800e+02 -3.748400e+02\n5 14318     4.015300e+02 1.175600e+02\n6 14318     -5.426300e+02 8.679800e+02\n8 14318     -1.850400e+02 4.282600e+02\n13 14318     1.785300e+02 3.882900e+02\n14 14318     3.022000e+02 2.400000e+01\n2 14319     2.676100e+02 5.502100e+02\n3 14319     1.225000e+02 2.090600e+02\n6 14319     1.767100e+02 8.532600e+02\n8 14319     2.894900e+02 4.287700e+02\n9 14319     7.606000e+01 5.621900e+02\n13 14319     6.706700e+02 3.540300e+02\n2 14320     -6.453998e+01 5.491100e+02\n3 14320     -2.049300e+02 2.078500e+02\n4 14320     1.650300e+02 -5.685200e+02\n5 14320     6.867800e+02 1.399700e+02\n8 14320     2.721997e+01 4.346200e+02\n11 14320     3.823500e+02 -2.123999e+01\n13 14320     4.109900e+02 4.174400e+02\n14 14320     5.786100e+02 4.985999e+01\n2 14321     -1.627400e+02 5.481300e+02\n4 14321     1.643800e+02 -4.882300e+02\n5 14321     5.727100e+02 1.291500e+02\n8 14321     -5.481000e+01 4.307400e+02\n13 14321     3.188600e+02 4.051500e+02\n14 14321     4.688600e+02 3.800000e+01\n2 14322     -3.263600e+02 5.470400e+02\n3 14322     -4.496400e+02 2.095800e+02\n4 14322     1.648600e+02 -3.701600e+02\n5 14322     3.944600e+02 1.149700e+02\n6 14322     -5.503900e+02 8.625100e+02\n8 14322     -1.904500e+02 4.258300e+02\n11 14322     1.193000e+02 -4.870001e+01\n13 14322     1.730800e+02 3.862100e+02\n14 14322     2.958500e+02 2.078998e+01\n2 14323     -1.722900e+02 5.472400e+02\n3 14323     -3.046200e+02 2.070600e+02\n4 14323     1.639301e+02 -4.805800e+02\n5 14323     5.620500e+02 1.277700e+02\n8 14323     -6.281000e+01 4.298400e+02\n11 14323     2.712700e+02 -3.446997e+01\n13 14323     3.095100e+02 4.032100e+02\n14 14323     4.580500e+02 3.640997e+01\n2 14324     5.819800e+02 5.459200e+02\n8 14324     5.447900e+02 4.200800e+02\n2 14325     -2.632400e+02 5.420900e+02\n4 14325     1.615400e+02 -4.131100e+02\n6 14325     -4.694800e+02 8.705900e+02\n8 14325     -1.380600e+02 4.233500e+02\n11 14325     1.809400e+02 -4.754999e+01\n13 14325     2.279301e+02 3.891200e+02\n14 14325     3.609600e+02 2.244000e+01\n2 14326     2.998700e+02 5.412300e+02\n3 14326     1.541500e+02 2.004700e+02\n6 14326     2.138500e+02 8.387700e+02\n8 14326     3.149700e+02 4.219800e+02\n9 14326     1.053400e+02 5.543800e+02\n11 14326     6.237800e+02 -1.073100e+02\n13 14326     6.975500e+02 3.415400e+02\n2 14327     -3.529300e+02 5.356400e+02\n4 14327     1.593700e+02 -3.516300e+02\n5 14327     3.660000e+02 1.027600e+02\n2 14328     2.660601e+02 5.341600e+02\n3 14328     1.216400e+02 1.934200e+02\n6 14328     1.742500e+02 8.351800e+02\n8 14328     2.874300e+02 4.161300e+02\n9 14328     7.565997e+01 5.472500e+02\n11 14328     5.978700e+02 -1.068700e+02\n13 14328     6.686200e+02 3.411500e+02\n2 14329     3.045000e+02 5.339600e+02\n6 14329     2.201900e+02 8.291400e+02\n8 14329     3.190700e+02 4.158900e+02\n2 14330     -6.823700e+02 5.315100e+02\n11 14330     -1.918300e+02 -8.656000e+01\n13 14330     -1.158900e+02 3.397000e+02\n14 14330     -4.625000e+01 -2.085999e+01\n2 14331     -6.463200e+02 5.305300e+02\n4 14331     1.609000e+02 -1.803900e+02\n2 14332     -1.453300e+02 5.295600e+02\n3 14332     -2.795200e+02 1.898600e+02\n4 14332     1.536200e+02 -4.991700e+02\n5 14332     5.908199e+02 1.129100e+02\n8 14332     -4.038000e+01 4.161600e+02\n11 14332     2.985699e+02 -4.565002e+01\n13 14332     3.336600e+02 3.919600e+02\n14 14332     4.869100e+02 2.258002e+01\n2 14333     -1.453300e+02 5.295600e+02\n3 14333     -2.795200e+02 1.898600e+02\n8 14333     -4.038000e+01 4.161600e+02\n2 14334     3.391400e+02 5.293100e+02\n3 14334     1.915699e+02 1.897500e+02\n6 14334     2.604100e+02 8.179000e+02\n8 14334     3.473800e+02 4.112200e+02\n9 14334     1.396100e+02 5.446900e+02\n11 14334     6.566100e+02 -1.255600e+02\n13 14334     7.312500e+02 3.250800e+02\n2 14335     -2.911600e+02 5.283800e+02\n4 14335     1.544700e+02 -3.911100e+02\n5 14335     4.294600e+02 9.983002e+01\n6 14335     -5.040200e+02 8.464200e+02\n8 14335     -1.617800e+02 4.116900e+02\n13 14335     2.022700e+02 3.751400e+02\n14 14335     3.306500e+02 7.260010e+00\n2 14336     -4.300300e+02 5.266500e+02\n13 14336     8.440002e+01 3.604600e+02\n14 14336     1.905800e+02 -5.520020e+00\n2 14337     4.882300e+02 5.264300e+02\n8 14337     4.651100e+02 4.038700e+02\n2 14338     6.261000e+02 5.216300e+02\n8 14338     5.801899e+02 3.989900e+02\n2 14339     -4.220300e+02 5.201000e+02\n3 14339     -5.418000e+02 1.866900e+02\n4 14339     1.520900e+02 -3.057300e+02\n5 14339     2.931700e+02 8.303998e+01\n8 14339     -2.695400e+02 4.016500e+02\n14 14339     1.980601e+02 -1.057001e+01\n2 14340     -2.776500e+02 5.199000e+02\n3 14340     -4.039700e+02 1.832500e+02\n4 14340     1.494900e+02 -3.998300e+02\n5 14340     4.439200e+02 9.290002e+01\n6 14340     -4.851100e+02 8.390000e+02\n8 14340     -1.501600e+02 4.051600e+02\n2 14341     -1.255000e+02 5.199300e+02\n4 14341     1.478199e+02 -5.134600e+02\n5 14341     6.126100e+02 1.051000e+02\n6 14341     -2.923900e+02 8.746000e+02\n8 14341     -2.384998e+01 4.089800e+02\n11 14341     3.192600e+02 -5.128003e+01\n13 14341     3.515300e+02 3.862900e+02\n14 14341     5.081899e+02 1.539001e+01\n2 14342     5.921000e+02 5.185400e+02\n6 14342     5.394301e+02 7.269600e+02\n8 14342     5.513500e+02 3.963200e+02\n2 14343     -8.502002e+01 5.184100e+02\n3 14343     -2.235500e+02 1.794600e+02\n4 14343     1.466700e+02 -5.468000e+02\n5 14343     6.595400e+02 1.072900e+02\n8 14343     1.010999e+01 4.084400e+02\n13 14343     3.891801e+02 3.902300e+02\n14 14343     5.529301e+02 1.894000e+01\n2 14344     -2.836300e+02 5.120100e+02\n5 14344     4.363300e+02 8.479999e+01\n6 14344     -4.927600e+02 8.271500e+02\n2 14345     -2.235700e+02 5.117400e+02\n3 14345     -3.536000e+02 1.743600e+02\n4 14345     1.442900e+02 -4.372800e+02\n6 14345     -4.162600e+02 8.405500e+02\n8 14345     -1.056900e+02 3.998200e+02\n11 14345     2.183700e+02 -6.746997e+01\n13 14345     2.612800e+02 3.690100e+02\n14 14345     4.004399e+02 -1.909973e+00\n2 14346     -1.464700e+02 5.108200e+02\n3 14346     -2.808300e+02 1.717200e+02\n4 14346     1.424200e+02 -4.954301e+02\n5 14346     5.879800e+02 9.382001e+01\n6 14346     -3.182900e+02 8.577100e+02\n8 14346     -4.072998e+01 4.004200e+02\n11 14346     2.968300e+02 -6.097998e+01\n13 14346     3.314900e+02 3.758700e+02\n14 14346     4.844301e+02 4.200012e+00\n2 14347     -1.189100e+02 5.092500e+02\n4 14347     1.419100e+02 -5.175900e+02\n5 14347     6.195200e+02 9.609003e+01\n6 14347     -2.833900e+02 8.645300e+02\n8 14347     -1.829999e+01 4.015600e+02\n11 14347     3.258000e+02 -5.946002e+01\n13 14347     3.568400e+02 3.775000e+02\n14 14347     5.146000e+02 5.169983e+00\n2 14348     -2.900700e+02 5.076000e+02\n3 14348     -4.177100e+02 1.707900e+02\n4 14348     1.431600e+02 -3.897900e+02\n5 14348     4.292300e+02 8.053003e+01\n6 14348     -5.003900e+02 8.202900e+02\n8 14348     -1.603200e+02 3.952900e+02\n11 14348     1.540600e+02 -7.598999e+01\n13 14348     2.026200e+02 3.590200e+02\n14 14348     3.307600e+02 -1.147998e+01\n2 14349     -3.979400e+02 5.069600e+02\n4 14349     1.461400e+02 -3.190200e+02\n5 14349     3.157500e+02 7.484998e+01\n8 14349     -2.503100e+02 3.929500e+02\n14 14349     2.206100e+02 -1.950000e+01\n2 14350     -3.102400e+02 5.068100e+02\n3 14350     -4.362300e+02 1.703400e+02\n4 14350     1.434100e+02 -3.763400e+02\n5 14350     4.079301e+02 7.871002e+01\n6 14350     -5.254400e+02 8.157000e+02\n8 14350     -1.770300e+02 3.941500e+02\n11 14350     1.347000e+02 -7.797998e+01\n13 14350     1.852700e+02 3.566700e+02\n14 14350     3.098500e+02 -1.359998e+01\n2 14351     -1.634300e+02 5.069000e+02\n3 14351     -2.975300e+02 1.690700e+02\n4 14351     1.407000e+02 -4.815800e+02\n5 14351     5.675400e+02 8.947998e+01\n6 14351     -3.399200e+02 8.492300e+02\n8 14351     -5.522998e+01 3.981400e+02\n11 14351     2.800300e+02 -6.612000e+01\n13 14351     3.155200e+02 3.709700e+02\n14 14351     4.654900e+02 -1.239990e+00\n2 14352     5.921100e+02 4.973800e+02\n3 14352     4.357100e+02 1.635500e+02\n6 14352     5.401000e+02 7.033500e+02\n9 14352     3.599800e+02 5.219600e+02\n2 14353     -2.898500e+02 4.969000e+02\n3 14353     -4.188700e+02 1.605100e+02\n4 14353     1.374400e+02 -3.882600e+02\n5 14353     4.281200e+02 7.045001e+01\n6 14353     -4.992400e+02 8.066900e+02\n8 14353     -1.603200e+02 3.865200e+02\n13 14353     2.024700e+02 3.505500e+02\n14 14353     3.300900e+02 -2.126001e+01\n2 14354     -2.770900e+02 4.974400e+02\n5 14354     4.420601e+02 7.219000e+01\n6 14354     -4.828100e+02 8.106400e+02\n8 14354     -1.497200e+02 3.874600e+02\n2 14355     -7.201500e+02 4.916800e+02\n4 14355     1.445800e+02 -1.397600e+02\n5 14355     7.270020e+00 4.244000e+01\n2 14356     -1.716000e+02 4.888100e+02\n3 14356     -3.046500e+02 1.511000e+02\n4 14356     1.306300e+02 -4.730699e+02\n5 14356     5.574800e+02 7.110999e+01\n11 14356     2.710200e+02 -8.060999e+01\n13 14356     3.075000e+02 3.561900e+02\n14 14356     4.558101e+02 -1.813000e+01\n2 14357     -1.716000e+02 4.888100e+02\n4 14357     1.306300e+02 -4.730699e+02\n5 14357     5.574800e+02 7.110999e+01\n6 14357     -3.485800e+02 8.237300e+02\n8 14357     -6.190997e+01 3.827500e+02\n11 14357     2.710200e+02 -8.060999e+01\n2 14358     -7.889400e+02 4.869000e+02\n4 14358     1.440400e+02 -1.066400e+02\n5 14358     -5.303998e+01 3.563000e+01\n8 14358     -5.686700e+02 3.666500e+02\n2 14359     -6.716200e+02 4.857000e+02\n4 14359     1.406500e+02 -1.633700e+02\n5 14359     5.033002e+01 3.926001e+01\n8 14359     -4.733100e+02 3.673100e+02\n11 14359     -1.825400e+02 -1.167600e+02\n13 14359     -1.075400e+02 3.088600e+02\n14 14359     -3.845001e+01 -5.692999e+01\n2 14360     -6.716200e+02 4.857000e+02\n3 14360     -7.876100e+02 1.586100e+02\n4 14360     1.406500e+02 -1.633700e+02\n5 14360     5.033002e+01 3.926001e+01\n8 14360     -4.733100e+02 3.673100e+02\n11 14360     -1.825400e+02 -1.167600e+02\n13 14360     -1.075400e+02 3.088600e+02\n14 14360     -3.845001e+01 -5.692999e+01\n2 14361     -2.900400e+02 4.862000e+02\n3 14361     -4.187900e+02 1.498500e+02\n4 14361     1.315600e+02 -3.871900e+02\n5 14361     4.270601e+02 6.003998e+01\n6 14361     -4.983700e+02 7.925000e+02\n8 14361     -1.602900e+02 3.779100e+02\n11 14361     1.540000e+02 -9.208002e+01\n13 14361     2.019301e+02 3.425200e+02\n14 14361     3.295900e+02 -3.107001e+01\n2 14362     -3.102500e+02 4.852500e+02\n4 14362     1.314200e+02 -3.736400e+02\n5 14362     4.059500e+02 5.790002e+01\n6 14362     -5.232600e+02 7.867700e+02\n8 14362     -1.767900e+02 3.761800e+02\n11 14362     1.342700e+02 -9.529999e+01\n13 14362     1.843300e+02 3.389800e+02\n2 14363     2.556000e+01 4.835900e+02\n3 14363     -1.205500e+02 1.447600e+02\n6 14363     -9.731000e+01 8.633100e+02\n11 14363     4.792200e+02 -6.585999e+01\n13 14363     4.933700e+02 3.724300e+02\n14 14363     6.792800e+02 -4.239990e+00\n2 14364     1.072600e+02 4.826800e+02\n8 14364     1.708200e+02 3.837000e+02\n13 14364     5.756500e+02 3.808500e+02\n14 14364     7.788000e+02 3.830017e+00\n2 14365     -1.610500e+02 4.817800e+02\n4 14365     1.261200e+02 -4.803000e+02\n5 14365     5.689100e+02 6.457001e+01\n8 14365     -5.291998e+01 3.769800e+02\n11 14365     2.826600e+02 -8.409998e+01\n14 14365     4.669000e+02 -2.353998e+01\n2 14366     -8.415002e+01 4.820800e+02\n3 14366     -2.224100e+02 1.436800e+02\n4 14366     1.243800e+02 -5.421100e+02\n5 14366     6.573300e+02 7.072998e+01\n6 14366     -2.369000e+02 8.353300e+02\n8 14366     1.135999e+01 3.787700e+02\n11 14366     3.610699e+02 -7.890997e+01\n13 14366     3.882300e+02 3.596300e+02\n14 14366     5.526899e+02 -1.666998e+01\n2 14367     1.614300e+02 4.800400e+02\n3 14367     6.500000e+00 1.418900e+02\n8 14367     2.166000e+02 3.827400e+02\n2 14368     -4.245800e+02 4.794000e+02\n3 14368     -5.457200e+02 1.461000e+02\n4 14368     1.317800e+02 -3.000900e+02\n5 14368     2.872800e+02 4.689001e+01\n11 14368     2.609003e+01 -1.074700e+02\n14 14368     1.923101e+02 -4.716998e+01\n2 14369     -4.245800e+02 4.794000e+02\n3 14369     -5.457200e+02 1.461000e+02\n4 14369     1.317800e+02 -3.000900e+02\n5 14369     2.872800e+02 4.689001e+01\n8 14369     -2.713500e+02 3.698400e+02\n14 14369     1.923101e+02 -4.716998e+01\n2 14370     -2.632700e+02 4.790100e+02\n6 14370     -4.634500e+02 7.903800e+02\n8 14370     -1.379800e+02 3.727700e+02\n2 14371     8.298999e+01 4.773400e+02\n3 14371     -6.697998e+01 1.381900e+02\n8 14371     1.504300e+02 3.786200e+02\n11 14371     5.440699e+02 -6.377002e+01\n13 14371     5.503600e+02 3.740400e+02\n14 14371     7.484800e+02 -4.010010e+00\n2 14372     8.298999e+01 4.773400e+02\n3 14372     -6.697998e+01 1.381900e+02\n8 14372     1.504300e+02 3.786200e+02\n13 14372     5.503600e+02 3.740400e+02\n14 14372     7.484800e+02 -4.010010e+00\n2 14373     -6.196002e+01 4.763700e+02\n13 14373     4.082600e+02 3.557000e+02\n14 14373     5.770300e+02 -2.169000e+01\n2 14374     -6.196002e+01 4.763700e+02\n13 14374     4.082600e+02 3.557000e+02\n14 14374     5.770300e+02 -2.169000e+01\n2 14375     -7.059500e+02 4.713000e+02\n4 14375     1.354900e+02 -1.451000e+02\n5 14375     1.803003e+01 2.666998e+01\n8 14375     -5.016000e+02 3.559000e+02\n13 14375     -1.331800e+02 2.956900e+02\n2 14376     -1.378998e+01 4.688800e+02\n5 14376     7.393500e+02 6.308002e+01\n13 14376     4.542500e+02 3.565300e+02\n14 14376     6.323300e+02 -2.220001e+01\n2 14377     -1.378998e+01 4.688800e+02\n5 14377     7.393500e+02 6.308002e+01\n6 14377     -1.476200e+02 8.345500e+02\n8 14377     6.937000e+01 3.698400e+02\n14 14377     6.323300e+02 -2.220001e+01\n2 14378     -3.328998e+01 4.677400e+02\n4 14378     1.146800e+02 -5.819399e+02\n5 14378     7.155601e+02 5.998999e+01\n6 14378     -1.723200e+02 8.288600e+02\n11 14378     4.153300e+02 -8.471997e+01\n14 14378     6.093300e+02 -2.550000e+01\n2 14379     -2.646002e+01 4.678000e+02\n3 14379     -1.689500e+02 1.303800e+02\n5 14379     7.240699e+02 6.071997e+01\n8 14379     5.910999e+01 3.686600e+02\n13 14379     4.418600e+02 3.540700e+02\n14 14379     6.176899e+02 -2.444000e+01\n2 14380     -2.646002e+01 4.678000e+02\n5 14380     7.240699e+02 6.071997e+01\n6 14380     -1.633500e+02 8.304900e+02\n8 14380     5.910999e+01 3.686600e+02\n11 14380     4.231400e+02 -8.389001e+01\n13 14380     4.418600e+02 3.540700e+02\n14 14380     6.176899e+02 -2.444000e+01\n2 14381     6.398999e+01 4.674000e+02\n3 14381     -8.452002e+01 1.296000e+02\n6 14381     -4.760999e+01 8.511200e+02\n8 14381     1.346300e+02 3.704500e+02\n14 14381     7.244600e+02 -1.601001e+01\n2 14382     -2.683100e+02 4.562400e+02\n4 14382     1.153500e+02 -3.988000e+02\n5 14382     4.477400e+02 3.352002e+01\n13 14382     2.189900e+02 3.208300e+02\n2 14383     -2.683100e+02 4.562400e+02\n11 14383     1.740200e+02 -1.135400e+02\n2 14384     -6.266998e+01 4.538000e+02\n3 14384     -2.028700e+02 1.161800e+02\n4 14384     1.077900e+02 -5.547000e+02\n5 14384     6.792500e+02 4.515997e+01\n6 14384     -2.089100e+02 8.050700e+02\n8 14384     2.844000e+01 3.564200e+02\n11 14384     3.834800e+02 -9.790997e+01\n13 14384     4.060900e+02 3.389700e+02\n14 14384     5.748300e+02 -4.096997e+01\n2 14385     -6.967900e+02 4.495700e+02\n4 14385     1.252800e+02 -1.476800e+02\n11 14385     -2.034200e+02 -1.427600e+02\n2 14386     -3.452700e+02 4.452300e+02\n3 14386     -4.698500e+02 1.110700e+02\n4 14386     1.117100e+02 -3.456000e+02\n6 14386     -5.629800e+02 7.297100e+02\n8 14386     -2.059100e+02 3.438100e+02\n14 14386     2.695699e+02 -7.190997e+01\n2 14387     -3.855100e+02 4.391100e+02\n3 14387     -5.090500e+02 1.059100e+02\n4 14387     1.101000e+02 -3.200900e+02\n5 14387     3.233500e+02 1.234998e+01\n8 14387     -2.388300e+02 3.380300e+02\n11 14387     6.229999e+01 -1.338500e+02\n2 14388     5.562000e+01 4.392500e+02\n3 14388     -9.265002e+01 1.020600e+02\n5 14388     8.224200e+02 3.803998e+01\n6 14388     -5.990002e+01 8.140900e+02\n13 14388     5.182200e+02 3.385300e+02\n14 14388     7.125300e+02 -4.465002e+01\n2 14389     -1.854400e+02 4.368700e+02\n4 14389     1.019500e+02 -4.563300e+02\n9 14389     -3.162100e+02 4.499900e+02\n11 14389     2.570100e+02 -1.224500e+02\n2 14390     -6.044300e+02 4.322200e+02\n4 14390     1.147800e+02 -1.934600e+02\n13 14390     -5.759003e+01 2.756000e+02\n14 14390     1.865002e+01 -9.800000e+01\n2 14391     -6.044300e+02 4.322200e+02\n3 14391     -7.232600e+02 1.043600e+02\n4 14391     1.147800e+02 -1.934600e+02\n11 14391     -1.297600e+02 -1.502300e+02\n13 14391     -5.759003e+01 2.756000e+02\n14 14391     1.865002e+01 -9.800000e+01\n2 14392     -7.121997e+01 4.317200e+02\n3 14392     -2.110500e+02 9.500000e+01\n4 14392     9.500000e+01 -5.443600e+02\n5 14392     6.670000e+02 2.238000e+01\n6 14392     -2.187500e+02 7.754600e+02\n8 14392     2.148999e+01 3.390500e+02\n13 14392     3.973199e+02 3.199700e+02\n14 14392     5.644100e+02 -6.322998e+01\n2 14393     -2.199707e-01 4.323700e+02\n3 14393     -1.444000e+02 9.547998e+01\n5 14393     7.522100e+02 2.709998e+01\n6 14393     -1.286100e+02 7.921500e+02\n8 14393     8.071002e+01 3.412100e+02\n11 14393     4.487600e+02 -1.112700e+02\n13 14393     4.622700e+02 3.258800e+02\n14 14393     6.436400e+02 -5.792999e+01\n2 14394     4.265997e+01 4.316400e+02\n13 14394     5.085000e+02 3.310600e+02\n14 14394     6.989900e+02 -5.329999e+01\n2 14395     4.265997e+01 4.316400e+02\n3 14395     -1.033500e+02 9.491998e+01\n8 14395     1.171100e+02 3.415900e+02\n13 14395     5.085000e+02 3.310600e+02\n14 14395     6.989900e+02 -5.329999e+01\n2 14396     -3.604100e+02 4.301300e+02\n3 14396     -4.852700e+02 9.733002e+01\n4 14396     1.045800e+02 -3.347900e+02\n5 14396     3.485900e+02 4.840027e+00\n6 14396     -5.799200e+02 7.079900e+02\n8 14396     -2.176400e+02 3.316800e+02\n11 14396     8.585999e+01 -1.395000e+02\n13 14396     1.392000e+02 2.926800e+02\n14 14396     2.539399e+02 -8.648999e+01\n2 14397     3.220500e+02 4.278200e+02\n8 14397     3.319500e+02 3.288300e+02\n9 14397     1.275900e+02 4.565700e+02\n2 14398     -1.800900e+02 4.271700e+02\n4 14398     9.640002e+01 -4.578400e+02\n5 14398     5.417500e+02 1.103003e+01\n6 14398     -3.549500e+02 7.453000e+02\n8 14398     -6.869000e+01 3.336700e+02\n2 14399     -1.800900e+02 4.271700e+02\n4 14399     9.640002e+01 -4.578400e+02\n5 14399     5.417500e+02 1.103003e+01\n8 14399     -6.869000e+01 3.336700e+02\n9 14399     -3.111500e+02 4.411700e+02\n2 14400     -8.403003e+01 4.258800e+02\n13 14400     3.838199e+02 3.141600e+02\n14 14400     5.483199e+02 -6.982001e+01\n2 14401     -6.574500e+02 4.225300e+02\n5 14401     5.710999e+01 -1.354999e+01\n11 14401     -1.734200e+02 -1.589400e+02\n2 14402     -6.574500e+02 4.225300e+02\n5 14402     5.710999e+01 -1.354999e+01\n11 14402     -1.734200e+02 -1.589400e+02\n2 14403     -6.574500e+02 4.225300e+02\n4 14403     1.123700e+02 -1.654500e+02\n11 14403     -1.734200e+02 -1.589400e+02\n2 14404     -7.095001e+01 4.197700e+02\n4 14404     8.854999e+01 -5.422500e+02\n5 14404     6.654200e+02 1.133002e+01\n6 14404     -2.190200e+02 7.613000e+02\n8 14404     2.112000e+01 3.295200e+02\n11 14404     3.740400e+02 -1.260500e+02\n13 14404     3.955500e+02 3.106200e+02\n14 14404     5.629800e+02 -7.432001e+01\n2 14405     -3.728500e+02 4.186800e+02\n5 14405     3.346200e+02 -6.440002e+00\n2 14406     4.049900e+02 4.163700e+02\n3 14406     2.579900e+02 8.457001e+01\n6 14406     3.323100e+02 6.707700e+02\n8 14406     3.998700e+02 3.174300e+02\n9 14406     1.992800e+02 4.489700e+02\n13 14406     7.760200e+02 2.154000e+02\n2 14407     -3.889100e+02 4.154200e+02\n3 14407     -5.145400e+02 8.065997e+01\n4 14407     9.878003e+01 -3.154400e+02\n5 14407     3.178900e+02 -9.429993e+00\n11 14407     5.883002e+01 -1.516100e+02\n14 14407     2.247000e+02 -1.014800e+02\n2 14408     -3.827300e+02 4.141800e+02\n4 14408     9.769000e+01 -3.190900e+02\n5 14408     3.242900e+02 -1.042999e+01\n8 14408     -2.361100e+02 3.184700e+02\n11 14408     6.458002e+01 -1.520300e+02\n13 14408     1.199600e+02 2.791900e+02\n14 14408     2.306500e+02 -1.016900e+02\n2 14409     -7.718100e+02 4.128000e+02\n5 14409     -4.585999e+01 -2.582001e+01\n8 14409     -5.534600e+02 3.076400e+02\n2 14410     -2.877700e+02 4.093500e+02\n4 14410     9.121002e+01 -3.794500e+02\n5 14410     4.226200e+02 -1.103003e+01\n6 14410     -4.879800e+02 6.989100e+02\n8 14410     -1.581000e+02 3.169100e+02\n11 14410     1.547300e+02 -1.504900e+02\n13 14410     2.003900e+02 2.830400e+02\n14 14410     3.272000e+02 -1.003600e+02\n2 14411     -1.066800e+02 4.061400e+02\n5 14411     6.226300e+02 -5.020020e+00\n6 14411     -2.618800e+02 7.358400e+02\n8 14411     -8.030029e+00 3.180900e+02\n2 14412     -5.326700e+02 4.041200e+02\n4 14412     9.871002e+01 -2.298100e+02\n5 14412     1.739300e+02 -2.484003e+01\n8 14412     -3.594100e+02 3.070300e+02\n13 14412     -2.190002e+00 2.609800e+02\n14 14412     8.391998e+01 -1.180200e+02\n2 14413     -8.314001e+01 4.019200e+02\n3 14413     -2.222600e+02 6.648999e+01\n9 14413     -2.274800e+02 4.214800e+02\n11 14413     3.605000e+02 -1.421800e+02\n13 14413     3.832400e+02 2.946700e+02\n14 14413     5.482100e+02 -9.292999e+01\n2 14414     -5.561900e+02 4.012800e+02\n3 14414     -6.773400e+02 7.373999e+01\n4 14414     9.840002e+01 -2.164600e+02\n5 14414     1.508500e+02 -2.853003e+01\n8 14414     -3.785200e+02 3.043400e+02\n12 14414     -6.270400e+02 6.179900e+02\n13 14414     -2.122998e+01 2.565900e+02\n14 14414     6.104999e+01 -1.219800e+02\n2 14415     -5.561900e+02 4.012800e+02\n4 14415     9.840002e+01 -2.164600e+02\n5 14415     1.508500e+02 -2.853003e+01\n8 14415     -3.785200e+02 3.043400e+02\n12 14415     -6.270400e+02 6.179900e+02\n2 14416     -3.475600e+02 4.010200e+02\n11 14416     9.788000e+01 -1.606500e+02\n2 14417     5.530400e+02 4.010700e+02\n6 14417     4.882400e+02 5.975300e+02\n9 14417     3.278600e+02 4.393800e+02\n2 14418     -4.318400e+02 3.989900e+02\n3 14418     -5.547500e+02 6.796997e+01\n4 14418     9.200000e+01 -2.872400e+02\n5 14418     2.728500e+02 -2.659003e+01\n11 14418     1.919000e+01 -1.661000e+02\n13 14418     7.854999e+01 2.642100e+02\n14 14418     1.805699e+02 -1.177300e+02\n2 14419     -3.639400e+02 3.967500e+02\n3 14419     -4.888500e+02 6.397998e+01\n4 14419     8.817999e+01 -3.287400e+02\n5 14419     3.417300e+02 -2.584998e+01\n8 14419     -2.206100e+02 3.046600e+02\n11 14419     8.128003e+01 -1.636900e+02\n13 14419     1.348500e+02 2.655800e+02\n14 14419     2.484500e+02 -1.179900e+02\n2 14420     -5.119400e+02 3.963300e+02\n4 14420     9.415997e+01 -2.405400e+02\n5 14420     1.929600e+02 -3.141998e+01\n8 14420     -3.422000e+02 3.014400e+02\n2 14421     -5.977500e+02 3.949700e+02\n4 14421     9.703003e+01 -1.932800e+02\n5 14421     1.105800e+02 -3.503998e+01\n8 14421     -4.123500e+02 2.984300e+02\n2 14422     3.017999e+01 3.913500e+02\n6 14422     -8.926001e+01 7.478800e+02\n9 14422     -1.311300e+02 4.148800e+02\n13 14422     4.909700e+02 2.958000e+02\n14 14422     6.795601e+02 -9.496002e+01\n2 14423     4.036600e+02 3.912700e+02\n3 14423     2.561500e+02 6.169000e+01\n8 14423     3.980500e+02 2.965700e+02\n9 14423     1.984200e+02 4.260600e+02\n2 14424     -7.580700e+02 3.878500e+02\n5 14424     -3.553003e+01 -4.590997e+01\n2 14425     5.038101e+02 3.839300e+02\n6 14425     4.309200e+02 5.841900e+02\n8 14425     4.763600e+02 2.860000e+02\n9 14425     2.860601e+02 4.234800e+02\n12 14425     5.139399e+02 5.918300e+02\n2 14426     3.037000e+01 3.828800e+02\n6 14426     -8.917001e+01 7.379600e+02\n8 14426     1.061000e+02 3.016800e+02\n9 14426     -1.299300e+02 4.079400e+02\n13 14426     4.901600e+02 2.887800e+02\n14 14426     6.789900e+02 -1.028600e+02\n2 14427     -2.602300e+02 3.801400e+02\n3 14427     -3.907900e+02 4.697998e+01\n4 14427     7.457001e+01 -3.948400e+02\n5 14427     4.495100e+02 -3.728998e+01\n6 14427     -4.509800e+02 6.694700e+02\n8 14427     -1.350000e+02 2.937700e+02\n11 14427     1.804600e+02 -1.713800e+02\n13 14427     2.225200e+02 2.625700e+02\n2 14428     -9.417999e+01 3.801200e+02\n5 14428     6.346000e+02 -2.981000e+01\n2 14429     6.217500e+02 3.795400e+02\n3 14429     4.689700e+02 5.582001e+01\n6 14429     5.660200e+02 5.618100e+02\n7 14429     5.697200e+02 5.367600e+02\n8 14429     5.747100e+02 2.801900e+02\n9 14429     3.866500e+02 4.227700e+02\n12 14429     6.440400e+02 5.747300e+02\n2 14430     2.757000e+02 3.784700e+02\n8 14430     2.942200e+02 2.888500e+02\n9 14430     8.870001e+01 4.119900e+02\n13 14430     6.602900e+02 2.071500e+02\n2 14431     -2.863700e+02 3.750300e+02\n3 14431     -4.172400e+02 4.196997e+01\n4 14431     7.300000e+01 -3.761400e+02\n5 14431     4.207000e+02 -4.328998e+01\n6 14431     -4.833400e+02 6.571600e+02\n8 14431     -1.564700e+02 2.895000e+02\n2 14432     -2.797700e+02 3.733400e+02\n5 14432     4.277800e+02 -4.521997e+01\n6 14432     -4.747200e+02 6.563400e+02\n8 14432     -1.512000e+02 2.885000e+02\n2 14433     -2.797700e+02 3.733400e+02\n6 14433     -4.747200e+02 6.563400e+02\n8 14433     -1.512000e+02 2.885000e+02\n13 14433     2.053000e+02 2.556200e+02\n14 14433     3.329500e+02 -1.334000e+02\n2 14434     -6.060700e+02 3.682800e+02\n5 14434     1.004500e+02 -5.820001e+01\n13 14434     -6.009998e+01 2.300100e+02\n2 14435     -6.060700e+02 3.682800e+02\n4 14435     8.544000e+01 -1.870500e+02\n5 14435     1.004500e+02 -5.820001e+01\n8 14435     -4.183900e+02 2.773800e+02\n11 14435     -1.319700e+02 -1.943700e+02\n12 14435     -6.808800e+02 5.756200e+02\n13 14435     -6.009998e+01 2.300100e+02\n2 14436     -6.060700e+02 3.682800e+02\n4 14436     8.544000e+01 -1.870500e+02\n5 14436     1.004500e+02 -5.820001e+01\n8 14436     -4.183900e+02 2.773800e+02\n12 14436     -6.808800e+02 5.756200e+02\n13 14436     -6.009998e+01 2.300100e+02\n2 14437     -5.957500e+02 3.692600e+02\n4 14437     8.548999e+01 -1.924600e+02\n5 14437     1.100600e+02 -5.706000e+01\n11 14437     -1.246000e+02 -1.931900e+02\n12 14437     -6.688400e+02 5.787000e+02\n13 14437     -5.263000e+01 2.310800e+02\n14 14437     2.240997e+01 -1.508100e+02\n2 14438     -6.694600e+02 3.679300e+02\n4 14438     8.804999e+01 -1.542000e+02\n5 14438     4.169000e+01 -6.006000e+01\n8 14438     -4.703800e+02 2.750700e+02\n11 14438     -1.844800e+02 -1.968500e+02\n12 14438     -7.538100e+02 5.652900e+02\n2 14439     1.361600e+02 3.663600e+02\n3 14439     -1.694000e+01 3.127002e+01\n6 14439     4.533002e+01 7.423700e+02\n8 14439     1.943500e+02 2.907800e+02\n9 14439     -4.038000e+01 3.966900e+02\n2 14440     -3.975200e+02 3.644200e+02\n4 14440     7.341998e+01 -3.043600e+02\n5 14440     3.042100e+02 -5.650000e+01\n11 14440     4.962000e+01 -1.899100e+02\n2 14441     1.164100e+02 3.629600e+02\n3 14441     -3.500000e+01 2.815002e+01\n6 14441     2.197998e+01 7.363600e+02\n8 14441     1.790100e+02 2.892200e+02\n2 14442     2.526100e+02 3.583000e+02\n6 14442     1.551800e+02 6.248100e+02\n8 14442     2.757500e+02 2.730000e+02\n9 14442     6.846002e+01 3.936800e+02\n12 14442     2.678700e+02 6.086100e+02\n13 14442     6.388199e+02 1.942500e+02\n14 14442     8.701600e+02 -2.223700e+02\n2 14443     -6.200700e+02 3.530200e+02\n4 14443     7.915002e+01 -1.781600e+02\n5 14443     8.587000e+01 -7.144000e+01\n8 14443     -4.301500e+02 2.649700e+02\n12 14443     -6.946300e+02 5.574800e+02\n2 14444     1.232500e+02 3.524300e+02\n3 14444     -2.853003e+01 1.832001e+01\n6 14444     2.904999e+01 7.212000e+02\n8 14444     1.835000e+02 2.788400e+02\n9 14444     -5.059998e+01 3.843400e+02\n13 14444     5.803500e+02 2.721000e+02\n14 14444     7.911100e+02 -1.253100e+02\n2 14445     -6.034998e+01 3.461500e+02\n6 14445     -2.011700e+02 6.734100e+02\n8 14445     3.071997e+01 2.710600e+02\n9 14445     -2.059200e+02 3.730300e+02\n2 14446     4.983700e+02 3.438700e+02\n6 14446     4.216400e+02 5.360500e+02\n2 14447     -9.470001e+01 3.388700e+02\n6 14447     -2.441100e+02 6.574100e+02\n8 14447     1.940002e+00 2.647900e+02\n9 14447     -2.350000e+02 3.659800e+02\n2 14448     5.074900e+02 3.362300e+02\n3 14448     3.618600e+02 1.128003e+01\n6 14448     4.335300e+02 5.301200e+02\n7 14448     4.587000e+02 5.174900e+02\n9 14448     2.907900e+02 3.836600e+02\n10 14448     6.423000e+02 6.124700e+02\n13 14448     8.348300e+02 1.026400e+02\n2 14449     -6.146200e+02 3.341600e+02\n5 14449     8.921002e+01 -8.822998e+01\n8 14449     -4.260800e+02 2.492700e+02\n2 14450     1.038200e+02 3.303600e+02\n6 14450     3.159973e+00 6.898200e+02\n8 14450     1.660000e+02 2.607900e+02\n2 14451     5.041700e+02 3.287000e+02\n6 14451     4.288400e+02 5.219300e+02\n9 14451     2.873500e+02 3.759600e+02\n2 14452     -4.365300e+02 3.265600e+02\n3 14452     -5.614500e+02 -3.580017e+00\n2 14453     -4.365300e+02 3.265600e+02\n3 14453     -5.614500e+02 -3.580017e+00\n2 14454     -3.116998e+01 3.191200e+02\n6 14454     -1.642300e+02 6.466500e+02\n8 14454     5.447998e+01 2.495300e+02\n9 14454     -1.804100e+02 3.501100e+02\n12 14454     5.700073e-01 6.078000e+02\n2 14455     2.874100e+02 3.105300e+02\n3 14455     1.461900e+02 -1.808002e+01\n6 14455     1.934400e+02 5.633200e+02\n7 14455     2.943800e+02 5.630000e+02\n8 14455     3.034200e+02 2.335900e+02\n9 14455     1.005200e+02 3.536200e+02\n12 14455     3.031400e+02 5.515200e+02\n13 14455     6.629900e+02 1.486300e+02\n2 14456     2.874100e+02 3.105300e+02\n3 14456     1.461900e+02 -1.808002e+01\n7 14456     2.943800e+02 5.630000e+02\n8 14456     3.034200e+02 2.335900e+02\n9 14456     1.005200e+02 3.536200e+02\n11 14456     6.124000e+02 -3.107700e+02\n12 14456     3.031400e+02 5.515200e+02\n13 14456     6.629900e+02 1.486300e+02\n2 14457     4.045601e+02 3.099800e+02\n3 14457     2.594900e+02 -1.564001e+01\n8 14457     3.977400e+02 2.305600e+02\n9 14457     2.005100e+02 3.570800e+02\n2 14458     4.045601e+02 3.099800e+02\n3 14458     2.594900e+02 -1.564001e+01\n8 14458     3.977400e+02 2.305600e+02\n2 14459     -4.140300e+02 3.092100e+02\n3 14459     -5.399600e+02 -2.035999e+01\n4 14459     4.740997e+01 -2.888300e+02\n5 14459     2.830601e+02 -1.063900e+02\n8 14459     -2.612500e+02 2.341400e+02\n2 14460     5.083101e+02 3.052000e+02\n6 14460     4.318300e+02 4.939600e+02\n7 14460     4.559399e+02 4.871600e+02\n9 14460     2.918500e+02 3.562800e+02\n10 14460     6.362200e+02 5.768000e+02\n12 14460     5.149399e+02 5.026800e+02\n2 14461     -4.936300e+02 3.024600e+02\n3 14461     -6.181600e+02 -2.560999e+01\n5 14461     2.026300e+02 -1.134500e+02\n8 14461     -3.267000e+02 2.278000e+02\n2 14462     -9.370001e+01 2.987200e+02\n3 14462     -2.337900e+02 -3.376001e+01\n4 14462     2.062000e+01 -5.059100e+02\n5 14462     6.265699e+02 -1.100900e+02\n8 14462     2.679993e+00 2.305200e+02\n9 14462     -2.324200e+02 3.304500e+02\n11 14462     3.458700e+02 -2.298900e+02\n12 14462     -7.421997e+01 5.750500e+02\n2 14463     -1.459000e+02 2.969800e+02\n3 14463     -2.829900e+02 -3.691998e+01\n8 14463     -4.003998e+01 2.315000e+02\n9 14463     -2.767100e+02 3.273900e+02\n2 14464     -2.693900e+02 2.941200e+02\n3 14464     -4.008500e+02 -3.816998e+01\n6 14464     -4.552900e+02 5.661100e+02\n8 14464     -1.420500e+02 2.259300e+02\n9 14464     -3.821200e+02 3.215100e+02\n12 14464     -2.816100e+02 5.478900e+02\n2 14465     -4.102100e+02 2.907500e+02\n5 14465     2.824700e+02 -1.237800e+02\n8 14465     -2.573100e+02 2.202100e+02\n2 14466     5.796600e+02 2.906300e+02\n7 14466     5.182600e+02 4.573400e+02\n9 14466     3.521500e+02 3.468900e+02\n10 14466     7.075900e+02 5.322900e+02\n2 14467     -6.163900e+02 2.887100e+02\n4 14467     5.001001e+01 -1.745500e+02\n5 14467     8.334003e+01 -1.269800e+02\n2 14468     -3.109400e+02 2.848000e+02\n4 14468     2.897998e+01 -3.498400e+02\n5 14468     3.863400e+02 -1.265600e+02\n6 14468     -5.052900e+02 5.463500e+02\n8 14468     -1.758400e+02 2.176800e+02\n11 14468     1.292200e+02 -2.454300e+02\n12 14468     -3.294600e+02 5.318700e+02\n2 14469     -1.552800e+02 2.800200e+02\n8 14469     -4.903998e+01 2.158100e+02\n9 14469     -2.829500e+02 3.122700e+02\n2 14470     6.182900e+02 2.789800e+02\n7 14470     5.511500e+02 4.370300e+02\n2 14471     -1.731700e+02 2.779300e+02\n6 14471     -3.361200e+02 5.678500e+02\n2 14472     3.941600e+02 2.773000e+02\n3 14472     2.508300e+02 -4.701001e+01\n8 14472     3.895600e+02 2.041100e+02\n9 14472     1.927400e+02 3.294500e+02\n2 14473     -5.939400e+02 2.745200e+02\n4 14473     4.228998e+01 -1.847400e+02\n5 14473     1.030900e+02 -1.386700e+02\n7 14473     -5.397500e+02 5.476300e+02\n8 14473     -4.085300e+02 2.034400e+02\n2 14474     -5.939400e+02 2.745200e+02\n4 14474     4.228998e+01 -1.847400e+02\n7 14474     -5.397500e+02 5.476300e+02\n8 14474     -4.085300e+02 2.034400e+02\n2 14475     -5.939400e+02 2.745200e+02\n4 14475     4.228998e+01 -1.847400e+02\n7 14475     -5.397500e+02 5.476300e+02\n2 14476     -5.939400e+02 2.745200e+02\n4 14476     4.228998e+01 -1.847400e+02\n8 14476     -4.085300e+02 2.034400e+02\n2 14477     -4.797100e+02 2.749500e+02\n5 14477     2.139900e+02 -1.377100e+02\n7 14477     -4.231900e+02 5.609500e+02\n2 14478     -6.509998e+01 2.755100e+02\n6 14478     -2.066200e+02 5.856300e+02\n8 14478     2.575000e+01 2.145600e+02\n2 14479     -6.410700e+02 2.735600e+02\n5 14479     5.852002e+01 -1.398600e+02\n8 14479     -4.467800e+02 2.016300e+02\n2 14480     4.322000e+02 2.736200e+02\n6 14480     3.450600e+02 4.699400e+02\n8 14480     4.160100e+02 1.979500e+02\n9 14480     2.275699e+02 3.279000e+02\n13 14480     7.611000e+02 6.652002e+01\n2 14481     -1.738000e+01 2.731200e+02\n6 14481     -1.445800e+02 5.959600e+02\n8 14481     6.609003e+01 2.136700e+02\n2 14482     -4.484800e+02 2.716400e+02\n4 14482     3.176001e+01 -2.645500e+02\n7 14482     -3.913100e+02 5.614800e+02\n2 14483     3.254500e+02 2.712500e+02\n6 14483     2.375200e+02 5.117700e+02\n8 14483     3.339500e+02 2.006800e+02\n9 14483     1.324900e+02 3.213900e+02\n2 14484     -2.687900e+02 2.657200e+02\n3 14484     -4.009100e+02 -6.667999e+01\n6 14484     -4.525300e+02 5.337600e+02\n8 14484     -1.415100e+02 2.034800e+02\n12 14484     -2.789500e+02 5.193800e+02\n2 14485     3.637100e+02 2.635300e+02\n3 14485     2.207900e+02 -6.064001e+01\n6 14485     2.789700e+02 4.992400e+02\n7 14485     3.553199e+02 5.029300e+02\n8 14485     3.640900e+02 1.941400e+02\n9 14485     1.659700e+02 3.160400e+02\n12 14485     3.813700e+02 4.931500e+02\n13 14485     7.219600e+02 9.520001e+01\n2 14486     3.805100e+02 2.616300e+02\n3 14486     2.374600e+02 -6.246002e+01\n6 14486     2.982900e+02 4.935500e+02\n8 14486     3.781800e+02 1.912000e+02\n9 14486     1.807700e+02 3.146400e+02\n12 14486     3.991200e+02 4.881600e+02\n13 14486     7.361700e+02 9.014999e+01\n2 14487     -4.062900e+02 2.606000e+02\n4 14487     2.381000e+01 -2.892600e+02\n7 14487     -3.472400e+02 5.559000e+02\n8 14487     -2.549500e+02 1.962800e+02\n11 14487     4.008002e+01 -2.660900e+02\n2 14488     -4.260100e+02 2.581400e+02\n4 14488     2.340997e+01 -2.763000e+02\n5 14488     2.656200e+02 -1.527000e+02\n7 14488     -3.673400e+02 5.513900e+02\n8 14488     -2.705600e+02 1.935000e+02\n11 14488     2.026001e+01 -2.691500e+02\n12 14488     -4.601100e+02 4.865000e+02\n2 14489     5.583400e+02 2.566800e+02\n7 14489     4.951400e+02 4.289700e+02\n8 14489     5.196400e+02 1.767500e+02\n9 14489     3.352600e+02 3.134200e+02\n10 14489     6.767200e+02 4.991200e+02\n12 14489     5.665800e+02 4.382800e+02\n2 14490     4.365300e+02 2.546600e+02\n6 14490     3.494000e+02 4.479200e+02\n8 14490     4.199900e+02 1.817300e+02\n9 14490     2.318300e+02 3.114000e+02\n2 14491     3.714100e+02 2.519700e+02\n3 14491     2.287400e+02 -7.195001e+01\n7 14491     3.611300e+02 4.901200e+02\n8 14491     3.705300e+02 1.840800e+02\n9 14491     1.738700e+02 3.061500e+02\n12 14491     3.894000e+02 4.794600e+02\n13 14491     7.273900e+02 8.367999e+01\n2 14492     3.714100e+02 2.519700e+02\n3 14492     2.287400e+02 -7.195001e+01\n6 14492     2.876600e+02 4.844800e+02\n8 14492     3.705300e+02 1.840800e+02\n9 14492     1.738700e+02 3.061500e+02\n12 14492     3.894000e+02 4.794600e+02\n13 14492     7.273900e+02 8.367999e+01\n2 14493     5.131899e+02 2.508200e+02\n3 14493     3.709399e+02 -6.772998e+01\n6 14493     4.349100e+02 4.325200e+02\n8 14493     4.823400e+02 1.763700e+02\n2 14494     -7.183000e+02 2.466900e+02\n4 14494     3.754999e+01 -1.197400e+02\n5 14494     -1.382001e+01 -1.622600e+02\n8 14494     -5.094100e+02 1.789900e+02\n11 14494     -2.279100e+02 -2.795200e+02\n12 14494     -7.916000e+02 4.331600e+02\n2 14495     -5.999000e+02 2.403000e+02\n4 14495     2.756000e+01 -1.783400e+02\n5 14495     9.409998e+01 -1.679100e+02\n7 14495     -5.422900e+02 5.170900e+02\n12 14495     -6.572400e+02 4.436800e+02\n2 14496     2.648700e+02 2.352400e+02\n6 14496     1.674300e+02 4.802900e+02\n7 14496     2.691801e+02 4.968600e+02\n8 14496     2.848700e+02 1.726700e+02\n9 14496     8.247998e+01 2.883900e+02\n12 14496     2.794600e+02 4.715800e+02\n2 14497     5.835500e+02 2.303700e+02\n6 14497     5.127600e+02 4.009300e+02\n12 14497     5.938000e+02 4.114300e+02\n2 14498     3.420500e+02 2.279000e+02\n7 14498     3.340500e+02 4.735400e+02\n10 14498     5.045100e+02 5.803200e+02\n2 14499     -4.677800e+02 2.255300e+02\n3 14499     -5.955900e+02 -1.040700e+02\n13 14499     4.303003e+01 1.354200e+02\n2 14500     3.212000e+02 2.224600e+02\n3 14500     1.807300e+02 -1.019500e+02\n6 14500     2.303600e+02 4.581900e+02\n7 14500     3.156600e+02 4.729100e+02\n8 14500     3.299600e+02 1.612500e+02\n9 14500     1.309400e+02 2.792900e+02\n10 14500     4.830300e+02 5.820500e+02\n12 14500     3.372800e+02 4.523500e+02\n2 14501     3.212000e+02 2.224600e+02\n3 14501     1.807300e+02 -1.019500e+02\n6 14501     2.303600e+02 4.581900e+02\n7 14501     3.156600e+02 4.729100e+02\n8 14501     3.299600e+02 1.612500e+02\n9 14501     1.309400e+02 2.792900e+02\n10 14501     4.830300e+02 5.820500e+02\n12 14501     3.372800e+02 4.523500e+02\n2 14502     -3.971400e+02 2.199200e+02\n3 14502     -5.267600e+02 -1.110200e+02\n2 14503     3.008000e+02 2.178600e+02\n10 14503     4.633900e+02 5.832700e+02\n2 14504     3.416500e+02 2.178300e+02\n3 14504     1.989301e+02 -1.042400e+02\n9 14504     1.470900e+02 2.770100e+02\n12 14504     3.563600e+02 4.462100e+02\n2 14505     -5.970300e+02 2.167600e+02\n4 14505     1.653998e+01 -1.776600e+02\n7 14505     -5.370300e+02 4.970400e+02\n8 14505     -4.101100e+02 1.581100e+02\n11 14505     -1.305600e+02 -2.998200e+02\n2 14506     -3.724400e+02 2.167900e+02\n5 14506     3.148101e+02 -1.898300e+02\n6 14506     -5.733800e+02 4.547900e+02\n11 14506     6.895001e+01 -2.976000e+02\n12 14506     -3.948000e+02 4.522100e+02\n2 14507     3.508600e+02 2.162300e+02\n8 14507     3.537300e+02 1.554600e+02\n2 14508     -2.644200e+02 2.131500e+02\n3 14508     -3.973800e+02 -1.181200e+02\n13 14508     2.101200e+02 1.362700e+02\n14 14508     3.374000e+02 -2.776900e+02\n2 14509     -2.205600e+02 2.118800e+02\n3 14509     -3.551600e+02 -1.198900e+02\n12 14509     -2.190200e+02 4.690300e+02\n13 14509     2.478600e+02 1.378300e+02\n14 14509     3.841100e+02 -2.775100e+02\n2 14510     3.706700e+02 2.112000e+02\n3 14510     2.297100e+02 -1.110900e+02\n8 14510     3.690800e+02 1.512500e+02\n9 14510     1.739100e+02 2.714800e+02\n13 14510     7.221700e+02 5.089001e+01\n2 14511     -4.364700e+02 2.097700e+02\n4 14511     1.530029e+00 -2.651800e+02\n7 14511     -3.747400e+02 5.076800e+02\n8 14511     -2.792300e+02 1.555400e+02\n13 14511     6.781000e+01 1.260200e+02\n2 14512     -9.260999e+01 2.100800e+02\n3 14512     -2.320900e+02 -1.213300e+02\n5 14512     6.183400e+02 -1.945800e+02\n7 14512     -1.462000e+01 5.433900e+02\n8 14512     4.119995e+00 1.621900e+02\n9 14512     -2.275200e+02 2.539500e+02\n13 14512     3.614399e+02 1.437600e+02\n14 14512     5.247300e+02 -2.750000e+02\n2 14513     5.853003e+01 2.094100e+02\n5 14513     7.978800e+02 -1.952500e+02\n9 14513     -1.009800e+02 2.580400e+02\n2 14514     -7.007700e+02 2.037000e+02\n4 14514     1.831000e+01 -1.246100e+02\n2 14515     3.638600e+02 2.033000e+02\n3 14515     2.233199e+02 -1.193700e+02\n6 14515     2.780400e+02 4.305000e+02\n7 14515     3.502200e+02 4.458500e+02\n8 14515     3.639800e+02 1.446600e+02\n9 14515     1.680500e+02 2.644600e+02\n12 14515     3.805200e+02 4.272100e+02\n13 14515     7.157100e+02 4.523999e+01\n2 14516     3.712700e+02 2.030300e+02\n6 14516     2.857800e+02 4.302800e+02\n7 14516     3.564399e+02 4.444100e+02\n2 14517     3.712700e+02 2.030300e+02\n6 14517     2.857800e+02 4.302800e+02\n7 14517     3.564399e+02 4.444100e+02\n9 14517     1.753900e+02 2.649000e+02\n12 14517     3.879800e+02 4.270900e+02\n13 14517     7.220400e+02 4.384003e+01\n2 14518     -4.297500e+02 2.011100e+02\n5 14518     2.559399e+02 -2.030300e+02\n8 14518     -2.732500e+02 1.490800e+02\n12 14518     -4.589500e+02 4.283400e+02\n14 14518     1.695000e+02 -2.911100e+02\n2 14519     -3.954100e+02 1.977100e+02\n3 14519     -5.249200e+02 -1.321800e+02\n4 14519     -7.169983e+00 -2.877200e+02\n5 14519     2.896100e+02 -2.058200e+02\n7 14519     -3.321300e+02 5.018300e+02\n8 14519     -2.453600e+02 1.473300e+02\n11 14519     4.746997e+01 -3.132200e+02\n12 14519     -4.204600e+02 4.303400e+02\n2 14520     -4.883100e+02 1.967600e+02\n4 14520     -5.100098e-01 -2.346500e+02\n5 14520     1.972300e+02 -2.066100e+02\n7 14520     -4.261600e+02 4.910600e+02\n8 14520     -3.218700e+02 1.440800e+02\n11 14520     -3.659998e+01 -3.131100e+02\n12 14520     -5.259200e+02 4.151000e+02\n2 14521     4.997100e+02 1.924800e+02\n3 14521     3.594100e+02 -1.234900e+02\n6 14521     4.173800e+02 3.709900e+02\n7 14521     4.365000e+02 3.819800e+02\n9 14521     2.864301e+02 2.609300e+02\n10 14521     6.025601e+02 4.486100e+02\n13 14521     8.108600e+02 -1.453998e+01\n2 14522     -3.417500e+02 1.906600e+02\n5 14522     3.430400e+02 -2.155100e+02\n2 14523     3.755200e+02 1.912700e+02\n3 14523     2.346801e+02 -1.299400e+02\n6 14523     2.906900e+02 4.164000e+02\n8 14523     3.733000e+02 1.350700e+02\n9 14523     1.786200e+02 2.550700e+02\n12 14523     3.925900e+02 4.135500e+02\n13 14523     7.242300e+02 3.358002e+01\n2 14524     5.891300e+02 1.876700e+02\n7 14524     5.135000e+02 3.570000e+02\n9 14524     3.630200e+02 2.595300e+02\n10 14524     6.928199e+02 4.092300e+02\n2 14525     -1.770500e+02 1.870700e+02\n4 14525     -3.237000e+01 -4.279400e+02\n5 14525     5.199399e+02 -2.170200e+02\n7 14525     -1.049900e+02 5.137500e+02\n8 14525     -6.646997e+01 1.421700e+02\n2 14526     -3.576200e+02 1.859600e+02\n13 14526     1.292200e+02 1.097900e+02\n2 14527     5.228101e+02 1.836100e+02\n9 14527     3.058800e+02 2.550200e+02\n12 14527     5.262200e+02 3.668100e+02\n2 14528     -4.915500e+02 1.827800e+02\n4 14528     -6.489990e+00 -2.311400e+02\n5 14528     1.925400e+02 -2.184800e+02\n7 14528     -4.289000e+02 4.788000e+02\n8 14528     -3.239300e+02 1.339900e+02\n2 14529     6.984700e+02 1.806500e+02\n9 14529     4.546600e+02 2.575400e+02\n2 14530     6.984700e+02 1.806500e+02\n9 14530     4.546600e+02 2.575400e+02\n2 14531     6.805000e+02 1.798300e+02\n3 14531     5.346300e+02 -1.293500e+02\n7 14531     5.949000e+02 3.281700e+02\n9 14531     4.396100e+02 2.562000e+02\n10 14531     7.882600e+02 3.648800e+02\n12 14531     6.961600e+02 3.429900e+02\n2 14532     2.139000e+02 1.759500e+02\n3 14532     1.052700e+02 -1.438000e+02\n2 14533     -2.887100e+02 1.634500e+02\n7 14533     -2.207600e+02 4.821000e+02\n2 14534     -2.887100e+02 1.634500e+02\n6 14534     -4.681100e+02 4.121500e+02\n7 14534     -2.207600e+02 4.821000e+02\n2 14535     -5.728000e+02 1.608100e+02\n5 14535     1.118600e+02 -2.366900e+02\n7 14535     -5.082600e+02 4.494600e+02\n8 14535     -3.900300e+02 1.142800e+02\n12 14535     -6.173000e+02 3.654900e+02\n14 14535     2.781000e+01 -3.274200e+02\n2 14536     -2.981300e+02 1.610000e+02\n6 14536     -4.793100e+02 4.078900e+02\n7 14536     -2.302300e+02 4.794900e+02\n9 14536     -4.006500e+02 2.036300e+02\n2 14537     -4.694800e+02 1.551700e+02\n7 14537     -4.051500e+02 4.574300e+02\n10 14537     -3.659300e+02 6.154500e+02\n2 14538     -6.952100e+02 1.535100e+02\n5 14538     -2.520020e+00 -2.402000e+02\n7 14538     -6.261400e+02 4.329800e+02\n10 14538     -6.292600e+02 5.976800e+02\n2 14539     -5.995800e+02 1.534000e+02\n4 14539     -1.117999e+01 -1.704400e+02\n5 14539     8.540002e+01 -2.422800e+02\n7 14539     -5.336400e+02 4.422700e+02\n10 14539     -5.196400e+02 6.038500e+02\n11 14539     -1.348100e+02 -3.436700e+02\n12 14539     -6.464500e+02 3.559500e+02\n13 14539     -6.231000e+01 8.010001e+01\n14 14539     2.510010e+00 -3.334900e+02\n2 14540     8.169100e+02 1.531300e+02\n3 14540     6.652000e+02 -1.497700e+02\n7 14540     7.141400e+02 2.697500e+02\n9 14540     5.523500e+02 2.376700e+02\n2 14541     -6.422600e+02 1.501500e+02\n4 14541     -9.150024e+00 -1.483600e+02\n7 14541     -5.754900e+02 4.357100e+02\n2 14542     5.973101e+02 1.478100e+02\n3 14542     4.560800e+02 -1.635700e+02\n6 14542     5.235601e+02 3.085600e+02\n7 14542     5.172500e+02 3.178500e+02\n8 14542     5.506700e+02 8.994000e+01\n2 14543     1.710500e+02 1.387100e+02\n3 14543     7.481000e+01 -1.777500e+02\n5 14543     7.067100e+02 -5.431700e+02\n6 14543     -1.080017e+00 1.603100e+02\n8 14543     1.755300e+02 6.882001e+01\n12 14543     2.410999e+01 2.132100e+02\n2 14544     7.073999e+01 1.348300e+02\n3 14544     -2.325000e+01 -1.839600e+02\n5 14544     6.101100e+02 -5.152000e+02\n6 14544     -1.062300e+02 1.674300e+02\n7 14544     -1.090700e+02 2.485400e+02\n8 14544     9.508002e+01 6.875000e+01\n10 14544     -1.006000e+02 3.045600e+02\n12 14544     -7.313000e+01 2.197700e+02\n13 14544     3.481000e+02 -1.063500e+02\n15 14544     -4.282001e+01 3.287000e+02\n2 14545     5.601000e+02 1.348100e+02\n3 14545     4.214900e+02 -1.771600e+02\n8 14545     5.200601e+02 7.981000e+01\n9 14545     3.392800e+02 2.144900e+02\n15 14545     8.630500e+02 4.083600e+02\n2 14546     -7.242900e+02 1.326000e+02\n4 14546     -1.046997e+01 -1.069000e+02\n7 14546     -6.518200e+02 4.121600e+02\n8 14546     -5.129400e+02 8.956000e+01\n11 14546     -2.373800e+02 -3.564000e+02\n12 14546     -7.826100e+02 3.183900e+02\n2 14547     -3.682700e+02 1.324300e+02\n6 14547     -5.613300e+02 3.613100e+02\n7 14547     -3.014500e+02 4.474600e+02\n9 14547     -4.595700e+02 1.757800e+02\n14 14547     2.248700e+02 -3.522900e+02\n2 14548     -6.780300e+02 1.290000e+02\n4 14548     -1.588000e+01 -1.288000e+02\n5 14548     1.077002e+01 -2.617600e+02\n8 14548     -4.750200e+02 8.692999e+01\n2 14549     -4.841500e+02 1.275500e+02\n4 14549     -3.242999e+01 -2.299000e+02\n7 14549     -4.169700e+02 4.323100e+02\n8 14549     -3.174200e+02 9.032001e+01\n10 14549     -3.807800e+02 5.868200e+02\n12 14549     -5.136700e+02 3.466000e+02\n2 14550     1.591300e+02 1.277800e+02\n8 14550     1.640800e+02 6.045999e+01\n2 14551     2.997100e+02 1.281000e+02\n8 14551     2.816100e+02 5.923001e+01\n13 14551     5.218199e+02 -1.480900e+02\n2 14552     -6.198300e+02 1.256900e+02\n4 14552     -2.171997e+01 -1.575200e+02\n7 14552     -5.508600e+02 4.169000e+02\n8 14552     -4.281700e+02 8.635001e+01\n10 14552     -5.403100e+02 5.751500e+02\n11 14552     -1.543700e+02 -3.629800e+02\n13 14552     -7.850000e+01 6.040997e+01\n2 14553     1.230800e+02 1.221900e+02\n6 14553     -5.431000e+01 1.413100e+02\n2 14554     5.378700e+02 1.149000e+02\n7 14554     4.625100e+02 3.020100e+02\n9 14554     3.213900e+02 1.965700e+02\n2 14555     -6.157000e+02 1.124700e+02\n7 14555     -5.453600e+02 4.065500e+02\n10 14555     -5.355200e+02 5.629900e+02\n2 14556     4.862300e+02 1.123900e+02\n3 14556     3.498300e+02 -2.011300e+02\n6 14556     3.995200e+02 2.855800e+02\n8 14556     4.584399e+02 6.438000e+01\n9 14556     2.773800e+02 1.927600e+02\n12 14556     4.848500e+02 2.948400e+02\n2 14557     -2.642400e+02 1.071700e+02\n7 14557     -1.940300e+02 4.361000e+02\n9 14557     -3.690400e+02 1.580900e+02\n10 14557     -1.125000e+02 5.819600e+02\n11 14557     1.678500e+02 -3.786400e+02\n2 14558     -2.020020e+00 9.983002e+01\n8 14558     3.751001e+01 4.226999e+01\n2 14559     -2.824800e+02 9.848999e+01\n10 14559     -1.353700e+02 5.718700e+02\n13 14559     1.891400e+02 5.178998e+01\n2 14560     6.070400e+02 9.577002e+01\n3 14560     4.672500e+02 -2.126900e+02\n6 14560     5.311200e+02 2.521300e+02\n7 14560     5.186500e+02 2.691200e+02\n8 14560     5.584700e+02 4.707001e+01\n9 14560     3.800200e+02 1.830800e+02\n12 14560     6.113900e+02 2.620800e+02\n2 14561     6.781000e+01 9.446997e+01\n5 14561     5.899600e+02 -5.621400e+02\n6 14561     -1.134500e+02 1.133300e+02\n7 14561     -1.272300e+02 2.032100e+02\n12 14561     -8.817999e+01 1.678700e+02\n2 14562     2.119600e+02 9.352002e+01\n4 14562     -2.484500e+02 -4.757700e+02\n6 14562     3.865002e+01 9.909003e+01\n10 14562     -6.549988e+00 2.055800e+02\n2 14563     3.087500e+02 9.271997e+01\n3 14563     2.040601e+02 -2.177100e+02\n4 14563     -2.742600e+02 -5.447400e+02\n8 14563     2.824100e+02 2.826999e+01\n2 14564     8.030699e+02 9.129999e+01\n3 14564     6.569399e+02 -2.093900e+02\n9 14564     5.428199e+02 1.857100e+02\n2 14565     3.143101e+02 8.745001e+01\n3 14565     2.126801e+02 -2.224100e+02\n7 14565     8.228003e+01 1.638700e+02\n2 14566     2.554399e+02 8.145001e+01\n3 14566     1.568400e+02 -2.298200e+02\n8 14566     2.381100e+02 1.885999e+01\n2 14567     -4.603300e+02 7.937000e+01\n7 14567     -3.911000e+02 3.940200e+02\n12 14567     -4.829100e+02 3.019100e+02\n2 14568     4.816998e+01 7.885999e+01\n3 14568     -4.153998e+01 -2.372000e+02\n4 14568     -2.094800e+02 -3.809600e+02\n5 14568     5.698500e+02 -5.727000e+02\n6 14568     -1.327900e+02 9.703998e+01\n7 14568     -1.435300e+02 1.920200e+02\n8 14568     7.419000e+01 2.198001e+01\n12 14568     -1.070500e+02 1.525900e+02\n13 14568     3.182700e+02 -1.521000e+02\n2 14569     4.816998e+01 7.885999e+01\n12 14569     -1.070500e+02 1.525900e+02\n2 14570     4.844399e+02 7.721002e+01\n3 14570     3.497800e+02 -2.350000e+02\n6 14570     3.967700e+02 2.488700e+02\n7 14570     4.130400e+02 2.812900e+02\n10 14570     5.670300e+02 3.299800e+02\n12 14570     4.821200e+02 2.591800e+02\n13 14570     7.842500e+02 -1.040000e+02\n15 14570     7.616899e+02 3.689500e+02\n2 14571     7.368400e+02 7.716998e+01\n9 14571     4.888000e+02 1.726200e+02\n2 14572     -4.672000e+02 7.620001e+01\n5 14572     2.057000e+02 -3.109900e+02\n7 14572     -3.969100e+02 3.912100e+02\n8 14572     -3.033500e+02 5.253000e+01\n12 14572     -4.904400e+02 3.008100e+02\n14 14572     1.223000e+02 -3.994500e+02\n2 14573     6.566000e+02 7.214001e+01\n3 14573     5.175500e+02 -2.329100e+02\n9 14573     4.220400e+02 1.653400e+02\n10 14573     7.360900e+02 2.576800e+02\n12 14573     6.634800e+02 2.300600e+02\n2 14574     -9.150000e+01 6.845001e+01\n6 14574     -2.379600e+02 3.018100e+02\n2 14575     4.937100e+02 6.354999e+01\n6 14575     4.051200e+02 2.336900e+02\n7 14575     4.193700e+02 2.673400e+02\n8 14575     4.632100e+02 2.456000e+01\n9 14575     2.852100e+02 1.515900e+02\n12 14575     4.904900e+02 2.435800e+02\n2 14576     -4.212600e+02 5.956000e+01\n7 14576     -3.500500e+02 3.818200e+02\n2 14577     2.606100e+02 5.617999e+01\n3 14577     1.643600e+02 -2.535300e+02\n4 14577     -2.851500e+02 -4.960000e+02\n2 14578     1.644700e+02 5.520001e+01\n4 14578     -2.579800e+02 -4.335000e+02\n6 14578     -1.546997e+01 5.456000e+01\n2 14579     7.459998e+01 4.488000e+01\n3 14579     -1.359003e+01 -2.703400e+02\n4 14579     -2.374100e+02 -3.826500e+02\n6 14579     -1.070900e+02 5.254999e+01\n8 14579     9.313000e+01 -8.130005e+00\n10 14579     -1.400100e+02 1.905100e+02\n12 14579     -8.714001e+01 1.079000e+02\n2 14580     5.197400e+02 4.492999e+01\n6 14580     4.340100e+02 2.100600e+02\n8 14580     4.855000e+02 8.440002e+00\n9 14580     3.080300e+02 1.374200e+02\n10 14580     5.941400e+02 2.823500e+02\n2 14581     -4.346100e+02 4.371997e+01\n7 14581     -3.626800e+02 3.669000e+02\n13 14581     6.171002e+01 8.890015e+00\n14 14581     1.511200e+02 -4.296500e+02\n2 14582     4.861300e+02 4.194000e+01\n6 14582     3.985000e+02 2.115500e+02\n7 14582     4.111200e+02 2.504200e+02\n8 14582     4.584100e+02 7.410004e+00\n10 14582     5.616500e+02 2.940400e+02\n12 14582     4.838300e+02 2.217700e+02\n2 14583     -1.187000e+01 3.834003e+01\n3 14583     -1.001800e+02 -2.782400e+02\n5 14583     5.116200e+02 -5.891400e+02\n6 14583     -1.930400e+02 6.362000e+01\n7 14583     -1.861600e+02 1.712000e+02\n8 14583     2.685999e+01 -8.679993e+00\n12 14583     -1.612400e+02 1.197200e+02\n13 14583     2.754200e+02 -1.675800e+02\n2 14584     1.791200e+02 3.789001e+01\n3 14584     8.875000e+01 -2.728000e+02\n6 14584     -4.000244e-01 3.353003e+01\n7 14584     -5.446002e+01 1.232600e+02\n8 14584     1.770000e+02 -1.707999e+01\n12 14584     1.391998e+01 8.734003e+01\n13 14584     4.003101e+02 -2.143900e+02\n2 14585     5.994200e+02 3.785999e+01\n3 14585     4.640000e+02 -2.690300e+02\n6 14585     5.203800e+02 1.919300e+02\n8 14585     5.506600e+02 7.000732e-02\n12 14585     6.006700e+02 2.013800e+02\n2 14586     1.503600e+02 2.921002e+01\n3 14586     6.101001e+01 -2.813700e+02\n4 14586     -2.686100e+02 -4.179400e+02\n8 14586     1.526000e+02 -2.051999e+01\n13 14586     3.781700e+02 -2.140200e+02\n2 14587     3.559998e+00 2.779999e+01\n3 14587     -8.425000e+01 -2.872700e+02\n6 14587     -1.782800e+02 4.656000e+01\n7 14587     -1.795500e+02 1.532500e+02\n9 14587     -1.080300e+02 1.071600e+02\n12 14587     -1.505500e+02 1.026400e+02\n2 14588     4.221600e+02 2.564001e+01\n3 14588     3.126300e+02 -2.796200e+02\n2 14589     7.945300e+02 2.463000e+01\n9 14589     5.374000e+02 1.301100e+02\n2 14590     7.945300e+02 2.463000e+01\n9 14590     5.374000e+02 1.301100e+02\n2 14591     3.060601e+02 2.395001e+01\n15 14591     1.521899e+02 1.017900e+02\n2 14592     3.060601e+02 2.395001e+01\n4 14592     -3.191500e+02 -5.214301e+02\n7 14592     5.746997e+01 9.885001e+01\n10 14592     6.659998e+01 1.102000e+02\n2 14593     -4.608800e+02 2.314001e+01\n7 14593     -3.875000e+02 3.480900e+02\n2 14594     5.117200e+02 1.484003e+01\n8 14594     4.647200e+02 -2.697000e+01\n2 14595     5.179993e+00 1.206000e+01\n6 14595     -1.767000e+02 2.803003e+01\n7 14595     -1.814700e+02 1.383200e+02\n9 14595     -1.060200e+02 9.322000e+01\n12 14595     -1.503500e+02 8.384998e+01\n13 14595     2.806200e+02 -1.946200e+02\n15 14595     -1.462800e+02 1.864300e+02\n2 14596     5.179993e+00 1.206000e+01\n8 14596     3.907001e+01 -3.162000e+01\n2 14597     6.638101e+02 -2.150024e+00\n7 14597     5.577100e+02 1.674600e+02\n12 14597     6.645100e+02 1.521200e+02\n2 14598     6.638101e+02 -2.150024e+00\n7 14598     5.577100e+02 1.674600e+02\n9 14598     4.295100e+02 1.033900e+02\n2 14599     -1.464800e+02 -1.478998e+01\n3 14599     -2.391600e+02 -3.346200e+02\n2 14600     6.486500e+02 -2.441998e+01\n8 14600     5.906700e+02 -5.223001e+01\n9 14600     4.176200e+02 8.457999e+01\n2 14601     6.486500e+02 -2.441998e+01\n8 14601     5.906700e+02 -5.223001e+01\n9 14601     4.176200e+02 8.457999e+01\n2 14602     8.031200e+02 -3.253998e+01\n9 14602     5.453199e+02 8.370999e+01\n2 14603     7.300900e+02 -4.131000e+01\n9 14603     4.861200e+02 7.344000e+01\n12 14603     7.359700e+02 1.001300e+02\n2 14604     6.492900e+02 -4.721997e+01\n3 14604     5.175699e+02 -3.498700e+02\n6 14604     5.722400e+02 9.662000e+01\n8 14604     5.919600e+02 -7.178003e+01\n12 14604     6.502400e+02 1.062600e+02\n2 14605     7.131200e+02 -5.107001e+01\n7 14605     5.924301e+02 1.132000e+02\n9 14605     4.716600e+02 6.428003e+01\n2 14606     6.007300e+02 -5.603998e+01\n15 14606     8.707100e+02 1.535300e+02\n2 14607     -1.101100e+02 -5.654999e+01\n6 14607     -2.925700e+02 -2.853998e+01\n2 14608     7.250000e+02 -5.834003e+01\n9 14608     4.826899e+02 5.857001e+01\n2 14609     -4.441998e+01 -5.988000e+01\n6 14609     -2.279700e+02 -4.928998e+01\n8 14609     -3.359985e+00 -8.994000e+01\n2 14610     2.296801e+02 -6.366998e+01\n6 14610     4.909003e+01 -7.412000e+01\n7 14610     -2.378003e+01 2.684998e+01\n2 14611     5.846600e+02 -7.369000e+01\n10 14611     6.357700e+02 1.394600e+02\n2 14612     4.849800e+02 -8.097998e+01\n3 14612     3.769301e+02 -3.808600e+02\n15 14612     3.870000e+02 -3.909003e+01\n2 14613     7.165500e+02 -9.200000e+01\n9 14613     4.761500e+02 3.053998e+01\n2 14614     5.995400e+02 -9.490002e+01\n7 14614     4.927200e+02 1.058200e+02\n12 14614     5.957100e+02 6.478998e+01\n15 14614     8.607300e+02 1.085800e+02\n2 14615     -1.088900e+02 -1.036900e+02\n3 14615     -1.893500e+02 -4.180000e+02\n2 14616     -7.662000e+01 -1.198700e+02\n3 14616     -1.540900e+02 -4.328101e+02\n4 14616     -2.869800e+02 -2.685700e+02\n6 14616     -2.623400e+02 -1.249900e+02\n8 14616     -3.219000e+01 -1.398600e+02\n2 14617     7.206000e+02 -1.233200e+02\n9 14617     4.801300e+02 4.580017e+00\n2 14618     1.322500e+02 -1.263700e+02\n3 14618     5.165002e+01 -4.320300e+02\n6 14618     -5.276001e+01 -1.425200e+02\n7 14618     -1.161200e+02 -1.907001e+01\n8 14618     1.331700e+02 -1.510200e+02\n13 14618     3.393900e+02 -3.339100e+02\n2 14619     3.144100e+02 -1.258500e+02\n3 14619     2.262700e+02 -4.255500e+02\n2 14620     3.225601e+02 -1.294700e+02\n6 14620     1.429900e+02 -1.460800e+02\n8 14620     2.891300e+02 -1.575500e+02\n2 14621     -4.534003e+01 -1.314300e+02\n3 14621     -1.222800e+02 -4.425100e+02\n4 14621     -3.021100e+02 -2.777800e+02\n6 14621     -2.318600e+02 -1.418101e+02\n8 14621     -8.710022e+00 -1.505000e+02\n12 14621     -2.205500e+02 -8.010999e+01\n13 14621     2.160300e+02 -3.049600e+02\n2 14622     7.454600e+02 -1.306300e+02\n7 14622     6.109600e+02 3.925000e+01\n2 14623     4.968700e+02 -1.360600e+02\n3 14623     3.994200e+02 -4.294500e+02\n6 14623     3.273000e+02 -1.464700e+02\n8 14623     4.354800e+02 -1.655600e+02\n2 14624     7.714200e+02 -1.377300e+02\n7 14624     6.313800e+02 2.671002e+01\n9 14624     5.225000e+02 -5.010010e+00\n2 14625     7.814800e+02 -1.396800e+02\n12 14625     7.832300e+02 -9.219971e+00\n2 14626     2.053300e+02 -1.408500e+02\n7 14626     -5.952002e+01 -4.366998e+01\n2 14627     8.113900e+02 -1.486600e+02\n3 14627     6.851400e+02 -4.433101e+02\n12 14627     8.147900e+02 -2.312000e+01\n2 14628     4.988400e+02 -1.508700e+02\n9 14628     3.119100e+02 -2.025000e+01\n2 14629     1.351001e+01 -1.537700e+02\n3 14629     -6.034998e+01 -4.620400e+02\n6 14629     -1.742400e+02 -1.758700e+02\n8 14629     3.585999e+01 -1.719000e+02\n2 14630     -7.500000e+00 -1.575500e+02\n8 14630     1.996002e+01 -1.735400e+02\n2 14631     1.891998e+01 -1.587900e+02\n3 14631     -5.487000e+01 -4.662100e+02\n8 14631     4.020001e+01 -1.771800e+02\n2 14632     6.037000e+01 -1.622300e+02\n3 14632     -1.473999e+01 -4.684100e+02\n2 14633     9.246002e+01 -1.669400e+02\n3 14633     1.765002e+01 -4.723700e+02\n2 14634     -3.655500e+02 -1.685600e+02\n7 14634     -3.776700e+02 1.186600e+02\n8 14634     -2.377400e+02 -1.545200e+02\n10 14634     -3.724400e+02 2.081200e+02\n13 14634     5.814001e+01 -2.024200e+02\n15 14634     -3.464300e+02 2.083000e+02\n2 14635     1.110400e+02 -1.699400e+02\n6 14635     -7.815997e+01 -1.970500e+02\n12 14635     -8.082001e+01 -1.421600e+02\n2 14636     5.726001e+01 -1.757100e+02\n6 14636     -1.309100e+02 -1.979200e+02\n8 14636     6.996997e+01 -1.901900e+02\n2 14637     1.655000e+02 -1.773200e+02\n3 14637     8.858002e+01 -4.791100e+02\n4 14637     -3.952200e+02 -3.655200e+02\n6 14637     -2.396997e+01 -2.080100e+02\n12 14637     -2.809003e+01 -1.560000e+02\n2 14638     8.179200e+02 -1.799800e+02\n7 14638     6.559399e+02 -2.733002e+01\n2 14639     -8.509998e+01 -1.806700e+02\n4 14639     -3.117400e+02 -2.615200e+02\n9 14639     -1.719700e+02 -7.101001e+01\n2 14640     2.341100e+02 -1.814000e+02\n3 14640     1.558000e+02 -4.813800e+02\n2 14641     4.129700e+02 -1.830100e+02\n3 14641     3.244600e+02 -4.778400e+02\n6 14641     2.335800e+02 -2.014000e+02\n7 14641     1.159000e+02 -1.045600e+02\n8 14641     3.627400e+02 -2.024000e+02\n10 14641     1.132500e+02 -1.293500e+02\n12 14641     2.429100e+02 -1.630700e+02\n15 14641     2.100800e+02 -1.792500e+02\n2 14642     5.114900e+02 -1.839500e+02\n9 14642     3.207500e+02 -4.851001e+01\n2 14643     5.180000e+02 -1.871100e+02\n8 14643     4.578000e+02 -2.035800e+02\n9 14643     3.260200e+02 -5.096002e+01\n2 14644     4.216998e+01 -1.962300e+02\n6 14644     -1.441700e+02 -2.138101e+02\n7 14644     -1.956400e+02 -6.671002e+01\n8 14644     5.885999e+01 -2.055600e+02\n12 14644     -1.418600e+02 -1.568600e+02\n2 14645     3.049900e+02 -1.965500e+02\n13 14645     4.521000e+02 -4.224100e+02\n2 14646     8.073900e+02 -1.976100e+02\n7 14646     6.325400e+02 -4.907001e+01\n9 14646     5.544200e+02 -5.202002e+01\n2 14647     4.685200e+02 -2.019800e+02\n6 14647     2.969800e+02 -2.071400e+02\n12 14647     3.145000e+02 -1.735400e+02\n13 14647     6.017700e+02 -4.417100e+02\n2 14648     1.209200e+02 -2.034000e+02\n6 14648     -6.721997e+01 -2.269301e+02\n12 14648     -6.834998e+01 -1.726900e+02\n2 14649     -3.027200e+02 -2.214400e+02\n8 14649     -1.930300e+02 -2.001500e+02\n13 14649     8.758002e+01 -2.605700e+02\n15 14649     -3.199500e+02 1.159900e+02\n2 14650     -4.415600e+02 -2.300300e+02\n7 14650     -4.533000e+02 5.203003e+01\n13 14650     -4.409973e+00 -2.537200e+02\n15 14650     -4.578400e+02 1.244600e+02\n2 14651     2.062000e+01 -2.307200e+02\n3 14651     -5.271997e+01 -5.391100e+02\n2 14652     1.023900e+02 -2.338300e+02\n6 14652     -8.326001e+01 -2.501500e+02\n12 14652     -8.141998e+01 -1.972600e+02\n2 14653     2.061100e+02 -2.501500e+02\n3 14653     1.302200e+02 -5.517200e+02\n2 14654     2.923101e+02 -2.538400e+02\n3 14654     2.126801e+02 -5.516700e+02\n6 14654     1.075400e+02 -2.722500e+02\n8 14654     2.606600e+02 -2.588800e+02\n9 14654     1.474600e+02 -1.121800e+02\n12 14654     1.102400e+02 -2.296500e+02\n13 14654     4.416200e+02 -4.564399e+02\n15 14654     5.784998e+01 -2.172800e+02\n2 14655     4.015900e+02 -2.584500e+02\n3 14655     3.162600e+02 -5.556700e+02\n6 14655     2.238100e+02 -2.662000e+02\n7 14655     1.093900e+02 -1.536800e+02\n8 14655     3.531900e+02 -2.633500e+02\n9 14655     2.363000e+02 -1.128900e+02\n12 14655     2.355500e+02 -2.303800e+02\n15 14655     2.038700e+02 -2.411400e+02\n2 14656     5.013199e+02 -2.629800e+02\n8 14656     4.422900e+02 -2.642300e+02\n9 14656     3.156700e+02 -1.130100e+02\n2 14657     -3.119400e+02 -2.657900e+02\n7 14657     -3.707600e+02 6.429993e+00\n9 14657     -3.719700e+02 -1.595000e+02\n10 14657     -3.820400e+02 7.373999e+01\n15 14657     -3.592400e+02 5.234998e+01\n2 14658     -5.392800e+02 -2.664900e+02\n15 14658     -5.741700e+02 9.289999e+01\n2 14659     9.872998e+01 -2.752100e+02\n3 14659     2.360999e+01 -5.795500e+02\n6 14659     -8.407001e+01 -2.860900e+02\n2 14660     -5.770001e+01 -2.771800e+02\n8 14660     -1.640997e+01 -2.645600e+02\n2 14661     -1.598999e+01 -2.788300e+02\n7 14661     -2.217600e+02 -1.053500e+02\n8 14661     1.469000e+01 -2.671400e+02\n9 14661     -1.083300e+02 -1.489800e+02\n12 14661     -1.817900e+02 -2.173000e+02\n13 14661     2.280699e+02 -4.045700e+02\n2 14662     -3.908002e+01 -2.838600e+02\n3 14662     -1.163900e+02 -5.961600e+02\n8 14662     -3.700012e+00 -2.706300e+02\n9 14662     -1.289400e+02 -1.544300e+02\n12 14662     -2.007300e+02 -2.188500e+02\n2 14663     3.350601e+02 -2.830600e+02\n6 14663     1.522000e+02 -2.955100e+02\n8 14663     2.961400e+02 -2.825300e+02\n12 14663     1.575400e+02 -2.563700e+02\n2 14664     3.809000e+02 -2.834000e+02\n6 14664     2.024700e+02 -2.909700e+02\n9 14664     2.204200e+02 -1.337000e+02\n2 14665     2.875200e+02 -2.837300e+02\n6 14665     1.034900e+02 -2.967500e+02\n13 14665     4.354301e+02 -4.742900e+02\n2 14666     2.188199e+02 -2.943000e+02\n3 14666     1.438500e+02 -5.951500e+02\n13 14666     3.838101e+02 -4.686200e+02\n2 14667     -3.574700e+02 -2.963900e+02\n8 14667     -2.426900e+02 -2.632100e+02\n2 14668     4.551700e+02 -3.136400e+02\n6 14668     2.858300e+02 -3.034700e+02\n8 14668     4.002000e+02 -3.067400e+02\n12 14668     3.061801e+02 -2.721900e+02\n2 14669     4.492999e+01 -3.183000e+02\n6 14669     -1.360000e+02 -3.188500e+02\n8 14669     6.185999e+01 -3.020300e+02\n9 14669     -5.532001e+01 -1.786600e+02\n2 14670     -5.642900e+02 -3.187700e+02\n13 14670     -1.086400e+02 -3.130200e+02\n2 14671     8.647998e+01 -3.308800e+02\n6 14671     -9.566000e+01 -3.339301e+02\n8 14671     9.396002e+01 -3.133400e+02\n9 14671     -2.003003e+01 -1.866600e+02\n2 14672     2.681899e+02 -3.319500e+02\n6 14672     8.559998e+01 -3.411100e+02\n8 14672     2.411200e+02 -3.203800e+02\n9 14672     1.304900e+02 -1.797000e+02\n2 14673     1.118700e+02 -3.349000e+02\n4 14673     -4.539400e+02 -3.250400e+02\n6 14673     -7.046997e+01 -3.395100e+02\n7 14673     -1.352800e+02 -1.741300e+02\n12 14673     -6.541998e+01 -2.873100e+02\n2 14674     -3.916800e+02 -3.522900e+02\n6 14674     -5.712700e+02 -3.109500e+02\n7 14674     -4.589800e+02 -7.946997e+01\n9 14674     -4.303600e+02 -2.361600e+02\n13 14674     -5.400024e+00 -3.661800e+02\n2 14675     -3.804400e+02 -3.551800e+02\n6 14675     -5.586300e+02 -3.144600e+02\n2 14676     3.330900e+02 -3.632700e+02\n8 14676     2.945000e+02 -3.470700e+02\n9 14676     1.851100e+02 -2.017400e+02\n2 14677     3.330900e+02 -3.632700e+02\n8 14677     2.945000e+02 -3.470700e+02\n2 14678     3.371100e+02 -3.751600e+02\n6 14678     1.560200e+02 -3.795000e+02\n8 14678     2.973000e+02 -3.567500e+02\n2 14679     -4.405200e+02 -3.897500e+02\n8 14679     -3.152400e+02 -3.408100e+02\n2 14680     -2.940400e+02 -4.186100e+02\n8 14680     -2.023000e+02 -3.680900e+02\n2 14681     3.038800e+02 -4.661400e+02\n6 14681     1.210000e+02 -4.683600e+02\n2 14682     1.811300e+02 -4.912600e+02\n4 14682     -5.653400e+02 -3.298800e+02\n6 14682     -2.960022e+00 -4.931600e+02\n12 14682     -3.609985e+00 -4.452700e+02\n2 14683     5.115000e+02 -5.397600e+02\n9 14683     3.393900e+02 -3.372400e+02\n2 14684     -9.270001e+01 -6.003800e+02\n6 14684     -2.734700e+02 -6.117100e+02\n2 14685     6.501000e+02 -6.119800e+02\n6 14685     4.514100e+02 -6.305601e+02\n7 14685     2.477300e+02 -4.835500e+02\n9 14685     4.538600e+02 -3.860900e+02\n10 14685     2.280699e+02 -5.778400e+02\n2 14686     -2.696000e+02 6.061700e+02\n3 14686     -3.960200e+02 2.652500e+02\n11 14686     1.741100e+02 -4.799805e-01\n13 14686     2.239100e+02 4.380900e+02\n14 14686     3.565000e+02 7.859000e+01\n2 14687     -2.977300e+02 5.933300e+02\n5 14687     4.304399e+02 1.640400e+02\n11 14687     1.528200e+02 -9.530029e+00\n13 14687     2.008700e+02 4.292300e+02\n14 14687     3.294900e+02 6.878998e+01\n2 14688     -2.702600e+02 5.602100e+02\n4 14688     1.711899e+02 -4.092500e+02\n8 14688     -1.439700e+02 4.379000e+02\n2 14689     -1.690100e+02 5.554300e+02\n4 14689     1.686801e+02 -4.839500e+02\n2 14690     4.484003e+01 5.549900e+02\n3 14690     -1.021100e+02 2.149000e+02\n11 14690     5.021100e+02 -3.719971e+00\n13 14690     5.186801e+02 4.362300e+02\n2 14691     -5.059998e+00 5.539600e+02\n8 14691     7.631000e+01 4.388100e+02\n11 14691     4.472800e+02 -1.109998e+01\n13 14691     4.689200e+02 4.281800e+02\n14 14691     6.479200e+02 6.094000e+01\n2 14692     -5.059998e+00 5.539600e+02\n8 14692     7.631000e+01 4.388100e+02\n11 14692     4.472800e+02 -1.109998e+01\n13 14692     4.689200e+02 4.281800e+02\n14 14692     6.479200e+02 6.094000e+01\n2 14693     4.429301e+02 5.491100e+02\n8 14693     4.270500e+02 4.229200e+02\n2 14694     -2.118000e+02 5.461300e+02\n4 14694     1.638700e+02 -4.506600e+02\n8 14694     -9.581000e+01 4.274300e+02\n2 14695     -1.940100e+02 5.454700e+02\n3 14695     -3.247600e+02 2.058600e+02\n4 14695     1.626100e+02 -4.642300e+02\n11 14695     2.489900e+02 -3.844000e+01\n13 14695     2.892700e+02 3.990200e+02\n2 14696     -1.940100e+02 5.454700e+02\n3 14696     -3.247600e+02 2.058600e+02\n4 14696     1.626100e+02 -4.642300e+02\n8 14696     -8.085999e+01 4.278600e+02\n2 14697     -2.772400e+02 5.403400e+02\n3 14697     -4.032900e+02 2.029400e+02\n4 14697     1.612000e+02 -4.028800e+02\n6 14697     -4.871400e+02 8.650700e+02\n8 14697     -1.497400e+02 4.218000e+02\n14 14697     3.455800e+02 2.045001e+01\n2 14698     -3.235000e+02 5.384700e+02\n4 14698     1.601899e+02 -3.705600e+02\n5 14698     3.963600e+02 1.070000e+02\n6 14698     -5.462000e+02 8.522400e+02\n8 14698     -1.885000e+02 4.192300e+02\n11 14698     1.222300e+02 -5.526001e+01\n13 14698     1.748800e+02 3.799400e+02\n14 14698     2.978500e+02 1.354999e+01\n2 14699     3.185601e+02 5.385500e+02\n3 14699     1.718200e+02 1.983600e+02\n6 14699     2.352000e+02 8.329500e+02\n8 14699     3.289400e+02 4.198600e+02\n9 14699     1.214500e+02 5.526900e+02\n11 14699     6.383199e+02 -1.131600e+02\n13 14699     7.141600e+02 3.362500e+02\n2 14700     4.596997e+01 5.366300e+02\n3 14700     -9.809998e+01 1.963800e+02\n8 14700     1.193000e+02 4.261800e+02\n11 14700     5.022300e+02 -2.050000e+01\n2 14701     3.527500e+02 5.273900e+02\n3 14701     2.049000e+02 1.878400e+02\n6 14701     2.750100e+02 8.142200e+02\n8 14701     3.592000e+02 4.088900e+02\n9 14701     1.509000e+02 5.435300e+02\n11 14701     6.673000e+02 -1.300700e+02\n13 14701     7.424399e+02 3.211600e+02\n2 14702     -6.859900e+02 5.243400e+02\n3 14702     -7.997300e+02 1.958600e+02\n4 14702     1.584100e+02 -1.593800e+02\n5 14702     4.056000e+01 7.158002e+01\n8 14702     -4.854300e+02 3.980800e+02\n11 14702     -1.932100e+02 -9.129999e+01\n13 14702     -1.175600e+02 3.347000e+02\n14 14702     -4.850000e+01 -2.653998e+01\n2 14703     -5.134400e+02 5.229200e+02\n3 14703     -6.300300e+02 1.923500e+02\n4 14703     1.553400e+02 -2.518300e+02\n5 14703     2.025300e+02 8.046997e+01\n8 14703     -3.446700e+02 4.016500e+02\n13 14703     1.619000e+01 3.497600e+02\n2 14704     5.742999e+01 5.220500e+02\n11 14704     5.157900e+02 -2.998999e+01\n2 14705     5.417200e+02 5.216200e+02\n8 14705     5.093700e+02 3.988800e+02\n9 14705     3.158700e+02 5.430000e+02\n2 14706     -7.447300e+02 5.194400e+02\n4 14706     1.570500e+02 -1.302800e+02\n5 14706     -1.140002e+01 6.377002e+01\n8 14706     -5.327600e+02 3.918500e+02\n2 14707     -6.227000e+02 5.176000e+02\n5 14707     9.740002e+01 6.984998e+01\n2 14708     -6.009700e+02 5.166400e+02\n3 14708     -7.155500e+02 1.885600e+02\n8 14708     -4.163300e+02 3.943900e+02\n14 14708     2.807001e+01 -2.642999e+01\n2 14709     -6.009700e+02 5.166400e+02\n3 14709     -7.155500e+02 1.885600e+02\n4 14709     1.537000e+02 -2.029700e+02\n5 14709     1.184100e+02 6.995001e+01\n8 14709     -4.163300e+02 3.943900e+02\n11 14709     -1.237700e+02 -9.115002e+01\n13 14709     -5.247998e+01 3.373400e+02\n14 14709     2.807001e+01 -2.642999e+01\n2 14710     3.509600e+02 5.161400e+02\n3 14710     2.037500e+02 1.773600e+02\n6 14710     2.736300e+02 8.004400e+02\n8 14710     3.564400e+02 4.007100e+02\n9 14710     1.498000e+02 5.335000e+02\n11 14710     6.661100e+02 -1.398200e+02\n13 14710     7.399900e+02 3.118900e+02\n2 14711     -5.919100e+02 5.143300e+02\n4 14711     1.528000e+02 -2.075800e+02\n5 14711     1.264500e+02 6.907001e+01\n8 14711     -4.091100e+02 3.943000e+02\n11 14711     -1.168800e+02 -9.212000e+01\n13 14711     -4.613000e+01 3.361700e+02\n14 14711     3.556000e+01 -2.803003e+01\n2 14712     -4.863600e+02 5.126900e+02\n4 14712     1.500200e+02 -2.667600e+02\n5 14712     2.282000e+02 7.334003e+01\n8 14712     -3.224700e+02 3.948800e+02\n11 14712     -2.708002e+01 -8.706000e+01\n13 14712     3.746997e+01 3.442400e+02\n14 14712     1.346500e+02 -2.235999e+01\n2 14713     -2.597400e+02 5.106700e+02\n3 14713     -3.876000e+02 1.709600e+02\n4 14713     1.440900e+02 -4.112300e+02\n6 14713     -4.623200e+02 8.311600e+02\n8 14713     -1.351100e+02 3.991500e+02\n11 14713     1.831900e+02 -7.173999e+01\n2 14714     -2.323700e+02 5.105200e+02\n3 14714     -3.606700e+02 1.735500e+02\n4 14714     1.440300e+02 -4.311500e+02\n11 14714     2.109300e+02 -6.859998e+01\n13 14714     2.539600e+02 3.673400e+02\n14 14714     3.919200e+02 -3.090027e+00\n2 14715     3.467900e+02 5.064900e+02\n3 14715     1.995100e+02 1.678000e+02\n6 14715     2.685500e+02 7.888700e+02\n8 14715     3.531700e+02 3.925100e+02\n9 14715     1.467700e+02 5.258800e+02\n13 14715     7.352900e+02 3.039900e+02\n2 14716     -5.859100e+02 5.045700e+02\n3 14716     -7.010500e+02 1.760500e+02\n4 14716     1.479399e+02 -2.101400e+02\n2 14717     -6.222500e+02 5.009100e+02\n4 14717     1.468101e+02 -1.901200e+02\n5 14717     9.695001e+01 5.528998e+01\n8 14717     -4.334400e+02 3.814800e+02\n13 14717     -6.971002e+01 3.235800e+02\n14 14717     7.250000e+00 -4.153003e+01\n2 14718     -2.459700e+02 5.003100e+02\n3 14718     -3.747400e+02 1.633200e+02\n8 14718     -1.255200e+02 3.918100e+02\n11 14718     1.958300e+02 -7.813000e+01\n13 14718     2.414200e+02 3.576600e+02\n14 14718     3.771600e+02 -1.421997e+01\n2 14719     -2.138300e+02 5.004100e+02\n4 14719     1.382300e+02 -4.423400e+02\n6 14719     -4.043400e+02 8.300800e+02\n8 14719     -9.770001e+01 3.922800e+02\n11 14719     2.282100e+02 -7.584003e+01\n13 14719     2.694800e+02 3.599200e+02\n14 14719     4.102800e+02 -1.250000e+01\n2 14720     -6.726200e+02 4.967200e+02\n3 14720     -7.879300e+02 1.697500e+02\n4 14720     1.461000e+02 -1.639700e+02\n5 14720     5.063000e+01 4.928998e+01\n8 14720     -4.739900e+02 3.771500e+02\n11 14720     -1.824000e+02 -1.090500e+02\n13 14720     -1.080600e+02 3.161400e+02\n14 14720     -3.841998e+01 -4.841998e+01\n2 14721     -2.537400e+02 4.972100e+02\n3 14721     -3.819400e+02 1.576900e+02\n11 14721     1.890500e+02 -8.153003e+01\n13 14721     2.337800e+02 3.528700e+02\n14 14721     3.679800e+02 -1.871997e+01\n2 14722     -7.076300e+02 4.934200e+02\n4 14722     1.450699e+02 -1.460800e+02\n5 14722     1.853003e+01 4.437000e+01\n2 14723     -2.116100e+02 4.917600e+02\n8 14723     -9.639999e+01 3.855500e+02\n11 14723     2.304301e+02 -8.237000e+01\n2 14724     -2.116100e+02 4.917600e+02\n3 14724     -3.429300e+02 1.533000e+02\n8 14724     -9.639999e+01 3.855500e+02\n11 14724     2.304301e+02 -8.237000e+01\n2 14725     -6.266200e+02 4.909300e+02\n3 14725     -7.425600e+02 1.621500e+02\n4 14725     1.422400e+02 -1.869100e+02\n5 14725     9.170001e+01 4.663000e+01\n8 14725     -4.368000e+02 3.736500e+02\n11 14725     -1.469800e+02 -1.111500e+02\n13 14725     -7.353003e+01 3.159100e+02\n14 14725     2.299988e+00 -5.040002e+01\n2 14726     -6.632600e+02 4.873700e+02\n4 14726     1.414900e+02 -1.678900e+02\n5 14726     5.810999e+01 4.158002e+01\n8 14726     -4.662500e+02 3.695100e+02\n13 14726     -1.012900e+02 3.102700e+02\n14 14726     -3.053003e+01 -5.540997e+01\n2 14727     -7.029500e+02 4.828200e+02\n4 14727     1.406000e+02 -1.475900e+02\n5 14727     2.187000e+01 3.607001e+01\n8 14727     -4.986800e+02 3.653200e+02\n11 14727     -2.072700e+02 -1.202100e+02\n13 14727     -1.310400e+02 3.038300e+02\n14 14727     -6.631000e+01 -6.165997e+01\n2 14728     -7.029500e+02 4.828200e+02\n4 14728     1.406000e+02 -1.475900e+02\n5 14728     2.187000e+01 3.607001e+01\n8 14728     -4.986800e+02 3.653200e+02\n11 14728     -2.072700e+02 -1.202100e+02\n13 14728     -1.310400e+02 3.038300e+02\n14 14728     -6.631000e+01 -6.165997e+01\n2 14729     3.454999e+01 4.829900e+02\n6 14729     -8.628000e+01 8.641600e+02\n13 14729     5.027900e+02 3.734400e+02\n2 14730     5.170699e+02 4.759500e+02\n3 14730     3.671400e+02 1.421600e+02\n9 14730     2.964000e+02 5.023400e+02\n2 14731     -5.964900e+02 4.723300e+02\n4 14731     1.329400e+02 -2.013000e+02\n13 14731     -5.052002e+01 3.052000e+02\n14 14731     2.891998e+01 -6.376001e+01\n2 14732     -6.058500e+02 4.667600e+02\n3 14732     -7.238000e+02 1.365900e+02\n2 14733     -4.537700e+02 4.666800e+02\n4 14733     1.263300e+02 -2.812300e+02\n5 14733     2.566600e+02 3.381000e+01\n8 14733     -2.951100e+02 3.587400e+02\n2 14734     -6.979300e+02 4.580100e+02\n4 14734     1.290500e+02 -1.475300e+02\n5 14734     2.328998e+01 1.497998e+01\n8 14734     -4.953700e+02 3.455400e+02\n13 14734     -1.274700e+02 2.869000e+02\n2 14735     -1.727002e+01 4.575200e+02\n5 14735     7.344700e+02 5.122998e+01\n6 14735     -1.513100e+02 8.204700e+02\n8 14735     6.619000e+01 3.615200e+02\n2 14736     -1.727002e+01 4.575200e+02\n5 14736     7.344700e+02 5.122998e+01\n8 14736     6.619000e+01 3.615200e+02\n2 14737     -1.889500e+02 4.553300e+02\n3 14737     -3.210100e+02 1.191500e+02\n6 14737     -3.683100e+02 7.782100e+02\n8 14737     -7.660999e+01 3.555900e+02\n2 14738     -1.889500e+02 4.553300e+02\n4 14738     1.125200e+02 -4.556600e+02\n6 14738     -3.683100e+02 7.782100e+02\n8 14738     -7.660999e+01 3.555900e+02\n11 14738     2.539000e+02 -1.078900e+02\n2 14739     3.975500e+02 4.478000e+02\n3 14739     2.495400e+02 1.144200e+02\n6 14739     3.249300e+02 7.101800e+02\n8 14739     3.940200e+02 3.439500e+02\n13 14739     7.730500e+02 2.442200e+02\n2 14740     -7.235999e+01 4.426700e+02\n3 14740     -2.123800e+02 1.057900e+02\n6 14740     -2.213500e+02 7.883500e+02\n8 14740     1.976001e+01 3.474100e+02\n11 14740     3.726400e+02 -1.085100e+02\n13 14740     3.961700e+02 3.288400e+02\n14 14740     5.633700e+02 -5.264001e+01\n2 14741     4.391000e+02 4.419500e+02\n3 14741     2.924200e+02 1.099000e+02\n8 14741     4.238400e+02 3.349100e+02\n9 14741     2.298800e+02 4.711700e+02\n2 14742     4.391000e+02 4.419500e+02\n3 14742     2.924200e+02 1.099000e+02\n8 14742     4.238400e+02 3.349100e+02\n9 14742     2.298800e+02 4.711700e+02\n2 14743     5.939500e+02 4.380700e+02\n9 14743     3.615500e+02 4.718600e+02\n2 14744     -7.010400e+02 4.337300e+02\n4 14744     1.185100e+02 -1.445500e+02\n5 14744     1.977002e+01 -5.260010e+00\n8 14744     -4.957600e+02 3.271400e+02\n11 14744     -2.082900e+02 -1.533700e+02\n13 14744     -1.316900e+02 2.688900e+02\n14 14744     -6.933002e+01 -1.021700e+02\n2 14745     -3.491900e+02 4.319900e+02\n5 14745     3.601600e+02 6.919983e+00\n2 14746     -3.491900e+02 4.319900e+02\n5 14746     3.601600e+02 6.919983e+00\n8 14746     -2.084500e+02 3.335100e+02\n2 14747     -3.702002e+01 4.319300e+02\n6 14747     -1.773200e+02 7.879200e+02\n8 14747     5.103998e+01 3.417400e+02\n2 14748     -3.020500e+02 4.281800e+02\n4 14748     1.018000e+02 -3.723600e+02\n5 14748     4.095500e+02 5.840027e+00\n2 14749     -3.020500e+02 4.281800e+02\n4 14749     1.018000e+02 -3.723600e+02\n5 14749     4.095500e+02 5.840027e+00\n2 14750     -3.569300e+02 4.196300e+02\n3 14750     -4.823500e+02 8.638000e+01\n5 14750     3.513199e+02 -4.590027e+00\n6 14750     -5.748700e+02 6.966100e+02\n8 14750     -2.151600e+02 3.237800e+02\n13 14750     1.412700e+02 2.850000e+02\n14 14750     2.564301e+02 -9.577002e+01\n2 14751     -3.569300e+02 4.196300e+02\n3 14751     -4.823500e+02 8.638000e+01\n5 14751     3.513199e+02 -4.590027e+00\n6 14751     -5.748700e+02 6.966100e+02\n8 14751     -2.151600e+02 3.237800e+02\n11 14751     8.794000e+01 -1.468400e+02\n13 14751     1.412700e+02 2.850000e+02\n14 14751     2.564301e+02 -9.577002e+01\n2 14752     -3.569300e+02 4.196300e+02\n4 14752     9.940002e+01 -3.357800e+02\n5 14752     3.513199e+02 -4.590027e+00\n6 14752     -5.748700e+02 6.966100e+02\n8 14752     -2.151600e+02 3.237800e+02\n11 14752     8.794000e+01 -1.468400e+02\n13 14752     1.412700e+02 2.850000e+02\n14 14752     2.564301e+02 -9.577002e+01\n2 14753     5.101899e+02 4.189700e+02\n3 14753     3.621400e+02 8.989001e+01\n6 14753     4.413400e+02 6.242100e+02\n8 14753     4.820000e+02 3.142200e+02\n9 14753     2.913000e+02 4.535300e+02\n2 14754     5.101899e+02 4.189700e+02\n3 14754     3.621400e+02 8.989001e+01\n8 14754     4.820000e+02 3.142200e+02\n9 14754     2.913000e+02 4.535300e+02\n2 14755     -4.868400e+02 4.116800e+02\n3 14755     -6.080100e+02 8.225000e+01\n4 14755     1.005900e+02 -2.564700e+02\n5 14755     2.192500e+02 -1.685999e+01\n8 14755     -3.220100e+02 3.145300e+02\n11 14755     -2.981000e+01 -1.591700e+02\n13 14755     3.467999e+01 2.695300e+02\n14 14755     1.283300e+02 -1.094700e+02\n2 14756     -5.910100e+02 4.100500e+02\n11 14756     -1.174700e+02 -1.646300e+02\n2 14757     -7.664200e+02 4.082000e+02\n5 14757     -4.170001e+01 -2.959998e+01\n8 14757     -5.495900e+02 3.042900e+02\n2 14758     -4.308300e+02 4.084900e+02\n3 14758     -5.528400e+02 7.720001e+01\n4 14758     9.675000e+01 -2.892000e+02\n5 14758     2.749399e+02 -1.766998e+01\n8 14758     -2.756200e+02 3.131400e+02\n11 14758     2.121002e+01 -1.586600e+02\n13 14758     8.062000e+01 2.714500e+02\n14 14758     1.829301e+02 -1.094300e+02\n2 14759     -4.249900e+02 3.992400e+02\n3 14759     -5.480700e+02 6.828003e+01\n4 14759     9.203003e+01 -2.915800e+02\n5 14759     2.801100e+02 -2.559998e+01\n11 14759     2.587000e+01 -1.654900e+02\n2 14760     4.435100e+02 3.983500e+02\n3 14760     2.992400e+02 7.007001e+01\n6 14760     3.635200e+02 6.093900e+02\n8 14760     4.266100e+02 2.996500e+02\n9 14760     2.345699e+02 4.340500e+02\n13 14760     7.859600e+02 1.685200e+02\n2 14761     5.235699e+02 3.911000e+02\n3 14761     3.768600e+02 6.437000e+01\n6 14761     4.541000e+02 5.896800e+02\n8 14761     4.928101e+02 2.916900e+02\n9 14761     3.024500e+02 4.303900e+02\n12 14761     5.358900e+02 5.983200e+02\n2 14762     5.235699e+02 3.911000e+02\n3 14762     3.768600e+02 6.437000e+01\n6 14762     4.541000e+02 5.896800e+02\n8 14762     4.928101e+02 2.916900e+02\n9 14762     3.024500e+02 4.303900e+02\n12 14762     5.358900e+02 5.983200e+02\n2 14763     -5.572400e+02 3.887300e+02\n8 14763     -3.790700e+02 2.941900e+02\n2 14764     -5.869300e+02 3.839400e+02\n4 14764     9.160999e+01 -1.981300e+02\n5 14764     1.198300e+02 -4.444000e+01\n8 14764     -4.036100e+02 2.897800e+02\n12 14764     -6.606300e+02 5.947900e+02\n2 14765     -1.229800e+02 3.790800e+02\n3 14765     -2.609200e+02 4.384003e+01\n8 14765     -2.070001e+01 2.960300e+02\n2 14766     -1.229800e+02 3.790800e+02\n3 14766     -2.609200e+02 4.384003e+01\n6 14766     -2.820000e+02 6.982100e+02\n8 14766     -2.070001e+01 2.960300e+02\n2 14767     -1.229800e+02 3.790800e+02\n3 14767     -2.609200e+02 4.384003e+01\n6 14767     -2.820000e+02 6.982100e+02\n8 14767     -2.070001e+01 2.960300e+02\n9 14767     -2.610200e+02 4.000700e+02\n2 14768     5.252800e+02 3.769500e+02\n6 14768     4.554800e+02 5.737400e+02\n8 14768     4.942900e+02 2.805100e+02\n9 14768     3.054600e+02 4.186000e+02\n12 14768     5.379399e+02 5.832500e+02\n2 14769     -6.497700e+02 3.749900e+02\n4 14769     9.101001e+01 -1.645400e+02\n5 14769     5.992999e+01 -5.291998e+01\n8 14769     -4.556100e+02 2.826600e+02\n12 14769     -7.334500e+02 5.779200e+02\n13 14769     -9.434998e+01 2.336500e+02\n14 14769     -2.740997e+01 -1.459000e+02\n2 14770     8.507001e+01 3.741600e+02\n3 14770     -6.428998e+01 3.965002e+01\n11 14770     5.459000e+02 -1.497900e+02\n2 14771     1.263700e+02 3.726100e+02\n3 14771     -2.560999e+01 3.676001e+01\n8 14771     1.852100e+02 2.958000e+02\n9 14771     -4.903998e+01 4.018600e+02\n13 14771     5.854301e+02 2.886600e+02\n2 14772     -7.619400e+02 3.699900e+02\n4 14772     9.276001e+01 -1.093800e+02\n5 14772     -4.076001e+01 -6.032001e+01\n8 14772     -5.454900e+02 2.745900e+02\n11 14772     -2.564300e+02 -1.977500e+02\n13 14772     -1.764300e+02 2.211800e+02\n14 14772     -1.261900e+02 -1.563100e+02\n2 14773     -7.849500e+02 3.664300e+02\n4 14773     9.209998e+01 -9.922998e+01\n5 14773     -6.071997e+01 -6.371002e+01\n8 14773     -5.638500e+02 2.712300e+02\n13 14773     -1.932600e+02 2.170600e+02\n2 14774     -7.849500e+02 3.664300e+02\n4 14774     9.209998e+01 -9.922998e+01\n5 14774     -6.071997e+01 -6.371002e+01\n8 14774     -5.638500e+02 2.712300e+02\n13 14774     -1.932600e+02 2.170600e+02\n2 14775     -3.817100e+02 3.662700e+02\n3 14775     -5.075500e+02 3.396997e+01\n12 14775     -4.166200e+02 6.085900e+02\n2 14776     3.796500e+02 3.664500e+02\n3 14776     2.346400e+02 3.706000e+01\n8 14776     3.787200e+02 2.768500e+02\n2 14777     -6.562600e+02 3.597100e+02\n4 14777     8.388000e+01 -1.602000e+02\n5 14777     5.279999e+01 -6.653003e+01\n8 14777     -4.597900e+02 2.694200e+02\n11 14777     -1.743200e+02 -2.018900e+02\n12 14777     -7.374900e+02 5.596100e+02\n13 14777     -9.904999e+01 2.205600e+02\n14 14777     -3.385999e+01 -1.610700e+02\n2 14778     -6.840700e+02 3.525400e+02\n13 14778     -1.197400e+02 2.145800e+02\n2 14779     -6.310900e+02 3.523500e+02\n4 14779     7.926001e+01 -1.725100e+02\n5 14779     7.529999e+01 -7.240002e+01\n8 14779     -4.386100e+02 2.640400e+02\n12 14779     -7.070300e+02 5.547700e+02\n13 14779     -7.990002e+01 2.169600e+02\n2 14780     -7.217000e+02 3.501600e+02\n4 14780     8.250000e+01 -1.269400e+02\n2 14781     -2.868000e+02 3.480500e+02\n5 14781     4.178000e+02 -6.835999e+01\n6 14781     -4.813100e+02 6.248900e+02\n8 14781     -1.566600e+02 2.682200e+02\n11 14781     1.541100e+02 -1.973700e+02\n2 14782     -6.969700e+02 3.407400e+02\n4 14782     7.746002e+01 -1.380300e+02\n2 14783     -5.697998e+01 3.326400e+02\n4 14783     3.742999e+01 -5.408400e+02\n5 14783     6.732600e+02 -7.434003e+01\n6 14783     -1.966400e+02 6.581700e+02\n8 14783     3.308002e+01 2.605500e+02\n13 14783     4.027700e+02 2.416200e+02\n14 14783     5.710100e+02 -1.586700e+02\n2 14784     -6.961500e+02 3.308800e+02\n4 14784     7.297998e+01 -1.379700e+02\n5 14784     1.437000e+01 -9.173999e+01\n2 14785     5.908199e+02 3.303900e+02\n7 14785     5.334000e+02 4.938700e+02\n9 14785     3.604700e+02 3.804500e+02\n10 14785     7.301801e+02 5.769000e+02\n2 14786     3.010900e+02 3.287800e+02\n7 14786     3.067300e+02 5.786600e+02\n9 14786     1.111800e+02 3.695500e+02\n13 14786     6.764900e+02 1.608700e+02\n2 14787     3.010900e+02 3.287800e+02\n9 14787     1.111800e+02 3.695500e+02\n12 14787     3.181000e+02 5.688400e+02\n13 14787     6.764900e+02 1.608700e+02\n2 14788     -2.702300e+02 3.234500e+02\n4 14788     4.588000e+01 -3.810200e+02\n5 14788     4.329301e+02 -9.044000e+01\n6 14788     -4.589800e+02 5.998600e+02\n8 14788     -1.430400e+02 2.488700e+02\n13 14788     2.108300e+02 2.187200e+02\n2 14789     9.635999e+01 3.228100e+02\n6 14789     -2.580017e+00 6.826800e+02\n8 14789     1.620300e+02 2.566300e+02\n9 14789     -7.291998e+01 3.567200e+02\n14 14789     7.544700e+02 -1.590600e+02\n2 14790     1.271800e+02 3.183300e+02\n3 14790     -2.433002e+01 -1.514001e+01\n6 14790     3.416998e+01 6.816500e+02\n8 14790     1.864100e+02 2.518500e+02\n9 14790     -4.610999e+01 3.548100e+02\n2 14791     1.149700e+02 3.149200e+02\n3 14791     -3.654999e+01 -1.825000e+01\n9 14791     -5.678998e+01 3.510800e+02\n13 14791     5.689500e+02 2.403000e+02\n14 14791     7.786899e+02 -1.634100e+02\n2 14792     3.161300e+02 3.068500e+02\n7 14792     3.172100e+02 5.557300e+02\n8 14792     3.260400e+02 2.332600e+02\n12 14792     3.321899e+02 5.504700e+02\n13 14792     6.860100e+02 1.422400e+02\n2 14793     4.344301e+02 3.032300e+02\n3 14793     2.938000e+02 -2.014001e+01\n6 14793     3.493200e+02 5.017100e+02\n8 14793     4.186200e+02 2.213600e+02\n9 14793     2.290000e+02 3.522300e+02\n11 14793     6.908800e+02 -3.876300e+02\n13 14793     7.669399e+02 9.047000e+01\n2 14794     5.354100e+02 3.007200e+02\n3 14794     3.899399e+02 -1.972998e+01\n6 14794     4.613700e+02 4.857300e+02\n7 14794     4.795500e+02 4.771800e+02\n8 14794     5.013000e+02 2.169700e+02\n9 14794     3.145500e+02 3.534200e+02\n12 14794     5.434800e+02 4.940000e+02\n13 14794     8.556000e+02 6.732001e+01\n2 14795     2.927700e+02 2.972100e+02\n3 14795     1.513400e+02 -3.094000e+01\n7 14795     2.977000e+02 5.489000e+02\n8 14795     3.076400e+02 2.230500e+02\n9 14795     1.052700e+02 3.425700e+02\n11 14795     6.160900e+02 -3.241600e+02\n12 14795     3.084600e+02 5.383100e+02\n13 14795     6.661400e+02 1.364600e+02\n2 14796     3.233300e+02 2.966100e+02\n3 14796     1.819300e+02 -3.075000e+01\n8 14796     3.327000e+02 2.212200e+02\n11 14796     6.370800e+02 -3.312900e+02\n2 14797     -2.406900e+02 2.736800e+02\n9 14797     -3.562500e+02 3.042500e+02\n13 14797     2.341801e+02 1.831700e+02\n2 14798     -2.558900e+02 2.681700e+02\n3 14798     -3.881500e+02 -6.395001e+01\n5 14798     4.430400e+02 -1.414300e+02\n7 14798     -1.897800e+02 5.793400e+02\n8 14798     -1.307500e+02 2.053900e+02\n9 14798     -3.692600e+02 2.988400e+02\n12 14798     -2.640800e+02 5.223100e+02\n13 14798     2.204301e+02 1.780500e+02\n14 14798     3.507900e+02 -2.269000e+02\n2 14799     7.792000e+02 2.605200e+02\n3 14799     6.225699e+02 -5.028998e+01\n7 14799     6.973600e+02 3.816700e+02\n9 14799     5.189500e+02 3.263600e+02\n2 14800     -1.361600e+02 2.586900e+02\n3 14800     -2.702100e+02 -7.376001e+01\n6 14800     -2.917200e+02 5.510400e+02\n8 14800     -3.264001e+01 2.001700e+02\n2 14801     -1.425800e+02 2.568700e+02\n6 14801     -2.998600e+02 5.470300e+02\n8 14801     -3.869000e+01 1.982900e+02\n2 14802     -1.355900e+02 2.498500e+02\n3 14802     -2.730500e+02 -8.278998e+01\n4 14802     -3.460022e+00 -4.678400e+02\n5 14802     5.751300e+02 -1.584400e+02\n6 14802     -2.875400e+02 5.416000e+02\n7 14802     -5.969000e+01 5.740500e+02\n8 14802     -3.065997e+01 1.930100e+02\n11 14802     3.012700e+02 -2.672900e+02\n12 14802     -1.197600e+02 5.190200e+02\n2 14803     4.853400e+02 2.445100e+02\n3 14803     3.440400e+02 -7.459998e+01\n6 14803     4.034900e+02 4.295300e+02\n7 14803     4.292700e+02 4.341600e+02\n8 14803     4.591700e+02 1.719400e+02\n9 14803     2.732100e+02 3.041000e+02\n10 14803     5.989301e+02 5.124800e+02\n11 14803     7.362000e+02 -4.604500e+02\n12 14803     4.885400e+02 4.371400e+02\n13 14803     8.041100e+02 3.133002e+01\n2 14804     5.331400e+02 2.379400e+02\n6 14804     4.566899e+02 4.151600e+02\n8 14804     4.985000e+02 1.651300e+02\n9 14804     3.139301e+02 3.001300e+02\n12 14804     5.393300e+02 4.235400e+02\n13 14804     8.456700e+02 1.547998e+01\n2 14805     4.024700e+02 2.223600e+02\n3 14805     2.606000e+02 -1.000200e+02\n8 14805     3.946600e+02 1.595000e+02\n9 14805     2.014301e+02 2.821200e+02\n2 14806     -7.082800e+02 2.153000e+02\n8 14806     -5.003500e+02 1.549400e+02\n2 14807     -3.359300e+02 2.134700e+02\n3 14807     -4.657500e+02 -1.185200e+02\n2 14808     -2.440997e+01 2.123700e+02\n3 14808     -1.680500e+02 -1.186900e+02\n7 14808     5.989001e+01 5.511200e+02\n8 14808     6.059998e+01 1.644700e+02\n9 14808     -1.708800e+02 2.573300e+02\n13 14808     4.248700e+02 1.494100e+02\n14 14808     6.035200e+02 -2.704200e+02\n2 14809     -6.807800e+02 2.088200e+02\n4 14809     1.883002e+01 -1.345600e+02\n5 14809     1.609003e+01 -1.941600e+02\n8 14809     -4.784600e+02 1.503400e+02\n2 14810     -4.414001e+01 2.074200e+02\n5 14810     6.747300e+02 -1.966100e+02\n6 14810     -1.761400e+02 5.129000e+02\n7 14810     3.778003e+01 5.453500e+02\n8 14810     4.392999e+01 1.605600e+02\n9 14810     -1.866700e+02 2.525000e+02\n12 14810     -1.175000e+01 4.880900e+02\n13 14810     4.057900e+02 1.443100e+02\n2 14811     3.451801e+02 2.072700e+02\n8 14811     3.488900e+02 1.487800e+02\n9 14811     1.510900e+02 2.675700e+02\n12 14811     3.607000e+02 4.348100e+02\n13 14811     7.002700e+02 5.254999e+01\n2 14812     5.492500e+02 2.044900e+02\n3 14812     4.075500e+02 -1.106700e+02\n6 14812     4.729000e+02 3.771200e+02\n7 14812     4.808300e+02 3.822600e+02\n8 14812     5.114700e+02 1.380100e+02\n9 14812     3.285699e+02 2.728800e+02\n10 14812     6.542300e+02 4.438000e+02\n12 14812     5.555800e+02 3.863600e+02\n13 14812     8.554399e+02 -1.602002e+01\n2 14813     8.002200e+02 1.979900e+02\n7 14813     7.062200e+02 3.158900e+02\n9 14813     5.375800e+02 2.746100e+02\n2 14814     8.002200e+02 1.979900e+02\n7 14814     7.062200e+02 3.158900e+02\n9 14814     5.375800e+02 2.746100e+02\n2 14815     3.197700e+02 1.927500e+02\n6 14815     2.281500e+02 4.251000e+02\n7 14815     3.124301e+02 4.449800e+02\n11 14815     6.352400e+02 -4.256000e+02\n12 14815     3.342500e+02 4.201300e+02\n13 14815     6.761700e+02 4.595001e+01\n2 14816     4.436000e+02 1.932800e+02\n3 14816     3.055400e+02 -1.246000e+02\n7 14816     3.885800e+02 3.954700e+02\n9 14816     2.392000e+02 2.599800e+02\n10 14816     5.480900e+02 4.701400e+02\n11 14816     6.995200e+02 -4.952300e+02\n13 14816     7.623101e+02 -1.059998e+00\n15 14816     7.366899e+02 5.358300e+02\n2 14817     5.858300e+02 1.867500e+02\n7 14817     5.110900e+02 3.572200e+02\n9 14817     3.596500e+02 2.583200e+02\n2 14818     3.616000e+02 1.838700e+02\n6 14818     2.754900e+02 4.097100e+02\n7 14818     3.466100e+02 4.288700e+02\n8 14818     3.621500e+02 1.294400e+02\n12 14818     3.785699e+02 4.071200e+02\n13 14818     7.116100e+02 3.039001e+01\n2 14819     -3.688700e+02 1.826700e+02\n5 14819     3.133800e+02 -2.226200e+02\n6 14819     -5.672000e+02 4.143100e+02\n13 14819     1.198600e+02 1.069700e+02\n2 14820     4.645300e+02 1.805600e+02\n3 14820     3.261000e+02 -1.369200e+02\n6 14820     3.779900e+02 3.625500e+02\n7 14820     4.057300e+02 3.781000e+02\n8 14820     4.414900e+02 1.199900e+02\n9 14820     2.574100e+02 2.491800e+02\n10 14820     5.655200e+02 4.474300e+02\n13 14820     7.785100e+02 -1.753003e+01\n2 14821     6.532400e+02 1.726200e+02\n3 14821     5.089500e+02 -1.374200e+02\n9 14821     4.167200e+02 2.490500e+02\n10 14821     7.564399e+02 3.676100e+02\n12 14821     6.655500e+02 3.384600e+02\n2 14822     -6.682000e+02 1.615000e+02\n7 14822     -6.010900e+02 4.420500e+02\n10 14822     -6.001700e+02 6.071000e+02\n2 14823     -6.682000e+02 1.615000e+02\n4 14823     -2.500000e+00 -1.367200e+02\n7 14823     -6.010900e+02 4.420500e+02\n2 14824     4.752400e+02 1.532900e+02\n3 14824     3.380900e+02 -1.620800e+02\n6 14824     3.884400e+02 3.307200e+02\n7 14824     4.120699e+02 3.514600e+02\n8 14824     4.491700e+02 9.725000e+01\n9 14824     2.666100e+02 2.265700e+02\n2 14825     -2.844900e+02 1.444900e+02\n5 14825     3.995500e+02 -2.553600e+02\n6 14825     -4.623500e+02 3.922000e+02\n7 14825     -2.159400e+02 4.664500e+02\n8 14825     -1.543200e+02 1.070800e+02\n9 14825     -3.882400e+02 1.893000e+02\n13 14825     1.902100e+02 8.559000e+01\n14 14825     3.124100e+02 -3.398600e+02\n2 14826     -6.879200e+02 1.430100e+02\n4 14826     -8.719971e+00 -1.252500e+02\n7 14826     -6.181800e+02 4.244700e+02\n10 14826     -6.202300e+02 5.874300e+02\n2 14827     4.627700e+02 1.420500e+02\n7 14827     4.006300e+02 3.442000e+02\n9 14827     2.567900e+02 2.167700e+02\n10 14827     5.573000e+02 4.077200e+02\n2 14828     4.627700e+02 1.420500e+02\n7 14828     4.006300e+02 3.442000e+02\n9 14828     2.567900e+02 2.167700e+02\n2 14829     -6.004500e+02 1.391800e+02\n14 14829     3.400269e-01 -3.453800e+02\n2 14830     6.125200e+02 1.332000e+02\n6 14830     5.395500e+02 2.904500e+02\n7 14830     5.286899e+02 3.017900e+02\n8 14830     5.629399e+02 7.725000e+01\n9 14830     3.832500e+02 2.143300e+02\n10 14830     7.048800e+02 3.407000e+02\n12 14830     6.193400e+02 2.999300e+02\n2 14831     -6.356300e+02 1.216500e+02\n7 14831     -5.658500e+02 4.121500e+02\n10 14831     -5.582900e+02 5.706000e+02\n2 14832     -1.091900e+02 1.197800e+02\n8 14832     -1.169000e+01 8.851001e+01\n9 14832     -2.364800e+02 1.750100e+02\n2 14833     -5.246002e+01 1.188200e+02\n8 14833     3.310999e+01 8.669000e+01\n9 14833     -1.871700e+02 1.760900e+02\n14 14833     5.459900e+02 -3.843300e+02\n2 14834     -3.131300e+02 1.177300e+02\n5 14834     3.643000e+02 -2.848000e+02\n7 14834     -2.470600e+02 4.363700e+02\n8 14834     -1.774900e+02 8.435001e+01\n11 14834     1.172700e+02 -3.753300e+02\n2 14835     5.649800e+02 1.158800e+02\n6 14835     4.857900e+02 2.791400e+02\n7 14835     4.852000e+02 2.965600e+02\n8 14835     5.232100e+02 6.498999e+01\n9 14835     3.440300e+02 1.984100e+02\n13 14835     8.590200e+02 -9.257001e+01\n15 14835     8.639100e+02 3.815900e+02\n2 14836     7.119600e+02 1.124900e+02\n9 14836     4.668800e+02 2.007800e+02\n12 14836     7.263600e+02 2.644500e+02\n2 14837     -9.877002e+01 1.095000e+02\n8 14837     -6.679993e+00 7.929999e+01\n9 14837     -2.273100e+02 1.662800e+02\n2 14838     7.283900e+02 1.083000e+02\n9 14838     4.821500e+02 1.975400e+02\n12 14838     7.433500e+02 2.586900e+02\n2 14839     7.125500e+02 9.834003e+01\n7 14839     6.124800e+02 2.457700e+02\n9 14839     4.682600e+02 1.890200e+02\n10 14839     8.014700e+02 2.618800e+02\n12 14839     7.258199e+02 2.495500e+02\n2 14840     6.263900e+02 9.232001e+01\n3 14840     4.870300e+02 -2.149900e+02\n6 14840     5.525200e+02 2.455400e+02\n8 14840     5.736500e+02 4.366000e+01\n9 14840     3.962300e+02 1.808300e+02\n10 14840     7.096500e+02 2.908500e+02\n12 14840     6.316600e+02 2.555200e+02\n2 14841     6.032100e+02 8.450000e+01\n6 14841     5.259200e+02 2.410500e+02\n7 14841     5.142700e+02 2.599100e+02\n8 14841     5.543300e+02 3.826001e+01\n9 14841     3.770400e+02 1.736200e+02\n12 14841     6.063300e+02 2.509400e+02\n2 14842     -3.059100e+02 8.288000e+01\n4 14842     -6.984998e+01 -3.291200e+02\n5 14842     3.695200e+02 -3.107800e+02\n7 14842     -2.364600e+02 4.123400e+02\n8 14842     -1.720000e+02 5.804001e+01\n11 14842     1.270800e+02 -3.964400e+02\n2 14843     6.619399e+02 8.323999e+01\n3 14843     5.221000e+02 -2.223000e+02\n7 14843     5.656899e+02 2.442100e+02\n9 14843     4.265100e+02 1.745100e+02\n10 14843     7.442800e+02 2.665200e+02\n12 14843     6.695200e+02 2.410000e+02\n2 14844     6.619399e+02 8.323999e+01\n3 14844     5.221000e+02 -2.223000e+02\n7 14844     5.656899e+02 2.442100e+02\n10 14844     7.442800e+02 2.665200e+02\n12 14844     6.695200e+02 2.410000e+02\n2 14845     -4.920100e+02 8.154999e+01\n13 14845     1.778998e+01 3.288000e+01\n14 14845     9.813000e+01 -3.951400e+02\n2 14846     1.885999e+01 8.064001e+01\n3 14846     -7.202002e+01 -2.361700e+02\n4 14846     -1.990600e+02 -3.700100e+02\n5 14846     5.463900e+02 -5.570300e+02\n6 14846     -1.624600e+02 1.066700e+02\n7 14846     -1.607300e+02 2.037800e+02\n8 14846     5.152002e+01 2.506000e+01\n9 14846     -9.884998e+01 1.524100e+02\n12 14846     -1.314500e+02 1.618200e+02\n13 14846     3.008400e+02 -1.416300e+02\n2 14847     1.885999e+01 8.064001e+01\n5 14847     5.463900e+02 -5.570300e+02\n6 14847     -1.624600e+02 1.066700e+02\n7 14847     -1.607300e+02 2.037800e+02\n8 14847     5.152002e+01 2.506000e+01\n9 14847     -9.884998e+01 1.524100e+02\n10 14847     -1.615300e+02 2.586700e+02\n12 14847     -1.314500e+02 1.618200e+02\n13 14847     3.008400e+02 -1.416300e+02\n15 14847     -1.128000e+02 2.733600e+02\n2 14848     7.981000e+01 7.821997e+01\n3 14848     -1.189001e+01 -2.373200e+02\n4 14848     -2.203100e+02 -3.972800e+02\n8 14848     9.840002e+01 1.998999e+01\n10 14848     -1.235800e+02 2.262200e+02\n2 14849     3.856801e+02 7.710999e+01\n3 14849     2.778101e+02 -2.302300e+02\n2 14850     -1.521400e+02 7.221997e+01\n4 14850     -1.038200e+02 -4.113500e+02\n9 14850     -2.694100e+02 1.322600e+02\n2 14851     6.739399e+02 6.153998e+01\n3 14851     5.347900e+02 -2.426100e+02\n7 14851     5.729301e+02 2.222100e+02\n9 14851     4.370900e+02 1.568900e+02\n10 14851     7.519399e+02 2.385500e+02\n12 14851     6.805601e+02 2.161100e+02\n2 14852     6.041600e+02 5.925000e+01\n3 14852     4.676899e+02 -2.479600e+02\n8 14852     5.551801e+02 1.729001e+01\n9 14852     3.785601e+02 1.523500e+02\n10 14852     6.810000e+02 2.642100e+02\n2 14853     7.673500e+02 5.816998e+01\n9 14853     5.145900e+02 1.571000e+02\n2 14854     3.261700e+02 5.690997e+01\n3 14854     2.247600e+02 -2.515500e+02\n13 14854     5.248700e+02 -2.161200e+02\n2 14855     8.832001e+01 5.175000e+01\n3 14855     -7.999878e-01 -2.616600e+02\n4 14855     -2.376800e+02 -3.917300e+02\n6 14855     -9.266000e+01 5.783002e+01\n7 14855     -1.215100e+02 1.540600e+02\n8 14855     1.046500e+02 -2.390015e+00\n12 14855     -7.357001e+01 1.137400e+02\n13 14855     3.390400e+02 -1.848400e+02\n15 14855     -7.458002e+01 1.985500e+02\n2 14856     6.929200e+02 5.142999e+01\n9 14856     4.528500e+02 1.490200e+02\n12 14856     7.012800e+02 2.025000e+02\n2 14857     -5.256000e+01 4.671997e+01\n3 14857     -1.486400e+02 -2.727000e+02\n2 14858     6.576001e+01 4.583002e+01\n6 14858     -1.159300e+02 5.475000e+01\n13 14858     3.234301e+02 -1.845600e+02\n2 14859     6.576001e+01 4.583002e+01\n4 14859     -2.346900e+02 -3.800700e+02\n6 14859     -1.159300e+02 5.475000e+01\n2 14860     3.454700e+02 3.385999e+01\n3 14860     2.438500e+02 -2.726500e+02\n2 14861     3.753300e+02 3.008002e+01\n3 14861     2.730200e+02 -2.750500e+02\n2 14862     7.308400e+02 2.869000e+01\n7 14862     6.186899e+02 1.788800e+02\n9 14862     4.844700e+02 1.314400e+02\n10 14862     8.030500e+02 1.808400e+02\n12 14862     7.401400e+02 1.730400e+02\n2 14863     7.784998e+01 2.745001e+01\n3 14863     -9.409973e+00 -2.855600e+02\n4 14863     -2.484300e+02 -3.806600e+02\n6 14863     -1.042400e+02 3.150000e+01\n7 14863     -1.329300e+02 1.331600e+02\n8 14863     9.556000e+01 -2.222000e+01\n12 14863     -8.553003e+01 8.750000e+01\n13 14863     3.280900e+02 -2.021200e+02\n2 14864     7.784998e+01 2.745001e+01\n3 14864     -9.409973e+00 -2.855600e+02\n13 14864     3.280900e+02 -2.021200e+02\n2 14865     3.418500e+02 1.908002e+01\n3 14865     2.428700e+02 -2.866000e+02\n6 14865     1.705300e+02 2.020001e+01\n7 14865     9.166998e+01 9.379999e+01\n8 14865     3.109400e+02 -3.329001e+01\n9 14865     1.747900e+02 1.139500e+02\n10 14865     1.051500e+02 1.013800e+02\n2 14866     -6.840027e+00 1.847998e+01\n3 14866     -9.540002e+01 -2.957300e+02\n8 14866     2.994000e+01 -2.563000e+01\n9 14866     -1.179500e+02 9.941000e+01\n2 14867     6.370900e+02 1.695001e+01\n8 14867     5.819100e+02 -1.851999e+01\n12 14867     6.393400e+02 1.744700e+02\n2 14868     6.370900e+02 1.695001e+01\n3 14868     5.015900e+02 -2.873600e+02\n8 14868     5.819100e+02 -1.851999e+01\n12 14868     6.393400e+02 1.744700e+02\n2 14869     -1.276500e+02 1.173999e+01\n8 14869     -5.846997e+01 -2.203000e+01\n2 14870     6.100601e+02 -1.000000e+00\n3 14870     4.770900e+02 -3.065800e+02\n6 14870     5.298900e+02 1.503900e+02\n8 14870     5.583600e+02 -3.207001e+01\n12 14870     6.097900e+02 1.601800e+02\n2 14871     1.972800e+02 -4.760010e+00\n3 14871     1.079200e+02 -3.129700e+02\n4 14871     -3.038300e+02 -4.393000e+02\n7 14871     -4.392999e+01 8.064001e+01\n10 14871     -4.965002e+01 9.896002e+01\n13 14871     4.090000e+02 -2.524600e+02\n2 14872     1.333300e+02 -1.109003e+01\n3 14872     4.621997e+01 -3.211100e+02\n4 14872     -2.866400e+02 -3.982400e+02\n6 14872     -4.839001e+01 -1.781000e+01\n7 14872     -9.795001e+01 8.639999e+01\n8 14872     1.382400e+02 -5.651999e+01\n10 14872     -1.091900e+02 1.125000e+02\n12 14872     -3.600000e+01 3.671002e+01\n13 14872     3.593500e+02 -2.439700e+02\n15 14872     -5.233002e+01 1.035800e+02\n2 14873     1.601700e+02 -1.367999e+01\n7 14873     -7.662000e+01 7.915997e+01\n15 14873     -2.642999e+01 9.053000e+01\n2 14874     6.758400e+02 -3.115002e+01\n3 14874     5.428600e+02 -3.328600e+02\n7 14874     5.635900e+02 1.408000e+02\n9 14874     4.407400e+02 7.957001e+01\n10 14874     7.324900e+02 1.436000e+02\n12 14874     6.784301e+02 1.182900e+02\n2 14875     6.758400e+02 -3.115002e+01\n3 14875     5.428600e+02 -3.328600e+02\n7 14875     5.635900e+02 1.408000e+02\n9 14875     4.407400e+02 7.957001e+01\n12 14875     6.784301e+02 1.182900e+02\n2 14876     -1.447400e+02 -3.397998e+01\n3 14876     -2.343200e+02 -3.532700e+02\n2 14877     7.327800e+02 -3.397998e+01\n9 14877     4.875500e+02 7.967001e+01\n12 14877     7.392200e+02 1.070000e+02\n2 14878     -1.576100e+02 -4.059998e+01\n3 14878     -2.434100e+02 -3.597500e+02\n2 14879     3.114000e+02 -4.163000e+01\n3 14879     2.188300e+02 -3.441900e+02\n4 14879     -3.601100e+02 -5.101899e+02\n6 14879     1.358200e+02 -4.796997e+01\n7 14879     5.073999e+01 3.914001e+01\n8 14879     2.838300e+02 -8.365002e+01\n2 14880     9.144000e+01 -4.715002e+01\n3 14880     7.140015e+00 -3.569500e+02\n4 14880     -2.930900e+02 -3.707600e+02\n6 14880     -9.103000e+01 -5.104999e+01\n7 14880     -1.310100e+02 6.384003e+01\n8 14880     1.043700e+02 -8.432001e+01\n13 14880     3.264700e+02 -2.613500e+02\n2 14881     9.144000e+01 -4.715002e+01\n3 14881     7.140015e+00 -3.569500e+02\n8 14881     1.043700e+02 -8.432001e+01\n13 14881     3.264700e+02 -2.613500e+02\n2 14882     6.632900e+02 -5.085999e+01\n9 14882     4.306801e+02 6.288000e+01\n12 14882     6.641300e+02 9.995001e+01\n2 14883     6.632900e+02 -5.085999e+01\n9 14883     4.306801e+02 6.288000e+01\n10 14883     7.153000e+02 1.297600e+02\n12 14883     6.641300e+02 9.995001e+01\n2 14884     -1.331900e+02 -5.262000e+01\n3 14884     -2.185600e+02 -3.703900e+02\n4 14884     -2.310200e+02 -2.757000e+02\n6 14884     -3.152800e+02 -2.422998e+01\n12 14884     -2.743600e+02 3.396002e+01\n15 14884     -2.615000e+02 1.629600e+02\n2 14885     -1.331900e+02 -5.262000e+01\n3 14885     -2.185600e+02 -3.703900e+02\n6 14885     -3.152800e+02 -2.422998e+01\n2 14886     1.480900e+02 -5.553003e+01\n3 14886     6.271002e+01 -3.629700e+02\n4 14886     -3.156300e+02 -3.981500e+02\n8 14886     1.491300e+02 -9.198999e+01\n2 14887     -3.559003e+01 -6.023999e+01\n8 14887     3.099976e+00 -9.065997e+01\n13 14887     2.398600e+02 -2.449700e+02\n2 14888     7.064700e+02 -6.356000e+01\n7 14888     5.872400e+02 1.053400e+02\n9 14888     4.674600e+02 5.421002e+01\n10 14888     7.583300e+02 9.787000e+01\n2 14889     -1.070800e+02 -6.603998e+01\n8 14889     -5.096002e+01 -9.251001e+01\n2 14890     -9.000000e+00 -7.159003e+01\n4 14890     -2.780200e+02 -3.146900e+02\n6 14890     -1.940400e+02 -6.877002e+01\n9 14890     -1.126400e+02 2.379999e+01\n2 14891     6.777000e+02 -7.440002e+01\n3 14891     5.481600e+02 -3.755300e+02\n7 14891     5.601500e+02 1.038000e+02\n10 14891     7.255500e+02 1.000500e+02\n2 14892     -6.237000e+01 -1.175100e+02\n3 14892     -1.406000e+02 -4.297700e+02\n4 14892     -2.890700e+02 -2.746600e+02\n6 14892     -2.494500e+02 -1.229500e+02\n7 14892     -2.613200e+02 2.103998e+01\n8 14892     -2.173999e+01 -1.383000e+02\n12 14892     -2.344500e+02 -6.139001e+01\n2 14893     1.152700e+02 -1.187000e+02\n3 14893     3.478998e+01 -4.251500e+02\n10 14893     -1.518800e+02 6.090027e+00\n2 14894     -1.165900e+02 -1.214400e+02\n8 14894     -6.442999e+01 -1.397400e+02\n2 14895     -8.421997e+01 -1.255800e+02\n3 14895     -1.619500e+02 -4.398000e+02\n6 14895     -2.693100e+02 -1.288200e+02\n8 14895     -3.787000e+01 -1.434500e+02\n2 14896     2.613199e+02 -1.359200e+02\n4 14896     -4.001000e+02 -4.445900e+02\n6 14896     7.815002e+01 -1.538700e+02\n8 14896     2.385100e+02 -1.623000e+02\n12 14896     8.437000e+01 -1.073800e+02\n2 14897     5.253900e+02 -1.414400e+02\n6 14897     3.681100e+02 -1.287000e+02\n8 14897     4.637200e+02 -1.669600e+02\n12 14897     3.982700e+02 -9.620001e+01\n2 14898     7.634000e+02 -1.421700e+02\n9 14898     5.160300e+02 -9.119995e+00\n12 14898     7.640900e+02 -8.809998e+00\n2 14899     -1.005200e+02 -1.440900e+02\n6 14899     -2.850100e+02 -1.458000e+02\n2 14900     5.155900e+02 -1.454900e+02\n9 14900     3.228500e+02 -1.673999e+01\n2 14901     -2.578003e+01 -1.620300e+02\n7 14901     -2.374400e+02 -2.385999e+01\n9 14901     -1.206100e+02 -5.225000e+01\n10 14901     -2.698900e+02 4.320007e+00\n15 14901     -2.373300e+02 -2.519000e+01\n2 14902     4.376100e+02 -1.771800e+02\n3 14902     3.467300e+02 -4.717200e+02\n4 14902     -4.941200e+02 -5.559200e+02\n6 14902     2.600100e+02 -1.930601e+02\n7 14902     1.342300e+02 -1.018700e+02\n9 14902     2.625000e+02 -4.385999e+01\n15 14902     2.335500e+02 -1.789400e+02\n2 14903     4.703199e+02 -1.793900e+02\n6 14903     2.982500e+02 -1.877000e+02\n8 14903     4.121200e+02 -1.996100e+02\n12 14903     3.152800e+02 -1.531200e+02\n2 14904     5.083000e+02 -1.916900e+02\n8 14904     4.483101e+02 -2.077200e+02\n9 14904     3.186000e+02 -5.585999e+01\n2 14905     5.243400e+02 -1.957200e+02\n6 14905     3.698400e+02 -1.749100e+02\n8 14905     4.637400e+02 -2.091500e+02\n9 14905     3.308101e+02 -5.785999e+01\n12 14905     4.026200e+02 -1.454500e+02\n2 14906     -3.027400e+02 -2.063700e+02\n13 14906     9.214001e+01 -2.463500e+02\n2 14907     -4.099500e+02 -2.076900e+02\n7 14907     -4.260600e+02 7.890997e+01\n2 14908     -2.898000e+02 -2.108500e+02\n13 14908     9.956000e+01 -2.517300e+02\n2 14909     -3.295600e+02 -2.186200e+02\n3 14909     -4.374100e+02 -5.513101e+02\n2 14910     1.560600e+02 -2.196000e+02\n3 14910     8.089001e+01 -5.227000e+02\n6 14910     -3.178003e+01 -2.426300e+02\n8 14910     1.490500e+02 -2.286200e+02\n9 14910     3.478998e+01 -9.073999e+01\n2 14911     2.360699e+02 -2.199200e+02\n3 14911     1.591100e+02 -5.200400e+02\n6 14911     4.864001e+01 -2.450500e+02\n8 14911     2.143900e+02 -2.307500e+02\n2 14912     -5.600700e+02 -2.326300e+02\n8 14912     -3.954200e+02 -2.055800e+02\n2 14913     4.691200e+02 -2.327700e+02\n6 14913     2.984200e+02 -2.342900e+02\n8 14913     4.119600e+02 -2.432700e+02\n2 14914     -4.821002e+01 -2.358700e+02\n3 14914     -1.257500e+02 -5.483600e+02\n4 14914     -3.493800e+02 -2.690000e+02\n6 14914     -2.295700e+02 -2.314100e+02\n8 14914     -1.046997e+01 -2.317800e+02\n9 14914     -1.381500e+02 -1.151800e+02\n2 14915     -4.171100e+02 -2.550900e+02\n4 14915     -2.471100e+02 -1.514800e+02\n7 14915     -4.470800e+02 2.664001e+01\n2 14916     -3.948600e+02 -2.586600e+02\n7 14916     -4.298100e+02 2.263000e+01\n2 14917     3.693800e+02 -2.594100e+02\n3 14917     2.873101e+02 -5.556801e+02\n6 14917     1.874000e+02 -2.719200e+02\n8 14917     3.244200e+02 -2.649000e+02\n9 14917     2.111300e+02 -1.144900e+02\n12 14917     1.927000e+02 -2.341700e+02\n2 14918     -3.280000e+02 -2.715300e+02\n7 14918     -3.843700e+02 -1.020020e+00\n9 14918     -3.850100e+02 -1.650600e+02\n13 14918     5.709003e+01 -3.036800e+02\n2 14919     -7.799988e+00 -2.796000e+02\n3 14919     -8.415002e+01 -5.909399e+02\n8 14919     2.178003e+01 -2.693000e+02\n2 14920     2.492800e+02 -2.940300e+02\n3 14920     1.733000e+02 -5.943400e+02\n6 14920     6.459998e+01 -3.067400e+02\n2 14921     -3.807100e+02 -2.985000e+02\n8 14921     -2.612100e+02 -2.643000e+02\n2 14922     3.778900e+02 -3.025400e+02\n3 14922     2.957500e+02 -5.991200e+02\n6 14922     2.003000e+02 -3.085100e+02\n8 14922     3.332300e+02 -2.989100e+02\n9 14922     2.183600e+02 -1.498400e+02\n2 14923     -4.631000e+02 -3.039200e+02\n7 14923     -4.969900e+02 -2.196997e+01\n8 14923     -3.247300e+02 -2.662700e+02\n9 14923     -4.968400e+02 -1.981000e+02\n13 14923     -4.044000e+01 -3.135800e+02\n15 14923     -5.258200e+02 2.715997e+01\n2 14924     2.334100e+02 -3.243300e+02\n6 14924     5.051001e+01 -3.322600e+02\n8 14924     2.125200e+02 -3.139700e+02\n12 14924     5.446002e+01 -2.874700e+02\n2 14925     -3.825600e+02 -3.249700e+02\n7 14925     -4.435100e+02 -4.994000e+01\n15 14925     -4.638400e+02 -1.690997e+01\n2 14926     3.352600e+02 -3.314000e+02\n4 14926     -5.380700e+02 -4.613500e+02\n6 14926     1.546500e+02 -3.371200e+02\n8 14926     2.965400e+02 -3.216200e+02\n12 14926     1.612100e+02 -2.971000e+02\n2 14927     -5.571500e+02 -3.365100e+02\n8 14927     -4.009200e+02 -2.935600e+02\n2 14928     2.327100e+02 -3.374600e+02\n6 14928     5.034003e+01 -3.449100e+02\n12 14928     5.521997e+01 -3.008700e+02\n2 14929     -5.168800e+02 -3.387600e+02\n8 14929     -3.704000e+02 -2.963100e+02\n2 14930     -3.621000e+02 -3.522400e+02\n6 14930     -5.388800e+02 -3.100400e+02\n7 14930     -4.355500e+02 -8.272998e+01\n9 14930     -4.040100e+02 -2.346100e+02\n13 14930     1.448999e+01 -3.709200e+02\n2 14931     -3.182500e+02 -3.529900e+02\n13 14931     4.240002e+01 -3.773600e+02\n2 14932     -4.399900e+02 -3.594100e+02\n7 14932     -4.945100e+02 -8.303998e+01\n9 14932     -4.705600e+02 -2.460600e+02\n13 14932     -3.709998e+01 -3.664000e+02\n15 14932     -5.344200e+02 -5.623999e+01\n2 14933     -5.540300e+02 -3.773400e+02\n7 14933     -5.845500e+02 -9.015002e+01\n8 14933     -4.029000e+02 -3.282300e+02\n13 14933     -1.156300e+02 -3.645600e+02\n2 14934     -3.535200e+02 -3.995699e+02\n7 14934     -4.444600e+02 -1.319100e+02\n9 14934     -3.915000e+02 -2.736900e+02\n13 14934     8.979980e+00 -4.139400e+02\n2 14935     -3.084400e+02 -4.046100e+02\n7 14935     -4.135900e+02 -1.424000e+02\n2 14936     -3.677300e+02 -4.239900e+02\n8 14936     -2.608800e+02 -3.717300e+02\n2 14937     5.153400e+02 -4.562300e+02\n10 14937     2.004500e+02 -3.714400e+02\n2 14938     -4.135700e+02 -4.783400e+02\n8 14938     -3.026000e+02 -4.169700e+02\n2 14939     6.997600e+02 -5.030800e+02\n9 14939     4.887300e+02 -2.984800e+02\n2 14940     6.803101e+02 -5.073199e+02\n9 14940     4.713400e+02 -3.034100e+02\n10 14940     3.420200e+02 -4.689500e+02\n2 14941     4.639500e+02 -5.422400e+02\n10 14941     1.095800e+02 -4.419000e+02\n2 14942     5.061400e+02 -5.422000e+02\n9 14942     3.333700e+02 -3.401600e+02\n2 14943     -2.174300e+02 6.078900e+02\n11 14943     2.247600e+02 6.489990e+00\n13 14943     2.705900e+02 4.457300e+02\n14 14943     4.113600e+02 8.606000e+01\n2 14944     -1.861400e+02 5.849400e+02\n4 14944     1.859800e+02 -4.754000e+02\n2 14945     1.395001e+01 5.797300e+02\n3 14945     -1.308000e+02 2.350600e+02\n13 14945     4.898700e+02 4.528000e+02\n14 14945     6.716400e+02 8.856000e+01\n2 14946     2.880100e+02 5.512700e+02\n6 14946     2.011500e+02 8.514100e+02\n2 14947     -3.421300e+02 5.467100e+02\n3 14947     -4.633100e+02 2.101000e+02\n4 14947     1.651300e+02 -3.602200e+02\n5 14947     3.791000e+02 1.140000e+02\n6 14947     -5.691000e+02 8.595500e+02\n8 14947     -2.026200e+02 4.258700e+02\n11 14947     1.065500e+02 -4.995001e+01\n13 14947     1.609000e+02 3.851200e+02\n14 14947     2.814399e+02 2.023999e+01\n2 14948     -6.156400e+02 5.312200e+02\n13 14948     -6.381000e+01 3.458100e+02\n14 14948     1.471002e+01 -1.583002e+01\n2 14949     -1.103000e+02 5.205600e+02\n4 14949     1.477700e+02 -5.254000e+02\n5 14949     6.304100e+02 1.068700e+02\n8 14949     -1.113000e+01 4.089200e+02\n13 14949     3.660100e+02 3.885100e+02\n14 14949     5.252800e+02 1.760999e+01\n2 14950     -6.551700e+02 5.119400e+02\n4 14950     1.522700e+02 -1.738700e+02\n5 14950     6.764001e+01 6.240997e+01\n8 14950     -4.604500e+02 3.888600e+02\n2 14951     -6.134300e+02 5.121000e+02\n4 14951     1.524500e+02 -1.963600e+02\n8 14951     -4.258000e+02 3.912500e+02\n2 14952     -5.264500e+02 5.060200e+02\n11 14952     -6.277002e+01 -9.490997e+01\n13 14952     4.840027e+00 3.358500e+02\n14 14952     9.565002e+01 -3.064001e+01\n2 14953     -1.211300e+02 5.002300e+02\n4 14953     1.359200e+02 -5.126500e+02\n11 14953     3.260900e+02 -6.612000e+01\n2 14954     -7.453998e+01 4.909900e+02\n6 14954     -2.254300e+02 8.503800e+02\n2 14955     5.682400e+02 4.882700e+02\n3 14955     4.137300e+02 1.544900e+02\n6 14955     5.114200e+02 6.972900e+02\n9 14955     3.389301e+02 5.153700e+02\n2 14956     -6.496200e+02 4.877800e+02\n4 14956     1.417600e+02 -1.748600e+02\n2 14957     -4.449300e+02 4.772600e+02\n3 14957     -5.689100e+02 1.439400e+02\n4 14957     1.314300e+02 -2.874700e+02\n5 14957     2.666200e+02 4.365002e+01\n8 14957     -2.877200e+02 3.676500e+02\n2 14958     5.500900e+02 4.764600e+02\n6 14958     4.901300e+02 6.855100e+02\n8 14958     5.158800e+02 3.615800e+02\n9 14958     3.236300e+02 5.039000e+02\n2 14959     -6.548300e+02 4.751200e+02\n4 14959     1.358700e+02 -1.710800e+02\n8 14959     -4.594900e+02 3.604000e+02\n11 14959     -1.690500e+02 -1.228500e+02\n2 14960     -6.919900e+02 4.738100e+02\n4 14960     1.362200e+02 -1.520500e+02\n2 14961     -6.604000e+02 4.637000e+02\n4 14961     1.309600e+02 -1.676100e+02\n5 14961     5.960999e+01 2.213000e+01\n8 14961     -4.628900e+02 3.515400e+02\n11 14961     -1.732700e+02 -1.306500e+02\n13 14961     -9.810999e+01 2.945300e+02\n14 14961     -2.813000e+01 -7.402002e+01\n2 14962     1.760300e+02 4.590300e+02\n6 14962     9.679999e+01 8.699300e+02\n2 14963     5.232800e+02 4.323900e+02\n3 14963     3.738800e+02 1.028500e+02\n6 14963     4.560699e+02 6.378900e+02\n8 14963     4.929301e+02 3.258500e+02\n9 14963     3.020200e+02 4.654200e+02\n2 14964     2.935699e+02 4.178100e+02\n3 14964     1.501900e+02 8.447998e+01\n9 14964     1.021800e+02 4.464400e+02\n13 14964     6.793700e+02 2.364100e+02\n2 14965     -6.859000e+02 4.089500e+02\n4 14965     1.070500e+02 -1.497900e+02\n5 14965     3.063000e+01 -2.550000e+01\n8 14965     -4.841400e+02 3.070100e+02\n11 14965     -1.961600e+02 -1.693200e+02\n13 14965     -1.201400e+02 2.529800e+02\n14 14965     -5.688000e+01 -1.214400e+02\n2 14966     -3.602300e+02 4.064300e+02\n3 14966     -4.859900e+02 7.434003e+01\n4 14966     9.300000e+01 -3.322900e+02\n5 14966     3.463199e+02 -1.644000e+01\n8 14966     -2.176500e+02 3.128200e+02\n11 14966     8.603003e+01 -1.573900e+02\n2 14967     -3.724100e+02 3.792500e+02\n4 14967     7.895001e+01 -3.207300e+02\n5 14967     3.303800e+02 -4.400000e+01\n8 14967     -2.280100e+02 2.902600e+02\n11 14967     7.185999e+01 -1.789500e+02\n2 14968     -6.881200e+02 3.646000e+02\n5 14968     2.406000e+01 -6.295001e+01\n8 14968     -4.858600e+02 2.727500e+02\n2 14969     -7.941100e+02 3.502400e+02\n4 14969     8.562000e+01 -9.284003e+01\n5 14969     -7.047998e+01 -7.740002e+01\n2 14970     4.026000e+02 3.467300e+02\n6 14970     3.275000e+02 5.884600e+02\n8 14970     3.970300e+02 2.606300e+02\n9 14970     1.982000e+02 3.883400e+02\n2 14971     -6.235200e+02 3.416600e+02\n4 14971     7.421997e+01 -1.754400e+02\n5 14971     8.177002e+01 -8.141998e+01\n8 14971     -4.327500e+02 2.556800e+02\n11 14971     -1.480400e+02 -2.134900e+02\n12 14971     -6.969700e+02 5.453900e+02\n13 14971     -7.462000e+01 2.098900e+02\n2 14972     6.619399e+02 3.405200e+02\n3 14972     5.097700e+02 2.098999e+01\n9 14972     4.195900e+02 3.909600e+02\n2 14973     -7.847600e+02 3.386700e+02\n4 14973     8.047998e+01 -9.821002e+01\n8 14973     -5.637300e+02 2.493000e+02\n2 14974     4.485999e+01 3.368000e+02\n3 14974     -1.027000e+02 2.340027e+00\n5 14974     7.969500e+02 -6.753998e+01\n6 14974     -7.003998e+01 6.842700e+02\n8 14974     1.178100e+02 2.652900e+02\n9 14974     -1.168100e+02 3.681200e+02\n11 14974     4.983600e+02 -1.862100e+02\n13 14974     4.998700e+02 2.519300e+02\n14 14974     6.928000e+02 -1.473700e+02\n2 14975     -2.164800e+02 3.333000e+02\n4 14975     4.721997e+01 -4.203000e+02\n5 14975     4.942700e+02 -8.094000e+01\n6 14975     -3.921200e+02 6.225400e+02\n11 14975     2.229000e+02 -2.046900e+02\n2 14976     6.026801e+02 3.294500e+02\n9 14976     3.708101e+02 3.798900e+02\n10 14976     7.424100e+02 5.710200e+02\n2 14977     6.015997e+01 3.132600e+02\n5 14977     8.143000e+02 -8.909003e+01\n6 14977     -4.932001e+01 6.622000e+02\n8 14977     1.311000e+02 2.478400e+02\n9 14977     -1.029200e+02 3.477400e+02\n11 14977     5.112100e+02 -2.063300e+02\n2 14978     -1.225900e+02 3.029500e+02\n11 14978     3.173400e+02 -2.226700e+02\n13 14978     3.408000e+02 2.120100e+02\n2 14979     4.882600e+02 2.951400e+02\n3 14979     3.451899e+02 -2.641998e+01\n6 14979     4.085800e+02 4.850000e+02\n7 14979     4.369200e+02 4.813500e+02\n8 14979     4.621100e+02 2.133400e+02\n9 14979     2.746500e+02 3.472100e+02\n10 14979     6.123300e+02 5.700800e+02\n13 14979     8.124500e+02 7.234998e+01\n2 14980     6.188101e+02 2.902100e+02\n9 14980     3.872000e+02 3.473200e+02\n10 14980     7.521600e+02 5.169300e+02\n2 14981     4.245900e+02 2.651200e+02\n3 14981     2.846300e+02 -5.751001e+01\n8 14981     4.096200e+02 1.899800e+02\n2 14982     5.373600e+02 2.487900e+02\n3 14982     3.938600e+02 -6.935999e+01\n6 14982     4.613000e+02 4.279500e+02\n7 14982     4.752600e+02 4.259000e+02\n8 14982     5.016200e+02 1.747200e+02\n9 14982     3.175699e+02 3.096500e+02\n2 14983     5.947400e+02 2.461600e+02\n3 14983     4.504500e+02 -6.941998e+01\n7 14983     5.272700e+02 4.108200e+02\n8 14983     5.499301e+02 1.708500e+02\n9 14983     3.661899e+02 3.093000e+02\n2 14984     -1.833100e+02 2.448700e+02\n4 14984     -3.700012e+00 -4.319800e+02\n5 14984     5.175601e+02 -1.658800e+02\n7 14984     -1.113800e+02 5.628400e+02\n8 14984     -7.127002e+01 1.881400e+02\n12 14984     -1.800300e+02 5.068100e+02\n2 14985     -1.993000e+02 2.405400e+02\n7 14985     -1.298600e+02 5.564900e+02\n2 14986     4.282800e+02 2.185200e+02\n6 14986     3.406700e+02 4.079100e+02\n8 14986     4.135600e+02 1.517900e+02\n9 14986     2.256600e+02 2.801700e+02\n12 14986     4.293800e+02 4.146200e+02\n2 14987     6.238000e+02 2.189300e+02\n3 14987     4.784600e+02 -9.506000e+01\n6 14987     5.570300e+02 3.840400e+02\n7 14987     5.485200e+02 3.762500e+02\n8 14987     5.739000e+02 1.495500e+02\n9 14987     3.911700e+02 2.876400e+02\n10 14987     7.361899e+02 4.274800e+02\n2 14988     -1.553700e+02 2.184000e+02\n5 14988     5.476700e+02 -1.860100e+02\n6 14988     -3.125200e+02 5.025100e+02\n12 14988     -1.438800e+02 4.842300e+02\n2 14989     -1.479200e+02 2.104400e+02\n5 14989     5.546000e+02 -1.963700e+02\n2 14990     -2.426300e+02 2.078500e+02\n3 14990     -3.787200e+02 -1.239300e+02\n4 14990     -1.577002e+01 -3.838400e+02\n5 14990     4.466300e+02 -1.993500e+02\n8 14990     -1.223800e+02 1.571000e+02\n12 14990     -2.473800e+02 4.616300e+02\n2 14991     -1.560300e+02 1.995400e+02\n3 14991     -2.931900e+02 -1.307700e+02\n7 14991     -8.284998e+01 5.279400e+02\n12 14991     -1.441400e+02 4.706700e+02\n13 14991     3.036899e+02 1.329800e+02\n14 14991     4.532100e+02 -2.858400e+02\n2 14992     3.647800e+02 1.734600e+02\n7 14992     3.486200e+02 4.186000e+02\n2 14993     -4.935300e+02 1.712100e+02\n7 14993     -4.289600e+02 4.689500e+02\n8 14993     -3.270700e+02 1.243200e+02\n11 14993     -4.115002e+01 -3.316100e+02\n12 14993     -5.278500e+02 3.895600e+02\n2 14994     1.102200e+02 1.666700e+02\n8 14994     1.313300e+02 9.520999e+01\n2 14995     -3.198100e+02 1.648100e+02\n7 14995     -2.509700e+02 4.804400e+02\n8 14995     -1.829500e+02 1.221800e+02\n2 14996     2.716899e+02 1.569500e+02\n3 14996     1.610500e+02 -1.596200e+02\n2 14997     1.628200e+02 9.633002e+01\n3 14997     6.996997e+01 -2.173500e+02\n4 14997     -2.326700e+02 -4.449301e+02\n5 14997     6.792500e+02 -5.949700e+02\n6 14997     -1.513000e+01 1.044500e+02\n8 14997     1.662700e+02 3.298999e+01\n12 14997     4.299988e+00 1.588000e+02\n2 14998     7.791600e+02 9.465997e+01\n9 14998     5.225200e+02 1.875400e+02\n2 14999     7.540100e+02 8.753003e+01\n12 14999     7.700200e+02 2.329700e+02\n2 15000     7.540100e+02 8.753003e+01\n9 15000     5.027300e+02 1.809200e+02\n12 15000     7.700200e+02 2.329700e+02\n2 15001     1.656700e+02 7.590997e+01\n3 15001     7.388000e+01 -2.369600e+02\n4 15001     -2.457200e+02 -4.406700e+02\n6 15001     -1.365997e+01 7.934998e+01\n8 15001     1.676600e+02 1.619000e+01\n10 15001     -6.000000e+01 1.953300e+02\n12 15001     3.669983e+00 1.337500e+02\n2 15002     2.031000e+01 6.296002e+01\n6 15002     -1.612800e+02 8.372998e+01\n8 15002     5.209998e+01 1.028000e+01\n13 15002     2.979800e+02 -1.579300e+02\n2 15003     2.031000e+01 6.296002e+01\n6 15003     -1.612800e+02 8.372998e+01\n8 15003     5.209998e+01 1.028000e+01\n2 15004     4.161300e+02 1.946002e+01\n8 15004     3.763100e+02 -3.081000e+01\n2 15005     5.850100e+02 1.866998e+01\n3 15005     4.509500e+02 -2.881200e+02\n6 15005     5.044800e+02 1.737600e+02\n7 15005     4.925000e+02 2.059400e+02\n8 15005     5.389200e+02 -1.537000e+01\n9 15005     3.630000e+02 1.176600e+02\n10 15005     6.533101e+02 2.309100e+02\n12 15005     5.852700e+02 1.834400e+02\n13 15005     8.660000e+02 -1.765000e+02\n2 15006     -4.622000e+02 1.446997e+01\n15 15006     -3.233400e+02 5.208100e+02\n2 15007     7.455100e+02 2.150024e+00\n10 15007     8.141100e+02 1.449700e+02\n2 15008     7.037900e+02 2.899780e-01\n9 15008     4.635300e+02 1.069000e+02\n10 15008     7.682200e+02 1.633300e+02\n2 15009     8.496002e+01 -2.000000e+00\n3 15009     -1.239990e+00 -3.134700e+02\n4 15009     -2.670200e+02 -3.766100e+02\n13 15009     3.273600e+02 -2.268700e+02\n2 15010     8.496002e+01 -2.000000e+00\n4 15010     -2.670200e+02 -3.766100e+02\n2 15011     5.634301e+02 -3.521002e+01\n8 15011     5.035300e+02 -7.409003e+01\n2 15012     6.655900e+02 -3.952002e+01\n3 15012     5.336500e+02 -3.421100e+02\n7 15012     5.538800e+02 1.364300e+02\n9 15012     4.317500e+02 7.279999e+01\n12 15012     6.667000e+02 1.119100e+02\n2 15013     -1.266700e+02 -4.491998e+01\n8 15013     -6.409998e+01 -7.239001e+01\n2 15014     -1.266700e+02 -4.491998e+01\n8 15014     -6.409998e+01 -7.239001e+01\n2 15015     7.876600e+02 -4.719000e+01\n7 15015     6.576899e+02 9.839001e+01\n9 15015     5.336899e+02 7.028998e+01\n12 15015     7.966100e+02 8.520001e+01\n2 15016     -1.598600e+02 -5.509003e+01\n3 15016     -2.448900e+02 -3.735700e+02\n8 15016     -9.091998e+01 -8.112000e+01\n2 15017     5.653800e+02 -9.159998e+01\n3 15017     4.577900e+02 -3.870400e+02\n2 15018     -1.441800e+02 -1.373000e+02\n3 15018     -2.311300e+02 -4.552500e+02\n2 15019     -5.209998e+01 -1.405000e+02\n3 15019     -1.287100e+02 -4.523700e+02\n4 15019     -3.053500e+02 -2.754000e+02\n6 15019     -2.362100e+02 -1.494301e+02\n7 15019     -2.535000e+02 -3.020020e+00\n8 15019     -1.350000e+01 -1.576500e+02\n9 15019     -1.437800e+02 -3.572998e+01\n12 15019     -2.236300e+02 -8.804999e+01\n2 15020     8.229980e+00 -1.436900e+02\n3 15020     -6.623999e+01 -4.529800e+02\n7 15020     -2.187300e+02 -2.153003e+01\n8 15020     3.273999e+01 -1.634000e+02\n10 15020     -2.532600e+02 4.419983e+00\n12 15020     -1.745500e+02 -1.025700e+02\n15 15020     -2.190700e+02 -2.457001e+01\n2 15021     -4.315997e+01 -1.552600e+02\n3 15021     -1.205100e+02 -4.660699e+02\n8 15021     -7.510010e+00 -1.691800e+02\n9 15021     -1.375100e+02 -4.687000e+01\n2 15022     2.114001e+01 -1.698400e+02\n3 15022     -5.271002e+01 -4.774800e+02\n8 15022     4.066998e+01 -1.855700e+02\n2 15023     4.901200e+02 -1.712200e+02\n8 15023     4.291899e+02 -1.951600e+02\n2 15024     -1.231900e+02 -1.741600e+02\n3 15024     -2.073300e+02 -4.901300e+02\n9 15024     -2.071800e+02 -6.771002e+01\n2 15025     1.293000e+02 -1.847800e+02\n4 15025     -3.865200e+02 -3.476700e+02\n6 15025     -5.772998e+01 -2.116600e+02\n12 15025     -5.997998e+01 -1.583400e+02\n2 15026     -3.250600e+02 -2.051000e+02\n13 15026     7.681000e+01 -2.408300e+02\n2 15027     -8.981000e+01 -2.434200e+02\n8 15027     -4.146002e+01 -2.359300e+02\n2 15028     -3.460000e+02 -2.455400e+02\n7 15028     -3.894800e+02 3.034003e+01\n8 15028     -2.300600e+02 -2.198100e+02\n10 15028     -3.999400e+02 1.034900e+02\n13 15028     5.210999e+01 -2.770300e+02\n15 15028     -3.785300e+02 8.744000e+01\n2 15029     7.109985e+00 -2.466700e+02\n3 15029     -6.765002e+01 -5.586000e+02\n8 15029     3.112000e+01 -2.441000e+02\n2 15030     1.679600e+02 -2.582000e+02\n8 15030     1.585300e+02 -2.619700e+02\n9 15030     4.521002e+01 -1.239600e+02\n2 15031     -5.060999e+01 -2.606300e+02\n8 15031     -1.148999e+01 -2.506700e+02\n2 15032     6.552900e+02 -2.649800e+02\n8 15032     5.828900e+02 -2.602700e+02\n2 15033     1.375100e+02 -2.958500e+02\n4 15033     -4.440700e+02 -3.431600e+02\n12 15033     -4.472998e+01 -2.539100e+02\n13 15033     3.265200e+02 -4.542100e+02\n2 15034     4.010000e+02 -3.085200e+02\n6 15034     2.245100e+02 -3.102100e+02\n8 15034     3.527400e+02 -3.032900e+02\n12 15034     2.382700e+02 -2.748300e+02\n2 15035     -4.899700e+02 -3.719900e+02\n13 15035     -7.371002e+01 -3.694700e+02\n2 15036     -4.899700e+02 -3.719900e+02\n7 15036     -5.351600e+02 -9.179999e+01\n8 15036     -3.523400e+02 -3.250700e+02\n2 15037     3.267400e+02 -3.705000e+02\n8 15037     2.892900e+02 -3.520000e+02\n2 15038     -4.676100e+02 -4.227400e+02\n7 15038     -5.340800e+02 -1.441400e+02\n8 15038     -3.393200e+02 -3.681400e+02\n15 15038     -5.949300e+02 -1.346300e+02\n2 15039     5.542200e+02 -4.392400e+02\n8 15039     4.808300e+02 -4.139300e+02\n2 15040     -3.824600e+02 -4.865000e+02\n6 15040     -5.607300e+02 -4.835699e+02\n8 15040     -2.798500e+02 -4.247200e+02\n2 15041     5.005400e+02 -5.031400e+02\n10 15041     1.635700e+02 -4.144800e+02\n2 15042     6.825699e+02 -5.914500e+02\n6 15042     4.876500e+02 -6.069399e+02\n12 15042     4.899800e+02 -5.963000e+02\n2 15043     5.569900e+02 -6.058500e+02\n9 15043     3.808000e+02 -3.865400e+02\n2 15044     5.755100e+02 -6.055900e+02\n7 15044     1.897600e+02 -4.651000e+02\n9 15044     3.945601e+02 -3.854800e+02\n2 15045     -2.790300e+02 5.927100e+02\n14 15045     3.466200e+02 6.528998e+01\n2 15046     -8.050000e+01 5.740300e+02\n3 15046     -2.190200e+02 2.311400e+02\n4 15046     1.788500e+02 -5.579100e+02\n5 15046     6.700100e+02 1.624800e+02\n13 15046     3.969200e+02 4.355200e+02\n14 15046     5.615601e+02 7.128003e+01\n2 15047     -2.105300e+02 5.634500e+02\n3 15047     -3.399400e+02 2.233800e+02\n4 15047     1.737100e+02 -4.538400e+02\n11 15047     2.320400e+02 -2.521002e+01\n14 15047     4.172700e+02 4.740997e+01\n2 15048     4.517200e+02 5.313800e+02\n3 15048     3.028101e+02 1.924600e+02\n8 15048     4.343800e+02 4.083800e+02\n2 15049     2.674500e+02 5.292900e+02\n3 15049     1.228700e+02 1.887500e+02\n6 15049     1.752700e+02 8.293400e+02\n8 15049     2.890100e+02 4.123200e+02\n13 15049     6.694500e+02 3.366300e+02\n2 15050     -5.124800e+02 5.100700e+02\n11 15050     -5.365002e+01 -9.117999e+01\n2 15051     2.672900e+02 4.919400e+02\n3 15051     1.235900e+02 1.536800e+02\n6 15051     1.755700e+02 7.827400e+02\n8 15051     2.889300e+02 3.820500e+02\n13 15051     6.653000e+02 3.052200e+02\n2 15052     -2.723300e+02 4.889400e+02\n3 15052     -3.998500e+02 1.517600e+02\n4 15052     1.344100e+02 -3.997400e+02\n5 15052     4.462600e+02 6.602002e+01\n6 15052     -4.762700e+02 8.014500e+02\n8 15052     -1.456700e+02 3.812000e+02\n2 15053     -2.441900e+02 4.766900e+02\n3 15053     -3.734600e+02 1.385300e+02\n4 15053     1.263300e+02 -4.182800e+02\n6 15053     -4.384100e+02 7.952600e+02\n8 15053     -1.214800e+02 3.736300e+02\n11 15053     1.982300e+02 -9.659998e+01\n13 15053     2.407500e+02 3.383600e+02\n14 15053     3.763300e+02 -3.673999e+01\n2 15054     -1.131700e+02 4.686300e+02\n3 15054     -2.506100e+02 1.306200e+02\n6 15054     -2.733400e+02 8.111900e+02\n2 15055     -2.582001e+01 4.461800e+02\n3 15055     -1.685700e+02 1.075100e+02\n5 15055     7.221000e+02 4.135999e+01\n6 15055     -1.639800e+02 8.047300e+02\n8 15055     5.960999e+01 3.523800e+02\n11 15055     4.236300e+02 -1.009600e+02\n13 15055     4.401200e+02 3.363200e+02\n14 15055     6.163600e+02 -4.544000e+01\n2 15056     3.989200e+02 4.252300e+02\n3 15056     2.520000e+02 9.346002e+01\n6 15056     3.240700e+02 6.788800e+02\n8 15056     3.941000e+02 3.234300e+02\n2 15057     4.458199e+02 4.129300e+02\n3 15057     3.008000e+02 8.234003e+01\n6 15057     3.680600e+02 6.253300e+02\n8 15057     4.294800e+02 3.110700e+02\n9 15057     2.369700e+02 4.465800e+02\n2 15058     -4.789700e+02 3.984900e+02\n3 15058     -6.004600e+02 6.704999e+01\n2 15059     4.720100e+02 3.948400e+02\n3 15059     3.262900e+02 6.684003e+01\n6 15059     3.951600e+02 6.017400e+02\n8 15059     4.501000e+02 2.960800e+02\n9 15059     2.587000e+02 4.331100e+02\n12 15059     4.793300e+02 6.076100e+02\n13 15059     8.101600e+02 1.594500e+02\n2 15060     4.867600e+02 3.931900e+02\n3 15060     3.405900e+02 6.590002e+01\n6 15060     4.121600e+02 5.972700e+02\n8 15060     4.621300e+02 2.933900e+02\n9 15060     2.716000e+02 4.311100e+02\n12 15060     4.954900e+02 6.036400e+02\n13 15060     8.233700e+02 1.554300e+02\n2 15061     4.422100e+02 3.506600e+02\n3 15061     2.993800e+02 2.451001e+01\n6 15061     3.598300e+02 5.539700e+02\n8 15061     4.250400e+02 2.586900e+02\n12 15061     4.463900e+02 5.607600e+02\n2 15062     -7.706000e+01 3.460500e+02\n3 15062     -2.172000e+02 1.008002e+01\n4 15062     4.794000e+01 -5.265601e+02\n5 15062     6.513000e+02 -6.048999e+01\n6 15062     -2.217200e+02 6.709900e+02\n8 15062     1.713000e+01 2.718700e+02\n9 15062     -2.189900e+02 3.736900e+02\n11 15062     3.655000e+02 -1.853500e+02\n13 15062     3.851000e+02 2.515100e+02\n14 15062     5.514600e+02 -1.448900e+02\n2 15063     6.227000e+02 3.117400e+02\n7 15063     5.610800e+02 4.684800e+02\n8 15063     5.741400e+02 2.240200e+02\n9 15063     3.895900e+02 3.648400e+02\n10 15063     7.613500e+02 5.417800e+02\n2 15064     3.080100e+02 3.023600e+02\n7 15064     3.090601e+02 5.515900e+02\n8 15064     3.195400e+02 2.277900e+02\n11 15064     6.266899e+02 -3.226800e+02\n13 15064     6.783800e+02 1.380600e+02\n2 15065     3.080100e+02 3.023600e+02\n7 15065     3.090601e+02 5.515900e+02\n8 15065     3.195400e+02 2.277900e+02\n11 15065     6.266899e+02 -3.226800e+02\n13 15065     6.783800e+02 1.380600e+02\n2 15066     -9.821997e+01 2.787700e+02\n4 15066     1.081000e+01 -4.980900e+02\n5 15066     6.190000e+02 -1.280200e+02\n8 15066     -9.099731e-01 2.175300e+02\n9 15066     -2.355800e+02 3.130900e+02\n11 15066     3.395300e+02 -2.416000e+02\n12 15066     -7.975000e+01 5.561200e+02\n2 15067     1.990997e+01 2.647200e+02\n3 15067     -1.261100e+02 -6.808002e+01\n5 15067     7.590500e+02 -1.388400e+02\n9 15067     -1.350600e+02 3.047400e+02\n11 15067     4.695400e+02 -2.471900e+02\n2 15068     4.335200e+02 2.416200e+02\n3 15068     2.947400e+02 -7.670001e+01\n8 15068     4.172500e+02 1.706200e+02\n9 15068     2.291300e+02 2.999900e+02\n2 15069     3.714500e+02 2.225000e+02\n3 15069     2.288500e+02 -9.922998e+01\n6 15069     2.857100e+02 4.530600e+02\n8 15069     3.697500e+02 1.609800e+02\n9 15069     1.747300e+02 2.802900e+02\n2 15070     6.352200e+02 2.032800e+02\n3 15070     4.898101e+02 -1.090800e+02\n6 15070     5.686700e+02 3.615600e+02\n7 15070     5.570900e+02 3.592700e+02\n8 15070     5.819200e+02 1.343300e+02\n10 15070     7.448700e+02 4.067500e+02\n2 15071     1.590002e+01 1.992400e+02\n8 15071     9.353003e+01 1.548600e+02\n9 15071     -1.363700e+02 2.473700e+02\n11 15071     4.631700e+02 -3.028800e+02\n12 15071     5.934003e+01 4.861500e+02\n2 15072     5.270300e+02 1.995100e+02\n9 15072     3.105100e+02 2.670700e+02\n10 15072     6.323300e+02 4.451300e+02\n2 15073     5.270300e+02 1.995100e+02\n9 15073     3.105100e+02 2.670700e+02\n10 15073     6.323300e+02 4.451300e+02\n2 15074     -3.812700e+02 1.863800e+02\n3 15074     -5.119300e+02 -1.446600e+02\n5 15074     3.030500e+02 -2.194700e+02\n8 15074     -2.337500e+02 1.377800e+02\n13 15074     1.106400e+02 1.094900e+02\n2 15075     -1.081400e+02 1.655400e+02\n7 15075     -2.983002e+01 5.010800e+02\n8 15075     -8.609985e+00 1.260000e+02\n13 15075     3.445800e+02 1.090200e+02\n14 15075     5.040800e+02 -3.175200e+02\n2 15076     -1.220300e+02 1.598000e+02\n7 15076     -4.546002e+01 4.942700e+02\n8 15076     -2.035999e+01 1.221600e+02\n11 15076     3.146899e+02 -3.351100e+02\n13 15076     3.316899e+02 1.026000e+02\n14 15076     4.885100e+02 -3.242300e+02\n2 15077     3.165997e+01 1.377500e+02\n8 15077     6.390997e+01 7.142001e+01\n2 15078     -3.044500e+02 1.318200e+02\n3 15078     -4.352200e+02 -1.995800e+02\n6 15078     -4.825400e+02 3.704900e+02\n8 15078     -1.688900e+02 9.714999e+01\n9 15078     -4.016400e+02 1.787400e+02\n2 15079     -3.044500e+02 1.318200e+02\n5 15079     3.759399e+02 -2.710900e+02\n6 15079     -4.825400e+02 3.704900e+02\n7 15079     -2.405500e+02 4.493500e+02\n8 15079     -1.688900e+02 9.714999e+01\n2 15080     4.524600e+02 1.093000e+02\n15 15080     7.303199e+02 4.238600e+02\n2 15081     1.043900e+02 9.620001e+01\n4 15081     -2.162700e+02 -4.135000e+02\n8 15081     1.186800e+02 3.391000e+01\n2 15082     5.019600e+02 8.102002e+01\n9 15082     2.925000e+02 1.671700e+02\n10 15082     5.858800e+02 3.264000e+02\n2 15083     7.283101e+02 8.216998e+01\n9 15083     4.812400e+02 1.754300e+02\n2 15084     -8.490002e+01 3.062000e+01\n8 15084     -2.610999e+01 -9.529999e+00\n2 15085     -5.859998e+01 2.853998e+01\n8 15085     -6.250000e+00 -1.098999e+01\n2 15086     7.060699e+02 2.342999e+01\n3 15086     5.688400e+02 -2.780900e+02\n9 15086     4.645601e+02 1.261700e+02\n10 15086     7.758600e+02 1.859300e+02\n2 15087     7.060699e+02 2.342999e+01\n3 15087     5.688400e+02 -2.780900e+02\n9 15087     4.645601e+02 1.261700e+02\n12 15087     7.133199e+02 1.714000e+02\n2 15088     7.032700e+02 -1.366998e+01\n9 15088     4.635699e+02 9.497000e+01\n2 15089     2.850000e+01 -1.477002e+01\n3 15089     -5.806000e+01 -3.264100e+02\n6 15089     -1.530500e+02 -7.000000e+00\n2 15090     4.782001e+01 -1.876001e+01\n6 15090     -1.350300e+02 -1.412000e+01\n2 15091     5.582400e+02 -4.765002e+01\n3 15091     4.444700e+02 -3.466100e+02\n2 15092     7.726300e+02 -6.950000e+01\n9 15092     5.227600e+02 5.087000e+01\n2 15093     7.264200e+02 -7.533002e+01\n9 15093     4.838101e+02 4.440997e+01\n2 15094     -7.003998e+01 -1.469100e+02\n3 15094     -1.470300e+02 -4.595300e+02\n6 15094     -2.552500e+02 -1.500000e+02\n8 15094     -2.810999e+01 -1.604600e+02\n2 15095     -5.659973e+00 -1.824200e+02\n3 15095     -8.215997e+01 -4.909301e+02\n8 15095     2.141998e+01 -1.926800e+02\n2 15096     -3.764001e+01 -1.852300e+02\n4 15096     -3.270900e+02 -2.755500e+02\n6 15096     -2.230900e+02 -1.884200e+02\n8 15096     -3.179993e+00 -1.922400e+02\n2 15097     3.473199e+02 -2.410200e+02\n3 15097     2.638101e+02 -5.368199e+02\n4 15097     -4.942700e+02 -4.756600e+02\n6 15097     1.632600e+02 -2.611500e+02\n8 15097     3.055400e+02 -2.496400e+02\n12 15097     1.663800e+02 -2.214700e+02\n2 15098     5.022900e+02 -2.417200e+02\n8 15098     4.432800e+02 -2.477200e+02\n9 15098     3.153400e+02 -9.582001e+01\n2 15099     -3.211700e+02 -2.440100e+02\n7 15099     -3.714000e+02 2.945001e+01\n9 15099     -3.813900e+02 -1.419000e+02\n10 15099     -3.796200e+02 1.003400e+02\n13 15099     6.826001e+01 -2.786300e+02\n15 15099     -3.545000e+02 8.570999e+01\n2 15100     4.789800e+02 -2.631100e+02\n8 15100     4.207400e+02 -2.670400e+02\n2 15101     3.582400e+02 -2.675500e+02\n6 15101     1.747700e+02 -2.866600e+02\n8 15101     3.150800e+02 -2.730400e+02\n2 15102     -3.262000e+01 -2.685300e+02\n8 15102     3.080017e+00 -2.570200e+02\n9 15102     -1.232000e+02 -1.423400e+02\n2 15103     -7.682001e+01 -2.772900e+02\n8 15103     -3.115002e+01 -2.622500e+02\n2 15104     -4.565900e+02 -2.837300e+02\n7 15104     -4.860700e+02 -1.280029e+00\n2 15105     1.076400e+02 -2.909000e+02\n4 15105     -4.300200e+02 -3.289400e+02\n6 15105     -7.609003e+01 -2.988300e+02\n8 15105     1.112800e+02 -2.829700e+02\n12 15105     -7.088000e+01 -2.465600e+02\n13 15105     3.070900e+02 -4.439700e+02\n2 15106     2.895500e+02 -3.099100e+02\n4 15106     -5.095400e+02 -4.343300e+02\n6 15106     1.071000e+02 -3.196300e+02\n12 15106     1.127000e+02 -2.778400e+02\n13 15106     4.408600e+02 -4.903300e+02\n2 15107     3.862600e+02 -3.238700e+02\n6 15107     2.084700e+02 -3.232300e+02\n8 15107     3.395600e+02 -3.160200e+02\n9 15107     2.247300e+02 -1.692100e+02\n12 15107     2.200100e+02 -2.891400e+02\n2 15108     1.719000e+02 -3.604500e+02\n4 15108     -4.896100e+02 -3.511600e+02\n6 15108     -1.102002e+01 -3.641899e+02\n7 15108     -9.339001e+01 -2.034000e+02\n9 15108     5.247998e+01 -2.062700e+02\n12 15108     -8.580017e+00 -3.189200e+02\n13 15108     3.427600e+02 -5.037800e+02\n2 15109     -3.575200e+02 -3.746000e+02\n7 15109     -4.380900e+02 -1.044700e+02\n13 15109     1.221997e+01 -3.902600e+02\n2 15110     -3.306300e+02 -3.997300e+02\n6 15110     -5.073000e+02 -3.723700e+02\n7 15110     -4.291800e+02 -1.341900e+02\n8 15110     -2.300600e+02 -3.530800e+02\n13 15110     2.207001e+01 -4.178300e+02\n2 15111     5.907400e+02 -4.116300e+02\n8 15111     5.147500e+02 -3.901300e+02\n12 15111     4.590800e+02 -3.676800e+02\n2 15112     4.651600e+02 -4.286801e+02\n8 15112     4.052700e+02 -4.028300e+02\n2 15113     5.591300e+02 -4.950699e+02\n7 15113     2.291801e+02 -3.509600e+02\n10 15113     2.324301e+02 -4.166000e+02\n2 15114     5.591300e+02 -4.950699e+02\n7 15114     2.291801e+02 -3.509600e+02\n10 15114     2.324301e+02 -4.166000e+02\n2 15115     4.619000e+02 5.087500e+02\n6 15115     3.913800e+02 7.387800e+02\n8 15115     4.441300e+02 3.917700e+02\n2 15116     -2.977500e+02 4.893900e+02\n6 15116     -5.079500e+02 7.957300e+02\n8 15116     -1.660700e+02 3.798600e+02\n2 15117     -9.526001e+01 4.870900e+02\n3 15117     -2.326300e+02 1.478000e+02\n4 15117     1.301100e+02 -5.340200e+02\n5 15117     6.451600e+02 7.638000e+01\n6 15117     -2.518000e+02 8.401800e+02\n8 15117     2.130005e+00 3.829200e+02\n13 15117     3.780900e+02 3.641500e+02\n14 15117     5.406500e+02 -1.038000e+01\n2 15118     -1.124800e+02 4.862800e+02\n3 15118     -2.498100e+02 1.472500e+02\n8 15118     -1.273999e+01 3.823700e+02\n2 15119     -2.105600e+02 4.770500e+02\n13 15119     2.691300e+02 3.434100e+02\n14 15119     4.104800e+02 -3.210999e+01\n2 15120     -9.496002e+01 4.602800e+02\n4 15120     1.119500e+02 -5.286400e+02\n5 15120     6.417300e+02 4.831000e+01\n6 15120     -2.505600e+02 8.056500e+02\n8 15120     1.359985e+00 3.613000e+02\n13 15120     3.756700e+02 3.404600e+02\n2 15121     -9.496002e+01 4.602800e+02\n3 15121     -2.334300e+02 1.231200e+02\n4 15121     1.119500e+02 -5.286400e+02\n5 15121     6.417300e+02 4.831000e+01\n6 15121     -2.505600e+02 8.056500e+02\n8 15121     1.359985e+00 3.613000e+02\n11 15121     3.483000e+02 -9.696002e+01\n13 15121     3.756700e+02 3.404600e+02\n14 15121     5.382000e+02 -3.887000e+01\n2 15122     6.306400e+02 4.341500e+02\n3 15122     4.743800e+02 1.057600e+02\n8 15122     5.827700e+02 3.269800e+02\n9 15122     3.929500e+02 4.696300e+02\n2 15123     1.661400e+02 4.325800e+02\n3 15123     1.103003e+01 9.670001e+01\n8 15123     2.203000e+02 3.435500e+02\n2 15124     -3.477300e+02 4.067300e+02\n4 15124     9.359998e+01 -3.411000e+02\n5 15124     3.613199e+02 -1.340002e+01\n8 15124     -2.073100e+02 3.145800e+02\n11 15124     9.728998e+01 -1.562300e+02\n2 15125     -3.799100e+02 3.940000e+02\n3 15125     -5.045200e+02 6.065002e+01\n4 15125     8.785999e+01 -3.179700e+02\n5 15125     3.237700e+02 -2.806000e+01\n8 15125     -2.354600e+02 3.053900e+02\n11 15125     6.600000e+01 -1.671200e+02\n2 15126     2.739200e+02 3.569500e+02\n9 15126     8.807001e+01 3.936400e+02\n13 15126     6.558300e+02 1.897800e+02\n2 15127     4.978003e+01 3.541600e+02\n3 15127     -9.621997e+01 1.842999e+01\n5 15127     8.078101e+02 -4.859998e+01\n11 15127     5.063000e+02 -1.703700e+02\n13 15127     5.086500e+02 2.668000e+02\n14 15127     7.025500e+02 -1.299100e+02\n2 15128     -2.647500e+02 3.336800e+02\n3 15128     -3.954100e+02 8.099976e-01\n4 15128     5.108002e+01 -3.845700e+02\n5 15128     4.390000e+02 -8.034998e+01\n6 15128     -4.542900e+02 6.131800e+02\n8 15128     -1.389300e+02 2.571500e+02\n12 15128     -2.807900e+02 5.898200e+02\n13 15128     2.151200e+02 2.271000e+02\n2 15129     3.967600e+02 3.277900e+02\n3 15129     2.514000e+02 6.699829e-01\n8 15129     3.918600e+02 2.464200e+02\n9 15129     1.931100e+02 3.727000e+02\n2 15130     4.119700e+02 3.194100e+02\n3 15130     2.678400e+02 -7.150024e+00\n8 15130     4.041800e+02 2.409800e+02\n9 15130     2.074600e+02 3.643500e+02\n2 15131     -1.160300e+02 2.884600e+02\n3 15131     -2.561000e+02 -4.758002e+01\n6 15131     -2.667300e+02 5.952300e+02\n8 15131     -1.406000e+01 2.272600e+02\n9 15131     -2.513900e+02 3.213900e+02\n12 15131     -9.644000e+01 5.705500e+02\n13 15131     3.436700e+02 2.003800e+02\n14 15131     5.010200e+02 -2.050200e+02\n2 15132     -3.696500e+02 2.510800e+02\n4 15132     1.671997e+01 -3.093000e+02\n5 15132     3.221899e+02 -1.565300e+02\n7 15132     -3.093800e+02 5.517600e+02\n11 15132     7.214001e+01 -2.707300e+02\n12 15132     -3.948800e+02 4.911000e+02\n2 15133     6.997000e+02 1.898800e+02\n3 15133     5.535400e+02 -1.196500e+02\n9 15133     4.548199e+02 2.655200e+02\n2 15134     6.997000e+02 1.898800e+02\n3 15134     5.535400e+02 -1.196500e+02\n7 15134     6.150900e+02 3.307000e+02\n9 15134     4.548199e+02 2.655200e+02\n10 15134     8.131300e+02 3.650900e+02\n2 15135     7.712900e+02 1.493700e+02\n3 15135     6.241400e+02 -1.544100e+02\n7 15135     6.719500e+02 2.773900e+02\n9 15135     5.159800e+02 2.335600e+02\n12 15135     7.942200e+02 2.973600e+02\n2 15136     -2.915900e+02 1.241300e+02\n6 15136     -4.662000e+02 3.706700e+02\n8 15136     -1.585500e+02 9.238000e+01\n2 15137     6.532900e+02 1.042500e+02\n3 15137     5.128199e+02 -2.018600e+02\n10 15137     7.400100e+02 2.929500e+02\n12 15137     6.610300e+02 2.649600e+02\n2 15138     3.066400e+02 5.063000e+01\n3 15138     2.074100e+02 -2.571300e+02\n2 15139     8.008900e+02 2.757001e+01\n9 15139     5.387700e+02 1.327500e+02\n2 15140     6.753998e+01 2.169983e+00\n6 15140     -1.209400e+02 1.500000e+00\n8 15140     8.667999e+01 -4.195001e+01\n2 15141     -6.839001e+01 -5.369995e+00\n8 15141     -1.725000e+01 -4.189001e+01\n2 15142     2.964399e+02 -3.171002e+01\n3 15142     1.996500e+02 -3.363300e+02\n6 15142     1.213000e+02 -3.837000e+01\n7 15142     3.854999e+01 4.852002e+01\n8 15142     2.723300e+02 -7.553003e+01\n13 15142     4.801300e+02 -2.843500e+02\n2 15143     7.253199e+02 -4.615002e+01\n9 15143     4.820000e+02 6.910999e+01\n10 15143     7.777800e+02 1.079300e+02\n2 15144     7.338400e+02 -1.052300e+02\n7 15144     6.038500e+02 6.321002e+01\n2 15145     7.737500e+02 -1.155700e+02\n7 15145     6.357500e+02 4.476001e+01\n2 15146     -9.762000e+01 -1.278900e+02\n3 15146     -1.726100e+02 -4.376200e+02\n8 15146     -4.913000e+01 -1.456300e+02\n12 15146     -2.620800e+02 -6.456000e+01\n2 15147     2.116899e+02 -2.314300e+02\n3 15147     1.367400e+02 -5.298400e+02\n6 15147     2.554999e+01 -2.601300e+02\n8 15147     1.944500e+02 -2.399800e+02\n9 15147     8.306000e+01 -9.602002e+01\n2 15148     4.516801e+02 -2.582100e+02\n3 15148     3.619000e+02 -5.536600e+02\n6 15148     2.803100e+02 -2.577900e+02\n8 15148     3.968700e+02 -2.629200e+02\n2 15149     4.969301e+02 -2.652400e+02\n8 15149     4.382000e+02 -2.677300e+02\n9 15149     3.117300e+02 -1.148100e+02\n2 15150     3.320900e+02 -3.521600e+02\n6 15150     1.515900e+02 -3.557100e+02\n8 15150     2.943500e+02 -3.370900e+02\n12 15150     1.589900e+02 -3.187000e+02\n2 15151     1.863900e+02 -3.616000e+02\n4 15151     -4.941700e+02 -3.594500e+02\n6 15151     3.140015e+00 -3.679000e+02\n9 15151     6.553998e+01 -2.065900e+02\n12 15151     5.960022e+00 -3.203000e+02\n13 15151     3.541100e+02 -5.054900e+02\n2 15152     1.863900e+02 -3.616000e+02\n4 15152     -4.941700e+02 -3.594500e+02\n6 15152     3.140015e+00 -3.679000e+02\n8 15152     1.735700e+02 -3.398300e+02\n9 15152     6.553998e+01 -2.065900e+02\n12 15152     5.960022e+00 -3.203000e+02\n2 15153     1.845900e+02 -3.953400e+02\n6 15153     2.289978e+00 -3.986600e+02\n9 15153     6.595001e+01 -2.355600e+02\n13 15153     3.504700e+02 -5.300601e+02\n2 15154     6.248700e+02 -3.943100e+02\n8 15154     5.460601e+02 -3.755900e+02\n2 15155     6.127300e+02 -4.079700e+02\n8 15155     5.339000e+02 -3.881200e+02\n2 15156     -2.057000e+02 -4.280500e+02\n13 15156     9.397998e+01 -4.659000e+02\n2 15157     -4.366998e+01 -5.165601e+02\n6 15157     -2.201400e+02 -5.166700e+02\n15 15157     -2.876100e+02 -3.639100e+02\n2 15158     -3.011000e+02 5.431700e+02\n3 15158     -4.279700e+02 2.018500e+02\n4 15158     1.617900e+02 -3.870600e+02\n8 15158     -1.692500e+02 4.239500e+02\n13 15158     1.950200e+02 3.856300e+02\n14 15158     3.225000e+02 2.022998e+01\n2 15159     2.965100e+02 5.238300e+02\n3 15159     1.501000e+02 1.842500e+02\n6 15159     2.083800e+02 8.181300e+02\n8 15159     3.114000e+02 4.076100e+02\n2 15160     4.205200e+02 4.441500e+02\n8 15160     4.119100e+02 3.410700e+02\n9 15160     2.126400e+02 4.737400e+02\n2 15161     -9.507001e+01 3.787600e+02\n3 15161     -2.345200e+02 4.354999e+01\n4 15161     6.529999e+01 -5.168300e+02\n5 15161     6.340100e+02 -3.140002e+01\n6 15161     -2.459900e+02 7.045900e+02\n8 15161     1.799988e+00 2.964400e+02\n9 15161     -2.370000e+02 4.010700e+02\n11 15161     3.475900e+02 -1.607800e+02\n13 15161     3.704100e+02 2.745900e+02\n14 15161     5.332200e+02 -1.161200e+02\n2 15162     -9.507001e+01 3.787600e+02\n3 15162     -2.345200e+02 4.354999e+01\n4 15162     6.529999e+01 -5.168300e+02\n5 15162     6.340100e+02 -3.140002e+01\n6 15162     -2.459900e+02 7.045900e+02\n8 15162     1.799988e+00 2.964400e+02\n13 15162     3.704100e+02 2.745900e+02\n14 15162     5.332200e+02 -1.161200e+02\n2 15163     5.972998e+01 3.345600e+02\n3 15163     -9.094000e+01 -1.049988e+00\n6 15163     -5.165002e+01 6.860500e+02\n8 15163     1.313200e+02 2.644100e+02\n9 15163     -1.064300e+02 3.660200e+02\n11 15163     5.190699e+02 -1.862700e+02\n13 15163     5.169500e+02 2.515700e+02\n14 15163     7.134200e+02 -1.483900e+02\n2 15164     -7.934700e+02 3.249500e+02\n4 15164     7.454999e+01 -9.095001e+01\n13 15164     -1.993800e+02 1.863600e+02\n2 15165     -9.201001e+01 3.223200e+02\n3 15165     -2.323800e+02 -1.184998e+01\n6 15165     -2.390000e+02 6.383800e+02\n9 15165     -2.320200e+02 3.508800e+02\n2 15166     -7.446002e+01 3.060200e+02\n5 15166     6.488101e+02 -1.006200e+02\n11 15166     3.668800e+02 -2.180400e+02\n2 15167     -2.551000e+02 2.294900e+02\n7 15167     -1.901500e+02 5.402100e+02\n2 15168     9.431000e+01 1.667500e+02\n8 15168     1.159000e+02 9.579999e+01\n2 15169     -3.133800e+02 1.481500e+02\n5 15169     3.683000e+02 -2.546400e+02\n6 15169     -4.955300e+02 3.873000e+02\n7 15169     -2.473700e+02 4.645100e+02\n8 15169     -1.778700e+02 1.090000e+02\n9 15169     -4.123900e+02 1.910300e+02\n2 15170     -2.525400e+02 1.351700e+02\n5 15170     4.331600e+02 -2.646000e+02\n8 15170     -1.280100e+02 1.000900e+02\n13 15170     2.174600e+02 7.985999e+01\n14 15170     3.479700e+02 -3.470000e+02\n2 15171     1.089600e+02 4.078003e+01\n6 15171     -7.306000e+01 4.269000e+01\n8 15171     1.202800e+02 -1.320001e+01\n12 15171     -5.613000e+01 9.784003e+01\n2 15172     6.583300e+02 3.584003e+01\n10 15172     7.323800e+02 2.178900e+02\n2 15173     2.560999e+01 -1.527800e+02\n3 15173     -4.885999e+01 -4.616899e+02\n8 15173     4.453998e+01 -1.714900e+02\n12 15173     -1.605800e+02 -1.155800e+02\n2 15174     1.994600e+02 -1.754700e+02\n6 15174     7.650024e+00 -2.006600e+02\n7 15174     -8.464001e+01 -8.370001e+01\n8 15174     1.828900e+02 -1.951800e+02\n10 15174     -1.143500e+02 -8.457001e+01\n15 15174     -5.860999e+01 -1.268700e+02\n2 15175     -1.003003e+01 -2.568600e+02\n8 15175     1.890997e+01 -2.510300e+02\n2 15176     1.762700e+02 -2.728100e+02\n3 15176     1.013100e+02 -5.749600e+02\n4 15176     -4.440600e+02 -3.625300e+02\n6 15176     -9.450012e+00 -2.885900e+02\n12 15176     -1.047998e+01 -2.397200e+02\n15 15176     -7.109003e+01 -1.964500e+02\n2 15177     2.123900e+02 -2.924200e+02\n6 15177     2.639001e+01 -3.073600e+02\n8 15177     1.934400e+02 -2.876500e+02\n9 15177     8.365002e+01 -1.480400e+02\n2 15178     9.209998e+01 -3.050200e+02\n6 15178     -9.044000e+01 -3.112100e+02\n7 15178     -1.510100e+02 -1.489200e+02\n8 15178     9.869000e+01 -2.926700e+02\n9 15178     -1.621002e+01 -1.652700e+02\n10 15178     -1.821400e+02 -1.438500e+02\n12 15178     -8.391998e+01 -2.579300e+02\n2 15179     4.345200e+02 -4.104700e+02\n8 15179     3.794100e+02 -3.884300e+02\n2 15180     -1.664200e+02 5.853400e+02\n3 15180     -2.990200e+02 2.390100e+02\n4 15180     1.833800e+02 -4.910699e+02\n5 15180     5.718500e+02 1.613900e+02\n13 15180     3.174399e+02 4.342400e+02\n14 15180     4.673300e+02 7.173999e+01\n2 15181     -2.683000e+02 5.809200e+02\n3 15181     -3.938300e+02 2.373900e+02\n4 15181     1.791700e+02 -4.157500e+02\n13 15181     2.244800e+02 4.169200e+02\n14 15181     3.570100e+02 5.467999e+01\n2 15182     -2.970500e+02 5.674200e+02\n13 15182     1.979100e+02 4.051100e+02\n14 15182     3.249700e+02 4.216998e+01\n2 15183     -1.374600e+02 4.618400e+02\n3 15183     -2.737100e+02 1.235000e+02\n5 15183     5.933000e+02 4.478998e+01\n8 15183     -3.327002e+01 3.611500e+02\n13 15183     3.371400e+02 3.333700e+02\n14 15183     4.916899e+02 -4.759003e+01\n2 15184     -1.374600e+02 4.618400e+02\n3 15184     -2.737100e+02 1.235000e+02\n8 15184     -3.327002e+01 3.611500e+02\n2 15185     7.447998e+01 2.848900e+02\n6 15185     -3.109003e+01 6.235400e+02\n9 15185     -8.898999e+01 3.207900e+02\n13 15185     5.258800e+02 2.086100e+02\n14 15185     7.269399e+02 -1.994000e+02\n2 15186     3.678400e+02 2.639700e+02\n3 15186     2.240100e+02 -6.123999e+01\n7 15186     3.592700e+02 5.016900e+02\n13 15186     7.305400e+02 9.184000e+01\n2 15187     -1.948800e+02 1.918400e+02\n3 15187     -3.306100e+02 -1.385000e+02\n4 15187     -2.931000e+01 -4.169300e+02\n5 15187     5.023900e+02 -2.116600e+02\n8 15187     -8.051001e+01 1.451000e+02\n2 15188     2.025699e+02 1.200900e+02\n3 15188     1.049500e+02 -1.951700e+02\n4 15188     -2.270100e+02 -4.798900e+02\n6 15188     2.939001e+01 1.364300e+02\n8 15188     2.000500e+02 5.250000e+01\n2 15189     5.190002e+00 -2.275100e+02\n3 15189     -7.059003e+01 -5.392800e+02\n2 15190     5.432200e+02 -3.788800e+02\n8 15190     4.764900e+02 -3.611600e+02\n2 15191     5.432200e+02 -3.788800e+02\n8 15191     4.764900e+02 -3.611600e+02\n2 15192     -1.385700e+02 5.691900e+02\n3 15192     -2.724000e+02 2.242300e+02\n4 15192     1.774500e+02 -5.115500e+02\n5 15192     6.040900e+02 1.524900e+02\n11 15192     3.059800e+02 -1.416998e+01\n13 15192     3.428800e+02 4.248700e+02\n14 15192     4.973600e+02 6.033002e+01\n2 15193     -2.338700e+02 5.638900e+02\n3 15193     -3.623200e+02 2.194100e+02\n11 15193     2.092000e+02 -2.882001e+01\n13 15193     2.544800e+02 4.084800e+02\n14 15193     3.921300e+02 4.417999e+01\n2 15194     -2.338700e+02 5.638900e+02\n3 15194     -3.623200e+02 2.194100e+02\n11 15194     2.092000e+02 -2.882001e+01\n14 15194     3.921300e+02 4.417999e+01\n2 15195     -4.536400e+02 5.281100e+02\n8 15195     -2.957100e+02 4.081700e+02\n2 15196     -1.266300e+02 5.287500e+02\n3 15196     -2.638100e+02 1.868900e+02\n4 15196     1.535500e+02 -5.169500e+02\n5 15196     6.153300e+02 1.145000e+02\n8 15196     -2.433002e+01 4.171000e+02\n11 15196     3.219399e+02 -4.340997e+01\n13 15196     3.530100e+02 3.936200e+02\n14 15196     5.097100e+02 2.406000e+01\n2 15197     4.129600e+02 5.097500e+02\n8 15197     4.061600e+02 3.933100e+02\n2 15198     -2.324400e+02 4.501500e+02\n5 15198     4.866000e+02 2.734003e+01\n8 15198     -1.120500e+02 3.506800e+02\n11 15198     2.096800e+02 -1.192000e+02\n2 15199     -2.314300e+02 4.041300e+02\n3 15199     -3.627400e+02 6.847998e+01\n6 15199     -4.177100e+02 7.054400e+02\n8 15199     -1.113100e+02 3.146500e+02\n13 15199     2.476600e+02 2.836100e+02\n14 15199     3.844600e+02 -9.973999e+01\n2 15200     -2.314300e+02 4.041300e+02\n6 15200     -4.177100e+02 7.054400e+02\n8 15200     -1.113100e+02 3.146500e+02\n13 15200     2.476600e+02 2.836100e+02\n14 15200     3.844600e+02 -9.973999e+01\n2 15201     -3.909003e+01 -1.549400e+02\n8 15201     -4.280029e+00 -1.692000e+02\n2 15202     4.039301e+02 -2.615100e+02\n6 15202     2.240500e+02 -2.689100e+02\n2 15203     3.636400e+02 -3.016700e+02\n8 15203     3.198400e+02 -2.974600e+02\n2 15204     5.211700e+02 -3.563100e+02\n8 15204     4.556801e+02 -3.481400e+02\n2 15205     -2.398300e+02 5.218400e+02\n4 15205     1.506700e+02 -4.337500e+02\n11 15205     2.110300e+02 -5.934003e+01\n13 15205     2.567200e+02 3.766100e+02\n14 15205     3.944100e+02 8.150024e+00\n2 15206     3.191400e+02 5.138500e+02\n3 15206     1.746400e+02 1.759900e+02\n6 15206     2.382800e+02 8.041100e+02\n8 15206     3.302100e+02 3.995600e+02\n13 15206     7.124900e+02 3.164600e+02\n2 15207     3.423300e+02 4.301300e+02\n3 15207     1.895800e+02 9.682001e+01\n6 15207     2.611300e+02 6.973800e+02\n8 15207     3.476300e+02 3.314000e+02\n13 15207     7.192800e+02 2.396400e+02\n2 15208     -1.344800e+02 3.730500e+02\n3 15208     -2.707300e+02 3.589001e+01\n4 15208     6.427002e+01 -4.895500e+02\n5 15208     5.913000e+02 -3.931000e+01\n6 15208     -2.937500e+02 6.893700e+02\n8 15208     -2.962000e+01 2.912900e+02\n11 15208     3.140800e+02 -1.669600e+02\n13 15208     3.384500e+02 2.671000e+02\n14 15208     4.935200e+02 -1.244800e+02\n2 15209     -3.580200e+02 3.377200e+02\n3 15209     -4.855300e+02 7.400024e+00\n8 15209     -2.156400e+02 2.589900e+02\n2 15210     -2.534998e+01 2.455500e+02\n5 15210     7.036600e+02 -1.594300e+02\n8 15210     6.071997e+01 1.922700e+02\n9 15210     -1.725300e+02 2.870400e+02\n13 15210     4.258199e+02 1.774300e+02\n2 15211     3.084003e+01 2.387200e+02\n6 15211     -8.609000e+01 5.631000e+02\n8 15211     1.101300e+02 1.860500e+02\n9 15211     -1.245900e+02 2.818300e+02\n13 15211     4.793800e+02 1.716700e+02\n14 15211     6.751400e+02 -2.443300e+02\n2 15212     -2.254900e+02 1.807500e+02\n6 15212     -3.937300e+02 4.505000e+02\n8 15212     -1.062600e+02 1.354400e+02\n2 15213     -2.232300e+02 1.417700e+02\n7 15213     -1.517100e+02 4.667100e+02\n2 15214     -3.916000e+02 1.247400e+02\n5 15214     2.886400e+02 -2.725200e+02\n7 15214     -3.242700e+02 4.402300e+02\n8 15214     -2.403900e+02 9.044000e+01\n2 15215     3.354999e+01 -2.379999e+01\n6 15215     -1.484600e+02 -1.596002e+01\n8 15215     5.521002e+01 -6.152002e+01\n12 15215     -1.294000e+02 4.059998e+01\n2 15216     -4.000000e+01 -4.409998e+01\n8 15216     6.400146e-01 -7.763000e+01\n2 15217     -5.092999e+01 -1.177600e+02\n8 15217     -1.292999e+01 -1.395100e+02\n2 15218     5.035300e+02 -3.241600e+02\n8 15218     4.416600e+02 -3.194100e+02\n2 15219     2.813000e+01 3.944100e+02\n3 15219     -1.184200e+02 5.801001e+01\n6 15219     -8.847000e+01 7.551400e+02\n8 15219     1.074500e+02 3.131700e+02\n2 15220     -3.660200e+02 2.222300e+02\n5 15220     3.203900e+02 -1.855200e+02\n8 15220     -2.224100e+02 1.700700e+02\n2 15221     -2.804400e+02 1.440300e+02\n7 15221     -2.136300e+02 4.642800e+02\n8 15221     -1.523900e+02 1.064800e+02\n2 15222     -2.804400e+02 1.440300e+02\n6 15222     -4.642700e+02 3.940300e+02\n7 15222     -2.136300e+02 4.642800e+02\n8 15222     -1.523900e+02 1.064800e+02\n2 15223     -3.127700e+02 2.359700e+02\n5 15223     3.814200e+02 -1.721000e+02\n8 15223     -1.777400e+02 1.829900e+02\n2 15224     -1.785600e+02 3.682500e+02\n3 15224     -3.133500e+02 3.637000e+01\n5 15224     5.445800e+02 -3.560999e+01\n8 15224     -6.757001e+01 2.871600e+02\n13 15224     2.987100e+02 2.667900e+02\n14 15224     4.446899e+02 -1.262200e+02\n3 15225     -5.585000e+02 4.336900e+02\n11 15225     7.148999e+01 1.439900e+02\n3 15226     -3.373200e+02 4.320000e+02\n5 15226     5.694200e+02 3.897300e+02\n14 15226     4.591899e+02 2.871300e+02\n3 15227     -3.481100e+02 4.285700e+02\n14 15227     4.481600e+02 2.830100e+02\n3 15228     -3.354300e+02 4.256800e+02\n5 15228     5.706801e+02 3.835600e+02\n14 15228     4.611600e+02 2.810100e+02\n3 15229     -3.447800e+02 4.209800e+02\n5 15229     5.606100e+02 3.779700e+02\n14 15229     4.511899e+02 2.760300e+02\n3 15230     -3.472400e+02 4.093000e+02\n14 15230     4.482700e+02 2.642700e+02\n3 15231     -2.076000e+02 3.648600e+02\n14 15231     6.794000e+02 3.184900e+02\n3 15232     -3.225800e+02 3.410000e+02\n4 15232     2.556200e+02 -5.069301e+02\n3 15233     -5.447800e+02 2.834000e+02\n13 15233     1.010000e+02 4.472400e+02\n14 15233     2.121899e+02 9.310001e+01\n3 15234     -1.639300e+02 2.480600e+02\n14 15234     6.286700e+02 9.451999e+01\n3 15235     -2.198900e+02 2.337800e+02\n13 15235     3.964800e+02 4.377300e+02\n3 15236     -3.110600e+02 2.324400e+02\n5 15236     5.561000e+02 1.526400e+02\n11 15236     2.640800e+02 -1.453998e+01\n3 15237     -3.974100e+02 2.074600e+02\n11 15237     1.728000e+02 -4.484003e+01\n14 15237     3.528199e+02 2.540997e+01\n3 15238     1.108100e+02 2.070700e+02\n8 15238     2.786400e+02 4.281600e+02\n3 15239     -4.261400e+02 2.063900e+02\n5 15239     4.204100e+02 1.142600e+02\n3 15240     1.950000e+02 2.050300e+02\n6 15240     2.639000e+02 8.365900e+02\n3 15241     -3.866200e+02 1.887300e+02\n6 15241     -4.624300e+02 8.516800e+02\n14 15241     3.640100e+02 8.219971e+00\n3 15242     3.121700e+02 1.894700e+02\n8 15242     4.421700e+02 4.054300e+02\n3 15243     -3.184200e+02 1.861300e+02\n6 15243     -3.706900e+02 8.650900e+02\n8 15243     -7.496002e+01 4.111300e+02\n3 15244     2.317800e+02 1.860600e+02\n6 15244     3.090600e+02 8.062400e+02\n3 15245     3.589500e+02 1.857900e+02\n8 15245     4.842100e+02 4.016300e+02\n9 15245     2.903600e+02 5.430700e+02\n3 15246     1.090400e+02 1.790000e+02\n6 15246     1.587600e+02 8.177000e+02\n3 15247     2.159003e+01 1.708500e+02\n11 15247     6.569301e+02 -2.540002e+01\n3 15248     -1.707800e+02 1.649500e+02\n13 15248     4.437600e+02 3.960000e+02\n3 15249     2.975800e+02 1.550900e+02\n8 15249     4.289000e+02 3.751400e+02\n3 15250     -4.475600e+02 1.540100e+02\n5 15250     3.927000e+02 6.139001e+01\n11 15250     1.223800e+02 -9.228998e+01\n13 15250     1.737500e+02 3.419500e+02\n14 15250     2.958400e+02 -3.009998e+01\n3 15251     -1.350100e+02 1.538900e+02\n5 15251     7.705900e+02 8.837000e+01\n6 15251     -1.177100e+02 8.717100e+02\n8 15251     8.885999e+01 3.889000e+02\n11 15251     4.624500e+02 -5.928003e+01\n14 15251     6.615601e+02 3.450012e+00\n3 15252     4.194900e+02 1.515100e+02\n6 15252     5.177700e+02 6.918800e+02\n9 15252     3.439900e+02 5.116600e+02\n3 15253     -7.467200e+02 1.511200e+02\n14 15253     -1.530029e+00 -6.038000e+01\n3 15254     -1.733800e+02 1.479400e+02\n13 15254     4.382000e+02 3.689000e+02\n14 15254     6.130400e+02 -6.909973e+00\n3 15255     1.181600e+02 1.481000e+02\n6 15255     1.684000e+02 7.757400e+02\n8 15255     2.840700e+02 3.767300e+02\n9 15255     7.364001e+01 5.048800e+02\n3 15256     -1.827300e+02 1.469300e+02\n14 15256     6.017800e+02 -8.010010e+00\n3 15257     -7.334800e+02 1.407100e+02\n14 15257     9.989990e+00 -6.838000e+01\n3 15258     1.511200e+02 1.367300e+02\n6 15258     2.074700e+02 7.555000e+02\n3 15259     3.609600e+02 1.336200e+02\n6 15259     4.437500e+02 6.792900e+02\n9 15259     2.908700e+02 4.943700e+02\n3 15260     -1.552100e+02 1.332200e+02\n5 15260     7.417600e+02 6.533002e+01\n6 15260     -1.452400e+02 8.381000e+02\n11 15260     4.383800e+02 -7.947998e+01\n14 15260     6.348101e+02 -1.971997e+01\n3 15261     -2.318400e+02 1.306200e+02\n13 15261     3.781801e+02 3.478700e+02\n3 15262     -5.474500e+02 1.276000e+02\n14 15262     1.904301e+02 -6.391998e+01\n3 15263     2.167500e+02 1.253100e+02\n6 15263     2.861400e+02 7.293800e+02\n8 15263     3.666200e+02 3.542800e+02\n3 15264     2.167500e+02 1.253100e+02\n6 15264     2.861400e+02 7.293800e+02\n8 15264     3.666200e+02 3.542800e+02\n3 15265     -3.951800e+02 1.139000e+02\n14 15265     3.515100e+02 -6.265997e+01\n3 15266     3.213199e+02 1.136400e+02\n6 15266     3.940400e+02 6.604000e+02\n8 15266     4.479100e+02 3.369400e+02\n9 15266     2.552100e+02 4.749100e+02\n3 15267     3.515699e+02 1.124500e+02\n6 15267     4.300000e+02 6.549700e+02\n3 15268     -2.077300e+02 1.120000e+02\n5 15268     6.731000e+02 4.003998e+01\n8 15268     2.460999e+01 3.534100e+02\n14 15268     5.691801e+02 -4.639001e+01\n3 15269     1.435000e+02 1.017300e+02\n11 15269     6.142300e+02 -1.988300e+02\n3 15270     3.951500e+02 9.477002e+01\n6 15270     4.808900e+02 6.238800e+02\n3 15271     -7.007900e+02 9.340002e+01\n14 15271     3.872998e+01 -1.064900e+02\n3 15272     -2.489600e+02 8.984003e+01\n5 15272     6.196700e+02 1.448999e+01\n6 15272     -2.686200e+02 7.600600e+02\n3 15273     -2.035100e+02 8.871997e+01\n5 15273     6.759399e+02 1.558002e+01\n14 15273     5.729100e+02 -6.921002e+01\n3 15274     -2.307400e+02 8.496997e+01\n13 15274     3.754900e+02 3.088600e+02\n14 15274     5.388800e+02 -7.513000e+01\n3 15275     1.883600e+02 7.889001e+01\n6 15275     2.498500e+02 6.746100e+02\n3 15276     -6.483200e+02 7.200000e+01\n5 15276     1.786500e+02 -2.813000e+01\n12 15276     -5.931200e+02 6.217200e+02\n3 15277     -6.483200e+02 7.200000e+01\n5 15277     1.786500e+02 -2.813000e+01\n14 15277     8.848999e+01 -1.211400e+02\n3 15278     -8.762000e+01 6.232001e+01\n5 15278     8.236700e+02 -4.640015e+00\n6 15278     -5.106000e+01 7.629100e+02\n8 15278     1.313400e+02 3.143000e+02\n9 15278     -1.051300e+02 4.219500e+02\n11 15278     5.175200e+02 -1.341200e+02\n3 15279     3.937500e+02 5.735999e+01\n6 15279     4.752200e+02 5.780400e+02\n7 15279     4.962100e+02 5.572500e+02\n3 15280     -5.461200e+02 5.303998e+01\n14 15280     1.892300e+02 -1.304500e+02\n3 15281     4.762800e+02 4.757001e+01\n8 15281     5.812800e+02 2.726900e+02\n9 15281     3.930000e+02 4.154700e+02\n3 15282     -2.726700e+02 4.541998e+01\n5 15282     5.864000e+02 -3.140997e+01\n3 15283     2.500000e+02 4.403998e+01\n6 15283     3.204400e+02 6.210600e+02\n9 15283     1.924600e+02 4.106800e+02\n12 15283     4.189800e+02 6.123900e+02\n3 15284     4.812900e+02 3.866998e+01\n8 15284     5.847000e+02 2.646200e+02\n12 15284     6.567300e+02 5.509800e+02\n3 15285     -3.614300e+02 3.735999e+01\n8 15285     -1.098800e+02 2.871800e+02\n9 15285     -3.516100e+02 3.902000e+02\n3 15286     -5.157700e+02 3.576001e+01\n12 15286     -4.295800e+02 6.070000e+02\n3 15287     2.177600e+02 3.528003e+01\n8 15287     3.649500e+02 2.759400e+02\n3 15288     -9.997559e-02 3.248999e+01\n6 15288     6.803998e+01 7.476900e+02\n3 15289     -6.787000e+01 1.965002e+01\n11 15289     5.403300e+02 -1.684000e+02\n3 15290     -1.646800e+02 1.884998e+01\n13 15290     4.389200e+02 2.614200e+02\n3 15291     4.206100e+02 1.559003e+01\n6 15291     5.021600e+02 5.222900e+02\n7 15291     5.147800e+02 5.058400e+02\n8 15291     5.297400e+02 2.467400e+02\n9 15291     3.426899e+02 3.859600e+02\n10 15291     7.087400e+02 5.928000e+02\n3 15292     -3.149800e+02 8.049988e+00\n14 15292     4.362100e+02 -1.564300e+02\n3 15293     3.895601e+02 8.030029e+00\n10 15293     6.714100e+02 5.960600e+02\n3 15294     3.895601e+02 8.030029e+00\n8 15294     5.019600e+02 2.415800e+02\n3 15295     2.575000e+02 2.909973e+00\n8 15295     3.965000e+02 2.473500e+02\n9 15295     1.985000e+02 3.742900e+02\n3 15296     1.376300e+02 7.299805e-01\n6 15296     1.853900e+02 5.869000e+02\n3 15297     -1.585600e+02 -7.320007e+00\n14 15297     6.219900e+02 -1.603700e+02\n3 15298     4.354800e+02 -1.621002e+01\n6 15298     5.162300e+02 4.815500e+02\n3 15299     3.368400e+02 -3.242999e+01\n6 15299     3.997900e+02 4.802100e+02\n9 15299     2.680800e+02 3.423000e+02\n10 15299     6.032000e+02 5.663400e+02\n11 15299     7.313800e+02 -4.161400e+02\n12 15299     4.843300e+02 4.879900e+02\n3 15300     1.776000e+02 -4.060999e+01\n12 15300     3.360100e+02 5.225700e+02\n3 15301     1.902000e+02 -4.264001e+01\n6 15301     2.442300e+02 5.260900e+02\n12 15301     3.491600e+02 5.186700e+02\n3 15302     4.688900e+02 -6.022998e+01\n6 15302     5.502700e+02 4.232800e+02\n10 15302     7.380500e+02 4.763200e+02\n3 15303     2.023101e+02 -7.045001e+01\n6 15303     2.568500e+02 4.905600e+02\n9 15303     1.499800e+02 3.073700e+02\n3 15304     1.414100e+02 -7.251001e+01\n7 15304     2.851801e+02 5.094100e+02\n8 15304     2.985000e+02 1.879600e+02\n9 15304     9.634998e+01 3.050100e+02\n12 15304     2.969000e+02 4.912000e+02\n3 15305     1.414100e+02 -7.251001e+01\n8 15305     2.985000e+02 1.879600e+02\n9 15305     9.634998e+01 3.050100e+02\n3 15306     3.698199e+02 -7.678998e+01\n10 15306     6.253700e+02 4.993200e+02\n15 15306     8.280300e+02 5.719300e+02\n3 15307     -1.521600e+02 -8.056000e+01\n5 15307     7.232600e+02 -1.524300e+02\n14 15307     6.255800e+02 -2.318900e+02\n3 15308     3.252600e+02 -8.865002e+01\n6 15308     3.807300e+02 4.170300e+02\n12 15308     4.667300e+02 4.249800e+02\n15 15308     7.690300e+02 5.754700e+02\n3 15309     -2.464500e+02 -8.990002e+01\n13 15309     3.505000e+02 1.680100e+02\n14 15309     5.105200e+02 -2.452800e+02\n3 15310     2.469500e+02 -9.359003e+01\n8 15310     3.844200e+02 1.649200e+02\n3 15311     -4.934800e+02 -9.667999e+01\n6 15311     -5.649000e+02 4.759400e+02\n12 15311     -3.863500e+02 4.708600e+02\n3 15312     1.564600e+02 -9.920001e+01\n6 15312     2.028600e+02 4.651700e+02\n10 15312     4.600900e+02 5.930700e+02\n12 15312     3.117900e+02 4.589700e+02\n3 15313     3.726500e+02 -1.001300e+02\n10 15313     6.220900e+02 4.708200e+02\n15 15313     8.248199e+02 5.371100e+02\n3 15314     3.681600e+02 -1.003200e+02\n6 15314     4.290700e+02 3.960500e+02\n10 15314     6.175900e+02 4.727000e+02\n15 15314     8.193101e+02 5.394600e+02\n3 15315     2.056300e+02 -1.026500e+02\n10 15315     5.079200e+02 5.705800e+02\n3 15316     3.574600e+02 -1.058600e+02\n15 15316     8.034500e+02 5.369700e+02\n3 15317     3.574600e+02 -1.058600e+02\n6 15317     4.158300e+02 3.917600e+02\n7 15317     4.367000e+02 4.001000e+02\n10 15317     6.044100e+02 4.706400e+02\n12 15317     5.000699e+02 4.005900e+02\n15 15317     8.034500e+02 5.369700e+02\n3 15318     4.710800e+02 -1.068800e+02\n6 15318     5.471899e+02 3.687700e+02\n3 15319     4.443101e+02 -1.194500e+02\n10 15319     6.928800e+02 4.173800e+02\n3 15320     -1.936600e+02 -1.211300e+02\n13 15320     3.985500e+02 1.447200e+02\n14 15320     5.709399e+02 -2.749100e+02\n3 15321     5.337700e+02 -1.233900e+02\n10 15321     7.898300e+02 3.717700e+02\n12 15321     6.962100e+02 3.498700e+02\n3 15322     -2.221100e+02 -1.299800e+02\n12 15322     -5.521002e+01 4.772400e+02\n3 15323     2.292900e+02 -1.331400e+02\n6 15323     2.842000e+02 4.136700e+02\n9 15323     1.742200e+02 2.521700e+02\n3 15324     5.197500e+02 -1.446100e+02\n10 15324     7.668900e+02 3.536100e+02\n3 15325     -4.141000e+02 -1.458600e+02\n7 15325     -2.139400e+02 5.025100e+02\n3 15326     5.436000e+02 -1.484800e+02\n10 15326     7.916700e+02 3.382100e+02\n12 15326     7.038000e+02 3.192400e+02\n3 15327     5.852300e+02 -1.489400e+02\n9 15327     4.831000e+02 2.388600e+02\n12 15327     7.515699e+02 3.120000e+02\n3 15328     5.477400e+02 -1.498500e+02\n7 15328     6.029200e+02 3.048000e+02\n12 15328     7.085500e+02 3.170800e+02\n3 15329     3.641400e+02 -1.528600e+02\n6 15329     4.189500e+02 3.370700e+02\n10 15329     5.994800e+02 4.136800e+02\n3 15330     3.615200e+02 -1.548000e+02\n6 15330     4.162800e+02 3.346100e+02\n10 15330     5.968300e+02 4.125900e+02\n15 15330     7.956000e+02 4.666000e+02\n3 15331     5.166000e+02 -1.556600e+02\n10 15331     7.596801e+02 3.427200e+02\n3 15332     3.965400e+02 -1.578600e+02\n7 15332     4.638900e+02 3.398600e+02\n3 15333     4.860601e+02 -1.656000e+02\n7 15333     5.430500e+02 3.068000e+02\n3 15334     3.650900e+02 -1.745200e+02\n6 15334     4.189800e+02 3.128000e+02\n8 15334     4.725800e+02 8.622000e+01\n10 15334     5.957800e+02 3.893500e+02\n15 15334     7.951000e+02 4.397400e+02\n3 15335     5.205500e+02 -1.768400e+02\n7 15335     5.722200e+02 2.870500e+02\n9 15335     4.257800e+02 2.140700e+02\n10 15335     7.564000e+02 3.176000e+02\n12 15335     6.735500e+02 2.910400e+02\n3 15336     4.647500e+02 -1.799000e+02\n6 15336     5.314500e+02 2.884800e+02\n10 15336     6.966200e+02 3.392000e+02\n3 15337     4.670100e+02 -1.814000e+02\n10 15337     6.981000e+02 3.364700e+02\n3 15338     4.240000e+02 -1.843300e+02\n7 15338     4.845800e+02 3.072800e+02\n10 15338     6.525000e+02 3.528100e+02\n15 15338     8.644200e+02 3.970400e+02\n3 15339     -4.055600e+02 -1.859800e+02\n12 15339     -2.739100e+02 3.938700e+02\n3 15340     -4.055600e+02 -1.859800e+02\n12 15340     -2.739100e+02 3.938700e+02\n3 15341     7.009000e+02 -1.940300e+02\n7 15341     7.364500e+02 2.171300e+02\n3 15342     5.605900e+02 -1.976100e+02\n9 15342     4.600500e+02 1.961600e+02\n12 15342     7.151600e+02 2.609600e+02\n3 15343     -3.149800e+02 -2.002000e+02\n14 15343     4.245400e+02 -3.514900e+02\n3 15344     -3.911400e+02 -2.011600e+02\n10 15344     -1.029400e+02 6.058000e+02\n12 15344     -2.554600e+02 3.803500e+02\n3 15345     5.130300e+02 -2.022300e+02\n7 15345     5.610400e+02 2.653700e+02\n10 15345     7.409200e+02 2.921700e+02\n3 15346     4.154700e+02 -2.029500e+02\n15 15346     8.484399e+02 3.780000e+02\n3 15347     4.154700e+02 -2.029500e+02\n10 15347     6.395800e+02 3.368600e+02\n15 15347     8.484399e+02 3.780000e+02\n3 15348     4.726000e+02 -2.054800e+02\n6 15348     5.383101e+02 2.598600e+02\n12 15348     6.180100e+02 2.700700e+02\n3 15349     7.245800e+02 -2.091600e+02\n7 15349     7.559000e+02 1.952900e+02\n3 15350     -3.397600e+02 -2.136700e+02\n5 15350     4.837800e+02 -2.814100e+02\n7 15350     -1.318700e+02 4.504100e+02\n10 15350     -3.684998e+01 5.968700e+02\n14 15350     3.953500e+02 -3.643900e+02\n3 15351     4.589200e+02 -2.167300e+02\n6 15351     5.205900e+02 2.489200e+02\n8 15351     5.495900e+02 4.410001e+01\n10 15351     6.797100e+02 3.015300e+02\n12 15351     6.012300e+02 2.590200e+02\n3 15352     2.971997e+01 -2.186000e+02\n6 15352     -5.670001e+01 1.082400e+02\n15 15352     -2.513000e+01 2.479300e+02\n3 15353     9.199829e-01 -2.220400e+02\n8 15353     1.094400e+02 3.260001e+01\n9 15353     -3.635999e+01 1.654700e+02\n3 15354     4.890200e+02 -2.227100e+02\n6 15354     5.537300e+02 2.369400e+02\n7 15354     5.359800e+02 2.535300e+02\n9 15354     3.974100e+02 1.743200e+02\n10 15354     7.094301e+02 2.814800e+02\n12 15354     6.331000e+02 2.467900e+02\n3 15355     4.558400e+02 -2.251900e+02\n6 15355     5.161100e+02 2.406900e+02\n12 15355     5.964900e+02 2.506500e+02\n3 15356     5.225200e+02 -2.280800e+02\n7 15356     5.656500e+02 2.375000e+02\n9 15356     4.272200e+02 1.686800e+02\n10 15356     7.428199e+02 2.601700e+02\n3 15357     7.288700e+02 -2.283600e+02\n7 15357     7.542400e+02 1.762400e+02\n3 15358     5.437000e+02 -2.288800e+02\n7 15358     5.833199e+02 2.319900e+02\n10 15358     7.645400e+02 2.496200e+02\n3 15359     5.265500e+02 -2.311300e+02\n10 15359     7.459700e+02 2.552300e+02\n12 15359     6.739000e+02 2.309400e+02\n3 15360     9.647998e+01 -2.319500e+02\n6 15360     1.271997e+01 8.267999e+01\n10 15360     -3.525000e+01 1.943100e+02\n12 15360     2.992999e+01 1.369200e+02\n15 15360     3.245001e+01 2.006000e+02\n3 15361     5.097300e+02 -2.347400e+02\n6 15361     5.757700e+02 2.197400e+02\n10 15361     7.277900e+02 2.588800e+02\n3 15362     5.075699e+02 -2.368300e+02\n6 15362     5.740800e+02 2.175600e+02\n12 15362     6.532000e+02 2.272700e+02\n3 15363     1.997600e+02 -2.398200e+02\n10 15363     7.547998e+01 1.619500e+02\n3 15364     4.787600e+02 -2.421700e+02\n6 15364     5.403500e+02 2.176300e+02\n10 15364     6.937300e+02 2.653300e+02\n3 15365     2.690500e+02 -2.440500e+02\n10 15365     1.769900e+02 1.558300e+02\n3 15366     7.521400e+02 -2.447500e+02\n7 15366     7.716600e+02 1.540800e+02\n3 15367     5.498199e+02 -2.465400e+02\n9 15367     4.494800e+02 1.527700e+02\n10 15367     7.658800e+02 2.284300e+02\n12 15367     6.970400e+02 2.083600e+02\n3 15368     -6.130200e+02 -2.480700e+02\n9 15368     -6.538800e+02 9.629999e+01\n3 15369     4.733400e+02 -2.539800e+02\n10 15369     6.844399e+02 2.556500e+02\n3 15370     -7.139001e+01 -2.581100e+02\n5 15370     5.384399e+02 -5.824800e+02\n3 15371     -2.654999e+01 -2.578500e+02\n5 15371     5.753500e+02 -6.026500e+02\n6 15371     -1.195300e+02 6.787000e+01\n7 15371     -1.390600e+02 1.653800e+02\n8 15371     8.408002e+01 3.359985e+00\n15 15371     -9.359003e+01 2.164100e+02\n3 15372     4.931100e+02 -2.587500e+02\n7 15372     5.336300e+02 2.199600e+02\n3 15373     5.555200e+02 -2.590800e+02\n9 15373     4.528400e+02 1.432100e+02\n12 15373     7.014500e+02 1.945700e+02\n3 15374     4.755601e+02 -2.641500e+02\n6 15374     5.340200e+02 1.949300e+02\n12 15374     6.138500e+02 2.047300e+02\n3 15375     2.256899e+02 -2.706500e+02\n7 15375     7.908002e+01 1.105000e+02\n10 15375     9.273999e+01 1.215100e+02\n15 15375     1.833101e+02 1.168700e+02\n3 15376     4.647200e+02 -2.716800e+02\n6 15376     5.206300e+02 1.888400e+02\n3 15377     -1.667900e+02 -2.724700e+02\n8 15377     -1.215997e+01 5.920013e+00\n9 15377     -1.780600e+02 1.197300e+02\n3 15378     7.497900e+02 -2.720700e+02\n7 15378     7.478199e+02 1.200100e+02\n3 15379     4.599700e+02 -2.738600e+02\n6 15379     5.157400e+02 1.871100e+02\n9 15379     3.715000e+02 1.297500e+02\n10 15379     6.661500e+02 2.412500e+02\n3 15380     -5.934998e+01 -2.769300e+02\n5 15380     5.423900e+02 -6.091801e+02\n6 15380     -1.535100e+02 5.207001e+01\n3 15381     2.896100e+02 -2.780900e+02\n8 15381     3.578200e+02 -2.582999e+01\n3 15382     4.935900e+02 -2.811000e+02\n6 15382     5.522100e+02 1.733600e+02\n3 15383     5.176500e+02 -2.828900e+02\n6 15383     5.787600e+02 1.672700e+02\n8 15383     5.946100e+02 -1.523001e+01\n12 15383     6.571700e+02 1.768800e+02\n3 15384     5.247700e+02 -2.848200e+02\n12 15384     6.644500e+02 1.737700e+02\n3 15385     4.712800e+02 -2.860900e+02\n6 15385     5.267100e+02 1.725100e+02\n12 15385     6.066600e+02 1.824500e+02\n3 15386     5.068700e+02 -2.965800e+02\n6 15386     5.645000e+02 1.546700e+02\n3 15387     -1.152900e+02 -2.981200e+02\n6 15387     -2.080800e+02 4.576001e+01\n3 15388     5.374301e+02 -3.006500e+02\n10 15388     7.371801e+02 1.775400e+02\n12 15388     6.775699e+02 1.533900e+02\n3 15389     5.374301e+02 -3.006500e+02\n10 15389     7.371801e+02 1.775400e+02\n3 15390     -6.009998e+01 -3.035100e+02\n6 15390     -1.559800e+02 2.121997e+01\n12 15390     -1.329300e+02 7.757001e+01\n3 15391     3.583000e+02 -3.048700e+02\n8 15391     4.252900e+02 -4.575000e+01\n3 15392     5.059600e+02 -3.066700e+02\n6 15392     5.626300e+02 1.443200e+02\n8 15392     5.834700e+02 -3.462000e+01\n12 15392     6.407700e+02 1.541100e+02\n3 15393     5.109600e+02 -3.071300e+02\n6 15393     5.682500e+02 1.425200e+02\n7 15393     5.402700e+02 1.722200e+02\n8 15393     5.880300e+02 -3.548999e+01\n9 15393     4.138500e+02 1.013300e+02\n10 15393     7.077000e+02 1.838400e+02\n12 15393     6.463199e+02 1.517800e+02\n3 15394     1.053003e+01 -3.122000e+02\n6 15394     -8.528000e+01 -2.340027e+00\n3 15395     -1.610700e+02 -3.162000e+02\n6 15395     -2.514200e+02 3.815002e+01\n13 15395     2.365000e+02 -1.773700e+02\n3 15396     4.912500e+02 -3.203600e+02\n6 15396     5.449500e+02 1.320400e+02\n3 15397     1.981899e+02 -3.284300e+02\n15 15397     1.202400e+02 4.672998e+01\n3 15398     9.704999e+01 -3.291700e+02\n10 15398     -6.645001e+01 8.663000e+01\n3 15399     4.217000e+02 -3.294100e+02\n8 15399     4.824200e+02 -6.778003e+01\n3 15400     -8.671002e+01 -3.328700e+02\n6 15400     -1.829600e+02 -3.119995e+00\n9 15400     -1.103800e+02 6.851001e+01\n3 15401     2.856899e+02 -3.334100e+02\n6 15401     2.198700e+02 -2.428998e+01\n8 15401     3.477200e+02 -7.390002e+01\n12 15401     2.429000e+02 1.817999e+01\n3 15402     -4.145001e+01 -3.379200e+02\n6 15402     -1.384900e+02 -2.096002e+01\n8 15402     6.757001e+01 -6.482001e+01\n3 15403     5.273700e+02 -3.430100e+02\n6 15403     5.823400e+02 1.019000e+02\n3 15404     5.794500e+02 -3.452900e+02\n10 15404     7.660500e+02 1.129300e+02\n3 15405     4.145000e+02 -3.465100e+02\n8 15405     4.712800e+02 -8.445001e+01\n3 15406     4.355400e+02 -3.470000e+02\n8 15406     4.897800e+02 -8.616998e+01\n3 15407     1.611100e+02 -3.604200e+02\n8 15407     2.324200e+02 -9.485999e+01\n3 15408     7.585999e+01 -3.613400e+02\n15 15408     -3.135999e+01 4.454999e+01\n3 15409     6.059301e+02 -3.678500e+02\n10 15409     7.871200e+02 7.828003e+01\n12 15409     7.418199e+02 6.953003e+01\n3 15410     4.750601e+02 -3.688900e+02\n7 15410     4.997800e+02 1.302300e+02\n15 15410     8.728800e+02 1.421300e+02\n3 15411     1.344000e+02 -3.713900e+02\n6 15411     4.213000e+01 -7.665002e+01\n3 15412     -5.869700e+02 -3.889500e+02\n9 15412     -6.132200e+02 -2.528003e+01\n3 15413     2.747998e+01 -3.920300e+02\n6 15413     -7.513000e+01 -9.747998e+01\n3 15414     3.935400e+02 -3.942000e+02\n8 15414     4.397000e+02 -1.301000e+02\n9 15414     3.052800e+02 2.269000e+01\n12 15414     3.652400e+02 -5.233002e+01\n13 15414     6.531400e+02 -3.559900e+02\n3 15415     8.087000e+01 -4.036100e+02\n7 15415     -9.259998e+01 -2.679993e+00\n10 15415     -1.136900e+02 8.669983e+00\n15 15415     -5.706000e+01 -1.773999e+01\n3 15416     5.376899e+02 -4.076000e+02\n6 15416     5.862600e+02 3.426001e+01\n3 15417     5.376899e+02 -4.076000e+02\n12 15417     6.635900e+02 4.345001e+01\n3 15418     3.812000e+01 -4.102200e+02\n6 15418     -6.603003e+01 -1.196500e+02\n15 15418     -9.728998e+01 -8.359985e+00\n3 15419     -5.210022e+00 -4.123300e+02\n6 15419     -1.103700e+02 -1.177800e+02\n3 15420     2.932200e+02 -4.148600e+02\n6 15420     2.128900e+02 -1.245400e+02\n8 15420     3.443200e+02 -1.466500e+02\n10 15420     1.183200e+02 -4.778003e+01\n12 15420     2.283300e+02 -8.362000e+01\n3 15421     -6.127700e+02 -4.157200e+02\n9 15421     -6.342600e+02 -4.995001e+01\n3 15422     7.461400e+02 -4.159399e+02\n7 15422     7.224000e+02 1.044000e+01\n3 15423     -2.443400e+02 -4.190100e+02\n12 15423     -2.966800e+02 -9.859985e+00\n3 15424     1.829500e+02 -4.197400e+02\n15 15424     5.703003e+01 -6.684003e+01\n3 15425     1.011900e+02 -4.252500e+02\n6 15425     -1.820007e+00 -1.411500e+02\n8 15425     1.742800e+02 -1.486500e+02\n12 15425     1.599976e+00 -8.947998e+01\n15 15425     -3.916998e+01 -4.845001e+01\n3 15426     2.656801e+02 -4.278101e+02\n6 15426     1.792600e+02 -1.412700e+02\n7 15426     7.834998e+01 -4.056000e+01\n12 15426     1.912500e+02 -9.890002e+01\n13 15426     5.137500e+02 -3.670400e+02\n3 15427     -1.288300e+02 -4.285000e+02\n8 15427     -1.097998e+01 -1.376400e+02\n3 15428     1.919900e+02 -4.335900e+02\n6 15428     9.591998e+01 -1.504301e+02\n3 15429     1.978101e+02 -4.352000e+02\n8 15429     2.568500e+02 -1.601700e+02\n10 15429     -2.039978e+00 -5.078998e+01\n3 15430     -4.911200e+02 -4.356300e+02\n5 15430     2.385000e+02 -5.334301e+02\n8 15430     -2.384000e+02 -9.938000e+01\n9 15430     -4.419000e+02 -2.759998e+01\n13 15430     7.134003e+01 -1.396100e+02\n3 15431     1.648000e+02 -4.381200e+02\n6 15431     6.525000e+01 -1.548500e+02\n3 15432     3.462800e+02 -4.390100e+02\n4 15432     -4.739800e+02 -5.761200e+02\n3 15433     -9.315002e+01 -4.428199e+02\n6 15433     -2.033300e+02 -1.452200e+02\n12 15433     -1.941700e+02 -8.446002e+01\n3 15434     6.792600e+02 -4.462100e+02\n12 15434     8.079600e+02 -2.428998e+01\n3 15435     -1.585600e+02 -4.487000e+02\n6 15435     -2.663000e+02 -1.375900e+02\n3 15436     -5.389001e+01 -4.578700e+02\n8 15436     4.166998e+01 -1.689600e+02\n3 15437     2.638101e+02 -4.586000e+02\n4 15437     -4.502500e+02 -4.946100e+02\n6 15437     1.668600e+02 -1.853900e+02\n12 15437     1.718600e+02 -1.431300e+02\n13 15437     4.958000e+02 -4.020900e+02\n3 15438     -4.884998e+01 -4.595100e+02\n6 15438     -1.621100e+02 -1.737000e+02\n10 15438     -2.453300e+02 -1.275000e+01\n12 15438     -1.605200e+02 -1.150300e+02\n15 15438     -2.101500e+02 -4.462000e+01\n3 15439     -4.623999e+01 -4.609600e+02\n6 15439     -1.605900e+02 -1.772100e+02\n12 15439     -1.594200e+02 -1.181200e+02\n15 15439     -2.099900e+02 -4.750000e+01\n3 15440     -4.623999e+01 -4.609600e+02\n8 15440     4.764001e+01 -1.718200e+02\n3 15441     3.752000e+02 -4.609301e+02\n6 15441     2.968200e+02 -1.774301e+02\n3 15442     1.166900e+02 -4.666700e+02\n8 15442     1.818600e+02 -1.853300e+02\n3 15443     1.119800e+02 -4.776200e+02\n10 15443     -1.217100e+02 -8.378003e+01\n12 15443     -5.109985e+00 -1.576500e+02\n15 15443     -6.671002e+01 -1.262200e+02\n3 15444     1.216800e+02 -4.830400e+02\n6 15444     9.000000e+00 -2.158700e+02\n12 15444     3.010010e+00 -1.655800e+02\n3 15445     1.759000e+02 -5.016000e+02\n6 15445     6.802002e+01 -2.310500e+02\n8 15445     2.299600e+02 -2.182200e+02\n9 15445     1.163000e+02 -7.204999e+01\n12 15445     6.616998e+01 -1.843400e+02\n15 15445     7.119995e+00 -1.664100e+02\n3 15446     -1.727200e+02 -5.020900e+02\n8 15446     -4.445001e+01 -1.917400e+02\n3 15447     1.426000e+02 -5.055900e+02\n6 15447     3.226001e+01 -2.339800e+02\n9 15447     8.715997e+01 -7.589001e+01\n3 15448     -4.996400e+02 -5.088800e+02\n15 15448     -3.709900e+02 2.013400e+02\n3 15449     5.929800e+02 -5.152500e+02\n7 15449     5.207500e+02 -6.139001e+01\n12 15449     6.670500e+02 -1.113900e+02\n3 15450     3.092100e+02 -5.196200e+02\n6 15450     2.156800e+02 -2.384900e+02\n12 15450     2.249399e+02 -2.011700e+02\n3 15451     3.759700e+02 -5.224500e+02\n10 15451     1.900699e+02 -1.630700e+02\n3 15452     -5.139300e+02 -5.259800e+02\n15 15452     -3.960600e+02 1.787000e+02\n3 15453     -4.845400e+02 -5.284200e+02\n6 15453     -5.530400e+02 -9.653998e+01\n10 15453     -3.938200e+02 1.739700e+02\n3 15454     3.682500e+02 -5.282300e+02\n6 15454     2.872800e+02 -2.360000e+02\n15 15454     2.922400e+02 -2.235100e+02\n3 15455     -1.240400e+02 -5.292200e+02\n9 15455     -1.372600e+02 -9.800000e+01\n3 15456     4.259998e+01 -5.360699e+02\n12 15456     -6.773999e+01 -1.970000e+02\n3 15457     1.903600e+02 -5.465699e+02\n8 15457     2.415300e+02 -2.541300e+02\n3 15458     1.749900e+02 -5.478900e+02\n6 15458     6.709998e+01 -2.684399e+02\n3 15459     3.439800e+02 -5.581600e+02\n8 15459     3.790600e+02 -2.668500e+02\n3 15460     2.066500e+02 -5.665699e+02\n8 15460     2.557200e+02 -2.698500e+02\n3 15461     5.282001e+01 -5.805800e+02\n6 15461     -5.657001e+01 -2.875900e+02\n12 15461     -5.363000e+01 -2.364000e+02\n3 15462     -1.919983e+00 -5.845800e+02\n6 15462     -1.097200e+02 -2.854900e+02\n3 15463     2.349976e+00 -5.881100e+02\n6 15463     -1.058500e+02 -2.886700e+02\n3 15464     2.309399e+02 -5.916300e+02\n6 15464     1.283700e+02 -3.057000e+02\n12 15464     1.333800e+02 -2.649100e+02\n3 15465     -1.047998e+01 -6.065601e+02\n6 15465     -1.180100e+02 -3.023500e+02\n8 15465     7.653998e+01 -2.863900e+02\n3 15466     2.111500e+02 -6.077900e+02\n10 15466     -1.463000e+01 -1.998700e+02\n3 15467     -6.839100e+02 4.754900e+02\n5 15467     2.859100e+02 4.969000e+02\n14 15467     1.913199e+02 3.863600e+02\n3 15468     -3.363800e+02 4.372500e+02\n5 15468     5.710200e+02 3.950800e+02\n11 15468     2.868600e+02 1.801300e+02\n14 15468     4.606400e+02 2.922000e+02\n3 15469     -3.452300e+02 4.277700e+02\n5 15469     5.608800e+02 3.856300e+02\n14 15469     4.512300e+02 2.821700e+02\n3 15470     -5.628900e+02 4.040500e+02\n13 15470     1.016900e+02 5.670700e+02\n14 15470     2.161200e+02 2.265800e+02\n3 15471     -3.375100e+02 3.990100e+02\n5 15471     5.677800e+02 3.560300e+02\n11 15471     2.880100e+02 1.493400e+02\n14 15471     4.588500e+02 2.551100e+02\n3 15472     -5.318300e+02 3.843700e+02\n5 15472     3.465900e+02 3.116800e+02\n11 15472     9.502002e+01 1.085700e+02\n13 15472     1.284500e+02 5.525200e+02\n14 15472     2.466400e+02 2.096700e+02\n3 15473     -5.591100e+02 3.730600e+02\n11 15473     6.962000e+01 1.013200e+02\n3 15474     -3.953300e+02 3.710500e+02\n5 15474     4.827800e+02 3.014500e+02\n3 15475     -3.399100e+02 3.661000e+02\n5 15475     5.607900e+02 3.192300e+02\n11 15475     2.830699e+02 1.205300e+02\n13 15475     3.071200e+02 5.662700e+02\n14 15475     4.533199e+02 2.201000e+02\n3 15476     -5.516600e+02 3.622500e+02\n13 15476     1.103500e+02 5.316800e+02\n14 15476     2.252400e+02 1.872200e+02\n3 15477     -2.373200e+02 3.597900e+02\n14 15477     6.459399e+02 3.119200e+02\n3 15478     -4.906400e+02 3.496000e+02\n5 15478     3.803000e+02 2.710900e+02\n11 15478     1.180700e+02 7.739999e+01\n13 15478     1.576801e+02 5.187300e+02\n14 15478     2.799100e+02 1.710700e+02\n3 15479     -4.394400e+02 3.425100e+02\n5 15479     4.346300e+02 2.708600e+02\n3 15480     -4.837400e+02 3.367800e+02\n4 15480     2.449500e+02 -3.765200e+02\n11 15480     1.171300e+02 6.559000e+01\n3 15481     -4.582600e+02 3.145900e+02\n5 15481     4.035601e+02 2.287700e+02\n13 15481     1.774500e+02 4.832700e+02\n14 15481     3.023800e+02 1.309800e+02\n3 15482     -4.494200e+02 3.152100e+02\n5 15482     4.135900e+02 2.307700e+02\n13 15482     1.860400e+02 4.850500e+02\n14 15482     3.122000e+02 1.327100e+02\n3 15483     -2.980600e+02 3.140900e+02\n5 15483     5.912900e+02 2.522400e+02\n3 15484     -4.706500e+02 3.124200e+02\n5 15484     3.911100e+02 2.293500e+02\n3 15485     -4.367100e+02 2.972900e+02\n5 15485     4.209399e+02 2.081200e+02\n13 15485     1.920300e+02 4.665500e+02\n14 15485     3.195000e+02 1.120600e+02\n3 15486     -3.559700e+02 2.704000e+02\n5 15486     5.033500e+02 1.835100e+02\n13 15486     2.605900e+02 4.478800e+02\n14 15486     3.996300e+02 8.864001e+01\n3 15487     -2.952500e+02 2.666500e+02\n13 15487     3.207600e+02 4.542700e+02\n14 15487     4.705699e+02 9.425000e+01\n3 15488     -2.588000e+02 2.540100e+02\n13 15488     3.571400e+02 4.499800e+02\n3 15489     -3.490500e+02 2.456000e+02\n13 15489     2.682200e+02 4.291000e+02\n14 15489     4.084900e+02 6.709003e+01\n3 15490     -4.047700e+02 2.241600e+02\n14 15490     3.439399e+02 3.809003e+01\n3 15491     -1.232600e+02 2.110900e+02\n11 15491     4.768900e+02 -7.750000e+00\n13 15491     4.956000e+02 4.314600e+02\n14 15491     6.797600e+02 6.400000e+01\n3 15492     -1.689100e+02 2.093100e+02\n13 15492     4.475800e+02 4.235400e+02\n14 15492     6.219800e+02 5.582001e+01\n3 15493     1.346000e+02 2.083600e+02\n11 15493     6.062600e+02 -9.690997e+01\n3 15494     -6.140700e+02 2.015400e+02\n4 15494     1.610200e+02 -2.624900e+02\n5 15494     2.190601e+02 9.172998e+01\n11 15494     -3.579999e+01 -7.171997e+01\n3 15495     2.900300e+02 1.995600e+02\n8 15495     4.231200e+02 4.149000e+02\n3 15496     -6.503400e+02 1.967900e+02\n5 15496     1.825000e+02 8.425000e+01\n8 15496     -3.622100e+02 4.058300e+02\n3 15497     2.097700e+02 1.969500e+02\n8 15497     3.618000e+02 4.174700e+02\n11 15497     6.707000e+02 -1.224700e+02\n3 15498     2.064700e+02 1.944100e+02\n6 15498     2.783600e+02 8.215400e+02\n8 15498     3.592900e+02 4.153800e+02\n9 15498     1.527300e+02 5.498700e+02\n11 15498     6.691600e+02 -1.244700e+02\n3 15499     3.173000e+02 1.899800e+02\n8 15499     4.472400e+02 4.055100e+02\n9 15499     2.528199e+02 5.464400e+02\n3 15500     -2.566100e+02 1.889200e+02\n5 15500     6.187700e+02 1.141600e+02\n13 15500     3.564900e+02 3.939800e+02\n14 15500     5.140300e+02 2.410999e+01\n3 15501     -6.774700e+02 1.881300e+02\n5 15501     1.553800e+02 7.460999e+01\n8 15501     -3.842400e+02 3.975500e+02\n3 15502     -2.678700e+02 1.876600e+02\n8 15502     -2.947998e+01 4.153000e+02\n3 15503     -1.224100e+02 1.832600e+02\n8 15503     1.008100e+02 4.169500e+02\n11 15503     4.779399e+02 -3.253003e+01\n14 15503     6.797500e+02 3.756000e+01\n3 15504     -8.345001e+01 1.822500e+02\n8 15504     1.346100e+02 4.139200e+02\n11 15504     5.239500e+02 -2.977002e+01\n3 15505     -2.804600e+02 1.811700e+02\n6 15505     -3.181300e+02 8.698900e+02\n14 15505     4.857300e+02 1.381000e+01\n3 15506     -1.880700e+02 1.789600e+02\n13 15506     4.260900e+02 3.946600e+02\n14 15506     5.975200e+02 2.320001e+01\n3 15507     -5.086300e+02 1.774600e+02\n13 15507     1.189800e+02 3.528900e+02\n3 15508     -1.748800e+02 1.572600e+02\n13 15508     4.377300e+02 3.774500e+02\n3 15509     -1.570200e+02 1.527400e+02\n13 15509     4.561801e+02 3.755100e+02\n14 15509     6.342800e+02 1.099854e-01\n3 15510     -2.098800e+02 1.519200e+02\n13 15510     4.015500e+02 3.681500e+02\n14 15510     5.688400e+02 -6.840027e+00\n3 15511     1.126500e+02 1.519200e+02\n6 15511     1.613000e+02 7.807600e+02\n8 15511     2.797200e+02 3.805000e+02\n9 15511     6.842999e+01 5.083900e+02\n11 15511     5.904100e+02 -1.435400e+02\n14 15511     8.825400e+02 -8.839001e+01\n3 15512     -2.941000e+02 1.510900e+02\n4 15512     1.305100e+02 -4.817100e+02\n5 15512     5.700400e+02 7.304999e+01\n6 15512     -3.344000e+02 8.271200e+02\n14 15512     4.679600e+02 -1.703998e+01\n3 15513     3.622200e+02 1.464100e+02\n6 15513     4.470900e+02 6.954900e+02\n3 15514     -3.271500e+02 1.438800e+02\n14 15514     4.300500e+02 -2.706000e+01\n3 15515     -3.271500e+02 1.438800e+02\n13 15515     2.860800e+02 3.484100e+02\n14 15515     4.300500e+02 -2.706000e+01\n3 15516     -1.526100e+02 1.354600e+02\n5 15516     7.448600e+02 6.857001e+01\n6 15516     -1.428600e+02 8.426100e+02\n3 15517     -9.841998e+01 1.341100e+02\n5 15517     8.179200e+02 7.328003e+01\n6 15517     -6.702002e+01 8.541600e+02\n8 15517     1.218500e+02 3.737100e+02\n13 15517     5.159100e+02 3.659300e+02\n14 15517     7.069900e+02 -1.245001e+01\n3 15518     -1.541400e+02 1.265600e+02\n11 15518     4.404500e+02 -8.513000e+01\n14 15518     6.359399e+02 -2.640002e+01\n3 15519     -5.176000e+02 1.205500e+02\n11 15519     5.441998e+01 -1.241000e+02\n14 15519     2.207400e+02 -6.771002e+01\n3 15520     -4.804900e+02 1.170800e+02\n6 15520     -5.770800e+02 7.343400e+02\n8 15520     -2.149700e+02 3.483800e+02\n11 15520     8.865002e+01 -1.238400e+02\n3 15521     -2.721700e+02 1.038300e+02\n11 15521     3.050699e+02 -1.161200e+02\n3 15522     -2.856700e+02 9.491998e+01\n6 15522     -3.178800e+02 7.568600e+02\n9 15522     -2.875800e+02 4.667300e+02\n3 15523     -4.843200e+02 8.748999e+01\n14 15523     2.545601e+02 -9.482001e+01\n3 15524     2.339800e+02 8.767999e+01\n8 15524     3.800400e+02 3.207400e+02\n3 15525     -6.469100e+02 8.467999e+01\n5 15525     1.803400e+02 -1.614001e+01\n14 15525     9.006000e+01 -1.097800e+02\n3 15526     -4.849100e+02 8.209003e+01\n11 15526     8.609003e+01 -1.502800e+02\n14 15526     2.536700e+02 -9.959998e+01\n3 15527     -6.882100e+02 7.871997e+01\n8 15527     -3.882000e+02 3.078100e+02\n11 15527     -9.978998e+01 -1.670100e+02\n14 15527     5.059003e+01 -1.181400e+02\n3 15528     -5.175500e+02 7.640002e+01\n5 15528     3.122900e+02 -1.629999e+01\n11 15528     5.409998e+01 -1.570900e+02\n14 15528     2.189000e+02 -1.072300e+02\n3 15529     2.905300e+02 6.804999e+01\n6 15529     3.532200e+02 6.104000e+02\n9 15529     2.272300e+02 4.331800e+02\n3 15530     -5.541400e+02 6.151001e+01\n14 15530     1.799399e+02 -1.241300e+02\n3 15531     -5.130900e+02 5.654999e+01\n13 15531     1.135800e+02 2.590900e+02\n14 15531     2.229000e+02 -1.248600e+02\n3 15532     1.029100e+02 3.279999e+01\n8 15532     2.694100e+02 2.775700e+02\n9 15532     6.145001e+01 3.984000e+02\n12 15532     2.600000e+02 6.148100e+02\n13 15532     6.330900e+02 2.006500e+02\n14 15532     8.620500e+02 -2.144600e+02\n3 15533     -1.181100e+02 2.537000e+01\n5 15533     7.796899e+02 -4.353998e+01\n6 15533     -9.089001e+01 7.103700e+02\n13 15533     4.860300e+02 2.700400e+02\n3 15534     2.455500e+02 1.710999e+01\n6 15534     3.133800e+02 5.887400e+02\n8 15534     3.872800e+02 2.599100e+02\n3 15535     -2.014900e+02 4.400024e-01\n13 15535     3.995699e+02 2.425700e+02\n3 15536     4.812000e+02 -3.499756e-01\n12 15536     6.510800e+02 5.036300e+02\n3 15537     4.812000e+02 -3.499756e-01\n12 15537     6.510800e+02 5.036300e+02\n3 15538     -2.015000e+02 -5.750000e+00\n5 15538     6.697900e+02 -7.871997e+01\n9 15538     -2.052100e+02 3.575200e+02\n11 15538     3.842900e+02 -1.995700e+02\n12 15538     -3.529999e+01 6.139400e+02\n3 15539     -3.798000e+02 -1.764001e+01\n13 15539     2.297800e+02 2.135800e+02\n3 15540     2.077800e+02 -5.412000e+01\n8 15540     3.534100e+02 2.001900e+02\n3 15541     2.077800e+02 -5.412000e+01\n8 15541     3.534100e+02 2.001900e+02\n3 15542     2.077800e+02 -5.412000e+01\n8 15542     3.534100e+02 2.001900e+02\n3 15543     4.892400e+02 -6.282001e+01\n6 15543     5.731801e+02 4.175800e+02\n7 15543     5.651400e+02 4.069600e+02\n8 15543     5.851400e+02 1.758500e+02\n3 15544     -1.380300e+02 -6.933002e+01\n11 15544     4.540800e+02 -2.496300e+02\n3 15545     -3.596997e+01 -8.564001e+01\n8 15545     1.746800e+02 1.940800e+02\n9 15545     -5.528998e+01 2.926100e+02\n13 15545     5.570100e+02 1.802000e+02\n14 15545     7.670300e+02 -2.360000e+02\n3 15546     -4.216998e+01 -9.121997e+01\n7 15546     2.042700e+02 5.845500e+02\n8 15546     1.713700e+02 1.883400e+02\n13 15546     5.516100e+02 1.756000e+02\n3 15547     -4.216998e+01 -9.121997e+01\n7 15547     2.042700e+02 5.845500e+02\n8 15547     1.713700e+02 1.883400e+02\n13 15547     5.516100e+02 1.756000e+02\n3 15548     -5.699200e+02 -9.490002e+01\n5 15548     2.463400e+02 -1.737100e+02\n3 15549     5.332700e+02 -1.105500e+02\n7 15549     5.960200e+02 3.453400e+02\n9 15549     4.395400e+02 2.725900e+02\n3 15550     5.682500e+02 -1.366800e+02\n9 15550     4.691200e+02 2.498600e+02\n10 15550     8.227400e+02 3.387900e+02\n12 15550     7.338101e+02 3.287800e+02\n3 15551     3.794301e+02 -1.385600e+02\n6 15551     4.379900e+02 3.500200e+02\n12 15551     5.217500e+02 3.593100e+02\n3 15552     1.998101e+02 -1.708800e+02\n7 15552     1.011000e+02 2.320000e+02\n13 15552     5.346000e+02 -1.312800e+02\n3 15553     1.951500e+02 -1.788000e+02\n8 15553     2.814800e+02 6.548001e+01\n3 15554     9.039978e+00 -1.848000e+02\n6 15554     -7.306000e+01 1.592400e+02\n3 15555     5.150024e+00 -1.881300e+02\n5 15555     6.320300e+02 -5.322600e+02\n7 15555     -9.239001e+01 2.353600e+02\n13 15555     3.645900e+02 -1.182900e+02\n3 15556     -4.222200e+02 -1.892400e+02\n6 15556     -4.656300e+02 3.906500e+02\n8 15556     -1.572700e+02 1.059400e+02\n9 15556     -3.912900e+02 1.877400e+02\n3 15557     1.466800e+02 -1.890500e+02\n8 15557     2.367700e+02 5.563000e+01\n3 15558     -4.260700e+02 -1.903000e+02\n8 15558     -1.608600e+02 1.041200e+02\n9 15558     -3.949100e+02 1.866000e+02\n3 15559     9.303003e+01 -1.923400e+02\n8 15559     1.900600e+02 5.497000e+01\n9 15559     4.463000e+01 1.943000e+02\n3 15560     1.938700e+02 -2.037900e+02\n4 15560     -2.611000e+02 -5.436400e+02\n9 15560     1.334400e+02 1.854700e+02\n13 15560     5.106200e+02 -1.684000e+02\n15 15560     1.816300e+02 2.227700e+02\n3 15561     4.317300e+02 -2.127500e+02\n7 15561     4.872300e+02 2.788900e+02\n10 15561     6.534301e+02 3.180700e+02\n12 15561     5.723199e+02 2.683800e+02\n3 15562     4.627900e+02 -2.159800e+02\n7 15562     5.138199e+02 2.672000e+02\n8 15562     5.640200e+02 4.026001e+01\n12 15562     6.052800e+02 2.589600e+02\n3 15563     7.257000e+02 -2.248100e+02\n7 15563     7.520900e+02 1.805300e+02\n3 15564     5.384100e+02 -2.315700e+02\n7 15564     5.789301e+02 2.307200e+02\n9 15564     4.397600e+02 1.665200e+02\n12 15564     6.865300e+02 2.274600e+02\n3 15565     2.638900e+02 -2.318500e+02\n6 15565     2.109000e+02 9.620001e+01\n7 15565     1.433000e+02 1.567700e+02\n8 15565     3.388600e+02 1.573001e+01\n10 15565     1.755600e+02 1.716700e+02\n12 15565     2.397700e+02 1.412700e+02\n13 15565     5.727200e+02 -1.982900e+02\n15 15565     2.819200e+02 1.768700e+02\n3 15566     5.599100e+02 -2.371500e+02\n9 15566     4.579700e+02 1.609700e+02\n12 15566     7.094100e+02 2.168500e+02\n3 15567     3.617200e+02 -2.517600e+02\n6 15567     4.088000e+02 2.286000e+02\n15 15567     7.716000e+02 3.415100e+02\n3 15568     8.984003e+01 -2.714300e+02\n10 15568     -5.692999e+01 1.501000e+02\n3 15569     5.274200e+02 -2.719700e+02\n7 15569     5.616400e+02 1.974600e+02\n3 15570     5.298500e+02 -2.784000e+02\n7 15570     5.622100e+02 1.919400e+02\n9 15570     4.312100e+02 1.264400e+02\n3 15571     7.613400e+02 -2.825200e+02\n7 15571     7.706899e+02 1.180700e+02\n3 15572     -3.634998e+01 -2.869900e+02\n12 15572     -1.103600e+02 9.140997e+01\n3 15573     5.508500e+02 -2.886100e+02\n7 15573     5.790200e+02 1.764600e+02\n3 15574     8.253003e+01 -2.917700e+02\n4 15574     -2.827600e+02 -4.267900e+02\n6 15574     -8.590027e+00 1.248999e+01\n8 15574     1.700400e+02 -3.317999e+01\n12 15574     4.590027e+00 6.670001e+01\n3 15575     9.760010e+00 -2.932200e+02\n6 15575     -8.444000e+01 1.910999e+01\n12 15575     -6.840997e+01 7.484003e+01\n3 15576     1.586600e+02 -2.950800e+02\n8 15576     2.352100e+02 -3.894000e+01\n10 15576     3.840027e+00 1.054600e+02\n12 15576     8.787000e+01 5.606000e+01\n3 15577     6.733500e+02 -2.953700e+02\n7 15577     6.867000e+02 1.337000e+02\n9 15577     5.529700e+02 1.116200e+02\n3 15578     6.733500e+02 -2.953700e+02\n7 15578     6.867000e+02 1.337000e+02\n9 15578     5.529700e+02 1.116200e+02\n3 15579     1.801500e+02 -2.962700e+02\n15 15579     1.056800e+02 9.039001e+01\n3 15580     3.333002e+01 -3.044700e+02\n15 15580     -5.896997e+01 1.292700e+02\n3 15581     -1.462100e+02 -3.051800e+02\n5 15581     4.796300e+02 -5.865400e+02\n6 15581     -2.338000e+02 5.607001e+01\n8 15581     -4.690002e+00 -2.619000e+01\n12 15581     -1.895500e+02 1.095700e+02\n13 15581     2.524100e+02 -1.671300e+02\n3 15582     3.063000e+02 -3.070600e+02\n13 15582     5.945699e+02 -2.669100e+02\n3 15583     4.703700e+02 -3.103900e+02\n6 15583     5.228300e+02 1.470500e+02\n12 15583     6.028101e+02 1.567600e+02\n3 15584     7.206000e+02 -3.134800e+02\n7 15584     7.249100e+02 1.031800e+02\n9 15584     5.922300e+02 9.607001e+01\n3 15585     -8.778003e+01 -3.245900e+02\n6 15585     -1.834700e+02 5.789978e+00\n9 15585     -1.112500e+02 7.491998e+01\n3 15586     -7.128998e+01 -3.245900e+02\n7 15586     -1.789800e+02 1.154300e+02\n13 15586     2.824301e+02 -2.148000e+02\n3 15587     -8.334998e+01 -3.256900e+02\n6 15587     -1.793500e+02 3.159973e+00\n9 15587     -1.075800e+02 7.423999e+01\n3 15588     5.184700e+02 -3.295000e+02\n6 15588     5.736000e+02 1.190900e+02\n7 15588     5.429500e+02 1.511300e+02\n10 15588     7.094100e+02 1.585000e+02\n12 15588     6.515900e+02 1.281600e+02\n3 15589     4.879200e+02 -3.337600e+02\n7 15589     5.163700e+02 1.560800e+02\n3 15590     1.095200e+02 -3.398400e+02\n7 15590     -4.865002e+01 5.679999e+01\n15 15590     7.760010e+00 5.772998e+01\n3 15591     -5.686900e+02 -3.411200e+02\n9 15591     -6.013300e+02 1.722998e+01\n3 15592     2.118700e+02 -3.518600e+02\n7 15592     4.745001e+01 3.365997e+01\n3 15593     4.200300e+02 -3.616100e+02\n8 15593     4.720200e+02 -9.962000e+01\n3 15594     3.051801e+02 -3.650200e+02\n4 15594     -4.055500e+02 -5.824000e+02\n3 15595     1.911200e+02 -3.753000e+02\n8 15595     2.585000e+02 -1.088700e+02\n3 15596     -5.810200e+02 -3.779100e+02\n9 15596     -6.085400e+02 -1.545001e+01\n3 15597     -5.888800e+02 -3.799300e+02\n9 15597     -6.160800e+02 -1.750000e+01\n3 15598     -5.931400e+02 -3.821400e+02\n9 15598     -6.197400e+02 -1.990997e+01\n3 15599     -6.182300e+02 -3.893800e+02\n9 15599     -6.430200e+02 -2.783002e+01\n3 15600     1.747900e+02 -3.925100e+02\n12 15600     9.128998e+01 -5.642999e+01\n3 15601     3.276300e+02 -4.054800e+02\n4 15601     -4.417100e+02 -5.844000e+02\n7 15601     1.530000e+02 -2.697998e+01\n10 15601     1.671300e+02 -4.271997e+01\n13 15601     5.800601e+02 -3.603900e+02\n15 15601     2.734500e+02 -7.676001e+01\n3 15602     7.989001e+01 -4.066600e+02\n10 15602     -1.139700e+02 5.789978e+00\n15 15602     -5.762000e+01 -2.117999e+01\n3 15603     -1.831700e+02 -4.148101e+02\n4 15603     -2.679500e+02 -2.641300e+02\n6 15603     -2.890000e+02 -9.765997e+01\n7 15603     -2.830400e+02 4.700000e+01\n8 15603     -5.245001e+01 -1.222400e+02\n12 15603     -2.668000e+02 -3.522998e+01\n3 15604     -4.942800e+02 -4.185699e+02\n5 15604     2.444301e+02 -5.118600e+02\n8 15604     -2.372000e+02 -8.422998e+01\n3 15605     3.777600e+02 -4.203101e+02\n8 15605     4.191600e+02 -1.553000e+02\n3 15606     -1.120800e+02 -4.210900e+02\n8 15606     4.390015e+00 -1.315700e+02\n3 15607     1.748300e+02 -4.302800e+02\n10 15607     -2.538000e+01 -4.109003e+01\n15 15607     4.590002e+01 -7.529999e+01\n3 15608     5.323999e+01 -4.375400e+02\n6 15608     -5.084998e+01 -1.479000e+02\n3 15609     -4.889001e+01 -4.451899e+02\n8 15609     4.898999e+01 -1.566900e+02\n9 15609     -7.641998e+01 -2.831000e+01\n15 15609     -1.895600e+02 -1.671997e+01\n3 15610     -6.384998e+01 -4.456899e+02\n8 15610     3.659003e+01 -1.564600e+02\n3 15611     2.985900e+02 -4.511300e+02\n8 15611     3.418300e+02 -1.805800e+02\n3 15612     4.046002e+01 -4.564200e+02\n8 15612     1.209600e+02 -1.718100e+02\n3 15613     -1.182300e+02 -4.603600e+02\n6 15613     -2.272300e+02 -1.580900e+02\n3 15614     2.316500e+02 -4.637000e+02\n4 15614     -4.402700e+02 -4.676801e+02\n6 15614     1.315200e+02 -1.916500e+02\n7 15614     2.440997e+01 -8.364001e+01\n8 15614     2.812400e+02 -1.887100e+02\n12 15614     1.336800e+02 -1.477000e+02\n13 15614     4.667800e+02 -4.003900e+02\n15 15614     8.584003e+01 -1.409300e+02\n3 15615     3.495900e+02 -4.687100e+02\n6 15615     2.654700e+02 -1.890400e+02\n8 15615     3.876900e+02 -1.963000e+02\n9 15615     2.661500e+02 -4.134003e+01\n3 15616     2.212200e+02 -4.688600e+02\n4 15616     -4.386000e+02 -4.554500e+02\n6 15616     1.156100e+02 -1.992100e+02\n10 15616     -8.109985e+00 -1.017500e+02\n15 15616     6.454999e+01 -1.462800e+02\n3 15617     2.194000e+02 -4.722700e+02\n7 15617     6.460022e+00 -9.327002e+01\n3 15618     3.143101e+02 -4.790000e+02\n8 15618     3.537100e+02 -2.042100e+02\n9 15618     2.345800e+02 -5.088000e+01\n12 15618     2.301700e+02 -1.656300e+02\n3 15619     2.178400e+02 -4.981400e+02\n6 15619     1.102300e+02 -2.280400e+02\n8 15619     2.640300e+02 -2.172400e+02\n9 15619     1.505400e+02 -6.844000e+01\n12 15619     1.098100e+02 -1.837400e+02\n3 15620     1.973199e+02 -5.053101e+02\n6 15620     9.026001e+01 -2.337700e+02\n12 15620     8.944000e+01 -1.890900e+02\n3 15621     1.805300e+02 -5.230400e+02\n6 15621     7.270001e+01 -2.483700e+02\n3 15622     1.417200e+02 -5.282800e+02\n6 15622     3.153998e+01 -2.522400e+02\n3 15623     1.799800e+02 -5.444700e+02\n6 15623     7.181000e+01 -2.658900e+02\n9 15623     1.186400e+02 -1.072200e+02\n12 15623     7.279999e+01 -2.210600e+02\n3 15624     1.469700e+02 -5.493400e+02\n6 15624     3.771002e+01 -2.697700e+02\n8 15624     2.042300e+02 -2.538000e+02\n9 15624     9.190002e+01 -1.116600e+02\n10 15624     -8.259003e+01 -1.436800e+02\n12 15624     3.739001e+01 -2.229600e+02\n15 15624     -1.948999e+01 -1.966300e+02\n3 15625     1.469700e+02 -5.493400e+02\n6 15625     3.771002e+01 -2.697700e+02\n8 15625     2.042300e+02 -2.538000e+02\n9 15625     9.190002e+01 -1.116600e+02\n10 15625     -8.259003e+01 -1.436800e+02\n12 15625     3.739001e+01 -2.229600e+02\n15 15625     -1.948999e+01 -1.966300e+02\n3 15626     2.610400e+02 -5.618600e+02\n6 15626     1.597900e+02 -2.805300e+02\n3 15627     -4.388900e+02 -5.727700e+02\n7 15627     -3.780700e+02 3.508002e+01\n13 15627     6.152002e+01 -2.735000e+02\n15 15627     -3.633800e+02 9.281000e+01\n3 15628     -4.542600e+02 -5.735601e+02\n9 15628     -4.052500e+02 -1.402300e+02\n3 15629     1.769500e+02 -5.898199e+02\n6 15629     6.982001e+01 -3.030200e+02\n12 15629     7.332001e+01 -2.590300e+02\n15 15629     2.054999e+01 -2.375400e+02\n3 15630     1.566700e+02 -5.974399e+02\n6 15630     4.878003e+01 -3.088600e+02\n9 15630     1.006400e+02 -1.506400e+02\n12 15630     5.125000e+01 -2.636300e+02\n15 15630     -1.859985e+00 -2.378500e+02\n3 15631     2.488800e+02 -6.129399e+02\n6 15631     1.463900e+02 -3.226500e+02\n10 15631     2.428003e+01 -2.131300e+02\n12 15631     1.531700e+02 -2.837200e+02\n3 15632     -4.760600e+02 -6.182500e+02\n9 15632     -4.207900e+02 -1.772500e+02\n3 15633     -6.813700e+02 4.420100e+02\n14 15633     1.924700e+02 3.549300e+02\n3 15634     -5.668700e+02 4.351000e+02\n14 15634     2.145900e+02 2.557100e+02\n3 15635     -3.456000e+02 4.337400e+02\n5 15635     5.604301e+02 3.925200e+02\n14 15635     4.511300e+02 2.890900e+02\n3 15636     -3.429200e+02 4.178600e+02\n4 15636     3.089200e+02 -5.089301e+02\n5 15636     5.623700e+02 3.752000e+02\n14 15636     4.537000e+02 2.732700e+02\n3 15637     -3.352500e+02 3.748400e+02\n11 15637     2.899200e+02 1.294100e+02\n13 15637     3.131300e+02 5.761100e+02\n3 15638     -2.802500e+02 3.162600e+02\n4 15638     2.377100e+02 -5.317500e+02\n5 15638     6.151500e+02 2.569800e+02\n3 15639     -4.823600e+02 3.076500e+02\n5 15639     3.810800e+02 2.258800e+02\n13 15639     1.589700e+02 4.804200e+02\n14 15639     2.807700e+02 1.286100e+02\n3 15640     -4.422800e+02 3.031000e+02\n4 15640     2.221300e+02 -3.925900e+02\n5 15640     4.139600e+02 2.176100e+02\n3 15641     -7.089000e+02 2.881300e+02\n11 15641     -9.778998e+01 -5.760010e+00\n3 15642     -4.126700e+02 2.798100e+02\n4 15642     2.054301e+02 -4.057500e+02\n5 15642     4.407400e+02 1.874800e+02\n3 15643     -7.175100e+02 2.776900e+02\n5 15643     1.326400e+02 1.660600e+02\n3 15644     -3.148100e+02 2.696300e+02\n13 15644     3.015500e+02 4.538400e+02\n14 15644     4.482200e+02 9.442001e+01\n3 15645     -3.106900e+02 2.622600e+02\n5 15645     5.585900e+02 1.816000e+02\n11 15645     2.622600e+02 8.840027e+00\n3 15646     -1.751300e+02 2.465900e+02\n11 15646     4.138600e+02 1.423999e+01\n14 15646     6.149900e+02 9.156000e+01\n3 15647     -2.029800e+02 2.457700e+02\n4 15647     1.881500e+02 -5.740699e+02\n3 15648     -6.631000e+01 2.156400e+02\n11 15648     5.461700e+02 3.460022e+00\n14 15648     7.545800e+02 7.644000e+01\n3 15649     -1.523300e+02 2.109300e+02\n13 15649     4.656500e+02 4.273500e+02\n14 15649     6.439800e+02 5.984998e+01\n3 15650     -1.325000e+01 2.077600e+02\n8 15650     1.999600e+02 4.396700e+02\n3 15651     -6.743700e+02 2.024700e+02\n11 15651     -8.945001e+01 -7.683002e+01\n3 15652     -3.065400e+02 1.977500e+02\n8 15652     -6.426001e+01 4.215600e+02\n3 15653     -2.713300e+02 1.856600e+02\n5 15653     6.010300e+02 1.099100e+02\n8 15653     -3.278003e+01 4.129200e+02\n13 15653     3.419399e+02 3.895900e+02\n14 15653     4.967200e+02 1.931000e+01\n3 15654     3.197100e+02 1.853300e+02\n6 15654     3.989500e+02 7.522000e+02\n3 15655     3.853600e+02 1.745500e+02\n8 15655     5.067000e+02 3.902600e+02\n3 15656     -7.811300e+02 1.697800e+02\n11 15656     -1.775200e+02 -1.087200e+02\n3 15657     -2.994100e+02 1.593800e+02\n4 15657     1.362000e+02 -4.785000e+02\n5 15657     5.646400e+02 8.077002e+01\n6 15657     -3.419700e+02 8.370700e+02\n8 15657     -5.652002e+01 3.895800e+02\n13 15657     3.129301e+02 3.647900e+02\n14 15657     4.620100e+02 -8.500000e+00\n3 15658     -5.849700e+02 1.506800e+02\n5 15658     2.458800e+02 4.873999e+01\n8 15658     -3.053600e+02 3.724800e+02\n11 15658     -9.229980e+00 -1.061600e+02\n13 15658     5.360999e+01 3.243300e+02\n14 15658     1.530400e+02 -4.617999e+01\n3 15659     -6.484003e+01 1.505400e+02\n8 15659     1.519600e+02 3.890700e+02\n3 15660     -3.237000e+02 1.485600e+02\n4 15660     1.297100e+02 -4.576300e+02\n5 15660     5.345300e+02 6.715002e+01\n6 15660     -3.738700e+02 8.162400e+02\n3 15661     -1.720200e+02 1.446100e+02\n8 15661     5.606000e+01 3.811800e+02\n11 15661     4.186400e+02 -7.147998e+01\n3 15662     -4.461300e+02 1.390900e+02\n5 15662     3.934600e+02 4.727002e+01\n11 15662     1.245100e+02 -1.037100e+02\n14 15662     2.981300e+02 -4.384998e+01\n3 15663     2.007500e+02 1.248700e+02\n6 15663     2.669500e+02 7.319400e+02\n3 15664     1.616200e+02 1.209000e+02\n6 15664     2.195500e+02 7.332500e+02\n8 15664     3.193700e+02 3.522500e+02\n9 15664     1.127700e+02 4.808000e+02\n3 15665     -5.869000e+01 1.132800e+02\n6 15665     -1.202002e+01 8.409800e+02\n11 15665     5.538700e+02 -8.481000e+01\n13 15665     5.569399e+02 3.525300e+02\n14 15665     7.576600e+02 -2.898999e+01\n3 15666     -9.762000e+01 1.116200e+02\n11 15666     5.063000e+02 -9.234003e+01\n3 15667     -3.206700e+02 1.067500e+02\n4 15667     1.066300e+02 -4.551000e+02\n5 15667     5.351801e+02 2.760999e+01\n8 15667     -7.516998e+01 3.470900e+02\n11 15667     2.539000e+02 -1.161800e+02\n14 15667     4.355000e+02 -6.172998e+01\n3 15668     -7.177900e+02 9.948999e+01\n14 15668     2.352002e+01 -1.023600e+02\n3 15669     -1.667700e+02 9.053998e+01\n6 15669     -1.574400e+02 7.821700e+02\n9 15669     -1.773900e+02 4.462000e+02\n3 15670     -8.788000e+01 8.541998e+01\n6 15670     -5.246997e+01 7.942500e+02\n8 15670     1.309600e+02 3.340200e+02\n13 15670     5.220500e+02 3.252300e+02\n3 15671     1.740600e+02 8.534003e+01\n6 15671     2.323600e+02 6.852300e+02\n9 15671     1.231900e+02 4.484200e+02\n3 15672     1.704400e+02 7.654999e+01\n6 15672     2.273100e+02 6.750500e+02\n9 15672     1.202900e+02 4.383400e+02\n3 15673     -9.781000e+01 7.659998e+01\n5 15673     8.120200e+02 1.117999e+01\n6 15673     -6.527002e+01 7.790300e+02\n8 15673     1.224000e+02 3.261100e+02\n9 15673     -1.148400e+02 4.345500e+02\n13 15673     5.111600e+02 3.149700e+02\n14 15673     7.038900e+02 -7.181000e+01\n3 15674     -2.537800e+02 7.038000e+01\n13 15674     3.521300e+02 2.947700e+02\n3 15675     4.438101e+02 6.992999e+01\n6 15675     5.379301e+02 5.838500e+02\n7 15675     5.477700e+02 5.582400e+02\n12 15675     6.174100e+02 5.958800e+02\n3 15676     -5.464600e+02 6.097998e+01\n5 15676     2.814200e+02 -3.245001e+01\n11 15676     2.776001e+01 -1.705400e+02\n14 15676     1.899600e+02 -1.232200e+02\n3 15677     -4.965800e+02 5.919000e+01\n11 15677     7.397998e+01 -1.678700e+02\n3 15678     -1.542100e+02 5.010999e+01\n5 15678     7.348101e+02 -2.119000e+01\n13 15678     4.507000e+02 2.871500e+02\n14 15678     6.309700e+02 -1.036600e+02\n3 15679     1.129800e+02 4.081000e+01\n8 15679     2.775500e+02 2.845900e+02\n3 15680     -1.313100e+02 3.521002e+01\n13 15680     4.730601e+02 2.767900e+02\n14 15680     6.585900e+02 -1.165400e+02\n3 15681     -8.965002e+01 3.441998e+01\n5 15681     8.178199e+02 -3.410999e+01\n6 15681     -5.346997e+01 7.262400e+02\n8 15681     1.294400e+02 2.904600e+02\n13 15681     5.161500e+02 2.794900e+02\n14 15681     7.113900e+02 -1.147400e+02\n3 15682     -3.546500e+02 2.781000e+01\n4 15682     6.277002e+01 -4.186300e+02\n5 15682     4.886100e+02 -5.338000e+01\n6 15682     -4.025100e+02 6.555200e+02\n8 15682     -1.035700e+02 2.804000e+02\n9 15682     -3.449400e+02 3.819100e+02\n11 15682     2.171900e+02 -1.833700e+02\n13 15682     2.547000e+02 2.512000e+02\n14 15682     3.928000e+02 -1.402000e+02\n3 15683     -1.102900e+02 2.621997e+01\n6 15683     -7.909000e+01 7.141700e+02\n8 15683     1.101500e+02 2.851100e+02\n9 15683     -1.229700e+02 3.900700e+02\n3 15684     4.841600e+02 2.544000e+01\n6 15684     5.789301e+02 5.224300e+02\n8 15684     5.863300e+02 2.527900e+02\n12 15684     6.579301e+02 5.355100e+02\n3 15685     -1.280029e+00 2.466998e+01\n6 15685     6.640002e+01 7.365300e+02\n9 15685     -2.608002e+01 3.907800e+02\n3 15686     -1.800000e+02 2.010999e+01\n9 15686     -1.867000e+02 3.806700e+02\n11 15686     4.085400e+02 -1.769200e+02\n3 15687     4.830000e+02 1.694000e+01\n8 15687     5.846500e+02 2.447900e+02\n3 15688     -9.226001e+01 9.960022e+00\n6 15688     -5.620001e+01 6.979400e+02\n3 15689     -2.178003e+01 3.219971e+00\n6 15689     3.828003e+01 7.042700e+02\n8 15689     1.897800e+02 2.665600e+02\n9 15689     -4.426001e+01 3.708000e+02\n3 15690     -6.373999e+01 -6.090027e+00\n9 15690     -8.134003e+01 3.609500e+02\n13 15690     5.398000e+02 2.477100e+02\n14 15690     7.425400e+02 -1.534900e+02\n3 15691     -2.687600e+02 -6.770020e+00\n8 15691     -2.875000e+01 2.553600e+02\n3 15692     -2.687600e+02 -6.770020e+00\n8 15692     -2.875000e+01 2.553600e+02\n3 15693     2.400400e+02 -4.560999e+01\n6 15693     3.019100e+02 5.142900e+02\n8 15693     3.800700e+02 2.064100e+02\n9 15693     1.825900e+02 3.302600e+02\n12 15693     4.019700e+02 5.087500e+02\n13 15693     7.413000e+02 1.038800e+02\n3 15694     2.467400e+02 -4.648999e+01\n6 15694     3.096200e+02 5.122200e+02\n9 15694     1.890699e+02 3.295500e+02\n12 15694     4.098101e+02 5.066000e+02\n3 15695     -6.183100e+02 -4.804999e+01\n8 15695     -3.254400e+02 2.109800e+02\n3 15696     -2.929900e+02 -5.892999e+01\n5 15696     5.460300e+02 -1.412800e+02\n6 15696     -3.196000e+02 5.571100e+02\n8 15696     -5.148999e+01 2.105700e+02\n12 15696     -1.541600e+02 5.360700e+02\n3 15697     -2.469300e+02 -7.988000e+01\n8 15697     -8.510010e+00 1.960800e+02\n9 15697     -2.421900e+02 2.899200e+02\n3 15698     2.863500e+02 -8.992999e+01\n7 15698     3.761200e+02 4.349900e+02\n9 15698     2.226700e+02 2.905300e+02\n12 15698     4.250800e+02 4.294200e+02\n13 15698     7.506300e+02 3.317999e+01\n3 15699     2.376600e+02 -9.897998e+01\n6 15699     2.956400e+02 4.517000e+02\n8 15699     3.766100e+02 1.609100e+02\n9 15699     1.814600e+02 2.825300e+02\n12 15699     3.969200e+02 4.480200e+02\n3 15700     -1.201900e+02 -1.010900e+02\n8 15700     1.015200e+02 1.803900e+02\n9 15700     -1.288900e+02 2.755300e+02\n3 15701     -2.264800e+02 -1.161200e+02\n6 15701     -2.274600e+02 5.145900e+02\n9 15701     -2.227000e+02 2.587000e+02\n3 15702     6.608600e+02 -1.320100e+02\n7 15702     7.146100e+02 2.883700e+02\n3 15703     -5.375300e+02 -1.368500e+02\n11 15703     3.428003e+01 -3.151000e+02\n3 15704     4.808700e+02 -1.372400e+02\n7 15704     5.435000e+02 3.359600e+02\n10 15704     7.262100e+02 3.803000e+02\n3 15705     5.572000e+02 -1.443200e+02\n7 15705     6.128900e+02 3.073000e+02\n10 15705     8.084700e+02 3.374100e+02\n3 15706     1.788000e+01 -1.518200e+02\n14 15706     5.843500e+02 -5.490000e+02\n3 15707     5.389600e+02 -1.614600e+02\n7 15707     5.931000e+02 2.967900e+02\n9 15707     4.428700e+02 2.285400e+02\n3 15708     1.939500e+02 -1.730800e+02\n8 15708     2.830900e+02 6.982001e+01\n3 15709     -3.141400e+02 -1.762200e+02\n7 15709     -1.040700e+02 4.864300e+02\n11 15709     2.570100e+02 -3.406600e+02\n13 15709     2.825500e+02 9.838000e+01\n3 15710     2.082400e+02 -1.949300e+02\n6 15710     1.508600e+02 1.369700e+02\n8 15710     2.926600e+02 4.976001e+01\n12 15710     1.781900e+02 1.856000e+02\n13 15710     5.301899e+02 -1.597100e+02\n3 15711     3.414500e+02 -1.966600e+02\n7 15711     4.094500e+02 3.189600e+02\n8 15711     4.505699e+02 6.891000e+01\n9 15711     2.696500e+02 1.964900e+02\n10 15711     5.669900e+02 3.754500e+02\n13 15711     7.819301e+02 -7.003003e+01\n3 15712     -4.473000e+02 -2.001500e+02\n6 15712     -4.975000e+02 3.660900e+02\n8 15712     -1.784900e+02 9.522000e+01\n3 15713     7.176600e+02 -2.051400e+02\n7 15713     7.495300e+02 2.020100e+02\n3 15714     -2.002200e+02 -2.244100e+02\n8 15714     2.126001e+01 7.562000e+01\n3 15715     -5.047998e+01 -2.430700e+02\n5 15715     5.603199e+02 -5.756300e+02\n7 15715     -1.503700e+02 1.873400e+02\n8 15715     6.678998e+01 1.737000e+01\n9 15715     -8.132001e+01 1.469700e+02\n15 15715     -1.040600e+02 2.476700e+02\n3 15716     5.470300e+02 -2.438400e+02\n7 15716     5.839500e+02 2.175400e+02\n3 15717     5.268900e+02 -2.492800e+02\n9 15717     4.296400e+02 1.512600e+02\n12 15717     6.717800e+02 2.104300e+02\n3 15718     -4.667999e+01 -2.509000e+02\n4 15718     -2.162900e+02 -3.745000e+02\n8 15718     6.903003e+01 1.017001e+01\n3 15719     -4.676001e+01 -2.775900e+02\n7 15719     -1.562700e+02 1.515500e+02\n13 15719     3.059900e+02 -1.853800e+02\n3 15720     2.825200e+02 -2.847500e+02\n10 15720     1.712200e+02 1.039400e+02\n13 15720     5.738500e+02 -2.488600e+02\n15 15720     2.770400e+02 9.626999e+01\n3 15721     -1.684500e+02 -2.863100e+02\n8 15721     -1.719000e+01 -7.410004e+00\n9 15721     -1.790100e+02 1.073800e+02\n3 15722     -5.456000e+01 -2.933600e+02\n12 15722     -1.270500e+02 8.853998e+01\n3 15723     -2.195300e+02 -2.938500e+02\n8 15723     -5.085999e+01 -7.750000e+00\n3 15724     2.262300e+02 -2.941600e+02\n4 15724     -3.304600e+02 -5.320300e+02\n3 15725     3.525300e+02 -2.962600e+02\n8 15725     4.229900e+02 -3.697000e+01\n3 15726     -1.752200e+02 -2.975400e+02\n5 15726     4.597600e+02 -5.650601e+02\n6 15726     -2.619600e+02 7.284003e+01\n8 15726     -2.559998e+01 -1.773001e+01\n10 15726     -2.162300e+02 2.531600e+02\n12 15726     -2.121900e+02 1.254500e+02\n3 15727     -9.584003e+01 -2.996900e+02\n9 15727     -1.187800e+02 9.654999e+01\n12 15727     -1.610400e+02 9.146002e+01\n3 15728     4.705200e+02 -3.005400e+02\n6 15728     5.257400e+02 1.574000e+02\n3 15729     7.349900e+02 -3.154300e+02\n7 15729     7.370400e+02 9.710001e+01\n9 15729     6.035601e+02 9.403000e+01\n3 15730     7.377500e+02 -3.188800e+02\n7 15730     7.388400e+02 9.370001e+01\n3 15731     2.384998e+01 -3.193700e+02\n7 15731     -1.149600e+02 9.248001e+01\n10 15731     -1.268400e+02 1.214400e+02\n13 15731     3.437100e+02 -2.379500e+02\n3 15732     7.447600e+02 -3.288100e+02\n7 15732     7.428800e+02 8.245001e+01\n9 15732     6.113000e+02 8.287000e+01\n3 15733     -6.127000e+02 -3.377100e+02\n9 15733     -6.444500e+02 1.684998e+01\n3 15734     -6.023999e+01 -3.418100e+02\n15 15734     -1.415000e+02 1.290800e+02\n3 15735     -5.702800e+02 -3.475700e+02\n9 15735     -6.018800e+02 1.182001e+01\n3 15736     2.854800e+02 -3.492700e+02\n7 15736     1.318500e+02 3.582001e+01\n3 15737     -6.023400e+02 -3.503000e+02\n9 15737     -6.316700e+02 7.070007e+00\n3 15738     -2.385999e+01 -3.542900e+02\n6 15738     -1.221700e+02 -4.163000e+01\n13 15738     3.073800e+02 -2.515200e+02\n3 15739     3.514001e+01 -3.562900e+02\n13 15739     3.462700e+02 -2.687100e+02\n15 15739     -6.885999e+01 6.617999e+01\n3 15740     3.587600e+02 -3.574800e+02\n7 15740     2.125100e+02 2.408002e+01\n15 15740     3.670900e+02 -1.121997e+01\n3 15741     7.386500e+02 -3.658800e+02\n7 15741     7.279399e+02 5.309998e+01\n3 15742     -3.669700e+02 -3.730100e+02\n6 15742     -4.154500e+02 1.267900e+02\n8 15742     -1.343500e+02 -4.937000e+01\n9 15742     -3.377900e+02 3.003998e+01\n13 15742     1.772400e+02 -9.482001e+01\n14 15742     2.935200e+02 -5.703000e+02\n3 15743     -6.004900e+02 -3.750700e+02\n9 15743     -6.278300e+02 -1.447998e+01\n3 15744     -6.089000e+02 -3.762300e+02\n9 15744     -6.358700e+02 -1.591998e+01\n3 15745     3.957001e+01 -3.862600e+02\n6 15745     -6.221002e+01 -8.959998e+01\n8 15745     1.282700e+02 -1.116200e+02\n10 15745     -1.332600e+02 4.638000e+01\n12 15745     -5.228998e+01 -3.525000e+01\n3 15746     3.928003e+01 -3.922400e+02\n4 15746     -3.253200e+02 -3.730600e+02\n6 15746     -6.229999e+01 -9.785999e+01\n8 15746     1.261300e+02 -1.166500e+02\n12 15746     -5.500000e+01 -4.337000e+01\n3 15747     4.022200e+02 -4.003300e+02\n8 15747     4.470800e+02 -1.367300e+02\n3 15748     4.487000e+02 -4.030500e+02\n6 15748     4.009900e+02 -9.387000e+01\n3 15749     -1.815500e+02 -4.235000e+02\n8 15749     -5.322998e+01 -1.299300e+02\n3 15750     9.622998e+01 -4.258800e+02\n6 15750     -7.580017e+00 -1.412800e+02\n13 15750     3.715100e+02 -3.400500e+02\n3 15751     7.027200e+02 -4.294100e+02\n7 15751     6.816899e+02 1.246997e+01\n3 15752     3.871000e+02 -4.379500e+02\n6 15752     3.087600e+02 -1.573500e+02\n7 15752     1.893600e+02 -7.464001e+01\n10 15752     2.010800e+02 -1.029200e+02\n15 15752     3.133300e+02 -1.477300e+02\n3 15753     6.877600e+02 -4.380800e+02\n7 15753     6.670400e+02 1.022998e+01\n12 15753     8.188199e+02 -1.846997e+01\n3 15754     3.758199e+02 -4.455500e+02\n6 15754     2.974700e+02 -1.657900e+02\n7 15754     1.772600e+02 -7.933002e+01\n9 15754     2.878000e+02 -2.160999e+01\n10 15754     1.874300e+02 -1.094200e+02\n3 15755     2.982200e+02 -4.474500e+02\n4 15755     -4.577900e+02 -5.299200e+02\n7 15755     9.700000e+01 -7.265997e+01\n8 15755     3.424400e+02 -1.771000e+02\n3 15756     -8.275000e+01 -4.537900e+02\n8 15756     2.022998e+01 -1.631800e+02\n3 15757     -1.473100e+02 -4.550699e+02\n6 15757     -2.546800e+02 -1.466500e+02\n9 15757     -1.596400e+02 -3.809998e+01\n12 15757     -2.385600e+02 -8.464001e+01\n3 15758     -6.842999e+01 -4.584200e+02\n8 15758     3.007001e+01 -1.680900e+02\n3 15759     3.377100e+02 -4.595601e+02\n4 15759     -4.832600e+02 -5.587900e+02\n3 15760     3.118500e+02 -4.614301e+02\n8 15760     3.515800e+02 -1.900600e+02\n3 15761     1.404900e+02 -4.703700e+02\n8 15761     2.019500e+02 -1.901700e+02\n3 15762     6.633002e+01 -4.910900e+02\n8 15762     1.374100e+02 -2.031500e+02\n3 15763     6.633002e+01 -4.910900e+02\n6 15763     -4.621997e+01 -2.152900e+02\n7 15763     -1.244800e+02 -8.157001e+01\n8 15763     1.374100e+02 -2.031500e+02\n12 15763     -4.894000e+01 -1.625000e+02\n13 15763     3.321300e+02 -3.873500e+02\n15 15763     -1.065100e+02 -1.192900e+02\n3 15764     6.190800e+02 -4.960601e+02\n12 15764     7.106700e+02 -8.802002e+01\n3 15765     3.090300e+02 -5.032900e+02\n7 15765     9.839001e+01 -1.206300e+02\n10 15765     9.259998e+01 -1.452900e+02\n3 15766     -3.845001e+01 -5.122800e+02\n6 15766     -1.499700e+02 -2.219399e+02\n12 15766     -1.470200e+02 -1.641700e+02\n3 15767     4.596002e+01 -5.147500e+02\n6 15767     -6.516998e+01 -2.326300e+02\n3 15768     -1.345300e+02 -5.174200e+02\n6 15768     -2.387600e+02 -2.028900e+02\n3 15769     2.982001e+01 -5.200500e+02\n8 15769     1.084000e+02 -2.229400e+02\n3 15770     -1.994000e+02 -5.249000e+02\n9 15770     -1.995200e+02 -9.694000e+01\n3 15771     1.142100e+02 -5.292100e+02\n8 15771     1.748500e+02 -2.384300e+02\n3 15772     -4.988600e+02 -5.368400e+02\n4 15772     -2.244000e+02 -1.835300e+02\n15 15772     -3.908800e+02 1.593300e+02\n3 15773     6.252200e+02 -5.512000e+02\n7 15773     5.245800e+02 -1.099100e+02\n9 15773     4.990400e+02 -1.029800e+02\n15 15773     8.506899e+02 -2.184100e+02\n3 15774     2.753003e+01 -5.664800e+02\n6 15774     -8.251001e+01 -2.740300e+02\n8 15774     1.064700e+02 -2.589400e+02\n9 15774     -9.330017e+00 -1.277400e+02\n3 15775     -1.599731e-01 -5.810800e+02\n6 15775     -1.086600e+02 -2.799800e+02\n7 15775     -1.647000e+02 -1.237900e+02\n8 15775     8.476001e+01 -2.679600e+02\n9 15775     -3.150000e+01 -1.373100e+02\n3 15776     -1.169500e+02 -5.837000e+02\n9 15776     -1.299100e+02 -1.435700e+02\n3 15777     -4.969971e+00 -5.880900e+02\n8 15777     8.153003e+01 -2.729400e+02\n9 15777     -3.578998e+01 -1.463900e+02\n12 15777     -1.068900e+02 -2.327900e+02\n3 15778     -1.154000e+02 -5.895400e+02\n6 15778     -2.178400e+02 -2.717600e+02\n3 15779     -4.436300e+02 -5.898000e+02\n7 15779     -3.887200e+02 1.835999e+01\n9 15779     -3.959200e+02 -1.534100e+02\n15 15779     -3.800800e+02 7.012000e+01\n3 15780     -1.191500e+02 -5.938400e+02\n9 15780     -1.309100e+02 -1.524300e+02\n3 15781     -4.528900e+02 -6.041899e+02\n4 15781     -2.693800e+02 -1.750700e+02\n8 15781     -2.337400e+02 -2.405800e+02\n9 15781     -4.034700e+02 -1.650400e+02\n13 15781     4.334003e+01 -2.984000e+02\n3 15782     1.444300e+02 -6.090400e+02\n9 15782     9.031000e+01 -1.601200e+02\n3 15783     -3.411200e+02 4.360200e+02\n4 15783     3.210300e+02 -5.131100e+02\n14 15783     4.558101e+02 2.902500e+02\n3 15784     -4.753000e+02 3.016800e+02\n4 15784     2.235100e+02 -3.759900e+02\n5 15784     3.866600e+02 2.196200e+02\n11 15784     1.207900e+02 3.567001e+01\n13 15784     1.640699e+02 4.740600e+02\n14 15784     2.864301e+02 1.215400e+02\n3 15785     -4.717800e+02 2.976600e+02\n11 15785     1.225000e+02 3.235001e+01\n13 15785     1.664900e+02 4.707300e+02\n14 15785     2.893600e+02 1.173900e+02\n3 15786     -7.410800e+02 2.738000e+02\n11 15786     -1.258500e+02 -1.859998e+01\n3 15787     -1.895900e+02 2.461200e+02\n13 15787     4.270000e+02 4.517400e+02\n14 15787     5.967000e+02 8.873001e+01\n3 15788     -2.238400e+02 2.105500e+02\n4 15788     1.649900e+02 -5.510800e+02\n5 15788     6.643400e+02 1.380100e+02\n8 15788     1.042999e+01 4.334200e+02\n3 15789     -1.625300e+02 2.110100e+02\n11 15789     4.314200e+02 -1.366998e+01\n14 15789     6.308500e+02 5.835999e+01\n3 15790     1.325100e+02 2.089000e+02\n6 15790     1.870400e+02 8.519400e+02\n9 15790     8.567999e+01 5.620000e+02\n3 15791     -7.566300e+02 1.947700e+02\n13 15791     -8.494000e+01 3.384900e+02\n14 15791     -9.659973e+00 -2.417999e+01\n3 15792     1.616500e+02 1.930600e+02\n9 15792     1.129800e+02 5.478800e+02\n11 15792     6.316899e+02 -1.153600e+02\n3 15793     4.018400e+02 1.812200e+02\n6 15793     4.981700e+02 7.311700e+02\n8 15793     5.218199e+02 3.955700e+02\n9 15793     3.289800e+02 5.389500e+02\n3 15794     -6.704300e+02 1.691300e+02\n14 15794     6.979999e+01 -3.865002e+01\n3 15795     -2.975300e+02 1.690700e+02\n13 15795     3.142000e+02 3.718100e+02\n3 15796     -1.012600e+02 1.529400e+02\n13 15796     5.146100e+02 3.824900e+02\n3 15797     -2.051500e+02 1.523800e+02\n4 15797     1.296800e+02 -5.582300e+02\n5 15797     6.797600e+02 8.131000e+01\n6 15797     -2.140600e+02 8.514600e+02\n8 15797     2.596002e+01 3.863800e+02\n11 15797     3.812200e+02 -6.917999e+01\n13 15797     4.057100e+02 3.682600e+02\n14 15797     5.738400e+02 -6.510010e+00\n3 15798     1.332500e+02 1.477600e+02\n6 15798     1.864700e+02 7.730700e+02\n9 15798     8.753998e+01 5.048200e+02\n11 15798     6.070699e+02 -1.522600e+02\n13 15798     6.731000e+02 2.971800e+02\n3 15799     -6.511600e+02 1.449200e+02\n8 15799     -3.603100e+02 3.638600e+02\n3 15800     1.653900e+02 1.390000e+02\n6 15800     2.247300e+02 7.569200e+02\n8 15800     3.238300e+02 3.670700e+02\n9 15800     1.164500e+02 4.966400e+02\n11 15800     6.329700e+02 -1.681200e+02\n3 15801     -2.238400e+02 1.345200e+02\n4 15801     1.188400e+02 -5.388300e+02\n5 15801     6.543500e+02 6.090002e+01\n6 15801     -2.385400e+02 8.222300e+02\n8 15801     9.239990e+00 3.708000e+02\n3 15802     -1.008100e+02 1.279100e+02\n6 15802     -6.363000e+01 8.472500e+02\n8 15802     1.236000e+02 3.689600e+02\n11 15802     5.084900e+02 -7.740997e+01\n3 15803     -7.080017e+00 1.156500e+02\n6 15803     6.113000e+01 8.533200e+02\n8 15803     2.049200e+02 3.603800e+02\n3 15804     1.937400e+02 1.120200e+02\n6 15804     2.571200e+02 7.156600e+02\n8 15804     3.465200e+02 3.429400e+02\n9 15804     1.416100e+02 4.720800e+02\n11 15804     6.552500e+02 -2.019200e+02\n3 15805     -3.029100e+02 1.047800e+02\n4 15805     1.030400e+02 -4.683400e+02\n5 15805     5.557200e+02 2.406000e+01\n6 15805     -3.418600e+02 7.632400e+02\n8 15805     -5.953003e+01 3.432300e+02\n11 15805     2.730100e+02 -1.182400e+02\n13 15805     3.069000e+02 3.177500e+02\n3 15806     -8.496002e+01 1.043300e+02\n6 15806     -4.808002e+01 8.200700e+02\n8 15806     1.333500e+02 3.504400e+02\n3 15807     1.188600e+02 9.717999e+01\n6 15807     1.669600e+02 7.102800e+02\n8 15807     2.835000e+02 3.329700e+02\n3 15808     -4.737800e+02 8.778998e+01\n4 15808     9.983002e+01 -3.414700e+02\n6 15808     -5.644400e+02 7.000600e+02\n8 15808     -2.078900e+02 3.230800e+02\n11 15808     9.676001e+01 -1.454800e+02\n3 15809     -9.794000e+01 8.735999e+01\n6 15809     -6.704999e+01 7.939800e+02\n3 15810     2.194700e+02 8.221002e+01\n6 15810     2.857700e+02 6.732300e+02\n8 15810     3.666900e+02 3.163100e+02\n9 15810     1.647300e+02 4.452800e+02\n3 15811     2.188300e+02 6.888000e+01\n8 15811     3.670700e+02 3.061100e+02\n9 15811     1.636300e+02 4.349500e+02\n3 15812     -7.000000e+00 4.927002e+01\n6 15812     5.846997e+01 7.670800e+02\n9 15812     -3.217999e+01 4.123900e+02\n13 15812     6.066000e+02 3.007800e+02\n14 15812     8.219000e+02 -9.122998e+01\n3 15813     -8.981000e+01 4.135999e+01\n5 15813     8.184600e+02 -2.559003e+01\n6 15813     -5.352002e+01 7.368800e+02\n8 15813     1.293200e+02 2.975800e+02\n9 15813     -1.062300e+02 4.037500e+02\n11 15813     5.149900e+02 -1.512100e+02\n13 15813     5.165699e+02 2.860600e+02\n3 15814     -5.827002e+01 3.425000e+01\n14 15814     7.517700e+02 -1.115900e+02\n3 15815     -8.165997e+01 2.791998e+01\n14 15815     7.210601e+02 -1.198200e+02\n3 15816     -4.690002e+01 2.588000e+01\n8 15816     1.654100e+02 2.850900e+02\n9 15816     -6.735999e+01 3.904400e+02\n13 15816     5.591300e+02 2.762500e+02\n3 15817     -2.110700e+02 2.206000e+01\n4 15817     5.063000e+01 -5.329600e+02\n6 15817     -2.149400e+02 6.810800e+02\n9 15817     -2.154000e+02 3.802300e+02\n3 15818     -1.055800e+02 1.417999e+01\n8 15818     1.156600e+02 2.750900e+02\n9 15818     -1.195600e+02 3.787800e+02\n13 15818     4.982500e+02 2.620700e+02\n3 15819     1.170800e+02 1.183002e+01\n6 15819     1.629700e+02 6.033200e+02\n12 15819     2.734600e+02 5.904900e+02\n13 15819     6.433000e+02 1.796100e+02\n14 15819     8.763000e+02 -2.407000e+02\n3 15820     -1.495200e+02 4.809998e+00\n4 15820     3.753998e+01 -5.854700e+02\n6 15820     -1.323700e+02 6.773800e+02\n9 15820     -1.590700e+02 3.688300e+02\n13 15820     4.524301e+02 2.504800e+02\n14 15820     6.339600e+02 -1.475800e+02\n3 15821     4.869700e+02 3.619995e+00\n8 15821     5.873000e+02 2.329900e+02\n3 15822     -2.940000e+02 -1.302002e+01\n4 15822     3.677002e+01 -4.603400e+02\n8 15822     -5.039001e+01 2.475100e+02\n13 15822     3.104000e+02 2.250700e+02\n3 15823     1.584400e+02 -2.040002e+01\n7 15823     3.048800e+02 5.584400e+02\n8 15823     3.139400e+02 2.307500e+02\n9 15823     1.113300e+02 3.520700e+02\n11 15823     6.221500e+02 -3.165800e+02\n12 15823     3.168700e+02 5.476200e+02\n13 15823     6.736500e+02 1.438000e+02\n3 15824     1.584400e+02 -2.040002e+01\n8 15824     3.139400e+02 2.307500e+02\n13 15824     6.736500e+02 1.438000e+02\n3 15825     3.723500e+02 -4.578003e+01\n7 15825     4.587700e+02 4.542400e+02\n9 15825     2.985100e+02 3.299200e+02\n3 15826     1.970000e+02 -4.707001e+01\n8 15826     3.421700e+02 2.080100e+02\n3 15827     -2.387400e+02 -4.929999e+01\n9 15827     -2.369700e+02 3.182100e+02\n13 15827     3.599301e+02 1.999800e+02\n14 15827     5.218199e+02 -2.059600e+02\n3 15828     2.405200e+02 -5.325000e+01\n6 15828     3.028500e+02 5.040600e+02\n8 15828     3.806800e+02 1.991800e+02\n9 15828     1.829900e+02 3.228500e+02\n12 15828     4.030200e+02 4.983800e+02\n3 15829     2.023900e+02 -5.650000e+01\n6 15829     2.575600e+02 5.069000e+02\n7 15829     3.394500e+02 5.118300e+02\n8 15829     3.491700e+02 1.986900e+02\n9 15829     1.500800e+02 3.196700e+02\n12 15829     3.613700e+02 4.998900e+02\n3 15830     -3.795001e+01 -6.932001e+01\n8 15830     1.739800e+02 2.063000e+02\n9 15830     -5.684003e+01 3.055100e+02\n3 15831     -4.619800e+02 -7.188000e+01\n5 15831     3.611000e+02 -1.505600e+02\n6 15831     -5.292500e+02 5.119300e+02\n3 15832     1.784800e+02 -9.113000e+01\n6 15832     2.280000e+02 4.711800e+02\n8 15832     3.283800e+02 1.702300e+02\n3 15833     1.784800e+02 -9.113000e+01\n8 15833     3.283800e+02 1.702300e+02\n3 15834     -4.940002e+01 -9.366998e+01\n7 15834     1.968500e+02 5.831300e+02\n8 15834     1.642600e+02 1.862800e+02\n13 15834     5.450000e+02 1.751700e+02\n14 15834     7.528500e+02 -2.422600e+02\n3 15835     -3.770001e+01 -9.320001e+01\n13 15835     5.546400e+02 1.731100e+02\n14 15835     7.650900e+02 -2.450600e+02\n3 15836     -1.330400e+02 -1.001000e+02\n6 15836     -1.079700e+02 5.526400e+02\n12 15836     5.458002e+01 5.199400e+02\n14 15836     6.464000e+02 -2.517200e+02\n3 15837     -5.076200e+02 -1.029400e+02\n13 15837     1.158300e+02 1.411600e+02\n3 15838     -3.862600e+02 -1.068100e+02\n8 15838     -1.296100e+02 1.700600e+02\n3 15839     -3.014800e+02 -1.257900e+02\n8 15839     -5.590002e+01 1.569100e+02\n14 15839     4.440500e+02 -2.825800e+02\n3 15840     4.777800e+02 -1.311800e+02\n6 15840     5.515800e+02 3.415600e+02\n7 15840     5.418300e+02 3.442300e+02\n8 15840     5.709600e+02 1.167200e+02\n10 15840     7.251899e+02 3.906500e+02\n12 15840     6.315000e+02 3.520100e+02\n3 15841     4.678500e+02 -1.361400e+02\n6 15841     5.406600e+02 3.364300e+02\n8 15841     5.620900e+02 1.118900e+02\n9 15841     3.814399e+02 2.499600e+02\n12 15841     6.206100e+02 3.464600e+02\n3 15842     8.496002e+01 -1.393500e+02\n6 15842     3.729999e+01 2.554400e+02\n7 15842     4.006000e+01 3.139300e+02\n8 15842     2.025300e+02 1.102300e+02\n13 15842     4.709900e+02 -5.940997e+01\n14 15842     6.707000e+02 -5.401899e+02\n3 15843     5.638101e+02 -1.390800e+02\n7 15843     6.191500e+02 3.105200e+02\n3 15844     1.769600e+02 -1.759600e+02\n4 15844     -2.349500e+02 -5.447700e+02\n3 15845     1.873999e+01 -1.879200e+02\n8 15845     1.279500e+02 6.248001e+01\n3 15846     -2.641998e+01 -1.951100e+02\n4 15846     -1.880800e+02 -4.060400e+02\n5 15846     6.019399e+02 -5.283400e+02\n6 15846     -1.098800e+02 1.509100e+02\n8 15846     9.167999e+01 5.872000e+01\n12 15846     -7.997998e+01 2.049500e+02\n13 15846     3.422300e+02 -1.173300e+02\n3 15847     6.910300e+02 -2.160800e+02\n7 15847     7.216500e+02 1.992500e+02\n9 15847     5.716300e+02 1.797300e+02\n3 15848     -9.640015e+00 -2.189700e+02\n4 15848     -2.084100e+02 -4.027000e+02\n8 15848     1.008400e+02 3.623999e+01\n3 15849     1.556800e+02 -2.192000e+02\n4 15849     -2.604800e+02 -5.033500e+02\n3 15850     1.411100e+02 -2.206300e+02\n13 15850     4.565699e+02 -1.785800e+02\n3 15851     1.389600e+02 -2.352200e+02\n6 15851     5.965997e+01 7.701001e+01\n3 15852     7.348800e+02 -2.347000e+02\n7 15852     7.582300e+02 1.687400e+02\n3 15853     5.237300e+02 -2.535600e+02\n9 15853     4.263800e+02 1.475600e+02\n12 15853     6.675699e+02 2.063800e+02\n3 15854     -6.241998e+01 -2.835100e+02\n6 15854     -1.576500e+02 4.500000e+01\n8 15854     5.383002e+01 -1.700000e+01\n9 15854     -8.996002e+01 1.117100e+02\n3 15855     5.046801e+02 -2.881000e+02\n6 15855     5.641801e+02 1.637200e+02\n9 15855     4.097400e+02 1.176700e+02\n12 15855     6.428500e+02 1.729400e+02\n3 15856     -1.721002e+01 -2.946600e+02\n4 15856     -2.511800e+02 -3.740200e+02\n8 15856     8.870001e+01 -2.923001e+01\n3 15857     5.543400e+02 -2.983100e+02\n9 15857     4.516600e+02 1.088000e+02\n12 15857     6.950500e+02 1.527900e+02\n3 15858     5.543400e+02 -2.983100e+02\n9 15858     4.516600e+02 1.088000e+02\n12 15858     6.950500e+02 1.527900e+02\n3 15859     1.874300e+02 -3.048900e+02\n8 15859     2.603200e+02 -4.764001e+01\n3 15860     -7.969971e+00 -3.096300e+02\n4 15860     -2.616300e+02 -3.731800e+02\n7 15860     -1.439100e+02 1.117900e+02\n10 15860     -1.558800e+02 1.476900e+02\n12 15860     -9.746997e+01 6.158002e+01\n3 15861     -2.432600e+02 -3.146800e+02\n8 15861     -7.573999e+01 -2.717999e+01\n9 15861     -2.426800e+02 8.078000e+01\n3 15862     7.463300e+02 -3.188900e+02\n7 15862     7.471899e+02 9.072000e+01\n9 15862     6.131801e+02 9.179001e+01\n3 15863     -7.959998e+01 -3.198600e+02\n4 15863     -2.443100e+02 -3.425600e+02\n9 15863     -1.042300e+02 7.944000e+01\n3 15864     -4.222998e+01 -3.281600e+02\n6 15864     -1.384200e+02 -1.008002e+01\n10 15864     -1.730500e+02 1.396400e+02\n12 15864     -1.187400e+02 4.639001e+01\n13 15864     2.993000e+02 -2.262400e+02\n15 15864     -1.258400e+02 1.340400e+02\n3 15865     7.322800e+02 -3.348600e+02\n7 15865     7.304000e+02 8.129001e+01\n9 15865     6.006200e+02 7.806000e+01\n3 15866     2.482300e+02 -3.589600e+02\n8 15866     3.117200e+02 -9.528003e+01\n3 15867     1.742999e+01 -3.898500e+02\n10 15867     -1.575500e+02 4.690002e+01\n3 15868     1.365400e+02 -3.934200e+02\n4 15868     -3.596900e+02 -4.312100e+02\n6 15868     4.009003e+01 -1.044100e+02\n8 15868     2.078000e+02 -1.230400e+02\n9 15868     8.232001e+01 1.965002e+01\n3 15869     1.699700e+02 -3.932200e+02\n4 15869     -3.721100e+02 -4.538000e+02\n6 15869     7.590997e+01 -1.065600e+02\n3 15870     1.414000e+02 -3.987300e+02\n7 15870     -3.603003e+01 -5.859985e+00\n3 15871     -5.959800e+02 -4.099900e+02\n9 15871     -6.189100e+02 -4.292999e+01\n3 15872     -5.736300e+02 -4.113500e+02\n9 15872     -5.962800e+02 -4.253003e+01\n3 15873     -5.736300e+02 -4.113500e+02\n9 15873     -5.962800e+02 -4.253003e+01\n3 15874     2.049000e+02 -4.275900e+02\n4 15874     -4.062200e+02 -4.671100e+02\n8 15874     2.636000e+02 -1.551600e+02\n12 15874     1.170300e+02 -9.881000e+01\n3 15875     -2.029700e+02 -4.362700e+02\n8 15875     -6.956000e+01 -1.404000e+02\n9 15875     -2.069300e+02 -2.306000e+01\n3 15876     -5.471997e+01 -4.433199e+02\n8 15876     4.456000e+01 -1.547500e+02\n3 15877     -2.318000e+02 -4.469301e+02\n8 15877     -8.009998e+01 -1.393500e+02\n3 15878     -9.950000e+01 -4.488700e+02\n6 15878     -2.106900e+02 -1.529200e+02\n8 15878     6.979980e+00 -1.574000e+02\n3 15879     -4.557200e+02 -4.583400e+02\n5 15879     2.576100e+02 -5.694301e+02\n9 15879     -4.107900e+02 -4.495001e+01\n10 15879     -3.263400e+02 2.583100e+02\n3 15880     -4.773000e+02 -4.649100e+02\n5 15880     2.360699e+02 -5.715200e+02\n7 15880     -3.611100e+02 1.588700e+02\n8 15880     -2.313400e+02 -1.237400e+02\n13 15880     7.132001e+01 -1.686800e+02\n3 15881     1.098000e+02 -4.690699e+02\n8 15881     1.760100e+02 -1.872000e+02\n3 15882     1.772100e+02 -4.740300e+02\n4 15882     -4.241600e+02 -4.216700e+02\n6 15882     6.878003e+01 -2.048300e+02\n10 15882     -5.846002e+01 -9.537000e+01\n15 15882     6.859985e+00 -1.393400e+02\n3 15883     -5.086000e+02 -5.168600e+02\n8 15883     -2.620900e+02 -1.659400e+02\n13 15883     3.473999e+01 -2.122500e+02\n3 15884     3.162600e+02 -5.556700e+02\n7 15884     1.093900e+02 -1.536800e+02\n3 15885     -4.646002e+01 -5.621100e+02\n8 15885     4.656000e+01 -2.503600e+02\n3 15886     1.800100e+02 -5.620800e+02\n6 15886     7.431000e+01 -2.784000e+02\n9 15886     1.201600e+02 -1.211400e+02\n10 15886     -4.615002e+01 -1.579000e+02\n12 15886     7.603998e+01 -2.338900e+02\n13 15886     4.163400e+02 -4.537700e+02\n15 15886     2.260999e+01 -2.140300e+02\n3 15887     -5.335999e+01 -5.746801e+02\n8 15887     4.103998e+01 -2.577800e+02\n3 15888     1.785600e+02 -6.023199e+02\n10 15888     -4.590002e+01 -1.879000e+02\n3 15889     2.601400e+02 -6.045400e+02\n6 15889     1.582000e+02 -3.156600e+02\n8 15889     2.997000e+02 -3.023200e+02\n3 15890     2.144600e+02 -6.047100e+02\n9 15890     1.495900e+02 -1.553300e+02\n3 15891     -1.065200e+02 -6.117800e+02\n8 15891     4.299988e+00 -2.821100e+02\n9 15891     -1.194400e+02 -1.663300e+02\n13 15891     2.193800e+02 -4.126500e+02\n3 15892     -3.490500e+02 4.231500e+02\n4 15892     3.120699e+02 -5.056400e+02\n5 15892     5.565800e+02 3.803900e+02\n14 15892     4.475200e+02 2.776000e+02\n3 15893     -3.575500e+02 4.123600e+02\n5 15893     5.480100e+02 3.715100e+02\n14 15893     4.395500e+02 2.696700e+02\n3 15894     -4.689400e+02 3.044900e+02\n5 15894     3.921700e+02 2.217600e+02\n11 15894     1.244300e+02 3.660999e+01\n13 15894     1.685000e+02 4.758600e+02\n14 15894     2.918700e+02 1.234000e+02\n3 15895     -4.340400e+02 3.021500e+02\n4 15895     2.219800e+02 -3.981700e+02\n5 15895     4.243600e+02 2.170800e+02\n11 15895     1.468700e+02 3.426001e+01\n13 15895     1.945200e+02 4.739400e+02\n14 15895     3.220300e+02 1.199700e+02\n3 15896     -5.304600e+02 2.910700e+02\n11 15896     6.382001e+01 1.757001e+01\n13 15896     1.121400e+02 4.551100e+02\n14 15896     2.261300e+02 1.015900e+02\n3 15897     -3.816600e+02 2.532800e+02\n11 15897     1.916400e+02 -5.450012e+00\n14 15897     3.724600e+02 7.146997e+01\n3 15898     -2.302000e+02 2.467700e+02\n11 15898     3.521100e+02 6.510010e+00\n13 15898     3.855100e+02 4.465400e+02\n14 15898     5.474700e+02 8.389001e+01\n3 15899     -2.442800e+02 2.449200e+02\n5 15899     6.413400e+02 1.733300e+02\n3 15900     1.297200e+02 2.316700e+02\n11 15900     6.072200e+02 -7.235999e+01\n3 15901     -4.105800e+02 2.069100e+02\n4 15901     1.637200e+02 -3.980900e+02\n6 15901     -4.975800e+02 8.704700e+02\n8 15901     -1.561800e+02 4.260000e+02\n11 15901     1.584500e+02 -4.673999e+01\n13 15901     2.086500e+02 3.896200e+02\n14 15901     3.381100e+02 2.389001e+01\n3 15902     1.255200e+02 1.832200e+02\n6 15902     1.785100e+02 8.211400e+02\n8 15902     2.907400e+02 4.071800e+02\n9 15902     7.946997e+01 5.373000e+02\n11 15902     6.015000e+02 -1.175300e+02\n13 15902     6.707800e+02 3.308700e+02\n3 15903     -7.784500e+02 1.604300e+02\n4 15903     1.414900e+02 -1.678900e+02\n5 15903     5.810999e+01 4.158002e+01\n8 15903     -4.662500e+02 3.695100e+02\n11 15903     -1.754700e+02 -1.150200e+02\n13 15903     -1.012900e+02 3.102700e+02\n14 15903     -3.053003e+01 -5.540997e+01\n3 15904     -7.130300e+02 1.446700e+02\n11 15904     -1.214400e+02 -1.222100e+02\n3 15905     3.085800e+02 1.443400e+02\n6 15905     3.819000e+02 7.024200e+02\n8 15905     4.376500e+02 3.654600e+02\n9 15905     2.442200e+02 5.039700e+02\n11 15905     7.090000e+02 -2.295200e+02\n3 15906     -3.046000e+02 1.208900e+02\n4 15906     1.123200e+02 -4.690699e+02\n6 15906     -3.458000e+02 7.812000e+02\n8 15906     -6.170001e+01 3.551500e+02\n11 15906     2.709500e+02 -1.061600e+02\n3 15907     2.381000e+02 1.151400e+02\n6 15907     3.111400e+02 7.128300e+02\n8 15907     3.841800e+02 3.447100e+02\n9 15907     1.815100e+02 4.758500e+02\n13 15907     7.627800e+02 2.473700e+02\n3 15908     -9.265002e+01 1.020600e+02\n5 15908     8.224200e+02 3.803998e+01\n6 15908     -5.990002e+01 8.140900e+02\n8 15908     1.257200e+02 3.478400e+02\n11 15908     5.129100e+02 -9.996002e+01\n13 15908     5.182200e+02 3.385300e+02\n3 15909     -2.838300e+02 6.938000e+01\n4 15909     8.307001e+01 -4.792200e+02\n5 15909     5.756899e+02 -8.150024e+00\n6 15909     -3.136400e+02 7.243100e+02\n8 15909     -4.300000e+01 3.147900e+02\n9 15909     -2.829500e+02 4.227800e+02\n11 15909     2.923600e+02 -1.448000e+02\n3 15910     -6.389800e+02 5.432001e+01\n5 15910     1.867700e+02 -4.309003e+01\n3 15911     2.182200e+02 3.307001e+01\n8 15911     3.646800e+02 2.747300e+02\n3 15912     1.270700e+02 2.646002e+01\n6 15912     1.741200e+02 6.202300e+02\n8 15912     2.889300e+02 2.717500e+02\n9 15912     8.276001e+01 3.933500e+02\n3 15913     1.270700e+02 2.646002e+01\n6 15913     1.741200e+02 6.202300e+02\n8 15913     2.889300e+02 2.717500e+02\n9 15913     8.276001e+01 3.933500e+02\n3 15914     3.503900e+02 -3.229980e+00\n8 15914     4.659700e+02 2.344200e+02\n3 15915     -5.547100e+02 -2.510999e+01\n14 15915     1.774301e+02 -2.000600e+02\n3 15916     4.874500e+02 -2.667999e+01\n7 15916     5.717600e+02 4.533200e+02\n8 15916     5.865601e+02 2.055900e+02\n3 15917     4.460999e+01 -4.032001e+01\n8 15917     2.333600e+02 2.251000e+02\n3 15918     2.287500e+02 -5.146997e+01\n6 15918     2.894500e+02 5.088600e+02\n7 15918     3.633199e+02 5.109000e+02\n8 15918     3.710400e+02 2.015900e+02\n9 15918     1.734800e+02 3.246200e+02\n12 15918     3.905900e+02 5.030400e+02\n13 15918     7.304800e+02 1.012800e+02\n3 15919     3.572200e+02 -7.617999e+01\n6 15919     4.193500e+02 4.256400e+02\n8 15919     4.706801e+02 1.701500e+02\n9 15919     2.861100e+02 3.030900e+02\n13 15919     8.159700e+02 2.664001e+01\n3 15920     3.080000e+02 -8.976001e+01\n6 15920     3.620400e+02 4.196900e+02\n12 15920     4.496600e+02 4.276900e+02\n3 15921     3.673800e+02 -1.149100e+02\n6 15921     4.266600e+02 3.790200e+02\n8 15921     4.774301e+02 1.358600e+02\n9 15921     2.936801e+02 2.684900e+02\n10 15921     6.123600e+02 4.573200e+02\n12 15921     5.107100e+02 3.873000e+02\n13 15921     8.187200e+02 -9.229980e+00\n3 15922     3.499800e+02 -1.219000e+02\n6 15922     4.056900e+02 3.748500e+02\n8 15922     4.623300e+02 1.314200e+02\n9 15922     2.782500e+02 2.624700e+02\n12 15922     4.908400e+02 3.832100e+02\n15 15922     7.905500e+02 5.182800e+02\n3 15923     3.499800e+02 -1.219000e+02\n6 15923     4.056900e+02 3.748500e+02\n8 15923     4.623300e+02 1.314200e+02\n12 15923     4.908400e+02 3.832100e+02\n15 15923     7.905500e+02 5.182800e+02\n3 15924     3.499800e+02 -1.219000e+02\n12 15924     4.908400e+02 3.832100e+02\n3 15925     -3.916600e+02 -1.522400e+02\n5 15925     4.313900e+02 -2.235600e+02\n8 15925     -1.324900e+02 1.351900e+02\n12 15925     -2.605200e+02 4.304000e+02\n13 15925     2.142400e+02 1.112900e+02\n14 15925     3.425699e+02 -3.088400e+02\n3 15926     4.677500e+02 -1.544600e+02\n12 15926     6.197000e+02 3.266800e+02\n3 15927     3.431400e+02 -1.578200e+02\n8 15927     4.549399e+02 9.842999e+01\n9 15927     2.722800e+02 2.280900e+02\n10 15927     5.775900e+02 4.174600e+02\n15 15927     7.735100e+02 4.724600e+02\n3 15928     3.431400e+02 -1.578200e+02\n6 15928     3.966500e+02 3.385300e+02\n8 15928     4.557800e+02 1.036800e+02\n9 15928     2.730400e+02 2.332300e+02\n10 15928     5.775900e+02 4.174600e+02\n12 15928     4.822800e+02 3.474400e+02\n15 15928     7.735100e+02 4.724600e+02\n3 15929     -3.922900e+02 -1.650100e+02\n8 15929     -1.324500e+02 1.246000e+02\n3 15930     -3.922900e+02 -1.650100e+02\n8 15930     -1.324500e+02 1.246000e+02\n12 15930     -2.596800e+02 4.170000e+02\n3 15931     -3.016600e+02 -1.689700e+02\n7 15931     -9.345001e+01 4.924500e+02\n8 15931     -5.689001e+01 1.227600e+02\n9 15931     -2.864200e+02 2.095400e+02\n12 15931     -1.531900e+02 4.250800e+02\n3 15932     -3.915900e+02 -1.764100e+02\n8 15932     -1.321200e+02 1.163400e+02\n12 15932     -2.586600e+02 4.076800e+02\n3 15933     -3.915900e+02 -1.764100e+02\n8 15933     -1.321200e+02 1.163400e+02\n12 15933     -2.586600e+02 4.076800e+02\n3 15934     -3.742200e+02 -1.785300e+02\n8 15934     -1.168700e+02 1.168300e+02\n3 15935     5.017600e+02 -2.182900e+02\n7 15935     5.495100e+02 2.532300e+02\n9 15935     4.094500e+02 1.780400e+02\n3 15936     7.155601e+02 -2.199000e+02\n7 15936     7.438199e+02 1.879700e+02\n3 15937     -9.448999e+01 -2.656200e+02\n5 15937     5.195000e+02 -5.798101e+02\n13 15937     2.809301e+02 -1.603900e+02\n3 15938     1.868400e+02 -2.722600e+02\n4 15938     -3.040400e+02 -5.056000e+02\n6 15938     1.082200e+02 3.437000e+01\n9 15938     1.243700e+02 1.240600e+02\n12 15938     1.244500e+02 8.434003e+01\n3 15939     -7.144000e+01 -2.943100e+02\n6 15939     -1.670700e+02 3.538000e+01\n8 15939     4.703998e+01 -2.567999e+01\n9 15939     -9.600000e+01 1.019200e+02\n3 15940     7.393000e+02 -3.216800e+02\n7 15940     7.397400e+02 9.048001e+01\n9 15940     6.071400e+02 8.879001e+01\n3 15941     2.490800e+02 -3.255500e+02\n10 15941     1.032500e+02 5.977002e+01\n3 15942     1.351000e+02 -3.287200e+02\n4 15942     -3.212000e+02 -4.510100e+02\n6 15942     4.477002e+01 -3.176001e+01\n12 15942     5.600000e+01 2.026001e+01\n3 15943     7.486000e+02 -3.497100e+02\n7 15943     7.412000e+02 6.398999e+01\n9 15943     6.126200e+02 6.551001e+01\n3 15944     7.031801e+02 -3.508300e+02\n7 15944     7.002500e+02 7.717999e+01\n9 15944     5.752200e+02 6.453998e+01\n3 15945     1.933002e+01 -3.581300e+02\n13 15945     3.346200e+02 -2.655600e+02\n3 15946     -2.092700e+02 -3.677800e+02\n6 15946     -3.063500e+02 -1.771002e+01\n3 15947     -5.865200e+02 -3.730800e+02\n9 15947     -6.144600e+02 -1.139001e+01\n3 15948     6.015002e+01 -3.837200e+02\n7 15948     -9.569000e+01 2.796002e+01\n13 15948     3.589399e+02 -2.952100e+02\n3 15949     3.102700e+02 -4.059800e+02\n7 15949     1.326200e+02 -2.654999e+01\n3 15950     -2.248300e+02 -4.079800e+02\n9 15950     -2.256400e+02 1.650024e+00\n3 15951     7.297400e+02 -4.113101e+02\n7 15951     7.089800e+02 1.841998e+01\n9 15951     5.938900e+02 1.370001e+01\n3 15952     7.286400e+02 -4.186500e+02\n7 15952     7.068600e+02 1.308002e+01\n3 15953     7.027000e+02 -4.362100e+02\n7 15953     6.806500e+02 6.799988e+00\n3 15954     -4.942900e+02 -4.570699e+02\n5 15954     2.275500e+02 -5.585000e+02\n7 15954     -3.699700e+02 1.689700e+02\n8 15954     -2.425400e+02 -1.169500e+02\n13 15954     6.316998e+01 -1.588300e+02\n15 15954     -3.264300e+02 2.788400e+02\n3 15955     -5.202002e+01 -4.588700e+02\n8 15955     4.354999e+01 -1.694600e+02\n3 15956     1.887600e+02 -4.651200e+02\n13 15956     4.306000e+02 -3.925300e+02\n3 15957     4.497998e+01 -5.079900e+02\n6 15957     -6.721997e+01 -2.269301e+02\n8 15957     1.206000e+02 -2.150800e+02\n12 15957     -6.834998e+01 -1.726900e+02\n3 15958     -4.248000e+02 -5.415900e+02\n7 15958     -3.523600e+02 6.701001e+01\n8 15958     -2.028900e+02 -1.900400e+02\n13 15958     8.234998e+01 -2.479200e+02\n3 15959     4.542999e+01 -5.851899e+02\n6 15959     -6.388000e+01 -2.910100e+02\n3 15960     4.542999e+01 -5.851899e+02\n6 15960     -6.388000e+01 -2.910100e+02\n3 15961     -2.141998e+01 -5.883101e+02\n6 15961     -1.297800e+02 -2.863400e+02\n3 15962     -5.695500e+02 3.849500e+02\n13 15962     9.734003e+01 5.525500e+02\n14 15962     2.104600e+02 2.105800e+02\n3 15963     -5.534400e+02 3.746200e+02\n13 15963     1.082200e+02 5.425500e+02\n3 15964     -4.002400e+02 3.736500e+02\n5 15964     4.791200e+02 3.039100e+02\n13 15964     2.379600e+02 5.504300e+02\n14 15964     3.735699e+02 2.050000e+02\n3 15965     -7.173200e+02 3.465300e+02\n14 15965     4.213000e+01 1.266300e+02\n3 15966     -3.174800e+02 3.233300e+02\n4 15966     2.412300e+02 -5.032000e+02\n13 15966     3.161700e+02 5.156500e+02\n3 15967     -4.027200e+02 3.100300e+02\n14 15967     3.609000e+02 1.335800e+02\n3 15968     -4.027200e+02 3.100300e+02\n14 15968     3.609000e+02 1.335800e+02\n3 15969     -4.325100e+02 2.879200e+02\n4 15969     2.114900e+02 -3.951500e+02\n11 15969     1.449600e+02 1.929999e+01\n3 15970     -4.109200e+02 2.661500e+02\n5 15970     4.412700e+02 1.733000e+02\n3 15971     -4.615300e+02 2.199700e+02\n4 15971     1.699301e+02 -3.612300e+02\n5 15971     3.801801e+02 1.224500e+02\n3 15972     1.712200e+02 1.899300e+02\n6 15972     2.353500e+02 8.218200e+02\n8 15972     3.296000e+02 4.123000e+02\n9 15972     1.205800e+02 5.450900e+02\n11 15972     6.387900e+02 -1.204000e+02\n13 15972     7.123900e+02 3.295700e+02\n3 15973     -3.782100e+02 1.722700e+02\n11 15973     1.931900e+02 -7.134003e+01\n13 15973     2.378900e+02 3.641300e+02\n14 15973     3.725900e+02 -6.590027e+00\n3 15974     -5.345000e+02 6.820001e+01\n4 15974     9.159998e+01 -3.001200e+02\n5 15974     2.941801e+02 -2.510999e+01\n8 15974     -2.593700e+02 3.061600e+02\n11 15974     3.828003e+01 -1.642600e+02\n3 15975     -9.919983e+00 4.047998e+01\n14 15975     8.172300e+02 -9.965002e+01\n3 15976     -3.212000e+02 -8.250000e+00\n5 15976     5.270601e+02 -8.490002e+01\n3 15977     1.371000e+02 -2.923999e+01\n6 15977     1.825800e+02 5.526400e+02\n12 15977     2.925699e+02 5.408900e+02\n3 15978     -4.079400e+02 -3.302002e+01\n6 15978     -4.654400e+02 5.710300e+02\n8 15978     -1.486600e+02 2.298500e+02\n9 15978     -3.890600e+02 3.258100e+02\n13 15978     2.039800e+02 2.003300e+02\n3 15979     3.132800e+02 -3.463000e+01\n8 15979     4.347200e+02 2.080700e+02\n3 15980     -1.865400e+02 -1.025900e+02\n8 15980     4.415997e+01 1.788200e+02\n3 15981     1.989301e+02 -1.042400e+02\n6 15981     2.505500e+02 4.522500e+02\n10 15981     5.002200e+02 5.725500e+02\n3 15982     -1.715800e+02 -1.108200e+02\n5 15982     6.965300e+02 -1.831900e+02\n3 15983     2.773400e+02 -1.459700e+02\n7 15983     3.610100e+02 3.810900e+02\n8 15983     3.999000e+02 1.159000e+02\n9 15983     2.153800e+02 2.401200e+02\n3 15984     3.358400e+02 -1.530300e+02\n6 15984     3.857600e+02 3.415300e+02\n7 15984     4.103800e+02 3.591400e+02\n8 15984     4.492400e+02 1.065000e+02\n9 15984     2.648400e+02 2.343100e+02\n10 15984     5.702600e+02 4.252900e+02\n12 15984     4.727200e+02 3.510000e+02\n13 15984     7.838000e+02 -3.304999e+01\n3 15985     5.955500e+02 -1.640600e+02\n7 15985     6.453900e+02 2.768200e+02\n3 15986     7.169700e+02 -1.838900e+02\n7 15986     7.541300e+02 2.213300e+02\n3 15987     3.468500e+02 -1.859800e+02\n8 15987     4.561000e+02 7.701999e+01\n3 15988     7.109500e+02 -2.052500e+02\n7 15988     7.434000e+02 2.038400e+02\n3 15989     -5.784998e+01 -2.285800e+02\n5 15989     5.610000e+02 -5.556000e+02\n3 15990     1.352500e+02 -2.413100e+02\n12 15990     7.740997e+01 1.208500e+02\n15 15990     8.321997e+01 1.745700e+02\n3 15991     1.446900e+02 -2.524500e+02\n7 15991     9.500122e-01 1.357900e+02\n10 15991     5.719971e+00 1.571900e+02\n13 15991     4.500800e+02 -2.074800e+02\n15 15991     7.948999e+01 1.589400e+02\n3 15992     6.944700e+02 -2.556500e+02\n7 15992     7.141100e+02 1.629100e+02\n9 15992     5.722800e+02 1.459600e+02\n3 15993     -6.425000e+01 -2.685400e+02\n5 15993     5.408400e+02 -5.975500e+02\n6 15993     -1.587500e+02 6.437000e+01\n7 15993     -1.654700e+02 1.666200e+02\n8 15993     5.348999e+01 -2.940002e+00\n13 15993     2.962500e+02 -1.713600e+02\n3 15994     9.971002e+01 -2.754300e+02\n10 15994     -4.796997e+01 1.443400e+02\n3 15995     1.628400e+02 -2.764700e+02\n4 15995     -2.991700e+02 -4.861400e+02\n7 15995     1.104999e+01 1.096900e+02\n10 15995     1.496002e+01 1.262000e+02\n13 15995     4.593800e+02 -2.308100e+02\n3 15996     1.541998e+01 -2.902700e+02\n6 15996     -7.950000e+01 2.171002e+01\n12 15996     -6.369000e+01 7.731000e+01\n13 15996     3.428199e+02 -2.117200e+02\n3 15997     2.454500e+02 -3.113900e+02\n6 15997     1.713000e+02 -9.739990e+00\n10 15997     1.033500e+02 7.434998e+01\n13 15997     5.258600e+02 -2.713800e+02\n15 15997     1.957600e+02 6.060999e+01\n3 15998     -2.240002e+01 -3.212700e+02\n4 15998     -2.635800e+02 -3.652800e+02\n7 15998     -1.473100e+02 1.034000e+02\n9 15998     -5.550000e+01 7.900000e+01\n10 15998     -1.591600e+02 1.379300e+02\n15 15998     -1.102000e+02 1.336200e+02\n3 15999     -2.166600e+02 -3.870900e+02\n8 15999     -7.265997e+01 -9.490002e+01\n3 16000     -5.820000e+02 -3.915200e+02\n9 16000     -6.077200e+02 -2.703003e+01\n3 16001     -2.064100e+02 -4.140000e+02\n9 16001     -2.102300e+02 -4.109985e+00\n3 16002     7.384900e+02 -4.197600e+02\n7 16002     7.161700e+02 8.719971e+00\n3 16003     7.384900e+02 -4.197600e+02\n7 16003     7.161700e+02 8.719971e+00\n3 16004     -4.483100e+02 -4.310000e+02\n7 16004     -3.252200e+02 1.934600e+02\n13 16004     1.013000e+02 -1.413400e+02\n3 16005     -1.127800e+02 -4.378199e+02\n6 16005     -2.235700e+02 -1.362400e+02\n7 16005     -2.449700e+02 6.650024e+00\n10 16005     -2.767300e+02 3.871002e+01\n12 16005     -2.123700e+02 -7.521002e+01\n15 16005     -2.460700e+02 1.535999e+01\n3 16006     -3.488000e+01 -4.591600e+02\n8 16006     5.720001e+01 -1.705200e+02\n3 16007     2.481100e+02 -4.605000e+02\n8 16007     2.966700e+02 -1.869100e+02\n3 16008     3.015002e+01 -4.673199e+02\n8 16008     1.095400e+02 -1.814700e+02\n3 16009     2.258800e+02 -5.447200e+02\n6 16009     1.207700e+02 -2.660400e+02\n8 16009     2.721700e+02 -2.536700e+02\n3 16010     -4.374100e+02 -5.513101e+02\n7 16010     -3.675100e+02 5.825000e+01\n13 16010     6.953003e+01 -2.542000e+02\n15 16010     -3.447400e+02 1.237100e+02\n3 16011     2.360999e+01 -5.795500e+02\n6 16011     -8.407001e+01 -2.860900e+02\n7 16011     -1.465700e+02 -1.303800e+02\n15 16011     -1.299500e+02 -1.735600e+02\n3 16012     -3.951900e+02 3.186100e+02\n11 16012     1.965200e+02 5.801999e+01\n13 16012     2.370400e+02 4.983900e+02\n14 16012     3.723000e+02 1.463200e+02\n3 16013     -3.584300e+02 3.089500e+02\n4 16013     2.296600e+02 -4.598199e+02\n13 16013     2.694800e+02 4.933700e+02\n14 16013     4.099500e+02 1.398600e+02\n3 16014     -6.614500e+02 2.008800e+02\n4 16014     1.606100e+02 -2.341300e+02\n5 16014     1.719500e+02 8.715002e+01\n13 16014     -1.007001e+01 3.538600e+02\n14 16014     7.932001e+01 -9.489990e+00\n3 16015     3.675900e+02 1.879500e+02\n6 16015     4.578600e+02 7.467700e+02\n3 16016     -2.194000e+02 1.812300e+02\n4 16016     1.506500e+02 -5.512500e+02\n13 16016     3.935500e+02 3.927900e+02\n14 16016     5.581899e+02 2.201001e+01\n3 16017     4.137300e+02 1.544900e+02\n8 16017     5.316700e+02 3.716000e+02\n3 16018     -4.223800e+02 1.294000e+02\n8 16018     -1.642700e+02 3.568200e+02\n3 16019     1.196700e+02 1.283900e+02\n6 16019     1.692200e+02 7.492600e+02\n8 16019     2.845100e+02 3.596000e+02\n9 16019     7.458002e+01 4.862500e+02\n13 16019     6.585601e+02 2.820000e+02\n3 16020     -8.584003e+01 8.648999e+01\n6 16020     -4.896997e+01 7.932900e+02\n13 16020     5.252600e+02 3.238200e+02\n3 16021     -1.307200e+02 2.459998e+01\n13 16021     4.728000e+02 2.687000e+02\n14 16021     6.595500e+02 -1.261600e+02\n3 16022     4.250400e+02 -5.057001e+01\n7 16022     5.071600e+02 4.365600e+02\n12 16022     5.805100e+02 4.529700e+02\n3 16023     -3.669600e+02 -1.210000e+02\n12 16023     -2.322500e+02 4.671500e+02\n3 16024     -3.712300e+02 -1.339500e+02\n8 16024     -1.145400e+02 1.484400e+02\n3 16025     7.114001e+01 -2.063800e+02\n8 16025     1.681500e+02 4.276999e+01\n3 16026     7.338400e+02 -2.114900e+02\n7 16026     7.641801e+02 1.896800e+02\n3 16027     5.464001e+01 -2.148400e+02\n4 16027     -2.259200e+02 -4.374200e+02\n6 16027     -3.103003e+01 1.100200e+02\n12 16027     -9.409973e+00 1.636300e+02\n3 16028     1.820300e+02 -2.163800e+02\n10 16028     6.789001e+01 1.974100e+02\n15 16028     1.538101e+02 2.060200e+02\n3 16029     3.661700e+02 -2.163100e+02\n9 16029     2.912300e+02 1.804200e+02\n10 16029     5.867100e+02 3.433900e+02\n13 16029     8.014800e+02 -9.373999e+01\n3 16030     5.510999e+01 -2.349600e+02\n4 16030     -2.386300e+02 -4.304900e+02\n6 16030     -3.108002e+01 8.535999e+01\n7 16030     -7.063000e+01 1.681400e+02\n9 16030     1.410999e+01 1.553200e+02\n13 16030     3.855500e+02 -1.758700e+02\n3 16031     5.510999e+01 -2.349600e+02\n4 16031     -2.386300e+02 -4.304900e+02\n7 16031     -7.063000e+01 1.681400e+02\n3 16032     -5.712000e+01 -2.451400e+02\n5 16032     5.551700e+02 -5.758500e+02\n8 16032     6.128003e+01 1.554001e+01\n13 16032     3.071500e+02 -1.555500e+02\n3 16033     -1.213400e+02 -2.926700e+02\n8 16033     1.152002e+01 -1.891000e+01\n3 16034     -6.808002e+01 -3.065500e+02\n6 16034     -1.630800e+02 1.901001e+01\n8 16034     4.963000e+01 -3.670001e+01\n12 16034     -1.392300e+02 7.514001e+01\n3 16035     2.553500e+02 -3.397200e+02\n7 16035     9.594000e+01 4.428998e+01\n15 16035     2.018199e+02 2.587000e+01\n3 16036     -5.802600e+02 -3.569100e+02\n9 16036     -6.097100e+02 1.989990e+00\n3 16037     1.347500e+02 -4.022900e+02\n6 16037     3.953003e+01 -1.158100e+02\n10 16037     -5.685999e+01 -4.080017e+00\n12 16037     4.513000e+01 -6.546997e+01\n3 16038     -1.634998e+01 -4.614800e+02\n7 16038     -1.834200e+02 -4.033002e+01\n8 16038     7.221002e+01 -1.737400e+02\n10 16038     -2.155400e+02 -2.371002e+01\n12 16038     -1.281700e+02 -1.202000e+02\n15 16038     -1.757400e+02 -5.696002e+01\n3 16039     6.245001e+01 -4.698400e+02\n8 16039     1.355600e+02 -1.854200e+02\n3 16040     7.604999e+01 -4.704900e+02\n8 16040     1.461400e+02 -1.868300e+02\n3 16041     1.325100e+02 -5.554500e+02\n6 16041     2.134998e+01 -2.744600e+02\n7 16041     -7.128003e+01 -1.371600e+02\n8 16041     1.909500e+02 -2.577200e+02\n12 16041     1.958002e+01 -2.265400e+02\n13 16041     3.745699e+02 -4.424800e+02\n3 16042     -1.492100e+02 -5.647900e+02\n6 16042     -2.506500e+02 -2.389200e+02\n3 16043     -4.514500e+02 -5.790400e+02\n9 16043     -4.026800e+02 -1.447000e+02\n3 16044     -4.562300e+02 -5.895100e+02\n7 16044     -3.943200e+02 2.082001e+01\n9 16044     -4.060700e+02 -1.529300e+02\n13 16044     4.602002e+01 -2.848800e+02\n3 16045     -2.624800e+02 2.426200e+02\n11 16045     3.199500e+02 3.119995e+00\n13 16045     3.528400e+02 4.391300e+02\n3 16046     -4.083700e+02 2.210100e+02\n4 16046     1.706300e+02 -4.004700e+02\n8 16046     -1.562800e+02 4.330100e+02\n11 16046     1.595100e+02 -3.745001e+01\n3 16047     -6.899500e+02 2.002400e+02\n4 16047     1.604800e+02 -2.173900e+02\n5 16047     1.424600e+02 8.532001e+01\n13 16047     -3.259003e+01 3.499500e+02\n14 16047     5.154999e+01 -1.228998e+01\n3 16048     -7.845700e+02 1.957300e+02\n4 16048     1.583600e+02 -1.670600e+02\n5 16048     5.492999e+01 7.294000e+01\n13 16048     -1.056700e+02 3.359400e+02\n3 16049     -3.559998e+00 9.032001e+01\n9 16049     -2.817999e+01 4.510000e+02\n14 16049     8.326500e+02 -4.748999e+01\n3 16050     5.223700e+02 -9.884003e+01\n7 16050     5.882200e+02 3.609100e+02\n9 16050     4.280699e+02 2.851000e+02\n10 16050     7.825800e+02 4.060500e+02\n3 16051     -5.697998e+01 -2.051000e+02\n5 16051     5.723500e+02 -5.256600e+02\n13 16051     3.200200e+02 -1.159200e+02\n3 16052     -1.104000e+02 -2.721200e+02\n8 16052     2.054999e+01 -3.369995e+00\n3 16053     -6.302600e+02 -3.918400e+02\n9 16053     -6.544300e+02 -3.290002e+01\n3 16054     -5.743000e+02 -4.835300e+02\n9 16054     -5.885300e+02 -1.048700e+02\n3 16055     -1.123400e+02 -5.456000e+02\n9 16055     -1.270700e+02 -1.127800e+02\n3 16056     2.403003e+01 -5.698700e+02\n7 16056     -1.481700e+02 -1.243300e+02\n10 16056     -1.795800e+02 -1.187400e+02\n15 16056     -1.317000e+02 -1.672100e+02\n3 16057     3.194700e+02 1.365500e+02\n8 16057     4.464700e+02 3.565400e+02\n9 16057     2.526600e+02 4.969200e+02\n3 16058     -2.168800e+02 1.070200e+02\n4 16058     9.906000e+01 -5.413800e+02\n6 16058     -2.228200e+02 7.744400e+02\n8 16058     1.877002e+01 3.393700e+02\n13 16058     3.919100e+02 3.289300e+02\n3 16059     -5.567999e+01 6.369995e+00\n6 16059     -7.659973e+00 7.020400e+02\n8 16059     1.588700e+02 2.698000e+02\n9 16059     -7.490997e+01 3.733800e+02\n13 16059     5.488600e+02 2.597700e+02\n14 16059     7.528800e+02 -1.395600e+02\n3 16060     -3.954100e+02 8.099976e-01\n4 16060     5.108002e+01 -3.845700e+02\n6 16060     -4.542900e+02 6.131800e+02\n11 16060     1.710700e+02 -2.074500e+02\n12 16060     -2.807900e+02 5.898200e+02\n3 16061     -9.557001e+01 -6.416998e+01\n11 16061     5.054900e+02 -2.393000e+02\n3 16062     -3.093400e+02 -1.237000e+02\n4 16062     -1.996997e+01 -4.348400e+02\n8 16062     -6.285999e+01 1.600500e+02\n13 16062     2.894500e+02 1.369800e+02\n3 16063     -2.960600e+02 -1.608800e+02\n13 16063     2.987500e+02 1.080400e+02\n14 16063     4.471700e+02 -3.164000e+02\n3 16064     1.022100e+02 -2.364200e+02\n4 16064     -2.551500e+02 -4.581899e+02\n6 16064     1.737000e+01 7.657001e+01\n8 16064     1.917500e+02 1.475000e+01\n12 16064     3.390002e+01 1.299600e+02\n15 16064     3.635999e+01 1.934600e+02\n3 16065     1.220900e+02 -4.786000e+02\n15 16065     -5.860999e+01 -1.268700e+02\n3 16066     -3.132000e+02 2.658400e+02\n13 16066     3.031200e+02 4.527000e+02\n14 16066     4.498101e+02 9.320001e+01\n3 16067     -1.107900e+02 1.696997e+01\n11 16067     4.863199e+02 -1.737700e+02\n3 16068     2.131100e+02 -2.374100e+02\n6 16068     1.420700e+02 7.963000e+01\n8 16068     2.877800e+02 1.113000e+01\n12 16068     1.628100e+02 1.267600e+02\n3 16069     6.440002e+00 -3.142900e+02\n7 16069     -1.260900e+02 1.020300e+02\n3 16070     -6.251400e+02 -3.467200e+02\n9 16070     -6.566400e+02 7.609985e+00\n3 16071     7.064001e+01 -3.930300e+02\n7 16071     -9.669000e+01 1.427002e+01\n3 16072     7.327500e+02 -3.999500e+02\n7 16072     7.146899e+02 2.878998e+01\n3 16073     3.347200e+02 -5.010000e+02\n8 16073     3.725700e+02 -2.224200e+02\n3 16074     3.347200e+02 -5.010000e+02\n6 16074     2.489500e+02 -2.195601e+02\n8 16074     3.725700e+02 -2.224200e+02\n3 16075     -1.470900e+02 -5.677000e+02\n4 16075     -3.501200e+02 -2.608000e+02\n8 16075     -2.490002e+01 -2.453900e+02\n9 16075     -1.535800e+02 -1.320200e+02\n3 16076     -3.339300e+02 2.355900e+02\n4 16076     1.794600e+02 -4.593000e+02\n13 16076     2.830500e+02 4.250900e+02\n14 16076     4.261700e+02 6.410999e+01\n3 16077     -6.091100e+02 -3.819300e+02\n9 16077     -6.352800e+02 -2.034003e+01\n3 16078     -1.990000e+02 4.556000e+01\n4 16078     6.338000e+01 -5.461300e+02\n5 16078     6.771700e+02 -2.888000e+01\n6 16078     -2.012500e+02 7.129300e+02\n8 16078     3.227002e+01 2.979100e+02\n13 16078     4.065400e+02 2.801900e+02\n3 16079     -4.919983e+00 -2.764600e+02\n6 16079     -1.018100e+02 5.303003e+01\n7 16079     -1.287000e+02 1.501700e+02\n8 16079     9.648999e+01 -8.029999e+00\n12 16079     -8.314001e+01 1.092900e+02\n13 16079     3.327000e+02 -1.903200e+02\n3 16080     -3.745100e+02 1.798300e+02\n11 16080     1.953300e+02 -6.933002e+01\n13 16080     2.346100e+02 3.747600e+02\n14 16080     3.709000e+02 4.609985e+00\n3 16081     -6.375900e+02 1.320000e+02\n8 16081     -3.474800e+02 3.540400e+02\n3 16082     -2.707300e+02 3.589001e+01\n4 16082     6.427002e+01 -4.895500e+02\n3 16083     -5.355800e+02 1.742700e+02\n11 16083     4.167999e+01 -7.515002e+01\n4 16084     6.844000e+01 3.584500e+02\n5 16084     -6.110700e+02 -3.201400e+02\n4 16085     -1.616900e+02 3.554600e+02\n13 16085     -5.394600e+02 -3.663900e+02\n4 16086     2.594000e+01 9.113000e+01\n11 16086     -5.175800e+02 -3.112600e+02\n13 16086     -5.301400e+02 7.092999e+01\n14 16086     -5.659600e+02 -3.136100e+02\n4 16087     2.702002e+01 8.595999e+01\n11 16087     -5.081700e+02 -3.101000e+02\n13 16087     -5.214900e+02 7.402002e+01\n14 16087     -5.550800e+02 -3.103500e+02\n4 16088     7.702002e+01 6.954999e+01\n13 16088     -5.183300e+02 1.651300e+02\n14 16088     -5.381900e+02 -2.007400e+02\n4 16089     2.067500e+02 5.623999e+01\n5 16089     -4.394800e+02 1.593000e+02\n13 16089     -5.253000e+02 3.863900e+02\n4 16090     1.849399e+02 3.525000e+01\n5 16090     -3.788500e+02 1.107900e+02\n14 16090     -4.568300e+02 7.679993e+00\n4 16091     4.003003e+01 3.382001e+01\n5 16091     -3.562200e+02 -1.742000e+02\n4 16092     2.161500e+02 2.640002e+01\n5 16092     -3.687700e+02 1.775100e+02\n13 16092     -4.670500e+02 4.050100e+02\n14 16092     -4.472500e+02 7.275000e+01\n4 16093     1.546300e+02 2.437000e+01\n5 16093     -3.429800e+02 4.959998e+01\n13 16093     -4.342200e+02 2.966900e+02\n4 16094     2.008600e+02 2.057001e+01\n5 16094     -3.358600e+02 1.379900e+02\n4 16095     1.829200e+02 1.910999e+01\n5 16095     -3.312800e+02 1.047000e+02\n4 16096     1.262100e+02 1.692999e+01\n5 16096     -3.186300e+02 -7.070007e+00\n13 16096     -4.090400e+02 2.499900e+02\n14 16096     -3.981500e+02 -1.082700e+02\n4 16097     2.835000e+02 1.533002e+01\n5 16097     -3.773300e+02 3.183500e+02\n4 16098     -5.919983e+00 1.000000e+01\n13 16098     -3.558800e+02 3.723999e+01\n14 16098     -3.598700e+02 -3.677900e+02\n4 16099     8.451001e+01 5.609985e+00\n5 16099     -2.811900e+02 -8.877002e+01\n4 16100     2.451700e+02 -2.880005e+00\n14 16100     -3.961900e+02 1.312600e+02\n4 16101     2.451700e+02 -2.880005e+00\n11 16101     -4.019600e+02 3.859000e+01\n14 16101     -3.961900e+02 1.312600e+02\n4 16102     2.360400e+02 -5.429993e+00\n11 16102     -3.957800e+02 4.145001e+01\n13 16102     -4.202600e+02 4.462700e+02\n4 16103     2.405100e+02 -8.679993e+00\n5 16103     -3.046700e+02 2.289500e+02\n13 16103     -4.158300e+02 4.525300e+02\n14 16103     -3.834100e+02 1.231300e+02\n4 16104     2.537900e+02 -8.989990e+00\n5 16104     -3.085300e+02 2.554600e+02\n11 16104     -3.921900e+02 5.250000e+01\n13 16104     -4.212700e+02 4.758700e+02\n14 16104     -3.868700e+02 1.492200e+02\n4 16105     1.535200e+02 -1.069000e+01\n5 16105     -2.454000e+02 4.085999e+01\n13 16105     -3.537200e+02 2.946500e+02\n14 16105     -3.283300e+02 -6.020001e+01\n4 16106     1.535200e+02 -1.069000e+01\n5 16106     -2.454000e+02 4.085999e+01\n13 16106     -3.537200e+02 2.946500e+02\n14 16106     -3.283300e+02 -6.020001e+01\n4 16107     6.771997e+01 -1.346002e+01\n5 16107     -2.262600e+02 -1.252600e+02\n4 16108     1.442300e+02 -1.341998e+01\n5 16108     -2.364300e+02 2.272998e+01\n4 16109     2.969301e+02 -2.207001e+01\n5 16109     -2.960500e+02 3.426200e+02\n11 16109     -3.702000e+02 1.193900e+02\n4 16110     -1.535999e+01 -2.390002e+01\n13 16110     -2.804500e+02 2.747998e+01\n14 16110     -2.690300e+02 -3.851000e+02\n4 16111     1.668300e+02 -2.932001e+01\n5 16111     -1.991200e+02 6.371002e+01\n13 16111     -3.164600e+02 3.157300e+02\n14 16111     -2.826000e+02 -3.794000e+01\n4 16112     2.565100e+02 -3.012000e+01\n5 16112     -2.601500e+02 2.595900e+02\n13 16112     -3.804300e+02 4.819500e+02\n14 16112     -3.400100e+02 1.533600e+02\n4 16113     2.368600e+02 -3.087000e+01\n11 16113     -3.429000e+02 1.871002e+01\n4 16114     7.602002e+01 -3.228003e+01\n11 16114     -3.805500e+02 -2.388600e+02\n4 16115     2.553000e+02 -3.460999e+01\n5 16115     -2.505200e+02 2.569300e+02\n13 16115     -3.719400e+02 4.803000e+02\n14 16115     -3.304300e+02 1.511800e+02\n4 16116     1.080017e+00 -3.557001e+01\n5 16116     -1.669200e+02 -2.528300e+02\n11 16116     -3.549900e+02 -3.531300e+02\n4 16117     2.571801e+02 -3.707001e+01\n5 16117     -2.468800e+02 2.613800e+02\n11 16117     -3.565100e+02 5.767001e+01\n4 16118     -2.895001e+01 -3.865997e+01\n5 16118     -1.570800e+02 -3.101700e+02\n7 16118     -7.712200e+02 3.413400e+02\n11 16118     -3.449000e+02 -3.998200e+02\n4 16119     1.383300e+02 -3.891998e+01\n5 16119     -1.786900e+02 1.192999e+01\n14 16119     -2.633000e+02 -8.722998e+01\n4 16120     1.671100e+02 -4.142999e+01\n5 16120     -1.765200e+02 6.653003e+01\n4 16121     2.498199e+02 -4.353998e+01\n5 16121     -2.313700e+02 2.320000e+02\n13 16121     -3.535300e+02 4.598100e+02\n4 16122     -4.848999e+01 -4.516998e+01\n11 16122     -3.304200e+02 -4.298900e+02\n14 16122     -2.224500e+02 -4.429301e+02\n15 16122     -7.987600e+02 4.925200e+02\n4 16123     1.816600e+02 -4.540997e+01\n13 16123     -3.009300e+02 3.452500e+02\n14 16123     -2.618600e+02 -4.859985e+00\n4 16124     2.890900e+02 -4.609003e+01\n5 16124     -2.331400e+02 3.219900e+02\n13 16124     -3.626400e+02 5.381700e+02\n14 16124     -3.137900e+02 2.139900e+02\n4 16125     -1.923999e+01 -4.657001e+01\n11 16125     -3.339900e+02 -3.826800e+02\n13 16125     -2.440500e+02 2.959003e+01\n14 16125     -2.241100e+02 -3.853000e+02\n15 16125     -8.235300e+02 5.651900e+02\n4 16126     -3.695900e+02 -4.813000e+01\n7 16126     -5.535600e+02 -2.269900e+02\n4 16127     -6.727002e+01 -4.892999e+01\n5 16127     -1.314100e+02 -3.821800e+02\n4 16128     3.098000e+02 -4.923999e+01\n5 16128     -2.283000e+02 3.599100e+02\n4 16129     -3.589800e+02 -5.120001e+01\n7 16129     -5.550100e+02 -2.095800e+02\n4 16130     2.626600e+02 -5.076001e+01\n11 16130     -3.349700e+02 6.739001e+01\n13 16130     -3.464200e+02 4.959200e+02\n14 16130     -2.998500e+02 1.668900e+02\n4 16131     2.585900e+02 -5.152002e+01\n11 16131     -3.337700e+02 6.106000e+01\n13 16131     -3.449200e+02 4.890000e+02\n14 16131     -2.987500e+02 1.596500e+02\n4 16132     -3.665400e+02 -5.228998e+01\n7 16132     -5.486500e+02 -2.201200e+02\n4 16133     1.921000e+02 -5.283002e+01\n11 16133     -3.604800e+02 -5.645001e+01\n4 16134     2.575200e+02 -5.569000e+01\n5 16134     -2.104500e+02 2.641800e+02\n14 16134     -2.906800e+02 1.584200e+02\n4 16135     2.781300e+02 -5.571002e+01\n5 16135     -2.127700e+02 3.023300e+02\n11 16135     -3.295600e+02 9.014001e+01\n13 16135     -3.427100e+02 5.215900e+02\n14 16135     -2.932400e+02 1.950800e+02\n4 16136     2.781300e+02 -5.571002e+01\n5 16136     -2.127700e+02 3.023300e+02\n4 16137     -4.065997e+01 -5.652002e+01\n5 16137     -1.211800e+02 -3.285100e+02\n8 16137     -5.866800e+02 1.710999e+01\n4 16138     -6.640997e+01 -5.759998e+01\n14 16138     -1.959600e+02 -4.735900e+02\n4 16139     2.623000e+02 -5.831000e+01\n5 16139     -2.054300e+02 2.731200e+02\n11 16139     -3.236800e+02 6.738000e+01\n14 16139     -2.866400e+02 1.670900e+02\n4 16140     -8.594000e+01 -5.963000e+01\n7 16140     -6.897700e+02 2.492200e+02\n10 16140     -7.079000e+02 3.911400e+02\n11 16140     -2.960900e+02 -4.857300e+02\n13 16140     -2.067600e+02 -6.873999e+01\n14 16140     -1.873300e+02 -5.117000e+02\n4 16141     4.551001e+01 -6.210999e+01\n5 16141     -1.226900e+02 -1.603400e+02\n4 16142     2.896500e+02 -6.520001e+01\n5 16142     -2.030300e+02 3.172300e+02\n4 16143     3.075000e+01 -6.597998e+01\n5 16143     -1.126000e+02 -1.873000e+02\n13 16143     -2.267700e+02 1.131300e+02\n14 16143     -1.955900e+02 -2.830600e+02\n4 16144     -2.109998e+01 -6.640997e+01\n5 16144     -1.046800e+02 -2.874300e+02\n4 16145     6.348999e+01 -6.651001e+01\n5 16145     -1.168700e+02 -1.249400e+02\n13 16145     -2.341300e+02 1.639500e+02\n4 16146     2.187700e+02 -6.675000e+01\n14 16146     -2.332000e+02 6.859003e+01\n4 16147     2.371000e+02 -6.907001e+01\n5 16147     -1.525900e+02 2.109400e+02\n11 16147     -3.300200e+02 1.772998e+01\n13 16147     -2.881500e+02 4.440600e+02\n14 16147     -2.381900e+02 1.063600e+02\n4 16148     8.266998e+01 -7.146002e+01\n5 16148     -1.099300e+02 -8.739001e+01\n7 16148     -7.916800e+02 5.775000e+02\n13 16148     -2.314900e+02 1.955000e+02\n14 16148     -1.938800e+02 -1.837700e+02\n4 16149     1.920000e+02 -7.253003e+01\n11 16149     -3.242100e+02 -4.359998e+01\n4 16150     1.678800e+02 -7.500000e+01\n5 16150     -1.135800e+02 7.379999e+01\n4 16151     -3.096997e+01 -7.588000e+01\n5 16151     -8.465002e+01 -3.045200e+02\n8 16151     -5.548600e+02 4.417001e+01\n4 16152     2.267700e+02 -7.696997e+01\n5 16152     -1.312000e+02 1.908700e+02\n11 16152     -3.216700e+02 1.659973e+00\n13 16152     -2.698500e+02 4.279100e+02\n14 16152     -2.184100e+02 8.729001e+01\n4 16153     2.463500e+02 -7.778003e+01\n5 16153     -1.411200e+02 2.318700e+02\n11 16153     -3.155000e+02 3.429001e+01\n13 16153     -2.788000e+02 4.629300e+02\n14 16153     -2.255300e+02 1.269200e+02\n4 16154     1.829500e+02 -7.826001e+01\n11 16154     -3.213400e+02 -6.682001e+01\n4 16155     1.157400e+02 -7.883002e+01\n14 16155     -1.850200e+02 -1.302700e+02\n4 16156     1.551100e+02 -8.092999e+01\n5 16156     -1.018300e+02 5.165002e+01\n4 16157     2.359399e+02 -8.378998e+01\n5 16157     -1.221200e+02 2.097700e+02\n11 16157     -3.111300e+02 1.725000e+01\n13 16157     -2.630800e+02 4.454600e+02\n4 16158     1.584000e+02 -8.434998e+01\n5 16158     -9.577002e+01 5.890997e+01\n11 16158     -3.100200e+02 -1.040200e+02\n13 16158     -2.303300e+02 3.172500e+02\n14 16158     -1.817700e+02 -4.098999e+01\n4 16159     -1.696000e+02 -8.482001e+01\n13 16159     -1.309600e+02 -1.883000e+02\n4 16160     1.544500e+02 -8.613000e+01\n8 16160     -5.765700e+02 3.855000e+02\n13 16160     -2.269700e+02 3.112600e+02\n4 16161     1.764301e+02 -8.656000e+01\n11 16161     -3.085400e+02 -7.609003e+01\n4 16162     -1.934998e+01 -8.823999e+01\n8 16162     -5.408200e+02 6.717999e+01\n12 16162     -8.166100e+02 2.857500e+02\n4 16163     1.923700e+02 -8.870001e+01\n11 16163     -3.045100e+02 -5.129999e+01\n4 16164     -1.909998e+01 -9.352002e+01\n5 16164     -5.487000e+01 -2.774200e+02\n7 16164     -6.716100e+02 3.887000e+02\n8 16164     -5.308500e+02 6.960999e+01\n11 16164     -2.569800e+02 -3.734300e+02\n12 16164     -8.052000e+02 2.899200e+02\n13 16164     -1.732300e+02 4.454999e+01\n4 16165     9.387000e+01 -9.371997e+01\n11 16165     -2.822900e+02 -1.990700e+02\n4 16166     1.636500e+02 -9.404999e+01\n11 16166     -3.176400e+02 -9.791998e+01\n4 16167     -3.869995e+00 -9.488000e+01\n8 16167     -5.355900e+02 9.741000e+01\n12 16167     -8.143900e+02 3.253000e+02\n4 16168     -3.869995e+00 -9.488000e+01\n8 16168     -5.355900e+02 9.741000e+01\n12 16168     -8.143900e+02 3.253000e+02\n4 16169     1.444301e+02 -9.741998e+01\n5 16169     -6.989001e+01 3.412000e+01\n4 16170     2.284600e+02 -9.816998e+01\n11 16170     -2.810400e+02 8.320007e+00\n4 16171     -7.700195e-01 -9.951001e+01\n8 16171     -5.290800e+02 1.049500e+02\n10 16171     -6.842600e+02 5.933400e+02\n11 16171     -2.512500e+02 -3.424200e+02\n13 16171     -1.687700e+02 7.514001e+01\n14 16171     -1.290400e+02 -3.335800e+02\n4 16172     9.159998e+01 -1.041700e+02\n13 16172     -1.845400e+02 2.208200e+02\n14 16172     -1.356500e+02 -1.569700e+02\n4 16173     -4.367800e+02 -1.050400e+02\n6 16173     -4.534400e+02 -5.490100e+02\n7 16173     -4.353400e+02 -2.828500e+02\n10 16173     -4.997100e+02 -2.574300e+02\n4 16174     2.677900e+02 -1.050900e+02\n11 16174     -2.781100e+02 7.148001e+01\n4 16175     2.590000e+02 -1.061400e+02\n11 16175     -2.759500e+02 5.539999e+01\n13 16175     -2.371800e+02 4.878800e+02\n4 16176     2.708700e+02 -1.060200e+02\n5 16176     -9.360999e+01 2.804800e+02\n11 16176     -2.755600e+02 7.351999e+01\n4 16177     2.642000e+02 -1.087000e+02\n11 16177     -2.724800e+02 6.437000e+01\n4 16178     3.044100e+02 -1.158000e+02\n5 16178     -1.100400e+02 3.603100e+02\n14 16178     -1.919100e+02 2.516800e+02\n4 16179     1.724600e+02 -1.160300e+02\n11 16179     -2.714100e+02 -7.954999e+01\n4 16180     -6.584003e+01 -1.164500e+02\n7 16180     -5.982100e+02 3.172600e+02\n8 16180     -4.770200e+02 -4.700012e+00\n12 16180     -7.200200e+02 2.053400e+02\n15 16180     -6.048000e+02 4.989300e+02\n4 16181     -1.015997e+01 -1.180700e+02\n7 16181     -6.308300e+02 4.182200e+02\n8 16181     -4.942800e+02 9.370999e+01\n10 16181     -6.358200e+02 5.807800e+02\n11 16181     -2.198600e+02 -3.545800e+02\n12 16181     -7.581900e+02 3.258300e+02\n4 16182     1.050500e+02 -1.187300e+02\n11 16182     -2.448400e+02 -1.775300e+02\n13 16182     -1.652400e+02 2.422500e+02\n14 16182     -1.112700e+02 -1.315200e+02\n4 16183     1.050500e+02 -1.187300e+02\n11 16183     -2.448400e+02 -1.775300e+02\n13 16183     -1.652400e+02 2.422500e+02\n14 16183     -1.112700e+02 -1.315200e+02\n4 16184     -2.618500e+02 -1.189700e+02\n8 16184     -3.223200e+02 -2.631100e+02\n15 16184     -5.194700e+02 3.271997e+01\n4 16185     2.974000e+02 -1.202000e+02\n13 16185     -2.475700e+02 5.658600e+02\n14 16185     -1.817300e+02 2.387600e+02\n4 16186     2.934800e+02 -1.221900e+02\n5 16186     -9.450000e+01 3.397100e+02\n13 16186     -2.427700e+02 5.598700e+02\n14 16186     -1.767600e+02 2.320400e+02\n4 16187     -4.810600e+02 -1.245200e+02\n9 16187     -2.387900e+02 -4.119700e+02\n4 16188     1.175600e+02 -1.244700e+02\n11 16188     -2.379400e+02 -1.574200e+02\n4 16189     -2.754800e+02 -1.257100e+02\n15 16189     -5.014000e+02 7.640015e+00\n4 16190     -2.623500e+02 -1.262700e+02\n7 16190     -4.812300e+02 -1.329999e+01\n8 16190     -3.105400e+02 -2.584100e+02\n9 16190     -4.842200e+02 -1.913600e+02\n10 16190     -5.086000e+02 6.069000e+01\n13 16190     -2.595001e+01 -3.061800e+02\n15 16190     -5.041300e+02 3.675000e+01\n4 16191     2.759100e+02 -1.290600e+02\n5 16191     -5.276001e+01 2.929900e+02\n13 16191     -2.079200e+02 5.205500e+02\n4 16192     2.207001e+01 -1.378700e+02\n8 16192     -4.741600e+02 1.565900e+02\n4 16193     1.624600e+02 -1.378100e+02\n5 16193     1.750000e+00 7.485999e+01\n13 16193     -1.501700e+02 3.352800e+02\n14 16193     -8.662000e+01 -2.415002e+01\n4 16194     3.076500e+02 -1.383100e+02\n11 16194     -2.031000e+02 1.479500e+02\n14 16194     -1.542200e+02 2.610000e+02\n4 16195     -2.700500e+02 -1.385700e+02\n7 16195     -4.580500e+02 -1.838000e+01\n10 16195     -4.838100e+02 5.278003e+01\n4 16196     3.125800e+02 -1.400300e+02\n5 16196     -7.008002e+01 3.794400e+02\n14 16196     -1.524100e+02 2.694500e+02\n4 16197     -1.277700e+02 -1.427300e+02\n7 16197     -5.180000e+02 2.218800e+02\n10 16197     -5.119200e+02 3.456500e+02\n4 16198     1.338500e+02 -1.439000e+02\n13 16198     -1.339200e+02 2.933700e+02\n4 16199     2.494200e+02 -1.444000e+02\n11 16199     -2.177200e+02 4.709000e+01\n4 16200     2.494200e+02 -1.444000e+02\n5 16200     -1.769000e+01 2.459400e+02\n11 16200     -2.177200e+02 4.709000e+01\n4 16201     -5.407001e+01 -1.477400e+02\n8 16201     -4.322200e+02 2.738000e+01\n4 16202     -1.846400e+02 -1.568500e+02\n10 16202     -4.701300e+02 2.318400e+02\n4 16203     -5.425700e+02 -1.573000e+02\n6 16203     -2.614600e+02 -6.403600e+02\n15 16203     -3.731800e+02 -4.826000e+02\n4 16204     1.439200e+02 -1.587500e+02\n5 16204     4.150000e+01 4.391998e+01\n13 16204     -1.149300e+02 3.119700e+02\n14 16204     -4.679999e+01 -5.319000e+01\n4 16205     9.372998e+01 -1.593400e+02\n11 16205     -1.777500e+02 -1.873200e+02\n4 16206     1.407500e+02 -1.601300e+02\n8 16206     -4.794000e+02 3.671800e+02\n11 16206     -1.882000e+02 -1.181100e+02\n13 16206     -1.120400e+02 3.075000e+02\n14 16206     -4.407001e+01 -5.817999e+01\n4 16207     2.971100e+02 -1.620700e+02\n5 16207     -2.345001e+01 3.507500e+02\n11 16207     -1.659500e+02 1.317200e+02\n13 16207     -1.828100e+02 5.724400e+02\n4 16208     3.122200e+02 -1.626100e+02\n5 16208     -2.919000e+01 3.813300e+02\n14 16208     -1.131100e+02 2.721600e+02\n4 16209     -2.096100e+02 -1.639600e+02\n13 16209     1.799988e+00 -2.178000e+02\n4 16210     -2.293400e+02 -1.701200e+02\n10 16210     -4.353800e+02 1.492900e+02\n4 16211     -5.430000e+02 -1.731300e+02\n12 16211     -2.482100e+02 -5.548700e+02\n4 16212     -7.122800e+02 -1.740700e+02\n7 16212     -2.413300e+02 -5.616400e+02\n4 16213     3.127900e+02 -1.801100e+02\n11 16213     -1.374300e+02 1.556000e+02\n14 16213     -2.953998e+01 2.785700e+02\n4 16214     3.127900e+02 -1.801100e+02\n11 16214     -1.374300e+02 1.556000e+02\n14 16214     -8.292999e+01 2.752800e+02\n4 16215     1.117999e+01 -1.804400e+02\n11 16215     -1.242000e+02 -3.072400e+02\n4 16216     -5.209998e+01 -1.836400e+02\n10 16216     -4.646200e+02 5.247600e+02\n4 16217     3.005900e+02 -1.875800e+02\n5 16217     2.140997e+01 3.594900e+02\n11 16217     -1.277000e+02 1.396100e+02\n4 16218     3.304999e+01 -1.884100e+02\n5 16218     1.104700e+02 -1.553400e+02\n8 16218     -4.000400e+02 1.881000e+02\n4 16219     -7.454400e+02 -1.927200e+02\n7 16219     -2.081700e+02 -5.835699e+02\n4 16220     -2.264700e+02 -1.938200e+02\n7 16220     -3.886400e+02 8.476001e+01\n10 16220     -3.898900e+02 1.682600e+02\n15 16220     -3.671200e+02 1.612100e+02\n4 16221     -2.264700e+02 -1.938200e+02\n7 16221     -3.886400e+02 8.476001e+01\n4 16222     8.578998e+01 -1.972400e+02\n5 16222     1.186900e+02 -5.510999e+01\n12 16222     -6.589200e+02 5.818900e+02\n4 16223     2.941200e+02 -2.008100e+02\n11 16223     -1.087000e+02 1.316900e+02\n14 16223     -4.010999e+01 2.423600e+02\n4 16224     8.647998e+01 -2.024000e+02\n5 16224     1.275900e+02 -5.316998e+01\n8 16224     -3.958900e+02 2.815000e+02\n4 16225     1.069500e+02 -2.028900e+02\n11 16225     -1.140800e+02 -1.589300e+02\n4 16226     1.474301e+02 -2.041400e+02\n5 16226     1.212000e+02 5.896002e+01\n8 16226     -4.122300e+02 3.842400e+02\n11 16226     -1.209700e+02 -1.003400e+02\n13 16226     -4.969000e+01 3.276200e+02\n14 16226     3.084998e+01 -3.745001e+01\n4 16227     -1.486800e+02 -2.050900e+02\n15 16227     -3.606200e+02 3.510600e+02\n4 16228     2.941700e+02 -2.054600e+02\n5 16228     5.494000e+01 3.495800e+02\n4 16229     -7.241900e+02 -2.160600e+02\n7 16229     -1.867800e+02 -5.465400e+02\n4 16230     -1.726001e+01 -2.160100e+02\n8 16230     -3.414200e+02 1.124800e+02\n4 16231     -7.635900e+02 -2.175400e+02\n9 16231     1.172700e+02 -5.601801e+02\n4 16232     8.292999e+01 -2.209100e+02\n5 16232     1.602700e+02 -5.578998e+01\n12 16232     -6.065900e+02 5.864200e+02\n4 16233     2.940699e+02 -2.285500e+02\n5 16233     9.647998e+01 3.503700e+02\n11 16233     -6.785999e+01 1.342600e+02\n4 16234     2.286801e+02 -2.360200e+02\n5 16234     1.575200e+02 2.122300e+02\n4 16235     1.115900e+02 -2.414600e+02\n13 16235     1.120001e+01 2.814200e+02\n4 16236     -6.509700e+02 -2.574500e+02\n7 16236     -1.579900e+02 -4.430000e+02\n9 16236     6.140997e+01 -4.453000e+02\n4 16237     1.030200e+02 -2.607200e+02\n5 16237     2.259100e+02 -1.160999e+01\n8 16237     -3.163800e+02 3.191500e+02\n4 16238     -7.519800e+02 -2.641700e+02\n7 16238     -1.227400e+02 -5.446700e+02\n4 16239     -2.872600e+02 -2.656700e+02\n7 16239     -2.741000e+02 2.085999e+01\n4 16240     -8.045700e+02 -2.662700e+02\n9 16240     1.882200e+02 -5.499700e+02\n4 16241     -7.502200e+02 -2.665900e+02\n9 16241     1.477300e+02 -5.113300e+02\n4 16242     -2.656300e+02 -2.663500e+02\n7 16242     -2.801800e+02 5.135999e+01\n4 16243     -2.365002e+01 -2.765100e+02\n8 16243     -2.556600e+02 1.183900e+02\n4 16244     -3.939800e+02 -2.772000e+02\n7 16244     -2.145300e+02 -1.224000e+02\n4 16245     -7.393200e+02 -2.833000e+02\n7 16245     -1.044600e+02 -5.197700e+02\n10 16245     -1.773400e+02 -5.708199e+02\n4 16246     -2.095700e+02 -2.833200e+02\n5 16246     3.921000e+02 -5.973101e+02\n10 16246     -2.813700e+02 2.143000e+02\n4 16247     -8.073500e+02 -2.859600e+02\n6 16247     1.074900e+02 -8.171200e+02\n7 16247     -8.428003e+01 -5.855900e+02\n4 16248     -3.266800e+02 -2.885900e+02\n6 16248     -1.938000e+02 -1.719301e+02\n4 16249     -6.945600e+02 -2.897300e+02\n9 16249     1.234800e+02 -4.538400e+02\n4 16250     -2.004700e+02 -2.903300e+02\n7 16250     -2.662800e+02 1.677300e+02\n13 16250     1.916100e+02 -1.653200e+02\n15 16250     -2.333000e+02 2.446700e+02\n4 16251     2.844301e+02 -2.910900e+02\n11 16251     -1.059998e+00 1.154200e+02\n4 16252     -3.376000e+02 -2.913800e+02\n7 16252     -2.224300e+02 -4.148999e+01\n4 16253     -2.145900e+02 -2.919700e+02\n5 16253     4.090000e+02 -6.041300e+02\n6 16253     -3.069800e+02 1.725000e+01\n12 16253     -2.584000e+02 7.283002e+01\n4 16254     -6.935700e+02 -2.938700e+02\n9 16254     1.260500e+02 -4.501000e+02\n4 16255     2.843101e+02 -2.957000e+02\n5 16255     2.341899e+02 3.237800e+02\n4 16256     -6.560600e+02 -2.969100e+02\n6 16256     1.477002e+01 -6.391300e+02\n4 16257     -7.541600e+02 -2.981700e+02\n9 16257     1.756899e+02 -4.901300e+02\n4 16258     3.735999e+01 -3.003400e+02\n8 16258     -2.430200e+02 2.208200e+02\n12 16258     -4.239300e+02 5.264400e+02\n4 16259     2.129999e+01 -3.022500e+02\n8 16259     -2.350400e+02 1.965600e+02\n4 16260     -6.620200e+02 -3.030600e+02\n9 16260     1.103100e+02 -4.201900e+02\n4 16261     -7.552200e+02 -3.036000e+02\n9 16261     1.809600e+02 -4.859700e+02\n4 16262     -1.382001e+01 -3.039700e+02\n11 16262     7.123999e+01 -3.181700e+02\n4 16263     2.066998e+01 -3.076200e+02\n6 16263     -5.800600e+02 5.029100e+02\n8 16263     -2.281200e+02 1.962700e+02\n12 16263     -4.009100e+02 4.957100e+02\n4 16264     -2.305700e+02 -3.129200e+02\n6 16264     -2.438400e+02 7.169983e+00\n7 16264     -2.266900e+02 1.296600e+02\n9 16264     -1.640600e+02 6.529999e+01\n10 16264     -2.369700e+02 1.825200e+02\n15 16264     -1.985000e+02 1.828900e+02\n4 16265     -6.133900e+02 -3.140800e+02\n15 16265     -9.195001e+01 -4.927100e+02\n4 16266     -1.924800e+02 -3.138000e+02\n5 16266     4.326899e+02 -5.562700e+02\n6 16266     -2.992700e+02 7.303003e+01\n13 16266     2.170500e+02 -1.468600e+02\n4 16267     -2.306200e+02 -3.165700e+02\n6 16267     -2.374600e+02 1.023999e+01\n10 16267     -2.307100e+02 1.842600e+02\n13 16267     2.398300e+02 -1.984200e+02\n4 16268     6.190002e+00 -3.216700e+02\n6 16268     -5.446800e+02 4.794700e+02\n8 16268     -2.061100e+02 1.760200e+02\n4 16269     -1.816400e+02 -3.223900e+02\n5 16269     4.412200e+02 -5.336200e+02\n6 16269     -2.977600e+02 9.862000e+01\n7 16269     -2.245500e+02 2.147700e+02\n8 16269     -5.175000e+01 -1.223001e+01\n12 16269     -2.312900e+02 1.474800e+02\n4 16270     2.215002e+01 -3.225800e+02\n6 16270     -5.515400e+02 5.151000e+02\n7 16270     -2.897800e+02 5.671000e+02\n12 16270     -3.738600e+02 5.059000e+02\n4 16271     1.723900e+02 -3.281200e+02\n13 16271     1.168800e+02 3.896200e+02\n14 16271     2.298500e+02 2.687000e+01\n4 16272     9.442999e+01 -3.386600e+02\n8 16272     -2.088600e+02 3.160000e+02\n4 16273     9.442999e+01 -3.386600e+02\n6 16273     -5.659300e+02 6.863900e+02\n11 16273     9.383002e+01 -1.536200e+02\n4 16274     -1.445700e+02 -3.392300e+02\n10 16274     -1.389100e+02 4.038600e+02\n4 16275     -1.371002e+01 -3.391900e+02\n11 16275     1.225200e+02 -3.096900e+02\n4 16276     -7.715500e+02 -3.445800e+02\n9 16276     2.234200e+02 -4.684600e+02\n4 16277     -1.796400e+02 -3.492000e+02\n5 16277     4.891200e+02 -5.228700e+02\n6 16277     -2.457200e+02 1.242100e+02\n7 16277     -1.881000e+02 2.293900e+02\n12 16277     -1.847600e+02 1.718400e+02\n13 16277     2.591000e+02 -1.185600e+02\n4 16278     -7.750200e+02 -3.528800e+02\n7 16278     -1.878998e+01 -5.133000e+02\n10 16278     -8.091998e+01 -5.743600e+02\n4 16279     9.059998e+00 -3.546300e+02\n11 16279     1.413200e+02 -2.730900e+02\n12 16279     -3.105900e+02 4.939800e+02\n4 16280     8.584003e+01 -3.549000e+02\n8 16280     -1.864400e+02 3.047500e+02\n4 16281     1.649600e+02 -3.549300e+02\n5 16281     3.703400e+02 1.127700e+02\n13 16281     1.532100e+02 3.844000e+02\n14 16281     2.723800e+02 1.956000e+01\n4 16282     2.453998e+01 -3.573600e+02\n6 16282     -4.891800e+02 5.405500e+02\n7 16282     -2.345600e+02 5.835600e+02\n9 16282     -4.066600e+02 3.055700e+02\n12 16282     -3.141700e+02 5.262800e+02\n4 16283     2.730601e+02 -3.573200e+02\n11 16283     9.026001e+01 1.031300e+02\n4 16284     -7.559900e+02 -3.579700e+02\n6 16284     1.513700e+02 -6.940500e+02\n7 16284     -1.769000e+01 -4.910300e+02\n10 16284     -7.509998e+01 -5.488600e+02\n4 16285     8.173999e+01 -3.606300e+02\n5 16285     3.941700e+02 -3.095001e+01\n6 16285     -5.170400e+02 6.687800e+02\n8 16285     -1.786400e+02 3.003500e+02\n11 16285     1.294700e+02 -1.671400e+02\n4 16286     2.708900e+02 -3.620800e+02\n5 16286     3.494100e+02 3.021300e+02\n13 16286     1.303900e+02 5.453800e+02\n14 16286     2.487100e+02 2.016000e+02\n4 16287     -7.581000e+02 -3.640800e+02\n7 16287     -1.056000e+01 -4.893400e+02\n9 16287     2.275800e+02 -4.458600e+02\n4 16288     2.798600e+02 -3.649800e+02\n5 16288     3.500699e+02 3.196400e+02\n11 16288     1.001100e+02 1.147700e+02\n4 16289     2.906200e+02 -3.668900e+02\n11 16289     1.022600e+02 1.308600e+02\n13 16289     1.297900e+02 5.770800e+02\n14 16289     2.485200e+02 2.366900e+02\n4 16290     -1.297400e+02 -3.676400e+02\n8 16290     -8.448999e+01 5.010010e+00\n13 16290     2.395400e+02 -3.490002e+01\n14 16290     3.733000e+02 -4.954700e+02\n4 16291     2.805601e+02 -3.680000e+02\n11 16291     1.029000e+02 1.171500e+02\n4 16292     2.704301e+02 -3.688400e+02\n11 16292     1.050500e+02 1.014500e+02\n4 16293     2.588199e+02 -3.696500e+02\n13 16293     1.447100e+02 5.268900e+02\n14 16293     2.648900e+02 1.809500e+02\n4 16294     2.732100e+02 -3.698900e+02\n5 16294     3.610200e+02 3.070800e+02\n11 16294     1.077400e+02 1.049900e+02\n13 16294     1.408000e+02 5.491000e+02\n14 16294     2.607300e+02 2.056400e+02\n4 16295     -2.012000e+01 -3.709000e+02\n6 16295     -4.400600e+02 4.528200e+02\n4 16296     -7.334200e+02 -3.713700e+02\n9 16296     2.151100e+02 -4.241800e+02\n10 16296     -5.853998e+01 -5.138900e+02\n4 16297     7.290002e+01 -3.714300e+02\n5 16297     4.127500e+02 -4.563000e+01\n11 16297     1.472500e+02 -1.782400e+02\n4 16298     -1.870700e+02 -3.722200e+02\n12 16298     -1.356600e+02 1.830300e+02\n4 16299     -7.358700e+02 -3.730500e+02\n9 16299     2.181899e+02 -4.247600e+02\n4 16300     -7.277000e+02 -3.741200e+02\n9 16300     2.132100e+02 -4.184000e+02\n4 16301     -7.277000e+02 -3.741200e+02\n7 16301     -5.700012e+00 -4.527100e+02\n9 16301     2.132100e+02 -4.184000e+02\n10 16301     -5.528003e+01 -5.055500e+02\n12 16301     1.319300e+02 -6.135699e+02\n4 16302     2.703400e+02 -3.752400e+02\n5 16302     3.699700e+02 3.028100e+02\n11 16302     1.133200e+02 1.028300e+02\n4 16303     2.751000e+02 -3.747100e+02\n5 16303     3.669301e+02 3.116600e+02\n4 16304     2.449500e+02 -3.765200e+02\n5 16304     3.821300e+02 2.561100e+02\n11 16304     1.171300e+02 6.559000e+01\n4 16305     2.882100e+02 -3.787100e+02\n5 16305     3.688000e+02 3.349100e+02\n11 16305     1.193500e+02 1.272300e+02\n13 16305     1.471500e+02 5.734000e+02\n14 16305     2.683800e+02 2.321700e+02\n4 16306     2.906801e+02 -3.800700e+02\n11 16306     1.204800e+02 1.315400e+02\n13 16306     1.474600e+02 5.777800e+02\n4 16307     2.810400e+02 -3.805500e+02\n11 16307     1.210800e+02 1.186200e+02\n13 16307     1.513101e+02 5.632800e+02\n14 16307     2.731700e+02 2.208300e+02\n4 16308     -3.350400e+02 -3.812100e+02\n6 16308     -4.262000e+01 -1.059100e+02\n8 16308     1.421500e+02 -1.214800e+02\n12 16308     -3.648999e+01 -5.235999e+01\n4 16309     2.535800e+02 -3.810400e+02\n5 16309     3.855500e+02 2.727000e+02\n11 16309     1.228400e+02 7.822000e+01\n13 16309     1.619600e+02 5.197700e+02\n14 16309     2.847900e+02 1.725400e+02\n4 16310     -1.074700e+02 -3.831600e+02\n11 16310     1.998900e+02 -4.446500e+02\n4 16311     1.520300e+02 -3.830400e+02\n5 16311     4.169600e+02 9.440002e+01\n14 16311     3.181200e+02 1.669983e+00\n4 16312     2.684998e+01 -3.839200e+02\n6 16312     -4.428400e+02 5.606900e+02\n11 16312     1.769100e+02 -2.415000e+02\n4 16313     2.485400e+02 -3.846800e+02\n5 16313     3.926899e+02 2.637900e+02\n11 16313     1.274400e+02 7.200000e+01\n4 16314     2.658300e+02 -3.845500e+02\n5 16314     3.859800e+02 2.952000e+02\n4 16315     2.541600e+02 -3.869700e+02\n11 16315     1.306600e+02 8.070001e+01\n14 16315     2.929500e+02 1.753200e+02\n4 16316     2.927700e+02 -3.878000e+02\n5 16316     3.809800e+02 3.441000e+02\n11 16316     1.314500e+02 1.353500e+02\n13 16316     1.573700e+02 5.816900e+02\n4 16317     2.954800e+02 -3.890400e+02\n5 16317     3.811801e+02 3.496200e+02\n4 16318     -1.263600e+02 -3.910800e+02\n9 16318     -2.709000e+02 1.011700e+02\n13 16318     2.664100e+02 -2.315002e+01\n14 16318     4.074500e+02 -4.814900e+02\n4 16319     2.582500e+02 -3.933800e+02\n5 16319     4.026600e+02 2.824300e+02\n13 16319     1.760200e+02 5.290600e+02\n14 16319     3.010300e+02 1.824400e+02\n4 16320     3.115300e+02 -3.932800e+02\n5 16320     3.781300e+02 3.821300e+02\n14 16320     2.778800e+02 2.778000e+02\n4 16321     2.802200e+02 -3.941600e+02\n5 16321     3.958000e+02 3.222300e+02\n4 16322     2.243199e+02 -3.945900e+02\n5 16322     4.170800e+02 2.211700e+02\n11 16322     1.418700e+02 3.745999e+01\n4 16323     2.243199e+02 -3.945900e+02\n5 16323     4.170800e+02 2.211700e+02\n11 16323     1.418700e+02 3.745999e+01\n4 16324     2.469301e+02 -3.947700e+02\n5 16324     4.090601e+02 2.619400e+02\n14 16324     3.072100e+02 1.630500e+02\n4 16325     4.650024e+00 -3.962900e+02\n8 16325     -1.135400e+02 1.901600e+02\n4 16326     2.354600e+02 -3.964400e+02\n5 16326     4.158500e+02 2.415400e+02\n4 16327     2.592300e+02 -3.963600e+02\n5 16327     4.073000e+02 2.841200e+02\n4 16328     2.950601e+02 -3.963500e+02\n5 16328     3.939200e+02 3.479400e+02\n13 16328     1.675601e+02 5.855500e+02\n4 16329     2.886500e+02 -3.971600e+02\n5 16329     3.974800e+02 3.372100e+02\n13 16329     1.711700e+02 5.765500e+02\n14 16329     2.960300e+02 2.349000e+02\n4 16330     -3.210900e+02 -3.990100e+02\n8 16330     1.522800e+02 -9.847998e+01\n4 16331     2.361899e+02 -3.992100e+02\n5 16331     4.200500e+02 2.429600e+02\n4 16332     1.013100e+02 -3.994100e+02\n6 16332     -4.584800e+02 7.300700e+02\n8 16332     -1.368700e+02 3.335900e+02\n11 16332     1.790300e+02 -1.325600e+02\n4 16333     2.901500e+02 -3.998400e+02\n11 16333     1.466300e+02 1.339200e+02\n4 16334     2.579800e+02 -4.003000e+02\n13 16334     1.848600e+02 5.296100e+02\n14 16334     3.116000e+02 1.823000e+02\n4 16335     2.848900e+02 -4.003500e+02\n11 16335     1.490300e+02 1.249800e+02\n13 16335     1.759700e+02 5.713400e+02\n14 16335     3.016200e+02 2.290600e+02\n4 16336     -1.339300e+02 -4.007600e+02\n5 16336     5.122400e+02 -4.111600e+02\n6 16336     -2.925200e+02 2.416700e+02\n13 16336     2.811200e+02 -3.134003e+01\n14 16336     4.261100e+02 -4.928600e+02\n4 16337     6.325000e+01 -4.011000e+02\n5 16337     4.610200e+02 -5.616998e+01\n6 16337     -4.338000e+02 6.477000e+02\n8 16337     -1.241800e+02 2.781800e+02\n11 16337     1.922400e+02 -1.862200e+02\n13 16337     2.326700e+02 2.480800e+02\n14 16337     3.659900e+02 -1.432300e+02\n4 16338     2.698900e+02 -4.016400e+02\n5 16338     4.114200e+02 3.040400e+02\n11 16338     1.495100e+02 1.047600e+02\n13 16338     1.832800e+02 5.477900e+02\n14 16338     3.097400e+02 2.029500e+02\n4 16339     2.956801e+02 -4.017000e+02\n5 16339     4.010699e+02 3.508000e+02\n4 16340     2.182700e+02 -4.021500e+02\n13 16340     2.003900e+02 4.688000e+02\n4 16341     2.182700e+02 -4.021500e+02\n5 16341     4.314600e+02 2.105700e+02\n11 16341     1.524900e+02 2.957999e+01\n13 16341     2.003900e+02 4.688000e+02\n4 16342     2.729200e+02 -4.024800e+02\n14 16342     3.103900e+02 2.076900e+02\n4 16343     2.890699e+02 -4.038500e+02\n5 16343     4.083400e+02 3.377600e+02\n13 16343     1.800200e+02 5.773500e+02\n14 16343     3.062700e+02 2.356100e+02\n4 16344     -2.487800e+02 -4.050500e+02\n6 16344     -6.347998e+01 4.892999e+01\n8 16344     1.273200e+02 -7.970001e+00\n4 16345     2.908500e+02 -4.061400e+02\n11 16345     1.552900e+02 1.347700e+02\n4 16346     2.585100e+02 -4.064800e+02\n13 16346     1.934900e+02 5.309700e+02\n14 16346     3.213500e+02 1.839900e+02\n4 16347     2.702200e+02 -4.080100e+02\n5 16347     4.209900e+02 3.050900e+02\n4 16348     2.702200e+02 -4.080100e+02\n5 16348     4.209900e+02 3.050900e+02\n4 16349     -3.644500e+02 -4.092000e+02\n6 16349     1.620001e+01 -1.271200e+02\n4 16350     -1.045400e+02 -4.091400e+02\n9 16350     -2.710100e+02 1.305500e+02\n4 16351     2.634399e+02 -4.101000e+02\n13 16351     1.965200e+02 5.385700e+02\n14 16351     3.250500e+02 1.922800e+02\n4 16352     -2.321400e+02 -4.112700e+02\n5 16352     6.271899e+02 -6.032300e+02\n6 16352     -6.516998e+01 8.195001e+01\n4 16353     2.916600e+02 -4.114700e+02\n5 16353     4.175400e+02 3.438400e+02\n11 16353     1.638800e+02 1.359900e+02\n13 16353     1.881700e+02 5.831300e+02\n14 16353     3.158300e+02 2.416800e+02\n4 16354     -2.825100e+02 -4.120600e+02\n8 16354     1.524700e+02 -4.294000e+01\n4 16355     -1.919900e+02 -4.120100e+02\n5 16355     6.125699e+02 -5.333101e+02\n6 16355     -9.764999e+01 1.490600e+02\n4 16356     1.160200e+02 -4.117800e+02\n6 16356     -4.451400e+02 7.668200e+02\n8 16356     -1.253500e+02 3.212300e+02\n4 16357     -3.549600e+02 -4.127800e+02\n6 16357     1.335999e+01 -1.112300e+02\n4 16358     2.365300e+02 -4.128500e+02\n5 16358     4.405000e+02 2.448400e+02\n4 16359     2.365300e+02 -4.128500e+02\n5 16359     4.405000e+02 2.448400e+02\n4 16360     2.679900e+02 -4.136300e+02\n5 16360     4.306100e+02 3.010300e+02\n4 16361     -1.408900e+02 -4.148000e+02\n6 16361     -2.630300e+02 2.376000e+02\n12 16361     -1.268500e+02 2.530500e+02\n13 16361     2.990400e+02 -3.634998e+01\n4 16362     9.450000e+01 -4.160600e+02\n6 16362     -4.243500e+02 7.228200e+02\n4 16363     2.182400e+02 -4.159100e+02\n13 16363     2.178500e+02 4.707000e+02\n14 16363     3.494399e+02 1.157300e+02\n4 16364     2.191300e+02 -4.186800e+02\n11 16364     1.750500e+02 3.331000e+01\n4 16365     6.277002e+01 -4.186300e+02\n5 16365     4.886100e+02 -5.338000e+01\n9 16365     -3.449400e+02 3.819100e+02\n11 16365     2.171900e+02 -1.833700e+02\n4 16366     -2.254700e+02 -4.194100e+02\n8 16366     1.324800e+02 2.720001e+01\n4 16367     2.932500e+02 -4.202400e+02\n5 16367     4.298300e+02 3.480200e+02\n11 16367     1.741600e+02 1.398400e+02\n14 16367     3.271200e+02 2.456300e+02\n4 16368     -7.869600e+02 -4.208600e+02\n6 16368     2.324500e+02 -6.715900e+02\n4 16369     2.955500e+02 -4.215200e+02\n11 16369     1.759800e+02 1.427100e+02\n4 16370     -1.143400e+02 -4.217400e+02\n8 16370     -3.098999e+01 4.014999e+01\n11 16370     2.535300e+02 -4.468600e+02\n13 16370     2.990300e+02 2.599976e+00\n14 16370     4.488000e+02 -4.500800e+02\n4 16371     -2.503400e+02 -4.245600e+02\n8 16371     1.514000e+02 2.329987e+00\n4 16372     -4.788000e+01 -4.242900e+02\n7 16372     -1.040700e+02 4.864300e+02\n13 16372     2.825500e+02 9.838000e+01\n4 16373     -1.237000e+02 -4.259700e+02\n6 16373     -2.607900e+02 2.778300e+02\n8 16373     -1.972998e+01 3.176001e+01\n11 16373     2.562700e+02 -4.612000e+02\n12 16373     -1.176400e+02 2.879400e+02\n15 16373     9.859003e+01 5.352800e+02\n4 16374     -1.237000e+02 -4.259700e+02\n6 16374     -2.607900e+02 2.778300e+02\n8 16374     -1.972998e+01 3.176001e+01\n12 16374     -1.176400e+02 2.879400e+02\n13 16374     3.077900e+02 -9.289978e+00\n14 16374     4.598000e+02 -4.657800e+02\n4 16375     1.184500e+02 -4.254400e+02\n6 16375     -4.219100e+02 7.791200e+02\n4 16376     2.061600e+02 -4.255400e+02\n13 16376     2.336000e+02 4.532800e+02\n4 16377     2.719700e+02 -4.254300e+02\n5 16377     4.487400e+02 3.081600e+02\n11 16377     1.799400e+02 1.083200e+02\n13 16377     2.142400e+02 5.526300e+02\n4 16378     2.905300e+02 -4.254400e+02\n5 16378     4.373400e+02 3.448900e+02\n4 16379     2.955100e+02 -4.282900e+02\n11 16379     1.852000e+02 1.427500e+02\n4 16380     -4.897400e+02 -4.301100e+02\n6 16380     9.829999e+01 -2.943500e+02\n7 16380     -3.109985e+00 -1.615900e+02\n8 16380     2.524800e+02 -2.801800e+02\n9 16380     1.405400e+02 -1.349000e+02\n10 16380     -2.338000e+01 -1.776800e+02\n12 16380     1.014400e+02 -2.509600e+02\n15 16380     5.066998e+01 -2.368200e+02\n4 16381     7.233002e+01 -4.312300e+02\n6 16381     -3.871500e+02 6.815900e+02\n4 16382     2.193500e+02 -4.320100e+02\n5 16382     4.762600e+02 2.157800e+02\n4 16383     2.039900e+02 -4.326900e+02\n5 16383     4.832600e+02 1.879700e+02\n4 16384     2.939200e+02 -4.324000e+02\n5 16384     4.489900e+02 3.489200e+02\n11 16384     1.906300e+02 1.413600e+02\n4 16385     2.939200e+02 -4.324000e+02\n11 16385     1.906300e+02 1.413600e+02\n14 16385     3.450800e+02 2.472100e+02\n4 16386     2.959200e+02 -4.345699e+02\n11 16386     1.935700e+02 1.438900e+02\n4 16387     2.704200e+02 -4.368300e+02\n5 16387     4.681700e+02 3.040400e+02\n4 16388     -5.857700e+02 -4.375699e+02\n9 16388     1.866300e+02 -2.404000e+02\n4 16389     -2.322900e+02 -4.373900e+02\n8 16389     1.582300e+02 2.910001e+01\n4 16390     -1.292900e+02 -4.383101e+02\n6 16390     -2.368900e+02 2.749700e+02\n4 16391     4.859003e+01 -4.385800e+02\n5 16391     5.215400e+02 -7.506000e+01\n6 16391     -3.617700e+02 6.340700e+02\n8 16391     -7.682001e+01 2.614400e+02\n4 16392     2.938900e+02 -4.388700e+02\n5 16392     4.587300e+02 3.492500e+02\n11 16392     1.987100e+02 1.423200e+02\n4 16393     2.938900e+02 -4.388700e+02\n5 16393     4.587300e+02 3.492500e+02\n11 16393     1.987100e+02 1.423200e+02\n14 16393     3.541400e+02 2.478100e+02\n4 16394     -2.537300e+02 -4.404800e+02\n8 16394     1.717700e+02 7.339996e+00\n4 16395     1.293400e+02 -4.407700e+02\n6 16395     -4.029100e+02 8.100000e+02\n8 16395     -9.772000e+01 3.789900e+02\n11 16395     2.279200e+02 -8.766998e+01\n13 16395     2.685100e+02 3.477300e+02\n14 16395     4.093500e+02 -2.677002e+01\n4 16396     2.103400e+02 -4.425000e+02\n5 16396     4.952500e+02 1.999700e+02\n4 16397     2.184700e+02 -4.423101e+02\n14 16397     3.917400e+02 1.158100e+02\n4 16398     2.184700e+02 -4.423101e+02\n5 16398     4.920400e+02 2.154100e+02\n13 16398     2.503000e+02 4.752800e+02\n14 16398     3.877100e+02 1.199200e+02\n4 16399     2.242900e+02 -4.445400e+02\n5 16399     4.970000e+02 2.223800e+02\n13 16399     2.514900e+02 4.838900e+02\n4 16400     2.928000e+02 -4.452900e+02\n5 16400     4.689500e+02 3.476800e+02\n4 16401     -2.009600e+02 -4.473101e+02\n5 16401     6.715300e+02 -5.396100e+02\n6 16401     -3.572998e+01 1.571900e+02\n13 16401     3.939900e+02 -1.219600e+02\n4 16402     -5.999600e+02 -4.506100e+02\n9 16402     2.060200e+02 -2.429900e+02\n4 16403     -1.454000e+02 -4.522800e+02\n11 16403     2.899900e+02 -4.892500e+02\n13 16403     3.458300e+02 -3.233002e+01\n4 16404     2.223800e+02 -4.535100e+02\n14 16404     4.033101e+02 1.266900e+02\n4 16405     9.196002e+01 -4.542000e+02\n5 16405     5.368500e+02 3.289978e+00\n6 16405     -3.590300e+02 7.340400e+02\n8 16405     -7.189001e+01 3.265100e+02\n11 16405     2.572900e+02 -1.359100e+02\n4 16406     -4.940997e+01 -4.543700e+02\n8 16406     -3.252002e+01 1.233200e+02\n9 16406     -2.632400e+02 2.103400e+02\n11 16406     2.986300e+02 -3.349100e+02\n4 16407     -3.475300e+02 -4.565100e+02\n12 16407     7.495001e+01 -1.704999e+01\n4 16408     2.314000e+02 -4.565000e+02\n11 16408     2.240400e+02 5.639001e+01\n4 16409     2.073900e+02 -4.584500e+02\n13 16409     2.742400e+02 4.599700e+02\n14 16409     4.156801e+02 1.018900e+02\n4 16410     2.642900e+02 -4.582700e+02\n5 16410     5.020500e+02 2.952300e+02\n13 16410     2.568800e+02 5.425900e+02\n14 16410     3.950400e+02 1.949400e+02\n4 16411     -7.453000e+02 -4.615900e+02\n9 16411     2.852800e+02 -3.751300e+02\n4 16412     1.604999e+01 -4.615200e+02\n5 16412     5.616200e+02 -1.259200e+02\n4 16413     2.365400e+02 -4.625000e+02\n5 16413     5.150000e+02 2.491900e+02\n4 16414     1.130600e+02 -4.638900e+02\n6 16414     -3.548600e+02 7.825100e+02\n8 16414     -6.696997e+01 3.576300e+02\n4 16415     2.076801e+02 -4.652000e+02\n5 16415     5.302000e+02 1.979800e+02\n14 16415     4.254500e+02 1.033500e+02\n4 16416     -2.874900e+02 -4.672500e+02\n8 16416     2.161300e+02 -1.817001e+01\n12 16416     6.396997e+01 8.482001e+01\n4 16417     7.931000e+01 -4.684600e+02\n5 16417     5.608400e+02 -1.600000e+01\n6 16417     -3.284000e+02 7.143300e+02\n8 16417     -5.298999e+01 3.095300e+02\n4 16418     2.147800e+02 -4.695900e+02\n11 16418     2.430200e+02 3.325000e+01\n4 16419     2.256600e+02 -4.702300e+02\n11 16419     2.438199e+02 4.823999e+01\n13 16419     2.825100e+02 4.893100e+02\n4 16420     2.256600e+02 -4.702300e+02\n13 16420     2.825100e+02 4.893100e+02\n14 16420     4.251700e+02 1.348100e+02\n4 16421     2.256600e+02 -4.702300e+02\n13 16421     2.825100e+02 4.893100e+02\n14 16421     4.251700e+02 1.348100e+02\n4 16422     -3.394400e+02 -4.713900e+02\n8 16422     2.402400e+02 -7.728003e+01\n4 16423     1.686600e+02 -4.721801e+02\n5 16423     5.482400e+02 1.344200e+02\n4 16424     2.115500e+02 -4.755100e+02\n5 16424     5.441100e+02 2.049900e+02\n14 16424     4.389301e+02 1.105200e+02\n4 16425     4.465002e+01 -4.762300e+02\n6 16425     -2.981600e+02 6.438600e+02\n12 16425     -1.299600e+02 6.116100e+02\n4 16426     6.612000e+01 -4.765400e+02\n9 16426     -2.802100e+02 3.960300e+02\n4 16427     -7.632200e+02 -4.785601e+02\n9 16427     3.070900e+02 -3.768000e+02\n10 16427     8.187000e+01 -4.920300e+02\n4 16428     6.834998e+01 -4.794500e+02\n8 16428     -3.789001e+01 2.956900e+02\n4 16429     -2.494000e+02 -4.799100e+02\n8 16429     2.118800e+02 3.051001e+01\n4 16430     4.442999e+01 -4.804399e+02\n6 16430     -2.911000e+02 6.454100e+02\n12 16430     -1.231000e+02 6.128800e+02\n4 16431     -5.078000e+02 -4.809200e+02\n6 16431     1.741500e+02 -2.748400e+02\n4 16432     6.610999e+01 -4.812900e+02\n8 16432     -3.516998e+01 2.931500e+02\n14 16432     4.831500e+02 -1.222300e+02\n4 16433     2.322400e+02 -4.819700e+02\n5 16433     5.455699e+02 2.432400e+02\n4 16434     5.412000e+01 -4.826600e+02\n6 16434     -2.934000e+02 6.664400e+02\n8 16434     -3.073999e+01 2.761600e+02\n11 16434     3.065900e+02 -1.835800e+02\n4 16435     1.440400e+02 -4.841200e+02\n5 16435     5.711200e+02 9.479999e+01\n6 16435     -3.372200e+02 8.566200e+02\n4 16436     2.081600e+02 -4.846700e+02\n5 16436     5.585601e+02 2.007000e+02\n4 16437     -2.596600e+02 -4.850500e+02\n6 16437     5.844000e+01 8.797998e+01\n8 16437     2.222800e+02 2.170999e+01\n12 16437     7.665002e+01 1.404600e+02\n4 16438     -2.327400e+02 -4.868101e+02\n13 16438     4.458800e+02 -1.504200e+02\n4 16439     1.419900e+02 -4.888101e+02\n5 16439     5.780500e+02 9.206000e+01\n6 16439     -3.290400e+02 8.533300e+02\n8 16439     -4.834003e+01 3.995500e+02\n4 16440     -3.075400e+02 -4.894800e+02\n6 16440     8.854999e+01 1.663000e+01\n8 16440     2.464200e+02 -3.087000e+01\n12 16440     1.032300e+02 6.754999e+01\n4 16441     -4.517500e+02 -4.897400e+02\n6 16441     1.628400e+02 -1.907400e+02\n4 16442     2.082700e+02 -4.911600e+02\n5 16442     5.683000e+02 2.014900e+02\n4 16443     2.437700e+02 -4.927300e+02\n5 16443     5.567600e+02 2.645300e+02\n11 16443     2.701300e+02 7.842001e+01\n4 16444     2.611500e+02 -4.924600e+02\n5 16444     5.506200e+02 2.945700e+02\n4 16445     1.471100e+02 -4.927800e+02\n5 16445     5.829100e+02 1.012900e+02\n6 16445     -3.251300e+02 8.654400e+02\n4 16446     -2.598200e+02 -4.958400e+02\n7 16446     1.365002e+01 1.679400e+02\n8 16446     2.318800e+02 2.610999e+01\n4 16447     1.586600e+02 -4.961300e+02\n11 16447     2.930200e+02 -3.912000e+01\n4 16448     -2.899100e+02 -4.965100e+02\n10 16448     2.738000e+01 1.453400e+02\n15 16448     1.059100e+02 1.438600e+02\n4 16449     1.612200e+02 -4.981700e+02\n5 16449     5.878101e+02 1.253400e+02\n8 16449     -4.326001e+01 4.269700e+02\n11 16449     2.951899e+02 -3.498999e+01\n4 16450     2.488000e+02 -4.980000e+02\n5 16450     5.624600e+02 2.739100e+02\n4 16451     -2.334400e+02 -4.994800e+02\n6 16451     5.906000e+01 1.369200e+02\n4 16452     2.116801e+02 -4.995800e+02\n13 16452     3.229000e+02 4.713100e+02\n14 16452     4.729800e+02 1.134300e+02\n4 16453     2.116801e+02 -4.995800e+02\n13 16453     3.229000e+02 4.713100e+02\n14 16453     4.729800e+02 1.134300e+02\n4 16454     3.068500e+02 -5.044700e+02\n5 16454     5.556500e+02 3.727800e+02\n14 16454     4.470900e+02 2.705000e+02\n4 16455     2.091500e+02 -5.051200e+02\n5 16455     5.876400e+02 2.043200e+02\n4 16456     2.443400e+02 -5.050300e+02\n5 16456     5.747200e+02 2.664400e+02\n4 16457     -1.145001e+01 -5.063600e+02\n9 16457     -2.213100e+02 2.816100e+02\n11 16457     3.578101e+02 -2.701600e+02\n4 16458     -7.522500e+02 -5.088500e+02\n7 16458     1.395800e+02 -4.009700e+02\n10 16458     1.194700e+02 -4.641899e+02\n4 16459     2.144301e+02 -5.122300e+02\n11 16459     2.982700e+02 3.745999e+01\n4 16460     2.380500e+02 -5.127100e+02\n5 16460     5.879100e+02 2.564100e+02\n11 16460     2.978400e+02 7.092999e+01\n13 16460     3.295000e+02 5.132700e+02\n14 16460     4.802400e+02 1.604500e+02\n4 16461     2.380500e+02 -5.127100e+02\n5 16461     5.879100e+02 2.564100e+02\n11 16461     2.978400e+02 7.092999e+01\n13 16461     3.295000e+02 5.132700e+02\n14 16461     4.802400e+02 1.604500e+02\n4 16462     2.302300e+02 -5.131500e+02\n5 16462     5.916400e+02 2.420000e+02\n11 16462     2.991100e+02 5.935001e+01\n14 16462     4.845100e+02 1.465500e+02\n4 16463     2.302300e+02 -5.131500e+02\n5 16463     5.916400e+02 2.420000e+02\n11 16463     2.991100e+02 5.935001e+01\n14 16463     4.845100e+02 1.465500e+02\n4 16464     -6.400024e+00 -5.150000e+02\n5 16464     6.447000e+02 -1.531200e+02\n6 16464     -2.139900e+02 5.595000e+02\n13 16464     3.817000e+02 1.771200e+02\n14 16464     5.489399e+02 -2.344700e+02\n4 16465     2.439800e+02 -5.155601e+02\n5 16465     5.896400e+02 2.669000e+02\n4 16466     2.188000e+02 -5.160500e+02\n5 16466     5.998600e+02 2.222000e+02\n4 16467     2.454900e+02 -5.180100e+02\n5 16467     5.925300e+02 2.697600e+02\n11 16467     3.033500e+02 8.160999e+01\n13 16467     3.329700e+02 5.248000e+02\n4 16468     -4.692700e+02 -5.187800e+02\n6 16468     2.050200e+02 -1.920300e+02\n4 16469     -4.558200e+02 -5.224301e+02\n12 16469     2.083900e+02 -1.322300e+02\n13 16469     5.239100e+02 -3.984100e+02\n4 16470     1.566100e+02 -5.223500e+02\n5 16470     6.232400e+02 1.208100e+02\n8 16470     -1.722998e+01 4.209200e+02\n11 16470     3.273400e+02 -3.854999e+01\n13 16470     3.597600e+02 3.997900e+02\n14 16470     5.178700e+02 3.096002e+01\n4 16471     2.328600e+02 -5.238600e+02\n5 16471     6.059200e+02 2.477900e+02\n13 16471     3.442400e+02 5.068100e+02\n14 16471     4.974100e+02 1.531100e+02\n4 16472     -4.014900e+02 -5.325800e+02\n7 16472     8.846997e+01 -2.440002e+00\n15 16472     1.850400e+02 -3.775000e+01\n4 16473     -4.014900e+02 -5.325800e+02\n7 16473     8.846997e+01 -2.440002e+00\n15 16473     1.850400e+02 -3.775000e+01\n4 16474     -1.509900e+02 -5.361600e+02\n11 16474     3.999100e+02 -4.774900e+02\n14 16474     6.315100e+02 -4.816700e+02\n4 16475     2.208400e+02 -5.397000e+02\n5 16475     6.324100e+02 2.285600e+02\n4 16476     -1.499700e+02 -5.409900e+02\n11 16476     4.063800e+02 -4.742700e+02\n4 16477     1.420400e+02 -5.434900e+02\n8 16477     8.179993e+00 4.025300e+02\n4 16478     -3.244400e+02 -5.450500e+02\n12 16478     1.818700e+02 7.592999e+01\n4 16479     5.737000e+01 -5.565900e+02\n6 16479     -1.827900e+02 7.055200e+02\n13 16479     4.170500e+02 2.719400e+02\n4 16480     1.645601e+02 -5.563000e+02\n8 16480     1.532001e+01 4.322800e+02\n13 16480     3.978500e+02 4.179200e+02\n4 16481     -4.853400e+02 -5.610000e+02\n7 16481     1.355300e+02 -9.119000e+01\n4 16482     1.055700e+02 -5.752400e+02\n6 16482     -1.780000e+02 8.080400e+02\n4 16483     1.206700e+02 -5.812200e+02\n5 16483     7.135200e+02 6.946997e+01\n8 16483     5.101001e+01 3.761000e+02\n11 16483     4.120800e+02 -7.739001e+01\n14 16483     6.069399e+02 -1.684003e+01\n4 16484     1.083100e+02 -5.820800e+02\n5 16484     7.167900e+02 4.941998e+01\n6 16484     -1.692200e+02 8.160900e+02\n11 16484     4.172100e+02 -9.406000e+01\n4 16485     6.187000e+01 3.587900e+02\n5 16485     -6.091600e+02 -3.313400e+02\n4 16486     -1.318700e+02 1.667200e+02\n13 16486     -5.540100e+02 -2.262000e+02\n4 16487     1.433800e+02 8.797000e+01\n5 16487     -5.254100e+02 3.934003e+01\n13 16487     -5.845300e+02 2.784300e+02\n14 16487     -5.997300e+02 -6.357001e+01\n4 16488     2.315997e+01 8.804999e+01\n11 16488     -5.119300e+02 -3.172600e+02\n4 16489     1.156800e+02 8.382999e+01\n5 16489     -5.100900e+02 -2.153998e+01\n13 16489     -5.649300e+02 2.267100e+02\n14 16489     -5.844600e+02 -1.245300e+02\n4 16490     1.800400e+02 7.278003e+01\n5 16490     -4.830200e+02 1.115300e+02\n13 16490     -5.573700e+02 3.407400e+02\n4 16491     2.149200e+02 7.065997e+01\n5 16491     -4.816600e+02 1.775800e+02\n4 16492     9.903003e+01 7.014001e+01\n5 16492     -4.668200e+02 -5.302002e+01\n4 16493     1.811100e+02 6.967999e+01\n13 16493     -5.490000e+02 3.405800e+02\n4 16494     1.399301e+02 6.771002e+01\n5 16494     -4.659900e+02 2.833002e+01\n14 16494     -5.406500e+02 -7.335999e+01\n4 16495     1.832500e+02 6.541998e+01\n5 16495     -4.667700e+02 1.156300e+02\n4 16496     8.689001e+01 6.358002e+01\n5 16496     -4.503300e+02 -7.783002e+01\n4 16497     1.815500e+02 6.197998e+01\n13 16497     -5.316200e+02 3.450600e+02\n14 16497     -5.289200e+02 9.549988e+00\n4 16498     7.520001e+01 4.651001e+01\n5 16498     -3.968600e+02 -1.037500e+02\n4 16499     8.765997e+01 4.245001e+01\n11 16499     -4.526800e+02 -2.076900e+02\n4 16500     1.760000e+02 3.534003e+01\n11 16500     -4.603300e+02 -7.364001e+01\n4 16501     2.167200e+02 3.572998e+01\n14 16501     -4.624600e+02 6.964001e+01\n4 16502     1.593700e+02 3.503998e+01\n5 16502     -3.750500e+02 6.120001e+01\n4 16503     1.593700e+02 3.503998e+01\n13 16503     -4.608500e+02 2.997600e+02\n4 16504     1.410900e+02 3.434003e+01\n5 16504     -3.714700e+02 2.712000e+01\n14 16504     -4.500200e+02 -7.342999e+01\n4 16505     2.105100e+02 3.232001e+01\n11 16505     -4.587500e+02 -1.959003e+01\n13 16505     -4.709600e+02 3.916100e+02\n4 16506     1.303000e+02 2.884003e+01\n5 16506     -3.523500e+02 1.119995e+00\n4 16507     2.742100e+02 2.903003e+01\n5 16507     -4.040700e+02 2.992300e+02\n4 16508     2.050400e+02 2.501001e+01\n13 16508     -4.525000e+02 3.829300e+02\n4 16509     1.403600e+02 2.464001e+01\n5 16509     -3.425600e+02 2.244000e+01\n13 16509     -4.312900e+02 2.736200e+02\n4 16510     2.410699e+02 2.407001e+01\n5 16510     -3.740100e+02 2.278100e+02\n13 16510     -4.751700e+02 4.488800e+02\n14 16510     -4.513700e+02 1.222500e+02\n4 16511     1.038700e+02 1.053003e+01\n5 16511     -2.963000e+02 -5.289001e+01\n13 16511     -3.860900e+02 2.138400e+02\n14 16511     -3.755000e+02 -1.522400e+02\n4 16512     1.194500e+02 1.060999e+01\n5 16512     -3.002900e+02 -2.098999e+01\n4 16513     1.194500e+02 1.060999e+01\n5 16513     -3.002900e+02 -2.098999e+01\n4 16514     1.288900e+02 5.580017e+00\n13 16514     -3.834400e+02 2.533700e+02\n4 16515     2.911500e+02 -3.590027e+00\n11 16515     -3.879900e+02 1.085500e+02\n4 16516     1.711801e+02 -2.006000e+01\n5 16516     -2.348500e+02 8.050000e+01\n11 16516     -4.135100e+02 -9.448999e+01\n13 16516     -3.347100e+02 3.204700e+02\n4 16517     -2.522300e+02 -2.301001e+01\n10 16517     -7.105400e+02 2.041998e+01\n4 16518     2.237500e+02 -2.435999e+01\n5 16518     -2.353800e+02 1.809500e+02\n13 16518     -3.561000e+02 4.148000e+02\n4 16519     -2.595400e+02 -2.642999e+01\n10 16519     -7.022000e+02 8.479980e+00\n4 16520     -4.835999e+01 -2.931000e+01\n5 16520     -1.720400e+02 -3.508200e+02\n4 16521     -1.076001e+01 -3.491998e+01\n15 16521     -8.630100e+02 5.799900e+02\n4 16522     2.603800e+02 -3.532001e+01\n5 16522     -2.503600e+02 2.668300e+02\n13 16522     -3.727300e+02 4.887900e+02\n14 16522     -3.306000e+02 1.605200e+02\n4 16523     2.664000e+02 -3.571002e+01\n5 16523     -2.505200e+02 2.777700e+02\n13 16523     -3.735900e+02 4.987900e+02\n14 16523     -3.303800e+02 1.714700e+02\n4 16524     -9.419983e+00 -3.826001e+01\n7 16524     -7.878800e+02 3.764700e+02\n11 16524     -3.510400e+02 -3.708100e+02\n13 16524     -2.610200e+02 3.953998e+01\n14 16524     -2.438900e+02 -3.716400e+02\n4 16525     2.722800e+02 -3.840002e+01\n5 16525     -2.442300e+02 2.893300e+02\n11 16525     -3.560500e+02 7.964999e+01\n13 16525     -3.698700e+02 5.091200e+02\n4 16526     9.751001e+01 -4.012000e+01\n14 16526     -2.547600e+02 -1.636900e+02\n4 16527     2.513500e+02 -4.103998e+01\n5 16527     -2.376500e+02 2.512200e+02\n11 16527     -3.493400e+02 4.951001e+01\n4 16528     8.003003e+01 -4.271997e+01\n5 16528     -1.635000e+02 -9.804999e+01\n4 16529     2.617800e+02 -4.447998e+01\n5 16529     -2.320300e+02 2.702700e+02\n11 16529     -3.456000e+02 6.478000e+01\n13 16529     -3.576400e+02 4.927400e+02\n14 16529     -3.129300e+02 1.641400e+02\n4 16530     2.721100e+02 -4.715002e+01\n5 16530     -2.275400e+02 2.900500e+02\n11 16530     -3.445800e+02 8.004999e+01\n13 16530     -3.568900e+02 5.105200e+02\n4 16531     2.553199e+02 -4.776001e+01\n5 16531     -2.250600e+02 2.586500e+02\n11 16531     -3.394500e+02 5.557999e+01\n13 16531     -3.500100e+02 4.826200e+02\n14 16531     -3.050800e+02 1.527700e+02\n4 16532     2.553199e+02 -4.776001e+01\n5 16532     -2.250600e+02 2.586500e+02\n13 16532     -3.500100e+02 4.826200e+02\n14 16532     -3.050800e+02 1.527700e+02\n4 16533     2.600000e+02 -4.833002e+01\n5 16533     -2.243900e+02 2.678100e+02\n4 16534     2.600000e+02 -4.833002e+01\n5 16534     -2.243900e+02 2.678100e+02\n11 16534     -3.388800e+02 6.297000e+01\n13 16534     -3.503000e+02 4.909700e+02\n14 16534     -3.046100e+02 1.617600e+02\n4 16535     2.610200e+02 -5.482001e+01\n5 16535     -2.122500e+02 2.704500e+02\n11 16535     -3.276600e+02 6.625000e+01\n14 16535     -2.905600e+02 1.654700e+02\n4 16536     3.510999e+01 -5.540002e+01\n5 16536     -1.339200e+02 -1.820400e+02\n4 16537     1.392999e+01 -5.759998e+01\n10 16537     -7.953200e+02 6.059800e+02\n4 16538     2.657700e+02 -5.754999e+01\n5 16538     -2.074600e+02 2.794200e+02\n11 16538     -3.263100e+02 7.353000e+01\n13 16538     -3.372400e+02 5.025300e+02\n14 16538     -2.889700e+02 1.741900e+02\n4 16539     -6.073999e+01 -5.925000e+01\n7 16539     -7.075500e+02 2.943700e+02\n10 16539     -7.279700e+02 4.438300e+02\n15 16539     -7.520600e+02 4.733800e+02\n4 16540     -1.660100e+02 -5.978003e+01\n13 16540     -1.697400e+02 -1.927900e+02\n4 16541     7.848999e+01 -5.996002e+01\n5 16541     -1.310600e+02 -9.815002e+01\n14 16541     -2.149300e+02 -1.946300e+02\n4 16542     -5.063000e+01 -6.082001e+01\n5 16542     -1.117400e+02 -3.466300e+02\n7 16542     -7.117300e+02 3.135000e+02\n8 16542     -5.751200e+02 2.300110e-01\n10 16542     -7.323800e+02 4.653900e+02\n13 16542     -2.144900e+02 -1.428998e+01\n14 16542     -1.926400e+02 -4.421400e+02\n4 16543     2.120699e+02 -6.115997e+01\n13 16543     -2.872200e+02 3.988500e+02\n14 16543     -2.408300e+02 5.552002e+01\n4 16544     -7.559998e+00 -6.304999e+01\n5 16544     -1.134700e+02 -2.623800e+02\n10 16544     -7.610500e+02 5.589100e+02\n11 16544     -3.087700e+02 -3.616200e+02\n4 16545     2.671300e+02 -6.309003e+01\n5 16545     -1.972700e+02 2.828500e+02\n4 16546     -1.665997e+01 -6.714001e+01\n8 16546     -5.776500e+02 6.512000e+01\n11 16546     -3.000600e+02 -3.746800e+02\n4 16547     -4.744800e+02 -7.071002e+01\n7 16547     -4.695800e+02 -3.557300e+02\n9 16547     -3.154600e+02 -4.516400e+02\n10 16547     -5.493700e+02 -3.381400e+02\n15 16547     -5.572000e+02 -4.259600e+02\n4 16548     -8.030029e+00 -7.071002e+01\n5 16548     -9.894000e+01 -2.616700e+02\n7 16548     -7.234300e+02 3.981200e+02\n8 16548     -5.746000e+02 8.232999e+01\n14 16548     -1.810000e+02 -3.565500e+02\n4 16549     1.630100e+02 -7.612000e+01\n5 16549     -1.126600e+02 6.247998e+01\n4 16550     1.630100e+02 -7.612000e+01\n5 16550     -1.126600e+02 6.247998e+01\n13 16550     -2.427100e+02 3.226000e+02\n14 16550     -1.960600e+02 -3.407001e+01\n4 16551     1.013000e+02 -7.712000e+01\n11 16551     -3.096200e+02 -1.899300e+02\n13 16551     -2.271200e+02 2.263700e+02\n14 16551     -1.858200e+02 -1.472200e+02\n4 16552     2.501801e+02 -9.226001e+01\n5 16552     -1.128800e+02 2.392200e+02\n11 16552     -2.970100e+02 3.956000e+01\n13 16552     -2.542800e+02 4.704300e+02\n14 16552     -1.970000e+02 1.338700e+02\n4 16553     -5.304500e+02 -1.003100e+02\n7 16553     -4.024900e+02 -4.063000e+02\n15 16553     -4.835800e+02 -5.030000e+02\n4 16554     1.440400e+02 -1.066400e+02\n5 16554     -5.303998e+01 3.563000e+01\n4 16555     -4.451700e+02 -1.071900e+02\n13 16555     2.590002e+01 -5.570100e+02\n4 16556     3.121100e+02 -1.123400e+02\n5 16556     -1.195900e+02 3.744500e+02\n14 16556     -2.012700e+02 2.653900e+02\n4 16557     1.617000e+02 -1.133500e+02\n5 16557     -4.282001e+01 6.954999e+01\n11 16557     -2.659300e+02 -9.519000e+01\n14 16557     -1.301700e+02 -3.012000e+01\n4 16558     -2.621800e+02 -1.222200e+02\n7 16558     -4.880500e+02 -1.609003e+01\n15 16558     -5.120600e+02 3.427002e+01\n4 16559     -2.729500e+02 -1.236000e+02\n15 16559     -5.057800e+02 1.240997e+01\n4 16560     6.731000e+01 -1.347400e+02\n13 16560     -1.324200e+02 1.888500e+02\n14 16560     -7.640002e+01 -1.972400e+02\n4 16561     2.901000e+02 -1.394100e+02\n5 16561     -3.477002e+01 3.183000e+02\n13 16561     -1.936000e+02 5.439600e+02\n14 16561     -1.222300e+02 2.119700e+02\n4 16562     -2.050500e+02 -1.423900e+02\n13 16562     -3.003003e+01 -2.193900e+02\n4 16563     1.512500e+02 -1.425900e+02\n5 16563     1.146997e+01 5.496002e+01\n4 16564     -2.137600e+02 -1.502800e+02\n10 16564     -4.747800e+02 1.693800e+02\n4 16565     -7.005300e+02 -1.520700e+02\n7 16565     -2.718200e+02 -5.638800e+02\n4 16566     -5.265500e+02 -1.542100e+02\n7 16566     -3.292300e+02 -3.667400e+02\n4 16567     -2.189500e+02 -1.550200e+02\n10 16567     -4.657100e+02 1.611700e+02\n4 16568     1.500244e-01 -1.559800e+02\n7 16568     -5.668500e+02 4.561000e+02\n11 16568     -1.610200e+02 -3.294500e+02\n12 16568     -6.848800e+02 3.718600e+02\n4 16569     -4.500122e-01 -1.603400e+02\n5 16569     6.559003e+01 -2.255000e+02\n7 16569     -5.584300e+02 4.570700e+02\n8 16569     -4.311900e+02 1.245500e+02\n4 16570     -5.974100e+02 -1.620500e+02\n6 16570     -2.021900e+02 -7.056700e+02\n7 16570     -2.941600e+02 -4.442200e+02\n15 16570     -3.551700e+02 -5.681000e+02\n4 16571     1.654000e+02 -1.655700e+02\n13 16571     -1.100100e+02 3.461100e+02\n14 16571     -3.963000e+01 -1.315997e+01\n4 16572     7.471997e+01 -1.695200e+02\n5 16572     7.092999e+01 -8.157001e+01\n8 16572     -4.424900e+02 2.554900e+02\n4 16573     -1.117999e+01 -1.704400e+02\n5 16573     8.540002e+01 -2.422800e+02\n7 16573     -5.336400e+02 4.422700e+02\n10 16573     -5.196400e+02 6.038500e+02\n11 16573     -1.348100e+02 -3.436700e+02\n13 16573     -6.231000e+01 8.010001e+01\n14 16573     2.510010e+00 -3.334900e+02\n4 16574     -8.798999e+01 -1.917700e+02\n7 16574     -4.519700e+02 3.179800e+02\n11 16574     -8.157001e+01 -4.572300e+02\n15 16574     -4.060500e+02 4.954500e+02\n4 16575     -3.330017e+00 -2.016600e+02\n8 16575     -3.677300e+02 1.311300e+02\n12 16575     -5.883600e+02 3.911600e+02\n4 16576     1.371600e+02 -2.034800e+02\n11 16576     -6.277002e+01 -9.490997e+01\n4 16577     -2.065997e+01 -2.048800e+02\n11 16577     -7.894000e+01 -3.512200e+02\n12 16577     -5.702600e+02 3.569600e+02\n4 16578     -7.318900e+02 -2.136400e+02\n7 16578     -1.875800e+02 -5.562300e+02\n10 16578     -2.753500e+02 -6.018900e+02\n4 16579     1.529000e+02 -2.144400e+02\n8 16579     -3.984500e+02 3.946500e+02\n11 16579     -1.070700e+02 -9.101001e+01\n14 16579     4.689001e+01 -2.695001e+01\n4 16580     9.306000e+01 -2.268700e+02\n5 16580     1.692800e+02 -3.422998e+01\n11 16580     -7.289001e+01 -1.757700e+02\n12 16580     -6.020500e+02 6.107200e+02\n13 16580     -5.530029e+00 2.532400e+02\n14 16580     7.989001e+01 -1.289500e+02\n4 16581     -5.100098e-01 -2.346500e+02\n5 16581     1.972300e+02 -2.066100e+02\n7 16581     -4.261600e+02 4.910600e+02\n11 16581     -3.659998e+01 -3.131100e+02\n13 16581     2.620001e+01 1.146200e+02\n4 16582     2.055601e+02 -2.377400e+02\n13 16582     -1.840002e+01 4.260100e+02\n14 16582     7.221002e+01 7.351001e+01\n4 16583     4.979980e+00 -2.384200e+02\n5 16583     2.035100e+02 -1.955000e+02\n7 16583     -4.222200e+02 5.023500e+02\n4 16584     7.842999e+01 -2.418500e+02\n5 16584     1.980200e+02 -5.922998e+01\n11 16584     -4.667999e+01 -1.944000e+02\n12 16584     -5.624500e+02 5.851800e+02\n4 16585     -7.388300e+02 -2.487600e+02\n9 16585     1.243100e+02 -5.168400e+02\n4 16586     -7.388300e+02 -2.487600e+02\n9 16586     1.243100e+02 -5.168400e+02\n4 16587     -7.463500e+02 -2.496300e+02\n6 16587     2.495001e+01 -7.877800e+02\n7 16587     -1.410600e+02 -5.480400e+02\n4 16588     -6.734500e+02 -2.553300e+02\n7 16588     -1.541100e+02 -4.683800e+02\n4 16589     1.622800e+02 -2.556600e+02\n5 16589     2.076000e+02 9.388000e+01\n8 16589     -3.413700e+02 4.140500e+02\n13 16589     1.979999e+01 3.609100e+02\n4 16590     -6.321200e+02 -2.591000e+02\n7 16590     -1.613300e+02 -4.213400e+02\n9 16590     4.712000e+01 -4.306500e+02\n12 16590     -6.776001e+01 -5.957900e+02\n4 16591     -6.672300e+02 -2.594500e+02\n6 16591     -2.072998e+01 -6.882000e+02\n9 16591     7.637000e+01 -4.566500e+02\n4 16592     -3.703100e+02 -2.639000e+02\n7 16592     -2.407100e+02 -9.721002e+01\n13 16592     2.094700e+02 -3.962200e+02\n4 16593     1.530029e+00 -2.651800e+02\n13 16593     6.781000e+01 1.260200e+02\n4 16594     -7.612300e+02 -2.715400e+02\n6 16594     6.033002e+01 -7.819200e+02\n7 16594     -1.121200e+02 -5.486801e+02\n9 16594     1.599301e+02 -5.150900e+02\n4 16595     -7.950700e+02 -2.720200e+02\n6 16595     8.306000e+01 -8.181600e+02\n9 16595     1.849000e+02 -5.393500e+02\n4 16596     -3.002200e+02 -2.725300e+02\n6 16596     -2.453600e+02 -1.442200e+02\n4 16597     -2.580017e+00 -2.793800e+02\n5 16597     2.748900e+02 -1.994500e+02\n4 16598     -2.580017e+00 -2.793800e+02\n5 16598     2.748900e+02 -1.994500e+02\n8 16598     -2.582800e+02 1.533100e+02\n4 16599     -2.889100e+02 -2.811000e+02\n6 16599     -2.387000e+02 -1.171800e+02\n4 16600     -6.926400e+02 -2.841900e+02\n9 16600     1.178800e+02 -4.567100e+02\n4 16601     -2.224400e+02 -2.886800e+02\n6 16601     -3.039700e+02 1.799927e-01\n4 16602     -2.174000e+02 -2.882500e+02\n7 16602     -2.637100e+02 1.401300e+02\n10 16602     -2.708500e+02 2.024200e+02\n12 16602     -2.623400e+02 6.572998e+01\n13 16602     1.957600e+02 -1.899000e+02\n15 16602     -2.359600e+02 2.051300e+02\n4 16603     -6.573400e+02 -2.892700e+02\n9 16603     9.463000e+01 -4.271100e+02\n4 16604     -8.108000e+02 -2.896400e+02\n7 16604     -8.021002e+01 -5.868101e+02\n4 16605     -8.108000e+02 -2.896400e+02\n6 16605     1.127300e+02 -8.179000e+02\n7 16605     -8.021002e+01 -5.868101e+02\n4 16606     -6.800700e+02 -2.903300e+02\n9 16606     1.132500e+02 -4.432300e+02\n4 16607     -3.413000e+02 -2.908500e+02\n6 16607     -1.725700e+02 -1.909900e+02\n7 16607     -2.222800e+02 -4.621002e+01\n12 16607     -1.734900e+02 -1.313900e+02\n4 16608     2.434998e+01 -2.951300e+02\n5 16608     2.971000e+02 -1.469600e+02\n8 16608     -2.453700e+02 1.990100e+02\n12 16608     -4.255200e+02 4.974700e+02\n4 16609     4.320007e+00 -2.958300e+02\n5 16609     3.014301e+02 -1.829200e+02\n7 16609     -3.248300e+02 5.256300e+02\n8 16609     -2.387400e+02 1.671600e+02\n4 16610     -6.496300e+02 -2.968400e+02\n6 16610     9.419983e+00 -6.306400e+02\n7 16610     -1.107100e+02 -4.172600e+02\n9 16610     9.520001e+01 -4.153200e+02\n4 16611     -7.864800e+02 -3.054800e+02\n9 16611     2.060000e+02 -5.062800e+02\n4 16612     -7.134400e+02 -3.059800e+02\n6 16612     6.616998e+01 -6.954900e+02\n4 16613     -6.742700e+02 -3.097500e+02\n7 16613     -8.988000e+01 -4.367400e+02\n4 16614     -2.185200e+02 -3.132500e+02\n5 16614     4.513101e+02 -6.061899e+02\n13 16614     2.311600e+02 -1.839300e+02\n15 16614     -1.978600e+02 2.110700e+02\n4 16615     -4.367600e+02 -3.137700e+02\n6 16615     -9.592001e+01 -3.252400e+02\n7 16615     -1.542800e+02 -1.576800e+02\n8 16615     9.376001e+01 -3.052400e+02\n13 16615     2.889900e+02 -4.572000e+02\n4 16616     1.909973e+00 -3.335700e+02\n5 16616     3.641200e+02 -1.786100e+02\n13 16616     1.581100e+02 1.439700e+02\n14 16616     2.745300e+02 -2.650300e+02\n4 16617     2.333002e+01 -3.345800e+02\n6 16617     -5.292800e+02 5.239200e+02\n4 16618     1.695000e+02 -3.345600e+02\n5 16618     3.369301e+02 1.179100e+02\n13 16618     1.257700e+02 3.866600e+02\n14 16618     2.402900e+02 2.316998e+01\n4 16619     2.383500e+02 -3.360200e+02\n5 16619     3.213700e+02 2.405200e+02\n4 16620     -7.312100e+02 -3.441000e+02\n9 16620     1.940699e+02 -4.414301e+02\n4 16621     -7.260400e+02 -3.471300e+02\n9 16621     1.918400e+02 -4.355601e+02\n4 16622     -7.513000e+01 -3.476700e+02\n10 16622     -1.294200e+02 5.538600e+02\n4 16623     -7.896100e+02 -3.488500e+02\n7 16623     -1.983002e+01 -5.293900e+02\n4 16624     -7.325300e+02 -3.511800e+02\n9 16624     1.995800e+02 -4.373199e+02\n4 16625     -7.709600e+02 -3.512200e+02\n7 16625     -2.144000e+01 -5.102900e+02\n9 16625     2.274700e+02 -4.634200e+02\n10 16625     -8.321002e+01 -5.707600e+02\n4 16626     -7.188400e+02 -3.555500e+02\n9 16626     1.935500e+02 -4.244300e+02\n4 16627     -7.675000e+02 -3.568400e+02\n7 16627     -1.594000e+01 -5.029399e+02\n10 16627     -7.572998e+01 -5.627500e+02\n4 16628     -7.664600e+02 -3.617400e+02\n7 16628     -1.102002e+01 -4.990500e+02\n10 16628     -6.951001e+01 -5.590000e+02\n4 16629     2.623400e+02 -3.641200e+02\n5 16629     3.552900e+02 2.869100e+02\n4 16630     2.886300e+02 -3.646100e+02\n5 16630     3.461400e+02 3.350400e+02\n4 16631     -1.876100e+02 -3.667000e+02\n5 16631     5.350699e+02 -5.367700e+02\n6 16631     -1.806800e+02 1.247200e+02\n4 16632     2.575000e+02 -3.671900e+02\n11 16632     1.030400e+02 8.328000e+01\n4 16633     -1.575000e+01 -3.675400e+02\n6 16633     -4.472300e+02 4.602800e+02\n7 16633     -2.020800e+02 5.180500e+02\n11 16633     1.657400e+02 -3.072500e+02\n12 16633     -2.741600e+02 4.524100e+02\n13 16633     2.058600e+02 1.278600e+02\n14 16633     3.325400e+02 -2.879900e+02\n4 16634     -2.875700e+02 -3.704500e+02\n7 16634     -1.340400e+02 7.177002e+01\n4 16635     2.475000e+02 -3.710400e+02\n11 16635     1.078400e+02 6.950000e+01\n13 16635     1.497900e+02 5.115300e+02\n14 16635     2.703000e+02 1.638200e+02\n4 16636     2.762200e+02 -3.711000e+02\n11 16636     1.085000e+02 1.102100e+02\n13 16636     1.408900e+02 5.545600e+02\n4 16637     2.886700e+02 -3.714200e+02\n5 16637     3.568199e+02 3.357000e+02\n13 16637     1.365200e+02 5.742800e+02\n4 16638     2.954900e+02 -3.770000e+02\n14 16638     2.624301e+02 2.459500e+02\n4 16639     -7.382200e+02 -3.783700e+02\n9 16639     2.236801e+02 -4.225400e+02\n4 16640     2.644000e+02 -3.796800e+02\n5 16640     3.792900e+02 2.924000e+02\n11 16640     1.199100e+02 9.454001e+01\n13 16640     1.557600e+02 5.371800e+02\n4 16641     2.644000e+02 -3.796800e+02\n5 16641     3.792900e+02 2.924000e+02\n11 16641     1.199100e+02 9.454001e+01\n13 16641     1.557600e+02 5.371800e+02\n4 16642     -7.336300e+02 -3.802000e+02\n7 16642     1.280029e+00 -4.552400e+02\n10 16642     -4.740002e+01 -5.094200e+02\n4 16643     1.406500e+02 -3.799000e+02\n6 16643     -5.169400e+02 8.102900e+02\n8 16643     -1.720100e+02 3.902400e+02\n4 16644     1.201100e+02 -3.808000e+02\n14 16644     3.220400e+02 -5.119000e+01\n4 16645     1.201100e+02 -3.808000e+02\n13 16645     1.956801e+02 3.244900e+02\n4 16646     2.423199e+02 -3.815100e+02\n5 16646     3.906100e+02 2.521500e+02\n11 16646     1.234500e+02 6.229999e+01\n13 16646     1.658700e+02 5.029300e+02\n4 16647     2.472800e+02 -3.817700e+02\n5 16647     3.886899e+02 2.616900e+02\n11 16647     1.238400e+02 6.966000e+01\n13 16647     1.647200e+02 5.108200e+02\n4 16648     -1.852200e+02 -3.828600e+02\n12 16648     -1.194000e+02 1.939000e+02\n4 16649     2.594100e+02 -3.833700e+02\n5 16649     3.839000e+02 2.860900e+02\n11 16649     1.250000e+02 8.810999e+01\n4 16650     2.594100e+02 -3.833700e+02\n11 16650     1.250000e+02 8.810999e+01\n14 16650     2.842200e+02 1.849000e+02\n4 16651     -3.377700e+02 -3.861000e+02\n6 16651     -3.423999e+01 -1.063000e+02\n8 16651     1.481900e+02 -1.217700e+02\n12 16651     -2.840997e+01 -5.288000e+01\n4 16652     -1.757500e+02 -3.914400e+02\n5 16652     5.716000e+02 -5.097000e+02\n6 16652     -1.480000e+02 1.621600e+02\n7 16652     -1.387200e+02 2.492900e+02\n10 16652     -1.318000e+02 3.093000e+02\n12 16652     -1.116600e+02 2.147000e+02\n13 16652     3.195200e+02 -1.045200e+02\n4 16653     -1.757500e+02 -3.914400e+02\n5 16653     5.716000e+02 -5.097000e+02\n7 16653     -1.387200e+02 2.492900e+02\n10 16653     -1.318000e+02 3.093000e+02\n12 16653     -1.116600e+02 2.147000e+02\n15 16653     -7.622998e+01 3.346300e+02\n4 16654     2.786100e+02 -3.916500e+02\n13 16654     1.681200e+02 5.596000e+02\n4 16655     2.539301e+02 -3.935400e+02\n11 16655     1.386000e+02 8.128000e+01\n4 16656     2.838101e+02 -3.942600e+02\n11 16656     1.403900e+02 1.234900e+02\n13 16656     1.693600e+02 5.682300e+02\n14 16656     2.937400e+02 2.260000e+02\n4 16657     1.316700e+02 -3.958500e+02\n5 16657     4.403700e+02 6.097998e+01\n6 16657     -4.825000e+02 7.951900e+02\n8 16657     -1.503300e+02 3.778900e+02\n11 16657     1.641900e+02 -9.163000e+01\n13 16657     2.119301e+02 3.430000e+02\n14 16657     3.418500e+02 -3.008002e+01\n4 16658     2.275699e+02 -3.954600e+02\n5 16658     4.176500e+02 2.265700e+02\n13 16658     1.895200e+02 4.815600e+02\n14 16658     3.162100e+02 1.289500e+02\n4 16659     -1.464400e+02 -3.958100e+02\n6 16659     -2.874300e+02 2.133200e+02\n13 16659     2.787100e+02 -4.996002e+01\n14 16659     4.230500e+02 -5.172600e+02\n4 16660     1.030800e+02 -3.966700e+02\n5 16660     4.469800e+02 1.223999e+01\n8 16660     -1.411500e+02 3.380300e+02\n14 16660     3.498800e+02 -7.697998e+01\n4 16661     -3.807100e+02 -3.988800e+02\n8 16661     1.815300e+02 -1.656700e+02\n4 16662     -4.551700e+02 -3.996200e+02\n6 16662     4.710999e+01 -2.700500e+02\n4 16663     2.539600e+02 -4.002300e+02\n5 16663     4.154600e+02 2.749100e+02\n4 16664     2.539600e+02 -4.002300e+02\n5 16664     4.154600e+02 2.749100e+02\n4 16665     2.524399e+02 -4.042300e+02\n11 16665     1.556800e+02 7.895999e+01\n4 16666     2.344900e+02 -4.045900e+02\n11 16666     1.560900e+02 5.298001e+01\n14 16666     3.276000e+02 1.420200e+02\n4 16667     2.344900e+02 -4.045900e+02\n11 16667     1.560900e+02 5.298001e+01\n14 16667     3.276000e+02 1.420200e+02\n4 16668     2.654700e+02 -4.047700e+02\n5 16668     4.167500e+02 2.971600e+02\n11 16668     1.548100e+02 9.823999e+01\n13 16668     1.878700e+02 5.424400e+02\n14 16668     3.150800e+02 1.969000e+02\n4 16669     -4.830400e+02 -4.053600e+02\n8 16669     2.234400e+02 -2.886600e+02\n4 16670     2.218900e+02 -4.067700e+02\n5 16670     4.370400e+02 2.172700e+02\n11 16670     1.590700e+02 3.520001e+01\n13 16670     2.056100e+02 4.744600e+02\n14 16670     3.350000e+02 1.204400e+02\n4 16671     2.218900e+02 -4.067700e+02\n11 16671     1.590700e+02 3.520001e+01\n13 16671     2.056100e+02 4.744600e+02\n4 16672     2.809301e+02 -4.067700e+02\n14 16672     3.124600e+02 2.225200e+02\n4 16673     2.100500e+02 -4.084900e+02\n14 16673     3.422000e+02 1.002600e+02\n4 16674     2.601500e+02 -4.090200e+02\n5 16674     4.250400e+02 2.880500e+02\n11 16674     1.606600e+02 9.126999e+01\n13 16674     1.948900e+02 5.345500e+02\n14 16674     3.230500e+02 1.879600e+02\n4 16675     -3.217100e+02 -4.098400e+02\n8 16675     1.657000e+02 -9.166998e+01\n4 16676     -3.517900e+02 -4.107200e+02\n6 16676     8.900024e+00 -1.081300e+02\n4 16677     1.776899e+02 -4.112400e+02\n11 16677     1.727700e+02 -2.671002e+01\n4 16678     7.085999e+01 -4.117000e+02\n5 16678     4.761801e+02 -4.063000e+01\n6 16678     -4.195400e+02 6.697600e+02\n4 16679     2.099100e+02 -4.154200e+02\n5 16679     4.544399e+02 1.968700e+02\n13 16679     2.206600e+02 4.573800e+02\n14 16679     3.525300e+02 1.007100e+02\n4 16680     2.242800e+02 -4.153000e+02\n5 16680     4.487900e+02 2.229400e+02\n11 16680     1.711600e+02 3.860999e+01\n4 16681     1.499100e+02 -4.160700e+02\n5 16681     4.680000e+02 9.534003e+01\n4 16682     2.852800e+02 -4.159500e+02\n5 16682     4.279399e+02 3.326500e+02\n4 16683     -1.679300e+02 -4.196700e+02\n5 16683     6.137500e+02 -4.876500e+02\n6 16683     -1.095500e+02 1.945600e+02\n14 16683     5.168600e+02 -5.689700e+02\n4 16684     1.502400e+02 -4.253100e+02\n11 16684     2.006800e+02 -6.104999e+01\n13 16684     2.454600e+02 3.761000e+02\n14 16684     3.815300e+02 6.179993e+00\n4 16685     7.254999e+01 -4.269600e+02\n11 16685     2.254200e+02 -1.674300e+02\n4 16686     1.000000e+01 -4.277100e+02\n5 16686     5.118300e+02 -1.433300e+02\n4 16687     -2.057900e+02 -4.285000e+02\n5 16687     6.443800e+02 -5.530601e+02\n6 16687     -5.983002e+01 1.371600e+02\n13 16687     3.737800e+02 -1.329400e+02\n4 16688     -1.672800e+02 -4.343000e+02\n14 16688     5.382600e+02 -5.640699e+02\n4 16689     1.508900e+02 -4.354800e+02\n11 16689     2.144400e+02 -5.872998e+01\n14 16689     3.963600e+02 8.570007e+00\n4 16690     2.280900e+02 -4.354000e+02\n5 16690     4.783199e+02 2.310300e+02\n4 16691     -1.873999e+01 -4.403800e+02\n5 16691     5.365800e+02 -1.904100e+02\n12 16691     -1.545100e+02 4.800400e+02\n14 16691     4.443800e+02 -2.741900e+02\n4 16692     -1.985100e+02 -4.449301e+02\n5 16692     6.668900e+02 -5.361500e+02\n6 16692     -4.129999e+01 1.602100e+02\n12 16692     -1.417999e+01 2.129400e+02\n4 16693     -2.598100e+02 -4.520601e+02\n6 16693     1.360999e+01 6.485999e+01\n4 16694     -2.618900e+02 -4.546000e+02\n15 16694     3.216998e+01 1.771000e+02\n4 16695     2.749900e+02 -4.546100e+02\n5 16695     4.959301e+02 3.126900e+02\n4 16696     1.066300e+02 -4.551000e+02\n5 16696     5.351801e+02 2.760999e+01\n11 16696     2.539000e+02 -1.161800e+02\n4 16697     4.590027e+00 -4.578600e+02\n5 16697     5.605000e+02 -1.466900e+02\n4 16698     1.486400e+02 -4.635400e+02\n6 16698     -3.743700e+02 8.594300e+02\n8 16698     -7.727002e+01 4.074100e+02\n4 16699     2.346100e+02 -4.699800e+02\n5 16699     5.271899e+02 2.461600e+02\n4 16700     2.346100e+02 -4.699800e+02\n5 16700     5.271899e+02 2.461600e+02\n13 16700     2.799100e+02 5.022400e+02\n4 16701     1.854399e+02 -4.735900e+02\n11 16701     2.553500e+02 -8.650024e+00\n14 16701     4.431300e+02 6.756000e+01\n4 16702     1.572100e+02 -4.739900e+02\n5 16702     5.535500e+02 1.158400e+02\n8 16702     -6.812000e+01 4.204600e+02\n11 16702     2.642700e+02 -4.433002e+01\n13 16702     3.031899e+02 3.928000e+02\n14 16702     4.503900e+02 2.427002e+01\n4 16703     2.152300e+02 -4.757700e+02\n11 16703     2.511100e+02 3.379999e+01\n13 16703     2.924200e+02 4.740500e+02\n4 16704     2.152300e+02 -4.757700e+02\n5 16704     5.429900e+02 2.122900e+02\n11 16704     2.511100e+02 3.379999e+01\n13 16704     2.924200e+02 4.740500e+02\n4 16705     2.757700e+02 -4.806300e+02\n5 16705     5.306899e+02 3.178300e+02\n4 16706     -3.495200e+02 -4.817500e+02\n8 16706     2.539300e+02 -8.416998e+01\n4 16707     7.264001e+01 -4.845800e+02\n6 16707     -2.997300e+02 7.053600e+02\n14 16707     4.862800e+02 -1.117200e+02\n4 16708     7.264001e+01 -4.845800e+02\n6 16708     -2.997300e+02 7.053600e+02\n9 16708     -2.733700e+02 4.079500e+02\n14 16708     4.862800e+02 -1.117200e+02\n4 16709     -2.969200e+02 -4.865000e+02\n6 16709     8.103003e+01 3.089001e+01\n4 16710     1.323000e+02 -4.890000e+02\n5 16710     5.802100e+02 7.673999e+01\n6 16710     -3.234800e+02 8.336500e+02\n8 16710     -4.538000e+01 3.867400e+02\n13 16710     3.257800e+02 3.616300e+02\n14 16710     4.776500e+02 -1.225000e+01\n4 16711     2.426000e+02 -4.894800e+02\n11 16711     2.676600e+02 7.514001e+01\n13 16711     3.001500e+02 5.177500e+02\n14 16711     4.457700e+02 1.662900e+02\n4 16712     -2.422300e+02 -4.897400e+02\n5 16712     7.496000e+02 -5.976700e+02\n8 16712     2.176100e+02 4.235999e+01\n9 16712     7.491998e+01 1.835400e+02\n4 16713     2.090500e+02 -4.977900e+02\n13 16713     3.213600e+02 4.675800e+02\n4 16714     4.753998e+01 -4.976000e+02\n6 16714     -2.677200e+02 6.604000e+02\n8 16714     -1.369000e+01 2.693800e+02\n4 16715     1.472000e+02 -5.019700e+02\n5 16715     5.961700e+02 1.025400e+02\n6 16715     -3.101000e+02 8.690100e+02\n8 16715     -3.560999e+01 4.071700e+02\n11 16715     3.040800e+02 -5.432001e+01\n13 16715     3.381700e+02 3.831500e+02\n14 16715     4.922000e+02 1.215002e+01\n4 16716     -8.950012e+00 -5.033700e+02\n5 16716     6.281100e+02 -1.596900e+02\n8 16716     7.559998e+00 1.910900e+02\n4 16717     3.885999e+01 -5.049000e+02\n8 16717     -3.359985e+00 2.577100e+02\n12 16717     -8.428003e+01 6.108400e+02\n14 16717     5.235500e+02 -1.620000e+02\n4 16718     1.475400e+02 -5.077500e+02\n5 16718     6.043800e+02 1.036500e+02\n6 16718     -3.011300e+02 8.703400e+02\n8 16718     -2.956000e+01 4.083800e+02\n13 16718     3.448300e+02 3.845000e+02\n14 16718     5.003101e+02 1.407001e+01\n4 16719     2.434100e+02 -5.087200e+02\n11 16719     2.922300e+02 7.828000e+01\n14 16719     4.726000e+02 1.691700e+02\n4 16720     2.434100e+02 -5.087200e+02\n5 16720     5.800800e+02 2.655600e+02\n11 16720     2.922300e+02 7.828000e+01\n14 16720     4.726000e+02 1.691700e+02\n4 16721     1.539900e+02 -5.098199e+02\n5 16721     6.059100e+02 1.146400e+02\n11 16721     3.120699e+02 -4.382001e+01\n13 16721     3.461899e+02 3.958200e+02\n14 16721     5.013199e+02 2.477002e+01\n4 16722     1.814001e+01 -5.105100e+02\n5 16722     6.333800e+02 -1.128800e+02\n6 16722     -2.336400e+02 6.054900e+02\n8 16722     7.809998e+00 2.295800e+02\n9 16722     -2.273400e+02 3.275500e+02\n12 16722     -6.688000e+01 5.741700e+02\n4 16723     2.547000e+02 -5.139000e+02\n11 16723     2.980400e+02 9.382001e+01\n4 16724     1.538600e+02 -5.143199e+02\n11 16724     3.180601e+02 -4.345001e+01\n4 16725     2.280400e+02 -5.178400e+02\n5 16725     5.993700e+02 2.389700e+02\n11 16725     3.051100e+02 5.710999e+01\n13 16725     3.386700e+02 4.989800e+02\n14 16725     4.911899e+02 1.443300e+02\n4 16726     -9.490997e+01 -5.223700e+02\n7 16726     4.094000e+01 4.461200e+02\n9 16726     -1.542500e+02 1.816500e+02\n4 16727     1.343500e+02 -5.269200e+02\n5 16727     6.338101e+02 8.513000e+01\n6 16727     -2.731200e+02 8.379000e+02\n11 16727     3.394399e+02 -6.709998e+01\n4 16728     2.343600e+02 -5.269500e+02\n5 16728     6.101300e+02 2.504800e+02\n4 16729     2.343600e+02 -5.269500e+02\n5 16729     6.101300e+02 2.504800e+02\n4 16730     2.095500e+02 -5.304800e+02\n5 16730     6.236300e+02 2.073500e+02\n11 16730     3.220200e+02 3.210001e+01\n13 16730     3.591400e+02 4.724400e+02\n14 16730     5.156700e+02 1.137700e+02\n4 16731     -5.150600e+02 -5.481000e+02\n10 16731     1.307500e+02 -1.586500e+02\n4 16732     -5.868400e+02 -5.527900e+02\n7 16732     1.523600e+02 -2.057900e+02\n10 16732     1.589700e+02 -2.413000e+02\n15 16732     2.683800e+02 -3.120400e+02\n4 16733     -3.088700e+02 -5.561400e+02\n7 16733     9.510999e+01 1.270900e+02\n10 16733     1.135300e+02 1.400000e+02\n13 16733     5.321200e+02 -2.208600e+02\n15 16733     2.079200e+02 1.390000e+02\n4 16734     9.590002e+01 -5.602100e+02\n5 16734     6.888600e+02 2.614001e+01\n6 16734     -1.955400e+02 7.825200e+02\n11 16734     3.954000e+02 -1.128800e+02\n14 16734     5.861200e+02 -5.876001e+01\n4 16735     -4.810000e+02 -5.615300e+02\n6 16735     2.536400e+02 -1.773000e+02\n10 16735     1.356500e+02 -1.115500e+02\n12 16735     2.644500e+02 -1.392300e+02\n15 16735     2.357100e+02 -1.578500e+02\n4 16736     1.311300e+02 -5.667000e+02\n6 16736     -2.022700e+02 8.574600e+02\n4 16737     1.311300e+02 -5.667000e+02\n6 16737     -2.022700e+02 8.574600e+02\n4 16738     1.702900e+02 -5.698500e+02\n5 16738     6.873199e+02 1.510900e+02\n13 16738     4.111700e+02 4.242500e+02\n14 16738     5.788300e+02 5.795001e+01\n4 16739     -3.584003e+01 -5.803900e+02\n11 16739     4.597300e+02 -2.878400e+02\n4 16740     1.156300e+02 3.753700e+02\n5 16740     -6.774400e+02 -2.238500e+02\n4 16741     9.557001e+01 7.639001e+01\n5 16741     -4.852100e+02 -5.992999e+01\n13 16741     -5.403600e+02 1.965800e+02\n14 16741     -5.600200e+02 -1.616700e+02\n4 16742     1.605900e+02 6.744000e+01\n5 16742     -4.679100e+02 7.053998e+01\n4 16743     1.571100e+02 5.408002e+01\n5 16743     -4.282600e+02 6.009998e+01\n11 16743     -4.781800e+02 -9.831000e+01\n13 16743     -5.117200e+02 3.004700e+02\n14 16743     -5.121000e+02 -4.284003e+01\n4 16744     2.279700e+02 3.934003e+01\n5 16744     -4.022600e+02 1.999200e+02\n11 16744     -4.644400e+02 9.059998e+00\n13 16744     -4.974400e+02 4.231100e+02\n14 16744     -4.796200e+02 9.487000e+01\n4 16745     2.358800e+02 3.959998e+01\n5 16745     -4.102300e+02 2.186300e+02\n11 16745     -4.610600e+02 2.219000e+01\n13 16745     -5.036700e+02 4.378600e+02\n14 16745     -4.850600e+02 1.118600e+02\n4 16746     2.396100e+02 3.333002e+01\n5 16746     -3.959500e+02 2.263400e+02\n13 16746     -4.911500e+02 4.470400e+02\n14 16746     -4.704100e+02 1.210100e+02\n4 16747     1.850900e+02 3.153998e+01\n5 16747     -3.666600e+02 1.069800e+02\n13 16747     -4.602300e+02 3.476500e+02\n4 16748     2.368700e+02 2.963000e+01\n5 16748     -3.859600e+02 2.198500e+02\n14 16748     -4.629200e+02 1.139200e+02\n4 16749     2.687100e+02 2.901001e+01\n5 16749     -4.035100e+02 2.890700e+02\n4 16750     1.134800e+02 1.823999e+01\n5 16750     -3.211000e+02 -3.144000e+01\n4 16751     1.206300e+02 -2.119995e+00\n11 16751     -4.223600e+02 -1.684500e+02\n4 16752     -2.261500e+02 -1.690002e+01\n10 16752     -7.339900e+02 6.825000e+01\n4 16753     7.009003e+01 -2.066998e+01\n5 16753     -2.074100e+02 -1.215700e+02\n4 16754     1.672200e+02 -2.262000e+01\n5 16754     -2.124100e+02 6.377002e+01\n4 16755     2.681400e+02 -2.390997e+01\n5 16755     -2.771900e+02 2.824800e+02\n11 16755     -3.746500e+02 7.345999e+01\n13 16755     -3.968200e+02 5.020200e+02\n14 16755     -3.563200e+02 1.765300e+02\n4 16756     1.426801e+02 -4.031000e+01\n5 16756     -1.759800e+02 2.058002e+01\n13 16756     -2.945400e+02 2.817500e+02\n14 16756     -2.605000e+02 -7.869000e+01\n4 16757     5.078003e+01 -4.553998e+01\n5 16757     -1.546100e+02 -1.539000e+02\n4 16758     2.422998e+01 -4.615997e+01\n5 16758     -1.500700e+02 -2.054500e+02\n7 16758     -7.975200e+02 4.475300e+02\n13 16758     -2.562600e+02 9.639999e+01\n14 16758     -2.327800e+02 -3.019000e+02\n4 16759     2.662700e+02 -5.052002e+01\n5 16759     -2.218300e+02 2.793900e+02\n11 16759     -3.368000e+02 7.260999e+01\n13 16759     -3.489600e+02 5.015700e+02\n14 16759     -3.017400e+02 1.735000e+02\n4 16760     2.851300e+02 -5.326001e+01\n5 16760     -2.182200e+02 3.143800e+02\n4 16761     1.103600e+02 -5.407001e+01\n11 16761     -3.493400e+02 -1.812300e+02\n13 16761     -2.657600e+02 2.340100e+02\n4 16762     1.103600e+02 -5.407001e+01\n5 16762     -1.465300e+02 -3.839001e+01\n13 16762     -2.657600e+02 2.340100e+02\n4 16763     2.463000e+01 -5.585999e+01\n5 16763     -1.313900e+02 -2.019400e+02\n4 16764     1.546000e+02 -5.672998e+01\n5 16764     -1.466400e+02 4.597998e+01\n11 16764     -3.543000e+02 -1.120900e+02\n13 16764     -2.728600e+02 3.048500e+02\n14 16764     -2.327000e+02 -5.266998e+01\n4 16765     2.755900e+02 -5.962000e+01\n5 16765     -2.040800e+02 2.978300e+02\n4 16766     -1.379999e+01 -6.053998e+01\n5 16766     -1.176900e+02 -2.754700e+02\n8 16766     -5.902600e+02 6.791000e+01\n4 16767     8.159973e+00 -6.053003e+01\n5 16767     -1.204000e+02 -2.328800e+02\n11 16767     -3.170300e+02 -3.374400e+02\n4 16768     2.222700e+02 -6.004999e+01\n13 16768     -2.953700e+02 4.194000e+02\n14 16768     -2.483300e+02 7.884000e+01\n4 16769     -4.791998e+01 -6.473999e+01\n5 16769     -1.044400e+02 -3.406200e+02\n7 16769     -7.054900e+02 3.207200e+02\n8 16769     -5.699700e+02 7.130005e+00\n10 16769     -7.261300e+02 4.734900e+02\n14 16769     -1.849100e+02 -4.365200e+02\n15 16769     -7.498100e+02 5.069500e+02\n4 16770     1.553400e+02 -7.059003e+01\n5 16770     -1.212500e+02 5.001001e+01\n11 16770     -3.316400e+02 -1.097200e+02\n13 16770     -2.510000e+02 3.093100e+02\n14 16770     -2.067500e+02 -4.897998e+01\n4 16771     8.535999e+01 -7.528003e+01\n5 16771     -1.033300e+02 -8.117999e+01\n8 16771     -6.010100e+02 2.544800e+02\n14 16771     -1.870500e+02 -1.777100e+02\n4 16772     2.456000e+02 -8.866998e+01\n13 16772     -2.583000e+02 4.620800e+02\n14 16772     -2.021200e+02 1.247800e+02\n4 16773     -1.215002e+01 -9.360999e+01\n5 16773     -5.428003e+01 -2.634700e+02\n8 16773     -5.336000e+02 8.276999e+01\n12 16773     -8.107400e+02 3.063600e+02\n4 16774     2.550300e+02 -9.581000e+01\n5 16774     -1.077400e+02 2.490000e+02\n13 16774     -2.504600e+02 4.787300e+02\n14 16774     -1.919500e+02 1.429900e+02\n4 16775     1.503800e+02 -1.170200e+02\n5 16775     -3.396002e+01 4.913000e+01\n4 16776     1.633000e+02 -1.292300e+02\n13 16776     -1.627100e+02 3.346300e+02\n14 16776     -1.014400e+02 -2.421997e+01\n4 16777     -5.548100e+02 -1.449300e+02\n7 16777     -3.307200e+02 -4.069500e+02\n4 16778     3.355900e+02 -1.488400e+02\n11 16778     -1.674900e+02 1.964600e+02\n14 16778     -1.594000e+02 3.240700e+02\n4 16779     1.070500e+02 -1.497900e+02\n5 16779     3.063000e+01 -2.550000e+01\n8 16779     -4.841400e+02 3.070100e+02\n4 16780     1.070500e+02 -1.497900e+02\n5 16780     3.063000e+01 -2.550000e+01\n8 16780     -4.841400e+02 3.070100e+02\n11 16780     -1.961600e+02 -1.693200e+02\n13 16780     -1.201400e+02 2.529800e+02\n14 16780     -5.688000e+01 -1.214400e+02\n4 16781     -1.988700e+02 -1.538800e+02\n8 16781     -3.219900e+02 -1.686000e+02\n10 16781     -4.723300e+02 2.014200e+02\n4 16782     -5.186200e+02 -1.560800e+02\n6 16782     -2.857700e+02 -6.094399e+02\n7 16782     -3.300100e+02 -3.553500e+02\n9 16782     -1.613900e+02 -4.196300e+02\n15 16782     -3.805400e+02 -4.424301e+02\n4 16783     -1.975900e+02 -1.616300e+02\n10 16783     -4.586900e+02 2.077500e+02\n4 16784     1.353800e+02 -1.651100e+02\n5 16784     5.400000e+01 2.959998e+01\n4 16785     -7.226001e+01 -1.723700e+02\n8 16785     -3.882100e+02 7.709991e+00\n4 16786     -2.534600e+02 -1.786700e+02\n7 16786     -4.018500e+02 3.192999e+01\n10 16786     -4.129700e+02 1.064800e+02\n15 16786     -3.947400e+02 9.088000e+01\n4 16787     1.649399e+02 -1.797400e+02\n13 16787     -8.859003e+01 3.485000e+02\n14 16787     -1.366998e+01 -1.190997e+01\n4 16788     -7.206300e+02 -1.799000e+02\n7 16788     -2.319500e+02 -5.660900e+02\n4 16789     -2.270700e+02 -1.808500e+02\n7 16789     -4.102900e+02 7.652002e+01\n13 16789     3.190002e+01 -2.356100e+02\n4 16790     -5.665700e+02 -1.876400e+02\n9 16790     -7.863000e+01 -4.340400e+02\n4 16791     1.652000e+02 -1.926400e+02\n13 16791     -6.984003e+01 3.513500e+02\n14 16791     8.409973e+00 -9.429993e+00\n4 16792     -6.009800e+02 -1.939000e+02\n9 16792     -4.175000e+01 -4.577700e+02\n4 16793     -6.908000e+02 -1.972400e+02\n6 16793     -7.870001e+01 -7.796801e+02\n7 16793     -2.179200e+02 -5.254100e+02\n9 16793     4.022998e+01 -5.233900e+02\n4 16794     -6.908000e+02 -1.972400e+02\n9 16794     4.022998e+01 -5.233900e+02\n4 16795     1.600300e+02 -2.003300e+02\n13 16795     -5.709003e+01 3.465300e+02\n14 16795     2.241998e+01 -1.633002e+01\n4 16796     -1.251100e+02 -2.062700e+02\n15 16796     -3.634400e+02 4.097000e+02\n4 16797     9.271997e+01 -2.161500e+02\n8 16797     -3.790700e+02 2.941900e+02\n4 16798     -7.452500e+02 -2.283700e+02\n7 16798     -1.669400e+02 -5.597200e+02\n4 16799     2.316000e+02 -2.394500e+02\n5 16799     1.618400e+02 2.183500e+02\n11 16799     -8.189001e+01 2.853000e+01\n4 16800     1.627800e+02 -2.511600e+02\n5 16800     1.998500e+02 9.412000e+01\n4 16801     -6.488500e+02 -2.515500e+02\n9 16801     5.464001e+01 -4.481500e+02\n4 16802     3.472400e+02 -2.766100e+02\n11 16802     1.723999e+01 2.232500e+02\n4 16803     -8.047900e+02 -2.828100e+02\n6 16803     1.020100e+02 -8.173400e+02\n4 16804     -6.523900e+02 -2.860400e+02\n6 16804     -2.001953e-02 -6.446100e+02\n7 16804     -1.233600e+02 -4.266000e+02\n9 16804     8.758002e+01 -4.253500e+02\n4 16805     -1.998700e+02 -3.055400e+02\n5 16805     4.229800e+02 -5.730000e+02\n6 16805     -3.039700e+02 5.346002e+01\n7 16805     -2.435700e+02 1.768900e+02\n9 16805     -2.210600e+02 7.312000e+01\n12 16805     -2.466300e+02 1.061000e+02\n4 16806     6.783002e+01 -3.126600e+02\n5 16806     3.189700e+02 -6.433002e+01\n11 16806     6.328998e+01 -1.960600e+02\n12 16806     -4.187400e+02 5.955500e+02\n4 16807     1.639600e+02 -3.180300e+02\n5 16807     3.105601e+02 1.059400e+02\n13 16807     1.045200e+02 3.755600e+02\n4 16808     -2.039400e+02 -3.267000e+02\n5 16808     4.656000e+02 -5.754000e+02\n6 16808     -2.527300e+02 6.340997e+01\n4 16809     -6.937600e+02 -3.277300e+02\n9 16809     1.534500e+02 -4.266000e+02\n4 16810     -8.341300e+02 -3.291300e+02\n9 16810     2.567400e+02 -5.212100e+02\n4 16811     -1.393900e+02 -3.297600e+02\n7 16811     -2.135700e+02 2.964600e+02\n8 16811     -1.240000e+02 -1.917999e+01\n10 16811     -1.566500e+02 4.100200e+02\n13 16811     1.945900e+02 -5.871002e+01\n14 16811     3.159800e+02 -5.241700e+02\n4 16812     -1.846800e+02 -3.303300e+02\n7 16812     -2.118200e+02 2.136300e+02\n12 16812     -2.147500e+02 1.481800e+02\n4 16813     -7.739700e+02 -3.484300e+02\n9 16813     2.271600e+02 -4.672000e+02\n4 16814     -7.194200e+02 -3.517200e+02\n9 16814     1.909000e+02 -4.274400e+02\n4 16815     -4.100300e+02 -3.708800e+02\n12 16815     -1.157001e+01 -1.769600e+02\n4 16816     2.863000e+01 -3.730200e+02\n6 16816     -4.634900e+02 5.577600e+02\n11 16816     1.613100e+02 -2.416000e+02\n12 16816     -2.894600e+02 5.406800e+02\n14 16816     3.305200e+02 -2.110400e+02\n4 16817     2.863000e+01 -3.730200e+02\n6 16817     -4.634900e+02 5.577600e+02\n11 16817     1.613100e+02 -2.416000e+02\n12 16817     -2.894600e+02 5.406800e+02\n14 16817     3.305200e+02 -2.110400e+02\n4 16818     6.525000e+01 -3.838100e+02\n8 16818     -1.458500e+02 2.778200e+02\n4 16819     3.432600e+02 -3.849700e+02\n5 16819     3.309500e+02 4.571700e+02\n11 16819     1.606600e+02 2.232200e+02\n14 16819     2.348700e+02 3.484300e+02\n4 16820     2.282300e+02 -3.871700e+02\n5 16820     4.035601e+02 2.287700e+02\n11 16820     1.316200e+02 4.332001e+01\n13 16820     1.774500e+02 4.832700e+02\n14 16820     3.023800e+02 1.309800e+02\n4 16821     1.916600e+02 -3.969100e+02\n13 16821     2.008700e+02 4.292300e+02\n14 16821     3.294900e+02 6.878998e+01\n4 16822     -3.468100e+02 -4.001900e+02\n6 16822     -9.130005e+00 -1.089200e+02\n9 16822     4.434998e+01 1.534998e+01\n12 16822     -3.390015e+00 -5.664001e+01\n4 16823     2.745800e+02 -4.094400e+02\n5 16823     4.227600e+02 3.113600e+02\n4 16824     -4.960300e+02 -4.110600e+02\n8 16824     2.324800e+02 -3.021400e+02\n12 16824     7.723999e+01 -2.772000e+02\n4 16825     1.378000e+02 -4.143900e+02\n5 16825     4.677800e+02 7.494000e+01\n6 16825     -4.531800e+02 8.171500e+02\n8 16825     -1.299400e+02 3.890500e+02\n4 16826     2.725300e+02 -4.142000e+02\n5 16826     4.300699e+02 3.098500e+02\n11 16826     1.678400e+02 1.089000e+02\n4 16827     1.661801e+02 -4.153400e+02\n8 16827     -1.367600e+02 4.305500e+02\n11 16827     1.824700e+02 -4.103003e+01\n13 16827     2.299800e+02 3.957600e+02\n14 16827     3.634399e+02 2.990002e+01\n4 16828     -1.163500e+02 -4.178200e+02\n6 16828     -2.820700e+02 2.866700e+02\n11 16828     2.469900e+02 -4.509500e+02\n12 16828     -1.352000e+02 2.954700e+02\n15 16828     8.421002e+01 5.487600e+02\n4 16829     -7.680600e+02 -4.186200e+02\n7 16829     4.931000e+01 -4.679800e+02\n9 16829     2.718800e+02 -4.168000e+02\n4 16830     -2.962300e+02 -4.184100e+02\n12 16830     -2.390015e+00 3.709003e+01\n4 16831     -2.962300e+02 -4.184100e+02\n6 16831     -1.427002e+01 -1.623999e+01\n8 16831     1.654200e+02 -5.473001e+01\n12 16831     -2.390015e+00 3.709003e+01\n4 16832     7.750000e+01 -4.266900e+02\n5 16832     4.978800e+02 -2.684003e+01\n6 16832     -3.970600e+02 6.902300e+02\n11 16832     2.233100e+02 -1.621000e+02\n4 16833     -1.678300e+02 -4.267100e+02\n5 16833     6.237900e+02 -4.845699e+02\n7 16833     -9.479999e+01 2.772300e+02\n13 16833     3.587500e+02 -8.308002e+01\n14 16833     5.264000e+02 -5.658700e+02\n4 16834     -3.392999e+01 -4.332100e+02\n8 16834     -5.996002e+01 1.405400e+02\n4 16835     -5.938900e+02 -4.352100e+02\n9 16835     1.907500e+02 -2.474400e+02\n4 16836     -7.777100e+02 -4.364301e+02\n6 16836     2.425600e+02 -6.491000e+02\n4 16837     -1.928200e+02 -4.427500e+02\n13 16837     3.867100e+02 -1.123200e+02\n4 16838     5.034003e+01 -4.558199e+02\n6 16838     -3.357200e+02 6.456600e+02\n12 16838     -1.663300e+02 6.141600e+02\n4 16839     -3.435200e+02 -4.590300e+02\n7 16839     -1.003003e+01 3.760999e+01\n4 16840     -2.145400e+02 -4.599100e+02\n7 16840     -4.231000e+01 2.174100e+02\n4 16841     1.677000e+02 -4.609700e+02\n11 16841     2.436899e+02 -3.220001e+01\n13 16841     2.853900e+02 4.053900e+02\n14 16841     4.291600e+02 3.929999e+01\n4 16842     1.453101e+02 -4.659900e+02\n11 16842     2.569399e+02 -6.138000e+01\n4 16843     -2.920100e+02 -4.698400e+02\n12 16843     6.991998e+01 7.984003e+01\n4 16844     1.261200e+02 -4.803000e+02\n5 16844     5.689100e+02 6.457001e+01\n6 16844     -3.344100e+02 8.169100e+02\n8 16844     -5.291998e+01 3.769800e+02\n11 16844     2.826600e+02 -8.409998e+01\n4 16845     1.745300e+02 -4.818800e+02\n5 16845     5.617600e+02 1.453400e+02\n11 16845     2.696600e+02 -2.009003e+01\n13 16845     3.092400e+02 4.185500e+02\n14 16845     4.576000e+02 5.371002e+01\n4 16846     -5.314900e+02 -4.827300e+02\n6 16846     1.793000e+02 -3.092800e+02\n12 16846     1.855400e+02 -2.718300e+02\n13 16846     4.937400e+02 -4.959301e+02\n15 16846     1.391800e+02 -2.714100e+02\n4 16847     2.797300e+02 -4.858199e+02\n5 16847     5.385699e+02 3.244100e+02\n13 16847     2.868199e+02 5.695500e+02\n14 16847     4.301200e+02 2.241300e+02\n4 16848     2.754800e+02 -4.860300e+02\n5 16848     5.388900e+02 3.174000e+02\n13 16848     2.887300e+02 5.638300e+02\n14 16848     4.328199e+02 2.187400e+02\n4 16849     6.731000e+01 -4.924900e+02\n5 16849     5.983000e+02 -3.269000e+01\n4 16850     6.731000e+01 -4.924900e+02\n5 16850     5.983000e+02 -3.269000e+01\n11 16850     3.150500e+02 -1.635300e+02\n4 16851     6.731000e+01 -4.924900e+02\n5 16851     5.983000e+02 -3.269000e+01\n4 16852     -2.526500e+02 -4.936000e+02\n12 16852     8.334003e+01 1.557600e+02\n4 16853     4.721002e+01 -4.972600e+02\n8 16853     -1.401001e+01 2.689400e+02\n9 16853     -2.514700e+02 3.705900e+02\n4 16854     1.536200e+02 -4.991700e+02\n11 16854     2.985699e+02 -4.565002e+01\n4 16855     6.337000e+01 -5.032000e+02\n5 16855     6.143800e+02 -3.709998e+01\n6 16855     -2.658900e+02 6.946600e+02\n4 16856     4.600000e+01 -5.169900e+02\n8 16856     6.969971e+00 2.690800e+02\n11 16856     3.533400e+02 -1.882500e+02\n13 16856     3.744800e+02 2.481200e+02\n4 16857     1.369800e+02 -5.180800e+02\n5 16857     6.199301e+02 8.725000e+01\n6 16857     -2.781400e+02 8.557300e+02\n8 16857     -1.544000e+01 3.955700e+02\n11 16857     3.260900e+02 -6.612000e+01\n4 16858     -9.890997e+01 -5.219500e+02\n7 16858     4.116998e+01 4.393500e+02\n9 16858     -1.516300e+02 1.777800e+02\n13 16858     4.102600e+02 5.131000e+01\n4 16859     -2.693300e+02 -5.227000e+02\n6 16859     1.099800e+02 9.672998e+01\n8 16859     2.621000e+02 2.620001e+01\n12 16859     1.304500e+02 1.478500e+02\n4 16860     1.483600e+02 -5.244301e+02\n8 16860     -1.279999e+01 4.104100e+02\n4 16861     -3.042700e+02 -5.260699e+02\n6 16861     1.298900e+02 4.665997e+01\n4 16862     -2.022000e+02 -5.296100e+02\n6 16862     5.581000e+01 2.067700e+02\n4 16863     1.348300e+02 -5.347000e+02\n14 16863     5.396300e+02 -6.979980e+00\n4 16864     -4.609900e+02 -5.391300e+02\n6 16864     2.202600e+02 -1.664000e+02\n7 16864     1.077300e+02 -7.289001e+01\n8 16864     3.509600e+02 -1.761300e+02\n12 16864     2.305900e+02 -1.270500e+02\n15 16864     2.011200e+02 -1.362900e+02\n4 16865     1.876600e+02 -5.393000e+02\n14 16865     5.339900e+02 8.104001e+01\n4 16866     8.392999e+01 -5.457700e+02\n6 16866     -2.113400e+02 7.525900e+02\n4 16867     -5.891100e+02 -5.494100e+02\n7 16867     1.498400e+02 -2.093500e+02\n4 16868     3.914001e+01 -5.510601e+02\n5 16868     6.878500e+02 -6.865997e+01\n8 16868     4.325000e+01 2.648900e+02\n4 16869     1.029300e+02 -5.532300e+02\n6 16869     -2.098700e+02 7.953000e+02\n4 16870     5.113000e+01 -5.541500e+02\n9 16870     -1.937000e+02 3.836900e+02\n4 16871     1.806100e+02 -5.638700e+02\n5 16871     6.773500e+02 1.644900e+02\n13 16871     4.033700e+02 4.379200e+02\n14 16871     5.690400e+02 7.359998e+01\n4 16872     1.650300e+02 -5.685200e+02\n8 16872     2.721997e+01 4.346200e+02\n13 16872     4.109900e+02 4.174400e+02\n14 16872     5.786100e+02 4.985999e+01\n4 16873     -3.459200e+02 1.264100e+02\n13 16873     -3.528100e+02 -5.323600e+02\n4 16874     1.584100e+02 9.970001e+01\n5 16874     -5.630500e+02 7.251001e+01\n11 16874     -5.176500e+02 -8.681000e+01\n13 16874     -6.166800e+02 3.029600e+02\n4 16875     1.425400e+02 9.309000e+01\n5 16875     -5.410800e+02 3.697998e+01\n11 16875     -5.086800e+02 -1.143500e+02\n13 16875     -5.973400e+02 2.760500e+02\n14 16875     -6.152500e+02 -6.473999e+01\n4 16876     -5.590002e+01 5.907001e+01\n13 16876     -4.230200e+02 -5.941998e+01\n14 16876     -4.541200e+02 -4.844800e+02\n4 16877     1.117500e+02 4.909998e+01\n11 16877     -4.639700e+02 -1.675500e+02\n13 16877     -4.797200e+02 2.225100e+02\n14 16877     -4.849300e+02 -1.351200e+02\n4 16878     2.237800e+02 4.688000e+01\n5 16878     -4.170500e+02 1.913200e+02\n14 16878     -4.937400e+02 8.567999e+01\n4 16879     1.004900e+02 4.416998e+01\n13 16879     -4.652300e+02 2.081000e+02\n14 16879     -4.695800e+02 -1.537600e+02\n4 16880     1.004900e+02 4.416998e+01\n13 16880     -4.652300e+02 2.081000e+02\n14 16880     -4.695800e+02 -1.537600e+02\n4 16881     1.478300e+02 3.956000e+01\n13 16881     -4.691600e+02 2.857400e+02\n14 16881     -4.642900e+02 -6.290002e+01\n4 16882     1.126200e+02 3.882001e+01\n11 16882     -4.543900e+02 -1.717300e+02\n4 16883     1.948101e+02 3.621002e+01\n5 16883     -3.807900e+02 1.296000e+02\n4 16884     1.107200e+02 9.010010e+00\n5 16884     -2.930300e+02 -3.890997e+01\n4 16885     7.734003e+01 -3.844000e+01\n5 16885     -1.721200e+02 -1.044900e+02\n13 16885     -2.810000e+02 1.778100e+02\n14 16885     -2.552300e+02 -2.016000e+02\n4 16886     1.958700e+02 -4.937000e+01\n13 16886     -2.993400e+02 3.700500e+02\n14 16886     -2.576000e+02 2.342999e+01\n4 16887     1.599301e+02 -5.740997e+01\n5 16887     -1.440300e+02 5.616998e+01\n11 16887     -3.502300e+02 -1.055400e+02\n13 16887     -2.704000e+02 3.131300e+02\n14 16887     -2.289500e+02 -4.328003e+01\n4 16888     8.950012e+00 -6.838000e+01\n5 16888     -1.057600e+02 -2.294700e+02\n8 16888     -5.849200e+02 1.126600e+02\n11 16888     -3.035800e+02 -3.350500e+02\n4 16889     2.284900e+02 -7.627002e+01\n13 16889     -2.710600e+02 4.309300e+02\n14 16889     -2.195600e+02 9.063000e+01\n4 16890     2.284900e+02 -7.627002e+01\n13 16890     -2.710600e+02 4.309300e+02\n14 16890     -2.195600e+02 9.063000e+01\n4 16891     2.353700e+02 -8.154999e+01\n13 16891     -2.658100e+02 4.434600e+02\n14 16891     -2.124900e+02 1.044300e+02\n4 16892     -1.751001e+01 -8.901001e+01\n5 16892     -6.334003e+01 -2.748800e+02\n10 16892     -6.967800e+02 5.522100e+02\n4 16893     7.519000e+01 -8.915997e+01\n8 16893     -5.750800e+02 2.393100e+02\n4 16894     -1.615002e+01 -1.006800e+02\n8 16894     -5.207700e+02 7.817999e+01\n11 16894     -2.459800e+02 -3.655900e+02\n12 16894     -7.913700e+02 3.014400e+02\n4 16895     2.643900e+02 -1.040100e+02\n11 16895     -2.780200e+02 6.262000e+01\n4 16896     3.158900e+02 -1.390800e+02\n11 16896     -1.996100e+02 1.566200e+02\n4 16897     1.128200e+02 -1.474100e+02\n5 16897     2.575000e+01 -1.515002e+01\n4 16898     7.421997e+01 -1.754400e+02\n8 16898     -4.327500e+02 2.556800e+02\n11 16898     -1.480400e+02 -2.134900e+02\n12 16898     -6.969700e+02 5.453900e+02\n4 16899     1.654100e+02 -2.010000e+02\n5 16899     1.121400e+02 9.014001e+01\n4 16900     -7.313100e+02 -2.379100e+02\n9 16900     1.089000e+02 -5.200699e+02\n4 16901     -7.610000e+02 -2.452000e+02\n9 16901     1.386899e+02 -5.353101e+02\n4 16902     -7.459900e+02 -2.501700e+02\n9 16902     1.307600e+02 -5.207900e+02\n4 16903     -6.725800e+02 -2.497500e+02\n9 16903     7.153998e+01 -4.691700e+02\n4 16904     -6.725800e+02 -2.497500e+02\n7 16904     -1.621900e+02 -4.706300e+02\n4 16905     1.496300e+02 -2.595300e+02\n13 16905     2.821002e+01 3.427000e+02\n14 16905     1.235400e+02 -2.340002e+01\n4 16906     -6.696200e+02 -2.662900e+02\n9 16906     8.353003e+01 -4.541899e+02\n4 16907     -3.599300e+02 -2.659700e+02\n8 16907     -1.148999e+01 -2.506700e+02\n12 16907     -2.098400e+02 -1.914100e+02\n13 16907     2.091000e+02 -3.830700e+02\n4 16908     3.124800e+02 -2.695700e+02\n5 16908     1.619000e+02 3.862500e+02\n11 16908     -9.900024e+00 1.654200e+02\n4 16909     -6.701800e+02 -2.790400e+02\n7 16909     -1.256200e+02 -4.500000e+02\n4 16910     -7.266800e+02 -3.077500e+02\n9 16910     1.626600e+02 -4.633800e+02\n4 16911     -7.437500e+02 -3.320900e+02\n7 16911     -4.853998e+01 -4.935800e+02\n4 16912     -7.378998e+01 -3.343700e+02\n8 16912     -1.634900e+02 5.607001e+01\n4 16913     -8.681400e+02 -3.570500e+02\n9 16913     2.997600e+02 -5.231400e+02\n4 16914     -3.968100e+02 -3.586900e+02\n12 16914     -3.798999e+01 -1.650800e+02\n4 16915     1.537500e+02 -3.628900e+02\n6 16915     -5.560700e+02 8.338000e+02\n4 16916     -4.171000e+02 -3.774800e+02\n7 16916     -8.795001e+01 -1.026200e+02\n4 16917     2.284700e+02 -3.807900e+02\n11 16917     1.248400e+02 4.285001e+01\n4 16918     -3.983700e+02 -3.926900e+02\n6 16918     1.301001e+01 -1.920699e+02\n8 16918     1.859300e+02 -1.861200e+02\n4 16919     1.397300e+02 -3.935200e+02\n8 16919     -1.549100e+02 3.914400e+02\n4 16920     1.397300e+02 -3.935200e+02\n8 16920     -1.549100e+02 3.914400e+02\n4 16921     -3.527800e+02 -3.988100e+02\n6 16921     -5.010010e+00 -1.196600e+02\n4 16922     1.440900e+02 -4.112300e+02\n11 16922     1.831900e+02 -7.173999e+01\n4 16923     -1.735100e+02 -4.200700e+02\n5 16923     6.174700e+02 -4.975699e+02\n6 16923     -1.027700e+02 1.871900e+02\n12 16923     -6.773999e+01 2.381200e+02\n13 16923     3.534900e+02 -9.278998e+01\n4 16924     -3.749000e+02 -4.475900e+02\n6 16924     7.085999e+01 -1.142000e+02\n8 16924     2.331400e+02 -1.292900e+02\n12 16924     7.765002e+01 -6.541998e+01\n4 16925     -1.710700e+02 -4.511899e+02\n14 16925     5.638199e+02 -5.649200e+02\n4 16926     2.685100e+02 -4.558000e+02\n5 16926     4.984600e+02 3.025500e+02\n14 16926     3.916000e+02 2.026900e+02\n4 16927     -2.233300e+02 -4.761300e+02\n5 16927     7.226200e+02 -5.707600e+02\n6 16927     2.101001e+01 1.387800e+02\n10 16927     -6.250000e+00 2.509300e+02\n15 16927     6.498999e+01 2.666600e+02\n4 16928     -2.233300e+02 -4.761300e+02\n6 16928     2.101001e+01 1.387800e+02\n4 16929     1.770020e+00 -4.808199e+02\n5 16929     5.943600e+02 -1.468800e+02\n4 16930     -3.059998e+00 -4.837100e+02\n5 16930     5.980500e+02 -1.545600e+02\n6 16930     -2.637700e+02 5.506900e+02\n4 16931     2.429993e+00 -4.922200e+02\n5 16931     6.110300e+02 -1.432500e+02\n6 16931     -2.525300e+02 5.666200e+02\n11 16931     3.328700e+02 -2.539800e+02\n12 16931     -8.092999e+01 5.426100e+02\n4 16932     -4.560400e+02 -4.985200e+02\n8 16932     3.164300e+02 -1.886300e+02\n4 16933     -2.285700e+02 -5.011200e+02\n5 16933     7.613400e+02 -5.713500e+02\n6 16933     5.751001e+01 1.466900e+02\n12 16933     8.203998e+01 1.995900e+02\n4 16934     -7.399902e-01 -5.235699e+02\n5 16934     6.539600e+02 -1.424200e+02\n6 16934     -2.061500e+02 5.739400e+02\n4 16935     -4.923400e+02 -5.247200e+02\n10 16935     9.378998e+01 -1.404200e+02\n4 16936     -2.661300e+02 -5.309900e+02\n12 16936     1.395800e+02 1.572000e+02\n4 16937     -4.040700e+02 -5.682400e+02\n7 16937     1.280400e+02 1.113000e+01\n13 16937     5.583600e+02 -3.244500e+02\n4 16938     -3.393100e+02 1.223100e+02\n13 16938     -3.486200e+02 -5.207700e+02\n4 16939     1.198600e+02 7.647998e+01\n13 16939     -5.467100e+02 2.322700e+02\n14 16939     -5.620500e+02 -1.191600e+02\n4 16940     1.198600e+02 7.647998e+01\n11 16940     -4.926900e+02 -1.564900e+02\n4 16941     1.031300e+02 6.340002e+01\n11 16941     -4.749000e+02 -1.793000e+02\n4 16942     1.463600e+02 1.494000e+01\n5 16942     -3.141500e+02 3.284998e+01\n13 16942     -4.093200e+02 2.843000e+02\n14 16942     -3.946600e+02 -6.807001e+01\n4 16943     5.753003e+01 1.415002e+01\n5 16943     -3.011700e+02 -1.395800e+02\n4 16944     3.060200e+02 -4.900024e+00\n11 16944     -3.866900e+02 1.382700e+02\n14 16944     -4.226700e+02 2.569500e+02\n4 16945     -6.619995e+00 -3.006000e+01\n5 16945     -1.781700e+02 -2.690300e+02\n13 16945     -2.788700e+02 4.201001e+01\n14 16945     -2.658700e+02 -3.674800e+02\n4 16946     2.735400e+02 -2.890997e+01\n5 16946     -2.656100e+02 2.884900e+02\n13 16946     -3.876600e+02 5.083000e+02\n14 16946     -3.457300e+02 1.833900e+02\n4 16947     -6.864001e+01 -5.546002e+01\n5 16947     -1.199500e+02 -3.835900e+02\n7 16947     -7.101500e+02 2.754000e+02\n8 16947     -5.782300e+02 -3.617999e+01\n11 16947     -3.095700e+02 -4.619900e+02\n13 16947     -2.189300e+02 -4.456000e+01\n14 16947     -2.007700e+02 -4.797400e+02\n4 16948     2.720500e+02 -5.616998e+01\n5 16948     -2.094300e+02 2.911300e+02\n4 16949     2.228600e+02 -7.152002e+01\n13 16949     -2.760400e+02 4.202600e+02\n14 16949     -2.261900e+02 7.891000e+01\n4 16950     3.048500e+02 -1.277800e+02\n11 16950     -2.175000e+02 1.398100e+02\n4 16951     -5.562000e+01 -1.579700e+02\n8 16951     -4.143400e+02 2.654001e+01\n12 16951     -6.382300e+02 2.514600e+02\n4 16952     -7.050400e+02 -2.136300e+02\n7 16952     -1.954700e+02 -5.278199e+02\n10 16952     -2.791400e+02 -5.676300e+02\n4 16953     -6.545900e+02 -2.251000e+02\n9 16953     3.450000e+01 -4.731500e+02\n4 16954     -3.596600e+02 -2.732900e+02\n7 16954     -2.330800e+02 -7.904999e+01\n8 16954     1.359985e+00 -2.380700e+02\n4 16955     -7.956100e+02 -2.886800e+02\n7 16955     -8.360999e+01 -5.723500e+02\n4 16956     -7.146100e+02 -3.178700e+02\n9 16956     1.623300e+02 -4.489399e+02\n4 16957     -6.978100e+02 -3.180700e+02\n9 16957     1.496300e+02 -4.356000e+02\n4 16958     -3.630900e+02 -3.572900e+02\n8 16958     1.266400e+02 -1.692700e+02\n4 16959     8.603003e+01 -3.827600e+02\n8 16959     -1.523800e+02 3.092400e+02\n4 16960     -1.327800e+02 -4.062000e+02\n11 16960     2.295200e+02 -4.805900e+02\n12 16960     -1.434100e+02 2.612100e+02\n13 16960     2.881200e+02 -2.790002e+01\n14 16960     4.359000e+02 -4.890601e+02\n4 16961     -1.182600e+02 -4.057000e+02\n6 16961     -2.991500e+02 2.748000e+02\n9 16961     -2.620600e+02 1.162400e+02\n4 16962     -1.394500e+02 -4.081300e+02\n6 16962     -2.721800e+02 2.365300e+02\n14 16962     4.408101e+02 -5.002600e+02\n4 16963     2.230000e+02 -4.181000e+02\n5 16963     4.539500e+02 2.214100e+02\n13 16963     2.189800e+02 4.784100e+02\n14 16963     3.508700e+02 1.246500e+02\n4 16964     1.719200e+02 -4.200100e+02\n14 16964     3.686801e+02 4.065002e+01\n4 16965     -7.625200e+02 -4.335900e+02\n7 16965     6.183002e+01 -4.513900e+02\n9 16965     2.760000e+02 -4.028100e+02\n4 16966     2.717400e+02 -4.326800e+02\n5 16966     4.605699e+02 3.070700e+02\n13 16966     2.235300e+02 5.526700e+02\n14 16966     3.563700e+02 2.072800e+02\n4 16967     -3.576000e+02 -4.493300e+02\n6 16967     5.971997e+01 -8.816998e+01\n4 16968     4.023999e+01 -4.703199e+02\n11 16968     2.935500e+02 -2.049500e+02\n14 16968     4.729000e+02 -1.661300e+02\n4 16969     -5.100600e+02 -4.714200e+02\n6 16969     1.608900e+02 -2.889200e+02\n8 16969     3.034800e+02 -2.744900e+02\n12 16969     1.654100e+02 -2.485400e+02\n4 16970     3.026700e+02 -5.079900e+02\n5 16970     5.619500e+02 3.655900e+02\n14 16970     4.532900e+02 2.647000e+02\n4 16971     -4.842000e+02 -5.160300e+02\n7 16971     8.657001e+01 -1.116700e+02\n12 16971     2.104301e+02 -1.755800e+02\n4 16972     2.256600e+02 -5.164200e+02\n5 16972     5.973199e+02 2.349600e+02\n11 16972     3.029600e+02 5.310999e+01\n13 16972     3.372500e+02 4.946800e+02\n14 16972     4.895500e+02 1.395200e+02\n4 16973     -5.457300e+02 -5.222800e+02\n6 16973     2.244000e+02 -2.970601e+02\n8 16973     3.529000e+02 -2.921700e+02\n12 16973     2.371600e+02 -2.617900e+02\n13 16973     5.345300e+02 -4.976400e+02\n4 16974     2.114800e+02 -5.312600e+02\n5 16974     6.239301e+02 2.115900e+02\n13 16974     3.592500e+02 4.761400e+02\n14 16974     5.155100e+02 1.180400e+02\n4 16975     2.590500e+02 -5.448101e+02\n5 16975     6.270800e+02 2.949100e+02\n13 16975     3.592700e+02 5.490400e+02\n4 16976     1.109400e+02 7.346997e+01\n5 16976     -4.705200e+02 -3.362000e+01\n4 16977     2.342400e+02 7.094000e+01\n5 16977     -4.759300e+02 2.163100e+02\n4 16978     1.737300e+02 6.476001e+01\n11 16978     -4.847400e+02 -7.184003e+01\n4 16979     2.300699e+02 5.391998e+01\n5 16979     -4.439600e+02 2.069600e+02\n11 16979     -4.832000e+02 1.245001e+01\n13 16979     -5.242900e+02 4.273500e+02\n14 16979     -5.113800e+02 1.010000e+02\n4 16980     6.754999e+01 3.234998e+01\n5 16980     -3.532700e+02 -1.163600e+02\n4 16981     2.006000e+01 2.888000e+01\n5 16981     -3.388000e+02 -2.145500e+02\n11 16981     -4.288600e+02 -3.125400e+02\n4 16982     3.502002e+01 2.912000e+01\n5 16982     -3.430700e+02 -1.812900e+02\n11 16982     -4.289200e+02 -2.943400e+02\n4 16983     3.212000e+01 -4.580017e+00\n5 16983     -2.452200e+02 -1.906400e+02\n4 16984     1.399600e+02 -4.630005e+00\n13 16984     -3.623000e+02 2.699500e+02\n14 16984     -3.409400e+02 -8.831000e+01\n4 16985     2.610699e+02 -1.058002e+01\n13 16985     -4.227200e+02 4.883200e+02\n4 16986     -8.469971e+00 -4.221997e+01\n5 16986     -1.523300e+02 -2.693300e+02\n7 16986     -7.815300e+02 3.823900e+02\n11 16986     -3.439200e+02 -3.663800e+02\n13 16986     -2.545500e+02 4.509998e+01\n4 16987     -9.260010e+00 -5.731000e+01\n5 16987     -1.241500e+02 -2.671300e+02\n4 16988     -4.364000e+02 -6.484003e+01\n7 16988     -4.950300e+02 -3.093000e+02\n13 16988     -3.272998e+01 -5.649200e+02\n4 16989     -3.694000e+01 -6.753998e+01\n7 16989     -6.998500e+02 3.496200e+02\n11 16989     -2.951800e+02 -4.040200e+02\n13 16989     -2.078900e+02 1.162000e+01\n14 16989     -1.807200e+02 -4.131300e+02\n4 16990     3.127100e+02 -6.676001e+01\n5 16990     -2.091000e+02 3.722600e+02\n14 16990     -2.896900e+02 2.603100e+02\n4 16991     -6.305200e+02 -1.014300e+02\n9 16991     -1.119400e+02 -5.568700e+02\n4 16992     -5.521500e+02 -1.604000e+02\n6 16992     -2.489400e+02 -6.506100e+02\n4 16993     1.581300e+02 -1.614700e+02\n5 16993     4.687000e+01 7.223999e+01\n4 16994     3.149399e+02 -1.789700e+02\n11 16994     -1.394600e+02 1.593800e+02\n4 16995     -4.372900e+02 -2.754200e+02\n6 16995     -1.626500e+02 -3.663199e+02\n7 16995     -2.009900e+02 -1.820000e+02\n12 16995     -1.511400e+02 -3.078900e+02\n13 16995     2.401600e+02 -4.745500e+02\n4 16996     -7.730400e+02 -2.799600e+02\n9 16996     1.734200e+02 -5.179600e+02\n4 16997     -7.951700e+02 -2.843400e+02\n6 16997     9.492999e+01 -8.065100e+02\n4 16998     -7.951700e+02 -2.843400e+02\n6 16998     9.492999e+01 -8.065100e+02\n4 16999     -7.871300e+02 -2.889100e+02\n7 16999     -8.759998e+01 -5.640200e+02\n4 17000     -3.398800e+02 -2.967900e+02\n6 17000     -1.651500e+02 -1.847700e+02\n12 17000     -1.665400e+02 -1.256300e+02\n4 17001     2.427800e+02 -3.113900e+02\n5 17001     2.753800e+02 2.491900e+02\n11 17001     2.876001e+01 5.673999e+01\n4 17002     -7.842100e+02 -3.228300e+02\n9 17002     2.160400e+02 -4.928700e+02\n4 17003     -4.448700e+02 -3.715000e+02\n12 17003     4.330017e+00 -2.289300e+02\n4 17004     2.791300e+02 -3.730500e+02\n14 17004     2.653900e+02 2.170500e+02\n4 17005     6.465997e+01 -3.873700e+02\n5 17005     4.396801e+02 -5.634003e+01\n6 17005     -4.588900e+02 6.440700e+02\n8 17005     -1.409600e+02 2.778700e+02\n4 17006     -4.055100e+02 -4.025600e+02\n6 17006     3.178998e+01 -1.940100e+02\n12 17006     3.067999e+01 -1.444200e+02\n4 17007     -4.150400e+02 -4.059900e+02\n6 17007     4.298999e+01 -2.046200e+02\n10 17007     -7.884003e+01 -8.978003e+01\n4 17008     -3.219600e+02 -4.375800e+02\n8 17008     1.977800e+02 -7.608002e+01\n4 17009     -2.533400e+02 -4.406300e+02\n12 17009     9.989990e+00 1.210000e+02\n4 17010     2.612400e+02 -4.468400e+02\n5 17010     4.860200e+02 2.914800e+02\n4 17011     9.509003e+01 -4.573000e+02\n8 17011     -6.887000e+01 3.326300e+02\n4 17012     2.296600e+02 -4.598199e+02\n11 17012     2.288900e+02 5.351999e+01\n4 17013     5.472998e+01 -4.690800e+02\n9 17013     -2.833400e+02 3.775100e+02\n4 17014     2.178600e+02 -4.699500e+02\n14 17014     4.284700e+02 1.213400e+02\n4 17015     7.527002e+01 -4.922800e+02\n5 17015     5.964100e+02 -1.750000e+01\n6 17015     -2.889600e+02 7.173000e+02\n11 17015     3.128700e+02 -1.522100e+02\n14 17015     4.964399e+02 -1.046600e+02\n4 17016     2.032400e+02 -5.153900e+02\n5 17016     6.059500e+02 1.965900e+02\n4 17017     1.741400e+02 -5.732600e+02\n5 17017     6.914100e+02 1.560600e+02\n4 17018     2.087900e+02 5.653998e+01\n5 17018     -4.438600e+02 1.621500e+02\n13 17018     -5.272900e+02 3.893800e+02\n14 17018     -5.179000e+02 5.976001e+01\n4 17019     2.099600e+02 3.216998e+01\n5 17019     -3.671100e+02 1.599300e+02\n4 17020     4.553003e+01 2.084003e+01\n5 17020     -3.188200e+02 -1.685400e+02\n11 17020     -4.259800e+02 -2.765000e+02\n4 17021     -1.977002e+01 4.450012e+00\n7 17021     -8.591600e+02 3.386200e+02\n13 17021     -3.387600e+02 1.308002e+01\n14 17021     -3.416700e+02 -3.997800e+02\n4 17022     -3.044000e+01 -1.181800e+02\n5 17022     -1.009003e+01 -2.909100e+02\n10 17022     -6.173800e+02 5.406800e+02\n13 17022     -1.351100e+02 3.632001e+01\n4 17023     1.702400e+02 -2.891500e+02\n5 17023     2.623700e+02 1.134100e+02\n13 17023     6.346997e+01 3.786900e+02\n14 17023     1.663199e+02 1.671002e+01\n4 17024     -7.113200e+02 -3.086400e+02\n9 17024     1.520500e+02 -4.520699e+02\n4 17025     1.615800e+02 -3.600500e+02\n5 17025     3.786000e+02 1.083200e+02\n14 17025     2.789301e+02 1.483002e+01\n4 17026     2.547300e+02 -3.723200e+02\n11 17026     1.108800e+02 7.903000e+01\n4 17027     -3.467600e+02 -3.791600e+02\n8 17027     1.451900e+02 -1.364800e+02\n4 17028     -1.955900e+02 -3.850900e+02\n5 17028     5.692200e+02 -5.486300e+02\n7 17028     -1.429000e+02 2.141500e+02\n13 17028     3.180000e+02 -1.340700e+02\n4 17029     1.834600e+02 -4.464200e+02\n13 17029     2.664500e+02 4.275500e+02\n4 17030     -4.280500e+02 -4.634000e+02\n6 17030     1.178500e+02 -1.783600e+02\n12 17030     1.227100e+02 -1.329100e+02\n4 17031     2.180500e+02 -4.935800e+02\n5 17031     5.686300e+02 2.189500e+02\n13 17031     3.136899e+02 4.800600e+02\n14 17031     4.621200e+02 1.229200e+02\n4 17032     5.840002e+01 -4.968700e+02\n6 17032     -2.727900e+02 6.815600e+02\n9 17032     -2.555700e+02 3.865600e+02\n4 17033     -2.737300e+02 -5.014301e+02\n6 17033     8.609003e+01 7.720001e+01\n8 17033     2.447200e+02 1.417999e+01\n12 17033     1.049900e+02 1.295500e+02\n4 17034     2.409998e+01 -5.388800e+02\n5 17034     6.737900e+02 -9.784003e+01\n11 17034     3.884900e+02 -2.168300e+02\n4 17035     3.039000e+02 -4.840997e+01\n5 17035     -2.298100e+02 3.471900e+02\n14 17035     -3.099600e+02 2.406300e+02\n4 17036     3.039000e+02 -4.840997e+01\n5 17036     -2.298100e+02 3.471900e+02\n14 17036     -3.099600e+02 2.406300e+02\n4 17037     1.639200e+02 -8.378003e+01\n5 17037     -9.635999e+01 6.919000e+01\n14 17037     -1.822100e+02 -2.956000e+01\n4 17038     1.535100e+02 -1.850200e+02\n14 17038     -4.390015e+00 -3.159998e+01\n4 17039     -7.156900e+02 -2.247800e+02\n6 17039     -2.620001e+01 -7.782000e+02\n7 17039     -1.779200e+02 -5.319500e+02\n4 17040     -4.331900e+02 -2.888700e+02\n7 17040     -1.836800e+02 -1.713000e+02\n13 17040     2.564700e+02 -4.641100e+02\n4 17041     -7.803000e+02 -3.443400e+02\n7 17041     -2.452002e+01 -5.221200e+02\n9 17041     2.292700e+02 -4.751300e+02\n4 17042     -5.943100e+02 -4.402200e+02\n7 17042     3.431000e+01 -2.733700e+02\n9 17042     1.939900e+02 -2.445000e+02\n4 17043     -3.260400e+02 -4.838199e+02\n6 17043     9.113000e+01 -1.403003e+01\n4 17044     1.798300e+02 -5.319000e+02\n5 17044     6.326500e+02 1.608900e+02\n13 17044     3.664301e+02 4.324600e+02\n14 17044     5.250699e+02 6.869000e+01\n4 17045     2.020300e+02 -5.460500e+02\n5 17045     6.511700e+02 1.984100e+02\n4 17046     -6.958300e+02 -2.011100e+02\n7 17046     -2.131700e+02 -5.271100e+02\n4 17047     2.382100e+02 -2.022800e+02\n5 17047     9.913000e+01 2.292600e+02\n13 17047     -7.169000e+01 4.692800e+02\n14 17047     1.341998e+01 1.250400e+02\n4 17048     -6.948600e+02 -2.205200e+02\n6 17048     -4.914001e+01 -7.589900e+02\n7 17048     -1.905100e+02 -5.128000e+02\n4 17049     -6.948600e+02 -2.205200e+02\n6 17049     -4.914001e+01 -7.589900e+02\n7 17049     -1.905100e+02 -5.128000e+02\n4 17050     -7.658800e+02 -3.541800e+02\n9 17050     2.260300e+02 -4.579200e+02\n4 17051     -7.536500e+02 -3.766900e+02\n9 17051     2.354100e+02 -4.346400e+02\n4 17052     2.113900e+02 -4.093200e+02\n5 17052     4.479900e+02 1.991500e+02\n11 17052     1.598000e+02 2.275000e+01\n13 17052     2.147500e+02 4.598700e+02\n14 17052     3.451000e+02 1.041400e+02\n4 17053     -7.374600e+02 -3.187800e+02\n9 17053     1.802400e+02 -4.635100e+02\n4 17054     1.774500e+02 -5.115500e+02\n5 17054     6.040900e+02 1.524900e+02\n11 17054     3.059800e+02 -1.416998e+01\n13 17054     3.428800e+02 4.248700e+02\n14 17054     4.973600e+02 6.033002e+01\n4 17055     1.449200e+02 -3.128700e+02\n5 17055     3.028800e+02 7.048999e+01\n4 17056     4.575000e+01 -3.495800e+02\n5 17056     3.826700e+02 -9.906000e+01\n12 17056     -3.380800e+02 5.646700e+02\n4 17057     2.177200e+02 -2.172700e+02\n5 17057     1.297100e+02 1.904100e+02\n4 17058     1.473700e+02 -3.674700e+02\n5 17058     3.926600e+02 8.553003e+01\n4 17059     -4.567200e+02 -4.972300e+02\n8 17059     3.162100e+02 -1.921300e+02\n12 17059     1.763700e+02 -1.506800e+02\n4 17060     2.098000e+02 -2.688800e+02\n5 17060     2.268900e+02 1.812100e+02\n5 17061     -3.286200e+02 3.943700e+02\n11 17061     -3.616600e+02 1.616600e+02\n5 17062     3.192500e+02 3.895000e+02\n11 17062     1.224600e+02 1.706100e+02\n5 17063     -3.367800e+02 3.817000e+02\n11 17063     -3.759900e+02 1.511500e+02\n5 17064     2.890100e+02 3.800200e+02\n11 17064     9.610999e+01 1.623800e+02\n5 17065     3.875400e+02 3.801800e+02\n11 17065     1.520600e+02 1.638100e+02\n14 17065     2.867900e+02 2.756900e+02\n5 17066     -8.741998e+01 3.730900e+02\n11 17066     -2.135100e+02 1.474500e+02\n5 17067     1.069900e+02 3.670300e+02\n11 17067     -5.645001e+01 1.473500e+02\n14 17067     1.825000e+01 2.600500e+02\n5 17068     1.069900e+02 3.670300e+02\n11 17068     -5.645001e+01 1.473500e+02\n5 17069     -3.863900e+02 3.443000e+02\n11 17069     -4.228000e+02 1.209200e+02\n5 17070     -1.013600e+02 3.413200e+02\n11 17070     -2.330600e+02 1.222100e+02\n5 17071     -3.656900e+02 3.384200e+02\n11 17071     -4.085900e+02 1.172700e+02\n5 17072     -4.295600e+02 3.337900e+02\n11 17072     -4.537400e+02 1.120800e+02\n14 17072     -5.050100e+02 2.253400e+02\n5 17073     -2.218000e+02 3.130500e+02\n11 17073     -3.382000e+02 9.789001e+01\n13 17073     -3.514500e+02 5.309000e+02\n14 17073     -3.024200e+02 2.054500e+02\n5 17074     -2.104700e+02 3.048900e+02\n11 17074     -3.269400e+02 9.148999e+01\n13 17074     -3.409200e+02 5.245700e+02\n14 17074     -2.907800e+02 1.980900e+02\n5 17075     -2.276200e+02 2.614700e+02\n11 17075     -3.412600e+02 5.748999e+01\n5 17076     1.031800e+02 2.604700e+02\n11 17076     -1.133300e+02 6.014999e+01\n5 17077     -9.506000e+01 2.501300e+02\n11 17077     -2.809800e+02 4.907001e+01\n5 17078     -2.928700e+02 2.432300e+02\n11 17078     -3.815800e+02 4.370001e+01\n13 17078     -4.065700e+02 4.658500e+02\n14 17078     -3.711500e+02 1.368800e+02\n5 17079     -1.293900e+02 1.872600e+02\n11 17079     -3.191900e+02 -1.250000e+00\n5 17080     5.956300e+02 1.175300e+02\n11 17080     3.028400e+02 -4.196002e+01\n14 17080     4.915100e+02 2.716998e+01\n5 17081     3.316100e+02 1.129400e+02\n8 17081     -2.401100e+02 4.262600e+02\n5 17082     5.935100e+02 1.105500e+02\n11 17082     3.005601e+02 -4.703998e+01\n14 17082     4.893300e+02 2.021002e+01\n5 17083     3.675601e+02 1.082100e+02\n6 17083     -5.814400e+02 8.498600e+02\n5 17084     4.249399e+02 1.043600e+02\n6 17084     -5.105800e+02 8.517700e+02\n5 17085     4.713199e+02 9.151001e+01\n6 17085     -4.524500e+02 8.399400e+02\n5 17086     6.729600e+02 8.909003e+01\n6 17086     -2.225100e+02 8.597500e+02\n5 17087     4.277900e+02 8.582001e+01\n6 17087     -5.033200e+02 8.271300e+02\n8 17087     -1.624200e+02 3.995600e+02\n14 17087     3.290200e+02 -6.409973e+00\n5 17088     6.065800e+02 7.603003e+01\n6 17088     -2.929200e+02 8.366500e+02\n8 17088     -2.567999e+01 3.856800e+02\n5 17089     3.893800e+02 6.889001e+01\n6 17089     -5.459800e+02 7.988300e+02\n14 17089     2.917700e+02 -2.371002e+01\n5 17090     5.630699e+02 6.765997e+01\n6 17090     -3.416300e+02 8.202700e+02\n5 17091     2.009998e+01 6.265997e+01\n8 17091     -5.033800e+02 3.901900e+02\n14 17091     -6.829999e+01 -3.573999e+01\n5 17092     5.710601e+02 4.917999e+01\n6 17092     -3.288200e+02 7.969200e+02\n14 17092     4.699800e+02 -3.975000e+01\n5 17093     3.857100e+02 4.752002e+01\n11 17093     1.164600e+02 -1.044200e+02\n14 17093     2.895000e+02 -4.457001e+01\n5 17094     -5.544000e+01 4.095001e+01\n8 17094     -5.718400e+02 3.712900e+02\n14 17094     -1.421100e+02 -5.771002e+01\n5 17095     3.781000e+02 3.910999e+01\n6 17095     -5.516100e+02 7.589400e+02\n8 17095     -1.962500e+02 3.620800e+02\n14 17095     2.821400e+02 -5.239001e+01\n5 17096     6.683300e+02 3.732001e+01\n6 17096     -2.193800e+02 7.942100e+02\n14 17096     5.645699e+02 -4.897998e+01\n5 17097     6.683300e+02 3.732001e+01\n6 17097     -2.193800e+02 7.942100e+02\n14 17097     5.645699e+02 -4.897998e+01\n5 17098     7.510000e+02 2.182001e+01\n6 17098     -1.287900e+02 7.849900e+02\n8 17098     8.090002e+01 3.366000e+02\n5 17099     5.920300e+02 1.778998e+01\n6 17099     -2.995000e+02 7.620500e+02\n11 17099     3.059900e+02 -1.230400e+02\n5 17100     5.437900e+02 1.340997e+01\n6 17100     -3.527500e+02 7.476000e+02\n5 17101     6.100500e+02 -2.909973e+00\n6 17101     -2.759200e+02 7.355800e+02\n5 17102     3.398900e+02 -3.299988e+00\n8 17102     -2.240700e+02 3.246000e+02\n14 17102     2.459301e+02 -9.359998e+01\n5 17103     3.398900e+02 -3.299988e+00\n8 17103     -2.240700e+02 3.246000e+02\n14 17103     2.459301e+02 -9.359998e+01\n5 17104     6.609700e+02 -2.279999e+01\n6 17104     -2.177100e+02 7.190400e+02\n5 17105     1.914301e+02 -2.581000e+01\n11 17105     -5.369000e+01 -1.670800e+02\n5 17106     4.940100e+02 -2.934998e+01\n6 17106     -4.011900e+02 6.863100e+02\n11 17106     2.195700e+02 -1.638700e+02\n14 17106     3.972800e+02 -1.167900e+02\n5 17107     5.864000e+02 -3.140997e+01\n6 17107     -2.970800e+02 6.970700e+02\n5 17108     1.543800e+02 -3.347998e+01\n12 17108     -6.204800e+02 6.122700e+02\n5 17109     4.815900e+02 -4.503998e+01\n6 17109     -4.125900e+02 6.652400e+02\n5 17110     4.757400e+02 -4.558002e+01\n6 17110     -4.189700e+02 6.629700e+02\n5 17111     3.716300e+02 -4.738000e+01\n6 17111     -5.400900e+02 6.440700e+02\n5 17112     3.340601e+02 -4.894000e+01\n12 17112     -4.045100e+02 6.151900e+02\n5 17113     2.579900e+02 -5.954999e+01\n12 17113     -4.903300e+02 5.932800e+02\n5 17114     3.731801e+02 -6.231000e+01\n6 17114     -5.349900e+02 6.249900e+02\n5 17115     7.354600e+02 -6.765997e+01\n9 17115     -1.587700e+02 3.676100e+02\n5 17116     6.193400e+02 -6.977002e+01\n6 17116     -2.550800e+02 6.557800e+02\n5 17117     5.588199e+02 -7.344000e+01\n6 17117     -3.199200e+02 6.420500e+02\n5 17118     4.705900e+02 -7.629999e+01\n12 17118     -2.453500e+02 5.982200e+02\n14 17118     3.758400e+02 -1.634500e+02\n5 17119     7.638500e+02 -8.973999e+01\n6 17119     -1.006800e+02 6.525000e+02\n12 17119     6.201001e+01 6.103900e+02\n5 17120     2.377100e+02 -9.282001e+01\n12 17120     -5.057700e+02 5.518700e+02\n5 17121     7.473000e+02 -9.615002e+01\n8 17121     8.660999e+01 2.421000e+02\n12 17121     4.642999e+01 6.021300e+02\n5 17122     7.791998e+01 -1.037000e+02\n7 17122     -5.752200e+02 5.809700e+02\n14 17122     -8.429993e+00 -1.970500e+02\n5 17123     3.741000e+02 -1.049100e+02\n6 17123     -5.240500e+02 5.713400e+02\n12 17123     -3.470200e+02 5.551400e+02\n5 17124     3.741000e+02 -1.049100e+02\n6 17124     -5.240500e+02 5.713400e+02\n12 17124     -3.470200e+02 5.551400e+02\n5 17125     4.035800e+02 -1.167100e+02\n6 17125     -4.869400e+02 5.613600e+02\n5 17126     2.687000e+02 -1.223100e+02\n12 17126     -4.631700e+02 5.219100e+02\n5 17127     1.876100e+02 -1.237300e+02\n7 17127     -4.535200e+02 5.719000e+02\n5 17128     1.876100e+02 -1.237300e+02\n7 17128     -4.535200e+02 5.719000e+02\n8 17128     -3.371800e+02 2.186500e+02\n5 17129     1.163200e+02 -1.254200e+02\n7 17129     -5.289500e+02 5.627300e+02\n5 17130     5.634800e+02 -1.291000e+02\n6 17130     -3.050800e+02 5.743000e+02\n12 17130     -1.364800e+02 5.491000e+02\n5 17131     4.819200e+02 -1.294800e+02\n12 17131     -2.227900e+02 5.409800e+02\n5 17132     3.064000e+02 -1.304300e+02\n12 17132     -4.184300e+02 5.174700e+02\n5 17133     4.797400e+02 -1.325600e+02\n12 17133     -2.252200e+02 5.367500e+02\n5 17134     2.720601e+02 -1.375900e+02\n12 17134     -4.555300e+02 5.045400e+02\n5 17135     4.726400e+02 -1.379400e+02\n12 17135     -2.315900e+02 5.295500e+02\n5 17136     3.790601e+02 -1.392900e+02\n12 17136     -3.346300e+02 5.170900e+02\n5 17137     6.803400e+02 -1.420600e+02\n6 17137     -1.784200e+02 5.788400e+02\n14 17137     5.833101e+02 -2.226000e+02\n5 17138     4.910100e+02 -1.444700e+02\n6 17138     -3.817000e+02 5.430400e+02\n5 17139     1.931700e+02 -1.455300e+02\n7 17139     -4.434700e+02 5.509000e+02\n5 17140     8.462000e+01 -1.460600e+02\n7 17140     -5.574800e+02 5.382300e+02\n5 17141     2.884600e+02 -1.500400e+02\n7 17141     -3.444800e+02 5.557900e+02\n12 17141     -4.345700e+02 4.925300e+02\n5 17142     3.720900e+02 -1.509000e+02\n12 17142     -3.400500e+02 5.029700e+02\n5 17143     7.435601e+02 -1.537500e+02\n6 17143     -1.117900e+02 5.751100e+02\n12 17143     5.078998e+01 5.404900e+02\n5 17144     3.700000e+02 -1.543300e+02\n6 17144     -5.179200e+02 5.087500e+02\n5 17145     3.700000e+02 -1.543300e+02\n6 17145     -5.179200e+02 5.087500e+02\n12 17145     -3.416300e+02 4.988100e+02\n5 17146     2.848300e+02 -1.644600e+02\n7 17146     -3.450600e+02 5.415900e+02\n5 17147     1.891500e+02 -1.654800e+02\n12 17147     -5.451700e+02 4.611800e+02\n5 17148     3.316200e+02 -1.690200e+02\n7 17148     -2.968100e+02 5.420100e+02\n12 17148     -3.814300e+02 4.769000e+02\n14 17148     2.423800e+02 -2.564500e+02\n5 17149     -2.619995e+00 -1.729000e+02\n8 17149     -4.975600e+02 1.696200e+02\n5 17150     3.949100e+02 -1.747700e+02\n12 17150     -3.096800e+02 4.791300e+02\n5 17151     3.115500e+02 -1.752700e+02\n6 17151     -5.813800e+02 4.715900e+02\n12 17151     -4.024100e+02 4.672800e+02\n5 17152     3.115500e+02 -1.752700e+02\n6 17152     -5.813800e+02 4.715900e+02\n5 17153     3.372200e+02 -1.794700e+02\n6 17153     -5.506400e+02 4.713400e+02\n8 17153     -2.104500e+02 1.717900e+02\n12 17153     -3.731300e+02 4.663700e+02\n14 17153     2.479301e+02 -2.665000e+02\n5 17154     -1.190002e+01 -1.833700e+02\n12 17154     -7.823300e+02 4.084600e+02\n5 17155     -1.190002e+01 -1.833700e+02\n12 17155     -7.823300e+02 4.084600e+02\n5 17156     2.719200e+02 -1.847900e+02\n7 17156     -3.542700e+02 5.206400e+02\n5 17157     2.555900e+02 -1.874400e+02\n7 17157     -3.706500e+02 5.160500e+02\n5 17158     2.995100e+02 -1.891400e+02\n7 17158     -3.256200e+02 5.190600e+02\n5 17159     2.844700e+02 -1.906300e+02\n7 17159     -3.405800e+02 5.161000e+02\n12 17159     -4.292900e+02 4.463200e+02\n5 17160     4.333600e+02 -1.906400e+02\n12 17160     -2.645400e+02 4.664300e+02\n5 17161     1.107000e+02 -1.929900e+02\n12 17161     -6.303700e+02 4.174800e+02\n5 17162     -6.690002e+00 -1.941500e+02\n8 17162     -4.985600e+02 1.491300e+02\n5 17163     3.102300e+02 -1.944600e+02\n12 17163     -3.999000e+02 4.455900e+02\n5 17164     5.434301e+02 -1.963300e+02\n6 17164     -3.144300e+02 4.908900e+02\n14 17164     4.515100e+02 -2.789700e+02\n5 17165     1.562100e+02 -1.968100e+02\n12 17165     -5.756600e+02 4.196400e+02\n5 17166     1.799988e+00 -2.005600e+02\n12 17166     -7.598000e+02 3.904900e+02\n5 17167     1.488400e+02 -2.041000e+02\n12 17167     -5.820800e+02 4.108600e+02\n5 17168     3.609000e+02 -2.136300e+02\n12 17168     -3.418800e+02 4.341300e+02\n5 17169     4.386100e+02 -2.302400e+02\n12 17169     -2.511800e+02 4.241900e+02\n5 17170     2.335699e+02 -2.354100e+02\n7 17170     -3.847800e+02 4.674100e+02\n5 17171     -1.124800e+02 -2.363000e+02\n7 17171     -7.455300e+02 4.210300e+02\n10 17171     -7.717500e+02 5.913000e+02\n11 17171     -3.100100e+02 -3.399900e+02\n5 17172     -1.084600e+02 -2.364900e+02\n8 17172     -5.869500e+02 1.053400e+02\n5 17173     5.279301e+02 -2.404000e+02\n6 17173     -3.229000e+02 4.365000e+02\n14 17173     4.381700e+02 -3.223400e+02\n5 17174     3.821600e+02 -2.424300e+02\n7 17174     -2.346200e+02 4.767600e+02\n14 17174     2.946200e+02 -3.282300e+02\n5 17175     5.218500e+02 -2.525300e+02\n8 17175     -6.166998e+01 1.122500e+02\n5 17176     4.169000e+01 -2.539800e+02\n7 17176     -5.763700e+02 4.252300e+02\n8 17176     -4.504800e+02 9.551999e+01\n10 17176     -5.707300e+02 5.858300e+02\n14 17176     -4.126001e+01 -3.460700e+02\n5 17177     -8.685999e+01 -2.593600e+02\n7 17177     -7.110800e+02 4.017500e+02\n10 17177     -7.307000e+02 5.660700e+02\n11 17177     -2.865900e+02 -3.588400e+02\n5 17178     -6.765997e+01 -2.600100e+02\n8 17178     -5.458200e+02 8.529001e+01\n10 17178     -7.057000e+02 5.677000e+02\n5 17179     -6.278998e+01 -2.602700e+02\n10 17179     -6.994700e+02 5.678500e+02\n12 17179     -8.211400e+02 3.084400e+02\n14 17179     -1.450700e+02 -3.544000e+02\n5 17180     -1.207100e+02 -2.606400e+02\n7 17180     -7.473200e+02 3.956800e+02\n8 17180     -5.952500e+02 8.173001e+01\n14 17180     -2.027500e+02 -3.563900e+02\n5 17181     2.489600e+02 -2.667400e+02\n10 17181     -3.140800e+02 5.935400e+02\n14 17181     1.637400e+02 -3.538600e+02\n5 17182     -1.179100e+02 -2.690600e+02\n7 17182     -7.420800e+02 3.876600e+02\n10 17182     -7.675000e+02 5.520400e+02\n11 17182     -3.134300e+02 -3.663100e+02\n5 17183     1.811100e+02 -2.861300e+02\n11 17183     -1.048900e+02 -3.868800e+02\n12 17183     -5.240300e+02 3.232100e+02\n5 17184     4.089100e+02 -3.032100e+02\n6 17184     -4.411500e+02 3.371600e+02\n7 17184     -1.994600e+02 4.229300e+02\n10 17184     -1.203000e+02 5.666400e+02\n11 17184     1.619600e+02 -3.902400e+02\n14 17184     3.228900e+02 -3.875600e+02\n5 17185     2.839500e+02 -3.058200e+02\n7 17185     -3.201000e+02 4.063100e+02\n11 17185     4.827002e+01 -3.941900e+02\n5 17186     2.839500e+02 -3.058200e+02\n8 17186     -2.402400e+02 5.941000e+01\n12 17186     -4.039800e+02 3.185500e+02\n5 17187     3.846200e+02 -3.100800e+02\n7 17187     -2.219600e+02 4.140300e+02\n10 17187     -1.480100e+02 5.572700e+02\n14 17187     2.989200e+02 -3.948400e+02\n5 17188     2.540100e+02 -3.156900e+02\n7 17188     -3.479100e+02 3.932600e+02\n5 17189     2.540100e+02 -3.156900e+02\n7 17189     -3.479100e+02 3.932600e+02\n5 17190     5.802000e+02 -3.285100e+02\n6 17190     -2.421900e+02 3.467700e+02\n10 17190     5.710999e+01 5.489300e+02\n11 17190     2.988101e+02 -4.112200e+02\n12 17190     -9.021002e+01 3.466200e+02\n13 17190     3.336300e+02 3.609003e+01\n5 17191     5.811801e+02 -3.320600e+02\n10 17191     5.591998e+01 5.448800e+02\n5 17192     5.902800e+02 -3.349600e+02\n6 17192     -2.300000e+02 3.419000e+02\n10 17192     6.588000e+01 5.425900e+02\n5 17193     1.069800e+02 -3.362900e+02\n10 17193     -4.702600e+02 5.007300e+02\n15 17193     -4.576500e+02 5.455800e+02\n5 17194     -2.809003e+01 -3.362800e+02\n8 17194     -5.010100e+02 1.498001e+01\n5 17195     2.583002e+01 -3.364000e+02\n7 17195     -5.725300e+02 3.439500e+02\n14 17195     -5.566998e+01 -4.283200e+02\n15 17195     -5.701400e+02 5.338700e+02\n5 17196     1.867999e+01 -3.387500e+02\n10 17196     -5.758300e+02 4.898200e+02\n14 17196     -6.254999e+01 -4.308100e+02\n5 17197     -1.112400e+02 -3.416200e+02\n8 17197     -5.754300e+02 5.570007e+00\n14 17197     -1.924800e+02 -4.372900e+02\n5 17198     9.969000e+01 -3.431700e+02\n7 17198     -4.960700e+02 3.482900e+02\n10 17198     -4.777400e+02 4.932100e+02\n14 17198     1.802002e+01 -4.336300e+02\n15 17198     -4.657600e+02 5.364500e+02\n5 17199     -1.328400e+02 -3.562700e+02\n7 17199     -7.323000e+02 3.008800e+02\n10 17199     -7.571800e+02 4.517100e+02\n14 17199     -2.141300e+02 -4.524200e+02\n5 17200     -1.476300e+02 -3.594100e+02\n10 17200     -7.733400e+02 4.472400e+02\n14 17200     -2.285700e+02 -4.559301e+02\n5 17201     -1.536700e+02 -3.622300e+02\n10 17201     -7.796300e+02 4.430800e+02\n5 17202     5.065800e+02 -3.665500e+02\n6 17202     -3.113800e+02 2.885000e+02\n5 17203     -1.260400e+02 -3.687000e+02\n10 17203     -7.433000e+02 4.396500e+02\n5 17204     1.753200e+02 -3.723800e+02\n7 17204     -4.131600e+02 3.319500e+02\n8 17204     -3.217600e+02 -4.609985e+00\n14 17204     9.603998e+01 -4.608000e+02\n5 17205     -1.054000e+02 -3.771300e+02\n7 17205     -6.969600e+02 2.857200e+02\n8 17205     -5.654700e+02 -2.784000e+01\n10 17205     -7.159800e+02 4.332200e+02\n14 17205     -1.858700e+02 -4.728199e+02\n15 17205     -7.368200e+02 4.612600e+02\n5 17206     4.799805e-01 -3.872800e+02\n10 17206     -5.840200e+02 4.341200e+02\n11 17206     -2.019000e+02 -4.633200e+02\n5 17207     -1.001100e+02 -3.916800e+02\n10 17207     -7.049600e+02 4.186100e+02\n5 17208     1.470600e+02 -4.505200e+02\n7 17208     -4.416200e+02 2.552800e+02\n5 17209     3.963199e+02 -4.714100e+02\n6 17209     -3.983700e+02 1.465200e+02\n10 17209     -1.658700e+02 3.771000e+02\n12 17209     -2.630500e+02 1.765100e+02\n14 17209     3.128300e+02 -5.563199e+02\n5 17210     3.809200e+02 -4.956200e+02\n7 17210     -2.314000e+02 2.454900e+02\n8 17210     -1.283000e+02 -5.557999e+01\n10 17210     -1.866900e+02 3.488200e+02\n12 17210     -2.755700e+02 1.500000e+02\n5 17211     2.877100e+02 -5.015200e+02\n7 17211     -3.143800e+02 2.284700e+02\n5 17212     2.664900e+02 -5.043400e+02\n15 17212     -2.685000e+02 3.510600e+02\n5 17213     6.402800e+02 -5.046200e+02\n6 17213     -7.614001e+01 1.849100e+02\n10 17213     -7.075000e+01 3.169900e+02\n5 17214     4.644700e+02 -5.064800e+02\n6 17214     -2.822500e+02 1.330800e+02\n10 17214     -1.810400e+02 3.213200e+02\n12 17214     -2.088600e+02 1.780800e+02\n15 17214     -1.300900e+02 3.452700e+02\n5 17215     5.157800e+02 -5.089800e+02\n6 17215     -2.230100e+02 1.443200e+02\n5 17216     5.042200e+02 -5.170601e+02\n6 17216     -2.317000e+02 1.336800e+02\n12 17216     -1.696700e+02 1.803500e+02\n5 17217     3.654700e+02 -5.249500e+02\n6 17217     -4.127700e+02 8.000000e+01\n5 17218     5.029000e+02 -5.271700e+02\n6 17218     -2.299600e+02 1.228800e+02\n5 17219     4.875800e+02 -5.322700e+02\n6 17219     -2.439700e+02 1.134800e+02\n10 17219     -1.776200e+02 2.910800e+02\n12 17219     -1.858000e+02 1.622900e+02\n5 17220     3.383700e+02 -5.328101e+02\n6 17220     -4.408400e+02 6.402002e+01\n5 17221     6.030699e+02 -5.332100e+02\n6 17221     -1.073300e+02 1.466400e+02\n7 17221     -1.156600e+02 2.313800e+02\n10 17221     -1.103900e+02 2.846500e+02\n12 17221     -7.759003e+01 2.006500e+02\n15 17221     -5.467999e+01 3.045700e+02\n5 17222     4.505300e+02 -5.343000e+02\n6 17222     -2.876100e+02 1.004500e+02\n12 17222     -2.208000e+02 1.489900e+02\n5 17223     4.814500e+02 -5.380100e+02\n6 17223     -2.481700e+02 1.062500e+02\n5 17224     4.263500e+02 -5.401600e+02\n10 17224     -2.310500e+02 2.807200e+02\n15 17224     -1.880100e+02 2.973500e+02\n5 17225     4.780800e+02 -5.411899e+02\n12 17225     -1.951300e+02 1.518900e+02\n5 17226     4.906200e+02 -5.409600e+02\n6 17226     -2.379200e+02 1.056400e+02\n5 17227     4.741700e+02 -5.418000e+02\n6 17227     -2.553800e+02 1.000900e+02\n12 17227     -1.997700e+02 1.503700e+02\n5 17228     4.741700e+02 -5.418000e+02\n6 17228     -2.553800e+02 1.000900e+02\n12 17228     -1.997700e+02 1.503700e+02\n15 17228     -1.487700e+02 2.962400e+02\n5 17229     5.588000e+02 -5.441400e+02\n6 17229     -1.517300e+02 1.233700e+02\n12 17229     -1.205800e+02 1.778100e+02\n15 17229     -9.950000e+01 2.889400e+02\n5 17230     5.528101e+02 -5.501000e+02\n6 17230     -1.568500e+02 1.154400e+02\n15 17230     -1.063100e+02 2.810500e+02\n5 17231     1.248900e+02 -5.514900e+02\n15 17231     -4.472000e+02 2.739100e+02\n5 17232     4.827200e+02 -5.542700e+02\n6 17232     -2.414100e+02 8.946997e+01\n12 17232     -1.890700e+02 1.403100e+02\n5 17233     4.801600e+02 -5.578900e+02\n6 17233     -2.429100e+02 8.542999e+01\n12 17233     -1.915500e+02 1.364600e+02\n5 17234     4.049399e+02 -5.627000e+02\n12 17234     -2.664800e+02 1.116900e+02\n15 17234     -2.213200e+02 2.656900e+02\n5 17235     4.821300e+02 -5.632900e+02\n6 17235     -2.387300e+02 8.007001e+01\n12 17235     -1.889000e+02 1.317400e+02\n5 17236     3.961300e+02 -5.669500e+02\n6 17236     -3.339200e+02 5.185999e+01\n10 17236     -2.687500e+02 2.487400e+02\n12 17236     -2.752600e+02 1.054500e+02\n15 17236     -2.334600e+02 2.589700e+02\n5 17237     4.008800e+02 -5.702300e+02\n6 17237     -3.275900e+02 4.953003e+01\n10 17237     -2.643000e+02 2.460500e+02\n12 17237     -2.699400e+02 1.035500e+02\n15 17237     -2.282900e+02 2.558900e+02\n5 17238     4.008800e+02 -5.702300e+02\n6 17238     -3.275900e+02 4.953003e+01\n10 17238     -2.643000e+02 2.460500e+02\n12 17238     -2.699400e+02 1.035500e+02\n15 17238     -2.282900e+02 2.558900e+02\n5 17239     4.232300e+02 -5.704800e+02\n6 17239     -3.038300e+02 5.571002e+01\n15 17239     -2.014100e+02 2.579700e+02\n5 17240     4.730000e+02 -5.748000e+02\n6 17240     -2.444100e+02 6.559003e+01\n5 17241     4.617900e+02 -5.764800e+02\n6 17241     -2.559300e+02 6.165997e+01\n12 17241     -2.090600e+02 1.149600e+02\n5 17242     6.199500e+02 -5.774700e+02\n10 17242     -1.034100e+02 2.369200e+02\n12 17242     -5.625000e+01 1.607200e+02\n15 17242     -4.652002e+01 2.493100e+02\n5 17243     3.651400e+02 -5.778000e+02\n6 17243     -3.958600e+02 2.326001e+01\n5 17244     3.651400e+02 -5.778000e+02\n6 17244     -3.958600e+02 2.326001e+01\n9 17244     -3.154700e+02 -2.720001e+01\n5 17245     4.205200e+02 -5.799399e+02\n10 17245     -2.456500e+02 2.365300e+02\n5 17246     4.587600e+02 -5.806000e+02\n6 17246     -2.574000e+02 5.575000e+01\n15 17246     -1.802800e+02 2.440900e+02\n5 17247     6.555601e+02 -5.879399e+02\n6 17247     -4.026001e+01 1.045800e+02\n8 17247     1.462100e+02 3.217999e+01\n10 17247     -7.308002e+01 2.276700e+02\n12 17247     -1.967999e+01 1.592300e+02\n15 17247     -1.153998e+01 2.391300e+02\n5 17248     3.909301e+02 -5.896600e+02\n6 17248     -3.315500e+02 2.675000e+01\n5 17249     4.597700e+02 -5.944900e+02\n6 17249     -2.517600e+02 4.200000e+01\n10 17249     -2.249600e+02 2.193100e+02\n12 17249     -2.096300e+02 9.700000e+01\n15 17249     -1.841500e+02 2.260700e+02\n5 17250     4.564200e+02 -5.948600e+02\n6 17250     -2.551800e+02 4.083002e+01\n12 17250     -2.130200e+02 9.597998e+01\n5 17251     2.695001e+01 -6.069399e+02\n7 17251     -5.509600e+02 9.554999e+01\n15 17251     -5.728900e+02 1.926700e+02\n5 17252     4.528600e+02 -6.086100e+02\n6 17252     -2.544100e+02 2.553003e+01\n7 17252     -2.285900e+02 1.464700e+02\n15 17252     -1.968900e+02 2.070700e+02\n5 17253     6.265500e+02 -6.162300e+02\n6 17253     -6.346997e+01 6.847998e+01\n10 17253     -1.023300e+02 1.972100e+02\n15 17253     -4.525000e+01 2.028000e+02\n5 17254     2.159600e+02 -6.182700e+02\n7 17254     -3.805300e+02 1.140900e+02\n15 17254     -3.509400e+02 2.021100e+02\n5 17255     7.773600e+02 -6.191600e+02\n6 17255     8.185999e+01 1.047400e+02\n10 17255     3.648999e+01 2.028100e+02\n12 17255     1.020400e+02 1.565600e+02\n15 17255     1.164700e+02 2.116500e+02\n5 17256     7.878003e+01 4.695200e+02\n11 17256     -4.184003e+01 2.272400e+02\n14 17256     -7.640015e+00 3.584700e+02\n5 17257     -1.653600e+02 4.374300e+02\n11 17257     -2.357100e+02 1.970200e+02\n14 17257     -2.443700e+02 3.269800e+02\n5 17258     -2.318900e+02 4.351300e+02\n11 17258     -2.885000e+02 1.938000e+02\n5 17259     -2.125900e+02 4.315800e+02\n11 17259     -2.746500e+02 1.918300e+02\n14 17259     -2.905200e+02 3.209700e+02\n5 17260     -2.125900e+02 4.315800e+02\n11 17260     -2.746500e+02 1.918300e+02\n14 17260     -2.905200e+02 3.209700e+02\n5 17261     -2.319700e+02 4.312300e+02\n11 17261     -2.886400e+02 1.897800e+02\n14 17261     -3.092400e+02 3.201600e+02\n5 17262     -2.087100e+02 4.278500e+02\n11 17262     -2.720900e+02 1.887900e+02\n5 17263     1.950100e+02 4.247000e+02\n11 17263     4.292999e+01 1.950200e+02\n14 17263     1.049200e+02 3.156700e+02\n5 17264     1.754500e+02 4.193700e+02\n11 17264     2.629999e+01 1.905700e+02\n14 17264     8.541998e+01 3.109700e+02\n5 17265     -1.677700e+02 4.109700e+02\n11 17265     -2.441200e+02 1.770000e+02\n5 17266     -1.476100e+02 4.070100e+02\n11 17266     -2.288100e+02 1.739400e+02\n5 17267     -1.853500e+02 4.060800e+02\n11 17267     -2.589200e+02 1.722500e+02\n5 17268     -2.608100e+02 3.920700e+02\n11 17268     -3.090600e+02 1.600900e+02\n14 17268     -3.375000e+02 2.819200e+02\n5 17269     -2.908500e+02 3.893400e+02\n11 17269     -3.322900e+02 1.572500e+02\n5 17270     1.293000e+02 3.876600e+02\n11 17270     -3.445001e+01 1.639600e+02\n5 17271     2.311700e+02 3.841200e+02\n11 17271     4.876001e+01 1.640200e+02\n14 17271     1.379600e+02 2.779800e+02\n5 17272     -1.766300e+02 3.783000e+02\n11 17272     -2.872900e+02 1.499900e+02\n5 17273     3.920001e+01 3.786300e+02\n11 17273     -1.099400e+02 1.549900e+02\n14 17273     -4.746002e+01 2.710100e+02\n5 17274     3.177002e+01 3.780400e+02\n11 17274     -1.159800e+02 1.544100e+02\n5 17275     2.297000e+02 3.775300e+02\n11 17275     4.658002e+01 1.589400e+02\n5 17276     9.890002e+01 3.767700e+02\n11 17276     -6.191998e+01 1.553000e+02\n14 17276     1.021997e+01 2.695200e+02\n5 17277     7.490002e+01 3.757900e+02\n11 17277     -8.142999e+01 1.540700e+02\n5 17278     7.490002e+01 3.757900e+02\n11 17278     -8.142999e+01 1.540700e+02\n5 17279     -3.137100e+02 3.754700e+02\n11 17279     -3.595200e+02 1.465500e+02\n5 17280     1.948400e+02 3.746200e+02\n11 17280     1.617999e+01 1.568900e+02\n5 17281     -1.781700e+02 3.729600e+02\n11 17281     -2.895600e+02 1.456900e+02\n5 17282     -1.040200e+02 3.724100e+02\n11 17282     -2.276800e+02 1.472500e+02\n5 17283     2.129600e+02 3.713500e+02\n11 17283     3.146002e+01 1.537900e+02\n14 17283     1.205400e+02 2.654700e+02\n5 17284     1.355600e+02 3.711800e+02\n11 17284     -3.210999e+01 1.514800e+02\n5 17285     9.710999e+01 3.697500e+02\n11 17285     -6.440002e+01 1.498200e+02\n5 17286     -3.519100e+02 3.668900e+02\n11 17286     -3.910900e+02 1.394200e+02\n5 17287     -3.563500e+02 3.617400e+02\n11 17287     -3.949500e+02 1.347100e+02\n5 17288     -9.240002e+01 3.617400e+02\n11 17288     -2.198400e+02 1.390000e+02\n5 17289     3.429993e+00 3.603600e+02\n11 17289     -1.422800e+02 1.398800e+02\n5 17290     8.378998e+01 3.555800e+02\n11 17290     -7.752002e+01 1.380000e+02\n5 17291     -1.034200e+02 3.542300e+02\n11 17291     -2.316000e+02 1.344700e+02\n5 17292     -7.450012e+00 3.529700e+02\n11 17292     -1.526400e+02 1.342700e+02\n5 17293     1.108002e+01 3.520700e+02\n11 17293     -1.375900e+02 1.338100e+02\n5 17294     4.803101e+02 3.516400e+02\n11 17294     2.184200e+02 1.441100e+02\n14 17294     3.752200e+02 2.497600e+02\n5 17295     2.182600e+02 3.488000e+02\n11 17295     3.247998e+01 1.359200e+02\n5 17296     5.676100e+02 3.483300e+02\n11 17296     2.882800e+02 1.434100e+02\n14 17296     4.589500e+02 2.477300e+02\n5 17297     5.676100e+02 3.483300e+02\n11 17297     2.882800e+02 1.434100e+02\n5 17298     -3.460500e+02 3.481100e+02\n11 17298     -3.906500e+02 1.248300e+02\n14 17298     -4.218900e+02 2.395900e+02\n5 17299     4.096600e+02 3.477400e+02\n11 17299     1.565800e+02 1.391100e+02\n14 17299     3.076700e+02 2.450300e+02\n5 17300     -3.681000e+02 3.468100e+02\n11 17300     -4.082000e+02 1.236400e+02\n5 17301     -3.644300e+02 3.421100e+02\n11 17301     -4.063700e+02 1.198600e+02\n5 17302     -4.002900e+02 3.415800e+02\n11 17302     -4.348200e+02 1.181700e+02\n5 17303     -3.841200e+02 3.361200e+02\n11 17303     -4.233700e+02 1.149200e+02\n5 17304     -3.917300e+02 3.354900e+02\n11 17304     -4.292000e+02 1.145600e+02\n5 17305     1.660999e+01 3.338900e+02\n11 17305     -1.361800e+02 1.197300e+02\n5 17306     3.465900e+02 3.116800e+02\n11 17306     9.502002e+01 1.085700e+02\n13 17306     1.284500e+02 5.525200e+02\n14 17306     2.466400e+02 2.096700e+02\n5 17307     4.729500e+02 3.078500e+02\n11 17307     1.952100e+02 1.078400e+02\n13 17307     2.335100e+02 5.531800e+02\n14 17307     3.680200e+02 2.073800e+02\n5 17308     -2.404100e+02 2.994100e+02\n11 17308     -3.530600e+02 8.700000e+01\n13 17308     -3.671800e+02 5.179200e+02\n14 17308     -3.212500e+02 1.920900e+02\n5 17309     -1.045900e+02 2.919500e+02\n11 17309     -2.826100e+02 8.128000e+01\n5 17310     -2.143800e+02 2.755500e+02\n11 17310     -3.308100e+02 6.947000e+01\n5 17311     -2.461100e+02 2.649800e+02\n11 17311     -3.566300e+02 6.023999e+01\n13 17311     -3.690700e+02 4.870600e+02\n14 17311     -3.265600e+02 1.584800e+02\n5 17312     9.908002e+01 2.593600e+02\n11 17312     -1.172100e+02 5.957999e+01\n14 17312     9.239990e+00 1.543300e+02\n5 17313     5.944900e+02 2.442800e+02\n11 17313     3.020300e+02 6.101999e+01\n13 17313     3.349500e+02 5.032000e+02\n5 17314     -5.226000e+02 2.401500e+02\n11 17314     -5.183100e+02 4.151001e+01\n5 17315     -2.378400e+02 2.400800e+02\n11 17315     -3.488600e+02 4.051999e+01\n13 17315     -3.594500e+02 4.651100e+02\n14 17315     -3.176300e+02 1.337600e+02\n5 17316     -5.188700e+02 2.376600e+02\n11 17316     -5.161700e+02 3.866000e+01\n14 17316     -5.942500e+02 1.316900e+02\n5 17317     -5.188700e+02 2.376600e+02\n11 17317     -5.161700e+02 3.866000e+01\n5 17318     -3.480800e+02 1.893400e+02\n11 17318     -4.337200e+02 1.179993e+00\n13 17318     -4.505300e+02 4.164000e+02\n14 17318     -4.268800e+02 8.453000e+01\n5 17319     -1.283000e+02 1.781000e+02\n11 17319     -3.195200e+02 -9.619995e+00\n5 17320     5.850400e+02 1.741500e+02\n11 17320     2.886801e+02 3.419983e+00\n13 17320     3.277700e+02 4.430600e+02\n14 17320     4.793000e+02 8.128000e+01\n5 17321     5.457100e+02 1.735200e+02\n11 17321     2.538600e+02 1.679993e+00\n13 17321     2.957400e+02 4.410900e+02\n14 17321     4.411801e+02 8.001999e+01\n5 17322     5.679200e+02 1.240300e+02\n8 17322     -5.816998e+01 4.264200e+02\n5 17323     -1.662500e+02 1.107500e+02\n11 17323     -3.378800e+02 -3.090002e+01\n5 17324     2.947400e+02 9.371002e+01\n8 17324     -2.687600e+02 4.106600e+02\n5 17325     4.200601e+02 7.507001e+01\n6 17325     -5.099500e+02 8.118700e+02\n11 17325     1.461500e+02 -8.065997e+01\n14 17325     3.219100e+02 -1.678998e+01\n5 17326     4.166500e+02 4.640002e+01\n6 17326     -5.077500e+02 7.735100e+02\n11 17326     1.447700e+02 -1.036700e+02\n13 17326     1.934800e+02 3.304500e+02\n14 17326     3.194200e+02 -4.459998e+01\n5 17327     9.619995e+00 4.596002e+01\n11 17327     -2.182500e+02 -1.125200e+02\n13 17327     -1.414400e+02 3.118800e+02\n5 17328     9.619995e+00 4.596002e+01\n11 17328     -2.182500e+02 -1.125200e+02\n13 17328     -1.414400e+02 3.118800e+02\n5 17329     -1.956700e+02 4.420001e+01\n11 17329     -3.942100e+02 -1.156700e+02\n13 17329     -3.130700e+02 3.002400e+02\n14 17329     -2.800900e+02 -5.604999e+01\n5 17330     6.731000e+02 4.003998e+01\n6 17330     -2.146200e+02 7.982500e+02\n5 17331     4.436300e+02 2.785999e+01\n6 17331     -4.721600e+02 7.524500e+02\n11 17331     1.697500e+02 -1.187500e+02\n14 17331     3.462900e+02 -6.231000e+01\n5 17332     4.599200e+02 2.638000e+01\n8 17332     -1.324000e+02 3.461500e+02\n5 17333     6.192000e+02 2.278998e+01\n6 17333     -2.706200e+02 7.700100e+02\n14 17333     5.175400e+02 -6.379999e+01\n5 17334     4.573800e+02 1.683002e+01\n6 17334     -4.529700e+02 7.401500e+02\n14 17334     3.600000e+02 -7.225000e+01\n5 17335     4.091400e+02 1.226001e+01\n8 17335     -1.705400e+02 3.369000e+02\n11 17335     1.399200e+02 -1.316300e+02\n5 17336     3.278000e+02 8.030029e+00\n11 17336     6.682001e+01 -1.372300e+02\n5 17337     3.278000e+02 8.030029e+00\n11 17337     6.682001e+01 -1.372300e+02\n14 17337     2.336300e+02 -8.367999e+01\n5 17338     6.126001e+01 5.380005e+00\n8 17338     -4.597900e+02 3.368200e+02\n5 17339     3.065002e+01 4.070007e+00\n11 17339     -1.974400e+02 -1.455500e+02\n14 17339     -5.665002e+01 -9.246002e+01\n5 17340     5.589900e+02 3.659973e+00\n11 17340     2.771300e+02 -1.347600e+02\n5 17341     6.272100e+02 1.659973e+00\n6 17341     -2.587500e+02 7.445100e+02\n5 17342     6.484998e+01 -5.280029e+00\n11 17342     -1.667500e+02 -1.525000e+02\n5 17343     1.832600e+02 -5.989990e+00\n8 17343     -3.526200e+02 3.246200e+02\n5 17344     5.919200e+02 -8.299988e+00\n6 17344     -2.952900e+02 7.277300e+02\n8 17344     -3.015002e+01 3.167200e+02\n5 17345     1.804900e+02 -9.669983e+00\n11 17345     -6.475000e+01 -1.539700e+02\n13 17345     2.539978e+00 2.739100e+02\n14 17345     9.016998e+01 -1.029300e+02\n5 17346     5.845100e+02 -9.559998e+00\n6 17346     -3.047600e+02 7.243300e+02\n8 17346     -3.726001e+01 3.153700e+02\n9 17346     -2.774800e+02 4.220100e+02\n11 17346     2.997100e+02 -1.454600e+02\n5 17347     6.029301e+02 -9.780029e+00\n6 17347     -2.834100e+02 7.267300e+02\n9 17347     -2.621500e+02 4.214800e+02\n14 17347     5.031500e+02 -9.528998e+01\n5 17348     3.393199e+02 -1.062000e+01\n6 17348     -5.875900e+02 6.869500e+02\n8 17348     -2.239000e+02 3.184800e+02\n14 17348     2.457100e+02 -1.012300e+02\n5 17349     -4.695300e+02 -1.091998e+01\n11 17349     -4.882500e+02 -1.530000e+02\n13 17349     -5.328500e+02 2.383000e+02\n14 17349     -5.452100e+02 -1.134800e+02\n5 17350     5.642300e+02 -1.796997e+01\n8 17350     -4.975000e+01 3.089200e+02\n5 17351     1.775800e+02 -1.881000e+01\n8 17351     -3.564200e+02 3.129200e+02\n5 17352     1.775800e+02 -1.881000e+01\n8 17352     -3.564200e+02 3.129200e+02\n14 17352     8.746002e+01 -1.121800e+02\n5 17353     5.944000e+01 -2.253998e+01\n8 17353     -4.581200e+02 3.103600e+02\n5 17354     5.944000e+01 -2.253998e+01\n8 17354     -4.581200e+02 3.103600e+02\n5 17355     4.896801e+02 -2.695001e+01\n6 17355     -4.061400e+02 6.884400e+02\n11 17355     2.174300e+02 -1.617900e+02\n5 17356     6.371801e+02 -2.834003e+01\n6 17356     -2.428300e+02 7.084600e+02\n5 17357     4.791400e+02 -2.870001e+01\n6 17357     -4.178300e+02 6.847800e+02\n5 17358     3.516200e+02 -2.977002e+01\n8 17358     -2.121100e+02 3.021300e+02\n5 17359     1.588400e+02 -3.104999e+01\n11 17359     -8.247998e+01 -1.716500e+02\n14 17359     6.929999e+01 -1.248000e+02\n5 17360     4.892800e+02 -3.073999e+01\n6 17360     -4.065400e+02 6.838900e+02\n5 17361     4.988300e+02 -3.470001e+01\n6 17361     -3.948600e+02 6.808000e+02\n13 17361     2.622500e+02 2.671700e+02\n14 17361     4.018700e+02 -1.214300e+02\n5 17362     3.836899e+02 -3.809003e+01\n6 17362     -5.277900e+02 6.575800e+02\n14 17362     2.894900e+02 -1.273500e+02\n5 17363     2.277900e+02 -4.004999e+01\n11 17363     -2.039001e+01 -1.780900e+02\n14 17363     1.375300e+02 -1.319400e+02\n5 17364     3.221600e+02 -4.604999e+01\n12 17364     -4.196300e+02 6.171900e+02\n5 17365     1.269700e+02 -4.763000e+01\n8 17365     -3.971100e+02 2.870300e+02\n12 17365     -6.502600e+02 5.918100e+02\n13 17365     -3.919000e+01 2.397800e+02\n5 17366     3.715601e+02 -5.637000e+01\n6 17366     -5.380700e+02 6.326200e+02\n11 17366     1.105200e+02 -1.885200e+02\n5 17367     7.262000e+02 -5.635999e+01\n8 17367     6.876001e+01 2.739600e+02\n5 17368     5.799200e+02 -6.621997e+01\n11 17368     3.014000e+02 -1.916400e+02\n5 17369     3.768700e+02 -8.644000e+01\n8 17369     -1.873100e+02 2.524800e+02\n11 17369     1.173800e+02 -2.123600e+02\n12 17369     -3.481100e+02 5.767000e+02\n5 17370     1.153100e+02 -8.917999e+01\n8 17370     -4.027300e+02 2.489600e+02\n12 17370     -6.531300e+02 5.405000e+02\n13 17370     -4.644000e+01 2.051100e+02\n14 17370     2.809003e+01 -1.821700e+02\n5 17371     5.565900e+02 -9.759998e+01\n6 17371     -3.184000e+02 6.114200e+02\n8 17371     -4.925000e+01 2.420800e+02\n9 17371     -2.865200e+02 3.406800e+02\n12 17371     -1.489100e+02 5.835600e+02\n5 17372     5.554700e+02 -1.100300e+02\n8 17372     -4.927002e+01 2.321500e+02\n5 17373     6.283101e+02 -1.123400e+02\n12 17373     -7.137000e+01 5.737200e+02\n13 17373     3.677800e+02 2.089900e+02\n14 17373     5.314200e+02 -1.947700e+02\n5 17374     5.792500e+02 -1.138700e+02\n12 17374     -1.225900e+02 5.678100e+02\n5 17375     -5.143600e+02 -1.703600e+02\n11 17375     -5.255100e+02 -2.771500e+02\n5 17376     6.483000e+02 -1.729800e+02\n6 17376     -2.077500e+02 5.365600e+02\n11 17376     3.724600e+02 -2.769300e+02\n12 17376     -4.146002e+01 5.109400e+02\n5 17377     7.566100e+02 -1.728900e+02\n9 17377     -1.324300e+02 2.757600e+02\n12 17377     6.601001e+01 5.217300e+02\n5 17378     4.670900e+02 -1.815800e+02\n8 17378     -1.088900e+02 1.735000e+02\n5 17379     6.549500e+02 -1.816200e+02\n6 17379     -1.989000e+02 5.278700e+02\n8 17379     2.934998e+01 1.732200e+02\n5 17380     5.028900e+02 -1.928100e+02\n6 17380     -3.598700e+02 4.874300e+02\n7 17380     -1.243000e+02 5.350700e+02\n13 17380     2.697600e+02 1.395800e+02\n14 17380     4.113000e+02 -2.759600e+02\n5 17381     4.305200e+02 -1.939900e+02\n12 17381     -2.670700e+02 4.630700e+02\n5 17382     6.962000e+02 -1.974700e+02\n8 17382     5.914001e+01 1.599700e+02\n5 17383     -9.878998e+01 -2.014900e+02\n8 17383     -5.825900e+02 1.395100e+02\n5 17384     -1.472500e+02 -2.023900e+02\n11 17384     -3.419200e+02 -3.124800e+02\n5 17385     3.050500e+02 -2.144200e+02\n8 17385     -2.316600e+02 1.420300e+02\n5 17386     4.010000e+02 -2.297000e+02\n9 17386     -3.904800e+02 2.136300e+02\n5 17387     5.184003e+01 -2.313000e+02\n7 17387     -5.713700e+02 4.489300e+02\n13 17387     -8.985999e+01 8.673001e+01\n14 17387     -3.178003e+01 -3.235800e+02\n5 17388     -6.844000e+01 -2.390900e+02\n11 17388     -2.715900e+02 -3.422300e+02\n5 17389     -6.844000e+01 -2.390900e+02\n10 17389     -7.130600e+02 5.917800e+02\n11 17389     -2.715900e+02 -3.422300e+02\n5 17390     2.721899e+02 -2.418700e+02\n7 17390     -3.434600e+02 4.656300e+02\n13 17390     8.800000e+01 9.006000e+01\n14 17390     1.860601e+02 -3.295400e+02\n5 17391     -8.095001e+01 -2.421200e+02\n8 17391     -5.611500e+02 1.017100e+02\n5 17392     -8.390997e+01 -2.453000e+02\n8 17392     -5.621100e+02 9.898999e+01\n10 17392     -7.306300e+02 5.834500e+02\n5 17393     -1.158900e+02 -2.483900e+02\n10 17393     -7.713700e+02 5.759900e+02\n5 17394     -1.158900e+02 -2.483900e+02\n10 17394     -7.713700e+02 5.759900e+02\n5 17395     3.904600e+02 -2.582700e+02\n6 17395     -4.715300e+02 3.867700e+02\n7 17395     -2.241500e+02 4.626700e+02\n5 17396     3.904600e+02 -2.582700e+02\n6 17396     -4.715300e+02 3.867700e+02\n7 17396     -2.241500e+02 4.626700e+02\n14 17396     3.030000e+02 -3.434300e+02\n5 17397     8.876001e+01 -2.589600e+02\n7 17397     -5.265100e+02 4.269100e+02\n10 17397     -5.113800e+02 5.850500e+02\n5 17398     5.492999e+01 -2.841600e+02\n7 17398     -5.553000e+02 3.978500e+02\n12 17398     -6.710600e+02 3.033600e+02\n5 17399     -1.018100e+02 -2.959600e+02\n10 17399     -7.405900e+02 5.216800e+02\n13 17399     -2.103900e+02 2.646997e+01\n14 17399     -1.835000e+02 -3.910800e+02\n15 17399     -7.659600e+02 5.627100e+02\n5 17400     4.120900e+02 -3.016500e+02\n8 17400     -1.396000e+02 6.691000e+01\n14 17400     3.259399e+02 -3.863100e+02\n5 17401     2.362300e+02 -3.163400e+02\n7 17401     -3.658000e+02 3.908800e+02\n8 17401     -2.774800e+02 4.789999e+01\n14 17401     1.524301e+02 -4.041200e+02\n5 17402     2.362300e+02 -3.163400e+02\n7 17402     -3.658000e+02 3.908800e+02\n11 17402     4.830017e+00 -4.027900e+02\n14 17402     1.524301e+02 -4.041200e+02\n5 17403     -1.462700e+02 -3.253600e+02\n10 17403     -7.826100e+02 4.851600e+02\n5 17404     1.150100e+02 -3.427000e+02\n10 17404     -4.595200e+02 4.943600e+02\n5 17405     1.150100e+02 -3.427000e+02\n7 17405     -4.809900e+02 3.501500e+02\n10 17405     -4.595200e+02 4.943600e+02\n11 17405     -1.025200e+02 -4.258400e+02\n14 17405     3.315002e+01 -4.332100e+02\n15 17405     -4.449700e+02 5.387500e+02\n5 17406     5.451300e+02 -3.454100e+02\n6 17406     -2.761900e+02 3.202400e+02\n5 17407     -1.627100e+02 -3.628700e+02\n7 17407     -7.617900e+02 2.897000e+02\n15 17407     -8.222400e+02 4.690100e+02\n5 17408     -1.429500e+02 -3.783500e+02\n7 17408     -7.356600e+02 2.785500e+02\n10 17408     -7.608300e+02 4.271600e+02\n11 17408     -3.290900e+02 -4.553300e+02\n15 17408     -7.884000e+02 4.533200e+02\n5 17409     -1.085700e+02 -3.784800e+02\n7 17409     -6.999800e+02 2.836700e+02\n8 17409     -5.683500e+02 -2.985001e+01\n10 17409     -7.187700e+02 4.307700e+02\n13 17409     -2.101000e+02 -3.953998e+01\n14 17409     -1.892900e+02 -4.745601e+02\n15 17409     -7.409700e+02 4.586900e+02\n5 17410     -1.563600e+02 -3.847100e+02\n11 17410     -3.407900e+02 -4.607700e+02\n14 17410     -2.370900e+02 -4.821600e+02\n5 17411     6.029800e+02 -3.904500e+02\n6 17411     -2.003000e+02 2.841200e+02\n12 17411     -6.185999e+01 2.924100e+02\n5 17412     -1.035300e+02 -3.927400e+02\n8 17412     -5.615700e+02 -4.314999e+01\n10 17412     -7.080400e+02 4.158200e+02\n13 17412     -2.047800e+02 -5.021002e+01\n14 17412     -1.836300e+02 -4.886300e+02\n5 17413     5.860100e+02 -3.933100e+02\n6 17413     -2.175600e+02 2.768200e+02\n12 17413     -7.850000e+01 2.866300e+02\n5 17414     5.703101e+02 -4.000601e+02\n6 17414     -2.323700e+02 2.668600e+02\n5 17415     -2.590002e+01 -4.266600e+02\n7 17415     -6.035700e+02 2.519600e+02\n5 17416     -6.496002e+01 -4.504900e+02\n7 17416     -6.385100e+02 2.242000e+02\n10 17416     -6.492300e+02 3.592700e+02\n11 17416     -2.603000e+02 -5.149000e+02\n14 17416     -1.449100e+02 -5.460800e+02\n5 17417     6.357800e+02 -4.659700e+02\n6 17417     -9.482999e+01 2.227800e+02\n13 17417     3.682800e+02 -6.790002e+01\n5 17418     6.357800e+02 -4.659700e+02\n6 17418     -9.482999e+01 2.227800e+02\n7 17418     -7.992999e+01 2.969500e+02\n13 17418     3.682800e+02 -6.790002e+01\n14 17418     5.382700e+02 -5.463000e+02\n5 17419     4.447100e+02 -4.710500e+02\n9 17419     -2.857600e+02 5.123999e+01\n13 17419     2.297700e+02 -8.071002e+01\n14 17419     3.610200e+02 -5.549301e+02\n5 17420     4.058300e+02 -4.725400e+02\n7 17420     -2.084100e+02 2.696800e+02\n5 17421     4.313000e+02 -4.798400e+02\n9 17421     -2.946400e+02 4.339001e+01\n5 17422     6.007000e+02 -4.870800e+02\n6 17422     -1.240400e+02 1.934100e+02\n12 17422     -8.403003e+01 2.439400e+02\n5 17423     5.408600e+02 -5.098300e+02\n6 17423     -1.840300e+02 1.534200e+02\n5 17424     6.279301e+02 -5.105900e+02\n10 17424     -8.350000e+01 3.094300e+02\n12 17424     -5.529999e+01 2.284600e+02\n15 17424     -2.310999e+01 3.347700e+02\n5 17425     5.030400e+02 -5.115300e+02\n6 17425     -2.353900e+02 1.390500e+02\n5 17426     2.444301e+02 -5.118600e+02\n15 17426     -2.960700e+02 3.400700e+02\n5 17427     4.976300e+02 -5.197700e+02\n6 17427     -2.383600e+02 1.289900e+02\n12 17427     -1.766100e+02 1.765000e+02\n5 17428     4.976300e+02 -5.197700e+02\n6 17428     -2.383600e+02 1.289900e+02\n7 17428     -1.801100e+02 2.335800e+02\n12 17428     -1.766100e+02 1.765000e+02\n5 17429     4.938900e+02 -5.263199e+02\n6 17429     -2.395000e+02 1.212400e+02\n7 17429     -1.843700e+02 2.267600e+02\n12 17429     -1.797000e+02 1.694200e+02\n13 17429     2.629600e+02 -1.210000e+02\n5 17430     -2.183002e+01 -5.294600e+02\n7 17430     -5.971100e+02 1.575200e+02\n5 17431     4.942100e+02 -5.299000e+02\n6 17431     -2.382600e+02 1.178700e+02\n7 17431     -1.847000e+02 2.237100e+02\n12 17431     -1.796000e+02 1.661200e+02\n5 17432     5.761000e+02 -5.309800e+02\n6 17432     -1.367300e+02 1.416300e+02\n12 17432     -1.047200e+02 1.955100e+02\n13 17432     3.234200e+02 -1.203100e+02\n5 17433     6.473600e+02 -5.319000e+02\n6 17433     -6.195001e+01 1.588500e+02\n12 17433     -3.382001e+01 2.122800e+02\n5 17434     -6.340997e+01 -5.382300e+02\n8 17434     -5.008200e+02 -1.506700e+02\n13 17434     -1.650800e+02 -1.616500e+02\n5 17435     -7.698999e+01 -5.429600e+02\n10 17435     -6.712600e+02 2.548000e+02\n5 17436     4.878700e+02 -5.467900e+02\n6 17436     -2.388300e+02 9.859998e+01\n7 17436     -1.917900e+02 2.074400e+02\n12 17436     -1.844800e+02 1.485700e+02\n5 17437     5.534700e+02 -5.601400e+02\n6 17437     -1.533900e+02 1.050400e+02\n7 17437     -1.555000e+02 2.004700e+02\n9 17437     -9.140002e+01 1.536400e+02\n10 17437     -1.567900e+02 2.529000e+02\n12 17437     -1.240100e+02 1.598600e+02\n13 17437     3.063600e+02 -1.441100e+02\n15 17437     -1.077600e+02 2.670000e+02\n5 17438     6.942100e+02 -5.681600e+02\n7 17438     -4.263000e+01 2.105000e+02\n12 17438     1.654999e+01 1.879000e+02\n15 17438     3.325000e+01 2.666300e+02\n5 17439     -1.622100e+02 -5.810500e+02\n7 17439     -7.262200e+02 8.754001e+01\n5 17440     4.737800e+02 -5.829800e+02\n6 17440     -2.412000e+02 5.759003e+01\n7 17440     -2.081100e+02 1.726700e+02\n10 17440     -2.075400e+02 2.335900e+02\n12 17440     -1.964700e+02 1.111800e+02\n15 17440     -1.639500e+02 2.425800e+02\n5 17441     4.212300e+02 -5.835900e+02\n7 17441     -2.464700e+02 1.663700e+02\n10 17441     -2.469100e+02 2.327700e+02\n12 17441     -2.468900e+02 9.498999e+01\n15 17441     -2.081800e+02 2.408500e+02\n5 17442     6.302300e+02 -6.000000e+02\n9 17442     -1.446002e+01 1.543800e+02\n12 17442     -4.367999e+01 1.405200e+02\n5 17443     1.703800e+02 4.222800e+02\n11 17443     2.157001e+01 1.947200e+02\n14 17443     8.059003e+01 3.138900e+02\n5 17444     1.482200e+02 4.172100e+02\n11 17444     3.869995e+00 1.888600e+02\n14 17444     5.926001e+01 3.084400e+02\n5 17445     -2.049400e+02 4.098800e+02\n11 17445     -2.733500e+02 1.747200e+02\n5 17446     2.886300e+02 3.992600e+02\n11 17446     9.872998e+01 1.766500e+02\n14 17446     1.935400e+02 2.933100e+02\n5 17447     5.967999e+01 3.834800e+02\n11 17447     -9.190002e+01 1.589100e+02\n5 17448     -1.326900e+02 3.795700e+02\n11 17448     -2.516100e+02 1.517000e+02\n5 17449     -1.326900e+02 3.795700e+02\n11 17449     -2.516100e+02 1.517000e+02\n5 17450     3.941600e+02 3.792800e+02\n11 17450     1.577600e+02 1.634400e+02\n14 17450     2.931899e+02 2.749100e+02\n5 17451     5.706600e+02 3.794900e+02\n11 17451     2.883800e+02 1.680100e+02\n14 17451     4.610699e+02 2.778900e+02\n5 17452     4.322998e+01 3.741700e+02\n11 17452     -1.073300e+02 1.515300e+02\n5 17453     2.671997e+01 3.737900e+02\n11 17453     -1.206600e+02 1.506900e+02\n5 17454     -9.497998e+01 3.729800e+02\n11 17454     -2.206400e+02 1.477300e+02\n5 17455     1.501200e+02 3.724300e+02\n11 17455     -2.003003e+01 1.528100e+02\n14 17455     6.008002e+01 2.655600e+02\n5 17456     -9.903998e+01 3.716700e+02\n11 17456     -2.231900e+02 1.459000e+02\n14 17456     -1.812700e+02 2.627100e+02\n5 17457     -3.832001e+01 3.710300e+02\n11 17457     -1.743400e+02 1.471400e+02\n5 17458     -1.796800e+02 3.693800e+02\n11 17458     -2.916000e+02 1.430500e+02\n5 17459     -8.858002e+01 3.696700e+02\n11 17459     -2.152100e+02 1.444700e+02\n14 17459     -1.711200e+02 2.616200e+02\n5 17460     1.714500e+02 3.664800e+02\n11 17460     -3.289978e+00 1.487400e+02\n5 17461     1.016600e+02 3.646200e+02\n11 17461     -6.140002e+01 1.461300e+02\n5 17462     -1.671800e+02 3.640200e+02\n11 17462     -2.822900e+02 1.389300e+02\n5 17463     -6.598999e+01 3.624500e+02\n11 17463     -1.980400e+02 1.395800e+02\n5 17464     -2.025200e+02 3.617800e+02\n11 17464     -3.098900e+02 1.359900e+02\n5 17465     1.309003e+01 3.591300e+02\n11 17465     -1.349700e+02 1.395300e+02\n5 17466     1.534900e+02 3.590700e+02\n11 17466     -2.010999e+01 1.430700e+02\n14 17466     6.378998e+01 2.527000e+02\n5 17467     4.940100e+02 3.585000e+02\n11 17467     2.301600e+02 1.504200e+02\n14 17467     3.890000e+02 2.565700e+02\n5 17468     -3.621997e+01 3.569300e+02\n11 17468     -1.750700e+02 1.363200e+02\n5 17469     -1.903200e+02 3.565500e+02\n11 17469     -3.018400e+02 1.324400e+02\n5 17470     -5.309998e+01 3.562900e+02\n11 17470     -1.890800e+02 1.356100e+02\n5 17471     -1.989300e+02 3.562000e+02\n11 17471     -2.822500e+02 1.232000e+02\n5 17472     -1.498300e+02 3.511700e+02\n11 17472     -2.697800e+02 1.286200e+02\n5 17473     -1.856900e+02 3.498300e+02\n11 17473     -2.987800e+02 1.267500e+02\n5 17474     -3.946997e+01 3.496000e+02\n11 17474     -1.791500e+02 1.305500e+02\n5 17475     3.895601e+02 3.462100e+02\n11 17475     1.388900e+02 1.374400e+02\n13 17475     1.642400e+02 5.841700e+02\n14 17475     2.882100e+02 2.433900e+02\n5 17476     6.289978e+00 3.459200e+02\n11 17476     -1.423400e+02 1.285300e+02\n13 17476     -1.572000e+02 5.694600e+02\n14 17476     -7.913000e+01 2.387000e+02\n5 17477     -1.450012e+00 3.447900e+02\n11 17477     -1.489000e+02 1.274600e+02\n5 17478     -1.450012e+00 3.447900e+02\n11 17478     -1.489000e+02 1.274600e+02\n5 17479     5.722400e+02 3.427000e+02\n11 17479     2.926200e+02 1.393800e+02\n14 17479     4.637600e+02 2.426800e+02\n5 17480     -7.827002e+01 3.414300e+02\n11 17480     -2.117300e+02 1.230300e+02\n5 17481     -6.898999e+01 3.415900e+02\n11 17481     -2.042900e+02 1.235500e+02\n5 17482     2.734003e+01 3.414800e+02\n11 17482     -1.261000e+02 1.254400e+02\n5 17483     3.742999e+01 3.402300e+02\n11 17483     -1.184200e+02 1.251300e+02\n5 17484     1.292999e+01 3.386500e+02\n11 17484     -1.384600e+02 1.235300e+02\n5 17485     4.541400e+02 3.367900e+02\n11 17485     1.941100e+02 1.313300e+02\n13 17485     2.185000e+02 5.780800e+02\n14 17485     3.506200e+02 2.353000e+02\n5 17486     -1.397900e+02 3.366700e+02\n11 17486     -2.950900e+02 1.169300e+02\n5 17487     -5.564001e+01 3.350900e+02\n11 17487     -1.950200e+02 1.190100e+02\n5 17488     5.891998e+01 3.350600e+02\n11 17488     -1.014500e+02 1.212900e+02\n5 17489     3.688000e+02 3.349100e+02\n11 17489     1.193500e+02 1.272300e+02\n14 17489     2.683800e+02 2.321700e+02\n5 17490     2.542999e+01 3.332200e+02\n11 17490     -1.298500e+02 1.196800e+02\n5 17491     2.103003e+01 3.279100e+02\n11 17491     -1.340700e+02 1.151900e+02\n5 17492     -2.086200e+02 3.102100e+02\n11 17492     -3.248400e+02 9.567999e+01\n5 17493     3.417400e+02 3.055800e+02\n11 17493     9.026001e+01 1.031300e+02\n5 17494     -2.466800e+02 2.952600e+02\n11 17494     -3.597000e+02 8.329999e+01\n5 17495     -5.982001e+01 2.941600e+02\n11 17495     -2.455000e+02 8.404999e+01\n5 17496     3.574500e+02 2.914000e+02\n11 17496     1.016100e+02 9.189001e+01\n13 17496     1.381500e+02 5.348300e+02\n5 17497     -2.092400e+02 2.907800e+02\n11 17497     -3.269100e+02 8.110999e+01\n5 17498     -2.008700e+02 2.877700e+02\n11 17498     -3.209800e+02 7.951001e+01\n13 17498     -3.317400e+02 5.101700e+02\n14 17498     -2.820000e+02 1.818000e+02\n5 17499     -2.362500e+02 2.809100e+02\n11 17499     -3.496100e+02 7.335999e+01\n13 17499     -3.615700e+02 5.021600e+02\n14 17499     -3.163800e+02 1.747400e+02\n5 17500     -9.948999e+01 2.734000e+02\n11 17500     -2.814000e+02 6.748001e+01\n13 17500     -2.448900e+02 5.013900e+02\n5 17501     5.925300e+02 2.697600e+02\n11 17501     3.033500e+02 8.160999e+01\n13 17501     3.329700e+02 5.248000e+02\n14 17501     4.840400e+02 1.734200e+02\n5 17502     3.771801e+02 2.557100e+02\n11 17502     1.130900e+02 6.504001e+01\n5 17503     -3.027100e+02 2.523000e+02\n11 17503     -3.877900e+02 5.014001e+01\n14 17503     -3.804600e+02 1.460500e+02\n5 17504     -3.047600e+02 2.473900e+02\n11 17504     -3.903000e+02 4.641000e+01\n14 17504     -3.832400e+02 1.409800e+02\n5 17505     -3.047600e+02 2.473900e+02\n11 17505     -3.903000e+02 4.641000e+01\n13 17505     -4.173100e+02 4.687700e+02\n14 17505     -3.832400e+02 1.409800e+02\n5 17506     7.334998e+01 2.416900e+02\n11 17506     -1.423800e+02 4.656000e+01\n5 17507     3.949100e+02 2.148900e+02\n11 17507     1.263400e+02 3.216000e+01\n5 17508     -1.712300e+02 2.077500e+02\n11 17508     -3.449500e+02 1.484003e+01\n5 17509     4.808800e+02 2.037100e+02\n11 17509     1.957200e+02 2.570999e+01\n13 17509     2.419000e+02 4.648400e+02\n14 17509     3.775900e+02 1.082600e+02\n5 17510     -3.339700e+02 2.007500e+02\n11 17510     -4.203700e+02 1.015002e+01\n13 17510     -4.392700e+02 4.270100e+02\n5 17511     -3.433100e+02 2.000600e+02\n11 17511     -4.277700e+02 9.190002e+00\n13 17511     -4.479300e+02 4.260900e+02\n14 17511     -4.226400e+02 9.507999e+01\n5 17512     -3.687700e+02 1.775100e+02\n11 17512     -4.513300e+02 -9.150024e+00\n13 17512     -4.670500e+02 4.050100e+02\n14 17512     -4.472500e+02 7.275000e+01\n5 17513     7.012600e+02 1.760100e+02\n11 17513     3.930300e+02 8.309998e+00\n13 17513     4.221400e+02 4.484600e+02\n14 17513     5.908500e+02 8.528000e+01\n5 17514     1.493100e+02 1.538400e+02\n11 17514     -9.063000e+01 -2.329999e+01\n5 17515     5.711200e+02 9.479999e+01\n6 17515     -3.372200e+02 8.566200e+02\n5 17516     5.623199e+02 9.312000e+01\n8 17516     -6.066998e+01 4.009700e+02\n5 17517     6.095601e+02 9.037000e+01\n11 17517     3.176000e+02 -6.328998e+01\n13 17517     3.499000e+02 3.738700e+02\n14 17517     5.063600e+02 1.039978e+00\n5 17518     5.685999e+01 8.221002e+01\n8 17518     -4.714900e+02 4.104800e+02\n5 17519     6.058500e+02 7.262000e+01\n6 17519     -2.939900e+02 8.316000e+02\n8 17519     -2.701001e+01 3.824000e+02\n5 17520     1.377200e+02 7.007001e+01\n11 17520     -1.070700e+02 -9.101001e+01\n13 17520     -3.676001e+01 3.373300e+02\n14 17520     4.689001e+01 -2.695001e+01\n5 17521     -5.167999e+01 6.956000e+01\n11 17521     -2.749700e+02 -9.470001e+01\n13 17521     -1.945800e+02 3.285600e+02\n14 17521     -1.391800e+02 -2.941998e+01\n5 17522     -3.039001e+01 6.948999e+01\n11 17522     -2.551100e+02 -9.467999e+01\n13 17522     -1.766900e+02 3.290800e+02\n14 17522     -1.181800e+02 -2.996002e+01\n5 17523     6.316400e+02 5.848999e+01\n8 17523     -6.770020e+00 3.695900e+02\n5 17524     5.086000e+02 5.640002e+01\n6 17524     -4.020700e+02 7.986500e+02\n5 17525     -1.713400e+02 4.941998e+01\n11 17525     -3.737500e+02 -1.117600e+02\n13 17525     -2.929600e+02 3.058000e+02\n14 17525     -2.558100e+02 -5.046997e+01\n5 17526     4.389800e+02 4.842999e+01\n6 17526     -4.809300e+02 7.791700e+02\n5 17527     7.513300e+02 3.751001e+01\n6 17527     -1.311600e+02 8.049800e+02\n8 17527     7.950000e+01 3.492700e+02\n5 17528     2.975200e+02 2.487000e+01\n8 17528     -2.607700e+02 3.498700e+02\n5 17529     2.975200e+02 2.487000e+01\n8 17529     -2.607700e+02 3.498700e+02\n11 17529     3.817999e+01 -1.236600e+02\n14 17529     2.035400e+02 -6.729999e+01\n5 17530     7.374500e+02 2.403998e+01\n6 17530     -1.443700e+02 7.863500e+02\n13 17530     4.566200e+02 3.247400e+02\n5 17531     3.458101e+02 1.828998e+01\n8 17531     -2.212600e+02 3.441300e+02\n14 17531     2.515000e+02 -7.191998e+01\n5 17532     1.790600e+02 1.538000e+01\n8 17532     -3.584200e+02 3.439500e+02\n5 17533     4.624200e+02 6.109985e+00\n8 17533     -1.285200e+02 3.309200e+02\n5 17534     8.199800e+02 -1.799988e+00\n6 17534     -5.510999e+01 7.648000e+02\n8 17534     1.284800e+02 3.159000e+02\n13 17534     5.177400e+02 3.054200e+02\n14 17534     7.121500e+02 -8.367999e+01\n5 17535     7.568400e+02 -3.553003e+01\n6 17535     -1.149800e+02 7.165200e+02\n9 17535     -1.473600e+02 3.953600e+02\n13 17535     4.691700e+02 2.757600e+02\n14 17535     6.536100e+02 -1.179000e+02\n5 17536     4.698400e+02 -4.058002e+01\n11 17536     1.992600e+02 -1.730000e+02\n5 17537     -4.640997e+01 -4.512000e+01\n8 17537     -5.523200e+02 2.892400e+02\n11 17537     -2.621800e+02 -1.859800e+02\n5 17538     4.568101e+02 -5.197998e+01\n8 17538     -1.282700e+02 2.810300e+02\n14 17538     3.613400e+02 -1.393800e+02\n5 17539     8.006500e+02 -5.722998e+01\n6 17539     -6.785999e+01 6.964000e+02\n8 17539     1.192100e+02 2.727100e+02\n5 17540     -5.537000e+01 -5.819000e+01\n8 17540     -5.591400e+02 2.768600e+02\n13 17540     -1.885700e+02 2.219600e+02\n14 17540     -1.404200e+02 -1.545600e+02\n5 17541     -5.537000e+01 -5.819000e+01\n8 17541     -5.591400e+02 2.768600e+02\n13 17541     -1.885700e+02 2.219600e+02\n14 17541     -1.404200e+02 -1.545600e+02\n5 17542     5.601500e+02 -6.612000e+01\n6 17542     -3.203100e+02 6.506200e+02\n5 17543     6.302500e+02 -9.139001e+01\n12 17543     -7.258002e+01 5.983400e+02\n5 17544     7.039800e+02 -1.055400e+02\n11 17544     4.186899e+02 -2.204700e+02\n12 17544     6.349976e+00 5.890200e+02\n5 17545     1.956200e+02 -1.180700e+02\n8 17545     -3.316500e+02 2.236300e+02\n12 17545     -5.494600e+02 5.167800e+02\n5 17546     5.473500e+02 -1.289000e+02\n6 17546     -3.219400e+02 5.724200e+02\n5 17547     4.093300e+02 -1.312300e+02\n8 17547     -1.569900e+02 2.140200e+02\n9 17547     -3.993700e+02 3.077600e+02\n5 17548     9.603998e+01 -1.373800e+02\n12 17548     -6.634700e+02 4.802000e+02\n5 17549     9.603998e+01 -1.373800e+02\n8 17549     -4.148800e+02 2.049000e+02\n12 17549     -6.634700e+02 4.802000e+02\n5 17550     9.603998e+01 -1.373800e+02\n8 17550     -4.148800e+02 2.049000e+02\n12 17550     -6.634700e+02 4.802000e+02\n5 17551     3.055800e+02 -1.660700e+02\n11 17551     5.771997e+01 -2.790200e+02\n5 17552     6.432300e+02 -1.908300e+02\n7 17552     8.900024e+00 5.485000e+02\n5 17553     4.364001e+01 -2.277800e+02\n11 17553     -1.733900e+02 -3.320100e+02\n13 17553     -9.678998e+01 8.926999e+01\n5 17554     4.364001e+01 -2.277800e+02\n7 17554     -5.809900e+02 4.511900e+02\n11 17554     -1.733900e+02 -3.320100e+02\n12 17554     -7.009700e+02 3.666100e+02\n5 17555     -9.140015e+00 -2.602800e+02\n8 17555     -4.927300e+02 8.781000e+01\n5 17556     -6.646997e+01 -2.713300e+02\n8 17556     -5.433700e+02 7.462000e+01\n10 17556     -7.009700e+02 5.545500e+02\n11 17556     -2.684500e+02 -3.682400e+02\n12 17556     -8.222500e+02 2.949700e+02\n5 17557     4.260699e+02 -2.908600e+02\n8 17557     -1.291500e+02 7.738000e+01\n5 17558     2.044600e+02 -3.002700e+02\n8 17558     -3.054800e+02 6.085999e+01\n10 17558     -3.621400e+02 5.503100e+02\n5 17559     -5.010010e+00 -3.112500e+02\n7 17559     -6.103300e+02 3.635100e+02\n8 17559     -4.833100e+02 4.064001e+01\n11 17559     -2.117100e+02 -4.000200e+02\n14 17559     -8.634003e+01 -4.038800e+02\n5 17560     -1.119300e+02 -3.198000e+02\n8 17560     -5.789800e+02 2.603000e+01\n11 17560     -3.049400e+02 -4.073200e+02\n13 17560     -2.166700e+02 7.150024e+00\n5 17561     5.304999e+01 -3.341600e+02\n12 17561     -6.592000e+02 2.461300e+02\n5 17562     4.929999e+01 -3.511900e+02\n7 17562     -5.451700e+02 3.337300e+02\n10 17562     -5.363200e+02 4.785400e+02\n13 17562     -8.553998e+01 -8.320007e+00\n14 17562     -3.234998e+01 -4.426400e+02\n5 17563     2.428003e+01 -3.633100e+02\n15 17563     -5.633500e+02 4.999000e+02\n5 17564     -1.021800e+02 -3.669800e+02\n8 17564     -5.639600e+02 -1.787000e+01\n13 17564     -2.054600e+02 -2.965002e+01\n14 17564     -1.825500e+02 -4.622000e+02\n15 17564     -7.363800e+02 4.741800e+02\n5 17565     6.170900e+02 -3.872000e+02\n6 17565     -1.865300e+02 2.909600e+02\n10 17565     8.139001e+01 4.857800e+02\n11 17565     3.163600e+02 -4.624900e+02\n12 17565     -4.803998e+01 2.982100e+02\n13 17565     3.621200e+02 -7.880005e+00\n15 17565     1.851500e+02 5.401800e+02\n5 17566     5.948800e+02 -4.054500e+02\n6 17566     -2.042400e+02 2.660300e+02\n7 17566     -3.923999e+01 3.500500e+02\n11 17566     2.927600e+02 -4.789100e+02\n15 17566     1.528101e+02 5.131600e+02\n5 17567     -9.634998e+01 -4.144200e+02\n7 17567     -6.771400e+02 2.521000e+02\n8 17567     -5.519000e+02 -6.253998e+01\n10 17567     -6.928100e+02 3.935700e+02\n5 17568     -1.075200e+02 -4.344200e+02\n7 17568     -6.828500e+02 2.323700e+02\n11 17568     -2.951200e+02 -5.014700e+02\n13 17568     -2.049000e+02 -8.307001e+01\n14 17568     -1.870000e+02 -5.305699e+02\n5 17569     -8.325000e+01 -4.415100e+02\n10 17569     -6.697700e+02 3.677700e+02\n14 17569     -1.626700e+02 -5.370200e+02\n5 17570     3.655500e+02 -4.756400e+02\n8 17570     -1.448300e+02 -4.503000e+01\n5 17571     -3.803998e+01 -5.015400e+02\n7 17571     -6.120800e+02 1.809300e+02\n5 17572     -2.410700e+02 -5.091200e+02\n7 17572     -8.054600e+02 1.405400e+02\n13 17572     -3.083100e+02 -1.505100e+02\n5 17573     6.567700e+02 -5.168000e+02\n10 17573     -5.815002e+01 3.045700e+02\n13 17573     3.835699e+02 -1.052100e+02\n5 17574     3.916500e+02 -5.254301e+02\n8 17574     -1.145300e+02 -7.265002e+01\n5 17575     6.077300e+02 -5.257900e+02\n8 17575     9.664001e+01 6.126001e+01\n5 17576     4.419900e+02 -5.282000e+02\n7 17576     -2.225400e+02 2.200200e+02\n10 17576     -2.088800e+02 2.971200e+02\n12 17576     -2.297600e+02 1.535000e+02\n15 17576     -1.633500e+02 3.160300e+02\n5 17577     3.588700e+02 -5.309900e+02\n8 17577     -1.393400e+02 -8.022998e+01\n9 17577     -3.372700e+02 -5.700073e-01\n13 17577     1.646500e+02 -1.310200e+02\n5 17578     -1.848300e+02 -5.421300e+02\n7 17578     -7.485100e+02 1.189100e+02\n13 17578     -2.606400e+02 -1.729400e+02\n5 17579     -6.634003e+01 -5.426899e+02\n7 17579     -6.373000e+02 1.385500e+02\n10 17579     -6.597800e+02 2.567000e+02\n5 17580     -1.868800e+02 -5.463600e+02\n7 17580     -7.506900e+02 1.153200e+02\n5 17581     3.433500e+02 -5.576600e+02\n6 17581     -4.267000e+02 3.900000e+01\n13 17581     1.529301e+02 -1.523700e+02\n5 17582     3.589800e+02 -5.796200e+02\n6 17582     -4.015800e+02 1.997998e+01\n5 17583     -4.690002e+01 -5.888500e+02\n7 17583     -6.184000e+02 9.964001e+01\n10 17583     -6.433600e+02 2.085500e+02\n5 17584     4.151801e+02 -6.018199e+02\n6 17584     -3.015500e+02 2.109003e+01\n5 17585     1.897400e+02 -6.040500e+02\n7 17585     -4.036100e+02 1.236800e+02\n5 17586     6.356100e+02 -6.046801e+02\n8 17586     1.330800e+02 1.676999e+01\n12 17586     -3.631000e+01 1.375400e+02\n5 17587     2.213101e+02 -6.142500e+02\n7 17587     -3.782300e+02 1.170300e+02\n10 17587     -3.701600e+02 2.075800e+02\n13 17587     6.031000e+01 -2.029000e+02\n15 17587     -3.472000e+02 2.065000e+02\n5 17588     4.667400e+02 -6.147100e+02\n6 17588     -2.378200e+02 2.347998e+01\n7 17588     -2.167900e+02 1.432200e+02\n5 17589     4.624600e+02 -6.159301e+02\n6 17589     -2.418500e+02 2.157001e+01\n12 17589     -2.046200e+02 7.765997e+01\n5 17590     5.547900e+02 4.087400e+02\n11 17590     2.751000e+02 1.901100e+02\n5 17591     5.598101e+02 4.054900e+02\n11 17591     2.791801e+02 1.883400e+02\n5 17592     4.465000e+02 3.398100e+02\n11 17592     1.877800e+02 1.336300e+02\n13 17592     2.122800e+02 5.801800e+02\n14 17592     3.433300e+02 2.378400e+02\n5 17593     4.145100e+02 3.244200e+02\n11 17593     1.567800e+02 1.209800e+02\n13 17593     1.854100e+02 5.657900e+02\n14 17593     3.124600e+02 2.225200e+02\n5 17594     -1.865997e+01 2.748800e+02\n11 17594     -2.148300e+02 6.885999e+01\n5 17595     -2.681800e+02 2.658100e+02\n11 17595     -3.697400e+02 6.139999e+01\n13 17595     -3.876700e+02 4.871000e+02\n14 17595     -3.476300e+02 1.595100e+02\n5 17596     4.913600e+02 2.538900e+02\n11 17596     2.130300e+02 6.541000e+01\n13 17596     2.504800e+02 5.075600e+02\n14 17596     3.876400e+02 1.563200e+02\n5 17597     -2.376500e+02 2.512200e+02\n11 17597     -3.493400e+02 4.951001e+01\n5 17598     -2.376500e+02 2.512200e+02\n11 17598     -3.493400e+02 4.951001e+01\n13 17598     -3.598700e+02 4.738900e+02\n14 17598     -3.172500e+02 1.434000e+02\n5 17599     -2.326700e+02 2.476900e+02\n11 17599     -3.455900e+02 4.698001e+01\n5 17600     -2.898700e+02 2.454200e+02\n11 17600     -3.788700e+02 4.529001e+01\n13 17600     -4.040400e+02 4.680900e+02\n14 17600     -3.679300e+02 1.391800e+02\n5 17601     -3.002500e+02 2.386800e+02\n11 17601     -3.882500e+02 4.001001e+01\n5 17602     -3.366600e+02 2.160900e+02\n11 17602     -4.198200e+02 2.194000e+01\n13 17602     -4.431700e+02 4.408000e+02\n14 17602     -4.160200e+02 1.119100e+02\n5 17603     -3.318100e+02 2.068100e+02\n11 17603     -4.179600e+02 1.521997e+01\n5 17604     -3.467100e+02 1.964400e+02\n11 17604     -4.310800e+02 6.869995e+00\n13 17604     -4.503900e+02 4.228800e+02\n14 17604     -4.256400e+02 9.110001e+01\n5 17605     -3.518400e+02 1.866800e+02\n11 17605     -4.364100e+02 -1.630005e+00\n13 17605     -4.538000e+02 4.139500e+02\n14 17605     -4.309900e+02 8.195001e+01\n5 17606     -3.518400e+02 1.866800e+02\n11 17606     -4.364100e+02 -1.630005e+00\n13 17606     -4.538000e+02 4.139500e+02\n14 17606     -4.309900e+02 8.195001e+01\n5 17607     -3.294300e+02 1.813100e+02\n11 17607     -4.200600e+02 -5.500000e+00\n5 17608     6.618700e+02 1.522900e+02\n8 17608     8.440002e+00 4.450000e+02\n14 17608     5.538500e+02 6.145001e+01\n5 17609     -1.347600e+02 1.339000e+02\n11 17609     -3.356300e+02 -6.323999e+01\n5 17610     6.358101e+02 1.079100e+02\n8 17610     -7.309998e+00 4.105000e+02\n5 17611     4.231899e+02 1.031300e+02\n6 17611     -5.127400e+02 8.501800e+02\n5 17612     2.464301e+02 8.509003e+01\n11 17612     -1.133002e+01 -7.640002e+01\n13 17612     5.223999e+01 3.549600e+02\n14 17612     1.523101e+02 -1.042999e+01\n5 17613     8.232700e+02 7.491998e+01\n8 17613     1.250000e+02 3.760900e+02\n11 17613     5.105699e+02 -7.009003e+01\n14 17613     7.119399e+02 -8.580017e+00\n5 17614     7.392400e+02 7.335999e+01\n6 17614     -1.489300e+02 8.481300e+02\n11 17614     4.359700e+02 -7.221997e+01\n5 17615     6.489399e+02 6.440997e+01\n8 17615     5.429993e+00 3.737000e+02\n5 17616     4.920601e+02 6.102002e+01\n8 17616     -1.102900e+02 3.766000e+02\n5 17617     5.014600e+02 5.566998e+01\n6 17617     -4.104200e+02 7.968300e+02\n8 17617     -1.031400e+02 3.719100e+02\n5 17618     -2.053200e+02 4.903998e+01\n11 17618     -4.047800e+02 -1.128600e+02\n13 17618     -3.217800e+02 3.037100e+02\n14 17618     -2.900400e+02 -5.152002e+01\n5 17619     1.749300e+02 4.121997e+01\n8 17619     -3.648200e+02 3.677300e+02\n5 17620     -2.528300e+02 3.583002e+01\n11 17620     -4.188400e+02 -1.216500e+02\n13 17620     -3.589700e+02 2.895700e+02\n14 17620     -3.352500e+02 -6.540002e+01\n5 17621     8.230000e+02 1.281000e+01\n6 17621     -5.425000e+01 7.832600e+02\n8 17621     1.296400e+02 3.274700e+02\n9 17621     -1.074300e+02 4.365400e+02\n11 17621     5.152500e+02 -1.205100e+02\n13 17621     5.202100e+02 3.179500e+02\n14 17621     7.144700e+02 -6.923999e+01\n5 17622     5.950601e+02 -6.549988e+00\n6 17622     -2.918200e+02 7.299800e+02\n9 17622     -2.669700e+02 4.245000e+02\n5 17623     6.077000e+02 -1.116998e+01\n6 17623     -2.776000e+02 7.265100e+02\n8 17623     -1.877002e+01 3.139100e+02\n9 17623     -2.579000e+02 4.201000e+02\n5 17624     2.259100e+02 -1.160999e+01\n8 17624     -3.163800e+02 3.191500e+02\n5 17625     -1.009003e+01 -3.900000e+01\n8 17625     -5.197800e+02 2.946500e+02\n13 17625     -1.521200e+02 2.402500e+02\n14 17625     -9.594000e+01 -1.343200e+02\n5 17626     3.754700e+02 -5.189001e+01\n8 17626     -1.915000e+02 2.824300e+02\n5 17627     4.746899e+02 -5.681000e+01\n6 17627     -4.179800e+02 6.486600e+02\n5 17628     4.942700e+02 -1.220700e+02\n11 17628     2.269800e+02 -2.395300e+02\n5 17629     3.125601e+02 -1.602700e+02\n7 17629     -3.178300e+02 5.490000e+02\n5 17630     7.586200e+02 -1.607200e+02\n6 17630     -9.604001e+01 5.690800e+02\n8 17630     9.917999e+01 1.905000e+02\n9 17630     -1.323700e+02 2.870100e+02\n12 17630     6.660999e+01 5.345600e+02\n5 17631     5.335900e+02 -1.710600e+02\n12 17631     -1.611000e+02 5.014200e+02\n5 17632     4.405400e+02 -1.834500e+02\n12 17632     -2.585800e+02 4.757900e+02\n5 17633     3.972400e+02 -2.063600e+02\n7 17633     -2.252500e+02 5.121600e+02\n5 17634     -1.135100e+02 -2.427100e+02\n7 17634     -7.458400e+02 4.141900e+02\n8 17634     -5.890900e+02 9.981000e+01\n5 17635     3.228998e+01 -2.621800e+02\n10 17635     -5.804800e+02 5.754700e+02\n11 17635     -1.811000e+02 -3.600200e+02\n13 17635     -1.036100e+02 6.141998e+01\n14 17635     -5.072998e+01 -3.545600e+02\n5 17636     -1.676001e+01 -2.690600e+02\n8 17636     -4.992300e+02 7.904001e+01\n12 17636     -7.614200e+02 3.059600e+02\n5 17637     -3.865500e+02 -2.722000e+02\n11 17637     -4.580000e+02 -3.611100e+02\n14 17637     -4.643200e+02 -3.727500e+02\n5 17638     -1.570000e+02 -2.785000e+02\n7 17638     -7.815000e+02 3.721900e+02\n10 17638     -8.144100e+02 5.366600e+02\n14 17638     -2.390800e+02 -3.748100e+02\n15 17638     -8.478100e+02 5.766100e+02\n5 17639     -1.368100e+02 -2.792100e+02\n15 17639     -8.184000e+02 5.796600e+02\n5 17640     4.735601e+02 -2.827000e+02\n7 17640     -1.407900e+02 4.484000e+02\n10 17640     -4.770001e+01 5.948800e+02\n11 17640     2.201800e+02 -3.715900e+02\n13 17640     2.489399e+02 6.694000e+01\n14 17640     3.856200e+02 -3.656300e+02\n5 17641     -1.432900e+02 -2.894000e+02\n11 17641     -3.339900e+02 -3.826800e+02\n13 17641     -2.440500e+02 2.959003e+01\n14 17641     -2.241100e+02 -3.853000e+02\n15 17641     -8.235300e+02 5.651900e+02\n5 17642     3.000900e+02 -3.057300e+02\n6 17642     -5.638200e+02 3.104000e+02\n8 17642     -2.273200e+02 6.060999e+01\n14 17642     2.160000e+02 -3.916600e+02\n5 17643     5.941200e+02 -3.095800e+02\n6 17643     -2.335600e+02 3.706800e+02\n11 17643     3.150900e+02 -3.940900e+02\n13 17643     3.424700e+02 5.153003e+01\n5 17644     5.729100e+02 -3.163500e+02\n6 17644     -2.544700e+02 3.578600e+02\n5 17645     1.045001e+01 -3.335700e+02\n7 17645     -5.888600e+02 3.444700e+02\n11 17645     -1.966700e+02 -4.183800e+02\n12 17645     -7.099100e+02 2.381900e+02\n15 17645     -5.919200e+02 5.345200e+02\n5 17646     9.996997e+01 -3.364700e+02\n7 17646     -4.974300e+02 3.544700e+02\n10 17646     -4.787800e+02 5.004500e+02\n13 17646     -4.528998e+01 5.979980e+00\n14 17646     1.819000e+01 -4.271300e+02\n15 17646     -4.676700e+02 5.451600e+02\n5 17647     5.058199e+02 -3.719200e+02\n6 17647     -3.098800e+02 2.824400e+02\n11 17647     2.259500e+02 -4.499600e+02\n12 17647     -1.613200e+02 2.929400e+02\n5 17648     -1.971800e+02 -3.787600e+02\n7 17648     -7.877900e+02 2.698700e+02\n13 17648     -2.814200e+02 -4.560999e+01\n14 17648     -2.779000e+02 -4.773500e+02\n5 17649     5.415601e+02 -4.105100e+02\n6 17649     -2.594500e+02 2.488000e+02\n7 17649     -8.559998e+01 3.404900e+02\n11 17649     2.470601e+02 -4.837400e+02\n13 17649     3.036000e+02 -2.909998e+01\n14 17649     4.549000e+02 -4.913000e+02\n5 17650     -3.447998e+01 -4.233400e+02\n7 17650     -6.119500e+02 2.535200e+02\n8 17650     -4.954800e+02 -6.713000e+01\n5 17651     4.367000e+02 -4.741600e+02\n6 17651     -3.517600e+02 1.542300e+02\n9 17651     -2.909100e+02 4.842999e+01\n13 17651     2.243000e+02 -8.334003e+01\n14 17651     3.534301e+02 -5.579800e+02\n5 17652     4.151400e+02 -4.783000e+02\n7 17652     -2.000800e+02 2.650600e+02\n10 17652     -1.479700e+02 3.697400e+02\n5 17653     4.069301e+02 -4.941500e+02\n8 17653     -1.104900e+02 -5.173001e+01\n10 17653     -1.594800e+02 3.524600e+02\n14 17653     3.232300e+02 -5.790900e+02\n5 17654     5.378800e+02 -5.257100e+02\n7 17654     -1.660500e+02 2.290600e+02\n13 17654     2.937400e+02 -1.195600e+02\n5 17655     3.131200e+02 -5.284000e+02\n7 17655     -2.925700e+02 2.077900e+02\n5 17656     5.260200e+02 -5.301000e+02\n6 17656     -1.935200e+02 1.284400e+02\n13 17656     2.857000e+02 -1.225200e+02\n5 17657     4.279600e+02 -5.344900e+02\n7 17657     -2.363100e+02 2.121600e+02\n5 17658     2.908500e+02 -5.507300e+02\n7 17658     -3.131100e+02 1.852200e+02\n5 17659     6.443800e+02 -5.530601e+02\n6 17659     -5.983002e+01 1.371600e+02\n7 17659     -8.323999e+01 2.189300e+02\n8 17659     1.314600e+02 5.276999e+01\n10 17659     -7.773999e+01 2.648900e+02\n13 17659     3.737800e+02 -1.329400e+02\n5 17660     5.267500e+02 -5.658600e+02\n6 17660     -1.814500e+02 9.212000e+01\n7 17660     -1.753600e+02 1.926100e+02\n12 17660     -1.489900e+02 1.469900e+02\n13 17660     2.863900e+02 -1.496700e+02\n15 17660     -1.314900e+02 2.599000e+02\n5 17661     2.576100e+02 -5.694301e+02\n9 17661     -4.107900e+02 -4.495001e+01\n10 17661     -3.263400e+02 2.583100e+02\n5 17662     5.195000e+02 -5.798101e+02\n6 17662     -1.865900e+02 7.550000e+01\n7 17662     -1.808400e+02 1.796300e+02\n9 17662     -1.175000e+02 1.266500e+02\n13 17662     2.809301e+02 -1.603900e+02\n15 17662     -1.400400e+02 2.418000e+02\n5 17663     5.059399e+02 -5.836200e+02\n6 17663     -2.009900e+02 6.770001e+01\n8 17663     2.003003e+01 -8.079987e+00\n13 17663     2.712900e+02 -1.636900e+02\n5 17664     2.299301e+02 -6.076899e+02\n10 17664     -3.614000e+02 2.157600e+02\n15 17664     -3.336000e+02 2.175300e+02\n5 17665     3.812200e+02 -6.084100e+02\n12 17665     -2.885100e+02 6.259003e+01\n5 17666     6.515002e+01 4.252600e+02\n11 17666     -5.507001e+01 1.928900e+02\n14 17666     -2.046002e+01 3.150400e+02\n5 17667     -2.351200e+02 2.910000e+02\n11 17667     -3.487400e+02 8.029999e+01\n5 17668     -2.697400e+02 2.852600e+02\n11 17668     -3.713900e+02 7.470999e+01\n13 17668     -3.908300e+02 5.035100e+02\n14 17668     -3.493100e+02 1.779600e+02\n5 17669     -2.165200e+02 2.591200e+02\n11 17669     -3.329400e+02 5.623001e+01\n13 17669     -3.428500e+02 4.837100e+02\n14 17669     -2.970000e+02 1.533500e+02\n5 17670     -4.272200e+02 2.145300e+02\n11 17670     -4.718100e+02 1.928998e+01\n14 17670     -5.026700e+02 1.088100e+02\n5 17671     7.414500e+02 1.476500e+02\n11 17671     4.314200e+02 -1.366998e+01\n14 17671     6.308500e+02 5.835999e+01\n5 17672     4.079301e+02 7.871002e+01\n8 17672     -1.770300e+02 3.941500e+02\n5 17673     -1.256900e+02 6.040002e+01\n11 17673     -3.368100e+02 -1.025300e+02\n13 17673     -2.555700e+02 3.171900e+02\n14 17673     -2.111800e+02 -3.946997e+01\n5 17674     1.298000e+02 4.239001e+01\n8 17674     -4.034500e+02 3.697200e+02\n5 17675     7.457500e+02 3.033002e+01\n6 17675     -1.354200e+02 7.969700e+02\n13 17675     4.597100e+02 3.290100e+02\n5 17676     8.190601e+02 2.871997e+01\n9 17676     -1.119100e+02 4.483900e+02\n11 17676     5.108000e+02 -1.066700e+02\n5 17677     1.743300e+02 9.710022e+00\n8 17677     -3.618200e+02 3.384000e+02\n5 17678     7.572700e+02 1.000000e+01\n6 17678     -1.212400e+02 7.720200e+02\n8 17678     8.553998e+01 3.272400e+02\n9 17678     -1.522700e+02 4.340200e+02\n13 17678     4.683300e+02 3.129500e+02\n14 17678     6.514000e+02 -7.359998e+01\n5 17679     4.357700e+02 -2.319000e+01\n8 17679     -1.470700e+02 3.056400e+02\n5 17680     6.314500e+02 -4.976001e+01\n8 17680     1.640015e+00 2.814800e+02\n5 17681     7.344900e+02 -9.082001e+01\n6 17681     -1.304200e+02 6.469100e+02\n12 17681     3.303003e+01 6.059400e+02\n5 17682     7.368800e+02 -1.150900e+02\n9 17682     -1.512200e+02 3.276000e+02\n5 17683     6.900699e+02 -1.246800e+02\n9 17683     -1.813600e+02 3.196000e+02\n5 17684     6.843300e+02 -1.588500e+02\n6 17684     -1.717500e+02 5.586100e+02\n5 17685     2.559399e+02 -2.030300e+02\n7 17685     -3.668200e+02 5.011600e+02\n8 17685     -2.732500e+02 1.490800e+02\n11 17685     1.590997e+01 -3.097700e+02\n12 17685     -4.589500e+02 4.283400e+02\n13 17685     7.365002e+01 1.203300e+02\n14 17685     1.695000e+02 -2.911100e+02\n5 17686     5.078800e+02 -2.153700e+02\n12 17686     -1.796500e+02 4.500300e+02\n5 17687     4.134998e+01 -2.212000e+02\n7 17687     -5.848200e+02 4.579200e+02\n5 17688     1.111900e+02 -2.591600e+02\n8 17688     -3.876800e+02 9.512000e+01\n12 17688     -6.119000e+02 3.418000e+02\n5 17689     -2.013000e+01 -2.756400e+02\n12 17689     -7.632800e+02 2.985100e+02\n5 17690     3.965601e+02 -2.984200e+02\n6 17690     -4.560200e+02 3.397900e+02\n7 17690     -2.120800e+02 4.261700e+02\n10 17690     -1.353700e+02 5.718700e+02\n13 17690     1.891400e+02 5.178998e+01\n14 17690     3.106899e+02 -3.825100e+02\n5 17691     -1.294100e+02 -3.938500e+02\n11 17691     -3.179400e+02 -4.689900e+02\n5 17692     -1.666800e+02 -4.037400e+02\n7 17692     -7.558300e+02 2.495600e+02\n10 17692     -7.840800e+02 3.951300e+02\n11 17692     -3.515500e+02 -4.776100e+02\n5 17693     5.849000e+02 -4.194399e+02\n6 17693     -2.120900e+02 2.498400e+02\n13 17693     3.367200e+02 -3.467999e+01\n14 17693     4.970300e+02 -5.001600e+02\n5 17694     -1.246300e+02 -4.302100e+02\n11 17694     -3.100000e+02 -4.978300e+02\n13 17694     -2.190200e+02 -8.081000e+01\n14 17694     -2.044500e+02 -5.266000e+02\n5 17695     4.173500e+02 -4.961000e+02\n9 17695     -3.010800e+02 3.092999e+01\n5 17696     -2.480600e+02 -5.104301e+02\n7 17696     -8.116900e+02 1.368800e+02\n13 17696     -3.139000e+02 -1.530000e+02\n5 17697     5.380800e+02 -5.248600e+02\n6 17697     -1.812800e+02 1.373300e+02\n13 17697     2.946300e+02 -1.172500e+02\n5 17698     6.607600e+02 -5.270200e+02\n9 17698     -1.203998e+01 2.065900e+02\n12 17698     -2.122998e+01 2.206300e+02\n5 17699     2.781899e+02 -5.298500e+02\n9 17699     -4.057600e+02 -1.447998e+01\n5 17700     3.408300e+02 -5.441500e+02\n9 17700     -3.477500e+02 -1.206000e+01\n5 17701     5.466801e+02 -5.466300e+02\n6 17701     -1.647300e+02 1.178400e+02\n12 17701     -1.320400e+02 1.722400e+02\n5 17702     1.266900e+02 -5.709800e+02\n7 17702     -4.600200e+02 1.436000e+02\n5 17703     4.229800e+02 -5.730000e+02\n6 17703     -3.039700e+02 5.346002e+01\n5 17704     3.449500e+02 -5.772900e+02\n9 17704     -3.325900e+02 -3.065997e+01\n5 17705     3.897800e+02 -5.767600e+02\n8 17705     -8.371002e+01 -4.384000e+01\n9 17705     -2.477600e+02 6.494000e+01\n5 17706     2.174301e+02 -5.873101e+02\n7 17706     -3.796300e+02 1.407100e+02\n8 17706     -2.449600e+02 -1.372600e+02\n10 17706     -3.723200e+02 2.352200e+02\n15 17706     -3.450900e+02 2.400800e+02\n5 17707     5.116200e+02 -5.891400e+02\n6 17707     -1.930400e+02 6.362000e+01\n7 17707     -1.861600e+02 1.712000e+02\n12 17707     -1.612400e+02 1.197200e+02\n13 17707     2.754200e+02 -1.675800e+02\n5 17708     4.312600e+02 4.416300e+02\n11 17708     2.400699e+02 2.144900e+02\n5 17709     -1.439001e+01 4.161500e+02\n11 17709     -1.211200e+02 1.815800e+02\n5 17710     1.873600e+02 6.375000e+01\n8 17710     -3.562800e+02 3.865800e+02\n5 17711     9.170001e+01 4.663000e+01\n8 17711     -4.368000e+02 3.736500e+02\n5 17712     -1.709500e+02 2.906000e+01\n11 17712     -3.734100e+02 -1.290600e+02\n13 17712     -2.913600e+02 2.874000e+02\n14 17712     -2.560400e+02 -7.206000e+01\n5 17713     4.235200e+02 7.750000e+00\n6 17713     -4.914800e+02 7.233500e+02\n8 17713     -1.571400e+02 3.349500e+02\n5 17714     4.889900e+02 -3.372998e+01\n6 17714     -4.060900e+02 6.802800e+02\n11 17714     2.166800e+02 -1.702000e+02\n14 17714     3.923300e+02 -1.210100e+02\n5 17715     1.650024e+00 -1.697400e+02\n8 17715     -4.944200e+02 1.724300e+02\n12 17715     -7.693900e+02 4.277300e+02\n5 17716     6.205000e+02 -1.737100e+02\n6 17716     -2.360000e+02 5.315500e+02\n9 17716     -2.283300e+02 2.721000e+02\n13 17716     3.627000e+02 1.596900e+02\n14 17716     5.256700e+02 -2.553600e+02\n5 17717     4.367200e+02 -1.940600e+02\n8 17717     -1.313400e+02 1.599000e+02\n5 17718     4.333700e+02 -2.792600e+02\n7 17718     -1.798600e+02 4.476500e+02\n8 17718     -1.258100e+02 8.756000e+01\n11 17718     1.819700e+02 -3.692900e+02\n13 17718     2.170500e+02 6.796997e+01\n14 17718     3.456300e+02 -3.630300e+02\n5 17719     -1.293300e+02 -3.718300e+02\n8 17719     -5.879400e+02 -2.500000e+01\n10 17719     -7.444300e+02 4.356400e+02\n11 17719     -3.178900e+02 -4.502300e+02\n13 17719     -2.271000e+02 -3.546997e+01\n15 17719     -7.722900e+02 4.634600e+02\n5 17720     -1.293300e+02 -3.718300e+02\n7 17720     -7.235800e+02 2.866400e+02\n11 17720     -3.178900e+02 -4.502300e+02\n13 17720     -2.271000e+02 -3.546997e+01\n15 17720     -7.722900e+02 4.634600e+02\n5 17721     6.053500e+02 -4.014800e+02\n6 17721     -1.945500e+02 2.719400e+02\n5 17722     4.873300e+02 -5.392600e+02\n6 17722     -2.422000e+02 1.066800e+02\n12 17722     -1.860900e+02 1.559600e+02\n13 17722     2.585900e+02 -1.301400e+02\n5 17723     2.385601e+02 -5.823600e+02\n7 17723     -3.603400e+02 1.502900e+02\n8 17723     -2.302500e+02 -1.304400e+02\n13 17723     7.223999e+01 -1.755600e+02\n15 17723     -3.172500e+02 2.508500e+02\n5 17724     1.810300e+02 3.711000e+02\n11 17724     5.260010e+00 1.522200e+02\n14 17724     8.951001e+01 2.644400e+02\n5 17725     1.810300e+02 3.711000e+02\n11 17725     5.260010e+00 1.522200e+02\n5 17726     -4.853998e+01 3.638500e+02\n11 17726     -1.839500e+02 1.389500e+02\n5 17727     9.475000e+01 3.609100e+02\n11 17727     -6.715997e+01 1.425600e+02\n14 17727     6.719971e+00 2.542800e+02\n5 17728     -7.969971e+00 3.598400e+02\n11 17728     -1.510900e+02 1.389300e+02\n14 17728     -9.315997e+01 2.520500e+02\n5 17729     -7.969971e+00 3.598400e+02\n11 17729     -1.510900e+02 1.389300e+02\n14 17729     -9.315997e+01 2.520500e+02\n5 17730     1.653100e+02 3.505200e+02\n11 17730     -1.072998e+01 1.360400e+02\n14 17730     7.446997e+01 2.447900e+02\n5 17731     6.014200e+02 7.296002e+01\n11 17731     3.105100e+02 -7.777002e+01\n13 17731     3.430601e+02 3.589300e+02\n14 17731     4.983700e+02 -1.600000e+01\n5 17732     -4.760200e+02 -5.175000e+01\n11 17732     -4.856000e+02 -1.850100e+02\n5 17733     6.982200e+02 -1.937700e+02\n6 17733     -1.529800e+02 5.204700e+02\n5 17734     6.747300e+02 -1.966100e+02\n6 17734     -1.761400e+02 5.129000e+02\n7 17734     3.778003e+01 5.453500e+02\n13 17734     4.057900e+02 1.443100e+02\n5 17735     4.098199e+02 -2.570700e+02\n8 17735     -1.456400e+02 1.060900e+02\n5 17736     -8.404999e+01 -2.791400e+02\n10 17736     -7.220800e+02 5.449000e+02\n13 17736     -1.969400e+02 4.185999e+01\n5 17737     4.502800e+02 -2.801500e+02\n11 17737     1.962100e+02 -3.730400e+02\n5 17738     3.639399e+02 -3.673200e+02\n7 17738     -2.401200e+02 3.609200e+02\n15 17738     -1.185200e+02 5.417700e+02\n5 17739     -1.046500e+02 -3.851200e+02\n7 17739     -6.939500e+02 2.794600e+02\n10 17739     -7.122400e+02 4.272000e+02\n5 17740     4.773101e+02 -5.353101e+02\n6 17740     -2.552700e+02 1.060900e+02\n7 17740     -2.003600e+02 2.166500e+02\n10 17740     -1.900500e+02 2.865800e+02\n12 17740     -1.960500e+02 1.575900e+02\n13 17740     2.499200e+02 -1.285600e+02\n15 17740     -1.422300e+02 3.055100e+02\n5 17741     4.825800e+02 -5.638900e+02\n6 17741     -2.387800e+02 7.959998e+01\n12 17741     -1.893400e+02 1.311300e+02\n5 17742     2.585999e+01 3.503000e+02\n11 17742     -1.248300e+02 1.323400e+02\n5 17743     3.899900e+02 2.753200e+02\n11 17743     1.283300e+02 7.987000e+01\n5 17744     6.007800e+02 2.568600e+02\n11 17744     3.099900e+02 6.989001e+01\n13 17744     3.401000e+02 5.128500e+02\n14 17744     4.920000e+02 1.597500e+02\n5 17745     4.063199e+02 -1.985000e+02\n8 17745     -1.546200e+02 1.557400e+02\n14 17745     3.170601e+02 -2.857100e+02\n5 17746     3.189800e+02 -2.260100e+02\n6 17746     -5.600700e+02 4.099400e+02\n8 17746     -2.189700e+02 1.313100e+02\n5 17747     -1.010800e+02 -3.194600e+02\n8 17747     -5.693900e+02 2.792999e+01\n5 17748     7.079800e+02 -3.946300e+02\n6 17748     -9.214001e+01 3.028000e+02\n13 17748     4.305500e+02 -9.090027e+00\n14 17748     6.159500e+02 -4.709500e+02\n5 17749     -2.263200e+02 4.169900e+02\n11 17749     -2.844400e+02 1.784300e+02\n14 17749     -3.035600e+02 3.061100e+02\n5 17750     5.229999e+01 3.621700e+02\n11 17750     -1.020300e+02 1.426800e+02\n14 17750     -3.489001e+01 2.547300e+02\n5 17751     7.469600e+02 -1.274600e+02\n6 17751     -1.121100e+02 6.063100e+02\n12 17751     5.035999e+01 5.688500e+02\n5 17752     6.870100e+02 -1.323000e+02\n6 17752     -1.738100e+02 5.916600e+02\n8 17752     4.971002e+01 2.172400e+02\n12 17752     -8.500000e+00 5.601400e+02\n5 17753     4.821000e+02 -2.027400e+02\n8 17753     -9.535999e+01 1.553600e+02\n5 17754     2.845200e+02 -2.269000e+02\n7 17754     -3.332300e+02 4.814300e+02\n8 17754     -2.474800e+02 1.295600e+02\n13 17754     9.710999e+01 1.023300e+02\n14 17754     1.979600e+02 -3.132000e+02\n5 17755     3.918300e+02 -2.734800e+02\n7 17755     -2.231300e+02 4.470800e+02\n5 17756     -1.783500e+02 5.921002e+01\n11 17756     -3.821500e+02 -1.016500e+02\n13 17756     -3.060300e+02 3.143700e+02\n14 17756     -2.681300e+02 -3.984998e+01\n5 17757     3.411899e+02 -2.441500e+02\n8 17757     -2.014000e+02 1.155200e+02\n5 17758     5.286300e+02 -1.105100e+02\n6 17758     -3.402100e+02 5.999500e+02\n8 17758     -6.915997e+01 2.322200e+02\n5 17759     2.040200e+02 -3.167700e+02\n7 17759     -3.943700e+02 3.854200e+02\n8 17759     -3.007500e+02 4.450000e+01\n13 17759     3.735999e+01 2.827002e+01\n14 17759     1.214400e+02 -4.039200e+02\n6 17760     2.344300e+02 7.558300e+02\n8 17760     3.304800e+02 3.686700e+02\n6 17761     2.316300e+02 7.499900e+02\n8 17761     3.278500e+02 3.641400e+02\n9 17761     1.213200e+02 4.933100e+02\n6 17762     2.316300e+02 7.499900e+02\n9 17762     1.213200e+02 4.933100e+02\n6 17763     1.971300e+02 7.205100e+02\n9 17763     9.679999e+01 4.689900e+02\n6 17764     3.820700e+02 7.162000e+02\n9 17764     2.440699e+02 5.138800e+02\n6 17765     2.007300e+02 7.093200e+02\n8 17765     3.068800e+02 3.348200e+02\n9 17765     9.991998e+01 4.612700e+02\n6 17766     -2.636500e+02 6.824200e+02\n14 17766     5.159000e+02 -1.320300e+02\n6 17767     -8.570001e+01 6.588600e+02\n12 17767     7.628003e+01 6.150900e+02\n6 17768     -6.140997e+01 6.579600e+02\n12 17768     9.954999e+01 6.134900e+02\n6 17769     -1.124900e+02 6.515700e+02\n12 17769     5.084003e+01 6.101200e+02\n6 17770     -2.546000e+02 6.491700e+02\n14 17770     5.212100e+02 -1.584700e+02\n6 17771     -2.867200e+02 6.427700e+02\n12 17771     -1.187200e+02 6.102500e+02\n6 17772     -4.223000e+02 6.426100e+02\n12 17772     -2.496400e+02 6.155800e+02\n6 17773     -4.840900e+02 6.421800e+02\n12 17773     -3.085500e+02 6.171900e+02\n6 17774     -4.139400e+02 6.420400e+02\n12 17774     -2.415700e+02 6.146600e+02\n6 17775     1.875300e+02 6.345700e+02\n12 17775     2.967000e+02 6.203800e+02\n6 17776     1.875300e+02 6.345700e+02\n12 17776     2.967000e+02 6.203800e+02\n6 17777     1.944500e+02 6.342700e+02\n12 17777     3.033600e+02 6.200500e+02\n6 17778     -3.398200e+02 6.339500e+02\n11 17778     2.659600e+02 -2.022900e+02\n6 17779     -6.202002e+01 6.272500e+02\n12 17779     9.925000e+01 5.853800e+02\n6 17780     -1.151500e+02 6.161900e+02\n12 17780     4.728003e+01 5.786200e+02\n6 17781     -5.327002e+01 6.137500e+02\n14 17781     7.035900e+02 -2.072900e+02\n6 17782     -5.327002e+01 6.137500e+02\n14 17782     7.035900e+02 -2.072900e+02\n6 17783     4.556600e+02 6.095000e+02\n12 17783     5.374900e+02 6.179300e+02\n6 17784     -2.790400e+02 6.030900e+02\n12 17784     -1.109700e+02 5.740700e+02\n6 17785     3.881000e+02 5.983800e+02\n12 17785     4.724800e+02 6.048400e+02\n6 17786     4.008300e+02 5.987900e+02\n12 17786     4.846400e+02 6.054400e+02\n6 17787     4.609500e+02 5.951500e+02\n7 17787     4.857800e+02 5.736800e+02\n12 17787     5.421100e+02 6.044500e+02\n6 17788     4.788500e+02 5.930600e+02\n9 17788     3.209399e+02 4.361400e+02\n12 17788     5.598800e+02 6.029200e+02\n6 17789     -3.164900e+02 5.907800e+02\n12 17789     -1.475400e+02 5.648300e+02\n6 17790     4.164700e+02 5.901600e+02\n8 17790     4.659900e+02 2.891400e+02\n12 17790     4.995200e+02 5.977300e+02\n6 17791     -2.979700e+02 5.864100e+02\n12 17791     -1.294800e+02 5.595700e+02\n6 17792     -2.877700e+02 5.860400e+02\n12 17792     -1.196300e+02 5.589800e+02\n6 17793     4.990300e+02 5.825300e+02\n7 17793     5.155900e+02 5.595100e+02\n6 17794     -9.731000e+01 5.777600e+02\n12 17794     6.504999e+01 5.415900e+02\n6 17795     4.491600e+02 5.763700e+02\n12 17795     5.310400e+02 5.855500e+02\n6 17796     4.969500e+02 5.707200e+02\n7 17796     5.139700e+02 5.492400e+02\n6 17797     1.700200e+02 5.647800e+02\n12 17797     2.811100e+02 5.534000e+02\n6 17798     -2.078300e+02 5.631600e+02\n12 17798     -4.229999e+01 5.345500e+02\n6 17799     -2.174300e+02 5.617400e+02\n14 17799     5.459900e+02 -2.323200e+02\n6 17800     4.948800e+02 5.555800e+02\n12 17800     5.754800e+02 5.660000e+02\n6 17801     2.037600e+02 5.551100e+02\n12 17801     3.122300e+02 5.447800e+02\n6 17802     1.607800e+02 5.536000e+02\n12 17802     2.731300e+02 5.421500e+02\n6 17803     -3.459300e+02 5.499900e+02\n12 17803     -1.763900e+02 5.290600e+02\n6 17804     1.673100e+02 5.497800e+02\n9 17804     8.063000e+01 3.404300e+02\n11 17804     5.934301e+02 -3.172100e+02\n6 17805     -4.350000e+02 5.481900e+02\n12 17805     -2.618500e+02 5.309500e+02\n6 17806     4.516700e+02 5.464700e+02\n7 17806     4.752500e+02 5.311500e+02\n6 17807     -4.305100e+02 5.457600e+02\n7 17807     -1.841200e+02 5.845200e+02\n6 17808     1.659600e+02 5.403700e+02\n12 17808     2.778400e+02 5.298500e+02\n6 17809     4.045800e+02 5.369500e+02\n12 17809     4.886500e+02 5.444300e+02\n6 17810     4.638300e+02 5.349300e+02\n8 17810     5.011100e+02 2.532600e+02\n10 17810     6.726600e+02 6.140200e+02\n12 17810     5.453000e+02 5.444300e+02\n6 17811     -1.926600e+02 5.318900e+02\n14 17811     5.665800e+02 -2.596200e+02\n6 17812     3.707000e+02 5.321300e+02\n9 17812     2.439800e+02 3.776600e+02\n12 17812     4.564000e+02 5.385300e+02\n6 17813     -4.383900e+02 5.314600e+02\n12 17813     -2.653700e+02 5.161400e+02\n6 17814     2.297100e+02 5.307400e+02\n12 17814     3.360100e+02 5.225700e+02\n6 17815     4.441100e+02 5.270400e+02\n10 17815     6.525800e+02 6.086000e+02\n12 17815     5.265800e+02 5.355000e+02\n6 17816     5.098300e+02 5.228000e+02\n10 17816     7.161100e+02 5.920000e+02\n6 17817     3.824200e+02 5.216300e+02\n10 17817     5.933800e+02 6.142600e+02\n12 17817     4.675200e+02 5.283300e+02\n6 17818     4.488800e+02 5.204000e+02\n10 17818     6.563000e+02 6.008900e+02\n12 17818     5.310500e+02 5.297300e+02\n6 17819     4.185400e+02 5.186400e+02\n7 17819     4.466200e+02 5.095100e+02\n10 17819     6.266100e+02 6.041500e+02\n6 17820     3.703400e+02 5.178900e+02\n8 17820     4.336000e+02 2.343100e+02\n9 17820     2.445000e+02 3.671600e+02\n10 17820     5.814700e+02 6.117200e+02\n11 17820     7.065601e+02 -3.787400e+02\n12 17820     4.562400e+02 5.243400e+02\n6 17821     -4.706900e+02 5.160100e+02\n12 17821     -2.965300e+02 5.035200e+02\n6 17822     -3.078900e+02 5.155400e+02\n12 17822     -1.395600e+02 4.960200e+02\n6 17823     3.785400e+02 5.152400e+02\n10 17823     5.884700e+02 6.076400e+02\n6 17824     5.781000e+02 5.121100e+02\n12 17824     6.572200e+02 5.252300e+02\n6 17825     2.984800e+02 5.081100e+02\n12 17825     3.994000e+02 5.024900e+02\n6 17826     4.546500e+02 5.058500e+02\n12 17826     5.368600e+02 5.148000e+02\n6 17827     -3.153200e+02 5.032300e+02\n12 17827     -1.465000e+02 4.852900e+02\n6 17828     -4.807900e+02 5.025600e+02\n12 17828     -3.061800e+02 4.920200e+02\n6 17829     -4.469400e+02 5.008800e+02\n12 17829     -2.740300e+02 4.890600e+02\n6 17830     -2.074700e+02 4.955800e+02\n12 17830     -4.183002e+01 4.737000e+02\n6 17831     3.871200e+02 4.881700e+02\n7 17831     4.200800e+02 4.854600e+02\n6 17832     3.846400e+02 4.865100e+02\n10 17832     5.900100e+02 5.759600e+02\n12 17832     4.702900e+02 4.936100e+02\n6 17833     4.883500e+02 4.863400e+02\n10 17833     6.883000e+02 5.566500e+02\n12 17833     5.695000e+02 4.963000e+02\n6 17834     3.787100e+02 4.835200e+02\n10 17834     5.838900e+02 5.737300e+02\n6 17835     4.465601e+02 4.811700e+02\n12 17835     5.292400e+02 4.899700e+02\n6 17836     3.964100e+02 4.784100e+02\n12 17836     4.814100e+02 4.854500e+02\n6 17837     5.813000e+02 4.780700e+02\n10 17837     7.792300e+02 5.294100e+02\n6 17838     3.631000e+02 4.767600e+02\n10 17838     5.686100e+02 5.695000e+02\n6 17839     3.930500e+02 4.755400e+02\n10 17839     5.960500e+02 5.629300e+02\n6 17840     -3.527400e+02 4.752400e+02\n12 17840     -1.826400e+02 4.616100e+02\n6 17841     -3.527400e+02 4.752400e+02\n12 17841     -1.826400e+02 4.616100e+02\n6 17842     3.868100e+02 4.713600e+02\n9 17842     2.585800e+02 3.343900e+02\n6 17843     4.087500e+02 4.699200e+02\n9 17843     2.753300e+02 3.356100e+02\n10 17843     6.100699e+02 5.543100e+02\n6 17844     3.929800e+02 4.676200e+02\n7 17844     4.230400e+02 4.673700e+02\n6 17845     2.114600e+02 4.616500e+02\n12 17845     3.195900e+02 4.562400e+02\n6 17846     3.167400e+02 4.554400e+02\n8 17846     3.918100e+02 1.658500e+02\n9 17846     1.967800e+02 2.883800e+02\n6 17847     4.999500e+02 4.544700e+02\n12 17847     5.809800e+02 4.640300e+02\n6 17848     2.769200e+02 4.508700e+02\n12 17848     3.797000e+02 4.467200e+02\n6 17849     4.489399e+02 4.510900e+02\n10 17849     6.444900e+02 5.264300e+02\n12 17849     5.317000e+02 4.600400e+02\n6 17850     4.528101e+02 4.496400e+02\n8 17850     4.948500e+02 1.907100e+02\n9 17850     3.094399e+02 3.258800e+02\n10 17850     6.482300e+02 5.236800e+02\n12 17850     5.352700e+02 4.585800e+02\n6 17851     4.763199e+02 4.437300e+02\n8 17851     5.117600e+02 1.878500e+02\n10 17851     6.702700e+02 5.129200e+02\n12 17851     5.579800e+02 4.532800e+02\n6 17852     4.786200e+02 4.416000e+02\n10 17852     6.717500e+02 5.103900e+02\n6 17853     3.515500e+02 4.408500e+02\n9 17853     2.338400e+02 3.064600e+02\n12 17853     4.390200e+02 4.477000e+02\n6 17854     4.575500e+02 4.396100e+02\n12 17854     5.400699e+02 4.487000e+02\n6 17855     5.108600e+02 4.356400e+02\n10 17855     7.016300e+02 4.971600e+02\n6 17856     3.675900e+02 4.339400e+02\n12 17856     4.543600e+02 4.416100e+02\n6 17857     -3.554100e+02 4.276900e+02\n7 17857     -1.224000e+02 4.881000e+02\n6 17858     1.534800e+02 4.273400e+02\n12 17858     2.675100e+02 4.221400e+02\n6 17859     3.683000e+02 4.203900e+02\n8 17859     4.345000e+02 1.635700e+02\n12 17859     4.548000e+02 4.280600e+02\n13 17859     7.763700e+02 2.823999e+01\n6 17860     2.011100e+02 4.199300e+02\n12 17860     3.106400e+02 4.157000e+02\n6 17861     3.315500e+02 4.199400e+02\n12 17861     4.202200e+02 4.267200e+02\n6 17862     3.315500e+02 4.199400e+02\n12 17862     4.202200e+02 4.267200e+02\n6 17863     4.638101e+02 4.173700e+02\n10 17863     6.534900e+02 4.870400e+02\n6 17864     3.713300e+02 4.168200e+02\n8 17864     4.360400e+02 1.605700e+02\n9 17864     2.496801e+02 2.905900e+02\n10 17864     5.675601e+02 5.050700e+02\n11 17864     7.103900e+02 -4.653800e+02\n12 17864     4.579200e+02 4.245200e+02\n15 17864     7.587900e+02 5.771900e+02\n6 17865     2.842000e+02 4.136700e+02\n9 17865     1.742200e+02 2.521700e+02\n6 17866     3.624000e+02 4.109100e+02\n12 17866     4.494500e+02 4.183400e+02\n6 17867     4.380100e+02 4.109100e+02\n7 17867     4.554900e+02 4.144000e+02\n6 17868     4.380100e+02 4.109100e+02\n7 17868     4.554900e+02 4.144000e+02\n8 17868     4.848500e+02 1.610100e+02\n12 17868     5.215699e+02 4.198500e+02\n6 17869     4.607800e+02 4.067400e+02\n10 17869     6.490900e+02 4.770200e+02\n15 17869     8.565300e+02 5.456300e+02\n6 17870     4.607800e+02 4.067400e+02\n8 17870     5.019399e+02 1.594600e+02\n10 17870     6.490900e+02 4.770200e+02\n6 17871     4.097400e+02 4.056400e+02\n15 17871     7.990601e+02 5.555400e+02\n6 17872     4.641200e+02 4.045100e+02\n12 17872     5.465100e+02 4.144600e+02\n6 17873     4.054100e+02 4.019900e+02\n12 17873     4.903300e+02 4.116400e+02\n6 17874     4.243200e+02 4.005000e+02\n10 17874     6.145100e+02 4.773600e+02\n15 17874     8.151100e+02 5.455500e+02\n6 17875     3.440900e+02 3.990200e+02\n15 17875     7.268101e+02 5.613500e+02\n6 17876     1.536400e+02 3.975000e+02\n12 17876     2.680601e+02 3.936000e+02\n6 17877     1.556500e+02 3.929400e+02\n12 17877     2.696400e+02 3.893400e+02\n6 17878     1.618400e+02 3.925700e+02\n12 17878     2.749800e+02 3.890200e+02\n6 17879     -1.758400e+02 3.881100e+02\n11 17879     3.634500e+02 -3.889100e+02\n6 17880     1.595400e+02 3.823000e+02\n7 17880     2.588900e+02 4.152900e+02\n14 17880     8.629301e+02 -4.399700e+02\n15 17880     5.771200e+02 5.867300e+02\n6 17881     -1.713800e+02 3.817600e+02\n14 17881     5.615800e+02 -3.892000e+02\n6 17882     1.662100e+02 3.799300e+02\n7 17882     2.637000e+02 4.124500e+02\n14 17882     8.693199e+02 -4.435200e+02\n15 17882     5.834500e+02 5.825800e+02\n6 17883     3.721400e+02 3.801500e+02\n10 17883     5.627300e+02 4.673600e+02\n6 17884     4.198100e+02 3.771900e+02\n9 17884     2.885300e+02 2.663200e+02\n12 17884     5.041100e+02 3.859600e+02\n6 17885     4.007300e+02 3.727900e+02\n10 17885     5.878700e+02 4.546700e+02\n12 17885     4.859900e+02 3.810200e+02\n15 17885     7.843199e+02 5.174300e+02\n6 17886     5.124900e+02 3.726700e+02\n12 17886     5.932200e+02 3.827200e+02\n6 17887     5.124900e+02 3.726700e+02\n12 17887     5.932200e+02 3.827200e+02\n6 17888     3.632000e+02 3.715200e+02\n12 17888     4.512900e+02 3.801800e+02\n6 17889     -5.009900e+02 3.697400e+02\n9 17889     -4.159600e+02 1.794200e+02\n6 17890     4.212300e+02 3.645000e+02\n12 17890     5.053400e+02 3.730000e+02\n6 17891     4.300800e+02 3.574500e+02\n15 17891     8.144100e+02 4.922900e+02\n6 17892     -2.088500e+02 3.542500e+02\n14 17892     5.226100e+02 -4.073300e+02\n6 17893     5.709600e+02 3.546400e+02\n12 17893     6.500900e+02 3.650800e+02\n6 17894     4.416000e+02 3.539900e+02\n10 17894     6.225400e+02 4.257600e+02\n6 17895     4.112700e+02 3.497200e+02\n10 17895     5.938199e+02 4.284900e+02\n15 17895     7.916400e+02 4.868300e+02\n6 17896     5.837100e+02 3.498700e+02\n10 17896     7.577100e+02 3.912900e+02\n12 17896     6.628600e+02 3.607200e+02\n6 17897     4.083400e+02 3.474700e+02\n10 17897     5.908800e+02 4.263600e+02\n12 17897     4.932100e+02 3.562900e+02\n6 17898     4.174400e+02 3.472800e+02\n10 17898     5.994100e+02 4.243000e+02\n6 17899     5.561200e+02 3.471200e+02\n8 17899     5.749000e+02 1.213100e+02\n9 17899     3.934700e+02 2.604100e+02\n6 17900     2.529900e+02 3.439700e+02\n15 17900     6.677100e+02 5.239200e+02\n6 17901     4.345400e+02 3.439100e+02\n8 17901     4.827400e+02 1.112300e+02\n9 17901     3.011400e+02 2.425800e+02\n12 17901     5.181801e+02 3.534300e+02\n15 17901     8.170900e+02 4.733300e+02\n6 17902     4.493600e+02 3.412500e+02\n15 17902     8.329800e+02 4.670200e+02\n6 17903     4.543700e+02 3.370100e+02\n8 17903     4.983800e+02 1.070000e+02\n9 17903     3.167800e+02 2.396200e+02\n10 17903     6.322200e+02 4.056700e+02\n6 17904     4.543700e+02 3.370100e+02\n8 17904     4.983800e+02 1.070000e+02\n9 17904     3.167800e+02 2.396200e+02\n6 17905     -5.556400e+02 3.355200e+02\n14 17905     2.260900e+02 -3.726200e+02\n6 17906     4.687800e+02 3.322800e+02\n10 17906     6.450100e+02 3.979700e+02\n15 17906     8.532900e+02 4.512700e+02\n6 17907     4.687800e+02 3.322800e+02\n10 17907     6.450100e+02 3.979700e+02\n15 17907     8.532900e+02 4.512700e+02\n6 17908     4.758300e+02 3.324200e+02\n12 17908     5.580100e+02 3.420700e+02\n6 17909     5.255300e+02 3.325600e+02\n12 17909     6.057000e+02 3.430100e+02\n6 17910     5.397900e+02 3.320000e+02\n10 17910     7.121000e+02 3.822600e+02\n12 17910     6.198101e+02 3.423700e+02\n6 17911     5.397900e+02 3.320000e+02\n10 17911     7.121000e+02 3.822600e+02\n12 17911     6.198101e+02 3.423700e+02\n6 17912     4.370200e+02 3.303800e+02\n7 17912     4.497200e+02 3.459800e+02\n12 17912     5.208800e+02 3.399200e+02\n15 17912     8.175699e+02 4.568600e+02\n6 17913     5.426700e+02 3.266800e+02\n12 17913     6.225100e+02 3.375500e+02\n6 17914     5.326000e+02 3.260000e+02\n10 17914     7.041500e+02 3.778100e+02\n12 17914     6.127100e+02 3.361100e+02\n6 17915     3.686100e+02 3.252100e+02\n7 17915     3.955900e+02 3.481300e+02\n6 17916     4.181200e+02 3.249300e+02\n10 17916     5.966899e+02 4.018000e+02\n12 17916     5.023700e+02 3.341200e+02\n15 17916     7.960400e+02 4.544300e+02\n6 17917     4.900800e+02 3.249000e+02\n10 17917     6.629900e+02 3.861000e+02\n6 17918     -2.783900e+02 3.233600e+02\n14 17918     4.553600e+02 -4.234900e+02\n6 17919     5.329800e+02 3.227900e+02\n9 17919     3.764301e+02 2.380700e+02\n10 17919     7.036200e+02 3.739600e+02\n6 17920     3.536700e+02 3.176700e+02\n9 17920     2.406000e+02 2.108800e+02\n12 17920     4.411700e+02 3.262000e+02\n6 17921     1.786300e+02 3.143100e+02\n15 17921     5.877800e+02 5.042800e+02\n6 17922     4.690000e+02 3.146600e+02\n12 17922     5.513000e+02 3.244000e+02\n15 17922     8.505900e+02 4.292400e+02\n6 17923     4.189800e+02 3.128000e+02\n8 17923     4.725800e+02 8.622000e+01\n10 17923     5.957800e+02 3.893500e+02\n15 17923     7.951000e+02 4.397400e+02\n6 17924     5.377200e+02 3.118700e+02\n10 17924     7.072100e+02 3.612800e+02\n12 17924     6.180900e+02 3.220100e+02\n6 17925     1.926600e+02 3.051200e+02\n15 17925     6.000900e+02 4.903000e+02\n6 17926     -1.788800e+02 3.042900e+02\n10 17926     9.425000e+01 4.974800e+02\n15 17926     2.007400e+02 5.537800e+02\n6 17927     5.622300e+02 3.031400e+02\n10 17927     7.294301e+02 3.468700e+02\n6 17928     -3.326200e+02 3.016800e+02\n10 17928     -4.244000e+01 5.174100e+02\n15 17928     3.987000e+01 5.740100e+02\n6 17929     4.097100e+02 3.017800e+02\n9 17929     2.846300e+02 2.063800e+02\n10 17929     5.859301e+02 3.802700e+02\n15 17929     7.834600e+02 4.284700e+02\n6 17930     4.097100e+02 3.017800e+02\n10 17930     5.859301e+02 3.802700e+02\n15 17930     7.834600e+02 4.284700e+02\n6 17931     4.166100e+02 2.962700e+02\n8 17931     4.716700e+02 7.273001e+01\n12 17931     5.016200e+02 3.052100e+02\n6 17932     5.789301e+02 2.951200e+02\n12 17932     6.579200e+02 3.056800e+02\n6 17933     -1.983900e+02 2.906300e+02\n10 17933     7.115997e+01 4.870900e+02\n15 17933     1.733800e+02 5.412500e+02\n6 17934     -2.230800e+02 2.855900e+02\n12 17934     -8.202002e+01 2.939300e+02\n6 17935     4.134000e+02 2.856700e+02\n15 17935     7.851200e+02 4.077800e+02\n6 17936     4.927300e+02 2.725600e+02\n12 17936     5.741200e+02 2.824500e+02\n15 17936     8.701700e+02 3.721000e+02\n6 17937     -2.832300e+02 2.702300e+02\n12 17937     -1.391800e+02 2.819000e+02\n6 17938     -8.795999e+01 2.663900e+02\n7 17938     5.147998e+01 3.412800e+02\n13 17938     4.273600e+02 -3.498999e+01\n14 17938     6.129500e+02 -5.049399e+02\n6 17939     3.622900e+02 2.646200e+02\n12 17939     4.499399e+02 2.736500e+02\n15 17939     7.271300e+02 3.960000e+02\n6 17940     3.588300e+02 2.617900e+02\n15 17940     7.229000e+02 3.933000e+02\n6 17941     3.588300e+02 2.617900e+02\n15 17941     7.229000e+02 3.933000e+02\n6 17942     5.219000e+01 2.584700e+02\n12 17942     1.005700e+02 3.016800e+02\n6 17943     -3.029400e+02 2.569800e+02\n14 17943     4.194200e+02 -4.769399e+02\n6 17944     3.377300e+02 2.560100e+02\n12 17944     4.270000e+02 2.650100e+02\n6 17945     5.228800e+02 2.514700e+02\n9 17945     3.726300e+02 1.825500e+02\n6 17946     5.474900e+02 2.508900e+02\n9 17946     3.931200e+02 1.834300e+02\n6 17947     5.657600e+02 2.478900e+02\n9 17947     4.063199e+02 1.843900e+02\n10 17947     7.226100e+02 2.898800e+02\n12 17947     6.451600e+02 2.577500e+02\n6 17948     5.821100e+02 2.441700e+02\n10 17948     7.381100e+02 2.824100e+02\n12 17948     6.610900e+02 2.542700e+02\n6 17949     5.457300e+02 2.435900e+02\n8 17949     5.695800e+02 4.194000e+01\n12 17949     6.253700e+02 2.533400e+02\n6 17950     5.457300e+02 2.435900e+02\n12 17950     6.253700e+02 2.533400e+02\n6 17951     4.630300e+02 2.417100e+02\n8 17951     5.060300e+02 3.489999e+01\n12 17951     5.456200e+02 2.513400e+02\n15 17951     8.328500e+02 3.430700e+02\n6 17952     -4.913000e+01 2.406900e+02\n12 17952     -4.179993e+00 2.874800e+02\n6 17953     3.140000e+02 2.363800e+02\n10 17953     4.927100e+02 3.366400e+02\n6 17954     3.140000e+02 2.363800e+02\n12 17954     4.046400e+02 2.463000e+02\n15 17954     6.729301e+02 3.741500e+02\n6 17955     3.140000e+02 2.363800e+02\n12 17955     4.046400e+02 2.463000e+02\n6 17956     3.111100e+02 2.354300e+02\n12 17956     4.019200e+02 2.455100e+02\n6 17957     3.295800e+02 2.354900e+02\n12 17957     4.195300e+02 2.456600e+02\n6 17958     3.248400e+02 2.325900e+02\n12 17958     4.145900e+02 2.424600e+02\n6 17959     3.977300e+02 2.315100e+02\n12 17959     4.837300e+02 2.413000e+02\n6 17960     5.398500e+02 2.295500e+02\n12 17960     6.194600e+02 2.395100e+02\n6 17961     -6.676001e+01 2.273700e+02\n14 17961     5.628600e+02 -5.475601e+02\n6 17962     4.065700e+02 2.263200e+02\n10 17962     5.725601e+02 3.061800e+02\n15 17962     7.689800e+02 3.391500e+02\n6 17963     4.134000e+02 2.227500e+02\n15 17963     7.758700e+02 3.328700e+02\n6 17964     4.419800e+02 2.218900e+02\n12 17964     5.255699e+02 2.325700e+02\n6 17965     4.419800e+02 2.218900e+02\n12 17965     5.255699e+02 2.325700e+02\n6 17966     -3.152500e+02 2.215800e+02\n14 17966     4.012700e+02 -5.053400e+02\n6 17967     5.259399e+02 2.205600e+02\n9 17967     3.774399e+02 1.577900e+02\n6 17968     5.259399e+02 2.205600e+02\n9 17968     3.774399e+02 1.577900e+02\n6 17969     -1.025300e+02 2.184100e+02\n14 17969     5.302300e+02 -5.492800e+02\n6 17970     -1.025300e+02 2.184100e+02\n14 17970     5.302300e+02 -5.492800e+02\n6 17971     -9.403000e+01 2.182200e+02\n14 17971     5.375500e+02 -5.507400e+02\n6 17972     5.740800e+02 2.175600e+02\n12 17972     6.532000e+02 2.272700e+02\n6 17973     -2.306700e+02 2.135700e+02\n14 17973     4.718700e+02 -5.275800e+02\n6 17974     3.651000e+02 2.123800e+02\n8 17974     4.335601e+02 5.600006e+00\n6 17975     3.682500e+02 2.129300e+02\n12 17975     4.560300e+02 2.233300e+02\n6 17976     4.410999e+01 2.102700e+02\n15 17976     1.445601e+02 3.526300e+02\n6 17977     1.672900e+02 2.062900e+02\n12 17977     2.070699e+02 2.505600e+02\n6 17978     5.204399e+02 2.038500e+02\n10 17978     6.730400e+02 2.565000e+02\n6 17979     4.309998e+01 2.035000e+02\n10 17979     5.415002e+01 3.160700e+02\n6 17980     3.680800e+02 2.037100e+02\n7 17980     3.884000e+02 2.466900e+02\n10 17980     5.353600e+02 2.926700e+02\n12 17980     4.555601e+02 2.140300e+02\n15 17980     7.249301e+02 3.225200e+02\n6 17981     5.826700e+02 2.037200e+02\n8 17981     5.980800e+02 1.332999e+01\n9 17981     4.221000e+02 1.520500e+02\n12 17981     6.613500e+02 2.134000e+02\n6 17982     3.699200e+02 2.013900e+02\n15 17982     7.264100e+02 3.193600e+02\n6 17983     3.780600e+02 1.998600e+02\n10 17983     5.435900e+02 2.865500e+02\n15 17983     7.348700e+02 3.156200e+02\n6 17984     5.761600e+02 1.926400e+02\n12 17984     6.549000e+02 2.020600e+02\n6 17985     3.920800e+02 1.919700e+02\n15 17985     7.479600e+02 3.028100e+02\n6 17986     3.920800e+02 1.919700e+02\n15 17986     7.479600e+02 3.028100e+02\n6 17987     5.708300e+02 1.904900e+02\n12 17987     6.492700e+02 1.995900e+02\n6 17988     5.083500e+02 1.885700e+02\n10 17988     6.593700e+02 2.442100e+02\n15 17988     8.742000e+02 2.673300e+02\n6 17989     5.519100e+02 1.881600e+02\n12 17989     6.309600e+02 1.978800e+02\n6 17990     -1.361500e+02 1.842700e+02\n14 17990     4.918000e+02 -5.744200e+02\n6 17991     5.591400e+02 1.835400e+02\n10 17991     7.061801e+02 2.266700e+02\n6 17992     -3.128900e+02 1.767800e+02\n14 17992     3.921700e+02 -5.451300e+02\n6 17993     1.663700e+02 1.752200e+02\n10 17993     1.582800e+02 2.625300e+02\n12 17993     2.005900e+02 2.216900e+02\n15 17993     2.612600e+02 2.840500e+02\n6 17994     4.805200e+02 1.714100e+02\n12 17994     5.625500e+02 1.814500e+02\n6 17995     4.450800e+02 1.704000e+02\n12 17995     5.284500e+02 1.805600e+02\n6 17996     5.690601e+02 1.700200e+02\n8 17996     5.888800e+02 -1.382001e+01\n6 17997     5.658400e+02 1.692500e+02\n10 17997     7.098900e+02 2.109000e+02\n6 17998     4.372900e+02 1.676000e+02\n12 17998     5.213800e+02 1.773800e+02\n6 17999     3.791800e+02 1.670900e+02\n15 17999     7.309900e+02 2.773800e+02\n6 18000     5.158300e+02 1.648100e+02\n12 18000     5.963500e+02 1.751800e+02\n6 18001     3.674000e+02 1.614500e+02\n15 18001     7.183900e+02 2.733800e+02\n6 18002     5.162800e+02 1.614400e+02\n12 18002     5.968300e+02 1.711400e+02\n6 18003     3.647100e+02 1.597500e+02\n10 18003     5.260100e+02 2.515700e+02\n12 18003     4.520699e+02 1.708500e+02\n15 18003     7.148500e+02 2.726600e+02\n6 18004     1.453800e+02 1.575500e+02\n7 18004     9.379999e+01 2.170200e+02\n15 18004     2.213600e+02 2.649400e+02\n6 18005     3.471400e+02 1.565000e+02\n10 18005     5.109900e+02 2.521800e+02\n6 18006     5.539399e+02 1.560500e+02\n12 18006     6.331899e+02 1.659200e+02\n6 18007     5.713500e+02 1.533800e+02\n12 18007     6.499399e+02 1.626500e+02\n6 18008     5.713500e+02 1.533800e+02\n12 18008     6.499399e+02 1.626500e+02\n6 18009     -3.558000e+02 1.519000e+02\n14 18009     3.494800e+02 -5.591000e+02\n6 18010     5.142600e+02 1.519300e+02\n12 18010     5.952300e+02 1.617900e+02\n6 18011     -9.067001e+01 1.492800e+02\n12 18011     -6.194000e+01 2.029000e+02\n6 18012     -5.390015e+00 1.478200e+02\n10 18012     -2.826001e+01 2.643000e+02\n15 18012     4.096997e+01 2.829000e+02\n6 18013     -1.919983e+00 1.477000e+02\n12 18013     2.240002e+01 2.008400e+02\n15 18013     4.439001e+01 2.819100e+02\n6 18014     3.758700e+02 1.456400e+02\n12 18014     4.629399e+02 1.567400e+02\n15 18014     7.244200e+02 2.534400e+02\n6 18015     5.609985e+00 1.440500e+02\n12 18015     2.946997e+01 1.972300e+02\n15 18015     4.991998e+01 2.750800e+02\n6 18016     5.609985e+00 1.440500e+02\n12 18016     2.946997e+01 1.972300e+02\n6 18017     5.005900e+02 1.416900e+02\n8 18017     5.364301e+02 -4.069000e+01\n10 18017     6.451899e+02 2.000900e+02\n6 18018     5.005900e+02 1.416900e+02\n12 18018     5.811801e+02 1.518000e+02\n6 18019     -6.487000e+01 1.415400e+02\n12 18019     -3.889001e+01 1.956300e+02\n15 18019     -1.895001e+01 2.888200e+02\n6 18020     -1.380200e+02 1.408600e+02\n15 18020     -8.152002e+01 3.058200e+02\n6 18021     2.343600e+02 1.392800e+02\n12 18021     2.717600e+02 1.820600e+02\n6 18022     4.367999e+01 1.391000e+02\n10 18022     1.248999e+01 2.451000e+02\n6 18023     3.827100e+02 1.390300e+02\n10 18023     5.393900e+02 2.265700e+02\n12 18023     4.693800e+02 1.501300e+02\n6 18024     3.827100e+02 1.390300e+02\n10 18024     5.393900e+02 2.265700e+02\n12 18024     4.693800e+02 1.501300e+02\n6 18025     5.787900e+02 1.385800e+02\n12 18025     6.567300e+02 1.480100e+02\n6 18026     -2.159003e+01 1.381200e+02\n12 18026     1.830017e+00 1.920200e+02\n6 18027     3.115002e+01 1.373000e+02\n12 18027     5.385999e+01 1.902100e+02\n6 18028     3.115002e+01 1.373000e+02\n12 18028     5.385999e+01 1.902100e+02\n6 18029     3.412300e+02 1.363500e+02\n10 18029     5.038900e+02 2.343600e+02\n12 18029     4.305699e+02 1.480100e+02\n15 18029     6.880000e+02 2.521000e+02\n6 18030     1.434998e+01 1.348900e+02\n15 18030     5.504999e+01 2.621200e+02\n6 18031     9.060999e+01 1.333800e+02\n15 18031     1.391000e+02 2.445700e+02\n6 18032     -9.845999e+01 1.322700e+02\n12 18032     -7.150000e+01 1.866700e+02\n6 18033     4.909000e+02 1.322700e+02\n10 18033     6.345100e+02 1.930800e+02\n15 18033     8.452600e+02 2.054900e+02\n6 18034     4.978400e+02 1.325300e+02\n10 18034     6.414900e+02 1.920400e+02\n15 18034     8.535000e+02 2.043600e+02\n6 18035     -6.903003e+01 1.320700e+02\n10 18035     -8.689001e+01 2.617000e+02\n12 18035     -4.409998e+01 1.863500e+02\n15 18035     -2.726001e+01 2.785200e+02\n6 18036     1.290300e+02 1.236500e+02\n12 18036     1.533500e+02 1.735300e+02\n6 18037     5.433800e+02 1.234900e+02\n12 18037     6.219700e+02 1.332800e+02\n6 18038     5.860800e+02 1.220000e+02\n12 18038     6.638800e+02 1.313000e+02\n6 18039     5.860800e+02 1.220000e+02\n12 18039     6.638800e+02 1.313000e+02\n6 18040     5.476500e+02 1.212600e+02\n12 18040     6.263000e+02 1.310600e+02\n6 18041     -2.821002e+01 1.187300e+02\n12 18041     -6.950012e+00 1.731100e+02\n6 18042     3.822600e+02 1.183500e+02\n10 18042     5.368199e+02 2.069200e+02\n6 18043     4.650100e+02 1.186100e+02\n15 18043     8.156801e+02 1.969500e+02\n6 18044     5.501200e+02 1.182200e+02\n8 18044     5.745900e+02 -5.623001e+01\n12 18044     6.289500e+02 1.280900e+02\n6 18045     -4.414001e+01 1.163100e+02\n12 18045     -2.252002e+01 1.708500e+02\n6 18046     4.572900e+02 1.164900e+02\n15 18046     8.062000e+02 1.976300e+02\n6 18047     5.468500e+02 1.165800e+02\n12 18047     6.256500e+02 1.264800e+02\n6 18048     -1.341300e+02 1.159800e+02\n12 18048     -1.061200e+02 1.708100e+02\n6 18049     -1.341300e+02 1.159800e+02\n12 18049     -1.061200e+02 1.708100e+02\n15 18049     -8.976001e+01 2.752700e+02\n6 18050     2.100000e+02 1.152600e+02\n12 18050     2.405500e+02 1.604000e+02\n6 18051     -5.989001e+01 1.136700e+02\n10 18051     -8.622998e+01 2.412600e+02\n6 18052     -5.989001e+01 1.136700e+02\n10 18052     -8.622998e+01 2.412600e+02\n15 18052     -2.679999e+01 2.545000e+02\n6 18053     4.535601e+02 1.085900e+02\n12 18053     5.362600e+02 1.195900e+02\n6 18054     5.377900e+02 1.054700e+02\n9 18054     3.922600e+02 6.790997e+01\n6 18055     4.090600e+02 1.049800e+02\n12 18055     4.941400e+02 1.164100e+02\n15 18055     7.537900e+02 1.970500e+02\n6 18056     -4.026001e+01 1.045800e+02\n10 18056     -7.308002e+01 2.276700e+02\n15 18056     -1.153998e+01 2.391300e+02\n6 18057     7.748999e+01 1.019400e+02\n10 18057     3.153003e+01 2.006600e+02\n12 18057     9.746002e+01 1.538800e+02\n6 18058     4.266400e+02 1.014500e+02\n10 18058     5.734399e+02 1.796500e+02\n15 18058     7.725300e+02 1.879100e+02\n6 18059     4.266400e+02 1.014500e+02\n10 18059     5.734399e+02 1.796500e+02\n6 18060     3.060900e+02 9.957001e+01\n12 18060     3.561100e+02 1.328900e+02\n6 18061     -3.797998e+01 9.783002e+01\n15 18061     -1.203003e+01 2.306700e+02\n6 18062     5.536200e+02 9.788000e+01\n12 18062     6.317100e+02 1.072800e+02\n6 18063     3.644800e+02 9.775000e+01\n12 18063     4.215601e+02 1.262200e+02\n6 18064     3.556700e+02 9.516998e+01\n12 18064     4.117600e+02 1.238300e+02\n6 18065     4.308000e+02 9.459003e+01\n7 18065     4.294200e+02 1.490800e+02\n10 18065     5.756000e+02 1.716700e+02\n6 18066     4.519500e+02 9.412000e+01\n15 18066     7.978101e+02 1.732400e+02\n6 18067     2.634600e+02 9.285999e+01\n10 18067     2.447900e+02 1.621800e+02\n6 18068     3.124200e+02 9.204999e+01\n12 18068     3.616700e+02 1.257200e+02\n15 18068     4.728300e+02 1.653400e+02\n6 18069     4.307001e+01 9.037000e+01\n10 18069     -4.809998e+00 1.962500e+02\n12 18069     6.103998e+01 1.434200e+02\n15 18069     6.802002e+01 2.033000e+02\n6 18070     -2.414100e+02 8.946997e+01\n12 18070     -1.890700e+02 1.403100e+02\n6 18071     4.565800e+02 8.904999e+01\n10 18071     5.974200e+02 1.605200e+02\n15 18071     8.014600e+02 1.655800e+02\n6 18072     6.923999e+01 8.750000e+01\n10 18072     1.898999e+01 1.880400e+02\n6 18073     1.042100e+02 8.720001e+01\n12 18073     1.243100e+02 1.382000e+02\n6 18074     4.572400e+02 8.633002e+01\n10 18074     5.978800e+02 1.576200e+02\n15 18074     8.018800e+02 1.626200e+02\n6 18075     -3.064800e+02 8.325000e+01\n10 18075     -2.277300e+02 2.756900e+02\n15 18075     -1.861800e+02 2.912900e+02\n6 18076     5.638300e+02 8.058002e+01\n12 18076     6.421500e+02 9.000000e+01\n6 18077     -2.387300e+02 8.007001e+01\n12 18077     -1.889000e+02 1.317400e+02\n6 18078     -3.150024e+00 7.683002e+01\n12 18078     1.365002e+01 1.309600e+02\n6 18079     -4.490000e+02 6.872998e+01\n7 18079     -2.748000e+02 2.114600e+02\n6 18080     -4.490000e+02 6.872998e+01\n7 18080     -2.748000e+02 2.114600e+02\n6 18081     2.551400e+02 6.781000e+01\n12 18081     2.896600e+02 1.087600e+02\n13 18081     6.088101e+02 -2.257900e+02\n6 18082     -2.444100e+02 6.559003e+01\n10 18082     -2.058900e+02 2.421400e+02\n15 18082     -1.617400e+02 2.525800e+02\n6 18083     -3.066998e+01 6.325000e+01\n12 18083     -1.408002e+01 1.181300e+02\n15 18083     -1.582001e+01 1.884800e+02\n6 18084     3.426001e+01 6.262000e+01\n10 18084     -2.046002e+01 1.705000e+02\n15 18084     4.996002e+01 1.730300e+02\n6 18085     -3.258002e+01 6.140997e+01\n10 18085     -7.914001e+01 1.833100e+02\n15 18085     -1.846002e+01 1.868400e+02\n6 18086     -2.473900e+02 6.015997e+01\n10 18086     -2.114600e+02 2.369500e+02\n12 18086     -2.014400e+02 1.136400e+02\n15 18086     -1.681200e+02 2.466600e+02\n6 18087     -3.059900e+02 5.909003e+01\n10 18087     -2.411600e+02 2.514300e+02\n12 18087     -2.474700e+02 1.115800e+02\n6 18088     -2.446800e+02 5.826001e+01\n10 18088     -2.103000e+02 2.343200e+02\n12 18088     -1.991400e+02 1.118700e+02\n6 18089     -2.574000e+02 5.575000e+01\n10 18089     -2.219700e+02 2.347000e+02\n15 18089     -1.802800e+02 2.440900e+02\n6 18090     -1.868200e+02 5.278003e+01\n12 18090     -1.573600e+02 1.083800e+02\n6 18091     6.381000e+01 5.325000e+01\n12 18091     7.965002e+01 1.053400e+02\n15 18091     7.878003e+01 1.547700e+02\n6 18092     -3.541998e+01 5.264001e+01\n15 18092     -2.420001e+01 1.773300e+02\n6 18093     1.770001e+01 4.921997e+01\n12 18093     3.252002e+01 1.026400e+02\n6 18094     5.624500e+02 4.791998e+01\n10 18094     6.876300e+02 9.298999e+01\n6 18095     5.689200e+02 4.434003e+01\n12 18095     6.464301e+02 5.365002e+01\n6 18096     5.689200e+02 4.434003e+01\n12 18096     6.464301e+02 5.365002e+01\n6 18097     -3.420700e+02 4.371002e+01\n15 18097     -2.462500e+02 2.518800e+02\n6 18098     -3.420700e+02 4.371002e+01\n10 18098     -2.798600e+02 2.424600e+02\n15 18098     -2.462500e+02 2.518800e+02\n6 18099     8.583002e+01 4.301001e+01\n12 18099     1.015100e+02 9.419000e+01\n6 18100     9.302002e+01 4.163000e+01\n12 18100     1.083300e+02 9.182001e+01\n6 18101     -2.551800e+02 4.083002e+01\n10 18101     -2.279800e+02 2.193500e+02\n12 18101     -2.130200e+02 9.597998e+01\n15 18101     -1.879400e+02 2.256800e+02\n6 18102     3.856400e+02 4.117999e+01\n12 18102     4.345500e+02 7.112000e+01\n6 18103     -1.321800e+02 4.001001e+01\n9 18103     -6.900000e+01 1.119600e+02\n12 18103     -1.110200e+02 9.629999e+01\n6 18104     1.002700e+02 3.971002e+01\n12 18104     1.164100e+02 9.059998e+01\n6 18105     -2.934000e+02 3.872998e+01\n12 18105     -2.402600e+02 9.247998e+01\n6 18106     -7.446997e+01 3.860999e+01\n15 18106     -6.366998e+01 1.714000e+02\n6 18107     3.690002e+01 3.734003e+01\n15 18107     4.523999e+01 1.432400e+02\n6 18108     -3.910999e+01 3.657001e+01\n12 18108     -2.415002e+01 9.135999e+01\n6 18109     -3.346200e+02 3.502002e+01\n12 18109     -2.794300e+02 9.046002e+01\n6 18110     7.513000e+01 3.490997e+01\n12 18110     8.985999e+01 8.645001e+01\n6 18111     7.513000e+01 3.490997e+01\n12 18111     8.985999e+01 8.645001e+01\n6 18112     -4.427002e+01 3.189001e+01\n12 18112     -2.940002e+01 8.689001e+01\n6 18113     2.761000e+02 2.953998e+01\n12 18113     3.110000e+02 6.894000e+01\n6 18114     1.665900e+02 2.609998e+01\n15 18114     1.959600e+02 1.008600e+02\n6 18115     5.006000e+01 2.209003e+01\n15 18115     5.535999e+01 1.216100e+02\n6 18116     2.509200e+02 2.188000e+01\n15 18116     3.162900e+02 8.094000e+01\n6 18117     6.159998e+01 1.946002e+01\n12 18117     7.519000e+01 7.140002e+01\n6 18118     6.159998e+01 1.946002e+01\n12 18118     7.519000e+01 7.140002e+01\n6 18119     1.392300e+02 1.948999e+01\n8 18119     2.848400e+02 -3.131000e+01\n6 18120     2.635999e+01 1.765997e+01\n12 18120     3.808002e+01 7.023999e+01\n6 18121     1.752500e+02 1.650000e+01\n10 18121     1.114300e+02 9.715002e+01\n15 18121     2.057400e+02 8.801001e+01\n6 18122     5.700012e+00 1.473999e+01\n12 18122     1.882001e+01 6.825000e+01\n6 18123     -1.685600e+02 1.071002e+01\n12 18123     -1.444500e+02 6.735999e+01\n6 18124     -1.685600e+02 1.071002e+01\n12 18124     -1.444500e+02 6.735999e+01\n6 18125     1.989700e+02 9.950012e+00\n15 18125     2.359500e+02 7.603003e+01\n6 18126     1.989700e+02 9.950012e+00\n15 18126     2.359500e+02 7.603003e+01\n6 18127     1.023200e+02 9.530029e+00\n8 18127     2.569800e+02 -3.685999e+01\n6 18128     -1.861900e+02 8.869995e+00\n12 18128     -1.593500e+02 6.522998e+01\n6 18129     3.283200e+02 9.020020e+00\n12 18129     3.657700e+02 4.478003e+01\n6 18130     8.490997e+01 8.039978e+00\n12 18130     9.842999e+01 5.859998e+01\n6 18131     4.165300e+02 7.520020e+00\n10 18131     4.066300e+02 5.014001e+01\n6 18132     2.769000e+01 6.700012e+00\n12 18132     3.922998e+01 5.925000e+01\n6 18133     -1.392500e+02 9.500122e-01\n12 18133     -1.193300e+02 5.728998e+01\n6 18134     1.084000e+02 5.999756e-01\n12 18134     1.235200e+02 4.997998e+01\n6 18135     1.257700e+02 6.300049e-01\n10 18135     5.460999e+01 9.083002e+01\n15 18135     1.385100e+02 8.004001e+01\n6 18136     -2.328900e+02 1.400146e-01\n10 18136     -2.321600e+02 1.733200e+02\n15 18136     -1.930900e+02 1.724200e+02\n6 18137     -6.948999e+01 -7.399902e-01\n8 18137     1.224700e+02 -4.400000e+01\n12 18137     -5.547998e+01 5.441998e+01\n6 18138     3.271900e+02 -6.039978e+00\n12 18138     3.620500e+02 3.010999e+01\n6 18139     3.140015e+00 -6.469971e+00\n9 18139     4.556000e+01 9.244000e+01\n6 18140     8.190002e+00 -7.760010e+00\n12 18140     1.953998e+01 4.571997e+01\n6 18141     3.944000e+01 -1.040997e+01\n12 18141     5.144000e+01 4.167999e+01\n6 18142     -1.170700e+02 -1.291998e+01\n8 18142     8.383002e+01 -5.645999e+01\n6 18143     2.161500e+02 -1.328998e+01\n8 18143     3.453500e+02 -6.465997e+01\n6 18144     3.203003e+01 -1.452002e+01\n8 18144     2.024300e+02 -5.323001e+01\n6 18145     -1.974400e+02 -1.594000e+01\n12 18145     -1.707600e+02 4.095001e+01\n6 18146     -3.208200e+02 -1.690997e+01\n10 18146     -2.936800e+02 1.777700e+02\n15 18146     -2.633400e+02 1.766600e+02\n6 18147     3.250000e+02 -1.723999e+01\n12 18147     3.579700e+02 1.910999e+01\n6 18148     1.373600e+02 -1.901001e+01\n15 18148     1.485900e+02 5.488000e+01\n6 18149     1.631600e+02 -1.921997e+01\n15 18149     1.815000e+02 5.001001e+01\n6 18150     1.631600e+02 -1.921997e+01\n12 18150     1.811200e+02 2.691998e+01\n6 18151     3.366500e+02 -1.939001e+01\n12 18151     3.727200e+02 1.571997e+01\n6 18152     3.209600e+02 -2.092999e+01\n12 18152     3.531600e+02 1.556000e+01\n6 18153     4.036400e+02 -2.185999e+01\n12 18153     4.445100e+02 9.190002e+00\n6 18154     -1.262300e+02 -2.466998e+01\n8 18154     7.639001e+01 -6.662000e+01\n6 18155     2.466300e+02 -2.503998e+01\n8 18155     3.679100e+02 -7.832001e+01\n10 18155     1.894200e+02 4.541998e+01\n13 18155     5.870300e+02 -2.942900e+02\n15 18155     2.994100e+02 2.753003e+01\n6 18156     -7.060999e+01 -2.723999e+01\n12 18156     -5.726001e+01 2.859003e+01\n6 18157     3.689200e+02 -2.682001e+01\n12 18157     4.079900e+02 5.979980e+00\n6 18158     -1.478100e+02 -3.115997e+01\n12 18158     -1.279500e+02 2.526001e+01\n6 18159     3.708100e+02 -3.083002e+01\n10 18159     3.354600e+02 1.750000e+01\n12 18159     4.088500e+02 1.570007e+00\n13 18159     6.936200e+02 -3.179200e+02\n6 18160     -3.390300e+02 -3.154999e+01\n10 18160     -3.157600e+02 1.669900e+02\n15 18160     -2.891700e+02 1.637900e+02\n6 18161     -4.365002e+01 -3.229999e+01\n12 18161     -3.184003e+01 2.209998e+01\n6 18162     -3.210700e+02 -3.713000e+01\n15 18162     -2.768800e+02 1.534800e+02\n6 18163     -3.210700e+02 -3.713000e+01\n10 18163     -3.048700e+02 1.584200e+02\n6 18164     1.064700e+02 -3.744000e+01\n10 18164     2.820001e+01 5.800000e+01\n6 18165     2.213500e+02 -3.800000e+01\n12 18165     2.443900e+02 3.960022e+00\n6 18166     2.326300e+02 -3.770001e+01\n12 18166     2.572900e+02 3.750000e+00\n6 18167     2.017000e+02 -4.776001e+01\n8 18167     3.337600e+02 -9.015997e+01\n6 18168     -1.787500e+02 -4.803998e+01\n12 18168     -1.598900e+02 9.609985e+00\n6 18169     -9.260010e+00 -4.783002e+01\n12 18169     4.799805e-01 5.130005e+00\n6 18170     1.840600e+02 -4.798999e+01\n10 18170     1.099300e+02 3.384003e+01\n15 18170     2.053500e+02 1.310999e+01\n6 18171     -2.738000e+02 -4.985999e+01\n12 18171     -2.414400e+02 9.460022e+00\n6 18172     -7.829999e+01 -5.901001e+01\n12 18172     -6.606000e+01 -3.919983e+00\n6 18173     -7.829999e+01 -5.901001e+01\n12 18173     -6.606000e+01 -3.919983e+00\n6 18174     -6.640997e+01 -6.913000e+01\n8 18174     1.249900e+02 -9.747998e+01\n6 18175     4.045400e+02 -7.023999e+01\n12 18175     4.387900e+02 -3.845001e+01\n6 18176     2.013000e+01 -7.433002e+01\n12 18176     3.034998e+01 -2.306000e+01\n6 18177     -1.228998e+01 -7.991998e+01\n12 18177     -1.650024e+00 -2.772998e+01\n6 18178     -5.727002e+01 -8.147998e+01\n12 18178     -4.621997e+01 -2.752002e+01\n6 18179     -1.866500e+02 -8.191998e+01\n15 18179     -1.882800e+02 6.771002e+01\n6 18180     -4.742999e+01 -8.909003e+01\n12 18180     -3.828998e+01 -3.523999e+01\n6 18181     2.260300e+02 -8.903998e+01\n12 18181     2.430900e+02 -4.766998e+01\n6 18182     2.223700e+02 -9.087000e+01\n12 18182     2.390601e+02 -4.928003e+01\n6 18183     -1.035000e+02 -9.173999e+01\n15 18183     -1.242700e+02 3.284998e+01\n6 18184     2.172100e+02 -9.271002e+01\n12 18184     2.331500e+02 -5.075000e+01\n6 18185     1.971800e+02 -9.384998e+01\n12 18185     2.118900e+02 -5.087000e+01\n6 18186     -2.438000e+01 -9.485999e+01\n12 18186     -1.604999e+01 -4.202002e+01\n6 18187     -2.438000e+01 -9.485999e+01\n12 18187     -1.604999e+01 -4.202002e+01\n6 18188     -2.788600e+02 -9.758002e+01\n12 18188     -2.564700e+02 -3.616998e+01\n6 18189     -2.426001e+01 -1.019500e+02\n12 18189     -1.734998e+01 -4.917999e+01\n6 18190     3.494200e+02 -1.031800e+02\n12 18190     3.766500e+02 -6.856000e+01\n6 18191     3.770900e+02 -1.038100e+02\n7 18191     2.702500e+02 -3.340997e+01\n12 18191     4.076300e+02 -7.203998e+01\n15 18191     4.426400e+02 -9.644000e+01\n6 18192     2.512700e+02 -1.091800e+02\n12 18192     2.703500e+02 -7.000000e+01\n15 18192     2.687400e+02 -7.407001e+01\n6 18193     2.512700e+02 -1.091800e+02\n12 18193     2.703500e+02 -7.000000e+01\n15 18193     2.687400e+02 -7.407001e+01\n6 18194     3.198600e+02 -1.091100e+02\n10 18194     2.383700e+02 -5.469000e+01\n15 18194     3.584700e+02 -9.039001e+01\n6 18195     -2.699000e+02 -1.107000e+02\n15 18195     -2.742100e+02 5.665002e+01\n6 18196     -2.474300e+02 -1.115400e+02\n12 18196     -2.301400e+02 -5.078998e+01\n6 18197     4.030200e+02 -1.117700e+02\n12 18197     4.363800e+02 -8.128998e+01\n6 18198     4.030200e+02 -1.117700e+02\n12 18198     4.363800e+02 -8.128998e+01\n6 18199     -2.780200e+02 -1.162300e+02\n10 18199     -3.107200e+02 7.039001e+01\n12 18199     -2.604600e+02 -5.378003e+01\n15 18199     -2.847500e+02 5.178998e+01\n6 18200     -2.257001e+01 -1.176700e+02\n8 18200     1.580800e+02 -1.296300e+02\n6 18201     -2.454600e+02 -1.181000e+02\n15 18201     -2.558200e+02 4.220001e+01\n6 18202     -2.542200e+02 -1.208000e+02\n10 18202     -2.937100e+02 6.146002e+01\n6 18203     -5.802002e+01 -1.216400e+02\n13 18203     3.375699e+02 -3.184200e+02\n15 18203     -8.984003e+01 -1.259003e+01\n6 18204     6.329999e+01 -1.227500e+02\n12 18204     6.853998e+01 -7.365002e+01\n6 18205     5.004999e+01 -1.229600e+02\n12 18205     5.447998e+01 -7.328003e+01\n6 18206     3.026900e+02 -1.255800e+02\n12 18206     3.237400e+02 -8.937000e+01\n15 18206     3.269399e+02 -1.066200e+02\n6 18207     1.300800e+02 -1.273700e+02\n12 18207     1.379100e+02 -8.183002e+01\n6 18208     1.300800e+02 -1.273700e+02\n12 18208     1.379100e+02 -8.183002e+01\n6 18209     -2.086400e+02 -1.280400e+02\n12 18209     -1.960600e+02 -6.809998e+01\n6 18210     -2.351100e+02 -1.289200e+02\n12 18210     -2.224400e+02 -6.769000e+01\n6 18211     -2.067900e+02 -1.304100e+02\n12 18211     -1.949800e+02 -7.050000e+01\n6 18212     -2.430700e+02 -1.309500e+02\n8 18212     -1.821997e+01 -1.422300e+02\n12 18212     -2.304500e+02 -6.895001e+01\n6 18213     3.321600e+02 -1.313800e+02\n10 18213     2.370400e+02 -8.204999e+01\n15 18213     3.569301e+02 -1.226600e+02\n6 18214     1.519500e+02 -1.320100e+02\n12 18214     1.607100e+02 -8.792999e+01\n6 18215     -2.172300e+02 -1.411000e+02\n12 18215     -2.072800e+02 -8.020001e+01\n15 18215     -2.422600e+02 8.750000e+00\n6 18216     8.419000e+01 -1.412500e+02\n12 18216     8.991998e+01 -9.392999e+01\n15 18216     5.395001e+01 -7.070001e+01\n6 18217     1.025700e+02 -1.420601e+02\n12 18217     1.091100e+02 -9.627002e+01\n6 18218     1.025700e+02 -1.420601e+02\n12 18218     1.091100e+02 -9.627002e+01\n6 18219     2.787600e+02 -1.419800e+02\n12 18219     2.963000e+02 -1.047400e+02\n6 18220     7.828003e+01 -1.443600e+02\n15 18220     4.709003e+01 -7.259003e+01\n6 18221     2.867400e+02 -1.547100e+02\n10 18221     1.789200e+02 -9.642999e+01\n12 18221     3.027500e+02 -1.182400e+02\n15 18221     2.867600e+02 -1.392000e+02\n6 18222     3.310200e+02 -1.578101e+02\n12 18222     3.485000e+02 -1.232800e+02\n6 18223     3.310200e+02 -1.578101e+02\n12 18223     3.485000e+02 -1.232800e+02\n6 18224     -1.763700e+02 -1.610699e+02\n12 18224     -1.713300e+02 -1.014600e+02\n6 18225     -8.539999e+01 -1.645200e+02\n12 18225     -8.203998e+01 -1.094500e+02\n6 18226     2.548500e+02 -1.666500e+02\n12 18226     2.672300e+02 -1.287300e+02\n6 18227     3.923200e+02 -1.694200e+02\n12 18227     4.266200e+02 -1.412300e+02\n6 18228     3.759200e+02 -1.699500e+02\n12 18228     4.098700e+02 -1.405700e+02\n6 18229     -1.997000e+02 -1.726899e+02\n8 18229     1.584998e+01 -1.743200e+02\n9 18229     -1.101400e+02 -4.946002e+01\n6 18230     -8.357999e+01 -1.753101e+02\n12 18230     -8.250000e+01 -1.206800e+02\n6 18231     2.294500e+02 -1.770699e+02\n15 18231     2.048500e+02 -1.516300e+02\n6 18232     1.546700e+02 -1.779500e+02\n12 18232     1.605700e+02 -1.349200e+02\n6 18233     -1.647500e+02 -1.784200e+02\n12 18233     -1.641600e+02 -1.191300e+02\n6 18234     -1.182800e+02 -1.786899e+02\n10 18234     -2.088900e+02 -2.602002e+01\n6 18235     2.008500e+02 -1.784900e+02\n10 18235     8.173999e+01 -1.007500e+02\n6 18236     2.522500e+02 -1.809500e+02\n12 18236     2.627100e+02 -1.431400e+02\n6 18237     -2.614001e+01 -1.819800e+02\n10 18237     -1.301900e+02 -5.066998e+01\n15 18237     -7.628998e+01 -8.757001e+01\n6 18238     2.132300e+02 -1.835000e+02\n10 18238     9.091998e+01 -1.088000e+02\n15 18238     1.824000e+02 -1.543100e+02\n6 18239     -6.213000e+01 -1.838900e+02\n15 18239     -1.144500e+02 -8.056000e+01\n6 18240     5.059998e+00 -1.841500e+02\n12 18240     5.260010e+00 -1.336000e+02\n15 18240     -4.502002e+01 -9.842999e+01\n6 18241     1.917800e+02 -1.843900e+02\n10 18241     7.028003e+01 -1.043600e+02\n15 18241     1.579900e+02 -1.494700e+02\n6 18242     -1.566300e+02 -1.857600e+02\n10 18242     -2.450700e+02 -2.485999e+01\n15 18242     -2.098100e+02 -5.834998e+01\n6 18243     1.141200e+02 -1.857300e+02\n12 18243     1.169900e+02 -1.408000e+02\n6 18244     -1.697200e+02 -1.873900e+02\n10 18244     -2.583800e+02 -2.359998e+01\n6 18245     2.308500e+02 -1.896300e+02\n12 18245     2.392400e+02 -1.510400e+02\n6 18246     2.524000e+02 -1.933300e+02\n7 18246     1.337400e+02 -9.852002e+01\n10 18246     1.348200e+02 -1.248700e+02\n15 18246     2.350200e+02 -1.734100e+02\n6 18247     1.415700e+02 -1.954800e+02\n10 18247     1.558002e+01 -1.042700e+02\n12 18247     1.434800e+02 -1.522300e+02\n15 18247     9.367999e+01 -1.494800e+02\n6 18248     1.586500e+02 -1.979700e+02\n12 18248     1.607100e+02 -1.554900e+02\n6 18249     2.271002e+01 -1.985500e+02\n12 18249     2.059003e+01 -1.490100e+02\n6 18250     1.012700e+02 -1.984800e+02\n15 18250     4.834003e+01 -1.413200e+02\n6 18251     2.194800e+02 -2.015400e+02\n7 18251     1.014000e+02 -1.023600e+02\n12 18251     2.270500e+02 -1.627200e+02\n6 18252     4.095001e+01 -2.032500e+02\n10 18252     -8.122998e+01 -8.828003e+01\n6 18253     2.667999e+01 -2.035200e+02\n12 18253     2.342999e+01 -1.540800e+02\n6 18254     1.094700e+02 -2.058900e+02\n10 18254     -2.014001e+01 -1.072100e+02\n15 18254     5.203998e+01 -1.530500e+02\n6 18255     9.139001e+01 -2.065100e+02\n12 18255     8.958002e+01 -1.605300e+02\n6 18256     2.637400e+02 -2.072800e+02\n12 18256     2.775900e+02 -1.714800e+02\n6 18257     3.311800e+02 -2.142400e+02\n12 18257     3.572200e+02 -1.835100e+02\n6 18258     3.311800e+02 -2.142400e+02\n12 18258     3.572200e+02 -1.835100e+02\n6 18259     3.549988e+00 -2.154000e+02\n12 18259     -2.020020e+00 -1.648800e+02\n6 18260     2.327800e+02 -2.193300e+02\n9 18260     2.424900e+02 -6.744000e+01\n10 18260     1.132900e+02 -1.439500e+02\n15 18260     2.102200e+02 -1.963100e+02\n6 18261     2.327800e+02 -2.193300e+02\n15 18261     2.102200e+02 -1.963100e+02\n6 18262     3.896600e+02 -2.265300e+02\n12 18262     4.258101e+02 -2.004400e+02\n6 18263     6.837000e+01 -2.275601e+02\n12 18263     6.607001e+01 -1.810400e+02\n6 18264     3.866500e+02 -2.279100e+02\n12 18264     4.220500e+02 -2.007800e+02\n6 18265     8.120001e+01 -2.284000e+02\n12 18265     7.971002e+01 -1.827700e+02\n6 18266     1.988800e+02 -2.317500e+02\n12 18266     2.055300e+02 -1.928900e+02\n6 18267     1.988800e+02 -2.317500e+02\n12 18267     2.055300e+02 -1.928900e+02\n6 18268     2.174600e+02 -2.327400e+02\n8 18268     3.495200e+02 -2.305700e+02\n12 18268     2.266000e+02 -1.950600e+02\n6 18269     9.644000e+01 -2.338900e+02\n12 18269     9.629999e+01 -1.894200e+02\n15 18269     3.976001e+01 -1.772500e+02\n6 18270     2.156800e+02 -2.384900e+02\n12 18270     2.249399e+02 -2.011700e+02\n6 18271     3.581200e+02 -2.410000e+02\n12 18271     3.907700e+02 -2.129900e+02\n6 18272     9.803998e+01 -2.446200e+02\n8 18272     2.534800e+02 -2.321500e+02\n9 18272     1.401100e+02 -8.596002e+01\n15 18272     4.319000e+01 -1.890600e+02\n6 18273     1.049200e+02 -2.474200e+02\n7 18273     -1.659973e+00 -1.265000e+02\n9 18273     1.450800e+02 -8.822998e+01\n6 18274     2.054600e+02 -2.472500e+02\n12 18274     2.137400e+02 -2.093100e+02\n6 18275     -9.735999e+01 -2.497300e+02\n8 18275     9.546997e+01 -2.374600e+02\n6 18276     1.656700e+02 -2.614399e+02\n8 18276     3.078600e+02 -2.503600e+02\n6 18277     6.997998e+01 -2.621700e+02\n12 18277     7.059003e+01 -2.170900e+02\n6 18278     9.903003e+01 -2.661600e+02\n8 18278     2.535500e+02 -2.535100e+02\n9 18278     1.407400e+02 -1.070300e+02\n12 18278     1.011300e+02 -2.228900e+02\n6 18279     2.449300e+02 -2.708800e+02\n12 18279     2.593900e+02 -2.363700e+02\n6 18280     2.480800e+02 -2.771600e+02\n12 18280     2.627700e+02 -2.433400e+02\n6 18281     1.500600e+02 -2.784100e+02\n12 18281     1.548800e+02 -2.382300e+02\n15 18281     1.062200e+02 -2.360300e+02\n6 18282     1.522300e+02 -2.802400e+02\n15 18282     1.093400e+02 -2.384300e+02\n6 18283     2.472100e+02 -2.845699e+02\n12 18283     2.620800e+02 -2.505100e+02\n6 18284     9.831000e+01 -2.850500e+02\n9 18284     1.408500e+02 -1.268300e+02\n6 18285     2.357500e+02 -2.962600e+02\n12 18285     2.489800e+02 -2.616800e+02\n6 18286     2.357500e+02 -2.962600e+02\n12 18286     2.489800e+02 -2.616800e+02\n6 18287     2.136400e+02 -2.988900e+02\n12 18287     2.253600e+02 -2.631000e+02\n6 18288     5.871002e+01 -3.063101e+02\n12 18288     6.139001e+01 -2.618900e+02\n6 18289     4.878003e+01 -3.088600e+02\n12 18289     5.125000e+01 -2.636300e+02\n15 18289     -1.859985e+00 -2.378500e+02\n6 18290     -8.620001e+01 -3.176100e+02\n12 18290     -8.115997e+01 -2.643800e+02\n6 18291     -7.875000e+01 -3.224100e+02\n12 18291     -7.453998e+01 -2.695500e+02\n6 18292     8.346002e+01 -3.226801e+02\n12 18292     8.728003e+01 -2.797800e+02\n6 18293     2.855700e+02 -3.231700e+02\n12 18293     3.058000e+02 -2.930100e+02\n6 18294     2.696700e+02 -3.233199e+02\n12 18294     2.881400e+02 -2.914300e+02\n6 18295     8.062000e+01 -3.269900e+02\n12 18295     8.402002e+01 -2.844200e+02\n6 18296     2.531300e+02 -3.290000e+02\n12 18296     2.700300e+02 -2.965500e+02\n6 18297     8.103998e+01 -3.310800e+02\n12 18297     8.416998e+01 -2.884100e+02\n6 18298     -1.022600e+02 -3.330601e+02\n8 18298     8.834998e+01 -3.132000e+02\n6 18299     -2.257001e+01 -3.509200e+02\n12 18299     -1.751001e+01 -3.021100e+02\n6 18300     -1.251800e+02 -3.526100e+02\n12 18300     -1.149700e+02 -2.971900e+02\n6 18301     -3.184003e+01 -3.560300e+02\n12 18301     -2.551001e+01 -3.066800e+02\n6 18302     4.665002e+01 -3.620400e+02\n12 18302     5.217999e+01 -3.174500e+02\n6 18303     -1.709500e+02 -3.769000e+02\n12 18303     -1.563800e+02 -3.186500e+02\n6 18304     3.060300e+02 -4.070200e+02\n12 18304     3.226100e+02 -3.785400e+02\n6 18305     -1.729900e+02 -4.406400e+02\n12 18305     -1.645700e+02 -3.809100e+02\n6 18306     -5.616100e+02 -4.484800e+02\n15 18306     -5.443500e+02 -2.004900e+02\n6 18307     -5.510100e+02 -4.514399e+02\n15 18307     -5.373400e+02 -2.059600e+02\n6 18308     1.738700e+02 -4.545900e+02\n12 18308     1.765500e+02 -4.191300e+02\n6 18309     1.952800e+02 -4.570500e+02\n12 18309     2.006899e+02 -4.230000e+02\n6 18310     1.541400e+02 -4.608500e+02\n12 18310     1.571600e+02 -4.241000e+02\n6 18311     1.634000e+02 -4.626200e+02\n12 18311     1.668700e+02 -4.262800e+02\n6 18312     1.556300e+02 -4.689500e+02\n12 18312     1.585900e+02 -4.320400e+02\n6 18313     1.517800e+02 -4.696200e+02\n12 18313     1.540900e+02 -4.327700e+02\n6 18314     1.156800e+02 -4.763300e+02\n12 18314     1.176100e+02 -4.367400e+02\n6 18315     1.603000e+02 -4.780601e+02\n12 18315     1.630300e+02 -4.416000e+02\n6 18316     1.603000e+02 -4.780601e+02\n12 18316     1.630300e+02 -4.416000e+02\n6 18317     2.047998e+01 -4.842500e+02\n12 18317     2.034998e+01 -4.381100e+02\n6 18318     -4.114100e+02 -4.904200e+02\n12 18318     -3.890900e+02 -4.111000e+02\n6 18319     -4.154600e+02 -4.911600e+02\n12 18319     -3.926000e+02 -4.111100e+02\n6 18320     4.909100e+02 -4.972600e+02\n7 18320     3.192700e+02 -3.733600e+02\n10 18320     3.336801e+02 -4.561700e+02\n6 18321     -3.317900e+02 -5.266801e+02\n10 18321     -3.989700e+02 -2.667100e+02\n15 18321     -3.825200e+02 -3.426800e+02\n6 18322     -2.045300e+02 -5.288700e+02\n12 18322     -2.036800e+02 -4.649800e+02\n6 18323     -1.925500e+02 -5.341400e+02\n12 18323     -1.927200e+02 -4.709700e+02\n6 18324     -1.828300e+02 -5.338101e+02\n12 18324     -1.835800e+02 -4.716300e+02\n6 18325     -1.178600e+02 -5.499600e+02\n12 18325     -1.231500e+02 -4.927900e+02\n6 18326     -2.651500e+02 -5.634200e+02\n12 18326     -2.646900e+02 -4.941600e+02\n15 18326     -3.407500e+02 -4.008100e+02\n6 18327     4.404500e+02 -5.633700e+02\n7 18327     2.579399e+02 -4.234900e+02\n10 18327     2.517300e+02 -5.070800e+02\n6 18328     4.404500e+02 -5.633700e+02\n7 18328     2.579399e+02 -4.234900e+02\n6 18329     3.218600e+02 -5.656200e+02\n7 18329     1.581200e+02 -4.081300e+02\n6 18330     3.203200e+02 -5.716000e+02\n10 18330     1.349000e+02 -4.804000e+02\n12 18330     3.202800e+02 -5.476801e+02\n6 18331     2.887300e+02 -5.752400e+02\n10 18331     1.043400e+02 -4.750300e+02\n6 18332     5.142400e+02 -5.902800e+02\n10 18332     3.089301e+02 -5.565500e+02\n6 18333     5.822400e+02 -5.983000e+02\n10 18333     3.714600e+02 -5.860800e+02\n12 18333     5.922400e+02 -5.944800e+02\n6 18334     -2.363500e+02 -6.024301e+02\n15 18334     -3.331700e+02 -4.504900e+02\n6 18335     3.054500e+02 -6.032100e+02\n10 18335     1.071000e+02 -5.065300e+02\n6 18336     -2.778100e+02 -6.075500e+02\n15 18336     -3.724500e+02 -4.430000e+02\n6 18337     -2.778100e+02 -6.075500e+02\n15 18337     -3.724500e+02 -4.430000e+02\n6 18338     -9.550000e+01 -6.099399e+02\n15 18338     -2.072600e+02 -5.012300e+02\n6 18339     -2.586900e+02 -6.109200e+02\n15 18339     -3.571100e+02 -4.529600e+02\n6 18340     -9.869000e+01 -6.119500e+02\n15 18340     -2.113800e+02 -5.021400e+02\n6 18341     4.696801e+02 -6.140400e+02\n7 18341     2.679900e+02 -4.720100e+02\n10 18341     2.541200e+02 -5.668500e+02\n6 18342     5.492200e+02 -6.198300e+02\n7 18342     3.333900e+02 -4.890000e+02\n10 18342     3.278700e+02 -5.972500e+02\n12 18342     5.540400e+02 -6.146500e+02\n6 18343     4.545400e+02 -6.237700e+02\n7 18343     2.521500e+02 -4.780900e+02\n10 18343     2.345900e+02 -5.718900e+02\n6 18344     -2.496000e+02 -6.334900e+02\n7 18344     -3.095600e+02 -3.797100e+02\n9 18344     -1.275500e+02 -4.337200e+02\n6 18345     4.845800e+02 -6.391200e+02\n10 18345     2.554500e+02 -5.965000e+02\n6 18346     5.105100e+02 -6.398400e+02\n10 18346     2.798500e+02 -6.051100e+02\n6 18347     -4.909973e+00 -6.430100e+02\n12 18347     -2.353998e+01 -5.951801e+02\n6 18348     -4.123800e+02 -6.529301e+02\n10 18348     -5.115700e+02 -3.596300e+02\n15 18348     -5.140000e+02 -4.505601e+02\n6 18349     5.578600e+02 -6.536700e+02\n7 18349     3.310000e+02 -5.195300e+02\n6 18350     4.939399e+02 -6.602500e+02\n7 18350     2.749500e+02 -5.158000e+02\n6 18351     -9.167001e+01 -6.640800e+02\n7 18351     -1.990700e+02 -4.285400e+02\n6 18352     3.090300e+02 -6.657900e+02\n7 18352     1.194100e+02 -4.918199e+02\n6 18353     3.142000e+02 -6.772100e+02\n7 18353     1.203200e+02 -5.021400e+02\n6 18354     -4.299600e+02 -6.815100e+02\n10 18354     -5.364100e+02 -3.808400e+02\n15 18354     -5.425700e+02 -4.758300e+02\n6 18355     -2.386700e+02 -6.847100e+02\n7 18355     -3.143600e+02 -4.227200e+02\n10 18355     -3.911300e+02 -4.321801e+02\n15 18355     -3.756200e+02 -5.361100e+02\n6 18356     2.020000e+02 -6.889600e+02\n10 18356     -2.813000e+01 -5.590900e+02\n6 18357     5.213500e+02 -7.091600e+02\n7 18357     2.834800e+02 -5.619600e+02\n6 18358     3.423500e+02 -7.186200e+02\n7 18358     1.315700e+02 -5.419800e+02\n6 18359     3.757300e+02 -7.324800e+02\n7 18359     1.553600e+02 -5.590400e+02\n6 18360     2.230900e+02 -7.828600e+02\n7 18360     1.658002e+01 -5.764301e+02\n6 18361     -1.649800e+02 -8.003800e+02\n7 18361     -2.893700e+02 -5.267500e+02\n6 18362     4.239990e+00 -8.032400e+02\n7 18362     -1.612900e+02 -5.574500e+02\n6 18363     3.619995e+00 -8.103800e+02\n7 18363     -1.635100e+02 -5.627000e+02\n9 18363     1.159400e+02 -5.390900e+02\n10 18363     -2.500400e+02 -6.125200e+02\n6 18364     -5.284500e+02 8.440300e+02\n11 18364     1.341800e+02 -6.142999e+01\n6 18365     -5.284500e+02 8.440300e+02\n11 18365     1.341800e+02 -6.142999e+01\n6 18366     -3.504999e+01 8.407500e+02\n11 18366     5.335800e+02 -8.295001e+01\n6 18367     2.632200e+02 8.316000e+02\n8 18367     3.497300e+02 4.206200e+02\n9 18367     1.419900e+02 5.548000e+02\n6 18368     -1.652300e+02 8.034300e+02\n14 18368     6.136899e+02 -4.645001e+01\n6 18369     -4.770001e+01 7.990000e+02\n9 18369     -1.034300e+02 4.474900e+02\n6 18370     3.401500e+02 7.961900e+02\n8 18370     4.030900e+02 4.024800e+02\n6 18371     -2.384100e+02 7.854200e+02\n8 18371     8.900024e+00 3.477400e+02\n6 18372     -7.525000e+01 7.774200e+02\n11 18372     4.970500e+02 -1.222800e+02\n14 18372     6.945900e+02 -7.169000e+01\n6 18373     2.509100e+02 7.659900e+02\n8 18373     3.413100e+02 3.763500e+02\n6 18374     -3.739990e+00 7.645400e+02\n11 18374     5.604100e+02 -1.349800e+02\n6 18375     -2.686200e+02 7.600600e+02\n14 18375     5.183600e+02 -7.169000e+01\n6 18376     4.151400e+02 7.480600e+02\n8 18376     4.605601e+02 3.992100e+02\n6 18377     -3.549988e+00 7.478100e+02\n11 18377     5.599100e+02 -1.471100e+02\n6 18378     2.789900e+02 7.452100e+02\n8 18378     3.612300e+02 3.644900e+02\n9 18378     1.562200e+02 4.955900e+02\n11 18378     6.705699e+02 -1.812400e+02\n6 18379     -2.720700e+02 7.436700e+02\n14 18379     5.140900e+02 -8.316998e+01\n6 18380     -3.566500e+02 7.429200e+02\n9 18380     -3.124000e+02 4.404900e+02\n11 18380     2.595800e+02 -1.303800e+02\n6 18381     1.977500e+02 7.391400e+02\n8 18381     3.041300e+02 3.547700e+02\n6 18382     3.946300e+02 7.324800e+02\n9 18382     2.521100e+02 5.268900e+02\n6 18383     -2.058800e+02 7.280800e+02\n8 18383     2.882001e+01 3.070400e+02\n9 18383     -2.095000e+02 4.132800e+02\n6 18384     3.804200e+02 7.196900e+02\n8 18384     4.365500e+02 3.777900e+02\n6 18385     -2.488600e+02 7.144800e+02\n13 18385     3.690800e+02 2.814200e+02\n6 18386     1.971400e+02 7.075900e+02\n8 18386     3.045200e+02 3.329300e+02\n6 18387     -1.308600e+02 7.065700e+02\n14 18387     6.376899e+02 -1.243600e+02\n6 18388     -4.460200e+02 7.045700e+02\n14 18388     3.619399e+02 -9.865997e+01\n6 18389     1.640300e+02 7.038700e+02\n9 18389     7.288000e+01 4.532100e+02\n6 18390     3.173500e+02 7.033800e+02\n9 18390     1.863900e+02 4.701200e+02\n6 18391     4.719971e+00 6.962200e+02\n8 18391     1.667700e+02 2.649400e+02\n6 18392     5.317400e+02 6.960900e+02\n9 18392     3.539900e+02 5.157200e+02\n6 18393     -1.846002e+01 6.939700e+02\n9 18393     -8.192999e+01 3.692400e+02\n14 18393     7.428800e+02 -1.436900e+02\n6 18394     -3.689001e+01 6.918500e+02\n8 18394     1.401800e+02 2.671900e+02\n6 18395     -3.905900e+02 6.904200e+02\n13 18395     2.657400e+02 2.730400e+02\n14 18395     4.059900e+02 -1.145500e+02\n6 18396     -5.875900e+02 6.869500e+02\n8 18396     -2.239000e+02 3.184800e+02\n6 18397     4.421300e+02 6.870100e+02\n9 18397     2.892100e+02 4.995200e+02\n6 18398     4.421300e+02 6.870100e+02\n9 18398     2.892100e+02 4.995200e+02\n6 18399     -9.579999e+01 6.857800e+02\n9 18399     -1.343300e+02 3.711900e+02\n6 18400     -2.565900e+02 6.770000e+02\n8 18400     -6.369995e+00 2.791000e+02\n9 18400     -2.442300e+02 3.828000e+02\n6 18401     2.179500e+02 6.757400e+02\n8 18401     3.193300e+02 3.130700e+02\n9 18401     1.136200e+02 4.389500e+02\n11 18401     6.284301e+02 -2.273000e+02\n6 18402     -4.363600e+02 6.621400e+02\n14 18402     3.653000e+02 -1.325300e+02\n6 18403     -5.438200e+02 6.612800e+02\n8 18403     -1.966200e+02 2.986100e+02\n6 18404     3.940400e+02 6.604000e+02\n8 18404     4.479100e+02 3.369400e+02\n9 18404     2.552100e+02 4.749100e+02\n11 18404     7.205800e+02 -2.644200e+02\n6 18405     -1.448500e+02 6.596500e+02\n12 18405     1.916998e+01 6.188800e+02\n6 18406     3.677100e+02 6.579400e+02\n8 18406     4.288700e+02 3.331700e+02\n6 18407     -3.244400e+02 6.565200e+02\n9 18407     -2.905400e+02 3.741900e+02\n6 18408     4.008700e+02 6.563900e+02\n8 18408     4.528600e+02 3.347300e+02\n6 18409     4.397600e+02 6.543700e+02\n8 18409     4.798500e+02 3.352200e+02\n9 18409     2.890601e+02 4.752000e+02\n6 18410     -1.035100e+02 6.488200e+02\n8 18410     9.469000e+01 2.455600e+02\n6 18411     -1.266600e+02 6.394000e+02\n9 18411     -1.546400e+02 3.411100e+02\n12 18411     3.658002e+01 5.993600e+02\n6 18412     -1.434100e+02 6.354700e+02\n12 18412     2.010999e+01 5.968600e+02\n6 18413     -1.352900e+02 6.348500e+02\n12 18413     2.808002e+01 5.959500e+02\n6 18414     1.843400e+02 6.333400e+02\n9 18414     9.060999e+01 4.038100e+02\n6 18415     -1.422400e+02 6.321500e+02\n12 18415     2.209998e+01 5.940700e+02\n6 18416     -1.453000e+02 6.310900e+02\n12 18416     1.895001e+01 5.931400e+02\n6 18417     -1.386300e+02 6.299400e+02\n12 18417     2.490002e+01 5.918400e+02\n6 18418     4.484301e+02 6.248000e+02\n9 18418     2.972500e+02 4.557200e+02\n6 18419     3.551200e+02 6.188600e+02\n8 18419     4.210200e+02 3.052800e+02\n6 18420     5.050500e+02 6.175100e+02\n9 18420     3.393500e+02 4.564800e+02\n6 18421     -1.181600e+02 6.137000e+02\n12 18421     4.469000e+01 5.766400e+02\n6 18422     4.530900e+02 6.117500e+02\n12 18422     5.329100e+02 6.213500e+02\n6 18423     4.530900e+02 6.117500e+02\n12 18423     5.329100e+02 6.213500e+02\n6 18424     4.757900e+02 6.103600e+02\n9 18424     3.182900e+02 4.480000e+02\n12 18424     5.564301e+02 6.197100e+02\n6 18425     -5.665997e+01 6.057800e+02\n8 18425     1.255500e+02 2.110200e+02\n12 18425     1.047700e+02 5.658700e+02\n6 18426     4.367600e+02 6.038200e+02\n12 18426     5.190400e+02 6.125800e+02\n6 18427     -2.289000e+02 6.022600e+02\n12 18427     -6.312000e+01 5.707500e+02\n6 18428     -4.387100e+02 6.013600e+02\n8 18428     -1.296400e+02 2.478900e+02\n12 18428     -2.658100e+02 5.791300e+02\n6 18429     3.766700e+02 6.006300e+02\n9 18429     2.449600e+02 4.291300e+02\n6 18430     -9.720001e+01 5.956200e+02\n8 18430     9.825000e+01 2.081400e+02\n12 18430     6.504999e+01 5.587200e+02\n6 18431     4.496000e+02 5.948600e+02\n9 18431     3.001400e+02 4.329800e+02\n12 18431     5.316801e+02 6.029000e+02\n6 18432     4.607600e+02 5.918400e+02\n7 18432     4.855900e+02 5.708600e+02\n9 18432     3.079800e+02 4.323900e+02\n6 18433     4.961200e+02 5.902300e+02\n8 18433     5.235601e+02 2.951400e+02\n9 18433     3.345300e+02 4.354700e+02\n6 18434     4.848600e+02 5.892100e+02\n7 18434     5.047500e+02 5.666000e+02\n8 18434     5.152400e+02 2.935700e+02\n9 18434     3.261100e+02 4.334900e+02\n12 18434     5.652800e+02 5.994400e+02\n6 18435     4.495699e+02 5.826600e+02\n9 18435     3.002200e+02 4.247200e+02\n12 18435     5.316899e+02 5.914200e+02\n6 18436     1.906400e+02 5.810100e+02\n8 18436     3.008800e+02 2.457200e+02\n9 18436     9.695001e+01 3.664400e+02\n11 18436     6.095300e+02 -2.961300e+02\n12 18436     3.000100e+02 5.691500e+02\n6 18437     -5.111400e+02 5.757300e+02\n12 18437     -3.349500e+02 5.588800e+02\n6 18438     -1.915100e+02 5.750800e+02\n12 18438     -2.613000e+01 5.447300e+02\n14 18438     5.709100e+02 -2.242500e+02\n6 18439     -3.788500e+02 5.726900e+02\n9 18439     -3.286100e+02 3.187300e+02\n6 18440     3.270700e+02 5.582800e+02\n8 18440     3.982200e+02 2.383500e+02\n9 18440     2.004500e+02 3.658100e+02\n6 18441     -4.298700e+02 5.552800e+02\n12 18441     -2.569900e+02 5.366900e+02\n14 18441     3.584700e+02 -2.152100e+02\n6 18442     4.516801e+02 5.524900e+02\n7 18442     4.754301e+02 5.364900e+02\n12 18442     5.336400e+02 5.615200e+02\n6 18443     3.760200e+02 5.456900e+02\n8 18443     4.374100e+02 2.545700e+02\n9 18443     2.475100e+02 3.885900e+02\n12 18443     4.611000e+02 5.521300e+02\n6 18444     3.462600e+02 5.441500e+02\n9 18444     2.249000e+02 3.835900e+02\n6 18445     4.426700e+02 5.367800e+02\n7 18445     4.672900e+02 5.240500e+02\n10 18445     6.530800e+02 6.202200e+02\n6 18446     -3.004100e+02 5.333100e+02\n12 18446     -1.318600e+02 5.119100e+02\n6 18447     4.418800e+02 5.294700e+02\n8 18447     4.849301e+02 2.477700e+02\n12 18447     5.242200e+02 5.379500e+02\n6 18448     -4.255300e+02 5.278200e+02\n7 18448     -1.800500e+02 5.702800e+02\n6 18449     3.937100e+02 5.246200e+02\n9 18449     2.615900e+02 3.748000e+02\n6 18450     3.937100e+02 5.246200e+02\n9 18450     2.615900e+02 3.748000e+02\n12 18450     4.783600e+02 5.318500e+02\n6 18451     4.512100e+02 5.221300e+02\n9 18451     3.045300e+02 3.800600e+02\n6 18452     4.512100e+02 5.221300e+02\n9 18452     3.045300e+02 3.800600e+02\n6 18453     -3.093900e+02 5.188200e+02\n12 18453     -1.407700e+02 4.991800e+02\n6 18454     4.305200e+02 5.173300e+02\n10 18454     6.382300e+02 6.004800e+02\n12 18454     5.126600e+02 5.256400e+02\n6 18455     4.407900e+02 5.117800e+02\n10 18455     6.471000e+02 5.925900e+02\n12 18455     5.237100e+02 5.204300e+02\n6 18456     2.559100e+02 5.104700e+02\n9 18456     1.486700e+02 3.217900e+02\n6 18457     5.119000e+01 5.074100e+02\n7 18457     2.240800e+02 5.249300e+02\n6 18458     2.612800e+02 5.072700e+02\n7 18458     3.420400e+02 5.111800e+02\n8 18458     3.511000e+02 1.990000e+02\n6 18459     -1.810600e+02 5.047900e+02\n14 18459     5.744700e+02 -2.835300e+02\n6 18460     -5.625000e+02 5.041900e+02\n12 18460     -3.843100e+02 4.966300e+02\n6 18461     -5.625000e+02 5.041900e+02\n12 18461     -3.843100e+02 4.966300e+02\n6 18462     3.988900e+02 4.996600e+02\n10 18462     6.051300e+02 5.869200e+02\n6 18463     -4.437600e+02 4.964400e+02\n12 18463     -2.704200e+02 4.849700e+02\n6 18464     -2.110800e+02 4.925200e+02\n12 18464     -4.528998e+01 4.708000e+02\n6 18465     -5.415200e+02 4.854400e+02\n9 18465     -4.441400e+02 2.700000e+02\n12 18465     -3.643800e+02 4.787700e+02\n6 18466     2.146200e+02 4.854300e+02\n7 18466     3.055000e+02 4.964100e+02\n8 18466     3.180400e+02 1.802700e+02\n9 18466     1.181700e+02 2.979000e+02\n10 18466     4.734100e+02 6.123600e+02\n6 18467     -5.311000e+02 4.805300e+02\n12 18467     -3.547200e+02 4.738000e+02\n6 18468     -5.311000e+02 4.805300e+02\n12 18468     -3.547200e+02 4.738000e+02\n6 18469     3.440200e+02 4.747200e+02\n9 18469     2.266000e+02 3.310400e+02\n6 18470     3.362800e+02 4.713000e+02\n7 18470     3.789000e+02 4.750500e+02\n6 18471     -5.387600e+02 4.624000e+02\n12 18471     -3.619300e+02 4.579600e+02\n6 18472     -5.667700e+02 4.523000e+02\n12 18472     -3.887100e+02 4.498000e+02\n6 18473     -5.231200e+02 4.497900e+02\n12 18473     -3.511700e+02 4.477500e+02\n6 18474     -4.637000e+02 4.370700e+02\n12 18474     -2.900200e+02 4.320500e+02\n6 18475     -4.523600e+02 4.346600e+02\n7 18475     -2.065500e+02 4.987600e+02\n9 18475     -3.809000e+02 2.215900e+02\n6 18476     3.281400e+02 4.311900e+02\n12 18476     4.167300e+02 4.379400e+02\n6 18477     -4.727800e+02 4.307700e+02\n7 18477     -2.238100e+02 4.967700e+02\n9 18477     -3.951000e+02 2.203900e+02\n13 18477     1.861200e+02 1.110800e+02\n14 18477     3.076700e+02 -3.078400e+02\n6 18478     3.806600e+02 4.303700e+02\n9 18478     2.559100e+02 3.026600e+02\n6 18479     1.432800e+02 4.299200e+02\n10 18479     4.036899e+02 5.668800e+02\n12 18479     2.580100e+02 4.240300e+02\n6 18480     4.714100e+02 4.255200e+02\n8 18480     5.096100e+02 1.738700e+02\n9 18480     3.248500e+02 3.094700e+02\n6 18481     4.175000e+02 4.180300e+02\n9 18481     2.849700e+02 2.973500e+02\n12 18481     5.017900e+02 4.264600e+02\n6 18482     4.220800e+02 4.173100e+02\n10 18482     6.152000e+02 4.953800e+02\n15 18482     8.154900e+02 5.669800e+02\n6 18483     4.324000e+02 4.114600e+02\n12 18483     5.156801e+02 4.201700e+02\n6 18484     4.414700e+02 4.114100e+02\n7 18484     4.585500e+02 4.142900e+02\n8 18484     4.878400e+02 1.608000e+02\n6 18485     1.822800e+02 4.057800e+02\n7 18485     2.769000e+02 4.330500e+02\n8 18485     2.956500e+02 1.204800e+02\n10 18485     4.343900e+02 5.372800e+02\n12 18485     2.933199e+02 4.017800e+02\n6 18486     2.213500e+02 4.014000e+02\n12 18486     3.287100e+02 3.984000e+02\n6 18487     4.204700e+02 3.987900e+02\n7 18487     4.411300e+02 4.054000e+02\n10 18487     6.098600e+02 4.770000e+02\n6 18488     3.351900e+02 3.981400e+02\n7 18488     3.739800e+02 4.132700e+02\n8 18488     4.101700e+02 1.441800e+02\n9 18488     2.230699e+02 2.713500e+02\n12 18488     4.241600e+02 4.052100e+02\n6 18489     4.042000e+02 3.952700e+02\n7 18489     4.278600e+02 4.042100e+02\n8 18489     4.604399e+02 1.466200e+02\n6 18490     4.199600e+02 3.924400e+02\n12 18490     5.038400e+02 4.016000e+02\n6 18491     1.584200e+02 3.860000e+02\n7 18491     2.581700e+02 4.186200e+02\n6 18492     1.584200e+02 3.860000e+02\n7 18492     2.581700e+02 4.186200e+02\n6 18493     5.224301e+02 3.850900e+02\n12 18493     6.030400e+02 3.955000e+02\n6 18494     -4.277900e+02 3.816600e+02\n10 18494     -1.029400e+02 6.058000e+02\n12 18494     -2.554600e+02 3.803500e+02\n6 18495     4.433300e+02 3.818200e+02\n8 18495     4.887800e+02 1.396200e+02\n9 18495     3.064000e+02 2.727200e+02\n12 18495     5.265601e+02 3.909300e+02\n6 18496     2.729600e+02 3.803100e+02\n8 18496     3.609400e+02 1.077600e+02\n10 18496     5.096100e+02 4.955100e+02\n12 18496     3.761899e+02 3.788700e+02\n6 18497     1.339200e+02 3.780300e+02\n7 18497     2.397900e+02 4.139100e+02\n13 18497     6.041801e+02 2.101001e+01\n14 18497     8.382500e+02 -4.398600e+02\n15 18497     5.509700e+02 5.865400e+02\n6 18498     1.457800e+02 3.758200e+02\n7 18498     2.482400e+02 4.110600e+02\n15 18498     5.626200e+02 5.821000e+02\n6 18499     -5.044900e+02 3.682800e+02\n9 18499     -4.186000e+02 1.779100e+02\n6 18500     -2.033400e+02 3.560400e+02\n12 18500     -5.395001e+01 3.544700e+02\n6 18501     -4.074100e+02 3.553000e+02\n9 18501     -3.476200e+02 1.567700e+02\n6 18502     1.528100e+02 3.472500e+02\n7 18502     2.520500e+02 3.874600e+02\n14 18502     8.544800e+02 -4.714600e+02\n15 18502     5.659800e+02 5.478700e+02\n6 18503     -2.051500e+02 3.463300e+02\n12 18503     -5.639001e+01 3.461900e+02\n6 18504     4.241000e+02 3.445200e+02\n8 18504     4.764000e+02 1.102000e+02\n10 18504     6.059000e+02 4.205000e+02\n12 18504     5.078800e+02 3.540200e+02\n15 18504     8.062000e+02 4.770900e+02\n6 18505     4.305200e+02 3.419600e+02\n12 18505     5.141600e+02 3.507300e+02\n15 18505     8.127400e+02 4.726900e+02\n6 18506     -2.386000e+02 3.394400e+02\n10 18506     5.756000e+01 5.416800e+02\n12 18506     -8.726001e+01 3.407600e+02\n6 18507     -2.386000e+02 3.394400e+02\n10 18507     5.756000e+01 5.416800e+02\n12 18507     -8.726001e+01 3.407600e+02\n6 18508     -5.638500e+02 3.379900e+02\n14 18508     2.194399e+02 -3.703900e+02\n6 18509     -5.697000e+02 3.366900e+02\n11 18509     6.046997e+01 -3.751100e+02\n6 18510     -5.697000e+02 3.366900e+02\n12 18510     -3.912400e+02 3.452500e+02\n6 18511     1.440300e+02 3.350500e+02\n15 18511     5.553199e+02 5.352400e+02\n6 18512     4.697100e+02 3.349300e+02\n10 18512     6.450500e+02 4.007900e+02\n12 18512     5.522400e+02 3.447500e+02\n15 18512     8.544200e+02 4.543500e+02\n6 18513     1.510000e+02 3.343000e+02\n15 18513     5.621600e+02 5.327900e+02\n6 18514     -5.826400e+02 3.294400e+02\n9 18514     -4.759900e+02 1.530900e+02\n6 18515     -3.005700e+02 3.031200e+02\n7 18515     -1.026100e+02 3.868400e+02\n14 18515     4.322500e+02 -4.372400e+02\n6 18516     2.582100e+02 3.033800e+02\n12 18516     3.630500e+02 3.045100e+02\n6 18517     3.389000e+02 3.026600e+02\n8 18517     4.138200e+02 7.279001e+01\n12 18517     4.277400e+02 3.116000e+02\n6 18518     4.122500e+02 2.874800e+02\n12 18518     4.969900e+02 2.970300e+02\n6 18519     4.122500e+02 2.874800e+02\n12 18519     4.969900e+02 2.970300e+02\n6 18520     -5.453400e+02 2.863000e+02\n8 18520     -2.153600e+02 4.189001e+01\n6 18521     -5.210022e+00 2.819500e+02\n13 18521     4.902800e+02 -3.289001e+01\n14 18521     6.940200e+02 -5.053199e+02\n6 18522     4.174900e+02 2.744600e+02\n9 18522     2.915601e+02 1.857600e+02\n6 18523     3.899200e+02 2.705400e+02\n9 18523     2.708101e+02 1.795600e+02\n12 18523     4.761100e+02 2.802000e+02\n15 18523     7.571899e+02 3.944500e+02\n6 18524     -2.391400e+02 2.570400e+02\n10 18524     1.839001e+01 4.598300e+02\n11 18524     2.642500e+02 -4.804300e+02\n6 18525     -2.681000e+02 2.560600e+02\n11 18525     2.440100e+02 -4.767000e+02\n6 18526     -2.432200e+02 2.540300e+02\n14 18526     4.703400e+02 -4.892200e+02\n6 18527     -2.502200e+02 2.491600e+02\n10 18527     5.460022e+00 4.537800e+02\n12 18527     -1.127000e+02 2.631400e+02\n6 18528     4.574301e+02 2.475700e+02\n12 18528     5.403300e+02 2.571500e+02\n6 18529     5.567800e+02 2.399300e+02\n9 18529     3.991000e+02 1.775200e+02\n12 18529     6.354000e+02 2.502900e+02\n6 18530     3.173500e+02 2.385400e+02\n10 18530     4.958500e+02 3.384100e+02\n6 18531     3.173500e+02 2.385400e+02\n7 18531     3.514700e+02 2.808900e+02\n10 18531     4.958500e+02 3.384100e+02\n12 18531     4.076000e+02 2.483400e+02\n15 18531     6.767100e+02 3.759700e+02\n6 18532     -4.807500e+02 2.343000e+02\n10 18532     -1.964800e+02 4.728100e+02\n15 18532     -1.400100e+02 5.186600e+02\n6 18533     -2.897400e+02 2.306500e+02\n10 18533     -3.638000e+01 4.417900e+02\n6 18534     -7.066998e+01 2.252900e+02\n14 18534     5.592300e+02 -5.489301e+02\n6 18535     -3.086700e+02 2.215600e+02\n14 18535     4.066700e+02 -5.063900e+02\n6 18536     4.530900e+02 2.200700e+02\n8 18536     4.993101e+02 1.729001e+01\n9 18536     3.221100e+02 1.474700e+02\n10 18536     6.133500e+02 2.884200e+02\n12 18536     5.363000e+02 2.299800e+02\n13 18536     8.273500e+02 -1.340500e+02\n6 18537     -2.975500e+02 2.130000e+02\n7 18537     -1.247000e+02 3.148400e+02\n10 18537     -5.154999e+01 4.256500e+02\n11 18537     2.051300e+02 -5.043800e+02\n14 18537     4.139900e+02 -5.161100e+02\n6 18538     5.599100e+02 2.112600e+02\n8 18538     5.798400e+02 1.737000e+01\n10 18538     7.112500e+02 2.538500e+02\n12 18538     6.393600e+02 2.205700e+02\n6 18539     5.599100e+02 2.112600e+02\n8 18539     5.798400e+02 1.737000e+01\n6 18540     -2.540800e+02 2.100100e+02\n7 18540     -9.204999e+01 3.090200e+02\n10 18540     -1.559003e+01 4.158200e+02\n14 18540     4.505400e+02 -5.265000e+02\n6 18541     3.893900e+02 2.094700e+02\n15 18541     7.487200e+02 3.243400e+02\n6 18542     3.429700e+02 2.049200e+02\n7 18542     3.691801e+02 2.506700e+02\n6 18543     -1.249800e+02 2.014400e+02\n14 18543     5.063400e+02 -5.606400e+02\n6 18544     4.360900e+02 1.959700e+02\n8 18544     4.869800e+02 -2.299988e+00\n6 18545     3.652900e+02 1.816000e+02\n12 18545     4.531200e+02 1.921700e+02\n6 18546     -3.678500e+02 1.807800e+02\n10 18546     -1.259700e+02 4.052300e+02\n6 18547     5.174900e+02 1.776600e+02\n8 18547     5.491100e+02 -1.123001e+01\n9 18547     3.735000e+02 1.224700e+02\n6 18548     5.155200e+02 1.750900e+02\n8 18548     5.477400e+02 -1.353000e+01\n12 18548     5.959500e+02 1.846500e+02\n6 18549     5.155200e+02 1.750900e+02\n15 18549     8.792800e+02 2.496700e+02\n6 18550     5.563500e+02 1.747500e+02\n8 18550     5.777400e+02 -1.145999e+01\n9 18550     4.028400e+02 1.252100e+02\n6 18551     5.563500e+02 1.747500e+02\n8 18551     5.777400e+02 -1.145999e+01\n9 18551     4.028400e+02 1.252100e+02\n6 18552     5.787600e+02 1.672700e+02\n12 18552     6.571700e+02 1.768800e+02\n6 18553     3.789000e+02 1.634100e+02\n12 18553     4.657400e+02 1.743800e+02\n6 18554     -1.256000e+02 1.583600e+02\n12 18554     -9.265997e+01 2.116300e+02\n6 18555     -3.971300e+02 1.561000e+02\n12 18555     -2.602600e+02 1.848300e+02\n6 18556     -1.341000e+02 1.516300e+02\n12 18556     -1.009800e+02 2.053900e+02\n6 18557     3.883400e+02 1.477600e+02\n12 18557     4.747200e+02 1.592900e+02\n6 18558     3.789000e+02 1.475500e+02\n15 18558     7.280300e+02 2.546200e+02\n6 18559     5.585900e+02 1.426300e+02\n12 18559     6.374000e+02 1.519800e+02\n6 18560     5.286300e+02 1.402800e+02\n8 18560     5.581801e+02 -3.998999e+01\n9 18560     3.845500e+02 9.364999e+01\n10 18560     6.710500e+02 1.914900e+02\n12 18560     6.084301e+02 1.500500e+02\n6 18561     5.337300e+02 1.314900e+02\n12 18561     6.134900e+02 1.414600e+02\n6 18562     -2.305700e+02 1.306100e+02\n13 18562     2.706801e+02 -1.158800e+02\n6 18563     -2.305700e+02 1.306100e+02\n13 18563     2.706801e+02 -1.158800e+02\n6 18564     5.345300e+02 1.280600e+02\n12 18564     6.137600e+02 1.380000e+02\n6 18565     -2.349000e+02 1.270800e+02\n12 18565     -1.743900e+02 1.743500e+02\n13 18565     2.680100e+02 -1.177800e+02\n6 18566     -2.311800e+02 1.267500e+02\n13 18566     2.700900e+02 -1.185300e+02\n6 18567     1.805900e+02 1.191000e+02\n13 18567     5.505900e+02 -1.765500e+02\n6 18568     -4.062200e+02 1.158100e+02\n13 18568     1.807100e+02 -1.030000e+02\n14 18568     2.979600e+02 -5.813300e+02\n6 18569     -2.936400e+02 1.104400e+02\n7 18569     -2.178300e+02 2.237500e+02\n12 18569     -2.244100e+02 1.579800e+02\n15 18569     -1.561400e+02 3.210600e+02\n6 18570     4.993400e+02 1.074400e+02\n8 18570     5.359301e+02 -6.764001e+01\n10 18570     6.389800e+02 1.673300e+02\n15 18570     8.509301e+02 1.747700e+02\n6 18571     2.017999e+01 1.035500e+02\n8 18571     1.929600e+02 3.331000e+01\n10 18571     -2.204999e+01 2.139500e+02\n15 18571     4.790997e+01 2.239500e+02\n6 18572     -2.388300e+02 9.859998e+01\n12 18572     -1.844800e+02 1.485700e+02\n6 18573     -2.394200e+02 9.475000e+01\n7 18573     -1.935800e+02 2.042500e+02\n12 18573     -1.858300e+02 1.454600e+02\n6 18574     1.292000e+02 9.256000e+01\n12 18574     1.504300e+02 1.426100e+02\n6 18575     -2.552000e+02 9.140002e+01\n7 18575     -2.069300e+02 2.029200e+02\n12 18575     -2.016000e+02 1.424700e+02\n15 18575     -1.544100e+02 2.861600e+02\n6 18576     -3.216100e+02 9.045001e+01\n12 18576     -2.549800e+02 1.406500e+02\n6 18577     5.561100e+02 9.057001e+01\n12 18577     6.344500e+02 1.003800e+02\n6 18578     4.733002e+01 8.851001e+01\n12 18578     6.534003e+01 1.417000e+02\n6 18579     5.327700e+02 8.734998e+01\n12 18579     6.119200e+02 9.712000e+01\n6 18580     3.584300e+02 8.446002e+01\n7 18580     3.116100e+02 1.376700e+02\n6 18581     -3.151001e+01 8.371002e+01\n12 18581     -1.309003e+01 1.386500e+02\n6 18582     2.248200e+02 8.137000e+01\n10 18582     1.885300e+02 1.544300e+02\n12 18582     2.547800e+02 1.254000e+02\n6 18583     9.975000e+01 7.846002e+01\n12 18583     1.187000e+02 1.298900e+02\n6 18584     2.013500e+02 7.671997e+01\n12 18584     2.279500e+02 1.224600e+02\n6 18585     5.754301e+02 7.613000e+01\n9 18585     4.233500e+02 4.929999e+01\n6 18586     2.028100e+02 7.334003e+01\n8 18586     3.341300e+02 2.010010e+00\n6 18587     1.520100e+02 7.253998e+01\n12 18587     1.737300e+02 1.215900e+02\n6 18588     -1.807001e+01 6.348999e+01\n12 18588     -2.179993e+00 1.179200e+02\n6 18589     -3.286400e+02 5.533002e+01\n7 18589     -2.625200e+02 1.809000e+02\n12 18589     -2.692300e+02 1.092600e+02\n6 18590     5.292999e+01 5.328003e+01\n12 18590     6.831000e+01 1.057800e+02\n6 18591     -2.300600e+02 5.267999e+01\n12 18591     -1.866500e+02 1.062500e+02\n6 18592     5.607600e+02 4.919000e+01\n9 18592     4.137400e+02 2.509003e+01\n6 18593     2.084998e+01 4.828998e+01\n12 18593     3.603003e+01 1.022300e+02\n6 18594     2.872998e+01 4.810999e+01\n12 18594     4.314001e+01 1.014100e+02\n6 18595     3.775000e+01 4.703003e+01\n8 18595     2.064700e+02 -7.209991e+00\n6 18596     -2.346200e+02 4.576001e+01\n12 18596     -1.922700e+02 9.959003e+01\n6 18597     -2.951400e+02 4.171002e+01\n7 18597     -2.420100e+02 1.660900e+02\n12 18597     -2.417000e+02 9.534998e+01\n6 18598     -2.982800e+02 3.878998e+01\n12 18598     -2.441900e+02 9.284003e+01\n6 18599     2.117999e+01 3.875000e+01\n12 18599     3.550000e+01 9.213000e+01\n6 18600     2.117999e+01 3.875000e+01\n12 18600     3.550000e+01 9.213000e+01\n6 18601     2.159600e+02 3.721002e+01\n7 18601     1.380600e+02 1.047100e+02\n8 18601     3.438900e+02 -2.578000e+01\n13 18601     5.683101e+02 -2.430500e+02\n6 18602     2.169300e+02 2.946002e+01\n7 18602     1.384100e+02 9.798001e+01\n6 18603     -3.331800e+02 2.141998e+01\n12 18603     -2.814400e+02 7.779999e+01\n6 18604     -2.220500e+02 9.030029e+00\n12 18604     -1.885700e+02 6.540997e+01\n6 18605     -1.587900e+02 9.070007e+00\n8 18605     5.213000e+01 -4.338000e+01\n6 18606     -1.705900e+02 6.770020e+00\n12 18606     -1.462500e+02 6.360999e+01\n6 18607     -1.866800e+02 4.340027e+00\n9 18607     -1.140400e+02 7.283002e+01\n6 18608     -4.679999e+01 -2.820007e+00\n12 18608     -3.352002e+01 5.197998e+01\n6 18609     -2.363100e+02 -7.000000e+00\n10 18609     -2.391800e+02 1.657700e+02\n15 18609     -2.012600e+02 1.642500e+02\n6 18610     -1.527900e+02 -1.435999e+01\n8 18610     5.628998e+01 -6.133002e+01\n6 18611     -1.527900e+02 -1.435999e+01\n12 18611     -1.318700e+02 4.196002e+01\n6 18612     -3.932001e+01 -1.469000e+01\n8 18612     1.457900e+02 -5.437000e+01\n10 18612     -1.004500e+02 1.124400e+02\n15 18612     -4.225000e+01 1.046600e+02\n6 18613     2.134800e+02 -1.642999e+01\n8 18613     3.428600e+02 -6.637000e+01\n6 18614     -1.906000e+01 -1.740002e+01\n12 18614     -7.080017e+00 3.612000e+01\n6 18615     3.203000e+02 -1.753998e+01\n12 18615     3.529900e+02 1.916998e+01\n6 18616     -3.131000e+02 -1.971997e+01\n15 18616     -2.586900e+02 1.710500e+02\n6 18617     -2.838900e+02 -2.302002e+01\n12 18617     -2.449200e+02 3.481000e+01\n6 18618     -1.711700e+02 -2.966998e+01\n12 18618     -1.482000e+02 2.689001e+01\n6 18619     4.419983e+00 -2.992999e+01\n8 18619     1.800700e+02 -6.523999e+01\n6 18620     -1.194600e+02 -3.094000e+01\n8 18620     8.239001e+01 -7.102002e+01\n6 18621     2.199600e+02 -3.246002e+01\n8 18621     3.480100e+02 -8.006000e+01\n6 18622     1.927000e+02 -3.509003e+01\n8 18622     3.273000e+02 -7.841998e+01\n6 18623     3.869995e+00 -3.595001e+01\n12 18623     1.463000e+01 1.690997e+01\n6 18624     -1.635200e+02 -3.628003e+01\n12 18624     -1.418900e+02 2.034998e+01\n6 18625     -1.638600e+02 -4.284003e+01\n12 18625     -1.440100e+02 1.429999e+01\n6 18626     -5.496997e+01 -4.556000e+01\n12 18626     -4.356000e+01 8.359985e+00\n6 18627     1.224200e+02 -4.871997e+01\n12 18627     1.368500e+02 -9.500122e-01\n6 18628     -2.281600e+02 -5.123999e+01\n12 18628     -2.035100e+02 7.039978e+00\n6 18629     1.457800e+02 -6.653003e+01\n8 18629     2.913900e+02 -9.990002e+01\n6 18630     1.098700e+02 -7.313000e+01\n8 18630     2.624400e+02 -1.019600e+02\n12 18630     1.226400e+02 -2.565997e+01\n6 18631     -3.377002e+01 -7.488000e+01\n12 18631     -2.285999e+01 -2.167999e+01\n6 18632     -4.440500e+02 -7.770001e+01\n13 18632     1.191000e+02 -2.284300e+02\n6 18633     9.410999e+01 -8.745001e+01\n8 18633     2.502000e+02 -1.132600e+02\n6 18634     -5.053998e+01 -9.047998e+01\n12 18634     -4.162000e+01 -3.653998e+01\n6 18635     -2.918800e+02 -9.090997e+01\n12 18635     -2.680700e+02 -2.881000e+01\n6 18636     2.518200e+02 -9.121997e+01\n12 18636     2.710900e+02 -5.098999e+01\n6 18637     3.621200e+02 -9.179999e+01\n10 18637     2.892900e+02 -4.596997e+01\n12 18637     3.895100e+02 -5.845001e+01\n6 18638     1.952000e+02 -9.746997e+01\n12 18638     2.090699e+02 -5.458002e+01\n6 18639     -5.590027e+00 -1.000700e+02\n7 18639     -7.316998e+01 1.101001e+01\n12 18639     2.049988e+00 -4.796997e+01\n15 18639     -2.803003e+01 -3.900146e-01\n6 18640     4.052600e+02 -1.006400e+02\n12 18640     4.387400e+02 -7.012000e+01\n6 18641     -9.204999e+01 -1.016100e+02\n8 18641     1.021200e+02 -1.178800e+02\n12 18641     -8.529999e+01 -4.545001e+01\n6 18642     -1.090002e+01 -1.039300e+02\n10 18642     -9.659003e+01 2.020001e+01\n6 18643     5.410999e+01 -1.080900e+02\n8 18643     2.187400e+02 -1.251200e+02\n12 18643     6.069000e+01 -5.928003e+01\n15 18643     2.895001e+01 -2.703998e+01\n6 18644     1.307700e+02 -1.104400e+02\n12 18644     1.401600e+02 -6.446002e+01\n6 18645     -2.845200e+02 -1.124700e+02\n12 18645     -2.654300e+02 -4.996002e+01\n6 18646     2.494400e+02 -1.134300e+02\n8 18646     3.726600e+02 -1.405100e+02\n15 18646     2.660800e+02 -7.860999e+01\n6 18647     7.714001e+01 -1.150800e+02\n12 18647     8.364001e+01 -6.654999e+01\n6 18648     4.013700e+02 -1.165400e+02\n12 18648     4.347300e+02 -8.667999e+01\n6 18649     2.548200e+02 -1.170400e+02\n7 18649     1.527100e+02 -3.240997e+01\n13 18649     5.797700e+02 -3.656700e+02\n15 18649     2.731600e+02 -8.382001e+01\n6 18650     3.786800e+02 -1.190700e+02\n12 18650     4.103900e+02 -8.829999e+01\n6 18651     -2.309003e+01 -1.212100e+02\n8 18651     1.573200e+02 -1.325500e+02\n6 18652     1.170200e+02 -1.260300e+02\n12 18652     1.244500e+02 -7.988000e+01\n6 18653     -2.127200e+02 -1.281500e+02\n12 18653     -1.996700e+02 -6.801001e+01\n6 18654     -7.856000e+01 -1.296300e+02\n8 18654     1.127600e+02 -1.409500e+02\n6 18655     -4.734300e+02 -1.380699e+02\n7 18655     -3.462600e+02 4.826001e+01\n10 18655     -3.488500e+02 1.207900e+02\n15 18655     -3.195800e+02 1.077800e+02\n6 18656     6.862000e+01 -1.390400e+02\n8 18656     2.303700e+02 -1.485600e+02\n10 18656     -3.334003e+01 -3.121997e+01\n12 18656     7.396002e+01 -9.073999e+01\n15 18656     3.678998e+01 -6.438000e+01\n6 18657     3.732400e+02 -1.469800e+02\n12 18657     4.061200e+02 -1.150800e+02\n6 18658     3.218900e+02 -1.472300e+02\n12 18658     3.398500e+02 -1.122800e+02\n6 18659     3.138900e+02 -1.543500e+02\n8 18659     4.257300e+02 -1.701100e+02\n10 18659     2.057200e+02 -1.031100e+02\n12 18659     3.305900e+02 -1.189300e+02\n15 18659     3.189500e+02 -1.479700e+02\n6 18660     3.188000e+02 -1.551600e+02\n8 18660     4.295601e+02 -1.707500e+02\n6 18661     3.617500e+02 -1.595400e+02\n12 18661     3.919100e+02 -1.284400e+02\n6 18662     -1.919800e+02 -1.681500e+02\n12 18662     -1.862600e+02 -1.080300e+02\n6 18663     -1.349200e+02 -1.765000e+02\n10 18663     -2.228200e+02 -2.059003e+01\n12 18663     -1.342200e+02 -1.188700e+02\n15 18663     -1.837600e+02 -5.303003e+01\n6 18664     -7.741998e+01 -1.850500e+02\n10 18664     -1.767400e+02 -4.195001e+01\n12 18664     -7.781000e+01 -1.306500e+02\n6 18665     1.100100e+02 -1.855000e+02\n12 18665     1.132500e+02 -1.407500e+02\n6 18666     4.794000e+01 -1.922900e+02\n12 18666     4.826001e+01 -1.438800e+02\n6 18667     2.289800e+02 -1.929100e+02\n7 18667     1.103800e+02 -9.656000e+01\n12 18667     2.374500e+02 -1.541300e+02\n6 18668     -7.009998e+01 -1.943900e+02\n7 18668     -1.430200e+02 -6.170001e+01\n12 18668     -7.287000e+01 -1.399500e+02\n6 18669     2.603200e+02 -2.055000e+02\n9 18669     2.626100e+02 -5.651001e+01\n12 18669     2.736000e+02 -1.690400e+02\n6 18670     5.029999e+01 -2.084800e+02\n7 18670     -4.921997e+01 -8.901001e+01\n12 18670     4.665002e+01 -1.601100e+02\n6 18671     2.538100e+02 -2.141500e+02\n9 18671     2.578600e+02 -6.440002e+01\n12 18671     2.665000e+02 -1.780100e+02\n6 18672     3.526200e+02 -2.160900e+02\n12 18672     3.822700e+02 -1.869000e+02\n6 18673     -1.487700e+02 -2.173000e+02\n12 18673     -1.458000e+02 -1.594000e+02\n6 18674     2.448500e+02 -2.191100e+02\n7 18674     1.277900e+02 -1.185100e+02\n6 18675     3.529600e+02 -2.202200e+02\n12 18675     3.840200e+02 -1.921900e+02\n6 18676     6.849976e+00 -2.222400e+02\n7 18676     -8.969000e+01 -9.578998e+01\n12 18676     -4.500122e-01 -1.719200e+02\n6 18677     2.149300e+02 -2.257300e+02\n12 18677     2.232600e+02 -1.877400e+02\n6 18678     2.509700e+02 -2.283400e+02\n12 18678     2.641700e+02 -1.927400e+02\n6 18679     2.933000e+02 -2.328300e+02\n12 18679     3.117300e+02 -1.999300e+02\n6 18680     5.165997e+01 -2.467000e+02\n7 18680     -4.602002e+01 -1.197200e+02\n12 18680     5.081000e+01 -2.003200e+02\n6 18681     -5.973999e+01 -2.489399e+02\n12 18681     -5.934003e+01 -1.962800e+02\n15 18681     -1.138100e+02 -1.472000e+02\n6 18682     6.014001e+01 -2.493500e+02\n7 18682     -3.928003e+01 -1.226500e+02\n8 18682     2.226900e+02 -2.355800e+02\n9 18682     1.096500e+02 -9.103998e+01\n6 18683     4.588000e+01 -2.510800e+02\n8 18683     2.116900e+02 -2.365500e+02\n6 18684     4.588000e+01 -2.510800e+02\n8 18684     2.116900e+02 -2.365500e+02\n6 18685     9.439001e+01 -2.653900e+02\n12 18685     9.582001e+01 -2.219000e+02\n13 18685     4.314500e+02 -4.483400e+02\n6 18686     9.439001e+01 -2.653900e+02\n12 18686     9.582001e+01 -2.219000e+02\n13 18686     4.314500e+02 -4.483400e+02\n6 18687     2.127400e+02 -2.664399e+02\n8 18687     3.441400e+02 -2.623200e+02\n9 18687     2.279100e+02 -1.113000e+02\n12 18687     2.231300e+02 -2.296900e+02\n6 18688     2.798999e+01 -2.683600e+02\n8 18688     1.963700e+02 -2.521300e+02\n9 18688     8.402002e+01 -1.106800e+02\n12 18688     2.741998e+01 -2.210700e+02\n6 18689     -2.080300e+02 -2.804301e+02\n8 18689     4.820007e+00 -2.716200e+02\n9 18689     -1.191900e+02 -1.547000e+02\n6 18690     -2.209003e+01 -2.877500e+02\n12 18690     -2.128998e+01 -2.377400e+02\n15 18690     -7.640997e+01 -1.962800e+02\n6 18691     -1.538900e+02 -2.878900e+02\n13 18691     2.526801e+02 -4.203400e+02\n6 18692     2.377300e+02 -2.909900e+02\n12 18692     2.519600e+02 -2.565200e+02\n6 18693     2.356900e+02 -2.942300e+02\n12 18693     2.488500e+02 -2.593500e+02\n6 18694     -1.536500e+02 -2.943800e+02\n12 18694     -1.463100e+02 -2.370500e+02\n6 18695     -1.501400e+02 -2.961600e+02\n7 18695     -1.939500e+02 -1.283200e+02\n8 18695     5.116998e+01 -2.817200e+02\n9 18695     -6.628998e+01 -1.587100e+02\n10 18695     -2.270300e+02 -1.158500e+02\n13 18695     2.550800e+02 -4.269500e+02\n6 18696     2.472600e+02 -2.970000e+02\n12 18696     2.619000e+02 -2.629300e+02\n6 18697     -1.966000e+02 -2.981200e+02\n8 18697     1.341998e+01 -2.880100e+02\n12 18697     -1.804500e+02 -2.394400e+02\n6 18698     7.690002e+01 -3.045800e+02\n8 18698     2.354500e+02 -2.881300e+02\n6 18699     6.209998e+01 -3.061200e+02\n8 18699     2.234400e+02 -2.886600e+02\n9 18699     1.116300e+02 -1.475500e+02\n6 18700     -8.954999e+01 -3.094600e+02\n12 18700     -8.460999e+01 -2.563600e+02\n6 18701     -8.954999e+01 -3.094600e+02\n7 18701     -1.504900e+02 -1.473000e+02\n13 18701     2.949500e+02 -4.469399e+02\n6 18702     2.252600e+02 -3.107500e+02\n8 18702     3.535100e+02 -3.043400e+02\n12 18702     2.384301e+02 -2.761000e+02\n6 18703     -5.782700e+02 -3.177200e+02\n15 18703     -4.984400e+02 -6.052002e+01\n6 18704     2.957500e+02 -3.176300e+02\n12 18704     3.147900e+02 -2.874700e+02\n6 18705     5.822998e+01 -3.207300e+02\n12 18705     6.158002e+01 -2.764400e+02\n6 18706     -3.303003e+01 -3.232000e+02\n8 18706     1.451100e+02 -3.036100e+02\n6 18707     2.033600e+02 -3.290400e+02\n8 18707     3.352200e+02 -3.189300e+02\n6 18708     1.037900e+02 -3.308000e+02\n12 18708     1.083300e+02 -2.895900e+02\n6 18709     -5.392900e+02 -3.364700e+02\n7 18709     -4.432300e+02 -1.033900e+02\n8 18709     -2.517300e+02 -3.275700e+02\n6 18710     -7.673999e+01 -3.390800e+02\n9 18710     -3.909973e+00 -1.892100e+02\n12 18710     -7.138000e+01 -2.867700e+02\n6 18711     -7.673999e+01 -3.390800e+02\n12 18711     -7.138000e+01 -2.867700e+02\n6 18712     8.362000e+01 -3.399500e+02\n8 18712     2.392700e+02 -3.201100e+02\n6 18713     1.981100e+02 -3.460300e+02\n8 18713     3.310800e+02 -3.344400e+02\n12 18713     2.102200e+02 -3.102300e+02\n6 18714     2.986000e+02 -3.623800e+02\n12 18714     3.199800e+02 -3.309100e+02\n6 18715     2.759998e+01 -3.647600e+02\n12 18715     3.287000e+01 -3.190100e+02\n6 18716     -1.212000e+02 -3.705500e+02\n9 18716     -4.201001e+01 -2.274200e+02\n6 18717     1.345300e+02 -3.865500e+02\n12 18717     1.433300e+02 -3.475600e+02\n15 18717     9.778998e+01 -3.372500e+02\n6 18718     1.473800e+02 -3.959399e+02\n12 18718     1.568200e+02 -3.584900e+02\n6 18719     2.107400e+02 -4.026899e+02\n9 18719     2.356500e+02 -2.277400e+02\n6 18720     2.271997e+01 -4.089700e+02\n15 18720     -2.075000e+01 -3.261500e+02\n6 18721     -1.533600e+02 -4.237800e+02\n12 18721     -1.481100e+02 -3.658100e+02\n6 18722     -1.784200e+02 -4.289399e+02\n7 18722     -2.223200e+02 -2.275400e+02\n6 18723     1.764600e+02 -4.357300e+02\n12 18723     1.781700e+02 -4.003400e+02\n6 18724     -4.746300e+02 -4.473500e+02\n7 18724     -4.258800e+02 -1.994500e+02\n6 18725     1.950012e+00 -4.526899e+02\n12 18725     -1.210022e+00 -4.057600e+02\n6 18726     -5.455100e+02 -4.563101e+02\n10 18726     -5.322500e+02 -1.540100e+02\n15 18726     -5.347700e+02 -2.123800e+02\n6 18727     1.606800e+02 -4.599200e+02\n12 18727     1.638700e+02 -4.232800e+02\n6 18728     1.688700e+02 -4.624600e+02\n12 18728     1.720500e+02 -4.261600e+02\n6 18729     1.374800e+02 -4.672200e+02\n12 18729     1.413600e+02 -4.292200e+02\n6 18730     5.000000e-01 -4.761200e+02\n12 18730     -9.199829e-01 -4.287500e+02\n6 18731     1.778900e+02 -4.766000e+02\n12 18731     1.810900e+02 -4.413600e+02\n6 18732     1.731600e+02 -4.803800e+02\n12 18732     1.765700e+02 -4.447700e+02\n6 18733     1.276001e+01 -4.876600e+02\n12 18733     1.203003e+01 -4.407800e+02\n6 18734     -1.969971e+00 -4.882100e+02\n12 18734     -2.469971e+00 -4.403300e+02\n6 18735     7.500000e+00 -4.880900e+02\n12 18735     7.140015e+00 -4.408900e+02\n6 18736     7.500000e+00 -4.880900e+02\n12 18736     7.140015e+00 -4.408900e+02\n6 18737     4.956801e+02 -5.010699e+02\n7 18737     3.222500e+02 -3.775500e+02\n10 18737     3.364100e+02 -4.609100e+02\n12 18737     5.123800e+02 -4.863300e+02\n6 18738     -1.881800e+02 -5.323300e+02\n12 18738     -1.881300e+02 -4.698600e+02\n6 18739     4.515000e+02 -5.344200e+02\n7 18739     2.754301e+02 -4.001100e+02\n9 18739     4.354301e+02 -3.248700e+02\n6 18740     4.358199e+02 -5.374200e+02\n10 18740     2.604100e+02 -4.801500e+02\n6 18741     1.424700e+02 -5.557300e+02\n10 18741     -2.503998e+01 -4.179500e+02\n6 18742     -3.524800e+02 -5.650900e+02\n15 18742     -4.196900e+02 -3.776800e+02\n6 18743     -2.639400e+02 -5.863800e+02\n15 18743     -3.511600e+02 -4.248700e+02\n6 18744     4.774301e+02 -5.966801e+02\n7 18744     2.795400e+02 -4.582600e+02\n6 18745     -3.358000e+02 -5.993900e+02\n7 18745     -3.642800e+02 -3.398500e+02\n15 18745     -4.210400e+02 -4.177500e+02\n6 18746     -2.727700e+02 -6.054200e+02\n7 18746     -3.190900e+02 -3.537800e+02\n15 18746     -3.669900e+02 -4.425000e+02\n6 18747     5.772300e+02 -6.144700e+02\n7 18747     3.586500e+02 -4.884600e+02\n6 18748     -2.826900e+02 -6.162100e+02\n7 18748     -3.289700e+02 -3.609100e+02\n10 18748     -3.964700e+02 -3.591400e+02\n15 18748     -3.813000e+02 -4.509900e+02\n6 18749     3.307100e+02 -6.220100e+02\n7 18749     1.497600e+02 -4.578800e+02\n10 18749     1.203100e+02 -5.322400e+02\n12 18749     3.236300e+02 -6.002300e+02\n6 18750     5.297800e+02 -6.243000e+02\n10 18750     3.062500e+02 -5.955800e+02\n6 18751     5.047400e+02 -6.388300e+02\n7 18751     2.895400e+02 -4.985000e+02\n10 18751     2.743101e+02 -6.019900e+02\n6 18752     4.059400e+02 -6.426500e+02\n7 18752     2.064500e+02 -4.866899e+02\n6 18753     5.170601e+02 -6.451801e+02\n7 18753     2.987100e+02 -5.059500e+02\n6 18754     2.342600e+02 -6.465601e+02\n12 18754     2.197700e+02 -6.187200e+02\n6 18755     3.723400e+02 -6.602800e+02\n7 18755     1.730300e+02 -4.968900e+02\n6 18756     3.881200e+02 -6.631801e+02\n7 18756     1.857500e+02 -5.015900e+02\n6 18757     3.586700e+02 -6.711100e+02\n7 18757     1.589500e+02 -5.044399e+02\n10 18757     1.216900e+02 -5.889900e+02\n6 18758     3.586700e+02 -6.711100e+02\n7 18758     1.589500e+02 -5.044399e+02\n6 18759     5.056801e+02 -6.734399e+02\n7 18759     2.807600e+02 -5.288500e+02\n6 18760     4.789500e+02 -6.783900e+02\n7 18760     2.567200e+02 -5.288400e+02\n6 18761     2.973000e+02 -6.801700e+02\n7 18761     1.053900e+02 -5.023900e+02\n6 18762     4.742300e+02 -6.826200e+02\n7 18762     2.515500e+02 -5.317900e+02\n6 18763     3.031500e+02 -6.834100e+02\n7 18763     1.096100e+02 -5.059100e+02\n6 18764     -6.470001e+01 -6.898800e+02\n7 18764     -1.850700e+02 -4.536000e+02\n6 18765     1.503000e+02 -6.907800e+02\n7 18765     -1.659003e+01 -4.879800e+02\n10 18765     -7.351001e+01 -5.452600e+02\n6 18766     4.943199e+02 -6.915800e+02\n7 18766     2.660000e+02 -5.428900e+02\n6 18767     3.706300e+02 -6.919301e+02\n7 18767     1.624500e+02 -5.235000e+02\n6 18768     -2.170400e+02 -6.923300e+02\n7 18768     -3.003300e+02 -4.322200e+02\n10 18768     -3.774100e+02 -4.448101e+02\n15 18768     -3.600700e+02 -5.511600e+02\n6 18769     -8.891000e+01 -7.019399e+02\n10 18769     -2.797000e+02 -4.882800e+02\n6 18770     -7.170001e+01 -7.059100e+02\n10 18770     -2.671500e+02 -4.964100e+02\n6 18771     -6.222998e+01 -7.073101e+02\n9 18771     4.338000e+01 -4.728400e+02\n6 18772     4.320700e+02 -7.111400e+02\n7 18772     2.084100e+02 -5.497000e+02\n6 18773     3.027800e+02 -7.180400e+02\n7 18773     9.942999e+01 -5.349600e+02\n6 18774     1.111200e+02 -7.186500e+02\n7 18774     -5.515002e+01 -5.049900e+02\n6 18775     5.258600e+02 -7.243900e+02\n7 18775     2.830300e+02 -5.758000e+02\n6 18776     1.606400e+02 -7.779200e+02\n7 18776     -3.197998e+01 -5.613101e+02\n6 18777     2.144000e+02 -7.781899e+02\n7 18777     1.101001e+01 -5.713900e+02\n6 18778     5.776001e+01 -7.857900e+02\n7 18778     -1.156300e+02 -5.512700e+02\n6 18779     -1.023300e+02 -8.384399e+02\n7 18779     -2.512600e+02 -5.679600e+02\n6 18780     -4.794700e+02 8.611600e+02\n11 18780     1.722200e+02 -5.271002e+01\n6 18781     -3.582001e+01 8.603100e+02\n13 18781     5.405699e+02 3.684000e+02\n6 18782     -3.773999e+01 8.542500e+02\n11 18782     5.314000e+02 -7.378998e+01\n13 18782     5.381801e+02 3.638300e+02\n14 18782     7.339301e+02 -1.572998e+01\n6 18783     -5.562600e+02 8.440500e+02\n8 18783     -1.950600e+02 4.149200e+02\n6 18784     2.075300e+02 8.358200e+02\n8 18784     3.100100e+02 4.188000e+02\n9 18784     1.006500e+02 5.519100e+02\n11 18784     6.198800e+02 -1.089200e+02\n6 18785     -3.386400e+02 8.283400e+02\n8 18785     -5.557001e+01 3.844900e+02\n6 18786     2.847300e+02 8.236600e+02\n8 18786     3.640100e+02 4.171600e+02\n6 18787     -8.580017e+00 8.196000e+02\n8 18787     1.594600e+02 3.459500e+02\n11 18787     5.566000e+02 -9.757001e+01\n13 18787     5.581000e+02 3.405100e+02\n14 18787     7.594399e+02 -4.303998e+01\n6 18788     1.291500e+02 8.152600e+02\n8 18788     2.489500e+02 3.287900e+02\n6 18789     1.291500e+02 8.152600e+02\n8 18789     2.489500e+02 3.287900e+02\n6 18790     -1.525300e+02 8.126300e+02\n11 18790     4.313101e+02 -9.612000e+01\n13 18790     4.483400e+02 3.416800e+02\n14 18790     6.260300e+02 -3.937000e+01\n6 18791     2.965900e+02 8.106900e+02\n8 18791     3.724000e+02 4.094200e+02\n9 18791     1.671500e+02 5.426600e+02\n6 18792     1.227600e+02 8.049300e+02\n8 18792     2.447600e+02 3.231300e+02\n6 18793     -2.077500e+02 7.681800e+02\n8 18793     2.853998e+01 3.341000e+02\n6 18794     -5.473900e+02 7.564100e+02\n11 18794     1.130900e+02 -1.126100e+02\n14 18794     2.843500e+02 -5.496997e+01\n6 18795     -4.721600e+02 7.524500e+02\n11 18795     1.697500e+02 -1.187500e+02\n6 18796     -5.355800e+02 7.445800e+02\n8 18796     -1.871500e+02 3.509300e+02\n6 18797     6.522998e+01 7.430200e+02\n8 18797     2.075000e+02 2.895100e+02\n6 18798     4.082300e+02 7.402500e+02\n9 18798     2.591500e+02 5.340600e+02\n6 18799     -1.337100e+02 7.392900e+02\n11 18799     4.444301e+02 -1.452400e+02\n6 18800     -1.337100e+02 7.392900e+02\n11 18800     4.444301e+02 -1.452400e+02\n6 18801     -6.398999e+01 7.378200e+02\n11 18801     5.058900e+02 -1.503200e+02\n6 18802     4.666998e+01 7.360900e+02\n8 18802     1.955200e+02 2.868100e+02\n9 18802     -3.965997e+01 3.920300e+02\n6 18803     -5.640997e+01 7.347500e+02\n11 18803     5.120800e+02 -1.522400e+02\n14 18803     7.084301e+02 -1.084800e+02\n6 18804     -6.396002e+01 7.317400e+02\n9 18804     -1.130100e+02 4.008500e+02\n6 18805     4.848700e+02 7.284500e+02\n8 18805     5.117700e+02 3.912100e+02\n6 18806     5.505100e+02 7.250200e+02\n8 18806     5.597300e+02 3.951000e+02\n6 18807     5.626500e+02 7.160500e+02\n8 18807     5.675100e+02 3.894600e+02\n6 18808     3.329200e+02 7.145900e+02\n8 18808     3.994500e+02 3.474500e+02\n9 18808     1.969700e+02 4.801800e+02\n6 18809     -2.079200e+02 7.134100e+02\n8 18809     2.734998e+01 2.979900e+02\n9 18809     -2.105300e+02 4.028000e+02\n11 18809     3.806500e+02 -1.576700e+02\n6 18810     2.297400e+02 7.131200e+02\n8 18810     3.273300e+02 3.407400e+02\n6 18811     4.555601e+02 7.023900e+02\n9 18811     2.978900e+02 5.120100e+02\n6 18812     -5.592600e+02 6.964000e+02\n8 18812     -2.047100e+02 3.220200e+02\n6 18813     -4.484500e+02 6.925400e+02\n14 18813     3.587000e+02 -1.090000e+02\n6 18814     -7.897998e+01 6.919400e+02\n9 18814     -1.226600e+02 3.739400e+02\n6 18815     -4.218000e+02 6.836500e+02\n11 18815     2.036900e+02 -1.640700e+02\n13 18815     2.438900e+02 2.701200e+02\n6 18816     3.835900e+02 6.831700e+02\n8 18816     4.391899e+02 3.531600e+02\n6 18817     -5.165997e+01 6.799500e+02\n11 18817     5.151600e+02 -1.903900e+02\n6 18818     -4.191300e+02 6.797500e+02\n13 18818     2.437200e+02 2.672300e+02\n6 18819     2.938200e+02 6.725700e+02\n8 18819     3.724700e+02 3.165200e+02\n11 18819     6.812100e+02 -2.378900e+02\n6 18820     3.057000e+02 6.725200e+02\n8 18820     3.802000e+02 3.178500e+02\n9 18820     1.794500e+02 4.471800e+02\n6 18821     3.057000e+02 6.725200e+02\n8 18821     3.802000e+02 3.178500e+02\n9 18821     1.794500e+02 4.471800e+02\n6 18822     -2.163300e+02 6.707800e+02\n9 18822     -2.162300e+02 3.724400e+02\n6 18823     -2.712600e+02 6.649100e+02\n8 18823     -1.670001e+01 2.727400e+02\n6 18824     -2.712600e+02 6.649100e+02\n8 18824     -1.670001e+01 2.727400e+02\n6 18825     -8.385999e+01 6.635700e+02\n12 18825     7.822998e+01 6.191400e+02\n6 18826     -5.065002e+01 6.635100e+02\n8 18826     1.305100e+02 2.493100e+02\n12 18826     1.103600e+02 6.176000e+02\n6 18827     -1.244900e+02 6.626500e+02\n9 18827     -1.533400e+02 3.574400e+02\n6 18828     4.627300e+02 6.594800e+02\n8 18828     4.973300e+02 3.414800e+02\n6 18829     -6.540002e+01 6.589300e+02\n9 18829     -1.129500e+02 3.490300e+02\n12 18829     9.603998e+01 6.140300e+02\n6 18830     -6.540002e+01 6.589300e+02\n9 18830     -1.129500e+02 3.490300e+02\n6 18831     -1.205600e+02 6.584400e+02\n9 18831     -1.505100e+02 3.539500e+02\n12 18831     4.265002e+01 6.161900e+02\n13 18831     4.592900e+02 2.369600e+02\n6 18832     -1.935400e+02 6.545000e+02\n8 18832     3.533002e+01 2.578900e+02\n9 18832     -2.000800e+02 3.588300e+02\n6 18833     -4.044300e+02 6.481900e+02\n8 18833     -1.053400e+02 2.750400e+02\n9 18833     -3.459000e+02 3.770000e+02\n6 18834     -4.044300e+02 6.481900e+02\n9 18834     -3.459000e+02 3.770000e+02\n6 18835     -5.746400e+02 6.464200e+02\n8 18835     -2.178100e+02 2.912300e+02\n6 18836     -1.123200e+02 6.414200e+02\n8 18836     9.009003e+01 2.415600e+02\n6 18837     4.608300e+02 6.320000e+02\n9 18837     3.058800e+02 4.616900e+02\n6 18838     -3.441300e+02 6.312200e+02\n11 18838     2.608600e+02 -2.034500e+02\n13 18838     2.934800e+02 2.319600e+02\n6 18839     -2.398000e+02 6.315400e+02\n8 18839     3.830017e+00 2.469700e+02\n6 18840     -4.763600e+02 6.285700e+02\n11 18840     1.573600e+02 -1.955200e+02\n6 18841     -9.789001e+01 6.284400e+02\n8 18841     9.885999e+01 2.307500e+02\n12 18841     6.481000e+01 5.882700e+02\n13 18841     4.744700e+02 2.159800e+02\n14 18841     6.628000e+02 -1.900500e+02\n6 18842     4.527300e+02 6.268200e+02\n8 18842     4.905699e+02 3.174600e+02\n9 18842     3.002800e+02 4.572300e+02\n6 18843     -3.782300e+02 6.184900e+02\n8 18843     -8.925000e+01 2.537400e+02\n9 18843     -3.266400e+02 3.529200e+02\n6 18844     -2.948600e+02 5.979600e+02\n9 18844     -2.692800e+02 3.285600e+02\n12 18844     -1.270500e+02 5.696400e+02\n6 18845     -3.174600e+02 5.962300e+02\n9 18845     -2.857800e+02 3.289700e+02\n6 18846     -2.713000e+02 5.959700e+02\n12 18846     -1.036200e+02 5.672700e+02\n6 18847     4.645900e+02 5.784500e+02\n9 18847     3.114800e+02 4.231900e+02\n6 18848     -2.430900e+02 5.774400e+02\n12 18848     -7.702002e+01 5.501000e+02\n6 18849     -2.388000e+02 5.751300e+02\n8 18849     3.179993e+00 2.110200e+02\n12 18849     -7.342999e+01 5.474600e+02\n6 18850     1.927700e+02 5.669500e+02\n8 18850     3.022500e+02 2.359300e+02\n9 18850     9.972998e+01 3.559400e+02\n12 18850     3.016500e+02 5.559000e+02\n6 18851     -4.513000e+02 5.657100e+02\n9 18851     -3.791900e+02 3.204400e+02\n11 18851     1.724200e+02 -2.376400e+02\n6 18852     -2.105000e+02 5.654600e+02\n14 18852     5.528700e+02 -2.302400e+02\n6 18853     -2.844900e+02 5.568000e+02\n12 18853     -1.175800e+02 5.331800e+02\n6 18854     -2.296300e+02 5.460500e+02\n9 18854     -2.244600e+02 2.815700e+02\n12 18854     -6.326001e+01 5.196500e+02\n14 18854     5.336400e+02 -2.442200e+02\n6 18855     -2.188300e+02 5.411300e+02\n9 18855     -2.166100e+02 2.785300e+02\n6 18856     -3.780500e+02 5.404400e+02\n8 18856     -9.152002e+01 2.007900e+02\n9 18856     -3.281000e+02 2.940500e+02\n12 18856     -2.070800e+02 5.217700e+02\n6 18857     -3.844600e+02 5.365500e+02\n12 18857     -2.132700e+02 5.188300e+02\n6 18858     4.194600e+02 5.322100e+02\n9 18858     2.800800e+02 3.835700e+02\n6 18859     3.231600e+02 5.300600e+02\n9 18859     1.985000e+02 3.442800e+02\n6 18860     -2.298400e+02 5.266800e+02\n9 18860     -2.245700e+02 2.682200e+02\n6 18861     -5.210300e+02 5.257900e+02\n12 18861     -3.452700e+02 5.143000e+02\n6 18862     3.895100e+02 5.236300e+02\n7 18862     4.240900e+02 5.163800e+02\n9 18862     2.583400e+02 3.734100e+02\n11 18862     7.215800e+02 -3.772400e+02\n12 18862     4.740800e+02 5.305800e+02\n6 18863     4.177400e+02 5.225400e+02\n8 18863     4.680900e+02 2.408300e+02\n9 18863     2.793700e+02 3.761200e+02\n11 18863     7.444100e+02 -3.827200e+02\n12 18863     5.019500e+02 5.295900e+02\n6 18864     4.342500e+02 5.223200e+02\n8 18864     4.794500e+02 2.418800e+02\n12 18864     5.169000e+02 5.304500e+02\n6 18865     5.427500e+02 5.106200e+02\n9 18865     3.734500e+02 3.819800e+02\n6 18866     4.113500e+02 5.072000e+02\n8 18866     4.632500e+02 2.293700e+02\n9 18866     2.757300e+02 3.638700e+02\n10 18866     6.180500e+02 5.924800e+02\n11 18866     7.397500e+02 -3.952100e+02\n12 18866     4.951100e+02 5.149500e+02\n6 18867     4.485000e+02 4.843200e+02\n9 18867     3.045500e+02 3.510400e+02\n6 18868     3.826500e+02 4.831100e+02\n7 18868     4.159399e+02 4.819300e+02\n9 18868     2.552700e+02 3.427000e+02\n12 18868     4.681400e+02 4.898400e+02\n13 18868     7.917100e+02 7.338000e+01\n6 18869     -4.995300e+02 4.754500e+02\n12 18869     -3.240000e+02 4.679700e+02\n6 18870     -5.118100e+02 4.718000e+02\n12 18870     -3.359000e+02 4.652100e+02\n6 18871     2.983200e+02 4.655600e+02\n12 18871     3.993000e+02 4.619500e+02\n6 18872     3.035600e+02 4.636000e+02\n9 18872     1.867000e+02 2.927200e+02\n12 18872     4.047300e+02 4.600900e+02\n6 18873     -5.418000e+02 4.584700e+02\n12 18873     -3.646400e+02 4.543600e+02\n6 18874     1.931700e+02 4.562900e+02\n7 18874     2.877500e+02 4.737300e+02\n9 18874     1.029600e+02 2.734300e+02\n12 18874     3.030300e+02 4.505600e+02\n6 18875     -4.748100e+02 4.472300e+02\n9 18875     -3.969500e+02 2.337700e+02\n6 18876     -4.748100e+02 4.472300e+02\n9 18876     -3.969500e+02 2.337700e+02\n6 18877     4.372300e+02 4.421300e+02\n9 18877     2.982700e+02 3.181700e+02\n6 18878     3.587800e+02 4.362400e+02\n8 18878     4.264800e+02 1.737700e+02\n9 18878     2.394399e+02 3.036600e+02\n10 18878     5.582600e+02 5.274900e+02\n6 18879     1.311500e+02 4.335700e+02\n7 18879     2.403199e+02 4.596200e+02\n6 18880     4.418199e+02 4.259800e+02\n7 18880     4.597500e+02 4.271700e+02\n8 18880     4.875400e+02 1.722200e+02\n9 18880     3.025800e+02 3.062700e+02\n10 18880     6.345000e+02 5.010100e+02\n12 18880     5.247900e+02 4.349000e+02\n15 18880     8.394301e+02 5.740300e+02\n6 18881     4.418199e+02 4.259800e+02\n9 18881     3.025800e+02 3.062700e+02\n12 18881     5.247900e+02 4.349000e+02\n6 18882     3.755100e+02 4.191700e+02\n9 18882     2.531801e+02 2.928900e+02\n12 18882     4.615699e+02 4.265400e+02\n6 18883     1.637200e+02 4.045700e+02\n12 18883     2.764700e+02 4.001100e+02\n6 18884     2.760000e+02 3.881900e+02\n12 18884     3.789800e+02 3.855500e+02\n6 18885     4.894900e+02 3.824400e+02\n8 18885     5.235300e+02 1.432100e+02\n9 18885     3.408800e+02 2.784900e+02\n12 18885     5.708500e+02 3.924300e+02\n6 18886     -5.021000e+02 3.771400e+02\n8 18886     -1.815500e+02 1.028000e+02\n6 18887     5.019800e+02 3.752000e+02\n8 18887     5.326400e+02 1.384900e+02\n9 18887     3.503900e+02 2.749100e+02\n6 18888     1.417300e+02 3.745500e+02\n7 18888     2.451300e+02 4.103400e+02\n13 18888     6.093600e+02 1.782001e+01\n15 18888     5.581801e+02 5.807800e+02\n6 18889     1.390800e+02 3.695000e+02\n7 18889     2.431500e+02 4.063900e+02\n13 18889     6.073900e+02 1.442999e+01\n14 18889     8.430200e+02 -4.485300e+02\n15 18889     5.550900e+02 5.752600e+02\n6 18890     3.694000e+02 3.629300e+02\n7 18890     3.986400e+02 3.795300e+02\n9 18890     2.510900e+02 2.484000e+02\n10 18890     5.577900e+02 4.509200e+02\n12 18890     4.565200e+02 3.719100e+02\n15 18890     7.486600e+02 5.122300e+02\n6 18891     4.709500e+02 3.630700e+02\n8 18891     5.103600e+02 1.272000e+02\n12 18891     5.530100e+02 3.724800e+02\n6 18892     3.756300e+02 3.577800e+02\n8 18892     4.390800e+02 1.167400e+02\n9 18892     2.553199e+02 2.456500e+02\n10 18892     5.615000e+02 4.445100e+02\n11 18892     7.149500e+02 -5.183700e+02\n6 18893     5.358000e+02 3.544200e+02\n7 18893     5.293400e+02 3.573500e+02\n9 18893     3.762300e+02 2.638900e+02\n6 18894     3.938200e+02 3.450600e+02\n9 18894     2.705100e+02 2.380200e+02\n6 18895     -4.374400e+02 3.387800e+02\n9 18895     -3.709800e+02 1.465700e+02\n6 18896     -5.667700e+02 3.331000e+02\n9 18896     -4.638900e+02 1.544800e+02\n6 18897     -2.848800e+02 3.330100e+02\n12 18897     -1.300400e+02 3.353800e+02\n13 18897     3.014600e+02 3.096997e+01\n14 18897     4.512700e+02 -4.138000e+02\n6 18898     -1.893700e+02 3.255400e+02\n9 18898     -1.824300e+02 1.459800e+02\n13 18898     3.664301e+02 1.653998e+01\n14 18898     5.340200e+02 -4.354301e+02\n6 18899     -4.060200e+02 3.247400e+02\n13 18899     2.197500e+02 3.653998e+01\n14 18899     3.488500e+02 -4.027000e+02\n6 18900     -3.081400e+02 3.134300e+02\n9 18900     -2.712300e+02 1.360000e+02\n14 18900     4.281300e+02 -4.271300e+02\n6 18901     -2.006000e+02 2.936000e+02\n7 18901     -2.826001e+01 3.719200e+02\n11 18901     3.074000e+02 -4.579400e+02\n6 18902     5.006200e+02 2.922300e+02\n9 18902     3.542900e+02 2.106700e+02\n12 18902     5.820601e+02 3.023100e+02\n6 18903     -2.677600e+02 2.865200e+02\n13 18903     3.045699e+02 -2.219971e+00\n14 18903     4.555100e+02 -4.565300e+02\n6 18904     -1.867800e+02 2.866000e+02\n7 18904     -2.031000e+01 3.650800e+02\n6 18905     5.718900e+02 2.838400e+02\n8 18905     5.878400e+02 7.475000e+01\n12 18905     6.510300e+02 2.940300e+02\n6 18906     -1.942700e+02 2.828000e+02\n12 18906     -5.597998e+01 2.915100e+02\n13 18906     3.548900e+02 -1.272998e+01\n6 18907     -2.078800e+02 2.818300e+02\n13 18907     3.453300e+02 -1.165997e+01\n14 18907     5.078000e+02 -4.708101e+02\n6 18908     4.692700e+02 2.776200e+02\n7 18908     4.718500e+02 2.978000e+02\n8 18908     5.105800e+02 6.294000e+01\n9 18908     3.314200e+02 1.958800e+02\n12 18908     5.513199e+02 2.878000e+02\n13 18908     8.455100e+02 -9.120001e+01\n15 18908     8.455000e+02 3.849400e+02\n6 18909     -3.184800e+02 2.759300e+02\n7 18909     -1.232600e+02 3.664000e+02\n6 18910     5.309200e+02 2.613400e+02\n8 18910     5.569301e+02 5.403000e+01\n9 18910     3.784700e+02 1.910800e+02\n12 18910     6.109800e+02 2.715100e+02\n6 18911     3.484600e+02 2.610800e+02\n7 18911     3.764200e+02 2.965300e+02\n8 18911     4.219301e+02 4.151001e+01\n12 18911     4.376600e+02 2.705300e+02\n6 18912     -3.062700e+02 2.598100e+02\n7 18912     -1.185900e+02 3.528100e+02\n9 18912     -2.655100e+02 1.073000e+02\n13 18912     2.740300e+02 -1.679999e+01\n14 18912     4.170300e+02 -4.738900e+02\n6 18913     3.296000e+02 2.594300e+02\n8 18913     4.070400e+02 3.920001e+01\n12 18913     4.193600e+02 2.689000e+02\n6 18914     4.861000e+02 2.572300e+02\n8 18914     5.237500e+02 4.817999e+01\n9 18914     3.447800e+02 1.816600e+02\n6 18915     1.121000e+02 2.413400e+02\n12 18915     1.586100e+02 2.836700e+02\n6 18916     1.167700e+02 2.413700e+02\n12 18916     1.630100e+02 2.833900e+02\n6 18917     4.150100e+02 2.385800e+02\n12 18917     4.999000e+02 2.487500e+02\n6 18918     1.567300e+02 2.214900e+02\n12 18918     1.978700e+02 2.652600e+02\n6 18919     -3.076600e+02 2.179100e+02\n9 18919     -2.626100e+02 8.457999e+01\n6 18920     4.043600e+02 2.165300e+02\n12 18920     4.896700e+02 2.265900e+02\n6 18921     5.845900e+02 2.101100e+02\n8 18921     5.992500e+02 1.801999e+01\n9 18921     4.229600e+02 1.572400e+02\n6 18922     5.666300e+02 2.100500e+02\n8 18922     5.853500e+02 1.732001e+01\n9 18922     4.089399e+02 1.546700e+02\n6 18923     1.961600e+02 2.031500e+02\n10 18923     2.138300e+02 2.895400e+02\n13 18923     5.819000e+02 -1.165600e+02\n15 18923     3.286000e+02 3.165600e+02\n6 18924     3.774900e+02 1.919000e+02\n12 18924     4.646100e+02 2.017200e+02\n6 18925     -4.015600e+02 1.910600e+02\n14 18925     3.209399e+02 -5.166899e+02\n6 18926     -1.075300e+02 1.893300e+02\n14 18926     5.170400e+02 -5.742800e+02\n6 18927     4.980601e+02 1.725000e+02\n9 18927     3.589700e+02 1.153900e+02\n12 18927     5.789900e+02 1.826800e+02\n6 18928     1.310300e+02 1.711500e+02\n12 18928     1.622900e+02 2.192500e+02\n6 18929     3.427600e+02 1.696300e+02\n12 18929     4.318900e+02 1.803900e+02\n6 18930     1.487300e+02 1.629900e+02\n7 18930     9.826001e+01 2.209800e+02\n6 18931     5.266600e+02 1.612000e+02\n8 18931     5.558900e+02 -2.388000e+01\n6 18932     2.857800e+02 1.577100e+02\n7 18932     2.715400e+02 2.112800e+02\n6 18933     5.052900e+02 1.539100e+02\n12 18933     5.860100e+02 1.637700e+02\n6 18934     2.354800e+02 1.460100e+02\n12 18934     2.733500e+02 1.887500e+02\n6 18935     5.386899e+02 1.434600e+02\n12 18935     6.181500e+02 1.532600e+02\n6 18936     -1.317600e+02 1.384800e+02\n7 18936     -1.339500e+02 2.268700e+02\n13 18936     3.260601e+02 -1.230000e+02\n6 18937     -3.569600e+02 1.381900e+02\n9 18937     -2.935200e+02 3.985999e+01\n13 18937     2.173900e+02 -9.394000e+01\n14 18937     3.450100e+02 -5.714399e+02\n6 18938     5.569600e+02 1.363400e+02\n7 18938     5.310601e+02 1.685600e+02\n8 18938     5.801000e+02 -4.042001e+01\n9 18938     4.060000e+02 9.491000e+01\n6 18939     1.798900e+02 1.359800e+02\n10 18939     1.547400e+02 2.172100e+02\n12 18939     2.098800e+02 1.823000e+02\n13 18939     5.541500e+02 -1.656100e+02\n6 18940     5.681200e+02 1.313200e+02\n8 18940     5.874600e+02 -4.348001e+01\n9 18940     4.142400e+02 9.248001e+01\n12 18940     6.466300e+02 1.407000e+02\n6 18941     -9.067999e+01 1.171600e+02\n8 18941     1.065800e+02 3.829999e+01\n12 18941     -6.607001e+01 1.723100e+02\n13 18941     3.494301e+02 -1.434000e+02\n6 18942     1.969300e+02 1.131300e+02\n12 18942     2.260800e+02 1.595000e+02\n6 18943     1.009800e+02 1.124100e+02\n8 18943     2.552100e+02 3.751999e+01\n10 18943     5.759998e+01 2.054700e+02\n6 18944     5.786000e+02 9.934998e+01\n8 18944     5.969399e+02 -6.894000e+01\n12 18944     6.565000e+02 1.085000e+02\n6 18945     1.099800e+02 9.672998e+01\n12 18945     1.304500e+02 1.478500e+02\n6 18946     5.814500e+02 9.529999e+01\n9 18946     4.267500e+02 6.588000e+01\n12 18946     6.591000e+02 1.044700e+02\n6 18947     5.844000e+01 8.797998e+01\n12 18947     7.665002e+01 1.404600e+02\n6 18948     -2.537800e+02 7.991998e+01\n8 18948     -1.914001e+01 -1.354001e+01\n10 18948     -2.052000e+02 2.581600e+02\n6 18949     1.429100e+02 7.644000e+01\n8 18949     2.879400e+02 9.600006e+00\n6 18950     -4.072300e+02 7.177002e+01\n9 18950     -3.279700e+02 -3.800049e-01\n6 18951     -5.800000e+01 7.128003e+01\n12 18951     -3.972998e+01 1.265400e+02\n6 18952     3.728200e+02 5.965002e+01\n7 18952     3.139000e+02 1.135900e+02\n10 18952     3.914500e+02 1.169100e+02\n12 18952     4.233199e+02 8.957001e+01\n13 18952     7.140500e+02 -2.481500e+02\n15 18952     5.450100e+02 1.135400e+02\n6 18953     2.599700e+02 5.870001e+01\n12 18953     2.946600e+02 9.932001e+01\n6 18954     -3.148800e+02 4.514001e+01\n13 18954     1.998300e+02 -1.638900e+02\n6 18955     2.679100e+02 4.421002e+01\n12 18955     3.028500e+02 8.415997e+01\n6 18956     3.776400e+02 4.271997e+01\n7 18956     3.134700e+02 9.801001e+01\n12 18956     4.265900e+02 7.329999e+01\n6 18957     3.503998e+01 4.209003e+01\n8 18957     2.048700e+02 -1.039001e+01\n12 18957     4.959003e+01 9.504999e+01\n6 18958     -1.243700e+02 3.857001e+01\n12 18958     -1.038300e+02 9.482001e+01\n6 18959     2.209998e+01 3.408002e+01\n12 18959     3.570001e+01 8.740002e+01\n6 18960     2.678003e+01 3.228003e+01\n12 18960     3.971997e+01 8.550000e+01\n6 18961     2.835300e+02 2.379999e+01\n8 18961     3.945900e+02 -5.200000e+01\n12 18961     3.196100e+02 6.201001e+01\n6 18962     -4.077600e+02 2.196997e+01\n9 18962     -3.242100e+02 -2.839001e+01\n6 18963     -4.077600e+02 2.196997e+01\n9 18963     -3.242100e+02 -2.839001e+01\n6 18964     -3.010600e+02 1.571002e+01\n12 18964     -2.523100e+02 7.156000e+01\n6 18965     -2.919900e+02 1.216998e+01\n12 18965     -2.459200e+02 6.781000e+01\n6 18966     -3.843800e+02 1.063000e+01\n8 18966     -1.171000e+02 -1.171000e+02\n6 18967     2.601200e+02 7.049988e+00\n12 18967     2.899800e+02 4.739001e+01\n13 18967     6.029600e+02 -2.723100e+02\n6 18968     3.882500e+02 3.739990e+00\n12 18968     4.321801e+02 3.531000e+01\n6 18969     -1.312300e+02 2.000000e+00\n8 18969     7.367999e+01 -4.564001e+01\n12 18969     -1.119700e+02 5.809998e+01\n6 18970     2.574700e+02 1.859985e+00\n7 18970     1.759900e+02 7.119000e+01\n12 18970     2.861500e+02 4.260999e+01\n6 18971     -2.288700e+02 1.130005e+00\n10 18971     -2.279100e+02 1.741300e+02\n12 18971     -1.969400e+02 5.785999e+01\n6 18972     5.221997e+01 8.599854e-01\n10 18972     -1.821997e+01 1.052700e+02\n15 18972     5.287000e+01 9.585001e+01\n6 18973     1.876400e+02 6.500244e-01\n13 18973     5.398700e+02 -2.667000e+02\n6 18974     -1.650800e+02 -2.450012e+00\n8 18974     4.694000e+01 -5.363000e+01\n6 18975     -1.610500e+02 -8.799988e+00\n8 18975     5.013000e+01 -5.751999e+01\n12 18975     -1.387000e+02 4.778998e+01\n6 18976     3.303400e+02 -9.369995e+00\n12 18976     3.649500e+02 2.717999e+01\n6 18977     1.416800e+02 -2.301001e+01\n8 18977     2.879800e+02 -6.406000e+01\n6 18978     -6.444000e+01 -2.633002e+01\n8 18978     1.256800e+02 -6.397998e+01\n6 18979     -9.472000e+01 -2.822998e+01\n12 18979     -8.010999e+01 2.723999e+01\n6 18980     3.734003e+01 -3.203003e+01\n12 18980     4.870001e+01 1.871997e+01\n6 18981     -9.880005e+00 -4.388000e+01\n12 18981     1.820007e+00 9.239990e+00\n6 18982     -1.881900e+02 -4.398999e+01\n12 18982     -1.675500e+02 1.403003e+01\n6 18983     1.467500e+02 -4.406000e+01\n12 18983     1.624100e+02 1.809998e+00\n6 18984     1.731000e+01 -4.679999e+01\n12 18984     2.776001e+01 5.280029e+00\n6 18985     -8.014999e+01 -4.775000e+01\n12 18985     -6.696002e+01 8.250000e+00\n6 18986     -1.857700e+02 -5.515997e+01\n12 18986     -1.677200e+02 3.099976e+00\n6 18987     -1.663600e+02 -5.495001e+01\n8 18987     4.415997e+01 -8.945001e+01\n6 18988     -8.100000e+01 -5.472998e+01\n12 18988     -6.819000e+01 -6.799927e-01\n6 18989     -2.337000e+02 -5.550000e+01\n9 18989     -1.496800e+02 2.509998e+01\n6 18990     -3.366998e+01 -5.853003e+01\n7 18990     -8.921002e+01 4.946002e+01\n8 18990     1.493400e+02 -8.809003e+01\n15 18990     -4.369000e+01 5.346997e+01\n6 18991     3.622500e+02 -8.454999e+01\n12 18991     3.923500e+02 -5.114001e+01\n6 18992     -7.513000e+01 -9.747998e+01\n12 18992     -6.785999e+01 -4.242999e+01\n6 18993     -2.452500e+02 -1.016000e+02\n7 18993     -2.510200e+02 3.866998e+01\n6 18994     1.542100e+02 -1.091400e+02\n12 18994     1.643000e+02 -6.415002e+01\n6 18995     1.436100e+02 -1.110900e+02\n12 18995     1.529400e+02 -6.553003e+01\n6 18996     -2.869100e+02 -1.201800e+02\n8 18996     -5.153003e+01 -1.359600e+02\n12 18996     -2.697800e+02 -5.695001e+01\n6 18997     7.240997e+01 -1.204200e+02\n8 18997     2.340100e+02 -1.329200e+02\n12 18997     7.767999e+01 -7.191998e+01\n6 18998     -2.220900e+02 -1.225800e+02\n8 18998     -5.999756e-01 -1.381100e+02\n6 18999     1.110200e+02 -1.350200e+02\n15 18999     8.459003e+01 -7.095001e+01\n6 19000     -2.479900e+02 -1.493300e+02\n9 19000     -1.534100e+02 -3.959998e+01\n6 19001     2.087500e+02 -1.705601e+02\n7 19001     9.672998e+01 -7.481000e+01\n6 19002     -2.288400e+02 -1.743800e+02\n8 19002     -7.890015e+00 -1.802900e+02\n9 19002     -1.371300e+02 -5.894000e+01\n6 19003     -1.737600e+02 -1.797800e+02\n7 19003     -2.213800e+02 -3.709998e+01\n6 19004     1.403400e+02 -1.977800e+02\n12 19004     1.423200e+02 -1.537000e+02\n13 19004     4.723900e+02 -4.067800e+02\n15 19004     9.129999e+01 -1.519100e+02\n6 19005     1.403400e+02 -1.977800e+02\n12 19005     1.423200e+02 -1.537000e+02\n13 19005     4.723900e+02 -4.067800e+02\n6 19006     2.107100e+02 -1.984900e+02\n8 19006     3.443700e+02 -1.970900e+02\n12 19006     2.169900e+02 -1.581800e+02\n6 19007     2.632500e+02 -2.114000e+02\n12 19007     2.765601e+02 -1.757200e+02\n6 19008     2.842900e+02 -2.178600e+02\n8 19008     4.017900e+02 -2.261800e+02\n6 19009     -3.576001e+01 -2.201700e+02\n12 19009     -3.867999e+01 -1.679800e+02\n6 19010     -5.609998e+01 -2.473800e+02\n12 19010     -5.596997e+01 -1.950900e+02\n6 19011     8.898999e+01 -2.525900e+02\n8 19011     2.460600e+02 -2.408100e+02\n9 19011     1.332700e+02 -9.259998e+01\n6 19012     2.658002e+01 -2.725400e+02\n13 19012     3.797800e+02 -4.413700e+02\n6 19013     1.676800e+02 -2.756801e+02\n8 19013     3.093900e+02 -2.620500e+02\n6 19014     2.868200e+02 -2.793300e+02\n8 19014     4.019200e+02 -2.841900e+02\n6 19015     2.456300e+02 -2.817300e+02\n12 19015     2.604200e+02 -2.476800e+02\n6 19016     1.550000e+01 -2.941600e+02\n9 19016     7.520001e+01 -1.370800e+02\n6 19017     2.403000e+02 -2.939200e+02\n8 19017     3.656900e+02 -2.900300e+02\n12 19017     2.537900e+02 -2.597900e+02\n6 19018     2.403000e+02 -2.939200e+02\n12 19018     2.537900e+02 -2.597900e+02\n6 19019     -8.773001e+01 -3.139100e+02\n13 19019     2.950601e+02 -4.503300e+02\n6 19020     -5.681500e+02 -3.178900e+02\n7 19020     -4.583300e+02 -8.512000e+01\n8 19020     -2.725400e+02 -3.140700e+02\n13 19020     -5.250000e+00 -3.712700e+02\n6 19021     -1.027900e+02 -3.234600e+02\n8 19021     8.798999e+01 -3.057100e+02\n6 19022     7.262000e+01 -3.257200e+02\n12 19022     7.606000e+01 -2.820500e+02\n6 19023     -1.322600e+02 -3.500300e+02\n12 19023     -1.218000e+02 -2.938900e+02\n13 19023     2.628700e+02 -4.681400e+02\n6 19024     -4.350000e+01 -3.535400e+02\n12 19024     -3.722998e+01 -3.033600e+02\n6 19025     1.781500e+02 -3.663199e+02\n12 19025     1.871900e+02 -3.304500e+02\n6 19026     -1.289600e+02 -3.694100e+02\n13 19026     2.629500e+02 -4.820400e+02\n6 19027     3.113000e+01 -3.744200e+02\n12 19027     3.566998e+01 -3.293300e+02\n6 19028     -4.656000e+02 -4.207500e+02\n7 19028     -4.127300e+02 -1.794900e+02\n6 19029     -4.923800e+02 -4.336801e+02\n7 19029     -4.337400e+02 -1.856600e+02\n8 19029     -2.233300e+02 -3.941400e+02\n13 19029     1.844000e+01 -4.615100e+02\n6 19030     -4.927200e+02 -4.377200e+02\n7 19030     -4.354500e+02 -1.890600e+02\n6 19031     1.607500e+02 -4.814301e+02\n12 19031     1.641400e+02 -4.449500e+02\n6 19032     1.448000e+02 -5.081899e+02\n12 19032     1.442200e+02 -4.712400e+02\n6 19033     -3.951400e+02 -5.117500e+02\n7 19033     -3.842300e+02 -2.614700e+02\n6 19034     -3.738700e+02 -5.165800e+02\n9 19034     -2.464900e+02 -3.609300e+02\n10 19034     -4.271500e+02 -2.476500e+02\n13 19034     7.745001e+01 -5.399000e+02\n15 19034     -4.134400e+02 -3.202900e+02\n6 19035     -4.562600e+02 -5.333700e+02\n7 19035     -4.336200e+02 -2.701200e+02\n6 19036     3.832500e+02 -5.443500e+02\n9 19036     3.839500e+02 -3.355100e+02\n6 19037     -2.923800e+02 -5.603000e+02\n15 19037     -3.630000e+02 -3.889000e+02\n6 19038     5.738101e+02 -5.679100e+02\n7 19038     3.693700e+02 -4.475000e+02\n6 19039     -2.158100e+02 -5.833101e+02\n7 19039     -2.722100e+02 -3.443900e+02\n15 19039     -3.058300e+02 -4.365100e+02\n6 19040     -2.123700e+02 -5.877200e+02\n7 19040     -2.697900e+02 -3.480300e+02\n6 19041     -3.462700e+02 -5.952900e+02\n9 19041     -2.145600e+02 -4.125700e+02\n15 19041     -4.289700e+02 -4.109700e+02\n6 19042     -3.553700e+02 -6.043000e+02\n15 19042     -4.403500e+02 -4.172600e+02\n6 19043     4.428800e+02 -6.331200e+02\n9 19043     4.473101e+02 -3.883100e+02\n6 19044     -8.648001e+01 -6.383900e+02\n9 19044     1.339001e+01 -4.267500e+02\n6 19045     -7.800293e-01 -6.771300e+02\n9 19045     9.181000e+01 -4.470699e+02\n6 19046     -7.800293e-01 -6.771300e+02\n9 19046     9.181000e+01 -4.470699e+02\n6 19047     5.723101e+02 -6.848300e+02\n7 19047     3.340100e+02 -5.483000e+02\n6 19048     5.297700e+02 -6.937400e+02\n7 19048     2.952500e+02 -5.499800e+02\n6 19049     4.646000e+02 -6.990400e+02\n7 19049     2.390000e+02 -5.443800e+02\n6 19050     -1.992400e+02 -7.011100e+02\n7 19050     -2.895400e+02 -4.423400e+02\n6 19051     2.858400e+02 -7.170400e+02\n7 19051     8.456000e+01 -5.315300e+02\n6 19052     -1.768200e+02 -7.183300e+02\n7 19052     -2.774800e+02 -4.588500e+02\n6 19053     -1.188400e+02 -7.450000e+02\n7 19053     -2.392000e+02 -4.904500e+02\n6 19054     -2.146300e+02 -7.617400e+02\n7 19054     -3.164200e+02 -4.882900e+02\n6 19055     1.149100e+02 -7.761899e+02\n7 19055     -6.777002e+01 -5.531700e+02\n6 19056     -1.580100e+02 -7.833500e+02\n7 19056     -2.794000e+02 -5.141700e+02\n6 19057     5.721002e+01 -7.994000e+02\n7 19057     -1.190000e+02 -5.624301e+02\n6 19058     5.721002e+01 -7.994000e+02\n7 19058     -1.190000e+02 -5.624301e+02\n10 19058     -2.007800e+02 -6.181100e+02\n6 19059     4.603998e+01 -8.031600e+02\n7 19059     -1.288800e+02 -5.640601e+02\n10 19059     -2.122400e+02 -6.189500e+02\n6 19060     4.603998e+01 -8.031600e+02\n7 19060     -1.288800e+02 -5.640601e+02\n6 19061     -9.792999e+01 -8.194301e+02\n7 19061     -2.433500e+02 -5.532300e+02\n6 19062     -2.022700e+02 8.574600e+02\n8 19062     3.371002e+01 3.893600e+02\n11 19062     3.908900e+02 -6.591998e+01\n6 19063     -1.315200e+02 8.572900e+02\n8 19063     7.984003e+01 3.826400e+02\n6 19064     1.886200e+02 8.394500e+02\n8 19064     2.976000e+02 4.200900e+02\n9 19064     8.690997e+01 5.523600e+02\n11 19064     6.088600e+02 -1.058500e+02\n6 19065     -1.200600e+02 8.330500e+02\n8 19065     8.740997e+01 3.662600e+02\n6 19066     -1.200600e+02 8.330500e+02\n8 19066     8.740997e+01 3.662600e+02\n6 19067     -1.109985e+00 8.314500e+02\n8 19067     1.646200e+02 3.537000e+02\n11 19067     5.635000e+02 -9.042999e+01\n13 19067     5.648101e+02 3.473600e+02\n14 19067     7.674301e+02 -3.528003e+01\n6 19068     -3.929993e+00 8.215100e+02\n8 19068     1.623900e+02 3.467400e+02\n11 19068     5.605900e+02 -9.700000e+01\n13 19068     5.616500e+02 3.411100e+02\n14 19068     7.643400e+02 -4.265002e+01\n6 19069     1.241300e+02 8.112600e+02\n8 19069     2.458400e+02 3.265900e+02\n6 19070     -1.619000e+02 7.965200e+02\n8 19070     5.940997e+01 3.470600e+02\n6 19071     2.597000e+02 7.904500e+02\n8 19071     3.471200e+02 3.928400e+02\n6 19072     -5.926001e+01 7.869600e+02\n8 19072     1.258700e+02 3.307100e+02\n6 19073     -5.425000e+01 7.832600e+02\n8 19073     1.296400e+02 3.274700e+02\n6 19074     -5.184998e+01 7.714900e+02\n11 19074     5.172900e+02 -1.275600e+02\n14 19074     7.160800e+02 -7.801001e+01\n6 19075     4.873999e+01 7.631100e+02\n8 19075     1.970100e+02 3.037200e+02\n9 19075     -3.871997e+01 4.110900e+02\n14 19075     8.123900e+02 -9.363000e+01\n6 19076     4.312500e+02 7.452800e+02\n8 19076     4.730601e+02 3.992700e+02\n6 19077     -3.209000e+02 7.411000e+02\n8 19077     -4.653003e+01 3.273500e+02\n9 19077     -2.880600e+02 4.355900e+02\n6 19078     2.584998e+01 7.347300e+02\n8 19078     1.811300e+02 2.876200e+02\n6 19079     -4.309998e+01 7.329200e+02\n8 19079     1.362200e+02 2.944000e+02\n6 19080     3.801200e+02 7.285000e+02\n9 19080     2.413199e+02 5.221500e+02\n6 19081     -1.213100e+02 7.243500e+02\n9 19081     -1.520800e+02 4.010000e+02\n6 19082     2.260300e+02 7.203000e+02\n8 19082     3.248100e+02 3.441400e+02\n6 19083     5.365800e+02 7.174300e+02\n8 19083     5.492400e+02 3.881000e+02\n9 19083     3.569800e+02 5.321900e+02\n6 19084     5.365800e+02 7.174300e+02\n8 19084     5.492400e+02 3.881000e+02\n9 19084     3.569800e+02 5.321900e+02\n6 19085     -1.059100e+02 7.049100e+02\n9 19085     -1.409100e+02 3.861300e+02\n6 19086     -2.789001e+01 6.924000e+02\n8 19086     1.461400e+02 2.665100e+02\n9 19086     -8.776001e+01 3.705700e+02\n6 19087     5.267600e+02 6.832900e+02\n9 19087     3.519100e+02 5.066400e+02\n6 19088     -1.870400e+02 6.802900e+02\n11 19088     3.971200e+02 -1.806200e+02\n6 19089     1.648400e+02 6.595600e+02\n8 19089     2.822500e+02 2.983200e+02\n13 19089     6.493000e+02 2.190200e+02\n6 19090     -2.963000e+02 6.499300e+02\n12 19090     -1.273500e+02 6.171900e+02\n6 19091     -5.102400e+02 6.364200e+02\n12 19091     -3.339100e+02 6.126500e+02\n6 19092     -2.271100e+02 6.082500e+02\n12 19092     -6.100000e+01 5.760100e+02\n6 19093     -2.271100e+02 6.082500e+02\n8 19093     1.196002e+01 2.306200e+02\n12 19093     -6.100000e+01 5.760100e+02\n6 19094     4.967600e+02 6.055700e+02\n9 19094     3.337900e+02 4.466900e+02\n6 19095     1.950100e+02 5.881200e+02\n7 19095     2.959000e+02 5.841600e+02\n9 19095     1.001100e+02 3.713100e+02\n11 19095     6.127600e+02 -2.924000e+02\n12 19095     3.050800e+02 5.740000e+02\n6 19096     -4.502200e+02 5.877600e+02\n9 19096     -3.782600e+02 3.368800e+02\n11 19096     1.744800e+02 -2.214400e+02\n14 19096     3.451000e+02 -1.855300e+02\n6 19097     -1.964900e+02 5.772900e+02\n12 19097     -3.128998e+01 5.467900e+02\n6 19098     -1.978100e+02 5.679300e+02\n12 19098     -3.239001e+01 5.384900e+02\n6 19099     -3.951300e+02 5.663000e+02\n9 19099     -3.394400e+02 3.158600e+02\n12 19099     -2.241200e+02 5.454200e+02\n6 19100     5.005300e+02 5.561200e+02\n9 19100     3.390800e+02 4.107000e+02\n12 19100     5.810699e+02 5.664400e+02\n6 19101     -2.386100e+02 5.510100e+02\n8 19101     3.159973e+00 1.936600e+02\n9 19101     -2.295700e+02 2.884100e+02\n14 19101     5.269399e+02 -2.376400e+02\n6 19102     -2.312100e+02 5.493400e+02\n12 19102     -6.459998e+01 5.231100e+02\n6 19103     -2.312100e+02 5.493400e+02\n8 19103     7.559998e+00 1.910900e+02\n9 19103     -2.259000e+02 2.855500e+02\n12 19103     -6.459998e+01 5.231100e+02\n6 19104     -3.195500e+02 5.470800e+02\n12 19104     -1.542200e+02 5.273400e+02\n6 19105     3.249100e+02 5.390400e+02\n8 19105     3.961500e+02 2.256200e+02\n9 19105     1.991400e+02 3.511900e+02\n6 19106     -4.272700e+02 5.292700e+02\n12 19106     -2.542900e+02 5.138100e+02\n6 19107     -2.230600e+02 5.266800e+02\n7 19107     -2.580017e+00 5.583200e+02\n14 19107     5.378500e+02 -2.600200e+02\n6 19108     -4.378800e+02 5.138700e+02\n12 19108     -2.651400e+02 5.005000e+02\n6 19109     -1.857100e+02 5.145500e+02\n9 19109     -1.934400e+02 2.547800e+02\n12 19109     -2.112000e+01 4.895300e+02\n6 19110     -1.857100e+02 5.145500e+02\n9 19110     -1.934400e+02 2.547800e+02\n12 19110     -2.112000e+01 4.895300e+02\n6 19111     -1.436800e+02 4.980900e+02\n8 19111     6.572998e+01 1.465600e+02\n14 19111     6.091700e+02 -2.929000e+02\n6 19112     -4.514800e+02 4.937200e+02\n12 19112     -2.781600e+02 4.828100e+02\n6 19113     4.018500e+02 4.943200e+02\n9 19113     2.688900e+02 3.533300e+02\n10 19113     6.070400e+02 5.817000e+02\n11 19113     7.323800e+02 -4.044600e+02\n12 19113     4.860000e+02 5.016100e+02\n6 19114     5.129900e+02 4.568500e+02\n12 19114     5.936400e+02 4.671100e+02\n6 19115     -1.838000e+01 4.030300e+02\n14 19115     7.050601e+02 -3.929800e+02\n6 19116     -4.994900e+02 3.980100e+02\n8 19116     -1.796500e+02 1.168600e+02\n9 19116     -4.148800e+02 2.000300e+02\n6 19117     3.458000e+02 3.942900e+02\n8 19117     4.176000e+02 1.416900e+02\n6 19118     2.570200e+02 3.732900e+02\n7 19118     3.320900e+02 4.004800e+02\n8 19118     3.496100e+02 1.008100e+02\n13 19118     6.960800e+02 5.880005e+00\n15 19118     6.769900e+02 5.577800e+02\n6 19119     -4.219800e+02 3.724900e+02\n9 19119     -3.594200e+02 1.702800e+02\n6 19120     -4.491800e+02 3.468400e+02\n8 19120     -1.473000e+02 7.367001e+01\n9 19120     -3.791400e+02 1.529600e+02\n11 19120     1.565800e+02 -3.829100e+02\n12 19120     -2.759700e+02 3.495500e+02\n6 19121     4.789301e+02 3.332100e+02\n9 19121     3.356300e+02 2.397000e+02\n6 19122     5.559301e+02 3.250300e+02\n8 19122     5.750000e+02 1.042400e+02\n9 19122     3.938500e+02 2.432500e+02\n6 19123     -2.055400e+02 3.001000e+02\n11 19123     3.067100e+02 -4.527600e+02\n12 19123     -6.384998e+01 3.064700e+02\n15 19123     1.702300e+02 5.529200e+02\n6 19124     -2.724000e+02 2.838000e+02\n11 19124     2.527900e+02 -4.543200e+02\n13 19124     3.012600e+02 -3.710022e+00\n14 19124     4.517100e+02 -4.583101e+02\n6 19125     -2.770700e+02 2.689800e+02\n7 19125     -9.475000e+01 3.580700e+02\n11 19125     2.430800e+02 -4.648400e+02\n13 19125     2.950200e+02 -1.359003e+01\n6 19126     3.542800e+02 2.627900e+02\n12 19126     4.423600e+02 2.727300e+02\n6 19127     3.837300e+02 2.629000e+02\n7 19127     4.040800e+02 2.946200e+02\n8 19127     4.470601e+02 4.551001e+01\n9 19127     2.661300e+02 1.728900e+02\n6 19128     4.191900e+02 2.595100e+02\n9 19128     2.938800e+02 1.746200e+02\n6 19129     4.041500e+02 2.586000e+02\n9 19129     2.822200e+02 1.721000e+02\n15 19129     7.708500e+02 3.792300e+02\n6 19130     4.041500e+02 2.586000e+02\n8 19130     4.622300e+02 4.379001e+01\n12 19130     4.895300e+02 2.678200e+02\n6 19131     5.458000e+02 2.572800e+02\n9 19131     3.897400e+02 1.893000e+02\n6 19132     -2.483200e+02 2.147600e+02\n7 19132     -8.553003e+01 3.130100e+02\n11 19132     2.410800e+02 -5.116400e+02\n13 19132     3.059500e+02 -5.319000e+01\n14 19132     4.576300e+02 -5.228199e+02\n6 19133     1.277700e+02 2.147800e+02\n12 19133     1.714600e+02 2.578200e+02\n6 19134     3.298500e+02 2.113600e+02\n12 19134     4.197500e+02 2.217500e+02\n6 19135     5.760699e+02 2.109300e+02\n8 19135     5.916100e+02 1.784000e+01\n9 19135     4.151700e+02 1.564100e+02\n6 19136     1.666600e+02 2.047300e+02\n12 19136     2.055200e+02 2.492900e+02\n6 19137     3.596400e+02 1.874200e+02\n7 19137     3.806000e+02 2.339000e+02\n6 19138     3.596400e+02 1.874200e+02\n10 19138     5.254800e+02 2.786700e+02\n13 19138     7.503800e+02 -1.461700e+02\n15 19138     7.133600e+02 3.057100e+02\n6 19139     2.856700e+02 1.577200e+02\n12 19139     3.507500e+02 1.851600e+02\n6 19140     5.658000e+02 1.578800e+02\n7 19140     5.393101e+02 1.853000e+02\n6 19141     3.441700e+02 1.471100e+02\n15 19141     6.919500e+02 2.636400e+02\n6 19142     1.330000e+02 1.462400e+02\n12 19142     1.602700e+02 1.955500e+02\n6 19143     2.424000e+02 1.384200e+02\n12 19143     2.809200e+02 1.803800e+02\n6 19144     4.463199e+02 1.240500e+02\n7 19144     4.432800e+02 1.714300e+02\n6 19145     4.463199e+02 1.240500e+02\n7 19145     4.432800e+02 1.714300e+02\n12 19145     5.292300e+02 1.350400e+02\n15 19145     7.960699e+02 2.084900e+02\n6 19146     5.634700e+02 1.242600e+02\n8 19146     5.849500e+02 -4.985001e+01\n12 19146     6.422600e+02 1.335500e+02\n6 19147     -1.454900e+02 1.225300e+02\n9 19147     -8.596002e+01 1.664600e+02\n6 19148     5.406899e+02 1.141300e+02\n9 19148     3.946801e+02 7.523999e+01\n10 19148     6.784700e+02 1.634200e+02\n12 19148     6.197900e+02 1.239400e+02\n6 19149     1.837900e+02 1.066000e+02\n7 19149     1.201800e+02 1.689400e+02\n8 19149     3.185300e+02 2.635999e+01\n13 19149     5.525300e+02 -1.867200e+02\n15 19149     2.508600e+02 1.949500e+02\n6 19150     2.538100e+02 1.056200e+02\n12 19150     2.900601e+02 1.468000e+02\n6 19151     4.293900e+02 1.054200e+02\n7 19151     4.290200e+02 1.582700e+02\n10 19151     5.753600e+02 1.828500e+02\n12 19151     5.132100e+02 1.167100e+02\n13 19151     7.980601e+02 -2.181600e+02\n15 19151     7.747400e+02 1.927400e+02\n6 19152     2.468400e+02 1.042900e+02\n12 19152     2.814500e+02 1.478100e+02\n6 19153     1.309100e+02 8.337000e+01\n8 19153     2.785200e+02 1.557001e+01\n12 19153     1.517600e+02 1.333500e+02\n6 19154     -1.128003e+01 7.625000e+01\n8 19154     1.687500e+02 1.392999e+01\n6 19155     -2.666300e+02 6.894000e+01\n8 19155     -2.965002e+01 -1.937000e+01\n6 19156     -3.510300e+02 6.789001e+01\n12 19156     -2.882600e+02 1.211800e+02\n6 19157     -2.917800e+02 6.115997e+01\n12 19157     -2.337100e+02 1.131100e+02\n6 19158     -4.447600e+02 5.798999e+01\n9 19158     -3.564100e+02 -9.419983e+00\n6 19159     -1.949400e+02 4.987000e+01\n7 19159     -1.892100e+02 1.592600e+02\n12 19159     -1.634000e+02 1.052800e+02\n6 19160     1.820500e+02 3.128998e+01\n8 19160     3.187400e+02 -2.612000e+01\n6 19161     2.158002e+01 2.101001e+01\n12 19161     3.454999e+01 7.419000e+01\n6 19162     -2.288100e+02 2.010999e+01\n12 19162     -1.925900e+02 7.583002e+01\n6 19163     2.829400e+02 1.829999e+01\n12 19163     3.189200e+02 5.626001e+01\n6 19164     -2.242999e+01 1.596997e+01\n8 19164     1.597100e+02 -3.029001e+01\n12 19164     -9.200012e+00 7.028998e+01\n6 19165     -1.728600e+02 1.559998e+00\n8 19165     4.113000e+01 -5.112000e+01\n6 19166     4.598400e+02 -1.590027e+00\n7 19166     4.301200e+02 6.322998e+01\n12 19166     5.340200e+02 1.366998e+01\n6 19167     1.293500e+02 -9.559998e+00\n12 19167     1.443500e+02 3.790002e+01\n6 19168     -3.034400e+02 -1.690997e+01\n8 19168     -5.990002e+01 -7.600000e+01\n6 19169     -1.317600e+02 -3.296002e+01\n8 19169     7.222998e+01 -7.322998e+01\n6 19170     1.253000e+02 -3.340997e+01\n8 19170     2.750800e+02 -7.142999e+01\n6 19171     4.619200e+02 -3.502002e+01\n12 19171     5.337500e+02 -1.833002e+01\n6 19172     -2.689001e+01 -3.615997e+01\n8 19172     1.542800e+02 -7.083002e+01\n12 19172     -1.540997e+01 1.778003e+01\n6 19173     3.900300e+02 -3.903003e+01\n7 19173     2.979500e+02 2.389001e+01\n12 19173     4.280601e+02 -6.979980e+00\n6 19174     -1.775700e+02 -4.306000e+01\n12 19174     -1.580500e+02 1.434998e+01\n6 19175     3.129200e+02 -4.496002e+01\n12 19175     3.428101e+02 -8.020020e+00\n6 19176     -1.676000e+02 -5.000000e+01\n12 19176     -1.494400e+02 7.330017e+00\n6 19177     1.253000e+02 -6.445001e+01\n8 19177     2.750900e+02 -9.613000e+01\n12 19177     1.391900e+02 -1.750000e+01\n6 19178     -5.533002e+01 -7.859998e+01\n10 19178     -1.217200e+02 5.617999e+01\n6 19179     -9.320007e+00 -8.294000e+01\n8 19179     1.682800e+02 -1.087400e+02\n6 19180     -1.001300e+02 -9.023999e+01\n12 19180     -9.091998e+01 -3.427002e+01\n6 19181     3.842000e+02 -9.547998e+01\n8 19181     4.756700e+02 -1.406400e+02\n12 19181     4.162300e+02 -6.346002e+01\n6 19182     7.883002e+01 -1.317700e+02\n8 19182     2.390000e+02 -1.429000e+02\n6 19183     1.839300e+02 -1.319300e+02\n12 19183     1.960000e+02 -8.967999e+01\n6 19184     2.487800e+02 -1.506200e+02\n8 19184     3.734900e+02 -1.662100e+02\n6 19185     -2.758800e+02 -1.669700e+02\n7 19185     -2.740300e+02 -9.760010e+00\n9 19185     -1.786500e+02 -6.469000e+01\n12 19185     -2.539100e+02 -1.053400e+02\n6 19186     -2.240200e+02 -1.709000e+02\n7 19186     -2.449100e+02 -2.065997e+01\n12 19186     -2.116500e+02 -1.104100e+02\n6 19187     -1.683200e+02 -1.795100e+02\n8 19187     4.048999e+01 -1.742800e+02\n6 19188     8.073999e+01 -1.876000e+02\n12 19188     8.203003e+01 -1.405600e+02\n6 19189     4.060999e+01 -1.995200e+02\n7 19189     -5.383002e+01 -7.953998e+01\n10 19189     -7.940997e+01 -8.358002e+01\n12 19189     3.919000e+01 -1.509200e+02\n6 19190     3.509700e+02 -2.115400e+02\n12 19190     3.810000e+02 -1.818200e+02\n6 19191     -5.737000e+01 -2.128300e+02\n7 19191     -1.328500e+02 -7.839001e+01\n12 19191     -5.946002e+01 -1.597000e+02\n15 19191     -1.169600e+02 -1.128500e+02\n6 19192     -1.533000e+02 -2.278700e+02\n8 19192     5.100000e+01 -2.190300e+02\n6 19193     3.472700e+02 -2.433199e+02\n12 19193     3.769700e+02 -2.150200e+02\n6 19194     3.472700e+02 -2.433199e+02\n7 19194     2.400200e+02 -1.413800e+02\n12 19194     3.769700e+02 -2.150200e+02\n6 19195     -5.159973e+00 -2.873600e+02\n8 19195     1.680600e+02 -2.691500e+02\n6 19196     1.673100e+02 -2.886899e+02\n8 19196     3.087800e+02 -2.739900e+02\n6 19197     -5.760999e+01 -2.920800e+02\n8 19197     1.260800e+02 -2.753900e+02\n12 19197     -5.434003e+01 -2.404900e+02\n6 19198     -1.284700e+02 -2.958199e+02\n7 19198     -1.775200e+02 -1.320000e+02\n8 19198     6.889001e+01 -2.814400e+02\n9 19198     -4.845001e+01 -1.558300e+02\n6 19199     -1.930900e+02 -3.017400e+02\n7 19199     -2.176900e+02 -1.248400e+02\n9 19199     -1.070000e+02 -1.772200e+02\n12 19199     -1.772300e+02 -2.420500e+02\n13 19199     2.279900e+02 -4.230500e+02\n6 19200     2.465900e+02 -3.044900e+02\n12 19200     2.615400e+02 -2.710100e+02\n6 19201     2.465900e+02 -3.044900e+02\n12 19201     2.615400e+02 -2.710100e+02\n6 19202     2.149400e+02 -3.069301e+02\n8 19202     3.441200e+02 -3.017500e+02\n12 19202     2.273199e+02 -2.713400e+02\n6 19203     2.118000e+02 -3.150699e+02\n8 19203     3.425700e+02 -3.074100e+02\n6 19204     2.118000e+02 -3.150699e+02\n8 19204     3.425700e+02 -3.074100e+02\n6 19205     3.017500e+02 -3.183800e+02\n12 19205     3.220100e+02 -2.886600e+02\n6 19206     -7.758002e+01 -3.301600e+02\n7 19206     -1.420200e+02 -1.658200e+02\n8 19206     1.082200e+02 -3.092200e+02\n6 19207     5.015002e+01 -3.499800e+02\n12 19207     5.515997e+01 -3.053300e+02\n6 19208     -5.177700e+02 -3.623700e+02\n7 19208     -4.350100e+02 -1.263900e+02\n13 19208     1.642999e+01 -4.089100e+02\n6 19209     -5.177700e+02 -3.623700e+02\n9 19209     -3.829300e+02 -2.667900e+02\n13 19209     1.642999e+01 -4.089100e+02\n6 19210     -4.451000e+02 -4.581000e+02\n9 19210     -3.129800e+02 -3.259100e+02\n6 19211     1.576600e+02 -4.707700e+02\n12 19211     1.612800e+02 -4.338400e+02\n6 19212     1.829100e+02 -4.782100e+02\n12 19212     1.871200e+02 -4.432900e+02\n6 19213     3.991800e+02 -5.247000e+02\n7 19213     2.338199e+02 -3.845000e+02\n6 19214     -2.941000e+02 -5.654500e+02\n15 19214     -3.672400e+02 -3.943000e+02\n6 19215     -2.158200e+02 -6.241500e+02\n9 19215     -9.814001e+01 -4.252400e+02\n6 19216     3.684700e+02 -6.238800e+02\n7 19216     1.802000e+02 -4.653500e+02\n12 19216     3.620601e+02 -6.058800e+02\n6 19217     4.328600e+02 -6.866000e+02\n7 19217     2.157900e+02 -5.283700e+02\n6 19218     -1.088600e+02 -7.002800e+02\n7 19218     -2.216600e+02 -4.546801e+02\n6 19219     -9.904999e+01 -7.050601e+02\n7 19219     -2.153000e+02 -4.607900e+02\n6 19220     4.807001e+01 -8.286899e+02\n9 19220     1.566200e+02 -5.492300e+02\n6 19221     -8.392999e+01 -8.353500e+02\n7 19221     -2.373400e+02 -5.681600e+02\n6 19222     2.706900e+02 8.759400e+02\n8 19222     3.533200e+02 4.479400e+02\n6 19223     6.725000e+01 8.604800e+02\n8 19223     2.084300e+02 3.644200e+02\n6 19224     -2.604400e+02 8.567200e+02\n8 19224     -3.539978e+00 3.948500e+02\n6 19225     -2.604400e+02 8.567200e+02\n8 19225     -3.539978e+00 3.948500e+02\n6 19226     -2.209003e+01 8.478400e+02\n11 19226     5.447900e+02 -7.934003e+01\n6 19227     1.628900e+02 8.439100e+02\n9 19227     6.765997e+01 5.522800e+02\n11 19227     5.905300e+02 -9.989001e+01\n6 19228     -1.372000e+02 8.385000e+02\n8 19228     7.609998e+01 3.709100e+02\n6 19229     -4.461700e+02 8.228400e+02\n8 19229     -1.255200e+02 3.918100e+02\n6 19230     1.923500e+02 8.161400e+02\n8 19230     2.999200e+02 4.051100e+02\n9 19230     8.919000e+01 5.355400e+02\n11 19230     6.101400e+02 -1.212800e+02\n6 19231     4.460300e+02 8.075900e+02\n8 19231     4.814900e+02 4.369600e+02\n6 19232     -4.948000e+02 7.807400e+02\n8 19232     -1.589300e+02 3.703700e+02\n6 19233     -6.572998e+01 7.684200e+02\n13 19233     5.103500e+02 3.086400e+02\n6 19234     -6.572998e+01 7.684200e+02\n9 19234     -1.150000e+02 4.276500e+02\n13 19234     5.103500e+02 3.086400e+02\n6 19235     -4.726300e+02 7.086900e+02\n8 19235     -1.476300e+02 3.213800e+02\n6 19236     -3.229500e+02 7.051200e+02\n8 19236     -4.860999e+01 3.051000e+02\n6 19237     -3.507001e+01 7.008200e+02\n8 19237     1.413100e+02 2.722200e+02\n6 19238     4.542800e+02 6.852500e+02\n9 19238     2.983101e+02 4.993200e+02\n6 19239     -1.817100e+02 6.672200e+02\n8 19239     4.325000e+01 2.648900e+02\n6 19240     -1.010800e+02 6.388000e+02\n12 19240     6.082001e+01 5.984300e+02\n6 19241     -1.010800e+02 6.388000e+02\n8 19241     9.765002e+01 2.388300e+02\n12 19241     6.082001e+01 5.984300e+02\n6 19242     -2.279800e+02 6.324600e+02\n8 19242     1.170001e+01 2.470600e+02\n9 19242     -2.237400e+02 3.459500e+02\n11 19242     3.574600e+02 -2.106600e+02\n12 19242     -6.304999e+01 5.987800e+02\n6 19243     -1.758000e+02 6.292700e+02\n12 19243     -1.095001e+01 5.922600e+02\n6 19244     -1.305000e+02 6.182100e+02\n12 19244     3.210999e+01 5.816000e+02\n6 19245     4.882400e+02 5.975300e+02\n12 19245     5.689100e+02 6.080700e+02\n6 19246     -4.039800e+02 5.955800e+02\n12 19246     -2.322700e+02 5.724100e+02\n6 19247     -4.039800e+02 5.955800e+02\n9 19247     -3.457600e+02 3.390700e+02\n12 19247     -2.322700e+02 5.724100e+02\n6 19248     -3.517000e+02 5.513100e+02\n12 19248     -1.827900e+02 5.300000e+02\n6 19249     4.669301e+02 5.402900e+02\n7 19249     4.867400e+02 5.243900e+02\n12 19249     5.481200e+02 5.497000e+02\n6 19250     4.669301e+02 5.402900e+02\n7 19250     4.867400e+02 5.243900e+02\n12 19250     5.481200e+02 5.497000e+02\n6 19251     -5.307300e+02 5.336900e+02\n8 19251     -1.942100e+02 2.120600e+02\n6 19252     3.512900e+02 5.268800e+02\n8 19252     4.203300e+02 2.391400e+02\n9 19252     2.287700e+02 3.711000e+02\n6 19253     2.575600e+02 5.069000e+02\n7 19253     3.394500e+02 5.118300e+02\n9 19253     1.500800e+02 3.196700e+02\n11 19253     6.578000e+02 -3.643300e+02\n6 19254     1.727500e+02 5.040800e+02\n9 19254     8.637000e+01 3.072600e+02\n12 19254     2.824100e+02 4.966300e+02\n6 19255     3.490997e+01 5.013400e+02\n13 19255     5.584900e+02 1.188000e+02\n6 19256     3.242999e+01 4.949100e+02\n7 19256     2.056899e+02 5.158600e+02\n13 19256     5.564399e+02 1.143400e+02\n6 19257     4.318300e+02 4.939600e+02\n9 19257     2.918500e+02 3.562800e+02\n12 19257     5.149399e+02 5.026800e+02\n6 19258     -4.848700e+02 4.802500e+02\n12 19258     -3.101000e+02 4.715000e+02\n6 19259     -5.192200e+02 4.778900e+02\n12 19259     -3.432300e+02 4.704800e+02\n6 19260     2.929200e+02 4.692100e+02\n8 19260     3.743500e+02 1.731400e+02\n9 19260     1.781700e+02 2.952200e+02\n12 19260     3.942200e+02 4.644700e+02\n6 19261     1.443900e+02 4.357600e+02\n13 19261     6.166200e+02 6.137000e+01\n6 19262     1.928700e+02 4.163200e+02\n8 19262     3.028900e+02 1.288400e+02\n13 19262     6.530800e+02 4.192999e+01\n6 19263     1.809700e+02 4.119600e+02\n8 19263     2.949400e+02 1.246600e+02\n12 19263     2.932500e+02 4.074000e+02\n6 19264     3.720900e+02 4.103200e+02\n7 19264     4.035300e+02 4.206300e+02\n8 19264     4.366400e+02 1.557700e+02\n9 19264     2.501100e+02 2.857200e+02\n12 19264     4.585500e+02 4.174600e+02\n13 19264     7.783300e+02 2.014001e+01\n15 19264     7.594301e+02 5.704700e+02\n6 19265     2.279200e+02 3.813600e+02\n7 19265     3.099301e+02 4.102500e+02\n8 19265     3.277000e+02 1.054800e+02\n10 19265     4.703500e+02 5.060300e+02\n13 19265     6.738800e+02 1.489001e+01\n6 19266     2.508100e+02 3.515900e+02\n7 19266     3.251899e+02 3.817400e+02\n8 19266     3.448500e+02 8.512000e+01\n12 19266     3.562000e+02 3.509300e+02\n6 19267     2.544000e+02 3.391400e+02\n7 19267     3.277000e+02 3.714000e+02\n6 19268     4.106200e+02 3.351600e+02\n12 19268     4.960300e+02 3.424800e+02\n6 19269     1.863100e+02 3.330100e+02\n7 19269     2.760400e+02 3.731100e+02\n13 19269     6.386200e+02 -1.600000e+01\n15 19269     5.978900e+02 5.254700e+02\n6 19270     2.507400e+02 3.299100e+02\n7 19270     3.239000e+02 3.652300e+02\n6 19271     1.982800e+02 3.269800e+02\n7 19271     2.846600e+02 3.670700e+02\n13 19271     6.469700e+02 -2.196002e+01\n15 19271     6.086500e+02 5.156800e+02\n6 19272     1.920000e+02 3.237200e+02\n7 19272     2.800601e+02 3.642700e+02\n13 19272     6.425400e+02 -2.432001e+01\n15 19272     6.026000e+02 5.114700e+02\n6 19273     -5.550200e+02 3.165700e+02\n7 19273     -2.969400e+02 4.120700e+02\n11 19273     6.981000e+01 -3.914500e+02\n12 19273     -3.777400e+02 3.271400e+02\n6 19274     -8.335999e+01 3.170800e+02\n13 19274     4.400400e+02 9.997559e-02\n14 19274     6.277700e+02 -4.598600e+02\n6 19275     4.252400e+02 3.149200e+02\n9 19275     2.959000e+02 2.186500e+02\n10 19275     6.022100e+02 3.911200e+02\n6 19276     -4.755200e+02 3.136100e+02\n7 19276     -2.310800e+02 4.061000e+02\n8 19276     -1.675100e+02 5.366000e+01\n6 19277     -1.812000e+02 2.838200e+02\n13 19277     3.651700e+02 -1.284003e+01\n6 19278     5.762400e+02 2.820700e+02\n8 19278     5.909200e+02 7.314001e+01\n9 19278     4.118600e+02 2.122500e+02\n10 19278     7.399200e+02 3.262600e+02\n6 19279     -2.152700e+02 2.702500e+02\n11 19279     2.867400e+02 -4.733800e+02\n6 19280     -2.280800e+02 2.429700e+02\n10 19280     2.232001e+01 4.462100e+02\n6 19281     3.814100e+02 2.312100e+02\n7 19281     4.002600e+02 2.685000e+02\n8 19281     4.457900e+02 2.131000e+01\n10 19281     5.508000e+02 3.171600e+02\n12 19281     4.679399e+02 2.407000e+02\n15 19281     7.430300e+02 3.522600e+02\n6 19282     5.843600e+02 2.201400e+02\n8 19282     5.990000e+02 2.616000e+01\n6 19283     4.690300e+02 1.875300e+02\n8 19283     5.123199e+02 -6.670013e+00\n9 19283     3.363300e+02 1.239500e+02\n12 19283     5.512300e+02 1.978100e+02\n6 19284     5.360699e+02 1.627600e+02\n12 19284     6.160300e+02 1.726400e+02\n6 19285     -4.129999e+01 1.375900e+02\n8 19285     1.451100e+02 5.398001e+01\n6 19286     5.529200e+02 1.276400e+02\n12 19286     6.318000e+02 1.373000e+02\n6 19287     9.067999e+01 1.261500e+02\n12 19287     1.137100e+02 1.775000e+02\n6 19288     5.268300e+02 1.141100e+02\n12 19288     6.063500e+02 1.238900e+02\n6 19289     -1.871400e+02 1.110000e+02\n12 19289     -1.516300e+02 1.654200e+02\n6 19290     4.393199e+02 1.019700e+02\n15 19290     7.846801e+02 1.861600e+02\n6 19291     -4.214300e+02 9.590997e+01\n7 19291     -2.480300e+02 2.300000e+02\n8 19291     -1.406600e+02 -6.669000e+01\n9 19291     -3.411100e+02 1.259998e+01\n6 19292     5.555400e+02 9.094000e+01\n12 19292     6.337500e+02 1.007800e+02\n6 19293     1.262600e+02 7.695001e+01\n8 19293     2.764800e+02 1.103000e+01\n6 19294     5.685500e+02 7.354999e+01\n8 19294     5.891400e+02 -8.964001e+01\n10 19294     6.967100e+02 1.165000e+02\n12 19294     6.464700e+02 8.291998e+01\n6 19295     -4.706700e+02 6.102002e+01\n7 19295     -2.925700e+02 2.077900e+02\n6 19296     1.364400e+02 3.669000e+01\n8 19296     2.830300e+02 -1.809000e+01\n12 19296     1.545500e+02 8.571002e+01\n6 19297     -4.008100e+02 2.697998e+01\n9 19297     -3.199700e+02 -2.545001e+01\n6 19298     -5.250000e+01 -5.940002e+00\n12 19298     -3.976001e+01 4.964001e+01\n6 19299     -1.773800e+02 -2.840002e+01\n12 19299     -1.536000e+02 2.870001e+01\n6 19300     9.979980e+00 -2.896002e+01\n12 19300     2.103998e+01 2.331000e+01\n6 19301     1.919600e+02 -3.114001e+01\n7 19301     1.074400e+02 4.764001e+01\n12 19301     2.118800e+02 1.321002e+01\n6 19302     -6.882001e+01 -3.716998e+01\n12 19302     -5.596002e+01 1.810999e+01\n6 19303     1.251400e+02 -4.359003e+01\n12 19303     1.398700e+02 3.460022e+00\n6 19304     7.453998e+01 -4.603998e+01\n13 19304     4.455601e+02 -2.837400e+02\n6 19305     -1.238000e+02 -6.994000e+01\n12 19305     -1.106300e+02 -1.334998e+01\n6 19306     -1.077900e+02 -7.252002e+01\n8 19306     9.146002e+01 -1.014200e+02\n12 19306     -9.459998e+01 -1.708002e+01\n6 19307     4.909003e+01 -7.412000e+01\n7 19307     -2.378003e+01 2.684998e+01\n8 19307     2.147600e+02 -1.006600e+02\n13 19307     4.230000e+02 -3.000700e+02\n6 19308     -8.612000e+01 -8.408002e+01\n8 19308     1.070600e+02 -1.076600e+02\n12 19308     -7.564001e+01 -2.879999e+01\n6 19309     1.562900e+02 -1.028900e+02\n8 19309     3.016300e+02 -1.244300e+02\n12 19309     1.673200e+02 -5.798999e+01\n6 19310     7.590997e+01 -1.065600e+02\n12 19310     8.414001e+01 -5.863000e+01\n6 19311     -2.110999e+01 -1.083000e+02\n12 19311     -1.542999e+01 -5.522998e+01\n6 19312     -8.931000e+01 -1.634700e+02\n12 19312     -8.484998e+01 -1.080100e+02\n6 19313     -9.314001e+01 -1.684700e+02\n10 19313     -1.812600e+02 -2.117999e+01\n12 19313     -9.065002e+01 -1.134200e+02\n15 19313     -1.358800e+02 -5.450000e+01\n6 19314     -9.314001e+01 -1.684700e+02\n10 19314     -1.812600e+02 -2.117999e+01\n12 19314     -9.065002e+01 -1.134200e+02\n15 19314     -1.358800e+02 -5.450000e+01\n6 19315     3.404500e+02 -2.445200e+02\n12 19315     3.686801e+02 -2.150600e+02\n6 19316     3.520400e+02 -2.478600e+02\n12 19316     3.833700e+02 -2.196200e+02\n6 19317     3.279900e+02 -2.505400e+02\n12 19317     3.540900e+02 -2.213600e+02\n6 19318     7.984998e+01 -2.570699e+02\n9 19318     1.255100e+02 -9.876001e+01\n13 19318     4.205800e+02 -4.395300e+02\n6 19319     1.603100e+02 -3.003800e+02\n8 19319     3.021700e+02 -2.876600e+02\n9 19319     1.898300e+02 -1.397500e+02\n12 19319     1.659200e+02 -2.618000e+02\n6 19320     -5.879999e+01 -3.324399e+02\n8 19320     1.235500e+02 -3.111000e+02\n9 19320     1.145001e+01 -1.799100e+02\n6 19321     2.627700e+02 -3.347100e+02\n12 19321     2.812500e+02 -3.023600e+02\n6 19322     3.291500e+02 -3.594100e+02\n8 19322     4.361700e+02 -3.514900e+02\n6 19323     -4.691700e+02 -3.642900e+02\n7 19323     -4.009700e+02 -1.339200e+02\n6 19324     1.613100e+02 -3.742500e+02\n12 19324     1.682000e+02 -3.361600e+02\n6 19325     -5.321300e+02 -4.095100e+02\n7 19325     -4.569800e+02 -1.626100e+02\n8 19325     -2.522900e+02 -3.764500e+02\n13 19325     -1.419983e+00 -4.389800e+02\n6 19326     -3.099976e+00 -4.225500e+02\n13 19326     3.442000e+02 -5.458800e+02\n6 19327     -4.625900e+02 -4.309100e+02\n8 19327     -2.000700e+02 -3.936500e+02\n6 19328     -5.210200e+02 -4.516899e+02\n7 19328     -4.590200e+02 -1.970100e+02\n6 19329     -3.986800e+02 -4.972800e+02\n7 19329     -3.846000e+02 -2.490600e+02\n9 19329     -2.709000e+02 -3.489100e+02\n15 19329     -4.283800e+02 -2.937500e+02\n6 19330     -2.819300e+02 -5.463199e+02\n15 19330     -3.472400e+02 -3.765400e+02\n6 19331     -3.930400e+02 -5.583600e+02\n7 19331     -3.947900e+02 -2.994400e+02\n6 19332     -3.202500e+02 -5.665300e+02\n15 19332     -3.905200e+02 -3.870200e+02\n6 19333     -3.554800e+02 -6.069800e+02\n9 19333     -2.222500e+02 -4.217500e+02\n6 19334     -9.257001e+01 -6.167100e+02\n9 19334     5.179993e+00 -4.124200e+02\n6 19335     -2.547300e+02 -6.383600e+02\n9 19335     -1.307800e+02 -4.372500e+02\n6 19336     -1.237200e+02 -6.470900e+02\n9 19336     -1.721002e+01 -4.352200e+02\n6 19337     5.345200e+02 -6.846100e+02\n7 19337     3.022100e+02 -5.426700e+02\n9 19337     5.294800e+02 -4.144500e+02\n6 19338     -1.441600e+02 -7.409900e+02\n9 19338     -2.209998e+01 -5.008600e+02\n6 19339     -1.541500e+02 -7.958800e+02\n7 19339     -2.799800e+02 -5.253800e+02\n6 19340     3.612000e+01 -8.001700e+02\n7 19340     -1.358200e+02 -5.597800e+02\n9 19340     1.425800e+02 -5.290200e+02\n6 19341     2.984003e+01 -8.076400e+02\n7 19341     -1.420200e+02 -5.651700e+02\n6 19342     -1.142200e+02 -8.197700e+02\n7 19342     -2.561600e+02 -5.508400e+02\n6 19343     3.721997e+01 -8.219900e+02\n7 19343     -1.410800e+02 -5.783300e+02\n9 19343     1.467400e+02 -5.454900e+02\n6 19344     -9.775000e+01 -8.301400e+02\n7 19344     -2.462000e+02 -5.620900e+02\n6 19345     1.767100e+02 8.532600e+02\n8 19345     2.894900e+02 4.287700e+02\n6 19346     -1.902002e+01 8.057600e+02\n13 19346     5.498199e+02 3.315400e+02\n6 19347     3.978000e+02 8.018500e+02\n8 19347     4.473199e+02 4.333500e+02\n6 19348     -4.601500e+02 8.008300e+02\n8 19348     -1.353300e+02 3.791100e+02\n6 19349     -3.762000e+01 7.742000e+02\n11 19349     5.301400e+02 -1.269900e+02\n14 19349     7.297100e+02 -7.721002e+01\n6 19350     5.464399e+02 7.731900e+02\n8 19350     5.540400e+02 4.227700e+02\n6 19351     5.570601e+02 7.496100e+02\n8 19351     5.648600e+02 4.131600e+02\n6 19352     2.380100e+02 7.492600e+02\n8 19352     3.322800e+02 3.636000e+02\n9 19352     1.257600e+02 4.935300e+02\n6 19353     1.270001e+01 7.428000e+02\n9 19353     -6.201001e+01 4.001400e+02\n14 19353     7.756899e+02 -1.084000e+02\n6 19354     -2.580017e+00 6.826800e+02\n8 19354     1.620300e+02 2.566300e+02\n6 19355     -5.612600e+02 6.763500e+02\n8 19355     -2.077800e+02 3.090700e+02\n6 19356     3.087000e+01 6.701100e+02\n8 19356     1.846800e+02 2.448800e+02\n12 19356     1.901100e+02 6.192900e+02\n6 19357     3.087000e+01 6.701100e+02\n8 19357     1.846800e+02 2.448800e+02\n6 19358     -1.243100e+02 6.204900e+02\n8 19358     8.204999e+01 2.292300e+02\n12 19358     3.851001e+01 5.831300e+02\n6 19359     4.554800e+02 5.737400e+02\n8 19359     4.942900e+02 2.805100e+02\n9 19359     3.054600e+02 4.186000e+02\n12 19359     5.379399e+02 5.832500e+02\n6 19360     -4.654400e+02 5.710300e+02\n8 19360     -1.486600e+02 2.298500e+02\n9 19360     -3.890600e+02 3.258100e+02\n13 19360     2.039800e+02 2.003300e+02\n6 19361     -2.451800e+02 5.581600e+02\n12 19361     -7.872998e+01 5.340800e+02\n6 19362     -2.451800e+02 5.581600e+02\n8 19362     -1.659973e+00 2.000200e+02\n6 19363     4.335300e+02 5.301200e+02\n9 19363     2.907900e+02 3.836600e+02\n6 19364     -4.502100e+02 5.109200e+02\n8 19364     -1.409900e+02 1.874700e+02\n6 19365     2.999500e+02 4.828800e+02\n8 19365     3.798900e+02 1.837400e+02\n9 19365     1.834301e+02 3.064100e+02\n6 19366     2.999500e+02 4.828800e+02\n9 19366     1.834301e+02 3.064100e+02\n12 19366     4.010300e+02 4.787300e+02\n6 19367     -4.877900e+02 4.296400e+02\n8 19367     -1.705600e+02 1.363900e+02\n9 19367     -4.069500e+02 2.216700e+02\n14 19367     2.940900e+02 -3.064100e+02\n6 19368     2.098200e+02 4.192800e+02\n7 19368     2.985800e+02 4.424700e+02\n10 19368     4.602400e+02 5.459000e+02\n12 19368     3.182900e+02 4.148300e+02\n13 19368     6.640400e+02 4.406000e+01\n6 19369     4.266600e+02 3.790200e+02\n8 19369     4.774301e+02 1.358600e+02\n9 19369     2.936801e+02 2.684900e+02\n10 19369     6.123600e+02 4.573200e+02\n12 19369     5.107100e+02 3.873000e+02\n6 19370     2.289200e+02 3.589300e+02\n7 19370     3.090900e+02 3.909000e+02\n15 19370     6.443600e+02 5.469600e+02\n6 19371     5.559800e+02 3.112000e+02\n8 19371     5.751000e+02 9.407001e+01\n12 19371     6.354301e+02 3.216900e+02\n6 19372     2.378300e+02 3.035000e+02\n7 19372     3.130300e+02 3.441400e+02\n6 19373     -2.820700e+02 2.866700e+02\n13 19373     2.956500e+02 -1.010010e+00\n14 19373     4.441600e+02 -4.544800e+02\n6 19374     -1.675500e+02 2.514500e+02\n10 19374     7.946997e+01 4.430800e+02\n6 19375     3.963600e+02 2.039200e+02\n10 19375     5.601100e+02 2.870700e+02\n12 19375     4.819600e+02 2.147900e+02\n13 19375     7.802000e+02 -1.373200e+02\n6 19376     4.158000e+02 1.923400e+02\n10 19376     5.758101e+02 2.710100e+02\n6 19377     1.663800e+02 1.819700e+02\n12 19377     2.018400e+02 2.276300e+02\n6 19378     1.582700e+02 1.777600e+02\n13 19378     5.457600e+02 -1.316900e+02\n6 19379     4.435500e+02 1.571400e+02\n7 19379     4.440500e+02 1.982500e+02\n8 19379     4.934200e+02 -3.250000e+01\n6 19380     1.636800e+02 1.423800e+02\n10 19380     1.374800e+02 2.264600e+02\n12 19380     1.930200e+02 1.895000e+02\n13 19380     5.415200e+02 -1.583000e+02\n6 19381     5.164700e+02 1.421700e+02\n7 19381     4.999200e+02 1.784400e+02\n10 19381     6.594900e+02 1.974900e+02\n12 19381     5.966200e+02 1.519700e+02\n6 19382     2.947998e+01 1.342500e+02\n12 19382     5.152002e+01 1.866500e+02\n6 19383     5.724900e+02 1.090800e+02\n12 19383     6.510601e+02 1.183800e+02\n6 19384     1.647700e+02 9.615002e+01\n8 19384     3.045100e+02 2.094000e+01\n6 19385     -4.093900e+02 7.984998e+01\n8 19385     -1.320100e+02 -7.627002e+01\n6 19386     2.296200e+02 5.078003e+01\n7 19386     1.542700e+02 1.152000e+02\n10 19386     1.868200e+02 1.242700e+02\n13 19386     5.821600e+02 -2.348400e+02\n6 19387     -8.840027e+00 4.971002e+01\n7 19387     -5.903998e+01 1.374800e+02\n15 19387     1.359985e+00 1.673900e+02\n6 19388     2.105200e+02 3.903998e+01\n7 19388     1.332100e+02 1.065900e+02\n6 19389     1.887900e+02 1.235999e+01\n7 19389     1.095900e+02 8.564001e+01\n8 19389     3.232400e+02 -4.151001e+01\n15 19389     2.241400e+02 8.041000e+01\n6 19390     -2.292900e+02 4.409973e+00\n12 19390     -1.966900e+02 6.071997e+01\n6 19391     -1.998800e+02 -3.913000e+01\n12 19391     -1.776100e+02 1.865002e+01\n6 19392     -2.577000e+02 -4.066998e+01\n12 19392     -2.250700e+02 1.684003e+01\n6 19393     -2.577000e+02 -4.066998e+01\n12 19393     -2.250700e+02 1.684003e+01\n6 19394     1.979500e+02 -4.234003e+01\n8 19394     3.314600e+02 -8.488000e+01\n12 19394     2.181400e+02 9.799805e-01\n6 19395     1.979500e+02 -4.234003e+01\n8 19395     3.314600e+02 -8.488000e+01\n12 19395     2.181400e+02 9.799805e-01\n6 19396     -1.454700e+02 -4.903003e+01\n12 19396     -1.272200e+02 7.510010e+00\n6 19397     -1.109000e+02 -5.640997e+01\n12 19397     -9.603003e+01 -1.030029e+00\n6 19398     -1.273100e+02 -5.682001e+01\n12 19398     -1.112600e+02 -2.999878e-01\n6 19399     -3.444000e+01 -6.265997e+01\n12 19399     -2.334998e+01 -8.969971e+00\n6 19400     1.746100e+02 -6.557001e+01\n8 19400     3.120700e+02 -1.014800e+02\n6 19401     -1.031700e+02 -1.010800e+02\n12 19401     -9.614001e+01 -4.550000e+01\n6 19402     -1.064001e+01 -1.008600e+02\n12 19402     -3.289978e+00 -4.891998e+01\n6 19403     1.763800e+02 -1.169600e+02\n12 19403     1.875300e+02 -7.354999e+01\n6 19404     3.681100e+02 -1.287000e+02\n12 19404     3.982700e+02 -9.620001e+01\n6 19405     -6.128003e+01 -1.497100e+02\n12 19405     -5.614001e+01 -9.614001e+01\n6 19406     3.259000e+02 -1.587100e+02\n12 19406     3.445800e+02 -1.234800e+02\n6 19407     -2.291200e+02 -1.630601e+02\n8 19407     -7.510010e+00 -1.691800e+02\n12 19407     -2.160900e+02 -1.026700e+02\n6 19408     -2.446002e+01 -1.660500e+02\n12 19408     -2.084998e+01 -1.137400e+02\n6 19409     9.882001e+01 -1.760500e+02\n12 19409     1.056300e+02 -1.288700e+02\n6 19410     3.058000e+02 -1.923000e+02\n8 19410     4.186100e+02 -2.049200e+02\n12 19410     3.232500e+02 -1.583300e+02\n6 19411     -1.511200e+02 -2.042600e+02\n8 19411     5.263000e+01 -1.969700e+02\n12 19411     -1.500400e+02 -1.461800e+02\n6 19412     2.875900e+02 -2.556100e+02\n12 19412     3.081000e+02 -2.207100e+02\n6 19413     3.431500e+02 -2.649100e+02\n12 19413     3.737900e+02 -2.373000e+02\n6 19414     -5.189300e+02 -3.232200e+02\n12 19414     -4.553300e+02 -2.446800e+02\n6 19415     -5.189300e+02 -3.232200e+02\n7 19415     -4.246600e+02 -9.514001e+01\n6 19416     5.607001e+01 -3.561899e+02\n12 19416     6.245001e+01 -3.133700e+02\n6 19417     -5.392800e+02 -3.631400e+02\n7 19417     -4.511000e+02 -1.254600e+02\n8 19417     -2.534700e+02 -3.445500e+02\n9 19417     -4.022100e+02 -2.690000e+02\n13 19417     3.059998e+00 -4.058500e+02\n6 19418     3.219000e+01 -4.027000e+02\n13 19418     3.739301e+02 -5.376801e+02\n6 19419     -2.748800e+02 -5.539200e+02\n15 19419     -3.431000e+02 -3.888900e+02\n6 19420     -3.442600e+02 -5.676400e+02\n7 19420     -3.593200e+02 -3.101100e+02\n15 19420     -4.106300e+02 -3.797000e+02\n6 19421     5.488199e+02 -5.947100e+02\n7 19421     3.404301e+02 -4.665699e+02\n10 19421     3.407600e+02 -5.729600e+02\n6 19422     2.273300e+02 -6.518700e+02\n7 19422     5.640997e+01 -4.678700e+02\n6 19423     5.644600e+02 -6.734301e+02\n7 19423     3.305800e+02 -5.374100e+02\n9 19423     5.509399e+02 -4.052700e+02\n6 19424     2.839200e+02 -7.004900e+02\n7 19424     8.815002e+01 -5.170100e+02\n9 19424     3.314100e+02 -4.432100e+02\n6 19425     3.777900e+02 -7.627500e+02\n9 19425     4.205300e+02 -4.768300e+02\n6 19426     -1.962000e+01 -8.046400e+02\n7 19426     -1.798900e+02 -5.543000e+02\n6 19427     2.412900e+02 7.766300e+02\n8 19427     3.348600e+02 3.828400e+02\n11 19427     6.435200e+02 -1.549400e+02\n6 19428     2.197998e+01 7.363600e+02\n8 19428     1.790100e+02 2.892200e+02\n6 19429     -5.763200e+02 5.148000e+02\n8 19429     -2.249900e+02 2.044600e+02\n6 19430     2.093800e+02 4.640200e+02\n8 19430     3.152700e+02 1.638500e+02\n12 19430     3.177900e+02 4.578400e+02\n6 19431     -4.635900e+02 4.280200e+02\n8 19431     -1.535200e+02 1.326400e+02\n9 19431     -3.888300e+02 2.179200e+02\n13 19431     1.919399e+02 1.086300e+02\n14 19431     3.153400e+02 -3.109600e+02\n6 19432     -1.760100e+02 2.936500e+02\n13 19432     3.702000e+02 -7.210022e+00\n6 19433     1.009600e+02 6.007001e+01\n8 19433     2.547200e+02 1.679993e+00\n12 19433     1.185000e+02 1.108500e+02\n13 19433     4.799600e+02 -2.103700e+02\n15 19433     1.253100e+02 1.540400e+02\n6 19434     -2.144400e+02 5.577002e+01\n13 19434     2.621300e+02 -1.707100e+02\n6 19435     -1.747800e+02 1.467999e+01\n12 19435     -1.504400e+02 7.119000e+01\n6 19436     -7.509003e+01 1.014001e+01\n12 19436     -6.040997e+01 6.540002e+01\n6 19437     -3.419000e+01 -2.021002e+01\n8 19437     1.494900e+02 -5.820999e+01\n12 19437     -2.270001e+01 3.397998e+01\n6 19438     5.010010e+00 -8.227002e+01\n12 19438     1.459998e+01 -3.053998e+01\n6 19439     2.990400e+02 -1.356300e+02\n12 19439     3.177900e+02 -9.866998e+01\n6 19440     2.579400e+02 -1.432400e+02\n12 19440     2.709700e+02 -1.020800e+02\n6 19441     -1.510999e+01 -1.686801e+02\n12 19441     -1.171002e+01 -1.170500e+02\n6 19442     -8.910999e+01 -1.752100e+02\n12 19442     -8.708002e+01 -1.205600e+02\n6 19443     2.953300e+02 -2.051200e+02\n9 19443     2.810000e+02 -6.240997e+01\n6 19444     1.044500e+02 -2.923700e+02\n8 19444     2.573000e+02 -2.774200e+02\n12 19444     1.082000e+02 -2.506400e+02\n13 19444     4.371600e+02 -4.703000e+02\n6 19445     -1.970500e+02 -3.194900e+02\n12 19445     -1.791800e+02 -2.618000e+02\n6 19446     -1.253200e+02 -3.422300e+02\n12 19446     -1.145500e+02 -2.877500e+02\n6 19447     -3.761100e+02 -5.062600e+02\n15 19447     -4.113500e+02 -3.099500e+02\n6 19448     -4.414900e+02 -5.259600e+02\n7 19448     -4.205800e+02 -2.662500e+02\n9 19448     -3.038300e+02 -3.717600e+02\n13 19448     3.176001e+01 -5.337900e+02\n6 19449     -5.987000e+01 -6.251200e+02\n9 19449     3.327002e+01 -4.167400e+02\n6 19450     -2.322500e+02 -6.494800e+02\n7 19450     -3.016800e+02 -3.958400e+02\n6 19451     -5.226900e+02 4.754700e+02\n12 19451     -3.458100e+02 4.679500e+02\n6 19452     -5.296200e+02 4.407900e+02\n8 19452     -1.981200e+02 1.499400e+02\n6 19453     3.456700e+02 4.328900e+02\n7 19453     3.849600e+02 4.413000e+02\n12 19453     4.337800e+02 4.396500e+02\n13 19453     7.592500e+02 3.990997e+01\n6 19454     4.346600e+02 3.593200e+02\n12 19454     5.186200e+02 3.680100e+02\n6 19455     4.275500e+02 3.450700e+02\n12 19455     5.114800e+02 3.544300e+02\n6 19456     -2.769000e+01 2.463200e+02\n12 19456     1.919000e+01 2.909500e+02\n6 19457     -3.065500e+02 1.017200e+02\n12 19457     -2.397200e+02 1.493800e+02\n6 19458     -3.191300e+02 8.570001e+01\n12 19458     -2.541200e+02 1.358300e+02\n6 19459     -3.049000e+02 8.120001e+01\n12 19459     -2.416800e+02 1.316900e+02\n6 19460     8.447998e+01 7.290997e+01\n7 19460     1.919000e+01 1.465100e+02\n9 19460     1.035300e+02 1.531400e+02\n15 19460     1.052000e+02 1.717200e+02\n6 19461     2.522998e+01 -2.797998e+01\n12 19461     3.339001e+01 2.388000e+01\n6 19462     2.194000e+02 -9.770001e+01\n8 19462     3.501600e+02 -1.241100e+02\n6 19463     1.629900e+02 -1.164400e+02\n8 19463     3.050800e+02 -1.339000e+02\n12 19463     1.726300e+02 -7.459998e+01\n6 19464     1.042400e+02 -1.235500e+02\n8 19464     2.597000e+02 -1.371700e+02\n6 19465     -1.085999e+01 -1.578300e+02\n12 19465     -7.710022e+00 -1.068700e+02\n6 19466     2.667800e+02 -1.637200e+02\n8 19466     3.882500e+02 -1.748800e+02\n12 19466     2.800500e+02 -1.259900e+02\n6 19467     1.140997e+01 -1.758600e+02\n8 19467     1.841200e+02 -1.777500e+02\n12 19467     1.340002e+01 -1.244600e+02\n6 19468     3.816200e+02 -2.222600e+02\n12 19468     4.163500e+02 -1.929900e+02\n6 19469     3.560500e+02 -2.290800e+02\n12 19469     3.888400e+02 -2.000100e+02\n6 19470     3.560500e+02 -2.290800e+02\n12 19470     3.888400e+02 -2.000100e+02\n6 19471     2.456500e+02 -2.886000e+02\n8 19471     3.700400e+02 -2.864600e+02\n12 19471     2.601500e+02 -2.546700e+02\n6 19472     2.854300e+02 -3.070300e+02\n8 19472     4.006500e+02 -3.073700e+02\n12 19472     3.059800e+02 -2.736300e+02\n6 19473     2.854300e+02 -3.070300e+02\n12 19473     3.059800e+02 -2.736300e+02\n6 19474     -1.880300e+02 -3.325300e+02\n7 19474     -2.138900e+02 -1.473200e+02\n12 19474     -1.721000e+02 -2.728700e+02\n13 19474     2.278500e+02 -4.449600e+02\n6 19475     2.877000e+02 -3.317100e+02\n12 19475     3.074301e+02 -3.012500e+02\n6 19476     -1.428200e+02 -3.402600e+02\n12 19476     -1.315000e+02 -2.848400e+02\n6 19477     -4.478700e+02 -4.945699e+02\n7 19477     -4.178900e+02 -2.398600e+02\n9 19477     -3.117000e+02 -3.501400e+02\n6 19478     -4.577200e+02 -5.107300e+02\n7 19478     -4.297000e+02 -2.519100e+02\n13 19478     2.395001e+01 -5.195500e+02\n6 19479     -2.133000e+02 -5.491500e+02\n12 19479     -2.149200e+02 -4.849500e+02\n6 19480     -3.026200e+02 -5.545400e+02\n15 19480     -3.706100e+02 -3.808600e+02\n6 19481     5.150601e+02 -6.043101e+02\n10 19481     3.051500e+02 -5.710200e+02\n6 19482     5.595100e+02 -6.278700e+02\n7 19482     3.396300e+02 -4.974100e+02\n9 19482     5.372600e+02 -3.767500e+02\n6 19483     1.579500e+02 8.088100e+02\n8 19483     2.766400e+02 3.989400e+02\n6 19484     -7.419983e+00 7.785000e+02\n8 19484     1.600300e+02 3.195500e+02\n6 19485     -2.673000e+02 7.241100e+02\n8 19485     -1.167999e+01 3.103900e+02\n6 19486     3.011200e+02 6.544100e+02\n8 19486     3.806100e+02 3.045000e+02\n9 19486     1.763300e+02 4.282700e+02\n6 19487     -2.150000e+02 5.950000e+02\n8 19487     2.079999e+01 2.215800e+02\n12 19487     -5.028998e+01 5.645500e+02\n6 19488     4.819700e+02 4.239700e+02\n12 19488     5.639399e+02 4.340700e+02\n6 19489     4.110500e+02 3.686600e+02\n8 19489     4.660900e+02 1.277100e+02\n10 19489     5.968500e+02 4.485400e+02\n12 19489     4.959000e+02 3.772900e+02\n15 19489     7.955400e+02 5.115000e+02\n6 19490     -1.941700e+02 3.019100e+02\n15 19490     1.827100e+02 5.542400e+02\n6 19491     -2.685900e+02 1.097100e+02\n12 19491     -2.058600e+02 1.607000e+02\n6 19492     9.073999e+01 8.969971e+00\n12 19492     1.047100e+02 5.964001e+01\n6 19493     2.087000e+02 -8.554999e+01\n8 19493     3.415700e+02 -1.152400e+02\n6 19494     -4.867400e+02 -3.543800e+02\n7 19494     -4.118400e+02 -1.235200e+02\n13 19494     3.727002e+01 -4.089000e+02\n6 19495     -1.781500e+02 -3.795200e+02\n12 19495     -1.689800e+02 -3.170700e+02\n6 19496     -1.674600e+02 -6.028500e+02\n7 19496     -2.394300e+02 -3.670100e+02\n6 19497     -3.186000e+02 -6.155000e+02\n15 19497     -4.135400e+02 -4.399200e+02\n6 19498     -2.518000e+02 8.401800e+02\n8 19498     2.130005e+00 3.829200e+02\n6 19499     -2.092800e+02 2.848500e+02\n11 19499     2.964100e+02 -4.633300e+02\n6 19500     3.247998e+01 6.192999e+01\n12 19500     4.727002e+01 1.140900e+02\n6 19501     3.056600e+02 -1.707700e+02\n12 19501     3.218600e+02 -1.348800e+02\n6 19502     2.665800e+02 -3.029200e+02\n8 19502     3.860300e+02 -3.035500e+02\n12 19502     2.848700e+02 -2.704000e+02\n13 19502     5.687900e+02 -5.133800e+02\n6 19503     -9.044000e+01 -3.112100e+02\n12 19503     -8.391998e+01 -2.579300e+02\n6 19504     -4.181100e+02 -5.038600e+02\n7 19504     -3.970300e+02 -2.526300e+02\n9 19504     -2.850900e+02 -3.561100e+02\n13 19504     5.263000e+01 -5.236400e+02\n6 19505     -4.181100e+02 -5.038600e+02\n7 19505     -3.970300e+02 -2.526300e+02\n9 19505     -2.850900e+02 -3.561100e+02\n13 19505     5.263000e+01 -5.236400e+02\n6 19506     -4.101200e+02 -5.292000e+02\n9 19506     -2.759900e+02 -3.714700e+02\n13 19506     5.095001e+01 -5.425500e+02\n6 19507     -2.809003e+01 7.905100e+02\n8 19507     1.466400e+02 3.301700e+02\n6 19508     -3.331600e+02 7.849700e+02\n8 19508     -5.285999e+01 3.559600e+02\n6 19509     2.207300e+02 7.398500e+02\n8 19509     3.199700e+02 3.562400e+02\n9 19509     1.143600e+02 4.856300e+02\n6 19510     2.654000e+02 6.625400e+02\n8 19510     3.524800e+02 3.047100e+02\n9 19510     1.476600e+02 4.304200e+02\n6 19511     -2.870400e+02 8.767999e+01\n12 19511     -2.307700e+02 1.350100e+02\n6 19512     7.630005e+00 1.523999e+01\n12 19512     2.138000e+01 6.897998e+01\n6 19513     3.568600e+02 1.225000e+01\n12 19513     3.925500e+02 4.928003e+01\n6 19514     2.414100e+02 -1.968400e+02\n12 19514     2.503500e+02 -1.583100e+02\n6 19515     8.820007e+00 -2.082100e+02\n8 19515     1.828900e+02 -1.951800e+02\n12 19515     3.840027e+00 -1.581400e+02\n6 19516     -1.630200e+02 -6.336000e+02\n7 19516     -2.444200e+02 -3.915700e+02\n6 19517     -1.512900e+02 5.724300e+02\n12 19517     1.251001e+01 5.381400e+02\n6 19518     -1.512900e+02 5.724300e+02\n12 19518     1.251001e+01 5.381400e+02\n6 19519     -4.372200e+02 4.944400e+02\n7 19519     -1.901500e+02 5.402100e+02\n6 19520     -4.523999e+01 2.739001e+01\n8 19520     1.437100e+02 -2.210999e+01\n12 19520     -2.781000e+01 8.297998e+01\n6 19521     3.155100e+02 -7.638000e+01\n12 19521     3.288600e+02 -3.692999e+01\n6 19522     1.736300e+02 -1.932000e+02\n8 19522     3.162100e+02 -1.921300e+02\n12 19522     1.763700e+02 -1.506800e+02\n6 19523     4.270001e+01 -1.561899e+02\n8 19523     2.050800e+02 -1.654300e+02\n12 19523     4.265002e+01 -1.053400e+02\n6 19524     4.270001e+01 -1.561899e+02\n8 19524     2.050800e+02 -1.654300e+02\n12 19524     4.265002e+01 -1.053400e+02\n7 19525     -1.994200e+02 5.779000e+02\n12 19525     -2.742900e+02 5.206700e+02\n7 19526     -4.293700e+02 5.740100e+02\n12 19526     -5.298400e+02 5.117600e+02\n7 19527     -2.657500e+02 5.690000e+02\n11 19527     1.121500e+02 -2.605400e+02\n7 19528     -6.194800e+02 5.657300e+02\n11 19528     -1.873900e+02 -2.396800e+02\n7 19529     -4.201000e+02 5.637900e+02\n12 19529     -5.195000e+02 5.002700e+02\n7 19530     -3.467400e+02 5.630700e+02\n12 19530     -4.374200e+02 5.002900e+02\n7 19531     -3.467400e+02 5.630700e+02\n12 19531     -4.374200e+02 5.002900e+02\n7 19532     -3.228300e+02 5.578700e+02\n11 19532     5.996997e+01 -2.663400e+02\n7 19533     2.889000e+02 5.356100e+02\n8 19533     3.013700e+02 2.104400e+02\n7 19534     -3.470000e+02 5.329000e+02\n12 19534     -4.369800e+02 4.654900e+02\n7 19535     4.087700e+02 5.282700e+02\n8 19535     4.325800e+02 2.475400e+02\n9 19535     2.428500e+02 3.819400e+02\n7 19536     3.669200e+02 5.249600e+02\n8 19536     3.744100e+02 2.148400e+02\n7 19537     -3.920000e+02 5.186900e+02\n11 19537     -4.549988e+00 -2.933500e+02\n13 19537     5.554999e+01 1.354300e+02\n14 19537     1.482500e+02 -2.716600e+02\n7 19538     -5.130900e+02 5.035400e+02\n12 19538     -6.241800e+02 4.295100e+02\n7 19539     5.274500e+02 5.019500e+02\n10 19539     7.236000e+02 5.865500e+02\n7 19540     -4.792800e+02 4.975600e+02\n11 19540     -8.158002e+01 -3.043100e+02\n12 19540     -5.843400e+02 4.217900e+02\n7 19541     -3.925200e+02 4.965600e+02\n14 19541     1.443600e+02 -2.935500e+02\n7 19542     -3.174900e+02 4.949400e+02\n14 19542     2.173300e+02 -3.020200e+02\n7 19543     4.574500e+02 4.951200e+02\n9 19543     2.919200e+02 3.638800e+02\n12 19543     5.159399e+02 5.117500e+02\n7 19544     -1.814500e+02 4.940100e+02\n14 19544     3.497700e+02 -3.143900e+02\n7 19545     2.708600e+02 4.923300e+02\n10 19545     4.321200e+02 6.107100e+02\n13 19545     6.378300e+02 8.835001e+01\n7 19546     -5.063600e+02 4.916400e+02\n8 19546     -3.856400e+02 1.512800e+02\n7 19547     -1.099600e+02 4.814000e+02\n11 19547     2.507700e+02 -3.445600e+02\n13 19547     2.769800e+02 9.407001e+01\n14 19547     4.203400e+02 -3.331200e+02\n7 19548     -1.071700e+02 4.778800e+02\n14 19548     4.232500e+02 -3.370200e+02\n7 19549     3.573500e+02 4.724600e+02\n9 19549     1.725500e+02 2.897900e+02\n7 19550     -4.358300e+02 4.684400e+02\n12 19550     -5.358900e+02 3.886400e+02\n7 19551     -3.117500e+02 4.632600e+02\n14 19551     2.169100e+02 -3.347200e+02\n7 19552     -4.933300e+02 4.532700e+02\n10 19552     -4.714700e+02 6.142400e+02\n7 19553     -4.933300e+02 4.532700e+02\n10 19553     -4.714700e+02 6.142400e+02\n7 19554     -3.078600e+02 4.529300e+02\n14 19554     2.190400e+02 -3.461100e+02\n7 19555     -6.191700e+02 4.515900e+02\n14 19555     -7.433002e+01 -3.151500e+02\n7 19556     -4.367100e+02 4.513800e+02\n14 19556     9.546002e+01 -3.346900e+02\n7 19557     -3.148100e+02 4.504800e+02\n14 19557     2.119399e+02 -3.474100e+02\n7 19558     -5.577100e+02 4.491600e+02\n10 19558     -5.484000e+02 6.128300e+02\n12 19558     -6.739300e+02 3.642200e+02\n7 19559     -4.669200e+02 4.483400e+02\n11 19559     -7.815002e+01 -3.452100e+02\n7 19560     -5.155600e+02 4.479700e+02\n11 19560     -1.201200e+02 -3.401900e+02\n7 19561     -6.033900e+02 4.468900e+02\n10 19561     -6.022100e+02 6.125600e+02\n7 19562     -6.125300e+02 4.460400e+02\n10 19562     -6.130100e+02 6.115200e+02\n7 19563     -5.397900e+02 4.459900e+02\n12 19563     -6.527500e+02 3.604700e+02\n14 19563     -2.650024e+00 -3.294500e+02\n7 19564     -5.194000e+02 4.438800e+02\n12 19564     -6.300700e+02 3.584500e+02\n7 19565     -7.564600e+02 4.432500e+02\n8 19565     -5.969100e+02 1.265600e+02\n14 19565     -1.985200e+02 -3.096600e+02\n7 19566     -5.040800e+02 4.369300e+02\n12 19566     -6.124600e+02 3.504900e+02\n7 19567     -8.125000e+01 4.364800e+02\n11 19567     2.718199e+02 -3.888800e+02\n7 19568     -8.427002e+01 4.347600e+02\n10 19568     1.647998e+01 5.740600e+02\n11 19568     2.680400e+02 -3.902200e+02\n7 19569     3.364399e+02 4.323900e+02\n10 19569     5.038400e+02 5.307600e+02\n7 19570     -5.651900e+02 4.291300e+02\n10 19570     -5.579600e+02 5.901500e+02\n7 19571     -5.047700e+02 4.270500e+02\n10 19571     -4.864900e+02 5.838300e+02\n7 19572     -4.461000e+02 4.257400e+02\n11 19572     -6.144000e+01 -3.657300e+02\n7 19573     -5.232500e+02 4.255800e+02\n12 19573     -6.344800e+02 3.373800e+02\n14 19573     8.099976e+00 -3.511300e+02\n7 19574     3.031801e+02 4.232000e+02\n10 19574     4.642200e+02 5.228900e+02\n7 19575     3.031801e+02 4.232000e+02\n10 19575     4.642200e+02 5.228900e+02\n7 19576     -4.817500e+02 4.211100e+02\n10 19576     -4.582100e+02 5.764100e+02\n12 19576     -5.870400e+02 3.321900e+02\n7 19577     -4.878400e+02 4.206500e+02\n8 19577     -3.760900e+02 8.417001e+01\n7 19578     -6.215000e+02 4.198800e+02\n14 19578     -8.389001e+01 -3.465200e+02\n7 19579     -3.310999e+01 4.199400e+02\n10 19579     7.457001e+01 5.513200e+02\n7 19580     -5.329100e+02 4.195500e+02\n8 19580     -4.140100e+02 8.773999e+01\n10 19580     -5.188600e+02 5.766800e+02\n7 19581     -5.936900e+02 4.186700e+02\n12 19581     -7.148500e+02 3.272900e+02\n14 19581     -5.859998e+01 -3.506500e+02\n7 19582     -3.039900e+02 4.169300e+02\n10 19582     -2.463000e+02 5.635700e+02\n14 19582     2.175000e+02 -3.834300e+02\n7 19583     -7.039400e+02 4.154500e+02\n8 19583     -5.561300e+02 9.616000e+01\n10 19583     -7.222400e+02 5.820900e+02\n7 19584     -1.479100e+02 4.153800e+02\n14 19584     3.802500e+02 -4.010300e+02\n7 19585     -4.921400e+02 4.114400e+02\n10 19585     -4.709300e+02 5.654400e+02\n7 19586     2.072300e+02 4.075900e+02\n10 19586     3.585400e+02 5.189900e+02\n7 19587     -1.887600e+02 4.063400e+02\n10 19587     -1.101100e+02 5.454100e+02\n7 19588     2.945000e+02 4.065800e+02\n10 19588     4.524800e+02 5.036700e+02\n7 19589     3.405100e+02 4.049700e+02\n12 19589     3.722300e+02 3.795000e+02\n7 19590     -6.507200e+02 4.046100e+02\n10 19590     -6.593600e+02 5.661700e+02\n14 19590     -1.139600e+02 -3.583000e+02\n7 19591     -5.202200e+02 4.043000e+02\n10 19591     -5.045700e+02 5.596400e+02\n7 19592     -3.031000e+02 4.026400e+02\n14 19592     2.165100e+02 -3.982400e+02\n7 19593     -6.802900e+02 3.984000e+02\n8 19593     -5.383400e+02 7.913000e+01\n10 19593     -6.941000e+02 5.604300e+02\n7 19594     -6.802900e+02 3.984000e+02\n8 19594     -5.383400e+02 7.913000e+01\n10 19594     -6.941000e+02 5.604300e+02\n7 19595     -4.194900e+02 3.958000e+02\n10 19595     -3.854800e+02 5.444300e+02\n7 19596     -6.667500e+02 3.943700e+02\n11 19596     -2.527300e+02 -3.694300e+02\n12 19596     -8.001400e+02 2.961500e+02\n7 19597     -1.377300e+02 3.933600e+02\n10 19597     -5.400000e+01 5.251900e+02\n7 19598     -1.767700e+02 3.931200e+02\n10 19598     -9.832001e+01 5.281500e+02\n7 19599     -4.792500e+02 3.914800e+02\n14 19599     8.090002e+01 -4.253000e+02\n7 19600     -5.117400e+02 3.910900e+02\n14 19600     1.207001e+01 -3.874600e+02\n7 19601     -1.027200e+02 3.899600e+02\n13 19601     2.856000e+02 1.485999e+01\n14 19601     4.312300e+02 -4.335100e+02\n7 19602     -3.695200e+02 3.877600e+02\n15 19602     -2.909800e+02 5.857700e+02\n7 19603     -1.591900e+02 3.870700e+02\n11 19603     1.902100e+02 -4.293000e+02\n7 19604     -4.049100e+02 3.862200e+02\n14 19604     1.135400e+02 -4.046000e+02\n15 19604     -3.395300e+02 5.850000e+02\n7 19605     -1.085900e+02 3.839900e+02\n15 19605     6.492999e+01 5.671000e+02\n7 19606     4.054700e+02 3.838300e+02\n9 19606     2.565900e+02 2.535800e+02\n10 19606     5.648600e+02 4.539500e+02\n12 19606     4.631500e+02 3.761100e+02\n15 19606     7.579301e+02 5.163400e+02\n7 19607     -1.276200e+02 3.828700e+02\n13 19607     2.640699e+02 9.669983e+00\n14 19607     4.039700e+02 -4.395400e+02\n15 19607     3.917999e+01 5.670800e+02\n7 19608     -1.276200e+02 3.828700e+02\n11 19608     2.182700e+02 -4.359500e+02\n15 19608     3.917999e+01 5.670800e+02\n7 19609     -1.341700e+02 3.790300e+02\n10 19609     -5.169000e+01 5.073200e+02\n7 19610     -1.397300e+02 3.782500e+02\n15 19610     2.132001e+01 5.604900e+02\n7 19611     3.246400e+02 3.773900e+02\n15 19611     6.634700e+02 5.258500e+02\n7 19612     4.557900e+02 3.772800e+02\n15 19612     8.290100e+02 5.017500e+02\n7 19613     4.557900e+02 3.772800e+02\n15 19613     8.290100e+02 5.017500e+02\n7 19614     -2.199700e+02 3.763300e+02\n10 19614     -1.505900e+02 5.104200e+02\n14 19614     3.035699e+02 -4.361200e+02\n7 19615     -2.237800e+02 3.737300e+02\n10 19615     -1.561100e+02 5.073300e+02\n15 19615     -9.273999e+01 5.595300e+02\n7 19616     -6.638200e+02 3.683800e+02\n10 19616     -6.770600e+02 5.246000e+02\n15 19616     -6.949500e+02 5.681400e+02\n7 19617     -2.961700e+02 3.685700e+02\n10 19617     -2.401000e+02 5.064900e+02\n7 19618     -6.290400e+02 3.659000e+02\n15 19618     -6.459300e+02 5.639800e+02\n7 19619     -6.290400e+02 3.659000e+02\n15 19619     -6.459300e+02 5.639800e+02\n7 19620     -6.137900e+02 3.657000e+02\n15 19620     -6.250400e+02 5.635100e+02\n7 19621     -4.970000e+02 3.655500e+02\n10 19621     -4.778900e+02 5.131700e+02\n7 19622     -2.442400e+02 3.655200e+02\n10 19622     -1.810200e+02 4.981600e+02\n13 19622     1.629500e+02 1.010010e+00\n14 19622     2.767600e+02 -4.450900e+02\n15 19622     -1.219700e+02 5.488600e+02\n7 19623     -1.638900e+02 3.656300e+02\n10 19623     -8.844000e+01 4.923100e+02\n11 19623     1.810900e+02 -4.491600e+02\n7 19624     -2.436500e+02 3.626600e+02\n10 19624     -1.809700e+02 4.949800e+02\n14 19624     2.774500e+02 -4.482700e+02\n15 19624     -1.220600e+02 5.446500e+02\n7 19625     -3.081300e+02 3.620600e+02\n10 19625     -2.546700e+02 4.993300e+02\n11 19625     5.216998e+01 -4.344500e+02\n7 19626     -3.081300e+02 3.620600e+02\n10 19626     -2.546700e+02 4.993300e+02\n7 19627     -1.958400e+02 3.614500e+02\n10 19627     -1.268700e+02 4.901400e+02\n15 19627     -5.896002e+01 5.400500e+02\n7 19628     -5.978800e+02 3.600000e+02\n15 19628     -6.039700e+02 5.553300e+02\n7 19629     -4.474600e+02 3.558100e+02\n14 19629     6.553998e+01 -4.313600e+02\n15 19629     -3.981900e+02 5.453200e+02\n7 19630     -4.502100e+02 3.551500e+02\n15 19630     -4.022700e+02 5.449800e+02\n7 19631     -3.057200e+02 3.532900e+02\n10 19631     -2.537400e+02 4.880600e+02\n11 19631     5.253003e+01 -4.435000e+02\n7 19632     -6.048100e+02 3.500000e+02\n10 19632     -6.060500e+02 5.007500e+02\n14 19632     -8.440002e+01 -4.186400e+02\n7 19633     6.628998e+01 3.485800e+02\n15 19633     2.990601e+02 5.042900e+02\n7 19634     -5.144600e+02 3.449900e+02\n10 19634     -4.990900e+02 4.917100e+02\n11 19634     -1.327300e+02 -4.264800e+02\n15 19634     -4.909300e+02 5.338400e+02\n7 19635     6.351200e+02 3.454100e+02\n9 19635     4.723400e+02 2.812500e+02\n7 19636     6.199200e+02 3.423600e+02\n10 19636     8.203300e+02 3.791700e+02\n7 19637     -4.080000e+02 3.405300e+02\n14 19637     1.023400e+02 -4.524800e+02\n7 19638     -4.967400e+02 3.393800e+02\n14 19638     1.553003e+01 -4.427000e+02\n7 19639     -2.941000e+02 3.397200e+02\n14 19639     2.247100e+02 -4.673700e+02\n15 19639     -1.932100e+02 5.148100e+02\n7 19640     -2.628100e+02 3.392000e+02\n14 19640     2.580900e+02 -4.721500e+02\n7 19641     -6.780100e+02 3.362300e+02\n10 19641     -6.893900e+02 4.910200e+02\n7 19642     -9.808002e+01 3.353900e+02\n11 19642     2.345300e+02 -4.874000e+02\n7 19643     -4.400000e+02 3.347400e+02\n15 19643     -3.885700e+02 5.170800e+02\n7 19644     -3.077900e+02 3.352400e+02\n14 19644     2.093101e+02 -4.709399e+02\n7 19645     -6.060400e+02 3.344500e+02\n10 19645     -6.071700e+02 4.830200e+02\n12 19645     -7.294200e+02 2.259000e+02\n15 19645     -6.145700e+02 5.217600e+02\n7 19646     -5.065800e+02 3.329700e+02\n14 19646     4.950012e+00 -4.483700e+02\n7 19647     -4.861700e+02 3.327200e+02\n11 19647     -1.096800e+02 -4.401000e+02\n14 19647     2.465997e+01 -4.508800e+02\n7 19648     -5.844200e+02 3.326200e+02\n8 19648     -4.644400e+02 8.790009e+00\n10 19648     -5.819300e+02 4.796400e+02\n11 19648     -1.955400e+02 -4.290300e+02\n12 19648     -7.047400e+02 2.240800e+02\n15 19648     -5.858700e+02 5.188700e+02\n7 19649     -4.446700e+02 3.308800e+02\n15 19649     -3.948700e+02 5.125900e+02\n7 19650     -4.953000e+02 3.303000e+02\n11 19650     -1.182500e+02 -4.411700e+02\n7 19651     -4.953000e+02 3.303000e+02\n11 19651     -1.182500e+02 -4.411700e+02\n7 19652     -2.334800e+02 3.296300e+02\n12 19652     -2.930600e+02 2.394500e+02\n13 19652     1.742000e+02 -3.047998e+01\n14 19652     2.906500e+02 -4.861500e+02\n7 19653     -6.653300e+02 3.282000e+02\n12 19653     -7.998500e+02 2.149200e+02\n15 19653     -6.915400e+02 5.173400e+02\n7 19654     -5.696200e+02 3.271400e+02\n10 19654     -5.649200e+02 4.737100e+02\n11 19654     -1.828200e+02 -4.357400e+02\n15 19654     -5.661500e+02 5.112900e+02\n7 19655     -7.236100e+02 3.265900e+02\n10 19655     -7.462700e+02 4.806000e+02\n14 19655     -1.997500e+02 -4.276400e+02\n7 19656     1.409301e+02 3.259200e+02\n10 19656     2.620400e+02 4.194100e+02\n7 19657     3.170100e+02 3.250900e+02\n10 19657     4.721300e+02 4.030100e+02\n15 19657     6.502600e+02 4.517600e+02\n7 19658     5.591100e+02 3.251100e+02\n10 19658     7.445400e+02 3.655900e+02\n7 19659     -3.605500e+02 3.247200e+02\n15 19659     -2.844100e+02 4.979800e+02\n7 19660     -3.605500e+02 3.247200e+02\n15 19660     -2.844100e+02 4.979800e+02\n7 19661     5.734000e+02 3.245200e+02\n12 19661     6.703900e+02 3.357400e+02\n7 19662     -3.860700e+02 3.238700e+02\n15 19662     -3.177500e+02 4.989800e+02\n7 19663     -2.112800e+02 3.237800e+02\n10 19663     -1.503300e+02 4.439900e+02\n7 19664     -4.865500e+02 3.223700e+02\n14 19664     2.200000e+01 -4.621300e+02\n7 19665     -8.619000e+01 3.212800e+02\n10 19665     -6.590027e+00 4.309300e+02\n7 19666     -3.324300e+02 3.209900e+02\n14 19666     1.827500e+02 -4.833101e+02\n7 19667     -5.676500e+02 3.201600e+02\n10 19667     -5.622300e+02 4.648800e+02\n15 19667     -5.634400e+02 5.014000e+02\n7 19668     -5.676500e+02 3.201600e+02\n10 19668     -5.622300e+02 4.648800e+02\n7 19669     -3.435800e+02 3.200100e+02\n13 19669     7.887000e+01 -3.195001e+01\n7 19670     -2.177400e+02 3.199300e+02\n10 19670     -1.582800e+02 4.396200e+02\n15 19670     -9.621997e+01 4.808800e+02\n7 19671     -5.503500e+02 3.193700e+02\n14 19671     -4.014001e+01 -4.567900e+02\n7 19672     -7.679200e+02 3.185300e+02\n10 19672     -7.985000e+02 4.744300e+02\n14 19672     -2.418400e+02 -4.298800e+02\n15 19672     -8.308300e+02 5.063100e+02\n7 19673     -5.459900e+02 3.184500e+02\n14 19673     -3.634003e+01 -4.590601e+02\n7 19674     -5.459900e+02 3.184500e+02\n11 19674     -1.639000e+02 -4.451700e+02\n7 19675     5.486300e+02 3.186700e+02\n10 19675     7.309600e+02 3.590500e+02\n12 19675     6.411700e+02 3.241100e+02\n7 19676     -5.951000e+02 3.175000e+02\n10 19676     -5.948900e+02 4.630700e+02\n7 19677     -5.296500e+02 3.164600e+02\n14 19677     -2.069000e+01 -4.628900e+02\n7 19678     -5.296500e+02 3.164600e+02\n11 19678     -1.501700e+02 -4.488100e+02\n7 19679     -6.727400e+02 3.143600e+02\n10 19679     -6.844100e+02 4.657600e+02\n15 19679     -7.017100e+02 4.997600e+02\n7 19680     -5.639600e+02 3.144500e+02\n14 19680     -5.407001e+01 -4.603300e+02\n7 19681     -5.087600e+02 3.144300e+02\n11 19681     -1.323000e+02 -4.534600e+02\n7 19682     -3.887600e+02 3.141800e+02\n15 19682     -3.231000e+02 4.852800e+02\n7 19683     -3.207300e+02 3.140000e+02\n15 19683     -2.339600e+02 4.797600e+02\n7 19684     6.075100e+02 3.140200e+02\n12 19684     7.128800e+02 3.287900e+02\n7 19685     -5.307500e+02 3.135600e+02\n14 19685     -2.256000e+01 -4.653900e+02\n7 19686     -5.256600e+02 3.129800e+02\n14 19686     -1.779999e+01 -4.670400e+02\n7 19687     -5.468500e+02 3.117000e+02\n14 19687     -3.838000e+01 -4.655900e+02\n7 19688     5.411801e+02 3.104600e+02\n9 19688     3.940800e+02 2.265200e+02\n7 19689     -5.552300e+02 3.099400e+02\n14 19689     -4.696002e+01 -4.663600e+02\n7 19690     -5.151800e+02 3.101900e+02\n13 19690     -6.492999e+01 -2.971997e+01\n14 19690     -8.349976e+00 -4.711899e+02\n7 19691     -4.874800e+02 3.096700e+02\n11 19691     -1.142300e+02 -4.597400e+02\n7 19692     -1.002800e+02 3.090300e+02\n10 19692     -2.467999e+01 4.167500e+02\n7 19693     -7.036200e+02 3.079000e+02\n10 19693     -7.229600e+02 4.581100e+02\n14 19693     -1.863100e+02 -4.486200e+02\n15 19693     -7.461100e+02 4.903200e+02\n7 19694     -7.098100e+02 3.073600e+02\n10 19694     -7.296500e+02 4.578600e+02\n14 19694     -1.918300e+02 -4.490200e+02\n15 19694     -7.537500e+02 4.897900e+02\n7 19695     -5.083100e+02 3.074800e+02\n14 19695     -2.260010e+00 -4.753000e+02\n7 19696     -7.441600e+02 3.066600e+02\n10 19696     -7.702100e+02 4.592600e+02\n11 19696     -3.301900e+02 -4.309200e+02\n15 19696     -7.994100e+02 4.892100e+02\n7 19697     -6.604300e+02 3.063800e+02\n12 19697     -7.940200e+02 1.894100e+02\n15 19697     -6.852900e+02 4.883100e+02\n7 19698     -5.273000e+02 3.060000e+02\n14 19698     -2.103998e+01 -4.741500e+02\n7 19699     -5.545700e+02 3.055500e+02\n14 19699     -4.696997e+01 -4.709900e+02\n7 19700     -5.545700e+02 3.055500e+02\n14 19700     -4.696997e+01 -4.709900e+02\n7 19701     5.686500e+02 3.030900e+02\n12 19701     6.673400e+02 3.096400e+02\n7 19702     -5.646300e+02 3.027600e+02\n11 19702     -1.819800e+02 -4.565900e+02\n7 19703     -3.815300e+02 3.014300e+02\n10 19703     -3.485800e+02 4.301500e+02\n11 19703     -2.735999e+01 -4.828400e+02\n14 19703     1.304800e+02 -4.986300e+02\n15 19703     -3.163700e+02 4.662100e+02\n7 19704     -2.392300e+02 3.006700e+02\n10 19704     -1.865200e+02 4.176200e+02\n15 19704     -1.287800e+02 4.546500e+02\n7 19705     -2.766800e+02 2.993000e+02\n11 19705     6.294000e+01 -4.998700e+02\n7 19706     2.639800e+02 2.968200e+02\n15 19706     5.694100e+02 4.145900e+02\n7 19707     6.257600e+02 2.967200e+02\n12 19707     7.364200e+02 3.107300e+02\n7 19708     -5.145600e+02 2.950100e+02\n11 19708     -1.405600e+02 -4.694300e+02\n7 19709     -7.778003e+01 2.929300e+02\n10 19709     -5.584003e+01 3.570200e+02\n15 19709     1.017999e+01 3.907800e+02\n7 19710     -7.186400e+02 2.923700e+02\n8 19710     -5.837800e+02 -1.964999e+01\n14 19710     -2.039600e+02 -4.630500e+02\n15 19710     -7.657200e+02 4.707500e+02\n7 19711     -6.657300e+02 2.917400e+02\n10 19711     -6.768100e+02 4.397300e+02\n7 19712     -5.633700e+02 2.913300e+02\n14 19712     -5.859998e+01 -4.849200e+02\n7 19713     -5.097200e+02 2.895500e+02\n14 19713     -7.309998e+00 -4.937800e+02\n7 19714     5.945000e+02 2.886900e+02\n10 19714     7.835000e+02 3.167200e+02\n7 19715     -5.842500e+02 2.870300e+02\n15 19715     -5.861900e+02 4.588300e+02\n7 19716     -1.453700e+02 2.868800e+02\n10 19716     -8.134003e+01 3.926600e+02\n7 19717     -7.438400e+02 2.856700e+02\n10 19717     -7.706800e+02 4.348400e+02\n15 19717     -7.988700e+02 4.627800e+02\n7 19718     -7.157500e+02 2.852700e+02\n8 19718     -5.819500e+02 -2.726001e+01\n10 19718     -7.375900e+02 4.338200e+02\n15 19718     -7.621000e+02 4.616900e+02\n7 19719     -5.122500e+02 2.855900e+02\n11 19719     -1.394700e+02 -4.781400e+02\n7 19720     -2.734000e+02 2.828200e+02\n10 19720     -2.288900e+02 3.986800e+02\n7 19721     -8.003500e+02 2.816100e+02\n13 19721     -2.919400e+02 -3.472998e+01\n14 19721     -2.898700e+02 -4.627300e+02\n7 19722     -7.342000e+02 2.817500e+02\n10 19722     -7.596300e+02 4.312600e+02\n14 19722     -2.211200e+02 -4.717500e+02\n15 19722     -7.864600e+02 4.578700e+02\n7 19723     -7.054700e+02 2.806000e+02\n15 19723     -7.484900e+02 4.549200e+02\n7 19724     -5.634000e+02 2.806000e+02\n14 19724     -6.113000e+01 -4.961500e+02\n7 19725     -7.326300e+02 2.775500e+02\n10 19725     -7.572500e+02 4.261300e+02\n15 19725     -7.843900e+02 4.528700e+02\n7 19726     -5.750000e+02 2.764200e+02\n10 19726     -5.722200e+02 4.154300e+02\n7 19727     -3.498300e+02 2.737000e+02\n10 19727     -3.169400e+02 3.935200e+02\n7 19728     -3.498300e+02 2.737000e+02\n10 19728     -3.169400e+02 3.935200e+02\n7 19729     -1.126400e+02 2.735100e+02\n10 19729     -9.803003e+01 3.367800e+02\n15 19729     -3.922998e+01 3.659800e+02\n7 19730     -2.543700e+02 2.731200e+02\n10 19730     -2.085400e+02 3.849500e+02\n7 19731     -5.829000e+02 2.726800e+02\n14 19731     -8.158002e+01 -5.018700e+02\n15 19731     -5.844600e+02 4.400400e+02\n7 19732     -5.978100e+02 2.720300e+02\n14 19732     -9.592999e+01 -5.004800e+02\n7 19733     5.011600e+02 2.708500e+02\n9 19733     3.625601e+02 1.796600e+02\n7 19734     -2.551300e+02 2.702800e+02\n10 19734     -2.097200e+02 3.813200e+02\n7 19735     5.138199e+02 2.672000e+02\n10 19735     6.841500e+02 3.008400e+02\n7 19736     2.583800e+02 2.655800e+02\n15 19736     5.532300e+02 3.679900e+02\n7 19737     1.350800e+02 2.634500e+02\n15 19737     2.922200e+02 3.307700e+02\n7 19738     5.273800e+02 2.596800e+02\n8 19738     5.663600e+02 4.059000e+01\n9 19738     3.888800e+02 1.771500e+02\n7 19739     1.501100e+02 2.575200e+02\n10 19739     2.016300e+02 2.942300e+02\n7 19740     1.616200e+02 2.534100e+02\n10 19740     2.158000e+02 2.892500e+02\n7 19741     5.619200e+02 2.517800e+02\n9 19741     4.214399e+02 1.800900e+02\n10 19741     7.405300e+02 2.762600e+02\n7 19742     4.550601e+02 2.504300e+02\n15 19742     8.183600e+02 3.190800e+02\n7 19743     -3.906800e+02 2.465700e+02\n14 19743     1.224500e+02 -5.577100e+02\n7 19744     2.676700e+02 2.462300e+02\n15 19744     5.616100e+02 3.386100e+02\n7 19745     1.851600e+02 2.409800e+02\n15 19745     3.646100e+02 2.981500e+02\n7 19746     2.779301e+02 2.397000e+02\n15 19746     5.746500e+02 3.279700e+02\n7 19747     1.085500e+02 2.380900e+02\n13 19747     5.403101e+02 -1.269800e+02\n15 19747     2.445800e+02 2.932400e+02\n7 19748     6.880601e+02 2.374400e+02\n9 19748     5.360601e+02 2.034900e+02\n7 19749     2.723800e+02 2.354100e+02\n15 19749     5.647200e+02 3.218600e+02\n7 19750     6.224301e+02 2.354300e+02\n12 19750     7.385100e+02 2.400100e+02\n7 19751     3.812000e+02 2.333100e+02\n10 19751     5.259900e+02 2.781000e+02\n15 19751     7.140200e+02 3.048400e+02\n7 19752     -1.117100e+02 2.329100e+02\n10 19752     -1.058000e+02 2.860700e+02\n7 19753     -1.660500e+02 2.290600e+02\n12 19753     -1.439500e+02 1.876700e+02\n13 19753     2.937400e+02 -1.195600e+02\n7 19754     -5.265400e+02 2.276800e+02\n15 19754     -5.180000e+02 3.734300e+02\n7 19755     -5.419500e+02 2.263700e+02\n15 19755     -5.377300e+02 3.730900e+02\n7 19756     -5.419500e+02 2.263700e+02\n15 19756     -5.377300e+02 3.730900e+02\n7 19757     -1.893700e+02 2.252900e+02\n10 19757     -1.756900e+02 2.968000e+02\n12 19757     -1.856600e+02 1.674600e+02\n7 19758     -1.918000e+02 2.224800e+02\n10 19758     -1.790800e+02 2.934400e+02\n15 19758     -1.296700e+02 3.127100e+02\n7 19759     -5.904800e+02 2.217800e+02\n11 19759     -2.228900e+02 -5.251000e+02\n7 19760     7.041000e+02 2.217500e+02\n9 19760     5.528800e+02 1.940900e+02\n7 19761     4.161000e+02 2.146700e+02\n10 19761     5.645000e+02 2.515700e+02\n7 19762     -5.464800e+02 2.131000e+02\n15 19762     -5.459700e+02 3.549500e+02\n7 19763     -4.144300e+02 2.082700e+02\n15 19763     -3.766400e+02 3.370600e+02\n7 19764     2.627000e+02 2.079300e+02\n10 19764     3.522000e+02 2.402100e+02\n7 19765     -4.629000e+02 2.070700e+02\n15 19765     -4.402600e+02 3.393300e+02\n7 19766     -6.584900e+02 2.057900e+02\n10 19766     -6.739600e+02 3.391100e+02\n7 19767     4.171899e+02 2.051600e+02\n15 19767     7.619000e+02 2.599000e+02\n7 19768     5.739800e+02 2.051600e+02\n9 19768     4.393700e+02 1.415800e+02\n10 19768     7.510400e+02 2.184900e+02\n12 19768     6.827700e+02 1.967500e+02\n7 19769     -4.029000e+02 2.014800e+02\n15 19769     -3.623200e+02 3.275800e+02\n7 19770     -3.971300e+02 2.009600e+02\n15 19770     -3.558100e+02 3.252000e+02\n7 19771     -1.444300e+02 1.988800e+02\n10 19771     -1.457200e+02 2.497300e+02\n7 19772     -7.610999e+01 1.986000e+02\n12 19772     -2.252002e+01 1.708500e+02\n15 19772     -1.096997e+01 2.539000e+02\n7 19773     -2.591500e+02 1.976900e+02\n13 19773     1.949900e+02 -1.409200e+02\n7 19774     6.152300e+02 1.973700e+02\n10 19774     8.000300e+02 2.035100e+02\n7 19775     2.112200e+02 1.970600e+02\n15 19775     3.949600e+02 2.335600e+02\n7 19776     -6.497700e+02 1.924500e+02\n10 19776     -6.658600e+02 3.222000e+02\n7 19777     -2.154400e+02 1.925300e+02\n15 19777     -1.682700e+02 2.716800e+02\n7 19778     -2.154400e+02 1.925300e+02\n15 19778     -1.682700e+02 2.716800e+02\n7 19779     2.785500e+02 1.914900e+02\n10 19779     3.673700e+02 2.191400e+02\n7 19780     9.015997e+01 1.903200e+02\n10 19780     1.162400e+02 2.151600e+02\n13 19780     5.270900e+02 -1.662300e+02\n15 19780     2.101400e+02 2.270600e+02\n7 19781     -3.627800e+02 1.883300e+02\n13 19781     6.906000e+01 -1.431900e+02\n7 19782     -1.845800e+02 1.886000e+02\n13 19782     2.767300e+02 -1.527000e+02\n7 19783     1.165700e+02 1.881400e+02\n10 19783     1.475900e+02 2.102200e+02\n7 19784     1.165700e+02 1.881400e+02\n10 19784     1.475900e+02 2.102200e+02\n7 19785     5.776500e+02 1.879300e+02\n9 19785     4.459200e+02 1.275000e+02\n7 19786     -3.787200e+02 1.869800e+02\n10 19786     -3.631100e+02 2.901300e+02\n7 19787     3.595200e+02 1.845200e+02\n15 19787     6.806801e+02 2.391800e+02\n7 19788     5.789100e+02 1.840400e+02\n10 19788     7.545601e+02 1.929900e+02\n7 19789     3.662100e+02 1.827700e+02\n10 19789     5.067500e+02 2.196100e+02\n13 19789     7.337600e+02 -1.926900e+02\n15 19789     6.906801e+02 2.353800e+02\n7 19790     3.662100e+02 1.827700e+02\n10 19790     5.067500e+02 2.196100e+02\n15 19790     6.906801e+02 2.353800e+02\n7 19791     4.492700e+02 1.808400e+02\n8 19791     5.003700e+02 -4.757999e+01\n15 19791     8.043600e+02 2.216900e+02\n7 19792     -1.823100e+02 1.781100e+02\n12 19792     -1.567000e+02 1.289300e+02\n7 19793     -3.609500e+02 1.773300e+02\n9 19793     -4.359100e+02 -3.807001e+01\n13 19793     7.107001e+01 -1.530400e+02\n15 19793     -3.130800e+02 2.888000e+02\n7 19794     3.645601e+02 1.771300e+02\n15 19794     6.860400e+02 2.273300e+02\n7 19795     5.948101e+02 1.749600e+02\n10 19795     7.730400e+02 1.798200e+02\n7 19796     3.633300e+02 1.745500e+02\n15 19796     6.847200e+02 2.230400e+02\n7 19797     1.719600e+02 1.741200e+02\n15 19797     3.272800e+02 2.002400e+02\n7 19798     3.010699e+02 1.733000e+02\n15 19798     5.440300e+02 2.049300e+02\n7 19799     5.436100e+02 1.729700e+02\n10 19799     7.116600e+02 1.843600e+02\n7 19800     -2.566500e+02 1.700800e+02\n15 19800     -2.204200e+02 2.472900e+02\n7 19801     1.824900e+02 1.692700e+02\n10 19801     2.271801e+02 1.853100e+02\n7 19802     -3.173700e+02 1.678800e+02\n10 19802     -2.975000e+02 2.618400e+02\n7 19803     -6.602900e+02 1.668300e+02\n10 19803     -6.813900e+02 2.921500e+02\n7 19804     -4.717000e+02 1.655200e+02\n15 19804     -4.589000e+02 2.821400e+02\n7 19805     -5.551500e+02 1.636700e+02\n10 19805     -5.640200e+02 2.784300e+02\n15 19805     -5.660700e+02 2.871900e+02\n7 19806     6.308199e+02 1.636600e+02\n9 19806     4.981400e+02 1.215900e+02\n7 19807     -5.041000e+02 1.583500e+02\n15 19807     -5.157100e+02 2.677300e+02\n7 19808     2.910400e+02 1.587500e+02\n15 19808     5.253101e+02 1.829600e+02\n7 19809     -3.767900e+02 1.580400e+02\n15 19809     -3.379900e+02 2.629500e+02\n7 19810     2.568199e+02 1.552600e+02\n10 19810     3.268400e+02 1.710700e+02\n15 19810     4.666899e+02 1.769600e+02\n7 19811     -5.822500e+02 1.541000e+02\n10 19811     -5.959500e+02 2.694800e+02\n7 19812     -2.229980e+00 1.513000e+02\n15 19812     7.713000e+01 1.798500e+02\n7 19813     1.328200e+02 1.508000e+02\n10 19813     1.619600e+02 1.650400e+02\n7 19814     3.904999e+01 1.466000e+02\n15 19814     1.322300e+02 1.698600e+02\n7 19815     -4.485000e+02 1.448400e+02\n10 19815     -4.474900e+02 2.460400e+02\n7 19816     -2.409700e+02 1.428900e+02\n10 19816     -2.501200e+02 2.007300e+02\n7 19817     -8.003998e+01 1.431600e+02\n15 19817     -2.420001e+01 1.773300e+02\n7 19818     -1.640800e+02 1.391900e+02\n10 19818     -1.732200e+02 1.829400e+02\n7 19819     3.116100e+02 1.376700e+02\n10 19819     3.942500e+02 1.477100e+02\n15 19819     5.482000e+02 1.499600e+02\n7 19820     -4.186500e+02 1.358200e+02\n10 19820     -4.150700e+02 2.330200e+02\n15 19820     -3.959900e+02 2.359400e+02\n7 19821     -4.301700e+02 1.345500e+02\n15 19821     -4.113100e+02 2.355100e+02\n7 19822     5.864001e+01 1.336000e+02\n15 19822     1.577200e+02 1.500100e+02\n7 19823     2.566200e+02 1.337300e+02\n10 19823     3.217000e+02 1.431900e+02\n15 19823     4.598800e+02 1.443700e+02\n7 19824     -4.469400e+02 1.328200e+02\n15 19824     -4.332200e+02 2.344400e+02\n7 19825     2.005900e+02 1.298200e+02\n10 19825     2.443300e+02 1.377200e+02\n7 19826     6.214000e+02 1.286000e+02\n10 19826     8.025500e+02 1.200700e+02\n7 19827     -4.587300e+02 1.263800e+02\n15 19827     -4.491900e+02 2.263200e+02\n7 19828     4.376899e+02 1.258500e+02\n15 19828     7.823000e+02 1.442500e+02\n7 19829     -4.982300e+02 1.226500e+02\n15 19829     -5.089900e+02 2.206000e+02\n7 19830     -6.259003e+01 1.214600e+02\n15 19830     -4.530029e+00 1.452700e+02\n7 19831     4.483700e+02 1.215400e+02\n15 19831     7.974301e+02 1.368100e+02\n7 19832     -2.821800e+02 1.169600e+02\n12 19832     -2.802200e+02 3.967999e+01\n7 19833     -1.789800e+02 1.154300e+02\n13 19833     2.824301e+02 -2.148000e+02\n7 19834     -4.714000e+02 1.137200e+02\n10 19834     -4.781900e+02 2.107500e+02\n15 19834     -4.685600e+02 2.103600e+02\n7 19835     -2.807700e+02 1.097100e+02\n15 19835     -2.662500e+02 1.640900e+02\n7 19836     1.347200e+02 1.063400e+02\n10 19836     1.592600e+02 1.132500e+02\n13 19836     5.654100e+02 -2.412800e+02\n7 19837     -3.283600e+02 1.049200e+02\n13 19837     1.021400e+02 -2.176400e+02\n7 19838     -3.868000e+02 1.039800e+02\n10 19838     -3.863400e+02 1.910700e+02\n7 19839     -3.599200e+02 1.035800e+02\n15 19839     -3.266500e+02 1.859800e+02\n7 19840     4.495601e+02 1.008200e+02\n10 19840     5.909200e+02 1.104100e+02\n15 19840     7.939200e+02 1.059600e+02\n7 19841     3.204800e+02 9.641000e+01\n15 19841     5.495699e+02 8.756000e+01\n7 19842     7.400200e+02 9.657999e+01\n9 19842     6.063800e+02 9.454001e+01\n7 19843     -4.582900e+02 9.325000e+01\n15 19843     -4.555100e+02 1.807800e+02\n7 19844     4.760900e+02 9.357999e+01\n15 19844     8.318900e+02 9.157001e+01\n7 19845     6.379900e+02 9.179999e+01\n9 19845     5.173900e+02 5.834998e+01\n7 19846     -5.320000e+02 8.879001e+01\n15 19846     -5.498400e+02 1.819500e+02\n7 19847     7.360800e+02 8.845999e+01\n9 19847     6.047400e+02 8.616000e+01\n7 19848     7.446200e+02 8.563000e+01\n9 19848     6.122100e+02 8.600000e+01\n7 19849     6.127800e+02 8.529999e+01\n10 19849     7.878900e+02 6.940002e+01\n7 19850     -3.893800e+02 8.320001e+01\n10 19850     -3.911700e+02 1.663600e+02\n7 19851     4.816500e+02 8.310999e+01\n10 19851     6.268300e+02 8.466998e+01\n7 19852     1.361300e+02 7.931000e+01\n15 19852     2.620500e+02 7.073999e+01\n7 19853     -3.939000e+02 7.790002e+01\n10 19853     -3.967300e+02 1.607600e+02\n15 19853     -3.750000e+02 1.534200e+02\n7 19854     -4.056000e+01 7.796997e+01\n10 19854     -4.670001e+01 9.652002e+01\n7 19855     9.083002e+01 7.792999e+01\n10 19855     1.039900e+02 8.309998e+01\n15 19855     1.967100e+02 7.158002e+01\n7 19856     2.510400e+02 7.682001e+01\n15 19856     4.348199e+02 6.102002e+01\n7 19857     -4.076700e+02 7.656000e+01\n13 19857     3.412000e+01 -2.359200e+02\n7 19858     -1.215000e+02 7.188000e+01\n10 19858     -1.351100e+02 9.913000e+01\n12 19858     -6.516998e+01 1.744000e+01\n7 19859     -4.092400e+02 6.969000e+01\n15 19859     -3.969400e+02 1.436600e+02\n7 19860     -3.578700e+02 6.878998e+01\n15 19860     -3.306700e+02 1.373800e+02\n7 19861     -4.611700e+02 6.696997e+01\n10 19861     -4.741700e+02 1.538900e+02\n15 19861     -4.638900e+02 1.445200e+02\n7 19862     7.320601e+02 6.633002e+01\n9 19862     6.049600e+02 6.483002e+01\n7 19863     -4.517500e+02 6.606000e+01\n10 19863     -4.634600e+02 1.519000e+02\n7 19864     -4.710700e+02 6.550000e+01\n10 19864     -4.849900e+02 1.532100e+02\n7 19865     7.449399e+02 6.529999e+01\n9 19865     6.159500e+02 6.777002e+01\n7 19866     -4.729600e+02 6.240997e+01\n10 19866     -4.878500e+02 1.502200e+02\n15 19866     -4.797600e+02 1.392300e+02\n7 19867     3.309200e+02 6.245001e+01\n10 19867     3.999600e+02 5.142999e+01\n7 19868     4.485000e+02 6.209998e+01\n15 19868     7.813500e+02 4.751001e+01\n7 19869     -3.634600e+02 5.781000e+01\n15 19869     -3.399900e+02 1.227000e+02\n7 19870     -2.004500e+02 5.440997e+01\n15 19870     -1.819600e+02 7.440997e+01\n7 19871     2.333500e+02 5.303998e+01\n10 19871     2.757200e+02 4.528003e+01\n7 19872     -4.594700e+02 5.010999e+01\n15 19872     -4.646900e+02 1.214900e+02\n7 19873     -2.093100e+02 5.001001e+01\n9 19873     -1.118700e+02 1.444000e+01\n7 19874     7.127100e+02 4.903998e+01\n9 19874     5.914301e+02 4.289001e+01\n7 19875     -1.730600e+02 4.853003e+01\n15 19875     -1.493300e+02 6.266998e+01\n7 19876     2.559399e+02 4.789001e+01\n10 19876     3.044000e+02 3.871997e+01\n7 19877     4.469000e+01 4.621997e+01\n10 19877     4.815997e+01 5.142999e+01\n7 19878     -5.246600e+02 4.123999e+01\n10 19878     -5.484900e+02 1.294800e+02\n15 19878     -5.492300e+02 1.154500e+02\n7 19879     -5.246600e+02 4.123999e+01\n10 19879     -5.484900e+02 1.294800e+02\n7 19880     -4.264200e+02 3.897998e+01\n15 19880     -4.243100e+02 1.029400e+02\n7 19881     -4.235800e+02 3.752002e+01\n13 19881     2.144000e+01 -2.681600e+02\n7 19882     -3.891400e+02 3.648999e+01\n15 19882     -3.770400e+02 9.576001e+01\n7 19883     2.755500e+02 3.246997e+01\n12 19883     4.001700e+02 1.150024e+00\n15 19883     4.648000e+02 -3.059998e+00\n7 19884     -1.751300e+02 3.151001e+01\n10 19884     -1.982500e+02 5.846002e+01\n15 19884     -1.550700e+02 3.953998e+01\n7 19885     -2.557000e+02 3.059003e+01\n10 19885     -2.826800e+02 6.908002e+01\n15 19885     -2.525300e+02 5.040997e+01\n7 19886     -2.557000e+02 3.059003e+01\n10 19886     -2.826800e+02 6.908002e+01\n15 19886     -2.525300e+02 5.040997e+01\n7 19887     -1.828300e+02 3.063000e+01\n10 19887     -2.055600e+02 5.941998e+01\n13 19887     2.794000e+02 -2.867600e+02\n15 19887     -1.634800e+02 4.034998e+01\n7 19888     3.131500e+02 2.839001e+01\n15 19888     5.183000e+02 -1.270001e+01\n7 19889     2.669800e+02 2.802002e+01\n15 19889     4.516000e+02 -8.489990e+00\n7 19890     -3.652700e+02 2.578998e+01\n10 19890     -3.733800e+02 9.573999e+01\n7 19891     5.532400e+02 2.195001e+01\n10 19891     7.039500e+02 7.000122e-01\n7 19892     2.771200e+02 1.553003e+01\n10 19892     3.241400e+02 -1.809998e+00\n15 19892     4.620800e+02 -2.759998e+01\n7 19893     2.414000e+02 1.344000e+01\n15 19893     4.104200e+02 -2.684998e+01\n7 19894     2.960601e+02 1.215002e+01\n15 19894     4.884600e+02 -3.459998e+01\n7 19895     2.960601e+02 1.215002e+01\n15 19895     4.884600e+02 -3.459998e+01\n7 19896     -4.099500e+02 8.409973e+00\n10 19896     -4.262800e+02 8.000000e+01\n7 19897     -2.535400e+02 8.510010e+00\n10 19897     -2.850900e+02 4.191998e+01\n15 19897     -2.555300e+02 1.912000e+01\n7 19898     4.415800e+02 6.719971e+00\n15 19898     7.557000e+02 -3.434998e+01\n7 19899     -2.035600e+02 3.760010e+00\n15 19899     -1.920500e+02 7.349976e+00\n7 19900     -2.035600e+02 3.760010e+00\n15 19900     -1.920500e+02 7.349976e+00\n7 19901     -1.296500e+02 3.309998e+00\n10 19901     -1.524000e+02 2.109998e+01\n15 19901     -1.020200e+02 -3.169983e+00\n7 19902     1.375400e+02 2.650024e+00\n10 19902     1.515400e+02 -7.950012e+00\n15 19902     2.541600e+02 -3.533002e+01\n7 19903     -1.155700e+02 2.070007e+00\n10 19903     -1.376300e+02 1.689001e+01\n7 19904     8.565997e+01 -1.000977e-02\n10 19904     9.058002e+01 -5.979980e+00\n7 19905     -4.744700e+02 -2.059998e+00\n10 19905     -4.991200e+02 7.354999e+01\n15 19905     -4.935900e+02 5.147998e+01\n7 19906     -2.530300e+02 -4.090027e+00\n15 19906     -2.540700e+02 2.890015e+00\n7 19907     -4.774300e+02 -6.780029e+00\n15 19907     -4.979900e+02 4.503998e+01\n7 19908     -4.321600e+02 -7.039978e+00\n15 19908     -4.406300e+02 4.045001e+01\n7 19909     6.599976e+00 -6.979980e+00\n15 19909     7.295001e+01 -3.395001e+01\n7 19910     2.760200e+02 -6.830017e+00\n10 19910     3.182200e+02 -2.959003e+01\n15 19910     4.546899e+02 -6.023999e+01\n7 19911     9.195001e+01 -7.770020e+00\n15 19911     1.885900e+02 -4.553003e+01\n7 19912     2.585999e+01 -8.460022e+00\n10 19912     2.015002e+01 -1.010999e+01\n15 19912     9.875000e+01 -3.890997e+01\n7 19913     2.815400e+02 -1.132001e+01\n8 19913     4.763300e+02 -1.258200e+02\n10 19913     3.237000e+02 -3.565997e+01\n7 19914     -2.491200e+02 -1.251001e+01\n12 19914     -2.167600e+02 -1.015700e+02\n7 19915     1.488700e+02 -1.270001e+01\n12 19915     2.688000e+02 -5.427002e+01\n7 19916     -2.517900e+02 -1.341998e+01\n15 19916     -2.524300e+02 -8.359985e+00\n7 19917     2.976801e+02 -1.509998e+01\n10 19917     3.418700e+02 -4.200000e+01\n7 19918     6.169301e+02 -1.526001e+01\n12 19918     7.659100e+02 -5.240997e+01\n7 19919     2.196700e+02 -2.034998e+01\n15 19919     3.704301e+02 -7.353998e+01\n7 19920     -1.477400e+02 -2.084998e+01\n15 19920     -1.262800e+02 -3.290002e+01\n7 19921     -8.682001e+01 -2.107001e+01\n15 19921     -5.040002e+01 -4.258002e+01\n7 19922     -1.412800e+02 -2.427002e+01\n15 19922     -1.182300e+02 -3.859003e+01\n7 19923     2.123000e+02 -2.421997e+01\n10 19923     2.388700e+02 -4.448999e+01\n12 19923     3.414301e+02 -6.465997e+01\n13 19923     6.329800e+02 -3.628400e+02\n15 19923     3.595100e+02 -7.841998e+01\n7 19924     -5.173900e+02 -3.060999e+01\n15 19924     -5.535300e+02 1.728998e+01\n7 19925     -4.660700e+02 -3.294000e+01\n15 19925     -4.884100e+02 8.989990e+00\n7 19926     -1.422400e+02 -3.306000e+01\n15 19926     -1.211100e+02 -5.072998e+01\n7 19927     -4.372800e+02 -3.503998e+01\n15 19927     -4.523000e+02 2.770020e+00\n7 19928     6.433000e+02 -3.627002e+01\n12 19928     8.008900e+02 -7.241998e+01\n7 19929     -5.607000e+02 -3.791998e+01\n15 19929     -6.091600e+02 1.134998e+01\n7 19930     -4.218900e+02 -3.932001e+01\n15 19930     -4.334600e+02 -4.590027e+00\n7 19931     5.052800e+02 -3.978998e+01\n15 19931     8.400699e+02 -1.108100e+02\n7 19932     -5.539900e+02 -4.053003e+01\n10 19932     -5.925300e+02 3.608002e+01\n15 19932     -6.014800e+02 7.619995e+00\n7 19933     2.138300e+02 -4.031000e+01\n10 19933     2.367400e+02 -6.442999e+01\n15 19933     3.565900e+02 -1.017600e+02\n7 19934     -2.181900e+02 -4.162000e+01\n10 19934     -2.554500e+02 -2.139001e+01\n12 19934     -1.686600e+02 -1.254300e+02\n7 19935     -5.838000e+02 -4.691998e+01\n15 19935     -6.402600e+02 1.849976e+00\n7 19936     -5.136500e+02 -4.792999e+01\n8 19936     -3.376100e+02 -2.888200e+02\n9 19936     -5.064800e+02 -2.235200e+02\n13 19936     -5.428998e+01 -3.341700e+02\n15 19936     -5.517400e+02 -7.020020e+00\n7 19937     1.975100e+02 -4.828003e+01\n10 19937     2.163300e+02 -7.215997e+01\n7 19938     -3.111300e+02 -5.248999e+01\n15 19938     -3.078900e+02 -4.128998e+01\n7 19939     -6.240000e+02 -5.365002e+01\n12 19939     -7.103000e+02 -2.167100e+02\n7 19940     -5.213500e+02 -5.542999e+01\n15 19940     -5.626100e+02 -1.566998e+01\n7 19941     5.694301e+02 -5.985999e+01\n10 19941     7.065800e+02 -1.033400e+02\n7 19942     -4.255500e+02 -6.832001e+01\n15 19942     -4.442800e+02 -4.371997e+01\n7 19943     1.860699e+02 -6.910999e+01\n15 19943     3.103000e+02 -1.394400e+02\n7 19944     -4.918900e+02 -7.040002e+01\n15 19944     -5.285300e+02 -3.953998e+01\n7 19945     -7.702002e+01 -7.260999e+01\n10 19945     -1.042500e+02 -7.303003e+01\n7 19946     -4.678600e+02 -7.369000e+01\n15 19946     -4.988000e+02 -4.631000e+01\n7 19947     -5.290100e+02 -7.577002e+01\n8 19947     -3.474000e+02 -3.120700e+02\n10 19947     -5.703500e+02 -7.510010e+00\n13 19947     -6.742999e+01 -3.570000e+02\n15 19947     -5.765600e+02 -4.289001e+01\n7 19948     -6.423100e+02 -7.879999e+01\n10 19948     -6.958800e+02 5.900269e-01\n13 19948     -1.659200e+02 -3.495000e+02\n15 19948     -7.195100e+02 -3.469000e+01\n7 19949     3.962600e+02 -7.954999e+01\n15 19949     6.634000e+02 -1.567400e+02\n7 19950     -5.002500e+02 -8.573999e+01\n15 19950     -5.426200e+02 -5.932001e+01\n7 19951     -1.010300e+02 -8.775000e+01\n15 19951     -7.876001e+01 -1.305400e+02\n7 19952     -2.481000e+01 -8.778003e+01\n15 19952     1.950000e+01 -1.412200e+02\n7 19953     -4.881600e+02 -8.989001e+01\n15 19953     -5.274700e+02 -6.634003e+01\n7 19954     -6.935999e+01 -9.009003e+01\n10 19954     -9.815997e+01 -9.462000e+01\n15 19954     -3.942999e+01 -1.386900e+02\n7 19955     8.045001e+01 -9.004999e+01\n15 19955     1.594600e+02 -1.570300e+02\n7 19956     8.045001e+01 -9.004999e+01\n15 19956     1.594600e+02 -1.570300e+02\n7 19957     1.165100e+02 -8.989001e+01\n10 19957     1.137000e+02 -1.139800e+02\n15 19957     2.094000e+02 -1.606200e+02\n7 19958     -8.584998e+01 -9.022998e+01\n10 19958     -1.171000e+02 -9.356000e+01\n15 19958     -6.167999e+01 -1.373200e+02\n7 19959     -2.300400e+02 -9.322998e+01\n10 19959     -2.610800e+02 -7.025000e+01\n15 19959     -2.247900e+02 -1.124200e+02\n7 19960     -6.703998e+01 -9.329999e+01\n15 19960     -3.665002e+01 -1.426700e+02\n7 19961     1.516000e+02 -9.540002e+01\n15 19961     2.605200e+02 -1.709900e+02\n7 19962     -6.229500e+02 -9.590002e+01\n10 19962     -6.767600e+02 -2.133002e+01\n13 19962     -1.490400e+02 -3.659400e+02\n15 19962     -6.983300e+02 -5.995001e+01\n7 19963     -5.086000e+02 -1.016500e+02\n10 19963     -5.517700e+02 -3.976001e+01\n7 19964     -6.184200e+02 -1.018300e+02\n8 19964     -4.371300e+02 -3.397300e+02\n7 19965     -6.205400e+02 -1.040900e+02\n10 19965     -6.750600e+02 -3.150000e+01\n15 19965     -6.961800e+02 -7.158002e+01\n7 19966     -7.254900e+02 -1.088500e+02\n15 19966     -8.275500e+02 -6.659998e+01\n7 19967     -5.102600e+02 -1.092000e+02\n15 19967     -5.592100e+02 -9.040997e+01\n7 19968     -5.274000e+02 -1.108600e+02\n15 19968     -5.812100e+02 -9.010999e+01\n7 19969     1.140600e+02 -1.160400e+02\n9 19969     2.410400e+02 -6.492999e+01\n7 19970     -4.510400e+02 -1.199400e+02\n13 19970     2.940002e+00 -4.014300e+02\n7 19971     5.007300e+02 -1.213500e+02\n15 19971     8.107100e+02 -2.320600e+02\n7 19972     -3.901200e+02 -1.259500e+02\n12 19972     -4.063000e+02 -2.766100e+02\n15 19972     -4.105600e+02 -1.260400e+02\n7 19973     2.834000e+02 -1.263700e+02\n10 19973     3.260100e+02 -1.607400e+02\n7 19974     5.018500e+02 -1.299800e+02\n15 19974     8.098500e+02 -2.449500e+02\n7 19975     5.320800e+02 -1.312400e+02\n15 19975     8.556100e+02 -2.513000e+02\n7 19976     2.439100e+02 -1.390400e+02\n10 19976     2.755500e+02 -1.736700e+02\n7 19977     -1.899200e+02 -1.416500e+02\n12 19977     -1.370200e+02 -2.573700e+02\n7 19978     5.956801e+02 -1.424900e+02\n12 19978     7.736899e+02 -1.925300e+02\n7 19979     9.657001e+01 -1.502300e+02\n10 19979     9.225000e+01 -1.765400e+02\n7 19980     -5.138800e+02 -1.573500e+02\n15 19980     -5.730600e+02 -1.544400e+02\n7 19981     -7.246997e+01 -1.600000e+02\n12 19981     1.653003e+01 -2.586900e+02\n7 19982     -2.958900e+02 -1.618500e+02\n13 19982     1.464500e+02 -4.525100e+02\n7 19983     -6.032800e+02 -1.625800e+02\n10 19983     -6.656500e+02 -1.010400e+02\n15 19983     -6.857600e+02 -1.514400e+02\n7 19984     -6.032800e+02 -1.625800e+02\n10 19984     -6.656500e+02 -1.010400e+02\n15 19984     -6.857600e+02 -1.514400e+02\n7 19985     -5.255100e+02 -1.691000e+02\n10 19985     -5.808100e+02 -1.163600e+02\n15 19985     -5.897500e+02 -1.690100e+02\n7 19986     5.286000e+02 -1.712400e+02\n12 19986     7.033000e+02 -2.308700e+02\n15 19986     8.395000e+02 -3.101000e+02\n7 19987     1.265800e+02 -1.837200e+02\n10 19987     1.269400e+02 -2.150200e+02\n7 19988     -6.059100e+02 -1.842200e+02\n10 19988     -6.719500e+02 -1.250200e+02\n15 19988     -6.932600e+02 -1.799600e+02\n7 19989     -3.991400e+02 -1.855600e+02\n15 19989     -4.339900e+02 -2.055300e+02\n7 19990     -4.885700e+02 -1.865200e+02\n8 19990     -2.805500e+02 -3.988700e+02\n9 19990     -4.164800e+02 -3.236000e+02\n10 19990     -5.430600e+02 -1.407500e+02\n15 19990     -5.470600e+02 -1.967600e+02\n7 19991     3.892999e+01 -1.870200e+02\n15 19991     1.067800e+02 -2.749300e+02\n7 19992     1.074500e+02 -1.945300e+02\n10 19992     1.044400e+02 -2.252900e+02\n7 19993     -4.623600e+02 -1.955900e+02\n10 19993     -5.155900e+02 -1.535600e+02\n15 19993     -5.158200e+02 -2.117000e+02\n7 19994     5.039500e+02 -2.012300e+02\n15 19994     7.939600e+02 -3.507400e+02\n7 19995     -6.925100e+02 -2.022100e+02\n15 19995     -8.040900e+02 -1.949700e+02\n7 19996     5.033199e+02 -2.037900e+02\n10 19996     5.914301e+02 -2.747400e+02\n15 19996     7.923600e+02 -3.543400e+02\n7 19997     -4.981600e+02 -2.088100e+02\n15 19997     -5.630800e+02 -2.250800e+02\n7 19998     4.204100e+02 -2.096300e+02\n15 19998     6.672400e+02 -3.493600e+02\n7 19999     7.770001e+01 -2.223500e+02\n10 19999     6.875000e+01 -2.528000e+02\n7 20000     3.359900e+02 -2.264300e+02\n10 20000     3.797600e+02 -2.829300e+02\n7 20001     3.792300e+02 -2.341800e+02\n15 20001     6.009100e+02 -3.785200e+02\n7 20002     3.792300e+02 -2.341800e+02\n10 20002     4.340000e+02 -2.955300e+02\n7 20003     3.518000e+02 -2.401500e+02\n10 20003     3.975900e+02 -3.005600e+02\n15 20003     5.568400e+02 -3.840300e+02\n7 20004     4.684301e+02 -2.455800e+02\n15 20004     7.289200e+02 -4.101900e+02\n7 20005     -1.299600e+02 -2.540300e+02\n10 20005     -1.700500e+02 -2.645600e+02\n7 20006     2.764001e+01 -2.640500e+02\n10 20006     5.349976e+00 -2.950400e+02\n12 20006     1.464100e+02 -3.778700e+02\n7 20007     5.263000e+01 -2.678800e+02\n12 20007     1.776200e+02 -3.795100e+02\n7 20008     3.439700e+02 -2.685900e+02\n10 20008     3.837800e+02 -3.331600e+02\n7 20009     -9.371002e+01 -2.710400e+02\n15 20009     -7.453998e+01 -3.676200e+02\n7 20010     4.672900e+02 -2.781900e+02\n15 20010     7.186500e+02 -4.578500e+02\n7 20011     -1.263800e+02 -2.789100e+02\n15 20011     -1.106700e+02 -3.712500e+02\n7 20012     -9.271997e+01 -2.820300e+02\n9 20012     7.006000e+01 -2.854400e+02\n7 20013     -4.394400e+02 -2.828600e+02\n10 20013     -5.045400e+02 -2.569900e+02\n7 20014     -2.562600e+02 -2.853700e+02\n15 20014     -2.747900e+02 -3.592400e+02\n7 20015     -4.922700e+02 -2.871500e+02\n15 20015     -5.714100e+02 -3.309600e+02\n7 20016     -4.922700e+02 -2.871500e+02\n15 20016     -5.714100e+02 -3.309600e+02\n7 20017     -4.354800e+02 -2.891500e+02\n10 20017     -5.011300e+02 -2.644900e+02\n7 20018     -3.788900e+02 -2.943700e+02\n15 20018     -4.302300e+02 -3.548300e+02\n7 20019     -5.804100e+02 -2.972800e+02\n15 20019     -6.835200e+02 -3.342200e+02\n7 20020     -3.567400e+02 -3.011100e+02\n15 20020     -4.037200e+02 -3.667100e+02\n7 20021     -6.735600e+02 -3.051900e+02\n15 20021     -8.001700e+02 -3.331300e+02\n7 20022     -2.735400e+02 -3.139700e+02\n15 20022     -3.007600e+02 -3.952200e+02\n7 20023     4.596000e+02 -3.172400e+02\n12 20023     6.596600e+02 -4.013300e+02\n7 20024     -5.637000e+02 -3.181300e+02\n15 20024     -6.667400e+02 -3.635200e+02\n7 20025     -5.456000e+01 -3.192400e+02\n15 20025     -2.310999e+01 -4.349399e+02\n7 20026     3.204900e+02 -3.192700e+02\n10 20026     3.464600e+02 -3.911700e+02\n7 20027     6.572998e+01 -3.217400e+02\n15 20027     1.361200e+02 -4.560400e+02\n7 20028     -5.503998e+01 -3.233500e+02\n15 20028     -2.453003e+01 -4.401500e+02\n7 20029     3.094200e+02 -3.246100e+02\n10 20029     3.317400e+02 -3.959000e+02\n7 20030     1.526001e+01 -3.277900e+02\n10 20030     -1.221997e+01 -3.643200e+02\n7 20031     -5.142600e+02 -3.465400e+02\n15 20031     -6.112200e+02 -4.076700e+02\n7 20032     -1.894000e+02 -3.485800e+02\n15 20032     -2.004600e+02 -4.535000e+02\n7 20033     -4.508100e+02 -3.491500e+02\n15 20033     -5.321200e+02 -4.190900e+02\n7 20034     -5.201000e+02 -3.510500e+02\n15 20034     -6.188100e+02 -4.128200e+02\n7 20035     -4.375900e+02 -3.522300e+02\n15 20035     -5.157300e+02 -4.255400e+02\n7 20036     -2.203300e+02 -3.527500e+02\n15 20036     -2.412600e+02 -4.547800e+02\n7 20037     -2.569100e+02 -3.536200e+02\n15 20037     -2.883100e+02 -4.507700e+02\n7 20038     -3.196900e+02 -3.564200e+02\n9 20038     -1.510400e+02 -4.184000e+02\n7 20039     -2.517700e+02 -3.581600e+02\n15 20039     -2.825200e+02 -4.577300e+02\n7 20040     -4.204999e+01 -3.725400e+02\n15 20040     -1.687000e+01 -5.085900e+02\n7 20041     3.054900e+02 -3.734600e+02\n10 20041     3.168400e+02 -4.537300e+02\n7 20042     -3.409700e+02 -3.771800e+02\n15 20042     -3.992600e+02 -4.708400e+02\n7 20043     -2.206800e+02 -3.770000e+02\n15 20043     -2.470200e+02 -4.876700e+02\n7 20044     -4.192500e+02 -3.800200e+02\n15 20044     -4.986300e+02 -4.647600e+02\n7 20045     -3.095600e+02 -3.797100e+02\n15 20045     -3.599800e+02 -4.786000e+02\n7 20046     5.367900e+02 -3.805700e+02\n10 20046     5.967600e+02 -4.980800e+02\n7 20047     1.338800e+02 -3.859000e+02\n10 20047     1.158300e+02 -4.460900e+02\n7 20048     6.174800e+02 -3.866400e+02\n10 20048     6.975100e+02 -5.187400e+02\n7 20049     5.325400e+02 -3.874200e+02\n10 20049     5.896500e+02 -5.053800e+02\n7 20050     -6.430200e+02 -3.987500e+02\n15 20050     -7.803100e+02 -4.606500e+02\n7 20051     -2.094100e+02 -4.022000e+02\n9 20051     -1.137000e+01 -4.266700e+02\n7 20052     -7.891998e+01 -4.024300e+02\n15 20052     -6.882001e+01 -5.431400e+02\n7 20053     -6.173700e+02 -4.028600e+02\n15 20053     -7.497900e+02 -4.694301e+02\n7 20054     -4.551700e+02 -4.041600e+02\n10 20054     -5.420300e+02 -3.950000e+02\n15 20054     -5.490500e+02 -4.920900e+02\n7 20055     -4.551700e+02 -4.041600e+02\n10 20055     -5.420300e+02 -3.950000e+02\n15 20055     -5.490500e+02 -4.920900e+02\n7 20056     1.383600e+02 -4.039300e+02\n15 20056     2.202500e+02 -5.807800e+02\n7 20057     4.155100e+02 -4.039800e+02\n10 20057     4.432000e+02 -5.072300e+02\n7 20058     -7.219971e+00 -4.043300e+02\n15 20058     2.510999e+01 -5.573500e+02\n7 20059     5.405900e+02 -4.059000e+02\n10 20059     5.959600e+02 -5.295500e+02\n7 20060     -4.446997e+01 -4.065800e+02\n15 20060     -2.440002e+01 -5.544000e+02\n7 20061     1.287100e+02 -4.065900e+02\n10 20061     1.060600e+02 -4.692300e+02\n7 20062     -5.085400e+02 -4.070300e+02\n15 20062     -6.159500e+02 -4.887900e+02\n7 20063     -3.133400e+02 -4.077100e+02\n9 20063     -1.174200e+02 -4.558400e+02\n10 20063     -3.874100e+02 -4.148600e+02\n15 20063     -3.713700e+02 -5.159900e+02\n7 20064     -4.540900e+02 -4.110000e+02\n10 20064     -5.418300e+02 -4.028600e+02\n7 20065     3.691899e+02 -4.107800e+02\n12 20065     5.763700e+02 -5.191000e+02\n7 20066     4.960022e+00 -4.116300e+02\n15 20066     3.971997e+01 -5.693900e+02\n7 20067     1.288000e+01 -4.150200e+02\n15 20067     4.917999e+01 -5.751400e+02\n7 20068     -3.051001e+01 -4.154900e+02\n15 20068     -9.400024e+00 -5.688500e+02\n7 20069     5.144900e+02 -4.160500e+02\n10 20069     5.612900e+02 -5.376300e+02\n7 20070     5.144900e+02 -4.160500e+02\n10 20070     5.612900e+02 -5.376300e+02\n7 20071     -5.160100e+02 -4.167800e+02\n15 20071     -6.272200e+02 -5.006200e+02\n7 20072     3.581000e+01 -4.171300e+02\n15 20072     7.901001e+01 -5.821000e+02\n7 20073     -4.640500e+02 -4.173800e+02\n10 20073     -5.529300e+02 -4.093199e+02\n15 20073     -5.623600e+02 -5.086200e+02\n7 20074     -2.224200e+02 -4.189700e+02\n15 20074     -2.579700e+02 -5.446500e+02\n7 20075     1.604399e+02 -4.213100e+02\n10 20075     1.398700e+02 -4.908199e+02\n7 20076     -7.101001e+01 -4.217200e+02\n15 20076     -6.309003e+01 -5.713500e+02\n7 20077     3.524301e+02 -4.228400e+02\n10 20077     3.631200e+02 -5.205800e+02\n7 20078     1.709800e+02 -4.237400e+02\n10 20078     1.521400e+02 -4.948700e+02\n7 20079     1.400800e+02 -4.242400e+02\n10 20079     1.155500e+02 -4.914500e+02\n7 20080     -3.003300e+02 -4.322200e+02\n10 20080     -3.774100e+02 -4.448101e+02\n7 20081     2.612800e+02 -4.323900e+02\n10 20081     2.540300e+02 -5.183000e+02\n7 20082     3.614600e+02 -4.350601e+02\n10 20082     3.713600e+02 -5.368700e+02\n7 20083     -3.060800e+02 -4.380300e+02\n15 20083     -3.684800e+02 -5.580601e+02\n7 20084     3.398800e+02 -4.400601e+02\n10 20084     3.450200e+02 -5.392800e+02\n7 20085     -4.688800e+02 -4.414900e+02\n10 20085     -5.635200e+02 -4.366000e+02\n15 20085     -5.737100e+02 -5.401300e+02\n7 20086     -3.710300e+02 -4.446000e+02\n15 20086     -4.516800e+02 -5.572100e+02\n7 20087     2.601400e+02 -4.462100e+02\n10 20087     2.500800e+02 -5.347300e+02\n7 20088     -2.330300e+02 -4.494200e+02\n10 20088     -3.065200e+02 -4.727900e+02\n7 20089     3.159200e+02 -4.511100e+02\n12 20089     5.228400e+02 -5.721200e+02\n7 20090     2.845699e+02 -4.558700e+02\n12 20090     4.868900e+02 -5.812400e+02\n7 20091     4.733600e+02 -4.589800e+02\n10 20091     5.018000e+02 -5.835800e+02\n7 20092     1.593101e+02 -4.600800e+02\n10 20092     1.308300e+02 -5.362800e+02\n7 20093     8.806000e+01 -4.604000e+02\n10 20093     4.963000e+01 -5.269900e+02\n7 20094     2.772100e+02 -4.635400e+02\n10 20094     2.665400e+02 -5.579200e+02\n7 20095     -3.263900e+02 -4.705400e+02\n10 20095     -4.124100e+02 -4.859100e+02\n7 20096     1.792400e+02 -4.711899e+02\n10 20096     1.515700e+02 -5.525699e+02\n7 20097     1.792400e+02 -4.711899e+02\n10 20097     1.515700e+02 -5.525699e+02\n12 20097     3.629900e+02 -6.128300e+02\n7 20098     -6.117500e+02 -4.714700e+02\n10 20098     -7.248100e+02 -4.560601e+02\n15 20098     -7.565300e+02 -5.602800e+02\n7 20099     2.679900e+02 -4.720100e+02\n10 20099     2.541200e+02 -5.668500e+02\n7 20100     4.957100e+02 -4.724301e+02\n10 20100     5.270100e+02 -6.039500e+02\n7 20101     3.186600e+02 -4.729500e+02\n10 20101     3.134700e+02 -5.758600e+02\n7 20102     -2.110100e+02 -4.733600e+02\n10 20102     -2.865300e+02 -5.030900e+02\n7 20103     5.218700e+02 -4.749900e+02\n10 20103     5.588199e+02 -6.114399e+02\n7 20104     -2.761100e+02 -4.758000e+02\n10 20104     -3.582000e+02 -4.976600e+02\n7 20105     2.552900e+02 -4.810100e+02\n12 20105     4.575000e+02 -6.148500e+02\n7 20106     -1.922400e+02 -4.818300e+02\n10 20106     -2.675600e+02 -5.154500e+02\n7 20107     2.287600e+02 -4.846400e+02\n10 20107     2.062100e+02 -5.754500e+02\n7 20108     -1.565002e+01 -4.853600e+02\n10 20108     -7.215002e+01 -5.424301e+02\n7 20109     -2.477600e+02 -4.894800e+02\n10 20109     -3.299400e+02 -5.171400e+02\n7 20110     8.900146e-01 -4.959700e+02\n10 20110     -5.569000e+01 -5.569200e+02\n7 20111     2.411700e+02 -5.020800e+02\n10 20111     2.173400e+02 -5.985300e+02\n7 20112     9.689001e+01 -5.039900e+02\n10 20112     5.137000e+01 -5.795300e+02\n7 20113     2.521600e+02 -5.170200e+02\n10 20113     2.273400e+02 -6.184800e+02\n7 20114     -1.837700e+02 -5.242600e+02\n10 20114     -2.662800e+02 -5.655800e+02\n7 20115     9.047998e+01 -5.269700e+02\n10 20115     3.946997e+01 -6.059200e+02\n7 20116     9.478003e+01 -5.353000e+02\n10 20116     4.279999e+01 -6.164600e+02\n7 20117     -1.860800e+02 -5.548500e+02\n10 20117     -2.734800e+02 -6.005601e+02\n7 20118     -2.311500e+02 -5.679301e+02\n10 20118     -3.250900e+02 -6.099800e+02\n7 20119     -1.658200e+02 5.874400e+02\n13 20119     2.409200e+02 1.840600e+02\n14 20119     3.757600e+02 -2.205700e+02\n7 20120     -2.069700e+02 5.759600e+02\n11 20120     1.653600e+02 -2.583100e+02\n7 20121     4.767200e+02 5.741500e+02\n9 20121     3.001400e+02 4.329800e+02\n12 20121     5.316801e+02 6.029000e+02\n7 20122     -2.964001e+01 5.725500e+02\n11 20122     3.319301e+02 -2.694900e+02\n7 20123     4.595400e+02 5.718800e+02\n9 20123     2.848101e+02 4.281800e+02\n7 20124     5.250000e+00 5.604000e+02\n12 20124     -4.860999e+01 5.052600e+02\n14 20124     5.461500e+02 -2.581100e+02\n7 20125     1.295300e+02 5.544800e+02\n9 20125     -1.170200e+02 2.579500e+02\n7 20126     3.099976e-01 5.406400e+02\n9 20126     -2.166300e+02 2.507600e+02\n14 20126     5.392700e+02 -2.782200e+02\n7 20127     -4.260999e+01 5.336400e+02\n9 20127     -2.507100e+02 2.454600e+02\n7 20128     -2.229500e+02 5.290400e+02\n13 20128     1.896600e+02 1.372200e+02\n7 20129     -3.749300e+02 5.261700e+02\n12 20129     -4.681900e+02 4.576000e+02\n7 20130     -4.396500e+02 5.256900e+02\n11 20130     -4.428998e+01 -2.843000e+02\n12 20130     -5.406700e+02 4.559100e+02\n7 20131     -4.396500e+02 5.256900e+02\n11 20131     -4.428998e+01 -2.843000e+02\n7 20132     -5.390700e+02 5.224000e+02\n11 20132     -1.286100e+02 -2.794000e+02\n7 20133     -1.881700e+02 5.200900e+02\n13 20133     2.169600e+02 1.288800e+02\n14 20133     3.460500e+02 -2.872500e+02\n7 20134     -2.440002e+00 5.132000e+02\n13 20134     3.694500e+02 1.181000e+02\n7 20135     -5.424900e+02 5.003100e+02\n11 20135     -1.344000e+02 -2.962300e+02\n7 20136     -6.585999e+01 4.948800e+02\n9 20136     -2.668800e+02 2.097100e+02\n11 20136     2.944301e+02 -3.355500e+02\n7 20137     -1.017300e+02 4.829800e+02\n11 20137     2.589100e+02 -3.443300e+02\n13 20137     2.841300e+02 9.473001e+01\n7 20138     3.110800e+02 4.710700e+02\n9 20138     1.270300e+02 2.767000e+02\n13 20138     6.772000e+02 6.875000e+01\n7 20139     3.475601e+02 4.644900e+02\n10 20139     5.200900e+02 5.684200e+02\n7 20140     9.450012e+00 4.635100e+02\n11 20140     3.606600e+02 -3.704500e+02\n14 20140     5.511000e+02 -3.629000e+02\n7 20141     -4.827600e+02 4.593800e+02\n11 20141     -8.972998e+01 -3.344100e+02\n12 20141     -5.884400e+02 3.776100e+02\n7 20142     3.418199e+02 4.579700e+02\n10 20142     5.124500e+02 5.610000e+02\n7 20143     -5.713700e+02 4.489300e+02\n11 20143     -1.659800e+02 -3.348600e+02\n7 20144     -5.960200e+02 4.485500e+02\n8 20144     -4.628900e+02 1.192300e+02\n12 20144     -7.178300e+02 3.625200e+02\n7 20145     -2.063100e+02 4.484400e+02\n12 20145     -2.773200e+02 3.706700e+02\n7 20146     -5.922000e+02 4.474500e+02\n11 20146     -1.829500e+02 -3.340100e+02\n12 20146     -7.134000e+02 3.613300e+02\n7 20147     4.668900e+02 4.448600e+02\n8 20147     4.932400e+02 1.882700e+02\n9 20147     3.075200e+02 3.235800e+02\n12 20147     5.326100e+02 4.565500e+02\n7 20148     -2.085400e+02 4.416300e+02\n10 20148     -1.305000e+02 5.894600e+02\n7 20149     3.492000e+02 4.346900e+02\n9 20149     1.686100e+02 2.540900e+02\n7 20150     -4.139800e+02 4.278900e+02\n10 20150     -3.775300e+02 5.817200e+02\n7 20151     -5.712700e+02 4.167700e+02\n10 20151     -5.648400e+02 5.771600e+02\n7 20152     -1.996700e+02 4.068300e+02\n10 20152     -1.226900e+02 5.469600e+02\n13 20152     1.992600e+02 3.439001e+01\n14 20152     3.230900e+02 -4.046400e+02\n7 20153     -1.566300e+02 4.017900e+02\n10 20153     -7.287000e+01 5.376200e+02\n11 20153     1.951700e+02 -4.152800e+02\n13 20153     2.372600e+02 2.790997e+01\n14 20153     3.707800e+02 -4.150100e+02\n7 20154     -5.268200e+02 4.001100e+02\n10 20154     -5.121200e+02 5.548700e+02\n7 20155     -1.989600e+02 3.945300e+02\n10 20155     -1.245800e+02 5.312300e+02\n7 20156     -1.989600e+02 3.945300e+02\n10 20156     -1.245800e+02 5.312300e+02\n7 20157     -3.394300e+02 3.927600e+02\n11 20157     2.903003e+01 -4.040400e+02\n7 20158     -3.069600e+02 3.920600e+02\n13 20158     1.092800e+02 2.704999e+01\n14 20158     2.107500e+02 -4.091400e+02\n7 20159     -1.182000e+02 3.875300e+02\n15 20159     5.273999e+01 5.729600e+02\n7 20160     -5.548400e+02 3.871900e+02\n8 20160     -4.356500e+02 5.923001e+01\n12 20160     -6.720000e+02 2.909300e+02\n7 20161     -1.641400e+02 3.860000e+02\n10 20161     -8.498999e+01 5.181600e+02\n7 20162     1.898000e+02 3.813500e+02\n10 20162     3.319200e+02 4.863300e+02\n7 20163     6.878998e+01 3.775200e+02\n10 20163     1.867200e+02 4.899700e+02\n7 20164     5.607600e+02 3.766300e+02\n8 20164     5.847200e+02 1.488200e+02\n7 20165     1.108800e+02 3.762600e+02\n10 20165     2.366100e+02 4.854000e+02\n7 20166     1.067700e+02 3.697900e+02\n10 20166     2.292900e+02 4.773000e+02\n7 20167     -6.221300e+02 3.679600e+02\n13 20167     -1.388800e+02 2.427002e+01\n7 20168     -6.221300e+02 3.679600e+02\n13 20168     -1.388800e+02 2.427002e+01\n7 20169     -2.955700e+02 3.604300e+02\n10 20169     -2.407300e+02 4.960900e+02\n11 20169     6.340002e+01 -4.381500e+02\n7 20170     -4.457100e+02 3.599400e+02\n15 20170     -3.958500e+02 5.510700e+02\n7 20171     -2.554600e+02 3.597700e+02\n13 20171     1.541600e+02 -3.869995e+00\n14 20171     2.660400e+02 -4.509301e+02\n7 20172     -5.940300e+02 3.586400e+02\n15 20172     -5.984700e+02 5.529500e+02\n7 20173     -2.419500e+02 3.574300e+02\n10 20173     -1.799100e+02 4.880300e+02\n7 20174     1.877700e+02 3.559200e+02\n10 20174     3.240000e+02 4.543300e+02\n7 20175     1.877700e+02 3.559200e+02\n10 20175     3.240000e+02 4.543300e+02\n7 20176     5.403101e+02 3.559900e+02\n10 20176     7.243199e+02 4.049700e+02\n7 20177     -5.899600e+02 3.548000e+02\n10 20177     -5.881700e+02 5.058000e+02\n12 20177     -7.108000e+02 2.502600e+02\n7 20178     -5.821200e+02 3.539100e+02\n8 20178     -4.601700e+02 2.975000e+01\n13 20178     -1.104500e+02 1.078003e+01\n7 20179     6.277400e+02 3.532700e+02\n9 20179     4.647500e+02 2.866900e+02\n10 20179     8.314700e+02 3.915100e+02\n7 20180     -3.175200e+02 3.479300e+02\n14 20180     1.984100e+02 -4.559900e+02\n7 20181     -4.795600e+02 3.439700e+02\n13 20181     -3.257001e+01 -3.869995e+00\n14 20181     3.320001e+01 -4.405900e+02\n7 20182     5.696700e+02 3.429500e+02\n8 20182     5.964399e+02 1.216200e+02\n7 20183     -3.550100e+02 3.411000e+02\n14 20183     1.570500e+02 -4.582000e+02\n7 20184     -5.029800e+02 3.394200e+02\n14 20184     9.539978e+00 -4.420800e+02\n7 20185     -2.974400e+02 3.381800e+02\n15 20185     -1.982100e+02 5.128600e+02\n7 20186     5.957600e+02 3.369600e+02\n10 20186     7.905699e+02 3.751100e+02\n12 20186     6.957000e+02 3.535200e+02\n7 20187     -5.406400e+02 3.355500e+02\n13 20187     -8.116998e+01 -6.780029e+00\n14 20187     -2.721997e+01 -4.411000e+02\n7 20188     -4.242600e+02 3.349900e+02\n13 20188     9.159973e+00 -1.440997e+01\n14 20188     8.435999e+01 -4.561200e+02\n7 20189     3.965500e+02 3.342800e+02\n10 20189     5.517200e+02 3.959400e+02\n12 20189     4.578600e+02 3.176500e+02\n7 20190     -5.934200e+02 3.249000e+02\n13 20190     -1.229900e+02 -1.260999e+01\n7 20191     -5.067100e+02 3.251700e+02\n14 20191     3.260010e+00 -4.565400e+02\n7 20192     -5.067100e+02 3.251700e+02\n11 20192     -1.287600e+02 -4.441500e+02\n14 20192     3.260010e+00 -4.565400e+02\n7 20193     -5.543100e+02 3.226600e+02\n11 20193     -1.703500e+02 -4.406100e+02\n7 20194     2.646200e+02 3.230000e+02\n15 20194     5.774399e+02 4.546200e+02\n7 20195     5.704100e+02 3.217800e+02\n8 20195     5.993000e+02 1.035800e+02\n12 20195     6.678000e+02 3.315800e+02\n7 20196     5.704100e+02 3.217800e+02\n12 20196     6.678000e+02 3.315800e+02\n7 20197     -4.719200e+02 3.179300e+02\n11 20197     -9.952002e+01 -4.547600e+02\n14 20197     3.550000e+01 -4.685000e+02\n7 20198     -5.169200e+02 3.132600e+02\n11 20198     -1.395000e+02 -4.533700e+02\n13 20198     -6.548999e+01 -2.682001e+01\n7 20199     -5.701100e+02 3.125100e+02\n10 20199     -5.655600e+02 4.559200e+02\n11 20199     -1.858900e+02 -4.475600e+02\n13 20199     -1.068700e+02 -2.435999e+01\n7 20200     -1.016400e+02 3.121600e+02\n10 20200     -2.615002e+01 4.205400e+02\n13 20200     2.916700e+02 -5.308002e+01\n14 20200     4.398900e+02 -5.216899e+02\n7 20201     -3.770300e+02 3.113700e+02\n11 20201     -2.009998e+01 -4.737600e+02\n7 20202     -4.610100e+02 3.090500e+02\n15 20202     -4.185600e+02 4.836100e+02\n7 20203     -4.911300e+02 3.071600e+02\n11 20203     -1.175600e+02 -4.618700e+02\n7 20204     -6.449100e+02 3.050300e+02\n10 20204     -6.515500e+02 4.540700e+02\n12 20204     -7.759100e+02 1.875700e+02\n7 20205     -2.206100e+02 3.027500e+02\n10 20205     -1.646200e+02 4.188900e+02\n7 20206     -3.700300e+02 3.016100e+02\n10 20206     -3.353600e+02 4.293500e+02\n7 20207     -4.929600e+02 3.008200e+02\n13 20207     -4.862000e+01 -3.884003e+01\n14 20207     1.117999e+01 -4.840100e+02\n7 20208     2.929399e+02 2.984900e+02\n15 20208     6.125900e+02 4.154300e+02\n7 20209     -5.717600e+02 2.981600e+02\n11 20209     -1.895500e+02 -4.595700e+02\n13 20209     -1.103800e+02 -3.590002e+01\n14 20209     -6.540002e+01 -4.765601e+02\n7 20210     -3.680600e+02 2.980500e+02\n10 20210     -3.336700e+02 4.250600e+02\n7 20211     2.866400e+02 2.980700e+02\n15 20211     6.027500e+02 4.150600e+02\n7 20212     -5.235500e+02 2.968500e+02\n13 20212     -7.322998e+01 -4.013000e+01\n7 20213     -5.204000e+02 2.917900e+02\n11 20213     -1.454600e+02 -4.711700e+02\n7 20214     -5.135200e+02 2.917800e+02\n13 20214     -6.588000e+01 -4.507001e+01\n7 20215     -3.811500e+02 2.919300e+02\n10 20215     -3.488400e+02 4.190500e+02\n13 20215     4.766998e+01 -5.348999e+01\n14 20215     1.309200e+02 -5.086500e+02\n7 20216     -5.693600e+02 2.904700e+02\n13 20216     -1.094300e+02 -4.284998e+01\n7 20217     -7.596002e+01 2.900500e+02\n15 20217     1.146002e+01 3.860500e+02\n7 20218     -4.103300e+02 2.876200e+02\n11 20218     -5.507001e+01 -4.918000e+02\n15 20218     -3.568500e+02 4.487300e+02\n7 20219     -5.800700e+02 2.862600e+02\n10 20219     -5.776900e+02 4.270200e+02\n7 20220     -5.506200e+02 2.814000e+02\n13 20220     -9.645001e+01 -5.159998e+01\n14 20220     -4.877002e+01 -4.970601e+02\n7 20221     -3.930700e+02 2.765600e+02\n10 20221     -3.649500e+02 4.009000e+02\n11 20221     -4.350000e+01 -5.042700e+02\n15 20221     -3.359200e+02 4.319000e+02\n7 20222     2.694700e+02 2.741300e+02\n15 20222     5.716400e+02 3.801400e+02\n7 20223     -2.734300e+02 2.737700e+02\n11 20223     5.983002e+01 -5.253101e+02\n7 20224     -7.391600e+02 2.725300e+02\n11 20224     -3.329600e+02 -4.599000e+02\n7 20225     -7.391600e+02 2.725300e+02\n11 20225     -3.329600e+02 -4.599000e+02\n7 20226     -6.935000e+02 2.685500e+02\n10 20226     -7.115800e+02 4.132900e+02\n7 20227     -4.148100e+02 2.673800e+02\n11 20227     -6.441998e+01 -5.100500e+02\n15 20227     -3.660700e+02 4.198700e+02\n7 20228     -5.736200e+02 2.658700e+02\n11 20228     -1.962200e+02 -4.870500e+02\n7 20229     -3.489900e+02 2.661000e+02\n10 20229     -3.162500e+02 3.844300e+02\n7 20230     2.724000e+02 2.642100e+02\n15 20230     5.735000e+02 3.651500e+02\n7 20231     -9.921002e+01 2.634900e+02\n10 20231     -8.673999e+01 3.219200e+02\n15 20231     -2.675000e+01 3.491800e+02\n7 20232     6.273101e+02 2.637900e+02\n9 20232     4.777300e+02 2.093200e+02\n7 20233     -6.635400e+02 2.624000e+02\n10 20233     -6.751100e+02 4.058100e+02\n7 20234     4.163300e+02 2.601200e+02\n8 20234     4.620500e+02 1.789999e+01\n7 20235     3.598900e+02 2.573600e+02\n10 20235     5.033400e+02 3.092400e+02\n13 20235     7.292600e+02 -1.235700e+02\n15 20235     6.862900e+02 3.418000e+02\n7 20236     6.140000e+02 2.529900e+02\n9 20236     4.685000e+02 1.964000e+02\n12 20236     7.273600e+02 2.586000e+02\n7 20237     -4.512700e+02 2.515300e+02\n11 20237     -9.915002e+01 -5.195699e+02\n13 20237     -1.091998e+01 -8.297998e+01\n7 20238     -5.551000e+02 2.457000e+02\n11 20238     -1.867900e+02 -5.083900e+02\n15 20238     -5.511000e+02 4.016500e+02\n7 20239     2.849700e+02 2.443900e+02\n15 20239     5.857900e+02 3.343300e+02\n7 20240     -6.828100e+02 2.402200e+02\n10 20240     -6.994600e+02 3.806600e+02\n14 20240     -1.847200e+02 -5.223101e+02\n7 20241     1.405500e+02 2.390200e+02\n13 20241     5.672000e+02 -1.275200e+02\n7 20242     1.780100e+02 2.359900e+02\n15 20242     3.516801e+02 2.899400e+02\n7 20243     -7.531000e+01 2.303000e+02\n10 20243     -6.770001e+01 2.769200e+02\n7 20244     -5.355300e+02 2.272900e+02\n10 20244     -5.322200e+02 3.543400e+02\n15 20244     -5.291500e+02 3.742000e+02\n7 20245     -5.928700e+02 2.248300e+02\n11 20245     -2.243300e+02 -5.222200e+02\n7 20246     -5.928700e+02 2.248300e+02\n11 20246     -2.243300e+02 -5.222200e+02\n7 20247     1.883900e+02 2.243800e+02\n13 20247     6.070699e+02 -1.424700e+02\n7 20248     1.883900e+02 2.243800e+02\n15 20248     3.659600e+02 2.742900e+02\n7 20249     -5.939100e+02 2.200900e+02\n13 20249     -1.325600e+02 -9.985999e+01\n14 20249     -9.772998e+01 -5.572100e+02\n7 20250     -3.971600e+02 2.142400e+02\n15 20250     -3.535600e+02 3.441700e+02\n7 20251     7.029800e+02 2.132500e+02\n9 20251     5.531500e+02 1.865000e+02\n7 20252     -1.489001e+01 2.127300e+02\n15 20252     7.023999e+01 2.669800e+02\n7 20253     7.023999e+01 2.115800e+02\n13 20253     5.097200e+02 -1.473500e+02\n7 20254     5.572200e+02 2.108400e+02\n10 20254     7.306100e+02 2.287400e+02\n7 20255     6.671002e+01 2.090800e+02\n10 20255     8.978998e+01 2.387300e+02\n7 20256     -3.701400e+02 2.077000e+02\n10 20256     -3.493500e+02 3.147200e+02\n15 20256     -3.191900e+02 3.322100e+02\n7 20257     2.022500e+02 2.035200e+02\n13 20257     6.191700e+02 -1.615100e+02\n7 20258     3.752000e+02 2.013400e+02\n10 20258     5.173300e+02 2.413500e+02\n13 20258     7.435100e+02 -1.756400e+02\n15 20258     7.038199e+02 2.610800e+02\n7 20259     3.185000e+02 2.005400e+02\n15 20259     6.242800e+02 2.663300e+02\n7 20260     7.696002e+01 1.953500e+02\n10 20260     1.005400e+02 2.215700e+02\n12 20260     1.600300e+02 1.819000e+02\n7 20261     3.289600e+02 1.917600e+02\n15 20261     6.375000e+02 2.522200e+02\n7 20262     1.116998e+01 1.881400e+02\n8 20262     2.266800e+02 4.114999e+01\n12 20262     8.416998e+01 1.687500e+02\n7 20263     5.825100e+02 1.854500e+02\n9 20263     4.515900e+02 1.270600e+02\n7 20264     6.305300e+02 1.849400e+02\n10 20264     8.178500e+02 1.862800e+02\n7 20265     -3.218000e+02 1.842100e+02\n10 20265     -2.988300e+02 2.821300e+02\n15 20265     -2.608000e+02 2.952300e+02\n7 20266     4.627600e+02 1.837500e+02\n10 20266     6.171500e+02 2.083700e+02\n7 20267     -7.379900e+02 1.816900e+02\n14 20267     -2.505300e+02 -5.768800e+02\n7 20268     4.611000e+02 1.808000e+02\n10 20268     6.160601e+02 2.042700e+02\n7 20269     4.513900e+02 1.763600e+02\n8 20269     5.025900e+02 -5.237000e+01\n7 20270     4.513900e+02 1.763600e+02\n8 20270     5.025900e+02 -5.237000e+01\n7 20271     -4.514900e+02 1.757700e+02\n10 20271     -4.463300e+02 2.837200e+02\n7 20272     -1.457500e+02 1.724200e+02\n10 20272     -1.506600e+02 2.188400e+02\n13 20272     3.165200e+02 -1.679800e+02\n7 20273     3.535200e+02 1.716900e+02\n15 20273     6.685500e+02 2.203100e+02\n7 20274     5.920400e+02 1.686200e+02\n9 20274     4.622900e+02 1.142800e+02\n10 20274     7.697400e+02 1.726000e+02\n12 20274     7.105500e+02 1.573200e+02\n7 20275     4.221100e+02 1.667300e+02\n10 20275     5.685500e+02 1.938500e+02\n7 20276     5.352200e+02 1.584600e+02\n9 20276     4.112600e+02 8.742001e+01\n10 20276     7.002600e+02 1.682700e+02\n12 20276     6.422600e+02 1.335500e+02\n7 20277     6.992300e+02 1.531100e+02\n9 20277     5.604301e+02 1.330400e+02\n7 20278     -3.811800e+02 1.501300e+02\n13 20278     5.438000e+01 -1.753500e+02\n7 20279     -3.811800e+02 1.501300e+02\n15 20279     -3.446200e+02 2.523100e+02\n7 20280     1.871400e+02 1.456900e+02\n12 20280     2.885000e+02 1.289400e+02\n7 20281     4.678000e+02 1.346600e+02\n15 20281     8.275800e+02 1.535500e+02\n7 20282     -3.911200e+02 1.264900e+02\n15 20282     -3.621000e+02 2.204300e+02\n7 20283     5.320200e+02 1.204800e+02\n9 20283     4.142100e+02 5.090002e+01\n10 20283     6.936500e+02 1.236600e+02\n7 20284     1.853998e+01 1.187100e+02\n10 20284     2.352002e+01 1.364000e+02\n13 20284     4.654000e+02 -2.232700e+02\n15 20284     1.009800e+02 1.334700e+02\n7 20285     4.741400e+02 1.139800e+02\n10 20285     6.256700e+02 1.240300e+02\n15 20285     8.357700e+02 1.224800e+02\n7 20286     3.139000e+02 1.135900e+02\n10 20286     3.914500e+02 1.169100e+02\n15 20286     5.450100e+02 1.135400e+02\n7 20287     -3.833002e+01 1.109200e+02\n10 20287     -4.207001e+01 1.335000e+02\n15 20287     2.392999e+01 1.306900e+02\n7 20288     -5.317000e+02 1.104700e+02\n15 20288     -5.456200e+02 2.111100e+02\n7 20289     -3.279000e+02 1.089600e+02\n13 20289     1.029400e+02 -2.141700e+02\n7 20290     -1.908900e+02 1.080600e+02\n10 20290     -2.024200e+02 1.516800e+02\n15 20290     -1.590500e+02 1.480900e+02\n7 20291     -1.814600e+02 1.062800e+02\n10 20291     -1.931900e+02 1.485200e+02\n15 20291     -1.490600e+02 1.441000e+02\n7 20292     -4.452700e+02 1.017900e+02\n15 20292     -4.368200e+02 1.913200e+02\n7 20293     -4.038000e+02 9.976999e+01\n13 20293     3.637000e+01 -2.164400e+02\n7 20294     -4.568700e+02 9.937000e+01\n15 20294     -4.519700e+02 1.891900e+02\n7 20295     -6.368500e+02 9.798999e+01\n13 20295     -1.649700e+02 -1.994800e+02\n7 20296     4.638101e+02 9.107001e+01\n10 20296     6.067400e+02 9.616998e+01\n7 20297     4.482000e+02 8.507001e+01\n15 20297     7.869000e+02 8.214001e+01\n7 20298     4.482000e+02 8.507001e+01\n15 20298     7.869000e+02 8.214001e+01\n7 20299     -1.792500e+02 8.367999e+01\n10 20299     -1.932800e+02 1.219600e+02\n15 20299     -1.490900e+02 1.130500e+02\n7 20300     1.729999e+01 8.353000e+01\n13 20300     4.632300e+02 -2.539500e+02\n15 20300     9.609003e+01 8.520001e+01\n7 20301     8.790997e+01 7.677002e+01\n10 20301     1.002000e+02 8.250000e+01\n13 20301     5.242200e+02 -2.635300e+02\n7 20302     -1.782600e+02 7.521002e+01\n10 20302     -1.944500e+02 1.112600e+02\n7 20303     -7.047600e+02 7.437000e+01\n15 20303     -7.702400e+02 1.782200e+02\n7 20304     -7.047600e+02 7.437000e+01\n15 20304     -7.702400e+02 1.782200e+02\n7 20305     -1.450200e+02 6.045001e+01\n15 20305     -1.110500e+02 7.694000e+01\n7 20306     5.025200e+02 5.796002e+01\n15 20306     8.628500e+02 3.572998e+01\n7 20307     -5.185500e+02 4.872998e+01\n10 20307     -5.399700e+02 1.372400e+02\n7 20308     -5.185500e+02 4.872998e+01\n15 20308     -5.401400e+02 1.252600e+02\n7 20309     -4.767100e+02 4.533002e+01\n15 20309     -4.878800e+02 1.163900e+02\n7 20310     -3.901200e+02 4.421002e+01\n13 20310     5.069000e+01 -2.649000e+02\n15 20310     -3.762900e+02 1.064000e+02\n7 20311     -5.278003e+01 4.292999e+01\n10 20311     -6.248999e+01 5.713000e+01\n7 20312     6.229399e+02 4.240002e+01\n9 20312     5.124301e+02 7.059998e+00\n7 20313     7.241300e+02 4.114001e+01\n9 20313     6.036200e+02 3.937000e+01\n7 20314     -4.301200e+02 3.875000e+01\n13 20314     1.576001e+01 -2.664700e+02\n7 20315     -5.089100e+02 3.845001e+01\n10 20315     -5.308200e+02 1.251800e+02\n15 20315     -5.299000e+02 1.102700e+02\n7 20316     -4.619600e+02 3.856000e+01\n15 20316     -4.704700e+02 1.057400e+02\n7 20317     -2.084000e+02 3.714001e+01\n10 20317     -2.302700e+02 7.110999e+01\n15 20317     -1.914300e+02 5.377002e+01\n7 20318     2.748300e+02 3.651001e+01\n10 20318     3.263400e+02 2.425000e+01\n7 20319     -4.476100e+02 3.545001e+01\n9 20319     -4.683200e+02 -1.500800e+02\n13 20319     7.800293e-01 -2.679600e+02\n15 20319     -4.529000e+02 1.000300e+02\n7 20320     -1.140600e+02 3.164001e+01\n15 20320     -7.663000e+01 3.288000e+01\n7 20321     -2.328500e+02 2.723999e+01\n10 20321     -2.585200e+02 6.244000e+01\n7 20322     -1.437600e+02 1.996002e+01\n15 20322     -1.183900e+02 1.969000e+01\n7 20323     -1.809700e+02 1.917999e+01\n15 20323     -1.621400e+02 2.488000e+01\n7 20324     -3.677600e+02 1.758002e+01\n9 20324     -3.735200e+02 -1.502500e+02\n10 20324     -3.767400e+02 8.663000e+01\n13 20324     7.128003e+01 -2.897200e+02\n7 20325     -3.660100e+02 1.467999e+01\n8 20325     -2.020500e+02 -2.305300e+02\n13 20325     7.328998e+01 -2.920900e+02\n7 20326     -1.770600e+02 1.234003e+01\n15 20326     -1.580700e+02 1.546997e+01\n7 20327     -2.240002e+01 1.084998e+01\n10 20327     -3.115997e+01 1.840002e+01\n13 20327     4.237400e+02 -3.142000e+02\n7 20328     5.083400e+02 8.580017e+00\n15 20328     8.578500e+02 -3.885999e+01\n7 20329     5.354700e+02 7.849976e+00\n10 20329     6.780100e+02 -1.546997e+01\n12 20329     6.671300e+02 -3.565002e+01\n7 20330     -3.839800e+02 2.969971e+00\n15 20330     -3.768800e+02 4.960999e+01\n7 20331     -6.113200e+02 2.600098e-01\n10 20331     -6.500800e+02 8.984998e+01\n7 20332     -4.052700e+02 6.300049e-01\n8 20332     -2.382900e+02 -2.437700e+02\n13 20332     3.896002e+01 -3.007700e+02\n7 20333     -3.732300e+02 -2.960022e+00\n10 20333     -3.869200e+02 6.192999e+01\n15 20333     -3.638600e+02 4.038000e+01\n7 20334     -6.041900e+02 -4.429993e+00\n13 20334     -1.350300e+02 -2.893800e+02\n15 20334     -6.582100e+02 6.144000e+01\n7 20335     -1.731000e+01 -4.260010e+00\n10 20335     -2.869000e+01 -4.799805e-01\n7 20336     -1.981200e+02 -5.349976e+00\n10 20336     -2.253700e+02 2.040002e+01\n13 20336     2.645900e+02 -3.165300e+02\n15 20336     -1.866700e+02 -5.859985e+00\n7 20337     -6.002000e+02 -7.799988e+00\n10 20337     -6.384300e+02 7.933002e+01\n7 20338     -2.013100e+02 -8.510010e+00\n10 20338     -2.308100e+02 1.642999e+01\n12 20338     -1.555600e+02 -8.740997e+01\n15 20338     -1.923800e+02 -1.020001e+01\n7 20339     -4.157800e+02 -1.123999e+01\n8 20339     -2.457100e+02 -2.532800e+02\n13 20339     2.985999e+01 -3.106800e+02\n7 20340     -2.115300e+02 -1.191998e+01\n13 20340     2.530500e+02 -3.209100e+02\n7 20341     9.510010e+00 -1.247998e+01\n10 20341     -4.099731e-01 -1.357001e+01\n13 20341     4.540000e+02 -3.362700e+02\n15 20341     7.542999e+01 -4.290002e+01\n7 20342     -4.140000e+02 -2.046997e+01\n8 20342     -2.416400e+02 -2.605300e+02\n13 20342     3.172998e+01 -3.188900e+02\n7 20343     -4.064000e+02 -2.716998e+01\n9 20343     -3.956800e+02 -1.892300e+02\n7 20344     -5.354000e+02 -3.121002e+01\n15 20344     -5.765200e+02 1.840002e+01\n7 20345     -5.354000e+02 -3.121002e+01\n15 20345     -5.765200e+02 1.840002e+01\n7 20346     -5.319700e+02 -3.265002e+01\n15 20346     -5.724900e+02 1.589001e+01\n7 20347     -2.010100e+02 -3.265002e+01\n8 20347     5.371997e+01 -1.696500e+02\n10 20347     -2.345000e+02 -1.303998e+01\n13 20347     2.643800e+02 -3.390900e+02\n15 20347     -1.971500e+02 -4.362000e+01\n7 20348     1.527100e+02 -3.240997e+01\n8 20348     3.773000e+02 -1.446200e+02\n13 20348     5.797700e+02 -3.656700e+02\n15 20348     2.731600e+02 -8.382001e+01\n7 20349     -4.433400e+02 -3.638000e+01\n13 20349     6.419983e+00 -3.309200e+02\n7 20350     -4.954400e+02 -3.717999e+01\n8 20350     -3.211600e+02 -2.786800e+02\n12 20350     -5.515900e+02 -1.857700e+02\n15 20350     -5.266300e+02 5.679993e+00\n7 20351     -1.344900e+02 -3.942999e+01\n13 20351     3.222100e+02 -3.505500e+02\n7 20352     -4.285100e+02 -4.122998e+01\n9 20352     -4.133300e+02 -2.037600e+02\n7 20353     -5.856700e+02 -4.413000e+01\n13 20353     -1.172600e+02 -3.247300e+02\n15 20353     -6.418500e+02 5.789978e+00\n7 20354     -5.654100e+02 -4.581000e+01\n8 20354     -3.921900e+02 -2.904900e+02\n10 20354     -6.059900e+02 3.120001e+01\n15 20354     -6.171000e+02 1.200012e+00\n7 20355     -4.270900e+02 -4.576001e+01\n13 20355     2.088000e+01 -3.398400e+02\n7 20356     3.158500e+02 -5.778003e+01\n10 20356     3.804000e+02 -8.140002e+01\n15 20356     5.345400e+02 -1.226200e+02\n7 20357     -6.363800e+02 -7.217999e+01\n10 20357     -6.883900e+02 7.510010e+00\n7 20358     5.285601e+02 -7.272998e+01\n15 20358     8.663700e+02 -1.635200e+02\n7 20359     6.409700e+02 -7.222998e+01\n12 20359     8.081000e+02 -1.112300e+02\n7 20360     -5.784000e+02 -7.394000e+01\n13 20360     -1.108700e+02 -3.511400e+02\n7 20361     -2.103003e+01 -8.038000e+01\n12 20361     7.866998e+01 -1.485100e+02\n13 20361     4.261801e+02 -3.940200e+02\n7 20362     -5.198200e+02 -8.334998e+01\n10 20362     -5.622000e+02 -1.653998e+01\n7 20363     4.368101e+02 -8.328998e+01\n15 20363     7.244500e+02 -1.667500e+02\n7 20364     -5.059000e+02 -8.510999e+01\n10 20364     -5.465600e+02 -2.104999e+01\n15 20364     -5.495800e+02 -5.826001e+01\n7 20365     -5.171900e+02 -8.819000e+01\n15 20365     -5.641100e+02 -6.106000e+01\n7 20366     -5.049400e+02 -8.909998e+01\n13 20366     -4.609998e+01 -3.705600e+02\n7 20367     -1.473000e+02 -9.019000e+01\n10 20367     -1.801400e+02 -8.244000e+01\n15 20367     -1.329100e+02 -1.255100e+02\n7 20368     -9.125000e+01 -9.871002e+01\n10 20368     -1.247700e+02 -1.027000e+02\n7 20369     -4.099800e+02 -1.043200e+02\n12 20369     -4.342200e+02 -2.549400e+02\n7 20370     5.186300e+02 -1.138400e+02\n15 20370     8.391600e+02 -2.239700e+02\n7 20371     5.186300e+02 -1.138400e+02\n15 20371     8.391600e+02 -2.239700e+02\n7 20372     4.313000e+02 -1.180400e+02\n15 20372     7.068500e+02 -2.172800e+02\n7 20373     -3.890400e+02 -1.306200e+02\n15 20373     -4.101300e+02 -1.323600e+02\n7 20374     -5.969500e+02 -1.312300e+02\n8 20374     -4.072800e+02 -3.623900e+02\n10 20374     -6.534200e+02 -6.544000e+01\n7 20375     -1.971700e+02 -1.313600e+02\n12 20375     -1.453600e+02 -2.416400e+02\n13 20375     2.523900e+02 -4.282800e+02\n7 20376     2.854399e+02 -1.314400e+02\n10 20376     3.289100e+02 -1.680200e+02\n7 20377     -5.824100e+02 -1.319800e+02\n8 20377     -3.921000e+02 -3.617100e+02\n10 20377     -6.375100e+02 -6.721002e+01\n7 20378     9.917999e+01 -1.349500e+02\n9 20378     2.296000e+02 -8.894000e+01\n7 20379     9.917999e+01 -1.349500e+02\n15 20379     1.879301e+02 -2.160600e+02\n7 20380     -5.881800e+02 -1.393200e+02\n10 20380     -6.454700e+02 -7.540997e+01\n13 20380     -1.180000e+02 -4.066800e+02\n7 20381     -5.828700e+02 -1.398000e+02\n10 20381     -6.388900e+02 -7.634998e+01\n13 20381     -1.123900e+02 -4.071300e+02\n15 20381     -6.558700e+02 -1.232000e+02\n7 20382     -5.710600e+02 -1.401800e+02\n10 20382     -6.262800e+02 -7.835999e+01\n7 20383     5.232100e+02 -1.429700e+02\n15 20383     8.391100e+02 -2.673200e+02\n7 20384     4.218900e+02 -1.500100e+02\n15 20384     6.849600e+02 -2.626100e+02\n7 20385     -4.424100e+02 -1.515200e+02\n13 20385     1.090997e+01 -4.306600e+02\n7 20386     -1.993500e+02 -1.584000e+02\n10 20386     -2.335600e+02 -1.473200e+02\n15 20386     -1.928300e+02 -2.024900e+02\n7 20387     -5.192400e+02 -1.635300e+02\n10 20387     -5.727600e+02 -1.104800e+02\n15 20387     -5.811300e+02 -1.623400e+02\n7 20388     -6.015400e+02 -1.822700e+02\n10 20388     -6.663400e+02 -1.241100e+02\n15 20388     -6.876600e+02 -1.782200e+02\n7 20389     -6.015400e+02 -1.822700e+02\n10 20389     -6.663400e+02 -1.241100e+02\n13 20389     -1.289000e+02 -4.423900e+02\n15 20389     -6.876600e+02 -1.782200e+02\n7 20390     -5.893200e+02 -1.829900e+02\n15 20390     -6.727500e+02 -1.799400e+02\n7 20391     -9.309998e+00 -1.984500e+02\n13 20391     4.215000e+02 -5.053800e+02\n7 20392     3.990601e+02 -2.026500e+02\n15 20392     6.376300e+02 -3.356300e+02\n7 20393     -5.276400e+02 -2.079400e+02\n10 20393     -5.888500e+02 -1.619500e+02\n15 20393     -6.000900e+02 -2.214100e+02\n7 20394     -4.777200e+02 -2.201300e+02\n10 20394     -5.371200e+02 -1.810600e+02\n7 20395     -5.032700e+02 -2.272200e+02\n15 20395     -5.735000e+02 -2.491100e+02\n7 20396     3.562100e+02 -2.365100e+02\n15 20396     5.640900e+02 -3.794800e+02\n7 20397     3.562100e+02 -2.365100e+02\n10 20397     4.039200e+02 -2.964200e+02\n7 20398     -4.876200e+02 -2.394900e+02\n15 20398     -5.562500e+02 -2.675200e+02\n7 20399     3.452100e+02 -2.496100e+02\n10 20399     3.879301e+02 -3.112600e+02\n7 20400     -2.471000e+02 -2.694100e+02\n13 20400     1.929200e+02 -5.516700e+02\n15 20400     -2.621800e+02 -3.403900e+02\n7 20401     -2.095700e+02 -2.727800e+02\n10 20401     -2.536000e+02 -2.729900e+02\n7 20402     -3.926700e+02 -2.767700e+02\n13 20402     5.701001e+01 -5.463900e+02\n7 20403     -3.719900e+02 -2.812100e+02\n13 20403     7.662000e+01 -5.513500e+02\n7 20404     -3.602800e+02 -2.835600e+02\n15 20404     -4.053000e+02 -3.419300e+02\n7 20405     -6.030100e+02 -2.945800e+02\n15 20405     -7.110900e+02 -3.275100e+02\n7 20406     -4.208500e+02 -2.945300e+02\n13 20406     3.264001e+01 -5.589399e+02\n7 20407     -4.940002e+00 -3.190600e+02\n10 20407     -3.308002e+01 -3.506700e+02\n7 20408     -4.017200e+02 -3.202400e+02\n15 20408     -4.644800e+02 -3.865500e+02\n7 20409     -3.958900e+02 -3.210100e+02\n15 20409     -4.569000e+02 -3.884800e+02\n7 20410     -2.631800e+02 -3.342800e+02\n15 20410     -2.917400e+02 -4.241000e+02\n7 20411     -4.409800e+02 -3.402400e+02\n15 20411     -5.180200e+02 -4.088300e+02\n7 20412     -5.656000e+02 -3.600800e+02\n15 20412     -6.774600e+02 -4.190100e+02\n7 20413     -3.352700e+02 -3.626900e+02\n15 20413     -3.893700e+02 -4.520900e+02\n7 20414     4.206801e+02 -3.630200e+02\n10 20414     4.567100e+02 -4.579000e+02\n7 20415     -3.599900e+02 -3.690100e+02\n15 20415     -4.218300e+02 -4.576801e+02\n7 20416     -4.763400e+02 -3.776900e+02\n15 20416     -5.705300e+02 -4.539500e+02\n7 20417     2.421300e+02 -3.779700e+02\n10 20417     2.423600e+02 -4.505100e+02\n7 20418     5.351899e+02 -3.837900e+02\n10 20418     5.931300e+02 -5.010601e+02\n7 20419     -3.476100e+02 -3.906600e+02\n15 20419     -4.112800e+02 -4.883800e+02\n7 20420     -4.834700e+02 -3.914000e+02\n10 20420     -5.699900e+02 -3.765800e+02\n15 20420     -5.817500e+02 -4.715800e+02\n7 20421     -4.041500e+02 -3.944900e+02\n15 20421     -4.831300e+02 -4.861700e+02\n7 20422     3.572900e+02 -4.012000e+02\n10 20422     3.731000e+02 -4.948199e+02\n12 20422     5.595300e+02 -5.096801e+02\n7 20423     -2.030200e+02 -4.016800e+02\n9 20423     -5.349976e+00 -4.244900e+02\n7 20424     2.066200e+02 -4.017100e+02\n10 20424     1.960500e+02 -4.737700e+02\n7 20425     -3.404900e+02 -4.081800e+02\n15 20425     -4.063700e+02 -5.129200e+02\n7 20426     -3.404900e+02 -4.081800e+02\n15 20426     -4.063700e+02 -5.129200e+02\n7 20427     -5.477002e+01 -4.092000e+02\n15 20427     -3.921997e+01 -5.565300e+02\n7 20428     -2.196200e+02 -4.114600e+02\n10 20428     -2.857900e+02 -4.310400e+02\n7 20429     9.840027e+00 -4.117900e+02\n15 20429     4.588000e+01 -5.703400e+02\n7 20430     -1.778003e+01 -4.126600e+02\n15 20430     8.659973e+00 -5.671000e+02\n7 20431     1.547700e+02 -4.174200e+02\n10 20431     1.337300e+02 -4.852900e+02\n7 20432     1.767700e+02 -4.193600e+02\n10 20432     1.591000e+02 -4.906899e+02\n7 20433     -2.241998e+01 -4.207100e+02\n15 20433     8.599854e-01 -5.775601e+02\n7 20434     3.477800e+02 -4.203800e+02\n10 20434     3.580000e+02 -5.159399e+02\n12 20434     5.537100e+02 -5.326801e+02\n7 20435     2.510699e+02 -4.254500e+02\n10 20435     2.430900e+02 -5.087000e+02\n7 20436     -4.569000e+02 -4.267300e+02\n15 20436     -5.559300e+02 -5.220800e+02\n7 20437     2.600900e+02 -4.263600e+02\n10 20437     2.534700e+02 -5.107300e+02\n12 20437     4.494000e+02 -5.490200e+02\n7 20438     2.859301e+02 -4.272600e+02\n10 20438     2.839500e+02 -5.151400e+02\n7 20439     3.552000e+02 -4.332200e+02\n9 20439     5.184700e+02 -3.314600e+02\n7 20440     1.632900e+02 -4.397500e+02\n10 20440     1.392300e+02 -5.131100e+02\n7 20441     1.632900e+02 -4.397500e+02\n10 20441     1.392300e+02 -5.131100e+02\n7 20442     -2.822900e+02 -4.463700e+02\n15 20442     -3.400600e+02 -5.727400e+02\n7 20443     3.818600e+02 -4.484100e+02\n12 20443     6.015601e+02 -5.613700e+02\n7 20444     3.984100e+02 -4.484700e+02\n12 20444     6.212200e+02 -5.594200e+02\n7 20445     4.495900e+02 -4.623101e+02\n10 20445     4.723000e+02 -5.834800e+02\n7 20446     2.869301e+02 -4.718199e+02\n10 20446     2.765100e+02 -5.693199e+02\n7 20447     -1.953003e+01 -4.817000e+02\n10 20447     -7.584003e+01 -5.375500e+02\n7 20448     -1.953003e+01 -4.817000e+02\n10 20448     -7.584003e+01 -5.375500e+02\n7 20449     1.945200e+02 -4.861801e+02\n10 20449     1.663200e+02 -5.727700e+02\n7 20450     3.071997e+01 -4.864200e+02\n10 20450     -2.009998e+01 -5.498300e+02\n7 20451     -7.409973e+00 -4.933101e+02\n10 20451     -6.465997e+01 -5.526500e+02\n7 20452     1.823101e+02 -4.999600e+02\n9 20452     4.066100e+02 -4.105900e+02\n10 20452     1.493900e+02 -5.871400e+02\n7 20453     -2.239800e+02 -5.309200e+02\n10 20453     -3.108700e+02 -5.679100e+02\n7 20454     -2.150600e+02 -5.396400e+02\n10 20454     -3.028100e+02 -5.787300e+02\n7 20455     -1.308000e+02 -5.410900e+02\n10 20455     -2.101200e+02 -5.923300e+02\n7 20456     -1.867800e+02 -5.465400e+02\n10 20456     -2.731100e+02 -5.911300e+02\n7 20457     -1.795800e+02 -5.621700e+02\n10 20457     -2.674100e+02 -6.102900e+02\n7 20458     -1.601000e+02 5.842000e+02\n13 20458     2.447600e+02 1.811200e+02\n7 20459     1.857300e+02 5.793600e+02\n11 20459     5.484301e+02 -2.692300e+02\n13 20459     5.343800e+02 1.706900e+02\n14 20459     7.397600e+02 -2.476600e+02\n7 20460     8.900024e+00 5.485000e+02\n11 20460     3.691000e+02 -2.906000e+02\n7 20461     1.450000e+01 5.179800e+02\n8 20461     2.633002e+01 1.386300e+02\n14 20461     5.531000e+02 -3.033400e+02\n7 20462     -1.841500e+02 5.148900e+02\n13 20462     2.195900e+02 1.245000e+02\n14 20462     3.492400e+02 -2.926900e+02\n7 20463     3.389800e+02 5.075100e+02\n9 20463     1.498800e+02 3.166600e+02\n7 20464     3.415400e+02 4.991700e+02\n9 20464     1.537800e+02 3.087400e+02\n10 20464     5.162500e+02 6.134900e+02\n11 20464     6.605900e+02 -3.761500e+02\n12 20464     3.652400e+02 4.883500e+02\n7 20465     -3.080300e+02 4.652300e+02\n13 20465     1.157900e+02 8.776001e+01\n7 20466     -1.758300e+02 4.544200e+02\n10 20466     -8.990997e+01 6.026700e+02\n11 20466     1.867900e+02 -3.637400e+02\n7 20467     -5.598700e+02 4.410900e+02\n10 20467     -5.506900e+02 6.032100e+02\n7 20468     -5.506600e+02 4.349100e+02\n10 20468     -5.399100e+02 5.958500e+02\n7 20469     5.669800e+02 4.310900e+02\n9 20469     3.995800e+02 3.364300e+02\n10 20469     7.642400e+02 4.941000e+02\n7 20470     -1.584800e+02 4.220500e+02\n11 20470     1.986100e+02 -3.948700e+02\n7 20471     -2.299400e+02 4.213300e+02\n10 20471     -1.566900e+02 5.663200e+02\n11 20471     1.331000e+02 -3.890500e+02\n13 20471     1.743300e+02 4.803998e+01\n14 20471     2.921600e+02 -3.859800e+02\n7 20472     3.397200e+02 4.195100e+02\n10 20472     5.062800e+02 5.135600e+02\n7 20473     -5.969900e+02 4.163200e+02\n13 20473     -1.135500e+02 6.241998e+01\n7 20474     -1.404900e+02 4.126800e+02\n10 20474     -5.271997e+01 5.500300e+02\n7 20475     -4.972900e+02 4.043800e+02\n10 20475     -4.783600e+02 5.576700e+02\n14 20475     2.852002e+01 -3.751200e+02\n7 20476     -2.140100e+02 4.045400e+02\n13 20476     1.872200e+02 3.278003e+01\n14 20476     3.080100e+02 -4.057000e+02\n7 20477     -5.648800e+02 3.993000e+02\n10 20477     -5.571300e+02 5.551800e+02\n7 20478     3.675500e+02 3.992600e+02\n8 20478     4.057100e+02 1.311000e+02\n9 20478     2.191400e+02 2.575700e+02\n13 20478     7.413000e+02 2.890015e+00\n7 20479     -5.224400e+02 3.948700e+02\n10 20479     -5.073000e+02 5.483800e+02\n7 20480     -6.769800e+02 3.903500e+02\n11 20480     -2.619400e+02 -3.715300e+02\n7 20481     -1.937600e+02 3.898600e+02\n10 20481     -1.188900e+02 5.252700e+02\n7 20482     -1.447700e+02 3.902300e+02\n10 20482     -6.247998e+01 5.218000e+02\n11 20482     2.038500e+02 -4.278200e+02\n7 20483     -8.020200e+02 3.884400e+02\n11 20483     -3.601300e+02 -3.592200e+02\n13 20483     -2.691000e+02 5.059003e+01\n14 20483     -2.525600e+02 -3.575300e+02\n7 20484     2.581400e+02 3.829700e+02\n15 20484     5.738600e+02 5.406900e+02\n7 20485     -5.233200e+02 3.767300e+02\n10 20485     -5.089600e+02 5.271500e+02\n7 20486     -1.912200e+02 3.760700e+02\n10 20486     -1.181800e+02 5.072300e+02\n11 20486     1.589300e+02 -4.359600e+02\n7 20487     -5.796000e+02 3.693000e+02\n10 20487     -5.752300e+02 5.212200e+02\n7 20488     -1.607001e+01 3.630800e+02\n15 20488     1.877000e+02 5.309100e+02\n7 20489     -1.607001e+01 3.630800e+02\n10 20489     8.409998e+01 4.784100e+02\n11 20489     3.175900e+02 -4.688400e+02\n7 20490     -3.691400e+02 3.626800e+02\n13 20490     5.644000e+01 5.349976e+00\n7 20491     -6.169900e+02 3.544400e+02\n10 20491     -6.197600e+02 5.058000e+02\n7 20492     5.885601e+02 3.526500e+02\n10 20492     7.819399e+02 3.948600e+02\n7 20493     -4.137500e+02 3.492900e+02\n10 20493     -3.802100e+02 4.894400e+02\n15 20493     -3.528100e+02 5.347600e+02\n7 20494     -2.546500e+02 3.454400e+02\n9 20494     -3.972000e+02 8.776999e+01\n7 20495     -5.130300e+02 3.397600e+02\n11 20495     -1.320900e+02 -4.318100e+02\n7 20496     -5.666600e+02 3.298800e+02\n10 20496     -5.627100e+02 4.762200e+02\n13 20496     -1.024000e+02 -1.026001e+01\n7 20497     3.697400e+02 3.284300e+02\n9 20497     2.288900e+02 1.936800e+02\n10 20497     5.204301e+02 3.924400e+02\n13 20497     7.415800e+02 -6.026001e+01\n15 20497     7.053300e+02 4.406800e+02\n7 20498     -2.587500e+02 3.247800e+02\n10 20498     -2.050500e+02 4.484000e+02\n7 20499     -4.912100e+02 3.226000e+02\n13 20499     -4.475000e+01 -2.115002e+01\n7 20500     1.851000e+02 3.222000e+02\n10 20500     3.147700e+02 4.112600e+02\n7 20501     1.417400e+02 3.184300e+02\n10 20501     2.617500e+02 4.099600e+02\n7 20502     -4.939300e+02 3.179700e+02\n13 20502     -4.728003e+01 -2.434998e+01\n14 20502     1.378998e+01 -4.655400e+02\n7 20503     2.072000e+02 3.161200e+02\n10 20503     3.403300e+02 4.018700e+02\n7 20504     3.032500e+02 3.152700e+02\n15 20504     6.305699e+02 4.392500e+02\n7 20505     -5.372000e+02 3.109900e+02\n13 20505     -8.169000e+01 -2.741998e+01\n14 20505     -2.921002e+01 -4.673500e+02\n7 20506     3.086400e+02 3.110800e+02\n15 20506     6.374700e+02 4.331100e+02\n7 20507     -6.693000e+02 3.065700e+02\n10 20507     -6.805800e+02 4.561400e+02\n15 20507     -6.982600e+02 4.887300e+02\n7 20508     -3.801300e+02 3.052300e+02\n15 20508     -3.133700e+02 4.715000e+02\n7 20509     -3.801300e+02 3.052300e+02\n10 20509     -3.462300e+02 4.345700e+02\n15 20509     -3.133700e+02 4.715000e+02\n7 20510     -3.667500e+02 3.048900e+02\n10 20510     -3.315100e+02 4.332400e+02\n13 20510     5.934998e+01 -4.329999e+01\n15 20510     -2.964100e+02 4.699600e+02\n7 20511     -1.209900e+02 3.024200e+02\n10 20511     -4.984998e+01 4.100400e+02\n11 20511     2.052600e+02 -5.174500e+02\n13 20511     2.753600e+02 -6.031000e+01\n14 20511     4.192700e+02 -5.304600e+02\n7 20512     1.729000e+02 2.996300e+02\n10 20512     2.943500e+02 3.833000e+02\n15 20512     4.384800e+02 4.248800e+02\n7 20513     1.729000e+02 2.996300e+02\n10 20513     2.943500e+02 3.833000e+02\n7 20514     -5.182000e+02 2.973100e+02\n11 20514     -1.430400e+02 -4.671300e+02\n14 20514     -1.406000e+01 -4.845400e+02\n7 20515     -5.813000e+02 2.936200e+02\n11 20515     -1.982400e+02 -4.623700e+02\n13 20515     -1.184300e+02 -3.904999e+01\n14 20515     -7.545001e+01 -4.798000e+02\n7 20516     -5.887800e+02 2.899600e+02\n11 20516     -2.053800e+02 -4.646200e+02\n7 20517     -5.536300e+02 2.844700e+02\n11 20517     -1.759200e+02 -4.737700e+02\n13 20517     -9.760999e+01 -4.846002e+01\n14 20517     -5.070001e+01 -4.933199e+02\n7 20518     -5.536300e+02 2.844700e+02\n11 20518     -1.759200e+02 -4.737700e+02\n14 20518     -5.070001e+01 -4.933199e+02\n7 20519     -5.486100e+02 2.775000e+02\n14 20519     -4.803998e+01 -5.014700e+02\n7 20520     -5.550100e+02 2.748100e+02\n11 20520     -1.785700e+02 -4.815000e+02\n13 20520     -1.004000e+02 -5.644000e+01\n14 20520     -5.432001e+01 -5.032600e+02\n7 20521     -7.124300e+02 2.605300e+02\n10 20521     -7.353600e+02 4.042700e+02\n7 20522     -6.119500e+02 2.535200e+02\n13 20522     -1.484000e+02 -7.054999e+01\n7 20523     -6.554200e+02 2.495500e+02\n10 20523     -6.665000e+02 3.898500e+02\n7 20524     2.899500e+02 2.440000e+02\n15 20524     5.927100e+02 3.333200e+02\n7 20525     -3.432000e+02 2.379800e+02\n8 20525     -2.326000e+02 -6.683002e+01\n13 20525     8.328003e+01 -1.028100e+02\n14 20525     1.740100e+02 -5.751100e+02\n15 20525     -2.786200e+02 3.726600e+02\n7 20526     -6.070400e+02 2.286000e+02\n11 20526     -2.347400e+02 -5.163000e+02\n14 20526     -1.113800e+02 -5.456801e+02\n7 20527     -2.734400e+02 2.281700e+02\n8 20527     -1.648000e+02 -7.022998e+01\n9 20527     -3.672000e+02 7.630005e+00\n7 20528     -3.586400e+02 2.186200e+02\n10 20528     -3.348700e+02 3.271000e+02\n7 20529     4.598700e+02 2.116000e+02\n9 20529     3.323400e+02 1.128800e+02\n10 20529     6.160100e+02 2.416600e+02\n7 20530     -4.614800e+02 2.109800e+02\n13 20530     -1.838000e+01 -1.170200e+02\n7 20531     -4.614800e+02 2.109800e+02\n13 20531     -1.838000e+01 -1.170200e+02\n7 20532     2.574000e+02 2.105100e+02\n10 20532     3.455100e+02 2.434700e+02\n15 20532     4.920200e+02 2.632700e+02\n7 20533     -2.831600e+02 2.095800e+02\n8 20533     -1.684500e+02 -8.321997e+01\n9 20533     -3.677400e+02 -5.559998e+00\n13 20533     1.372500e+02 -1.304300e+02\n7 20534     -4.934900e+02 2.082500e+02\n10 20534     -4.887400e+02 3.268700e+02\n7 20535     -4.955900e+02 2.044300e+02\n10 20535     -4.915800e+02 3.219000e+02\n15 20535     -4.825500e+02 3.387400e+02\n7 20536     -6.088300e+02 2.023300e+02\n13 20536     -1.441300e+02 -1.142000e+02\n7 20537     3.489301e+02 2.025800e+02\n10 20537     4.871400e+02 2.455200e+02\n13 20537     7.161000e+02 -1.735800e+02\n15 20537     6.686000e+02 2.645200e+02\n7 20538     1.632100e+02 1.976400e+02\n10 20538     2.070800e+02 2.199500e+02\n7 20539     -3.731000e+02 1.907400e+02\n10 20539     -3.563200e+02 2.941700e+02\n13 20539     5.972998e+01 -1.401400e+02\n7 20540     -3.677100e+02 1.879100e+02\n8 20540     -2.446200e+02 -1.028800e+02\n15 20540     -3.205500e+02 3.041300e+02\n7 20541     -6.568700e+02 1.878600e+02\n13 20541     -1.849000e+02 -1.227300e+02\n7 20542     -1.232500e+02 1.851000e+02\n10 20542     -1.256200e+02 2.311800e+02\n15 20542     -7.207001e+01 2.412800e+02\n7 20543     -5.285000e+02 1.816800e+02\n13 20543     -7.500000e+01 -1.369600e+02\n7 20544     -3.588700e+02 1.815100e+02\n13 20544     7.198999e+01 -1.494600e+02\n15 20544     -3.098300e+02 2.949100e+02\n7 20545     -1.858900e+02 1.788200e+02\n13 20545     2.760200e+02 -1.609800e+02\n7 20546     -5.359000e+02 1.669600e+02\n15 20546     -5.408400e+02 2.908400e+02\n7 20547     -4.273200e+02 1.628200e+02\n13 20547     1.314001e+01 -1.608700e+02\n7 20548     3.459200e+02 1.602200e+02\n15 20548     6.539000e+02 2.039800e+02\n7 20549     -4.493400e+02 1.601400e+02\n10 20549     -4.459100e+02 2.635900e+02\n7 20550     4.168101e+02 1.581500e+02\n10 20550     5.613000e+02 1.852400e+02\n15 20550     7.581500e+02 1.942500e+02\n7 20551     -5.518400e+02 1.571900e+02\n10 20551     -5.618200e+02 2.701100e+02\n15 20551     -5.629800e+02 2.775500e+02\n7 20552     3.980900e+02 1.561200e+02\n10 20552     5.389200e+02 1.839500e+02\n7 20553     -4.198100e+02 1.524100e+02\n10 20553     -4.134300e+02 2.523700e+02\n7 20554     -3.513700e+02 1.492900e+02\n15 20554     -3.058200e+02 2.487100e+02\n7 20555     2.050300e+02 1.490700e+02\n10 20555     2.525900e+02 1.604800e+02\n13 20555     6.236700e+02 -2.088300e+02\n7 20556     -4.147500e+02 1.415400e+02\n10 20556     -4.110100e+02 2.384400e+02\n15 20556     -3.901700e+02 2.426200e+02\n7 20557     2.940500e+02 1.384200e+02\n10 20557     3.722700e+02 1.499200e+02\n15 20557     5.222000e+02 1.526900e+02\n7 20558     -3.887000e+02 1.376200e+02\n10 20558     -3.815200e+02 2.323600e+02\n15 20558     -3.567000e+02 2.359700e+02\n7 20559     4.386200e+02 1.277300e+02\n15 20559     7.842700e+02 1.469800e+02\n7 20560     4.672600e+02 1.222500e+02\n10 20560     6.175900e+02 1.352700e+02\n12 20560     5.629700e+02 7.997998e+01\n15 20560     8.257700e+02 1.362400e+02\n7 20561     -7.485100e+02 1.189100e+02\n13 20561     -2.606400e+02 -1.729400e+02\n7 20562     4.803300e+02 1.147900e+02\n10 20562     6.311400e+02 1.254800e+02\n7 20563     4.771500e+02 1.040300e+02\n15 20563     8.368400e+02 1.079300e+02\n7 20564     -6.184000e+02 9.964001e+01\n10 20564     -6.433600e+02 2.085500e+02\n7 20565     4.886700e+02 9.801001e+01\n15 20565     8.527900e+02 9.770001e+01\n7 20566     7.370400e+02 9.710001e+01\n9 20566     6.035601e+02 9.403000e+01\n7 20567     -2.199200e+02 9.581000e+01\n10 20567     -2.356300e+02 1.409600e+02\n13 20567     2.438700e+02 -2.291600e+02\n15 20567     -1.973100e+02 1.348600e+02\n7 20568     -3.577200e+02 7.881000e+01\n8 20568     -2.091500e+02 -1.818500e+02\n13 20568     7.790997e+01 -2.377700e+02\n7 20569     1.162100e+02 7.828003e+01\n10 20569     1.345100e+02 8.208002e+01\n13 20569     5.490100e+02 -2.650500e+02\n15 20569     2.333400e+02 6.960999e+01\n7 20570     -2.595100e+02 7.634003e+01\n10 20570     -2.786500e+02 1.238000e+02\n15 20570     -2.467700e+02 1.146100e+02\n7 20571     -3.995400e+02 7.575000e+01\n15 20571     -3.831100e+02 1.509000e+02\n7 20572     -4.353400e+02 7.028998e+01\n10 20572     -4.447400e+02 1.556300e+02\n15 20572     -4.302300e+02 1.473000e+02\n7 20573     -5.240900e+02 6.553003e+01\n10 20573     -5.441300e+02 1.587000e+02\n15 20573     -5.445800e+02 1.494500e+02\n7 20574     -2.375700e+02 6.257001e+01\n10 20574     -2.567700e+02 1.057500e+02\n15 20574     -2.214300e+02 9.338000e+01\n7 20575     4.362300e+02 5.309998e+01\n10 20575     5.637300e+02 5.185999e+01\n7 20576     -3.538900e+02 4.990997e+01\n13 20576     8.228003e+01 -2.630700e+02\n7 20577     4.917100e+02 4.922998e+01\n10 20577     6.325300e+02 4.138000e+01\n15 20577     8.439800e+02 2.376001e+01\n7 20578     -5.108600e+02 4.856000e+01\n15 20578     -5.309500e+02 1.238900e+02\n7 20579     2.841200e+02 4.722998e+01\n9 20579     3.130300e+02 6.060999e+01\n7 20580     -2.221100e+02 3.266998e+01\n10 20580     -2.458700e+02 6.762000e+01\n15 20580     -2.089700e+02 4.910999e+01\n7 20581     5.065100e+02 2.926001e+01\n12 20581     6.288800e+02 -1.514001e+01\n7 20582     -2.218200e+02 2.737000e+01\n10 20582     -2.457500e+02 6.204999e+01\n15 20582     -2.094000e+02 4.258002e+01\n7 20583     7.081300e+02 2.719000e+01\n9 20583     5.924500e+02 2.176001e+01\n7 20584     -3.700700e+02 2.384003e+01\n10 20584     -3.789400e+02 9.353998e+01\n15 20584     -3.551900e+02 7.646997e+01\n7 20585     -4.754800e+02 1.746997e+01\n15 20585     -4.916400e+02 7.791998e+01\n7 20586     -2.257000e+02 1.620001e+01\n12 20586     -1.902100e+02 -6.338000e+01\n15 20586     -2.174500e+02 2.623999e+01\n7 20587     -4.061800e+02 1.140002e+01\n10 20587     -4.208500e+02 8.289001e+01\n7 20588     4.333600e+02 1.127002e+01\n15 20588     7.447700e+02 -2.690002e+01\n7 20589     -4.423999e+01 9.369995e+00\n10 20589     -5.703998e+01 1.856000e+01\n7 20590     -1.907000e+02 -2.719971e+00\n10 20590     -2.175400e+02 2.189001e+01\n15 20590     -1.769600e+02 -3.640015e+00\n7 20591     -1.766900e+02 -7.260010e+00\n15 20591     -1.597900e+02 -1.096997e+01\n7 20592     -1.951600e+02 -9.099976e+00\n10 20592     -2.235800e+02 1.517999e+01\n13 20592     2.673400e+02 -3.199500e+02\n15 20592     -1.841900e+02 -1.150000e+01\n7 20593     -4.717300e+02 -1.584003e+01\n13 20593     -1.794000e+01 -3.098400e+02\n7 20594     -2.056400e+02 -1.682001e+01\n10 20594     -2.368000e+02 7.030029e+00\n15 20594     -1.994500e+02 -2.148999e+01\n7 20595     5.550900e+02 -2.034003e+01\n9 20595     4.827100e+02 -4.503003e+01\n7 20596     -4.643200e+02 -2.166998e+01\n10 20596     -4.906500e+02 4.941998e+01\n15 20596     -4.841000e+02 2.385999e+01\n7 20597     -1.811400e+02 -2.415997e+01\n13 20597     2.806600e+02 -3.333600e+02\n15 20597     -1.700100e+02 -3.453998e+01\n7 20598     -4.495600e+02 -2.440002e+01\n8 20598     -2.762300e+02 -2.655500e+02\n13 20598     3.800049e-01 -3.194500e+02\n7 20599     -2.176900e+02 -3.240002e+01\n12 20599     -1.713700e+02 -1.157400e+02\n7 20600     2.237100e+02 -3.565997e+01\n15 20600     3.724200e+02 -9.606000e+01\n7 20601     -1.208000e+02 -3.650000e+01\n10 20601     -1.460000e+02 -2.557001e+01\n15 20601     -9.465002e+01 -5.756000e+01\n7 20602     -1.063300e+02 -3.759003e+01\n10 20602     -1.291600e+02 -2.828003e+01\n15 20602     -7.509998e+01 -6.147998e+01\n7 20603     -4.005000e+02 -3.842999e+01\n8 20603     -2.239300e+02 -2.732600e+02\n13 20603     4.426001e+01 -3.354900e+02\n7 20604     -4.754700e+02 -4.101001e+01\n8 20604     -2.998500e+02 -2.813600e+02\n13 20604     -2.184998e+01 -3.314600e+02\n15 20604     -5.021000e+02 -1.150024e+00\n7 20605     -4.754700e+02 -4.101001e+01\n13 20605     -2.184998e+01 -3.314600e+02\n7 20606     -5.116998e+01 -4.672998e+01\n15 20606     -6.059998e+00 -8.062000e+01\n7 20607     -8.254999e+01 -5.071002e+01\n15 20607     -4.725000e+01 -8.289001e+01\n7 20608     -5.206800e+02 -6.288000e+01\n9 20608     -5.076300e+02 -2.356200e+02\n7 20609     -4.492000e+02 -6.406000e+01\n15 20609     -4.736800e+02 -3.538000e+01\n7 20610     -4.847400e+02 -7.316998e+01\n13 20610     -2.878003e+01 -3.586600e+02\n7 20611     -4.720000e+02 -7.610999e+01\n13 20611     -1.722998e+01 -3.623400e+02\n15 20611     -5.051700e+02 -4.909003e+01\n7 20612     -4.819000e+02 -8.088000e+01\n15 20612     -5.182600e+02 -5.496997e+01\n7 20613     -4.951900e+02 -9.165002e+01\n8 20613     -3.095600e+02 -3.224200e+02\n12 20613     -5.448000e+02 -2.482300e+02\n15 20613     -5.382200e+02 -6.829999e+01\n7 20614     -5.277002e+01 -9.210999e+01\n13 20614     3.982100e+02 -4.016500e+02\n7 20615     -3.028998e+01 -9.821997e+01\n13 20615     4.181200e+02 -4.091800e+02\n7 20616     6.082001e+01 -1.108700e+02\n10 20616     4.528998e+01 -1.338100e+02\n7 20617     5.275400e+02 -1.451200e+02\n15 20617     8.449800e+02 -2.720200e+02\n7 20618     5.087600e+02 -1.629100e+02\n15 20618     8.118000e+02 -2.944100e+02\n7 20619     -1.520000e+02 -1.714300e+02\n13 20619     2.888900e+02 -4.693300e+02\n7 20620     -4.794700e+02 -1.828600e+02\n15 20620     -5.338600e+02 -1.923000e+02\n7 20621     -5.808400e+02 -1.933900e+02\n15 20621     -6.639200e+02 -1.952700e+02\n7 20622     -5.842100e+02 -1.960400e+02\n8 20622     -3.803600e+02 -4.151100e+02\n15 20622     -6.688200e+02 -1.984000e+02\n7 20623     -4.142100e+02 -2.094200e+02\n9 20623     -3.218900e+02 -3.251500e+02\n13 20623     3.794000e+01 -4.834500e+02\n7 20624     4.111000e+02 -2.102200e+02\n15 20624     6.520900e+02 -3.494300e+02\n7 20625     3.654000e+02 -2.216100e+02\n10 20625     4.175800e+02 -2.790200e+02\n15 20625     5.811000e+02 -3.591300e+02\n7 20626     -7.314500e+02 -2.460000e+02\n13 20626     -2.395900e+02 -4.849100e+02\n15 20626     -8.605000e+02 -2.483400e+02\n7 20627     -4.977700e+02 -2.461600e+02\n15 20627     -5.705000e+02 -2.760500e+02\n7 20628     -5.128900e+02 -2.556800e+02\n15 20628     -5.906500e+02 -2.866900e+02\n7 20629     -4.488700e+02 -2.675800e+02\n13 20629     7.700012e+00 -5.319399e+02\n7 20630     -4.288700e+02 -2.785200e+02\n9 20630     -3.067600e+02 -3.827300e+02\n13 20630     2.533002e+01 -5.439399e+02\n7 20631     -4.353400e+02 -2.828500e+02\n9 20631     -3.120900e+02 -3.873100e+02\n10 20631     -4.997100e+02 -2.574300e+02\n13 20631     1.951001e+01 -5.470601e+02\n7 20632     -3.781900e+02 -2.869400e+02\n13 20632     7.071002e+01 -5.563000e+02\n7 20633     -4.245300e+02 -2.982700e+02\n13 20633     3.010999e+01 -5.620000e+02\n7 20634     -4.245300e+02 -2.982700e+02\n9 20634     -2.924600e+02 -3.968700e+02\n13 20634     3.010999e+01 -5.620000e+02\n7 20635     -1.215997e+01 -2.995000e+02\n9 20635     1.483900e+02 -2.905300e+02\n7 20636     8.895001e+01 -3.043800e+02\n15 20636     1.684200e+02 -4.364399e+02\n7 20637     -3.284003e+01 -3.048200e+02\n15 20637     6.070007e+00 -4.187300e+02\n7 20638     -2.689600e+02 -3.320400e+02\n15 20638     -2.987700e+02 -4.204500e+02\n7 20639     5.618900e+02 -3.412000e+02\n10 20639     6.356200e+02 -4.533600e+02\n7 20640     -2.697900e+02 -3.480300e+02\n15 20640     -3.033500e+02 -4.419700e+02\n7 20641     -4.695800e+02 -3.557300e+02\n10 20641     -5.493700e+02 -3.381400e+02\n15 20641     -5.572000e+02 -4.259600e+02\n7 20642     2.373700e+02 -3.586900e+02\n10 20642     2.409500e+02 -4.267700e+02\n7 20643     -5.441200e+02 -3.596600e+02\n15 20643     -6.508600e+02 -4.212500e+02\n7 20644     -2.104700e+02 -3.610900e+02\n15 20644     -2.305000e+02 -4.675400e+02\n7 20645     -4.218600e+02 -3.616800e+02\n15 20645     -4.981700e+02 -4.399000e+02\n7 20646     -2.388500e+02 -3.615800e+02\n15 20646     -2.666000e+02 -4.647100e+02\n7 20647     -2.474600e+02 -3.722500e+02\n15 20647     -2.808600e+02 -4.774301e+02\n7 20648     2.282900e+02 -3.740300e+02\n10 20648     2.278600e+02 -4.437300e+02\n7 20649     2.385400e+02 -3.805800e+02\n10 20649     2.372200e+02 -4.533800e+02\n7 20650     2.782600e+02 -3.839900e+02\n9 20650     4.297900e+02 -3.134900e+02\n10 20650     2.834800e+02 -4.625400e+02\n7 20651     -2.029100e+02 -3.844600e+02\n10 20651     -2.629000e+02 -4.014000e+02\n7 20652     -3.476800e+02 -3.968600e+02\n15 20652     -4.123000e+02 -4.965800e+02\n7 20653     2.403500e+02 -3.982600e+02\n10 20653     2.360000e+02 -4.747600e+02\n7 20654     3.898300e+02 -3.992900e+02\n12 20654     5.983600e+02 -5.033199e+02\n7 20655     -3.109003e+01 -4.074400e+02\n15 20655     -7.849976e+00 -5.576300e+02\n7 20656     -3.765700e+02 -4.106200e+02\n15 20656     -4.516100e+02 -5.111801e+02\n7 20657     -4.135999e+01 -4.102600e+02\n15 20657     -2.191998e+01 -5.598199e+02\n7 20658     -3.444000e+01 -4.111900e+02\n15 20658     -1.276001e+01 -5.622000e+02\n7 20659     -2.863000e+01 -4.117400e+02\n15 20659     -4.869995e+00 -5.640699e+02\n7 20660     -2.863000e+01 -4.117400e+02\n15 20660     -4.869995e+00 -5.640699e+02\n7 20661     1.692400e+02 -4.207600e+02\n10 20661     1.497200e+02 -4.909900e+02\n7 20662     1.751400e+02 -4.256700e+02\n10 20662     1.558100e+02 -4.978199e+02\n7 20663     2.954900e+02 -4.338600e+02\n10 20663     2.934100e+02 -5.248199e+02\n12 20663     4.935200e+02 -5.545200e+02\n7 20664     -6.264600e+02 -4.418199e+02\n10 20664     -7.357800e+02 -4.204301e+02\n15 20664     -7.685900e+02 -5.195699e+02\n7 20665     -5.140400e+02 -4.440699e+02\n15 20665     -6.312800e+02 -5.373300e+02\n7 20666     -4.059003e+01 -4.490400e+02\n9 20666     1.782800e+02 -4.232000e+02\n7 20667     2.173400e+02 -4.588900e+02\n10 20667     1.986600e+02 -5.437400e+02\n7 20668     1.840300e+02 -4.678500e+02\n9 20668     3.912000e+02 -3.887200e+02\n7 20669     -4.991800e+02 -4.707300e+02\n15 20669     -6.181600e+02 -5.761500e+02\n7 20670     2.816300e+02 -4.710900e+02\n10 20670     2.697700e+02 -5.677700e+02\n7 20671     3.123500e+02 -4.721500e+02\n12 20671     5.249301e+02 -5.970300e+02\n7 20672     2.270800e+02 -4.753500e+02\n9 20672     4.331600e+02 -3.845900e+02\n7 20673     1.103000e+02 -4.804900e+02\n9 20673     3.326500e+02 -4.130600e+02\n7 20674     1.909399e+02 -4.877700e+02\n10 20674     1.616500e+02 -5.740601e+02\n7 20675     9.831000e+01 -4.899800e+02\n9 20675     3.269100e+02 -4.224700e+02\n7 20676     2.966200e+02 -4.929500e+02\n9 20676     5.005400e+02 -3.820200e+02\n7 20677     4.943300e+02 -5.167700e+02\n9 20677     6.703900e+02 -3.608600e+02\n7 20678     -2.047200e+02 -5.483600e+02\n10 20678     -2.924700e+02 -5.907200e+02\n7 20679     -1.459700e+02 -5.482300e+02\n10 20679     -2.277400e+02 -5.984100e+02\n7 20680     -1.181400e+02 -5.669100e+02\n9 20680     1.634100e+02 -5.305601e+02\n7 20681     1.487900e+02 5.556900e+02\n11 20681     5.094301e+02 -2.907700e+02\n7 20682     -6.406000e+01 4.814100e+02\n11 20682     2.956600e+02 -3.473700e+02\n7 20683     -3.324700e+02 4.797800e+02\n13 20683     9.851001e+01 1.014600e+02\n7 20684     -6.321002e+01 4.741100e+02\n11 20684     2.957200e+02 -3.542200e+02\n7 20685     3.156600e+02 4.729100e+02\n10 20685     4.830300e+02 5.820500e+02\n12 20685     3.372800e+02 4.523500e+02\n7 20686     3.340500e+02 4.735400e+02\n10 20686     5.045100e+02 5.803200e+02\n7 20687     -2.379700e+02 4.676500e+02\n9 20687     -4.028700e+02 1.980600e+02\n7 20688     -5.453300e+02 4.275200e+02\n10 20688     -5.332300e+02 5.865500e+02\n7 20689     5.623101e+02 4.269100e+02\n9 20689     3.951700e+02 3.314800e+02\n10 20689     7.569399e+02 4.887400e+02\n7 20690     -3.713400e+02 3.927600e+02\n8 20690     -2.820700e+02 5.023999e+01\n7 20691     3.018900e+02 3.779700e+02\n15 20691     6.334700e+02 5.289900e+02\n7 20692     -3.793000e+02 3.706000e+02\n13 20692     4.928003e+01 1.281000e+01\n7 20693     -3.793000e+02 3.706000e+02\n13 20693     4.928003e+01 1.281000e+01\n7 20694     -1.988700e+02 3.686800e+02\n10 20694     -1.283000e+02 4.996200e+02\n7 20695     -5.119800e+02 3.677900e+02\n10 20695     -4.953000e+02 5.161800e+02\n7 20696     1.833800e+02 3.660100e+02\n10 20696     3.213000e+02 4.667500e+02\n7 20697     -2.051100e+02 3.644900e+02\n10 20697     -1.363600e+02 4.939200e+02\n15 20697     -7.106000e+01 5.454600e+02\n7 20698     3.059003e+01 3.651100e+02\n10 20698     1.391100e+02 4.773800e+02\n15 20698     2.532300e+02 5.308400e+02\n7 20699     -6.204700e+02 3.617200e+02\n8 20699     -4.913700e+02 3.954001e+01\n11 20699     -2.198100e+02 -4.004700e+02\n7 20700     -5.150100e+02 3.570600e+02\n11 20700     -1.317700e+02 -4.167600e+02\n7 20701     -1.026500e+02 3.571100e+02\n11 20701     2.344700e+02 -4.646800e+02\n15 20701     6.698999e+01 5.273400e+02\n7 20702     2.500000e+01 3.544300e+02\n10 20702     1.297000e+02 4.640000e+02\n7 20703     -2.954300e+02 3.531000e+02\n11 20703     6.158002e+01 -4.451000e+02\n14 20703     2.228500e+02 -4.528800e+02\n7 20704     -5.089300e+02 3.415400e+02\n13 20704     -5.559003e+01 -4.619995e+00\n14 20704     4.820007e+00 -4.402900e+02\n7 20705     -4.742400e+02 3.376400e+02\n11 20705     -9.871997e+01 -4.374100e+02\n7 20706     -4.921900e+02 3.368700e+02\n11 20706     -1.143900e+02 -4.358100e+02\n7 20707     5.760100e+02 3.374100e+02\n9 20707     4.217700e+02 2.590900e+02\n7 20708     -6.720300e+02 3.361000e+02\n10 20708     -6.839300e+02 4.901100e+02\n7 20709     -5.098400e+02 3.303400e+02\n11 20709     -1.306500e+02 -4.398300e+02\n7 20710     1.372400e+02 3.262200e+02\n10 20710     2.579200e+02 4.197100e+02\n7 20711     1.372400e+02 3.262200e+02\n10 20711     2.579200e+02 4.197100e+02\n7 20712     -3.747400e+02 3.234700e+02\n15 20712     -3.028700e+02 4.974200e+02\n7 20713     -6.601200e+02 3.201100e+02\n10 20713     -6.683300e+02 4.709700e+02\n12 20713     -7.936800e+02 2.059500e+02\n15 20713     -6.847400e+02 5.068800e+02\n7 20714     -3.704500e+02 3.187600e+02\n15 20714     -2.988700e+02 4.905900e+02\n7 20715     -4.304200e+02 3.159200e+02\n15 20715     -3.777100e+02 4.908600e+02\n7 20716     -4.304200e+02 3.159200e+02\n15 20716     -3.777100e+02 4.908600e+02\n7 20717     -5.635100e+02 3.083900e+02\n11 20717     -1.805800e+02 -4.517400e+02\n13 20717     -1.023200e+02 -2.796002e+01\n7 20718     2.941801e+02 2.931800e+02\n15 20718     6.129399e+02 4.074000e+02\n7 20719     -5.781400e+02 2.645500e+02\n11 20719     -2.009200e+02 -4.875500e+02\n13 20719     -1.201500e+02 -6.335999e+01\n14 20719     -7.945001e+01 -5.109000e+02\n7 20720     -4.486900e+02 2.613200e+02\n11 20720     -9.515002e+01 -5.108500e+02\n7 20721     -5.215800e+02 2.565600e+02\n13 20721     -7.088000e+01 -7.415002e+01\n14 20721     -1.883002e+01 -5.279399e+02\n7 20722     1.735699e+02 2.484400e+02\n13 20722     5.928500e+02 -1.218900e+02\n7 20723     3.971300e+02 2.473900e+02\n8 20723     4.441000e+02 1.980011e+00\n10 20723     5.459900e+02 2.925700e+02\n13 20723     7.669000e+02 -1.336500e+02\n7 20724     -2.300500e+02 2.452200e+02\n9 20724     -3.290900e+02 2.508002e+01\n7 20725     2.766200e+02 2.412400e+02\n15 20725     5.728400e+02 3.306900e+02\n7 20726     3.550800e+02 2.334300e+02\n15 20726     6.787000e+02 3.078000e+02\n7 20727     3.640601e+02 2.280200e+02\n10 20727     5.056000e+02 2.738700e+02\n13 20727     7.327500e+02 -1.508200e+02\n15 20727     6.898700e+02 2.993500e+02\n7 20728     3.774500e+02 2.285100e+02\n10 20728     5.195400e+02 2.741700e+02\n15 20728     7.067600e+02 3.002400e+02\n7 20729     2.007600e+02 2.217300e+02\n13 20729     6.165200e+02 -1.460100e+02\n7 20730     -2.702300e+02 2.129300e+02\n8 20730     -1.567100e+02 -8.031000e+01\n13 20730     1.483199e+02 -1.284800e+02\n7 20731     -6.115800e+02 2.071000e+02\n13 20731     -1.471900e+02 -1.092100e+02\n14 20731     -1.169500e+02 -5.685900e+02\n7 20732     3.379399e+02 2.014800e+02\n10 20732     4.743600e+02 2.461900e+02\n15 20732     6.526600e+02 2.656400e+02\n7 20733     3.164600e+02 1.963400e+02\n15 20733     6.196700e+02 2.603100e+02\n7 20734     9.779999e+01 1.944200e+02\n8 20734     2.977400e+02 4.523001e+01\n13 20734     5.342500e+02 -1.636600e+02\n7 20735     -3.110400e+02 1.905700e+02\n13 20735     1.128400e+02 -1.445100e+02\n7 20736     -4.634500e+02 1.768900e+02\n10 20736     -4.596800e+02 2.859800e+02\n7 20737     2.144100e+02 1.711700e+02\n10 20737     2.684700e+02 1.870300e+02\n15 20737     3.947800e+02 1.965800e+02\n7 20738     4.492900e+02 1.674800e+02\n15 20738     8.036500e+02 2.028800e+02\n7 20739     3.009399e+02 1.559200e+02\n10 20739     3.864301e+02 1.711300e+02\n7 20740     -4.735000e+02 1.500800e+02\n10 20740     -4.756400e+02 2.548500e+02\n7 20741     -1.462900e+02 1.442200e+02\n9 20741     -6.247998e+01 1.146600e+02\n13 20741     3.154800e+02 -1.916800e+02\n7 20742     8.745001e+01 1.452500e+02\n15 20742     1.989500e+02 1.637300e+02\n7 20743     8.745001e+01 1.452500e+02\n15 20743     1.989500e+02 1.637300e+02\n7 20744     -3.677500e+02 1.323000e+02\n15 20744     -3.308300e+02 2.268000e+02\n7 20745     2.628300e+02 1.261800e+02\n15 20745     4.667100e+02 1.329800e+02\n7 20746     2.628300e+02 1.261800e+02\n15 20746     4.667100e+02 1.329800e+02\n7 20747     4.670800e+02 1.160100e+02\n10 20747     6.162600e+02 1.275000e+02\n15 20747     8.248500e+02 1.266500e+02\n7 20748     -2.717000e+02 1.124500e+02\n15 20748     -2.541400e+02 1.668900e+02\n7 20749     -4.168000e+02 1.104600e+02\n15 20749     -3.977200e+02 2.010300e+02\n7 20750     -1.900800e+02 1.044200e+02\n15 20750     -1.590800e+02 1.438200e+02\n7 20751     -4.663200e+02 9.981000e+01\n15 20751     -4.642500e+02 1.905700e+02\n7 20752     -4.243300e+02 9.681000e+01\n8 20752     -2.796100e+02 -1.725800e+02\n13 20752     1.827002e+01 -2.171200e+02\n7 20753     4.725900e+02 9.510001e+01\n10 20753     6.175500e+02 1.000100e+02\n15 20753     8.261500e+02 9.389001e+01\n7 20754     -4.620000e+02 9.372000e+01\n15 20754     -4.597100e+02 1.815000e+02\n7 20755     -4.210700e+02 8.594000e+01\n15 20755     -4.089800e+02 1.673900e+02\n7 20756     -3.982600e+02 8.353000e+01\n15 20756     -3.796600e+02 1.615300e+02\n7 20757     -4.870100e+02 8.256000e+01\n15 20757     -4.951300e+02 1.665900e+02\n7 20758     6.415300e+02 8.129001e+01\n10 20758     8.228700e+02 6.095001e+01\n7 20759     -1.340400e+02 7.177002e+01\n15 20759     -9.706000e+01 8.967001e+01\n7 20760     -1.929100e+02 6.470001e+01\n13 20760     2.694800e+02 -2.566800e+02\n7 20761     -5.272000e+02 6.053998e+01\n13 20761     -7.009998e+01 -2.399200e+02\n7 20762     -5.104600e+02 4.328003e+01\n15 20762     -5.318600e+02 1.170300e+02\n7 20763     -2.218300e+02 4.095001e+01\n15 20763     -2.065900e+02 6.084998e+01\n7 20764     -2.218300e+02 4.095001e+01\n15 20764     -2.065900e+02 6.084998e+01\n7 20765     1.834200e+02 3.128998e+01\n10 20765     2.116801e+02 2.263000e+01\n13 20765     6.070500e+02 -3.113600e+02\n15 20765     3.262200e+02 9.500122e-01\n7 20766     -5.118800e+02 1.896002e+01\n13 20766     -5.592999e+01 -2.771800e+02\n7 20767     5.236899e+02 1.763000e+01\n9 20767     4.415100e+02 -2.640997e+01\n7 20768     4.904100e+02 1.573999e+01\n15 20768     8.329399e+02 -2.640997e+01\n7 20769     -3.901700e+02 1.187000e+01\n10 20769     -4.033900e+02 8.160999e+01\n15 20769     -3.832900e+02 6.301001e+01\n7 20770     -3.707600e+02 6.429993e+00\n10 20770     -3.820400e+02 7.373999e+01\n15 20770     -3.592400e+02 5.234998e+01\n7 20771     -1.483700e+02 -1.928998e+01\n15 20771     -1.261400e+02 -3.108002e+01\n7 20772     -1.954300e+02 -2.295001e+01\n8 20772     5.590997e+01 -1.628300e+02\n10 20772     -2.273400e+02 -9.500122e-01\n12 20772     -1.454600e+02 -1.024400e+02\n13 20772     2.684600e+02 -3.314000e+02\n7 20773     -5.124800e+02 -3.534998e+01\n15 20773     -5.486700e+02 1.052002e+01\n7 20774     -4.642100e+02 -4.153998e+01\n15 20774     -4.879300e+02 -3.640015e+00\n7 20775     -5.820100e+02 -4.826001e+01\n15 20775     -6.382500e+02 -1.599731e-01\n7 20776     -5.820100e+02 -4.826001e+01\n15 20776     -6.382500e+02 -1.599731e-01\n7 20777     -5.472700e+02 -5.646997e+01\n10 20777     -5.878900e+02 1.697998e+01\n15 20777     -5.964300e+02 -1.488000e+01\n7 20778     -5.403100e+02 -5.890002e+01\n8 20778     -3.638100e+02 -3.002800e+02\n15 20778     -5.881900e+02 -1.906000e+01\n7 20779     -5.403100e+02 -5.890002e+01\n15 20779     -5.881900e+02 -1.906000e+01\n7 20780     -4.348800e+02 -6.138000e+01\n13 20780     1.504999e+01 -3.517200e+02\n15 20780     -4.544700e+02 -3.334003e+01\n7 20781     -4.906700e+02 -6.400000e+01\n13 20781     -3.319000e+01 -3.503500e+02\n7 20782     -6.387300e+02 -7.638000e+01\n8 20782     -4.625500e+02 -3.209800e+02\n10 20782     -6.910200e+02 2.190002e+00\n7 20783     1.653101e+02 -9.273999e+01\n8 20783     4.036700e+02 -1.935000e+02\n7 20784     6.142900e+02 -9.791998e+01\n12 20784     7.835000e+02 -1.419800e+02\n7 20785     5.165601e+02 -1.089400e+02\n15 20785     8.384800e+02 -2.162700e+02\n7 20786     5.224301e+02 -1.175500e+02\n15 20786     8.450300e+02 -2.302300e+02\n7 20787     -1.534500e+02 -1.503600e+02\n8 20787     9.652002e+01 -2.946300e+02\n9 20787     -1.738000e+01 -1.662900e+02\n13 20787     2.918600e+02 -4.487500e+02\n7 20788     6.066998e+01 -1.691600e+02\n8 20788     3.163400e+02 -2.807900e+02\n7 20789     -1.564300e+02 -2.303400e+02\n15 20789     -1.469700e+02 -3.030900e+02\n7 20790     3.496899e+02 -2.440200e+02\n15 20790     5.520601e+02 -3.895100e+02\n7 20791     -1.116900e+02 -2.483100e+02\n15 20791     -9.363000e+01 -3.342800e+02\n7 20792     -4.142200e+02 -2.497700e+02\n9 20792     -3.037700e+02 -3.567700e+02\n7 20793     -3.749500e+02 -2.532600e+02\n15 20793     -4.170800e+02 -3.005200e+02\n7 20794     1.142400e+02 -2.942400e+02\n9 20794     2.585000e+02 -2.653700e+02\n7 20795     1.142400e+02 -2.942400e+02\n9 20795     2.585000e+02 -2.653700e+02\n7 20796     5.547600e+02 -3.424800e+02\n10 20796     6.257200e+02 -4.535000e+02\n7 20797     -3.822900e+02 -3.535300e+02\n15 20797     -4.468300e+02 -4.342600e+02\n7 20798     -4.690300e+02 -3.920500e+02\n15 20798     -5.642400e+02 -4.743800e+02\n7 20799     -1.733002e+01 -4.015000e+02\n15 20799     1.079999e+01 -5.508800e+02\n7 20800     -1.392400e+02 -4.159400e+02\n9 20800     6.634003e+01 -4.207100e+02\n7 20801     -3.762300e+02 -4.230800e+02\n15 20801     -4.540200e+02 -5.278300e+02\n7 20802     3.357001e+01 -4.244600e+02\n12 20802     1.733500e+02 -5.758600e+02\n7 20803     3.588000e+01 -4.340699e+02\n12 20803     1.794400e+02 -5.868300e+02\n7 20804     -3.443600e+02 -4.443000e+02\n15 20804     -4.182600e+02 -5.610601e+02\n7 20805     -3.480600e+02 -4.521300e+02\n15 20805     -4.243500e+02 -5.710601e+02\n7 20806     4.049900e+02 -4.578800e+02\n10 20806     4.190601e+02 -5.703300e+02\n7 20807     -2.103400e+02 -4.687000e+02\n10 20807     -2.859700e+02 -4.975500e+02\n7 20808     -2.103400e+02 -4.687000e+02\n10 20808     -2.859700e+02 -4.975500e+02\n7 20809     3.163199e+02 -4.699500e+02\n9 20809     5.040400e+02 -3.633500e+02\n12 20809     5.278500e+02 -5.948199e+02\n7 20810     -1.229980e+00 -5.185300e+02\n9 20810     2.507400e+02 -4.648700e+02\n7 20811     4.611000e+02 -5.222700e+02\n9 20811     6.480000e+02 -3.709100e+02\n7 20812     -1.923000e+02 -5.276200e+02\n10 20812     -2.752700e+02 -5.674900e+02\n7 20813     4.485601e+02 -5.373700e+02\n9 20813     6.454301e+02 -3.826200e+02\n7 20814     4.259900e+02 -5.550400e+02\n9 20814     6.361100e+02 -3.991300e+02\n7 20815     1.963101e+02 5.738300e+02\n8 20815     1.643100e+02 1.792200e+02\n9 20815     -6.547998e+01 2.766700e+02\n11 20815     5.581000e+02 -2.739300e+02\n13 20815     5.433101e+02 1.673100e+02\n14 20815     7.510601e+02 -2.519400e+02\n7 20816     -1.045900e+02 5.282600e+02\n8 20816     -6.571997e+01 1.554100e+02\n7 20817     -4.014001e+01 5.133600e+02\n11 20817     3.198900e+02 -3.222100e+02\n7 20818     -4.222200e+02 5.023500e+02\n8 20818     -3.171800e+02 1.544700e+02\n7 20819     -3.537000e+02 4.950600e+02\n11 20819     2.765002e+01 -3.156800e+02\n7 20820     -4.840997e+01 4.797700e+02\n11 20820     3.116500e+02 -3.493300e+02\n7 20821     -3.477600e+02 4.734900e+02\n11 20821     3.063000e+01 -3.341600e+02\n7 20822     -1.828400e+02 4.662500e+02\n13 20822     2.163800e+02 8.434000e+01\n7 20823     -4.918600e+02 4.496200e+02\n10 20823     -4.702800e+02 6.082700e+02\n13 20823     -2.998999e+01 8.220999e+01\n7 20824     -5.512600e+02 4.488800e+02\n10 20824     -5.413900e+02 6.127800e+02\n7 20825     -2.304500e+02 4.477700e+02\n10 20825     -1.568300e+02 5.968600e+02\n7 20826     -1.940300e+02 4.361000e+02\n10 20826     -1.125000e+02 5.819600e+02\n7 20827     3.742500e+02 4.238800e+02\n9 20827     2.213400e+02 2.805900e+02\n13 20827     7.490300e+02 2.390002e+01\n7 20828     -1.584800e+02 4.059900e+02\n11 20828     1.936100e+02 -4.111100e+02\n13 20828     2.346700e+02 3.103998e+01\n14 20828     3.679200e+02 -4.102400e+02\n7 20829     2.723300e+02 4.029600e+02\n13 20829     6.365699e+02 1.007001e+01\n15 20829     5.948600e+02 5.679400e+02\n7 20830     4.431899e+02 4.012900e+02\n10 20830     6.127000e+02 4.710000e+02\n7 20831     -3.379700e+02 3.953300e+02\n11 20831     3.075000e+01 -4.017800e+02\n7 20832     -1.525000e+02 3.928500e+02\n10 20832     -7.082001e+01 5.253400e+02\n11 20832     1.977300e+02 -4.239600e+02\n7 20833     -3.838000e+02 3.783600e+02\n13 20833     4.671002e+01 1.971002e+01\n7 20834     1.199900e+02 3.758900e+02\n13 20834     4.872400e+02 -7.510010e+00\n7 20835     -5.217600e+02 3.714600e+02\n10 20835     -5.069900e+02 5.208900e+02\n7 20836     -6.167800e+02 3.699400e+02\n10 20836     -6.185600e+02 5.243300e+02\n11 20836     -2.145000e+02 -3.928100e+02\n13 20836     -1.345000e+02 2.712000e+01\n7 20837     -1.651100e+02 3.695200e+02\n11 20837     1.806100e+02 -4.453300e+02\n15 20837     -1.450000e+01 5.495600e+02\n7 20838     -3.586500e+02 3.600700e+02\n14 20838     1.545601e+02 -4.365400e+02\n7 20839     -2.084000e+02 3.591400e+02\n10 20839     -1.409000e+02 4.877800e+02\n7 20840     1.008300e+02 3.443200e+02\n10 20840     2.160100e+02 4.457600e+02\n7 20841     -6.684500e+02 3.433400e+02\n10 20841     -6.826600e+02 4.972500e+02\n7 20842     -5.020800e+02 3.425100e+02\n11 20842     -1.223600e+02 -4.300600e+02\n13 20842     -5.034003e+01 -3.539978e+00\n7 20843     -3.298000e+02 3.378100e+02\n10 20843     -2.839900e+02 4.705700e+02\n7 20844     6.362400e+02 3.358900e+02\n9 20844     4.753101e+02 2.738600e+02\n7 20845     -4.990900e+02 3.246300e+02\n11 20845     -1.222600e+02 -4.458400e+02\n13 20845     -5.015997e+01 -1.859998e+01\n14 20845     1.033002e+01 -4.580601e+02\n7 20846     1.221600e+02 3.195200e+02\n10 20846     2.378199e+02 4.130100e+02\n7 20847     -5.220700e+02 3.167800e+02\n11 20847     -1.451500e+02 -4.507900e+02\n7 20848     -7.117300e+02 3.135000e+02\n8 20848     -5.751200e+02 2.300110e-01\n11 20848     -3.028000e+02 -4.298000e+02\n7 20849     -6.610400e+02 3.128900e+02\n11 20849     -2.589700e+02 -4.337800e+02\n15 20849     -6.855800e+02 4.978700e+02\n7 20850     -5.772500e+02 3.107700e+02\n11 20850     -1.918700e+02 -4.481100e+02\n13 20850     -1.125800e+02 -2.508002e+01\n14 20850     -6.737000e+01 -4.625500e+02\n7 20851     -4.314600e+02 3.086300e+02\n15 20851     -3.802200e+02 4.804300e+02\n7 20852     -3.948300e+02 3.072500e+02\n11 20852     -3.510999e+01 -4.749200e+02\n15 20852     -3.338600e+02 4.757200e+02\n7 20853     -5.462500e+02 3.060200e+02\n11 20853     -1.660500e+02 -4.560000e+02\n13 20853     -8.988000e+01 -3.162000e+01\n14 20853     -3.959998e+01 -4.721400e+02\n7 20854     -5.686500e+02 2.973400e+02\n11 20854     -1.868400e+02 -4.609000e+02\n13 20854     -1.080600e+02 -3.685999e+01\n14 20854     -6.241998e+01 -4.774500e+02\n7 20855     -5.209800e+02 2.965900e+02\n11 20855     -1.454000e+02 -4.671700e+02\n13 20855     -7.112000e+01 -4.060999e+01\n14 20855     -1.675000e+01 -4.848000e+02\n7 20856     3.654600e+02 2.973000e+02\n15 20856     6.962300e+02 3.976700e+02\n7 20857     -4.310800e+02 2.931300e+02\n11 20857     -7.135999e+01 -4.839300e+02\n7 20858     9.240997e+01 2.831500e+02\n13 20858     5.187600e+02 -8.794000e+01\n7 20859     -4.481900e+02 2.810500e+02\n11 20859     -8.925000e+01 -4.919700e+02\n7 20860     6.475601e+02 2.765500e+02\n9 20860     4.947200e+02 2.256200e+02\n7 20861     3.738700e+02 2.717700e+02\n10 20861     5.203300e+02 3.259700e+02\n15 20861     7.066600e+02 3.605400e+02\n7 20862     -7.133700e+02 2.709500e+02\n11 20862     -3.128000e+02 -4.649200e+02\n13 20862     -2.228400e+02 -4.885999e+01\n7 20863     -7.185000e+02 2.653200e+02\n10 20863     -7.409500e+02 4.105800e+02\n13 20863     -2.256900e+02 -5.340002e+01\n14 20863     -2.099100e+02 -4.912100e+02\n7 20864     -6.982200e+02 2.649400e+02\n10 20864     -7.167500e+02 4.089900e+02\n7 20865     -5.496900e+02 2.649800e+02\n11 20865     -1.758200e+02 -4.915900e+02\n13 20865     -9.596002e+01 -6.466998e+01\n14 20865     -4.931000e+01 -5.138900e+02\n7 20866     -6.463700e+02 2.591200e+02\n10 20866     -6.558400e+02 4.009600e+02\n11 20866     -2.585800e+02 -4.828100e+02\n7 20867     -6.161400e+02 2.226200e+02\n14 20867     -1.215800e+02 -5.521600e+02\n7 20868     -4.764001e+01 2.220600e+02\n12 20868     8.090027e+00 1.990300e+02\n7 20869     5.729301e+02 2.222100e+02\n9 20869     4.370900e+02 1.568900e+02\n10 20869     7.519399e+02 2.385500e+02\n7 20870     3.206100e+02 1.949900e+02\n15 20870     6.255100e+02 2.575000e+02\n7 20871     1.265400e+02 1.841900e+02\n10 20871     1.591600e+02 2.047500e+02\n15 20871     2.617900e+02 2.163500e+02\n7 20872     5.932300e+02 1.837900e+02\n10 20872     7.721300e+02 1.900800e+02\n7 20873     7.122100e+02 1.781000e+02\n9 20873     5.675699e+02 1.585300e+02\n7 20874     -5.800200e+02 1.654400e+02\n13 20874     -1.195400e+02 -1.469800e+02\n7 20875     -5.800200e+02 1.654400e+02\n13 20875     -1.195400e+02 -1.469800e+02\n7 20876     4.915400e+02 1.648600e+02\n10 20876     6.495300e+02 1.810800e+02\n15 20876     8.633900e+02 1.919600e+02\n7 20877     -4.631500e+02 1.542800e+02\n10 20877     -4.629100e+02 2.591900e+02\n15 20877     -4.501600e+02 2.659900e+02\n7 20878     3.650601e+02 1.520800e+02\n10 20878     4.975500e+02 1.816100e+02\n7 20879     -3.898400e+02 1.471800e+02\n15 20879     -3.557500e+02 2.502400e+02\n7 20880     -3.447400e+02 1.459600e+02\n15 20880     -2.979000e+02 2.433800e+02\n7 20881     -2.030000e+02 1.412100e+02\n15 20881     -1.672300e+02 1.957900e+02\n7 20882     -4.728300e+02 1.373900e+02\n10 20882     -4.754100e+02 2.407200e+02\n15 20882     -4.656400e+02 2.446100e+02\n7 20883     4.489800e+02 1.337400e+02\n10 20883     5.969399e+02 1.514600e+02\n7 20884     4.503700e+02 1.260600e+02\n10 20884     5.976500e+02 1.415900e+02\n15 20884     8.014100e+02 1.433900e+02\n7 20885     -3.776700e+02 1.186600e+02\n15 20885     -3.464300e+02 2.083000e+02\n7 20886     6.713400e+02 1.176800e+02\n9 20886     5.423600e+02 9.237000e+01\n7 20887     -2.223900e+02 1.117100e+02\n13 20887     2.409000e+02 -2.159700e+02\n7 20888     4.665300e+02 1.094200e+02\n10 20888     6.147500e+02 1.190300e+02\n15 20888     8.234000e+02 1.161400e+02\n7 20889     -2.062700e+02 1.023100e+02\n10 20889     -2.203700e+02 1.469200e+02\n7 20890     4.672200e+02 9.898999e+01\n10 20890     6.123800e+02 1.061800e+02\n15 20890     8.200200e+02 1.009900e+02\n7 20891     5.061700e+02 8.492999e+01\n9 20891     3.967900e+02 1.133002e+01\n7 20892     8.839001e+01 8.176001e+01\n8 20892     3.080100e+02 -4.432001e+01\n13 20892     5.244000e+02 -2.600900e+02\n7 20893     1.628700e+02 7.225000e+01\n10 20893     1.916400e+02 7.142999e+01\n7 20894     4.367300e+02 7.059003e+01\n12 20894     5.402000e+02 2.221002e+01\n7 20895     -3.523600e+02 6.701001e+01\n10 20895     -3.527100e+02 1.442000e+02\n7 20896     -2.101600e+02 6.013000e+01\n13 20896     2.537600e+02 -2.588100e+02\n7 20897     -5.227100e+02 5.622998e+01\n15 20897     -5.441000e+02 1.360000e+02\n7 20898     3.097000e+02 5.607001e+01\n10 20898     3.726200e+02 4.517999e+01\n12 20898     4.371700e+02 2.906000e+01\n7 20899     -1.467300e+02 5.389001e+01\n10 20899     -1.628700e+02 8.201001e+01\n7 20900     1.414200e+02 4.809998e+01\n8 20900     3.522700e+02 -7.698999e+01\n10 20900     1.629500e+02 4.583002e+01\n12 20900     2.496400e+02 1.421002e+01\n7 20901     -2.054600e+02 4.540002e+01\n10 20901     -2.268500e+02 7.983002e+01\n13 20901     2.571801e+02 -2.728600e+02\n15 20901     -1.877100e+02 6.377002e+01\n7 20902     1.214900e+02 2.806000e+01\n15 20902     2.382000e+02 2.200012e+00\n7 20903     4.910999e+01 2.502002e+01\n13 20903     4.888900e+02 -3.066000e+02\n7 20904     -1.519800e+02 2.103003e+01\n15 20904     -1.277300e+02 2.167999e+01\n7 20905     5.367200e+02 -9.940002e+00\n9 20905     4.639800e+02 -4.144000e+01\n10 20905     6.778300e+02 -3.685999e+01\n7 20906     -1.392800e+02 -1.594000e+01\n10 20906     -1.635000e+02 1.229980e+00\n15 20906     -1.137800e+02 -2.794000e+01\n7 20907     -2.239100e+02 -1.839001e+01\n8 20907     2.727002e+01 -1.622000e+02\n12 20907     -1.810800e+02 -1.002800e+02\n7 20908     1.408800e+02 -2.181000e+01\n13 20908     5.696700e+02 -3.551100e+02\n7 20909     -1.544900e+02 -2.647998e+01\n15 20909     -1.355700e+02 -4.022998e+01\n7 20910     1.326200e+02 -2.654999e+01\n13 20910     5.618600e+02 -3.582400e+02\n7 20911     2.254999e+01 -6.013000e+01\n15 20911     8.958002e+01 -1.073300e+02\n7 20912     5.191600e+02 -7.464001e+01\n12 20912     6.685800e+02 -1.273600e+02\n7 20913     -6.322900e+02 -8.284998e+01\n10 20913     -6.852200e+02 -6.130005e+00\n7 20914     -5.874000e+02 -8.340997e+01\n8 20914     -4.073800e+02 -3.222300e+02\n13 20914     -1.179600e+02 -3.582400e+02\n7 20915     -4.698300e+02 -8.922998e+01\n13 20915     -1.496002e+01 -3.735300e+02\n7 20916     -5.385700e+02 -1.459700e+02\n15 20916     -6.011500e+02 -1.361400e+02\n7 20917     -5.541900e+02 -1.470300e+02\n15 20917     -6.216400e+02 -1.360600e+02\n7 20918     -4.078300e+02 -1.575400e+02\n8 20918     -2.023000e+02 -3.680900e+02\n7 20919     -1.468100e+02 -1.687100e+02\n13 20919     2.951500e+02 -4.667700e+02\n7 20920     -4.800300e+02 -1.742200e+02\n15 20920     -5.332500e+02 -1.814900e+02\n7 20921     6.005900e+02 -1.810800e+02\n9 20921     5.915500e+02 -1.349500e+02\n7 20922     -7.260010e+00 -1.959300e+02\n13 20922     4.243101e+02 -5.030300e+02\n7 20923     8.270020e+00 -2.271600e+02\n10 20923     -9.719971e+00 -2.495000e+02\n7 20924     -4.172800e+02 -2.580300e+02\n9 20924     -3.030600e+02 -3.639800e+02\n7 20925     2.265300e+02 -3.423200e+02\n10 20925     2.294000e+02 -4.070000e+02\n7 20926     -4.601400e+02 -3.567100e+02\n15 20926     -5.459600e+02 -4.279400e+02\n7 20927     -4.601400e+02 -3.567100e+02\n15 20927     -5.459600e+02 -4.279400e+02\n7 20928     -3.398200e+02 -3.639400e+02\n15 20928     -3.945100e+02 -4.530601e+02\n7 20929     1.215600e+02 -3.850700e+02\n9 20929     2.949900e+02 -3.441300e+02\n7 20930     6.533700e+02 -3.902800e+02\n9 20930     7.285000e+02 -2.529900e+02\n10 20930     7.429600e+02 -5.297500e+02\n7 20931     5.142200e+02 -3.915200e+02\n10 20931     5.672700e+02 -5.072500e+02\n7 20932     -6.956000e+01 -4.131800e+02\n15 20932     -5.945001e+01 -5.597200e+02\n7 20933     3.986300e+02 -4.542900e+02\n12 20933     6.235800e+02 -5.664900e+02\n7 20934     -2.299200e+02 -4.839700e+02\n10 20934     -3.095900e+02 -5.141500e+02\n7 20935     4.035999e+01 -5.006100e+02\n9 20935     2.809301e+02 -4.418700e+02\n7 20936     -2.669500e+02 -5.397600e+02\n9 20936     -3.300171e-01 -5.486500e+02\n7 20937     1.871997e+01 -5.501300e+02\n9 20937     2.857000e+02 -4.833300e+02\n7 20938     -1.572900e+02 -5.628300e+02\n9 20938     1.235700e+02 -5.376700e+02\n7 20939     -5.892999e+01 5.014400e+02\n9 20939     -2.619100e+02 2.157600e+02\n7 20940     -1.182800e+02 4.512200e+02\n11 20940     2.416700e+02 -3.702700e+02\n7 20941     2.686000e+02 4.436700e+02\n10 20941     4.257600e+02 5.515400e+02\n13 20941     6.340100e+02 4.558002e+01\n7 20942     -2.220200e+02 4.208400e+02\n10 20942     -1.471400e+02 5.653300e+02\n13 20942     1.818700e+02 4.807001e+01\n14 20942     3.016400e+02 -3.864000e+02\n7 20943     1.292900e+02 3.978300e+02\n13 20943     4.935200e+02 1.100000e+01\n14 20943     6.966600e+02 -4.481801e+02\n7 20944     1.155100e+02 3.913200e+02\n13 20944     4.817500e+02 5.619995e+00\n14 20944     6.809399e+02 -4.541801e+02\n7 20945     -2.401200e+02 3.609200e+02\n13 20945     1.673600e+02 -3.270020e+00\n14 20945     2.818800e+02 -4.504500e+02\n15 20945     -1.185200e+02 5.417700e+02\n7 20946     5.110900e+02 3.572200e+02\n9 20946     3.596500e+02 2.583200e+02\n7 20947     4.784900e+02 3.493600e+02\n9 20947     3.313800e+02 2.427900e+02\n7 20948     -1.377600e+02 3.333500e+02\n10 20948     -6.496002e+01 4.498600e+02\n11 20948     1.960200e+02 -4.846400e+02\n7 20949     3.578199e+02 3.294600e+02\n8 20949     4.007700e+02 6.800000e+01\n13 20949     7.284000e+02 -5.860999e+01\n7 20950     -3.383900e+02 3.047700e+02\n11 20950     1.088000e+01 -4.853200e+02\n13 20950     8.421002e+01 -4.441998e+01\n14 20950     1.773400e+02 -4.991801e+02\n15 20950     -2.600400e+02 4.670200e+02\n7 20951     -4.927400e+02 3.041400e+02\n11 20951     -1.202500e+02 -4.638500e+02\n7 20952     -5.749800e+02 3.028500e+02\n11 20952     -1.914400e+02 -4.552700e+02\n13 20952     -1.126400e+02 -3.209003e+01\n14 20952     -6.779999e+01 -4.712200e+02\n7 20953     -6.163000e+02 2.950300e+02\n11 20953     -2.272400e+02 -4.564500e+02\n12 20953     -7.417500e+02 1.768200e+02\n7 20954     -2.420200e+02 2.920900e+02\n10 20954     -1.905200e+02 4.067100e+02\n7 20955     -3.298800e+02 2.882800e+02\n11 20955     1.365002e+01 -5.026899e+02\n7 20956     -5.883500e+02 2.785900e+02\n11 20956     -2.065600e+02 -4.741400e+02\n13 20956     -1.258800e+02 -5.127002e+01\n14 20956     -8.584003e+01 -4.947100e+02\n7 20957     -6.616900e+02 2.532400e+02\n10 20957     -6.738000e+02 3.950200e+02\n11 20957     -2.696400e+02 -4.858200e+02\n7 20958     -6.738900e+02 2.396400e+02\n11 20958     -2.862300e+02 -4.963400e+02\n7 20959     -5.290000e+02 2.323600e+02\n10 20959     -5.244300e+02 3.591600e+02\n7 20960     1.350900e+02 2.172600e+02\n10 20960     1.744000e+02 2.441700e+02\n12 20960     2.206200e+02 2.073700e+02\n13 20960     5.634700e+02 -1.458400e+02\n15 20960     2.809700e+02 2.629900e+02\n7 20961     -4.399500e+02 2.023700e+02\n8 20961     -3.180000e+02 -9.664001e+01\n7 20962     -5.570400e+02 1.783900e+02\n13 20962     -9.914001e+01 -1.378200e+02\n7 20963     3.826400e+02 1.778400e+02\n10 20963     5.237500e+02 2.122800e+02\n7 20964     3.826400e+02 1.778400e+02\n10 20964     5.237500e+02 2.122800e+02\n7 20965     4.988101e+02 1.561800e+02\n10 20965     6.565699e+02 1.709200e+02\n7 20966     4.988101e+02 1.561800e+02\n10 20966     6.566000e+02 1.713700e+02\n7 20967     -5.594800e+02 1.541400e+02\n13 20967     -9.950000e+01 -1.574100e+02\n7 20968     -5.594800e+02 1.541400e+02\n13 20968     -9.950000e+01 -1.574100e+02\n7 20969     3.714700e+02 1.436300e+02\n10 20969     5.035601e+02 1.708500e+02\n7 20970     -7.400300e+02 1.426700e+02\n13 20970     -2.547500e+02 -1.540000e+02\n7 20971     9.500122e-01 1.357900e+02\n10 20971     5.719971e+00 1.571900e+02\n13 20971     4.500800e+02 -2.074800e+02\n15 20971     7.948999e+01 1.589400e+02\n7 20972     -3.765400e+02 1.088600e+02\n10 20972     -3.731300e+02 1.959800e+02\n13 20972     6.023999e+01 -2.104300e+02\n15 20972     -3.459400e+02 1.948800e+02\n7 20973     -3.683800e+02 1.005500e+02\n13 20973     6.732001e+01 -2.180300e+02\n7 20974     -3.683800e+02 1.005500e+02\n10 20974     -3.651200e+02 1.855800e+02\n13 20974     6.732001e+01 -2.180300e+02\n7 20975     4.951801e+02 8.970999e+01\n15 20975     8.624100e+02 8.229999e+01\n7 20976     -3.723900e+02 8.022000e+01\n15 20976     -3.479400e+02 1.552100e+02\n7 20977     -1.622400e+02 7.159998e+01\n13 20977     2.972800e+02 -2.537900e+02\n7 20978     4.228000e+02 5.698999e+01\n12 20978     5.270200e+02 6.729980e+00\n7 20979     -3.943200e+02 2.082001e+01\n9 20979     -4.060700e+02 -1.529300e+02\n7 20980     -1.127002e+01 -5.937000e+01\n15 20980     4.465997e+01 -1.024800e+02\n7 20981     -9.394000e+01 -7.734998e+01\n15 20981     -6.902002e+01 -1.179700e+02\n7 20982     -6.275000e+01 -7.758002e+01\n10 20982     -8.615002e+01 -7.671997e+01\n7 20983     -4.787900e+02 -9.790997e+01\n15 20983     -5.182300e+02 -7.883002e+01\n7 20984     -4.787900e+02 -9.790997e+01\n13 20984     -2.303003e+01 -3.806000e+02\n15 20984     -5.182300e+02 -7.883002e+01\n7 20985     -5.104800e+02 -9.917999e+01\n15 20985     -5.558300e+02 -7.608002e+01\n7 20986     5.315900e+02 -1.055600e+02\n15 20986     8.622300e+02 -2.138100e+02\n7 20987     -3.998300e+02 -1.112500e+02\n13 20987     4.747998e+01 -3.989300e+02\n7 20988     -3.998300e+02 -1.112500e+02\n13 20988     4.747998e+01 -3.989300e+02\n7 20989     -7.052100e+02 -1.806000e+02\n15 20989     -8.162600e+02 -1.649600e+02\n7 20990     -4.800600e+02 -1.875000e+02\n15 20990     -5.371600e+02 -1.988800e+02\n7 20991     5.982200e+02 -1.905900e+02\n9 20991     5.939700e+02 -1.406500e+02\n12 20991     7.884900e+02 -2.442300e+02\n7 20992     -3.831500e+02 -2.808500e+02\n13 20992     6.620001e+01 -5.504500e+02\n7 20993     -4.701400e+02 -3.349100e+02\n15 20993     -5.539400e+02 -3.970100e+02\n7 20994     -2.650000e+02 -3.435800e+02\n15 20994     -2.963600e+02 -4.362200e+02\n7 20995     -4.638400e+02 -3.484200e+02\n10 20995     -5.424500e+02 -3.307800e+02\n15 20995     -5.493900e+02 -4.172300e+02\n7 20996     -4.935600e+02 -3.591100e+02\n15 20996     -5.889200e+02 -4.267600e+02\n7 20997     -3.494300e+02 -3.714000e+02\n15 20997     -4.092300e+02 -4.629399e+02\n7 20998     -5.168300e+02 -3.805900e+02\n15 20998     -6.213000e+02 -4.536500e+02\n7 20999     2.467200e+02 -3.830800e+02\n9 20999     4.018101e+02 -3.199200e+02\n7 21000     4.538300e+02 -3.841200e+02\n10 21000     4.922300e+02 -4.880900e+02\n7 21001     3.279900e+02 -4.316800e+02\n10 21001     3.322200e+02 -5.262800e+02\n7 21002     -3.576900e+02 -4.422900e+02\n15 21002     -4.350500e+02 -5.562400e+02\n7 21003     7.640002e+01 -4.624500e+02\n9 21003     2.940100e+02 -4.072500e+02\n7 21004     3.556400e+02 5.261900e+02\n8 21004     3.627500e+02 2.135500e+02\n12 21004     3.811600e+02 5.197200e+02\n7 21005     3.295500e+02 4.260400e+02\n8 21005     3.445500e+02 1.248200e+02\n7 21006     -5.085200e+02 4.154600e+02\n11 21006     -1.169100e+02 -3.677700e+02\n12 21006     -6.187200e+02 3.263600e+02\n7 21007     6.184998e+01 3.851200e+02\n10 21007     1.804000e+02 5.003800e+02\n11 21007     3.971500e+02 -4.541200e+02\n7 21008     8.900146e-01 3.587100e+02\n10 21008     1.037700e+02 4.712300e+02\n11 21008     3.339800e+02 -4.754000e+02\n7 21009     1.191500e+02 3.309800e+02\n10 21009     2.364200e+02 4.273600e+02\n7 21010     1.569700e+02 3.275000e+02\n10 21010     2.812400e+02 4.200800e+02\n7 21011     -6.885200e+02 2.976300e+02\n10 21011     -7.048700e+02 4.446900e+02\n11 21011     -2.871600e+02 -4.455000e+02\n7 21012     -5.740200e+02 2.855500e+02\n11 21012     -1.935100e+02 -4.704500e+02\n7 21013     -5.466100e+02 2.831400e+02\n13 21013     -9.342999e+01 -4.959003e+01\n14 21013     -4.539001e+01 -4.952300e+02\n7 21014     -6.782100e+02 2.663800e+02\n8 21014     -5.513200e+02 -4.797000e+01\n10 21014     -6.940200e+02 4.106200e+02\n11 21014     -2.846700e+02 -4.707900e+02\n7 21015     -3.873700e+02 2.056700e+02\n15 21015     -3.419000e+02 3.313400e+02\n7 21016     -3.440300e+02 2.060400e+02\n10 21016     -3.215500e+02 3.104500e+02\n15 21016     -2.846400e+02 3.268000e+02\n7 21017     3.468700e+02 1.964900e+02\n10 21017     4.834900e+02 2.391100e+02\n15 21017     6.638000e+02 2.582000e+02\n7 21018     -5.468100e+02 1.498500e+02\n13 21018     -8.892999e+01 -1.624900e+02\n7 21019     -2.778500e+02 1.367500e+02\n10 21019     -2.873600e+02 1.990000e+02\n15 21019     -2.563100e+02 2.009500e+02\n7 21020     4.916899e+02 1.297300e+02\n10 21020     6.466400e+02 1.407800e+02\n7 21021     -3.833900e+02 1.267000e+02\n15 21021     -3.517200e+02 2.199200e+02\n7 21022     -4.909500e+02 3.282001e+01\n15 21022     -5.060200e+02 1.010800e+02\n7 21023     -1.985100e+02 3.103003e+01\n10 21023     -2.211200e+02 6.353003e+01\n15 21023     -1.807700e+02 4.450000e+01\n7 21024     -2.559998e+00 -1.245001e+01\n15 21024     5.965002e+01 -4.127002e+01\n7 21025     -1.520800e+02 -5.390997e+01\n13 21025     3.086899e+02 -3.611100e+02\n15 21025     -1.399500e+02 -7.860999e+01\n7 21026     -4.423200e+02 -9.231000e+01\n13 21026     8.609985e+00 -3.793700e+02\n7 21027     -2.619800e+02 -1.012900e+02\n13 21027     1.834800e+02 -3.976600e+02\n7 21028     -4.863200e+02 -1.348900e+02\n15 21028     -5.354900e+02 -1.275700e+02\n7 21029     5.296700e+02 -1.481500e+02\n15 21029     8.498600e+02 -2.768700e+02\n7 21030     -3.691100e+02 -2.599700e+02\n9 21030     -2.505000e+02 -3.554800e+02\n13 21030     7.814001e+01 -5.330200e+02\n7 21031     -4.369900e+02 -2.613400e+02\n13 21031     1.792999e+01 -5.278600e+02\n7 21032     4.502002e+01 -2.859000e+02\n9 21032     2.039700e+02 -2.541600e+02\n7 21033     5.284800e+02 -4.026500e+02\n10 21033     5.814500e+02 -5.237900e+02\n7 21034     5.284800e+02 -4.026500e+02\n10 21034     5.814500e+02 -5.237900e+02\n7 21035     4.774800e+02 -4.165900e+02\n10 21035     5.151100e+02 -5.332900e+02\n7 21036     1.861899e+02 -4.306500e+02\n10 21036     1.668600e+02 -5.056100e+02\n7 21037     4.676400e+02 -4.516200e+02\n10 21037     4.960699e+02 -5.725601e+02\n7 21038     3.810900e+02 -4.667700e+02\n9 21038     5.557400e+02 -3.477200e+02\n10 21038     3.882400e+02 -5.766300e+02\n12 21038     6.057900e+02 -5.818101e+02\n7 21039     4.996400e+02 -4.649200e+02\n9 21039     6.487800e+02 -3.261800e+02\n10 21039     5.336000e+02 -5.954100e+02\n7 21040     4.106600e+02 -4.685400e+02\n9 21040     5.813600e+02 -3.445200e+02\n10 21040     4.235800e+02 -5.853300e+02\n12 21040     6.410800e+02 -5.810400e+02\n7 21041     1.204100e+02 5.555900e+02\n8 21041     1.069400e+02 1.648400e+02\n7 21042     -1.384100e+02 4.599900e+02\n14 21042     3.881899e+02 -3.537200e+02\n7 21043     3.375000e+02 4.082800e+02\n8 21043     3.543000e+02 1.108500e+02\n7 21044     2.592400e+02 3.791200e+02\n13 21044     6.220000e+02 -1.001001e+01\n15 21044     5.754399e+02 5.357000e+02\n7 21045     4.520001e+01 3.646300e+02\n10 21045     1.561100e+02 4.758700e+02\n11 21045     3.758600e+02 -4.724800e+02\n7 21046     -4.617900e+02 3.262300e+02\n13 21046     -2.067999e+01 -1.977002e+01\n14 21046     4.690002e+01 -4.615800e+02\n7 21047     -4.710300e+02 3.143800e+02\n11 21047     -9.915002e+01 -4.579400e+02\n13 21047     -2.931000e+01 -2.829999e+01\n14 21047     3.584003e+01 -4.718199e+02\n7 21048     -1.394100e+02 2.361300e+02\n15 21048     -8.108002e+01 3.148200e+02\n7 21049     -6.656400e+02 2.308500e+02\n10 21049     -6.800700e+02 3.703800e+02\n11 21049     -2.804500e+02 -5.048600e+02\n13 21049     -1.917500e+02 -8.492999e+01\n14 21049     -1.707000e+02 -5.341500e+02\n7 21050     -7.359998e+01 2.026400e+02\n15 21050     -1.071002e+01 2.562200e+02\n7 21051     4.770500e+02 1.098600e+02\n10 21051     6.276200e+02 1.187700e+02\n15 21051     8.367600e+02 1.153500e+02\n7 21052     4.788700e+02 9.482001e+01\n15 21052     8.366500e+02 9.304001e+01\n7 21053     -8.049988e+00 8.528000e+01\n10 21053     -9.979980e+00 1.006400e+02\n13 21053     4.415400e+02 -2.501800e+02\n15 21053     6.256000e+01 9.135999e+01\n7 21054     -8.049988e+00 8.528000e+01\n10 21054     -9.979980e+00 1.006400e+02\n13 21054     4.415400e+02 -2.501800e+02\n15 21054     6.256000e+01 9.135999e+01\n7 21055     4.929100e+02 6.487000e+01\n9 21055     3.946600e+02 -1.650024e+00\n7 21056     4.357400e+02 2.025000e+01\n12 21056     5.500900e+02 -3.107001e+01\n7 21057     -2.317300e+02 -8.400024e+00\n10 21057     -2.644300e+02 2.014001e+01\n15 21057     -2.318700e+02 -6.200012e+00\n7 21058     -4.198999e+01 -9.510010e+00\n10 21058     -5.685999e+01 -4.080017e+00\n7 21059     -1.711700e+02 -3.128998e+01\n10 21059     -2.003400e+02 -1.396002e+01\n7 21060     -4.537300e+02 -6.003003e+01\n13 21060     -1.719971e+00 -3.499700e+02\n7 21061     -4.423100e+02 -6.895001e+01\n13 21061     7.849976e+00 -3.584400e+02\n7 21062     -4.423100e+02 -6.895001e+01\n13 21062     7.849976e+00 -3.584400e+02\n7 21063     -5.002500e+02 -7.207001e+01\n13 21063     -4.208002e+01 -3.560900e+02\n15 21063     -5.398500e+02 -4.037000e+01\n7 21064     -2.494900e+02 -9.764001e+01\n13 21064     1.993800e+02 -3.909700e+02\n7 21065     -4.218200e+02 -1.485800e+02\n13 21065     2.927002e+01 -4.305900e+02\n7 21066     1.615200e+02 -1.513900e+02\n9 21066     2.743101e+02 -1.109300e+02\n7 21067     9.497998e+01 -1.976000e+02\n10 21067     8.942999e+01 -2.270300e+02\n13 21067     5.173900e+02 -5.149200e+02\n15 21067     1.853600e+02 -2.965300e+02\n7 21068     -4.257400e+02 -2.293100e+02\n13 21068     2.734003e+01 -4.999200e+02\n7 21069     -3.779800e+02 -3.032300e+02\n9 21069     -2.398800e+02 -3.898900e+02\n7 21070     -4.661800e+02 -3.600600e+02\n15 21070     -5.534900e+02 -4.302800e+02\n7 21071     -5.071800e+02 -3.983600e+02\n15 21071     -6.134800e+02 -4.769399e+02\n7 21072     -1.018300e+02 -4.091100e+02\n9 21072     1.000500e+02 -4.081600e+02\n7 21073     2.154900e+02 -4.791200e+02\n9 21073     4.220100e+02 -3.899600e+02\n7 21074     2.163500e+02 -4.920800e+02\n9 21074     4.319301e+02 -3.984600e+02\n10 21074     1.886700e+02 -5.825601e+02\n7 21075     -1.902200e+02 6.390015e+00\n13 21075     2.703101e+02 -3.066700e+02\n7 21076     -1.626300e+02 -1.837200e+02\n10 21076     -1.950800e+02 -1.801100e+02\n13 21076     2.772800e+02 -4.828101e+02\n15 21076     -1.443000e+02 -2.394400e+02\n7 21077     -3.899400e+02 -2.913900e+02\n13 21077     5.873999e+01 -5.596400e+02\n7 21078     4.996801e+02 -3.883900e+02\n10 21078     5.492600e+02 -5.010000e+02\n7 21079     4.799700e+02 -4.361801e+02\n10 21079     5.136200e+02 -5.547100e+02\n7 21080     3.944700e+02 -4.623000e+02\n9 21080     5.641500e+02 -3.422100e+02\n12 21080     6.204301e+02 -5.743000e+02\n7 21081     3.580400e+02 -5.282900e+02\n9 21081     5.684301e+02 -3.936700e+02\n7 21082     -2.728998e+01 5.094800e+02\n8 21082     -6.780029e+00 1.318200e+02\n11 21082     3.318900e+02 -3.234900e+02\n7 21083     5.604399e+02 2.932000e+02\n10 21083     7.423300e+02 3.257200e+02\n7 21084     -2.027100e+02 1.202100e+02\n13 21084     2.576801e+02 -2.068800e+02\n7 21085     -1.141800e+02 -4.435999e+01\n10 21085     -1.391100e+02 -3.314001e+01\n15 21085     -8.712000e+01 -6.958002e+01\n7 21086     -2.310300e+02 1.203400e+02\n10 21086     -2.416700e+02 1.720400e+02\n13 21086     2.302400e+02 -2.083900e+02\n15 21086     -2.039600e+02 1.717900e+02\n7 21087     4.734003e+01 -4.891600e+02\n9 21087     2.816700e+02 -4.324400e+02\n7 21088     3.501001e+01 1.050500e+02\n15 21088     1.242000e+02 1.141700e+02\n7 21089     -1.756900e+02 4.570001e+01\n15 21089     -1.545900e+02 5.534998e+01\n7 21090     -4.552500e+02 3.942800e+02\n11 21090     -7.406000e+01 -3.920700e+02\n8 21091     -2.382001e+01 4.379500e+02\n14 21091     5.113000e+02 4.900000e+01\n8 21092     3.710900e+02 4.191800e+02\n9 21092     1.652400e+02 5.540300e+02\n8 21093     3.334500e+02 4.171800e+02\n11 21093     6.427500e+02 -1.165400e+02\n8 21094     4.098400e+02 4.090400e+02\n9 21094     2.056801e+02 5.449300e+02\n8 21095     1.412000e+02 3.968100e+02\n11 21095     5.316100e+02 -4.713000e+01\n8 21096     -4.744500e+02 3.833400e+02\n11 21096     -1.821400e+02 -1.037100e+02\n8 21097     1.321300e+02 3.713300e+02\n13 21097     5.276600e+02 3.637900e+02\n14 21097     7.214100e+02 -1.512000e+01\n8 21098     -1.678500e+02 3.665400e+02\n11 21098     1.447700e+02 -1.036700e+02\n13 21098     1.934800e+02 3.304500e+02\n14 21098     3.194200e+02 -4.459998e+01\n8 21099     5.257800e+02 3.519600e+02\n9 21099     3.345500e+02 4.938300e+02\n8 21100     3.795100e+02 3.487400e+02\n9 21100     1.765100e+02 4.798900e+02\n8 21101     3.857200e+02 3.273300e+02\n9 21101     1.840000e+02 4.580900e+02\n8 21102     5.259399e+02 3.149700e+02\n9 21102     3.359301e+02 4.561200e+02\n8 21103     -3.709600e+02 3.145200e+02\n11 21103     -8.145001e+01 -1.608500e+02\n8 21104     5.753400e+02 3.055500e+02\n9 21104     3.856899e+02 4.485400e+02\n8 21105     4.549800e+02 2.943900e+02\n12 21105     4.846400e+02 6.054400e+02\n8 21106     -2.758002e+01 2.903900e+02\n9 21106     -2.668300e+02 3.940200e+02\n8 21107     -3.603500e+02 2.848500e+02\n12 21107     -5.986400e+02 5.943200e+02\n8 21108     -3.352200e+02 2.806700e+02\n12 21108     -5.624300e+02 5.926200e+02\n8 21109     -3.352200e+02 2.806700e+02\n12 21109     -5.624300e+02 5.926200e+02\n8 21110     -1.939800e+02 2.754400e+02\n11 21110     1.104100e+02 -1.914500e+02\n8 21111     4.949399e+02 2.736000e+02\n9 21111     3.061700e+02 4.115900e+02\n8 21112     4.990200e+02 2.737300e+02\n9 21112     3.105300e+02 4.121100e+02\n8 21113     -3.550800e+02 2.637900e+02\n12 21113     -5.880100e+02 5.662900e+02\n8 21114     5.048000e+02 2.586800e+02\n9 21114     3.170699e+02 3.969000e+02\n8 21115     2.783100e+02 2.573400e+02\n9 21115     7.200000e+01 3.772700e+02\n8 21116     1.563000e+01 2.567100e+02\n9 21116     -2.208400e+02 3.572000e+02\n8 21117     -4.072700e+02 2.516800e+02\n12 21117     -6.608200e+02 5.426700e+02\n8 21118     -4.000000e+02 2.476200e+02\n12 21118     -6.490100e+02 5.377600e+02\n8 21119     -6.349976e+00 2.458800e+02\n13 21119     3.574200e+02 2.228900e+02\n8 21120     5.984000e+02 2.460000e+02\n9 21120     4.117300e+02 3.891800e+02\n8 21121     -4.022700e+02 2.455500e+02\n11 21121     -1.173800e+02 -2.217000e+02\n12 21121     -6.520800e+02 5.358500e+02\n8 21122     3.008800e+02 2.457200e+02\n12 21122     3.000100e+02 5.691500e+02\n8 21123     -1.376700e+02 2.318500e+02\n9 21123     -3.775700e+02 3.282500e+02\n8 21124     3.136900e+02 2.264100e+02\n9 21124     1.120200e+02 3.460700e+02\n11 21124     6.218900e+02 -3.220400e+02\n12 21124     3.168500e+02 5.411800e+02\n8 21125     -5.252002e+01 2.262200e+02\n9 21125     -2.891200e+02 3.234800e+02\n8 21126     5.902500e+02 2.260300e+02\n10 21126     7.823400e+02 5.379300e+02\n8 21127     1.278003e+01 2.140000e+02\n12 21127     -5.945001e+01 5.525000e+02\n8 21128     -8.981000e+01 2.107800e+02\n9 21128     -3.270200e+02 3.056400e+02\n8 21129     4.319399e+02 2.049100e+02\n9 21129     2.433800e+02 3.362000e+02\n8 21130     5.900800e+02 2.051700e+02\n9 21130     4.047800e+02 3.475600e+02\n8 21131     3.633000e+02 2.044500e+02\n9 21131     1.649600e+02 3.275000e+02\n8 21132     3.221800e+02 2.007100e+02\n9 21132     1.214100e+02 3.199100e+02\n8 21133     3.339000e+02 1.985700e+02\n12 21133     3.427500e+02 5.024400e+02\n8 21134     5.359500e+02 1.983800e+02\n10 21134     7.024301e+02 5.176700e+02\n12 21134     5.890200e+02 4.649400e+02\n8 21135     -4.378998e+01 1.950600e+02\n9 21135     -2.774700e+02 2.891100e+02\n8 21136     3.064800e+02 1.912600e+02\n12 21136     3.072900e+02 4.948900e+02\n8 21137     1.677900e+02 1.888500e+02\n13 21137     5.489800e+02 1.764600e+02\n8 21138     1.677900e+02 1.888500e+02\n13 21138     5.489800e+02 1.764600e+02\n8 21139     5.019000e+02 1.793700e+02\n9 21139     3.167900e+02 3.148000e+02\n8 21140     -2.004900e+02 1.755700e+02\n9 21140     -4.405100e+02 2.648800e+02\n8 21141     5.133101e+02 1.747600e+02\n9 21141     3.285200e+02 3.113600e+02\n8 21142     3.941000e+02 1.629800e+02\n9 21142     1.989500e+02 2.858500e+02\n8 21143     -5.072600e+02 1.603800e+02\n12 21143     -7.850000e+02 4.086200e+02\n8 21144     2.794900e+02 1.595700e+02\n9 21144     7.720001e+01 2.735600e+02\n14 21144     8.665000e+02 -3.664600e+02\n8 21145     -5.041500e+02 1.548000e+02\n11 21145     -2.244300e+02 -2.998100e+02\n12 21145     -7.789400e+02 4.019100e+02\n8 21146     4.723800e+02 1.313300e+02\n9 21146     2.889100e+02 2.633300e+02\n8 21147     4.409900e+02 1.295200e+02\n12 21147     4.638800e+02 3.829200e+02\n8 21148     4.342100e+02 1.235100e+02\n9 21148     2.497600e+02 2.517100e+02\n10 21148     5.573700e+02 4.544900e+02\n15 21148     7.478800e+02 5.165200e+02\n8 21149     -3.385400e+02 1.208900e+02\n12 21149     -5.466300e+02 3.828800e+02\n8 21150     2.956500e+02 1.204800e+02\n13 21150     6.418000e+02 3.656000e+01\n8 21151     5.799200e+02 1.190400e+02\n9 21151     3.986801e+02 2.584700e+02\n8 21152     4.508300e+02 1.170600e+02\n9 21152     2.669500e+02 2.457800e+02\n8 21153     -5.812000e+01 1.167300e+02\n9 21153     -2.895900e+02 2.019100e+02\n13 21153     2.901500e+02 9.685999e+01\n8 21154     -3.170800e+02 1.141400e+02\n12 21154     -5.164300e+02 3.761000e+02\n8 21155     4.402900e+02 1.140700e+02\n15 21155     7.559700e+02 4.991300e+02\n8 21156     -3.561600e+02 1.096100e+02\n11 21156     -7.815002e+01 -3.452100e+02\n13 21156     -9.979980e+00 8.181000e+01\n14 21156     6.565002e+01 -3.343000e+02\n8 21157     5.595699e+02 1.094300e+02\n9 21157     3.786100e+02 2.470400e+02\n10 21157     7.088800e+02 3.845100e+02\n8 21158     4.448400e+02 1.091100e+02\n12 21158     4.685601e+02 3.560500e+02\n8 21159     -3.754400e+02 1.033100e+02\n12 21159     -5.958300e+02 3.545600e+02\n8 21160     5.161801e+02 1.000200e+02\n15 21160     8.587500e+02 4.437900e+02\n8 21161     -4.983700e+02 9.773001e+01\n11 21161     -2.229800e+02 -3.506400e+02\n8 21162     -4.142100e+02 9.704001e+01\n12 21162     -6.484900e+02 3.408400e+02\n8 21163     -1.339100e+02 9.629001e+01\n12 21163     -2.594300e+02 3.807400e+02\n8 21164     4.750000e+02 9.392001e+01\n9 21164     2.929700e+02 2.243300e+02\n8 21165     -5.391600e+02 9.297000e+01\n12 21165     -8.204300e+02 3.195100e+02\n8 21166     -5.110300e+02 9.182999e+01\n10 21166     -6.571500e+02 5.784800e+02\n8 21167     2.169000e+01 9.126999e+01\n9 21167     -2.005000e+02 1.798600e+02\n8 21168     -5.938800e+02 9.094000e+01\n10 21168     -7.726200e+02 5.725100e+02\n14 21168     -1.998600e+02 -3.464500e+02\n8 21169     -5.326300e+02 9.128000e+01\n10 21169     -6.878300e+02 5.760500e+02\n12 21169     -8.097800e+02 3.178000e+02\n8 21170     -5.280000e+02 8.963000e+01\n10 21170     -6.823300e+02 5.734000e+02\n12 21170     -8.038700e+02 3.153500e+02\n8 21171     5.740200e+02 8.845001e+01\n9 21171     3.940800e+02 2.265200e+02\n8 21172     -5.081100e+02 8.725000e+01\n10 21172     -6.528500e+02 5.725800e+02\n12 21172     -7.753400e+02 3.162000e+02\n8 21173     -5.796700e+02 6.325000e+01\n10 21173     -7.491500e+02 5.390600e+02\n15 21173     -7.752700e+02 5.816500e+02\n8 21174     -2.362300e+02 6.200000e+01\n9 21174     -4.713800e+02 1.374300e+02\n8 21175     -4.481900e+02 5.632999e+01\n12 21175     -6.891100e+02 2.846500e+02\n15 21175     -5.670800e+02 5.832200e+02\n8 21176     -4.819900e+02 5.582001e+01\n14 21176     -8.356000e+01 -3.878500e+02\n8 21177     5.304800e+02 5.164001e+01\n9 21177     3.518199e+02 1.858000e+02\n12 21177     5.765100e+02 2.709900e+02\n8 21178     5.546400e+02 5.173999e+01\n10 21178     6.876300e+02 3.096900e+02\n8 21179     5.290000e+02 4.707999e+01\n9 21179     3.503000e+02 1.811500e+02\n8 21180     6.000000e+01 3.442999e+01\n9 21180     -9.097998e+01 1.631300e+02\n8 21181     2.050000e+02 3.467999e+01\n10 21181     -7.179993e+00 2.132400e+02\n13 21181     4.372200e+02 -1.678600e+02\n15 21181     6.514001e+01 2.231900e+02\n8 21182     5.829900e+02 2.807999e+01\n9 21182     4.059500e+02 1.661700e+02\n8 21183     -4.775100e+02 2.525000e+01\n10 21183     -6.026200e+02 4.986100e+02\n12 21183     -7.248600e+02 2.423700e+02\n15 21183     -6.097800e+02 5.397900e+02\n8 21184     1.838900e+02 2.569000e+01\n15 21184     3.335999e+01 2.146200e+02\n8 21185     -1.281400e+02 2.034000e+01\n9 21185     -3.473500e+02 9.975000e+01\n8 21186     2.250500e+02 1.984000e+01\n12 21186     7.841998e+01 1.379400e+02\n8 21187     -5.977900e+02 1.556000e+01\n15 21187     -7.955100e+02 5.153400e+02\n8 21188     -4.545700e+02 1.528000e+01\n10 21188     -5.699200e+02 4.877800e+02\n8 21189     5.587100e+02 1.135999e+01\n10 21189     6.844399e+02 2.556500e+02\n8 21190     -4.812800e+02 2.999878e-02\n12 21190     -7.261400e+02 2.109500e+02\n8 21191     -1.601300e+02 -1.779999e+00\n12 21191     -3.045700e+02 2.338700e+02\n13 21191     1.653300e+02 -3.379999e+01\n14 21191     2.796899e+02 -4.899700e+02\n15 21191     -1.300800e+02 4.900900e+02\n8 21192     5.814100e+02 -1.540009e+00\n12 21192     6.405699e+02 1.956800e+02\n8 21193     -5.524200e+02 -5.140015e+00\n10 21193     -7.020300e+02 4.594000e+02\n12 21193     -8.218900e+02 1.945600e+02\n15 21193     -7.224600e+02 4.920800e+02\n8 21194     -5.899500e+02 -1.588000e+01\n10 21194     -7.497700e+02 4.467800e+02\n11 21194     -3.177200e+02 -4.420100e+02\n15 21194     -7.755300e+02 4.758200e+02\n8 21195     5.577400e+02 -2.832999e+01\n9 21195     3.832800e+02 1.053700e+02\n8 21196     -7.365002e+01 -3.623999e+01\n9 21196     -2.382400e+02 7.210999e+01\n8 21197     5.923800e+02 -3.806000e+01\n10 21197     7.131100e+02 1.784600e+02\n8 21198     -6.031000e+01 -4.012000e+01\n9 21198     -2.225700e+02 6.982001e+01\n8 21199     5.520100e+02 -4.235999e+01\n10 21199     6.634900e+02 1.903200e+02\n8 21200     -5.607300e+02 -4.932001e+01\n13 21200     -2.046600e+02 -5.609003e+01\n14 21200     -1.841300e+02 -4.961500e+02\n8 21201     -7.651001e+01 -5.079001e+01\n9 21201     -2.367900e+02 5.878003e+01\n8 21202     -8.425000e+01 -5.201999e+01\n13 21202     1.810800e+02 -1.745600e+02\n8 21203     1.175100e+02 -6.889001e+01\n12 21203     -6.190997e+01 2.269000e+01\n8 21204     1.360800e+02 -7.250000e+01\n9 21204     3.400024e+00 6.312000e+01\n8 21205     -1.350000e+02 -7.603003e+01\n9 21205     -3.329000e+02 4.369995e+00\n8 21206     3.492200e+02 -8.483002e+01\n12 21206     2.443900e+02 3.960022e+00\n8 21207     1.411400e+02 -8.526001e+01\n15 21207     -5.288000e+01 6.084998e+01\n8 21208     2.521500e+02 -9.203003e+01\n10 21208     1.547998e+01 3.741998e+01\n8 21209     2.187400e+02 -1.251200e+02\n12 21209     6.069000e+01 -5.928003e+01\n8 21210     1.323600e+02 -1.422300e+02\n9 21210     8.409973e+00 -5.880005e+00\n8 21211     -3.469800e+02 -1.645800e+02\n10 21211     -4.981200e+02 2.109300e+02\n13 21211     -3.856000e+01 -1.990700e+02\n8 21212     1.679300e+02 -1.821700e+02\n9 21212     5.002002e+01 -4.139001e+01\n8 21213     1.580400e+02 -1.866300e+02\n12 21213     -2.390002e+01 -1.417300e+02\n8 21214     1.962500e+02 -2.143600e+02\n15 21214     -3.865997e+01 -1.521600e+02\n8 21215     3.359300e+02 -2.190300e+02\n15 21215     1.631300e+02 -1.931300e+02\n8 21216     -2.968200e+02 -2.259800e+02\n10 21216     -4.754200e+02 1.076100e+02\n15 21216     -4.658000e+02 9.089999e+01\n8 21217     2.226900e+02 -2.355800e+02\n9 21217     1.096500e+02 -9.103998e+01\n8 21218     -7.250000e+00 -2.513100e+02\n10 21218     -2.692400e+02 -5.841998e+01\n12 21218     -2.061000e+02 -1.938600e+02\n15 21218     -2.340700e+02 -9.881000e+01\n8 21219     -1.259003e+01 -2.533100e+02\n12 21219     -2.129000e+02 -1.954400e+02\n13 21219     2.075800e+02 -3.848800e+02\n8 21220     2.585200e+02 -2.534300e+02\n9 21220     1.455300e+02 -1.068700e+02\n12 21220     1.070600e+02 -2.234500e+02\n8 21221     2.318900e+02 -2.539900e+02\n9 21221     1.191000e+02 -1.099700e+02\n8 21222     7.352002e+01 -2.709900e+02\n9 21222     -4.415002e+01 -1.442900e+02\n8 21223     -3.271400e+02 -2.721800e+02\n9 21223     -4.987600e+02 -2.056600e+02\n8 21224     2.548800e+02 -2.746900e+02\n9 21224     1.429000e+02 -1.305300e+02\n8 21225     -2.268100e+02 -2.781900e+02\n9 21225     -3.859900e+02 -2.010900e+02\n13 21225     4.046997e+01 -3.414000e+02\n8 21226     7.135999e+01 -3.028500e+02\n9 21226     -4.489001e+01 -1.789900e+02\n8 21227     1.292400e+02 -3.099600e+02\n9 21227     1.657001e+01 -1.786400e+02\n8 21228     9.315002e+01 -3.106900e+02\n9 21228     -2.090997e+01 -1.834800e+02\n8 21229     -2.657400e+02 -3.159800e+02\n13 21229     -3.200073e-01 -3.740400e+02\n8 21230     -2.329900e+02 -3.162900e+02\n9 21230     -3.845900e+02 -2.384100e+02\n8 21231     -3.235100e+02 -3.880600e+02\n9 21231     -4.672200e+02 -3.182200e+02\n8 21232     -2.238300e+02 -3.970100e+02\n13 21232     1.706000e+01 -4.637800e+02\n8 21233     -1.998000e+02 -4.038500e+02\n9 21233     -3.271700e+02 -3.190000e+02\n8 21234     -1.655000e+02 -4.422300e+02\n13 21234     5.558002e+01 -5.201700e+02\n15 21234     -4.404600e+02 -2.912600e+02\n8 21235     2.764500e+02 4.122100e+02\n9 21235     6.359003e+01 5.424500e+02\n8 21236     -5.591300e+02 3.833600e+02\n13 21236     -1.830900e+02 3.160400e+02\n14 21236     -1.264300e+02 -4.463000e+01\n8 21237     9.217999e+01 3.811300e+02\n14 21237     6.650900e+02 -6.770020e+00\n8 21238     1.564400e+02 3.736300e+02\n14 21238     7.574000e+02 -9.479980e+00\n8 21239     1.521100e+02 3.731800e+02\n11 21239     5.467400e+02 -6.951001e+01\n8 21240     -1.046300e+02 3.579500e+02\n11 21240     2.101400e+02 -1.469600e+02\n8 21241     1.365100e+02 3.358300e+02\n11 21241     5.250400e+02 -1.113600e+02\n13 21241     5.296000e+02 3.265100e+02\n14 21241     7.255900e+02 -5.928998e+01\n8 21242     2.565997e+01 3.230300e+02\n9 21242     -2.133800e+02 4.307000e+02\n8 21243     5.170300e+02 3.159100e+02\n9 21243     3.268199e+02 4.563200e+02\n8 21244     -1.047000e+02 2.990200e+02\n9 21244     -3.469900e+02 4.038500e+02\n8 21245     5.978900e+02 2.751100e+02\n9 21245     4.102600e+02 4.191100e+02\n8 21246     -5.175000e+01 2.725700e+02\n9 21246     -2.905400e+02 3.741900e+02\n8 21247     -4.184700e+02 2.715200e+02\n11 21247     -1.326900e+02 -1.999300e+02\n12 21247     -6.789400e+02 5.681300e+02\n8 21248     -5.501100e+02 2.697000e+02\n11 21248     -2.613700e+02 -2.026600e+02\n14 21248     -1.315200e+02 -1.622000e+02\n8 21249     -6.869000e+01 2.647500e+02\n12 21249     -1.790500e+02 6.109900e+02\n8 21250     -2.540002e+01 2.575600e+02\n12 21250     -1.164100e+02 6.065200e+02\n8 21251     1.208500e+02 2.568200e+02\n11 21251     5.023400e+02 -1.941900e+02\n8 21252     4.957400e+02 2.515600e+02\n12 21252     5.388101e+02 5.424200e+02\n8 21253     -4.100000e+02 2.491300e+02\n11 21253     -1.251100e+02 -2.188100e+02\n12 21253     -6.631200e+02 5.397300e+02\n8 21254     -2.859985e+00 2.438700e+02\n9 21254     -2.388400e+02 3.438600e+02\n13 21254     3.614700e+02 2.228100e+02\n8 21255     4.805500e+02 2.330400e+02\n9 21255     2.931801e+02 3.694000e+02\n8 21256     -1.890015e+00 2.100900e+02\n12 21256     -8.065997e+01 5.452300e+02\n8 21257     -7.369995e+00 2.085000e+02\n9 21257     -2.409700e+02 3.045600e+02\n12 21257     -8.831000e+01 5.428500e+02\n8 21258     -3.795001e+01 2.076400e+02\n9 21258     -2.714800e+02 3.038700e+02\n8 21259     -4.864100e+02 2.056100e+02\n12 21259     -7.643000e+02 4.708300e+02\n8 21260     -2.500500e+02 1.946500e+02\n12 21260     -4.312700e+02 4.912900e+02\n8 21261     5.575900e+02 1.744200e+02\n9 21261     3.734800e+02 3.137100e+02\n8 21262     -3.392100e+02 1.661900e+02\n12 21262     -5.525900e+02 4.409500e+02\n8 21263     -2.421400e+02 1.636800e+02\n12 21263     -4.167800e+02 4.514100e+02\n8 21264     4.974301e+02 1.494600e+02\n9 21264     3.138800e+02 2.839100e+02\n12 21264     5.371500e+02 4.038700e+02\n15 21264     8.477300e+02 5.319300e+02\n8 21265     4.188100e+02 1.461900e+02\n9 21265     2.323101e+02 2.743000e+02\n8 21266     5.729000e+02 1.344500e+02\n12 21266     6.348400e+02 3.753700e+02\n8 21267     5.017700e+02 1.295800e+02\n12 21267     5.416899e+02 3.764300e+02\n8 21268     4.858400e+02 1.274500e+02\n9 21268     3.026801e+02 2.601600e+02\n8 21269     4.044800e+02 1.232700e+02\n12 21269     4.170100e+02 3.776900e+02\n8 21270     -4.589300e+02 1.179100e+02\n11 21270     -1.829500e+02 -3.340100e+02\n12 21270     -7.134000e+02 3.613300e+02\n8 21271     -4.807001e+01 1.179800e+02\n9 21271     -2.798500e+02 2.047600e+02\n8 21272     5.598500e+02 1.129300e+02\n9 21272     3.793700e+02 2.506200e+02\n12 21272     6.169100e+02 3.482300e+02\n8 21273     -1.698700e+02 1.048100e+02\n9 21273     -4.032600e+02 1.871600e+02\n8 21274     -1.178800e+02 8.332999e+01\n11 21274     1.920500e+02 -3.742400e+02\n8 21275     -4.823200e+02 8.300000e+01\n11 21275     -2.075800e+02 -3.637500e+02\n8 21276     -5.782900e+02 6.741000e+01\n11 21276     -3.017100e+02 -3.725700e+02\n8 21277     -5.799400e+02 5.469000e+01\n11 21277     -3.049500e+02 -3.838600e+02\n8 21278     -4.756500e+02 4.310001e+01\n11 21278     -2.026100e+02 -3.984500e+02\n8 21279     5.656100e+02 2.704001e+01\n9 21279     3.885601e+02 1.632100e+02\n8 21280     1.775700e+02 1.185001e+01\n12 21280     1.585999e+01 1.280700e+02\n8 21281     -7.789978e+00 -4.820007e+00\n9 21281     -1.701900e+02 1.100400e+02\n8 21282     -6.209003e+01 -1.498999e+01\n12 21282     -2.452900e+02 1.434300e+02\n8 21283     -1.921700e+02 -2.082001e+01\n13 21283     1.300900e+02 -5.269000e+01\n14 21283     2.350900e+02 -5.126700e+02\n8 21284     -4.256700e+02 -2.389999e+01\n10 21284     -5.369500e+02 4.358000e+02\n15 21284     -5.125100e+02 4.820800e+02\n8 21285     -5.908600e+02 -3.453000e+01\n10 21285     -7.482200e+02 4.247600e+02\n13 21285     -2.298100e+02 -4.356000e+01\n8 21286     8.316998e+01 -3.989001e+01\n12 21286     -1.007800e+02 6.566998e+01\n8 21287     -2.632200e+02 -4.700000e+01\n10 21287     -3.379900e+02 3.876800e+02\n15 21287     -3.050300e+02 4.172100e+02\n8 21288     -1.233000e+02 -4.923999e+01\n14 21288     3.050900e+02 -5.735200e+02\n8 21289     -7.658002e+01 -5.510999e+01\n9 21289     -2.360600e+02 5.464001e+01\n8 21290     3.567600e+02 -5.557999e+01\n12 21290     2.574399e+02 4.315002e+01\n8 21291     -1.219100e+02 -5.607999e+01\n9 21291     -3.235500e+02 2.482001e+01\n8 21292     4.260000e+02 -7.687000e+01\n12 21292     3.568800e+02 2.317999e+01\n8 21293     -1.622500e+02 -8.059998e+01\n9 21293     -3.622600e+02 -1.809998e+00\n13 21293     1.430400e+02 -1.277600e+02\n8 21294     2.232000e+02 -9.194000e+01\n13 21294     4.324900e+02 -2.936300e+02\n8 21295     5.270100e+02 -9.450000e+01\n12 21295     5.677500e+02 8.446002e+01\n8 21296     -3.034900e+02 -1.004500e+02\n10 21296     -4.150600e+02 3.066200e+02\n8 21297     2.280200e+02 -1.010100e+02\n9 21297     9.944000e+01 4.141998e+01\n8 21298     5.634600e+02 -1.036700e+02\n9 21298     3.929399e+02 2.929999e+01\n10 21298     6.632800e+02 1.118100e+02\n8 21299     9.162000e+01 -1.463200e+02\n13 21299     3.039000e+02 -3.205400e+02\n8 21300     -1.696500e+02 -1.592800e+02\n13 21300     1.175400e+02 -2.179300e+02\n8 21301     -1.948100e+02 -1.891200e+02\n10 21301     -3.451700e+02 1.452700e+02\n8 21302     1.244800e+02 -2.171800e+02\n9 21302     7.859985e+00 -8.090997e+01\n8 21303     1.676001e+01 -2.327900e+02\n9 21303     -1.073100e+02 -1.121400e+02\n8 21304     -3.172100e+02 -2.617700e+02\n9 21304     -4.902900e+02 -1.946400e+02\n8 21305     4.835999e+01 -2.616400e+02\n12 21305     -1.508400e+02 -2.180100e+02\n8 21306     -2.183100e+02 -2.650100e+02\n9 21306     -3.809100e+02 -1.878500e+02\n8 21307     -3.274000e+02 -2.758300e+02\n9 21307     -4.990200e+02 -2.094100e+02\n13 21307     -4.422998e+01 -3.220400e+02\n8 21308     -2.307900e+02 -2.776000e+02\n13 21308     3.706000e+01 -3.393200e+02\n8 21309     -2.469971e+00 -2.815900e+02\n13 21309     2.138500e+02 -4.102000e+02\n8 21310     8.409973e+00 -2.833500e+02\n9 21310     -1.148900e+02 -1.675400e+02\n8 21311     3.163400e+02 -2.873600e+02\n9 21311     2.045300e+02 -1.355000e+02\n8 21312     4.992800e+02 3.898700e+02\n9 21312     3.063600e+02 5.323700e+02\n8 21313     4.945500e+02 3.786200e+02\n9 21313     3.018000e+02 5.201400e+02\n8 21314     2.571002e+01 3.102900e+02\n9 21314     -2.130500e+02 4.169600e+02\n11 21314     3.796700e+02 -1.449000e+02\n8 21315     4.798700e+02 2.996600e+02\n9 21315     2.896801e+02 4.376200e+02\n8 21316     -5.732500e+02 2.740500e+02\n11 21316     -2.822900e+02 -1.990700e+02\n8 21317     6.969971e+00 2.690800e+02\n11 21317     3.533400e+02 -1.882500e+02\n8 21318     7.109985e+00 2.621200e+02\n9 21318     -2.295700e+02 3.631100e+02\n8 21319     7.109985e+00 2.621200e+02\n9 21319     -2.295700e+02 3.631100e+02\n8 21320     5.827600e+02 2.487100e+02\n10 21320     7.817700e+02 5.731700e+02\n8 21321     -2.989990e+00 2.329500e+02\n11 21321     3.394600e+02 -2.252000e+02\n12 21321     -8.257001e+01 5.776000e+02\n13 21321     3.602000e+02 2.117300e+02\n8 21322     2.922998e+01 2.102100e+02\n9 21322     -2.038200e+02 3.065100e+02\n8 21323     1.647300e+02 1.945800e+02\n9 21323     -6.631000e+01 2.925100e+02\n13 21323     5.462600e+02 1.827900e+02\n14 21323     7.540400e+02 -2.328900e+02\n8 21324     4.710699e+02 1.872900e+02\n12 21324     5.036200e+02 4.575700e+02\n8 21325     4.199900e+02 1.817300e+02\n12 21325     4.376801e+02 4.549700e+02\n8 21326     -5.971997e+01 1.817100e+02\n12 21326     -1.611000e+02 5.014200e+02\n8 21327     -5.975000e+01 1.751700e+02\n13 21327     2.941300e+02 1.524600e+02\n14 21327     4.412500e+02 -2.610600e+02\n8 21328     4.496700e+02 1.718900e+02\n9 21328     2.635400e+02 3.029600e+02\n8 21329     4.603400e+02 1.685500e+02\n9 21329     2.744500e+02 3.004700e+02\n8 21330     4.265002e+01 1.674700e+02\n11 21330     3.959200e+02 -2.899300e+02\n8 21331     5.709100e+02 1.420600e+02\n9 21331     3.891300e+02 2.808500e+02\n8 21332     -3.928500e+02 1.353800e+02\n11 21332     -1.132800e+02 -3.201200e+02\n8 21333     -7.153003e+01 1.178900e+02\n9 21333     -3.032100e+02 2.032900e+02\n8 21334     4.888000e+02 1.130700e+02\n9 21334     3.080000e+02 2.462800e+02\n12 21334     5.272300e+02 3.569400e+02\n8 21335     -4.774900e+02 1.122100e+02\n12 21335     -7.368400e+02 3.529300e+02\n8 21336     -4.735200e+02 1.076300e+02\n11 21336     -1.976400e+02 -3.424800e+02\n8 21337     5.140400e+02 9.532999e+01\n12 21337     5.568500e+02 3.297900e+02\n8 21338     4.580601e+02 9.510001e+01\n12 21338     4.852800e+02 3.359400e+02\n8 21339     3.478800e+02 9.164001e+01\n12 21339     3.596899e+02 3.591100e+02\n8 21340     -4.831200e+02 8.841000e+01\n11 21340     -2.090300e+02 -3.589200e+02\n8 21341     -5.374600e+02 8.748999e+01\n10 21341     -6.946800e+02 5.705200e+02\n11 21341     -2.610600e+02 -3.573000e+02\n8 21342     -3.033500e+02 5.253000e+01\n12 21342     -4.904400e+02 3.008100e+02\n8 21343     1.274200e+02 3.617999e+01\n13 21343     3.665400e+02 -1.510700e+02\n8 21344     1.274200e+02 3.617999e+01\n13 21344     3.665400e+02 -1.510700e+02\n8 21345     5.774100e+02 3.050000e+01\n12 21345     6.358700e+02 2.376700e+02\n8 21346     -1.080100e+02 -5.670013e+00\n10 21346     -1.274200e+02 4.313900e+02\n11 21346     1.453700e+02 -4.957800e+02\n15 21346     -6.006000e+01 4.721400e+02\n8 21347     2.499600e+02 -9.660004e+00\n12 21347     1.093400e+02 9.596997e+01\n13 21347     4.715000e+02 -2.195400e+02\n8 21348     -8.371002e+01 -4.384000e+01\n9 21348     -2.477600e+02 6.494000e+01\n8 21349     -1.318500e+02 -7.021002e+01\n9 21349     -3.312600e+02 1.094000e+01\n8 21350     -2.256000e+01 -1.115300e+02\n12 21350     -2.260000e+02 -1.746002e+01\n8 21351     2.922800e+02 -1.997500e+02\n9 21351     1.774100e+02 -4.815002e+01\n8 21352     -2.547200e+02 -2.634300e+02\n9 21352     -4.207600e+02 -1.899200e+02\n13 21352     2.016998e+01 -3.197500e+02\n8 21353     -2.881100e+02 -2.793900e+02\n13 21353     -1.135999e+01 -3.324200e+02\n8 21354     4.438000e+01 -3.150000e+02\n9 21354     -7.144000e+01 -1.943800e+02\n8 21355     -4.167000e+02 -3.306800e+02\n13 21355     -1.281500e+02 -3.653900e+02\n8 21356     -1.834800e+02 4.104600e+02\n11 21356     1.287700e+02 -6.322998e+01\n8 21357     -1.834800e+02 4.104600e+02\n11 21357     1.287700e+02 -6.322998e+01\n8 21358     2.639200e+02 2.579900e+02\n9 21358     5.681000e+01 3.763200e+02\n8 21359     5.596002e+01 2.416500e+02\n9 21359     -1.796600e+02 3.407700e+02\n8 21360     4.697998e+01 2.394000e+02\n9 21360     -1.879900e+02 3.382500e+02\n8 21361     -4.392999e+01 2.186300e+02\n9 21361     -2.795600e+02 3.162100e+02\n8 21362     4.033002e+01 2.184600e+02\n12 21362     -2.015002e+01 5.636000e+02\n8 21363     -1.582000e+02 1.735300e+02\n9 21363     -3.960300e+02 2.632000e+02\n11 21363     1.479600e+02 -2.871000e+02\n8 21364     -6.907001e+01 1.715200e+02\n12 21364     -1.739000e+02 4.867400e+02\n8 21365     5.097500e+02 1.713400e+02\n12 21365     5.536200e+02 4.317900e+02\n8 21366     -1.627900e+02 1.388600e+02\n9 21366     -3.990100e+02 2.243600e+02\n8 21367     -2.785800e+02 1.243000e+02\n12 21367     -4.632800e+02 3.955400e+02\n8 21368     4.238199e+02 8.254001e+01\n15 21368     7.240699e+02 4.571300e+02\n8 21369     -5.815800e+02 5.959000e+01\n11 21369     -3.041500e+02 -3.791600e+02\n8 21370     -4.574700e+02 9.209991e+00\n12 21370     -6.954800e+02 2.253600e+02\n8 21371     -1.078700e+02 -1.145999e+01\n9 21371     -3.188400e+02 6.977002e+01\n13 21371     2.129800e+02 -5.082001e+01\n14 21371     3.396000e+02 -5.145400e+02\n8 21372     4.934200e+02 -3.250000e+01\n12 21372     5.265601e+02 1.680900e+02\n8 21373     5.594500e+02 -4.385001e+01\n12 21373     6.105300e+02 1.455800e+02\n8 21374     5.594500e+02 -4.385001e+01\n12 21374     6.105300e+02 1.455800e+02\n8 21375     1.859800e+02 -7.785999e+01\n12 21375     2.284003e+01 8.039978e+00\n8 21376     5.459800e+02 -9.329999e+01\n12 21376     5.910300e+02 8.407001e+01\n8 21377     5.607600e+02 -9.884998e+01\n12 21377     6.107200e+02 7.531000e+01\n8 21378     4.061600e+02 -2.527000e+02\n12 21378     3.106700e+02 -2.134600e+02\n8 21379     -3.312300e+02 -3.196900e+02\n13 21379     -5.628998e+01 -3.681200e+02\n15 21379     -5.622700e+02 -5.828998e+01\n8 21380     -3.192000e+02 -3.279500e+02\n9 21380     -4.775200e+02 -2.607900e+02\n8 21381     -3.192000e+02 -3.279500e+02\n9 21381     -4.775200e+02 -2.607900e+02\n8 21382     -2.396700e+02 -3.282600e+02\n9 21382     -3.893100e+02 -2.511500e+02\n8 21383     -3.224700e+02 3.948800e+02\n14 21383     1.346500e+02 -2.235999e+01\n8 21384     -8.790002e+01 1.836300e+02\n12 21384     -1.939900e+02 5.032900e+02\n8 21385     -3.933800e+02 8.569000e+01\n12 21385     -6.185800e+02 3.306700e+02\n8 21386     4.937200e+02 4.844000e+01\n9 21386     3.148199e+02 1.796100e+02\n8 21387     3.658000e+02 -5.539999e+01\n12 21387     2.711500e+02 4.522998e+01\n8 21388     -7.220001e+01 -1.969700e+02\n9 21388     -2.162300e+02 -9.271002e+01\n8 21389     1.010200e+02 -3.158200e+02\n9 21389     -1.187000e+01 -1.886500e+02\n8 21390     -2.442500e+02 -3.511900e+02\n9 21390     -3.915000e+02 -2.736900e+02\n13 21390     8.979980e+00 -4.139400e+02\n8 21391     5.016200e+02 1.747200e+02\n12 21391     5.424399e+02 4.395400e+02\n8 21392     -9.667001e+01 1.653400e+02\n12 21392     -2.121100e+02 4.759600e+02\n8 21393     1.830700e+02 -7.269989e+00\n12 21393     2.060999e+01 1.000200e+02\n8 21394     2.733400e+02 -1.745001e+01\n12 21394     1.406600e+02 8.694000e+01\n8 21395     2.059998e+01 -1.472500e+02\n12 21395     -1.861900e+02 -7.663000e+01\n8 21396     8.481000e+01 -1.676900e+02\n12 21396     -1.103300e+02 -1.109100e+02\n8 21397     4.588300e+02 -1.841300e+02\n9 21397     3.264500e+02 -3.184998e+01\n8 21398     3.625700e+02 -3.015400e+02\n12 21398     2.509100e+02 -2.716400e+02\n8 21399     2.208900e+02 -3.080900e+02\n13 21399     4.027900e+02 -4.894301e+02\n8 21400     4.294800e+02 3.110700e+02\n9 21400     2.369700e+02 4.465800e+02\n8 21401     2.079999e+01 2.215800e+02\n12 21401     -5.028998e+01 5.645500e+02\n8 21402     -3.715800e+02 1.162700e+02\n12 21402     -5.913100e+02 3.716500e+02\n8 21403     -1.386700e+02 3.079987e+00\n9 21403     -3.556000e+02 8.191000e+01\n13 21403     1.879900e+02 -2.996997e+01\n14 21403     3.080900e+02 -4.865300e+02\n8 21404     5.736899e+02 -3.579001e+01\n12 21404     6.281400e+02 1.538600e+02\n8 21405     -3.642300e+02 2.854900e+02\n12 21405     -6.042300e+02 5.945100e+02\n8 21406     2.272900e+02 2.367700e+02\n9 21406     9.890015e+00 3.426500e+02\n8 21407     -1.529999e+01 3.078800e+02\n13 21407     3.552400e+02 2.851900e+02\n8 21408     1.457100e+02 3.018200e+02\n9 21408     -8.971002e+01 4.071000e+02\n13 21408     5.372100e+02 2.962500e+02\n14 21408     7.368300e+02 -9.250000e+01\n8 21409     5.753800e+02 1.363800e+02\n9 21409     3.947200e+02 2.758600e+02\n8 21410     -7.429993e+00 9.748999e+01\n13 21410     3.361200e+02 7.759998e+01\n14 21410     4.940000e+02 -3.559800e+02\n9 21411     -2.197100e+02 4.373300e+02\n14 21411     5.607200e+02 -7.502002e+01\n9 21412     -6.903003e+01 4.143000e+02\n14 21412     7.667700e+02 -9.134003e+01\n9 21413     -2.834900e+02 3.984800e+02\n11 21413     2.910100e+02 -1.661500e+02\n14 21413     4.724200e+02 -1.206500e+02\n9 21414     -2.831300e+02 3.739000e+02\n11 21414     2.893500e+02 -1.882800e+02\n14 21414     4.695900e+02 -1.464800e+02\n9 21415     -1.691000e+02 3.740300e+02\n11 21415     4.331400e+02 -1.821600e+02\n9 21416     -1.509100e+02 3.605300e+02\n11 21416     4.530500e+02 -1.946400e+02\n9 21417     -3.600300e+02 3.573500e+02\n11 21417     1.972200e+02 -2.057500e+02\n9 21418     -1.505100e+02 3.539500e+02\n13 21418     4.592900e+02 2.369600e+02\n9 21419     3.530601e+02 3.396200e+02\n12 21419     5.911000e+02 4.698900e+02\n9 21420     -1.673000e+02 3.367800e+02\n11 21420     4.298199e+02 -2.176400e+02\n9 21421     -1.334300e+02 2.965000e+02\n12 21421     6.496997e+01 5.479500e+02\n9 21422     7.939001e+01 2.827500e+02\n13 21422     6.335900e+02 8.745999e+01\n9 21423     8.228003e+01 2.823600e+02\n12 21423     2.791600e+02 4.653500e+02\n9 21424     -3.239500e+02 2.695800e+02\n11 21424     1.274000e+02 -3.301000e+02\n9 21425     -3.384600e+02 2.691000e+02\n11 21425     2.034800e+02 -2.864800e+02\n9 21426     4.665601e+02 2.395100e+02\n12 21426     7.298800e+02 3.152700e+02\n9 21427     4.657100e+02 2.335800e+02\n10 21427     8.138700e+02 3.215400e+02\n12 21427     7.273900e+02 3.084900e+02\n9 21428     4.703400e+02 2.331600e+02\n10 21428     8.200900e+02 3.191200e+02\n9 21429     4.568700e+02 2.158000e+02\n12 21429     7.138600e+02 2.873700e+02\n9 21430     4.953600e+02 2.125100e+02\n12 21430     7.646500e+02 2.750100e+02\n9 21431     2.541100e+02 1.979000e+02\n10 21431     5.489600e+02 3.847600e+02\n9 21432     2.477000e+02 1.936700e+02\n15 21432     7.291700e+02 4.311100e+02\n9 21433     2.854301e+02 1.776300e+02\n10 21433     5.798000e+02 3.435200e+02\n15 21433     7.771700e+02 3.839500e+02\n9 21434     4.510100e+02 1.774900e+02\n12 21434     7.017600e+02 2.400600e+02\n9 21435     2.697300e+02 1.701000e+02\n15 21435     7.530601e+02 3.830700e+02\n9 21436     4.528400e+02 1.432100e+02\n12 21436     7.014500e+02 1.945700e+02\n9 21437     4.532300e+02 1.377500e+02\n10 21437     7.664000e+02 2.070400e+02\n9 21438     4.526000e+02 1.234800e+02\n12 21438     6.983800e+02 1.702000e+02\n9 21439     8.103998e+01 1.091500e+02\n10 21439     -1.889001e+01 1.173800e+02\n9 21440     8.103998e+01 1.091500e+02\n10 21440     -1.889001e+01 1.173800e+02\n9 21441     4.477000e+02 1.086600e+02\n10 21441     7.503500e+02 1.740200e+02\n9 21442     4.500000e+02 1.070100e+02\n10 21442     7.519700e+02 1.706300e+02\n9 21443     4.371801e+02 9.801001e+01\n10 21443     7.337800e+02 1.671100e+02\n9 21444     4.445400e+02 8.444000e+01\n10 21444     7.390200e+02 1.468600e+02\n9 21445     -2.886800e+02 4.577002e+01\n10 21445     -1.242700e+02 3.716200e+02\n14 21445     3.546801e+02 -5.624500e+02\n9 21446     -2.991400e+02 2.685999e+01\n13 21446     2.083700e+02 -1.065600e+02\n9 21447     4.965500e+02 2.581000e+01\n12 21447     7.442600e+02 3.878998e+01\n9 21448     4.080400e+02 -1.383002e+01\n10 21448     6.357000e+02 3.526001e+01\n15 21448     8.475400e+02 1.694000e+01\n9 21449     -4.419500e+02 -3.053998e+01\n13 21449     6.906000e+01 -1.431900e+02\n9 21450     5.408600e+02 -8.859998e+01\n12 21450     7.502400e+02 -1.473400e+02\n9 21451     1.300600e+02 -1.254700e+02\n12 21451     8.859998e+01 -2.402500e+02\n9 21452     5.841899e+02 -1.433000e+02\n12 21452     7.752200e+02 -2.483800e+02\n9 21453     -1.384998e+01 -4.291500e+02\n10 21453     -2.766800e+02 -4.233900e+02\n9 21454     2.412600e+02 4.310300e+02\n12 21454     4.573600e+02 6.090600e+02\n9 21455     -2.259900e+02 3.715300e+02\n13 21455     3.784399e+02 2.495600e+02\n9 21456     -7.359998e+01 3.519800e+02\n13 21456     5.481500e+02 2.394000e+02\n14 21456     7.531200e+02 -1.638700e+02\n9 21457     -5.164001e+01 2.772300e+02\n13 21457     5.582200e+02 1.666700e+02\n14 21457     7.701300e+02 -2.527100e+02\n9 21458     3.515900e+02 2.671700e+02\n12 21458     5.835300e+02 3.746700e+02\n9 21459     1.090100e+02 2.604600e+02\n10 21459     4.542000e+02 5.665000e+02\n13 21459     6.578000e+02 5.819000e+01\n9 21460     2.361600e+02 2.574300e+02\n12 21460     4.400000e+02 3.861500e+02\n9 21461     2.108700e+02 2.102700e+02\n15 21461     6.850200e+02 4.756200e+02\n9 21462     5.286899e+02 2.078500e+02\n12 21462     8.089800e+02 2.617500e+02\n9 21463     2.540400e+02 2.069800e+02\n10 21463     5.517200e+02 3.959400e+02\n12 21463     4.578600e+02 3.176500e+02\n9 21464     -1.448100e+02 1.950900e+02\n13 21464     4.257400e+02 7.321002e+01\n9 21465     -1.448100e+02 1.950900e+02\n13 21465     4.257400e+02 7.321002e+01\n14 21465     6.073300e+02 -3.655700e+02\n9 21466     4.229600e+02 1.572400e+02\n12 21466     6.631400e+02 2.195300e+02\n9 21467     4.369301e+02 1.463100e+02\n12 21467     6.800000e+02 2.027200e+02\n9 21468     4.816100e+02 1.256200e+02\n12 21468     7.358900e+02 1.669200e+02\n9 21469     -4.987500e+02 1.160400e+02\n11 21469     2.084998e+01 -4.076400e+02\n9 21470     4.517400e+02 1.150700e+02\n12 21470     6.964200e+02 1.604100e+02\n9 21471     4.629900e+02 4.028998e+01\n12 21471     7.020500e+02 6.554999e+01\n9 21472     4.895400e+02 2.376001e+01\n12 21472     7.335900e+02 3.901001e+01\n9 21473     4.747900e+02 8.030029e+00\n12 21473     7.134700e+02 2.278998e+01\n9 21474     4.464600e+02 5.989990e+00\n12 21474     6.776000e+02 2.744000e+01\n9 21475     5.272900e+02 1.760010e+00\n12 21475     7.805900e+02 2.030029e+00\n9 21476     -3.769300e+02 -1.782400e+02\n13 21476     5.701001e+01 -3.188600e+02\n9 21477     2.273500e+02 -1.901900e+02\n15 21477     1.925900e+02 -3.183400e+02\n9 21478     -4.610000e+02 -2.313100e+02\n13 21478     -2.541998e+01 -3.533000e+02\n15 21478     -5.142700e+02 -3.601001e+01\n9 21479     4.556400e+02 -3.455200e+02\n12 21479     4.753000e+02 -5.550699e+02\n9 21480     -2.424400e+02 -3.755600e+02\n15 21480     -4.209700e+02 -3.427300e+02\n9 21481     -3.012600e+02 4.362800e+02\n11 21481     2.730000e+02 -1.331900e+02\n9 21482     -2.182900e+02 4.046200e+02\n14 21482     5.583900e+02 -1.105600e+02\n9 21483     -2.623200e+02 3.799500e+02\n11 21483     3.147100e+02 -1.819000e+02\n9 21484     -1.675400e+02 3.783200e+02\n11 21484     4.350000e+02 -1.788900e+02\n9 21485     2.781600e+02 3.448800e+02\n10 21485     6.158300e+02 5.649000e+02\n9 21486     3.467900e+02 3.387700e+02\n10 21486     6.979700e+02 5.223200e+02\n9 21487     -4.385999e+01 3.227300e+02\n13 21487     5.786400e+02 2.141800e+02\n9 21488     2.869600e+02 3.123700e+02\n12 21488     5.058900e+02 4.452600e+02\n9 21489     4.479000e+02 2.627900e+02\n12 21489     7.072300e+02 3.499400e+02\n9 21490     1.484900e+02 2.608000e+02\n12 21490     3.562900e+02 4.267600e+02\n9 21491     4.436300e+02 2.502100e+02\n12 21491     7.002000e+02 3.345400e+02\n9 21492     -2.789400e+02 2.196100e+02\n11 21492     2.802800e+02 -3.243400e+02\n9 21493     -4.089800e+02 2.160900e+02\n14 21493     2.911100e+02 -3.121300e+02\n9 21494     5.170300e+02 2.064600e+02\n12 21494     7.917500e+02 2.628700e+02\n9 21495     4.489399e+02 1.138600e+02\n12 21495     6.921400e+02 1.595600e+02\n9 21496     4.602400e+02 9.979001e+01\n10 21496     7.621300e+02 1.564900e+02\n9 21497     4.140200e+02 7.987000e+01\n10 21497     7.020900e+02 1.579500e+02\n9 21498     3.906801e+02 5.653998e+01\n10 21498     6.687900e+02 1.433300e+02\n9 21499     -3.084300e+02 4.157001e+01\n10 21499     -1.479700e+02 3.697400e+02\n9 21500     6.001200e+02 -1.337700e+02\n12 21500     8.036700e+02 -2.352200e+02\n9 21501     5.815900e+02 -1.464900e+02\n12 21501     7.698600e+02 -2.533800e+02\n9 21502     -4.461700e+02 -2.013800e+02\n13 21502     -5.030029e+00 -3.278100e+02\n9 21503     3.754700e+02 -3.482000e+02\n10 21503     1.844700e+02 -4.856801e+02\n9 21504     -1.143300e+02 -4.593500e+02\n15 21504     -3.711600e+02 -5.232600e+02\n9 21505     -2.175100e+02 4.265700e+02\n14 21505     5.623000e+02 -8.578003e+01\n9 21506     8.888000e+01 4.021100e+02\n12 21506     2.925800e+02 6.154000e+02\n9 21507     2.570400e+02 3.372900e+02\n10 21507     5.882300e+02 5.639500e+02\n9 21508     2.501100e+02 2.857200e+02\n12 21508     4.585500e+02 4.174600e+02\n9 21509     3.684998e+01 1.810300e+02\n13 21509     4.155300e+02 -1.559400e+02\n9 21510     4.430699e+02 1.612500e+02\n12 21510     6.896600e+02 2.210500e+02\n9 21511     5.053199e+02 5.598999e+01\n10 21511     8.037400e+02 7.878998e+01\n9 21512     -3.136000e+02 2.191998e+01\n13 21512     1.955699e+02 -1.083300e+02\n9 21513     -3.719700e+02 -1.595000e+02\n10 21513     -3.820400e+02 7.373999e+01\n15 21513     -3.592400e+02 5.234998e+01\n9 21514     -4.969200e+02 -2.093900e+02\n13 21514     -4.264001e+01 -3.223500e+02\n9 21515     5.406100e+02 -2.971900e+02\n12 21515     6.138400e+02 -4.968400e+02\n9 21516     2.327002e+01 -3.217400e+02\n15 21516     -1.213800e+02 -3.925200e+02\n9 21517     5.559700e+02 -3.383000e+02\n12 21517     6.122600e+02 -5.668000e+02\n9 21518     -2.756200e+02 2.107800e+02\n11 21518     2.821600e+02 -3.344100e+02\n13 21518     3.048600e+02 1.051600e+02\n9 21519     -1.706800e+02 1.652700e+02\n13 21519     3.859000e+02 3.859003e+01\n14 21519     5.584399e+02 -4.077600e+02\n9 21520     4.844700e+02 1.314400e+02\n12 21520     7.401400e+02 1.730400e+02\n9 21521     3.744301e+02 9.429001e+01\n12 21521     5.966200e+02 1.519700e+02\n9 21522     -3.870200e+02 9.206000e+01\n14 21522     2.798199e+02 -4.624301e+02\n9 21523     5.574399e+02 -3.035100e+02\n12 21523     6.368600e+02 -5.112700e+02\n9 21524     3.376899e+02 1.784800e+02\n10 21524     6.391899e+02 3.173500e+02\n9 21525     -3.575400e+02 2.739000e+02\n11 21525     1.861800e+02 -2.806700e+02\n9 21526     4.587000e+01 -2.575700e+02\n13 21526     3.254900e+02 -5.481100e+02\n9 21527     -3.117000e+02 -3.501400e+02\n13 21527     3.444000e+01 -5.101100e+02\n9 21528     5.335699e+02 -3.543400e+02\n12 21528     5.717100e+02 -5.867200e+02\n9 21529     4.570400e+02 2.372400e+02\n12 21529     7.169399e+02 3.160200e+02\n9 21530     -2.320200e+02 3.508800e+02\n11 21530     3.487400e+02 -2.056300e+02\n9 21531     -3.279600e+02 2.987600e+02\n11 21531     2.295400e+02 -2.561000e+02\n9 21532     -3.279600e+02 2.987600e+02\n11 21532     2.295400e+02 -2.561000e+02\n9 21533     -3.648800e+02 2.917200e+02\n11 21533     1.845600e+02 -2.614200e+02\n10 21534     6.525800e+02 6.086000e+02\n12 21534     5.265800e+02 5.355000e+02\n10 21535     -9.954999e+01 6.054500e+02\n12 21535     -2.520900e+02 3.796700e+02\n10 21536     -3.808600e+02 5.966000e+02\n12 21536     -5.138900e+02 3.559300e+02\n10 21537     -4.277200e+02 5.940900e+02\n14 21537     7.327002e+01 -3.466700e+02\n10 21538     -6.335200e+02 5.908700e+02\n12 21538     -7.560800e+02 3.362700e+02\n10 21539     -3.824300e+02 5.848600e+02\n12 21539     -5.149700e+02 3.451900e+02\n10 21540     -6.721600e+02 5.787600e+02\n12 21540     -7.937900e+02 3.215100e+02\n10 21541     -7.225000e+02 5.643700e+02\n14 21541     -1.632500e+02 -3.563500e+02\n10 21542     -1.628300e+02 5.502200e+02\n14 21542     2.864900e+02 -3.996700e+02\n10 21543     -1.578500e+02 5.393500e+02\n14 21543     2.926200e+02 -4.103800e+02\n10 21544     -5.013800e+02 5.312700e+02\n12 21544     -6.270400e+02 2.826400e+02\n10 21545     -5.399900e+02 5.295500e+02\n12 21545     -6.642100e+02 2.792700e+02\n10 21546     -6.214100e+02 5.189200e+02\n11 21546     -2.166300e+02 -3.971100e+02\n14 21546     -9.301001e+01 -4.014900e+02\n10 21547     -4.853998e+01 5.171700e+02\n11 21547     2.139500e+02 -4.316600e+02\n14 21547     3.988600e+02 -4.337600e+02\n15 21547     3.312000e+01 5.733200e+02\n10 21548     -4.816900e+02 5.051400e+02\n12 21548     -6.074600e+02 2.571300e+02\n15 21548     -4.713300e+02 5.501100e+02\n10 21549     6.273101e+02 5.025300e+02\n12 21549     5.174800e+02 4.343200e+02\n15 21549     8.299200e+02 5.752900e+02\n10 21550     -6.924500e+02 4.876500e+02\n12 21550     -8.175800e+02 2.205100e+02\n10 21551     -6.787900e+02 4.866500e+02\n12 21551     -8.035000e+02 2.204300e+02\n15 21551     -6.956000e+02 5.235900e+02\n10 21552     -6.045000e+02 4.829000e+02\n12 21552     -7.262900e+02 2.258000e+02\n10 21553     -6.045000e+02 4.829000e+02\n12 21553     -7.262900e+02 2.258000e+02\n10 21554     -6.038500e+02 4.786200e+02\n12 21554     -7.255000e+02 2.214400e+02\n10 21555     4.936000e+02 4.677400e+02\n12 21555     3.640100e+02 3.497300e+02\n10 21556     -6.327100e+02 4.655000e+02\n12 21556     -7.552500e+02 2.044400e+02\n15 21556     -6.438000e+02 5.006700e+02\n10 21557     -6.335400e+02 4.625800e+02\n12 21557     -7.555400e+02 2.014300e+02\n15 21557     -6.447700e+02 4.972600e+02\n10 21558     -8.008900e+02 4.586500e+02\n14 21558     -2.470100e+02 -4.438900e+02\n10 21559     -6.231300e+02 4.343700e+02\n12 21559     -7.448200e+02 1.720000e+02\n10 21560     -7.472100e+02 4.287000e+02\n14 21560     -2.112600e+02 -4.742200e+02\n10 21561     -7.532300e+02 4.245300e+02\n14 21561     -2.181300e+02 -4.779399e+02\n15 21561     -7.792000e+02 4.505800e+02\n10 21562     7.605699e+02 3.968900e+02\n12 21562     6.640699e+02 3.669600e+02\n10 21563     7.486400e+02 3.936100e+02\n12 21563     6.532900e+02 3.612200e+02\n10 21564     5.611000e+02 3.749500e+02\n12 21564     4.702300e+02 3.000800e+02\n10 21565     7.898300e+02 3.717700e+02\n12 21565     6.962100e+02 3.498700e+02\n10 21566     5.655601e+02 3.710200e+02\n12 21566     4.750300e+02 2.976500e+02\n10 21567     -3.570200e+02 3.672100e+02\n14 21567     1.306500e+02 -5.556600e+02\n10 21568     7.850900e+02 3.670300e+02\n12 21568     6.925601e+02 3.441000e+02\n10 21569     8.030699e+02 3.633400e+02\n12 21569     7.105000e+02 3.450500e+02\n10 21570     -6.516500e+02 3.569800e+02\n14 21570     -1.472700e+02 -5.479800e+02\n10 21571     7.810100e+02 3.559000e+02\n12 21571     6.903400e+02 3.334800e+02\n10 21572     7.321801e+02 3.390700e+02\n12 21572     6.464900e+02 3.069200e+02\n10 21573     -6.328900e+02 3.248600e+02\n14 21573     -1.265300e+02 -5.788101e+02\n10 21574     7.736200e+02 3.189300e+02\n12 21574     6.896600e+02 2.976200e+02\n10 21575     6.245601e+02 2.904200e+02\n12 21575     5.471801e+02 2.338300e+02\n10 21576     7.159301e+02 2.826000e+02\n12 21576     6.393900e+02 2.503000e+02\n10 21577     6.728400e+02 2.646400e+02\n12 21577     5.993800e+02 2.211700e+02\n10 21578     7.870800e+02 2.585300e+02\n12 21578     7.127000e+02 2.438700e+02\n10 21579     5.344500e+02 2.351000e+02\n12 21579     4.629399e+02 1.567400e+02\n10 21580     5.038900e+02 2.343600e+02\n12 21580     4.305699e+02 1.480100e+02\n15 21580     6.880000e+02 2.521000e+02\n10 21581     -2.100220e-01 2.339000e+02\n12 21581     5.640002e+01 1.790900e+02\n10 21582     1.247000e+02 2.301300e+02\n12 21582     1.797200e+02 1.919500e+02\n15 21582     2.202700e+02 2.450800e+02\n10 21583     7.689399e+02 2.287800e+02\n12 21583     6.996500e+02 2.106000e+02\n10 21584     -6.877002e+01 2.160000e+02\n12 21584     -1.198999e+01 1.496600e+02\n15 21584     -6.799988e+00 2.248500e+02\n10 21585     7.669500e+02 2.133100e+02\n12 21585     6.994399e+02 1.959000e+02\n10 21586     -1.710300e+02 2.026200e+02\n12 21586     -1.289300e+02 1.080500e+02\n15 21586     -1.241900e+02 2.078400e+02\n10 21587     2.740002e+01 1.973300e+02\n12 21587     9.389001e+01 1.500100e+02\n15 21587     1.057500e+02 2.049800e+02\n10 21588     2.740002e+01 1.973300e+02\n12 21588     9.389001e+01 1.500100e+02\n15 21588     1.057500e+02 2.049800e+02\n10 21589     -7.167999e+01 1.794700e+02\n12 21589     -6.760010e+00 1.142900e+02\n10 21590     5.789600e+02 1.733700e+02\n12 21590     5.176200e+02 1.078900e+02\n15 21590     7.790400e+02 1.808900e+02\n10 21591     8.212700e+02 1.443500e+02\n12 21591     7.642700e+02 1.429600e+02\n10 21592     1.067100e+02 1.363200e+02\n12 21592     1.841700e+02 1.014400e+02\n15 21592     1.996200e+02 1.343500e+02\n10 21593     6.403700e+02 1.258500e+02\n12 21593     5.875200e+02 7.702002e+01\n15 21593     8.535000e+02 1.246500e+02\n10 21594     -4.008500e+02 9.542999e+01\n12 21594     -4.306000e+02 -1.072200e+02\n15 21594     -3.805400e+02 7.803003e+01\n10 21595     -7.045100e+02 5.973999e+01\n13 21595     -1.798500e+02 -3.061000e+02\n15 21595     -7.293700e+02 3.327002e+01\n10 21596     -1.739100e+02 5.148999e+01\n12 21596     -9.695001e+01 -3.740997e+01\n15 21596     -1.271500e+02 3.128003e+01\n10 21597     -9.541998e+01 1.595001e+01\n12 21597     -1.520020e+00 -5.554999e+01\n10 21598     -2.133700e+02 5.330017e+00\n12 21598     -1.329700e+02 -9.435999e+01\n15 21598     -1.719200e+02 -2.277002e+01\n10 21599     -5.594300e+02 -1.630005e+00\n12 21599     -5.782100e+02 -2.256300e+02\n15 21599     -5.639700e+02 -3.595001e+01\n10 21600     -5.624300e+02 -3.530029e+00\n12 21600     -5.795800e+02 -2.277300e+02\n15 21600     -5.670400e+02 -3.834003e+01\n10 21601     -2.196200e+02 -8.460022e+00\n12 21601     -1.351600e+02 -1.079300e+02\n15 21601     -1.800700e+02 -3.887000e+01\n10 21602     6.743500e+02 -1.770001e+01\n12 21602     6.644301e+02 -3.825000e+01\n10 21603     1.610700e+02 -3.426001e+01\n12 21603     2.676600e+02 -6.289001e+01\n15 21603     2.660000e+02 -6.640002e+01\n10 21604     -1.301900e+02 -5.066998e+01\n12 21604     -2.604999e+01 -1.296700e+02\n15 21604     -7.628998e+01 -8.757001e+01\n10 21605     2.082800e+02 -1.000200e+02\n12 21605     3.328700e+02 -1.166300e+02\n15 21605     3.222200e+02 -1.440700e+02\n10 21606     -4.186500e+02 -3.836600e+02\n12 21606     -3.069200e+02 -5.739900e+02\n15 21606     -4.072100e+02 -4.790800e+02\n10 21607     3.664600e+02 -4.304100e+02\n12 21607     5.295100e+02 -4.514600e+02\n10 21608     3.820699e+02 -4.392100e+02\n12 21608     5.480900e+02 -4.560699e+02\n10 21609     3.620100e+02 -4.459900e+02\n12 21609     5.315400e+02 -4.664399e+02\n10 21610     3.239700e+02 -4.602300e+02\n12 21610     4.997400e+02 -4.877700e+02\n10 21611     2.543000e+02 -4.892000e+02\n12 21611     4.424399e+02 -5.295900e+02\n10 21612     1.764500e+02 -5.089100e+02\n12 21612     3.719700e+02 -5.653101e+02\n10 21613     3.526600e+02 -5.190500e+02\n12 21613     5.494500e+02 -5.359200e+02\n10 21614     3.118700e+02 -5.203400e+02\n12 21614     5.102700e+02 -5.463000e+02\n10 21615     3.118700e+02 -5.203400e+02\n12 21615     5.102700e+02 -5.463000e+02\n10 21616     2.649301e+02 -5.679900e+02\n12 21616     4.820000e+02 -6.014500e+02\n10 21617     5.914301e+02 6.100400e+02\n12 21617     4.666000e+02 5.243200e+02\n10 21618     2.380005e+00 6.043200e+02\n14 21618     4.290800e+02 -3.588700e+02\n10 21619     -8.304999e+01 5.739400e+02\n14 21619     3.559600e+02 -3.825800e+02\n10 21620     -7.600400e+02 5.701500e+02\n13 21620     -2.191500e+02 5.991998e+01\n14 21620     -1.906600e+02 -3.490500e+02\n10 21621     1.148900e+02 5.700100e+02\n13 21621     3.734301e+02 5.048999e+01\n14 21621     5.419200e+02 -3.921900e+02\n10 21622     -4.428003e+01 5.685500e+02\n14 21622     3.930300e+02 -3.890100e+02\n10 21623     -1.405900e+02 5.596100e+02\n14 21623     3.054200e+02 -3.930400e+02\n10 21624     -1.051500e+02 5.548500e+02\n13 21624     2.115800e+02 3.953998e+01\n14 21624     3.397300e+02 -3.988100e+02\n10 21625     -6.053000e+02 5.510000e+02\n13 21625     -1.206900e+02 4.422998e+01\n10 21626     -6.676300e+02 5.270700e+02\n13 21626     -1.637300e+02 2.902002e+01\n10 21627     -4.807000e+02 4.939700e+02\n14 21627     1.521002e+01 -4.327300e+02\n10 21628     -4.807000e+02 4.939700e+02\n14 21628     1.521002e+01 -4.327300e+02\n10 21629     -7.854300e+02 4.633500e+02\n13 21629     -2.483300e+02 -1.471002e+01\n10 21630     -6.443500e+02 4.527300e+02\n12 21630     -7.687100e+02 1.874700e+02\n10 21631     6.733600e+02 3.983700e+02\n12 21631     5.802500e+02 3.487200e+02\n10 21632     -7.169000e+01 3.950200e+02\n13 21632     2.610900e+02 -7.031000e+01\n10 21633     -6.993100e+02 3.674100e+02\n14 21633     -1.872400e+02 -5.355300e+02\n10 21634     -6.707600e+02 3.626100e+02\n14 21634     -1.648600e+02 -5.418000e+02\n10 21635     -5.087900e+02 3.614500e+02\n14 21635     -1.342999e+01 -5.520000e+02\n10 21636     -6.575500e+02 3.299900e+02\n13 21636     -1.734700e+02 -1.135800e+02\n10 21637     -1.804400e+02 2.901900e+02\n12 21637     -1.883100e+02 1.607500e+02\n10 21638     5.320601e+02 2.117800e+02\n12 21638     4.636300e+02 1.334500e+02\n10 21639     1.729200e+02 1.839500e+02\n13 21639     5.687800e+02 -1.896100e+02\n10 21640     3.297100e+02 1.568200e+02\n12 21640     3.612600e+02 1.219100e+02\n13 21640     6.667500e+02 -2.173600e+02\n10 21641     -7.164800e+02 1.468200e+02\n13 21641     -1.981800e+02 -2.427200e+02\n15 21641     -7.408800e+02 1.330600e+02\n10 21642     2.416700e+02 1.177300e+02\n12 21642     3.046700e+02 8.862000e+01\n13 21642     6.177200e+02 -2.406100e+02\n10 21643     -3.756500e+02 7.240997e+01\n13 21643     7.453998e+01 -3.001100e+02\n10 21644     -7.670800e+02 4.900000e+01\n13 21644     -2.261000e+02 -3.125200e+02\n10 21645     6.247200e+02 4.097998e+01\n12 21645     5.996500e+02 2.820007e+00\n10 21646     3.706100e+02 1.060999e+01\n12 21646     4.439600e+02 1.000977e-02\n15 21646     5.183000e+02 -1.270001e+01\n10 21647     -5.625900e+02 3.590027e+00\n13 21647     -6.342999e+01 -3.488700e+02\n10 21648     3.467700e+02 -3.201001e+01\n12 21648     4.387900e+02 -3.845001e+01\n10 21649     -1.856300e+02 -5.091998e+01\n13 21649     3.086200e+02 -3.674400e+02\n10 21650     4.515002e+01 -7.984003e+01\n13 21650     4.923600e+02 -3.877200e+02\n10 21651     -2.238400e+02 -1.392700e+02\n13 21651     2.535500e+02 -4.467600e+02\n10 21652     -2.581200e+02 -2.365000e+02\n13 21652     2.211200e+02 -5.293000e+02\n10 21653     3.601000e+02 -5.098500e+02\n12 21653     5.527800e+02 -5.259900e+02\n10 21654     3.207500e+02 -5.301200e+02\n12 21654     5.218700e+02 -5.530900e+02\n10 21655     8.256000e+01 6.102100e+02\n13 21655     3.430200e+02 7.756000e+01\n10 21656     -7.517700e+02 5.974800e+02\n11 21656     -2.959900e+02 -3.359300e+02\n13 21656     -2.097800e+02 7.839999e+01\n10 21657     -1.344900e+02 5.434900e+02\n13 21657     1.914600e+02 3.196002e+01\n14 21657     3.135000e+02 -4.071100e+02\n10 21658     -7.410000e+02 5.393000e+02\n13 21658     -2.107500e+02 3.784998e+01\n10 21659     9.428998e+01 5.199500e+02\n13 21659     3.664301e+02 1.653998e+01\n14 21659     5.340200e+02 -4.354301e+02\n10 21660     6.502002e+01 4.941100e+02\n14 21660     5.112700e+02 -4.586899e+02\n10 21661     -2.838400e+02 4.736400e+02\n13 21661     8.915997e+01 -1.631000e+01\n10 21662     -6.515500e+02 4.540700e+02\n12 21662     -7.759100e+02 1.875700e+02\n10 21663     -7.216400e+02 4.396000e+02\n13 21663     -2.103900e+02 -3.303998e+01\n14 21663     -1.892100e+02 -4.659900e+02\n10 21664     -1.761400e+02 4.365600e+02\n14 21664     2.929900e+02 -5.008800e+02\n10 21665     -3.315100e+02 4.332400e+02\n13 21665     5.934998e+01 -4.329999e+01\n14 21665     1.461899e+02 -4.963199e+02\n10 21666     -2.615002e+01 4.205400e+02\n13 21666     2.916700e+02 -5.308002e+01\n14 21666     4.398900e+02 -5.216899e+02\n10 21667     -7.063200e+02 4.011400e+02\n13 21667     -2.056000e+02 -6.159003e+01\n10 21668     -3.115400e+02 3.607200e+02\n13 21668     8.373999e+01 -9.460999e+01\n14 21668     1.748101e+02 -5.644301e+02\n15 21668     -2.746800e+02 3.859600e+02\n10 21669     -6.954700e+02 3.425300e+02\n13 21669     -2.025200e+02 -1.044000e+02\n14 21669     -1.859700e+02 -5.583800e+02\n10 21670     2.521000e+02 1.960800e+02\n13 21670     6.196200e+02 -1.835300e+02\n10 21671     1.741700e+02 1.911200e+02\n12 21671     2.335500e+02 1.591800e+02\n10 21672     -6.294600e+02 1.814800e+02\n13 21672     -1.356800e+02 -2.189700e+02\n15 21672     -6.414500e+02 1.747300e+02\n10 21673     1.768800e+02 1.458300e+02\n13 21673     5.754700e+02 -2.172000e+02\n10 21674     -6.207900e+02 1.406500e+02\n13 21674     -1.246100e+02 -2.485900e+02\n10 21675     -3.806600e+02 6.465997e+01\n13 21675     7.196002e+01 -3.055700e+02\n10 21676     1.888500e+02 6.003003e+01\n13 21676     5.872500e+02 -2.828500e+02\n15 21676     2.983900e+02 4.481000e+01\n10 21677     -4.928003e+01 4.525000e+01\n13 21677     4.095400e+02 -2.937400e+02\n10 21678     -1.179000e+02 2.490997e+01\n13 21678     3.566600e+02 -3.096300e+02\n10 21679     9.737000e+01 -1.122400e+02\n13 21679     5.377100e+02 -4.113000e+02\n15 21679     1.901100e+02 -1.581600e+02\n10 21680     -6.929400e+02 -1.352600e+02\n13 21680     -1.480200e+02 -4.506500e+02\n15 21680     -7.177300e+02 -1.913300e+02\n10 21681     -9.909973e+00 -1.928200e+02\n13 21681     4.410000e+02 -4.836100e+02\n10 21682     -7.894800e+02 -1.972500e+02\n13 21682     -2.151900e+02 -4.952600e+02\n15 21682     -8.266600e+02 -2.626600e+02\n10 21683     2.953199e+02 -5.158101e+02\n12 21683     4.928300e+02 -5.456899e+02\n10 21684     -7.648999e+01 5.668800e+02\n13 21684     2.305699e+02 4.801001e+01\n14 21684     3.625300e+02 -3.887500e+02\n10 21685     -7.265002e+01 5.630300e+02\n13 21685     2.345500e+02 4.572998e+01\n10 21686     -7.265002e+01 5.630300e+02\n13 21686     2.345500e+02 4.572998e+01\n10 21687     -6.521200e+02 3.746300e+02\n13 21687     -1.731200e+02 -8.228003e+01\n14 21687     -1.474000e+02 -5.318900e+02\n10 21688     -6.572500e+02 3.550000e+02\n13 21688     -1.761000e+02 -9.641998e+01\n10 21689     7.347300e+02 2.134500e+02\n12 21689     6.671200e+02 1.884900e+02\n10 21690     -6.188600e+02 1.730500e+02\n13 21690     -1.261400e+02 -2.249300e+02\n15 21690     -6.298400e+02 1.648500e+02\n10 21691     -2.870000e+02 1.626300e+02\n12 21691     -2.652500e+02 2.979999e+01\n10 21692     2.539100e+02 8.427002e+01\n13 21692     6.266000e+02 -2.670200e+02\n15 21692     3.773500e+02 7.384003e+01\n10 21693     -5.922300e+02 5.364001e+01\n13 21693     -9.177002e+01 -3.114400e+02\n10 21694     2.827100e+02 5.144000e+01\n13 21694     6.542800e+02 -2.911600e+02\n15 21694     4.119500e+02 3.529999e+01\n10 21695     -7.220000e+02 4.784003e+01\n12 21695     -7.712300e+02 -2.069400e+02\n10 21696     4.857200e+02 5.566100e+02\n12 21696     3.429700e+02 4.307100e+02\n10 21697     -1.468000e+02 3.598700e+02\n14 21697     3.348300e+02 -5.722700e+02\n10 21698     2.830900e+02 7.196997e+01\n13 21698     6.493900e+02 -2.768800e+02\n15 21698     4.120000e+02 5.946002e+01\n10 21699     1.032500e+02 5.977002e+01\n12 21699     1.932200e+02 2.306000e+01\n10 21700     -2.462400e+02 -9.750000e+00\n12 21700     -1.640300e+02 -1.124600e+02\n15 21700     -2.113100e+02 -4.002002e+01\n10 21701     2.548500e+02 -2.408002e+01\n13 21701     6.409301e+02 -3.480600e+02\n15 21701     3.785100e+02 -5.402002e+01\n10 21702     -4.190000e+02 -2.274500e+02\n13 21702     7.952002e+01 -5.238199e+02\n10 21703     -2.913000e+02 4.763200e+02\n11 21703     2.190997e+01 -4.502200e+02\n13 21703     8.282001e+01 -1.403998e+01\n14 21703     1.765601e+02 -4.598400e+02\n10 21704     -8.105800e+02 3.274900e+02\n13 21704     -2.873600e+02 -1.144900e+02\n10 21705     1.733300e+02 2.951600e+02\n13 21705     5.559200e+02 -1.118200e+02\n10 21706     -5.905200e+02 2.734800e+02\n13 21706     -1.170900e+02 -1.530100e+02\n10 21707     7.360900e+02 2.576800e+02\n12 21707     6.634800e+02 2.300600e+02\n10 21708     1.481300e+02 1.846700e+02\n12 21708     2.107800e+02 1.512200e+02\n10 21709     -7.070200e+02 -8.989001e+01\n13 21709     -1.635200e+02 -4.161400e+02\n15 21709     -7.330200e+02 -1.390600e+02\n10 21710     -8.099700e+02 3.165200e+02\n13 21710     -2.855200e+02 -1.221100e+02\n10 21711     7.758600e+02 1.859300e+02\n12 21711     7.133199e+02 1.714000e+02\n10 21712     -5.741300e+02 1.835800e+02\n13 21712     -9.201001e+01 -2.175000e+02\n15 21712     -5.779000e+02 1.783400e+02\n10 21713     -7.306300e+02 5.621002e+01\n13 21713     -1.988300e+02 -3.072200e+02\n10 21714     1.748600e+02 1.404999e+01\n13 21714     5.809000e+02 -3.169200e+02\n15 21714     2.807700e+02 -9.859985e+00\n10 21715     2.163800e+02 -1.605500e+02\n12 21715     3.402500e+02 -1.878800e+02\n15 21715     3.336899e+02 -2.172700e+02\n11 21716     -2.426001e+01 2.454000e+02\n14 21716     1.972998e+01 3.815300e+02\n11 21717     -6.726001e+01 2.427400e+02\n14 21717     -4.771002e+01 3.791400e+02\n11 21718     -2.094300e+02 1.956400e+02\n14 21718     -2.110700e+02 3.240600e+02\n11 21719     9.428998e+01 1.918600e+02\n14 21719     1.646300e+02 3.101200e+02\n11 21720     8.440002e+01 1.874100e+02\n14 21720     1.530601e+02 3.054100e+02\n11 21721     6.329999e+01 1.855300e+02\n14 21721     1.280900e+02 3.036000e+02\n11 21722     8.135999e+01 1.832500e+02\n14 21722     1.494000e+02 2.994700e+02\n11 21723     4.920800e+02 1.642300e+02\n14 21723     6.238300e+02 2.682800e+02\n11 21724     -3.230400e+02 1.588600e+02\n14 21724     -3.549000e+02 2.808300e+02\n11 21725     4.936600e+02 1.591600e+02\n14 21725     6.258900e+02 2.619400e+02\n11 21726     4.936600e+02 1.591600e+02\n14 21726     6.258900e+02 2.619400e+02\n11 21727     -3.668900e+02 1.386600e+02\n14 21727     -3.963000e+02 2.564400e+02\n11 21728     -9.384003e+01 1.073600e+02\n13 21728     -1.040600e+02 5.447700e+02\n14 21728     -2.029999e+01 2.093700e+02\n11 21729     -3.913700e+02 1.044100e+02\n14 21729     -3.788200e+02 2.114300e+02\n11 21730     -2.169800e+02 9.904001e+01\n13 21730     -1.815700e+02 5.384900e+02\n14 21730     -1.091300e+02 2.053800e+02\n11 21731     2.629200e+02 9.635001e+01\n14 21731     4.364100e+02 1.914300e+02\n11 21732     2.651600e+02 9.389001e+01\n13 21732     2.942800e+02 5.376600e+02\n14 21732     4.385699e+02 1.887000e+02\n11 21733     -3.230900e+02 8.207001e+01\n13 21733     -3.335800e+02 5.130700e+02\n14 21733     -2.837400e+02 1.852600e+02\n11 21734     -3.209800e+02 7.951001e+01\n13 21734     -3.317400e+02 5.101700e+02\n14 21734     -2.820000e+02 1.818000e+02\n11 21735     1.139000e+02 7.535001e+01\n14 21735     2.756300e+02 1.690400e+02\n11 21736     2.275500e+02 7.422000e+01\n13 21736     2.619399e+02 5.167800e+02\n14 21736     4.010699e+02 1.662200e+02\n11 21737     2.459700e+02 6.998999e+01\n14 21737     4.230900e+02 1.606400e+02\n11 21738     -3.411500e+02 6.457001e+01\n13 21738     -3.525400e+02 4.924800e+02\n14 21738     -3.069700e+02 1.636200e+02\n11 21739     3.074600e+02 6.439999e+01\n14 21739     4.923300e+02 1.531200e+02\n11 21740     -3.926000e+02 5.545001e+01\n13 21740     -4.224100e+02 4.792500e+02\n14 21740     -3.877600e+02 1.525700e+02\n11 21741     -3.926000e+02 5.545001e+01\n13 21741     -4.224100e+02 4.792500e+02\n14 21741     -3.877600e+02 1.525700e+02\n11 21742     -3.941100e+02 4.901999e+01\n14 21742     -3.894400e+02 1.449200e+02\n11 21743     1.959000e+02 4.314001e+01\n13 21743     2.381801e+02 4.839900e+02\n14 21743     3.732400e+02 1.302400e+02\n11 21744     -3.993100e+02 4.197000e+01\n13 21744     -4.256500e+02 4.635700e+02\n14 21744     -3.933500e+02 1.356400e+02\n11 21745     -5.087500e+02 3.759000e+01\n14 21745     -5.766300e+02 1.293500e+02\n11 21746     -4.285300e+02 3.776001e+01\n14 21746     -4.365300e+02 1.305000e+02\n11 21747     -4.661000e+02 3.417999e+01\n14 21747     -5.141700e+02 1.254400e+02\n11 21748     -4.721200e+02 3.045999e+01\n14 21748     -5.230400e+02 1.200800e+02\n11 21749     -5.116900e+02 2.981000e+01\n14 21749     -5.787800e+02 1.203100e+02\n11 21750     -4.908800e+02 2.748001e+01\n14 21750     -5.458600e+02 1.180100e+02\n11 21751     -4.225300e+02 1.672998e+01\n14 21751     -4.170100e+02 1.039800e+02\n11 21752     4.053700e+02 1.372998e+01\n13 21752     4.344301e+02 4.540800e+02\n11 21753     3.924100e+02 1.190997e+01\n14 21753     5.917400e+02 8.944000e+01\n11 21754     9.066998e+01 5.539978e+00\n14 21754     2.346100e+02 8.312000e+01\n11 21755     4.180300e+02 1.039978e+00\n14 21755     6.173000e+02 7.659998e+01\n11 21756     -4.395700e+02 -6.400024e+00\n13 21756     -4.548900e+02 4.087000e+02\n11 21757     2.573199e+02 -1.053998e+01\n13 21757     2.987700e+02 4.281000e+02\n11 21758     2.141600e+02 -1.077002e+01\n13 21758     2.609700e+02 4.278000e+02\n14 21758     4.001899e+02 6.570001e+01\n11 21759     4.155699e+02 -1.372998e+01\n14 21759     6.136700e+02 5.863000e+01\n11 21760     4.712100e+02 -1.363000e+01\n13 21760     4.899200e+02 4.260800e+02\n14 21760     6.731000e+02 5.800000e+01\n11 21761     4.893700e+02 -1.544000e+01\n14 21761     6.925400e+02 5.466998e+01\n11 21762     4.175000e+02 -1.991998e+01\n13 21762     4.422500e+02 4.193500e+02\n11 21763     2.618300e+02 -2.353003e+01\n14 21763     4.485601e+02 4.906000e+01\n11 21764     3.121100e+02 -3.009003e+01\n13 21764     3.472100e+02 4.079200e+02\n14 21764     5.026100e+02 4.066998e+01\n11 21765     3.206700e+02 -3.123999e+01\n13 21765     3.544600e+02 4.070100e+02\n14 21765     5.114100e+02 3.928003e+01\n11 21766     2.605400e+02 -3.764001e+01\n14 21766     4.465800e+02 3.231000e+01\n11 21767     2.386899e+02 -3.956000e+01\n14 21767     4.231300e+02 3.114001e+01\n11 21768     4.880800e+02 -4.933002e+01\n14 21768     6.893000e+02 1.515002e+01\n11 21769     2.586600e+02 -5.426001e+01\n14 21769     4.437400e+02 1.325000e+01\n11 21770     3.217000e+02 -5.534998e+01\n14 21770     5.101801e+02 1.034998e+01\n11 21771     5.739990e+00 -5.875000e+01\n13 21771     6.953003e+01 3.745100e+02\n11 21772     5.395699e+02 -6.000000e+01\n14 21772     7.433800e+02 2.059998e+00\n11 21773     -4.351600e+02 -6.577002e+01\n13 21773     -3.982400e+02 3.519300e+02\n14 21773     -3.738400e+02 8.270020e+00\n11 21774     4.164000e+02 -6.635999e+01\n14 21774     6.120100e+02 -3.500000e+00\n11 21775     4.438400e+02 -7.042999e+01\n13 21775     4.612000e+02 3.674500e+02\n14 21775     6.406700e+02 -9.239990e+00\n11 21776     2.856100e+02 -7.606000e+01\n14 21776     4.711801e+02 -1.415002e+01\n11 21777     -1.750200e+02 -9.641998e+01\n13 21777     -1.010400e+02 3.296500e+02\n14 21777     -2.941998e+01 -3.313000e+01\n11 21778     -3.826500e+02 -1.093900e+02\n13 21778     9.300000e+01 3.794500e+02\n14 21778     2.012600e+02 1.608002e+01\n11 21779     3.853800e+02 -1.152600e+02\n14 21779     5.758700e+02 -6.134998e+01\n11 21780     3.288300e+02 -1.194900e+02\n14 21780     5.152900e+02 -6.539001e+01\n11 21781     -3.750700e+02 -1.239300e+02\n14 21781     -2.582900e+02 -6.600000e+01\n11 21782     4.996300e+02 -1.244600e+02\n14 21782     6.972900e+02 -7.415997e+01\n11 21783     3.690900e+02 -1.269100e+02\n14 21783     5.575699e+02 -7.465997e+01\n11 21784     -8.392999e+01 -1.437100e+02\n14 21784     7.021997e+01 -9.020001e+01\n11 21785     -3.140600e+02 -1.441000e+02\n13 21785     -2.333700e+02 2.740200e+02\n14 21785     -1.892500e+02 -9.063000e+01\n11 21786     5.196500e+02 -1.464900e+02\n14 21786     7.177000e+02 -9.990002e+01\n11 21787     2.879900e+02 -1.527400e+02\n14 21787     4.696300e+02 -1.047100e+02\n11 21788     2.879900e+02 -1.527400e+02\n14 21788     4.696300e+02 -1.047100e+02\n11 21789     -2.349700e+02 -1.579200e+02\n14 21789     -9.959998e+01 -1.078000e+02\n11 21790     -6.442999e+01 -1.597600e+02\n13 21790     2.530029e+00 2.680000e+02\n11 21791     2.221200e+02 -1.621100e+02\n14 21791     3.997600e+02 -1.149500e+02\n11 21792     -3.395001e+01 -1.637000e+02\n14 21792     1.235800e+02 -1.149400e+02\n11 21793     2.157500e+02 -1.647400e+02\n13 21793     2.543800e+02 2.697600e+02\n14 21793     3.922500e+02 -1.179500e+02\n11 21794     2.114000e+02 -1.653800e+02\n13 21794     2.508101e+02 2.690200e+02\n14 21794     3.882700e+02 -1.186300e+02\n11 21795     -3.738600e+02 -1.672500e+02\n13 21795     -2.889000e+02 2.481500e+02\n14 21795     -2.577000e+02 -1.180100e+02\n11 21796     -9.741998e+01 -1.692100e+02\n12 21796     -6.370000e+02 6.188100e+02\n11 21797     -4.153800e+02 -1.732500e+02\n14 21797     -3.305800e+02 -1.286500e+02\n11 21798     -2.528100e+02 -1.819800e+02\n14 21798     -1.221000e+02 -1.373400e+02\n11 21799     -1.430900e+02 -1.819400e+02\n14 21799     2.000000e+00 -1.373600e+02\n11 21800     -1.430900e+02 -1.819400e+02\n14 21800     2.000000e+00 -1.373600e+02\n11 21801     -4.614001e+01 -1.903200e+02\n14 21801     1.080400e+02 -1.469300e+02\n11 21802     4.267400e+02 -2.110400e+02\n14 21802     6.149000e+02 -1.756700e+02\n11 21803     -1.630100e+02 -2.157400e+02\n14 21803     -2.226001e+01 -1.776200e+02\n11 21804     -3.172400e+02 -2.218300e+02\n14 21804     -1.960900e+02 -1.859000e+02\n11 21805     1.853100e+02 -2.223600e+02\n12 21805     -2.641200e+02 5.689800e+02\n11 21806     1.887200e+02 -2.258700e+02\n12 21806     -2.590800e+02 5.645800e+02\n11 21807     3.614000e+02 -2.269100e+02\n14 21807     5.442600e+02 -1.937700e+02\n11 21808     -3.070700e+02 -2.282100e+02\n14 21808     -1.855700e+02 -1.941700e+02\n11 21809     2.800800e+02 -2.311100e+02\n12 21809     -1.509700e+02 5.658600e+02\n11 21810     4.569900e+02 -2.395100e+02\n13 21810     4.604399e+02 1.993400e+02\n14 21810     6.460800e+02 -2.100300e+02\n11 21811     -5.059003e+01 -2.435400e+02\n12 21811     -5.573000e+02 5.134400e+02\n11 21812     2.034100e+02 -2.614800e+02\n14 21812     3.739399e+02 -2.341400e+02\n11 21813     -2.381400e+02 -2.850000e+02\n12 21813     -8.052600e+02 4.232100e+02\n11 21814     -3.417800e+02 -2.855500e+02\n14 21814     -2.287400e+02 -2.648100e+02\n11 21815     1.380005e+00 -2.930200e+02\n12 21815     -4.794000e+02 4.500400e+02\n11 21816     -4.549988e+00 -2.933500e+02\n13 21816     5.554999e+01 1.354300e+02\n11 21817     -4.315002e+01 -2.992600e+02\n13 21817     2.101001e+01 1.280900e+02\n11 21818     -5.144800e+02 -3.027100e+02\n13 21818     -5.311600e+02 7.907001e+01\n14 21818     -5.659900e+02 -3.034600e+02\n11 21819     -1.025500e+02 -3.311500e+02\n12 21819     -6.060300e+02 3.795800e+02\n11 21820     -1.789700e+02 -3.401900e+02\n12 21820     -7.060500e+02 3.532700e+02\n11 21821     -3.601300e+02 -3.592200e+02\n13 21821     -2.691000e+02 5.059003e+01\n11 21822     -1.195000e+02 -3.935900e+02\n12 21822     -6.143600e+02 2.885300e+02\n11 21823     2.169100e+02 -4.567900e+02\n14 21823     4.109900e+02 -4.619700e+02\n15 21823     4.009998e+01 5.370100e+02\n11 21824     -1.550200e+02 -4.592600e+02\n13 21824     -7.971002e+01 -3.370001e+01\n11 21825     2.154200e+02 -5.130100e+02\n14 21825     4.285000e+02 -5.256000e+02\n11 21826     4.717600e+02 1.740600e+02\n14 21826     5.975300e+02 2.807900e+02\n11 21827     4.661100e+02 1.693800e+02\n14 21827     5.899100e+02 2.751000e+02\n11 21828     -2.300000e+01 1.670000e+02\n14 21828     9.389001e+01 2.877900e+02\n11 21829     -3.445001e+01 1.639600e+02\n14 21829     3.778003e+01 2.833400e+02\n11 21830     -8.562000e+01 1.597400e+02\n14 21830     -2.171997e+01 2.788100e+02\n11 21831     -3.122500e+02 1.415400e+02\n14 21831     -2.848400e+02 2.602900e+02\n11 21832     1.824500e+02 1.410000e+02\n14 21832     3.379700e+02 2.449400e+02\n11 21833     1.565800e+02 1.391100e+02\n13 21833     1.810800e+02 5.860300e+02\n14 21833     3.076700e+02 2.450300e+02\n11 21834     1.256500e+02 1.308100e+02\n13 21834     1.525699e+02 5.770700e+02\n14 21834     2.747600e+02 2.361000e+02\n11 21835     -3.239500e+02 8.589001e+01\n13 21835     -3.347900e+02 5.171700e+02\n14 21835     -2.848300e+02 1.898400e+02\n11 21836     2.627100e+02 8.150000e+01\n14 21836     4.379500e+02 1.748300e+02\n11 21837     2.255699e+02 7.801001e+01\n13 21837     2.607400e+02 5.195900e+02\n11 21838     2.627100e+02 7.589001e+01\n13 21838     2.951600e+02 5.187200e+02\n14 21838     4.399000e+02 1.675700e+02\n11 21839     2.460800e+02 7.448001e+01\n13 21839     2.795601e+02 5.168800e+02\n14 21839     4.215200e+02 1.660600e+02\n11 21840     2.343101e+02 7.219000e+01\n13 21840     2.691899e+02 5.142700e+02\n14 21840     4.095200e+02 1.633200e+02\n11 21841     2.634900e+02 5.851999e+01\n13 21841     2.993600e+02 5.003900e+02\n11 21842     -1.695100e+02 5.820001e+01\n13 21842     -1.281600e+02 4.930200e+02\n14 21842     -5.095001e+01 1.532400e+02\n11 21843     -2.846100e+02 5.673999e+01\n13 21843     -2.464800e+02 4.881100e+02\n14 21843     -1.865700e+02 1.534100e+02\n11 21844     -3.835900e+02 4.906000e+01\n14 21844     -3.750600e+02 1.442800e+02\n11 21845     -3.858100e+02 4.414001e+01\n13 21845     -4.112500e+02 4.666400e+02\n14 21845     -3.765900e+02 1.383000e+02\n11 21846     -8.495001e+01 3.857999e+01\n13 21846     -3.022998e+01 4.747000e+02\n14 21846     6.077002e+01 1.289700e+02\n11 21847     -8.946997e+01 2.688000e+01\n14 21847     2.480601e+02 1.396400e+02\n11 21848     -4.230600e+02 7.539978e+00\n13 21848     -4.418200e+02 4.238000e+02\n14 21848     -4.160100e+02 9.216000e+01\n11 21849     1.923600e+02 -1.972998e+01\n13 21849     2.399900e+02 4.176700e+02\n14 21849     3.754000e+02 5.497998e+01\n11 21850     4.671300e+02 -2.271002e+01\n13 21850     4.855000e+02 4.163300e+02\n11 21851     3.224000e+02 -2.515997e+01\n14 21851     5.133000e+02 4.634003e+01\n11 21852     1.602300e+02 -3.102002e+01\n13 21852     2.119100e+02 4.061500e+02\n14 21852     3.420300e+02 4.238000e+01\n11 21853     1.678600e+02 -3.131000e+01\n13 21853     2.183800e+02 4.054400e+02\n14 21853     3.494500e+02 4.137000e+01\n11 21854     3.575900e+02 -8.779999e+01\n14 21854     5.479200e+02 -2.863000e+01\n11 21855     -1.813700e+02 -1.072000e+02\n13 21855     -1.065700e+02 3.184600e+02\n11 21856     4.580601e+02 -1.115700e+02\n13 21856     4.706700e+02 3.258500e+02\n11 21857     4.299900e+02 -1.150800e+02\n13 21857     4.456400e+02 3.222700e+02\n14 21857     6.232400e+02 -6.198999e+01\n11 21858     -1.443300e+02 -1.342100e+02\n13 21858     -7.115997e+01 2.915600e+02\n14 21858     3.609985e+00 -7.866998e+01\n11 21859     -2.563700e+02 -1.349200e+02\n13 21859     -1.772600e+02 2.861800e+02\n14 21859     -1.220900e+02 -7.989001e+01\n11 21860     -1.365800e+02 -1.356300e+02\n13 21860     -6.434003e+01 2.908200e+02\n11 21861     -8.288000e+01 -1.567000e+02\n13 21861     -1.453003e+01 2.703200e+02\n11 21862     -3.585000e+02 -1.600300e+02\n13 21862     -2.755500e+02 2.558900e+02\n14 21862     -2.410400e+02 -1.098400e+02\n11 21863     1.838600e+02 -1.624500e+02\n14 21863     3.584399e+02 -1.145200e+02\n11 21864     1.507800e+02 -1.633500e+02\n13 21864     1.970100e+02 2.696500e+02\n11 21865     -4.153600e+02 -1.674200e+02\n13 21865     -3.504300e+02 2.396200e+02\n14 21865     -3.304800e+02 -1.240200e+02\n11 21866     -4.760500e+02 -2.130200e+02\n13 21866     -5.146600e+02 1.739300e+02\n14 21866     -5.327700e+02 -1.903000e+02\n11 21867     -4.753900e+02 -2.189400e+02\n13 21867     -5.133000e+02 1.672900e+02\n14 21867     -5.320800e+02 -1.983500e+02\n11 21868     -2.047500e+02 -3.019600e+02\n12 21868     -7.525600e+02 4.037400e+02\n11 21869     -7.787000e+01 -3.271600e+02\n13 21869     -1.028998e+01 9.937000e+01\n14 21869     6.638000e+01 -3.128300e+02\n11 21870     1.506100e+02 -4.032500e+02\n14 21870     3.137400e+02 -4.033400e+02\n11 21871     -1.049800e+02 -4.295600e+02\n13 21871     -3.497998e+01 -2.349976e+00\n14 21871     3.029999e+01 -4.383500e+02\n11 21872     -2.005000e+02 -4.748300e+02\n14 21872     -7.866998e+01 -4.949900e+02\n11 21873     1.978600e+02 -5.266801e+02\n14 21873     4.137900e+02 -5.408300e+02\n11 21874     4.557001e+01 2.289400e+02\n14 21874     9.706000e+01 3.592000e+02\n11 21875     2.838900e+02 2.092200e+02\n14 21875     3.800900e+02 3.268900e+02\n11 21876     2.838900e+02 2.092200e+02\n14 21876     3.800900e+02 3.268900e+02\n11 21877     5.925000e+01 1.815200e+02\n14 21877     1.239100e+02 2.987700e+02\n11 21878     6.869995e+00 1.783300e+02\n14 21878     6.226001e+01 2.960300e+02\n11 21879     5.019800e+02 1.702100e+02\n14 21879     6.349900e+02 2.752400e+02\n11 21880     -1.743400e+02 1.471400e+02\n14 21880     -1.226200e+02 2.628800e+02\n11 21881     -3.095300e+02 1.430300e+02\n14 21881     -2.848400e+02 2.602900e+02\n11 21882     1.314500e+02 1.353500e+02\n13 21882     1.573700e+02 5.816900e+02\n11 21883     1.022600e+02 1.308600e+02\n13 21883     1.297900e+02 5.770800e+02\n14 21883     2.485200e+02 2.366900e+02\n11 21884     1.597800e+02 1.288100e+02\n13 21884     1.859500e+02 5.755300e+02\n14 21884     3.129600e+02 2.335400e+02\n11 21885     1.691900e+02 1.285100e+02\n13 21885     1.962600e+02 5.736800e+02\n14 21885     3.250699e+02 2.310400e+02\n11 21886     1.304500e+02 1.242500e+02\n13 21886     1.589700e+02 5.697900e+02\n14 21886     2.819700e+02 2.277300e+02\n11 21887     2.808101e+02 1.116600e+02\n13 21887     3.065100e+02 5.566900e+02\n14 21887     4.526700e+02 2.095700e+02\n11 21888     -2.882800e+02 1.055800e+02\n13 21888     -2.826200e+02 5.427900e+02\n14 21888     -2.228600e+02 2.147000e+02\n11 21889     1.077400e+02 1.049900e+02\n13 21889     1.408000e+02 5.491000e+02\n14 21889     2.607300e+02 2.056400e+02\n11 21890     2.593199e+02 9.807001e+01\n13 21890     2.887900e+02 5.422200e+02\n14 21890     4.320000e+02 1.938800e+02\n11 21891     2.596000e+02 8.601001e+01\n13 21891     2.909900e+02 5.296400e+02\n14 21891     4.348300e+02 1.798700e+02\n11 21892     -3.162200e+02 8.426999e+01\n14 21892     -2.755300e+02 1.876200e+02\n11 21893     2.701500e+02 8.320999e+01\n13 21893     3.008300e+02 5.264300e+02\n14 21893     4.463800e+02 1.759100e+02\n11 21894     2.322300e+02 8.094000e+01\n14 21894     4.046801e+02 1.741900e+02\n11 21895     -3.560500e+02 7.964999e+01\n13 21895     -3.698700e+02 5.091200e+02\n14 21895     -3.245900e+02 1.827100e+02\n11 21896     1.504800e+02 7.203000e+01\n13 21896     1.892900e+02 5.135400e+02\n14 21896     3.164200e+02 1.646500e+02\n11 21897     1.238400e+02 6.966000e+01\n14 21897     2.876899e+02 1.622500e+02\n11 21898     2.040300e+02 5.213000e+01\n13 21898     2.440400e+02 4.934600e+02\n14 21898     3.801899e+02 1.404400e+02\n11 21899     1.663000e+02 4.550000e+01\n13 21899     2.096801e+02 4.862400e+02\n11 21900     2.186700e+02 4.494000e+01\n14 21900     3.985800e+02 1.310900e+02\n11 21901     1.835000e+02 4.092999e+01\n13 21901     2.271000e+02 4.808300e+02\n11 21902     -3.481600e+02 3.579999e+01\n13 21902     -3.579900e+02 4.588800e+02\n14 21902     -3.165800e+02 1.267500e+02\n11 21903     2.392700e+02 3.132001e+01\n13 21903     2.825000e+02 4.712100e+02\n14 21903     4.253600e+02 1.144200e+02\n11 21904     3.404900e+02 2.237000e+01\n13 21904     3.766400e+02 4.630000e+02\n14 21904     5.367100e+02 1.027500e+02\n11 21905     -4.739500e+02 1.925000e+01\n14 21905     -5.054000e+02 1.077000e+02\n11 21906     -4.125300e+02 -4.520020e+00\n13 21906     -4.256600e+02 4.112100e+02\n14 21906     -3.987800e+02 7.706000e+01\n11 21907     2.644900e+02 -3.628998e+01\n13 21907     3.032500e+02 4.012900e+02\n14 21907     4.508101e+02 3.407001e+01\n11 21908     -4.657100e+02 -4.506000e+01\n13 21908     -4.746700e+02 3.639300e+02\n14 21908     -4.609400e+02 2.628998e+01\n11 21909     5.218400e+02 -6.603998e+01\n14 21909     7.240699e+02 -5.859985e+00\n11 21910     -1.397998e+01 -6.646997e+01\n13 21910     5.004999e+01 3.655500e+02\n14 21910     1.502500e+02 1.539978e+00\n11 21911     -1.234400e+02 -7.271002e+01\n13 21911     -5.306000e+01 3.555400e+02\n14 21911     2.879999e+01 -5.390015e+00\n11 21912     4.708900e+02 -8.445001e+01\n13 21912     4.843000e+02 3.537700e+02\n14 21912     6.692200e+02 -2.602002e+01\n11 21913     1.816700e+02 -9.012000e+01\n14 21913     3.604200e+02 -2.900000e+01\n11 21914     -1.659500e+02 -1.206800e+02\n13 21914     -9.179999e+01 3.048100e+02\n11 21915     -3.143300e+02 -1.399500e+02\n13 21915     -2.339200e+02 2.770900e+02\n14 21915     -1.894800e+02 -8.725000e+01\n11 21916     -1.054800e+02 -1.492700e+02\n14 21916     4.597998e+01 -9.696997e+01\n11 21917     -3.535300e+02 -1.605500e+02\n13 21917     -2.710000e+02 2.547100e+02\n14 21917     -2.355700e+02 -1.109100e+02\n11 21918     -1.246000e+02 -1.931900e+02\n13 21918     -5.263000e+01 2.310800e+02\n11 21919     -1.246000e+02 -1.931900e+02\n12 21919     -6.688400e+02 5.787000e+02\n14 21919     2.240997e+01 -1.508100e+02\n11 21920     -7.947998e+01 -1.923300e+02\n13 21920     -1.139001e+01 2.343400e+02\n14 21920     7.135999e+01 -1.489200e+02\n11 21921     4.632900e+02 -2.082000e+02\n14 21921     6.540699e+02 -1.727200e+02\n11 21922     -5.214900e+02 -3.005700e+02\n13 21922     -5.394300e+02 7.985001e+01\n14 21922     -5.759900e+02 -3.017700e+02\n11 21923     -4.408900e+02 -3.587500e+02\n13 21923     -4.229600e+02 3.221997e+01\n11 21924     -4.580000e+02 -3.611100e+02\n14 21924     -4.643200e+02 -3.727500e+02\n11 21925     2.907000e+02 -4.363100e+02\n12 21925     -9.022998e+01 3.196600e+02\n13 21925     3.305400e+02 1.426001e+01\n14 21925     4.890200e+02 -4.369100e+02\n15 21925     1.451600e+02 5.754600e+02\n11 21926     -1.845600e+02 -4.836900e+02\n13 21926     -1.057300e+02 -5.877002e+01\n14 21926     -6.126001e+01 -5.058800e+02\n11 21927     1.766998e+01 -4.847200e+02\n13 21927     8.971997e+01 -4.469000e+01\n14 21927     1.840100e+02 -4.996300e+02\n15 21927     -2.499400e+02 4.697700e+02\n11 21928     -2.871002e+01 -5.250699e+02\n12 21928     -4.437600e+02 1.519900e+02\n13 21928     5.900000e+01 -8.263000e+01\n14 21928     1.439100e+02 -5.475200e+02\n11 21929     -5.507001e+01 1.928900e+02\n14 21929     -2.046002e+01 3.150400e+02\n11 21930     6.914001e+01 8.698001e+01\n13 21930     1.031200e+02 5.279200e+02\n14 21930     2.169100e+02 1.832200e+02\n11 21931     2.031600e+02 6.579001e+01\n14 21931     3.774800e+02 1.559600e+02\n11 21932     6.382001e+01 1.757001e+01\n13 21932     1.121400e+02 4.551100e+02\n11 21933     4.870400e+02 1.531000e+01\n14 21933     6.917100e+02 9.145001e+01\n11 21934     2.561600e+02 1.108002e+01\n14 21934     4.452000e+02 9.064001e+01\n11 21935     3.521100e+02 6.510010e+00\n13 21935     3.855100e+02 4.465400e+02\n14 21935     5.474700e+02 8.389001e+01\n11 21936     2.817300e+02 -3.275000e+01\n14 21936     4.688600e+02 3.800000e+01\n11 21937     1.690300e+02 -3.534998e+01\n13 21937     2.196100e+02 4.012500e+02\n14 21937     3.505400e+02 3.653003e+01\n11 21938     2.626801e+02 -6.647998e+01\n14 21938     4.474100e+02 -1.859985e+00\n11 21939     -4.061500e+02 -9.690002e+01\n13 21939     -3.239700e+02 3.219900e+02\n14 21939     -2.907600e+02 -3.035999e+01\n11 21940     -3.368100e+02 -1.025300e+02\n13 21940     -2.555700e+02 3.171900e+02\n14 21940     -2.111800e+02 -3.946997e+01\n11 21941     8.276001e+01 -1.056900e+02\n13 21941     1.379800e+02 3.239500e+02\n11 21942     -4.338700e+02 -1.211100e+02\n13 21942     -3.979900e+02 2.882300e+02\n11 21943     -4.688200e+02 -1.649100e+02\n13 21943     -4.935600e+02 2.301900e+02\n14 21943     -5.003000e+02 -1.250800e+02\n11 21944     -2.893900e+02 -2.098700e+02\n13 21944     -2.073000e+02 2.075800e+02\n14 21944     -1.639200e+02 -1.706600e+02\n11 21945     -2.295500e+02 -3.199800e+02\n13 21945     -1.484300e+02 9.854001e+01\n14 21945     -1.019800e+02 -3.056200e+02\n11 21946     -1.211200e+02 1.815800e+02\n14 21946     -9.696002e+01 3.033700e+02\n11 21947     5.096300e+02 1.639500e+02\n14 21947     6.440900e+02 2.665300e+02\n11 21948     -5.322998e+01 1.324800e+02\n13 21948     -6.403998e+01 5.744600e+02\n11 21949     -5.322998e+01 1.324800e+02\n13 21949     -6.403998e+01 5.744600e+02\n14 21949     2.658002e+01 2.407000e+02\n11 21950     2.842500e+02 1.270000e+02\n13 21950     3.078300e+02 5.732200e+02\n14 21950     4.541300e+02 2.276900e+02\n11 21951     2.641899e+02 9.975000e+01\n13 21951     2.936500e+02 5.430900e+02\n14 21951     4.378800e+02 1.947800e+02\n11 21952     3.215800e+02 7.147000e+01\n13 21952     3.516899e+02 5.142000e+02\n14 21952     5.060699e+02 1.611500e+02\n11 21953     -8.181000e+01 -3.580017e+00\n13 21953     -2.433002e+01 4.315900e+02\n14 21953     6.578998e+01 8.010999e+01\n11 21954     1.525900e+02 -4.219000e+01\n13 21954     2.031500e+02 3.928400e+02\n14 21954     3.312800e+02 2.788000e+01\n11 21955     3.081600e+02 -6.932001e+01\n13 21955     3.412400e+02 3.670200e+02\n11 21956     -3.881800e+02 -7.042999e+01\n13 21956     -3.185500e+02 3.485600e+02\n14 21956     -2.821500e+02 1.500244e-01\n11 21957     -4.567999e+01 -7.013000e+01\n14 21957     1.147000e+02 -2.169983e+00\n11 21958     -3.850200e+02 -7.735999e+01\n13 21958     -3.123100e+02 3.415200e+02\n14 21958     -2.753600e+02 -8.630005e+00\n11 21959     2.130200e+02 -7.804999e+01\n13 21959     2.547300e+02 3.575100e+02\n14 21959     3.929900e+02 -1.475000e+01\n11 21960     -3.083800e+02 -3.173900e+02\n13 21960     -2.224700e+02 9.647000e+01\n14 21960     -1.914700e+02 -3.034400e+02\n11 21961     -2.463000e+01 1.948200e+02\n14 21961     2.303003e+01 3.143200e+02\n11 21962     -2.872998e+01 1.451000e+02\n14 21962     5.142999e+01 2.564900e+02\n11 21963     2.580200e+02 9.026001e+01\n13 21963     2.888300e+02 5.329000e+02\n14 21963     4.320699e+02 1.839600e+02\n11 21964     -2.151800e+02 -4.886300e+02\n13 21964     -1.333500e+02 -6.463000e+01\n14 21964     -9.620001e+01 -5.117500e+02\n11 21965     7.583002e+01 2.106900e+02\n14 21965     1.457900e+02 3.382500e+02\n11 21966     -9.165002e+01 1.623500e+02\n14 21966     -2.598999e+01 2.787500e+02\n11 21967     -2.175000e+02 1.398100e+02\n14 21967     -1.729400e+02 2.549600e+02\n11 21968     1.859100e+02 -1.904999e+01\n14 21968     3.687300e+02 5.653998e+01\n11 21969     5.326801e+02 -1.133500e+02\n14 21969     7.332700e+02 -6.087000e+01\n11 21970     5.194800e+02 1.707900e+02\n14 21970     6.554000e+02 2.760500e+02\n11 21971     5.194800e+02 1.707900e+02\n14 21971     6.554000e+02 2.760500e+02\n11 21972     2.968101e+02 1.201800e+02\n14 21972     4.684301e+02 2.207000e+02\n11 21973     2.859500e+02 9.101999e+01\n13 21973     3.132600e+02 5.361000e+02\n14 21973     4.597500e+02 1.872100e+02\n11 21974     2.859500e+02 9.101999e+01\n13 21974     3.132600e+02 5.361000e+02\n11 21975     -3.415200e+02 8.987000e+01\n13 21975     -3.535600e+02 5.206100e+02\n14 21975     -3.059500e+02 1.945600e+02\n11 21976     2.527800e+02 6.617001e+01\n13 21976     2.864000e+02 5.101400e+02\n14 21976     4.295800e+02 1.578100e+02\n11 21977     8.666998e+01 -3.626100e+02\n12 21977     -3.593500e+02 3.734300e+02\n11 21978     2.134500e+02 4.344000e+01\n13 21978     2.540000e+02 4.867900e+02\n14 21978     3.901400e+02 1.346000e+02\n11 21979     3.493900e+02 -2.388000e+01\n13 21979     3.813500e+02 4.179400e+02\n14 21979     5.434100e+02 5.070001e+01\n11 21980     -2.157200e+02 8.567001e+01\n13 21980     -1.814600e+02 5.281800e+02\n14 21980     -1.101000e+02 1.841900e+02\n11 21981     1.741100e+02 -1.834003e+01\n13 21981     2.244800e+02 4.169200e+02\n14 21981     3.570100e+02 5.467999e+01\n11 21982     2.096800e+02 -1.192000e+02\n13 21982     3.358500e+02 3.059200e+02\n14 21982     4.909600e+02 -7.758002e+01\n11 21983     3.037100e+02 -2.112000e+02\n14 21983     4.837800e+02 -1.765900e+02\n12 21984     -3.110300e+02 5.217300e+02\n14 21984     3.091200e+02 -2.237400e+02\n12 21985     -8.234100e+02 3.338400e+02\n14 21985     -1.415400e+02 -3.333400e+02\n12 21986     -6.677200e+02 2.775800e+02\n15 21986     -5.430100e+02 5.753600e+02\n12 21987     -6.677200e+02 2.775800e+02\n15 21987     -5.430100e+02 5.753600e+02\n12 21988     -6.456500e+02 2.774800e+02\n15 21988     -5.165500e+02 5.747800e+02\n12 21989     -6.090800e+02 2.769800e+02\n15 21989     -4.726400e+02 5.722500e+02\n12 21990     -6.096500e+02 2.740300e+02\n15 21990     -4.736000e+02 5.689900e+02\n12 21991     -6.096500e+02 2.740300e+02\n15 21991     -4.736000e+02 5.689900e+02\n12 21992     -6.986000e+02 2.730000e+02\n15 21992     -5.785500e+02 5.723300e+02\n12 21993     4.050800e+02 2.722200e+02\n15 21993     6.760200e+02 4.054500e+02\n12 21994     -7.755600e+02 2.451800e+02\n15 21994     -6.669000e+02 5.455500e+02\n12 21995     -7.194200e+02 2.451400e+02\n15 21995     -6.035600e+02 5.424000e+02\n12 21996     -7.194200e+02 2.451400e+02\n15 21996     -6.035600e+02 5.424000e+02\n12 21997     -5.841998e+01 2.408300e+02\n14 21997     5.291000e+02 -5.781700e+02\n12 21998     -7.275300e+02 2.194700e+02\n15 21998     -6.134000e+02 5.147800e+02\n12 21999     -7.172800e+02 2.192500e+02\n14 21999     -8.082001e+01 -4.416500e+02\n15 21999     -6.012100e+02 5.138900e+02\n12 22000     -7.288100e+02 2.138700e+02\n15 22000     -6.148900e+02 5.088500e+02\n12 22001     -7.629200e+02 2.015100e+02\n15 22001     -6.532500e+02 4.976200e+02\n12 22002     -7.617100e+02 1.988500e+02\n15 22002     -6.516700e+02 4.949700e+02\n12 22003     -7.861600e+02 1.946600e+02\n15 22003     -6.762000e+02 4.946800e+02\n12 22004     1.797200e+02 1.919500e+02\n15 22004     2.202700e+02 2.450800e+02\n12 22005     -2.630500e+02 1.765100e+02\n15 22005     -1.051700e+02 4.074300e+02\n12 22006     5.811801e+02 1.518000e+02\n15 22006     8.574600e+02 2.148000e+02\n12 22007     9.422998e+01 1.361900e+02\n15 22007     1.022700e+02 1.880400e+02\n12 22008     5.176200e+02 1.078900e+02\n15 22008     7.790400e+02 1.808900e+02\n12 22009     1.201100e+02 1.054100e+02\n15 22009     1.247000e+02 1.477500e+02\n12 22010     1.903101e+02 1.026100e+02\n15 22010     2.071300e+02 1.346800e+02\n12 22011     -4.101000e+02 8.723999e+01\n13 22011     7.904999e+01 -1.367700e+02\n12 22012     3.760000e+02 8.484998e+01\n13 22012     6.748600e+02 -2.492100e+02\n15 22012     4.657900e+02 1.058800e+02\n12 22013     5.834200e+02 7.988000e+01\n15 22013     8.491400e+02 1.296100e+02\n12 22014     5.882600e+02 7.028003e+01\n15 22014     8.529900e+02 1.172100e+02\n12 22015     2.012400e+02 2.071002e+01\n15 22015     2.059399e+02 4.029999e+01\n12 22016     2.541400e+02 1.539978e+00\n15 22016     2.712600e+02 1.334998e+01\n12 22017     3.052700e+02 -5.890015e+00\n15 22017     3.294000e+02 -4.200012e+00\n12 22018     6.295699e+02 -1.178003e+01\n15 22018     8.637800e+02 -2.750000e+00\n12 22019     1.276200e+02 -3.147998e+01\n15 22019     1.120000e+02 -5.549988e+00\n12 22020     9.953998e+01 -9.117999e+01\n15 22020     6.446002e+01 -7.009003e+01\n12 22021     -1.644200e+02 -9.631000e+01\n15 22021     -2.046000e+02 -1.921997e+01\n12 22022     -1.594200e+02 -1.181200e+02\n15 22022     -2.099900e+02 -4.750000e+01\n12 22023     1.877600e+02 -1.486300e+02\n15 22023     1.436801e+02 -1.538200e+02\n12 22024     2.204000e+02 -1.854400e+02\n15 22024     1.817700e+02 -1.958400e+02\n12 22025     2.861300e+02 -2.266900e+02\n15 22025     2.675100e+02 -2.439600e+02\n12 22026     8.434003e+01 -2.341500e+02\n15 22026     3.107001e+01 -2.173400e+02\n12 22027     -4.371900e+02 -2.355000e+02\n15 22027     -4.285200e+02 -7.291998e+01\n12 22028     -5.562500e+02 -2.378800e+02\n15 22028     -5.467800e+02 -5.390002e+01\n12 22029     -5.611200e+02 -2.403400e+02\n15 22029     -5.526700e+02 -5.596002e+01\n12 22030     -4.357900e+02 -2.404200e+02\n15 22030     -4.284600e+02 -7.885999e+01\n12 22031     -5.903300e+02 -2.418100e+02\n15 22031     -5.816000e+02 -5.284998e+01\n12 22032     7.084100e+02 -2.548400e+02\n15 22032     8.331400e+02 -3.424300e+02\n12 22033     -7.015800e+02 -2.589700e+02\n15 22033     -6.948300e+02 -5.325000e+01\n12 22034     1.082600e+02 5.816000e+02\n13 22034     5.077300e+02 2.091300e+02\n12 22035     -9.581000e+01 5.753600e+02\n13 22035     3.494000e+02 2.106200e+02\n12 22036     -1.683800e+02 5.553700e+02\n13 22036     2.932500e+02 1.978700e+02\n12 22037     -6.738200e+02 5.229900e+02\n14 22037     8.770020e+00 -1.943700e+02\n12 22038     -6.398500e+02 3.514100e+02\n14 22038     6.409973e+00 -3.385200e+02\n12 22039     -8.226000e+02 3.282700e+02\n14 22039     -1.421300e+02 -3.382400e+02\n12 22040     -8.055100e+02 3.011900e+02\n14 22040     -1.337600e+02 -3.621200e+02\n12 22041     -1.368600e+02 2.469800e+02\n13 22041     2.910200e+02 -4.059003e+01\n12 22042     -7.728800e+02 1.789800e+02\n15 22042     -6.611700e+02 4.779000e+02\n12 22043     2.093000e+02 1.509000e+02\n15 22043     2.450400e+02 1.913500e+02\n12 22044     -2.274400e+02 1.432300e+02\n13 22044     2.252700e+02 -1.330700e+02\n12 22045     -1.204900e+02 6.966998e+01\n15 22045     -1.244300e+02 1.612200e+02\n12 22046     -3.455200e+02 -1.898999e+01\n13 22046     1.190600e+02 -2.259200e+02\n12 22047     -6.050000e+01 2.609600e+02\n13 22047     3.602400e+02 -7.472998e+01\n14 22047     5.284301e+02 -5.547100e+02\n12 22048     2.222800e+02 2.479100e+02\n13 22048     5.693000e+02 -1.142900e+02\n15 22048     3.047200e+02 3.189100e+02\n12 22049     -6.482900e+02 1.844000e+02\n15 22049     -5.142200e+02 4.886100e+02\n12 22050     -2.203700e+02 -5.590997e+01\n13 22050     2.173300e+02 -2.869200e+02\n12 22051     -9.040002e+01 -7.678998e+01\n13 22051     3.095300e+02 -3.193900e+02\n15 22051     -1.259500e+02 -1.223999e+01\n12 22052     -7.957001e+01 -2.211900e+02\n15 22052     -1.295200e+02 -1.641900e+02\n12 22053     -4.293800e+02 -2.396100e+02\n13 22053     4.287000e+01 -3.814700e+02\n12 22054     -4.112000e+02 -2.755900e+02\n13 22054     5.319000e+01 -4.114000e+02\n15 22054     -4.150600e+02 -1.247500e+02\n12 22055     -6.589001e+01 3.019100e+02\n15 22055     1.675699e+02 5.467800e+02\n12 22056     -2.313900e+02 -2.495300e+02\n13 22056     1.859500e+02 -4.179100e+02\n12 22057     -2.408200e+02 3.850200e+02\n13 22057     2.239399e+02 7.769000e+01\n14 22057     3.541100e+02 -3.510100e+02\n12 22058     -5.960200e+02 3.155100e+02\n13 22058     -3.254999e+01 4.920001e+01\n12 22059     5.223800e+02 1.135300e+02\n15 22059     7.846801e+02 1.861600e+02\n12 22060     -4.192100e+02 -2.872700e+02\n15 22060     -4.260400e+02 -1.358300e+02\n12 22061     2.881300e+02 1.585100e+02\n13 22061     6.117600e+02 -1.874400e+02\n12 22062     -1.153600e+02 8.780029e+00\n13 22062     2.972800e+02 -2.537900e+02\n12 22063     1.802800e+02 5.973800e+02\n13 22063     5.683600e+02 2.207100e+02\n14 22063     7.793900e+02 -1.872000e+02\n13 22064     2.403199e+02 6.599731e-01\n15 22064     -1.429993e+00 5.502700e+02\n13 22065     9.066998e+01 -3.471002e+01\n14 22065     1.856300e+02 -4.869399e+02\n15 22065     -2.457200e+02 4.853300e+02\n13 22066     6.387000e+02 -5.437000e+01\n15 22066     5.966801e+02 4.643500e+02\n13 22067     -2.520700e+02 -5.721997e+01\n14 22067     -2.428200e+02 -4.944301e+02\n15 22067     -8.082100e+02 4.273600e+02\n13 22068     -1.008500e+02 -8.966998e+01\n14 22068     -5.752002e+01 -5.462000e+02\n15 22068     -5.554200e+02 3.868700e+02\n13 22069     3.371300e+02 -1.565800e+02\n15 22069     -7.259998e+01 2.442600e+02\n13 22070     -1.509900e+02 -2.296100e+02\n15 22070     -6.677100e+02 1.555800e+02\n13 22071     -2.067200e+02 -2.419600e+02\n15 22071     -7.530400e+02 1.337500e+02\n13 22072     -2.084800e+02 -2.446000e+02\n15 22072     -7.565000e+02 1.293000e+02\n13 22073     3.361500e+02 -2.759100e+02\n15 22073     -8.146002e+01 5.587000e+01\n13 22074     5.983002e+01 -2.790600e+02\n15 22074     -3.663300e+02 8.373999e+01\n13 22075     3.418800e+02 -2.791500e+02\n15 22075     -7.394000e+01 5.016998e+01\n13 22076     -7.927002e+01 -2.831700e+02\n15 22076     -5.751800e+02 7.284998e+01\n13 22077     5.121997e+01 -2.857100e+02\n15 22077     -3.813500e+02 7.392999e+01\n13 22078     3.679200e+02 -2.890300e+02\n15 22078     -3.883002e+01 3.396997e+01\n13 22079     -1.754700e+02 -2.927600e+02\n15 22079     -7.191700e+02 5.409998e+01\n13 22080     5.198800e+02 -3.184500e+02\n15 22080     1.850500e+02 -1.271002e+01\n13 22081     4.119500e+02 -3.230500e+02\n15 22081     1.595001e+01 -2.114001e+01\n13 22082     1.126800e+02 -4.855200e+02\n15 22082     -3.535400e+02 -2.381200e+02\n13 22083     6.044600e+02 -2.841998e+01\n15 22083     5.510800e+02 5.071200e+02\n13 22084     5.620001e+01 -2.698700e+02\n15 22084     -3.689400e+02 9.884000e+01\n13 22085     -2.541998e+01 -3.533000e+02\n15 22085     -5.142700e+02 -3.601001e+01\n13 22086     -1.955900e+02 -3.773300e+02\n15 22086     -7.698100e+02 -8.114001e+01\n13 22087     5.309003e+01 -2.096300e+02\n15 22087     -3.567100e+02 1.964500e+02\n13 22088     -1.722800e+02 -2.958000e+02\n15 22088     -7.155600e+02 4.906000e+01\n13 22089     -4.651001e+01 -3.769800e+02\n15 22089     -5.508800e+02 -7.258002e+01\n13 22090     6.371100e+02 -4.607001e+01\n15 22090     5.948101e+02 4.769100e+02\n13 22091     -9.215997e+01 -2.152800e+02\n15 22091     -5.756900e+02 1.820000e+02\n13 22092     -1.344900e+02 -2.470200e+02\n15 22092     -6.465600e+02 1.298700e+02\n13 22093     7.197998e+01 -2.940800e+02\n15 22093     -3.537400e+02 6.079999e+01\n13 22094     4.086400e+02 -2.287400e+02\n15 22094     1.708002e+01 1.250200e+02\n13 22095     7.952002e+01 -5.238199e+02\n15 22095     -4.078200e+02 -2.965800e+02\n13 22096     1.065500e+02 -5.634399e+02\n15 22096     -3.789600e+02 -3.549700e+02\n13 22097     9.940002e+01 -5.793700e+02\n15 22097     -3.944900e+02 -3.789900e+02\n13 22098     3.395300e+02 1.659973e+00\n15 22098     1.509301e+02 5.550700e+02\n14 22099     -2.492600e+02 -3.784700e+02\n15 22099     -8.605900e+02 5.703900e+02\n14 22100     6.095001e+01 -4.518600e+02\n15 22100     -3.997800e+02 5.197300e+02\n14 22101     8.408002e+01 -4.590699e+02\n15 22101     -3.668100e+02 5.134200e+02\n14 22102     6.578003e+01 -4.800800e+02\n15 22102     -3.920800e+02 4.843700e+02\n14 22103     1.808000e+02 -5.225200e+02\n15 22103     -2.593700e+02 4.393600e+02\n14 22104     8.235999e+01 -5.621600e+02\n15 22104     -3.864900e+02 3.803600e+02\n14 22105     2.212600e+02 -4.689200e+02\n15 22105     -1.963200e+02 5.126800e+02\n-1.6943983532198115e-02\n1.1171804676513932e-02\n2.4643508831711991e-03\n7.3030995682610689e-01\n-2.6490818471043420e-01\n-1.7127892627337182e+00\n1.4300319432711681e+03\n-7.5572758535864072e-08\n3.2377569465570913e-14\n1.5049725341485708e-02\n-1.8504564785154357e-01\n-2.9278402790141456e-01\n-1.0590476152349551e+00\n-3.6017862414345798e-02\n-1.5720340175803784e+00\n1.4321374541298685e+03\n-7.3171919892612292e-08\n3.1759419019880947e-14\n-3.0793597986873011e-01\n3.2077907982952031e-01\n2.2253985096991455e-01\n8.5034483295909009e+00\n6.7499603629668741e+00\n-3.6383814384447088e+00\n1.5720470590375264e+03\n-1.5962623661947355e-08\n-1.6507904848058800e-14\n-5.0745844824357222e-01\n4.5303458110886097e-01\n2.2317202418459384e-01\n9.1306864710351512e+00\n5.9515833258622060e+00\n-7.6457709870603523e+00\n1.5825296104485496e+03\n2.8396179128925302e-08\n-1.6632889946223164e-14\n-5.4190895666684902e-01\n1.5526677008664553e-02\n-1.6877622388014260e+00\n5.1389661257507346e-01\n-3.9361473252571764e+00\n1.8563465078437710e-01\n8.0950263306504257e+02\n-3.4787985043033058e-08\n1.5727329975251402e-14\n-4.6199749901824139e-01\n-1.3462678449565035e-01\n-2.7655989910677667e-03\n6.7036162401353909e+00\n-5.6950053120212196e-01\n-2.5772976969377024e+00\n1.6264890616332227e+03\n-6.4500853555528371e-08\n1.2672672554812731e-14\n-8.3522103675774007e-02\n3.1271352334539093e-01\n2.9408525721888279e-01\n6.2819486572771588e+00\n2.3896130273141107e+00\n-5.1263805197250427e+00\n1.8404919562538214e+03\n2.2936515038096812e-08\n-5.5180676319504426e-15\n1.9560326962733694e-02\n1.4581340754881897e-01\n1.7225925889972585e-01\n2.3258419016619349e+00\n1.0874497756865391e+00\n-8.8330321074721019e-01\n1.3803662776589658e+03\n-4.9548734853836975e-08\n4.1206653633014918e-15\n-3.0426031970123302e-01\n2.4306062967665967e-01\n1.9921491985566070e-01\n7.5686772770161372e+00\n5.6697767062140612e+00\n-2.7534424108541034e+00\n1.2658741730559138e+03\n-4.0731113548610113e-08\n1.4881640896710336e-14\n-2.4718370286368840e-01\n4.1250983665351643e-01\n3.2258686917584084e-01\n8.3906521818774866e+00\n7.6356324882750588e+00\n-4.0393146074189934e+00\n1.3006437482860154e+03\n7.2570774295224158e-08\n3.7861040149889573e-17\n7.4075332554964304e-02\n5.9446011231445044e-02\n9.6119588739598152e-02\n5.9440613097427708e-01\n-1.4752921963904655e-01\n-1.1034534058507917e+00\n1.6145816582805749e+03\n-9.9667148984180577e-09\n-7.3005873105562568e-15\n-5.5851768691647696e-01\n-1.2167381494725156e-01\n1.3881817493742199e-02\n1.6460164136564166e-02\n-1.3201099561474590e+00\n-1.6817742630030383e+00\n1.3005123781399852e+03\n-9.7618462555854297e-08\n4.3157312719854263e-14\n-9.5387279002022610e-02\n1.9945484628981378e-01\n2.3854411140028939e-01\n4.2154041550066710e+00\n2.9170530103473862e+00\n-8.6454120224582920e-01\n1.6148741715790500e+03\n-2.6553673156909878e-08\n-7.1183044217437357e-15\n-2.4777543527755438e-01\n-5.6493283071549855e-02\n7.3454943551223492e-02\n6.0519868979469198e+00\n4.4157699447496307e-01\n-3.4019703341060392e+00\n1.3214450945522510e+03\n-9.9403845264522475e-08\n3.7263163633599822e-14\n-5.2302816650376893e-01\n-9.7422865121392060e-02\n2.5749828963323750e-02\n5.9851423763289127e+00\n-5.9280499357722183e-01\n-2.3806835984882517e+00\n1.5639231366371853e+03\n-4.1766427572041569e-08\n-3.1300678552939753e-15\n5.1148629137208801e-02\n4.8788101061955271e-03\n1.0306485524990512e-01\n3.0650512995840401e-01\n-4.2021910347109205e-02\n-1.3305700705714003e+00\n1.9182461401585990e+03\n-6.0378231632301450e-09\n-5.4354572172859500e-15\n-1.2055995050700867e+01\n1.2838775976205760e+01\n-4.1099369264082803e+01\n6.4168905904672933e+00\n3.8897031177598462e-01\n-2.3586282709150449e+01\n1.3051100355717297e+01\n3.8387587111611952e+00\n-2.9777932175344951e+01\n1.3060946673472820e+01\n3.5910521225905803e+00\n-2.9759080795372942e+01\n1.4265764475421857e+01\n2.4096216156436530e+01\n-5.4823971067225500e+01\n-2.5292283211391348e-01\n2.2166082122808284e+00\n-2.1712127480255084e+01\n7.6465738085189585e+00\n1.4185331909846619e+01\n-5.2070299568846060e+01\n-4.5666860198903217e-02\n1.6364966985344431e+00\n-2.1119068394959317e+01\n-9.3922118197451177e-01\n2.2977836587647551e+00\n-2.2346238379188293e+01\n-9.3157405364960315e+00\n1.4418536429929048e+01\n-4.2521843836265795e+01\n8.1564293970067787e+00\n2.0335061262211823e+01\n-5.3988836851055702e+01\n-1.0195950900706562e+01\n1.3125515245629000e+01\n-4.3394209085130001e+01\n-4.1730772942150054e+00\n-7.5818063240023132e+00\n-2.2199790899712742e+01\n-1.0122509268375650e+01\n1.3791135927519628e+01\n-4.2557863769575434e+01\n-1.4733471293428423e+01\n8.2498352883047694e+00\n-4.3983924858521931e+01\n-1.2890269048582207e+01\n1.0937199532126284e+01\n-4.3350281232011326e+01\n-1.2130155071639640e+01\n1.1551505848632800e+01\n-4.3434133604149501e+01\n-1.5814797015635117e+01\n1.3201958628459549e+01\n-3.7137407503896320e+01\n-1.3001177442484771e+01\n1.3501147848008733e+01\n-3.9152214100669255e+01\n-1.5468058273119349e+01\n1.1027549427761569e+01\n-4.0372117516000088e+01\n-1.6610320588794348e+01\n9.7705664294087935e+00\n-4.0852062306923131e+01\n-1.6481451582601814e+01\n9.5629342531111892e+00\n-4.1351192635975259e+01\n-1.4323470851485515e+01\n1.2911499278327163e+01\n-3.9067355654727223e+01\n-1.3219379436074130e+01\n1.3121021480580271e+01\n-3.9985387621304490e+01\n-1.5489847438864381e+01\n1.1887964962601497e+01\n-3.9264257259844648e+01\n-1.2943776827852947e+01\n1.3458701680174595e+01\n-3.9497609861918917e+01\n-1.4997864583910502e+01\n1.2595589164373571e+01\n-3.8679760613069767e+01\n-1.3602623476812079e+01\n1.1732592955483705e+01\n-3.9913676039271593e+01\n-1.2092389175851441e+01\n1.1723676614569490e+01\n-4.3105032426072128e+01\n4.1722704944215270e+00\n-3.2355514855075138e+00\n-2.0898219813515972e+01\n-7.5215896148395629e+00\n1.5525287225060119e+01\n-4.3000464253671616e+01\n-1.4193607584275806e+01\n1.1655580363808896e+01\n-4.0948747148487250e+01\n-1.1977669054631800e+01\n1.2193591834706842e+01\n-4.2611000137875891e+01\n-1.1487376900222156e+01\n1.3800220881593839e+01\n-4.0895083677341830e+01\n-1.3101221233134449e+01\n1.3415578674361784e+01\n-3.9678421263843397e+01\n-1.0408154999016697e+01\n1.3570337113289430e+01\n-4.2295710253066346e+01\n-1.0336996754757942e+01\n1.3677535053393420e+01\n-4.2158040485577352e+01\n-1.4890345781564415e+01\n1.0640945436069295e+01\n-4.3869696180852856e+01\n-1.5439488017453542e+01\n1.3161187543066063e+01\n-3.7426151271358222e+01\n-1.0788785281819836e+01\n1.5314053582609729e+01\n-3.9316575501054110e+01\n-3.7236295344529440e+00\n1.7707485028874459e+01\n-4.3980166340165177e+01\n-1.0535545701472845e-01\n1.9539653279129492e+01\n-4.5144051535007371e+01\n5.2883253582039504e+00\n2.1603462628752677e+01\n-4.8776240921983828e+01\n-4.0334112678002327e+00\n1.8087465979340884e+01\n-4.3206029435357927e+01\n-6.5748298583804878e+00\n1.7013709501319390e+01\n-4.1776411731661675e+01\n2.2985879446252238e+00\n2.0715198418740531e+01\n-4.6164868002967481e+01\n2.2057190846131269e+00\n4.7901626202813220e-02\n-2.0187151302722192e+01\n9.5366671051919105e-01\n2.0774161648112677e+00\n-2.0944888029865126e+01\n-2.2038985290079229e+00\n2.7569485371045586e+00\n-2.5898552543004985e+01\n1.2338447180914434e+01\n5.7576604158414844e+00\n-3.0496971231187995e+01\n-2.5695777583071417e-02\n3.0275299881657238e+00\n-2.2235316062421788e+01\n2.8027973769428818e+00\n1.9863684518901450e+00\n-2.1102311636134566e+01\n1.6462312576693374e+00\n1.7697590450305434e+00\n-2.0652195002814363e+01\n9.8607815071822891e-01\n1.7879942743277102e+00\n-2.0718835852919678e+01\n8.3223132051627893e+00\n2.0237944718676395e+01\n-5.4112453578902787e+01\n-9.1448097318851826e-02\n2.7285698495380570e+00\n-2.1982568855817838e+01\n4.0683820631426565e-01\n1.5076206891564590e+00\n-2.0793763567888718e+01\n8.3223132051627893e+00\n2.0237944718676395e+01\n-5.4112453578902787e+01\n1.3305080128217671e+01\n1.0838832728765045e+01\n-3.6982374788689015e+01\n8.4444187354981626e+00\n1.9206696987701626e+01\n-5.5914419173348932e+01\n-1.1708282462479751e+00\n7.2967385675882690e-01\n-2.1819952111983557e+01\n9.7933230112498137e-01\n1.7086448322700956e+01\n-5.0523548919760465e+01\n1.2221727333307381e+01\n5.6733498240262046e+00\n-3.1125673707298319e+01\n1.9034310574744684e-01\n-1.8160404872239508e+00\n-2.0468195445088373e+01\n-2.1659953859785546e+00\n-3.1254009490401744e+00\n-2.2563815258905613e+01\n2.1384733347218603e+00\n-3.0802223067854055e+00\n-1.9908492133886853e+01\n1.7367879819631544e+00\n1.6469729569597105e+00\n-2.0520720987391282e+01\n5.2617880228908198e-01\n-6.9185819148783523e-01\n-2.0590099857964692e+01\n6.3874618867152544e-01\n-1.3187132697230937e+00\n-2.0647550589146711e+01\n1.2647733031011533e+01\n5.1961694448864311e+00\n-2.9399490753427564e+01\n1.3795378248902359e+00\n-7.6878425985502785e-01\n-2.0350595375182053e+01\n1.4315518877604346e+01\n-5.6136513091969042e-01\n-2.9519492877392064e+01\n1.1554678526175195e-01\n-9.3933505831206432e-01\n-2.0878668350677387e+01\n3.1644261673191467e+00\n3.4677192949276954e+00\n-2.3073814094687194e+01\n7.6882406288350680e+00\n1.3206124904342259e+01\n-5.0763019819668543e+01\n2.0722453780144736e+00\n-1.1063622264341091e+00\n-2.0592690518394654e+01\n1.2420505555534725e-01\n-8.2221311682338827e-01\n-2.0853589510220068e+01\n8.9454289801556425e-02\n-1.0902014182619606e+00\n-2.0872513815887075e+01\n9.2109599944383103e+00\n2.1619764559502414e+01\n-5.2653190142864638e+01\n1.3471765895096295e+01\n2.2713785522053577e+01\n-5.5856461814886401e+01\n1.2878639971896185e+01\n4.2293346902023181e+00\n-2.9273033260772596e+01\n1.6424063017948554e+00\n-1.0696515984778230e+00\n-2.0521171853086816e+01\n4.5505258987761508e+00\n1.7915737821097192e+01\n-5.3336332066950945e+01\n2.4139404567635800e+00\n8.3602803660871206e-01\n-2.0417231525096362e+01\n1.0602586010368089e+00\n-1.2230738496607149e-01\n-2.0352919808768640e+01\n1.0537807596836548e+00\n-3.3696180808966941e-01\n-2.0302524143369787e+01\n2.3338503782330360e+00\n-7.0010616085310717e-01\n-2.0447754385917694e+01\n-4.5357684073392418e-01\n-1.4028430277113899e-01\n-2.1126653703666761e+01\n-7.7741574788884782e-01\n-1.5436954178327000e-01\n-2.1433767879003202e+01\n3.4657260888591437e+00\n1.6625427812221439e+01\n-5.4267459065268689e+01\n1.2217594885681772e+01\n6.3634069254071735e+00\n-2.9849840378886029e+01\n-1.6281775499166812e+01\n1.2161130860425370e+01\n-3.8082881954625293e+01\n-5.2714654304547910e+00\n-7.2925951614546705e+00\n-2.2500218866281099e+01\n-1.4887580637326462e+01\n1.2177848537206634e+01\n-3.9415631100726387e+01\n-1.6241020094981028e+01\n1.1438473551387050e+01\n-3.9196459729528392e+01\n-1.0755821803942682e+01\n1.4975528553103645e+01\n-3.9860281668526056e+01\n-1.1569133258224912e+01\n1.4488562828307538e+01\n-3.9833794144943880e+01\n-1.1164764827057613e+01\n1.3460130612988104e+01\n-4.1898737599725060e+01\n-1.4799564429666667e+01\n1.2716342204815238e+01\n-3.8756177758914056e+01\n-1.5693807491168926e+01\n1.3085572859702195e+01\n-3.7598626768156365e+01\n-1.3153053873076177e+01\n1.2944703745244125e+01\n-4.0267692532305148e+01\n-1.2685490734300652e+01\n1.4582316925669394e+01\n-3.8343830443086986e+01\n-1.3648482585396600e+01\n1.2706023346091859e+01\n-4.0084660671339563e+01\n-1.4821562827306279e+01\n1.3540581912810882e+01\n-3.7648893303576969e+01\n-1.2621162946078076e+01\n1.4237577619987906e+01\n-3.8773171809243763e+01\n-1.3568320609496041e+01\n1.2868279969684632e+01\n-3.9770172126916364e+01\n-1.4605638191708904e+01\n1.2358588892360890e+01\n-3.9513860021573407e+01\n-1.5465940763607176e+01\n1.3280757278973054e+01\n-3.7227731324372130e+01\n-2.9645041367630705e+00\n2.9645903136982290e+00\n-2.7351028144358924e+01\n-1.2699204776009498e+01\n1.3441487554740725e+01\n-3.8854986215733675e+01\n-1.0116366597908868e+01\n1.4107396842048257e+01\n-4.2086211787765578e+01\n1.0132852109482511e-01\n-2.9393240849989750e+00\n-2.0148603436691761e+01\n-5.2754020594404649e-01\n-2.8330358293059699e+00\n-2.0401355367757379e+01\n1.6392895412941588e-01\n-2.9443932610560153e+00\n-2.0136490713040871e+01\n-9.4108889948283217e-02\n2.4550715619215966e+00\n-2.1744987173619080e+01\n-1.5113514739570715e+00\n1.8312788520119265e+00\n-2.2717046678258033e+01\n2.1188837496369479e+00\n1.9391318001295136e+01\n-4.8385941132088298e+01\n1.5295220196544932e+00\n8.2071655723559345e-01\n-2.0292263671506728e+01\n-1.3933848707282639e+00\n1.7937497338633300e+01\n-4.6569810356910011e+01\n1.2212860553927525e+01\n6.4778662498457820e+00\n-2.9643633908279320e+01\n-9.3221027128700715e-02\n1.8403209950468398e+01\n-4.7562533963813713e+01\n-1.5439544094304034e+00\n1.7832255240560727e+01\n-4.6070953372477248e+01\n1.3365429542626959e+00\n6.1282759788998176e-01\n-2.0439494058326538e+01\n1.2652449391346192e+01\n4.4247615911446765e+00\n-3.0606401453112500e+01\n-1.0654261664994600e+00\n1.8462661659407516e+01\n-4.6580900460391419e+01\n4.8499714453899063e+00\n1.8568013426587818e+01\n-5.2627449456835592e+01\n1.2282242161958600e+01\n2.3983398862768713e+01\n-5.2970029719063078e+01\n-3.8936535834289905e+00\n1.7436672358581486e+01\n-4.4374232546556321e+01\n1.4189750097466858e+00\n6.6465398066128070e-02\n-2.0238232819780393e+01\n2.0629234670780461e+00\n8.4337164209939774e-01\n-2.0312160718578209e+01\n1.3264535216331744e+01\n1.1153884499549482e+01\n-3.6799859977304692e+01\n1.2413831988157357e+01\n2.3233173258895029e+01\n-5.4266005042200177e+01\n1.7635174543172241e+00\n1.8868427463340656e+00\n-2.0714660316808178e+01\n6.6376804370839535e+00\n2.2127463262857201e+01\n-4.8454584602940294e+01\n1.6903070320606466e+00\n2.0770382504295647e+01\n-4.5657510178754855e+01\n1.3060174061005087e+01\n1.2229091824759962e+01\n-3.5503431454087739e+01\n2.1128577062159981e+00\n1.4160407525931848e+00\n-2.0394860450600291e+01\n1.3711342103387755e+01\n1.0426131146748835e+01\n-3.5351843674485160e+01\n-6.5255159702153065e-01\n4.4489534436489381e-01\n-2.1267180361104828e+01\n1.3015738373451009e+01\n3.5312745890192989e+00\n-3.0199774599691100e+01\n1.6083339504726066e+01\n2.3441898495168537e+01\n-5.8163435344457412e+01\n-1.8916793818364128e+00\n1.6197202840298370e+01\n-4.5358442895844618e+01\n-1.1808446363523881e+00\n2.7478119504869514e+00\n-2.3063284547707990e+01\n8.2830261207640437e+00\n2.0686127143512806e+01\n-5.2993127906546619e+01\n7.2239267710232076e+00\n2.2376012093108393e+01\n-4.9416529174175501e+01\n-5.2799551794695898e-01\n2.6723175378306407e-01\n-2.1163742170969805e+01\n1.1359557582860599e-02\n6.2495774696980011e-01\n-2.0771573699160619e+01\n8.3165255109637437e-01\n8.9484952385676525e-02\n-2.0362286766267658e+01\n1.8364105537716621e-01\n8.3342962280020694e-01\n-2.0717600684879191e+01\n8.0817898835022834e+00\n2.1360086686432830e+01\n-5.1952531410324021e+01\n1.3579678340577679e+00\n1.8684379995897480e+01\n-4.8406982600175624e+01\n1.2950478659711411e+01\n2.3760714148610127e+01\n-5.3711811558258518e+01\n4.6446443931631265e+00\n2.0393329264003452e+01\n-4.9525642622783110e+01\n9.8221440171510270e+00\n2.3183310541487153e+01\n-5.1642737825743453e+01\n1.2316214207168693e+01\n2.3343672653666669e+01\n-5.3621309075430268e+01\n2.6131163467521872e+00\n9.2699250520855991e-01\n-2.0365811241946520e+01\n1.8724715944674137e+00\n7.9540614630924633e-01\n-2.0216334505583141e+01\n1.2233017753125520e+01\n2.3268149603812784e+01\n-5.4444275671850285e+01\n1.6691799382087293e+01\n2.5323290914951254e+01\n-5.6093571819062731e+01\n1.7790032255381655e-01\n7.0078961614171575e-01\n-2.0646285315253515e+01\n1.5974105213886867e+00\n9.2471637369633064e-01\n-2.0288417924540262e+01\n1.8139099498207663e+01\n2.5854993561939736e+01\n-5.6545836308224168e+01\n1.3219061973314419e+01\n1.1294631142232275e+01\n-3.6504630330334201e+01\n9.6630225425999523e+00\n2.0932735809462883e+01\n-5.5049030902396964e+01\n1.0721776241660061e+01\n2.0923799387803530e+01\n-5.5481317748320535e+01\n-1.1457626906122384e-01\n8.8811252418346684e-02\n-2.0795155195437722e+01\n1.2138810166422033e+01\n2.3541225562269158e+01\n-5.3438532145399613e+01\n1.4365210488390003e+01\n2.4332218574541379e+01\n-5.4608766822275847e+01\n1.8364105537716621e-01\n8.3342962280020694e-01\n-2.0717600684879191e+01\n1.3657202805238461e+01\n9.9999150683369749e+00\n-3.6413837776974610e+01\n-3.5180310923762574e+00\n1.7454997714689590e+01\n-4.4556239485850597e+01\n3.2027749765198528e+00\n1.9591923566476787e+01\n-4.9086611502690268e+01\n1.6592168020179749e+00\n-1.6837630677471579e-01\n-2.0154734541425299e+01\n-3.7180025088283091e+00\n1.8377309901119506e+01\n-4.2880434712214083e+01\n1.7748961744599376e+00\n2.0550615212167433e+01\n-4.5922223848483107e+01\n-3.0455372177162672e+00\n1.7106789910236383e+01\n-4.5748797041009126e+01\n-3.5035514780351478e+00\n1.7682169830158649e+01\n-4.4458256317972214e+01\n1.2626734170577036e+01\n4.5598503355297160e+00\n-3.0583962630196361e+01\n1.3360271082856562e+01\n1.0885122855036675e+01\n-3.6394407990597280e+01\n-4.3619264411510955e-02\n2.2295447889349420e+00\n-2.1537045569232845e+01\n6.5370202788479648e-01\n1.8098384480115858e+01\n-4.9148787859699354e+01\n9.0603416677682291e-01\n1.4509319240341918e+00\n-2.0617245825255605e+01\n5.5657031507539090e-01\n4.7081511083515037e-01\n-2.0472121437404901e+01\n-1.8844622060592471e+00\n1.6407886524392016e+01\n-4.5542634884489281e+01\n6.3342953770384689e+00\n2.1050491217368791e+01\n-5.0608679347726770e+01\n4.8485503664595928e+00\n1.8708353026004136e+01\n-5.2242271095875111e+01\n-1.5021810008457659e+00\n1.3136872041027745e+00\n-2.2407958355095158e+01\n-1.6222935841791761e-01\n2.2123134228013357e+00\n-2.1584473614175014e+01\n-3.9159113456349250e+00\n1.6083267542541002e+01\n-4.5942063341724655e+01\n-3.7236295344529440e+00\n1.7707485028874459e+01\n-4.3980166340165177e+01\n-1.0538455370947828e+00\n1.7744415526991332e+01\n-4.7247178851168030e+01\n-8.8251591109232419e-01\n1.4662241029298635e+00\n-2.1717147092159493e+01\n1.1608502743640880e+01\n2.3730450717361602e+01\n-5.2353791750356478e+01\n7.6300073551691805e-01\n6.0536270926437974e-01\n-2.0409404278430610e+01\n-2.6036147537945342e-01\n1.8071940297688631e+01\n-4.7689128711943660e+01\n-3.9981656427510698e-01\n1.9910673638566885e+00\n-2.1645123037312700e+01\n3.2630227535330669e+00\n2.0866573986817752e+01\n-4.6700744146307358e+01\n6.4986533040911976e-01\n1.4958871330379156e-01\n-2.0419006853449467e+01\n-1.2288126734643152e+00\n1.8364061832020091e+01\n-4.6017967789331315e+01\n1.2683796642231936e+01\n5.2830497438786148e+00\n-2.9031410780016721e+01\n2.8521546299338723e+00\n4.1943561659907175e-01\n-2.0361700757077166e+01\n1.7787386189705662e-01\n1.5646000755805314e+00\n-2.0931100390442694e+01\n1.2314271371199098e+01\n6.0746537502619624e+00\n-2.9730689209976308e+01\n2.7735106031681163e+00\n1.4564824961116165e+00\n-2.0598284877726847e+01\n1.2652449391346192e+01\n4.4247615911446765e+00\n-3.0606401453112500e+01\n4.0951565383373451e-01\n2.6804085824571050e-01\n-2.0665870796920956e+01\n1.2776650556345495e+00\n1.4042740704093339e+00\n-2.0438716590528248e+01\n4.1875391895353364e-01\n1.8773211995608460e+01\n-4.6265248158975879e+01\n6.7459117718180972e-01\n1.7096074358066833e+01\n-5.0051230600861864e+01\n1.3394159243957109e+00\n2.0581755021224417e+01\n-4.5343013618808463e+01\n1.1939754452705591e+00\n1.2907718070272540e+00\n-2.0448373197523907e+01\n1.8932345495906318e+00\n1.9132966610944969e+01\n-4.8019509549208529e+01\n-8.5478772809575898e-01\n1.8882490348273699e+01\n-4.5426978085448326e+01\n1.3696180495422472e+00\n1.9662633733490662e+01\n-4.6979349009612463e+01\n4.1787466687453806e-01\n6.3162741286761548e-01\n-2.0554022365982988e+01\n1.3394159243957109e+00\n2.0581755021224417e+01\n-4.5343013618808463e+01\n9.3534255446752118e-02\n2.7195516223500382e-01\n-2.0637581304653168e+01\n1.3773442366017805e+00\n1.3954830934354681e+00\n-2.0351285295074177e+01\n1.5241464854169031e+00\n1.9958210372136769e+01\n-4.6519459046539239e+01\n1.1859739625431242e+01\n2.3724723765358437e+01\n-5.2466039590599706e+01\n3.9913617745083674e-01\n2.0172630795454540e+00\n-2.1023513117442612e+01\n8.1692238268417161e-01\n2.1781982724504800e+00\n-2.1099504646342037e+01\n9.1568432496149410e-01\n5.8191291178252991e-01\n-2.0338934855039088e+01\n1.3493702496442914e+01\n1.0909394430848192e+01\n-3.5524135330990568e+01\n-5.4991095705615389e-01\n2.2887477806152896e+00\n-2.1965755626577852e+01\n1.3062743779832616e+01\n3.1603029887265794e+00\n-3.0560029239026250e+01\n7.9493305342873652e+00\n2.0213873996924768e+01\n-5.2951369732391150e+01\n3.2249497859761878e+00\n1.9770823583739173e+01\n-4.8800490946093888e+01\n-3.2140463460687849e+00\n1.6908957053074072e+01\n-4.5715109161108273e+01\n1.2994826882297453e+01\n3.9021671317089712e+00\n-2.9659945936566618e+01\n1.8187617222918263e+01\n2.6106116650050730e+01\n-5.7355497603229381e+01\n1.2963765286340511e+01\n1.1948407636984070e+01\n-3.7149394360261965e+01\n1.4613571808531312e+01\n2.4674742545800733e+01\n-5.4554960772568108e+01\n-1.0627971828921456e+00\n2.3561453417405978e+00\n-2.2501425054956396e+01\n3.3617627781535973e+00\n9.1146429982883526e-01\n-2.0698677277232406e+01\n-6.4059143627651183e-01\n6.4098515889956453e-01\n-2.1374256841171899e+01\n-9.1194108390327655e-01\n1.1719285173397120e+00\n-2.1665304960731568e+01\n1.1878469651213361e+00\n6.9556071779582318e-01\n-2.0318882711963433e+01\n1.5317683178570505e+01\n2.3002912771663365e+01\n-5.6786938713737726e+01\n-6.3025826326966605e+00\n1.6945667519703523e+01\n-4.2081952435603498e+01\n-3.7679686612692515e-01\n1.7940133282027251e+01\n-4.7955784215035315e+01\n-3.1910675058790470e+00\n1.7054830959582837e+01\n-4.5524739381532207e+01\n-1.1985192362468586e+00\n1.9500660810919449e+01\n-4.4045041661371791e+01\n-9.4027125764285580e-01\n1.9773185974095636e+01\n-4.4197742576349050e+01\n7.8544395308665687e+00\n2.2046282225397686e+01\n-5.0743670152472809e+01\n1.6789380935150389e+00\n2.0045590417665647e+01\n-4.6851562603133765e+01\n-3.6763637558496134e+00\n1.8230186839900430e+01\n-4.3369664921023045e+01\n1.1200650174600922e+01\n2.3560911618736167e+01\n-5.3219923481468598e+01\n-3.6103688246674310e+00\n1.8145404899226687e+01\n-4.3584183512391185e+01\n-8.5893772455667250e+00\n1.5270282559401442e+01\n-4.2180623177655256e+01\n4.1889732607337105e-01\n-1.9143510918464115e+00\n-2.0420518094431234e+01\n6.3608694044772450e-03\n-1.8704534384387734e+00\n-2.0637727739069756e+01\n-1.7745693564487164e+00\n-3.1178239113427613e+00\n-2.2028757620014712e+01\n-7.6253542938347629e-01\n-2.9135861379667780e+00\n-2.0697188471297476e+01\n-1.9053981406318772e+00\n-3.5327303723844317e+00\n-2.2466730864396581e+01\n-4.9105691867580861e+00\n1.7826764845502012e+01\n-4.2353369757813972e+01\n1.0789592042862863e+00\n2.0153005244368124e+01\n-4.5755004688004092e+01\n1.4789900886510967e+01\n2.4833230388910870e+01\n-5.4577181793970425e+01\n3.8320080323132544e+00\n1.7833875498232896e+01\n-5.2725356924413724e+01\n-6.8445948060088471e+00\n1.4108067212013117e+01\n-4.5735562528199424e+01\n5.6205975665821983e-01\n1.6251076131729303e+00\n-2.0804900055844154e+01\n-1.0075900392588000e+00\n2.5535594419515140e+00\n-2.2633344539978435e+01\n8.5066477109371111e-02\n9.1054274271166413e-01\n-2.0769610268338226e+01\n9.0344478234132861e+00\n2.2768350697236595e+01\n-5.0511476548913073e+01\n8.2935892201375125e+00\n2.1339479485500313e+01\n-5.2189494960116868e+01\n3.9855801926926082e+00\n1.7775506715226328e+01\n-5.2799253068477789e+01\n2.1783408879967174e+00\n3.9914374091663150e+00\n-2.3588058073486188e+01\n8.5571376553256986e-02\n2.1030157920721653e+00\n-2.1329186177372947e+01\n2.1393513041675258e+00\n1.3657351893664433e+00\n-2.0406519352602832e+01\n1.0406341194169380e+00\n1.2329328357734346e+00\n-2.0509167070198878e+01\n2.8762704219640960e+00\n6.0453027561640937e-01\n-2.0352143505917912e+01\n6.4335405733057249e-01\n1.0162599295740535e+00\n-2.0509039058599715e+01\n-1.7882004269556673e-01\n1.1941531076290202e+00\n-2.1014211637689829e+01\n8.6083528164265755e-01\n-7.1064505196524896e-01\n-2.0491807178028445e+01\n3.4619521428367199e+00\n-1.3591283169362218e+00\n-2.0618700219163276e+01\n2.2854781101432356e-01\n1.8936101630959957e+01\n-4.7195594508298825e+01\n1.8197862515926262e+00\n1.8654957308402913e+01\n-4.7997304717464026e+01\n-2.9911881580023976e+00\n1.7580524521950739e+01\n-4.5235277567836611e+01\n1.3368723184558204e+01\n1.0579752303956232e+01\n-3.7019347471725858e+01\n3.7800043133072614e+00\n1.8143695591893909e+01\n-5.2067191212885376e+01\n2.0360309039251701e+00\n3.9940945388128752e+00\n-2.3753882300136624e+01\n2.8719823184376776e+00\n1.7239262601809684e+00\n-2.0754210489826651e+01\n1.9153743682547841e+00\n1.6981262947868809e+00\n-2.0540172986108693e+01\n-5.4123782155797393e+00\n1.4045253655315895e+01\n-4.7980129757236618e+01\n1.2879455557813449e+01\n3.4663664075158223e+00\n-3.0631151266031676e+01\n-5.7895369390424403e+00\n1.3147831400042799e+01\n-4.8119347703240081e+01\n2.9183965502044074e+00\n7.5880985248465715e-01\n-2.0446791014248827e+01\n3.0409112722189944e+00\n6.6839096366674644e-01\n-2.0472954121382891e+01\n3.2759711629299932e+00\n4.7401919471918641e-01\n-2.0555847018519120e+01\n4.5919642229571589e-01\n4.5693801989708627e-01\n-2.0529445865898929e+01\n6.0514598143442955e-01\n3.9409186815487784e-01\n-2.0472413296170853e+01\n-3.2929859259596888e+00\n2.5614653656586808e+00\n-2.6746304877530424e+01\n1.3101407891621259e+01\n2.2624954297147376e+01\n-5.5126095920390185e+01\n1.3034363239003891e+01\n1.1903195698507638e+01\n-3.6270307593718563e+01\n5.0216811694770982e+00\n1.9572590609266015e+01\n-4.8735149704944945e+01\n6.9856454570477611e-01\n1.8642737178965991e+01\n-4.6359144837645118e+01\n1.4027285385669508e-01\n1.8653357054601333e+01\n-4.7308451851144667e+01\n6.7191900478177979e-01\n1.8435858136170580e+01\n-4.7303489811463933e+01\n6.7630976810127108e-01\n1.8255285788507713e+01\n-4.7669272440588898e+01\n-2.5364471871881169e+00\n1.7466966607799744e+01\n-4.5596649475013329e+01\n4.0089753283825083e+00\n1.8010050252824232e+01\n-5.2321934640474993e+01\n6.9035010932187602e-01\n1.6648847522869300e+01\n-5.0891432611805683e+01\n-4.7723237264024556e+00\n1.4445044306578087e+01\n-4.7902771248468142e+01\n-4.4288532821769117e-01\n2.6105039793459608e+00\n-2.2181616134461795e+01\n3.1192586217778406e+00\n5.8788435186722587e-01\n-2.0499663977212506e+01\n5.4882986522697430e-01\n8.2195233776883503e-01\n-2.0548512678579460e+01\n8.2856001753155162e-01\n5.1426196989787321e-01\n-2.0385213016720034e+01\n-5.6655369527505597e+00\n1.6932341102213559e+01\n-4.2749566588492165e+01\n1.2488273488715700e+01\n4.5987824500807513e+00\n-3.1252654354394256e+01\n-7.9764059031944912e-01\n1.8778466354748802e+00\n-2.1970578455104008e+01\n2.0798103602684819e+00\n4.3108996868874416e-01\n-2.0217920233456837e+01\n-2.6553038804439744e-01\n1.7909957570519164e-01\n-2.0978038667091024e+01\n-5.7437839723147344e-01\n1.3371718677604932e-01\n-2.1267401593821980e+01\n-5.5599310771916155e+00\n1.6751766270223612e+01\n-4.3212810269586868e+01\n2.1039819323830891e+00\n1.7896439064170384e+00\n-2.0601156224477080e+01\n-2.3041817344798005e-01\n8.2556990762616678e-01\n-2.1177747369786207e+01\n3.5847284065313817e-01\n-7.0857336355788425e-01\n-2.0842184020710967e+01\n2.1277232761039175e+00\n9.8659016464895688e-01\n-2.0412215583780423e+01\n1.8870046097032040e+00\n2.2302593237706991e-01\n-2.0121842069512294e+01\n2.6409590991818050e+00\n6.5226468686137151e-01\n-2.0659792688209691e+01\n1.2127752392012761e+01\n2.3718850786729980e+01\n-5.3166124459759388e+01\n1.2255217209500842e+01\n2.3601640149663613e+01\n-5.3294938840858379e+01\n8.0721839815782719e+00\n2.1720331114611383e+01\n-4.9952741766643754e+01\n7.5189958338431744e+00\n2.2123973685706481e+01\n-4.9748141912365114e+01\n8.6705018714232587e+00\n2.1864031918486379e+01\n-5.0191664602205243e+01\n2.0676864740989771e+00\n2.0731030556442338e+01\n-4.6159646298358403e+01\n2.6807748936126159e+00\n2.1065557449655131e+01\n-4.6659721229229824e+01\n-4.7438075457377487e+00\n1.8023184736848265e+01\n-4.2301089108271803e+01\n8.6705018714232587e+00\n2.1864031918486379e+01\n-5.0191664602205243e+01\n1.2184700444536389e+01\n5.8074104260750419e+00\n-3.0305140163469115e+01\n-8.8864868499594021e+00\n1.5008862336950145e+01\n-4.2251811258943484e+01\n-1.2181537348830304e+01\n1.2133528305904022e+01\n-4.2494856013087009e+01\n-1.0099535602886077e+01\n1.3545208003418853e+01\n-4.3088188190485283e+01\n-1.6249599827024646e+01\n1.0873895104731192e+01\n-4.0005315074989966e+01\n-9.6637150159097267e+00\n1.3414549510414110e+01\n-4.3542291609739330e+01\n-1.1088893413785170e+01\n1.3421308295690562e+01\n-4.2163711063435336e+01\n-1.5358760030907092e+01\n1.3464860017846634e+01\n-3.7197549854587066e+01\n-1.2821607836431497e+01\n1.4067737012642949e+01\n-3.8943018395153786e+01\n-1.2509878577356201e+01\n1.4147104301400155e+01\n-3.9178792513768570e+01\n-8.5558101149716244e+00\n1.4880839587155394e+01\n-4.2601952491264257e+01\n-1.6774964521482001e+01\n1.0951111022756871e+01\n-3.8876476684861117e+01\n-1.6259199264003112e+01\n9.8641114315897553e+00\n-4.1065773595289755e+01\n-8.7039829719943693e+00\n1.4469272890788989e+01\n-4.2829386410174223e+01\n-9.2554452041964534e+00\n1.4834050368805121e+01\n-4.2027438052650382e+01\n-1.4383492939494339e+01\n1.1552282998489149e+01\n-4.0307587999723680e+01\n-1.3290732589580800e+01\n1.2891003293754530e+01\n-4.0198570585358574e+01\n-1.6435371429910184e+01\n1.2038878020715476e+01\n-3.8512797438514170e+01\n-9.9203001804927968e+00\n1.3701123335653531e+01\n-4.2926977099318940e+01\n-1.1934087971829349e+01\n1.2651059631424967e+01\n-4.0910987499536091e+01\n-1.0264347053183132e+01\n1.2713210747410040e+01\n-4.3921761261321770e+01\n-1.2522373289827462e+01\n1.3759769823204016e+01\n-4.0365558888372277e+01\n-1.1123669377102347e+01\n1.4194931900934838e+01\n-4.0807980018337432e+01\n1.3295673931202414e+01\n1.0007531138580935e+01\n-3.8800670963793529e+01\n-6.9546626919971004e+00\n1.3923140494983027e+01\n-4.5781784080690841e+01\n-7.4652365129249842e+00\n1.3067414479656598e+01\n-4.6585093889592109e+01\n-6.5909911066051539e+00\n1.2792798344405389e+01\n-4.8221635873796309e+01\n1.3433666933142401e+01\n9.5830098980498217e+00\n-3.8909357962790338e+01\n-3.7048177797166701e+00\n5.7256477406348250e+00\n-4.0406917795576334e+01\n1.2693679039918074e+01\n4.3918267094101573e+00\n-3.0424313118687376e+01\n-3.1360247746674323e+00\n2.7553121960159861e+00\n-2.7056713422381069e+01\n2.3561548656792217e+00\n1.8381970576326352e+00\n-2.0713530762362055e+01\n2.8037835429402724e+00\n1.0079199302121620e+00\n-2.0465414526359240e+01\n3.1430836973774321e+00\n9.0341808484349151e-01\n-2.0556351744479063e+01\n3.2606536544633782e+00\n7.3906275714492287e-01\n-2.0603834882872551e+01\n3.2273093859361417e+00\n6.7504136381152680e-01\n-2.0550150357311892e+01\n4.1171132564308932e+00\n7.0114731949810560e-01\n-2.1058800558467460e+01\n3.1309580611551087e+00\n5.2610035590101589e-01\n-2.0464965436843066e+01\n1.3592009333910569e+01\n4.6067265985745665e-01\n-3.2514164149238155e+01\n3.2693360507304230e+00\n2.9953490798511750e-01\n-2.0539140901224222e+01\n1.6765841040720932e+00\n1.0620021175388704e-01\n-2.0216905247445268e+01\n2.9906294890934406e+00\n3.2459658638663812e-02\n-2.0425995150050941e+01\n1.4035761594176872e+01\n-3.9399742815392508e-01\n-3.1316471304500549e+01\n3.6755594961994537e-01\n-4.9225401291890025e-01\n-2.0609083952175482e+01\n1.4354450657327318e+01\n-1.1039740428759135e+00\n-3.0294893132801832e+01\n8.5419099938889975e-01\n-9.3211114158925079e-01\n-2.0546412920499009e+01\n1.4507226553145236e+01\n-1.2981954797741437e+00\n-2.9549750255143046e+01\n1.5834151967047463e+00\n-1.1733019849846329e+00\n-2.0557538696909003e+01\n1.6716627367559309e+00\n-3.1493555250260226e+00\n-1.9899131802771077e+01\n1.8070074443303608e+00\n-3.5698119220462803e+00\n-2.0394687808609905e+01\n4.9449343780499442e+00\n-7.9390974247969588e+00\n-2.1691022915015083e+01\n-6.8512993209279838e+00\n1.3858742087451770e+01\n-4.6032939988919033e+01\n-6.8512993209279838e+00\n1.3858742087451770e+01\n-4.6032939988919033e+01\n1.3307590412957966e+01\n1.1004297243611449e+01\n-3.6591097795071299e+01\n-7.0938516247507719e+00\n1.3182785348261614e+01\n-4.7146422106504062e+01\n1.3173896445196888e+01\n1.0490083023016537e+01\n-3.8761631056935272e+01\n-1.3039048518791423e+01\n1.0912188448127500e+01\n-4.3256660627858011e+01\n1.3402930232165636e+01\n9.5394826627593208e+00\n-3.8314953435368018e+01\n1.3655685554673713e+00\n3.9536305772341054e+00\n-2.3546802598987433e+01\n-3.2538910241711374e+00\n2.7664373893740497e+00\n-2.7019692101015135e+01\n1.2600096405455480e+01\n3.5422968600723004e+00\n-3.2513151025540495e+01\n-7.8885651007042830e+00\n2.9895377909522547e+00\n-3.6760640679961440e+01\n6.4168148971676198e-01\n1.9597716420040072e+00\n-2.0961201699875918e+01\n1.2978367157399504e+01\n2.8640458308627026e+00\n-3.1753811046754965e+01\n1.2920004232845582e+01\n2.8434371310636157e+00\n-3.2234317233323559e+01\n1.3129383434197834e+01\n2.7622515532892282e+00\n-3.0878220107573263e+01\n1.3520950567529295e+00\n1.6924308679558975e+00\n-2.0601687200255846e+01\n2.6542992118846209e+00\n1.6850890558811453e+00\n-2.0702944063413643e+01\n2.8886395679299874e+00\n1.6262171234656657e+00\n-2.0751348735128929e+01\n-4.8970343645297459e-01\n9.8664419547275206e-01\n-2.1168047495927009e+01\n3.3912441277466079e+00\n7.8427953133964123e-01\n-2.0673437429612910e+01\n1.4511701972882793e+00\n4.8730386745798798e-01\n-2.0228272482056457e+01\n1.3497921805510344e+01\n5.5393384004999691e-01\n-3.2845764598431195e+01\n5.2062571522364829e+00\n3.2378570380476429e-01\n-2.2147731707182526e+01\n1.3548353215941157e+01\n3.4941843311859244e-01\n-3.2835048607845962e+01\n2.6962411062885994e+00\n-1.5726103042295689e-01\n-2.0302759947449776e+01\n2.1013406276805040e+00\n-2.6298744005037017e-01\n-2.0223062708681283e+01\n-3.2014375777587684e-01\n-4.6676521625036593e-01\n-2.0971684559364125e+01\n3.2878550657184795e+00\n-5.9345145251629228e-01\n-2.0534862643088886e+01\n-5.7614272317022497e-01\n-7.7208931269166636e-01\n-2.1285036422437422e+01\n3.5971348743989937e+00\n-7.5644082585334071e-01\n-2.0797734885422908e+01\n3.4137851237508623e+00\n-7.7986686530293226e-01\n-2.0709769404852310e+01\n2.9367949877411519e+00\n-9.3855050788352890e-01\n-2.0638142029950284e+01\n6.7148516291763372e+00\n-1.2011062487968907e+00\n-2.1981281411415811e+01\n6.2623385990793290e+00\n-2.1599132752342500e+00\n-2.2253173797284695e+01\n4.2376919348770503e+00\n-3.2724206946756427e+00\n-2.0966369464175312e+01\n3.5649791379994609e+00\n-3.4730468072733496e+00\n-2.0739232178176415e+01\n3.5880034772020535e+00\n-3.5417623644608147e+00\n-2.0834903034018161e+01\n1.2023556120679338e+01\n-4.6524920723758161e+00\n-2.6022781232319097e+01\n1.1465642711031380e+01\n-5.7124777792347556e+00\n-2.4462997988831336e+01\n-3.2766201845737779e+00\n-8.0600565897427856e+00\n-2.1492631953865327e+01\n-3.3366588731656379e+00\n-8.1445603659970480e+00\n-2.1447042881277007e+01\n-1.8043787171043386e+00\n-8.2232849763896070e+00\n-2.1163310108186216e+01\n1.7546089825583882e+00\n-8.1509978974204191e+00\n-2.1171727901032003e+01\n-1.8424984271929854e+00\n-8.3138618558778195e+00\n-2.1077391903177734e+01\n1.3145277890474310e+01\n1.1513804498306326e+01\n-3.7042549241258165e+01\n1.3145277890474310e+01\n1.1513804498306326e+01\n-3.7042549241258165e+01\n-9.4778451400034367e+00\n1.2840652434878166e+01\n-4.4642632806121497e+01\n1.3642453935809323e+01\n1.0397747725239666e+01\n-3.5482425012865882e+01\n1.3275520564727129e+01\n1.0465963076196072e+01\n-3.7994359322644577e+01\n1.3275520564727129e+01\n1.0465963076196072e+01\n-3.7994359322644577e+01\n-1.2966777747249450e+01\n1.0806006591837281e+01\n-4.3531132596133780e+01\n8.4336264897363957e+00\n1.0562360801667277e+01\n-4.6998613193829435e+01\n2.5472958757980240e+00\n9.9947730507966490e+00\n-4.6166131992531355e+01\n7.3480174210372127e+00\n8.4595803918693449e+00\n-4.4163984994489596e+01\n1.2184700444536389e+01\n5.8074104260750419e+00\n-3.0305140163469115e+01\n-1.9770521549076336e+00\n6.4079362250033967e+00\n-4.1329973939002322e+01\n-3.9249658886286443e+00\n5.6155414339705922e+00\n-4.0430640366360791e+01\n1.2878639971896185e+01\n4.2293346902023181e+00\n-2.9273033260772596e+01\n-2.3903229452863783e+00\n2.6876723498957591e+00\n-2.5862054918327843e+01\n-7.2655916698712746e+00\n2.6698214176759523e+00\n-3.6228470637809387e+01\n1.0724460288476547e+00\n1.3277900182527949e+00\n-2.0484913684186260e+01\n1.3448930530585194e+01\n7.5971515293743330e-01\n-3.2724907536050736e+01\n1.3531732086393555e+01\n4.3942209633755758e-01\n-3.2634959700024147e+01\n2.7596167857760063e+00\n1.9084661016470902e-01\n-2.0329937126546067e+01\n5.0561901107651011e+00\n1.5752499349643964e-01\n-2.1899524790594324e+01\n1.3842571188006996e+01\n-2.0867148807711927e-01\n-3.2070623318626303e+01\n4.1736648661459447e-01\n-5.5922257376457396e-01\n-2.0597044408149895e+01\n4.4960371279169520e-01\n-7.9276323043893404e-01\n-2.0656393443955995e+01\n-7.0509524424751655e+00\n-1.9797828664468049e+00\n-2.9874909013439307e+01\n-6.9612884121082121e+00\n-2.0784180974670452e+00\n-2.9798070518001893e+01\n-7.2285221152454353e+00\n-2.5091401714262824e+00\n-2.9158180824699564e+01\n-2.1582388421143572e+00\n-7.8034565050639086e+00\n-2.1813956763599837e+01\n-6.7881539769258490e+00\n1.3177380256505158e+01\n-4.6948574830339211e+01\n1.3717343982501047e+01\n9.8900256259226502e+00\n-3.6115808618492146e+01\n1.3901612103998687e+01\n8.5152859283870246e+00\n-3.7610163261319343e+01\n6.7108314465785606e+00\n8.8998980048863832e+00\n-4.4886297112655036e+01\n1.2929000070645323e+01\n3.9243963547150242e+00\n-2.9853319235566332e+01\n1.2827182429812007e+01\n3.6611155369976633e+00\n-3.1004846551498591e+01\n1.2661045455937476e+01\n3.3725203782432165e+00\n-3.2784626558579255e+01\n3.9094599062138409e+00\n2.3094205979264744e+00\n-2.1610456218740417e+01\n-8.0920487043016536e+00\n2.7144865134188843e+00\n-3.6389986615778390e+01\n-7.3218111943503521e+00\n2.2011011003198333e+00\n-3.5630446631308750e+01\n1.3130340820768284e+01\n1.8600608669387011e+00\n-3.2684166459857749e+01\n1.3489791630512677e+01\n1.7698307152560855e+00\n-3.0372143834390528e+01\n1.4013471533296993e+01\n4.1657493845673477e-01\n-2.9588318856199589e+01\n1.4087661299664552e+01\n2.4535192227940142e-01\n-2.9383515724832289e+01\n1.4003988051856687e+01\n2.2557313433347739e-01\n-2.9885580436638186e+01\n2.8296426411410303e+00\n1.4332643209455270e-01\n-2.0357196890050876e+01\n1.4613724516477172e+01\n-1.8298491624129190e+00\n-2.9622147472671170e+01\n1.8282188698786903e+00\n-4.0621266279268013e+00\n-2.0952502768663017e+01\n-1.6568456435191503e+00\n-8.4742428726792820e+00\n-2.0873885372476099e+01\n-1.2849702274646663e+01\n1.1022732445815670e+01\n-4.3465166640314465e+01\n1.3441900926345495e+01\n9.9919151609513470e+00\n-3.7612559170321497e+01\n-2.1304868507503647e+00\n1.1415069247073598e+01\n-4.8015960136301132e+01\n1.3450967306042891e+01\n9.4361557829167815e+00\n-3.8858007370852810e+01\n1.3699231644268417e+01\n9.2184955982189329e+00\n-3.7874251936897110e+01\n1.3992278809234451e+01\n8.4689370911360875e+00\n-3.7188541836781418e+01\n1.4932097650145582e+00\n9.3087521407530360e+00\n-4.5356241486163569e+01\n9.2091473499811407e+00\n7.0821857211370594e+00\n-4.2214433196287452e+01\n9.2091473499811407e+00\n7.0821857211370594e+00\n-4.2214433196287452e+01\n1.2457326052778585e+01\n5.1244965444432289e+00\n-3.0489019826124789e+01\n1.0330681362025003e+00\n2.1574444991446629e+00\n-2.0924761537729356e+01\n1.3085823155564948e+00\n1.5636513682899755e+00\n-2.0538497172899561e+01\n1.3040944662969004e+01\n2.2385643095365992e+00\n-3.2120953993635439e+01\n5.2652836727220516e+00\n8.0143151312928307e-01\n-2.2281505528068550e+01\n5.1024449753357786e+00\n7.7996058147639513e-01\n-2.2009290299294562e+01\n2.5356708980191596e+00\n-7.4055703580034393e-01\n-2.0480632677947870e+01\n1.1747566512801628e+01\n-4.9092665172909813e+00\n-2.5666489453389858e+01\n8.3934545619996310e+00\n-6.7857870637049746e+00\n-2.3185030049916623e+01\n1.3243103036949233e+01\n1.0169617787580087e+01\n-3.8904694804373499e+01\n1.3831993731892181e+01\n9.0737428193740151e+00\n-3.7052037624927635e+01\n1.4022556912643015e+01\n8.5854857432226090e+00\n-3.6839266225310453e+01\n1.5320332163914872e+00\n8.8913626424761887e+00\n-4.4691338705677715e+01\n2.0336509899442863e+00\n2.7187218995830813e+00\n-2.0482699754748428e+01\n1.2993258778321170e+01\n3.5383146799347291e+00\n-3.0482146653286620e+01\n1.4020553289009897e+01\n1.4077441436954957e-01\n-3.0324261069034495e+01\n6.5706591282805560e-01\n-5.6128562224401923e-01\n-2.0547566171472539e+01\n2.6760767903969955e+00\n-6.3595406650322295e-01\n-2.0445301166738858e+01\n8.0167847016367730e+00\n1.3379074962001502e+01\n-5.0702517044674451e+01\n1.2928807836568147e+01\n2.9797630068281480e+00\n-3.1701247790414826e+01\n1.1719956319473232e+01\n-4.7416868550624702e+00\n-2.6087966829805442e+01\n-1.6845528446135948e+01\n9.4889000302078976e+00\n-4.1086792185657266e+01\n-1.1330318800424063e+01\n1.1712764012225513e+01\n-4.4040978286720794e+01\n-1.5078504531466892e+01\n1.3517615285879952e+01\n-3.7410676646477015e+01\n-1.4970848120522749e+01\n1.3553952225514424e+01\n-3.7450613758846394e+01\n-1.5849653489325309e+01\n1.1182711640982815e+01\n-3.9170542066629011e+01\n4.4535979312296590e+00\n2.1020786671957513e+01\n-4.6983257885336073e+01\n1.7587745905652056e+01\n2.5732188194609993e+01\n-5.6265049039469893e+01\n1.1419349779647893e+01\n2.3430312240804419e+01\n-5.3438620368363210e+01\n1.3037702586808262e+01\n2.4444937891851463e+01\n-5.3461856759954060e+01\n1.1809974198775313e+01\n2.3626737097679250e+01\n-5.3080767156582837e+01\n5.7926534215392129e+00\n2.1998011289517461e+01\n-4.8329069743966805e+01\n1.4406857561250641e+00\n-5.8316397512383142e+00\n-2.1627514551568627e+01\n1.2429111721349919e+01\n5.7170921478467456e+00\n-2.9505989472217649e+01\n1.3257265987344057e+01\n1.1752052497541767e+01\n-3.5635220337593161e+01\n1.4779924220368173e+01\n2.1567861640232927e+01\n-5.9472550710992437e+01\n1.6197007024134727e+01\n2.3211417974873999e+01\n-5.8729809634229220e+01\n1.3611304996769064e+01\n1.0116438754383223e+01\n-3.5337640777368108e+01\n1.3441900926345495e+01\n9.9919151609513470e+00\n-3.7612559170321497e+01\n1.3139650949144119e+01\n1.0237156296559439e+01\n-3.9280904319832274e+01\n1.2431820770033408e+01\n2.3727618087772722e+01\n-5.3057085914458703e+01\n1.3250676002834162e+01\n1.1738036062355892e+01\n-3.5338972786631167e+01\n1.3073385578877351e+01\n1.2249119032153372e+01\n-3.5804173297746154e+01\n1.2933128774878812e+01\n1.1729819555149730e+01\n-3.7431863645336499e+01\n1.2631550651397168e+01\n5.3949679010953071e+00\n-2.9233691854473552e+01\n2.3931711257124641e-01\n2.0131378879007947e+01\n-4.6106631384661924e+01\n-8.3167220226855509e-01\n8.1895105862989459e-01\n-2.1465333071954557e+01\n-8.8629139842385456e+00\n1.3601183085965904e+01\n-4.3979901402449599e+01\n-1.0154692249912266e+01\n1.3803704286967713e+01\n-4.2399953916164641e+01\n-1.7117390597418300e+01\n1.0146376629174108e+01\n-3.9870571245128644e+01\n-1.5046246251986430e+01\n1.2331392393849910e+01\n-3.8985207332472676e+01\n-1.3869047792886931e+01\n1.0985200154048254e+01\n-4.3296199868253517e+01\n1.4475778169143343e+01\n2.1591080872273807e+01\n-5.8903774862159771e+01\n4.5741587646011315e+00\n1.7715944996863591e+01\n-5.3595823373517760e+01\n1.4779924220368173e+01\n2.1567861640232927e+01\n-5.9472550710992437e+01\n-5.2207002429312634e+00\n5.2658307213618150e+00\n-3.9732394099503082e+01\n4.1875391895353364e-01\n1.8773211995608460e+01\n-4.6265248158975879e+01\n-2.5492205748511085e+00\n1.6975776779952916e+01\n-4.6032930437065879e+01\n2.0981786382962593e+00\n1.1673301640383020e+00\n-2.0368689562952849e+01\n1.5135799141061380e+01\n2.1002370809922233e+01\n-6.0621609627865382e+01\n-6.9949390875370199e-01\n5.1897797843639820e-03\n-2.1225318786929179e+01\n-1.4016320326512767e+01\n1.2757437729234917e+01\n-3.9456999364571395e+01\n-3.4572104331825750e+00\n1.8426004879113130e+01\n-4.3264070045989044e+01\n-1.2482411127835800e+01\n1.3160044389352162e+01\n-4.0909675478962725e+01\n-1.4919570179071515e+01\n1.2241273868505543e+01\n-3.9241424880185335e+01\n-1.3989084590029220e+01\n1.2714971694479679e+01\n-4.0199936276591117e+01\n9.5891974771725041e-01\n1.9200069056512145e+01\n-4.6975196700910836e+01\n-1.8333969694163781e+00\n1.5909497028243374e+01\n-4.5736009434332558e+01\n-5.9693103456197942e+00\n1.5973675991526227e+01\n-4.3957972683356743e+01\n9.2417469080680950e-02\n1.5693259218042156e+01\n-5.1731133834686936e+01\n1.6371493377464610e+00\n2.0430975684886192e+01\n-4.6047751768278815e+01\n4.9140680867524678e+00\n1.8054703291580633e+01\n-5.3702562622895812e+01\n1.0252588648598630e-01\n2.3443363721068318e+00\n-2.1505337494032680e+01\n-3.8377274603885119e+00\n5.7451170628478643e+00\n-4.0467723483008719e+01\n2.2624369904744275e+00\n2.0965127255022903e+01\n-4.5880247755698456e+01\n-6.4636914921571007e+00\n1.6020526849523463e+01\n-4.3000338090928750e+01\n-7.9843689887637392e-01\n2.0775512625227481e+00\n-2.1978406077262459e+01\n6.9405179532278316e-01\n1.8994144223908904e+01\n-4.6110858882850195e+01\n-1.3612182832517796e+00\n1.8232261262029720e+01\n-4.6130010092688181e+01\n-1.8410427685986559e+00\n1.6140952551657932e+01\n-4.5380139489817971e+01\n-3.2786942771127769e+00\n6.5637787063203863e+00\n-4.1608405401666666e+01\n7.0175086390916708e-01\n2.2784482485556441e+00\n-2.1204767846104307e+01\n8.4239363487865482e-02\n1.6788534118115785e+00\n-2.1060165701759153e+01\n1.2992462324064804e+00\n1.3050328130673792e+00\n-2.0449262791110428e+01\n4.7168110523472495e-01\n1.9640611050213970e+01\n-4.4872737499916454e+01\n6.3298668130460900e-01\n2.0475116928678481e+00\n-2.1053705325775756e+01\n-7.2153037183709345e-01\n1.5253556756687343e+00\n-2.1590021634986996e+01\n1.0261057948852459e-01\n1.0743201361682564e+00\n-2.0823078000910709e+01\n1.1187248004857444e+00\n1.8025076882641786e+00\n-2.0694540585088138e+01\n-4.5846569355550998e-01\n1.8118110542100025e+00\n-2.1632930217188175e+01\n2.0446221968436257e-01\n1.4623661616876868e+00\n-2.0893343490028023e+01\n7.4403093173356782e-01\n1.3715836584560250e+00\n-2.0594309213931137e+01\n-3.7957656010059004e-01\n9.6023721361507142e-01\n-2.1153430959455228e+01\n1.8186845774738374e+00\n9.0932348027682308e-01\n-2.0239708054843184e+01\n7.6994974271146157e+00\n2.1713128824530106e+01\n-5.0916821503240044e+01\n2.9828952076950702e-02\n1.3339240583734007e+00\n-2.0928700522782375e+01\n-7.3452882564855493e-01\n2.2545815692607292e+00\n-2.2086134069988489e+01\n1.0545754500245905e-02\n2.0428599895926207e+00\n-2.1268228526396861e+01\n5.6160461167886255e-01\n1.6188998329397555e+00\n-2.0526661770299832e+01\n8.3243566888157494e-01\n1.1211096138218215e+00\n-2.0538257153482743e+01\n2.5088575548123164e+00\n2.1026337436242130e+01\n-4.5914431632099244e+01\n7.2483707842004730e-01\n1.9548283747462534e+01\n-4.5880988670126627e+01\n3.2080708835467009e+00\n2.3310373343349013e+00\n-2.1369255338814128e+01\n-1.6770610117989410e+01\n1.1991202369613879e+01\n-3.7746788499110060e+01\n-1.5791043721701680e+01\n1.0909032820710612e+01\n-4.0372828520762297e+01\n-9.4921458837539259e+00\n1.3521670850568212e+01\n-4.3352407007850125e+01\n-9.2761197002151210e+00\n1.3433680961037547e+01\n-4.3757475122719718e+01\n-1.2296254895529064e+01\n1.1621341316310401e+01\n-4.3189046841714386e+01\n6.8097398749064442e-01\n1.9992893739085677e+01\n-4.4930969017202187e+01\n1.4540298090071631e+00\n2.0663623877771169e+01\n-4.6228080800089110e+01\n7.4334673631841575e-01\n1.9800180861941019e+01\n-4.5203796963339776e+01\n-1.5769608789862021e+01\n1.0752561801691545e+01\n-4.0383564702064064e+01\n-1.1319872396374461e+01\n1.1749818380383497e+01\n-4.3644241807576101e+01\n-1.2649108991090682e+01\n1.4292210064910297e+01\n-3.8216860720287528e+01\n-1.5465940763607176e+01\n1.3280757278973054e+01\n-3.7227731324372130e+01\n-1.5465940763607176e+01\n1.3280757278973054e+01\n-3.7227731324372130e+01\n-1.4642798712243700e+01\n1.2875314035180757e+01\n-3.8424972407915952e+01\n-1.2975216028230673e+01\n1.3307810717649103e+01\n-3.9924634206788049e+01\n-1.6524406901423060e+01\n9.6625350589133863e+00\n-4.1821922401183727e+01\n-1.5489847438864381e+01\n1.1887964962601497e+01\n-3.9264257259844648e+01\n-1.4662753717527595e+01\n7.4245078900007053e+00\n-4.2881208078295927e+01\n-1.4603036697889884e+01\n7.2376624183405625e+00\n-4.2653211040707312e+01\n-1.3919026044272986e+01\n1.3093688059576596e+01\n-3.9409974001757661e+01\n-1.3216277989693166e+01\n1.3351087941311270e+01\n-3.9763319961750618e+01\n-1.4983584209888038e+01\n1.2414818647286875e+01\n-3.9043837471260296e+01\n-1.6492599753195968e+01\n1.2099529470625185e+01\n-3.7878084537913210e+01\n-1.1517616763485504e+01\n1.3368383835582136e+01\n-4.1467812833228905e+01\n2.4012820888873545e+00\n-8.4353686421686858e-01\n-2.0479706927182789e+01\n-1.1325136038933167e+01\n1.1877677434219358e+01\n-4.3572686085128282e+01\n-1.5475028471253619e+01\n1.0838222791522002e+01\n-4.0760241670062840e+01\n-1.4081940092593015e+01\n1.2877809787761629e+01\n-3.9361500502557313e+01\n-1.6855639943248775e+01\n1.0112417017265983e+01\n-4.0202455137119330e+01\n-1.6730722929057240e+01\n9.8116144473750921e+00\n-4.0867515660584026e+01\n-1.1670096233515794e+01\n1.2764297583524145e+01\n-4.2241559681802322e+01\n-1.3172307914238393e+01\n1.3279388013931998e+01\n-4.0184604691425761e+01\n-1.4203880483536402e+01\n1.2536146087764001e+01\n-3.9789479102902384e+01\n-1.1776907259393912e+01\n1.7568654416347984e+00\n-3.5000714811951958e+01\n-1.6730722929057240e+01\n9.8116144473750921e+00\n-4.0867515660584026e+01\n-1.5097546265485075e+01\n1.2391251135006909e+01\n-3.8868805501780436e+01\n-1.6295325929774076e+01\n9.7252640783098254e+00\n-4.1309393379071977e+01\n-8.1223065200597144e+00\n2.8811608041045496e+00\n-3.6544861615425482e+01\n-1.2015469867200748e+01\n1.3678886198130879e+01\n-4.0348531679344084e+01\n-9.2207632546493219e+00\n1.4335240990118498e+01\n-4.2817434560314389e+01\n-1.6390710439620904e+01\n1.0878560178138159e+01\n-4.0106243540727043e+01\n-1.6295325929774076e+01\n9.7252640783098254e+00\n-4.1309393379071977e+01\n-1.4991378266696332e+01\n1.2293183782556369e+01\n-3.9164694874183951e+01\n-9.3613900270460633e+00\n1.4915816754143130e+01\n-4.1679923897671415e+01\n-1.1242560663026085e+01\n1.2273422255129958e+01\n-4.3392446782333472e+01\n-1.4758583783504484e+01\n1.2281539064984790e+01\n-3.9442314725131396e+01\n-1.0689815990669940e+01\n1.4217278188318643e+01\n-4.0951749563863700e+01\n-1.6580853455871232e+01\n1.0393032903905027e+01\n-4.0100463796705561e+01\n-1.2634549730917774e+01\n1.4405523681481545e+01\n-3.8617642676812352e+01\n2.9707094942272338e-01\n-6.4494085040531712e-01\n-2.0702964237631491e+01\n1.3180958668042818e+01\n1.1853713503487297e+01\n-3.5310129752890674e+01\n1.3262956585652507e+01\n1.0512426354408845e+01\n-3.8395253767261572e+01\n1.3262956585652507e+01\n1.0512426354408845e+01\n-3.8395253767261572e+01\n1.3219926575748167e+01\n1.0187450003130373e+01\n-3.8320902601776645e+01\n1.3368723184558204e+01\n1.0579752303956232e+01\n-3.7019347471725858e+01\n1.2993453886390570e+01\n3.5545348762512186e+00\n-2.9867088687664918e+01\n1.9295557953056244e+00\n4.2308413076912396e-02\n-2.0192690962116970e+01\n1.3026369032967152e+01\n3.3128348216650778e+00\n-3.0574774025031832e+01\n1.3049010125639134e+01\n2.9525939742913287e+00\n-3.1014053805353488e+01\n1.3261062303404104e+01\n1.1564767499835703e+01\n-3.6036661447410737e+01\n1.3182450274726655e+01\n1.1508196054556707e+01\n-3.6741132182982632e+01\n1.3488657280612069e+01\n1.0389656739038951e+01\n-3.6721927334505651e+01\n1.2971778544985773e+01\n4.0246118146005285e+00\n-2.9536630156164090e+01\n1.6442245071380774e+00\n2.1878853574884818e-01\n-2.0119353399663137e+01\n-4.5349826873867161e-01\n-5.5764934430363688e-01\n-2.1171876713488228e+01\n1.2440450400723909e+01\n5.7757015492163690e+00\n-2.9943261927991333e+01\n-1.0788607162831838e+00\n1.3930890831319895e+00\n-2.1870023590236016e+01\n2.3897540009266409e+00\n-1.2969150624304907e-01\n-2.0213564813018522e+01\n2.1852570997607090e+00\n-3.4134722247193883e-01\n-2.0267292509841720e+01\n-1.0639602406725064e+00\n7.4414910646513910e-01\n-2.1751909046264565e+01\n-3.8337586645490079e-01\n2.6480607656374777e-01\n-2.0996983759763317e+01\n-2.6553038804439744e-01\n1.7909957570519164e-01\n-2.0978038667091024e+01\n-1.1457626906122384e-01\n8.8811252418346684e-02\n-2.0795155195437722e+01\n1.7619204853380390e+00\n-5.4711483997236243e-01\n-2.0383771937093481e+01\n1.7619204853380390e+00\n-5.4711483997236243e-01\n-2.0383771937093481e+01\n-7.4326430966225054e-01\n2.5262807949371835e-01\n-2.1281620667928440e+01\n1.6759934200178648e+00\n-6.5776795445881941e-01\n-2.0235437690239323e+01\n-1.5793463975234758e+00\n5.9807543140808861e-01\n-2.2335199069028253e+01\n1.3181269220904051e+01\n1.2060891921655543e+01\n-3.6150276121919404e+01\n-7.8521144620056627e-01\n4.9178335376996446e-01\n-2.1366873365446260e+01\n-1.2320758459164518e+00\n4.9820581332069513e-01\n-2.1879067521276450e+01\n4.0620554290009264e-01\n-3.4961712596038513e-01\n-2.0576672986811150e+01\n4.0620554290009264e-01\n-3.4961712596038513e-01\n-2.0576672986811150e+01\n7.8801429396820888e-01\n-6.4320347054753646e-01\n-2.0480510479463327e+01\n8.6915477121019635e-01\n-3.0002650239600104e-01\n-2.0369062835316203e+01\n-1.0027838169878919e+01\n1.3257237427213202e+01\n-4.3355321593955885e+01\n-1.2137945707439762e+01\n1.3721729945682998e+01\n-4.0021884837141705e+01\n-1.4081940092593015e+01\n1.2877809787761629e+01\n-3.9361500502557313e+01\n-1.3476225235303993e+01\n1.2753636074216251e+01\n-4.0145428472922113e+01\n-1.0169212853157070e+01\n1.4605985128066040e+01\n-4.1309810388774189e+01\n-1.6468590630581829e+01\n1.0746953800980666e+01\n-3.9619118089659203e+01\n-1.0278851570696828e+01\n1.3663140530706327e+01\n-4.2440917547453850e+01\n-1.4341226742119987e+01\n1.2566585724755589e+01\n-3.9542023048316501e+01\n-1.6612354363546761e+01\n1.0679511389541014e+01\n-3.9689140674196786e+01\n-1.1337025279864957e+01\n1.2051427019638469e+01\n-4.3428332780719735e+01\n-1.3262203375396776e+01\n1.3115780450216732e+01\n-3.9763338999344469e+01\n-1.6612354363546761e+01\n1.0679511389541014e+01\n-3.9689140674196786e+01\n-1.6430354880382502e+01\n1.1750022868181647e+01\n-3.8454962459740244e+01\n-1.6898405729644111e+01\n1.0896292004986517e+01\n-3.8988621180173489e+01\n-1.2482411127835800e+01\n1.3160044389352162e+01\n-4.0909675478962725e+01\n-1.2744764011124945e+01\n1.2941210725317516e+01\n-4.0663962108965187e+01\n-1.3604633861139435e+01\n1.2791160861445357e+01\n-4.0022878222410043e+01\n-1.2015469867200748e+01\n1.3678886198130879e+01\n-4.0348531679344084e+01\n-1.1033635747833687e+01\n1.3638537719738370e+01\n-4.1705961480229178e+01\n-1.6793137205848684e+01\n1.1056509313766419e+01\n-3.9314537110076657e+01\n-1.3741137367553101e+01\n1.2984424455098708e+01\n-3.9717452884448079e+01\n-1.1542569336495530e+01\n1.3761532477947476e+01\n-4.1174323327990550e+01\n-1.6334886596401294e+01\n1.0797274701506320e+01\n-4.0153786318510363e+01\n-1.5822091069141345e+01\n1.2466555435698794e+01\n-3.7954210031386189e+01\n-1.5606596409698930e+01\n6.2827279197990302e+00\n-4.1113995075634392e+01\n-1.5089745705703677e+01\n1.1947773625088558e+01\n-3.9250845066294538e+01\n-1.1248349819301920e+01\n1.3907172595955975e+01\n-4.0746118611105523e+01\n-1.6650842179089842e+01\n1.0228849507166363e+01\n-4.0254160783962845e+01\n-1.6650842179089842e+01\n1.0228849507166363e+01\n-4.0254160783962845e+01\n-1.6898405729644111e+01\n1.0896292004986517e+01\n-3.8988621180173489e+01\n-1.4633476103489958e+01\n1.2605026256389323e+01\n-3.9128651353861443e+01\n-1.1542569336495530e+01\n1.3761532477947476e+01\n-4.1174323327990550e+01\n-1.6805838389412571e+01\n1.0882577269915947e+01\n-3.9161996282885781e+01\n-1.5177280571854201e+01\n1.2489961359285067e+01\n-3.8478347774216786e+01\n-1.0913219415450630e+01\n1.4133256153037106e+01\n-4.1123538577565533e+01\n-1.3434766622126231e+01\n1.3169128231937895e+01\n-3.9597603874704824e+01\n-9.7373192621787172e+00\n7.2818140378010243e-01\n-3.3546310834039232e+01\n-2.3727467820923502e+00\n2.5594376902177296e+00\n-2.5623416950559356e+01\n1.0962385020043929e+01\n2.1839193877137973e+01\n-5.4743284857650302e+01\n9.8588880925468836e-01\n1.4660344277122026e+00\n-2.0656367630605093e+01\n1.6796475532624386e+00\n7.9915742870350437e-01\n-2.0271239094797167e+01\n2.3212752811150357e+00\n4.4942863093878083e-01\n-2.0252881949192119e+01\n3.3927104322637396e+00\n-5.2149344928963060e-01\n-2.0660593629386337e+01\n1.7479947696604818e+01\n2.2369069323677010e+01\n-6.1399567849624731e+01\n-7.2784706866933204e+00\n2.3988629195678954e+00\n-3.5818267086229291e+01\n-8.1960677242642905e+00\n1.4351896134958362e+00\n-3.4315807395251319e+01\n-7.1272059002412735e+00\n1.2989690380474492e+01\n-4.7570156814676750e+01\n3.9726162897881445e-01\n1.7684538979282550e+01\n-4.7542756196364351e+01\n-1.3607160901297346e+01\n1.3265993514134991e+01\n-3.9366765718353541e+01\n-2.4427775717423139e+00\n-7.7256887553275657e+00\n-2.2078210954414413e+01\n1.1561152304089941e+01\n2.3754526495298855e+01\n-5.2071034687077088e+01\n-8.9746186770989631e+00\n1.4433945286348010e+01\n-4.2864565013603645e+01\n-8.5311652999892171e+00\n1.4470840359009403e+01\n-4.3409258009065645e+01\n3.0235032497784875e+00\n7.2915248653878786e-02\n-2.0399388379164748e+01\n7.6071841912756799e-01\n3.5904124985565794e-01\n-2.0400463724744906e+01\n1.9072833026921734e+00\n-1.6813361910493034e+00\n-2.0166759165900348e+01\n1.3657202805238461e+01\n9.9999150683369749e+00\n-3.6413837776974610e+01\n4.5795895531859436e+00\n-1.0921752930025066e+00\n-2.1033389655643575e+01\n2.5731958017452787e+00\n-9.6356844402525876e-01\n-2.0550005401004263e+01\n-8.7878134544374156e+00\n1.4627927170614605e+01\n-4.2658305585159262e+01\n-8.7878134544374156e+00\n1.4627927170614605e+01\n-4.2658305585159262e+01\n-7.2153037183709345e-01\n1.5253556756687343e+00\n-2.1590021634986996e+01\n6.3608694044772450e-03\n-1.8704534384387734e+00\n-2.0637727739069756e+01\n1.7159690342633898e+00\n1.1653466308020590e+00\n-2.0334688646562913e+01\n1.7159690342633898e+00\n1.1653466308020590e+00\n-2.0334688646562913e+01\n1.3073357622883336e+01\n3.1123292359085033e+00\n-3.0820730585990923e+01\n1.3073357622883336e+01\n3.1123292359085033e+00\n-3.0820730585990923e+01\n-1.3519526563572175e+01\n1.2941232770442033e+01\n-3.9793236296443879e+01\n-8.6868356582360136e+00\n1.5141167766150796e+01\n-4.2120352638718693e+01\n1.6060716743647057e+00\n-2.0124806994832700e+00\n-2.0241020083827994e+01\n-7.9483674823837740e+00\n1.4158582735136038e+01\n-4.4188396814478004e+01\n-4.9417053036716396e+00\n1.3601150964637753e+01\n-4.9001462833658692e+01\n1.3989763860050723e+00\n2.0253818090005819e+01\n-4.5742069393073166e+01\n-6.7263058732902410e+00\n1.6764880791018332e+01\n-4.1921501231668806e+01\n9.8565283098445211e-01\n1.9761685301850520e+01\n-4.5962145833585893e+01\n-7.2760351184186378e+00\n1.4445039383333437e+01\n-4.4610250949426359e+01\n2.7335617455647565e+00\n-2.6719727638820473e-01\n-2.0410863144134833e+01\n3.3420603518413792e+00\n-2.5496787406289467e+00\n-2.0210877463808743e+01\n5.9666195573290137e-01\n-6.0015945969169171e-01\n-2.0535820371678749e+01\n7.4136016079623335e-01\n2.8809956688173349e-02\n-2.0378235794799913e+01\n-3.1903277217242416e+00\n2.6981061180551973e+00\n-2.6968064913544509e+01\n5.2916008068298188e+00\n-4.3058439259847486e-01\n-2.1852626273273316e+01\n1.4121816060484326e+01\n2.9081340954458323e-01\n-2.9169504356958665e+01\n1.6765759318248215e+00\n-3.3856400203081702e+00\n-2.0228351744894894e+01\n1.2519707346923552e+01\n4.4792813700558254e+00\n-3.1297340326596654e+01\n1.4697888931509400e+00\n-4.9368953155378245e-02\n-2.0225667825216743e+01\n2.3250978393144255e+00\n-1.1015310802980438e+00\n-2.0559280002264781e+01\n5.6803974710621252e-01\n-5.3829580582479652e-01\n-2.0539438444227912e+01\n2.0379794082072400e+00\n-1.2704270175030163e-01\n-2.0295069498970197e+01\n-1.3919578199292698e-01\n-1.7686602286570879e-01\n-2.0806135438659567e+01\n1.4447248945309136e+01\n-1.0333840934760288e+00\n-2.9856271753035966e+01\n2.3364236206449358e+00\n5.4384534152184888e-02\n-2.0319632429158631e+01\n-8.1223065200597144e+00\n2.8811608041045496e+00\n-3.6544861615425482e+01\n-8.6118254354075869e+00\n2.8024583320944800e+00\n-3.6385690781770840e+01\n-8.6118254354075869e+00\n2.8024583320944800e+00\n-3.6385690781770840e+01\n-7.9655718752245583e+00\n1.4628397949334209e+01\n-4.3480523685199543e+01\n-7.8951909867034828e+00\n9.4932664938429365e+00\n-4.6062287990622096e+01\n-7.3426011184912428e+00\n7.9312253052428296e+00\n-4.3570386592060267e+01\n-1.0879514781021419e+01\n2.8257959026131139e+00\n-3.6394535674692072e+01\n-1.1567036867979459e+01\n8.3702127018879686e+00\n-4.4230294809726423e+01\n-9.5277206963869983e+00\n1.3799881803463355e+01\n-4.2831374087756274e+01\n-8.1959530246274497e+00\n3.0064821722249087e+00\n-3.6608185879839546e+01\n-1.4483006854125176e+01\n1.1275594995635240e+01\n-4.2766041147024083e+01\n-1.5677504647030110e+01\n1.2352709406965410e+01\n-3.8359296191590950e+01\n-7.2477202481528336e+00\n1.5007817347867555e+01\n-4.3969608058542264e+01\n-1.5656679748644983e+01\n1.1293105576816524e+01\n-3.9305507641639863e+01\n-7.6746441866283854e+00\n1.5164496217040272e+01\n-4.3144720142778482e+01\n-7.5529913862283351e+00\n1.4183390936953442e+01\n-4.4616618472305944e+01\n-7.3056874020203058e+00\n1.4916206824502376e+01\n-4.4012345580861094e+01\n-8.6461740153264905e+00\n1.4826485050707401e+01\n-4.2822057514845312e+01\n-1.4053595215104124e+00\n-4.6526933868483766e-01\n-2.1697288991327543e+01\n-1.0714742367002724e+01\n1.2298173417700468e+01\n-4.4054993711320527e+01\n-1.2975216028230673e+01\n1.3307810717649103e+01\n-3.9924634206788049e+01\n-1.0617765248566720e+01\n1.1952769868281937e+01\n-4.5271400084453440e+01\n-7.2477202481528336e+00\n1.5007817347867555e+01\n-4.3969608058542264e+01\n-2.2615852784580599e+00\n-8.1249907464831406e+00\n-2.1373017886073701e+01\n-4.9530257794123518e+00\n-6.8928587229552010e+00\n-2.3129674286672490e+01\n-2.9750945271555516e+00\n-7.9863657801286312e+00\n-2.1597293460027014e+01\n-3.7046142137177296e+00\n-7.7494886038369852e+00\n-2.1853875688731677e+01\n-3.1503782014102164e+00\n-7.9287171853091509e+00\n-2.1682612548661261e+01\n6.4986533040911976e-01\n1.4958871330379156e-01\n-2.0419006853449467e+01\n-3.0168560960711179e+00\n-7.6450847625496667e+00\n-2.2046544237436514e+01\n-3.3163908992944595e+00\n-7.5534508728891101e+00\n-2.2092031857613456e+01\n-3.3972276847002489e+00\n-7.8723351313411545e+00\n-2.1691248926786571e+01\n-2.3083238902091923e+00\n-3.3507229504544611e+00\n-2.2750108816639987e+01\n9.4478647061248988e-01\n1.8580880235875499e+00\n-2.0754759862075602e+01\n-4.0537249870016939e-01\n-3.6621064600696829e+00\n-2.1357554390424667e+01\n-1.0239150988327292e+01\n1.3332827868146891e+01\n-4.2770391937860794e+01\n-1.1272454485311098e+01\n1.2072954671409367e+01\n-4.3495626043114449e+01\n-1.1500655194899537e+01\n1.1787179959944751e+01\n-4.3782984640378139e+01\n-2.2011837559491699e+01\n2.5296582246406922e+00\n-3.6070442094334993e+01\n-9.3342606794869312e+00\n1.5765397756830966e+01\n-4.0402099335160685e+01\n-1.3659458107321417e+01\n1.1288802872235557e+01\n-4.3093024826228138e+01\n-6.7681860285468245e+00\n1.5626075795541862e+01\n-4.3635022274325593e+01\n-7.9377576654245861e+00\n1.5020157761385752e+01\n-4.3071571903942598e+01\n-8.6490529767023538e+00\n1.3993530580753484e+01\n-4.3796210539938599e+01\n-8.1600550762706199e+00\n1.4387179673995130e+01\n-4.2570226563176107e+01\n-9.5102393719560538e+00\n1.3386543681734961e+01\n-4.3571840080143808e+01\n-1.6497908788209266e+01\n8.3535772658852316e+00\n-4.3342796566048456e+01\n-8.0395631286220919e+00\n1.5078781598805312e+01\n-4.2843027512397029e+01\n-1.4006331085482955e+01\n9.9633450113417723e+00\n-4.5222707382840994e+01\n-1.0617634411656029e+01\n1.2391416584980089e+01\n-4.3829135013864267e+01\n-1.2326727183163309e+01\n1.3582103423824766e+01\n-4.0370038924395359e+01\n-1.6814050241965028e+01\n1.2415565554405791e+01\n-3.7030195187670898e+01\n-1.0116214825203375e+01\n1.2210809457643787e+01\n-4.4609135582873975e+01\n2.0744954960490847e-01\n-4.8092480153888306e-01\n-2.0636863073259551e+01\n-1.6542675809024310e+01\n1.1309511723479959e+01\n-4.1067026243971206e+01\n-7.1621254247786954e+00\n1.4388086966467972e+01\n-4.4804061632296722e+01\n-1.2595033289940339e+01\n1.2299388979858561e+01\n-4.0927543840013684e+01\n-8.4531371456298263e+00\n1.4552150889554639e+01\n-4.2952781237649077e+01\n1.4179802301431343e+01\n-5.0603619432184541e-02\n-3.0099194121578165e+01\n-1.0252670760323310e+01\n7.1756710952547076e+00\n-4.2511003336160918e+01\n-1.2685490734300652e+01\n1.4582316925669394e+01\n-3.8343830443086986e+01\n-1.2649108991090682e+01\n1.4292210064910297e+01\n-3.8216860720287528e+01\n-1.2326727183163309e+01\n1.3582103423824766e+01\n-4.0370038924395359e+01\n-1.2112873866875939e+01\n1.1784741686053376e+01\n-4.2968899977825686e+01\n-9.8114568763266856e+00\n1.4400290532743064e+01\n-4.1940783217189548e+01\n-1.0174504851590294e+01\n1.5428300912031988e+01\n-3.9794961103823290e+01\n-8.6291580153616341e+00\n4.0227236540007443e+00\n-3.9134810987482226e+01\n-1.0008793054280337e+01\n8.0891192846108932e+00\n-4.3656575538089399e+01\n-1.4793814775032351e+01\n5.6264166567332836e+00\n-4.1040972637711342e+01\n-1.3437092697703664e+01\n5.5361857879681162e+00\n-4.0399476287916976e+01\n-1.4477540108846757e+01\n4.7369668386030526e+00\n-3.9307972122158453e+01\n-1.2490690257527486e+01\n1.0774543075988740e+01\n-4.4180749266425060e+01\n-1.3883445827138738e+01\n5.0007837195894886e+00\n-3.9617337097152557e+01\n-1.3456517348218552e+01\n5.7006232941593495e+00\n-4.0617072689123937e+01\n-9.5420468998512114e+00\n7.2914582821404563e+00\n-4.2755696575200176e+01\n-1.3218776033748018e+01\n5.1103806216487992e+00\n-3.9756847893634436e+01\n-1.2602663160449508e+01\n1.1170156193326342e+01\n-4.3535628465380313e+01\n-9.9282477546611041e+00\n1.4307475108415550e+01\n-4.1608098793364157e+01\n-1.4803146655312192e+01\n7.3696319694596513e+00\n-4.2798105104436431e+01\n-1.0787375246468191e+01\n1.4165957145509518e+01\n-4.1211477058655454e+01\n-1.0108944068259444e+01\n1.2622307502106326e+01\n-4.3932836061705729e+01\n-9.8114568763266856e+00\n1.4400290532743064e+01\n-4.1940783217189548e+01\n-1.2952712732753280e+01\n1.0507931474694644e+01\n-4.4092171486950228e+01\n4.4101951484084587e+00\n8.3737291431968464e-01\n-2.1321810500387123e+01\n4.2657674360295896e+00\n7.1328700485875973e-01\n-2.1180048845264022e+01\n4.7631356399154381e+00\n-4.2765419476153879e-02\n-2.1549381938421060e+01\n3.0109412415199499e-01\n-2.7357015838496133e+00\n-1.9977374016645328e+01\n8.7681188814929065e+00\n1.4701816118374758e+01\n-5.2538341288065773e+01\n1.3478499939860425e+01\n2.4497540970440759e+00\n-2.9487780128376833e+01\n-8.3090024195324685e-01\n1.6786426946260289e+00\n-2.1814282855792861e+01\n-1.0613481209110627e+00\n1.7094833200177677e+00\n-2.2099648683017975e+01\n2.9183965502044074e+00\n7.5880985248465715e-01\n-2.0446791014248827e+01\n3.0814298641773905e+00\n3.7482868080531817e-01\n-2.0451441793785690e+01\n1.3298805934342439e+00\n1.7962553614572918e+00\n-2.0662075620458030e+01\n4.5251560756119265e+00\n-1.1960906122218680e+00\n-2.0920009645104486e+01\n3.7213967177938612e+00\n1.7333585712695651e+01\n-5.2400133397276534e+01\n-6.0127114922218201e+00\n1.5026056585613459e+01\n-4.8053180986421104e+01\n-8.2053887242422192e+00\n1.3903816027270757e+01\n-4.3650144440581137e+01\n-1.3353598485330979e+01\n5.2341926014279245e+00\n-3.9927619883466946e+01\n-8.8555161147973056e+00\n6.7688175870490381e+00\n-4.1941438882863281e+01\n7.3284699129624649e+00\n1.4351643630770834e+01\n-5.2162509635124422e+01\n1.0593676745832374e+01\n1.3851652237485069e+01\n-5.1479102119813938e+01\n1.0593676745832374e+01\n1.3851652237485069e+01\n-5.1479102119813938e+01\n7.9717149305932420e+00\n1.4876218916888881e+01\n-5.2938783995612759e+01\n4.2958693675155164e+00\n1.8178918825247738e+01\n-5.2734913218500736e+01\n1.0899397914827642e+01\n2.1154704699986176e+01\n-5.5393165023302792e+01\n4.0402296404398204e+00\n1.7030259068963151e+01\n-5.4347887785629283e+01\n5.2428521946756028e+00\n1.8839252303438297e+01\n-5.2355125725476952e+01\n6.9871226698336952e-01\n1.6863054116320345e+01\n-5.0579306821201804e+01\n-6.9850697025261157e+00\n1.6551439820273981e+01\n-4.2131521564546965e+01\n-5.5031008776368129e+00\n1.6200987206140383e+01\n-4.4386512664842137e+01\n-6.8097523008233152e+00\n1.4665385863858988e+01\n-4.5073316382452290e+01\n-2.6378000069038099e+00\n1.7679881349962052e+01\n-4.5317321121293553e+01\n-4.5825677494372883e+00\n1.5401848936549294e+01\n-4.6446493264921244e+01\n2.8456529167642213e+00\n2.0892105041998381e+01\n-4.6692184356934447e+01\n1.5669533510846212e+00\n2.0851734245497184e+01\n-4.5235632635368574e+01\n4.7120727922046823e+00\n1.7640923374339270e+01\n-5.3886023264530110e+01\n3.4144614093345202e+00\n1.7932502620539179e+01\n-5.1891881906051005e+01\n-1.0970820861915234e+01\n1.2941625474417892e+01\n-4.2689021038115769e+01\n-1.1667978000467292e+01\n1.1212066848287490e+01\n-4.4265789386058117e+01\n-1.7025479649041186e+00\n9.9061925498929568e+00\n-4.6071725974172821e+01\n-3.1470704210563829e+00\n-8.5269253739193673e-01\n-2.2252571431529553e+01\n-2.9013592594888764e+00\n-9.5213662775264607e-01\n-2.2137009010580528e+01\n-2.9609628426955594e+00\n-7.7372006711598447e+00\n-2.1923624200328238e+01\n3.6901764980444507e-02\n-3.4628745947981848e-01\n-2.0749591958001449e+01\n8.0272072932027039e-01\n1.2493584738085042e+00\n-2.0533839964206731e+01\n4.2424040793267563e+00\n-2.2919312675465622e+00\n-2.0538179814658250e+01\n-6.6241509822984312e+00\n1.5191159220755843e+01\n-4.4588253362257667e+01\n-1.6557445205013777e-01\n1.7909635491126245e+01\n-4.8059725412402216e+01\n9.9648365981401774e+00\n2.1350788812699797e+01\n-5.1870889582896233e+01\n3.1015688678238189e+00\n2.1567242335737817e+00\n-2.1173539760762083e+01\n1.8925706561403346e+00\n-1.6609168104584696e-01\n-2.0238839270081908e+01\n2.9835172518190762e+00\n-2.1112955136251121e-01\n-2.0421643267093458e+01\n2.4049381855640681e+00\n-2.0935468269135837e+00\n-2.0330179367767613e+01\n4.1300224490759767e+00\n-3.1877524505339769e+00\n-2.0795854486800259e+01\n4.1300224490759767e+00\n-3.1877524505339769e+00\n-2.0795854486800259e+01\n3.0152267566634787e+00\n1.9965602798078619e+00\n-2.0971916986890765e+01\n1.6592168020179749e+00\n-1.6837630677471579e-01\n-2.0154734541425299e+01\n6.8825436190952538e-01\n-2.6370888025432893e-01\n-2.0433671102227798e+01\n1.5671594826432289e+00\n-5.4312915879496371e-01\n-2.0350245614359572e+01\n2.4583320802383843e+00\n-8.5204011310376671e-01\n-2.0428314202297244e+01\n2.1776343669956795e+00\n-1.0537957780600860e+00\n-2.0392364187961444e+01\n-6.4093355358485149e-01\n-2.7062864112218890e+00\n-2.0389044013305327e+01\n1.5063512585130296e+00\n-3.6158538039943364e+00\n-2.0447037659422133e+01\n5.5175955150422809e+00\n-5.2020067707270821e+00\n-2.2475779375270687e+01\n8.4739164947846779e-01\n-2.8409771273503930e+00\n-1.9690535976144979e+01\n1.6197007024134727e+01\n2.3211417974873999e+01\n-5.8729809634229220e+01\n5.6017142229949650e+00\n1.9340055888876524e+01\n-5.2467503561999735e+01\n-4.3641310547439305e-01\n-3.6907581726018166e+00\n-2.1328180375650469e+01\n-1.2782740904438283e+01\n1.1240366489961447e+01\n-4.3807508981459193e+01\n3.6133140784526063e-01\n-9.7886568857852796e-01\n-2.0729309335196522e+01\n1.4512774505119189e-01\n1.7428726615696349e-01\n-2.0630322967243060e+01\n1.9940061299459055e+00\n-5.2054896470903067e-01\n-2.0182919974224042e+01\n-9.6614309252224349e+00\n3.1379118468536684e+00\n-3.6859261856906237e+01\n-1.2849702274646663e+01\n1.1022732445815670e+01\n-4.3465166640314465e+01\n-1.2483807921131802e+01\n1.1224788232063476e+01\n-4.3789532305801799e+01\n-1.2786373208501512e+01\n1.1579297360449431e+01\n-4.2535407854684586e+01\n-1.2276495110679175e+01\n1.0961151201654246e+01\n-4.4209250162693607e+01\n-1.2295541236893570e+01\n1.1273091990927700e+01\n-4.3709518177157648e+01\n-1.0352329779761938e+01\n1.4530309256044184e+01\n-4.1037760731281423e+01\n-1.5196889098577568e+01\n1.3258825024686463e+01\n-3.7577611512413149e+01\n-8.4905478347363115e+00\n1.5263486467640481e+01\n-4.6630370133036671e+01\n-6.0127114922218201e+00\n1.5026056585613459e+01\n-4.8053180986421104e+01\n7.5616346462119415e+00\n1.7982457687314803e+01\n-5.6782649188817800e+01\n8.6257979403272405e+00\n1.8553343841216439e+01\n-5.7326445929398702e+01\n1.3214716945648208e+01\n1.1913493814825415e+01\n-3.5749725800685837e+01\n1.0468430425147503e+01\n2.0239827495854851e+01\n-5.6927111165864623e+01\n1.4456246714388577e+01\n2.1461047866211178e+01\n-5.9177905472975169e+01\n1.8390226927467102e+00\n-1.1569006033102054e+00\n-2.0525350273826561e+01\n3.4555479030091649e+00\n-6.4111676173942267e-01\n-2.0693924326207810e+01\n1.8165167807964995e+00\n1.7012811349399253e+00\n-2.0554900343998703e+01\n2.0072318031735286e+00\n-1.1794939199187628e+00\n-2.0594336170852841e+01\n7.3002380955024093e-01\n-2.7800067364279157e+00\n-1.9864123612774414e+01\n1.3266429564824341e+01\n2.6702279250542444e+00\n-3.0604407344616856e+01\n3.1488429377986242e+00\n-7.7266162875302336e-01\n-2.0591485276021398e+01\n4.9711711877617484e+00\n-2.2607384193584257e+00\n-2.0577268449781744e+01\n4.1314298298942367e+00\n-2.2844973645828985e+00\n-2.0531117998376445e+01\n-1.3253323272312043e-01\n-3.3594080999120308e+00\n-2.0766304479584907e+01\n1.2379499278078414e+00\n1.1401554571212442e+00\n-2.0421469068059498e+01\n1.3600711169058370e+01\n2.1878814693702222e+00\n-2.9156003634288030e+01\n8.6096767218341574e-01\n-1.9739358422716797e+00\n-2.0329844720742123e+01\n3.0566015295303886e+00\n-8.4000086596937840e-01\n-2.0574232226880042e+01\n3.1323992307903188e+00\n1.9902132494416470e+01\n-4.8978856663301457e+01\n2.0092746381127093e+00\n-9.5243487028534590e-01\n-2.0376744169515110e+01\n2.8771358958589217e+00\n-1.1115574800251136e+00\n-2.0689145244330671e+01\n1.3130430536092700e+01\n3.3001561188669455e+00\n-3.0052449758507578e+01\n1.4388766684583855e+01\n-5.4209601309096023e-01\n-2.9354423200034116e+01\n1.9648552235392815e+00\n-1.1348896714715140e+00\n-2.0540507249618493e+01\n1.5415375512164988e+00\n-8.7568078336903621e-01\n-2.0419078146925720e+01\n1.4670685671536836e+01\n-1.7463062981996362e+00\n-2.9650262339333921e+01\n1.3135622670880268e+01\n3.6547330108825618e+00\n-2.9142590543682758e+01\n3.1329796926158231e+00\n6.9294611922910565e-01\n-2.0475396352453043e+01\n4.3451435315858724e+00\n-3.9333424402994970e+00\n-2.1780198838358569e+01\n2.4736870096032759e+00\n-8.0581905049290725e-01\n-2.0454583615203415e+01\n1.3011968661581879e+01\n2.3505472817399056e+01\n-5.4330856710676194e+01\n1.3135622670880268e+01\n3.6547330108825618e+00\n-2.9142590543682758e+01\n9.9742629411840458e+00\n2.0249886525629570e+01\n-5.7329596964999496e+01\n2.5336741749336520e+00\n-3.1073748705952289e+00\n-1.9931513442697433e+01\n8.1785599006822896e+00\n1.9080726376604023e+01\n-5.5952768781845528e+01\n1.5232498152293818e+01\n2.1970167605086484e+01\n-5.9224230918037136e+01\n1.4882185979303591e+01\n2.3314087877830733e+01\n-5.6517535185142442e+01\n1.5244191294531912e+01\n2.2736226243078107e+01\n-5.8183220359596440e+01\n1.4567314128038271e+01\n-1.5462512248362130e+00\n-2.9703678922826757e+01\n2.3875843131468009e+00\n-2.0485360675441608e+00\n-2.0286836904925345e+01\n2.1337773819950971e+00\n-4.8283203192588081e-01\n-2.0288710600941023e+01\n1.5492394791832085e+01\n2.4366658482192950e+01\n-5.6964145370809966e+01\n1.3910607935379604e+01\n2.4029471955769836e+01\n-5.4791633121728715e+01\n1.5153812980022051e+01\n2.2924718111605621e+01\n-5.7826555282619886e+01\n1.4154580689323211e+00\n-1.9443315620704535e+00\n-2.0203495900206242e+01\n2.5791709831216960e+00\n-6.4777174232277113e-01\n-2.0406029736728666e+01\n1.3322760352263980e+01\n1.0505998738990444e+01\n-3.7792760191196201e+01\n1.2457326052778585e+01\n5.1244965444432289e+00\n-3.0489019826124789e+01\n9.1652349208184447e-01\n-1.1426189609064732e+00\n-2.0611085062678423e+01\n3.7626195029752734e+00\n-2.4946622972041244e+00\n-2.0271545377030993e+01\n2.7937629989174235e+00\n-4.2401321743692705e-01\n-2.0409994070452921e+01\n1.3169073333226352e+01\n1.1997611848708789e+01\n-3.5696408141615201e+01\n1.4515759778428755e+01\n-1.2157935331324206e+00\n-2.9603832994022326e+01\n1.3383147056936659e+01\n1.0327287043646152e+01\n-3.7650038999825902e+01\n1.1280234605039543e+00\n-7.3148969890982396e-01\n-2.0421952378374957e+01\n5.0443130091940280e-01\n-1.8790540256784987e+00\n-2.0371768325429148e+01\n2.9504778630315101e+00\n-1.0632112356852439e+00\n-2.0659324809608105e+01\n9.1652349208184447e-01\n-1.1426189609064732e+00\n-2.0611085062678423e+01\n1.4119107738333755e+01\n2.3848794575339326e+01\n-5.5313037548792202e+01\n1.2550489486205239e+01\n5.3588256464667179e+00\n-2.9517155074261357e+01\n3.0096354692608838e+00\n-6.3758198091797313e-01\n-2.0523898871946205e+01\n1.3409690734766947e+01\n1.0230814752240025e+01\n-3.7663122302007238e+01\n3.4638928808056568e+00\n-2.5723866611387360e+00\n-2.0134058178781800e+01\n9.6030589175874717e+00\n1.9424833561240501e+01\n-5.6937973058668085e+01\n1.3269233032200718e+01\n2.9553119763895843e+00\n-2.9637377880478347e+01\n6.7281310318173304e+00\n1.7188888554322425e+01\n-3.8773395173206438e+01\n-2.1495893980085938e+00\n2.8476801473362761e+00\n-2.5968135137730215e+01\n-4.1497667251717124e-01\n-2.4076136147092209e+00\n-2.0363225823283173e+01\n-1.7603869088727799e+00\n-1.7686113469558966e+00\n-2.1132351151777740e+01\n2.6777143884523511e+00\n-3.8814539250984450e+00\n-2.0802987980732752e+01\n1.2313591089366755e+01\n6.2772623665182588e+00\n-2.9072062305838266e+01\n-2.3650890579856707e+00\n7.6297444684573890e-01\n-2.3276188363167464e+01\n-2.1897128914711872e-01\n-1.1595643032510337e+00\n-2.0830476195047055e+01\n8.9230668115790868e-01\n-2.0598487039488189e+00\n-2.0343680732511707e+01\n-8.2122536649107292e-01\n-2.4330559318673775e+00\n-2.0267219883093581e+01\n2.5021072956880643e+00\n-4.8887131310866945e+00\n-2.1863891319221196e+01\n5.9388719764629383e-01\n-2.8016190507594487e+00\n-1.9897291595370380e+01\n-3.3332529463466853e-01\n-2.6348727363334246e+00\n-2.0120357750011305e+01\n-1.7668989952897822e+00\n-1.9256654270148195e+00\n-2.1059088193397514e+01\n-6.5350746773210122e-02\n-2.9873676562814118e+00\n-2.0360276257997679e+01\n-2.8116169733091262e-01\n-2.7816302381094284e+00\n-2.0195585081970687e+01\n-1.9991224035807089e+00\n-2.1570544165722194e+00\n-2.1391226438407177e+01\n1.3717847610694065e+01\n2.2466332599254777e+01\n-5.6648317483390642e+01\n2.2700041323977582e+00\n-4.2684638956283925e+00\n-2.1073789957231419e+01\n1.3186050025485061e+01\n3.6295677298835827e+00\n-2.9034349983134835e+01\n1.2894862262429658e+01\n-4.7821412827758101e+00\n-2.5711537953314377e+01\n-7.8567333649420430e+00\n1.5314601451085355e+01\n-4.2747229909901122e+01\n-1.1680990492004858e+01\n1.3864996193037449e+01\n-4.0661124480689303e+01\n-6.4149672688324726e+00\n1.5961504716712989e+01\n-4.3265586083979713e+01\n-1.0788785281819836e+01\n1.5314053582609729e+01\n-3.9316575501054110e+01\n-8.8289188139170205e-01\n-3.4231094290514641e-01\n-2.1483908797987159e+01\n-1.0445302402860768e+00\n1.4913323234089646e+00\n-2.1907956600219077e+01\n-4.5793479699191558e-01\n-3.6312142785199470e+00\n-2.1296983659805186e+01\n-3.2108412280462029e-01\n-3.0865983842024853e+00\n-2.0642577354198178e+01\n-1.2665635109337892e+00\n-1.1771300263430435e+00\n-2.1255984962422215e+01\n-2.6071344491918911e+00\n6.5582615902742544e-02\n-2.2980173271766088e+01\n-1.8714127943746868e+00\n-1.0418095730353267e+00\n-2.1784439819836379e+01\n-9.4071862502078463e-01\n1.8432758098879692e-01\n-2.1490245605951223e+01\n-2.0904625901599734e+00\n-3.2267067329585855e+00\n-2.2562566195895023e+01\n-1.3363345227345478e+00\n-1.2619107788319943e+00\n-2.1260756440367214e+01\n-2.8768642357126067e-01\n-3.3102427712546931e+00\n-2.0797369495618391e+01\n-1.2140234489441197e+00\n-1.1883505202184494e+00\n-2.1194406465100773e+01\n-5.9084706525882935e-01\n-3.7893655153795689e+00\n-2.1534011451175747e+01\n-7.8656734123429617e-01\n-1.4388807715050806e+00\n-2.0863434927569774e+01\n-1.6114080199439504e+00\n-1.1245829427386331e+00\n-2.1583358904368289e+01\n1.2605372794847777e-01\n-1.6480706545608628e+00\n-2.0444736382979890e+01\n1.4250844495805284e-01\n-1.9238852536014750e+00\n-2.0544587881544420e+01\n-1.1958100530324900e+00\n-1.3967195536379364e+00\n-2.1282780976165263e+01\n-1.1958100530324900e+00\n-1.3967195536379364e+00\n-2.1282780976165263e+01\n4.4020709503992922e-01\n-1.8555644400584079e+00\n-2.0389398788840971e+01\n-5.4886233705914234e-01\n-3.8603393984202623e+00\n-2.1550017857959379e+01\n4.0518164532143838e-02\n-1.7908709081314509e+00\n-2.0591367571298562e+01\n-7.4993764205877600e-01\n-3.8176993098394325e+00\n-2.1671389793261977e+01\n-5.9805471472714977e-01\n-3.3180355861391368e+00\n-2.0991582270688244e+01\n-1.9551609651830084e+00\n-3.6540894394300762e+00\n-2.2619433688214965e+01\n7.2068986613342212e-02\n-3.0091004505027028e+00\n-2.0254024482987361e+01\n7.3464167526331381e-01\n-1.9919315847013588e+00\n-2.0365509157639060e+01\n-1.5734673590289170e+00\n-3.3872783478882584e+00\n-2.1770298679691194e+01\n1.1637917633153714e+01\n2.3386892201973630e+01\n-5.3313940028688236e+01\n-9.8943987897637236e+00\n1.5773226460246105e+01\n-3.9791123710098240e+01\n-9.6601201049921546e+00\n1.5628700083003061e+01\n-4.0187995297470820e+01\n-9.8740377961882135e+00\n1.3301846212996704e+01\n-4.3398392624366764e+01\n-1.6489489606904240e+01\n9.7812163208273937e+00\n-4.1995572963186035e+01\n-1.0147145385327965e+01\n1.4036003070709242e+01\n-4.2443203769368075e+01\n-1.3948904700067292e+01\n1.1832611396780552e+01\n-4.0307067123403399e+01\n-8.8864868499594021e+00\n1.5008862336950145e+01\n-4.2251811258943484e+01\n-9.4393288992599338e+00\n1.4738728339036122e+01\n-4.1617419502548074e+01\n-5.7266046724056228e+00\n1.3086753911726106e+01\n-4.8696449984047803e+01\n-7.8567333649420430e+00\n1.5314601451085355e+01\n-4.2747229909901122e+01\n-7.1830378587702333e+00\n8.3195404975967548e+00\n-4.4120156452290843e+01\n-9.6488070139686162e+00\n1.4253503954787970e+01\n-4.2362163787232198e+01\n-7.4119784164247333e+00\n1.5549633404927549e+01\n-4.3050217182331444e+01\n-7.4970585409863517e+00\n1.3884909629724977e+01\n-4.5266874246353069e+01\n-5.9890003777037615e+00\n1.3736565796485808e+01\n-4.7341724760278616e+01\n-1.0435049784032389e+01\n1.4071681940221568e+01\n-4.1774262840564120e+01\n-1.1680990492004858e+01\n1.3864996193037449e+01\n-4.0661124480689303e+01\n-1.4887580637326462e+01\n1.2177848537206634e+01\n-3.9415631100726387e+01\n-1.2087111719022161e+01\n1.1068383390395882e+01\n-4.4161630556002393e+01\n-1.0762173857115638e+01\n7.6158429236032585e+00\n-4.3090660679649673e+01\n-1.9922100474923855e+01\n9.9934161480876638e-01\n-3.3856460894032502e+01\n-2.1266928604289717e+01\n1.3941049401512677e+00\n-3.4873490152535915e+01\n-2.1427806787706203e+01\n8.7719314825408146e-01\n-3.4154852747481407e+01\n-7.0846680799644792e+00\n1.3899308083995049e+01\n-4.6190195500834619e+01\n-6.4149672688324726e+00\n1.5961504716712989e+01\n-4.3265586083979713e+01\n-1.1753827704054050e+01\n1.4042629650566935e+01\n-4.0075195519994665e+01\n-8.0825927367654877e+00\n1.5194869640365672e+01\n-4.2813608944677952e+01\n-8.6961172892365184e+00\n1.4847284588073100e+01\n-4.2094974150066520e+01\n-7.1689371119945680e+00\n1.5822281308720710e+01\n-4.2891907116860189e+01\n-9.2639698243061144e+00\n6.7318946279717791e+00\n-4.1815131667869991e+01\n-1.4847801662790408e+01\n9.1890454442871476e+00\n-4.4286052542164427e+01\n-1.0117826875491492e+01\n7.0817850247210385e+00\n-4.2436829936827912e+01\n-1.0970820861915234e+01\n1.2941625474417892e+01\n-4.2689021038115769e+01\n-6.2732199124202062e+00\n1.5463288897340336e+01\n-4.4295511111432241e+01\n-6.2732199124202062e+00\n1.5463288897340336e+01\n-4.4295511111432241e+01\n-1.0108944068259444e+01\n1.2622307502106326e+01\n-4.3932836061705729e+01\n-6.8626114415527377e+00\n1.3051663854229703e+01\n-4.7617500081408565e+01\n-7.3183349167424359e+00\n1.4308422749329155e+01\n-4.4839155906778657e+01\n-1.0374024630425307e+01\n1.5126951921426137e+01\n-3.9985666378863357e+01\n-9.3280142509272785e+00\n1.4704838072725392e+01\n-4.2136271402423816e+01\n-1.0374024630425307e+01\n1.5126951921426137e+01\n-3.9985666378863357e+01\n-9.4935529980548949e+00\n1.3632528592116758e+01\n-4.2833203874035974e+01\n-9.5577274053794223e+00\n1.3166591630862287e+01\n-4.4233768289091664e+01\n-8.4256075659075638e+00\n1.5191442044786989e+01\n-4.2246991380311329e+01\n-7.6506399590589291e+00\n1.4088809976871179e+01\n-4.4922196972402951e+01\n-9.7803306556971599e+00\n1.2786863326972423e+01\n-4.4751624767341866e+01\n-8.4256075659075638e+00\n1.5191442044786989e+01\n-4.2246991380311329e+01\n-8.4550476150977207e+00\n1.4860755981309879e+01\n-4.2572821733396388e+01\n-1.0617634411656029e+01\n1.2391416584980089e+01\n-4.3829135013864267e+01\n-1.2975216028230673e+01\n1.3307810717649103e+01\n-3.9924634206788049e+01\n-1.1979209347862925e+01\n1.1721401218630948e+01\n-4.3279263061420338e+01\n-1.2483807921131802e+01\n1.1224788232063476e+01\n-4.3789532305801799e+01\n-1.2596044121552509e+01\n1.0785114785183426e+01\n-4.4135494965925517e+01\n-9.6186390437579909e+00\n1.2738854493140749e+01\n-4.4810642123866273e+01\n-7.6746441866283854e+00\n1.5164496217040272e+01\n-4.3144720142778482e+01\n-1.2898247286312149e+01\n1.4072081743680862e+01\n-3.8851515424109380e+01\n-7.6159989917602431e+00\n1.5332556620835774e+01\n-4.2864212304302285e+01\n-7.5215896148395629e+00\n1.5525287225060119e+01\n-4.3000464253671616e+01\n-6.4829931224134760e-02\n-3.3479013472589139e+00\n-2.0677268235774747e+01\n-1.8405470345680011e+00\n-3.1651567169041694e+00\n-2.2177448910158521e+01\n-4.3763364709846608e-01\n-3.3209094464517750e+00\n-2.0993373264573478e+01\n-1.7859591717803129e+00\n-3.2738192471428214e+00\n-2.2245221242920284e+01\n-1.3672688601257146e-01\n-3.5097542432854509e+00\n-2.0878994915864194e+01\n-7.0772862682407709e+00\n1.6489480698651661e+01\n-4.1854401225748234e+01\n-6.8130398343034582e+00\n1.4483328674883749e+01\n-4.5399698300948323e+01\n-6.2801929224472381e+00\n1.5691246628415973e+01\n-4.4291271051397622e+01\n-1.7258179297519696e+01\n1.0096323261008889e+01\n-3.9914274536474906e+01\n-1.2092389175851441e+01\n1.1723676614569490e+01\n-4.3105032426072128e+01\n-1.3893382705287895e+01\n1.0390753722845769e+01\n-4.3775554552628797e+01\n-1.3948904700067292e+01\n1.1832611396780552e+01\n-4.0307067123403399e+01\n-1.2339779489400751e+01\n1.2037481357950206e+01\n-4.2392692268237404e+01\n-2.4252983858569621e+00\n3.7726718423438610e-01\n-2.2815167069851416e+01\n3.5021317364815454e+00\n-3.7939593753973683e-01\n-2.0653197264490736e+01\n1.7763214359842734e+00\n-2.5128223564662795e+00\n-2.0211696417493005e+01\n3.6756229379136904e+00\n-2.2861012440450668e+00\n-2.0490301388911547e+01\n2.6278932153056886e+00\n-3.9495463419197558e+00\n-2.0891421663495173e+01\n-2.5437053979697324e+00\n7.6589256382242765e-01\n-2.3296300476813546e+01\n-2.4740528405582265e+00\n2.3109141563460778e+00\n-2.5269829199608775e+01\n5.3969131660018199e+00\n-3.2961211625830322e-01\n-2.1979407205554264e+01\n2.8147312821779349e+00\n-2.6474676699459656e+00\n-2.0105409602748370e+01\n2.5003080671199451e-01\n-1.3860190672432242e+00\n-2.0548234859590696e+01\n-9.1724060948838726e-01\n-2.2723816622309814e+00\n-2.0478592791009500e+01\n-1.6886919474006556e+00\n-1.8550079901918841e+00\n-2.1067778636903025e+01\n-3.8933322745355659e+00\n1.4665705856851352e+00\n-2.5392232496365619e+01\n-3.9817568151003924e+00\n-6.7527672577143552e+00\n-2.3267933980638883e+01\n2.6676844515937508e+00\n7.6315180169517460e-01\n-2.0358700123260157e+01\n2.1193015065437213e+00\n8.3861748251614951e+00\n-4.4047261927953599e+01\n3.0754936493555389e+00\n2.5683164610893239e-01\n-2.0461111803748576e+01\n-3.5289242865386622e-01\n3.5079079844217058e+00\n-2.3221941373012822e+01\n1.3119223332398137e+01\n2.2272774925447036e+00\n-3.1906556645173918e+01\n-3.3094916650592983e+00\n-3.4138827874808481e-01\n-2.2963866649206405e+01\n1.9648552235392815e+00\n-1.1348896714715140e+00\n-2.0540507249618493e+01\n1.4057928639375326e+00\n-2.9536319842094847e+00\n-1.9672352786544899e+01\n3.5295508596608642e+00\n2.0674850692990190e+00\n-2.1216841325138599e+01\n2.5313364947529395e+00\n-4.9416847679084768e+00\n-2.1875282737740605e+01\n1.6544956588154935e+00\n1.4055441776482616e+00\n-2.0428381230527464e+01\n2.3463876878837060e+00\n-2.0794233125054511e+00\n-2.0322632810073369e+01\n6.6192587122697211e-01\n3.5279626940813515e+00\n-2.3029114989315723e+01\n2.1530616878293252e+00\n8.5669319980471403e+00\n-4.4334325792142643e+01\n-1.9327454759049789e+00\n3.1244436992790874e+00\n-2.6385119451282740e+01\n1.3033172051862522e+01\n3.6821144500258991e+00\n-2.9722565352813291e+01\n-2.0167932297026092e+00\n-3.1593610695745360e+00\n-2.2404707109015270e+01\n-1.3842043965167430e+00\n-1.8807637183935173e+00\n-2.1000231189587645e+01\n8.4587251405776218e+00\n1.8660624752684971e+01\n-5.7756305245369319e+01\n-8.7302192052267777e+00\n1.3869817295193089e+01\n-4.3827772900760756e+01\n-1.0760151480679139e+00\n1.8437394560379019e+01\n-4.5833956478636424e+01\n-2.4682721198128168e+00\n1.7115716541606623e+01\n-4.5892133474391450e+01\n3.7001641926434675e-01\n1.3996090422450647e+00\n-2.0670682917127849e+01\n-4.2479426225059598e+00\n1.7145176250151248e+01\n-4.4372835402349779e+01\n1.9711169616354616e+00\n1.2014477621847923e+00\n-2.0354468410122958e+01\n2.7707927493437117e+00\n9.9270448656853372e+00\n-4.6134203410183460e+01\n-1.3945056739663328e+00\n-5.2713698990388205e-03\n-2.2086419145554885e+01\n2.2870714963391470e-01\n2.7286398607886539e+00\n-2.1763518897858322e+01\n-1.2352008856440245e+01\n2.7157418972375709e+00\n-3.6435428614030727e+01\n-1.0545545175703555e+01\n7.9872499440115907e-01\n-3.3711008058497114e+01\n3.4756392196884036e+00\n-3.3650994178670004e+00\n-2.0553881742636989e+01\n-1.0075201036708759e+00\n-4.3868180045606753e+00\n-2.2340075581975082e+01\n1.2780078088932157e+01\n4.9917498910100910e+00\n-2.9143675016914720e+01\n-1.1318639317622084e+01\n1.1684321635178312e+00\n-3.4238975999081283e+01\n-1.1701968226547622e+01\n6.5146790529161536e-01\n-3.3625374088800278e+01\n-5.7883287527886615e+00\n-7.4181939957897098e+00\n-2.2474212130533633e+01\n1.3707260026320352e+01\n1.0353076367427864e+01\n-3.5097872922032714e+01\n1.2240920604972720e+01\n6.3971644707693196e+00\n-2.9694680042452788e+01\n1.4056519828765273e+01\n4.0751825664821562e-01\n-2.9379200534258327e+01\n5.9821312554456529e+00\n-2.3133126697949447e+00\n-2.1994460711937990e+01\n1.9227856106745269e+00\n1.0015098441988478e+01\n-4.6266298845823400e+01\n-1.5052010499316241e+01\n6.8379209139674586e+00\n-4.2040577739239254e+01\n5.7298398715356678e+00\n-5.0790566960340549e+00\n-2.2645888226045034e+01\n-2.4834746540179191e+00\n-8.1053317955882900e+00\n-2.1425707811379986e+01\n2.6880544945991502e+00\n-4.8382377374619662e-01\n-2.0373553636914199e+01\n-3.5838298689434767e-01\n3.0119831990385872e+00\n-2.2481162259992701e+01\n7.9219672715685596e-01\n-1.4633744582035404e+00\n-2.0506871164266016e+01\n-1.6241020094981028e+01\n1.1438473551387050e+01\n-3.9196459729528392e+01\n-1.3280019729384225e+01\n1.0976844517524986e+01\n-4.2795032794090552e+01\n9.0773127464342551e-01\n-2.7357481555318213e+00\n-1.9902324112394794e+01\n-4.4171171270508394e+00\n5.8171273407457917e+00\n-4.0572904217028110e+01\n3.5149498553382221e+00\n7.6852215169397486e-01\n-2.0686198096306796e+01\n-5.1266146820773095e-01\n2.7836303201927790e+00\n-2.2383262521355242e+01\n2.4878445734729420e+00\n-4.7936836458995309e+00\n-2.1737307197707231e+01\n1.2320499672348570e+01\n5.4871293347577534e+00\n-3.0798893302253930e+01\n-8.3997521615732413e+00\n1.3707264558752231e+01\n-4.4142908618411070e+01\n-2.1897128914711872e-01\n-1.1595643032510337e+00\n-2.0830476195047055e+01\n3.9216275673873886e+00\n-4.0859846109097848e+00\n-2.1655370907613161e+01\n4.4525148307011158e+00\n2.2043078733232973e+00\n-2.1965331709492769e+01\n-2.0288234006900763e+00\n-1.5724754211504395e+00\n-2.1421128750644790e+01\n-3.1069673996707925e-01\n2.7040392642214375e+00\n-2.2102097493949255e+01\n4.5401919624077863e-01\n-2.8307208246433437e+00\n-1.9824917263824894e+01\n1.0951308577998622e+00\n2.5654919644290891e-01\n-2.0344745462452426e+01\n2.2343824623420270e+00\n-4.4500206664758917e+00\n-2.1305877479489453e+01\n-1.4513533476721496e-01\n-6.5658644876095282e-02\n-2.0907503224545270e+01\n-2.2615852784580599e+00\n-8.1249907464831406e+00\n-2.1373017886073701e+01\n1.9432780814665866e+00\n-1.6187291211246062e+00\n-2.0254200516990092e+01\n-2.6829648022075858e+00\n-8.1224042830518997e+00\n-2.1457725695299633e+01\n-7.4665870766368485e+00\n1.5795219454424986e+01\n-4.2394182089643721e+01\n-1.4933411616103274e+00\n1.8042460271539632e+01\n-4.6064884141612438e+01\n-5.2998712634417213e+00\n1.6470969570203398e+01\n-4.3915285231884873e+01\n-1.7148664917772451e+00\n1.7668042081710375e+01\n-4.6560620368531595e+01\n-1.2926430123876401e+01\n1.3923296440695539e+01\n-3.9150082698615819e+01\n6.1904358149529437e-01\n-1.8736479009923082e+00\n-2.0390885793663831e+01\n-4.2303522374611919e+00\n5.5516993619050572e+00\n-4.0153965449716210e+01\n-6.8107813284966658e+00\n7.5799942466081749e+00\n-4.2950895249602738e+01\n-3.5029091361549353e-01\n1.8485462233339295e+01\n-4.6601055258457883e+01\n1.9124827469853252e+00\n1.9230107790180949e+01\n-4.7831141220300204e+01\n-3.2930823140496104e+00\n2.6976798444013586e+00\n-2.6901436745178383e+01\n-2.1430030446191436e-01\n1.4064406244167289e+00\n-2.1094681951736479e+01\n1.2564972706444889e+01\n4.4302652303499750e+00\n-3.1261174963133463e+01\n1.3491529295522116e+00\n1.0803151079230677e+00\n-2.0310631221488595e+01\n1.3491529295522116e+00\n1.0803151079230677e+00\n-2.0310631221488595e+01\n2.3105822549994531e-01\n-1.6866272760767054e+00\n-2.0343511236788267e+01\n-3.7290899200877186e+00\n-8.0289925865705509e+00\n-2.1566087578204126e+01\n-3.7981931330323224e+00\n-8.0305479910469213e+00\n-2.1538325076904620e+01\n-2.5150655133561850e+00\n-8.2170739540014583e+00\n-2.1246461956503126e+01\n1.0958538237375568e+00\n1.5903270117415531e+00\n-2.0578173403125117e+01\n1.2852124075724230e+01\n4.0112313363271346e+00\n-3.0159900759113544e+01\n6.9214734469337436e-01\n2.2255719800092870e+00\n-2.1198066856126115e+01\n6.1763906288961989e-01\n-5.9120782279701185e+00\n-2.1324393949053558e+01\n-2.1922392001043675e-01\n-3.0089016254795437e-01\n-2.0906846890979821e+01\n1.0976778362234803e+00\n-8.2574138645604933e-01\n-2.0471691053460617e+01\n-1.3292365613283814e+00\n1.8960325435336682e+00\n-2.2493503341356750e+01\n-4.2226029639096687e+00\n-6.8929711962577196e+00\n-2.3192726056586931e+01\n-3.1299504059801246e+00\n-7.1803573639184815e-01\n-2.2431144898048412e+01\n1.7446823227844580e-01\n-1.9792157094862801e+00\n-2.0620061712391674e+01\n-2.7280610437986669e-01\n3.7913640484595890e-01\n-2.0945551919224602e+01\n2.6312364516672666e+00\n-1.7621874329613247e+00\n-2.0260319834127746e+01\n-7.2329693604469739e-02\n-2.5849936209907103e+00\n-2.0061290977076229e+01\n2.1797255455920630e+00\n1.4459319231296128e+00\n-2.0439394301149200e+01\n-3.3972276847002489e+00\n-7.8723351313411545e+00\n-2.1691248926786571e+01\n6.1700608833544175e+00\n-1.0962605344029264e+00\n-2.2089504149753559e+01\n-1.1153766528672913e+01\n1.4222635623764292e+01\n-4.0617082286823788e+01\n-1.8921028083926221e+00\n1.7980558934575694e+01\n-4.5589649474477596e+01\n8.0758757704561601e-01\n-2.6690376453230469e+00\n-1.9999641394437134e+01\n-2.4029955357445609e-01\n-3.7630681864377492e-02\n-2.0845577989348453e+01\n1.4341257993547329e+01\n-1.3518688827550414e+00\n-3.0593469596368369e+01\n1.2737067539679081e+00\n-4.3018553457082342e+00\n-2.1162244839608672e+01\n2.6466977231411613e+00\n4.9103198839372553e-01\n-2.0270824631024748e+01\n-7.4562499617473446e+00\n2.3430280675090969e+00\n-3.5830367561047467e+01\n-4.5870300168014353e+00\n1.5866811758807623e+01\n-4.5774141561177309e+01\n-4.9278504558056175e+00\n1.6003110997177519e+01\n-4.5119562385016827e+01\n-5.2000570403461888e+00\n1.6637087757592528e+01\n-4.3798636833861266e+01\n-5.9252521337814619e+00\n1.6962618516216917e+01\n-4.2432909331408638e+01\n-6.7003242961235712e+00\n1.6576084392200002e+01\n-4.1925519579868499e+01\n-6.4994355602241460e-01\n1.8388765566701789e+01\n-4.6497742712646016e+01\n-9.8387106574605863e+00\n1.2100983460777291e+01\n-4.5321523733210633e+01\n-9.7746909417518424e+00\n1.2373936672788981e+01\n-4.5193555420411862e+01\n-1.0535545701472845e-01\n1.9539653279129492e+01\n-4.5144051535007371e+01\n-4.9323015665882348e+00\n1.3668914328384670e+01\n-4.7982281665064100e+01\n6.0194096550787526e+00\n2.2045789182582414e+01\n-4.8816980618352424e+01\n1.7373955176006152e+01\n2.5680544262894607e+01\n-5.5944769540605016e+01\n-5.0049041818102447e-01\n-6.6417924536878259e-01\n-2.1141804525033404e+01\n-2.3230500044972097e-02\n2.9144575391226204e+00\n-2.2120807956391261e+01\n6.3308784456621110e+00\n-8.9958164306139410e-01\n-2.2315722663759292e+01\n-3.2469818139524569e+00\n2.6282184176038537e+00\n-2.6886066293306961e+01\n-3.0386770025714007e+00\n-7.4996535957300248e+00\n-2.2251145290570399e+01\n1.4013471533296993e+01\n4.1657493845673477e-01\n-2.9588318856199589e+01\n-3.9130016998475075e+00\n-7.0391227367449956e+00\n-2.2879305275321425e+01\n-6.4451064751829179e+00\n-4.1189463362791452e+00\n-2.7136336142642772e+01\n1.1387357750018150e+00\n-8.4288582234364622e+00\n-2.1145366421285686e+01\n1.5850735727106720e+00\n-4.4845602339687503e+00\n-2.1404107566630358e+01\n1.3910778530784162e+01\n2.4188541884911100e+01\n-5.4870729717111317e+01\n1.2107991728299727e+00\n-5.4140843333852917e-01\n-2.0360281453534565e+01\n7.9079715210099921e-01\n-5.1070626076753953e+00\n-2.1528643401730207e+01\n1.3762849602191270e+01\n1.2350135694017876e+00\n-2.9812842239839377e+01\n1.2355544602962359e+01\n5.9013384264460198e+00\n-3.0055265853397358e+01\n1.3299576678819344e+01\n2.2412862394142441e+00\n-3.0794326683180973e+01\n-1.4209599732608555e+00\n-2.1692712240225558e+00\n-2.0663289274757261e+01\n-1.7532164915190911e+00\n2.0448350072056587e+00\n-2.3370358062669357e+01\n1.2984347613527687e+01\n3.1366154816322234e+00\n-3.1306981917976085e+01\n1.3140918328314322e+01\n2.4063282653247802e+00\n-3.1682118168997548e+01\n1.2764364958031914e+01\n3.8128513414741509e+00\n-3.1313731896717968e+01\n4.5853651722994284e+00\n1.7375958147749024e+01\n-5.4462032283285964e+01\n-9.4317946207571151e+00\n1.5151656488049349e+01\n-4.1023011702931377e+01\n8.7979001879049479e-01\n1.9786729501620947e+01\n-4.6368561135051337e+01\n-5.7052556366286638e+00\n1.3485478285356244e+01\n-4.8675681734758378e+01\n8.7681188814929065e+00\n1.4701816118374758e+01\n-5.2538341288065773e+01\n1.5676345074498088e+00\n2.0517926963265211e+01\n-4.6021133325679671e+01\n1.0509280119811525e+01\n2.1587456818231715e+01\n-5.4692546784771061e+01\n-7.2997240522238700e+00\n1.1645714553055975e+00\n-3.4278436196315575e+01\n-1.0294823148783141e+00\n1.9229203603727768e+01\n-4.4942150566526529e+01\n-6.0776526080344850e-01\n1.8566109691116331e+01\n-4.5960030133880672e+01\n1.0921845119993514e+00\n1.7115093367061540e+01\n-5.0956853434469821e+01\n-4.6902408068374646e+00\n1.0062206680160420e+01\n-4.6470653649264399e+01\n7.4306319747773866e-02\n1.1389551379110570e+01\n-4.8105890311142211e+01\n2.8513619526008784e+00\n7.8628069977747517e-01\n-2.0380813494738188e+01\n-5.2496615835907443e+00\n1.0521001640479993e+01\n-4.6959988289204880e+01\n1.2784189091517961e+01\n6.5723656807681090e+00\n-4.1520902850869035e+01\n-7.5916714548542119e+00\n-1.8914582230534396e+00\n-2.9984650206120680e+01\n4.6881796688885247e-01\n-1.5690051699824543e+00\n-2.0304956406302090e+01\n-5.7015373479287854e+00\n8.2435465957166834e+00\n-4.3942026998923353e+01\n1.5656909700515305e+00\n-1.4095085216061527e+00\n-2.0549404969275724e+01\n6.4302505160100987e+00\n-1.2917749046576716e+00\n-2.1866809409817936e+01\n-7.6351501210507058e+00\n-2.0140801650151690e+00\n-2.9845951855448014e+01\n-6.5881718095023736e+00\n7.8233936828117709e+00\n-4.3370633630885948e+01\n3.5085984621097506e+00\n2.1491592486020288e+00\n-2.1311238374514499e+01\n-2.6770375015475154e+00\n1.7860487694415074e+01\n-4.5434902568811317e+01\n-1.4632151407277243e+01\n8.2406280623832693e+00\n-4.4001169385472217e+01\n-6.8730294239129490e+00\n7.7955981658612918e+00\n-4.3137457713450956e+01\n-1.2918817326745952e+01\n1.4296846961356595e+01\n-3.8792327554322227e+01\n-7.6674543949737233e+00\n2.2426793866722381e+00\n-3.5598202124251955e+01\n-2.6230938848555230e+00\n1.5162114475552713e+00\n-2.4259829264963802e+01\n-1.5450395349989772e+00\n1.7461492023660053e+01\n-4.6779539596591590e+01\n-2.1161043850652380e+01\n1.7770404086388276e+00\n-3.5298777734730258e+01\n-8.8669980772782377e+00\n3.0229624483501789e+00\n-3.6713513906493240e+01\n-5.6824786619736916e+00\n8.4054378926588509e+00\n-4.4094107802385714e+01\n3.5810060861005568e+00\n-1.3489041929395440e+00\n-2.0654733339576239e+01\n-1.1329507070861732e+01\n8.0504073708380375e+00\n-4.3586467961225537e+01\n-3.7525321645570511e+00\n1.0986034702273054e+01\n-4.7564993122481155e+01\n4.6865966544765607e+00\n2.0273420819867560e+00\n-2.2281395690832017e+01\n-1.5044803312861290e+00\n8.8071631809925517e+00\n-4.4627386922948119e+01\n1.4455782646024458e+01\n-1.2402562901026006e+00\n-2.9712573627305900e+01\n4.8728826824499967e+00\n-1.9444479777382409e+00\n-2.0946960447824427e+01\n6.4452005859711745e+00\n-1.0856165465483064e-01\n-2.3260512131310168e+01\n3.5413287032491301e+00\n1.1323579746089116e+01\n-4.8122694889816373e+01\n-1.1987695646089081e+01\n2.2238537892022912e+00\n-3.5734875853964731e+01\n6.5944820001955486e+00\n-6.5602911638775685e-01\n-2.2650255915687854e+01\n2.8713262031775848e+00\n-1.4416704590090896e+00\n-2.0474344788168910e+01\n9.0447092519692998e+00\n-5.9880714724673645e+00\n-2.4308293820000888e+01\n6.4696070144875029e-01\n-1.4632244557175234e+00\n-2.0474862837010864e+01\n1.3029915984057598e+00\n1.8609084800738926e+00\n-2.0732015742432740e+01\n7.8040572618747266e+00\n1.7234924918125998e+01\n-5.6073301872452774e+01\n2.4922099031603406e+00\n1.4138153318826949e+00\n-2.0539625955232520e+01\n-3.1951485426593731e+00\n2.0916847460998644e+00\n-2.6140194932336051e+01\n7.6591139464825604e+00\n1.6630756989838456e+01\n-5.5174891799952640e+01\n2.3526523228273657e+00\n1.9130780706897659e+00\n-2.0746246882681682e+01\n1.1719612076231023e+01\n1.5678949589100254e+01\n-5.3930150273695730e+01\n-4.9504796087345959e-01\n1.8437519606208390e+00\n-2.1573055948067132e+01\n-2.3136306299623000e-01\n-3.8130163760637239e+00\n-2.1331304109212574e+01\n-2.5603269710758441e+00\n7.5858542351667713e-01\n-2.3282074778934813e+01\n-3.8285350033180732e-01\n-1.1699512835723860e+00\n-2.0826049175848574e+01\n-3.4082385495985923e+00\n9.1264758424915300e+00\n-4.5080322971832011e+01\n-7.3362388763301194e+00\n6.9238144892288096e+00\n-4.2130040873692423e+01\n7.1074555780953874e-01\n1.7683066021801848e+00\n-2.0779629694676007e+01\n1.1627526970575097e+01\n1.6067105199193410e+01\n-5.4780696901049403e+01\n-4.3366559845339721e+00\n1.0714577219653652e+01\n-4.7103762825468323e+01\n-3.9748595359095082e+00\n9.4282067784044052e+00\n-4.5505692537150296e+01\n2.9905143343659377e+00\n-3.7334189611664779e+00\n-2.0619802347783327e+01\n-3.5159754473670501e+00\n-7.9851210880236687e+00\n-2.1590198991971420e+01\n4.4753831297303570e+00\n1.6801096740428652e+00\n-2.1664151812959069e+01\n1.6458837171547884e+00\n-1.5621243564685308e+00\n-2.0343523836377656e+01\n-5.0603237164656019e+00\n-7.1362165481668898e+00\n-2.2761094114859173e+01\n4.9467187601620077e+00\n1.9190984680895982e+00\n-2.2374655949484314e+01\n-3.3590486440907332e+00\n-7.7949518879148370e+00\n-2.1916562792014041e+01\n-1.4050035245238909e+01\n4.8290187983673638e+00\n-3.9382191102284580e+01\n8.9190286480180827e+00\n1.5984046119920110e+01\n-5.4231908634006736e+01\n-9.2587357736087998e+00\n2.6171614831495473e+00\n-3.6259129890359091e+01\n2.3849734098539543e+00\n-1.4201470559820903e+00\n-2.0499020819765811e+01\n-1.0982728183329078e+00\n2.1547746350988430e+00\n-2.2396141818636636e+01\n1.3167713262100607e+01\n-5.8289141946330201e+00\n-2.4017981751450826e+01\n-4.6849404769647673e+00\n8.8811317915112191e+00\n-4.4686194895730182e+01\n-2.6694163722275226e+00\n3.4872703192180765e+00\n-2.8011254962650487e+01\n-3.1218773282405663e+00\n8.1156828702374728e+00\n-4.3719090995533584e+01\n-4.4044829668281302e+00\n9.3753037514581656e+00\n-4.5393676117871230e+01\n4.8240437525695796e+00\n-2.1789624427882730e+00\n-2.0686162168900964e+01\n-3.1363143833873415e+00\n-8.1037495519702016e+00\n-2.1871412650843862e+01\n-1.4406294625105770e-01\n3.4881039748417626e+00\n-2.2992807576063985e+01\n1.7317592006444029e+00\n-8.3955907576725970e+00\n-2.1302754316197234e+01\n1.8169222695873657e+00\n-2.7027017169913394e+00\n-1.9969537243241358e+01\n6.1404766520541063e+00\n1.2742307581512142e+00\n-2.4053704630496188e+01\n2.1796264633353917e+00\n-2.5512683680145090e+00\n-2.0200515471727243e+01\n-6.5110569825551323e-01\n3.2322107704403753e+00\n-2.3105009194999905e+01\n-2.4957303818315797e+00\n-1.2694769800696861e+00\n-2.1829002749525312e+01\n4.0723389274186585e+00\n2.2483882939859061e+00\n-2.1755465601358335e+01\n-3.5221252234782092e+00\n-8.0359419020895864e+00\n-2.1561428006160007e+01\n4.6941393256941728e+00\n-1.9511157948035625e+00\n-2.0966383551058303e+01\n6.4496419168806334e+00\n-9.2044986484273128e-01\n-2.2284541470641507e+01\n-1.3485696553494643e+01\n4.5616412372866018e+00\n-3.8995540691466005e+01\n-7.5503812083001272e+00\n7.0582597617626881e+00\n-4.2519417004512093e+01\n-2.7153249614639083e+00\n-1.2132420148200509e+00\n-2.1863003625940575e+01\n-1.2087277459296475e+01\n1.7230084210568992e+00\n-3.5071928114988125e+01\n3.3558644796498633e+00\n-1.3098859252322187e-01\n-2.0585624570976979e+01\n1.8802598757729612e+00\n9.4782190991399862e+00\n-4.5413100028911444e+01\n-4.4785418880781949e+00\n1.0819223557668360e+01\n-4.7251108963770974e+01\n1.2997054071144122e+01\n2.4368602684718743e+00\n-3.2480003783405429e+01\n-9.2032784555554183e+00\n2.4525890936354187e+00\n-3.6016813992783284e+01\n1.3555931990281469e+01\n1.4338175338876054e+01\n-5.2165914204780286e+01\n-2.1634618215258685e+00\n2.6605122380215857e-01\n-2.2681494203363517e+01\n-5.4052714020055834e+00\n1.0899114634505393e+01\n-4.7672601081923830e+01\n-4.8552848760112681e+00\n-6.7264463268815229e+00\n-2.3340349162640663e+01\n-4.6698987115475763e+00\n-7.6299408653172422e+00\n-2.2068440649921779e+01\n-2.2122309351745923e+01\n2.2050564529145840e+00\n-3.5852800012630993e+01\n-2.1558809470108251e+01\n1.9152535097001828e+00\n-3.5445622591624250e+01\n-2.2376323299787266e+01\n8.1392893774616240e-02\n-3.3028986634136750e+01\n-2.1589550973350160e+01\n2.2656948553055405e+00\n-3.5698951915637956e+01\n3.8719821153340899e+00\n3.0738881167744081e+00\n-2.2424691544621517e+01\n4.3172358085341802e+00\n1.0751143749350922e-01\n-2.1110878813318305e+01\n-1.5694974228784460e+01\n-6.8668539766252259e+00\n-2.3107947964545886e+01\n-4.5849010777539121e+00\n-7.3528393527408804e+00\n-2.2494454606752406e+01\n-4.0529485912532763e+00\n-7.4987952730571985e+00\n-2.2144733732148566e+01\n-6.6565399995959718e-01\n1.9046004966740778e+01\n-4.5840078282613234e+01\n2.9438377800085407e+00\n2.0482231680889772e+01\n-4.7123867414162348e+01\n-8.5478772809575898e-01\n1.8882490348273699e+01\n-4.5426978085448326e+01\n-1.3058242412828720e+01\n-7.3759620688956105e+00\n-2.2399956208305280e+01\n-1.3723916101231511e+01\n1.1025190373071867e+01\n-4.3101269780122067e+01\n-1.3723916101231511e+01\n1.1025190373071867e+01\n-4.3101269780122067e+01\n-6.2801929224472381e+00\n1.5691246628415973e+01\n-4.4291271051397622e+01\n1.1660629301691609e+01\n2.3047859596922411e+01\n-5.3725941787245709e+01\n1.6119951618236762e+01\n2.1984960471546700e+01\n-6.0467962441589179e+01\n8.8334414656207620e+00\n1.8646684165382130e+01\n-5.7546609189865492e+01\n3.4524524764124980e+00\n1.9576753210570942e+01\n-4.9713542123799542e+01\n3.5921557660038483e+00\n-1.2345650117464195e+00\n-2.0790004356828906e+01\n4.0449136112223236e+00\n-3.4427345399332792e+00\n-2.1035902068163931e+01\n3.5914880859622320e+00\n-3.7811457520767369e+00\n-2.1013431997378728e+01\n-3.8341396552033844e+00\n-8.2239043858969261e+00\n-2.1294525209197161e+01\n-8.8902354129232375e+00\n6.9609064881289324e+00\n-4.2227867147419417e+01\n-3.1284013493179996e-01\n2.4327675566624491e+00\n-2.1844011641242975e+01\n-2.3414499484544833e+00\n6.4855080555629208e-01\n-2.3139349355764601e+01\n1.3802865263378685e+01\n-3.0836074485663811e-01\n-3.1987598174170692e+01\n-3.4968264199564061e+00\n-7.8149456788457350e+00\n-2.1473196404382641e+01\n1.2015247090710805e+01\n-4.7293992783021972e+00\n-2.5870175709639000e+01\n-1.8424984271929854e+00\n-8.3138618558778195e+00\n-2.1077391903177734e+01\n1.3211680387350130e+01\n1.0062910693694388e+01\n-3.9407400677688301e+01\n-1.6256495929855745e+00\n1.0344065225629218e+00\n-2.2467932925052121e+01\n2.4174614117714248e+00\n1.5692713302972303e+00\n-2.0583607162366789e+01\n4.7089954568021870e+00\n2.2529553178926864e+00\n-2.2359280982955262e+01\n-1.0449557974363179e+00\n-1.9007550188942806e+00\n-2.0950620927567023e+01\n2.8631901395469890e+00\n-6.9651297735798101e-01\n-2.0475716700595903e+01\n1.4374102978695671e+01\n-1.1975762032753197e+00\n-3.0366067565431646e+01\n3.9817971629479172e+00\n-3.4351216521303529e+00\n-2.0990478029755796e+01\n-3.9156189203031087e+00\n-7.1419031156612229e+00\n-2.2681369695106220e+01\n1.2668152504296049e+01\n-4.1779829012333192e+00\n-2.6612219998040334e+01\n4.7475634812527119e+00\n1.5590068723302009e+00\n-2.1914665866808768e+01\n4.5357486249483188e+00\n-4.3794994808927452e+00\n-2.2339500706151856e+01\n1.2505161953956170e+01\n-4.6719851031119992e+00\n-2.6123681234233732e+01\n1.0267768118165590e+01\n-6.5576528190676564e+00\n-2.3087636032264015e+01\n4.4753930467827194e+00\n2.4241511808616880e+00\n-2.2278384009077023e+01\n3.7625522919409802e+00\n-3.8715217709959120e+00\n-2.1267130490765958e+01\n-4.0501618922288181e+00\n-7.6907008572053606e+00\n-2.1929155724510444e+01\n3.3736377689908741e+00\n2.4774379221615579e+00\n-2.1496079415777874e+01\n6.8391288795914553e+00\n-3.3973199016583427e-01\n-2.3149652025541059e+01\n4.2818434002634431e+00\n-3.1993112416553222e+00\n-2.0928738042118400e+01\n4.2818434002634431e+00\n-3.1993112416553222e+00\n-2.0928738042118400e+01\n4.3736686113179584e+00\n-4.2789952481927100e+00\n-2.2049896322366134e+01\n4.4012001185667682e+00\n-4.4747700485344151e+00\n-2.2257584558844616e+01\n1.2529844524687883e+01\n-3.9798961848236467e+00\n-2.6870899557015701e+01\n1.3904642608493374e+00\n-2.9471629369627972e-01\n-2.0306217401494159e+01\n1.3904642608493374e+00\n-2.9471629369627972e-01\n-2.0306217401494159e+01\n1.6667487875475320e+01\n2.1515913391182384e+01\n-6.1611371173791781e+01\n-1.3970203140288209e+01\n1.1897789138729948e+01\n-3.9950056826122754e+01\n1.3584024956498725e+01\n9.2119247256438150e+00\n-3.8571880091296286e+01\n1.3599292899406016e+01\n8.7998080771613676e+00\n-3.8503166273219968e+01\n3.4312774549307892e+00\n1.9406669166430788e+01\n-5.0657130951575468e+01\n-4.7682791054175144e+00\n1.7922656670262818e+01\n-4.2437927853512704e+01\n1.0163548829227651e+01\n1.9355303527588003e+01\n-5.8033292990936559e+01\n1.3721104351926046e+01\n-5.2331466744516781e+00\n-2.4841464242073410e+01\n1.2607549718599405e+01\n4.1729403666483149e+00\n-3.1556236861406216e+01\n4.2044364762945907e+00\n1.7246497420667982e+01\n-5.4054688301457702e+01\n1.4177737423670624e+01\n2.2265730211450798e+01\n-5.7445525495719657e+01\n5.4572554600225018e+00\n2.1437005788584788e+01\n-4.8762530711673087e+01\n-1.2082888602168278e+01\n1.8564023555183258e+00\n-3.5335000201374640e+01\n-5.1092799237393756e+00\n1.3297359010217789e+01\n-4.9312802121451668e+01\n1.1671083868676970e+01\n2.3659591379238051e+01\n-5.2114534784743753e+01\n9.5519235320558438e-01\n2.0394389139006865e+01\n-4.5336931689000593e+01\n-9.9605863240488404e+00\n1.4106054074398873e+01\n-4.2441424142617699e+01\n-4.2411328275473039e+00\n-8.0834388058889157e+00\n-2.1582536265311759e+01\n3.7130571697213641e+00\n-1.1508033681273777e+00\n-2.0984586315317301e+01\n-2.6583504737053794e+00\n1.5821589908930175e-01\n-2.3080687192294498e+01\n-2.7416231441717693e+00\n2.7005314171733040e-02\n-2.3230084162287511e+01\n-9.3342606794869312e+00\n1.5765397756830966e+01\n-4.0402099335160685e+01\n-1.0250625735063624e+01\n1.1930661379101183e+01\n-4.5132990036035167e+01\n1.3355020548893146e+01\n1.5585862291260235e+00\n-3.1775360806624001e+01\n1.3408053827645354e+01\n1.4213654407475020e+00\n-3.1595274363314214e+01\n1.3182696938612215e+01\n3.3433960607092237e+00\n-2.9020844386023651e+01\n2.7249470837442202e+00\n-1.8888193538614750e+00\n-2.0226702468824829e+01\n1.3640952862160255e+01\n1.0487067470963711e+00\n-3.0975968216169754e+01\n1.3782827305005952e+01\n3.5412719475245902e-01\n-3.1513954034969494e+01\n-8.3619306545704060e+00\n1.3921534441191309e+01\n-4.4366581690373991e+01\n1.4557060386016998e+01\n-1.4270001922180471e+00\n-3.0179127711563130e+01\n1.4423751953265411e+01\n-7.3113671173845673e-01\n-2.8965136037263253e+01\n-7.1578904607400293e+00\n1.4492365583008091e+01\n-4.4550633977887422e+01\n-1.1164764827057613e+01\n1.3460130612988104e+01\n-4.1898737599725060e+01\n-2.4693250563654768e+01\n1.6213846158134494e+01\n-5.0130525408046957e+01\n-9.3478711929229750e+00\n1.2712716317072502e+01\n-4.5265738201847235e+01\n-4.5825677494372883e+00\n1.5401848936549294e+01\n-4.6446493264921244e+01\n6.2343308065739740e-02\n1.7494734400108463e+01\n-4.9202737243742142e+01\n4.2185304932516077e-01\n-1.2098694096096068e+00\n-2.0767157468418986e+01\n-5.9493848032176802e+00\n1.5586696827921008e+01\n-4.4547484614214831e+01\n1.5527581343564789e+01\n2.2074757024448079e+01\n-5.9725250268341263e+01\n7.1229427464305761e+00\n2.1457382293309081e+01\n-5.1330431832123665e+01\n1.5527581343564789e+01\n2.2074757024448079e+01\n-5.9725250268341263e+01\n1.5055960671051904e+01\n2.2459737321802272e+01\n-5.8420567575684970e+01\n-6.6565399995959718e-01\n1.9046004966740778e+01\n-4.5840078282613234e+01\n-4.4149003550681707e+00\n1.6440126164823127e+01\n-4.5299134128519505e+01\n8.6851868789073521e+00\n1.5083750195285845e+01\n-5.3089996974895321e+01\n1.4919955165168304e+01\n2.1452739867902284e+01\n-5.9717394955280412e+01\n-1.9660930566546608e+00\n-1.8332220152291967e+00\n-2.1052247157150319e+01\n-2.5394634537039793e+00\n2.1975839191407647e+00\n-2.5213376494951024e+01\n-5.1956315495743102e+00\n1.1208884385262625e+01\n-4.8002148480161566e+01\n3.6388381325372494e+00\n1.1550507862684924e+01\n-4.8414956182666153e+01\n9.1145679929424972e+00\n1.5764795032194979e+01\n-5.4144626162504323e+01\n-1.6114080199439504e+00\n-1.1245829427386331e+00\n-2.1583358904368289e+01\n9.9588646236862264e+00\n2.0432919827479584e+01\n-5.6572259475989974e+01\n-1.3119719618881345e-01\n-3.2242753849254363e-01\n-2.0903713153297769e+01\n-5.1830319522351926e+00\n1.1585790636294584e+01\n-4.8486271458954604e+01\n2.4184353045458313e+00\n-7.3598078674014888e-01\n-2.0429457986956063e+01\n-1.0687565005240376e+00\n-5.6892947073326694e-01\n-2.1565865325057135e+01\n1.4953246454858871e+00\n-1.0133922875701373e+00\n-2.0500815756422700e+01\n-1.3166973854001565e+00\n-7.1171621863096490e-01\n-2.1397074534691292e+01\n1.9874241831310635e+00\n1.5581764252762089e+00\n-2.0465494404056436e+01\n4.1662856821995753e+00\n-4.1190332512683510e+00\n-2.1824540663520150e+01\n1.3936082858835515e+01\n8.6979524506881212e-01\n-2.8966868551457257e+01\n-3.1903277217242416e+00\n2.6981061180551973e+00\n-2.6968064913544509e+01\n1.3473112309992382e+01\n1.4892667078123532e+00\n-3.1140442222968574e+01\n1.2764364958031914e+01\n3.8128513414741509e+00\n-3.1313731896717968e+01\n1.2842509602022096e+01\n3.0421404411841313e+00\n-3.2355784559757957e+01\n1.8029356981836264e+00\n-1.0988812893159516e+00\n-2.0538310687046486e+01\n3.1181325348085136e+00\n2.9809460650737484e-02\n-2.0443891911802098e+01\n2.2264069250454273e+00\n-8.3849288266742372e-01\n-2.0430099699254477e+01\n4.1625530825567756e+00\n-1.2589038055861386e+00\n-2.0879748098237918e+01\n3.9522058539658569e+00\n-1.0263245023887551e+00\n-2.1100796691937120e+01\n-1.5961499598969053e+00\n-1.8404199128035497e+00\n-2.1065254240358922e+01\n6.5150260301017511e+00\n-1.0280123988705903e+00\n-2.2154856813404859e+01\n2.5604228844661425e+00\n-1.6097328242074727e+00\n-2.0291504704707126e+01\n2.9160888067473287e+00\n-1.3669221619687648e+00\n-2.0598173501245547e+01\n1.2774355624798819e+00\n-1.4994331075852529e+00\n-2.0445774017269024e+01\n-3.3540822239366994e+00\n-4.1146701544810743e-01\n-2.2772530725374963e+01\n2.9577822388720199e-02\n-3.3020302672038175e+00\n-2.0632222060484001e+01\n-9.3761583917071301e-01\n-5.8401258266222822e-01\n-2.1469471559042891e+01\n2.9571325298931721e+00\n-1.2180692084225611e+00\n-2.0749428042464281e+01\n1.2494193825758472e+01\n4.6721504095975410e+00\n-3.0972865365980489e+01\n2.5416260114119287e+00\n-2.6001790523123671e+00\n-2.0119505985637922e+01\n-1.9303868822084922e+00\n-1.3690470243517550e+00\n-2.1759724646079704e+01\n1.7357235687539434e+00\n-1.6599810975522447e+00\n-2.0202641561005045e+01\n1.6574829077404625e+00\n-3.5090416595864737e+00\n-2.0335004488783692e+01\n4.1097145948549043e+00\n-2.1200979704714906e+00\n-2.0737440250647452e+01\n1.4953246454858871e+00\n-1.0133922875701373e+00\n-2.0500815756422700e+01\n-2.1115585000608472e-01\n-8.5902464162555492e-01\n-2.0888489719012902e+01\n-1.4489317320360995e+00\n-3.5029005311719497e-01\n-2.1665527464341761e+01\n-4.5770193651562707e-02\n-5.8612662473963273e-01\n-2.0876738526720192e+01\n5.5122971919263133e+00\n-5.1168217404238119e+00\n-2.2530900477114500e+01\n2.0743780616549745e-01\n-1.4505753489220414e+00\n-2.0492152998561295e+01\n-1.3638000872854157e+00\n-2.7368607701329639e-01\n-2.1920612141237420e+01\n-3.9505138141895851e-02\n4.0869657538242077e-01\n-2.0538461876322408e+01\n1.2311052456829577e+01\n5.8832512633535616e+00\n-3.0106858978743301e+01\n2.5722417269611983e+00\n5.4244465939029973e-01\n-2.0266322590803409e+01\n-1.1339859707800186e+00\n9.7097207933564453e-02\n-2.1738419663559203e+01\n-1.5319628257546769e-01\n7.0426561296425461e-01\n-2.0877127455983043e+01\n2.8294688679646942e+00\n-1.7420406082313877e-01\n-2.0357155737399328e+01\n1.2352415989330199e+01\n5.8497940388075005e+00\n-2.9795616211542914e+01\n1.2999717081855593e+01\n4.0062414100111603e+00\n-2.9296585795921487e+01\n1.4032743549466822e+01\n6.5512308062350211e-01\n-2.9258716419682379e+01\n1.4252544437280873e+01\n-2.9854581670583619e-01\n-2.9443191904462335e+01\n8.5589616684697845e+00\n1.4562234562340937e+01\n-5.2394968941309507e+01\n2.2165544192791855e+00\n-7.9549032676000442e+00\n-2.1636538289643639e+01\n-1.1115913988962978e+00\n-2.5350556442574348e+00\n-2.0105808870925163e+01\n4.1975770003017008e+00\n-1.8403928633364097e+00\n-2.0972869466447374e+01\n-9.3001722419118893e-01\n-4.7161939037956035e-01\n-2.1594308284723112e+01\n3.1097643280900642e+00\n-2.6209669156044670e+00\n-2.0015475564311235e+01\n-1.5606575823412103e+00\n5.4529682613389169e-02\n-2.2458481487809344e+01\n3.2086041838742037e+00\n1.8717971342305577e+00\n-2.1001304810515183e+01\n2.4638339196641073e+00\n1.7476355570411402e+00\n-2.0638572839326070e+01\n2.0529433066406666e+00\n1.8460109392221946e+00\n-2.0681525930300417e+01\n-3.1069673996707925e-01\n2.7040392642214375e+00\n-2.2102097493949255e+01\n9.1363967504357451e+00\n1.9284673329600018e+01\n-5.6790321156766709e+01\n2.7848869801533938e+00\n1.9744728884341065e+01\n-4.9255339139783075e+01\n1.3305094641360125e+01\n9.3053517564977462e-01\n-3.3079930081879098e+01\n1.3424483735177995e+01\n7.3887347156703420e-01\n-3.2976862134911336e+01\n-1.3988962752604264e+01\n-7.5007115541953624e+00\n-2.2155019522384123e+01\n-4.9566832813151205e+00\n1.3503466273706094e+01\n-4.9373057797910164e+01\n-4.8148975204379205e+00\n1.0719873058299791e+01\n-4.6882452577726824e+01\n-2.8039828235310353e+00\n-1.0880995556658524e+00\n-2.1991851940352401e+01\n-3.7490808565147749e+00\n1.1285931533629553e+01\n-4.8003071822085460e+01\n2.5161681490083563e+00\n1.5829601910247510e+01\n-5.3969966676142370e+01\n6.6746773936595449e+00\n-3.4435399384586857e-01\n-2.3058691764241640e+01\n1.3122298781718955e+01\n-5.8977781418884483e+00\n-2.4016637361716814e+01\n1.6834139677521214e+00\n1.4625784724597699e+00\n-2.0493465077010963e+01\n2.7615921086595159e+00\n-2.5572802131247796e+00\n-2.0188818970001414e+01\n-3.0595690839149992e-01\n-1.4252303309610692e+00\n-2.0556122508501307e+01\n1.4777101105508779e+01\n2.1203948078696268e+01\n-6.0530500620548082e+01\n2.6882836903739882e-01\n-1.4784575563182103e+00\n-2.0437006997942852e+01\n1.4014329034587050e+01\n8.2904727114187438e+00\n-3.7112900709863275e+01\n2.2678128738843770e+00\n1.3207016202561472e+00\n-2.0382477538928907e+01\n-4.8856401167747903e+00\n1.3188302493097295e+01\n-4.9628813311815144e+01\n-6.5075699243562104e+00\n1.6020994600085974e+01\n-4.2445116861345625e+01\n-1.7340189004310469e+00\n1.7722101721763689e+01\n-4.6261655476656323e+01\n1.9360671668146806e-01\n-1.2348892778902063e+00\n-2.0781823832560065e+01\n3.9100263860950548e+00\n-4.2716405180797672e+00\n-2.1787854622675781e+01\n-4.6909453254807216e+00\n1.3051623210076817e+01\n-4.8000605362282499e+01\n2.9045039508713782e-01\n-1.0210575936582526e-01\n-2.0598739745168960e+01\n-1.6940969904152754e+00\n-3.8151259928341874e-01\n-2.1776503288010918e+01\n2.5498820315401476e+00\n-3.1757167998885798e+00\n-2.0092756693698927e+01\n2.3916784158895057e+00\n6.1319060990741192e-01\n-2.0278840320993865e+01\n-5.4905959309592758e+00\n1.4053603318990396e+01\n-4.7759925016927021e+01\n1.0456997208053169e+01\n2.0581836210915920e+01\n-5.6366150959729246e+01\n4.8444184618974448e+00\n-9.1114257238575735e-01\n-2.1218265395298364e+01\n-3.8058340813899201e+00\n1.4713721995877858e+01\n-4.8344322779941997e+01\n-5.9252521337814619e+00\n1.6962618516216917e+01\n-4.2432909331408638e+01\n-6.9850697025261157e+00\n1.6551439820273981e+01\n-4.2131521564546965e+01\n-8.7013860774402796e-01\n8.5371303542752486e-01\n-2.1504343566957758e+01\n5.3946397879271997e+00\n1.9233124159319097e+01\n-5.2073052691993155e+01\n-1.4852218673218731e+00\n1.7949616022782855e+01\n-4.4422158746005735e+01\n9.1145679929424972e+00\n1.5764795032194979e+01\n-5.4144626162504323e+01\n-6.7263058732902410e+00\n1.6764880791018332e+01\n-4.1921501231668806e+01\n4.1904916343969374e+00\n-4.1628351405945798e+00\n-2.1813533481908490e+01\n1.3331858669072206e+01\n-5.6791370081326082e+00\n-2.4179529032871741e+01\n5.7433831713420052e+00\n1.9440764197909250e+01\n-5.2444253354035418e+01\n3.2803208887918704e+00\n3.3969307612574262e+00\n-2.2924216560263314e+01\n1.3731652184599962e+01\n9.1174022211664187e+00\n-3.7742589415501151e+01\n4.0268918502925271e+00\n-2.2881407411163912e+00\n-2.0507116877953813e+01\n7.0744471545164844e-01\n-1.7829663663856310e+00\n-2.0276875979190457e+01\n3.0096354692608838e+00\n-6.3758198091797313e-01\n-2.0523898871946205e+01\n-9.8029668250344337e-01\n-9.3634875630259140e-01\n-2.1115011881009078e+01\n6.2378932071970556e+00\n9.5811179664924717e-01\n-2.3696818469082185e+01\n-1.5374501939508312e+00\n-1.7255368989103788e+00\n-2.1229420680164701e+01\n4.8409862881608001e+00\n-6.7401299137721293e-01\n-2.1540730264148010e+01\n8.0825897624032645e+00\n1.8950954553345781e+01\n-5.6132250736139980e+01\n5.7522525163227989e-01\n1.8331293790534311e+01\n-4.7854588153552790e+01\n-6.2629247604507059e+00\n1.5087560356564419e+01\n-4.4603195306474007e+01\n-5.3773483454999349e+00\n1.3583242221868860e+01\n-4.7835282242265556e+01\n4.5229986074260431e+00\n-3.5004015541784606e+00\n-2.1428703378705162e+01\n-3.0044461016621722e+00\n8.3042344341422112e+00\n-4.4122970568801534e+01\n1.3135637798101932e+01\n9.8408004875296431e+00\n-3.9617302345602035e+01\n-4.0117381549440925e+00\n7.1802011944596176e+00\n-4.2485300635188167e+01\n-6.0522070178430443e-01\n-1.3204964124712555e+00\n-2.0630053317173704e+01\n-4.9378035351149213e-01\n-7.6012150791482980e-01\n-2.1234438737151436e+01\n-7.6059530483466267e+00\n1.5642393782332258e+01\n-4.2281312191895772e+01\n2.0617125953060365e+00\n-1.3723843009828542e+00\n-2.0566117070714704e+01\n-1.2394503335000973e+01\n1.0849576951844680e+01\n-4.4063625934237635e+01\n-1.3420614397897262e+01\n1.2141651101638423e+01\n-4.0094011505843589e+01\n2.1838033344219823e+00\n-1.5084080226905083e+00\n-2.0421240249824077e+01\n4.6397990198302361e+00\n-1.1254799045884545e+00\n-2.0996875204611474e+01\n4.8975443808722110e+00\n-2.1099558505243796e+00\n-2.0765774775666191e+01\n-2.1800037265028753e+00\n-1.7180250913920174e+00\n-2.1192387623594080e+01\n9.9493110056196805e+00\n1.1762280763391079e+01\n-4.8745177648622935e+01\n-3.2818671591099298e+00\n1.7532941844272123e+01\n-4.4488575452274006e+01\n5.7777659836939943e+00\n2.3573534078817707e-01\n-2.2721376129213006e+01\n1.0296855668858974e+01\n2.0440677775193656e+01\n-5.6417626756763127e+01\n-3.2073934745801758e+00\n3.4985210850782117e-01\n-2.4035985378784670e+01\n4.8939479641915806e+00\n1.9107689389270281e+01\n-5.1614927378017725e+01\n-1.2288126734643152e+00\n1.8364061832020091e+01\n-4.6017967789331315e+01\n4.0672977599588593e+00\n1.8257918920518719e+01\n-5.2216526988067038e+01\n-1.4680004304875709e+00\n-1.6631297256201081e+00\n-2.1290414462326570e+01\n-1.4091102098130777e+00\n-1.3844546113094267e+00\n-2.1477140820726003e+01\n9.7237931467933656e+00\n8.1302592051094358e+00\n-4.3611233100814154e+01\n-1.4882212953204748e+00\n-1.4749716500283330e+00\n-2.1490341120992355e+01\n-1.4134166080442964e-01\n1.7804845516872951e+00\n-2.1280387796235342e+01\n4.7556414481128169e+00\n-2.2151190005846209e+00\n-2.0628415328640365e+01\n-8.2417123320516552e+00\n1.4346716789473151e+01\n-4.3426509359288787e+01\n-1.3940512115614034e+00\n1.8243342392275718e+01\n-4.5546751754199434e+01\n-7.3056874020203058e+00\n1.4916206824502376e+01\n-4.4012345580861094e+01\n-8.6769959568503250e+00\n1.2072556129474382e+01\n-4.7191386308426388e+01\n1.3797837169921005e+01\n8.8248886313762931e+00\n-3.8004045718311858e+01\n-8.7751162701701642e+00\n1.1920482152023057e+01\n-4.7407104373514152e+01\n-7.1852276910493602e+00\n1.6150545946373942e+01\n-4.2060224810492535e+01\n-9.5474281552552114e+00\n1.2493260604203334e+01\n-4.4866486775331879e+01\n7.0430734561909381e+00\n4.0198548728924793e-01\n-2.4044793775136608e+01\n-7.1242621532142874e+00\n1.6371956700816572e+01\n-4.1682067278752641e+01\n1.3359610871663707e+01\n1.0553583202508195e+01\n-3.7082188783387885e+01\n1.3204385459377074e+01\n1.6385209670289924e+00\n-3.2399292905074503e+01\n1.3424483735177995e+01\n7.3887347156703420e-01\n-3.2976862134911336e+01\n1.9663429674338493e+00\n7.7981913222021959e-01\n-2.0239081305483293e+01\n2.3375386043054505e+00\n4.2528207710698429e-01\n-2.0251904280213253e+01\n3.6205961681892997e+00\n-2.4909385400249628e+00\n-2.0256293314429186e+01\n8.0829865860991357e-01\n-8.3658104348728024e+00\n-2.1043222128475584e+01\n1.2244684509077921e+01\n-4.6336390969163634e+00\n-2.5929487494587818e+01\n-2.4852498740263314e+00\n-8.1546615543355969e+00\n-2.1329858651835934e+01\n1.3613318188727382e+01\n1.8526176076026084e+00\n-2.9367846280647203e+01\n-2.1561115849670882e+00\n-1.4889547640601355e+00\n-2.1495430595095051e+01\n1.3891945194623400e+01\n4.3404883285181900e-01\n-3.0732957912405528e+01\n-1.4091102098130777e+00\n-1.3844546113094267e+00\n-2.1477140820726003e+01\n1.3886759660356029e+01\n5.2743405341296346e-01\n-3.0122235862593453e+01\n-5.6861949862274574e-01\n-7.2040352699958099e-01\n-2.1254979334031788e+01\n-1.1793256471128828e+00\n1.1868586368079122e-01\n-2.1790197812253858e+01\n1.3456373764438464e+01\n1.8440456435641126e+00\n-3.0493207531767901e+01\n-2.7712048956443218e+00\n-7.5068363789352226e+00\n-2.2211096251944632e+01\n-1.5506779570330900e-01\n6.0736015919246611e-01\n-2.0933611118631880e+01\n2.6567870069426025e-01\n-8.7515393452189716e-01\n-2.0769595241593940e+01\n1.2052368121684194e+00\n-1.0659282491157218e+00\n-2.0555378178303307e+01\n1.1540908617158385e+00\n-1.1661835405849861e+00\n-2.0612993314274650e+01\n1.0739434913175845e+00\n-1.2026199112380607e+00\n-2.0626383103674911e+01\n-6.0522070178430443e-01\n-1.3204964124712555e+00\n-2.0630053317173704e+01\n1.3688039155998815e+01\n9.9619703661080894e-01\n-3.0576159977352699e+01\n1.4449697096461199e+01\n-1.0320307046606680e+00\n-2.9654234635630367e+01\n1.4504039326497619e+01\n-1.5165163411502305e+00\n-3.0158180761016869e+01\n1.4298569793990387e+01\n-8.5780277186575216e-01\n-3.0054114428705152e+01\n-2.1013658805101443e+00\n-7.8470508724112795e+00\n-2.1785762910976356e+01\n1.1439460942806440e+01\n-4.1131133374629778e+00\n-2.6793988254186765e+01\n4.8546551575837144e-01\n1.2684292475342105e+00\n-2.0710427681526269e+01\n-4.3666546132329884e+00\n-6.7323436264842913e+00\n-2.3297398329478028e+01\n-1.4040527558804451e+01\n4.3576539517833179e+00\n-3.8649207217932407e+01\n1.8542278151736649e+00\n-1.7483326389707023e+00\n-2.0127174135281976e+01\n2.3393226935702343e+00\n-2.5744664225121450e+00\n-2.0144093293592562e+01\n6.9597605494378039e+00\n-3.3057085250674842e-02\n-2.3437694175845301e+01\n5.7031678191214787e+00\n-9.4791583666900336e-01\n-2.2075250970361218e+01\n5.1835027774659155e+00\n-2.1165315684904580e+00\n-2.0764861294381262e+01\n4.5819920525811950e+00\n-2.6409206611179519e+00\n-2.0544230264205332e+01\n1.5880886411436255e+00\n-2.9751625980136094e+00\n-1.9811992463532743e+01\n-3.8191588260968756e+00\n-7.2882437731569336e+00\n-2.2586408865598585e+01\n-3.2413049858617882e+00\n-7.9701350727547355e+00\n-2.1581196333233077e+01\n-3.3828618755137700e+00\n-8.0687526318811198e+00\n-2.1510178754365043e+01\n3.4091973208403283e+00\n3.0042864689410669e+00\n-2.2266201387823841e+01\n1.3090694132589773e+01\n2.4292064114567440e+00\n-3.1923290952874446e+01\n4.3160954660141284e+00\n1.2000324321463678e+00\n-2.1333171947461182e+01\n2.7023592347025414e+00\n-2.4938228706771466e+00\n-2.0205293950666150e+01\n-1.7593455710944861e+00\n-1.2893623400237914e-01\n-2.2128983088888504e+01\n-2.8484241574318387e+00\n4.2798240686122029e-02\n-2.3416193527282800e+01\n-1.2396318933140078e+00\n-4.6393356152750215e-01\n-2.1789083281789317e+01\n-7.0377375464256364e-01\n-1.0944037609150095e+00\n-2.0952780301361443e+01\n-7.4379070639215850e-01\n-2.0047087108404273e+00\n-2.0919799956460100e+01\n3.1981144758280871e+00\n-2.7324650336676135e+00\n-2.0051538111931134e+01\n5.5035593502925275e+00\n-2.0741175822631486e-01\n-2.2136510256416866e+01\n5.7168634405931167e+00\n-1.1533362521312811e+00\n-2.2023886375372768e+01\n3.6967585065420190e+00\n-1.3000598520126077e+00\n-2.0688771336610930e+01\n3.0966295677473390e+00\n-1.2892568955341377e+00\n-2.0569209047912150e+01\n1.2136027843822504e+01\n-5.8674388977377108e+00\n-2.4345891608210952e+01\n5.1004347563147761e+00\n-4.1992033776814064e-01\n-2.1918853336034573e+01\n6.4027627592761043e+00\n-7.2457756607805557e-01\n-2.2668178132688588e+01\n5.5134712941712962e+00\n-1.7884805738273648e+00\n-2.1167945387668201e+01\n4.9411665926718866e+00\n-1.9375394061027156e+00\n-2.0964616420756936e+01\n4.9411665926718866e+00\n-1.9375394061027156e+00\n-2.0964616420756936e+01\n4.5392195878995800e-01\n-1.4104957274065693e+00\n-2.0566691120493644e+01\n4.5189226865456389e+00\n-3.1217496101322313e+00\n-2.1036411099366656e+01\n2.4335505811536207e+00\n-4.9242558206277547e+00\n-2.1922490012672466e+01\n5.5143392366827939e+00\n-1.2707202891064766e+00\n-2.1740209335316049e+01\n-8.1418720141020515e-02\n-2.5816117500623612e+00\n-2.0062199735684512e+01\n-1.7911658938979977e+00\n-4.3106581911511075e+00\n-2.3110446817656392e+01\n3.2489691387011872e+00\n-3.5066886120033609e+00\n-2.0387769635482172e+01\n-2.1944007476189120e+00\n1.8247301048981117e+00\n-2.4360619525497700e+01\n1.2903817090593472e+00\n1.8876575718487276e-01\n-2.0172978394010634e+01\n-3.1074720225884306e-01\n1.7726701293898923e+01\n-4.7789876098818823e+01\n-5.4918332953809976e+00\n5.8410675154757685e+00\n-4.0532945053334466e+01\n-2.4155686509392447e+00\n1.7542261921449389e+00\n-2.4562701725927685e+01\n-2.8223767958214223e+00\n-1.3935104774718252e+00\n-2.1620198816605608e+01\n-7.3651443597479005e-01\n2.4495915787592057e+00\n-2.2218875142846446e+01\n-2.3739116603733543e+00\n2.1641673988625589e+00\n-2.5081618877729653e+01\n5.1899140904691432e-01\n1.6682488305487460e+01\n-5.0441603000722971e+01\n1.3085823155564948e+00\n1.5636513682899755e+00\n-2.0538497172899561e+01\n-1.5850013647954722e-01\n3.0231960429074305e+00\n-2.2266781094095542e+01\n3.5038996553362400e-01\n1.8910373356530130e+00\n-2.1025870586304549e+01\n-7.5861528156444846e+00\n-1.6918040081232233e+00\n-3.0395842835570651e+01\n-1.2112873866875939e+01\n1.1784741686053376e+01\n-4.2968899977825686e+01\n-1.1464033369579829e+01\n1.4013216531773940e+01\n-3.9827210024810064e+01\n2.2571804004341347e+00\n1.4186536037479782e+00\n-2.0442045936663490e+01\n3.2530938842934329e+00\n1.8166841423066304e+00\n-2.0917824571296908e+01\n1.3441594809301216e-01\n1.2796016165165505e+00\n-2.0843223975646513e+01\n1.0025059171938702e+01\n2.0141268476591137e+01\n-5.6645353443505243e+01\n2.0102863225114795e+00\n9.2246210815823071e-01\n-2.0266476021547060e+01\n-5.1835569401808246e-01\n-1.2225312973389770e+00\n-2.0752399514073836e+01\n1.5730922600108062e+01\n2.2528649093408973e+01\n-5.9113683536546397e+01\n-4.2322817684438005e-02\n-2.5145982578370605e+00\n-2.0169988818288360e+01\n4.4535979312296590e+00\n2.1020786671957513e+01\n-4.6983257885336073e+01\n-3.0536927435729377e+00\n1.7340669519696867e+01\n-4.5324636971110145e+01\n-3.6689746516679231e+00\n1.7135175560201752e+01\n-4.5039426683517803e+01\n-6.0129283143041667e-02\n-1.0545659792011741e-01\n-2.0772806691927531e+01\n6.5675434699573998e+00\n9.8018826330425082e+00\n-4.5993118602194123e+01\n8.1256118144377290e+00\n1.0143054959769550e+01\n-4.6371756267051992e+01\n7.1201142708181049e+00\n1.0050326770359687e+01\n-4.6342270244179282e+01\n3.8781560796149521e+00\n-3.3272495555912336e+00\n-2.0789622771417765e+01\n4.7631356399154381e+00\n-4.2765419476153879e-02\n-2.1549381938421060e+01\n-8.4354102234174402e+00\n2.9577461958302842e+00\n-3.6683104987504954e+01\n-2.4369608391423410e+00\n4.7652740009149386e-01\n-2.2913955343558843e+01\n-1.1457845830610095e+01\n6.9355309778005758e-01\n-3.3467903411573118e+01\n6.5734012426720181e+00\n2.9722173649641039e+00\n-2.7484417693909666e+01\n-1.1790449213909746e+00\n-4.7177007389147034e+00\n-2.2519696908942151e+01\n-8.8363277744604876e+00\n3.8707365361148329e+00\n-3.8021088381376771e+01\n1.3692474758280687e+01\n8.9073989592569855e+00\n-3.7938668133235915e+01\n6.1512466636063170e+00\n-6.9039607914662415e-01\n-2.2533506159294078e+01\n2.2290086912429610e+00\n8.2990955505391835e+00\n-4.3917828688860368e+01\n3.8770781973014010e+00\n-2.4167740715228097e+00\n-2.0342074455916329e+01\n5.0907242561038890e+00\n-3.4304872585822950e+00\n-2.1888824480537153e+01\n3.4720358529418518e+00\n2.5542947834797540e+00\n-2.1589800974021610e+01\n7.0228536887778392e-01\n-5.8847994035287483e+00\n-2.1475735325581503e+01\n-9.0511556283445371e-02\n-3.2564850234178122e+00\n-2.0631630108866673e+01\n2.2240531975187543e+00\n-4.6018259163526780e+00\n-2.1403685498573090e+01\n-9.8272251330591960e+00\n1.2690519649155421e+01\n-4.4347687298053692e+01\n-9.6152996470339289e+00\n1.3502665591518349e+01\n-4.3148208060445285e+01\n-1.3661230934276601e+01\n1.1141526614807015e+01\n-4.2763686609079592e+01\n-1.9162907958708735e+00\n-1.2538822640118996e+00\n-2.1797168051284778e+01\n-8.8758614020539977e+00\n1.3794877023616582e+01\n-4.3099293186473027e+01\n-5.6196888048598153e+00\n1.2695494894999044e+01\n-4.9660509457371838e+01\n1.5448139036865737e+01\n1.3547417494743044e+01\n-5.0934873883449221e+01\n1.2053122075419478e+00\n3.7429778469723844e+00\n-2.3549209980944045e+01\n-6.8676476484508528e+00\n1.5076194184297668e+01\n-4.5031874552247579e+01\n-4.2573007820210220e+00\n-7.0936649170258805e+00\n-2.2802631869997480e+01\n6.0053529284529548e+00\n5.3691362570638757e-01\n-2.3120000430893391e+01\n-7.7786941667047760e+00\n-2.0737614389954135e+00\n-2.9706951780799891e+01\n-5.6460053215345596e+00\n-7.4021103054669473e+00\n-2.2427334287288208e+01\n-2.6364922922858449e+00\n1.9644535664235516e+00\n-2.4866423792848565e+01\n1.3480955929689440e+01\n9.1859388689739436e+00\n-3.9007486918114004e+01\n-4.9820218312031512e+00\n4.8901821443126092e+00\n-3.9316560100353790e+01\n-1.7474632548388402e+00\n5.2434345892446454e-01\n-2.2608065217169155e+01\n-3.2059671900356128e+00\n8.8032165936940672e+00\n-4.4516649579559669e+01\n9.1009607616064034e+00\n-6.8062859049487647e+00\n-2.3178729137727927e+01\n1.1954615304478272e+01\n-2.8447962964251245e+00\n-2.8635175560988554e+01\n1.3694111169702984e+01\n1.1087607727692503e+00\n-3.0600974766540421e+01\n-5.7016558817838128e+00\n-6.7950873915835199e+00\n-2.3279948941455451e+01\n8.4514949903590946e+00\n9.5272738667159125e+00\n-4.5530288405424571e+01\n-9.9786566833603885e-01\n1.8466966466340948e+00\n-2.2080329317842917e+01\n-6.7241645598364590e+00\n1.5185374653641327e+01\n-4.4341723359275264e+01\n1.3765749544695423e+01\n-1.0077645433608190e-01\n-3.2183979653512374e+01\n-3.1583579170905667e+00\n-7.9772735547657989e+00\n-2.1560328944947280e+01\n-5.8970959271073609e+00\n1.3069224166642048e+01\n-4.9012415738219929e+01\n7.0184886114165250e+00\n1.1966753897223278e+01\n-4.9008098164144357e+01\n1.1747148727568057e+01\n-4.7602319666166055e+00\n-2.5664974962012277e+01\n-2.5913371570507104e+00\n1.1557931628108884e+01\n-4.8280626970133369e+01\n2.6982977001714041e+00\n9.5390229239195184e-02\n-2.0320786583052545e+01\n-2.8477593971672261e+00\n6.1485669764696089e+00\n-4.0970285775638011e+01\n1.8125356333227625e+00\n8.9115165085529284e+00\n-4.4742672726079959e+01\n-3.2413049858617882e+00\n-7.9701350727547355e+00\n-2.1581196333233077e+01\n1.2976815715227254e+01\n-5.9532723704511454e+00\n-2.3885249661347189e+01\n2.5884126470809754e+00\n3.8463587541724892e-01\n-2.0284238087263411e+01\n-1.3770488132498709e+01\n1.1452951411576327e+01\n-4.1940914005744652e+01\n1.2238235651688644e+01\n5.5948251894580343e+00\n-3.1235635448854691e+01\n1.3427976218557992e+01\n1.5993531964859646e+00\n-3.1078987831354368e+01\n2.7926294180899758e-01\n7.7079657212308028e-01\n-2.0660812486583961e+01\n-6.0060171731393941e-01\n-2.4565764733955784e+00\n-2.0333834649453891e+01\n1.7431264789024941e+00\n5.3511715748343969e-01\n-2.0262259541910502e+01\n-1.3794370598022642e+01\n1.0700608215174007e+01\n-4.3738616719927805e+01\n-2.1585121474578603e+01\n2.0233489463741305e+00\n-3.5352533441547145e+01\n-1.2162926363235444e+01\n3.6431189989442054e+00\n-3.7705225373194750e+01\n-1.5143224474482523e+01\n6.1607650087169974e+00\n-4.1229450918480907e+01\n-1.4741004243681601e+01\n5.9369003355830419e+00\n-4.0883430200716710e+01\n-1.2161171120865761e+01\n1.2108176341054197e+01\n-4.1341421503610540e+01\n4.3019482129270283e+00\n4.9961652205101720e-01\n-2.1202972257806930e+01\n-1.4827633286705217e+01\n8.2283432986472267e+00\n-4.3915748511802057e+01\n-1.4657624735706964e+01\n1.2748782074752945e+01\n-3.8825022209882292e+01\n-3.9847676252512096e+00\n-7.3039195772714667e+00\n-2.2515305915644849e+01\n1.3306509382983864e+00\n1.0024984323222443e+00\n-2.0517369327395318e+01\n-9.4297293775046409e+00\n1.1366275033523394e+01\n-4.5576297314566411e+01\n-1.4483006854125176e+01\n1.1275594995635240e+01\n-4.2766041147024083e+01\n-1.1884332437641201e+00\n1.7716973795981691e+01\n-4.6925794623877955e+01\n6.2816698309889318e+00\n1.9965138102652375e+01\n-5.1245752789280772e+01\n-8.8478420772551711e+00\n1.2458060041552187e+01\n-4.6648837145398595e+01\n-8.9454457196292019e+00\n1.5186762522223308e+01\n-4.1385357711597486e+01\n-1.3482977408361990e+01\n1.3102589510412407e+01\n-3.9491389657543337e+01\n-1.9104224520572024e+00\n1.7283442815798828e+01\n-4.6574484448999215e+01\n-6.6241509822984312e+00\n1.5191159220755843e+01\n-4.4588253362257667e+01\n-1.1025435119567764e+01\n1.1186071969790179e+00\n-3.4184006082766984e+01\n-1.2783095591157368e+01\n3.7362543260170455e+00\n-3.7754841064507637e+01\n-4.6494766802454972e+00\n-8.3448839806655268e+00\n-2.1159063607486427e+01\n-5.1135975924506907e+00\n-7.2108233773392412e+00\n-2.2730855102802384e+01\n7.0462269282273160e-01\n2.0209521361677307e+00\n-2.1019574589001625e+01\n-2.3189376223554903e+00\n1.9746151452599445e+00\n-2.4839018202763711e+01\n3.1293427362923127e+00\n-5.7800507810134662e-02\n-2.0452363373100461e+01\n-1.3767620182819678e+00\n-1.2230657606080184e+00\n-2.1375254017225835e+01\n4.7071200681504939e+00\n-3.3927256097821146e+00\n-2.1441144362780445e+01\n7.0468020651589010e+00\n8.8715868973808281e+00\n-4.4727796520925807e+01\n-6.2006455372718596e+00\n8.1781619271202537e+00\n-4.3959747366131438e+01\n-6.4413527706713296e+00\n7.7807018010377282e+00\n-4.3368120932350621e+01\n3.7907491866147929e+00\n2.9711091475679390e+00\n-2.2197026629180748e+01\n1.8165167807964995e+00\n1.7012811349399253e+00\n-2.0554900343998703e+01\n2.8143618442843152e+00\n1.4083824116356427e+00\n-2.0598846103362156e+01\n2.8143618442843152e+00\n1.4083824116356427e+00\n-2.0598846103362156e+01\n5.8420819289822443e+00\n3.0184894850774963e-01\n-2.2788441511525502e+01\n5.6389595563487251e+00\n1.1506678040674298e-01\n-2.2557738729982660e+01\n2.9697397983264966e+00\n1.9400949333154127e-01\n-2.0403013477947777e+01\n-2.6071344491918911e+00\n6.5582615902742544e-02\n-2.2980173271766088e+01\n2.8409093192472734e+00\n-5.5866965062148111e-01\n-2.0433477952218610e+01\n1.7484676740424798e-01\n-1.4783870494991853e+00\n-2.0469099988341714e+01\n1.6269765837171646e+00\n-3.1091765071124864e+00\n-1.9871715809820692e+01\n1.2971850704607334e+01\n-4.6579633730241294e+00\n-2.5865402372689147e+01\n-4.4729422723867174e+00\n8.7073157672146770e+00\n-4.4532024552697202e+01\n1.0138809191671466e+01\n7.4999793560835837e+00\n-4.2585679579025040e+01\n-6.2395595131352737e+00\n8.4416889250725067e+00\n-4.4093814476693453e+01\n9.4821318878765872e+00\n7.3211742780955991e+00\n-4.2409296679208438e+01\n8.6701040023510334e+00\n7.1192107167012484e+00\n-4.2325672824140952e+01\n8.5939477691628792e+00\n6.8640105369900750e+00\n-4.2031139422960905e+01\n1.3655685554673713e+00\n3.9536305772341054e+00\n-2.3546802598987433e+01\n3.8858180090633563e+00\n2.4195022338703098e+00\n-2.1723123613647790e+01\n-1.3515528307581096e+01\n3.6806507905208679e+00\n-3.7649149212607412e+01\n7.3375691143638022e+00\n1.3286184921222470e+00\n-2.5340740617615513e+01\n-2.4870539453206195e+00\n1.7435077165826065e+00\n-2.4585378826866435e+01\n2.7984883855221230e+00\n-9.5117519434423536e-01\n-2.0629527074194467e+01\n2.2795325659880250e+00\n-1.6029990296751442e+00\n-2.0282893448578744e+01\n4.6127383409049587e+00\n-3.2731184580232897e+00\n-2.1233562180379607e+01\n-4.1667257004975395e+00\n-6.8186284011463876e+00\n-2.3168986961068541e+01\n-7.7503949417709928e+00\n-8.0093739554911902e+00\n-2.1465976232517647e+01\n1.6367103874045124e+00\n3.9389764875998137e+00\n-2.3668715296667827e+01\n4.3392592123787903e+00\n1.7294508912959574e+00\n-2.1585575119878243e+01\n4.4219430593577513e+00\n-1.1709717716903294e+00\n-2.0978315114975242e+01\n6.3786473938186272e-01\n-1.2492933694359940e+00\n-2.0653373251767643e+01\n3.6878653873270353e+00\n-2.3330088203828989e+00\n-2.0450295951087984e+01\n1.4002251414481723e+00\n-2.6007713227748499e+00\n-2.0093351098235750e+01\n9.2397736680631866e+00\n-5.5559358433653552e+00\n-2.4800300956783612e+01\n-5.1999721957842278e+00\n-6.6945179554823797e+00\n-2.3514339729344091e+01\n3.6268843240026740e+00\n2.8642571721949164e+00\n-2.1920247576869329e+01\n-3.2819515127879817e+00\n1.9830171901982085e+00\n-2.6043549577199148e+01\n3.7498437027066274e+00\n1.2600540169261392e+00\n-2.0922930089986259e+01\n2.7517916249802536e+00\n-1.4816335085928889e+00\n-2.0511499491194861e+01\n1.8289279610115259e+00\n-1.6176774454393008e+00\n-2.0233311327316514e+01\n-2.6489042662753297e+00\n-7.8851675160025341e+00\n-2.1658319535836199e+01\n-7.3380831224305645e+00\n1.8804254505589704e+00\n-3.5140126178357932e+01\n1.2249195619893634e+01\n-5.3953739043230087e+00\n-2.4889907338297043e+01\n-4.9240294050039273e+00\n-6.8385701807916002e+00\n-2.3261053800525165e+01\n4.9426899716824577e+00\n1.5453485318439111e+00\n-2.2115887617445679e+01\n-7.2424659097971817e+00\n1.5750799942693356e+00\n-3.4667511848275019e+01\n-3.9342723607933281e+00\n-8.2961425318029693e+00\n-2.1196728861871133e+01\n6.9020526297379243e+00\n-3.4985239180583472e+00\n-2.4253183404799671e+01\n-2.3810826688249342e+00\n-7.8806326106166731e+00\n-2.1747900336311847e+01\n6.0818042940017829e+00\n-3.1925346300741553e+00\n-2.3087526744060323e+01\n-6.8346732215421735e+00\n-8.0625102492182990e+00\n-2.1481945114021922e+01\n2.5985348316190264e+00\n1.7659444485767889e-01\n-2.0265949149250687e+01\n-1.0583641665714847e+01\n1.0599693971548660e+00\n-3.3867915290303820e+01\n-9.5741169557357768e+00\n-1.5420601285331104e+00\n-3.0472190543742670e+01\n1.3402946553796841e+01\n2.7886037378806265e+00\n-2.9005333948913961e+01\n7.2186868587101047e+00\n1.8695437053646349e-01\n-2.3777370332732524e+01\n1.4922463356954667e+00\n-2.4172942572729577e+00\n-2.0303975236499639e+01\n1.0117170413749994e+01\n7.3544710111727793e+00\n-4.2558801690407449e+01\n5.7610865414361294e+00\n-3.8936759227885003e+00\n-2.3195235150042556e+01\n9.5631096186819970e+00\n-6.3036771419760580e+00\n-2.3772597700786111e+01\n4.4908948046879518e+00\n-2.8813764375712250e+00\n-2.0758575546875488e+01\n-3.9361372486445143e+00\n-2.1421597253211471e+00\n-2.5689943994318877e+01\n-9.1761325919379129e+00\n-2.4994604828059064e+00\n-2.9186721897380583e+01\n-2.7707200417637403e+00\n-1.3297628566354898e+00\n-2.1671648103940463e+01\n-1.5912965265233041e+00\n-2.0673936683673722e+00\n-2.0768406800849913e+01\n2.4990073639295538e+00\n-6.6415222760856540e-01\n-2.0369795757221549e+01\n8.2702488145531241e+00\n1.8951087857880854e+01\n-5.6399938266504506e+01\n-1.1156064710167060e+01\n1.0778368420347997e+00\n-3.4187255929727357e+01\n1.7074319586347395e+00\n-2.7423349211503290e+00\n-1.9944827858555282e+01\n-2.3321669734801984e-01\n-3.8841114679645474e+00\n-2.1407409877620697e+01\n-1.4059979597659568e-03\n-3.6226474349835134e+00\n-2.1021009231604392e+01\n3.0746525545800347e+00\n-2.9364578280295124e+00\n-1.9695545262083517e+01\n-1.6389089264323780e+00\n-8.5328681966136415e+00\n-2.0826261293605569e+01\n-1.7905396096571056e+00\n-8.3624284471635040e+00\n-2.1119579611064644e+01\n9.6032326317114269e-01\n2.0097446436702544e+01\n-4.5853137495288507e+01\n-1.5558291864869235e+01\n1.1983103654873444e+00\n-3.4396989113103658e+01\n7.2905071705829649e-01\n3.5356937489200293e+00\n-2.3065450739131425e+01\n1.0573739182705459e+00\n9.4226216510890259e-01\n-2.0380914756852775e+01\n1.4373799947943595e+00\n-3.2026095125695819e-01\n-2.0252409276173044e+01\n1.5671594826432289e+00\n-5.4312915879496371e-01\n-2.0350245614359572e+01\n1.6087106537978630e+00\n-7.7669219614530549e-02\n-2.0237188834057147e+01\n-1.6327563694228906e+00\n1.8224479937967082e+01\n-4.5844453269269181e+01\n1.2125327792526102e+01\n7.0100100754055541e+00\n-2.8959327837185970e+01\n3.0934454494768842e+00\n7.3688426835952014e-01\n-2.0448268702371834e+01\n8.6295164056277773e-01\n1.2049470698409488e+00\n-2.0532192359107171e+01\n-2.4547109937522889e+00\n2.0591214928144135e+00\n-2.5009940223143150e+01\n1.6112613556699554e+01\n2.2145001508279986e+01\n-6.0295752031787337e+01\n9.3541750446283753e+00\n2.1022897013363583e+01\n-5.4599454734171267e+01\n6.0194096550787526e+00\n2.2045789182582414e+01\n-4.8816980618352424e+01\n-1.2117676932916217e+00\n-2.5339761932365451e-01\n-2.1865991027648928e+01\n2.6565437531227465e-01\n2.8416522643592718e-01\n-2.0546644409072155e+01\n1.3890455887521582e+00\n8.7072417161153792e-01\n-2.0325068731854152e+01\n7.0627193655566334e-01\n5.7340354918629854e-01\n-2.0437349713829335e+01\n-9.5016158852580208e+00\n1.3702940800209173e+01\n-4.2330534803248270e+01\n-9.5790037948036879e+00\n1.3948974926760785e+01\n-4.1843764623776053e+01\n4.4922603120029443e+00\n2.0625986395096704e-01\n-2.1296578829158658e+01\n4.0607085912116263e+00\n1.4485319846225984e+00\n-2.1237510288903941e+01\n4.7971355961794133e+00\n5.5020647681068147e-01\n-2.1571189001410325e+01\n5.1228400161893717e+00\n-1.7786243066288789e+00\n-2.1162812444570520e+01\n3.5812394319487204e+00\n-4.4559578488195264e+00\n-2.1771686666175288e+01\n4.7515432258584385e+00\n1.3448766274672048e+00\n-2.1708317921470805e+01\n4.4770264840158474e+00\n1.3855932134149314e+00\n-2.1461809615237382e+01\n4.7182456940075808e+00\n1.7190572430987987e+00\n-2.1977203164248156e+01\n4.1595425733648126e+00\n-2.6175398438109636e+00\n-2.0298770158845517e+01\n3.6336371825825577e+00\n1.5169633211058033e+00\n-2.1047258283407619e+01\n2.3700679777990343e+00\n1.5126884863788677e+00\n-2.0487482618102916e+01\n2.1532053422120487e+00\n8.5687845055179956e-01\n-2.0266240211217159e+01\n-6.7717340290337402e+00\n1.4208932724183214e+01\n-4.5838361300920404e+01\n4.2707302666584450e+00\n1.7111039223773798e+01\n-5.4845667523981305e+01\n1.3588655811760514e+01\n-4.9375351815360968e-01\n-3.1719738030771278e+01\n5.0559398149647077e+00\n-4.8892387466852810e-01\n-2.1779574557119773e+01\n-1.6646250519468329e+00\n-1.6122458918344185e+00\n-2.1360542223520635e+01\n-2.3350199732663537e-01\n1.7377648846329262e+01\n-4.9072654774475730e+01\n-2.3350199732663537e-01\n1.7377648846329262e+01\n-4.9072654774475730e+01\n1.3074994120512086e+01\n1.0141723636749211e+01\n-4.0137062994296492e+01\n3.8905272979080050e+00\n1.6958550356465469e+01\n-5.4338300668854821e+01\n8.1300753451674286e+00\n9.1173570038926677e+00\n-4.4885306825947609e+01\n9.7052881581139410e+00\n8.5250122170456795e+00\n-4.4130122756142910e+01\n1.2920004232845582e+01\n2.8434371310636157e+00\n-3.2234317233323559e+01\n1.3254423714273099e+01\n2.2075959403683805e+00\n-3.1120583295701337e+01\n1.2901447053146089e+01\n2.4698932576880894e+00\n-3.2583295978683978e+01\n1.3644160450205774e+01\n1.0487348989063188e+00\n-3.0614913485887097e+01\n1.2981755000252003e+01\n-3.9198611601469119e-01\n-3.2077263243938425e+01\n2.4487615809207592e+00\n4.2008182231395769e-01\n-2.0312191722826810e+01\n1.4720241773669972e+01\n-2.1034837278707896e+00\n-2.9418853003148882e+01\n1.4751983206494888e+01\n-2.1634974439618353e+00\n-2.9318086660813115e+01\n2.0806503781208865e+00\n1.2966381610171135e-02\n-2.0184958448575696e+01\n6.0579541780589059e+00\n-1.0832773646711207e+00\n-2.2103182656408141e+01\n-7.7846478109476702e-01\n3.5764194170891012e-01\n-2.1374785450059310e+01\n5.3017022697528429e+00\n-1.6968602225142941e+00\n-2.1258200444470358e+01\n5.0683439475033332e+00\n-1.7119558651343372e+00\n-2.1255751794675007e+01\n4.6055023067344472e+00\n-2.2093265247858698e+00\n-2.0635129043170579e+01\n-6.3993484541630541e-01\n-1.1884561705350185e+00\n-2.0842597677044346e+01\n-6.6164120766217360e-01\n-1.2431961905985567e+00\n-2.0812029987427948e+01\n1.3467230955678541e-01\n-1.5029115577206122e+00\n-2.0336870155324267e+01\n1.1291736499004887e+01\n-4.9632901583347850e+00\n-2.5552664254600703e+01\n9.4204119332303655e+00\n-5.9200608330730642e+00\n-2.4325967343633597e+01\n6.8298438400508195e+00\n-7.4967418173781288e+00\n-2.2195391387257910e+01\n1.7801684268540907e+00\n-8.4017500514607306e+00\n-2.1018665427888038e+01\n-2.1215465841383949e+00\n-7.7600215600413947e+00\n-2.1869382178137894e+01\n-4.5494650695727730e+00\n-7.5744785157150218e+00\n-2.2239526373048111e+01\n4.3750533895912307e+00\n1.7275082317132604e+01\n-5.4200789014720677e+01\n1.5702984216021614e+01\n1.3773291058593053e+01\n-5.1389913628400052e+01\n1.3234638468490656e+01\n1.2232629871719720e+01\n-4.9485515052503033e+01\n1.2482623933878640e+01\n5.3607201575764076e+00\n-3.0022827503093552e+01\n-3.4184613548921252e+00\n8.9669897258457798e+00\n-4.4814869464311180e+01\n-9.5228941852565185e+00\n3.0719624842421331e+00\n-3.6852293025639661e+01\n1.4037271964976998e+01\n-4.7564604613199295e+00\n-2.5586855085326356e+01\n1.3330185514088836e+01\n-5.0789749035031981e+00\n-2.5285409226220217e+01\n1.0831825844107293e+01\n-5.5595940347418971e+00\n-2.4758305919015548e+01\n-4.6388530073373813e-01\n-3.3624513847596411e+00\n-2.1019612750684779e+01\n-5.1841019241029418e+00\n-6.8445217870814545e+00\n-2.3170714741687895e+01\n-3.8106854965461436e+00\n1.6115708125579406e+01\n-4.5909307096909593e+01\n2.9509649622990847e-01\n1.6694341717357233e+01\n-5.0303640895946231e+01\n1.2565127620271104e+01\n5.2653971921044578e+00\n-2.9591261987068648e+01\n1.3090694132589773e+01\n2.4292064114567440e+00\n-3.1923290952874446e+01\n-6.8155839689861928e+00\n1.9187131837735905e+00\n-3.5210808514420940e+01\n2.6834333210198538e+00\n-1.6035770509852003e+00\n-2.0260476059015847e+01\n-2.6841679776126255e+00\n-9.0995600567550317e-01\n-2.2363893208978826e+01\n-1.3813166059977153e+00\n-1.7858427700351711e+00\n-2.1115645163425988e+01\n8.9114089131542080e+00\n-6.1776806235558341e+00\n-2.4164498892551865e+01\n1.2373296692959639e+00\n-8.5637632712920428e+00\n-2.0830571884922854e+01\n4.1319596795644182e+00\n1.7247324508858696e+01\n-5.3522888781268115e+01\n1.0551429719169353e-01\n2.6683555277063964e+00\n-2.1862678505995888e+01\n9.1958488290482094e+00\n-6.0415510592301507e+00\n-2.4259254475547184e+01\n1.0024471612096043e+01\n9.3136391605843762e+00\n-4.5162917759252124e+01\n-2.8970323868777292e+00\n6.8744599838086771e+00\n-4.2096913696156697e+01\n9.6987367655323240e+00\n-6.3427248807693966e+00\n-2.3680777930485707e+01\n1.2112388603503071e+01\n-5.1014303436648456e+00\n-2.5340168456879550e+01\n-4.8008160901380439e+00\n-7.3719328148621637e+00\n-2.2402221109158226e+01\n1.1360970063239758e+01\n-5.4101940594776758e+00\n-2.4886219055065439e+01\n1.1340594794857173e+01\n-5.5270711722227288e+00\n-2.4384408287832173e+01\n9.1756907719074228e+00\n-5.8160178497520718e+00\n-2.4436832167520006e+01\n-4.5447684876437426e+00\n-7.1866750120682923e+00\n-2.2659838784482538e+01\n1.3241327859265308e+01\n1.0843490733523322e+00\n-3.3411711232599288e+01\n3.0261763502878796e+00\n-1.1552762815255695e+00\n-2.0749405063891214e+01\n9.1958488290482094e+00\n-6.0415510592301507e+00\n-2.4259254475547184e+01\n-8.2688831879144420e+00\n1.4954335268843998e+01\n-4.2738883521090457e+01\n1.7201984464123254e-01\n-2.6041462561776108e+00\n-2.0116958335114564e+01\n1.3575872296462538e+01\n9.7526354821616703e+00\n-3.7462867405973064e+01\n-7.3609015844059753e-02\n1.1218204321455885e+00\n-2.0977395960112666e+01\n-2.5670275867506369e+00\n-7.7471686432529463e+00\n-2.2068972834458751e+01\n7.7990148874748284e+00\n1.3064267051355261e+01\n-5.0377666632712170e+01\n1.7421293221392851e+00\n-1.4445970486609405e+00\n-2.0487972236737924e+01\n1.8336451610868783e+00\n1.0115605411207760e+01\n-4.6347147329108189e+01\n6.6263264363190215e+00\n-1.4004071799677922e+00\n-2.1838352836851222e+01\n1.2965020782860803e+01\n-5.1679134048068907e+00\n-2.5242018729775701e+01\n8.7477548007662982e+00\n-6.5571096636253738e+00\n-2.3454353830912755e+01\n-2.6567737745759263e+00\n-7.9185152339059810e+00\n-2.1643416740253489e+01\n-1.8902530359096539e+00\n-7.9716777562598544e+00\n-2.1548342465766488e+01\n-3.2720465669528980e+00\n-7.8087149348086600e+00\n-2.1921273895876830e+01\n-3.8800374914954676e+00\n-7.7620207504243348e+00\n-2.1946667427408904e+01\n-1.0755811680142675e+00\n-6.2882086512111393e+00\n-2.2770178359045584e+01\n1.0082832398324955e+01\n8.5794082891248689e+00\n-4.4315444479760799e+01\n6.0644338124384389e-01\n-2.0698249751421263e+00\n-2.0443376421380666e+01\n-4.5770193651562707e-02\n-5.8612662473963273e-01\n-2.0876738526720192e+01\n1.3636773675309954e+01\n-5.2074012664223064e+00\n-2.4908572502997963e+01\n1.8422734666417382e+00\n-6.5310694725324669e+00\n-2.2099265812805047e+01\n-5.1521651745754644e+00\n-7.1829776653800437e+00\n-2.2728540882551471e+01\n-7.4124833717421250e+00\n-3.6235876768029782e+00\n-2.7670923071328655e+01\n-1.3148968325296350e+01\n1.1293361929866478e+01\n-4.1965154715635705e+01\n4.7199507389063005e+00\n1.7927909101439408e+01\n-5.3508306124460383e+01\n5.0216811694770982e+00\n1.9572590609266015e+01\n-4.8735149704944945e+01\n1.0459908414620918e+01\n2.1254460579930779e+01\n-5.4987229601143881e+01\n1.2127752392012761e+01\n2.3718850786729980e+01\n-5.3166124459759388e+01\n1.3398543415242383e+01\n2.2697283426784811e+01\n-5.5185815929659448e+01\n1.0459908414620918e+01\n2.1254460579930779e+01\n-5.4987229601143881e+01\n5.2643207601659174e+00\n1.0793017471341821e+00\n-2.2343996010499218e+01\n3.5810060861005568e+00\n-1.3489041929395440e+00\n-2.0654733339576239e+01\n3.3315415160490955e+00\n-1.4249408843788289e+00\n-2.0550049008232325e+01\n1.0688058270567971e+01\n2.3405333563411666e+01\n-5.1930690930965135e+01\n-3.1888251847986524e+00\n-8.1522843577183846e+00\n-2.1274618432727166e+01\n-3.8520289213613865e+00\n1.5293539617649040e+01\n-4.8217265343203422e+01\n1.3795419147185514e+01\n2.4226909784231896e+01\n-5.3889378612289612e+01\n1.3604395562837881e+01\n2.3717494745481044e+01\n-5.4947852121109385e+01\n1.3016634523775164e+01\n1.1086944873255128e+01\n-3.9053211680809724e+01\n1.3401737749690481e+01\n2.3252338685731533e+00\n-2.9570874176860869e+01\n-5.2430620530819727e+00\n1.3512149789171609e+01\n-4.9141140270665325e+01\n2.8850253723045167e+00\n2.0467596134259139e+01\n-4.7345654866769685e+01\n-3.5155938380680971e+00\n-7.8439386409534286e+00\n-2.1772118739485418e+01\n1.7188387159442271e+00\n-4.5970492355298207e+00\n-2.1507698847726736e+01\n9.0619567519613256e+00\n2.0137239748606206e+01\n-5.4398809705958335e+01\n-5.0765676052208661e+00\n1.3130052016948667e+01\n-4.9623960187263577e+01\n2.9509649622990847e-01\n1.6694341717357233e+01\n-5.0303640895946231e+01\n-3.9325543200142734e+00\n-8.0792330465333695e+00\n-2.1488374786935740e+01\n-4.1211884501049747e+00\n-7.1309348509941035e+00\n-2.2736302594985368e+01\n-2.3896410950441354e+00\n-7.8710324570094246e+00\n-2.1891956967647328e+01\n1.4532332739811814e+01\n-1.3754122372892181e+00\n-2.9593181130309333e+01\n-3.5206931106924451e+00\n-7.5521274189441554e+00\n-2.2228185411536973e+01\n-3.4484139973593457e+00\n-7.6223724600207685e+00\n-2.1938068448746129e+01\n1.3123926552757760e+01\n7.8609914680572979e-01\n-3.3245992999994343e+01\n-2.2468495570283813e+00\n6.6215984778381953e+00\n-4.1560200591101527e+01\n-2.2530693478889670e+00\n2.5205069582080362e+00\n-2.5550487380484011e+01\n1.3415511271328254e+01\n5.7968218041974384e-01\n-3.3183742073141985e+01\n1.2540946421603815e+01\n3.7336969182725825e+00\n-3.2675047077358215e+01\n-1.6141595518879715e+01\n1.0768800638748580e+01\n-3.9895442616072359e+01\n5.8875002566088863e+00\n2.0660319538673871e+01\n-5.0598957906260168e+01\n9.6779741323769048e+00\n2.0960020912009089e+01\n-5.4237856064597075e+01\n1.6203922804342195e+01\n1.5393959642036725e+01\n-5.3575282640153588e+01\n1.3902785637012597e+01\n1.3771707762905050e+01\n-5.0985736979929783e+01\n7.5750938059485673e+00\n1.2449795300760014e+01\n-4.9522481933403142e+01\n8.9265336901164272e+00\n1.0322628800627824e+01\n-4.6710651151426831e+01\n1.7574797741607071e+01\n2.3187689194625388e+01\n-6.0342916848239341e+01\n7.8919497276348185e+00\n9.4562519710547353e+00\n-4.5279674907609589e+01\n8.9020006170488077e+00\n2.1274144773379149e+01\n-5.3528949608907979e+01\n6.2816698309889318e+00\n1.9965138102652375e+01\n-5.1245752789280772e+01\n8.7654227238710192e+00\n1.4335099566335485e+01\n-5.2588722608192910e+01\n-6.9013895978043251e+00\n1.3721651255813381e+01\n-4.6321649729185083e+01\n1.1146870571841401e+01\n1.5302236470937634e+01\n-5.3256997759953087e+01\n7.6465738085189585e+00\n1.4185331909846619e+01\n-5.2070299568846060e+01\n8.6838952717524052e+00\n2.0759216771378274e+01\n-5.4004020428912931e+01\n7.5991289749357316e+00\n1.3786586011200015e+01\n-5.1315102312705370e+01\n-7.8439085102441899e+00\n1.5718766461346533e+01\n-4.1716024316519942e+01\n-1.5001530092220239e+01\n1.1246708621757534e+01\n-4.3183652392733727e+01\n-1.4211090328488286e+01\n1.1064749971329103e+01\n-4.4334933802432587e+01\n7.3440068648344363e+00\n2.2377478343052566e+01\n-4.9805564337812143e+01\n4.9121864869187970e+00\n-2.3584338474192315e+00\n-2.0561134481922817e+01\n-3.4923846756181325e+00\n-7.4428956535370139e+00\n-2.2381699687998708e+01\n-5.0698834664306727e+00\n-6.6440391124614830e+00\n-2.3445057909264548e+01\n6.4246942550452601e-01\n1.1619986696847466e+00\n-2.0554994777610464e+01\n4.9589212072315529e+00\n1.6662637793696225e-01\n-2.1790086717923398e+01\n4.8440771571618519e+00\n2.4925514100704511e+00\n-2.2823735439542386e+01\n1.3341397295348608e+01\n1.0134577055600120e+00\n-3.3271178874414503e+01\n6.5361784577199611e+00\n-3.4626701765136358e+00\n-2.4144596364610933e+01\n-1.3361167711606330e+00\n-1.8558922634950166e+00\n-2.1090636391173721e+01\n-1.4668878692738284e+01\n5.8066662914402780e+00\n-4.0656581715312569e+01\n1.0775363735527039e+01\n-5.5348276994506307e+00\n-2.4779990291308266e+01\n3.2164999927485565e+00\n1.3391803828279458e+00\n-2.0735006045563360e+01\n4.7324092734453558e+00\n1.7294313842273549e+01\n-5.4480309882556320e+01\n5.0779686504154604e+00\n-4.6082043705573259e+00\n-2.2683415214164093e+01\n-3.4651185954234238e+00\n1.6204607280940748e+00\n-2.5640373547818090e+01\n1.3960844457275631e+01\n8.3716766782648140e+00\n-3.8346309805916242e+01\n-7.2074105030114577e+00\n-1.7576307166597287e+00\n-3.0184650376862965e+01\n1.3288159283509140e+01\n9.7129166397516120e-01\n-3.3278793826515162e+01\n1.2494821796850221e+01\n-5.9661243463329940e+00\n-2.3903482215017952e+01\n3.0891577179401861e+00\n-2.8559746025746358e+00\n-1.9789676115969812e+01\n7.9610384168061552e+00\n1.5286197642627915e+01\n-5.3508523884631678e+01\n5.0165834183183211e+00\n-2.4359993206648607e+00\n-2.0472949971648433e+01\n1.0541036965222534e+00\n1.7899376705307293e+00\n-2.0697152213112027e+01\n8.1221870610085389e+00\n-7.0038673607467281e+00\n-2.2876803877693362e+01\n-7.4232461177167250e+00\n1.4027648533200518e+01\n-4.5139678002164580e+01\n4.3132707596949960e+00\n-3.3268207967483785e+00\n-2.1084409551225615e+01\n-8.8346182445592198e+00\n1.4113701503329308e+01\n-4.3121965354600277e+01\n6.2527844700167909e+00\n-1.2223162913987793e+00\n-2.1912901975491980e+01\n1.1677671768044068e+01\n-5.2251625609460435e+00\n-2.5306544048478226e+01\n1.0369575993179247e+00\n1.4993192563436568e+00\n-2.0633679751955924e+01\n8.0782957954953130e+00\n1.4491692117730951e+01\n-5.2308653359782177e+01\n1.3288159283509140e+01\n9.7129166397516120e-01\n-3.3278793826515162e+01\n6.0586123746078986e+00\n-2.3706474189937867e+00\n-2.2137177186527342e+01\n3.7491917559821388e+00\n2.3738979404838760e+00\n-2.1582846893306439e+01\n-7.5035621525000460e+00\n-2.1085569984469554e+00\n-2.9649371537126690e+01\n4.2281463440261158e+00\n-3.4030638060765610e+00\n-2.1104090474541920e+01\n9.7550334186326293e-01\n6.0269025096775286e-02\n-2.0316338453583551e+01\n-2.2962347506280998e+00\n2.8205135844035287e+00\n-2.5910532213363009e+01\n-8.6013848964721724e+00\n-2.5514346923987348e+00\n-2.9212302487833309e+01\n1.1382971053956004e+01\n-5.6974422263045037e+00\n-2.4585109399219458e+01\n1.3269233032200718e+01\n2.9553119763895843e+00\n-2.9637377880478347e+01\n1.1782340923204877e+01\n-5.7774419002296602e+00\n-2.4544956923281447e+01\n-5.7599429935042625e+00\n5.7135415500048605e+00\n-4.0287194105117813e+01\n-4.0636373342045857e+00\n-7.0616651756074438e+00\n-2.2916908874392497e+01\n1.3261062303404104e+01\n1.1564767499835703e+01\n-3.6036661447410737e+01\n1.3061174501071331e+01\n1.4598054238519627e+00\n-3.3870708103048749e+01\n1.3311119754051596e+01\n1.0779540150294519e+01\n-3.7390052261729544e+01\n1.2644338102084840e+00\n-2.6608894775322263e+00\n-2.0024549508842831e+01\n5.3194977732616957e+00\n3.8200328816351409e-01\n-2.2362857287750401e+01\n2.9923113525813205e+00\n-4.7088687096431556e+00\n-2.1622542963382017e+01\n9.4583123248877243e-01\n1.0950245381257064e+00\n-2.0463754633962946e+01\n1.1427181833981259e+00\n3.8321936452028291e+00\n-2.3968840948463242e+01\n1.1905909679712499e+01\n-6.1755491676394412e+00\n-2.3682751524194082e+01\n-3.6500004804526665e+00\n-7.6725717325930294e+00\n-2.2045946835516791e+01\n1.2970332452232217e+01\n3.4059446761016878e+00\n-3.0802356648816961e+01\n8.0284724057902923e-01\n7.6093637469471567e+00\n-4.2991625929080762e+01\n-1.2810836427783839e+01\n3.6031563316082029e+00\n-3.7617458270301661e+01\n4.5450002643540950e+00\n5.9169320790784896e-01\n-2.1335319549537036e+01\n4.5022941582775573e+00\n-3.7848996436998505e-01\n-2.1479908229212597e+01\n1.6741005114413248e+00\n3.1077215655059733e+00\n-2.2112269188064012e+01\n4.8440771571618519e+00\n2.4925514100704511e+00\n-2.2823735439542386e+01\n3.2205827386141168e+00\n-2.8132060028080939e+00\n-1.9970568241941304e+01\n3.5418830114080442e+00\n-4.3625833597562487e+00\n-2.1620816016394699e+01\n-4.5520324737979472e+00\n-7.0165757582644455e+00\n-2.3044983374893246e+01\n8.3372543832339763e-01\n-8.2890715975845797e-01\n-2.0540502282571602e+01\n1.2986006420666543e+01\n1.0430294665196289e+01\n-4.0249458607200808e+01\n-4.0636373342045857e+00\n-7.0616651756074438e+00\n-2.2916908874392497e+01\n-1.1059615021393854e+00\n3.0830234804149010e+00\n-2.3446712629004050e+01\n9.5445989261343644e-01\n1.5215146430849043e+00\n-2.0658155327176594e+01\n2.2444555101487311e+00\n1.2060299511851225e+00\n-2.0351857743603020e+01\n4.5339899866827889e+00\n-4.2341460669150548e+00\n-2.2151273239457669e+01\n-3.6253568407289674e+00\n-7.7449791966312116e+00\n-2.1930341870669235e+01\n2.7582264699898378e+00\n1.1025965713371182e+00\n-2.0399790491234633e+01\n4.5863904164629679e+00\n-4.6351742910077327e+00\n-2.2594756035593299e+01\n-4.7497346310300754e+00\n-7.0828462539460819e+00\n-2.2980294834771886e+01\n-2.9345424021358237e+00\n-1.2930469520963324e+00\n-2.1913971354518996e+01\n-5.8128556633532549e+00\n5.6244403030194814e+00\n-4.0241219519016376e+01\n-2.4334974815440771e+00\n-7.8369718364023182e+00\n-2.1810317971276724e+01\n-2.6685806131129062e+00\n2.0662340523714318e+00\n-2.4979665441510438e+01\n-3.7162770377250931e+00\n6.7448206160164392e-01\n-2.4307704934898357e+01\n-3.6144029473993271e+00\n-6.3015145719822516e-02\n-2.3245400294703725e+01\n2.4989041616442447e+00\n1.7939117067068691e+00\n-2.0648706237333663e+01\n-6.4288188187438655e-01\n2.0217218401356809e+00\n-2.1835602695482940e+01\n4.9562786665158720e+00\n-1.9537932184273366e+00\n-2.0931759525275019e+01\n-3.2936924747002170e+00\n-7.7203689966365516e+00\n-2.1867679612719744e+01\n4.2051574002773791e+00\n1.4507127979323684e+00\n-2.1371721044279806e+01\n1.4563392357249339e-02\n1.2843143707876332e+00\n-2.0933064205452023e+01\n-1.2539192481779526e+01\n3.8367977983916157e+00\n-3.7951709536214928e+01\n3.9960047836876660e+00\n1.3747927635331618e+00\n-2.1160576477049919e+01\n6.4611603947262655e+00\n-7.4267674976254110e+00\n-2.2245413678137584e+01\n9.4299369613006778e+00\n2.0870759524417359e+01\n-5.4495330862345646e+01\n9.4299369613006778e+00\n2.0870759524417359e+01\n-5.4495330862345646e+01\n9.3127342620831755e+00\n2.0522094657635535e+01\n-5.4879711503794553e+01\n1.7007203029444820e+01\n2.2578077632762266e+01\n-6.0867568676263893e+01\n5.1451905393241404e+00\n1.8845209990544497e+01\n-5.1835535897730850e+01\n8.8913093120529219e+00\n1.9270786464918480e+01\n-5.6885318091561921e+01\n-1.5039661991627598e+01\n1.1273587067733951e+01\n-4.2985596234079033e+01\n-7.5395144527654345e-01\n3.3501137185788883e+00\n-2.3384572597956062e+01\n-2.5603269710758441e+00\n7.5858542351667713e-01\n-2.3282074778934813e+01\n1.3932493952328981e+01\n3.5152244513554354e-01\n-3.0340285316275221e+01\n4.3153423694316322e+00\n-2.3159185695319877e+00\n-2.0497209025799545e+01\n1.2556974703592566e+01\n-4.2573453784071500e+00\n-2.6436392667533497e+01\n1.2931879279996854e+01\n-5.8763819111330919e+00\n-2.3974060638931732e+01\n6.0905487980606035e+00\n1.9743390358655681e+01\n-5.2277796459002964e+01\n1.7008469229551775e+01\n2.2992161200073305e+01\n-6.0100440306077992e+01\n-2.1180907472054646e+00\n1.7064982602272647e+01\n-4.6346036522711778e+01\n-3.3842270313225264e-01\n1.7415240224514378e+01\n-4.8442402498681183e+01\n8.0805906793066029e+00\n1.9398369157596427e+01\n-5.5206671426368644e+01\n3.6740585078484043e+00\n1.8036945283479014e+01\n-5.2282683390501866e+01\n8.6400010907954581e+00\n1.8400650061396664e+01\n-5.7368438763753183e+01\n1.5879006045501680e+00\n7.8687143122261070e+00\n-4.3402076516036530e+01\n9.0373810635770582e+00\n6.9405103926570852e+00\n-4.1925648486712710e+01\n-1.3928232742270819e+01\n4.7148688281239002e+00\n-3.9219330808959221e+01\n-1.2019442717803889e+01\n3.4344084460395683e+00\n-3.7214660308785056e+01\n2.5509033294968830e+00\n1.7663875806268443e+00\n-2.0631860238098319e+01\n1.3516242837073717e+01\n7.2452923734319152e-01\n-3.2363205480351944e+01\n9.1656023466166481e+00\n-4.2622331228066015e+00\n-2.6307373412609667e+01\n1.1798896789761551e+01\n-4.9358285858737050e+00\n-2.5517438122345332e+01\n1.3628326577968103e+01\n-5.1688166168159482e+00\n-2.5011163666677035e+01\n7.4912879890158921e+00\n-7.3037530237261468e+00\n-2.2403983074247044e+01\n1.8103139998739557e+00\n-8.3580463065192010e+00\n-2.1037840804864999e+01\n-1.5305382142934551e+01\n1.1300021261420586e+01\n-4.3562001621287280e+01\n9.0764147563338966e+00\n1.3798497907097852e+01\n-5.1539029055298130e+01\n1.3670759923019073e+01\n8.8698174847578759e+00\n-3.8137502766355688e+01\n1.3830211769242560e+00\n9.3308791907343629e+00\n-4.5405504989412727e+01\n-1.4122683463371361e+01\n8.7401312744261936e+00\n-4.4240132428643726e+01\n1.2429111721349919e+01\n5.7170921478467456e+00\n-2.9505989472217649e+01\n-1.5036647661397833e+01\n6.4465874269962473e+00\n-4.1499460951861629e+01\n-2.4071183440254247e+00\n6.2416933957616658e+00\n-4.1125628222204057e+01\n-1.2580906297497828e+01\n4.0832380387096121e+00\n-3.8196142759566307e+01\n2.8598221452773148e-01\n2.4969598830717383e+00\n-2.1512005861589536e+01\n4.0511856304833227e-01\n1.6126263900622604e+00\n-2.0907101397320975e+01\n1.3263882013338991e+01\n1.4664948191355622e+00\n-3.2645962756715392e+01\n-2.5107891466275163e+00\n8.3014802692682066e-01\n-2.3376256293481767e+01\n1.3493904409726863e+01\n1.2088739703868059e+00\n-3.1189306413779221e+01\n1.3493904409726863e+01\n1.2088739703868059e+00\n-3.1189306413779221e+01\n-3.4958454658726694e+00\n-4.2276850047345566e-01\n-2.2873285337464505e+01\n1.2664735500389777e+00\n-4.4306475741515028e+00\n-2.1305993193485410e+01\n1.3949619388009310e+01\n-5.1825595294712885e+00\n-2.4912922142319939e+01\n6.5398047154622123e+00\n-7.4774730931654529e+00\n-2.2299786737173040e+01\n-1.3702052302020391e+01\n4.6732246344262673e+00\n-3.9171459086651438e+01\n8.5903665049249298e+00\n1.9001718579021048e+01\n-5.6493304434290202e+01\n8.5111416355054736e-01\n-1.2234186634552349e+00\n-2.0663281817509791e+01\n-6.3193636002860583e+00\n7.5341600679009835e+00\n-4.2980564656077590e+01\n1.0964117335836409e+01\n-5.8914612225528309e+00\n-2.4169910388538860e+01\n8.0110196503297502e+00\n1.3906531403609042e+01\n-5.1423735803525503e+01\n1.1292983527785337e+01\n-5.7276997928704318e+00\n-2.4480580688832404e+01\n-1.4696686514123559e+01\n1.1023891676269479e+01\n-4.2764998359090384e+01\n1.1752855672851929e+01\n-5.4943781621676848e+00\n-2.5011260853270834e+01\n1.1106722273572277e+01\n-2.4299436926496232e+00\n-2.9280800659867129e+01\n-6.2514588416441148e+00\n5.9308933046690040e+00\n-4.0778704454338673e+01\n3.3166558936139876e+00\n3.4550567809149464e+00\n-2.2704211465668600e+01\n1.3318228231687849e+01\n8.3215675567779124e-01\n-3.3186443679272735e+01\n5.0978228099470915e+00\n-2.4452539410075578e+00\n-2.0324432364518195e+01\n2.1338533823954555e+00\n7.8799458227697556e+00\n-4.3346149429469975e+01\n4.7271470141012017e-01\n-2.1146456969337224e-01\n-2.0508315393579299e+01\n-5.2180431126187266e+00\n4.9876386531246446e+00\n-3.9479924709062310e+01\n-6.3774465691787974e-01\n3.2916438622863153e+00\n-2.3094523565554834e+01\n1.1306336578093720e+01\n-5.9333320182252924e+00\n-2.4128871424998586e+01\n4.9985484022576427e+00\n-7.9716945361821834e+00\n-2.1575277062940412e+01\n8.8824138653643949e+00\n1.1701656196373158e+01\n-4.8652059619990837e+01\n8.8824138653643949e+00\n1.1701656196373158e+01\n-4.8652059619990837e+01\n-2.0966486345053648e+00\n2.9057165435796217e+00\n-2.6039420170603403e+01\n1.3603107657138956e+01\n6.2026612627885114e-01\n-3.2416951277624904e+01\n1.2338077752307319e+01\n-4.2891201239115224e+00\n-2.6253537644877166e+01\n-3.7065844984128429e+00\n1.1521493087045162e+01\n-4.8306876057804551e+01\n2.1417864313970769e+00\n1.0037606356649851e+01\n-4.6262474376180620e+01\n2.0458107241435650e+00\n8.3041103488948789e+00\n-4.4234122648003904e+01\n8.3935159451930890e+00\n5.9414448574343721e+00\n-4.0646577043035521e+01\n1.1974111504695995e+00\n1.6404931505830527e+00\n-2.0584606353315060e+01\n-3.7155611436326659e+00\n1.4290165570228817e+00\n-2.5404624649614899e+01\n-9.5627933909219571e+00\n9.5414426334167024e-01\n-3.3926196611918101e+01\n6.2378932071970556e+00\n9.5811179664924717e-01\n-2.3696818469082185e+01\n4.2185780374490083e+00\n5.1482562513815244e-01\n-2.1087698587777819e+01\n8.9913767047383519e+00\n1.5843943300622728e+01\n-5.4878598999998573e+01\n1.3341086973646249e+01\n9.4796402175396466e+00\n-3.9090515977461529e+01\n-7.4382518979079464e+00\n-1.7114681819650011e+00\n-3.0224130861688646e+01\n1.2408724821554758e+01\n-4.4256156611571988e+00\n-2.6100282034722401e+01\n1.2394450161042021e+01\n-4.8151487090869995e+00\n-2.5653548745855083e+01\n-4.7839512676642643e-01\n1.2546000166380276e+00\n-2.1215659744244647e+01\n-1.1488056990097069e+01\n8.3720955246417050e-01\n-3.3891506997631723e+01\n1.8103139998739557e+00\n-8.3580463065192010e+00\n-2.1037840804864999e+01\n1.7954850833738827e+00\n-8.2990548709461791e+00\n-2.1103904422283524e+01\n1.3160725769870512e+01\n1.0552288630840215e+01\n-3.9850461058075126e+01\n1.3179098490976285e+01\n1.0518919410756589e+00\n-3.3856867622128561e+01\n1.2171176172240802e+01\n-5.0067599819966997e+00\n-2.5539152397795689e+01\n4.0648404391446116e+00\n1.7660859672497541e+01\n-5.3480732980376970e+01\n9.6043040873215380e-01\n7.6920765576648957e+00\n-4.3046466053387306e+01\n1.3762836868057676e+01\n1.0553372885311652e+00\n-3.0014589505828521e+01\n1.3357085788029910e-01\n-7.0292673611688700e-02\n-2.0662979128922824e+01\n1.2015247090710805e+01\n-4.7293992783021972e+00\n-2.5870175709639000e+01\n8.9354366639452412e+00\n-6.5379402965628408e+00\n-2.3498280770543634e+01\n8.3009257053916787e+00\n1.5339617430757844e+01\n-5.3230511123768110e+01\n1.3263429564236485e+01\n2.2024377562864315e+00\n-3.1400603393447096e+01\n3.0291487985690346e+00\n-3.1717206915719104e-01\n-2.0408221525699755e+01\n1.3271882228092290e+01\n9.8477021228524162e+00\n-3.9758218237869819e+01\n-7.5053877311417869e+00\n2.1458795937944473e+00\n-3.5535628195139154e+01\n9.8616155810930728e+00\n8.3031126545561342e+00\n-4.3664681622763098e+01\n-1.4284906278022563e+01\n4.8292784594384965e+00\n-3.9361839454314406e+01\n3.1037723426307888e+00\n7.9966899281386417e-01\n-2.0501330933365843e+01\n2.2434011589569871e+00\n-2.7938148473457907e+00\n-1.9869190389266116e+01\n-5.3208688520254954e+00\n-7.2722748680994087e+00\n-2.2616195981515965e+01\n7.0116796500545142e+00\n1.3508679764815367e+01\n-5.0937466358844574e+01\n-1.3759303661254910e+01\n4.8638646800544576e+00\n-3.9464536602641530e+01\n3.6447776936977290e+00\n-5.0857946115779713e+00\n-2.3090409709202621e+01\n-4.4382349786019812e+00\n-6.7440186388070025e+00\n-2.3270173887304864e+01\n9.9359006126196565e+00\n7.9758993809099845e+00\n-4.3405847537359548e+01\n1.0241113081942251e+01\n7.7113908124088555e+00\n-4.3001103991705989e+01\n9.0447092519692998e+00\n-5.9880714724673645e+00\n-2.4308293820000888e+01\n-4.4909896861159098e+00\n-6.8724050664241672e+00\n-2.3108934565718798e+01\n-1.5743094616210440e+00\n-1.6682707015354972e+00\n-2.1263121710078867e+01\n1.3013461588896147e+01\n1.2475992595816065e+01\n-3.5564616096648990e+01\n-1.4555104731375357e+01\n1.0994496924900673e+01\n-4.3859595866255887e+01\n-9.4509639939295553e+00\n1.2418969036634985e+01\n-4.5108450107187984e+01\n-1.4339468751624098e+01\n6.0038845176848534e+00\n-4.1090341723953649e+01\n-6.7823527410745674e+00\n8.0805711367149229e+00\n-4.3601850923488904e+01\n-1.0830296038200238e+01\n7.8624292449450204e+00\n-4.3510729044401401e+01\n-1.1868401868346989e+01\n1.1792532887649196e+01\n-4.3903242262845467e+01\n-1.3891162713796371e+01\n1.2392483708280208e+01\n-4.2523490493178372e+01\n-9.2032784555554183e+00\n2.4525890936354187e+00\n-3.6016813992783284e+01\n-1.1918877058758172e+01\n1.2747254698288964e+01\n-4.1399661299578050e+01\n-1.3893382705287895e+01\n1.0390753722845769e+01\n-4.3775554552628797e+01\n-1.4741004243681601e+01\n5.9369003355830419e+00\n-4.0883430200716710e+01\n-1.1507345496623614e+01\n1.5480015595370675e+00\n-3.4672613903269713e+01\n1.0042690015000376e+01\n-5.2289285838542332e+00\n-2.5337389981938664e+01\n7.7456812110012041e-01\n-8.3537518997527958e+00\n-2.1099456298468716e+01\n-3.8865535103122122e+00\n-8.0351894650624196e+00\n-2.1529545186353225e+01\n6.5692083812016451e+00\n-4.1189600396648557e-01\n-2.2977677027019929e+01\n-5.6174247318127852e+00\n-6.8730921630130846e+00\n-2.3168825867852018e+01\n2.3403361659543149e+00\n8.4496231610269890e-01\n-2.0298091640145866e+01\n-1.1958940949508195e+01\n-7.9781770209316614e+00\n-2.1509594114983333e+01\n4.2222698826765690e+00\n1.0209912711984941e+00\n-2.1178233244684119e+01\n-4.8652082464933253e+00\n-1.6683181694806248e+00\n-2.7185311936182334e+01\n-1.0631247037282385e+00\n-1.9825906150864017e+00\n-2.0848389309033042e+01\n1.2096609926758215e+00\n-4.9805972137907091e+00\n-2.1900069759923387e+01\n-2.8039828235310353e+00\n-1.0880995556658524e+00\n-2.1991851940352401e+01\n3.9065765217816186e+00\n-2.2978421373572657e+00\n-2.0471828306903515e+01\n8.9228164771846996e-01\n-2.9545095364758618e+00\n-1.9584222707019482e+01\n-4.6098509173599052e+00\n-7.8195859374296619e+00\n-2.1846702719209507e+01\n2.5723531633014236e+00\n-1.0903145774099459e+00\n-2.0555162436160337e+01\n1.0310139966982959e+00\n-3.9082541459066444e+00\n-2.0493295260218503e+01\n2.4151200151072256e+00\n-4.8453448150413658e+00\n-2.1812908364978391e+01\n6.3053326004754873e-01\n-2.7782906408992716e+00\n-1.9821245717196685e+01\n-1.1666855069624726e+01\n-7.8267416090264730e+00\n-2.1775493461471886e+01\n3.1205709924114022e+00\n-3.0269648385290480e+00\n-1.9555840518310109e+01\n1.5059053360798051e+00\n-2.9947472053132137e-02\n-2.0209533121337799e+01\n-5.6419209308858633e+00\n-8.3823679000049633e+00\n-2.1033014428861396e+01\n2.1526040318765691e+00\n1.9174011797833795e-01\n-2.0177854159910485e+01\n2.3732465147213802e+00\n3.9477148153655878e-01\n-2.0218587908576847e+01\n-2.8106545444992714e+00\n-8.1342803688558352e+00\n-2.1266276509012695e+01\n-1.0631247037282385e+00\n-1.9825906150864017e+00\n-2.0848389309033042e+01\n4.2222698826765690e+00\n1.0209912711984941e+00\n-2.1178233244684119e+01\n-1.5114391087087109e+01\n-7.0141439364391465e+00\n-2.2916930562927650e+01\n7.2289746295786186e+00\n1.6668222965157564e+00\n-2.5760881530064999e+01\n3.5914880859622320e+00\n-3.7811457520767369e+00\n-2.1013431997378728e+01\n3.0938573159823073e+00\n8.3003778796933003e-01\n-2.0499261502081289e+01\n1.5254136353441676e+00\n-5.8302051553390810e-01\n-2.0324865103133774e+01\n1.6669235710254400e+00\n6.5622110148331492e-01\n-2.0253640932777024e+01\n1.9705423046840083e+00\n-1.6630140749258546e+00\n-2.0205926877767780e+01\n-4.8624933584377290e+00\n-7.1515795556335338e+00\n-2.2754974296532936e+01\n1.3253829581599383e+01\n1.0810959347325333e+00\n-3.3249590595006794e+01\n2.4221915626642825e+00\n-3.0027407658711885e-01\n-2.0293202127022653e+01\n-4.0539655992638117e+00\n-7.8488272429732913e+00\n-2.1577153895080428e+01\n2.5750630073127301e+00\n4.3923317445077131e-01\n-2.0269358854630735e+01\n3.9981536001123557e+00\n4.3479579231106003e-01\n-2.0884255205775339e+01\n-4.6594441238042172e+00\n-8.3068351293044138e+00\n-2.1208035389287083e+01\n-3.4889658807346118e+00\n-7.7722603933277670e+00\n-2.1838655124324969e+01\n2.5059432158109813e+00\n7.6281022128200004e-01\n-2.0302820787290958e+01\n-5.7269945890475045e+00\n-7.3103224783837657e+00\n-2.2566614717293049e+01\n9.7550334186326293e-01\n6.0269025096775286e-02\n-2.0316338453583551e+01\n-1.1274593233235868e+00\n-2.3861248646509345e+00\n-2.0186684657512462e+01\n5.8938744463796433e-01\n-2.5790472150644010e+00\n-2.0087017415817744e+01\n9.1950394416793746e-01\n-2.9972014855124112e+00\n-1.9575410640846492e+01\n1.3435824114824896e+01\n-5.2734737006403360e+00\n-2.4892593259297382e+01\n-3.7906116896556181e+00\n-8.0645716751807033e+00\n-2.1487260672663023e+01\n-2.5752919556837877e+00\n-8.1053529327964249e+00\n-2.1425835134687361e+01\n4.3258237852244701e+00\n-5.0460728784981546e-01\n-2.1201337074350938e+01\n3.6403334045384472e+00\n-1.7935843259620676e+00\n-2.0616107547992886e+01\n-1.3486289397360482e+01\n-5.9978959185780534e+00\n-2.4342271871398939e+01\n4.4159224744180809e+00\n-2.8165918815182809e+00\n-2.0613927242704303e+01\n3.5852991356578983e+00\n-4.0853524843588058e+00\n-2.1379914171086998e+01\n1.2458558478417242e+01\n-4.5762611817549006e+00\n-2.6050682121107979e+01\n-4.0456272663881361e+00\n-8.0438753476350122e+00\n-2.1572210102443130e+01\n-1.9014424310636218e+00\n-8.3419561906815911e+00\n-2.1041805618012098e+01\n1.3874226982278620e+01\n3.1195399574295224e-01\n-3.1041334882783335e+01\n4.8372219589277918e+00\n-1.3399039825993764e+00\n-2.1248434878331633e+01\n4.4403501668561782e+00\n-2.3897041448235705e+00\n-2.0387082195220902e+01\n1.0567794480802002e+00\n-4.9641686246965069e+00\n-2.1740172680080015e+01\n-3.6253568407289674e+00\n-7.7449791966312116e+00\n-2.1930341870669235e+01\n1.2399093190942750e+01\n-4.6125605586763738e+00\n-2.5710575382380060e+01\n3.2256121910512880e+00\n-5.6347822106894951e-01\n-2.0569289111224300e+01\n3.1794385360386150e+00\n-5.3321499108596337e-01\n-2.0573774152983891e+01\n3.2319758474670000e+00\n-6.9427695061720729e-01\n-2.0644672016433077e+01\n3.9308843854627571e+00\n-3.1927909261170515e+00\n-2.0616544007543251e+01\n-3.9325543200142734e+00\n-8.0792330465333695e+00\n-2.1488374786935740e+01\n-3.3163908992944595e+00\n-7.5534508728891101e+00\n-2.2092031857613456e+01\n3.1646128779260030e+00\n-1.0929551707971894e+00\n-2.0744337643177058e+01\n9.3301469373042478e-01\n-2.9332010772871002e+00\n-1.9608614246702292e+01\n-2.1340440459105348e+00\n-7.8760768457409949e+00\n-2.1740767539276209e+01\n-6.6038001239388044e-01\n-3.7940512370094082e-01\n-2.1285279719955508e+01\n6.5836545086603127e-01\n-3.1259148464267228e-01\n-2.0429115572348955e+01\n4.2721945939893260e+00\n7.9063202653962106e-01\n-2.1178565797797368e+01\n4.9711711877617484e+00\n-2.2607384193584257e+00\n-2.0577268449781744e+01\n2.1888879734701212e+00\n-3.1044541535400465e+00\n-1.9941835375025200e+01\n-3.3366588731656379e+00\n-8.1445603659970480e+00\n-2.1447042881277007e+01\n-2.5860774069680170e+00\n-8.2289652307678551e+00\n-2.1357376849666636e+01\n-2.5860774069680170e+00\n-8.2289652307678551e+00\n-2.1357376849666636e+01\n-7.3178414440644177e+00\n-3.1630148063138677e+00\n-2.8251518794117722e+01\n3.5397090461772733e+00\n-2.5410343689140618e+00\n-2.0211109912125071e+01\n2.2434011589569871e+00\n-2.7938148473457907e+00\n-1.9869190389266116e+01\n-4.6498902029268629e+00\n-6.6924832316279321e+00\n-2.3362454256217461e+01\n2.9702333977074797e+00\n-5.0823351850515266e+00\n-2.1986761659880944e+01\n1.3048138000112697e+01\n-4.6154169209874896e+00\n-2.5924114166532924e+01\n-3.5695731664688179e+00\n-7.4705689294472757e+00\n-2.2278732111923798e+01\n4.0977354447030194e+00\n9.9446596505292173e-01\n-2.1089169895077838e+01\n5.8563178329507437e+00\n-7.0143454917780479e-01\n-2.2187267700660673e+01\n1.9163362624045617e+00\n-1.3984888846917263e+00\n-2.0538962542729557e+01\n3.7197542694787606e+00\n-2.5024200388656719e+00\n-2.0182084182412893e+01\n4.5357486249483188e+00\n-4.3794994808927452e+00\n-2.2339500706151856e+01\n3.3063790358364842e+00\n-4.4219664058674324e+00\n-2.1389041065813068e+01\n4.6525671995839684e+00\n-4.4629431185990498e+00\n-2.2545461053005987e+01\n2.3295725319386302e+00\n-4.7390228840007662e+00\n-2.1624073914633264e+01\n3.4388684097422217e+00\n-4.7728154575476358e+00\n-2.1969356443602884e+01\n1.2342661534666666e+01\n-4.7075338943001288e+00\n-2.5836517197260580e+01\n-2.4013286687013675e+00\n-7.9202479849286505e+00\n-2.1678306725935677e+01\n4.8365422131977578e+00\n1.0258381277756476e+00\n-2.1749144684431545e+01\n4.8365422131977578e+00\n1.0258381277756476e+00\n-2.1749144684431545e+01\n5.0636753825798060e+00\n1.0355299019085775e+00\n-2.2021481943969150e+01\n3.2036687856103243e+00\n-3.1187483018511410e+00\n-1.9710702926116440e+01\n-3.3614421396736764e+00\n-7.9991330263198632e+00\n-2.1557219301704446e+01\n-2.7376328704697159e+00\n-8.1824250307885293e+00\n-2.1336678151250592e+01\n3.0109412415199499e-01\n-2.7357015838496133e+00\n-1.9977374016645328e+01\n-4.7848666862141531e+00\n-7.2795721819600505e+00\n-2.2578652154582798e+01\n6.1321609723028994e+00\n-6.4481806931466668e-01\n-2.2529805616506099e+01\n-2.6829648022075858e+00\n-8.1224042830518997e+00\n-2.1457725695299633e+01\n8.4739164947846779e-01\n-2.8409771273503930e+00\n-1.9690535976144979e+01\n5.0907242561038890e+00\n-3.4304872585822950e+00\n-2.1888824480537153e+01\n6.2407311715735627e+00\n-2.9902640131572813e+00\n-2.3130412926073408e+01\n5.3977402751110821e+00\n-2.9595156383118009e+00\n-2.1473191017388892e+01\n-3.1066355991829324e+00\n-7.8251124869151694e+00\n-2.1980012970103076e+01\n1.1033653264510974e+01\n-2.4858268761521845e+00\n-2.9184724223849667e+01\n-5.2072421239368119e+00\n-7.2128455386642223e+00\n-2.2738750894594123e+01\n3.3103219296255229e+00\n-8.1919316297221076e+00\n-2.1252620152721047e+01\n9.6952948183416972e+00\n-5.1310524655935588e+00\n-2.5361419295132208e+01\n1.0743856366662536e+01\n-6.2121624269260298e+00\n-2.3559592076612063e+01\n2.8774541946385401e+00\n2.6175487590016788e-01\n-2.0350260737277193e+01\n-2.5852535897137372e+00\n-7.8489130790016146e+00\n-2.1817604864169876e+01\n1.3200579920839935e+01\n1.6923955376636566e+00\n-3.2179613536181520e+01\n1.9830812895689591e+00\n-2.5083368273800133e-01\n-2.0221129298488613e+01\n-3.3590486440907332e+00\n-7.7949518879148370e+00\n-2.1916562792014041e+01\n1.4602846279300122e+01\n-1.4648400628726796e+00\n-2.9625599557407011e+01\n2.5874722320910846e+00\n2.7158870501989679e-01\n-2.0278689957237155e+01\n1.1660629301691609e+01\n2.3047859596922411e+01\n-5.3725941787245709e+01\n1.3910607935379604e+01\n2.4029471955769836e+01\n-5.4791633121728715e+01\n9.3097130539461972e+00\n2.0237909859638826e+01\n-5.5227347218465859e+01\n3.0964355135197907e+00\n1.9774970538545624e+01\n-4.9224284018070058e+01\n9.1494019431347215e+00\n2.0064131475514820e+01\n-5.5637196764843011e+01\n1.4799294288135419e+01\n2.1337472323516639e+01\n-6.0170465461075892e+01\n1.6322659833894612e+01\n2.2974888830552921e+01\n-5.9206746434869117e+01\n1.1902551523621256e+01\n2.3439133139746595e+01\n-5.3321046678220327e+01\n9.4124616179643255e+00\n2.2842129106103201e+01\n-5.2084272646145273e+01\n9.2119937285609943e+00\n1.9835519289761731e+01\n-5.6012535089864450e+01\n9.5519235320558438e-01\n2.0394389139006865e+01\n-4.5336931689000593e+01\n1.6199577935180077e+01\n2.1716794423381288e+01\n-6.1262657679775174e+01\n2.0339228278996757e+01\n2.4587899508555846e+01\n-6.1880459758375679e+01\n1.7167905038614499e+01\n2.3547743169270994e+01\n-5.9240768733563613e+01\n1.9519133649107449e+01\n2.2727686698558454e+01\n-6.3076191774191948e+01\n4.5337067559683044e+00\n1.9839955475219544e+01\n-5.0518284708350890e+01\n1.8620177832816047e+01\n2.2242597402121145e+01\n-6.2656899098132129e+01\n5.2052895870449500e+00\n1.8699308192572349e+01\n-5.2714009580978718e+01\n8.9236016423436961e+00\n2.0373462240544669e+01\n-5.4835025372651167e+01\n3.7761841498685560e+00\n1.8302749540611757e+01\n-5.1972603909939423e+01\n1.9647509297258441e+01\n2.2692078837118750e+01\n-6.3342622407054172e+01\n1.5703202606061886e+01\n2.1496342049228083e+01\n-6.0822707595696627e+01\n9.8803530725750424e+00\n2.1616966681072896e+01\n-5.1876091663901498e+01\n9.8803530725750424e+00\n2.1616966681072896e+01\n-5.1876091663901498e+01\n5.7079459752896220e+00\n2.0189499678528225e+01\n-5.0771887755984061e+01\n1.4293065373250652e+01\n1.8178182725007577e+01\n-5.7435055024773327e+01\n4.8245344363510476e+00\n1.9942954877846297e+01\n-4.9222009563225861e+01\n1.9866822457190736e+01\n2.3308713929839108e+01\n-6.4396612216642154e+01\n1.9556084214135343e+01\n2.3290498662729821e+01\n-6.4215458999539550e+01\n6.1489079251854930e+00\n2.1167576489337087e+01\n-5.0736883770817002e+01\n-3.6689746516679231e+00\n1.7135175560201752e+01\n-4.5039426683517803e+01\n-2.6790562059687223e-01\n1.7806140610526207e+01\n-4.7698695936754277e+01\n-6.7263058732902410e+00\n1.6764880791018332e+01\n-4.1921501231668806e+01\n-1.3876572588760052e+00\n1.7682807432754519e+01\n-4.6896931881171518e+01\n-6.4531025201537027e+00\n1.5062591510793911e+01\n-4.4591783502413385e+01\n-1.3690360232673466e+00\n1.9115674505046542e+01\n-4.4423929919066325e+01\n-9.1951998582506107e+00\n1.5352354107480782e+01\n-4.0995285033673071e+01\n8.1025036515945947e-01\n1.4751529900191709e+00\n-2.0659453366992860e+01\n1.1558779002185624e+00\n1.2607699581506024e+00\n-2.0448995338556916e+01\n-7.1968679386323675e-02\n3.4234251884250715e+00\n-2.2783372588573823e+01\n-2.5939172759193752e+00\n2.0638364578912127e+00\n-2.4993726146356369e+01\n1.4511701972882793e+00\n4.8730386745798798e-01\n-2.0228272482056457e+01\n-1.3762650861705122e-01\n2.0768327808103981e+00\n-2.1610792379343192e+01\n-8.2350703988850071e-01\n2.7432806339292575e+00\n-2.2701177563726983e+01\n-6.2581293554406014e-01\n2.6020899903769648e+00\n-2.2279655439173094e+01\n-1.2223387204561469e+00\n-2.0914655143360781e+00\n-2.0714773329204423e+01\n-2.8141615783987199e+00\n-1.0294180061018374e+00\n-2.2091448307029307e+01\n4.3368295489963216e-01\n-2.4915210280850797e+00\n-2.0212464466665583e+01\n1.3726730996277108e+00\n-2.7423603027074597e+00\n-1.9977767626446195e+01\n3.3344097875782375e-01\n2.9125821228152109e+00\n-2.2356929344368051e+01\n1.4495366343373648e+01\n2.2422067545205373e+01\n-5.7492689919924885e+01\n-2.7848271056022895e-02\n1.8284844262011028e+01\n-4.7034193332098987e+01\n-5.7689837208511294e+00\n5.3775708905373900e+00\n-3.9965286260958180e+01\n-1.5999195522317483e-01\n-4.9104945064183725e-01\n-2.0962631929888150e+01\n4.4284709236176170e+00\n1.1102629904349361e+00\n-2.1460457653052927e+01\n4.7120727922046823e+00\n1.7640923374339270e+01\n-5.3886023264530110e+01\n3.6680888429495915e+00\n1.9181019151354086e+01\n-4.9886005108789320e+01\n1.4483950280227409e+01\n2.2586428806170034e+01\n-5.7204588938571973e+01\n1.3855588178177083e+01\n-1.2798342565651494e-01\n-3.1912600508593261e+01\n1.2960465399175254e+01\n1.0584819103940713e+01\n-3.9899891760152570e+01\n-1.6467625173753213e+01\n8.5476790365781028e+00\n-4.3037000316229438e+01\n-9.3365135222360252e+00\n-6.9142670559890433e+00\n-2.3030838983877246e+01\n-1.0578872620269877e+01\n-7.3684923139254721e+00\n-2.2371549465263449e+01\n1.3915038038725044e+01\n-3.2022747898448839e-01\n-3.1868014320612321e+01\n1.3104432905573586e+00\n2.0545353846210084e+01\n-4.6206702044858169e+01\n1.3205139586079692e+01\n1.1844485087911602e+01\n-3.6343997707380311e+01\n-9.3365135222360252e+00\n-6.9142670559890433e+00\n-2.3030838983877246e+01\n7.1804883064273879e+00\n2.1299865352717770e+01\n-5.0552625520733038e+01\n-9.1118087577147637e+00\n3.3136760312299036e+00\n-3.7361316722552893e+01\n-1.3933848707282639e+00\n1.7937497338633300e+01\n-4.6569810356910011e+01\n1.3037702586808262e+01\n2.4444937891851463e+01\n-5.3461856759954060e+01\n1.2715200409184488e+01\n3.9055335952735266e+00\n-3.1540467492040104e+01\n-9.1949937501977050e+00\n3.2595810690946743e+00\n-3.6884850018962020e+01\n-2.9750945271555516e+00\n-7.9863657801286312e+00\n-2.1597293460027014e+01\n-7.3680195636654995e+00\n-2.1663973669890120e+00\n-2.9631840874712857e+01\n-1.1248026876512398e+00\n1.1193717421097653e+00\n-2.1864934202987587e+01\n-2.0511902201770984e+00\n-1.6533493367747496e+00\n-2.1303248101104639e+01\n-2.8586084831126417e+00\n-3.2913415826312531e+00\n-2.3638593361484958e+01\n-1.0221597603121511e+01\n1.8590492718869103e-02\n-3.2624906073438289e+01\n-1.1554251362069449e+01\n2.3081743193303228e+00\n-3.6085107764623345e+01\n8.2169374439177414e+00\n9.6668267832897694e+00\n-4.5720330383796508e+01\n1.3274533106429757e+01\n9.5736827059355800e-01\n-3.3474448961644136e+01\n-7.6230033943814739e+00\n2.4610163915945389e+00\n-3.5927936132385817e+01\n1.2960465399175254e+01\n1.0584819103940713e+01\n-3.9899891760152570e+01\n3.2247649478667251e+00\n-2.5350087425851071e+00\n-2.0192474647537143e+01\n-2.4335776857066782e+00\n-1.2023912308880913e+00\n-2.1850555270040978e+01\n-3.3036101229872559e+00\n-7.4108832590417144e+00\n-2.2453112769332392e+01\n-9.8883433431976542e+00\n-1.0109191560477737e+00\n-3.1425746533414710e+01\n-4.3840756266655054e+00\n-7.0354409272681764e+00\n-2.2900294040581819e+01\n-2.0040468158203439e+00\n-8.5757610452385560e+00\n-2.0782653609124999e+01\n-2.9384583776215725e+00\n-7.9085388245100896e+00\n-2.1646666850194340e+01\n-4.8020105465236975e+00\n-7.1929017997942326e+00\n-2.2697147591853007e+01\n-3.9515838874682085e+00\n-7.4482308594593238e+00\n-2.2355501385153506e+01\n-3.5984981490621957e+00\n-7.5135158482289492e+00\n-2.2166009940383471e+01\n1.1376532256276466e+01\n-6.2243168845470240e+00\n-2.3750776668723024e+01\n-7.9466628877395760e+00\n1.4094944814618135e+01\n-4.4589357324150086e+01\n2.0003214114334287e+00\n-3.0961357854288396e+00\n-1.9839536031260774e+01\n1.4685215359552168e+00\n-4.5757670931108252e-01\n-2.0293771207288117e+01\n-4.6052694114521548e+00\n1.7951919611063843e+01\n-4.2523754417936800e+01\n-1.2918446598662070e+00\n2.0490934487882898e-01\n-2.1930684244210848e+01\n1.1090708118878478e+01\n2.2996995411670877e+01\n-5.3150657625255086e+01\n-9.3764365700655361e+00\n2.4403905467857907e+00\n-3.6004000216268857e+01\n2.6989967233660739e+00\n2.1213395136445286e+00\n-2.1124463676070963e+01\n4.8742833535298580e-01\n2.1603412919635541e+00\n-2.1161259144310900e+01\n-7.5035621525000460e+00\n-2.1085569984469554e+00\n-2.9649371537126690e+01\n6.6885169929453978e+00\n-1.7045690278232412e-01\n-2.3267293242127909e+01\n1.4213093824689436e+01\n2.1529845152445358e+01\n-5.9038473088206651e+01\n-1.2813241400212751e+00\n4.5559734371783145e-01\n-2.1889356502093751e+01\n-1.1109630566613056e+01\n3.2195585579501067e+00\n-3.6752941549606319e+01\n1.2445299649373368e+01\n5.3875876850807574e+00\n-2.9382437043453891e+01\n1.1467548520356379e+01\n2.2781171130702660e+01\n-5.3691950714412251e+01\n1.3730640136319977e+01\n9.1897694374299839e+00\n-3.7589239387353793e+01\n1.0780072914556969e+01\n-2.8718784230737193e+00\n-2.8655792755823704e+01\n1.3016021828426789e+01\n1.3846185409024574e+00\n-3.4106260676408901e+01\n1.3487911949117155e+00\n9.3978582780412867e-01\n-2.0246196913749593e+01\n-6.2624111951824863e+00\n-4.3962735561242772e+00\n-2.6523649790429975e+01\n2.5077540683907755e+00\n-6.1723053374590933e+00\n-2.1859757561420579e+01\n1.3915038038725044e+01\n-3.2022747898448839e-01\n-3.1868014320612321e+01\n6.5489496845156303e+00\n2.1045845476320839e+01\n-5.1110512633982225e+01\n2.5701985996796228e+00\n1.6840679115236727e+00\n-2.0668339821335767e+01\n1.3646317966915948e+01\n9.6098299305088126e+00\n-3.7619388945402271e+01\n1.9481634356890942e+00\n-1.5627927062938363e+00\n-2.0328953525573812e+01\n3.7461458825913447e+00\n1.7522756123847895e+01\n-5.2792503396480697e+01\n-1.7226773416962524e-01\n3.2874103921678168e+00\n-2.2620990478873040e+01\n1.2961069421563579e+01\n2.7743150837047619e+00\n-3.1652399275233854e+01\n-1.5543818093683472e+01\n6.9299825518409088e+00\n-4.2185309094543562e+01\n-8.6099882817824493e+00\n1.4184715438098344e+01\n-4.3274619236020072e+01\n-5.2496615835907443e+00\n1.0521001640479993e+01\n-4.6959988289204880e+01\n1.4974688826593811e+01\n1.3648002505225264e+01\n-5.1315588911625575e+01\n-8.5860275291938564e+00\n1.1894772758731484e+01\n-4.7464706949791172e+01\n3.0955928683259200e+00\n1.9492018627884207e+01\n-4.9288605043090264e+01\n1.6053100705051175e+01\n2.2891696275047980e+01\n-5.9055726072674453e+01\n1.6683528185377526e+01\n2.2730052261304134e+01\n-6.0085830466663616e+01\n2.4674221496705360e+00\n1.9182089182145596e+01\n-4.9030424628147529e+01\n-5.3022941867225981e+00\n1.5843506478856305e+01\n-4.4756849746947417e+01\n-3.0107337529022327e-01\n1.7532729674653275e+01\n-4.9186838125829986e+01\n1.0228704093038790e+01\n2.0229397221307682e+01\n-5.7076294795885651e+01\n-5.1512495654173769e+00\n1.3181329773544604e+01\n-4.9418764441055536e+01\n-8.8107473326728574e+00\n1.1721406703263373e+01\n-4.7851545620603453e+01\n9.9796811397020626e+00\n1.9405655076247324e+01\n-5.7511832177720038e+01\n-1.0044166705141970e+01\n1.3647180871666171e+01\n-4.2659347203495003e+01\n1.0517378990831508e+01\n2.0821394107165414e+01\n-5.5728121464106081e+01\n1.0228704093038790e+01\n2.0229397221307682e+01\n-5.7076294795885651e+01\n1.2614540865026973e+00\n1.7090188631705796e+01\n-5.1095798332516928e+01\n-5.5376041742924329e+00\n8.4304840039888500e+00\n-4.4029788202574842e+01\n8.1185346765446411e+00\n1.9587123696642205e+01\n-5.4877759417152980e+01\n-3.6859049967132971e+00\n1.6145535980166645e+01\n-4.5903096090200933e+01\n1.5202308298317805e+01\n2.1285041856953658e+01\n-6.0293136139825492e+01\n1.6712100677519925e+00\n1.9196829397060760e+01\n-4.8506136567703045e+01\n9.6908737314880504e+00\n1.9199033244875629e+01\n-5.7440615961127882e+01\n4.0672977599588593e+00\n1.8257918920518719e+01\n-5.2216526988067038e+01\n-1.0116366597908868e+01\n1.4107396842048257e+01\n-4.2086211787765578e+01\n-8.5658146954560999e-01\n1.7919325902180002e+01\n-4.7217819225476738e+01\n-2.5384486548677310e+00\n1.7661504159322849e+01\n-4.5537031483646494e+01\n-8.7141972555347091e-01\n1.7669835295772682e+01\n-4.7296820206435726e+01\n-3.5029091361549353e-01\n1.8485462233339295e+01\n-4.6601055258457883e+01\n1.0586386198046137e+01\n2.1151132342087273e+01\n-5.5744280852739116e+01\n1.6570821638514875e+01\n2.1895929382631568e+01\n-6.1473289101314244e+01\n1.5103265338138426e+01\n2.2068235261418671e+01\n-5.9262288420195134e+01\n-3.5275616806954155e+00\n1.6971242738843220e+01\n-4.5362607830617698e+01\n-1.3876572588760052e+00\n1.7682807432754519e+01\n-4.6896931881171518e+01\n-3.0444966237707867e+00\n1.7034979776664180e+01\n-4.6094749697458447e+01\n-4.2767284326996728e+00\n1.5602156568584023e+01\n-4.6687828644446697e+01\n-6.1088506841646950e+00\n1.2838381983931802e+01\n-4.8946453691616192e+01\n-1.2821312630746135e+01\n1.3996267904596378e+01\n-3.9100427856786261e+01\n1.1809974198775313e+01\n2.3626737097679250e+01\n-5.3080767156582837e+01\n8.1268823562677674e+00\n1.8112825839462413e+01\n-5.7074211908403420e+01\n1.6571645591222829e+01\n2.1977395812067801e+01\n-6.1118723135849798e+01\n3.2015974115959245e+00\n1.9377624955235529e+01\n-4.9230247836063640e+01\n1.6389449327555038e+01\n2.1500172807642031e+01\n-6.1792327946596664e+01\n4.5951910844975243e+00\n-6.7916868229928179e-02\n-2.1403355459080768e+01\n-2.9736233892701751e+00\n1.7482440371968359e+01\n-4.5307333226147932e+01\n1.3090432829752803e+01\n2.3444455124794472e+00\n-3.2067907590419942e+01\n1.2789427052596047e+01\n2.7740479421423809e+00\n-3.2963841284818827e+01\n1.3712267297729898e+01\n2.1948896597534080e-02\n-3.2389556037845765e+01\n6.7782919752498492e+00\n-3.0455617939944946e-01\n-2.3078771696080633e+01\n-3.6470151286056200e+00\n4.4031793964120508e-01\n-2.4016757817571637e+01\n6.2421315238892605e+00\n-7.3270296501384213e-01\n-2.2457499269747338e+01\n1.2627240245327028e+01\n3.4974039738060507e+00\n-3.2950192917609044e+01\n1.5104831630083644e+00\n-7.1757457560296711e-01\n-2.0390821334075763e+01\n1.3627709758609464e+01\n3.8257572243464194e-01\n-3.2154376357131405e+01\n-1.0476938524522554e+01\n8.8441102768377056e-01\n-3.3842067674955430e+01\n-2.4516160934777029e+00\n2.5460003030299307e+00\n-2.5644495564265437e+01\n-3.3610945794332987e+00\n1.3088026802454060e+00\n-2.5061468159079070e+01\n4.0070664003364413e+00\n2.8683052682565555e+00\n-2.2239570223129910e+01\n6.2340101096147360e-01\n1.4895461681873992e+00\n-2.0792979435955445e+01\n9.3543756976301973e-01\n-2.8539927896216502e+00\n-1.9726841902177352e+01\n4.3195840363775559e+00\n2.5368668841749482e+00\n-2.2205596356869794e+01\n6.4351859455813267e+00\n-4.1220391144480661e-01\n-2.2953689487863567e+01\n4.2723050615127818e+00\n-1.2042550852524558e+00\n-2.0768899292642470e+01\n4.2479727786673784e+00\n2.0465157235694096e+00\n-2.1720040202666979e+01\n4.3555477449545243e+00\n-9.8429200749803003e-01\n-2.1167197245757528e+01\n3.1348868172200501e+00\n-2.9371009473319925e+00\n-1.9690335865788573e+01\n-1.8363981976343207e+00\n-1.7332355663701120e+00\n-2.1170533218435111e+01\n3.9862393872668873e+00\n-1.2837499332686237e+00\n-2.0774728868641041e+01\n5.4870378946543841e-01\n1.9087190688625493e+00\n-2.0976447538052909e+01\n3.2962736648823934e+00\n-1.9902078463405068e-01\n-2.0562621099981421e+01\n-3.6045401441079541e+00\n-7.2334094012535184e+00\n-2.2634758629464955e+01\n3.4477701409750106e+00\n-2.0913802095770051e-01\n-2.0615269154143281e+01\n-2.6490029398466088e+00\n1.8260871970888042e+00\n-2.4637792576335812e+01\n2.6259249457176645e+00\n1.4162538714225479e+00\n-2.0515404383640142e+01\n5.6296120981293827e+00\n-1.6952057572358441e+00\n-2.1303427854454256e+01\n3.2557971177118827e+00\n-1.5119841871237103e+00\n-2.0399112365635613e+01\n4.3102328902655724e+00\n1.9214759458771944e+00\n-2.1695296736190009e+01\n7.5516563728827384e+00\n8.8099386822170835e+00\n-4.4603437303996508e+01\n5.7560376466313059e+00\n-1.1007347920644295e-01\n-2.2269399607029769e+01\n4.1139109515244016e-01\n-1.3925169841049132e+00\n-2.0473060102520986e+01\n-8.2261775659396292e+00\n7.1826379863571743e+00\n-4.2674793176182625e+01\n4.0350168746830786e+00\n3.0381725390120864e+00\n-2.2497460895006242e+01\n4.9292814566550414e+00\n1.1338212143145481e+00\n-2.1876218863968269e+01\n-9.4942403043813126e+00\n-2.2873881378904430e+00\n-2.9551864989975623e+01\n2.4009505302322993e+00\n1.8254181705421175e+00\n-2.0676856386738208e+01\n2.0223545662977349e+00\n-2.7234098016555932e+00\n-1.9891744079627166e+01\n2.8501547141161478e+00\n1.3012466648646290e+00\n-2.0565806537088250e+01\n7.9131367394000562e-01\n-2.4441096558648461e+00\n-2.0265169444589219e+01\n2.4392471622867062e+00\n1.0351098907017782e+00\n-2.0398988956730975e+01\n-6.9097232239267932e+00\n8.2399258785463392e+00\n-4.3875723092611175e+01\n2.9382468790999003e+00\n2.0355428966001345e+00\n-2.0951093606932787e+01\n4.1126031841247537e+00\n1.6233109118348483e+00\n-2.1274639217268060e+01\n4.4524440472475710e+00\n-1.0160030898154579e+00\n-2.1062699158913432e+01\n4.3119842355712157e+00\n1.5842957053299749e+00\n-2.1451408185254365e+01\n-1.2223387204561469e+00\n-2.0914655143360781e+00\n-2.0714773329204423e+01\n5.8938744463796433e-01\n-2.5790472150644010e+00\n-2.0087017415817744e+01\n-2.5940533170809958e+00\n-3.0053299503764550e+00\n-2.2987875469521640e+01\n-3.0094091462176653e+00\n-4.8879819999932528e-01\n-2.2692105596964769e+01\n2.8919375121991164e+00\n-1.6119527628206558e+00\n-2.0287260732358828e+01\n3.5095026031710765e+00\n1.2116139504193144e+00\n-2.0829616922448071e+01\n4.4089055151092307e+00\n2.4526132911002558e+00\n-2.2231271483966758e+01\n2.0710391117420732e+00\n-1.4156559319013489e+00\n-2.0536874144290472e+01\n3.5107078645102892e+00\n1.9960083760024971e+00\n-2.1191543702519205e+01\n3.8821398525698076e+00\n1.6608321883281389e+00\n-2.1235350891391260e+01\n6.1280534829917128e+00\n-7.9359599312258400e-01\n-2.2452201864572153e+01\n3.6917702264072565e+00\n8.0234380402858785e-01\n-2.0747172222902158e+01\n4.8710493838713766e+00\n3.5351306314559267e-03\n-2.1647691766823193e+01\n3.6752709360391744e+00\n-1.8482670841273068e+00\n-2.0671973840818918e+01\n6.2428714023170819e+00\n-5.5549315676667921e-01\n-2.2752200647932554e+01\n1.3763011911173968e+00\n-2.5534028928756043e+00\n-2.0147963350296113e+01\n3.9996455421174852e+00\n-1.2296193389514729e+00\n-2.0828107022450823e+01\n3.1892117450683455e+00\n-1.0772158759405703e+00\n-2.0805858620243288e+01\n1.0313058484085453e+00\n-1.4696078677272941e+00\n-2.0448789394660736e+01\n6.6144967877825032e+00\n-1.0514947642912049e+00\n-2.2194079514497620e+01\n3.2881986560904188e+00\n1.0794027541299156e+00\n-2.0695384753806184e+01\n-3.5270714567819126e+00\n-7.1721510291570434e+00\n-2.2705215583509336e+01\n3.1715157689848361e+00\n-1.5283154455770962e+00\n-2.0452122054666525e+01\n-7.3934356966247050e-01\n-3.7263892484141254e+00\n-2.1568855475540300e+01\n4.6725317108066813e+00\n5.8447053716974362e-01\n-2.1468603856378646e+01\n3.2329150433833731e+00\n-1.4066961438673051e+00\n-2.0580316266512721e+01\n3.1348868172200501e+00\n-2.9371009473319925e+00\n-1.9690335865788573e+01\n4.5014872296127875e+00\n2.7301769462619752e+00\n-2.2636302094002385e+01\n4.8710493838713766e+00\n3.5351306314559267e-03\n-2.1647691766823193e+01\n3.8870750051406844e-01\n-2.5028871287421106e+00\n-2.0220479880382150e+01\n-2.8879381551028240e+00\n-1.3313864428798590e+00\n-2.1665308771661735e+01\n-3.5295655454107862e+00\n-7.2087984962510747e+00\n-2.2647898701028367e+01\n4.7556414481128169e+00\n-2.2151190005846209e+00\n-2.0628415328640365e+01\n1.2147162538629901e+00\n-2.5553747226956807e+00\n-2.0102140454951286e+01\n1.5355052217975471e+00\n-1.6032675028495187e+00\n-2.0304809700783728e+01\n6.5331636161077107e+00\n-8.2163022424401910e-01\n-2.2452159986096191e+01\n4.6493856924589032e+00\n2.1201878098235620e+00\n-2.2164958905238539e+01\n1.0313058484085453e+00\n-1.4696078677272941e+00\n-2.0448789394660736e+01\n6.0053529284529548e+00\n5.3691362570638757e-01\n-2.3120000430893391e+01\n4.9315294527502260e+00\n2.9181420549168002e-01\n-2.1787713305644246e+01\n-2.6195341798895297e+00\n-1.1877446900635751e+00\n-2.1937109005232287e+01\n3.8311497579889369e+00\n3.3706360809770222e+00\n-2.2826814166218483e+01\n-3.6962402412650683e+00\n-7.2534829969223757e+00\n-2.2612359957963246e+01\n5.6039705728676834e+00\n-1.2296418045038063e-01\n-2.2279524029239546e+01\n4.9029091057805951e+00\n2.2338765205165747e+00\n-2.2581351169814063e+01\n5.0581085865185464e+00\n1.7830647412474840e+00\n-2.2423785502144234e+01\n2.2564226137492396e+00\n4.2634401603073513e-01\n-2.0228611280158336e+01\n4.3287356409886808e+00\n2.2825787644651281e+00\n-2.1969551306146641e+01\n6.0843791352363308e+00\n2.3392070744446043e+00\n-2.5520764320324094e+01\n1.9705423046840083e+00\n-1.6630140749258546e+00\n-2.0205926877767780e+01\n3.2689310755310581e+00\n-2.6181247622770027e+00\n-2.0060816936341705e+01\n6.8774320925506771e+00\n-2.2736342278824220e-01\n-2.3215593101219881e+01\n-1.7358814085294012e+00\n-1.6218099001639563e+00\n-2.1381881067216934e+01\n-5.5305927991702841e-01\n-1.0514881040562170e+00\n-2.0967716164096608e+01\n6.2428714023170819e+00\n-5.5549315676667921e-01\n-2.2752200647932554e+01\n1.4002251414481723e+00\n-2.6007713227748499e+00\n-2.0093351098235750e+01\n-8.4218015887475559e+00\n1.6572111764139454e+00\n-3.4837033737455833e+01\n4.8106009443384847e+00\n1.1579508535867347e+00\n-2.1734468665119429e+01\n4.9681457761207461e+00\n6.7875733240412761e-01\n-2.1803693589338881e+01\n6.5567811070236939e+00\n-1.3652653561089567e+00\n-2.1868337230297833e+01\n3.9640735540500209e+00\n-2.5209901798952288e+00\n-2.0256130072255321e+01\n9.1491656750220929e-01\n-2.6228534715882090e+00\n-2.0070637323298342e+01\n-2.9012217068822483e+00\n-1.2061384942326687e+00\n-2.1800091578049507e+01\n3.5820243637890861e+00\n1.9114667805738332e+00\n-2.1138075461314990e+01\n4.5100744299945292e+00\n1.5723807883905021e+00\n-2.1612368351202850e+01\n4.3102328902655724e+00\n1.9214759458771944e+00\n-2.1695296736190009e+01\n3.0160090639832666e+00\n-2.5206916232650016e+00\n-2.0266872407280847e+01\n5.5672454471553570e+00\n-1.8729376995841465e-01\n-2.2172485543152856e+01\n3.5820243637890861e+00\n1.9114667805738332e+00\n-2.1138075461314990e+01\n6.5987144603235803e+00\n-5.6689299457140008e-01\n-2.2762129747161218e+01\n5.0376652397177608e+00\n-2.0024772043195918e+00\n-2.0935852498723310e+01\n1.3436932990313448e+00\n-3.4188690648845417e+00\n-2.0190410537522599e+01\n2.3498245215448277e+00\n-3.1142716098083345e+00\n-1.9929380726282815e+01\n7.5755884469954415e-01\n-3.5043072471398007e-01\n-2.0420491219608671e+01\n-5.6946758855387480e-01\n-6.3354882856267880e-01\n-2.1341543841694413e+01\n4.4725479050171995e+00\n2.7647360955677797e-01\n-2.1258114447179075e+01\n3.0530359179290043e+00\n4.5843373118740388e-01\n-2.0435792957921002e+01\n1.2211218375976426e+01\n5.8156089636604982e+00\n-3.0647467000665085e+01\n7.4591002308680898e-01\n-1.3419534827554127e+00\n-2.0685777452471989e+01\n5.3004164389207080e+00\n-1.8613084549546304e+00\n-2.1062601993604062e+01\n-1.2265470450636929e+01\n-5.9588239578060715e+00\n-2.4283921812966998e+01\n6.9544472802923583e+00\n-3.5459205984598543e+00\n-2.4248091864086476e+01\n5.0470653970146655e+00\n-2.3945092162293289e+00\n-2.0395084382021224e+01\n1.8654495478783506e-02\n-1.2889420838096377e+00\n-2.0644878106843777e+01\n1.3148127296771424e+01\n2.2917307742272497e+00\n-3.1520156042887255e+01\n3.5844361318458007e+00\n2.6878405794073164e+00\n-2.1756252884861322e+01\n5.0778781458890352e+00\n-2.1322854654865049e+00\n-2.0752952790192904e+01\n7.0670370256714863e+00\n5.2313294086063522e-01\n-2.4197136057719355e+01\n3.6953012328447699e-01\n-1.1955294749541039e+00\n-2.0782081008175417e+01\n5.7146491022728130e+00\n-9.9852618028959034e-02\n-2.2347236824785693e+01\n7.2063188331151533e+00\n1.8682592596412717e+00\n-2.6080589109954271e+01\n2.4423549060800744e+00\n-2.5431193286830900e+00\n-2.0254548071282667e+01\n5.7565265146135127e+00\n-3.6226499279527236e+00\n-2.2861775338858997e+01\n2.2795325659880250e+00\n-1.6029990296751442e+00\n-2.0282893448578744e+01\n-1.6833588534264636e+00\n-1.8004762098493352e+00\n-2.1109008710605984e+01\n-1.1903413693724950e+01\n1.6950000588806613e+00\n-3.5021718766065206e+01\n4.9511673640683336e+00\n1.2953020186602606e+00\n-2.1941893757763793e+01\n4.4260446961584217e+00\n-3.3163125440394636e+00\n-2.1169860981956134e+01\n3.1430836973774321e+00\n9.0341808484349151e-01\n-2.0556351744479063e+01\n2.7984044254248932e+00\n-5.8485583462294388e-01\n-2.0411819108182435e+01\n-2.4870539453206195e+00\n1.7435077165826065e+00\n-2.4585378826866435e+01\n-4.4044829668281302e+00\n9.3753037514581656e+00\n-4.5393676117871230e+01\n3.9925784364398909e+00\n1.6120072449707865e+00\n-2.1276825043963242e+01\n1.6071854622444681e+00\n-3.5250021282583428e+00\n-2.0377854200881551e+01\n5.4662858129317082e-01\n-2.7138369948887333e+00\n-1.9948470010503023e+01\n1.3695891644112056e+01\n7.3982926118430103e-01\n-3.1133759644211459e+01\n1.3078320121115986e+01\n1.3122262631459556e+00\n-3.3899513449682971e+01\n3.9133100009234614e+00\n-1.0829394634064429e+00\n-2.1029316651740714e+01\n6.5021318406039024e+00\n-1.2654834797630750e+00\n-2.1899516817339823e+01\n4.0332241400294295e+00\n6.7533040023633639e-01\n-2.0877880173712491e+01\n1.2211218375976426e+01\n5.8156089636604982e+00\n-3.0647467000665085e+01\n5.1061546849380219e+00\n-6.4585761517908780e-01\n-2.1520695466768860e+01\n1.4032743549466822e+01\n6.5512308062350211e-01\n-2.9258716419682379e+01\n-5.6981365381193934e+00\n-7.2297168292388783e+00\n-2.2665209775258269e+01\n4.6908105287034445e+00\n7.9260406521243487e-01\n-2.1549089206783211e+01\n3.9393336435803867e+00\n-3.1257595001899201e+00\n-2.0518813616058754e+01\n-1.4748117992177783e+00\n1.2976981280086028e-01\n-2.2195808275567597e+01\n4.8335319551720977e+00\n1.0856479762032631e-01\n-2.1633648833807793e+01\n4.0748140004465094e+00\n2.3391605653988599e+00\n-2.1814967520114507e+01\n6.6974460576746813e+00\n-4.0624551889294458e-01\n-2.2932128771594808e+01\n4.0748140004465094e+00\n2.3391605653988599e+00\n-2.1814967520114507e+01\n-4.7476494598849373e+00\n-6.5904332264947456e+00\n-2.3569081528220483e+01\n-3.3741543310493469e+00\n2.3513812890181165e+00\n-2.6472739672536406e+01\n-4.6831755522777589e+00\n9.8580195114389308e+00\n-4.6044041547016541e+01\n-1.4190549484959142e-01\n-1.2389008089477753e+00\n-2.0729783743193924e+01\n4.0921167598864461e+00\n1.3410695151432117e+00\n-2.1185257756187720e+01\n2.6285549212772228e+00\n5.6383054488289952e-01\n-2.0375059505859479e+01\n2.3783915397001723e+00\n5.5000729111134650e-01\n-2.0321942116839931e+01\n3.7466266008003317e+00\n1.3985940536371759e+00\n-2.1037471868162992e+01\n1.6399063057928882e+00\n-2.5815766006662537e+00\n-2.0086549299495672e+01\n6.5831620501563455e+00\n-2.9702714788756461e+00\n-2.3726612624525220e+01\n6.7151789888046256e+00\n-2.2807581408609690e-01\n-2.3173269972386787e+01\n4.9347634191552556e+00\n3.7084684727569744e-01\n-2.1760050220042633e+01\n-1.2131181394485250e+01\n1.9787800884461380e+00\n-3.5576816032906173e+01\n-3.5911012684091792e-01\n-1.1092718373310351e+00\n-2.0901714907471131e+01\n6.6954883177190165e+00\n-9.8549578794518033e-02\n-2.3340640543645105e+01\n1.8023804559137147e+00\n-2.7507475593101072e+00\n-1.9850828535650564e+01\n5.2275485405721112e+00\n-1.6279161182522253e+00\n-2.1327771368859981e+01\n3.3464214014481217e+00\n5.6439311121170466e-01\n-2.0569059283680303e+01\n3.2446474145715682e+00\n-5.7293413920839628e-02\n-2.0484329494822671e+01\n7.3868671035928282e+00\n3.0036904133688530e-01\n-2.3979925604212877e+01\n4.9821645044010996e+00\n2.6653988529870132e-01\n-2.1777109575047540e+01\n6.4749934069701309e+00\n-1.2313905714737285e+00\n-2.1924555660594979e+01\n9.8607815071822891e-01\n1.7879942743277102e+00\n-2.0718835852919678e+01\n3.3104178577523515e+00\n-1.3870952501460301e+00\n-2.0651443647124573e+01\n3.2086756130235417e+00\n-5.7657212932842130e+00\n-2.1638385912529245e+01\n6.9751758397439845e-01\n-1.4768304679651032e+00\n-2.0407044054178613e+01\n4.8608611687271285e-02\n-2.5379638412567145e+00\n-2.0159124890374514e+01\n1.1878469651213361e+00\n6.9556071779582318e-01\n-2.0318882711963433e+01\n4.5800325719681005e+00\n2.8822459223536673e-01\n-2.1396938081540856e+01\n3.1332261970592827e+00\n-1.4145761659927782e+00\n-2.0559980313270103e+01\n-2.2765570299946269e-01\n-1.9607684398726202e+00\n-2.0781990071117292e+01\n3.9925784364398909e+00\n1.6120072449707865e+00\n-2.1276825043963242e+01\n-2.6435627831543211e+00\n2.1399267694623028e+00\n-2.5101355963676284e+01\n3.0777029687341568e+00\n-1.4389543306720038e+00\n-2.0449995367396589e+01\n7.9096806372407009e+00\n9.3256040036956538e+00\n-4.5395944737703282e+01\n1.2794147883530593e+01\n4.2325911489234436e+00\n-3.0032887894809036e+01\n1.2794147883530593e+01\n4.2325911489234436e+00\n-3.0032887894809036e+01\n2.7421956975013373e+00\n4.0214244348251080e+00\n-2.3356809005564642e+01\n2.6231269376538404e+00\n3.9952743524591394e+00\n-2.3432340915051999e+01\n1.9420190195671152e+00\n4.0119780919688601e+00\n-2.3634871574396367e+01\n1.9671040666683393e+00\n3.9594650213277358e+00\n-2.4005341606880176e+01\n1.2687608737637218e+01\n3.9658908291040600e+00\n-3.1248746440140792e+01\n1.6340113684929942e+00\n1.5997420361598731e+00\n-2.0469343115970695e+01\n1.3920916714546017e+01\n-3.4790393099072663e-02\n-3.1294321279087811e+01\n3.1343051962606703e+00\n6.3429406358111395e-01\n-2.0495329019330981e+01\n2.3375386043054505e+00\n4.2528207710698429e-01\n-2.0251904280213253e+01\n-1.2268890880555670e+01\n1.8886327641577090e+00\n-3.5238676895261193e+01\n2.6274067445569949e+00\n-2.0601143017620904e+00\n-2.0294126375693825e+01\n-1.6124478235725599e+00\n-1.7800887020668092e+00\n-2.1129893840625538e+01\n1.0572762839042200e+01\n-5.4552650398581450e+00\n-2.4896252130988820e+01\n1.0508309449715725e+01\n-6.4612004393293754e+00\n-2.3380225524748649e+01\n2.4939773839371666e+00\n4.0457628687918570e+00\n-2.3549226021840887e+01\n3.0226000067378909e+00\n3.7766624422631123e+00\n-2.3160233283031307e+01\n1.3327220673195039e+00\n3.7014572820164853e+00\n-2.3073877829910316e+01\n8.9649419725178348e-01\n3.7647259896100032e+00\n-2.3266581838212065e+01\n6.5984705721076518e+00\n3.0615911238638338e+00\n-2.7620858882107186e+01\n7.2418007768271924e+00\n1.7653461691234869e+00\n-2.6011636416067994e+01\n2.9437519793100648e+00\n1.5950288979036649e+00\n-2.0741135050242459e+01\n1.3762836868057676e+01\n1.0553372885311652e+00\n-3.0014589505828521e+01\n1.3063333944129136e+01\n1.3955662045236386e+00\n-3.3983604998945736e+01\n-7.2262500913229379e+00\n2.4419691326322415e+00\n-3.5974480104233116e+01\n1.4078812283258170e+01\n-3.0893992178013530e-01\n-3.1450308845299347e+01\n3.4592329590450484e+00\n-1.4747648520341228e+00\n-2.0538927218079824e+01\n-6.7632662657561637e-01\n-2.0375671497027104e+00\n-2.0763181990247645e+01\n1.1945249556443661e+01\n-4.5539030596615042e+00\n-2.6181685291770499e+01\n9.2399978375106215e+00\n-6.7969083010809506e+00\n-2.2969522393529015e+01\n-4.9407310507003324e+00\n-6.6294634506265249e+00\n-2.3445789338892823e+01\n1.7491230280987685e-01\n2.8727769083760131e+00\n-2.1898739127353782e+01\n1.4028331652301915e+01\n-7.3481103375196005e-02\n-3.0897681987070449e+01\n-5.1709142219482880e+00\n-6.6308862669970248e+00\n-2.3528160002825018e+01\n-5.0426750585118540e+00\n7.2629551179879019e+00\n-4.2820043070310042e+01\n1.3895465898654001e+01\n-2.1590436527657406e+00\n-2.9390092110245028e+01\n1.1416072409376767e+01\n-4.6302434182987691e+00\n-2.6013870464052932e+01\n1.3329464936850005e+01\n1.6812430735457005e+00\n-3.1643342664267472e+01\n-1.2856055022622612e+00\n1.7168094030732695e+00\n-2.2429673781288315e+01\n-2.8506125645244040e-01\n1.1816867079740587e+00\n-2.1100001612409649e+01\n2.3364236206449358e+00\n5.4384534152184888e-02\n-2.0319632429158631e+01\n1.0082876775744660e+00\n3.7055541534538246e+00\n-2.3159454291092111e+01\n2.6374138575752757e+00\n-8.5533467513098105e-01\n-2.0540762534016544e+01\n4.4115034399807005e+00\n-1.3636189838577908e+00\n-2.0885556862241621e+01\n-4.1302644263129924e+00\n-6.9373331276071095e+00\n-2.2984482815849603e+01\n-1.1076359627126482e+00\n5.9964113194337765e-01\n-2.1597838116464739e+01\n3.6971368603672090e+00\n1.5896824536812448e-01\n-2.1195980987342136e+01\n-1.1471120253837785e+01\n1.3116369114260658e+00\n-3.4435957635288574e+01\n-1.5722485005001049e+01\n1.1129227288893166e+01\n-3.9227556671440880e+01\n-1.4177999138180768e+01\n1.1688385773651445e+01\n-4.0578654144025045e+01\n-9.5924049130110678e+00\n-1.2494070106830035e+00\n-3.0929171008665769e+01\n-6.9891575069547844e+00\n2.8904413574169925e+00\n-3.6666137744729610e+01\n4.4382559348502959e-01\n-1.7526474870254598e+00\n-2.0376755989394294e+01\n1.4446783368847798e+01\n-1.3431635496960437e+00\n-3.0527874161417135e+01\n-3.1717570972124287e-01\n-6.4644429254609759e-01\n-2.1092423415620772e+01\n7.2520158304608939e-01\n-4.6853108417606004e-01\n-2.0465232914008880e+01\n1.2866530552873350e+01\n4.1139414794572486e+00\n-2.9659392358536167e+01\n2.0234339283521491e-01\n-9.0049491205548804e-01\n-2.0789599754044126e+01\n7.6332211176051171e-02\n2.3968256512198596e-01\n-2.0685482755454668e+01\n-4.9378035351149213e-01\n-7.6012150791482980e-01\n-2.1234438737151436e+01\n1.3503698366244986e+01\n1.6216432046205700e+00\n-3.0671809905149857e+01\n1.2269291155304700e+01\n6.4263981534001324e+00\n-2.9574871081642968e+01\n1.3945696636131593e+01\n8.4630447140465801e+00\n-3.7207870345390219e+01\n1.3610091525624284e+01\n1.1178867483691894e+00\n-3.1040045049189438e+01\n5.8516939208341856e-01\n1.0723660286523697e+00\n-2.0606581699957516e+01\n1.3792349723977940e+01\n1.0159456402316460e+00\n-3.0539625938423001e+01\n-1.1884332437641201e+00\n1.7716973795981691e+01\n-4.6925794623877955e+01\n6.3569845274324566e-01\n1.1382639355050536e+01\n-4.8086480390785525e+01\n-2.1772171049430264e+00\n6.4819818555961168e+00\n-4.1439428054164225e+01\n-5.3011511204841044e+00\n6.6305670710867748e+00\n-4.1693075903226884e+01\n-5.1099891991508848e+00\n6.2971107205917001e+00\n-4.1190285233266145e+01\n1.1187248004857444e+00\n1.8025076882641786e+00\n-2.0694540585088138e+01\n-3.6738843576576206e+00\n1.7322414373384742e+01\n-4.4741516969442465e+01\n1.1631016657030520e+01\n2.2058047311632134e+01\n-5.4865661923372386e+01\n2.0196644226328893e+00\n1.7067916179921443e+00\n-2.0556838990532501e+01\n-2.2472348005599558e+00\n6.8838559155323100e+00\n-4.2034202548502130e+01\n-6.9572260918772741e+00\n1.3592237759888638e+01\n-4.6429108818920035e+01\n-6.8630739974202930e+00\n8.0323519120525102e+00\n-4.3604986207162618e+01\n-1.3505675184255936e+00\n1.7435719463047283e-01\n-2.2023826584404571e+01\n7.6831886001384941e-01\n-4.1508452981076145e-02\n-2.0388990339072812e+01\n5.2236600038177106e-01\n1.6149725509541778e+01\n-5.1276263850245243e+01\n1.8458521946448641e+00\n9.3867783420455431e-01\n-2.0262293046756191e+01\n-2.2857865115948289e-01\n1.5416039977517539e+00\n-2.1201874666608514e+01\n-4.6992247004602943e+00\n6.4305839232304374e+00\n-4.1282494397276679e+01\n-9.8931170365346555e-01\n-3.8712037479904739e-02\n-2.1546462713492257e+01\n-1.4756347046582237e+01\n6.8814433277477054e+00\n-4.2051921937140392e+01\n-2.1300738641498079e+01\n1.2266607514420318e+00\n-3.4444329309074554e+01\n-2.1480891774548223e+01\n1.0167398950628916e+00\n-3.4541086864847465e+01\n-1.3397101524491712e+01\n5.0393319192285615e+00\n-3.9676253961853412e+01\n1.9476867939238593e+00\n4.7407284345998335e-01\n-2.0222112802936714e+01\n2.5105400482203971e-02\n2.9762098626941089e+00\n-2.2137047973836076e+01\n-1.6561003845252258e+00\n9.6205916945611509e+00\n-4.5431461005939632e+01\n-2.6139867131657804e+00\n3.3317440239884375e+00\n-2.7734701151960795e+01\n8.1836461614070655e-01\n4.0499396624819134e-01\n-2.0359334539223948e+01\n6.1206680948450320e-01\n6.2944679300794704e-01\n-2.0491409089131999e+01\n3.5975123617532528e-01\n-3.3390166629194801e-01\n-2.0595894897352096e+01\n7.6831886001384941e-01\n-4.1508452981076145e-02\n-2.0388990339072812e+01\n-8.1114080892149385e+00\n1.4021094295894812e+01\n-4.4450650400999649e+01\n-1.4513533476721496e-01\n-6.5658644876095282e-02\n-2.0907503224545270e+01\n-6.1946474050048570e+00\n7.6463153287194991e+00\n-4.2934477001859634e+01\n-6.1946474050048570e+00\n7.6463153287194991e+00\n-4.2934477001859634e+01\n2.4661157409239420e+00\n3.3937599230978366e-01\n-2.0255445180829977e+01\n2.7869896528104543e+00\n4.9099899165203242e-02\n-2.0324145546966683e+01\n1.3187731330300665e+00\n-7.1913071778254434e-01\n-2.0357638072336037e+01\n1.0025059171938702e+01\n2.0141268476591137e+01\n-5.6645353443505243e+01\n-3.8933322745355659e+00\n1.4665705856851352e+00\n-2.5392232496365619e+01\n-8.3021700517869712e-01\n1.4953376674968675e+00\n-2.1658357822240774e+01\n2.5935456746633956e+00\n-1.1457801927354403e+00\n-2.0612376669547029e+01\n1.6600726490371926e+01\n2.2460841858839146e+01\n-5.9766842462672621e+01\n1.4419377857080865e-01\n-1.0518261157798698e+00\n-2.0899272025214405e+01\n-9.8797673541075670e-01\n1.9173039086380803e+00\n-2.2069710952531974e+01\n2.3897540009266409e+00\n-1.2969150624304907e-01\n-2.0213564813018522e+01\n2.6760767903969955e+00\n-6.3595406650322295e-01\n-2.0445301166738858e+01\n-7.9850298786178109e-01\n-5.6930109920837502e-01\n-2.1474382873880923e+01\n1.4121816060484326e+01\n2.9081340954458323e-01\n-2.9169504356958665e+01\n-2.3566536592892677e+00\n1.7415692312250304e+01\n-4.5779483222791796e+01\n-2.6064412411420528e+00\n1.6994200232280017e+00\n-2.4490047494939649e+01\n5.9467335681615729e-01\n-1.3998287392910524e+00\n-2.0567595829641238e+01\n1.7081859633960941e+00\n1.7748875757821954e+00\n-2.0640399462164108e+01\n1.0922393366233512e+01\n-6.4864527738713500e+00\n-2.3388660742460409e+01\n-3.0536927435729377e+00\n1.7340669519696867e+01\n-4.5324636971110145e+01\n1.5924629281619740e+00\n1.8136781795393002e+00\n-2.0666321354166612e+01\n3.3107990014267634e+00\n2.5752005474879885e-01\n-2.0592060081470251e+01\n4.5709627787159119e+00\n-9.7736036971381868e-01\n-2.1124674015898357e+01\n-4.2697937352517199e+00\n1.3999923877199890e+01\n-4.9360415198577883e+01\n-4.2594829897218851e+00\n1.1015817806772892e+01\n-4.7704554182725914e+01\n9.7265101030541923e-01\n-1.5478681078317766e-01\n-2.0369237666026166e+01\n3.2871753934332806e+00\n3.4902247775490558e-01\n-2.0582332024506808e+01\n2.4472029343834785e+00\n-2.2985782409373573e-01\n-2.0301350459444603e+01\n1.2819955224588767e+01\n4.0692481177078639e+00\n-3.0773495476165291e+01\n1.3355400249406673e+01\n2.7585263393278425e+00\n-3.0005601540543239e+01\n1.4062116902744924e+01\n6.2256724202113711e-01\n-2.9178465502386004e+01\n3.6901764980444507e-02\n-3.4628745947981848e-01\n-2.0749591958001449e+01\n5.2457132464422240e-01\n-1.2483111019080948e+00\n-2.0708441353041831e+01\n-1.5743094616210440e+00\n-1.6682707015354972e+00\n-2.1263121710078867e+01\n1.2774355624798819e+00\n-1.4994331075852529e+00\n-2.0445774017269024e+01\n1.2970332452232217e+01\n3.4059446761016878e+00\n-3.0802356648816961e+01\n3.2943938834470994e+00\n-7.3585427157604855e-01\n-2.0708901477844659e+01\n-2.7050318582114130e+00\n-1.3854994931293207e+00\n-2.1629069488171634e+01\n1.2259463050222228e+01\n5.7011026098102651e+00\n-3.0658410591449197e+01\n2.9935915023345379e+00\n-4.6154993241479897e-01\n-2.0450266771379134e+01\n1.3181664200422455e-01\n1.7380941864128630e+00\n-2.1122521179552656e+01\n1.2565127620271104e+01\n5.2653971921044578e+00\n-2.9591261987068648e+01\n2.4213646295966784e+00\n-2.8385723146049942e+00\n-1.9829267743723758e+01\n-1.4569910516718091e+01\n1.1238433853193811e+01\n-4.2867987635041182e+01\n-1.7122883131033024e+01\n1.1322125031624568e+01\n-3.7511983343603880e+01\n-1.7138899178437427e+01\n1.1392660707282714e+01\n-3.8095595968764329e+01\n-1.5188394186462498e+01\n1.1206210703976524e+01\n-4.2626205896007498e+01\n-4.0752397702894783e+00\n1.4564577674226142e+00\n-2.5404186027161174e+01\n7.8857313563971427e+00\n1.3254660529796812e+01\n-5.0669833900330893e+01\n7.5656403140676423e+00\n1.2836152341105594e+01\n-5.0116416002561046e+01\n8.7068095788523650e+00\n6.8564905277628609e+00\n-4.1896184473493371e+01\n3.5128146889607259e+00\n1.5100877148189027e+00\n-2.0950054249285511e+01\n3.5128146889607259e+00\n1.5100877148189027e+00\n-2.0950054249285511e+01\n4.0474979096261654e+00\n1.2699673745873898e+00\n-2.1105574056235589e+01\n3.5935456367442868e+00\n7.9179331878459380e-01\n-2.0728479393088875e+01\n3.2599590371178797e+00\n4.9216982212071902e-01\n-2.0536476776493544e+01\n4.4922603120029443e+00\n2.0625986395096704e-01\n-2.1296578829158658e+01\n2.9394247001512128e+00\n-1.5248824503447084e-01\n-2.0428612899213707e+01\n2.8075061149128682e+00\n-6.8809477794808027e-01\n-2.0490261294204331e+01\n6.8922219261037467e+00\n1.0427559425074423e-01\n-2.3656199234899592e+01\n-1.4233159047754633e+00\n-1.9514698108958415e+00\n-2.0957586670162556e+01\n4.3914309799900773e+00\n-1.2459949942091331e+00\n-2.0839409736716121e+01\n5.3017022697528429e+00\n-1.6968602225142941e+00\n-2.1258200444470358e+01\n-3.5972587107917731e+00\n-7.9666694398505742e+00\n-2.1639079230479158e+01\n-3.7776080027613776e+00\n-8.1843749602287357e+00\n-2.1346400673827468e+01\n1.3526824370236719e+01\n8.9489355431529738e+00\n-3.9218242749739112e+01\n1.0340026287149938e+01\n-3.4674145922223047e+00\n-2.7774286378223099e+01\n1.7323573332256361e+00\n1.7773617761044240e+00\n-2.0623838978558361e+01\n6.0539856046263321e+00\n-9.9618990904629490e-01\n-2.2216673528866863e+01\n6.5295098650630328e+00\n-1.1673056094978411e+00\n-2.1958587295416237e+01\n2.9247939680070130e+00\n1.3562394843594927e+00\n-2.0611424889953476e+01\n2.9581246655192635e+00\n1.1634749431084992e+00\n-2.0523436371113540e+01\n2.7802351707552346e+00\n8.9731147260699440e-01\n-2.0463463802389366e+01\n2.5899728557928428e+00\n1.9426467056035963e+00\n-2.0778462397491246e+01\n4.6145108750416153e+00\n1.3307143970642921e+00\n-2.1641160749481731e+01\n1.4673583315317420e+00\n-6.7291599903706867e-01\n-2.0364587684153626e+01\n1.0541036965222534e+00\n1.7899376705307293e+00\n-2.0697152213112027e+01\n3.1751799931221725e+00\n2.6821364566190559e-01\n-2.0461629498993148e+01\n2.8905263164174628e+00\n8.4090994329053004e-01\n-2.0394571602229050e+01\n3.9456837009951955e+00\n8.2461512585909602e-01\n-2.0957840224215161e+01\n1.9235375193433426e+00\n3.0172214399502323e-01\n-2.0229423070706861e+01\n1.5014300209615532e+00\n-3.3504168768765269e-01\n-2.0266306747827787e+01\n4.1680142510946583e-01\n-1.1405672593326079e+00\n-2.0771694768513889e+01\n-4.6012591094728759e+00\n9.0431606262834983e+00\n-4.4928505161397084e+01\n5.2495375896516094e-01\n-1.7819019149079363e-01\n-2.0470931250659721e+01\n-1.4472572761548383e+01\n5.1126803194840917e+00\n-3.9650770365428514e+01\n-1.0486382535004988e+00\n-2.1409227831138673e+00\n-2.0628208531492007e+01\n-6.4266715460134649e-01\n-2.2610345234051050e+00\n-2.0476044781854508e+01\n-3.3436122460793567e+00\n-2.7014679999069802e-01\n-2.2932915265786182e+01\n-9.0898607642518261e+00\n2.4921454497038846e+00\n-3.6038983533744371e+01\n-1.3103683894440426e+01\n-8.5672023287917192e+00\n-2.0688090055003840e+01\n-7.5349146315005520e+00\n1.5143240646161393e+00\n-3.4497743846917857e+01\n-1.3861423317563897e+01\n5.1393994110778971e+00\n-3.9781325737237069e+01\n-9.1325566920914572e+00\n2.6363712614530725e+00\n-3.6231663649575822e+01\n-1.3151385808415927e+01\n-7.2712340840776397e+00\n-2.2545413297024961e+01\n3.9960047836876660e+00\n1.3747927635331618e+00\n-2.1160576477049919e+01\n2.9504467264964309e+00\n1.9569724415140264e+01\n-4.8599303937376249e+01\n2.7758325903171142e+00\n-1.0286532086977640e-01\n-2.0399873878643003e+01\n-1.6524406901423060e+01\n9.6625350589133863e+00\n-4.1821922401183727e+01\n3.0415297855027226e+00\n1.9669105513647441e+01\n-4.8636489293514686e+01\n4.8271527618724424e+00\n-2.0880136703751213e+00\n-2.0785681031948435e+01\n9.8441825085549384e-01\n-2.7526868743721553e+00\n-1.9827335555090261e+01\n-7.6011433879118844e+00\n1.5667263354549657e+01\n-4.2585830916155494e+01\n-3.8267922847895375e+00\n8.0732210966698208e+00\n-4.3567870692044835e+01\n1.4673583315317420e+00\n-6.7291599903706867e-01\n-2.0364587684153626e+01\n-1.7683604385648684e+00\n-8.0611655599942029e+00\n-2.1460824117587016e+01\n2.0798657575453374e+00\n2.0237598638716914e+01\n-4.7157835554599416e+01\n-1.6114080199439504e+00\n-1.1245829427386331e+00\n-2.1583358904368289e+01\n6.9508927224951633e-01\n1.2309414171409796e+00\n-2.0568980531617918e+01\n1.3597354380333138e+01\n3.3317405204424289e-01\n-3.2444466349697123e+01\n-4.8836841968830056e+00\n-7.2329907453632734e+00\n-2.2651365997237189e+01\n-1.8828328369632594e+00\n-8.5935975057540475e+00\n-2.0640108054079189e+01\n1.0610483603474128e+01\n2.0169941172052564e+01\n-5.7034863718673755e+01\n1.0061247816487581e+01\n1.9956100533045493e+01\n-5.7113557071982250e+01\n-2.8972749593213312e+00\n1.7450997415677712e+01\n-4.5361978657642787e+01\n-3.8637386413202925e+00\n1.7062408870257372e+01\n-4.4696751193066603e+01\n1.3418128544185167e+01\n9.4796215504078383e+00\n-3.9041592884612669e+01\n2.7097395250664849e+00\n5.3829356184887067e-01\n-2.0257115378634897e+01\n6.9090866893452352e-01\n-3.6617621236963721e-01\n-2.0486516829874805e+01\n-2.1409214584201215e+00\n-8.4351754752178500e+00\n-2.0949421717221774e+01\n3.2015974115959245e+00\n1.9377624955235529e+01\n-4.9230247836063640e+01\n-9.8501700443195328e-01\n1.8120576697022351e+01\n-4.7037831668741305e+01\n-9.8501700443195328e-01\n1.8120576697022351e+01\n-4.7037831668741305e+01\n8.6928178002715786e+00\n1.8811560031470510e+01\n-5.6396555577503271e+01\n1.3882365291486959e+01\n1.4102930526518588e+01\n-5.1889351423792782e+01\n6.4899988281955707e+00\n-1.1543469861621827e+00\n-2.2034216218757461e+01\n-4.8817334506566723e-01\n-1.0423758641356928e+00\n-2.0943882970638217e+01\n3.0003996021868469e+00\n1.0131843743450109e+01\n-4.6460809737190864e+01\n1.7343793179652476e+00\n8.4598461577036073e+00\n-4.4220524571832229e+01\n-1.2306976051718008e+00\n5.4339072205879801e-01\n-2.1915390935633930e+01\n-1.5672601637822432e+00\n-4.4838631805322615e-01\n-2.1766956759830496e+01\n-1.3890969807596488e+01\n-6.0614853405191091e+00\n-2.4304847790598398e+01\n4.3377532372845531e+00\n1.8645720453238667e+01\n-5.1721040950154148e+01\n-2.7954241757105884e+00\n1.7713382245054152e+01\n-4.5182332542578436e+01\n-8.3443863842715018e+00\n1.4441106242541561e+01\n-4.3437246783742886e+01\n1.2517322187604805e+01\n-4.2629823120142216e+00\n-2.6478985414832053e+01\n1.2403548944585848e+01\n-4.1515758522289312e+00\n-2.6807891331241734e+01\n-7.6059530483466267e+00\n1.5642393782332258e+01\n-4.2281312191895772e+01\n-9.6511105728197002e+00\n3.2143966457490332e+00\n-3.7034217828081395e+01\n3.1309580611551087e+00\n5.2610035590101589e-01\n-2.0464965436843066e+01\n-1.1025435119567764e+01\n1.1186071969790179e+00\n-3.4184006082766984e+01\n8.5803169204355303e+00\n1.7184510749327018e+01\n-5.6011788640708545e+01\n1.3271882228092290e+01\n9.8477021228524162e+00\n-3.9758218237869819e+01\n1.1618717418119155e+00\n2.1801685350577724e+00\n-2.1152906453578698e+01\n-5.3358912628025401e-01\n2.4577029375838362e+00\n-2.2052570045336513e+01\n1.4227103158055943e+00\n1.7233607586226685e+00\n-2.0615923680119405e+01\n1.4227103158055943e+00\n1.7233607586226685e+00\n-2.0615923680119405e+01\n1.9343948142702390e+00\n1.5719324151298069e+00\n-2.0537473608369734e+01\n4.2398565617359001e+00\n5.9862399274736100e-01\n-2.1104844706862497e+01\n1.3517034511406310e+01\n5.4901205493967820e-01\n-3.2664572327907187e+01\n2.6397878588773818e+00\n7.1501021881425086e-01\n-2.0338329587613085e+01\n1.3597354380333138e+01\n3.3317405204424289e-01\n-3.2444466349697123e+01\n1.3864683371437185e+00\n7.1188541887860024e-01\n-2.0286005108593628e+01\n4.5738590614811745e+00\n1.7018019650801783e-01\n-2.1364577651801952e+01\n1.3039928237950365e+01\n6.2176788383513343e-02\n-3.2547901480511491e+01\n5.3313042449875008e+00\n-3.7352928692783655e-01\n-2.1895117307526778e+01\n2.1411821783611305e+00\n-2.3373567503780831e-02\n-2.0211119980137553e+01\n6.4785953372010763e+00\n-1.0811486374677608e+00\n-2.2075595959305932e+01\n5.4975881897177752e+00\n-1.2033955204519733e+00\n-2.1882423642102705e+01\n-2.4525501739312738e+00\n7.7595916725399527e-01\n-2.3307948872262919e+01\n2.6145588235970947e+00\n-1.0227955676026492e+00\n-2.0555954839635998e+01\n2.1554179111335587e+00\n-9.4868297878841779e-01\n-2.0463733558885153e+01\n-2.0972883586577740e+00\n2.6757874589347747e-01\n-2.2654084889524714e+01\n-2.0972883586577740e+00\n2.6757874589347747e-01\n-2.2654084889524714e+01\n1.3444757871612050e+00\n-1.1130041694515276e+00\n-2.0529786755944439e+01\n-1.1330974627277148e+00\n-6.0961160399631897e-01\n-2.1539275399680410e+01\n1.1692754940039679e-01\n-9.9502585029440671e-01\n-2.0898505636173624e+01\n-2.7530103038954081e+00\n-1.1643562270758816e+00\n-2.1861728090372125e+01\n-1.5312275539936118e+00\n-1.5647370758220713e+00\n-2.1398595424777842e+01\n-1.6858062891659751e+00\n-1.7373088126309055e+00\n-2.1164827393958589e+01\n-1.0735420236694029e+00\n-2.3564863459971450e+00\n-2.0318292797416703e+01\n9.1950394416793746e-01\n-2.9972014855124112e+00\n-1.9575410640846492e+01\n1.3194455158514998e+01\n3.3890643453712745e+00\n-2.9271787509027433e+01\n1.3838818227429634e+01\n1.8459937930780490e-02\n-3.1258488511964245e+01\n1.4311239168291937e+01\n-5.0952156036178164e-01\n-2.9124795546801764e+01\n1.3458807390426296e+01\n2.6074965792072902e-01\n-3.2653472992109123e+01\n2.8296426411410303e+00\n1.4332643209455270e-01\n-2.0357196890050876e+01\n5.5072480062600038e+00\n-1.4168552205260878e+00\n-2.1565342098790090e+01\n-1.1027531454089738e+00\n-1.0349963835901321e+00\n-2.1038793413419995e+01\n4.5210306794050963e+00\n-3.3300946708602464e+00\n-2.1247397832185467e+01\n-1.9150292779206064e+00\n-1.7340122875344841e+00\n-2.1192975293533632e+01\n1.2284470631692407e+01\n5.9422454233369084e+00\n-3.0267305016999192e+01\n1.3266429564824341e+01\n2.6702279250542444e+00\n-3.0604407344616856e+01\n1.3467987579269840e+01\n1.2040728213383707e+00\n-3.1799559792775607e+01\n1.3789362292829438e+01\n-4.8884723189715172e-02\n-3.1956384106948878e+01\n1.3885980307041612e+00\n-3.5619352878175881e-01\n-2.0311327060604430e+01\n-2.5518154715268468e+00\n-1.5537523104691444e+00\n-2.1482235584843167e+01\n3.3218462385148242e+00\n-8.1351650085005591e+00\n-2.1481084170527794e+01\n1.3090706279687927e+01\n2.5407447752542440e+00\n-3.1615864011815273e+01\n1.3204321091340681e+01\n2.0671487279637946e+00\n-3.1991991780930327e+01\n-1.5904332934491858e+00\n-2.5134868665474530e-01\n-2.1915315749017015e+01\n-1.2479510702913965e+00\n-3.5240352548949805e-01\n-2.1803866433726331e+01\n-3.0711857470235043e-01\n-1.2441560178389315e+00\n-2.0737980354226082e+01\n-2.0077934618472106e+00\n-1.1966811900128880e+00\n-2.1885825312085192e+01\n1.1043765388993725e+01\n-5.9669879603784093e+00\n-2.4090608627455683e+01\n9.3059750548499949e+00\n-5.9744709846489759e+00\n-2.4242111604920009e+01\n1.3992278809234451e+01\n8.4689370911360875e+00\n-3.7188541836781418e+01\n3.2273351736285472e-01\n-1.3853765334300991e+00\n-2.0541007134520733e+01\n1.0640075401449169e+01\n-5.0412384149055374e+00\n-2.5630974570664556e+01\n9.5095845607657967e+00\n-6.3963878512278844e+00\n-2.3596060877928245e+01\n1.0360149463426254e+00\n-1.2553662606124254e+00\n-2.0641372848812161e+01\n-3.3413391474371873e-01\n-2.5266454527436246e+00\n-2.0073523602902863e+01\n-3.1862239300992670e+00\n1.7222644572407777e+01\n-4.5360505828683969e+01\n9.0619567519613256e+00\n2.0137239748606206e+01\n-5.4398809705958335e+01\n1.4576969150049848e+01\n2.1306496978785937e+01\n-5.9939953445360104e+01\n2.6889352928266201e+00\n1.9227143723747474e+01\n-4.9099835706919407e+01\n1.4162053238573245e+01\n2.3386211762418622e+01\n-5.5294627779384996e+01\n-7.1896128051006505e+00\n-2.1178961147313866e+00\n-2.9737753112062105e+01\n1.3001803550730447e+01\n2.3637770199164017e+00\n-3.2484486282444891e+01\n2.1210695913591153e+00\n6.0689910238313471e-01\n-2.0195799653886723e+01\n-9.4609998325442746e-01\n-1.6402100999091878e+00\n-2.1080382383286306e+01\n1.3178199208517938e+01\n1.5745366835858843e+00\n-3.2730047923077599e+01\n1.3515664672005354e+01\n6.3358281031539543e-01\n-3.3159071869152754e+01\n-1.3867712447742935e+01\n9.0561054065561439e+00\n-4.5119452957633470e+01\n1.3532192584085371e+01\n4.3676885126897669e-01\n-3.2963645042765982e+01\n-1.1383685994695306e+01\n1.3396130669703681e+00\n-3.4467744354433933e+01\n-3.6500004804526665e+00\n-7.6725717325930294e+00\n-2.2045946835516791e+01\n-4.1215472629830927e+00\n-8.0203227381327462e+00\n-2.1550006907993115e+01\n1.3796256067828933e+01\n1.0785450382543762e+00\n-2.9840664472145900e+01\n1.3747530433819469e+01\n6.3944422841228221e-01\n-3.1075409771299022e+01\n1.4566163313169801e+01\n-1.6769498689134146e+00\n-2.9883522595984925e+01\n-6.0856539721338587e-01\n-8.0051057740812970e-01\n-2.1305433994946874e+01\n1.2860967363808825e+01\n-4.8754825051425685e+00\n-2.5628252185557283e+01\n-3.8387086674669728e+00\n-7.9585552090462999e+00\n-2.1594246826324056e+01\n1.3902925068608404e+01\n8.8238548999127762e+00\n-3.7059870798300437e+01\n1.3401737749690481e+01\n2.3252338685731533e+00\n-2.9570874176860869e+01\n1.1807804185271408e+01\n-5.0765952749071195e+00\n-2.5179657420981162e+01\n-3.1784495273014253e-02\n-1.7176743360136365e-01\n-2.0719291312008444e+01\n1.3295673931202414e+01\n1.0007531138580935e+01\n-3.8800670963793529e+01\n2.8521546299338723e+00\n4.1943561659907175e-01\n-2.0361700757077166e+01\n4.3435020053446299e-01\n1.7071846811830582e+00\n-2.0887151768647740e+01\n2.3117771810515744e-01\n6.1123830771190302e-01\n-2.0611695244577721e+01\n9.5090538317684210e+00\n-5.3091471215746644e+00\n-2.5271507075286930e+01\n-9.0105456994444844e-01\n-1.9130396233469866e+00\n-2.0978763157472091e+01\n1.4145845908147379e+01\n7.7621619477504726e+00\n-3.7300424273652681e+01\n1.3305094641360125e+01\n9.3053517564977462e-01\n-3.3079930081879098e+01\n1.4567314128038271e+01\n-1.5462512248362130e+00\n-2.9703678922826757e+01\n-3.1741644671473368e-01\n-5.7131986848949967e-01\n-2.1058772894856144e+01\n1.1049612991388797e+00\n-1.1436849051917604e+00\n-2.0586779180384823e+01\n1.4168127837373947e+00\n-5.8417140316865002e-01\n-2.0314814337276513e+01\n1.3327796746569266e+01\n1.0594544386465115e+00\n-3.2797516401963847e+01\n8.3179937270995126e+00\n2.1220055542936205e+01\n-5.2590123270895056e+01\n6.0820972409379537e-01\n1.9093691213366345e+01\n-4.6560740066997482e+01\n1.1206342402070000e+01\n2.3497904930564900e+01\n-5.2326929734118586e+01\n1.0520174717922961e+01\n2.0955447282330770e+01\n-5.5688921453720326e+01\n1.3144178848704966e+01\n1.0058829557454050e+01\n-4.0386892987562817e+01\n1.3645231961046186e+01\n1.4146444646852980e+00\n-3.0199354290207733e+01\n4.3160954660141284e+00\n1.2000324321463678e+00\n-2.1333171947461182e+01\n2.7996882949745951e+00\n7.9086193112677317e-01\n-2.0415450936822580e+01\n6.4005669011397293e-01\n2.5753855436732997e-01\n-2.0412766424271400e+01\n2.4457224239655639e+00\n-6.3547530310306222e-01\n-2.0377281744616205e+01\n4.4736876649784953e+00\n-1.1150732169171691e+00\n-2.0957613625411767e+01\n-3.2152779287008570e+00\n-6.3037924697306635e-01\n-2.2557617026465984e+01\n1.0302123892829158e+01\n2.0797231692705410e+01\n-5.5748612935977903e+01\n1.3692474758280687e+01\n8.9073989592569855e+00\n-3.7938668133235915e+01\n-3.7984502343723054e+00\n1.4289557270664620e+01\n-4.8319935420206463e+01\n3.0236144550761588e+00\n8.5887301953688444e-01\n-2.0499807547490825e+01\n1.3665366818955063e+01\n2.2347594156436043e-01\n-3.2413995056233077e+01\n1.9920001139637697e-01\n9.4114761201824781e-01\n-2.0783677965541582e+01\n2.8169387159881425e+00\n2.7093803060200045e-01\n-2.0315884237168891e+01\n3.9022357702514450e+00\n-1.6280718539716539e+00\n-2.0701566670730305e+01\n5.0094372792914510e-01\n-2.8085931905315515e+00\n-1.9829278005205797e+01\n1.5087777621871739e+01\n2.1730413453894261e+01\n-5.9635576159735230e+01\n2.8652479024391417e+00\n3.7221299912659704e+00\n-2.3374627246376853e+01\n3.2769873246167234e+00\n3.4881854196377842e+00\n-2.2918363713769846e+01\n4.4997500607538292e+00\n6.7032731225114872e-01\n-2.1316246299891876e+01\n6.7793544904019221e-01\n7.1241579413505229e-01\n-2.0445597893908445e+01\n-1.5319628257546769e-01\n7.0426561296425461e-01\n-2.0877127455983043e+01\n1.3885980307041612e+00\n-3.5619352878175881e-01\n-2.0311327060604430e+01\n1.4645610390365801e+01\n2.3698910635311840e+01\n-5.5815694798585113e+01\n5.0997269765820556e+00\n1.9324836194474440e+01\n-4.8753074300172102e+01\n3.4875493133058844e+00\n2.7393330883945994e+00\n-2.1703874795039503e+01\n1.3006182578353858e+01\n2.6049500099070637e+00\n-3.2148086786648321e+01\n1.3199116105731147e+01\n1.2847928890623446e+00\n-3.2543251132684397e+01\n1.3147276456679458e+01\n1.0537858982004400e+01\n-3.9382431644687976e+01\n-1.7565728939475460e+00\n1.2103478869400655e+00\n-2.2780163703968711e+01\n1.7464579526478508e+00\n2.5764545391642753e-02\n-2.0156206535915494e+01\n-4.0359378533374652e+00\n1.5950095724434870e+01\n-4.6164519187505128e+01\n1.3792930305601054e+01\n8.6575389803600853e+00\n-3.7837957700858851e+01\n1.2540928214714382e+01\n4.0162733251895206e+00\n-3.2475603753600602e+01\n1.4086898396545211e+00\n-1.4045626921654488e+00\n-2.0663605758065316e+01\n-4.4077617040661599e+00\n-7.9470147391240449e+00\n-2.1715786058407438e+01\n1.4701108355088512e+00\n1.2665465334743402e+00\n-2.0463871867218611e+01\n1.3446631799352440e+01\n1.9748365078861583e+00\n-3.0054017154668362e+01\n1.1558779002185624e+00\n1.2607699581506024e+00\n-2.0448995338556916e+01\n7.2429534199745049e-01\n-1.2192550358979763e+00\n-2.0746786022286322e+01\n8.0637990941484483e-01\n-6.0205177496164664e-01\n-2.0354369268819489e+01\n8.2384220347263448e-01\n-1.2991036149425357e+00\n-2.0665722055600160e+01\n5.8250476783637861e-01\n-1.9410581071900572e+00\n-2.0488521829757691e+01\n1.2866530552873350e+01\n4.1139414794572486e+00\n-2.9659392358536167e+01\n1.0468430425147503e+01\n2.0239827495854851e+01\n-5.6927111165864623e+01\n-7.5314259786783495e+00\n1.5766120028291274e+01\n-4.2586060677667106e+01\n1.2586890096020738e+01\n4.5747257397617753e+00\n-3.0673635646157670e+01\n1.1925424013814251e-01\n9.9290631638168469e-01\n-2.0747203637960475e+01\n1.3064734896156742e+00\n4.5659519991152059e-01\n-2.0247690409121507e+01\n1.4630845418106594e+01\n-1.7592292225405921e+00\n-2.9845803047615739e+01\n1.7400592055664269e+01\n2.3054963572611417e+01\n-6.1275300740349088e+01\n-4.7997999391344998e-01\n-1.7186571843032175e-01\n-2.1063215977344782e+01\n-4.8553468720581422e-01\n-8.7888948511226728e-01\n-2.1163054474228161e+01\n-4.7716996729480101e+00\n6.1675637135057251e+00\n-4.1171636746995453e+01\n1.4388766684583855e+01\n-5.4209601309096023e-01\n-2.9354423200034116e+01\n2.1626526614924768e-01\n-1.1532336079709842e+00\n-2.0796271043478299e+01\n1.2956746466016551e+00\n-8.4383943748447212e+00\n-2.0922847090273873e+01\n2.8701396492619619e-01\n-1.0804084998468368e+00\n-2.0785006013859338e+01\n1.1337175075303638e+00\n-8.2930714582259810e+00\n-2.1133719208303113e+01\n1.6967134723063928e+01\n2.2213773893726810e+01\n-6.2464951672803465e+01\n1.6667487875475320e+01\n2.1515913391182384e+01\n-6.1611371173791781e+01\n-4.3619264411510955e-02\n2.2295447889349420e+00\n-2.1537045569232845e+01\n3.8570027481960265e+00\n-1.2615165299598459e+00\n-2.0848762974438159e+01\n2.9233437585233797e+00\n-2.7487338313832059e+00\n-1.9921291821972499e+01\n-2.1447112258650942e+00\n3.1421121098784938e-01\n-2.2714925563644076e+01\n2.1915769313671274e+00\n9.4947101669498157e-02\n-2.0248720855009608e+01\n1.0251022824235128e+00\n3.3622405030195818e-01\n-2.0333401582665196e+01\n8.1836461614070655e-01\n4.0499396624819134e-01\n-2.0359334539223948e+01\n9.4663918691246032e+00\n-6.3658871161548962e+00\n-2.3836508759605106e+01\n2.6062688245983540e-01\n3.9427139225627189e-01\n-2.0623808452327157e+01\n4.3462311844134696e-03\n2.7329127298105987e-01\n-2.0799454860418486e+01\n5.1595951232779846e-01\n1.8749299402652983e-01\n-2.0488634077241542e+01\n-2.4101922337619469e-01\n3.6910539452058522e-01\n-2.0904848106614335e+01\n9.9487481743999473e-01\n7.4553380180392126e-01\n-2.0344885032879279e+01\n9.9487481743999473e-01\n7.4553380180392126e-01\n-2.0344885032879279e+01\n1.4756623509501416e+00\n9.9976100018223074e-02\n-2.0232685151051207e+01\n-2.5108992462822006e+00\n-9.7663456846315755e-01\n-2.2160099474529037e+01\n1.7980437671378948e+00\n-3.7752577827497658e-01\n-2.0255551624807733e+01\n1.4437040906022901e+01\n-1.0752326871403262e+00\n-3.0138998374235523e+01\n1.3092894773361653e+01\n3.4334382168600044e+00\n-2.9759024304751364e+01\n-2.7280610437986669e-01\n3.7913640484595890e-01\n-2.0945551919224602e+01\n5.7816951869108024e-01\n-7.7011451949068954e-01\n-2.0581381982197666e+01\n4.0807220131042339e+00\n5.9882382309430238e-01\n-2.0980403023562406e+01\n1.1513917683419994e+00\n1.4445890451844610e+00\n-2.0479315474907562e+01\n1.9247872215476058e+00\n1.4618072164881808e+00\n-2.0422514631981464e+01\n1.2600096405455480e+01\n3.5422968600723004e+00\n-3.2513151025540495e+01\n-7.8656734123429617e-01\n-1.4388807715050806e+00\n-2.0863434927569774e+01\n1.3617861673173461e+01\n1.2416627651094772e+00\n-3.0949974683278437e+01\n2.7582264699898378e+00\n1.1025965713371182e+00\n-2.0399790491234633e+01\n4.6399994323082633e-01\n-7.1696257055022572e-01\n-2.0635151101062004e+01\n1.1520771368618577e+01\n-4.0520226308675937e+00\n-2.6955200501031069e+01\n-2.3380473155292796e+00\n-7.9612086730676754e+00\n-2.1646337739658357e+01\n2.3802848616572119e+00\n-7.9418941649145969e-01\n-2.0509909083227694e+01\n-2.0285201908342714e+00\n1.7896382750585406e+01\n-4.5212898798765572e+01\n1.4397901875645310e+01\n-5.2200527192684176e-01\n-2.9118396062704175e+01\n5.9201632833670059e-01\n-5.3495505888503825e-01\n-2.0533325619925826e+01\n-6.5183877034956550e-01\n-1.7793367142034930e-01\n-2.1270910499215166e+01\n6.3076063057300069e-02\n-2.8917477123154384e-01\n-2.0762894942162369e+01\n1.2830186932625208e+01\n4.3374991676795309e+00\n-2.9516573268671539e+01\n8.7920594298493215e-01\n1.9000406279613983e+01\n-4.7224133980526283e+01\n4.1688990029260120e+00\n-4.1902668128700888e+00\n-2.1875171308061933e+01\n-2.5238510720290845e+00\n1.5350582623962741e+00\n-2.4284742007094668e+01\n3.2594857953357854e+00\n1.9631037441263235e+00\n-2.1087888792537704e+01\n8.8758620944239797e-01\n1.2605895281753894e+00\n-2.0610056597907967e+01\n-1.2970662108605553e+00\n-7.6795298236230669e-01\n-2.1364981973955675e+01\n7.3820080774453549e+00\n8.8118862501464559e+00\n-4.4465835252943755e+01\n2.0974074188038418e+00\n-3.1104901239936944e+00\n-1.9931473926301653e+01\n1.2920634160718089e+01\n2.8329013048144165e+00\n-3.1932603318043494e+01\n-7.4562499617473446e+00\n2.3430280675090969e+00\n-3.5830367561047467e+01\n3.0236144550761588e+00\n8.5887301953688444e-01\n-2.0499807547490825e+01\n-3.3283218426925443e-01\n-2.5747474208440186e+00\n-2.0076507038373499e+01\n1.4711343054044124e+00\n7.7689873248363330e+00\n-4.3122034548572195e+01\n-2.7504364232132055e+00\n-3.6445994579553878e+00\n-2.3840836368449455e+01\n-8.0520514334319273e+00\n2.5169574295598545e+00\n-3.5776102775652497e+01\n2.7996882949745951e+00\n7.9086193112677317e-01\n-2.0415450936822580e+01\n1.2140027328789298e+01\n-4.8427928428014120e+00\n-2.5573328241632016e+01\n1.4450777156945245e+01\n-1.6020247239919372e+00\n-3.0128340965672106e+01\n-4.1215472629830927e+00\n-8.0203227381327462e+00\n-2.1550006907993115e+01\n8.1791962570619736e-01\n1.1654174712200875e+00\n-2.0496562644034206e+01\n1.3711112615261733e+01\n9.0676803467548996e+00\n-3.7975008978736419e+01\n-3.2640359009620217e+00\n-8.1253056687332670e+00\n-2.1494106647240205e+01\n1.3747530433819469e+01\n6.3944422841228221e-01\n-3.1075409771299022e+01\n-3.7981931330323224e+00\n-8.0305479910469213e+00\n-2.1538325076904620e+01\n1.2777735463945191e+01\n3.1437782909166674e+00\n-3.1755194310362281e+01\n-3.6720043463687064e+00\n-7.9161213812236548e+00\n-2.1685248802901299e+01\n-3.7894947393334366e+00\n-7.8799479725334285e+00\n-2.1755093020553424e+01\n-2.3056808379653417e+00\n-3.0855319223964601e+00\n-2.2706115944345449e+01\n-6.3046635929247397e-01\n-1.0402815884081764e+00\n-2.0935162365607106e+01\n4.1759082264915848e-01\n-2.7683296535632151e+00\n-1.9851600456842643e+01\n-1.2958492641413570e+00\n-2.0809060810174111e+00\n-2.0825806151776110e+01\n1.4346151327364115e+01\n-1.0911746132266826e+00\n-3.0454532285780278e+01\n6.6678849714328775e-02\n-4.0107782050352929e+00\n-2.1398538643318950e+01\n6.1155378359149717e+00\n-8.8244827271038584e-01\n-2.2342851602559694e+01\n-4.3952088754841750e-01\n9.4778477259453764e-01\n-2.1149295822292160e+01\n4.1544232323765371e+00\n-1.1426708622757582e+00\n-2.1004268589988911e+01\n1.4064112424459802e+01\n-5.2509610107239479e-01\n-3.1085734990737038e+01\n9.9194594415723214e-01\n-2.6603814241747465e+00\n-2.0009410538495622e+01\n1.3590271322581808e+01\n9.9752865085733493e+00\n-3.6617705792243996e+01\n1.4569031228499568e+01\n-1.4765845753773632e+00\n-2.9739952300137375e+01\n1.4439404812025767e+01\n-1.1864826454825415e+00\n-2.9918246088255898e+01\n8.1516735414019925e-01\n1.2903486760106340e+00\n-2.0520751064253126e+01\n1.2551663587473609e+00\n1.7563849716789417e+00\n-2.0657127703221828e+01\n1.9147184507103252e+00\n1.3728456662750734e+00\n-2.0424778727509029e+01\n-1.4418906709813444e+00\n7.5284074348183561e-01\n-2.2211259038750175e+01\n-2.5107891466275163e+00\n8.3014802692682066e-01\n-2.3376256293481767e+01\n1.8480112477953177e+00\n-1.5357644402311030e+00\n-2.0342270487942155e+01\n-3.7679686612692515e-01\n1.7940133282027251e+01\n-4.7955784215035315e+01\n1.3831993731892181e+01\n9.0737428193740151e+00\n-3.7052037624927635e+01\n1.3510728556530385e+01\n9.8930705584641139e+00\n-3.7708921215733660e+01\n1.3055104197325566e+01\n2.9164144247999899e+00\n-3.1622206915655166e+01\n1.4077154098202666e+01\n2.0738654030851966e-01\n-2.9698322553588174e+01\n-3.6253568407289674e+00\n-7.7449791966312116e+00\n-2.1930341870669235e+01\n-1.4841129620458609e+01\n5.3901453631855762e+00\n-4.0126276706660775e+01\n3.4205499849674652e+00\n-5.8072828591254968e+00\n-2.2752228931514306e+01\n2.0303478699565090e+00\n1.6619301713834982e+00\n-2.0524171071947702e+01\n1.7051824886123375e+00\n1.6718440756480808e+00\n-2.0588981369199040e+01\n8.9520235848595819e-01\n2.9704978122499992e-01\n-2.0299410124365057e+01\n2.2105671400475959e+00\n8.0914974368872483e-01\n-2.0208479416511601e+01\n1.6867292777294876e+00\n5.7389713094087358e-01\n-2.0189828829162145e+01\n1.7803115146433384e+00\n1.4942246562336012e+00\n-2.0379695441947788e+01\n-1.3220869050229208e+01\n1.2010246289173448e+01\n-4.1725207162477354e+01\n-1.5475028471253619e+01\n1.0838222791522002e+01\n-4.0760241670062840e+01\n-1.0195950900706562e+01\n1.3125515245629000e+01\n-4.3394209085130001e+01\n-1.5147544388726102e+01\n1.1349496253357062e+01\n-4.2804268523978024e+01\n-5.3439422005708668e+00\n1.3011574541083796e+01\n-4.9567018994308846e+01\n9.8588880925468836e-01\n1.4660344277122026e+00\n-2.0656367630605093e+01\n-2.1749586021643754e+01\n1.1855728430622594e+00\n-3.4670789436116706e+01\n-1.4525086575125938e+01\n1.2392779541452952e+00\n-3.4488889858206406e+01\n-1.1514581264070527e+01\n1.9618209137840330e+00\n-3.5336571772918312e+01\n-1.3674424831793909e+01\n4.1664881508945388e+00\n-3.8453524585560928e+01\n-1.1556659447859751e+01\n2.0373706438056383e+00\n-3.5449427710362471e+01\n-8.2776549634852099e+00\n7.4531861142046036e+00\n-4.2787087551441424e+01\n-6.9738888873818734e+00\n7.9632668140816367e+00\n-4.3527685906234098e+01\n-1.5970047779794122e+01\n1.3655891343176596e+00\n-3.4688031186195715e+01\n-1.5763984485893371e+01\n1.3864976144156169e+00\n-3.4642215456551575e+01\n-1.4978991267732159e+01\n6.3060293941076120e+00\n-4.1230922294682919e+01\n-1.6374689346668443e+01\n2.0166262822303951e+00\n-3.5388327278894479e+01\n-1.5269140915535569e+01\n6.0292341103268825e+00\n-4.1030822649142408e+01\n-1.6317068297831792e+01\n1.7732305496502734e+00\n-3.5508504294654564e+01\n1.3048245509482951e+01\n1.2541086663343858e+01\n-3.4999079942317124e+01\n-3.9930068743623162e+00\n9.0525542909264907e+00\n-4.5246135638163068e+01\n-3.2059671900356128e+00\n8.8032165936940672e+00\n-4.4516649579559669e+01\n-1.1649588911765942e+01\n1.2243167871988629e+00\n-3.4119008424330566e+01\n-5.3145153485135657e+00\n1.0898251525722149e+01\n-4.7475010802446270e+01\n-1.3491504121178743e+01\n4.7766260107701495e+00\n-3.9324911429455803e+01\n-1.3125139194639974e+01\n1.1961123524779467e+01\n-4.1609786972082532e+01\n-1.0786228124185104e+01\n8.1468648959803325e+00\n-4.3605526262661542e+01\n-2.2085028699321182e+01\n2.2803653540033157e+00\n-3.5861270420561553e+01\n-2.2191360328467422e+01\n5.9673273976623496e-02\n-3.2931589574668834e+01\n-2.2060404951128607e+01\n1.3308244549665440e+00\n-3.4737079092699801e+01\n-7.7208300564934342e+00\n7.2901492899400431e+00\n-4.2474656580833724e+01\n2.4644884039945198e+00\n7.8874895920190136e-01\n-2.0310587985674793e+01\n7.8620838968238056e+00\n2.1885337241803839e+01\n-5.0201692263578529e+01\n-1.3875131554937992e+01\n1.1995224530760275e+01\n-3.9926067887737268e+01\n-1.2376354615529754e+01\n1.1892612310980789e+01\n-4.2577003522936771e+01\n9.9044286936046557e+00\n-4.8256407778063073e+00\n-2.5818138321445257e+01\n7.7579181394766916e+00\n2.0881323041591919e+01\n-5.3916834899444481e+01\n-1.5187510154449106e+01\n5.7661341152600452e+00\n-4.0714915834842479e+01\n-1.4603572646445846e+01\n1.3949840425647484e+00\n-3.4640813800477275e+01\n-1.3587738325614881e+01\n4.4968316168152329e+00\n-3.8804812168518417e+01\n6.8561696944249553e+00\n2.0191626604400923e+01\n-5.1556634655548002e+01\n5.6208634857824604e+00\n1.9627135983397977e+01\n-5.0607154587884772e+01\n-4.6980840767935943e+00\n-8.3259795972485549e+00\n-2.1251760952933346e+01\n1.5463510685574389e+00\n8.3054144774839269e+00\n-4.4017753507454167e+01\n-7.1905056104307192e+00\n1.6758330634627434e+01\n-4.1289538781939562e+01\n2.1700513357699253e-02\n2.6838592228114999e+00\n-2.1835182079217677e+01\n-6.5110569825551323e-01\n3.2322107704403753e+00\n-2.3105009194999905e+01\n-6.3978459650183854e+00\n-8.1367993448683684e+00\n-2.1360248068859484e+01\n9.8700319155979201e+00\n1.4768944980768813e+01\n-5.2546786880832144e+01\n8.2236858801507839e+00\n1.4300549850370581e+01\n-5.2062174259630424e+01\n9.2444991290888652e+00\n7.1596913704662031e+00\n-4.2465428651178122e+01\n3.0913775647430723e+00\n3.5290907539094589e+00\n-2.3141419430919978e+01\n3.5004595823383058e+00\n2.9408940155743362e+00\n-2.1987721143456543e+01\n-1.4443990906707906e+00\n2.3943249934221700e+00\n-2.3096454176751671e+01\n4.3555477449545243e+00\n-9.8429200749803003e-01\n-2.1167197245757528e+01\n2.6361072451645526e+00\n-2.7139519591920007e+00\n-1.9919731786282448e+01\n3.4689403818642583e+00\n-3.8695793825558131e+00\n-2.1049725055589484e+01\n1.0335288095886892e+01\n-4.7922724751489181e+00\n-2.5948882404110229e+01\n9.9517246705901936e+00\n-5.1423894048351446e+00\n-2.5260305487764878e+01\n2.1463804908419521e+00\n-6.4697360291086428e+00\n-2.2033080146734434e+01\n3.9239475503574028e+00\n3.0230725482155432e+00\n-2.2357666300163224e+01\n1.0198774013430514e+01\n-4.8509141173439101e+00\n-2.5907427237844846e+01\n9.5425681550692651e+00\n-5.6171009190158037e+00\n-2.4793204434841392e+01\n-3.8408314446447172e+00\n-7.9029761029408787e+00\n-2.1676602581861079e+01\n1.0922393366233512e+01\n-6.4864527738713500e+00\n-2.3388660742460409e+01\n6.6088555784262804e+00\n-7.4669393331509939e+00\n-2.2224179614715634e+01\n6.6088555784262804e+00\n-7.4669393331509939e+00\n-2.2224179614715634e+01\n-2.3202780971091190e+00\n1.1078325648576977e+01\n-4.7745117571865649e+01\n8.5249570600548541e+00\n1.0123507134074799e+01\n-4.6317597923259257e+01\n-2.0987515408919868e-01\n2.9651338618038765e+00\n-2.2259561710018268e+01\n-9.6644999304180885e+00\n8.0428671819574471e-01\n-3.3792060897869533e+01\n1.0775323215708383e+00\n-1.5122059837686328e+00\n-2.0450706637018811e+01\n5.0592108030537499e+00\n-1.8011374400838276e+00\n-2.1133562443055954e+01\n1.2996709476507199e+01\n1.0796420466025355e+01\n-3.9663443649868199e+01\n3.6268843240026740e+00\n2.8642571721949164e+00\n-2.1920247576869329e+01\n-1.8493016041568768e+00\n-7.9999155860798812e+00\n-2.1623712563126599e+01\n1.5210089385825611e+01\n1.7822343683536104e+01\n-5.6910402668422002e+01\n1.5567855843182343e+01\n1.6420501972874874e+01\n-5.5117415385155766e+01\n4.1177179186688395e+00\n-6.2346179517782685e-01\n-2.1316795896445225e+01\n1.1649791359269794e+00\n-5.1297667368495743e+00\n-2.1946409056080007e+01\n6.9894567577508511e+00\n9.1912818932466042e-02\n-2.3597311674647202e+01\n-4.6992247004602943e+00\n6.4305839232304374e+00\n-4.1282494397276679e+01\n-2.7987396819028545e+00\n-8.1062336132631181e+00\n-2.1365222702384440e+01\n3.2308566455985956e+00\n-1.6289578781716523e+00\n-2.0384091761352760e+01\n1.0541279735380112e+01\n-6.5105890018657053e+00\n-2.3366961546596240e+01\n-9.4509639939295553e+00\n1.2418969036634985e+01\n-4.5108450107187984e+01\n-6.1037448996199850e-01\n3.1405265600378467e+00\n-2.2892947407733800e+01\n9.5031431355934248e-01\n-2.9002144997369959e+00\n-1.9683759758714736e+01\n2.9004522940459858e+00\n-5.1409531289632433e+00\n-2.1994707678170233e+01\n2.6306332946014943e+00\n4.0430937083488478e+00\n-2.3439495173950743e+01\n3.2113781414618434e+00\n-6.4723350947900595e+00\n-2.2047134110031720e+01\n2.9017711924821392e+00\n-3.1130270574005845e+00\n-1.9915047106426950e+01\n3.4974467402758056e+00\n-3.6693465618151921e+00\n-2.0869607308501415e+01\n2.3396980530904079e+00\n3.8560867118429876e+00\n-2.3867107048126858e+01\n4.4611475751638672e+00\n-4.0910663962427503e+00\n-2.1878939855004365e+01\n6.6773416274974791e+00\n-1.0728047552246656e+00\n-2.2109380274897511e+01\n4.0976934926117057e+00\n-4.2717933189653854e+00\n-2.1814208320904189e+01\n6.1924353009548936e+00\n-4.7601991909822444e-01\n-2.2794423253001877e+01\n-1.1900951029346940e+00\n-5.4382398028782557e+00\n-2.3286656398750157e+01\n-1.7108350863920729e+00\n-3.6739854910497640e+00\n-2.2336273519342395e+01\n3.1830913457285690e+00\n3.6182061805262911e+00\n-2.2998235333162100e+01\n3.8316193508402474e+00\n-7.5584362890847046e-01\n-2.0856579071645339e+01\n4.4012001185667682e+00\n-4.4747700485344151e+00\n-2.2257584558844616e+01\n4.2770685962352788e+00\n-6.7078246212384596e-01\n-2.1469430599733208e+01\n6.7353999690286868e+00\n-3.8041642078631410e+00\n-2.4565910014989495e+01\n3.7305204387486168e-01\n-5.8449569457721280e+00\n-2.1643688686863470e+01\n6.0146957583416381e+00\n-1.6356882319966208e+00\n-2.1371278068881338e+01\n-1.4870132626150586e+01\n3.9805614589797700e+00\n-3.8254625559363895e+01\n-1.5787975766107580e+01\n6.1916042379302620e+00\n-4.1279428127592290e+01\n1.1510493234843302e+00\n1.8434194014276436e+01\n-4.8196366192257429e+01\n2.3051538673836838e+00\n2.0250315766269011e+01\n-4.7080692064227200e+01\n8.4063752756478838e+00\n2.1169455522027427e+01\n-5.1725751469351920e+01\n-1.4827633286705217e+01\n8.2283432986472267e+00\n-4.3915748511802057e+01\n3.2095875420157367e+00\n-2.4754973332914290e+00\n-2.0252800723822556e+01\n2.6786733858570013e+00\n-7.1658478152938143e-01\n-2.0423282220578006e+01\n4.1235373587179103e+00\n-1.9328429638131810e+00\n-2.0924883368105242e+01\n5.2589739137814178e+00\n-1.5042900555018148e+00\n-2.1514462284927394e+01\n1.3038418979933420e+01\n1.1037065175558145e+00\n-3.3944311494392025e+01\n5.6101310748003614e+00\n-1.4373087854630633e+00\n-2.1602594265189310e+01\n5.1846290691170083e-01\n-2.2602547751171702e+00\n-2.0534392934847691e+01\n3.4805924935840502e+00\n3.0204851810446187e+00\n-2.2178177137279604e+01\n-2.7749254286585884e-01\n-2.0981672905105211e+00\n-2.0774982254545407e+01\n9.8926373368196785e-01\n-2.3633564438159635e+00\n-2.0363929009061511e+01\n-4.6885842126427582e+00\n-7.4273507261818619e+00\n-2.2337138960217523e+01\n-9.2682728495224453e-01\n-2.6157627196609772e+00\n-2.0492897724468005e+01\n7.0761247444508353e+00\n1.2170793264336158e+01\n-4.9064969602480367e+01\n1.2438502586055840e+00\n-8.1586567629446738e-01\n-2.0465632245106558e+01\n-2.0994441659517499e+01\n1.2842506234314854e+00\n-3.4653034453872969e+01\n-2.1896457743910734e+01\n2.5298724333809854e+00\n-3.6235418381128646e+01\n-2.0675532818646282e+01\n9.3087107602281560e-01\n-3.4126439606729868e+01\n-3.4184613548921252e+00\n8.9669897258457798e+00\n-4.4814869464311180e+01\n-3.9288148242882226e-01\n7.0841353151844555e-01\n-2.1039612330153105e+01\n-1.4790941024684310e+01\n6.0497022082503760e+00\n-4.0570080345224511e+01\n1.4025036167516655e+01\n-3.7708951968483345e-01\n-3.1086781058247919e+01\n1.2189736571691608e+01\n-4.1882707576845650e+00\n-2.6759798385881993e+01\n1.2623624887163633e+01\n3.7813953199125909e+00\n-3.2462691235518946e+01\n-2.0487238243094530e+00\n-8.0168532148607135e+00\n-2.1437853376132427e+01\n5.4485261966491718e+00\n-4.7308540249277655e+00\n-2.3007340207575030e+01\n1.6252257407151987e+00\n-4.8646511418201976e+00\n-2.1766977900933966e+01\n-4.4801332619563947e+00\n-7.8961767049442875e+00\n-2.1781540544373172e+01\n2.4192555254775590e+00\n-2.7048974983921048e+00\n-2.0008342266322632e+01\n-1.9113864539423673e+00\n-8.4593523061357878e+00\n-2.0879730797022571e+01\n1.1911154753162624e+01\n-6.1457464415631469e+00\n-2.3644531656344306e+01\n1.2695502300183229e+01\n-5.9853967709376352e+00\n-2.3833015310352341e+01\n1.1825422592271709e+01\n-5.7400712145812278e+00\n-2.4609009502947423e+01\n1.2422547889918221e+01\n-4.0611715803612158e+00\n-2.6761733810556183e+01\n1.3747565478785848e+00\n-8.4933150452346311e+00\n-2.0921611837780485e+01\n1.3273652585075640e+01\n-5.8446878061383361e+00\n-2.3971056519707975e+01\n-4.8985470365585853e+00\n-1.4887636120550247e+00\n-2.7496458992477240e+01\n-6.1995357022293875e+00\n-4.3997363337096118e+00\n-2.6713639148836396e+01\n-1.7870798689600267e+00\n-8.4571421685702539e+00\n-2.0963035572615695e+01\n1.2505161953956170e+01\n-4.6719851031119992e+00\n-2.6123681234233732e+01\n-1.5322941412725435e+00\n-8.5124696392823243e+00\n-2.0842192762622773e+01\n5.0816658603409737e+00\n-4.4331618398652912e+00\n-2.2846252528745534e+01\n-1.2334975879559639e+01\n-7.5803246013788073e+00\n-2.2166538807959945e+01\n-4.9283769931502395e+00\n-8.1069227716903889e+00\n-2.1436316235453980e+01\n6.2388008637221697e+00\n-9.8472510494892629e-01\n-2.2208832760637719e+01\n1.3196484639619719e+01\n1.2035362083551480e+01\n-3.4992522615595171e+01\n2.3776544907181102e-01\n3.8353447860790428e+00\n-2.3403767045408145e+01\n-5.5558338452011524e+00\n5.5465985641517568e+00\n-4.0406042241818056e+01\n1.9874241831310635e+00\n1.5581764252762089e+00\n-2.0465494404056436e+01\n3.2164999927485565e+00\n1.3391803828279458e+00\n-2.0735006045563360e+01\n-3.3772738769076582e+00\n-4.3694637474303066e-01\n-2.2831539953651816e+01\n-2.4225945659118131e+00\n-1.5767511604645443e+00\n-2.1378745002933059e+01\n1.9506910742713397e+00\n-3.1162943417491218e+00\n-1.9901294812942709e+01\n-1.0527883846203989e+00\n-3.6901215156338720e+00\n-2.1557444583853446e+01\n4.8430658579858514e+00\n-2.8527022587093773e+00\n-2.0949715332426067e+01\n-2.7779276368564605e+00\n-2.9546678152075900e+00\n-2.3187478741588261e+01\n4.4831865497663665e+00\n-4.4213294447894080e+00\n-2.2312907542389151e+01\n-1.4443990906707906e+00\n2.3943249934221700e+00\n-2.3096454176751671e+01\n-1.5513143491691992e+00\n2.1577840837483224e+00\n-2.3055584309136297e+01\n-1.6805769494368763e+00\n1.5911710328560809e+00\n-2.2850670257426390e+01\n-4.5547284910830244e-01\n-1.1977779581110268e+00\n-2.0783904890925179e+01\n4.8019545247691253e+00\n-3.5076856797827665e+00\n-2.1564586972399240e+01\n-1.9607645125369952e+00\n1.4885873293249656e+00\n-2.3405602374328868e+01\n-9.3738832160941108e+00\n-2.8933689259434381e+00\n-2.8805342599063199e+01\n3.9100263860950548e+00\n-4.2716405180797672e+00\n-2.1787854622675781e+01\n-8.2238520690979229e+00\n1.6620757350598998e+00\n-3.4838709640741058e+01\n1.2963778618651743e+01\n2.7556190838069070e+00\n-3.2026790224671899e+01\n2.6901761337798022e-02\n-9.9620336616403593e-01\n-2.0976693455407382e+01\n3.8570027481960265e+00\n-1.2615165299598459e+00\n-2.0848762974438159e+01\n-1.7492419071914767e+00\n8.2499035326964176e-01\n-2.2662585365360446e+01\n2.1698620656152188e+00\n-3.0318343376520276e+00\n-1.9822379334349773e+01\n9.5031431355934248e-01\n-2.9002144997369959e+00\n-1.9683759758714736e+01\n3.8569210399570015e+00\n-3.9798849354392014e+00\n-2.1486201092688297e+01\n4.4831865497663665e+00\n-4.4213294447894080e+00\n-2.2312907542389151e+01\n1.7659937790357083e-01\n-1.5280738991667446e+00\n-2.0375018614750545e+01\n1.3921172223946088e+00\n-1.2793108299089023e-01\n-2.0276160160228756e+01\n-9.1667474455588707e+00\n-2.9700006372905059e+00\n-2.8675446517191112e+01\n-5.7883287527886615e+00\n-7.4181939957897098e+00\n-2.2474212130533633e+01\n-1.2593971651867544e+00\n-1.7508542425759772e+00\n-2.1128166049604594e+01\n-3.8430780599027203e+00\n2.7052260688793222e-02\n-2.3478888304345706e+01\n1.5115828444787605e+01\n2.0776587143442264e+01\n-6.0820239280757221e+01\n4.7863507348811245e+00\n1.7552260832801871e+01\n-5.4144013588784254e+01\n7.6286718559604569e+00\n1.3592009868149701e+01\n-5.1087290276705112e+01\n-1.0796678880057812e+01\n1.0659099613728445e+01\n-4.3895442391138914e+01\n-1.0757239891278738e+01\n1.0477937929082763e+01\n-4.4217881113323152e+01\n-1.0861810745069130e+01\n1.0410362150931469e+01\n-4.4336424633611827e+01\n-1.0992594746550479e+01\n1.0297319516713182e+01\n-4.4116946646509483e+01\n1.3035610243097116e+01\n9.3211051088169441e+00\n-4.0092346717857872e+01\n-1.1408173771920637e+01\n1.0093959383012988e+01\n-4.3917710737533660e+01\n-1.2855090588807213e+01\n1.0077379165851927e+01\n-4.4839092619538640e+01\n1.3378393927164289e+01\n8.3831299892696727e+00\n-4.0759854984459551e+01\n1.9108710396147437e+00\n9.0112107530039740e+00\n-4.4959469605960386e+01\n1.3213496008156492e+01\n8.3054461371958332e+00\n-4.0726117038581826e+01\n1.3497880879431431e+01\n8.2213162377933564e+00\n-4.0473528876278095e+01\n1.3567129318989133e+01\n7.9576882223172358e+00\n-4.0181944553370322e+01\n9.8885414990682126e+00\n8.6509445499062103e+00\n-4.4432500147137084e+01\n6.4004564013025620e+00\n8.5988027148017316e+00\n-4.4320066687380091e+01\n1.3762857426764413e+01\n7.7776731792875315e+00\n-3.9752200912548417e+01\n1.3565393940896143e+01\n7.7191166091523229e+00\n-4.0754105800508633e+01\n1.3563234781667527e+01\n7.6139916279014894e+00\n-4.0541810819120819e+01\n-1.0198657595628960e+01\n7.2781977343199982e+00\n-4.2707968198825498e+01\n-7.7981409707888316e+00\n6.9136854092065398e+00\n-4.2206611016041265e+01\n-7.4661512980910976e+00\n6.8825209230913202e+00\n-4.2082111768975594e+01\n-6.3384350502307809e+00\n6.5760563201239757e+00\n-4.1814144372543410e+01\n-4.3951941052129753e+00\n6.4536086250268729e+00\n-4.1470544814452950e+01\n-6.3093399796569321e+00\n6.4240264392189097e+00\n-4.1410400097099455e+01\n3.0913775647430723e+00\n3.5290907539094589e+00\n-2.3141419430919978e+01\n1.4354820763127156e+01\n5.3472018048876597e+00\n-3.9609489921888503e+01\n1.2637564209647946e+01\n3.6119103431099644e+00\n-3.2465395090035130e+01\n-3.3008512223504263e+00\n2.4893294520117513e+00\n-2.6673048036135498e+01\n1.8259355789302045e-01\n2.0252267420688845e+00\n-2.1234420629039896e+01\n-8.7537761109440275e+00\n2.7189472267496155e+00\n-3.6256558327492833e+01\n2.3243203563846224e+00\n1.5119566124425325e+00\n-2.0495946329288568e+01\n-8.7201730957939407e+00\n2.3071230468584520e+00\n-3.5777099963723451e+01\n3.7466266008003317e+00\n1.3985940536371759e+00\n-2.1037471868162992e+01\n1.3148282740063950e+01\n9.2406041589923649e-01\n-3.3710876790240498e+01\n1.3400928345710300e+01\n1.8235292879308757e-01\n-3.2640979523017982e+01\n-1.0221597603121511e+01\n1.8590492718869103e-02\n-3.2624906073438289e+01\n-1.0387558281785633e+01\n-1.1429846455209997e-01\n-3.2476615839741257e+01\n4.0318032399333639e+00\n-1.0521434986887352e+00\n-2.1073521585214770e+01\n4.9984242186784318e+00\n-1.6752976013658651e+00\n-2.1297274381766861e+01\n1.1870250795214229e+01\n-4.0751018819096840e+00\n-2.6748211629845830e+01\n1.2609057633985854e+01\n-4.1772516312508277e+00\n-2.6683941503181849e+01\n1.2399859104428471e+01\n-4.5089335980465011e+00\n-2.6125104234023578e+01\n1.2069910974683120e+01\n-4.9862631855429047e+00\n-2.5510495772296608e+01\n-1.1506375879880695e+00\n-5.7180097110007857e+00\n-2.2277844236162643e+01\n8.9354366639452412e+00\n-6.5379402965628408e+00\n-2.3498280770543634e+01\n9.1360421412231059e+00\n-6.6313306805238792e+00\n-2.3397318782682039e+01\n8.1401113436176384e+00\n-7.0386709810493704e+00\n-2.2758244710899369e+01\n-3.3343784614656191e+00\n-8.1843830356430480e+00\n-2.1364522761090804e+01\n-1.8677322916946835e+00\n-8.1622538465489161e+00\n-2.1249236833740138e+01\n-2.5227543215478971e+00\n-8.2692275764677294e+00\n-2.1180859991254366e+01\n-1.5906793605607894e+00\n-8.4557259003596457e+00\n-2.0902079767883883e+01\n-1.5322941412725435e+00\n-8.5124696392823243e+00\n-2.0842192762622773e+01\n1.5758821864643378e+01\n2.1083725423500393e+01\n-6.1422428946915240e+01\n1.5314901197793803e+01\n2.0855420820544406e+01\n-6.0910379899238642e+01\n7.5500188168862437e+00\n1.7719061732506287e+01\n-5.6740719802715788e+01\n8.5143261715192811e+00\n1.6846217078192335e+01\n-5.5497346810345071e+01\n7.2144659362672243e+00\n1.4096522217442361e+01\n-5.1724716676623487e+01\n7.2144659362672243e+00\n1.4096522217442361e+01\n-5.1724716676623487e+01\n9.2247252743048964e+00\n1.2621975852491646e+01\n-5.0028529325245266e+01\n-1.0622306672112284e+01\n1.0949925122348827e+01\n-4.4076067596896692e+01\n1.3198975420224986e+01\n9.4377775071041992e+00\n-4.0381799877957476e+01\n1.6850192718725665e+00\n8.9890328035331404e+00\n-4.4812305509517650e+01\n1.3736192755108501e+01\n7.7646265154816554e+00\n-3.7822045327943194e+01\n-1.4831882195875709e+01\n8.4303279992829214e+00\n-4.4311068410092318e+01\n1.3914467306322718e+01\n7.5090038026897377e+00\n-3.9434217984851777e+01\n-5.6906500667966853e+00\n8.0725753709308083e+00\n-4.3774367887748873e+01\n1.3871745735138191e+01\n7.2100192699195960e+00\n-4.0745203935550414e+01\n-7.2240022537815216e+00\n7.3295763973542636e+00\n-4.2623050075853563e+01\n1.3790214719471246e+01\n6.9935738084007983e+00\n-4.0713343247779179e+01\n1.3507389629580050e+01\n6.8223906092924560e+00\n-4.1746236935137993e+01\n-7.4133430627805330e+00\n6.6608282235584007e+00\n-4.1722197380845913e+01\n-4.6927539511621781e+00\n6.3334228155854788e+00\n-4.1250859031323998e+01\n1.3299763569308263e+01\n1.8151397734247572e+00\n-3.1261475606481362e+01\n-7.1169852985619997e+00\n1.8530325231206175e+00\n-3.5160828084486113e+01\n1.3810476099263486e+01\n7.0362533883761069e-01\n-3.0490110196733383e+01\n1.3501005315357421e+01\n7.0353277523300017e-01\n-3.2092338787048298e+01\n1.1239392782896623e+01\n-1.8346580461194151e+00\n-3.0011588755681924e+01\n-1.6317577195757615e+00\n-1.3941829365298066e+00\n-2.1672126780305511e+01\n-8.4977531002671878e+00\n-2.6354019476428694e+00\n-2.9004661269491748e+01\n1.0754744022475492e+01\n-3.0515514195328346e+00\n-2.8222007681200338e+01\n3.1727539863234284e+00\n-2.1571544468406167e+00\n-2.0503671279142033e+01\n1.1360579064282531e+01\n-3.8596571649219378e+00\n-2.7075031633278346e+01\n-9.6385068817228188e+00\n-4.2866949055137384e+00\n-2.6735958057539232e+01\n9.6342002670603186e+00\n-6.1868301780159181e+00\n-2.4020080901543626e+01\n9.6342002670603186e+00\n-6.1868301780159181e+00\n-2.4020080901543626e+01\n1.1567678010099320e+01\n-6.2754677266070242e+00\n-2.3593260878099528e+01\n9.6763139055468788e+00\n-6.3021661893057779e+00\n-2.3714942797143991e+01\n-1.6166765474935252e+00\n-7.7601135528937766e+00\n-2.1919018510224817e+01\n-2.4393604544483587e+00\n-8.0041339297508198e+00\n-2.1600805595196547e+01\n-2.1285879734403541e+00\n-8.3350853434644527e+00\n-2.1075087909663843e+01\n8.0857779651284556e+00\n1.8709223445305263e+01\n-5.6188012313935054e+01\n7.3264100775045682e+00\n1.5915989326008159e+01\n-5.4157213155014269e+01\n1.3554566076740764e+01\n1.0357099454693738e+01\n-3.6168229586944655e+01\n-1.4926254352791366e+01\n8.3510995085680939e+00\n-4.4159572068365136e+01\n-4.1904464782071953e+00\n8.1775038064031484e+00\n-4.3812556073957957e+01\n1.3789374691031815e+01\n6.8702275255380494e+00\n-4.0430911960414122e+01\n-6.7797470608145325e+00\n6.0966092331661788e+00\n-4.1048256205923018e+01\n6.0922899546588010e+00\n1.0115505599346399e+00\n-2.3696913954100786e+01\n7.3375525543964377e+00\n1.0041351985498492e+00\n-2.4863250453415144e+01\n1.3343884948725448e+01\n7.0936034849973895e-01\n-3.3342085723084004e+01\n-8.3792262046122428e+00\n-2.8675691974218487e+00\n-2.8489868029980066e+01\n-8.6234858486527912e+00\n-2.8949669442375643e+00\n-2.8606092871722712e+01\n1.9232199782275786e-01\n-2.3451594091805896e+00\n-2.0418084164961929e+01\n1.2465976127834667e+01\n-3.8749215771235703e+00\n-2.6826357454694094e+01\n1.1925707142991065e+01\n-4.0204685847316419e+00\n-2.6861286475117016e+01\n1.2629463266620753e+01\n-4.9455280273572351e+00\n-2.5540062235935046e+01\n1.2065693979376308e+01\n-5.1547251659888689e+00\n-2.5283537316160643e+01\n8.3125980999931794e+00\n-6.3676989271592062e+00\n-2.3690980695010253e+01\n-3.0503369734412074e+00\n-8.0185284425936914e+00\n-2.1591983206387987e+01\n-2.5150655133561850e+00\n-8.2170739540014583e+00\n-2.1246461956503126e+01\n-2.5785833618864835e+00\n-8.3439056567124688e+00\n-2.1051112178682217e+01\n1.4067123538408275e+00\n-8.4342155864046937e+00\n-2.0980132542980861e+01\n8.1268823562677674e+00\n1.8112825839462413e+01\n-5.7074211908403420e+01\n8.0935858411742316e+00\n1.7790432717991983e+01\n-5.6822761890914080e+01\n1.4874501161402481e+01\n1.5043028003948997e+01\n-5.3050940045896738e+01\n1.3885537602490460e+01\n1.3829653857698482e+01\n-5.1625974609741064e+01\n-1.0032292713399439e+01\n1.1977791990313786e+01\n-4.5310258981784223e+01\n-1.0350707680431697e+01\n1.0808266432135129e+01\n-4.4518759030707045e+01\n-4.7757398178654613e+00\n6.7996709936978155e+00\n-4.1836254564185943e+01\n-5.9007552503814473e+00\n6.7936124346081526e+00\n-4.2017330107751128e+01\n-4.5798524343603821e+00\n6.2403542295365702e+00\n-4.1345457019145535e+01\n-5.5962495404996702e+00\n6.0603658845592170e+00\n-4.0813881997872549e+01\n-4.9993456045980231e+00\n6.0493227006815058e+00\n-4.0986301183791824e+01\n1.6613953029015820e+00\n-2.6921435934213060e+00\n-2.0011871258948197e+01\n1.2078538359998175e+01\n-3.9506468325501003e+00\n-2.7070993653425582e+01\n1.3762988244135157e+01\n-5.3079752478843281e+00\n-2.4688968898400070e+01\n1.1106462204302991e+01\n-5.5141897226314232e+00\n-2.4993852712533712e+01\n2.4969975207304738e+00\n-5.2029191953313987e+00\n-2.2074156067072408e+01\n9.7197608015571575e+00\n-6.2610168901375296e+00\n-2.3876206322160751e+01\n9.5884662143308201e+00\n-6.4350425944888512e+00\n-2.3476233107111234e+01\n1.6788784131356312e+01\n1.6423080423635039e+01\n-5.5711645416390802e+01\n1.5209704783528043e+01\n1.5663680888883544e+01\n-5.3829823741024285e+01\n-6.3959795753866668e+00\n6.1492334995940787e+00\n-4.1123881711875882e+01\n-1.1447748467120773e+01\n1.0343655027005491e+01\n-4.4402271508302448e+01\n-1.1447748467120773e+01\n1.0343655027005491e+01\n-4.4402271508302448e+01\n1.1387357750018150e+00\n-8.4288582234364622e+00\n-2.1145366421285686e+01\n-1.1146901436479080e+01\n1.0888531240121052e+01\n-4.3387004094116790e+01\n-1.1018153596234392e+01\n1.0609137189898286e+01\n-4.3611330995883279e+01\n-1.4630626426310339e+01\n9.5677982199861642e+00\n-4.4460476806985653e+01\n-1.0613306518532580e+01\n1.0648445620602297e+01\n-4.4152853727665885e+01\n4.6505858527995763e+00\n-3.7308805302228092e+00\n-2.1743828600721294e+01\n1.2733532783279244e+01\n4.8364490695069584e+00\n-2.9328203827186357e+01\n4.6567791229622308e+00\n-4.0208275542220234e-01\n-2.1495673249416658e+01\n-3.8499546192421668e+00\n-7.1734232326805660e+00\n-2.2717843743802234e+01\n-4.4292823726893502e+00\n-8.6097916131461432e+00\n-2.0654053793700911e+01\n1.7669371628729820e+00\n1.8788148650898666e+01\n-4.8552085182922113e+01\n5.6372719185204705e+00\n-5.0564785809503503e+00\n-2.2655929309822891e+01\n1.4486386993634708e+01\n2.3903393849029964e+01\n-5.5465497106855864e+01\n-5.8542263232211198e+00\n1.2608564587652223e+01\n-4.9253347471413768e+01\n6.1126360162729174e+00\n2.0790514515327725e+01\n-5.0078635910049741e+01\n1.2938025537927118e+01\n2.3492471942531392e+01\n-5.4621295819722512e+01\n5.7061900682186542e+00\n2.0152508035655922e-01\n-2.2705701901857100e+01\n3.7792289738871916e+00\n6.2294353177003281e-01\n-2.0848994363692565e+01\n2.4197225533317295e+00\n1.8882891729755100e+00\n-2.0705493339402533e+01\n-1.2188504519068053e+01\n-6.1619709403538652e+00\n-2.4096317974665233e+01\n4.8566569146000937e-01\n-6.1571556255427529e-01\n-2.0600267415676338e+01\n1.6679025812749025e+01\n2.2733223709973995e+01\n-5.9581894182882380e+01\n-8.9703720205816762e+00\n1.2297060187450960e+01\n-4.6747712274751436e+01\n1.5083562583363948e+01\n2.4076653233055612e+01\n-5.5919496188192170e+01\n1.7148051821928064e+01\n2.2912420108510819e+01\n-6.0393487683510720e+01\n1.3736529526171701e+01\n2.2727463301218698e+01\n-5.6405970949610413e+01\n-8.6224426678485538e-02\n-5.3527030793851127e-01\n-2.0895544233453982e+01\n3.2528020518111314e+00\n1.2175970767208288e+00\n-2.0714111851585542e+01\n1.0563310660050655e+01\n2.0410509257024973e+01\n-5.6614461269920604e+01\n5.5119183515413610e+00\n1.9390529034941210e+01\n-5.2267526007872299e+01\n-1.0755821803942682e+01\n1.4975528553103645e+01\n-3.9860281668526056e+01\n3.7465082303576653e+00\n5.5956408162099569e-01\n-2.0801680995910228e+01\n1.5290217205481509e+01\n2.1926970274607644e+01\n-5.9628582274025959e+01\n7.8508179025854172e+00\n1.4327780234857041e+01\n-5.2110842078649867e+01\n1.5416936665940728e+01\n2.2461304862494924e+01\n-5.8828534418127710e+01\n1.1297552589531039e+01\n2.2464084707575857e+01\n-5.3707779877381832e+01\n1.9663429674338493e+00\n7.7981913222021959e-01\n-2.0239081305483293e+01\n7.6752320417240210e+00\n2.0276290528333369e+01\n-5.3795623326427545e+01\n2.3347677207387951e-01\n1.2185980836786272e+00\n-2.0762624379564716e+01\n3.1009795037186660e+00\n-2.4836537629927360e+00\n-2.0283032377333811e+01\n9.3938317073582187e+00\n1.8759818750781832e+01\n-5.7628356980532175e+01\n9.2119937285609943e+00\n1.9835519289761731e+01\n-5.6012535089864450e+01\n5.5789228901790668e+00\n2.0726339066341840e+01\n-5.0225225314216992e+01\n4.1453910272151999e+00\n1.9829425613491139e+01\n-4.9994816437931391e+01\n7.0190204429634484e+00\n2.1328883927995765e+01\n-5.0749796202222548e+01\n9.0898903928120607e+00\n1.9659150003006157e+01\n-5.6090376929174703e+01\n1.4768652719924120e+01\n2.3758114133832350e+01\n-5.5828167990483777e+01\n1.4999304393696244e+01\n2.4015781880294064e+01\n-5.6071667375476792e+01\n9.6218595337869193e+00\n2.1357522539953198e+01\n-5.3008200331516875e+01\n1.2438502586055840e+00\n-8.1586567629446738e-01\n-2.0465632245106558e+01\n1.2605372794847777e-01\n-1.6480706545608628e+00\n-2.0444736382979890e+01\n1.0839196894036252e+01\n-2.8952311123359231e+00\n-2.8569608771716329e+01\n-1.0079039319683465e+01\n-3.9294263122553761e+00\n-2.7279214473798401e+01\n1.3882365291486959e+01\n1.4102930526518588e+01\n-5.1889351423792782e+01\n6.9593582821261224e+00\n2.0066429122338814e+01\n-5.1858150256594961e+01\n9.6067310653027960e+00\n1.4905415049117108e+01\n-5.3215548529336807e+01\n1.3253170921844939e+01\n9.5481098156291200e+00\n-4.0026409321749362e+01\n-4.4149003550681707e+00\n1.6440126164823127e+01\n-4.5299134128519505e+01\n-2.6490029398466088e+00\n1.8260871970888042e+00\n-2.4637792576335812e+01\n-1.5056325786876790e+00\n3.6843866503582612e-01\n-2.2188824837405257e+01\n1.1122654543580397e+00\n1.8253486955938424e+01\n-4.8364192528440078e+01\n-1.0270028499849180e+00\n-2.1958076816110688e+00\n-2.0653598062050197e+01\n-3.0373775131388825e-01\n-2.7060147347892420e+00\n-2.0141032793785651e+01\n-3.9981656427510698e-01\n1.9910673638566885e+00\n-2.1645123037312700e+01\n-2.2344212234017309e+01\n3.3962744519939220e-01\n-3.3299167527195806e+01\n-2.1969848243422813e+01\n-1.1958710002535219e-01\n-3.2674666832920387e+01\n-2.2436668025807702e+01\n2.5619327481194654e-01\n-3.3240758353633282e+01\n-2.1457811354413433e+01\n-7.0127638970141071e-01\n-3.1940506601841086e+01\n-9.8733090976035989e+00\n6.3156131400203668e+00\n-4.1378281566939606e+01\n-8.7040385562133906e+00\n6.8640745032835806e+00\n-4.2016706204676510e+01\n-2.1589550973350160e+01\n2.2656948553055405e+00\n-3.5698951915637956e+01\n-1.2993569794827769e+01\n3.3639261422154494e+00\n-3.7346598104805835e+01\n-2.2147471482967948e+01\n1.7453951884744656e-01\n-3.3090657111423994e+01\n-1.2062351642245241e+01\n2.1622075070380289e+00\n-3.5655879421328137e+01\n-1.2062351642245241e+01\n2.1622075070380289e+00\n-3.5655879421328137e+01\n-1.1126331941686313e+01\n2.1791691026712199e+00\n-3.5572338403697429e+01\n-1.5208352319395749e+01\n1.0343295224491122e+01\n-4.4008490429451371e+01\n-1.1617969253107484e+01\n7.3495977270042534e-01\n-3.3651713274893638e+01\n1.1203198118323368e+01\n-2.3976012532104742e+00\n-2.9313122370680539e+01\n-4.9504796087345959e-01\n1.8437519606208390e+00\n-2.1573055948067132e+01\n-2.2713196736331671e+01\n5.0541496074708103e-01\n-3.3576626775275791e+01\n-2.7760450285802797e+01\n1.7776232132681066e+01\n-5.5763636082864593e+01\n8.8320159424058389e+00\n7.1282264635958565e+00\n-4.2404818144814833e+01\n1.0020970959704238e+01\n8.1478320747247022e+00\n-4.3639636497580867e+01\n9.2129360171911472e+00\n1.3788221762303472e+01\n-5.1211508412337736e+01\n1.5438467170173016e+01\n2.3006978983981767e+01\n-5.8321862717162382e+01\n-7.3311799240145694e+00\n-1.9642981698684689e+00\n-2.9859637975333573e+01\n-2.8553181328152339e+00\n8.3564324251102171e+00\n-4.4321792426117312e+01\n-9.9329272677810803e+00\n-8.5533841392662391e-01\n-3.1417323984683609e+01\n1.4085261639329302e+01\n2.3870273290414428e+01\n-5.4033722090577477e+01\n-6.2581293554406014e-01\n2.6020899903769648e+00\n-2.2279655439173094e+01\n3.2989299633671991e+00\n-6.2366598377521152e+00\n-2.1741544459490182e+01\n-4.6349487205883309e+00\n-7.9212330618682190e+00\n-2.1752890782940124e+01\n1.5127594585903037e+01\n2.2352805237122581e+01\n-5.8012926873855250e+01\n-1.4925182465105967e+01\n1.0382570354221028e+00\n-3.4348130807560089e+01\n1.4433800332519557e+01\n2.3060227517952772e+01\n-5.6401576416545915e+01\n-1.9244917127687433e+01\n-2.8438518483146078e+00\n-2.8907030074216948e+01\n-1.5188096418513972e+01\n1.0487084108610961e+01\n-4.3332749478707768e+01\n-1.1690193083064788e+01\n8.2265507667099536e-01\n-3.4009119780125317e+01\n-9.6511105728197002e+00\n3.2143966457490332e+00\n-3.7034217828081395e+01\n7.8226751719345824e+00\n2.0967946222102178e+01\n-5.2140800215662161e+01\n1.1415144652651797e+01\n2.1164123166314930e+01\n-5.6109423497829781e+01\n7.2692280360271191e+00\n2.1083973384651095e+01\n-5.1719925801366543e+01\n1.2072070434222454e+01\n2.2256298927578101e+01\n-5.7506342991958419e+01\n-5.0454481485648506e+00\n9.0854369161895097e+00\n-4.5001697233187322e+01\n-5.3986792027647672e+00\n1.0923077593876510e+01\n-4.7304267781877719e+01\n8.6180150884375948e+00\n1.0739795900184895e+01\n-4.7308667436112501e+01\n-4.8552848760112681e+00\n-6.7264463268815229e+00\n-2.3340349162640663e+01\n-3.9525336129725526e+00\n9.6234470013577749e+00\n-4.5903619882216908e+01\n-1.8446812421425391e+00\n1.1927244844264591e+01\n-4.8879413648791179e+01\n-7.7139199915079697e+00\n7.1949206710927482e+00\n-4.2620392605231181e+01\n-3.9748595359095082e+00\n9.4282067784044052e+00\n-4.5505692537150296e+01\n4.0285005854918099e+00\n-1.2990212714499252e+00\n-2.0723042217313406e+01\n-2.5176661542013226e+00\n1.1090080979198971e+01\n-4.7671676644900522e+01\n-4.0615740110380978e+00\n-7.4846377739395509e+00\n-2.2345538567308765e+01\n-7.4235253797151639e+00\n6.2331229014909990e+00\n-4.1303277342992558e+01\n-4.4195658329868763e+00\n5.5381383925926757e+00\n-4.0208570182604014e+01\n-6.7136130481661711e+00\n8.7773366181842434e+00\n-4.4592734376249119e+01\n3.6336371825825577e+00\n1.5169633211058033e+00\n-2.1047258283407619e+01\n-1.5284779554155886e+01\n6.5656685692740586e+00\n-4.1756292151515105e+01\n1.3810722701388517e+01\n7.8292077507278601e-01\n-3.0452078652643642e+01\n9.8544562620268170e+00\n2.0576929469001481e+01\n-5.5464969803017993e+01\n5.6033176197583678e+00\n-2.3655797743545823e-01\n-2.2122154788469771e+01\n1.2201291500439226e+01\n6.1880256598028236e+00\n-2.9917429743226879e+01\n1.2104828839567510e+01\n5.9302520670940737e+00\n-3.0276790250808439e+01\n-2.5646751025910275e+00\n-7.8106571190601581e+00\n-2.1775931898458733e+01\n4.4105056752238614e+00\n-2.6622734180073477e+00\n-2.0438713727839811e+01\n5.9277266726126703e+00\n1.0820731994094293e+00\n-2.3820446214838409e+01\n2.7430847488532206e-01\n-5.8692716697133474e+00\n-2.1519362780382931e+01\n8.9463568033063705e+00\n7.3183109284917673e+00\n-4.2497514627543374e+01\n5.5516142774810726e+00\n-1.3315419628087133e+00\n-2.1741027365365472e+01\n2.3071684595453461e+00\n3.9513087877846425e+00\n-2.3588531324379389e+01\n6.4078140804885200e+00\n-1.6408416029035644e-03\n-2.3378576267605670e+01\n2.4622687241213002e+00\n9.6099059872351198e+00\n-4.5611001980705588e+01\n2.8017572213271049e+00\n9.2822214799447322e-01\n-2.0400669709614913e+01\n-3.6451115300336960e+00\n-7.6129895843704425e+00\n-2.2108460232144793e+01\n-1.1059615021393854e+00\n3.0830234804149010e+00\n-2.3446712629004050e+01\n-1.9868337427777771e+00\n8.8183396657930899e+00\n-4.4565782998991985e+01\n3.4523411563872157e+00\n2.8934170031776514e+00\n-2.2123902956691307e+01\n1.3858772466335422e+01\n5.3810621401059555e-01\n-3.0172112275131727e+01\n1.3697780859858158e+01\n2.9768360442899872e-01\n-3.2143626912562141e+01\n3.5178336665926229e+00\n2.3236301391041492e+00\n-2.1409122017733726e+01\n-2.2070333074550899e+00\n6.7596165292879942e+00\n-4.2016672315615928e+01\n1.4797937675209569e+01\n-1.9675140056292781e+00\n-2.9157243534786236e+01\n1.3113275074746564e+00\n-5.2600245396331902e+00\n-2.2069449138466339e+01\n3.8742897910200833e+00\n-4.4336588804366386e+00\n-2.1955970426487426e+01\n-3.2551811240822437e-01\n-3.9260589770723229e+00\n-2.1490699324044371e+01\n-3.6117654798036249e+00\n-1.6393952400154610e-01\n-2.3193522605212948e+01\n7.9610384168061552e+00\n1.5286197642627915e+01\n-5.3508523884631678e+01\n9.1713468107499043e+00\n1.1701077023290077e+01\n-4.8740449560573936e+01\n7.3972563642608034e+00\n1.3037656053781188e+01\n-5.0507310314986611e+01\n-2.7987396819028545e+00\n-8.1062336132631181e+00\n-2.1365222702384440e+01\n1.3036016380442250e+01\n2.4415541354119330e+01\n-5.3682972922411061e+01\n8.7946838524088182e+00\n2.1058984932529118e+01\n-5.2625891939440450e+01\n8.4808699231538061e+00\n2.0945583207271458e+01\n-5.2486760209993207e+01\n1.1235502997896052e+01\n2.3400994410517466e+01\n-5.2214995331389900e+01\n1.8591111255528538e+00\n9.3469088491711485e+00\n-4.5410681534638954e+01\n-1.2516719540531270e+01\n3.5876110550754485e+00\n-3.7584699967859315e+01\n-4.3479632707500073e+00\n1.3893676537207751e+01\n-4.9194779236641921e+01\n8.9235786152740815e+00\n1.4364687556932317e+01\n-5.1998105983585070e+01\n1.2238960560227936e+01\n6.0921315391666164e+00\n-3.0163257099823237e+01\n-8.8289188139170205e-01\n-3.4231094290514641e-01\n-2.1483908797987159e+01\n1.2790979594556477e+01\n-4.1976616476628115e+00\n-2.6628569636884357e+01\n-1.7584467962701780e+00\n6.8541718279136576e+00\n-4.1958596845139290e+01\n-2.6995951748020302e+00\n-7.5409486093806546e+00\n-2.2140733582983298e+01\n3.6258529758817217e+00\n3.4583644262821460e+00\n-2.2775382209146379e+01\n2.9706953426524607e+00\n-6.0707128494943765e+00\n-2.1719433523024211e+01\n1.4120267177774832e+00\n-3.2354668254088961e+00\n-2.0075460424169076e+01\n3.0955928683259200e+00\n1.9492018627884207e+01\n-4.9288605043090264e+01\n-8.5394040451652309e+00\n2.3241124244147446e+00\n-3.5796092805711496e+01\n-8.8080853352242681e+00\n6.5994019857928476e+00\n-4.1663784002071033e+01\n-1.3702052302020391e+01\n4.6732246344262673e+00\n-3.9171459086651438e+01\n-1.3491504121178743e+01\n4.7766260107701495e+00\n-3.9324911429455803e+01\n-2.0530144456127864e+01\n1.0532164437485749e+00\n-3.4073318673457145e+01\n1.4209803549960432e+01\n2.4638457765174675e+01\n-5.3490180613902844e+01\n-3.2920790942418314e+00\n8.6176106391458802e+00\n-4.4488846170602791e+01\n-6.0216013399158879e+00\n8.4963909998336415e+00\n-4.4323947396306075e+01\n6.1727197516438768e+00\n-8.6760105269146803e-01\n-2.2367364529031303e+01\n1.2934916338855370e+01\n-5.3226097371250978e+00\n-2.4805143727325500e+01\n1.3952249032018342e+01\n-5.2161702004276114e+00\n-2.4777354848624142e+01\n-2.5085677423717261e+00\n-7.8718629110573577e+00\n-2.1695574494955380e+01\n1.2298723053766887e+01\n-4.9335865533556724e+00\n-2.5722631930971378e+01\n6.5295098650630328e+00\n-1.1673056094978411e+00\n-2.1958587295416237e+01\n4.9347083190548000e+00\n1.5416586572083377e+00\n-2.2064318068957178e+01\n1.2050550928147125e+01\n-6.0462833705373624e+00\n-2.3874594116862053e+01\n5.1446978547101079e+00\n-1.3037831323083879e+00\n-2.1548779372457822e+01\n-7.5789912809735824e+00\n2.7139209721306305e+00\n-3.6267433414457500e+01\n-1.0008793054280337e+01\n8.0891192846108932e+00\n-4.3656575538089399e+01\n-6.2514588416441148e+00\n5.9308933046690040e+00\n-4.0778704454338673e+01\n1.1520612268986808e+01\n-4.9271715570727501e+00\n-2.5774343280132229e+01\n-5.2998712634417213e+00\n1.6470969570203398e+01\n-4.3915285231884873e+01\n1.6520523637365812e+01\n2.4433477938590883e+01\n-5.7109122366981239e+01\n1.2929142247448816e+01\n2.3210957118073622e+01\n-5.4991894008525875e+01\n7.5239642829758955e+00\n2.0261395205235882e+01\n-5.3171186029221396e+01\n7.5403507211776271e+00\n2.0509873591588129e+01\n-5.2077133919306888e+01\n5.7743631991601445e+00\n1.9719823920270766e+01\n-5.1542764038783496e+01\n3.5287831420078930e-01\n6.6581188394121527e-01\n-2.0590463115858462e+01\n7.1638216413670763e+00\n8.5300913192428194e+00\n-4.4043818110781068e+01\n1.2716420370358250e+01\n2.3097859511270475e+01\n-5.4806767626633928e+01\n6.0728897559341251e+00\n2.0590266788511428e+01\n-5.0965578717390940e+01\n1.4540976497311577e+01\n2.4120082873719031e+01\n-5.5497105458896669e+01\n1.1737875645966499e-01\n3.1770268160649011e+00\n-2.2324858457097882e+01\n-1.3156394254178117e+01\n3.6547955515512460e+00\n-3.8096594815412949e+01\n-5.1395363100010867e+00\n6.3079499866987776e+00\n-4.1314409616821955e+01\n8.2169374439177414e+00\n9.6668267832897694e+00\n-4.5720330383796508e+01\n3.5166519259777068e-01\n2.4432854927476710e+00\n-2.1422431522096812e+01\n-4.1552447026267600e+00\n-7.5287283557769626e+00\n-2.2270397851041729e+01\n1.3167209056614121e+01\n9.1817419896047632e+00\n-4.1733829237311291e+01\n8.2912556249137417e+00\n9.8472184051517928e+00\n-4.6053482093403105e+01\n-4.7941819764435145e+00\n8.5090743902363464e+00\n-4.4253902845525587e+01\n5.0236032655688918e+00\n1.3132057874838618e-01\n-2.1842319889662729e+01\n-5.0319328516455997e+00\n-6.8214459373455920e+00\n-2.3177093934353962e+01\n-4.3297672591221490e+00\n8.6695830246569265e+00\n-4.4470239781643841e+01\n-1.5371978280087781e+01\n5.0892346578079319e+00\n-3.9824015843448457e+01\n1.9808928720560455e+00\n-8.2637217995672003e+00\n-2.1189509732814717e+01\n2.0986303917071618e+00\n9.7932895166558591e+00\n-4.5945191538867633e+01\n1.4577689219746160e+01\n-1.3920066948426202e+00\n-2.9438593140202880e+01\n1.2540928214714382e+01\n4.0162733251895206e+00\n-3.2475603753600602e+01\n-1.5619755460137756e+00\n-8.4549824375315996e+00\n-2.0886792461085392e+01\n1.9421317758033059e+01\n2.3050430433756695e+01\n-6.2995251789738212e+01\n5.4822253308488609e+00\n-9.0690853759574341e-01\n-2.1797309607847655e+01\n1.5236055266808990e+00\n-2.1607749937025678e+00\n-2.0290579228325285e+01\n4.0422563410391321e+00\n-4.2455363834430555e+00\n-2.2079380224719966e+01\n6.4136018058101385e-01\n3.4166681954306575e+00\n-2.3078634764160697e+01\n1.0035894294266170e+01\n1.0638526386343758e+01\n-4.7234661249672293e+01\n5.9507610621149114e+00\n1.9850436905624044e+01\n-5.1113790060615969e+01\n-1.3811874017053597e+01\n-6.0248133344869439e+00\n-2.4257559926478013e+01\n7.0157407646207650e+00\n-3.3813598328527843e+00\n-2.4340474837648127e+01\n1.1781188002393568e+01\n2.3526174194616580e+01\n-5.3250975965633188e+01\n-4.2835664766399617e+00\n9.7766485693560146e+00\n-4.6223958288981059e+01\n1.8383584643861855e+01\n2.2396998095869264e+01\n-6.1890568493040007e+01\n9.4232713624375055e+00\n-5.5299243523906991e+00\n-2.4942230581564495e+01\n1.4442905939186339e+01\n2.4491889336176886e+01\n-5.4347155640817320e+01\n3.4722772350721526e-01\n2.0157616451596258e+01\n-4.4664095374628943e+01\n1.3453583759068135e+01\n2.4051812031752416e+01\n-5.3927230689860309e+01\n1.8036808831156495e+01\n2.5019957379947762e+01\n-5.7525652656323821e+01\n1.4200899874321252e+01\n2.4393930040033744e+01\n-5.4472891229401284e+01\n1.8025917077509803e+01\n2.4896264453388703e+01\n-5.7751276185180458e+01\n1.3011968661581879e+01\n2.3505472817399056e+01\n-5.4330856710676194e+01\n5.3441666125139502e+00\n2.1941605985682031e+01\n-4.7737319341664573e+01\n6.6921366226954504e+00\n2.0999799832606900e+01\n-5.1157281059294611e+01\n1.9519133649107449e+01\n2.2727686698558454e+01\n-6.3076191774191948e+01\n8.9244492601262753e+00\n2.0820057783615255e+01\n-5.4108590684106311e+01\n1.5455019673184358e+01\n2.1826591855470213e+01\n-5.9603658907278160e+01\n1.7305499684867161e+01\n2.2135735794300839e+01\n-6.1662790002427535e+01\n1.2914684417271419e+01\n1.7605870775748222e+01\n-5.6731190695387909e+01\n-3.5299319627927322e-01\n1.4121933150023001e+00\n-2.1188425872126235e+01\n-1.5080694183185077e+00\n-8.4163045677858968e+00\n-2.1110573241495327e+01\n-1.6352054622755101e+00\n-8.3529161583884477e+00\n-2.0981150827526385e+01\n3.5135058780425839e+00\n-1.0639121240146832e+00\n-2.0818948579295640e+01\n7.7601044491557465e+00\n1.1550593824165865e+01\n-4.8289814629881008e+01\n-2.0191994737530294e+01\n6.5916153904333974e-01\n-3.3593654464276199e+01\n-1.4943460501663088e+01\n7.6713437509989746e-01\n-3.3814812933339020e+01\n2.8315711957973319e-02\n-1.3686225286203497e+00\n-2.0591256932058307e+01\n2.4794411804684930e+00\n9.0961497204600636e+00\n-4.4974113392692303e+01\n5.0936231110740469e+00\n-2.2021551708973455e+00\n-2.0659123273297983e+01\n-1.2958492641413570e+00\n-2.0809060810174111e+00\n-2.0825806151776110e+01\n-9.9812423450984822e-01\n-5.3337173949363867e+00\n-2.3150362010794098e+01\n6.6779325639860705e+00\n4.5291017222671431e-01\n-2.3713326089783639e+01\n2.6428231410383050e+00\n-5.5868262385350604e+00\n-2.2659850882752583e+01\n2.8359200348478479e+00\n-5.8557727609187920e+00\n-2.2546884118004030e+01\n9.8970710128996746e+00\n-4.7314947509136331e+00\n-2.6016275952258972e+01\n8.9755659506539089e+00\n-6.1779465929614652e+00\n-2.4048047684169159e+01\n1.1139115527991720e+01\n-5.9283492081180009e+00\n-2.4236237572815195e+01\n1.5320332163914872e+00\n8.8913626424761887e+00\n-4.4691338705677715e+01\n7.8725209214405405e+00\n2.1113218591473082e+01\n-5.2144011490980162e+01\n1.2102342675244763e+01\n2.2711041066065945e+01\n-5.4409843615410580e+01\n3.6055162333293369e+00\n-1.6448484026951051e+00\n-2.0485584324298312e+01\n1.3885537602490460e+01\n1.3829653857698482e+01\n-5.1625974609741064e+01\n1.5588614986576754e+00\n3.8107668358167670e+00\n-2.3608604914001830e+01\n-1.3559579402061605e+01\n-8.2348007500326634e+00\n-2.1230020049700467e+01\n-1.1820965346963600e+01\n-8.6910485235932011e+00\n-2.0612080590596264e+01\n-5.0460486830048978e+00\n1.0458569163809306e+01\n-4.6927443735272483e+01\n-6.4413527706713296e+00\n7.7807018010377282e+00\n-4.3368120932350621e+01\n9.9517426044518871e+00\n-4.5021406184078900e+00\n-2.6267175431356971e+01\n-1.4535084121328751e+01\n1.0421949668409769e+00\n-3.4173947848132983e+01\n-1.7607243025741848e+00\n-4.1086412194218278e+00\n-2.2885542394326624e+01\n-3.0503369734412074e+00\n-8.0185284425936914e+00\n-2.1591983206387987e+01\n-1.6111858344804135e+00\n-1.5815268112098333e+00\n-2.1432882167370270e+01\n6.1836402343471064e-01\n3.8127359013572265e-01\n-2.0444320958720212e+01\n-9.0066484422795268e-01\n-4.7136357480620861e+00\n-2.2650954855579847e+01\n1.3645425450500728e+01\n-5.6185752165189085e+00\n-2.4369653837425670e+01\n1.3078320121115986e+01\n1.3122262631459556e+00\n-3.3899513449682971e+01\n6.7421209356441780e+00\n1.0171734849280783e+01\n-4.6381339784563494e+01\n1.0775323215708383e+00\n-1.5122059837686328e+00\n-2.0450706637018811e+01\n6.4458417230303064e+00\n-4.5851258898727290e+00\n-2.3340930213596330e+01\n-3.7288901184638825e+00\n9.0746056310330641e+00\n-4.5024829137968744e+01\n-1.0036094624850934e+01\n1.1794521026488106e+01\n-4.5432729543008506e+01\n1.3221239035140682e+00\n-2.6981834386721544e+00\n-1.9994429921483846e+01\n2.1238879003768529e+00\n8.0617358994844572e+00\n-4.3586855689837527e+01\n1.5758483776919277e+01\n2.2002947969135334e+01\n-6.0849473498371715e+01\n1.4520906816265406e+01\n2.3007101769174930e+01\n-5.6843003833515645e+01\n1.1954615304478272e+01\n-2.8447962964251245e+00\n-2.8635175560988554e+01\n1.4999304393696244e+01\n2.4015781880294064e+01\n-5.6071667375476792e+01\n5.8249062124689823e+00\n1.9531410325498921e+01\n-5.2324629019104719e+01\n1.5758483776919277e+01\n2.2002947969135334e+01\n-6.0849473498371715e+01\n1.6673445953292411e+01\n1.6882450661924494e+01\n-5.5960219208499858e+01\n8.4126221727475965e+00\n9.6724478656434947e+00\n-4.5768072543120105e+01\n4.3681653718915516e+00\n1.8442099744483581e+01\n-5.2360011380949004e+01\n1.7257212090614509e+01\n2.3365377115514036e+01\n-5.9192514613093046e+01\n7.0192586960058252e+00\n1.2570644874782953e+01\n-4.9736222073877045e+01\n1.0990307596795562e+01\n-2.3385436720945325e+00\n-2.9385267097908848e+01\n9.1323305573108211e+00\n1.3958835654776992e+01\n-5.1687260819574888e+01\n4.3766648517403750e+00\n-2.7621264830779899e+00\n-2.0544703877393392e+01\n-4.9766903805266001e+00\n4.7692387617526739e+00\n-3.9053712121537139e+01\n6.2388008637221697e+00\n-9.8472510494892629e-01\n-2.2208832760637719e+01\n4.3235914885775744e+00\n-2.4430042610408380e+00\n-2.0331338324548472e+01\n-2.2648612643567647e+00\n6.5476206620239283e+00\n-4.1481254071323370e+01\n1.3717023543741789e+01\n4.6423174498922154e-01\n-3.1536963389968477e+01\n-1.1156064710167060e+01\n1.0778368420347997e+00\n-3.4187255929727357e+01\n4.4341759659976354e+00\n2.5884506130566036e+00\n-2.2422945707577167e+01\n1.4335485257346592e+00\n3.0815128400585362e-01\n-2.0210645593767683e+01\n-1.5694974228784460e+01\n-6.8668539766252259e+00\n-2.3107947964545886e+01\n-5.9847548233585766e+00\n6.1853732317518260e+00\n-4.0920133094751087e+01\n1.0104004830058503e+01\n8.6887959873479677e+00\n-4.4287049475329212e+01\n1.0416875634147695e+01\n2.1583827331896924e+01\n-5.4202784502002288e+01\n9.8616155810930728e+00\n8.3031126545561342e+00\n-4.3664681622763098e+01\n8.9020006170488077e+00\n2.1274144773379149e+01\n-5.3528949608907979e+01\n7.1896025922666889e+00\n2.0372346101534184e+01\n-5.1894096264405846e+01\n1.0183536234498765e+01\n2.1511777867123666e+01\n-5.4357461062842560e+01\n5.8875031123530643e+00\n-1.3866914025148056e+00\n-2.1598521485689314e+01\n2.6248685825376783e+00\n-2.5178523870203153e+00\n-2.0214610207751392e+01\n-5.6174247318127852e+00\n-6.8730921630130846e+00\n-2.3168825867852018e+01\n-5.0136836708719477e+00\n7.5142686914169330e+00\n-4.2919662449487909e+01\n5.3736365338632819e+00\n-1.2854582247683199e+00\n-2.1737592832674622e+01\n-5.0069977837155015e+00\n8.3428526595969590e+00\n-4.3992194183162923e+01\n-3.5640095877191391e+00\n9.0710322061928430e+00\n-4.4777864948699744e+01\n1.1662885394300107e+01\n-4.3101930846054781e+00\n-2.6727959374017459e+01\n1.4149603156460190e+01\n1.3719951955292199e+01\n-5.1060017264739294e+01\n-1.0768497561174891e+01\n1.0774844860674250e+01\n-4.3679837706515563e+01\n9.4694207783594653e+00\n2.1116951565325241e+01\n-5.3488850295567204e+01\n8.5518283783477838e+00\n2.0778884034563173e+01\n-5.2971158477796067e+01\n5.7611391982739830e+00\n1.9709332772105867e+01\n-5.2007059989899517e+01\n1.7305499684867161e+01\n2.2135735794300839e+01\n-6.1662790002427535e+01\n-4.7434366421439291e+00\n1.6340670709606059e+01\n-4.4879306823729820e+01\n-1.6467625173753213e+01\n8.5476790365781028e+00\n-4.3037000316229438e+01\n-9.3342606794869312e+00\n1.5765397756830966e+01\n-4.0402099335160685e+01\n6.3203886770717128e+00\n2.1008785441496695e+01\n-5.1006695120542098e+01\n-2.3414499484544833e+00\n6.4855080555629208e-01\n-2.3139349355764601e+01\n1.6290841768223199e+01\n2.1831846023035361e+01\n-6.1399010813932364e+01\n9.2723212709430882e+00\n2.0348577825432201e+01\n-5.5306156458227754e+01\n8.0629061559093191e+00\n1.0815404755132350e+01\n-4.7365508761130741e+01\n-4.7327978432742874e+00\n-6.7117363337143425e+00\n-2.3340328374028605e+01\n1.4494086118732179e+00\n-8.4589324565432573e+00\n-2.0943345347076775e+01\n5.8926723662801894e+00\n-3.3318469926671748e+00\n-2.2865085772056311e+01\n-2.5775930684359629e+00\n-8.0577385251527236e+00\n-2.1486037997050925e+01\n-1.8122447870869043e+00\n-1.5839005238297035e+00\n-2.1444298448710562e+01\n6.5424161571074668e-01\n1.8304103507871268e+00\n-2.0841279227195422e+01\n-1.6475018798663890e+00\n-2.5605209383824501e-01\n-2.1966019129604856e+01\n4.3555477449545243e+00\n-9.8429200749803003e-01\n-2.1167197245757528e+01\n3.9977182399179811e-01\n3.7373852280165485e+00\n-2.3072822319309804e+01\n5.7138758242896017e+00\n-2.2414942440423413e+00\n-2.1407842612473161e+01\n7.3973830331600610e+00\n1.4606040143664723e+01\n-5.2550915685264997e+01\n-2.8059016856856740e+00\n-7.5789656525969953e+00\n-2.2026850538235902e+01\n-1.6479494357877518e+00\n1.1457073103520679e+01\n-4.8265951316428691e+01\n-6.9842064965913924e+00\n1.5571876285018693e+00\n-3.4363148782311718e+01\n6.5119372362548447e+00\n9.9808969043281692e+00\n-4.6220528517191681e+01\n-5.3448527914918342e+00\n-6.8362616767246687e+00\n-2.3248205351557186e+01\n8.9236016423436961e+00\n2.0373462240544669e+01\n-5.4835025372651167e+01\n8.9874254097462725e+00\n1.0483553688668973e+01\n-4.6807163488478452e+01\n-3.9931587206690304e+00\n1.6153220924079430e+00\n-2.5557078794046429e+01\n-9.1448097318851826e-02\n2.7285698495380570e+00\n-2.1982568855817838e+01\n8.2236858801507839e+00\n1.4300549850370581e+01\n-5.2062174259630424e+01\n6.1377138973550887e+00\n-2.4564818136808939e+00\n-2.2390505626952976e+01\n6.6510591681641342e+00\n-7.4419267357806405e+00\n-2.2364568708097693e+01\n-1.6439869555906654e+00\n1.1184100651414161e+01\n-4.7863297923134496e+01\n1.3435824114824896e+01\n-5.2734737006403360e+00\n-2.4892593259297382e+01\n-1.4718544533797751e-01\n-9.3425395735318673e-01\n-2.0987335985864373e+01\n-2.6987358487044251e+00\n-1.1626117196175951e+00\n-2.1918724663435647e+01\n1.4252544437280873e+01\n-2.9854581670583619e-01\n-2.9443191904462335e+01\n6.2262307134654229e+00\n1.0234131378895239e+00\n-2.3774256059073110e+01\n1.3427976218557992e+01\n1.5993531964859646e+00\n-3.1078987831354368e+01\n-3.0057827064175551e+00\n6.3832882667762592e-01\n-2.4193350183079904e+01\n-1.1643482123993046e+01\n7.6954511987813055e+00\n-4.3220509368080812e+01\n5.7442322869830198e+00\n-1.2738180120668241e+00\n-2.1767224821836983e+01\n3.5293546233708830e+00\n-1.3817846630086810e+00\n-2.0671322093367667e+01\n6.9371917150391038e+00\n-4.5601331293899205e-01\n-2.2929352293667257e+01\n1.1354603793439995e+01\n-4.3212645818158899e+00\n-2.6609596060175818e+01\n-6.2893841201402196e+00\n1.4186341045134981e+01\n-4.5753771867160488e+01\n2.9397880014464599e+00\n-8.2925603181740009e+00\n-2.1239030327796872e+01\n-1.4727866606322731e+01\n-5.1627815224232165e+00\n-2.5583220729056027e+01\n1.3449678757783925e+01\n2.3438618455774851e+01\n-5.5369531566170089e+01\n1.2526442568698460e+01\n5.5946969559144115e+00\n-2.9280834327371302e+01\n6.3310870629710827e+00\n9.5271830217271916e+00\n-4.5662967122563884e+01\n3.9854437708158250e+00\n-2.2577420061419948e+00\n-2.0555287101382063e+01\n1.2534742087059172e+01\n-5.9449130547649371e+00\n-2.3877101861263231e+01\n5.1275677436288039e+00\n-2.3927933115399620e+00\n-2.0377926733830513e+01\n6.3735059110583325e+00\n-1.1054888581103782e-01\n-2.3288744035029556e+01\n-1.8441329401591580e+00\n1.1046510476599035e+01\n-4.7772357491501637e+01\n3.5362053564085492e+00\n1.6146711241707912e+01\n-5.4622615661027822e+01\n-3.9930068743623162e+00\n9.0525542909264907e+00\n-4.5246135638163068e+01\n6.6880056022602528e+00\n2.0431024304811501e+01\n-5.1132757097004458e+01\n1.2646295494792472e+01\n2.2971547168613316e+01\n-5.4841574898578315e+01\n1.2577021996493086e+01\n2.2000527048886958e+01\n-5.7809482456523405e+01\n1.5861410511707291e+01\n2.1931373814642004e+01\n-6.0637783051714251e+01\n1.7996592541165857e+01\n2.2375317015835918e+01\n-6.1258514202515478e+01\n9.8048029659929608e+00\n2.1320467612498380e+01\n-5.3778598104480004e+01\n6.3958260287343602e+00\n2.0309857355878616e+01\n-5.0859054142971850e+01\n5.4807825334540530e+00\n1.9535649151489309e+01\n-5.1661446312212512e+01\n1.5861410511707291e+01\n2.1931373814642004e+01\n-6.0637783051714251e+01\n6.5235441620003334e+00\n2.0701065002215451e+01\n-5.1245001409187431e+01\n1.5112076817339839e+01\n2.4379493740409014e+01\n-5.5333583391806556e+01\n1.6319257346427317e+01\n2.2262561089234087e+01\n-5.9695800608088831e+01\n7.3596265410352881e+00\n2.0680767049983899e+01\n-5.1555324088623593e+01\n4.7923003285245853e+00\n2.0006970030200293e+01\n-5.1588575377624785e+01\n1.6274799691404613e+01\n2.2057249421747727e+01\n-6.0367688049732678e+01\n2.0155432857574663e+01\n2.3085622688801561e+01\n-6.3793123224057453e+01\n7.1295526712144284e+00\n2.0525345486342019e+01\n-5.1300383539559881e+01\n9.7032287016310512e+00\n2.1117237537478044e+01\n-5.2099814415876828e+01\n1.1213503092578568e+01\n2.2276210082855840e+01\n-5.5115812804870146e+01\n1.9773527236505132e+01\n2.2947985734056580e+01\n-6.3291630733605537e+01\n2.0308113299033543e+01\n2.3148377535106537e+01\n-6.5072486289692236e+01\n1.1297552589531039e+01\n2.2464084707575857e+01\n-5.3707779877381832e+01\n1.1213503092578568e+01\n2.2276210082855840e+01\n-5.5115812804870146e+01\n9.4971608520161244e+00\n2.1992897213206348e+01\n-5.3025649221156471e+01\n1.0088009492951507e+01\n2.1445789413261696e+01\n-5.3971588150558098e+01\n7.1354207990872176e+00\n2.1228407120603457e+01\n-5.1220844464961480e+01\n9.5198398792621610e+00\n2.1058556139518497e+01\n-5.1877764086478592e+01\n5.8464385282368729e+00\n2.0353759327061670e+01\n-5.0733114323520603e+01\n4.7923003285245853e+00\n2.0006970030200293e+01\n-5.1588575377624785e+01\n-3.5159754473670501e+00\n-7.9851210880236687e+00\n-2.1590198991971420e+01\n6.8247412752331709e+00\n8.4876647197064106e+00\n-4.4197586296820134e+01\n1.0477667063126084e+01\n1.0176968087231243e+01\n-4.6542358004188735e+01\n6.8247412752331709e+00\n8.4876647197064106e+00\n-4.4197586296820134e+01\n-4.6531261204320788e+00\n-7.5378404878703327e+00\n-2.2266331179035358e+01\n8.0629061559093191e+00\n1.0815404755132350e+01\n-4.7365508761130741e+01\n1.1177349822193170e+01\n-4.6281756483681447e+00\n-2.6059579636983361e+01\n-1.6264229197452909e+00\n-7.9640858210697099e+00\n-2.1562485809808923e+01\n6.8051057512606690e+00\n1.0078457752317870e+01\n-4.6646779146761006e+01\n-3.8784862034192518e+00\n-8.4593423711378737e+00\n-2.0911040300949338e+01\n1.0126403502585179e+01\n-5.4947045413275450e+00\n-2.4964672767299817e+01\n-5.2399378899973934e+00\n-7.1125623801525188e+00\n-2.2960291511763817e+01\n6.8855948368063782e+00\n-7.4664859118102189e+00\n-2.2219527706738585e+01\n8.1256118144377290e+00\n1.0143054959769550e+01\n-4.6371756267051992e+01\n-1.8013856199417571e+00\n6.9824643524200525e+00\n-4.2162648212751009e+01\n-2.6615778772516725e+00\n7.1545720640097601e+00\n-4.2353242053651627e+01\n-2.0658882515005650e+00\n7.1343684183322900e+00\n-4.2211838575928823e+01\n1.1262159863746309e+01\n-4.6439503400145794e+00\n-2.6039469734890453e+01\n1.8510431694729539e+00\n8.2090295484876261e+00\n-4.3778410217843373e+01\n7.8436968608109057e+00\n9.6883929568941891e+00\n-4.5867189779590028e+01\n-4.3876488697133826e+00\n-8.3492477355401302e+00\n-2.1166741062976403e+01\n4.4215230183250940e+00\n2.2790813748251995e+00\n-2.2020550344234401e+01\n-1.3046674848248543e-01\n3.2744110081313287e+00\n-2.2636592546524245e+01\n1.3255232665218985e+01\n9.0902548364183378e-01\n-3.3691204160725128e+01\n-3.2407583408180747e+00\n-7.8861932650118254e+00\n-2.1693423844498717e+01\n9.0406767634802812e+00\n-6.6975846633880218e+00\n-2.3357713903167134e+01\n4.8216805797245295e+00\n-1.4691710464138645e+00\n-2.1260155743262402e+01\n9.9648745103279666e+00\n-4.7428451840963781e+00\n-2.6018184664838007e+01\n-1.1113142330506343e-01\n3.3280797414257131e+00\n-2.2668850280838463e+01\n1.6420634296409990e+01\n2.2072775938429835e+01\n-6.0817332718088657e+01\n1.0678560040317777e+00\n-2.7569704135524784e+00\n-1.9937110512496666e+01\n2.1102260966606168e+00\n9.2239227807663315e+00\n-4.5055131612652666e+01\n8.2013611002181825e+00\n1.0708575682940941e+01\n-4.7269308985976785e+01\n1.0187494981071614e+01\n8.4117089667379474e+00\n-4.3922306001904772e+01\n-4.8817334506566723e-01\n-1.0423758641356928e+00\n-2.0943882970638217e+01\n-1.9207745443695838e+01\n-2.7689362113576657e+00\n-2.9046067372906546e+01\n3.2238342016962420e+00\n-5.8393708082924212e+00\n-2.1615579274618089e+01\n-7.1905056104307192e+00\n1.6758330634627434e+01\n-4.1289538781939562e+01\n1.0205195926652927e+01\n8.8396994278520431e+00\n-4.4520255384388626e+01\n-7.1974559526125601e+00\n-1.9002171379790884e+00\n-3.0017342418497044e+01\n1.0293194358776251e+01\n-5.0399366564659038e+00\n-2.5481490276840777e+01\n-1.4971228851042209e+01\n5.5601396353412156e+00\n-4.0472299854705312e+01\n4.6528041068416970e+00\n8.6607068872621917e-01\n-2.1520554734030320e+01\n-1.4788447130077188e+01\n6.2337064185900930e+00\n-4.1365216635779852e+01\n-5.2162339457468336e+00\n8.0138232455199230e+00\n-4.3602710892146199e+01\n-1.3067696862776579e+01\n-8.5623565184585964e+00\n-2.0747496773995948e+01\n-7.4186102615122342e+00\n7.4392403040806627e+00\n-4.2926022275511926e+01\n3.6166471535881972e+00\n-2.9872608795376134e+00\n-2.0257095168487794e+01\n4.5469462134016840e+00\n-2.7620180310812512e+00\n-2.0704443416623523e+01\n-1.3996720450489052e+01\n-7.4932425932571194e+00\n-2.2306317924870743e+01\n-1.5196858461965876e+01\n-7.0468890660686769e+00\n-2.2855149620670758e+01\n-6.7705298567742505e+00\n8.4938699760322738e+00\n-4.4258245976642634e+01\n7.4112017073376721e+00\n1.2685330934493221e+01\n-4.9913370317026157e+01\n-1.3719173452248244e+01\n-7.2693604380733294e+00\n-2.2591625676567915e+01\n-1.1793634462873399e+01\n-7.7765809864248920e+00\n-2.1900449083810802e+01\n2.6291843049496744e+00\n-4.0713798070722779e-01\n-2.0336773858725842e+01\n-3.0238100279877860e+00\n1.0900460308140703e+01\n-4.7363186320331039e+01\n9.1717428110194010e-01\n-8.4061785860875968e+00\n-2.1085811414932678e+01\n-5.2191227203305335e+00\n-6.7615384284710602e+00\n-2.3284585458354520e+01\n1.6741198130045354e+00\n9.2368023989793802e+00\n-4.5120947853506948e+01\n-6.7143449387651113e-02\n-2.2063781523645507e+00\n-2.0603752961008983e+01\n-1.3446123647028003e+01\n-7.5262276192615190e+00\n-2.2268438438181530e+01\n-5.1841019241029418e+00\n-6.8445217870814545e+00\n-2.3170714741687895e+01\n-2.1958334344832964e+00\n-8.5148703983655061e+00\n-2.0772121920108166e+01\n-1.3221723112603028e+01\n-8.3984022781406740e+00\n-2.0994040286544934e+01\n-1.4788447130077188e+01\n6.2337064185900930e+00\n-4.1365216635779852e+01\n-5.1521651745754644e+00\n-7.1829776653800437e+00\n-2.2728540882551471e+01\n-1.3145431525402184e+01\n-8.4300677493963345e+00\n-2.0897760748823877e+01\n-2.6601889143943720e+00\n1.1414184274202910e+01\n-4.8181184107650481e+01\n-7.1400895772276121e+00\n6.2927168871320172e+00\n-4.1213040211626165e+01\n6.9327995240054747e+00\n2.0585824907856125e+00\n-2.6252815164289316e+01\n-1.3616777844156474e+01\n-8.2412340471340588e+00\n-2.1200443296594592e+01\n-1.4948846508846703e+01\n1.1781547016572615e+00\n-3.4513575545297329e+01\n7.3945231962599776e+00\n1.3916671613021012e+00\n-2.5432026147174476e+01\n-9.9598539794136958e+00\n-4.0801812100178774e+00\n-2.7083490469551720e+01\n-9.2428743656759131e+00\n-4.5848874324064743e+00\n-2.6423976405048759e+01\n3.0272994026183619e+00\n-5.9026095737224340e+00\n-2.2549425771465579e+01\n6.8094006440744632e+00\n5.1002556076828331e-01\n-2.4175385569533461e+01\n-2.3404137736718331e+00\n-7.8398558544989791e+00\n-2.1764000510252586e+01\n-3.5680379994087308e+00\n-7.9944315248050959e+00\n-2.1579189312943381e+01\n-4.9980628804808962e+00\n6.7443533825089013e+00\n-4.1817504815630393e+01\n1.3714641622528351e+01\n-2.0874790238000915e-01\n-3.2154420744142655e+01\n-8.0530601335049532e+00\n7.1624410272526253e+00\n-4.2436801946593647e+01\n1.6319257346427317e+01\n2.2262561089234087e+01\n-5.9695800608088831e+01\n1.2546459881904267e+01\n2.1650488218916720e+01\n-5.7732502587260228e+01\n-5.3192885421258511e+00\n-8.5332247115395834e+00\n-2.0858067126029514e+01\n-2.4004548048865377e+00\n7.0364834274996690e+00\n-4.2182386943639500e+01\n-1.5184633114096055e+01\n8.0339195274163688e-01\n-3.3945325899188198e+01\n-3.8013146524080739e+00\n-7.7326731111707243e+00\n-2.1963836545663284e+01\n-1.3457733278422779e+01\n8.4162866868909223e+00\n-4.4122048977885221e+01\n-1.6635992530604121e+01\n6.3502271635726304e+00\n-4.1542007609146850e+01\n1.2556507218460970e+01\n-3.6874983055709354e+00\n-2.7396075527285010e+01\n-3.6558814320722242e+00\n-8.3852389330071393e+00\n-2.1074557883126911e+01\n-4.2673858356794954e+00\n9.4046917476827421e+00\n-4.5539870136872231e+01\n-1.3406256641496217e+01\n-5.7107391231189530e-01\n-3.2016783834787844e+01\n-1.3174958925291271e+01\n-8.5339826797509790e+00\n-2.0733616678818400e+01\n-1.2808118167887660e+01\n-8.5106624860883731e+00\n-2.0758562891063210e+01\n1.1339573798422542e+01\n-5.6042175012415383e+00\n-2.4488505332591579e+01\n1.2688356502772265e+01\n-5.4092207861510291e+00\n-2.4881262711333367e+01\n-1.0644176075705619e+01\n-7.5797980801856237e+00\n-2.2303431923776699e+01\n-1.8810292686746346e+00\n-2.1791208340144635e-01\n-2.2051702901964330e+01\n-1.3058242412828720e+01\n-7.3759620688956105e+00\n-2.2399956208305280e+01\n3.4754420571241194e+00\n3.3728638908570767e+00\n-2.2483613467526400e+01\n1.3762888723053775e+01\n-5.6321277438361017e+00\n-2.4503495269587486e+01\n4.1106777155927814e+00\n-1.0122535185703625e+00\n-2.1102344603985500e+01\n8.5901166359341588e+00\n1.3143211601173290e+01\n-5.0553269885274261e+01\n1.0417766428272923e+01\n-3.3530879380640499e+00\n-2.7891163999264414e+01\n1.1539851196519191e+01\n-4.9223690172793830e+00\n-2.5629518613551451e+01\n3.7800043133072614e+00\n1.8143695591893909e+01\n-5.2067191212885376e+01\n-6.8107813284966658e+00\n7.5799942466081749e+00\n-4.2950895249602738e+01\n-4.3196111976034217e+00\n-6.7814084170318409e+00\n-2.3295477989914556e+01\n5.8963985962222409e+00\n-9.8164807663158482e-01\n-2.2231051734626558e+01\n4.0491026990668555e+00\n-2.3794287992971994e+00\n-2.0340571605151343e+01\n3.1177012734951384e+00\n-2.4291514669802661e+00\n-2.0352926555877474e+01\n-3.5383888698620622e+00\n9.9866444026665544e+00\n-4.6248080117551076e+01\n-1.3511572390997884e+01\n-6.9745952541863483e+00\n-2.2970913510465465e+01\n3.0135169873574004e+00\n-5.8444567294315055e+00\n-2.1553875676362939e+01\n-1.3439782339831090e+01\n-8.0663234941960358e+00\n-2.1348307703855394e+01\n-2.1014596560445331e+00\n-8.3343351701925457e+00\n-2.1029758465939299e+01\n9.3643592081015896e+00\n-5.3733263938727776e+00\n-2.5116024366344512e+01\n-9.1486180299204758e+00\n-4.4525729158729952e+00\n-2.6471569569567372e+01\n-2.6779635181530366e+00\n7.5129642505425398e+00\n-4.2826056589188276e+01\n1.5637182378486509e+01\n1.4943768836225509e+01\n-5.2668911603628310e+01\n9.9013858556283409e+00\n1.2485760403517300e+01\n-4.9640295960327727e+01\n-1.8493016041568768e+00\n-7.9999155860798812e+00\n-2.1623712563126599e+01\n5.2066105192522381e+00\n-6.2139081046192135e-01\n-2.1563434619586140e+01\n8.4034710034421654e+00\n-6.7121440991082588e+00\n-2.3258369710968250e+01\n6.1377138973550887e+00\n-2.4564818136808939e+00\n-2.2390505626952976e+01\n1.0223537033667375e+01\n-3.6011543037349893e+00\n-2.7722366826752033e+01\n3.6465790275662391e+00\n3.1923521195493869e+00\n-2.2330898135389571e+01\n1.3173666323867202e+01\n-5.8804124975723839e+00\n-2.3894762692697672e+01\n1.3370442448630847e+01\n8.6244973262468978e+00\n-3.8992035480098359e+01\n1.3555161955919282e+01\n8.5625697147421516e+00\n-3.9169207738388572e+01\n-3.4733336060991569e+00\n-8.3564327684696345e+00\n-2.1259053216144032e+01\n1.3555161955919282e+01\n8.5625697147421516e+00\n-3.9169207738388572e+01\n-1.4477238262432364e+01\n5.8337875595167050e+00\n-4.0616320916608927e+01\n1.3333881501589335e+01\n1.1462158143280860e+01\n-3.5965692994303559e+01\n1.1536452718511951e+00\n-8.2293136454985358e+00\n-2.1320343070206562e+01\n1.3134251798776203e+01\n1.3469956767751464e+01\n-5.0968672433862608e+01\n-6.4496344855430054e+00\n6.7674841669212835e+00\n-4.2035032448072272e+01\n1.4475041532913737e+01\n-1.5376416411553395e+00\n-3.0452056611083641e+01\n-2.9844309206364588e+00\n-8.1786170243087586e+00\n-2.1336349785814047e+01\n5.3894751730679173e+00\n-4.0267944365592960e+00\n-2.2549117398560679e+01\n-4.4615729069337178e+00\n-6.4945617169381791e+00\n-2.3655837062257177e+01\n-7.0212630833529248e+00\n-3.3124594989946323e+00\n-2.8069716333488341e+01\n-3.1267570747753077e+00\n9.2975648762058050e-01\n-2.4588284604601302e+01\n-3.9200810926492484e+00\n-5.6931959676012180e+00\n-2.3893156978077442e+01\n1.4058033388842789e+01\n4.6331210173033566e-01\n-3.0040340029174377e+01\n6.3234926831920966e+00\n-2.0297355145120549e-01\n-2.3174933771096537e+01\n-1.9032745304786307e+00\n1.6958340819933559e+00\n-2.3411690239739702e+01\n-4.0065004073216635e+00\n-2.3355017772785742e+00\n-2.5783515007371065e+01\n5.1262129292447201e+00\n3.4179480497953446e-01\n-2.2017245652633104e+01\n1.2645263064645813e+00\n-2.1898613687668447e-01\n-2.0242733488619177e+01\n-3.0786252809274304e+00\n8.7571149165250306e-01\n-2.4570394577702359e+01\n-1.2618942511161572e+01\n-5.4276888524877140e+00\n-2.5099710808148000e+01\n1.4100994584547910e+00\n-1.3840370334408953e+00\n-2.0539350286533438e+01\n-1.8170103768429895e+00\n-3.6256550753754073e+00\n-2.2185526669200726e+01\n-4.5243681241308691e+00\n6.3850259517460399e+00\n-4.1297935067941090e+01\n8.4317397262911378e+00\n1.9951407078339958e+01\n-5.4189766578904901e+01\n-3.9035658667075119e+00\n1.1590076474312799e+01\n-4.8559559489778891e+01\n1.1031831256624919e+01\n1.5098811320343563e+01\n-5.3390327717854007e+01\n1.4974688826593811e+01\n1.3648002505225264e+01\n-5.1315588911625575e+01\n2.9492056658696968e+00\n-3.9304895702813396e+00\n-2.0832348180094222e+01\n5.4775230116039508e-01\n-5.8910525295232992e+00\n-2.1421572939968566e+01\n-4.6993485751326425e+00\n-7.9723397572126826e+00\n-2.1606056201348004e+01\n-1.5473837136616234e+01\n7.5503976760156633e+00\n-4.3095769924321431e+01\n-1.4396580935728027e+00\n-1.6080946037750699e+00\n-2.1319785271569394e+01\n3.1727539863234284e+00\n-2.1571544468406167e+00\n-2.0503671279142033e+01\n-4.1960373800195718e+00\n6.3736912997338013e+00\n-4.1332519516113614e+01\n6.1333618693558387e+00\n1.5733370787666603e+00\n-2.4447296689626743e+01\n9.9464023291139014e+00\n1.3509830353468194e+01\n-5.0860988102852161e+01\n9.8953712425547025e+00\n1.3336028954494138e+01\n-5.1630519700762051e+01\n6.4406745647057511e+00\n8.5447085782501446e+00\n-4.4185430791124972e+01\n-6.7222419760797445e+00\n2.0001333792346072e+00\n-3.5326349286335642e+01\n1.6242445111663802e+01\n1.4447948097064771e+01\n-5.2318711011457907e+01\n6.4690970061760771e+00\n1.9655052693847527e+01\n-5.2543180982721758e+01\n9.5511967896712875e+00\n-5.4296877015101286e+00\n-2.4842738912273649e+01\n2.2389589808045907e+00\n-8.5786273337844285e+00\n-2.0731669516062738e+01\n1.5115222543182142e+01\n1.5715038508921563e+01\n-5.4071768266699436e+01\n7.4694514433296035e+00\n1.6199348396514662e+01\n-5.4597899989334429e+01\n7.0732600795257730e+00\n1.3155242420643440e+01\n-5.0546406874577649e+01\n1.0570622188242229e+01\n9.3230818434054381e+00\n-4.5150190523347327e+01\n-6.9749234722466369e+00\n1.9713883508068859e+00\n-3.5310983359402265e+01\n1.0943307722732253e+01\n-3.5025952776003559e+00\n-2.7527885296118065e+01\n-6.9909827418792441e+00\n1.8862764383366299e+00\n-3.5206547236619073e+01\n1.4717604917371608e+01\n1.1952809795061588e+01\n-4.8606733205672079e+01\n-2.7070487312976854e+00\n7.0237437720561342e+00\n-4.2186854556800562e+01\n9.6176728942269563e+00\n-5.9732420125935661e+00\n-2.4273961874956342e+01\n1.2885386815399599e+01\n1.7260343649031764e+01\n-5.6412061161337490e+01\n-8.1512965914549940e-01\n-1.8946480343542902e+00\n-2.1042254251555015e+01\n1.0191716821890976e+01\n-6.2243985546709464e+00\n-2.4011463709397944e+01\n9.8340616640516139e+00\n8.1732384827625140e+00\n-4.3900309851427487e+01\n9.3096619394397511e+00\n1.2659566756398398e+01\n-4.9674207713059594e+01\n-2.6246262515180314e+00\n6.4958952933569396e+00\n-4.1449550873143195e+01\n-1.5120040812989521e+01\n1.1083377643091563e+00\n-3.4155964631855866e+01\n1.0104327630725352e+01\n-4.8723578253191677e+00\n-2.5793916865271058e+01\n1.3575872296462538e+01\n9.7526354821616703e+00\n-3.7462867405973064e+01\n6.7453814427304168e+00\n1.4736110394965516e+01\n-5.2602812000476661e+01\n1.7153282032769883e+00\n-8.2620337043364334e+00\n-2.1221237043585258e+01\n-6.6592467806538247e+00\n-4.0783316591526200e+00\n-2.7025612187329035e+01\n-1.4359694599515629e+00\n2.1448010082880278e+00\n-2.2923545297513652e+01\n1.0237203984057290e+00\n-5.0976548407196223e+00\n-2.1858212084410674e+01\n-4.8938874922208138e+00\n9.9383301665432313e+00\n-4.6076814315159723e+01\n-3.2721546601401177e+00\n8.5955582714321854e-01\n-2.4589622182247524e+01\n1.0162477757333351e+01\n-6.3319675097131132e+00\n-2.3693521462704052e+01\n-2.8137223983850799e+00\n-4.1827520411635968e+00\n-2.4363839312917666e+01\n1.3491418757419867e+01\n8.4510980583018203e+00\n-4.0244956830176811e+01\n1.3558970325445820e+01\n7.4929171247343325e+00\n-4.1473815356421710e+01\n4.6055023067344472e+00\n-2.2093265247858698e+00\n-2.0635129043170579e+01\n-5.0124916883740278e+00\n-7.8696697699431635e+00\n-2.1767840613748458e+01\n-2.8193968732678565e+00\n-8.2381058123324635e+00\n-2.1265578096881985e+01\n1.3598113122918249e+01\n8.1590214224751154e+00\n-3.9696640360394007e+01\n-2.8971438549228195e+00\n-8.2057053609809145e+00\n-2.1240093063077566e+01\n1.3833766464141496e+01\n7.6278494235457455e+00\n-3.9289180962611177e+01\n1.3318713499677466e+01\n7.0594224833816099e+00\n-4.1091609888107946e+01\n1.6170229731426151e+01\n1.5679947932448323e+01\n-5.3738105113809986e+01\n1.4081487606600213e+01\n-4.8377923161643963e+00\n-2.5396378666457238e+01\n9.1502057755058388e+00\n1.2210228349883890e+01\n-4.9222159739041025e+01\n-4.4403384747263992e+00\n-8.7022811695693427e+00\n-2.0676492667038310e+01\n-1.8693941067910984e+01\n-3.3963324286935630e+00\n-2.8221391265251061e+01\n2.5161681490083563e+00\n1.5829601910247510e+01\n-5.3969966676142370e+01\n-1.3069007557589293e+01\n4.6096668643771732e+00\n-3.9005769239672482e+01\n9.4925453396290109e+00\n2.0531707918308982e+01\n-5.5845920441805532e+01\n8.5803541344105980e+00\n6.5429225656235666e+00\n-4.1484973596089311e+01\n1.3299763569308263e+01\n1.8151397734247572e+00\n-3.1261475606481362e+01\n3.5008373515771916e+00\n-1.3121226297527309e+00\n-2.0743621662591455e+01\n1.0794225554556416e+01\n-4.2666330921992053e+00\n-2.6389066547414075e+01\n5.6033176197583678e+00\n-2.3655797743545823e-01\n-2.2122154788469771e+01\n1.6171562965700154e+01\n1.8440498137385614e+01\n-5.7837752829759481e+01\n-1.4876083058319736e+01\n4.8968221414982445e+00\n-3.9529873932036523e+01\n-1.2098698557016920e+01\n2.2699020509290055e+00\n-3.5702174686538413e+01\n9.2562786722911667e+00\n-6.1265156164533670e+00\n-2.4104673589456951e+01\n1.1095378363990621e+01\n2.2343550524576223e+01\n-5.3865514219900263e+01\n-1.3476045609305535e+01\n5.8976284430609516e+00\n-4.0778533226241755e+01\n1.7057627061558652e+01\n1.5993462064127135e+01\n-5.4513658253998898e+01\n2.1852616444505659e+00\n-8.5829962715465395e+00\n-2.0796452704290822e+01\n1.0725088870300626e+01\n-5.0017699570714456e+00\n-2.5731436270465760e+01\n-7.4914056927831023e+00\n1.6638863573398943e+00\n-3.4785512773772005e+01\n1.7478618280351721e+01\n2.1981191995462286e+01\n-6.2187539208398164e+01\n8.4898023868479289e+00\n-6.8096197071794613e+00\n-2.3027626547034519e+01\n2.6576558805463550e+00\n1.9056144589857837e+01\n-5.0544551268811567e+01\n1.1130467024603426e+01\n1.3369380718467212e+01\n-5.0645833056639589e+01\n1.7578487761285771e+01\n2.2692805455472602e+01\n-6.1068181692096644e+01\n-8.0505108701936834e+00\n2.3793493361171523e+00\n-3.5897656852896269e+01\n4.8071239471022720e+00\n1.5761438865707813e+01\n-5.4101223731633930e+01\n9.3794887231347666e+00\n-4.5607062224282542e+00\n-2.6294778369792290e+01\n1.3198612315831523e+01\n4.9415154566822272e-01\n-3.3155997111396765e+01\n-6.1506417327119642e+00\n6.6793168008648092e+00\n-4.1825897948499097e+01\n-1.7632826979244527e+00\n-7.7368087122496245e+00\n-2.1939506389463880e+01\n-5.3709329412678990e+00\n-8.6753367023762902e+00\n-2.0609389506497774e+01\n1.3559213368945036e+01\n-5.3265209345746323e+00\n-2.5031645897342329e+01\n-5.8634704799363284e+00\n-7.3565275023998993e+00\n-2.2552310720088947e+01\n6.6275641024049774e+00\n-4.4786940762701324e+00\n-2.3541172765567502e+01\n-1.8919997752058317e+00\n8.9421817863594804e+00\n-4.4737612854981464e+01\n9.1348795680224804e+00\n-6.4062665337473401e+00\n-2.3576348651063626e+01\n-5.7762754456468164e+00\n6.6583182087609583e+00\n-4.1849700768082371e+01\n1.4462774974370170e+01\n1.6965744872614536e+01\n-5.6080946008549653e+01\n-2.5085677423717261e+00\n-7.8718629110573577e+00\n-2.1695574494955380e+01\n7.1265187237280569e+00\n7.5428068861874200e+00\n-4.2809831528435630e+01\n1.0123324331044097e+01\n9.6615179523358936e+00\n-4.5782562026694762e+01\n-7.1952088537631207e+00\n7.1842986199619983e+00\n-4.2408457086853730e+01\n8.9073727738135098e+00\n-6.2627544848265737e+00\n-2.3861374678760146e+01\n-1.8401854080898747e+00\n6.6418599171848252e+00\n-4.1639744141538806e+01\n-8.9921579306863482e+00\n3.8353830365344193e+00\n-3.7913650188508107e+01\n8.9976603206821011e+00\n1.1464553566327641e+01\n-4.8220866256362839e+01\n9.4160403960089027e+00\n7.8250208204513312e+00\n-4.3232437409196415e+01\n2.3302815100301624e+00\n1.8363301952136595e+01\n-5.0425603509563821e+01\n-5.3245628230762394e+00\n-7.0765790422595654e+00\n-2.2742933890826947e+01\n1.3339516501220235e+01\n-4.9491611512435361e+00\n-2.5321298367563621e+01\n-1.3911563747266348e+01\n-7.6889541685043827e+00\n-2.1946245913376863e+01\n1.2840279808921983e+01\n-4.7767489540647325e+00\n-2.5748515229517167e+01\n-3.8556950910055603e+00\n6.4163628275971778e+00\n-4.1411908233854248e+01\n1.3780835789208467e+01\n2.4848507250302868e-01\n-3.1841615845368992e+01\n-3.0035372131608464e+00\n-7.4494133570913030e+00\n-2.2247553041306716e+01\n1.3012607356951598e+01\n-4.8873797663197367e+00\n-2.5579471781170735e+01\n-5.4670124011260368e+00\n5.2888030254075282e+00\n-3.9858786097362980e+01\n1.2074218447111303e+01\n5.0298365381160339e+00\n-3.8644475800548349e+01\n-5.5364263154503224e+00\n-7.5548002425265093e+00\n-2.2221226755387722e+01\n-1.1701727326103779e+01\n-8.1785176295580406e+00\n-2.1229809313583473e+01\n1.0603716352803543e+01\n-5.9310334700715934e+00\n-2.4196180338423517e+01\n1.7761204975531030e+01\n2.2282792472912021e+01\n-6.1905876157109745e+01\n8.1401113436176384e+00\n-7.0386709810493704e+00\n-2.2758244710899369e+01\n1.0551173917787795e+01\n1.0086598600604605e+01\n-4.6390457399765502e+01\n-1.1958971079610984e+01\n3.4882063689528793e+00\n-3.7358744130091310e+01\n-2.6779635181530366e+00\n7.5129642505425398e+00\n-4.2826056589188276e+01\n-1.1313358301093633e+01\n3.2535860611522320e+00\n-3.7298878742184073e+01\n1.3226493419221551e+01\n1.7402306115068136e+01\n-5.6513920004369581e+01\n1.5998995104005948e+01\n1.5103602551493802e+01\n-5.3137861917742782e+01\n-3.3742192562588773e+00\n1.4413488150383535e+00\n-2.5250365971131544e+01\n-2.3423801287181933e+00\n1.8361895159128065e+00\n-2.4683127891554054e+01\n8.3128683070813327e+00\n2.0633834002010268e+01\n-5.2420346329178983e+01\n-1.1517875476399761e+01\n1.6927224425665315e+00\n-3.5021263365130885e+01\n-9.1777654460382401e+00\n6.1099228256803917e+00\n-4.0887255449066288e+01\n8.8608974022054241e+00\n1.2561313266167280e+01\n-4.9695220855111060e+01\n-1.4835442285674429e+01\n4.3902907585980273e+00\n-3.8790045563552923e+01\n-2.9608463754187277e+01\n1.8618125274502738e+01\n-5.8751506732216200e+01\n1.0248362915974198e+01\n-4.6243315069570743e+00\n-2.6149132243631627e+01\n-8.8666533632633371e+00\n2.1638618775158784e+00\n-3.5245734115408958e+01\n-1.1115947802721015e+01\n2.2985239129329393e+00\n-3.5893745367343413e+01\n1.0597530735917227e+01\n9.5853124638539189e+00\n-4.5675894729928721e+01\n-2.8806225000756966e+00\n-7.8131696584673946e+00\n-2.1756311293710432e+01\n1.5567855843182343e+01\n1.6420501972874874e+01\n-5.5117415385155766e+01\n-6.7699280511325934e+00\n7.0180234325457000e+00\n-4.2191243183194601e+01\n-7.3588115296311996e+00\n6.5272783584313760e+00\n-4.1637360962392435e+01\n1.6673445953292411e+01\n1.6882450661924494e+01\n-5.5960219208499858e+01\n-1.0615489097774397e+01\n-7.3802028800406747e+00\n-2.2312852317146906e+01\n-3.9866727340457748e+00\n-7.5757936989459456e+00\n-2.2123018897772990e+01\n-8.3526044775185397e+00\n2.4668379723165201e+00\n-3.5982414273926103e+01\n-6.6205673859660106e+00\n6.5172578614334462e+00\n-4.1526632000779870e+01\n-6.1832600517696532e+00\n6.8567677191973591e+00\n-4.2024571729502455e+01\n1.2758154178074463e+01\n7.0155753147042876e+00\n-4.1906372066093965e+01\n9.3355422645804236e+00\n1.8397497065984957e+01\n-5.7045128976414340e+01\n1.1847482676825063e+01\n-5.6093617711474177e+00\n-2.4605701630892305e+01\n1.6728194040504103e+01\n2.0745554314919051e+01\n-6.0773092616620133e+01\n-1.1363613336730296e+01\n-2.1488965870998631e+00\n-2.9914540965371778e+01\n-8.9475687960002386e+00\n-4.9871644691570260e+00\n-2.5828142837690081e+01\n1.4081487606600213e+01\n-4.8377923161643963e+00\n-2.5396378666457238e+01\n-9.6750931343918971e+00\n-7.1636275189322707e-01\n-3.1627013850899271e+01\n-1.2802158724171393e+01\n-5.6738669605775103e+00\n-2.4791680273598534e+01\n-7.1197089645683258e+00\n-3.5202239975587637e+00\n-2.7723633939791199e+01\n1.2821419773167285e+01\n-5.4444990803137312e+00\n-2.4745190294897714e+01\n7.1020406612131062e+00\n1.2498804909963818e+01\n-4.9715994426729310e+01\n6.1421033471599582e+00\n6.6575735560097649e-01\n-2.3300733305002815e+01\n-1.3636525134360172e+01\n-8.0349104309585275e+00\n-2.1477729397065300e+01\n3.0942165920065769e+00\n1.7501887935748190e+01\n-5.3341125778857773e+01\n1.3014395308821294e+01\n-5.8809055790309737e+00\n-2.4045085848702033e+01\n9.2445058637539237e+00\n-5.5586503944569836e+00\n-2.4876835713299183e+01\n1.0689762334074155e+01\n-3.4025218639965393e+00\n-2.7907301026931155e+01\n7.9066120872064243e+00\n1.0809119763244869e+01\n-4.7299920588578935e+01\n-9.3187641238556331e+00\n-3.0460204814337568e+00\n-2.8493680392745073e+01\n2.8179903906102517e+00\n1.0048283836391803e+01\n-4.6272576505390816e+01\n-7.6996083007878298e+00\n1.8704286150858502e+00\n-3.5290443048897743e+01\n1.1840238576481850e+01\n-3.6710483628722845e+00\n-2.7444461737662252e+01\n8.7911098756833610e+00\n1.7038640444039562e+01\n-5.5968255607497952e+01\n-1.2505471331702745e+01\n-7.5387146064560806e+00\n-2.2175583817094701e+01\n-7.1087870460068725e+00\n-3.7912061770575227e+00\n-2.7334125832393497e+01\n-1.0605521905004984e+01\n-2.7635142287738632e+00\n-2.8993745140804990e+01\n1.8175180761717697e+00\n-3.1655615735279183e+00\n-1.9950692465107963e+01\n-9.4655480535728387e+00\n-1.8512086360996178e+00\n-3.0283486076719853e+01\n9.6423372981908688e+00\n-6.6647537998789552e+00\n-2.3054614628712276e+01\n1.3409917667692303e+01\n8.1431280196546254e+00\n-4.0661555995794551e+01\n1.2965020782860803e+01\n-5.1679134048068907e+00\n-2.5242018729775701e+01\n-1.3150324176199673e+01\n-7.3427343417881810e+00\n-2.2477976081244094e+01\n9.8270016633956470e+00\n1.5543080884051466e+01\n-5.3642893906039212e+01\n-1.4326891534423694e+01\n9.6971607324295199e+00\n-4.4523526104135293e+01\n1.2184946499985685e+01\n-5.3008189012908984e+00\n-2.5151365725556378e+01\n1.6841531308622429e+01\n2.1846756076090816e+01\n-6.1668048579734311e+01\n-7.4584370413452845e+00\n-3.0170307294919745e+00\n-2.8438791421246165e+01\n1.1570426601626188e+01\n1.4038170794923648e+01\n-5.1942912042393360e+01\n9.2562786722911667e+00\n-6.1265156164533670e+00\n-2.4104673589456951e+01\n2.2209339102920427e+00\n-8.0148694114829482e+00\n-2.1623594061500683e+01\n-8.8658255501746748e+00\n1.7749263028964704e+00\n-3.5049170427912962e+01\n1.0766953568977968e+01\n-5.8888699285063133e+00\n-2.4266664971548266e+01\n9.8121851364875656e+00\n1.2160325017041769e+01\n-4.9220911055513419e+01\n5.9645897504600747e+00\n1.9957441837521515e+01\n-5.1102407517974562e+01\n1.1408167664042340e+01\n-2.8321061068263838e+00\n-2.8838144710133268e+01\n4.0458595725435460e+00\n1.7118071860746120e+01\n-5.4115696586105955e+01\n1.2299676886806372e+01\n5.0360728924070877e+00\n-3.8902119525202281e+01\n9.4241084492669618e+00\n-6.7235227242877009e+00\n-2.3156559491420552e+01\n-9.0196049957456257e+00\n-4.8523431514849689e+00\n-2.6009105580037822e+01\n-8.8411741106211306e+00\n-4.7605648336002560e+00\n-2.6099903479943048e+01\n-6.8130039718703275e+00\n-3.4938456828165783e+00\n-2.7821349176906917e+01\n9.5660191447981209e+00\n8.2641904147191028e+00\n-4.3704751152402025e+01\n-1.6472549701366241e+01\n1.8677617969472771e+00\n-3.5413642408284481e+01\n1.2953977793589525e+01\n-4.7294416572943332e+00\n-2.5722851924748788e+01\n1.0221889876613229e+01\n-6.3044799404322838e+00\n-2.3784341111152553e+01\n1.8495326396114184e+01\n2.1978020129445888e+01\n-6.2385046426451559e+01\n1.5823734246718555e+01\n1.6856029090114372e+01\n-5.5678082727985142e+01\n9.2623139913787647e+00\n7.8590148805091111e+00\n-4.3373102747376130e+01\n4.6382117068317665e+00\n1.9588114954205256e+01\n-5.1000716415499767e+01\n4.2951127246578151e+00\n1.8930074322681008e+01\n-5.1665746783646711e+01\n1.3896601831024432e+01\n-4.8736435209935802e+00\n-2.5409839674840843e+01\n-8.9934927259997703e+00\n2.0135678065102831e+00\n-3.5399499573629576e+01\n1.5783880239488064e+00\n8.4255740434559048e+00\n-4.4031682167764998e+01\n-1.3756037695368947e+01\n3.8696612256331999e+00\n-3.8047178162763458e+01\n-7.6863395768085763e+00\n-7.1147153909336858e+00\n-2.2785060395869053e+01\n9.9056760924060789e+00\n-5.7226124872139916e+00\n-2.4488597006494739e+01\n4.2097355218507282e+00\n3.3769405904538469e-01\n-2.1034561696424781e+01\n7.2328001504877815e+00\n1.0736630213799813e+01\n-4.7367089380661497e+01\n-5.6228168561311953e-01\n2.7671012854229247e+00\n-2.2407318763153125e+01\n-7.3886881977272392e+00\n-1.8562726166823647e+00\n-3.0055915452635496e+01\n1.2677012474731738e+01\n-5.3453247927186576e+00\n-2.5012339383632021e+01\n1.3515933224132565e+01\n-5.4738359999002899e+00\n-2.4539975268914507e+01\n1.0684209453305892e+01\n-5.5737229663021974e+00\n-2.4655984474043134e+01\n-5.2241783627034177e+00\n-7.4494888883904293e+00\n-2.2383518428290127e+01\n1.1828182216695602e+01\n-3.1653667058519614e+00\n-2.8116788035085694e+01\n-4.0843228294676788e+00\n7.5109337225101065e+00\n-4.2894617254210587e+01\n-1.4585355481632490e+01\n-5.4991196062548084e+00\n-2.4896873382745568e+01\n-1.3266621435388821e+01\n-7.1644774327020500e+00\n-2.2647754855838329e+01\n1.3712166654381804e+01\n7.9600520881626897e+00\n-3.9255314076207632e+01\n9.3077068610346689e+00\n-5.7241470217572576e+00\n-2.4680155298272712e+01\n9.6655961825118943e+00\n-6.0571634478033447e+00\n-2.4184608361805854e+01\n9.6642046523628373e+00\n-6.5900353580080608e+00\n-2.3330263053214225e+01\n-4.2061065534069657e+00\n-7.0184457015210562e+00\n-2.2970045680384455e+01\n-3.9476372573839802e+00\n-5.3848085615367198e+00\n-2.4285120004097802e+01\n1.0836700167291294e+01\n-4.9238460333398075e+00\n-2.5717145201933384e+01\n1.3491418757419867e+01\n8.4510980583018203e+00\n-4.0244956830176811e+01\n1.4071350723212470e+01\n-4.9857468259362783e+00\n-2.5318297913646358e+01\n1.0924862167270547e+01\n-1.5537455438901424e+00\n-3.0445254062602945e+01\n-1.2977240663427306e+01\n-7.4420376737752321e+00\n-2.2303413726988140e+01\n2.4278811157650848e+00\n1.8533460876562984e+01\n-5.0059041322690234e+01\n1.0408466401098574e+01\n-4.5742470466428502e+00\n-2.6208066946623834e+01\n-5.2619016564996040e+00\n-7.0049615179450075e+00\n-2.2976625958405815e+01\n1.3167209056614121e+01\n9.1817419896047632e+00\n-4.1733829237311291e+01\n9.7219747387090933e+00\n-6.1217484273976677e+00\n-2.4144774922123705e+01\n1.0755920129658035e+01\n-4.6474807785429331e+00\n-2.6085897297400141e+01\n4.2146991101723907e+00\n1.9017026849131884e+01\n-5.1103038764941779e+01\n1.0400606822583114e+01\n9.6225876120203377e+00\n-4.5619475364481168e+01\n-1.8112640487230562e+00\n1.1287982338357244e+01\n-4.8322346570478246e+01\n-2.9608463754187277e+01\n1.8618125274502738e+01\n-5.8751506732216200e+01\n-9.0600669593883367e+00\n5.1600333033741350e+00\n-3.9692440638875780e+01\n-1.3732063937164321e+01\n-7.3337554379747933e+00\n-2.2539818909212116e+01\n-6.9776833714357416e+00\n6.7044517223177751e+00\n-4.1776287913299228e+01\n-1.6935788480812096e+01\n2.3686012777859431e+00\n-3.6145574834506903e+01\n-2.0999945005899638e+00\n9.2858126774185457e-01\n-2.3459846402142766e+01\n-8.1303574653632307e+00\n1.2186453532842977e+01\n-4.7725898474062276e+01\n1.1798896789761551e+01\n-4.9358285858737050e+00\n-2.5517438122345332e+01\n1.0085005472641702e+01\n9.1183300310434703e+00\n-4.5139870425505116e+01\n-6.1612840675319038e+00\n7.2312723972228525e+00\n-4.2512946546790744e+01\n1.3032871183467485e+01\n1.0134915381124829e+01\n-4.0640522548108457e+01\n-3.2056580539027335e+00\n1.3263278215972500e+00\n-2.5216153764907233e+01\n-8.6125769859098327e+00\n1.2889078407196044e+01\n-4.6137224156673071e+01\n1.0995430299736485e+01\n-1.9912674843966680e+00\n-2.9797129190955459e+01\n1.0148758840087746e+01\n-6.3005126809053102e+00\n-2.3775892296141450e+01\n4.0721578377244771e+00\n1.9107497271284682e+01\n-5.1304586473435400e+01\n-8.8411741106211306e+00\n-4.7605648336002560e+00\n-2.6099903479943048e+01\n1.1103370726560733e+01\n2.1828657023288280e+01\n-5.4284058716090236e+01\n-3.0238100279877860e+00\n1.0900460308140703e+01\n-4.7363186320331039e+01\n7.3945231962599776e+00\n1.3916671613021012e+00\n-2.5432026147174476e+01\n6.1710269687275394e+00\n7.7696387794227126e+00\n-4.3139595208280774e+01\n1.3577599946542380e+01\n8.0292470615690412e+00\n-4.0047185164214653e+01\n1.1459282452821741e+01\n-5.1072111995419203e+00\n-2.5381478962933265e+01\n1.8900569422800364e+00\n1.6265710710850229e+01\n-5.4341296676160702e+01\n8.6464733508896696e+00\n1.7442775586380801e+01\n-5.6359028608069835e+01\n-7.1942802072348666e+00\n-1.3009928622370386e+00\n-3.0757280753853955e+01\n6.9044365041606124e+00\n1.6133616303690776e+01\n-5.4554756503416307e+01\n1.4771456562050499e+01\n2.0596125610187794e+01\n-6.0508377719251968e+01\n7.9574748651984573e+00\n1.0579287238969238e+01\n-4.7017379475731246e+01\n-7.2839737568831566e+00\n-3.3989937842185771e+00\n-2.8052560659312210e+01\n-1.3952857554828251e+01\n-7.8570934377611588e+00\n-2.1702529007767094e+01\n9.4241084492669618e+00\n-6.7235227242877009e+00\n-2.3156559491420552e+01\n1.2597106200658645e+01\n-3.8219666114365620e+00\n-2.7146591862071720e+01\n1.3664536147525725e+01\n7.3030302546162886e+00\n-4.0846163737633169e+01\n-4.0447451765112019e+00\n5.8768326076190203e+00\n-4.0704695380520469e+01\n9.3479956955284926e+00\n1.6100141537500786e+01\n-5.4601439868294229e+01\n1.3112426757118387e+01\n1.2496864141137980e-02\n-3.2581878221694318e+01\n5.2504681068782446e+00\n-7.8399979262994153e+00\n-2.1783547992118390e+01\n1.1872387211312992e+01\n-4.7783181532541832e+00\n-2.5797815485406520e+01\n6.9746057184992303e+00\n7.7369281291029877e+00\n-4.3158923134381716e+01\n1.3157899163845400e+01\n-4.8201779914177836e+00\n-2.5639893019045402e+01\n-8.6594811024465272e+00\n3.6809418505188525e+00\n-3.7623246935387144e+01\n-4.7327978432742874e+00\n-6.7117363337143425e+00\n-2.3340328374028605e+01\n1.0720655172698102e+01\n1.3205648269296926e+01\n-5.0581208099075319e+01\n-1.0695026327679832e+01\n-7.3536788631381693e+00\n-2.2377984754518518e+01\n1.3944052970405101e+01\n-7.3736163479181174e-02\n-3.1482223739291975e+01\n7.8064096690395210e+00\n2.0647059490376034e+01\n-5.2062632133914882e+01\n-1.2587881273864806e+01\n-7.0489441417427523e+00\n-2.2870433340100039e+01\n-4.2451609005592950e+00\n-7.0289938276422887e+00\n-2.2915282750087531e+01\n7.9096806372407009e+00\n9.3256040036956538e+00\n-4.5395944737703282e+01\n1.2872940985087796e+01\n-5.7961404671561452e+00\n-2.4151041341751164e+01\n8.3162828484863951e+00\n6.2658982354866719e+00\n-4.0942998324925327e+01\n8.8981251304980464e+00\n1.2458039489371183e+01\n-4.9774258685336846e+01\n1.0319075957140763e+01\n-5.1047035939468408e+00\n-2.5490465388298869e+01\n4.6552374497609961e+00\n9.2897255673854684e-01\n-2.1504923175914964e+01\n9.0717094523189861e+00\n6.7775703552939701e+00\n-4.1545292744181012e+01\n-7.7800004928851010e+00\n-7.1313026485542537e+00\n-2.2805636418410593e+01\n-1.1101027202711354e+01\n1.5017840403792011e+00\n-3.4583168508717840e+01\n1.4072178714076411e+01\n1.8158054931187337e-01\n-2.9674326384365163e+01\n1.3046428496591730e+01\n1.7820753112031650e+01\n-5.6982194662685814e+01\n1.2578635563006172e+01\n1.8130220421522729e+01\n-5.7370019438645954e+01\n4.9569072346044392e+00\n-1.2218229282859923e-01\n-2.1787991712007894e+01\n1.1463940886998337e+01\n-4.3894370889353578e+00\n-2.6408211443618519e+01\n9.1426618674333682e+00\n-6.2224601441728495e+00\n-2.3981699266338531e+01\n9.6138207739079551e+00\n1.2661770404504743e+01\n-4.9828066342927478e+01\n1.1752855672851929e+01\n-5.4943781621676848e+00\n-2.5011260853270834e+01\n-4.9652282485287547e+00\n7.6849950651784988e+00\n-4.3166878811233765e+01\n6.7732336877285695e+00\n-3.8570874567888569e+00\n-2.4381406463508384e+01\n-3.0942193335915378e+00\n5.2860814496844322e-01\n-2.4096596227690458e+01\n3.2208037783184138e+00\n-8.1869266770343287e+00\n-2.1476503767285706e+01\n-3.3021036866596294e+00\n7.8921443526985842e+00\n-4.3403260045437811e+01\n1.1740392511657404e+01\n-4.3203918505561694e+00\n-2.6569454246057013e+01\n1.2031838273638209e+01\n4.5231118805586901e+00\n-3.8693381395549338e+01\n-8.3697105359645789e+00\n-2.6332058643958516e+00\n-2.9029856358414321e+01\n1.2840279808921983e+01\n-4.7767489540647325e+00\n-2.5748515229517167e+01\n-2.6615778772516725e+00\n7.1545720640097601e+00\n-4.2353242053651627e+01\n-1.1435795727729815e+01\n-8.3118661788667936e+00\n-2.1054412283704369e+01\n1.3791682607493154e+01\n7.7426818347681570e+00\n-4.0001240797096081e+01\n-3.9782654683483853e+00\n6.1973544819085324e+00\n-4.1183108054723760e+01\n1.3973059689112301e+01\n7.2446018174739377e+00\n-3.9060246490131796e+01\n7.7779701972796493e+00\n1.0358862142529803e+01\n-4.6900496758662904e+01\n1.3786229512877425e+01\n-1.9123740295764868e+00\n-2.9656816490960363e+01\n-9.4332132161896110e-01\n-1.7928745977888512e+00\n-2.1162278740038690e+01\n2.1793966561097249e+00\n-8.5249349165639927e+00\n-2.0798839983401500e+01\n-3.2633774215099303e+00\n-7.4416001058404042e+00\n-2.2304636225404145e+01\n5.2520758549107889e+00\n1.9313084034892963e+01\n-5.1931910111442278e+01\n1.1852932478450873e+01\n1.4763989697894655e+01\n-5.2685094608239723e+01\n1.0326411322102068e+01\n-4.2331055865342044e+00\n-2.6735824554140422e+01\n6.6094217788554275e+00\n7.1242796454843100e+00\n-4.2210015310361307e+01\n3.8580834946315452e+00\n1.9564511643754056e+01\n-4.9907275187033086e+01\n1.0615970654172930e+01\n-6.0599590398047392e+00\n-2.4116906152542668e+01\n1.0229365456169290e+01\n-4.4964456658834644e+00\n-2.6371240336767865e+01\n-1.3575276782447606e+01\n3.8612459171115092e+00\n-3.8276181141386047e+01\n-2.0632750834371683e+00\n-3.0884468228914042e+00\n-2.2370101035127206e+01\n1.7417683843502734e+00\n9.1621659214520097e+00\n-4.5176610196731353e+01\n7.8396948481695086e+00\n1.7806580141308057e+01\n-5.6744910604509798e+01\n-1.7448268473564961e+00\n7.0554047523780028e+00\n-4.2164708569176675e+01\n1.9108710396147437e+00\n9.0112107530039740e+00\n-4.4959469605960386e+01\n8.7788879041836285e+00\n1.3476621162934142e+01\n-5.1064921507675685e+01\n6.2579627845423422e+00\n1.4012707408049422e+01\n-5.1699809311056391e+01\n1.5622592913957289e+00\n-7.7239063357124511e+00\n-2.1556081847543020e+01\n7.1837687346227792e+00\n1.4956309654418392e+01\n-5.3079838294434118e+01\n3.0623719212976459e+00\n-2.5345634748591266e+00\n-2.0247891148287717e+01\n-9.3212738717770112e+00\n2.0672070218793994e+00\n-3.5538506156906251e+01\n-9.4834358919747910e+00\n-1.3552431539346750e+00\n-3.0811562794849674e+01\n-1.4200791210515673e+01\n9.6259505914013381e+00\n-4.4482555385960829e+01\n1.6410661069966725e+01\n2.1290383724578803e+01\n-6.1566962819807941e+01\n8.6017954369115923e+00\n1.0303802759421313e+01\n-4.6958525966899316e+01\n1.3065505265676508e+01\n-5.1068389963790590e+00\n-2.5204449216040729e+01\n1.6111852815098093e+01\n1.6502549765788480e+01\n-5.5339601013302946e+01\n1.3621433421659548e+01\n7.4535633979355662e+00\n-4.0899538282316058e+01\n8.2334874645477711e+00\n-6.7597643645434724e+00\n-2.3196891094443615e+01\n1.0370419381545650e+01\n-5.7063924532948027e+00\n-2.4588104513255800e+01\n9.0921984731101873e+00\n-6.4306697282511056e+00\n-2.3653230601170769e+01\n7.1142418927213598e+00\n1.0540173968396498e+01\n-4.7096616204320576e+01\n-5.0788857363216104e+00\n4.7054397394642580e+00\n-3.9131412316848831e+01\n1.3665213028203574e+01\n6.9423018316833813e+00\n-4.1357695845489125e+01\n-1.4698264894780046e+01\n-7.0987316129609566e+00\n-2.2814345834397258e+01\n1.0152127160408948e+01\n-5.3451040521122826e+00\n-2.5106331620653698e+01\n-4.2920839360473835e+00\n7.4777670595876762e+00\n-4.3033611471639517e+01\n1.0939481769990287e+01\n-5.8519984874530717e+00\n-2.4373001988266640e+01\n-1.4186171113835705e+01\n4.2192705600310010e+00\n-3.8515600706984984e+01\n1.0922489630154558e+01\n-4.4514405001751358e+00\n-2.6227379943762550e+01\n1.0694735674320063e+01\n-5.5413513994928882e+00\n-2.4863304331903226e+01\n1.2878390613200434e+01\n2.2554080606467622e-01\n-3.3006678452862396e+01\n-1.3199655515992202e+01\n-8.2145341992107195e+00\n-2.1358157743271011e+01\n1.3587814068333424e+01\n7.4514051777564578e+00\n-4.1215321352113982e+01\n9.4204119332303655e+00\n-5.9200608330730642e+00\n-2.4325967343633597e+01\n1.3692517374072528e+01\n7.2578600570333123e+00\n-4.0291561977355514e+01\n-7.5923504554629879e+00\n-3.1951915924567977e+00\n-2.8281178799967456e+01\n1.3712166654381804e+01\n7.9600520881626897e+00\n-3.9255314076207632e+01\n1.3933070159864180e+01\n7.4145289158064820e+00\n-3.9139232896595487e+01\n6.5985184711062148e+00\n2.4050251048977500e-01\n-2.3661696407251164e+01\n1.0202398760619749e+01\n-6.0541324520426265e+00\n-2.3985241271305359e+01\n-1.4585355481632490e+01\n-5.4991196062548084e+00\n-2.4896873382745568e+01\n7.5476056904759279e+00\n1.9631199432188831e-01\n-2.3840826014398232e+01\n1.0069556995517299e+01\n-4.6527117663969184e+00\n-2.6110130618748734e+01\n8.3091260424379119e+00\n-6.9003046920592785e+00\n-2.3013175110743077e+01\n1.0869870733878217e+01\n-5.7719360898243339e+00\n-2.4333549652623677e+01\n1.0518460947358836e+01\n-2.3675257030679786e+00\n-2.9388144599331071e+01\n1.0748827319129908e+00\n8.0065682792193051e+00\n-4.3393427162304945e+01\n-7.2839737568831566e+00\n-3.3989937842185771e+00\n-2.8052560659312210e+01\n-1.4520988470040498e+01\n-5.7818352400594373e+00\n-2.4633414660690157e+01\n3.2818000985104674e+00\n1.8764378703263276e+01\n-4.9583982395349061e+01\n3.4102386270820366e+00\n1.8542078147554705e+01\n-4.9263010918463856e+01\n1.3517790378900134e+01\n2.3405265193165317e+01\n-5.5194194467038947e+01\n1.0352729129007885e+01\n-5.3734663011123018e+00\n-2.5086721957380604e+01\n-4.0746512795929295e+00\n-7.7853701820911327e+00\n-2.1915012754704883e+01\n-8.0260066531799055e+00\n1.9123264670777462e+00\n-3.5226356321688861e+01\n-3.1540249428228502e+00\n-7.8319854312005264e+00\n-2.1799725488736737e+01\n1.3415511271328254e+01\n5.7968218041974384e-01\n-3.3183742073141985e+01\n1.5942241798403062e+01\n1.8173704521512395e+01\n-5.7737976959688375e+01\n9.4891206343710603e+00\n1.6389894328491387e+01\n-5.4953956528123250e+01\n-9.0168416644228326e+00\n6.5513766115800545e+00\n-4.1546687734663713e+01\n-1.1236058136686879e+01\n7.8457188758342395e+00\n-4.3406852005609053e+01\n7.0523034480916893e+00\n5.8140045404750806e-01\n-2.4240238031219370e+01\n2.2425052649217707e+00\n-2.5305877473542204e+00\n-2.0201453813245898e+01\n9.8782667627380523e+00\n7.7536290849467848e+00\n-4.3149792025934865e+01\n-2.5913371570507104e+00\n1.1557931628108884e+01\n-4.8280626970133369e+01\n9.0908724443636775e+00\n-5.6525772510454235e+00\n-2.4692845785935550e+01\n-1.3251239588574672e+01\n-4.0922369774362446e+00\n-2.6946380513826110e+01\n1.0057617359898684e+01\n-6.1288220473059063e+00\n-2.3977209834618414e+01\n1.0200753818662573e+01\n-5.5982541902176362e+00\n-2.4746984822106803e+01\n1.3381127650560432e+01\n-5.1318196260402109e+00\n-2.5240102113285431e+01\n1.2810650567698321e+01\n1.2208281217220508e+01\n-3.7380374900124693e+01\n-4.2920839360473835e+00\n7.4777670595876762e+00\n-4.3033611471639517e+01\n-1.3415966505697233e+01\n-6.6644346958903657e+00\n-2.3439675689668672e+01\n6.0416834482495991e+00\n7.3714050887755489e+00\n-4.2706863727942824e+01\n-7.1875302889947585e+00\n2.0049103560725774e+00\n-3.5388893944521179e+01\n1.3152235593793726e+01\n1.1660509140837672e+01\n-4.8385580084695960e+01\n-7.3249752954275111e+00\n-2.3828016849709117e+00\n-2.9272029355480907e+01\n8.6511309822066007e+00\n6.6768484919669202e+00\n-4.1669095568978229e+01\n1.2750600044801445e+01\n4.9711699501774218e+00\n-2.9507580346319024e+01\n-2.2047691494495960e+00\n-8.0234008187231147e+00\n-2.1528153207924248e+01\n-4.0843228294676788e+00\n7.5109337225101065e+00\n-4.2894617254210587e+01\n-2.0189245879690180e+01\n-1.2719067036306730e+00\n-3.0990063717744508e+01\n-8.6042577537609493e+00\n-2.4389064278902333e+00\n-2.9333484373263811e+01\n-3.2431296024656389e+00\n7.4301467464329756e+00\n-4.2928208066508674e+01\n1.0883151828096125e+01\n-1.4949139137145055e+00\n-3.0514847378788183e+01\n-4.9304808667155982e+00\n1.1327742980233563e+01\n-4.8116283376428797e+01\n9.1694774909107437e+00\n-6.4579041287230883e+00\n-2.3585205067729451e+01\n3.6997804904718530e+00\n1.8523630514682544e+01\n-5.1422958141311234e+01\n-1.3911917562522129e+01\n-7.3834174680738975e+00\n-2.2520535242966641e+01\n5.1275677436288039e+00\n-2.3927933115399620e+00\n-2.0377926733830513e+01\n-4.1194411131565074e+00\n8.6201028557933679e+00\n-4.4264753973394008e+01\n-9.1934075766950816e+00\n4.3568328752291992e+00\n-3.8568702017036529e+01\n1.3993871733346360e+01\n7.3502624590156236e+00\n-3.8988835133128099e+01\n1.7111779393549501e+01\n1.6436061642807722e+01\n-5.4838908883841455e+01\n7.8913575879668354e+00\n2.0504044378661487e+01\n-5.3076479737942996e+01\n-4.5714745676504798e+00\n-6.2128052742224433e+00\n-2.4082988024958837e+01\n1.4118010659115384e+01\n1.5307702248256545e+01\n-5.3343185444156319e+01\n6.1626952767645591e+00\n8.1538119729025365e+00\n-4.3750546566600129e+01\n1.0923165094507624e+01\n-2.0016723699286336e+00\n-2.9877982813870105e+01\n1.4058315304531742e+01\n5.2789904600888180e+00\n-3.9738817981902301e+01\n1.2052975969717387e+01\n-5.3085547745997239e+00\n-2.5260545098595141e+01\n-5.9921235544629914e+00\n6.1002248295245982e+00\n-4.1172358374593870e+01\n1.6502867801298926e+01\n1.6547150112064354e+01\n-5.5426203192453762e+01\n-5.2204749835395310e+00\n-8.5596705733329514e+00\n-2.0839022100386014e+01\n-6.7854961611635360e+00\n-1.6581338576512947e+00\n-3.0412532447117886e+01\n-2.2217664806279355e+01\n3.5871977713421344e-01\n-3.3296154393693051e+01\n-6.6237699499433349e+00\n7.2224473624968262e+00\n-4.2474721571472031e+01\n2.2819065526070039e+00\n1.8177821341651729e+01\n-5.0731423811695059e+01\n-8.7690572620214251e+00\n2.2439216492199123e+00\n-3.5634994115705531e+01\n-5.4730390465161580e+00\n7.2246006532697189e+00\n-4.2490859860210300e+01\n-4.2254048044624986e+00\n1.0031329449492549e+01\n-4.6476217783149437e+01\n1.0169138537907997e+01\n-5.1255774842122461e+00\n-2.5348168431987880e+01\n-2.4246752968497152e+00\n-8.0569656864530845e+00\n-2.1510855385263135e+01\n1.0221889876613229e+01\n-6.3044799404322838e+00\n-2.3784341111152553e+01\n-4.9351330003930851e+00\n-8.1573283563865715e+00\n-2.1423524004321802e+01\n2.1215105326617913e+00\n1.8839946450028478e+01\n-4.9838960280446145e+01\n-1.1133581855850988e+01\n8.7222190080829449e+00\n-4.4422976143921993e+01\n-5.3866762955461356e+00\n-6.8908423821755926e+00\n-2.3099808841739858e+01\n-7.0578785677516569e+00\n6.4650779864632089e+00\n-4.1474814458995340e+01\n6.1931826702346147e+00\n-7.4822288956645249e+00\n-2.2237656255887078e+01\n-4.2303777604397901e+00\n7.3533187612517681e+00\n-4.2717800475074462e+01\n1.3371322989139028e+01\n1.7501023090897785e+01\n-5.6462598214313360e+01\n1.3917926804363905e+01\n6.3782421426607483e-01\n-2.9974764118417355e+01\n-7.7800004928851010e+00\n-7.1313026485542537e+00\n-2.2805636418410593e+01\n7.1020406612131062e+00\n1.2498804909963818e+01\n-4.9715994426729310e+01\n-3.8661192768008439e+00\n-7.5849864234013964e+00\n-2.2193239793152021e+01\n-1.3081668609768352e+01\n-7.3099534687401322e+00\n-2.2494604326559230e+01\n-4.2303522374611919e+00\n5.5516993619050572e+00\n-4.0153965449716210e+01\n-1.3817854969453904e+01\n-6.4615435406635555e+00\n-2.3752452663745505e+01\n-9.7594846213165329e+00\n-4.1935849692773663e+00\n-2.6903989453675432e+01\n-7.4094097741776315e+00\n-5.7710400156151982e+00\n-2.4741694287508661e+01\n1.3012598871032905e+01\n-5.0964165129365533e+00\n-2.5319007076535250e+01\n9.4574470667668304e+00\n-5.8493734777035709e+00\n-2.4462335686349146e+01\n6.2185704247052893e+00\n-4.6159182227330167e+00\n-2.3241022174630839e+01\n1.2631194451088875e+01\n-4.4979205242975739e+00\n-2.6054206671200848e+01\n9.7589151610268718e+00\n-5.8882330630591255e+00\n-2.4231279843001889e+01\n1.0573720761647781e+01\n-5.5488996038798746e+00\n-2.4787634490769594e+01\n9.3339786369314552e+00\n-5.9605795797670860e+00\n-2.4315911221106798e+01\n1.3091310622255440e+01\n-5.3769363014183797e+00\n-2.4673227964924735e+01\n9.3285906932983611e+00\n-6.3302255276299197e+00\n-2.3791691319778771e+01\n-1.3590744102649738e+01\n-7.4474763297245623e+00\n-2.2369404305874141e+01\n2.4448764884033700e+00\n1.4771953960315395e+01\n-5.2729977563803637e+01\n9.5421934367048884e+00\n-4.9816552497461997e+00\n-2.5707218758513974e+01\n-3.0082036246394939e+00\n-7.7909837974152980e+00\n-2.1899736129586117e+01\n1.8362880508262759e+01\n2.1480843534542071e+01\n-6.1841210552738936e+01\n-1.1785863341745268e+01\n9.6684291918831704e+00\n-4.2964521434895360e+01\n1.4286972949246406e+01\n5.8543370586028285e+00\n-3.9919590572571579e+01\n9.2888283364990816e+00\n-6.3419871638014387e+00\n-2.3968871906980176e+01\n1.5962411604175001e+01\n1.8499739699788748e+01\n-5.7919910769082378e+01\n1.4171808445419678e+00\n-8.6049251430736202e+00\n-2.0804715162816201e+01\n3.0884117991378979e+00\n1.8427479080400822e+01\n-5.1678481799857401e+01\n1.4998664259410218e+01\n1.5056381953565417e+01\n-5.3231941126497397e+01\n-1.2810836427783839e+01\n3.6031563316082029e+00\n-3.7617458270301661e+01\n-8.3952951004496565e+00\n-2.9892575684881053e+00\n-2.8531324069186354e+01\n1.3748735335482433e+01\n-5.0817501647454613e+00\n-2.5154216135299720e+01\n6.8340004246269146e+00\n-3.8404885340291872e-01\n-2.3039148004287291e+01\n-9.7668022699216692e+00\n2.6180266383698108e+00\n-3.6102022001600865e+01\n1.3643766921434564e+01\n6.7997771540142615e+00\n-3.9744025879017940e+01\n5.1262129292447201e+00\n3.4179480497953446e-01\n-2.2017245652633104e+01\n1.3377541558637995e+01\n-5.0597786103437752e+00\n-2.4714026666125122e+01\n-3.0998573252868260e+00\n-8.5299445552520670e+00\n-2.0805132041212673e+01\n-1.0328005620090904e+01\n1.1125839269293625e+01\n-4.4272868871098893e+01\n-7.0711713772682909e+00\n-8.5012551245834107e+00\n-2.0820059377080018e+01\n-6.8591842113485111e+00\n7.7856692281837403e-01\n-3.3653555855847770e+01\n-4.7440070974429887e+00\n7.0286041970158299e+00\n-4.2011553120425958e+01\n-3.6904826722757758e+00\n8.8916140585204086e+00\n-4.4719796204220437e+01\n1.0126403502585179e+01\n-5.4947045413275450e+00\n-2.4964672767299817e+01\n-4.3632602518546992e+00\n7.6212173611855460e+00\n-4.3050906263511237e+01\n1.1456424093950590e+01\n-2.5770113633327609e+00\n-2.8971718343517505e+01\n1.1408167664042340e+01\n-2.8321061068263838e+00\n-2.8838144710133268e+01\n-3.2229099938447852e+00\n5.7949110439253648e-01\n-2.4163132506349886e+01\n7.9951325465542968e+00\n2.0440213110283224e+01\n-5.3646937287050982e+01\n1.2809811782779237e+01\n-5.1327663654269191e+00\n-2.5224321492723934e+01\n-2.1506484048891492e+00\n8.6787846479257413e-01\n-2.3405446170524893e+01\n-5.0083198514973679e+00\n6.3109851805642849e+00\n-4.1233156644878882e+01\n8.5201074422565277e+00\n9.8573053492950429e+00\n-4.6023775015131271e+01\n1.1999108100384461e+01\n-4.1062140963227725e+00\n-2.6821713843404758e+01\n1.2611261194307625e+01\n-5.2626505718582433e+00\n-2.5030674307546999e+01\n-7.1830378587702333e+00\n8.3195404975967548e+00\n-4.4120156452290843e+01\n1.0777966219804608e+01\n2.2461749489042784e+01\n-5.3699475434707736e+01\n-1.5706410183499194e+01\n-6.9621133842671679e+00\n-2.2957798339878117e+01\n1.0269762931641319e+01\n1.8491047679112576e+01\n-5.7786864073199631e+01\n-1.6291859882924404e+00\n-8.6686043502302237e+00\n-2.0597174910890519e+01\n-3.1402527386972614e+00\n5.0155809358176939e-01\n-2.4019911059454884e+01\n1.3833706083729549e+01\n1.4246064018698837e+01\n-5.1932885748568374e+01\n9.3693040693358629e+00\n-6.1133305849775388e+00\n-2.4040386015116006e+01\n1.3388114244252439e+01\n-5.1923944649290270e+00\n-2.5168202422163873e+01\n-8.4122698358019328e+00\n-2.9636686468397935e+00\n-2.8371670506410940e+01\n9.4160403960089027e+00\n7.8250208204513312e+00\n-4.3232437409196415e+01\n9.7284532295122634e+00\n7.9629884477895416e+00\n-4.3495222195600007e+01\n-6.7854961611635360e+00\n-1.6581338576512947e+00\n-3.0412532447117886e+01\n-1.0976893284599937e+01\n-2.3533186397063268e+00\n-2.9522053222428433e+01\n-9.7313048689885040e+00\n-4.2775790016121009e+00\n-2.6768614499422561e+01\n-4.8670156972375906e+00\n-7.6934443866520654e+00\n-2.1969192953874369e+01\n1.4064705071539500e+01\n-4.9775204705930181e+00\n-2.5131553657855807e+01\n1.9034257794604951e+01\n2.1533752885750626e+01\n-6.2309974761033466e+01\n-2.8265164745453037e+00\n7.5042344436332664e+00\n-4.2916362517265604e+01\n5.2066105192522381e+00\n-6.2139081046192135e-01\n-2.1563434619586140e+01\n1.3804644261329042e+01\n-5.5989407839293452e+00\n-2.4281727126057913e+01\n-3.5943159736708878e+00\n1.5901389781142898e+01\n-4.5742700045697035e+01\n1.0521930916011184e+01\n-5.9842223074352647e+00\n-2.4214099887702528e+01\n-1.6429962574923218e+00\n-6.2789842555281217e+00\n-2.2943025895042400e+01\n-1.6103175424620080e+01\n1.2457608196636436e+00\n-3.4624505220094832e+01\n1.1254960799711188e+01\n1.5130234792531715e+01\n-5.3290658331809411e+01\n-1.0376228153872340e+01\n1.0742559218006061e+01\n-4.4558954209722394e+01\n1.3355681978754574e+00\n7.7609674403825313e+00\n-4.3189072467013247e+01\n-1.5417993194995553e+01\n4.7923976254423586e+00\n-3.9349984970459914e+01\n1.3559494319267516e+01\n-4.6059285980698954e+00\n-2.5859782003085282e+01\n-4.2489030688814209e+00\n-6.9640519840324178e+00\n-2.2977185649923037e+01\n6.1727197516438768e+00\n-8.6760105269146803e-01\n-2.2367364529031303e+01\n-1.3493588512659111e+01\n-7.5141073917969878e+00\n-2.2227233764135722e+01\n-4.5407027877855057e+00\n1.2394074902720106e+01\n-4.9529811553470495e+01\n7.0166037411290496e+00\n8.3352316814351006e+00\n-4.4147127446374164e+01\n9.4811747650504330e+00\n-6.0366619596649178e+00\n-2.4230707045809417e+01\n-9.4500505672313384e+00\n1.1658512468080028e+01\n-4.7047833744365199e+01\n-6.9997729111888534e+00\n-3.6670858056864004e+00\n-2.7710225997722421e+01\n-5.0564069747757427e+00\n4.5863080025373533e+00\n-3.8831384089052833e+01\n-1.0179939386897452e+01\n1.1877573731620254e+01\n-4.5628467165259345e+01\n-8.9475687960002386e+00\n-4.9871644691570260e+00\n-2.5828142837690081e+01\n-1.0514972888072684e+01\n1.1477785957150735e+01\n-4.5036651584781616e+01\n1.2798160855272625e+01\n-5.1794537330233776e+00\n-2.5063124091770238e+01\n-1.3039050654442280e+01\n3.2881788339216063e+00\n-3.7237614700672950e+01\n-1.1384585175857101e+01\n9.0672605360710123e-01\n-3.3951891145357123e+01\n-1.0072665807641563e+01\n1.1103617157531934e+01\n-4.5312272320015353e+01\n6.6094217788554275e+00\n7.1242796454843100e+00\n-4.2210015310361307e+01\n-1.2089869155644242e+00\n-1.5194381088256466e+00\n-2.1319900847628109e+01\n-4.3480982456371220e-01\n1.0918305612491825e+01\n-4.7560306051733598e+01\n1.8284202176923479e+00\n8.5544668231164227e+00\n-4.4244571007150327e+01\n-4.0560745162393879e+00\n1.1681425320644767e+01\n-4.8555967980698846e+01\n-4.7838486846701809e+00\n-7.7019835664471028e+00\n-2.1943900872785200e+01\n-5.3866762955461356e+00\n-6.8908423821755926e+00\n-2.3099808841739858e+01\n9.6382852208021870e+00\n-6.3370560853906257e+00\n-2.3677743103891249e+01\n2.5971649741584790e+00\n1.5535590376206578e+01\n-5.3825250975124078e+01\n-1.3630559169155262e+01\n-7.3951475516669181e+00\n-2.2401553767477481e+01\n-6.8000385293029373e+00\n6.2066142807315849e-01\n-3.0148538929131576e+01\n9.5236009195980262e+00\n1.1091269608220138e+01\n-4.7781570285876462e+01\n-4.7344992629321085e+00\n1.2295697000353091e+01\n-4.9410926130207848e+01\n-1.4498625394207759e+01\n4.5874034760682445e+00\n-3.9155700996166480e+01\n-1.2843611314016504e+01\n-8.5509736970198631e+00\n-2.0749765752035813e+01\n1.3446495910363513e+01\n8.0831258858920674e-01\n-3.2459444633552771e+01\n6.7681048629284479e+00\n8.3003663082591235e+00\n-4.3854215422716344e+01\n1.3069757012725780e+01\n-5.0363479878295543e+00\n-2.5209000730144531e+01\n3.3824258276662542e+00\n2.3529379279874418e+00\n-2.1382372932098885e+01\n-1.3306056855352304e+01\n4.8977733391649450e+00\n-3.9308415451196389e+01\n-6.0586681475410398e+00\n6.7866557248415358e+00\n-4.1920407037620400e+01\n9.1056998579691477e+00\n-6.4996164845488336e+00\n-2.3569660085850344e+01\n-1.8552574466612781e+00\n-7.6850048963801569e+00\n-2.2074076308814728e+01\n1.3379560184408026e+01\n1.1244126528381875e+00\n-3.2224235121439506e+01\n9.4246663768867869e+00\n7.5000996327204854e+00\n-4.2821550104825796e+01\n1.2481012701969259e+01\n-5.3416012343140133e+00\n-2.5048147313879330e+01\n9.5660191447981209e+00\n8.2641904147191028e+00\n-4.3704751152402025e+01\n7.9314403364356316e+00\n1.1943642849440547e+01\n-4.8680982882457386e+01\n-5.2029707582547466e+00\n5.9241034239470949e+00\n-4.0540520916674588e+01\n-2.7068404702764468e+00\n-7.6347385184873087e+00\n-2.2096028537655371e+01\n-4.0482799563841674e+00\n1.2334488226819214e+01\n-4.9562728486048016e+01\n-8.9786612850142582e+00\n-4.9167181015750359e+00\n-2.5982122135100347e+01\n9.4624675808384371e+00\n8.5378309655934093e+00\n-4.4187176761792067e+01\n7.9015763773346430e+00\n9.9633184996436874e+00\n-4.6314368715191449e+01\n-4.1757224240266320e+00\n-6.3054274464935309e+00\n-2.3852267208954430e+01\n-1.3967673619399715e+01\n-6.8924564829906636e+00\n-2.3099561418138201e+01\n-1.4991658630409598e+01\n-7.0283317805620920e+00\n-2.2919841282690960e+01\n1.5075361756110460e+01\n2.2372860901238916e+01\n-5.8612444932086447e+01\n1.3764793598050129e+01\n-4.9164762117768590e-01\n-3.1548340372663109e+01\n6.9562341363088622e+00\n5.3825419232242622e-01\n-2.4175968406361129e+01\n1.0995265341376708e+01\n-5.5818116604650498e+00\n-2.4760262428579573e+01\n-4.6558797540708312e+00\n-6.8049038175690146e+00\n-2.3227536882509835e+01\n-3.9716509035963128e+00\n8.7911452491790012e+00\n-4.4718039458430773e+01\n9.3406904929546961e+00\n-5.9994009254260208e+00\n-2.4228451762509557e+01\n1.3152075821157110e+01\n1.1707112441104467e+01\n-4.8575166500603011e+01\n-5.0323071406604596e+00\n1.2059382872246736e+01\n-4.9107752780572994e+01\n-1.6010792914255592e+01\n-4.5930888185947003e+00\n-2.6459987390638293e+01\n1.4286972949246406e+01\n5.8543370586028285e+00\n-3.9919590572571579e+01\n1.4499833247722266e+01\n-1.6987272996796725e+00\n-3.0018893759708153e+01\n1.4145974071568999e+01\n1.5859892318652692e+01\n-5.3981624295275921e+01\n-4.0586760447717278e+00\n1.1893721122481910e+01\n-4.8868283186718806e+01\n-3.7443123883814433e+00\n-5.4249783627043033e+00\n-2.4169079315892684e+01\n-8.5228870617491861e+00\n2.1116172681240708e+00\n-3.5578385903460649e+01\n8.6395369872070678e+00\n1.2119402457497948e+01\n-4.9242769086779681e+01\n-4.3465389217528969e+00\n-7.2903346591587708e+00\n-2.2567234988711458e+01\n7.6286718559604569e+00\n1.3592009868149701e+01\n-5.1087290276705112e+01\n-5.3716275799303910e+00\n4.6069452403399076e+00\n-3.8931271759841273e+01\n-2.8299950078960321e+00\n7.5932505883051507e+00\n-4.2858946365199223e+01\n1.1351542349593402e+01\n2.3697944674424800e+01\n-5.2532383765091048e+01\n6.9852806250877713e+00\n8.1935883598743828e+00\n-4.3657233367871825e+01\n1.0858220747150080e+01\n2.1658841177747558e+01\n-5.4877620299152539e+01\n-5.4456452740470898e+00\n-7.0541114830340357e+00\n-2.2911487622473850e+01\n3.1465322040934245e+00\n-8.2432402152829045e+00\n-2.1185903778100140e+01\n-1.2958492641413570e+00\n-2.0809060810174111e+00\n-2.0825806151776110e+01\n-8.6667534436562423e+00\n3.3559384971857682e+00\n-3.7287099303088873e+01\n3.4068527856651691e+00\n1.6826402002774653e+01\n-5.3663042283860030e+01\n1.0235708956441625e+01\n-3.4602864693436044e+00\n-2.7941434039590831e+01\n1.6200191213883414e+01\n1.9814592750535631e+01\n-5.9972652917893711e+01\n3.3174141079362727e+00\n1.5416575606482159e+01\n-5.3842679590769926e+01\n-1.0328005620090904e+01\n1.1125839269293625e+01\n-4.4272868871098893e+01\n1.0728652051919033e+01\n-6.0243534548071453e+00\n-2.4168633273113748e+01\n1.3973059689112301e+01\n7.2446018174739377e+00\n-3.9060246490131796e+01\n-7.1197089645683258e+00\n-3.5202239975587637e+00\n-2.7723633939791199e+01\n-4.2986303959420944e+00\n8.9192174709227370e+00\n-4.4836434797588026e+01\n1.2977446782073251e+01\n-5.5217096876278129e+00\n-2.4521138853577529e+01\n-7.6996083007878298e+00\n1.8704286150858502e+00\n-3.5290443048897743e+01\n1.6395086606069880e+00\n9.6013821140546085e+00\n-4.5831953796273105e+01\n4.6239314974335430e+00\n1.8985451780494781e+01\n-5.1569941071679516e+01\n-1.4889748307013690e+01\n9.8763527181592359e+00\n-4.4756043761607707e+01\n1.3603749680626008e+01\n8.2584684364779903e+00\n-3.9374201185521819e+01\n1.3953116407756765e+01\n7.5437818203297882e+00\n-3.8777730651693226e+01\n1.2546459881904267e+01\n2.1650488218916720e+01\n-5.7732502587260228e+01\n-2.2044683853508729e+01\n7.9967399861249095e+00\n-4.4177367500734128e+01\n9.2831493207557454e+00\n1.2023549538676345e+01\n-4.9018318079790482e+01\n1.1128414059398230e+01\n-5.4580389647711804e+00\n-2.4888157370750989e+01\n-8.2947237552835311e+00\n6.7330076035227622e+00\n-4.1863210575990266e+01\n-1.3162678424605868e+01\n4.0599559294392895e+00\n-3.8189287357363611e+01\n1.2481012701969259e+01\n-5.3416012343140133e+00\n-2.5048147313879330e+01\n8.4660087969701614e+00\n6.3708861497949636e+00\n-4.1162821130930027e+01\n8.2912556249137417e+00\n9.8472184051517928e+00\n-4.6053482093403105e+01\n-1.1585120325788230e+01\n1.0160607054797699e+01\n-4.3801050301823629e+01\n-1.6416236901202865e+01\n1.1976470066925013e+00\n-3.4541430863361292e+01\n1.4717604917371608e+01\n1.1952809795061588e+01\n-4.8606733205672079e+01\n1.2064299397589320e+01\n-4.1687941872887535e+00\n-2.6793775767510159e+01\n-5.6022157357390725e+00\n7.8537876088147787e+00\n-4.3458264021692543e+01\n-1.0003463294906894e+01\n1.0848067471132376e+01\n-4.4488758161721762e+01\n9.6158933423718000e+00\n1.4527495623081801e+01\n-5.2208441144747901e+01\n1.7057627061558652e+01\n1.5993462064127135e+01\n-5.4513658253998898e+01\n-8.7113852350079313e+00\n1.6848991336760031e+00\n-3.4909320668345622e+01\n7.0911435527003626e+00\n1.0507163325912943e+01\n-4.6908073872382637e+01\n9.6242092713039344e+00\n-6.5399571844313114e+00\n-2.3349764204439797e+01\n-3.1746020005734672e+00\n-7.9322465885192974e+00\n-2.1633237668260904e+01\n-3.3961823339642505e+00\n-7.9386608184346947e+00\n-2.1631890413090126e+01\n-7.1627871488697483e+00\n-7.3226483831198932e+00\n-2.2456043978703750e+01\n-1.3776852905296810e+01\n1.2538974231905751e+01\n-4.0224607599621010e+01\n9.5809579766394553e+00\n-5.3258603516095668e+00\n-2.5244618649620644e+01\n-7.5863787795868518e+00\n-7.0427619123064051e+00\n-2.2868940723325526e+01\n-1.3104902357182098e+01\n-8.4553739082326818e+00\n-2.0926160586764592e+01\n-3.5006941775961535e+00\n8.7760330087472411e+00\n-4.4689043769905702e+01\n5.2504681068782446e+00\n-7.8399979262994153e+00\n-2.1783547992118390e+01\n9.1746827504872819e+00\n-5.8825471620613881e+00\n-2.4426147927505518e+01\n9.8734394283007685e+00\n-6.4527510722265937e+00\n-2.3516947009894832e+01\n-1.5405851776667792e+01\n4.6132466975803572e+00\n-3.9060968348228975e+01\n1.2212860553927525e+01\n6.4778662498457820e+00\n-2.9643633908279320e+01\n7.1979992778263897e+00\n9.4640821169796698e+00\n-4.5609931043903472e+01\n2.2228602231513364e+00\n1.8294603769638918e+01\n-5.0538455576219079e+01\n-7.5349146315005520e+00\n1.5143240646161393e+00\n-3.4497743846917857e+01\n4.2943946096316106e+00\n1.8599231769689474e+01\n-5.2253822358269936e+01\n-1.3199655515992202e+01\n-8.2145341992107195e+00\n-2.1358157743271011e+01\n1.2261789375731270e+01\n1.6067154096779873e+01\n-5.4437604358761476e+01\n-1.5570978064340277e+00\n9.1014774741324960e+00\n-4.5038223191035165e+01\n9.2034868879064149e+00\n-6.5667634775203343e+00\n-2.3463798085277425e+01\n1.1239392782896623e+01\n-1.8346580461194151e+00\n-3.0011588755681924e+01\n9.9216404582362632e+00\n1.1551109899051164e+01\n-4.7988006165875063e+01\n7.0475483550355422e+00\n7.9653290789102407e+00\n-4.3538132556890339e+01\n1.5753172326968402e+01\n1.4705736598396323e+01\n-5.2444436992611102e+01\n-4.2451609005592950e+00\n-7.0289938276422887e+00\n-2.2915282750087531e+01\n-4.9938687352044129e+00\n-6.5393598512994320e+00\n-2.3506463772932975e+01\n7.2118895075521374e+00\n2.5639022129138145e-01\n-2.3898069384804902e+01\n6.6725350760511999e+00\n1.0478622217663226e+01\n-4.6958301804196942e+01\n1.3677067999767404e+01\n7.8014498891162711e+00\n-4.0351904099423521e+01\n-1.7441866992145345e+00\n4.2283287042824416e+00\n-2.8935767070349975e+01\n1.2748888920380898e+01\n-5.2219215821887364e+00\n-2.4921367877531861e+01\n1.7903382210427498e+01\n1.9693987423961218e+01\n-5.9367848211315518e+01\n-1.8703305440774245e+00\n8.7675904178570043e+00\n-4.4647711174982781e+01\n-9.4610256039518639e+00\n2.8942735558905803e+00\n-3.6515597791454624e+01\n-1.2309545663376426e+01\n8.8026857355894492e+00\n-4.4743020879024336e+01\n2.1700513357699253e-02\n2.6838592228114999e+00\n-2.1835182079217677e+01\n7.0166037411290496e+00\n8.3352316814351006e+00\n-4.4147127446374164e+01\n9.6599137858225568e+00\n-4.6075968287530387e+00\n-2.6173906420544533e+01\n4.8708249459468611e+00\n1.9183202664486902e+01\n-5.1656677474035590e+01\n1.1226342110290352e+01\n2.3026919632379144e+01\n-5.3633683961158809e+01\n1.3523852146794976e+01\n7.8023674957461804e+00\n-4.0886956441146801e+01\n1.3763412316867370e+01\n6.9861595912751850e+00\n-4.0342684228192546e+01\n-1.5737384768890967e+00\n9.2523036581446760e+00\n-4.5084746626863982e+01\n1.0126403502585179e+01\n-5.4947045413275450e+00\n-2.4964672767299817e+01\n-7.0524910373274530e+00\n-3.6824692016622009e+00\n-2.7546393265880528e+01\n-7.4094097741776315e+00\n-5.7710400156151982e+00\n-2.4741694287508661e+01\n-2.3405098196406623e+01\n1.1012388261093908e+00\n-3.4439995763637533e+01\n1.3189347280544222e+01\n-5.4032012407324599e+00\n-2.4629799475967378e+01\n1.4305272099615827e+01\n5.9392134053246934e+00\n-3.9727379871149417e+01\n8.2804227500359087e+00\n-6.4814556811183106e+00\n-2.3733563802180207e+01\n-1.6831576231205421e+01\n2.5057179242870333e+00\n-3.6235961695418823e+01\n8.4917691514507148e+00\n-7.0199814974687422e+00\n-2.2824446268347870e+01\n8.8461588586594573e+00\n2.1639366361498290e+01\n-5.2744295285077165e+01\n-1.3984491611902651e+01\n-6.4685957554075841e+00\n-2.3806566065510808e+01\n-4.5133230187112217e+00\n8.1852042350639014e+00\n-4.3808980564713508e+01\n2.9126364708598076e+00\n-6.3128765747461415e+00\n-2.1968947899497174e+01\n-5.8026151073345620e+00\n-4.7445345833246071e+00\n-2.6101197099645852e+01\n1.4188594043378952e+01\n1.4614892234598303e+01\n-5.2516848874118956e+01\n1.2945386375649186e+01\n2.8483755098247932e-01\n-3.2946443679718719e+01\n8.7960609940734606e+00\n-6.2741757743550384e+00\n-2.3932274995029413e+01\n1.3221239035140682e+00\n-2.6981834386721544e+00\n-1.9994429921483846e+01\n-1.3808157668671036e+01\n-7.2815479657654221e+00\n-2.2610292164818965e+01\n-2.1068588457514362e+01\n1.8099361135846623e+00\n-3.5323409155723390e+01\n-8.2947237552835311e+00\n6.7330076035227622e+00\n-4.1863210575990266e+01\n-1.1236309770674449e+01\n-8.3173331882635573e+00\n-2.0951639301568175e+01\n-6.6666656882494149e+00\n-4.0067609226464240e+00\n-2.7148755607947162e+01\n-7.0378677111720451e+00\n-1.7822444841680520e+00\n-3.0185669353712548e+01\n5.6896795959591140e+00\n-6.2184597606350112e+00\n-2.3171247227371548e+01\n-4.8018278844689322e+00\n6.0273121030204946e+00\n-4.1019318651553263e+01\n9.7808158015128583e+00\n-4.5826942792246381e+00\n-2.6218412180603057e+01\n-5.0788857363216104e+00\n4.7054397394642580e+00\n-3.9131412316848831e+01\n3.5006165482418847e+00\n-8.1306750252505626e+00\n-2.1452412313899494e+01\n-1.5233880112071192e+01\n9.9002721507875950e+00\n-4.4605623387434697e+01\n1.2563451251723537e+01\n7.1251073543053440e+00\n-4.2119252361023598e+01\n1.4640797745768197e+01\n1.7043006072182692e+01\n-5.5305318262324882e+01\n6.0645771886727156e+00\n8.1441229112481199e+00\n-4.3939319629966015e+01\n-1.1669019770305841e+01\n-7.8601532587989000e+00\n-2.1710580043994561e+01\n3.3428840233248334e+00\n1.5681812338372941e+01\n-5.4015313785937373e+01\n6.5513787798103644e+00\n9.3045319497656358e+00\n-4.5524973941232965e+01\n-1.3702056821924865e+01\n-7.6204124883782942e+00\n-2.2143461630046815e+01\n1.3627574108755333e+01\n7.8110272868672723e+00\n-3.8049053080751783e+01\n1.6221015134561605e+00\n8.6868712155720633e+00\n-4.4345685250182378e+01\n1.6467146624912136e+01\n1.7232399476267027e+01\n-5.6053540522905521e+01\n-4.7633518135855422e+00\n-8.3808514631415587e+00\n-2.1158007555417861e+01\n1.2875586037740469e+01\n-5.7610900295954677e+00\n-2.4225242804445511e+01\n-1.5248193735514278e+01\n1.0189066256213811e+01\n-4.4173382894997495e+01\n6.4308864813429185e+00\n-7.3348697283168844e+00\n-2.2465797420579573e+01\n6.8419763810844900e+00\n-5.9676633637959065e-01\n-2.2813695620596835e+01\n1.1443838266990985e+01\n-1.3402256980484313e+00\n-3.0714366688294501e+01\n-4.6698987115475763e+00\n-7.6299408653172422e+00\n-2.2068440649921779e+01\n-3.3666666062794062e+00\n-8.3548363874336999e+00\n-2.1105677616157152e+01\n-2.4427775717423139e+00\n-7.7256887553275657e+00\n-2.2078210954414413e+01\n1.3276183074244726e+01\n-5.1052224666314023e+00\n-2.5296045075859759e+01\n3.0265898471809396e+00\n-8.2967194310868777e+00\n-2.1534625106648036e+01\n1.2249195619893634e+01\n-5.3953739043230087e+00\n-2.4889907338297043e+01\n1.0444919534656790e+01\n-6.6175031077753754e+00\n-2.3194752561207419e+01\n-2.8612166606374720e+00\n-8.1099624406295518e+00\n-2.1433940439701420e+01\n-2.9561291051197420e+00\n-7.9420030381200473e+00\n-2.1638766637603545e+01\n2.6697996007942888e+00\n1.4382763561949467e+01\n-5.2250202755338123e+01\n2.6697996007942888e+00\n1.4382763561949467e+01\n-5.2250202755338123e+01\n1.2821532149129274e+01\n-5.9856084857251544e+00\n-2.3855726417279953e+01\n1.0175920166575963e+01\n-4.8744548345078087e+00\n-2.5747424271096477e+01\n-5.5651509822376264e+00\n-6.4413643381534795e+00\n-2.3752560939345305e+01\n-5.1308414779525551e+00\n4.8199874999054693e+00\n-3.9181764466777224e+01\n3.3844229770627248e+00\n-8.0720167915826373e+00\n-2.1489427600159903e+01\n1.3604395562837881e+01\n2.3717494745481044e+01\n-5.4947852121109385e+01\n9.3794029590394050e+00\n-5.9084217120687272e+00\n-2.4396584120228020e+01\n2.1859299279305668e+00\n-8.5136235176406085e+00\n-2.0939641890031869e+01\n-5.1022178758728973e+00\n-6.6910833344724008e+00\n-2.3374806032272197e+01\n9.5980494037261153e+00\n-5.7948017843901516e+00\n-2.4507379586202951e+01\n9.1155913292843369e+00\n-6.3257308297010617e+00\n-2.3878849446503462e+01\n-3.4159836448197320e+00\n7.0935037102616549e+00\n-4.2474399889599930e+01\n9.7042006158698957e+00\n-5.8611984948375895e+00\n-2.4498453955058604e+01\n2.1836846938270725e+01\n2.7331854910504990e+01\n-5.8653686999438804e+01\n-1.3472832944519158e+01\n1.5990363341613801e+01\n-3.4053754121031979e+01\n-1.3472832944519158e+01\n1.5990363341613801e+01\n-3.4053754121031979e+01\n-3.3570378880080822e+00\n1.9507421584565126e+01\n-4.2354004531320157e+01\n1.6150065083020444e+01\n2.6186978077609993e+01\n-5.6592044027824961e+01\n2.2808375388402073e+01\n3.1658553349885057e+01\n-6.8949254719872641e+01\n-1.0723074521813247e+01\n1.7194333845488732e+01\n-3.6778410514499932e+01\n1.4486433109280188e+01\n2.7476124549417673e+01\n-5.9912326030461841e+01\n-3.7114332859018910e+00\n1.9424048322084641e+01\n-4.2137508029638788e+01\n-1.6024631107347712e+01\n1.6036579390742833e+01\n-3.3861072958521802e+01\n2.0427701457860081e+01\n2.7597639457024918e+01\n-5.9911136003698694e+01\n-1.4706305097186540e+01\n1.6357754709964340e+01\n-3.4724452033787500e+01\n-1.2946207298673382e+01\n1.6433019020643727e+01\n-3.5182335918326622e+01\n-4.8158851538652989e+00\n1.9054719917839353e+01\n-4.1403002410956177e+01\n1.8071121531464456e+01\n2.5716375509167065e+01\n-5.6045944633800744e+01\n-3.6215983806827103e+00\n1.9362664330477052e+01\n-4.2294807138382865e+01\n-3.6215983806827103e+00\n1.9362664330477052e+01\n-4.2294807138382865e+01\n1.3980820234059554e+01\n1.4644400972543437e+01\n-3.0856428086575928e+01\n1.3980820234059554e+01\n1.4644400972543437e+01\n-3.0856428086575928e+01\n-6.8501505304064390e+00\n1.8354500778284844e+01\n-4.0109494733223883e+01\n-3.9017412416078683e+00\n1.9214343925396747e+01\n-4.2525048741437423e+01\n-1.3829398244709658e+01\n1.5759241105583003e+01\n-3.4186684251181390e+01\n-9.3814650470293230e+00\n1.7563110228167996e+01\n-3.8159477260041179e+01\n-9.3814650470293230e+00\n1.7563110228167996e+01\n-3.8159477260041179e+01\n-7.4600126028073577e+00\n1.7954545507087062e+01\n-3.9207958454752294e+01\n1.6054283946723469e+01\n2.6620172598724306e+01\n-5.8639865285688501e+01\n1.8205158713450032e+01\n2.5659622505731928e+01\n-5.6266962748173114e+01\n1.3177824414274802e+01\n1.4673310660163763e+01\n-3.1359366000854063e+01\n5.5205537737262915e+00\n2.2433533382691849e+01\n-5.0124092199663949e+01\n1.2644202737966316e+01\n2.5927879669664435e+01\n-5.7641758327821407e+01\n1.4860822505465237e+01\n2.4728925842278411e+01\n-5.4638000224190648e+01\n6.9130982756782302e+00\n2.2541409125010350e+01\n-5.0004534168996869e+01\n-1.2854675472336906e+01\n1.6260763174115027e+01\n-3.5468745746948890e+01\n1.7515974899817159e+01\n2.8390282998755922e+01\n-6.3453386263407630e+01\n1.3812743451048870e+01\n1.4990470159105241e+01\n-3.2060315270862567e+01\n2.2649876375983084e+01\n3.1285711388382840e+01\n-7.0328792921309486e+01\n1.3351476110552914e+01\n1.5300982635933183e+01\n-3.3165661254532225e+01\n1.3379922102664475e+01\n1.5331425057466387e+01\n-3.3233178266048007e+01\n-1.0483967465751569e+01\n1.7162480872380552e+01\n-3.7717544368582367e+01\n1.4032257087246872e+01\n1.4737050332594420e+01\n-3.1570899418871711e+01\n-1.0638259484305879e+01\n1.6845139923305588e+01\n-3.7157454398618057e+01\n-3.8098705593717441e+00\n1.8997956997479644e+01\n-4.2779142950937725e+01\n-1.3232785670725130e+01\n1.6428431679271810e+01\n-3.5934905977114433e+01\n-1.2972728492353912e+01\n1.6094558360800171e+01\n-3.5289672302474422e+01\n-1.0553834397850633e+01\n1.7039818959207523e+01\n-3.7825591168391277e+01\n1.9077624035112353e+00\n2.0788524576186340e+01\n-4.6607453904911544e+01\n1.2510472128792832e+01\n1.5439101661787861e+01\n-3.3537583952438467e+01\n-1.3347504124349332e+01\n1.6241608957721837e+01\n-3.5619316962194148e+01\n-1.1013166779652984e+01\n1.6942863829046676e+01\n-3.7440973293844287e+01\n-9.4799395498234418e+00\n1.7063987884924277e+01\n-3.8023509507547999e+01\n-9.3873350514301936e+00\n1.7018078073068310e+01\n-3.8204298268311355e+01\n1.3707046813847239e+01\n1.3885914569680018e+01\n-3.0053904021164861e+01\n1.8854798676375296e+01\n2.6013226562450665e+01\n-5.8408768101602227e+01\n-1.2830732842716737e+01\n1.5815708263171786e+01\n-3.5113244113614861e+01\n2.5915286705699291e+01\n3.2777207043600562e+01\n-7.4039244443832388e+01\n-4.7103612091891609e+00\n1.8680708978226999e+01\n-4.1932703468632269e+01\n2.7624352000114034e+00\n2.0948121462133280e+01\n-4.7112898770846307e+01\n1.2006110368645565e+01\n2.3741364763690147e+01\n-5.3352802579213041e+01\n1.2006110368645565e+01\n2.3741364763690147e+01\n-5.3352802579213041e+01\n2.1511534646876132e+01\n3.0275024288280711e+01\n-6.8417830168663357e+01\n-1.3476561126773827e+01\n1.5922868310584754e+01\n-3.5563552790720827e+01\n1.3542479863551662e+01\n1.4674088425431798e+01\n-3.1756056191085740e+01\n3.7134204026095134e+00\n2.1111518538142523e+01\n-4.7759819214495131e+01\n9.3590807826261955e+00\n2.4117524844046297e+01\n-5.4606699794873286e+01\n-1.3323294877605818e+01\n1.6250122834825991e+01\n-3.6434342956971115e+01\n1.3547577340902627e+01\n1.4672892978306274e+01\n-3.1921947603320085e+01\n1.3547577340902627e+01\n1.4672892978306274e+01\n-3.1921947603320085e+01\n5.7134493301354077e+00\n2.2384005600080883e+01\n-5.0886499897189410e+01\n-1.1637458515370152e+01\n1.6196678885111325e+01\n-3.6336526622823271e+01\n-1.0684425751791757e+01\n1.7077009779579186e+01\n-3.8327326480635683e+01\n-1.0578191182069148e+01\n1.6702849238098572e+01\n-3.7405148964570209e+01\n-9.0229568937170264e+00\n1.7408822038314060e+01\n-3.9041217965070885e+01\n-6.7666321851872215e+00\n1.7813242374008240e+01\n-4.0484578394276312e+01\n1.2687678213049482e+01\n2.3747717082125995e+01\n-5.3760152975697473e+01\n1.3562676570039432e+01\n1.3853584373241786e+01\n-3.0240332072768496e+01\n-1.0869271727128378e+01\n1.6757814199077352e+01\n-3.7723875326364862e+01\n-1.0869195251838731e+01\n1.6792438129651295e+01\n-3.7828532153235216e+01\n1.9774498373542340e+00\n2.0485740193556303e+01\n-4.6357989081332711e+01\n2.5533024863326613e+01\n3.2326908708286638e+01\n-7.3723378697992359e+01\n-9.2474142466186287e+00\n1.7201936955709392e+01\n-3.8725458440370637e+01\n5.4163659295074709e+00\n2.1436432824022962e+01\n-4.8897261100673738e+01\n-5.6324501068554351e+00\n1.8230744068272863e+01\n-4.1420943251756704e+01\n1.7821863523028976e+00\n2.0486871885666204e+01\n-4.6480220387398575e+01\n-1.3966318420619087e+01\n1.6099968755729108e+01\n-3.5900029242097006e+01\n2.0166281079234036e+01\n2.7587963455463278e+01\n-6.2739349552542109e+01\n1.3497284390160758e+01\n1.4084103846501250e+01\n-3.0987737676019279e+01\n-1.1062102236456713e+01\n1.6460569348459810e+01\n-3.7642505422060594e+01\n-8.9931955693896377e+00\n1.6994992090858691e+01\n-3.8970228282400925e+01\n1.6526622139827147e+01\n2.7343980570872642e+01\n-6.2958462329803282e+01\n-1.4165814016778370e+01\n1.5527009461042351e+01\n-3.4956276216909913e+01\n-8.9056224739877052e+00\n1.7127775730207848e+01\n-3.9187546350870264e+01\n1.3510489844214124e+01\n1.5013939864514285e+01\n-3.3386711321887311e+01\n-1.5307560114090778e+01\n1.5607981995195932e+01\n-3.4947698704720224e+01\n-9.0444192702337052e+00\n1.6831313709840348e+01\n-3.8884264837444867e+01\n-1.2511144168505046e+01\n1.6041708765000589e+01\n-3.6304912566734657e+01\n1.3904452104933499e+01\n1.4471356226613707e+01\n-3.2158372992483187e+01\n-9.5920880532254564e+00\n1.7087202133601803e+01\n-3.9436519366839448e+01\n-9.4321654630680722e+00\n1.7436273577030690e+01\n-4.0608884238957998e+01\n1.3567840975874169e+01\n1.3799587586894653e+01\n-3.0700714562106384e+01\n-1.2644001563516715e+01\n1.5975688122950848e+01\n-3.6226708308435647e+01\n-1.1767357369302948e+01\n1.5902680491566370e+01\n-3.6464626880401845e+01\n1.1730662693967860e+01\n2.3229960893367995e+01\n-5.3928001187831235e+01\n-7.0548480959432505e+00\n1.7455388515069178e+01\n-4.0559422693920055e+01\n-7.0025149393661943e+00\n1.7322069280542298e+01\n-4.0360371630610551e+01\n1.3963453605091816e+01\n1.3814808885771676e+01\n-3.0744991659988518e+01\n1.8180327900639160e+01\n2.5995351953916078e+01\n-6.0568491311297244e+01\n1.5136502819207776e+01\n2.6353725546000728e+01\n-6.1886779452499731e+01\n1.3906445652474906e+01\n2.3768853242446998e+01\n-5.5472869775036315e+01\n-1.0409259407179642e+01\n1.6785056944339949e+01\n-3.9139780761679873e+01\n1.6952364929541517e+01\n2.7197903082253248e+01\n-6.3963541549036051e+01\n-1.8613756320021267e+01\n1.6251338494153039e+01\n-3.7000330134575137e+01\n-1.6821977568434654e+01\n1.5496234941619626e+01\n-3.5127384827333344e+01\n-1.6583474122017073e+01\n1.5144167437296884e+01\n-3.4381042745483946e+01\n-1.2904033346881128e+01\n1.5861165742981578e+01\n-3.6493314127183545e+01\n1.4591124693563655e+01\n2.6024017929538655e+01\n-6.1282011832087164e+01\n2.4519313820453338e+01\n3.1131498122313126e+01\n-7.3271779009096718e+01\n1.3524426508309794e+01\n1.3667724631144052e+01\n-3.0887950375694075e+01\n-1.1789938751869254e+01\n1.6141302787461310e+01\n-3.7581493633828096e+01\n-6.7613393373339994e+00\n1.7452935440837440e+01\n-4.1070398177019086e+01\n-9.2091022207223094e+00\n1.6699636265576729e+01\n-3.9689779331748738e+01\n1.0559898867935285e+01\n2.3906996237099083e+01\n-5.6459861588161615e+01\n-4.7927220622212019e+00\n1.7963600461991660e+01\n-4.2176741364757504e+01\n1.3758510108690729e+01\n1.3321573677527931e+01\n-3.0223255602961984e+01\n-9.6096413394865916e+00\n1.6481551831605962e+01\n-3.9017633662074360e+01\n8.4183755569015195e-01\n1.9808610566863496e+01\n-4.7031436068699492e+01\n1.4553209914727288e+01\n1.4055425564779419e+01\n-3.1917107224579187e+01\n-1.4864416127130491e+01\n1.5480010910620937e+01\n-3.5651806318376323e+01\n-1.0898814064952431e+01\n1.5826385525857654e+01\n-3.7758657459744029e+01\n-1.2736570147741483e+01\n1.5633620107747223e+01\n-3.6802996016351628e+01\n1.6870092329366191e+01\n2.4333393557618191e+01\n-5.7728105269860286e+01\n8.2518585356387302e+00\n2.2673793221365692e+01\n-5.4003611551147387e+01\n1.2447679979797728e+01\n1.1332746769557525e+01\n-2.5424871952407099e+01\n-9.1590384784405661e+00\n1.6440902860469549e+01\n-3.9300349200540673e+01\n-6.6902642792288001e+00\n1.7073842038024033e+01\n-4.1082694812479737e+01\n-1.6607221433551445e+01\n1.5273452616088944e+01\n-3.5148709905006541e+01\n-1.5344916563426617e+01\n1.5264053597092632e+01\n-3.5323725705378628e+01\n-1.4531319647331271e+01\n1.5381073508429623e+01\n-3.5617476585978928e+01\n-4.0999483812453308e+00\n1.8132761365879684e+01\n-4.3465291540637118e+01\n-4.0999483812453308e+00\n1.8132761365879684e+01\n-4.3465291540637118e+01\n1.9989706874789672e+01\n2.8458186822504459e+01\n-6.8008862922849914e+01\n5.8727124056893887e+00\n2.1175272102775896e+01\n-5.0552087248781298e+01\n7.3715443284273352e+00\n2.1467614144855528e+01\n-5.1136849573255866e+01\n-6.6205799234088003e+00\n1.7731760655060715e+01\n-4.2680673010410544e+01\n6.1272987911341241e+00\n2.2672491971474717e+01\n-5.4497592291655472e+01\n-2.6816428711972026e+01\n2.1505628731774841e+01\n-5.0645445198793489e+01\n-5.5890357590610540e-01\n1.9229872767101575e+01\n-4.6035812231231247e+01\n1.8434311371151797e+01\n2.6308214748416319e+01\n-6.2918879241016782e+01\n-9.4346646701665975e+00\n1.6383231663650747e+01\n-3.9413030751478281e+01\n-9.5627457680087193e+00\n1.6647715478552765e+01\n-3.9824165294999119e+01\n-6.9404163617025878e+00\n1.7013043091827676e+01\n-4.1056571636144859e+01\n2.1089492084327027e+01\n2.6609726613173834e+01\n-6.3896038784113053e+01\n-9.9005489927869341e+00\n1.6363967861451460e+01\n-3.8799819261311299e+01\n-3.3364830207830898e+00\n1.8236347155259292e+01\n-4.4218528962068476e+01\n-3.3727909080405198e+00\n1.8313533540764325e+01\n-4.4156313214800768e+01\n-3.3364830207830898e+00\n1.8236347155259292e+01\n-4.4218528962068476e+01\n-1.4896569908110106e+01\n1.5270591478038776e+01\n-3.5713193689730765e+01\n1.4211475904276726e+01\n1.3359882778194944e+01\n-3.0840774094026848e+01\n1.4241832372816351e+01\n1.3161163179163205e+01\n-3.0287252884303726e+01\n1.2951390199625253e+01\n1.0707498159610095e+01\n-2.4273829916177693e+01\n-1.2697379023086741e+01\n1.5869164568274105e+01\n-3.7558037245076726e+01\n-7.1682517403268982e+00\n1.7255565430819779e+01\n-4.2190110111478972e+01\n3.1530627415563806e+00\n2.0079227107830960e+01\n-4.8530709442929663e+01\n1.8386921023682234e+01\n2.6017313024063142e+01\n-6.2873849510791331e+01\n-1.5773978762371319e+01\n1.5938866664874883e+01\n-3.8108497226899750e+01\n1.4242039875928423e+01\n1.3248025961949477e+01\n-3.0789902518557295e+01\n-6.8462278198402213e+00\n1.6991921303297474e+01\n-4.1342766389158363e+01\n1.4704068908448265e+01\n1.3507941839296503e+01\n-3.1381836139860983e+01\n1.2996922582764073e+01\n1.0688889772011441e+01\n-2.4352477789873411e+01\n-9.5245932419772075e+00\n1.6211642886323553e+01\n-3.9070475131741020e+01\n-9.4142735042324865e+00\n1.6122334366706873e+01\n-3.9323009657682441e+01\n9.4363981803577812e-01\n1.9492846368819468e+01\n-4.7509771976353143e+01\n1.2370900012956906e+01\n1.1350541069515884e+01\n-2.5868795968901253e+01\n7.5362397716461194e-01\n1.9405416569113459e+01\n-4.7396241592735677e+01\n-1.4505324945310949e+01\n1.5044199533500402e+01\n-3.6283493380865551e+01\n-1.1567054407369811e+01\n1.5555675408415055e+01\n-3.8163876566739830e+01\n-9.3344775927390806e+00\n1.6256083537472406e+01\n-3.9922748523039566e+01\n3.2831833899093171e-01\n1.9135179003068547e+01\n-4.7041633019753952e+01\n2.0671476545852102e-01\n1.9105990950005062e+01\n-4.6895384354329281e+01\n2.6530829092228898e+00\n1.9703373070834200e+01\n-4.8440295890314921e+01\n2.6347534538419688e+00\n1.9966508985943889e+01\n-4.9238744772784642e+01\n2.3923266321474790e+00\n1.9502935884573315e+01\n-4.8157892682422158e+01\n-5.2096667978937168e+00\n1.7263131204255782e+01\n-4.2774136580671680e+01\n-5.2096667978937168e+00\n1.7263131204255782e+01\n-4.2774136580671680e+01\n-1.5460850798834494e+01\n1.4969499325687647e+01\n-3.5967208380410398e+01\n3.6302891457073377e-01\n1.9503013775226787e+01\n-4.8503880244636193e+01\n2.6560622917846852e+00\n1.9787616037589792e+01\n-4.8877824060891022e+01\n-9.5020272673347623e+00\n1.5910758965188537e+01\n-3.9674446671220359e+01\n2.3857776504293726e+00\n1.9428812980573621e+01\n-4.8226022757209734e+01\n1.2070611803829310e+01\n1.1104750238480875e+01\n-2.5774839553386112e+01\n-3.4323327691987564e+00\n1.7907559691231949e+01\n-4.4336311441359740e+01\n-9.9408544511480468e+00\n1.5862878329407735e+01\n-3.9416466823383409e+01\n1.6550594229298137e+00\n1.9225743477418423e+01\n-4.7785638802529483e+01\n2.5874097418025670e+00\n1.9523937116451627e+01\n-4.8961312359272014e+01\n1.4143307231491308e+01\n1.2848780788817264e+01\n-3.0581830904148298e+01\n1.3432810821157481e+01\n1.3395252374731701e+01\n-3.2371420479610983e+01\n2.1953620333711386e+00\n1.9372392113203119e+01\n-4.8567410735206316e+01\n4.0780763177992121e+00\n2.0318936691192462e+01\n-5.1309579526419370e+01\n2.7296670413203895e+01\n3.1394473666941053e+01\n-7.8822504022579309e+01\n-1.1803368092367057e+01\n1.5381243555240653e+01\n-3.8431142731333829e+01\n2.3669958258331580e+00\n2.0121379819819122e+01\n-5.1070221119062438e+01\n1.3568338923216036e+01\n1.0866995123304825e+01\n-2.5467490271910563e+01\n-6.0097233896818212e+00\n1.6819110273559989e+01\n-4.2486299614156032e+01\n3.4632264268413850e+00\n1.9919515389967792e+01\n-5.0295457781637829e+01\n-1.3313756115733060e+00\n1.9082409570628801e+01\n-4.8728999158736379e+01\n1.4014069658522434e+01\n1.3603941691295573e+01\n-3.2881484455626072e+01\n9.8784567830981040e-01\n1.9200437132368005e+01\n-4.8796083825813248e+01\n-2.7434932832240605e+01\n2.1496852724321752e+01\n-5.3200901206751446e+01\n-3.3167838861334107e+00\n1.7609552091248457e+01\n-4.4330132598805655e+01\n-1.6384210543749615e+00\n1.8431997463016295e+01\n-4.6861389129151831e+01\n-2.2360215499855447e+00\n1.8672270270726244e+01\n-4.7903467829617014e+01\n-8.3946834785941826e-01\n1.8405834943851975e+01\n-4.6877114289734799e+01\n2.2747299860565229e+00\n1.9364280716543703e+01\n-4.9269623541091534e+01\n1.2317805027702384e+01\n1.0635356309656302e+01\n-2.5247675538275196e+01\n1.3138255304730047e+01\n1.0561650600463080e+01\n-2.4937684251087866e+01\n1.3273138275420465e+01\n1.4109803071928287e+01\n-3.4722366185711586e+01\n1.3189980060492694e+01\n1.0124603842529883e+01\n-2.4087635700811177e+01\n-2.3144811725591126e+00\n1.7849372457631539e+01\n-4.5716405582309513e+01\n2.2867558774680226e+00\n1.9846891761800865e+01\n-5.1091718601987544e+01\n1.4700861651974302e+01\n1.3092208586483931e+01\n-3.2021684376149985e+01\n1.4700861651974302e+01\n1.3092208586483931e+01\n-3.2021684376149985e+01\n-2.7441410066652008e+01\n2.0956327223117825e+01\n-5.2667076206499061e+01\n-6.8673671562299061e+00\n1.6382278368610134e+01\n-4.2133108884011840e+01\n-1.0199104991237839e+01\n1.5949556362140243e+01\n-4.1160396322811557e+01\n-9.8292552760410281e+00\n1.5111964877269381e+01\n-3.9205417364677494e+01\n-6.4576190674542122e+00\n1.6738457730056865e+01\n-4.3607418466256071e+01\n-6.4576190674542122e+00\n1.6738457730056865e+01\n-4.3607418466256071e+01\n1.4209143642642090e+01\n1.0197144436680555e+01\n-2.4327182383111339e+01\n-1.0924330157730548e+01\n1.5401216457536401e+01\n-3.9170664913200618e+01\n-1.0856862802804748e+01\n1.5464876725797884e+01\n-3.9680274326659351e+01\n-3.7919298911405073e+00\n1.7254770573480162e+01\n-4.4574845834032608e+01\n-1.1829143204260752e+01\n1.5541323020339959e+01\n-4.0262396458136919e+01\n1.2154473932364105e+01\n1.0156079384792438e+01\n-2.4438161515585428e+01\n1.2792875802741792e+01\n1.0369242964812097e+01\n-2.5301577590531998e+01\n-1.4524578453881025e+01\n1.3548689564775984e+01\n-3.4775338995885122e+01\n-1.4524578453881025e+01\n1.3548689564775984e+01\n-3.4775338995885122e+01\n-9.5538375012633416e+00\n1.5563800266265405e+01\n-4.0490151770920164e+01\n1.4162594157413695e+01\n1.0010933039472066e+01\n-2.4094039961374175e+01\n1.2905762603996772e+01\n1.0290848807795662e+01\n-2.4801647337914254e+01\n-2.8134236808703075e+00\n1.7604578013129345e+01\n-4.5711100031788099e+01\n-1.5632099531502659e+00\n1.7636086716068007e+01\n-4.6429357583301801e+01\n1.4421820110248873e+01\n1.2901824331842128e+01\n-3.2208744799319817e+01\n1.3383742334079697e+01\n1.0328990145213869e+01\n-2.5088233593124926e+01\n1.3025412210419752e+01\n1.4029523725044491e+01\n-3.5772078376878461e+01\n-5.0105736892429418e+00\n1.6682011645325211e+01\n-4.3843580400723383e+01\n1.4939168695664740e+01\n2.3331645980892617e+01\n-6.0773066281707891e+01\n-1.2234916372117944e+01\n1.4656022015878735e+01\n-3.7864054506769889e+01\n-1.2234916372117944e+01\n1.4656022015878735e+01\n-3.7864054506769889e+01\n-9.7780483040844013e-01\n1.8026443934444231e+01\n-4.7301495628134738e+01\n1.2327953255576931e+01\n1.0383913188894745e+01\n-2.5522321227266481e+01\n1.2903500673321830e+01\n1.0450232423714748e+01\n-2.5530365519562835e+01\n1.2903500673321830e+01\n1.0450232423714748e+01\n-2.5530365519562835e+01\n-2.3266278615056479e+00\n1.7510226362923206e+01\n-4.6133863774571630e+01\n-2.3119625660374723e+00\n1.7349788900766047e+01\n-4.5992103045808001e+01\n1.2724102078634042e+01\n1.0136443267030190e+01\n-2.4743807501073992e+01\n-3.6177226795943755e+00\n1.6965458509328258e+01\n-4.4883201587360979e+01\n-2.1535780529138289e+00\n1.7686612554718177e+01\n-4.6364717748740695e+01\n-2.1721417701946057e+00\n1.7563030981433730e+01\n-4.6208576061160386e+01\n-8.6958620157993760e-01\n1.7950943563651197e+01\n-4.7214605582617956e+01\n-1.2506804667495501e+01\n1.4783467718477432e+01\n-3.8648376672055136e+01\n1.3576371117636224e+01\n1.3705507125789529e+01\n-3.5069755795256697e+01\n1.3870740739052923e+01\n1.3914642562672430e+01\n-3.5681174756644282e+01\n5.9263845403128967e-01\n1.8511697772421339e+01\n-4.9203831395103478e+01\n-1.8548066262046000e+01\n1.4893894152380156e+01\n-3.8207017939285556e+01\n-1.8548066262046000e+01\n1.4893894152380156e+01\n-3.8207017939285556e+01\n-3.2350821447290983e+00\n1.7671877608742943e+01\n-4.7349753532097047e+01\n1.2865115057741553e+01\n9.9631485288491639e+00\n-2.4459510214182764e+01\n1.6080061021955320e+01\n2.2275499466802529e+01\n-5.9151717374761901e+01\n-1.2922705078959649e+00\n1.7683817772634079e+01\n-4.7004808785282613e+01\n-2.6824747266366571e+00\n1.7382047590062967e+01\n-4.6463898065078247e+01\n-1.8020933225174942e+00\n1.7855055245455361e+01\n-4.7653124604290149e+01\n1.2748743306427126e+01\n1.0091589352430624e+01\n-2.4813373647618747e+01\n-1.5279356192168130e+01\n1.4772791116787465e+01\n-3.8806434784266919e+01\n-2.2355611045395318e+00\n1.7381079682754287e+01\n-4.6175244993332484e+01\n1.5497686415719794e+01\n2.2422239985438910e+01\n-5.9807493806178414e+01\n1.3949018930307718e+01\n9.1823134286920727e+00\n-2.2616320101491418e+01\n5.5681975673470196e+00\n1.9642633762914578e+01\n-5.2417889198800971e+01\n-3.4818442423785281e+00\n1.6863840564354366e+01\n-4.5268303344880970e+01\n1.6323343788970682e+01\n2.4802205020287460e+01\n-6.6464800229212074e+01\n-1.6166022888120867e+01\n1.5066801783468641e+01\n-4.0001296305521763e+01\n-1.0105098184899095e+01\n1.4652869612644169e+01\n-3.9640972103328870e+01\n-2.7591031568287261e+00\n1.7262330098874141e+01\n-4.6296877394791899e+01\n-1.1812267213500146e+01\n1.4522594253578234e+01\n-3.8590768580404742e+01\n5.8161183654504960e+00\n1.9048395634521313e+01\n-5.1524551895999316e+01\n1.3119875771385651e+01\n9.7779338037812362e+00\n-2.4670105325498351e+01\n1.4397689457780279e+01\n9.5910402318364572e+00\n-2.3899482671757518e+01\n-1.4761453811568956e+01\n1.4145621440563861e+01\n-3.7224315858306980e+01\n-1.2946810952428320e+00\n1.8132035084910079e+01\n-4.9695963128584701e+01\n-1.2839236950324620e+00\n1.7993731151207253e+01\n-4.8975297222129527e+01\n-9.7767080349498237e+00\n1.5094465013579129e+01\n-4.0881091772342806e+01\n1.5173848724858285e+01\n2.1860337606422199e+01\n-5.9209286059880732e+01\n-8.0728969663124666e+00\n1.5326216195275881e+01\n-4.1674946338725491e+01\n1.3203953791923629e+01\n1.0368325052385526e+01\n-2.6392486640504451e+01\n-1.2094805599390007e+01\n1.4249561608905585e+01\n-3.8565570961105941e+01\n-1.0891469099220261e+01\n1.4551390706244595e+01\n-3.9522568790528737e+01\n-1.0600672532987364e+01\n1.4103495005201415e+01\n-3.8607264586219301e+01\n-1.5751390681057677e+01\n1.4702080226563702e+01\n-3.9792275270072174e+01\n1.6068529016051922e+01\n2.4344004811238783e+01\n-6.6638618594404576e+01\n1.2814262774370945e+01\n9.8018311403836087e+00\n-2.4968423740373773e+01\n-5.0737900385429553e+00\n1.6162065513672246e+01\n-4.4509797504441558e+01\n1.2795620933333829e+01\n9.6147910716772760e+00\n-2.4404266611766872e+01\n-7.9907181374826326e+00\n1.5351370284001373e+01\n-4.2368374691460069e+01\n1.3808881673392110e+01\n1.2661331108880622e+01\n-3.3465230377058383e+01\n-1.2476775618995458e+01\n1.4104453903892178e+01\n-3.8251302781863316e+01\n-1.2476775618995458e+01\n1.4104453903892178e+01\n-3.8251302781863316e+01\n-7.9454550498539582e+00\n1.5548227455379545e+01\n-4.2528966200387785e+01\n-8.4728547578140603e+00\n1.5349542295442999e+01\n-4.1917233545121618e+01\n1.3056972385623510e+01\n9.6616870109747257e+00\n-2.4876540271318248e+01\n1.4801627832728769e+01\n9.3418810457887727e+00\n-2.3570640611412788e+01\n8.1812821132693738e+00\n1.9740312622416333e+01\n-5.4892063896863959e+01\n1.7522814365327452e+01\n2.4726939951683434e+01\n-6.8552155569533440e+01\n-1.2631750993883502e+01\n1.4445228169600014e+01\n-3.9475669418114521e+01\n-3.3365208199610058e-01\n1.7800895067175876e+01\n-4.9368468059164343e+01\n1.2823714669832505e+01\n1.0334366650768166e+01\n-2.6973673181350410e+01\n1.3788634707877959e+01\n8.5489995501851475e+00\n-2.1653407002572010e+01\n1.8347120748761277e+01\n2.5085133076770479e+01\n-7.0274834282754298e+01\n1.3160177287864194e+01\n9.6943923083269645e+00\n-2.5163303159786537e+01\n8.4301272315643576e+00\n2.0094184769958463e+01\n-5.6229844108030001e+01\n1.2455032448782665e+01\n1.0258790279585687e+01\n-2.6944609412730543e+01\n-1.5809409140790246e+01\n1.3600546178509047e+01\n-3.7138175363560741e+01\n-9.7010141976521265e+00\n1.4674322533700931e+01\n-4.0939039623043186e+01\n-9.7010141976521265e+00\n1.4674322533700931e+01\n-4.0939039623043186e+01\n-8.6330223966834758e+00\n1.4912831114119268e+01\n-4.2217805969652659e+01\n1.3306739378726883e+01\n9.9995712097320464e+00\n-2.6304971609682461e+01\n-2.2720654848127269e+00\n1.6416139471655971e+01\n-4.6190447891514033e+01\n1.2726281678408649e+01\n9.9823392231368615e+00\n-2.6345793481730045e+01\n1.2713431275229899e+01\n9.4921719680657457e+00\n-2.5143389913341693e+01\n-1.2534807751025538e+01\n1.3965280684381945e+01\n-3.8737208096116497e+01\n1.3357125439888296e+01\n1.2681448138631106e+01\n-3.4632923366703658e+01\n1.2186144210828935e+01\n9.6438748142617907e+00\n-2.5681443197818055e+01\n-1.2484656336026513e+01\n1.3945169327307239e+01\n-3.9060871375257321e+01\n1.3229585605056497e+01\n1.2236535610981093e+01\n-3.3798024696493115e+01\n1.2539106394038380e+00\n1.8119691240941719e+01\n-5.2018851704700509e+01\n1.2793502671730058e+01\n1.2338903515446979e+01\n-3.4088714694008360e+01\n-9.4267297485043340e+00\n1.4744021240353877e+01\n-4.1537882616143001e+01\n-8.1108667812734545e+00\n1.4884203264464034e+01\n-4.2662059479924125e+01\n-8.1108667812734545e+00\n1.4884203264464034e+01\n-4.2662059479924125e+01\n-9.6183978949410083e+00\n1.4718287060861078e+01\n-4.1986015852779659e+01\n9.0162635280415522e+00\n2.0525918638313264e+01\n-5.8901523217559294e+01\n-6.1038595522669556e+00\n1.5379844124356513e+01\n-4.4359941580757102e+01\n-1.9117246218921446e+00\n1.5992498548507031e+01\n-4.6014324213498313e+01\n-7.1721870530856116e+00\n1.5156475693896956e+01\n-4.3643967236910008e+01\n-9.6570721272107640e+00\n1.4414806027564291e+01\n-4.1266852251050338e+01\n1.0445103527976663e+01\n1.9703162128079327e+01\n-5.7222114245123187e+01\n1.3726325845339128e+01\n9.1220622165986907e+00\n-2.4456296693634222e+01\n1.3726325845339128e+01\n9.1220622165986907e+00\n-2.4456296693634222e+01\n-1.5138256373791949e+01\n1.3375187896523764e+01\n-3.8226882370903802e+01\n-4.6268207101020593e+00\n1.5637059140341551e+01\n-4.5303382285893221e+01\n-1.1268554020830269e+01\n1.3125074758285786e+01\n-3.8226054911276897e+01\n1.6442664804268905e+01\n2.3546401005848704e+01\n-6.8603962515082145e+01\n-7.0331415215787096e+00\n1.5120795773912828e+01\n-4.4055144042514925e+01\n-1.1244308142476758e+01\n1.3772527173291492e+01\n-4.0130766335611440e+01\n1.3403431805324400e+01\n1.2025141732923133e+01\n-3.3654199180867657e+01\n-4.7904322258882583e+00\n1.5479104671454678e+01\n-4.5771486769439328e+01\n1.3746847512063686e+01\n1.1944634588730130e+01\n-3.3827201442291404e+01\n-1.6169038561195766e+01\n1.3499103018488169e+01\n-3.9272088137316160e+01\n1.3374162929806337e+01\n1.2226300257577456e+01\n-3.5052579106999282e+01\n4.9010642730496627e+00\n1.8642646516501394e+01\n-5.5238597236575828e+01\n1.2321052871118418e+01\n9.7886424516775339e+00\n-2.7205419755068696e+01\n1.2381563874617719e+01\n9.7009993627821220e+00\n-2.7061104751309145e+01\n-6.8723704556827450e+00\n1.4932615099010867e+01\n-4.4520061116736912e+01\n-1.0507909837442954e+01\n1.3361625131529893e+01\n-3.9729257210892101e+01\n-1.0507909837442954e+01\n1.3361625131529893e+01\n-3.9729257210892101e+01\n-2.2002585815140986e+01\n1.5601422593851357e+01\n-4.5192460512431509e+01\n-6.5885428274866147e+00\n1.4991980576512992e+01\n-4.4862876438356246e+01\n-6.5885428274866147e+00\n1.4991980576512992e+01\n-4.4862876438356246e+01\n1.0007180725934601e+00\n1.6979554897143217e+01\n-5.0474924804089277e+01\n-1.0803039902166853e+01\n1.3861533373720464e+01\n-4.0885686367480098e+01\n-7.5599431081970776e+00\n1.4596368089937533e+01\n-4.3700832187285108e+01\n-9.6400025396139437e+00\n1.4263485263863036e+01\n-4.2304209077743863e+01\n-9.7238284364682954e+00\n1.4587508342660730e+01\n-4.3766499305973646e+01\n-1.0901940647539730e+01\n1.3599525786044012e+01\n-4.0832608927066609e+01\n-1.0901940647539730e+01\n1.3599525786044012e+01\n-4.0832608927066609e+01\n-1.0580604203974204e+01\n1.3142089086437114e+01\n-3.9512051457156154e+01\n-7.8642946810502599e+00\n1.4632574588454384e+01\n-4.3905756626164575e+01\n8.9163326859476868e+00\n1.9728746938445109e+01\n-6.0045832092325156e+01\n1.3293803998287782e+01\n1.2636687517132156e+01\n-3.6988957242143414e+01\n1.4236284233736225e+01\n8.8283843700500846e+00\n-2.4505019997924943e+01\n-1.3838962694303412e+01\n1.3222719308304693e+01\n-3.9225631949866070e+01\n4.7484335275111622e+00\n1.7543163329323527e+01\n-5.3265275844484655e+01\n-1.2407323371082406e+01\n1.3481805418846683e+01\n-4.0367863489757518e+01\n-9.9972812291486921e+00\n1.3363769019646396e+01\n-4.0760439255161117e+01\n1.4076275443848225e+01\n8.9453032326122965e+00\n-2.5082836665092699e+01\n1.2814166596874140e+01\n1.2165200932823319e+01\n-3.5694631070854676e+01\n-8.5886443343797794e+00\n1.4116920203932551e+01\n-4.3154139530236456e+01\n1.3089876082602688e+01\n8.6072269664023331e+00\n-2.4305631978304362e+01\n1.3089876082602688e+01\n8.6072269664023331e+00\n-2.4305631978304362e+01\n-9.5587269121591039e+00\n1.3968077567296463e+01\n-4.2630716410140153e+01\n1.3384767758711574e+01\n8.6568182019696494e+00\n-2.4657909172755353e+01\n1.3363962195420244e+01\n8.6552181103704218e+00\n-2.4630100939120354e+01\n-1.3120761903230100e+01\n1.2918609702621968e+01\n-3.9445107549875260e+01\n-7.0364059852721557e+00\n1.4881486200774328e+01\n-4.5769609708756462e+01\n-9.7324208584237013e+00\n1.3862783670637116e+01\n-4.2502688400961446e+01\n-9.7554600575981780e+00\n1.3964046571789181e+01\n-4.2745803095437694e+01\n-1.3262379351024084e+01\n1.2871306353832926e+01\n-3.9502878495349698e+01\n-9.9670185920965544e+00\n1.3802322930242374e+01\n-4.2675512277062190e+01\n1.2649358619145891e+01\n8.4632385904904996e+00\n-2.4460139327769646e+01\n1.2760293573520428e+01\n8.7495247396451905e+00\n-2.5632425561308430e+01\n1.3369042067508630e+01\n8.5023309757643979e+00\n-2.4575213603794090e+01\n1.6711251670889936e+01\n1.3463939414888630e+01\n-4.1125671227368535e+01\n-1.2570147485487682e+01\n1.2969790318722678e+01\n-3.9972470462730172e+01\n1.2385399493540779e+01\n8.9693470106996429e+00\n-2.6316074514445379e+01\n1.2540175022020154e+01\n8.8488628128297968e+00\n-2.5875035135273389e+01\n1.2682969180670019e+01\n8.8776452604878742e+00\n-2.5672669202795817e+01\n-9.1774091232163943e+00\n1.3847953400263053e+01\n-4.3149222235463306e+01\n-1.1877904174566631e+01\n1.2940206371745017e+01\n-4.0540192652978966e+01\n1.2691446509392375e+01\n8.3600861288516004e+00\n-2.4735957579319045e+01\n-8.7578043521121334e+00\n1.3224769104712012e+01\n-4.1694804026659611e+01\n-9.4231502496939417e+00\n1.3183302338843232e+01\n-4.1625284074790819e+01\n1.2091683458839966e+00\n1.6395123347540856e+01\n-5.2273479454803066e+01\n1.6253226525480265e+01\n1.3241354308107869e+01\n-4.0988716644881983e+01\n-8.7705638822027634e+00\n1.4076789155609138e+01\n-4.4456381565729338e+01\n-6.6350116245270643e+00\n1.4299149623974692e+01\n-4.5191907595419423e+01\n-6.6341008182945789e+00\n1.4290193021743306e+01\n-4.5255409860528729e+01\n-1.8863942949757863e+01\n1.3632835008632151e+01\n-4.2234616199866423e+01\n-1.1032563696959055e+01\n1.3152033562292841e+01\n-4.1252859687091302e+01\n-1.1086419724983847e+01\n1.3075708093534329e+01\n-4.1402324632687936e+01\n-9.6113547097953109e+00\n1.3673750864272613e+01\n-4.3045961613418470e+01\n-9.6618319437127891e+00\n1.3664828718756203e+01\n-4.2754386756826889e+01\n-1.5889364955625313e+01\n1.2753592103093300e+01\n-4.0175033805845224e+01\n1.2479243798618262e+01\n8.9371966261001194e+00\n-2.6587167030365435e+01\n-1.0463976014304290e+01\n1.3151828008900416e+01\n-4.1994788199100988e+01\n-1.0466633327025310e+01\n1.3175229118378219e+01\n-4.2045904787539342e+01\n-1.0466633327025310e+01\n1.3175229118378219e+01\n-4.2045904787539342e+01\n-9.2686136393602734e+00\n1.3531906086273192e+01\n-4.3004358402411256e+01\n-8.9207199967151372e+00\n1.3666590341597388e+01\n-4.3212511403436260e+01\n-8.5016798656449968e+00\n1.3634026621977323e+01\n-4.3689894497675780e+01\n1.2721425616659804e+01\n8.9751987034812615e+00\n-2.7368150823994270e+01\n-1.4550409149114362e+01\n1.2327796793545586e+01\n-3.9166403408969707e+01\n-1.4044339109968638e+01\n1.2557848183270139e+01\n-3.9692888751881036e+01\n-9.4809603058980230e+00\n1.3024982819602112e+01\n-4.1879790324102878e+01\n-9.8365964709828884e+00\n1.3622802026679986e+01\n-4.3647531070746851e+01\n-1.3083956915340421e+01\n1.2693301743316148e+01\n-4.0361920757605034e+01\n-1.2989179540085807e+01\n1.2727938767522295e+01\n-4.0461396767395570e+01\n-1.2958062673523125e+01\n1.2635131302359662e+01\n-4.0314688015921583e+01\n1.7137579977360417e+01\n1.2897888818209397e+01\n-4.0589130005113354e+01\n-8.3936305505030955e+00\n1.3713463693270917e+01\n-4.4187429547443095e+01\n-8.6439164119493714e+00\n1.3784661106218849e+01\n-4.4543760137830105e+01\n7.6261389407881452e-01\n1.5884322719851198e+01\n-5.1490563082526975e+01\n7.4548806521491184e-01\n1.5892063843028918e+01\n-5.1582208433406834e+01\n1.3616794287432914e+01\n8.3652460819182028e+00\n-2.5326256011493623e+01\n-9.9218818431335301e+00\n1.3115006897160017e+01\n-4.2646691442809662e+01\n-9.8312483840562930e+00\n1.3229907244929091e+01\n-4.2962135987474461e+01\n-4.7374667035016191e+00\n1.4589372490141541e+01\n-4.7403149527353939e+01\n-1.4102342151985626e+01\n1.2265546311229603e+01\n-3.9238023171531125e+01\n-1.0909936244571959e+01\n1.3402786576478960e+01\n-4.3630552952134252e+01\n-1.0761882190166657e+01\n1.3163724419555802e+01\n-4.2744654841858271e+01\n1.2924696225056529e+01\n9.0177595015783609e+00\n-2.7556065181738301e+01\n-9.0847965922762945e+00\n1.3551777315086888e+01\n-4.4440554997822204e+01\n-1.5378681254534477e+01\n1.2229348604333358e+01\n-3.8932580783998588e+01\n1.3693596735773028e+01\n1.0701534750075846e+01\n-3.4008739347070765e+01\n-6.7006289652743067e+00\n1.3996714019419503e+01\n-4.5886154224986306e+01\n-6.7368318358507731e+00\n1.4014683782820228e+01\n-4.5735584215561190e+01\n8.6826048714872717e-01\n1.5900728028612553e+01\n-5.2072366423751177e+01\n9.4605135658359729e-01\n1.6111465199842389e+01\n-5.2981856284677093e+01\n-9.8411790938894956e+00\n1.3270589744803846e+01\n-4.3133142220486512e+01\n-1.1207052748300759e+01\n1.2799498494802499e+01\n-4.1952103063418150e+01\n1.3600521609503121e+01\n8.5640054416106608e+00\n-2.6232190923231848e+01\n1.2731717632922468e+01\n7.9404298330760179e+00\n-2.4717815334016972e+01\n-8.8773085314035054e+00\n1.3402463719642801e+01\n-4.3892304345217276e+01\n8.5765806437925218e-01\n1.5750204236978991e+01\n-5.2216856787860166e+01\n1.3346149716517630e+01\n1.0429839991777540e+01\n-3.3339302548624239e+01\n1.2844197663053796e+01\n8.8022968005778779e+00\n-2.7267305554863970e+01\n1.3621858167520619e+01\n8.2221969057971851e+00\n-2.5221658744407698e+01\n1.3917492307842201e+01\n1.0424462992325035e+01\n-3.3761397610592518e+01\n-1.4875410677836555e+01\n1.2761960405448102e+01\n-4.2124402914791183e+01\n-1.6969079591537017e+01\n1.1704988097533969e+01\n-3.7996947333468469e+01\n-6.9939235807468751e+00\n1.3353240051927267e+01\n-4.5042477159818390e+01\n1.3398595043040482e+01\n7.9229313855919381e+00\n-2.4984057261701913e+01\n-7.3859289561141699e+00\n1.3641035863182674e+01\n-4.5891377589528830e+01\n1.2737329069680094e+01\n8.0137600148213437e+00\n-2.4766518429192569e+01\n1.3028157969034572e+01\n7.9607794860066141e+00\n-2.5182637391627040e+01\n-1.1548090293725005e+01\n1.2462099604249412e+01\n-4.1845337540475015e+01\n-1.0977750758768792e+01\n1.2716234116185053e+01\n-4.2568695099117782e+01\n1.3462222909626977e+01\n1.0145147140197707e+01\n-3.3098975613229058e+01\n1.2994801943969339e+01\n8.1803881414601172e+00\n-2.5969992750968881e+01\n-6.8870586672123730e+00\n1.3405793043705536e+01\n-4.6019544345284288e+01\n-1.5465067318640802e-01\n1.5305406717881793e+01\n-5.2517644945362029e+01\n1.4185721783541405e+01\n7.4481688961231090e+00\n-2.3675190057078083e+01\n-1.6861278904252188e+01\n1.1761319470920537e+01\n-3.9795758956513843e+01\n1.3688306260745797e+01\n1.0329238580677822e+01\n-3.3633064659702384e+01\n1.3046359924124232e+01\n7.9866376550523599e+00\n-2.5872719548238539e+01\n1.2313533589563777e+01\n8.2972686824093831e+00\n-2.7217908806439620e+01\n1.2597767472807185e+01\n8.5005554415426090e+00\n-2.7859334294824865e+01\n1.2639076198460641e+01\n7.7385959117845360e+00\n-2.5134055473047280e+01\n-1.0006654952457479e+01\n1.2618111710874569e+01\n-4.3610900452897226e+01\n-1.2235396356445772e+01\n1.1986851153548900e+01\n-4.1195890075615097e+01\n1.3468217209412929e+01\n7.1717801347831509e+00\n-2.3337489935342049e+01\n-1.3087294338747306e+01\n1.2334638273587501e+01\n-4.2459078560602187e+01\n1.4239722679093235e+01\n1.0067617068553437e+01\n-3.3566022745165633e+01\n1.3814209057955429e+01\n1.1429328193291846e+01\n-3.8755910929882198e+01\n1.2804172618611608e+01\n7.7840807957685785e+00\n-2.5326311869335786e+01\n-9.9290341707462471e+00\n1.2641515683752825e+01\n-4.4090947288015343e+01\n-9.6250366693394156e+00\n1.2745418704772648e+01\n-4.4071217348579339e+01\n2.0500710891560303e-01\n1.5005040823608320e+01\n-5.2595515945605136e+01\n-1.1907678264548748e+01\n1.1950202685538825e+01\n-4.1874114686570643e+01\n1.3470681119017430e+01\n9.9538266058283824e+00\n-3.3600669349314700e+01\n-1.2233584411937407e+01\n1.1944076027347485e+01\n-4.1409278355127924e+01\n-5.4933994742358925e+00\n1.3757685291474148e+01\n-4.8525412554851023e+01\n-1.1900363476366673e+01\n1.1990870507737704e+01\n-4.1994777597288746e+01\n-1.0063581292191676e+01\n1.2119139399098296e+01\n-4.2782832541862824e+01\n-6.7996496491852634e+00\n1.3216090589616670e+01\n-4.6967058026290282e+01\n-6.8556297063192773e+00\n1.3385984679432863e+01\n-4.7572802592365100e+01\n1.2670887501477635e+01\n8.1705648053177615e+00\n-2.7472347394520764e+01\n1.2940128392758284e+01\n8.1090320635631628e+00\n-2.7420592870634170e+01\n1.2342506002705857e+01\n8.1408515977256926e+00\n-2.6934337660937594e+01\n1.2828291864919468e+01\n8.1532532808564362e+00\n-2.7599088011651926e+01\n-1.0269123467952880e+01\n1.1953800732468036e+01\n-4.2770319078180023e+01\n-9.4363774604039730e+00\n1.2366393705351760e+01\n-4.4220821901594853e+01\n-6.1043634833244438e+00\n1.3279638329368160e+01\n-4.7523256105280268e+01\n-4.3550022103366208e+00\n1.3829955989072651e+01\n-4.9534072840104535e+01\n1.1943815927574054e+01\n8.0748341899582208e+00\n-2.7265625943110734e+01\n-4.1492327008820089e+00\n1.3548336653545434e+01\n-4.9161398095500047e+01\n1.3448991627134884e+01\n9.8010091364209693e+00\n-3.4119553376535443e+01\n-1.6490115455934955e+01\n1.1322738998781885e+01\n-4.0437089581977098e+01\n1.3267341038214525e+01\n7.7626072454542712e+00\n-2.6568259836166693e+01\n1.3394603403167432e+01\n7.3978864828695077e+00\n-2.5179603359779328e+01\n-1.6698595360741056e+01\n1.1357570717860128e+01\n-4.0454313718737680e+01\n1.2828371046191061e+01\n8.0443773269637049e+00\n-2.7356023122392937e+01\n1.2280278738502501e+01\n7.8142926334943894e+00\n-2.6791359009540919e+01\n6.9383221710139447e+00\n1.4089721451996695e+01\n-5.1434418255471762e+01\n-1.5712351736002072e+01\n1.1237661714493893e+01\n-4.0176033564314061e+01\n-5.3678735622153901e+00\n1.3288307776021728e+01\n-4.8493924178604679e+01\n9.0755256199847061e+00\n1.4734133184785952e+01\n-5.2986696794352760e+01\n1.2526223847924896e+01\n7.7756822438669309e+00\n-2.7211137483147368e+01\n1.4711100339246332e+01\n7.3174793201764174e+00\n-2.4484083357587785e+01\n8.5114815242411854e+00\n1.5799863876833541e+01\n-5.7850042169112292e+01\n-5.9743644255157955e+00\n1.2783009687051720e+01\n-4.7512308061275093e+01\n-3.7180980195618432e+01\n1.5699893318872757e+01\n-5.6213181227272656e+01\n1.2373714622806872e+01\n7.7815219361585939e+00\n-2.7408967782180738e+01\n1.4574821782125319e+01\n9.3702475516049830e+00\n-3.3516951778511604e+01\n1.5574414722332714e+01\n9.1417603856292526e+00\n-3.2556557137254643e+01\n1.2676700514206459e+01\n7.6464535397726472e+00\n-2.6906917422748641e+01\n-1.7010330901961090e+01\n1.0915189159096478e+01\n-3.9421156903422343e+01\n1.2789318702263921e+01\n1.0705339100978362e+01\n-3.9362735901250936e+01\n1.2589879998625186e+01\n7.8000092374452867e+00\n-2.7532617527683858e+01\n1.7012029816319988e+01\n8.8472073510107467e+00\n-3.1438270033384953e+01\n-5.9615938320339028e+00\n1.3138170993490858e+01\n-4.9036496165291162e+01\n1.2620728356780837e+01\n7.6304532627546813e+00\n-2.6795397821459304e+01\n-1.4636332725816397e+01\n1.1201708311682360e+01\n-4.1297142326151025e+01\n-1.0762329243521858e+01\n1.1646082653818780e+01\n-4.3483674534348047e+01\n1.2464864555119364e+01\n7.5841990414298293e+00\n-2.6888516918108586e+01\n1.3449873572795484e+01\n7.1875657008449103e+00\n-2.5299987110427953e+01\n-1.1621873516782109e+01\n1.0806285477496932e+01\n-4.0495209030301631e+01\n-1.6042734297172505e+01\n1.0931372331681819e+01\n-4.0314835243022038e+01\n-1.3807868447937022e+01\n9.4826181233766977e+00\n-3.5715562438386328e+01\n-1.2850935176612813e+01\n1.1542703352784820e+01\n-4.3250537720521287e+01\n-9.9630959257321319e+00\n1.1724852165983387e+01\n-4.4580004899529101e+01\n-9.7071010919303955e+00\n1.1381848019860552e+01\n-4.3235593617898722e+01\n-9.9630959257321319e+00\n1.1724852165983387e+01\n-4.4580004899529101e+01\n-1.1705222837757708e+01\n1.0765571094582180e+01\n-4.0858279828021885e+01\n-1.5651801854271680e+01\n1.1036779235285140e+01\n-4.1569803352635347e+01\n-1.2060683529079038e+01\n1.1605803289752568e+01\n-4.3781561224131977e+01\n1.3382994658360049e+01\n6.9887170778939458e+00\n-2.4982747004800359e+01\n1.7283152688797401e+01\n8.0891546945811896e+00\n-2.9252357552132235e+01\n-1.3929658967914163e+01\n1.0732940761458289e+01\n-4.0998081000054995e+01\n-1.4026174797890915e+01\n1.0705047605746628e+01\n-4.1039953761950116e+01\n7.4153970667049327e+00\n1.3131845149783477e+01\n-5.0319484113224888e+01\n1.2783225585780418e+01\n7.3889889915426208e+00\n-2.6920573517097381e+01\n-1.0525627040960572e+01\n1.1696337673073067e+01\n-4.4663696314703280e+01\n1.2440553811889265e+01\n7.5556768420985652e+00\n-2.7294034925178000e+01\n1.2388176919596775e+01\n7.4856044315052408e+00\n-2.7145265347182075e+01\n-1.4144357895645893e+01\n1.0679602420221501e+01\n-4.1100105220307547e+01\n1.4863633801211773e+01\n1.0627323966769739e+01\n-4.0482575624943827e+01\n-1.6241819174138268e+01\n1.0789242377787474e+01\n-4.1385222459124563e+01\n-1.7188427869540117e+01\n1.0492888448302500e+01\n-3.9504029680047402e+01\n-1.6330056149088389e+01\n1.0910418053702179e+01\n-4.1918749200783566e+01\n1.3674907087414990e+01\n6.6084000718695926e+00\n-2.4112468821056815e+01\n1.4462028482497066e+01\n6.3800983409275931e+00\n-2.2818196477088019e+01\n-1.5488681111899927e+01\n1.0672129713976387e+01\n-4.1196660965832741e+01\n-1.3506849488540004e+01\n1.0134831978041452e+01\n-3.9518295060987285e+01\n9.4328789147510073e-01\n1.2847044004784312e+01\n-5.0365821345837524e+01\n1.4139773906772996e+01\n9.0624539273137081e+00\n-3.4423292555739167e+01\n1.2561262710654669e+01\n7.2780877683348955e+00\n-2.7319935049901716e+01\n-1.5948009977750543e+01\n1.0793521261201745e+01\n-4.1981064431387871e+01\n-1.5941939246845340e+01\n1.0685425053476939e+01\n-4.1595650974038350e+01\n2.9199844503735801e+00\n1.2675383318790383e+01\n-5.0519523919426831e+01\n1.1815223021062145e+01\n7.6056877742356503e+00\n-2.8738034926787837e+01\n-6.9509290378217559e+00\n1.1946133528202543e+01\n-4.8114749596012096e+01\n-1.1113404441674035e+01\n1.0426670609034153e+01\n-4.1818789762307453e+01\n-7.4431998725580293e+00\n1.1704487639125308e+01\n-4.7589527125526935e+01\n-7.4722363127397662e+00\n1.1862608248046669e+01\n-4.7960274133117267e+01\n1.2378867945599385e+01\n1.2140048066161448e+01\n-4.8687124137747738e+01\n-1.2173981622041918e+01\n1.0003735296368163e+01\n-4.0318736904273216e+01\n1.2327815530396935e+01\n7.1691522513860226e+00\n-2.7141947800302514e+01\n1.2907510878043301e+01\n1.1984071309408298e+01\n-4.8299857604316202e+01\n-1.7406625203261996e+01\n1.0281522416075477e+01\n-4.0892187615700912e+01\n1.4662559374292556e+01\n1.0604703527011162e+01\n-4.2536203233701123e+01\n-7.5275651553091842e+00\n1.1781977330874538e+01\n-4.7968102678268252e+01\n1.2624589391958933e+01\n7.2791593348865025e+00\n-2.8216697542879370e+01\n-1.6761491085584453e+01\n1.0326743883566873e+01\n-4.1949820100194152e+01\n-7.8706349912107143e+00\n1.1633526130991472e+01\n-4.7828159769968238e+01\n1.2080819222290129e+01\n7.3064590677207866e+00\n-2.9018110279198748e+01\n1.2525997575925272e+01\n7.1270311760528848e+00\n-2.7930736196195198e+01\n1.2414539442599278e+01\n7.0601096074709604e+00\n-2.7860226376732072e+01\n1.5157912843028161e+01\n6.6667742662802629e+00\n-2.5739012810950261e+01\n-1.3434533598394124e+01\n9.6971817271286653e+00\n-4.0292337043237474e+01\n1.2498101209506853e+01\n7.2056156760292662e+00\n-2.8737704197789860e+01\n1.2746443548500370e+01\n6.6318030804500472e+00\n-2.5684056846737793e+01\n1.3169986683542156e+01\n6.8495411610077630e+00\n-2.7242327691596255e+01\n-1.5875991362730437e+01\n1.0046191080474509e+01\n-4.1592250269856152e+01\n1.3948172163442230e+01\n6.7510790977071862e+00\n-2.6323064899591337e+01\n-1.1754029586979209e+01\n1.1960733614071437e+01\n-5.1304728520165362e+01\n-9.6781024217325164e+00\n9.6649400198666076e+00\n-4.1221028576517149e+01\n1.4012677703927002e+01\n1.1777135041811638e+01\n-4.9755567090308709e+01\n-5.0296661672593146e+00\n1.1044131318648823e+01\n-4.7152928955059707e+01\n1.2191974654786931e+01\n7.3150229036266694e+00\n-2.9659504576445674e+01\n1.2741374013883993e+01\n6.6701864957838142e+00\n-2.6295421727928268e+01\n1.2808966243913533e+01\n6.7078276967719663e+00\n-2.6343572604382519e+01\n1.4152205458905314e+01\n6.1289827946159798e+00\n-2.4158411531919707e+01\n3.1200367170690613e+00\n1.1101570098948496e+01\n-4.7227731888139921e+01\n2.4025219736736521e+00\n1.1175426651186788e+01\n-4.7638806305237729e+01\n9.4097301916329601e-01\n1.1204583847061503e+01\n-4.7845037345641430e+01\n1.4691498222322583e+01\n9.9606507436088396e+00\n-4.1673357663936521e+01\n1.2671929475951098e+01\n6.4905629305717021e+00\n-2.6043053195385774e+01\n-1.4505877485725529e+01\n8.5874749012100295e+00\n-3.6701215947333843e+01\n2.0869931607331114e+00\n1.1025913313356522e+01\n-4.6880000783235090e+01\n1.5552846742204604e+01\n7.7568293948273626e+00\n-3.2058505462076226e+01\n1.3174659835651063e+01\n6.7345022421708807e+00\n-2.7440618750452106e+01\n-1.4921479069865594e+01\n8.4172570823433244e+00\n-3.6041117205997928e+01\n2.8351824778934489e+00\n1.0770987099515338e+01\n-4.6754391097718234e+01\n-1.9549538776336846e+01\n1.0483471700061818e+01\n-4.5768390072559839e+01\n-1.5978745636728398e+01\n9.6849697805840549e+00\n-4.1977730639686193e+01\n-1.4180842862537171e+01\n8.3152596363765117e+00\n-3.6608089312817128e+01\n1.6045630686956930e+01\n7.3946334278590662e+00\n-3.1468916951974698e+01\n-7.2669657159721952e+00\n1.0342119185303030e+01\n-4.6134014354122023e+01\n1.2853702382264188e+01\n6.3824715059403623e+00\n-2.7238001146140395e+01\n1.2853702382264188e+01\n6.3824715059403623e+00\n-2.7238001146140395e+01\n1.1180422168188743e+01\n1.0319454526612144e+01\n-4.6236026132142115e+01\n1.3297264436669577e+01\n6.2919539375008879e+00\n-2.6589733433243893e+01\n-1.2993148654316713e+01\n1.0208723890691738e+01\n-4.5575027441898634e+01\n-1.6918043850397734e+01\n9.4043928284567766e+00\n-4.2169249850624659e+01\n-1.4861374156254804e+01\n8.1234762656861257e+00\n-3.6520092226410185e+01\n1.1372634657246374e+01\n1.0230117137303187e+01\n-4.5978696571148802e+01\n1.2554214292930272e+01\n6.3036195158826578e+00\n-2.6758508521810523e+01\n-5.2828187058397647e-01\n1.0189413034479456e+01\n-4.6482286539079738e+01\n-6.6740683385437851e+00\n1.0210770670869776e+01\n-4.6082146433758581e+01\n1.2525157559945633e+01\n6.4846431296702809e+00\n-2.8155533092158084e+01\n9.8796979774380915e+00\n1.0061298418400105e+01\n-4.5943826220697254e+01\n-1.6012301203336129e+01\n9.3529587487863459e+00\n-4.3222670601782724e+01\n1.2408911782174542e+01\n6.2753602207840258e+00\n-2.7551520425048142e+01\n1.3758883072164757e+01\n6.3737076001184869e+00\n-2.7811962324547387e+01\n6.5264468778729405e+00\n9.7707035077859672e+00\n-4.5741102295464962e+01\n1.2367738722633055e+01\n6.3767315008260352e+00\n-2.8153499466880394e+01\n1.2767898868151311e+01\n6.0899183784341187e+00\n-2.7150229234329991e+01\n-2.0567291468149045e+00\n9.8861182142862756e+00\n-4.6332714004676113e+01\n1.3567929089851710e+01\n5.9613080122911741e+00\n-2.6340212264545713e+01\n-2.5129658290435142e+01\n1.0244298462957563e+01\n-4.7159358405208344e+01\n-1.2807103898827270e+01\n9.7478049332953134e+00\n-4.6077762136554782e+01\n-6.6719178637840688e+00\n9.3325325871270852e+00\n-4.4506073176157642e+01\n1.0286149260647106e+01\n9.5427143328313999e+00\n-4.5142860534909609e+01\n1.2092018110329860e+01\n6.4287391525523754e+00\n-2.8730967264837076e+01\n1.2607898751320658e+01\n6.1971288619768510e+00\n-2.8194625328578567e+01\n1.2658699070624770e+01\n6.0839975975391081e+00\n-2.7597941532278181e+01\n-1.2585300833124748e+01\n9.4992604639044700e+00\n-4.4912657377086440e+01\n-1.1895457438177719e+00\n9.5228544183076771e+00\n-4.5421890802933881e+01\n1.5538478153756076e+01\n5.4643723866641585e+00\n-2.3445986683049551e+01\n1.2653605864645483e+01\n6.3193150480340075e+00\n-2.9018080269501660e+01\n1.2669801693112811e+01\n6.2763740684838698e+00\n-2.8943108465116246e+01\n-7.0791498956085048e+00\n9.1962609530634083e+00\n-4.4743741501993952e+01\n-6.8135823237737645e+00\n9.4842597357423077e+00\n-4.5752943354209741e+01\n1.4394725042614562e+01\n4.9537582169879615e+00\n-2.2327625164538485e+01\n1.4352521347281769e+01\n4.9391013250399878e+00\n-2.2366344579494427e+01\n-1.7318181007237904e+01\n8.6766702724578035e+00\n-4.1195846507491069e+01\n1.4220942209567729e+01\n5.6583896191921488e+00\n-2.4962979207059981e+01\n1.3946132882351664e+01\n5.4206384205160036e+00\n-2.4645050236089070e+01\n1.5000648404315077e+01\n5.3041284612276343e+00\n-2.3164921143328666e+01\n1.2688532974166998e+01\n6.1746374610334467e+00\n-2.8853135778230467e+01\n1.4810477832049800e+01\n4.8815395005632585e+00\n-2.2333379506822151e+01\n1.2452381247453392e+01\n6.1644985358945377e+00\n-2.9009718395741206e+01\n1.2905025169278819e+01\n5.8283651091443494e+00\n-2.7235188256499672e+01\n1.2513403710838253e+01\n5.9590692679327493e+00\n-2.7149995211528545e+01\n1.2107990350116154e+01\n6.3413534668280409e+00\n-3.0314667016541300e+01\n1.3006344975080022e+01\n5.7027781306515255e+00\n-2.7056374765014013e+01\n-1.5609953236373553e+00\n9.0014160954178468e+00\n-4.4969724496191816e+01\n1.2721632596526579e+01\n5.8610923231109062e+00\n-2.7406332768591085e+01\n1.3393992288271210e+00\n8.9016647135387856e+00\n-4.4708355496461998e+01\n1.5074420277332219e+01\n6.3825926772557979e+00\n-3.0813273769762528e+01\n1.5494505671446243e+01\n5.2338389961531275e+00\n-2.3669968026628442e+01\n-6.7825609676932097e-01\n8.8149798608705510e+00\n-4.4682249563025302e+01\n1.3151581532848446e+01\n5.7470834765126479e+00\n-2.7748602977507076e+01\n1.4799164918059338e+01\n4.8653991784170723e+00\n-2.2614849328888681e+01\n1.4657913550058369e+01\n4.7961621592558643e+00\n-2.1905929876012731e+01\n-2.4207876874773120e+01\n9.3381485233636958e+00\n-4.6050449206920142e+01\n-2.4207876874773120e+01\n9.3381485233636958e+00\n-4.6050449206920142e+01\n-1.6027012204025073e+01\n8.7672605451534285e+00\n-4.4545814646930260e+01\n-7.1388887428794554e+00\n8.4357059882675127e+00\n-4.3393875602896784e+01\n-2.1112703500592698e+00\n8.6797352400568144e+00\n-4.4697586898258074e+01\n1.3069049376130483e+01\n6.5087297702161884e+00\n-3.2676796268105704e+01\n1.3086701700659262e+01\n5.3961197233944445e+00\n-2.6493758068253577e+01\n1.3184659008557057e+01\n5.4449271998854165e+00\n-2.6821982484058818e+01\n1.2898575650306038e+01\n5.7939478118611971e+00\n-2.8717136417343749e+01\n1.3975203463638627e+01\n7.1548176945494530e+00\n-3.6459955987968996e+01\n1.3100806217664239e+01\n5.7656686235008729e+00\n-2.8371208433004210e+01\n-4.7832975117557081e-01\n8.6522564161932607e+00\n-4.4819536838369238e+01\n1.2914255265941852e+01\n5.4928277026145036e+00\n-2.7800382301146819e+01\n1.2851187613025774e+01\n5.6038541345814865e+00\n-2.7954963690937110e+01\n1.2834448551777630e+01\n5.5393494867404049e+00\n-2.7865022605160721e+01\n-2.3569521878854111e-01\n8.2228808371644160e+00\n-4.3839050106178767e+01\n-1.6100309091383970e+01\n8.3513302110598939e+00\n-4.3758169493518139e+01\n-3.8645679370917492e+00\n8.1922675114951495e+00\n-4.3935484222094942e+01\n-4.7909645919403826e-01\n8.2245615502796312e+00\n-4.3880514141628417e+01\n-5.0337117486133309e-01\n8.2021046720294226e+00\n-4.3536658517341323e+01\n1.3448776583592537e+01\n5.3830070532519798e+00\n-2.7567073863443863e+01\n1.7554309771892346e+01\n5.6851927861121032e+00\n-2.9080712282541249e+01\n1.4257824071218279e+01\n5.0938497768058504e+00\n-2.5593095316667423e+01\n1.2597510987694688e+01\n5.4384348940561331e+00\n-2.7872617885969582e+01\n1.4071892306754609e+01\n5.2685579361105699e+00\n-2.6596818789714586e+01\n1.2924981718887771e+01\n5.4146247188579224e+00\n-2.8182568808544026e+01\n-1.2483028124307993e+00\n7.9818810632012873e+00\n-4.2910151690042056e+01\n1.3818154158058713e+01\n4.9058364461941109e+00\n-2.5370492512803377e+01\n1.2791282650307826e+01\n5.3494647093943657e+00\n-2.8799514153071957e+01\n1.4597197406541758e+01\n6.0032177964367639e+00\n-3.2504259462431968e+01\n1.3697877366372129e+01\n4.8812029053527013e+00\n-2.5870020662505905e+01\n8.9467048383104841e-01\n7.5992191815465571e+00\n-4.2982636163128390e+01\n-7.7696273516891141e+00\n7.3875644416264921e+00\n-4.2300529000531171e+01\n6.5704282179816220e-01\n7.6155218640018765e+00\n-4.3069218631792083e+01\n1.3506392355953357e+01\n4.9338669588040132e+00\n-2.6641287635467421e+01\n-6.7441354903511419e+00\n7.3908057244110550e+00\n-4.1941879722355495e+01\n1.2621244000755127e+01\n5.2482470144999116e+00\n-2.9172522201997211e+01\n1.3691731809529555e+01\n4.9042019238447763e+00\n-2.6595327546255749e+01\n1.4048713268937965e+01\n5.0797885515636452e+00\n-2.7319808843995315e+01\n1.3595880286836840e+01\n5.1757832169937483e+00\n-2.8192751159114547e+01\n1.2438085645687709e+01\n5.1672691069392833e+00\n-2.7836376339049046e+01\n-5.2855170620817153e+00\n7.2027812117746981e+00\n-4.2021024308721060e+01\n1.3211327582340219e+01\n5.0976020229813681e+00\n-2.8379659751214334e+01\n-8.2223144681018989e-01\n7.3012994123661183e+00\n-4.2494652423461531e+01\n2.8686799344475949e-01\n7.2177157410892976e+00\n-4.2512381018244447e+01\n-1.4374262089540693e+01\n7.2700276401257939e+00\n-4.2625704350554280e+01\n-7.9060529229351928e-01\n7.1615170330150990e+00\n-4.2204726824416362e+01\n1.2295148663317470e+01\n5.2526006551305855e+00\n-3.0364947384864220e+01\n-9.8118457881126524e+00\n6.8075631721499033e+00\n-4.0729624533000703e+01\n-1.5771912767797895e+00\n7.2046439851341120e+00\n-4.2162469874053727e+01\n-1.4347698150312165e+00\n7.1388974424402347e+00\n-4.2308107353636714e+01\n1.2065859079257383e+01\n5.3790174283218741e+00\n-3.1337270973124213e+01\n1.3041384688074075e+01\n5.0326379861556854e+00\n-2.9204550957608852e+01\n1.2715138215921455e+01\n4.9358142422635227e+00\n-2.9250329256165482e+01\n1.3690346337265796e+01\n5.1086711473590416e+00\n-2.9989723001929342e+01\n-2.1145551037314858e+00\n6.8512378223403214e+00\n-4.2044162050243749e+01\n1.2899918363525511e+01\n4.7524479826347807e+00\n-2.8557848915500831e+01\n1.9054538458858406e+01\n5.0326776540948099e+00\n-2.9532409019221536e+01\n1.2934726833516930e+01\n4.6853626069540946e+00\n-2.8305164295546685e+01\n1.4077833454964935e+01\n4.3592482161474777e+00\n-2.6257945086156745e+01\n-3.3757880337061841e+00\n6.6567074295923945e+00\n-4.1451816648880310e+01\n-4.7438100892637589e+00\n6.6018205443022824e+00\n-4.1510429655031452e+01\n1.2964043936608146e+01\n4.6759330873313401e+00\n-2.8908064584585627e+01\n3.1756722519768354e+00\n3.7902555026568105e+00\n-2.3337935700196322e+01\n1.4748972561673018e+01\n3.9317788117307706e+00\n-2.3417434811055589e+01\n-8.0018758728167789e+00\n6.2213207269940849e+00\n-4.0464711801636867e+01\n1.4002541422640505e+01\n4.2751916423676262e+00\n-2.6343822301978896e+01\n1.2549790173912554e+00\n3.8104639978123425e+00\n-2.3584243346847302e+01\n1.6487623563765943e+01\n4.7257861248971560e+00\n-2.9694662759922004e+01\n1.3029694875795736e+01\n4.3568858936104915e+00\n-2.8134825093278934e+01\n1.3911256952766795e+01\n4.1055926094940336e+00\n-2.6142294550999939e+01\n-4.5046700772433921e+00\n6.0446837544512890e+00\n-4.1031775115260650e+01\n1.4087463281784984e+01\n4.1678696871276451e+00\n-2.6653421506685071e+01\n-2.5691030139726930e+01\n6.2802430187278393e+00\n-4.1099723570505880e+01\n1.3211680186398189e+01\n4.3215018312871276e+00\n-2.8430867335592545e+01\n1.4283626248603303e+01\n4.0244633864855253e+00\n-2.5853375033179603e+01\n1.3673613240039623e+01\n4.0276455036852807e+00\n-2.6479500402421554e+01\n1.3092213554517389e+01\n4.3709380451867412e+00\n-2.9117481615205577e+01\n1.3162914111078072e+01\n4.4146211162175604e+00\n-2.9258830080538115e+01\n1.4380756081011620e+01\n4.1266762407302862e+00\n-2.6510329675994790e+01\n-2.5333905507406207e+01\n6.0809181333920206e+00\n-4.0468856536605287e+01\n1.8576657277063187e+01\n4.4960232521740124e+00\n-2.9562489712803824e+01\n1.3949225361683411e+01\n3.9046875627957305e+00\n-2.5918552422225847e+01\n1.2551528090490681e+01\n4.4156459729621700e+00\n-3.0540413087521319e+01\n-1.3506597158875005e+01\n5.2405868391933543e+00\n-3.7114095642639079e+01\n1.2725347112086713e+01\n4.3996850019500755e+00\n-3.0098485798312304e+01\n1.4094877706554932e+01\n4.3534013443723341e+00\n-2.9350338363370586e+01\n1.9048432082772209e+01\n4.4000653061613813e+00\n-2.9480240406106688e+01\n1.3337408115250490e+01\n4.0486686605574054e+00\n-2.7816082384956925e+01\n1.6069494475023859e+01\n4.5231375134910845e+00\n-3.0873523347279075e+01\n1.3364061187949355e+01\n3.9876865934177368e+00\n-2.7421354990973533e+01\n1.4350843499273910e+01\n4.3060843936404813e+00\n-3.0327902312896725e+01\n1.3984423284571712e+01\n3.6949251293786451e+00\n-2.5534548118253607e+01\n1.3901234907742630e+01\n4.0581589998283834e+00\n-2.8433827938056744e+01\n1.3478233012624608e+01\n3.9580489359293618e+00\n-2.7793331752094616e+01\n1.3470148860825153e+01\n3.9336908571581883e+00\n-2.7748600681971215e+01\n1.4150529769561194e+01\n3.8063788055032783e+00\n-2.6568402368258052e+01\n1.3986848759332471e+01\n3.6497020751207270e+00\n-2.5570349177051455e+01\n1.8746685709695566e+01\n4.2212894740419431e+00\n-2.9438327961104349e+01\n1.5654735099082760e+01\n3.4905712930219051e+00\n-2.3520782329587259e+01\n1.3002403202587567e+01\n4.0556567733725624e+00\n-2.9376100203128455e+01\n1.4028232330326670e+01\n3.5739884131099191e+00\n-2.5078711957523609e+01\n1.3324070502950876e+01\n3.8106868002050240e+00\n-2.7342712525107277e+01\n1.3742652480074025e+01\n3.9085425129993809e+00\n-2.7871413208411735e+01\n1.3937374837422730e+01\n3.8095565834167520e+00\n-2.7230004311017620e+01\n1.5426819874691239e+01\n4.3745727701564379e+00\n-3.1722524622341432e+01\n1.4187346925839570e+01\n3.7194556539971240e+00\n-2.6513062738440048e+01\n1.4145885657227415e+01\n3.6025781250886157e+00\n-2.5585475781417962e+01\n1.5769069384179490e+01\n3.5759835505583677e+00\n-2.3862376382127710e+01\n-3.4293715351570691e+00\n5.0270056839185102e+00\n-3.8818494032727784e+01\n-3.4826666408882740e+00\n5.2000524661830925e+00\n-3.9757848270911786e+01\n1.3754555062447984e+01\n3.7697389126855434e+00\n-2.7611391819724592e+01\n3.3857961023805987e+00\n3.1465956362027447e+00\n-2.2827283705356550e+01\n1.4143844270550632e+01\n3.4856136047535839e+00\n-2.5278548281958841e+01\n2.0734868051567714e+00\n3.3419966585174881e+00\n-2.3264072831967582e+01\n1.4098118003277477e+01\n3.6169542059474287e+00\n-2.6323357306057407e+01\n1.3155359149710520e+01\n4.0742798381458352e+00\n-3.0139094439725771e+01\n1.3505164290627176e+01\n3.9309641437375249e+00\n-2.8613502350366854e+01\n1.4716972932989147e+01\n3.1634252288733502e+00\n-2.2847667438217684e+01\n1.9020881297713821e+00\n3.1088175298228822e+00\n-2.2319803806943476e+01\n1.4984822591194243e+01\n3.4106970501736358e+00\n-2.3990742679024702e+01\n1.4717321919200630e+01\n3.3432654760689280e+00\n-2.3871174018878758e+01\n1.2938161584288702e+01\n4.3337209594980877e+00\n-3.3062068688320110e+01\n-1.2346808846101371e+01\n4.5517084419656442e+00\n-3.6067671310908182e+01\n1.4634883471509657e+01\n3.1041424143680598e+00\n-2.2886365890139857e+01\n-1.3370533544411300e+01\n5.0188990179892139e+00\n-3.8874508666099942e+01\n1.3734182721721561e+01\n3.5930984644180839e+00\n-2.7402887080835441e+01\n1.5339515430157050e+01\n3.1084011906170863e+00\n-2.2985022844043794e+01\n-1.2053211219117694e+00\n3.2020886037411671e+00\n-2.3833226484869453e+01\n-6.1698731276749286e-01\n2.9996820622091360e+00\n-2.2735276421560261e+01\n1.4411099016502169e+01\n3.6088534851450476e+00\n-2.7325151697710552e+01\n1.3549585601893321e+01\n4.2687365292496056e+00\n-3.3849169363491001e+01\n1.4576205510798843e+01\n3.2267657328060269e+00\n-2.4210531674192957e+01\n1.4122445868330777e+01\n3.4939508225136438e+00\n-2.6702611528673042e+01\n1.4100453787715205e+01\n3.4605144895011919e+00\n-2.6683847346545846e+01\n1.4012303625633889e+01\n3.4350015215680210e+00\n-2.6554586196153515e+01\n-1.3232249055397108e-01\n3.0255390652896366e+00\n-2.2680504380178032e+01\n1.4971606644562065e+01\n3.2768145745360640e+00\n-2.4881574417644011e+01\n1.2551794363123630e+01\n3.9131965503733941e+00\n-3.1547921410446559e+01\n1.4175540088883084e+01\n3.3652279348384142e+00\n-2.6333063278734624e+01\n-1.2297168319859551e+01\n4.2350970844721436e+00\n-3.5397618582887254e+01\n1.4335643675342359e+01\n3.1848957111294256e+00\n-2.4947506629374150e+01\n1.6035196547570280e+01\n3.7366198498253338e+00\n-2.9867842562389704e+01\n1.4412089592872494e+01\n3.3392759941425769e+00\n-2.6182251299800853e+01\n1.6402450509275141e+01\n3.7175827992658466e+00\n-2.9639936990068552e+01\n1.4596793913289343e+01\n3.1797906806503726e+00\n-2.4865373132612604e+01\n-5.3183034732697854e-01\n2.8773055085460757e+00\n-2.2528693310142920e+01\n1.6366421677455413e+01\n3.8145090968259581e+00\n-3.0788463884855847e+01\n1.6366421677455413e+01\n3.8145090968259581e+00\n-3.0788463884855847e+01\n1.4494175050125268e+01\n3.1661594651391471e+00\n-2.4961428679272519e+01\n1.5862899277754977e+01\n3.2194179338079767e+00\n-2.4062567797345213e+01\n1.5862899277754977e+01\n3.2194179338079767e+00\n-2.4062567797345213e+01\n-1.1939724397933594e+01\n4.2239628704429721e+00\n-3.5883290316693852e+01\n-1.3889897424227868e+00\n3.0069268876141311e+00\n-2.3832950574813275e+01\n-1.3700111467439497e+00\n2.9585268176800956e+00\n-2.3771528923751294e+01\n1.4011501591992454e+01\n3.3603987245213447e+00\n-2.6949502618610250e+01\n1.8620172892481133e+01\n3.7063642153355159e+00\n-2.9503129382631016e+01\n1.4284713309081226e+01\n3.2016075439032035e+00\n-2.5587349839059033e+01\n1.4186393236670266e+01\n3.3262131610397550e+00\n-2.6807220632280725e+01\n-1.3001224006605153e+01\n4.0105585795277738e+00\n-3.4500031475958870e+01\n1.5270088923226062e+01\n3.2429527407434744e+00\n-2.5017553116641416e+01\n-6.7194279371539016e+00\n4.5170812494959476e+00\n-3.8910875177148043e+01\n-3.3425877239435420e-01\n2.7352270678247850e+00\n-2.2224918243518545e+01\n-3.3425877239435420e-01\n2.7352270678247850e+00\n-2.2224918243518545e+01\n1.7342929739804383e+01\n3.4819862146258092e+00\n-2.8819160048422450e+01\n1.4812827771100299e+01\n2.7684201659502872e+00\n-2.2845233110278997e+01\n1.3288054945888211e+01\n3.4356693901244570e+00\n-2.8778521189437981e+01\n1.4519435242114035e+01\n3.0368244821858394e+00\n-2.4989819896619810e+01\n1.4298833866941647e+01\n3.2430745618455452e+00\n-2.7318838077320375e+01\n1.2839493641812654e+01\n3.4718445837171688e+00\n-3.0519969934734998e+01\n1.3657581162738646e+01\n3.2811410555382774e+00\n-2.8175348700154974e+01\n1.8393906453809553e+01\n3.5026869448198132e+00\n-2.9464967552033276e+01\n1.5136562111331346e+01\n2.8325904489725708e+00\n-2.3822681978793288e+01\n1.4805815246870083e+01\n2.8401469486815536e+00\n-2.3694097068576742e+01\n1.3510687529274721e+01\n3.2232824210742432e+00\n-2.8057215559238728e+01\n1.3510687529274721e+01\n3.2232824210742432e+00\n-2.8057215559238728e+01\n1.3509305855251375e+01\n3.2471080773244245e+00\n-2.7853155388808851e+01\n1.4031002647213180e+01\n2.9379579190906733e+00\n-2.5421971590548843e+01\n1.3477243235594507e+01\n3.2688920496926559e+00\n-2.8370040191980948e+01\n3.6590951812135257e+00\n2.5515802243774388e+00\n-2.1908594273251243e+01\n1.3963980285653363e+01\n3.0824496414389135e+00\n-2.7173944064974968e+01\n1.5263668857866497e+01\n2.9221260867715704e+00\n-2.4681981443774550e+01\n1.4509648584357818e+01\n2.8418871269452195e+00\n-2.4755410430609903e+01\n-2.0160775792026353e+00\n2.9567616210225722e+00\n-2.6111878425891103e+01\n1.4350777717363911e+01\n3.0784117427749633e+00\n-2.7020002587172439e+01\n1.5503870550095893e+01\n2.6878918837897081e+00\n-2.3224762499187360e+01\n1.4064856273968028e+01\n2.8598980293537557e+00\n-2.6013422128989838e+01\n1.3558063227650779e+01\n3.1172140530671104e+00\n-2.8391796050670241e+01\n1.4690565754329199e+01\n2.7889335934468744e+00\n-2.4803228174303211e+01\n1.4246921529084775e+01\n2.8344599484766220e+00\n-2.5609086845437773e+01\n1.4528105888713220e+01\n2.7988100379022067e+00\n-2.4839941037999072e+01\n1.4528105888713220e+01\n2.7988100379022067e+00\n-2.4839941037999072e+01\n1.5082914026955427e+01\n2.6587082745779571e+00\n-2.3414872906591249e+01\n-7.6222291501374553e+00\n3.9890890944924164e+00\n-3.7511709251125609e+01\n1.4006860883752488e+01\n2.8451583733745780e+00\n-2.6147102146260778e+01\n1.8158279271593234e+01\n3.2322342057253461e+00\n-2.9548389577410784e+01\n-2.8131902766675760e+00\n2.9610062854043950e+00\n-2.7268721655083986e+01\n-2.8138555014256403e+00\n2.9577307430157322e+00\n-2.7244029225598659e+01\n1.3596110005630589e+01\n3.0260902045770712e+00\n-2.7860794978630025e+01\n1.5601356373792763e+01\n2.8939976323371424e+00\n-2.6623604072213020e+01\n1.5601356373792763e+01\n2.8939976323371424e+00\n-2.6623604072213020e+01\n1.3527488503470185e+01\n2.9356342157920534e+00\n-2.8114596551406045e+01\n1.3682989861793224e+01\n3.0324827491499837e+00\n-2.8731046733349736e+01\n1.4714932348891622e+01\n2.9473934143345684e+00\n-2.6580769763029899e+01\n1.4858644045657545e+01\n2.6458687140252386e+00\n-2.4008179937378863e+01\n1.4873944849597807e+01\n2.7844940701554499e+00\n-2.5631603688531516e+01\n1.4169305164681170e+01\n2.7405113174409115e+00\n-2.6013260118309692e+01\n-8.3435734860885571e+00\n3.7374693881302430e+00\n-3.7440001994674674e+01\n1.3851430334188275e-01\n2.2981064378501674e+00\n-2.1554700066807872e+01\n1.3851430334188275e-01\n2.2981064378501674e+00\n-2.1554700066807872e+01\n1.3368581106291431e+01\n2.9299335175396783e+00\n-2.8600305335650372e+01\n-2.8693630717588476e+00\n2.7751111618979443e+00\n-2.7008217172944743e+01\n1.4943946674232890e+01\n2.4792650636570879e+00\n-2.3418904521580746e+01\n1.3787355167596605e+01\n2.8477669901390250e+00\n-2.8644047390432785e+01\n1.9425578310465603e+01\n2.9725946985162528e+00\n-2.8941910728666716e+01\n-1.6127178234679740e+00\n2.4632753502377853e+00\n-2.3506713824625908e+01\n1.4341163852110892e+01\n2.5952396102542088e+00\n-2.5657845030386493e+01\n1.6325770012350219e+01\n2.9207094539308742e+00\n-2.9638159095021770e+01\n1.4391032308116660e+01\n2.4692313094960938e+00\n-2.5020344882042291e+01\n1.8684211842361012e+01\n2.9104473348382047e+00\n-2.9222641401151659e+01\n1.2132708899853075e+01\n3.4349467286458126e+00\n-3.7198295123895313e+01\n1.4216713092581990e+01\n2.4544357096475307e+00\n-2.5537894700914112e+01\n1.3486505485220530e+01\n2.7289706415407364e+00\n-2.8375677253225774e+01\n1.5554237739471780e+01\n2.6218187868494485e+00\n-2.6874324918450611e+01\n1.4956811590737615e+01\n2.4183772703709252e+00\n-2.4968344236468859e+01\n1.5807443836060111e+01\n2.5143501265605122e+00\n-2.4283325709040007e+01\n1.3252981565651066e+01\n3.1162758607226260e+00\n-3.3181686435418115e+01\n1.4696979139280957e+01\n2.8117597478301022e+00\n-3.0283687177809686e+01\n1.3669078244962922e+01\n2.6005376424890421e+00\n-2.8199885238108504e+01\n-3.5438307108307754e-01\n2.2135412284090386e+00\n-2.1817944274277977e+01\n-3.1141628978974373e-01\n2.1169701057813519e+00\n-2.1687298466841288e+01\n-1.0402412876848366e+00\n2.2139636659425128e+00\n-2.2413491959044318e+01\n1.3270027357092829e+01\n2.6816812776069034e+00\n-2.9912143160770633e+01\n1.4657507458180739e+01\n2.4896914716170175e+00\n-2.6351812628055736e+01\n1.4685679614904110e+01\n2.5040248053961891e+00\n-2.6426043680538122e+01\n1.6485675748504789e+01\n2.7058816730910520e+00\n-2.9687576092289554e+01\n5.0301483133206726e-01\n2.0356175447982920e+00\n-2.1321283126109378e+01\n1.3908292815827421e+01\n2.4781588702253856e+00\n-2.7692177375580673e+01\n1.3605909905477031e+01\n3.0071596591291296e+00\n-3.4218507405048811e+01\n-1.2176070466617151e+01\n2.8697066256812609e+00\n-3.3397927025595422e+01\n1.8675478516911664e-01\n2.1244213730898815e+00\n-2.1553836574841188e+01\n1.4608762102584105e+01\n2.8869899809651067e+00\n-3.2571778725384164e+01\n1.4604349802187434e+01\n2.2984276942261430e+00\n-2.5655152140231703e+01\n3.1401200753833964e+00\n1.9579295263738317e+00\n-2.1148134325753592e+01\n1.3885510831865661e+01\n2.4286462504154254e+00\n-2.7648785206193427e+01\n1.5425869250552740e+01\n2.3163256505168088e+00\n-2.4778278061061869e+01\n-2.9289975539200084e+00\n2.3040306228184466e+00\n-2.6228027630500975e+01\n4.3067734285509573e-01\n1.9626538926353692e+00\n-2.1077748470047975e+01\n4.9333370679455940e-01\n2.0138645796188324e+00\n-2.1207881282322784e+01\n1.4192432684718820e+01\n2.2486833205479657e+00\n-2.6536563265077888e+01\n1.6565840780393078e+01\n2.5556341240422302e+00\n-2.9505886122406153e+01\n1.4694460584359613e+01\n2.3286768691190236e+00\n-2.6307249674295623e+01\n3.9548361636598578e-01\n1.9771837516628690e+00\n-2.1094121461331810e+01\n1.4353373718612600e+01\n2.2232691950133043e+00\n-2.5847360101817110e+01\n1.4353373718612600e+01\n2.2232691950133043e+00\n-2.5847360101817110e+01\n1.5415464583519407e+01\n2.3405081227219262e+00\n-2.7103774057544701e+01\n1.5081402543687927e+00\n1.8433377470453145e+00\n-2.0829304047917816e+01\n-1.3871155220822815e+00\n1.9674826871362208e+00\n-2.2600445241184158e+01\n2.0673676382884856e-01\n2.0067888792918001e+00\n-2.1826891727777941e+01\n1.4906152503626279e+01\n2.1111647519705623e+00\n-2.4364864033193488e+01\n-2.3133875489961420e+00\n2.1933233569965611e+00\n-2.5299279180897688e+01\n1.3606602126771598e+01\n2.4380289302513041e+00\n-2.9549676403389068e+01\n1.7640709105581156e+01\n2.4806719540799107e+00\n-2.9751381146168612e+01\n1.2267786657089369e-01\n1.8259338490718746e+00\n-2.1182292691871506e+01\n1.4436808273549993e+01\n2.0919427776185247e+00\n-2.5419784553697522e+01\n1.4374825822365937e+01\n2.0801074979780827e+00\n-2.5350450142229551e+01\n1.2643960026059217e+01\n2.5974385204716675e+00\n-3.3256504395797421e+01\n1.4974394786212425e+01\n2.1345903955285666e+00\n-2.5833995702111888e+01\n3.0170055783887757e+00\n1.7583635512641353e+00\n-2.1055770923624333e+01\n-1.0360802429960923e+01\n2.6137444362391755e+00\n-3.4407442409685871e+01\n-1.0360802429960923e+01\n2.6137444362391755e+00\n-3.4407442409685871e+01\n1.5233991310320867e+01\n1.9740143891791930e+00\n-2.3976620412843033e+01\n-6.9077678756157690e+00\n2.7398924408697867e+00\n-3.5944035970404705e+01\n1.3294918545371264e+01\n2.2685221977648178e+00\n-3.0302755656842379e+01\n1.4209458286925443e+01\n2.1153819810322876e+00\n-2.7093367123328999e+01\n1.4773588398844918e+01\n2.0402858162106532e+00\n-2.5616981275713467e+01\n1.4554497107714932e+01\n1.9852886355085348e+00\n-2.5374361707923004e+01\n1.5524408315249516e+01\n2.1160232920396855e+00\n-2.5319109199483240e+01\n1.3100762466681475e+01\n2.6315130787749008e+00\n-3.4913090302128481e+01\n1.6474871074343882e+00\n1.6639268065538357e+00\n-2.0615289879510296e+01\n1.5134680242330441e+01\n3.0575026519644819e+00\n-4.0338472827380578e+01\n1.4518872840714046e+01\n2.1834380560643663e+00\n-2.8622902296053045e+01\n-7.8389036636494360e+00\n2.5414339685073992e+00\n-3.5187533601095808e+01\n1.4115406256177463e+01\n2.0704620259899760e+00\n-2.7705939993076463e+01\n-7.0690602187010585e+00\n2.5603976258999563e+00\n-3.5357382602893544e+01\n-7.0690602187010585e+00\n2.5603976258999563e+00\n-3.5357382602893544e+01\n1.6012645754821769e+01\n2.0093286270199364e+00\n-2.4068938884172656e+01\n1.4236179516230862e+01\n1.9768835656402017e+00\n-2.7103585082398766e+01\n1.6095150632127343e+01\n1.9957607594285995e+00\n-2.3993201836090353e+01\n1.4625487836707733e+00\n1.5980470788152989e+00\n-2.0627762691418713e+01\n1.4035411276540406e+01\n2.0254797489209762e+00\n-2.8138157638906549e+01\n2.8634276565321448e+00\n1.5930998878841109e+00\n-2.0820002576691365e+01\n1.4134318771961389e+01\n1.9307543964008891e+00\n-2.7051607521844794e+01\n1.5907741657093606e+01\n1.9563950829361314e+00\n-2.4354224810865475e+01\n-1.2716750352058682e+01\n2.4170847243059619e+00\n-3.5368791528576921e+01\n1.0987097875496410e+00\n1.5525517461427079e+00\n-2.0664770103737478e+01\n1.3920079170448282e+01\n1.8472600993993462e+00\n-2.7547328246614402e+01\n1.3564130890558403e+01\n2.4343757835520474e+00\n-3.5051833296904903e+01\n1.3676985984843931e+01\n2.2688842884375076e+00\n-3.3950640694114803e+01\n1.7173863983213771e+01\n2.0078099475501689e+00\n-2.9111999588991697e+01\n1.4604816838352821e+01\n1.7033247226539561e+00\n-2.4910395688567068e+01\n1.4302110396233413e+01\n1.8676317074624305e+00\n-2.7506489310522142e+01\n1.5833922213637829e+01\n2.0626499170669219e+00\n-3.0372028102809882e+01\n1.4803634214799160e+01\n2.7656888332244587e+00\n-4.1211653880028756e+01\n-3.3148918918795558e+00\n1.7616281386530765e+00\n-2.5545253265665629e+01\n1.7258320420688847e+01\n1.9517409063464732e+00\n-2.9114774638162313e+01\n1.4006919196381380e+01\n1.8401914049895323e+00\n-2.8325215448898348e+01\n1.4194499973131631e+01\n1.9099460920087272e+00\n-2.8631174668127041e+01\n1.3854472924458550e+01\n1.9172520854448241e+00\n-2.8425476875913954e+01\n1.4551037237574368e+01\n1.8034823587813864e+00\n-2.7001874138314108e+01\n7.5913217212129680e-01\n1.4407998212913178e+00\n-2.0724426443710307e+01\n1.4287527022850277e+01\n1.7988788739768675e+00\n-2.7962239053424369e+01\n1.4194288665882588e+01\n1.7409724823158943e+00\n-2.7249081162578275e+01\n1.4998387419154554e+01\n1.8887217066363495e+00\n-2.8567611591121707e+01\n1.4163726673264890e+01\n1.7071542261095911e+00\n-2.7117244481769124e+01\n-6.8440783731239474e+00\n2.2108043768339054e+00\n-3.5730484077650935e+01\n1.4585234139595773e+01\n1.5512545692781310e+00\n-2.4517752918625028e+01\n1.4498134976879518e+01\n1.7405901904294736e+00\n-2.7136132816824762e+01\n1.4884862170054769e+01\n1.5857462264742979e+00\n-2.4295307092751795e+01\n1.4884862170054769e+01\n1.5857462264742979e+00\n-2.4295307092751795e+01\n1.4882551493136841e+01\n1.5416596849798252e+00\n-2.4866181198509608e+01\n1.4473980287700000e+01\n1.6154976926340618e+00\n-2.6744638046954208e+01\n1.7980249553319741e+01\n1.7856763126547737e+00\n-2.9553441922314938e+01\n1.4767523730750273e+01\n1.7057023140429255e+00\n-2.7937871019717171e+01\n1.4637046810795923e+01\n1.6290012682492376e+00\n-2.7676069376343364e+01\n1.4290979542566465e+01\n1.6342467594222831e+00\n-2.8196478259044508e+01\n1.4082784967665855e+01\n1.5749175615409547e+00\n-2.7882655963491406e+01\n1.4685847937422126e+01\n1.5408569387304687e+00\n-2.6847032961924839e+01\n-1.5879547667972196e+00\n1.3880046892977356e+00\n-2.2601531686898145e+01\n4.8003538451815175e-01\n1.2948135019363212e+00\n-2.0737327048038125e+01\n1.4511853942997030e+01\n1.4871096376981832e+00\n-2.6648190630729925e+01\n1.4343579490154813e+01\n1.4630588391650938e+00\n-2.6357280090003631e+01\n1.7970322652134669e+01\n1.7234268780217072e+00\n-2.9550150556469806e+01\n1.5931611652308625e+01\n2.3525128195983380e+00\n-4.1910960252725019e+01\n-1.1887436186673707e+01\n1.7513798788675128e+00\n-3.2456860842003898e+01\n-1.2795580361805875e+01\n1.9126673234281502e+00\n-3.5295697786605317e+01\n8.2112097697448572e-01\n1.2394300633325230e+00\n-2.0586376721740017e+01\n8.1829493829720135e-01\n1.2570477889129406e+00\n-2.0612654590182018e+01\n1.5139747457806260e+01\n2.2920120677851199e+00\n-4.1244661791059436e+01\n1.4276863816421653e+01\n1.4888118527119290e+00\n-2.7006784731481623e+01\n1.4251339456688319e+01\n1.4712056422182949e+00\n-2.6950348938682914e+01\n-1.7762362009539714e+00\n1.3425143878133032e+00\n-2.2939891896281917e+01\n1.2908568337293485e+01\n1.7057845382530126e+00\n-3.2920211000089495e+01\n1.4009461234487841e+01\n1.5250425881571952e+00\n-2.8489268105973313e+01\n1.4473416474948911e+01\n1.4086414497185578e+00\n-2.6348185981068628e+01\n-1.1899624504569972e+00\n1.2567079021576926e+00\n-2.2001141621642844e+01\n1.3961391939888086e+01\n1.4630485581202086e+00\n-2.8648410102322497e+01\n1.2883653566433100e+00\n1.1769877144308858e+00\n-2.0476908986138358e+01\n1.3991319740554664e+01\n1.7499701015525662e+00\n-3.2728792903490216e+01\n1.1773938958838541e+00\n1.1684309171786100e+00\n-2.0481868682125572e+01\n1.8144403450751170e+01\n1.5745957137029245e+00\n-2.9487389294275921e+01\n1.8144403450751170e+01\n1.5745957137029245e+00\n-2.9487389294275921e+01\n1.2834668013536875e+01\n1.6339030160054426e+00\n-3.3517426947934268e+01\n1.4004021903913168e+01\n1.4408363817243168e+00\n-2.8845988218826310e+01\n1.4583418523661338e+01\n1.2973608406758441e+00\n-2.5558051021422134e+01\n1.5252020714581814e+01\n1.2402814160373543e+00\n-2.4767369753605777e+01\n1.4757426769324484e+01\n1.3517698059959715e+00\n-2.6427515936724191e+01\n1.5579455160243649e+01\n1.2693687093323602e+00\n-2.3506327117426508e+01\n1.4054095292224206e+01\n1.3674774849870033e+00\n-2.8068365482744323e+01\n-4.2743264647330792e-01\n1.1633104392409592e+00\n-2.1288546415989181e+01\n1.4551876539128971e+01\n1.4214873245454318e+00\n-2.7462453428615564e+01\n1.4323404142182470e+01\n1.3747520030930407e+00\n-2.7079528899526149e+01\n1.5081454944455141e+01\n1.4349706005863869e+00\n-2.7962907632333071e+01\n1.3920969859557648e+00\n1.1543301819410914e+00\n-2.0557798526024015e+01\n1.3893290511862098e+01\n1.3473617535040900e+00\n-2.8766590553301654e+01\n1.4732426679418527e+01\n1.3412041211677046e+00\n-2.6145150516544287e+01\n1.5168334758991119e+01\n1.4178801634100870e+00\n-2.6347096815929948e+01\n1.4684371084981915e+01\n1.2613569277720029e+00\n-2.5662580457125962e+01\n1.4481714988071028e+01\n1.3172062101605582e+00\n-2.6614177339826622e+01\n1.4032242367781027e+01\n1.4009829344790647e+00\n-2.8929986227243777e+01\n1.4021988160953052e+01\n1.2783710137576527e+00\n-2.7904386440550045e+01\n1.4479537990637724e+01\n1.1834240078427030e+00\n-2.5685382266063215e+01\n-1.9014285548346830e+00\n1.1646829676227117e+00\n-2.2961962428449027e+01\n1.3825149737589779e+01\n1.7755189374853493e+00\n-3.6886041016983491e+01\n-2.0427464248947808e-01\n1.0909983540096211e+00\n-2.1030491672693579e+01\n2.3232910225834340e+00\n1.1693466723060477e+00\n-2.1596145734262929e+01\n2.3232910225834340e+00\n1.1693466723060477e+00\n-2.1596145734262929e+01\n1.2862221533827180e+01\n1.4527841244743107e+00\n-3.3621402294338012e+01\n-9.6065352306382898e+00\n1.4707762494542005e+00\n-3.3246528253841667e+01\n-9.6065352306382898e+00\n1.4707762494542005e+00\n-3.3246528253841667e+01\n1.6817555765499293e+01\n1.3781659157200852e+00\n-3.0293846483799012e+01\n1.4546793707574908e+01\n1.1845776072719001e+00\n-2.6124028172273963e+01\n1.6592734472545118e+01\n1.3377026815885396e+00\n-2.9805448349393895e+01\n1.4378871232734175e+01\n1.1859821465912164e+00\n-2.7279415644409845e+01\n-8.4328358208575072e+00\n1.4430535058283303e+00\n-3.3565305388998837e+01\n-2.4266774014853625e+00\n1.1253057578633352e+00\n-2.3754390043912490e+01\n-1.3986866567467706e+00\n1.0842486234974729e+00\n-2.2199874341776134e+01\n1.5126365737250300e+01\n1.2876213906104750e+00\n-2.8603239599041792e+01\n1.5093296779377834e+01\n1.2765663060653030e+00\n-2.8655094455244718e+01\n1.5771176390106216e+01\n1.2719951159429945e+00\n-2.5029963037153475e+01\n7.6888861170260570e-01\n9.9043204289722320e-01\n-2.0512271811252166e+01\n1.4499351861226463e+01\n1.2856881910300948e+00\n-2.9264629816895997e+01\n1.0511790958941489e+00\n9.3776044960298743e-01\n-2.0451051594091947e+01\n1.4611878089903495e+01\n1.1661013724258249e+00\n-2.8040149189338798e+01\n1.4504156642026681e+01\n1.1526959926253051e+00\n-2.7486429387168339e+01\n1.5018483672979269e+01\n1.0228925920814651e+00\n-2.4506465471252163e+01\n1.3711169529231141e+01\n1.1650819023665202e+00\n-2.8839059018617270e+01\n-2.3121973335542036e+00\n1.0115574433666736e+00\n-2.3555374804149182e+01\n1.4624513406412065e+01\n1.0222698841475559e+00\n-2.6850936512586042e+01\n1.4961888801987186e+01\n1.0974201943988282e+00\n-2.6715255824742734e+01\n2.0245925732723888e+00\n8.9617739719420730e-01\n-2.0391616919065392e+01\n1.4874498314580539e+01\n1.0961543190276686e+00\n-2.6900836170679007e+01\n1.4244879555824323e+01\n9.5875040358410513e-01\n-2.7350234205105483e+01\n1.4244879555824323e+01\n9.5875040358410513e-01\n-2.7350234205105483e+01\n4.4103023151995829e-01\n8.6428594677683557e-01\n-2.0562817018223825e+01\n-1.3198829054725319e+01\n9.8680205595945447e-01\n-2.8422195460153361e+01\n-9.9260500146538377e-01\n8.9750463571095562e-01\n-2.1676146713308626e+01\n4.7405948166686471e+00\n8.8118563627262880e-01\n-2.1905321687358946e+01\n1.5373969894172282e+01\n8.8136243505674206e-01\n-2.3992537296536792e+01\n1.5192252597616845e+01\n9.2902582855463822e-01\n-2.3736113353203343e+01\n1.4254493293327206e+01\n9.7614617997932340e-01\n-2.8455937461783385e+01\n1.4231658811386763e+01\n1.0106220842460691e+00\n-2.8439981695356312e+01\n1.8565173933694727e+01\n1.1108036397278156e+00\n-2.9257798158582851e+01\n-8.1823856980951355e+00\n1.1803687770904849e+00\n-3.3414538392281592e+01\n-8.1823856980951355e+00\n1.1803687770904849e+00\n-3.3414538392281592e+01\n2.4688708477189540e+00\n8.3469572975324624e-01\n-2.0410048704309570e+01\n1.5457283051748544e+01\n1.0536948151922252e+00\n-2.8012971761000816e+01\n1.7642293134361346e+01\n1.0983968416217751e+00\n-2.9817362461380704e+01\n1.4980390996613641e+01\n1.0533241502297537e+00\n-2.7179481785296332e+01\n1.4973148385412030e+01\n9.9984202671489575e-01\n-2.6719718818959677e+01\n4.1428936386710619e-01\n8.1679572345208706e-01\n-2.0599407979601974e+01\n1.4168425246761787e+01\n9.6500436960764158e-01\n-2.9483463807098996e+01\n-8.1528844128091205e+00\n1.1202167753824706e+00\n-3.2937245128107755e+01\n-9.2322361229880805e+00\n1.0925623077415001e+00\n-3.2725740036397056e+01\n-9.2322361229880805e+00\n1.0925623077415001e+00\n-3.2725740036397056e+01\n-8.5256267487466868e+00\n1.1206581413423220e+00\n-3.3732536542138398e+01\n-8.0521179382703316e+00\n1.1040511210118000e+00\n-3.3098467512716596e+01\n1.3938702007785048e+01\n1.2511032961801662e+00\n-3.5540585589059518e+01\n1.4528668093613664e+01\n8.9610662565321053e-01\n-2.7392454814189403e+01\n1.4701313785539693e+01\n8.4943346761738847e-01\n-2.6113918928576503e+01\n1.4246134135894433e+00\n7.4426649151788016e-01\n-2.0356708190944413e+01\n3.2639723180114828e+00\n7.5369484617544191e-01\n-2.0695814328134514e+01\n7.2197109512511695e+00\n8.2145784967143920e-01\n-2.4991770774607232e+01\n7.2197109512511695e+00\n8.2145784967143920e-01\n-2.4991770774607232e+01\n1.5254527647109475e+01\n9.6725516227215902e-01\n-3.2051294939690173e+01\n1.3606893788652911e+01\n1.0787464365545079e+00\n-3.3728721539982274e+01\n1.5342664520696395e+01\n8.1255187272893681e-01\n-2.3983479819097717e+01\n1.5336407603061529e+01\n8.1789965631782791e-01\n-2.4035933373346612e+01\n1.5053084369511856e+01\n7.2117317372834033e-01\n-2.3585546204612108e+01\n1.4455401564735178e+01\n7.5059015089304393e-01\n-2.7265098497724420e+01\n1.4361269761988000e+01\n7.8198831558435822e-01\n-2.7815385022393556e+01\n1.4413678679005633e+01\n8.3184929489884818e-01\n-2.8391256481249197e+01\n1.4584258145647357e+01\n7.2716181343240682e-01\n-2.6862048394206447e+01\n1.4542789046783144e+01\n6.6509218355152255e-01\n-2.6767408559382751e+01\n1.4996449299078833e+01\n7.6950743507730812e-01\n-2.6815453318102382e+01\n-9.0847833887537437e+00\n8.0764371968702076e-01\n-3.3434376112593974e+01\n1.5640739781725975e+01\n7.6896857381332107e-01\n-3.1066595572196391e+01\n1.5450673517395330e+01\n7.0862525369115470e-01\n-2.8339515307216494e+01\n1.4048509827018270e+01\n7.1062047276325091e-01\n-2.9509529781736560e+01\n1.5402531495560689e+01\n6.2592589730891568e-01\n-2.7826017888673878e+01\n1.4461789536794909e+01\n5.3345827961214909e-01\n-2.6748599244877333e+01\n1.4524497739340712e+01\n5.6492535789317011e-01\n-2.8189483691510780e+01\n1.4449845092029577e+01\n5.1816751797768013e-01\n-2.8023606963575830e+01\n1.4811073642315748e+01\n5.9563098781942636e-01\n-2.7467185683451763e+01\n1.4811073642315748e+01\n5.9563098781942636e-01\n-2.7467185683451763e+01\n2.3207066733808639e+00\n5.0217916936699136e-01\n-2.0358887066899729e+01\n2.8855399579224488e-02\n5.0168043500316872e-01\n-2.0692856909521122e+01\n4.5110062300247540e+00\n4.8237769158524585e-01\n-2.1533180696894984e+01\n1.4175966436131267e+01\n4.6789923866724437e-01\n-2.8999385728495305e+01\n1.8817253315809541e+01\n5.5491124656036850e-01\n-2.9238471889196759e+01\n7.2033142063138857e+00\n4.4975751166924366e-01\n-2.4199718757666009e+01\n-1.5814712782573392e+00\n4.5648738951826429e-01\n-2.2354666882159371e+01\n9.6879782208633580e-01\n4.3588950529078829e-01\n-2.0348439949847105e+01\n9.7393578597805774e-01\n4.5193185963308768e-01\n-2.0430654999584259e+01\n1.4196155976876222e+01\n4.1380115534500594e-01\n-2.9211965546165423e+01\n9.8544752484394094e-01\n4.6038020789257267e-01\n-2.0418282743203097e+01\n1.5405448595237084e+01\n4.6090399960448591e-01\n-2.8297662471997175e+01\n1.4527786952087284e+01\n2.9407215415168814e-01\n-2.6836173817017308e+01\n1.4527786952087284e+01\n2.9407215415168814e-01\n-2.6836173817017308e+01\n1.5499415456573677e+01\n3.9144070078250448e-01\n-2.3136857099952170e+01\n-9.4722685029364158e+00\n4.5859991704725911e-01\n-3.1753090209480757e+01\n2.5316279359046545e-01\n4.2398450749161271e-01\n-2.0675367550159638e+01\n1.4713160879649877e+01\n3.4186554363256716e-01\n-2.7984292872584781e+01\n-9.2392935385632899e+00\n3.1709953340971647e-01\n-3.1637898624250244e+01\n1.4734195702777967e+01\n1.9596749836847310e-01\n-2.6907097915177445e+01\n1.8999344505690843e-01\n2.4169414608483664e-01\n-2.0666765000648162e+01\n3.0249136228188639e-01\n2.4134644980658068e-01\n-2.0583019287423181e+01\n3.1020798989800848e+00\n2.3336390659486805e-01\n-2.0576556265689721e+01\n1.4733843413926808e+01\n4.4979420485257653e-02\n-2.7714738595613301e+01\n1.4285771147194883e+01\n1.4887555838058322e-01\n-2.8937733520415620e+01\n1.4520600037606565e+01\n9.3378621952728530e-02\n-2.7913099563355974e+01\n1.4481550760403403e+01\n1.1378163796276990e-01\n-2.7837771366075785e+01\n-2.3757725307214050e+00\n2.2540293506668446e-01\n-2.2646074820114514e+01\n1.4669818004715896e+01\n3.3171312578901123e-02\n-2.7213264084196343e+01\n1.4623166292120874e+01\n7.5321395665083099e-02\n-2.7332948256580252e+01\n1.5483399075935138e+01\n2.2498088123909621e-01\n-2.6450554809817881e+01\n-2.3506744581578651e+00\n2.0985057898925108e-01\n-2.2780572340604536e+01\n1.4483675860882537e+01\n6.3519336998591205e-02\n-2.8903097907820303e+01\n1.7673168772490033e+01\n1.4299229562842447e-01\n-2.9912551298083347e+01\n-8.8279156986540297e-01\n1.8115861764750801e-01\n-2.1428735428656964e+01\n2.9153586067184021e+00\n1.6915768605745299e-01\n-2.0548830298791263e+01\n1.4824183714014277e+01\n1.1984803755400121e-01\n-2.8158834351773358e+01\n1.5121253115028074e+01\n1.5701041438698107e-01\n-2.7487381082011492e+01\n1.4829540858449942e+01\n5.6247320039142901e-02\n-2.5632916184333880e+01\n1.4875554290064100e+01\n6.2913226248843990e-02\n-2.5561727796273757e+01\n1.5107808751782979e+01\n9.8932515820841074e-02\n-2.5592431779047267e+01\n1.4804112789140840e+01\n-8.8259632704261431e-02\n-2.7673484143924561e+01\n1.5085872636824631e+01\n2.3015703502869828e-02\n-3.2434949940560571e+01\n1.6033466313915035e+01\n1.9128534988825344e-01\n-2.4960450811973235e+01\n1.6033466313915035e+01\n1.9128534988825344e-01\n-2.4960450811973235e+01\n-2.3474641714316191e+00\n1.1889404008924524e-01\n-2.2401120340077625e+01\n3.1969861236852162e+00\n1.1851465644317095e-01\n-2.0585392192672632e+01\n4.0205138765999155e+00\n1.0722686083201864e-01\n-2.1366084665699706e+01\n1.4591547194225065e+01\n-8.0998281231912064e-02\n-2.7011242680870208e+01\n1.5553420617058018e+01\n1.3127952495393078e-01\n-2.6210664669577305e+01\n3.2324889000520676e+00\n8.6744472200909750e-02\n-2.0651107484480558e+01\n1.4880531262231361e+01\n-3.9369853489653113e-02\n-2.6440390601549705e+01\n1.4735157126645083e+01\n-6.4682613029277941e-02\n-2.7682609428214626e+01\n-2.3083948191495209e+00\n5.7842545042564662e-02\n-2.2306480597854151e+01\n1.4446547464595202e+01\n-9.1779382103906945e-02\n-2.8838070637875550e+01\n1.4316380772235666e+01\n-1.8026955690182381e-01\n-2.8849049890080067e+01\n1.6869359611952419e+01\n-1.0892883295064375e-01\n-2.9892857451420490e+01\n-3.8255377562709314e+00\n-1.1683708801329429e-02\n-2.3146468891283082e+01\n1.9399362135278448e+01\n-8.8311474494130279e-02\n-2.8997972316786189e+01\n4.2727523424415015e+00\n-2.0334499132369302e-02\n-2.1322106549369785e+01\n3.2461211848263405e+00\n-2.2982272887617287e-02\n-2.0646719604122488e+01\n1.4634234965078742e+01\n-2.4773698045835957e-01\n-2.8047680943815294e+01\n1.5608976684236142e+01\n-3.9447929902960567e-02\n-2.4697347334050434e+01\n1.9244233368092907e+01\n-1.1712672524567135e-01\n-2.9090053165237961e+01\n1.1095245546898631e+00\n-1.7185351521773223e-02\n-2.0331388551480977e+01\n3.2643553012562001e+00\n-5.2921013192914521e-02\n-2.0616659462945140e+01\n1.5246191814377244e+01\n-1.8469378624371449e-01\n-2.4400118217219219e+01\n3.2427044892538355e+00\n-6.5568387547982276e-02\n-2.0659404842303918e+01\n3.2427044892538355e+00\n-6.5568387547982276e-02\n-2.0659404842303918e+01\n-3.6089552465632804e+00\n-9.4572978679235031e-02\n-2.3253628956435229e+01\n2.5066998091934281e+00\n-9.9556999207211644e-02\n-2.0378030616965095e+01\n1.4626534555027568e+01\n-3.2758409283411921e-01\n-2.8356679567428667e+01\n-8.0838896733589412e+00\n-3.1956553205517080e-01\n-3.1934853329769535e+01\n1.5562040087844943e+01\n-3.1571044737947007e-01\n-2.4471506605600254e+01\n-4.9098016852777959e-01\n-1.0940855057909354e-01\n-2.1057805131296579e+01\n1.4044360862888565e+01\n-4.0592216008045201e-01\n-3.1563307401296246e+01\n1.4029978498719871e+01\n-4.0221796657818454e-01\n-3.1549684542081081e+01\n1.4867319683899366e+01\n-4.7606994491716947e-01\n-2.7468133423676900e+01\n1.1598559842395382e+00\n-1.5593276759899416e-01\n-2.0335220392265160e+01\n1.4607780590723523e+01\n-4.6455764396681015e-01\n-2.8994609856784098e+01\n-2.1441543282349409e+00\n-1.9405029220197831e-01\n-2.1985066501845420e+01\n-1.1261312106540018e+00\n-2.0025795743684649e-01\n-2.1673639461139459e+01\n5.7857824857977489e+00\n-2.3919957552047269e-01\n-2.2503075105608016e+01\n1.5728807958800669e+01\n-4.6743929080547747e-01\n-2.4723512680175382e+01\n1.6630628343450006e+01\n-3.0193755509813369e-01\n-2.6299646891448962e+01\n-3.8595528755267607e+00\n-2.5651270326066422e-01\n-2.3102611970170532e+01\n1.4537780429033637e+01\n-4.7931074017306768e-01\n-2.8914046800877195e+01\n1.4970080209491123e+01\n-4.6374640193188088e-01\n-2.9702892073476288e+01\n5.1992765067742557e+00\n-2.8854616265062139e-01\n-2.2246791440861564e+01\n-9.1990992929318338e+00\n-5.3440399701997432e-01\n-3.1601590759768481e+01\n-8.6081724042848418e+00\n-4.7313849446411882e-01\n-3.0808138681789181e+01\n1.5357212579431415e+01\n-4.6123800390337094e-01\n-2.5698892075479382e+01\n5.4288555427870469e+00\n-3.2623803540729190e-01\n-2.2153768768480127e+01\n2.0665131976277191e+00\n-2.7933986857825038e-01\n-2.0326291565508239e+01\n1.6376068408647342e+01\n-5.9423305249150493e-01\n-3.1108913947622273e+01\n1.9053197909158964e+01\n-5.4211928455723712e-01\n-2.9058806608009210e+01\n-3.5305730857899618e+00\n-3.4376684732683804e-01\n-2.2922526558316626e+01\n1.5214808220754518e+01\n-5.3974661920012224e-01\n-2.5404087725846111e+01\n-7.5182399466172301e-01\n-3.5934880903096905e-01\n-2.1304659426250385e+01\n-7.7440226883407881e-01\n-3.3210738142663193e-01\n-2.1355260188395132e+01\n1.4677276484676900e+01\n-7.2242856811324674e-01\n-2.7510427074047445e+01\n1.4627324680863881e+01\n-6.3054758502902664e-01\n-2.7549655091700327e+01\n-3.5508822396926782e+00\n-4.1091215994207242e-01\n-2.2981153163231586e+01\n1.4729788436900026e+01\n-6.9898610062784705e-01\n-2.8192641891678878e+01\n-8.6430223545644658e-01\n-3.8150805499141760e-01\n-2.1473288582763924e+01\n1.6329401757156198e+01\n-7.3871949645630253e-01\n-3.0622991585752366e+01\n1.4853810844484027e+01\n-7.5504850344644636e-01\n-2.7879081370167906e+01\n1.4864145357783382e+01\n-7.1174874887034156e-01\n-2.7964262352515977e+01\n1.4901569629731972e+01\n-7.3042984395154098e-01\n-2.8245981737583662e+01\n-5.9976550796904227e-01\n-4.6713344498919313e-01\n-2.1210162256778919e+01\n-6.8628157498480524e-01\n-5.2438879841841646e-01\n-2.1334404909631044e+01\n1.4654837436833565e+01\n-1.0013615419727577e+00\n-2.9204358764330074e+01\n4.3049895898474286e+00\n-5.0758732369747006e-01\n-2.1854707875542836e+01\n1.7581038874229090e+01\n-8.9328918547668079e-01\n-3.0093309530516255e+01\n2.5619938673620055e+00\n-5.3442743395800618e-01\n-2.0465961384844515e+01\n6.8123163359021026e+00\n-6.6849762225405385e-01\n-2.3043076982369826e+01\n-3.3078248978987070e+00\n-6.1379340541161975e-01\n-2.2348477758935246e+01\n1.4834605973791275e+01\n-9.5454484393698746e-01\n-2.8417566553243162e+01\n8.9133838023290091e-01\n-5.6477331992877156e-01\n-2.0425052346524620e+01\n-1.0019449730596813e+01\n-1.0206578703779241e+00\n-3.0991274540959964e+01\n1.4941165500682521e+01\n-1.0399998699196409e+00\n-2.8086026816902866e+01\n-3.5175809520551415e+00\n-7.0861520865916572e-01\n-2.3136299843830908e+01\n1.5487459739766809e+01\n-9.4338743426370097e-01\n-2.6673435799742634e+01\n1.5120193883180324e+01\n-1.1464429330650201e+00\n-2.7004329230157424e+01\n1.0299635231736375e-01\n-6.8703887157649446e-01\n-2.0794187334159517e+01\n7.0187404530751812e-02\n-6.5902315994393079e-01\n-2.0801028252388587e+01\n3.6236691619343078e+00\n-7.1316452855969148e-01\n-2.0734574123009970e+01\n1.5520330507893208e+01\n-1.2872381666413066e+00\n-3.2376494807819924e+01\n-1.9191812718519818e+00\n-7.3647519951315599e-01\n-2.1729410989261215e+01\n4.0460267606441841e-01\n-7.0881623058410237e-01\n-2.0734843622370200e+01\n-9.4446702727867891e+00\n-1.1655243754074349e+00\n-2.9442545402401791e+01\n-9.4446702727867891e+00\n-1.1655243754074349e+00\n-2.9442545402401791e+01\n-3.0515811518683247e+00\n-8.4180391412785016e-01\n-2.2290760995155548e+01\n1.4684836008481780e+01\n-1.4530272584224502e+00\n-2.9811523057886674e+01\n1.1372984071434966e+00\n-7.9096013704270141e-01\n-2.0468263220414212e+01\n2.3734691530360688e+00\n-7.8633378085955041e-01\n-2.0465947400610865e+01\n1.4988282651805791e+01\n-1.2471069128848087e+00\n-2.8893463583886337e+01\n2.0042226969868020e+00\n-8.3488690128489651e-01\n-2.0464322847807793e+01\n-1.5436762135168665e+00\n-8.6408544607266047e-01\n-2.1378019252227091e+01\n6.0724753301131278e+00\n-9.6868700371432404e-01\n-2.2615278430763890e+01\n-9.3173958267841661e-01\n-8.8657761193003382e-01\n-2.1096765636011089e+01\n-9.2984532265598407e-01\n-8.9093633685525653e-01\n-2.1095196310497290e+01\n1.8527608951665254e+01\n-1.3753502833577340e+00\n-2.9549210297687249e+01\n-1.4875042948005879e+00\n-9.0192802600003519e-01\n-2.1234165777797848e+01\n1.9308732192116571e+00\n-8.9248389289149155e-01\n-2.0471888387827672e+01\n1.5008088200907832e+01\n-1.5079603189999546e+00\n-3.0529205925897777e+01\n1.4612907686884792e+01\n-1.5222096974307997e+00\n-2.9639396369589448e+01\n-2.8192182908457850e+00\n-9.7102349106224350e-01\n-2.1905567671442217e+01\n-3.4190146858409300e+00\n-1.0230107558258845e+00\n-2.3178275876065261e+01\n6.0432458378974969e+00\n-1.0490267524646228e+00\n-2.2412206254349744e+01\n1.5007478428248820e+01\n-1.4673421082664704e+00\n-2.9036720236444129e+01\n6.8466241904861311e+00\n-1.0946195197847388e+00\n-2.2663120064618852e+01\n1.6045976318763991e+01\n-1.3733593740861745e+00\n-2.5311530894561169e+01\n-2.9395065791975079e+00\n-1.0805870875630046e+00\n-2.1944310932232906e+01\n4.5771815291284668e+00\n-1.0903774959029069e+00\n-2.1148097658794288e+01\n1.6555931122626748e+00\n-1.0415898414999525e+00\n-2.0478791339178230e+01\n-1.2480861010722530e+00\n-1.0781312075772838e+00\n-2.1141776706138586e+01\n-1.2463314887215058e+00\n-1.0807480905688196e+00\n-2.1147651614240186e+01\n3.2699426357333445e+00\n-1.0689666546020129e+00\n-2.0867850294962121e+01\n-3.2897214189734969e-01\n-1.0763137886360032e+00\n-2.0799162809035199e+01\n-1.0070802421403098e+00\n-1.0883307319849860e+00\n-2.0823678065501902e+01\n1.5105393157483579e+01\n-1.8168663066954067e+00\n-2.8755551343437073e+01\n1.5394844519806618e+01\n-1.6494132498938463e+00\n-2.8073365953540304e+01\n1.5293647458173997e+01\n-1.7408964629975252e+00\n-2.7907340248203408e+01\n2.3624631183578413e+00\n-1.1407304576715445e+00\n-2.0586525008386719e+01\n-1.2686447665077196e+00\n-1.1615435630945765e+00\n-2.1239726043674334e+01\n5.1911745163162291e+00\n-1.2362924216200377e+00\n-2.1778412633727886e+01\n1.8937720684697744e+01\n-1.7911416352648224e+00\n-2.9341619306405448e+01\n1.5201019979102503e+01\n-1.4878857770860185e+00\n-2.2846730697968145e+01\n6.0146406151746346e-01\n-1.1632201757179945e+00\n-2.0764647026543592e+01\n-2.5531972560012570e+00\n-1.2655024726819977e+00\n-2.1614284252777619e+01\n-7.5152129441689497e-01\n-1.2340772248143812e+00\n-2.0665978419968301e+01\n-7.5152129441689497e-01\n-1.2340772248143812e+00\n-2.0665978419968301e+01\n6.4001375781549852e+00\n-1.3867244119517381e+00\n-2.2157164972930591e+01\n-2.3859672765781275e+00\n-1.3287330738544594e+00\n-2.1611485078524961e+01\n-2.3346363900821210e+00\n-1.3347918519059014e+00\n-2.1566733879873187e+01\n3.0215314178394173e+00\n-1.3107741898384104e+00\n-2.0740369865486400e+01\n1.5433615064732152e+01\n-1.8674144518518885e+00\n-2.7644173462053782e+01\n-6.8508675160701085e+00\n-2.0668506647080758e+00\n-2.9652972333835013e+01\n1.5941060674357152e+01\n-1.7644610126944855e+00\n-2.5990136303086551e+01\n-8.9892019200523148e+00\n-1.9139091279081548e+00\n-2.8296281137832157e+01\n-2.9387016793797112e+00\n-1.3976432758807136e+00\n-2.1405091293873642e+01\n1.6905135267177741e+01\n-2.2261528120504130e+00\n-3.1048640200707236e+01\n6.3937163871096629e+00\n-1.5164266621928542e+00\n-2.2055109331453810e+01\n1.8393144377056907e+00\n-1.3863705154645543e+00\n-2.0567797039890941e+01\n1.5525328001421610e+01\n-1.8305269591637410e+00\n-2.3140274038132141e+01\n1.8649223611178353e+01\n-1.9968465662087465e+00\n-2.7913623554719823e+01\n1.5715351820112575e+01\n-1.9944496539542254e+00\n-2.7433681757565658e+01\n-1.7447504421993567e+00\n-1.4842031774623705e+00\n-2.1438705691582321e+01\n6.4073397737739968e-01\n-1.4182687134136858e+00\n-2.0482185662310918e+01\n1.5503614134927725e+01\n-2.1958853872541639e+00\n-2.7593406839968150e+01\n5.8344554567911215e+00\n-1.5969196370374275e+00\n-2.1557111610940883e+01\n-2.4620200285465295e+00\n-1.5650720340434128e+00\n-2.1183039798935532e+01\n-5.7365193184402030e-01\n-1.5312503339275270e+00\n-2.0628381963331130e+01\n-5.7338737195948108e-01\n-1.5295291507168536e+00\n-2.0630876730504490e+01\n1.4909003897856495e+01\n-2.3311595381008576e+00\n-2.8723157023941635e+01\n1.8716695360692100e+01\n-2.3404720945642854e+00\n-2.9613226961552535e+01\n1.5399437146971334e+01\n-2.2629029145551613e+00\n-2.8017513768322598e+01\n2.4042552092445777e+00\n-1.5520019286717235e+00\n-2.0356873339258623e+01\n-8.8565354605181834e-01\n-1.6248989879649220e+00\n-2.0979309188829944e+01\n1.5898321445137519e+01\n-2.1603356650711714e+00\n-2.5556314172568872e+01\n-2.1534464570400864e+00\n-1.6677500719304674e+00\n-2.1202464563776580e+01\n1.2964658962639177e+00\n-1.6026781646920860e+00\n-2.0233004769408286e+01\n1.5732444973019694e+01\n-2.2278377697570049e+00\n-2.5331432394709520e+01\n1.1053000536446842e+01\n-2.4923454231425852e+00\n-2.9017295168554920e+01\n-6.9225301197331728e+00\n-2.3920766241651439e+00\n-2.9086808591514391e+01\n-7.1004664452043897e+00\n-2.3823134090476765e+00\n-2.8590381238276549e+01\n-2.2243443316329055e+00\n-1.7148603034640824e+00\n-2.1390363962557625e+01\n1.7285753667473262e+01\n-2.6990438676038746e+00\n-3.0672874016969917e+01\n1.6093024125860779e+01\n-2.5219356415662189e+00\n-2.8630360620468561e+01\n-2.3934599943665815e+00\n-1.8567958827529125e+00\n-2.1526975471472127e+01\n-2.3541331162423944e+00\n-1.8243119153000762e+00\n-2.1437975082656905e+01\n8.7355615615976018e-02\n-1.7588061668615955e+00\n-2.0460113115027866e+01\n1.5286200059879612e+01\n-2.7354039882910524e+00\n-2.8382684909052269e+01\n1.8245041001056599e+01\n-2.7565119773904718e+00\n-3.0052802956725674e+01\n1.5777504996328952e+01\n-2.2563848769309018e+00\n-2.3947805923843468e+01\n1.6207751215508456e+01\n-2.3866153032477930e+00\n-2.4430608397478540e+01\n1.9224337331098777e+01\n-2.7035727573663579e+00\n-2.9357563683222356e+01\n7.0654312504599082e-01\n-1.7818875205161704e+00\n-2.0193935655566193e+01\n1.6230213423073515e+01\n-2.5538220848360158e+00\n-2.5261162524590041e+01\n-1.7806689014886656e+00\n-1.8564287994305626e+00\n-2.0927421077462458e+01\n1.0972479244261370e-01\n-1.8443278580402647e+00\n-2.0502193986758666e+01\n1.5843249992611586e+01\n-2.6081426741140779e+00\n-2.5969359646843348e+01\n1.7484914013420259e+01\n-2.9402020707205812e+00\n-3.0259062116115562e+01\n1.5496065127843710e+01\n-2.8705549144574438e+00\n-2.8410672292421072e+01\n-4.3121273506794552e-02\n-1.9203179135766701e+00\n-2.0588423759826803e+01\n1.5560012421725999e+01\n-2.8196089901683798e+00\n-2.8500097199789071e+01\n2.6923621285328156e+00\n-1.9260558845298641e+00\n-2.0269416686474777e+01\n2.7284403934554073e+00\n-1.9591192970670681e+00\n-2.0286948325890656e+01\n1.9144068893806431e+01\n-3.0194023026052257e+00\n-2.9685851808767495e+01\n1.9144068893806431e+01\n-3.0194023026052257e+00\n-2.9685851808767495e+01\n1.6200187051917155e+01\n-2.7346660191539618e+00\n-2.4801905642695782e+01\n1.5514357437230894e+01\n-2.9952424358945251e+00\n-2.8330833578366082e+01\n4.7172865112211184e+00\n-2.1345250195601015e+00\n-2.0853938643124472e+01\n1.6228838079771023e+01\n-2.7928985543733411e+00\n-2.4544058764655283e+01\n5.3767365418214412e+00\n-2.1659781811915217e+00\n-2.0981337288435938e+01\n1.5949605379993004e+01\n-2.7691227289527807e+00\n-2.4483773208642511e+01\n-3.3559895021669885e+00\n-2.4711127734029184e+00\n-2.3894565376778626e+01\n1.4528638668741054e+00\n-2.1046400405808345e+00\n-2.0311545287603092e+01\n1.5671033056447333e+01\n-2.9944680125278440e+00\n-2.6456821515858728e+01\n6.4166416939807158e-01\n-2.1433171228914105e+00\n-2.0511684991289773e+01\n1.5883524941256612e+01\n-2.9289850982401933e+00\n-2.6564141876315603e+01\n1.6313592518448683e+01\n-2.9423208607853213e+00\n-2.4791002965318899e+01\n1.6279033633442207e+01\n-2.9736715269762457e+00\n-2.6505634635073363e+01\n5.3184022109919944e+00\n-2.3055471297977079e+00\n-2.0800511676803975e+01\n1.5808919398984235e+01\n-3.1072462669437524e+00\n-2.5435889581926681e+01\n1.6304768204202535e+01\n-3.0242680650181804e+00\n-2.4844726173428331e+01\n1.6019088670272925e+01\n-2.9765001966770095e+00\n-2.4427920712500956e+01\n4.9657657624336196e+00\n-2.3463794122141470e+00\n-2.0574208382751362e+01\n1.7408984649953074e+00\n-2.3232563655874587e+00\n-2.0349483484758323e+01\n1.6165796201239040e+01\n-3.1078566412302693e+00\n-2.6357885058886083e+01\n-3.5831852324848140e-01\n-2.3494718883129542e+00\n-2.0285563366605675e+01\n3.6155460841677063e+00\n-2.3972102288885697e+00\n-2.0376382931533122e+01\n1.6164894167248491e+01\n-3.2718933515769502e+00\n-2.5243627602291955e+01\n4.7619373942882977e+00\n-2.4390392276071453e+00\n-2.0536269331507505e+01\n3.9304253871278476e+00\n-2.4313488648781312e+00\n-2.0436493770203640e+01\n-3.4600660078382894e-01\n-2.4137609567905129e+00\n-2.0289153980737815e+01\n1.6504634171856562e+01\n-3.5629226642165790e+00\n-2.8435022122025629e+01\n4.6595360948313544e+00\n-2.5512686475831940e+00\n-2.0594706610115498e+01\n1.6516670688218191e+01\n-3.6172406144110809e+00\n-2.8407804569549409e+01\n1.8815342769422656e+01\n-3.8352624947001996e+00\n-2.9878928066627143e+01\n-2.7772801146697277e+00\n-2.7936279135947255e+00\n-2.3046369244004797e+01\n-2.7403600854412185e+00\n-2.8327909990709426e+00\n-2.2945834579267316e+01\n-2.5860138690811885e-01\n-2.4792888999151996e+00\n-2.0159399771640004e+01\n7.6623075754208769e-01\n-2.4908436276999995e+00\n-2.0163747044038178e+01\n4.7709673572568931e+00\n-2.5846212125762107e+00\n-2.0691575600521254e+01\n-3.5862522621186405e-01\n-2.4986468979558834e+00\n-2.0177389824155476e+01\n-7.2744435837892496e+00\n-3.3760264692151360e+00\n-2.6918503444856473e+01\n-8.6966169238365687e+00\n-3.5213325663417998e+00\n-2.7513182938347899e+01\n-2.5182933327348822e-01\n-2.5249959648913447e+00\n-2.0145231102214716e+01\n1.6172716875636869e+01\n-3.5819020544214055e+00\n-2.7358450969225032e+01\n1.6129963053931451e+01\n-3.4203259766093841e+00\n-2.4587924972916184e+01\n1.5859627259363135e+01\n-3.6170448658189089e+00\n-2.7018903782021937e+01\n-7.0390995264010714e-01\n-2.6134774899245659e+00\n-2.0228598417824941e+01\n4.0218389497791209e+00\n-2.6412992729806564e+00\n-2.0219240441745939e+01\n1.6008779846761822e+01\n-3.6846669244060406e+00\n-2.7398109173856952e+01\n1.6025227476957877e+01\n-3.6057043577086705e+00\n-2.5182039433059636e+01\n2.8103446679993085e+00\n-2.6418502027662778e+00\n-2.0082990534840249e+01\n-8.4707746752382518e-01\n-2.6547151821493795e+00\n-2.0362671550335300e+01\n3.7657090578283641e+00\n-2.6032597705523162e+00\n-2.0177364342050065e+01\n-7.3328450602201203e+00\n-3.5419099226851696e+00\n-2.6317017631537919e+01\n-7.3328450602201203e+00\n-3.5419099226851696e+00\n-2.6317017631537919e+01\n1.6106162928633616e+01\n-3.5699614973358602e+00\n-2.4882838314558150e+01\n8.7247692449786984e-01\n-2.6820678604327517e+00\n-1.9895162023200768e+01\n8.7247692449786984e-01\n-2.6820678604327517e+00\n-1.9895162023200768e+01\n-6.9051051993764567e-01\n-2.7588683913671894e+00\n-2.0405946088464919e+01\n1.6177300156483867e+01\n-3.9116787130665371e+00\n-2.7605017584479832e+01\n2.4862933160686778e+00\n-2.6776060651438152e+00\n-2.0202819774896653e+01\n1.2700578334284531e+00\n-2.7946465472256916e+00\n-1.9857117687422740e+01\n-7.4031705640303782e+00\n-3.9103962073038878e+00\n-2.7230415355779641e+01\n1.7285706441104753e+00\n-2.8171755841555255e+00\n-1.9750243405021763e+01\n3.0133518518737192e+00\n-2.8469333892047555e+00\n-1.9852749384696942e+01\n2.2987330655761640e+00\n-2.8683349947889041e+00\n-2.0011245778405115e+01\n1.5833974760379474e+00\n-2.9094297913107838e+00\n-1.9704271268677189e+01\n2.2705453019466408e+00\n-2.9108106964877800e+00\n-1.9735573217335947e+01\n-2.8415711603256808e+00\n-3.4783176507785729e+00\n-2.3560390273931599e+01\n4.1813738262624636e+00\n-3.1522837971730286e+00\n-2.0867364071883323e+01\n2.3981018522702531e+00\n-2.9955452234225288e+00\n-1.9777090222274587e+01\n-5.4861037294604298e-01\n-3.1311136661725487e+00\n-2.0770681820268926e+01\n4.0525349357167375e+00\n-3.1472963053118752e+00\n-2.0671169891221968e+01\n5.0335652251996441e+00\n-3.3151377756522269e+00\n-2.1608046425168421e+01\n1.6652306787796320e+00\n-3.0864199427587020e+00\n-1.9790437777809878e+01\n-8.2290677456123884e-01\n-3.2212923101920494e+00\n-2.1383574420584864e+01\n2.2811334417449221e+00\n-3.1187299153174100e+00\n-1.9892175721316153e+01\n-6.3402118333824337e-02\n-3.2599042971072469e+00\n-2.0591894067361178e+01\n-2.5179205912709812e+00\n-3.7749001448161668e+00\n-2.3624647668627304e+01\n1.8102911134396709e+00\n-3.3087557895364199e+00\n-2.0067047470203079e+01\n3.0247444312753755e+00\n-3.4071670199190187e+00\n-2.0128960020179868e+01\n1.9377446126484561e+00\n-3.5053703592266166e+00\n-2.0343947206338406e+01\n1.1236573067929990e+01\n-4.7228264741127681e+00\n-2.6169951223351696e+01\n1.2249098740239516e+01\n-4.7871995988878560e+00\n-2.6966472740237656e+01\n1.1322559746447670e+01\n-4.7394257602865393e+00\n-2.6151488150638372e+01\n1.0818925621212699e+01\n-4.8133879257572696e+00\n-2.6011016011261187e+01\n2.9576433526366044e+00\n-3.6775503706077561e+00\n-2.0510357197128972e+01\n-2.3909723172848335e-01\n-3.8702461307020477e+00\n-2.1321271924445462e+01\n-1.0800345047102260e+01\n-4.1549995583602293e+00\n-2.2489546329093432e+01\n4.0917472143655464e+00\n-4.0776326404533272e+00\n-2.1587577912548575e+01\n2.6929059670523006e+00\n-3.9439077858984732e+00\n-2.0698647926162987e+01\n3.9584499629086753e+00\n-4.4542128417185376e+00\n-2.1868358204481794e+01\n1.7198429659239480e+01\n-5.9805635195778803e+00\n-2.8760007882816964e+01\n4.1139802046433793e+00\n-4.7040068772374015e+00\n-2.3454914556083704e+01\n1.5658728162018618e+00\n-4.4490348517350009e+00\n-2.1479905327429186e+01\n1.6517553088179959e+01\n-6.0787919412906213e+00\n-2.8239951028372641e+01\n-1.2537466892006135e+00\n-4.6632561732861220e+00\n-2.2364801373638503e+01\n-7.7370725108158200e-01\n-4.7273028824532286e+00\n-2.2354478158835960e+01\n-8.2200805178105807e-01\n-4.7919840461413061e+00\n-2.2527892222393714e+01\n2.1632148306652432e+00\n-4.6390719233525983e+00\n-2.1340751843650143e+01\n1.3718164445286883e+01\n-5.9848297576007372e+00\n-2.6846822753817413e+01\n1.3246645813830000e+01\n-6.3351766426745435e+00\n-2.6111827478568014e+01\n1.6356244767401375e+01\n-6.8382241591155593e+00\n-2.7501455382846316e+01\n1.6356244767401375e+01\n-6.8382241591155593e+00\n-2.7501455382846316e+01\n8.7752653757507759e-01\n-5.3672909668628437e+00\n-2.1674696578846774e+01\n1.4642780885941173e+01\n-6.9858349820012355e+00\n-2.6373358903769049e+01\n-1.5613294003115910e+00\n-6.0632802024286034e+00\n-2.2767748761833310e+01\n8.1318851500758331e+00\n-6.5889503989384126e+00\n-2.3717488121930728e+01\n-5.5631858181323368e+00\n-6.4995554675123888e+00\n-2.3784549002820476e+01\n-4.9231427886142658e+00\n-6.2335530137813828e+00\n-2.2895767530058848e+01\n5.5150185717531164e+00\n-6.3409962348015201e+00\n-2.2914870409667625e+01\n8.3696251855889903e-01\n-6.0795198433161159e+00\n-2.1329584626189074e+01\n1.8086361993733480e+01\n-7.9853530689018823e+00\n-2.7473709161401324e+01\n1.4703437592048887e+01\n-7.5422600760117833e+00\n-2.5875443522895093e+01\n8.1612131711417302e+00\n-6.9035520826636976e+00\n-2.3274699176762574e+01\n1.5371240009445762e+01\n-7.6831522604826645e+00\n-2.6104104214421621e+01\n1.5820255916891355e+01\n-7.7572095606069649e+00\n-2.6354301173463053e+01\n-4.7529962825831534e-01\n-6.5215051218847604e+00\n-2.2353510834951386e+01\n8.0053228689024163e+00\n-6.9746452810375352e+00\n-2.3183704629563341e+01\n8.0053228689024163e+00\n-6.9746452810375352e+00\n-2.3183704629563341e+01\n-4.1036154759115480e+00\n-6.5713289628526370e+00\n-2.2462878311601898e+01\n1.7023938457623739e+01\n-8.2328151620579799e+00\n-2.6662819825264521e+01\n7.3325236304840509e+00\n-7.1213913517179019e+00\n-2.3052188031575405e+01\n7.2013471518176848e+00\n-7.1520417045368747e+00\n-2.2835117522864550e+01\n7.3036509093068069e+00\n-7.3261716927852065e+00\n-2.2665459639613164e+01\n7.2879031957530609e+00\n-7.3422401046024977e+00\n-2.2898588716346090e+01\n7.2262932392817474e+00\n-7.3644444831030285e+00\n-2.2654366980329733e+01\n-3.4527087240037844e+00\n-7.0434605058866886e+00\n-2.1973299446139986e+01\n-3.8949213067833779e+00\n-7.3369072465851524e+00\n-2.2622359299928256e+01\n1.5320327481257053e+01\n-8.4696834760882673e+00\n-2.5469453134839224e+01\n8.0353005496746164e+00\n-7.5757163382462904e+00\n-2.2833674243360903e+01\n-5.4392833734224295e+00\n-6.9813124663787871e+00\n-2.0865540058157087e+01\n-2.7352784946406175e+00\n-7.2421715552572126e+00\n-2.1630441531682255e+01\n-5.4503383491066355e+00\n-7.5294342463610793e+00\n-2.2396394254619047e+01\n1.3532989457467881e+01\n-8.3743181325446692e+00\n-2.4439853379271078e+01\n-4.7008766860236983e+00\n-7.5743871923556307e+00\n-2.2232351418152692e+01\n-3.1197185088233823e+00\n-7.5031042751318431e+00\n-2.2063854846384125e+01\n6.7025166236059608e+00\n-7.7101331888389826e+00\n-2.1978504128088073e+01\n1.3557095647982894e+01\n-8.5729605783302780e+00\n-2.4426751820905846e+01\n-3.7831230923586809e+00\n-7.7067931033372323e+00\n-2.2052972801656193e+01\n6.6684479480475982e+00\n-7.8073449826970789e+00\n-2.1974693308732512e+01\n-5.1677974749739359e+00\n-7.7516731435524555e+00\n-2.2042263430053747e+01\n1.2598722758455937e+01\n-8.4949399244684685e+00\n-2.3746074094946636e+01\n-2.5852864905164781e+00\n-7.8084362385026607e+00\n-2.1908736067575564e+01\n6.8506811662007667e+00\n-7.9163638195363601e+00\n-2.2050000094504064e+01\n8.4399012699388543e+00\n-8.1520305816041567e+00\n-2.2241854786521724e+01\n-5.8665595099625643e+00\n-7.8886793756957827e+00\n-2.1849772947897140e+01\n-3.5183467109490940e+00\n-7.5409262643607802e+00\n-2.0803757241303703e+01\n-1.1086954070413286e+00\n-7.7564488350169336e+00\n-2.1212508314275709e+01\n8.4676163890756797e+00\n-8.0772546908832510e+00\n-2.1649651168696145e+01\n1.3786553067756161e+01\n-9.0717157659512289e+00\n-2.4085104428173118e+01\n-3.6712430615020204e+00\n-7.7261574052463500e+00\n-2.0599450300289760e+01\n1.5565833595726254e+01\n-9.4786566307949567e+00\n-2.4772931735789321e+01\n-2.7740081751104948e+00\n-8.1411041141791483e+00\n-2.1454726160597385e+01\n-7.0815440065202475e+00\n-6.9990119337511745e+00\n-1.8310080718313490e+01\n-2.0099266734473002e+00\n-8.1631824099609709e+00\n-2.1475240042822684e+01\n5.4565772774445440e+00\n-8.1193300592849127e+00\n-2.1190544372109684e+01\n-2.5982494538520227e+00\n-8.1332432613064007e+00\n-2.1358778455982950e+01\n1.2605903872431508e+00\n-8.2565778171596715e+00\n-2.1336909398752308e+01\n-1.8204786869928451e+00\n-8.2709635367495409e+00\n-2.1288818957380137e+01\n1.2104312352837157e+01\n-9.0889508024350434e+00\n-2.2983055996172407e+01\n4.4734583741171718e-01\n-8.1815570976798409e+00\n-2.0762144909211703e+01\n5.3419933770079604e+00\n-8.2471285723256376e+00\n-2.1013060515122351e+01\n-3.6946317860320512e+00\n-7.8457191164009883e+00\n-2.0133973011810095e+01\n5.1049347588187723e+00\n-8.3071390891323045e+00\n-2.1122845171489164e+01\n-7.5928593184053894e-01\n-8.0691652137075618e+00\n-2.0697975779101768e+01\n4.1385408400046086e-01\n-8.2248356617281519e+00\n-2.1228870612009498e+01\n1.8197776152512239e+00\n-8.2043625890011285e+00\n-2.0868699602293717e+01\n-4.4060547758893138e+00\n-7.8582001454940285e+00\n-2.0057816318281684e+01\n2.0834958491984912e+00\n-8.3929233779306518e+00\n-2.1197655083313212e+01\n-1.7558143586937269e+00\n-8.2534177730270244e+00\n-2.1142498567750454e+01\n1.2493154442472201e+00\n-8.1664811292717605e+00\n-2.0734672673094739e+01\n4.8113692193995172e+00\n-8.2869274294082906e+00\n-2.0929196984712874e+01\n3.3843781279807126e+00\n-8.3991167535706364e+00\n-2.1129424995040704e+01\n-9.0871295888605000e-02\n-8.2264751381760846e+00\n-2.0647235283352764e+01\n1.0987880150093071e+01\n-9.0920007629927788e+00\n-2.2594292277333722e+01\n9.3661596686390141e+00\n-8.8340748611056892e+00\n-2.1860825603495059e+01\n1.5441886913946470e-01\n-8.2635707268843035e+00\n-2.0575991231308425e+01\n2.0278786484425818e-01\n-8.3883053497622289e+00\n-2.0832674174016280e+01\n2.5289715306178917e+00\n-8.3188676874538636e+00\n-2.0607603730827851e+01\n6.7362043871128838e+00\n-8.6276939663351708e+00\n-2.1244608697539068e+01\n6.3209017192168426e+00\n-8.5896393041711772e+00\n-2.1153509078884856e+01\n1.1999493375301330e-02\n-8.3158602962452246e+00\n-2.0504882180473881e+01\n1.5836539341551157e+00\n-8.4955094203224970e+00\n-2.0980889272496196e+01\n3.3595085196903618e+00\n-8.3995479225427943e+00\n-2.0737245705337138e+01\n3.3882460635520566e+00\n-8.4644562832675163e+00\n-2.0826515455239267e+01\n3.3882460635520566e+00\n-8.4644562832675163e+00\n-2.0826515455239267e+01\n-8.6608072172479067e-01\n-8.4197553551564308e+00\n-2.0947569276441385e+01\n1.0627786689171732e+01\n-9.1345948932774110e+00\n-2.2200838998677472e+01\n1.7791044495383184e+00\n-8.5905252175883184e+00\n-2.0995682733681562e+01\n1.3108309705327784e+01\n-9.5694266952144282e+00\n-2.3312443993217883e+01\n-8.8655883231629462e-01\n-8.5322848658057175e+00\n-2.0922321496956044e+01\n1.3735780351866915e+00\n-8.6038502766067797e+00\n-2.0900918996784483e+01\n-8.6235875585099675e-01\n-8.2859920339823603e+00\n-2.0326873960139196e+01\n-8.4687101172350909e-01\n-8.5331059690844597e+00\n-2.0887705535941802e+01\n5.6441432731928298e+00\n-8.7123581454548855e+00\n-2.0827751955534691e+01\n5.0100301445715822e-01\n-8.4325790466444168e+00\n-2.0178731911339586e+01\n5.8270619985436838e+00\n-8.6330406844236744e+00\n-2.0492179557357069e+01\n4.4684744731056902e-01\n-8.5014013750508077e+00\n-2.0231483261918168e+01\n1.0979791360005386e+01\n-9.4526822516970661e+00\n-2.2078209296608989e+01\n1.0979791360005386e+01\n-9.4526822516970661e+00\n-2.2078209296608989e+01\n-1.5566433253078296e+01\n1.6251950028652434e+01\n-3.4046041648400134e+01\n9.3365353589664934e+00\n2.3690016724854793e+01\n-5.1307231185466435e+01\n-1.3934525501109485e+01\n1.6265445091310191e+01\n-3.4439434818639761e+01\n-1.3978195579524993e+01\n1.5967371102393273e+01\n-3.4083696881125391e+01\n1.4635271525998334e+01\n2.4734636673946678e+01\n-5.3756817255030924e+01\n-9.6279000064801732e+00\n1.7645843170323147e+01\n-3.8095583130398836e+01\n-9.7311828347786005e+00\n1.7915888135301273e+01\n-3.8693444214951882e+01\n-5.7712612432602715e+00\n1.8820036952837913e+01\n-4.0732492341834408e+01\n1.8411518765476195e+01\n2.5845829504716612e+01\n-5.6138323697623946e+01\n1.8804931054558306e+01\n2.6193784247194269e+01\n-5.6894978272895600e+01\n-1.0056654801011087e+01\n1.7368806780849457e+01\n-3.7335853657049668e+01\n-1.2803631839010022e+01\n1.6400896096174574e+01\n-3.5198999615019218e+01\n-1.3096759363462969e+01\n1.6303567478776568e+01\n-3.4930314227637325e+01\n-1.3393379928975204e+01\n1.6653650937367836e+01\n-3.5561653758761381e+01\n2.6652799696977345e+00\n2.1362243609385761e+01\n-4.6739591170771547e+01\n2.6652799696977345e+00\n2.1362243609385761e+01\n-4.6739591170771547e+01\n9.7241199756098844e+00\n2.3417353664612815e+01\n-5.1183300775583469e+01\n-9.1529173150654053e+00\n1.7822227683531327e+01\n-3.8743428351559992e+01\n-7.3684500060553502e+00\n1.8250968159752926e+01\n-3.9924447974488871e+01\n-1.5219649450414058e+01\n1.6115356438786510e+01\n-3.4376327946172218e+01\n-5.8700509462897319e+00\n1.8548019022955639e+01\n-4.0677019031385228e+01\n-5.8300427891540254e+00\n1.8654371474530180e+01\n-4.0927959716593300e+01\n1.0546170129772740e+01\n2.3604548680686502e+01\n-5.1924943789759602e+01\n-1.2161004554522341e+01\n1.6497856369868330e+01\n-3.5825524260791823e+01\n1.0591391936864509e+01\n2.3789898523132884e+01\n-5.2768451540549307e+01\n-1.3608153511215864e+01\n1.6027559569283778e+01\n-3.4835527005588020e+01\n1.5542675678305564e+01\n2.4695104733119784e+01\n-5.4702681214731776e+01\n1.7421835114476487e+01\n2.5204448939408181e+01\n-5.5713864349944721e+01\n1.8549533241883797e+01\n2.5972937925671733e+01\n-5.7388371690303011e+01\n1.4763715272728977e+01\n2.4417271105612855e+01\n-5.4285836991568232e+01\n-7.0042098384986593e+00\n1.8399095206054831e+01\n-4.1082285828379241e+01\n1.3248344026163592e+01\n1.4632993339960114e+01\n-3.1605916845918134e+01\n-4.7402866945395319e+00\n1.8764733471271136e+01\n-4.1863176772231192e+01\n9.9916172379169961e+00\n2.2917307594172822e+01\n-5.1279733941298808e+01\n9.5368830469084944e+00\n2.3021551187449109e+01\n-5.1418050976546219e+01\n-1.2334214203467871e+01\n1.6225621790035319e+01\n-3.5766616973607938e+01\n1.8215278234430873e+01\n2.5283482637757363e+01\n-5.6636153607311634e+01\n-1.2427289680534907e+01\n1.6225131007224135e+01\n-3.5871663531979955e+01\n4.3438611024563256e+00\n2.1420765091927599e+01\n-4.8129024014138267e+01\n-3.3784143559602198e+00\n1.9193369426634909e+01\n-4.3258374444322854e+01\n1.2350188260870983e+01\n1.5334913281843253e+01\n-3.3540406670311057e+01\n9.5691574632767367e+00\n2.2714090332338703e+01\n-5.1545031757017327e+01\n9.3360350749954151e+00\n2.2705800943974264e+01\n-5.1475813441781575e+01\n1.3612987374496059e+01\n1.4022669607744984e+01\n-3.0651968047735568e+01\n1.0347952698184228e+01\n2.2961147865690037e+01\n-5.2376904088693394e+01\n8.5683218614791112e+00\n2.2516014810839287e+01\n-5.1520316231687268e+01\n1.0270020017188211e+01\n2.3388112040542747e+01\n-5.3683951963104590e+01\n1.3341619574751066e+01\n1.4599150165272320e+01\n-3.2156175888458328e+01\n1.9829893819851645e+01\n2.7676976167584492e+01\n-6.3247383553846021e+01\n-1.2541888191865338e+01\n1.5940531141143737e+01\n-3.5774347367830444e+01\n-1.2774614065886574e+01\n1.6969924922051039e+01\n-3.8515362525919286e+01\n1.0131702392386668e+01\n2.2681597575626544e+01\n-5.2055333311053964e+01\n-1.2553675045069225e+01\n1.7047222442633235e+01\n-3.8747788751241892e+01\n9.7027721289378022e-01\n2.0206926999416751e+01\n-4.6071186871964187e+01\n1.2868069449041295e+01\n2.4785347301268715e+01\n-5.6936750436606872e+01\n-1.2072521004890980e+01\n1.6096819384748066e+01\n-3.6307772967615882e+01\n1.3673608293862687e+01\n2.4970866204806725e+01\n-5.7717874124231358e+01\n1.2899129813378016e+01\n2.3679362870714321e+01\n-5.4439931990470733e+01\n1.2436523122405870e+01\n1.5285650684620126e+01\n-3.4041463827428551e+01\n1.8401970741111981e+01\n2.5091657052083754e+01\n-5.7658374250509070e+01\n2.6399629371990979e+01\n3.2539040986458240e+01\n-7.5022713090035850e+01\n-1.2572137638026396e+01\n1.6160919172481531e+01\n-3.6385232932378969e+01\n-1.6561786310650273e+01\n1.5555951748013507e+01\n-3.4596693607654259e+01\n-1.6561786310650273e+01\n1.5555951748013507e+01\n-3.4596693607654259e+01\n1.0467448886164572e+00\n1.9835252116670652e+01\n-4.5718627210699637e+01\n9.5208487364746990e+00\n2.4161022656362427e+01\n-5.5946608854486705e+01\n1.2555928447650095e+01\n2.3300299861151117e+01\n-5.3801455615486930e+01\n2.6441121667889128e+01\n3.2702701640209199e+01\n-7.6014486257090454e+01\n7.7708764072534064e+00\n2.2365309503147621e+01\n-5.1685617288979650e+01\n1.3756463776183407e+01\n1.4362178491866823e+01\n-3.1951678503345267e+01\n-3.3340782597005131e+01\n2.6676762617968741e+01\n-6.0839472791462342e+01\n-9.6540443509531819e+00\n1.7049070538120532e+01\n-3.9216276103616430e+01\n-9.5866468644234875e+00\n1.6835075236298863e+01\n-3.9258504476359043e+01\n1.2612509644040907e+01\n1.1499179332489318e+01\n-2.4891128123230089e+01\n1.2165131623005736e+01\n1.1294126154999098e+01\n-2.4627439499648037e+01\n1.3197239001635461e+01\n1.4533509576987658e+01\n-3.2650811786293062e+01\n1.6847720659987944e+00\n2.0040098488840282e+01\n-4.6507588588715791e+01\n1.6654692537654709e+00\n2.0068228452357495e+01\n-4.6467376913116716e+01\n1.2852889879133413e+01\n1.4615509105259651e+01\n-3.3058961712340789e+01\n1.2109215918899157e+01\n1.1366862453385963e+01\n-2.4887019692492178e+01\n1.2543057284664497e+01\n1.1418430899044679e+01\n-2.5183541353352066e+01\n1.2201390969024606e+01\n1.1236055126402682e+01\n-2.4835383725970733e+01\n-1.6051002828530120e+01\n1.5329084491571143e+01\n-3.4713222515230278e+01\n2.6033978784594641e+01\n3.1853730889105364e+01\n-7.5405677216107620e+01\n1.9879413868354771e+01\n2.5357787373874270e+01\n-6.0049138677054707e+01\n6.0211643938166732e+00\n2.1469751883163230e+01\n-5.1254824232581832e+01\n1.2460717086201681e+01\n1.1293994531806154e+01\n-2.4995384595063893e+01\n1.2593412849604672e+01\n1.1395811327237881e+01\n-2.5265628461256952e+01\n5.8110815141724625e+00\n2.1468432340567130e+01\n-5.1337538405364619e+01\n1.1522657293618089e+01\n2.1486712810705708e+01\n-5.0947338395827487e+01\n-1.2766946222323929e+01\n1.5857487168247731e+01\n-3.7097534415322457e+01\n2.0344470058025159e+01\n2.5346567908713034e+01\n-6.0642297324560346e+01\n-9.9221573485049686e-01\n1.9015350776732646e+01\n-4.5485227814432399e+01\n-1.2461494198441292e+01\n1.5483930722018055e+01\n-3.6861131514395524e+01\n1.4542983130614699e+01\n1.3977817338764698e+01\n-3.2463293716422477e+01\n-1.6456206129670715e+01\n1.4860837411517249e+01\n-3.4576562060268031e+01\n1.2591143503500064e+01\n1.0433897536840631e+01\n-2.3657854800931467e+01\n-1.6219460959426552e+01\n1.6387402330692488e+01\n-3.9166950042133386e+01\n1.9768803373646801e+01\n2.4953929880145061e+01\n-6.0934774995986075e+01\n-8.8671172874409034e+00\n1.6319231782592624e+01\n-3.9814143433615840e+01\n1.5526118557104164e+01\n2.3373782681770290e+01\n-5.7527373674836056e+01\n1.7352854097363075e+01\n2.4065677194009691e+01\n-5.8908750852658557e+01\n4.9892939095819773e-02\n1.8931995339728157e+01\n-4.6695632864701295e+01\n2.9266821878495029e-02\n1.8847267259765125e+01\n-4.6569216087867360e+01\n-6.5750403712403553e+00\n1.6981401836529255e+01\n-4.1520414277018922e+01\n-5.6648708178860536e+00\n1.7602875046407860e+01\n-4.3563519688532821e+01\n-5.6135495995145028e+00\n1.7341532324686277e+01\n-4.2945357694997490e+01\n1.2144121900870646e+01\n1.0730948685045915e+01\n-2.4910465757444516e+01\n-6.3280231477615745e-01\n1.8542626421073837e+01\n-4.6215851481560847e+01\n-6.3280231477615745e-01\n1.8542626421073837e+01\n-4.6215851481560847e+01\n-9.2151195036844182e+00\n1.6181848634869088e+01\n-4.0204655092947469e+01\n-9.2151195036844182e+00\n1.6181848634869088e+01\n-4.0204655092947469e+01\n-1.4580999067916904e+01\n1.4856796949205583e+01\n-3.6399580836280748e+01\n-1.4444770084503118e+01\n1.4920149187371310e+01\n-3.6581917080801539e+01\n1.2100263589366588e+01\n1.0698411635896397e+01\n-2.5054871679815005e+01\n1.4701789498074973e+01\n2.2612438578495421e+01\n-5.6652891831725896e+01\n1.4669294107211163e+01\n2.2494557293972615e+01\n-5.6424786896425175e+01\n-1.4424711533617089e+01\n1.4729830317798264e+01\n-3.6321357355303078e+01\n-2.8142372792748198e+01\n2.2031363372210635e+01\n-5.4192741728315205e+01\n5.9565149504574844e-01\n1.9074977904047717e+01\n-4.7836041023734033e+01\n1.3359757718726756e+01\n1.0497153499237573e+01\n-2.4673918052997021e+01\n-2.4176906624885284e+01\n1.8978788984450329e+01\n-4.6950840644090995e+01\n1.4155424842689985e+01\n1.3555665439565731e+01\n-3.3029785546123769e+01\n1.4487136594753967e+01\n2.2730228438747023e+01\n-5.7749401690683484e+01\n-2.7026393291960936e+01\n2.1044054882779594e+01\n-5.2516070147162125e+01\n1.2734664331093949e+01\n1.0347889761520513e+01\n-2.4901696701213854e+01\n1.3717600562508382e+01\n9.9191727145605011e+00\n-2.3591920821851460e+01\n-1.6895987943857708e+01\n1.4143088102867306e+01\n-3.5221632716886049e+01\n-1.2867954363582930e+00\n1.7850347837968670e+01\n-4.6242631613527223e+01\n-1.2867954363582930e+00\n1.7850347837968670e+01\n-4.6242631613527223e+01\n1.3683335364437770e+01\n9.5249672000788745e+00\n-2.2832307896058502e+01\n1.3431012089048592e+01\n1.3703164824240867e+01\n-3.4063868249453208e+01\n1.3448056678432229e+01\n1.3782841810678576e+01\n-3.4413830296984067e+01\n-9.2427694010684824e+00\n1.5554781725225467e+01\n-4.0421229448336206e+01\n-7.1816177788423801e+00\n1.6277125476930195e+01\n-4.2350233757215683e+01\n-5.7466583787017864e+00\n1.6498343328802129e+01\n-4.3149672814327246e+01\n-1.2095611194749438e+01\n1.5078905682826067e+01\n-3.8574877644076054e+01\n-1.0674073599828148e+01\n1.5435718485827339e+01\n-3.9860401928459531e+01\n1.2228299972591433e+01\n1.0205929622792970e+01\n-2.4939566958235943e+01\n1.2349990811620332e+01\n1.0214979110612658e+01\n-2.5177081761629026e+01\n1.3141322782710462e+01\n9.9269136318966407e+00\n-2.4466428934194262e+01\n1.3624826285470093e+01\n9.5870670110855976e+00\n-2.3504192295575965e+01\n-1.5589712993491063e+00\n1.7482402130061033e+01\n-4.6659238963847145e+01\n-1.5327303948004714e+00\n1.7691225849824590e+01\n-4.7041434997606075e+01\n8.7153300642081066e-01\n1.9087344238413689e+01\n-5.1268959929673805e+01\n8.7153300642081066e-01\n1.9087344238413689e+01\n-5.1268959929673805e+01\n-2.2281670602329221e+01\n1.7126980200897531e+01\n-4.4501902977794465e+01\n-1.5560753288056839e+01\n1.4176226924828629e+01\n-3.6573378181699240e+01\n-9.0135869679253453e+00\n1.5422397491291777e+01\n-4.1013839234509192e+01\n1.3168132269969620e+01\n1.3692036317078221e+01\n-3.5521586195307769e+01\n1.0466987702520749e+01\n2.0462517745730704e+01\n-5.5397426961356551e+01\n1.1967206844507372e+01\n1.0170047364322455e+01\n-2.5747880230623974e+01\n-1.4172319545374374e+00\n1.7886479170761113e+01\n-4.8721546921170727e+01\n1.2769593301759325e+01\n9.8656520411111952e+00\n-2.4857492617471035e+01\n1.2769593301759325e+01\n9.8656520411111952e+00\n-2.4857492617471035e+01\n1.4332632180981397e+01\n9.7540992777755040e+00\n-2.4354518282332240e+01\n1.3521990689532275e+01\n1.2935905188214653e+01\n-3.3767420580982346e+01\n8.7757297668362639e+00\n2.0163601902377508e+01\n-5.4956144407797801e+01\n8.0663910758966413e+00\n1.9754899260986750e+01\n-5.4191377867589296e+01\n-6.1400435297558218e+00\n1.6021888909544405e+01\n-4.3708754050086860e+01\n1.4355567212417615e+01\n9.0627034881603716e+00\n-2.2592562511630565e+01\n2.6014241075297317e-01\n1.7684616624399187e+01\n-4.8803891009358175e+01\n1.4400316870554869e+01\n8.8161580806668010e+00\n-2.2139172537181601e+01\n6.9999404512989483e-01\n1.7669420329292617e+01\n-4.9117480118182442e+01\n1.4382346042425011e+01\n8.8431112886872842e+00\n-2.2256831359007482e+01\n1.5825299203883024e+01\n2.1433887850828338e+01\n-5.9736384721128609e+01\n1.5349979246356941e+01\n2.1244638809622487e+01\n-5.8831712736002302e+01\n1.4649194272203740e+01\n8.8430939588038857e+00\n-2.2476019769731533e+01\n1.4423997502778281e+01\n8.7504451827258389e+00\n-2.2143617899459102e+01\n1.4042056558774592e+01\n1.2800281643150955e+01\n-3.4516878174402102e+01\n1.2593437948928607e+01\n9.4931529364293663e+00\n-2.4874392863938528e+01\n1.4388168148456222e+01\n8.5520965545808885e+00\n-2.2185614490264619e+01\n9.2084451962571183e+00\n1.9574931578589336e+01\n-5.5809834297610607e+01\n1.3986065737787019e+01\n8.1760641828189300e+00\n-2.0983800046392599e+01\n-7.3644787606166915e+00\n1.5091483959129931e+01\n-4.3545485892244585e+01\n-4.2278786254758405e+00\n1.5889556304759099e+01\n-4.5707625917496372e+01\n1.2596281914519182e+01\n9.7244086769738889e+00\n-2.6244632464135609e+01\n-1.2976698254617856e+01\n1.3846999399110050e+01\n-3.9088879131999271e+01\n1.2147710185025089e+01\n9.6191157802874212e+00\n-2.6188471758823198e+01\n1.2703687978106210e+01\n9.7932332031814404e+00\n-2.6500687765134465e+01\n1.3779526831962956e+01\n9.1318042224542335e+00\n-2.4407442687491635e+01\n1.4446130028581120e+01\n8.2983572655982432e+00\n-2.2225940904617726e+01\n1.3983314386132669e+01\n8.0548549834118575e+00\n-2.1295176228521747e+01\n1.3680813570578771e+01\n9.0344187848201418e+00\n-2.4318917146187598e+01\n1.3680813570578771e+01\n9.0344187848201418e+00\n-2.4318917146187598e+01\n-2.2770227655612494e+01\n1.6152122414421310e+01\n-4.6287675335131141e+01\n-8.7992724723261926e+00\n1.4227367013491248e+01\n-4.1954978006278921e+01\n1.3678502961058255e+01\n9.6100365642735586e+00\n-2.6313143984095372e+01\n-3.8785079339296438e+00\n1.5788538653903263e+01\n-4.6577178614662266e+01\n7.9650000780870620e+00\n1.8897188165839840e+01\n-5.6061030238497516e+01\n1.3332791308175196e+01\n8.5658806441305604e+00\n-2.3322329540435728e+01\n-3.8525997887410992e+00\n1.5714014359649616e+01\n-4.6619246425997481e+01\n-6.1979007888902755e+00\n1.4995615425061809e+01\n-4.4708123917306835e+01\n1.2752335385293375e+01\n9.1908851272836714e+00\n-2.5128113384146427e+01\n1.2667181150873525e+01\n8.9288644893057967e+00\n-2.4841946135785761e+01\n-6.5177771742315924e+00\n1.4968882441451871e+01\n-4.5034318298016608e+01\n-1.1486219412046051e+01\n1.4206542820985263e+01\n-4.2362678557002759e+01\n-1.2189928788422181e+01\n1.3391988603147613e+01\n-3.9866679307720702e+01\n-1.2188633312493810e+01\n1.3486176282895491e+01\n-4.0345056132417142e+01\n-8.9048137093088719e+00\n1.4807242847502607e+01\n-4.4422689350487985e+01\n1.4161341786627215e+01\n7.7244226688734559e+00\n-2.1110435695071747e+01\n1.2726386919103158e+01\n9.3997866172814728e+00\n-2.6908716447153694e+01\n1.2842574817924636e+01\n8.7699909690719675e+00\n-2.4605240646417396e+01\n1.2718351461601422e+01\n1.1941362791947805e+01\n-3.5470966609164741e+01\n1.3164786935751792e+01\n1.1663170103065140e+01\n-3.5037507876724113e+01\n1.3165429411832736e+01\n1.1337378592874026e+01\n-3.3877107672280381e+01\n-1.0990237208725702e+01\n1.3616517812798618e+01\n-4.1506099917867942e+01\n1.3687592039609788e+01\n7.9453854145971166e+00\n-2.2594875036674509e+01\n-3.4257867555978059e+01\n2.0436679717767216e+01\n-6.2698021527056603e+01\n1.6677946636974951e+01\n1.3467530002195113e+01\n-4.1248270542111776e+01\n1.6677946636974951e+01\n1.3467530002195113e+01\n-4.1248270542111776e+01\n-2.2138577630546745e+01\n1.5622712591742713e+01\n-4.8219110400861254e+01\n1.3002754430790562e+01\n1.2373468735140937e+01\n-3.8016976348431001e+01\n1.2006842187836508e+01\n9.1522831821279738e+00\n-2.7546030992203651e+01\n-8.8836150072045381e+00\n1.3859372915844576e+01\n-4.3507958131393210e+01\n-8.9068715413293518e+00\n1.4023089399865576e+01\n-4.4412508404726900e+01\n9.4773947671771219e-01\n1.6609169811432665e+01\n-5.2905150766007715e+01\n-9.6382822421962064e+00\n1.3457679610790814e+01\n-4.2845556016727841e+01\n1.1974289621629469e+01\n8.8929726145746937e+00\n-2.6943304799695134e+01\n-1.2485976684606936e+01\n1.2989464711212330e+01\n-4.0919951367727251e+01\n-1.2328454502939481e+01\n1.2690158350845865e+01\n-4.0144079556908764e+01\n-1.2608927684193166e+01\n1.3355309695263342e+01\n-4.2399605845011905e+01\n-8.9658191612089517e+00\n1.3640351594736805e+01\n-4.3767965784276683e+01\n1.3122875547181671e+01\n1.0871076786350104e+01\n-3.4005350567452801e+01\n-1.6253211251775610e+01\n1.2184263480129953e+01\n-3.8397737535496788e+01\n1.1790772611404215e+01\n8.9469291050320425e+00\n-2.7300492776784552e+01\n1.2407934982905136e+01\n8.5684756982154759e+00\n-2.6336500634606068e+01\n-1.6247371198352226e+01\n1.2495111227485467e+01\n-3.9582176896206434e+01\n-3.5484309513748666e+00\n1.4764139030596056e+01\n-4.8368750388581127e+01\n1.2198270255483042e+01\n8.4165087517100972e+00\n-2.5924936165731484e+01\n-1.4872343082323120e+01\n1.2250863021367683e+01\n-3.9172956958926299e+01\n-1.6003896708657127e+01\n1.2046071559340279e+01\n-3.8653858063154537e+01\n-1.5986829417987257e+01\n1.2027580729007791e+01\n-3.8608792794242291e+01\n-1.5119287088925736e+01\n1.2298140209125819e+01\n-3.9724094101454064e+01\n-1.4819590557861153e+01\n1.2092518751618007e+01\n-3.9535185164477653e+01\n1.3482609549808087e+01\n1.0405053281540596e+01\n-3.3620491859150462e+01\n1.4692444339882835e+01\n7.4790415714583647e+00\n-2.2661222601150268e+01\n1.4161117074579980e+01\n7.1325689695056509e+00\n-2.2206857500863435e+01\n1.2472936626384024e+01\n8.3955518342588142e+00\n-2.6940055582200735e+01\n1.3995631197251027e+01\n1.0213962326861250e+01\n-3.3575596082246612e+01\n-5.1216326582041010e+00\n1.3913689393667035e+01\n-4.7175273735126474e+01\n-1.6203147647848425e+01\n1.1935107592421096e+01\n-4.0103871281549516e+01\n-4.0420170938676732e+00\n1.4323316127076410e+01\n-4.8577145601962933e+01\n1.3384301975420286e+01\n1.0734955916818670e+01\n-3.5711564599600962e+01\n1.3519114442138688e+01\n1.0270908992884333e+01\n-3.3539787365770593e+01\n1.3763564992412864e+01\n1.0091201084077547e+01\n-3.3227335718494423e+01\n-1.1598433700678489e+01\n1.1032252557732820e+01\n-3.7755356288297975e+01\n-1.2206005104353583e+01\n1.1517880510342225e+01\n-3.9349757354235201e+01\n1.3714961635998240e+01\n9.9180083669544157e+00\n-3.3190666775208356e+01\n-6.7927191060764658e+00\n1.3307882199032786e+01\n-4.5960940958940320e+01\n-6.8473143550505275e+00\n1.3512504193914426e+01\n-4.6501748632710758e+01\n-3.1536529600612944e+01\n1.6973273795492325e+01\n-5.7614634788124675e+01\n-5.4133514413449975e+00\n1.3760076740542017e+01\n-4.7889267034393043e+01\n1.3031946477442438e-01\n1.5022169595166348e+01\n-5.2379540663152405e+01\n1.3705148579503446e+01\n7.1838446432845338e+00\n-2.3402020346644793e+01\n-2.1168212706511154e-02\n1.5221967746546012e+01\n-5.3874021070668327e+01\n-1.7065529548909364e+01\n1.1619136576740530e+01\n-4.0545035046572771e+01\n1.2738361830943132e+01\n7.7297994333106770e+00\n-2.5874194873990312e+01\n1.3059957101983668e+01\n7.8010091484546189e+00\n-2.6020881262072674e+01\n1.3031794944948739e+01\n7.7855501739446664e+00\n-2.6026251277027047e+01\n-1.2145450535344908e+01\n1.2025674369790176e+01\n-4.2330867978947346e+01\n-9.0349864701499616e+00\n1.2483969760168453e+01\n-4.4772890268131476e+01\n-1.1899555956640201e+01\n1.2347129205329450e+01\n-4.3394034585837645e+01\n7.1516483957077535e+00\n1.4571495015917201e+01\n-5.2224531007050246e+01\n-1.3183670180932426e+01\n1.2168000257469039e+01\n-4.3082535758578921e+01\n7.2620558247599531e-01\n1.4530941259399352e+01\n-5.2505597994256391e+01\n1.3829328513848013e+01\n7.0431387327644162e+00\n-2.3584184627295986e+01\n1.2713381401770091e+01\n7.4632066942861011e+00\n-2.5380973039525799e+01\n1.3354154077105385e+01\n7.0374829215183849e+00\n-2.3875378962956233e+01\n1.4803242488520066e+01\n7.3570618892105495e+00\n-2.4272616908328914e+01\n1.3857258633796226e+01\n6.8488485056207562e+00\n-2.3164267563679005e+01\n1.5170946281511148e+01\n9.3313636744716870e+00\n-3.2739241363103197e+01\n1.2570812466576063e+01\n7.9321298188040874e+00\n-2.7184670276483367e+01\n1.4233100761082033e+01\n7.1998580515125328e+00\n-2.3915996304883560e+01\n1.3518144203379400e+01\n7.0801162503877055e+00\n-2.4155595747609222e+01\n1.2786367197280486e+01\n8.1036926753558056e+00\n-2.7853956720384641e+01\n-5.1847851718314857e+00\n1.3160114598729903e+01\n-4.8954032063658595e+01\n1.1556583328798542e+00\n1.3775618839469999e+01\n-5.1808275014482795e+01\n-1.0856804839393345e+01\n1.1781591379786001e+01\n-4.3803412388318762e+01\n1.2115576519215217e+01\n7.8967426108953402e+00\n-2.7526677710170201e+01\n1.3074379835304669e+01\n7.1936603563139574e+00\n-2.5504381903215052e+01\n-1.5403136813774974e+01\n1.1057421537523242e+01\n-4.0821761282183964e+01\n1.4665430778368533e+01\n6.9155027069482893e+00\n-2.3545384072423609e+01\n1.4281068737253600e+01\n6.6877016138975574e+00\n-2.3272805938411292e+01\n1.2727521613701194e+01\n7.4214546535269887e+00\n-2.6365242955889247e+01\n1.4067124674359910e+01\n6.5320620355577246e+00\n-2.2796742145901987e+01\n1.4067124674359910e+01\n6.5320620355577246e+00\n-2.2796742145901987e+01\n1.2113200645095501e+01\n8.0650223168097561e+00\n-2.9021650958025376e+01\n1.3838810349395118e+01\n6.4404274083162747e+00\n-2.2772961208249679e+01\n-1.4629745335747623e+01\n1.1176455572732101e+01\n-4.1779942572200625e+01\n1.2482341353900356e+01\n7.3691473184990297e+00\n-2.6247829888124102e+01\n-1.4168852461405605e+01\n1.0710649511257211e+01\n-4.0677631855652209e+01\n-1.0564883306555041e+01\n1.1818511323594850e+01\n-4.4996552818083003e+01\n-8.2760426417983961e+00\n1.1874612325374919e+01\n-4.5499120071353488e+01\n-5.5145922578816577e+00\n1.2977118767248577e+01\n-4.9454974515285855e+01\n1.3658746538658503e+01\n6.7985530960242508e+00\n-2.4324079619238152e+01\n1.3727912423828977e+01\n6.8121489431085465e+00\n-2.4417214371750074e+01\n-1.4522562151089250e+01\n1.0946928524830627e+01\n-4.1612694480142011e+01\n1.2141529566028106e+01\n7.6935921197281516e+00\n-2.8454038657331143e+01\n-1.5957214392318832e+01\n1.0740376287438481e+01\n-4.1294081588883834e+01\n-1.7538910240401119e+01\n1.0844783385080181e+01\n-4.1135804206931773e+01\n-1.2790613921225397e+01\n1.1052071721166476e+01\n-4.2912937826042814e+01\n1.4417424841783268e+01\n6.2864468766493324e+00\n-2.2679716108775608e+01\n1.3677457953951540e+01\n6.9700113872862000e+00\n-2.5708986177342570e+01\n1.3961315987509423e+01\n7.1777903033813839e+00\n-2.6027312280477965e+01\n-7.0899772698013130e+00\n1.2047934242027459e+01\n-4.7944945967580857e+01\n2.5498967693100987e+00\n1.2369758510746628e+01\n-4.9275483550081539e+01\n1.2774816313876089e+01\n7.0030113297338970e+00\n-2.6216401539281861e+01\n1.2213749435798189e+01\n7.2178276742831269e+00\n-2.7253308232335872e+01\n-6.5044020875128536e+00\n1.1806714881184728e+01\n-4.7780484703344769e+01\n-1.7589227923198546e+01\n1.0132340349341661e+01\n-4.0792058364190346e+01\n1.3010266826842626e+01\n1.2322349573044118e+01\n-4.9777714794662607e+01\n1.2454861759762982e+01\n9.6365656016381251e+00\n-3.8509270745091854e+01\n1.2157438037048621e+01\n7.0311633473644415e+00\n-2.7551929255745801e+01\n1.3209110474250316e+01\n6.8925825366613207e+00\n-2.6750361368938961e+01\n-1.2179957364277254e+01\n1.0739983566933839e+01\n-4.4410816856749200e+01\n-1.4296019728195681e+01\n1.0377590725860175e+01\n-4.2975705650197881e+01\n2.9127659097536367e+00\n1.1368009201062250e+01\n-4.7839400676859270e+01\n1.4618278665619693e+01\n6.4626375734411949e+00\n-2.5223019611347453e+01\n1.3986638626493198e+01\n6.2047793236482347e+00\n-2.4011217238689355e+01\n1.5065252017020287e+01\n6.0127912764982616e+00\n-2.2544575545925269e+01\n1.7441577145558814e+01\n7.3353194029915834e+00\n-2.9480659300395605e+01\n1.3975954041904378e+01\n1.0147925719097968e+01\n-4.1825214726948516e+01\n1.4451239545732737e+01\n1.0211482348508854e+01\n-4.2854585345335430e+01\n-1.4533082673672350e+01\n8.8240326889262892e+00\n-3.7085583499055581e+01\n-7.7250298485038504e+00\n1.1137666373067331e+01\n-4.7630204815647616e+01\n-1.4146481927395723e+01\n8.5730766354993424e+00\n-3.6489989460007287e+01\n1.4035794847527205e+01\n5.9982541476524869e+00\n-2.3914052558380174e+01\n1.4090262518681968e+01\n6.0700420391992953e+00\n-2.4224045379258378e+01\n-1.3729765395336440e+01\n9.2142681842064853e+00\n-3.9827498875997257e+01\n1.3811868426973300e+01\n5.7820126997997292e+00\n-2.3449556473554718e+01\n1.0170991597049170e+01\n1.1853628420436142e+01\n-5.1632753753802220e+01\n-1.2335708745441130e+01\n9.3835926318764411e+00\n-4.0965830603999770e+01\n1.3644087522817941e+01\n8.9510243525519524e+00\n-3.8272467666658535e+01\n-1.7178482177470258e+01\n9.5915874937136056e+00\n-4.0867493677475849e+01\n1.2963755527812365e+01\n6.4595491778491851e+00\n-2.6711150116237377e+01\n-1.6223257725586233e+01\n9.5117880458417030e+00\n-4.1137596432272666e+01\n1.2406644209945098e+01\n6.8335224303371120e+00\n-2.8988973899562502e+01\n1.2613526538066465e+01\n6.8954406697321025e+00\n-2.9063306500585838e+01\n1.2499224773027146e+01\n6.7998280554029558e+00\n-2.8771182553484401e+01\n1.2870254750892503e+01\n6.3125055626935094e+00\n-2.6536932403579787e+01\n1.2912181264163101e+01\n6.3195086265378073e+00\n-2.6503959643143673e+01\n1.2103180645372982e+01\n6.6850344641077264e+00\n-2.8704263217744263e+01\n1.4716658844772587e+01\n6.0575233298202837e+00\n-2.5330679654642452e+01\n2.6091259705234577e+00\n1.0013790316825201e+01\n-4.5800566428550582e+01\n1.4324205289483732e+01\n6.5030996136054524e+00\n-2.8173570213203124e+01\n-6.2491314475377377e+00\n1.0087457206347660e+01\n-4.6060889600785849e+01\n1.4675812186561160e+01\n5.6928128536606089e+00\n-2.3714582999705012e+01\n-5.6478401788225021e+00\n9.7429185141499186e+00\n-4.5305161750107949e+01\n1.3789946129853295e+01\n5.5032180676360625e+00\n-2.3994599917010635e+01\n1.4895797462675564e+01\n5.2779505332801415e+00\n-2.2608037782541157e+01\n1.4300729117527231e+01\n5.0638953117972223e+00\n-2.1949282601295206e+01\n1.3368014856479210e+01\n6.0752602470200676e+00\n-2.6894843235721446e+01\n1.4948195095991462e+01\n5.2134381985521765e+00\n-2.2540367226282520e+01\n1.2737526588425162e+01\n6.1270460294460012e+00\n-2.7699498146605862e+01\n-1.4625000648967290e+00\n9.4137412468227417e+00\n-4.5115834220311001e+01\n1.4049221518137491e+01\n5.5475974548197104e+00\n-2.4551284693413169e+01\n9.7156903270628199e+00\n9.3898260807381373e+00\n-4.5042413237382597e+01\n-1.7230051466908265e+01\n8.7425112620707743e+00\n-4.1025487898811392e+01\n1.4085906624603656e+01\n5.4350408090519684e+00\n-2.4493683949015601e+01\n-7.1040232697637096e-01\n9.3551975936666718e+00\n-4.5344938259087449e+01\n-1.6581373616631566e+01\n8.6886845071018417e+00\n-4.1056555441439421e+01\n-1.9251454136265302e+00\n9.1881774160956393e+00\n-4.4849208641925102e+01\n1.3307286182546081e+00\n9.1220378313103954e+00\n-4.4465218843143099e+01\n1.4221992193488044e+01\n6.6801007122062215e+00\n-3.1429043490344043e+01\n-7.6915134688000331e+00\n9.4359035891820042e+00\n-4.5843654837341326e+01\n1.4899148174630488e+01\n7.9996224598692054e+00\n-3.8730360988328854e+01\n1.2466687050139505e+01\n5.8643135119722656e+00\n-2.7081619975272755e+01\n9.9918849776864960e+00\n8.7226642458782990e+00\n-4.2374088358718318e+01\n1.2975813310245661e+01\n5.9196012662243698e+00\n-2.8085313300364472e+01\n-1.4992795376583112e+00\n8.8616034612315211e+00\n-4.4716964443750356e+01\n1.5003705308042194e+01\n4.8542913349083854e+00\n-2.2598240110793945e+01\n-1.3767488331700434e+01\n8.8232393520606784e+00\n-4.4365724832996868e+01\n-2.4221429334191713e+00\n8.3855921227861092e+00\n-4.3742970118822662e+01\n-1.6969633331407274e+00\n8.5477050800559073e+00\n-4.4396223000152020e+01\n-3.5349649521766496e-01\n8.4729815506887487e+00\n-4.4085478032955642e+01\n-7.6267885121235024e-01\n8.5036557177007044e+00\n-4.4296962694365206e+01\n1.4423774952410106e+01\n4.9263866072314579e+00\n-2.3582163153702162e+01\n1.4661768487739499e+01\n7.5273132888748844e+00\n-3.8836964066923954e+01\n1.3279066244392123e+01\n5.4267223930692614e+00\n-2.7101089161068018e+01\n1.3761227981293979e+01\n5.1707937957775156e+00\n-2.5359741514540708e+01\n1.3851710365519720e+01\n5.1750078498506173e+00\n-2.5448932206590293e+01\n1.3641866456693588e+01\n5.1703567226714675e+00\n-2.5755940679605548e+01\n1.3643201933994430e+01\n5.1811178930618969e+00\n-2.5756589201479887e+01\n-1.1392894448675577e+01\n8.2650082954757700e+00\n-4.3180439742873794e+01\n-1.5971709989347922e+01\n8.3821635577583979e+00\n-4.3867716470114999e+01\n1.2603564632478129e+01\n5.8322696010730661e+00\n-3.0304124316501017e+01\n-4.3350497024616419e-01\n7.9225710700444205e+00\n-4.3317256645310152e+01\n1.2316033616574710e+01\n5.4061794557729277e+00\n-2.7963366519656667e+01\n1.2889156095695895e+01\n5.5161795148308999e+00\n-2.8570196942476890e+01\n-1.0873497105884167e+00\n7.8369310970993142e+00\n-4.3439707141570416e+01\n-1.0624370604677999e+01\n7.5491122592420679e+00\n-4.2799373736670297e+01\n1.4924106079471271e+01\n5.8528684869477763e+00\n-3.2172656243158563e+01\n-1.5788923044458072e+00\n7.4581879507569067e+00\n-4.2551968944837277e+01\n1.3574627735720416e+01\n4.8506696027712284e+00\n-2.6803822293748961e+01\n-5.2154360675708444e+00\n7.1495998270092098e+00\n-4.2176079511654230e+01\n1.5564496573459452e+01\n4.5249816853459155e+00\n-2.3923941782021519e+01\n1.3893471488845194e+01\n4.5086257577546718e+00\n-2.5268056034389105e+01\n-7.6577097488495971e-01\n7.1292072510149254e+00\n-4.2202075001774666e+01\n1.4470940157220015e+01\n4.5966861725632926e+00\n-2.6221900792937856e+01\n-9.5457881088413488e-01\n6.8812413874221878e+00\n-4.1599000172277975e+01\n1.0019278615219023e+00\n4.2341902347782625e+00\n-2.4289642146228474e+01\n1.5823599451541803e+00\n3.9717363153387759e+00\n-2.3746794844381789e+01\n-1.4102988278324581e+01\n6.7462261199353080e+00\n-4.2232462971487536e+01\n1.3040025903353785e+01\n4.6918763499066971e+00\n-2.8641593241597445e+01\n1.3020579948582599e+01\n4.5695405122342798e+00\n-2.8247172789811277e+01\n1.2659920703342427e+01\n4.8409075876212251e+00\n-2.9829936706229965e+01\n-8.4263936977750475e-02\n3.8397358168058777e+00\n-2.3802934062266552e+01\n1.2803053714463525e+01\n4.5403366518990005e+00\n-2.8869653396237069e+01\n1.3618094290214250e+01\n4.1786941443671513e+00\n-2.6585257803805860e+01\n1.3721337120932299e+01\n4.2579959221207337e+00\n-2.6882931079042173e+01\n1.2818758184204453e+01\n4.5256219922580101e+00\n-2.9119034677197522e+01\n1.6442651178875963e+01\n4.6231312523186272e+00\n-2.9615694011033444e+01\n-9.8306127691384724e+00\n5.9815249225386502e+00\n-4.0340533629224844e+01\n1.4812224770289424e+01\n3.7871582076404136e+00\n-2.3719635851386460e+01\n1.3132020661386340e+01\n4.2622919855069190e+00\n-2.7823001226806788e+01\n1.2445160080125586e+01\n4.8207588865698092e+00\n-3.1634158200959504e+01\n1.3113640849363293e+01\n4.2858489048844044e+00\n-2.8153680115453874e+01\n-3.1458899663176076e+00\n6.1492682941166583e+00\n-4.1265245902752113e+01\n1.3869489737809431e+01\n3.9714462460584468e+00\n-2.6123209063103705e+01\n1.3858494657335942e+01\n3.9047571125144001e+00\n-2.6171344739455645e+01\n1.3998442014547029e+01\n3.9660052382253279e+00\n-2.6614103664952985e+01\n1.5141405037065068e+01\n3.5142091784978322e+00\n-2.3140020164314638e+01\n1.5863525471555620e+01\n4.3889905755279397e+00\n-3.0102521498144085e+01\n1.3818650039701460e+01\n3.8919739162074336e+00\n-2.6417273745620207e+01\n1.4296402654327126e+01\n3.9258238882588801e+00\n-2.6334706893902315e+01\n1.3901808232050128e+01\n3.8162326472245742e+00\n-2.6184705034415508e+01\n1.3901808232050128e+01\n3.8162326472245742e+00\n-2.6184705034415508e+01\n1.6980468793217980e+01\n4.2261608848157790e+00\n-2.9349934054463425e+01\n1.7539559169707548e+01\n4.3737805980648785e+00\n-3.0194298993508063e+01\n1.4420194770829736e+01\n3.4175130113354975e+00\n-2.3313877583336147e+01\n1.4420194770829736e+01\n3.4175130113354975e+00\n-2.3313877583336147e+01\n1.4979266312531989e+01\n3.3350218801779592e+00\n-2.2952493693522428e+01\n1.8451802919420743e+01\n4.2319934852788306e+00\n-2.9585875561857595e+01\n1.5123658064290167e+01\n3.5848774717416281e+00\n-2.4504847977339608e+01\n-1.6257248328185592e+00\n3.9335136602603233e+00\n-2.8515779899849424e+01\n1.2941045625956376e+01\n3.8349796371158842e+00\n-2.7677381984937607e+01\n1.3902182837932470e+01\n3.6525830113826032e+00\n-2.6352219894300589e+01\n1.5111956693483894e+01\n3.4951925426493387e+00\n-2.4575493157293476e+01\n-6.3875798292740678e+00\n5.0578391917057735e+00\n-3.9243924577292610e+01\n1.4878749927816752e+01\n3.3291565246061374e+00\n-2.3855967950912568e+01\n1.3563601776240485e+01\n3.6416571155150632e+00\n-2.7144335246067712e+01\n-1.8382873921615208e+00\n3.7343403415970688e+00\n-2.8194454492616778e+01\n1.4673436285287213e+01\n3.3382225766128855e+00\n-2.3940524223748788e+01\n1.3613650883943603e+01\n3.6929073200942675e+00\n-2.7436789888520011e+01\n1.3613650883943603e+01\n3.6929073200942675e+00\n-2.7436789888520011e+01\n1.8463134231433285e+00\n3.0608970709877608e+00\n-2.2252038502405433e+01\n1.4152634134158312e+01\n3.4249432357118312e+00\n-2.5318879575280167e+01\n1.4046960374543300e+01\n3.4988622380014234e+00\n-2.5967940183239229e+01\n1.4957258414416314e+01\n3.2592821739045905e+00\n-2.3780699981002204e+01\n1.4973589158074168e+01\n3.4227134263673578e+00\n-2.4886286862048525e+01\n1.4560139197700048e+01\n3.3125691660398489e+00\n-2.4366035302744759e+01\n1.4826241501415513e+01\n3.2578101979950866e+00\n-2.4088557460279663e+01\n1.4714402760271824e+01\n3.2737009488719839e+00\n-2.3941124813463432e+01\n1.4202196046225728e+01\n3.3514235684525584e+00\n-2.5236761590464340e+01\n-2.1557433616852840e+01\n5.1101839805236997e+00\n-3.9023561462274344e+01\n1.4483001553917020e+01\n3.4781021757438348e+00\n-2.6300822254138595e+01\n1.4483001553917020e+01\n3.4781021757438348e+00\n-2.6300822254138595e+01\n1.2584622328069365e+01\n4.2868614904555100e+00\n-3.3427395621876798e+01\n1.4660335235800090e+01\n3.1416029310947073e+00\n-2.3776472062437250e+01\n1.4379973273655546e+01\n3.2869977956082459e+00\n-2.5189567402934106e+01\n-2.1213328378953737e+00\n3.5126565655582827e+00\n-2.7841843897154142e+01\n1.3656188754001420e+01\n3.4505019129538872e+00\n-2.7216317778862905e+01\n1.4593924917899633e+01\n3.1078587787947352e+00\n-2.3963233968820816e+01\n1.8413048050135927e+01\n3.7535999147558492e+00\n-2.9535203308894769e+01\n1.3014479033918317e+01\n3.5236210469838354e+00\n-2.9184549782490226e+01\n1.4602904433379821e+01\n3.0359604371643676e+00\n-2.4025700420910770e+01\n1.4451764684011524e+01\n3.2646792641151365e+00\n-2.6020791564594013e+01\n1.4221700039032788e+01\n3.1501068760976887e+00\n-2.5693390412432539e+01\n1.7452171174707050e+01\n3.7023730643172028e+00\n-3.0431735438028475e+01\n1.4071252902607707e+01\n3.1556509419751380e+00\n-2.5865355791390112e+01\n1.4151111996194210e+01\n3.1841536121162561e+00\n-2.5984060614598398e+01\n-7.5142418357837286e+00\n4.3828812744366790e+00\n-3.8123934867842920e+01\n1.4449422059905320e+01\n3.0189875620625846e+00\n-2.4757006850035090e+01\n1.4713198781894272e+01\n2.9870068418394515e+00\n-2.4414033369475089e+01\n1.4659248996357055e+01\n3.2027448223237109e+00\n-2.6273833981172949e+01\n-2.7824334537935465e+00\n3.4729130130810066e+00\n-2.8301702037189091e+01\n1.7891796118445981e+01\n3.5395676840649992e+00\n-2.9617916633804366e+01\n1.3476851819279824e+01\n3.3026476621220553e+00\n-2.8573824467821126e+01\n1.4359476597607772e+01\n2.8513321997318100e+00\n-2.4275197125234037e+01\n1.4459887579360762e+01\n2.8917235533562264e+00\n-2.4554869088767465e+01\n1.7803691904590153e+01\n3.4564018475414695e+00\n-2.9509677810625231e+01\n1.4336956047989787e+01\n2.9323572596881595e+00\n-2.5276672485213393e+01\n1.4488430868718378e+01\n2.9660411256728416e+00\n-2.5525565402941869e+01\n1.4790275239407753e+01\n2.8646107488753807e+00\n-2.4037887964116337e+01\n1.4790275239407753e+01\n2.8646107488753807e+00\n-2.4037887964116337e+01\n-1.2297811369079472e+01\n3.6564367074503048e+00\n-3.3912492192980899e+01\n-2.6821116673964052e+00\n3.1534491486326095e+00\n-2.7678334748440221e+01\n1.3312242433511816e+01\n3.1875166558942598e+00\n-2.8441820581640819e+01\n1.4235656342296281e+01\n4.9226104387221934e+00\n-4.4827091999054552e+01\n1.3363704022771216e+01\n3.1529520697254463e+00\n-2.8378547500591846e+01\n1.5656851027189330e+01\n2.7846048012589164e+00\n-2.3816858469848633e+01\n1.4278543854722272e+01\n2.8176158337531607e+00\n-2.5538647077417338e+01\n-8.0094532533757672e+00\n3.8700410552373428e+00\n-3.7058308027768078e+01\n1.3564699508546436e+01\n3.1941920187868016e+00\n-2.9009151290382910e+01\n-3.4407292860320271e-01\n2.5275241648778239e+00\n-2.2103499580292414e+01\n1.3184165014609835e+01\n3.1578438573753509e+00\n-3.0275957954238191e+01\n1.4773843941331869e+01\n2.6042640522229590e+00\n-2.4070560086525383e+01\n1.4724543402826317e+01\n2.6409353894604530e+00\n-2.4567245425570100e+01\n1.3586755305306012e+01\n2.9348050098766696e+00\n-2.8382942645844224e+01\n1.4803942933370587e+01\n2.5204423870319297e+00\n-2.4123075576784505e+01\n1.5214329162180936e+01\n2.7104380170129776e+00\n-2.4847876368413075e+01\n7.2846813038861868e-01\n2.3126946932036261e+00\n-2.1265078742375685e+01\n1.9138811912216898e+01\n3.0984107369853460e+00\n-2.9159626090231455e+01\n1.3605555124100267e+01\n2.8593841905205881e+00\n-2.8253219419523887e+01\n1.4461288452081861e+01\n2.5749780203352328e+00\n-2.5106658057207017e+01\n1.3444380867133168e+01\n2.8585590870562738e+00\n-2.8562634125066069e+01\n1.4797726629345183e+01\n2.4964229565220961e+00\n-2.4828869846564565e+01\n1.3056131545715893e+01\n3.0246839205469049e+00\n-3.1792922258771242e+01\n-2.0140988513378186e+00\n2.5163312133636642e+00\n-2.5582626054247356e+01\n1.4657106839060379e+01\n2.4214647154755564e+00\n-2.4608099989668361e+01\n-1.1680738423769704e+01\n3.1365295357760901e+00\n-3.4306271092900204e+01\n1.3005242845355337e+01\n3.1535914143921469e+00\n-3.4363993744168802e+01\n1.4947987379040352e+01\n2.2721012638901881e+00\n-2.3513473052966230e+01\n-2.0422187734693602e+00\n2.3618965662921121e+00\n-2.5201455940953089e+01\n1.4178624698602116e+01\n2.4136515576713462e+00\n-2.6319597083641163e+01\n1.4689145003220366e+01\n2.4836659568935060e+00\n-2.6294737297966133e+01\n1.4649919331704346e+01\n2.2507176771232631e+00\n-2.4843113711771238e+01\n1.5257093925090807e+01\n2.4456714011316003e+00\n-2.5708092609108395e+01\n3.0602857442740148e+00\n1.9559668353363682e+00\n-2.1253940283983539e+01\n1.2670615635086500e+01\n2.7205955678523130e+00\n-3.2749981946847534e+01\n1.3816199197613805e+01\n2.4490788935706034e+00\n-2.8803592195851813e+01\n1.4391796619416995e+01\n2.2591946753299523e+00\n-2.6670761687173428e+01\n1.4849246318840976e+01\n1.9278089005251400e+00\n-2.3378089047815177e+01\n1.4024700365729183e+01\n2.2148993156372776e+00\n-2.7398755675333753e+01\n1.4202606862962885e+01\n2.1811432149482384e+00\n-2.6783206396644697e+01\n1.9450506121181554e+01\n2.4155654986619677e+00\n-2.9011093555129559e+01\n-3.0410959071259156e+00\n2.1010912148705478e+00\n-2.5856428868203508e+01\n2.2686592569624575e+00\n1.7699479382973737e+00\n-2.0746023316963864e+01\n1.4472248980291516e+01\n2.1122642954574764e+00\n-2.5884792633430660e+01\n1.4422857185563389e+01\n2.0784521598987498e+00\n-2.5824572870935466e+01\n-1.5450924060155331e+00\n1.9072327518074668e+00\n-2.3161469754241416e+01\n1.7210436433240606e+01\n2.3184835202902656e+00\n-2.9107008427799300e+01\n1.5487625457478282e+01\n1.8824819590034123e+00\n-2.3377208861941451e+01\n1.0986072887542999e+00\n1.7189278443416538e+00\n-2.0755800342241301e+01\n1.4312041082602770e+01\n2.0696549049267410e+00\n-2.7202804700485423e+01\n1.4769761506155936e+00\n1.7560300341020010e+00\n-2.1583165173290904e+01\n2.2170718041960278e+00\n1.6222914752726734e+00\n-2.0694612302110862e+01\n1.3927113541156190e+01\n2.0187839123290625e+00\n-2.8026474499980509e+01\n-7.8522500260198500e+00\n2.5642926945547262e+00\n-3.5478067089286199e+01\n-1.2045467799255693e+01\n2.2571301060855919e+00\n-3.2681996481943116e+01\n1.4700012517293390e+01\n1.8141842397516923e+00\n-2.4755606770200856e+01\n-1.0200171539538103e+00\n1.7313059950952689e+00\n-2.2105901976024494e+01\n1.4530897746733238e+00\n1.5296549481168440e+00\n-2.0620092767559264e+01\n1.4447596345004441e+00\n1.5392785853757676e+00\n-2.0601943419317998e+01\n2.3829234008707564e-01\n1.5349910664076014e+00\n-2.0974287952387350e+01\n3.7525782959098670e+00\n1.5143097690369702e+00\n-2.1349836689371685e+01\n1.2987697653901506e+01\n2.2882204473726815e+00\n-3.5467209420271523e+01\n-9.9308222155053301e+00\n2.2359648833583976e+00\n-3.4763945270693256e+01\n1.4446015566448228e+01\n1.6322150464975858e+00\n-2.5343421591116400e+01\n2.6558423538336617e+00\n1.4268519037772767e+00\n-2.0853479544591462e+01\n1.5575519561816217e+01\n2.5037170181347035e+00\n-4.0021354771891367e+01\n2.5389801804182821e+00\n1.4642404400872076e+00\n-2.1786301274251407e+01\n1.5056630756093323e+01\n2.4025254501118427e+00\n-4.1214839476045441e+01\n1.3977827349523478e+01\n1.5893479726871982e+00\n-2.8396675147890178e+01\n1.6454711712919522e+01\n1.7679633969224517e+00\n-3.0510474914242753e+01\n7.1123293129395799e+00\n1.4977862478215167e+00\n-2.5806481574223213e+01\n1.5114096375923420e+01\n1.6174116095968338e+00\n-2.7517033759769873e+01\n1.4229476963367183e+01\n1.5525636080347220e+00\n-2.7567436632332839e+01\n1.4248137209950889e+01\n1.5179188639698162e+00\n-2.7401946341694273e+01\n1.5798479774064440e+01\n2.3682581016306825e+00\n-4.2813565099111315e+01\n1.2654877004409091e+01\n1.8061818251842128e+00\n-3.4229832963021387e+01\n1.4033333228281272e+01\n1.5409205572874289e+00\n-2.8478375964601174e+01\n1.4511836371773216e+01\n1.5017302641976740e+00\n-2.7266037147942622e+01\n-3.6922182107366903e+00\n1.4175233025455685e+00\n-2.5197979807287670e+01\n1.4373812681190351e+01\n1.4765578225415765e+00\n-2.7464346208501134e+01\n1.5242930783078664e+01\n1.3277200178608046e+00\n-2.3480397623099918e+01\n-8.1504753371921645e-01\n1.2798278329408457e+00\n-2.1652591537537369e+01\n-1.2920403563277672e+01\n1.8473135724901772e+00\n-3.4986824747618606e+01\n1.5772353748310822e+01\n1.5721091917927912e+00\n-3.0593520310844415e+01\n1.4519299495676243e+01\n1.4277020828163434e+00\n-2.7652345878348473e+01\n1.4305941194756414e+01\n1.3432284980217211e+00\n-2.7054713830542610e+01\n1.4988866565366472e+01\n1.2405842523250381e+00\n-2.4355306226308358e+01\n1.5385002619171766e+01\n1.1965725186217351e+00\n-2.3248986153425896e+01\n1.4259502678809580e+01\n1.3195270891789943e+00\n-2.7585467426970464e+01\n1.4326233014374873e+01\n1.2952497917355492e+00\n-2.6851606514611884e+01\n1.5317087408957235e+01\n2.0115927865111551e+00\n-4.1151445483615596e+01\n1.4559702559591649e+01\n1.2612473996494118e+00\n-2.6205477406242448e+01\n1.5818237322799131e+01\n1.2952006306293165e+00\n-2.4271551643072190e+01\n1.4033518389262388e+01\n1.3121403667870666e+00\n-2.8459547699020163e+01\n1.4372324009370395e+01\n1.2829420976489092e+00\n-2.7129333729970945e+01\n1.5005820508129581e+01\n1.1923403277873266e+00\n-2.4383284920665062e+01\n1.5005820508129581e+01\n1.1923403277873266e+00\n-2.4383284920665062e+01\n1.4454309005538111e+01\n1.1587914506421131e+00\n-2.6459229424978911e+01\n1.7422682493917815e+01\n1.3471071396277232e+00\n-2.9876045563141357e+01\n-3.3043265278117486e+00\n1.1320907596088794e+00\n-2.4660020663024053e+01\n1.3907681258036508e+01\n1.1637269289578491e+00\n-2.8331565168391691e+01\n1.4008566693180526e+01\n1.1663837322325337e+00\n-2.8578099070942226e+01\n1.4320572101019884e+01\n1.1710723850389102e+00\n-2.7408162434612137e+01\n1.5377899267686308e+01\n1.0390683238274565e+00\n-2.3426493278603512e+01\n1.4182794223499078e+01\n1.4723332847049793e+00\n-3.4539984824317123e+01\n-8.3633541257290034e+00\n1.3783410449402997e+00\n-3.4045833926194256e+01\n1.9008465675222641e-01\n9.6645021156224387e-01\n-2.0783195775378086e+01\n1.6292222198619193e+01\n1.1995698714193845e+00\n-3.0028247823144913e+01\n-8.9921843427129389e+00\n1.3379562600893440e+00\n-3.4007891506245990e+01\n1.6158056814508811e+01\n1.1899601497645691e+00\n-3.0242543996735215e+01\n-9.5454226536238433e+00\n1.2872867489252113e+00\n-3.4040536450222248e+01\n1.4555591612325943e+01\n9.6250796005106998e-01\n-2.6436852092021034e+01\n1.4452732547136412e+01\n9.6087656815995115e-01\n-2.6393145691558267e+01\n-8.8667019991763674e+00\n1.2505124267789263e+00\n-3.3118028362477666e+01\n1.0678891360908114e+00\n9.2061463053841641e-01\n-2.0460485552429414e+01\n1.7871249149194021e+01\n1.1708904366499961e+00\n-2.9715872096113685e+01\n1.4052830990919668e+01\n9.7003775691817851e-01\n-2.9421249158111635e+01\n-9.0074232216162819e+00\n1.1475482007333839e+00\n-3.3956690891400079e+01\n-9.0097866392238668e+00\n1.2086523576197636e+00\n-3.3734350990277271e+01\n1.6242318229610287e+01\n1.5505965258505663e+00\n-4.1630319491879689e+01\n1.4673637954379050e+01\n1.0581996622585714e+00\n-2.8987098082105579e+01\n1.4821629594313961e+01\n9.2957843374398463e-01\n-2.7101362045882421e+01\n1.5592829383471100e+01\n7.4838021097678176e-01\n-2.4072477588636254e+01\n-1.9000059091293664e+00\n8.3352188914510683e-01\n-2.3005558162697064e+01\n1.4336875191498226e+01\n8.7187539842372563e-01\n-2.8185296619284593e+01\n-2.0153240821929828e+00\n7.7260869161310308e-01\n-2.3112177831988397e+01\n-8.1574535166462034e+00\n9.7675726576625188e-01\n-3.3451029341004293e+01\n-8.3887083152224484e+00\n9.4525842576682650e-01\n-3.3817975386600168e+01\n-9.1142137312765517e+00\n8.8576671330252843e-01\n-3.3627684731718475e+01\n1.5686613725629414e+01\n8.1963230120045960e-01\n-2.4076864551143835e+01\n1.5296900068952851e+01\n6.9928946183681751e-01\n-2.3784117836600629e+01\n1.3946439296250919e+01\n9.1772762813055042e-01\n-3.1968504848390253e+01\n1.5273256619675907e+01\n6.8664045428842935e-01\n-2.3873206388989750e+01\n1.5479397850012436e+01\n7.5025160497713961e-01\n-2.5326058911898688e+01\n-2.1440155610782448e+00\n6.7938831621959195e-01\n-2.2995641698529756e+01\n1.4335218025367329e+01\n6.7098590645016365e-01\n-2.8222760877477423e+01\n1.4905401187251810e+01\n7.7130948805184640e-01\n-2.9337096984525370e+01\n1.5650044253616798e+01\n6.3692353135464119e-01\n-2.3851233093687537e+01\n2.0586632437628984e+00\n6.1240923745392772e-01\n-2.0373413871467683e+01\n1.3367971764361961e+01\n6.6743646713431248e-01\n-3.2092194593625990e+01\n5.9191222808676596e+00\n5.8549132845295604e-01\n-2.3360083291676919e+01\n1.4374144038074117e+01\n5.7585555554793610e-01\n-2.7098390372685301e+01\n-1.1345366647345546e+01\n6.1656391629908536e-01\n-3.2979108184096205e+01\n1.4277461410880175e+01\n5.0486603599113644e-01\n-2.8454197022484948e+01\n1.0489539188319461e+00\n5.1040406196784849e-01\n-2.0399794529820106e+01\n1.4483118829938478e+01\n5.3521926805778330e-01\n-2.8285970352046203e+01\n-3.6742575923227188e+00\n5.2006536346085752e-01\n-2.4059591112882142e+01\n-9.6861683199990196e+00\n5.9260984009583173e-01\n-3.3199873365610308e+01\n-2.4297722792537062e+00\n4.8513827313690383e-01\n-2.2899315324450217e+01\n1.4353529857390782e+01\n3.3592853234435066e-01\n-2.8464451386325610e+01\n4.0982146435574371e+00\n4.8790955619995030e-01\n-2.1804430369469017e+01\n1.4472126666431926e+01\n3.4810512180388514e-01\n-2.8652354182871935e+01\n-9.5707099361409735e+00\n3.8684973043571175e-01\n-3.2960632038336755e+01\n-1.5857734036566626e+00\n3.7620994413646430e-01\n-2.2282029364169087e+01\n-1.5683929158075063e+00\n3.6465032101035622e-01\n-2.2213521832480570e+01\n1.5596908972867643e+01\n3.0065663662914699e-01\n-2.4207456559025566e+01\n4.6441127653826969e-01\n2.8579827000822533e-01\n-2.0532975928336327e+01\n1.4367650596890112e+01\n2.4800926248860741e-01\n-3.1379910209038393e+01\n-2.1517211257619828e+00\n2.6334157090456500e-01\n-2.2584852736599053e+01\n3.3124438679686756e+00\n1.9671732640859385e-01\n-2.0705943357750375e+01\n1.4512343872019001e+01\n8.1201387451301718e-02\n-2.7714531486376437e+01\n1.1535239033620692e+00\n2.3211672448851073e-01\n-2.0343034104712672e+01\n1.4620329131798906e+01\n1.0865582225125614e-01\n-2.7487830404723560e+01\n1.4634383134419837e+01\n6.1668160811305293e-02\n-2.7920262178251342e+01\n1.4498264638925962e+01\n8.7828534711720738e-02\n-2.9138337844045331e+01\n1.4560998464494192e+01\n8.7669322943878775e-02\n-2.9249898977376116e+01\n1.4696990134051783e+01\n2.1710956076940451e-02\n-2.7139026783064200e+01\n1.5497359978529964e+01\n5.2241490933238592e-02\n-2.3812316786960977e+01\n1.5883191377104856e+01\n1.1921562930595730e-01\n-2.4701662330576529e+01\n1.5466644892960723e+01\n1.2834798812865604e-02\n-2.3929876598035623e+01\n1.5916754412958573e+01\n9.9688165397593342e-02\n-2.4640901930692419e+01\n1.4471901789682688e+01\n-8.3634243425319624e-02\n-2.9665393897061936e+01\n-1.7630485909722446e+00\n6.0772734809270319e-02\n-2.2165414802402342e+01\n1.5015876479333592e+01\n-6.5763236457553387e-02\n-2.5906341799137547e+01\n1.5027214975089080e+01\n-7.7210843547888916e-02\n-2.5872316648208578e+01\n-6.4893934467078527e+00\n-3.6048592451595474e-02\n-3.2230447950325427e+01\n-6.4627481073051332e+00\n-2.7313986894275690e-02\n-3.2024443366462663e+01\n5.0687929054729464e-01\n8.1770133318769866e-02\n-2.0556207460142051e+01\n7.5161305595797936e+00\n-1.8994624387397983e-02\n-2.4157334770304523e+01\n1.4426567866639394e+01\n-2.3785810743431696e-01\n-2.8157811989428378e+01\n-1.0924696921245825e+01\n-1.6342070484974316e-01\n-2.9421150773271918e+01\n-1.0020521714852130e+01\n-1.3203443561161313e-01\n-3.2166126013286338e+01\n1.5191950046427422e+01\n-1.5212899344570688e-01\n-2.3988639111014699e+01\n1.5661838639997498e+00\n-1.3872485587407540e-04\n-2.0384149005858006e+01\n1.4744644777223172e+01\n-1.8549131529690777e-01\n-2.9748263598440921e+01\n1.4725904455349864e+01\n-2.8653029881153591e-01\n-2.7324388213703838e+01\n1.4995398143030817e+01\n-2.5328202780740200e-01\n-2.6325220389132724e+01\n-5.7123382594574201e-01\n-8.4155286384539160e-02\n-2.1109661721961018e+01\n-1.0670795016409073e+01\n-2.7596157129390342e-01\n-2.9167793262081187e+01\n-3.6876642465853182e+00\n-1.2613362506971834e-01\n-2.3237613542127271e+01\n-1.2896761283682783e+00\n-7.3474387739970587e-02\n-2.2232603489125324e+01\n-9.1426609148171529e+00\n-4.6565159803279360e-01\n-3.1842878094231253e+01\n1.5729964236000335e+01\n-4.2568428011040865e-01\n-2.3923993925653690e+01\n1.4634152362109083e+01\n-5.2836634731029053e-01\n-2.7997846655911349e+01\n-3.4962650659890060e+00\n-2.6719686001192766e-01\n-2.3034835636678704e+01\n-1.1309272518483702e+01\n-5.2673191657020613e-01\n-3.1665725446198390e+01\n-9.0448159222098887e+00\n-6.0171914208034316e-01\n-3.1706609360610830e+01\n-1.0627766720008246e+01\n-6.1956686713616782e-01\n-3.1583476028681435e+01\n-4.8760290371987752e-01\n-3.1965920694714206e-01\n-2.1073796772238577e+01\n-1.1492024505246137e+00\n-3.3478251753081473e-01\n-2.1665121518400895e+01\n1.4639811789196509e+01\n-6.8663307810273400e-01\n-2.9319171953532130e+01\n1.4620332480594330e+01\n-6.5981782247849730e-01\n-2.8262579425380046e+01\n-1.6000738246527128e+01\n-6.1593660174544540e-01\n-3.1466925158747006e+01\n-9.9971637622065863e+00\n-7.1674633304227087e-01\n-3.1444929383276325e+01\n-3.1569160445811657e+00\n-3.9734197788129066e-01\n-2.2857645925083212e+01\n-2.1203915142839307e+00\n-3.9390214060496892e-01\n-2.1979396164848591e+01\n1.4961955662434072e+01\n-6.2613488843028853e-01\n-2.6451754501662951e+01\n1.5050161669210764e+01\n-6.0613521222231737e-01\n-2.6618153086568643e+01\n4.3277667821990171e+00\n-3.8071519905567641e-01\n-2.1319366796390160e+01\n1.5231145621955662e+01\n-5.9664944311030110e-01\n-2.5716067671791734e+01\n-1.7756471959303685e-01\n-4.2714308802782569e-01\n-2.0883866101822139e+01\n1.8174135733154809e+01\n-7.5196157481845893e-01\n-2.9630394874596771e+01\n-1.0098087071333635e+01\n-7.9472836457859353e-01\n-3.1304348444536419e+01\n1.0668632826229807e+00\n-4.4793764586654217e-01\n-2.0396003503410476e+01\n1.5779131262528530e+01\n-7.4547152455243915e-01\n-2.4014421112094222e+01\n-8.9205735675973443e+00\n-7.9211047625631970e-01\n-2.9835068035696565e+01\n-8.9205735675973443e+00\n-7.9211047625631970e-01\n-2.9835068035696565e+01\n6.2435864360851658e+00\n-5.7861144380348106e-01\n-2.3083176668800039e+01\n1.4661444070939663e+01\n-8.7507161178726633e-01\n-2.8940021385012045e+01\n1.7248643848094083e+01\n-8.6921787506068260e-01\n-2.9961712543373952e+01\n4.6960449965609925e+00\n-4.9439736882672469e-01\n-2.3210629147240333e+01\n1.5317254382716646e+01\n-8.0156145282560776e-01\n-2.6765449997240946e+01\n-1.0293601551941105e+01\n-8.6413493293061017e-01\n-3.1378306403330313e+01\n1.5727615966456701e+01\n-7.9802872531037616e-01\n-2.4281298858416509e+01\n1.1068620056364811e+00\n-4.6787753325459402e-01\n-2.0430465847956125e+01\n1.4761691956463702e+01\n-1.0394438233711236e+00\n-2.9006314337463241e+01\n1.5769033327621198e+01\n-8.8674249785098236e-01\n-2.4724022855032132e+01\n-3.8278241166730167e+00\n-7.6784327411017450e-01\n-2.3908515495566427e+01\n5.0887334951573910e+00\n-7.2142389675922558e-01\n-2.1807682239492618e+01\n1.6107069195836822e+01\n-1.0025617655480508e+00\n-2.4039480578239491e+01\n-1.4249897742461473e-01\n-7.8943900118273924e-01\n-2.1019063385588630e+01\n-9.8534075418631897e+00\n-1.2725741083182753e+00\n-3.0779832658773557e+01\n1.4635735260694689e+01\n-1.4558086485348474e+00\n-2.9350259483469465e+01\n1.4707638613909163e+01\n-1.3988010259865256e+00\n-2.8598333743640804e+01\n-7.8776307808269808e+00\n-1.2938738187510161e+00\n-3.0486421405951017e+01\n1.4773524711579636e+01\n-1.3839295625554082e+00\n-2.8417273125995312e+01\n1.2003145941750182e+00\n-8.3126974125461794e-01\n-2.0463328457929741e+01\n2.0664398557611365e+00\n-8.0616562702468531e-01\n-2.0464454088431026e+01\n3.3379342999317410e+00\n-8.7132312622185937e-01\n-2.2248577765800800e+01\n-9.8106372950455825e+00\n-1.4286820548824979e+00\n-3.0513259338416162e+01\n-1.0898333438550070e+01\n-1.4850081941670794e+00\n-3.0628552220212914e+01\n-1.1065794441791860e+01\n-1.4557143057457824e+00\n-3.0660775909807146e+01\n1.7433983822330884e+01\n-1.5373642356651165e+00\n-3.0328761225698422e+01\n1.6519959792517560e+00\n-9.6525574295353611e-01\n-2.0450157341640871e+01\n-9.2058970126743436e+00\n-1.4648889000096752e+00\n-3.0369411398173384e+01\n4.2132335280750938e-01\n-9.5865814925487591e-01\n-2.0789348435935985e+01\n6.4557831351292174e+00\n-1.1379399974455191e+00\n-2.2234584468164712e+01\n1.4722965774965273e+01\n-1.6660480673192666e+00\n-2.8773234224517687e+01\n-9.6987481909427551e+00\n-1.5043503306138237e+00\n-2.8577864349907379e+01\n3.2980379861156801e+00\n-1.0228059277086443e+00\n-2.0861157291805615e+01\n1.5179091539205041e+01\n-1.5984359210512604e+00\n-2.7837245314463448e+01\n6.3949061548541968e+00\n-1.1971265023012756e+00\n-2.2116854396927405e+01\n4.5611685656201360e+00\n-1.0749223208219840e+00\n-2.1516190993938103e+01\n5.1352541138590819e+00\n-1.1560393413934418e+00\n-2.3258297528078067e+01\n1.6600609052012725e+00\n-1.1421977619312571e+00\n-2.0514066964462220e+01\n4.1102582479107550e+00\n-1.1757563496414134e+00\n-2.1038928428913849e+01\n6.4052576883471115e+00\n-1.2559819804611809e+00\n-2.2161923721731366e+01\n3.6090288445585834e+00\n-1.1520424795715321e+00\n-2.2426052191863075e+01\n1.5399894786378026e+01\n-1.7540496193197315e+00\n-2.6464947030166591e+01\n-9.1560197336557125e-01\n-1.2397466482318176e+00\n-2.0909989400613334e+01\n-7.3258035412244960e-01\n-1.3078700992877317e+00\n-2.0700336308685184e+01\n1.1658298237576117e+00\n-1.3325563315138163e+00\n-2.1401735195291618e+01\n-6.9520143421860929e+00\n-2.1304120711182835e+00\n-2.9588472382073551e+01\n-2.2650935690089624e+00\n-1.4838382888915902e+00\n-2.1365647861520607e+01\n-2.8738140044334437e+00\n-1.5280750320564278e+00\n-2.1296107805066665e+01\n3.3746418266192375e+00\n-1.5429958747572368e+00\n-2.0532249003771717e+01\n1.5022736263394188e+01\n-2.5160911668375521e+00\n-2.9258011583684148e+01\n3.7314941224090790e+00\n-1.6358604533953729e+00\n-2.2050825284664683e+01\n1.6201067716054613e+01\n-2.2110647699296884e+00\n-2.4473445490326860e+01\n1.2214886030211189e+00\n-1.6604466081974500e+00\n-2.0133854216127475e+01\n1.1664468003242001e+00\n-1.7048448592987917e+00\n-2.0155785322840071e+01\n1.5914819072824267e+01\n-2.3828058044508920e+00\n-2.5692829841652141e+01\n-2.1550393175743401e+00\n-1.7648654572791480e+00\n-2.1207302144799662e+01\n2.0385094192802025e+00\n-1.7452758984302290e+00\n-2.1265997031947158e+01\n1.5646044563271879e+01\n-2.5963991066693524e+00\n-2.7446101612455774e+01\n1.5327658459154346e+01\n-2.6869256097023815e+00\n-2.8625904872473200e+01\n-1.5344175892092402e+00\n-1.8315337075113447e+00\n-2.1140978657393230e+01\n-2.7460529925807937e+00\n-1.9526516197054204e+00\n-2.2093543207114266e+01\n5.7719538044109040e+00\n-1.9889740019492748e+00\n-2.1406436845044411e+01\n1.5936495831469548e+01\n-2.6193622866499005e+00\n-2.6620543219439483e+01\n7.7920350091192275e-02\n-1.8851454199339250e+00\n-2.0544014097918176e+01\n-7.2804187624443728e-01\n-1.9049337276245921e+00\n-2.0779268665095032e+01\n1.7113538453406640e+01\n-3.0684587182512923e+00\n-3.1105591115575677e+01\n1.9488277210772310e+01\n-2.8780300222054547e+00\n-2.9370711829112619e+01\n1.9488277210772310e+01\n-2.8780300222054547e+00\n-2.9370711829112619e+01\n1.8824207050653445e+01\n-3.0862214631314138e+00\n-2.9815767361112474e+01\n1.7678383780149282e+01\n-3.2170870125788600e+00\n-3.0557809165873095e+01\n1.6005832066272308e+01\n-2.7925907530385929e+00\n-2.6646956363574937e+01\n1.6005832066272308e+01\n-2.7925907530385929e+00\n-2.6646956363574937e+01\n-1.5098335875319056e+00\n-2.0921453464492146e+00\n-2.0711339338995220e+01\n1.5464182157473667e+01\n-3.0362052320811972e+00\n-2.7607443554512166e+01\n1.5772290959694141e+01\n-3.0176243879516531e+00\n-2.6888875097896879e+01\n-7.2327346607741622e-03\n-2.1207663651892457e+00\n-2.0624444445591767e+01\n1.5278790901729201e+01\n-3.0388490118853171e+00\n-2.7160758093995060e+01\n1.0282626184311214e+00\n-2.1643867282628451e+00\n-2.0255148009278724e+01\n2.7504639505274957e+00\n-2.1655019522113852e+00\n-2.0393863201758066e+01\n1.5697898160737038e+01\n-3.2026463835678278e+00\n-2.7767493287046801e+01\n1.5630231076204835e+01\n-3.2143968696456215e+00\n-2.7690769879286041e+01\n1.5697916991039031e+01\n-3.1876404740802475e+00\n-2.7804000818249204e+01\n4.0343184511655000e-01\n-2.2055785284618330e+00\n-2.0376906627058162e+01\n1.9022352150636145e+01\n-3.4340780480401287e+00\n-2.9830721258841429e+01\n-1.9941074302573536e+00\n-2.3536679024604936e+00\n-2.1461537898792063e+01\n2.8089748537622303e+00\n-2.2845515763833322e+00\n-2.0474994694465188e+01\n-8.9672213361629662e+00\n-2.9764167755053803e+00\n-2.6600823704511217e+01\n4.7102835657617010e+00\n-2.3576734051488084e+00\n-2.0557027796573475e+01\n1.5912433940188800e+01\n-3.1199283089031771e+00\n-2.5020612989538488e+01\n4.6889770158727746e+00\n-2.4018520204069609e+00\n-2.0349011488357196e+01\n4.7180297533057018e+00\n-2.4050232248215093e+00\n-2.0507708805826301e+01\n-1.8029940646988154e+00\n-2.5013058009878351e+00\n-2.1378768780416305e+01\n1.8147420839032357e+01\n-3.7372156806221022e+00\n-3.0369104026722617e+01\n-1.9600758125730628e+00\n-2.5472053197068254e+00\n-2.1661050582812852e+01\n-1.2953483414035527e+00\n-2.4331366967668879e+00\n-2.0531000557058835e+01\n4.4892425553145587e+00\n-2.4679305203446900e+00\n-2.0433226360312318e+01\n5.1661151143877317e+00\n-2.5335692542894970e+00\n-2.0540599012405398e+01\n-1.6607525552685415e-01\n-2.4682359097090800e+00\n-2.0216984894202582e+01\n4.5954750238582722e+00\n-2.5586868131948597e+00\n-2.0563844757583475e+01\n1.6596183273361710e+01\n-3.6558565482118044e+00\n-2.8224795766190990e+01\n1.6039559257415924e+01\n-3.5673646833899912e+00\n-2.7694024842005916e+01\n1.6033793078895261e+01\n-3.5757709412153100e+00\n-2.7754471541848837e+01\n4.8180123326869817e-01\n-2.5080984973659386e+00\n-2.0123487514751091e+01\n1.5775426117556785e+01\n-3.6198813192529857e+00\n-2.6678773205951369e+01\n1.6359925062478602e+01\n-3.5763725037976264e+00\n-2.5308421807811175e+01\n1.2706529678085394e+00\n-2.5958043109612174e+00\n-2.0014576306416654e+01\n3.5319065460784769e+00\n-2.6329242523766090e+00\n-2.0145964880117976e+01\n1.1828975834626339e+00\n-2.6121157252544118e+00\n-2.0779826073117665e+01\n3.2738930364282548e+00\n-2.5987136381055409e+00\n-1.9975900947946670e+01\n1.6420220523739175e+01\n-3.6619677610373835e+00\n-2.5185846257928031e+01\n3.6319830652280101e+00\n-2.6572627425515569e+00\n-2.0192105441816757e+01\n-1.2726714331345776e-01\n-2.6611746153755100e+00\n-2.0612504942281934e+01\n-5.3787861041009055e-01\n-2.7573841959180316e+00\n-2.0312645299634958e+01\n6.9049898946443555e-01\n-2.6982352654140889e+00\n-1.9776411977225035e+01\n3.6409497991505479e-01\n-2.6512027479848821e+00\n-1.9891386604329291e+01\n1.3621346705275683e+00\n-2.7227235812164685e+00\n-1.9850404350305023e+01\n1.2590969827733869e+00\n-2.6670181857919943e+00\n-1.9814981210352720e+01\n5.9351511097842180e-01\n-2.8557419350098616e+00\n-2.0538991090993271e+01\n-9.0074415245578514e+00\n-3.9901009606491353e+00\n-2.7111783021358381e+01\n2.1843848040306306e+00\n-3.0095511039928065e+00\n-2.0736472562619841e+01\n1.5693500784364491e+00\n-3.0109880996079927e+00\n-2.0673580121838498e+01\n2.1308720231788270e+00\n-2.9928066430543265e+00\n-1.9858632157438482e+01\n2.6789208863132612e+00\n-3.0922853293881993e+00\n-1.9949561155635237e+01\n-7.0181319577000922e-01\n-3.2434936673784791e+00\n-2.0843840069587255e+01\n-3.7862451119482582e-01\n-3.1836839629578533e+00\n-2.0738658537131226e+01\n1.9428746074474768e+00\n-3.1460010922798300e+00\n-1.9973896740400374e+01\n1.6208937071442708e+01\n-4.2895868511341835e+00\n-2.5377323399805167e+01\n1.6125993491920747e+00\n-3.1634406823741075e+00\n-2.0546472914096736e+01\n-2.1579716518502301e+00\n-3.6351436044020886e+00\n-2.2737059618582368e+01\n-2.8217003540093581e+00\n-3.7910359283986250e+00\n-2.3615848077073593e+01\n-4.1497478238100965e-01\n-3.3882928286195870e+00\n-2.0896271419037259e+01\n1.6126841947418374e+01\n-5.2110956384112157e+00\n-2.8893015083620654e+01\n-2.1068312528113206e-01\n-4.1301664459024465e+00\n-2.1512980282777335e+01\n-6.3842783167072019e+00\n-4.8504690482273363e+00\n-2.4885909973530065e+01\n1.1502205295069999e+01\n-5.1767798549657753e+00\n-2.5434591950619495e+01\n5.1287783497084005e+00\n-4.5715330740862230e+00\n-2.2686993442759007e+01\n5.1113665009611609e+00\n-4.5593680877009781e+00\n-2.2645247699104491e+01\n4.1881345721771677e+00\n-4.7102436913462151e+00\n-2.3623207525549891e+01\n3.8099281522132631e+00\n-4.5699305366602454e+00\n-2.1966016490945123e+01\n1.7341221444132998e+01\n-6.1756167275298646e+00\n-2.8598813730406018e+01\n9.5847736523218323e+00\n-5.6245129566166074e+00\n-2.4957001008046493e+01\n9.4975650906559181e+00\n-5.7551468132048242e+00\n-2.5128083937013631e+01\n2.1788729755698690e+00\n-4.8491016946923162e+00\n-2.1465449706721131e+01\n2.2881557420091929e+00\n-4.9512136594720726e+00\n-2.1696495321756949e+01\n2.6107511727073152e+00\n-5.1408598482380805e+00\n-2.2050261035570283e+01\n5.6284548685528701e+00\n-5.4757212292608557e+00\n-2.2595074343494105e+01\n2.6986038044441072e+00\n-5.3510972909660328e+00\n-2.2180138928022693e+01\n1.5023939970033528e+01\n-6.6042232154326088e+00\n-2.6938503034462187e+01\n8.7571134791461613e-01\n-5.2195841472826094e+00\n-2.1533908121590898e+01\n1.4210895647644165e+01\n-6.7497223526991545e+00\n-2.6395849222642035e+01\n1.8765571562526951e+01\n-7.4013538716465668e+00\n-2.8397309637931535e+01\n1.4067333219997053e+01\n-6.8460628229914828e+00\n-2.6216986482636703e+01\n1.3201411793806747e+01\n-6.4376487379376757e+00\n-2.4689447117316764e+01\n8.4802056618634474e+00\n-6.3837861539120384e+00\n-2.3973008333254324e+01\n1.5785156388666428e+01\n-7.1578614263100002e+00\n-2.6799009809140486e+01\n1.6318520225898833e+01\n-7.2338170895496683e+00\n-2.7022558197879984e+01\n1.4460385421554827e+01\n-7.0433549414330736e+00\n-2.6228065521380969e+01\n1.3247228796313038e+01\n-6.9162239579030782e+00\n-2.5635245614228349e+01\n-7.2880392196415125e+00\n-6.0484114053963118e+00\n-2.2522798957347103e+01\n1.5190051069180248e+01\n-7.3182130130256553e+00\n-2.6332836844999857e+01\n-7.5626214942004211e+00\n-6.4836818936815366e+00\n-2.3768930705947962e+01\n1.3773995807438938e+01\n-7.1925301470676821e+00\n-2.5712225609931949e+01\n4.9527521003463066e+00\n-6.3975713635964251e+00\n-2.2870612575968774e+01\n-7.4252138132747891e-01\n-6.2032069071023797e+00\n-2.2273075168909564e+01\n1.3614852157396124e+01\n-7.3044590128000193e+00\n-2.5526626469714209e+01\n8.2962238527603756e+00\n-6.8715511087150558e+00\n-2.3336062829773692e+01\n-2.5087335525206100e-01\n-6.4294902528200915e+00\n-2.2336476174498188e+01\n1.3037153603782798e+01\n-7.4160400503075499e+00\n-2.5142244045663585e+01\n1.7365833079217623e+00\n-6.4140688126367031e+00\n-2.1773760175201623e+01\n2.1640903003392569e+00\n-6.8106245370088851e+00\n-2.2193843556480971e+01\n-4.0353089302054883e+00\n-6.9589987851473092e+00\n-2.3000360721560998e+01\n1.1417821783491048e+01\n-7.4977902485605812e+00\n-2.4193555895245279e+01\n1.0553159530357341e+01\n-7.2195802476653155e+00\n-2.3143602347580590e+01\n1.7138351899272664e+01\n-8.3502687541763905e+00\n-2.6623201072729469e+01\n1.0726095474286867e+01\n-7.2759113511290900e+00\n-2.3079657711634749e+01\n1.4715234240232698e+01\n-8.0337459406491440e+00\n-2.5461433281149301e+01\n6.7984344004972872e+00\n-7.3430027275792007e+00\n-2.2695858567610347e+01\n6.6450635521057002e+00\n-7.1959627370517509e+00\n-2.2340641897200882e+01\n-3.7971224837453312e+00\n-7.2805258897572527e+00\n-2.2414544347583607e+01\n-5.3091853413590346e+00\n-7.3124639878688287e+00\n-2.2595156594811094e+01\n-3.9780748816497260e+00\n-7.3017192892651277e+00\n-2.2599633802564544e+01\n-2.9257872158275009e+00\n-7.4858357847731609e+00\n-2.2343100003498154e+01\n-2.5428579540147114e+00\n-7.2656321981033036e+00\n-2.1576278881120299e+01\n8.9768528308816098e+00\n-7.7746097617262038e+00\n-2.2067504832043628e+01\n1.2919807317604299e+01\n-8.5129022465241757e+00\n-2.4125725519281854e+01\n1.5194583324264633e+01\n-8.8694754984294484e+00\n-2.5094553761833595e+01\n1.2490901084461425e+01\n-8.4742171950909544e+00\n-2.3744124014018624e+01\n7.9901279076862197e+00\n-7.6918832483100257e+00\n-2.1698964024679761e+01\n1.6658577941949982e+01\n-9.1880950832319783e+00\n-2.5625567142066458e+01\n-2.4163478000442371e+00\n-7.6767827889318907e+00\n-2.1688780601800893e+01\n1.3455841083507615e+01\n-8.7425747148475885e+00\n-2.4162164947632210e+01\n1.3455841083507615e+01\n-8.7425747148475885e+00\n-2.4162164947632210e+01\n-4.5263259298682597e+00\n-7.8403325155871437e+00\n-2.1824904777567287e+01\n-1.4810449395766758e+00\n-7.6523013784507388e+00\n-2.1291978824417953e+01\n-3.1827306952168031e+00\n-7.6185983907170334e+00\n-2.0735946538823026e+01\n8.3818079892726907e+00\n-8.1390947262072260e+00\n-2.1635074417836577e+01\n1.3832484834357199e+01\n-9.1228029829776371e+00\n-2.4071559479136013e+01\n-5.4581121073066816e+00\n-7.4261198019963253e+00\n-1.9744623820846904e+01\n-2.2852134567255131e+00\n-7.9992797913386067e+00\n-2.1472193833560667e+01\n-5.7107021923573900e+00\n-8.1330674820682365e+00\n-2.1585931350268421e+01\n-4.8342427161803476e+00\n-7.6740961670440626e+00\n-2.0369846384933481e+01\n-1.7988986553442137e+00\n-7.8731443879587362e+00\n-2.0855170100255361e+01\n6.1475159774919552e+00\n-8.2652120260877080e+00\n-2.1374763037683724e+01\n-2.4720749061991145e+00\n-8.2493404412124249e+00\n-2.1323333944736451e+01\n2.2645568733009769e-01\n-8.1217002290140865e+00\n-2.0806315388651875e+01\n1.3243713898806446e+01\n-9.2935900498766717e+00\n-2.3582522828934376e+01\n2.6910381849177467e-01\n-8.1175600760292657e+00\n-2.0853682971151571e+01\n9.2700629137718273e+00\n-8.4613150817468714e+00\n-2.1342398156763299e+01\n6.8570386528402039e-01\n-8.3316123263140636e+00\n-2.1182174768452299e+01\n1.6639091654889826e+00\n-8.1680875719190222e+00\n-2.0710157096840373e+01\n-1.0160141956837467e+00\n-8.3899802308915046e+00\n-2.1169902705585550e+01\n1.9084487941861390e+00\n-8.2541803049707685e+00\n-2.0683459409766940e+01\n2.8586558074825996e+00\n-8.2649226933310000e+00\n-2.0828697586584966e+01\n1.0762552977848660e+01\n-9.0421820131078565e+00\n-2.2520935121710266e+01\n2.4038035053974582e-01\n-8.1366351955870364e+00\n-2.0484822304631159e+01\n1.5666592322095938e+00\n-8.2501449079579192e+00\n-2.0711309118142648e+01\n-7.9117839429445946e-01\n-8.1368981413850623e+00\n-2.0426984203644725e+01\n-8.1995099330699961e-01\n-8.3451869746294545e+00\n-2.1083701569202766e+01\n3.4029543445083932e+00\n-8.4645334121305371e+00\n-2.1032106749848325e+01\n3.4317454964909087e+00\n-8.5275755912505549e+00\n-2.1063051285887934e+01\n1.2475337186900584e+01\n-9.3514352902968554e+00\n-2.3096117304970399e+01\n2.4861744064402056e+00\n-8.2615511305217968e+00\n-2.0753347562090546e+01\n7.5257551097344078e-01\n-8.2817876445553686e+00\n-2.0587852866186118e+01\n2.4103801920138350e+00\n-8.3256238299499916e+00\n-2.0615898660049208e+01\n2.2973374720241408e+00\n-8.5725573116313694e+00\n-2.1011078286354021e+01\n1.5144531710604278e-01\n-8.5597932412283111e+00\n-2.0970892587693790e+01\n1.3513975446767523e+01\n-9.6569707042786064e+00\n-2.3445650250131528e+01\n-1.3407244318853186e+00\n-8.2287542080249150e+00\n-2.0240673381883315e+01\n-1.3407244318853186e+00\n-8.2287542080249150e+00\n-2.0240673381883315e+01\n8.2286389510347870e+00\n-8.8689278742577073e+00\n-2.1531613911683454e+01\n1.1052775192486633e+01\n-9.3339740832216709e+00\n-2.2411422692091953e+01\n8.5286079847051397e+00\n-9.0090179971336770e+00\n-2.1495500438095764e+01\n1.3155776987826568e+01\n-9.7346854411098445e+00\n-2.3177672023081524e+01\n1.3155776987826568e+01\n-9.7346854411098445e+00\n-2.3177672023081524e+01\n-1.4496885667530834e+00\n-8.3401056873651989e+00\n-2.0001664396152869e+01\n-1.4967711929609779e+00\n-8.5980144341380864e+00\n-2.0907401365894419e+01\n-1.2210588247516101e+00\n-8.5960964034303711e+00\n-2.0737855166167023e+01\n-1.1842501274723440e+00\n-8.3536670572172564e+00\n-2.0033515988261229e+01\n1.1469710810403965e+01\n-9.4973702176083705e+00\n-2.2305500371882999e+01\n6.5642489715722823e+00\n-8.8168919098373397e+00\n-2.0799915800362324e+01\n1.2843740955378301e+01\n-9.7595720952385285e+00\n-2.2986507201287903e+01\n8.9454900489853006e-01\n-8.4956981827423856e+00\n-2.0207833879645289e+01\n-1.2416007763573578e+00\n-8.6336829203123244e+00\n-2.0681635939053272e+01\n1.5035671814528484e+01\n2.5384347308333513e+01\n-5.4860999567429964e+01\n-1.4995647393007008e+01\n1.6502650629534855e+01\n-3.4777046163355621e+01\n3.1765231819745177e+00\n2.1732165479654110e+01\n-4.7299916212037338e+01\n3.1452920733363490e+00\n2.1673614348616482e+01\n-4.7158169595292755e+01\n1.6893709752575813e+01\n2.5346704177487887e+01\n-5.5092191372399959e+01\n2.7370694417686718e+00\n2.1352817203930879e+01\n-4.6397283067902777e+01\n-1.2386304040873421e+01\n1.6486078488167205e+01\n-3.5358487111494256e+01\n1.0899589827140385e+01\n2.3606331951103630e+01\n-5.1799491562649735e+01\n1.9589916814740498e+00\n2.1060573071848466e+01\n-4.6203100584801355e+01\n-4.7468280766367414e+01\n3.8092395093147559e+01\n-8.3981457962639368e+01\n4.8821905867817894e-01\n2.0920986725680311e+01\n-4.6628526871117778e+01\n1.3226202123738080e+01\n1.4795296772596298e+01\n-3.1542924570135895e+01\n1.5277975980033069e+01\n2.4611536566365015e+01\n-5.4656280909225686e+01\n-9.7279624004567857e+00\n1.7467217965096928e+01\n-3.8614417956520263e+01\n2.0447122257885720e+01\n2.6158454422166699e+01\n-5.8220723740847113e+01\n5.7517024079907229e+00\n2.1770866676008879e+01\n-4.8755722705823935e+01\n1.9187690162611414e+01\n2.5853560012083452e+01\n-5.8181993701598500e+01\n1.3185057412225742e+01\n1.4616762847210081e+01\n-3.1756757207827178e+01\n-1.0495233357717904e+00\n1.9857878318782507e+01\n-4.4758080224558263e+01\n-1.0596466741711619e+00\n1.9777775023618503e+01\n-4.4582963192341076e+01\n-1.3479570460333337e+00\n1.9761962963153227e+01\n-4.4383296165813903e+01\n1.7576645252278801e+01\n2.4970272415026230e+01\n-5.6434186155681978e+01\n2.5918833132328587e+01\n3.2676998362736128e+01\n-7.4010663926147970e+01\n-1.0329233264813428e+01\n1.7022823430165321e+01\n-3.8079161253298118e+01\n1.3947167625682203e+01\n1.4774006849230069e+01\n-3.2619719102385474e+01\n1.7342733331881707e+01\n2.4833016991912849e+01\n-5.6716328308887256e+01\n9.4137718906785608e+00\n2.2439829063205142e+01\n-5.1694616729449962e+01\n1.7058325105235159e+01\n2.4738780833325297e+01\n-5.6612223819540802e+01\n1.3436842433617974e+01\n1.3922471759850668e+01\n-3.0632034633477843e+01\n1.6714088222976130e+01\n2.4528737400861829e+01\n-5.6435696359666970e+01\n-1.2655529946104892e+01\n1.6011162535848147e+01\n-3.6047848188004316e+01\n2.3815638929879230e+00\n2.0589601501991254e+01\n-4.7447219688460962e+01\n1.3622627733696767e+01\n1.3789942180860178e+01\n-3.0346577953911115e+01\n9.3209787772593415e+00\n2.4247792765025761e+01\n-5.6239011061796191e+01\n1.2583643625727895e+01\n1.4959903999708752e+01\n-3.3488942871723566e+01\n1.1886217453808385e+01\n1.1569668282079325e+01\n-2.5250294139268320e+01\n1.0684749807528528e+01\n2.4455567473886457e+01\n-5.7222248376444121e+01\n1.8305867778622602e+01\n2.6469050586681554e+01\n-6.1561883604817098e+01\n-1.8182669698687505e+01\n1.6013112762174558e+01\n-3.6312595946184672e+01\n1.1911758073679783e+01\n1.1400511369166116e+01\n-2.5213263735518058e+01\n1.7348630909274179e+00\n2.0016308909562927e+01\n-4.6977124446251224e+01\n1.2654913822345707e+01\n1.1172926414387170e+01\n-2.4991829182852275e+01\n-9.6175543159336723e+00\n1.6612207882283990e+01\n-3.9212287319039454e+01\n-5.9038255765226237e+00\n1.7443438171756593e+01\n-4.1399824544328887e+01\n-5.8615449972158116e+00\n1.7698900897931864e+01\n-4.2267441544610456e+01\n-3.4739563863955949e+00\n1.8236021471017892e+01\n-4.3479916235374986e+01\n-3.7827061472740682e+00\n1.8203689899819800e+01\n-4.3507543801998899e+01\n1.9883950221915999e+01\n2.4930166707166737e+01\n-6.0450358109873669e+01\n-1.2521981095426094e+01\n1.5467965318571760e+01\n-3.7121930078519320e+01\n1.2875156701639588e+01\n1.0597437531280033e+01\n-2.4110368555621680e+01\n1.3346534929972201e+01\n1.3612593713715091e+01\n-3.2322803140298220e+01\n6.2254682383169975e+00\n2.1154109264126667e+01\n-5.2026211151716559e+01\n-6.4982367521627327e-01\n1.8965793034647181e+01\n-4.7072256771332846e+01\n-2.8103723119622416e+01\n2.2170625362665636e+01\n-5.3741848908760318e+01\n-9.6164762224890277e-01\n1.8551608274215120e+01\n-4.6082667918949852e+01\n-9.7366571934500279e-01\n1.8550141412037497e+01\n-4.6051472087982148e+01\n-3.1010220130885231e+00\n1.7828077840840855e+01\n-4.4602742710782508e+01\n-7.8386485970385389e-01\n1.8395015358693350e+01\n-4.6234317180129004e+01\n-1.0371521323639337e+01\n1.5947302747283508e+01\n-3.9529161519491190e+01\n1.3723427998438501e+01\n1.3015300958820079e+01\n-3.1627812521957356e+01\n2.0945483354439034e+01\n2.6299463918294308e+01\n-6.7280064114704217e+01\n1.5861554559035864e+00\n1.9125620732329693e+01\n-4.8655736342323408e+01\n1.3386068198801254e+01\n1.0400813092662670e+01\n-2.4661408990722389e+01\n-2.2042263545238980e+00\n1.8243280108543658e+01\n-4.6944241781107330e+01\n2.2415150694682717e+00\n1.9055044673326783e+01\n-4.8804613345074706e+01\n1.3743803757397576e+01\n9.9247084888212349e+00\n-2.3507436811237135e+01\n1.5770915330598565e+00\n1.8760533416360438e+01\n-4.8482802452193923e+01\n1.3735529622712800e+01\n1.2568312897718981e+01\n-3.1118502481446004e+01\n-1.8187310855090979e+00\n1.7960684273308221e+01\n-4.6491198409917203e+01\n-1.8267053168068945e+00\n1.7980012148910347e+01\n-4.6527554521322521e+01\n1.2602000622734158e+01\n1.0366388318894826e+01\n-2.5157885711173247e+01\n1.3809785015896376e+01\n9.8320399661789359e+00\n-2.3515820322743178e+01\n1.2731782189506241e+01\n9.9517175295576994e+00\n-2.4210045397731321e+01\n7.9992742124590945e+00\n2.0260949250813947e+01\n-5.2985348128890735e+01\n1.2717947738102437e+01\n2.3476831979892886e+01\n-6.1381781725501469e+01\n1.4068484918285733e+01\n9.6804471765275135e+00\n-2.3416007293729439e+01\n2.2017747810180299e-01\n1.8215657267402531e+01\n-4.7824330340924298e+01\n-1.4271842227063694e+00\n1.7965246029487858e+01\n-4.7385370632482605e+01\n1.5480666025121106e+01\n2.2162988366302301e+01\n-5.7932560855406507e+01\n1.3879516173694080e+01\n9.7338150562515846e+00\n-2.3501508536846075e+01\n1.3857162657426956e+01\n9.3199977695996576e+00\n-2.2463547634125316e+01\n1.3997352043620099e+01\n9.5248595153762849e+00\n-2.3102944775469094e+01\n1.4028597980995862e+01\n9.3897085521243451e+00\n-2.2610467061779548e+01\n1.4028597980995862e+01\n9.3897085521243451e+00\n-2.2610467061779548e+01\n1.3212820740501606e+01\n9.4419863486859921e+00\n-2.3048160649757392e+01\n1.4107921476208226e+01\n9.3703765770753744e+00\n-2.2979202827572944e+01\n1.3810594170822661e+01\n1.2898247204030044e+01\n-3.3403186955254540e+01\n1.4142671426988993e+01\n9.3149647441298367e+00\n-2.2880259754226767e+01\n-1.2500948236492105e+01\n1.4521493444382838e+01\n-3.8838578930395947e+01\n1.3636232105749666e+01\n8.6541532597891884e+00\n-2.1258554456948008e+01\n1.3642494453100330e+01\n2.1178580580482194e+01\n-5.7499435102042675e+01\n1.3305667505908712e+01\n9.1858378634863804e+00\n-2.2992861264650497e+01\n1.4294470291271717e+01\n8.9898749453886495e+00\n-2.2174262947947366e+01\n1.3764222591191540e+01\n9.2648202443054757e+00\n-2.3380628439947195e+01\n1.4315756820701141e+01\n9.1336718338709115e+00\n-2.2678027126691557e+01\n1.1762683127075029e+01\n9.9214448915759714e+00\n-2.5075434617988940e+01\n1.4279890717128378e+01\n8.9325030448424609e+00\n-2.2238471519980816e+01\n-1.6360170711215865e+01\n1.4627330241127206e+01\n-3.9374955014060419e+01\n1.3477504729971326e+01\n8.9079950405661172e+00\n-2.2712194838855545e+01\n1.4259808724724701e+01\n1.3698571932227026e+01\n-3.7079197373056523e+01\n1.4576086824538574e+01\n9.1228244992352057e+00\n-2.3134654795658012e+01\n1.2854193112269089e+01\n1.2838159800472930e+01\n-3.4757581850935992e+01\n1.3762913911377080e+01\n1.3616400702259721e+01\n-3.6838775668745065e+01\n1.2787854850422036e+01\n1.2786558079332268e+01\n-3.4690350360308706e+01\n-2.7333718008280552e+01\n1.9538778397708555e+01\n-5.3802577816985618e+01\n1.3934910084103960e+01\n8.2311313235323080e+00\n-2.0915996533063435e+01\n1.4052914031647662e-01\n1.7324407317228346e+01\n-4.8977093214149669e+01\n-9.4099553969967271e+00\n1.4713952794004905e+01\n-4.1476349679644564e+01\n1.4524461569155795e+01\n8.5841686773330768e+00\n-2.1970527637559609e+01\n1.4640896047883098e+01\n8.6119016392144268e+00\n-2.1930261129392360e+01\n-9.8195871599688704e+00\n1.4658512672777974e+01\n-4.1462739037166820e+01\n1.3066353398942685e+01\n1.2309506371199909e+01\n-3.3687891307653011e+01\n1.5098556824462040e+01\n8.8991650999803316e+00\n-2.3144072590594277e+01\n1.4694169854262968e+01\n8.3540975918196558e+00\n-2.1704518705681870e+01\n1.3126203089595229e+01\n1.3038522834787535e+01\n-3.6474998217898843e+01\n6.8893603556068536e-02\n1.7054018402331529e+01\n-4.9218511599542282e+01\n1.2584115318332749e+01\n9.2030246844748156e+00\n-2.4611849469106275e+01\n-1.1995268953825825e+01\n1.3985972418469331e+01\n-4.0192224632608024e+01\n1.2774721910251666e+01\n1.2291793416633659e+01\n-3.4817658535974083e+01\n1.2743452243548699e+01\n1.2254849465992248e+01\n-3.4734588323254684e+01\n-3.7579215207543246e+00\n1.5856496765360705e+01\n-4.6211262453897227e+01\n-4.9447282507230934e+00\n1.6066843330953240e+01\n-4.7190342638589570e+01\n1.3986320363009517e+01\n1.2912221289607015e+01\n-3.7063549743639115e+01\n1.2526860676726667e+01\n9.5983644653912208e+00\n-2.6527040240967938e+01\n1.2109854265241589e+01\n9.5926050786375345e+00\n-2.6265339850166455e+01\n-6.9819997271122922e+00\n1.4976172237968143e+01\n-4.4108506686482848e+01\n1.2394190741284731e+01\n1.2596140455070756e+01\n-3.6225626446848281e+01\n1.3068915436040138e+01\n1.1746170526912865e+01\n-3.3434262491595184e+01\n1.1978501384348631e+01\n9.4149953407361604e+00\n-2.6241396768637959e+01\n-7.4421512435249610e+00\n1.4916506884271175e+01\n-4.4097463038421679e+01\n1.2565699190574124e+01\n9.5165017496232309e+00\n-2.6719026528075609e+01\n7.8617892510416594e+00\n1.8321079621305735e+01\n-5.5218781404807004e+01\n1.2055160758246739e+01\n9.2452182557443123e+00\n-2.6055553358598107e+01\n1.3275558005920285e+01\n8.8624236218582233e+00\n-2.4807797168652993e+01\n1.3038138725665613e+01\n9.2016222851275806e+00\n-2.5851680419668256e+01\n3.9186754806955486e+00\n1.7205218827841666e+01\n-5.2911257500255175e+01\n-1.4400507160610033e+01\n1.2896235261794240e+01\n-3.9019767500334289e+01\n-1.4606141660084861e+01\n1.2811646451270853e+01\n-3.8616548795892577e+01\n1.2886427910971443e+01\n8.6938666441142960e+00\n-2.5379979611484334e+01\n-1.0536005615273101e+01\n1.3921165423552520e+01\n-4.2979966663460068e+01\n1.4184704686487830e+01\n7.4972229812316984e+00\n-2.1096178694432457e+01\n-1.5006227173942174e+01\n1.1828622358813938e+01\n-3.6106702098557115e+01\n1.3001699798238020e+01\n1.1136279468980627e+01\n-3.4359824519821267e+01\n5.6100235726791003e-01\n1.5983501814558466e+01\n-5.1271761564022299e+01\n-8.5905285198327075e+00\n1.3850062852330232e+01\n-4.4063972913313279e+01\n1.3188503474218294e+01\n1.1091835442909090e+01\n-3.4303872317399083e+01\n1.3805969231205200e+01\n7.9055014113843711e+00\n-2.3724870396710308e+01\n1.4359273589503960e+01\n8.0211913744194927e+00\n-2.3602987026464472e+01\n-1.6751664163403042e+01\n1.2525383306256172e+01\n-3.9376714281375001e+01\n-1.6588443910705461e+01\n1.2311272355648287e+01\n-3.8863899455580984e+01\n1.2664436346951160e+01\n8.4736887687505433e+00\n-2.5615564778420655e+01\n1.1346863304292485e+00\n1.6028985391332391e+01\n-5.2335865042732344e+01\n1.9983388791203410e+01\n1.9481863778693715e+01\n-6.2795909328016648e+01\n-2.5598766865214735e+00\n1.4230820345621401e+01\n-4.6335300027242205e+01\n2.6105561488828699e-01\n1.5662543815156541e+01\n-5.1597408265511866e+01\n1.3216232339799179e+01\n1.0632751444214218e+01\n-3.3693116943138079e+01\n-1.5845366703730100e+01\n1.2134823393851304e+01\n-3.8768065524011625e+01\n-1.6058552250126308e+01\n1.2450971933867894e+01\n-3.9614392666267328e+01\n-3.1030377199560277e+01\n1.7951835237532393e+01\n-5.8123675560467085e+01\n1.0712708365485837e+00\n1.6145265831096388e+01\n-5.3375821637592686e+01\n-7.0128800635045412e+00\n1.3813696589929068e+01\n-4.5593662904699229e+01\n1.3303295646036815e+01\n1.0468726272367663e+01\n-3.3531113437106434e+01\n1.3159287263196472e+01\n8.5206400242253970e+00\n-2.6347234126102702e+01\n1.2596524564315184e+01\n1.1474579617899851e+01\n-3.6744573140285389e+01\n1.2011714401320505e+01\n8.5314876241253330e+00\n-2.6998012965613299e+01\n1.1888618178248603e+01\n8.5535650940526686e+00\n-2.6867292979357885e+01\n1.3997813396769496e+01\n1.1047044879371406e+01\n-3.5834349922091299e+01\n5.2562345123315435e-01\n1.5534086783901207e+01\n-5.2101022194234545e+01\n1.3436289600694542e+01\n1.0342963162369898e+01\n-3.3461452632680469e+01\n1.0577864097707790e+00\n1.5426381370060634e+01\n-5.2336479410195885e+01\n-1.1686043899032209e-01\n1.5249425541491238e+01\n-5.1701029946253016e+01\n1.2822026624243732e+01\n8.1140425677813379e+00\n-2.5637755922081496e+01\n1.3085169620898288e+01\n7.5660692132081451e+00\n-2.4354072912626567e+01\n1.4230959078332171e+01\n7.6088088915866479e+00\n-2.3962089705977757e+01\n1.4318824234361859e+01\n7.6584644647858262e+00\n-2.3922959309155978e+01\n1.6918551551158541e-03\n1.5136234067441816e+01\n-5.2011792898780996e+01\n-7.3380898761408142e+00\n1.3441249809222048e+01\n-4.6220729035819900e+01\n-6.9667537085758910e+00\n1.3297926325074421e+01\n-4.6074696252908709e+01\n-6.9521158104948135e+00\n1.3248436628630303e+01\n-4.5978815310185261e+01\n-3.0114097528679466e+01\n1.6670552805518241e+01\n-5.6978435324667849e+01\n-1.2390409799086768e+01\n1.2017002067617060e+01\n-4.1630638608375307e+01\n-5.8128913577882884e+00\n1.3646154822538829e+01\n-4.7758201793385155e+01\n-5.8415039377444584e+00\n1.3641478527630028e+01\n-4.7659181331363854e+01\n-1.1069683405261447e+01\n1.2291533439335456e+01\n-4.2943970206475655e+01\n-7.2971037324754509e+00\n1.3057704395129271e+01\n-4.6339663052829728e+01\n-1.3380776456698326e+01\n1.1332652311765100e+01\n-4.0213248735887298e+01\n1.1891450724119391e+01\n8.1438650322635677e+00\n-2.7940363606981411e+01\n-1.2962432752841291e+01\n1.2267174865974388e+01\n-4.3530668012855685e+01\n-4.4649865318350690e+00\n1.3466880297287005e+01\n-4.9247623097333225e+01\n-9.9391967780837991e+00\n1.2121759468293968e+01\n-4.4136685297860012e+01\n1.3829098211843920e+01\n6.5956263872041205e+00\n-2.2599668216385428e+01\n-1.6947346407334535e+01\n1.1350758326864019e+01\n-4.0882785769316577e+01\n-1.7205030715825565e+01\n1.1298921492921483e+01\n-4.0911484665495436e+01\n1.2103655259342329e+01\n7.7567541404972049e+00\n-2.7036109623199700e+01\n1.2106624862185075e+01\n7.7581965171976783e+00\n-2.7045560471899915e+01\n1.2091882753303461e+01\n7.8112860527975512e+00\n-2.7274918378631298e+01\n1.4116180419632762e+01\n6.5933523301571961e+00\n-2.2712190545727267e+01\n-1.3434479004352466e+01\n1.1257265050267327e+01\n-4.1373980025247782e+01\n2.5503683186704929e+00\n1.3769551211145901e+01\n-5.1432972122171570e+01\n1.2223240939231870e+01\n7.6295921140316381e+00\n-2.7140994932064096e+01\n-1.2428001826197088e+01\n1.1619678436000283e+01\n-4.3243679562456371e+01\n1.2889650787498141e+01\n7.3190576409926615e+00\n-2.5945256443351898e+01\n1.2982968594756860e+01\n7.3723810307407485e+00\n-2.6092327579942317e+01\n-7.1290718470303664e+00\n1.2517381286028794e+01\n-4.7315059785082191e+01\n1.2658161609028337e+01\n7.9945894222233127e+00\n-2.8285134356341167e+01\n1.5536928266510683e+01\n1.3468950235695516e+01\n-5.0294003860962924e+01\n-1.5970411167709099e+01\n1.1074710133984667e+01\n-4.1259925806977876e+01\n1.3869557100911965e+01\n6.3899335824482106e+00\n-2.2643248029177183e+01\n1.3333300346120424e+01\n1.0216475970857076e+01\n-3.8177788115519284e+01\n-1.3900299243355324e+01\n1.0750258503750523e+01\n-4.1309244949476351e+01\n1.2307991871752886e+01\n7.3846116488478950e+00\n-2.6758138081022349e+01\n-6.5845630908804802e+00\n1.2078264880819743e+01\n-4.7290425106888918e+01\n1.4553186569869773e+01\n1.0525969426796660e+01\n-4.0946131924574736e+01\n1.3889760176746503e+01\n9.1042705838726423e+00\n-3.5280042819468655e+01\n1.5648071394086907e+01\n1.0186640480811917e+01\n-3.9547491218550128e+01\n1.4371494223586687e+01\n6.6434205872792793e+00\n-2.4228129039544587e+01\n6.9577986328809807e-02\n1.2356357179419820e+01\n-4.9521919226146082e+01\n-1.7340005683361575e+01\n1.0185205327684560e+01\n-3.9686370204430105e+01\n2.6902166179031828e+00\n1.2125753300734006e+01\n-4.8368847928488627e+01\n1.3818432561863302e+01\n6.3816967556774307e+00\n-2.4199897079501838e+01\n-1.3554169581989541e+01\n9.8458013819291761e+00\n-4.0161330559924259e+01\n1.2609827482682205e+01\n7.0473592814474388e+00\n-2.7374496138740501e+01\n1.3274754849095631e+01\n9.5010177220547813e+00\n-3.8412641624370323e+01\n2.2712832073002471e+00\n1.1511449450443271e+01\n-4.8276141841054965e+01\n-1.2724579866093327e+01\n1.0850069058442983e+01\n-4.4671211332940516e+01\n1.4992713000564294e+01\n6.3225790023479291e+00\n-2.4008290777059667e+01\n1.4639911099978383e+01\n5.7902489441441478e+00\n-2.2373229937677038e+01\n1.4170172899020649e+01\n8.5076848286146127e+00\n-3.5347379894057752e+01\n-1.7021433686957522e+01\n1.0225312308127357e+01\n-4.2008389214365934e+01\n1.3999100993555301e+01\n8.5513816060898851e+00\n-3.5678873944275580e+01\n1.4159016516706515e+01\n8.6260116837619343e+00\n-3.5893120725730043e+01\n1.4692227980883120e+01\n5.7028448047487270e+00\n-2.2279429892093390e+01\n-1.2783138636116565e+01\n1.0507813206481995e+01\n-4.4670869792082676e+01\n-1.7146646847145451e+01\n1.0068406796298827e+01\n-4.2803175631393792e+01\n1.2411344433834431e+01\n6.6743127894975842e+00\n-2.7895206142629746e+01\n1.4187972951361356e+01\n6.1768835886507416e+00\n-2.4718622113687172e+01\n1.3917242621062009e+01\n8.6014895014081336e+00\n-3.6722545329495766e+01\n-1.2074973559326121e+01\n9.5401768107113032e+00\n-4.1663800500235205e+01\n-1.2681753209074328e+01\n1.0178793885442333e+01\n-4.4386060159592077e+01\n7.7261970769841817e+00\n1.0751261174178062e+01\n-4.7136442912993061e+01\n1.3918392685003891e+01\n5.8686517010558159e+00\n-2.3578356568452566e+01\n-1.6771050401585093e+01\n9.8597488036955756e+00\n-4.3699224500881655e+01\n1.3555293844896530e+01\n6.3239960766811620e+00\n-2.6788763088040557e+01\n1.2998807392634463e+01\n6.1779080863577462e+00\n-2.6475475793333153e+01\n2.7811843573417421e+00\n9.8963900320245237e+00\n-4.4729004827552551e+01\n1.4601890018004115e+01\n7.0722276041659953e+00\n-3.1121688732878368e+01\n1.2836852999542794e+01\n6.3073186930866552e+00\n-2.7507528360025841e+01\n1.2320885981051205e+01\n6.2790694623523002e+00\n-2.6792728060488141e+01\n2.5265817982911756e+00\n1.0145598588845758e+01\n-4.6464272632702638e+01\n1.2671510907699309e+01\n6.4371991081036803e+00\n-2.8455810832712260e+01\n-6.2433086267045121e+00\n1.0079567494075864e+01\n-4.6694558838404042e+01\n1.2564551420494318e+01\n6.6218109046838007e+00\n-2.9270569618430599e+01\n1.2462453497561761e+01\n6.5475144676461010e+00\n-2.9116155876611458e+01\n-1.2846449193129478e+01\n8.7336979227135814e+00\n-4.0818354055787836e+01\n1.3880787185747526e+01\n5.6363660372030866e+00\n-2.4500224525020968e+01\n-1.6435791040231909e+01\n9.1239039693951725e+00\n-4.1961822575893144e+01\n1.2906011725190801e+01\n6.1102887550976783e+00\n-2.7699452160495600e+01\n-1.4082054122038182e+01\n7.8125374959186153e+00\n-3.7230093512536413e+01\n1.3904449862280842e+01\n5.5332668745451592e+00\n-2.4579917812427887e+01\n7.5000099885404339e+00\n9.4888834192070561e+00\n-4.5330712302591749e+01\n-6.8211755384808912e+00\n9.3402751645781628e+00\n-4.5066479550291291e+01\n-1.6020503114200519e+01\n9.1537195476020905e+00\n-4.3519036028164741e+01\n-1.4183988386197267e+01\n7.7669306709304387e+00\n-3.7772033990665449e+01\n-1.3637403817554352e+01\n9.2954582135636930e+00\n-4.5285160508071925e+01\n1.9409730422098712e+00\n9.2488495250025995e+00\n-4.5308535360701143e+01\n-1.0080969851844690e+00\n8.8816417276615951e+00\n-4.4335275418668019e+01\n-1.0673696529266978e+00\n9.1490005583094955e+00\n-4.4948747992964563e+01\n-5.5127598825244295e+00\n8.8420468247748936e+00\n-4.4430314389625316e+01\n1.4622984826142586e+01\n4.7130247561488412e+00\n-2.2256106826504872e+01\n3.6261343482421474e-03\n8.1646985254137441e+00\n-4.3811255152588522e+01\n-2.6854949665417094e-01\n8.0703463606943036e+00\n-4.3689228037364522e+01\n1.4726585205184382e+00\n7.9857531210731620e+00\n-4.2934774818314651e+01\n1.3091620000811588e+01\n5.2530230845060650e+00\n-2.7455336241360182e+01\n-1.3042673190317358e+00\n7.9986980122350149e+00\n-4.3852816495901465e+01\n1.3087203465161183e+01\n5.2246386026648919e+00\n-2.7670788681302788e+01\n-6.4476993188308473e-01\n7.7650740991341003e+00\n-4.3306712012640595e+01\n-6.0207988887828801e-01\n7.6226914952395317e+00\n-4.3097728994138521e+01\n-7.6542446220871507e-01\n7.5714042867557279e+00\n-4.3007375121324010e+01\n1.2387309937510921e+01\n5.2345116732133032e+00\n-2.8848340572301090e+01\n1.2309773232584224e+01\n5.2216126185733174e+00\n-2.8752223351874051e+01\n1.2862261197146614e+01\n4.9867132026808472e+00\n-2.8267169930390605e+01\n2.2498704849956308e+00\n4.4427739383219471e+00\n-2.4976875099868966e+01\n1.2785640995512713e+01\n4.9660235299212596e+00\n-2.8815899422383218e+01\n1.4819029110560034e+01\n3.9885337188638896e+00\n-2.2650817990583501e+01\n1.2907329266488444e+01\n4.7578355858816517e+00\n-2.8425999077082682e+01\n1.4941421490380874e+01\n4.1638008623526197e+00\n-2.3612946072843538e+01\n-9.9666589668762509e+00\n6.4470452228536805e+00\n-4.1441732092984182e+01\n1.5930035320734511e+01\n4.8040036817969369e+00\n-2.9720386539953520e+01\n-1.5944838443523703e+00\n6.4578569917700843e+00\n-4.1255642105659533e+01\n-1.6228912955798787e+00\n6.5008757911764175e+00\n-4.1344535859103779e+01\n1.5998703004498756e+01\n4.6793986498773883e+00\n-2.9568248821240836e+01\n-2.8268935167007281e+00\n6.0984013220645492e+00\n-4.0774556336775056e+01\n-3.3377913954642904e+00\n6.0505887730789825e+00\n-4.0631243117050047e+01\n3.0868134849285433e+00\n3.6350282233062465e+00\n-2.3295212030255268e+01\n1.2584388827922165e+01\n6.0810817190484210e+00\n-4.1156587397423799e+01\n1.2850180152801475e+01\n5.0033226982503258e+00\n-3.3285186778413056e+01\n1.5083876568546545e+01\n3.9116616588046829e+00\n-2.4498980758000574e+01\n1.4624079492295706e+01\n3.7954206801461714e+00\n-2.3790811198379636e+01\n-7.0796774305433781e+00\n5.8209685759205838e+00\n-4.0159414084421385e+01\n1.4942326266945159e+01\n3.5316617114541877e+00\n-2.2536836480042620e+01\n1.4921124558548788e+01\n3.6647414121808382e+00\n-2.3729013098504247e+01\n1.6246097097732289e+01\n4.4049289395963571e+00\n-2.9339820488235613e+01\n-3.4973627211375171e+00\n5.9017921504015494e+00\n-4.0511669197630653e+01\n-3.4532404180300618e+00\n5.8404227548736012e+00\n-4.0473695236498273e+01\n1.3825839708090346e+01\n3.9343092268109974e+00\n-2.6244244182235949e+01\n1.3296716898195688e+01\n4.0382508691305308e+00\n-2.7186505155133911e+01\n1.3207695746224863e+01\n4.0833690223574797e+00\n-2.7995695120900237e+01\n3.2999823194303182e+00\n3.4289131098424526e+00\n-2.3518453068562600e+01\n-5.4349009723846295e+00\n5.6941516635086336e+00\n-4.0702049136046739e+01\n-3.5586771273491631e+00\n5.5218995749581108e+00\n-4.0025378651245809e+01\n-3.7737773038131541e+00\n5.3382178787534675e+00\n-3.9587374092381594e+01\n1.3846679268293185e+01\n3.7449882219439123e+00\n-2.6420249614062097e+01\n1.4064948920554672e+01\n3.6678877043260760e+00\n-2.5733889686579516e+01\n-3.6625789012471226e+00\n5.3852988361828480e+00\n-3.9823886270909746e+01\n-3.6365366580005305e+00\n5.3496765170984748e+00\n-3.9803092524072589e+01\n-6.5574377917386757e+00\n5.2589382783138481e+00\n-3.9459759691303120e+01\n1.4077473865128889e+01\n3.7966340830482586e+00\n-2.7021401208053472e+01\n-8.3269450277451789e+00\n5.1299267197604550e+00\n-3.9174010427777880e+01\n1.4727030769687294e+01\n3.2948659475605475e+00\n-2.3494239992332691e+01\n1.3964654106140907e+01\n3.6235767139390673e+00\n-2.6418917342115364e+01\n1.4622841004220442e+01\n3.3753186353163880e+00\n-2.4181483200758080e+01\n1.3417840834024972e+01\n3.6588616157071567e+00\n-2.7344406233915933e+01\n1.4346253025738346e+01\n3.5174207072187205e+00\n-2.5726127832687347e+01\n-6.2325512914600694e+00\n4.8270114643743254e+00\n-3.8523015592030134e+01\n-3.9465986050720214e-01\n3.1039909032238855e+00\n-2.3109041204368978e+01\n-3.9129252264283326e-01\n3.0475807605761664e+00\n-2.2746757543981786e+01\n1.4076872778877732e+01\n3.5372042021600572e+00\n-2.6529856945671618e+01\n-3.6356852104599606e+00\n5.0785119022985983e+00\n-3.9507141769305242e+01\n-3.6486426227803292e+00\n5.0532694859848002e+00\n-3.9456225244669355e+01\n1.4269482748804974e+01\n3.3879517869233822e+00\n-2.5703160801540889e+01\n-2.0986127470664179e-01\n2.9933214532620878e+00\n-2.2344187021580357e+01\n1.4251594683249824e+01\n3.3246933642382288e+00\n-2.5144046529945538e+01\n-1.3863628775628600e+01\n4.9889214282649528e+00\n-3.9555235341079502e+01\n1.4056576481369323e+01\n3.4002331099039163e+00\n-2.5926285126926032e+01\n1.7298771222738448e+01\n3.7600243832366087e+00\n-2.9003778586057031e+01\n1.3685948615254436e+01\n3.4542044525569713e+00\n-2.7068182479045991e+01\n1.4012554030398213e+01\n3.3680633771675699e+00\n-2.6268704098604474e+01\n1.4012554030398213e+01\n3.3680633771675699e+00\n-2.6268704098604474e+01\n1.4134518160164358e+01\n3.2925294328914121e+00\n-2.5676041198840966e+01\n-6.3280674049036731e+00\n4.6208666010039581e+00\n-3.8271789665267889e+01\n-6.5830045841720750e+00\n4.6132614984019993e+00\n-3.8685097385971737e+01\n-6.7737158337836345e-01\n2.8714762672082106e+00\n-2.2779103068514640e+01\n1.6745140083284927e+01\n3.5800408421400403e+00\n-2.9471839512637839e+01\n1.4377068620952951e+01\n3.1403315432758538e+00\n-2.5467992958661704e+01\n1.4014197546292040e+01\n3.2223026627843927e+00\n-2.6375761644816055e+01\n1.4026105625489322e+01\n3.2220083963993167e+00\n-2.6384267887839542e+01\n1.4942050998484538e+01\n2.8905948575780016e+00\n-2.3066571257321090e+01\n1.4475054526487327e+01\n3.0214130970875837e+00\n-2.4983000217885298e+01\n-1.3745291509619063e+01\n4.5580596506282038e+00\n-3.9117486472813610e+01\n1.4261378968246238e+01\n3.0440133315548605e+00\n-2.5381996519991123e+01\n1.4645513658662535e+01\n2.9506864333134910e+00\n-2.4268205307492412e+01\n1.4645513658662535e+01\n2.9506864333134910e+00\n-2.4268205307492412e+01\n1.4108554953014226e+01\n2.9694735972796757e+00\n-2.5184123304045062e+01\n1.4108554953014226e+01\n2.9694735972796757e+00\n-2.5184123304045062e+01\n-7.9581336420197086e+00\n4.2707322740068987e+00\n-3.7544431546103141e+01\n1.3872924624777848e+01\n3.1651851325052434e+00\n-2.6974624555161085e+01\n-6.5416103663577641e+00\n4.2133982074896545e+00\n-3.7688877869308826e+01\n1.4215653942692775e+01\n2.9750543640253682e+00\n-2.5603713034305944e+01\n1.5082551859483033e+01\n2.7188198296819044e+00\n-2.2848944714221979e+01\n1.3917664757562328e+01\n3.0562033453939264e+00\n-2.6805749386906022e+01\n1.4644128599687292e+01\n2.6783780268085042e+00\n-2.3518149134726432e+01\n1.5663249937682203e+01\n3.0043432798992065e+00\n-2.4675267643542036e+01\n1.5074242483486797e+01\n2.9369099102125733e+00\n-2.4405186624426531e+01\n1.4293071502168189e+01\n2.7959921043903000e+00\n-2.4966874749972654e+01\n-1.1214128605527669e+00\n2.6779072781882927e+00\n-2.2879503426479786e+01\n1.3214020540242128e+01\n3.2026362186411412e+00\n-2.8916485427332624e+01\n1.7989494117770803e+01\n3.3233750844627847e+00\n-2.9570867712720222e+01\n1.3450584128811288e+01\n3.1412090116682783e+00\n-2.9290320420588017e+01\n1.3381276668902935e+01\n3.0945263381708448e+00\n-2.9120511617000702e+01\n1.4489290214087685e+01\n2.7154998140653204e+00\n-2.4897382073046966e+01\n1.4509556561514644e+01\n2.7352422840088391e+00\n-2.4631676624713190e+01\n1.4404207372581210e+01\n2.6230634058536562e+00\n-2.4193729073927141e+01\n7.4903638806947748e-01\n2.3438744945257155e+00\n-2.1423353484852790e+01\n4.5208505463933761e+00\n2.5646851001463964e+00\n-2.3616042614625410e+01\n1.4454254852361849e+01\n2.7330250975589139e+00\n-2.5485957405994789e+01\n1.4416216954718488e+01\n2.6590836460452514e+00\n-2.5090702731154853e+01\n1.4599617305512973e+01\n2.6093873620788535e+00\n-2.4696961087865841e+01\n1.4057588355940071e+01\n2.7543231234715964e+00\n-2.6437059630877364e+01\n1.5119268491198399e+01\n2.4563910108278826e+00\n-2.2577736965148244e+01\n1.4835190088352455e+01\n2.6338130491146075e+00\n-2.5005259258340566e+01\n-6.9061189456952843e-01\n2.3400078194529557e+00\n-2.2226795209467770e+01\n1.3659450944999604e+01\n2.7019941106603378e+00\n-2.8206417596745634e+01\n1.4532443121207132e+01\n2.5462702403988677e+00\n-2.5746199875588154e+01\n1.5486507715063224e+01\n2.5036425986949116e+00\n-2.4500093061717639e+01\n1.6371824102472235e+01\n2.6123011799409124e+00\n-2.5771339409328053e+01\n1.5972820652853509e+01\n2.8535515317352806e+00\n-2.9755057750223102e+01\n1.4644077105511291e+01\n2.3855732110092722e+00\n-2.4778008302543721e+01\n1.4644077105511291e+01\n2.3855732110092722e+00\n-2.4778008302543721e+01\n1.4182686423829299e+01\n2.4378495113485195e+00\n-2.6007016931394517e+01\n-7.5890236126450672e-01\n2.1338504110447714e+00\n-2.1992353417227211e+01\n-1.5454938806179292e+00\n2.1433331076515691e+00\n-2.2953979914904878e+01\n1.4470101621147231e+01\n2.3435801830418543e+00\n-2.5974858754244227e+01\n1.4330888804798924e+01\n2.3157949124021888e+00\n-2.5740588163531626e+01\n1.2620279003690772e+01\n2.8250558141080480e+00\n-3.2770800593885241e+01\n1.2579159477374677e+01\n2.8201679828993136e+00\n-3.2760496262041933e+01\n-7.3694052326835946e+00\n3.0839841875691718e+00\n-3.6604302991107510e+01\n1.4977258232927756e+01\n2.3360650774795757e+00\n-2.5925660802329531e+01\n1.4977258232927756e+01\n2.3360650774795757e+00\n-2.5925660802329531e+01\n1.2989582836838949e+01\n2.9384663856493072e+00\n-3.4527722201098619e+01\n1.3378722325269521e+01\n2.4756870114941312e+00\n-2.9216680126312919e+01\n1.4644076557799387e+01\n2.1266077766510594e+00\n-2.5422228710598894e+01\n1.4600165959569180e+01\n2.1289005228103743e+00\n-2.5382498830474027e+01\n-1.1514648321325485e+00\n1.9151616083234204e+00\n-2.2377933589342817e+01\n-9.9754097472612191e-01\n1.8950109009933536e+00\n-2.2477366258230273e+01\n-6.8591826911757570e-01\n1.8170709904998401e+00\n-2.1747993005980536e+01\n-1.2459389402542804e+01\n2.7940925069589420e+00\n-3.6538159554422492e+01\n1.5037953074393563e+01\n1.7294913046962477e+00\n-2.2697375658712826e+01\n1.3222144707568205e+01\n2.3703582695885519e+00\n-3.2330975530818556e+01\n1.7283221010205594e+01\n2.2216546427988075e+00\n-2.9822407395039708e+01\n1.7437990844238811e+00\n1.5976870318584744e+00\n-2.0650417006845426e+01\n-1.2349431323963447e+01\n2.5319881368309574e+00\n-3.6118436926825112e+01\n1.4608773198466960e+01\n1.8268609632289503e+00\n-2.5270226245962970e+01\n1.4771624609115230e+01\n1.7620003353356415e+00\n-2.4562292691846075e+01\n1.4853427522824022e+01\n2.8177442560882127e+00\n-4.1084429632803783e+01\n1.4684029379480943e+01\n1.7126051151185928e+00\n-2.5216512805332886e+01\n1.5134534014053486e+01\n1.6132648466086432e+00\n-2.4731118671476057e+01\n1.4747086534368517e+01\n1.6404025738068622e+00\n-2.4789144665815183e+01\n-3.5748968994913581e+00\n1.7045948149555181e+00\n-2.5624311887566172e+01\n-1.2924315713840102e+00\n1.5658283950227774e+00\n-2.2305271842601826e+01\n1.4309696859189041e+01\n1.6958958761758915e+00\n-2.6915864206426399e+01\n-1.2924478943572753e+01\n2.1835116414549218e+00\n-3.5518079265990494e+01\n1.4087431611608208e+01\n2.0292172288172559e+00\n-3.3684385058678380e+01\n1.4269205094046802e+01\n1.6583656807055400e+00\n-2.7078828734761647e+01\n1.4959479195445795e+01\n1.4573962739253183e+00\n-2.3701748580519983e+01\n1.3700062904489908e+01\n2.2652293243562545e+00\n-3.6969081191441852e+01\n-1.2412854211053917e+01\n2.0348328492007699e+00\n-3.4858575559541137e+01\n-1.9602484964866920e+00\n1.5281025797726377e+00\n-2.3383099044158488e+01\n2.9710903538031390e+00\n1.4630428340998234e+00\n-2.1812959856540314e+01\n1.4782187037168857e+01\n1.4823051717674658e+00\n-2.4923411028981494e+01\n1.4943609800639651e+01\n1.4250951797958347e+00\n-2.4463196550829611e+01\n1.5248918053576899e+01\n1.3823726951401865e+00\n-2.3457436256541300e+01\n1.5208529465806116e+01\n1.3881340455625730e+00\n-2.3475308224340139e+01\n1.4560127313100040e+01\n1.6816491153441855e+00\n-2.8789951212322400e+01\n1.4870583963783842e+01\n1.4671378391735204e+00\n-2.5938564587069163e+01\n1.4892569030431362e+01\n1.3449670432952501e+00\n-2.4793971864780048e+01\n-1.4107674183320901e+01\n1.6005693040745570e+00\n-3.0375883077974695e+01\n-1.3620466657803860e+01\n1.4903438001042437e+00\n-2.9105242182534816e+01\n1.2646593517327858e+01\n1.8312541353057152e+00\n-3.5247951913521540e+01\n1.4091637733473327e+01\n1.4290078067608953e+00\n-2.7281496138714722e+01\n1.5127425741425753e+01\n1.3061794626657610e+00\n-2.4418281842577656e+01\n-4.0218833460598278e+00\n1.3648261599148894e+00\n-2.5303015088428108e+01\n1.4630467647556085e+01\n1.4525330117142718e+00\n-2.7216917811330799e+01\n1.3410173112352071e+01\n1.5218691045337387e+00\n-3.0771030217227185e+01\n1.3410173112352071e+01\n1.5218691045337387e+00\n-3.0771030217227185e+01\n-2.4717920080470601e+00\n1.2807224649755495e+00\n-2.3955893539286649e+01\n3.4310617038929498e+00\n1.2285718390704592e+00\n-2.2226735149135322e+01\n1.5231757341911138e+01\n1.2396503802190242e+00\n-2.4563237382592703e+01\n1.5446719260397288e+01\n1.9412505315345088e+00\n-4.1178950449597686e+01\n-2.2491759190294129e+01\n1.6049280028732531e+00\n-3.4852946205643491e+01\n1.5031144824523874e+01\n1.1165103759634045e+00\n-2.4453344536481779e+01\n1.6269868132098535e+00\n1.0805361724105869e+00\n-2.1248105975271951e+01\n1.6663037408981638e+00\n1.1082669407498449e+00\n-2.1411183843140119e+01\n1.5618707474114547e+01\n1.1630794705403642e+00\n-2.4319470542317681e+01\n1.5138255372156703e+01\n1.0833592071944602e+00\n-2.4124856381661488e+01\n1.3772637395262883e+01\n1.4510438769369878e+00\n-3.3838773642662026e+01\n1.5074551132963899e+01\n1.0382736517740474e+00\n-2.4359809536030394e+01\n1.3580642766717148e+01\n1.1872999241533275e+00\n-3.1412817746376163e+01\n1.4148183019055505e+01\n1.0096743654488052e+00\n-2.8350159522946829e+01\n3.2319534997833066e+00\n9.4984235732480615e-01\n-2.1341647403055354e+01\n1.4602027437071239e+01\n9.0539605839678305e-01\n-2.7006606309101624e+01\n-2.5956336823657975e+00\n8.6594185303420079e-01\n-2.3419119915452733e+01\n1.3961552831886358e+01\n8.8588768069697743e-01\n-2.9270556258528096e+01\n1.5084044768788043e+01\n7.3165419425033307e-01\n-2.3768450987447348e+01\n1.4021358441084310e+01\n7.9328252598847182e-01\n-2.9689525001359684e+01\n1.4284697424379205e+01\n8.1288302793405476e-01\n-2.8917989921366335e+01\n1.4204201311292605e+01\n8.0796296855821514e-01\n-2.8839470073330116e+01\n1.5376996635778136e+01\n6.7669641305032235e-01\n-2.3605503269347640e+01\n1.3727801736989370e+01\n8.5208013136209571e-01\n-3.4492898112197146e+01\n1.3727801736989370e+01\n8.5208013136209571e-01\n-3.4492898112197146e+01\n1.4197129480712654e+01\n7.0217701709196656e-01\n-2.8743978312560746e+01\n-9.2553762400754955e+00\n9.1652331822000022e-01\n-3.3316262256575371e+01\n1.4362418099250963e+01\n6.3426486072515054e-01\n-2.8552255222992976e+01\n1.4352083230458783e+01\n6.2642337473989840e-01\n-2.8515124667377577e+01\n1.4644892969456718e+01\n6.8769227182907855e-01\n-3.1368687105464307e+01\n2.7284241147255134e-01\n5.6123545050215629e-01\n-2.0501153410978766e+01\n1.5467571004800446e+01\n5.6358101655260651e-01\n-2.3472927712056961e+01\n-4.3418531189010823e-01\n5.7059827986821687e-01\n-2.1125766510597572e+01\n1.5436050851788485e+01\n5.4624893416869136e-01\n-2.3575739500441546e+01\n1.4151645727762206e+01\n6.1798463776646273e-01\n-3.2509463101092734e+01\n1.4395370527583392e+01\n4.2707118860430965e-01\n-2.6927976591426699e+01\n1.5421742065081578e+01\n4.9122557427134644e-01\n-2.3660315871719668e+01\n-1.4285457251782539e+01\n7.0941189141128935e-01\n-3.3896581558548320e+01\n1.5486182908443498e+01\n4.0302788057755146e-01\n-2.3934101994054579e+01\n-1.4234999442447252e+01\n6.8801687941756962e-01\n-3.3268997260246813e+01\n2.4168634313327614e-01\n4.6891303631371062e-01\n-2.0634682357241857e+01\n-2.1997251326061300e+00\n4.6676763362509677e-01\n-2.2682653454935654e+01\n1.4606625958694822e+01\n3.9193301449784979e-01\n-2.7800493499378202e+01\n1.4384539480027517e+01\n3.2758393541791359e-01\n-2.7458394480047776e+01\n1.9173901788784494e+01\n5.0897076742749348e-01\n-2.8951328762457347e+01\n1.3890080693996156e+01\n4.7875750815005436e-01\n-3.1622898537105247e+01\n1.4686294434266626e+01\n5.9104152671716259e-01\n-3.6267794612797367e+01\n-6.6228384897964894e+00\n4.0006008485072253e-01\n-3.2490867063498598e+01\n3.4465127151101913e+00\n3.9447259760401493e-01\n-2.2084494673558613e+01\n-9.0057667172391731e-01\n3.1767114668716545e-01\n-2.1493006157463483e+01\n-9.6421822372366961e+00\n2.8209105366489129e-01\n-3.2803023939419724e+01\n1.4587520381198258e+01\n1.5270362101732571e-01\n-2.7375756790310710e+01\n1.3804587565014534e+01\n1.3203808031785158e-01\n-3.3340097668786356e+01\n-9.2502860910480322e+00\n1.1654978205423658e-01\n-3.2663757435859218e+01\n4.1601918245066880e+00\n1.8902722134329797e-01\n-2.1124490224620608e+01\n-1.4121738696914825e+00\n1.4476083353765903e-01\n-2.2058807145112553e+01\n1.4400236468663126e+01\n-7.6578590401800636e-02\n-2.8568248330009091e+01\n1.4548442554111013e+01\n-7.6693491774795758e-02\n-2.7575757563233999e+01\n1.4548442736824228e+01\n-7.6693382372330768e-02\n-2.7575757806237004e+01\n1.4680698389566157e+01\n-1.0408331984098590e-01\n-2.8684112316397353e+01\n1.8483616002812833e+00\n1.1338763220080161e-01\n-2.0168337376729923e+01\n-9.3012667885951235e+00\n-2.2725490046109687e-03\n-3.2325576890931245e+01\n-9.0088749633384904e+00\n-4.0446161060883626e-02\n-3.1188533336165264e+01\n1.4327846145045996e+01\n-1.3735084480454973e-01\n-2.9179077623804083e+01\n-2.4178699642131902e+00\n-1.5293614862313001e-02\n-2.2676725163107307e+01\n-1.1521873709800499e+01\n-2.3586576889496627e-01\n-3.2138597425872369e+01\n-1.4503334227654488e-01\n-5.5934662630746208e-02\n-2.0831726131785029e+01\n-2.8893581067070171e+00\n-1.3699020992330796e-01\n-2.2958864022282938e+01\n-8.2723650560813180e+00\n-3.7794334349535980e-01\n-3.1982343531355838e+01\n-2.8113965576788837e+00\n-2.1271464023689618e-01\n-2.2901363356080548e+01\n-1.1457822364770234e+01\n-3.8804596751595000e-01\n-3.2117542509801872e+01\n4.1560505994593795e+00\n-1.7522007616050972e-01\n-2.1385393755332537e+01\n1.4692884888703071e+01\n-6.1278105351775991e-01\n-2.8206086033348637e+01\n1.4754776083903286e+01\n-6.0091261627780113e-01\n-2.7280171931648496e+01\n2.1719444907886283e+00\n-2.9478446782631185e-01\n-2.0332720732691378e+01\n-1.0608605385766692e+01\n-7.7865316634045234e-01\n-3.1523306887234071e+01\n1.4883639978736213e+01\n-8.9680650025245223e-01\n-2.8107615210931499e+01\n1.9077426081766021e+01\n-8.4903199875465341e-01\n-2.9150509156822491e+01\n1.1707911432631752e+00\n-4.9114671411843619e-01\n-2.0435199425579924e+01\n-1.0817489447570468e+01\n-1.0351810618041672e+00\n-3.1019089634845255e+01\n3.3315317024272453e+00\n-5.4092626051290227e-01\n-2.0989591119346226e+01\n1.3967897819250639e+00\n-5.4557950440805525e-01\n-2.0465318826318036e+01\n-1.7778385225681401e+00\n-6.2030534725247444e-01\n-2.1430242902522419e+01\n3.3549072293641937e+00\n-6.0247304448097194e-01\n-2.0739651963861608e+01\n1.6108875090153791e+01\n-1.1596819027813667e+00\n-3.0994971264803976e+01\n1.4690747473039966e+01\n-1.1614697077425038e+00\n-2.8274108397864200e+01\n5.4071984599918066e-01\n-7.4402309047567983e-01\n-2.0628228958377292e+01\n6.5179599812330720e+00\n-8.6745334797157125e-01\n-2.3110126999894998e+01\n1.1454082587592902e-01\n-8.0657935649391665e-01\n-2.0829634659691759e+01\n9.3516003962286987e-02\n-7.8601769947159805e-01\n-2.0874162686534323e+01\n-1.0068783145144600e+00\n-8.5696654821007423e-01\n-2.1102871833487637e+01\n-1.0068783145144600e+00\n-8.5696654821007423e-01\n-2.1102871833487637e+01\n1.4998887604772365e+01\n-1.3282747982180403e+00\n-2.8988112561350217e+01\n1.1950708876972982e+01\n-1.5191591817043915e+00\n-3.0485308123229427e+01\n-9.7947186680763632e-01\n-9.2985966991246216e-01\n-2.0988809317509638e+01\n1.5202031639421955e+01\n-1.4649079110832377e+00\n-2.7593938955525452e+01\n1.4946381316191024e+01\n-1.5206163660339154e+00\n-2.7431176711212562e+01\n1.5079794747887433e+01\n-1.5124888559413454e+00\n-2.7661460953369765e+01\n1.6376388010994255e+01\n-1.6665294419464640e+00\n-3.1394888525780210e+01\n1.2468730878767701e+01\n-1.6790325115666869e+00\n-3.0288570750115436e+01\n-1.9609131016769050e+00\n-1.1002557292274648e+00\n-2.1733753447731431e+01\n1.1809630883711415e+01\n-1.7196289721388556e+00\n-3.0296622304028851e+01\n4.2252068269815002e+00\n-1.1954328820052402e+00\n-2.0984954104952802e+01\n1.5736474928184455e+01\n-1.9952474196438488e+00\n-3.2219113133002949e+01\n-1.7943985959125013e+00\n-1.2524891693634976e+00\n-2.1578758588712468e+01\n1.6904629933526902e+01\n-2.0100042569379313e+00\n-3.1046446314155691e+01\n-7.5091102696104661e+00\n-1.9423623543314064e+00\n-2.9818417709494643e+01\n5.4129445993128233e-01\n-1.2869869422644151e+00\n-2.1389756305692405e+01\n1.1759891449192903e+01\n-2.1158097973000771e+00\n-2.9476471304093707e+01\n1.1494735048493396e+01\n-1.9665111537102746e+00\n-2.9473977997811556e+01\n-2.2289569680566981e+00\n-1.4827880032770908e+00\n-2.1464812252721025e+01\n1.1990005087472039e+01\n-2.2373975388587821e+00\n-2.9626074518413557e+01\n1.1990005087472039e+01\n-2.2373975388587821e+00\n-2.9626074518413557e+01\n1.5453429454345375e+01\n-2.1612247869119883e+00\n-2.7275396400574273e+01\n1.5506117692603972e+01\n-2.1326331790306901e+00\n-2.7373915592443339e+01\n5.3910692151787287e-01\n-1.5367602014438095e+00\n-2.0272443405747914e+01\n-2.4984852710266892e+00\n-1.7480192540759338e+00\n-2.1517437733626526e+01\n4.1040474381268810e+00\n-1.6727099462623831e+00\n-2.2462581092064998e+01\n1.5723741410895597e+01\n-2.2864365595317055e+00\n-2.5405418048017943e+01\n-6.9177361779325874e-01\n-1.8135967569114402e+00\n-2.0847909349285757e+01\n-6.9177361779325874e-01\n-1.8135967569114402e+00\n-2.0847909349285757e+01\n-1.8741447265410385e+00\n-1.8728267011316935e+00\n-2.0960662300330551e+01\n-2.8190707221837434e+00\n-2.0176618094762495e+00\n-2.2271395917882167e+01\n1.6017379465405273e+01\n-2.6757315773392385e+00\n-2.5448676812666509e+01\n1.6191746774257510e+01\n-2.6135156034570803e+00\n-2.4393291258413740e+01\n5.1308236352043339e+00\n-2.0681250076040061e+00\n-2.0928124972294075e+01\n5.3475619387287097e+00\n-2.0808793556978040e+00\n-2.0869800979564641e+01\n-4.2079447715764778e-01\n-2.0269012904048029e+00\n-2.0644027060804156e+01\n-8.1622545313639949e-01\n-2.0705010215905144e+00\n-2.0578557936417553e+01\n-9.5813761951930629e-02\n-2.0975535695210876e+00\n-2.0598961861243968e+01\n1.4682271013761822e+01\n-3.3556092198441303e+00\n-3.0179785615898162e+01\n4.2209678560989552e+00\n-2.2958534050215444e+00\n-2.2420681821663742e+01\n1.5998394688584085e+01\n-3.0943931809117933e+00\n-2.5833318468890273e+01\n1.8617375744511691e+01\n-3.4051641114377005e+00\n-2.9977492294433116e+01\n-8.2783908747295343e-01\n-2.2270419057580257e+00\n-2.0572479448080518e+01\n1.6034528105647560e+01\n-3.0687231420264109e+00\n-2.4578844723441968e+01\n1.9436177348561397e+01\n-3.5005079716285818e+00\n-2.9483128231521565e+01\n2.8461825883454240e-02\n-2.3542547882566791e+00\n-2.0280454464549408e+01\n-1.8681186426735776e+00\n-2.6487363370781623e+00\n-2.1585210938222026e+01\n4.2821371216603064e+00\n-2.4480040274230723e+00\n-2.0347156189382407e+01\n2.8933162172194264e+00\n-2.5373928169524333e+00\n-2.1483180736134575e+01\n-1.2076996342262332e+00\n-2.5491860338625227e+00\n-2.0075008984290982e+01\n7.6302412524035157e-01\n-2.5856583794074113e+00\n-2.0274243919362291e+01\n7.8573128572178186e-01\n-2.6343216431826182e+00\n-2.0054988965286348e+01\n1.3540878685996464e+01\n-3.8985077718047836e+00\n-2.7831891679994158e+01\n-9.9691407787680060e+00\n-3.6903678449340456e+00\n-2.7095424097869525e+01\n-6.9880244180545947e+00\n-3.6510701713897196e+00\n-2.6456260977059504e+01\n3.4161029319525809e+00\n-2.7122396558176303e+00\n-1.9921004328160073e+01\n-6.7934794838734671e+00\n-3.7142206812908927e+00\n-2.6323810725703897e+01\n-1.2336560867320797e-02\n-2.9149624811347969e+00\n-2.0139936007978775e+01\n3.1877978816371235e+00\n-2.8989413787763816e+00\n-1.9746246356222944e+01\n3.1948911740271351e+00\n-2.9073685583115076e+00\n-1.9761948317060131e+01\n-1.0034012151025527e+01\n-3.9127728527876555e+00\n-2.6915281414590687e+01\n-6.7328000795891771e+00\n-3.8668881235512269e+00\n-2.6360796744640979e+01\n-7.0127837100986090e+00\n-3.8885535468337951e+00\n-2.6014567251282113e+01\n1.6499265087863724e+00\n-2.9582470872905335e+00\n-1.9720243296157623e+01\n1.1090103121347662e+01\n-4.1996926143765254e+00\n-2.6722753080433044e+01\n-2.9299320123775779e-01\n-3.1917730544337646e+00\n-2.0587169572076562e+01\n-1.9929059355257142e+00\n-3.5910879681244654e+00\n-2.2645336979836053e+01\n1.9698513689864554e+00\n-3.3735616055649795e+00\n-2.0128370289929773e+01\n5.0285344540748973e+00\n-3.8060711170529120e+00\n-2.2174822626762911e+01\n-6.2431572846513506e+00\n-4.4602434497282486e+00\n-2.6100608914768738e+01\n-1.9707166290652505e+00\n-3.9236178485045659e+00\n-2.2716284322162004e+01\n1.2235327851399756e+01\n-4.6275815513902581e+00\n-2.6262718378447854e+01\n4.2326762540707996e+00\n-3.9640191298935554e+00\n-2.1705389924709817e+01\n2.7515989545150075e+00\n-3.9041357496378226e+00\n-2.1650417123903800e+01\n-5.2683883740320372e+00\n-4.6315946183866066e+00\n-2.5160365191941583e+01\n1.6374904075514547e+01\n-5.6246853838750956e+00\n-2.8610294742674952e+01\n2.1405109552062926e+00\n-4.4384935619668680e+00\n-2.1109183414809777e+01\n2.2299322484149133e+00\n-4.4916575607335458e+00\n-2.1201806776596829e+01\n2.2229872271844999e+00\n-4.4870808532205961e+00\n-2.1167890709394715e+01\n2.1994015085055976e+00\n-4.6534229830351475e+00\n-2.2408864856556654e+01\n2.1111836384091078e+00\n-4.5742340434893123e+00\n-2.1227773937607310e+01\n-1.1792049776896121e+00\n-4.7796581812207535e+00\n-2.2411911075816292e+01\n2.7770823875089845e+00\n-4.6631638796440367e+00\n-2.1377432432061230e+01\n2.9178018991817818e+00\n-4.8909110905740398e+00\n-2.1842193786272979e+01\n5.2220081089488957e-01\n-4.9996106063259669e+00\n-2.1956261170284982e+01\n1.3365025435028139e+01\n-6.4908333359085262e+00\n-2.4676630077333044e+01\n-7.4614582535442286e-01\n-5.5573830112393168e+00\n-2.1599398635370097e+01\n8.5605954326774647e+00\n-6.4708085242554114e+00\n-2.3886831311614667e+01\n8.1799825944037412e+00\n-6.5107059424430895e+00\n-2.3737942210154195e+01\n8.3219747282014129e+00\n-6.5572246941086574e+00\n-2.4129735404144075e+01\n8.3062223050167727e+00\n-6.5625531377145716e+00\n-2.3772583621975159e+01\n1.1097039580004424e+01\n-6.6516677480211017e+00\n-2.3979025512611162e+01\n-5.0555052593141303e+00\n-6.5903083393629025e+00\n-2.3695276435755037e+01\n-8.0965642069219657e-01\n-6.2568607625134396e+00\n-2.2307446450358569e+01\n1.0964821698889171e+01\n-6.9687314107445415e+00\n-2.4209048604461717e+01\n7.5397754380692676e+00\n-6.8086536964946704e+00\n-2.3440433616564224e+01\n1.5734367979524924e+01\n-7.6414735616654337e+00\n-2.6431743255106486e+01\n-2.9354067164595468e+00\n-6.4938354079877874e+00\n-2.2579922629491417e+01\n9.4676365313336621e+00\n-6.8827947012639239e+00\n-2.3320610569814928e+01\n7.8428521605207449e+00\n-6.9660038001442057e+00\n-2.3111895460247773e+01\n1.1074958106987902e+01\n-7.0560253434151541e+00\n-2.3481485167417734e+01\n9.4857468590400340e-01\n-6.6058664203051833e+00\n-2.1872709994923138e+01\n1.6727160398720891e+01\n-8.2308438165462618e+00\n-2.6411390726308557e+01\n7.3568648900004030e+00\n-7.2278025470716747e+00\n-2.2926873647496425e+01\n1.4392561314355051e+01\n-8.0194641465920462e+00\n-2.5256474970434194e+01\n9.0981260755984668e+00\n-7.7995929016802332e+00\n-2.2130623311519308e+01\n7.1375714273718565e+00\n-7.8888416894291886e+00\n-2.1943481491781402e+01\n-3.4481122538098021e+00\n-7.7787601212120041e+00\n-2.1950113638719024e+01\n6.0633975999058540e+00\n-7.7912746591580726e+00\n-2.1427346676620722e+01\n1.4764176906009139e+00\n-7.8906383860617586e+00\n-2.1165810163312482e+01\n-5.2938721710151917e+00\n-7.4468449619628068e+00\n-1.9897577954296217e+01\n-4.5422057679548233e-01\n-7.9445836388047679e+00\n-2.0840598468605542e+01\n1.3031384120580777e+01\n-9.1518132572413293e+00\n-2.3598173905239857e+01\n-1.9570482410845452e-01\n-8.3005968589738561e+00\n-2.1324331905831901e+01\n-1.6577338024579855e+00\n-8.1890620488278696e+00\n-2.1294826479328915e+01\n-9.2476233126473267e-02\n-8.2750754438184284e+00\n-2.1004749821045191e+01\n-1.4054724977899783e+01\n-8.8667358093628756e+00\n-2.2391110443455631e+01\n7.8184981651330423e+00\n-8.4047535499865837e+00\n-2.1130789214759361e+01\n-7.9005367902292944e-01\n-8.2969363401428513e+00\n-2.1142484503518286e+01\n9.5120269149645491e+00\n-8.9170209726585412e+00\n-2.1995383496937929e+01\n-8.0379855074818130e-01\n-8.3846749489507495e+00\n-2.0987374603031363e+01\n9.7173823468442055e-01\n-8.4388705786384364e+00\n-2.0283820147901128e+01\n5.8854173311069289e+00\n-8.7344470873241775e+00\n-2.0863790292504341e+01\n-5.1162235625885533e+00\n-8.6747035914401565e+00\n-2.0847827776978985e+01\n2.4116772623999747e-01\n-8.5528629474291726e+00\n-2.0708424103720208e+01\n2.6750373197880500e-01\n-8.4249475989649287e+00\n-2.0228463617590759e+01\n1.3425253134612085e+01\n1.4886487564983504e+01\n-3.0930567300294708e+01\n-9.2628854606529654e+00\n1.7765450919196777e+01\n-3.8470282649136159e+01\n-7.0890350626609608e+00\n1.8088511466308578e+01\n-3.9235268046752743e+01\n1.5049079057628658e+01\n2.4862995190188329e+01\n-5.4411045012700974e+01\n-1.2492861076700008e+01\n1.6574596448526368e+01\n-3.5794013130315747e+01\n-1.2479332905372274e+01\n1.6513033727503345e+01\n-3.5707775185427003e+01\n2.9574584025681627e+00\n2.1220202739898895e+01\n-4.6662887002684208e+01\n1.4090331576096832e+01\n1.4790323257385136e+01\n-3.1375258149926076e+01\n1.3238509256157101e+01\n2.4791073908267421e+01\n-5.5349643250521062e+01\n-1.5683069231579855e+01\n1.5806650472289585e+01\n-3.4074828999489974e+01\n-1.5835680865017926e+01\n1.6065261571060812e+01\n-3.4642304278788835e+01\n-1.1419564883156939e+01\n1.6879900180262556e+01\n-3.7309642555740297e+01\n-5.2566765876782995e+00\n1.8564949657345739e+01\n-4.1605570464729155e+01\n3.3787926114493605e-01\n2.0267240008283711e+01\n-4.5728579395483344e+01\n8.8829076583362241e+00\n2.2738028770619245e+01\n-5.1590719893066641e+01\n8.8829076583362241e+00\n2.2738028770619245e+01\n-5.1590719893066641e+01\n-1.3192632354493751e+01\n1.5860748900827197e+01\n-3.5087854542856384e+01\n1.7444757024279241e+01\n2.5404702975662268e+01\n-5.7636849474692148e+01\n-1.0036534955005184e+01\n1.6743917625945791e+01\n-3.7716342023429036e+01\n1.8128928329351744e+01\n2.5001359193709803e+01\n-5.6679527148420128e+01\n1.3421597186721218e+01\n1.4483654843303411e+01\n-3.1786893179159758e+01\n-1.2407060538448698e+01\n1.6159150392194093e+01\n-3.6447516554523425e+01\n-1.5220020855413994e+01\n1.5605185084423594e+01\n-3.4924155400182364e+01\n1.0579732793704897e+01\n2.3655516194984507e+01\n-5.4781933470234506e+01\n1.2560530669404164e+01\n1.4753903997056153e+01\n-3.3060404621828056e+01\n7.7908571986134705e+00\n2.1873042659543440e+01\n-5.0743672781987598e+01\n1.3643499559483091e+01\n1.3697431201106957e+01\n-3.0426256077904700e+01\n-9.0721421869214165e+00\n1.6579914105370801e+01\n-3.8790886797896377e+01\n-9.2465699642592032e+00\n1.6960938382845882e+01\n-3.9303904398241528e+01\n7.7668763543201100e+00\n2.1680864822363745e+01\n-5.1063094192670654e+01\n-1.2559965507301630e+01\n1.5999232937414572e+01\n-3.7265454289983083e+01\n-3.7510617202714682e+00\n1.8458650661909836e+01\n-4.3426386831261027e+01\n-3.7204536709377432e+00\n1.8408415515449637e+01\n-4.3373613116991031e+01\n1.2699505461965787e+01\n1.1182336698516579e+01\n-2.4771307675431171e+01\n1.1887657383906745e+01\n1.1385261667419982e+01\n-2.5399507463790322e+01\n1.0613909193614303e+01\n2.3746309005108706e+01\n-5.6528862300071360e+01\n1.2358185421869530e+01\n1.0957649556150528e+01\n-2.4520558483273053e+01\n9.1522446681972411e+00\n2.2008781662710124e+01\n-5.2496456455712710e+01\n-9.6102551517050827e+00\n1.6439733167252886e+01\n-3.9629251878813761e+01\n-9.7522210775967135e+00\n1.6473146065487995e+01\n-3.9297973064541196e+01\n-1.2411948868212827e+01\n1.5621969199093320e+01\n-3.7188688648153409e+01\n-9.1389630560497039e+00\n1.6282373084453017e+01\n-3.9692176763006621e+01\n-9.1813222102171750e+00\n1.6439894562122578e+01\n-4.0001851974596100e+01\n-1.2528729781520175e+01\n1.5348976788877092e+01\n-3.6716530934752996e+01\n-6.6621489556641764e+00\n1.7128366828833332e+01\n-4.1935246958990753e+01\n6.3543275234150642e-01\n1.9233954046234164e+01\n-4.7635507113507586e+01\n1.3931063380473459e+01\n1.0518717882901493e+01\n-2.4111444077160986e+01\n-9.6689536790029074e+00\n1.6012851482373520e+01\n-3.9862031032502266e+01\n1.9696540639017318e+01\n2.3893656092573625e+01\n-5.9182359125061915e+01\n-2.3314755298962411e-01\n1.8606365945927596e+01\n-4.6579519393530219e+01\n1.2979737492026263e+01\n1.3436381791345715e+01\n-3.2455268689610890e+01\n1.3196549301277226e+01\n1.0680586193907670e+01\n-2.5038519124348049e+01\n1.2840206433980340e+01\n1.0228155547701501e+01\n-2.3799371798547821e+01\n3.8318766162629316e+00\n1.9654578881372327e+01\n-4.9531368768346383e+01\n2.6651009311937809e+01\n3.0874683357325068e+01\n-7.8637344201946732e+01\n-2.6688117892344344e+01\n2.0481459615552804e+01\n-5.0834166863716028e+01\n1.0319229787986697e+00\n1.8694586558045970e+01\n-4.7779092595509553e+01\n1.3534789804940665e+01\n1.0235594075076939e+01\n-2.4112725263320083e+01\n-2.8290874932213850e+01\n2.1686130998846462e+01\n-5.4294813867339116e+01\n1.2681164504928729e+01\n1.0671709846250000e+01\n-2.5716963118629263e+01\n4.7228861852194198e-01\n1.8728128485071423e+01\n-4.8796034667144980e+01\n3.9881522950799525e-01\n1.8183144396324490e+01\n-4.7229345285461868e+01\n-2.1584747402982294e+00\n1.7838249776535420e+01\n-4.6497072554135102e+01\n4.2362031296733100e+00\n1.9161770429311201e+01\n-4.9996226812077992e+01\n1.3872407827840991e+01\n9.2325462292947904e+00\n-2.2211613390342247e+01\n-9.3968258305680035e+00\n1.5729914586196326e+01\n-4.0949577689081707e+01\n-1.2429547471363014e+00\n1.7912316279994123e+01\n-4.6635037204539735e+01\n-1.2382252709915744e+00\n1.7925215684414038e+01\n-4.6697134080677912e+01\n7.4782936427944300e+00\n2.0245242260137864e+01\n-5.2768212273912631e+01\n1.3125886301392971e+01\n1.3687513425428261e+01\n-3.4681737845280828e+01\n1.2895462601516005e+01\n1.3665038323235263e+01\n-3.4760121371638490e+01\n1.2505676089235754e+01\n1.0048342118259377e+01\n-2.4668588165676560e+01\n1.3421830347988021e+01\n1.3366104814072008e+01\n-3.3950198578717647e+01\n1.3421830347988021e+01\n1.3366104814072008e+01\n-3.3950198578717647e+01\n-3.4857595098321763e+00\n1.7095681322980440e+01\n-4.5107263907343338e+01\n-2.0534599574290167e+00\n1.7679530198321299e+01\n-4.6645420398977876e+01\n1.4071495784113575e+01\n9.6498256984324726e+00\n-2.3411124117974488e+01\n-1.6200703415191896e+01\n1.4938016867913056e+01\n-3.8937055151114386e+01\n9.4162062013776282e+00\n2.0465609824628974e+01\n-5.4577756567506896e+01\n-1.0700510664772494e+01\n1.4999932749898228e+01\n-3.9475695009030680e+01\n-1.0700510664772494e+01\n1.4999932749898228e+01\n-3.9475695009030680e+01\n7.8001814226887110e+00\n1.9991652639184050e+01\n-5.3531985550918193e+01\n1.9772778183148415e-01\n1.8101700061613499e+01\n-4.8429351571899943e+01\n-3.3428226648226613e+00\n1.7016209912379718e+01\n-4.5638073300595259e+01\n-1.2366399413784045e+01\n1.4654193934960482e+01\n-3.8578361381217732e+01\n-6.1769157681166806e+00\n1.6264641903026391e+01\n-4.3721987677429063e+01\n-3.6452677924834642e+00\n1.6727696134760258e+01\n-4.5244526181377829e+01\n-3.6311498108401201e+00\n1.6665124430354705e+01\n-4.5157094454398383e+01\n-3.6417998317574063e+00\n1.6880297724448418e+01\n-4.5683839334800574e+01\n-1.4455753923490942e+01\n1.3308287638057545e+01\n-3.4872143195587547e+01\n-3.1650468180774078e+00\n1.6723160793595472e+01\n-4.5812408592311677e+01\n3.2591847827718817e-01\n1.7714856704388193e+01\n-4.8498464609962035e+01\n-7.3399102981331605e+00\n1.5712027341142472e+01\n-4.2978657257362023e+01\n-1.5700552845193537e+01\n1.4847373062335119e+01\n-4.0023965932065039e+01\n1.3919186527299555e+01\n9.0881022195682970e+00\n-2.3078907053402489e+01\n1.2612614671915990e+01\n1.3047539361770333e+01\n-3.4832689340955667e+01\n-1.8890775178840375e+00\n1.6448977708345225e+01\n-4.5589801498425274e+01\n3.0562396274210812e-01\n1.7477843371609008e+01\n-4.8881176995302013e+01\n1.4478378706873736e+01\n9.2632722174948388e+00\n-2.3809972660264567e+01\n1.4411835011137732e+01\n8.7498387302962861e+00\n-2.2257512763961419e+01\n1.4504112921828748e+01\n8.5474421110704775e+00\n-2.1634350671408068e+01\n-2.9809708125372754e+01\n2.1079916131870263e+01\n-5.8134812484511926e+01\n1.2668428281402349e+01\n1.2696408209959811e+01\n-3.4867120788953258e+01\n1.2688991017600426e+01\n1.2707400740310472e+01\n-3.4856171274208570e+01\n1.3520015887083652e+01\n1.2704057197235237e+01\n-3.4684516473693819e+01\n-1.6407785318557799e-01\n1.7196049656062609e+01\n-4.8861117019916016e+01\n3.0665885284866429e-01\n1.7239266737188601e+01\n-4.9084615397335227e+01\n-9.9340203144996408e+00\n1.4703687550261959e+01\n-4.2232878191677294e+01\n-6.7599205971298160e+00\n1.5496678614819205e+01\n-4.4556433968918803e+01\n-6.8703510618277903e+00\n1.5248279383055685e+01\n-4.4590906444853388e+01\n-7.4839381179845352e+00\n1.5042276194691121e+01\n-4.3807260182193502e+01\n-9.8888819220219997e+00\n1.4244566785066636e+01\n-4.2140145206016889e+01\n-1.2666944479487828e+01\n1.3602409337727954e+01\n-3.9978721971200279e+01\n-7.5173974728770032e+00\n1.4778577695576898e+01\n-4.4210742117069458e+01\n-1.3090047440492109e+01\n1.3184647325964741e+01\n-3.9193754081380852e+01\n-8.2114545261263050e+00\n1.4661329983538959e+01\n-4.4138114818501634e+01\n-4.0649748624586941e+00\n1.5581781700551987e+01\n-4.6923225030905414e+01\n-1.1945833929803189e+01\n1.3388103539413843e+01\n-4.0227282291569871e+01\n-1.1945833929803189e+01\n1.3388103539413843e+01\n-4.0227282291569871e+01\n-7.8549156753973781e+00\n1.4367472573834375e+01\n-4.3310688776724234e+01\n-7.7942317758602941e+00\n1.4469896728462267e+01\n-4.3666335279325736e+01\n-1.1033169869789761e+01\n1.3791077387028023e+01\n-4.1544364536976190e+01\n1.2338208641778028e+01\n8.8754714797047924e+00\n-2.5405305726876680e+01\n-9.3664824200729981e+00\n1.3823328051377034e+01\n-4.2258092330450381e+01\n-8.1027951123785975e+00\n1.4061864009465653e+01\n-4.3811503045660970e+01\n1.1928548159186132e+01\n9.0600441714697286e+00\n-2.6942024013717102e+01\n1.1783322963155449e+01\n9.0005044509649732e+00\n-2.6904607791237893e+01\n-3.6945621695532247e+00\n1.4994683830888958e+01\n-4.7704275639535808e+01\n-9.9495802969886462e+00\n1.3422462994281256e+01\n-4.2845828650273212e+01\n-9.9419311375807080e+00\n1.3510284626631478e+01\n-4.3156357530289817e+01\n-9.9618151312944967e+00\n1.3116501487312791e+01\n-4.2773094083477908e+01\n-1.0002325137676541e+01\n1.3240723127984399e+01\n-4.2894779880913738e+01\n6.2262421074566754e-01\n1.5808496108730481e+01\n-5.1834161726124044e+01\n5.9776423056438921e-01\n1.5856006864645975e+01\n-5.1906542706720650e+01\n-1.6604430861506959e+01\n1.2605283854670255e+01\n-4.0742241624754968e+01\n-1.0420242447464187e+01\n1.3343527255508551e+01\n-4.3450699737213426e+01\n1.3146938166377444e+01\n1.0685542662862391e+01\n-3.4135079982733572e+01\n-1.4629135601425570e+01\n1.2326091695850167e+01\n-3.9693125155376705e+01\n-1.4560125739787168e+01\n1.2289060389941261e+01\n-3.9549351146409535e+01\n1.3512832854885326e+01\n1.0359639842373651e+01\n-3.3964674659350543e+01\n-7.4597109237027297e+00\n1.3507099387917689e+01\n-4.5955887742196808e+01\n1.3044340730604004e+01\n9.9742784457171005e+00\n-3.2471909740957742e+01\n1.2558005520313770e+01\n7.9546509856882706e+00\n-2.5491782115229316e+01\n1.3876329587570158e+01\n9.9629623778401566e+00\n-3.3507262403073163e+01\n1.3329073194986487e+01\n1.0053050325685559e+01\n-3.3689622509300371e+01\n-1.4208189418495115e+01\n1.1892443417649892e+01\n-4.1033069510795009e+01\n1.2978011917275181e+01\n1.0648661333540897e+01\n-3.6211839296859708e+01\n1.5151645742399838e+01\n7.4220577693608352e+00\n-2.3553318166974151e+01\n-2.9661715458676266e+01\n1.6523120280009330e+01\n-5.7059405512017769e+01\n1.3620470089774800e+01\n9.8077287284971320e+00\n-3.3771378252003196e+01\n1.3424813533220918e+01\n9.8322681152930080e+00\n-3.3578200513196684e+01\n1.2402911222051683e+01\n7.7163253397417204e+00\n-2.5665006033651473e+01\n-1.7049719253314262e+01\n1.1582647622501497e+01\n-4.0032750314065190e+01\n-1.7091909679141885e+01\n1.1588610580152269e+01\n-4.0147286064494224e+01\n-1.2934239301189038e+01\n1.1843292409028104e+01\n-4.2127924477964719e+01\n-1.1499470526493344e+01\n1.1886755454046902e+01\n-4.2646835713669432e+01\n1.3957665678816291e+01\n7.1095277469870268e+00\n-2.3907191899703427e+01\n-1.6924484715714065e+01\n1.1548430035899122e+01\n-4.0966304910695037e+01\n1.4065702261832831e+01\n6.6734344335035312e+00\n-2.2740957899600815e+01\n1.4042427032028229e+01\n6.7051698064013801e+00\n-2.2741460078588005e+01\n1.4589526614124187e+01\n6.6505579024239028e+00\n-2.2518752831822958e+01\n1.3648764365347381e+01\n1.3467742691353651e+01\n-5.0339586032583895e+01\n-1.1516403198088822e+01\n1.1761241632034903e+01\n-4.4379648670164244e+01\n-6.2612815410072420e+00\n1.2373393499029914e+01\n-4.8236031399218099e+01\n-1.6982656990396553e+01\n1.0953182774904441e+01\n-4.1104943646868300e+01\n-1.5721582219846923e+01\n1.0933234835281326e+01\n-4.2087295706327311e+01\n-1.4188178915760236e+01\n1.0453275806394892e+01\n-4.1243994907477017e+01\n-1.4234506060437763e+01\n1.0853210480815138e+01\n-4.2452527817256858e+01\n-2.6130039572857310e+01\n1.3381108436191461e+01\n-5.2156526845106981e+01\n1.2348380029037417e+01\n7.1746833912601646e+00\n-2.7558086179733081e+01\n1.2176422333062972e+01\n7.1839530161186271e+00\n-2.7371515039662174e+01\n1.3051409376567733e+01\n6.7941362664535339e+00\n-2.6219364741062098e+01\n1.3891206764662998e+01\n6.3106798963649409e+00\n-2.3911489877477230e+01\n1.2275109811878639e+01\n7.1061224479286622e+00\n-2.7546999094453678e+01\n1.4917092986619357e+01\n6.7105667283893995e+00\n-2.5093337700221326e+01\n8.7946598041736757e-01\n1.1781347774787944e+01\n-4.8742167351505088e+01\n1.4912538893984420e+01\n6.0858744465378374e+00\n-2.2804065378630106e+01\n1.4769666250365059e+01\n5.9083959983151919e+00\n-2.2621402312986884e+01\n2.7090403155105238e+00\n1.1248963474954433e+01\n-4.7668549966923052e+01\n1.3312107410411274e+01\n6.4315941015010525e+00\n-2.5633413854061992e+01\n2.1665215276554579e+00\n1.1279572017172377e+01\n-4.8070997095439488e+01\n1.1979218590404694e+01\n6.8883991721222797e+00\n-2.7670440351323347e+01\n-1.7556151135602914e+01\n9.8105744379992341e+00\n-4.1996715289674789e+01\n2.5931655723575826e+00\n1.0743925275403610e+01\n-4.6886445790981895e+01\n-8.6146524219618019e+00\n1.0709387273318743e+01\n-4.6731783518612900e+01\n1.2597544641982326e+01\n7.0789748656606823e+00\n-2.9563599300826127e+01\n2.4333459929126056e+00\n1.0394332552488963e+01\n-4.6002462123474231e+01\n2.7947988792010832e+00\n1.0714034778542150e+01\n-4.7283114678519510e+01\n2.7260276835785797e+00\n1.0518733170350083e+01\n-4.6425952037244642e+01\n1.4000636976655450e+01\n5.9310148756182883e+00\n-2.4506715393637624e+01\n-7.0299719827199745e+00\n1.0337281488431817e+01\n-4.6252050768038607e+01\n-4.0560989505475364e-01\n1.0381881865495178e+01\n-4.6500682970346787e+01\n-3.9364836317664215e-01\n1.0389678669808337e+01\n-4.6815212303287524e+01\n2.9350732929401859e+00\n1.0311483908153157e+01\n-4.6190636111010427e+01\n-1.1152633434371482e+00\n1.0184435544134475e+01\n-4.6112566810562569e+01\n-2.3969876483960896e+01\n1.0771501072641103e+01\n-4.7779451726578174e+01\n-1.6275481786388248e+01\n9.2069355411020464e+00\n-4.1639721441028527e+01\n1.0103719859312399e+01\n9.8025269194812612e+00\n-4.5463767368619877e+01\n-6.4253468050475835e+00\n9.9055792274860632e+00\n-4.6284270449053707e+01\n-1.6938266520162632e+01\n8.7483626107492132e+00\n-4.0805725993137763e+01\n-2.3327259749520078e+01\n9.9955978072363738e+00\n-4.6692589648368333e+01\n1.4372379611042918e+01\n4.9603726870647389e+00\n-2.2079286733825978e+01\n-1.6706365956966884e+01\n8.6343071022880107e+00\n-4.0687374922426656e+01\n1.3050123930558680e+01\n5.8368933463200303e+00\n-2.7140545580371800e+01\n1.4686035906894453e+01\n4.9368057677546728e+00\n-2.2215196810374223e+01\n-4.8753891166835644e-01\n9.1573908152003369e+00\n-4.4685084369153884e+01\n7.7058917021889899e+00\n9.5849516314908882e+00\n-4.6299950351841900e+01\n-1.7476045038331240e+01\n8.5967326232801629e+00\n-4.2366660551643250e+01\n1.4668446757849571e+01\n4.9046020016535623e+00\n-2.2916789729395276e+01\n1.4607833379711149e+01\n4.7960825269102676e+00\n-2.2470689356512359e+01\n-2.4991219875100779e+00\n8.7406323162249979e+00\n-4.4880516037702257e+01\n1.4831110738931994e+01\n4.8750125224275447e+00\n-2.2898663031772394e+01\n1.4702436943337743e+01\n4.7534187288832950e+00\n-2.2646066902125170e+01\n1.4584075711410017e+01\n4.7248041324747296e+00\n-2.2634205851147932e+01\n1.4494368646050907e+01\n4.5712336182038511e+00\n-2.2119445505212823e+01\n1.5561876006339622e+01\n5.0304711355920686e+00\n-2.3723889898833487e+01\n1.5561876006339622e+01\n5.0304711355920686e+00\n-2.3723889898833487e+01\n-1.0563496000321205e+01\n7.6952057631540036e+00\n-4.1569479892048008e+01\n1.3072542631802138e+01\n6.0088178535274333e+00\n-3.2079217924053737e+01\n1.2888955726200397e+01\n5.3727288859913802e+00\n-2.8301238881012466e+01\n1.3919029796445754e+01\n4.9799199975961583e+00\n-2.5685495932106924e+01\n1.5378186154654864e+01\n4.8581924038351794e+00\n-2.3975627245171978e+01\n1.4574888531475848e+01\n4.4415808034522772e+00\n-2.2796645096430264e+01\n-6.7927353645536204e-01\n7.4521955469689445e+00\n-4.2655531436709047e+01\n1.2786330280773340e+01\n5.0830112713786830e+00\n-2.8747581035124380e+01\n1.2747271235368622e+01\n5.0099309527142708e+00\n-2.8682468631192954e+01\n1.6250889213853132e+01\n5.0813682322298650e+00\n-2.9637232595218578e+01\n1.2775453140177461e+01\n4.8087759526181992e+00\n-2.8833212354980727e+01\n-1.8168169133161765e+00\n6.6834681526646946e+00\n-4.1638540066909528e+01\n1.4276202675326218e+01\n4.4710651703768480e+00\n-2.6101843976571462e+01\n1.4023706064202289e+01\n4.3723832480955283e+00\n-2.5626677919378974e+01\n1.1663162574503907e+00\n3.9936149368609137e+00\n-2.4309696915412509e+01\n1.4394525286461800e+01\n3.7641217613164013e+00\n-2.2932156286228601e+01\n1.4610581017465144e+01\n3.8515403156648973e+00\n-2.3296629658303722e+01\n-9.6358473865986358e+00\n6.0243010733264972e+00\n-3.9636014843320801e+01\n1.3712529725245682e+01\n4.2562614071346090e+00\n-2.6305780592105720e+01\n1.3641920474361035e+01\n4.2247313139344209e+00\n-2.6459397203585457e+01\n-7.3347416578466680e+00\n5.8789989702725167e+00\n-4.0024448908552543e+01\n1.3895995852172000e+01\n3.9771194803492986e+00\n-2.5494830989165244e+01\n-3.3106665201043346e+00\n5.9537212584295887e+00\n-4.0612914517138208e+01\n-1.4508779178925259e+01\n4.9682589856093351e+00\n-3.4537110911540353e+01\n-8.1693030679645098e+00\n5.7294800520459859e+00\n-4.0235252614776464e+01\n1.2690407072497822e+01\n4.4308731926659144e+00\n-2.9181635992115876e+01\n-7.4395032670095018e+00\n5.6497855296020738e+00\n-4.0321706356530292e+01\n-6.5738727033188935e+00\n5.5486332858077958e+00\n-3.9304516024220746e+01\n-7.8662829049346419e+00\n5.3002555194978402e+00\n-3.9148850081571034e+01\n1.5094368613533502e+01\n3.4375454638519485e+00\n-2.3506073892778375e+01\n1.3180813359561229e+01\n3.9013069216166287e+00\n-2.8276939886499438e+01\n-2.4641563772233336e+01\n5.4402925851644941e+00\n-3.9305603368135536e+01\n-9.7904725820782745e-01\n3.2922809987930113e+00\n-2.3901466890379183e+01\n1.3754670396859819e+01\n3.6809168648918242e+00\n-2.7358335931258633e+01\n-4.6570351475754475e+00\n4.9116272691049900e+00\n-3.9188244053627614e+01\n1.3982619990047933e+01\n3.5528545654118289e+00\n-2.6622519937199641e+01\n1.4076981480679379e+01\n3.5634667237638316e+00\n-2.6769368031138590e+01\n-1.2940729222326860e+01\n4.8392134462597349e+00\n-3.8255517320187543e+01\n-8.6714581910361090e+00\n4.7202526254882136e+00\n-3.7911158219433617e+01\n1.4389563298033146e+01\n3.6084855930140147e+00\n-2.7027482693402703e+01\n1.3989280892488058e+01\n3.2739364487182798e+00\n-2.5573830003823605e+01\n1.4123887837779833e+01\n3.3485675617047739e+00\n-2.5852362387058502e+01\n1.4165661175702621e+01\n3.0729062695540148e+00\n-2.4137213896342463e+01\n1.3886913769704977e+01\n3.1509844264843796e+00\n-2.5932733723494763e+01\n1.4311186056645653e+01\n3.1560301283250793e+00\n-2.5248130909695533e+01\n1.4058197036352423e+01\n3.0786695675555227e+00\n-2.5186176181975529e+01\n-1.7230666313199390e+00\n3.1287473526808700e+00\n-2.6024502597013907e+01\n1.3871482577679672e+01\n3.0546487953640198e+00\n-2.6562827974748611e+01\n1.3871482577679672e+01\n3.0546487953640198e+00\n-2.6562827974748611e+01\n-1.9569457147753158e+00\n3.0657466498680632e+00\n-2.6410351608868609e+01\n1.4820900201815915e+01\n2.7331187935753842e+00\n-2.3689183272513258e+01\n1.5013413785785904e+01\n2.7692677243249952e+00\n-2.3981562482123564e+01\n1.5013413785785904e+01\n2.7692677243249952e+00\n-2.3981562482123564e+01\n1.3935390677415858e+01\n2.8833112184290575e+00\n-2.6103860140402819e+01\n1.4000983365665089e+01\n2.9182472624249112e+00\n-2.6686280975923644e+01\n1.4448266768396826e+01\n2.7929326567989490e+00\n-2.5321861859225564e+01\n1.4388874438232444e+01\n2.7616093722053301e+00\n-2.5255514337195677e+01\n2.8491367247797317e-01\n2.4749890148914981e+00\n-2.1705596967333349e+01\n1.3453874561242388e+01\n3.0495023171660982e+00\n-2.9092122194211761e+01\n-1.9220052408892387e+00\n2.7263789749006615e+00\n-2.5788318948011433e+01\n1.3099175271770049e+01\n3.0501684120736603e+00\n-3.0340642879723642e+01\n1.3085922457853886e+01\n3.1087947418927975e+00\n-3.0381091644419826e+01\n1.4209574984688802e+01\n2.6229011411986827e+00\n-2.5202898952473173e+01\n1.4525062437725595e+01\n2.6035477418197264e+00\n-2.4912007500760367e+01\n1.4540514700546359e+01\n2.4974942320500295e+00\n-2.4083896393577604e+01\n4.3905768103111482e+00\n2.4146441188528875e+00\n-2.3408469268252329e+01\n1.4744850506900015e+01\n2.4400656574933217e+00\n-2.5092521085001021e+01\n1.4129067703216993e+01\n2.4960744042256211e+00\n-2.6706015102198883e+01\n-7.7222936411756917e+00\n3.3354130040022545e+00\n-3.6552350044189012e+01\n1.4500949574537012e+01\n2.4838545493170536e+00\n-2.5857517818598456e+01\n1.4360833275481312e+01\n2.4547009754856162e+00\n-2.5623099519777014e+01\n-7.7599127866682833e+00\n3.2838656439498601e+00\n-3.6745347083248305e+01\n1.3384547003656378e+01\n3.0027974116461533e+00\n-3.3404841020829068e+01\n1.4532265006816422e+01\n2.3664733356786924e+00\n-2.6207260387627294e+01\n1.4592806289239597e+01\n2.2519185133714394e+00\n-2.5100206579254717e+01\n1.3106982097835223e+01\n2.7673627134719361e+00\n-3.2349096540952146e+01\n-7.0677684732473205e+00\n2.9859951944614638e+00\n-3.6151395080363400e+01\n9.6961720205631452e-01\n2.0087805175406857e+00\n-2.1465792292793747e+01\n1.3893918895124434e+01\n2.2812812231568196e+00\n-2.7609417218725284e+01\n1.4337919168260026e+01\n2.1657400520425139e+00\n-2.5691755297137963e+01\n1.3680394546525262e+01\n2.8587688417067660e+00\n-3.4928005025451412e+01\n1.3925721738821718e+01\n2.1498269270704795e+00\n-2.7412914402517636e+01\n1.4164147427042460e+01\n2.1833247086183243e+00\n-2.7607414435501205e+01\n1.5137201777282552e-01\n1.6882546286112790e+00\n-2.1166363159206824e+01\n-7.7847620144789387e+00\n2.3708387883344915e+00\n-3.5601081362320080e+01\n1.4064196787874113e+01\n1.9183908744079985e+00\n-2.8187001943794616e+01\n1.5717084429523208e+01\n2.1402493988482529e+00\n-3.1332320682438620e+01\n-1.2890242863081001e+01\n2.3885566825631201e+00\n-3.5661521428328747e+01\n1.4310758449580547e+01\n1.8105165214279921e+00\n-2.7120454502614027e+01\n1.4043603563195708e+00\n1.5812929624434353e+00\n-2.0759001290889930e+01\n1.4228588156109836e+01\n1.6938162617559258e+00\n-2.7495997686290497e+01\n1.9879985393352404e+00\n1.4404237244723079e+00\n-2.1204420950613134e+01\n1.5140109807020096e+01\n1.6079181101314606e+00\n-2.4507069414283741e+01\n-1.1718827210190437e+01\n2.0209400655349992e+00\n-3.4875802468539511e+01\n1.4174670116228000e+01\n1.6307156931693607e+00\n-2.7806515906562403e+01\n1.4449359544620567e+01\n1.5858988702390953e+00\n-2.7213391202214421e+01\n1.4951249966891645e+01\n1.3021226779289898e+00\n-2.4355223490303096e+01\n1.4034605219267061e+01\n1.3939023976437925e+00\n-2.8353470786903021e+01\n1.5245122408428580e+01\n1.2814211082921270e+00\n-2.4232010534240182e+01\n1.4572026408519498e+01\n1.2951038206570638e+00\n-2.6488502798103458e+01\n1.4086991732561232e+01\n1.3255854043087234e+00\n-2.8798076964090800e+01\n1.3357264920674483e+01\n1.5125283514898484e+00\n-3.5148842493821746e+01\n1.4634483636634158e+01\n1.1621095169969868e+00\n-2.6289731969711486e+01\n1.4634483636634158e+01\n1.1621095169969868e+00\n-2.6289731969711486e+01\n-2.0660163609141332e+01\n1.5041975238118825e+00\n-3.4475625874207481e+01\n-7.8952222608060403e+00\n1.4447595776428783e+00\n-3.3856955512192066e+01\n-1.4559369046564221e+00\n1.0172271478966579e+00\n-2.2356975557144725e+01\n3.1866477045468353e+00\n1.0218311498987656e+00\n-2.2006435643395097e+01\n1.4359965387214315e+01\n1.0282239719299853e+00\n-2.7451436632893749e+01\n1.5068514166900753e+01\n9.7423907674690902e-01\n-2.4271404017304594e+01\n1.4884893297240961e+01\n8.9583507694648534e-01\n-2.6260416799422799e+01\n1.1824089172772771e+01\n1.1649508108164690e+00\n-3.4157693193958046e+01\n1.3252150467743114e+01\n9.9788773571386136e-01\n-3.2223512569601404e+01\n1.4223196488245136e+01\n1.1449005805080483e+00\n-3.2226169805057388e+01\n1.4339175450075548e+01\n8.8388996767486860e-01\n-2.7679281467450224e+01\n1.4339175450075548e+01\n8.8388996767486860e-01\n-2.7679281467450224e+01\n4.1206753516609034e+00\n8.0193651786399489e-01\n-2.1227816223319849e+01\n1.4678797935251760e+01\n8.1276473364241986e-01\n-2.6241162321256095e+01\n-8.9968724203715347e+00\n1.0779122520036206e+00\n-3.3454212940376820e+01\n1.4403884549008342e+01\n7.6035243371508954e-01\n-2.6926325250839525e+01\n-1.0306299447975968e+01\n9.6822056436310222e-01\n-3.3537811214514470e+01\n-1.0671447292616438e+01\n8.9269528917158236e-01\n-3.3416681410873267e+01\n-1.9109016633169020e+00\n7.3065403840462284e-01\n-2.2817719882751206e+01\n-8.5556113236036531e+00\n9.0773206961031427e-01\n-3.3263623079594829e+01\n4.4459735870222188e+00\n6.7855130386632578e-01\n-2.1510053392332125e+01\n1.4511118061057951e+01\n6.9291036476891643e-01\n-2.7492155945213462e+01\n1.4511118061057951e+01\n6.9291036476891643e-01\n-2.7492155945213462e+01\n1.5322043668962682e+01\n7.4538892608362384e-01\n-2.4124111793154576e+01\n1.5241890660372439e+01\n6.9404716220431839e-01\n-2.3983425816035268e+01\n1.3859852430279691e+01\n7.7208584008051895e-01\n-2.9310993577302401e+01\n1.3773310431621399e+01\n7.5871531264150627e-01\n-2.9195759470946861e+01\n1.5558881153019554e+01\n7.7297345851725219e-01\n-2.7773124651008274e+01\n1.4661203550473727e+01\n7.0507203994390366e-01\n-2.6268258582507229e+01\n1.4646442705944219e+01\n6.6259955338760157e-01\n-2.6212579605743322e+01\n-1.0532616055167489e+01\n8.1458445814649083e-01\n-3.3335247489994394e+01\n1.2921155042988049e+01\n8.1853931258468227e-01\n-3.4129367183806899e+01\n-1.0791445429026219e+01\n8.0295094096257191e-01\n-3.3372756474493791e+01\n1.4233428907278780e+01\n5.9077828308791513e-01\n-2.9136319705395874e+01\n1.4048764155106364e+01\n6.2650164192971713e-01\n-2.8849598020056931e+01\n-1.1798150446398935e+01\n7.8995226635156401e-01\n-3.3674205132281287e+01\n1.5399728367343364e+01\n5.5403895360717781e-01\n-2.3991778869667634e+01\n-1.0146949438105855e+01\n7.0882106987956972e-01\n-3.3263900690099973e+01\n1.3899969145268539e+01\n6.7872710122717694e-01\n-3.3205641165591935e+01\n-8.4511144186008114e+00\n5.0968870249759979e-01\n-3.2633421761267591e+01\n1.4209382639307981e+01\n3.8533353446098639e-01\n-3.0028739043653040e+01\n1.5374976817738856e+01\n2.7841755410904240e-01\n-2.3265262056708973e+01\n-8.5113733169329375e+00\n4.3818737443001182e-01\n-3.2447535440818214e+01\n1.4377732007173643e+01\n2.5040807450421326e-01\n-3.1997623488148083e+01\n1.4760978196435969e+01\n2.6431043225167961e-01\n-3.2738959377205553e+01\n1.4610935111019984e+01\n1.8069629119183842e-01\n-2.7182969160145337e+01\n1.4930959028637846e+01\n1.8481648550407578e-01\n-2.6662963036033130e+01\n1.4247981203509811e+01\n2.5869196811350448e-01\n-3.0502966397217676e+01\n-1.2349404225747083e+01\n2.6441761742403708e-01\n-3.2695172217135564e+01\n1.4564493913617003e+01\n1.1551787967796177e-01\n-2.8215666036554627e+01\n1.4659660843696571e+01\n-6.2836552625152614e-02\n-2.7329632035679406e+01\n1.4672047698865823e+01\n-7.2893436030304709e-02\n-2.7305972928326668e+01\n1.4774129253734207e+01\n-6.9356822198765572e-02\n-2.7376182123982058e+01\n1.4319385213096606e+01\n-9.5408326731705351e-02\n-2.8727248965327860e+01\n2.7227218526993355e+00\n1.3274170943265545e-01\n-2.1581647146568180e+01\n6.1830230472565919e+00\n5.2476802111613215e-02\n-2.5033712744692956e+01\n4.2745849753354985e+00\n-6.7982049555412804e-04\n-2.1988512826405785e+01\n-9.0995783667732635e+00\n-2.1507975638450436e-01\n-3.2205647471644134e+01\n-9.0703796341689795e+00\n-2.3921162135130830e-01\n-3.2143648938644560e+01\n-1.1895386872780671e+00\n-5.8023987199694753e-02\n-2.1803429223165821e+01\n-1.0506592628933443e+01\n-3.2018671552221822e-01\n-3.1883695393296112e+01\n-3.4825238024509293e+00\n-1.5167195005889772e-01\n-2.3088021297783609e+01\n-1.4873252624431959e+00\n-1.6680472688365533e-01\n-2.2260341635994664e+01\n2.7635123554007470e+00\n-1.5518808123494296e-01\n-2.0448942197829780e+01\n-9.8448121783772695e+00\n-3.8127149201224320e-01\n-3.0216196868415043e+01\n-8.9735248882539800e+00\n-3.7718422441614624e-01\n-3.1900297589175572e+01\n1.5468917361124884e+01\n-4.2709782073533559e-01\n-2.8581053834889666e+01\n1.4776966064542464e+01\n-4.7385203869532871e-01\n-2.7354553376866011e+01\n-1.0632772303405519e+01\n-4.9511512163637089e-01\n-3.1776679952692596e+01\n4.2254451552644650e+00\n-3.6301132729959834e-01\n-2.1410100063720151e+01\n-8.1304709147793552e+00\n-8.6151152597596792e-01\n-3.1273789683499974e+01\n1.5617586457122430e+01\n-6.0217334160566549e-01\n-2.6410919096531835e+01\n-8.0283487668212654e+00\n-8.0286196397112453e-01\n-3.1441995952180935e+01\n-3.3972798748470217e+00\n-4.8613529428771873e-01\n-2.2794996052890685e+01\n-3.3863933145849470e+00\n-4.9557028066622200e-01\n-2.2710844812414596e+01\n1.4556168593818490e+00\n-4.2875136479824638e-01\n-2.0516088618490059e+01\n1.4218519783064658e+00\n-4.3208910406986223e-01\n-2.0354676773568631e+01\n1.6142632922887248e+01\n-8.6795967161866006e-01\n-3.1095959249584030e+01\n1.4660773498736699e+01\n-9.7537152161374252e-01\n-2.9095960649599341e+01\n1.5595770693461041e+01\n-8.2545195588702958e-01\n-2.5263132397568491e+01\n-1.1140807703403379e+01\n-1.2359227214948758e+00\n-3.1025245720535249e+01\n1.4820583712674670e+01\n-1.4000168035648961e+00\n-2.8726658468074778e+01\n-9.3265219973495288e+00\n-1.7190064525209612e+00\n-3.0095358467661782e+01\n4.4362517058448390e+00\n-1.1712396657012418e+00\n-2.1045938864132960e+01\n1.2097798289236705e+01\n-1.9138155388683644e+00\n-3.0669893855778284e+01\n1.5484451738272568e+01\n-1.7757155658653418e+00\n-2.6926930867983344e+01\n-9.1325077335999505e-01\n-1.3432516060822137e+00\n-2.0898127880931973e+01\n-9.2938539576659736e+00\n-1.9165775772355893e+00\n-2.7889550955491025e+01\n1.4862425063732216e+01\n-2.2800565645079605e+00\n-2.9013171960293022e+01\n-8.9253968890496704e+00\n-1.9886855112204327e+00\n-2.8315940336033336e+01\n1.5709666855000833e+01\n-2.3302490006224184e+00\n-2.6003414173679264e+01\n1.5550236842380354e+01\n-2.2103381188991174e+00\n-2.5792173460854730e+01\n1.5879310038491861e+00\n-1.6200372854702780e+00\n-2.0263030475884452e+01\n2.9262339421476113e+00\n-1.7193432022990953e+00\n-2.1729573190109452e+01\n1.9421470813261348e+00\n-1.6490614445547742e+00\n-2.0729519366078385e+01\n-3.7077069262245295e+00\n-2.1435672203936300e+00\n-2.4883045851291641e+01\n4.1655781307442530e-01\n-1.7444455618288552e+00\n-2.0287920848694970e+01\n4.0172595171915884e+00\n-1.7886746727728817e+00\n-2.0888992784797580e+01\n1.5988226489738603e+01\n-2.4587408977631875e+00\n-2.5468584984539174e+01\n2.2666247677873481e+00\n-1.8229357107188824e+00\n-2.1393626089648528e+01\n1.7901004686141238e+01\n-2.8776796098507491e+00\n-3.0146390331190418e+01\n1.6238299382673130e+01\n-2.4596318340359224e+00\n-2.4241580390458680e+01\n1.5331441005958141e+01\n-3.0112187719893257e+00\n-2.8525503756664548e+01\n-7.4427944669491064e-01\n-1.9837991188417545e+00\n-2.0713168943092963e+01\n-9.4979432288625532e+00\n-2.8658778440522017e+00\n-2.8535017550914276e+01\n-7.0896841481131068e-01\n-2.1644970338908123e+00\n-2.0613007154494177e+01\n1.6088912282720010e+01\n-2.9702264517085992e+00\n-2.5442543288810139e+01\n3.6579374389964663e+00\n-2.2627941017693858e+00\n-2.0600301435977091e+01\n-9.3683758572138078e+00\n-2.9821527779072339e+00\n-2.6231935451268441e+01\n-1.2285523853882450e+00\n-2.3553571331873426e+00\n-2.0356540667327220e+01\n-2.7869467099532907e+00\n-2.7426613641433950e+00\n-2.2885517074178683e+01\n-6.8156265408823768e-01\n-2.4620780994800957e+00\n-2.0646474487051695e+01\n4.2430473133823821e+00\n-2.5261488432406192e+00\n-2.0358963432718600e+01\n-1.2452638888202228e+00\n-2.4577674706046544e+00\n-2.0185286271685026e+01\n-1.2264618135865670e+00\n-2.4793659847561678e+00\n-2.0171449134562021e+01\n1.6023383137600771e+01\n-3.3809605756248917e+00\n-2.4954749679661951e+01\n-8.9263286136082165e+00\n-3.2636952090785694e+00\n-2.5356099093791681e+01\n3.9759626658066693e+00\n-2.5998623610065232e+00\n-2.0261028074119327e+01\n1.6100905638650982e+01\n-3.6562796887361224e+00\n-2.7693029839955319e+01\n1.6119584663803010e+01\n-3.6638876171684629e+00\n-2.4938174162258640e+01\n-3.8381394016592502e-01\n-2.8779620785304694e+00\n-2.0707817437364113e+01\n2.1672094413734824e+00\n-2.9571753998711108e+00\n-2.0894603575976316e+01\n3.0206181741137095e+00\n-2.9421232922050389e+00\n-1.9801682679175677e+01\n1.8576345633762548e+00\n-3.1112534971310533e+00\n-1.9933816789932965e+01\n4.0053926433524305e+00\n-3.7809330534422712e+00\n-2.1706978960791556e+01\n-7.2411295293566025e-01\n-3.9419500055701162e+00\n-2.1833384693035445e+01\n2.7399633409578661e-01\n-4.1333572428918819e+00\n-2.1215643456653293e+01\n4.5567900941245787e+00\n-4.5217537289628096e+00\n-2.2435901889472667e+01\n5.0930229860163276e+00\n-4.7429140753038705e+00\n-2.2660799180288670e+01\n5.5337351777121322e+00\n-5.0433103122899468e+00\n-2.2596184892992341e+01\n1.4826023377946713e+01\n-6.5109836464585511e+00\n-2.6863026438595146e+01\n6.3613244616304367e+00\n-5.9882557718727725e+00\n-2.3640248363044456e+01\n6.3070939900107970e+00\n-5.9608126218111961e+00\n-2.3440940169526829e+01\n4.7306098192912643e-01\n-5.8569770597817881e+00\n-2.1225677297477390e+01\n8.0120218634679254e+00\n-6.8542660869279093e+00\n-2.3739410982843118e+01\n7.5570954102936012e+00\n-6.9686296309956184e+00\n-2.3228078857526782e+01\n1.4825342572388186e+01\n-7.8193191618743541e+00\n-2.5688486191432123e+01\n-5.0896912293637557e+00\n-6.9800986475022908e+00\n-2.3181212856968433e+01\n1.3736804073853472e+01\n-8.1500021372670695e+00\n-2.4718461688176852e+01\n-4.6121972058726772e+00\n-7.4080018360780455e+00\n-2.2359948242265734e+01\n1.3351742306398625e+01\n-8.4598922413872053e+00\n-2.4362901612457897e+01\n-2.5681870881452871e+00\n-7.7641549972748045e+00\n-2.1835892871754041e+01\n-2.5153291102415016e+00\n-7.8657769988172364e+00\n-2.1856230776457441e+01\n-3.6615876717625380e+00\n-7.8359493719694235e+00\n-2.1771720298592562e+01\n6.4356334450106631e+00\n-8.0634380260527951e+00\n-2.1678122553946139e+01\n-1.9081491452281925e+00\n-8.1931768569876233e+00\n-2.1420518893312927e+01\n-1.3406582455439962e+00\n-8.2468208271339591e+00\n-2.1326388057152652e+01\n-5.2439630836056779e+00\n-7.5919423189964608e+00\n-1.9623336463558793e+01\n1.9256969130640282e+00\n-8.2726851562746084e+00\n-2.1041097575472293e+01\n-2.7036669152593035e-01\n-8.2600183331903647e+00\n-2.0980482020898105e+01\n-1.8179899059912203e+00\n-8.2514688549469764e+00\n-2.1148084940724104e+01\n2.1246984548990651e+00\n-8.4622344367747839e+00\n-2.1126158599644722e+01\n2.3661279029987264e-01\n-8.2379742453895801e+00\n-2.0617922314655090e+01\n6.2122785366647859e-01\n-8.2463131803909864e+00\n-2.0800798187145233e+01\n-6.6108281993533891e-01\n-8.5188633790819939e+00\n-2.1066883474660774e+01\n1.3128442860004048e+00\n-8.4273806630676305e+00\n-2.0728984768843148e+01\n1.3939164934244573e+01\n-9.6646532050454734e+00\n-2.3613558111191129e+01\n8.0839764980074467e+00\n-8.9331131840512246e+00\n-2.1363902762052955e+01\n1.3106990268870998e+01\n1.4897153971083274e+01\n-3.1280851534998860e+01\n-1.3675901711297644e+01\n1.6341799445887691e+01\n-3.4870659298150812e+01\n1.0020673189890500e+01\n2.3336658245850916e+01\n-5.1255235197704366e+01\n1.9467150882034069e+01\n2.6469019549685122e+01\n-5.7982788958515080e+01\n2.0430804196084381e+01\n2.6583259443960380e+01\n-5.8241257290361787e+01\n7.0730996216020365e+00\n2.2270493807122765e+01\n-4.9647214301598240e+01\n9.7773606101133890e+00\n2.3123331075014338e+01\n-5.1481829981310277e+01\n-2.6966763033713772e+01\n2.2342389308349748e+01\n-4.9123105047235072e+01\n-1.0272473586651623e+01\n1.7174167087274039e+01\n-3.7857345947120798e+01\n1.3672869639160274e+01\n1.4110348250992820e+01\n-3.0435149316223118e+01\n1.3484783683802981e+01\n1.3950467951684089e+01\n-3.0049952220112129e+01\n-1.5975328767945259e+01\n1.5847634655100240e+01\n-3.4399035770580824e+01\n-4.7518260258027256e+00\n1.8649143538961411e+01\n-4.1723745478502131e+01\n-4.7518260258027256e+00\n1.8649143538961411e+01\n-4.1723745478502131e+01\n1.5303353777151841e+01\n2.4468447953407686e+01\n-5.4854340756354503e+01\n-5.1509873537717903e+00\n1.8578303239124633e+01\n-4.1618615172991056e+01\n-5.1255973580008751e+00\n1.8594948528719730e+01\n-4.1718785224497083e+01\n6.9162716265476509e-01\n1.9976537411377720e+01\n-4.6232236693431084e+01\n8.3067426956054131e+00\n2.2027845985399331e+01\n-5.1124372527526504e+01\n8.2833934438044405e+00\n2.1954099642294949e+01\n-5.0970825278880071e+01\n-1.1768246897152736e+01\n1.6379287348605800e+01\n-3.7731967912830321e+01\n8.8265918307984439e+00\n2.2001461292677686e+01\n-5.1601538518898181e+01\n8.8792994335490825e+00\n2.2267088090899360e+01\n-5.2372026820003697e+01\n8.8792994335490825e+00\n2.2267088090899360e+01\n-5.2372026820003697e+01\n1.6489708808269807e-01\n1.9529467569001099e+01\n-4.6075060324090984e+01\n9.8153438354710350e+00\n2.1502164937426347e+01\n-5.0518962373948810e+01\n1.1312741635150058e+01\n2.5143548886378259e+01\n-5.9830827944257372e+01\n1.3634970188289266e+01\n1.3502144385774500e+01\n-3.0656021517539944e+01\n1.3433716028003467e+01\n1.3515691158861529e+01\n-3.0848083056910927e+01\n4.8985360700866307e+00\n2.1347023303785647e+01\n-5.1051491002118595e+01\n6.2749873821284829e+00\n2.1591245454112716e+01\n-5.1815817271034710e+01\n-1.6362629818582665e+01\n1.5417483779064645e+01\n-3.5529551775286279e+01\n-1.6200018665282986e+01\n1.5176396583659933e+01\n-3.4955489032824509e+01\n-1.6511367239821151e+01\n1.4954901240895609e+01\n-3.4693162513154014e+01\n1.9565302855806443e+01\n2.4942416972810790e+01\n-6.0031004977927999e+01\n1.4351931217285710e+01\n1.3793248402360550e+01\n-3.1988070073281076e+01\n1.2313046805522113e+01\n1.0885676238977750e+01\n-2.5003555284070242e+01\n1.2313046799077796e+01\n1.0885676232240565e+01\n-2.5003555276313691e+01\n-3.5692677480214945e+00\n1.7957822259746631e+01\n-4.4117509133150520e+01\n1.3447071450582239e+01\n1.4179226740395221e+01\n-3.3674755895396842e+01\n9.0722495957185441e+00\n2.1289026075830439e+01\n-5.3025341914226615e+01\n1.2229161230254162e+01\n1.0984617122505449e+01\n-2.5951182446848261e+01\n1.2059347996234065e+01\n1.0643184763293123e+01\n-2.5180564153155522e+01\n4.1363745580503786e-01\n1.8702268804075814e+01\n-4.7482368133159305e+01\n3.8797024947538872e-01\n1.8621450421160056e+01\n-4.7352620545915350e+01\n-1.7480516686702803e+01\n1.5379234382960664e+01\n-3.8463789858991376e+01\n-1.5913990558380398e+01\n1.4369681976418264e+01\n-3.5688053166476820e+01\n1.5935981251947062e-01\n1.8417933774075777e+01\n-4.7435126180715862e+01\n-3.1646201259124435e+01\n2.4056509254617993e+01\n-6.0597919019669675e+01\n-1.2051423773349793e+01\n1.4780913063907059e+01\n-3.8547553002784852e+01\n-2.3452975409043606e+01\n1.8145289743419514e+01\n-4.6882159023470287e+01\n-1.5304318895921934e+01\n1.4046019940053487e+01\n-3.6194255504073155e+01\n-1.7141492136598576e+01\n1.4147647286503201e+01\n-3.6423084542609807e+01\n1.3939351904464019e+01\n9.4334174386712508e+00\n-2.3240370892331882e+01\n1.2080537486509792e+01\n1.0118639914988853e+01\n-2.5650802284965760e+01\n1.3654900862197856e+01\n9.7476652839153797e+00\n-2.4427441095913693e+01\n1.2130907878841843e-01\n1.7778552396389927e+01\n-4.8445117824408449e+01\n1.3001863999829464e+01\n1.2847286914310159e+01\n-3.3992025200329429e+01\n1.3001863999829464e+01\n1.2847286914310159e+01\n-3.3992025200329429e+01\n1.9390509425795042e+01\n2.4058171157034163e+01\n-6.6036201730583358e+01\n-7.9269341308285126e+00\n1.5525337775951501e+01\n-4.2726054805845166e+01\n1.3487545263812370e+01\n8.7868722825790382e+00\n-2.2537701055120152e+01\n-5.0783358042350635e+00\n1.6109229557463724e+01\n-4.5231727219411738e+01\n1.2927024088444961e+01\n1.2705472577514707e+01\n-3.4272824673335812e+01\n-8.3088756105479931e+00\n1.5069685756220208e+01\n-4.2730383887717359e+01\n-7.3006483125591659e+00\n1.5376329556056367e+01\n-4.3623325316389078e+01\n-6.1032930465677904e+00\n1.5706817536144337e+01\n-4.4554078575757664e+01\n-1.2728519400351791e+01\n1.3921619346981027e+01\n-3.9361074109358164e+01\n-1.5529641631145919e+01\n1.3676637845775900e+01\n-3.8168483820255048e+01\n-1.6994827654867407e+01\n1.3047215883482444e+01\n-3.6588850873827333e+01\n-7.8428597941079046e+00\n1.4929836080778756e+01\n-4.3716641760231539e+01\n1.2172681800859278e+01\n9.2331813639731593e+00\n-2.6544873080181109e+01\n-9.7249643873388827e+00\n1.4057673520994875e+01\n-4.2327138843622762e+01\n1.3291040865749158e+01\n9.0382075752917910e+00\n-2.5633045110514995e+01\n-1.1539158096540916e+01\n1.3601788206053673e+01\n-4.1331312243913551e+01\n-7.2558491192051431e+00\n1.4540063172576136e+01\n-4.4935009585016005e+01\n6.5879560051006802e-01\n1.6342753205269656e+01\n-5.0807468742651082e+01\n3.4953289917068529e+00\n1.7411571432319207e+01\n-5.5085254109560054e+01\n-1.0279134211826275e+01\n1.3502678988137983e+01\n-4.2810889624993209e+01\n-3.1189417297829884e+01\n1.8363081279992478e+01\n-5.8721880426216799e+01\n1.2664686403758118e+01\n8.0116499839320863e+00\n-2.4936265970929149e+01\n-2.9283530446022766e+01\n1.8072451821373114e+01\n-5.8734839502868617e+01\n-4.7513898489277970e+00\n1.4527469768326721e+01\n-4.8283522272737279e+01\n1.2775953601692253e+01\n1.1615285251185790e+01\n-3.7746651296456761e+01\n1.5037006204672977e+01\n1.1215172199182598e+01\n-3.6310346916337984e+01\n2.4600572842974611e-01\n1.5079961067926272e+01\n-5.2259897708726172e+01\n-1.0060419941920726e+01\n1.2511571702184684e+01\n-4.4392170444955255e+01\n-1.0037471294311285e+01\n1.2469226273443828e+01\n-4.4111721535045007e+01\n7.6905850662140667e+00\n1.4552163862113208e+01\n-5.2247156815489468e+01\n7.7012819237818162e+00\n1.4620125832447775e+01\n-5.2402950862893974e+01\n-2.9179338970766690e+01\n1.5827782593294227e+01\n-5.5363449958295270e+01\n-2.6918168934316160e+01\n1.5659719472427739e+01\n-5.5140309025465633e+01\n1.3531102386797190e+01\n9.9517121976415428e+00\n-3.4856191639662043e+01\n-1.0788246863290475e+01\n1.2197789772468655e+01\n-4.4011122749380689e+01\n1.3831014345602446e+01\n6.7900362950095570e+00\n-2.3274045516889547e+01\n-6.4375369354809582e+00\n1.2786492644803740e+01\n-4.7669606147386858e+01\n-1.0744529522929144e+01\n1.1912015633848828e+01\n-4.3868138490095170e+01\n1.3447977051894096e+01\n7.1368492153063565e+00\n-2.5134777866454325e+01\n1.7228151669207673e+01\n1.1795795737865875e+01\n-4.3816254111276869e+01\n1.5426967460579448e+01\n1.0586381266405109e+01\n-3.9342221429137084e+01\n1.2302384009485200e+01\n7.4738466367012864e+00\n-2.6520832548237021e+01\n1.2528599097967939e+01\n7.3189209724330864e+00\n-2.6051615861592246e+01\n-4.5694306707154775e+00\n1.3055402457188165e+01\n-4.9713814106198534e+01\n7.5867379261671131e+00\n1.3142540592848290e+01\n-5.0269710172235214e+01\n1.9147766140603177e+00\n1.2910769147292058e+01\n-4.9755842514874132e+01\n1.2334125743891111e+01\n7.2242879513605684e+00\n-2.6665978501541268e+01\n-6.0577414752061136e+00\n1.2347031596240813e+01\n-4.9008486378873087e+01\n-1.6921127135237668e+01\n1.0839743338661263e+01\n-4.1791204009430373e+01\n-1.6921127135237668e+01\n1.0839743338661263e+01\n-4.1791204009430373e+01\n-1.7541509943691231e+01\n1.0662587065796862e+01\n-4.1664521522104181e+01\n-1.3393546716862739e+01\n1.0486813676898885e+01\n-4.2116379455192707e+01\n1.5481366709144710e+01\n9.7765523432734334e+00\n-3.9156279980207309e+01\n-1.2834122772099260e+01\n1.1014690433678327e+01\n-4.4589173311304222e+01\n-8.8002139767342076e+00\n1.1583171350124230e+01\n-4.7986523123281039e+01\n-3.8982812612175644e-01\n1.1562339541794865e+01\n-4.8195750393239571e+01\n-3.7011471290999454e-01\n1.1642372791600275e+01\n-4.8592102644012613e+01\n1.3775806455650104e+01\n6.1822121288744691e+00\n-2.4221872400117444e+01\n2.6549757837319663e+00\n1.1503521845372152e+01\n-4.8700581707072523e+01\n-1.6104778357673400e+01\n9.9139956801182674e+00\n-4.1189057553470441e+01\n-1.7870488607926617e+01\n9.8137132205173359e+00\n-4.2541245830604176e+01\n-1.6998577084149588e+01\n9.7848382069950635e+00\n-4.2786368128684074e+01\n-1.7239740705630339e+01\n9.5199271948635538e+00\n-4.2017456704818841e+01\n2.2561902746122255e+00\n1.0141362319011288e+01\n-4.6049076825957201e+01\n1.2368706196031050e+01\n6.7215399659932844e+00\n-2.9193882329288829e+01\n7.7070397874671128e+00\n9.7576959237254801e+00\n-4.5132996475481931e+01\n-2.4184101839377767e+01\n1.0242626412780442e+01\n-4.7300264446928857e+01\n7.2705540675326290e+00\n1.0123022134486122e+01\n-4.7760307443229841e+01\n1.2446197701901193e+01\n6.2084848795771377e+00\n-2.8374024636706277e+01\n1.3040938244365154e+01\n6.1479055483391303e+00\n-2.8142503680256432e+01\n1.2627124046945427e+01\n6.0750389369708255e+00\n-2.7702475616557475e+01\n-2.4948926999013398e+01\n1.0050013308664013e+01\n-4.6918607181418018e+01\n1.2460177642251734e+01\n6.0394160252295590e+00\n-2.8836681824362365e+01\n-2.9999243451424018e+00\n8.9611683024578213e+00\n-4.4611603427544026e+01\n1.2997907361572663e+01\n5.7076832744693595e+00\n-2.7006320798692627e+01\n-1.6950544638708454e+01\n8.4021832076024623e+00\n-4.1236557868217226e+01\n1.3256366133286745e+01\n5.7589436201248949e+00\n-2.7743085270333779e+01\n1.3267011068127202e+01\n5.5976277399590408e+00\n-2.6940122105751328e+01\n1.3571643975712385e+01\n5.4794260655088900e+00\n-2.6223950092694164e+01\n1.3047586707365769e+01\n5.8853421660183551e+00\n-2.8639368134792893e+01\n1.2528408041049573e+01\n5.7770110406119599e+00\n-2.9336645825318236e+01\n1.2487632495104700e+01\n5.7549330371550118e+00\n-2.9282976312948623e+01\n1.2787019760616044e+01\n5.5324987766388576e+00\n-2.8086043107487125e+01\n-1.2508099728616451e+00\n8.0910258135737614e+00\n-4.3866242508108868e+01\n1.2231601819378055e+01\n5.6588253701783247e+00\n-3.0435284119671540e+01\n-2.8495358121500400e+00\n7.4229166799112081e+00\n-4.1708734918849402e+01\n1.3459146596899274e+01\n4.9896073146582598e+00\n-2.6533991461518035e+01\n1.3510698354196007e+01\n4.8998343689931430e+00\n-2.6292118267409634e+01\n-1.0918787620331139e+01\n7.5398980763439605e+00\n-4.2744632836984927e+01\n-1.0536180210813592e+01\n7.2377603471698002e+00\n-4.1392924244260968e+01\n1.2757850945981779e+01\n5.2103262505160375e+00\n-2.8478631647621000e+01\n1.2636665395996873e+01\n5.2215856750115197e+00\n-2.9455143243543787e+01\n1.3667091248068144e+00\n4.2992795590682249e+00\n-2.4664167629041046e+01\n-9.8076133337298064e+00\n6.6018633862769409e+00\n-4.0686237488616491e+01\n-9.8076133337298064e+00\n6.6018633862769409e+00\n-4.0686237488616491e+01\n1.2759266659408834e+01\n4.7523973240364077e+00\n-2.9199886766129698e+01\n9.1556666564368572e-01\n4.0232814276867135e+00\n-2.4250988397976613e+01\n1.4159193018381266e+01\n3.8634940926430654e+00\n-2.6398913742246215e+01\n1.5946501280716683e+01\n4.2976183615250880e+00\n-2.9991656773886913e+01\n1.3874637321084034e+01\n3.8102012080305445e+00\n-2.6288915016022198e+01\n1.3874637321084034e+01\n3.8102012080305445e+00\n-2.6288915016022198e+01\n3.4039768913448056e+00\n3.2868625223769663e+00\n-2.2595642317195505e+01\n1.3385579582639105e+01\n3.8382693368170173e+00\n-2.7735733444724605e+01\n1.2945848654922813e+01\n4.0013431469979688e+00\n-2.9721504613788525e+01\n1.4097926782632941e+01\n3.7209425577129100e+00\n-2.6758903416658271e+01\n1.4062378367771821e+01\n3.5813850231937665e+00\n-2.5864327302255827e+01\n1.3844196975691752e+01\n3.6463157368459367e+00\n-2.6789613453446307e+01\n1.8501754668360018e-01\n3.0127148010798037e+00\n-2.2079446249059998e+01\n-2.5324648774224244e+01\n5.4274984831530624e+00\n-4.0667584108123478e+01\n-2.5324648774224244e+01\n5.4274984831530624e+00\n-4.0667584108123478e+01\n1.4011327631480400e+01\n3.4958678023775138e+00\n-2.6152116542263077e+01\n1.4127203276767496e+01\n3.4577052639204080e+00\n-2.5696909573045687e+01\n-6.4867725473308910e+00\n4.7222404999352303e+00\n-3.8393211162352003e+01\n1.3844993845443087e+01\n3.4881085660564395e+00\n-2.6687250717007775e+01\n-8.1830756778448688e+00\n4.6887564139886209e+00\n-3.8413899533351419e+01\n1.3276832100682890e+01\n3.5055223880768982e+00\n-2.8007156216288816e+01\n-6.8617002664098852e+00\n4.5572755848389930e+00\n-3.8502029265374475e+01\n1.3749443832736890e+01\n3.2671041331127495e+00\n-2.6529074035269716e+01\n1.3135472009264886e+01\n3.4887522176283090e+00\n-2.8541396656133408e+01\n1.3135472053853158e+01\n3.4887522365914299e+00\n-2.8541396722487747e+01\n1.4260080237248891e+01\n3.0032445948246504e+00\n-2.4367222651239281e+01\n1.3893736589112937e+01\n3.1791134024603500e+00\n-2.6435425526555331e+01\n1.4331781372815772e+01\n2.9953608630088295e+00\n-2.5292106287841492e+01\n1.4318845484431442e+01\n3.0026982175861989e+00\n-2.5084593395659709e+01\n-1.2016324544302732e+00\n2.8710066936119416e+00\n-2.3476523267538816e+01\n1.4657261638746117e+01\n2.8505606878134095e+00\n-2.4124740729208060e+01\n1.4691559869527024e+01\n2.8400910748520110e+00\n-2.3978813085305276e+01\n-8.2293526650638480e+00\n4.0977501467608324e+00\n-3.7427700184409275e+01\n-7.4022259475137311e-02\n2.6699645071775917e+00\n-2.2022822738716719e+01\n1.4188014600001216e+01\n3.0084090103956012e+00\n-2.5994979132726286e+01\n1.3504571857013225e+01\n3.2601136028838993e+00\n-2.8926235551183524e+01\n1.4281523498130200e+01\n2.9321999131417007e+00\n-2.5463307849430485e+01\n1.4425994965352338e+01\n2.8585466236338353e+00\n-2.4969131619933808e+01\n1.3417610078497320e+01\n3.1347233908409042e+00\n-2.8289899393070641e+01\n1.3651615769427199e+01\n3.2308403099983392e+00\n-2.8780912178424536e+01\n1.3852093421578466e+01\n3.2188201354527139e+00\n-2.8508956911675565e+01\n1.4225647953550634e+01\n2.8274606822915755e+00\n-2.5685151768508405e+01\n1.4098195705048834e+01\n2.8485082664819035e+00\n-2.6163269084398230e+01\n1.4317958183309791e+01\n2.7715403415436608e+00\n-2.5404759272494029e+01\n-2.0943453512847623e+00\n2.8532212893853530e+00\n-2.5970478918378436e+01\n1.4330355050622540e+01\n2.7877806619930885e+00\n-2.6222004513326858e+01\n5.1329746740113889e-02\n2.2734582011525815e+00\n-2.1480633647451590e+01\n1.4297412499225008e+01\n2.5767046522698518e+00\n-2.5788749127290306e+01\n1.4648350484346947e+01\n2.4209843665805502e+00\n-2.4681522757290047e+01\n1.4648350484346947e+01\n2.4209843665805502e+00\n-2.4681522757290047e+01\n1.4270887086974676e+01\n2.4593304312186359e+00\n-2.5890513159161337e+01\n-8.0779694926581644e+00\n3.3162848251433714e+00\n-3.6882832394114295e+01\n1.4525500434330711e+01\n2.3632850416334432e+00\n-2.5144407838655169e+01\n-2.2650406606120793e+01\n3.2557334535509748e+00\n-3.7142733705612073e+01\n-1.6043782230301991e+00\n2.1892102550302335e+00\n-2.3108351368288474e+01\n1.4531678774779344e+01\n2.1860555407038911e+00\n-2.5378206391344481e+01\n1.3928827786557209e+01\n2.5252493773467646e+00\n-3.0473470633550534e+01\n1.4666924166494798e+01\n2.1363962454459076e+00\n-2.4934420677357263e+01\n1.4371699472947613e+01\n2.1065037650915475e+00\n-2.5975213093402452e+01\n-7.7016783898326437e+00\n2.7041597911892525e+00\n-3.5774023041751029e+01\n3.0423357928441725e+00\n1.8568029398633050e+00\n-2.1971192554884180e+01\n1.4605149632549512e+01\n2.0064916537588386e+00\n-2.5167776269684055e+01\n1.5017213062024563e+01\n1.8284372160689388e+00\n-2.3770717592547019e+01\n-3.6022751934869490e-01\n1.8128288995654107e+00\n-2.1597695748585448e+01\n1.4272383929678222e+01\n1.9614634978320833e+00\n-2.6845019038499778e+01\n1.4600711353183717e+01\n1.8364461662479632e+00\n-2.5376282005288054e+01\n1.4754185721698109e+01\n1.7913584867408878e+00\n-2.4960587906230423e+01\n1.4067809872461769e+01\n1.8785579570549120e+00\n-2.7592120784563196e+01\n2.7797182120166704e+00\n1.5453937187114022e+00\n-2.1198542188589371e+01\n-4.4095332518061586e-01\n1.5386672797298664e+00\n-2.1581883502239876e+01\n1.7671412774846913e+00\n1.5764698450858203e+00\n-2.0854746062681368e+01\n1.6416948382677188e+00\n1.6085356240272297e+00\n-2.0629649243777145e+01\n1.3538640763997030e+01\n1.8293447099486886e+00\n-2.9673602000401498e+01\n1.5058864116041997e+01\n1.5988344932690317e+00\n-2.4725944282762871e+01\n2.9573719687580353e+00\n1.3649065336955442e+00\n-2.0835231568061015e+01\n1.4073188423612949e+01\n1.6422339354920437e+00\n-2.8244320912533809e+01\n1.5115713977375481e+01\n1.3833216334275753e+00\n-2.3046554618740604e+01\n1.2841579601870622e+01\n1.8851698139578219e+00\n-3.2995413010003823e+01\n1.2988559537980169e+01\n1.9056842927564002e+00\n-3.3323192341292867e+01\n1.4214851279688052e+01\n2.0741414081995928e+00\n-3.4277120911195382e+01\n1.4151888786045946e+01\n1.5302055938877446e+00\n-2.7015734556814891e+01\n1.5340727269368127e+01\n2.2812814065366802e+00\n-4.0739275633825748e+01\n1.2982383120747523e+01\n1.8562871621503902e+00\n-3.4531990683222958e+01\n-2.4762578738285077e+00\n1.4239861523475514e+00\n-2.4239086217178599e+01\n1.9723370839419851e-01\n1.2818342763843933e+00\n-2.0923430120125182e+01\n1.4332126129443330e+01\n1.3647814506918534e+00\n-2.6920900739513154e+01\n-3.9078610671629255e+00\n1.3483545391319058e+00\n-2.5140601497802077e+01\n1.4408553000869661e+01\n1.3036494781552930e+00\n-2.7415405289479917e+01\n1.4119960369022161e+01\n1.2520977370719115e+00\n-2.8137491111270474e+01\n1.4134447571811121e+01\n1.2487191758791789e+00\n-2.8134306470016043e+01\n-2.6035823064364116e+00\n1.1675621581766100e+00\n-2.3775827160240773e+01\n-2.3364243320543250e+00\n1.1276231633196863e+00\n-2.3617939880547144e+01\n8.2955967704999944e-01\n1.0508213518889555e+00\n-2.0497042681620016e+01\n3.0671397653040642e+00\n1.0386004896620249e+00\n-2.0825973928589672e+01\n3.0615715862057957e+00\n1.0297194281478352e+00\n-2.0728827717706096e+01\n-1.1384212038783645e+01\n1.4082043696044417e+00\n-3.4438420376596767e+01\n1.4374383762224063e+01\n9.9772706177157222e-01\n-2.6793891032150906e+01\n-3.7324454056477938e+00\n1.0505035282951087e+00\n-2.4672146339463556e+01\n1.4279608801933005e+01\n1.0373990160556741e+00\n-2.7862965163562809e+01\n1.5379478989945067e+01\n9.3629409513124862e-01\n-2.3507525815883096e+01\n-1.7712357522441595e+00\n9.2783252960011020e-01\n-2.2615605370763756e+01\n1.5168259828526354e+01\n9.5255692080309251e-01\n-2.5000765169621914e+01\n1.5112493153792038e+01\n8.6865794295803256e-01\n-2.4800319129336177e+01\n-3.2791789000340490e+00\n9.4031731887744396e-01\n-2.4473904682502475e+01\n1.4547916768344670e+01\n8.1183149932803345e-01\n-2.6717645212137679e+01\n1.4442108100943454e+01\n5.9885609187660505e-01\n-2.7767489318558638e+01\n-2.4298608935698662e+00\n6.2221115624034984e-01\n-2.2962973657817358e+01\n-1.2196488136230114e+01\n6.0912604134741521e-01\n-3.2933040603615488e+01\n1.4636769934882059e+01\n5.0545566179068335e-01\n-2.6790477513866293e+01\n-9.4465773313200074e+00\n6.0763654932644895e-01\n-3.3194058921138101e+01\n-9.4779403251909145e+00\n6.5476409133576108e-01\n-3.3097959285626295e+01\n1.4252469896954540e+01\n5.0447567867163223e-01\n-2.8538664659114190e+01\n1.3937794102212560e+01\n4.9976155895524205e-01\n-2.9457913674090182e+01\n1.4481746892680439e+01\n4.1184402602837739e-01\n-2.7477948862965157e+01\n-9.1978469193714840e+00\n4.4755157325225164e-01\n-3.3144529427907941e+01\n-9.3608594084857391e+00\n4.1114684474923380e-01\n-3.3042735930742417e+01\n1.4380558305479434e+01\n2.8513284635754238e-01\n-2.8275021742534260e+01\n1.4631941621627037e+01\n2.6397203890501542e-01\n-2.7953345912945331e+01\n-1.8607167192277647e+00\n2.5810873309523313e-01\n-2.2417288494563955e+01\n-1.1114712396124629e+01\n2.8292885153588238e-01\n-3.2802535385896192e+01\n1.4513552587202652e+01\n1.1902223308533834e-01\n-2.7466476297849479e+01\n1.4571602372764968e+01\n8.9728095447812559e-02\n-2.7548842502660573e+01\n-9.8338843874005804e+00\n6.7851762488254169e-02\n-3.2455909495578723e+01\n-1.0606577607896678e+01\n5.9679815678207682e-02\n-3.2310374417893279e+01\n1.4441508827668644e+01\n2.3560534726579083e-02\n-2.8415944658878448e+01\n1.4296058531246892e+01\n-2.4639541846107338e-02\n-2.8074902629941857e+01\n-1.7070662593774892e+00\n6.8907986916374106e-02\n-2.2300600202346107e+01\n-1.0360813271028941e+00\n6.7945949913766499e-02\n-2.1614278115205771e+01\n1.5979078933634483e+01\n-1.3788698098594221e-01\n-2.4071609374862280e+01\n5.2582744369754589e-02\n5.1777446300939403e-02\n-2.1283395050050814e+01\n-1.1199958535296400e+01\n-1.7187647227916930e-01\n-3.2445860845488021e+01\n1.4543622324967549e+01\n-2.3283760425878292e-01\n-2.8103859637714024e+01\n1.5336769548368146e+01\n-1.6098441522237178e-01\n-2.4466367097124611e+01\n1.4587773227693379e+01\n-2.5194819694522025e-01\n-2.7855130250668982e+01\n1.4778998518491633e+01\n-2.8536312797716856e-01\n-2.8074704945173618e+01\n1.4380301661041930e+01\n-3.8013811680574444e-01\n-2.8820513846314668e+01\n1.8889069375047398e+00\n-1.4889832296738933e-01\n-2.0270579867496451e+01\n1.4526767329493726e+01\n-5.8245812614156722e-01\n-2.7972554796914910e+01\n1.4703749057179881e+01\n-6.0565645172291482e-01\n-2.8090544834110467e+01\n-1.1423563943397895e+01\n-5.7517134249130908e-01\n-3.1543620597728069e+01\n-1.0886806443398074e+01\n-5.6740015321540782e-01\n-3.1474859873478810e+01\n2.5456982092111700e+00\n-2.7905374867077198e-01\n-2.1718086417721572e+01\n2.1939221117480332e+00\n-3.4208405760930954e-01\n-2.0358650748111206e+01\n1.4544646090007149e+01\n-6.9842790610326355e-01\n-2.8915070252040170e+01\n1.5502248614329710e+01\n-6.8820177730282195e-01\n-2.5585730911409936e+01\n1.8138867821017612e+01\n-7.6013296632847283e-01\n-2.9682432279508706e+01\n-9.7447293533163055e+00\n-7.9393515656757752e-01\n-3.1280146994234897e+01\n2.5091561088229870e+00\n-4.2288441925562392e-01\n-2.0802053071855472e+01\n2.4797266783257501e+00\n-4.7043413484904134e-01\n-2.0393210618900309e+01\n1.4822514256659193e+01\n-8.9240924944824407e-01\n-2.7729094589384587e+01\n1.4621796677591833e+01\n-9.6219885876371358e-01\n-2.8456406446852728e+01\n1.5507408458672813e+01\n-7.9751892470170682e-01\n-2.3771733420030184e+01\n1.5844678090909293e+01\n-7.3012891704483041e-01\n-2.5334112061907916e+01\n-9.9248053900915352e+00\n-1.1024766104187729e+00\n-3.0989124018731349e+01\n-4.3895976394420433e-01\n-6.6862021255502224e-01\n-2.1167491797639997e+01\n-3.2337061980512660e-01\n-7.9695764684312753e-01\n-2.1105388237593871e+01\n-9.5421904285761627e+00\n-1.3036458762963326e+00\n-3.0563764883096734e+01\n2.6048700224361294e+00\n-8.1991006875944561e-01\n-2.0606908404188207e+01\n9.1278088433236271e-01\n-8.2443158468613287e-01\n-2.0520965676913697e+01\n-1.6241819094023087e+00\n-9.7800039405529782e-01\n-2.1693941571667192e+01\n-8.3225261637322601e-01\n-1.0170114871909002e+00\n-2.0825313240888054e+01\n1.5418248620051070e+01\n-1.5323915901472227e+00\n-2.7179093437074393e+01\n1.7264732502075105e+01\n-1.6353573211833141e+00\n-3.0299401677135322e+01\n1.4847020699550015e+01\n-1.7341672424417149e+00\n-2.8244246341431538e+01\n1.5590072086793684e+01\n-1.5493548137999682e+00\n-2.4494089946129147e+01\n3.7340377009458403e+00\n-1.2080148361848324e+00\n-2.2513029700646136e+01\n3.5438200147176935e+00\n-1.2816237169936724e+00\n-2.2475161887288564e+01\n3.0838282939647828e+00\n-1.3298842068823822e+00\n-2.2157604211541575e+01\n1.5392018669153115e+01\n-1.8608358361062738e+00\n-2.6545572185355219e+01\n2.7325345701312846e+00\n-1.2744751583433906e+00\n-2.1943295570277360e+01\n-2.1644005462064864e+00\n-1.4341427319265725e+00\n-2.1471502349069478e+01\n1.3728810999589152e+00\n-1.6267436958800856e+00\n-2.1116676948056611e+01\n4.5853210591759073e+00\n-1.9173473938740475e+00\n-2.2933942438541116e+01\n1.6268768452854012e+01\n-2.5050564608917152e+00\n-2.4948449706802979e+01\n1.5596230265931821e+01\n-2.7076435578195892e+00\n-2.7223407557044546e+01\n-9.0480732147767640e+00\n-2.6409118982228295e+00\n-2.7238631049693971e+01\n-9.2590425325268377e+00\n-3.1084942262331423e+00\n-2.6144716418717952e+01\n-8.8711226760388726e+00\n-3.6184539871554047e+00\n-2.7520469541637908e+01\n-2.0877221644005739e+00\n-2.9569262300197954e+00\n-2.2305166486487334e+01\n6.1806516626232000e-01\n-2.6725473765594616e+00\n-1.9896092159197138e+01\n-6.2591198408066240e-01\n-2.8390583528223838e+00\n-2.0355126560061798e+01\n1.6589648542172906e+00\n-2.7102515844969837e+00\n-2.0063335169211001e+01\n-2.2929152172890612e+00\n-3.1582158523391399e+00\n-2.2615037896220816e+01\n1.4426993094262470e+00\n-2.7689385784593785e+00\n-1.9751401360311970e+01\n-9.0693960223818202e+00\n-3.8248100210561629e+00\n-2.6615187672822696e+01\n1.0131313609163479e+00\n-2.8857374449090010e+00\n-1.9702603477475815e+01\n7.3495900424601313e-01\n-2.9208006845226615e+00\n-1.9700400038283298e+01\n9.4511307205018669e-01\n-3.0532562675313670e+00\n-1.9490122221657792e+01\n-7.0465992672783320e-03\n-3.3136605818652942e+00\n-2.0563764798082165e+01\n8.7491034001375356e-01\n-3.1542553907617057e+00\n-1.9486267047409665e+01\n-2.1476155122034242e+00\n-3.7946682285538249e+00\n-2.2989625166172431e+01\n5.5084696545224368e-02\n-3.4881759988880736e+00\n-2.0658495765044716e+01\n-1.7917883054536617e+01\n-5.0823566051106841e+00\n-2.7135809862296629e+01\n1.3292049728370497e+01\n-5.3878258060180464e+00\n-2.7402179265599603e+01\n1.7091017731794128e+01\n-6.1101892065584620e+00\n-2.8537357059857669e+01\n1.5937541851801699e+01\n-6.2190205441719266e+00\n-2.7866792804951576e+01\n2.0783959007298729e+00\n-4.7135094872708914e+00\n-2.1301578447681994e+01\n1.5379338551263782e+01\n-6.4665740044182440e+00\n-2.7191199005903641e+01\n1.4662163500617053e+01\n-6.6903933609421538e+00\n-2.6831041839680399e+01\n4.5066039435975735e+00\n-5.6656851916323641e+00\n-2.2000762337176614e+01\n1.3141793714235188e+01\n-6.8541945914030542e+00\n-2.5761490767778717e+01\n-4.0303873272208675e+00\n-6.7318524744024444e+00\n-2.2308370098342913e+01\n-3.3643278355541399e+00\n-7.2476587723454831e+00\n-2.2636098727608168e+01\n1.3798541788258419e+01\n-8.3896539466508742e+00\n-2.4726058514137737e+01\n9.1877432184198327e+00\n-7.5203485569149926e+00\n-2.2102078139664627e+01\n7.7275944375847159e+00\n-7.7131841729120287e+00\n-2.2457832594979863e+01\n1.6370308964573288e+00\n-7.7205940256824581e+00\n-2.1231573527904008e+01\n1.5628928360890675e+00\n-8.0753856892280371e+00\n-2.1686328549290135e+01\n-2.0513383272296895e+00\n-8.2028998814396719e+00\n-2.1420878867360329e+01\n7.0676569579837736e+00\n-8.3579639489478872e+00\n-2.1669758455096616e+01\n-2.5121962849233120e-01\n-8.1648812000228030e+00\n-2.1170118198078622e+01\n-5.7893902305696203e+00\n-8.1657863043800916e+00\n-2.1186812062258795e+01\n1.2400157285168175e+01\n-9.0648476187152696e+00\n-2.3307538321040518e+01\n7.0757319495931341e+00\n-8.1459932019011330e+00\n-2.0938560282682371e+01\n3.3241088706283856e-01\n-8.1507336991470005e+00\n-2.0687631836340096e+01\n5.1770835531155635e-01\n-8.1846161490073470e+00\n-2.0720857653087084e+01\n-4.2303726981846307e-01\n-8.3816326296362558e+00\n-2.1180239443304270e+01\n7.7339303270705084e-01\n-8.2908838141448022e+00\n-2.0811372274581426e+01\n1.3999302240181069e+00\n-8.3155421659357351e+00\n-2.0560879404433113e+01\n9.0247468182268076e+00\n-8.8670513649189946e+00\n-2.1851425064914981e+01\n3.3794955373195441e-02\n-8.2878855303317724e+00\n-2.0526634881333319e+01\n7.3728982085558226e-02\n-8.3913510976838932e+00\n-2.0611286348633733e+01\n-4.8829235148419139e+00\n1.9096528052326057e+01\n-4.1403381665998374e+01\n2.5937026645165151e+00\n2.1759638217679633e+01\n-4.7585563093625829e+01\n-1.3933126374511517e+01\n1.6239669083760532e+01\n-3.4708398750664301e+01\n1.0595002353631505e+01\n2.3636389981562907e+01\n-5.2071530884008766e+01\n-1.4090751242745993e+01\n1.5881871229432887e+01\n-3.4234356828720031e+01\n-1.2751993450171703e+01\n1.6527815051522559e+01\n-3.5642838989909187e+01\n-1.2645607204754473e+01\n1.6315319295914982e+01\n-3.5304526418607637e+01\n-7.7115249804981145e+00\n1.8034936516643263e+01\n-3.9422032405195260e+01\n1.3522914668985914e+01\n1.6420800585120098e+01\n-3.5467737595782729e+01\n-1.0371549156556593e+01\n1.7189191794919950e+01\n-3.7455053759248138e+01\n-1.0310480905203042e+01\n1.7163720554386948e+01\n-3.7386734063277906e+01\n2.0503769946597131e-01\n2.0296120087425354e+01\n-4.5214826189771905e+01\n1.4537288876057156e+01\n2.4133092829970110e+01\n-5.4267169719018625e+01\n1.3507941854357624e+01\n1.4240842213344978e+01\n-3.0999982431657244e+01\n4.7368102660205897e+00\n2.1397987137887657e+01\n-4.8529476894882492e+01\n1.2521467293418400e+01\n1.5134671519661195e+01\n-3.3222027012422771e+01\n1.2817807277399355e+01\n1.4797044082748885e+01\n-3.2460466977643556e+01\n-1.4035694108387698e+01\n1.5831828136647443e+01\n-3.5123890227637851e+01\n7.3658676156197078e+00\n2.2038009873586862e+01\n-5.0300880048550482e+01\n1.2307820255061911e+01\n2.3186021390246093e+01\n-5.3056395800398910e+01\n1.1153100554530213e+00\n2.0462229758316777e+01\n-4.7540425545505094e+01\n1.3424068593012008e+01\n1.4220528928630955e+01\n-3.1932666363084799e+01\n1.3444271894912506e+01\n1.3679278842145617e+01\n-3.0714420974675544e+01\n-2.9546689522171292e+01\n2.3862685105075506e+01\n-5.4716367422780344e+01\n1.7527934653345746e+01\n2.4073224938336491e+01\n-5.6981612758033407e+01\n8.3563146725582431e+00\n2.1680258087951831e+01\n-5.1597992708502275e+01\n-2.8054731646518036e+01\n2.2583833732630957e+01\n-5.2653789102087920e+01\n1.3454522297946250e+01\n2.2624307215811204e+01\n-5.4141248201055632e+01\n1.2119620422923470e+01\n1.1012045473467374e+01\n-2.4816016282085204e+01\n8.5270247195329318e+00\n2.1667471143576691e+01\n-5.2135044851753634e+01\n2.2248511819633605e+00\n1.9472641495936795e+01\n-4.8386141428601086e+01\n-2.4910685838812412e+01\n1.9595489393309979e+01\n-4.8655055655803743e+01\n-2.4910685838812412e+01\n1.9595489393309979e+01\n-4.8655055655803743e+01\n-5.0991980697353272e+00\n1.6831037605586694e+01\n-4.3185163278782106e+01\n1.2560116901758542e+01\n1.3575098533769868e+01\n-3.4647190325170911e+01\n1.2717979633626959e+01\n1.3606633791867687e+01\n-3.4949906437785195e+01\n1.2018100722201504e+01\n1.0347190165024672e+01\n-2.5853444142125650e+01\n1.2757680136832317e+01\n1.2991498733851580e+01\n-3.4263654053277129e+01\n1.3854558863684534e+01\n1.2179882447050764e+01\n-3.2156465978123009e+01\n1.3156060608306978e+01\n1.2464526535629485e+01\n-3.3716075424447304e+01\n-1.6907020053040558e+01\n1.3422562377470703e+01\n-3.6054918390171231e+01\n1.2542864670894707e+01\n9.5671475681405784e+00\n-2.5040943284249778e+01\n-3.0143183470473298e+00\n1.6511351482320443e+01\n-4.6653766962395956e+01\n-2.3971712779321692e+01\n1.7674704723724446e+01\n-4.8786056289570581e+01\n-1.6731042367267456e+01\n1.4287040851620597e+01\n-3.9927003493145591e+01\n1.4468590720593825e+01\n8.6097650944321096e+00\n-2.2341133048290704e+01\n1.4588310629477014e+01\n8.4273473305389768e+00\n-2.2131660233273262e+01\n1.3620669942502580e+01\n9.0767212389101424e+00\n-2.4904512012099918e+01\n1.2656798217654512e+01\n8.6506060050745557e+00\n-2.5444540374376626e+01\n1.2513291903494459e+01\n8.5577734554138303e+00\n-2.5199913805873098e+01\n1.3370198036182090e+01\n8.6332257057245272e+00\n-2.4926272632356557e+01\n1.3452887094023096e+01\n8.7123527285237419e+00\n-2.5100764621921083e+01\n-8.7533528268895520e+00\n1.3187952500014230e+01\n-4.2399947591481400e+01\n1.2709400304513933e+01\n8.2081709182370375e+00\n-2.4781582406758400e+01\n1.2131424263280216e+01\n8.5458995748692725e+00\n-2.5953521443155442e+01\n1.2028056025364858e+01\n8.6466957284886483e+00\n-2.6424432705118900e+01\n1.2028056025364858e+01\n8.6466957284886483e+00\n-2.6424432705118900e+01\n1.2993941811964858e+01\n8.3694297647749138e+00\n-2.6185589756960333e+01\n1.3779664654739085e+01\n7.4594584848203764e+00\n-2.3154981288461883e+01\n-1.5772053720150140e+01\n1.2016667342342952e+01\n-4.0176712563853911e+01\n1.3766878223152519e+01\n7.3274553984718587e+00\n-2.3582045581591380e+01\n1.2710107071578760e+01\n7.7570954213018322e+00\n-2.5418314496360651e+01\n-1.6689932066460699e+01\n1.1616975364220401e+01\n-4.0478624177493884e+01\n1.3447086707689452e+01\n9.6760217381779992e+00\n-3.4206277424350588e+01\n1.3997053145709977e+01\n6.9958008804699601e+00\n-2.3978681861429614e+01\n1.4223021907628731e+01\n6.5904602407972854e+00\n-2.2307109766874273e+01\n1.4223021907628731e+01\n6.5904602407972854e+00\n-2.2307109766874273e+01\n1.3484231617790133e+01\n9.7764562030152344e+00\n-3.5354182090691587e+01\n1.2745149063304179e+01\n7.4212076013346815e+00\n-2.5961349159725611e+01\n1.2781983059559549e+01\n7.3335024963040905e+00\n-2.5663356722201854e+01\n1.6496198688437163e+00\n1.4007265521092432e+01\n-5.2384587420462751e+01\n1.4019131741911544e+01\n6.5061427071353721e+00\n-2.2935416999987790e+01\n1.2122074264073612e+01\n7.5080549010356199e+00\n-2.7557374141944369e+01\n1.5487516997172248e+00\n1.2763008276827888e+01\n-4.9474416285890392e+01\n1.3793519286821581e+01\n1.1009642215571505e+01\n-4.1616060410156855e+01\n1.2471853254025294e+01\n7.0187410222909961e+00\n-2.5936968959787770e+01\n1.3516938333719851e+01\n6.5327820428361623e+00\n-2.4568350998749548e+01\n1.2888825329855360e+01\n6.7941869261914887e+00\n-2.6536605789812125e+01\n1.2869115936788008e+01\n6.8156821447346534e+00\n-2.6491921106577095e+01\n1.2060538904941293e+01\n7.1042012572525790e+00\n-2.7926884845714969e+01\n1.5298937583837802e+01\n7.6321729597797061e+00\n-3.0589229286452230e+01\n1.4894056765552680e+01\n7.9791432713298995e+00\n-3.2683221499800986e+01\n-1.2410738859006861e+01\n1.0331881544814225e+01\n-4.3703251545437752e+01\n1.3392839260653908e+01\n6.2901817998513208e+00\n-2.5548385620799582e+01\n-4.7391571406735320e+00\n1.0557091289870538e+01\n-4.6414620627474029e+01\n1.8422289373115994e+00\n1.0086358586630208e+01\n-4.6720949175026604e+01\n1.2320887138057467e+01\n6.3593000658068837e+00\n-2.7800426106481186e+01\n1.2632872050140056e+01\n6.0822141946405415e+00\n-2.6723978441296392e+01\n-1.4514021141322436e+01\n1.0101832259693943e+01\n-4.7409770975172634e+01\n-1.3494438440980360e+01\n9.5171996055687753e+00\n-4.5781298234894940e+01\n-2.2328524644638512e+00\n8.4278117526070773e+00\n-4.3834330967502844e+01\n1.3709792231316648e+01\n5.1208139673340760e+00\n-2.5500472808690439e+01\n-2.4279580146835165e+00\n7.7986206556579960e+00\n-4.2371137771757368e+01\n1.2911784950303378e+01\n5.3632025353235546e+00\n-2.7844355436999091e+01\n1.3770000306292962e+01\n4.8818388577637393e+00\n-2.5685973899163454e+01\n1.7076616611246315e+01\n5.5296144853596800e+00\n-2.9389755596097277e+01\n1.3709428726894524e+01\n4.6254866464888487e+00\n-2.6170251115591050e+01\n-1.7034113368652054e+01\n7.1078819795585444e+00\n-4.2434582950732171e+01\n1.8240718714593481e+01\n5.2241201906109307e+00\n-2.9990886075404593e+01\n1.1548816175865675e+00\n4.1674169649403945e+00\n-2.4486019948487197e+01\n-8.4782594430910354e+00\n6.0287792318300957e+00\n-3.9617083933742691e+01\n-7.8599111938925050e+00\n6.0210189669375840e+00\n-3.9892488601094044e+01\n1.3740609485529964e+01\n3.8691148927876644e+00\n-2.6546916551091535e+01\n1.4620832042023013e+01\n3.2374344770631516e+00\n-2.4152802316789202e+01\n1.3780834207169214e+01\n3.4843069919027703e+00\n-2.6932906429454160e+01\n1.3780834207169214e+01\n3.4843069919027703e+00\n-2.6932906429454160e+01\n1.4393687653851245e+01\n3.2133503544323663e+00\n-2.4927743019243920e+01\n1.4684619962018958e+01\n2.9882092476739968e+00\n-2.3813500454368658e+01\n1.4290061699493878e+01\n3.2920236882341412e+00\n-2.6468268514207065e+01\n1.4204367054288864e+01\n3.1699498038787519e+00\n-2.5465105618960436e+01\n1.4533200965020310e+01\n2.6989005148304828e+00\n-2.4771925863785548e+01\n1.5305374971269156e+01\n2.4828248724591768e+00\n-2.3243688966195194e+01\n1.4874286399227689e+01\n2.5537441181140701e+00\n-2.3712649022708209e+01\n-1.2335053548279758e+01\n3.2352692534088265e+00\n-3.3633913371903212e+01\n1.2904553665658979e+01\n2.9739941054775065e+00\n-3.1768652148317077e+01\n1.4439164251493702e+01\n2.4029157192212556e+00\n-2.5648801885179029e+01\n1.8689017112019535e+01\n2.7750108436467968e+00\n-2.9461333186412620e+01\n1.8689017112019535e+01\n2.7750108436467968e+00\n-2.9461333186412620e+01\n1.4133478423216255e+01\n2.3287355247614436e+00\n-2.6743161133583012e+01\n1.4566464522074151e+01\n2.1592358722017706e+00\n-2.5204655593123011e+01\n1.4566464522074151e+01\n2.1592358722017706e+00\n-2.5204655593123011e+01\n1.4693039335270667e+01\n1.9837314653860552e+00\n-2.4199561950642611e+01\n1.5195122103435160e+01\n1.8179474464338263e+00\n-2.3193248010171050e+01\n-1.1956253991900773e+01\n2.4164460267363754e+00\n-3.5989947165637318e+01\n-1.0509452593640106e+01\n2.2204639598414713e+00\n-3.5487930007791576e+01\n1.3014825165067888e+01\n1.9728616171655582e+00\n-3.2126382913816123e+01\n1.3993037356441100e+01\n2.2073902691245251e+00\n-3.4740547600516436e+01\n-1.2656678568703748e+01\n2.1943815885367681e+00\n-3.5402880979054082e+01\n-1.2451886928569271e+01\n2.0902042457916399e+00\n-3.4877747595722404e+01\n-9.0713846928044166e+00\n2.1764267515120692e+00\n-3.4774706136614853e+01\n1.5765922886622668e+01\n2.6012176543935777e+00\n-4.1909381348781523e+01\n-1.1114480046914395e+01\n1.9551460237030880e+00\n-3.4901275194383622e+01\n-1.2463545512894916e+01\n1.8727666776367515e+00\n-3.4732418929253065e+01\n-1.4465595054977129e+00\n1.2745464386110195e+00\n-2.2595410442060128e+01\n-2.3109769984886505e+01\n1.7228518742449941e+00\n-3.4765304663651172e+01\n1.3739894648974316e+01\n1.1666700547221311e+00\n-2.9229186435178374e+01\n-2.0875128695037272e+01\n9.8492119537615586e-01\n-3.3782829487537434e+01\n-8.0524218664104696e-01\n5.2925415400678921e-01\n-2.1364602382721912e+01\n-8.3926441576245270e-01\n3.4703437097137024e-01\n-2.1402581014986882e+01\n-8.4813714785703120e-01\n3.6141250622171406e-01\n-2.1453920454420651e+01\n2.7504621904855484e+00\n3.5596836539027976e-01\n-2.0569337852862102e+01\n1.5344238974172114e+01\n2.7638623117552863e-01\n-2.5005579915881970e+01\n2.3577710912885244e+00\n2.9625666263310940e-01\n-2.0427137201556882e+01\n-8.4496608480312965e+00\n2.0707538257527791e-01\n-3.2455246657583729e+01\n1.5397537552051109e+01\n1.1567697279614617e-01\n-2.4052926131574839e+01\n1.5397537552051109e+01\n1.1567697279614617e-01\n-2.4052926131574839e+01\n-8.8366396943852656e+00\n1.2544370417618020e-01\n-3.2626807362007476e+01\n-3.0030122779987494e+00\n1.1292153512914005e-01\n-2.3221106992068265e+01\n1.4844092356756821e+01\n2.1150684954836631e-03\n-2.6306778170860962e+01\n1.5374364491448267e+01\n-3.7179563944071022e-02\n-2.4268232071303633e+01\n1.5374364491448267e+01\n-3.7179563944071022e-02\n-2.4268232071303633e+01\n1.4919762909083207e+01\n-1.3189286689877525e-01\n-2.6401230301353241e+01\n1.4751654294633401e+01\n-2.2840286932608475e-01\n-2.7630947364080956e+01\n-1.1369188438481828e+01\n-3.4514026182644669e-01\n-3.1854655889273094e+01\n5.0534750022082884e+00\n-2.9551462357381081e-01\n-2.2110876769479919e+01\n-9.5821267378872239e+00\n-8.0330513271815862e-01\n-3.1445382994547561e+01\n-1.6331161729612162e-01\n-4.5470128336377613e-01\n-2.1538798875246432e+01\n-9.9217913248736256e+00\n-9.2900749134938165e-01\n-3.1268266009016727e+01\n5.4605548518021019e+00\n-6.9276317391051367e-01\n-2.3873354375758300e+01\n1.4793857677421535e+01\n-1.1569738136906464e+00\n-2.8183514940183645e+01\n3.8169665125345618e+00\n-1.0429261832040204e+00\n-2.2503374144122770e+01\n4.1949103862769705e+00\n-1.2213259118982756e+00\n-2.2587737552698318e+01\n5.1067322815133300e+00\n-1.2530963586361359e+00\n-2.1710425775704500e+01\n2.1200076177822442e+00\n-1.2045617552794914e+00\n-2.0694098726064279e+01\n1.5977780148478708e+01\n-1.9143253745037390e+00\n-2.5347940903914399e+01\n9.7667544567951803e-01\n-1.3634414438245148e+00\n-2.0523911333505296e+01\n2.9485831219969256e+00\n-1.4527088250807922e+00\n-2.0460123707820422e+01\n1.5840743763064085e+01\n-2.0775234733562717e+00\n-2.6615875600998326e+01\n-8.8682015418378812e-01\n-1.6550214847927480e+00\n-2.0951984986681030e+01\n-4.1194168441061398e+00\n-2.0443701642197580e+00\n-2.5394444735762615e+01\n4.0563171712207984e+00\n-1.8774250758013080e+00\n-2.1084182875415056e+01\n1.5780883811065786e+01\n-2.7644676488223072e+00\n-2.7280352760319445e+01\n-9.1877014969726840e+00\n-2.7364472872285677e+00\n-2.6876719396514467e+01\n4.6702117189010668e+00\n-2.2220074327635304e+00\n-2.2480749188484953e+01\n1.8658287099092707e+01\n-3.3080727222671609e+00\n-2.9798753981208502e+01\n2.9352284815363334e+00\n-2.1922148684848066e+00\n-2.1725479718616050e+01\n1.0884358119257818e+00\n-2.7778700507733585e+00\n-1.9724761867963469e+01\n1.9305968777945941e+00\n-2.8343158033464881e+00\n-2.0826346990714843e+01\n1.8613303774055145e+00\n-2.8708418980128001e+00\n-1.9811224673820565e+01\n4.2320696471623931e-01\n-3.9808411902450369e+00\n-2.0941346010787242e+01\n-3.4725433897331032e-01\n-4.0687889518597355e+00\n-2.1551783374579657e+01\n4.0488906450925716e-01\n-4.3777180423811961e+00\n-2.1292869116587283e+01\n1.2553214654781253e+00\n-4.4056616588714164e+00\n-2.1741996977680778e+01\n1.5579589021692875e+00\n-4.5468046822676236e+00\n-2.2282123962877428e+01\n1.1452857571140578e+01\n-6.1354096480831766e+00\n-2.5344144151888550e+01\n1.5605023469752943e+01\n-6.7219470369829981e+00\n-2.7152093986460613e+01\n1.6019117541344524e+01\n-6.8018022382550170e+00\n-2.7316002701759288e+01\n-5.2500719113853158e+00\n-6.9799353884466555e+00\n-2.3222722062397644e+01\n1.5210224773978876e+01\n-7.9397111914988905e+00\n-2.5710338368877750e+01\n7.6413426894979439e+00\n-7.1095782592268089e+00\n-2.2952405632886610e+01\n7.3895822586816315e+00\n-7.2970809899754885e+00\n-2.2678647518209836e+01\n7.0144617517121901e+00\n-7.2723124935953534e+00\n-2.2262497459385507e+01\n1.4017746904669039e+01\n-8.2864493506650909e+00\n-2.4882527887298135e+01\n-2.8957654965439317e+00\n-7.5340287851366297e+00\n-2.2332536862935015e+01\n8.5073383877030153e+00\n-7.9467898214979211e+00\n-2.1972728957497008e+01\n-1.4178380378305393e+01\n-8.7168582846879694e+00\n-2.2552229855266287e+01\n7.3425242881555342e+00\n-8.6283134871338021e+00\n-2.1570598182017253e+01\n1.2958034281431196e+01\n-9.5458895710917346e+00\n-2.3302095697484422e+01\n-1.4001584983082472e+01\n1.6182568055779086e+01\n-3.5846426335550881e+01\n-1.3735935819217087e+01\n1.5876525243491324e+01\n-3.5203550344527237e+01\n1.1828844705354646e+01\n2.3369883185357644e+01\n-5.3861577392671478e+01\n1.3152513202373262e+01\n1.4601295339197764e+01\n-3.2192266719437569e+01\n1.3352470730101432e+01\n1.4116814651451438e+01\n-3.1372319746387127e+01\n1.6101012291635218e+01\n2.3910413849034267e+01\n-5.6121897301548721e+01\n1.2773829534512995e+01\n1.0347329787122103e+01\n-2.3710665576331792e+01\n1.4690904169285451e+01\n2.2585250801430835e+01\n-5.7066194310619863e+01\n1.3359717140855777e+01\n1.0211716975098691e+01\n-2.4519995359150236e+01\n-6.0446687717227601e+00\n1.6555071480801502e+01\n-4.3617621530629265e+01\n4.8508322251782330e+00\n2.0884761045688244e+01\n-5.5526779111626603e+01\n1.3937404996823584e+01\n9.8218036914622360e+00\n-2.3932072193938126e+01\n1.3589150163346632e+01\n9.6419242435378596e+00\n-2.3760920905026172e+01\n1.4163729307721098e+01\n9.0862064556464315e+00\n-2.2285154206653974e+01\n9.2328821876171863e-01\n1.7711372184722087e+01\n-4.7542148136175882e+01\n1.1921392986871476e+01\n1.0100559290817946e+01\n-2.5929978992942459e+01\n1.4276063618548855e+01\n9.5148635370908643e+00\n-2.4137093880817197e+01\n1.3527145246650006e+01\n9.4525251521151414e+00\n-2.4061317285094308e+01\n1.3527145246650006e+01\n9.4525251521151414e+00\n-2.4061317285094308e+01\n1.2787711393186699e+01\n9.1139484059280775e+00\n-2.4516805006844642e+01\n1.3645070861383832e+01\n8.9667526128105095e+00\n-2.4527771639103634e+01\n1.2261359175570410e+01\n8.9889416097622981e+00\n-2.5538173123032013e+01\n1.2649363918647307e+01\n8.9015884224225008e+00\n-2.5812072446490287e+01\n1.3974375477412703e+01\n1.1302264131059477e+01\n-3.4937273469743658e+01\n1.7052275436781628e+01\n1.2467379066365298e+01\n-4.0024925349391680e+01\n-2.1639913983597800e+01\n1.4504900564413626e+01\n-4.6538254643902022e+01\n-3.0131145091488115e+01\n1.7034871842368755e+01\n-5.7557591340639796e+01\n1.3778783080039178e+01\n6.9707058079066035e+00\n-2.2599365317051738e+01\n-2.9940872272955112e+01\n1.6387453270786072e+01\n-5.6458530907582073e+01\n-2.9940872272955112e+01\n1.6387453270786072e+01\n-5.6458530907582073e+01\n-1.6803213898005694e+01\n1.1219866238439106e+01\n-3.7999399417237548e+01\n1.3103783456558553e+01\n7.3143950297943299e+00\n-2.4505664219930299e+01\n1.4190300786032870e+01\n6.9544486063910957e+00\n-2.3359732438641181e+01\n1.4336375165622794e+01\n6.4311170960440167e+00\n-2.2548003262735179e+01\n1.4081535455167286e+01\n6.7819329796905263e+00\n-2.4247298507957733e+01\n1.3084437354836968e+01\n6.9327920121041346e+00\n-2.5698514046258826e+01\n1.2578376195250851e+01\n7.1676652667033505e+00\n-2.7422975142517668e+01\n-1.3336242354133322e+01\n9.6323735330777733e+00\n-3.9258190990316081e+01\n-6.8998213856792994e+00\n1.1559243284763818e+01\n-4.7306164745587722e+01\n-6.8998213856792994e+00\n1.1559243284763818e+01\n-4.7306164745587722e+01\n1.2367265870794192e+01\n6.7934059355285914e+00\n-2.7073399513184039e+01\n1.2788112833333209e+01\n6.7310027914589519e+00\n-2.7179063270400299e+01\n1.2037505018128806e+01\n7.0891323976131790e+00\n-2.8878312986209199e+01\n1.2589856733208000e+01\n6.4111479384548566e+00\n-2.6595221740562586e+01\n1.3798193790367463e+01\n5.9790965405436962e+00\n-2.5354339261993960e+01\n-1.6452173076802250e+01\n8.9066684096343227e+00\n-4.1359160729141273e+01\n1.8415901940982535e+00\n9.3993983997851540e+00\n-4.4655581130240286e+01\n1.3127838593986597e+01\n4.7080847320408896e+00\n-2.8869370038725037e+01\n1.3201309797691859e+01\n4.7401473197947963e+00\n-2.8922484827916499e+01\n1.3871380832706507e+01\n5.0520339326615069e+00\n-3.1343299102682206e+01\n1.4694588342193557e+01\n3.8749769401818548e+00\n-2.3080749410208817e+01\n1.3790362428103544e+01\n4.0336339420262197e+00\n-2.6320122858949428e+01\n1.3758640881582787e+01\n3.9615869492743849e+00\n-2.5667864316212075e+01\n-7.8743682409119540e+00\n5.5907561004503155e+00\n-3.9181906342284734e+01\n1.3962104053133684e+01\n3.8546929592728412e+00\n-2.5662112658819666e+01\n1.5553665282960234e+01\n3.2062334786029338e+00\n-2.3968964350690307e+01\n1.3674429966411907e+01\n3.3436662913294466e+00\n-2.7536282134344841e+01\n1.4829217692812538e+01\n2.9516485889038018e+00\n-2.3444997977035879e+01\n1.4348144159461421e+01\n3.1139922276052143e+00\n-2.7553980033991142e+01\n1.4793982959408943e+01\n2.3755150844343960e+00\n-2.4568332563651261e+01\n-6.7278548734413512e-01\n2.1095079957237708e+00\n-2.2000408439067538e+01\n-6.7463057877343124e-01\n2.1080121906528397e+00\n-2.2014553419923690e+01\n1.5503961196949678e+01\n2.2672411132757269e+00\n-2.4570931640397887e+01\n1.5075515324012729e+01\n1.9357007415873084e+00\n-2.3467802146787335e+01\n-1.0766399232250278e+01\n2.4962965878780325e+00\n-3.5722587942634036e+01\n1.5421243966332655e+01\n1.6369227353193083e+00\n-2.3766628200709665e+01\n1.4207583240384986e+01\n1.5599937600072000e+00\n-2.7696263861863468e+01\n1.4365339790201883e+01\n1.5401205758851089e+00\n-2.7829091250745783e+01\n1.5223468480635322e+01\n1.5124341800875805e+00\n-2.4323033022805674e+01\n1.3897167906788859e+01\n1.5221101981077596e+00\n-2.8911898027345671e+01\n-9.0783348345232735e+00\n1.0710627903666825e+00\n-3.3236114640217650e+01\n-3.4949102376123760e+00\n8.2069009912345225e-01\n-2.4547396738927695e+01\n1.5308509837939011e+01\n7.9495945208901564e-01\n-2.5859372114016065e+01\n-1.0809405998425841e+01\n7.2079224474846282e-01\n-3.3241794980151234e+01\n-8.8355312090677298e+00\n6.0766515268342569e-01\n-3.2231981763376837e+01\n-1.0650411461910208e+01\n3.3222500197777599e-01\n-3.2690742496583155e+01\n2.7341373707833094e+00\n3.4796336265207173e-01\n-2.0489574772365668e+01\n1.5450941101522691e+01\n2.1848659201579698e-01\n-2.3826089813364877e+01\n1.6310282351235490e+01\n-4.9441834297593013e-01\n-3.0671384483499487e+01\n1.4756059303038079e+01\n-4.4609355211478124e-01\n-2.7852758123342742e+01\n1.4608432646167213e+01\n-7.3787453579117313e-01\n-2.8241054946766855e+01\n1.5202864056566463e+01\n-7.5383226857765817e-01\n-2.7257529468600342e+01\n1.5261108063121787e+01\n-7.5764364806164208e-01\n-2.7336425671829836e+01\n-1.0900101741655876e+01\n-8.7412115137384272e-01\n-3.1397131329266209e+01\n-9.5793434068428596e+00\n-1.1269988665752548e+00\n-3.1051347076933272e+01\n-9.9648675735866963e+00\n-1.2630184113594904e+00\n-3.0413328335954539e+01\n3.0972133020226726e+00\n-9.0288464545070313e-01\n-2.0757245618950304e+01\n-1.3871085445599127e+00\n-1.0312842670556168e+00\n-2.1115455170935522e+01\n-1.0000370329503216e+01\n-1.7320588451501977e+00\n-2.9847734559385390e+01\n-1.1395901508139226e+00\n-1.1916136889879168e+00\n-2.0930046467686868e+01\n-1.0357552598659847e+01\n-1.8433319654981786e+00\n-2.9978637295368600e+01\n1.5253443684654579e+01\n-1.8240060132149769e+00\n-2.7040350683136182e+01\n1.7245202682629774e+01\n-2.1197266097373801e+00\n-3.1095303412969567e+01\n2.5092680975147998e+00\n-1.4120573484144814e+00\n-2.1860120538909946e+01\n1.5906154237385509e+01\n-1.9837997092882620e+00\n-2.5204386316599518e+01\n-1.3154644789793113e+00\n-1.6273579815943326e+00\n-2.1259076506236486e+01\n-1.9681912240335051e+00\n-1.7632843846262003e+00\n-2.1052277723577749e+01\n-9.5863229461646053e+00\n-2.5871119390822974e+00\n-2.6923449223184569e+01\n1.6028061940452865e+00\n-1.9431551240046334e+00\n-2.1154633797726181e+01\n1.6028061940452865e+00\n-1.9431551240046334e+00\n-2.1154633797726181e+01\n1.0877309691551797e+01\n-2.9196991731468476e+00\n-2.9263651429010917e+01\n1.6224376353323532e+01\n-3.2977500732909366e+00\n-2.4951518875820234e+01\n2.0579809795218793e+00\n-2.7763967619216414e+00\n-2.1056689386407765e+01\n2.5851911106725911e+00\n-2.9306322667149871e+00\n-2.1176359436694138e+01\n4.7612718358017663e+00\n-3.3187489973308821e+00\n-2.1376619846506955e+01\n-1.7043579176977901e+00\n-3.9532691909003348e+00\n-2.2441958721586449e+01\n5.0225493287467513e+00\n-4.0643926558970538e+00\n-2.3082194785548374e+01\n5.5020632688810833e+00\n-4.5269006837347625e+00\n-2.2864900360464219e+01\n-8.1464902860875565e-01\n-4.3142732518728177e+00\n-2.2099471068566928e+01\n-1.0801131497547456e+00\n-5.0174198816261999e+00\n-2.3021157397636550e+01\n1.3553557305665516e+01\n-6.0481692321413529e+00\n-2.5317783482365954e+01\n1.5252275304010713e+01\n-6.6206944203581077e+00\n-2.6991631309509231e+01\n2.8369986881172653e+00\n-5.2809988444009068e+00\n-2.1919462290733975e+01\n8.4356854106514145e+00\n-7.0341422744172775e+00\n-2.3775621453283549e+01\n7.3200839130778759e+00\n-7.2508852188850543e+00\n-2.2787094341888018e+01\n7.7896102190631469e+00\n-7.2145155684839741e+00\n-2.2998306217253667e+01\n9.1194467187409280e+00\n-7.2722185613725570e+00\n-2.2863401959569867e+01\n9.3329053633956054e+00\n-7.3077085690672563e+00\n-2.2773155468181127e+01\n1.6631662307370270e+01\n-8.5649666949058467e+00\n-2.6087096867771567e+01\n1.6631662307370270e+01\n-8.5649666949058467e+00\n-2.6087096867771567e+01\n1.4248236993708268e+01\n-8.3228500973185753e+00\n-2.4849062999146462e+01\n-3.5462399468604167e+00\n-7.0676385502357064e+00\n-2.1504416837585708e+01\n-2.8293879404532425e+00\n-7.5823318506637811e+00\n-2.2445200144139552e+01\n-2.8867618789095042e+00\n-7.9132336062949573e+00\n-2.1683129606901506e+01\n1.2160158644735796e+01\n-8.5739497152895616e+00\n-2.1499614162084729e+01\n-2.5035459059449539e-01\n-8.1862328661731798e+00\n-2.0741867156634861e+01\n-2.5035459059449539e-01\n-8.1862328661731798e+00\n-2.0741867156634861e+01\n6.2414375316107451e+00\n-8.3023124326875823e+00\n-2.0719852632703589e+01\n1.2673989849804878e+01\n-9.5330180080596207e+00\n-2.3147246647749427e+01\n1.3603502859587554e+01\n1.0067730817467609e+01\n-2.3375809826858909e+01\n1.4068488885131453e+01\n9.3651647769923159e+00\n-2.3244781304637510e+01\n1.3866638171189321e+01\n1.1644408032421026e+01\n-3.2284634603218116e+01\n-1.5688939983911883e+01\n1.3141232867176171e+01\n-3.9243487220618945e+01\n1.2267020621329808e+01\n9.0877680141341060e+00\n-2.6275688023809511e+01\n-1.6932296234411520e+01\n1.2328777744645679e+01\n-3.7223222794472818e+01\n1.3823052754345696e+01\n1.0659916468562354e+01\n-3.3004993358222244e+01\n1.4160889922026444e+01\n8.0323396831463576e+00\n-2.3492638812465138e+01\n-1.5885206887137578e+01\n1.2566806744547302e+01\n-3.9715526851023171e+01\n1.2361656179246641e+01\n8.3856804951121724e+00\n-2.5820917611794549e+01\n1.2325706903473844e+01\n8.4797570175626493e+00\n-2.5868274205536999e+01\n-1.3022910724813331e+01\n1.0564068561378257e+01\n-3.7192264691698533e+01\n1.2252545726802300e+01\n7.3575091240405595e+00\n-2.8598906065675521e+01\n1.4184946148193298e+01\n6.1012254833427635e+00\n-2.3949421253711030e+01\n1.3193793767417024e+01\n6.4227198264545793e+00\n-2.6093094379004864e+01\n1.2896450136595099e+01\n6.1559798212091543e+00\n-2.6601152774932476e+01\n1.3365323847439067e+01\n5.6779750691920743e+00\n-2.6094633485355683e+01\n-2.7249619503338001e+00\n8.3128659504882219e+00\n-4.3758677564765101e+01\n-1.7472257893443917e+01\n8.0535493538944873e+00\n-4.2272706496546434e+01\n1.3000830781264400e+01\n5.3326002910967771e+00\n-2.7315155607250070e+01\n1.3098619413567015e+01\n5.3778907281482198e+00\n-2.7503562312081755e+01\n1.3529550717950309e+01\n6.3261717835774869e+00\n-3.3607551867287178e+01\n1.4384184375665155e+01\n4.5206304492595031e+00\n-2.4810507042177605e+01\n-5.4702009752102043e+00\n6.1376926972925316e+00\n-4.0539205420180352e+01\n1.7103116543097290e+01\n4.7941796606997125e+00\n-2.9992453744888511e+01\n-7.6300700042760807e+00\n5.7633887157933161e+00\n-3.9955932362100995e+01\n1.3026700125248128e+01\n4.2598007057621778e+00\n-2.8485014232761678e+01\n1.6588957165711061e+01\n4.4312756893471930e+00\n-2.9526545590084840e+01\n1.4623338935993244e+01\n3.2468271046298502e+00\n-2.3749982331120950e+01\n1.4253754347675764e+01\n2.7040541872553199e+00\n-2.5745004321690427e+01\n3.2622368562705883e-01\n1.8449433757725606e+00\n-2.0981314820981158e+01\n1.4622611901040111e+01\n1.7983600712982848e+00\n-3.3266629069567635e+01\n-2.9182890422142027e-01\n1.1267281460638130e+00\n-2.1123191279694808e+01\n1.4881272041571428e+01\n1.1706046597718420e+00\n-2.4767390662875041e+01\n-2.1583981946173047e+01\n1.5288346141618787e+00\n-3.4584715525750987e+01\n1.3934097707499598e+01\n1.1786407822113045e+00\n-2.8691547655601923e+01\n-8.5277233898190445e+00\n7.5776100699984861e-01\n-3.2821495788320995e+01\n-1.5897158912321678e+00\n3.6641187462872116e-01\n-2.2235207613184549e+01\n-1.5897158912321678e+00\n3.6641187462872116e-01\n-2.2235207613184549e+01\n-9.0244109607238663e+00\n2.4530819430208303e-01\n-3.2633382605735406e+01\n4.6686062922784579e+00\n-6.8418870018288835e-01\n-2.3442804396236536e+01\n-9.3066388054503619e+00\n-1.3576975045077573e+00\n-2.9486394604558935e+01\n-2.9033042939911615e+00\n-1.0772218667457307e+00\n-2.1768382066619328e+01\n-9.3579370631960863e+00\n-1.8927060487038894e+00\n-2.7747131773344936e+01\n4.9744682232734938e+00\n-2.5190097100785622e+00\n-2.0497158163381012e+01\n2.9508340478698063e+00\n-2.8188691296437933e+00\n-1.9769835253733557e+01\n1.3236316505556973e+00\n-2.8784515047163834e+00\n-1.9783481886006221e+01\n-6.2905998688261660e+00\n-4.1490141022185636e+00\n-2.6282705811930761e+01\n-5.6150182399410997e-01\n-3.3417072438943487e+00\n-2.1076104771190920e+01\n-1.1045765551766959e-01\n-3.7565435449133302e+00\n-2.1139117108653416e+01\n-1.2491749526947254e-01\n-3.7436311792417882e+00\n-2.0980746905878149e+01\n5.2753437974067339e+00\n-4.5365868066569188e+00\n-2.3089063924669176e+01\n-1.3327328614928102e+00\n-4.9163483521334417e+00\n-2.2551881212378010e+01\n1.5637122875280330e+01\n-6.3293511988444529e+00\n-2.7440015953595790e+01\n-1.0242598437912556e+00\n-5.2825741377723467e+00\n-2.2309834517822686e+01\n1.7485535658759680e+01\n-7.8661089536123887e+00\n-2.7202716713371696e+01\n-3.0344777537990297e+00\n-7.6261233123553804e+00\n-2.2235310769688382e+01\n-1.0068147231501634e+00\n-8.0929116082646892e+00\n-2.0277839890100459e+01\n-1.0068147231501634e+00\n-8.0929116082646892e+00\n-2.0277839890100459e+01\n-2.0594097090320651e+00\n-8.1745498251626394e+00\n-2.0138055361163474e+01\n-4.6527730253644597e+00\n1.8917747015986201e+01\n-4.1891553765880914e+01\n-4.6527730253644597e+00\n1.8917747015986201e+01\n-4.1891553765880914e+01\n5.3833525483176077e+00\n2.1537578936244088e+01\n-4.9577657285639155e+01\n1.8221075296385642e+01\n2.4775964861849431e+01\n-5.6936521982840659e+01\n1.2047527056574371e+01\n1.1109343734788860e+01\n-2.4928791442803139e+01\n4.3988411045328935e+00\n1.9711682150997142e+01\n-4.9266141605210649e+01\n3.2574823417236032e+00\n1.9571295837503701e+01\n-4.9256102409648165e+01\n1.3487415552408651e+01\n9.9473509615737594e+00\n-2.3709290692828500e+01\n1.4455387770731456e+01\n8.2098215122955924e+00\n-2.3326348775362465e+01\n1.3074055044349810e+01\n1.0673535413423895e+01\n-3.4263269493855901e+01\n1.3359591332604799e+01\n9.6899976583188323e+00\n-3.5552562690487633e+01\n1.4517689536897022e+01\n2.4188540388235800e+00\n-2.5042549160657625e+01\n1.3797874579293381e+01\n2.4744148721374883e+00\n-2.8955379588052221e+01\n1.5101218092537930e+01\n1.6940248390977717e+00\n-2.4072088321360717e+01\n-1.0071543208058211e+00\n1.3816008354763287e+00\n-2.1800316927368499e+01\n-1.5645176311286135e+00\n1.1377001897803334e+00\n-2.2508704612629970e+01\n-1.1229213808154730e+00\n6.2290276714779369e-01\n-2.1767112904571245e+01\n4.7679803801660254e+00\n7.6119430439177363e-02\n-2.3058083334898136e+01\n3.0332222118798144e+00\n-7.0873792527292301e-01\n-2.0997392984081582e+01\n-1.2188086646291090e+00\n-2.8977725738194415e+00\n-2.0436113319438885e+01\n4.1192415520662209e+00\n-3.7958197785976138e+00\n-2.1367089941857923e+01\n1.1900737750942238e+01\n-4.7858843406052447e+00\n-2.6576742911506528e+01\n1.3501418491180894e+00\n-6.2409646879586598e+00\n-2.2797847165941096e+01\n1.1385141738329398e+01\n-7.0898186097077547e+00\n-2.3541520218278176e+01\n-2.1010653176558973e+00\n-7.6995018771908734e+00\n-2.0783307174105065e+01\n1.4932848883540226e+01\n2.4765796912624481e+01\n-5.9325519126867334e+01\n5.7160511204824465e+00\n2.0295775673076179e+01\n-4.9961256069706621e+01\n1.3984742818301561e+01\n9.6447631800216591e+00\n-2.3792744641365758e+01\n1.3522219982370045e+01\n8.2876354305645830e+00\n-2.5174260908463307e+01\n-8.0585486987696218e+00\n1.2007464328922371e+01\n-4.7554239419066320e+01\n1.3775943569963848e+01\n2.9228174412918739e+00\n-2.8550763146505005e+01\n1.4721662035423217e+01\n1.5726067281556522e+00\n-2.4811393561417070e+01\n-1.8844961574576085e-02\n4.4139112916021800e-01\n-2.1210724042384058e+01\n-1.0630938470239291e+00\n-2.3413233496157098e+00\n-2.0337563231713933e+01\n9.3450738566487257e-01\n-2.9395857677786519e+00\n-2.0089469790614860e+01\n-9.1507036209762160e-01\n-3.0965524727509872e+00\n-2.0450282448081616e+01\n6.4979439857797006e-01\n-3.1398421473911964e+00\n-1.9661650391133058e+01\n3.3443429806783526e-01\n-3.9503338123388958e+00\n-2.1024367366758732e+01\n2.8477274681243336e-01\n-5.0356321997974378e+00\n-2.2039388355250466e+01\n8.5835060446255240e-01\n-5.3815684010580984e+00\n-2.2158069941236207e+01\n1.2025909933997638e+00\n-5.8402544028422829e+00\n-2.2230754280351089e+01\n-4.1336944258993036e+00\n-7.0556393645366304e+00\n-2.1405226940825237e+01\n1.4237788898517154e+00\n1.9633464050316125e+01\n-4.9802694657710191e+01\n1.4016776936921187e+00\n1.9048112760748211e+01\n-4.8423291437991097e+01\n1.4095582646283917e+01\n2.9536356383531697e+00\n-2.5853650156201631e+01\n1.4883964899501136e+01\n2.9197466742043736e+00\n-2.4696279342317691e+01\n1.5683145949951774e+01\n2.8713057562880255e+00\n-3.0397954244454329e+01\n1.4658601263556564e+01\n2.0683410727338867e+00\n-2.4419656359925238e+01\n1.4571745655207312e+01\n1.9980896830352795e+00\n-2.4169727764325454e+01\n3.0715669264786789e+00\n2.2438594005025181e-01\n-2.0646530869262982e+01\n-1.7357894620872245e+00\n-1.4786442980540613e+00\n-2.1159293140419461e+01\n7.1094831524283822e-02\n-2.2879452909579667e+00\n-2.0800955284990842e+01\n6.3481058758650741e+00\n2.1601911031216044e+01\n-4.9743471958029950e+01\n2.4167568134963933e+00\n2.0146874338635808e+01\n-4.7976015473385310e+01\n2.4943425656215785e+00\n2.0489135031004480e+01\n-4.8857889125755172e+01\n4.1192844151313013e+00\n2.1544468486796138e+01\n-5.3335266898279073e+01\n4.0422655029631054e+00\n2.1070534601414042e+01\n-5.2297599454613952e+01\n1.4126516474408255e+01\n2.4365476154811837e+01\n-6.3019072658480198e+01\n1.3422108147712942e+01\n1.0194114170852835e+01\n-2.4511500647794236e+01\n1.4355984652571488e+01\n1.8346715104490905e+00\n-2.6127611075649135e+01\n3.1437680594180692e+00\n-3.1056045469170013e-01\n-2.0691643570349949e+01\n1.1517856204545531e+00\n-1.4950254522336435e+00\n-2.1294895951125469e+01\n-7.6231809729151569e+00\n1.5107763069935624e+01\n-4.2705872899318038e+01\n-7.5295845759910174e+00\n1.4979205636053942e+01\n-4.2648818132466737e+01\n1.4330822811684591e+01\n4.2110256078738741e+00\n-2.4388200456764366e+01\n1.6637055476834064e+01\n2.6889621903322900e+00\n-3.0363826055478722e+01\n-4.0536093972088887e+00\n1.8467079884593137e+01\n-4.2882334911283536e+01\n3.0191893467860891e+00\n2.1849964863278228e+01\n-4.6298243196702799e+01\n6.7321832172814808e+00\n2.3402463079499995e+01\n-4.7946034701112445e+01\n-1.2304639798099581e+01\n1.4370406046041122e+01\n-3.8335221011826697e+01\n-1.2199587958520731e+01\n1.4244063832160691e+01\n-3.8122670882415918e+01\n-1.1208668302249299e+01\n1.5206335708170016e+01\n-3.9096701344253901e+01\n6.7295346638366338e+00\n2.3801320677152951e+01\n-4.9005201110121881e+01\n3.2869008453613295e+00\n2.1740005776046239e+01\n-4.6240885706942365e+01\n-9.2743571262972626e+00\n1.5630900767673667e+01\n-3.9920977697267041e+01\n-9.1685109547044981e+00\n1.5391281836245973e+01\n-3.9148095822451083e+01\n-9.0761307062869196e+00\n1.5232510170960687e+01\n-3.9047941910346843e+01\n6.1308486784985750e+00\n2.3010564991352609e+01\n-4.7775446058027292e+01\n6.7457220792539987e+00\n2.4512036350136789e+01\n-5.1060565224528851e+01\n6.2637184154894907e+00\n2.3161227538304949e+01\n-4.7927789860707655e+01\n-4.0656445998231430e+00\n1.8346080240918344e+01\n-4.3124180663059860e+01\n-4.1273687999707640e+00\n1.8404184866240705e+01\n-4.3060159813221119e+01\n-4.0509852502408448e+00\n1.8244731339191596e+01\n-4.2976340280043445e+01\n6.3099422053720424e+00\n2.3232491095193282e+01\n-4.8324617621054109e+01\n6.3301060513572098e+00\n2.3184724373018980e+01\n-4.8315696032388409e+01\n-1.2701731150205971e+01\n1.4334360154413382e+01\n-3.8629215192514302e+01\n-1.1450843167632401e+01\n1.3043718515475870e+01\n-3.5626518642894240e+01\n9.8933243755876976e+00\n2.4631876070029442e+01\n-5.0423668148259139e+01\n-1.4892706563096151e+01\n1.3235511225687025e+01\n-3.7671927514176204e+01\n-1.0766384184215269e+01\n1.4930013701059570e+01\n-4.0053101196272571e+01\n-1.0766384184215269e+01\n1.4930013701059570e+01\n-4.0053101196272571e+01\n-1.2659968001390446e+01\n1.3900474625528213e+01\n-3.8558300022469545e+01\n-5.1233236002026556e+00\n1.7258796432869406e+01\n-4.2880025272657420e+01\n-1.5713736033801956e+01\n1.3232033580922538e+01\n-3.8425844284960192e+01\n-1.3472846507390820e+01\n1.1282353482507871e+01\n-3.3021548117253303e+01\n-1.5739049144855779e+01\n1.3230429098315717e+01\n-3.9190043918743783e+01\n7.9338048314973939e+00\n2.3889525516899045e+01\n-5.0649384838250782e+01\n-1.2551224941340692e+01\n1.3781075873018706e+01\n-3.8782591658582454e+01\n9.1213543322701618e+00\n2.3771832474036707e+01\n-5.0352917526461596e+01\n1.2098474487631157e+00\n2.0230843505203666e+01\n-4.7001952466832414e+01\n-6.3758944110978559e+00\n1.5808934990651814e+01\n-4.1485911497377479e+01\n9.7822668836407676e+00\n2.4653735771382713e+01\n-5.2698087596204914e+01\n7.6716861610112383e+00\n2.2837566343186811e+01\n-4.9723849839127951e+01\n9.8518867843850513e-02\n1.9347496538546025e+01\n-4.6404693446597129e+01\n-1.3288672158399690e+01\n1.3365111617981693e+01\n-3.9550123631246933e+01\n-1.2880563796225054e+01\n1.3113526859041968e+01\n-3.8564853178574687e+01\n-1.6192316111122661e+01\n1.2397115952265642e+01\n-3.8548857416783761e+01\n-1.0530188931004130e+01\n1.3041720262573655e+01\n-3.7653314077676335e+01\n1.1789358188250849e+00\n2.0425947337424844e+01\n-4.8264263681392336e+01\n9.7519598356839197e+00\n2.3766013559494588e+01\n-5.1301095776540670e+01\n8.2421602213459833e-01\n1.9659547017285263e+01\n-4.6396935973585911e+01\n-1.1325036961555478e+01\n1.3898000654637530e+01\n-3.9848912596880318e+01\n-2.3507347985843112e+00\n1.7764090666955759e+01\n-4.4897443764216739e+01\n-9.1792628656913120e+00\n1.5028065946261272e+01\n-4.1675563972562195e+01\n-5.7491788344929473e+00\n1.6421514885554796e+01\n-4.3170861080271393e+01\n-1.4819958165929979e+01\n1.2731881663646220e+01\n-3.9493598819710080e+01\n-2.8160276975747496e+00\n1.7731402967288219e+01\n-4.4960947991560097e+01\n-1.4924320664826528e+01\n1.2396736751944596e+01\n-3.8677040798783970e+01\n-1.5397973761986032e+00\n1.8143339949362755e+01\n-4.5778013116408665e+01\n-2.6691901163473024e+00\n1.7802259549504871e+01\n-4.5229089977466337e+01\n-1.3407410443723117e+01\n1.0973959020805921e+01\n-3.4979487909462435e+01\n-1.0987150260406466e+01\n1.2447338268905634e+01\n-3.6998052936575959e+01\n-2.0022765662986215e+00\n1.7886318466384083e+01\n-4.5555072864685272e+01\n1.4107454621270739e+01\n2.6288003485070252e+01\n-5.6063326852326213e+01\n-1.4275026630698331e+01\n1.0390650525480771e+01\n-3.3749791142665444e+01\n-8.9090302584929582e+00\n1.4888399010512193e+01\n-4.2101874302138860e+01\n-1.5744084880840776e+00\n1.8232088035955545e+01\n-4.5799887293243430e+01\n-1.2629846304911005e+01\n1.1373447190252442e+01\n-3.5473643568063864e+01\n-7.7763546453171415e+00\n1.4510241726395034e+01\n-4.1074192019007185e+01\n-8.8287226570978152e+00\n1.4816509202522710e+01\n-4.2217271659118758e+01\n1.4746432981624726e+00\n1.9516524802789075e+01\n-4.7887195464796861e+01\n-1.0995384225339340e+01\n1.2487585529948813e+01\n-3.8093905558073828e+01\n-1.1588537296088894e+01\n1.3226092289595016e+01\n-4.0315146279188795e+01\n-2.8408373133152263e+00\n1.7535574012660387e+01\n-4.5737133750766269e+01\n-9.9521961455989185e+00\n1.4357613288162112e+01\n-4.1689988203358318e+01\n-7.9854837919282762e+00\n1.4774994644741160e+01\n-4.2030660353070886e+01\n-3.3355424445974382e+00\n1.7350275676464939e+01\n-4.5281235631383637e+01\n3.5200263048868713e-01\n1.8904604972054624e+01\n-4.7773281597557130e+01\n-1.6791538330196134e+00\n1.7947681386206540e+01\n-4.6129381369352089e+01\n-8.9008735870705920e+00\n1.4431884331619662e+01\n-4.2084311942429899e+01\n1.5230832259702556e+00\n1.9543057722044903e+01\n-4.8117463255067783e+01\n-8.3951780504258942e+00\n1.4664444629395513e+01\n-4.2423074753571235e+01\n-8.2438900795001135e+00\n1.4921909591151701e+01\n-4.2903769050496336e+01\n-1.5240396545834228e+01\n1.2018695037089348e+01\n-3.9628418952830238e+01\n8.1634217123706598e+00\n2.2185364575591404e+01\n-5.1057582727638753e+01\n1.6173880529732546e+01\n2.5877121172130245e+01\n-5.5172931485137561e+01\n-3.0679774909020425e+00\n1.7288939961543882e+01\n-4.5584764343326981e+01\n-1.3125728322645621e+01\n1.1662017389480440e+01\n-3.8058795750649104e+01\n-3.7660474488207489e+00\n1.6718773594974309e+01\n-4.5227872630077073e+01\n8.7398282042057271e+00\n2.2369440197242355e+01\n-5.1377971273181231e+01\n-1.5440463748314968e+01\n1.1877922245817842e+01\n-3.9595909524957968e+01\n1.8150630274876136e+01\n2.8618958556234070e+01\n-6.1612221710480696e+01\n-1.3590506817186398e+01\n1.1553664403752563e+01\n-3.7936471662447182e+01\n-1.7568115799100383e+00\n1.7773491388267225e+01\n-4.6307703415469817e+01\n3.0242311150299903e+00\n2.0107551556746923e+01\n-4.9394223817183658e+01\n-1.3735028020324666e+01\n1.2560393054268651e+01\n-4.0535829574893803e+01\n-1.3735028020324666e+01\n1.2560393054268651e+01\n-4.0535829574893803e+01\n-2.2596507503551722e-01\n1.8488857168409300e+01\n-4.7593082169894586e+01\n-5.9813506406392705e+00\n1.5489274612792753e+01\n-4.3786825338944382e+01\n8.1130718950536576e+00\n2.2015127409164226e+01\n-5.1519735119148258e+01\n1.4467374341049086e+00\n1.9098489883576491e+01\n-4.8006401592408487e+01\n1.1229159268358643e+01\n2.3308387150535602e+01\n-5.2515786249515060e+01\n1.2441653966757436e+01\n2.4138410125316252e+01\n-5.4185526385014299e+01\n-9.3868553471289022e+00\n1.3182887442464052e+01\n-3.9950829984880457e+01\n-1.0968705802184765e+01\n1.3434815365086070e+01\n-4.1878216789848601e+01\n1.2780352459101330e+01\n2.3926851144349882e+01\n-5.3496456472660306e+01\n1.2890732606216611e+01\n2.4025827151008770e+01\n-5.3836087118841903e+01\n7.0455362508280617e+00\n2.2020998948535375e+01\n-5.2662667836487785e+01\n1.0890689533709054e+01\n2.4176066857629525e+01\n-5.5771537049380420e+01\n1.4453851680338992e+01\n2.4391487788970210e+01\n-5.3629477950137158e+01\n1.1509841156991935e-01\n1.8290839232267942e+01\n-4.8116045216010392e+01\n-1.6237568967501850e-01\n1.8339148828086675e+01\n-4.7751791082846587e+01\n1.7232149196172148e+00\n1.9010619559314172e+01\n-4.8347441987787661e+01\n1.1799436643423034e+01\n2.3800639415840177e+01\n-5.4795597369324021e+01\n-6.8995341633727199e+00\n1.4529369380489358e+01\n-4.2839893392351428e+01\n-8.6541608948020876e+00\n1.4232262017544391e+01\n-4.2914563509725838e+01\n-7.2520070393493610e+00\n1.4740399877744984e+01\n-4.3772135236571003e+01\n-1.0198161308274461e+01\n1.3483544113987589e+01\n-4.2140340135261887e+01\n-1.0316172329672476e+01\n1.3409142169754178e+01\n-4.2097256720490080e+01\n7.8323135113862516e+00\n2.2302797180540590e+01\n-5.3622464920759434e+01\n1.7191920039766735e+01\n2.5642717048759717e+01\n-5.6105618486983204e+01\n6.1431249527089733e+00\n2.1422686487703999e+01\n-5.2447950607554198e+01\n-6.6088393785030100e+00\n1.5100557286511496e+01\n-4.4270491733382379e+01\n-8.8873151885251680e+00\n1.3231537839590896e+01\n-4.1292662489299794e+01\n-3.9743720723771603e-01\n1.7859965625299939e+01\n-4.7664055451294665e+01\n-7.7719141740750279e+00\n1.3844907483187054e+01\n-4.2024444678000208e+01\n-7.7448490063058548e+00\n1.3781822852118051e+01\n-4.2106256246213206e+01\n2.7212811751500112e+00\n1.9381968917446287e+01\n-5.0309695686163039e+01\n2.6280317905946107e+00\n1.9025794569352147e+01\n-4.9224352919686943e+01\n-1.1817566194548165e+01\n1.1143252722021057e+01\n-3.7644948457884936e+01\n1.7463018091151717e+01\n2.5531824732780347e+01\n-5.6558139108552609e+01\n-1.0030216753063071e+01\n1.3417198184583127e+01\n-4.2691583396045353e+01\n-8.9281739217192850e+00\n1.3694933918234838e+01\n-4.3022679847563708e+01\n-9.2942818542458872e-01\n1.7258922389778647e+01\n-4.7709061409077748e+01\n-8.8374349525347178e+00\n1.3837286471297359e+01\n-4.3317058390301433e+01\n-1.0091813407030166e+01\n1.3184854865638663e+01\n-4.2664847428564258e+01\n-8.2912370660692947e+00\n1.3989251597253915e+01\n-4.3677703994590004e+01\n-7.8990474996361488e+00\n1.3456732379669097e+01\n-4.2113732644268659e+01\n-6.3271356083281178e+00\n1.4727557523713282e+01\n-4.4715888931471106e+01\n1.5087149357020376e+01\n2.5825656377287977e+01\n-6.0146129572246046e+01\n-8.3162873065222733e+00\n1.4096241925805385e+01\n-4.4138494828554698e+01\n-8.1171395179461836e+00\n1.4040821659516880e+01\n-4.4056115939542934e+01\n-1.2580562108006902e+01\n1.1413493638313707e+01\n-4.0077303975922611e+01\n-1.6662322587566695e+01\n1.0606774137289566e+01\n-4.0708561383595885e+01\n-1.6584795974694188e+01\n1.0529183342254933e+01\n-4.0375057964226748e+01\n-1.3838051732926234e+01\n9.7325071333275766e+00\n-3.6662446700021775e+01\n-1.8633269775103258e+00\n1.6094873299845094e+01\n-4.6124218992898484e+01\n-1.4582442372866735e+01\n9.3510961624563311e+00\n-3.6013707429370463e+01\n-8.7424312913713322e+00\n1.3282445821887960e+01\n-4.3789029038940058e+01\n-7.2473297289565979e+00\n1.4008761763067994e+01\n-4.4766971137826623e+01\n-8.1665205479950487e+00\n1.3200787898140826e+01\n-4.3017048915368498e+01\n-3.2894048178194990e-01\n1.7055316157496488e+01\n-4.9128988880251867e+01\n-6.5540091439199140e+00\n1.4102178167402283e+01\n-4.4904815854617233e+01\n-9.5922871740307976e+00\n1.2835440156611391e+01\n-4.3750107793045714e+01\n-6.9511137390837625e+00\n1.4186109348985774e+01\n-4.5784276284938315e+01\n7.5642151849622574e-01\n1.7376695134441135e+01\n-4.9523543410398318e+01\n5.7690587179946036e+00\n1.9579127954725163e+01\n-5.2414651119065937e+01\n-9.6612613592547341e+00\n1.2848536557971910e+01\n-4.4118143963001188e+01\n2.1202786420104104e+01\n2.8461767069134424e+01\n-6.7185928189225393e+01\n5.5675545052677009e+00\n1.9618162609551259e+01\n-5.3569540723589853e+01\n5.7399540013856019e+00\n1.9453288139381112e+01\n-5.2533218544375494e+01\n-1.1980520243480973e+01\n1.0862014661395129e+01\n-4.0332037971314421e+01\n-1.1980520243480973e+01\n1.0862014661395129e+01\n-4.0332037971314421e+01\n4.4093875409756740e-02\n1.6818152090103670e+01\n-4.9443101803099175e+01\n-4.0716780244619715e+00\n1.5176055504734258e+01\n-4.7826991493054095e+01\n7.8431082195582658e+00\n2.0556920940664565e+01\n-5.4309537781508965e+01\n3.6428860018875470e-01\n1.7136410299575754e+01\n-5.0452765009785175e+01\n-9.6215578627774079e+00\n1.2368478345164277e+01\n-4.4020406765272710e+01\n1.0136939068327184e+01\n2.2487697260951698e+01\n-5.8866150609624924e+01\n9.6758139004025026e+00\n2.1567911871264126e+01\n-5.6539762438451127e+01\n7.8047960365038298e+00\n2.0180844128649444e+01\n-5.3891160294806404e+01\n-1.0135285829043811e+01\n1.2398719661113560e+01\n-4.4482130288475773e+01\n7.9180933490066998e+00\n2.0199205625785112e+01\n-5.4315285681990403e+01\n2.2637507052415150e-02\n1.6583785766723462e+01\n-4.9999223448712435e+01\n-1.6693980535911717e+01\n9.6860355247870000e+00\n-4.1826493412991908e+01\n5.4429863120577622e+00\n1.8872364522521295e+01\n-5.2985483339819844e+01\n1.1685392556002436e+00\n1.7303122908310893e+01\n-5.1266338722549797e+01\n-4.0181822095053565e+00\n1.5004662819423709e+01\n-4.8701320137892054e+01\n-1.2464709969906101e+01\n1.0985471799645852e+01\n-4.3199459568111443e+01\n-6.7862528965114048e+00\n1.3331262795413691e+01\n-4.6170740021864034e+01\n-1.1685602888629841e+01\n1.0825227070764280e+01\n-4.1883585546305987e+01\n-9.6618375867031840e+00\n1.2172344600914011e+01\n-4.4620696170900985e+01\n1.0242644727591561e+01\n2.1780924363654197e+01\n-5.8309082861827818e+01\n-1.1233940892732033e+01\n1.1465886435403171e+01\n-4.3937824551087829e+01\n-1.3610618764671170e+01\n9.6878197966381645e+00\n-4.0413399982187904e+01\n9.7247227660559989e+00\n2.0685475968245669e+01\n-5.5967073515970135e+01\n1.4311088837119119e+01\n2.3536627902369506e+01\n-6.0399441612253909e+01\n1.0061735873980396e+01\n2.0756034524707292e+01\n-5.5929136689473033e+01\n1.0061735873980396e+01\n2.0756034524707292e+01\n-5.5929136689473033e+01\n1.0341288870406512e+01\n2.2473164581230233e+01\n-6.0972877809211390e+01\n-2.6943870335067965e-01\n1.6264478271657257e+01\n-5.0659839530463096e+01\n1.6417650177659542e+01\n2.4854644087349257e+01\n-6.4019964092426449e+01\n1.5381496037097648e+01\n2.3331584965732603e+01\n-5.9843145306962960e+01\n-1.1556145179157904e+00\n1.5576729156017503e+01\n-5.0087501123001850e+01\n9.5820250450267590e+00\n2.0220276778065642e+01\n-5.5628138969022935e+01\n9.6451482293914736e+00\n2.0377427379188198e+01\n-5.6013158397546775e+01\n9.9435947314530644e+00\n2.0496274759626981e+01\n-5.6167178030085772e+01\n1.0130026399007242e+01\n2.0539329685334678e+01\n-5.6168116487494800e+01\n1.6370907671772439e+01\n2.4708684129277120e+01\n-6.4193410297500904e+01\n1.6137529221207924e+01\n2.4128107117587209e+01\n-6.2190242118103974e+01\n1.8229253635249520e+01\n2.5705191792935796e+01\n-6.6037619906997790e+01\n4.6536305491294430e+00\n1.7986198555644748e+01\n-5.3179928161417223e+01\n9.5748087135985127e+00\n2.0246375390397798e+01\n-5.5721977436214829e+01\n-5.3110233224694010e+00\n1.3655249125495075e+01\n-4.7736606276038366e+01\n1.9783599821239555e+01\n2.6478207096026310e+01\n-6.7484892110027715e+01\n-1.2704453525262050e+01\n1.0488083514472246e+01\n-4.3833811887064329e+01\n-5.8517155195192210e+00\n1.3570819162563312e+01\n-4.7920328396535645e+01\n1.5509037916679240e+01\n2.3996231234236149e+01\n-6.3716886251606674e+01\n4.4189811365658249e+00\n1.7479096012894463e+01\n-5.2865921674558997e+01\n4.3374200441663993e+00\n1.7673287463107883e+01\n-5.2977330587313752e+01\n1.0274714992918017e+01\n2.0405000763337316e+01\n-5.6585228887029757e+01\n9.9144837681538593e+00\n2.0347071230103676e+01\n-5.8010356773486102e+01\n-3.8873396672425335e+00\n1.3966270861062524e+01\n-4.9144150102935519e+01\n-6.4589984680794510e+00\n1.2485369799543466e+01\n-4.7093327215208085e+01\n1.7609694378558178e+01\n2.2959573689485545e+01\n-6.0366676421032196e+01\n-5.9783890226866259e+00\n1.3042290014440761e+01\n-4.8306811480843265e+01\n1.6164871973857771e+01\n2.2262579107337050e+01\n-5.9820053322590269e+01\n1.6344757765758281e+01\n2.2428607039962937e+01\n-6.0440800382889570e+01\n1.5497591920301641e+01\n2.2864444922616435e+01\n-6.2304598843804094e+01\n-9.8811162601874436e+00\n1.0217251943471906e+01\n-4.3049045713310555e+01\n-9.8811162601874436e+00\n1.0217251943471906e+01\n-4.3049045713310555e+01\n9.7544460440839220e+00\n1.9565459002589762e+01\n-5.7024227264980532e+01\n1.2381231145478644e+01\n2.0494013221511977e+01\n-5.7954307019387258e+01\n1.3146214217116256e+01\n2.1413454781829437e+01\n-6.1109227123590337e+01\n1.5264681070087406e+01\n2.1615698154461199e+01\n-5.8995036698142556e+01\n5.8209142358936106e+00\n1.8213472599129581e+01\n-5.7022840232654112e+01\n-8.6381643724433381e+00\n1.1632017454816518e+01\n-4.7460544198256393e+01\n6.1874339449660454e+00\n1.7866295950880179e+01\n-5.6287517184276794e+01\n-8.4462644928596973e+00\n1.1581655592581612e+01\n-4.7786628291998618e+01\n1.1029517950066374e+01\n1.9720302373122486e+01\n-5.8134121001695121e+01\n1.0303691596513174e+01\n1.9628847475862461e+01\n-5.9441841308380738e+01\n9.3463567801872731e+00\n1.9153958497544551e+01\n-5.8744551864949536e+01\n1.5572764814919275e+01\n2.2930451840950440e+01\n-6.5551108370522357e+01\n-1.3433699699486157e+01\n9.1369250401047371e+00\n-4.5065832719544680e+01\n1.3916540021480749e+01\n2.0735859916870499e+01\n-6.1225779962690659e+01\n1.3513904728284373e+01\n1.3945762902986830e+01\n-3.7360815579161361e+01\n-1.9190297987088019e+01\n5.8651546536117065e+00\n-4.1793560738086740e+01\n1.3250325823280184e+01\n1.3021837163792990e+01\n-3.5879436550500856e+01\n1.3250325823280184e+01\n1.3021837163792990e+01\n-3.5879436550500856e+01\n-1.5995490868088085e+01\n4.9185681013377085e+00\n-3.5793859572322802e+01\n-1.3558160153931178e+01\n7.2243149264237587e+00\n-4.2339995537694101e+01\n-1.2188927894891853e+01\n6.8152367584664235e+00\n-4.0395310055609635e+01\n1.3715590139326164e+01\n1.2725964506039862e+01\n-3.7092049754866181e+01\n1.3569569188913858e+01\n1.2489705834031430e+01\n-3.6156528533847336e+01\n1.3569569188913858e+01\n1.2489705834031430e+01\n-3.6156528533847336e+01\n5.5223272114494213e+00\n1.3629403337995083e+01\n-5.0447204311074849e+01\n3.9620701601221011e+00\n1.3089196142924665e+01\n-5.0251541621885167e+01\n6.0083436658023643e+00\n1.3197213740332568e+01\n-5.0096229677402881e+01\n1.3366277541009485e+01\n1.1679408161453940e+01\n-3.5926951520751793e+01\n4.1865334792970055e+00\n1.1315651019383839e+01\n-4.8227395509279589e+01\n6.9940999195505755e+00\n1.2310173426426092e+01\n-4.9754179463395360e+01\n4.8049261498986295e+00\n1.1083946125684921e+01\n-4.7770495041265193e+01\n3.5900483879625660e+00\n1.0572115777751939e+01\n-4.7411652585224381e+01\n3.4944193193284230e+00\n1.0248896901338991e+01\n-4.6115737128683683e+01\n1.1840018745773824e+01\n1.3135391807579177e+01\n-5.0133659263024228e+01\n3.9888373325664701e+00\n1.0425838709629438e+01\n-4.7750315765850829e+01\n4.9073327245630507e+00\n1.0402482275782981e+01\n-4.6729405338243225e+01\n1.4339908763376011e+01\n1.1725490347606133e+01\n-4.0167071147730752e+01\n-1.8752812580264941e+01\n1.8056714117664285e+00\n-3.5772197946561903e+01\n1.2556661786069682e+01\n1.3226428245388783e+01\n-5.2008274883920400e+01\n-1.7265608086656716e+01\n2.0533855666235024e+00\n-3.5479001598718483e+01\n1.3352121242638562e+01\n1.0666589523189099e+01\n-3.7090899627581429e+01\n3.7256988197840588e+00\n9.5855867428321400e+00\n-4.6478034601289352e+01\n1.3598515302015361e+01\n1.0336932276048035e+01\n-3.5332961380805088e+01\n-6.1104936214659817e+00\n5.9082560403976832e+00\n-4.1625206119135974e+01\n-1.3734316478902670e+01\n2.1237500914685508e+00\n-3.2764738979434156e+01\n4.0012277838860939e+00\n9.3661191489583899e+00\n-4.6280899761430668e+01\n6.6065359846897689e+00\n1.0142867564129999e+01\n-4.7058969337003504e+01\n1.3708061646533166e+01\n1.0039674755454422e+01\n-3.5590677994211930e+01\n2.5380393235579759e+00\n8.2413767928030044e+00\n-4.3760949520583750e+01\n4.3374439349363092e+00\n9.2261279376342600e+00\n-4.5564780683615005e+01\n2.0059829713481858e+00\n8.1180075054418133e+00\n-4.3093775124372684e+01\n7.2133614901361547e+00\n1.0113069377441031e+01\n-4.7468580710011324e+01\n7.5545732580620388e+00\n1.0087480835047986e+01\n-4.6998537249501943e+01\n1.3931982076365269e+01\n1.0826344479560019e+01\n-4.0776047855263279e+01\n9.2912871906979824e+00\n1.0520960608850292e+01\n-4.7735727043371135e+01\n1.3572235659768864e+01\n9.7970733753221904e+00\n-3.5838750114259788e+01\n1.3402885404574659e+01\n9.8532503057183973e+00\n-3.5678470316268090e+01\n1.3195293902102765e+01\n1.0192155819421798e+01\n-3.9153395108052983e+01\n8.0714615809582302e+00\n9.6177379312817735e+00\n-4.5528216169067903e+01\n3.1469135933210306e+00\n7.7749552738667802e+00\n-4.3134843502134082e+01\n9.0190365108951305e+00\n1.0069573450735581e+01\n-4.7170762227538447e+01\n1.3718448951144698e+01\n9.6301034374257188e+00\n-3.6210169267897314e+01\n1.2531492328590870e+01\n1.0722307921815807e+01\n-4.6714624993581452e+01\n4.7255885251361418e+00\n8.0473359826667767e+00\n-4.4102252247304101e+01\n-1.1255311844636706e+01\n2.2769949522870236e+00\n-3.5500748493218211e+01\n-2.2689907520178139e+00\n3.6414344916656196e+00\n-2.8085685141256846e+01\n-2.1725181959163753e+00\n3.7457898095367357e+00\n-2.8346360757444184e+01\n-7.7605844746915720e+00\n3.1541779923957338e+00\n-3.6664405930217001e+01\n1.4450511085316137e+01\n9.9081908470619027e+00\n-4.0247201984601823e+01\n1.4450511085316137e+01\n9.9081908470619027e+00\n-4.0247201984601823e+01\n6.7791559764584863e-01\n3.5743536869066146e+00\n-2.3056691768786024e+01\n-2.9118794255584044e+00\n3.0097494290006104e+00\n-2.7235748418361368e+01\n2.1397346025298378e+00\n4.2000907294504426e+00\n-2.5046616434397887e+01\n2.1397346025298378e+00\n4.2000907294504426e+00\n-2.5046616434397887e+01\n2.7065800631237154e+00\n4.0876492872955392e+00\n-2.3691263036770742e+01\n-3.0977600450367717e+00\n2.8800945803179374e+00\n-2.7157856003748378e+01\n2.5766043417913371e+00\n4.0021203826528398e+00\n-2.3592850702976278e+01\n2.5786391762272367e+00\n3.9967227726907417e+00\n-2.3617798242414821e+01\n6.3334670414347288e-02\n3.0716940121708554e+00\n-2.2192129363341785e+01\n-8.3964895804204864e-01\n2.7990679014309707e+00\n-2.2662055248874754e+01\n1.4184436954132451e+01\n9.3899472908959449e+00\n-4.0817782106242291e+01\n-6.4028897143732397e+00\n2.9196681598587051e+00\n-3.6308416500026674e+01\n1.5024383260399031e+01\n9.1507596215958973e+00\n-3.8062640314688366e+01\n-1.1952262671569937e+01\n8.1141406725578213e-01\n-3.2454395695358031e+01\n1.1559025726461451e+01\n8.7898602076905679e+00\n-4.4131812386691415e+01\n-1.1098149441137798e+01\n1.0657299046229791e+00\n-3.3812880156409712e+01\n-2.1421060991382048e+00\n2.5682555565073968e+00\n-2.5631238154003803e+01\n1.3647313380784428e+01\n8.6140252027555437e+00\n-3.8642505535584519e+01\n3.2220953928546332e+00\n3.8100093559080550e+00\n-2.3399768014163001e+01\n6.7036384039523638e+00\n6.9938958963077198e+00\n-4.2055433479548597e+01\n9.9450666609599221e+00\n8.1286379047292705e+00\n-4.4157090863003745e+01\n3.2421818685222896e+00\n3.7097793007771838e+00\n-2.3187878340549233e+01\n1.2348672100861103e+01\n7.0356014555626381e+00\n-2.9876758824688086e+01\n2.0537513853629337e+00\n3.4010118805418754e+00\n-2.3121543157188480e+01\n-1.6970585672165002e+00\n2.1295807279269789e+00\n-2.3175862200528126e+01\n1.0145751117730013e-01\n2.6047989793600443e+00\n-2.1876617870084026e+01\n1.4057588555191982e+01\n8.6089554630196172e+00\n-4.1596197732833133e+01\n-2.5183999726940232e+00\n2.0018118152615081e+00\n-2.4811250962198688e+01\n3.7012066066790563e+00\n3.6329109388882785e+00\n-2.3365340758918837e+01\n1.8542224243305210e+00\n2.9486328939101472e+00\n-2.2157184507727468e+01\n1.4668160627664346e+01\n8.4155536324385896e+00\n-3.9663408884871885e+01\n3.8862040264484756e+00\n3.6320270226679057e+00\n-2.3620620863210007e+01\n-3.7742791216019742e+00\n1.4291505011992458e+00\n-2.5082636344224870e+01\n9.4084983736428711e+00\n6.8659302735510748e+00\n-4.2080768227282881e+01\n-7.5471187361905645e-01\n1.9985023371217525e+00\n-2.1965410615583725e+01\n1.0216205395058518e+01\n6.9417814343539836e+00\n-4.2519356718379058e+01\n3.3289116739599938e+00\n3.1496218896225292e+00\n-2.2822394126450796e+01\n4.2783897056128067e-01\n2.1572073341838212e+00\n-2.1199817582909713e+01\n3.9343599250606148e-01\n2.2568261910946346e+00\n-2.1702825762351466e+01\n1.0967683667353391e+01\n6.9508224608436819e+00\n-4.3294808634342687e+01\n1.3276714402593953e+01\n7.7551025351799661e+00\n-4.5057602763098878e+01\n-9.7578048323147728e-03\n2.1075225059750098e+00\n-2.2508528288923255e+01\n-6.2529018744417408e+00\n1.0931030617369626e+00\n-3.3912565925241282e+01\n-6.2350368168251604e+00\n1.0842115932283358e+00\n-3.3916260353741151e+01\n-1.0742131662342957e+00\n1.6367495631675371e+00\n-2.2259321200079022e+01\n1.2978841835215665e+01\n6.5354265463990791e+00\n-3.2508801642336870e+01\n-7.1637817161047346e-01\n1.6164776413125681e+00\n-2.1548088508695923e+01\n-7.3246407137534575e-01\n1.6416593571555573e+00\n-2.1695395453731400e+01\n1.0263280285596787e+01\n6.3806398970042499e+00\n-4.1599684989198828e+01\n-1.6149581493382701e+00\n1.3819632568680393e+00\n-2.2517422920625183e+01\n1.2052929741558371e+01\n6.0475063659521604e+00\n-2.9868553526141184e+01\n1.0182865960006278e+00\n2.0990456876529229e+00\n-2.1504977628804053e+01\n8.8574938316566385e+00\n5.7908762223670971e+00\n-4.1205297260648194e+01\n3.8273382185134008e+00\n2.8658401831472387e+00\n-2.2350629721285785e+01\n4.8897249330246767e-01\n1.8381488140477842e+00\n-2.1026271967050288e+01\n8.1648031294598000e-01\n1.8983016684012859e+00\n-2.0954406543909560e+01\n9.7379170413116096e+00\n5.8758034079689061e+00\n-4.0989649721112322e+01\n4.1305649616852813e+00\n2.9215176342776723e+00\n-2.2734683978016992e+01\n4.1260106945448580e+00\n2.9259256746061562e+00\n-2.2701786656234741e+01\n9.0882950047365796e+00\n5.6792569375708961e+00\n-4.1498204292994956e+01\n4.3177577412749901e+00\n2.9736300813861356e+00\n-2.2924725083610788e+01\n4.1701305387213905e+00\n2.8885661848826856e+00\n-2.2714892969668107e+01\n4.1701305387213905e+00\n2.8885661848826856e+00\n-2.2714892969668107e+01\n9.0088531117060977e-01\n1.9344585067727464e+00\n-2.1367261557468712e+01\n1.3668306703395404e+01\n6.2607866963554502e+00\n-3.2142638770947734e+01\n-2.4891627591817045e+00\n7.5824652418703542e-01\n-2.3202886876445195e+01\n-1.7672084403486182e-01\n1.3335833305467275e+00\n-2.1084974252769857e+01\n1.2229406122718188e+01\n5.5872429520345985e+00\n-2.9666092036782842e+01\n1.6710950413275500e+00\n1.8322102140119891e+00\n-2.0695460096685007e+01\n1.5413541558734869e+01\n7.0805120598499753e+00\n-4.1635111561632669e+01\n1.2529428908328139e+01\n5.4693747331620424e+00\n-2.9395693575868055e+01\n1.5226688200130685e+01\n6.9747671154029227e+00\n-4.2228738172350624e+01\n1.4084465569655796e+01\n6.4475276253802107e+00\n-3.8806186274469994e+01\n4.8589795178717293e-01\n1.4203672903448656e+00\n-2.0805747406840929e+01\n4.0331307773366296e+00\n2.5066274243758855e+00\n-2.2079010500847435e+01\n4.8023656956661354e-01\n1.3525308155793130e+00\n-2.0700589257964875e+01\n1.2809230433142437e+01\n5.4547157669406898e+00\n-2.9662718902001110e+01\n1.2228443379318925e+00\n1.5023027421646300e+00\n-2.0620242457681158e+01\n3.4561201863616930e+00\n2.1759583955737889e+00\n-2.1441008984026567e+01\n1.2913488219767919e+01\n5.3654437160638615e+00\n-3.0408009916985751e+01\n2.4219955210650421e+00\n1.7775880574372425e+00\n-2.0724458120328372e+01\n2.6406384030215260e+00\n1.8417692849708778e+00\n-2.0889378735318992e+01\n4.8812043109667336e+00\n2.6175568772012188e+00\n-2.3238274557610723e+01\n1.4070694122826228e+00\n1.4903345108752912e+00\n-2.0605216627425300e+01\n-1.7323820015691635e-01\n1.0300749444854618e+00\n-2.1355179817697959e+01\n-2.3588290567912940e+00\n3.9831654923919302e-01\n-2.2724000664060082e+01\n-2.3581076573808986e+00\n3.9646656919687467e-01\n-2.2709322312631528e+01\n-2.3658117164844499e+00\n4.0413791562139861e-01\n-2.2789428269931705e+01\n-2.3666707544753800e+00\n4.0610193550374973e-01\n-2.2788707658923755e+01\n-2.3060648138707975e+00\n3.9391321021589160e-01\n-2.2758829957073331e+01\n-2.3060648138707975e+00\n3.9391321021589160e-01\n-2.2758829957073331e+01\n1.2759837724091064e+01\n5.3911996598280219e+00\n-3.1998079626676237e+01\n4.5139056654120555e+00\n2.3909743287317413e+00\n-2.2442787903527616e+01\n-2.1583657683371826e+00\n4.2469928129452478e-01\n-2.2814692539824261e+01\n-5.2938995978903580e-01\n7.9289879773838301e-01\n-2.1060606035855372e+01\n1.9657419892187145e+00\n1.5114341211195950e+00\n-2.0539955151154135e+01\n9.5196536475035287e-01\n1.1932988062855094e+00\n-2.0542181611838135e+01\n9.5117854048390749e-01\n1.1952017159154271e+00\n-2.0542345906228181e+01\n3.6139505390388584e+00\n1.9791589615431560e+00\n-2.1296641386378841e+01\n1.9174041097451049e+00\n1.4115648076952343e+00\n-2.0464377811924344e+01\n2.7777391623906413e+00\n1.6350394995811939e+00\n-2.0780121579462037e+01\n7.4886728870617170e-01\n1.0491026484985986e+00\n-2.0632318973686480e+01\n2.6204070708357747e+00\n1.5346896272206880e+00\n-2.0643621002983426e+01\n3.7020856005732394e+00\n1.8391730252994933e+00\n-2.1391496080661959e+01\n1.2454669469971054e+00\n1.0606575837282977e+00\n-2.0389546263585185e+01\n6.3437509839710571e-01\n9.0152254765921414e-01\n-2.0566105901555353e+01\n3.6918306397578253e+00\n1.7797724668500670e+00\n-2.1357717874531811e+01\n3.7418925905870046e+00\n1.7858229122318112e+00\n-2.1381059414261347e+01\n1.2784303825381048e+01\n4.6653909055299847e+00\n-2.9584529188307023e+01\n1.3476986850973107e+01\n4.9111883247469370e+00\n-3.1277831326753525e+01\n1.1022679854665689e+01\n4.4018864653555054e+00\n-3.9444571712361387e+01\n-8.3765552756273447e+00\n-1.7661035607479858e+00\n-3.0101203285366974e+01\n-3.3005595872489355e+00\n-4.0216610752820570e-01\n-2.2726437584530608e+01\n1.2652486790832413e+01\n4.5269040439619355e+00\n-3.0775969622207608e+01\n1.2589746443512688e+01\n4.5262771207759895e+00\n-3.0998645528578873e+01\n3.4482361955425361e-01\n6.3112530515558596e-01\n-2.0612792258224310e+01\n3.8275365955810976e+00\n1.6571450302217359e+00\n-2.1315544826288605e+01\n2.3123238496922744e+00\n1.1548296582600519e+00\n-2.0403972099908902e+01\n1.3482677112102539e+00\n8.4067593462856982e-01\n-2.0225378670224725e+01\n1.2670777410418191e+01\n4.4368178746627818e+00\n-3.0555985218026802e+01\n1.0707834967531399e+01\n3.9637816980631819e+00\n-3.8883569107614321e+01\n1.5200923802075530e+00\n8.5373231503628266e-01\n-2.0363175427936866e+01\n4.0501307643728977e+00\n1.6021133605469895e+00\n-2.1415071911965089e+01\n5.6320774443909072e-01\n5.1668766362287633e-01\n-2.0487606831852094e+01\n9.7144020277457521e-01\n6.5473581784357826e-01\n-2.0427341751623945e+01\n4.0067451843605904e+00\n1.5574856117631937e+00\n-2.1445825931210784e+01\n1.3029627495115832e+01\n4.4605984031067178e+00\n-3.4675658835726118e+01\n3.8339957156234221e+00\n1.4860940722833111e+00\n-2.1252356688379017e+01\n-9.4780567215498024e-01\n3.8891782719650304e-02\n-2.1471376646487236e+01\n2.6331889298074340e-01\n3.9951025569381826e-01\n-2.0685499729030180e+01\n1.0377323481899904e+01\n3.6637496506200415e+00\n-3.7957445938587455e+01\n4.7936776399355994e+00\n1.7424464475802577e+00\n-2.2207052130813420e+01\n1.3275421668796552e+01\n4.4437871368136621e+00\n-3.4092938835506757e+01\n4.0333880664948589e+00\n1.4906348881145866e+00\n-2.1401049065777858e+01\n4.4522561495810296e+00\n1.6145564838036350e+00\n-2.1788428659015757e+01\n1.0578938472655481e+00\n5.5221142059367168e-01\n-2.0374265843653401e+01\n2.1055717665349388e-01\n2.9260141899945424e-01\n-2.0629017552416858e+01\n6.8602749664842355e-01\n4.3223881043058693e-01\n-2.0459314410642069e+01\n6.6397355774479627e-01\n4.4401252945733805e-01\n-2.0501860683766552e+01\n1.3777541484684514e+01\n4.4724963394859527e+00\n-3.2647435354758358e+01\n1.2901320131798789e+01\n4.1895159635509573e+00\n-3.0372641204452677e+01\n4.6334126725775038e-01\n3.5508656989469051e-01\n-2.0564297330337553e+01\n1.2841136979939130e+01\n4.1209952623295933e+00\n-3.0619899819939526e+01\n3.5991943221592786e+00\n1.2531290907330668e+00\n-2.1012408145037412e+01\n1.5940134922336593e+00\n6.3768305744401943e-01\n-2.0310187033768017e+01\n-2.1781917352049845e-01\n6.4228425999650160e-02\n-2.0876170925487923e+01\n1.3255220762857714e+01\n4.1714284217737481e+00\n-3.4294866022364090e+01\n1.3125122085973326e+01\n4.0908271447805227e+00\n-3.4614786707393939e+01\n1.2437588225583164e+01\n3.8746075270664742e+00\n-3.2645133780154964e+01\n1.3076446144789540e+00\n4.3770737909655461e-01\n-2.0225188871529706e+01\n1.3042358129905591e+00\n4.4798932507551414e-01\n-2.0309561019324370e+01\n-4.8886485207350366e-01\n-1.1769509785664840e-01\n-2.1090496335786675e+01\n1.0207209474913017e+00\n3.4554016227272311e-01\n-2.0353829593057956e+01\n1.0675100827074244e+00\n3.4729960075296340e-01\n-2.0221952637161465e+01\n2.2612131408508302e+00\n7.0926496231929814e-01\n-2.0331841668649059e+01\n1.2873393128609438e+01\n3.9927979268494536e+00\n-3.0492962416028991e+01\n3.4770826544727917e+00\n1.0218551477754261e+00\n-2.0869096659759599e+01\n1.9299378508245564e+00\n5.4750571330572517e-01\n-2.0236870683022300e+01\n-7.1199374263963389e-01\n-3.1649367219982533e-01\n-2.1378377761732509e+01\n3.0802929636530001e+00\n8.0998458698965869e-01\n-2.0640294053125071e+01\n1.2789701231044550e+01\n3.6010890024567122e+00\n-3.1273818882697693e+01\n2.1986423175567511e+00\n5.1434481591043901e-01\n-2.0313714819948860e+01\n4.8541777694357116e+00\n1.2930999522074407e+00\n-2.2023510747054353e+01\n1.2893303979322321e+01\n3.6136149116685257e+00\n-3.0277235185421521e+01\n2.3193707577030622e+00\n5.3051340195227104e-01\n-2.0207708840695748e+01\n2.8471181265240539e+00\n6.8847615273685003e-01\n-2.0520166096275091e+01\n1.2870107243603984e+01\n3.5881640672062765e+00\n-3.0924362151137618e+01\n-9.9879796364756213e-01\n-5.3017991870939263e-01\n-2.1588324253798071e+01\n1.3110428929528625e+01\n3.6160217555398311e+00\n-3.3785190142012617e+01\n3.4979075509169784e+00\n8.2599807767136013e-01\n-2.0798688374699744e+01\n3.4979075509169784e+00\n8.2599807767136013e-01\n-2.0798688374699744e+01\n-1.7492525870095652e+00\n-7.8679801215300793e-01\n-2.1529017133456602e+01\n4.3029525004455191e+00\n1.0600497270870139e+00\n-2.1398664547776654e+01\n2.7484858326507453e+00\n5.8383254864051715e-01\n-2.0430517840283184e+01\n2.2139479075465758e+00\n3.8223574151727485e-01\n-2.0186258096690352e+01\n2.1645584602378145e+00\n3.5688088435265403e-01\n-2.0165988563891194e+01\n-7.8525185498142580e+00\n-2.8805053947836581e+00\n-2.8727286619811402e+01\n3.4299705235334121e+00\n7.2830270793516327e-01\n-2.0747303160915695e+01\n-8.8272419448664046e+00\n-3.1500236401696133e+00\n-2.8120336177409204e+01\n2.3265575486372141e+00\n3.7084318664564170e-01\n-2.0267760550090035e+01\n3.1322062646705744e+00\n6.6449956820636324e-01\n-2.1656525925969376e+01\n7.0453472086022662e-01\n-1.4378404253167007e-01\n-2.0336161089185296e+01\n7.0334135191523783e-01\n-1.4162550086465001e-01\n-2.0408349904802410e+01\n1.3862397093092213e-01\n-3.0358568325937235e-01\n-2.0761847203223887e+01\n3.9516456590775055e+00\n7.8184075106610551e-01\n-2.1066259640359991e+01\n1.2325828623676087e+00\n-5.6123953524536786e-02\n-2.0306192732667594e+01\n2.8590003582598431e+00\n4.2355310280372327e-01\n-2.0457158469029054e+01\n4.2143331866525315e+00\n7.9061657216036674e-01\n-2.1278267108898536e+01\n4.2143331866525315e+00\n7.9061657216036674e-01\n-2.1278267108898536e+01\n6.0330391302546662e+00\n1.2606001522171741e+00\n-2.4433147264379176e+01\n4.7081830893261030e+00\n9.0613440133497258e-01\n-2.1757494817087281e+01\n1.3210812073861593e+01\n3.2875087123655180e+00\n-3.0106763601030753e+01\n5.0295219756860654e-01\n-3.5351821474443018e-01\n-2.0571303288377504e+01\n4.5194787434705121e+00\n7.8596168726963034e-01\n-2.1500440551398619e+01\n7.5312481487414362e-01\n-4.2375179762542453e-01\n-2.0418412783072704e+01\n3.1391804080184897e+00\n2.8998298092027613e-01\n-2.0510805782066303e+01\n1.2902992107942541e+01\n2.8937431039346100e+00\n-3.2131620534364664e+01\n1.9682666465527693e-01\n-7.1152905988314841e-01\n-2.0737174158340636e+01\n-1.3621288732955086e+00\n-1.2350002669995259e+00\n-2.1313217820455161e+01\n2.4206043059871054e+00\n-1.3655003908799467e-02\n-2.0324402043590126e+01\n1.5436738358571749e+00\n-3.0516573710519029e-01\n-2.0276703241817447e+01\n1.8695774041091031e+00\n-2.3322270210121124e-01\n-2.0240897705519107e+01\n1.4066298957262293e+00\n-4.1391045985773572e-01\n-2.0197507574799204e+01\n1.7977769924496925e+00\n-2.9785573953629835e-01\n-2.0280189437989243e+01\n1.9802226098335971e+00\n-2.4235138304590123e-01\n-2.0269815715794433e+01\n4.4202213124078824e+00\n4.3754073597638626e-01\n-2.1371845704784210e+01\n1.9463383065745847e+00\n-2.8001601841883117e-01\n-2.0288545505373001e+01\n1.3267176476817911e+01\n2.6332685213131768e+00\n-3.3269603848604028e+01\n1.3283023344303125e+01\n2.6347256078303545e+00\n-3.3298344681341852e+01\n-6.8154014402668075e+00\n-3.4606810713036715e+00\n-2.7701998677898317e+01\n1.3139091135275228e+01\n2.5962051622450479e+00\n-3.0917116477488111e+01\n3.1264394575542784e+00\n2.9738947238174631e-02\n-2.0538709361248905e+01\n1.1467369820673672e+00\n-5.7869818424207342e-01\n-2.0357642001905386e+01\n4.3420839043355501e+00\n3.6531060725208409e-01\n-2.1184483353032050e+01\n3.1877992602676932e+00\n3.3844810266465297e-02\n-2.0459060209100222e+01\n-1.1949474470252481e+01\n-4.9229352874182064e+00\n-2.3296209152272908e+01\n-5.1609081096688325e-01\n-1.2157032140439274e+00\n-2.0710591743182555e+01\n-1.9714466582716270e+00\n-1.7068136417538453e+00\n-2.1275899722923779e+01\n1.4724593705156146e+00\n-6.2169220082832544e-01\n-2.0359548889313317e+01\n1.3112545239053896e+01\n2.3837614416698734e+00\n-3.1699424543284437e+01\n2.1022705616095174e+00\n-4.2642474635147204e-01\n-2.0298713965169949e+01\n3.3176143005928096e+00\n-8.7151470844482118e-02\n-2.0649756362581019e+01\n1.3244052379914477e+01\n2.3910255899788564e+00\n-3.1871631588875477e+01\n4.8451033105242098e+00\n3.0673184612629961e-01\n-2.1787871967253640e+01\n2.1176618483263604e-01\n-1.0601830972483903e+00\n-2.0874837712774401e+01\n4.1946926488857272e+00\n1.2980606781021423e-01\n-2.1120518123861817e+01\n1.3575576428193703e+01\n2.5598562854160858e+00\n-2.9529132283033654e+01\n1.3159128812548204e+01\n2.3009745311214553e+00\n-3.1516724027360397e+01\n3.1764039630955740e+00\n-1.8837795380376224e-01\n-2.0501697690146504e+01\n-1.5247920232857086e+00\n-1.7119107265512163e+00\n-2.1118953688155578e+01\n-1.1662034813108804e+01\n-5.0593051357827363e+00\n-2.3450471847709771e+01\n-1.6053383388888975e+00\n-1.7748492182261664e+00\n-2.1088344526410243e+01\n1.1602171913609154e+00\n-8.8398146528304977e-01\n-2.0472626020625931e+01\n-1.7505638347334633e+00\n-1.8239852268454040e+00\n-2.1044552273616659e+01\n1.4237034211568869e+01\n2.4875451635924928e+00\n-3.2087551201768896e+01\n1.3577876602997174e+01\n2.2100479578549779e+00\n-3.2903026689982667e+01\n1.3905005336639933e+00\n-8.3978887311432593e-01\n-2.0435838346162726e+01\n1.3477186863240316e+01\n2.2793695964670273e+00\n-2.9563498216568238e+01\n2.2148337256133304e+00\n-6.0389673713178604e-01\n-2.0372654081212325e+01\n1.1494296504668882e+00\n-9.0734844233992140e-01\n-2.0499455296909456e+01\n3.7527851967937322e+00\n-1.8850010454932450e-01\n-2.1054696033281491e+01\n2.6376574407559792e+00\n-5.0247658947803331e-01\n-2.0382287539100584e+01\n1.9944212414348652e+00\n-7.1697160934370174e-01\n-2.0380733038605047e+01\n3.4939101667147837e-02\n-1.3735024786943983e+00\n-2.0542068762497490e+01\n1.7020036492716570e+00\n-8.5043635583971389e-01\n-2.0409970571738910e+01\n4.8601479414719879e+00\n3.2224849445304425e-02\n-2.1757644836627730e+01\n2.9007549071475327e+00\n-4.9559114918703373e-01\n-2.0417564847975505e+01\n7.3041870806884974e+00\n5.7063088504569159e-01\n-2.4564221227025747e+01\n1.3821745951859294e+00\n-1.0243154930826242e+00\n-2.0483362033962560e+01\n7.3204867639790479e+00\n5.2309481588767393e-01\n-2.4647531751171645e+01\n3.2153028589650861e+00\n-5.0444883363734794e-01\n-2.0597981765015220e+01\n4.9658804776306891e+00\n-6.8235744812148558e-02\n-2.1926277191963916e+01\n3.2545133371600272e+00\n-5.1610145081166003e-01\n-2.0587286971320719e+01\n-1.1038632723586446e+00\n-1.9609489756199379e+00\n-2.0842841628730561e+01\n1.8503211419740822e+00\n-1.0063306079296515e+00\n-2.0466819031207894e+01\n1.3551963391820058e+01\n1.8343687969168230e+00\n-3.0721909033672787e+01\n1.3296831398402524e+01\n1.5459101429773006e+00\n-3.3511120183509028e+01\n4.7258854222405722e+00\n-2.3704118260829940e-01\n-2.1616656486817675e+01\n6.4826707381174575e-01\n-1.4517028957023426e+00\n-2.0402855997043648e+01\n7.5233518734930795e+00\n3.8521427715416967e-01\n-2.4403409131924771e+01\n5.0130225796564565e+00\n-2.2210751785959987e-01\n-2.1978287006264601e+01\n2.1006858076641999e+00\n-1.0340441628276926e+00\n-2.0503715076413734e+01\n2.3025931260116446e+00\n-9.3633150232772677e-01\n-2.0529466147240512e+01\n2.7503492229262614e+00\n-8.2595222888508901e-01\n-2.0519520261507783e+01\n4.9819315256509338e+00\n-2.7481774037331197e-01\n-2.2040168423040761e+01\n2.7878755363060495e+00\n-8.3534144324783266e-01\n-2.0486418134655001e+01\n2.3345619136835576e+00\n-1.0038986015854583e+00\n-2.0527026690986673e+01\n2.1448732913126536e+00\n-1.0654751801460347e+00\n-2.0524232246000096e+01\n3.4192441037295045e+00\n-6.8288477928016023e-01\n-2.0663885037643119e+01\n2.7178635367241686e+00\n-9.2852145810026987e-01\n-2.0539466291778481e+01\n7.4513633272258808e+00\n2.5339987720603441e-01\n-2.4161828724920607e+01\n1.3744937218013208e+01\n1.5032194717754708e+00\n-3.2726690185009801e+01\n1.3150672516462988e+01\n1.2594190635742768e+00\n-3.2808977956589821e+01\n5.2495789904450225e+00\n-3.2204782728209941e-01\n-2.2090204711498213e+01\n1.3384739078361090e+01\n1.2619661231511501e+00\n-3.3378299513420714e+01\n1.4115479303247897e+01\n1.5001179289522732e+00\n-3.3291731761854194e+01\n1.3491548659364765e+00\n-1.4228684008287344e+00\n-2.0494058682873483e+01\n1.4185296800626048e+01\n1.4974369836283674e+00\n-3.3190952507690064e+01\n-2.6560919865179189e-01\n-1.9047309274938489e+00\n-2.0862552227712563e+01\n4.3728932015855140e+00\n-5.6724250228011108e-01\n-2.1403239491024948e+01\n-9.4730300490812258e+00\n-5.2945348697584649e+00\n-2.4433745146903803e+01\n2.7221043689048479e+00\n-1.0950950051647899e+00\n-2.0635696607413252e+01\n1.3997141601860343e+00\n-1.5743124345855346e+00\n-2.0341883387301870e+01\n4.8390438333391721e+00\n-6.3336342794949585e-01\n-2.1682575344740918e+01\n-1.0175882201368913e+00\n-2.3853355172224417e+00\n-2.0302317114381719e+01\n4.1298116167327703e-01\n-1.9426856600803950e+00\n-2.0381195804912334e+01\n4.0720169896234154e-01\n-1.9412794179884145e+00\n-2.0406131969353073e+01\n1.3591382690886933e+01\n1.2059035976796140e+00\n-3.0705502119482428e+01\n4.0882650968083993e+00\n-8.5503408758856392e-01\n-2.1341038156866670e+01\n6.4442371017161886e+00\n-3.1514595741213286e-01\n-2.3249215038932405e+01\n-1.0633372524103919e+00\n-2.4396735168692261e+00\n-2.0379930885718608e+01\n5.1575181409497519e+00\n-6.1535885241237531e-01\n-2.1632940274673643e+01\n1.3607914031461080e+01\n1.1082675903523993e+00\n-3.0703607952167030e+01\n-1.4676385709670050e+00\n-2.6871618496482479e+00\n-2.1178827364386102e+01\n3.4587655563737414e+00\n-1.1166775917700562e+00\n-2.0848753461729014e+01\n2.0182397729643240e+00\n-1.5249299791523310e+00\n-2.0342451642782031e+01\n3.0483376666855757e+00\n-1.2646388825377608e+00\n-2.0762818674509973e+01\n1.6751943849219408e+00\n-1.7131912216991518e+00\n-2.0141767568991590e+01\n3.0645083409963356e+00\n-1.3360190427234024e+00\n-2.0636670093184208e+01\n1.3800999959917402e+01\n1.0228476463935423e+00\n-2.9918418476952994e+01\n1.3764468148080351e+01\n9.4377981369550212e-01\n-3.0678447661666866e+01\n1.4414774160093311e+00\n-1.7831483897903870e+00\n-2.0838526224133329e+01\n2.4637333182823240e+00\n-1.5456098696108371e+00\n-2.0378140133538395e+01\n4.1926492513130569e+00\n-1.0904700766744995e+00\n-2.1131735721082684e+01\n8.4424440714159443e-01\n-2.0909500432728501e+00\n-2.0294161877128815e+01\n3.2466295056481576e+00\n-1.3693694965426695e+00\n-2.0577541690915126e+01\n1.3835754822767852e+01\n7.1117247524373306e-01\n-3.1904347336739242e+01\n2.4831687878107127e+00\n-1.5991319506665835e+00\n-2.0322291512349071e+01\n4.5888358816126482e+00\n-1.0305543135846305e+00\n-2.1200735061282952e+01\n2.1329905769866868e+00\n-1.7313638015066779e+00\n-2.0159542122525252e+01\n3.6890568457303003e+00\n-1.3171942499520741e+00\n-2.0643888439958200e+01\n-4.5798056093281209e-01\n-2.5637845356694524e+00\n-2.0449017620981614e+01\n5.0875768812884814e-01\n-2.3336277154088974e+00\n-2.0425664633358366e+01\n6.2718460515040109e+00\n-7.8674721300663941e-01\n-2.2631596114877887e+01\n2.0774546090163972e+00\n-1.8704957048790061e+00\n-2.0181477452715168e+01\n2.0774546090163972e+00\n-1.8704957048790061e+00\n-2.0181477452715168e+01\n1.5992216050093429e+00\n-2.0760244942897841e+00\n-2.0288047054223032e+01\n1.3864503053991676e+01\n4.4601018596058334e-01\n-3.1713512265574437e+01\n1.3864503053991676e+01\n4.4601018596058334e-01\n-3.1713512265574437e+01\n1.3638036035144673e+01\n2.1052016632215481e-01\n-3.2203346330183066e+01\n5.1617321458155718e+00\n-1.1641302216524450e+00\n-2.1600931853402795e+01\n-6.3825411419437428e+00\n-5.3126005731331549e+00\n-2.4556489394464069e+01\n7.9108201339419415e-01\n-2.4417368601295255e+00\n-2.0252817317516083e+01\n1.3887560070448844e+01\n3.9432337263572692e-01\n-3.0111324411800194e+01\n1.4141232443948981e+01\n5.2684170268768404e-01\n-2.9739589457442882e+01\n6.2218713000236789e+00\n-1.0521036984583925e+00\n-2.2309509635227354e+01\n1.3721106313823256e+01\n6.0715589051658081e-02\n-3.1760099304076256e+01\n1.4002974858415312e+01\n4.7557987603595275e-01\n-2.9545910378261095e+01\n1.4182308346048700e+01\n4.6114719140204458e-01\n-2.9711604558694066e+01\n1.4118728297309925e+01\n4.6743571202966377e-01\n-2.9636135924000918e+01\n2.0760846257309034e+00\n-2.1556315091417759e+00\n-2.0321403299789253e+01\n1.7051267992414956e+00\n-2.3068266364518375e+00\n-2.0443063695000465e+01\n1.7051267992414956e+00\n-2.3068266364518375e+00\n-2.0443063695000465e+01\n-8.5021359720768008e-01\n-3.2168017657525931e+00\n-2.1083069765591798e+01\n5.1024378280173821e-01\n-2.6455972809835551e+00\n-1.9951533354617414e+01\n5.1024378280173821e-01\n-2.6455972809835551e+00\n-1.9951533354617414e+01\n1.4215976178462130e+01\n-1.2713046222009383e-01\n-3.3665425271570435e+01\n1.4034636489508641e+01\n2.8703616336617355e-01\n-2.9803993406557094e+01\n-7.7000015356804798e+00\n-5.8090379835347878e+00\n-2.3070897630118342e+01\n1.4265412438749784e+01\n2.9308120363668339e-01\n-2.9320546781997098e+01\n1.4262128409285152e+01\n2.9194279614239316e-01\n-2.9305437790655358e+01\n3.8891937806645482e+00\n-1.7891514074173531e+00\n-2.0743064406332653e+01\n3.8891937806645482e+00\n-1.7891514074173531e+00\n-2.0743064406332653e+01\n1.4054650065867108e+01\n9.9201116281460833e-02\n-3.0191628000774145e+01\n1.4936185491398934e+00\n-2.5132108314852291e+00\n-2.0247445048584392e+01\n3.4203757405709205e+00\n-1.9242965217209309e+00\n-2.0490909651847893e+01\n5.8773002657877100e+00\n-1.3256493484762548e+00\n-2.1855996863543940e+01\n1.4897161223173187e+01\n1.0058143953657572e-01\n-3.2051955289877661e+01\n1.4307345753189592e+01\n1.7710913694891611e-01\n-2.9400252795944986e+01\n4.0295470260155417e+00\n-1.8108552471628581e+00\n-2.0780989295930713e+01\n1.3870251124272185e+01\n-2.8516764555008545e-01\n-3.1743045569841733e+01\n1.3227840152538934e+00\n-2.6140167169208599e+00\n-2.0004974614755767e+01\n1.0703919817662257e+00\n-2.7541366890979644e+00\n-1.9869018297472724e+01\n5.3399205205127842e+00\n-1.6146409764668999e+00\n-2.1469898189967836e+01\n1.4335476649888882e+01\n1.2011144652179844e-02\n-2.9378768823508821e+01\n1.4575994536419110e+01\n1.0454200544081167e-01\n-2.9958286647666004e+01\n1.4134289025360887e+01\n-1.5278983233094115e-01\n-2.9817559079668211e+01\n1.4134289025360887e+01\n-1.5278983233094115e-01\n-2.9817559079668211e+01\n-3.0353823393931922e-01\n-3.5144510075397881e+00\n-2.1067418969677970e+01\n1.0314887250194542e+00\n-2.8794432406152199e+00\n-1.9674876104131581e+01\n-6.5163650124685253e+00\n-6.1803081781941414e+00\n-2.4188012730701132e+01\n9.6473290740375017e-01\n-2.9465600657168789e+00\n-1.9520827608791638e+01\n3.4957137478897278e+00\n-2.2699563222128014e+00\n-2.0420472436831776e+01\n-9.5639199501124459e+00\n-6.6128622271940314e+00\n-2.0128139199318365e+01\n2.4424353476236087e+00\n-2.6094993820323755e+00\n-2.0101727735915730e+01\n2.9370605578332167e+00\n-2.4688400731059046e+00\n-2.0175938988847243e+01\n3.0923337465457470e+00\n-2.4620210366284301e+00\n-2.0323160484310577e+01\n6.0831651755162417e+00\n-1.7261303917261541e+00\n-2.1619110053711591e+01\n1.4117488226783070e+01\n-7.0560671136891007e-01\n-3.1076778879060484e+01\n1.4102914677504307e+01\n-7.0402811229754225e-01\n-3.1025002644963266e+01\n1.4231503328077570e+01\n-7.4854722275785612e-01\n-3.1346924074530957e+01\n-5.8681861564836435e+00\n-6.2034619699593572e+00\n-2.4149788773863094e+01\n3.7483178172514195e+00\n-2.4155661862457527e+00\n-2.0391948687149917e+01\n3.7483178172514195e+00\n-2.4155661862457527e+00\n-2.0391948687149917e+01\n4.4192911126577634e+00\n-2.2310926401280620e+00\n-2.0636171962969918e+01\n4.3545193855125675e+00\n-2.2891151367466001e+00\n-2.0518967387799801e+01\n4.3545193855125675e+00\n-2.2891151367466001e+00\n-2.0518967387799801e+01\n3.6222926910105877e+00\n-2.4891630842827066e+00\n-2.0286769558693518e+01\n1.8790594807632859e+00\n-3.0137007331166257e+00\n-1.9848254368751292e+01\n4.3948093549219056e+00\n-2.3429819621252861e+00\n-2.0568513351595428e+01\n3.9691603700956208e+00\n-2.4331048887589262e+00\n-2.0242562965264504e+01\n1.5916424262439590e+00\n-3.1656116856401821e+00\n-1.9922083712940637e+01\n3.8671150196869553e+00\n-2.5105154026638190e+00\n-2.0222964044272626e+01\n5.1584568097537842e+00\n-2.1929374867727542e+00\n-2.0736356879079739e+01\n1.4484990881241593e+01\n-9.4746203099041293e-01\n-3.0859154402296582e+01\n-1.2658466341646513e+01\n-8.4713436057165268e+00\n-2.1719265084852239e+01\n-4.3430645583187086e+00\n-5.9765869129411806e+00\n-2.4075173950423469e+01\n-2.0247511519530534e+00\n-5.0558044254464169e+00\n-2.2684099301934065e+01\n6.0975529178452170e+00\n-2.2604012203695865e+00\n-2.2180059704470587e+01\n-5.4903108511235237e+00\n-6.5197953924486649e+00\n-2.3692770836647895e+01\n-2.6687670132993926e+00\n-5.3314871464185103e+00\n-2.3424373037002557e+01\n2.4690370117883247e+00\n-3.0911813607084264e+00\n-1.9767515199501631e+01\n1.5042653665741886e+01\n-1.3632481415485929e+00\n-3.2295696189480324e+01\n1.4530774055691586e+01\n-1.2233109387471122e+00\n-2.9870689699644416e+01\n-5.4379779726387856e+00\n-6.6590337159620558e+00\n-2.3506164848024397e+01\n6.1837696745237372e+00\n-2.5641444788334691e+00\n-2.2604509643194167e+01\n4.0846781434652017e+00\n-2.8359153908192658e+00\n-2.0379392990479719e+01\n1.4648163042523235e+01\n-1.4355010416958029e+00\n-3.0098386260751774e+01\n1.4546448406783295e+01\n-1.4407034881596072e+00\n-2.9833796045964725e+01\n2.7240485333006181e+00\n-3.4359889749946797e+00\n-2.1007076335018244e+01\n4.6278095761591880e+00\n-2.9063851589828769e+00\n-2.0869015612508683e+01\n-5.5249588212462486e+00\n-6.6644454603251075e+00\n-2.2537533360583563e+01\n-6.0138271558093557e+00\n-6.8195473974137197e+00\n-2.2187322608570156e+01\n4.6525760679672832e+00\n-2.9507177664782267e+00\n-2.0901491170216456e+01\n1.4681364236801812e+01\n-1.7160651945183052e+00\n-2.9798191311480487e+01\n1.4838850198390709e+01\n-1.6993624738489348e+00\n-3.0111840529876563e+01\n-5.9889960724032667e+00\n-7.2049175272660673e+00\n-2.2691712502772599e+01\n3.4320604017179503e+00\n-3.5360843813132097e+00\n-2.0758166766466399e+01\n1.4803026849565009e+01\n-1.7529554713135658e+00\n-2.9729953325887195e+01\n1.4823777094520960e+01\n-1.9150902813612452e+00\n-2.9487431652163682e+01\n4.3859000593797237e+00\n-3.4459914346365932e+00\n-2.1288675093877934e+01\n3.9529488840473110e+00\n-3.6004084488505415e+00\n-2.1102870990352233e+01\n2.9479818661827744e+00\n-3.9272646115848873e+00\n-2.0827081971364425e+01\n2.5006841751712980e+00\n-4.2004677401503852e+00\n-2.1109813666339676e+01\n1.6759684309566860e+00\n-4.5217947278674444e+00\n-2.1326078349947210e+01\n4.6190569486216067e+00\n-3.6029730607105943e+00\n-2.1629191888071926e+01\n3.8841828721498990e+00\n-3.9338071030730455e+00\n-2.1425077537573653e+01\n3.8746305233247185e+00\n-3.9217175639009767e+00\n-2.1341597380165574e+01\n3.8514571209807165e+00\n-3.9713404938342043e+00\n-2.1441942390886844e+01\n1.1483865799772097e+00\n-5.1026546083207620e+00\n-2.1984447513939358e+01\n1.3906801738439233e+01\n-2.7939410778474962e+00\n-3.0293186433745262e+01\n1.2973167889484916e+01\n-2.8281436544840743e+00\n-2.9022386978641624e+01\n-7.8866677648405279e+00\n-8.2003791017813512e+00\n-2.1161550374982095e+01\n1.2592402386896566e+01\n-3.0657910217523199e+00\n-2.9360979415758376e+01\n3.7972000033782591e+00\n-4.5364062986197942e+00\n-2.1977851507630003e+01\n1.3313892966624042e+01\n-3.1227529925659296e+00\n-2.8176733449812225e+01\n4.7515383107168869e+00\n-4.7041806739992049e+00\n-2.2714939287812573e+01\n-1.1795847039966448e+01\n-1.0035084671309876e+01\n-1.9713183057254746e+01\n3.2212713895087388e+00\n-5.1614466341819236e+00\n-2.1791046134946868e+01\n-2.6179664610186015e+00\n-7.6244532463365342e+00\n-2.2149582140392280e+01\n8.2785525530924335e+00\n-4.8868999954721524e+00\n-2.5318545657678730e+01\n1.2845011222637844e+01\n-4.0624199448919676e+00\n-2.7014273454177566e+01\n1.2761783948159380e+01\n-4.0774821080232506e+00\n-2.6908268643275782e+01\n1.2761783948159380e+01\n-4.0774821080232506e+00\n-2.6908268643275782e+01\n1.2733908113436199e+01\n-4.4701645006892132e+00\n-2.7612936656931694e+01\n-1.8783448535727645e+00\n-7.7564425816553610e+00\n-2.1399365499905588e+01\n2.6955274837900460e+00\n-6.6143209705493051e+00\n-2.2133922676401223e+01\n7.3020938195601504e-01\n-7.3432107581283175e+00\n-2.1685360595710936e+01\n7.5653734204051233e+00\n-5.8466721249240283e+00\n-2.4041778438503719e+01\n-4.2603563817258392e+00\n-8.8821658036671494e+00\n-2.0333504671378087e+01\n9.4821790375465618e+00\n-5.5082943718046709e+00\n-2.4794188672771213e+01\n-8.9908972798170534e+00\n-1.0310441161786786e+01\n-1.8834738553895949e+01\n-3.9422377096865948e+00\n-8.6262858836224972e+00\n-1.9652031470005312e+01\n-3.9422377096865948e+00\n-8.6262858836224972e+00\n-1.9652031470005312e+01\n8.3633964608109390e-01\n-7.5920942954956674e+00\n-2.1676498462547951e+01\n1.2287624343349501e+01\n-4.9631999493887298e+00\n-2.5639586001493981e+01\n1.1782244928404149e+01\n-5.3235632785184013e+00\n-2.6193951870989487e+01\n1.0620978961431486e+00\n-7.5828322156184509e+00\n-2.1687364501482090e+01\n9.0540149515712365e+00\n-5.9462488858061402e+00\n-2.4534298154753209e+01\n-1.8073374963655420e+00\n-8.3772731537024789e+00\n-2.0370777449928926e+01\n-1.0116375348843507e+01\n-1.0954571037042713e+01\n-1.8311508268307442e+01\n1.1547769595354426e+01\n-5.5610701268344407e+00\n-2.5813864198620045e+01\n3.6528069407536297e+00\n-7.0424644330358515e+00\n-2.1832649936554965e+01\n2.1701327895865328e+00\n-7.9231984098748995e+00\n-2.1599342490848493e+01\n9.5165315865195288e-01\n-8.1642923189830139e+00\n-2.1038703566445644e+01\n-2.7166928619406669e+00\n-9.1567108360953675e+00\n-1.9982055694742680e+01\n2.6329768843159949e+00\n-8.1072526718274851e+00\n-2.1354729703854186e+01\n2.1892463069962331e+00\n-8.3316758030777596e+00\n-2.1297909958062601e+01\n1.2484628902518988e+01\n-6.0243658131970639e+00\n-2.4830563496090647e+01\n1.1812092278088134e+01\n-6.2277711154357034e+00\n-2.4460680440479393e+01\n1.0781501934340254e+01\n-6.4375681072075617e+00\n-2.3811027072599455e+01\n3.5540247275072936e+00\n-8.1636988238637205e+00\n-2.1305353541055620e+01\n1.4462216690253835e+00\n-8.7631137283544192e+00\n-2.0302484079180566e+01\n6.0711434411910377e+00\n2.3481360863599622e+01\n-4.8511387912710710e+01\n2.5484773825281066e+00\n2.1922482484166284e+01\n-4.7061337425320936e+01\n-1.0644309547951030e+01\n1.5171480383415371e+01\n-3.9260984067972743e+01\n5.8223964790808491e+00\n2.2967989840085906e+01\n-4.7845325960066432e+01\n7.6700112352529262e+00\n2.3643268462561046e+01\n-4.8669089420319985e+01\n7.7479083078711701e+00\n2.4004230086176332e+01\n-4.9546684252598503e+01\n1.5352674767149294e+01\n2.8665598627689555e+01\n-5.6492397907506806e+01\n1.3820785102046417e+01\n2.6453135951465555e+01\n-5.2362355856686911e+01\n7.6411535445362420e+00\n2.4116103287943965e+01\n-5.0481610723260616e+01\n1.4329566620996745e+01\n2.6873814673030026e+01\n-5.3206652620860254e+01\n6.8634553001999183e+00\n2.3556675154774720e+01\n-4.9627063044526857e+01\n6.6439243074180636e+00\n2.3019593417096914e+01\n-4.8371852041100880e+01\n1.4246790993387934e+01\n2.7864107852978776e+01\n-5.5755532610474013e+01\n-1.5828635661623149e+01\n1.3372265288733143e+01\n-3.8152802781532486e+01\n-1.2692378705516150e+01\n1.4431443842831577e+01\n-3.9112708603802538e+01\n9.7248426452387848e-01\n2.0317763271090257e+01\n-4.5498437757694845e+01\n9.9120938863206420e-01\n2.0357289942535761e+01\n-4.5592473183649709e+01\n5.7731411199956524e+00\n2.2857944086691564e+01\n-4.8885119895414441e+01\n5.7731411199956524e+00\n2.2857944086691564e+01\n-4.8885119895414441e+01\n-1.2864219389948364e+01\n1.4073520917788979e+01\n-3.8797676395589356e+01\n9.9585460810632096e+00\n2.4425264000666790e+01\n-5.0494480402818944e+01\n1.5954496216810218e+01\n2.8689319832489211e+01\n-5.7467518029418414e+01\n9.6033390242611516e-01\n1.9975132542855484e+01\n-4.6292356354751078e+01\n-8.9390667947806790e+00\n1.5230875769718137e+01\n-4.1222475307349562e+01\n2.4398876178140396e+00\n2.0365179408856509e+01\n-4.7003934335333803e+01\n-1.6804055161324683e+01\n1.2068521991038496e+01\n-3.7801212451374589e+01\n2.8420798586079721e-01\n1.9353166220391330e+01\n-4.6662769495969478e+01\n-1.5842663859360240e+01\n1.2735766517733239e+01\n-3.9982632553186804e+01\n-1.5540937095951834e+01\n1.2374895147350889e+01\n-3.9225649172008964e+01\n1.3414363495026960e+01\n2.5197629757975420e+01\n-5.3158840989907077e+01\n5.5492896030011485e+00\n2.1658358622565665e+01\n-4.9393281789600600e+01\n1.7039099707261258e+01\n2.6990835702703265e+01\n-5.5803568864177137e+01\n-2.7530733740761093e+00\n1.7813159329450066e+01\n-4.5592892300460264e+01\n-1.2083929405936658e+01\n1.3651826327444901e+01\n-4.1236415844186325e+01\n1.6597421471236885e+01\n2.6138298764372774e+01\n-5.4802115194254199e+01\n-6.6323488185135093e-01\n1.8427179508865045e+01\n-4.6578511999728960e+01\n1.2665876725246656e+01\n2.5442546706736763e+01\n-5.6287332532404797e+01\n8.6906242025994036e+00\n2.2566476562451928e+01\n-5.1386130937327543e+01\n-5.4346246093244517e+00\n1.6083765317125213e+01\n-4.4134510773285271e+01\n1.1499829496128756e+01\n2.3705481624777679e+01\n-5.2674421379965324e+01\n1.9745402752875588e+01\n2.9547477398751255e+01\n-6.2899666024090074e+01\n-9.9722973730682281e+00\n1.4046411568260861e+01\n-4.1959583206401994e+01\n1.8898378876769424e+01\n2.8912787574453020e+01\n-6.2800615510548518e+01\n-9.9789648486001283e+00\n1.3941443208568806e+01\n-4.2420185401632047e+01\n1.6767295610063002e+00\n1.9233637832509221e+01\n-4.8536224685587264e+01\n-3.3327129415094805e+00\n1.6541518026179567e+01\n-4.5980718554973564e+01\n-7.9582866249081592e+00\n1.3803509730265647e+01\n-4.2025650630200758e+01\n-8.2394871270846330e+00\n1.4485301042390944e+01\n-4.3975472573217374e+01\n-1.0708311857387440e+00\n1.7631877025132766e+01\n-4.8187582864421898e+01\n-7.8581831395226658e+00\n1.3724676158981575e+01\n-4.3413133080917092e+01\n-1.6047127347749885e+01\n1.1143621966656374e+01\n-4.1103600179451341e+01\n-9.7482990727799912e+00\n1.3184902073358476e+01\n-4.3561741434342785e+01\n-1.4419410956742890e+01\n9.9708781656621586e+00\n-3.7502820345000345e+01\n6.3123260862394490e+00\n2.0337815942486657e+01\n-5.3960837550854869e+01\n-1.2245988253891975e+01\n1.1694318016815485e+01\n-4.2931256339928261e+01\n-1.2179513528384415e+01\n1.1549080716888069e+01\n-4.2647672918131519e+01\n9.3465063339723127e+00\n2.1622405548490072e+01\n-5.6717966528322961e+01\n-1.2693194886342173e+01\n1.1373279573375754e+01\n-4.2897486212088083e+01\n1.4544553706261201e+01\n2.3225502431930767e+01\n-5.6847116986667743e+01\n-1.2605377229058391e+01\n1.0320945884104614e+01\n-3.9677456476672127e+01\n-9.4690948358609059e+00\n1.2252190367538754e+01\n-4.3730621076084965e+01\n1.4740128507378532e+01\n2.2967412257655077e+01\n-5.7034216904871293e+01\n1.4740128507378532e+01\n2.2967412257655077e+01\n-5.7034216904871293e+01\n-1.1328449966982676e+01\n1.1253058303152859e+01\n-4.2687561292824164e+01\n-4.2058840494350251e+00\n1.4636328057921002e+01\n-4.7720445200568953e+01\n-4.1781788921149854e+00\n1.4549037092158903e+01\n-4.7685955914347105e+01\n-9.5199310368274332e+00\n1.2414367519784387e+01\n-4.5009859550306082e+01\n-3.6733352613911377e-02\n1.6514435949103127e+01\n-5.0120661456524473e+01\n3.6992466538773994e+00\n1.7936335149346348e+01\n-5.2293749710368878e+01\n7.7346250808325436e+00\n2.0658302869740261e+01\n-5.7310434178801465e+01\n9.1184797007026788e+00\n2.0311009453040519e+01\n-5.5545644765478841e+01\n-9.4673612556958240e+00\n1.2334036054215444e+01\n-4.5572193743159161e+01\n-5.9625653290305483e+00\n1.3757728798842960e+01\n-4.7488347606979481e+01\n-3.7123340566319230e+00\n1.4636544954135561e+01\n-4.8502361195523086e+01\n-1.5026151208200828e+01\n8.0819021410112821e+00\n-3.6950034287689334e+01\n-3.6241599795962904e+00\n1.4545479098998419e+01\n-4.8377784425174198e+01\n-1.5019631861438429e+00\n1.5469353326435279e+01\n-4.9804868006980094e+01\n-1.7421928071139131e+01\n9.1469902884457586e+00\n-4.2176845974436723e+01\n-6.0640493267542217e-01\n1.6032805067260799e+01\n-5.0841266190080241e+01\n7.2272147914007485e+00\n1.9427933876002523e+01\n-5.4801387540626195e+01\n-3.6212719205880464e+00\n1.4476055794786358e+01\n-4.8954830653890355e+01\n-1.2394857024230259e+01\n1.0740200940060459e+01\n-4.3846927750254146e+01\n-3.9715052255859842e+00\n1.4432198365880460e+01\n-4.9111155047268753e+01\n-3.9461350920853837e+00\n1.4347449010743583e+01\n-4.8766839076590294e+01\n-6.6321593520909365e+00\n1.2826254279444349e+01\n-4.6794885388310448e+01\n9.7282842112547048e+00\n1.9955559546665221e+01\n-5.5657603184115459e+01\n9.6902120549531539e+00\n1.9931589376653577e+01\n-5.5520673261716126e+01\n5.0176426115636854e+00\n1.8165492587260811e+01\n-5.3997109946683558e+01\n1.0110772403910183e+01\n1.9983217119373347e+01\n-5.6022679715670364e+01\n1.0134465285053817e+01\n2.0050756411503503e+01\n-5.6181753721804178e+01\n1.6339329164822281e+01\n2.3274141956402854e+01\n-6.1947018719480646e+01\n9.0832298865557508e+00\n1.9334462366246743e+01\n-5.5723193081385759e+01\n1.1181082891397672e+01\n2.0986027532239891e+01\n-5.9150102464755747e+01\n1.1175320483969390e+01\n1.9758001848152240e+01\n-5.6353752205501017e+01\n1.3020391758169170e+01\n2.2079593948530714e+01\n-6.2588343690801885e+01\n5.0226018832635893e+00\n1.7513133756752485e+01\n-5.4203210042944768e+01\n5.1488451898554626e+00\n1.7424400170492593e+01\n-5.4098209851976470e+01\n5.8229757676004761e+00\n1.7624337821672118e+01\n-5.4507160917374286e+01\n6.2270389783486140e+00\n1.7757984845451592e+01\n-5.4889642175460764e+01\n1.0646598736482758e+01\n1.9682750422573005e+01\n-5.7697692502567016e+01\n1.0872763812680095e+01\n1.9573338778064613e+01\n-5.7142553409758960e+01\n1.0681897731768872e+01\n1.9624556856428452e+01\n-5.7881030121615154e+01\n6.6580374876659993e+00\n1.8510092566877876e+01\n-5.7905935051779146e+01\n1.2425261009667439e+01\n2.1344696137050562e+01\n-6.2408697400077791e+01\n1.0812104719431041e+01\n1.9477853010377700e+01\n-5.7580394438080148e+01\n-3.2758009905234835e+00\n1.3254941981891490e+01\n-5.0225083029914252e+01\n-1.2757849918071090e+01\n8.4551550292543318e+00\n-4.2497455534036725e+01\n-4.7128321289853163e+00\n1.1840961870648361e+01\n-4.8882130621531267e+01\n-4.7128321289853163e+00\n1.1840961870648361e+01\n-4.8882130621531267e+01\n-1.2798505450289790e+01\n8.2575964043730785e+00\n-4.3207097061132082e+01\n-1.9136039423118273e+01\n5.8638595145745338e+00\n-4.1161937535650971e+01\n3.5843109030690030e+00\n1.4748032988775073e+01\n-5.2540705824839414e+01\n-1.3126267101023686e+01\n6.9269337739499184e+00\n-4.0258298742882261e+01\n4.9226027752964114e+00\n1.5094553260873859e+01\n-5.3941007524952070e+01\n4.9456743994433090e+00\n1.5187199291969543e+01\n-5.4222922375034862e+01\n5.4271591010784821e+00\n1.3883777105705041e+01\n-5.1077651263863260e+01\n6.4656744438876412e+00\n1.3809124361224344e+01\n-5.1719843028783757e+01\n6.4656744438876412e+00\n1.3809124361224344e+01\n-5.1719843028783757e+01\n5.9487674473322940e+00\n1.3588723313236168e+01\n-5.0994887639662949e+01\n4.1334274357104182e+00\n1.2929287190856886e+01\n-5.0675437669169334e+01\n4.0045917657964631e+00\n1.3050602952319096e+01\n-5.0909958525243539e+01\n6.5021417321583579e+00\n1.3797348411091239e+01\n-5.1331848536338448e+01\n4.1841424085572498e+00\n1.2877612497958822e+01\n-5.0238336286452274e+01\n4.6721348007612375e+00\n1.2898662190906801e+01\n-4.9737462075342329e+01\n-9.3729410444525225e+00\n6.9209903238586303e+00\n-4.1388174386312365e+01\n3.4488002948262242e+00\n1.2223916699885315e+01\n-4.9273853676083824e+01\n4.6570598261239144e+00\n1.2580599664908796e+01\n-4.9059696849185769e+01\n-6.2066702271311662e+00\n8.2562244360301502e+00\n-4.3705976304554170e+01\n1.3183870729738942e+01\n1.1751875189352699e+01\n-3.6549525790883763e+01\n-1.2646425505661687e+01\n5.2250215309353338e+00\n-3.9796157710979735e+01\n6.1571722541791791e+00\n1.2301874509164952e+01\n-4.9184526419668195e+01\n-1.2576317817005458e+01\n5.1656906531925424e+00\n-3.9300400258798007e+01\n3.8976299724679002e+00\n1.2226915214181100e+01\n-5.1921915394455986e+01\n5.5043824215937631e+00\n1.2188002472426755e+01\n-5.0682725456901110e+01\n-1.4839687366886336e+01\n3.1026822763038870e+00\n-3.3686266350659935e+01\n6.3140504091112728e+00\n1.2001431056515791e+01\n-4.8804714413455848e+01\n4.0304096522822315e+00\n1.1199695288913816e+01\n-4.8237129236200147e+01\n3.9580227026190813e+00\n1.1251495742075633e+01\n-4.8376616081125370e+01\n4.6464390980015891e+00\n1.1169975096415456e+01\n-4.7747885258036590e+01\n4.3641945359944776e+00\n1.0979740246076441e+01\n-4.7460212887441905e+01\n3.4963466696048875e+00\n1.0591645111248566e+01\n-4.7107335488164708e+01\n3.9440479346104662e+00\n1.0544268097777907e+01\n-4.7033045123677347e+01\n3.9007372099274589e+00\n9.9006039693331669e+00\n-4.6052282451326526e+01\n-1.9641776973705362e+01\n1.3552445574496534e+00\n-3.4412443508608469e+01\n2.3644259399132594e+00\n9.2136585576492305e+00\n-4.4747001498983977e+01\n4.4534947039280448e+00\n9.4241092006957565e+00\n-4.5542567966024087e+01\n9.2919414850726891e+00\n1.0901633187957300e+01\n-4.7249875208001086e+01\n3.8459632780851774e+00\n9.1574420921386643e+00\n-4.5064866115687025e+01\n4.3212378004888619e+00\n9.2034534234887158e+00\n-4.4954872794634895e+01\n4.3595870981799294e+00\n8.7188963874537464e+00\n-4.4475151360902792e+01\n-6.2378380931683335e+00\n4.9092343067712791e+00\n-3.9733502411058055e+01\n9.1674225665263442e+00\n9.7741818660196600e+00\n-4.5631778010475472e+01\n1.0152801472126674e+01\n9.9908257254232211e+00\n-4.5824255548624919e+01\n8.0949584808051966e+00\n9.0909825958262136e+00\n-4.4014187695685713e+01\n1.4103594332634380e+01\n9.3236758742950485e+00\n-3.5670531293104638e+01\n-1.1618870333714113e+01\n1.9301618385017789e+00\n-3.4840509834641253e+01\n7.8261303619487244e-01\n3.6411094850331369e+00\n-2.3088363923092611e+01\n-3.1893869032228488e+00\n3.1153422824338661e+00\n-2.7744017797052681e+01\n7.4809538642868767e-01\n3.7296350602001316e+00\n-2.3935565728241169e+01\n8.2212825148716675e+00\n8.1709228301380499e+00\n-4.3726391584732312e+01\n-6.7309183112381410e+00\n2.5280996835242924e+00\n-3.5847546687055051e+01\n-3.1159561449519444e+00\n2.4873014051954314e+00\n-2.6595254526838737e+01\n-6.3535827311219304e+00\n2.6583777601578875e+00\n-3.5981616416097623e+01\n-9.9059940920229228e-01\n2.5307213016107397e+00\n-2.2457786089732640e+01\n-3.5142234015448492e+00\n2.2323246909594285e+00\n-2.6571163235695014e+01\n2.9409941070875369e+00\n3.6565350085858430e+00\n-2.3856112699708181e+01\n-8.4598650665938635e+00\n1.4898227009105354e+00\n-3.4396537704616385e+01\n7.4961983389419435e+00\n6.7021613168513214e+00\n-4.1858379912507253e+01\n3.8290594280062500e+00\n3.6556615890608497e+00\n-2.3621203260981755e+01\n7.5200198549767139e+00\n6.5474454276556013e+00\n-4.1673024840800764e+01\n1.0307948256636957e+01\n6.9520697785745709e+00\n-4.3141342532068158e+01\n1.3161452526350045e+01\n6.8789417939841186e+00\n-3.3084001785272179e+01\n1.2252755710427239e+01\n6.3786285089042067e+00\n-3.0229360120441768e+01\n3.8868537739646798e+00\n3.1221962977804147e+00\n-2.2655351201231884e+01\n-6.9404463428273635e+00\n7.5741949913826045e-01\n-3.3336570335390043e+01\n-4.6119513175789867e-01\n1.6920254173145701e+00\n-2.1454226729462544e+01\n-4.6119513175789867e-01\n1.6920254173145701e+00\n-2.1454226729462544e+01\n1.0271617674140417e+01\n6.3765874717258386e+00\n-4.2331563934179620e+01\n-1.6581883410193465e+00\n1.3310803257133026e+00\n-2.2611390139900060e+01\n9.5047840159533585e+00\n5.9251105262629586e+00\n-4.0842422650521058e+01\n-6.7120111548387440e+00\n6.1527768510959602e-01\n-3.3417862013518480e+01\n1.2512501454109325e+01\n5.9757348153171481e+00\n-3.0797616137628168e+01\n9.2017315235405039e+00\n5.7272197573208254e+00\n-4.0965819712088120e+01\n-2.2173808673555104e+00\n1.1423441835459380e+00\n-2.3748348194165153e+01\n9.7710510102726378e+00\n5.6990203040509302e+00\n-4.0706888177631491e+01\n-6.5159737396657613e+00\n3.3609836896527689e-01\n-3.2650827971330330e+01\n-3.7167248544256850e+00\n5.8448476882258815e-01\n-2.3955007243295878e+01\n1.1598879068994266e+01\n6.0957171618886532e+00\n-4.1002655807355310e+01\n3.4808189828851543e+00\n2.4724885092778250e+00\n-2.1629856062097669e+01\n1.2592321807886215e+01\n5.6388896526787606e+00\n-3.0147924379289154e+01\n1.1743619747383105e+01\n5.9510883131878369e+00\n-4.0790245706960128e+01\n1.1647931408551804e+01\n5.8446739513161061e+00\n-4.0663868826859456e+01\n1.2843178576299028e+00\n1.6236400945380947e+00\n-2.0609397364332445e+01\n1.2843178576299028e+00\n1.6236400945380947e+00\n-2.0609397364332445e+01\n-2.5520205158107485e+00\n6.3325665609278581e-01\n-2.3077149883892130e+01\n1.4095405698743289e+00\n1.8073391819421978e+00\n-2.0919116706275435e+01\n1.2322916497037559e+01\n5.5143770253809574e+00\n-2.9115396923832357e+01\n1.2229045175079724e+01\n5.3835592094704694e+00\n-3.1389959180438808e+01\n-2.9841749335282053e+00\n4.4192127822766752e-01\n-2.3798556588672767e+01\n1.3404897247509785e+01\n6.2254773048891652e+00\n-4.4571228960053830e+01\n3.4700562841043050e+00\n2.0056099519981410e+00\n-2.1369283205649428e+01\n6.1740045840661661e-01\n1.1128246592025153e+00\n-2.0582998194818835e+01\n-1.6594566582778918e+00\n4.5920225831464367e-01\n-2.2400503659599206e+01\n-1.0017690537852149e+00\n5.6647010446154122e-01\n-2.1685972757177634e+01\n2.3732806526687762e+00\n1.5119831792679659e+00\n-2.0554642728160488e+01\n3.3476201930430065e+00\n1.7860767995447866e+00\n-2.1006641276973163e+01\n1.3266396315853877e+00\n1.1587161994339501e+00\n-2.0467810981630208e+01\n1.5499176795561667e-01\n7.4398426247082050e-01\n-2.0778051731238175e+01\n1.2634325332856417e+01\n4.6128546478095931e+00\n-3.2062144251345913e+01\n3.5330196817218691e+00\n1.5212032440692564e+00\n-2.1157127087867789e+01\n-1.4989445081758546e+00\n9.2857208823296476e-03\n-2.2120353851977320e+01\n-9.1228681882281055e+00\n-2.2770598677123686e+00\n-2.8344741732857624e+01\n-8.0738011822976397e+00\n-2.1001809898244899e+00\n-2.9740020687671922e+01\n-3.1447930577312189e+00\n-6.0822685520111119e-01\n-2.2536153441416023e+01\n9.1917769440011857e-02\n3.0973087129303822e-01\n-2.1105080992538667e+01\n1.3173935294262936e+01\n4.3847049029460567e+00\n-3.3765547625598764e+01\n9.4887868751976934e-01\n4.7066833517087003e-01\n-2.0381735356741672e+01\n9.4887868751976934e-01\n4.7066833517087003e-01\n-2.0381735356741672e+01\n5.3260443772909545e+00\n1.8128653479862791e+00\n-2.3098187850692838e+01\n1.9047330771249416e+00\n5.9428840958100027e-01\n-2.0242580892800522e+01\n4.9780572595579367e+00\n1.4516279260409237e+00\n-2.2307080325396775e+01\n-1.2432073166984200e+01\n-3.8719034021424283e+00\n-2.4887034680667508e+01\n1.3669553350857366e+00\n1.4119376179365764e-01\n-2.0184849572819097e+01\n2.4482693769894870e+00\n4.2581508288249831e-01\n-2.0340203676305975e+01\n-2.9059908271070269e+00\n-1.3482624833951140e+00\n-2.1522061063296480e+01\n1.3069357793745098e+01\n3.2077962717103756e+00\n-3.0671701128754439e+01\n2.6770373091963768e+00\n2.3827419742327124e-01\n-2.0266413660603948e+01\n1.3618187987986957e+01\n2.8893816307498708e+00\n-3.3897018466024029e+01\n-5.5242353580068015e-01\n-1.0474610970908134e+00\n-2.0956896973307000e+01\n2.3633149895939796e+00\n-1.2270658224806158e-01\n-2.0322557521420269e+01\n-1.4439377169849474e+00\n-1.4164565125283739e+00\n-2.1352473331193671e+01\n4.3620180038787719e+00\n3.8171381524162318e-01\n-2.1296175854380195e+01\n1.3485270689800929e+01\n2.7719281635806006e+00\n-2.9372651670128807e+01\n-9.5076973696122131e-03\n-1.0331121070389533e+00\n-2.0971848453136261e+01\n8.2113772039604641e-02\n-1.0175257315874688e+00\n-2.0852553582952922e+01\n5.8539071857805354e+00\n5.8322010643719746e-01\n-2.3393395533188723e+01\n2.5067048251330228e+00\n-3.5366883252180903e-01\n-2.0300265520860830e+01\n2.7517297211232612e+00\n-2.3428506070229962e-01\n-2.1421665409907195e+01\n-1.8646145894000485e-01\n-1.2629566901171041e+00\n-2.0686597225118497e+01\n2.1010286287065285e+00\n-5.2403256675701870e-01\n-2.0356471937202436e+01\n2.2127723347032817e+00\n-4.9938021970118351e-01\n-2.0384088371153947e+01\n4.8570117966255308e+00\n2.1414564172557976e-01\n-2.1743500377679521e+01\n5.3232430047517791e+00\n2.2481087998300522e-01\n-2.2434225493260389e+01\n6.7507206182654900e-01\n-1.1605526494211642e+00\n-2.0643723467412190e+01\n-1.5724324770861891e+00\n-1.8870961227609897e+00\n-2.0983833717589988e+01\n-1.3522072037639943e+00\n-1.9237037912914530e+00\n-2.0890828962087216e+01\n1.1241757765745912e-01\n-1.5427958185346384e+00\n-2.0403723464601253e+01\n-5.8208456329708564e+00\n-3.9052969024633830e+00\n-2.6467276839259764e+01\n4.7092560723370678e+00\n-3.4282366056829977e-01\n-2.1602662275711591e+01\n5.3895503658693897e+00\n-2.0689868970409886e-01\n-2.2369252283596595e+01\n1.0436237088790691e-01\n-1.6963829913363808e+00\n-2.0462697866603040e+01\n5.8013709603320125e+00\n-1.1592143761229219e-01\n-2.2501961585171617e+01\n1.4300181854428963e+01\n1.7004628372881636e+00\n-3.2755575438910050e+01\n2.2533404562094712e+00\n-1.0964316794005076e+00\n-2.0539995043773580e+01\n1.3501280131107960e+01\n1.4650954489504593e+00\n-3.1280474727385855e+01\n1.5072708451311873e-01\n-1.8367524570072087e+00\n-2.0523000447183065e+01\n3.5572411009166593e+00\n-8.1218932437835434e-01\n-2.0842898266507575e+01\n2.9478421360665674e+00\n-1.0597790949401928e+00\n-2.0636064884922423e+01\n3.2922362791295874e+00\n-9.9779549676081869e-01\n-2.0763141997009747e+01\n3.2928508886100301e+00\n-9.9081964589272842e-01\n-2.0780441789578489e+01\n3.3732859206932062e+00\n-1.0039462014136555e+00\n-2.0859100653090387e+01\n1.4078718512124873e+01\n9.8118512746080178e-01\n-3.3612891882792852e+01\n-1.4349241526109923e+01\n-7.2557513731328669e+00\n-2.3486752411495051e+01\n1.4004216135974581e+00\n-1.8104507223074631e+00\n-2.0088490400682257e+01\n-1.0604378604385783e+01\n-6.1113668296195289e+00\n-2.2092875392108613e+01\n2.5226823119849620e+00\n-1.7025670073902193e+00\n-2.0212921154248392e+01\n4.1215302761208665e+00\n-1.2674601824380372e+00\n-2.0894304132255499e+01\n3.2327279400931275e+00\n-1.5645097059975908e+00\n-2.0399715984569774e+01\n3.8540301445881568e+00\n-1.4404494911287089e+00\n-2.0564935688860047e+01\n3.4332333154149746e+00\n-1.6084176361864120e+00\n-2.0411291726685999e+01\n5.5786590199926209e+00\n-1.1494800517281361e+00\n-2.2075985991649979e+01\n-8.8251077905092821e+00\n-5.9564834570688738e+00\n-2.2349710407920632e+01\n8.7520361753162645e-01\n-2.4898919380429012e+00\n-2.0752580004233433e+01\n8.6700658410444742e-01\n-2.4875994204925806e+00\n-2.0144908301866408e+01\n1.7436312022246869e+00\n-2.3323135962271486e+00\n-2.0442114864717464e+01\n1.8363939007634597e-01\n-2.7169667794919854e+00\n-2.0394092034527358e+01\n-6.0783123037166586e-01\n-3.3331334139211970e+00\n-2.1099867479506909e+01\n-1.3624784169801972e+01\n-7.9496047295873469e+00\n-2.2538164015356799e+01\n-1.3624755679554211e+01\n-8.1373053254727772e+00\n-2.2443715465159706e+01\n-6.6675784618216767e+00\n-5.9752005960442283e+00\n-2.3512622702935776e+01\n5.1426463948042977e+00\n-1.7805083211168007e+00\n-2.1276045692162182e+01\n1.6311651292559077e+00\n-2.7468300029422443e+00\n-1.9901769722616525e+01\n1.4180044465270141e+01\n-5.1058613223770866e-01\n-3.1594431011548252e+01\n2.3360536167403412e+00\n-2.5650802189340025e+00\n-2.0097247864358366e+01\n1.4962256693732959e+01\n-4.2011681928863615e-01\n-3.2324353362400991e+01\n-1.0001599733998567e+01\n-6.8664513356374739e+00\n-2.0994024115164869e+01\n-7.5598983197750087e+00\n-6.3837423743052542e+00\n-2.3106193885748020e+01\n-5.9380000020151753e+00\n-5.9696101243348236e+00\n-2.3753044586866363e+01\n-5.9380000020151753e+00\n-5.9696101243348236e+00\n-2.3753044586866363e+01\n-1.3184358260015435e+01\n-8.2655862162064313e+00\n-2.2092425458580962e+01\n-5.8316161449817621e+00\n-6.0724654644910290e+00\n-2.4126675644951902e+01\n-1.0070800074885420e+00\n-4.0952176671757679e+00\n-2.2351406990865986e+01\n1.4529387061447288e+01\n-6.3295069366770307e-01\n-3.1432804860150359e+01\n-9.7731504712568351e-01\n-4.2645808550298545e+00\n-2.2245065027272311e+01\n1.4263123370827323e+01\n-8.5278136434706353e-01\n-3.1421802179933067e+01\n6.0332491289263830e+00\n-1.9694616278912247e+00\n-2.1740221293129252e+01\n5.8815311537628672e+00\n-1.9909357148046916e+00\n-2.1501017763881933e+01\n1.7167962738796374e+00\n-3.1066850321319071e+00\n-1.9895969509936684e+01\n-9.0285773344393783e-01\n-4.4504585691579628e+00\n-2.2488138671331193e+01\n1.8582925452498724e+00\n-3.0927840638574282e+00\n-1.9797811482520412e+01\n-5.6310142277066229e+00\n-6.3743813577340820e+00\n-2.4078804659751839e+01\n5.8955133672998894e+00\n-2.2577820143607741e+00\n-2.1841268881810286e+01\n5.2071865418616401e+00\n-2.2967878892202380e+00\n-2.0636956332797045e+01\n4.3032491536595341e+00\n-2.5610894653278713e+00\n-2.0327818020971669e+01\n3.0493224388671609e+00\n-2.8771298990830707e+00\n-1.9760034157127510e+01\n-1.2255123259392390e+01\n-8.5068023210283883e+00\n-2.1545721639557868e+01\n6.0219392358560979e+00\n-2.5108137462764559e+00\n-2.2297123967878672e+01\n4.4800225284775568e+00\n-2.7025265224176569e+00\n-2.0547180341187598e+01\n4.4800225284775568e+00\n-2.7025265224176569e+00\n-2.0547180341187598e+01\n1.8552726904008965e+00\n-3.5550153200380947e+00\n-2.0344836988829535e+01\n6.2356438292551228e+00\n-2.6650383719992630e+00\n-2.2837604279236558e+01\n1.1278244284314129e+01\n-2.4216927822337584e+00\n-2.9298729627657131e+01\n-8.0671539133517740e+00\n-7.3839112663250015e+00\n-2.1433318973826772e+01\n-5.9879147400728652e+00\n-7.0344070201203444e+00\n-2.3000781070936494e+01\n1.3316113916647428e+01\n-2.2293060170398880e+00\n-3.0132924910568395e+01\n3.9117307600109994e+00\n-3.5540336161500843e+00\n-2.1052009567039057e+01\n-5.4295919137978341e+00\n-7.1601181932903541e+00\n-2.2402648586216166e+01\n6.6922022113793469e+00\n-3.5325996344716959e+00\n-2.4327776508625327e+01\n-1.2002858276797463e+01\n-9.3587776779108580e+00\n-2.0581862990772940e+01\n2.1155920247614395e+00\n-4.5099662207912132e+00\n-2.2017562944477497e+01\n1.3217735156307496e+01\n-2.8075845647605968e+00\n-2.9877394191999432e+01\n-3.8149715008713914e+00\n-7.2347869355017407e+00\n-2.3017063103313731e+01\n-1.2398458559613735e+01\n-9.7832040015948092e+00\n-2.0200255593954342e+01\n3.8487463576618932e+00\n-4.3870232671040377e+00\n-2.1740040752549195e+01\n9.3073959797199723e+00\n-3.8570221572205901e+00\n-2.6715565852505581e+01\n2.6743354888750583e+00\n-5.0876802047088727e+00\n-2.2832280605572670e+01\n3.6565533300139395e+00\n-4.8262908407388156e+00\n-2.2397892669754491e+01\n3.6189515904734169e+00\n-4.8529046198821675e+00\n-2.2174999486754555e+01\n-6.9751080339047045e+00\n-8.4732414324457661e+00\n-2.0816738292683588e+01\n9.0145603187927836e+00\n-4.3780489494708874e+00\n-2.6303572996763695e+01\n-1.1820749365815123e+01\n-1.0093511152641902e+01\n-1.9681831949566206e+01\n-1.0944594269880852e+01\n-9.9464203442234620e+00\n-1.9639866361467448e+01\n-3.5338648415710465e+00\n-7.7252321543840354e+00\n-2.1760459397742881e+01\n-3.4861670798503037e+00\n-8.0185361047505577e+00\n-2.1610360123640348e+01\n-1.0978642129543321e+01\n-1.0218025089623056e+01\n-1.9351398444168872e+01\n-5.8522731557613277e+00\n-8.2930560401316988e+00\n-1.9524779832631221e+01\n-1.1285618089154598e+01\n-1.0466589753826050e+01\n-1.9100209189971171e+01\n-3.2699205643566884e+00\n-8.0973881844206108e+00\n-2.1409016670387587e+01\n-1.1238277685141933e+01\n-1.0500897170820620e+01\n-1.9034463390600209e+01\n1.4138007683622019e+01\n-4.2986002753679369e+00\n-2.7432189829417833e+01\n1.2405911987516886e+01\n-4.9643161768966104e+00\n-2.6781876947087301e+01\n-4.7708328511686400e+00\n-9.0999738390799827e+00\n-2.0133235796987062e+01\n8.6741138484731906e+00\n-5.9979940264497600e+00\n-2.4616930651955769e+01\n3.0326258534244226e+00\n-7.9593260126655645e+00\n-2.1166206399257412e+01\n1.2806742261653772e+01\n-6.0383884161768089e+00\n-2.4077030733550359e+01\n1.6971007146222550e+00\n-8.7760577444803456e+00\n-2.0568767378743335e+01\n6.1513955834795366e+00\n2.3144248430051682e+01\n-4.7881221189373747e+01\n1.7714302671929754e+00\n2.1053387941608143e+01\n-4.5437573476833713e+01\n6.8922557876500914e+00\n2.3426955654841567e+01\n-4.8283088897522113e+01\n7.3570657124058156e+00\n2.3633852129357987e+01\n-4.8527131792040940e+01\n6.8390806801211061e+00\n2.3387209803891366e+01\n-4.8468208633298339e+01\n6.7994424859121185e+00\n2.3296569022774431e+01\n-4.8343589733156776e+01\n7.2297329094433556e+00\n2.3487718104220360e+01\n-4.8638234066978583e+01\n6.6044282410915525e+00\n2.3945116118501939e+01\n-5.0375006130147185e+01\n6.2308585710852400e+00\n2.3012150590977253e+01\n-4.8222223399381285e+01\n1.7406508976319440e+01\n2.9985352927553404e+01\n-5.9068318083711652e+01\n5.8628780817518997e+00\n2.2778482841992471e+01\n-4.8060499369151280e+01\n5.6138135023885791e+00\n2.2637437447934172e+01\n-4.8143817997223778e+01\n5.9796181327904243e+00\n2.2705429073096010e+01\n-4.8184426534449692e+01\n1.3204687136000645e+01\n2.5989197437916651e+01\n-5.1877405605972392e+01\n6.3953876179524416e+00\n2.2971558543629708e+01\n-4.8743816671125003e+01\n7.1936157729775365e+00\n2.3461952194130127e+01\n-4.9506608682827178e+01\n6.8296358104772095e+00\n2.3120728378050497e+01\n-4.8769302695078288e+01\n9.6988364385880494e+00\n2.5308868370212824e+01\n-5.3045972167719739e+01\n7.2513051982756860e+00\n2.3175681864800950e+01\n-4.9109301035872001e+01\n7.3235668052454201e+00\n2.3246337274707962e+01\n-4.9294294714167350e+01\n8.0772877926416431e+00\n2.3425934230677129e+01\n-5.0036060878287827e+01\n9.6733773581566940e+00\n2.4622483661507978e+01\n-5.2663719440250603e+01\n9.6745143682562524e+00\n2.4665039427031488e+01\n-5.2827368038620541e+01\n9.3671013618274372e+00\n2.4396910064669520e+01\n-5.3131690975519696e+01\n-1.2392941812601981e+01\n1.1639170278885448e+01\n-3.4854984956290181e+01\n1.8198005831434362e+01\n2.9473051724075155e+01\n-6.0890316745459572e+01\n-1.2662775550902223e+01\n1.3265468731975169e+01\n-3.9495264629690226e+01\n-1.2001523869843904e+01\n1.3564671580763026e+01\n-4.0323903648095872e+01\n-5.5733954956663156e+00\n1.6421724391519462e+01\n-4.3788624445022791e+01\n-2.4151417993730799e+00\n1.7863772310644872e+01\n-4.5302954390520512e+01\n-1.3583023850223418e+01\n1.3028774153991455e+01\n-3.9670621712560830e+01\n8.9767927618783467e+00\n2.2732487653046050e+01\n-5.1303712164790937e+01\n-8.7872842559905013e+00\n1.4769239823948718e+01\n-4.2651313115345232e+01\n-6.7303110117347087e+00\n1.5671604805257575e+01\n-4.3815661999272670e+01\n1.6221043711176332e+01\n2.5664599089238035e+01\n-5.4987189673857742e+01\n1.6011426811805272e+01\n2.5440674078906198e+01\n-5.4890906303050741e+01\n-1.1874607518363865e+01\n1.3109944670571034e+01\n-4.1647463535026723e+01\n-8.8827956593180506e+00\n1.4461693828466732e+01\n-4.3042818354322954e+01\n1.6981716396283211e+01\n2.5591025958542414e+01\n-5.5538150494692410e+01\n1.3939076918471596e+01\n2.4680349156145226e+01\n-5.5134211666075593e+01\n-1.2717695403134597e+01\n1.1285656841313788e+01\n-3.7896739672749582e+01\n-1.1151068519987696e+01\n1.1547706040589190e+01\n-3.8027058025028573e+01\n3.8744725823223329e+00\n2.0573877713025357e+01\n-5.2375501305952888e+01\n-1.1386788160105528e+00\n1.7420901442178724e+01\n-4.7672314328691861e+01\n-9.3579579035601803e+00\n1.3217314543769966e+01\n-4.1757343538282058e+01\n-1.3031620678812070e+01\n1.0150473694810428e+01\n-3.6139046704345226e+01\n-8.1987486188494660e+00\n1.3865723750332446e+01\n-4.4408037914765963e+01\n-1.0154356123737879e+01\n1.2703150031181838e+01\n-4.3890940239366451e+01\n-1.1609184877595144e+01\n1.1873689278304267e+01\n-4.3199717335054650e+01\n1.4735832059868335e+01\n2.3134782517252017e+01\n-5.7305540588787167e+01\n3.5460687153696324e+00\n1.8044880131653265e+01\n-5.1703296494658517e+01\n-9.5819397337992314e+00\n1.2280424122474189e+01\n-4.4635495630406133e+01\n1.9754219212401935e+01\n2.5132281032676147e+01\n-6.0908905833260029e+01\n-3.6574987408049591e+00\n1.4911386058299165e+01\n-4.8241276600530021e+01\n-4.1145656504776635e+00\n1.4545764095100266e+01\n-4.7671799352335988e+01\n-4.0909742548631201e+00\n1.4569358171153649e+01\n-4.8016475800816302e+01\n-1.3888585933742353e-02\n1.6443081050005954e+01\n-5.0085957346038654e+01\n1.8804209051068668e-01\n1.6392681386091631e+01\n-5.0519278358138607e+01\n1.7146433733212827e+01\n2.5164051566427883e+01\n-6.4732935486893837e+01\n-1.3637282915226527e+00\n1.5566926367188831e+01\n-4.9923374081156673e+01\n-3.8425880949322053e+00\n1.4445168810496449e+01\n-4.8714585064807579e+01\n4.2480660187178030e+00\n1.7775796859343167e+01\n-5.3029507058592230e+01\n3.0800695188166449e-01\n1.6155019198440328e+01\n-5.1275018638965278e+01\n5.2451090067024584e+00\n1.8320580886120883e+01\n-5.4155411465444743e+01\n-4.1909668197852046e+00\n1.4078333053088363e+01\n-4.8639680361772427e+01\n1.8888494892160704e+01\n2.5712003822893148e+01\n-6.7010895676923553e+01\n9.7752179185234329e+00\n2.1145310484546542e+01\n-6.0453937630654771e+01\n-3.2711582562611959e+01\n5.3207700088353080e+00\n-4.1979283396358142e+01\n1.5308599218466753e+01\n2.1735805060743761e+01\n-5.8595472923512737e+01\n1.7224691660151056e+01\n2.3615820068876232e+01\n-6.2720379190872791e+01\n1.0763572908771367e+01\n2.0100014351559594e+01\n-5.6866012963445343e+01\n-3.9537202071465143e+00\n1.3850601200006487e+01\n-4.9319479122770630e+01\n1.0710162992963042e+01\n2.0097144555409816e+01\n-5.7472265223748998e+01\n4.7758848281731012e+00\n1.7442747159950507e+01\n-5.4252722243702422e+01\n1.0194900384974147e+01\n1.9662150538673842e+01\n-5.7074728907767714e+01\n1.1013912120432298e+01\n1.9721233016052437e+01\n-5.7005993787501012e+01\n1.3351680397738050e+01\n2.2091721631563093e+01\n-6.3319215897883005e+01\n4.7377186470222794e+00\n1.7126019849894789e+01\n-5.4131784952923994e+01\n6.0090087575317668e+00\n1.7651176138726871e+01\n-5.5162606352578358e+01\n4.7163441190160613e+00\n1.6897250148334017e+01\n-5.4411873450073706e+01\n4.9821772841577445e+00\n1.7610779208531714e+01\n-5.6724585944282119e+01\n6.2602007574430774e+00\n1.7566472171200079e+01\n-5.5506904776467302e+01\n4.9227900938734876e+00\n1.5677098131567822e+01\n-5.4534103166285192e+01\n-1.1927185394166274e+01\n7.9852877383622562e+00\n-4.3315674569514123e+01\n-1.3827132877351007e+01\n6.9720919918690694e+00\n-4.1812795209528289e+01\n-1.3999366307627971e+01\n6.8739982862602771e+00\n-4.2231187347751181e+01\n1.2981569837279036e+01\n1.2830095964512950e+01\n-3.6503878084405791e+01\n1.4231088129711276e+01\n1.8758465326077044e+01\n-6.0822920339922014e+01\n6.5065538692133087e+00\n1.4370352964896780e+01\n-5.2644640019902035e+01\n4.7202085871834205e+00\n1.3332922475352690e+01\n-5.0312570317632002e+01\n7.8384633959280592e+00\n1.4360061821191545e+01\n-5.1693842567430742e+01\n4.7020942608047127e+00\n1.2977774960197989e+01\n-4.9609701998181215e+01\n-1.5099064307908025e+01\n3.7547360235514669e+00\n-3.4669049770405458e+01\n3.4532434303164896e+00\n1.1135766494652067e+01\n-4.7424628608982516e+01\n-1.7831639298953942e+01\n2.9708593163482822e+00\n-3.6776250298693782e+01\n-1.7769698180972988e+01\n2.9342142734497236e+00\n-3.7248106876506846e+01\n-1.3487376754051782e+01\n4.0487382031030172e+00\n-3.7367774166353364e+01\n3.4392978791467725e+00\n1.0534249172164758e+01\n-4.6324750202852336e+01\n3.4461859227398679e+00\n1.0550223393917017e+01\n-4.6426608098381692e+01\n3.6815701437908066e+00\n1.0861413466736728e+01\n-4.7534592532272498e+01\n3.1311264759034350e+00\n1.0112409554338555e+01\n-4.5868353696224325e+01\n3.5672355293807794e+00\n1.0069278601320038e+01\n-4.6255044949407420e+01\n4.1590170501105952e+00\n1.0306562618145733e+01\n-4.5862447424336871e+01\n1.4079275641284867e+00\n9.4486214050225588e+00\n-4.6524398304647939e+01\n2.2368683716733924e+00\n9.2896367785893670e+00\n-4.5259862291763341e+01\n-1.4732921149347606e+01\n1.9467561690693220e+00\n-3.1872067138549724e+01\n1.3442475986680952e+01\n1.0488925087988566e+01\n-3.6047346858531384e+01\n1.4669050883822055e+00\n8.7334061561053673e+00\n-4.4525883549802202e+01\n-1.9956501781136179e+01\n6.2297814893696746e-01\n-3.3325427215519582e+01\n-1.1995519040780774e+01\n3.2678985083786869e+00\n-3.6889008338668006e+01\n2.5980263434175583e+00\n8.5513240068862686e+00\n-4.4429928106311031e+01\n2.6112287472301245e+00\n8.6876088065223858e+00\n-4.4995176252390905e+01\n2.7624834919963899e+00\n8.6391188672617822e+00\n-4.4634829813291411e+01\n-2.1301547387817137e+00\n6.4249728153804435e+00\n-4.1256502335710607e+01\n4.2883975069918536e+00\n8.5940286654043962e+00\n-4.4252849995373360e+01\n-4.1352918299710630e+00\n5.5030333110170311e+00\n-4.0238804270835367e+01\n-1.6687539808273396e+01\n1.1120531424683300e+00\n-3.4037694000719597e+01\n8.7280434378306726e+00\n9.9669582287701619e+00\n-4.7640422551257295e+01\n4.9141125036541426e+00\n8.1530883783897057e+00\n-4.4620728757874687e+01\n-7.7943046355402812e+00\n3.1096484354144858e+00\n-3.6608910720266095e+01\n8.1432427852042788e-01\n3.7600114208907316e+00\n-2.4018619154338712e+01\n7.9340144447381633e-01\n3.5802388671036476e+00\n-2.3254876972572077e+01\n1.3711940666830420e+01\n8.9654085726544785e+00\n-3.8698533913017712e+01\n-6.5747380564518592e+00\n2.5788931423919137e+00\n-3.5830875726674897e+01\n-6.5747380564518592e+00\n2.5788931423919137e+00\n-3.5830875726674897e+01\n8.1358707269860733e-02\n2.8342014867978618e+00\n-2.2059431231761888e+01\n-7.6195693850482362e+00\n1.9130507418352907e+00\n-3.4712515094723223e+01\n-3.3094324230320957e+00\n2.2390429642442915e+00\n-2.6326036114337601e+01\n-3.3306415849615347e+00\n2.3162873611560029e+00\n-2.6598814478846776e+01\n1.0578934408449520e-01\n2.6685809095996333e+00\n-2.1858378351567158e+01\n2.5164540646677136e-01\n2.5668768199392802e+00\n-2.1637626602758690e+01\n1.0886067914477144e+01\n7.5804221733375341e+00\n-4.3123948921201276e+01\n-1.6348239416398258e+00\n1.7305805587411418e+00\n-2.2866362680261467e+01\n-1.6348239416398258e+00\n1.7305805587411418e+00\n-2.2866362680261467e+01\n-7.2023415198603780e-01\n1.8482204567538159e+00\n-2.1982511975540092e+01\n-1.0117196977560200e+01\n-2.7453147055137839e-01\n-3.1716195356967287e+01\n1.0500852586683679e+01\n6.4034750838124133e+00\n-4.1330616072480197e+01\n1.1653204906008337e+01\n6.5661086854755695e+00\n-4.1706454133994576e+01\n-4.3469126187918949e-01\n1.5282204203756864e+00\n-2.1361444953720902e+01\n1.2587022210790437e+01\n5.5979762816708893e+00\n-2.9597969863376200e+01\n3.1471301830934018e-01\n1.4498862762131335e+00\n-2.0881463635873384e+01\n-1.3255242391909716e+01\n-2.1937674116007089e+00\n-2.7379154838856582e+01\n-1.9196611894554110e+00\n7.3371243181493884e-01\n-2.2974766094870446e+01\n9.3405164766824349e+00\n4.8824181456220792e+00\n-3.9178086937018151e+01\n1.8853847650545319e+00\n1.6723851178171647e+00\n-2.0608253099247797e+01\n-9.8320630496242234e-02\n9.9138881752141694e-01\n-2.0891074636623561e+01\n3.9533220086493568e+00\n2.2113726265495481e+00\n-2.1844843318883076e+01\n3.9575320431544472e+00\n2.2100951566616329e+00\n-2.1877444264698660e+01\n-3.5485585298724933e+00\n3.0662252647465620e-02\n-2.3386642258753398e+01\n-2.3865185896815855e+00\n3.4002676474817167e-01\n-2.2658017065095411e+01\n-3.0828224943183056e+00\n-8.2224984791562997e-02\n-2.3143611630657144e+01\n-1.1377096081645854e+00\n4.0179010670099558e-01\n-2.1697013251445185e+01\n-8.6508521100183984e+00\n-1.6553685132727034e+00\n-2.9500186637547781e+01\n1.2819724345250362e+01\n4.2015648143466384e+00\n-2.9936399936734034e+01\n4.6787015869419353e+00\n1.5298233476268357e+00\n-2.1936812043976879e+01\n-7.8864285857744836e+00\n-2.4292992759879901e+00\n-2.9241870216860036e+01\n3.1325388120756683e+00\n9.6081920320282721e-01\n-2.0497271621887254e+01\n-7.8851737437796858e+00\n-2.5634837812175486e+00\n-2.9050452113918894e+01\n1.3554702441677602e+01\n3.9066497321115832e+00\n-3.1686004631442419e+01\n4.6463719782946615e+00\n1.2606832156493206e+00\n-2.1778176869918276e+01\n1.0560095711686401e+00\n1.3932601813235621e-01\n-2.0728542443437920e+01\n1.2726398261543245e-01\n-1.8530381134204993e-01\n-2.0702318837983199e+01\n1.3202861604360825e+01\n3.5044455916735564e+00\n-2.9917954638997234e+01\n-2.5827612460719149e+00\n-1.2604760791273086e+00\n-2.1767239107041910e+01\n2.8014192708911847e+00\n3.8322743779513058e-01\n-2.0415579623606376e+01\n2.7930597070186614e+00\n3.6902424785787502e-01\n-2.0298045344207608e+01\n3.8643946225180698e-01\n-4.0009276086876006e-01\n-2.0561049332609926e+01\n4.4491838040441465e+00\n8.0534702846467099e-01\n-2.1447284365220515e+01\n4.7389901974709120e-01\n-5.8607086118371055e-01\n-2.0656251070426503e+01\n-1.3288629348000354e+00\n-1.3034535013451125e+00\n-2.1396142421163933e+01\n7.0628175385973146e-01\n-6.6766604706385024e-01\n-2.0540308685961957e+01\n3.0739187680051514e+00\n-5.2249587519984153e-02\n-2.0545516727629717e+01\n3.0723640241843930e+00\n-4.7244201165307927e-02\n-2.0527313467715487e+01\n1.2767878493527147e+00\n-7.0447355143822432e-01\n-2.0364217307106852e+01\n2.8241378677758253e+00\n-3.1280509963587766e-01\n-2.0482827360348637e+01\n2.5066890046715260e+00\n-5.8444305817717679e-01\n-2.0432872837904515e+01\n2.5066890046715260e+00\n-5.8444305817717679e-01\n-2.0432872837904515e+01\n5.9913503408520077e+00\n7.5323644531606809e-02\n-2.2718288651694294e+01\n2.0043277329788936e+00\n-1.0473721271193126e+00\n-2.0656402024806976e+01\n-1.0850274715648322e+01\n-5.3478308440684108e+00\n-2.1651936605591967e+01\n4.3624524333245557e-01\n-1.5981332209527501e+00\n-2.0137969774316726e+01\n1.3919206367495269e+01\n1.4948930179685493e+00\n-3.2022467451923902e+01\n1.3907887748564066e+01\n1.4914816814667384e+00\n-3.2029760533726524e+01\n-9.6900260272941718e-01\n-2.1948725345205293e+00\n-2.0524918875047852e+01\n5.1419956851386894e+00\n-4.4959130636969757e-01\n-2.1993013932502336e+01\n7.4266185369368056e+00\n6.2661770794037633e-02\n-2.4046086594324244e+01\n-1.9710760460363428e+00\n-2.8786327731327295e+00\n-2.1968627345211807e+01\n1.2424541564602354e+00\n-1.7180482069316472e+00\n-2.0129472885017694e+01\n-9.1398362381850795e+00\n-5.4503468043554752e+00\n-2.3001194101780264e+01\n1.7344156265007686e+00\n-1.6556058594856087e+00\n-2.0198986198216780e+01\n1.3870085531380777e+01\n8.6424487936989969e-01\n-3.2027744065150017e+01\n-2.2688170612299001e+00\n-3.4720326017221974e+00\n-2.3025284793181459e+01\n-1.4220986106658206e+01\n-7.7876491428962682e+00\n-2.2804901894756092e+01\n6.3507983814269959e+00\n-1.0497184813325242e+00\n-2.2390667491002201e+01\n5.3823145210200141e-01\n-2.6278394527718461e+00\n-2.0035279063660209e+01\n-6.8062425266511664e+00\n-5.5749361586728554e+00\n-2.4520627303326989e+01\n-6.2837388441067867e+00\n-5.9286833201231861e+00\n-2.4512080276764891e+01\n-1.3457344841784186e+01\n-8.1231354735983778e+00\n-2.2328837973771201e+01\n5.0779026743669897e+00\n-1.8007723464663299e+00\n-2.1263190724254152e+01\n-1.3451137172393496e+01\n-8.3098115518785072e+00\n-2.2100993038564955e+01\n-8.3097838000958379e+00\n-6.4269399323390122e+00\n-2.1579082428625114e+01\n-9.6449716266068297e-01\n-4.0790533482637992e+00\n-2.2120126749959823e+01\n-2.9138055040793946e+00\n-5.0593580401928708e+00\n-2.3520831206595034e+01\n1.4305254748595525e+01\n-6.3937559516614628e-01\n-3.0697310705595562e+01\n-1.3064522248903710e+01\n-8.3457029868785071e+00\n-2.1949720365969014e+01\n6.2960839366567951e+00\n-1.8742336083966595e+00\n-2.2094594503125212e+01\n1.4962941213519002e+01\n-9.1714209459839058e-01\n-3.2599927262883192e+01\n-1.2784816585335486e+01\n-8.3792014276292033e+00\n-2.1873027405794307e+01\n4.7023455924455506e+00\n-2.2718738879386624e+00\n-2.0542133223399240e+01\n-5.6627391747053384e+00\n-6.3286421429903070e+00\n-2.3725473176482588e+01\n-8.0914638654208897e+00\n-6.7207762041635997e+00\n-2.1283044655871667e+01\n1.4325093145533721e+01\n-9.2114109404429412e-01\n-3.1176843258191703e+01\n4.2399300067217895e+00\n-2.4227905456040357e+00\n-2.0344441166289311e+01\n4.0507555150269008e+00\n-2.5814018778062833e+00\n-2.0264134794691316e+01\n3.4806261705129486e+00\n-2.7609188224617291e+00\n-1.9970899014157421e+01\n1.4390873554313057e+01\n-1.3108751210497054e+00\n-3.0803926088827485e+01\n1.4579294309530061e+01\n-1.5840164764965645e+00\n-3.0389437527314339e+01\n-1.2860075365012563e+01\n-9.5144628449374675e+00\n-2.0506902030312865e+01\n-1.2756339338566864e+01\n-9.5373579175313807e+00\n-2.0483201744191032e+01\n2.0417231155333018e+00\n-4.4529501134884288e+00\n-2.2141382825062326e+01\n7.0336466088675085e+00\n-3.4733049315456594e+00\n-2.4389761869209373e+01\n4.0742193675016596e+00\n-3.9652070632571523e+00\n-2.1581661476264745e+01\n-1.2976090532659208e+01\n-9.7794882353622761e+00\n-2.0280599632627307e+01\n-4.6169826715147266e+00\n-7.3635024324432070e+00\n-2.2529084710313210e+01\n-1.1729550104051068e+01\n-9.4948228432844139e+00\n-2.0333962634265930e+01\n-3.7831329839023828e+00\n-7.2005885454616863e+00\n-2.2547654782739261e+01\n3.4475095032586691e+00\n-4.4290244258991356e+00\n-2.1650970830519210e+01\n1.3464876601298316e+01\n-2.9342750854283173e+00\n-2.8948336521778565e+01\n3.5547027506719946e+00\n-4.8748386348647204e+00\n-2.2187726258771391e+01\n3.6485862936378317e+00\n-4.9321791038746499e+00\n-2.2241606785283885e+01\n3.7902099887707530e-01\n-5.8573105659193878e+00\n-2.1356104023304738e+01\n-3.4213607437235520e+00\n-7.5428314770947260e+00\n-2.2129841843913233e+01\n-2.9055307664436163e+00\n-7.5887003460641189e+00\n-2.1979575246910560e+01\n-3.2638860169653414e+00\n-7.7345366370853519e+00\n-2.2038363136464799e+01\n9.4771481238079218e+00\n-4.5824922847211687e+00\n-2.7487092830121529e+01\n-1.1129624806855613e+01\n-9.9964933046250977e+00\n-1.9599638131493869e+01\n-2.2449007228965963e+00\n-7.7349007602202313e+00\n-2.1787276184168928e+01\n-4.8080976248866953e+00\n-8.5508209972832123e+00\n-1.9564198293665964e+01\n1.4092107369146150e+01\n-4.4453947941612588e+00\n-2.6678247509406678e+01\n1.4878964284906097e+01\n-5.0100642237903159e+00\n-2.7473063595791459e+01\n-4.6168364061788791e+00\n-9.4607892984356941e+00\n-1.9560523557984343e+01\n1.1462458017204456e+01\n-5.9276328117850721e+00\n-2.5260625016131190e+01\n1.2604056076169618e+01\n-5.6348595011799398e+00\n-2.5416888843313103e+01\n1.4863605507073451e+01\n-5.5350354101595416e+00\n-2.6821634523174957e+01\n1.3747224883720973e+01\n-5.7818085636844261e+00\n-2.6113651015286216e+01\n-1.9123023490605601e-01\n-8.7003089914317346e+00\n-2.0072565943901264e+01\n9.7504138523047388e+00\n2.5293846023217505e+01\n-5.0771879516907859e+01\n7.9244302620031242e+00\n2.3914053281761873e+01\n-4.8834939085108353e+01\n6.2158334650667957e+00\n2.3228483812724470e+01\n-4.8465065845049317e+01\n6.0903386283646670e+00\n2.3014449712654311e+01\n-4.7915971332641881e+01\n5.9702047909080376e+00\n2.2863857185990675e+01\n-4.7855988890416846e+01\n1.7345377034286752e+01\n3.0248279750241402e+01\n-5.9577315876028862e+01\n6.6180234435941632e+00\n2.3138593834151695e+01\n-4.8306897974025659e+01\n-2.5706759616059287e+01\n1.7308886675945821e+01\n-5.1855851260533207e+01\n7.4373907092371772e+00\n2.3498477778506960e+01\n-4.8870653495531386e+01\n8.3318730347226122e-01\n2.0339963473144497e+01\n-4.5590747398113471e+01\n-4.2118581745789449e+01\n1.5266427888851444e+01\n-5.5335893064462645e+01\n1.9324123348369984e+00\n2.0434920213528979e+01\n-4.6782029555183996e+01\n7.4533592721719373e+00\n2.3110623139625456e+01\n-5.0087705108481174e+01\n9.5570592181844205e+00\n2.3861341090595303e+01\n-5.1176843001781251e+01\n9.3552410317823433e+00\n2.3545015826452524e+01\n-5.0511386589303662e+01\n-2.5159942485835916e+00\n1.7978784851634185e+01\n-4.5417849750292262e+01\n1.3438126579761031e+01\n2.4685139077245800e+01\n-5.3333888922485457e+01\n7.8396092400965980e+00\n2.2195254164176429e+01\n-5.0587706865484208e+01\n1.6317096344278614e+01\n2.6045423055185445e+01\n-5.5267570443007052e+01\n-9.2321687261149066e+00\n1.4632171737594360e+01\n-4.2670371716573520e+01\n1.2532832641497148e+01\n2.4327266155817750e+01\n-5.4464498971558328e+01\n9.7354837631348214e+00\n2.3645993745704189e+01\n-5.4800436521454870e+01\n1.3563492300435174e+01\n2.4682666430002627e+01\n-5.4770198997647611e+01\n-8.1079784079770096e+00\n1.4469228417929381e+01\n-4.3517482576852203e+01\n-1.3250953501801904e+01\n1.2195887296578887e+01\n-4.1022667946662793e+01\n-8.4725126165461244e+00\n1.3844855606847707e+01\n-4.2917955169511309e+01\n1.1631416964871914e+01\n2.3029745012336164e+01\n-5.4077541624382015e+01\n-3.8988669362628553e-01\n1.7115624559637649e+01\n-4.8576792022371819e+01\n5.1229720456619543e-01\n1.7393204842792972e+01\n-4.9023553962444751e+01\n1.1931882077477482e+01\n2.2395534895742252e+01\n-5.6406070428955353e+01\n-2.3702682365659253e+01\n3.3214757078475063e+00\n-2.5864577450861670e+01\n3.7913118684947228e-01\n1.6729541410738221e+01\n-5.0682080659114810e+01\n5.0087499675976206e+00\n1.9049967622104820e+01\n-5.4904911090507397e+01\n1.0941294398151625e+01\n2.0930469926276409e+01\n-5.5726841805202220e+01\n8.8572754292911586e+00\n2.0407036845907381e+01\n-5.6815348297246956e+01\n4.9807264243785667e+00\n1.8603233924120282e+01\n-5.4561538153823044e+01\n-6.6375293743879160e+00\n1.3052944286838994e+01\n-4.7431144930862644e+01\n1.6389907286478973e+01\n2.4164598211053239e+01\n-6.4476289703092036e+01\n-3.2118556547555592e+01\n5.7357057109299401e+00\n-4.2349826084993900e+01\n1.0724321589081015e+01\n2.0211620086406533e+01\n-5.5982158672096467e+01\n5.0398246190232641e+00\n1.7809621983864471e+01\n-5.3409219806442394e+01\n1.3941735349422325e+01\n2.2986344439672571e+01\n-6.2336907564533220e+01\n1.1355598638111342e+01\n2.0457193137483880e+01\n-5.6745648986291613e+01\n1.1317859865538566e+01\n2.0390236895981563e+01\n-5.6646768607363668e+01\n-4.0915948593406304e+00\n1.3896864527713397e+01\n-4.9116938687244414e+01\n3.6627435722947972e+00\n1.7111901658753492e+01\n-5.3379612529365879e+01\n-5.8919068838210560e+00\n1.2719260894350700e+01\n-4.8111968566689050e+01\n8.4101543726961587e+00\n1.8884085998311615e+01\n-5.6118128485152738e+01\n-3.0721875205332793e+01\n4.9286568614026711e+00\n-4.1036722250315165e+01\n1.2271730485805220e+01\n2.1504769778948699e+01\n-6.2339303000990270e+01\n1.5648620815723723e+01\n2.1635912950549454e+01\n-5.9656376035331370e+01\n1.5586996235471151e+01\n2.1817514641393014e+01\n-5.9983320643620338e+01\n1.7275094071925146e+01\n2.2503566356781715e+01\n-6.1968673480653422e+01\n-3.0069994415805912e+01\n4.6753552100969786e+00\n-4.0711438366484302e+01\n1.1013927520001200e+01\n1.9591119023755596e+01\n-5.7712145955127326e+01\n-1.9831759170402425e+01\n7.1105952702045689e+00\n-4.2261534022070023e+01\n4.1596307107149135e+00\n1.5876422541340689e+01\n-5.4270123848142198e+01\n-2.0527064721312929e+01\n5.8884470965765772e+00\n-4.0497982736445955e+01\n-2.8953247225710129e+01\n3.5498560089552034e+00\n-3.9122584169262083e+01\n-4.7952815601974956e+00\n1.0565795783228074e+01\n-4.7095159901425070e+01\n-1.2320405458461638e+01\n6.7378611370972603e+00\n-4.0380777593663581e+01\n6.3749056535137392e+00\n1.4155641636539242e+01\n-5.1328468195641562e+01\n6.3875479012714855e+00\n1.4079603589748972e+01\n-5.1088078861955829e+01\n7.0760726743378797e+00\n1.4293717558370320e+01\n-5.1523570708903542e+01\n4.2450012911542059e+00\n1.3174992824015344e+01\n-5.0016660012447502e+01\n5.6540408964220008e+00\n1.2813412861217190e+01\n-5.0058967963755599e+01\n-6.1599177260953564e+00\n8.0001208949791813e+00\n-4.2898092361177632e+01\n-1.2794781853129360e+01\n5.0757672378087042e+00\n-3.9173384028070870e+01\n-1.3153839780703949e+01\n4.2901664897015488e+00\n-3.6662942520575804e+01\n-1.4247822638021159e+01\n3.3744576034692488e+00\n-3.4567181262728205e+01\n-1.2246433054362234e+01\n4.8962841359976030e+00\n-3.9073170572666406e+01\n-1.8962082892072711e+01\n2.4454134997385792e+00\n-3.6882220094763980e+01\n3.1740054895440388e+00\n1.0337141283202605e+01\n-4.5812951771942309e+01\n-1.1922666765341768e+01\n3.9913562150186075e+00\n-3.7728496350133462e+01\n-1.2051936731596145e+01\n3.9213625212169836e+00\n-3.7476683736189862e+01\n2.7854913292369847e+00\n9.4233840009980110e+00\n-4.5260443606498853e+01\n3.4429446586937877e+00\n9.5177557410787053e+00\n-4.5709938440266022e+01\n3.3187616873328345e+00\n9.3585939827868803e+00\n-4.5698290348440153e+01\n4.6732234174735243e+00\n9.5762754973805766e+00\n-4.5506862621497355e+01\n-3.2445846082275245e+00\n6.5518421844045376e+00\n-4.1462484464723538e+01\n3.9942919214586516e+00\n9.3636496074062574e+00\n-4.5643633362766359e+01\n4.0430724970960732e+00\n9.1032951665359239e+00\n-4.4937507283985482e+01\n4.6983881425121625e+00\n9.8466398991666946e+00\n-4.7178679093318522e+01\n2.9029268291156050e+00\n8.5741433017850142e+00\n-4.4150850390490717e+01\n9.8185739224660367e+00\n1.0951294251940157e+01\n-4.9578217727785876e+01\n7.7168674123730323e+00\n9.6120330727004806e+00\n-4.5131076442021239e+01\n1.3534279687529203e+01\n9.9402588415332502e+00\n-3.8399695822086464e+01\n7.6030791994708631e+00\n9.1421639711113212e+00\n-4.5056649283449772e+01\n-5.7623262419024872e+00\n4.0791150194430390e+00\n-3.8073669309649098e+01\n7.5006458686454733e+00\n9.0628552662225506e+00\n-4.5792947469372876e+01\n-1.3854553922061578e+01\n3.5164551932850774e-01\n-2.9877316621924980e+01\n-7.0307534896225254e+00\n2.6800019134774704e+00\n-3.5816072623415984e+01\n-2.9442833618986852e-01\n2.4306879639797412e+00\n-2.1845112423741572e+01\n9.2239954417224137e+00\n6.6910134951031210e+00\n-4.1993647156729175e+01\n3.9744925671298774e+00\n3.3534256927072286e+00\n-2.3117965880737724e+01\n9.1693711136053775e+00\n5.8438378228669041e+00\n-4.0952152253841803e+01\n1.2069240879600565e+01\n6.0220107454518121e+00\n-2.9705545069333539e+01\n-2.4863341541947329e-01\n1.0170266166232145e+00\n-2.1028100762895690e+01\n4.8382874485775700e+00\n2.2149469075832475e+00\n-2.2686661941671716e+01\n4.8435013389424411e+00\n2.2206631581911118e+00\n-2.2720456763370802e+01\n3.9695036986076477e+00\n1.9825354001143569e+00\n-2.2662617229853218e+01\n-2.6297114319386483e+00\n-1.0769991167158699e-01\n-2.3006461311435558e+01\n3.5480547623796550e+00\n1.4200540445427952e+00\n-2.1089292727713538e+01\n2.4419889367005143e+00\n1.0376700840698352e+00\n-2.0467185428995663e+01\n4.7134443266299346e+00\n1.6583750679406277e+00\n-2.2128143007848848e+01\n4.8093426317291401e+00\n1.6530096564409711e+00\n-2.2139845982056460e+01\n-7.8465266648140259e+00\n-2.2879383339716810e+00\n-2.8754866978852139e+01\n-7.5370280103961704e+00\n-2.3428447693903514e+00\n-2.9257695974868376e+01\n-7.6624082669834170e-02\n-2.9896795556192113e-01\n-2.1118916478948329e+01\n1.3029106883824207e+01\n3.3897415957384509e+00\n-3.0561657712321814e+01\n2.5775316897106588e+00\n4.0800265443082412e-01\n-2.0372156079332719e+01\n1.3891520474755048e+00\n1.9487150838322677e-02\n-2.0351086573805482e+01\n9.1563250340571167e-01\n-3.4098646586541004e-01\n-2.0426919450767503e+01\n1.3072831454138617e+01\n2.9655372912097144e+00\n-3.0478941934309479e+01\n-1.6576128659055723e+01\n-6.1320156360995846e+00\n-2.5136139732845628e+01\n1.0639781228387837e+00\n-6.2303837818470542e-01\n-2.0393410409055875e+01\n1.9196482365277951e+00\n-2.7365338306432518e-01\n-2.0343735192917034e+01\n4.7400961722847390e-01\n-8.0591959343210651e-01\n-2.0991810029024542e+01\n9.7709924048404084e-01\n-7.3759928682890519e-01\n-2.0409981914033992e+01\n4.9633180061919511e+00\n3.6775383077766260e-01\n-2.1939690176977305e+01\n3.3877791302754883e+00\n-1.0380755861158221e-01\n-2.1038744076100276e+01\n5.2188161176696051e+00\n2.0894392992899108e-01\n-2.2344171506620714e+01\n5.2188161176696051e+00\n2.0894392992899108e-01\n-2.2344171506620714e+01\n8.5262592218244238e-01\n-1.2139089036305277e+00\n-2.0696053098375689e+01\n1.5021396673624599e+00\n-1.0300719064466410e+00\n-2.0478528979597101e+01\n5.5896794547843376e+00\n-1.6571262922388669e-02\n-2.2646491669900808e+01\n-6.4602893551791816e+00\n-4.2169801760240144e+00\n-2.6354572288240917e+01\n-4.1497914183978094e-02\n-1.7770643254648604e+00\n-2.0535865249236043e+01\n-2.7574767726996581e+00\n-2.8961697995069802e+00\n-2.3164580110059969e+01\n6.2868266506964590e+00\n-1.5253005829630845e-01\n-2.3291551026114899e+01\n1.6873265632564900e+00\n-1.4926402574578477e+00\n-2.0420298598893130e+01\n4.7205117312417189e+00\n-6.9102261788815522e-01\n-2.1662880791361385e+01\n-1.4324543065249754e-01\n-2.4521547945060567e+00\n-2.0252937145372396e+01\n-9.7438163092908372e+00\n-5.8992625362872717e+00\n-2.1224608385241147e+01\n5.0886231834656170e+00\n-1.1090305528163142e+00\n-2.1585799896830977e+01\n-1.4513300490740331e+01\n-7.8555607923221267e+00\n-2.2830610794007534e+01\n1.4388685054393129e+01\n4.6263423020830885e-01\n-3.0866197521650090e+01\n-9.5460202887515671e+00\n-6.1574561891458668e+00\n-2.1284856641838218e+01\n1.4331840617953953e+01\n-1.1658088302939267e-01\n-3.2580616957473161e+01\n5.1982121905776104e+00\n-1.7063863230807019e+00\n-2.1350163283535647e+01\n-6.1946624560298025e+00\n-5.9266577604502686e+00\n-2.4452871544740599e+01\n1.4520464643591486e+01\n-5.8296237017465635e-01\n-3.2752754264651998e+01\n1.4270875622362935e+01\n-7.8230477927065600e-01\n-3.0652329797811593e+01\n-8.2711670048774604e+00\n-6.9301481617811627e+00\n-2.2590580252485406e+01\n4.5396670946045825e+00\n-2.2865648199814310e+00\n-2.0577019107669486e+01\n1.4431069311329402e+01\n-7.9116248088798591e-01\n-2.9767769753399609e+01\n1.4136748788673756e+01\n-9.2071945293706015e-01\n-3.0008246667513234e+01\n-5.4358392222330840e+00\n-6.4322955767769310e+00\n-2.3784827211938097e+01\n4.2440451592235231e+00\n-2.5357762543099693e+00\n-2.0381943899871843e+01\n-8.0625214748325416e+00\n-6.9722257843630757e+00\n-2.1881549538738110e+01\n-5.5644730357784704e+00\n-6.5916486327404051e+00\n-2.3579910714914277e+01\n-8.2632022297316166e+00\n-7.1999540853645598e+00\n-2.1526532810152016e+01\n4.2180094416634839e+00\n-2.9842114745014854e+00\n-2.0638121205408662e+01\n4.2180094416634839e+00\n-2.9842114745014854e+00\n-2.0638121205408662e+01\n4.3805452835623546e+00\n-3.2658297254089890e+00\n-2.1177036278754436e+01\n-7.8691110089237952e+00\n-7.4927228984706327e+00\n-2.1357359727716499e+01\n-7.8691110089237952e+00\n-7.4927228984706327e+00\n-2.1357359727716499e+01\n-6.2818480124389797e+00\n-7.0190364326807186e+00\n-2.1666434698820478e+01\n1.2831906314298392e+01\n-2.2253007447011481e+00\n-2.9104309496880251e+01\n1.3276363440686341e+01\n-2.4993368612133655e+00\n-2.9931786029970009e+01\n1.6754429275016096e+00\n-4.4693597484762559e+00\n-2.1134229180894092e+01\n1.7193691871936267e+00\n-4.6163990098535574e+00\n-2.1552717518043053e+01\n4.7064458273196825e+00\n-4.0342140859588307e+00\n-2.2079833588697969e+01\n-1.2135318084946178e+01\n-9.8097197058405552e+00\n-2.0080100694844013e+01\n1.1292075688620473e+01\n-4.3102771502442989e+00\n-2.7150208990934058e+01\n-3.8556746104749737e+00\n-8.0640315729838115e+00\n-2.1541732416797625e+01\n1.2915875454152088e+01\n-4.0340637376193396e+00\n-2.7392856746622680e+01\n2.8053456464501356e+00\n-5.9359582114611271e+00\n-2.1468939788964253e+01\n1.3732900487535392e+01\n-4.1854169369276617e+00\n-2.7956547461491080e+01\n-1.0469814870928619e+01\n-1.0688445749748578e+01\n-1.8702101410116409e+01\n1.3794046133062697e+01\n-4.5022978634739808e+00\n-2.6639939340110534e+01\n-8.9293312825374347e+00\n-1.0586088115606724e+01\n-1.8447341215779257e+01\n3.1170063523115945e+00\n-8.0615057120643456e+00\n-2.1630302526013661e+01\n1.4147931816436376e+01\n2.6653265393693005e+01\n-5.2415924128504550e+01\n1.0619583776744900e+01\n2.5424366254186825e+01\n-5.1599324893386317e+01\n1.0441719735964318e+01\n2.5087927833966244e+01\n-5.0887183130873368e+01\n7.7302632631854271e+00\n2.3681307148671600e+01\n-4.9796320830283570e+01\n9.7292641011155894e+00\n2.4651405766848441e+01\n-5.1037337190697350e+01\n9.5213879236713250e+00\n2.4309060699701419e+01\n-5.0145903361734476e+01\n1.0123660361636064e+01\n2.4407019655373894e+01\n-5.0249153952948696e+01\n-1.2336771447443921e+01\n1.3839478715712600e+01\n-3.8023227759745460e+01\n5.7397731276904533e+00\n2.2391661077985837e+01\n-4.8189328623560179e+01\n5.7823021482851953e+00\n2.2415505721713068e+01\n-4.8286980853709693e+01\n6.1171956352013561e+00\n2.2527320936322905e+01\n-4.8516296054883490e+01\n6.6682874194264885e+00\n2.2760685349052263e+01\n-4.8829590445696340e+01\n7.9245344463983249e+00\n2.4404200678764226e+01\n-5.2254341626593749e+01\n9.2396934206883508e+00\n2.3936530292519180e+01\n-5.0390910914860932e+01\n8.8393081081170894e+00\n2.3454899250318888e+01\n-5.0230386852481530e+01\n1.6602753918942025e+01\n2.6697589590529844e+01\n-5.4024231891160667e+01\n1.6224407703011575e+01\n2.6543459058356742e+01\n-5.3767709860238860e+01\n1.2901220736915374e+01\n2.4687140386738502e+01\n-5.2823702408184793e+01\n1.2910429901685147e+01\n2.4500304829745364e+01\n-5.3318181525610441e+01\n1.6984346970295547e+01\n2.6485387769511060e+01\n-5.6526434508443359e+01\n-2.4702638995931167e+01\n4.9069412003392756e+00\n-2.6066324579587846e+01\n-1.3369345925520740e+01\n1.2359304634790439e+01\n-4.0777628410453708e+01\n-1.5497536600837842e+01\n1.1494937097220893e+01\n-4.0242562870457647e+01\n-3.7449129821128717e+00\n1.6101076632136621e+01\n-4.6391018602958596e+01\n1.2662142408276344e+01\n2.3290965523631890e+01\n-5.6580177629446489e+01\n-1.4410474596192419e+01\n1.0191735163224266e+01\n-4.2388655978730640e+01\n-3.7494264462327243e+00\n1.4615520234670509e+01\n-4.8676155689326748e+01\n9.9325741065815283e+00\n2.0393724016077112e+01\n-5.5590442975472584e+01\n9.9325741065815283e+00\n2.0393724016077112e+01\n-5.5590442975472584e+01\n1.0436485214773022e+01\n2.0293004335422211e+01\n-5.5898947269293359e+01\n4.8466169227612248e+00\n1.7971258523494171e+01\n-5.4204559968466683e+01\n-3.2035191797250761e+01\n5.5100899290190792e+00\n-4.2350357016481155e+01\n5.7183038361333720e+00\n1.7955272448967325e+01\n-5.4091578902191046e+01\n5.7220731591177829e+00\n1.8042072878799011e+01\n-5.4179864881592863e+01\n1.0008889797485628e+01\n1.9776282583367166e+01\n-5.6652232505115506e+01\n1.1044350903596261e+01\n2.1273666928879528e+01\n-6.0576258880604556e+01\n1.0404390195407094e+01\n1.9936765970972790e+01\n-5.6971173453657663e+01\n-3.1195681417078148e+01\n5.1646672817231174e+00\n-4.1456103823679186e+01\n4.6828602000285420e+00\n1.7232108790337758e+01\n-5.3557657937560641e+01\n-3.2136881302911945e+01\n4.5220250674320308e+00\n-4.1020585782716374e+01\n4.5387825845487324e+00\n1.7071918225917763e+01\n-5.4382919488925140e+01\n4.4333397218578403e+00\n1.6949407560944085e+01\n-5.3910022743332455e+01\n9.5866557196398219e+00\n1.8892181189116044e+01\n-5.6835701226398548e+01\n-1.8886423638851073e+00\n1.1141472922390932e+01\n-4.7784503833486646e+01\n-1.8954233044568230e+01\n4.7381572930689124e+00\n-3.8762509652082890e+01\n7.5588431192360668e+00\n1.4461848134526068e+01\n-5.3497430851337249e+01\n6.7454417325268130e+00\n1.3753339580558089e+01\n-5.0959060279186730e+01\n6.8266079534149435e+00\n1.3671591808741981e+01\n-5.0908135578654615e+01\n-1.8159716928999757e+01\n3.1488079800288786e+00\n-3.7727945791688981e+01\n-1.2850540156666398e+01\n4.8929940126066489e+00\n-3.8833203770365593e+01\n-1.9724672155918867e+01\n1.7552220633331763e+00\n-3.5097455259571291e+01\n-1.9724672155918867e+01\n1.7552220633331763e+00\n-3.5097455259571291e+01\n3.5835411084760387e+00\n1.0237849979568157e+01\n-4.5946898547918522e+01\n3.1681126072299497e+00\n1.0335962211751342e+01\n-4.7491915836358444e+01\n-1.8262274761451231e+01\n1.9553444571529350e+00\n-3.5860241413450716e+01\n2.4745272341177404e+00\n9.1089103994126646e+00\n-4.5140838383293897e+01\n2.9165001731449620e+00\n9.3102054827542471e+00\n-4.5567285144708300e+01\n1.3263248318665180e+01\n1.0297300537151360e+01\n-3.7576047837264362e+01\n3.0912561326165506e+00\n8.5610670637973740e+00\n-4.5089733285451402e+01\n3.0127693784625404e+00\n8.6574823513308239e+00\n-4.4671778238421403e+01\n3.9800360109792376e+00\n8.7511769272980846e+00\n-4.5126095919966872e+01\n2.8886554609197881e+00\n8.1779423099075679e+00\n-4.3903226610486222e+01\n1.4524000447612314e+01\n1.1520356542571584e+01\n-4.5760017230105369e+01\n8.9244746650179962e+00\n9.6842795464014504e+00\n-4.6048036397491714e+01\n7.8040655431441257e+00\n9.1416182147059537e+00\n-4.4998819897385104e+01\n-7.7546106571929814e+00\n2.7049859819690756e+00\n-3.6205064650529913e+01\n1.9578799937680774e-01\n3.0272113209613019e+00\n-2.2160889730655523e+01\n8.7379003746749628e+00\n8.1252180205962965e+00\n-4.3956403990263723e+01\n-1.4978136003179223e+01\n-1.2314951673791322e-01\n-3.2387612340381729e+01\n-7.9394803120450037e+00\n1.6020958190663244e+00\n-3.4603822100177872e+01\n-1.2906216488686677e+00\n2.1448690013900156e+00\n-2.2829847042540923e+01\n9.3303977662327444e+00\n5.7424492927604236e+00\n-4.0837326167504692e+01\n9.4056240075456232e-01\n1.6710022085510425e+00\n-2.0718499783863688e+01\n9.4633865302672648e-01\n1.7200622826824463e+00\n-2.1133380990867590e+01\n4.1884287603931298e+00\n2.4555249607702416e+00\n-2.2214932914663262e+01\n1.5568043002028316e+00\n1.6841218106898799e+00\n-2.1163099023137171e+01\n2.2104367617876663e+00\n1.5807110597525995e+00\n-2.0640063804919315e+01\n-8.2484005926909454e+00\n-1.6238950409432291e+00\n-3.0186053714948560e+01\n3.0896987778272145e+00\n1.3924686053823367e+00\n-2.0856591154802150e+01\n-7.9815522408027171e+00\n-1.9470889185955977e+00\n-2.9629299505559690e+01\n-7.4765693418978652e+00\n-2.5017861372399803e+00\n-2.9107308230258937e+01\n3.7216108640591479e+00\n8.1001684813277508e-01\n-2.1029807888856752e+01\n-8.3610300952489940e+00\n-3.0615993601339531e+00\n-2.8475077289269247e+01\n-7.8265963346675118e+00\n-2.9917366500967173e+00\n-2.8530886277717382e+01\n-9.7943222795568374e+00\n-4.0809933045538669e+00\n-2.5109582484296126e+01\n-1.6524120363946555e+01\n-6.3608825340269624e+00\n-2.5098773972210292e+01\n-9.2247400095721943e+00\n-4.3846958549912385e+00\n-2.6187044462972295e+01\n-2.2720141046139478e-01\n-1.2400869213565171e+00\n-2.1016687060599082e+01\n-1.1634826229151795e+01\n-5.0596957778190452e+00\n-2.3239058988529777e+01\n1.3499232651441972e+01\n2.1066147552834384e+00\n-3.0882819207271780e+01\n1.3071434399152859e+00\n-1.0434777508353019e+00\n-2.1117574769608101e+01\n3.0787152838385290e+00\n-5.4849319340109781e-01\n-2.0552245758982078e+01\n7.5227756428855042e+00\n4.6038468234733376e-01\n-2.4561822803414245e+01\n-1.1501540128864566e+01\n-5.4361272292041320e+00\n-2.2759399859703688e+01\n3.2487372641479921e+00\n-6.5099619515024787e-01\n-2.0689238012698851e+01\n-2.7574305139047345e-01\n-1.9249430928377074e+00\n-2.0724081164810997e+01\n7.2173212577479591e+00\n8.5439657533516372e-02\n-2.5586987264497903e+01\n1.3185215331217339e+00\n-1.6281826357782012e+00\n-2.0212575704716606e+01\n2.5820475952397413e+00\n-1.3235474529935389e+00\n-2.0660521803721160e+01\n4.6957022480530117e+00\n-8.2505583994821663e-01\n-2.1500730128435190e+01\n-1.0429280395039532e+01\n-5.8636607276377237e+00\n-2.0951366703943314e+01\n-9.1746831149055534e+00\n-6.2212054040552713e+00\n-2.1595828442237540e+01\n3.9398393198910631e+00\n-1.8892025595097854e+00\n-2.0815078377112965e+01\n2.4325135705891934e+00\n-2.3934432407912278e+00\n-2.0364951138498956e+01\n4.4163557508093582e-01\n-3.0067593817202316e+00\n-1.9997264755583554e+01\n1.6965562211080443e+00\n-2.7545368272568509e+00\n-1.9845307873682941e+01\n1.4277844994117691e+01\n-9.3425913770753344e-01\n-3.1420861329208680e+01\n-1.3461649096688294e+01\n-8.7509828521665582e+00\n-2.1594244992654961e+01\n1.4340131678395130e+01\n-9.3754244232602191e-01\n-3.0688269981724730e+01\n1.4154116542978100e+01\n-9.3409117296635424e-01\n-3.0395336622769339e+01\n-8.3197726332868918e+00\n-7.0590223637809721e+00\n-2.2027537659780599e+01\n-5.2820601879483728e+00\n-6.4311572653149032e+00\n-2.3840101300097629e+01\n1.4836487649009669e+01\n-1.0913798127449275e+00\n-3.2206899224275261e+01\n-5.1587039268572328e+00\n-6.4586395381132569e+00\n-2.3886665461710550e+01\n-6.8113439633693735e+00\n-6.8912919648462392e+00\n-2.2661039933114179e+01\n-4.8765427337414566e+00\n-6.4989931940613763e+00\n-2.3678542204077964e+01\n1.4667291186316872e+01\n-1.7510768204744536e+00\n-3.0165879924157796e+01\n4.4108784140971320e+00\n-3.3514484448205959e+00\n-2.1242326386772177e+01\n6.6391404457782901e+00\n-3.3586059887873407e+00\n-2.4089517942682765e+01\n-1.1985490618032184e+01\n-9.1634302598124204e+00\n-2.0803325712814178e+01\n-1.2763119475722171e+01\n-9.4221241235977775e+00\n-2.0550013297009329e+01\n-1.2319204870111436e+01\n-9.2763568013825335e+00\n-2.0725869769440095e+01\n-1.1400732461872531e+01\n-9.0916107183254908e+00\n-2.0723469379021406e+01\n6.4939303833972897e+00\n-3.6091512089672859e+00\n-2.4055658602973683e+01\n3.6848970430547472e+00\n-4.6356990332859773e+00\n-2.2063481065647693e+01\n-1.1517069618844269e+01\n-9.9556535575856646e+00\n-1.9775732472007185e+01\n-6.4064499551211984e+00\n-8.4380659949300068e+00\n-2.0771239602168293e+01\n-3.9240488720891076e+00\n-7.8305812262633268e+00\n-2.1921549212833941e+01\n-1.1393757167155496e+01\n-1.0510812164079288e+01\n-1.9110852134233500e+01\n-3.1761958230961196e+00\n-8.2060034552357646e+00\n-2.1381766320240530e+01\n-5.0029913636963022e+00\n-8.9899759604483815e+00\n-2.0235617771581765e+01\n1.3284096094287028e+01\n-4.6733820184252490e+00\n-2.6728096012626146e+01\n-4.0948640320936889e+00\n-8.8390411846261863e+00\n-2.0436581409045871e+01\n9.0571457231252079e+00\n-5.9279480221431582e+00\n-2.4692754176887910e+01\n1.0356971894762825e+00\n-8.2269063544766201e+00\n-2.1211713104888169e+01\n2.2508555017161941e-01\n1.9706400942720119e+01\n-4.2995175200395103e+01\n1.3279031861209866e+01\n2.6198465286504774e+01\n-5.1452100559245999e+01\n1.5720752594564415e+01\n2.7302195810094499e+01\n-5.3277148068853471e+01\n7.7797502728588412e+00\n2.3816184389285745e+01\n-4.9284141312569417e+01\n5.7197020827985279e+00\n2.2563982140721606e+01\n-4.8021092148879923e+01\n5.7044647800355044e+00\n2.2572137044729960e+01\n-4.8078276541804719e+01\n5.7470481875911554e+00\n2.2545271359221559e+01\n-4.7981791088503712e+01\n8.5096546119915732e+00\n2.3805997471281177e+01\n-5.0397528312168525e+01\n7.9608399344849303e+00\n2.3795171773711385e+01\n-5.0771989190097422e+01\n8.3971863879983673e+00\n2.3079116444133952e+01\n-5.0420701632648324e+01\n8.1020716964951287e+00\n2.2520720811855462e+01\n-4.8980211486099535e+01\n-1.3704547551230426e+01\n1.2722924424697583e+01\n-3.9728482237243348e+01\n8.2464831065179958e+00\n2.2286722085844190e+01\n-5.0594484312893442e+01\n6.0550196422152636e-01\n1.8441663639011111e+01\n-4.7819999147216848e+01\n-2.4466275425293876e+01\n4.6722227500456270e+00\n-2.6107775210625690e+01\n-1.0054593126420503e+01\n1.3084396700776161e+01\n-4.3475390563467649e+01\n1.0361214634840346e+01\n2.1152728403662145e+01\n-5.5155688697585241e+01\n4.2396247810915373e+00\n1.6614857171096730e+01\n-5.4057613890805030e+01\n4.7804982200815633e+00\n1.6933219566725068e+01\n-5.4559265083008093e+01\n1.3413195719366275e+01\n2.0171562546583711e+01\n-5.8281969126855678e+01\n-2.9383641322761530e+01\n3.5595730940894783e+00\n-3.9342298839084592e+01\n-2.9616522515062147e+01\n3.4304603081580907e+00\n-3.9054717822691487e+01\n-4.8105755350253308e+00\n1.1639314362458350e+01\n-4.8299243545837271e+01\n5.6205841215484380e+00\n1.3743710129757307e+01\n-5.0869594349417781e+01\n6.8260194637737541e+00\n1.4009156507043237e+01\n-5.1147551917593617e+01\n4.4766627161685859e+00\n1.2876123877179781e+01\n-4.9664459353404922e+01\n-9.6453481377722667e+00\n7.2624723807819089e+00\n-4.2532829685196781e+01\n6.7704468085761009e+00\n1.3307314553361199e+01\n-5.0360866175322322e+01\n7.3614694814896078e+00\n1.3507311660361578e+01\n-5.0699445875669298e+01\n7.2948522985726214e+00\n1.3508228301956935e+01\n-5.0541630607345446e+01\n-9.1957405644429144e+00\n6.6595780313453563e+00\n-4.0825771749057196e+01\n-1.2581398179634924e+01\n5.0502826123550149e+00\n-3.9476538084098728e+01\n3.7349026192247186e+00\n1.1049963403566236e+01\n-4.6992244227802495e+01\n4.0236276455179238e+00\n1.0699692077480783e+01\n-4.6492910484663078e+01\n-1.4621024598908269e+01\n1.1852124231312364e+00\n-3.0431619612870847e+01\n7.9234555619570184e+00\n9.5128706575134689e+00\n-4.5442051693940790e+01\n-9.1491291481150672e+00\n2.7855635786450277e+00\n-3.6045987732483539e+01\n-2.0551666317475901e+00\n3.0655445630643987e+00\n-2.6159630636439704e+01\n-3.1150413721049302e+00\n2.9280431735788595e+00\n-2.7573049642383697e+01\n9.2286951466513276e+00\n7.3529162553958614e+00\n-4.2468506956610497e+01\n-5.0010159755573276e-02\n1.6668336963592043e+00\n-2.1217015370471767e+01\n3.8222489618306038e-01\n1.8703312734507485e+00\n-2.1118841500543553e+01\n-2.0180167600377719e-01\n1.2811861343742479e+00\n-2.1107108033133354e+01\n3.2867906797996018e+00\n2.1757190523164840e+00\n-2.1313609674780828e+01\n1.2673896939973273e-01\n8.3290988044420844e-01\n-2.0698077939567877e+01\n8.4577827937185796e-02\n8.4668517670565835e-01\n-2.0781318773175080e+01\n2.4923092804130706e+00\n1.4109593696349845e+00\n-2.0541968949109791e+01\n-9.3577132265715210e+00\n-2.3727388275743722e+00\n-2.9960051402506451e+01\n1.1811988613569082e+00\n4.6089361391919287e-01\n-2.0360048548148118e+01\n4.2059772382451621e+00\n1.2605663998747678e+00\n-2.1653655403192953e+01\n4.0708905177017218e-01\n-3.4970169402326867e-01\n-2.0550116531254883e+01\n2.3790668223802989e+00\n2.5293882960265618e-01\n-2.0293050403711376e+01\n4.7874375258290819e-01\n-9.1568381039155133e-01\n-2.0737164782649746e+01\n3.2651949831052773e+00\n-1.1223234592439689e-01\n-2.0787221068434473e+01\n-1.3268947638747216e+01\n-5.6175705975078705e+00\n-2.5208486682266376e+01\n-1.1511440840497684e+01\n-5.2773932858492598e+00\n-2.3071919296208659e+01\n-9.6963727558290245e+00\n-5.0546394637639320e+00\n-2.3325191069949465e+01\n-1.0918690626232866e+01\n-5.4355846718633130e+00\n-2.3058053077291124e+01\n2.1486088834067512e+00\n-1.2306321734243240e+00\n-2.0600674016745028e+01\n2.1583537749583588e+00\n-1.3620081174027161e+00\n-2.0576445226215267e+01\n4.9367568011650649e+00\n-7.3044596522240479e-01\n-2.1583169912175389e+01\n4.8058298347818340e+00\n-9.7398609794473523e-01\n-2.1299562762607561e+01\n-1.0749576429775951e+01\n-6.1999544988781743e+00\n-2.2008474736844672e+01\n-1.0163988535302495e+01\n-6.1731029240000277e+00\n-2.0335609975650513e+01\n4.8742985900547033e+00\n-1.3992521159064553e+00\n-2.1352665599167363e+01\n-6.7596782261222668e+00\n-5.9126233628589580e+00\n-2.4505931938370694e+01\n-6.7518552390252191e+00\n-5.9151258783961467e+00\n-2.4482421017348202e+01\n-6.3743050865607485e+00\n-5.7797275283688849e+00\n-2.4629955361323223e+01\n-9.9402940365526948e+00\n-6.6382391287224252e+00\n-2.1313630030339915e+01\n-8.5431441396642498e+00\n-6.2499914877924221e+00\n-2.1727647312489463e+01\n-6.7918277187567986e+00\n-6.0482475953387729e+00\n-2.4286526856576515e+01\n2.3331164278465626e+00\n-2.4943920397807875e+00\n-2.0202994414432887e+01\n-8.5655755724422153e+00\n-6.3764781349966153e+00\n-2.1451184296448567e+01\n1.8519820728914465e+00\n-2.8517766620407650e+00\n-1.9720165819753117e+01\n-1.2586138873005076e+01\n-8.3697231539896215e+00\n-2.1869289522845413e+01\n-7.8105172162543610e+00\n-6.8177579319734978e+00\n-2.1254462938982236e+01\n-7.9926365623295412e+00\n-6.8912236500636315e+00\n-2.0753023706052925e+01\n-7.9953917860913135e+00\n-6.9135034542351592e+00\n-2.0802649358156597e+01\n-5.2411154942655109e+00\n-6.5762078486563551e+00\n-2.3888642450133304e+01\n-5.1646546801028252e+00\n-6.5140820141677418e+00\n-2.3565528111566870e+01\n-5.0134501520431369e+00\n-6.6056781347835170e+00\n-2.3617229609893549e+01\n2.3821570090579636e+00\n-3.5236956741020937e+00\n-2.0279198286523034e+01\n-5.1559629302560026e+00\n-6.8545890872765591e+00\n-2.3346509334048690e+01\n1.2908765219726012e+01\n-2.1838473625348076e+00\n-2.9771565578901043e+01\n-6.8415509192609552e+00\n-7.3063802878006809e+00\n-2.2331536045136684e+01\n-6.7279018121874570e+00\n-7.4080705180900521e+00\n-2.2351091617784270e+01\n-1.0334676403466305e+00\n-5.7464684603976171e+00\n-2.2257370594859399e+01\n1.3621445845606074e+01\n-2.8597346123534990e+00\n-2.9572884771963619e+01\n5.7462880731608061e+00\n-4.0591178709367162e+00\n-2.3203891531638021e+01\n1.1364188035556037e+01\n-5.4711770092808578e+00\n-2.5077462070711341e+01\n8.9387447507838012e+00\n2.3941231332918406e+01\n-4.9705706169770757e+01\n1.2649030513569620e+01\n2.4990480055573570e+01\n-5.7564742219378005e+01\n-7.2549461689138024e+00\n1.4283544994734150e+01\n-4.4017271864141236e+01\n1.0217580891014391e+01\n2.0494217614291511e+01\n-5.5427465703680042e+01\n1.4683075435380257e+01\n2.1811701431025458e+01\n-5.8025949076767716e+01\n-2.0528962564994011e+01\n1.2684753610099753e+00\n-3.4317956652294924e+01\n2.9338723006315268e+00\n3.8777174502348104e+00\n-2.3773300188111296e+01\n-9.6028276324629069e-02\n2.6495822464245573e+00\n-2.2040485424345864e+01\n1.1666544301883254e+01\n7.6520648409434093e+00\n-4.3994449003314138e+01\n1.2357234501004969e+01\n6.1121381592359851e+00\n-3.0096686146495820e+01\n1.6670938857943815e-01\n1.5130124924082629e+00\n-2.0969797841627607e+01\n-2.1543819811192075e-01\n-2.9513387994757045e-01\n-2.0836915657718698e+01\n1.2952068225275314e+01\n3.4375940396580842e+00\n-2.9886447034235360e+01\n2.7369575819937362e+00\n3.4456940297779132e-01\n-2.0511715115056866e+01\n-1.3706366373665860e+01\n-5.3497589667345391e+00\n-2.5376765985900800e+01\n-1.1728166577677236e-01\n-1.0319375516999658e+00\n-2.0967806861022012e+01\n-1.0664116716587481e-01\n-1.0424322000554023e+00\n-2.0847083838649436e+01\n-1.1372293985089772e+01\n-5.3989687021727377e+00\n-2.3394784105255933e+01\n-5.8142150589910528e+00\n-4.0064131889531431e+00\n-2.6217142977821972e+01\n-1.1890305001076105e+00\n-2.2360590908795714e+00\n-2.0453558583916873e+01\n-1.2536540439805540e+01\n-6.3759143150848212e+00\n-2.4048271449138262e+01\n5.0912526328885122e+00\n-8.0077821578968145e-01\n-2.1637649594775013e+01\n2.5958928362156679e+00\n-1.6531187704914789e+00\n-2.0270557915936035e+01\n-1.1935119540367687e+01\n-6.7344167434002236e+00\n-2.2814946988949643e+01\n-6.5223515880532608e+00\n-5.9104723692883248e+00\n-2.4502320610525828e+01\n1.9480966151340826e+00\n-2.7038310475720442e+00\n-1.9929181194247036e+01\n-7.7707761386884489e+00\n-6.6031875070051420e+00\n-2.1787617784894422e+01\n-7.0752671824877993e+00\n-6.6767914564648780e+00\n-2.3589339992320649e+01\n-6.7574282119177465e+00\n-6.5920483324945289e+00\n-2.2271416752658919e+01\n-5.6117708686087733e+00\n-6.7619638390830072e+00\n-2.3458914875573651e+01\n-5.5688298551402378e+00\n-6.7546018721725440e+00\n-2.3310908330354774e+01\n2.1948162064982077e+00\n-3.5095949606045460e+00\n-2.0323701867991065e+01\n1.3183472214778586e+01\n-2.3921706388002493e+00\n-2.9316326217410463e+01\n-4.3336753563029022e+00\n-6.9068087912829599e+00\n-2.3267561513593431e+01\n2.0430277586060170e+00\n-4.2404449118157537e+00\n-2.1170009946258507e+01\n1.0358858171807530e+01\n-3.6131348835833950e+00\n-2.7892557988000782e+01\n-6.8025712349099665e+00\n-9.1363850939045221e+00\n-1.9916620245886779e+01\n1.3110168500784269e+01\n-4.3804797963861581e+00\n-2.6878850779368207e+01\n1.3383663796882423e+01\n-4.9184494058272712e+00\n-2.7011977574903479e+01\n1.0921872816734831e+01\n-6.4449809359005918e+00\n-2.3804507833000091e+01\n1.3465107544077918e+01\n2.1628573968703495e+01\n-5.7128941987481525e+01\n-1.3251910555000681e+01\n5.1780883881839861e+00\n-3.7989409553037234e+01\n9.3733185236286918e+00\n9.9151115922375634e+00\n-4.7352973404517897e+01\n-3.1845976381845958e-01\n3.6464303787051039e-02\n-2.0939360546190770e+01\n2.3469643877128075e+00\n6.3939410436557487e-01\n-2.0408824376521864e+01\n1.6928084498557125e+00\n-3.4507340328743019e-01\n-2.0148179033496859e+01\n1.7266726164375947e+00\n-3.0583418297921755e-01\n-2.1080646022596881e+01\n-1.1500591398420644e+01\n-5.1906166154005575e+00\n-2.3496038591944572e+01\n-1.0504849374316750e+01\n-5.7758224404025995e+00\n-2.1265945234767702e+01\n-2.5377772427819840e+00\n-3.5726646987058110e+00\n-2.3498604445198016e+01\n-9.5254330487554775e+00\n-5.8899112476999838e+00\n-2.1621795078196531e+01\n2.6856258269043773e+00\n-1.8288016643761409e+00\n-2.0243767153620681e+01\n-1.3839581245284862e+01\n-7.9286328454476722e+00\n-2.2700945525663592e+01\n1.3131419717311235e+00\n-2.8624748422933530e+00\n-1.9647297071141629e+01\n-8.6496406000505814e+00\n-6.5497851619294423e+00\n-2.1354713638188738e+01\n-2.4548731071830532e+00\n-4.7848747318409597e+00\n-2.3466697610720331e+01\n2.9396875795490391e+00\n-2.8210738792339125e+00\n-1.9745011410733515e+01\n5.3826299984266592e+00\n-3.6034717041875663e+00\n-2.2280137881879359e+01\n4.9224315132390677e+00\n-4.6485269481804892e+00\n-2.2724390121053158e+01\n1.3493049748716995e+01\n-4.6873904539401927e+00\n-2.7330647299091126e+01\n7.2606427473118309e+00\n2.2199658350461270e+01\n-5.2245847741729115e+01\n-1.6643702310888977e+00\n1.6589873326351064e+01\n-5.0117274746659007e+01\n5.2292627758888202e+00\n1.7693842169702190e+01\n-5.3701361341518357e+01\n5.1590920763986805e+00\n1.7585503617602782e+01\n-5.3380519213572036e+01\n1.4804040901401873e+01\n2.2520999976694778e+01\n-6.2557658367334547e+01\n2.5938584817714955e-01\n-8.5151446464983294e-02\n-2.0636439383415784e+01\n-1.1449536024708667e+01\n-6.1085322941050846e+00\n-2.2058676791976449e+01\n3.2517380656040098e+00\n-2.2862387648293714e+00\n-2.0412179073567785e+01\n4.7501773833526464e+00\n-2.4864209949554152e+00\n-2.0567651540866784e+01\n-1.2229757796457152e+01\n-9.2350497778191052e+00\n-2.0790092208770524e+01\n-1.2170646084890958e+01\n-9.5614387901411515e+00\n-2.0191353407622447e+01\n-6.9787891525876136e+00\n-8.8964007844821893e+00\n-2.0335940353745947e+01\n-6.9787891525876136e+00\n-8.8964007844821893e+00\n-2.0335940353745947e+01\n1.3877944908632282e+01\n-4.4683643218144882e+00\n-2.8130521105585530e+01\n4.8394706185420846e+00\n1.9756049766086221e+01\n-5.0666773141077520e+01\n-1.2418215037557600e+01\n-8.5476612140522885e+00\n-2.1533364351088107e+01\n-1.1787238487548400e+01\n-9.6781844835520268e+00\n-2.0167333231355496e+01\n4.7704549381498462e-01\n-5.6203134677908571e+00\n-2.2241549733832819e+01\n1.1518478407126906e+01\n2.3248110168099313e+01\n-5.3905283751790108e+01\n-1.1118286480077359e+01\n1.2058373311468300e+01\n-4.3127438106262311e+01\n1.2798919008559967e+01\n2.3471459643034137e+01\n-5.3938868502215776e+01\n1.8222850661440153e+00\n-1.4354574187799847e+00\n-2.0507234364917114e+01\n2.8715697481526283e+00\n-1.9909530995384823e+00\n-2.0670855482971827e+01\n6.7771263608660846e+00\n1.8940877889622215e+01\n-5.3979534423018436e+01\n4.4113436725808217e+00\n-1.5532091660850447e+00\n-2.1087813579501859e+01\n-7.7421074056308843e+00\n1.5518353610534472e+01\n-3.9774788935941260e+01\n-8.3758589995040733e+00\n1.2994434204577708e+01\n-4.4947983380165773e+01\n-2.4496709588182930e+00\n2.6430989305710035e+01\n-3.9849107382147324e+01\n8.7116712997926449e+00\n2.9959761561853121e+01\n-4.5023281606577427e+01\n7.8162858840619052e+00\n2.8549736657026457e+01\n-4.3373690728800170e+01\n1.4833155068645102e+01\n3.1575006221893815e+01\n-4.7850149039691075e+01\n1.0010977643174558e+01\n2.9319028344060378e+01\n-4.4883166001134079e+01\n1.8530219338726255e+00\n2.6103851722430740e+01\n-4.0662365239079243e+01\n6.6964033297062175e-01\n2.6032537635416112e+01\n-4.0647992308363513e+01\n9.5621435731942341e+00\n2.8700090663793663e+01\n-4.4359251391539750e+01\n1.5001605884421181e+01\n3.0873217767497358e+01\n-4.7979897971430546e+01\n9.9332670772736940e+00\n2.8755607681198200e+01\n-4.5399001462108394e+01\n1.8997740153313045e+00\n2.6497716693071279e+01\n-4.1933854168879279e+01\n9.3683909225287927e+00\n2.7334852784189181e+01\n-4.3998666540224107e+01\n4.8662294407840543e+00\n2.7160510617720554e+01\n-4.3851481428453695e+01\n-1.0468792107307137e+00\n2.4475204091568916e+01\n-3.9872186771426165e+01\n9.5460978554862432e+00\n2.8690425204609369e+01\n-4.6297783603071856e+01\n9.5460978554862432e+00\n2.8690425204609369e+01\n-4.6297783603071856e+01\n-2.5448055393055919e+00\n2.4001821836521010e+01\n-3.9377288808416225e+01\n5.4302202304924760e+00\n2.7112185049774141e+01\n-4.3950609450941378e+01\n4.7719782639915334e+00\n2.6341370186292892e+01\n-4.2918422394938176e+01\n4.6038353638404104e+00\n2.6708355371568086e+01\n-4.3428881358668967e+01\n4.8357936406921009e+00\n2.7094075487975918e+01\n-4.3972422125789755e+01\n1.1917884919686525e+01\n1.5399750948343765e+01\n-2.9063586223632626e+01\n-2.3542290281078704e+00\n2.3990904155584136e+01\n-3.9479068053728668e+01\n1.8430618419000986e+01\n3.1805132349550963e+01\n-5.0914809793045826e+01\n-2.4859984068738555e-01\n2.5068769318183147e+01\n-4.1109645233409907e+01\n3.0030638493693990e-01\n2.5414346018793825e+01\n-4.1658372812265711e+01\n1.8063274798351975e-01\n2.5394576574022192e+01\n-4.1729875087709139e+01\n1.1598401119595572e+01\n1.6043730389786255e+01\n-2.9987411424093619e+01\n3.0405495906241433e+00\n2.5587442768591067e+01\n-4.2120392558348037e+01\n-7.1565472878366947e+00\n2.0331483549718609e+01\n-3.4548543429971609e+01\n-4.2526304378869000e+00\n2.3138243366964161e+01\n-3.8246080304345782e+01\n1.2418085728478878e+00\n2.5001640324219093e+01\n-4.1312788078356675e+01\n-6.5299675573069693e-01\n2.4890889119172506e+01\n-4.1119135522024784e+01\n6.9497212620946724e+00\n2.7181048879421603e+01\n-4.4761123389692521e+01\n7.3560261859594984e+00\n2.7223470131317239e+01\n-4.4680415630534682e+01\n1.5036676639627693e+01\n1.5953230888440588e+01\n-3.0663595087352608e+01\n4.6551533966301548e+00\n2.6144378233712143e+01\n-4.3116120556169179e+01\n3.1511911932574979e+00\n2.6447574226169280e+01\n-4.3592270952928736e+01\n2.9403015979452785e+00\n2.6340476532734257e+01\n-4.3459286659019142e+01\n1.3574776002644109e+01\n1.6759396130905774e+01\n-3.1389568033320312e+01\n1.3493251911619586e+01\n1.6489506648000056e+01\n-3.1003300822912543e+01\n-8.5409034077517418e+00\n2.1431469606123013e+01\n-3.6042329131668943e+01\n1.3255215570689380e+01\n1.5279514254220693e+01\n-2.9380088313366677e+01\n-7.0748260745556024e+00\n2.2483231228684016e+01\n-3.7423438027108354e+01\n6.2807014737089508e+00\n2.7251085793582273e+01\n-4.4934960010891807e+01\n1.2944868826406697e+01\n1.7462903679543079e+01\n-3.2433216604212255e+01\n6.4625354458832662e+00\n2.6540459050038915e+01\n-4.4005875786740575e+01\n6.3332657525844782e+00\n2.6123250461550690e+01\n-4.3241319284089393e+01\n6.7870988077794054e+00\n2.6586566109694001e+01\n-4.4127471512029274e+01\n2.5520712799480511e-01\n2.4728759051062745e+01\n-4.1261688245004905e+01\n6.3279146681756631e+00\n2.6850865027172297e+01\n-4.4387354753691071e+01\n1.2870107984902949e+01\n1.6776477274879447e+01\n-3.1636847126658314e+01\n1.3850302145120454e+01\n1.6070962444946073e+01\n-3.0692014592754674e+01\n5.4576959868599211e+00\n2.6448390008100265e+01\n-4.3871550997467423e+01\n1.2349097413594711e+01\n1.6165963899387503e+01\n-3.0783407994998466e+01\n-1.3372971610228885e+00\n2.4225801680427395e+01\n-4.0569969566704373e+01\n-8.3799357930121110e-01\n2.4005755686262955e+01\n-4.0255661439804356e+01\n-9.0533905175448073e+00\n2.1071943520103954e+01\n-3.5776327673652453e+01\n1.2878457511192551e+01\n1.6487915218124854e+01\n-3.1295301570567663e+01\n-9.9785899345775841e-01\n2.3768555745432586e+01\n-3.9972796724880588e+01\n2.2795828289144984e+00\n2.5536584656394080e+01\n-4.2462902523255387e+01\n2.4453859965312263e+00\n2.5255869354561121e+01\n-4.2193570217312548e+01\n1.2866666975974367e+01\n2.9365087541666778e+01\n-4.8508587425400954e+01\n6.4084120761383137e+00\n2.6370680127731337e+01\n-4.4150597824414007e+01\n6.4084120761383137e+00\n2.6370680127731337e+01\n-4.4150597824414007e+01\n-7.3980671055639515e+00\n2.0956674842970727e+01\n-3.5855488743695929e+01\n7.1381436822702584e+00\n2.6791724371003586e+01\n-4.4668055673783321e+01\n1.5478689138520634e+01\n1.5065845752907689e+01\n-3.0077126494782753e+01\n-6.0147357960534658e+00\n2.1606661956354376e+01\n-3.6871388117105361e+01\n2.8006341862116013e+00\n2.5747721052802138e+01\n-4.3153547217337852e+01\n3.1108850178944349e+00\n2.5728054637894420e+01\n-4.2966434085701358e+01\n6.7480664159825698e+00\n2.6235070417143589e+01\n-4.4022849762947239e+01\n6.8030447522130162e+00\n2.6384210927464544e+01\n-4.4328088186385337e+01\n1.2058498565399658e+01\n1.0119600467257021e+01\n-2.3207778779352306e+01\n3.4211385751900614e-01\n2.4603769760617816e+01\n-4.1523936784177423e+01\n2.0170263199962726e+01\n3.1360583074795862e+01\n-5.1960088070180412e+01\n1.3846657701927031e+01\n2.7970856389349716e+01\n-4.7074121980338198e+01\n1.2159023738497481e+01\n1.5831601262340808e+01\n-3.0782603446987824e+01\n9.0418155117852983e+00\n7.6140938144907384e+00\n-1.9531642485117867e+01\n1.4544069627132066e+01\n2.8834574390140933e+01\n-4.8554248189304438e+01\n1.3075689106103987e+01\n1.7373910835774652e+01\n-3.3030837562024765e+01\n4.6822394611857119e+00\n4.5223042392756039e+00\n-1.5084499090334610e+01\n3.4418779406206212e+00\n2.5753761141306509e+01\n-4.3733681014937076e+01\n3.4236970349275260e+00\n2.5821976227560686e+01\n-4.3667070007835044e+01\n3.1714283654189930e+00\n2.5275295803117817e+01\n-4.2878660152120425e+01\n1.2364830356505827e+01\n1.1715274186002498e+01\n-2.5522874605311063e+01\n1.9865336940267926e+00\n2.4973729872097220e+01\n-4.2571337765691617e+01\n6.1249175344763414e+00\n2.6191944813558756e+01\n-4.4520004467679904e+01\n2.5196555287496412e+00\n2.5389991473204280e+01\n-4.3261026475786046e+01\n1.6270017354145672e+00\n2.4562313882816227e+01\n-4.2112218022990831e+01\n8.5967678772755214e+00\n2.8069875066966265e+01\n-4.7604509087611319e+01\n8.8078690428276847e+00\n8.2727144537804680e+00\n-2.0636590487029615e+01\n1.3524188925255352e+01\n1.1356473212252903e+01\n-2.5527822168163034e+01\n5.7893070344246977e+00\n6.1326166153684669e+00\n-1.7524516517785887e+01\n5.0920104966782276e+00\n5.0594292751565497e+00\n-1.6143107026056580e+01\n1.3380328314048102e+01\n1.1586629915999774e+01\n-2.5890688749559796e+01\n-8.3608617948857955e-01\n2.3837913904343665e+01\n-4.1163046462920455e+01\n6.4394022701892624e+00\n2.5827591314316525e+01\n-4.4477318135499189e+01\n1.2504070597558311e+01\n1.6426863142416327e+01\n-3.1981940374547349e+01\n5.4515256844228563e+00\n5.3878781767492860e+00\n-1.6586444433197602e+01\n1.1904095238973500e+01\n1.5450270835492844e+01\n-3.0922945167727683e+01\n1.5437109589886147e+00\n2.3933353040382045e+01\n-4.1793215607806381e+01\n1.1794261764242236e+01\n1.5526386384060439e+01\n-3.1107314352509530e+01\n4.6210330836105227e+00\n4.2038438127467632e+00\n-1.4968432332773220e+01\n6.2604666569504008e+00\n2.5016734067000826e+01\n-4.3807293544921031e+01\n1.2531968842699817e+01\n1.1184913621273770e+01\n-2.5250180454797380e+01\n1.3193505900698488e+01\n1.0627496301022827e+01\n-2.4743201380141024e+01\n1.2799480904813636e+01\n2.7115041875997868e+01\n-4.7168737612111059e+01\n1.1043934921176103e+01\n2.8716352371055400e+01\n-4.9421194826454915e+01\n9.6667548407639412e+00\n2.6985042397069257e+01\n-4.6807640059903996e+01\n-5.9192702448654344e-01\n2.3494493100633051e+01\n-4.1254267037002002e+01\n-1.0955315024959016e+00\n2.3699658621578855e+01\n-4.1455274680379226e+01\n1.8664686239078030e+00\n2.4393890074105887e+01\n-4.2783493277850127e+01\n5.7778876287586769e+00\n2.6448532558723617e+01\n-4.6213977667569040e+01\n-5.0275093499049801e-02\n2.3875417521824332e+01\n-4.2210071008326807e+01\n9.2471119273167801e+00\n9.1718886450949597e+00\n-2.2562148411789401e+01\n-3.2836866370063764e+00\n2.2565222429656437e+01\n-4.0098240683349147e+01\n1.3032700159233434e+01\n1.4970672348819276e+01\n-3.0828411468197469e+01\n1.8604432692892544e+01\n2.9766178456345436e+01\n-5.2258645633587484e+01\n1.3161931537311238e+01\n1.4869374609703673e+01\n-3.0806743798896072e+01\n1.4698378259143382e+01\n1.5402967335431631e+01\n-3.2118228036871322e+01\n1.7637051721913430e+01\n2.9333679043225992e+01\n-5.1519437685661622e+01\n1.3020974746205491e+01\n1.4815448612096084e+01\n-3.0773254865557181e+01\n1.4080388938126946e+01\n2.8322377078262168e+01\n-4.9685583032275936e+01\n1.4054525215978563e+01\n2.8327896650947508e+01\n-4.9645169970668164e+01\n5.1722782771091600e+00\n4.7661882794556494e+00\n-1.6163735158771463e+01\n1.7860230013716180e+01\n2.8973607804132868e+01\n-5.1089665478249294e+01\n7.0200410859172271e+00\n2.5556061978855038e+01\n-4.5644663160137874e+01\n7.3054797346486566e+00\n2.6010254986148546e+01\n-4.6324599921357866e+01\n1.9020006284269865e+01\n3.1229693500929276e+01\n-5.4863982594160383e+01\n1.9020006284269865e+01\n3.1229693500929276e+01\n-5.4863982594160383e+01\n1.4409819279038400e+01\n1.4402702261972509e+01\n-3.0723368189064551e+01\n-1.0035891772281051e+01\n2.3634746425858864e+01\n-4.1010097599294390e+01\n1.8310148506221910e+01\n2.9531801357842269e+01\n-5.2347829907425407e+01\n-8.3535298468503949e-01\n2.2896569760346591e+01\n-4.1374040365845566e+01\n1.1836628541561442e+01\n1.0499343573734702e+01\n-2.5302465025583171e+01\n1.7865139280795901e+01\n2.8872743206471863e+01\n-5.1470204869449134e+01\n1.3210428716483218e+01\n2.6732082775244830e+01\n-4.8143690916403131e+01\n1.1754917439822758e+01\n1.0551766489197576e+01\n-2.5083573758052463e+01\n-9.7908660862286528e-02\n2.3308046121078359e+01\n-4.2268186966993781e+01\n1.4928484855882532e+01\n1.4589933164017610e+01\n-3.1656355003608834e+01\n1.2571111557650569e+01\n1.3229669722586520e+01\n-2.9216037507691858e+01\n2.1580144082259453e-01\n2.3233001935928570e+01\n-4.2390686598943681e+01\n2.1580144082259453e-01\n2.3233001935928570e+01\n-4.2390686598943681e+01\n1.6163983551625588e+01\n2.8116467604611916e+01\n-5.0861033444961635e+01\n-9.2748846221227659e+00\n1.9803721667737694e+01\n-3.6301777168589332e+01\n1.2443742009692091e+01\n2.7057543842213491e+01\n-4.9075397347581237e+01\n1.3203086270586621e+01\n1.3607819757585636e+01\n-3.0297075564151399e+01\n1.7259742821986148e+01\n2.9020804227422282e+01\n-5.2606383214235727e+01\n1.4527063948580952e+00\n2.3331998984264093e+01\n-4.2945018562815974e+01\n1.2826208147341271e+01\n2.7357894381181190e+01\n-4.9843499668581991e+01\n1.6652794715031444e+01\n2.7960340458121866e+01\n-5.0944579716876881e+01\n1.7219229760792249e+01\n2.8573752336888045e+01\n-5.1845416191331708e+01\n-1.0641296195868227e+01\n1.9166809238944456e+01\n-3.5667787142639071e+01\n1.2492558112805497e+01\n1.0573110236717929e+01\n-2.5969316081007449e+01\n2.8735057933295249e-01\n2.2939035784980863e+01\n-4.2538247148301785e+01\n1.1059170170754962e+01\n2.6504740189164231e+01\n-4.8668948057919579e+01\n2.5409070124464122e+01\n3.3100662706934351e+01\n-6.0216749175008026e+01\n1.5372452776501049e+01\n1.3499708145206570e+01\n-3.0834457953446684e+01\n1.3092953901457010e+01\n1.0880483580026818e+01\n-2.6819271258941903e+01\n-8.9151723664817553e+00\n1.9242401906083376e+01\n-3.6235425979503006e+01\n1.4126148779312922e+01\n1.5427208065794140e+01\n-3.3550538663822124e+01\n-4.3298904396373832e+00\n2.1369010207262964e+01\n-3.9971383543050095e+01\n1.0490452089588157e+01\n2.5400845049252204e+01\n-4.7358028857441724e+01\n1.2984568217841838e+01\n2.8008409822791485e+01\n-5.1643710701609137e+01\n1.3192509686263401e+01\n1.4150110200928792e+01\n-3.1255966267151578e+01\n1.5271869705637878e+01\n1.3561085886406062e+01\n-3.1116060451656494e+01\n-1.7840199716790270e+00\n2.1991587513696008e+01\n-4.1306973374003917e+01\n1.1623958319933665e+01\n2.6576521416731119e+01\n-4.9363707631287831e+01\n1.2858286784435089e+00\n2.3231747906658430e+01\n-4.3509182607240078e+01\n1.3351907435687936e+01\n1.0353817511364397e+01\n-2.6401547063165811e+01\n2.8024360432721938e+01\n3.3487525492949537e+01\n-6.1680749063796256e+01\n-5.3854361318100645e+00\n2.0795083350904793e+01\n-3.9142185880574893e+01\n1.2608644194675623e+01\n1.0406964760718381e+01\n-2.6308139065614245e+01\n4.8153990825463886e+00\n2.4035769536282615e+01\n-4.5195678635911307e+01\n1.4743388312008431e+01\n1.4177400783378312e+01\n-3.2236402389142874e+01\n1.4348163953681450e+01\n9.0136179132110730e+00\n-2.4717231825679608e+01\n1.5408612195551237e+00\n2.3305265992529950e+01\n-4.3905777928435924e+01\n1.3550786907040603e+01\n1.5019206504764769e+01\n-3.3206731125801127e+01\n1.4077415075180699e+01\n8.2612273369277336e+00\n-2.3548274898926280e+01\n1.2775783475782587e+01\n2.6328550697358349e+01\n-4.9771482493176237e+01\n4.2046966464597126e+00\n2.3796760694636685e+01\n-4.5063305505559434e+01\n-4.5595535180247078e+00\n2.1017555523314215e+01\n-4.0148883385236353e+01\n-1.7262368765965106e+00\n2.2046796027663067e+01\n-4.2007286126016041e+01\n-1.5463965239895670e+00\n2.2496858859688672e+01\n-4.2754669543389063e+01\n1.3381820395288146e+00\n2.3131720200121702e+01\n-4.4041741617252192e+01\n1.3381820395288146e+00\n2.3131720200121702e+01\n-4.4041741617252192e+01\n1.2676706372247251e+00\n2.3076966603233974e+01\n-4.3808464125410907e+01\n1.2743577294358133e+00\n2.3561052204481861e+01\n-4.4597466222833404e+01\n-1.0271654891477787e+01\n1.8834434806219129e+01\n-3.6280039711200978e+01\n-1.0271654891477787e+01\n1.8834434806219129e+01\n-3.6280039711200978e+01\n-2.1334671071505795e+00\n2.1595182631034330e+01\n-4.1299472965902623e+01\n2.9186683254423734e+01\n3.3050111182215055e+01\n-6.1902526526570099e+01\n-1.7699153504534970e+00\n2.2329553636416438e+01\n-4.2645253565966357e+01\n-1.7699153504534970e+00\n2.2329553636416438e+01\n-4.2645253565966357e+01\n1.3987121210058048e+01\n9.2824558987795491e+00\n-2.5444432201484616e+01\n1.4761000185422235e+01\n8.2479940180338289e+00\n-2.4069539580276146e+01\n-5.6017390826882796e+00\n2.0600917699944258e+01\n-3.9709667046843670e+01\n-5.6189675321621984e+00\n2.0551185049500912e+01\n-3.9463052122793329e+01\n-8.9922205898947971e-01\n2.2563163718872634e+01\n-4.3280564935482516e+01\n1.4869425581630493e+00\n2.2830212547193874e+01\n-4.3862332420605973e+01\n1.7762186656318711e+01\n2.9236678436611395e+01\n-5.5420476722360227e+01\n-2.6491032301268667e+00\n2.1333140513888367e+01\n-4.1090854933537081e+01\n1.0209942912277901e+01\n2.5586892269071672e+01\n-4.9114233221867408e+01\n1.5650649324148530e+01\n2.6948506143107743e+01\n-5.1539108159265631e+01\n-1.0428213007374762e+01\n1.8684320394980535e+01\n-3.6332268730849066e+01\n2.1303131124425185e+01\n3.0347881534903365e+01\n-5.7737149666341274e+01\n8.5525359319259202e+00\n2.4159668841223986e+01\n-4.6985979914824902e+01\n9.7553331512340868e+00\n2.5182229723558041e+01\n-4.8398981599730128e+01\n1.0311910234219836e+01\n2.5853855317843752e+01\n-4.9608742119980391e+01\n1.4626135749540786e+01\n8.3551135708125255e+00\n-2.4407058401804040e+01\n-1.9505299971687922e+00\n2.1615400916247747e+01\n-4.1887793567607943e+01\n9.6352482560502910e+00\n2.5128263750318389e+01\n-4.8524932010668934e+01\n-1.8297032423245323e+00\n2.1762925369172599e+01\n-4.2280415385695484e+01\n-1.8791647754109322e+00\n2.1687587717820033e+01\n-4.2068075645176592e+01\n9.4613543700869442e+00\n2.4704228894813806e+01\n-4.7903716526644537e+01\n1.2240517207343302e+01\n1.2759221830933059e+01\n-3.0366692838084060e+01\n1.3626841556272117e+01\n1.4071979988212552e+01\n-3.2668623072755423e+01\n-6.4355917199127282e+00\n2.0026380979827209e+01\n-3.9190951469804716e+01\n-1.6623533105296899e+00\n2.1488722785947935e+01\n-4.1922027989999656e+01\n1.8299593541436285e-01\n2.2373879979674800e+01\n-4.3715205986880484e+01\n1.0772023295681375e+01\n2.5532180218134691e+01\n-4.9730601014796775e+01\n1.0772023295681375e+01\n2.5532180218134691e+01\n-4.9730601014796775e+01\n9.8942602997671845e+00\n2.4997574865434231e+01\n-4.8827471183236533e+01\n1.2411449116589544e+01\n9.9279955124884953e+00\n-2.6484566811643138e+01\n-2.9246497964211216e+00\n2.1265061217179458e+01\n-4.1778540283023297e+01\n1.1776165770760697e+01\n2.4402041112370746e+01\n-4.8504709752886036e+01\n9.5746794605212528e+00\n2.4688306320820395e+01\n-4.8576399822707224e+01\n1.3672411694889144e+01\n1.5208074935939443e+01\n-3.5185446871247350e+01\n1.4358582872227986e+01\n1.2366737653301819e+01\n-3.0741466947508716e+01\n-7.2766631628661997e+00\n1.9570339018647360e+01\n-3.8936365984982011e+01\n9.8253019367842906e+00\n6.8973217703229688e+00\n-2.1933483784635150e+01\n1.4206996737545818e+01\n1.3923904778767442e+01\n-3.3469106166861906e+01\n-8.1635023934252668e+00\n1.9179937832611309e+01\n-3.8345177955526552e+01\n9.8974978855604228e+00\n2.5083981781066175e+01\n-4.9768291880450612e+01\n-2.0455444712339252e+00\n2.1044528469300310e+01\n-4.2033066885254463e+01\n1.2902751774495346e+01\n1.1201292066799336e+01\n-2.8989105400869910e+01\n1.1837566862100200e+01\n9.4849150429023066e+00\n-2.6196890909679642e+01\n1.2886662943427719e+01\n7.9957145034754529e+00\n-2.4520082778602514e+01\n1.4117846159639425e+01\n8.5188973220991073e+00\n-2.5463115982940778e+01\n1.4117846159639425e+01\n8.5188973220991073e+00\n-2.5463115982940778e+01\n-8.5298458855657415e+00\n1.8921127221492455e+01\n-3.8288267914372142e+01\n-8.5298458855657415e+00\n1.8921127221492455e+01\n-3.8288267914372142e+01\n-8.5346047535010623e+00\n1.7631121361871138e+01\n-3.6148698722812100e+01\n-2.2415188006656086e+00\n2.1494775521167551e+01\n-4.3172594312513134e+01\n7.3421716281449347e+00\n2.3362619301715675e+01\n-4.7198655984487587e+01\n1.1932495299246282e+01\n7.9848486068212843e+00\n-2.4386067961159256e+01\n1.2801589229266453e+01\n8.9050398717061370e+00\n-2.6153164758549540e+01\n1.4774382669194326e+01\n7.5705461594288437e+00\n-2.4429706302596557e+01\n4.8912522833974608e+00\n2.2315192452439089e+01\n-4.5391883649813195e+01\n1.4029127533608339e+00\n2.2170129448565021e+01\n-4.5036359895365003e+01\n1.2071072935262398e+01\n2.3692967505584328e+01\n-4.8681489130425526e+01\n-1.0350877850120616e+01\n1.8065372448436804e+01\n-3.6974010290972977e+01\n-1.0580761378134781e+01\n1.8179394439353565e+01\n-3.7605403769001825e+01\n-8.3728722826671476e+00\n1.8318361660915887e+01\n-3.8159285184876900e+01\n1.2551375264944204e+01\n7.8221714746665700e+00\n-2.4376881899146323e+01\n-9.1002442204234537e+00\n1.8184112711603198e+01\n-3.7420055951080464e+01\n-8.7723234686065510e+00\n1.7274797998608349e+01\n-3.6089983593827029e+01\n-8.7723234686065510e+00\n1.7274797998608349e+01\n-3.6089983593827029e+01\n1.1596704261840337e+01\n1.3492287677228239e+01\n-3.2870646719627757e+01\n1.5587732285597058e+00\n2.1908323527445880e+01\n-4.4802962003772450e+01\n1.4272230771994501e+01\n2.6711262244009308e+01\n-5.4244962933378787e+01\n1.4272230771994501e+01\n2.6711262244009308e+01\n-5.4244962933378787e+01\n2.1470576308195813e+01\n2.9073550587753292e+01\n-5.9012936271124843e+01\n1.6627199749986021e+00\n2.1966059448492508e+01\n-4.5192714542906870e+01\n1.2102904242871327e+01\n7.8338097288702704e+00\n-2.4705099787520236e+01\n-3.7337369755661269e+00\n2.0216040304884281e+01\n-4.1671675246027014e+01\n-4.1887546979815315e+00\n2.0265415025078383e+01\n-4.2177245994098186e+01\n-7.8357710696327461e+00\n1.8557017912449481e+01\n-3.8835333129683661e+01\n-7.4106423111122828e+00\n1.8542841866113271e+01\n-3.9042786014782209e+01\n-9.1026671641487189e-01\n2.1541132945152107e+01\n-4.4429413330000983e+01\n-1.2233559468428378e+01\n1.7103987649649774e+01\n-3.5714238881602832e+01\n1.2296631257311878e+01\n8.0874781230746677e+00\n-2.5513074514205115e+01\n-1.9662884677196451e+00\n2.0507506297949497e+01\n-4.2740851013220095e+01\n9.7969966110256923e+00\n2.4108046981687131e+01\n-4.9877282353707805e+01\n-1.4371254119996042e+00\n2.0970662195413894e+01\n-4.3497249714016569e+01\n1.3847979974488181e+01\n1.4006312071915282e+01\n-3.5013381045039459e+01\n-1.1000177605086929e+01\n1.7510243103687184e+01\n-3.6720289163874355e+01\n-1.3288339444320778e+01\n1.6469885495199012e+01\n-3.4782567911264323e+01\n-9.2788921246657399e+00\n1.8307859923707028e+01\n-3.8678329259679131e+01\n1.9068565124140815e+01\n2.6334021071544107e+01\n-5.5016446393480706e+01\n2.0404386527104950e+01\n2.6546006191297455e+01\n-5.5667992710041453e+01\n-1.0486048865803120e+01\n1.7602974777435321e+01\n-3.7100671658975045e+01\n-9.4476825304169965e-01\n2.0951308987451668e+01\n-4.3959159569948092e+01\n2.0151258168627217e+00\n2.1780675825521833e+01\n-4.5713910747236376e+01\n2.5683081597566879e+00\n2.1888309507615062e+01\n-4.5827816215231600e+01\n1.3327265840074675e+01\n8.9033251302615781e+00\n-2.7157322462827786e+01\n1.8590601225547424e+01\n2.5935473941532614e+01\n-5.4561430211960293e+01\n-2.9151027993393734e+00\n2.0131448771998340e+01\n-4.2563437113317661e+01\n1.8860239690938606e+01\n2.5828918686451804e+01\n-5.4600939464068382e+01\n9.4137841040811114e+00\n6.2401760838948608e+00\n-2.2135072962671639e+01\n1.7794289216582291e+00\n2.1622711707474085e+01\n-4.5611664865083128e+01\n-3.4388984560077773e+00\n1.9538746965195209e+01\n-4.1876062164746180e+01\n-3.1558023891393336e+00\n1.9749582301202004e+01\n-4.2150034033312735e+01\n-3.4454338474049817e+00\n1.9921706994094158e+01\n-4.2183861104986107e+01\n-1.2994416335395446e+01\n1.6380231024336556e+01\n-3.4919116089447115e+01\n-1.2196325063932969e+01\n1.4667389601695557e+01\n-3.2396500381705998e+01\n6.6155170566658272e+00\n2.2632582730982392e+01\n-4.8027304470796956e+01\n1.6488519813927081e+01\n2.3951926354489515e+01\n-5.1818634238344764e+01\n1.2730533335264212e+01\n2.4429519138843290e+01\n-5.2192486070489814e+01\n1.5012474706347539e-01\n2.0823354949928014e+01\n-4.4469852611523208e+01\n2.6774290564243572e+00\n2.1928257012876013e+01\n-4.6492307365430875e+01\n1.8930979921635075e+01\n2.5914894666668161e+01\n-5.5164653350800052e+01\n1.2600315766011274e+01\n6.1096046636332533e+00\n-2.2672655301912982e+01\n-5.6169221888196275e-01\n2.0674257038219253e+01\n-4.4478559200584336e+01\n2.2640192794415608e+00\n2.1581440466560693e+01\n-4.6023173512410757e+01\n2.5602691608865524e+00\n2.2185666970636721e+01\n-4.7148647479981562e+01\n2.1174746560791672e+01\n2.5777573470222940e+01\n-5.5467340255149189e+01\n-8.3806144833948970e-01\n2.0975113316226636e+01\n-4.4964903794128460e+01\n-1.3927071833818039e+00\n1.9998100738619033e+01\n-4.3344929354519401e+01\n1.9020264007736806e+01\n2.5961458855781640e+01\n-5.5308270796563690e+01\n1.7161011161328763e+00\n2.1056437822599339e+01\n-4.5482196537747228e+01\n1.7152787213228373e+00\n2.1167144795962333e+01\n-4.5622630810621132e+01\n1.2443411935652211e+01\n8.0078053160475093e+00\n-2.5952071993921734e+01\n-3.3555599875602287e+00\n1.9814534072816468e+01\n-4.2850695932148120e+01\n6.9873029846447761e+00\n2.2942165081371261e+01\n-4.9274211998136792e+01\n1.5925349896486424e+01\n2.4338830059296495e+01\n-5.2710500894403964e+01\n1.1468438919508268e+01\n1.1736098197722850e+01\n-3.1797652420967442e+01\n-1.3049077532072688e+00\n2.0448923143918929e+01\n-4.4104490022528445e+01\n3.1066789087123410e+00\n2.2184704552206785e+01\n-4.7820856840925153e+01\n-1.1817834559380447e+00\n2.0843823391497065e+01\n-4.4997032024322081e+01\n2.0782481657982088e+00\n2.1554434719914877e+01\n-4.7053346178257833e+01\n-7.3912762985401432e+00\n1.7968274103426122e+01\n-3.9707409038102426e+01\n1.8024813796712362e+01\n2.5691222479174719e+01\n-5.6018327256568526e+01\n1.2914943976330784e+01\n6.7744542372166290e+00\n-2.4664752978295510e+01\n1.2789197278292686e+01\n1.3178946516600265e+01\n-3.4955430751691488e+01\n-1.0553950434648651e+00\n2.0706479477991177e+01\n-4.5161280885717176e+01\n2.5266582977549767e+01\n2.8889791729143120e+01\n-6.3053089581679899e+01\n1.3277103542464562e+01\n1.0413308918469909e+01\n-3.0673349536524960e+01\n1.2996453594320961e+01\n1.0281945496154327e+01\n-3.0177627878714144e+01\n1.1515353284160129e+01\n1.1252763280289741e+01\n-3.1686525332230662e+01\n9.6327216208006075e+00\n4.3069160830105604e+00\n-1.9811062341311260e+01\n1.3828181213038363e+01\n6.1077758042497514e+00\n-2.3640835612885056e+01\n-1.2231696927815601e+00\n2.0581440845680479e+01\n-4.5046760245706530e+01\n-1.2231696927815601e+00\n2.0581440845680479e+01\n-4.5046760245706530e+01\n1.8114745079759469e+00\n2.1033860218792764e+01\n-4.6231868382768866e+01\n1.0270325406637907e+01\n2.2907889787201487e+01\n-5.0615145945188083e+01\n1.0062451028860751e+01\n4.4721913893708223e+00\n-2.0370145310748931e+01\n1.4146610562651466e+01\n6.2418716461324797e+00\n-2.4319020917879985e+01\n1.0810798355854436e+01\n2.4299851624283583e+01\n-5.3357874349747227e+01\n1.3920969455618209e+01\n5.9838492717965819e+00\n-2.3599561923397754e+01\n9.5867546694745762e+00\n2.2978525586506830e+01\n-5.0905805179544330e+01\n7.2340492188823173e+00\n2.2305612149489544e+01\n-4.9731411354096210e+01\n1.2150384537094588e+01\n7.7053126601671149e+00\n-2.6548429840901328e+01\n1.3228726163760857e+01\n5.2717870271763330e+00\n-2.2416719750194687e+01\n1.2489769288294678e+01\n2.3611489371158569e+01\n-5.2723312343287965e+01\n1.7115682447018767e+01\n2.6096990195491095e+01\n-5.7955163652614814e+01\n1.9728338561704518e+01\n2.5358190671493244e+01\n-5.6767967636089232e+01\n-8.6042075806821803e+00\n1.7267940326311265e+01\n-3.9107223602194317e+01\n1.1783945511461644e+01\n8.2056764306673067e+00\n-2.6813517924494608e+01\n1.3044090571812641e+01\n2.3938595558505401e+01\n-5.3729785977401669e+01\n-1.0618636816212852e+01\n1.5239032623108015e+01\n-3.5104887622058861e+01\n1.2159054572752790e+01\n7.0659779007546186e+00\n-2.5546572831336881e+01\n-8.0600671641452515e-01\n2.0203871733433402e+01\n-4.5610297032510054e+01\n1.2547784183435528e+01\n2.3939598236432804e+01\n-5.4426569959323864e+01\n1.2998054166610185e+01\n7.8508990241452796e+00\n-2.7219948533371653e+01\n1.2260285105885409e+01\n7.4891474447286726e+00\n-2.6429336608387917e+01\n1.2443336361952246e+01\n1.2184665054844727e+01\n-3.4522567658026674e+01\n-1.1632828581449420e+01\n1.6459286013433864e+01\n-3.7640491070456505e+01\n5.1481583344805584e+00\n2.0940269350454777e+01\n-4.8111014444742821e+01\n1.2778651217124285e+01\n1.1630383083389859e+01\n-3.3875277101332188e+01\n1.2110301644531525e+01\n7.6735947530871211e+00\n-2.7059581761585260e+01\n9.8469423199711077e+00\n2.3487059161390906e+01\n-5.3359073094705742e+01\n1.3665429458758211e+01\n7.4837284665341022e+00\n-2.7002878298008284e+01\n-8.9006486408200161e+00\n1.7042665944064421e+01\n-3.9320975997977769e+01\n9.4572590165172148e+00\n2.3517268107781934e+01\n-5.3310365988704469e+01\n1.3906632948509921e+01\n6.0835334463955464e+00\n-2.4580525735224839e+01\n-8.7748548916779416e+00\n1.7077415400512692e+01\n-3.9515787387769642e+01\n1.2438254775526374e+01\n7.4937441638446662e+00\n-2.6887865726133139e+01\n-3.8196581575308817e+00\n1.8742841654408632e+01\n-4.3043824077367788e+01\n1.4688229630528863e+01\n1.0477733825248452e+01\n-3.2398197843689452e+01\n-5.9552157665004009e+00\n1.8062909031805841e+01\n-4.1509680921359049e+01\n3.4938826596401706e-01\n1.9989482496063342e+01\n-4.6222031867640688e+01\n1.2360396836075818e+01\n1.1127559318289332e+01\n-3.3183345540303556e+01\n1.2351953819487218e+01\n7.4342135859031941e+00\n-2.7016891791429391e+01\n1.4735775290566226e+01\n1.0404763770823047e+01\n-3.2474778426536140e+01\n8.0768467649063211e+00\n2.1478631237131591e+01\n-5.0450840361011394e+01\n1.2526245543185995e+01\n2.3970436658145463e+01\n-5.5380303376775544e+01\n1.1675880010513788e+01\n8.0173254399502820e+00\n-2.7626545693034757e+01\n1.3072534209003287e+01\n7.0382439846314195e+00\n-2.6706563149993670e+01\n1.3116161957288099e+00\n2.0554278559811340e+01\n-4.7636159945703895e+01\n1.4476624958065823e+01\n1.0448862604719771e+01\n-3.2616272492104997e+01\n1.1398218643721776e+01\n7.7924057146434249e+00\n-2.7563955856534545e+01\n1.4689011647911675e+01\n1.0272126082452072e+01\n-3.2387793949327907e+01\n1.2833074724439971e+01\n9.6470227636187218e+00\n-3.1001979784663593e+01\n8.3011030206689966e+00\n2.2635193058244415e+01\n-5.2773604094250317e+01\n7.9644155141399713e+00\n2.2241717532518177e+01\n-5.1768599228072709e+01\n1.1708583237616708e+01\n6.3935703271996260e+00\n-2.5287800803360440e+01\n1.2804719556744647e+01\n6.8101022019378092e+00\n-2.6344503793192143e+01\n1.7104701682529168e+01\n2.3709818184582758e+01\n-5.5979507136499514e+01\n-5.6510582716299380e+00\n1.7722728652030440e+01\n-4.1958413915697690e+01\n1.2704770586170181e+01\n6.5186954569947329e+00\n-2.5840849607646685e+01\n1.2766791327026869e+01\n1.1511465557238141e+01\n-3.4663491173064514e+01\n1.2099839680285381e+01\n8.0964460405856649e+00\n-2.8626673124456946e+01\n1.2978815966527915e+01\n9.4406904251072490e+00\n-3.0786824934272833e+01\n1.4023265884410941e+01\n6.6278986554683437e+00\n-2.6485879790636400e+01\n-3.6913333140828564e+00\n1.8487589621933726e+01\n-4.3589112797171857e+01\n1.2662404049035938e+01\n1.0661694354896467e+01\n-3.3231072467388053e+01\n1.1725832111101059e+01\n2.1969043395042053e+01\n-5.2503627265825962e+01\n-9.1054426187721642e+00\n1.6780982101742477e+01\n-4.0083041938836644e+01\n1.3695047971434654e+01\n6.0571034681389833e+00\n-2.5715815660369355e+01\n-4.8742508913360325e+00\n1.8024645211853734e+01\n-4.2917915592525574e+01\n6.1609756719020909e+00\n2.1046944540941258e+01\n-5.0157522100237216e+01\n1.3790093536384621e+01\n5.9499850820694293e+00\n-2.5528755406838787e+01\n1.2125272876170934e+01\n7.9883807195465595e+00\n-2.8704234125485229e+01\n1.1080452597241950e+00\n1.9467968979586569e+01\n-4.6615246164846937e+01\n1.8722428397360744e+01\n2.3515414730339202e+01\n-5.7302419399864235e+01\n1.3692183061833690e+01\n9.6967485910647255e+00\n-3.2059221728654578e+01\n1.2235988612176492e+01\n1.1982751625973664e+01\n-3.5577833284394060e+01\n8.1529306145932416e+00\n2.1533609603628484e+01\n-5.1678295083542480e+01\n1.2688817939476142e+01\n6.3066722421650780e+00\n-2.5909181327923356e+01\n-1.0820462126072250e+00\n1.9146558439586610e+01\n-4.5909148887246701e+01\n1.3345859734719021e+01\n9.5707173899888360e+00\n-3.1862193403038862e+01\n-9.1253698997357731e+00\n1.6678159807616947e+01\n-4.0107274978247879e+01\n-9.0628611947451461e+00\n1.6560251333944443e+01\n-3.9997239295044160e+01\n1.3573763476330939e+01\n9.5448618291082123e+00\n-3.2033462134827680e+01\n1.3705473085618049e+01\n2.2099356618297438e+01\n-5.4008025829600541e+01\n1.3157931565844880e+01\n6.4827460662419201e+00\n-2.6656923319571355e+01\n1.3169018760166061e+01\n6.5007611474966405e+00\n-2.6705227651191791e+01\n-9.2336074888295467e+00\n1.6246720511977568e+01\n-3.9602290820989211e+01\n-8.9044310826243134e+00\n1.6373044144554093e+01\n-3.9916924455143558e+01\n6.7733098643423082e+00\n2.1017019854482434e+01\n-5.0989916465616979e+01\n-1.2263614869820902e+00\n1.9212197762591746e+01\n-4.6168819655908386e+01\n-1.1688027599980380e+00\n1.9373289482255544e+01\n-4.6561916772137124e+01\n-3.4237845710791937e+00\n1.8285937638500013e+01\n-4.4207999224107787e+01\n1.2308875743007130e+01\n1.1784151298885293e+01\n-3.5628622676671192e+01\n1.2892930147486160e+01\n1.0512568580541902e+01\n-3.3814211111907397e+01\n1.2879458770159021e+01\n1.0718259988368876e+01\n-3.3843369919137913e+01\n1.3096471031482983e+01\n1.0485418227165711e+01\n-3.3535212212324119e+01\n1.3882254467725604e+01\n9.7753483339329375e+00\n-3.2688482670102061e+01\n1.3363950114831471e+01\n9.3316064097384199e+00\n-3.1812131761963741e+01\n-8.9942362249553511e+00\n1.6403243718943607e+01\n-4.0165303388784118e+01\n5.8740284145741262e-01\n1.9251862874057583e+01\n-4.6919588859820472e+01\n1.2162826313675957e+01\n7.6912482092898440e+00\n-2.8805629657644594e+01\n1.2210536591944363e+01\n7.7451536154582330e+00\n-2.8885205774072794e+01\n1.3132461642986923e+01\n6.7473823485547397e+00\n-2.7268970230798445e+01\n1.0453603248966634e+00\n1.9429569782026732e+01\n-4.7337502947762552e+01\n1.3026190302303462e+01\n1.0195272081348000e+01\n-3.3461071291734818e+01\n4.8795271376737031e+00\n1.9639179324041820e+01\n-4.8772570966053557e+01\n1.2491492153934756e+01\n6.3428694445178326e+00\n-2.6094345648702895e+01\n-3.8228027135198750e+00\n1.7779616345181605e+01\n-4.3856043899750212e+01\n-9.0241003551789003e+00\n1.6461137680128289e+01\n-4.0035425524592654e+01\n4.9968294866083456e+00\n2.0095383312583433e+01\n-4.9433425891582118e+01\n1.4466077360069928e+01\n1.0797780239018461e+01\n-3.4988050923078546e+01\n1.4466077360069928e+01\n1.0797780239018461e+01\n-3.4988050923078546e+01\n1.2316940111596338e+01\n6.8865798785245778e+00\n-2.7573515596871616e+01\n1.4211330806903423e+01\n5.9237425016079230e+00\n-2.6322675792106864e+01\n-6.6764501020447664e+00\n1.6749046683652381e+01\n-4.1742604610517404e+01\n-6.6764501020447664e+00\n1.6749046683652381e+01\n-4.1742604610517404e+01\n-6.9759206719190736e+00\n1.6623948275843748e+01\n-4.1492054151654777e+01\n1.2965879540107016e+01\n2.2008002510756906e+01\n-5.4747464868637138e+01\n1.3213401977625557e+01\n1.0188301442084176e+01\n-3.3370432314800148e+01\n-9.0917485936330156e+00\n1.6360981639560027e+01\n-4.0719822834283804e+01\n1.1246307808446006e+00\n1.9197826381413389e+01\n-4.7599391148585745e+01\n1.2595495533197051e+01\n6.1794943585491318e+00\n-2.6552200608362238e+01\n-6.0631706252821760e-01\n1.9154059357048869e+01\n-4.7327769606809845e+01\n1.4131980675489668e+01\n1.1221350210343598e+01\n-3.6148391046166765e+01\n1.2678231391594135e+01\n6.4453135605779588e+00\n-2.7131380038325720e+01\n-9.4067314308553325e+00\n1.5816314150475176e+01\n-3.9899814803452976e+01\n2.3719109418837712e+00\n1.9864024237158539e+01\n-4.9139627473511389e+01\n-9.3517832275358614e+00\n1.5964421112972792e+01\n-4.0072552871179212e+01\n1.3944266457072159e+00\n1.8684160703636941e+01\n-4.7380040376635719e+01\n4.8366108720669896e+00\n1.9160025781739289e+01\n-4.8662818841573426e+01\n1.2904082211202594e+01\n1.0347189314443375e+01\n-3.3943540817002535e+01\n1.5487112507421058e-01\n1.8997514333653665e+01\n-4.7550805959657119e+01\n1.4823491192558289e-01\n1.8872562422924872e+01\n-4.7448569019510664e+01\n9.6595133563561683e-02\n1.8557982351435708e+01\n-4.6878156414695113e+01\n-5.7687247089958520e+00\n1.6841930398255620e+01\n-4.2487948373085437e+01\n1.4332251821473015e+01\n5.5987938427196768e+00\n-2.6266921352069577e+01\n1.4917057744356420e+01\n9.8239557110637890e+00\n-3.4113657068917888e+01\n1.4327373956751940e+01\n9.4716848893057133e+00\n-3.3295247219137579e+01\n1.2516962366414768e+00\n-2.5568069539952842e-01\n-1.2528516058480344e+01\n1.1967085584760325e+01\n6.8166655765690294e+00\n-2.7827406852821802e+01\n1.2149153553771114e+01\n6.8983975199341891e+00\n-2.8059343183094512e+01\n1.3100635924049920e+01\n5.9381925383407701e+00\n-2.6630997063635117e+01\n1.3269611470780497e+01\n6.0053909701037860e+00\n-2.6909024912528857e+01\n-6.0364707773666844e+00\n1.6961217030544493e+01\n-4.2697068412637584e+01\n1.3110234957297589e+01\n5.3184161854676688e+00\n-2.5647650819150627e+01\n1.2812178065087872e+01\n6.3579891346769539e+00\n-2.7567553596494047e+01\n1.2812178065087872e+01\n6.3579891346769539e+00\n-2.7567553596494047e+01\n-1.2381491534594620e+01\n1.5163036341463640e+01\n-3.8037462508414180e+01\n1.5132337127155964e+01\n2.2781710865251558e+01\n-5.8204899244200000e+01\n1.3796251760929501e+01\n9.7631032627109224e+00\n-3.3999572691496155e+01\n1.3586732451231194e+01\n2.1842045165775239e+01\n-5.6197533738125919e+01\n1.2889735763600244e+01\n1.0585425854100539e+01\n-3.5388836885952024e+01\n1.3443207584336783e+01\n5.6467287917237412e+00\n-2.6423244813393751e+01\n1.3467575208820531e+01\n5.4239048674690924e+00\n-2.6011155213292646e+01\n1.5711134955997933e+01\n2.3385067430587171e+01\n-5.9759244163055207e+01\n-6.9833490517028611e+00\n1.6588123415985518e+01\n-4.2516181141293096e+01\n-6.9171587064494044e+00\n1.6331692638144656e+01\n-4.2100979097207137e+01\n1.9094810331713215e+00\n1.9596649328963437e+01\n-4.9746518663861323e+01\n1.4244090074773084e+01\n2.1801342724318900e+01\n-5.6567889911185716e+01\n1.5254482768490844e+01\n2.2480865403597825e+01\n-5.8385546301229063e+01\n1.3002581619561223e+01\n6.0062559779081583e+00\n-2.7401484330420764e+01\n-1.1504060401098084e+01\n1.5181571240893181e+01\n-3.8596926399141644e+01\n-3.4896735911377132e+00\n1.7125769494559584e+01\n-4.4110394660478846e+01\n-2.5646782450605783e+00\n1.7396896753607891e+01\n-4.5342305268554568e+01\n1.2641955850909619e+01\n6.1552467276394518e+00\n-2.7601950636891523e+01\n1.3278993630828241e+01\n5.6747840824036029e+00\n-2.6993628733897484e+01\n-1.1341767745786893e+00\n1.7881796007062011e+01\n-4.6599794375694820e+01\n1.2715059157338009e+01\n1.0701946773397470e+01\n-3.5769832118873943e+01\n1.5220582356270063e-01\n1.8209782136055587e+01\n-4.7788513411023381e+01\n-3.1287788616116843e+00\n1.7525017465275987e+01\n-4.5529224661122235e+01\n-3.0375231649162471e+00\n1.7838478670125866e+01\n-4.6334381060738643e+01\n-2.6734390218364568e+00\n1.8055560210910524e+01\n-4.6647095742988036e+01\n8.9664131285979884e+00\n2.0713203182921063e+01\n-5.4396426270546087e+01\n-4.6069327304353598e+00\n1.6612977555056236e+01\n-4.3385488417158996e+01\n-1.7574183086849415e+00\n1.7855100914925853e+01\n-4.6459640900478682e+01\n1.2437557137094775e+01\n6.4128559465896231e+00\n-2.8336261090064173e+01\n-1.8322221755053618e+00\n1.8263894169167045e+01\n-4.7356823834897511e+01\n-5.4019930762552726e-01\n1.8374888483575077e+01\n-4.8005546025200822e+01\n9.1368110899037500e+00\n2.0228771434204777e+01\n-5.3776928062357833e+01\n9.1105001335808993e+00\n2.0831983814114949e+01\n-5.4978099844719630e+01\n1.2303703123941094e+01\n6.1924646452630645e+00\n-2.8020416915934526e+01\n1.0586266079306684e+01\n2.1155956542304715e+01\n-5.5720470465214298e+01\n8.7021405372162857e+00\n2.0948425185825773e+01\n-5.5142540287003598e+01\n-6.5357252814144644e+00\n1.6116802898725552e+01\n-4.2770058307685900e+01\n6.8425117358954219e+00\n2.0078878335082017e+01\n-5.3175347489258606e+01\n-1.0396350676717304e+01\n1.5012142333570585e+01\n-3.9845390180218452e+01\n-9.3671725082366049e+00\n1.5601995334469084e+01\n-4.0655692983629542e+01\n-1.5365953811022151e+00\n1.7827253576584198e+01\n-4.6861906349860675e+01\n9.0076808047729067e+00\n2.0969202922120083e+01\n-5.5442540625622236e+01\n-1.1013145898138192e+00\n1.7629827201962332e+01\n-4.6979858695095267e+01\n-8.9269112242988999e+00\n1.5533238440700808e+01\n-4.1193978484106800e+01\n-2.7758796671917501e+00\n1.7472320058181836e+01\n-4.6184028376902070e+01\n1.4187859209844921e+01\n2.4591191900310538e+00\n-2.1620935654949179e+01\n-1.0094132481308153e+01\n1.5036516679865681e+01\n-4.0258150228225837e+01\n-2.0764026112471154e+00\n1.7719200416175557e+01\n-4.7032577411464764e+01\n4.1273552182313518e+00\n1.9031476568193810e+01\n-5.1067375006325740e+01\n1.3909719831663359e+01\n2.8305486834860885e+00\n-2.2461413254774069e+01\n-3.7540206215309730e+00\n1.6607504795737594e+01\n-4.5122971745842733e+01\n-6.6485049981151336e+00\n1.5588236034585247e+01\n-4.1929944765958460e+01\n-1.0792159897979035e+01\n1.5169990802630119e+01\n-4.0506875448700420e+01\n1.5044501883593057e+01\n2.2013945491898173e+01\n-5.9925651351142257e+01\n5.3518326830098930e+00\n2.7684918665425712e-01\n-1.5538628551438233e+01\n8.7698777496467739e-01\n1.8120791633992788e+01\n-4.8950766218911809e+01\n1.2435053072155478e+01\n6.4017519506223683e+00\n-2.9259892587310016e+01\n-4.5533313311578532e+00\n1.6593545343405228e+01\n-4.5149356817661953e+01\n4.6552294474061151e+00\n1.8889978821838351e+01\n-5.1596952130314051e+01\n1.4604153718426703e+01\n2.0427529150105027e+01\n-5.7409498306110493e+01\n-3.4918225542536003e+00\n1.6785602149919601e+01\n-4.5748088016791037e+01\n-3.3386870402598574e+00\n1.7119228149135740e+01\n-4.6265161818392166e+01\n-3.8194328918757052e+00\n1.6574154090315343e+01\n-4.5190220939652392e+01\n1.2932498314901668e+01\n5.2251308751418888e+00\n-2.7353664587162974e+01\n-4.7352096527192105e+00\n1.6514634159752074e+01\n-4.4814012623697785e+01\n-6.5846634322454900e+00\n1.5875323406569075e+01\n-4.3409291457883072e+01\n-6.5846634322454900e+00\n1.5875323406569075e+01\n-4.3409291457883072e+01\n1.2959383982393909e+01\n5.4599336192855787e+00\n-2.7859046551069842e+01\n1.2284273283391050e+01\n5.9041039363790464e+00\n-2.8632985685300039e+01\n-1.1842827073422656e+01\n1.4738028653737672e+01\n-3.9976450720949202e+01\n-9.5843513395287818e+00\n1.5120459657074143e+01\n-4.1021983014107491e+01\n-7.0668523182637069e+00\n1.5527533477456451e+01\n-4.3001024449256988e+01\n-4.7368740190935590e+00\n1.6422431134187736e+01\n-4.5020228526126076e+01\n1.2129362680783695e+01\n6.4489037408151670e+00\n-2.9832400983843751e+01\n-3.1401393255809973e+00\n1.6896001980130212e+01\n-4.6478272787434832e+01\n1.2179624670913309e+01\n6.2458617731637673e+00\n-2.9478261042356515e+01\n-7.0665705698262133e+00\n1.5680816085964782e+01\n-4.3304305331702864e+01\n1.8626722580002568e+00\n1.7707607676819727e+01\n-4.9598890991521706e+01\n9.4146789806643554e+00\n1.9577755241294209e+01\n-5.5025355434761856e+01\n-3.3590549975730570e+00\n1.6343981342989078e+01\n-4.5936373203303432e+01\n-3.7814464945273927e+00\n1.6439819683145650e+01\n-4.5870364415462895e+01\n-5.0874594353203362e+00\n1.6082538920144767e+01\n-4.4855055341203823e+01\n1.3165091671026357e+01\n5.2027611276651360e+00\n-2.7945174734241572e+01\n-2.0042547502723584e+00\n1.6114570771799059e+01\n-4.5723158690809157e+01\n9.3031642623266677e+00\n2.0150199995535051e+01\n-5.6709048354937771e+01\n1.4083058375059776e+01\n3.1830679853773254e+00\n-2.4474469205526006e+01\n-8.4530262723757712e+00\n1.5115909229389178e+01\n-4.2376264939400343e+01\n-8.2273145866388369e+00\n1.5317367126934771e+01\n-4.2567082685208320e+01\n-8.2682093285529792e+00\n1.4589153648250262e+01\n-4.1099068613138158e+01\n-1.6667758251908131e+00\n1.6118993814659760e+01\n-4.6301385793058309e+01\n-1.6667758251908131e+00\n1.6118993814659760e+01\n-4.6301385793058309e+01\n9.4271196766730405e+00\n1.9239681239789412e+01\n-5.5370996202910057e+01\n1.2815960641465198e+01\n5.4289116922275724e+00\n-2.8565534822178549e+01\n1.2777821172537326e+01\n5.2223178378240975e+00\n-2.8160331551604983e+01\n1.3728405149995893e+01\n3.7223378861097549e+00\n-2.5538000237451410e+01\n-6.2767751569957273e+00\n1.5600318837611125e+01\n-4.4209488433164331e+01\n1.3964362401336512e+01\n3.3700105321268099e+00\n-2.4965362408340383e+01\n-9.8400821007258354e+00\n1.4789105893995339e+01\n-4.1646137322668032e+01\n1.2942703921306382e+01\n5.1890026796011037e+00\n-2.8406841308932297e+01\n1.3692167569247975e+01\n2.7607962142641651e+00\n-2.3608529239631707e+01\n5.6486407880013658e+00\n9.0847428396915744e-02\n-1.6108806999046593e+01\n2.1422372397976203e-01\n1.7613495540089989e+01\n-5.0058261733043771e+01\n1.3485607304083716e+01\n9.6270009470510960e+00\n-3.7554612585179761e+01\n1.3485607304083716e+01\n9.6270009470510960e+00\n-3.7554612585179761e+01\n-7.9930455834717904e+00\n1.5077295583785139e+01\n-4.2979717958066942e+01\n1.3972880061756513e+01\n9.6976385582340043e+00\n-3.7927407662072859e+01\n1.4115365430738628e+01\n3.5630528908240890e+00\n-2.5700796957601067e+01\n-6.2165357186492738e+00\n1.5329354189630061e+01\n-4.4276706461903764e+01\n1.2728931015113375e+01\n5.2459134644336327e+00\n-2.8816142175101270e+01\n1.4644122710945306e+01\n3.2110456493792574e+00\n-2.5342247119254644e+01\n1.1702565920804238e+01\n1.8756131841152328e+01\n-5.6015835508087832e+01\n1.3809113602162949e+01\n2.6535905894865239e+00\n-2.3756948728140777e+01\n1.4258000842464090e+01\n2.2299647453854492e+00\n-2.3262724970440480e+01\n1.4258000842464090e+01\n2.2299647453854492e+00\n-2.3262724970440480e+01\n1.4829436316569444e+01\n2.9242875414028084e+00\n-2.4994779517947055e+01\n1.4440228526722613e+01\n2.6900902601707122e+00\n-2.4272884266208710e+01\n-8.6500561808740510e+00\n1.4978633378873536e+01\n-4.3057085748061375e+01\n-5.1271699529148860e+00\n1.5512468777069056e+01\n-4.5274619923918515e+01\n-4.2519244067078015e+00\n1.5648754676946851e+01\n-4.5638164114804226e+01\n-4.2528213317590264e+00\n1.5919436402143228e+01\n-4.6319567604427569e+01\n1.0415844189502213e+01\n1.9086817530379278e+01\n-5.6377135953652704e+01\n1.2928582405815773e+01\n4.8981544896284444e+00\n-2.8300828413751045e+01\n-7.6307740362807710e+00\n1.5087328809661697e+01\n-4.3412332992507054e+01\n-9.1605678512938518e+00\n1.4772031827553279e+01\n-4.2723848556264045e+01\n1.3555510410716886e+01\n2.7416211147389422e+00\n-2.4075432650744425e+01\n1.4061757900831225e+01\n3.6342101606975858e+00\n-2.6388289148285331e+01\n-8.9684589601930718e+00\n1.4457242953275207e+01\n-4.2407734068697621e+01\n-1.1163962665935189e+01\n1.3846266082003094e+01\n-4.0613769111802974e+01\n-4.9686096838142433e+00\n1.5751406577576120e+01\n-4.5905965828446675e+01\n1.2996620506169865e+01\n4.8166504061563682e+00\n-2.8530641937487292e+01\n1.3102747772347710e+01\n4.6250466445045122e+00\n-2.8255273950655724e+01\n-8.0701764613253033e+00\n1.4548545761646261e+01\n-4.3146778537758280e+01\n1.2666737794935298e+01\n5.2887598135321872e+00\n-2.9588697450471525e+01\n1.2666737794935298e+01\n5.2887598135321872e+00\n-2.9588697450471525e+01\n-1.1186674795031594e+01\n1.3643995576618369e+01\n-4.0477218062021159e+01\n-9.9397833235733675e+00\n1.4016107149301897e+01\n-4.1421031560108815e+01\n-8.5051805898022561e+00\n1.4557325357594232e+01\n-4.3118760313142637e+01\n1.4062621445616402e+01\n3.4991999128272715e+00\n-2.6500384189934252e+01\n8.8833728049285874e+00\n1.8312050761192854e+01\n-5.5662086502650013e+01\n-1.2909261951853519e+01\n1.3606592710541113e+01\n-3.9911270296871329e+01\n1.4705145209266107e+01\n2.8124893936317501e+00\n-2.5505368402030584e+01\n1.2820546365441986e+01\n4.8244424208833028e+00\n-2.9025081739225119e+01\n1.3802835008926483e+01\n7.5297463883711986e+00\n-3.5039057669933783e+01\n1.3362177328369659e+01\n4.7820501563391016e+00\n-2.9144899972167405e+01\n1.3362177328369659e+01\n4.7820501563391016e+00\n-2.9144899972167405e+01\n-1.1007343880258063e+01\n1.4089810520913213e+01\n-4.1699928321060206e+01\n1.4386003436576738e+01\n3.0918991866979901e+00\n-2.6109052592616418e+01\n1.3570835644842587e+01\n2.7441780262920155e+00\n-2.5079862003683960e+01\n1.4130248105584029e+01\n3.3098701527558854e+00\n-2.6479914151317995e+01\n-1.1259188150092632e+01\n1.3563700248208441e+01\n-4.0911549207988472e+01\n-1.1245815651533734e+01\n1.3457251534303111e+01\n-4.0605303565051202e+01\n1.3452613079857834e+01\n3.2302665133480177e+00\n-2.6128925080025475e+01\n1.3480823714377511e+01\n4.4060029669627410e+00\n-2.8725021923090171e+01\n1.4559441728660842e+01\n1.9840135705470336e+00\n-2.4039294854988150e+01\n1.4630989806707127e+01\n2.0456580568918223e+00\n-2.4122771203576132e+01\n1.4153478726266469e+01\n7.5989135980388900e+00\n-3.5728355835814966e+01\n1.4171809821602075e+01\n7.6208150009612021e+00\n-3.5729409147826374e+01\n1.3407196314255874e+01\n3.9570150067395637e+00\n-2.7836843461121216e+01\n-1.3254034189349470e+01\n1.3251266973157716e+01\n-3.9648331708614087e+01\n-1.2454682169474637e+01\n1.3347181079584290e+01\n-4.0134566579206734e+01\n-1.0164509559572092e+01\n1.4013564845280962e+01\n-4.2354542320758384e+01\n1.4430634486857949e+01\n2.6001202126643554e+00\n-2.5445408546899955e+01\n5.6247182619504228e+00\n-1.3953521732318347e-01\n-1.6707681956162467e+01\n-1.2150561043918700e+01\n1.3185358409216605e+01\n-3.9758580947820214e+01\n-6.1028068989304947e+00\n1.4967605833876359e+01\n-4.5575209622711839e+01\n-6.0877206127625749e+00\n1.4945940612763081e+01\n-4.5585531142789094e+01\n1.4011804099099434e+01\n2.8820772917922253e+00\n-2.5876555476030621e+01\n-8.5299190443837638e+00\n1.4050872108764670e+01\n-4.2989659014195233e+01\n1.4266356351724493e+01\n1.5948398722334223e+00\n-2.3111421869898798e+01\n1.4266356351724493e+01\n1.5948398722334223e+00\n-2.3111421869898798e+01\n-1.0979697795580108e+01\n1.3602170605108574e+01\n-4.1421643242672374e+01\n-9.7277509644514204e+00\n1.3714530264537922e+01\n-4.2018222837766842e+01\n-4.5310650027819364e+00\n1.5036050135966201e+01\n-4.6595248126520652e+01\n1.4268123568996677e+01\n1.5540560479011611e+00\n-2.3143998250316553e+01\n5.9657285415323873e+00\n1.7467271263269900e+01\n-5.4831068605295748e+01\n4.2424647238288582e+00\n1.6781492117076969e+01\n-5.3175903004661528e+01\n-4.4659872845739450e+00\n1.5303163416649983e+01\n-4.7266579627119022e+01\n1.4575654972673968e+01\n2.6552812163697546e+00\n-2.5990945204884074e+01\n1.3830140713170511e-01\n1.6456763461199873e+01\n-5.0961022349757890e+01\n1.4531838931615795e+01\n2.3392290066629067e+00\n-2.5333941924545673e+01\n1.4268546614676758e+01\n2.3741214359897858e+00\n-2.5228497882949050e+01\n-9.5754367181270545e+00\n1.3645702740466378e+01\n-4.2379799201537843e+01\n-1.3099285659250759e+01\n1.2723128922094219e+01\n-3.9198217835714168e+01\n2.1800369174192516e-01\n2.9818416930336964e+00\n-2.2130133043444832e+01\n2.7835821472491444e+00\n2.0344282930268367e+00\n-2.0893535337410086e+01\n1.4351233210027770e+01\n2.2120280503710767e+00\n-2.5133848885842582e+01\n-1.6638860378214388e+00\n1.5593291268772706e+01\n-4.9007630189353243e+01\n-1.2784790613486194e+01\n1.2981828519680132e+01\n-3.9746446144514870e+01\n1.4461127632585073e+01\n2.0865749606764870e+00\n-2.4918054279367222e+01\n1.4566685716487388e+01\n8.6618827945046639e-01\n-2.2271328465544546e+01\n1.4566685716487388e+01\n8.6618827945046639e-01\n-2.2271328465544546e+01\n-8.9897832384180560e+00\n1.3635987690541631e+01\n-4.2935368847452281e+01\n-8.5415936290775676e+00\n1.4005183541912395e+01\n-4.3496590548307985e+01\n-9.7485056346834789e+00\n1.3737953008187727e+01\n-4.2906966188877696e+01\n-1.1725076405433311e+01\n1.3014627776760376e+01\n-4.0593868577498178e+01\n7.7150032993320428e-01\n1.6075099107177742e+01\n-5.1293089063923624e+01\n-1.3658746626631284e+00\n1.5172981232623128e+01\n-4.8553826870032317e+01\n-1.5884634949933196e+00\n1.5357604833664467e+01\n-4.8892166094108639e+01\n-1.1987833267454500e+01\n1.2870143852065510e+01\n-4.0336553924143146e+01\n-1.1942982906151869e+01\n1.2982381534466203e+01\n-4.0904912930251754e+01\n-4.0728862912653012e+00\n1.4805963676048799e+01\n-4.7365151842803897e+01\n-1.2225623119751063e+01\n1.2831546753628976e+01\n-4.0620073908745681e+01\n-9.8797360496450786e+00\n1.3429966823277276e+01\n-4.2717993033747042e+01\n1.3541767331225277e+01\n3.9663240352965397e+00\n-2.9267270390018112e+01\n1.3541767331225277e+01\n3.9663240352965397e+00\n-2.9267270390018112e+01\n-1.2529694994639771e+01\n1.2880289203859336e+01\n-4.0591733803960153e+01\n-1.1054083393811830e+01\n1.3065223279841524e+01\n-4.1408621818158494e+01\n-1.1517459385668461e+01\n1.2914894126966395e+01\n-4.1068645190300899e+01\n-1.2955845474439181e+01\n1.2852179492325346e+01\n-4.0615470139700292e+01\n-6.6183037707319121e+00\n1.4018145128449099e+01\n-4.5313164976249489e+01\n-6.6183037707319121e+00\n1.4018145128449099e+01\n-4.5313164976249489e+01\n1.4629176642743861e+01\n1.3785029471379660e+00\n-2.4175350029931820e+01\n-1.0650183779655256e+01\n1.3034392435455748e+01\n-4.1980421131878536e+01\n-7.4768111583754857e+00\n1.4118194267001991e+01\n-4.5269518260466597e+01\n1.4010677969599733e+01\n2.9421824928612352e+00\n-2.7496310792249009e+01\n1.3917965967883362e+01\n2.9365182760250308e+00\n-2.7394494845831996e+01\n-9.9814399374264564e+00\n1.3288251673890960e+01\n-4.2767180822161407e+01\n-9.2148009342435060e+00\n1.3332851753531028e+01\n-4.3001537771086802e+01\n2.0699606061103881e+00\n1.7367040843036625e+00\n-2.0707758045969008e+01\n-1.0061541652257928e+01\n1.3315943805521705e+01\n-4.2908342497919513e+01\n2.4166134993064725e+00\n1.6605748258638411e+00\n-2.0668808035741769e+01\n1.3447647451891642e+01\n3.2973234757850864e+00\n-2.8139454841987519e+01\n-1.0437428227219154e+01\n1.3037772910695914e+01\n-4.2076530295353137e+01\n-6.8766821455362077e+00\n1.3893702625377221e+01\n-4.5253838157078910e+01\n-1.0226439044053135e+01\n1.3375629306103431e+01\n-4.3106105489360665e+01\n1.4663138846793471e+01\n8.5280053908545761e-01\n-2.3249288371500377e+01\n-1.3076945757003408e+01\n1.2707507195351935e+01\n-4.0800600447038860e+01\n7.3617056465803288e-01\n1.5727605678905947e+01\n-5.1692958904398459e+01\n7.5226749036595031e-01\n1.5842312189328791e+01\n-5.2024911821210566e+01\n4.6122177300542322e-01\n2.1421929382265277e+00\n-2.1167436656172686e+01\n4.7952796795715824e-01\n2.1511259111280467e+00\n-2.1193570443309575e+01\n2.8416638333361033e-01\n2.2157019592183964e+00\n-2.1330026389809252e+01\n1.4826993979126474e+01\n1.9770216456540799e+00\n-2.5979647647263246e+01\n1.4617822801732011e+01\n1.8755737269161428e+00\n-2.5663705010973533e+01\n-8.3836789203578999e+00\n1.3637963900595855e+01\n-4.4378035796227131e+01\n1.6819548864086888e+00\n1.7553346414936424e+00\n-2.0760242971877915e+01\n8.9653807899578941e-01\n1.8881240645891872e+00\n-2.0525456915854608e+01\n1.5331817518584456e+00\n1.7397395137882057e+00\n-2.0687481574188059e+01\n-5.2940697373855106e-01\n2.7560738392117599e+00\n-2.2406575524404179e+01\n-3.9031881808891233e+00\n1.4751590280173675e+01\n-4.8439557984765500e+01\n-3.9031881808891233e+00\n1.4751590280173675e+01\n-4.8439557984765500e+01\n1.2079264444212026e+00\n1.8148818988614033e+00\n-2.0824310193569268e+01\n1.1109177505060455e+00\n1.8720775935489009e+00\n-2.0918185446244077e+01\n1.0809506455383302e+00\n1.7482071953153124e+00\n-2.0765062176394110e+01\n-3.7694627461595624e+00\n1.4904290074096341e+01\n-4.9165530944591445e+01\n1.3817046073074406e+01\n3.2891077659838959e+00\n-2.8804582189816923e+01\n2.9894754298998893e-01\n2.0675365873982505e+00\n-2.1294555624563245e+01\n2.3375183274690856e-01\n2.1093247568557949e+00\n-2.1333196079492598e+01\n-4.2694850776910656e+00\n1.4601452853640762e+01\n-4.8050415983254652e+01\n1.2105901469645181e+01\n2.8828363574165197e+00\n-2.6954138343067484e+01\n1.4622355487007864e+01\n1.7328291680447758e+00\n-2.5791893887988124e+01\n1.3360928392214118e+01\n3.3048180812655810e+00\n-2.8797218320153625e+01\n-4.2776110998881095e-01\n2.4880847589264463e+00\n-2.2086684770744984e+01\n-1.0414624850781767e+01\n1.2947299569056932e+01\n-4.2908173027137572e+01\n-6.8283273028627862e+00\n1.3616821918149984e+01\n-4.5671064202354444e+01\n-8.9926949348485952e-01\n3.3113392001751105e+00\n-2.3845968047914507e+01\n-7.0190669039118045e+00\n1.3605105383120129e+01\n-4.5475607098971281e+01\n8.8967023145196522e-01\n1.7141925344098961e+00\n-2.0808622782581569e+01\n-1.1440083177914316e+01\n1.2629339531746449e+01\n-4.1796388274851196e+01\n1.3169305796428532e+00\n1.6181245905963937e+00\n-2.0799886650586355e+01\n1.4169965046869578e+01\n2.4274253295258066e+00\n-2.7398629284419631e+01\n-9.9368853272689730e+00\n1.2816537831049427e+01\n-4.3003699196151210e+01\n1.1388745511422596e+00\n1.5468342215587383e+00\n-2.0648054317210740e+01\n-1.0598909745374650e+01\n1.2694067021753128e+01\n-4.2367449422109679e+01\n-1.0584354723402939e+01\n1.2866425172831530e+01\n-4.2859791158504080e+01\n1.0029181187651628e+00\n1.4692983808139346e+00\n-2.0335842332248632e+01\n-3.4369674493811830e+00\n1.4825684754798248e+01\n-4.9938843158577548e+01\n-4.2105169856317853e-01\n2.2540695256676102e+00\n-2.1856621938466613e+01\n1.2968919722566399e+01\n3.7187580067443613e+00\n-3.0048075142684326e+01\n1.3008001787197440e+01\n3.4407020060424229e+00\n-2.9461954386189934e+01\n1.4908811780767433e+01\n1.5531013889865992e+00\n-2.6014119288698325e+01\n1.4908811780767433e+01\n1.5531013889865992e+00\n-2.6014119288698325e+01\n2.7575268020689365e+00\n1.2573066577622687e+00\n-2.0739275391772285e+01\n-1.1365506796742448e+00\n2.8512901464222677e+00\n-2.2709812197546157e+01\n1.3605323023521043e+01\n3.2722121031185027e+00\n-2.9416130297069586e+01\n1.3030735139431350e+01\n3.5449817741332814e+00\n-2.9898837736936013e+01\n1.3956308797589330e+01\n2.3765317471455432e+00\n-2.7588145483301261e+01\n1.3933355007524430e+01\n2.3764472747650629e+00\n-2.7591293135427119e+01\n5.9478582953514776e+00\n-8.5223011337647547e-01\n-1.7123887255407478e+01\n-9.9204014883562799e+00\n1.2715577350624534e+01\n-4.3098782674465724e+01\n4.5193638517564322e-01\n1.5715230342935982e+00\n-2.0573564521762002e+01\n1.2496154052289116e+01\n2.7133801658663903e+00\n-2.7529061978065609e+01\n1.4050417270479835e+01\n2.3493749799077830e+00\n-2.7621687200165219e+01\n1.4070206049654608e+01\n2.3443302822187508e+00\n-2.7580644319448552e+01\n-1.1450474460063736e+01\n1.2351129506725375e+01\n-4.1912408088519129e+01\n-1.1609937338087597e+01\n1.2327103187865729e+01\n-4.1638029918878409e+01\n6.1609788076329348e+00\n1.3109586433149978e+01\n-4.9930421287813360e+01\n1.2656633921220973e+01\n3.9496856058467289e+00\n-3.0801541204422900e+01\n1.4102815386847837e+01\n2.1375087245925708e+00\n-2.7265281639558108e+01\n-6.1462383437648105e-01\n2.1934976065303622e+00\n-2.1957022624643798e+01\n-6.0501229844526228e-01\n2.2288956418241397e+00\n-2.1979006094545475e+01\n-1.2654773199694487e+00\n2.7853205741801808e+00\n-2.2812824267366242e+01\n-4.8749300186701250e-01\n2.0690915128585359e+00\n-2.1806968026734022e+01\n1.2869081740384869e+00\n1.1939824598751161e+00\n-2.0481088314258173e+01\n1.3659014344399440e+01\n3.0089031469295717e+00\n-2.9482120254161160e+01\n1.5100132968157697e+01\n1.1441257655022401e+00\n-2.5867749412600812e+01\n-1.0160941796632501e+00\n2.4756641234466046e+00\n-2.2638003991294422e+01\n-5.2978560455536066e+00\n1.3633825427197300e+01\n-4.7758437177464664e+01\n-3.9693854550571639e+00\n1.4243597804906971e+01\n-4.9754347448309140e+01\n1.4873964605969878e+01\n1.3461270245317611e+00\n-2.6295184848234729e+01\n8.5356032756341205e-01\n1.2549649683529895e+00\n-2.0594381833586528e+01\n7.4911233307325253e-01\n1.2657819467491411e+00\n-2.0639387908641201e+01\n-5.4290270024191303e+00\n1.3620506899118398e+01\n-4.8073188015560525e+01\n1.0835684318880627e+00\n1.1408215531617953e+00\n-2.0497374163635886e+01\n2.9290736274973401e+00\n8.7988524498642173e-01\n-2.0518379419503834e+01\n1.3790348786812398e+01\n2.0094641931226866e+00\n-2.7463165614098354e+01\n1.3854933912562467e+01\n2.2334452448309534e+00\n-2.8050596245349752e+01\n1.3854933912562467e+01\n2.2334452448309534e+00\n-2.8050596245349752e+01\n-1.1473021469465346e+01\n1.2026363811846810e+01\n-4.2045318593313816e+01\n-1.0851783362319411e+01\n1.2175940749415147e+01\n-4.2601088259017196e+01\n1.4618659179002877e+01\n1.5274665621003576e+00\n-2.6891823931273695e+01\n1.4618659179002877e+01\n1.5274665621003576e+00\n-2.6891823931273695e+01\n1.2912449889896543e+01\n3.3341675326488773e+00\n-3.0372549999024947e+01\n3.0054141449782451e-01\n1.4452886300687464e+00\n-2.0961864712672028e+01\n3.8456548533934265e-01\n1.3663158326802269e+00\n-2.0829065834608681e+01\n1.2590079223398908e+01\n3.7062558185754959e+00\n-3.1166997335197170e+01\n1.2831996464905636e+01\n3.3622793467038301e+00\n-3.0522224157526100e+01\n8.4148004720156211e-02\n1.5065609846430021e+00\n-2.1129064710668789e+01\n2.5083081553723057e+00\n7.8498914318226864e-01\n-2.0267261330297874e+01\n1.2596140896289167e+01\n3.7113323099539985e+00\n-3.1267592008219591e+01\n1.2670039578062740e+01\n1.3890709888966442e+00\n-2.5733823029344720e+01\n1.4257132430256325e+01\n1.5309232795316605e+00\n-2.6793051774454238e+01\n1.3822358298055786e+01\n1.9472293121643740e+00\n-2.7757300158207659e+01\n-9.6815563197455923e+00\n1.2330193586949363e+01\n-4.3965108590484959e+01\n-6.8549063330226438e+00\n1.3289249630762720e+01\n-4.7269339182592056e+01\n1.3910583499890564e+01\n1.2091065820211624e+00\n-2.6014621205575938e+01\n-5.1190299688594596e+00\n1.3533588830822943e+01\n-4.8524328576833341e+01\n-5.0744304588765425e+00\n1.3673664981001828e+01\n-4.8980760530931299e+01\n1.3798940516896903e+00\n8.9210248926761171e-01\n-2.0376129005710361e+01\n-8.4040991777945102e+00\n1.2754048273640478e+01\n-4.5806114333792813e+01\n1.4359393230721288e+01\n1.7016877570748516e+00\n-2.7740307728943041e+01\n1.4049828144813810e+01\n1.3694259288009427e+00\n-2.6666209339484379e+01\n1.4444357182497285e+01\n1.5007513035093365e+00\n-2.7325682983075808e+01\n1.4652096658548416e+01\n1.0884848746882720e+00\n-2.6485195928422936e+01\n-1.2388627677822399e+01\n1.1649323344256828e+01\n-4.1443323947685130e+01\n-1.1699130712162891e+00\n2.1349466675455271e+00\n-2.2526017860555733e+01\n-1.2014390238415492e+01\n1.1927157346782948e+01\n-4.2236440338681405e+01\n1.4277015337363366e+01\n1.4376158213192727e+00\n-2.7045365351985872e+01\n-1.1355924189918268e+01\n1.2071143818857795e+01\n-4.3092029564480754e+01\n1.3076849750212077e+01\n2.9921789852097551e+00\n-3.0477785867662778e+01\n1.3076849750212077e+01\n2.9921789852097551e+00\n-3.0477785867662778e+01\n-1.0683432607875218e+01\n1.1919056193701497e+01\n-4.3145837401316804e+01\n1.3302357246401915e+01\n2.7165408316908830e+00\n-2.9932397884866795e+01\n6.8389926745395291e-01\n9.3444383882835924e-01\n-2.0545246425695129e+01\n3.5982534895817611e+00\n5.5458451578189216e-01\n-2.0728614178178677e+01\n1.4468605837186710e+00\n7.0299678005599975e-01\n-2.0317826774713076e+01\n1.3117836143430543e+01\n2.8481949087909331e+00\n-3.0398773536451927e+01\n-1.0506294143386114e+01\n1.2042964393749177e+01\n-4.3867142523741030e+01\n-1.0562230267665749e+01\n1.2106048053212598e+01\n-4.3752598570122863e+01\n1.2785927497057541e+01\n3.1883948712614596e+00\n-3.1139815480494786e+01\n6.2787723172522125e-01\n9.3581330671716412e-01\n-2.0594261183768641e+01\n-1.1699688388948349e+01\n1.2109934758174555e+01\n-4.3186972246614680e+01\n-5.5553184587703281e+00\n1.2943125297822149e+01\n-4.8187130577038637e+01\n3.8746356902414423e+00\n1.0880704090454278e+01\n-4.6762398643394441e+01\n3.9008654336558095e+00\n1.1137582846629552e+01\n-4.7187981703154158e+01\n4.6318510223195236e-01\n8.5973111949391212e-01\n-2.0370079143035355e+01\n1.4018687213660767e+01\n1.8309343754481320e+00\n-2.8518713776069024e+01\n-9.5385293471279109e+00\n1.2246117464268671e+01\n-4.4850152829337979e+01\n-9.5385293471279109e+00\n1.2246117464268671e+01\n-4.4850152829337979e+01\n-4.8939430877216443e+00\n1.3363908667734600e+01\n-4.9403075159038139e+01\n3.6792661201427683e+00\n1.1335792788533356e+01\n-4.8123449016937371e+01\n1.7931470795527382e+00\n5.3022662192013148e-01\n-2.0310001488427137e+01\n1.7931470795527382e+00\n5.3022662192013148e-01\n-2.0310001488427137e+01\n6.2733575209620867e+00\n-1.1811163021250579e+00\n-1.8070149437653786e+01\n-7.9062896731680099e-01\n1.4865654483490782e+00\n-2.1737105076599104e+01\n-1.3481532488667918e+00\n1.9027014747044855e+00\n-2.2616997995905326e+01\n-1.0487679569536175e+01\n1.1743896168025614e+01\n-4.4154005030793321e+01\n-1.0487679569536175e+01\n1.1743896168025614e+01\n-4.4154005030793321e+01\n1.2987261257388166e+01\n2.7967550449297298e+00\n-3.1012303524014680e+01\n-1.0406386550816270e+01\n1.1746438257843653e+01\n-4.3925486193252482e+01\n-1.6911613201181239e-01\n1.0090604241652679e+00\n-2.0962311675725889e+01\n1.2971587219802190e+01\n2.6718359658481119e+00\n-3.0955627783218954e+01\n1.4407712477211387e+01\n1.2427113326917829e+00\n-2.8138287791283048e+01\n1.3612935958019147e+01\n2.2625885105618848e+00\n-3.0226396977749577e+01\n-3.9920928538629663e-01\n1.0806790744579586e+00\n-2.1170949978760852e+01\n1.4446052840049328e+01\n8.7063164327211962e-01\n-2.7272425273703377e+01\n-3.4144969032646971e-01\n1.0126169480277170e+00\n-2.1158593797261585e+01\n-3.5150849428609854e-01\n1.0050267504222690e+00\n-2.1108697821548834e+01\n1.5863443297164898e-01\n7.8229157283312478e-01\n-2.0740090328303825e+01\n-1.0083307862170740e+01\n1.1653582445880016e+01\n-4.4496931265387900e+01\n-1.6317471956994214e+00\n2.3704848760395372e+00\n-2.4108780483215892e+01\n-8.5218499896556277e-01\n1.3125933894370267e+00\n-2.1707002360980134e+01\n-8.7060933598672241e-01\n1.2827879598922987e+00\n-2.1648266648607869e+01\n1.1713584403545003e+00\n4.2704944798220201e-01\n-2.0334514468800378e+01\n1.4497221606324734e+01\n1.0383047639733565e+00\n-2.7863196246669560e+01\n-4.3208397870121394e-02\n8.1591535560044304e-01\n-2.0860288683157421e+01\n-1.1408108961279881e+00\n1.5676271467204050e+00\n-2.2301515945467123e+01\n-1.1408108961279881e+00\n1.5676271467204050e+00\n-2.2301515945467123e+01\n-1.3814843859704642e+00\n1.6407570226355306e+00\n-2.2095283560845427e+01\n1.1909367845462726e+00\n4.0927494783920992e-01\n-2.0358497202738757e+01\n1.4244324726486683e+01\n7.7106792404008229e-01\n-2.7236351533443429e+01\n1.4244324726486683e+01\n7.7106792404008229e-01\n-2.7236351533443429e+01\n-3.5330529080385570e-01\n8.9872689392725791e-01\n-2.1061160389394466e+01\n3.2040075074897376e+00\n9.4650831581637201e-02\n-2.0533293037149839e+01\n3.6256870572382144e-01\n5.9181333596198993e-01\n-2.0603228784468300e+01\n3.6256870572382144e-01\n5.9181333596198993e-01\n-2.0603228784468300e+01\n4.7316056985033672e-01\n5.4322810379726205e-01\n-2.0552745645630811e+01\n9.8081884055974522e-01\n3.5849437112719279e-01\n-2.0374296098930042e+01\n6.8493766344991502e-01\n4.3778580071419332e-01\n-2.0461649090820782e+01\n1.3347924450946019e+01\n2.0870954342947194e+00\n-3.0301113668196351e+01\n-1.0562096666024301e+00\n1.2856298820433458e+00\n-2.1936322025172526e+01\n-3.9369355846970738e-01\n8.2508660463998507e-01\n-2.1091085932894138e+01\n-3.9553946786996508e-01\n8.2781204294803579e-01\n-2.1091162331133241e+01\n-3.9702276085976951e-01\n8.2273111371527030e-01\n-2.1086075144468285e+01\n1.3037752948087260e+01\n2.1287779164121892e+00\n-3.0484689321140284e+01\n1.4183662559263150e+00\n1.7512965615962120e-01\n-2.0271432019383873e+01\n1.4332880648256623e+01\n6.9050436872770793e-01\n-2.7466609209440996e+01\n1.4242312404693211e+01\n6.3166512339043324e-01\n-2.7363456837878985e+01\n1.4255639079181728e+01\n1.4629806471165144e-01\n-2.6266245070028784e+01\n6.2278216077419755e+00\n-1.5268175442426224e+00\n-1.8223761754948768e+01\n2.6265409428193038e+00\n-2.7581096631556212e-01\n-1.9737198293752499e+01\n2.6265409428193038e+00\n-2.7581096631556212e-01\n-1.9737198293752499e+01\n3.3069079552886129e+00\n-8.3351292064638816e-02\n-2.0587670150205930e+01\n1.3373352009028164e+01\n1.9610845095454204e+00\n-3.0560920727263607e+01\n1.4088040227922436e+01\n2.4150818929219209e-01\n-2.6559999121419892e+01\n1.5141023763583680e+01\n-7.3027765379174070e-01\n-2.4526780044782129e+01\n-3.5619456184911025e-01\n7.3273226042832396e-01\n-2.1138048209728023e+01\n1.3302425002460183e+01\n1.8292358528245469e+00\n-3.0325189656013663e+01\n-4.4164309499508176e+00\n1.1709429257791339e+01\n-4.8438856896170819e+01\n-1.8412001032765517e+00\n3.6603945552979327e+00\n-2.8353160891318161e+01\n2.9477564484084784e+00\n-8.8651644818730432e-02\n-2.0219225913824310e+01\n1.4381600235814123e+01\n3.0252559791294065e-01\n-2.6924658103517348e+01\n8.7578483027822063e-01\n2.0570967831099871e-01\n-2.0385166914587778e+01\n5.7310578432038212e-02\n4.6467565723711146e-01\n-2.0741843971430932e+01\n1.4927811294157376e+01\n-1.3572949354269892e-02\n-2.6473932842599037e+01\n-1.1516666154874137e+01\n1.1082619601539541e+01\n-4.4090344174424104e+01\n1.4001281805380682e+01\n1.0599082582689023e+00\n-2.8909547091478561e+01\n-2.1051294984180258e+00\n2.6831045202914847e+00\n-2.5769573289758210e+01\n-4.6426713709634432e-01\n6.4737378230276443e-01\n-2.1144684122917045e+01\n-2.5124951779402743e-02\n4.3845877146138351e-01\n-2.0783024988296084e+01\n-7.3137445552089755e+00\n1.1707371328593631e+01\n-4.7745908329254291e+01\n-1.1165038245802239e+00\n9.9333930014647587e-01\n-2.1817155519358106e+01\n-1.1142870286317166e-01\n4.3347466726205397e-01\n-2.0854111296811688e+01\n3.3199709088211455e+00\n-2.4053390286611073e-01\n-2.0639869363606632e+01\n1.1156461353254907e+00\n3.3014800325942770e-02\n-2.0320390132595907e+01\n-2.5730259534262019e+00\n3.5592522233475243e+00\n-2.8083918179067759e+01\n-2.3434285583898040e+00\n2.5132087107185366e+00\n-2.5509337518731382e+01\n-1.7011475657737304e-01\n4.3129496880952045e-01\n-2.0859719187432969e+01\n1.4529142717186255e+01\n-5.4975234571797960e-01\n-2.5354302019864349e+01\n-2.0337568115602539e-01\n4.4007163040076791e-01\n-2.0934035979256176e+01\n-4.2363980973093213e-01\n5.2645278164268117e-01\n-2.1074115504221282e+01\n1.4089252623184651e+01\n-1.2978471077593171e-01\n-2.6339858286366077e+01\n1.4089252623184651e+01\n-1.2978471077593171e-01\n-2.6339858286366077e+01\n1.5361221867036823e+01\n-3.6276846535066348e-01\n-2.6447493957081164e+01\n3.9703823865697230e-01\n1.7096545369154442e-01\n-2.0584267450228143e+01\n2.2935657557878120e+00\n-2.5885694707314999e-01\n-2.0343280505613201e+01\n1.4403679138479305e+01\n5.2135950619329874e-01\n-2.8439910609994378e+01\n-3.2213184554267427e-01\n4.0200343679312572e-01\n-2.0958544151433095e+01\n1.4541489535857052e+01\n2.2804524976175541e-01\n-2.7664146241938205e+01\n2.0945059346676724e+00\n-3.1518999803177211e-01\n-2.0291726211667275e+01\n2.0945059346676724e+00\n-3.1518999803177211e-01\n-2.0291726211667275e+01\n5.2828131567811076e-01\n1.6314375528698865e-02\n-2.0482804541383178e+01\n1.3925902636883629e+01\n1.1057989296555526e+00\n-3.0096271105552532e+01\n-2.7474286733213782e-01\n3.2826502420314274e-01\n-2.0972057846388616e+01\n1.0150716473838652e+00\n-1.3331073556388567e-01\n-2.0351478342729092e+01\n-2.3025069556501649e+00\n2.2630352658401822e+00\n-2.5264199325967507e+01\n1.1141087751660006e+00\n-1.6359606061631776e-01\n-2.0325243937799865e+01\n7.0798078379774393e-02\n1.3544968287542855e-01\n-2.0717727367819879e+01\n2.9453554772235377e+00\n-4.5426097227884210e-01\n-2.0491180076213386e+01\n1.3659809889374678e+01\n7.3995770642792635e-01\n-2.9029867458808980e+01\n1.3543461571746274e+00\n-2.4966595169297062e-01\n-2.0288283858529020e+01\n-7.5817277390214057e+00\n1.1191928209863502e+01\n-4.7719390946805866e+01\n7.0518062770421186e-01\n-1.3885657061498013e-01\n-2.0413396036389621e+01\n1.4087628656252926e+01\n-3.3101160207410257e-01\n-2.6673188349669374e+01\n9.9467199049763388e-01\n-2.1783336053031607e-01\n-2.0345421192673321e+01\n1.4240456873111256e+01\n6.0745614682999582e-01\n-2.9309670130210126e+01\n-2.5446120822008909e+00\n2.1103377055341381e+00\n-2.5082089099522076e+01\n1.0097239613277600e-01\n3.8648273594583789e-02\n-2.0704786822226541e+01\n1.4066939060830080e+01\n1.3508078143473962e-01\n-2.8071985522065305e+01\n1.4336934549166461e+01\n-3.7482399383499659e-01\n-2.6936699828047232e+01\n1.4643201340807822e+01\n5.9054091300360434e-02\n-2.8302086542879710e+01\n1.5314083740924339e+01\n-7.6150749012281516e-01\n-2.6496833722412919e+01\n2.5419480988794083e+00\n-5.2434263218852595e-01\n-2.0415661702719426e+01\n1.4504916262512622e+00\n-3.7730521582831789e-01\n-2.0305796912438794e+01\n1.4558378821429018e+01\n-1.3730474634258474e-01\n-2.7696781220089612e+01\n1.3916106565737071e+01\n5.1792457167207617e-01\n-2.9162211725231604e+01\n1.3907261863280477e+01\n6.7687263586995927e-01\n-2.9657124867317492e+01\n-3.2654368083726766e+00\n3.0113789448579888e+00\n-2.7312587930507288e+01\n-2.2111683327542231e+00\n2.0128864216908928e+00\n-2.5264474177549619e+01\n1.4035950255914800e+01\n-2.2814093869219843e-01\n-2.7207773148630558e+01\n-2.2020310026746656e-01\n7.7921165060383768e-02\n-2.0918000916969188e+01\n1.2533171443834183e+00\n-3.9667964696401609e-01\n-2.0328176720323377e+01\n1.4781998069501832e+00\n-4.5812931159821452e-01\n-2.0317010511163804e+01\n2.4146137570966304e+00\n-6.1975592351544351e-01\n-2.0361731058825033e+01\n3.3832278068719868e+00\n-6.8624466398555029e-01\n-2.0694056296187110e+01\n-2.4858185714348808e+00\n1.6481655852143786e+00\n-2.4420968210534166e+01\n1.4747896339539979e+01\n-4.7398567862038310e-01\n-2.7284348064035218e+01\n-3.0490220516221647e+00\n2.4314880534034953e+00\n-2.6465017884488677e+01\n-1.1319307866962497e+01\n1.0111907693719246e+01\n-4.4522655223661836e+01\n-2.4816378078601482e+00\n1.5966307918270501e+00\n-2.4445271716396896e+01\n1.3945046073088241e+01\n4.8670479567787295e-01\n-2.9725960422355410e+01\n4.1474331467844039e-01\n-2.7913839655174616e-01\n-2.0577738239779944e+01\n-9.7205626752017835e+00\n1.0742915827949437e+01\n-4.7135737154154029e+01\n5.0539212250933883e+00\n-1.1438780537319830e+00\n-2.0611486330269425e+01\n2.0852821823690131e+00\n-6.8472864121133858e-01\n-2.0391662015622916e+01\n-4.5801608547108827e+00\n8.8159797326826137e+00\n-4.4692821165194019e+01\n-2.9884859592869231e+00\n2.3583372749918792e+00\n-2.6605780221622506e+01\n1.4189391086073019e+01\n-1.1066040586810580e-02\n-2.8961781999205449e+01\n-1.9725304390964047e+00\n1.0290608769776415e+00\n-2.3421586808167842e+01\n1.4172819119382217e+01\n1.8477710859412100e-01\n-2.9494788732025491e+01\n1.4234502758339781e+01\n1.8725576195269633e-01\n-2.9562269341601628e+01\n-1.2092408717771581e+00\n3.3625792841091307e-01\n-2.1778091099572020e+01\n-1.2273582949654329e+00\n3.7062013315731018e-01\n-2.1819960416927209e+01\n1.4010589549583001e+00\n-6.4251770151716714e-01\n-2.0347601905891128e+01\n1.4004028459400685e+01\n-2.6306371400487560e-01\n-2.8513956680798735e+01\n-1.4983585002476678e+00\n4.8502526780641758e-01\n-2.2359996201175452e+01\n-8.0299077240955907e-01\n2.4573215771212240e-01\n-2.2044964999605302e+01\n3.4319634921584913e-01\n-4.3657616033067981e-01\n-2.0598740063451078e+01\n5.8939798022766023e+00\n-1.0329862249600710e+00\n-2.1864049968656637e+01\n1.1588091390845745e+00\n-6.8128217099070998e-01\n-2.0382499047135926e+01\n1.4129167953468224e+01\n-4.6994297530498802e-01\n-2.8249811452578466e+01\n1.4136540621530660e+01\n-4.4028727663393946e-01\n-2.8341270681141221e+01\n1.3879899832818213e+01\n2.1729419701470257e-02\n-2.9666955370022361e+01\n1.3834282624224256e+01\n3.6019593174430001e-02\n-2.9905627836322068e+01\n1.3879859919342751e+01\n-4.4920138463746470e-02\n-2.9639080749266707e+01\n1.4045694503782251e+01\n-4.1774421021017905e-01\n-2.8820469169835238e+01\n1.3957795400165482e+01\n-3.8164723507283155e-01\n-2.8709472845041685e+01\n1.4989155050074508e+01\n-1.3588801798240504e+00\n-2.6489632297037705e+01\n-1.4569512169311534e+00\n4.9208184661178977e-01\n-2.2879943506498478e+01\n3.0065684557039205e+00\n-1.2527454033994525e+00\n-2.0157849238824731e+01\n-3.7982740752490365e+00\n1.7829762140174696e+00\n-2.5481020692270963e+01\n-1.1284657771333011e+00\n1.3138371746435541e-02\n-2.1698928895788224e+01\n-9.3951014774096453e-01\n1.0260950546702007e-01\n-2.2084337803202693e+01\n3.0635332933506576e+00\n-1.0777281429448149e+00\n-2.0737507194065188e+01\n2.9504324895173079e-01\n-5.7825077541763414e-01\n-2.0698654479483491e+01\n5.5252897138944823e-01\n-6.9522963913440894e-01\n-2.0558627171695054e+01\n-2.4523568734841947e+00\n8.1640223257780287e-01\n-2.3510098067900632e+01\n-1.0648188089548700e+00\n-6.2126235586341345e-02\n-2.1611590742678004e+01\n1.3857236812421837e+01\n-5.2114231356562332e-02\n-3.0084858410325136e+01\n1.4889818707919074e+01\n-8.6010136175579655e-01\n-2.8354902702348941e+01\n9.0796971238395052e-01\n-8.0128370728693232e-01\n-2.0491058744937373e+01\n1.6034811363488441e+00\n-9.4511866653312593e-01\n-2.0435725373194504e+01\n-7.9645402507653962e-01\n-2.5158998732666854e-01\n-2.1353939029336324e+01\n2.8627097653469114e+00\n-1.1560569056861221e+00\n-2.0668740058221481e+01\n-8.3245529613162517e-01\n-2.4315230101391946e-01\n-2.1372824809939161e+01\n1.3906212948434639e+01\n-3.1476408947802470e-01\n-2.9902251717124443e+01\n-3.1749059970626098e-01\n-5.0403125539034044e-01\n-2.1053815415698850e+01\n-3.5232390077134879e+00\n1.3912966267580908e+00\n-2.5202049155848897e+01\n-1.1674763677567241e+00\n-1.7541968015946022e-01\n-2.1731817524741992e+01\n-1.1674763677567241e+00\n-1.7541968015946022e-01\n-2.1731817524741992e+01\n8.8688473443207475e-02\n-7.3732272925515863e-01\n-2.0811977890614305e+01\n-2.7334750964421350e+00\n6.9162074833999720e-01\n-2.3622530160491660e+01\n1.4555440118523675e+01\n-1.5253741474028268e+00\n-2.6947183399110973e+01\n1.9147580505328272e+00\n-1.2473436190151301e+00\n-2.0448656589673906e+01\n3.2357134367321616e-01\n-8.5487524038767937e-01\n-2.0705846230458455e+01\n1.5339565892298201e+00\n-1.1452502818870989e+00\n-2.0521271923230238e+01\n1.5314285274016295e+00\n-1.1470966519142449e+00\n-2.0501493352912703e+01\n1.4118655118274914e+01\n-6.5179127400529346e-01\n-2.9750313919627661e+01\n-5.9246435293099153e-01\n-5.6726130813609810e-01\n-2.1209385283617667e+01\n1.5614136665157583e+00\n-1.2145068658211602e+00\n-2.0557786678424780e+01\n-1.4485230480486138e+00\n-2.7334126874428499e-01\n-2.1914404561126101e+01\n-8.3872981678947647e-02\n-8.5355023770260585e-01\n-2.0934980043382271e+01\n-6.1166624886713550e-01\n-6.7291096897280178e-01\n-2.1262800243643557e+01\n-5.1783736387468060e-01\n-6.9660257551414850e-01\n-2.1258882954819324e+01\n9.5406062342330300e-01\n-1.2390767782989263e+00\n-2.0602494902347701e+01\n6.1398092961123429e-01\n-1.1532001377965775e+00\n-2.0687047288594965e+01\n6.5177075061187006e-01\n-1.1698805529514047e+00\n-2.0658509103126949e+01\n1.3856090638845760e+01\n-6.0252207840799943e-01\n-3.0856793860114941e+01\n-1.3373185307180369e+00\n-4.2385497096514413e-01\n-2.1971081511868881e+01\n1.3934975389795769e+01\n-5.5769346592262936e-01\n-3.1091127706097165e+01\n6.1563399922322297e+00\n-3.2538655989903846e+00\n-1.7936594074308527e+01\n1.5310382961164317e+01\n-2.1893856255908526e+00\n-2.7175254526634962e+01\n1.2819061552872519e+01\n-1.0315411514942916e+00\n-2.9014925583657416e+01\n-3.7427660458559870e+00\n6.1849965123775996e-01\n-2.4161698788825792e+01\n1.3217037641758083e+01\n-1.4090549515037825e+00\n-2.8210482307324803e+01\n-1.1858724765194393e+00\n-7.9772134062004885e-01\n-2.1349824831534477e+01\n-2.2725683999536219e+00\n-1.6896402228815513e-01\n-2.2856962615729628e+01\n1.4858939819037856e+01\n-2.2918880156433272e+00\n-2.7376582278530350e+01\n-2.0585198662016855e+00\n-3.3260653554186070e-01\n-2.2521949228874476e+01\n-2.1853932927240347e+00\n-4.3568649161026435e-01\n-2.2289195524204519e+01\n-2.0715374709351080e+00\n-3.8827166910086969e-01\n-2.2546439617437937e+01\n-1.7450126166537783e+00\n-7.3650752375728090e-01\n-2.1497989958346761e+01\n4.2173861402943720e-02\n-1.3877645675720820e+00\n-2.0543641358037469e+01\n5.5723521326606820e+00\n-3.7323094610431586e+00\n-1.6779963679509269e+01\n-1.7073719341674725e+00\n-7.8977502677425204e-01\n-2.1472383328837136e+01\n-1.7351332545541032e+00\n-7.8295293528201171e-01\n-2.1566184991977135e+01\n-2.2635591691533636e+00\n-3.2299826112141428e-01\n-2.2779527621727151e+01\n-4.0338284320701270e+00\n6.8544988563481402e-01\n-2.5160547990813157e+01\n-5.0554044061736891e-01\n-1.3711041720882537e+00\n-2.0529900874837324e+01\n4.1975587478439111e+00\n-2.3084449529651665e+00\n-2.0538479858400226e+01\n-1.4518346355051890e+00\n-9.8938836674393393e-01\n-2.1287095739895278e+01\n2.9703291574710855e+00\n-2.5178570415249841e+00\n-1.9411651346158688e+01\n-7.7239366827029521e-01\n-1.3646698284081524e+00\n-2.0771746748831195e+01\n-7.7433829786650266e-01\n-1.3604568984838254e+00\n-2.0777037425425782e+01\n-7.7476775450965352e-01\n-1.4069249395560202e+00\n-2.0789334406287409e+01\n2.9690690441590575e+00\n-2.7585950478793664e+00\n-1.8879712597082527e+01\n4.5193090314013551e+00\n-2.6382501401089598e+00\n-2.0324658972911788e+01\n1.4461247149600950e+01\n-2.3763252156266477e+00\n-2.8414086801589505e+01\n1.4867091934738584e+01\n-2.5422063406377844e+00\n-2.8310350169962277e+01\n-6.1220583224010594e-01\n-1.5392096360645235e+00\n-2.0662905276878242e+01\n-5.9318122486256453e-01\n-1.5517288548411665e+00\n-2.0690230888096288e+01\n-6.0078794697967608e-01\n-1.5594640080294286e+00\n-2.0665164346843298e+01\n-5.2761949862751722e-01\n-1.5590116306108626e+00\n-2.0634130263991977e+01\n-3.2432412841414906e+00\n-4.5217868940847294e-01\n-2.2758126986586699e+01\n-6.7871647651485407e+00\n3.5886679199424329e+00\n-3.4804093281015916e+01\n-3.1253063847760862e+00\n-5.3494431216126126e-01\n-2.2700651355566201e+01\n-7.3946101058618174e-01\n-1.5345364323524013e+00\n-2.0821581608764987e+01\n-3.6262030845252240e+00\n-3.9853696215671491e-01\n-2.2984238363787696e+01\n-4.9456082099656768e+00\n4.4948398876406692e+00\n-3.9538397147070341e+01\n-2.7004207281724746e-01\n-1.7338518154156937e+00\n-2.0580666152889563e+01\n1.7714558131350726e+00\n-2.2276038163149749e+00\n-2.0290814972422453e+01\n6.6875423174507495e-02\n-1.8262825670303440e+00\n-2.0460237633768493e+01\n-6.9675593032143217e+00\n3.3439908528846649e+00\n-3.4378243592069893e+01\n-1.7086365865321052e+00\n-1.1831900246545495e+00\n-2.1682957267555455e+01\n-1.7086365865321052e+00\n-1.1831900246545495e+00\n-2.1682957267555455e+01\n2.7772635352766667e-01\n-1.9477197715033974e+00\n-2.0466596938918389e+01\n2.7153128477878685e-01\n-1.9417029398520551e+00\n-2.0454249318167282e+01\n3.2934417407798593e+00\n-2.6949386771215011e+00\n-2.0006998031078790e+01\n-1.3257870545357577e+00\n-1.4198715936576363e+00\n-2.1347202315879045e+01\n-9.4975437449868372e-01\n-1.5938838121578400e+00\n-2.1052246781074501e+01\n4.0996807760822923e-01\n-2.0255684835212082e+00\n-2.0448515627075285e+01\n9.7606086734735309e-01\n-2.1828998361784864e+00\n-2.0305694144529966e+01\n-3.7306281534908448e+00\n-5.4508582167788511e-01\n-2.3203026431878115e+01\n-3.7306281534908448e+00\n-5.4508582167788511e-01\n-2.3203026431878115e+01\n-2.8489214404968450e+00\n-1.0956123584803990e+00\n-2.1854647772179362e+01\n-2.1138159176320906e-01\n-1.9490729511414642e+00\n-2.0670437403808261e+01\n1.9307251715614995e-01\n-2.0562518989014227e+00\n-2.0554171285561150e+01\n-1.3043504161410064e+00\n-1.5779293600665441e+00\n-2.1278477005000379e+01\n1.5425649999946311e+01\n-3.4843310723904546e+00\n-2.7408575175014878e+01\n-6.4621283240198997e+00\n4.0510020782941103e+00\n-3.8859790181789641e+01\n3.1800715609626939e-02\n-2.0755572912794427e+00\n-2.0601189511306803e+01\n-4.5906208195437461e+00\n2.1349707552243808e+00\n-3.3179670096504772e+01\n-3.6599693646890876e+00\n2.5610329353205574e+00\n-3.6152169680763350e+01\n-3.0992157743897768e+00\n-1.0742034228196780e+00\n-2.2471381519303399e+01\n1.5672548892219016e+01\n-3.9187563372666605e+00\n-2.6984203043465492e+01\n-2.8527553004461907e+00\n-1.4031621382814248e+00\n-2.1573709302950693e+01\n-3.0705101055965338e+00\n-1.1644320987800474e+00\n-2.2418288138505197e+01\n1.2439913876646404e-01\n-2.3448641030112558e+00\n-2.0315934917399019e+01\n-1.6752865995971982e+00\n-1.7965724502005476e+00\n-2.1024308771252333e+01\n1.9100190873469942e+00\n-3.0027408299679474e+00\n-1.9679997271078921e+01\n4.8592787340648963e-01\n-2.6261839506177909e+00\n-1.9715837605162108e+01\n-3.4081469837123453e+00\n-1.0085861209098186e+00\n-2.3221553559188223e+01\n-8.1858976526409197e+00\n3.3962832647683818e+00\n-3.7162912351899706e+01\n1.5534388036514952e+00\n-3.0617953197732484e+00\n-1.9424561919011268e+01\n2.0807814138091785e+00\n-3.0628600738602692e+00\n-1.9798439437319537e+01\n4.6091206214762828e+00\n-3.2942677712367363e+00\n-2.1044582093765801e+01\n1.4682636565042305e+01\n-4.1403186343968192e+00\n-2.6612164630642674e+01\n-6.8657648545597088e+00\n2.7441881672635797e+00\n-3.6558164294900067e+01\n-2.3164929636078604e+00\n-1.9281440800182483e+00\n-2.1527799878757104e+01\n-3.0540584320230098e+00\n-1.5979068216898435e+00\n-2.2432422274888662e+01\n2.0127984843762912e+00\n-3.2986629632045066e+00\n-2.0049035989922601e+01\n-7.2978838382526288e+00\n2.3338009321874411e+00\n-3.5612577391839878e+01\n-8.4806798696323948e+00\n2.5619841443882594e+00\n-3.5843114507588417e+01\n-1.7847164772547723e+00\n-2.3125870006949376e+00\n-2.1185995912575837e+01\n-2.6939029401077188e+00\n-1.9251863199943811e+00\n-2.2104790736532902e+01\n-2.8529370053734171e-01\n-2.8545468698198868e+00\n-2.0209173467436841e+01\n-2.8102565616501325e+00\n-2.0051992788035244e+00\n-2.1816778871077879e+01\n-1.4490556959962170e-01\n-2.9281869060634609e+00\n-2.0175642832199326e+01\n-2.5646645257874306e-01\n-2.9492064027720604e+00\n-2.0150744067744263e+01\n-2.7988492881532476e+00\n-2.0858814120380149e+00\n-2.1940553781322375e+01\n-1.9391281466629686e+00\n-2.3561827366513812e+00\n-2.1511416008777612e+01\n1.7658230139778219e+00\n-3.4827450461407699e+00\n-2.0254605366672919e+01\n-3.6093795133907727e+00\n-1.5893912160049319e+00\n-2.3409693707091879e+01\n1.6917379303540436e+00\n-3.4646337525294890e+00\n-2.0145143791840766e+01\n-6.0475994830856656e+00\n5.0348189202698079e-01\n-3.0774936592911057e+01\n-1.1228257415787151e+00\n-2.8744864638815697e+00\n-2.0667013520275795e+01\n7.7690642171106183e-01\n-3.4988456109417534e+00\n-1.9716245031810622e+01\n-6.5185125564066313e+00\n4.3463065979375248e-01\n-3.0571149623699164e+01\n3.4154394111971604e+00\n-3.9892177699626954e+00\n-2.0517226443292810e+01\n-2.6218694393866921e+00\n-2.3350671291006075e+00\n-2.2115521770313094e+01\n-2.6218694393866921e+00\n-2.3350671291006075e+00\n-2.2115521770313094e+01\n-3.5083491790320753e-01\n-3.1741206954227765e+00\n-2.0489482422765338e+01\n2.8231578015499057e+00\n-3.9082476713334113e+00\n-2.0459841064071107e+01\n-2.3473805931509109e+00\n-2.4488187039461051e+00\n-2.2110126964873356e+01\n-1.5859532852461458e-01\n-3.3459322667406930e+00\n-2.0525140210292506e+01\n-8.1315359304637500e+00\n1.2070995766888761e+00\n-3.3996709763029443e+01\n2.9525022843958300e+00\n-4.0721427845067453e+00\n-2.0602504085528157e+01\n-1.2325594526820220e+00\n-3.1461178975789066e+00\n-2.0686505764124927e+01\n-3.0786478783607207e-01\n-3.3449511331424255e+00\n-2.0693399470547376e+01\n-8.2912603947820163e+00\n1.0838747645655658e+00\n-3.4074046094190678e+01\n3.9771815324334381e+00\n-4.1897128968022725e+00\n-2.1327061677735816e+01\n-8.2200516787608624e+00\n1.0223608375758477e+00\n-3.3917891153734615e+01\n-3.4394055246330586e+00\n-2.1979509161226507e+00\n-2.3259754863130013e+01\n5.7791927474426497e-01\n-3.6806700912530363e+00\n-2.0353741499093882e+01\n5.2964544594501639e+00\n-4.9884350797389549e+00\n-2.0026066170074817e+01\n-9.1161135290513229e-01\n-3.2317148128305684e+00\n-2.0957839707222821e+01\n-1.2098882977100229e+00\n-3.1467489529574530e+00\n-2.1228983123465056e+01\n-9.4258887261236417e+00\n1.1421883531954811e+00\n-3.3866587585350665e+01\n4.9511325431467732e+00\n-4.3947255563771508e+00\n-2.2508222810185782e+01\n-6.5430314253064674e+00\n1.9893889245637206e-01\n-3.2695188864854579e+01\n-7.9929182403905408e+00\n-3.6611816092721967e-02\n-2.9945459325795746e+01\n3.6644490693517295e+00\n-4.3875547302689482e+00\n-2.1289391960138502e+01\n2.3087015618350923e-01\n-3.6392009170028912e+00\n-2.1463390903607181e+01\n2.8517966414580691e+00\n-4.3717749789630718e+00\n-2.0740515396781738e+01\n1.1231099845207890e+01\n-5.6189143694636208e+00\n-2.4504188709071741e+01\n7.1641773638907646e-01\n-3.9206876256201091e+00\n-2.0583264200255776e+01\n-4.2477540929689334e-01\n-3.6281642281606361e+00\n-2.1088732494677540e+01\n-2.7245299219351358e+00\n-2.8123122885909226e+00\n-2.2726781291423084e+01\n-2.7230522695510420e+00\n-2.8577910999329754e+00\n-2.2734382106076932e+01\n-2.7393570270512062e+00\n-2.9369139897345815e+00\n-2.2425966140499021e+01\n-2.8098385879872896e+00\n-2.8612057759213996e+00\n-2.2959766520174927e+01\n-2.8888470726613487e+00\n-2.9808872177257153e+00\n-2.2620003695784188e+01\n-9.2440568245849395e+00\n2.6512304273255788e-01\n-3.2875495673644700e+01\n-2.2221684429637505e+00\n-3.2702854152782979e+00\n-2.2097545583428413e+01\n-3.1600363490060177e+00\n-3.0007029018625113e+00\n-2.2502743672566435e+01\n3.2545485025368948e-01\n-4.1243982817975429e+00\n-2.0986370926364742e+01\n-3.2824883292804721e+00\n-2.7283353108707096e+00\n-2.4268405619743465e+01\n2.6962895614617590e+00\n-4.8353951068774688e+00\n-2.0903020521712776e+01\n-2.4987737950371831e+00\n-3.3388553654852511e+00\n-2.2376939487797355e+01\n-2.4434774596935913e+00\n-3.3167215902162508e+00\n-2.2860121106193052e+01\n1.5753352103107969e+00\n-4.6345354200543660e+00\n-2.1279798291030936e+01\n-1.8483755655604754e+00\n-3.6544969816914845e+00\n-2.2210860359065546e+01\n-1.4123679387800123e+00\n-3.8421847481766851e+00\n-2.1950226800724366e+01\n6.7518847994335329e-01\n-4.5334118489137003e+00\n-2.0884239966842237e+01\n6.7808758296121685e-01\n-4.5134232910634164e+00\n-2.0930762969205833e+01\n-5.0244004300063372e-01\n-4.1991251008172483e+00\n-2.1365145068558231e+01\n2.9222808139854806e+00\n-4.9748803354361000e+00\n-2.1662487804369920e+01\n2.9752770542950255e+00\n-5.0010438614472523e+00\n-2.1659487665860944e+01\n2.7197400270932652e+00\n-4.9334124635445349e+00\n-2.1674327962180126e+01\n-4.9057887712216269e-01\n-4.2346993883240787e+00\n-2.1474448897958027e+01\n6.9366722116523649e-01\n-4.6090095228878569e+00\n-2.1193192964622508e+01\n6.2094368088071528e-01\n-4.7012985851453104e+00\n-2.0787309084702539e+01\n-2.7283262251785323e+00\n-3.6162349219155381e+00\n-2.3794725432269949e+01\n-2.8056242071523432e+00\n-3.6108289161886380e+00\n-2.3612906992628538e+01\n-1.6386426736959789e+00\n-4.1369815790267843e+00\n-2.2471976487081438e+01\n-4.9259183420317615e-01\n-4.5748968934730980e+00\n-2.1743319090480128e+01\n4.8959546557785076e+00\n-6.0216372905383118e+00\n-2.2499897992157109e+01\n-6.9064722589720384e+00\n-2.3406461371679503e+00\n-2.9266976390043638e+01\n5.8935699584577439e-01\n-5.3730403885570395e+00\n-2.1262228113766106e+01\n-1.2594260165170139e+00\n-4.9311854411533407e+00\n-2.2048245459826191e+01\n-1.4080709398002671e+00\n-4.9955596442742500e+00\n-2.2431020592004490e+01\n7.2051443998947962e-01\n-5.6832666569122994e+00\n-2.1509132490182083e+01\n4.6824373218040011e-01\n-5.9053887228385236e+00\n-2.0843858445814220e+01\n4.8400163618082626e-01\n-6.1812433515328422e+00\n-2.0903254780677283e+01\n-3.5729687229321443e+00\n-4.8642896717137774e+00\n-2.3894034401578882e+01\n-3.5437727243869936e+00\n-4.8717770178168829e+00\n-2.3850956627143322e+01\n1.4803600042726761e+00\n-6.4176111361189712e+00\n-2.1172474646204382e+01\n-7.4834250339970190e+00\n-3.8448097117382334e+00\n-2.6937647361229988e+01\n-3.5069611004443635e+00\n-5.0978243201323226e+00\n-2.3761131219298807e+01\n-6.6706757105061127e+00\n-4.1003663397957348e+00\n-2.6820487029870375e+01\n-7.3462617851707197e+00\n-3.9893420255001444e+00\n-2.7056591107692373e+01\n9.4258841161153561e-01\n-6.7277430933888054e+00\n-2.1667223923380810e+01\n-1.7137095228050880e+00\n-6.0732827264234395e+00\n-2.2132261908061700e+01\n-1.4956746045935869e+00\n-6.2996556222899995e+00\n-2.2097263649284315e+01\n1.4613058322536249e-01\n-6.9104428739791457e+00\n-2.1621199122242917e+01\n3.3003347400228948e+00\n-7.8120712745384262e+00\n-2.1245998318991386e+01\n2.1533915437600299e+00\n-7.5138265398561668e+00\n-2.1300454373935544e+01\n-2.7065250828232870e+00\n-6.3302710408568634e+00\n-2.2653613666319469e+01\n3.5998812202915464e-01\n-8.1444479581692448e+00\n-2.0023007151780117e+01\n-6.3655473214757334e+00\n-6.2064599496364936e+00\n-2.3974007898928225e+01\n-2.6259598705995174e-01\n-8.0356182122490338e+00\n-2.0949897700965991e+01\n1.6170903478025098e+00\n-8.9172738866762931e+00\n-2.0496721245859753e+01\n1.5415701201091303e+00\n-8.7423180221903394e+00\n-1.9912527933648139e+01\n-8.5890342846106886e+00\n2.3496360892998339e+01\n-3.5417834736974946e+01\n3.3240193813636965e+00\n2.6832425709216619e+01\n-4.0797509131967033e+01\n6.7020638692199042e-01\n2.5865944728980214e+01\n-3.9545571633855864e+01\n5.9009332602465747e+00\n2.7914733016950127e+01\n-4.2627962464046135e+01\n7.3516226931943462e+00\n2.8825491193396900e+01\n-4.3817767994634934e+01\n3.5315399743995926e+00\n2.7263434224760058e+01\n-4.1657352380183760e+01\n5.5056721030708369e+00\n2.8134038412188602e+01\n-4.3062846842894665e+01\n1.0956584060522696e+01\n2.8800789459196732e+01\n-4.4065717777914266e+01\n1.3130219679113086e+01\n2.9796178833399519e+01\n-4.5657722983033409e+01\n6.2044884354164132e-01\n2.5781939470623893e+01\n-3.9877747130833633e+01\n1.0880026039216252e+01\n2.8282744239851731e+01\n-4.3842888730999739e+01\n1.1489804933322905e+01\n2.8698799734418792e+01\n-4.3977306107710248e+01\n7.9572923741987180e+00\n2.7482414655317495e+01\n-4.2874081805000699e+01\n1.0761520729134553e+01\n2.8716191708284036e+01\n-4.4550523348165150e+01\n1.4235383713285728e+01\n3.0404619794889634e+01\n-4.6957688775080882e+01\n1.4663815099643802e+01\n3.0920042876995719e+01\n-4.7863826507932757e+01\n9.1245408457032333e+00\n2.8122921912545173e+01\n-4.3786776196363334e+01\n4.8739540400260379e+00\n2.7128290138125340e+01\n-4.2513621308270018e+01\n4.9995984181634352e+00\n2.6862855973956645e+01\n-4.2004708776169032e+01\n9.7073451290418671e+00\n2.8845419732573227e+01\n-4.5096038982946475e+01\n5.4525624279230795e+00\n2.7548280689118581e+01\n-4.3427035998749297e+01\n4.8317549056491726e+00\n2.7289808492269508e+01\n-4.3100537262527936e+01\n4.5159941530692285e+00\n2.6876129776546804e+01\n-4.2831201982666549e+01\n1.4793548451395701e+01\n3.0289574193479734e+01\n-4.7665621412755961e+01\n1.5029566100223567e+01\n3.0679630292906626e+01\n-4.8079189996407209e+01\n5.3585957922702505e+00\n2.7541243160706969e+01\n-4.3849526959384853e+01\n4.7831862992606897e+00\n2.6965283919356004e+01\n-4.3272301663046747e+01\n1.4839194606073733e+01\n3.0813843390820708e+01\n-4.9159292396707293e+01\n5.7456432386736740e+00\n2.7000305218298216e+01\n-4.3889839859439697e+01\n1.5943177920569866e+01\n3.0730870090858019e+01\n-4.9318499058299764e+01\n-3.5259681750637064e+00\n2.2615607654513276e+01\n-3.7439801902351988e+01\n-2.3260506414176674e+00\n2.4097818924076229e+01\n-3.9446483164766853e+01\n4.6303843122400936e+00\n2.6431790419968280e+01\n-4.2930770336211062e+01\n1.0909978206516083e+01\n1.5680143543130095e+01\n-2.9328287715637728e+01\n1.0058679990549896e+01\n1.4854588816772898e+01\n-2.8306646853354280e+01\n1.1755916650594727e+01\n1.5895452129337437e+01\n-2.9631472729599846e+01\n3.8879122365169736e+00\n2.6340869328677528e+01\n-4.2726208233770194e+01\n6.4680262347689199e+00\n2.7046836989937329e+01\n-4.3986077291244619e+01\n3.6372772995582916e+00\n2.5987883610737669e+01\n-4.2542645758894167e+01\n1.0912054743283033e+01\n1.5510798968557010e+01\n-2.9295199114292615e+01\n1.1703806354412043e+01\n1.5955362447065445e+01\n-2.9862710255866592e+01\n1.0077272830976147e+01\n1.4973504418062783e+01\n-2.8662537792806482e+01\n5.9593396026539232e+00\n2.6303472363086055e+01\n-4.3091579423562820e+01\n1.3193920561958359e+00\n2.5682331992075849e+01\n-4.2166825903546531e+01\n1.3496796609544532e+01\n1.6229490147472006e+01\n-3.0556400577341915e+01\n2.7775362578756182e+00\n2.5636874776961918e+01\n-4.2255859113437097e+01\n1.1823988929302772e+01\n1.5839536227820311e+01\n-2.9854633495414650e+01\n6.9015491139169702e+00\n2.6839631302531650e+01\n-4.4103172266949223e+01\n1.2186782781132576e+01\n1.6655025267969709e+01\n-3.1042496730516035e+01\n-2.1602182425043721e+00\n2.4167923434925267e+01\n-4.0070785112471249e+01\n-3.8524668605370160e+00\n2.2938894778084194e+01\n-3.8178862678483078e+01\n3.1570486494551573e+00\n2.5716750213760580e+01\n-4.2507756756372679e+01\n6.5597199702113942e+00\n2.7076859160564151e+01\n-4.4420753770023623e+01\n2.6265432226154735e+00\n2.6175809177877955e+01\n-4.3243842325016331e+01\n2.7652695159815575e+00\n2.6187285731847641e+01\n-4.3278215130605957e+01\n1.2624470845924961e+01\n1.5707769998696108e+01\n-2.9955330719857901e+01\n1.2274488963228031e+01\n1.0010899595320984e+01\n-2.2788502321311618e+01\n-7.8436036590132812e+00\n2.1492119959925173e+01\n-3.6120492239259839e+01\n-7.5238029949076859e+00\n2.1357105713187590e+01\n-3.5955237715496430e+01\n-6.0259503353117152e+00\n2.2042281143866642e+01\n-3.7078211804244049e+01\n-3.6988051346947182e-01\n2.4988367745304231e+01\n-4.1648713946014929e+01\n-8.3039870759895980e+00\n2.1460919838093766e+01\n-3.6307532046472822e+01\n4.9830917945456923e+00\n2.6026544046309859e+01\n-4.3370221405680994e+01\n1.7117690515899710e-02\n2.4637591385571358e+01\n-4.1220057799742918e+01\n2.7899296039589494e+00\n2.5201154288475941e+01\n-4.2075759156753911e+01\n-6.4256392718720168e+00\n2.2092128485933404e+01\n-3.7393222971298350e+01\n5.3158250944052234e+00\n2.6261552774549976e+01\n-4.3890177783131662e+01\n-4.9955751067744352e+00\n2.2641369800113981e+01\n-3.8256457878780481e+01\n-3.7508819834091072e+00\n2.2628948421734201e+01\n-3.8334490837888225e+01\n1.0229492477804683e+01\n1.4877837000923545e+01\n-2.9132085676182090e+01\n1.2457535802142440e+01\n1.5759195308493297e+01\n-3.0377423572089675e+01\n2.2674536631044901e+00\n2.5034270175783522e+01\n-4.2052172798371281e+01\n-3.9000777933499933e+00\n2.2740551600814236e+01\n-3.8610849799187889e+01\n7.3432550523247304e+00\n2.6715774650946983e+01\n-4.4797380649234952e+01\n1.4560480041480460e+01\n2.9553918678260757e+01\n-4.9209423731779047e+01\n1.2856526681801002e+01\n1.6627283508454777e+01\n-3.1784337875305130e+01\n1.2856526681801002e+01\n1.6627283508454777e+01\n-3.1784337875305130e+01\n8.7490953098927058e+00\n9.2342738733900838e+00\n-2.1590517930026703e+01\n1.2068340773268032e+01\n1.0245371693133878e+01\n-2.3429881570481609e+01\n8.9525530061011618e-02\n2.4341548870970616e+01\n-4.1243251992863989e+01\n5.9802429574993283e+00\n2.6318026604084277e+01\n-4.4246992990415784e+01\n5.7108291737862640e+00\n2.6176380492869274e+01\n-4.4071334440677120e+01\n2.4868851299961312e+00\n2.4988423894646569e+01\n-4.2482945452000955e+01\n6.0396564800494694e+00\n2.6478075706047736e+01\n-4.4579803433686372e+01\n-7.7795622981446977e+00\n2.0998936596617479e+01\n-3.6117953015648403e+01\n5.9536658340123649e+00\n6.3251834925674588e+00\n-1.7582126283841497e+01\n4.4533565887703643e+00\n2.5830170787702009e+01\n-4.3922583523755314e+01\n1.3258711527048920e+01\n1.7199067047440060e+01\n-3.2929768742721045e+01\n9.0278667207156484e+00\n7.0163409465147542e+00\n-1.8809875360836912e+01\n-1.3009052802490661e+01\n1.9226640821867932e+01\n-3.3453827715094789e+01\n2.8442749893286958e+00\n2.5105423183155299e+01\n-4.2733126166259012e+01\n3.2556521865938635e+00\n2.5982512947861380e+01\n-4.4101449766824402e+01\n2.8442749893286958e+00\n2.5105423183155299e+01\n-4.2733126166259012e+01\n6.0100846691671546e+00\n2.6396700282448673e+01\n-4.4814547982718025e+01\n-1.3047463579154257e+01\n1.9122653716798030e+01\n-3.3329509317726341e+01\n-8.3209240857072029e+00\n2.0557663522680446e+01\n-3.5694906996575249e+01\n1.3082243947111026e+01\n1.0006609312806644e+01\n-2.3428719285246107e+01\n1.6347732500372679e+01\n2.9914472434827040e+01\n-5.0593797956234141e+01\n-1.0780754602686780e+01\n2.0030132786980484e+01\n-3.4943140978714126e+01\n4.9287042805835704e+00\n4.6800230770651163e+00\n-1.5482914984425534e+01\n-7.9236121111615976e+00\n2.0910626191259627e+01\n-3.6346983796716472e+01\n7.4117124467481057e+00\n2.6029665219040474e+01\n-4.5005748031447965e+01\n2.3493993637346624e+00\n2.4670645262135551e+01\n-4.2621289611862053e+01\n8.9422509471528162e+00\n6.0920485281447201e+00\n-1.7907097935882785e+01\n1.3794056461983264e+01\n2.7369976792803211e+01\n-4.7515318896000714e+01\n1.3850473472060155e+01\n2.8690238464675851e+01\n-4.9328526794028726e+01\n8.1176855584070413e+00\n2.6037946018390947e+01\n-4.5386840801560787e+01\n2.9129465567672255e+00\n2.1711915176545666e+00\n-1.2112551268055944e+01\n1.9594770289881647e+00\n2.4330548954325430e+01\n-4.2680085305996826e+01\n1.1850004339240058e+01\n1.5584862819399175e+01\n-3.1643052330729663e+01\n1.2430176969058422e+01\n1.6172015269734597e+01\n-3.2383266141717847e+01\n1.1677526455407095e+01\n2.6718489692213190e+01\n-4.7097820905626250e+01\n3.0510576612916401e-01\n2.3656453878658752e+01\n-4.1854612580519216e+01\n2.2226146313868735e+01\n3.0271441217267945e+01\n-5.2975554712269648e+01\n-1.2767504000226648e+00\n2.2904866548642467e+01\n-4.0727892259194533e+01\n-1.0578688884239260e+00\n2.3108427465142331e+01\n-4.1174310407508663e+01\n-1.0578688884239260e+00\n2.3108427465142331e+01\n-4.1174310407508663e+01\n-1.1645871757653538e+01\n1.9212956973081852e+01\n-3.4590560692846886e+01\n1.1989305517044709e+01\n1.5632086479746297e+01\n-3.2009601096928250e+01\n-7.0158788350470591e-01\n2.3053294858775832e+01\n-4.1396065151718702e+01\n-6.9858501189078959e-01\n2.3004577223080496e+01\n-4.1339970591559251e+01\n3.8047237700503760e+00\n2.4179459085576131e+01\n-4.3519227309476193e+01\n-2.6415687552480482e-01\n2.3265648248867297e+01\n-4.1776144670057064e+01\n1.6837041478863949e+01\n2.8140799766819129e+01\n-5.0070781189496188e+01\n1.9186239778699981e+01\n3.1163629690476359e+01\n-5.4877477476249290e+01\n5.8849113349391953e+00\n2.5677801251253303e+01\n-4.5764752498249194e+01\n6.8295100782325164e+00\n2.6511468078845375e+01\n-4.7198558663470209e+01\n-1.0540700392477040e+00\n2.2925353491195011e+01\n-4.1395293068440957e+01\n-1.0277223988357123e+00\n2.2856197731995895e+01\n-4.1244562161310228e+01\n-1.0689883909274775e+00\n2.2800511410977851e+01\n-4.1230629714722184e+01\n-1.0578572511762738e+01\n1.9319103297991063e+01\n-3.5086883049293014e+01\n-8.9049043131803103e+00\n2.3861873107312789e+01\n-4.1586988334575402e+01\n-9.1865845097512260e+00\n1.9430114495782053e+01\n-3.5568850479908193e+01\n9.9349800464971119e-02\n2.3620606918724363e+01\n-4.2611471256324755e+01\n5.8491725808328772e+00\n2.5267001118520081e+01\n-4.5478695360887819e+01\n1.2206886303572283e+01\n2.7211007226270212e+01\n-4.8857877771663794e+01\n5.0900034385046862e+00\n4.0617684119967352e+00\n-1.5608443700202624e+01\n1.2576311293085059e+01\n2.7276027598104882e+01\n-4.8925519795829032e+01\n-8.8467530993153272e+00\n2.0072169285777015e+01\n-3.6696423003180925e+01\n1.1950513696200506e+01\n2.7268745046422133e+01\n-4.8919488176481664e+01\n3.9224265134834813e+00\n2.5421743883127856e+01\n-4.5636003939040400e+01\n1.2379752825784397e+01\n9.8790429220841176e+00\n-2.4375565437776505e+01\n5.4992633698796434e+00\n2.4911495434794393e+01\n-4.5162385235180025e+01\n1.5093592787247372e+01\n2.7384622636906577e+01\n-4.9356507786313500e+01\n1.3993852947899422e+01\n1.4606058730171922e+01\n-3.1342435246917937e+01\n-9.7256317107404548e+00\n2.3616761340732346e+01\n-4.1477121077672741e+01\n-1.2474315614674390e+01\n1.8447800520190434e+01\n-3.4114349659909230e+01\n3.4551057119776711e+00\n2.3763035014424965e+01\n-4.3546549831154394e+01\n-1.1442088351300599e+01\n1.8993713257294591e+01\n-3.5060824212931699e+01\n-9.1877474475309242e+00\n1.9608392130320794e+01\n-3.6117986159009028e+01\n-1.2530846135817884e+01\n1.8382227589441385e+01\n-3.4228661394337323e+01\n1.2835398963845243e+01\n2.7401589937803003e+01\n-4.9714483960753689e+01\n2.7130157070684726e+00\n2.3817662328470270e+01\n-4.3728734778936015e+01\n1.2441685303940105e+01\n2.7010722467212894e+01\n-4.9387398674256410e+01\n1.2967161582675590e+01\n2.5813271493730220e+01\n-4.7919388483640233e+01\n1.3099047718028817e+01\n1.0985128444046643e+01\n-2.6963501118276579e+01\n2.2339687200780070e+01\n3.1691714514278011e+01\n-5.7816892929573157e+01\n2.2339687200780070e+01\n3.1691714514278011e+01\n-5.7816892929573157e+01\n-9.0002827681398512e-01\n2.2410018293364054e+01\n-4.1815026838004030e+01\n-1.5527579054599026e+00\n2.2190592969584195e+01\n-4.1632239469705844e+01\n-2.0295312412490842e+00\n2.1905266881337582e+01\n-4.1048766518450584e+01\n9.4931576072582722e+00\n2.5351406656093136e+01\n-4.7451369912627101e+01\n-1.0958646561162519e+01\n1.8369057868225500e+01\n-3.5004955484682533e+01\n1.3933159734603140e+00\n2.3144036497637209e+01\n-4.3428762188612346e+01\n9.7916583417904732e+00\n2.5692099350904826e+01\n-4.8180667467043058e+01\n4.3368631509278268e+00\n2.4146425459803577e+01\n-4.5382251310644072e+01\n1.2037727035971724e+01\n2.6432901934339792e+01\n-4.9418042951626326e+01\n2.7861095132975910e-01\n2.2960938617157431e+01\n-4.3289856462445044e+01\n6.3755872069333455e+00\n2.4786487098732504e+01\n-4.6726180021124904e+01\n1.4424345272663192e+01\n1.2787985058531824e+01\n-2.9985720478312434e+01\n5.4841258872931427e+00\n2.3972361126956926e+01\n-4.5444237605323231e+01\n8.7419517277140706e+00\n2.6253722795757298e+01\n-4.9317246517014858e+01\n-8.6577953303315667e+00\n1.9608543052010525e+01\n-3.7432716409798317e+01\n1.1883181707610383e+01\n2.6371948005374524e+01\n-4.9958254473695156e+01\n-9.1580775586690262e+00\n1.9058410749661796e+01\n-3.6526930095186209e+01\n1.2781150951243140e+01\n1.1656274917934589e+01\n-2.8228465811110365e+01\n-9.0362688008670062e+00\n1.9089351796063092e+01\n-3.6586428080787918e+01\n-2.4212068282874459e+00\n2.1588369135046122e+01\n-4.1356916977437074e+01\n1.3198200282904120e+01\n9.5519422022513201e+00\n-2.5476084504637491e+01\n1.2917258780854848e+01\n9.4146921287679479e+00\n-2.5103712848906238e+01\n1.4221459158103954e+01\n8.1793773025792103e+00\n-2.3616492242581280e+01\n3.6747088715188742e-01\n2.2854843014910617e+01\n-4.3584861366500377e+01\n8.5569247476024266e+00\n2.4862746262765452e+01\n-4.7487145074131590e+01\n1.5199554385618352e+01\n2.6055906101603611e+01\n-5.0160477828090308e+01\n-3.1510901023891660e+00\n2.1430396998160411e+01\n-4.1142325057873634e+01\n9.0788186946807539e+00\n2.4747812899374573e+01\n-4.7817149922170607e+01\n9.3752410965450839e+00\n2.5282599414642856e+01\n-4.8536445802179301e+01\n1.4856608128889690e+01\n1.3316601024572636e+01\n-3.1686199455618588e+01\n-3.3314859200002402e+00\n2.1163215463114977e+01\n-4.1026709424680597e+01\n-3.3862438648700244e+00\n2.1077270168913518e+01\n-4.0743144162767877e+01\n1.5521857356956502e+01\n2.6301919673110000e+01\n-5.0756724205296372e+01\n9.0189538616726885e+00\n2.4901589479610823e+01\n-4.8057861624377331e+01\n8.5898802887519476e+00\n2.4350256157732762e+01\n-4.7246429978188623e+01\n-1.1740431849821363e+01\n1.8151973431238027e+01\n-3.5529421207093897e+01\n5.3434161831103832e+00\n2.3252946592725980e+01\n-4.5424113217185720e+01\n6.4115649413372194e-02\n2.2271403886328613e+01\n-4.3361274714791662e+01\n6.4476966692726387e-02\n2.2153931912017388e+01\n-4.3118581018104763e+01\n1.2211175911036024e+01\n2.5137681817476295e+01\n-4.8866238398225256e+01\n2.7023845623776821e+00\n2.2696445022728849e+01\n-4.4328508990697195e+01\n-6.1159393745322244e-01\n2.1993850630495174e+01\n-4.2999540083591619e+01\n4.3312494429417558e+00\n2.3328917739015580e+01\n-4.5597498772880812e+01\n-6.1422074139163003e+00\n2.0065743223064722e+01\n-3.9507087092499503e+01\n-8.8771994137999020e+00\n1.7356444532166766e+01\n-3.5072996625103684e+01\n1.0751697660368055e+01\n2.6389118045973021e+01\n-5.1411190808861903e+01\n-2.2409916929791796e+00\n2.1156682179713638e+01\n-4.1773601031477135e+01\n-7.2188944508100406e+00\n1.9336910691287173e+01\n-3.8432918640161475e+01\n1.0289535520014585e+01\n2.5358871005677120e+01\n-5.0102151163625891e+01\n9.4396210909210598e+00\n7.1368875383681152e+00\n-2.2111959319956124e+01\n1.4374083558962225e+01\n1.4147853359994306e+01\n-3.3761478810956554e+01\n-5.9604644931682911e+00\n1.9515000937225825e+01\n-3.9023432077162575e+01\n1.2647267013248783e+01\n8.5096409395753092e+00\n-2.4877102928705323e+01\n-7.7018723399892428e+00\n1.9206685014928105e+01\n-3.8328499663342029e+01\n1.4498926189359411e+01\n1.2373123011517208e+01\n-3.0958365267757003e+01\n2.8183997525242699e-01\n2.1767586946772109e+01\n-4.3501845276011672e+01\n-7.5351118655470248e+00\n1.9206277203473466e+01\n-3.8475221479569939e+01\n5.3124431416960292e+00\n2.2886230599646598e+01\n-4.5722363667584396e+01\n-7.3931099385478962e+00\n2.1495678920998696e+01\n-4.1895774504189774e+01\n-8.1164015227649458e+00\n1.8962612391797354e+01\n-3.8420136409007760e+01\n-1.2796246431064864e+01\n1.7196122213935151e+01\n-3.4908661521771265e+01\n-7.9422289647376729e+00\n1.8585158004125418e+01\n-3.8015186804355103e+01\n6.3219461785039393e+00\n2.3195022093298899e+01\n-4.6633764201544246e+01\n-8.8758032632004316e+00\n1.8871511182325808e+01\n-3.8425781867931704e+01\n-8.4135849589477019e+00\n2.0936271223584683e+01\n-4.1159351038667339e+01\n5.9470945731858071e+00\n2.3232609319147752e+01\n-4.6825812154893157e+01\n5.8881292226906590e+00\n2.2987249761553986e+01\n-4.6245591113352639e+01\n1.5938644523194000e+01\n2.5966876334815318e+01\n-5.2266298409988330e+01\n-9.0912516129197432e+00\n1.8766638977091525e+01\n-3.8419809065424133e+01\n-9.0912516129197432e+00\n1.8766638977091525e+01\n-3.8419809065424133e+01\n-7.5448704202376442e+00\n1.9227422820508888e+01\n-3.8941739219631899e+01\n-7.5318121818252814e+00\n1.9164130991927198e+01\n-3.8870749725104204e+01\n5.5229879622962619e+00\n2.2435014760456685e+01\n-4.5573460371087933e+01\n-7.3889170842128999e+00\n1.9095469281675790e+01\n-3.9079770072192943e+01\n-8.1039307887666414e+00\n1.8668766476120016e+01\n-3.8278992240737296e+01\n-1.2184782481778884e+00\n2.0962497867390805e+01\n-4.2708864119814500e+01\n-1.2790239927385265e+01\n1.6901724102965918e+01\n-3.4728820908117676e+01\n1.6106692962240297e+00\n2.2011993617371399e+01\n-4.4913052748994239e+01\n1.5956622975364068e+01\n2.5582426318421039e+01\n-5.2029207068628033e+01\n-1.2463386510951866e+01\n1.7217219865263200e+01\n-3.5315110507538741e+01\n-1.2180897257565073e+01\n1.7359323937118322e+01\n-3.5612644594346278e+01\n6.5217002950729128e+00\n2.3455860656968984e+01\n-4.7719595787926615e+01\n-1.2556364907586408e+01\n1.6809389406875297e+01\n-3.4783895311567576e+01\n1.2534498759186137e+01\n6.4173926824399654e+00\n-2.2293381963919423e+01\n-1.3985897845610593e+00\n2.1041660148115742e+01\n-4.3279585484214515e+01\n1.5763021777203006e+01\n2.6097044696161291e+01\n-5.3399597578698263e+01\n-7.3150993089304572e+00\n1.9128802385072099e+01\n-3.9685037763319798e+01\n-7.3647474570308553e+00\n1.9096089874702148e+01\n-3.9338857651797170e+01\n-7.2409551421661487e+00\n1.8643655888031564e+01\n-3.9065069919437740e+01\n-1.0358000915359819e+01\n1.8332849347229391e+01\n-3.8095691551197667e+01\n-1.3375398921519086e+01\n1.6826092778116656e+01\n-3.4831084818716143e+01\n-1.3375398921519086e+01\n1.6826092778116656e+01\n-3.4831084818716143e+01\n-7.1165932953798956e+00\n1.9178423457409934e+01\n-3.9968155810465944e+01\n-7.2290535714217850e+00\n1.8966757317429146e+01\n-3.9048093305445910e+01\n6.8462179983375711e+00\n2.3397204236764594e+01\n-4.8171119236772967e+01\n7.2892694264615079e+00\n2.3322747229926385e+01\n-4.7967653664854815e+01\n-1.0445748203997169e+01\n1.7951982511930968e+01\n-3.7347180213109034e+01\n-1.0255538356751774e+01\n1.7489369693704436e+01\n-3.6742271355896236e+01\n-5.9031744727421342e+00\n1.9315453126886883e+01\n-3.9868838754882177e+01\n-4.0089697249089324e+00\n2.0073240089081022e+01\n-4.2018017500957001e+01\n-4.1134994792818347e+00\n1.9987755761019564e+01\n-4.1508683741350751e+01\n-4.0089697249089324e+00\n2.0073240089081022e+01\n-4.2018017500957001e+01\n-8.2012615963110527e+00\n1.8758494201918825e+01\n-3.9362824312848097e+01\n-8.1257342386275244e+00\n1.8278851663334883e+01\n-3.8629054162435928e+01\n-1.2539405880562361e+01\n1.6966218560637877e+01\n-3.5513022488620287e+01\n1.7464185127909910e+00\n2.1728802543568996e+01\n-4.5264106933200679e+01\n1.2394392707501837e+01\n9.6117926674842469e+00\n-2.7728046971428377e+01\n-1.2762811002779898e+01\n1.6788404006256151e+01\n-3.5267578491430406e+01\n-8.3339951427491368e+00\n1.8007541731888075e+01\n-3.8229096730342029e+01\n5.4078193286382605e+00\n2.2000651987056333e+01\n-4.6205018461610834e+01\n-1.3056232768818449e+01\n1.6820959143626659e+01\n-3.5308210105032501e+01\n-3.7493910865407960e+00\n1.9849694461272158e+01\n-4.1666965187055538e+01\n6.5805207302311413e+00\n2.2931038491588318e+01\n-4.8044736237451744e+01\n6.5805207302311413e+00\n2.2931038491588318e+01\n-4.8044736237451744e+01\n-2.4127976570336402e+00\n2.0469374441877207e+01\n-4.3019933112079670e+01\n7.0840054406336481e+00\n2.3019090882054481e+01\n-4.8305820627529258e+01\n7.1885235160881127e+00\n2.3150304621758664e+01\n-4.8471750045792831e+01\n-1.0670654580095636e+01\n1.7644713020971682e+01\n-3.7155459458380236e+01\n-1.0694807893549488e+01\n1.7710157559854000e+01\n-3.7236766989136029e+01\n-9.1585309613052637e+00\n1.8280146521494842e+01\n-3.8838160015266887e+01\n-9.2010267650612594e+00\n1.8039075042427118e+01\n-3.8250459555148097e+01\n-3.0835231927945452e+00\n2.0002670662958618e+01\n-4.2299695934306200e+01\n6.1585169752234332e+00\n2.2912184968830925e+01\n-4.8051823784263227e+01\n1.2606040142276960e+01\n1.0577684294743321e+01\n-2.9335187107707817e+01\n1.3196329884462568e+01\n6.4122418314337413e+00\n-2.3236598230729385e+01\n1.5867000397940294e+00\n2.1540638582996131e+01\n-4.5505364847052753e+01\n1.5806419995827505e+00\n2.1522238675180603e+01\n-4.5487907027641100e+01\n-8.4946314617252554e+00\n1.8141079145119004e+01\n-3.8825780470638627e+01\n-1.2629264806330912e+01\n1.6482739867984090e+01\n-3.5229778855438127e+01\n-1.2748567479929759e+01\n1.6413889847218876e+01\n-3.5144420857306962e+01\n1.6613816024552193e+01\n2.4639956811040800e+01\n-5.2895125803302641e+01\n1.8212745632877969e+01\n2.5664651006027349e+01\n-5.4812333376176007e+01\n1.8842998660766121e+01\n2.6450335115910875e+01\n-5.6122158653611933e+01\n3.2417776847997146e+00\n2.1826730014074474e+01\n-4.6756205960178640e+01\n1.0024808846915381e+01\n2.3574207427850386e+01\n-5.0446440275744116e+01\n1.3322885302207681e+01\n6.8441318749589346e+00\n-2.4405080111826411e+01\n1.3695598387264305e+01\n6.6882770107240068e+00\n-2.4200056970541421e+01\n-1.0086770038858440e+01\n1.7571513821390255e+01\n-3.7701037175555307e+01\n5.6939360373063490e+00\n3.0849695508190123e+00\n-1.7000464098614085e+01\n1.2840762114780620e+01\n2.3446943035405514e+01\n-5.0907288502043642e+01\n-5.7462917559881967e+00\n1.8876803690438358e+01\n-4.0885772745483251e+01\n1.7915191791268544e+01\n2.5857699077816637e+01\n-5.6021547972095064e+01\n-1.0194322782008333e+01\n1.7052164335901598e+01\n-3.7623028196743476e+01\n1.2436424586950536e+00\n2.0784889719647122e+01\n-4.5926681932528517e+01\n3.9227296245096444e+00\n2.0970618517235970e+01\n-4.6436673723596648e+01\n1.6621479893176417e+01\n2.4583980935681907e+01\n-5.4599196943428581e+01\n-1.1054422104891598e+01\n1.7158112423150239e+01\n-3.8243863296410751e+01\n1.3229815345268270e+00\n2.0734263617165752e+01\n-4.5989794568357986e+01\n-8.6703081495205705e+00\n1.7426646410599485e+01\n-3.9290589352076708e+01\n1.4695977813464964e+01\n1.0836377340364361e+01\n-3.2069701665912937e+01\n5.7588796563908424e+00\n2.1860846872955847e+01\n-4.8962358432371346e+01\n1.2975741493916697e+01\n1.0132922831819966e+01\n-3.0468423325389715e+01\n1.2311604726927966e+01\n7.2940015353180474e+00\n-2.5837881504101787e+01\n-9.0480809903454151e+00\n1.7357122369102402e+01\n-3.8868661738538343e+01\n-9.0336811118210676e+00\n1.7315455894857873e+01\n-3.8823693689537983e+01\n6.3083348664553354e+00\n2.2806139759320519e+01\n-5.0732136856534488e+01\n-7.0312971418555623e+00\n1.8007674239810672e+01\n-4.0494104411574220e+01\n1.8533515686842250e+01\n2.4690341821375672e+01\n-5.5955099735038054e+01\n1.0723834913784605e+01\n2.2936731488442984e+01\n-5.1924521004442660e+01\n1.2465630987529208e+01\n7.2189838446262948e+00\n-2.6171313376852304e+01\n1.6660723826493378e+01\n2.3834740780677286e+01\n-5.4586782270832067e+01\n-8.9529237252344149e+00\n1.7182627094363895e+01\n-3.9473342319368449e+01\n-3.3542737175632871e+00\n1.8805139632682508e+01\n-4.3311228085847503e+01\n-1.2538880866933882e+01\n1.5784262777300254e+01\n-3.6141431725013575e+01\n2.3507456542080050e+01\n2.7043482686215683e+01\n-6.2049122195388115e+01\n1.3867787090907354e+01\n2.4457876072736802e+01\n-5.6249490263401782e+01\n1.1807361079883531e+01\n7.3320257775710749e+00\n-2.6361860691501548e+01\n1.3029970498669941e+01\n9.8483743204717094e+00\n-3.0990453512996417e+01\n-4.0902573115164049e+00\n1.8528960988798620e+01\n-4.2822362805479706e+01\n1.0869716522089313e+01\n2.2865727350755769e+01\n-5.3151482833537870e+01\n1.2863251594822955e+01\n9.6764018723389000e+00\n-3.0618093688413037e+01\n1.2620676068634801e+01\n1.1362677549262754e+01\n-3.3692951922981557e+01\n-9.0086960919498225e+00\n1.6875598055707155e+01\n-3.9586770110145473e+01\n-1.2370207225250047e+01\n1.5858860666184066e+01\n-3.6708414323554770e+01\n1.0781366969056482e+01\n2.2359975783573859e+01\n-5.2247753305747082e+01\n1.1756108696295026e+01\n1.0556012577610277e+01\n-3.2267988194723699e+01\n-1.2148346019218536e+01\n1.3971272054409372e+01\n-3.3668250957911248e+01\n1.2608269105358287e+01\n1.1184246044570139e+01\n-3.3575650410247206e+01\n-3.4024786448392521e+00\n1.8416976696942992e+01\n-4.3507146864828606e+01\n-9.0756043602193675e+00\n1.6625035641526416e+01\n-3.9533373542236092e+01\n2.1783251988397300e+01\n2.5327273981390693e+01\n-6.0281283010163790e+01\n1.1769297875516051e+01\n7.8324430276160113e+00\n-2.8079116290181474e+01\n6.9931614470678936e+00\n2.1111863272771963e+01\n-5.0312171875674871e+01\n6.4133203213122734e+00\n2.0978293328268197e+01\n-5.0315662192662685e+01\n1.2952217645544209e+01\n5.7252373609035168e+00\n-2.4784984656542296e+01\n1.3010162574476313e+01\n1.0207157596078563e+01\n-3.2730945083781080e+01\n1.1934722376951772e+01\n7.2562722650391223e+00\n-2.7277226413067247e+01\n1.2129126161517222e+01\n8.8458853195814324e+00\n-2.9984145518952520e+01\n-5.9221426138926807e+00\n1.7189989198019262e+01\n-4.1838927636741531e+01\n1.1532055712249926e+01\n1.0823405104265561e+01\n-3.3564359078162880e+01\n1.3277886277317338e+01\n1.1059206741601564e+01\n-3.4574186399876936e+01\n1.3335449539708641e+01\n1.1099074961903391e+01\n-3.4678802168886051e+01\n-1.0732423565053779e+01\n1.6432437093218642e+01\n-3.9526586365280544e+01\n-1.0706593646512504e+01\n1.6093228689472209e+01\n-3.8550124480558225e+01\n4.0361828456177493e+00\n1.9843104377027757e+01\n-4.8526359911613277e+01\n1.3052150070398257e+01\n9.7322605220752880e+00\n-3.2265783963108184e+01\n-9.4474131780450126e+00\n1.6388158328222030e+01\n-3.9586124858587866e+01\n1.3608319177467449e+01\n1.0051809113424717e+01\n-3.3193804142285131e+01\n1.2160358516832481e+01\n6.1282297207579512e+00\n-2.5725066171440766e+01\n1.2666013262058071e+01\n1.0052711737423207e+01\n-3.2780119321421473e+01\n7.2599570924613159e+00\n2.1176437636141831e+01\n-5.1757331461551018e+01\n1.2011386751312566e+01\n9.2123907772133187e+00\n-3.1275902170269752e+01\n-1.0400287142742538e+01\n1.5965987210232607e+01\n-3.9193114909591962e+01\n-6.2002653802752272e+00\n1.6936280530874939e+01\n-4.1982129945054240e+01\n1.2530621727355074e+01\n9.2616320459410044e+00\n-3.1577102948436078e+01\n1.4056477786477590e+01\n2.2700628101058548e+01\n-5.6208684847699530e+01\n8.8314506367129511e+00\n2.0757943579949128e+01\n-5.1615294108066827e+01\n1.2397927464867537e+01\n6.6467839458986475e+00\n-2.7122450496744825e+01\n1.2409388069567438e+01\n4.5356302198818472e+00\n-2.3567747034676373e+01\n-6.0341030573499186e+00\n1.6754122461495104e+01\n-4.2308598222176379e+01\n1.3729338901618329e+01\n3.7350988237881526e+00\n-2.2498432682272792e+01\n1.5691217868984539e+00\n1.8942625443965504e+01\n-4.7899457670233517e+01\n-1.2381353330054417e+01\n1.5433636519031309e+01\n-3.8689701803984072e+01\n-1.0191716504154616e+01\n1.5888279701188219e+01\n-4.0146507319966730e+01\n1.3795857847436364e+01\n2.1073137751642136e+01\n-5.4706935253290908e+01\n-6.5708308646820237e+00\n1.6457022057030567e+01\n-4.2268695160397648e+01\n1.1742586013963535e+01\n5.6494332870847535e+00\n-2.6037076800644297e+01\n1.3806957879379397e+01\n9.9625841955142462e+00\n-3.4532966828204621e+01\n9.5229383225644426e+00\n1.9976765238859016e+01\n-5.1849812729277367e+01\n-5.1427407450085907e+00\n1.7133256096756021e+01\n-4.4117718295396010e+01\n1.2678652131284963e+01\n8.4479660962206715e+00\n-3.1570463975859631e+01\n8.8624465991389147e+00\n2.0922320220035214e+01\n-5.4198769479216537e+01\n1.3192556663278220e+01\n4.6656726404210680e+00\n-2.4845910071611282e+01\n-9.0528791323623654e+00\n1.5563400298561255e+01\n-4.0694147467142017e+01\n-9.4291682700036253e-02\n1.8131681775186156e+01\n-4.7112637467952865e+01\n7.0399685187533256e+00\n2.1418393541398657e+01\n-5.5168750139394220e+01\n1.2604856792890669e+01\n6.0825765923219990e+00\n-2.7714777731129004e+01\n-9.2469265391072875e-01\n1.7758522034141855e+01\n-4.6781448321660591e+01\n-2.7341567178707371e+00\n1.7247979661958407e+01\n-4.5625759015004107e+01\n1.1517497849557383e+01\n1.0032911555828392e+01\n-3.5034499864006300e+01\n7.8229041339728855e+00\n1.9732357971628730e+01\n-5.3050452116795142e+01\n-1.1245242053929498e+01\n1.5157922408524739e+01\n-3.9928895779926158e+01\n5.7095249172580842e-01\n1.8215907230384961e+01\n-4.8556571174089143e+01\n9.3280904999031709e+00\n2.0107148849116971e+01\n-5.4602417791169451e+01\n-1.2206293196524125e+01\n1.2762484657167052e+01\n-3.5041807384727285e+01\n-3.0619352558563242e+00\n1.6977897397383749e+01\n-4.5867776021348405e+01\n1.2111540159517361e+01\n5.8495514351076521e+00\n-2.7610789615167803e+01\n1.2832508408796258e+01\n5.9525653672722987e+00\n-2.8476286251425471e+01\n9.2941490774866473e+00\n1.9977293826233183e+01\n-5.4670006845014349e+01\n-1.2138680350133642e+01\n1.4382043949874392e+01\n-3.8471737009884194e+01\n-8.4567897008996660e+00\n1.5298096431343970e+01\n-4.1715950564729447e+01\n-1.2500500235766467e+01\n1.4532841342804936e+01\n-3.9293638720287973e+01\n-4.0588906163731417e+00\n1.6378300126332842e+01\n-4.5110854405914580e+01\n1.4247929682756114e+01\n2.2521747186317009e+00\n-2.1827794597645166e+01\n1.3085889025519840e+01\n5.0462541438816286e+00\n-2.7070399582186088e+01\n1.2786112086853088e+01\n8.0893698031849777e+00\n-3.2570025080070856e+01\n4.2830739089769381e+00\n1.8335103048438043e+01\n-5.1191986352036672e+01\n1.2370346717238400e+01\n8.9015383109642006e+00\n-3.4450409934792148e+01\n9.1290860807917595e-01\n1.7972386415948836e+01\n-4.9973435877063601e+01\n1.2586833894669809e+01\n3.4225023740078937e+00\n-2.4174507408960412e+01\n1.4279865880771398e+01\n4.0164327820634416e+00\n-2.5990987681080338e+01\n1.3907169948615811e+01\n2.6317784481999809e+00\n-2.3069847662307190e+01\n-1.1158407500714523e+01\n1.4553092453995990e+01\n-4.0100739876089996e+01\n1.4390617773897810e+01\n3.8635057139433706e+00\n-2.5831151590034271e+01\n1.3248613234102637e+01\n4.2812975354618334e+00\n-2.6309572627980220e+01\n1.6125418201725632e+00\n1.7337857005565578e+01\n-4.9606560107012548e+01\n8.5471454973831253e+00\n1.9135152979639550e+01\n-5.4776154087010930e+01\n5.9003237467599687e+00\n6.1641839741097149e-01\n-1.7048911679610143e+01\n1.2983445074056565e+01\n5.9877943322166889e+00\n-2.9819738337052325e+01\n1.3717435744056209e+01\n3.9418392204884003e+00\n-2.5974767737608605e+01\n1.1760564210312463e+01\n4.8445648361835216e+00\n-2.6898001327902062e+01\n-1.0006415747598526e+01\n1.4410851791639418e+01\n-4.1078745001817055e+01\n1.3215730163438062e+01\n9.4317367991380081e+00\n-3.7262131950777579e+01\n1.4243608468317360e+01\n3.5932874418080201e+00\n-2.5836919634002534e+01\n-3.3708886394209272e+00\n1.6042798937334499e+01\n-4.6347921968160158e+01\n1.3884953937676846e+01\n4.0734157503426456e+00\n-2.6785515673040294e+01\n-4.5201064535990048e+00\n1.5912602621912873e+01\n-4.5801195364264899e+01\n-4.5201064535990048e+00\n1.5912602621912873e+01\n-4.5801195364264899e+01\n1.1077320454762500e+01\n5.4629534591637370e+00\n-2.8459202640385467e+01\n1.2889046018663526e+01\n4.3233024520834178e+00\n-2.6917141489066655e+01\n1.3972369279954206e+01\n3.4605688060634696e+00\n-2.5539012208204394e+01\n1.4625146043595365e+01\n1.6929695374459506e+00\n-2.2151520770865361e+01\n-1.1128989584835731e+01\n1.4359720520447594e+01\n-4.1077048590876814e+01\n1.4372794791104118e+01\n2.7221404540499994e+00\n-2.4352209180657837e+01\n-1.7098744848782496e-01\n1.6847692533232031e+01\n-4.9352432611224266e+01\n1.4585590826331151e+01\n2.6862539335735165e+00\n-2.4470673129068331e+01\n-1.1955841364971443e+01\n1.3761445155048722e+01\n-3.9564992242946687e+01\n3.6531775629288965e-01\n1.7159304322097118e+01\n-5.0501125096597868e+01\n4.6829609241943260e+00\n1.7665458388139704e+01\n-5.2716984995294020e+01\n1.3804806229694654e+01\n3.5579841610123761e+00\n-2.6238590582298894e+01\n-1.0939618683578413e+01\n1.3852880370924252e+01\n-4.0912372717139611e+01\n1.3915976258314725e+01\n3.4702129252993088e+00\n-2.6086526848627571e+01\n1.3894315386788737e+01\n3.3914805283694016e+00\n-2.6014931078584112e+01\n1.4199249233099568e+01\n2.6946853876138785e+00\n-2.4789524574808482e+01\n-1.3070829491367007e+01\n1.3568385981821111e+01\n-3.9814935402349697e+01\n-9.3987756497574058e+00\n1.3475489660208833e+01\n-4.0473792614294837e+01\n-9.2955972081477523e+00\n1.4326767985761665e+01\n-4.2553483133306294e+01\n1.4470856848489573e+01\n2.2709842132202613e+00\n-2.4259799541882124e+01\n-1.2596868841105010e+01\n1.3210600203647523e+01\n-3.9062039657081861e+01\n1.4460471061704833e+01\n1.2929259144957077e+00\n-2.2186371158088807e+01\n1.4460471061704833e+01\n1.2929259144957077e+00\n-2.2186371158088807e+01\n1.3658178838532454e+01\n3.2433925330237607e+00\n-2.6167682197829407e+01\n3.0608860597419696e+00\n2.9273874398762203e+00\n-2.2222968942662281e+01\n1.3770006473049220e+01\n2.6614782577165550e+00\n-2.5058237976077113e+01\n1.4440005573797070e+01\n1.3046067559319803e+00\n-2.2288824227950634e+01\n1.6677444914465474e+00\n3.1791815933345342e+00\n-2.2299707704131940e+01\n1.4265187498530800e+01\n2.5699230892207119e+00\n-2.4976507070229847e+01\n1.4148333271925106e+01\n2.5798458384162042e+00\n-2.4994625101724285e+01\n-1.2956026448755297e+01\n1.3253436938754211e+01\n-3.9811116663103142e+01\n1.8337639590407626e+00\n3.1305566661964237e+00\n-2.2376494098353199e+01\n3.2820078233632923e+00\n2.9836406396441104e+00\n-2.2514221541882065e+01\n1.4173802083670992e+01\n7.6214027682372008e+00\n-3.5896814784123350e+01\n-7.1926980304208508e+00\n1.4700696149298190e+01\n-4.4497494512380648e+01\n1.4506794762140151e+01\n2.7822207198446862e+00\n-2.6001197951772919e+01\n-7.0685511155782610e+00\n1.4608560158780636e+01\n-4.4696419197151087e+01\n1.4163035563062813e+01\n2.8929970648984042e+00\n-2.6151880087341830e+01\n-7.6001045809515011e+00\n1.4105421902429150e+01\n-4.3819003054145142e+01\n-1.2124453772570392e+01\n1.3242926536298025e+01\n-4.0622574828960580e+01\n-1.4758449752373841e+00\n1.5598102888022662e+01\n-4.8776212455522789e+01\n3.4575712288587050e+00\n1.6928858846944575e+01\n-5.3115603042994294e+01\n-9.7779395710167414e+00\n1.3823689381329224e+01\n-4.3006087984049323e+01\n-3.3312813724140922e-01\n1.5957591707683006e+01\n-5.0646142308826889e+01\n2.5258798469681425e+00\n1.8131744573609068e+00\n-2.0425905679004995e+01\n1.3089233228939992e+01\n3.9979391311235970e+00\n-2.8836455202981149e+01\n-1.5205323934589874e+00\n1.5381982103598208e+01\n-4.9078687858751898e+01\n-9.7140129824458263e+00\n1.3741979991095846e+01\n-4.2775251272072509e+01\n-1.1281899900506922e+01\n1.3390788405433723e+01\n-4.1886406700259379e+01\n-9.8668702070390584e+00\n1.3630744165442733e+01\n-4.2638711060799402e+01\n-7.1441894886100004e+00\n1.4401695788867855e+01\n-4.5209233040463936e+01\n1.4785494914739116e+01\n7.9095143932963152e-01\n-2.2623124605321035e+01\n-1.0293304066160673e+01\n1.3465275083164602e+01\n-4.2448835071740426e+01\n-3.5337240777527956e+00\n1.4774293026051012e+01\n-4.7335211336627907e+01\n2.1816173284907863e+00\n1.6425966197345414e+00\n-2.0174834832553000e+01\n-1.3831406825049597e+00\n1.4982802547738244e+01\n-4.8670667021818183e+01\n-1.0578705140472014e+01\n1.3117123589190490e+01\n-4.1944031272283539e+01\n-7.1487250209493558e+00\n1.4037725138004651e+01\n-4.5074441244271618e+01\n1.4433358564842289e+01\n2.3037136735327643e+00\n-2.6221225858462830e+01\n-4.9398223601103214e-01\n3.0791836054947228e+00\n-2.2728413699410670e+01\n2.4475339950111472e+00\n1.6590007917673943e+00\n-2.0555391511505537e+01\n1.4577144869261112e+00\n1.8308953931045779e+00\n-2.0619596270901209e+01\n1.5119593345699809e+00\n1.7856558811120127e+00\n-2.0581173938300381e+01\n7.4884418868083336e-01\n2.1022462216058222e+00\n-2.1002549415269399e+01\n1.3511924946335755e+01\n3.0502106262462760e+00\n-2.7740288740972254e+01\n1.6663651403483584e+00\n1.6879923662421548e+00\n-2.0604027656736513e+01\n1.3749215104450543e+00\n1.8023974422609181e+00\n-2.0774066746850366e+01\n1.4222708169161324e+01\n1.8651134741868474e+00\n-2.5589061303501961e+01\n-1.1059875653369678e+01\n1.2739627347226627e+01\n-4.1802207627189517e+01\n-6.9620681286144688e+00\n1.3948212641877252e+01\n-4.5924209821835184e+01\n-3.9174474175955636e+00\n1.4677272759939230e+01\n-4.8648611462676563e+01\n-1.1252081040120846e+01\n1.2876811339241746e+01\n-4.1877590820667528e+01\n-6.0949286108055800e-01\n2.6947754492836236e+00\n-2.2439885610510164e+01\n1.2318535037300155e+01\n4.2959505010146968e+00\n-3.0729838855538542e+01\n-1.0267608035315183e+00\n3.2719992707802494e+00\n-2.3665261635965841e+01\n-5.6923477821883948e+00\n1.3945510007971102e+01\n-4.6855753032198905e+01\n1.3934016547131245e+01\n1.4923080764327343e+00\n-2.4937169259434494e+01\n4.6552916472007642e+00\n-1.6800872206507942e+00\n-1.4481044781836349e+01\n4.6552916472007642e+00\n-1.6800872206507942e+00\n-1.4481044781836349e+01\n7.7101100712701742e-01\n1.7253199827014645e+00\n-2.0865131870124660e+01\n6.9571262337438613e+00\n1.3337596156096064e+01\n-5.0106129840944412e+01\n1.4671977788034285e-01\n1.9565557400063658e+00\n-2.1332248997732005e+01\n-1.7952121607952706e-01\n1.5118389054264750e+01\n-5.1889056774837172e+01\n-1.0268393635749984e+00\n2.7016038143845122e+00\n-2.2626703087921761e+01\n9.9010218891547264e-01\n1.5208536800536969e+01\n-5.2585884876069670e+01\n1.0078357719448288e+00\n1.5428695337124172e+01\n-5.2973575321861155e+01\n1.5422836614371840e+00\n1.5279521668645121e+01\n-5.3072277963236964e+01\n9.5591919078766818e-01\n1.5007998099927213e+00\n-2.0680718891619048e+01\n2.8729932086580201e-01\n1.6634099110942158e+00\n-2.0992507673638272e+01\n4.7887109247225954e+00\n-1.8466101031869027e+00\n-1.4579370570818796e+01\n2.4530793865938622e-01\n1.6233150515172097e+00\n-2.0976023255789908e+01\n5.9291917520483066e+00\n-8.1325988563789930e-01\n-1.7511498105613189e+01\n1.3962508691560464e+01\n1.2302411392498205e+00\n-2.5351269392975325e+01\n-1.0015914368611103e+01\n1.2606378777568914e+01\n-4.3619779095877924e+01\n1.1734671478773199e+01\n4.0422271321665280e+00\n-3.0797851178554303e+01\n-5.8208687723970538e+00\n1.3806899401236874e+01\n-4.7570686826942435e+01\n1.4995092648915652e+01\n1.0508780933265351e+00\n-2.5682659992800129e+01\n1.4805951922410667e+01\n9.6640660152166735e-01\n-2.5329069221156256e+01\n-4.5421620078026892e-01\n1.8983940374694599e+00\n-2.1546097163596691e+01\n1.1212037886351468e-01\n1.4358930465879520e+00\n-2.0692004637592746e+01\n1.3170829698058782e+01\n2.3778362685650780e+00\n-2.8005140700598183e+01\n1.2519924255790311e+01\n3.8047744864181738e+00\n-3.1306099687028009e+01\n4.2417857651635584e+00\n1.2694593617101349e+01\n-4.9221769932697555e+01\n1.3136000416028498e+01\n2.7329454810781360e+00\n-2.9080181883127011e+01\n5.1561626581107252e+00\n1.2598692064413527e+01\n-4.9849911582189314e+01\n-1.1065471167513061e+00\n2.6233106751260751e+00\n-2.3278769776088293e+01\n-1.1495535579466408e+01\n1.2206683826899502e+01\n-4.2811009214336792e+01\n1.3212187929164074e+01\n2.4175695600204326e+00\n-2.8649743665604518e+01\n-1.0417494999399707e+01\n1.2273919843488931e+01\n-4.3638867295535064e+01\n-7.4987503456006888e+00\n1.2989111231173670e+01\n-4.6402166522911564e+01\n-6.8776036700523466e+00\n1.3085964300779340e+01\n-4.7234901351759589e+01\n-9.5798946455829874e+00\n1.2532714538254432e+01\n-4.4648701022577640e+01\n1.3817973029494791e+01\n9.3210026416773084e-01\n-2.5729116715947612e+01\n1.4158015923098564e+01\n1.3111831754240706e+00\n-2.6867436535979120e+01\n-9.7559388733737873e-01\n2.1757714659173613e+00\n-2.2875549104459207e+01\n-1.3230309087204120e+00\n2.1964613928421945e+00\n-2.2763726599889850e+01\n-3.8123377771176914e+00\n1.3344318605224879e+01\n-4.9556743680394938e+01\n3.1798497752903226e-01\n1.0921797654521423e+00\n-2.0745339890029900e+01\n-9.9482070472628621e+00\n1.2395586345756586e+01\n-4.4557445223237792e+01\n1.4178736942567925e+01\n1.3911091178104757e+00\n-2.7224789900999724e+01\n1.3083946057960755e+01\n2.5685409541442508e+00\n-2.9559769877321852e+01\n1.3887312441855219e+01\n1.0674498264199099e+00\n-2.6401511448482335e+01\n-1.1139694307891721e+00\n1.9191339650736117e+00\n-2.2199155775471297e+01\n1.3043350225184986e+01\n2.8969638007524097e+00\n-3.0701270656233348e+01\n-5.0404781680413944e+00\n1.2897754669174576e+01\n-4.8871196303376912e+01\n-5.7453241089481786e+00\n1.3065684824922959e+01\n-4.8796545920180336e+01\n-1.1277644625729488e+00\n1.6699618240628844e+00\n-2.2141852113008841e+01\n1.4072677598141020e+01\n8.0086458377995551e-01\n-2.6617277195696726e+01\n5.4403809373042149e+00\n-1.9465504886235219e+00\n-1.6034844334678034e+01\n7.6868400371469581e-01\n6.3286333327230115e-01\n-2.0506587706180284e+01\n1.4030360527971629e+01\n1.4287870445014539e+00\n-2.8335682651396048e+01\n-1.1366350626330016e-01\n9.1505209400917809e-01\n-2.0850753183963249e+01\n2.2167918655647658e+00\n-8.8160755056512566e-03\n-1.9713785658305582e+01\n5.2443836971939088e+00\n-2.2050162483690845e+00\n-1.5592172231668524e+01\n2.4086837870200779e+00\n1.5596118385902732e-01\n-2.0032720763634707e+01\n1.3940178214221485e+01\n6.5019398930950356e-01\n-2.6722922886245165e+01\n1.3005894571038167e+01\n2.3581073915327897e+00\n-3.1044537231423039e+01\n-1.8756504824433020e+00\n2.8188110597187364e+00\n-2.5813182169784881e+01\n1.2970594481970619e+00\n1.7747683201439127e-01\n-2.0247418719609701e+01\n-1.0619349857863639e+01\n1.0466295101345672e+01\n-4.3725503493977534e+01\n-2.5320206718772997e+00\n3.5508570204989964e+00\n-2.8059455351045617e+01\n1.3462199522586181e+01\n1.0535582118445137e+00\n-2.8612900267125692e+01\n1.2484985040064405e+01\n7.6002508792954337e-01\n-2.7435085389605312e+01\n-1.4805013419729958e+00\n1.2450037559868830e+00\n-2.2294318713431100e+01\n1.4239162767565100e+01\n7.6987131027830702e-01\n-2.8719971360056789e+01\n-2.0592495851459187e+00\n2.4814832301386867e+00\n-2.5511288934301046e+01\n1.4072571353070749e+01\n4.5107184709729464e-01\n-2.7931928610491738e+01\n3.6929240188880724e-01\n1.5326794999775847e-01\n-2.0316233926149994e+01\n3.6929240188880724e-01\n1.5326794999775847e-01\n-2.0316233926149994e+01\n-7.7247305033653264e+00\n1.1616858956634463e+01\n-4.7982909795144273e+01\n1.4372142485077170e+01\n3.2673176155146422e-01\n-2.8055201872601231e+01\n1.4210966367060875e+01\n3.6249884539398208e-01\n-2.7928838563913541e+01\n-5.5050607933822837e-01\n4.9148415621680708e-01\n-2.1151017623676410e+01\n-2.1130221269481835e+00\n2.2490349210224134e+00\n-2.5260844623635553e+01\n2.8621245372438553e+00\n-4.0778684601032450e-01\n-2.0166271664241076e+01\n1.5425160584315505e+00\n-2.6330860994733984e-01\n-1.9975651323235990e+01\n-2.0129757007023348e+00\n1.6017674268929398e+00\n-2.3677705248418047e+01\n2.6589236781998489e-02\n1.2149052491120051e-01\n-2.0707736576385727e+01\n1.3886921630120614e+01\n7.3385009813636592e-01\n-2.9435332842849967e+01\n6.2721484014580104e+00\n-1.9177885590525987e+00\n-1.8522132646801612e+01\n3.3830364611669284e+00\n-5.9101566525126215e-01\n-2.0577987109578757e+01\n3.3830364611669284e+00\n-5.9101566525126215e-01\n-2.0577987109578757e+01\n-2.8616571506102559e+00\n2.7360062047409777e+00\n-2.6973116008836474e+01\n1.3363962243090953e+01\n9.4429760287813180e-01\n-3.0330463596766222e+01\n-2.0276770051663662e+00\n1.2644092086851426e+00\n-2.3431234323315561e+01\n9.6148342406645027e-01\n-3.8731725206247603e-01\n-2.0373969072750111e+01\n9.6148342406645027e-01\n-3.8731725206247603e-01\n-2.0373969072750111e+01\n2.4246471473075100e+00\n-6.7713511233370793e-01\n-2.0320847174579956e+01\n-1.9626357843078384e+00\n1.1423377720596093e+00\n-2.3362949801426716e+01\n-5.9365198411109280e-02\n-1.0500238316733698e-01\n-2.0767039658552100e+01\n-2.4623923575197058e+00\n1.3856022782309707e+00\n-2.4134370689865769e+01\n9.5630344503497289e-01\n-5.2808156413116680e-01\n-2.0404313287881667e+01\n5.9329527623702543e+00\n-1.1594339378041034e+00\n-2.1312918583077877e+01\n2.6326076651136741e+00\n-8.9014511487051551e-01\n-2.0526643758463603e+01\n2.6010773985139299e+00\n-8.6086293339704112e-01\n-2.0549344522728955e+01\n-1.7556139143024487e+00\n5.8876041532854040e-01\n-2.2611373245240806e+01\n-1.7532250512780287e+00\n5.8524004483150915e-01\n-2.2611583419854828e+01\n2.1023815821416765e+00\n-8.1558295447356244e-01\n-2.0513697492734483e+01\n1.4384097900247577e+01\n-7.9049222365474459e-01\n-2.7759726739253438e+01\n1.4281590567071875e+01\n-8.0696014789529635e-01\n-2.7405714055234501e+01\n7.1932961528548070e-02\n-4.1712515538711437e-01\n-2.0797147707505300e+01\n1.4268298733742471e+01\n-7.1578589106940760e-01\n-2.8007769840931690e+01\n-1.7058234520256688e+00\n4.8138564358610630e-01\n-2.2655098277055799e+01\n-1.7058234520256688e+00\n4.8138564358610630e-01\n-2.2655098277055799e+01\n3.4595738163798362e-01\n-5.8555660352424732e-01\n-2.0630137382727209e+01\n1.2098110368189345e+00\n-8.3148895615164375e-01\n-2.0457447631728773e+01\n2.9817808919439135e+00\n-1.1625257774802831e+00\n-2.0515133493206452e+01\n2.5936383487085717e+00\n-1.1445040883842683e+00\n-2.0550773278849160e+01\n-1.2551177630839261e+01\n9.5495871240224304e+00\n-4.5162311582832345e+01\n-2.1228265031213711e+00\n3.3998860760290761e-01\n-2.2702200076416048e+01\n-3.8361020296554980e+00\n1.4315459264045627e+00\n-2.5208295500813822e+01\n-3.8270934889157262e+00\n1.4379337220408710e+00\n-2.5246172700202113e+01\n1.4363798775191327e+01\n-9.3638754561152326e-01\n-2.8771852315844477e+01\n3.2969883598421346e+00\n-1.4445269432077426e+00\n-2.0546347463389338e+01\n3.9295967944699024e+00\n-1.5493548821944425e+00\n-2.0775976312651679e+01\n6.1337740345179839e+00\n-3.1187741828130631e+00\n-1.8118157759078468e+01\n-3.3301602257443910e+00\n7.9907476993272053e-01\n-2.4532073451226545e+01\n-2.5723825696205380e+00\n1.6267287647769932e-01\n-2.2997429437307211e+01\n1.4728515053414606e+01\n-1.7529674792851984e+00\n-2.7831896912438118e+01\n1.6118871201235903e+00\n-1.5659309875856300e+00\n-2.0211011580679262e+01\n1.8103295146261857e+00\n-1.5578760222360699e+00\n-2.0200626907445351e+01\n-2.5398118224403414e+00\n7.9724753955254468e-02\n-2.3052478593885635e+01\n-1.5820670252511626e+00\n-5.1940655360236521e-01\n-2.1650449205230821e+01\n1.5316542173025498e+01\n-2.5028278818002887e+00\n-2.6134745970607007e+01\n1.4747602882842521e+01\n-2.0141777018054743e+00\n-2.7739297507916003e+01\n1.4605206452453164e+01\n-1.3902310241359850e+00\n-2.9896707774382673e+01\n1.2865249460190109e+01\n-1.4414006393843108e+00\n-2.8011584711551116e+01\n-3.8045395586776456e+00\n5.1070033395974224e-01\n-2.3933257370967755e+01\n1.5244738746542152e+01\n-2.2483395994125250e+00\n-2.7594877086266919e+01\n-3.8132978008505685e+00\n4.8228145999364475e-01\n-2.4125578959379610e+01\n-3.6627172516665896e+00\n4.8074901740981497e+00\n-3.9160073111006589e+01\n-1.4392927968649787e+00\n-9.1801121512623018e-01\n-2.1411854780101741e+01\n6.0228298232410937e+00\n-3.4323473253442618e+00\n-1.8334918585000580e+01\n-1.2452943534195973e+00\n-1.1293702073320964e+00\n-2.1173091374665159e+01\n3.5636474387252826e-01\n-1.7100883552150556e+00\n-2.0304995412589111e+01\n-1.2889675233971261e+00\n-1.1622468444080936e+00\n-2.1195800453429740e+01\n1.4963926281864033e+01\n-2.5826922747059098e+00\n-2.7860323846138424e+01\n4.4252723292989842e+00\n-2.5960969273199042e+00\n-2.0239527753024092e+01\n-2.9119867349191320e+00\n-3.9881512983244066e-01\n-2.2861433515881981e+01\n-3.7482767846515874e+00\n-1.3059890560951268e-01\n-2.3331640730481766e+01\n-1.6799562545560422e+00\n-1.0273774020175868e+00\n-2.1574078956074818e+01\n-1.7220718622165854e+00\n-1.0210882289417924e+00\n-2.1603217911825112e+01\n-8.4923654353465450e-01\n-1.3883503948304707e+00\n-2.0744701937179499e+01\n1.4909117663679217e+01\n-2.7791996710074574e+00\n-2.7950807630304880e+01\n-1.8470307124267418e+00\n-1.0091602013602439e+00\n-2.1732098655844744e+01\n3.4518926322144203e+00\n-2.5513414893127933e+00\n-2.0156765439898024e+01\n1.4920212410082319e+01\n-2.6700639019428736e+00\n-2.8173383913360997e+01\n-1.7923563907838096e+00\n-1.0779380717574012e+00\n-2.1721477262228806e+01\n-1.7965684395162678e+00\n-1.0754133918954745e+00\n-2.1714299632996390e+01\n4.3484854573551717e+00\n-2.7211830719830821e+00\n-2.0220232861764874e+01\n-1.2628184895156223e+00\n-1.3119638265901055e+00\n-2.1256397672474083e+01\n6.0017180970307882e-01\n-2.0139985099654498e+00\n-2.0352895636188091e+01\n9.6227288713343040e-01\n-2.1006500247663080e+00\n-2.0017815461708015e+01\n2.7014321124002634e+00\n-2.7070592791074399e+00\n-1.9668091000626951e+01\n4.1992880612326049e+00\n-2.8488168162816581e+00\n-2.0374670798241432e+01\n-3.4320609954712000e+00\n-5.8270467984868868e-01\n-2.2864826813136844e+01\n-2.4932824787676813e+00\n-1.0276196023448443e+00\n-2.2034372095317575e+01\n-9.9227183236746752e-01\n-1.5936047682362933e+00\n-2.1089204793654183e+01\n-7.5893885561209107e-01\n-1.6858689567083018e+00\n-2.0910802788471873e+01\n5.5962242891660097e+00\n-4.0833995043772591e+00\n-1.7388232232807024e+01\n4.2068387217353092e+00\n-2.8555863597301276e+00\n-2.0324856994008471e+01\n1.5212508777207168e+01\n-3.4760324087951151e+00\n-2.7238113206343865e+01\n1.5212508777207168e+01\n-3.4760324087951151e+00\n-2.7238113206343865e+01\n-3.7346487983873087e+00\n-3.9805980520137513e-01\n-2.3569460075633856e+01\n-1.0909896577360419e+01\n4.6920757342045372e+00\n-3.7789237974735734e+01\n-5.0697725587875047e+00\n3.4146726241499605e+00\n-3.7524460991611072e+01\n2.4282424004578815e+00\n-2.7174884709803542e+00\n-1.9920471326995926e+01\n4.5165124800670808e+00\n-2.9472089955553882e+00\n-2.0676645350532390e+01\n4.5165124800670808e+00\n-2.9472089955553882e+00\n-2.0676645350532390e+01\n5.7243717862869703e+00\n-4.1041895037422744e+00\n-1.7868557255708151e+01\n1.5336736852976147e+01\n-3.8752963871805326e+00\n-2.6045379060859950e+01\n-2.2153861058503179e+00\n-1.4903068499503933e+00\n-2.1338458098775678e+01\n-3.1666496659146603e+00\n-1.0233920027646561e+00\n-2.2524914460275117e+01\n-2.8163363098897123e+00\n-1.4506432531653191e+00\n-2.1454805076068961e+01\n-3.2745601670148332e+00\n-9.8913099097792312e-01\n-2.2756737972679993e+01\n-3.4491867835417587e+00\n-9.9421910106526790e-01\n-2.2725840371751048e+01\n-2.3674587521505193e+00\n-1.6593361841682175e+00\n-2.1154096522395822e+01\n-4.4822584731555928e+00\n2.5419747747544306e+00\n-3.6205899875469107e+01\n1.5622254292464033e+01\n-4.1028361540634091e+00\n-2.6618077111190388e+01\n2.1793994060318544e+00\n-3.0017767981846935e+00\n-1.9707701740084403e+01\n2.8795411753455404e+00\n-3.1309004581989561e+00\n-1.9891308368945850e+01\n1.4931655833054513e+00\n-2.9632712901356153e+00\n-1.9632641427752006e+01\n-3.2617941960381680e+00\n-1.1401920038781423e+00\n-2.3154276797804577e+01\n-2.6822186716938181e+00\n-1.7687608975906326e+00\n-2.1870616202762537e+01\n-2.6827720083830089e+00\n-1.7712593079798213e+00\n-2.1870650357063766e+01\n-1.2020610655096531e+00\n-2.5037374204982585e+00\n-2.0173498745047166e+01\n-9.0039426966553482e-01\n-2.6275127827565741e+00\n-2.0016829951172387e+01\n1.7550894283938931e+00\n-3.2557684030173286e+00\n-1.9822560819163524e+01\n-8.2367014816592192e+00\n2.7375404328364543e+00\n-3.6150034717730030e+01\n1.4181807370175619e+00\n-3.1802513993540389e+00\n-1.9847365118743820e+01\n1.4331173426611134e+01\n-4.6373891588360072e+00\n-2.5962381439970756e+01\n-5.7651525023231809e-01\n-2.7207509803680061e+00\n-2.0239343384452933e+01\n-2.2197825486590142e-01\n-2.8766434660102282e+00\n-2.0175204188523292e+01\n-6.1164886416949598e+00\n6.2697189656527630e-01\n-3.0903915371730282e+01\n-6.5434335847757561e+00\n7.0465282126228546e-01\n-3.0905232842528495e+01\n2.6290293116807826e+00\n-3.6785645546650856e+00\n-2.0278688188867072e+01\n-6.4306450566896334e-01\n-2.9418290269465786e+00\n-2.0450482887123442e+01\n1.1797864433868361e+00\n-3.4801404798846063e+00\n-1.9912281060979176e+01\n2.9343742716061261e+00\n-3.8429732712921152e+00\n-2.0419995120054342e+01\n7.9257077655339636e-01\n-3.5502112845683240e+00\n-1.9631602550791538e+01\n-1.9113709959305634e+00\n-2.5855832264180361e+00\n-2.1531064277707948e+01\n-6.7941483307592980e+00\n1.0849924914050006e+00\n-3.4025218822089421e+01\n4.3163007512734426e+00\n-4.0562617619190870e+00\n-2.1643681778607590e+01\n-6.7960142597805149e+00\n1.5247644725711729e-01\n-3.0177463043095244e+01\n-1.8128354981876105e+00\n-2.7258870100857071e+00\n-2.1717755132929394e+01\n4.1875097265206849e+00\n-4.1249557003755077e+00\n-2.1454550124641731e+01\n-3.0797665400744250e+00\n-2.1650348731011673e+00\n-2.3187918360003859e+01\n3.9607877930384801e+00\n-4.1394859968231730e+00\n-2.1340120842408055e+01\n-7.7094761173077497e+00\n7.9527092630112828e-01\n-3.3476043870723515e+01\n-1.2430106598214742e+01\n2.1991421201877204e+00\n-3.5101595976652469e+01\n-8.4628563598809539e+00\n1.0386663020605837e+00\n-3.3919215535114375e+01\n-6.7977173957680206e+00\n-2.6104071934963041e-01\n-2.9590265496718008e+01\n-2.7638810267886873e+00\n-2.5281950931595949e+00\n-2.2642803378936190e+01\n-1.7478363897301463e+00\n-3.0234102821185433e+00\n-2.1747009390511028e+01\n-1.2070624633966847e+00\n-3.3430567734651109e+00\n-2.0943934951554009e+01\n7.9547088496706042e-01\n-3.9147194947476391e+00\n-2.0545470605736817e+01\n3.7512782315605411e+00\n-4.4064030890253241e+00\n-2.1539894413214366e+01\n7.3239438283603320e-01\n-3.9264882215095582e+00\n-2.0482002634415529e+01\n2.8643083351278391e+00\n-4.4416027143258932e+00\n-2.0744800931369525e+01\n-2.6901262404548008e+00\n-2.7675330219886254e+00\n-2.2917239241238587e+01\n-2.4897956680725870e+00\n-2.8478259831424042e+00\n-2.2676646244970087e+01\n4.4463564258188182e-01\n-3.8859264748094793e+00\n-2.0780863375847233e+01\n2.9370857669678045e+00\n-4.4620374895527375e+00\n-2.0958645790650927e+01\n3.6453203470128921e+00\n-4.4384336106398239e+00\n-2.1663005087210536e+01\n4.7039603599555129e+00\n-4.6492060779722948e+00\n-2.2256715511101099e+01\n4.5453439901119630e+00\n-4.6551484207340001e+00\n-2.2144465248324781e+01\n-8.5514293514165889e+00\n2.7967123002094696e-01\n-3.2956693601728688e+01\n-7.4795015527902171e+00\n-6.6940857138320842e-01\n-2.9152694455999654e+01\n-7.2535268113328364e+00\n-4.4272874799046613e-01\n-3.0723431328144859e+01\n2.0274740169408005e+00\n-4.3213136889926274e+00\n-2.0751704614945048e+01\n-7.1457496949010064e+00\n-2.6492876441144780e-01\n-3.2553326004164859e+01\n1.0311051647448248e+00\n-4.1634327269134577e+00\n-2.0774526748025110e+01\n-7.2354231358351295e-01\n-3.7721160873931168e+00\n-2.1475434230865094e+01\n7.4132824031113417e-02\n-4.1899265970119215e+00\n-2.1210075963513646e+01\n6.9514730910409384e-01\n-4.4533723546922239e+00\n-2.0929525282881464e+01\n-1.9244263794328704e+00\n-3.6062779830710481e+00\n-2.2339901826804873e+01\n5.0965018167150589e-01\n-4.4768534098248249e+00\n-2.0990440674955170e+01\n5.9115060362915772e-01\n-4.4330090375298203e+00\n-2.1347376388291753e+01\n7.8623785629151866e-01\n-4.5790715418138443e+00\n-2.1208646050690156e+01\n-9.0895870288169895e+00\n-4.6793455324356320e-01\n-3.1922861449114798e+01\n-9.1025326902933745e+00\n-4.9204987821948765e-01\n-3.1659248754800000e+01\n-1.9683737647862276e+00\n-3.6860708057518896e+00\n-2.2414949432082381e+01\n-1.9186008354074646e+00\n-3.7320176343176730e+00\n-2.2355418234983372e+01\n-1.8463047310743963e+00\n-3.7484907308520086e+00\n-2.2316769038243574e+01\n-1.8725279332716078e+00\n-3.7985927317575041e+00\n-2.2116075309897447e+01\n1.6170295786238023e+00\n-4.7825449435334111e+00\n-2.1104119124686886e+01\n-1.9851788285560690e+00\n-3.7277782345674222e+00\n-2.2398517266351764e+01\n-4.9703332937353956e-01\n-4.2883495899303199e+00\n-2.1397399221061718e+01\n-2.5427055290850120e+00\n-3.5197203742677559e+00\n-2.3411336420914395e+01\n1.5805618121470881e+00\n-4.8903287219779870e+00\n-2.1347727574475176e+01\n-9.2634834309872216e-01\n-4.2563526382102905e+00\n-2.1850040309468469e+01\n-2.2188897548457294e+00\n-3.8312266685885912e+00\n-2.3229591174050547e+01\n-2.2387844554762015e+00\n-3.8630930301431130e+00\n-2.2943405776547220e+01\n-1.9050225057212700e-01\n-4.6013876773187556e+00\n-2.1447441491337699e+01\n-1.0488952025824418e+01\n-9.7843253691178977e-01\n-2.9985510216644908e+01\n-2.6135051240978537e+00\n-3.8145197276430549e+00\n-2.3536760625299070e+01\n-2.4252990762651039e+00\n-3.8371893123800627e+00\n-2.3513173933218706e+01\n-2.5831814784179987e+00\n-4.0102800043440432e+00\n-2.3489884960123792e+01\n-5.0500005483750199e+00\n-3.0645493879440164e+00\n-2.7744152541797614e+01\n7.3669798032952893e-01\n-5.3531763252866202e+00\n-2.1391347558384251e+01\n-1.2620429692256740e+00\n-4.8547774023521573e+00\n-2.1984043197621173e+01\n-7.0305326083364656e+00\n-2.6291290051290095e+00\n-2.8848089429604645e+01\n-4.6665174607870403e+00\n-3.6679237572666574e+00\n-2.6027772789846718e+01\n-6.8741386097379475e+00\n-3.2388525986814183e+00\n-2.7994704344680322e+01\n-3.3934266655035539e+00\n-4.6875922437804043e+00\n-2.3430570525190902e+01\n-3.2143503207573993e+00\n-4.7778916713800141e+00\n-2.3636695657019079e+01\n-7.2960221659008146e+00\n-3.3316994312577215e+00\n-2.8076022220244134e+01\n4.2056530051820162e-01\n-6.2142214623839491e+00\n-2.0971301769895582e+01\n-3.0750578798350028e+00\n-5.1273645307221676e+00\n-2.4078979739458596e+01\n-3.5054656149104435e+00\n-5.1617779338008605e+00\n-2.3847362494545443e+01\n-3.8453824462161479e-01\n-6.1226778241836355e+00\n-2.1773985627114783e+01\n-7.7970046111416780e+00\n-3.9094575739101947e+00\n-2.6710793305863746e+01\n-1.6785707094448583e+00\n-5.8215893460735479e+00\n-2.1947172397093080e+01\n-1.7561674123228481e+00\n-5.8013829125833007e+00\n-2.2258429754045967e+01\n-1.7748477220769538e+00\n-5.9914452654569272e+00\n-2.2579762237238775e+01\n-3.5268050240121793e+00\n-5.2669436898560154e+00\n-2.4493257575618031e+01\n-9.2983880332950388e+00\n-3.8452717009283779e+00\n-2.7089614753487030e+01\n2.8178945495238379e+00\n-7.8332955158340960e+00\n-1.9167095123742932e+01\n4.8835441295583113e+00\n-8.8689804447330101e+00\n-2.0309360702476763e+01\n4.5670353311726117e+00\n-8.8036500048482633e+00\n-2.0303540443716287e+01\n4.9569445253391011e+00\n-8.9983867240634332e+00\n-2.0008134928073666e+01\n2.2200345719685006e+00\n-8.2339385828121294e+00\n-2.0767480237019846e+01\n2.4416002140962609e+00\n-8.3887815310445824e+00\n-1.9230611507483754e+01\n-6.4907206469095291e-01\n-7.3389828086546824e+00\n-2.1524050167333201e+01\n2.2813766283311914e+00\n-8.4968716797290824e+00\n-2.1565533530510415e+01\n1.9572349618228488e+00\n-8.6521273880773588e+00\n-2.1472731164344431e+01\n-1.4201835357262380e+00\n-7.4988714985971532e+00\n-2.1744991408687138e+01\n1.7985156737655770e+00\n-8.8021019825577937e+00\n-2.0516568240450599e+01\n-1.0668623252336393e+00\n-7.7830763900762099e+00\n-2.1276940417546044e+01\n-5.1461954653789810e-01\n-8.1483794124370341e+00\n-2.1157951009142305e+01\n-5.8698664640678322e-01\n-7.9931075155120563e+00\n-2.0991336711603228e+01\n5.2130319187032734e+00\n2.7505860233141366e+01\n-4.1302333743787194e+01\n5.1876638526710046e+00\n2.7812628869050496e+01\n-4.2708026499791707e+01\n3.3356422173962117e+00\n2.6888134287825356e+01\n-4.1622017355966911e+01\n3.3602183700730492e+00\n2.6982575096290990e+01\n-4.1653028004802032e+01\n4.7834540618523258e+00\n2.7283201823910662e+01\n-4.2453725248922744e+01\n5.4088857017905889e+00\n2.7500403155318644e+01\n-4.2577201287907329e+01\n4.9955279847861656e+00\n2.7534312123573756e+01\n-4.2827880367888568e+01\n8.5020332838323238e+00\n2.8499653814013062e+01\n-4.4258550202244315e+01\n1.1036248622729239e+01\n2.8945722243399572e+01\n-4.5044208382164285e+01\n1.1510036524651893e+01\n2.8826929779356021e+01\n-4.4725418047370695e+01\n8.6148136058025795e+00\n2.8220952975174455e+01\n-4.4084083130062304e+01\n8.3790357609618571e+00\n2.8371915329095238e+01\n-4.4364539559327966e+01\n1.2257342482007068e+01\n3.0112946779665343e+01\n-4.6949316360182692e+01\n1.8446043906708816e+01\n3.2641458847794524e+01\n-5.0260948377034161e+01\n4.3446893924611762e+00\n2.6849358395684582e+01\n-4.2479744352453757e+01\n1.4593295376915291e+01\n3.0439428542169953e+01\n-4.7347945570021423e+01\n1.5330151384478215e+01\n3.1441223811022994e+01\n-4.8722474249496074e+01\n1.2483708759354441e+01\n3.0440272533242695e+01\n-4.7536955639975233e+01\n1.2565936470218048e+01\n3.0392219062595128e+01\n-4.7392145433919808e+01\n4.6419481373087477e+00\n2.7018471556900415e+01\n-4.2782188058136200e+01\n4.7657151318248694e+00\n2.6940899905407793e+01\n-4.2791094203316284e+01\n4.7225883039083252e+00\n2.7019719445152212e+01\n-4.3372953884817839e+01\n9.7362886535649817e+00\n2.8575759163728414e+01\n-4.5569673706314958e+01\n4.9922054105180571e+00\n2.6585785124558324e+01\n-4.2867785544406630e+01\n1.7933153803590368e+01\n3.1390872007581070e+01\n-4.9896110799330707e+01\n1.5582599280774495e+01\n3.0911637367268689e+01\n-4.9176399087196216e+01\n1.0136767909146947e+01\n1.5085055825366018e+01\n-2.8433312795578367e+01\n1.1666719375619696e+01\n1.6008478608836221e+01\n-2.9592119825019612e+01\n1.6431879028687849e+01\n3.1165320206786419e+01\n-4.9720241058542115e+01\n1.0961385554060071e+01\n1.4235448175296558e+01\n-2.7441538613321143e+01\n-3.8042410788396275e+00\n2.2875853576268586e+01\n-3.7795011457765575e+01\n1.1345960515437362e+01\n2.8912888352372573e+01\n-4.6779812272518058e+01\n1.2748700999567751e+01\n1.6372347063031253e+01\n-3.0340796934517805e+01\n6.8489608888533553e+00\n2.7090073088923315e+01\n-4.4066052812505788e+01\n-2.0569715722535106e-01\n2.4467086773362336e+01\n-4.0124219475263239e+01\n2.8983870604419417e+00\n2.5664362240513235e+01\n-4.2133821773514498e+01\n1.1414613983229339e+01\n1.1713592065600679e+01\n-2.4636756555531893e+01\n-6.7963725512236917e-01\n2.4291624982620721e+01\n-3.9940895398341411e+01\n7.0326767487971029e+00\n2.6959412049991062e+01\n-4.4131269513462485e+01\n1.2152524813155994e+01\n1.6813704312015741e+01\n-3.1146234365579037e+01\n2.4304303694004505e+00\n2.5512032510913038e+01\n-4.2097624097103164e+01\n4.5501097375179835e+00\n2.6129978402041544e+01\n-4.3139540823301907e+01\n2.2561230784986508e+00\n2.5798707492619837e+01\n-4.2313018451328134e+01\n7.9189453423087564e+00\n2.7338588501745747e+01\n-4.4969778883159719e+01\n6.3279368320888398e+00\n2.6782146243682430e+01\n-4.4172695065658594e+01\n-4.7961861968661808e+00\n2.2778195739893434e+01\n-3.7995850438136266e+01\n1.2474795253221346e+01\n1.0397403265816047e+01\n-2.3273596726386945e+01\n-1.2308262628028171e+01\n1.9213948351242347e+01\n-3.2769645533061038e+01\n1.4805224212576343e+01\n2.9947920172415504e+01\n-4.9396526556520257e+01\n-5.4367897972291450e+00\n2.2323827503553566e+01\n-3.7795507956519899e+01\n1.1439438358129188e-01\n2.4339063913111275e+01\n-4.0974379549963658e+01\n1.3057868037977605e-01\n2.4391899457438640e+01\n-4.1015225401724116e+01\n-5.8196691483883711e+00\n2.2425304212397485e+01\n-3.7946492914558547e+01\n6.3465830612677774e+00\n7.1552475042031354e+00\n-1.8497444147008537e+01\n1.7681090549099230e+00\n2.5213454243762545e+01\n-4.2238387850797828e+01\n5.8407038457771101e+00\n6.3110061645420377e+00\n-1.7438209013857232e+01\n6.3575311472690474e+00\n2.6163614998084896e+01\n-4.4052198130807867e+01\n8.8296499640442807e+00\n8.7141250021872789e+00\n-2.0884598541513444e+01\n1.4691234485989520e+01\n1.4472736924465034e+01\n-2.9198714285733629e+01\n-7.7355241526630814e-01\n2.3741020101715574e+01\n-4.0472255306827400e+01\n3.8685482389067471e-01\n2.3901369260766138e+01\n-4.0848314375589176e+01\n1.2598779233572881e+01\n1.0816870878168029e+01\n-2.4192052102491033e+01\n-6.0872380968800348e+00\n2.1748189340599303e+01\n-3.7298818892622549e+01\n1.3047348318399354e+01\n9.9370396972938106e+00\n-2.3082897205350495e+01\n1.4301055921737555e+00\n2.4595059139490431e+01\n-4.1940498556615019e+01\n-1.1194346803030508e+00\n2.3528795327670146e+01\n-4.0312361689007858e+01\n1.8964065477751785e+01\n3.0676898761592323e+01\n-5.1433991440239659e+01\n1.2593364670002073e+01\n1.0806213272983154e+01\n-2.4320580625183176e+01\n1.3140250679688508e+01\n9.9478051835806589e+00\n-2.3259082923129906e+01\n3.3355938131856613e+00\n2.5315066990026423e+01\n-4.3365583269830388e+01\n1.6932066922425733e+01\n2.9885864885680249e+01\n-5.0501378944761790e+01\n9.6095748462836248e+00\n7.4204023404665476e+00\n-1.9655630159995681e+01\n-1.1044961715217019e+01\n1.9943880559643816e+01\n-3.4734616269833168e+01\n1.3122606270731390e+01\n9.8254153862797757e+00\n-2.3227122737373747e+01\n4.3296850799423403e+00\n3.8519834567039171e+00\n-1.4306479896084898e+01\n4.3296850799423403e+00\n3.8519834567039171e+00\n-1.4306479896084898e+01\n1.3996681116588976e+01\n2.7694117929746444e+01\n-4.7424437919545689e+01\n5.1257780121557959e+00\n2.5866696713343185e+01\n-4.4442971850060047e+01\n1.2272841303559360e+01\n1.5991954666516158e+01\n-3.1483720927510696e+01\n2.0849461493525592e+00\n2.4595406734884008e+01\n-4.2465259704565916e+01\n1.3360035018424066e+01\n9.8416296061407067e+00\n-2.3363609435102354e+01\n4.2332068097660240e+00\n3.6473341086525921e+00\n-1.4113304096533669e+01\n7.6361788530299899e+00\n2.6436863350579852e+01\n-4.5772581671635827e+01\n3.0805446448456046e+00\n2.1902720846741088e+00\n-1.2101642761934578e+01\n1.4444064113228226e+01\n2.8384802595171330e+01\n-4.9059894057306032e+01\n3.6495451849306133e+00\n2.8951121567976514e+00\n-1.3206584648813971e+01\n-5.3969752213467681e-01\n2.3289149817353934e+01\n-4.1045339360248107e+01\n-1.2049932950568568e+01\n1.9174536088534939e+01\n-3.4271529849214673e+01\n-1.2005806480997832e+01\n1.9145631723776443e+01\n-3.4265910851073421e+01\n-1.0494624770037635e+00\n2.3116223174488244e+01\n-4.0820132609494053e+01\n-9.8933110348499453e-01\n2.3202934015555190e+01\n-4.1071429039982966e+01\n1.8479050123085759e+01\n2.9429911883450668e+01\n-5.1515343022679595e+01\n1.7625163423048885e+01\n2.9426152677287284e+01\n-5.1634422885266872e+01\n-1.6678809933539519e-02\n2.3622664259571451e+01\n-4.2001145503726356e+01\n1.8636273099872561e+01\n2.9590598548804454e+01\n-5.2176316838408198e+01\n2.4316465860273510e+01\n2.9755894866572284e+01\n-5.2939287989436565e+01\n1.4011524430380769e+01\n2.8171016269037878e+01\n-4.9911022882667325e+01\n1.2515865653194037e+01\n2.7311052302724619e+01\n-4.8638144657398911e+01\n1.1799828839802480e+01\n1.0622441121226144e+01\n-2.5093571495091766e+01\n1.2549952822832820e+01\n1.2967006586661883e+01\n-2.8494973937626416e+01\n1.4319241655301559e+01\n9.6787656362322476e+00\n-2.4508549043832758e+01\n1.4319241655301559e+01\n9.6787656362322476e+00\n-2.4508549043832758e+01\n-1.1131209409406001e+01\n1.9246997623829646e+01\n-3.5161642768031328e+01\n1.2032396075729601e+01\n2.5826254820359914e+01\n-4.7047893867917615e+01\n1.2459282019648533e+01\n2.8482813064178906e+01\n-5.1080996255595572e+01\n5.7621546197298885e+00\n2.4966124788223180e+01\n-4.5532375626981604e+01\n1.5759694636650231e+01\n2.7882863811101199e+01\n-5.0665165204265847e+01\n1.2586296310365233e+01\n2.7012560220985787e+01\n-4.9604872346339285e+01\n-5.5347811247261651e+00\n2.0818175461615589e+01\n-3.8617776124592829e+01\n7.7654859096886719e+00\n2.5230726786878975e+01\n-4.6551918067435309e+01\n-3.2409665452826233e+00\n2.1635054150186214e+01\n-4.0563539276608950e+01\n1.5280873332557874e+00\n2.3140710425536607e+01\n-4.3436884212201043e+01\n7.7130062637367294e+00\n2.4955595324625470e+01\n-4.6786004343797011e+01\n1.4902550410586143e+01\n2.6549694824299440e+01\n-4.9548327997347926e+01\n1.4424352642858572e+01\n2.5728076319761072e+01\n-4.8560440704753198e+01\n1.5017996275966841e+01\n2.5871704267468534e+01\n-4.8995562139028657e+01\n2.1527272923344540e+01\n3.1304533816294793e+01\n-5.7830452094638517e+01\n-1.1043066951491824e+01\n1.8540399391417100e+01\n-3.5323448613585775e+01\n1.0261812429646859e+01\n2.5286463094175005e+01\n-4.8320520221302360e+01\n9.7846062272943950e+00\n2.4893637082223233e+01\n-4.7476627254263583e+01\n4.6739491755725346e+00\n2.3980869955636336e+01\n-4.5738407847774916e+01\n4.5564120856342489e+00\n2.3792321919889083e+01\n-4.5263978096472904e+01\n-6.8403161664952821e+00\n2.0157802409593700e+01\n-3.8709771426958405e+01\n1.0428769405455681e+01\n2.4993166110154686e+01\n-4.8019375674579123e+01\n2.0193953362459560e+01\n2.5631938175777019e+01\n-5.0005498714482911e+01\n1.1833268076074599e+01\n9.9148461013062477e+00\n-2.5621551643748685e+01\n1.0293678090074085e+01\n2.5502342532126196e+01\n-4.8721953667629187e+01\n1.4483456889647636e+01\n1.2498322138169119e+01\n-2.9968639319183982e+01\n6.3224741921776673e+00\n2.5217939125093629e+01\n-4.7988077074743373e+01\n1.1896822155285678e+01\n1.3803601650564012e+01\n-3.1524065823252322e+01\n1.1146470127038874e+00\n2.2745364003664680e+01\n-4.3691992342424719e+01\n-1.1658871462137659e+01\n1.8135012683695336e+01\n-3.5440606786931049e+01\n-8.9944151310462264e+00\n1.9178234226512316e+01\n-3.7368418210231056e+01\n-7.0885325701620685e+00\n1.9450963951927722e+01\n-3.8091032890693356e+01\n1.2188861507094046e+01\n2.5439768886645389e+01\n-4.9129456595025324e+01\n1.0552143153572462e+01\n2.5256720269129922e+01\n-4.9026233541902059e+01\n-1.1114132182460150e+01\n1.8323327045451556e+01\n-3.5911029345049378e+01\n-7.2655349789908783e+00\n1.9377644177267722e+01\n-3.8032329052382892e+01\n1.3269125183993955e+01\n2.6132628494428545e+01\n-5.0568458821205027e+01\n7.6904823008897036e+00\n2.4292022046031704e+01\n-4.7371314509720449e+01\n9.4629162355172181e+00\n2.5184340847424220e+01\n-4.9045496893744946e+01\n-2.3419037504846667e+00\n2.1222363063703774e+01\n-4.1534283791761226e+01\n1.3849104610757601e+01\n1.3912548798172963e+01\n-3.2790531797757261e+01\n1.7433432610627065e+01\n2.8038702505914355e+01\n-5.4458142442576140e+01\n2.3299208039453568e+01\n2.6648429277045047e+01\n-5.3072502308594260e+01\n-8.5935517311459915e+00\n1.8864333278602032e+01\n-3.7358819210512110e+01\n1.1127769218158981e+01\n1.2491626621454969e+01\n-3.0503484563588614e+01\n1.1568612925457561e+01\n1.1440789443738336e+01\n-2.8992763519421992e+01\n9.6284640864416904e+00\n2.4736900216921427e+01\n-4.8912645428868245e+01\n8.5346256568719863e+00\n2.4120092168993523e+01\n-4.8059149628121169e+01\n1.5397747724087809e+01\n2.6308411541852706e+01\n-5.1934201094213016e+01\n1.2759514866508997e+01\n1.1245518011247222e+01\n-2.8792661376788622e+01\n1.7302493525259639e+01\n2.5302037707702098e+01\n-5.0924550187126634e+01\n-8.2021619831745607e+00\n1.9151372780128696e+01\n-3.8306490528827425e+01\n1.2629707669534467e+01\n2.4229413985313322e+01\n-4.8690638386821327e+01\n-8.6412739979962101e+00\n1.8967305174540243e+01\n-3.8261751215671033e+01\n-8.6869858279515544e+00\n1.7616806705497197e+01\n-3.6079422496850157e+01\n7.2422763800634904e-01\n2.1886854617250403e+01\n-4.4053517663861918e+01\n-1.4212347630287263e+00\n2.1128021689871709e+01\n-4.2743680374594454e+01\n-1.1508728459704841e+01\n1.7609017845234369e+01\n-3.5786950365818100e+01\n-7.7549060360669451e+00\n1.8987669182049810e+01\n-3.8841825156826694e+01\n-7.6795617018825997e+00\n1.8638240041500879e+01\n-3.8369531070210122e+01\n1.8448191726865602e+01\n2.5553320504380633e+01\n-5.2023270663982117e+01\n1.6007111733848681e+01\n2.5944989841411715e+01\n-5.2515840741441167e+01\n5.4652554137180287e+00\n2.2735709236627358e+01\n-4.6137835207489324e+01\n-5.7713628881144121e+00\n1.9520840572420301e+01\n-3.9842616166975084e+01\n6.6761893864973283e+00\n2.3362675000344225e+01\n-4.7547576048669598e+01\n-1.2742119737691553e+01\n1.7098408248047331e+01\n-3.5019117498118142e+01\n6.0477166311702071e+00\n2.3099020227840025e+01\n-4.7110409660224917e+01\n-4.3042668807365008e+00\n1.9995624634753515e+01\n-4.0966015608230158e+01\n1.2470479930951766e+01\n2.3980725923790882e+01\n-4.9573845569231310e+01\n1.2465180173789095e+01\n2.3921946104027310e+01\n-4.9513970962607139e+01\n-8.9310666892257515e+00\n1.8651297725401673e+01\n-3.8745734052305465e+01\n1.7838625755074428e+01\n2.7285896203848466e+01\n-5.5597340877923401e+01\n-1.2167638158717244e+01\n1.4963621853211110e+01\n-3.2200925520068708e+01\n1.2414457400172806e+01\n6.4046979921239107e+00\n-2.2427148051934250e+01\n1.7305527513961469e+01\n2.7307618697909405e+01\n-5.5997451453861345e+01\n1.5361136315541479e+01\n2.5423443835718906e+01\n-5.2526924198213536e+01\n1.2510850031801196e+01\n7.3158455151552042e+00\n-2.4063323733955713e+01\n-3.1983882050060641e+00\n1.9845196388600129e+01\n-4.1796689810464301e+01\n2.0640840766939757e+01\n2.5998672155227258e+01\n-5.4478208972780081e+01\n1.2665381655762530e+01\n8.7773624657025664e+00\n-2.6707057151153847e+01\n-3.0025894261152386e+00\n2.0100256053788691e+01\n-4.2352348717807132e+01\n-8.9336020213127423e+00\n1.7928329322904670e+01\n-3.8027366550935838e+01\n1.9327781058976754e+01\n2.5570000033304218e+01\n-5.3913655895230562e+01\n-3.3806018848431582e-02\n2.1064365323772851e+01\n-4.4395461232644308e+01\n-2.3970836738109156e-02\n2.1055732947081566e+01\n-4.4288271685622874e+01\n1.2729171527045986e+01\n1.0746525689063528e+01\n-2.9651470557214004e+01\n-8.5083531702485065e+00\n1.8392456106035432e+01\n-3.8725745907841201e+01\n-8.4972466840345593e+00\n1.8385421254364918e+01\n-3.8724689574013006e+01\n1.1736974154651151e+01\n9.0283714502964028e+00\n-2.6956093712488801e+01\n1.1736974154651151e+01\n9.0283714502964028e+00\n-2.6956093712488801e+01\n9.4610520692832054e+00\n2.4715164631304869e+01\n-5.1698512176889231e+01\n2.8781822530636822e+00\n2.1438743362843251e+01\n-4.5391837395528221e+01\n2.7530062803861552e+00\n2.1565303823463875e+01\n-4.5706150416166928e+01\n2.2179893347815156e+00\n2.1432710949047173e+01\n-4.5425767823730318e+01\n-1.0600409934499211e+01\n1.7457197852535462e+01\n-3.7106748991317126e+01\n2.0417654401576484e+00\n2.1415171122745093e+01\n-4.5608247922565027e+01\n1.8000362756860997e+00\n2.0948671391400598e+01\n-4.4637106387360681e+01\n1.7663424807596033e+00\n2.1384748889854095e+01\n-4.5557062847085149e+01\n1.7811125513661377e+00\n2.1396982968293106e+01\n-4.5613089093252036e+01\n-6.9187860484958428e+00\n1.8429540685946936e+01\n-3.9517989831786814e+01\n-1.2313680358669350e+01\n1.6810850371673030e+01\n-3.5956521954253787e+01\n2.1040170537274374e+00\n2.1129788788030808e+01\n-4.5615760523915483e+01\n1.5040659942214017e+01\n2.4640297700213868e+01\n-5.3106679673963200e+01\n1.4494756240731981e+01\n2.4621873946882641e+01\n-5.3040838942146650e+01\n9.6982212020407470e+00\n2.2387937643790686e+01\n-4.9594396667068224e+01\n1.0349303023820942e+01\n2.3390813033510003e+01\n-5.1373605183191323e+01\n1.7616066059864252e+01\n2.4997057288232956e+01\n-5.4903793104305741e+01\n1.9325460044089557e+01\n2.4807737930043249e+01\n-5.5057784899485590e+01\n1.9325460044089557e+01\n2.4807737930043249e+01\n-5.5057784899485590e+01\n1.9408763330168682e+01\n2.4656749126056887e+01\n-5.4857386583763791e+01\n9.0315402651180392e+00\n2.2609533799466529e+01\n-5.0128634554501978e+01\n2.2304548868784330e+01\n2.7521503957974371e+01\n-6.0658088588424420e+01\n-4.9135685374783309e+00\n1.8715095970801713e+01\n-4.1651904305355096e+01\n-1.1817651549338365e+01\n1.6566775601555335e+01\n-3.6899789751433737e+01\n1.3093923366975561e+01\n6.6014414683052838e+00\n-2.4831552844412460e+01\n1.2147717272723815e+01\n7.6077348652714711e+00\n-2.6564692277426456e+01\n1.7906275801308876e+01\n2.4458354019775946e+01\n-5.5592785989998120e+01\n1.6482583919883304e+01\n2.3864544287459886e+01\n-5.4798709060573785e+01\n1.5174144240030914e+01\n2.2980899397217087e+01\n-5.3448416857331857e+01\n1.3539708422101818e+01\n2.2091623751324313e+01\n-5.1686068765494319e+01\n1.2825887466662689e+01\n9.5064183800393334e+00\n-3.0396582433846000e+01\n1.2942145359290141e+01\n5.2911493386621498e+00\n-2.3663056571846571e+01\n6.3227130805479224e+00\n2.1348206774770354e+01\n-5.0340063485404578e+01\n1.9523863423370059e+01\n2.3754117298497981e+01\n-5.6971287694084673e+01\n1.3094394314085202e+01\n6.1927195132349908e+00\n-2.5567472940284361e+01\n1.2740939521695566e+01\n1.0798487023759412e+01\n-3.3812343231315090e+01\n-3.6414784414201029e+00\n1.8258066625601131e+01\n-4.3668697484135379e+01\n1.3677699800547835e+01\n1.0251722157167574e+01\n-3.3318684478867929e+01\n1.1305957463045292e+01\n7.4363814847614815e+00\n-2.7882057214522629e+01\n1.1985236560355816e+01\n9.2894182449479654e+00\n-3.1484217946376226e+01\n1.7054467271252591e+00\n1.9452988532780093e+01\n-4.7549492591211141e+01\n5.4261478272312536e-01\n1.8969775069812851e+01\n-4.6980197503631949e+01\n5.5494112382814862e+00\n2.0187525550883532e+01\n-5.0241754191942654e+01\n-9.0913730977086082e+00\n1.5967371764272748e+01\n-4.0092652931628145e+01\n1.5421612430696647e+00\n1.9760830807158428e+01\n-4.8881613574037289e+01\n1.3095827947293614e+01\n9.3954837224193728e+00\n-3.2426118345615443e+01\n5.8454253612449225e+00\n2.0035006605142865e+01\n-5.0647734268752593e+01\n1.8463944764619262e+00\n1.9150598402161826e+01\n-4.8326911603884461e+01\n5.4137031213413840e+00\n2.0089069427814668e+01\n-5.0946747443608324e+01\n1.3380874458034050e+01\n9.1979150022302250e+00\n-3.3258666607238290e+01\n1.3686022403525063e+01\n4.9520480402821727e+00\n-2.5361882803186177e+01\n1.2246969467300204e+01\n6.7531994510347086e+00\n-2.8572034240050201e+01\n1.2846004791894519e+01\n7.0425267730670749e+00\n-2.9466164807534668e+01\n-3.1445417212405644e+00\n1.7208999980963121e+01\n-4.5379551201525388e+01\n1.2108942250470317e+01\n9.6242904625779619e+00\n-3.4563380673595596e+01\n1.3728048862601925e+01\n5.3035595257551300e+00\n-2.6987962885360393e+01\n1.3492258945421609e+01\n5.2945429604024570e+00\n-2.6967498890610507e+01\n1.3314990765413738e+01\n4.8810727378604728e+00\n-2.6277335892994564e+01\n-5.6402484056276370e+00\n1.6488200020932421e+01\n-4.3896911009031712e+01\n-1.1842795397931726e+01\n1.4908494843287547e+01\n-3.9498679636381759e+01\n1.5530806763198900e+01\n2.1105242174423648e+01\n-5.7942964414005544e+01\n1.2046510171455742e+01\n6.4302805827977219e+00\n-2.9080620451675628e+01\n5.0659744606034698e+00\n1.8890270998701030e+01\n-5.1502981905130881e+01\n1.4135444433678790e+01\n4.1685213292493808e+00\n-2.5544578152757467e+01\n1.3969673731647935e+01\n2.9511729995918716e+00\n-2.3349951094604783e+01\n-9.6958892786821842e+00\n1.5076917845799354e+01\n-4.1082592446121623e+01\n1.3885041096957501e+01\n3.9750147093220574e+00\n-2.5538633390470821e+01\n3.7874136655153889e+00\n1.8249583419018958e+01\n-5.1457672252999451e+01\n1.2941288661907906e+01\n3.7090686549769285e+00\n-2.4952142722313006e+01\n1.0005003977762410e+01\n2.2618440676359244e+00\n-2.1315764230331649e+01\n-1.2400786315910365e+01\n1.4173548410013302e+01\n-3.9113633437962797e+01\n1.2993294024200342e+01\n8.7237986865102091e+00\n-3.5321757750583302e+01\n-7.7581462403202774e+00\n1.5325515870648950e+01\n-4.3258239516637254e+01\n-7.8103999235397810e+00\n1.5423358497911314e+01\n-4.3281507588903693e+01\n1.3879033036268099e+01\n3.9125025168785816e+00\n-2.6147867159558800e+01\n1.1774244675675856e+01\n5.8083632669634468e+00\n-2.9697112161127436e+01\n-1.0272277935588594e+01\n1.4455037790727657e+01\n-4.1163814928151787e+01\n7.9744586945968345e+00\n1.8400404029229062e+01\n-5.4307809259337077e+01\n1.4570946632831408e+01\n3.1967936341216001e+00\n-2.5569344994442620e+01\n-9.5352148661914859e-01\n1.6269557873743505e+01\n-4.8590252687279104e+01\n1.4417597534864180e+01\n1.4686088036699194e+00\n-2.2100254489506380e+01\n5.3229999550918503e+00\n-5.2660462173820685e-02\n-1.6347256288564726e+01\n1.3588699455785733e+01\n3.2582029739191900e+00\n-2.5799891994068290e+01\n1.8113862011127966e+00\n3.3847662719022118e+00\n-2.2857265259615868e+01\n1.2809438798313604e+01\n4.4833285039206423e+00\n-2.8637738156963106e+01\n-1.4262156895139910e+00\n1.6222131751934882e+01\n-4.9503267276808693e+01\n1.4327993546707498e+01\n2.2922136505850892e+00\n-2.4641064961465279e+01\n-1.1488145096423045e+01\n1.3551509828100734e+01\n-4.1009096350691678e+01\n1.2493477591550841e+01\n4.0232802714349232e+00\n-2.7706167355350683e+01\n3.6576826611216906e-01\n1.6485978836864206e+01\n-5.0581968069202389e+01\n-9.8082705748315941e+00\n1.3911136279826277e+01\n-4.2801789738727280e+01\n-3.4521220718439261e+00\n1.5067373595858161e+01\n-4.7606227078309061e+01\n2.9971611400437541e+00\n2.0800037128206488e+00\n-2.1017315320851445e+01\n-1.1462937187967858e+01\n1.3323365497828174e+01\n-4.1064251571177110e+01\n-1.0676621841093450e+01\n1.3274566309836382e+01\n-4.1557810664298295e+01\n-1.0730500077475689e+01\n1.3286862311071907e+01\n-4.1383018237494383e+01\n1.3206702338388235e+01\n3.7339321663527234e+00\n-2.8073693768614092e+01\n1.3402419621807807e+01\n3.7600762191717041e+00\n-2.8209386158866124e+01\n3.0369417022269038e+00\n1.9407107646979838e+00\n-2.0905798424042981e+01\n-1.1270409939189794e+00\n1.5334535748640349e+01\n-4.8753401276412632e+01\n1.4032845059993868e+01\n2.6392628984774751e+00\n-2.6228317018832424e+01\n-1.2938321511935664e+01\n1.2840740367603461e+01\n-3.9847043696987583e+01\n1.4445397327485823e+01\n1.2744488004837982e+00\n-2.3610004745941680e+01\n2.6554630756732402e+00\n1.7815591539197417e+00\n-2.0717281962166606e+01\n-9.2602827487708108e+00\n1.2672076201325428e+01\n-4.1294866193491288e+01\n3.4873558017644228e+00\n1.6289915269123764e+01\n-5.3620429308606624e+01\n-5.8091756998650013e-01\n3.4292640265503556e+00\n-2.3575493527511398e+01\n-1.1076019847218070e+01\n1.3000975700928674e+01\n-4.1892851241245936e+01\n1.3778128886135196e+01\n2.8811076837506095e+00\n-2.7579314819385843e+01\n7.1769505000699363e-01\n1.5727608940984817e+01\n-5.1978469631648721e+01\n8.0345526698843195e-01\n2.0701006417879380e+00\n-2.1249563577468212e+01\n-1.2790009527773975e+01\n1.2270751567283975e+01\n-3.9935395054529046e+01\n-9.0861964148066754e-01\n3.2885802410707274e+00\n-2.3560462888077716e+01\n-3.7503652176839819e-02\n1.5581858465278463e+01\n-5.1671171453019944e+01\n6.6988674388195992e+00\n1.4039838826255101e+01\n-5.1103033075012355e+01\n-1.0930584690559469e+01\n1.3039793677793703e+01\n-4.2911259336445426e+01\n1.2802973647453674e+01\n3.1114152875334615e+00\n-2.8418432660877311e+01\n1.1387079929925024e+00\n1.4307515861454883e+00\n-2.0398498888430570e+01\n1.2465983367828390e+01\n4.5329355235620525e+00\n-3.2014170453194133e+01\n1.2301055678761623e+01\n2.4088613004725112e+00\n-2.6778305609189953e+01\n-6.2192022145872095e-01\n2.3507398647586903e+00\n-2.2066163131086441e+01\n1.4742682917342787e+01\n1.4976163195281020e+00\n-2.6020753177244618e+01\n2.8002878578303911e+00\n1.1229266908177105e+00\n-2.0349879929826599e+01\n-5.5385793541472599e-02\n1.9331473546525693e+00\n-2.1366510815721707e+01\n-9.3464832174005974e-01\n1.4590353129275101e+01\n-5.1262545840823449e+01\n-7.5338111776333394e-01\n2.1428793370088570e+00\n-2.2008075190613773e+01\n-5.1186505147325778e-01\n1.9083304854335301e+00\n-2.1663562092718031e+01\n3.9186561901561014e+00\n1.3058052659795276e+01\n-4.9835464231326796e+01\n-7.0757537533893133e-02\n1.4412711023460197e+01\n-5.2080987546133649e+01\n1.3616278080351043e+01\n1.5996886915804294e+00\n-2.6768067373354583e+01\n1.3616278080351043e+01\n1.5996886915804294e+00\n-2.6768067373354583e+01\n1.5587377989177633e+00\n8.4829192664279462e-01\n-2.0046669173536440e+01\n-1.4321506118389284e+00\n1.4387466934434633e+01\n-5.2090839428557558e+01\n-1.0104222964279417e+01\n1.1585553085522614e+01\n-4.2272627887597999e+01\n3.9197170790892746e+00\n5.9116241033824446e-01\n-2.0793525538733622e+01\n-1.6115484661657875e+00\n2.4563756070067542e+00\n-2.3201954422404736e+01\n-1.1202987379067332e+01\n1.2043348979240060e+01\n-4.3557850209080350e+01\n-9.9495821954792731e+00\n1.2194610941649382e+01\n-4.4454902214926165e+01\n-9.9495821954792731e+00\n1.2194610941649382e+01\n-4.4454902214926165e+01\n-9.4095144712010477e+00\n1.2285130315012790e+01\n-4.5257444117878542e+01\n-3.2471971475556058e+00\n1.3307362678043773e+01\n-5.0348313990948519e+01\n-1.0596837566711709e+01\n1.2033237497278202e+01\n-4.3992989941327927e+01\n-3.4829139624834684e+00\n1.3486636925950570e+01\n-5.0750687431923382e+01\n2.3652447224323114e+00\n1.1063947087628108e+01\n-4.6966440676960907e+01\n2.5933818652491332e+00\n1.5549426080796289e-01\n-1.9844427917865485e+01\n7.5929974854527016e-01\n6.9659757055287663e-01\n-2.0478878534383156e+01\n1.3951045436696234e+01\n1.0691711596154923e+00\n-2.7023224037525363e+01\n1.5023177739994710e+01\n1.9243246253433816e-01\n-2.5929994220097264e+01\n4.3473113701352144e+00\n1.2389374686528239e+01\n-5.2565849472509754e+01\n1.4373888300941621e+01\n6.3169990383305019e-01\n-2.6731891599208520e+01\n-2.3539880353273179e-01\n9.1061860385536775e-01\n-2.1006624245667656e+01\n1.4231140549078991e+00\n3.2811574498765039e-01\n-2.0278980067648334e+01\n1.3947943456205293e+01\n9.2216504170403724e-01\n-2.7276531757339210e+01\n-4.5868738027942078e+00\n1.2863487776461389e+01\n-5.0181744962467704e+01\n6.0342646971724800e+00\n-1.7659020216263865e+00\n-1.7275590831526369e+01\n-5.3880729660297322e-01\n9.0905523068715455e-01\n-2.1287940004675892e+01\n-1.8543154702578271e+00\n1.9053924240354454e+00\n-2.3623995737537907e+01\n1.4710733330750678e+01\n4.9328943861008667e-01\n-2.7614867247755750e+01\n-1.7025131504701468e-01\n5.5171791938562609e-01\n-2.0927134566073800e+01\n3.8522731602116935e+00\n-1.1499732034894383e-01\n-2.1015117877615520e+01\n1.4109000890094119e+01\n1.2518450036974516e-01\n-2.6828817123168605e+01\n1.4934472748741081e+01\n-1.2537120484106906e-01\n-2.6441737030809477e+01\n1.4876402826558278e+01\n-1.2487513899255973e-01\n-2.6441188869771715e+01\n-6.4477607159300954e+00\n1.1630577361931277e+01\n-4.8294754403771847e+01\n1.5230323042855693e+01\n-5.5996221236636601e-01\n-2.6428915025525498e+01\n-1.1582778263251785e+00\n7.5461383772700741e-01\n-2.1855285760379594e+01\n1.4207962970284829e+01\n6.6567371788897889e-01\n-2.9473244522082609e+01\n-1.1253980419444072e+00\n1.3019549243860189e+00\n-2.3482316449286305e+01\n1.6126386118258040e+00\n-3.6419558602279811e-01\n-2.0067480329895574e+01\n-2.2286542495173802e+00\n2.0257073304206665e+00\n-2.5085479685647602e+01\n1.8992530405113545e-01\n-8.3430910069386632e-02\n-2.0639290864273438e+01\n-3.4880730848871755e+00\n2.7280051495430686e+00\n-2.7080216408001643e+01\n1.5129748532279860e+01\n-7.3418722779467938e-01\n-2.7084395511522494e+01\n-2.6930304200155053e+00\n1.6100029676989511e+00\n-2.4348540688919289e+01\n-2.5847164515770542e+00\n1.5872023713341747e+00\n-2.4519479171600331e+01\n2.4377862662733270e+00\n-7.1813180056026260e-01\n-2.0455482916156953e+01\n1.4624599017568224e+01\n-1.0302118870705128e+00\n-2.6398708491680274e+01\n-9.1347354854459406e-01\n2.1928488830134524e-01\n-2.1528745860193496e+01\n-2.6135722858770905e+00\n1.3110237605849573e+00\n-2.4011992738994998e+01\n-8.2850195476665889e-01\n9.8205524694569571e-02\n-2.1357283130415123e+01\n1.9437037327934010e+00\n-8.8387789427481722e-01\n-2.0083042679041668e+01\n2.8063310061554509e+00\n-9.5842468719344320e-01\n-2.0635460481771510e+01\n-2.2888824857152708e+00\n9.3933205449425039e-01\n-2.3597878734869010e+01\n5.7888538292590219e+00\n-2.6630012694501324e+00\n-1.7630346276798527e+01\n1.5174942230811364e+01\n-1.0830588237885648e+00\n-2.7732803606704390e+01\n1.5135729873096109e+01\n-1.2076758620875867e+00\n-2.7562917281080772e+01\n2.4958915651066396e+00\n-1.0531518437630678e+00\n-2.0537735778770873e+01\n2.9401765047044610e+00\n-1.4415088227539186e+00\n-1.9915959598816919e+01\n5.5287504119660511e+00\n-3.0828620761428516e+00\n-1.6804333225070909e+01\n-3.9632650753050678e+00\n1.4093163103026616e+00\n-2.5413976628065420e+01\n-2.8372040433450012e+00\n5.4192273926010393e-01\n-2.3396473967033547e+01\n1.4922888605449701e+01\n-2.1702978639024759e+00\n-2.5848362728576728e+01\n-3.1655541585973008e+00\n5.6575287773698877e+00\n-4.0415954947529372e+01\n-1.8610226474744047e+00\n-2.2446550132831450e-01\n-2.2032516380544653e+01\n1.3862204158980317e+01\n-5.6294435327419956e-01\n-3.0714602437171635e+01\n9.3383649103573374e-01\n-1.2246350188497033e+00\n-2.0599059371108446e+01\n5.7475601130972116e+00\n-3.3393972431935146e+00\n-1.7404862395600517e+01\n-1.3561522793315741e+00\n-7.7102294353453271e-01\n-2.1239693892389766e+01\n-2.3633144890035398e+00\n-1.9005056590485828e-01\n-2.2837319965198954e+01\n1.5617607516465657e+01\n-2.5224209528788220e+00\n-2.7212176873904344e+01\n5.7911373381934723e+00\n-3.5773721056524779e+00\n-1.7457363992526339e+01\n-3.7307032456088280e+00\n6.7538378427293599e-02\n-2.3403014067219569e+01\n-8.2773226555411608e+00\n5.8303039949653570e+00\n-4.0560795044262250e+01\n1.4399797829177540e+01\n-1.9560681251830168e+00\n-2.9600059020264741e+01\n3.5507855151166363e+00\n-2.3239185865357417e+00\n-2.0009695978824421e+01\n3.9546280606599273e+00\n-2.4465146791284811e+00\n-2.0323440664310084e+01\n-3.5724421311689785e+00\n-1.0460300454534795e-01\n-2.3301059275782748e+01\n-3.7265042951425729e+00\n-1.7817995181113627e-01\n-2.3070258509614916e+01\n-3.6184629574174978e+00\n-1.8390213922748011e-01\n-2.3192240165358495e+01\n4.0366512685274234e+00\n-2.5713257334354926e+00\n-2.0202958706041418e+01\n-3.6618807899055157e+00\n-2.2063267954111559e-01\n-2.3214357100078161e+01\n-1.7638019814157559e+00\n-1.0329250476534262e+00\n-2.1669507360124310e+01\n3.1741227661880838e+00\n-2.8058724012789305e+00\n-1.9080681632124652e+01\n1.5253735766251426e+01\n-3.3132127017218509e+00\n-2.7069538222846372e+01\n1.5397525303846034e+01\n-3.4807638914092962e+00\n-2.6991340364511828e+01\n1.5578524754088946e+01\n-3.7523898105618700e+00\n-2.6443329121617776e+01\n-5.2931103323070401e+00\n3.2721192846598348e+00\n-3.6821824695482455e+01\n-5.2707175551031309e+00\n3.3215562358588144e+00\n-3.6611265593264775e+01\n-2.4510795794141322e+00\n-1.4162735242302322e+00\n-2.1542244065296536e+01\n-3.1523796932880899e+00\n-1.0833365142092271e+00\n-2.2263388555353906e+01\n-3.1502117122962439e+00\n-1.0643387320941389e+00\n-2.2490090724130464e+01\n9.3734950796889882e-01\n-2.6735880479801390e+00\n-1.9893759879133867e+01\n3.1847392273573329e+00\n-3.2967370958281341e+00\n-1.9582357136904072e+01\n4.0412920357951627e+00\n-3.1878711040950729e+00\n-2.0659815483002859e+01\n4.0412920357951627e+00\n-3.1878711040950729e+00\n-2.0659815483002859e+01\n-2.8607817638798969e+00\n-1.4926650744061172e+00\n-2.1553678339307634e+01\n6.5130414822004723e-01\n-2.8871841142692753e+00\n-1.9557655369733123e+01\n-1.9687254980103686e+00\n-1.9449794894698493e+00\n-2.1069421380769057e+01\n9.7600743824395741e-01\n-2.9631630812222660e+00\n-1.9444560163491836e+01\n4.4529237049760839e+00\n-3.3495262089498770e+00\n-2.1230717924035275e+01\n-1.7186551783915078e+00\n-2.1065917359016963e+00\n-2.0853240903589541e+01\n-5.1810892573924860e-01\n-2.6694328316008118e+00\n-2.0136870115704273e+01\n-7.0925140685345651e+00\n2.3514360223818640e+00\n-3.5268130606185871e+01\n-3.3999932238979564e+00\n-1.3517016166319300e+00\n-2.3593952741774348e+01\n-6.3981854202307220e-01\n-2.7557424411443274e+00\n-2.0326206154345257e+01\n1.6428506744165607e+00\n-3.3580608412353370e+00\n-2.0130126466452552e+01\n1.6192138476938369e+00\n-3.3466867022347784e+00\n-2.0062650361897564e+01\n8.2789667883400331e-01\n-3.3004793271390263e+00\n-1.9639606046241028e+01\n1.5517025090671208e+00\n-3.4871224128412996e+00\n-2.0047286782284480e+01\n-6.2607213243201025e+00\n5.8457469625789538e-01\n-3.0716790550717210e+01\n1.6063448160613558e+00\n-3.5530953945362396e+00\n-2.0248585973279891e+01\n-1.0012391028717817e+01\n2.0872595073659386e+00\n-3.5364366698461396e+01\n-2.2277843389998910e+00\n-2.4282078539014029e+00\n-2.1848367881311070e+01\n7.4154250378881248e-01\n-3.5628732548963766e+00\n-1.9813687915884529e+01\n-1.8952599238638532e-01\n-3.2097005508483090e+00\n-2.0548167541535395e+01\n-1.7267980755847296e+00\n-2.6882612527866927e+00\n-2.1366067109982531e+01\n3.7952843992177669e+00\n-4.0458979642319335e+00\n-2.1157533880445680e+01\n-1.7438839952119560e+00\n-2.6947223175140040e+00\n-2.1511928614748456e+01\n8.1183247976657680e-01\n-3.6192417538658859e+00\n-2.0048710413845765e+01\n6.1604009690698402e-01\n-3.5431574885934403e+00\n-2.0231998103577098e+01\n-1.9470559727697792e+00\n-2.6963351816768295e+00\n-2.1706977493321055e+01\n3.6711261505908044e+00\n-4.0667181277615203e+00\n-2.1111189662478509e+01\n2.5079872619252719e-01\n-3.3285646670346072e+00\n-2.1226506299648442e+01\n-2.0371528835847315e+00\n-2.7049979591813291e+00\n-2.1882187933581395e+01\n-7.9864217768677408e+00\n8.6057135775790583e-01\n-3.3346443362686699e+01\n1.1497783008594460e+01\n-5.3078995306098040e+00\n-2.5393621479523613e+01\n-6.6440314292214735e+00\n3.6391463100119664e-01\n-3.2753357399586342e+01\n-7.9765840688039189e+00\n4.7000660792784456e-02\n-2.9983225281869988e+01\n-7.9765840688039189e+00\n4.7000660792784456e-02\n-2.9983225281869988e+01\n4.8642096201276281e+00\n-4.4231220178822808e+00\n-2.2146562792908920e+01\n5.0591133145356153e+00\n-4.3636263696023354e+00\n-2.2549809362215335e+01\n7.0474648200136381e-01\n-3.8616157188138254e+00\n-2.0146122962907008e+01\n3.7049894592561174e+00\n-4.3144230624821329e+00\n-2.1399790650779018e+01\n-5.6078057908064874e-02\n-3.6341761849690197e+00\n-2.0821150531036057e+01\n-7.0100901811943803e+00\n1.2487795299456639e-01\n-3.2366408986402071e+01\n2.8371762314416715e+00\n-4.4231092735118391e+00\n-2.0618111673200399e+01\n-6.6455274671313946e-01\n-3.5787650253832184e+00\n-2.1244388356952275e+01\n1.5332813776593115e+00\n-4.3055989502386351e+00\n-2.0768376957157898e+01\n-6.6226472350850569e+00\n-3.6928368769327830e-01\n-3.1964187566712877e+01\n-2.0708704388264811e+00\n-3.2157147492328644e+00\n-2.2346427750977789e+01\n-7.5841190127297180e+00\n-2.1235660004753137e-01\n-3.2396792683780490e+01\n3.0826518303890472e-02\n-4.0634748948772081e+00\n-2.1020149345532538e+01\n1.9500187836945473e+00\n-4.5456051848877372e+00\n-2.0840744801933145e+01\n-3.3423608898987012e+00\n-2.7386110274787434e+00\n-2.4265910053183184e+01\n8.3248349504871602e-02\n-4.0911328623706824e+00\n-2.1200812412713283e+01\n-3.3300996639402594e+00\n-2.8203768747748841e+00\n-2.4289105586345887e+01\n1.4818588259773466e-01\n-4.1967565640496174e+00\n-2.1204017492149152e+01\n-3.1783199242836906e+00\n-2.9424700238188439e+00\n-2.4077725306296347e+01\n-7.1233865808198367e+00\n-8.6658526151886028e-01\n-3.1437877878580810e+01\n-7.1294022236914580e+00\n-8.4735374518262729e-01\n-3.1385028099701184e+01\n-7.3679843664477174e+00\n-7.8851565432188864e-01\n-3.1831514066246420e+01\n8.8355353713987717e-01\n-4.5014153162375194e+00\n-2.1161387326911395e+01\n-7.2442563491386753e+00\n-8.6358443004031360e-01\n-3.1447892798414731e+01\n1.7108532820324500e+00\n-4.6373569648011088e+00\n-2.1255382537245360e+01\n-8.4017519302117254e+00\n-8.4319474509900894e-01\n-3.0908092383053926e+01\n6.1724735375545936e-01\n-4.5017763408510501e+00\n-2.0951938224682397e+01\n-8.1250824000926425e+00\n-9.6653133494600851e-01\n-3.0820975250495085e+01\n-1.8325157921653763e+00\n-3.6400865843559314e+00\n-2.4101733054999595e+01\n-2.2905513456004636e+00\n-3.7068684078072716e+00\n-2.2736983076129047e+01\n-1.8658452000521928e+00\n-3.8940507928553969e+00\n-2.2360638555967459e+01\n-1.0679686260816128e+01\n-4.2867238272632452e-01\n-3.1679841655722619e+01\n3.9343839707025230e-01\n-4.5563106953539609e+00\n-2.1533156863678318e+01\n4.3339438006713147e+00\n-5.8999456658299554e+00\n-2.0673754620724445e+01\n-7.6032805456287926e+00\n-1.5177906093653022e+00\n-3.0439813759636753e+01\n-2.4868349292010645e+00\n-3.7141082389190276e+00\n-2.3557871329226835e+01\n-2.5800774155690123e+00\n-3.7565100076007973e+00\n-2.3505015682190269e+01\n-2.2561865159893055e+00\n-3.9569384826035998e+00\n-2.2998712573694988e+01\n-2.2561865159893055e+00\n-3.9569384826035998e+00\n-2.2998712573694988e+01\n-9.2837919667100763e+00\n-1.2371180588502486e+00\n-3.0978109135368392e+01\n-6.8281564315685186e+00\n-2.2221289995269431e+00\n-2.9639797448930533e+01\n-9.0194242139344354e+00\n-1.6778007175879130e+00\n-2.9992413712649711e+01\n-8.7533005370473269e+00\n-1.7374393686803740e+00\n-3.0371325439052452e+01\n5.6061264469958036e+00\n-6.3664249021897845e+00\n-2.2050127429348386e+01\n2.8767945739050722e+00\n-5.8797545034282832e+00\n-2.0909798536635854e+01\n-3.0172411592512565e+00\n-4.1137113945911175e+00\n-2.4101603711632443e+01\n7.7221341738013816e-01\n-5.3217847950723378e+00\n-2.1464932982311375e+01\n-6.7932416053022413e+00\n-2.8872375556148397e+00\n-2.8417494552375487e+01\n3.5848144280980476e-01\n-5.3413211489022361e+00\n-2.2122591977684696e+01\n-7.7945500816225985e+00\n-2.5683616938035114e+00\n-2.9232425116148757e+01\n-6.7990544053600281e+00\n-2.9695058451021414e+00\n-2.8464174331749927e+01\n7.7940115214373296e-01\n-5.8300562398116655e+00\n-2.1241263474742929e+01\n-3.6472549685729501e+00\n-4.4795689298445618e+00\n-2.3792857227541006e+01\n6.5577970109386652e-01\n-5.8877648522859616e+00\n-2.1094502284365316e+01\n-7.7054176048851293e+00\n-3.0277490876829014e+00\n-2.9722101269417003e+01\n-3.4037800906655682e+00\n-4.6978895828472265e+00\n-2.3606267869978552e+01\n-3.6230268681802325e+00\n-4.8547548769674433e+00\n-2.4267504540804335e+01\n3.1526794738549473e+00\n-7.2699832516186156e+00\n-2.0187316624097281e+01\n-8.6385439376116260e+00\n-3.7549813485205612e+00\n-2.7704821551242635e+01\n-7.1307401195825140e+00\n-4.2440557625461581e+00\n-2.7080012658102238e+01\n-8.7621096719022500e+00\n-3.8762486407879404e+00\n-2.7069444443075458e+01\n-8.8387161463962851e+00\n-4.0090778961289546e+00\n-2.6869345724372110e+01\n2.6967636157661476e+00\n-8.0951351432578136e+00\n-1.9151721712555247e+01\n3.7598714467047762e+00\n-8.8585930438068434e+00\n-2.0163966796038402e+01\n3.9283180299560465e+00\n-8.9278625297977889e+00\n-2.0186187852810068e+01\n2.2924034395573978e+00\n-8.7333122724099503e+00\n-1.8128661128859687e+01\n2.3143557758120799e+00\n-8.7482114157601814e+00\n-1.8087944883732387e+01\n-4.5021921764452184e+00\n-6.7074314906799231e+00\n-2.3048884299581886e+01\n1.3030341671812973e-01\n-8.1329433637997326e+00\n-2.0773857111973104e+01\n1.7549395940549117e-01\n-8.2389919207518538e+00\n-2.0628750873373377e+01\n4.6722843056103974e-01\n-8.4960311535936679e+00\n-2.0244673841067328e+01\n7.3868480196120767e-01\n2.6224040799780354e+01\n-4.0401991984631387e+01\n3.1649355846401899e+00\n2.6813617922453108e+01\n-4.1104463706710689e+01\n1.0045363175494847e+01\n2.8750429702404443e+01\n-4.3735653675899513e+01\n3.5586583235551643e+00\n2.6876425164038391e+01\n-4.1289439140197580e+01\n1.1159743510106454e+01\n2.8739598535617599e+01\n-4.3992572342895954e+01\n1.2941310346486066e+01\n3.0469037288541212e+01\n-4.6543104229355997e+01\n9.6519477660149846e+00\n2.8923106183077710e+01\n-4.4356263480678443e+01\n4.3764489624560072e+00\n2.7275556969778641e+01\n-4.2446518785826250e+01\n8.1933264467971636e+00\n2.8450123779725505e+01\n-4.4534163729315011e+01\n5.6013903011295108e-01\n2.5102051994207720e+01\n-4.0661774941590757e+01\n5.5980150601977263e-01\n2.5125119314773951e+01\n-4.0665284055427819e+01\n1.2163883034610818e+01\n2.9354205265335175e+01\n-4.7016453623884587e+01\n1.2791338349407596e+01\n2.9758550660159294e+01\n-4.7715460316743716e+01\n1.2495923567626003e+01\n2.9496499493962915e+01\n-4.7424065810112488e+01\n1.2388703320741399e+01\n2.8165709132778371e+01\n-4.5285883982913070e+01\n1.3906162263423390e+01\n3.0270745135629699e+01\n-4.8454892267388018e+01\n8.3738040248739409e+00\n2.7671099364228869e+01\n-4.4875155457661535e+01\n9.7642627641923063e+00\n2.8661581841784393e+01\n-4.6391362753406931e+01\n9.7619705148023836e+00\n2.8581299135960080e+01\n-4.5979150150706758e+01\n1.5409952798648405e-01\n2.4714642629778073e+01\n-4.0360076875505669e+01\n8.6958774820983742e-01\n2.4947373496057541e+01\n-4.0729113835783870e+01\n1.0668469400632887e+01\n2.8595486989421406e+01\n-4.6037372577183163e+01\n-5.7169673747046357e+00\n2.1334407346826616e+01\n-3.5734295037807058e+01\n1.5810894923670554e+01\n3.0314103009152838e+01\n-4.9133022396532461e+01\n4.6610609488638595e+00\n2.6207331145519039e+01\n-4.2895906058734916e+01\n1.1615111130771840e+01\n1.6367182947674973e+01\n-3.0636550704826451e+01\n-1.0447480840508929e+01\n2.0920115895353220e+01\n-3.5009892236486650e+01\n-9.6901307451819108e+00\n1.8429064260931131e+01\n-3.1996172018156489e+01\n5.1920002210799563e+00\n2.6222310050976386e+01\n-4.3366658512072547e+01\n4.7353969849714455e+00\n2.6122382513950470e+01\n-4.3420500788808283e+01\n6.5097530885355130e+00\n2.6643401596089660e+01\n-4.4157353232231927e+01\n1.1773141899555357e+01\n1.1322386064581234e+01\n-2.4202953822844613e+01\n1.8967471677226397e+00\n2.5044585408349338e+01\n-4.1952370742294114e+01\n1.4867271507821878e+00\n2.4747947985720440e+01\n-4.1620978546897796e+01\n1.3353082483496197e+01\n2.7542370650466129e+01\n-4.6231692142568292e+01\n4.0964071297364599e+00\n2.5628578797951086e+01\n-4.3157420458555166e+01\n-5.2729912718532894e+00\n2.2110345656745899e+01\n-3.7635942989973252e+01\n3.1169018510237225e+00\n2.5326711283773747e+01\n-4.2696574414522850e+01\n9.0632820911130008e+00\n7.1495303889585315e+00\n-1.8810967080202676e+01\n1.2735997261383419e+01\n9.4478623432320283e+00\n-2.2444795034860871e+01\n1.3472661303662260e+01\n9.5250708956930517e+00\n-2.2351821763265910e+01\n2.7456342825279232e+00\n2.5081381743841789e+01\n-4.2361894743166381e+01\n8.2827416152342970e+00\n2.6809390275079732e+01\n-4.5353945793150181e+01\n-1.2321407261726513e+01\n1.9520874320356914e+01\n-3.3737322498508838e+01\n-1.1919221511199652e+01\n1.9675567151793164e+01\n-3.3943750476931967e+01\n8.7575005282991878e+00\n6.5865664913340760e+00\n-1.8118360243812756e+01\n9.4827999625583210e+00\n7.6466385764947402e+00\n-1.9746479033523570e+01\n-1.0103224406606924e-01\n2.4101233401235476e+01\n-4.0995431227967494e+01\n-1.1941226334168278e-01\n2.3922502171342970e+01\n-4.0811591907939537e+01\n-6.7504355911074461e+00\n2.1412911709703316e+01\n-3.6840071737902200e+01\n5.6926441964640970e+00\n2.6280971416232934e+01\n-4.4577176760144724e+01\n3.4517013409110793e+00\n2.8106053664409387e+00\n-1.2706056069055816e+01\n1.2969479533174367e+01\n1.0038264650367930e+01\n-2.3279835693014167e+01\n5.3300350301609525e+00\n2.6034523189652930e+01\n-4.4220270703596320e+01\n8.8789417655105911e+00\n7.9146839405635152e+00\n-2.0116924264733871e+01\n1.3474104742930013e+01\n9.5863641660219638e+00\n-2.2790474905016207e+01\n4.6404155370494662e+00\n4.3781657957752476e+00\n-1.4991298566193887e+01\n-1.0490103487436409e+01\n1.9915413646219765e+01\n-3.4955298325836338e+01\n-6.3680285463468600e+00\n2.1350303932615013e+01\n-3.7139970461367433e+01\n9.1972298786299849e+00\n2.8409371038054825e+01\n-4.8311851092835042e+01\n9.1972298786299849e+00\n2.8409371038054825e+01\n-4.8311851092835042e+01\n4.7429744454842249e+00\n2.5600514732737611e+01\n-4.4148577438798512e+01\n1.3605004544823105e+01\n1.1284307080544069e+01\n-2.5653835056616096e+01\n-1.0684349313534874e+01\n1.9709736400585221e+01\n-3.4636593032435364e+01\n-8.6950538532628965e+00\n2.0450489209175878e+01\n-3.5944178352940526e+01\n-8.5050745449593868e-01\n2.3505487068906351e+01\n-4.0914993615040792e+01\n-8.4026604889848089e-02\n2.3681879447603421e+01\n-4.1300900851148263e+01\n8.7526190904036145e+00\n2.6568708470212350e+01\n-4.6117352183082254e+01\n5.4372464867196442e+00\n2.5461327285026787e+01\n-4.4480778462135675e+01\n5.5300255970285610e+00\n2.5654255478537802e+01\n-4.4774892637034185e+01\n7.6904230212343041e+00\n2.6497266954094965e+01\n-4.6399467846522427e+01\n-1.2072677694904986e+01\n1.8998010063526809e+01\n-3.4078463356344287e+01\n8.2566424629090012e+00\n2.6372741935716316e+01\n-4.6436411927058117e+01\n9.7875136008825034e+00\n2.7938450034087310e+01\n-4.8823230418351997e+01\n7.8791952593924393e+00\n2.6185004778576850e+01\n-4.6311415744764176e+01\n1.6696789483014577e+01\n2.8945831159442246e+01\n-5.0996745088451220e+01\n1.2581878105767531e+01\n1.3446180059406622e+01\n-2.8847239409002558e+01\n-8.1390966224030825e-01\n2.3146669724035959e+01\n-4.1397988073668586e+01\n-8.6854332820678071e-01\n2.3006253228390595e+01\n-4.1119167060870119e+01\n1.4571688394117250e+00\n2.3793022966443903e+01\n-4.2438395020961138e+01\n1.4256473589306905e+01\n1.4171091989427575e+01\n-3.0104268104269106e+01\n3.4903301221637579e+00\n2.4543277835257822e+01\n-4.3752990803211830e+01\n9.4172340039747038e+00\n2.6219942709919753e+01\n-4.6797349043078285e+01\n1.2042521978339547e+01\n2.7222655970466835e+01\n-4.8665642594198367e+01\n-9.1807001781047592e+00\n1.9798194890107769e+01\n-3.6154456097162146e+01\n1.3304253587151065e+01\n2.7632477690483270e+01\n-4.9880510598678846e+01\n1.6050157917075889e+01\n2.7980313963891945e+01\n-5.0834493905821809e+01\n4.2481744328916038e-01\n2.3169814166240304e+01\n-4.2503718572133003e+01\n2.0984219390090281e+01\n2.8639767684932970e+01\n-5.2526666707055128e+01\n2.1124435452365280e+01\n2.8682250172432635e+01\n-5.2673114361125670e+01\n1.1851529394907246e+01\n2.6714321080934884e+01\n-4.9232844830020206e+01\n-4.5520476653061381e+00\n2.1333989123833597e+01\n-3.9814761599322289e+01\n-1.0871702300918391e+00\n2.2172262809372356e+01\n-4.1720486392940323e+01\n-1.0674638432623182e+00\n2.2143870468021785e+01\n-4.1734391155437869e+01\n1.2596013570788680e+01\n2.6573623908489310e+01\n-4.9518408780328436e+01\n1.3790127511717222e+01\n8.8039893080138203e+00\n-2.4016305232189548e+01\n1.3416075322373709e+01\n8.6107558570347287e+00\n-2.3560765797177670e+01\n1.1933138569062569e+01\n2.5946564715877081e+01\n-4.8660513211640790e+01\n1.2338948785962526e+01\n2.6576332490952922e+01\n-4.9529235122176857e+01\n1.1516456437311156e+01\n2.6378913441678510e+01\n-4.9375379901395405e+01\n1.9086445935245532e+01\n2.8768991134823768e+01\n-5.3423275244222111e+01\n-2.9252980214744144e+00\n2.1494915107809646e+01\n-4.0660923018189521e+01\n2.4462856809937215e+01\n3.1288439924148179e+01\n-5.8283788129716370e+01\n5.8934510358315734e-02\n2.2511182709666681e+01\n-4.2869171392226029e+01\n3.6969328996967854e-01\n2.2588367894869631e+01\n-4.2961953481554360e+01\n1.2488063406409251e+01\n2.6331368270170525e+01\n-4.9721476357432628e+01\n1.7785578041998537e+01\n2.7779914039471990e+01\n-5.2400313636117176e+01\n2.7754475876112060e+01\n3.2624031050831135e+01\n-6.0760611963837455e+01\n1.2588676519219787e+01\n1.2026281067658065e+01\n-2.8728749020084376e+01\n1.2639453188469204e+01\n2.6217345379641674e+01\n-4.9894755285697642e+01\n1.3563736068667330e+01\n2.5361697171730686e+01\n-4.8846038337936179e+01\n9.7971093256041417e+00\n2.5573638857865067e+01\n-4.8707830569290486e+01\n7.6144598721708967e-01\n2.2441109336856112e+01\n-4.3249737698135505e+01\n-9.2547590675029632e+00\n2.2063139553444575e+01\n-4.1117289885372578e+01\n-8.7250076746144209e+00\n1.9175152669124650e+01\n-3.7119331308891525e+01\n1.3302502772079603e+01\n2.6204179622214028e+01\n-5.0259523810421634e+01\n8.2335828776160493e+00\n2.4324587282358582e+01\n-4.7330875742304258e+01\n4.8849737018802237e+00\n2.3398491861555076e+01\n-4.5764378282859937e+01\n3.2377352818913857e-01\n2.2105604781904251e+01\n-4.3322048475546389e+01\n1.4404073920911696e+01\n2.5720004870380656e+01\n-5.0339029896459280e+01\n-8.3765319521034680e+00\n2.1602264500942010e+01\n-4.1329055116301511e+01\n-8.0041874475663093e+00\n1.9312102734293784e+01\n-3.7975074388465565e+01\n-5.9004899434536213e+00\n2.0105791549333258e+01\n-3.9675966095843748e+01\n-3.5150827280202862e-01\n2.1780440521352336e+01\n-4.2945243558040247e+01\n1.2600525692177980e+01\n1.3341649999441133e+01\n-3.1859863347640530e+01\n1.2650545291849561e+01\n1.1732691927300676e+01\n-2.9428405037144088e+01\n-1.1480919376130050e+01\n1.7999675769818836e+01\n-3.5908864937861487e+01\n-1.1422781982823844e+01\n1.7931297844078802e+01\n-3.5840080201701156e+01\n-3.7712137874025244e+00\n2.0589783397764279e+01\n-4.0958683138951415e+01\n8.1728531204486199e+00\n2.4124267503089772e+01\n-4.8105597731886519e+01\n-7.8717904445809372e+00\n1.8304560073332190e+01\n-3.7168460412005693e+01\n-7.6811492757726088e+00\n1.9109597320664978e+01\n-3.8486523071779068e+01\n9.4293616183658830e+00\n2.4150159630936692e+01\n-4.8609340497804041e+01\n1.0158655524367770e+01\n2.5208431442556002e+01\n-5.0244441314164426e+01\n4.2202744748635161e-02\n2.1629603020819339e+01\n-4.3657195310091211e+01\n-8.5868819901804212e+00\n1.8827680846854420e+01\n-3.8306648591148374e+01\n-2.6642311397677472e+00\n2.0725846349787421e+01\n-4.1970658120436767e+01\n-3.2786395380084643e-01\n2.1493932182383162e+01\n-4.3483871447554456e+01\n6.1281252688821448e+00\n2.3041967889108527e+01\n-4.6797124587198894e+01\n7.2295622337474104e+00\n2.3514862425841038e+01\n-4.7743585081574025e+01\n-3.5550954078945068e-01\n2.1939813220820781e+01\n-4.4341142211407906e+01\n-6.0036649222696803e-01\n2.1262900351664253e+01\n-4.3311714445284622e+01\n-7.7671462819772001e+00\n1.8920138117992163e+01\n-3.8677208562235904e+01\n2.8986245957460817e+00\n2.2182041066591289e+01\n-4.5356807149342615e+01\n6.9756876967332078e+00\n2.3351722129734114e+01\n-4.7926071436175633e+01\n6.9756876967332078e+00\n2.3351722129734114e+01\n-4.7926071436175633e+01\n-1.6803734004464543e+00\n2.0685997106642027e+01\n-4.2709879970829462e+01\n-1.3896765608379676e+01\n1.6567038964959480e+01\n-3.4413077546042274e+01\n-1.3958188418531289e+01\n1.6641058755320969e+01\n-3.4499110978989115e+01\n1.5510675863989649e+01\n2.4945747848114102e+01\n-5.1887949484137316e+01\n1.5232310951103885e+01\n2.4966255499997072e+01\n-5.1622977807396133e+01\n-2.1671022882429800e+00\n2.0508986744154946e+01\n-4.2568899020528320e+01\n4.5705979017549545e+00\n2.2614201634625672e+01\n-4.6763376370024673e+01\n4.5298025281172194e+00\n2.2557747305922323e+01\n-4.6608330124956396e+01\n1.9902381037115319e+01\n2.5986662910094971e+01\n-5.4154780641310303e+01\n-1.3995447057059391e+01\n1.6486867131589580e+01\n-3.4342240699109610e+01\n-7.6574091034791003e+00\n1.8751690005678352e+01\n-3.9278057165253038e+01\n1.2603954376914544e+01\n6.9847380988816274e+00\n-2.3694610845407553e+01\n-7.8772730442108649e+00\n1.8693929697920684e+01\n-3.9142892964833273e+01\n2.2000509476093963e+01\n2.8446787762876010e+01\n-5.8801372774476555e+01\n1.2777459347523813e+01\n2.4585435041347324e+01\n-5.1423963531619727e+01\n8.3428483735441077e+00\n2.4400848358124023e+01\n-5.0978718837659997e+01\n7.5002580951793139e+00\n2.2800841023557730e+01\n-4.8140615666570469e+01\n7.6088964677135635e+00\n2.2909010304368326e+01\n-4.8367747021086743e+01\n-1.3455559270534767e+01\n1.6443373929376214e+01\n-3.4851221681827518e+01\n-9.2489870563406507e-01\n2.0651004354053796e+01\n-4.4103943080235901e+01\n1.2432321671910294e+00\n2.1320259102540184e+01\n-4.5169146201383498e+01\n1.3667340616863912e+01\n2.4245113503489200e+01\n-5.1655788564642648e+01\n1.3890417471414386e+01\n2.4414338442033870e+01\n-5.1875559917254030e+01\n1.3498209833074263e+01\n2.4021912544817759e+01\n-5.1173700986466315e+01\n1.6238131976749749e+01\n2.5248046874960824e+01\n-5.3493568262231264e+01\n-1.2953899116607406e+01\n1.6560868620023392e+01\n-3.5293975898601261e+01\n1.5068612548347184e+00\n2.1347214550296595e+01\n-4.5561213134277864e+01\n1.2967874358858298e+01\n6.0168771515151134e+00\n-2.2708655698011022e+01\n8.1370233761571633e+00\n2.2963600007435428e+01\n-4.9405165584635512e+01\n3.0522914083051106e-01\n2.0778254318042631e+01\n-4.4893887349390759e+01\n1.8567789119000786e+01\n2.5612281066930962e+01\n-5.5117440347817514e+01\n2.4556247680463837e+01\n2.8540694767722410e+01\n-6.1079590069169456e+01\n1.7742300824448328e+01\n2.5270144466622813e+01\n-5.4638708785883502e+01\n2.4648608329733726e+01\n2.9076622344497444e+01\n-6.2430722510202685e+01\n-3.4232393128316736e+00\n1.9552625234912760e+01\n-4.2485409533026548e+01\n1.5588476945457159e+00\n2.1128790845566574e+01\n-4.5833650647245754e+01\n1.2604287345593472e+00\n2.0916732262401201e+01\n-4.5586710032529851e+01\n1.8236335916752047e+01\n2.4048962202227401e+01\n-5.3279834126752085e+01\n2.0144616097387335e+01\n2.6008536782396657e+01\n-5.6609749099968752e+01\n1.5172906216012329e+01\n2.4460827490917470e+01\n-5.3509867838333705e+01\n1.4418679949904657e+01\n2.4356272750806664e+01\n-5.3525076205913606e+01\n1.2566159127451172e+01\n2.3783385197310885e+01\n-5.2453664404805231e+01\n1.3179010673677176e+01\n6.7181952833838672e+00\n-2.4793887966909075e+01\n1.3179010673677176e+01\n6.7181952833838672e+00\n-2.4793887966909075e+01\n-1.3004682026525987e+01\n1.6164884562466597e+01\n-3.5829875699686077e+01\n1.2874477907056859e+01\n1.0142511024918882e+01\n-3.0522963417043425e+01\n2.0923871864612313e+00\n2.0383676330745597e+01\n-4.6615824331587866e+01\n2.0775213285255920e+00\n2.0298927379739528e+01\n-4.6954849790196107e+01\n1.0872256549074196e+01\n2.2612615447581614e+01\n-5.2226099574478440e+01\n1.2333422068478733e+01\n1.1138645294788127e+01\n-3.3077973432242757e+01\n-3.5530364358588415e+00\n1.8771615478073826e+01\n-4.3422803076907826e+01\n8.2421232411157526e+00\n2.1508340552581618e+01\n-5.0245441418864552e+01\n-3.9281544254948746e+00\n1.8638766492351760e+01\n-4.3156578671162308e+01\n8.0046604460759276e+00\n2.1734247627389841e+01\n-5.0750350486793231e+01\n1.1376411045847622e+01\n2.3399521479729035e+01\n-5.4753380761270272e+01\n1.0578877996472540e+01\n2.2583809367107097e+01\n-5.3419162796618743e+01\n-1.3709188094525070e+01\n1.2590119392800615e+01\n-3.1479947942750417e+01\n-1.0178637736583693e+00\n1.9208280019947676e+01\n-4.5737827620999461e+01\n-1.1774308974167844e+00\n1.9512934063342474e+01\n-4.6467934879964332e+01\n-5.1655374290711915e+00\n1.7206428385568632e+01\n-4.2558247119070593e+01\n1.3399907644134830e+01\n9.5559924491436679e+00\n-3.2352488884230191e+01\n1.3231893765039549e+01\n1.0060262215393115e+01\n-3.3129270718182667e+01\n-4.1016121775011429e+00\n1.7889872070147092e+01\n-4.3961668278256028e+01\n1.2053662101017485e+01\n6.6120265175865773e+00\n-2.7199017196530534e+01\n1.3135704205742961e+01\n1.0456023058058058e+01\n-3.4509825013950170e+01\n-9.9318143770481111e+00\n1.6022074842769932e+01\n-4.0105350705733947e+01\n1.4510502558290080e+01\n9.5050049180267138e+00\n-3.3130144444902164e+01\n1.2428585003596000e+01\n7.4907586983478263e+00\n-2.9241675722823860e+01\n7.7722363186680763e+00\n1.9677198467127933e+01\n-5.0410856752599386e+01\n4.0829241302600137e+00\n1.9326793493947090e+01\n-4.9167383454567670e+01\n9.5922192843808674e+00\n2.1449999768315774e+01\n-5.4691069037387201e+01\n8.4713223809417784e+00\n2.1502366203467798e+01\n-5.4662752926996525e+01\n-1.2490741424862742e+01\n1.4847923736490015e+01\n-3.7468448846749723e+01\n-1.2516997736911756e+01\n1.4994195942457694e+01\n-3.7655629813226540e+01\n-1.2548688065568275e+01\n1.5027620409564786e+01\n-3.7691763154319375e+01\n1.4605437765568730e+01\n9.4046140499470194e+00\n-3.3620516034394015e+01\n-9.4962361688891512e+00\n1.6013817509166568e+01\n-4.0545209561558408e+01\n-9.4781415699472920e+00\n1.5974440989869997e+01\n-4.0446800798698554e+01\n8.1003437430869294e+00\n2.0775685017717930e+01\n-5.3599587020206023e+01\n-5.0978268071396942e+00\n1.7130687762052592e+01\n-4.3674217808915088e+01\n-5.0978268071396942e+00\n1.7130687762052592e+01\n-4.3674217808915088e+01\n4.4074751393760510e+00\n1.8894728759001381e+01\n-4.9569039207106357e+01\n1.0348723013117459e+01\n2.0754747430487246e+01\n-5.3785757416633508e+01\n1.5374669019148307e+01\n2.1885048385685320e+01\n-5.7497248211734949e+01\n1.3921388385441995e+01\n3.4214658968462790e+00\n-2.2964029239076346e+01\n1.2597934369772577e+01\n1.0808762333940484e+01\n-3.6562327771121581e+01\n-3.4402189985256113e+00\n1.7291508695600061e+01\n-4.5238051011338321e+01\n1.0677059543147296e+01\n2.0608041056315020e+01\n-5.4745125839433960e+01\n1.0699109650545939e+01\n2.0612894481287711e+01\n-5.4651800869883502e+01\n-2.8496554397359617e+00\n1.7614303579958182e+01\n-4.5969208092929975e+01\n-2.8604042261118185e+00\n1.7470625255254404e+01\n-4.5888719824934668e+01\n-2.8791484372528613e+00\n1.7379240768139724e+01\n-4.5561655987430441e+01\n2.6356711771035995e-01\n1.7839149819597431e+01\n-4.7305823201707071e+01\n1.2497899539506649e+01\n9.7994051991136555e+00\n-3.4927630973832443e+01\n9.2803011280383743e+00\n2.0215193620710096e+01\n-5.4017409889387253e+01\n6.7644665940886402e+00\n1.9594521867164431e+01\n-5.2381196011993786e+01\n1.1114630600890177e+01\n6.1767736575447261e+00\n-2.7799832711867214e+01\n1.2653792566616964e+01\n6.7551479340208571e+00\n-2.9564422474300059e+01\n1.0400434621097993e+01\n2.0185176010391142e+01\n-5.4933120226807446e+01\n1.3989324109917250e+01\n2.9508374894107900e+00\n-2.3109095143063943e+01\n4.5774393970724354e+00\n1.8580335385260373e+01\n-5.1024578498001112e+01\n-9.5035806348305449e+00\n1.5297416281203388e+01\n-4.1475571651999310e+01\n1.2083948031909847e+01\n6.1625658684992120e+00\n-2.9247833001922761e+01\n1.1633799512538943e+01\n2.0020552587224948e+01\n-5.6548725520249377e+01\n4.6123986365005036e+00\n1.8322081411574644e+01\n-5.1418645198597240e+01\n4.0930422188120490e+00\n1.8240793559737948e+01\n-5.1390777599665931e+01\n1.7515132489434817e+00\n1.7816052758052706e+01\n-5.0135562546162340e+01\n9.4418332746701488e+00\n1.9781020917839903e+01\n-5.5884753940557033e+01\n1.3192719658245201e+01\n8.9627574634506288e+00\n-3.5529244280233669e+01\n1.3578400827887085e+01\n9.1849270082359169e+00\n-3.6063631160013436e+01\n1.3471227482782414e+01\n8.9110670719581009e+00\n-3.5589473287027964e+01\n1.0052099083841528e+01\n1.9440678546226298e+01\n-5.5783384808446115e+01\n1.3988199189012432e+01\n8.3787186337400215e+00\n-3.5053832241477700e+01\n1.2680769680365808e-01\n1.7111418788064608e+01\n-4.9444541538787938e+01\n3.7911949260582549e+00\n1.7649938886764776e+01\n-5.1521508269525647e+01\n2.8085985603049285e-01\n1.6966869318985374e+01\n-4.9115108177248018e+01\n2.7219170434128098e-01\n1.7000842351225192e+01\n-4.9160093974678666e+01\n1.3820813304451804e+01\n3.6438587355558911e+00\n-2.6221657753565502e+01\n-5.1712942803724751e+00\n1.5702135391447468e+01\n-4.5573530818011996e+01\n2.4211369624534293e-01\n1.7386962084568840e+01\n-5.0690698004206695e+01\n1.3896245478624007e+01\n3.2909195897371855e+00\n-2.5607468364960827e+01\n1.3798537250648502e+01\n7.9791668328399510e+00\n-3.5641955340419265e+01\n5.4022255744060690e+00\n-5.1640081974649932e-01\n-1.5641680518968183e+01\n-9.1344053545014852e+00\n1.3266695769770232e+01\n-4.0388528398226946e+01\n1.2994128682669173e+01\n7.2330188004684910e+00\n-3.3898989401570702e+01\n-8.0452390336880057e+00\n1.4346522313624734e+01\n-4.3532024654661527e+01\n-4.7428575019718302e+00\n1.5107785851306808e+01\n-4.6398736175816524e+01\n-4.7428575019718302e+00\n1.5107785851306808e+01\n-4.6398736175816524e+01\n1.4406188009892338e+01\n2.5291151480440339e+00\n-2.5590571262348384e+01\n-1.0341004611027367e+01\n1.3928444742231324e+01\n-4.2493931203860647e+01\n1.8803430481926811e-01\n3.1297367115552137e+00\n-2.2285452147082648e+01\n8.4211018120135456e-02\n3.1230730605985912e+00\n-2.2220213087729228e+01\n-1.1013424601062356e+01\n1.3623984202895038e+01\n-4.1652158550257404e+01\n-1.1043996137131387e+01\n1.3626109978083001e+01\n-4.1683854285040205e+01\n-1.1649771649461956e+01\n1.3266327078225009e+01\n-4.1182718192954482e+01\n-1.0630395006071199e+01\n1.3361803233583027e+01\n-4.1816547788007185e+01\n9.6102291848523785e-02\n1.6042385192018354e+01\n-5.0902098867007695e+01\n1.4160309452701890e+01\n2.4339446909394584e+00\n-2.5755016458285127e+01\n2.7051147043064105e+00\n1.7023880765551984e+00\n-2.0660084480893431e+01\n-1.1870191317247752e+01\n1.3207649356759605e+01\n-4.1725144131957371e+01\n-7.9199670071421062e+00\n1.3851414526726369e+01\n-4.4479418966258073e+01\n1.4202928457202562e+01\n2.4917345230722630e+00\n-2.6452201925956487e+01\n1.4244997350090825e+01\n2.5190530929797821e+00\n-2.6586244166330925e+01\n-8.2575150366596473e-01\n1.5333277536048591e+01\n-5.0362941295108904e+01\n-5.0942681381565869e-01\n2.9363286109059747e+00\n-2.2618816874988472e+01\n1.4577529988418986e+01\n1.9897027674378573e+00\n-2.5862218076424696e+01\n-8.9929363501143040e+00\n1.3649584444979691e+01\n-4.4104782844308104e+01\n8.1600705772250204e-01\n1.5631816613824419e+01\n-5.2091100436384998e+01\n-6.3010101479483729e-02\n2.0732230985056210e+00\n-2.1392856668081119e+01\n3.7181766098468274e+00\n1.4488145651813019e+01\n-5.1581665884937010e+01\n1.3940004291114642e+01\n1.3734399238351380e+00\n-2.5169884439743939e+01\n6.4159808312814670e+00\n1.3015860868239656e+01\n-4.9314551591607383e+01\n-6.8382834104926926e-01\n2.4210319319353553e+00\n-2.2237952448971591e+01\n1.4305635779799129e+01\n1.8347966158537912e+00\n-2.6991244295432367e+01\n-1.3296479650929129e+00\n2.7500285349222788e+00\n-2.3207608230102547e+01\n1.4935077926014394e+01\n8.0106971698475393e-01\n-2.5611166326836496e+01\n-4.4618646523899610e+00\n1.3449668109301928e+01\n-4.8803980752493352e+01\n-1.4836952797664564e+00\n2.4919920758492831e+00\n-2.3297873794784099e+01\n-3.4088299281212597e+00\n1.3798723351482673e+01\n-5.0159195798953419e+01\n3.7306727285786740e+00\n5.6860429259639278e-01\n-2.0673570583951356e+01\n1.3109484934426302e+01\n2.8844926488435871e+00\n-3.0291328368008212e+01\n3.3433726332073070e+00\n1.9172125310035690e-01\n-1.9987255521076520e+01\n-6.9551810158927303e+00\n1.2266891061693414e+01\n-4.7497915388780129e+01\n2.5137370534384396e-01\n6.6830288209746658e-01\n-2.0396269452470946e+01\n2.5137370534384396e-01\n6.6830288209746658e-01\n-2.0396269452470946e+01\n-1.5469169010841630e+00\n3.4402999107904813e+00\n-2.6973809579652453e+01\n-1.8937568478289020e+00\n2.2845548327914429e+00\n-2.3910396736218072e+01\n-5.6361570425571443e+00\n1.2134358347964291e+01\n-4.8966445510443222e+01\n1.3571920384912842e+01\n8.9457634229496985e-01\n-2.9088091457555748e+01\n1.2005176284586263e+00\n-2.4456766818724340e-01\n-2.0361726742977829e+01\n1.4935910489999740e+01\n-1.4364999455221810e+00\n-2.4350829133462959e+01\n1.5055765322609480e+01\n-1.3922171330264357e+00\n-2.5098193388598052e+01\n5.8830330145362657e+00\n-2.5363364872515550e+00\n-1.7518606863556393e+01\n-9.3696129043797260e-01\n-1.6275840055254776e-02\n-2.1377505466803612e+01\n3.3454167583150833e+00\n-1.2691929889143374e+00\n-2.0428771377504088e+01\n6.3361820261810049e+00\n-1.4951692771572458e+00\n-2.1360087855053088e+01\n3.4344517565326642e+00\n-1.3980645121228925e+00\n-2.0374173107242669e+01\n1.4884152464156948e+01\n-1.2201231114839637e+00\n-2.7723404915463860e+01\n2.5932020792168269e-02\n-4.9222443738840077e-01\n-2.1260985853842726e+01\n-3.5531346111047584e+00\n1.3454805216929644e+00\n-2.5224333887013142e+01\n1.4068261370246180e+01\n-6.9565933152297299e-01\n-2.9592475717317466e+01\n1.4487653330456240e+01\n-1.3014358881414332e+00\n-2.9709346999203007e+01\n1.4976202788602794e+01\n-2.4994951056831280e+00\n-2.7147184773642607e+01\n-3.8462075212174565e+00\n1.8201373746039907e-02\n-2.3353187192140950e+01\n1.4418267730227923e+01\n-2.0299248965680490e+00\n-2.9491272779566657e+01\n3.5550481297656900e+00\n-2.6446892884149551e+00\n-1.9583030181716790e+01\n-2.9119351238911828e+00\n-5.1416300714618313e-01\n-2.2800750557584813e+01\n5.9906644809596159e+00\n-3.6904767647354846e+00\n-1.8344160769391880e+01\n5.9906644809596159e+00\n-3.6904767647354846e+00\n-1.8344160769391880e+01\n8.3833637990804477e-01\n-2.1248545135948338e+00\n-1.9969011916910862e+01\n6.2152848595923782e-01\n-1.9782266076444937e+00\n-2.0074544312915727e+01\n6.5811742898052350e-01\n-2.0037039768154221e+00\n-2.0108602757875506e+01\n6.4607748437470462e+00\n-3.5699843425842968e+00\n-1.9477925604128252e+01\n-3.4384011089125357e+00\n-5.2240954017127617e-01\n-2.2852884385559211e+01\n1.5306763045167941e+01\n-3.2234164368664526e+00\n-2.7548683615789493e+01\n-3.1107279154914549e+00\n-9.5041250202190153e-01\n-2.2277608261543879e+01\n4.3712485570754147e+00\n-3.1210197862934637e+00\n-2.0791909134329185e+01\n-4.0436926957841246e+00\n-7.1666860295535439e-01\n-2.3403044623689645e+01\n-2.5415100349562203e+00\n-1.6001465755201745e+00\n-2.1380422468451453e+01\n-4.7069744132136693e+00\n2.4537038886678957e+00\n-3.6211608332911595e+01\n-3.9547681015783995e+00\n-7.6010376809578040e-01\n-2.3988624634287188e+01\n1.0359070651446700e+00\n-2.9253854349494683e+00\n-1.9602584607296826e+01\n1.3202853444144160e+00\n-2.9120244500430932e+00\n-2.0062177984898966e+01\n1.4217978195329001e+01\n-4.2039997879718376e+00\n-2.6487552770086349e+01\n-7.6228331002745009e-01\n-2.5299362617340981e+00\n-2.0171073210832745e+01\n-2.8991752001508218e+00\n-1.7930542608925879e+00\n-2.1513728768683539e+01\n-9.9535104742571001e-01\n-2.4900090352260267e+00\n-2.0088378508546654e+01\n8.1810368748238482e-01\n-3.0634632033220193e+00\n-1.9443332139807637e+01\n-7.9606750164396622e+00\n2.6800960071198534e+00\n-3.6288919630018924e+01\n-5.6000176976669791e-01\n-2.6913338092478205e+00\n-2.0174101029285509e+01\n-5.1392152935608379e+00\n1.5972065842250327e+00\n-3.5085693006036664e+01\n6.2001814497714924e-01\n-3.1632714569936153e+00\n-1.9833409744519781e+01\n-6.3824285822168969e+00\n1.5935207973178991e+00\n-3.4629747827147355e+01\n2.9104186937344485e+00\n-3.5935501738413125e+00\n-2.0336618035713617e+01\n2.8248951378038978e+00\n-3.6927837022733931e+00\n-2.0106640854436524e+01\n-6.0293990352144684e+00\n1.3872977010332164e+00\n-3.4358502938892698e+01\n-2.0148057152748611e+00\n-2.4177737314176606e+00\n-2.1550761870352169e+01\n-5.3784307136960052e-01\n-3.0089474662092472e+00\n-2.0524473437710633e+01\n-5.8994549275656389e+00\n8.7554742053106316e-01\n-3.3644513010736915e+01\n-2.6299747177587274e+00\n-2.2976008173243776e+00\n-2.2224338471765115e+01\n-2.6194655138527536e+00\n-2.2933477291201734e+00\n-2.2297929332482283e+01\n-6.0994598584371236e+00\n8.5480067602811205e-01\n-3.3296571581464683e+01\n-3.5164898384017529e-01\n-3.1631148818791130e+00\n-2.0519737186568641e+01\n7.2896710127286046e-01\n-3.6291397409459520e+00\n-1.9806636662240933e+01\n-6.7285095665254131e+00\n4.7141286168421372e-02\n-3.0100123641702709e+01\n2.7399411852549052e+00\n-4.0229420225820958e+00\n-2.0487660399265728e+01\n-3.1828139591211064e+00\n-2.0715712296538205e+00\n-2.3538227124425298e+01\n-2.1449423454108621e-01\n-3.2772293912911734e+00\n-2.0663918577807248e+01\n3.4185991164760510e-02\n-3.4312728677432647e+00\n-2.0495708381548873e+01\n-1.1816402586776107e+01\n1.9137607193801618e+00\n-3.4922960962692848e+01\n-1.1750577239330628e+00\n-3.1820354368126678e+00\n-2.1165723302890541e+01\n2.9567071318561635e+00\n-4.5031333548388854e+00\n-2.0281967989382899e+01\n-7.2142199792135022e+00\n7.1025933514924630e-02\n-3.2683810628690587e+01\n8.5999120775059401e-01\n-4.1082824094989938e+00\n-2.0214867252305528e+01\n2.8046083003075015e+00\n-4.4413153226735220e+00\n-2.0970949109091418e+01\n-3.5364107098928010e+00\n-2.3921313109348690e+00\n-2.4069388828309247e+01\n-7.1086661459110960e+00\n-1.0268713630777648e-01\n-3.2155229904938842e+01\n-5.6411835508994264e+00\n-6.4966758241301792e-01\n-3.1414559104558105e+01\n-6.6180621790775245e+00\n-2.4931477322932219e-01\n-3.2282136658658814e+01\n-1.1853567565175966e+00\n-3.5653029159676097e+00\n-2.1230402831545327e+01\n-1.8562702781629790e+00\n-3.2219194249885903e+00\n-2.2208573474696522e+01\n-1.9832036415205698e+00\n-3.2137664469060518e+00\n-2.2199784295456269e+01\n5.2458757431608145e+00\n-5.0708778429745234e+00\n-2.2016327689631034e+01\n-9.3527954032131411e-01\n-3.7483522135740954e+00\n-2.1425230576982926e+01\n7.4841321910491965e-01\n-4.3118829548195992e+00\n-2.0901577304048132e+01\n-9.0408169275536441e+00\n-9.9082987627105865e-02\n-3.2334874530087006e+01\n-1.9273123165927781e+00\n-3.4919158149500675e+00\n-2.2321986396327574e+01\n-2.8677793685867652e+00\n-3.1110680177589622e+00\n-2.3133759316966518e+01\n-3.0798440459952543e+00\n-2.8997868270387515e+00\n-2.4422056209645849e+01\n-8.3226522016451749e+00\n-5.0320594704435850e-01\n-3.1837768832570589e+01\n-2.0742813546498025e+00\n-3.5593191560408552e+00\n-2.2539177390896853e+01\n2.3729449225648542e+00\n-4.8037319466424417e+00\n-2.1313931617195855e+01\n1.4913078216631201e+00\n-4.6723050092548668e+00\n-2.1071314827412326e+01\n-4.8457624993855958e-01\n-4.1206240190148993e+00\n-2.1321830413801639e+01\n1.8026680876730150e+00\n-4.8405549814756332e+00\n-2.1186256595841176e+01\n-8.3033299579467776e+00\n-9.0750308711547079e-01\n-3.1284300650940736e+01\n1.9136096418076149e+00\n-4.9048702550828507e+00\n-2.1301455973613063e+01\n-1.8450803618957323e+00\n-3.9239438720454882e+00\n-2.2593711293028083e+01\n-2.4113141780166476e+00\n-3.8912440404809878e+00\n-2.3292410368847577e+01\n-8.1206726725241456e+00\n-1.5619454893381572e+00\n-3.0399341561814410e+01\n-7.9009730494545529e+00\n-1.5973659755778804e+00\n-3.0462564509757378e+01\n-8.8494786767872657e+00\n-1.3709810330001959e+00\n-3.0557008434807937e+01\n6.3700872848731460e-01\n-5.0457066344083241e+00\n-2.1504186917587930e+01\n-1.3307810968102243e+00\n-4.7125284323945387e+00\n-2.2101718509503318e+01\n9.8242247559407325e-01\n-5.3893347539170930e+00\n-2.1423208530182904e+01\n-6.7520986456616683e+00\n-2.6883246568625543e+00\n-2.8636260603827882e+01\n-7.2397491674523744e+00\n-2.4479275055591656e+00\n-2.9319957844336848e+01\n-1.1083680164417768e+01\n-1.4916217908092948e+00\n-3.0452016836472886e+01\n-7.0887475431136480e+00\n-2.9161285390822713e+00\n-2.8653529872609010e+01\n-6.7552340728816844e+00\n-3.1786449928978908e+00\n-2.8058403502864156e+01\n3.8307411523952912e+00\n-6.8561716272395286e+00\n-2.1496216306194768e+01\n-3.5482785275934905e+00\n-5.0853274360890017e+00\n-2.4009641097528842e+01\n4.3038766309002270e+00\n-7.8199802019732054e+00\n-2.1285910357417606e+01\n-8.8226672181226551e+00\n-4.2812171707552400e+00\n-2.6778102443289530e+01\n2.5731701806867018e+00\n-8.2291708925513873e+00\n-1.9173345074661746e+01\n2.4720719494593872e+00\n-8.2164790328359629e+00\n-2.1284727119743383e+01\n2.2505905763855893e+00\n-8.2449136283557269e+00\n-2.2052775758948968e+01\n1.8287915162979576e+00\n-8.1795418848501029e+00\n-2.1203469303491438e+01\n3.0892407439149845e+00\n-8.9042058519721579e+00\n-1.9624601688613950e+01\n1.7301979087093842e+00\n-8.7499915535862769e+00\n-2.1336715261858622e+01\n3.4649868587794008e-01\n-8.1718485105544492e+00\n-2.0691837654077631e+01\n1.1887653888351914e+00\n-8.6476194634196570e+00\n-2.3128754962298441e+01\n1.9852576974215910e+00\n-8.8693831947597541e+00\n-1.9871601280690200e+01\n8.9255491860949909e-01\n-8.6839765729970786e+00\n-2.2565089282168035e+01\n4.0901453436342422e-01\n-8.3643918541904405e+00\n-2.0480588513318651e+01\n2.7266600113925694e+00\n2.6560530532496866e+01\n-4.0789225026940677e+01\n1.9834769991331067e+00\n2.6566595389941320e+01\n-4.0976014058037862e+01\n8.9394528091665038e+00\n2.9457002667136628e+01\n-4.5109970719812452e+01\n1.3841570585306338e+01\n2.9611560936746521e+01\n-4.5261717501546734e+01\n8.1612305239156910e+00\n2.8469191961320124e+01\n-4.3953561055923913e+01\n5.0550350668615645e+00\n2.7049801453786749e+01\n-4.3088753573695314e+01\n1.4275567717468270e+01\n3.0150067932193938e+01\n-4.7365121028463363e+01\n4.7588532620748794e+00\n2.7941006248335921e+01\n-4.4133530513216279e+01\n4.2130649476036028e+00\n2.6568159955283978e+01\n-4.2597867481432189e+01\n1.4414679791398560e+01\n3.0793161280425625e+01\n-4.8528978339232474e+01\n1.4128636299810461e+01\n3.0392750296915565e+01\n-4.8105604735356181e+01\n1.2079187271333485e+01\n2.9541066295398441e+01\n-4.6989360662378530e+01\n8.1703534592731897e-01\n2.5409103047267241e+01\n-4.1227112194548127e+01\n6.6609782359849543e+00\n2.7321356033576635e+01\n-4.4093709134323525e+01\n-4.6439060821844069e-01\n2.4550362724977894e+01\n-4.0228809657724021e+01\n1.1630506930659458e+01\n1.6248940643362051e+01\n-3.0078906768425981e+01\n9.8471587090130761e+00\n2.8257063987632982e+01\n-4.5771493558500637e+01\n5.4472377881605656e+00\n2.6628488523064554e+01\n-4.3515754252003845e+01\n-7.6251817316623893e-01\n2.4261238052965364e+01\n-3.9840715631071980e+01\n5.0305037767070617e+00\n2.6502608128077849e+01\n-4.3261224579791964e+01\n1.3129184541935574e+01\n1.0291856082442887e+01\n-2.2910075130152343e+01\n1.5258957242502980e+00\n2.5064444529745877e+01\n-4.1409188665336565e+01\n1.2470818981214583e+01\n1.5983465149823180e+01\n-3.0145584360126986e+01\n-1.6138796293744020e+00\n2.3966395387546186e+01\n-4.0080659152027955e+01\n1.2225531138620779e+01\n1.6582623553389055e+01\n-3.1219037891846000e+01\n1.4335361939529596e+01\n1.7215902406620259e+01\n-3.2609319838595205e+01\n-1.0547236226962630e+01\n1.9839592721749430e+01\n-3.3802969419226031e+01\n-9.6625798839594026e+00\n2.0448962353861894e+01\n-3.4872924275898910e+01\n6.1524601585836942e+00\n2.6504364020046154e+01\n-4.4283585184511388e+01\n6.8291328445337127e+00\n2.7835854555027510e+01\n-4.6002410567642038e+01\n1.2854504452478269e+01\n1.5032895763391315e+01\n-2.9388146027611093e+01\n4.6020846275232963e-01\n2.4430136127289714e+01\n-4.1153446571357676e+01\n-4.0518244872314240e+00\n2.2914813456397603e+01\n-3.8852613658947860e+01\n1.1915262621492852e+01\n1.0844119815189845e+01\n-2.4163040153260088e+01\n1.2920204190143284e+01\n9.0441084238801146e+00\n-2.1984277795931643e+01\n-3.8884318545709120e+00\n2.2778702238920356e+01\n-3.8840818280331909e+01\n8.9865277702943969e-01\n2.4397914126023217e+01\n-4.1461587328735476e+01\n7.1102211257815275e+00\n2.6707936247504836e+01\n-4.5206836148846612e+01\n1.4242453213388293e+01\n1.0216385154298640e+01\n-2.3901717218320140e+01\n8.6886409396225837e+00\n2.6876819742566980e+01\n-4.5549202973404185e+01\n7.8328566838946068e-01\n2.4407214623305670e+01\n-4.1929107417432725e+01\n2.9037099521239922e+00\n2.4881699830994325e+01\n-4.2722817331955248e+01\n6.0771889473031671e+00\n2.5990902359296228e+01\n-4.4579725823950064e+01\n7.3773227607146756e+00\n2.6528439797916771e+01\n-4.5548427998383566e+01\n4.1431871348872468e-01\n2.3959085757546148e+01\n-4.1453346967931942e+01\n-3.1523544235551499e+00\n2.2964172728860234e+01\n-3.9843148033143990e+01\n-2.9051237189556045e-01\n2.3701704467796116e+01\n-4.1059978332392816e+01\n5.3398474217541283e+00\n2.5663865584767422e+01\n-4.4262987169251822e+01\n1.3546021422241653e+01\n9.3908122341371563e+00\n-2.3058938097069259e+01\n3.9568880675090806e-01\n2.3763010025074937e+01\n-4.1724321320630111e+01\n9.9846527030082710e-01\n2.4233397149710761e+01\n-4.2444533571205135e+01\n-1.1486286458820953e+01\n1.9245163573766508e+01\n-3.4472919268343766e+01\n4.9624665190308237e+00\n2.5166345472530548e+01\n-4.4574859652072341e+01\n5.0492346935571897e+00\n2.5245243431668200e+01\n-4.4714397847187129e+01\n-1.2926976007364411e+01\n1.8677488808773621e+01\n-3.3737633038938498e+01\n-1.0515333712790877e+01\n1.9470878955357062e+01\n-3.5103270714261846e+01\n-1.0510703549419000e+01\n1.9422119607268542e+01\n-3.4946527553930750e+01\n3.7227553407143182e-01\n2.3530676721093375e+01\n-4.1950240098114108e+01\n-3.4459212201948536e-01\n2.3131505817010346e+01\n-4.1425633010883629e+01\n1.4374889996352994e+01\n2.7971674151017552e+01\n-4.9445599825050145e+01\n1.8247961506535631e+01\n2.8278909148528040e+01\n-5.0430802798168884e+01\n5.5380718632348378e+00\n2.5396551261152130e+01\n-4.5432975000349444e+01\n8.8667901560378528e+00\n2.6230448944671629e+01\n-4.6790011545670033e+01\n2.2345499720099781e+01\n2.9617393471430262e+01\n-5.2920881976043269e+01\n-4.1314906274959320e+00\n2.1690554037133158e+01\n-3.9134194777756036e+01\n-4.0872110020524932e+00\n2.1926625058951739e+01\n-3.9513160427715874e+01\n1.7185759429963341e+00\n2.4527582325738461e+01\n-4.3942690336547521e+01\n1.7651906127199748e+01\n2.8780229101747601e+01\n-5.1395124944626893e+01\n1.6767069976757771e+01\n2.7651116025785921e+01\n-4.9683054232617764e+01\n9.5450326625791551e+00\n2.5827442556127362e+01\n-4.6656058065480536e+01\n9.5450326625791551e+00\n2.5827442556127362e+01\n-4.6656058065480536e+01\n-1.1330477374785749e+01\n1.9170192438713197e+01\n-3.5211706090090075e+01\n1.1818197711927212e+01\n2.6471270007224916e+01\n-4.8121927397913716e+01\n1.2303517933082285e+01\n2.7040780265138967e+01\n-4.8958394926780450e+01\n1.1552870872180918e+01\n2.7074003398597434e+01\n-4.9173220339161730e+01\n1.1079107581045333e+01\n2.5994625608959115e+01\n-4.7380722270663320e+01\n1.1756639610378370e+01\n2.6945275809389024e+01\n-4.8935861836438370e+01\n1.7147176949493506e+01\n2.8808076547458104e+01\n-5.2011681504138508e+01\n1.0593937947751360e+00\n2.3023783744280962e+01\n-4.2977805512937998e+01\n1.1050078082274817e+00\n2.3169317737396618e+01\n-4.3117415217205497e+01\n9.8848232043931166e+00\n2.5932585790492830e+01\n-4.8155661646606383e+01\n-1.1059330103335062e+01\n1.8331794562787049e+01\n-3.4810710313692603e+01\n-1.6254346127814667e+00\n2.2057651814049006e+01\n-4.1669151859787029e+01\n-3.0182650501440205e+00\n2.1375053666340843e+01\n-4.0810763700831231e+01\n1.5191081149909490e+01\n2.6379234711497471e+01\n-4.9952774645436854e+01\n4.3051839659249724e+00\n2.3622425824261313e+01\n-4.5091927743444828e+01\n-9.1164973971619467e+00\n1.9236826085497722e+01\n-3.7180270546545366e+01\n-9.1231513407313791e+00\n1.9010915325592542e+01\n-3.6698019717678704e+01\n9.2947463861161630e+00\n2.4976115798005779e+01\n-4.8028709610097188e+01\n1.2794197941393337e+01\n2.6024413611111086e+01\n-4.9855041634257738e+01\n1.4976322883162139e+01\n2.6371540215277779e+01\n-5.0755175262635035e+01\n1.4844217428933623e+01\n2.6106546151453990e+01\n-5.0298734769384069e+01\n-2.1969908826378237e+00\n2.1447101175099739e+01\n-4.1465894605376846e+01\n1.0834571112046470e+01\n1.1777690984917495e+01\n-2.8785634283494382e+01\n4.4852222846272163e+00\n2.3497094380698559e+01\n-4.5569403829152613e+01\n4.2377563365322564e+00\n2.3010163774876645e+01\n-4.4694221594253712e+01\n8.5825843179291077e+00\n2.4529791957145260e+01\n-4.7675541992892562e+01\n-1.0374484862982460e+01\n1.8276045915333249e+01\n-3.5964560467226129e+01\n-1.0374484862982460e+01\n1.8276045915333249e+01\n-3.5964560467226129e+01\n-1.0315570374062716e+01\n1.8251597259344329e+01\n-3.5892684556720006e+01\n9.5054046372412841e+00\n2.5072980150247627e+01\n-4.9030760753434173e+01\n-2.6450049245912730e+00\n2.1145184173485660e+01\n-4.1613419727946884e+01\n1.2774879745032777e+01\n1.1252078323572578e+01\n-2.8553684460539952e+01\n-3.1755371948935260e+00\n2.0950521653022761e+01\n-4.1376026910191385e+01\n-2.9643313678853951e+00\n2.0905870388244253e+01\n-4.1437730769112584e+01\n-1.2840329911063931e+01\n1.7338615644041667e+01\n-3.4709778052480317e+01\n2.8944210737881754e-01\n2.1874805840370620e+01\n-4.3612055832709302e+01\n7.7084057681781255e+00\n2.4077507131957880e+01\n-4.8042850133435664e+01\n-7.3978640575976637e+00\n1.9430380477301068e+01\n-3.9046957001895485e+01\n8.7319684113623115e+00\n2.4158649172657622e+01\n-4.8500565714550717e+01\n-7.9942809121353156e+00\n1.9110594356596618e+01\n-3.8688094094837808e+01\n-7.9646881543861561e+00\n1.9133187098093032e+01\n-3.8895759051991789e+01\n-1.8419274966232715e+00\n2.1006583911652545e+01\n-4.2472762547609051e+01\n1.3601743802688310e+01\n8.4307308598444024e+00\n-2.5229059768173702e+01\n-4.5659690873452172e+00\n2.0030718050795006e+01\n-4.0548873219701036e+01\n-2.4299823591714005e+00\n2.0667445777166758e+01\n-4.2024186305078388e+01\n-6.8575519943975429e+00\n1.9377130058050987e+01\n-3.9425048964680578e+01\n-9.0973702229740248e+00\n1.8582029305162944e+01\n-3.7894548733228831e+01\n1.4152650855102538e+01\n2.4922180213524229e+01\n-5.0960712500593360e+01\n1.1089696931714023e+01\n9.5744099440250352e+00\n-2.6906526090331056e+01\n-1.2629814433319684e+01\n1.7009972270582487e+01\n-3.5212902024641387e+01\n1.2499417243874515e+01\n8.3931375438354312e+00\n-2.5711145018296993e+01\n1.4268134794934964e+01\n2.4759155725638447e+01\n-5.1387730982521539e+01\n1.2194448602621115e+00\n2.1517595669114876e+01\n-4.4823282981234414e+01\n7.7462675279977082e+00\n2.2979585832923039e+01\n-4.7967285410269646e+01\n1.2949650414006143e+01\n6.6501118798969978e+00\n-2.3129921239291964e+01\n1.1344926478771727e+01\n1.2476091333338598e+01\n-3.2002480122032495e+01\n2.2084215073849736e-01\n2.1141588037785919e+01\n-4.4346544241835531e+01\n5.1636550527009595e-01\n2.1262299486024506e+01\n-4.4681880678242635e+01\n5.2108388702865394e-01\n2.1202015158030452e+01\n-4.4609365302597816e+01\n-9.3916097155672027e+00\n1.7993370223742005e+01\n-3.8140948722791634e+01\n-9.3642138682961686e+00\n1.7996045661266006e+01\n-3.8325799102202048e+01\n-9.3739609019596557e+00\n1.8212563465742157e+01\n-3.8756042894295334e+01\n-9.1186882965526710e+00\n1.8119075161839259e+01\n-3.8518083570369633e+01\n-1.0833516731381991e+01\n1.7401689797627007e+01\n-3.7159379122082285e+01\n2.3952012753726745e+01\n2.8790461630015503e+01\n-6.0774250681530198e+01\n-3.5972245661766693e+00\n1.9701532501309838e+01\n-4.2097593890113224e+01\n2.3384575248826014e+01\n2.9181952877377373e+01\n-6.1721674745078033e+01\n1.1774929896225913e+01\n1.3105771715729921e+01\n-3.3977492024495611e+01\n-9.7558078818282166e+00\n1.7744969501656168e+01\n-3.8660233952803189e+01\n1.9715134538805014e+01\n2.5137494251439232e+01\n-5.5042279667614643e+01\n1.0734925387024621e+01\n2.4162710844217031e+01\n-5.2699821583373023e+01\n1.3150607985099340e+01\n8.1376797274719124e+00\n-2.7072691082951430e+01\n8.8660518395653973e+00\n2.3411019561880067e+01\n-5.1642074488157512e+01\n1.2213883822596696e+01\n7.3879416640921622e+00\n-2.5810816515469487e+01\n-9.7418012721537011e+00\n1.7191082107966693e+01\n-3.8438518634623428e+01\n2.1986301965293084e+01\n2.7389743233985861e+01\n-6.1569176084036130e+01\n1.3214347306731456e+01\n7.7756974780525505e+00\n-2.7023036464636650e+01\n-4.7884841469490906e+00\n1.9151707879422194e+01\n-4.2892258398343834e+01\n-4.7884841469490906e+00\n1.9151707879422194e+01\n-4.2892258398343834e+01\n1.1913708130052690e+01\n2.3251330453075848e+01\n-5.3526257156719382e+01\n1.2392200248233433e+01\n1.1510501606595527e+01\n-3.4009768280720650e+01\n1.2463510423169531e+01\n1.1652608690063371e+01\n-3.4205446577540130e+01\n1.1646603090433493e+01\n8.4346358723522297e+00\n-2.8575208225965071e+01\n1.2039876594923394e+01\n8.6931377127727245e+00\n-2.9100761625871211e+01\n-4.2818041513620280e+00\n1.8426222350261657e+01\n-4.2819582768731649e+01\n1.2642176259821017e+01\n6.9574077719608027e+00\n-2.6588153550278509e+01\n-6.7008918177757160e+00\n1.7481862691909406e+01\n-4.1003452679370355e+01\n8.0940734897196265e+00\n2.1247617201912959e+01\n-5.0883168136920638e+01\n6.8972747830702401e+00\n2.2562977404906924e+01\n-5.2953807198419199e+01\n7.7731743434224998e-01\n1.9681577047192587e+01\n-4.6917337140772929e+01\n-4.2712944599121458e+00\n1.7923963318573001e+01\n-4.3045293987493984e+01\n1.3226874431873092e+01\n5.8601036511779547e+00\n-2.5429044587956724e+01\n-9.9383170275700241e+00\n1.6436062350275616e+01\n-3.9297479463398432e+01\n-8.2539502261544551e-01\n1.8984017532106410e+01\n-4.6104295117931464e+01\n5.7196187267886627e+00\n2.0885713009869036e+01\n-5.0995952135095571e+01\n1.3318050829470813e+01\n5.2027813347399654e+00\n-2.4825836383259862e+01\n5.1500694547906321e+00\n2.1030694657753013e+01\n-5.1451808119143280e+01\n1.1914437187739512e+01\n8.1646083401165033e+00\n-2.9674358170895729e+01\n-9.4088839286936121e+00\n1.6334666725085551e+01\n-4.0333846049269873e+01\n-9.3658724923914907e+00\n1.6198208867404443e+01\n-4.0104959326633754e+01\n-9.3059121412160390e+00\n1.6093415296816399e+01\n-3.9985103913273470e+01\n-9.4538870056521809e+00\n1.6415087183591012e+01\n-4.0159401026303101e+01\n-6.2767857872900716e+00\n1.7142859438869046e+01\n-4.2608858411491525e+01\n1.0434639048608245e+01\n2.2116114665412887e+01\n-5.4724532541829639e+01\n-1.0608262663759678e+01\n1.5824673209098325e+01\n-3.8882027488421834e+01\n1.1018634786909626e+01\n7.0407766256826623e+00\n-2.7435049104226973e+01\n1.3715278406125098e+01\n2.3324257024348626e+01\n-5.7842837175451407e+01\n-5.3710134857327247e+00\n1.7152375846206731e+01\n-4.2912551761261945e+01\n1.3987576163452150e+01\n1.0782837324014121e+01\n-3.5248534140589356e+01\n8.5309534300851653e-01\n1.9242271811835291e+01\n-4.8179293340302635e+01\n1.3125322517060782e+01\n9.3114905626019180e+00\n-3.2653546605248494e+01\n1.3002656289281935e+01\n8.8752117127111365e+00\n-3.1869131098663544e+01\n-4.1214413737116695e+00\n1.7439323549364421e+01\n-4.4255019905313731e+01\n-4.7655692521321145e+00\n1.7179379841320078e+01\n-4.3822762401924884e+01\n1.3191780301810942e+01\n5.5641130204239433e+00\n-2.6479478890608647e+01\n1.2481093858165112e+01\n7.2351792824922523e+00\n-2.9265073183069308e+01\n1.3057395374577611e+01\n8.8551018240293118e+00\n-3.2446657059920334e+01\n1.2960993494756218e+01\n8.8441725110886029e+00\n-3.2297566159950179e+01\n1.3021845760639541e+01\n6.1732050655680997e+00\n-2.7551744213125250e+01\n-1.2446165536174663e+01\n1.5015251656262695e+01\n-3.8466887707189265e+01\n-9.6651016868666275e+00\n1.5647561080259702e+01\n-4.0982670066387698e+01\n1.2775110929040885e+01\n1.0667210277950399e+01\n-3.6824062320565510e+01\n1.3639500783771741e+01\n4.9918173708108524e+00\n-2.6533719486642109e+01\n1.3728607389115028e+01\n9.2602140136070759e+00\n-3.4928775432166695e+01\n-6.2107819611750532e+00\n1.6075790155400668e+01\n-4.3005972838455826e+01\n1.3481718303242788e+01\n9.4833090083158318e+00\n-3.5503369764835568e+01\n1.3481718303242788e+01\n9.4833090083158318e+00\n-3.5503369764835568e+01\n-4.1596518711335007e+00\n1.6233282076116627e+01\n-4.4252949543991036e+01\n1.3428695388083050e+01\n9.8228543132430204e+00\n-3.6450482495910144e+01\n1.3326671229816755e+01\n8.8672392939421005e+00\n-3.4474067777172507e+01\n-9.7065472054498958e+00\n1.5128896452179859e+01\n-4.1080390845850772e+01\n-3.1778159811247693e+00\n1.7029188935684324e+01\n-4.6400838629586659e+01\n1.3258155098232747e+01\n8.5858634411990984e+00\n-3.4062746681658169e+01\n6.6533165768446101e-01\n1.7600370464672181e+01\n-4.8645872215238406e+01\n2.4944682629864854e+00\n1.8050551941420888e+01\n-5.0176745316676609e+01\n1.2251414824530553e+01\n7.6540751527176099e+00\n-3.2028391611789019e+01\n-5.2588763658254720e+00\n1.6134168740852640e+01\n-4.4685206389977857e+01\n8.1609850935464809e+00\n1.9117862939236936e+01\n-5.3721426492095240e+01\n1.4927893906032789e+01\n1.9485546671192502e+01\n-5.5836640672737836e+01\n-1.2192236566430914e+01\n1.4264148017747848e+01\n-3.9107305703917170e+01\n1.3283732056847352e+01\n8.1404434195193645e+00\n-3.3784946294332123e+01\n1.3917413169916403e+01\n8.2577121155508220e+00\n-3.4291345398834608e+01\n1.3312459772280341e+01\n8.0443519273145885e+00\n-3.3532294113151522e+01\n-5.0779391002784999e+00\n1.6227530268210710e+01\n-4.5411693670665329e+01\n-4.0025467712256440e+00\n1.6154757366252465e+01\n-4.5720152293938987e+01\n-6.8693267861090348e+00\n1.5593306440227284e+01\n-4.4035450941256357e+01\n1.2406992863140374e+01\n5.0953047481036347e+00\n-2.8023108397372642e+01\n-2.3575190030889690e+00\n1.6287256592737311e+01\n-4.6852025061722244e+01\n1.3142066703295844e+01\n7.6193137533356889e+00\n-3.3294296443112984e+01\n1.3474224274597159e+01\n4.0193045349914867e+00\n-2.6584903615631671e+01\n4.2007364903799624e+00\n1.7647369096631113e+01\n-5.1781219210707455e+01\n-2.9108110309969133e+00\n1.5922164358655058e+01\n-4.6347590130064290e+01\n1.2594830586926115e+01\n4.5631480572256677e+00\n-2.7543924180372994e+01\n-7.0210819894666319e+00\n1.5241021300306258e+01\n-4.4119032082302596e+01\n5.7219492611538350e+00\n1.5310341282431600e-01\n-1.6664144651828373e+01\n5.7219492611538350e+00\n1.5310341282431600e-01\n-1.6664144651828373e+01\n1.4077238740921816e+01\n2.9433121336747265e+00\n-2.4861594102485057e+01\n2.6389229857117145e+00\n3.7023596226446753e+00\n-2.3232977121091338e+01\n-3.0739547582333304e-01\n1.6114325000796569e+01\n-4.9390459475802786e+01\n-2.4220972225728063e-01\n1.6493658747622241e+01\n-5.0140762162368560e+01\n-9.3567641307209009e+00\n1.4293176412577328e+01\n-4.3040610620622182e+01\n-6.8400554617601583e-01\n1.6332928653929720e+01\n-4.9596562632471219e+01\n-6.4477840469003658e+00\n1.4548865254950163e+01\n-4.4796140233380598e+01\n-1.2280804791702629e+01\n1.3286604268275063e+01\n-4.0439087776808961e+01\n-1.0098641975632214e+01\n1.3994204639503472e+01\n-4.2515968582426524e+01\n1.4479592641580245e+01\n1.1499919045201872e+00\n-2.2397644885551127e+01\n-1.1045592006862975e+01\n1.3512820191130817e+01\n-4.1371060588936203e+01\n1.3423841001699804e+01\n3.2434874521197301e+00\n-2.6773783848280406e+01\n5.9417758969349721e-01\n2.5283236327903125e+00\n-2.1384923264946291e+01\n-3.9692207900189647e-01\n3.1171159651820246e+00\n-2.2691538265754406e+01\n1.3384632428948596e+01\n3.4299354700325302e+00\n-2.7917804736299150e+01\n-1.3058756037609834e+01\n1.2906861313468792e+01\n-4.0474805877812301e+01\n-3.3461484151728476e+00\n1.5112307561986107e+01\n-4.8306636988057662e+01\n-1.2107426552471141e+01\n1.3010593336329986e+01\n-4.0975033233303890e+01\n-6.9993390746537241e+00\n1.4008534688312107e+01\n-4.5245110855948674e+01\n4.0905542758122893e-01\n2.3468063512012090e+00\n-2.1400490818050255e+01\n2.1022680856356541e+00\n1.7016186508056537e+00\n-2.0425183615378444e+01\n-1.0712593833991370e+01\n1.3263380982465289e+01\n-4.2396937023340421e+01\n-1.4434425955818115e-02\n2.4578142988974228e+00\n-2.1733211645332602e+01\n1.3014809152274134e+01\n3.1954254424919339e+00\n-2.8384681357056724e+01\n-1.0547423052302550e+01\n1.2771462094749459e+01\n-4.2349307154249075e+01\n1.2696040537611605e+01\n3.7922317995569035e+00\n-2.9692866749077243e+01\n4.7577885296643407e-01\n1.5279146293252426e+01\n-5.2035389005877242e+01\n-1.2359766238430991e+00\n3.1958412301917756e+00\n-2.3895081332298005e+01\n-2.5848125075396666e-01\n1.4769150766080550e+01\n-5.1512713423672224e+01\n1.3541849447385218e+01\n2.1905104646670219e+00\n-2.7195460898310852e+01\n-8.5283508328786917e-01\n2.4042465759283602e+00\n-2.2366735502886115e+01\n6.8911973966386841e-01\n1.4066052378952270e+00\n-2.0668939971088335e+01\n1.8500837237971579e+00\n1.0178589685436923e+00\n-2.0142339668718435e+01\n4.8953055542632278e+00\n-1.7563404656381012e+00\n-1.4948983822419299e+01\n2.1331183161131890e+00\n9.6560226944336991e-01\n-2.0393760448553220e+01\n1.0497062435250062e+00\n1.0067628361964418e+00\n-2.0280995529409523e+01\n-6.4807718154244851e+00\n1.3086225265692143e+01\n-4.6922563177746234e+01\n-1.1362403338645906e+00\n2.2463095564056537e+00\n-2.2517149750807125e+01\n-1.1071928390564085e+00\n2.1928606708279230e+00\n-2.2437102750161351e+01\n1.2755462501490257e+01\n3.2886052983835317e+00\n-3.0512721325253612e+01\n5.6885551527812295e+00\n-1.3315830950224865e+00\n-1.6721627377335246e+01\n-6.7262866140972406e+00\n1.3277970196788894e+01\n-4.7375132007827013e+01\n1.4259042626681863e+01\n1.3409971584038569e+00\n-2.6818682316713389e+01\n4.9683183898615448e+00\n1.1533171577839374e+01\n-4.8354259282104138e+01\n1.2890410114655825e+01\n2.8271152941443187e+00\n-3.0372470049236625e+01\n-5.3100794560879399e+00\n1.2952922583152082e+01\n-4.8673708530999598e+01\n9.5608050892590080e-01\n6.1318505177489102e-01\n-2.0207817334182490e+01\n-1.6743095705837052e-01\n1.0428683012144453e+00\n-2.0819455897480236e+01\n-1.0906376803643660e+00\n1.4279668664783813e+00\n-2.1936334002888849e+01\n1.3332186348471920e+01\n2.2174419119421307e+00\n-3.0262570257214644e+01\n-5.8491439314746314e+00\n1.2688092953546249e+01\n-4.9027381331796370e+01\n1.2996734627372513e+01\n2.5703657260310417e+00\n-3.1079122421981651e+01\n-1.8267499692849629e+00\n2.1460094585257803e+00\n-2.3682593979151775e+01\n-3.4332713832268026e-02\n7.2553032340769830e-01\n-2.0844465272502202e+01\n1.3692639686128013e+01\n1.2678897341768791e+00\n-2.8290995686606379e+01\n-4.5346490296683667e-01\n7.6196424006082608e-01\n-2.0997832769088443e+01\n-1.7752484112934748e+00\n1.7622811510750263e+00\n-2.3188130595619512e+01\n3.4401537009039562e+00\n-2.8157903988963529e-01\n-2.0283432103314613e+01\n5.3679454700210858e+00\n-2.3375075037246704e+00\n-1.5912266404739267e+01\n5.3679454700210858e+00\n-2.3375075037246704e+00\n-1.5912266404739267e+01\n1.5557062388853899e+00\n1.2845838867963897e-02\n-2.0253877980429611e+01\n1.5075878473667264e+00\n3.2255063865841503e-02\n-2.0260779942442365e+01\n-6.7284054722498086e+00\n1.1888027389211365e+01\n-4.8405689567720529e+01\n7.0936497036787545e+00\n-6.6159964034668717e-03\n-2.3098540733518629e+01\n-1.8588577410245972e+00\n1.4836302924099700e+00\n-2.3098796186051331e+01\n-1.8062711932167967e+00\n1.4958575925231210e+00\n-2.3185041804145403e+01\n1.4282917172225206e+01\n-2.1434832619232517e-02\n-2.7657860075058316e+01\n1.4227111257592934e+01\n-1.6727447969433407e-01\n-2.7463446892942791e+01\n-3.2742731952343096e+00\n2.5787215309245362e+00\n-2.6822701583288367e+01\n1.1341570551791435e+01\n-9.0910529662629069e-01\n-2.5000895005814389e+01\n1.1341570551791435e+01\n-9.0910529662629069e-01\n-2.5000895005814389e+01\n5.4829588120940542e+00\n-3.0078155103117061e+00\n-1.6247602042588586e+01\n1.4728140579750589e+01\n-1.4227011474543567e+00\n-2.6647844636535687e+01\n1.4232945132045359e+01\n-7.7459324478058966e-01\n-2.8415988790641915e+01\n1.4625997814284197e+01\n-1.4844780149509711e+00\n-2.7105798862398373e+01\n1.4184904839860772e+01\n-4.5717877251515804e-01\n-2.9994454559517802e+01\n-3.2943734005222840e+00\n1.3118589578299527e+00\n-2.5255206165495721e+01\n5.9368742353369504e+00\n-2.8675439000731289e+00\n-1.8071147216085354e+01\n-2.7419085855457657e+00\n6.4989986523864951e-01\n-2.3705621071419447e+01\n2.0470485054419296e-01\n-8.7014800722355057e-01\n-2.0774572707777232e+01\n1.4194986987594568e+01\n-6.4963869023777321e-01\n-3.0729025331392393e+01\n4.1585637724590949e+00\n-1.9362735469106480e+00\n-2.0728097254004300e+01\n6.2054550757510718e+00\n-3.2173242753556588e+00\n-1.8733981714243267e+01\n1.4181996012454027e+01\n-1.2129605689906138e+00\n-3.0539110853121883e+01\n-3.8880315720763714e+00\n1.8797925083768349e-01\n-2.3738909646417266e+01\n-3.6521214978400338e+00\n-2.6369062747305982e-01\n-2.3146154191046868e+01\n6.2672917254011455e+00\n-3.6404071816893548e+00\n-1.8956659872521978e+01\n-1.3050184035666719e+00\n-1.3345562552406991e+00\n-2.1313006840374339e+01\n9.3401482930312829e-01\n-2.0991446925797139e+00\n-2.0295561523706855e+01\n9.6625579683784613e-01\n-2.1584447459636009e+00\n-2.0208384237048847e+01\n-3.3883825149254649e+00\n-6.0470389376156719e-01\n-2.2701194847020918e+01\n1.5145680607523325e+01\n-3.0515799621928856e+00\n-2.7770585086488339e+01\n3.1862576601893431e+00\n-2.8896297662716970e+00\n-1.9552028330656810e+01\n1.5280772326226167e+01\n-3.5315931346421814e+00\n-2.7187604101490010e+01\n1.5418735410378842e+01\n-3.4619870480770247e+00\n-2.7214840691022065e+01\n-5.2609945953349213e-01\n-1.8657675186957061e+00\n-2.0749513358060170e+01\n1.5219062925953937e+01\n-3.8709995313876449e+00\n-2.6178962379785080e+01\n3.2035458834368846e+00\n-3.1253645409145983e+00\n-1.9695310364908956e+01\n-2.9100542301041359e+00\n-1.3042116509372308e+00\n-2.1797226508533157e+01\n-3.1260223653639567e+00\n-1.2551012090834861e+00\n-2.2056514458323228e+01\n-2.9414869760315803e+00\n-1.4464058333291459e+00\n-2.1524950835172628e+01\n-2.3736561749586294e+00\n-1.6154487030480373e+00\n-2.1499925243747732e+01\n-2.0564517768398258e+00\n-1.8319568398990271e+00\n-2.1192316928341135e+01\n-6.4856160965126888e+00\n2.8831735611906457e+00\n-3.6391377727283569e+01\n-1.9312822026241099e+00\n-1.9286835328836645e+00\n-2.0974366407782266e+01\n-2.4533859882297855e+00\n-1.7589138124258574e+00\n-2.1630623277856696e+01\n-1.4385055247007361e+00\n-2.2370476242520203e+00\n-2.0446221088548668e+01\n1.4986485448781549e+01\n-4.4662437220614066e+00\n-2.6292453828979333e+01\n-3.7820839541540838e+00\n-8.6994890306850392e-01\n-2.4184905090008030e+01\n-5.3421591728970097e-01\n-2.5937460035621602e+00\n-2.0241205367446174e+01\n1.8587086163855941e+00\n-3.1860056547126208e+00\n-1.9891439428276215e+01\n3.9903917185018578e+00\n-3.5431599383022614e+00\n-2.0772157405087345e+01\n4.4161571230548340e+00\n-3.5387513260943866e+00\n-2.1232657115084518e+01\n-2.6388568454403130e+00\n-1.9200896351691412e+00\n-2.1943106232892802e+01\n1.1073633419529058e-01\n-2.8852896913888797e+00\n-1.9918321813652696e+01\n1.4089288116201452e+01\n-4.9180741319662680e+00\n-2.5714142754727543e+01\n2.6783562560557250e+00\n-3.4694307485809994e+00\n-2.0105602114320838e+01\n-1.8351009958987985e+00\n-2.3633330854585246e+00\n-2.1218501902858652e+01\n-5.7377653496508438e+00\n9.4405789560312636e-01\n-3.3825143642849618e+01\n-8.3791469837861570e+00\n1.4284346878713630e+00\n-3.4462126529995452e+01\n-3.0165765045042150e+00\n-2.3373845064415333e+00\n-2.2040642428882620e+01\n-2.0027831549639039e+00\n-2.6434233072160316e+00\n-2.1773231061719166e+01\n-8.6236294186905293e-01\n-3.3123273386106944e+00\n-2.1012008749867956e+01\n1.4651777841171723e-01\n-3.5936839011006305e+00\n-2.0755114627587453e+01\n1.8344993733926502e+00\n-4.0843607616799806e+00\n-2.0813964230458119e+01\n4.1837524276561080e+00\n-4.5106767216412313e+00\n-2.1950830798208237e+01\n-6.3776034581550043e+00\n-6.6870468241502362e-02\n-3.2428476675872773e+01\n-1.0390091384285558e+01\n1.0127381379372746e+00\n-3.3688776965789764e+01\n-2.0749274731074969e+00\n-3.1501154160464742e+00\n-2.2094611709296377e+01\n-3.5624273423811808e+00\n-2.4446755805246694e+00\n-2.4547608042256034e+01\n-3.2020396879427220e+00\n-2.5914438622823734e+00\n-2.3973224681355418e+01\n-3.4681293749430182e+00\n-2.5857675520723347e+00\n-2.4141604429057345e+01\n7.0332027731106572e-01\n-4.1403446367054029e+00\n-2.0770165261414412e+01\n1.4929060119513426e+00\n-4.3681683908055629e+00\n-2.1011809266243958e+01\n-3.9361689627898933e-02\n-3.8587613187213634e+00\n-2.0849648327059697e+01\n-7.6409474903778374e-01\n-3.7810907937877172e+00\n-2.1415501774664317e+01\n-7.3390212959750265e+00\n-7.8856627657252321e-01\n-3.1060020890262020e+01\n2.8788698415608875e+00\n-4.9690007341686346e+00\n-2.1553066685182447e+01\n-2.5889842150086761e+00\n-3.4535132975279481e+00\n-2.3521015700505959e+01\n-1.0986711198875419e+01\n-1.2678517479780274e-01\n-3.2237392660620856e+01\n-2.1775137963906528e+00\n-3.8016743917464382e+00\n-2.3098169761933466e+01\n-8.6646563133195548e-02\n-4.5536849522063152e+00\n-2.1681619818367547e+01\n-2.0132143172662578e+00\n-3.8744353431489653e+00\n-2.2601871088681062e+01\n-8.2977566792357091e+00\n-1.5997144418294464e+00\n-3.0415676646330535e+01\n-8.1045095814278003e+00\n-1.8034195446330870e+00\n-3.0067362097808566e+01\n1.1775570404214577e+00\n-5.2316668080678763e+00\n-2.2479043756118568e+01\n6.7983952630076094e-01\n-5.1734138972576833e+00\n-2.1436441741673047e+01\n5.3644522480181689e-01\n-5.3193276876830851e+00\n-2.1185023829134337e+01\n-9.1755498606488626e+00\n-2.3310282804461329e+00\n-2.8526690000183873e+01\n-7.0816826066498244e+00\n-3.4114369627288332e+00\n-2.7696601950759494e+01\n-2.1487686953962851e-01\n-6.3630635463121186e+00\n-2.1505481705433031e+01\n-1.7782430176788833e+00\n-6.1160114788534283e+00\n-2.2366699582245474e+01\n2.2117649209232915e+00\n-8.1908682770032026e+00\n-2.1071247635673629e+01\n-5.6467812498326815e+00\n-6.5859425998123395e+00\n-2.3021371063280785e+01\n2.8239804019124661e+00\n-9.2975774797363968e+00\n-1.9559696781006437e+01\n1.2541913782709311e+00\n2.6165886138729409e+01\n-3.9665657837962002e+01\n5.2071104846842609e-01\n2.6279632016210709e+01\n-4.0475722354483359e+01\n1.1877514701091387e+00\n2.5067979873717562e+01\n-4.0594075409538974e+01\n5.1928762223620675e+00\n2.6577390313772380e+01\n-4.3110013669791122e+01\n1.5303757176232319e+01\n3.0037295439791414e+01\n-4.7954924139939870e+01\n1.2991345595596091e+01\n2.9594550419154153e+01\n-4.7552750879040580e+01\n1.2991345595596091e+01\n2.9594550419154153e+01\n-4.7552750879040580e+01\n1.1346455450461006e+01\n1.1693614727176312e+01\n-2.4499229713377723e+01\n3.4574617958298188e+00\n2.5797041652304099e+01\n-4.2403558097828714e+01\n4.1029629954341118e+00\n2.6009331497653776e+01\n-4.2655887357045209e+01\n4.1261877237737634e+00\n2.6056397740763323e+01\n-4.2693019504768280e+01\n1.0392075345439815e+00\n2.5043071738161125e+01\n-4.1325423969917274e+01\n-6.6698709100683951e-01\n2.4139262389714435e+01\n-4.0155047414702395e+01\n1.2628532364994028e+01\n1.5575373382416910e+01\n-2.9714433681567453e+01\n1.5736217161617640e+01\n2.9925996364925986e+01\n-4.8928448145402498e+01\n1.2951921964692245e+01\n1.4736882980837672e+01\n-2.9071570599281358e+01\n-1.0689921493485430e+01\n1.9940354540625968e+01\n-3.4151868078395438e+01\n-6.5025995702199459e+00\n2.1738780875523766e+01\n-3.7061698606849177e+01\n1.6717054284838973e+01\n3.0326989397160286e+01\n-5.0494823914104124e+01\n9.3618661480698524e+00\n8.0423464334212014e+00\n-2.0231130981409208e+01\n-1.1925041060352831e+01\n1.9601617909401089e+01\n-3.3961232356635087e+01\n-9.2219320204169346e+00\n2.0738009209465385e+01\n-3.5839797861661886e+01\n-8.7353017694386388e+00\n2.0958653596361241e+01\n-3.6036832095099626e+01\n-8.7611399823283680e+00\n2.0626308077845788e+01\n-3.5552857022365330e+01\n1.2948836865805506e+01\n1.4570796329804891e+01\n-2.9281296577218097e+01\n-8.5489106122245815e+00\n2.0693948236926907e+01\n-3.5829813949638833e+01\n-5.7940606817711062e+00\n2.1720479539957243e+01\n-3.7600431920100100e+01\n1.5483634548686414e+00\n2.4439979004881156e+01\n-4.2062586574833908e+01\n2.5683984227587713e+00\n2.4779200706747798e+01\n-4.2626882202329568e+01\n1.2343329632902190e+01\n1.3946982927383704e+01\n-2.8763416479232038e+01\n-8.3900751624351493e+00\n2.0751419297082112e+01\n-3.6231360719828032e+01\n-9.3358957479593396e+00\n2.0456350802948290e+01\n-3.6055843900052118e+01\n1.9838670311714426e+00\n2.4349031895434969e+01\n-4.2460764268767072e+01\n3.2769914093995136e+00\n2.4742717358530957e+01\n-4.3205539141518535e+01\n-1.0488355936760803e+01\n1.9612828560287934e+01\n-3.4768682665675321e+01\n1.6936547989352382e+00\n2.4177684737273296e+01\n-4.2426683433615167e+01\n-1.1216537278013035e+01\n1.9384380412103400e+01\n-3.4634305430135797e+01\n3.3755586590782225e+00\n2.4728321412834614e+01\n-4.3645421758446574e+01\n3.3607685835775651e+00\n2.4814804338394513e+01\n-4.3676764216612966e+01\n-9.4671636843975335e+00\n1.9874767665320228e+01\n-3.5482415386728398e+01\n-1.0337878873129613e+01\n1.9834414038171719e+01\n-3.5623693290741095e+01\n-1.1206084777659260e+01\n1.9147229695731532e+01\n-3.4659089733929484e+01\n-1.1206084777659260e+01\n1.9147229695731532e+01\n-3.4659089733929484e+01\n1.4586467464859249e+01\n2.7600071201473828e+01\n-4.9072013793961432e+01\n5.5852501253607620e+00\n5.4241194800374268e+00\n-1.7418842448480191e+01\n-8.7784019645020841e+00\n2.0062694139655953e+01\n-3.6716571226292565e+01\n-8.6845285383267630e+00\n2.3637400697384020e+01\n-4.1890942575910188e+01\n-4.9727962698324983e+00\n2.1358459362810066e+01\n-3.9307543971018234e+01\n-1.1207114347275727e+01\n1.8942967137333440e+01\n-3.5430622917132155e+01\n1.2060909575193689e+01\n2.6573841795291699e+01\n-4.8972387254681642e+01\n1.1351166973351962e+01\n2.5603634907818172e+01\n-4.7524835728609517e+01\n4.6234579993931710e+00\n2.4962589567862096e+01\n-4.6051431222593280e+01\n4.3245767966920763e+00\n2.4285624695943312e+01\n-4.5142173120664197e+01\n1.2790238629751768e+01\n1.2055342821922787e+01\n-2.8460015069161820e+01\n9.4609187172263063e+00\n2.5561445099774094e+01\n-4.8208030979385747e+01\n9.2760406813432468e+00\n8.5191603187376863e+00\n-2.3223707989451654e+01\n9.2760406813432468e+00\n8.5191603187376863e+00\n-2.3223707989451654e+01\n5.3734114397792352e+00\n3.9153322884983428e+00\n-1.6246727291315192e+01\n-1.1339880562998548e+01\n1.8269861219223468e+01\n-3.5315056411517226e+01\n-1.8362603856388042e+00\n2.1674847046741139e+01\n-4.1824359296697125e+01\n-1.8311468125528063e+00\n2.1653266597641771e+01\n-4.1781212756519210e+01\n1.2801386069345906e+01\n2.7920073764938902e+01\n-5.2915816825453135e+01\n-2.0919792066619974e-01\n2.2103491969485255e+01\n-4.2933209512543698e+01\n-2.0919792066619974e-01\n2.2103491969485255e+01\n-4.2933209512543698e+01\n-2.1015045962906846e+00\n2.1361599797177647e+01\n-4.1867012698380719e+01\n-2.1287628413040642e+00\n2.1263302510329090e+01\n-4.1703805443068987e+01\n-2.1078301705027052e+00\n2.1242797628953127e+01\n-4.1738398701014361e+01\n1.2810995321171575e+01\n9.0950330767827907e+00\n-2.5374902018493547e+01\n9.1271609649844159e+00\n6.9128099558771439e+00\n-2.1562427583114943e+01\n-6.1304440632685129e+00\n1.9757058587529485e+01\n-3.9251775114268725e+01\n-8.8188434398083757e+00\n1.8639124669958125e+01\n-3.7348863992654529e+01\n-1.2753752989353300e+01\n1.7278214592609384e+01\n-3.4809325154920408e+01\n-4.4879730092031389e+00\n2.0286024683277319e+01\n-4.0489203179935927e+01\n-4.3565198689566200e+00\n2.0134656695226944e+01\n-4.0726748384652097e+01\n1.0962210400315536e+01\n8.9278718526514442e+00\n-2.5489448071482929e+01\n1.2387208928729969e+01\n8.1250478665861223e+00\n-2.4894660928399986e+01\n1.2387208928729969e+01\n8.1250478665861223e+00\n-2.4894660928399986e+01\n-8.1397398171379880e+00\n1.7684521492042236e+01\n-3.6945247328536972e+01\n-8.8195622105432463e+00\n1.8549972441785027e+01\n-3.8664878217601171e+01\n8.2073559267191474e+00\n2.5139899219169269e+01\n-5.1671687094294128e+01\n7.6082660547376602e+00\n2.4173410242349547e+01\n-5.0047856960218674e+01\n7.4071991105503292e+00\n2.3903916384920052e+01\n-4.9449723018779444e+01\n1.2716611040119549e+01\n8.0311255189721589e+00\n-2.5422164726039345e+01\n-1.0461076904284569e+01\n1.8152599413348273e+01\n-3.8125102609532512e+01\n1.8399380250030955e+01\n2.6429959028180566e+01\n-5.5221961522271485e+01\n1.8578569371249682e+01\n2.4280474448404668e+01\n-5.2136485199040543e+01\n-1.2891479229130866e+01\n1.6830339724184135e+01\n-3.5535789575780733e+01\n-1.3358816683791071e+01\n1.6689114314813398e+01\n-3.5433399522255300e+01\n-1.3358816683791071e+01\n1.6689114314813398e+01\n-3.5433399522255300e+01\n-2.9554491486397692e+00\n2.0063298245778014e+01\n-4.2845013076514910e+01\n1.1746725047515307e+01\n1.0061394371270376e+01\n-2.8825783938753073e+01\n-1.0622365428130900e+01\n1.7497691879523749e+01\n-3.7687544231558391e+01\n-1.1231188601762497e+01\n1.7118546785173699e+01\n-3.7143782860134422e+01\n-1.0049464140949915e+01\n1.7720595087200351e+01\n-3.8604631094793135e+01\n-1.1991993127577842e+01\n1.6656837130272521e+01\n-3.6293368019401967e+01\n1.8986682287113876e-01\n2.0607469454969127e+01\n-4.5060809395517467e+01\n-1.1514816020192722e+01\n1.6693147578942927e+01\n-3.6863419224194516e+01\n9.8439829272415551e+00\n2.2585727912438124e+01\n-5.0896966930004282e+01\n-1.1594987409200796e+01\n1.6589085260886460e+01\n-3.7121585551364134e+01\n1.3281568176245505e+01\n6.3939146453931803e+00\n-2.4776999774792568e+01\n1.2248291849562754e+01\n1.1471577483801900e+01\n-3.3021783872349097e+01\n1.1929221857168441e+01\n1.1264657783169897e+01\n-3.2533708201023202e+01\n6.9499735838450150e-01\n2.0088298549744859e+01\n-4.5800476289009495e+01\n1.9050370421680054e+01\n2.4853583586814949e+01\n-5.6872573351383643e+01\n2.3474435333944463e+01\n2.7091797169239413e+01\n-6.2232153625276993e+01\n1.8833001180842707e+01\n2.3584848652777627e+01\n-5.5342632125389265e+01\n1.2635598952814373e+01\n1.0991075560761805e+01\n-3.3332586417095058e+01\n1.1411322230381007e+01\n7.8217046106407055e+00\n-2.7507046038102573e+01\n1.2041701773974724e+01\n6.2997493802880218e+00\n-2.5276992390349999e+01\n1.2515354613928546e+01\n1.1297196263889397e+01\n-3.4264880128010397e+01\n1.2876915152584326e+01\n1.0957935891704958e+01\n-3.3538421890510520e+01\n1.5589931912806454e+00\n1.8986817443977010e+01\n-4.7050914800280431e+01\n1.1167520086032965e+00\n1.8873304372781462e+01\n-4.7376685768172123e+01\n1.3975332606496972e+01\n3.1377358420348616e+00\n-2.1745580818332975e+01\n6.6271917450442892e+00\n2.0486446285753402e+01\n-5.2200392783171402e+01\n6.3655268621417376e+00\n2.0527018472647299e+01\n-5.2395096127211204e+01\n6.2781271624147372e+00\n1.9740662736789545e+01\n-5.1499601290028266e+01\n1.2115279580782698e+01\n6.2264379187418557e+00\n-2.7510757255429567e+01\n1.1915984842111586e+01\n5.2524640821891984e+00\n-2.5956029067778939e+01\n1.2120387914684917e+01\n7.0476952423765153e+00\n-3.0397410035691010e+01\n-1.2112518174452426e+01\n1.2862812000469960e+01\n-3.5836959213035890e+01\n-2.3198608336098716e+00\n1.6094606208779727e+01\n-4.4938078287755836e+01\n1.1864793110357811e+01\n1.9934559184517145e+01\n-5.6176752054733313e+01\n-1.1811124041448080e+01\n1.4504787635937564e+01\n-3.9488372592298731e+01\n1.0804059886196210e+01\n1.9693126315078672e+01\n-5.5794399572434109e+01\n1.2569637346440947e+01\n8.2637412455554511e+00\n-3.3521324195196719e+01\n1.2758119327776202e+01\n4.7326920677049644e+00\n-2.6828810434344245e+01\n1.4473302835286443e+01\n2.0370662838049736e+00\n-2.2431342428154242e+01\n1.4473302835286443e+01\n2.0370662838049736e+00\n-2.2431342428154242e+01\n1.2839515565248734e+01\n8.8506001349030985e+00\n-3.5327963700948580e+01\n1.1972724680438157e+01\n5.9272370024706209e+00\n-2.9358663912405323e+01\n1.3140790199599795e+01\n3.9275309816375783e+00\n-2.6322596158689610e+01\n1.3384676785841119e+01\n7.8868599058658564e+00\n-3.4387299347364738e+01\n-3.2929977889202977e+00\n1.6000348103661246e+01\n-4.6561046223753792e+01\n1.2171459088581997e+01\n5.2905954550636123e+00\n-2.9014526484298500e+01\n1.4002266477781365e+01\n3.1235907448295910e+00\n-2.5543333634860957e+01\n-1.1525958131174058e+01\n1.3378911573583814e+01\n-4.0389464975073835e+01\n-1.1582530814654383e+01\n1.3571458383009404e+01\n-4.0682828016403320e+01\n1.2485993805178758e+01\n4.6553716352033572e+00\n-2.9271429342784991e+01\n-2.1016910599636018e-01\n1.6076763122872496e+01\n-5.0492807604886416e+01\n-1.2090424031819165e+01\n1.3008487054170953e+01\n-4.0362926543452964e+01\n1.2553545052811948e+01\n4.6466648040703813e+00\n-2.9920205578388192e+01\n1.2354837878178737e+01\n4.5477909872283462e+00\n-2.9650455120810882e+01\n-1.0172471698214048e+01\n1.3669650802483410e+01\n-4.2420978027046210e+01\n1.3853429686442158e+01\n2.8887946636445623e+00\n-2.7036273089474715e+01\n-1.0978158703451246e+01\n1.2845774611449004e+01\n-4.1796701498814279e+01\n8.7366185228295521e+00\n1.8036065024381607e+01\n-6.0223407946763786e+01\n7.8797405234311855e+00\n1.4399804056598034e+01\n-5.1487409400846936e+01\n-1.5178307099669650e+00\n1.4739175589704438e+01\n-4.9393752847312406e+01\n1.3136009917352805e+01\n3.0767291882337511e+00\n-2.7954237933899350e+01\n1.4067442497514255e+01\n1.4190180544934055e+00\n-2.4842661616291231e+01\n7.8582721230906172e+00\n1.6177249587940530e+01\n-5.6709132560950835e+01\n1.4150185477644847e+01\n1.1975544245731617e+00\n-2.4563145529355406e+01\n1.4643418695322332e+01\n1.2939883861861079e+00\n-2.5574432582408267e+01\n1.4025893246155677e+01\n2.0213244119771558e+00\n-2.7233201528451602e+01\n1.3634846751508324e+01\n2.0640544867258681e+00\n-2.7590298988628863e+01\n-1.2212827554302881e+00\n1.4458882198952629e+01\n-5.1610051178311686e+01\n1.4156564096751351e+01\n1.4651203245548348e+00\n-2.6459328223206924e+01\n1.4188194638097043e+01\n1.5145888539137911e+00\n-2.6544914348932178e+01\n-7.4885665350636064e+00\n1.3169704824871452e+01\n-4.6331536562705963e+01\n-1.3574926969822134e+00\n2.5630101135072758e+00\n-2.3085660977182318e+01\n-1.3461429203142925e+00\n2.5577078333427634e+00\n-2.3099063191743316e+01\n-8.1908472715616354e-01\n1.9322230823839579e+00\n-2.2000363340048487e+01\n2.6549598031002408e+00\n3.9648869045288371e-01\n-1.9592197672728950e+01\n2.9595118716640467e+00\n1.2036620876167472e+01\n-4.8314244478789384e+01\n1.4294116617531609e+01\n9.7377424115394962e-01\n-2.6526343033311178e+01\n1.3969658774242053e+01\n1.6264573798552635e+00\n-2.8173395375856398e+01\n5.4432657858977480e+00\n-1.7934725372106086e+00\n-1.6160836182352018e+01\n1.8489082917171724e+00\n4.4375880766179182e-01\n-2.0042447617093767e+01\n-9.1700691016981939e-01\n1.4489253094374623e+00\n-2.1773029910538195e+01\n1.4151429022828147e+01\n5.4258497723607768e-01\n-2.6030551097758661e+01\n-1.3600335265828847e+00\n3.3448987136517792e+00\n-2.6653929554825076e+01\n-1.1915998084415460e+00\n1.5247587248407437e+00\n-2.1994802107215627e+01\n-1.1811127915021213e+00\n1.5100996191800014e+00\n-2.1990730502217346e+01\n2.1012107237774971e+00\n-6.9379230413573259e-04\n-2.0068268718295119e+01\n2.1539264005256640e+00\n-2.9081876942859425e-01\n-1.9478327381230489e+01\n1.4937712349402883e+01\n-8.4235751624912300e-02\n-2.6156555759583679e+01\n-1.1437423090659429e+00\n1.1527912731480308e+00\n-2.1893883542436949e+01\n-1.1787299150064834e+00\n1.1511094904473014e+00\n-2.1853441092600615e+01\n2.0708816733779223e+00\n-1.4222281026333733e-01\n-2.0251273737876602e+01\n-1.7421191139992454e+00\n1.8789018975163201e+00\n-2.3870244013609753e+01\n1.4147160259921485e+01\n6.1180904603574382e-01\n-2.8108135858576961e+01\n1.3764124656485411e+01\n5.0198739976576223e-01\n-2.7553319389607644e+01\n-2.5749668490325677e+00\n3.2643425756500144e+00\n-2.7680848076041229e+01\n1.3846366045868038e+01\n4.4863157179825702e-01\n-2.8611667854220311e+01\n-6.4405390237934988e-03\n4.7268616451656344e-02\n-2.0805128668891271e+01\n-7.6193156589249533e-01\n2.7104994906407626e-01\n-2.1303027712000603e+01\n-4.5010213954262313e-01\n8.2330456386880482e-02\n-2.1039458591700040e+01\n1.4559835030380077e+01\n-7.2760831069888288e-01\n-2.7792438722466457e+01\n1.4260346722371349e+01\n-7.8352349410579447e-01\n-2.7445609865996449e+01\n-3.5400583156933298e+00\n2.0070162214192773e+00\n-2.6040897749541386e+01\n1.4716355751993174e+01\n-1.3094211844268957e+00\n-2.6496075706485296e+01\n-4.0069218497530361e+00\n1.6889546878963351e+00\n-2.5183517194357695e+01\n1.2758119533159658e+00\n-8.7884164210893079e-01\n-2.0265585615436073e+01\n-1.3068241210497180e+00\n2.6184155650719153e-02\n-2.1872755079163543e+01\n-1.2981428612987247e+00\n1.5474254310637543e-02\n-2.1880218734605755e+01\n1.4331724553071950e+01\n-1.0684776310766451e+00\n-2.8142236463240515e+01\n1.4714748466887272e+01\n-9.8397046574583780e-01\n-2.8603079861738781e+01\n-3.6155356188015606e+00\n1.4492252913704002e+00\n-2.5290874694050078e+01\n-3.5962027098087201e+00\n1.4786664569120775e+00\n-2.5376462890462363e+01\n-7.7975809677734109e-01\n-4.1175090486528937e-01\n-2.1206312109384303e+01\n-2.7261630793546412e+00\n5.5265361749848063e-01\n-2.3372924555102664e+01\n1.5054805778376322e+01\n-1.5977660918657286e+00\n-2.7872177400330543e+01\n-3.4926882557401506e+00\n9.3266048361113518e-01\n-2.4481082660359483e+01\n-2.5684342122269657e+00\n2.2838821534639808e-01\n-2.2854835018259678e+01\n1.4691528449663183e+01\n-1.4975034321835696e+00\n-2.8379412385389568e+01\n-3.4883518793012223e+00\n-2.9775173650691528e-01\n-2.2998176143070143e+01\n-1.4552554692974389e+00\n-1.1884639317333670e+00\n-2.1397500175461165e+01\n-4.2030888719102402e+00\n-1.6802101076729004e-01\n-2.3268830125798694e+01\n-3.6982321340237836e+00\n-2.9233416524358669e-01\n-2.3412166542418877e+01\n9.0899281109239463e-02\n-1.9785070027530105e+00\n-2.0357328295875245e+01\n4.5188745132213484e+00\n-2.9127017388375154e+00\n-2.0806386974743603e+01\n1.5227498045051764e+01\n-3.5639999087748504e+00\n-2.7385084263066460e+01\n-3.9278309075207751e+00\n-4.4315027558950043e-01\n-2.3763525035579018e+01\n3.9561373713231545e+00\n-3.0579958482787246e+00\n-2.0322656056614363e+01\n-3.2378065053650755e+00\n-1.0881526113229558e+00\n-2.2730119091629650e+01\n1.9975427283137488e+00\n-3.1708511658987022e+00\n-1.9627189998466733e+01\n2.8768116654688338e+00\n-3.3062069691210634e+00\n-2.0079267370155339e+01\n4.1531539493789991e+00\n-3.5773528610945857e+00\n-2.1144756216090691e+01\n4.7927057082211943e+00\n-3.6539465717158262e+00\n-2.1669362302102435e+01\n-5.5347826715084132e+00\n1.4049403327052603e+00\n-3.4816944062134887e+01\n-7.6571959260132845e+00\n1.9323694481312055e+00\n-3.5193864340393560e+01\n-5.3307306876608571e+00\n1.2170036344891491e+00\n-3.4583361678046735e+01\n-6.5874475061390667e+00\n5.0525557046300862e-01\n-3.0765064406662255e+01\n-1.4404996789986266e+00\n-2.7102443158866927e+00\n-2.1148703548029882e+01\n-5.7431647501984684e-01\n-3.0475031506902925e+00\n-2.0488409141071305e+01\n-1.0626670820314709e+01\n1.7024927727164085e+00\n-3.3728347944991469e+01\n2.8395635810486453e+00\n-3.9821305444645998e+00\n-2.0470087858824730e+01\n-3.4849600300237857e+00\n-1.8544547319137030e+00\n-2.3961946868930266e+01\n-8.1418546303867405e+00\n7.2985057415714605e-01\n-3.3449872991695948e+01\n-7.7087262700070225e+00\n4.9119736399990926e-01\n-3.3358022808594924e+01\n1.2091276591805926e+00\n-3.9937257972406774e+00\n-2.0588691035879460e+01\n-6.6798001216882614e+00\n-1.4474119799997270e-01\n-3.2417478638046468e+01\n-3.1727769073240419e+00\n-2.7541880292346774e+00\n-2.3353602009969567e+01\n-4.0155484431735916e-01\n-3.9918806788250567e+00\n-2.1133988997524362e+01\n-7.7526149891801044e+00\n-7.2591730344217464e-01\n-3.1077495482394085e+01\n1.4036357821261949e+00\n-4.5844680104763427e+00\n-2.1054215508564877e+01\n-9.2166222319179418e+00\n-2.1686808410364541e-01\n-3.2100743328272770e+01\n-5.2859677856788800e-01\n-4.2885846292830241e+00\n-2.1683009726014124e+01\n-7.9441708591682820e+00\n-1.0956065889104107e+00\n-3.0946660001808233e+01\n6.1443559181574137e-01\n-4.6497319666412196e+00\n-2.1095973730615711e+01\n-1.0823703245961234e+01\n-8.0446657431901458e-01\n-3.0319715309803492e+01\n-5.5875589322603336e-01\n-4.4592522111543156e+00\n-2.1773703264294166e+01\n-1.0188514887409458e+01\n-1.0342963046549274e+00\n-3.0040434368157925e+01\n-7.8039807335286229e+00\n-1.7476105953705985e+00\n-3.0279930484053622e+01\n-7.0239535412517888e+00\n-1.9806869581823234e+00\n-3.0200998930085124e+01\n-9.0817342465034709e+00\n-1.5244911675667001e+00\n-3.0461383756375746e+01\n-1.0986014201141675e+01\n-1.4142933603850076e+00\n-3.0847398550850460e+01\n-7.9170952627037110e+00\n-2.6797961431801092e+00\n-2.9068646473316679e+01\n-7.2140579990655480e+00\n-3.0416070148741357e+00\n-2.8366425582715291e+01\n-8.2316692468043247e+00\n-3.2208507890959686e+00\n-2.7537455726556242e+01\n3.0026171613543724e+00\n-7.0808150277074926e+00\n-2.1453073391500162e+01\n-9.1342621239847777e+00\n-3.9093015166729201e+00\n-2.6054687304699634e+01\n2.3552265146250542e+00\n-7.9046174425341897e+00\n-1.7304709760525704e+01\n4.7661387148155931e+00\n-8.4902283335170878e+00\n-2.0730932011324988e+01\n1.5875480871584082e+00\n-7.8734245884341227e+00\n-2.1157781307915421e+01\n2.6625059706661784e+00\n-8.3425182567963727e+00\n-2.1944424839807954e+01\n3.2811507993704589e+00\n2.7056842773563876e+01\n-4.0957297946431225e+01\n4.6247875098499485e+00\n2.7191387518193064e+01\n-4.2382477766196232e+01\n1.3079320066958964e+01\n2.9303183897367472e+01\n-4.5432418108841155e+01\n1.4042504350576110e+01\n1.7734267826651241e+01\n-3.2508857893277266e+01\n-1.2401402759776665e+00\n2.4134921350228467e+01\n-3.9637101892285123e+01\n-9.0312644486555875e+00\n2.0995247251779247e+01\n-3.5632291751510699e+01\n7.6425927363429516e+00\n2.6684487134194615e+01\n-4.5235659823831185e+01\n-1.0029659071822232e+01\n2.0252856429003934e+01\n-3.5302058507205324e+01\n-9.0100593838790939e+00\n2.0641750412057384e+01\n-3.5917183016623333e+01\n-6.9100372534549690e+00\n2.0993521529207175e+01\n-3.6750947557181057e+01\n7.4052718786263787e+00\n2.6526426116655593e+01\n-4.6226457033238937e+01\n1.0512480536112786e+01\n2.8329754357449907e+01\n-4.9429449682853054e+01\n1.3367365879658156e+01\n9.5645423553317919e+00\n-2.3563878486168864e+01\n-9.8983683227201720e+00\n1.9706272237398412e+01\n-3.5475983984137400e+01\n-4.7088134538504169e+00\n2.1761395381423107e+01\n-3.9330848989480337e+01\n1.3457705388438615e+01\n9.7466813509834065e+00\n-2.4448851582477133e+01\n-1.0105877310867966e+01\n1.9233190373863959e+01\n-3.5265227879783069e+01\n-1.0876205405588419e+01\n1.9034038109680708e+01\n-3.4961823854240386e+01\n-1.0318924676460918e+01\n1.9228884092959532e+01\n-3.5639239283714794e+01\n2.8442446753864399e+01\n3.4357316038585118e+01\n-6.2072982017128339e+01\n1.2870428819131206e+01\n9.1395447562612411e+00\n-2.4937423328183311e+01\n1.1317455980714699e+01\n1.2809579840376063e+01\n-3.0676373683697072e+01\n-1.1120391675933991e+01\n1.8039717972466548e+01\n-3.6061829018136592e+01\n-2.2757067776362874e+00\n2.1001394515785581e+01\n-4.2030882448608828e+01\n-2.7884670641886626e+00\n2.0115264937553047e+01\n-4.2108713554961696e+01\n-1.1306665565503355e+01\n1.7184853631573308e+01\n-3.6706206732570315e+01\n-1.3500808492464341e+01\n1.6144747235319461e+01\n-3.5127316383496634e+01\n1.4667360514312854e+01\n1.1038890322191120e+01\n-3.1885668163611246e+01\n-9.8957274078043849e+00\n1.7365696976847037e+01\n-3.8456838190728504e+01\n4.9892695699502161e+00\n2.0029395332156859e+00\n-1.5465446247713638e+01\n-1.3418611745513557e+01\n1.6317763499161114e+01\n-3.6062822025576779e+01\n1.5306227968464563e+01\n2.4100196015851960e+01\n-5.3890398108551672e+01\n2.9183338397065732e+00\n2.1080923217979670e+01\n-4.7312967178258361e+01\n1.3541272520474740e+01\n6.3494518227187493e+00\n-2.4717753264410128e+01\n1.6190732058529793e+01\n2.3622937765289517e+01\n-5.4900925324507519e+01\n6.9489554777545051e+00\n2.1382544151829471e+01\n-5.0596330969323439e+01\n1.2146468660004674e+01\n6.9696917449261084e+00\n-2.6818211983310096e+01\n1.3768930937872797e+01\n5.5183518969499143e+00\n-2.4922885355244595e+01\n1.0271552334272151e+01\n6.4659850211016172e+00\n-2.6796215634175258e+01\n1.2693585613771782e+01\n5.5772140886714618e+00\n-2.6451863725796098e+01\n1.2915197040683536e+01\n4.7949893883881307e+00\n-2.5178175197733463e+01\n3.9603647157096025e+00\n1.8756982157047194e+01\n-4.9622236680076639e+01\n3.2799562051127613e+00\n1.8272412630705400e+01\n-4.9031241697937752e+01\n1.2148572405528190e+01\n6.4958551023820394e+00\n-2.9585803386869959e+01\n1.3591012870517535e+01\n4.1782706116865143e+00\n-2.5393662661777856e+01\n5.4608554649835570e+00\n1.9222498261649502e+01\n-5.2690733679783740e+01\n5.2124041445655358e+00\n1.8295914768754812e+01\n-5.1259039822793653e+01\n1.3560667432218081e+00\n1.7441071905138845e+01\n-4.8954615022241434e+01\n5.3185505104703461e+00\n1.8392630838614583e+01\n-5.2500516781133328e+01\n1.3802864229586417e+01\n7.6616892455783487e+00\n-3.4885198150008549e+01\n-7.0953914864247594e+00\n1.5038003691257464e+01\n-4.4524809249744735e+01\n7.3560247517065458e-01\n3.7886046699486826e+00\n-2.3217445038767384e+01\n-1.4194007928710168e+00\n1.5995413514355771e+01\n-4.8650599837137101e+01\n3.0646796625121215e+00\n2.9037604138743118e+00\n-2.2398682973021554e+01\n6.7417043385860104e-02\n1.7686970222921650e+00\n-2.1067720101357697e+01\n5.5646988394288295e+00\n-1.4248436340557997e+00\n-1.5883736358217250e+01\n1.4811503762768558e+01\n8.3566510636214075e-01\n-2.4988579438928380e+01\n1.4426360451659448e+01\n6.4529727141896132e-01\n-2.4450809045418367e+01\n7.6152597022899901e-03\n1.3515623589848036e+00\n-2.0924327968563130e+01\n-1.4746820475333737e+00\n2.1682703571687236e+00\n-2.2816212354203131e+01\n-1.4144580296279792e+00\n2.2025990269560318e+00\n-2.2959754901853358e+01\n3.6100056531278448e+00\n-2.1487423430204053e-01\n-2.0720151844538812e+01\n1.3438160669994300e+01\n1.0838617104085282e+00\n-2.8793563047385323e+01\n-6.9111493138334765e+00\n1.1475319842339594e+01\n-4.7731534092183281e+01\n1.5426371367127059e+01\n-6.0424668743479693e-01\n-2.6601163177910564e+01\n1.4970375589424648e+01\n-3.8922876164566989e-01\n-2.7109061235227514e+01\n-1.2522537697333065e+00\n6.7938229403456307e-01\n-2.1767353344178652e+01\n-1.2538448386933769e+00\n6.6793912620422702e-01\n-2.1699642481137793e+01\n6.3377652990035820e+00\n-1.3552950293984232e+00\n-2.1394776762894054e+01\n1.4239897369528318e+01\n-8.4513409412497698e-01\n-2.7810227136037152e+01\n-3.4348297774606529e+00\n1.6138582851777097e+00\n-2.5497183967052383e+01\n-3.4348297774606529e+00\n1.6138582851777097e+00\n-2.5497183967052383e+01\n1.5104249246739045e+01\n-1.9329850873270829e+00\n-2.5676369090812965e+01\n-4.0709391881817005e+00\n1.4803513815546168e+00\n-2.5258111026629333e+01\n3.6708964308274386e+00\n-2.6920290601433461e+00\n-1.8493804530912435e+01\n-4.0691969473614158e+00\n1.9668445578711349e-01\n-2.5627479311317529e+01\n-3.4456978474317537e+00\n-6.7844489234845373e-01\n-2.2935996834190039e+01\n-2.9015905230490544e+00\n-1.1088741248692053e+00\n-2.1929632019677371e+01\n-3.3338646362378102e+00\n-8.7377840382059790e-01\n-2.3103646624441879e+01\n-2.9646482473231042e+00\n-1.5999550113796925e+00\n-2.1514638560745496e+01\n2.8548678028443644e+00\n-3.3151435622021479e+00\n-1.9538910543230156e+01\n-3.9261013553855499e+00\n-4.0631705980179211e-01\n-2.5580734292905447e+01\n-1.7768187316761903e+00\n-2.1555435372725413e+00\n-2.0882374063721375e+01\n-5.9492777311803113e+00\n1.6047034826734592e+00\n-3.5162600572212028e+01\n-3.8753270570917433e+00\n-1.8082122408237837e+00\n-2.4718549370807938e+01\n-6.7778654474887281e+00\n5.5873642474022622e-01\n-3.3198016811103564e+01\n-3.0501165863027384e+00\n-2.4317871070266053e+00\n-2.2704291842643130e+01\n-9.9266986196308116e-01\n-3.1968509133676153e+00\n-2.2219734866996323e+01\n-3.4488460685834310e+00\n-2.2384293251032275e+00\n-2.4355628449814333e+01\n8.7511176453958726e+00\n-5.0746470151842127e+00\n-2.4238521456586021e+01\n-1.6954500642698140e+00\n-3.4470697505859569e+00\n-2.2092175537446241e+01\n1.8048919235083183e+00\n-4.7018850151731826e+00\n-2.1159615382415272e+01\n-9.9071522231362454e+00\n-1.5987680727720472e+00\n-3.0384574512293117e+01\n-9.8929244817179036e+00\n-1.6374955694873081e+00\n-3.0532792294319336e+01\n6.5665746177303030e-01\n-5.2417029451633574e+00\n-2.1638558858604345e+01\n-9.7293930022690152e+00\n-2.6608463915832425e+00\n-2.8970631407849233e+01\n3.6118476804876165e+00\n-6.9862391761285654e+00\n-2.1329205901311592e+01\n-8.7721105310494991e+00\n-4.0940239595506451e+00\n-2.6674041672893100e+01\n2.3902119928679069e+00\n-7.5765471713217032e+00\n-2.1241221408110331e+01\n3.2438382885251551e+00\n-9.0293651329010434e+00\n-1.9216646209050428e+01\n1.6160205867888919e+00\n-8.8695116560504008e+00\n-1.9634640059584061e+01\n2.1280672185671916e+00\n-8.9975176209880932e+00\n-2.0052953572913921e+01\n1.2444685857515163e+00\n2.6590983658059184e+01\n-4.1002126638356778e+01\n8.8664757924258346e+00\n2.8158801402248525e+01\n-4.4212250493473064e+01\n3.5371870726220012e+00\n2.6399095905491784e+01\n-4.2113865992130805e+01\n9.0206589694316790e+00\n9.5005130449889723e+00\n-2.1756230767956474e+01\n1.1838325408348149e+01\n1.6076426431881369e+01\n-3.0736063768299029e+01\n-6.5604714122711689e+00\n2.0820764929033089e+01\n-3.6449979145551850e+01\n1.1863486890782278e+01\n1.5379874717827816e+01\n-3.1323461359299884e+01\n1.0469227619466261e+00\n2.3923986732291272e+01\n-4.2361977094772961e+01\n2.0566664804087385e+00\n2.3860959574230975e+01\n-4.3036282672342708e+01\n8.0833084979740626e+00\n2.6450365166867019e+01\n-4.7737980373022843e+01\n1.1715738960582435e+01\n2.6354482948158157e+01\n-4.9360838449037843e+01\n1.4294741278088466e+01\n1.2510859703972621e+01\n-3.0481126501465052e+01\n1.2247931999262324e+01\n9.8332627299348179e+00\n-2.6647358554968722e+01\n-5.6065615271177318e+00\n2.1280647468832690e+01\n-4.2273307151136265e+01\n1.1220802009671532e+01\n8.4855836609448811e+00\n-2.5013641472632955e+01\n1.1339844701992902e+01\n8.2681233083284837e+00\n-2.4769280748182940e+01\n1.1979015666361729e+01\n8.6231643819739112e+00\n-2.7286932864181203e+01\n9.0159958256193811e+00\n2.2904666177751029e+01\n-5.0261521274146787e+01\n1.3643366650722042e+01\n5.8007680303947549e+00\n-2.4611292339603128e+01\n1.2699045838631358e+01\n1.1297877384408757e+01\n-3.4020096870011990e+01\n1.2699045838631358e+01\n1.1297877384408757e+01\n-3.4020096870011990e+01\n7.8396952038817327e+00\n2.0760817420478894e+01\n-5.1279254161400175e+01\n1.4202426707954096e+01\n2.2117238093771221e+01\n-5.6048757652178253e+01\n1.0124853674382297e+01\n5.8195886052250900e+00\n-2.6579504139460280e+01\n1.4476510459231227e+01\n8.9654567986603002e+00\n-3.4723692505660679e+01\n1.3802264122319979e+01\n3.8463945982097245e+00\n-2.5558859708134428e+01\n1.4256885270976520e+01\n2.0066802834029861e+01\n-5.8044868007468835e+01\n1.3076463136562220e+01\n4.9455111604981852e+00\n-2.7750540412688125e+01\n1.3076463136562220e+01\n4.9455111604981852e+00\n-2.7750540412688125e+01\n-3.6822239115353579e+00\n1.5781780392079336e+01\n-4.5730063143477025e+01\n7.6419279962949478e+00\n1.7997041896655130e+01\n-5.5284565121011994e+01\n6.9248901258876687e+00\n1.7773386399049432e+01\n-5.4967498887530382e+01\n-8.5359222604716356e-01\n3.4182310107301204e+00\n-2.3009133650056679e+01\n-1.0260710153941581e+00\n1.5362299026560603e+01\n-4.9563717427962686e+01\n-1.1587105858777136e+00\n1.5089070151805778e+01\n-4.9101428603934757e+01\n1.2597056809793889e+01\n4.2433075185623323e+00\n-3.0830983170723208e+01\n-5.2534680060338046e-01\n2.0335100203137628e+00\n-2.1573559980782797e+01\n1.3140868664893901e+01\n3.0632141804233828e+00\n-3.0078380370662483e+01\n5.8818748358120594e+00\n-1.1801591890358962e+00\n-1.7011384130467597e+01\n-2.1398470305418096e+00\n3.0337464180893967e+00\n-2.6290367249109025e+01\n-1.8066932721962661e+00\n2.8173420308426604e+00\n-2.5941594953581639e+01\n1.4828711755227822e+01\n7.8476302423155335e-03\n-2.6570120319894276e+01\n1.4104778779888685e+01\n-1.0442403316753834e-01\n-2.5867672642892106e+01\n6.0738593578172688e+00\n-2.1606733594301821e+00\n-1.8264758188415737e+01\n-1.7280182543482923e+00\n9.0207643401179261e-01\n-2.2790190275958654e+01\n-1.5784351850841867e+00\n6.9993833293445573e-01\n-2.2449821083712898e+01\n4.4313814260647924e+00\n-1.9639506626738144e+00\n-1.9252532522681964e+01\n5.3531683157466157e+00\n-3.3138443092724694e+00\n-1.6801710811799662e+01\n6.1038775477017175e+00\n-3.0691687275082629e+00\n-1.8340685199478383e+01\n-3.6009544423199125e+00\n-6.5391228817051428e-01\n-2.3323669261569417e+01\n-3.0997143361799520e+00\n-1.5400710142599563e+00\n-2.2360783344428881e+01\n-3.3656649239088723e+00\n-1.2729949425846958e+00\n-2.3185442389727321e+01\n6.5836083297200376e-01\n-3.6281834902590622e+00\n-2.0064350226527282e+01\n4.1703413987761673e+00\n-4.2238960445643503e+00\n-2.1729532066493377e+01\n-6.3645903554306384e+00\n5.0507933074142808e-01\n-3.3095112135233407e+01\n3.0981487090535595e+00\n-4.3980030252619606e+00\n-2.0871812730277568e+01\n8.1959517955695704e-01\n-4.0684186633933228e+00\n-2.0222860200498797e+01\n-2.8879553351504823e+00\n-2.2528489355962877e+00\n-2.5618488680367353e+01\n-3.7087345893803576e+00\n-2.3076757457291075e+00\n-2.5097136184940041e+01\n-8.9631424726684941e+00\n1.5392771867419069e-01\n-3.2751985461645354e+01\n-1.9846357401611190e+00\n-3.2926068488731319e+00\n-2.2355585555570560e+01\n9.2586334431036713e-02\n-4.1863334369425909e+00\n-2.1276610114990000e+01\n1.6781458836949252e+00\n-4.8914573179911836e+00\n-2.1580676772845226e+01\n-1.4198956978125086e+00\n-4.4260081724788227e+00\n-2.2359317935604068e+01\n-7.7997595426594346e+00\n-2.2146595115283962e+00\n-2.9731923697652046e+01\n-7.5747695321610333e+00\n-2.8444831242942481e+00\n-2.8837498489994704e+01\n4.9541610293789242e+00\n-6.8771101894560545e+00\n-2.2163607907299390e+01\n2.4412221323112124e+00\n-6.5163034564543230e+00\n-2.1581215233392520e+01\n3.3636818656350891e+00\n-7.7207173872313870e+00\n-2.1302131651961012e+01\n3.3636818656350891e+00\n-7.7207173872313870e+00\n-2.1302131651961012e+01\n1.3240951657096227e+01\n1.1893097735653427e+01\n-2.6355429087230217e+01\n4.5688882040769480e-01\n2.4307850780942822e+01\n-4.2980532033779731e+01\n8.3571041675198714e+00\n2.6238002324889596e+01\n-4.6392261765915428e+01\n8.5543700613029294e+00\n2.7685040569110047e+01\n-4.8490958013146553e+01\n3.2588540126914918e+00\n2.4201841375029836e+01\n-4.3684312958268585e+01\n8.1617715869933765e+00\n2.5236738977626874e+01\n-4.6628218653695811e+01\n8.2661422416043866e+00\n2.5475450695038077e+01\n-4.6934509448551168e+01\n9.2012649549684689e+00\n5.5226859121703953e+00\n-1.9016033045913034e+01\n2.3021432716774022e+01\n2.8502830055084832e+01\n-5.4906059258589735e+01\n-1.8142898745703431e+00\n2.1184692249678900e+01\n-4.2375714252411058e+01\n-2.9905075358728785e+00\n2.0476055836736180e+01\n-4.1720685784416759e+01\n1.1265642473841131e+01\n1.2092214453343491e+01\n-3.2313304243443277e+01\n1.5886464877139964e+01\n2.5085567599417111e+01\n-5.4433444649553728e+01\n8.9405999279687898e-01\n2.0315322864116087e+01\n-4.5639742470134294e+01\n1.1764638850438839e+01\n9.0020950994018047e+00\n-2.8746623553298932e+01\n1.1811694270393872e+01\n8.5652815075639825e+00\n-2.8389855758386808e+01\n7.2236648808840442e+00\n2.1049686070353310e+01\n-5.0971478824453165e+01\n-2.9638555795528050e+00\n1.7642130265628680e+01\n-4.5490790080563848e+01\n5.2592754401902253e+00\n1.0579090764581202e-01\n-1.6129419607826513e+01\n1.4224612148586411e+01\n2.8926928166224601e+00\n-2.4382703022115919e+01\n1.4178512399286660e+01\n1.4801932609576371e+00\n-2.3126661322762281e+01\n-1.0355663530962977e-01\n1.6265358372404012e+01\n-5.2762749385286476e+01\n1.4172131163275075e+01\n1.9981455027215040e+00\n-2.6515398578957342e+01\n1.6019960326284493e+00\n3.6028277482561905e-01\n-2.0102069080361659e+01\n6.4130915113581359e+00\n-2.1583547499294093e+00\n-1.6779631125706370e+01\n-1.4335162706259770e+00\n8.0506224683072825e-01\n-2.1845023261812745e+01\n-2.5012767546298802e+00\n1.9075447168358288e+00\n-2.4821824225156870e+01\n1.1220197051283560e+00\n-6.7651190432119501e-01\n-2.0373941409872092e+01\n1.5209358573148583e+01\n-1.4310293068005762e+00\n-2.7306261983732135e+01\n1.4984459105196189e+01\n-2.4919463823639552e+00\n-2.7637536465061263e+01\n1.5244844788540668e+01\n-2.9595458819343645e+00\n-2.6989204718521574e+01\n-3.8592774094133162e+00\n-2.4882381259223502e-01\n-2.3486919270662501e+01\n-9.4633284322427413e-01\n-3.0997147027848198e+00\n-2.0563150265785445e+01\n2.6243130756609734e+00\n-4.2586623456932795e+00\n-2.0759679274476625e+01\n4.0183460398279776e+00\n-4.5333403851602911e+00\n-2.1848561831185613e+01\n6.6893062868161723e-01\n-5.0035895094472096e+00\n-2.1379525897397620e+01\n-1.2525628861136304e+00\n-4.4811675340680521e+00\n-2.2267622246228783e+01\n-1.2459191438909125e+00\n-4.5223681723290969e+00\n-2.2150653137989782e+01\n-1.2893032039632282e+00\n-4.9715595244877901e+00\n-2.2567245372538995e+01\n5.4803317589052192e+00\n-6.7505840509913595e+00\n-2.1941987686098830e+01\n4.9185046223914819e+00\n-6.8504049605356974e+00\n-2.1576465450333423e+01\n-5.9084239906684450e+00\n-3.8481630315841420e+00\n-2.7132057870970797e+01\n-4.5069449199330842e+00\n-5.7337172817105264e+00\n-2.3947115131258894e+01\n1.4632099385274339e-01\n2.4725394202534133e+01\n-4.0809567350958588e+01\n1.3573379931694245e+01\n1.6648634392378042e+01\n-3.1971717201919400e+01\n1.0742443330275478e+01\n9.9011438847183619e+00\n-2.5373997763458917e+01\n8.1523172690261809e+00\n2.3419015154378886e+01\n-4.8834180212803822e+01\n8.0961382324835540e+00\n2.3314030744111900e+01\n-4.8726228953472635e+01\n1.6789844634310917e+01\n2.4772526981021784e+01\n-5.5540934100567206e+01\n-1.3560209775516187e+01\n1.5647485936105483e+01\n-3.5375728504706323e+01\n9.0685008242420899e+00\n2.3158749257155375e+01\n-5.2476033656997984e+01\n9.2487841143176244e+00\n2.2352020934590112e+01\n-5.2368421633759894e+01\n9.5383847538139666e-01\n1.7420402935890934e+01\n-4.7618097833818481e+01\n2.7674135342285439e-01\n3.7019682934946476e+00\n-2.2858303091212466e+01\n-1.3983879326606621e+00\n1.5637277636555197e+01\n-4.8907140866179212e+01\n1.1238292598378803e+00\n1.6200359975554157e+01\n-5.1993181556377479e+01\n-7.5493279013898551e-01\n1.1509166467989052e+00\n-2.1519388001248814e+01\n1.4665784417161849e+01\n7.7592232155952667e-01\n-2.7763883844868172e+01\n-2.7780785101028531e+00\n-1.3475480851956514e+00\n-2.1687539554596462e+01\n-1.0460014017367236e+00\n-2.3449562921057265e+00\n-2.0248770539859727e+01\n-3.1439244136304900e+00\n-2.4494460509393265e+00\n-2.3307294981268257e+01\n-1.3266920953485977e+00\n-3.3504414386842010e+00\n-2.1334247321459081e+01\n-8.1803487072704550e-01\n-3.8241367128448451e+00\n-2.1501181461222156e+01\n-2.1430363843659679e+00\n-3.4610590458288688e+00\n-2.2686824513765018e+01\n1.9373327676840417e+00\n-6.1572009830881873e+00\n-2.1367564521993810e+01\n5.2886518781586798e+00\n2.7300781505423711e+01\n-4.2468868919871426e+01\n1.3521813186116831e+00\n2.5695574677594760e+01\n-4.0440701459022982e+01\n3.1536381902143207e-01\n2.5203419419759328e+01\n-4.0345219040493454e+01\n5.9689132379051646e+00\n2.4180303952496150e+01\n-4.4760527733914046e+01\n7.3372735074025055e+00\n2.6670813377358410e+01\n-4.8463010090371135e+01\n1.6682504738105276e+01\n2.2397015012226305e+01\n-5.5402190243652861e+01\n1.3057189710946286e+01\n9.1903424956593831e+00\n-3.2501179084011746e+01\n3.4085519786239300e+00\n1.7556426196537362e+01\n-5.0918123638221196e+01\n7.8989828454881883e-01\n1.9318570255521283e+00\n-2.0886829125290930e+01\n-2.9590301385537812e+00\n-2.1518001129080391e+00\n-2.2819160407439391e+01\n4.3374208691851024e+00\n-6.2176877429417097e+00\n-2.2125624306315615e+01\n4.3374208691851024e+00\n-6.2176877429417097e+00\n-2.2125624306315615e+01\n6.5716961880431128e+00\n2.7655737309589213e+01\n-4.3744782992866476e+01\n2.5696841824668972e+00\n2.5923985955997104e+01\n-4.1502617520916424e+01\n2.6308911213809814e+00\n2.6138846289289706e+01\n-4.1718510458259722e+01\n-4.8754498065933713e+00\n2.1889596390098728e+01\n-3.7340528641871892e+01\n7.2323494878121108e+00\n2.7192733514983505e+01\n-4.5391544372354588e+01\n1.2935135419873077e+01\n1.2864707650111583e+01\n-2.7548060811023543e+01\n2.4038258111349369e+00\n2.3299227401646196e+01\n-4.3822255494090790e+01\n2.4116364306560341e+00\n2.2503630737948143e+01\n-4.5064778187442180e+01\n2.4151836937421152e+00\n2.2459143835552300e+01\n-4.5013670463463946e+01\n-3.3875320417746448e+00\n-1.0154134195666840e+00\n-2.2623483649378304e+01\n1.7116758631834914e+00\n-4.1308446490382833e+00\n-2.0541864677223160e+01\n1.1005800575813709e+00\n-4.4895139377424238e+00\n-2.0841861358388787e+01\n3.2203061741573245e+00\n-5.7926225694326980e+00\n-2.0821233670347162e+01\n2.7633636483148050e+00\n2.5551053205098594e+01\n-4.3318094179442603e+01\n1.2291676341845887e+01\n1.4777468730232753e+01\n-2.9600562592329641e+01\n1.2429330438111277e+01\n1.2784247163155417e+01\n-3.0236349817110767e+01\n6.8151518865792751e+00\n2.3413566123509355e+01\n-4.9260777042715766e+01\n-2.2760594711449027e+00\n1.9977333031280121e+01\n-4.4120245736321685e+01\n1.1154549542318859e+01\n2.0296929340010923e+01\n-5.3556990909963936e+01\n1.4794265445475466e+01\n2.1128469432725964e+01\n-5.6646586845455744e+01\n3.0324226897947222e+00\n1.8729810490844162e+01\n-5.4304359584470433e+01\n2.2521115796034517e+00\n1.6008996093818194e+01\n-5.1728434566786099e+01\n-4.0877489005078207e+00\n1.4672854236834047e+01\n-4.7849439954012823e+01\n-1.7434119388104681e+00\n7.3953076117750627e-01\n-2.2707356321832989e+01\n-2.7439425379722588e+00\n7.5785113875786436e-01\n-2.3234153695717069e+01\n-3.4495643835576280e+00\n-4.7660987649702868e-01\n-2.2506459509244991e+01\n3.2706536481628743e+00\n-5.3080521373479321e+00\n-2.1044567828311560e+01\n1.6952859558054620e+01\n2.8191329343932576e+01\n-5.6588355848682113e+01\n-3.1018679072120419e+00\n1.6743464102169572e+01\n-4.5262818122656874e+01\n-1.5865255389993663e-01\n1.5523428657549458e+01\n-4.9566799462589167e+01\n-6.9145400019460568e-02\n1.6034316000514238e+01\n-5.0666284402437434e+01\n-1.0928262861881106e+00\n1.7714344075651233e+01\n-4.6688510851609720e+01\n4.9049690662445036e+00\n2.3061933229159255e+01\n-4.8455301193905953e+01\n-2.5971808284613287e+00\n3.3532014579963281e+01\n-3.9702455497287467e+01\n6.4747576005013876e+00\n3.7417351479476956e+01\n-4.3359228325532733e+01\n6.5284131508726855e+00\n3.8567685696062910e+01\n-4.4653420300731575e+01\n6.5429342120496310e+00\n3.7270226207406893e+01\n-4.3530986478258214e+01\n6.2317219511725677e+00\n3.7267532848778153e+01\n-4.3789261631621322e+01\n6.5465241554226754e+00\n3.8075915730335069e+01\n-4.5178489500951045e+01\n3.5331383038007779e+01\n7.7295059028645824e+01\n-8.9718829283790413e+01\n6.5543586255884119e+00\n3.3878717804916157e+01\n-4.4796727259193531e+01\n-3.2976143217787617e+00\n2.6490126547386382e+01\n-3.8811900569298757e+01\n1.1428511779543175e+01\n2.9393823210606843e+01\n-4.4387882115228102e+01\n7.9823791323338584e+00\n2.6865578700751332e+01\n-4.2070885741074299e+01\n4.6749723046198097e+00\n2.7044663827493341e+01\n-4.2320186612675343e+01\n1.1343412382985190e+00\n2.5079892360151209e+01\n-4.0879113244792926e+01\n1.0247420784785964e+01\n1.5264112347258216e+01\n-2.8728209472566256e+01\n-1.7239907995502715e-01\n2.4251117816818983e+01\n-3.9665155796910220e+01\n1.3055831877477452e+01\n1.5310962675138727e+01\n-2.8801375827213100e+01\n1.6104699211905207e+00\n2.4806912531269298e+01\n-4.1493941724887051e+01\n7.9989677302688005e+00\n8.5346281160137849e+00\n-2.0329814205396463e+01\n4.6746531324597616e+00\n2.6273703414202753e+01\n-4.3960059663137386e+01\n1.3551807473832195e+01\n1.4331458842511637e+01\n-2.8363749598713316e+01\n8.6782593614541987e+00\n8.1044229282960814e+00\n-2.0026432310612016e+01\n1.2514456707726293e+01\n1.6844525474814876e+01\n-3.1989482521109757e+01\n2.3741472879915229e+01\n3.1672986023221000e+01\n-5.2892177302734723e+01\n1.1232490954252302e+01\n2.7441262399563399e+01\n-4.6865778887173668e+01\n8.4330273472416373e+00\n8.5875620668132502e+00\n-2.1535014899139444e+01\n-8.4295980105923507e-01\n2.3048293134459364e+01\n-4.0848470057095327e+01\n1.3635557968320015e+01\n2.8209883749838884e+01\n-4.9108336308595881e+01\n1.3198047088532434e+01\n9.2430689797978456e+00\n-2.3101963689495140e+01\n-9.6433180187670420e+00\n1.9613518822095735e+01\n-3.5258418637770227e+01\n1.0718823132611455e+01\n2.6214566572218335e+01\n-4.6365325851531402e+01\n1.2885562859038600e+01\n1.6222429983960261e+01\n-3.2852203505528834e+01\n1.0808229094248242e+01\n2.7005522925546362e+01\n-4.7442931823251513e+01\n-9.3557666424313144e+00\n1.9528888092921346e+01\n-3.5604758157175581e+01\n1.3055917259060916e+01\n1.5158252257267254e+01\n-3.1718180269294987e+01\n1.2691055454361470e+01\n9.7562217170358387e+00\n-2.4413950424557353e+01\n1.2356285550841957e+01\n2.7177433886003492e+01\n-4.8802004060986278e+01\n7.7163244392412285e+00\n2.4757162781504686e+01\n-4.5188280551788964e+01\n-4.2434130901760012e+00\n2.1460292026312754e+01\n-3.9474621154317752e+01\n1.4037099459228758e+01\n1.3865074412044223e+01\n-3.0818876480334616e+01\n1.4037099459228758e+01\n1.3865074412044223e+01\n-3.0818876480334616e+01\n1.1173087941550119e+00\n2.3143962945811250e+01\n-4.3166538044787643e+01\n1.2273736988210961e+01\n9.9696492031847139e+00\n-2.5560768752477149e+01\n1.2286989056980589e+01\n9.3832785081511449e+00\n-2.4451878690635965e+01\n9.2739749210729272e+00\n2.5320380112187667e+01\n-4.7291325447526717e+01\n1.2526520938707373e+01\n1.4485432127770098e+01\n-3.2143947141454611e+01\n1.2613423473935981e+01\n8.4390551406770680e+00\n-2.3815804309918637e+01\n-8.6600709476331641e+00\n1.8958275415304389e+01\n-3.6931120255441655e+01\n7.2210429493363248e+00\n2.4180384318239909e+01\n-4.6628546042324004e+01\n9.2969669839275344e+00\n2.4653342123401700e+01\n-4.7692826492398098e+01\n8.0124165757495227e+00\n2.4083773713143131e+01\n-4.7071765435586777e+01\n1.3585730937720959e+01\n1.3296095629319206e+01\n-3.1915240191367353e+01\n-7.1782697346719031e+00\n1.9356846791808149e+01\n-3.9362605950049577e+01\n-7.3178451760050942e+00\n1.9062651896568894e+01\n-3.8308321167561090e+01\n1.6303775597092571e+01\n2.6149178736294697e+01\n-5.2667334095824600e+01\n1.1996662852845441e+01\n7.3969613605532940e+00\n-2.3720500265104707e+01\n-4.3413484260742878e+00\n1.9927853380164880e+01\n-4.0997727770091906e+01\n9.2496774737129854e+00\n4.6615266318198891e+00\n-1.9529802923859098e+01\n5.8155248940075595e+00\n2.2478160477627153e+01\n-4.6759446488549621e+01\n1.3630710551669987e+01\n1.1015991899301346e+01\n-3.0272672891288742e+01\n1.2270411319744843e+01\n5.9070637361654335e+00\n-2.2360282664770594e+01\n2.5326956852472602e+00\n2.2088223531289273e+01\n-4.6219034939229523e+01\n-3.2915292704158277e+00\n1.9726411184823846e+01\n-4.2251678390492913e+01\n1.1568267938138222e+01\n1.0264905415554082e+01\n-2.9134864469852083e+01\n2.5490909043813442e+01\n2.9390695608398165e+01\n-6.1816088023918105e+01\n1.7983076944466937e+01\n2.5688179653813496e+01\n-5.5385636252224181e+01\n1.1329944266884453e+01\n2.3079952468721817e+01\n-5.0559513137338001e+01\n1.2967443849557105e+01\n6.7144649704094261e+00\n-2.4809191436016746e+01\n4.3308297650128118e+00\n2.1630365027185000e+01\n-4.7748427716213918e+01\n1.2673251282837247e+01\n6.9515201744412582e+00\n-2.5233670189469020e+01\n9.1445856950464179e+00\n5.2721840990382995e+00\n-2.1736652374917142e+01\n1.1499012514410229e+01\n8.7457718095837205e+00\n-2.8142575457301259e+01\n1.3365092790806825e+01\n1.2826759240183938e+01\n-3.5310729733559448e+01\n1.2149532951997365e+01\n2.3241638390267401e+01\n-5.2743773574112268e+01\n1.3229503718076890e+01\n6.0926367961877084e+00\n-2.4860982280833543e+01\n1.2009817227851000e+01\n7.0338451148434791e+00\n-2.6768405067017252e+01\n1.2879313581614063e+01\n1.0497090390319432e+01\n-3.3642340173416059e+01\n1.3477675502091593e+01\n1.0571613414407835e+01\n-3.3991316303730613e+01\n1.3422530052713871e+01\n4.8448628103070002e+00\n-2.4728706729477725e+01\n1.4130002519158985e+01\n1.0031378531679175e+01\n-3.4775177955702588e+01\n1.2671328037293938e+01\n1.0548562387662981e+01\n-3.5512183975967240e+01\n1.2368802435513121e+01\n1.0386159663310737e+01\n-3.5087155110235813e+01\n1.2675294028293870e+01\n5.7788268070898656e+00\n-2.7043751758689563e+01\n1.2190157436385160e+01\n2.1154886890682150e+01\n-5.4793116272357764e+01\n1.2334188685248321e+01\n6.1935214105180698e+00\n-2.8331832342270378e+01\n7.4710936093682498e+00\n1.9889576934958878e+01\n-5.2439648500243614e+01\n1.2484749733411435e+01\n7.6470045781766203e+00\n-3.1269554373567328e+01\n-2.7703444976613132e+00\n1.7456025001041947e+01\n-4.6153294652624012e+01\n1.3324193497230059e+01\n1.0047579284036489e+01\n-3.6337673052111917e+01\n1.2742985045379410e+01\n5.3420709024743767e+00\n-2.7376678591507620e+01\n1.2710278298050978e+01\n5.4136773819101984e+00\n-2.7467934383968558e+01\n1.3797828806199467e+01\n9.0407935972979416e+00\n-3.4794499627263257e+01\n1.2607416373532494e+01\n5.4338695820483309e+00\n-2.7789987385099103e+01\n1.2615371526709469e+01\n5.4523255525823719e+00\n-2.7908183425774705e+01\n1.3659141956451757e+01\n4.0803199581419554e+00\n-2.5558186522866979e+01\n1.3378146337233229e+01\n4.1387494989232332e+00\n-2.6200572275525161e+01\n1.0047896700613649e+01\n1.9420166603380775e+01\n-5.4727012383969466e+01\n1.4087483472245125e+01\n3.0738917189400716e+00\n-2.4721344175448042e+01\n9.1855762558040723e+00\n1.9307568228420394e+01\n-5.5371958641934377e+01\n1.4566791266573295e+01\n8.2237754272809660e+00\n-3.5342146229593588e+01\n1.3988839603353854e+01\n2.8433600131842294e+00\n-2.5078958247693368e+01\n2.7658725847045523e-02\n1.6594547092710215e+01\n-4.8770938340269154e+01\n1.4192442363257388e+01\n2.5432415902371099e+00\n-2.4895284779649014e+01\n1.3612629177941212e+01\n1.8242953322858595e+00\n-2.3272167352749168e+01\n1.3444698273615849e+01\n2.2909875675710878e+00\n-2.3998107237740864e+01\n1.2798072346193711e+01\n4.5453125973051742e+00\n-2.8497514377311948e+01\n1.2751908830710843e+01\n4.5271898023441093e+00\n-2.8551001386257294e+01\n1.3989526386402883e+01\n2.6929321073211363e+00\n-2.5314581643887649e+01\n1.2644320759212464e+01\n3.8826430530719893e+00\n-2.7390378690329815e+01\n1.3190308273667791e+01\n2.6841240508107438e+00\n-2.5501349958907262e+01\n1.2939986968638735e+01\n4.1903246938845990e+00\n-2.9094654912140022e+01\n1.3966376675666920e+01\n2.2393717976655170e+00\n-2.5646132496557502e+01\n1.3657220043843019e+01\n2.8542244246791060e+00\n-2.6750426814010503e+01\n1.3660724366781476e+01\n2.7939136650617646e+00\n-2.6717199826266995e+01\n1.3284989149562087e+01\n3.2336099354794086e+00\n-2.7702245172367263e+01\n2.7373346638394075e-01\n1.5801866874348887e+01\n-5.0044544963692225e+01\n2.7373346638394075e-01\n1.5801866874348887e+01\n-5.0044544963692225e+01\n1.4312016184562538e+01\n9.7530683660945375e-02\n-2.1754707899607794e+01\n1.3616787730124701e+01\n1.2747306779738432e+00\n-2.4471538087017780e+01\n4.1722710315586875e+00\n1.6442896499663853e+01\n-5.3699950262980543e+01\n8.4047821251676758e-01\n1.5553664688165847e+01\n-5.0900940826315455e+01\n1.3919544690414360e+01\n1.9018782411763386e+00\n-2.6055321081256835e+01\n1.3282347385675980e+01\n3.0026186159419126e+00\n-2.8164828639164227e+01\n1.3302944182259459e+01\n3.0258915553535024e+00\n-2.8195866230619455e+01\n1.3448272029864427e+01\n2.2565470310617268e+00\n-2.6697845196386258e+01\n1.4481610370300947e+01\n-3.4487805837916419e-01\n-2.1571682260884170e+01\n3.0163938821944272e+00\n1.5931966026582453e+01\n-5.3484246401414907e+01\n1.3785956092318701e+01\n2.3224654144838701e+00\n-2.7816183114586590e+01\n-2.4673086773183778e-01\n1.9648712503822490e+00\n-2.1589853962662954e+01\n-4.4922559019121694e-01\n2.2857251431440115e+00\n-2.2250632539995827e+01\n1.3854753504368729e+01\n1.7870838604595272e+00\n-2.6979185146546101e+01\n1.3328953062862288e+01\n2.0777357391494804e+00\n-2.7338496991676912e+01\n1.4132604545687849e+01\n1.2946380409261338e+00\n-2.6370813826326408e+01\n1.4543455956690003e+01\n-6.7832669084518415e-01\n-2.1760707482668284e+01\n1.4180687694482167e+01\n1.1292172772387705e+00\n-2.5855769742143845e+01\n1.4214346060192643e+01\n1.3030139019234970e+00\n-2.6442672397089478e+01\n3.5422689308349831e-01\n1.2863791139487195e+00\n-2.0812548902750191e+01\n1.4114423639922387e+01\n1.3894046707109751e+00\n-2.6714535481395441e+01\n1.3660995895409721e+01\n1.2898812829587061e+00\n-2.6354955958890343e+01\n1.7528127243445197e+00\n6.9138871226875931e-01\n-2.0328272411984408e+01\n1.3907606767882214e+01\n1.5883087943842873e+00\n-2.7492822988679343e+01\n3.1433531013603915e+00\n4.8085036707500445e-01\n-2.0575085904625499e+01\n1.4683129287992406e+01\n-1.1236008832890161e+00\n-2.1586302023940306e+01\n1.4482836259370409e+01\n7.2887760704614946e-01\n-2.6286123848931190e+01\n-1.0833382769991660e+01\n-6.1230824372087678e-01\n-1.2060457668725661e+01\n1.3882877931260587e+01\n1.4379817616573081e+00\n-2.7798417361700661e+01\n-1.6433853416497315e+00\n2.2821178932090378e+00\n-2.2982633872967590e+01\n-1.1535541240884073e+00\n1.7935831983747894e+00\n-2.2269412604329336e+01\n1.3587827642621496e+01\n1.0468430286727037e+00\n-2.6995986999068236e+01\n1.3883696767509418e+01\n3.0668203944088995e-01\n-2.5651729471024407e+01\n1.3546301930923773e+01\n1.1618754389693813e+00\n-2.7536700675079693e+01\n1.9290155973331558e+00\n1.3032360523207759e-01\n-2.0258954790248794e+01\n1.3890813785947209e+01\n1.1689490571979859e+00\n-2.8311133129386448e+01\n-1.5131677087192104e+00\n3.6603273894650825e+00\n-2.7216715170323930e+01\n1.3988071916407856e+01\n-1.6412957432225397e+00\n-2.1397995144278312e+01\n1.3955696238089967e+01\n1.1634808164358852e+00\n-2.8595335379068029e+01\n-1.6363336580791448e+00\n1.8147006838160176e+00\n-2.2669527737043865e+01\n3.0008509945599737e+00\n-1.7897174649439121e-01\n-2.0253120438456019e+01\n1.4106134244928349e+01\n6.8291787606173693e-01\n-2.7806281783196376e+01\n1.3997911927556611e+01\n4.5408560528030978e-01\n-2.7241670052967802e+01\n1.3669541893680687e+01\n2.5084658359166284e-01\n-2.6571552516967493e+01\n1.3579711763083280e+01\n8.1437550029593420e-01\n-2.8010237905071531e+01\n1.4189921032705275e+01\n2.5739117460530803e-01\n-2.7728349958541390e+01\n-1.9627619671546641e+00\n1.9588064973785673e+00\n-2.4128486963906234e+01\n1.4461111350920877e+01\n-4.8378656831888717e-02\n-2.7328840704415530e+01\n1.4473941480852666e+01\n-6.1987108899934376e-02\n-2.7215629813770281e+01\n-1.6492557430460779e+00\n1.2819354475863489e+00\n-2.2807309365796286e+01\n4.7595284344810107e+00\n-6.1004925432095491e-01\n-2.1138636803885436e+01\n1.3939360169926671e+01\n1.3343479051313564e-01\n-2.7829768324377767e+01\n1.4277455880748695e+01\n6.9274518367786878e-02\n-2.8071874127364573e+01\n-1.0163606503759801e+00\n6.3401389282630150e-01\n-2.1828235346455727e+01\n-2.4587973276882682e+00\n2.1090985795330037e+00\n-2.5070817406276305e+01\n1.4088198842137142e+01\n-4.0061084215470055e-02\n-2.8411738749641060e+01\n1.1612537997802121e+00\n-6.0072438341061329e-01\n-2.0404791558443637e+01\n-1.9438096072523586e-01\n-1.4891342869983440e-01\n-2.0921863711286800e+01\n5.7400733829085393e+00\n-1.2409512874692863e+00\n-2.1097485767345795e+01\n-2.0328300249320175e+00\n1.1318178673216752e+00\n-2.3336335273342886e+01\n2.7169803056194088e+00\n-9.1894473427317980e-01\n-2.0561053940278093e+01\n-1.6081821187864349e+00\n6.3153917073257571e-01\n-2.2633010606591391e+01\n1.4354079787001098e+01\n-8.2257152427256441e-01\n-2.7942723027667405e+01\n1.4843089844702460e+01\n-1.2654466681654770e+00\n-2.7036497703778760e+01\n5.1553842855571705e+00\n-1.5479278723136207e+00\n-2.0753689143449009e+01\n5.3189101861290871e+00\n-1.6854062755777972e+00\n-2.0483839559400248e+01\n5.1646595144445506e-01\n-8.7056121514010365e-01\n-2.0676271521281713e+01\n-5.5981940875040737e-01\n-4.6973436336811386e-01\n-2.1218702822282264e+01\n1.5093249144964895e+01\n-1.8927814300808661e+00\n-2.7016821017792232e+01\n1.3988961521856076e+01\n-6.9337486614062560e-01\n-2.9589301392228929e+01\n1.4619034984807963e-01\n-8.8521355459606210e-01\n-2.0918638941284986e+01\n-1.0789877374127624e+01\n-1.5578727907909968e+00\n-1.2413662855101967e+01\n-1.3543317040416334e+00\n-6.7898009921215130e-01\n-2.1511436802810458e+01\n3.8790503332144826e+00\n-2.1856701323275662e+00\n-2.0321649335766992e+01\n-9.2715157082375210e-01\n-1.1442665433473129e+00\n-2.0860565009644294e+01\n1.4466871268316769e+01\n-2.1381769750361865e+00\n-2.8655143633183698e+01\n1.4172964634150286e+01\n-2.0782774401498179e+00\n-2.8409461448006141e+01\n-1.3956569423682490e+00\n-1.0075659815006865e+00\n-2.1293236808795612e+01\n-1.8475850840463006e+00\n-8.0059030667388065e-01\n-2.1759808582625055e+01\n2.0758099605653428e+00\n-2.1704221991889661e+00\n-2.0309931108806179e+01\n-1.0980582176781652e+01\n-1.6775418801882109e+00\n-1.2535220646822040e+01\n1.5249706455366768e+01\n-3.8414418466928324e+00\n-2.4237080145479908e+01\n-4.0635637673931786e+00\n9.0043339587626914e-01\n-2.5850387459900464e+01\n3.2471338519938170e-01\n-1.8266713793218601e+00\n-2.0399513660116583e+01\n-7.4985898005995411e-01\n-1.5266974259263091e+00\n-2.0819379286551623e+01\n1.4865821187816497e+00\n-2.1606121548626280e+00\n-2.0356794276552286e+01\n-3.3073509024859136e+00\n-3.6899775265800061e-01\n-2.2915152307287126e+01\n4.1326852198169145e-01\n-2.0447839366899321e+00\n-2.0462156843416999e+01\n4.8822902509725891e-01\n-2.0731003567856705e+00\n-2.0430568772015128e+01\n-5.9587348355294578e+00\n5.2681123232672391e+00\n-3.9421371008348707e+01\n2.7864807037622528e-02\n-1.9826020698796993e+00\n-2.0587745891918019e+01\n2.1957998063449962e+00\n-2.7088649618123370e+00\n-1.9561293807686642e+01\n-3.0618558284292323e+00\n-7.8330752439814366e-01\n-2.2393651756660418e+01\n1.4907480093002798e+01\n-3.8954447427680727e+00\n-2.5890191825669866e+01\n-3.6915761413253296e+00\n-4.2357455081257728e-01\n-2.3398026829825529e+01\n-2.8542832621080381e+00\n-1.3100998150841665e+00\n-2.1614282242122208e+01\n8.6469619504004591e-01\n-2.6248369060005134e+00\n-1.9743401774772050e+01\n-2.8000944342568324e+00\n-1.3123739371989138e+00\n-2.1625149084923663e+01\n-2.7975496853837680e+00\n-1.3563081725758861e+00\n-2.1568996614074589e+01\n-2.7766356718698950e+00\n-1.3864526210865922e+00\n-2.1566954836254567e+01\n2.8132650004390229e+00\n-3.2023411890787221e+00\n-1.9849027214388066e+01\n-8.8684534097193501e-01\n-2.2095642251305145e+00\n-2.0529549388879690e+01\n-1.1469570963551445e+00\n-2.3360722212899074e+00\n-2.0331149481144347e+01\n-1.0848424273021191e+00\n-2.4670108549612335e+00\n-2.0240625180421400e+01\n-3.4912144849101812e-01\n-2.8917325578654824e+00\n-2.0329022974212840e+01\n-3.9172331283572417e+00\n-1.0664208566077340e+00\n-2.3929395975098132e+01\n-8.0262913482716147e-01\n-2.7999577941073266e+00\n-2.0479284423989480e+01\n-6.8270199481829392e+00\n2.7180447829857486e+00\n-3.5500277231926376e+01\n1.1441911942724749e+01\n-4.6090543472896419e+00\n-2.5455055670772868e+01\n1.6156437451417263e+00\n-3.6391708271385039e+00\n-2.0269774153490239e+01\n2.9866075318562588e+00\n-3.9221157566286409e+00\n-2.0643941353686902e+01\n-7.2446928182411714e+00\n2.3095865981919936e+00\n-3.4931587439227791e+01\n-6.8268261578148062e+00\n2.0741098106855853e+00\n-3.4639986259166825e+01\n2.8492672366480796e+00\n-3.9734825970319405e+00\n-2.0723897250382244e+01\n-4.0441682358598801e+00\n-1.8509784056979546e+00\n-2.2075452286165575e+01\n-1.8577449340879835e+00\n-2.6848202863761674e+00\n-2.1511642913667611e+01\n-1.6474185360264668e-01\n-3.5052146329519700e+00\n-2.0598319579787599e+01\n-3.7786753705692266e-01\n-3.4381708044135695e+00\n-2.0698389344711060e+01\n2.2164067767987623e+00\n-4.2470745836313615e+00\n-2.0648244474765335e+01\n9.8906035893812652e-02\n-3.7996596911882894e+00\n-2.0813170032766376e+01\n-1.7637018610108304e+00\n-3.2474112753884783e+00\n-2.1889547047432927e+01\n-2.3701467090977610e+00\n-3.0437985093665900e+00\n-2.2364142159851237e+01\n-2.3299845220341369e+00\n-3.1052558999901310e+00\n-2.2354791352350581e+01\n4.0753371227198920e-01\n-4.1865016884623767e+00\n-2.0990747361286299e+01\n-2.4582125215438309e+00\n-3.2766935842353782e+00\n-2.2682027278987110e+01\n1.7434204821233110e-01\n-4.2713337050527977e+00\n-2.1263227175570368e+01\n-4.7176765610446758e-01\n7.6108916382406889e+01\n-7.8621239874981626e+01\n6.7389838169330361e+00\n3.8040377186057306e+01\n-4.3840775090827670e+01\n6.2378171985144153e+00\n3.7469954121091739e+01\n-4.3646970177844430e+01\n-2.7485321107647449e+00\n3.2541388424519077e+01\n-4.0067411592661188e+01\n6.8073671825326247e+00\n3.7399942697189843e+01\n-4.5228384519402496e+01\n-1.6852694626869451e+00\n3.2446673047297324e+01\n-4.0940689937324208e+01\n-2.7381508128378820e+00\n3.2273211363339030e+01\n-4.1054821974263241e+01\n2.2967344273163457e+00\n3.1143064475364298e+01\n-3.9867802922966717e+01\n6.3674041631827993e+00\n3.5659009147798429e+01\n-4.5333548614043806e+01\n-2.4874407610001379e+00\n3.1550218624971112e+01\n-4.0928479014955414e+01\n3.3699210156559019e+01\n7.8582332608366301e+01\n-9.1750596726634441e+01\n-7.7888600267469232e-01\n3.0382211482278059e+01\n-4.0353998483693182e+01\n8.7162585460497577e-01\n3.0694360175665476e+01\n-4.0765439566073894e+01\n-7.7590296360710453e-01\n2.9738356844501290e+01\n-4.0236858309776323e+01\n-3.5985877417679896e-01\n2.7947697171722137e+01\n-3.9177246828488641e+01\n-2.5857236525157788e-02\n2.8107130025275399e+01\n-3.9341314483843014e+01\n5.9194999333041425e+00\n3.0452028596229898e+01\n-4.1897150998916594e+01\n-7.6805945606211201e-01\n2.8301273156980972e+01\n-3.9483771087267975e+01\n5.1060192432364107e-02\n2.6944504372863005e+01\n-3.8812547669438793e+01\n2.4611220855974731e+00\n2.6129793972078044e+01\n-3.9143312998802294e+01\n4.9736113515787883e+00\n2.7010043533843582e+01\n-4.0458657476915960e+01\n6.2238910181543687e+00\n2.6766270898513330e+01\n-4.0797162040082625e+01\n2.8787757951193127e+00\n2.6029676035967899e+01\n-4.0267155834045305e+01\n7.8266775810554656e-01\n2.5215414606645780e+01\n-4.0114309865323108e+01\n1.4074661930011265e+01\n2.9670464613880878e+01\n-4.7416834980393354e+01\n1.0828337739627221e+01\n2.7639009089869791e+01\n-4.4540320838921737e+01\n1.2268236049409007e+01\n1.6670748840649566e+01\n-3.0255142224307942e+01\n-6.0830299299205652e+00\n2.1928373934725784e+01\n-3.6692257535554170e+01\n7.9923088697268794e+00\n9.0807675719200667e+00\n-2.0744426318514979e+01\n-7.0983361704787269e+00\n2.1637107842416416e+01\n-3.6508609067371964e+01\n1.3252729405738688e+01\n1.5148964465855506e+01\n-2.9138272129896208e+01\n1.3222394166301671e+01\n1.5006285703256232e+01\n-2.9040788741981014e+01\n8.5182673004422327e+00\n8.7815692805078811e+00\n-2.0783682168373506e+01\n6.7077806148891055e+00\n2.6034552313934512e+01\n-4.3421990714739820e+01\n-7.8305765650062895e+00\n2.1196076277819564e+01\n-3.6239660780325906e+01\n7.3219927860856222e+00\n2.7872530679919286e+01\n-4.6102078243678875e+01\n1.4545207194047650e+01\n2.9456476069565920e+01\n-4.8867784318157135e+01\n1.6890895007036335e+01\n3.0036755640523971e+01\n-4.9992018509794931e+01\n6.1451274358828059e+00\n2.6310666133109113e+01\n-4.4162609781687721e+01\n1.0050233995040630e+01\n2.6859862895155764e+01\n-4.5305385286847120e+01\n-3.0589640218316729e+00\n2.2392056564151225e+01\n-3.8499217024712529e+01\n1.0279215879970465e+01\n2.5885838175170406e+01\n-4.5325617487800670e+01\n1.1586525952956114e+01\n2.6602626949650272e+01\n-4.6658112668645643e+01\n9.0021135602063591e+00\n2.5926828679295404e+01\n-4.5618243248541255e+01\n1.2206182315129166e+01\n1.6065042840748145e+01\n-3.2230514531168602e+01\n5.3795655520116377e+00\n2.5196385058023530e+01\n-4.4466481271602866e+01\n1.2240366863603830e+01\n9.7346014766114273e+00\n-2.3622960968497324e+01\n4.0007510241897837e+00\n2.4868465295815319e+01\n-4.4168715652612669e+01\n3.8349429427100477e+00\n2.4396889131504082e+01\n-4.3589783222741815e+01\n1.1640836358361147e+01\n2.6175272103034949e+01\n-4.6872787135642902e+01\n1.4848555837491229e+01\n2.7115264350099377e+01\n-4.8812267161853825e+01\n1.2657449535704329e+01\n2.7305050040258998e+01\n-4.9474879873554272e+01\n-3.3026393199716488e+00\n2.1540427309326148e+01\n-4.0128588878288433e+01\n-2.0437400635116254e+00\n2.1847657345269752e+01\n-4.0904165607241140e+01\n6.4391035759756150e+00\n2.4658222893307489e+01\n-4.6556772008944812e+01\n5.0307515779110927e+00\n2.3016502786648672e+01\n-4.3638966051981960e+01\n-2.2175385807932284e+00\n2.1410655439941209e+01\n-4.1704481482657187e+01\n1.0985603696822924e+01\n1.0492303245097709e+01\n-2.7079017545636674e+01\n-7.2559176413820738e+00\n1.9338271747057224e+01\n-3.8118467587139250e+01\n-2.2526669380038888e+00\n2.1187554967317226e+01\n-4.1728108827862073e+01\n-8.3518916940684491e+00\n1.8848088012806663e+01\n-3.7698866335184249e+01\n-3.3869187240171228e+00\n2.0606725032287272e+01\n-4.1017537698696273e+01\n1.2187861601455889e+01\n9.6960294999428527e+00\n-2.6896451633970184e+01\n-4.6239835626365160e+00\n1.9881382336578049e+01\n-4.0428594209778254e+01\n-3.2868925088001930e+00\n2.0193284914706023e+01\n-4.1430746052029598e+01\n1.1412134005402420e+01\n1.3144816452040114e+01\n-3.3686108091541087e+01\n1.3619072920973101e+01\n2.3780945703851405e+01\n-5.1129476946404459e+01\n1.4444453812852128e+01\n1.1150285223778825e+01\n-3.2029573987074230e+01\n9.3889471394142987e+00\n2.2142379048817144e+01\n-5.0049207868328558e+01\n1.2055716874303741e+01\n5.1486024392322927e+00\n-2.2389850547575190e+01\n1.2055716874303741e+01\n5.1486024392322927e+00\n-2.2389850547575190e+01\n9.9603506247454181e+00\n2.2847780091628668e+01\n-5.1713928000522962e+01\n1.4180307026934553e+00\n1.9917560198084139e+01\n-4.6149236431057020e+01\n1.2289448393563918e+01\n9.1681875808312192e+00\n-3.1878168418817570e+01\n1.2289448393563918e+01\n9.1681875808312192e+00\n-3.1878168418817570e+01\n1.2289448393563918e+01\n9.1681875808312192e+00\n-3.1878168418817570e+01\n1.3271754129486864e+01\n4.5082764928478465e+00\n-2.4338334619874683e+01\n1.3642334038061501e+01\n2.2029654443218366e+01\n-5.5869112716628429e+01\n1.8132648972749205e+01\n2.0870952732817926e+01\n-5.6088754642916463e+01\n1.8827895187756528e+01\n2.1127502874073262e+01\n-5.7866721760981221e+01\n1.8827895187756528e+01\n2.1127502874073262e+01\n-5.7866721760981221e+01\n-5.4600562793157641e+00\n1.6367057794853935e+01\n-4.3053405309784999e+01\n1.3351308316878239e+01\n2.9997885270339104e+00\n-2.3773313793739021e+01\n1.4335209268568336e+01\n2.4249613733052340e+00\n-2.4234838875725352e+01\n1.2609926224220350e+01\n4.5160187000875922e+00\n-2.7622941206025921e+01\n2.6639124628228115e+00\n2.0691890608830366e+00\n-2.1012603722291935e+01\n2.3186395338457673e+00\n1.8291253294396632e+00\n-2.0634431942231011e+01\n-2.4023848163655818e-02\n2.8483636842070754e+00\n-2.2279740390494215e+01\n-2.5679014573540238e-01\n2.8497768038290423e+00\n-2.2291291981877770e+01\n-2.3628580823407977e-01\n1.6226069819852480e+01\n-5.0809867997921614e+01\n1.4924983971150674e+00\n1.8488683977669964e+00\n-2.0812334275671311e+01\n-5.3202584380917550e-01\n1.5837956859972333e+01\n-5.0000992528083856e+01\n8.6846331279421052e-01\n2.1940085050637013e+00\n-2.1389795378480297e+01\n1.9423669887499824e+00\n1.3758582026487960e+00\n-2.0502810547554070e+01\n1.3381921223642792e+01\n2.6356567217461855e+00\n-2.8034670168162418e+01\n1.3331912533963049e+01\n2.1215389586437952e+00\n-2.7081308654511293e+01\n1.4516438960647198e+01\n-5.9615643781192240e-01\n-2.1763512806764666e+01\n1.3835450481462894e+01\n1.0083174781037656e+00\n-2.5708505394877768e+01\n3.1103694442848604e+00\n7.3312292799443013e-01\n-2.0643716390770567e+01\n1.3810059670224927e+01\n6.1976349660882057e-01\n-2.5183573841137115e+01\n1.2956680411963021e+01\n2.7368277219520176e+00\n-3.0272552498177394e+01\n7.2091316130610877e-03\n7.0883050961333982e-01\n-2.0859854071682300e+01\n1.3806764168756507e+01\n4.5380486737662878e-01\n-2.6442107185498916e+01\n1.3986304223382390e+01\n2.4794998341366209e-01\n-2.6672998451647327e+01\n1.4889277499722640e+01\n-1.7793981562612604e+00\n-2.2004892882912852e+01\n-1.3616136848712801e+00\n1.3380604106016472e+00\n-2.2390867353126620e+01\n1.3991283673133664e+01\n-5.6313192078487007e-02\n-2.6222542236692462e+01\n-2.5589594640758850e-01\n4.5927476040486803e-01\n-2.0811126099319242e+01\n-9.4603336268723048e-01\n9.0767665561991828e-01\n-2.1769741634088543e+01\n7.4585656875058370e-01\n3.6052411254671200e-02\n-2.0437564397686568e+01\n1.4809215701979316e+01\n-1.3863175514045727e+00\n-2.4079920226184772e+01\n1.4809215701979316e+01\n-1.3863175514045727e+00\n-2.4079920226184772e+01\n1.0398988334524220e+00\n-8.3847815070593801e-02\n-2.0355131809897063e+01\n-7.9017919724761276e-01\n5.6943996581031497e-01\n-2.1457594204440415e+01\n-2.0790165948134534e+00\n2.3918079176794187e+00\n-2.5383546902333038e+01\n2.9679808257698106e+00\n-5.2179325344401428e-01\n-2.0285449006054879e+01\n1.3616957417067196e+01\n3.7535330077418261e-01\n-2.8424992973825528e+01\n1.5073034578460256e+01\n-2.0869745217837390e+00\n-2.3467081660894507e+01\n-2.0040246557080086e+00\n1.2606456134192439e+00\n-2.3337529710533730e+01\n-1.8748926078060884e+00\n1.0613461372575059e+00\n-2.3011204396895714e+01\n-1.9805628585326454e+00\n1.2010937615459358e+00\n-2.3238168847810837e+01\n1.4259026152382404e+01\n-3.8219755046865256e-01\n-2.8054879049152184e+01\n1.3776339551754988e+01\n-2.3663625278016184e-01\n-2.8406055210783400e+01\n-8.9592121266217184e-02\n-3.4742021661845579e-01\n-2.0870847202543903e+01\n-1.0628931904671450e+01\n-1.2944536847378274e+00\n-1.2230506708341759e+01\n1.2885280635539753e+00\n-9.6241619989683569e-01\n-2.0490473516095200e+01\n4.7825205523428478e+00\n-1.8709030530709965e+00\n-2.0344925235672576e+01\n2.4997232277842460e+00\n-1.4584445677785145e+00\n-2.0166222380757532e+01\n8.9275669736570540e-01\n-1.2014544261676190e+00\n-2.0634699524725193e+01\n-1.0739063335597299e+01\n-1.4949454960574884e+00\n-1.2388109111483667e+01\n-1.0794622054187668e+01\n-1.4975536108678889e+00\n-1.2387630797808828e+01\n-1.0824328086284613e+01\n-1.5053657382332852e+00\n-1.2398606819141365e+01\n-1.0997464143047832e+01\n-1.5162108521744555e+00\n-1.2419261230800727e+01\n4.5432836261293819e-01\n-1.4013594179858917e+00\n-2.0545750489817227e+01\n2.6659409451761089e+00\n-2.0986633917304083e+00\n-2.0469045190289812e+01\n-9.3880712258484122e-01\n-1.1875087713221377e+00\n-2.0890007213033531e+01\n-3.8106111645413745e+00\n2.3464163011262185e-01\n-2.3720623308119421e+01\n-5.7252728219443245e+00\n5.9026252431954056e+00\n-4.0182312968057332e+01\n2.9202836672939108e+00\n-2.6784036198249388e+00\n-1.9545116222345129e+01\n-2.9707118184164485e+00\n-2.9394901016234404e-01\n-2.3026592942480654e+01\n1.8723628323127015e-01\n-1.9110352829986377e+00\n-2.0500764532551404e+01\n-1.2694487721887395e+00\n-1.4353138313067006e+00\n-2.1372959605807132e+01\n-2.5706710581299612e+00\n-1.0222607790414211e+00\n-2.2064765731023176e+01\n-2.7743087754811055e+00\n-1.0248203978834358e+00\n-2.2012815721584118e+01\n1.4564094346157457e+00\n-2.7908248915372540e+00\n-1.9611062389631332e+01\n-1.6066045789878947e+00\n-1.6862272720548102e+00\n-2.1248021913851602e+01\n-3.3518712951098149e+00\n-8.6029786196726599e-01\n-2.2809012021028447e+01\n4.7713524578393840e-01\n-2.5884856321998475e+00\n-1.9970902969954974e+01\n2.3363948883551586e+00\n-3.1974468829315592e+00\n-1.9914968314314294e+01\n2.5046528672863805e-01\n-2.6310601443965735e+00\n-1.9929461394785747e+01\n2.4232748288501293e-01\n-2.7341020690897504e+00\n-1.9867804850339212e+01\n1.7138434539830683e+00\n-3.1818218593519449e+00\n-1.9964931323954161e+01\n1.6424900265987682e-01\n-3.0269605232965535e+00\n-2.0126947383644065e+01\n-9.1700469912054425e-02\n-3.0297328676589550e+00\n-2.0208294561774469e+01\n-3.1436221454539076e-01\n-3.1763894850959344e+00\n-2.0422616581439119e+01\n-8.0483107482838856e-01\n-3.0695668863922698e+00\n-2.0641057272862206e+01\n-2.7085691905958681e-01\n-3.4064675123378696e+00\n-2.0826295659355509e+01\n-7.0088015247213176e-01\n-3.3097526961084305e+00\n-2.0970236082673136e+01\n-7.0088014994601522e-01\n-3.3097526960262580e+00\n-2.0970236087480760e+01\n7.5006323807830355e-01\n-3.9769080797691778e+00\n-2.0499182686046257e+01\n-6.4281772132520087e+00\n6.2455848810255510e-01\n-3.2621658149066377e+01\n-7.8292470827691094e+00\n-5.7069952061722884e-01\n-2.5910375214919299e+01\n-2.9275693309759843e-01\n-3.9071914584917540e+00\n-2.1241379975156040e+01\n-5.4985279374937945e-01\n-3.9230488847030420e+00\n-2.1493263615073982e+01\n6.7226153138728595e-01\n-4.5009486697582233e+00\n-2.1215335150987897e+01\n-8.3308948480141307e+00\n-1.2050769634971812e+00\n-2.5414299673477714e+01\n-1.2385146386673349e-01\n7.6804715375547815e+01\n-8.2231775182473370e+01\n-2.5882407954954365e+00\n3.4724907718128556e+01\n-4.0742954309924428e+01\n6.2526888225730159e+00\n3.7716346610337915e+01\n-4.3569896045264358e+01\n6.6492858999099189e+00\n3.7850503631463646e+01\n-4.4864957808120934e+01\n6.6737877829660199e+00\n3.6113812377279984e+01\n-4.5409006389107383e+01\n7.5680533137278765e+00\n3.2062200908267371e+01\n-4.4114339136432704e+01\n-9.2619563042583064e-01\n2.8487333379045413e+01\n-4.0076294893260318e+01\n3.0608308075707826e-02\n2.7729868562745107e+01\n-3.9519244154879509e+01\n-8.2550703812132173e+00\n2.4034897965574178e+01\n-3.5513389493130944e+01\n6.5724647768998323e-01\n2.6381039392839778e+01\n-3.9098969279584963e+01\n-8.4848799883774184e+00\n2.3909984396007953e+01\n-3.5668502111770913e+01\n4.1808472609267788e+00\n2.6824782961875517e+01\n-4.0071980573362914e+01\n4.5993213592294415e+00\n2.7489672948272929e+01\n-4.1296179080990733e+01\n1.1221343557230814e+01\n2.9672677347949218e+01\n-4.4949121431854394e+01\n9.5801930219609410e+00\n2.8527118072486715e+01\n-4.3800939221062777e+01\n1.7730047290612919e+01\n3.1291696972765916e+01\n-4.9106545822802936e+01\n1.1693279171601269e+01\n2.7942932735024407e+01\n-4.4878873400090328e+01\n2.0260302255191259e+01\n3.0583693826970155e+01\n-4.9229320357269991e+01\n-7.7812485838019354e+00\n2.1163166860140247e+01\n-3.5448982114568189e+01\n5.3616903266359923e+00\n2.7236966881867591e+01\n-4.4573242754789874e+01\n6.2366567836329638e+00\n2.6033272897874475e+01\n-4.3713472097504095e+01\n1.1737309266292346e+01\n1.0930687936667773e+01\n-2.3746994430745591e+01\n7.8817222960405893e+00\n7.0248439301029375e+00\n-1.8732738977672010e+01\n-1.0386291652109891e+01\n1.9521102466302757e+01\n-3.4401110674651846e+01\n5.1538410307254656e+00\n2.5272903949721663e+01\n-4.4138290528390257e+01\n-5.3433440818943287e+00\n2.1317230090077867e+01\n-3.8225775236458517e+01\n1.7834069877403511e+01\n2.8986491298677475e+01\n-5.0874547333687111e+01\n4.0551998218760925e+00\n2.4652539839228726e+01\n-4.3752587085241437e+01\n1.1706513653528232e+01\n2.7392344535030279e+01\n-4.8443784354589994e+01\n-7.8477298120162475e-01\n2.2874844436727784e+01\n-4.1352821224526132e+01\n1.3554919365637735e+01\n1.3917998386576956e+01\n-3.0570534767725633e+01\n1.3333667277928535e+01\n1.4736444630652409e+01\n-3.2104532908534907e+01\n1.8036927070228415e+01\n2.8127765495993387e+01\n-5.1930443851515392e+01\n1.5966980269590460e+01\n2.7775405284054287e+01\n-5.1383721540825746e+01\n4.2612985116505859e+00\n2.4016992378465957e+01\n-4.5340220546928080e+01\n-9.0626501913989941e+00\n1.8930155776353843e+01\n-3.6567520448653745e+01\n1.2512713441506419e+01\n2.6654903807775753e+01\n-5.0877657585213029e+01\n1.5918821374318098e+01\n2.6231873958232182e+01\n-5.1150236511163548e+01\n1.3492552991321126e+01\n1.3751495538733570e+01\n-3.2300968798893315e+01\n1.3583216324719659e+01\n1.3713884857208715e+01\n-3.2748426110826180e+01\n1.4757027687704769e+01\n2.5337169602780548e+01\n-5.0086689749324940e+01\n6.7429525473171354e+00\n2.3129593868936691e+01\n-4.6458888988848045e+01\n1.2242404461666789e+01\n6.8864762485927731e+00\n-2.2578408670851527e+01\n-4.3235461802407249e+00\n1.9996391648353224e+01\n-4.0785133574792070e+01\n-2.7376836306525014e+00\n2.0556724613236220e+01\n-4.1905475510549465e+01\n1.1677170738790061e+01\n2.4051491661182940e+01\n-4.9705264621481419e+01\n1.1614915075318700e+01\n1.3047985542490883e+01\n-3.3286657728880584e+01\n1.3120485252746951e+01\n2.4055728841086388e+01\n-5.1044497538317678e+01\n1.5394188230972901e+01\n2.4487420255621654e+01\n-5.1983132459534055e+01\n2.5920762161298776e+00\n2.1407370227182145e+01\n-4.5837008718663675e+01\n1.6535546293730100e+01\n2.6297734107477048e+01\n-5.5915104667249715e+01\n1.3151753770049774e+01\n6.0505735145291064e+00\n-2.3294124991023175e+01\n2.4844463158215756e+01\n2.8531446265969290e+01\n-6.0924142605683720e+01\n1.1221152061786922e+01\n2.3912482453880202e+01\n-5.1558502314938572e+01\n8.5984234686374741e+00\n3.8842382614105029e+00\n-1.9035680409110391e+01\n1.8183120958780151e+01\n2.6593645188131209e+01\n-5.8148529511831093e+01\n2.3439850365902803e+01\n2.7554046906666784e+01\n-6.1256952818652174e+01\n1.6828189713454016e+01\n2.3426762855657177e+01\n-5.3620179583356624e+01\n7.4280338914609603e+00\n2.3147923982199604e+01\n-5.1938253292081541e+01\n7.4280338914609603e+00\n2.3147923982199604e+01\n-5.1938253292081541e+01\n1.2907678493448774e+01\n9.1417093586502247e+00\n-3.1346654820904416e+01\n1.3899217267269909e+01\n9.4081071537372640e+00\n-3.2246957158287650e+01\n-6.8063827928098632e+00\n1.6774561987520428e+01\n-4.0858517160214639e+01\n4.7679588023415045e+00\n1.9386180112763345e+01\n-4.8712111628414462e+01\n8.7791977106742518e+00\n2.1783548994365212e+01\n-5.5465617521452351e+01\n1.1302412778058054e+01\n6.4640007232178736e+00\n-2.8500240871944101e+01\n1.4013727156250075e+01\n8.5602168634413900e+00\n-3.3728290077042530e+01\n1.6745212963102336e+01\n2.2890711224068237e+01\n-6.1535811164547169e+01\n9.2132349792157129e+00\n2.0238019416477208e+01\n-5.5675225480257154e+01\n1.3938708691930007e+01\n1.4072217271020302e+00\n-2.1554370242911698e+01\n-4.4425061704745410e+00\n1.5991466250908566e+01\n-4.5235690175794431e+01\n1.3537946622616493e+01\n3.3622096497195018e+00\n-2.5666431951196753e+01\n1.4105167463307344e+01\n2.4145587854999402e+00\n-2.4322645400413965e+01\n9.6047350935077958e-01\n4.0727904964260784e+00\n-2.3566433298203723e+01\n1.3670994653772965e+01\n2.1602319919583186e+00\n-2.4573694119885904e+01\n2.4869796016070933e+00\n1.9835389609134539e+00\n-2.0835660262725309e+01\n4.3168420740468862e+00\n1.7098604828238546e+01\n-5.3193350921952110e+01\n2.3289097228247932e+00\n1.4907273818713842e+00\n-2.0483225808095476e+01\n1.2389999717814048e+01\n4.0391154747344320e+00\n-2.9764918096831213e+01\n-1.4588616868838009e+00\n1.5147678003934155e+01\n-4.9116303751934048e+01\n1.4428968382992723e+01\n-2.1421433060490064e-01\n-2.1631963436614797e+01\n7.5547145304643823e+00\n1.3838072361616192e+01\n-5.1675054032743496e+01\n-1.2729166961656955e+00\n2.2480532299828289e+00\n-2.2662128280013107e+01\n1.3820483969588832e+01\n7.4680776017178430e-01\n-2.5556460305643803e+01\n1.3696300979182659e+01\n7.5486742913938987e-01\n-2.6075048164557980e+01\n-1.2870167326771884e+00\n1.9916457867578408e+00\n-2.2455449216494479e+01\n-1.4267165792974639e+00\n1.5683281208330613e+00\n-2.2540049413631358e+01\n2.9424670236018495e+00\n-1.5947998373135353e-01\n-2.0623752206480010e+01\n-1.8794160110140758e+00\n3.1803105014824351e+00\n-2.6549087435990700e+01\n-1.5532670869202010e+00\n1.3912355787950412e+00\n-2.2696722871311593e+01\n-2.1385882120448669e+00\n3.7906818001058755e+00\n-2.8459766248897150e+01\n1.5968013765561602e+00\n-1.9791568195477441e-01\n-2.0070197034346297e+01\n4.9997450447877139e+00\n-3.7242909084207848e-01\n-2.1479015537831003e+01\n-2.2998608293717693e+00\n2.8076425560029121e+00\n-2.5994860679485708e+01\n-1.9411557699965341e+00\n1.7144841378258615e+00\n-2.3477053970099671e+01\n1.4038776059946766e+01\n5.6713203651188360e-01\n-2.8695265439921457e+01\n1.5147971327566653e+01\n-2.2339089531316310e+00\n-2.3253567883181841e+01\n1.4898819431504876e+01\n-2.1772660613062467e+00\n-2.2944992805428669e+01\n-9.8661407628467157e-01\n4.3201665491106211e-01\n-2.1603851823290906e+01\n1.5236345766313699e+01\n-2.5338912817517296e+00\n-2.3270503743815013e+01\n-1.0922206353991841e+01\n-1.2224170841362680e+00\n-1.2204072253157946e+01\n-1.8469470760771756e+00\n6.9188703805246066e-01\n-2.2827418022767642e+01\n-1.0641931191650956e+01\n-1.3224355608626610e+00\n-1.2278570788659390e+01\n2.6426801999647451e+00\n-1.1628914901187017e+00\n-2.0592814633495230e+01\n-1.0854065274804880e+01\n-1.2828768678579752e+00\n-1.2334684594094202e+01\n-1.5871039518466608e+00\n2.8088118302253023e-01\n-2.2315275601947771e+01\n-1.0137367582031118e+00\n-1.3360396151391291e-01\n-2.1620380416515172e+01\n3.9184811071420635e+00\n-1.5579172156709691e+00\n-2.0624852628455173e+01\n1.5042498891862872e+01\n-2.9582517795933612e+00\n-2.3611706021452100e+01\n-2.1921609735939502e+00\n6.8461230090562886e+00\n-4.1645165326911346e+01\n-1.0869358898664423e+01\n-1.4580024179652871e+00\n-1.2356399172254068e+01\n-1.0926460529829940e+01\n-1.4533705594663477e+00\n-1.2358995933368901e+01\n-1.1521878568657242e+00\n-6.3745882805056009e-01\n-2.1458175161932800e+01\n-1.2720875733825738e+00\n-7.2643697769568760e-01\n-2.1304067122156180e+01\n3.7261030063544709e+00\n-2.4528446083329221e+00\n-1.9836027666378225e+01\n4.9825321715280282e+00\n-2.6384149587443653e+00\n-2.0361589170955792e+01\n-3.9629065777990027e+00\n-2.5243354343798576e-02\n-2.3260121160093128e+01\n-8.8091904925233433e-01\n-1.4581585315122947e+00\n-2.0813691167368546e+01\n1.5103145359003141e+01\n-3.7689600362633153e+00\n-2.5277856917546252e+01\n3.0126242176493609e+00\n-2.9348602230081648e+00\n-1.9684475885220785e+01\n1.5047275108308469e+01\n-3.7789886633687884e+00\n-2.5748694790029635e+01\n2.8565866992081670e+00\n-3.0129251135006836e+00\n-1.9836106374780503e+01\n1.5364698198350271e+00\n-2.6394991008584703e+00\n-1.9797059994742408e+01\n-3.0928880260581399e+00\n-1.0776610730089911e+00\n-2.2010981532293496e+01\n-3.6244974931495162e+00\n-5.5473170232139768e-01\n-2.3273419832374124e+01\n-3.0103279661896654e+00\n-1.2369533313619101e+00\n-2.1757454711252326e+01\n1.9057507210676172e+00\n-2.9458117146446416e+00\n-1.9551760303222729e+01\n1.4961792653700863e+00\n-2.9875607544889182e+00\n-1.9467066960711509e+01\n-6.2790411361591592e-01\n-2.3692781472442928e+00\n-2.0381822280923959e+01\n-1.6246163827654068e+00\n-2.3094091292309225e+00\n-2.0798415984504445e+01\n-1.6279759618549456e+00\n-2.2472593049440244e+00\n-2.0897077257935983e+01\n1.2432202617121442e+01\n-4.4669941554908936e+00\n-2.5553801326270033e+01\n1.6041234243266229e+00\n-3.4256121841354630e+00\n-2.0103715062088025e+01\n-2.7332070715910355e+00\n-1.9972452527446207e+00\n-2.2006505304977022e+01\n-1.8268773580691815e+00\n-2.4575027373283311e+00\n-2.1279475635539654e+01\n-3.5363058785882595e+00\n-1.4433352705346603e+00\n-2.3648014846732899e+01\n-1.9883047023800371e+00\n-2.4627710230293687e+00\n-2.1440198030298099e+01\n-4.8881860650218032e+00\n-1.4343438394823065e+00\n-2.2627993252472962e+01\n-1.2628573416723250e+00\n-3.0164986613938427e+00\n-2.0505043785647072e+01\n-7.1162140606671205e+00\n1.9506373802983603e+00\n-3.4347136998480742e+01\n1.1120175111988088e+01\n-5.5534524851591804e+00\n-2.4820169205483403e+01\n-2.0246571567790723e+00\n-2.9655944802645977e+00\n-2.2072367465542879e+01\n-2.3053681174433609e+00\n-2.9759771079866830e+00\n-2.2518685699637697e+01\n-4.4310958678621102e+00\n-2.6791377495487376e+00\n-2.1347266892385420e+01\n-2.3385830169247996e+00\n-3.0606688255738308e+00\n-2.2683564912335022e+01\n-3.5056464019025571e+00\n-2.4910063403030538e+00\n-2.3796080742147186e+01\n-6.7301048002745532e+00\n2.7809118519541121e-01\n-3.2427744093272501e+01\n-4.5308627671817172e+00\n-2.8118436170146310e+00\n-2.1250666435507398e+01\n-7.0159161729968584e+00\n4.7616609808868622e-03\n-3.2115590966238749e+01\n-1.8951990584035681e+00\n-4.1531228688934219e+00\n-1.9367197250975654e+01\n6.8429317337327600e+00\n3.8512395489532253e+01\n-4.4565707393466106e+01\n-6.8609986493584973e-01\n2.8395916030364550e+01\n-4.0412742125488428e+01\n-6.5731255798462029e-01\n2.8131039358146573e+01\n-4.0195855919133045e+01\n-9.1106169643082406e+00\n2.3319269900275053e+01\n-3.5173326928755706e+01\n9.5889914519681021e+00\n2.7877141621259025e+01\n-4.2698639991268394e+01\n8.6849778776061939e+00\n2.7557458872322140e+01\n-4.4674167244895372e+01\n1.2149735186935107e+01\n2.9334568789557309e+01\n-4.6722310763774843e+01\n1.2754462522922141e+01\n1.6917920829849251e+01\n-3.0855254466288862e+01\n-9.7615769026936956e+00\n2.0198131834733427e+01\n-3.4322800241816886e+01\n1.2728211749378007e+01\n1.5871778689307861e+01\n-3.0029372571520863e+01\n1.2791070473934658e+01\n9.8931282294585170e+00\n-2.2997944554586677e+01\n-7.7171718378261343e+00\n2.0749858645992767e+01\n-3.6234274512882109e+01\n4.7019188460030508e+00\n2.4665060801692889e+01\n-4.2573929166917331e+01\n1.3852820911550996e+01\n2.6451113019559930e+01\n-4.6609834573523528e+01\n9.7346027029102693e+00\n2.6733930446962734e+01\n-4.7020469096377774e+01\n1.2153056005122126e+01\n1.5267418029697126e+01\n-3.1263294006278223e+01\n-7.2097472497714605e+00\n2.0806670871164343e+01\n-3.7608265730351263e+01\n1.2877275829356947e+01\n1.4742955083381666e+01\n-3.1068121422414688e+01\n8.6715490588550050e+00\n2.5787635439102587e+01\n-4.6656111839709347e+01\n1.6401967420265390e+01\n2.8597395145492236e+01\n-5.1625634421659718e+01\n2.4883428540712199e+01\n3.2104488758244230e+01\n-5.8790684696335383e+01\n1.3050042218426883e+01\n1.3574628895082956e+01\n-3.0652453054735968e+01\n4.9968319068815594e+00\n2.4005278110437843e+01\n-4.5630414516095541e+01\n1.8515623172811690e+01\n2.9550296922715731e+01\n-5.5178887421673146e+01\n1.3148294615276811e+01\n1.5346566404139081e+01\n-3.4192625420895624e+01\n-1.8130052911439025e+00\n2.1428098798238871e+01\n-4.1947905013060584e+01\n1.7072083330883370e+01\n2.8184546588060062e+01\n-5.4077672944801414e+01\n1.3889889217815247e+01\n1.2774163780696092e+01\n-3.1200286146946464e+01\n1.1270523780530651e+01\n1.0685434886710835e+01\n-2.8187102384530867e+01\n2.0423487628748649e+01\n2.5882359743391298e+01\n-5.3512469933378739e+01\n1.6005292219163419e+01\n2.5332033908417010e+01\n-5.2935779600535774e+01\n1.7698988763108105e+01\n2.5434096613897214e+01\n-5.3784646696726426e+01\n1.6359598745674596e+01\n2.5013968319867956e+01\n-5.3459916650065971e+01\n1.7079035094556005e+01\n2.3539120939000739e+01\n-5.1538697796489913e+01\n9.2673655003347246e+00\n2.3024171206197522e+01\n-4.9870119575271268e+01\n1.4204598953202176e+01\n2.3082577672318521e+01\n-5.1223139144867815e+01\n1.1654018140849779e+01\n1.2601120389639402e+01\n-3.3764607599523018e+01\n1.2457241526964259e+01\n2.3291391482853268e+01\n-5.1922210698372382e+01\n8.7010579354216322e+00\n3.6990966006722781e+00\n-1.9189253833886539e+01\n5.1983811763503436e+00\n2.0997995211512119e+01\n-4.8451841383366464e+01\n1.2553325705670957e+01\n1.1365864706055476e+01\n-3.3824397579666162e+01\n1.1621182619676873e+01\n1.0747645929053210e+01\n-3.2517165961278813e+01\n1.2149799311617038e+01\n6.0142911835746382e+00\n-2.6009878570729445e+01\n1.1775365094708636e+01\n9.2827723128427575e+00\n-3.1524698658205963e+01\n7.6254254140344520e+00\n2.0721690624728449e+01\n-5.0671224154745452e+01\n1.3912059632936094e+01\n9.4075904068603275e+00\n-3.2700455388400300e+01\n1.3334810001285387e+01\n9.8511137016965016e+00\n-3.3505383418342660e+01\n2.1670917454435823e+01\n2.4122397985268961e+01\n-6.1973889914853821e+01\n-1.7446850578968893e+00\n1.8123854124549563e+01\n-4.5713211341372968e+01\n1.4043318897484617e+01\n1.0131138547500122e+01\n-3.6250998368389197e+01\n1.2685080140070975e+01\n9.2793990002870608e+00\n-3.4262927480283928e+01\n1.8805274549800870e+01\n2.1710625475472156e+01\n-5.8976431782468019e+01\n1.8181140427387131e+01\n2.0988290796840566e+01\n-5.6993450924021921e+01\n1.4287420649617566e+01\n2.1444217839548806e+01\n-5.7910657517570151e+01\n-3.4109537676778339e+00\n1.6811402704986161e+01\n-4.4994598612553041e+01\n1.2103584250759849e+00\n1.8018381251792814e+01\n-4.8822113537867125e+01\n4.9088482886232816e+00\n1.8426218889574432e+01\n-5.1933533345836707e+01\n1.3728338171211012e+01\n3.6210069567202190e+00\n-2.6069573620976868e+01\n1.3380780114383663e+01\n3.5125115227882855e+00\n-2.5961348091424899e+01\n2.4543158756097920e+00\n4.0593312241552963e+00\n-2.3621176225830428e+01\n1.3484322465912879e+01\n2.2724841694724809e+00\n-2.3454018907896579e+01\n1.9754907391780241e+00\n1.9256796773242451e+00\n-2.0602638290184188e+01\n5.1061745910678358e-02\n2.7442168696992590e+00\n-2.2171720404185088e+01\n-5.9236336163026992e-01\n2.9225725409218972e+00\n-2.2571353388083427e+01\n1.4627682950160237e+01\n-2.3741115173844080e-01\n-2.2579968084573679e+01\n-7.0968623056322111e-01\n2.2427459855783614e+00\n-2.1989393636950215e+01\n1.1162599081957485e+00\n1.1912926960180517e+00\n-2.0338935839313830e+01\n8.3935146694380069e-01\n1.2637126065164486e+00\n-2.0370705244501725e+01\n9.2280255455311799e-01\n1.0580030780082812e+00\n-2.0627091747527430e+01\n1.4592727391254659e+01\n-8.2477458356745403e-01\n-2.1751090378543395e+01\n1.3697877754198664e+01\n7.1576035761967094e-01\n-2.6224673390851180e+01\n-1.5932470150757463e+00\n1.6581435123226540e+00\n-2.2784338351679228e+01\n1.4000380623499449e+01\n3.6824160026677116e-01\n-2.7533704284917953e+01\n-1.2994967631001426e+00\n1.0550850821142221e+00\n-2.1943859304001258e+01\n1.4035192188654442e+01\n-3.7301649467637510e-01\n-2.6338253960496008e+01\n1.4035192188654442e+01\n-3.7301649467637510e-01\n-2.6338253960496008e+01\n1.1726113596355070e+00\n-1.9360639920667283e-01\n-2.0459673969621075e+01\n-1.3421223463095964e+00\n7.9759820587976271e-01\n-2.1825303218113415e+01\n-3.0255856924687619e+00\n3.2715562294940512e+00\n-2.7632145747191402e+01\n1.5223630042590262e+01\n-2.3761807998326776e+00\n-2.3104516521298521e+01\n-1.9596590971895156e+00\n1.2383114440464567e+00\n-2.3086876219621907e+01\n-1.6324437725245442e+00\n7.6160778567650056e-01\n-2.2505997361455091e+01\n1.5206294982381159e+01\n-2.5354167821626183e+00\n-2.3583300172116708e+01\n1.8896868730277545e+00\n-1.1793405819834579e+00\n-2.0531364709568912e+01\n-1.4914408363930829e+00\n-6.0428522231409698e-01\n-2.1519228602265056e+01\n-1.5827651161119841e-01\n-1.2086274410584412e+00\n-2.0618241084778699e+01\n2.2416686200829730e-01\n-1.3574081602636334e+00\n-2.0352082939755384e+01\n-8.0948225395613527e-02\n-1.3489381825492344e+00\n-2.0616215024553195e+01\n-1.0861315152251043e+01\n-1.6515327463749627e+00\n-1.2551105613544680e+01\n-1.0702030281594315e+01\n-1.6698523071781752e+00\n-1.2637118140187246e+01\n-1.0702030281594315e+01\n-1.6698523071781752e+00\n-1.2637118140187246e+01\n4.8571086845614753e-01\n-1.9828697736999561e+00\n-2.0202263009528341e+01\n-4.2508354782356079e+00\n-4.8882016438537195e-03\n-2.3646353346481980e+01\n-2.6266669879003617e+00\n-1.0238939439888683e+00\n-2.2010136869408665e+01\n-4.0170604604297742e+00\n3.6159893631884027e-01\n-2.5713917591978749e+01\n-3.1925564828876190e+00\n-8.6271725390387155e-01\n-2.2387402490619419e+01\n-5.5565136426230568e+00\n4.1966470397394326e+00\n-3.7740915386347389e+01\n-5.9962439782364143e+00\n4.0513409538504694e+00\n-3.7567410008905988e+01\n-9.7911023757094673e-01\n-2.2121626335405451e+00\n-2.0572914342888556e+01\n-3.6999024120121160e-01\n-2.5130730532019179e+00\n-2.0038208260616713e+01\n-7.1374495822984159e+00\n2.4404392111772144e+00\n-3.5088610122964106e+01\n1.8275109319900449e+00\n-4.0852530455806013e+00\n-2.0740064945284658e+01\n-2.9207110430509799e+00\n-2.6136031085395515e+00\n-2.2298146919265825e+01\n-2.4598128894755072e-01\n-3.5435389183843613e+00\n-2.1103254536573047e+01\n-2.9755569852966244e+00\n-2.7086649230602631e+00\n-2.2553099668041568e+01\n-2.4612996454047714e-01\n-4.0665593359448353e+00\n-2.1346430497882555e+01\n7.2114782621740314e-01\n-4.4686628316365313e+00\n-2.0877449699155573e+01\n-1.1555489502745853e+00\n-4.3985179193350463e+00\n-1.8934212208550775e+01\n-3.3268226632489131e+00\n-2.7521225788652766e+00\n-2.4430259814681978e+01\n6.4593725488302374e+00\n3.8072031491656176e+01\n-4.4834001373878017e+01\n6.0305462374055869e+00\n3.7801588223626879e+01\n-4.4788607886981069e+01\n-5.8535093327701182e-01\n2.8193956975233775e+01\n-3.9962819772057806e+01\n3.2694317477489349e-01\n2.7647003514726674e+01\n-3.9502785711992033e+01\n-2.8354033223335451e+00\n2.6757677569813154e+01\n-3.8836916567834656e+01\n1.9008748685666661e+00\n2.6560121288215925e+01\n-4.0489923485643637e+01\n8.3194475527650322e+00\n2.8377127602879568e+01\n-4.3463737551357774e+01\n7.0779281432085650e+00\n2.7371938167753207e+01\n-4.1910981712741922e+01\n1.2440760981538837e+01\n1.7424295248913985e+01\n-3.0239494840416096e+01\n6.5186669849811507e-01\n2.4665361267908533e+01\n-4.0498387993651768e+01\n1.2190623230719019e+01\n1.6218119195628564e+01\n-3.1115786926963860e+01\n-1.0337916362318245e+01\n1.9513819153049859e+01\n-3.4941091979873924e+01\n-8.8521030224599055e+00\n1.9717022703974937e+01\n-3.5858281938726350e+01\n1.1716062226885368e+01\n1.0561289114291748e+01\n-2.4923179302500351e+01\n4.9970969013683009e+00\n2.4414385227978396e+01\n-4.5281662102792431e+01\n1.2482195852100791e+01\n1.2088049979826021e+01\n-2.8339045400715456e+01\n1.5969115322355290e+01\n2.7273441277294310e+01\n-5.1574049566984989e+01\n5.7788063661388707e+00\n2.3374234593169504e+01\n-4.6737691407893756e+01\n-7.1328562376601949e+00\n1.8763724875313208e+01\n-3.8688810288948140e+01\n1.1515141457370845e+01\n1.0192271132735504e+01\n-2.9089325017687255e+01\n1.3175179834916731e+01\n1.3551590724691478e+01\n-3.5098192232812977e+01\n1.3175179834916731e+01\n1.3551590724691478e+01\n-3.5098192232812977e+01\n9.1863076992239581e+00\n5.7294413773296977e+00\n-2.2906010647384363e+01\n-4.7705646478632273e+00\n1.8189822210402806e+01\n-4.2388027155733177e+01\n1.3301719258787879e+01\n5.1997382080005359e+00\n-2.4048619882605323e+01\n1.7627853860469269e+01\n1.7989999116432518e+01\n-4.7723202600534947e+01\n1.3112625313027980e+01\n9.3253805619585250e+00\n-3.2133201425775944e+01\n1.1328980056646584e+01\n5.5919805431555138e+00\n-2.6113704888550210e+01\n1.2139129391826424e+01\n6.4033497950111924e+00\n-2.8649835362961834e+01\n1.2433353701769164e+01\n5.1595512765735183e+00\n-2.7708861117432196e+01\n1.2657900659680161e+01\n5.2968194738705243e+00\n-2.8471789912272975e+01\n1.2694268940702377e+01\n5.3353031312399226e+00\n-2.8561485563918115e+01\n1.2046096607985167e+01\n5.0413445191219308e+00\n-2.7649006344836689e+01\n8.5946811988876415e-01\n1.6877012961622732e+01\n-4.9755214361357766e+01\n1.2936395092365087e+01\n3.0596552572644065e+00\n-2.5604011532101502e+01\n1.2760651007191425e+01\n4.7290656558413602e+00\n-2.9367924264995381e+01\n1.2651271379165234e+01\n4.7470012992127062e+00\n-2.9147916868071921e+01\n1.0459844961970524e+00\n1.6763278770232660e+01\n-5.0690617788250798e+01\n8.8302769315505913e-01\n1.6464564129381820e+01\n-5.0006948945053487e+01\n4.7443417961459513e+00\n1.7079082767159687e+01\n-5.2739304284509728e+01\n9.0832388135057540e-01\n1.6272903963614706e+01\n-5.0432520877225357e+01\n9.0832388135057540e-01\n1.6272903963614706e+01\n-5.0432520877225357e+01\n2.0239596314478296e+00\n1.6991484732504418e+01\n-5.2482390917657106e+01\n1.3652237906741709e+01\n1.5836489542785186e+00\n-2.6272789694968150e+01\n1.4455752423774570e+01\n-4.3664244891296639e-01\n-2.1867222779378633e+01\n-1.8141966718243199e+00\n2.3348025546587001e+00\n-2.3468220438085275e+01\n1.1888821073757518e+00\n2.7814405037191298e-01\n-2.0240231555512583e+01\n-1.7063047383935037e+00\n1.5686366861616199e+00\n-2.2976926546918008e+01\n1.5197903313509222e+01\n-2.3715201146021148e+00\n-2.3272266342083871e+01\n2.0233042243207731e+00\n-7.2828401803019438e-01\n-2.0378912307238298e+01\n1.9818827168706868e-01\n-3.0275956439484702e-01\n-2.0549880515076957e+01\n1.5342945675378219e+01\n-2.9056190757968965e+00\n-2.3533423704850861e+01\n1.5124925146393148e+01\n-2.5731846868685118e+00\n-2.4361308051492681e+01\n-1.2190412631441256e+00\n-5.2603018162531733e-02\n-2.1736835245742881e+01\n-3.4028375695535091e+00\n1.5305393848186672e+00\n-2.5466530893033202e+01\n-1.0771830817996333e+01\n-1.4553767795094084e+00\n-1.2374425595201775e+01\n-8.6921857468735630e-01\n-6.3674665755567494e-01\n-2.1447719674085242e+01\n2.4164825909955185e+00\n-2.1208767700937980e+00\n-2.0265600178659366e+01\n-4.3521250824515114e+00\n6.3385718885505538e-01\n-2.3985971776062161e+01\n1.5405146403809079e+01\n-3.8248134307863255e+00\n-2.4750727064616573e+01\n1.5187072427650966e+01\n-3.7707824815196420e+00\n-2.4609335394676240e+01\n1.5136830806994626e+01\n-3.8902669465277571e+00\n-2.5391299748423538e+01\n-6.2295093310058265e+00\n4.4340952606866999e+00\n-3.8080333450856635e+01\n-2.8080565555393959e+00\n-1.3185540205861208e+00\n-2.1667918508636593e+01\n-1.5492614130448618e-01\n-2.3880288642817327e+00\n-2.0075479348148708e+01\n-1.8300440435054701e+00\n-2.3688984650058740e+00\n-2.1240453826176086e+01\n-5.8404781534514019e+00\n1.2898313817950622e+00\n-3.3838262803271633e+01\n-1.8754245984664377e+00\n-3.2814360469115007e+00\n-2.1923123496730977e+01\n-1.8754245984664377e+00\n-3.2814360469115007e+00\n-2.1923123496730977e+01\n-2.5950753193820000e+00\n-2.9894931973455776e+00\n-2.2562857353855637e+01\n-2.9089179819474071e+00\n3.2522498238675830e+01\n-4.0903726949801595e+01\n-2.7315394993678535e+00\n3.1053310778177192e+01\n-3.9806442791526024e+01\n2.3165871208241802e+00\n3.1230494151570866e+01\n-4.0033050353219494e+01\n-8.3131570969706363e+00\n2.5472469543352016e+01\n-3.4772246550138114e+01\n5.8588154297725898e+00\n3.1314410588153908e+01\n-4.2957146260976742e+01\n1.8409657641539459e+00\n2.9342203914455304e+01\n-4.0860243786541517e+01\n1.8409657641539459e+00\n2.9342203914455304e+01\n-4.0860243786541517e+01\n2.0413520583531600e-01\n2.6989426659104094e+01\n-3.9427405508361041e+01\n3.9001468986010396e-01\n2.5546851713063226e+01\n-3.8440684901704465e+01\n-1.3323952376062451e+00\n2.4074724996059278e+01\n-3.8951039271952098e+01\n1.2566804250850218e+01\n1.5369567879530791e+01\n-2.9706313156722182e+01\n1.8284934549913394e+00\n2.4425087325073878e+01\n-4.2020694151757368e+01\n-3.9336820029754738e+00\n2.0276703892793360e+01\n-4.0983232698612227e+01\n2.0853922080915950e+01\n2.6394925625698566e+01\n-5.5137382933370731e+01\n3.9345115461245492e+00\n2.1064057510097950e+01\n-4.7780637738435424e+01\n1.3013617279949992e+01\n1.1932486572015167e+01\n-3.5497674598530651e+01\n3.6127190148414140e-01\n1.9502880331348155e+01\n-4.6017702981189146e+01\n9.7997814612717082e+00\n6.1128186157204967e+00\n-2.5001805617507543e+01\n1.2666546707710497e+01\n2.2135852559392561e+01\n-5.9340608533252002e+01\n1.3753324183980364e+01\n9.1917769065631560e+00\n-3.5058185260748701e+01\n1.0872788750002243e+01\n1.9736562632726493e+01\n-5.4467841238463947e+01\n1.1714987053568111e+01\n5.6287407267937066e+00\n-3.0077627025450024e+01\n1.2240010964028409e+01\n4.8676095308971004e+00\n-2.9031378875477564e+01\n1.3791832143633952e+01\n1.5559180018289465e+00\n-2.3283856735131696e+01\n1.4314232484304757e+01\n1.0523515346868516e-01\n-2.1302297921231578e+01\n1.0769147791466379e+01\n3.4054558148686027e+00\n-2.7187051785608695e+01\n1.4410746879091251e+01\n-1.5912750974053405e-01\n-2.1757048776190199e+01\n-1.3170434281580516e+00\n2.6594563125418027e+00\n-2.2809426121650940e+01\n8.8497729701281469e-01\n9.3925273442781576e-01\n-2.0685119798909202e+01\n8.1193985386096734e-01\n7.5207417983083835e-01\n-2.0583926534107906e+01\n1.4747196077623194e+01\n-9.0179581546439924e-01\n-2.3080891299980038e+01\n-1.5506823684940407e+00\n1.9554858112594660e+00\n-2.2889253117682628e+01\n1.2231934473993440e-01\n6.1339109731812691e-01\n-2.0824240660367934e+01\n8.5682614782054578e-01\n3.2828734745456789e-01\n-2.0466634149196874e+01\n-9.3155646068214737e-01\n9.2351624306643931e-01\n-2.1628947329178271e+01\n1.9735647369002527e+00\n-4.8304660625432144e-01\n-2.0412845452609197e+01\n-1.4427140572077830e+00\n7.3504466794972911e-01\n-2.2187974398075042e+01\n-3.9125944696270425e+00\n9.6738690883021838e-01\n-2.4523923605986695e+01\n-1.0754839807590354e+01\n-1.5707372640795685e+00\n-1.2455198706526584e+01\n-4.3255798635409439e+00\n3.0152451527123264e-01\n-2.3301652249614865e+01\n1.5258525148765044e+01\n-3.8656997250121683e+00\n-2.4453646075175424e+01\n1.5258525148765044e+01\n-3.8656997250121683e+00\n-2.4453646075175424e+01\n-4.9543799744861623e+00\n4.8819494644154924e+00\n-3.8405837907657485e+01\n-3.2618368732761742e+00\n-5.8635764409892843e-01\n-2.2583101797612620e+01\n-2.6131328512240768e+00\n-1.4041559613403001e+00\n-2.1539592508960883e+01\n7.7871652515485545e-01\n-2.7007928585817162e+00\n-1.9872719028898722e+01\n-1.9166143196702983e+00\n-1.8307741565613562e+00\n-2.1048877890604089e+01\n2.7728472301406037e-01\n-3.6125206549580500e+00\n-2.0448900876968210e+01\n-6.1793669195456271e+00\n1.1606490406268735e+00\n-3.3408647746774434e+01\n-2.0576588024254225e+00\n-3.0862622684948811e+00\n-2.2194709122816089e+01\n2.2550851208046661e+00\n2.9634498312428555e+01\n-4.0992276664230936e+01\n3.5412507274363989e+00\n2.9410597609186659e+01\n-4.1313664366835475e+01\n-7.3668392109336391e+00\n2.1449795970446615e+01\n-3.6003605358395589e+01\n1.2059688946266926e+01\n1.0225683788944222e+01\n-2.2728577992040762e+01\n8.8889313241035381e+00\n2.6971126028626397e+01\n-4.5422467132033105e+01\n8.0086476698672335e+00\n6.3986072446722222e+00\n-1.8466722414180406e+01\n2.2993805106644008e-01\n2.3432452196454939e+01\n-4.2868722268161839e+01\n1.1576843147841945e+01\n1.4710978413786396e+01\n-3.1403667005731826e+01\n1.5524916928059801e+01\n2.5724425148552143e+01\n-5.0113597510547393e+01\n1.3278865332896627e+01\n2.3932570481462921e+01\n-5.1645855089122051e+01\n1.2399372458002663e+01\n5.2583964393149580e+00\n-2.4844906014337788e+01\n2.0978232021756389e+00\n1.7960354426113454e+01\n-5.0048577746358056e+01\n2.1130314233612641e+00\n1.7942180966031593e+01\n-5.1024803857101340e+01\n3.3211214523332211e-01\n1.9527356358424386e+00\n-2.1269320457420974e+01\n1.4514084104366901e+01\n-4.6631391449488535e-01\n-2.1431763570902131e+01\n-2.1893523627751231e-02\n1.8428961907808972e+00\n-2.1207032604303492e+01\n1.7155563562861871e+00\n1.1691869693196664e+00\n-2.0487501799132740e+01\n1.2508239837812770e+01\n3.3656120889063028e+00\n-2.9403651635268385e+01\n-1.7773004612713969e-01\n1.5181289633571673e+00\n-2.1138521307835777e+01\n-1.5699267457240607e-01\n1.4989244335818301e+00\n-2.1212968066191031e+01\n-1.3782413757590621e+00\n2.2885801631461908e+00\n-2.2744583506226018e+01\n-1.9137297604680374e+00\n2.1630595533468444e+00\n-2.4415622032365302e+01\n-1.7254492420875085e+00\n1.2899429991869484e+00\n-2.2929309456410788e+01\n2.0616906176183951e+00\n-9.3259337298909961e-01\n-2.0432458355441923e+01\n-1.0714596326365642e+01\n-1.3681372011486956e+00\n-1.2323169867987810e+01\n-1.7069127038629267e-01\n-1.3653167296274973e+00\n-2.0650406218398075e+01\n-2.3968593108155174e+00\n-1.4953699652170138e+00\n-2.1471109290811597e+01\n-1.5796828480079075e+00\n-2.0189495176715142e+00\n-2.0789291992864147e+01\n-1.4621152036190659e+00\n-2.0983686228908631e+00\n-2.0634067724456482e+01\n-9.5274949595140868e-01\n-3.2731948863111087e+00\n-2.0987503378151615e+01\n-3.7226821769216012e+00\n-1.9319377109668472e+00\n-2.4346756620450041e+01\n-7.8269894695483986e+00\n-6.8431344829217089e-01\n-2.5780606749486950e+01\n-6.9040240801869750e+00\n3.8284325025723676e-01\n-3.2695496966937661e+01\n6.9901310473124161e+00\n2.8155912896614826e+01\n-4.3393333776814657e+01\n6.8660473553835510e-01\n2.5034137043452663e+01\n-4.0442392278419575e+01\n-8.1227196100208694e+00\n2.1115591790789708e+01\n-3.5510192201655002e+01\n-1.0378706381263997e+01\n2.0106212111266647e+01\n-3.4199869165958809e+01\n2.0936052027087268e+01\n2.7425890657594625e+01\n-5.2800290296639830e+01\n1.3754712237758485e+01\n3.5095262282497788e+00\n-2.4316669664607478e+01\n-1.0185966930277692e+00\n3.0966788750903089e+00\n-2.3045757001538011e+01\n-1.7469029876396056e+00\n2.3704994544916440e+00\n-2.4104581168349831e+01\n-1.1083879467354462e+01\n-1.5473071174600714e+00\n-1.2351646320334732e+01\n-1.0768358389324131e+01\n-2.1294336187642666e+00\n-1.2877345009903287e+01\n-4.1967010796900706e+00\n-2.2161566867297795e+00\n-2.1403733199293114e+01\n-2.0594015016219838e+00\n-2.9631852202971216e+00\n-2.2045417557581686e+01\n8.7291752453768634e+00\n8.0931493318409764e+00\n-2.1580788759361226e+01\n9.0350870532094234e+00\n2.4856763502682348e+01\n-4.7454939873373036e+01\n1.7801142118991006e+01\n2.4338345043050364e+01\n-5.4242966684060015e+01\n8.9362399651573721e-01\n2.0300795887190809e+01\n-4.5623222848108924e+01\n1.6494216234168533e+01\n2.3081823990599347e+01\n-5.7724201367614818e+01\n4.3902748690497644e+00\n1.8115737641383692e+01\n-5.0973908606301642e+01\n4.8689340405610526e+00\n1.7298838689753801e+01\n-5.2447610948288585e+01\n3.4576784283377482e-01\n1.1911977342733056e+00\n-2.0709590110384536e+01\n-1.0370768814559574e+00\n-2.3847001161455572e+00\n-2.0274301482176892e+01\n4.3166351444456392e+00\n2.6973347797724077e+01\n-4.0410229922583582e+01\n1.5109379151260782e+01\n2.4807631058389617e+01\n-5.3761343115641374e+01\n1.9393022710602763e+00\n7.2145744018224467e-01\n-2.0291411007819846e+01\n-1.0962841184272625e+00\n6.0808578406616631e-01\n-2.1817090842977375e+01\n-1.1020413326447141e+01\n-1.2920849426818977e+00\n-1.2145850718730030e+01\n-9.0622382913146216e-01\n-9.0352745482419083e-01\n-2.1096832778788812e+01\n1.5191958054387689e+01\n-3.4659377550942918e+00\n-2.4299664789287014e+01\n1.9620901885321884e+00\n-3.5339486424758877e+00\n-1.9964753039672782e+01\n2.0328172426840125e+00\n-3.5237775365503321e+00\n-2.0077191031316698e+01\n-3.6868476515911772e+00\n-1.9405424471638153e+00\n-2.4575476410389623e+01\n3.6769251826132194e+00\n2.6405795324509739e+01\n-4.1433915033892319e+01\n-1.0930603823797766e+01\n-1.4787036936989639e+00\n-1.2401184616991918e+01\n9.7192348719709916e+00\n2.3589669626020704e+01\n-4.9281390055563215e+01\n-9.8849988369768738e-01\n1.4141401658198185e+00\n-2.2040148867584008e+01\n1.8325817971389973e+00\n2.4595156139928129e+01\n-4.1784627942163233e+01\n-6.8215568837601710e+00\n2.0912663574630827e+01\n-3.8382574850588682e+01\n6.7850858442643682e+00\n2.3239469354021050e+01\n-4.9099107420690991e+01\n-3.6953690039830662e+00\n2.3115869213327624e+01\n-3.9446481106998775e+01\n-1.2166534091086236e+01\n2.1050597052833520e+00\n-7.3018752743084629e+00\n-1.1243524383086891e+01\n-8.2524945846370878e-01\n-7.7568345094917532e+00\n-4.6045549238331027e+01\n2.8544824323029498e+01\n-7.9689980363415501e+01\n-4.5508405069299457e+01\n2.8752311414370762e+01\n-7.9855283742129004e+01\n-4.2570334693377319e+01\n3.2754637021555610e+01\n-7.3806328695392523e+01\n-3.3456509359910562e+01\n3.5526238381833863e+01\n-5.3038424682757814e+01\n-2.9956023668105445e+01\n3.1996443444763692e+01\n-5.0851314517938576e+01\n-2.9524325954763420e+01\n2.1937016231247817e+01\n-5.6775925821631795e+01\n-2.8730658693341816e+01\n3.3422750673476969e+01\n-4.8589326495346235e+01\n-2.4894169793273946e+01\n2.4982773518521910e+01\n-4.3643421300151807e+01\n-2.4549946843408474e+01\n2.7500786706745668e+01\n-4.1835615471118793e+01\n-2.4667932672288146e+01\n2.6844070292656461e+01\n-4.2953208141526559e+01\n-2.3735679794708712e+01\n2.2634076570791880e+01\n-4.3258222299748809e+01\n-3.9195698298514131e+01\n5.6122760457615271e+01\n-6.8098962602443507e+01\n-2.2702548279579013e+01\n1.4835159245236241e+01\n-4.6978553122190007e+01\n-2.1908067803155312e+01\n1.9353731172655451e+01\n-4.2465168199308629e+01\n-3.2204335557252634e+01\n4.4896790025481515e+01\n-6.0159023609092912e+01\n-2.8482250441155735e+01\n3.8468486203312111e+01\n-5.1904991003353487e+01\n-2.6254031742567673e+01\n3.5297074063365933e+01\n-4.8588596210013606e+01\n-2.6827059224845339e+01\n3.6506489749032056e+01\n-4.9748229365675364e+01\n-2.7410178129135101e+01\n3.8263987178642196e+01\n-5.0537119221363085e+01\n-1.8652816392224601e+01\n1.9759102426341205e+01\n-3.4765277397611186e+01\n-1.8652816392224601e+01\n1.9759102426341205e+01\n-3.4765277397611186e+01\n-1.8525940379463698e+01\n1.6066924724808793e+01\n-3.7576675312890828e+01\n-1.8508490866412050e+01\n1.9442162614270270e+01\n-3.5125394756950868e+01\n-2.8737066825835488e+01\n4.5465195926583689e+01\n-5.3951746746744412e+01\n-1.7144604856031705e+01\n1.1516608601178548e+01\n-3.8085667891082160e+01\n-1.6324882631641291e+01\n1.8380567652341853e+01\n-3.1135238754704677e+01\n-2.4136578287843733e+01\n3.5902543592148838e+01\n-4.7001829134847249e+01\n-2.4261208818848740e+01\n3.5530721754990154e+01\n-4.9612805690629536e+01\n-1.6127302060104515e+01\n1.4911738575675509e+01\n-3.3806512108287876e+01\n-2.3645348746031949e+01\n3.5575438909682092e+01\n-4.6736089293876482e+01\n-1.7108777842520091e+01\n1.3059467897104799e+01\n-3.9632689918679695e+01\n-2.3296470605609301e+01\n3.5227857644102023e+01\n-4.6163380486922918e+01\n-1.7396363161767031e+01\n1.2107159242646384e+01\n-4.2780718390103210e+01\n-1.6397550489423494e+01\n1.8167717012787623e+01\n-3.3437936858288786e+01\n-1.6160748384693367e+01\n1.9176410128454958e+01\n-3.2329686420373108e+01\n-2.1113412614973093e+01\n3.1325523665100505e+01\n-4.2258563771419276e+01\n-1.6732158175752893e+01\n1.0925129584643749e+01\n-4.1974327228252413e+01\n-1.6177576614584506e+01\n2.0053288390419848e+01\n-3.2420806201002279e+01\n-2.2796583291219061e+01\n3.7556611078424673e+01\n-4.5421711270967108e+01\n-1.6500314805628587e+01\n1.2132734744516497e+01\n-4.0423275416813119e+01\n-1.0943028668963370e+01\n-4.3465263567493002e+00\n-3.0979794192127191e+01\n-1.6099366442367970e+01\n9.6663004324099955e+00\n-4.1021819780765625e+01\n-2.3616903372659696e+01\n4.1201926642971124e+01\n-4.7343233784800468e+01\n-1.0860649176623156e+01\n-3.9538578127473798e+00\n-3.0815328051714065e+01\n-2.1759582076636281e+01\n3.4696191981583709e+01\n-4.4878784574006303e+01\n-2.1782849952763893e+01\n3.4575568534965996e+01\n-4.5189504368450812e+01\n-1.0755881043001477e+01\n-4.1905483355992139e+00\n-3.0744660976152556e+01\n-1.5221921524586635e+01\n1.9612884012121839e+01\n-3.0820481835489939e+01\n-2.4138291558835775e+01\n4.0199000044531353e+01\n-5.2353314505736712e+01\n-2.1709261529288483e+01\n3.6097522047582970e+01\n-4.4929330234703230e+01\n-2.3434085214922650e+01\n4.0055240486236769e+01\n-4.9639445488719929e+01\n-1.5667102375992528e+01\n1.0942055402327037e+01\n-4.0315431642041176e+01\n-1.5723868592531757e+01\n9.8845290996408703e+00\n-4.1382231683104997e+01\n-2.2161275904936801e+01\n3.6461070029665684e+01\n-4.7068995787553476e+01\n-1.6256172912785427e+01\n9.5516360117222980e+00\n-4.5093718223695419e+01\n-1.5423835210362949e+01\n1.4814419843874029e+01\n-3.7200882803888533e+01\n-2.3370997240674612e+01\n4.1950432810641828e+01\n-5.0818633374425843e+01\n-1.5180929269144912e+01\n1.4141006504740025e+01\n-3.7577941074683146e+01\n-1.5235715099408415e+01\n1.2001233459774955e+01\n-3.9721439831470519e+01\n-1.5128145027502093e+01\n1.5494397889181098e+01\n-3.6394925460533301e+01\n-1.6487469164027889e+01\n2.4355065509952553e+01\n-3.5371200166286137e+01\n-1.6435449219026015e+01\n2.5045906841972993e+01\n-3.4751643814584000e+01\n-1.6633787123513613e+01\n1.9338373309575960e+01\n-4.3183415781626920e+01\n-1.5222810978388781e+01\n2.1494864059777466e+01\n-3.3496706242207061e+01\n-1.4696079429892665e+01\n1.9725491694443416e+01\n-3.3065102383686359e+01\n-1.4609865531823854e+01\n1.1518597946831692e+01\n-3.9950597126653754e+01\n-1.5501490095593839e+01\n2.3590952757785267e+01\n-3.3615100317827881e+01\n-1.6318504244802735e+01\n2.6238597630122474e+01\n-3.5486737444714990e+01\n-1.3942010118438315e+01\n1.9219411934210392e+01\n-3.0922588193812800e+01\n-1.4129602061673831e+01\n1.6898014191671667e+01\n-3.3374621295787549e+01\n-1.4530766829764495e+01\n1.9516845526336482e+01\n-3.3915831265277603e+01\n-1.5249339174644442e+01\n2.4218103354372339e+01\n-3.3707070392703748e+01\n-1.4027303626353575e+01\n1.8873595754083095e+01\n-3.2536917004796877e+01\n-1.2332523065054369e+01\n3.9503492645429379e+00\n-3.7362195197534490e+01\n-1.3090355764875774e+01\n1.7470444104347180e+01\n-3.0822489651256650e+01\n-1.3479863968484379e+01\n1.8866231250090717e+01\n-3.0906898305613510e+01\n-1.4157777844435621e+01\n1.2549410433488619e+01\n-4.1142009074321244e+01\n-1.3597193754369094e+01\n1.9889680225856029e+01\n-3.1162323231430225e+01\n-1.4004063938161737e+01\n1.2709722217138177e+01\n-4.1583359122071165e+01\n-1.3366106314239506e+01\n1.6332116945493492e+01\n-3.4311196701098460e+01\n-1.1911646089428068e+01\n1.5874357862626008e+01\n-2.6950600310849506e+01\n-1.3819204678512065e+01\n1.3331887259299153e+01\n-4.0657035268585496e+01\n-1.3819204678512065e+01\n1.3331887259299153e+01\n-4.0657035268585496e+01\n-1.3774686790816517e+01\n1.9325636090152539e+01\n-3.4600388055895003e+01\n-1.4329453653241323e+01\n2.3951371648474471e+01\n-3.4026807735550911e+01\n-1.3659877997394727e+01\n1.3428420255034139e+01\n-4.0160767964445114e+01\n-1.3522594134907308e+01\n1.7537295868251306e+01\n-3.6878732600383003e+01\n-7.7191355923484499e+00\n-5.1984661267660268e+00\n-2.5634000561994895e+01\n-1.4176430931838134e+01\n2.5883704376686214e+01\n-3.3195152849489340e+01\n-1.4324652365944791e+01\n2.5828801494081940e+01\n-3.3958406604569241e+01\n-1.4985138681469532e+01\n2.7827504059636745e+01\n-3.5419963818645037e+01\n-1.3852547110229176e+01\n2.5421225767508954e+01\n-3.2940386170027331e+01\n-2.1420337601447699e+01\n4.9573222311261368e+01\n-5.7809633774427965e+01\n-1.1698459518206260e+01\n1.7800307534814479e+01\n-2.9417056160343350e+01\n-1.2746785274353892e+01\n1.0688398063625300e+01\n-4.3455642780584512e+01\n-1.2560892513162962e+01\n1.3048008491645323e+01\n-4.0754578509664739e+01\n-1.2535474127576929e+01\n1.7479660375100281e+01\n-3.5237840785767048e+01\n-1.2535474127576929e+01\n1.7479660375100281e+01\n-3.5237840785767048e+01\n-9.1826694927097208e+00\n-1.0594542707141347e-01\n-3.2309379246938789e+01\n-1.8354135263404519e+01\n4.1027199678919516e+01\n-4.8849019863160088e+01\n-1.8670046460040311e+01\n4.2287236692664976e+01\n-5.0778391369272391e+01\n-6.8678663531118751e+00\n-5.9261849850218837e+00\n-2.4449726918966569e+01\n-1.1955947925831431e+01\n1.7500889545942233e+01\n-3.3896049989240275e+01\n-8.7538081152023999e+00\n-4.9382670142072888e-01\n-3.1483000256896418e+01\n-8.9142578640622965e+00\n-3.7786506673009444e-02\n-3.2333466485493638e+01\n-1.4149251327528825e+01\n2.9655034610002257e+01\n-3.7359849176142731e+01\n-1.1775011137789795e+01\n1.5017981889965439e+01\n-4.0125297943829310e+01\n-1.1858993732670074e+01\n2.0399228297188898e+01\n-3.4541095792901785e+01\n-1.7823147804289448e+01\n4.3873803240211934e+01\n-5.0856652729826152e+01\n-8.2896209197547854e+00\n-2.3466072891022252e-01\n-3.1568041409031640e+01\n-2.0409323877301162e+01\n5.4054331760399677e+01\n-6.1955576824423289e+01\n-1.0620644782907876e+01\n7.2221405247538790e+00\n-4.2170847612506002e+01\n-1.1442436281617603e+01\n1.9158995905894901e+01\n-3.5184019598874741e+01\n-1.2062699853977611e+01\n2.5042940742832883e+01\n-3.3650034993340149e+01\n-1.2712512105158421e+01\n2.6631238388014957e+01\n-3.5691527392294560e+01\n-1.1330590558431410e+01\n1.2005692054906573e+01\n-4.4323239879947096e+01\n-8.8310612904027934e+00\n3.7900733654790200e+00\n-3.7084764138256638e+01\n-5.7140894767807708e+00\n-6.8319746276247200e+00\n-2.3175044184802520e+01\n-1.0922529820334217e+01\n2.0155352321723001e+01\n-3.5884958970887652e+01\n-1.0445905551221060e+01\n1.7254270676289458e+01\n-3.5764796716181863e+01\n-1.0713833087522040e+01\n1.9456135049681595e+01\n-3.5053727394848799e+01\n-1.5295479622434220e+01\n4.1270130922136936e+01\n-4.9366881857321658e+01\n-1.8674970836029907e+01\n5.5787217474855240e+01\n-6.4063800650352178e+01\n-8.1299185428497793e+00\n2.5205008209582100e+00\n-3.4964687460189765e+01\n-7.6426733528632687e+00\n1.6980810968497599e+00\n-3.4029779909294561e+01\n-5.2158790812792528e+00\n-6.3455893150637461e+00\n-2.1524442923879523e+01\n-4.8410609160641771e+00\n-9.8543914555925340e+00\n-2.2671097552677768e+01\n-1.1741661425560281e+01\n3.5704339572096174e+01\n-4.0872223996275459e+01\n-1.5128504783569072e+01\n4.6766037982963674e+01\n-5.3816431172662391e+01\n-9.6248706939665727e+00\n1.5080539735143329e+01\n-4.1235505521597794e+01\n-9.2688997388738272e+00\n1.2183579217945985e+01\n-4.3852542244368777e+01\n-1.3871515628042134e+01\n4.3515100235739972e+01\n-5.1574291054879232e+01\n-9.3584936627804964e+00\n1.6317594701185374e+01\n-4.1132890151961334e+01\n-4.3523672556748663e+00\n-1.0193122379915289e+01\n-2.2335523136116525e+01\n-6.7753431147974252e+00\n2.0243983107650396e+00\n-3.4884576715924283e+01\n-6.8413227017214231e+00\n2.0833741776147470e+00\n-3.5546754326013634e+01\n-9.3579788620462878e+00\n2.0731654234600480e+01\n-4.3923749807075126e+01\n-1.2863482707204398e+01\n4.3229517453472219e+01\n-5.1906558656666249e+01\n-8.7356624559870095e+00\n1.8608542857550368e+01\n-3.9056246513303940e+01\n-8.4831108064896448e+00\n1.8336800398470832e+01\n-3.6155401523482787e+01\n-8.7311336896426308e+00\n2.0502147342462411e+01\n-3.5971519724428489e+01\n-7.2207457422585097e+00\n6.4094015678012459e+00\n-4.0664411862549102e+01\n-1.3526286373933971e+01\n4.9660049858593176e+01\n-5.9692135240241448e+01\n-3.9068656459699027e+00\n-9.6258151158445635e+00\n-2.2239869780378939e+01\n-7.8072255102248125e+00\n1.4617904300124296e+01\n-4.4131031796154630e+01\n-3.7859274642663863e+00\n-9.3207991274308046e+00\n-1.9618185973930103e+01\n-8.0535686381455402e+00\n2.0947141207473255e+01\n-4.4526648769261122e+01\n-1.0751366215213428e+01\n4.3484556474359856e+01\n-5.2399607209509256e+01\n-7.8050667926163868e+00\n2.6746390327310419e+01\n-3.7789814209837289e+01\n-6.8753241228721480e+00\n2.0068049161161767e+01\n-3.8806273260814514e+01\n-3.1600250735223425e+00\n-7.9307726322577805e+00\n-2.1717171876193369e+01\n-5.9167441325883088e+00\n2.0172258228520235e+01\n-3.9768875979877365e+01\n-2.8893108608272584e+00\n-9.6119936857038599e+00\n-2.1748981074217415e+01\n-3.7448737846197280e+00\n-2.2210268915505432e-01\n-2.3858974548434631e+01\n-2.8714563173258671e+00\n-9.5255316270799710e+00\n-1.9310215405684350e+01\n-2.9103966999676278e+00\n-8.9971805130527880e+00\n-2.0054565349885785e+01\n-3.7751963554815298e+00\n3.4468838266858082e-01\n-2.4084856054340179e+01\n-4.5693959256545362e+00\n1.5349259117482703e+01\n-4.6314610758778386e+01\n-3.1980181409085078e+00\n-2.8473089235599289e+00\n-2.4147069971703775e+01\n-2.5803657901119577e+00\n-8.8101760676464949e+00\n-2.0436043525198087e+01\n-3.4980664362852671e+00\n2.4008159863693481e+00\n-2.6884239524280368e+01\n-2.4787363296783242e+00\n-9.5132526740447538e+00\n-1.9545199637809144e+01\n-3.1353601156582402e+00\n-1.1119880080677875e+00\n-2.1997196562257706e+01\n-2.5115271141011637e+00\n-8.3036501278428254e+00\n-2.1054393125450247e+01\n-3.2567361133882571e+00\n2.6216647476285617e+00\n-2.6812241515448239e+01\n-5.3799030375117782e+00\n3.1785726979617952e+01\n-3.9462757074760219e+01\n-3.0335440369809494e+00\n-1.3614913358793155e+00\n-2.1961607394061179e+01\n-3.1664887045672794e+00\n2.2853160663762577e+00\n-2.6806101602719689e+01\n-2.4314822483547669e+00\n-8.2754931432326035e+00\n-2.1095018073729349e+01\n-5.2577447453761046e+00\n3.6205301423805473e+01\n-4.4931806736593870e+01\n-2.4430158869674097e+00\n-7.6735941019615135e+00\n-2.1381174095074595e+01\n-2.3325199739165163e+00\n-8.9115958193659086e+00\n-2.0150268097080730e+01\n-3.5660894168245836e+00\n1.8168978360729827e+01\n-4.3834813659480332e+01\n-3.4230962440894896e+00\n1.7548164751088969e+01\n-4.4424511492631304e+01\n-2.2611270195999582e+00\n-7.8491902265796396e+00\n-2.1653655954224952e+01\n-2.2360069766641986e+00\n-8.8882180527797843e+00\n-2.0130831554540933e+01\n-3.1489696903893902e+00\n1.6286015377822256e+01\n-4.6607894322569571e+01\n-3.0529829643701447e+00\n1.8008365845110912e+01\n-4.5594632386259953e+01\n-2.6405634284698971e+00\n1.5722852260131615e+00\n-2.4361958941511023e+01\n-2.0661555526451738e+00\n-7.0379272553069621e+00\n-2.2439806450643403e+01\n-2.5850212366281182e+00\n3.2214496319440267e+00\n-2.7726985529417892e+01\n-2.5404402830454251e+00\n1.5746366900793378e+00\n-2.4267184791465848e+01\n-2.2316935007564833e+00\n1.7673741270371536e+01\n-4.6665738430986643e+01\n-2.2915796424510626e+00\n3.6808659908049162e+00\n-2.8357747420531371e+01\n-2.1678310562310861e+00\n1.8595607109381508e+01\n-4.6942358834034337e+01\n-2.8365874516545588e+00\n2.4026445656860144e+01\n-3.8959590990160720e+01\n-1.9343906622914178e+00\n2.0937167852471529e+01\n-4.1838980169251982e+01\n-1.9210289494332506e+00\n2.0829057577311531e+01\n-4.1463478650701070e+01\n-8.8535263980981493e-01\n8.2690103608899808e+00\n-4.4043401428784840e+01\n-1.2024935064326507e+00\n1.6944019008585641e+01\n-4.7773996087508834e+01\n-1.5041738500244117e+00\n-8.8965113063771337e+00\n-2.0095792693903654e+01\n-1.5198899572592837e+00\n3.7691583157637147e+00\n-2.7660005245057214e+01\n-1.3010247896269784e+00\n-8.9476594919371628e+00\n-2.0363687506336206e+01\n-3.9074071910054553e-01\n1.8421164470464959e+01\n-4.7894482716718713e+01\n-1.0359471720125355e+00\n2.0929831535327370e+01\n-4.2751193667733162e+01\n-1.3847125853109314e+00\n2.4871296655648997e+01\n-4.0979485059582842e+01\n-4.0038468149910672e-01\n1.8723609168684682e+01\n-4.6221408448072587e+01\n-1.7734217741280505e+00\n3.1652355484530226e+01\n-4.0441444013442414e+01\n-1.2102583398789970e+00\n-8.6813915232091983e+00\n-2.0437776986033697e+01\n-6.7725368739469338e-01\n2.1088703444894232e+01\n-4.3332151798047711e+01\n-1.3102480469566549e+00\n3.3977099925388387e+01\n-4.3626307130790025e+01\n-1.0873367988389264e+00\n-8.7196461036161725e+00\n-2.0516090875509207e+01\n-1.3725348313440282e+00\n3.3541224713481057e+01\n-4.2127451747274542e+01\n-1.2911300133287880e+00\n3.4472086882453617e+01\n-4.2330759391341495e+01\n5.4495659979966937e-01\n9.4808584243058274e+00\n-4.4902222010094107e+01\n-1.2339371614615160e+00\n3.2673539707001034e+01\n-4.1011187834633780e+01\n-1.1659885397100718e+00\n3.1572196819153653e+01\n-4.0555764183988728e+01\n-9.2391541461182092e-01\n3.2139391840389074e+01\n-4.2431274552728475e+01\n-1.0798523813992797e+00\n3.2652046442123762e+01\n-4.1662462029479194e+01\n7.8118961856781854e-01\n1.7581447983517851e+01\n-5.0084806250313726e+01\n-9.5182743660430191e-01\n-8.4260442041862706e+00\n-2.0894506017012734e+01\n-4.1231926404439309e-03\n2.1325819008301405e+01\n-4.5011221031210660e+01\n-1.3510354534412770e+00\n2.7613407052681431e+00\n-2.2739477874055936e+01\n-9.5533634022427816e-01\n-8.4185649792261117e+00\n-2.0788851009396115e+01\n-9.2551049288048526e-01\n-8.3248524690287198e+00\n-2.0923493259768954e+01\n-8.4746214828482114e-01\n-8.3627530961461574e+00\n-2.1017453654711019e+01\n-8.1376088664557567e-01\n3.2511354115724998e+01\n-4.1696296136840651e+01\n-4.2640915251361389e-01\n3.6307460193695370e+01\n-4.6182704846836373e+01\n-7.0991161453154972e-01\n2.9830169467481682e+01\n-4.0533332142857326e+01\n-5.8500937699790256e-01\n3.4719345902935245e+01\n-4.2903555439500870e+01\n-5.5009130863516464e-01\n3.4491738589714856e+01\n-4.2548555324524216e+01\n-5.0967304413211623e-01\n3.3628136226514329e+01\n-4.2190610931798325e+01\n-1.1372671834534431e+00\n-9.0073820523111425e-01\n-2.0947818922916383e+01\n-4.7789500349558289e-01\n3.0675998726092491e+01\n-4.0891509092149960e+01\n1.5456753004065369e+00\n1.2002417068847581e+01\n-4.9032859793930285e+01\n2.6369541905849314e-01\n2.5426880209953080e+01\n-4.3154871913498859e+01\n1.0197053902883471e+00\n1.9393341523346987e+01\n-4.6812693610707541e+01\n-2.8452940297757162e-01\n3.0434110802360337e+01\n-4.1005516900515985e+01\n1.4071517668053052e-01\n3.5153939439482450e+01\n-4.5662263710455051e+01\n-1.4393502105474296e-01\n3.0854665028348691e+01\n-4.0957628657059871e+01\n-6.0939597142002554e-02\n3.5584886940013554e+01\n-4.3657029903955156e+01\n5.8191634429099504e-01\n4.0249076722260739e+01\n-4.9033891018255112e+01\n1.7201023963416151e+00\n1.0141893156812230e+01\n-4.6004730426234033e+01\n5.0720302667542394e-01\n3.3281982393553264e+01\n-4.4000712995692560e+01\n1.4533884517560900e+00\n4.7344742771318600e+01\n-5.5587313338728634e+01\n8.0083160732342329e-01\n3.7584829142247777e+01\n-4.7322830308721414e+01\n2.2098528230406950e-01\n2.8177784786780268e+01\n-4.0142072878851920e+01\n2.2098528230406950e-01\n2.8177784786780268e+01\n-4.0142072878851920e+01\n7.5813688332908669e-01\n3.3181432432617498e+01\n-4.4881109009142961e+01\n1.8036753659720191e+00\n1.8244720067856118e+01\n-4.7609410650989240e+01\n7.5334411029230886e-01\n3.1604773381521511e+01\n-4.3956915023251852e+01\n8.1805905005257695e-01\n3.4455974018713107e+01\n-4.5432495641403115e+01\n6.0880739519394900e-01\n3.6990533125689140e+01\n-4.5309090870920969e+01\n7.9175419871441954e-01\n3.7077491101900058e+01\n-4.5898333107253421e+01\n-7.7499890211803790e-01\n-5.0425754704507775e-01\n-2.1158644743934982e+01\n9.0603271436301169e-01\n3.1692757199669554e+01\n-4.4009945900259289e+01\n1.2810800468331049e+00\n2.2549410308386452e+01\n-4.3573692205266610e+01\n6.0920134126327719e-01\n3.5011361684411625e+01\n-4.3101643067923746e+01\n8.0958475921641115e-01\n3.2744433163244835e+01\n-4.3351009259478360e+01\n6.7292027733640714e-01\n3.4825655502908873e+01\n-4.3401795076610647e+01\n2.1814078517802651e+00\n9.8232498310754881e+00\n-4.5954112815194208e+01\n1.6753070014154412e+00\n2.1199682998984468e+01\n-4.5605189369552463e+01\n6.6920183034161351e-01\n3.2961034285222631e+01\n-4.2382479050479063e+01\n1.4226908893924337e+00\n4.0668117286564744e+01\n-4.9560809946319196e+01\n6.7261828484614927e-01\n2.7736864512630596e+01\n-4.0303720153715354e+01\n5.9413521804948677e-01\n2.7621021949663156e+01\n-3.9984753326489532e+01\n1.3337612941959718e+00\n3.6729237308753561e+01\n-4.6901474406635465e+01\n1.1548965641272300e+00\n3.6942470149884208e+01\n-4.5720375704579126e+01\n-6.9966231348319297e-01\n1.1793138653493089e+00\n-2.1274289918657427e+01\n9.8025592046313670e-01\n3.5228277934272164e+01\n-4.3335432052213868e+01\n1.1231422429676270e+00\n3.2622202521087125e+01\n-4.3141573355816206e+01\n1.6247780710763402e+00\n3.6565819976101864e+01\n-4.7080307636184465e+01\n1.6247780710763402e+00\n3.6565819976101864e+01\n-4.7080307636184465e+01\n-6.9835243824127202e-01\n-1.3550610898470554e+00\n-2.0097657639453548e+01\n2.8348347183739748e+00\n1.2085220921870420e+01\n-4.8470436973535598e+01\n1.3169448971122291e+00\n3.3102947992917287e+01\n-4.3323683521245798e+01\n-5.2915638098686490e-01\n1.8197557648367926e+00\n-2.2013876278538422e+01\n1.3958128607834603e+00\n3.6462019632784070e+01\n-4.4784533771368025e+01\n-5.7478914618524501e-01\n3.9759473925445354e-01\n-2.0934437271832035e+01\n-4.4082239826445935e-01\n2.9255135199660440e+00\n-2.2793893309218191e+01\n3.1130813605623997e+00\n2.6907176242807807e+01\n-5.0525666712193839e+01\n-6.0884525071026785e-01\n-1.1497175257894097e+00\n-2.0289575653247976e+01\n1.7387253647635785e+00\n3.2330524661523711e+01\n-4.4867733431938902e+01\n1.7387253647635785e+00\n3.2330524661523711e+01\n-4.4867733431938902e+01\n1.9396934736726767e+00\n3.6267933125470741e+01\n-4.6943626748291237e+01\n2.6823596340820881e+00\n9.1103262497437676e+00\n-4.4423705006377311e+01\n2.1786109061214245e+00\n2.2368511474804279e+01\n-4.3912526693528648e+01\n1.5491381851335331e+00\n2.8755164302563873e+01\n-4.1657088738903177e+01\n1.4612475140885532e+00\n2.7876042118571672e+01\n-4.0208269531021905e+01\n2.5627817415801442e+00\n2.1382053780641769e+01\n-4.5782336693920193e+01\n-4.2871469783402238e-01\n1.7814757042367657e+00\n-2.1265864207212591e+01\n1.9484004600391287e+00\n3.7225571146658368e+01\n-4.5412524049611953e+01\n-3.3135157977696394e-01\n-8.4664101829995086e+00\n-1.9525370058374570e+01\n1.9326624214820847e+00\n3.6405816150850164e+01\n-4.4375527729252497e+01\n3.3870431651847430e+00\n1.1395286143232916e+01\n-4.7334181281415191e+01\n-3.4730296757468510e-01\n1.1838990199959800e+00\n-2.0939801034223432e+01\n4.6377420331837849e+00\n1.7860703730575420e+01\n-5.5715666345563605e+01\n3.4559154957710128e+00\n1.0514544826552699e+01\n-4.5954042036437393e+01\n3.4330904543494634e+00\n1.0492387922170575e+01\n-4.5991215643184546e+01\n2.4622288462469766e+00\n2.3364086150432140e+01\n-4.2963083439972650e+01\n1.8461214106194923e+00\n2.7027590605254922e+01\n-4.0401747147570568e+01\n1.9381691906651706e+00\n3.3227861670529336e+01\n-4.2700079566539038e+01\n3.2704556154903761e+00\n4.2442657704708537e+01\n-5.2331600602645700e+01\n2.3465455330421068e+00\n3.6602317401369483e+01\n-4.4647025833596381e+01\n3.6363170246523517e-02\n-3.8627316102680611e+00\n-2.1159743311961982e+01\n3.2752966313611087e+00\n2.2055821552959593e+01\n-4.5935016227046241e+01\n2.7605106591568771e+00\n3.0825481609248691e+01\n-4.4494636393192707e+01\n2.6549006232087553e+00\n2.8931872374950554e+01\n-4.3289289989482754e+01\n2.6965509128703626e+00\n3.7621631629798969e+01\n-4.5997962154870116e+01\n2.6562976758114116e+00\n3.7106414061499834e+01\n-4.5250578988364815e+01\n2.7393040799462787e+00\n3.6897510497502118e+01\n-4.4981385154500458e+01\n3.0901085309627749e+00\n3.5492591063652249e+01\n-4.5792746616815542e+01\n2.4648984108372618e-01\n-5.6806851570032233e+00\n-2.1602305891534499e+01\n-1.0043057716915815e-01\n1.6382643917524551e+00\n-2.0898496895353144e+01\n3.8231634390249551e+00\n1.0079696696378004e+01\n-4.5181564938246517e+01\n3.8730924274038503e+00\n2.1239562240526812e+01\n-4.7351399324714897e+01\n3.0862824779354856e+00\n3.7782660402534951e+01\n-4.6201596283555027e+01\n3.0970854871404141e+00\n3.7780697925347106e+01\n-4.6088628322061247e+01\n-5.9237369346269081e-02\n1.1419080777119051e+00\n-2.0683395843198713e+01\n3.2465307664204928e+00\n2.4359119195415449e+01\n-4.3486939559893280e+01\n3.2909301763053009e+00\n3.0035890337764325e+01\n-4.4280053857247083e+01\n2.8578618847268995e+00\n2.8580767385964979e+01\n-4.1319099097519491e+01\n3.2013315611918212e+00\n3.0294454146439140e+01\n-4.3830410832900867e+01\n3.0293453375533756e+00\n2.9574611784507560e+01\n-4.2350159238395484e+01\n4.3760462182958442e+00\n4.1759368125610983e+01\n-5.1347370331884051e+01\n2.6322900226502399e-01\n2.7200810289429942e+00\n-2.2159614094377755e+01\n4.5649942152273421e-01\n-5.8246479177458523e+00\n-2.1391668278829584e+01\n4.3466231152705177e+00\n9.3323284700728006e+00\n-4.4572282246620567e+01\n3.9757872219918844e+00\n3.1272275199629306e+01\n-4.4735653539830643e+01\n4.3966540381655683e+00\n2.3431588986162918e+01\n-4.5976472803495277e+01\n6.1053689329312224e+00\n1.7653666917703749e+01\n-5.4124844978872062e+01\n1.4692121710078909e-01\n-8.3357626757955416e-01\n-1.9786498324384649e+01\n3.5521110401034588e+00\n3.0031908097661006e+01\n-4.2062700801908349e+01\n3.7702591502864466e+00\n2.8469096131744568e+01\n-4.2283790212331887e+01\n4.0862481897338903e+00\n3.4259311595027583e+01\n-4.4894353928842854e+01\n6.2932536367541791e-01\n-8.1512118901432054e+00\n-2.1015507079726305e+01\n7.0968921489149670e+00\n2.3785270250923286e+01\n-5.8254584043176827e+01\n4.8904784611411749e+00\n3.4351012166719137e+01\n-4.7699673993233517e+01\n4.6913246343177786e+00\n2.4199536310259784e+01\n-4.4908264642846710e+01\n4.6535980342662135e+00\n3.0447382011554517e+01\n-4.5068405302513781e+01\n4.4183455049442838e-01\n4.6882798802451919e-01\n-2.0297191829398574e+01\n5.2764237393588100e+00\n2.3097823660470006e+01\n-4.6828200957924672e+01\n4.1892224234112767e+00\n2.8772289823682655e+01\n-4.1863069125820253e+01\n4.3305905815723040e+00\n2.9981621885077598e+01\n-4.2706277921364148e+01\n4.6676416891554284e+00\n3.1009205410749733e+01\n-4.4165807880029369e+01\n4.6676416891554284e+00\n3.1009205410749733e+01\n-4.4165807880029369e+01\n5.1997727206018129e-01\n-6.0240927484516404e-01\n-2.0270659918949548e+01\n5.5826881272456790e+00\n2.9624721143868772e+01\n-4.8034180999144745e+01\n5.2700404997264672e+00\n3.1037493626065238e+01\n-4.5549465124114136e+01\n6.4873101311305357e+00\n2.2382620146714128e+01\n-5.0226617762023722e+01\n5.5688337688414462e+00\n2.2111205590254695e+01\n-4.6526003535654915e+01\n9.6193704670371905e-01\n-8.3342140836230794e+00\n-2.0990127607650383e+01\n5.7528291533957248e+00\n2.2084559671770279e+01\n-4.6467905436628079e+01\n6.7280881868901221e-01\n1.3562178846339630e+00\n-2.0405317501772945e+01\n6.7172633617763573e+00\n2.2395543506926025e+01\n-5.0240047208367024e+01\n5.6909286739106169e-01\n-3.6928537241414969e+00\n-1.9534478199719739e+01\n6.0427339065877543e+00\n2.2491281956808212e+01\n-4.7353046152065495e+01\n6.1117069395422927e+00\n3.4521873368859602e+01\n-4.8405942560311125e+01\n6.4685512293691065e+00\n2.2430946332094607e+01\n-4.8665319638250331e+01\n5.4192487906357636e+00\n2.5713195672321593e+01\n-4.4024809056854075e+01\n5.9178857008421470e+00\n3.1474546393800271e+01\n-4.6597635461992581e+01\n7.8444999516106628e-01\n1.1451784768156443e+00\n-2.0287773810554807e+01\n1.1955898536791463e+00\n2.0217922356736877e+00\n-2.2237457954013994e+01\n5.7483731519975629e+00\n2.5849018023346531e+01\n-4.4480946206847200e+01\n8.4411982493311544e-01\n1.2602598803765105e-01\n-2.0130672257078782e+01\n6.4127910155158452e-01\n-2.6289163635657409e+00\n-1.9209543856674792e+01\n6.3097452524196616e+00\n3.1643907290685135e+01\n-4.6832829091772204e+01\n5.8900347935937107e+00\n3.3168160347944955e+01\n-4.5177831013911344e+01\n7.2520604222091078e+00\n3.8855647828359139e+01\n-5.1188083197320836e+01\n5.8877148047381027e+00\n2.6070314928578593e+01\n-4.4279209223419059e+01\n1.0280502950522492e+00\n1.1995905109777072e+00\n-2.0428148347873851e+01\n6.2089356358498300e+00\n2.7261695826204420e+01\n-4.5126443991955739e+01\n1.1291398600560456e+00\n5.6335981029246185e-01\n-2.0937601656536845e+01\n6.1695763074594723e+00\n2.7108179264196117e+01\n-4.4519832651996950e+01\n7.5823348826899926e+00\n3.7828286069304490e+01\n-5.1166153514757653e+01\n1.0157486902684560e+00\n1.7752412293752204e+00\n-2.0235796586513317e+01\n6.0086131676787105e+00\n2.9569450423620179e+01\n-4.3484803612967660e+01\n6.0086131676787105e+00\n2.9569450423620179e+01\n-4.3484803612967660e+01\n8.3890967118779667e+00\n4.4142338354959577e+01\n-5.2870830081035123e+01\n7.3153956498802506e+00\n3.2543647345563691e+01\n-4.8061344656647499e+01\n7.9421620262141888e+00\n3.7288214317983247e+01\n-5.0934403027737048e+01\n8.7777772945339727e+00\n2.0336804886106489e+01\n-5.3503355365198431e+01\n1.6900418518333742e+00\n-8.2616574989782663e+00\n-2.1985829353023576e+01\n6.5580804369112871e+00\n2.9772455197432873e+01\n-4.3313095711345582e+01\n7.0514556798788774e+00\n3.3010242648812394e+01\n-4.5623261286411250e+01\n7.0514556798788774e+00\n3.3010242648812394e+01\n-4.5623261286411250e+01\n6.9991600906070612e+00\n3.2185894307225503e+01\n-4.5155193129912966e+01\n6.9991600906070612e+00\n3.2185894307225503e+01\n-4.5155193129912966e+01\n9.3453753766450038e+00\n2.1011763463629144e+01\n-5.4307048179504712e+01\n8.8000900680592711e+00\n3.8040662866914111e+01\n-5.2007886452924836e+01\n8.2352994841347193e+00\n3.4249702783921258e+01\n-4.9493528480302167e+01\n7.4617895941992636e+00\n3.4065616300776448e+01\n-4.6430367366168447e+01\n1.0564693121834858e+00\n-2.7853702479625442e+00\n-1.8890086020947436e+01\n1.6013961313868132e+00\n-2.6112360639902010e+00\n-2.0731823241002406e+01\n7.5757484007497427e+00\n2.7456889648785751e+01\n-4.5548757558929204e+01\n8.4766454418248198e+00\n3.4786967435231453e+01\n-4.8786891923197004e+01\n1.8340697028640343e+00\n-1.5925760700513729e+00\n-2.0914811986036430e+01\n1.8340697028640343e+00\n-1.5925760700513729e+00\n-2.0914811986036430e+01\n8.3399322521412174e+00\n1.0127376659171071e+01\n-4.6293594904264111e+01\n1.0162551266754285e+01\n3.6103872928408677e+01\n-5.1918778906074238e+01\n8.4524731248865912e+00\n1.0060246201999814e+01\n-4.5733564866986001e+01\n8.6159724223708434e+00\n2.6355061366665225e+01\n-4.5415552081037653e+01\n1.5668644284766198e+00\n-6.7526972166093047e-02\n-1.9079867902564899e+01\n1.0491097837315708e+01\n2.3545506600133699e+01\n-5.0034971924182344e+01\n9.1185743352328110e+00\n2.7632004666168118e+01\n-4.5132131462846829e+01\n2.5603174101033819e+00\n-3.1417824594759125e+00\n-2.1781445759902439e+01\n1.1006261994007385e+01\n2.5850215843064824e+01\n-4.8207184150818890e+01\n1.1534913128984364e+01\n2.7503500935940639e+01\n-4.9345821685274203e+01\n1.1828100127920857e+01\n2.7140534260351803e+01\n-5.0136745693275827e+01\n-1.2141664306201349e+01\n2.0198016693927023e+00\n-7.3128093333218205e+00\n-2.4636205038310738e+01\n3.4501531457349106e+00\n-3.4938066784419590e+01\n-5.5356054932304474e+01\n4.9111588862741677e+01\n-8.8093475216305805e+01\n-4.9035332386342425e+01\n3.0602938280071616e+01\n-8.5947568334425057e+01\n-5.1246050109375709e+01\n4.2437735648505608e+01\n-8.3814234532226806e+01\n-4.0829343368561396e+01\n4.0069867858995863e+01\n-6.4431106038377493e+01\n-4.4155909478491026e+01\n4.7358420664930236e+01\n-6.8707466078373017e+01\n-4.5265835445120082e+01\n3.7465848518079220e+01\n-7.7741912430465305e+01\n-3.4843985043068272e+01\n3.3818494123860091e+01\n-5.4335597792463766e+01\n-4.5854352723504938e+01\n4.2286043280764027e+01\n-7.6672547731043892e+01\n-4.3712145140643322e+01\n4.4653586648181140e+01\n-7.0893494311721213e+01\n-4.3678758261066093e+01\n3.5578415334689453e+01\n-7.7043185522242581e+01\n-3.6383090358216990e+01\n3.6477139315361079e+01\n-5.8277714710245490e+01\n-3.3774883192334379e+01\n2.7243399686008281e+01\n-6.1657497882652613e+01\n-3.3008458979963713e+01\n2.8033341039420275e+01\n-6.0797237993181575e+01\n-2.7248357078817932e+01\n2.8307193692106786e+01\n-4.6453097077829426e+01\n-3.2015514434684071e+01\n3.6935549892292322e+01\n-5.3469288723712708e+01\n-2.9386361020009513e+01\n2.9737766073215361e+01\n-5.0950476212188782e+01\n-2.5619100914260340e+01\n2.5078810406896757e+01\n-4.3285935711985992e+01\n-3.0353274531940443e+01\n2.9694551676752500e+01\n-5.3752953673317137e+01\n-2.6875675289123915e+01\n3.0121863924055251e+01\n-4.4853203181786299e+01\n-2.7060310048605071e+01\n2.5741258990954179e+01\n-4.8408109957389549e+01\n-4.0676932765601343e+01\n5.5017407486837264e+01\n-6.8264136954295537e+01\n-2.3963415364119406e+01\n2.6488328664137132e+01\n-3.9859167875253014e+01\n-2.5232583002429248e+01\n2.4580046657743122e+01\n-4.4852385243199599e+01\n-3.0159188127752337e+01\n3.7289748539811448e+01\n-5.0684312149750056e+01\n-2.2139386343070299e+01\n2.0138918502777102e+01\n-4.1484946020278691e+01\n-2.2914763948735697e+01\n2.1931076210109513e+01\n-4.2743596717762536e+01\n-2.2914763948735697e+01\n2.1931076210109513e+01\n-4.2743596717762536e+01\n-2.0508023461627584e+01\n1.9856347842976959e+01\n-3.7667202684139824e+01\n-2.9215170532884823e+01\n4.3580570890903992e+01\n-5.2663783759955166e+01\n-1.7375027628491260e+01\n1.9286949136831716e+01\n-3.2275670637070341e+01\n-1.3210687475663301e+01\n-4.1262754000162533e-01\n-3.2732285251715908e+01\n-1.8659998847666003e+01\n2.4049003009500410e+01\n-3.4534064999088116e+01\n-1.2854009913652272e+01\n-6.6531078456144122e-01\n-3.2143502732782203e+01\n-1.6984968645101514e+01\n1.0210868882963998e+01\n-3.9649229107449820e+01\n-1.6552878267427889e+01\n1.1824273250087320e+01\n-3.8425709639814187e+01\n-2.3697322128594880e+01\n3.6049676089069237e+01\n-4.6764090338658747e+01\n-2.3598370600900960e+01\n3.6263644106514064e+01\n-4.6347683581699528e+01\n-1.7501480544563567e+01\n1.3018669837324149e+01\n-4.2183129039981836e+01\n-2.2413642647423050e+01\n3.4719448076093151e+01\n-4.3914932054561788e+01\n-1.6292322556076925e+01\n1.6490719918979334e+01\n-3.4580013210039581e+01\n-2.2967084899355054e+01\n3.4884358718054585e+01\n-4.6383946094037178e+01\n-1.6227767288423639e+01\n1.5875087006756424e+01\n-3.5347405230119975e+01\n-2.2539704087363369e+01\n3.5134480807830109e+01\n-4.5518898778987825e+01\n-2.1753712228375974e+01\n3.4580069683611519e+01\n-4.3745130041179287e+01\n-2.2322452511706043e+01\n3.4850776038476475e+01\n-4.5887830504215522e+01\n-2.2791506627799279e+01\n3.5919367950646979e+01\n-4.7196413401444943e+01\n-2.3943144945839766e+01\n3.8758110339320218e+01\n-5.0198914042579794e+01\n-2.2289344952408808e+01\n3.5155853431328026e+01\n-4.5731504235588353e+01\n-2.2468413936181573e+01\n3.6557895231962242e+01\n-4.7314416851891579e+01\n-1.5726945556036831e+01\n1.4256015471589363e+01\n-3.7358079391073368e+01\n-1.5297804151307215e+01\n1.3002342856262299e+01\n-3.7642927914423218e+01\n-2.1620441475084810e+01\n3.5495026859117054e+01\n-4.5484392467519832e+01\n-1.5099775921334015e+01\n9.7198795556867168e+00\n-4.0327596832570919e+01\n-1.3512679555176490e+01\n3.8866518163100912e+00\n-3.7154074012193171e+01\n-1.5480602605578987e+01\n1.6074002236388768e+01\n-3.5877975270059338e+01\n-1.5699084012481464e+01\n1.0799232516023419e+01\n-4.2067868709215197e+01\n-1.5885502298879668e+01\n2.2216865162133210e+01\n-3.2954590088129379e+01\n-1.5704917788868775e+01\n1.2888725433345417e+01\n-4.0537840635937222e+01\n-2.2955027712634845e+01\n3.9676536234473460e+01\n-5.0514653967723923e+01\n-1.5206450786896964e+01\n1.2399924166549734e+01\n-4.0101987315552421e+01\n-8.2410594844264402e+00\n-6.0695250918254233e+00\n-2.4156073983427511e+01\n-1.5161882787750738e+01\n1.2932474944659678e+01\n-4.0766529040141286e+01\n-1.4710421855524999e+01\n1.9616083618230302e+01\n-3.3401288356096401e+01\n-1.4518596509625651e+01\n1.9274635370047829e+01\n-3.2825556119295356e+01\n-1.4458448314768827e+01\n1.6885270174781162e+01\n-3.4732515293311195e+01\n-1.5230263910367773e+01\n2.5754079969046632e+01\n-3.4516624980468400e+01\n-7.0831891881636846e+00\n-6.8868599917107645e+00\n-2.3077575445548618e+01\n-1.3387788316062515e+01\n1.9533338136118509e+01\n-3.4954878495419145e+01\n-7.4968010584219043e+00\n-5.1419101801247438e+00\n-2.4537811775112296e+01\n-2.2252154906082470e+01\n5.1468544599598005e+01\n-5.8965356977268783e+01\n-1.2729467887272531e+01\n1.9281294063219303e+01\n-3.2812277524550034e+01\n-9.0269786248649133e+00\n-5.9706572550431505e-02\n-3.2126978968097546e+01\n-8.8916671030658954e+00\n-4.1142204626578055e-01\n-3.1766738601027580e+01\n-1.1997413460941564e+01\n1.6805835087361473e+01\n-3.8168338308814661e+01\n-1.3586298774270034e+01\n3.0349723373720586e+01\n-3.6948997131343546e+01\n-9.0506210421860516e+00\n2.5431007037544942e+00\n-3.4926013735048770e+01\n-1.1730623629765434e+01\n2.0359725741435820e+01\n-3.5525784166998491e+01\n-8.6755178707126479e+00\n2.2719112648147122e+00\n-3.5168885231305723e+01\n-5.3884965330948900e+00\n-9.9721896628361968e+00\n-2.3161123293557765e+01\n-5.9542872022964319e+00\n-6.8089252985114923e+00\n-2.4642600216708058e+01\n-8.3720574552921292e+00\n2.0430193749104113e+00\n-3.4584055937046266e+01\n-1.0694599142700538e+01\n1.4062641676074310e+01\n-4.1290632007575695e+01\n-1.0661498705105945e+01\n1.4444372534945412e+01\n-4.2230145021144629e+01\n-5.3316605123359082e+00\n-7.6180866744716580e+00\n-2.2084544335806836e+01\n-1.0615296243353816e+01\n2.1012742398634956e+01\n-3.5181760940694353e+01\n-1.0297044961070059e+01\n1.7580914299833566e+01\n-3.8625361713845770e+01\n-1.0260603671441588e+01\n1.4276541373997166e+01\n-4.3339517732252006e+01\n-9.0474439906274728e+00\n1.1255085457144192e+01\n-4.7912485339919755e+01\n-8.5529284566634196e+00\n1.4999871307410608e+01\n-4.3348556908326138e+01\n-1.2323579924474302e+01\n3.6096345235995976e+01\n-6.4536790164717530e+01\n-8.3280359402077515e+00\n1.4156266973513434e+01\n-4.3747506964799811e+01\n-3.8917001530375659e+00\n-9.0372796909382931e+00\n-2.0272915490323076e+01\n-8.2539765448749520e+00\n2.0752052295387077e+01\n-3.5863655225323221e+01\n-7.5715632214867146e+00\n1.9491342565704262e+01\n-4.0110210966738777e+01\n-6.9376989874348638e+00\n1.5876907345117161e+01\n-4.4815797179583818e+01\n-7.5555803809886717e+00\n2.5277485964169223e+01\n-3.7795521349738344e+01\n-6.8159025095336920e+00\n1.6785672459857068e+01\n-4.6495027856696893e+01\n-6.7403928418867993e+00\n1.8840916281146651e+01\n-4.0540603478330496e+01\n-3.2509603751250031e+00\n-8.9474274800195897e+00\n-2.0125064625618851e+01\n-3.2509603751250031e+00\n-8.9474274800195897e+00\n-2.0125064625618851e+01\n-3.1875347204209628e+00\n-9.0718547710625526e+00\n-2.0241848439822409e+01\n-3.1816258672643754e+00\n-8.5228849020691744e+00\n-2.2428471297748953e+01\n-6.3526816500859553e+00\n2.2284914073687652e+01\n-3.7320214090648896e+01\n-3.1322847590170744e+00\n-7.6994088113213808e+00\n-2.2109816702128740e+01\n-3.1396680644752255e+00\n-8.1180131603789203e+00\n-2.1282823181216784e+01\n-3.5783003829493389e+00\n-2.3394923586572314e+00\n-2.4458023540720745e+01\n-5.2931654468307716e+00\n1.6175261585059594e+01\n-4.4518084818307727e+01\n-2.7615738384291757e+00\n-9.1342778987189561e+00\n-2.0024514034068943e+01\n-2.7866505042469312e+00\n-9.4291067334741818e+00\n-1.9415175178149266e+01\n-3.5584810193315040e+00\n-5.4816412923898050e-01\n-2.2792455434181779e+01\n-4.5371814259511236e+00\n1.6729558561056184e+01\n-4.6408434412151301e+01\n-4.5322384621585980e+00\n1.6309790238430434e+01\n-4.5265534627613910e+01\n-3.3747188834910493e+00\n-2.2576270797140732e-01\n-2.2708826535628944e+01\n-2.6202974565658321e+00\n-8.3038900891098155e+00\n-2.1048296628809549e+01\n-3.2857447366923647e+00\n1.8303242843896097e+00\n-2.5624013601721806e+01\n-3.2769810293309884e+00\n1.9956110434650958e+00\n-2.6059684395953624e+01\n-2.5391467451644254e+00\n-7.8583186764664017e+00\n-2.1689941461358810e+01\n-2.3494503476478532e+00\n-1.0163899431400282e+01\n-2.1130172099465451e+01\n-2.4167958150518878e+00\n-9.5443869330800233e+00\n-1.9545176612904321e+01\n-2.5063719744805808e+00\n-8.1331636686873736e+00\n-2.1299323425379026e+01\n-3.0360421327274532e+00\n-1.4509491911053722e+00\n-2.1531233145141456e+01\n-3.7711770119377714e+00\n1.7768507712389994e+01\n-4.4732205115088519e+01\n-3.6250639867758849e+00\n1.6914246986605011e+01\n-4.5812474822212707e+01\n-2.3610029452737917e+00\n-7.7544281528398162e+00\n-2.1899496075445544e+01\n-2.1998736169907871e+00\n-9.1833622782789952e+00\n-1.9674998361416662e+01\n-2.2564788415368349e+00\n-8.2755516601075332e+00\n-2.0382420804302207e+01\n-2.0742108536482378e+00\n-8.1262867725896797e+00\n-2.2190545099206865e+01\n-2.6545137207101850e+00\n2.0922946653197436e+00\n-2.5398892947853120e+01\n-2.2853091568435309e+00\n-3.5388401972102379e+00\n-2.2829204081547346e+01\n-1.5162775464637011e+00\n1.7980321218418371e+01\n-4.8128261609814750e+01\n-1.6554655529770870e+00\n1.8406094614199496e+01\n-4.5665778313728779e+01\n-2.4759367333575324e+00\n2.4434928656221164e+01\n-3.9874362602466171e+01\n-2.6816112360135635e+00\n2.9547017432225569e+01\n-4.0803589593886009e+01\n-1.4853448224409416e+00\n-8.4870306795698767e+00\n-2.0720418905316361e+01\n-1.4238930330239066e+00\n-8.4213961226976863e+00\n-2.0835111437294326e+01\n-1.5585789534941066e-01\n1.4479301988155065e+01\n-5.2389879580536423e+01\n-1.2538670289141056e+00\n-9.6032784609235602e+00\n-2.1490066831865516e+01\n-1.3537669577267053e+00\n-8.4752187024142316e+00\n-2.0750057354582662e+01\n-1.3237615980651602e+00\n-8.9114169588100225e+00\n-2.0266372116641527e+01\n-1.2636886948851387e+00\n-8.2986620035531509e+00\n-2.0963145793504545e+01\n-1.2188911270477751e+00\n-8.8702777893472557e+00\n-2.0537714712364409e+01\n-1.1315690329620920e+00\n-8.8347744424410362e+00\n-2.0560247394759664e+01\n-1.1071234794486204e+00\n3.3895695458921679e+01\n-4.4344370663729116e+01\n-1.0594639603957829e+00\n3.7781106928907775e+01\n-4.6647919081441884e+01\n-1.4039219902269788e+00\n3.0400164302201111e+00\n-2.3928095452166751e+01\n-1.2419995850129055e+00\n3.0246800760391690e+01\n-3.9970200767780909e+01\n5.6212256343649769e-01\n1.7564555635083309e+01\n-4.9584327977115507e+01\n-1.2882651845514310e+00\n2.0401721514987345e-01\n-2.2430189394345536e+01\n-1.0456443310185752e+00\n2.9678666622911120e+01\n-4.0037949961907444e+01\n-1.0515660576364978e+00\n3.2554803459711906e+01\n-4.1395031236686918e+01\n-8.3746313115602644e-01\n3.6022164099122485e+01\n-4.4627905202524971e+01\n-3.1377640515115941e-02\n4.1222582005750255e+01\n-5.0041271061027629e+01\n-8.6204864776004653e-01\n-8.4182660321733636e+00\n-2.0767198625734064e+01\n-5.7553185248677352e-01\n3.1819484558082802e+01\n-4.1459299416003581e+01\n-5.7553185248677352e-01\n3.1819484558082802e+01\n-4.1459299416003581e+01\n-7.7073808440427349e-01\n-8.3834019515242719e+00\n-2.1074565883890422e+01\n-1.4084665141192923e-02\n2.3676790313835287e+01\n-4.1350475389055319e+01\n3.4044328366476229e-01\n2.3952866838270115e+01\n-4.4174928292673684e+01\n1.7735282862933707e-01\n2.3133119677364501e+01\n-4.2835182288351177e+01\n-4.7196010219979651e-01\n2.9496454892267721e+01\n-4.0396688665776708e+01\n-4.4918521789337285e-01\n3.0093440463721890e+01\n-4.0746739502703534e+01\n-1.1337352654424548e+00\n2.8029289979774621e+00\n-2.2444699103056468e+01\n-3.4300002359609028e-01\n3.2008778486496610e+01\n-4.2038077300808851e+01\n-3.4855197525009424e-01\n3.1444156926355578e+01\n-4.1229093174627671e+01\n-1.0395202407853772e+00\n-9.3520871304748165e-01\n-2.0917488284489824e+01\n-7.9264593155545016e-01\n3.3591344385927036e+00\n-2.3737039120325509e+01\n-7.7558175657961081e-01\n3.4047014285313537e+00\n-2.4092070995437716e+01\n5.7086651327720742e-02\n3.2693161903376200e+01\n-4.1524522891967578e+01\n1.5981557234742694e-01\n3.0518400244046067e+01\n-4.0653492583096416e+01\n2.9325839719443886e-01\n3.4236249718670543e+01\n-4.2756153593027307e+01\n7.9006225957195331e-01\n2.3494182801264774e+01\n-4.1935935128308728e+01\n5.0916882037050903e-01\n2.9493686498247275e+01\n-4.1808292376018251e+01\n1.7362606231301676e+00\n8.6457674651034839e+00\n-4.3941106574618978e+01\n1.0494848906876957e+00\n2.2521222417261164e+01\n-4.3328454043017572e+01\n-7.7843582772623987e-01\n-1.7763591466691822e+00\n-2.0714737313247312e+01\n-7.6971934811480636e-01\n-3.2130764819594386e+00\n-2.0425944991840847e+01\n1.0202561806282229e+00\n3.3805451020404178e+01\n-4.5104585970378274e+01\n1.0202561806282229e+00\n3.3805451020404178e+01\n-4.5104585970378274e+01\n8.2250376495380928e-01\n3.1082632424258431e+01\n-4.1596684485356256e+01\n7.8285872816635560e-01\n2.9103139712861793e+01\n-4.0448059085235542e+01\n7.8285872816635560e-01\n2.9103139712861793e+01\n-4.0448059085235542e+01\n8.8363205390509847e-01\n3.2948731120113884e+01\n-4.2769430261603780e+01\n-5.0241375391395993e-01\n-3.8250268995437917e+00\n-2.1128355728557388e+01\n8.5965614860753470e-01\n2.8066957266912187e+01\n-4.0237380360487492e+01\n8.3232913469098302e-01\n2.7809001424419119e+01\n-3.9977390022951219e+01\n1.8028521701311446e+00\n3.9137381327935323e+01\n-4.9112255561018308e+01\n1.2859689695687773e+00\n2.8511838980544546e+01\n-4.1997962090448503e+01\n1.1113221329601695e+00\n3.2489459748695594e+01\n-4.2676038168234626e+01\n-5.8139677502563603e-01\n-4.7417233217814442e-01\n-2.0952753437413925e+01\n-6.4890220110537866e-01\n-1.0939694004665843e+00\n-2.0307971226392329e+01\n1.2203187788575458e+00\n2.5268747244473751e+01\n-4.0247794188407674e+01\n2.2115564650997359e+00\n2.1805543521954714e+01\n-4.5752057947790362e+01\n1.5514986619379258e+00\n2.8193152426792068e+01\n-4.1642237369658375e+01\n1.3618439925392134e+00\n2.8857835809172983e+01\n-4.1140166310373282e+01\n2.1938709111596966e+00\n2.6589646682821837e+01\n-4.5307173586183957e+01\n2.2296484902687186e+00\n3.8995166965887307e+01\n-4.8625751920690142e+01\n-1.4706876613829009e-01\n3.7942999610592270e+00\n-2.3701747637371994e+01\n2.2703996331759400e+00\n2.5033839020018942e+01\n-4.2525478041684707e+01\n3.1780039774481428e+00\n2.2637832173791157e+01\n-4.7272094879595102e+01\n4.5606858555195320e+00\n2.1894884579780896e+01\n-5.5212866780742466e+01\n-1.3708966113999663e-01\n2.5396102099372677e+00\n-2.2221449363580867e+01\n6.9961443444846105e-01\n4.3340337393329476e+00\n-2.6328185949214635e+01\n2.8274331969688329e+00\n2.5314384746280719e+01\n-4.2846339762902616e+01\n2.9889573887961554e+00\n3.1785276994587850e+01\n-4.4986793227750219e+01\n5.6766861849674308e+00\n2.0513434745879525e+01\n-5.6614371187404707e+01\n3.1785231587563928e-01\n2.8294511638868660e+00\n-2.2526911903768344e+01\n9.7450308718570702e-02\n1.0241806216090361e+00\n-2.0237637843503226e+01\n3.1703372827930387e-01\n1.0478964379908775e+00\n-2.1146222639333732e+01\n4.0217394560217956e+00\n3.5586546279895813e+01\n-4.5507499783521261e+01\n4.5232065393032350e+00\n2.4885182415407964e+01\n-4.7117341357295821e+01\n6.6843132931709386e+00\n2.2433936531125426e+01\n-5.7061078872674095e+01\n4.3705627362706325e+00\n2.5598532157498443e+01\n-4.3452994713410945e+01\n5.3082377032920567e+00\n3.4197997209923898e+01\n-4.7699953736229645e+01\n4.8162964295195554e+00\n3.2389974958229352e+01\n-4.5320709109099504e+01\n4.5332673681903861e+00\n2.7185612103850467e+01\n-4.2299845736150381e+01\n4.8190459731044060e+00\n2.6281851426075171e+01\n-4.3691811234364550e+01\n4.5171712076890200e+00\n2.8932422190994227e+01\n-4.2195501193924251e+01\n4.5926218922464663e+00\n2.9325996955958374e+01\n-4.2734707926333947e+01\n6.2047114689657432e+00\n3.8750391323879150e+01\n-4.9498448195532440e+01\n7.1314114761915448e-01\n-7.6469876196728603e-01\n-2.0244685966354044e+01\n6.2852546224671473e+00\n2.3121561121488895e+01\n-4.7608520227363805e+01\n6.0230795852092989e+00\n2.2675122219136892e+01\n-4.6584313059475534e+01\n6.6570730152371693e-01\n3.2504308092002293e-01\n-1.9711709716208379e+01\n5.7922022474344681e+00\n2.5380910300891856e+01\n-4.4707730099692419e+01\n5.6217605476555468e+00\n3.2470535173062444e+01\n-4.4412920304521911e+01\n8.6807875004364210e-01\n1.7387241173424439e+00\n-2.0750842279714927e+01\n5.6432839912070856e+00\n2.8568397470413547e+01\n-4.2389479637495022e+01\n7.3280719525012863e+00\n2.2279845594173352e+01\n-4.9164323905768633e+01\n6.4513131059823090e+00\n2.6387491135113347e+01\n-4.4798862722859923e+01\n8.2553084290572247e+00\n1.9954039763434015e+01\n-5.2416403875150053e+01\n7.8370734420702099e+00\n2.1931766381834894e+01\n-4.9820659529767028e+01\n6.6366140266109195e+00\n2.6228436887427357e+01\n-4.4502063420002408e+01\n6.7756514011797577e+00\n3.3061780842800388e+01\n-4.4998630797872742e+01\n6.9275567811931049e+00\n3.3706749836811952e+01\n-4.5902119998451774e+01\n7.1666654538116008e+00\n2.7806555341078063e+01\n-4.6485211489949329e+01\n8.3736605711757086e+00\n2.1255590711150244e+01\n-5.1081523089338972e+01\n7.1679011070036962e+00\n3.4236173847323762e+01\n-4.5618974026080735e+01\n7.3164713225469349e+00\n2.7503209485821973e+01\n-4.5996113879403744e+01\n7.2167602645543409e+00\n3.1974546438106898e+01\n-4.5178237301538900e+01\n9.0454461609145032e+00\n1.4022457755918882e+01\n-5.0775240431768282e+01\n8.3319717403534987e+00\n2.7282027387670748e+01\n-4.7760362135198960e+01\n9.3061531438159228e+00\n3.6799340589730782e+01\n-5.1387664421869864e+01\n9.3061531438159228e+00\n3.6799340589730782e+01\n-5.1387664421869864e+01\n7.6720466228595994e+00\n3.0201238129370392e+01\n-4.4487673040714554e+01\n2.1745281202874391e+00\n-3.7152877321505153e+00\n-2.1252619631896824e+01\n2.7221406094348866e+00\n-5.3265996329154230e+00\n-2.2920343825464382e+01\n2.3595811459653895e+00\n4.2653919294899734e-01\n-2.1285404896953050e+01\n1.0858320711208714e+01\n2.6493521622451055e+01\n-5.0596284302429382e+01\n2.1050851738606862e+00\n-2.9121373890819484e+00\n-1.9845881876653909e+01\n1.0139772527210436e+01\n2.6579797485753648e+01\n-4.6594673355279433e+01\n1.0139772527210436e+01\n2.6579797485753648e+01\n-4.6594673355279433e+01\n1.2055645215648386e+01\n3.2807535765531121e+01\n-5.2805276535899843e+01\n1.4660875129480337e+01\n2.1752776679877496e+01\n-6.0444090041081239e+01\n-1.2914038630332826e+01\n2.8700434181559569e+00\n-7.4252607154461252e+00\n-4.7310597681444413e+01\n3.7949301279517961e+01\n-7.9973704637534922e+01\n-4.3931762136153189e+01\n4.2485233444149593e+01\n-7.2170796872255863e+01\n-3.7320860635113405e+01\n3.6298945127819550e+01\n-6.2977079362005618e+01\n-3.2050400885090973e+01\n3.7132156222346573e+01\n-5.2537291333780139e+01\n-3.3975510910917173e+01\n4.0268636791576604e+01\n-5.5754488559183152e+01\n-3.1654490070617854e+01\n3.8220941741138738e+01\n-5.2052502751856700e+01\n-2.6234947557022004e+01\n2.7650882145919191e+01\n-4.4146448663765504e+01\n-3.4483537142742712e+01\n4.2568164000231995e+01\n-5.8298483119667438e+01\n-4.0880036257502212e+01\n5.4841591809809110e+01\n-6.8978709707160661e+01\n-2.4692989251563439e+01\n2.3027149134142018e+01\n-4.5730364733755657e+01\n-1.9108682144219696e+01\n1.8433694761177300e+01\n-3.6009096864861554e+01\n-1.4073066178703892e+01\n6.1999712984554645e-01\n-3.4085135604834200e+01\n-1.7527091340273053e+01\n1.5491254631651488e+01\n-3.5942560440065584e+01\n-1.6991680515372501e+01\n1.8929921827848876e+01\n-3.1960806484227021e+01\n-2.4969450051717342e+01\n3.7072798913063146e+01\n-4.7217392501919797e+01\n-1.6101941676226154e+01\n1.8005796485276129e+01\n-3.2710129106424930e+01\n-1.6149968986877720e+01\n1.4744529447452805e+01\n-3.6498294847339139e+01\n-1.7948898156822988e+01\n1.5934550713890603e+01\n-4.4473321370723518e+01\n-2.2144009851047166e+01\n3.5504466196869039e+01\n-4.5473880521243331e+01\n-2.3494821543350533e+01\n4.0160319686150672e+01\n-4.8947232390347203e+01\n-1.5375855067885130e+01\n1.6754743548071737e+01\n-3.3658885853547112e+01\n-1.5616232678377866e+01\n1.7109444472608406e+01\n-3.4347350321165919e+01\n-1.5700164143126621e+01\n1.3808685765170706e+01\n-3.7712264990522321e+01\n-1.5262292331609130e+01\n1.8416819493774341e+01\n-3.2201167669196614e+01\n-2.2967004621428760e+01\n3.9605420240354206e+01\n-4.9394340260568370e+01\n-1.5408495597400998e+01\n1.2126501364302756e+01\n-3.9170691670652253e+01\n-1.5703029572955401e+01\n1.3474195673031728e+01\n-3.9254982724318658e+01\n-1.6559729347097182e+01\n2.3885586061048205e+01\n-3.4366933202841558e+01\n-1.5363498716356327e+01\n1.0805776159689742e+01\n-4.1514623932477193e+01\n-1.4653377921659798e+01\n1.8621688895663446e+01\n-3.2442459573541832e+01\n-1.4552439142650496e+01\n1.6284935311947784e+01\n-3.5441456080960478e+01\n-1.5438700606590277e+01\n2.5784727126175685e+01\n-3.4951564147342978e+01\n-1.3931553220518213e+01\n1.2991337163350138e+01\n-4.1030717847504690e+01\n-1.5531324268989948e+01\n2.7347322321511740e+01\n-3.6199701452056587e+01\n-1.2848545514420238e+01\n1.9797239995370241e+01\n-3.4731790627800969e+01\n-1.2138953194161120e+01\n2.0030483322737616e+01\n-3.3863706477634352e+01\n-6.0947737961591306e+00\n-7.4929602698173152e+00\n-2.4574187956477125e+01\n-2.4008190537154427e+01\n6.9749899817340051e+01\n-7.5913730787188356e+01\n-1.1237933353979765e+01\n1.8498016250314553e+01\n-3.6852770105755191e+01\n-1.1200282676007394e+01\n1.8183141099952405e+01\n-3.6273494762340761e+01\n-8.8029514837131302e+00\n3.0105304154838439e+00\n-3.6636410096374597e+01\n-5.8393560685905666e+00\n-6.4782691623449900e+00\n-2.3783151604915133e+01\n-8.4023026390526088e+00\n3.1285679907261610e+00\n-3.5986738332895627e+01\n-1.0670191596204683e+01\n2.0134034569816940e+01\n-3.6676946485431962e+01\n-1.0004642858907774e+01\n1.1499063958373123e+01\n-4.5675044154897392e+01\n-7.0490413554102416e+00\n7.1721928587810779e-01\n-3.2899589818347138e+01\n-9.9061462046096640e+00\n2.1052386294407878e+01\n-3.5248301070222134e+01\n-4.6902360371163265e+00\n-9.9168230154443204e+00\n-2.2545509873661260e+01\n-7.3014340964872071e+00\n1.9035127750582035e+00\n-3.4826558020336996e+01\n-4.8963540862252382e+00\n-7.0616304783606063e+00\n-2.2840094011255825e+01\n-9.3069478100287863e+00\n2.1241064257619310e+01\n-3.5505759879670805e+01\n-4.6429122557863600e+00\n-7.5453978109886917e+00\n-2.2224625697787708e+01\n-4.2746668035357160e+00\n-8.6857598549807626e+00\n-2.0713023383904964e+01\n-4.3204610108712345e+00\n-8.6340095067432721e+00\n-2.0581005631656836e+01\n-8.9535477430271033e+00\n2.1296179201257196e+01\n-3.6038333471586661e+01\n-7.4895572387525613e+00\n8.0523364305625744e+00\n-4.2806514072169890e+01\n-8.1081474961830740e+00\n1.9248106310475503e+01\n-3.9454839870678008e+01\n-3.6138136802130312e+00\n-9.8001178569751044e+00\n-2.1950063201453634e+01\n-7.4905284955073403e+00\n2.4945029154624827e+01\n-3.4974585740387610e+01\n-6.6225383814817809e+00\n2.2789693958479187e+01\n-3.8085723284320011e+01\n-3.3163450978092581e+00\n-7.9081377188155964e+00\n-2.1619884332261762e+01\n-9.1058616519062987e+00\n7.0057968535865385e+01\n-7.5649370731965035e+01\n-2.6307534666313681e+00\n-9.2936911981530042e+00\n-1.9014780890024383e+01\n-2.5797727924058784e+00\n-7.8385397535727410e+00\n-2.1800293668116637e+01\n-2.8263540678294352e+00\n2.8529872866983550e+00\n-2.7163628310965155e+01\n-3.0766114585218292e+00\n1.9917139043198404e+01\n-4.3414067545399490e+01\n-3.3072770160490266e+00\n2.3908153988070147e+01\n-3.9671119610797227e+01\n-2.2822784778525809e+00\n2.6888442259911831e+00\n-2.5903053918843764e+01\n-1.7738499493792643e+00\n-8.1411583674618928e+00\n-2.1278380703546802e+01\n-1.8002179884710936e+00\n-9.5304210773633304e+00\n-1.9155695871800859e+01\n-1.3231184131324931e+00\n8.3913959237326488e+00\n-4.3555953414719596e+01\n-2.0506199426251039e+00\n3.4825511581704411e+00\n-2.7841474064097749e+01\n-1.4361313303676264e+00\n-8.9080000847968428e+00\n-2.0093379808206379e+01\n-1.3352998418192275e+00\n-8.3224399304467358e+00\n-2.0941872629640731e+01\n-1.4049379480992652e+00\n-2.4523626141547190e+00\n-1.9886017853015840e+01\n4.7871825111157090e-01\n1.9471259598361844e+01\n-4.7085353656527161e+01\n4.7871825111157090e-01\n1.9471259598361844e+01\n-4.7085353656527161e+01\n6.3944341732908294e-01\n2.0622716444161423e+01\n-4.4503309288380450e+01\n2.6770474907562454e+00\n7.7879881260457239e+01\n-8.5071144990989410e+01\n-1.5968849447626587e-01\n2.8410690854408159e+01\n-4.0066859458307000e+01\n6.0485671003609143e-01\n2.6568616004412153e+01\n-4.0969384403097330e+01\n-7.5449764222665772e-01\n-1.0449440778837400e+00\n-2.0868279733102430e+01\n1.6113253760291681e+00\n3.6344410329972426e+01\n-4.6387625282070843e+01\n-3.5366617515113641e-01\n-4.0798590652226334e+00\n-2.1233441221092669e+01\n1.7670287664369724e+00\n2.4211432509659204e+01\n-4.2408341349089532e+01\n1.4852053092680029e+00\n3.4222645283570614e+01\n-4.3767145826080871e+01\n1.5674447859956580e+00\n2.5192340536248746e+01\n-4.1197051739386261e+01\n3.2342375079153980e+00\n1.1261204403006911e+01\n-4.7445338407219175e+01\n-1.2486464925240875e-01\n-8.6078078981723571e+00\n-2.0609325716544031e+01\n-5.3723684702095109e-01\n8.1974990671816614e-02\n-2.0252869697077937e+01\n-4.3145836874704241e-01\n1.1945278405126900e-01\n-2.0820418275655690e+01\n2.9860454382162280e+00\n2.2338875034567753e+01\n-4.5886253802948509e+01\n3.9570397667977092e-01\n4.1833309700142189e+00\n-2.5860073168669846e+01\n4.2773483105801384e+00\n1.7084105596841461e+01\n-5.0579523229500893e+01\n1.7757830152806486e-01\n-5.8069894020222019e+00\n-2.1437854096976562e+01\n-6.3186576639932768e-02\n-8.2965585748526269e+00\n-1.9660823726685404e+01\n2.9522572394773744e-01\n2.9106751801755584e+00\n-2.2714672414467511e+01\n5.3271285770125179e+00\n2.2554415802190061e+01\n-5.0010264795026025e+01\n5.5540684514753746e-01\n-6.9561532102368617e-01\n-2.1711159214749870e+01\n6.2954736267515132e-01\n2.3392738382715370e+00\n-2.2355141434242920e+01\n4.0563063477182579e+00\n2.6482110426767331e+01\n-4.3021836524191798e+01\n4.6098404017925221e+00\n2.5998765657940268e+01\n-4.4571142372719180e+01\n3.0272019806364914e-01\n3.1554580246681335e-01\n-1.9431787304402214e+01\n5.5355967958187717e+00\n2.5313244950134585e+01\n-4.5278529703881667e+01\n5.2484082908893681e+00\n2.7616153350428508e+01\n-4.4067457128849803e+01\n9.8101903487779807e-01\n-4.3011068441393210e+00\n-2.1105077111125318e+01\n5.8821166038861126e+00\n3.6721225813567443e+01\n-4.6602534445004316e+01\n5.9728169258966046e+00\n3.6644155340086229e+01\n-4.6898321916886793e+01\n8.5599812898829128e+00\n2.6984153792671151e+01\n-5.6497796602323696e+01\n7.3514165675375160e+00\n2.4545205442767717e+01\n-5.1322829677757568e+01\n8.5599812898829128e+00\n2.6984153792671151e+01\n-5.6497796602323696e+01\n7.8465957966996092e-01\n1.2373070560071240e+00\n-1.9676446694382076e+01\n6.9814598125912370e+00\n2.1736522972405950e+01\n-4.8149650577100104e+01\n6.4485989253186267e+00\n2.7165732879716906e+01\n-4.5509300496344977e+01\n7.6063983704720890e+00\n2.3525475668298053e+01\n-4.9521811335589859e+01\n8.5066495190599412e+00\n2.2619373440301064e+01\n-5.0085035028741508e+01\n7.3733660070971094e+00\n2.6151455677841703e+01\n-4.5358015362320131e+01\n8.8769514224531356e+00\n1.3661553114322418e+01\n-5.0343159225282918e+01\n1.4630749946694310e+00\n1.0612987185471705e+00\n-2.0127068989147698e+01\n7.4941751076144270e+00\n2.6261023638977608e+01\n-4.4622523135634104e+01\n1.3998642679245703e+00\n3.3236939651990050e-01\n-1.9739994843499247e+01\n2.1672737010835408e+00\n2.9867271541440514e+00\n-2.2486329783234467e+01\n9.4043729049893177e+00\n2.8555731680674668e+01\n-5.0030587035624784e+01\n1.7461577793699643e+00\n-2.6565413845143504e+00\n-1.9894113475318282e+01\n9.3827169993404524e+00\n3.1585612390892706e+01\n-4.8775347036736839e+01\n9.6105903070420151e+00\n2.4506494895080710e+01\n-4.8526950678313675e+01\n2.9738425819285204e+00\n-5.5557724608222534e+00\n-2.4171209001193418e+01\n1.0387295062169184e+01\n2.2770184739632551e+01\n-5.1033975841752657e+01\n9.8595782334624626e+00\n2.5513931489304948e+01\n-4.8015769318759432e+01\n1.0192172541939918e+01\n2.2839676538483886e+01\n-4.9544447297571097e+01\n1.1197272151861064e+01\n3.2369383240181392e+01\n-5.0927629839285927e+01\n9.7989785323273360e+00\n2.7965781347756167e+01\n-4.5497684312329987e+01\n-1.5181956002124807e+01\n-4.2435033520069938e+00\n-2.4648823286324244e+01\n-7.9265151469864364e+01\n7.2950185496335862e+01\n-1.2580172825317041e+02\n-7.6783860926804621e+01\n6.8960650878628371e+01\n-1.2494853161708468e+02\n-2.5840780920612499e+01\n1.1314648657789988e+01\n-4.8076730708290107e+01\n-3.5280879949554084e+01\n3.1280112454072260e+01\n-6.2796670468232293e+01\n-3.4806480008155162e+01\n3.9632415554759518e+01\n-5.6259916621639384e+01\n-3.1229832672999382e+01\n2.6804476809848008e+01\n-5.5522736887458500e+01\n-3.1229832672999382e+01\n2.6804476809848008e+01\n-5.5522736887458500e+01\n-2.9233392254886795e+01\n2.8221953674913649e+01\n-5.0190092626721032e+01\n-2.9810206805834941e+01\n2.6881826274320520e+01\n-5.3719013125050637e+01\n-2.9065740785419898e+01\n3.1495497376623423e+01\n-4.8636930589182093e+01\n-2.2282009694653176e+01\n2.0850968251529672e+01\n-4.1861275111895921e+01\n-1.6365366572314826e+01\n1.5588275754232450e+01\n-3.5143808924487274e+01\n-1.6144649061671668e+01\n2.0934600175259028e+01\n-3.2475481473915174e+01\n-1.5189517297925962e+01\n1.8654979160155722e+01\n-3.2143806579137099e+01\n-1.5060978258081173e+01\n1.3350692286789380e+01\n-3.8744340728946497e+01\n-1.5709652485410238e+01\n2.4182938389038757e+01\n-3.4273540652998044e+01\n-1.5709652485410238e+01\n2.4182938389038757e+01\n-3.4273540652998044e+01\n-1.5630414468491201e+01\n2.4905077666431680e+01\n-3.4667075263857775e+01\n-1.4276055577106220e+01\n1.2593343865270663e+01\n-4.0885382163429014e+01\n-1.3957497163473452e+01\n1.6243821358696781e+01\n-3.6411082847107366e+01\n-1.3526694154382986e+01\n1.2834257817504801e+01\n-4.1012124376893141e+01\n-1.4104602160458022e+01\n2.5470910528936066e+01\n-3.3030068981678539e+01\n-1.6349372143051820e+01\n4.0549105121497938e+01\n-4.6455884081358072e+01\n-1.1463914945703515e+01\n1.8924669940790839e+01\n-3.6979067493085282e+01\n-9.8590442889403622e+00\n1.7270802533014599e+01\n-3.8372789393723778e+01\n-9.0624833995790652e+00\n2.2030636506925166e+01\n-3.6740224251225641e+01\n-3.4631476534761396e+00\n-8.9148492807640700e+00\n-2.0191290931512437e+01\n-3.2890342723633834e+00\n-9.1817120028724073e+00\n-1.9777052032511243e+01\n-3.2163046160671978e+00\n-9.0163715014847767e+00\n-2.0032530575567733e+01\n-3.3172246064071436e+00\n-8.2328246123828031e+00\n-2.1262211386624056e+01\n-3.3050596756454760e+00\n-8.4846640246289287e+00\n-2.2257631229665840e+01\n-6.1272949246590018e+00\n2.2045972352112848e+01\n-3.8154912446764065e+01\n-2.9898788411622332e+00\n-8.1259264115582024e+00\n-2.1405198674715386e+01\n-3.5228038715160732e+00\n-2.1109730178913320e+00\n-2.4422875984619477e+01\n-8.0472275955047810e+00\n4.7623472423727002e+01\n-5.5236940257338695e+01\n-2.6804122141020694e+00\n-8.4015978256003923e+00\n-2.2710644339188285e+01\n-2.1611170721890711e+00\n-8.5812945753907606e+00\n-2.0607390385517462e+01\n-1.5820269667605125e+00\n-9.0739606528790997e+00\n-2.1830100218662700e+01\n-1.0211852351243254e+00\n1.3776733743654145e+01\n-5.0162934933547035e+01\n-1.3637374986138029e+00\n-9.7046776007726194e+00\n-1.8821837169278808e+01\n-1.6231464615733875e+00\n-2.2578679013516112e+00\n-2.0230216173292050e+01\n-1.0702755380448707e+00\n2.3081513604517710e+01\n-3.9038585539564352e+01\n-1.1554376141113478e+00\n-2.6090416551949924e+00\n-2.0884743375770771e+01\n-4.5282701739740738e-01\n2.8242412836786428e+01\n-3.9887404900666382e+01\n-9.3099427166250859e-01\n-2.1595273482784649e+00\n-2.0375825663055856e+01\n5.6760046110464091e-01\n2.3512969535696939e+01\n-4.1226366464904089e+01\n5.6760046110464091e-01\n2.3512969535696939e+01\n-4.1226366464904089e+01\n-8.8860415562295014e-01\n-1.1713495632212716e+00\n-2.0269439116426078e+01\n1.5644712095930973e+00\n2.4514194235356882e+01\n-4.2405675571171209e+01\n-1.3332466250850061e-01\n3.5390002211103431e+00\n-2.3454272829830700e+01\n9.5462179240600062e-02\n-1.4370042011941171e+00\n-2.0192498010967782e+01\n1.2367659406304659e+00\n4.3902837906226759e+00\n-2.6802101422366608e+01\n4.3142158928927854e+00\n3.5940774209335750e+01\n-4.6495977067205281e+01\n8.3838682934311182e-01\n2.1832269964467463e+00\n-2.1827193777993223e+01\n6.2503467317291572e-01\n1.9664572275880137e+00\n-2.0566404945012295e+01\n8.7730878736160403e+00\n2.3786619399158930e+01\n-6.0606098902587952e+01\n7.4079131237563507e+00\n2.0641543436359385e+01\n-5.3268409815010862e+01\n7.8105625084615431e+00\n2.0809716918790897e+01\n-5.2611462143966506e+01\n8.9672779767739186e-01\n-2.7121735906019881e+00\n-1.9581072571807315e+01\n1.4036216351889395e+00\n2.2260152308944798e+00\n-2.1833165612404084e+01\n1.0076689050814712e+01\n2.1890941783219265e+01\n-5.5423211803799113e+01\n1.6423607573016374e+00\n-3.3519963129726138e+00\n-2.0800489000967190e+01\n1.3832389601147110e+00\n1.0484760762209271e+00\n-1.9305275438142658e+01\n3.1336169678421437e+00\n-1.4728822882850712e+00\n-2.3300346230448099e+01\n-1.5092979379093057e+01\n-4.0264846157753267e+00\n-2.4642402457050594e+01\n-4.2884461165857111e+01\n3.5996136326599036e+01\n-7.0223706296415358e+01\n-4.8240217222184526e+01\n4.1729280104762708e+01\n-8.1499221220763488e+01\n-4.3813189695171381e+01\n3.7539969237633990e+01\n-7.7130275107003953e+01\n-2.3103853475258969e+01\n2.3172268432186108e+01\n-4.1483527279735853e+01\n-2.3802874875658034e+01\n1.9262167151413863e+01\n-4.6564411562446800e+01\n-3.9177279172799373e+01\n6.1417471499753610e+01\n-7.0955647249783340e+01\n-1.7390969831918945e+01\n1.2424221885756138e+01\n-3.9404491131835549e+01\n-2.4038117017373917e+01\n3.6415922849561170e+01\n-4.5768006619841955e+01\n-1.6191598858070130e+01\n1.0117437157009757e+01\n-4.3410846195681749e+01\n-2.3079195771700800e+01\n3.9062060987241999e+01\n-4.9120798729520672e+01\n-1.5777726251089687e+01\n2.3555936034920705e+01\n-3.3897199768033190e+01\n-1.6721171099727258e+01\n3.8610647790133434e+01\n-4.5304937157804680e+01\n-1.0743730080028481e+01\n1.2033068746052709e+01\n-4.4915386015058736e+01\n-3.9503520042033213e+00\n-8.7385823023444011e+00\n-2.0670115889977804e+01\n-3.8474776355818796e+00\n-8.0977429294323695e+00\n-2.1386970148138950e+01\n-3.3573762313957078e+00\n-2.0437991364144912e+00\n-2.3707169320324592e+01\n-2.3617536264963603e+00\n-1.0096618689701710e+01\n-2.1542780039962906e+01\n-1.9685529777823760e+00\n-8.4192213753443390e+00\n-2.0864572095386478e+01\n-1.9648115385914073e+00\n-8.2158211284053362e+00\n-2.1118438690299868e+01\n-1.6008438201715134e+00\n-1.6086558866040457e+00\n-2.1084488374211961e+01\n4.0791333025727300e-01\n2.1317762301144558e+01\n-4.3316215918113528e+01\n2.4209829974607411e+00\n9.8398210913978836e+00\n-4.5494153817412140e+01\n2.4919232065243135e+00\n1.0854202235911435e+01\n-4.6759311331817024e+01\n2.2985182292489754e+00\n9.1558723689162296e+00\n-4.4056705978214978e+01\n1.8124533686272657e+00\n2.9958499935140452e+01\n-4.2897148058356002e+01\n2.1938140137428244e+00\n2.7191263710642644e+01\n-4.3796233655004492e+01\n1.5488216950359332e-01\n-8.4881277086551083e+00\n-2.0794417914331955e+01\n2.6731317154257259e+00\n3.4643853706454458e+01\n-4.4583173228394529e+01\n9.3629260452055302e-02\n-1.0454652005189702e+00\n-2.0265763079357161e+01\n6.1481350150456562e+00\n2.2412180080940630e+01\n-5.0793559226241435e+01\n6.0763116880175605e-01\n-3.9347766517207474e+00\n-2.0295568725295588e+01\n8.6407787466146679e+00\n4.3885567683386597e+01\n-5.3013366083719653e+01\n1.2772624043856402e+00\n-3.1409092407815709e+00\n-1.9748011840579533e+01\n7.0789791613250932e+00\n3.1643612931222975e+01\n-4.4961532901308232e+01\n1.6141376909614755e+00\n-4.3488698374454779e+00\n-2.0854867502350540e+01\n8.6423913700046970e+00\n3.2549669439785156e+01\n-4.7854939029596707e+01\n1.0347517075372128e+01\n3.8949632542653113e+01\n-5.1802379303188431e+01\n-4.1935488365088290e+01\n3.5002184384731187e+01\n-7.0012343467872924e+01\n-4.0156819506346643e+01\n4.4277148461737568e+01\n-6.0852902766121609e+01\n-3.9915741548884291e+01\n3.9793294444731444e+01\n-6.5658545381571074e+01\n-3.5550339388535136e+01\n4.0141020071236476e+01\n-5.6381543375604522e+01\n-2.8608392776334810e+01\n2.3186486265766199e+01\n-5.3830682597943579e+01\n-2.9834828521497752e+01\n2.1398226635248690e+01\n-5.9875492549787253e+01\n-3.0118722050217336e+01\n2.2643878667357676e+01\n-5.9807550170203321e+01\n-2.0070728875755592e+01\n1.5498866638948108e+01\n-4.1423433668068611e+01\n-1.9030930812852279e+01\n1.9155733317965502e+01\n-3.5205937376975150e+01\n-2.4850182488705265e+01\n3.4717404814901002e+01\n-4.4998770433008566e+01\n-1.7149611042789996e+01\n1.3053920487756059e+01\n-4.1831493590424856e+01\n-1.5686745117684609e+01\n1.2407251700908338e+01\n-3.9108708841527736e+01\n-8.7957184086360876e+00\n-5.3882104537513626e+00\n-2.5482502757697684e+01\n-1.5988511807889092e+01\n1.2375292603831234e+01\n-4.4259537313852334e+01\n-2.7049729621636079e+01\n5.2218810052623795e+01\n-5.9612054695482257e+01\n-6.4783183256979822e+00\n-8.2548708542169233e+00\n-2.0867875952608578e+01\n-5.6093468155972932e+00\n-6.9385233033709071e+00\n-2.2851396209868515e+01\n-1.0754187299153827e+01\n2.0665659688000989e+01\n-3.5255208002004238e+01\n-1.3894559389208991e+01\n4.2211115591050941e+01\n-4.8583990251536846e+01\n-3.1427102570709295e+00\n-3.9082181659041009e+00\n-2.4050560041789574e+01\n-2.6491119027264127e+00\n-9.1965881672101002e+00\n-1.9868323540948829e+01\n-2.6006723407101471e+00\n-9.2635628393108238e+00\n-1.9308350466055845e+01\n-2.6006723407101471e+00\n-9.2635628393108238e+00\n-1.9308350466055845e+01\n-2.3950824646413742e+00\n-9.7963474972284956e+00\n-2.1142444941048133e+01\n-2.9314527276058326e+00\n-1.3917367346109157e+00\n-2.1445997207366769e+01\n-4.1190923853088695e+00\n2.8942345053273034e+01\n-3.9457040783107459e+01\n-1.8913061178912547e+00\n-9.1129709352451655e+00\n-1.9837786486093879e+01\n-1.3461236727517112e+00\n-3.1225790720506281e+00\n-2.0006730815650311e+01\n-4.7206020454872882e-01\n3.6677826319691718e+01\n-4.6118642421470113e+01\n9.0193206808167059e-01\n2.0982257330372455e+01\n-4.5080599878245664e+01\n-7.9507526328727651e-01\n-2.2216530575117028e+00\n-1.9954891539528692e+01\n-6.5869365207135122e-01\n-2.3988162988892148e+00\n-2.0248724051422592e+01\n-7.7726787130224281e-02\n-3.7471334634156045e-01\n-2.0609521911964176e+01\n-1.5792201958515784e-01\n1.0681274511798562e+00\n-2.0056733524480261e+01\n3.8503816423658641e+00\n3.5658331068725673e+01\n-4.6885307738893779e+01\n4.2247349700021770e+00\n2.2660720596866870e+01\n-4.4400469017323360e+01\n3.7295493119764114e+00\n2.9920878404869846e+01\n-4.2092406995655004e+01\n5.2521059773968197e+00\n2.1462678521084772e+01\n-4.6737039945925524e+01\n4.9477711420676656e+00\n3.1359778945992463e+01\n-4.5309583792898188e+01\n6.8927317662097938e+00\n2.3947488252356198e+01\n-4.8759508799359111e+01\n7.9073290740480324e+00\n3.2214441694775722e+01\n-4.8169760390018283e+01\n1.3412498066944623e+01\n3.5601465500308734e+01\n-5.6678874789962897e+01\n-3.5122419542334583e+01\n3.7555855442321935e+01\n-5.5700667219028020e+01\n-2.7128533127477610e+01\n3.0395580852722048e+01\n-4.4937971164507601e+01\n-2.6507966551393643e+01\n2.0667297891288378e+01\n-5.2523300331665119e+01\n-2.5461220946852276e+01\n1.6713930673041386e+01\n-5.7586462676424745e+01\n-1.3124248463284305e+01\n1.2913998645155077e+01\n-4.3546690584080650e+01\n-4.7758563350788679e+00\n2.3677336715447506e+01\n-3.8701217017882897e+01\n-2.1450708126928038e+00\n-8.4108270425513574e+00\n-2.0857851565658301e+01\n-1.0184420929577689e+00\n2.5570955212834637e+01\n-4.2416811069184448e+01\n-9.5262238665717625e-01\n3.0150401850404954e+01\n-4.0118553675060880e+01\n-1.1868052976506132e+00\n-1.1564631270442989e+00\n-2.0911218845649469e+01\n-8.0323482352769293e-01\n2.9757262986373822e+00\n-2.4921762024927787e+01\n3.1988298947363911e+00\n2.6810833075573111e+01\n-4.2132083586615167e+01\n2.7886689336010723e-01\n-2.3566514001439169e+00\n-1.9609199712039633e+01\n6.0805690248739523e+00\n3.1200732361271079e+01\n-4.5228143351695621e+01\n6.9839839645250112e+00\n2.2505110222314787e+01\n-4.8029673393256367e+01\n1.0591393901440325e+00\n8.9322570972903503e-01\n-2.0106398483460481e+01\n1.1139240881403978e+01\n2.4141307363320749e+01\n-5.6569907616549770e+01\n-2.4316629683626751e+01\n4.2137354068342873e+01\n-4.9060219830354356e+01\n-2.4316629683626751e+01\n4.2137354068342873e+01\n-4.9060219830354356e+01\n-1.4332833672664266e+01\n1.9797611390694996e+01\n-3.3494408270563298e+01\n-9.8374802656745342e+00\n2.1444787993835437e+01\n-3.6994696680600349e+01\n-3.6985607818502158e+00\n-8.8509470070419152e+00\n-2.0592153168996518e+01\n-2.8368737734387834e+00\n-3.6769473865510047e+00\n-2.3891569400344999e+01\n-1.4346014780380596e+00\n-9.0381445721692746e+00\n-2.0161049786577582e+01\n3.2604905975329868e-01\n-5.8070704913275364e+00\n-2.1558406757381505e+01\n6.3516069688190901e-01\n-2.6981084017180201e-01\n-1.9768213514614128e+01\n9.0517311294345664e+00\n3.1253285860161775e+01\n-4.9286478111120708e+01\n1.0011841746533323e+01\n3.3355899559612062e+01\n-4.9961264683481680e+01\n-4.2854815637182426e+00\n-9.3016011550827837e+00\n-2.2472006157120784e+01\n-9.2042721021307301e+00\n2.5380109337640064e+01\n-3.4977618707513152e+01\n-3.8339662362512015e+00\n-8.6476607653097872e+00\n-2.0932862675763573e+01\n-3.8339662362512015e+00\n-8.6476607653097872e+00\n-2.0932862675763573e+01\n-1.3286024306082618e+00\n-8.8038335832372194e+00\n-2.0230862351571272e+01\n-9.1859892571730628e-01\n-8.5785127110376465e+00\n-2.0468503908644074e+01\n8.5620899813269669e-01\n2.6405152391207348e+01\n-3.8699573099250422e+01\n-1.9577404482803713e+00\n-8.6503987766417385e+00\n-2.0476153770302084e+01\n6.8251105638889396e+00\n2.8256179372426292e+01\n-4.4797355410103656e+01\n-3.4752998662387369e+00\n2.3860100841629837e+01\n-4.1606007763603913e+01\n-7.0896353337757567e-01\n2.0912902109583229e+01\n-4.8346290894517487e+01\n-8.5930050445050732e+00\n2.5365338341223676e+01\n-3.6819367242377709e+01\n-5.3334229178418302e-01\n2.5231279606723160e+01\n-4.3416691557291074e+01\n9.0164821356197566e-01\n-2.7529219807608039e+00\n-1.9620270272595072e+01\n-5.8334740936864495e+00\n2.4156341512074363e+01\n-3.5735808906644600e+01\n-4.1026245076266264e+01\n6.8829720787583469e+01\n-7.7732600650333197e+01\n-7.0855287177631721e-01\n5.1248502040782235e+01\n-5.9866599881210291e+01\n-3.8621528543069431e+01\n6.2275188326903816e+01\n-7.1203865882926536e+01\n-2.2634037450675537e+00\n4.9570099940000979e+01\n-5.8413617973099299e+01\n8.9999334108657059e-01\n4.0931101094828357e+01\n-4.7902848934284108e+01\n-1.8685726659904450e+01\n4.4243838757717647e+01\n-5.1233318783551134e+01\n-1.0477540273018709e+01\n4.5317827307148164e+01\n-5.3289949711600293e+01\n-1.0468462422694145e+01\n4.5196093388914854e+01\n-5.3386299367932530e+01\n-3.9321818476861509e+01\n5.6111403211052568e+01\n-6.6862004798026305e+01\n-1.8527407984088558e+01\n4.0340980937433407e+01\n-4.8410200948004217e+01\n-3.7460676248432890e+01\n5.4617911161389166e+01\n-6.5567398749250458e+01\n-4.4675088009557484e+01\n5.9968406968918657e+01\n-7.1826231018926947e+01\n-2.1931749159904165e+01\n3.6072688253258285e+01\n-4.4290870773231802e+01\n-2.1766360661725745e+01\n3.6407671746789831e+01\n-4.5235323112816921e+01\n-2.2971293331156883e+01\n3.5712604407873201e+01\n-4.7053849604337977e+01\n-9.3971767638216210e+00\n2.8225329933580745e+01\n-3.7454671917831220e+01\n-1.5031277511951595e+01\n2.6594634447109438e+01\n-3.5246933135380935e+01\n-2.6765720331310913e+01\n3.7653425044098803e+01\n-5.0686048337967541e+01\n-1.5613057455434751e+01\n2.3706538835679360e+01\n-3.4056404804733894e+01\n6.6239128992698433e+00\n2.7567730454983103e+01\n-4.5676840339350797e+01\n-2.6715151674389812e+00\n2.3993758647175678e+01\n-3.9350749351875983e+01\n6.4964122270575828e+00\n2.7264691315901089e+01\n-4.5601356067776685e+01\n-2.2688442680833227e+00\n2.0643907725613577e+01\n-3.3848798381466331e+01\n-7.2012071590470772e-01\n2.0940278932353028e+01\n-3.4638896182324174e+01\n5.4708023273492590e-01\n2.0913640825557870e+01\n-3.5342719061623690e+01\n5.2342907419997697e+00\n1.9952645686501750e+01\n-3.4071596453895395e+01\n4.8099315385633951e-01\n2.4331465325836966e+01\n-4.1702922447771257e+01\n6.7704030888668330e+00\n2.5647830424708815e+01\n-4.5128684324956303e+01\n-1.2835575735138258e+00\n2.1504878746542094e+01\n-3.7541268949717512e+01\n2.9296060592745397e+00\n2.0424689738092297e+01\n-3.5884197484633127e+01\n-1.1376873234600176e+01\n2.0323700608025401e+01\n-3.5173767655542520e+01\n4.2092372853083972e+00\n2.2054273308023895e+01\n-4.0049961886271120e+01\n-1.0328107237943289e+00\n2.2666744910856931e+01\n-4.1090062874040910e+01\n-1.3252416964701277e+01\n1.9283585830481535e+01\n-3.4360467320143620e+01\n-1.1958436258654292e+00\n2.2539371564403371e+01\n-4.1282359767885765e+01\n6.8722264489399203e+00\n2.1549529397099345e+01\n-3.9982781374054333e+01\n6.8722264489399203e+00\n2.1549529397099345e+01\n-3.9982781374054333e+01\n1.2524518067426815e+01\n2.5540301764569961e+01\n-4.9282824084821677e+01\n6.4250214595673460e+00\n2.4360082040396740e+01\n-4.6651535873066521e+01\n2.5652985576402663e+00\n1.9532836117590342e+01\n-3.7289911300701945e+01\n4.1519237945758318e+00\n1.8859089065403960e+01\n-3.7033607310012670e+01\n-2.4256934142759099e+00\n2.1476450604780432e+01\n-4.1984668438949335e+01\n-2.4256934142759099e+00\n2.1476450604780432e+01\n-4.1984668438949335e+01\n5.2787173237343872e+00\n1.8112106138126773e+01\n-3.6743402275881401e+01\n-6.9364330479675722e+00\n1.9253602852864436e+01\n-3.8793800840460797e+01\n2.7800380094517654e+00\n2.2087702744633869e+01\n-4.5395719636975606e+01\n3.7072688878540552e+00\n1.8547872195440725e+01\n-3.8116159287470730e+01\n-8.3798436632649640e+00\n2.3667547417887949e+01\n-4.8497433665320663e+01\n1.1678530125527293e+00\n1.8897749237831153e+01\n-3.9572459949737322e+01\n1.0067217368436221e+00\n1.8878258644603623e+01\n-3.9578119771409838e+01\n-1.9075006043641396e+00\n1.8734156284060361e+01\n-3.9223329407272772e+01\n-2.0530361494083853e+00\n2.3863772643153197e+01\n-5.0586644833409231e+01\n-4.8048269089321538e+00\n2.3018836268288712e+01\n-4.9505594401341590e+01\n-1.8259920021383480e+00\n1.8573629234804294e+01\n-3.9897666682532773e+01\n1.1237041170249588e+01\n2.2152491011875309e+01\n-4.9515277722747250e+01\n4.5807438691794120e+00\n1.7679101609886033e+01\n-3.8754601849646683e+01\n3.1464110868287287e+00\n1.7931178973733342e+01\n-3.9485713493506566e+01\n3.3721270798521084e+00\n2.4566892221962711e+01\n-5.4851952652299332e+01\n1.5340513907839826e+01\n2.4932714300378041e+01\n-5.7827645599903299e+01\n-5.5456846295383802e+00\n2.1663232990315080e+01\n-4.9260071204549746e+01\n1.3162878863995854e+01\n2.2690101028164563e+01\n-5.3547664725424660e+01\n-1.0927142678000839e+01\n1.9766429250331825e+01\n-4.6104582019633128e+01\n-8.1802342216726076e-01\n2.1011867102208491e+01\n-4.9032868166754511e+01\n-8.1802342216726076e-01\n2.1011867102208491e+01\n-4.9032868166754511e+01\n-8.5628638252343070e-01\n1.7727566532223033e+01\n-4.1970187015242445e+01\n-4.5112961934861806e+00\n2.0690128585780155e+01\n-4.9629934340973534e+01\n-7.3210736879641800e+00\n1.9126324249625391e+01\n-4.6596196350230372e+01\n-7.0346520370756549e+00\n1.7318687791885797e+01\n-4.1925218820517429e+01\n-9.6025565632325289e+00\n1.8752164992481877e+01\n-4.5747427852933612e+01\n6.5923487883424770e+00\n2.2058799043676391e+01\n-5.4223246149782433e+01\n3.8027356087105124e+00\n2.2877424250546284e+01\n-5.5990966432457775e+01\n-3.1969055448259240e+00\n2.0665262422629826e+01\n-5.0380380763132116e+01\n3.7056810731943779e+00\n2.2772492159149888e+01\n-5.6057846970669168e+01\n-4.4057908270843162e+00\n2.0258337218839817e+01\n-4.9974481602343047e+01\n3.4556035413704520e+00\n2.2644201952833072e+01\n-5.6279254115666234e+01\n-5.0987479812669612e-01\n2.1066491007416303e+01\n-5.2317999994281749e+01\n7.6308760117575236e+00\n1.7654090493096589e+01\n-4.4243632463100987e+01\n1.6360990825691186e+00\n1.7007312390771084e+01\n-4.2493486231787259e+01\n-7.1478663872274577e+00\n1.8461495686598646e+01\n-4.6765618918579321e+01\n-1.0626506453238816e+01\n1.8108893593835898e+01\n-4.5836700639796007e+01\n-3.9774350450410632e+00\n1.8429273325212613e+01\n-4.7085026497855495e+01\n-7.8653251544804459e-01\n2.0632347210946794e+01\n-5.2339414358437516e+01\n1.4562254695622261e+01\n2.2757632533025372e+01\n-5.9063097571729820e+01\n-1.7586685895265306e+00\n1.7125192395666975e+01\n-4.3419373436969138e+01\n-1.0132720160758872e+00\n1.9557142216582257e+01\n-4.9899508150075469e+01\n-4.1250165984694256e+00\n1.8592699849602454e+01\n-4.8879537175546169e+01\n-7.2549942449819245e+00\n1.8737369982522200e+01\n-4.8546830198842144e+01\n-2.4710222044782824e+00\n1.8735033957107866e+01\n-4.9473802941979557e+01\n-1.2326517257446277e+01\n1.4914233934888546e+01\n-3.8867897697910692e+01\n1.1685707786866079e-01\n2.0243087143123315e+01\n-5.3749342001730156e+01\n-3.0888892782631543e+00\n1.8531669262196523e+01\n-4.9088144458637842e+01\n-3.5155826005564026e+00\n1.6519186081777903e+01\n-4.3502393947578469e+01\n-2.4015765802155586e+00\n1.7641109754600450e+01\n-4.7137630376239564e+01\n-1.3904623257768142e+01\n1.7913459417997988e+01\n-4.7657813260825350e+01\n-1.3904623257768142e+01\n1.7913459417997988e+01\n-4.7657813260825350e+01\n-4.5719742490560851e+00\n1.7938019432661687e+01\n-4.8984347558607247e+01\n-5.1278337007524017e+00\n1.7685079860353031e+01\n-4.8539366757541423e+01\n-3.6280050549050036e+00\n1.8053039763938074e+01\n-4.9756180339862404e+01\n-4.1197173853147566e+00\n1.7423850470502419e+01\n-4.8037350840864853e+01\n1.7352981098575757e+00\n2.0382779786561255e+01\n-5.5861304236990087e+01\n-9.8428724787157105e+00\n1.7587731641091345e+01\n-4.7941325324568524e+01\n-1.2488693169509208e+01\n1.4474089456969198e+01\n-3.9382731916172176e+01\n-3.1301886469161038e+00\n1.8619802683749565e+01\n-5.1252329542373708e+01\n4.0487876319004616e+00\n1.7089704853360129e+01\n-4.7375717734186068e+01\n-8.3741000122237814e+00\n1.7641862877257381e+01\n-4.8558926618856852e+01\n-1.3440247102515583e+01\n1.7336692167543138e+01\n-4.7770469453580539e+01\n-8.6043984949695975e+00\n1.7342322263307494e+01\n-4.8404533037929532e+01\n-1.4665041671823178e+00\n1.7775862038707327e+01\n-5.0868968272496154e+01\n2.0049940226974017e+00\n1.9326291867472396e+01\n-5.7325042566801187e+01\n-5.8923344025506914e+00\n1.6041275644980537e+01\n-4.8451432502556884e+01\n-1.5623285162230001e+01\n1.3457950575760512e+01\n-4.0536025488840004e+01\n-1.5044633107708249e+01\n1.2910420043944836e+01\n-3.8370297414585366e+01\n3.6969037671697564e+00\n1.6116347247553577e+01\n-4.8876946723250299e+01\n-5.6763700589511201e-01\n1.7511684291288077e+01\n-5.3679944527687098e+01\n4.2972847150247642e+00\n1.6831915640620952e+01\n-5.2929187996524128e+01\n-1.1421911543091838e+01\n1.3613408604879288e+01\n-4.2541695381055654e+01\n-1.5006316985041101e+01\n1.3034810346987777e+01\n-4.1300724612382929e+01\n-1.4138393543323906e+01\n1.2648126176793513e+01\n-3.9880717780536173e+01\n-1.4281921711734437e+01\n1.3080368441538717e+01\n-4.1356025709695864e+01\n-1.5755449911176068e+01\n1.2935946055586374e+01\n-4.0826312017356258e+01\n-5.3922724182990818e+00\n1.4740877561493305e+01\n-4.7312691006416451e+01\n-1.5862514544411864e+01\n1.2713092117621992e+01\n-4.1139361280701344e+01\n-7.1051661491960205e+00\n1.0238045867157803e+01\n-3.4807054445124251e+01\n2.2058838082486207e-01\n1.5169252911664111e+01\n-5.3153010883465541e+01\n-4.2627083136991386e+00\n1.4243790309636559e+01\n-5.0095277207509639e+01\n-4.1936520539522473e+00\n1.4034926452147378e+01\n-4.9390478550387378e+01\n-6.5208296522065168e-01\n1.4914703350037103e+01\n-5.3285440896519717e+01\n-5.2608407632363630e+00\n1.4158667914069063e+01\n-5.1256663911073808e+01\n-5.2608407632363630e+00\n1.4158667914069063e+01\n-5.1256663911073808e+01\n5.5636849961664128e+00\n1.3564903899065287e+01\n-5.0757735208845752e+01\n6.0924214897366866e+00\n1.4440283589095381e+01\n-5.4666858882422432e+01\n5.9299536809807085e+00\n1.3484158090841758e+01\n-5.1328500672559720e+01\n-9.7818853703263748e+00\n1.1959490080986694e+01\n-4.5466951236278227e+01\n-1.3479831527025045e+01\n1.1392589764698652e+01\n-4.2996446124067468e+01\n-1.2165411344912796e+01\n1.1771046291841126e+01\n-4.4774947192084618e+01\n-1.2311565370689269e+01\n1.1580798307530062e+01\n-4.4051651503486589e+01\n-1.5490906944979351e+01\n1.0684953909048899e+01\n-4.0867621816199289e+01\n-1.0005513403800638e+01\n1.1828324715933132e+01\n-4.5794798940959019e+01\n-1.6694659834169155e+01\n1.0773688641533330e+01\n-4.3416921377698387e+01\n-1.6863849627553009e+01\n1.0447738897517771e+01\n-4.2083656658161900e+01\n-1.7001170294211999e+01\n1.0297739493456275e+01\n-4.2005652666490477e+01\n1.1688882510646286e+00\n1.0039759228510594e+01\n-4.1123655046471406e+01\n-1.6292833918898893e+01\n1.0246346643628769e+01\n-4.2508832675640122e+01\n-7.7584343006280543e+00\n1.1807864093900463e+01\n-4.9236926460958664e+01\n-1.5502330982360091e+01\n9.9458674706988752e+00\n-4.2380261636992927e+01\n-1.3014869511250536e+01\n1.0524664157909090e+01\n-4.5381214682418609e+01\n-1.5637688514904811e+01\n9.7733241565078917e+00\n-4.3223808618920529e+01\n-8.5975247416816707e+00\n8.4676952270653025e+00\n-4.5102251082112410e+01\n-1.6227942709904328e+00\n7.5263847864790785e+00\n-4.2995297992429869e+01\n-2.1745498637166132e+00\n6.4847357318671612e+00\n-4.1245052898654819e+01\n-4.7004202147714125e+00\n6.6543439436092697e+00\n-4.2653181506270023e+01\n-5.2799883638734366e+00\n6.3460519557570523e+00\n-4.1069042809152840e+01\n2.7876496013534289e-02\n3.3358192137702578e+00\n-2.2813387271565258e+01\n-1.7249149990551917e+00\n4.2948863642139949e+00\n-2.9205569845923964e+01\n-1.9127354576853126e+00\n3.4320799876990149e+00\n-2.3324511840524327e+01\n-1.1703317046955204e+00\n3.9968554534340943e+00\n-2.8054244014683398e+01\n-3.1396049289479775e+00\n5.1966733883029335e+00\n-3.6818755724887666e+01\n-2.1964913001594426e+00\n3.0978423361320617e+00\n-2.2916871552891198e+01\n-1.6452081054554946e+00\n3.5302191855526939e+00\n-2.7104396858662284e+01\n-3.7295273973457159e+00\n5.1105545872038505e+00\n-3.7483370489185305e+01\n-5.3227139040068594e-01\n2.8581341720980404e+00\n-2.2835230267991953e+01\n-2.0478506383476796e+00\n3.8318780561562695e+00\n-2.9069268609053630e+01\n-2.5413693625572842e+00\n2.9209511489598170e+00\n-2.2815592955194184e+01\n-2.6745173488424188e+00\n3.5919890425439402e+00\n-2.8591881927612469e+01\n-1.1033354115292739e+00\n4.4639596528466194e+00\n-3.3070556079109238e+01\n-2.4325903162853204e+00\n2.8589144471809473e+00\n-2.2677018165913427e+01\n-1.8656263277438865e+00\n3.4538335012147647e+00\n-2.7359246853332618e+01\n-1.9538309631568593e+00\n3.3235894436953242e+00\n-2.6772651746508814e+01\n-1.1460171327809672e+00\n2.8007830118849943e+00\n-2.3275162008989732e+01\n-1.2836058038704921e+00\n2.7288831330875980e+00\n-2.3231648539236520e+01\n-8.8254258170013316e+00\n4.7811395334802196e+00\n-3.8571869740065814e+01\n-1.7784366104714222e+00\n3.1869580315166570e+00\n-2.7002675122748101e+01\n-1.8445408871068696e+00\n3.1131370755587491e+00\n-2.6896066554174528e+01\n-3.1230839968277926e+00\n3.1112518142573204e+00\n-2.7822541883253315e+01\n-1.8422077719787793e+00\n2.9965102456481176e+00\n-2.6725064010790820e+01\n-3.2869122513691238e+00\n2.9343052485797725e+00\n-2.7316359657545409e+01\n-3.2112698229800456e+00\n2.8738184045239494e+00\n-2.7263455620428644e+01\n-3.2112698229800456e+00\n2.8738184045239494e+00\n-2.7263455620428644e+01\n-2.8461331526349762e+00\n2.9101573934648530e+00\n-2.7169877518715417e+01\n-2.8324737112597052e+00\n2.2741350679111374e+00\n-2.1978749824323039e+01\n-2.2513683336631343e+00\n2.7437208871618499e+00\n-2.6446024977881358e+01\n-5.0267980612756913e-01\n2.1878135817749000e+00\n-2.2594348612811242e+01\n-3.3860198709736160e+00\n3.7463630636569896e+00\n-3.4805625707059200e+01\n-3.0435714822768309e+00\n4.1110319826527899e+00\n-3.8123699153913464e+01\n-2.9469327758044774e+00\n2.8032523087507464e+00\n-2.7530578148224702e+01\n-2.4424901616077515e+00\n2.5502423898199034e+00\n-2.5603396839247853e+01\n-1.3632152869653322e-01\n1.9164070241197100e+00\n-2.1539613080924454e+01\n-3.8393990184196531e+00\n2.2665101263964873e+00\n-2.3815600613053061e+01\n-2.4595124826448509e+00\n2.2392189424645794e+00\n-2.5329925702388906e+01\n-2.4283803140696905e+00\n2.3830213910876101e+00\n-2.5993475892912450e+01\n-1.0960001647582580e+01\n3.1655874853863137e+00\n-3.6595430825182653e+01\n-2.6383642802493172e+00\n2.0018136535816065e+00\n-2.5065203541627120e+01\n-5.8384871451395370e-01\n1.5793572399666471e+00\n-2.1926191530423047e+01\n-6.6142050685778031e+00\n2.9402183056202289e+00\n-3.6360503062543003e+01\n1.3176154984627717e+00\n1.4579188386747386e+00\n-2.1148154851217146e+01\n-1.4012150595589214e+01\n7.2000566069391496e+01\n-7.5775285893584268e+01\n-2.9675877140501811e+01\n6.9785186531084150e+01\n-7.5005629355918515e+01\n-3.3204204216257970e+01\n6.7843537948716389e+01\n-7.3305993012040062e+01\n-3.2319743006021788e+01\n6.8337588515573927e+01\n-7.3679665722782858e+01\n-3.2319743006021788e+01\n6.8337588515573927e+01\n-7.3679665722782858e+01\n-3.3976950342119082e+01\n6.9349018079622098e+01\n-7.4805085710028152e+01\n-3.1225033985298673e+01\n6.6027889798777665e+01\n-7.2016440144850733e+01\n-6.6468233788783371e+00\n6.3577268821144258e+01\n-7.0909485264238128e+01\n-7.7950829608262229e+00\n6.2625013288172241e+01\n-7.0156108898454946e+01\n-2.7704703662155062e+01\n6.2116111634156461e+01\n-6.9181415557126115e+01\n-2.6390235738447171e+01\n6.1475095364183190e+01\n-6.8887687432061298e+01\n-2.8535262811389789e+01\n6.1253766207365132e+01\n-6.8558968986970669e+01\n-3.7125611889010230e+01\n6.9833297090109923e+01\n-7.8934004827166305e+01\n-3.8282384942402032e+01\n6.7991133653270836e+01\n-7.7503070158057085e+01\n-9.5920731825190604e+00\n4.7784655963791550e+01\n-5.5207820650104459e+01\n-4.9596641910497388e+00\n4.8809439594949538e+01\n-5.6760245527621301e+01\n-2.2172218100082674e+01\n4.3410101840713679e+01\n-4.9597202311296854e+01\n-1.3470677796978171e+01\n4.5939788309399987e+01\n-5.3022922752300737e+01\n-1.3743625337297418e+01\n4.5609267742793755e+01\n-5.2911968659337013e+01\n-5.0654483011762812e+00\n4.8184701170258492e+01\n-5.6702291895446763e+01\n-1.0864738043185890e+01\n4.6125114566523763e+01\n-5.3566523878177563e+01\n-1.1879974754305771e+01\n4.5717943722745161e+01\n-5.3310356939801061e+01\n-1.1879974754305771e+01\n4.5717943722745161e+01\n-5.3310356939801061e+01\n-3.6627076788649873e+01\n6.0731874804463658e+01\n-7.0040092794937806e+01\n-6.6521943061184770e+00\n4.6889494196779175e+01\n-5.5156406251180123e+01\n-2.2122613582715807e+01\n4.2872877434586762e+01\n-4.9289580781807253e+01\n-1.9306157616654122e+01\n4.3896282441548117e+01\n-5.0775681895438034e+01\n-5.8264208180934887e+00\n4.7026764563089642e+01\n-5.5420380282977021e+01\n-9.2628342014437930e+00\n4.6060657222889851e+01\n-5.4248742871874818e+01\n-1.0893140721216305e+01\n4.5278832018053407e+01\n-5.3249489569223179e+01\n-3.8576728514459624e+01\n5.9616687189186990e+01\n-6.9284889344557129e+01\n-3.8754896282248509e+01\n5.9154218910592881e+01\n-6.9200446724791746e+01\n-1.8691805995413230e+01\n4.3033116318435937e+01\n-5.0457888134835500e+01\n-1.4744277237779245e+01\n4.3521013159858271e+01\n-5.1442912228657406e+01\n-1.1381083112450529e+01\n4.3748737095033285e+01\n-5.2280905829794200e+01\n-1.8890467297251842e+01\n4.1842413618832659e+01\n-4.9373071252162468e+01\n-1.5099770322720723e+01\n4.2668853782723630e+01\n-5.0818950503173596e+01\n-1.4343058251979391e+01\n4.2751722650592647e+01\n-5.1043031637635735e+01\n3.8564604683658525e+00\n3.7795127458344403e+01\n-4.5900461584511852e+01\n-5.6534118294535229e+00\n4.4868863512639734e+01\n-5.4551701254180742e+01\n7.0535598794139354e+00\n3.7806666382589370e+01\n-4.6339422646764604e+01\n7.1993730198791779e+00\n3.8597568472956773e+01\n-4.7466044891169595e+01\n-3.7915678746241831e+01\n5.7878886249206275e+01\n-6.8337052867499708e+01\n9.8720265136102536e-01\n3.6102965519330652e+01\n-4.3788120995987008e+01\n-3.8267323136916460e+01\n5.6245566287272396e+01\n-6.6860987295636704e+01\n-3.7737737793893757e+01\n5.5420738167896602e+01\n-6.6271821265695721e+01\n-3.9818464663941114e+01\n5.5452636035927817e+01\n-6.6244766459737818e+01\n-3.8483282352938993e+01\n5.4474263691249021e+01\n-6.5523342033469547e+01\n-3.8999133651020578e+01\n5.4599742587512118e+01\n-6.5689427188681023e+01\n-1.3955454610377206e+01\n4.1108725818946681e+01\n-5.0168314266175940e+01\n-1.6370918131107124e+00\n3.2262136283369550e+01\n-4.0809533608351991e+01\n2.4245596483042280e+00\n3.2063035588066789e+01\n-4.1071870034020982e+01\n-2.2730999576019922e+01\n3.5770789109652263e+01\n-4.4652146463460220e+01\n-1.5544962690904333e+01\n2.8519311097362888e+01\n-3.5833050765942289e+01\n-2.2404092928920466e+01\n3.6135187492828386e+01\n-4.6733242506810001e+01\n-2.3191088867337886e+01\n3.5054530164101308e+01\n-4.5782930249657625e+01\n-9.4671324260224718e+00\n2.8021223982369882e+01\n-3.7113570408026220e+01\n7.0759216504395077e+00\n3.2406033022643697e+01\n-4.5562680076571198e+01\n-5.5274038143983489e+01\n6.0965068167674580e+01\n-8.2816441763181103e+01\n-2.3077570662989288e+01\n3.4580766932840980e+01\n-4.6757232503247906e+01\n-5.7292023857114152e+01\n6.3437033503977929e+01\n-8.5963308200521126e+01\n-5.4527636600505289e+01\n6.0160004057536000e+01\n-8.2055879428290865e+01\n-2.8151801653517296e+01\n3.4056750781588292e+01\n-4.9028735971137650e+01\n-1.5535710307455538e+01\n2.3325209196441161e+01\n-3.3964271317101904e+01\n5.9893416722095489e+00\n2.8404942852756704e+01\n-4.3584269330741193e+01\n4.4991650479888303e+00\n2.7793333953116552e+01\n-4.2556863388950688e+01\n5.0999301915415316e+00\n2.6231038849986650e+01\n-4.3115153247657766e+01\n-1.7538191075317318e+01\n2.4072889514748571e+01\n-3.7620351785594679e+01\n-3.8066506392834309e+00\n2.3227512596593414e+01\n-3.9072623926748520e+01\n6.9021274747596575e-02\n2.3356644148891114e+01\n-4.0607245764548694e+01\n-2.5661638057708127e-02\n2.2759354428094845e+01\n-4.1367165965880758e+01\n-1.1533888873717222e+01\n1.9172770667856120e+01\n-3.4014429317452198e+01\n-1.1533888873717222e+01\n1.9172770667856120e+01\n-3.4014429317452198e+01\n-1.6489824461241444e+01\n1.8281478515550745e+01\n-3.2048970494700242e+01\n5.3606226397471541e+00\n1.9120337229100709e+01\n-3.5137169057966133e+01\n8.9229473529383496e-01\n2.2664797040985288e+01\n-4.2409756089736725e+01\n1.5067942940400771e+00\n2.3149860091282370e+01\n-4.3646885751262452e+01\n5.6246857153152128e+00\n2.1476719858948158e+01\n-4.0674587909947995e+01\n8.6868427254188596e-01\n2.1153260576851650e+01\n-4.0146309299066168e+01\n-2.3512858402180009e-01\n2.2248536862506871e+01\n-4.2692308103911003e+01\n-2.8875935041273193e+00\n2.1324768558126973e+01\n-4.1014171215016027e+01\n-2.8696778518962294e+00\n2.1231577821122190e+01\n-4.0780912143436197e+01\n-1.0373864911276952e+01\n1.9199922846788031e+01\n-3.6473896173050207e+01\n-1.1138158814744369e+01\n1.8637316347306648e+01\n-3.5368350432950145e+01\n5.4809703735170716e+00\n2.4745692620829871e+01\n-4.8580135099775895e+01\n4.5979280020668485e+00\n1.8977697665900674e+01\n-3.6998790736763382e+01\n-1.0309305333904319e+01\n1.8718418961359568e+01\n-3.6193629481109767e+01\n-7.1360805353019874e+00\n1.9918019740257154e+01\n-3.8799300631993333e+01\n6.3183933587304777e+00\n2.3397341274645918e+01\n-4.6781688275484285e+01\n-7.1965269355497785e+00\n1.9387275703701668e+01\n-3.7956838174997287e+01\n6.0730180284297495e+00\n2.3425338798462775e+01\n-4.6817655593783506e+01\n6.4178591772520193e+00\n2.2996713479516448e+01\n-4.5990089245698400e+01\n-2.4161506335378378e+00\n2.1242367114960658e+01\n-4.1984923308123150e+01\n-4.8094332067085652e+01\n4.2106900897163705e+01\n-8.2362345859938046e+01\n5.0513302713787036e+00\n2.2511201331306101e+01\n-4.5852359041615507e+01\n-7.3129803982500743e+00\n1.9611304052811857e+01\n-3.8997200982611979e+01\n-7.3121451167805471e+00\n1.9687308611871302e+01\n-3.9114869478394056e+01\n-1.0464686298701389e+01\n1.8599360443247988e+01\n-3.6994805629052046e+01\n-1.0464686298701389e+01\n1.8599360443247988e+01\n-3.6994805629052046e+01\n2.7115450148591278e+00\n2.2300122568911224e+01\n-4.5663945088808532e+01\n4.8824970647365058e+00\n1.8342340690803788e+01\n-3.7549985091078177e+01\n9.9438217678226604e-01\n1.8977952428423386e+01\n-3.8683655800733554e+01\n-2.1354893745093158e+00\n2.0631746458932916e+01\n-4.2200382509501232e+01\n-7.8300189479649225e+00\n1.8858029410250840e+01\n-3.8210745519295614e+01\n1.3342922245479747e+00\n1.9103340684584122e+01\n-3.9091307465149683e+01\n2.3098380891020440e+00\n2.0475155464356686e+01\n-4.2402888555957887e+01\n-1.3005690008341309e+00\n1.9792052279886665e+01\n-4.0918614770293381e+01\n-5.8873025198433284e+00\n1.9228840534711370e+01\n-3.9708203232526621e+01\n-2.5130737422787806e+00\n2.3759942630420948e+01\n-5.0106018924297437e+01\n-8.7271994042658196e+00\n1.9266192056262270e+01\n-4.0340688177641496e+01\n-1.4361014689690248e+00\n2.0212689773815715e+01\n-4.3161332417844129e+01\n1.1354085603854713e+01\n2.2851349383280805e+01\n-5.0219595201996491e+01\n6.6025907689224734e+00\n2.3510631341547793e+01\n-5.1776193103661861e+01\n-1.1815250860383715e+00\n1.9744861424544105e+01\n-4.4726828655751760e+01\n-9.1417956875505766e+00\n1.8260971456913932e+01\n-4.0981970604895700e+01\n5.2992752767034137e+00\n2.1050726588871381e+01\n-4.8891429807767395e+01\n4.9756063091846610e+00\n2.0317434653307686e+01\n-4.8357243763195484e+01\n1.0495413152054780e+01\n2.5134238485099580e+01\n-6.0339552915949866e+01\n8.5654649089438148e+00\n2.5337545400787899e+01\n-6.0573723472542504e+01\n-5.4128866364234398e+01\n3.5622615604196461e+01\n-9.2156890798429146e+01\n9.8494423887689138e+00\n2.0896594112020587e+01\n-5.5842227209226003e+01\n1.3948597278008537e+01\n2.0826526729077585e+01\n-5.6409305441965863e+01\n1.8405934453384472e+00\n1.7806018008923374e+01\n-4.8150659062341774e+01\n9.3893812143243700e+00\n1.9599239092679152e+01\n-5.3447326064190499e+01\n4.0428489982768196e+00\n1.9486971838101940e+01\n-5.4109902629976517e+01\n1.5577220932193474e+00\n2.0075522157115362e+01\n-5.5359359941847757e+01\n1.0923550215328842e+01\n1.9194973246957268e+01\n-5.4459471481346206e+01\n-1.4706306611909763e+01\n1.3676031409027988e+01\n-3.7699877203307445e+01\n-1.6341174132192979e+01\n1.4030608921644429e+01\n-3.8403234079089096e+01\n-3.5950279541200389e+00\n1.5984304666444592e+01\n-4.5801666029529414e+01\n-4.7987298885157981e-01\n1.6427132828642389e+01\n-4.8535572871808064e+01\n-1.1757485891810283e+01\n1.5810696028167952e+01\n-4.6980787445242051e+01\n-1.4406244435487874e+01\n1.3545800729017129e+01\n-4.0188525947505518e+01\n-1.4470617179295832e+01\n1.3534227783878842e+01\n-4.0628469212158528e+01\n-4.5627130255065973e+00\n1.6346413771810546e+01\n-4.9877395427586691e+01\n-1.4417330912513307e+01\n1.2947583341321785e+01\n-3.8958681293003821e+01\n-1.4468891382574043e+01\n1.2870701791404747e+01\n-3.9235599059551120e+01\n-1.5742718931083427e+01\n1.3067765963451720e+01\n-4.0278337366952030e+01\n-1.5742718931083427e+01\n1.3067765963451720e+01\n-4.0278337366952030e+01\n-3.4824554334442520e-01\n1.6619922830839986e+01\n-5.2639071830713846e+01\n-3.4408199191394889e-01\n1.6658710373045579e+01\n-5.2697379931827705e+01\n-1.0209536971107212e+01\n1.3872410793219494e+01\n-4.4124113024420801e+01\n-1.1403791323036000e+01\n1.3737179787799633e+01\n-4.6031880437397298e+01\n-1.5338736036912046e+01\n1.1859428499886565e+01\n-4.0651131540606578e+01\n3.5691460821568355e-01\n1.5108504410595454e+01\n-5.2725487458467136e+01\n-5.7796859159807470e+00\n1.3434276651609412e+01\n-4.8539708229436364e+01\n-5.8440418577732780e+00\n1.3572023133224034e+01\n-4.8824964766256343e+01\n-1.6742383219298542e+01\n1.1219792903564311e+01\n-4.1483485855375108e+01\n-9.5598234049435877e+00\n1.1858300651981873e+01\n-4.5787336401929437e+01\n-9.5862981874309821e+00\n1.1998509430512931e+01\n-4.6246338586299011e+01\n2.1624829119262428e+00\n1.0524764312163052e+01\n-4.0792322193227207e+01\n-1.7269490937820521e+01\n1.0295990363028601e+01\n-4.2501738460557831e+01\n-1.6790817849949857e+01\n1.0072761679964509e+01\n-4.2910731522282447e+01\n-1.5664837043555691e+01\n9.9587224258501781e+00\n-4.2576602267531641e+01\n-1.7438931036450104e+01\n1.0239893938029772e+01\n-4.3464029082068102e+01\n5.4715312969833780e+00\n1.0933142061115513e+01\n-4.8162990160706691e+01\n-1.5562744902969593e+01\n9.6322548228787142e+00\n-4.2687260616984354e+01\n4.9428363083137459e+00\n1.0851746724132472e+01\n-4.8186967851637426e+01\n1.7871315067005502e+00\n8.1158664588657423e+00\n-3.6621139689508816e+01\n-1.4192904216971048e+01\n9.7337444830175333e+00\n-4.8149771574695698e+01\n-1.4965331671912770e+01\n8.6404399665103693e+00\n-4.5635236006206945e+01\n-4.2667751837373386e-01\n3.6568712962696921e+00\n-2.1133364229904164e+01\n4.4118693575770501e-01\n4.2634196623087641e+00\n-2.4501230984197282e+01\n-3.2840773711340498e-01\n7.5247941200261721e+00\n-4.2672092446945356e+01\n-1.2251276092291659e+00\n7.9712482630775581e+00\n-4.5532872575220161e+01\n-8.0132612092797639e-01\n7.2617917014670876e+00\n-4.2315457173737165e+01\n-2.4208544585590563e-01\n3.8512496161657230e+00\n-2.4011948549118461e+01\n-2.0503861123752762e+00\n2.9691645028989488e+00\n-2.0450508651694346e+01\n-9.9607707775056883e-02\n3.2735713781555824e+00\n-2.3290404465313227e+01\n-2.0921263213473860e+00\n3.4105688155379834e+00\n-2.3413155716856174e+01\n-5.8608469954987985e+00\n6.1092905193956062e+00\n-4.0734743400423753e+01\n-1.3051693872599726e+00\n3.9444199949630390e+00\n-2.8021453873625759e+01\n-1.3175853724681876e+00\n3.8913324882218499e+00\n-2.7948960162145404e+01\n-1.4389018289928914e+00\n3.7089051623402702e+00\n-2.7624865690679506e+01\n-1.3008129915435548e+01\n5.6887123953826446e+00\n-4.1900675256247212e+01\n-1.4583052461294548e+00\n3.6507871202680238e+00\n-2.7560415286799635e+01\n-8.3733976925419096e-01\n3.0386326458914934e+00\n-2.3364935129771442e+01\n4.8246705220237676e-02\n2.9324483050648360e+00\n-2.2563011146998807e+01\n-1.3877161437279870e+01\n5.3083166517768721e+00\n-4.0681364520924667e+01\n-1.4015860933144253e+01\n5.0216949547754082e+00\n-3.9335188407967806e+01\n-1.6700385088227652e+00\n3.2829364535804135e+00\n-2.7072779954131363e+01\n-1.2846908614407020e+00\n2.4797156624465972e+00\n-2.2944485836536312e+01\n5.4918295272824580e-01\n2.3193406184130878e+00\n-2.2425525718157374e+01\n-1.6587911865889858e+01\n4.1848647381986295e+00\n-4.1107515766075267e+01\n-2.1660064685376685e+00\n2.4491353149821258e+00\n-2.5655883129589888e+01\n-2.9094501708531828e+00\n2.6204443414388314e+00\n-2.7209095169829691e+01\n-5.7134552981394715e-01\n1.8616786398084262e+00\n-2.1606655018537587e+01\n-8.0668755296413668e+00\n6.2396025821844141e+01\n-6.9542527103115447e+01\n-9.3355440524381201e+00\n6.1914594054487182e+01\n-6.9382208388674727e+01\n-2.9933975954454869e+01\n6.2142989202634745e+01\n-6.9182078185341012e+01\n-2.1230981753170286e+00\n5.1482196414855700e+01\n-5.9098096159983726e+01\n-1.2616951976879951e+01\n4.6588100117045435e+01\n-5.3835279441930396e+01\n-2.0389644451598077e+01\n4.3716458385252764e+01\n-5.0026593888140141e+01\n-2.0389644451598077e+01\n4.3716458385252764e+01\n-5.0026593888140141e+01\n1.1790633334382892e+00\n4.1043781656553620e+01\n-4.8110365855290496e+01\n7.0359688027756384e+00\n3.8350980944619216e+01\n-4.5222430387088004e+01\n-1.3221951516282981e+01\n4.5297463656161646e+01\n-5.2831998034511507e+01\n-1.3926388642489670e+01\n4.5172021165567045e+01\n-5.2660926324829354e+01\n-1.8903125854937279e+01\n4.3863998380171040e+01\n-5.0732982040331585e+01\n-8.6204333071133075e+00\n4.6373631178065523e+01\n-5.4353044094367810e+01\n-1.9250343604991773e+01\n4.4381486727024232e+01\n-5.1173446379857346e+01\n-1.6594031858171874e+01\n4.4268923665511821e+01\n-5.1539741976511692e+01\n-2.2095287630797721e+01\n4.2482851636400248e+01\n-4.9032421154175388e+01\n-1.8759378463212453e+01\n4.4176251589622211e+01\n-5.1076938175727335e+01\n-7.6910409825458173e+00\n4.6066348503321215e+01\n-5.4685840974175257e+01\n-1.0679754016034154e+01\n4.4861488694014277e+01\n-5.3085242546952209e+01\n-2.1510161020828583e+01\n4.2090674289621994e+01\n-4.8940025647942527e+01\n-1.7641665215686412e+01\n4.3323672957833971e+01\n-5.0871298638514475e+01\n-2.3052603938109055e+01\n4.2159646464697325e+01\n-4.9081675416440305e+01\n-1.4314446901880187e+01\n4.3374610337964292e+01\n-5.1354196157691327e+01\n-8.4235143232598269e+00\n4.4724508928177883e+01\n-5.3228453543091206e+01\n4.4312127841212838e+00\n3.8237651936748819e+01\n-4.6082915713523391e+01\n-1.6334587012107299e+01\n4.2923021842283930e+01\n-5.0808881377870783e+01\n-2.2354767166778213e+01\n4.1468352375918712e+01\n-4.8588819239333382e+01\n-1.6999754037376455e+01\n4.2696443253619087e+01\n-5.0512603802838044e+01\n-2.6658643933704258e+01\n5.1356218079311567e+01\n-6.1247973898523341e+01\n-2.0671221135116411e+01\n4.1223022063233543e+01\n-4.8763436076747944e+01\n-2.2101550566479940e+01\n4.1028874478434474e+01\n-4.8506226470380447e+01\n-1.6365492674142484e+01\n4.2156460168021795e+01\n-5.0320265691007343e+01\n1.9837319826855643e-01\n3.5537708683827702e+01\n-4.3334994898055129e+01\n-1.4287898804680871e+01\n4.1556327434424695e+01\n-4.9948493486547441e+01\n-1.4788069075619884e+01\n4.2006345560133006e+01\n-5.0562642507142336e+01\n-1.4788069075619884e+01\n4.2006345560133006e+01\n-5.0562642507142336e+01\n7.2657747342735561e+00\n3.7762859334975154e+01\n-4.6616382504419647e+01\n-1.7846423591983235e+01\n4.1279419722610179e+01\n-4.9647447149010638e+01\n-1.7468617231260460e+01\n4.1315125351346182e+01\n-4.9700736215020342e+01\n-1.3589456059606675e+01\n4.1874097692867871e+01\n-5.0697589277948552e+01\n-1.3155934133144410e+01\n4.1743989355739515e+01\n-5.0624240584705795e+01\n-1.4140098977363625e+01\n4.1493229759391710e+01\n-5.0331514659444743e+01\n2.6446869610725585e+00\n3.6201090315019265e+01\n-4.4901762185259692e+01\n-1.7503061193926957e+01\n3.2485579961908201e+01\n-3.8643003876583450e+01\n-1.6820992192607321e+01\n4.0679469193934601e+01\n-4.9341117870932862e+01\n-1.2266336360805743e+01\n4.1520792359615456e+01\n-5.0751504784518765e+01\n-6.4392214075753440e-01\n3.4500867771787554e+01\n-4.2358514637164333e+01\n-1.3557364752930493e+01\n4.0885966213420446e+01\n-4.9938803794484372e+01\n-1.3702173595612347e+01\n4.0456292903762481e+01\n-4.9728675577216883e+01\n-2.2234238475118143e+01\n3.7528837152760680e+01\n-4.6458894870969601e+01\n-1.8401313328642139e+00\n3.2173799593362986e+01\n-4.0938219811084323e+01\n-2.3245229646514598e+01\n3.5928808023615638e+01\n-4.5171522010317815e+01\n-1.4247784918430677e+01\n2.8792301147867374e+01\n-3.6178505375992152e+01\n-1.3798432756220362e+00\n3.1326149155622428e+01\n-4.0792792857202642e+01\n-2.2138085425289972e+01\n3.6536731510079044e+01\n-4.6337602463485418e+01\n-2.1339227118106688e+01\n3.5611747911366777e+01\n-4.5212567337640550e+01\n-2.2615228153889422e+01\n3.5244644657863525e+01\n-4.5053437499053921e+01\n-1.4979985109537092e+01\n2.7071417540260736e+01\n-3.4848942019095631e+01\n7.2675056439546806e+00\n3.3660346776726946e+01\n-4.5719581841486090e+01\n-9.3426645250760942e-01\n2.9638283210137114e+01\n-4.0170692064453128e+01\n-2.8373339737756378e+01\n3.9864966502795497e+01\n-5.2908630368660781e+01\n-2.8400328951476013e+01\n3.9516776426144368e+01\n-5.2778621444094135e+01\n-2.7379326164189663e+01\n3.8013221414361155e+01\n-5.0873383580967399e+01\n-1.0209527393129584e+01\n2.6966554809776948e+01\n-3.6501814931624082e+01\n-4.6770890760986122e-01\n2.8226018693227509e+01\n-4.0414715062405740e+01\n-1.7186611803955781e+01\n2.5204544413148412e+01\n-3.5197674297869717e+01\n2.1896033088069533e+00\n2.7726251262040684e+01\n-4.0512704147784817e+01\n-2.7402086079294413e+01\n3.4314295634932812e+01\n-4.8858621979866342e+01\n-2.8300869352667799e+01\n3.4976236030769641e+01\n-4.9667322954628531e+01\n-2.8844553770833585e+01\n3.3409183278809806e+01\n-4.8841552119053986e+01\n1.0949297352555995e+01\n3.0735460093764907e+01\n-4.7483352068697165e+01\n-7.9619359660202749e+00\n2.3451992890935443e+01\n-3.5877846244735530e+01\n3.0098651943346111e+00\n2.0723935592979291e+01\n-3.4971118795158560e+01\n4.9172105987068555e+00\n2.5425114522062405e+01\n-4.3661600882569267e+01\n7.2962237385291475e+00\n2.7144836989938966e+01\n-4.6981904515953751e+01\n-1.0338204800671265e+01\n2.0720894341918633e+01\n-3.4888881131528812e+01\n6.7903649442571172e+00\n2.5675143252921398e+01\n-4.5413982619006894e+01\n-8.2465119271762291e+00\n2.0505323482030914e+01\n-3.5334525114263059e+01\n-1.2901702194391129e+01\n1.9052311533836615e+01\n-3.2389231096029398e+01\n-1.2437358091542608e+01\n1.9287038540839070e+01\n-3.2874754753110153e+01\n7.4576243872815358e+00\n2.5081357038733024e+01\n-4.5604833041486344e+01\n1.6345939018225892e+00\n2.0488850873512636e+01\n-3.6552796525481277e+01\n-1.5885048452297994e+01\n1.8438440458711781e+01\n-3.2112651261841897e+01\n-2.6440831399636816e-01\n2.0114403559253859e+01\n-3.6196894945222965e+01\n1.2533926929930715e+01\n2.6032602255955045e+01\n-4.9015991905110717e+01\n-3.7759885271914961e+00\n2.1610352916767404e+01\n-4.0358406206548011e+01\n-3.8050057759969911e+00\n2.1409331580950010e+01\n-3.9988051473877768e+01\n8.8193606315539146e+00\n2.1115402115427077e+01\n-4.0270461186715316e+01\n-2.2375473706825342e+00\n2.2004556563078793e+01\n-4.1550509456025594e+01\n-7.2324486463553761e+00\n2.0388496859622631e+01\n-3.8365424497111249e+01\n1.4929465156249822e+00\n2.2373258352974119e+01\n-4.3519632762859558e+01\n1.5132525676673369e+01\n2.5126489718507475e+01\n-5.0619471538780800e+01\n1.2408881321478859e+01\n2.3476750853968742e+01\n-4.9627703676888409e+01\n2.0495773139669393e+00\n2.2290185069894363e+01\n-4.6750731634795009e+01\n-1.3073550347038367e+01\n1.7154279779545980e+01\n-3.5311457091070324e+01\n1.4886574897542688e+00\n2.1289697160058321e+01\n-4.5429712261124791e+01\n1.4873955714134707e+01\n2.3883887296621708e+01\n-5.2491414779288142e+01\n-1.3401272551845047e+01\n1.7069386006558652e+01\n-3.5809520308405538e+01\n-1.3401272551845047e+01\n1.7069386006558652e+01\n-3.5809520308405538e+01\n3.2392733095595347e+00\n1.8210675404819636e+01\n-3.9631538415124453e+01\n1.1131787264948420e+01\n2.6900036792428899e+01\n-6.1979527850601983e+01\n1.2679557087751469e+01\n2.4253872607334635e+01\n-5.7577546160811799e+01\n-6.8243010963483091e+00\n1.7850050097862734e+01\n-4.2440315962541639e+01\n2.9589299480958737e+00\n1.6856376384899512e+01\n-4.0949960669711416e+01\n-2.5402331567696829e-01\n1.8718817506098443e+01\n-4.5688153792146998e+01\n-1.0322323551174888e+01\n1.9477721735315889e+01\n-4.7675782326655778e+01\n-9.6948408474593624e+00\n1.6852530299070864e+01\n-4.1318637182490292e+01\n-9.6948408474593624e+00\n1.6852530299070864e+01\n-4.1318637182490292e+01\n-3.5819099120518678e+00\n1.7427090078575670e+01\n-4.5276303696335432e+01\n1.3773986169680068e+01\n2.6365784066194806e+01\n-7.3676523011135899e+01\n-1.1352114731754694e+01\n1.4244976624978468e+01\n-4.1455035444746265e+01\n-1.1306518629059612e+01\n1.4325977236146748e+01\n-4.2342324321998213e+01\n-1.2705142531430853e+01\n1.3023651478173649e+01\n-4.0868061430667190e+01\n-1.4135038533349704e+01\n1.2517171812697532e+01\n-4.0439090815012918e+01\n8.0987312853123417e-01\n1.5268114099123080e+01\n-5.2093800875350269e+01\n-6.7925973198434724e+00\n1.3359844140843940e+01\n-4.6474609338647348e+01\n-1.2851667425808722e+01\n1.2233879427068427e+01\n-4.3341211134310718e+01\n-1.5618249665983935e+01\n1.1519649227760606e+01\n-4.1243989509164841e+01\n-1.1834388926961271e+01\n1.3173105476290027e+01\n-4.9278261158308425e+01\n-1.1576507554857207e+01\n1.1581993535673780e+01\n-4.5756650198897752e+01\n-1.2168818365562210e+01\n1.0919095081275422e+01\n-4.4404536407405558e+01\n-1.5398866948442336e+01\n1.0185694773945976e+01\n-4.1830380819224779e+01\n5.6989225832197681e+00\n1.0782940581261414e+01\n-4.7245880990419245e+01\n4.7130446316895318e+00\n1.0063669560463451e+01\n-4.6335443389703123e+01\n-1.5367410111486304e+01\n9.0928395654247325e+00\n-4.3506038695348330e+01\n-1.6575241187029498e+01\n9.3789706110427939e+00\n-4.6904699798314184e+01\n-1.5294984459804651e+01\n8.6386078968435740e+00\n-4.4449131684510562e+01\n-2.3280065558195444e+00\n7.5208264489288927e+00\n-4.3378502228734156e+01\n-1.3799169156932791e+01\n6.7423640834304974e+00\n-4.3883732977144902e+01\n-2.0858372089988084e+01\n7.0272655344131225e+00\n-4.7626038792537926e+01\n2.6922682426242600e-01\n3.2161455623419548e+00\n-2.3316848872656234e+01\n-1.8857124167283055e+00\n5.8753676856373573e+00\n-4.1327824994238611e+01\n-6.1258942126666038e-01\n3.0542702680749456e+00\n-2.2484581540339956e+01\n-2.2449995199177417e+00\n3.8560992283820026e+00\n-2.8979450333404632e+01\n-2.8526915481865007e+00\n5.5400455524219971e+00\n-4.0425371409332833e+01\n-1.8171935260370329e+01\n5.6141455761446393e+00\n-4.4441804950799231e+01\n-1.3796076888689383e+01\n5.0354014969240879e+00\n-3.9891432222651034e+01\n-1.7939376974507287e+01\n5.3844468065801712e+00\n-4.3549857166894753e+01\n-3.4888892624365262e+00\n4.6339385268050703e+00\n-3.8653252944302203e+01\n-3.5284670217147629e+00\n3.6955085018511693e+00\n-3.4689642071983386e+01\n-1.2903550917156116e+01\n3.6668321998892077e+00\n-3.7785004395215687e+01\n-3.5519118932087785e+00\n2.0206050737214540e+00\n-2.3196052383350789e+01\n-7.2600565415360681e+00\n3.4338470209263328e+00\n-3.7673401080777253e+01\n-3.8965378060232175e-01\n1.8272191101461877e+00\n-2.1914068166225267e+01\n-6.4729459541968222e+00\n2.9566305531672734e+00\n-3.6037437988845419e+01\n-2.4303603306539916e+00\n1.9430291711665839e+00\n-2.5020001018173055e+01\n-2.4195146588329774e+00\n1.9964835358672957e+00\n-2.5500181392438247e+01\n6.6254428931863654e+00\n4.0086890245021841e+01\n-4.5785855559975090e+01\n6.8150234307477904e+00\n4.0030695660521666e+01\n-4.5891613375223564e+01\n2.3640929880654022e+00\n3.6216319661610882e+01\n-4.4736025272641648e+01\n9.3327285307819685e-01\n3.4361001045025439e+01\n-4.3076550672782361e+01\n-1.2938431648176516e+01\n2.7927108970421298e+01\n-3.6067674682079065e+01\n-2.4555071109587544e+01\n3.6174463484335810e+01\n-4.7178774033388976e+01\n3.0926989938176441e+00\n3.0887668626620329e+01\n-4.2443671823983010e+01\n-2.3390426666240121e+01\n3.5395129732806261e+01\n-4.7243776858972232e+01\n-2.2935328084192413e+01\n3.4700460530966353e+01\n-4.6246723930358648e+01\n-2.3177692292623746e+01\n3.5231568222227416e+01\n-4.7251938122532088e+01\n-2.6654964102105986e+01\n3.7779968811567322e+01\n-5.0717817747696401e+01\n-2.7586403320677952e+01\n3.8117660128140024e+01\n-5.1733741401538360e+01\n-2.8324277683277966e+01\n3.6103545687324186e+01\n-5.0184022184515563e+01\n-2.8364625887746932e+01\n3.5913346213323209e+01\n-5.0711779792311468e+01\n-2.8343628830241752e+01\n3.4701303377244670e+01\n-4.9497225440009714e+01\n-2.8399743646895029e+01\n3.4088269107343798e+01\n-4.9264487253439107e+01\n-2.8399743646895029e+01\n3.4088269107343798e+01\n-4.9264487253439107e+01\n-2.7735136094025332e+01\n3.4060871999543465e+01\n-4.9800700273314305e+01\n8.9219959994019007e+00\n2.8572236148489427e+01\n-4.5337211902340137e+01\n-1.5226716254557715e+01\n2.0740984577573059e+01\n-3.2581825786023757e+01\n7.5152729384296544e+00\n2.6317572524667131e+01\n-4.4509806668034798e+01\n-7.4888056943479842e-01\n2.0983786097259244e+01\n-3.4768705088117130e+01\n-5.2797099885864771e+00\n2.1785355458706256e+01\n-3.6973002355662210e+01\n1.6552314957482697e+01\n2.9369637448677640e+01\n-5.2465816702904888e+01\n1.2478567318398870e+01\n2.7762271871777426e+01\n-4.9290110820876691e+01\n8.0987997546379304e+00\n2.5377410750579710e+01\n-4.5807432844309375e+01\n2.4761867939019817e+00\n2.3964817837313330e+01\n-4.2925917008199093e+01\n2.9827787104937369e+00\n2.4236455425983891e+01\n-4.3650525675663445e+01\n-1.6600604700653214e+01\n1.8140314375409915e+01\n-3.1534498551507731e+01\n-7.3241451851777537e+00\n2.0941026253259501e+01\n-3.7820066224526691e+01\n-1.9233149127546845e+01\n2.0139012400087502e+01\n-3.5912851393797432e+01\n1.5922040454640028e+01\n2.6344828031909081e+01\n-5.1748817900164930e+01\n5.9913637573164689e+00\n2.2778888329104358e+01\n-4.5328590998664581e+01\n6.7336058961612970e+00\n2.3169726296491390e+01\n-4.6555881944327517e+01\n-5.9309530805486617e+00\n2.0124228658099849e+01\n-3.9653788404374005e+01\n-1.2294634030015208e+01\n1.7884134822609049e+01\n-3.6378342402591855e+01\n-1.3578687316645797e+00\n2.0353256350154982e+01\n-4.3262172016825048e+01\n1.0154152842566744e+00\n1.8718462113073439e+01\n-3.9992709263523679e+01\n3.1390445189021690e+00\n2.0747188041189226e+01\n-5.0124417802399549e+01\n-3.1660121440014604e+00\n1.8943110245672312e+01\n-4.9418940286502220e+01\n1.4209659263269625e+01\n2.1259562943590495e+01\n-5.6221760697669978e+01\n6.2134552617568017e+00\n2.2412421566728501e+01\n-5.9295022370061893e+01\n1.9653634023203954e+00\n2.0512083778300298e+01\n-5.5440722518765355e+01\n1.3901667801802371e-02\n1.8807960089529093e+01\n-5.3747680104929458e+01\n-1.5287820470630349e+01\n1.3084003957482071e+01\n-3.9867961513476075e+01\n-1.1778894366945208e+01\n1.3469312479754441e+01\n-4.2492825054122839e+01\n-1.3045881329808276e+01\n1.3258782473337131e+01\n-4.2514271776668913e+01\n-3.5278952090058439e+01\n2.1550765171642762e+01\n-6.8867937371065665e+01\n-1.6940111018933774e+01\n1.2304927398450733e+01\n-4.0850190538769041e+01\n-1.6276502035058975e+01\n1.2192777858627032e+01\n-4.0218652667344386e+01\n2.7934193900187196e+00\n1.6437124318595085e+01\n-5.5119096839357248e+01\n-1.6550360596986884e+01\n1.2155346576828778e+01\n-4.0619295251081994e+01\n-3.6558549817699406e+00\n1.4315458355487049e+01\n-5.0080209305383185e+01\n6.1854108555816882e+00\n1.4504126108741151e+01\n-5.1561112072667257e+01\n2.9998868204925704e+00\n1.1354240689411027e+01\n-4.0948926957067911e+01\n-1.2446963864742226e+01\n1.1661119249343191e+01\n-4.3952627745954594e+01\n-9.9984549687271702e+00\n1.2017324751238489e+01\n-4.5698304753379105e+01\n2.4502868770586002e+00\n1.1516435559531001e+01\n-4.7833945173357606e+01\n-2.0555055729066883e+01\n1.1806865383851548e+01\n-5.0395553925976238e+01\n3.0282917763392105e+00\n9.8399712912668580e+00\n-4.5773870354209457e+01\n-1.3966840967362353e+01\n9.3788284504503654e+00\n-4.5952047324755775e+01\n-5.7954812779459097e-01\n7.3533637301685530e+00\n-4.2327943252717851e+01\n-1.1543758429284987e+00\n7.3674240080429518e+00\n-4.3462119762890488e+01\n-1.4886238210074878e+00\n6.6962958432507209e+00\n-4.1703011785970354e+01\n-1.1534678913314345e+00\n3.4200254054706103e+00\n-2.5560808124705506e+01\n-4.1192982035266956e+00\n5.7702823791488758e+00\n-4.1448781394464433e+01\n-1.8859255512553692e+00\n2.8976432583109748e+00\n-2.2132758162518002e+01\n-2.4918626692323596e+00\n3.9890143587781162e+00\n-3.0164114547409323e+01\n-4.7609473059082958e+00\n5.0302500505839696e+00\n-4.0190478377165981e+01\n-1.5218732345943881e-01\n2.4703454916579677e+00\n-2.1927717501527074e+01\n-1.5849597251380736e+00\n2.4944133744718924e+00\n-2.3710345309314526e+01\n-5.6351473209108587e+00\n4.3317776749335621e+00\n-3.8302310895485967e+01\n-1.7673127325622719e+00\n2.2793410223249104e+00\n-2.3426313114036212e+01\n-1.9192448255985008e+00\n2.3017038686753133e+00\n-2.3880418008234326e+01\n-6.2884823425508527e+00\n3.2132193587129958e+00\n-3.6392562890374229e+01\n-3.3834862998413415e+00\n2.8763458401368576e+00\n-3.1469746145005143e+01\n-1.4713002048826572e+01\n6.7390908322912566e+01\n-7.4628042778532674e+01\n-2.3010233171036663e+01\n3.6234768918038000e+01\n-4.5870164721335875e+01\n-2.4472920033416795e+01\n3.6572781272564548e+01\n-4.6532351248571004e+01\n-2.2077875099122366e+01\n3.4894868079789397e+01\n-4.5997154349441672e+01\n-3.8362744700061135e+01\n4.4601224102631157e+01\n-6.2184882792621707e+01\n1.2996088747268274e+01\n3.1082538265924647e+01\n-4.9861935698106173e+01\n-3.0252228887545829e-01\n2.3772702616264933e+01\n-4.1209494426657876e+01\n-1.4711305311944010e+01\n1.8667220138934233e+01\n-3.2040413821423108e+01\n-8.5416453684783100e+00\n2.0596771040692591e+01\n-3.7037360349680483e+01\n8.1225961685147841e+00\n2.0005677875468130e+01\n-3.7695045751943994e+01\n1.5953479588820965e+01\n2.7252041119489881e+01\n-5.2031593587139980e+01\n-7.3692723266461275e+00\n2.0270589121680629e+01\n-3.8487618733605458e+01\n1.2490887402224521e+01\n2.4846667280860576e+01\n-4.8942605193661208e+01\n6.5440110299053911e-01\n2.1602267417756597e+01\n-4.3970395194003515e+01\n7.5968259471721202e+00\n2.2232219182935708e+01\n-4.7956595129491156e+01\n1.4155002494197589e+01\n2.4845675964972354e+01\n-5.7659551337407983e+01\n1.1423700233338566e+01\n2.0897173852654628e+01\n-5.0739967839348971e+01\n9.5531781599107024e+00\n2.0222277190430450e+01\n-4.9784495675902761e+01\n6.0128770721274742e+00\n1.5199239688500734e+01\n-3.9211618442697578e+01\n-5.0736400535013937e+00\n1.6206714149067690e+01\n-4.5514749062598341e+01\n5.2334726704730263e+00\n2.0970938040026727e+01\n-6.0406395852031686e+01\n-1.2017393275921972e+01\n1.5824638647709788e+01\n-4.6337111613177086e+01\n-9.4617346321189988e+00\n1.4005721016672771e+01\n-4.4022196654216515e+01\n-1.4202502719625203e+01\n1.4982926794839951e+01\n-4.8528089581588787e+01\n-2.0297298549691031e-01\n1.5244542393105807e+01\n-5.2908877465772967e+01\n-1.6627375020483555e+01\n1.0050640516539369e+01\n-4.3583834003202838e+01\n-1.7570304454100079e+01\n9.4331172031807142e+00\n-4.3326757128848911e+01\n3.1288669146630075e+00\n8.5011900970421852e+00\n-4.0786109046423967e+01\n-1.6838395393302605e+01\n9.3224364496331571e+00\n-4.5483885874125768e+01\n-1.2612633230500812e+00\n6.7490391505727931e+00\n-4.1778416069916879e+01\n-2.1131976543506905e+01\n6.9837394166712761e+00\n-4.7803353609929047e+01\n-1.7546519261362177e+00\n2.9354377594193384e+00\n-2.1844153511218330e+01\n7.1400834970861748e-02\n2.9331245036099278e+00\n-2.1956537935694211e+01\n-5.0103510746299600e+00\n5.6396836099148207e+00\n-4.0058734666172235e+01\n-3.4473798656072394e+00\n5.2583710255228544e+00\n-3.9902628916813001e+01\n-1.2214241269121757e+00\n2.9005829239955188e+00\n-2.3880486632139725e+01\n-8.8350944994461695e+00\n4.3476541263118182e+00\n-3.9129134743970091e+01\n-3.3130372026324642e+00\n2.5489900249216308e+00\n-2.3996640444996750e+01\n-3.4617559595495893e+00\n4.3042057682382531e+00\n-3.8673333928148516e+01\n-3.4154243685637060e+00\n2.9175387480542549e+00\n-2.7310172085753543e+01\n-6.5644796954845708e+00\n3.6722000142365765e+00\n-3.7348192117917797e+01\n-1.7838587039780243e+00\n2.2259470439485467e+00\n-2.4187125336789848e+01\n9.1061277135175125e+00\n7.5466877125013795e+01\n-8.4465615370037213e+01\n-1.8965253259012140e+01\n6.3484356969712287e+01\n-7.1126188852013073e+01\n-6.9505219438110464e+00\n2.1710775454353939e+01\n-3.7926172998555131e+01\n-9.5383729408750479e+00\n2.0459311235136404e+01\n-3.6485418246130173e+01\n-1.5939473586784285e+01\n1.8024684204605546e+01\n-3.2482128603107505e+01\n2.3184219514004029e-01\n2.2047508500116990e+01\n-4.2521596546109905e+01\n2.6602439978397778e+00\n2.2049828394800436e+01\n-4.5694638319600564e+01\n-1.2319232717006543e+01\n1.5691659130909686e+01\n-4.0750140972476089e+01\n7.7886246151057348e+00\n1.9453191775557450e+01\n-5.2075935372571337e+01\n9.4142585392461742e-01\n1.7652986179672013e+01\n-4.8883678183360260e+01\n1.0776273803644623e+00\n1.5737162552647552e+01\n-5.2237528474747393e+01\n-1.6165026550411454e+01\n1.0109557270741334e+01\n-4.1966826958129481e+01\n-1.6625648022159393e+01\n1.0464725032065154e+01\n-4.3647988086101918e+01\n2.2250713967530742e+00\n7.7111219122831747e+00\n-3.5041607493607238e+01\n-1.6253513466160163e+00\n3.4716038059257026e+00\n-2.7297580452359679e+01\n-6.0539365674793615e+00\n3.9046352027520412e+00\n-3.7996712425990850e+01\n-7.2638420593987050e+00\n4.6670240183237098e+01\n-5.4922374911144971e+01\n-7.2696513552179347e+00\n4.6639540408121640e+01\n-5.5120552702900397e+01\n-1.6904463392167564e+01\n4.3367420779089642e+01\n-5.0972198122573722e+01\n-1.0974032998290593e+01\n4.4678028073528523e+01\n-5.2864185084282823e+01\n-1.5313960054706959e+01\n4.3855025341117873e+01\n-5.1606413205994514e+01\n-1.5313960054706959e+01\n4.3855025341117873e+01\n-5.1606413205994514e+01\n-7.9415275976718265e+00\n4.4458771012435136e+01\n-5.3530656052109848e+01\n6.9351213906371996e+00\n2.6489234586769822e+01\n-4.7003682430624323e+01\n-5.4008143475903672e+01\n4.4955582578711685e+01\n-9.4512762419647217e+01\n6.4335490967826701e+00\n1.4462145659996565e+01\n-3.9953526231429080e+01\n1.1941282219356427e+01\n2.1359771587374738e+01\n-6.0380449851169821e+01\n1.0261235987158912e-01\n1.5945284562745860e+01\n-5.0324299437165507e+01\n-1.4937619260157215e+01\n1.2494953068669904e+01\n-4.1068311351148679e+01\n1.6059530471184362e+00\n1.6063713840832399e+01\n-5.3156254012324091e+01\n-1.7639643594707137e+00\n1.2144153050087864e+01\n-5.0115538444335911e+01\n-1.5879760106918667e+01\n1.0085696040222253e+01\n-4.4050330013115577e+01\n-1.8442718589049512e+00\n3.4243680074509384e+00\n-2.7002191150144441e+01\n-1.8497176747474497e+00\n2.9824508549122419e+00\n-2.6688850553228743e+01\n-1.3781775827072172e+01\n4.3025640214586780e+01\n-5.1565643057148478e+01\n-3.2991966114557369e-01\n3.1176920124914378e+01\n-4.1340811205966730e+01\n7.5082141907982409e+00\n3.3138517569585076e+01\n-4.5845007723817716e+01\n-1.1611240298619065e-01\n1.7366677422521068e+01\n-4.8423956506762771e+01\n-3.0671470722721752e+00\n1.6131071763321671e+01\n-4.7246072529751707e+01\n-1.5119138679783534e+01\n1.1165873919858349e+01\n-4.0371203065251635e+01\n5.4973921009053806e+00\n8.4840504843397859e+00\n-3.7836839986690876e+01\n-3.3571883013533231e+01\n6.8356938812118287e+01\n-7.5076676089126266e+01\n-1.2785236743397784e+01\n4.4385525120237332e+01\n-5.2284992194815665e+01\n1.4590807576887295e+01\n2.3543170930507515e+01\n-5.8251209519640462e+01\n1.0592282654371351e+01\n2.1078703579628591e+01\n-5.2502480492342897e+01\n2.4636637054860380e+00\n1.7455895235501337e+01\n-4.9301070696661299e+01\n-4.1566208308654247e+00\n1.5907061320610488e+01\n-4.6939623745796453e+01\n-3.4110121858262377e-01\n1.6351090580943705e+01\n-5.3833807971369509e+01\n-1.6188472821448450e+01\n1.8732042190726762e+01\n-3.2047066980390021e+01\n-2.3362238631836574e+00\n1.5811538531300890e+01\n-4.8320453248141582e+01\n4.4258445761621079e+00\n2.0827367937920133e+01\n-4.9063659822870598e+01\n-6.7637180123649774e+00\n1.3368714851903801e+01\n-4.8321968298101375e+01\n1.4576227362820484e+01\n1.5747812051719151e+01\n-3.3222046989474897e+01\n1.3703798437407888e+01\n1.5013759113421960e+01\n-3.2010252531983980e+01\n1.3612205954927630e+01\n1.4888264878695255e+01\n-3.1673615385603977e+01\n1.3253818047791198e+01\n1.4863413909331346e+01\n-3.2806118656132817e+01\n1.2477432459437226e+01\n1.1011162556984898e+01\n-2.5445495689271873e+01\n1.3403703652769032e+01\n1.4743208583293573e+01\n-3.3210522347365568e+01\n6.4133418421231490e+00\n2.1146350352672211e+01\n-4.4832034765851873e+01\n1.7964955543257439e+01\n2.6892300657721336e+01\n-6.2072659570765254e+01\n1.9204902204158255e+01\n2.6992360245979182e+01\n-6.2774004162317190e+01\n1.6515057678193251e+01\n2.6435841109870363e+01\n-6.1206411056412527e+01\n6.6902288077609606e+00\n2.0643342632862144e+01\n-4.5861614667379762e+01\n8.0303182985460619e+00\n2.4282531305024978e+01\n-5.4477660276734646e+01\n2.9166471463385673e+00\n2.3237234082246083e+01\n-5.0540606785788654e+01\n9.2006782057174863e-01\n2.2932056272491707e+01\n-4.9243854360743157e+01\n3.2069502126547440e+00\n2.3293469082364769e+01\n-5.0796719021740984e+01\n1.4072083691160334e+01\n1.4131340898233221e+01\n-3.6160289436643673e+01\n1.4072083691160334e+01\n1.4131340898233221e+01\n-3.6160289436643673e+01\n1.4213617140968417e+01\n1.4070500926264328e+01\n-3.6101972473469168e+01\n4.6660967877401651e+00\n2.1374904653654653e+01\n-4.7633379883571109e+01\n1.9211898696758556e+01\n2.6196083640778465e+01\n-6.3728909745352688e+01\n1.5945415102449289e+01\n2.5058178772970511e+01\n-6.1028715154180155e+01\n1.1450731002291173e+01\n1.7966689243172084e+01\n-4.4122017481931792e+01\n1.1450731002291173e+01\n1.7966689243172084e+01\n-4.4122017481931792e+01\n1.3433490094726277e+01\n8.8697774003336214e+00\n-2.6032512379505178e+01\n8.2113391051962914e+00\n2.3402239911782090e+01\n-5.5564255317714050e+01\n1.2839267201446937e+01\n9.3207305013687929e+00\n-2.7236245057529132e+01\n1.2961825494882646e+01\n9.2103924986993100e+00\n-2.7032311201465067e+01\n1.2181578840825205e+01\n7.8781999174718607e+00\n-2.4321012086933457e+01\n1.2527894700939937e+01\n7.8622718999378689e+00\n-2.4287179070717077e+01\n6.5510981936806205e+00\n2.2708686438567486e+01\n-5.4325605438160878e+01\n1.2896877680681824e+01\n8.8886349088423913e+00\n-2.6618652632700652e+01\n7.3380076080365928e+00\n2.2826008228658257e+01\n-5.5234833561846386e+01\n7.7435110816005182e+00\n2.2867264061575888e+01\n-5.5509507935335968e+01\n1.1675781306353239e+01\n6.9967215396491218e+00\n-2.2565484236809716e+01\n1.7168647671294508e+01\n2.4484578657243215e+01\n-6.3629955022165049e+01\n1.3133751822018976e+01\n8.3000481116328420e+00\n-2.6076460858565579e+01\n1.1769584977605559e+01\n6.8967906571629216e+00\n-2.2822799161405445e+01\n1.3718624270674052e+01\n1.2943774395784644e+01\n-3.7287275331531227e+01\n1.1208757353342227e+01\n2.2895935141829053e+01\n-5.8828144812273820e+01\n7.4509131138837708e+00\n1.8613403923124498e+01\n-4.7421476424639614e+01\n1.3403592155276570e+01\n7.5309645444575324e+00\n-2.5371564887062753e+01\n1.4071613328976278e+01\n1.2275579365778631e+01\n-3.6488450923982171e+01\n1.3705645490566354e+01\n1.2914072176236742e+01\n-3.7869735630021076e+01\n5.1694415479461986e+00\n2.1453832157804133e+01\n-5.4023745118205895e+01\n1.2290262636038017e+01\n1.2000707254982531e+01\n-3.4996691531644402e+01\n1.9789642537123548e+00\n2.0973017032499701e+01\n-5.1680266653403152e+01\n1.1658120172295067e+01\n7.0204491291541693e+00\n-2.4011262417063552e+01\n1.7650320684935905e+00\n1.9956225084071257e+01\n-4.9923710013730286e+01\n1.3696857426697429e+01\n1.2538586022363010e+01\n-3.7790141288825602e+01\n1.2778879262283331e+01\n8.0851760201075749e+00\n-2.7205066598125683e+01\n1.3191010109969502e+01\n7.5160107115042951e+00\n-2.6174123598509446e+01\n8.2069761345220762e+00\n1.7980195422669240e+01\n-4.8392400707527116e+01\n1.1933782745034348e+01\n8.0169044565376915e+00\n-2.6973646299061038e+01\n1.7493843157011626e+00\n2.0513631206153317e+01\n-5.1735492728115922e+01\n1.4154794220621371e+01\n1.1348427549635426e+01\n-3.5792059898877326e+01\n1.2943846354311983e+01\n7.4645612374012673e+00\n-2.6364314629755714e+01\n1.2918397355891960e+01\n6.5957622062334078e+00\n-2.4261814525978632e+01\n1.2462631924615970e+01\n7.9498313527519846e+00\n-2.7544992309158996e+01\n1.2986985298750731e+01\n7.3267117264371429e+00\n-2.6342887225733801e+01\n1.2410737499646189e+01\n7.3577412578671044e+00\n-2.6318369482963032e+01\n1.1885676107354692e+01\n7.9446712643860478e+00\n-2.7194280548088631e+01\n5.8238783713338149e-01\n1.9980142343030092e+01\n-5.1085395060155534e+01\n6.5460715127883011e+00\n2.0877330834328458e+01\n-5.6041746894893706e+01\n1.2035658105269892e+01\n7.6712555034338186e+00\n-2.6810435067113026e+01\n1.3706022228027908e+01\n6.0634464623226592e+00\n-2.3987553188933870e+01\n1.4570624558552584e+01\n9.9147554883563753e+00\n-3.3898543266420596e+01\n1.3015906680751938e+01\n7.0627102883487272e+00\n-2.6356304824648220e+01\n6.2153125972012715e+00\n2.0562369818533949e+01\n-5.6148026587640530e+01\n1.7849782784255050e-01\n1.9619120846636235e+01\n-5.1018180352018348e+01\n1.2589421001019629e+00\n1.9683104932760894e+01\n-5.1824140026130003e+01\n1.0985005426624788e+01\n2.1064832113089945e+01\n-6.0347612323625782e+01\n1.1550866768513190e+01\n6.8857465278410439e+00\n-2.6176694635914568e+01\n1.2489436914332190e+01\n7.3623387650397634e+00\n-2.7837828659120042e+01\n1.3314557890571029e+01\n6.4584978658148202e+00\n-2.5983779241593737e+01\n1.2097863955272357e+01\n7.1982190576019809e+00\n-2.7213104354136114e+01\n1.2899138823144806e+01\n6.7153476551694977e+00\n-2.6635134346560370e+01\n1.2673233555177577e+01\n7.1857919897893945e+00\n-2.7838881362038755e+01\n1.3458108737578307e+01\n5.3814599077549499e+00\n-2.3512842952887116e+01\n1.2009504028617087e+01\n7.2506950009704525e+00\n-2.7644679695984344e+01\n1.2216457634156225e+01\n6.9466933954818897e+00\n-2.7022350858941916e+01\n4.6026899512820316e+00\n1.9665030390767019e+01\n-5.5510719356054167e+01\n4.6026899512820316e+00\n1.9665030390767019e+01\n-5.5510719356054167e+01\n1.2750793745648709e+01\n7.2074586611669167e+00\n-2.8017998937565082e+01\n1.2539829399376741e+01\n6.7884887311376705e+00\n-2.7142064300663055e+01\n1.1572859211490057e+01\n6.5163101416294325e+00\n-2.6222095231017114e+01\n1.3859294041679220e+01\n1.0173155746919562e+01\n-3.7025758923844045e+01\n1.4627952943516066e+01\n8.6326931728975644e+00\n-3.3717863485600553e+01\n1.3181166948639335e+01\n5.7892854673569767e+00\n-2.5759136362869029e+01\n1.4330097713770265e+01\n9.0520026526316748e+00\n-3.5086936232102325e+01\n1.3021046788768860e+01\n6.2291443846096364e+00\n-2.6997170337435513e+01\n1.2956453281275124e+01\n6.1496290387313577e+00\n-2.6810798863402056e+01\n1.3413417860533281e+01\n5.9916011272223120e+00\n-2.6916004312202229e+01\n1.2874186910921910e+01\n5.6767660219765474e+00\n-2.5754231059041270e+01\n1.1995142806309511e+01\n6.8064505593106102e+00\n-2.8549945035677190e+01\n1.2859409776480158e+01\n5.9007988794879411e+00\n-2.6622212450134235e+01\n1.3082632631153158e+01\n5.3121019390289481e+00\n-2.5196929283564891e+01\n1.2330029260337923e+01\n6.6697891126733966e+00\n-2.8656938882097155e+01\n3.9164059911670916e+00\n1.7767553484022880e+01\n-5.4776019186146335e+01\n1.3499743798914110e+01\n1.0386553820191077e+01\n-3.9753268219790840e+01\n1.1232314428877149e+01\n6.0991180750281160e+00\n-2.7459777923042591e+01\n1.3850429958465002e+01\n9.5077446384324773e+00\n-3.8108004184942160e+01\n1.2115302726665506e+01\n6.8036589062231769e+00\n-2.9691146735235151e+01\n1.2115302726665506e+01\n6.8036589062231769e+00\n-2.9691146735235151e+01\n1.2814789839818255e+01\n5.4244294680689835e+00\n-2.6320722797690149e+01\n1.2067412618050986e+01\n6.3687569999072435e+00\n-2.8411836087200292e+01\n1.4553678896553775e+01\n8.2253685595202839e+00\n-3.5329129893255661e+01\n1.2294890862002680e+01\n6.3271504733257160e+00\n-2.9011007953779249e+01\n1.1897602891876767e+01\n5.2603934571060709e+00\n-2.5882021705551669e+01\n1.2766424638408214e+01\n5.6151377010498686e+00\n-2.7445585370619433e+01\n1.2809300080168596e+01\n5.2748967706329788e+00\n-2.6501780136315869e+01\n1.3285888396020797e+01\n5.5004513794997587e+00\n-2.7455831580448354e+01\n1.2456221131382810e+01\n5.7112557750309740e+00\n-2.7559788844137454e+01\n1.2718723077312314e+01\n5.2138981751562978e+00\n-2.6532047230907516e+01\n1.2354873293450609e+01\n5.6965220826579444e+00\n-2.7779025829740544e+01\n1.2608548744559297e+01\n5.4952988429913310e+00\n-2.7376677761376133e+01\n1.2036267445944290e+01\n6.2251466105317732e+00\n-2.9158671393021407e+01\n1.3557463870945066e+01\n9.7805257743639196e+00\n-4.0339298340467444e+01\n1.3522600497308808e+01\n9.6275651680503564e+00\n-4.0237772468015073e+01\n1.3532140629743905e+01\n9.5065900452311336e+00\n-3.9933916020585897e+01\n7.9542297235747110e+00\n1.4378098128128549e+01\n-5.0271510505915209e+01\n1.3837199017686469e+01\n9.8412122494407868e+00\n-4.1929442054489584e+01\n6.2551127140135616e+00\n1.2439995265809229e+01\n-4.4374403474443298e+01\n1.3917453941458817e+01\n9.7031004513087762e+00\n-4.1777344275952224e+01\n1.2268048390029621e+01\n5.6546722589274028e+00\n-2.8767407520981759e+01\n1.2617709938035254e+01\n5.1476974329237066e+00\n-2.7929603848185621e+01\n1.2741131077537554e+01\n5.3689374958821654e+00\n-2.8817197252233328e+01\n1.2905001924133838e+01\n4.2646687367319256e+00\n-2.5712489183954158e+01\n1.2905001924133838e+01\n4.2646687367319256e+00\n-2.5712489183954158e+01\n1.2276696810087845e+01\n5.6329618348146262e+00\n-2.9335913672579998e+01\n-1.8265085213403753e+00\n1.5126661033402284e+01\n-4.8249605713158587e+01\n1.2524399098575444e+01\n4.9363331410716622e+00\n-2.7912667999993754e+01\n1.2711244625354308e+01\n4.7776973939547318e+00\n-2.7785480369435664e+01\n5.1285945490298808e+00\n1.2029475195259002e+01\n-4.4739486327960861e+01\n1.3088294865420934e+01\n3.4953176149638261e+00\n-2.4569332150533228e+01\n1.2804790663188994e+01\n4.6176291937563949e+00\n-2.7594254198648642e+01\n1.2583971782536308e+01\n4.8025465866450583e+00\n-2.8277232375826742e+01\n1.4204835509751527e+01\n3.5708766591342904e+00\n-2.5727327522604888e+01\n1.2823587490486048e+01\n4.8752727609350268e+00\n-2.8947020004703951e+01\n1.2669426720464825e+01\n4.7205881379204904e+00\n-2.8231686753658295e+01\n1.4019985672693114e+01\n3.7325244413294998e+00\n-2.6171275855161053e+01\n1.3835044060019360e+01\n7.0755346056142496e+00\n-3.6596045955324648e+01\n1.2981838722672618e+01\n4.5763850816786249e+00\n-2.8393260553282470e+01\n1.2854749678295635e+01\n4.3408807622940566e+00\n-2.7555077507698691e+01\n1.3224469649917777e+01\n4.3103055634890790e+00\n-2.8134977079228882e+01\n1.3334121129618003e+01\n4.3504863905564939e+00\n-2.8267602462774029e+01\n-3.2707814873120475e+00\n1.5050606987298940e+01\n-5.0277356954990111e+01\n1.3031022621924329e+01\n4.0382243557157027e+00\n-2.7297666835546647e+01\n1.3031022621924329e+01\n4.0382243557157027e+00\n-2.7297666835546647e+01\n1.2666685330846093e+01\n3.8872823057385726e+00\n-2.6754607838666665e+01\n1.2757346356091990e+01\n3.4613542836161102e+00\n-2.5485655480229408e+01\n1.3894852960931802e+01\n3.5944597914786640e+00\n-2.6656155930647770e+01\n1.3894852960931802e+01\n3.5944597914786640e+00\n-2.6656155930647770e+01\n1.2968019779859681e+01\n4.3105210308531348e+00\n-2.8440625149160429e+01\n1.2775129704056916e+01\n3.2240530919077961e+00\n-2.5095808098779941e+01\n1.3855123881831453e+01\n3.5501102323342768e+00\n-2.6859863265266704e+01\n1.1848186377425121e+01\n4.6017922376387350e+00\n-2.8853535016774309e+01\n1.2935934537909166e+01\n4.4118812153081581e+00\n-2.9027684560530489e+01\n1.3188697318995061e+01\n3.7622984635668821e+00\n-2.6954527847569306e+01\n3.3567410520098591e+00\n1.1957806362352219e+01\n-4.6078883161907527e+01\n1.3760099780459827e+01\n3.3977052144842061e+00\n-2.6568682828755961e+01\n1.2387053357808799e+01\n4.7652735931580166e+00\n-3.0405555904734907e+01\n1.3298503505501635e+01\n7.4176824794998488e+00\n-3.9789051584873427e+01\n1.3272430191391249e+01\n3.8086704193185055e+00\n-2.8011162146597613e+01\n1.3040106539150633e+01\n4.2364478947647157e+00\n-2.9319014633433106e+01\n1.3922476925065922e+01\n3.2723854567789643e+00\n-2.6922082905826866e+01\n1.3402506115350601e+01\n7.0308744881143559e+00\n-3.9399112654088768e+01\n6.2183712782758889e+00\n1.0959863991237203e+01\n-4.7241379690386125e+01\n1.3778468182942973e+01\n2.8759379535935898e+00\n-2.5891447294481210e+01\n2.3719474068938067e+00\n1.2349684343654424e+01\n-4.9253757011147613e+01\n1.2858106478041270e+01\n4.0219065700429804e+00\n-2.9301307404798187e+01\n1.2719090714424725e+01\n4.0301737843248926e+00\n-2.9048265472853458e+01\n1.3145206706079579e+01\n3.9981111902632360e+00\n-2.9752036470703498e+01\n1.2815276643701802e+01\n2.4312654967408021e+00\n-2.4463204727350004e+01\n5.4710515742609918e+00\n1.0649134881482546e+01\n-4.6941477207247281e+01\n5.1636416686386335e+00\n1.1102030787836727e+01\n-4.8572849743068858e+01\n1.2759773120003349e+01\n3.7163239850339735e+00\n-2.9163480536894561e+01\n1.3509256965943463e+01\n2.9121863990912051e+00\n-2.8028473238053650e+01\n3.3006054342252003e+00\n1.1030263923220776e+01\n-4.8407780073950484e+01\n7.6091234032275565e+00\n9.0890539284470737e+00\n-4.5407040755245205e+01\n1.2583116947160811e+01\n3.8218422983158589e+00\n-3.1057226358907286e+01\n1.2432205653222855e+01\n3.7714412834984614e+00\n-3.0858110204014121e+01\n1.2432205653222855e+01\n3.7714412834984614e+00\n-3.0858110204014121e+01\n2.7641938802142549e+00\n3.9638346688367978e+00\n-2.3475183693745581e+01\n1.7491019024822143e+00\n9.9089109773265420e+00\n-4.4068548299907391e+01\n1.2138336844959053e+01\n3.7899019278608179e+00\n-3.1311616491375744e+01\n1.4229312490078458e+01\n2.2907316781599256e+00\n-2.8039540444617305e+01\n1.4500409224424880e+01\n2.0864640241581376e+00\n-2.7640215960331620e+01\n1.4115659750959026e+01\n1.9237009578581563e+00\n-2.6875457746097588e+01\n1.4382488594078950e+01\n1.8323911576093297e+00\n-2.6892082540565251e+01\n1.4086212095820795e+01\n2.1087456472103439e+00\n-2.7642005765509680e+01\n1.2612874918451052e+01\n1.8113844597918556e+00\n-2.5474813823969193e+01\n1.3523984703544029e+01\n2.6558730378201179e+00\n-2.9380018969872992e+01\n1.1573634229616059e+00\n4.1081509955608890e+00\n-2.3647209428694143e+01\n1.2257599235757310e+01\n3.7294163163515117e+00\n-3.2634702630228560e+01\n1.2242552280345365e+01\n3.7223979163113246e+00\n-3.2672272293439235e+01\n1.1949487088550674e+01\n3.6319821195288533e+00\n-3.2137712295751413e+01\n1.1918386031495768e+01\n3.6385722547674813e+00\n-3.2208552604243579e+01\n1.2040212294050409e+01\n3.4724515536024958e+00\n-3.1684328127322711e+01\n1.1982939128060661e+01\n3.4519128273397364e+00\n-3.1816414255121860e+01\n1.2330567128250783e+01\n2.7848469973006775e+00\n-2.9708691143224293e+01\n1.2509510207931447e+01\n1.6097591711358203e+00\n-2.5607971961856439e+01\n-9.2567610357853450e-02\n3.6098365321690498e+00\n-2.0812892191387999e+01\n1.2901554641831826e+01\n2.7554300673188528e+00\n-3.0289961441048892e+01\n1.2922027639771374e+01\n2.6174960700948722e+00\n-3.0120532608368798e+01\n1.2305341465103359e+01\n2.2214363711712322e+00\n-2.8277752640450721e+01\n1.2305341465103359e+01\n2.2214363711712322e+00\n-2.8277752640450721e+01\n1.0271274224867446e+00\n8.9557488665954832e+00\n-4.3344128637213565e+01\n1.4372169407392155e+01\n1.6966418000054166e+00\n-2.8427443527411445e+01\n1.4372169407392155e+01\n1.6966418000054166e+00\n-2.8427443527411445e+01\n-3.8027761378625519e-01\n3.7364029590575911e+00\n-2.1568405336528020e+01\n-3.8027761378625519e-01\n3.7364029590575911e+00\n-2.1568405336528020e+01\n-3.2179688043398597e-01\n3.6769021838338474e+00\n-2.1380938673755296e+01\n1.2590127748597521e+01\n1.1791523984621930e+00\n-2.4895768419439204e+01\n2.1938339385960379e+00\n7.5693019995692152e+00\n-3.9659571558874525e+01\n1.2953612551614340e+01\n2.8849013688066445e+00\n-3.2163461844237119e+01\n1.2225304482478627e+01\n2.7003834012908712e+00\n-3.0790799456126216e+01\n1.9450190200615345e+00\n3.0698701400020298e+00\n-2.2270812824470028e+01\n3.5269664619340388e+00\n2.4975499444621598e+00\n-2.1712825366150835e+01\n1.3783106690714224e+01\n1.5085744511538006e+00\n-2.8068996644983066e+01\n1.8518621304417966e+00\n2.9578865900396014e+00\n-2.2150786005695434e+01\n1.2776605585614544e+01\n2.6661639615219284e+00\n-3.1892657973622551e+01\n1.4127420407175380e+01\n1.0418132497783728e+00\n-2.6945949216490956e+01\n1.2671192961167675e+01\n2.5811412997875807e+00\n-3.1570320004152862e+01\n1.2772945380154015e+01\n2.5046381794037766e+00\n-3.1447318888825500e+01\n1.2495815878590120e+01\n7.4669328266250834e-01\n-2.4916565349474027e+01\n1.2827605099868226e+01\n2.2283029518888031e+00\n-3.1105745523161215e+01\n1.2827605099868226e+01\n2.2283029518888031e+00\n-3.1105745523161215e+01\n1.2472671423857943e+01\n7.4190247368050644e-01\n-2.5050635107260927e+01\n1.3668534097783560e+01\n1.3248524762709237e+00\n-2.8437378297220807e+01\n1.2405823798502416e+01\n8.2510889293394651e-01\n-2.5480309448850818e+01\n-9.6609470595598124e-01\n3.4085367920207719e+00\n-2.1654602627500470e+01\n1.4104542959777991e+01\n8.9217035702693526e-01\n-2.7542672270843049e+01\n3.4898626383397308e-01\n7.4708151309281385e+00\n-4.1229870501263456e+01\n3.1079794953936095e+00\n1.9828295127575375e+00\n-2.1142898640773879e+01\n1.2438235726422931e+01\n1.0376279444887970e+00\n-2.7752257979720437e+01\n1.2385573404401054e+01\n1.2790086715088178e+00\n-2.8823503519826534e+01\n1.4569247707394885e+01\n6.8278447262658104e-01\n-2.8250765798818001e+01\n1.4178889661742430e+01\n5.9807028777499827e-01\n-2.7585043586278015e+01\n1.2485993974424115e+01\n1.2966479904498693e+00\n-2.9271249348368563e+01\n1.2811659533321567e+01\n1.8650443269540560e+00\n-3.1874613701223648e+01\n1.2352064824841197e+01\n6.7004897510727746e-01\n-2.6615632054059848e+01\n1.2763699486806996e+01\n1.8450800664478080e+00\n-3.2325334552292404e+01\n1.2439460735491396e+01\n6.1154537364798556e-01\n-2.6765739064391621e+01\n1.2836119598819538e+01\n1.8656280790619360e+00\n-3.2638306758316496e+01\n2.5816841196782430e+00\n1.7899952833537165e+00\n-2.0833369889441130e+01\n1.2737545521810604e+01\n1.9324841632590795e+00\n-3.3168258233663273e+01\n1.2348867136841978e+01\n2.7175353641281164e-01\n-2.5606972879433933e+01\n1.2364221898368715e+01\n1.1818573112533792e-01\n-2.5183079465745777e+01\n1.2364221898368715e+01\n1.1818573112533792e-01\n-2.5183079465745777e+01\n-7.7589699032465265e-01\n7.1874450346975944e+00\n-4.1516877238014430e+01\n1.2468781331127982e+01\n4.6296907948643079e-01\n-2.6948494628743504e+01\n-2.9445121749693220e-01\n2.7499604956195980e+00\n-2.2370586119199046e+01\n5.6323861173771328e-01\n2.2452754196462608e+00\n-2.1261800252577746e+01\n5.9842761938425049e-01\n2.2424306067349158e+00\n-2.1259424227300979e+01\n1.2887465381279535e+01\n1.4785704502174808e+00\n-3.2444727143391013e+01\n6.4967756338750782e-01\n2.1501394852626947e+00\n-2.1144485512743572e+01\n6.9245895894730214e-01\n2.1916323578332033e+00\n-2.1292572676427167e+01\n1.4103397859997093e+01\n5.6840825851877985e-01\n-3.0002920120067174e+01\n1.2314809257594387e+01\n3.6399981206537213e-01\n-2.7234575694370289e+01\n-1.2572985431522307e-01\n2.4546052964680829e+00\n-2.1810116468861111e+01\n-8.7119535574608375e-01\n2.8420043656709257e+00\n-2.2770850702279141e+01\n3.9568331999003203e+00\n1.2475164134999521e+00\n-2.1138030193156872e+01\n1.0640085423263133e+00\n1.9130284537526512e+00\n-2.0854850227930672e+01\n1.3085517934753906e+01\n1.3114776300152979e+00\n-3.2598748410573307e+01\n1.3085517934753906e+01\n1.3114776300152979e+00\n-3.2598748410573307e+01\n1.2221571185781338e+01\n-1.7646139253310936e-01\n-2.4909892134027302e+01\n3.3724098741847119e-01\n2.2292890237296037e+00\n-2.1445414457382373e+01\n9.2673228635262761e-01\n1.9785860538486422e+00\n-2.1029841630908368e+01\n9.2673228635262761e-01\n1.9785860538486422e+00\n-2.1029841630908368e+01\n1.2742248990185345e+01\n1.5904487754853511e+00\n-3.3713818658451828e+01\n6.9003662988970971e-01\n1.9825378850937785e+00\n-2.1006284704250429e+01\n1.6056141585229871e+00\n1.6497359366670872e+00\n-2.0622388501888977e+01\n-4.9966324169744963e-01\n2.5358850706459486e+00\n-2.2302174564606762e+01\n1.3697924045541068e+01\n4.2068461561308301e-01\n-2.9651174715717293e+01\n1.3780028380431357e+01\n3.8622561402077565e-01\n-2.9538438288279860e+01\n-2.3506745094901926e-01\n2.3276138903647072e+00\n-2.1771802908987585e+01\n2.0560361354031205e+00\n1.3894207316656704e+00\n-2.0539237576617023e+01\n1.2181920085063110e+01\n-2.2501538940084212e-01\n-2.5952864764468277e+01\n1.2180754203824122e+01\n-4.9271688144408560e-01\n-2.4793254277182470e+01\n1.2180754203824122e+01\n-4.9271688144408560e-01\n-2.4793254277182470e+01\n1.2196744181264071e+01\n-2.8697807388194196e-01\n-2.5870040781920903e+01\n1.3303823577058785e-01\n1.9843259159407851e+00\n-2.1364229695288017e+01\n1.3141729958002628e+01\n9.0430225115116736e-01\n-3.2932038153226848e+01\n1.3543593248548779e+01\n3.1651574337129895e-01\n-3.0460557781225905e+01\n1.4350762987551706e+01\n-1.9068723436733612e-01\n-2.9072380756167622e+01\n-4.9830262615646798e-02\n2.0264909170512682e+00\n-2.1515872463075592e+01\n1.3466368410190404e+01\n3.3706815810004392e-01\n-3.0640577987967891e+01\n1.2200674862663542e+01\n-3.6122713583409888e-01\n-2.5936046282064822e+01\n-9.6739315769044487e-01\n2.4906316877679169e+00\n-2.2684636059892494e+01\n-1.0053264383819582e+00\n2.4456910204186442e+00\n-2.2505557150614315e+01\n3.2310193550198023e+00\n9.7704107427042985e-01\n-2.0631822651560313e+01\n-2.5347700907330584e-01\n2.0314042093103573e+00\n-2.1543066018724225e+01\n-2.5612372017404494e-01\n2.0212007920454957e+00\n-2.1533417409149859e+01\n1.2327474301449275e+01\n8.2394898128482177e-02\n-2.9076749760760819e+01\n1.4784720568912579e+01\n-5.8436681226303322e-01\n-2.9796012340232920e+01\n1.3233732437369561e+01\n4.3617139610925748e-01\n-3.2233563714326159e+01\n-9.7790607314862152e-02\n1.8039104246498225e+00\n-2.1301615709266425e+01\n1.2330881626272161e+00\n1.2759305407212012e+00\n-2.0514512093906518e+01\n1.3423218708992488e+01\n2.6534831902584799e-01\n-3.1877222119322273e+01\n1.3518977097551842e+01\n2.4839126884971824e-01\n-3.2034514253082683e+01\n5.7318701514963033e+00\n4.7886696244335597e-01\n-2.2741445965531369e+01\n-1.1760276053080623e-01\n1.7129398745454143e+00\n-2.1238593406229079e+01\n1.2143187594884933e+01\n-7.2274937432431297e-01\n-2.5832152314215687e+01\n7.0404693909119036e+00\n2.0991509842238898e-01\n-2.3337512373619429e+01\n6.8688654140855512e+00\n2.0903367353984256e-01\n-2.3331354954134600e+01\n1.3473181606308664e+01\n8.6798467018380246e-02\n-3.1944334985032896e+01\n1.3531880438447050e+01\n-6.0947253234251285e-02\n-3.1198079934690941e+01\n4.1948751210250856e+00\n4.9010822075906568e-01\n-2.1151044870839794e+01\n5.9084726771392733e+00\n3.6290326896588360e-01\n-2.2966436152501252e+01\n7.5340343245250085e-01\n1.2589135357668799e+00\n-2.0639046550245276e+01\n-1.7985605716984394e+00\n2.9781487089834311e+00\n-2.6317577461075032e+01\n1.3614055347061283e+01\n-1.7118209443393126e-01\n-3.1221018707725914e+01\n1.0524327528407411e+00\n1.1191236679068324e+00\n-2.0488024729506840e+01\n1.5217448577658153e+00\n1.0008567576721843e+00\n-2.0477541657640767e+01\n1.3638557487556806e+01\n-2.2772193087123915e-01\n-3.1267504905791860e+01\n-2.5665973147340497e+00\n3.3140064358563772e+00\n-2.7751017703469369e+01\n1.2170572537607338e+01\n-1.0706393869228459e+00\n-2.5724996853287259e+01\n-1.8632945749333789e+00\n2.7864135211816898e+00\n-2.6026704382261336e+01\n1.7194827835568768e-01\n1.3013668300669476e+00\n-2.0982188316457190e+01\n-3.5761135460088669e+00\n5.5219437394678090e+00\n-4.0531989375785948e+01\n-3.5761135460088669e+00\n5.5219437394678090e+00\n-4.0531989375785948e+01\n3.2443139255844189e+00\n1.6934649900939955e-01\n-1.9854143585648437e+01\n-2.1162635803854490e+00\n2.5060972593732602e+00\n-2.5498567345036729e+01\n-2.1448799143044225e-01\n1.2195622310636951e+00\n-2.1101221711871229e+01\n5.1511343420585154e-01\n9.3249705722951826e-01\n-2.0627197077377403e+01\n-2.4241150201828512e-01\n1.1947139994330889e+00\n-2.1102564329118451e+01\n-2.2062573832432975e+00\n2.4235452678981892e+00\n-2.5396554479740136e+01\n-2.7825633455764378e+00\n2.8553716682784511e+00\n-2.7136390217056519e+01\n-2.1851811489773594e+00\n2.3817034691998540e+00\n-2.5342324584332406e+01\n-2.3784549266601176e+00\n2.4033993478008591e+00\n-2.5396661952532266e+01\n-1.7912947225956131e+00\n1.8960260820419397e+00\n-2.3473036120081041e+01\n8.1003322598610883e-01\n6.9523407066811260e-01\n-2.0449248899563102e+01\n-3.2331368142748423e-01\n1.0991298960132074e+00\n-2.1092068515002456e+01\n2.8003269041435208e-01\n8.5075192171234681e-01\n-2.0802525502487800e+01\n1.4605442755968985e+01\n-1.6470868475816984e+00\n-2.9528130513117429e+01\n1.2030439739677655e+01\n-1.7135698309092458e+00\n-2.5697294555906197e+01\n1.2030439739677655e+01\n-1.7135698309092458e+00\n-2.5697294555906197e+01\n-3.4499877024023156e+00\n2.7571589140827180e+00\n-2.6948970161610330e+01\n-3.4468092131567785e+00\n2.7471066643604316e+00\n-2.6961828605312441e+01\n1.0533553426045783e+00\n4.9286572765074632e-01\n-2.0424155279910824e+01\n1.1217145003479141e+00\n4.4017839062850256e-01\n-2.0370772018407965e+01\n-2.4791548457400103e+00\n2.1380489374977665e+00\n-2.5066149624492521e+01\n6.2828501921551521e+00\n-7.4485726506365635e-01\n-2.1931258646048832e+01\n-1.3886132834616813e+00\n1.4517526912151928e+00\n-2.2324076390565846e+01\n1.2167818962201322e+00\n3.9473302306847297e-01\n-2.0362892507785826e+01\n-2.7519817865011560e+00\n2.4661838937552356e+00\n-2.6819174428147779e+01\n-7.9591270320068719e-01\n1.0923718446784469e+00\n-2.1483998517292605e+01\n4.2461649141144059e-01\n6.0379250872171286e-01\n-2.0580347862386827e+01\n-4.0022445597760709e-01\n9.2957963255542608e-01\n-2.1261137963775489e+01\n-3.3678500743186914e+00\n2.6121347865393378e+00\n-2.7065489900215361e+01\n8.8298646110571721e-01\n4.3086706372278910e-01\n-2.0454289741718931e+01\n8.8298646110571721e-01\n4.3086706372278910e-01\n-2.0454289741718931e+01\n-4.7569001880412237e-01\n8.9152949641831658e-01\n-2.1307010712517041e+01\n4.0610558507494838e+00\n-4.2188680385096544e-01\n-2.1105092114866810e+01\n2.0542393871253846e+00\n-5.2845211085553061e-02\n-2.0278717523037773e+01\n5.1120321548872849e-01\n3.4928533278208712e-01\n-2.0502061073813426e+01\n3.4604148259028094e+00\n-4.3405150520687613e-01\n-2.0734326665771622e+01\n6.5987662285732729e-01\n2.8804520200385503e-01\n-2.0527606933592072e+01\n6.5987662285732729e-01\n2.8804520200385503e-01\n-2.0527606933592072e+01\n1.6350170822491674e+00\n-7.6766394483337103e-03\n-2.0297957788472480e+01\n2.0187455307206026e-01\n3.9757348804838294e-01\n-2.0628302735384693e+01\n2.1570636695254790e+00\n-2.1232603109726148e-01\n-2.0331121490136706e+01\n1.0175540468237806e-02\n4.5671308971314589e-01\n-2.0915408836059406e+01\n-1.8094607264849711e+00\n1.2074481098629142e+00\n-2.3062536921513740e+01\n-1.8094607264849711e+00\n1.2074481098629142e+00\n-2.3062536921513740e+01\n2.4904286685196637e+00\n-3.8470083725382248e-01\n-2.0391551487989059e+01\n2.4904286685196637e+00\n-3.8470083725382248e-01\n-2.0391551487989059e+01\n1.1198031066110377e+00\n3.7947955194291699e-03\n-2.0367225671471122e+01\n-1.9741428724602279e+00\n1.2792973879281690e+00\n-2.3462339494047065e+01\n4.7103394229782669e+00\n-9.2751059716819106e-01\n-2.1015103403616333e+01\n8.9198720016214550e-01\n4.6631248717350929e-02\n-2.0425073959799864e+01\n6.5819304826197618e+00\n-1.3495302411014751e+00\n-2.1882701257578464e+01\n1.8667492008442765e-01\n2.5500846640059782e-01\n-2.0659917873637578e+01\n-1.5683609956860003e+00\n9.2303354830214657e-01\n-2.2548116325688458e+01\n1.1979784962554163e+00\n-1.3735398460625445e-01\n-2.0453920954590902e+01\n1.3929486676482323e+00\n-2.2315540405599832e-01\n-2.0327133677987415e+01\n-2.5414366720142678e+00\n1.3735140437631650e+00\n-2.4043652950324631e+01\n-8.9759104662552136e-01\n5.6302230789501173e-01\n-2.1471561706728082e+01\n4.4793933072783085e+00\n-1.1220637595495437e+00\n-2.0749627487090166e+01\n-1.6045519515659401e-01\n2.3904278582977942e-01\n-2.0889548433490173e+01\n-7.3070152779209849e-02\n1.5481062041326127e-01\n-2.0845460847787180e+01\n2.9966701669560786e-01\n-4.2360203718649478e-03\n-2.0720485848371407e+01\n-1.3875680396695491e+00\n6.4123148111197925e-01\n-2.2242399272807287e+01\n2.6689354695304877e+00\n-7.4665061886355211e-01\n-2.0490758598362909e+01\n1.9024295978477912e-01\n-2.9394815357242400e-02\n-2.0702041076638217e+01\n-2.1993533308302711e+00\n9.9106743994772672e-01\n-2.3648514834492630e+01\n-3.6314378668717340e+00\n1.6001533945941304e+00\n-2.5486875920481296e+01\n4.3073228709703084e+00\n-1.2590044813476486e+00\n-2.0587794107108760e+01\n1.4789756657209667e+00\n-5.1704911006449217e-01\n-2.0355870178056787e+01\n1.8467421275667322e+00\n-6.1645763052329394e-01\n-2.0377666521572557e+01\n1.8713409622126949e+00\n-6.0938052349912120e-01\n-2.0435019568923018e+01\n4.6456984203217893e+00\n-1.3452605571510674e+00\n-2.0907379610764366e+01\n4.2164689051508493e+00\n-1.2904854046757648e+00\n-2.0563858682577617e+01\n5.5443718395930119e+00\n-1.6702376396920535e+00\n-2.0697920061593003e+01\n-1.5062369059788465e+00\n5.2782039808039327e-01\n-2.2455134834571787e+01\n3.1788928887242300e+00\n-9.7716531893287861e-01\n-2.0941642077955475e+01\n-9.7678609520199733e-01\n2.3954697637954522e-01\n-2.1656337165695874e+01\n5.1451664689406780e+00\n-1.5913022617729453e+00\n-2.0979050027084334e+01\n-1.7616138850288547e+00\n5.3523741251297552e-01\n-2.2798332452713638e+01\n5.3343740504168942e+00\n-1.5715547150749662e+00\n-2.1700225732650964e+01\n-3.9844024474199422e+00\n1.4515268387825906e+00\n-2.5328583409050641e+01\n-7.0881382127182202e-01\n5.4740437262680110e-02\n-2.1395288778743431e+01\n-3.7973618792521631e+00\n1.2842921231000899e+00\n-2.5017607535438195e+01\n-3.7885207141566122e+00\n1.2882528068678845e+00\n-2.5074085294479215e+01\n1.0141461254906814e+00\n-6.2694954261591351e-01\n-2.0464068985860099e+01\n2.7074283962652124e+00\n-1.0935996248120374e+00\n-2.0633071118819775e+01\n2.9087719501062632e+00\n-1.1363264193511551e+00\n-2.0707310832476278e+01\n2.3299333743279891e+00\n-1.1395474178466762e+00\n-2.0542607383416627e+01\n-2.2395000084716523e+00\n4.3312437555780237e-01\n-2.2908254948714177e+01\n-4.0624985025616300e-01\n-2.9071903280068562e-01\n-2.1071572855895361e+01\n2.0952265469023486e+00\n-1.0726171751246887e+00\n-2.0569929721010954e+01\n-3.2313393021161794e+00\n8.8825972233567885e-01\n-2.4706981342658903e+01\n-1.1729219829163464e+00\n-1.4758863843764264e-01\n-2.1816789860389555e+01\n-1.1729219829163464e+00\n-1.4758863843764264e-01\n-2.1816789860389555e+01\n-1.0472372474672447e+00\n-3.4117514136435856e-01\n-2.1701360134034395e+01\n4.9150446223197646e+00\n-2.2698513261752198e+00\n-1.9974034977569378e+01\n-1.0205449423000053e-01\n-7.4752021525472079e-01\n-2.1108696479266420e+01\n-4.7300238977293618e-01\n-6.9077937669876277e-01\n-2.1415763928060638e+01\n-1.0022741885539130e+00\n-5.2858536070330564e-01\n-2.1734442917679385e+01\n-2.5131366927158014e+00\n2.6864909258050053e-03\n-2.2775985188740073e+01\n-9.6271856465079919e-01\n-6.6797254111231552e-01\n-2.1515256462959048e+01\n2.3451918262706934e+00\n-1.7585327900330432e+00\n-2.0190941329806328e+01\n2.2881244367912466e+00\n-1.7663432382583819e+00\n-2.0196216186046467e+01\n-1.6927746677244226e+00\n-4.8323806778285316e-01\n-2.1646437811023336e+01\n2.1954749295941216e+00\n-1.7664726114248688e+00\n-2.0169188143780978e+01\n1.9407862045717978e+00\n-1.7005331432999056e+00\n-2.0240939068678895e+01\n-7.2722823493845423e-01\n-8.3556640470193388e-01\n-2.1332170436055083e+01\n-7.2722823493845423e-01\n-8.3556640470193388e-01\n-2.1332170436055083e+01\n-3.6495705139021895e+00\n1.9727614193570844e-01\n-2.3875152674171396e+01\n-7.8775519399497085e-01\n-9.2784527002224448e-01\n-2.1227115017237505e+01\n3.9902773886274572e+00\n-2.4544482619992474e+00\n-2.0046383805225997e+01\n4.6978018136336237e+00\n-2.6216095466825178e+00\n-2.0652685345308981e+01\n2.6952521044243802e+00\n-2.1293433748677648e+00\n-2.0370703988921516e+01\n2.6952521044243802e+00\n-2.1293433748677648e+00\n-2.0370703988921516e+01\n3.7073405180262808e+00\n-2.4309982645181467e+00\n-2.0429141051821759e+01\n-3.6701235753658707e+00\n-2.9966759310017951e-02\n-2.3291259206122152e+01\n-3.3651379183315733e+00\n-1.3742893161393163e-01\n-2.3346574255387292e+01\n4.8402108246653963e+00\n-2.8211609388697139e+00\n-2.0222935928217737e+01\n4.8402108246653963e+00\n-2.8211609388697139e+00\n-2.0222935928217737e+01\n-3.8016252892355413e+00\n-8.2646687453083192e-02\n-2.3287678701661395e+01\n-8.8675567616391948e-01\n-1.1396149982120529e+00\n-2.0955078441572240e+01\n-3.4193554998037929e+00\n-2.3474611336717655e-01\n-2.3004191814916272e+01\n-3.5366884117998301e+00\n-2.3185989555146330e-01\n-2.3073682265170540e+01\n-1.3482862796599959e+00\n-1.0098040845349632e+00\n-2.1294256731818031e+01\n9.8692474503561528e-02\n-1.5302104133526084e+00\n-2.0567141156649424e+01\n-7.6283578057618470e-02\n-1.4804505525162199e+00\n-2.0583294249417545e+01\n3.2950302695304390e+00\n-2.5501452778293436e+00\n-2.0240565968927626e+01\n9.0348672073935310e-01\n-1.8529074607318172e+00\n-2.0335118601934802e+01\n9.0348672073935310e-01\n-1.8529074607318172e+00\n-2.0335118601934802e+01\n-2.9978411661970141e+00\n-5.2284817696616626e-01\n-2.2839542776587358e+01\n-3.3449899965084726e+00\n-4.2577276947614712e-01\n-2.2919573174366473e+01\n-2.9969608813900952e+00\n-5.6277909018165506e-01\n-2.2767079122033749e+01\n-3.4507647031849178e+00\n-4.2036641352294146e-01\n-2.2960026576859029e+01\n3.5801438673186028e+00\n-2.7420605420290181e+00\n-2.0027683104934471e+01\n1.1619528079434871e+00\n-2.0003749887604050e+00\n-2.0280567250436391e+01\n-3.2251949484658766e+00\n-6.6469970372815990e-01\n-2.2490671820134800e+01\n2.7764932413767762e-01\n-1.8477295587461009e+00\n-2.0477705762782328e+01\n5.4640779488234625e-01\n-1.9400340004187797e+00\n-2.0558922802359795e+01\n5.4640779488234625e-01\n-1.9400340004187797e+00\n-2.0558922802359795e+01\n2.7860340602633351e+00\n-2.6435592795184308e+00\n-2.0032314785786387e+01\n1.9585150597823711e-01\n-1.8653739473940785e+00\n-2.0533758552554215e+01\n2.7576807252270346e+00\n-2.8211519604745985e+00\n-1.9859398475186737e+01\n3.1601473633869608e+00\n-3.0097725881323822e+00\n-1.9430788154387894e+01\n3.1601473633869608e+00\n-3.0097725881323822e+00\n-1.9430788154387894e+01\n-2.8394087365881879e+00\n-1.0835853629882859e+00\n-2.2140038302198946e+01\n-1.7637684369109665e+00\n-1.4896823129533505e+00\n-2.1606529084584292e+01\n2.2622535302655509e+00\n-2.8367751577713483e+00\n-1.9865740874017767e+01\n4.9229739847177836e+00\n-3.6366562529524553e+00\n-2.1170210116665185e+01\n4.7771086594023853e+00\n-3.5868585311855328e+00\n-2.1372800511563369e+01\n-3.1122726136747714e+00\n-1.1165926459243463e+00\n-2.2576307003433399e+01\n-1.8291086826659064e+00\n-1.6322829040181517e+00\n-2.1435508993594752e+01\n1.8308440315187620e+00\n-2.8590223120324301e+00\n-1.9812770141297460e+01\n9.9336144391111436e-01\n-2.5844676617947142e+00\n-2.0252346264856861e+01\n-2.8381152376916612e+00\n-1.3468079923246243e+00\n-2.1750096740281219e+01\n-2.3047189974866122e+00\n-1.5221256922689825e+00\n-2.1411160078697019e+01\n1.4857263425134579e+00\n-2.7656526111385031e+00\n-1.9937071030584065e+01\n2.1187116459730997e+00\n-2.9930021101633262e+00\n-1.9765253401124777e+01\n-1.2408768374208721e+00\n-1.9218548800090982e+00\n-2.0895427492595779e+01\n1.5822388571777282e+00\n-2.8640241868327814e+00\n-1.9817771265615995e+01\n-1.6816465928804381e+00\n-1.8077422743481173e+00\n-2.1040814030438444e+01\n-8.8196817018490004e-01\n-2.0723002945290090e+00\n-2.0710605893134431e+01\n1.3257623593552827e+00\n-2.7930509372632852e+00\n-1.9911908176550835e+01\n-2.8107730442318433e+00\n-1.4627097834994423e+00\n-2.1506485719532225e+01\n4.3999706255006182e-01\n-2.5183048901550658e+00\n-2.0336957692973542e+01\n-2.9885963433551574e+00\n-1.4260073517901994e+00\n-2.1500049099667436e+01\n1.8160637328163565e+00\n-3.0165978862068643e+00\n-1.9834875258503036e+01\n2.1659883907597766e+00\n-3.1655725069698728e+00\n-2.0016560302266424e+01\n6.1288185551658869e-01\n-2.7174696138117778e+00\n-1.9906286816347919e+01\n8.2983017998431718e-01\n-2.8207134098739570e+00\n-1.9914426369219729e+01\n-7.4911932502098943e-01\n-2.3162603195988569e+00\n-2.0598952850014452e+01\n1.2190732823601973e-01\n-2.6018691765532123e+00\n-2.0097158529593656e+01\n1.6436004751308981e+00\n-3.1171889316459680e+00\n-1.9916025946483398e+01\n-6.2924170230632737e-01\n-2.4258825375794180e+00\n-2.0286873622252703e+01\n-7.5359483080331524e-01\n-2.3852270437875451e+00\n-2.0480417329933168e+01\n1.4427020417274755e-01\n-2.7129426775236496e+00\n-1.9942908179436063e+01\n-1.7114027815512602e-02\n-2.6648351224182383e+00\n-2.0153066400851454e+01\n2.4030983587037409e+00\n-3.4302761505057924e+00\n-2.0292102459109294e+01\n3.8117244326317006e+00\n-3.9526458483831735e+00\n-2.1247729488921589e+01\n3.8117244326317006e+00\n-3.9526458483831735e+00\n-2.1247729488921589e+01\n-1.1067271777487100e+00\n-2.4360422515690994e+00\n-2.0476820302641322e+01\n1.9037327728315736e+00\n-3.4629071665515121e+00\n-2.0324466594296350e+01\n1.8895966807477256e+00\n-3.4461951320174768e+00\n-2.0274063806652446e+01\n5.1679522247040603e+00\n-4.5521533797472271e+00\n-2.2237629905030165e+01\n-3.1155218789626449e-01\n-2.8534223226749886e+00\n-2.0441669692412088e+01\n5.0570724542643815e+00\n-4.5325457450462796e+00\n-2.2125069314447607e+01\n-1.4538986568627824e-01\n-2.9185873767871793e+00\n-2.0437881047155003e+01\n1.3983492383732929e+00\n-3.4546284217494359e+00\n-2.0319448722908859e+01\n1.3983492383732929e+00\n-3.4546284217494359e+00\n-2.0319448722908859e+01\n1.6097566203991411e+00\n-3.5353807369781318e+00\n-2.0173996302450263e+01\n-4.7870313452032052e-03\n-3.0340184896655984e+00\n-2.0295983046131497e+01\n1.6910368256409738e+00\n-3.6413921206007425e+00\n-2.0533239199463903e+01\n4.6131543966319786e+00\n-4.5961725929241117e+00\n-2.2276470545325360e+01\n2.9093232327426041e-02\n-3.2006033251867008e+00\n-2.0470947580560559e+01\n1.1437208718838669e-01\n-3.2673701044297436e+00\n-2.0556934331124790e+01\n1.5326398521241744e+00\n-3.7111876417093894e+00\n-2.0587242384364011e+01\n-2.1253723654647176e+00\n-2.5862132491658087e+00\n-2.2026519508630450e+01\n7.4929698862685867e-01\n-3.6837760475784558e+00\n-2.0122604925939083e+01\n-2.4002181662814151e-01\n-3.3538140921581321e+00\n-2.1030405432229571e+01\n1.0773839741668428e-01\n-3.5180245895839231e+00\n-2.0868211611191199e+01\n2.2495602858664574e+00\n-4.2819889376458500e+00\n-2.1205690355798090e+01\n2.2932917046606991e+00\n-4.3905284890534677e+00\n-2.1270062999048182e+01\n7.0004641768008613e-01\n-3.8704824363690480e+00\n-2.0754129069489096e+01\n7.3042243641105276e-01\n-3.9178373127842003e+00\n-2.0840624087713937e+01\n2.2914231826401195e+00\n-4.4958144563520959e+00\n-2.1371378098081426e+01\n9.7169458708115053e-02\n-3.8155060966147900e+00\n-2.1164886143440818e+01\n2.0750651936385007e+00\n-4.5943048021977138e+00\n-2.1380849531424818e+01\n2.0750651936385007e+00\n-4.5943048021977138e+00\n-2.1380849531424818e+01\n1.7676973373249087e+00\n-4.5336831064255909e+00\n-2.1442900165843497e+01\n-3.5964934494353046e-01\n-3.9531495685228091e+00\n-2.1729031985317459e+01\n-5.5602457621121604e-01\n-3.9046644821633962e+00\n-2.1542819748699156e+01\n-2.0850898724776914e+00\n-3.5817498012598001e+00\n-2.2956280347466453e+01\n-2.0245293085463421e+00\n-3.6680224932497936e+00\n-2.2859349873091364e+01\n-5.5690964101204832e-02\n-4.2894562454619276e+00\n-2.1819233331532221e+01\n3.0200203686269980e+00\n-5.3334484806755391e+00\n-2.2150402880991798e+01\n2.7393111114705260e+00\n-5.2324642225458451e+00\n-2.2055819918523547e+01\n-1.1195017565714611e-01\n-4.3366867429424030e+00\n-2.1829899281718735e+01\n2.4725114921972411e+00\n-5.2324711321064772e+00\n-2.2078709762467394e+01\n-1.2505981418652645e-01\n-4.3893222778043972e+00\n-2.1824491424776983e+01\n-2.3057117579394317e+00\n-3.7636806389742770e+00\n-2.2989745151663541e+01\n-1.3456852868652747e+00\n-4.3214388505905523e+00\n-2.2929818145052469e+01\n-2.5469265987947924e+00\n-3.9981535126087473e+00\n-2.4046391643724526e+01\n-1.4327383224816219e+00\n-4.3819086335210020e+00\n-2.3188151990012472e+01\n-4.8636843171921912e-01\n-4.7596843637251585e+00\n-2.2664971218812770e+01\n-3.1387448074532340e+00\n-4.2257282298300058e+00\n-2.4949657275860954e+01\n2.9706582884492243e+00\n-6.5719464714033506e+00\n-2.2242041108532515e+01\n-3.4894475404836025e+00\n-5.0566094373479018e+00\n-2.4689116609922966e+01\n-8.8057566458697831e+00\n-3.5843936009364543e+00\n-2.7795982711213341e+01\n-8.6667205477219493e+00\n-3.6632331386636015e+00\n-2.7649218626745490e+01\n7.4282181646793699e-01\n-6.4903921216896201e+00\n-2.2112148183133570e+01\n1.1197953613047906e+00\n-6.6846136238038536e+00\n-2.2331295703235629e+01\n5.3370467205185146e-01\n-6.5420103485607486e+00\n-2.2411573789652014e+01\n6.6003925186210910e-01\n-6.6109698473334237e+00\n-2.2412040422865132e+01\n5.4078773096437327e-01\n-6.6681565030065331e+00\n-2.2475743113768196e+01\n4.6320368977067672e-01\n-6.6461768406627986e+00\n-2.2420815232965058e+01\n1.8337554627233084e-02\n-6.6231633649121253e+00\n-2.2744277115796450e+01\n5.7360714534620272e-01\n-6.8164572350863946e+00\n-2.2495606969145459e+01\n5.7360714534620272e-01\n-6.8164572350863946e+00\n-2.2495606969145459e+01\n-1.2495063445563350e+00\n-6.3419594961808814e+00\n-2.3194414812809406e+01\n-6.8627160247608590e+00\n-4.8497327038850351e+00\n-2.6825337997067169e+01\n-6.9199715742678158e+00\n-4.8454003312351590e+00\n-2.6891165606005089e+01\n4.7490158035491428e+00\n-8.4095683517255146e+00\n-2.1136124972768908e+01\n-6.0259700120408937e+00\n-5.4517683190248025e+00\n-2.5124736088686426e+01\n-4.3289972469925591e+00\n-6.0598163706549206e+00\n-2.4541681395789123e+01\n-4.1992038376392280e+00\n-6.1702733449041363e+00\n-2.4440931217063788e+01\n-4.0773019933607371e+00\n-6.1979207598776691e+00\n-2.4345778996688924e+01\n-3.3447847298689273e+00\n-6.6160276341938138e+00\n-2.3750747799679317e+01\n-5.3116063433214498e+00\n-6.1134235823736738e+00\n-2.4153553118883458e+01\n3.4231567406167955e+00\n-8.7976383331180603e+00\n-2.0617810294211520e+01\n3.4708220330977135e+00\n-8.8459032391174617e+00\n-2.0720636270546581e+01\n2.0217036053000488e+00\n-8.4438109957678122e+00\n-2.1315664780941216e+01\n1.8665708210484961e+00\n-8.3704756880037525e+00\n-2.0941641569963519e+01\n1.4665581879322713e+00\n-8.3764286575946532e+00\n-2.1214682853207297e+01\n4.0190102379383834e+00\n-9.3366808774805925e+00\n-1.9930646037466971e+01\n4.6797500992202865e+00\n-9.5138621954254674e+00\n-1.9391527184027048e+01\n-5.1968734769555489e+00\n-6.6325658816344886e+00\n-2.3546274544919783e+01\n1.4313960500728493e+00\n-8.6916955947587855e+00\n-2.0850141398412351e+01\n-5.7389885800749676e+00\n-6.5315193540733754e+00\n-2.3737348953967832e+01\n-5.7389885800749676e+00\n-6.5315193540733754e+00\n-2.3737348953967832e+01\n-3.5073982747168859e+00\n-7.2161118646885587e+00\n-2.2657890973744941e+01\n-5.5182228740237766e+00\n-6.6369536537828457e+00\n-2.3571778326618450e+01\n-3.5592805612005098e+00\n-7.2214636945125577e+00\n-2.2650025117906360e+01\n3.2506135612207152e+00\n-9.3106010639278978e+00\n-1.9892921461466123e+01\n4.0649515809823420e+00\n-9.5332010408191916e+00\n-1.9318206140217026e+01\n2.9734029427585886e+00\n-9.3284772941410168e+00\n-1.9849776615795992e+01\n-5.4700055911612360e+00\n-6.9190277625951477e+00\n-2.3372985685839616e+01\n3.1686211808499438e+00\n-9.6049562045490049e+00\n-1.9522310361220768e+01\n3.4599002673492167e+00\n-9.7011096862048518e+00\n-1.9393015741864950e+01\n-2.4549383175218766e+00\n-8.0492939945691049e+00\n-2.2463520640263372e+01\n-7.6256584123115694e+00\n-6.4317633950319371e+00\n-2.3812876927474491e+01\n3.9128429577127548e+00\n-9.9521174146430091e+00\n-1.9169353474692784e+01\n3.1348184914906585e+00\n-9.8018438414050806e+00\n-1.9423684004003739e+01\n-3.7306885670247438e+00\n-7.8175111135312116e+00\n-2.2323060376322342e+01\n9.8887837748732765e-01\n-9.2443295830949435e+00\n-2.0307175404331883e+01\n9.5266423089913044e-01\n-9.3499600986060045e+00\n-2.0165152761780561e+01\n-7.9494478483222082e+00\n-6.6401756077945091e+00\n-2.3515324123295997e+01\n-5.6305978766720175e+00\n-7.3624999754640283e+00\n-2.2559927966708099e+01\n-5.2450220154004612e-01\n-8.9809520648671270e+00\n-2.0301138022753623e+01\n2.9831816766251076e+00\n-1.0243884907128297e+01\n-1.8827716582202608e+01\n9.2837156635586027e-01\n-9.7559379509861621e+00\n-1.9609951718300980e+01\n1.1931271096075367e+00\n-9.9713833320344296e+00\n-1.9334332896033750e+01\n-8.6513650314242752e-01\n-9.8596240461390394e+00\n-1.9609157356929455e+01\n-5.3041831881565598e+00\n-8.7491072345730760e+00\n-2.1362283650385230e+01\n-3.4130138495838604e+00\n-9.3219939213303054e+00\n-2.0483314334763861e+01\n-3.4894381901823435e+00\n-9.2406927583356087e+00\n-2.0045664704807862e+01\n-2.9497484821473985e-01\n2.3410253591134992e+01\n-3.9199674641727341e+01\n-2.9497484821473985e-01\n2.3410253591134992e+01\n-3.9199674641727341e+01\n1.6594361518425956e+01\n2.7214287088812757e+01\n-4.9472046891890251e+01\n1.3930167587534330e+01\n1.5871817787653780e+01\n-3.0293173776359030e+01\n9.1620274912624939e+00\n2.2683952905861563e+01\n-4.2052732180809429e+01\n1.7321600875456344e+01\n2.7694298583827916e+01\n-5.2975023793321427e+01\n1.5783216794356173e+01\n1.5175412289735783e+01\n-3.0784716734166800e+01\n9.7759181721116306e+00\n2.6717382823327011e+01\n-5.0158161845045100e+01\n1.5243850212076486e+01\n2.6341615966959665e+01\n-5.1455025148800345e+01\n1.4801887675984759e+01\n1.5750280495665502e+01\n-3.2836917401316491e+01\n1.8009894256174157e+01\n2.5847872512917981e+01\n-5.1943839488276240e+01\n6.3521337948484691e+00\n2.2393160926686011e+01\n-4.2957402799759230e+01\n1.3624758587581532e+01\n1.1836054614225176e+01\n-2.6059058183035628e+01\n1.7969010687799251e+01\n2.5412600757380343e+01\n-5.2234962374025699e+01\n1.3281908669261563e+01\n1.3827250964507121e+01\n-2.9956256885236886e+01\n6.2810462728256722e+00\n2.2222642200915537e+01\n-4.3453481548784325e+01\n4.4252515348862485e+00\n2.3386983621126955e+01\n-4.5075676355391117e+01\n1.4207732061374106e+01\n1.5993010117793526e+01\n-3.4322247217257448e+01\n1.2586067140606971e+01\n1.1131889598550103e+01\n-2.5105657485011559e+01\n1.0384825598843701e+01\n2.4975107461059189e+01\n-5.0620741100591559e+01\n1.3214864970504705e+01\n1.1684989995152860e+01\n-2.6736446601629371e+01\n6.3356697213040380e+00\n2.0734312173026009e+01\n-4.2470443690770274e+01\n1.4240300190115434e+01\n1.5448220228610539e+01\n-3.4789242696375680e+01\n9.9221114130632895e+00\n2.0727725665952729e+01\n-4.3741605248682809e+01\n1.2303574477979569e+00\n2.1314408626379706e+01\n-4.2258831062288969e+01\n1.2946578342172881e+01\n1.5072778290513895e+01\n-3.3873150560198958e+01\n1.4374960838050994e+01\n1.2956525243634095e+01\n-3.0276083234292336e+01\n2.2576090590170296e+01\n2.8120624017409177e+01\n-6.2599837727118882e+01\n1.3722975866564189e+01\n9.3301805006346274e+00\n-2.3332035841849798e+01\n1.7564472473105912e+01\n2.4522210026239652e+01\n-5.4512748296236460e+01\n1.9640947421323315e+01\n2.7018249766873225e+01\n-5.9878668198166743e+01\n2.5192213394784870e+00\n2.0720840047131993e+01\n-4.2426298470451030e+01\n-2.2622768679237519e+00\n2.1697807454916315e+01\n-4.2781945981298271e+01\n1.3002953659911155e+01\n1.0009837435922782e+01\n-2.4763840282418681e+01\n1.3002953659911155e+01\n1.0009837435922782e+01\n-2.4763840282418681e+01\n1.5197700514363506e+01\n2.4961750870862328e+01\n-5.4861058926158741e+01\n8.1204752981456227e+00\n2.3360438411382901e+01\n-5.0003276691166086e+01\n1.2821543253327590e+01\n1.3521228473136775e+01\n-3.2223817923971723e+01\n1.3796738602776306e+00\n2.0703250696598037e+01\n-4.3416796895685287e+01\n-1.2519082026438364e+00\n2.1342936042709987e+01\n-4.3774263274729897e+01\n1.1901352080796427e+01\n9.9024724896082574e+00\n-2.5253996726737203e+01\n1.4777784714879653e+01\n2.6251066881189576e+01\n-5.9599929264710113e+01\n1.3150892694138367e+01\n1.0861858583770481e+01\n-2.7591790586820796e+01\n5.2784513895154541e+00\n2.2113169135746414e+01\n-4.7786303043284811e+01\n1.3432415767716599e+01\n1.0502666313718905e+01\n-2.7015150847050382e+01\n1.3013405179401717e+01\n9.6411019067127484e+00\n-2.5367031132015583e+01\n1.5812155106489499e+01\n2.5018060616347253e+01\n-5.7954598093844538e+01\n1.3493399227602602e+01\n2.3278151098349575e+01\n-5.4665465249315176e+01\n1.4670878017035214e+01\n2.5483300910199347e+01\n-5.9894788771938941e+01\n1.5106274747499471e+01\n2.5566810040866358e+01\n-6.0272777082733917e+01\n1.3261556738539355e+01\n1.3596781578723414e+01\n-3.4484915326707331e+01\n1.4861554753695044e+01\n2.5560122511531087e+01\n-6.0363361964002642e+01\n1.4676595302314531e+01\n2.5474667011310192e+01\n-6.0210050480171624e+01\n1.4898801306707377e+01\n2.5374935201471647e+01\n-6.0184734098379813e+01\n1.3056156258194680e+01\n9.0127563758230362e+00\n-2.5195289869158337e+01\n1.2961842174857928e+01\n1.0311228323981519e+01\n-2.8077187860602312e+01\n1.3535753072373669e+01\n8.4005401718487782e+00\n-2.4379148386922871e+01\n1.5830559969493951e+01\n2.5013960249728907e+01\n-6.1086793913772524e+01\n1.3094667667168826e+01\n8.7881439152465148e+00\n-2.5644104794113293e+01\n1.3094667667168826e+01\n8.7881439152465148e+00\n-2.5644104794113293e+01\n1.2470005152309994e+01\n8.1199514072628265e+00\n-2.4157335496980917e+01\n1.7846240103718799e+01\n2.3814153364401989e+01\n-6.0099280107891808e+01\n1.3140849597784248e+01\n8.8937821620544071e+00\n-2.6200135925663162e+01\n1.0330777921828084e+01\n2.3694823927543617e+01\n-5.7100104972772257e+01\n1.6244822375479591e+00\n2.0779642435757612e+01\n-4.7514452869765506e+01\n1.2540737246517836e+01\n9.3610106418319443e+00\n-2.6761353952052520e+01\n1.5651405245975562e+01\n2.3178971665378846e+01\n-5.8701269428616882e+01\n1.2359787120681753e+01\n8.1534337697140877e+00\n-2.4800725672132913e+01\n1.2226196788986158e+01\n7.8484373367451692e+00\n-2.4326769168543972e+01\n1.3412903395221559e+01\n8.1224081297592221e+00\n-2.4924361763091039e+01\n1.2464909035571408e+01\n7.6919188059681307e+00\n-2.4224204862259139e+01\n1.2365275476737324e+01\n7.9852350275334523e+00\n-2.4909287798007409e+01\n1.2603887274391996e+01\n1.2190345541833560e+01\n-3.4185046996399649e+01\n-3.3979277438446664e-01\n2.1182172318502673e+01\n-4.9274689988460146e+01\n1.1311116083704983e+01\n2.2612173350605371e+01\n-5.7296204271302564e+01\n3.0663100829477417e+00\n2.0041046311238887e+01\n-4.7951225581822136e+01\n1.4655651520748970e+01\n1.0420999478763356e+01\n-3.2143829461046053e+01\n2.0631220160147636e+00\n2.0963683515320103e+01\n-5.1239889669261423e+01\n1.2154105109790049e+01\n7.3557267019194601e+00\n-2.4854361519452205e+01\n1.2037869258260848e+01\n8.2488125509595829e+00\n-2.6924381855361162e+01\n1.2349763114493738e+01\n8.7862162658058054e+00\n-2.7986276511596561e+01\n1.2585983608717456e+01\n7.4234593409526193e+00\n-2.5720429559432002e+01\n6.9821492062703259e+00\n2.1443113334779696e+01\n-5.6105994538527803e+01\n1.3135231125906421e+01\n7.7173546533633495e+00\n-2.6767460955630220e+01\n1.8669824368890482e+00\n1.9648859268200301e+01\n-5.0507556094657893e+01\n1.2758556759827963e+01\n8.0023283331674193e+00\n-2.7279207643256868e+01\n1.2107832117148455e+01\n7.6791567268298939e+00\n-2.6608075759552381e+01\n1.3212034997016575e+01\n7.4264115602229142e+00\n-2.6232683727983282e+01\n1.3212034997016575e+01\n7.4264115602229142e+00\n-2.6232683727983282e+01\n6.5213304664512028e+00\n2.0981942686599464e+01\n-5.5999730883791827e+01\n1.2856753646797470e+01\n7.4458051837024621e+00\n-2.6726983659915721e+01\n1.2925844068862274e+01\n7.2557576975170317e+00\n-2.6559827086681651e+01\n1.4097626391920818e+01\n1.0413295956025676e+01\n-3.4491219712971592e+01\n1.8919009229398327e+01\n1.8002492802395338e+01\n-5.6107460796920471e+01\n1.3563977464211307e+01\n9.9434561475151426e+00\n-3.3774635804100896e+01\n8.3779201478608361e+00\n1.7210986290924488e+01\n-4.8631898222204640e+01\n-2.3030982711498020e+00\n1.9336386778457609e+01\n-4.9037503640209117e+01\n-2.3030982711498020e+00\n1.9336386778457609e+01\n-4.9037503640209117e+01\n1.2203348742240699e+01\n7.2420473305733415e+00\n-2.6588385426948562e+01\n1.3825603115109972e+00\n1.9678420647150862e+01\n-5.2204814571193715e+01\n1.0842433768348638e+01\n2.1005441593839873e+01\n-6.0427491283785905e+01\n-2.1736924300544782e+00\n1.7614102595709657e+01\n-4.6048380191026475e+01\n1.3293550124411965e+01\n1.0184025078172718e+01\n-3.5472641422761981e+01\n-1.5279212771761888e+00\n1.8895385886110319e+01\n-5.0071741978237789e+01\n-1.5279212771761888e+00\n1.8895385886110319e+01\n-5.0071741978237789e+01\n1.2423922885810994e+01\n7.6814715582085702e+00\n-2.8889168728505165e+01\n1.1345773136838831e+01\n7.1761415982549783e+00\n-2.7622426363988605e+01\n-1.8617772206705960e+00\n1.8469977900554248e+01\n-5.0192779078580699e+01\n-2.7477245839617810e+00\n1.8160227229350809e+01\n-4.9710849410720087e+01\n-1.6957947017372610e+00\n1.7571744748921677e+01\n-4.8908565844456952e+01\n3.6433611799900706e-01\n1.8163831365093461e+01\n-5.2625753991067256e+01\n2.4782734170520196e-01\n1.6917582029061403e+01\n-4.9534732338889043e+01\n1.2062202744592353e+01\n7.0219708514091277e+00\n-2.9606893172870841e+01\n-4.0298273596130196e-01\n1.6761039996706511e+01\n-4.9070038767372850e+01\n1.2752301812155988e+01\n6.5823767106115003e+00\n-2.8638779515823707e+01\n1.2799664544265266e+01\n1.0194060625114897e+01\n-3.8821416305370548e+01\n1.3378530647915928e+01\n5.7207632653226810e+00\n-2.6977001747545295e+01\n1.2488399838379188e+01\n5.8161826358156556e+00\n-2.7422212731894220e+01\n1.2568680514825934e+01\n5.7791129778641332e+00\n-2.7220235041671117e+01\n1.2618735937069479e+01\n5.6350560805838956e+00\n-2.7272628910717589e+01\n1.2836941963178472e+01\n5.6031885779500916e+00\n-2.7419160556943229e+01\n1.3203947121494759e+01\n9.1701636145112655e+00\n-3.8007477270785678e+01\n1.3881848312854030e+01\n8.7863051224856914e+00\n-3.7459548553095580e+01\n1.2609894453941333e+01\n5.5074576945061899e+00\n-2.7656734138253107e+01\n1.1919698146813021e+01\n6.2540289033724665e+00\n-2.9507410739405952e+01\n1.2581720191583038e+01\n5.6656916764130587e+00\n-2.8334251816427660e+01\n1.2450539696824714e+01\n5.4029262511439873e+00\n-2.7573089758379499e+01\n1.2803832293579623e+01\n9.0082494439574443e+00\n-3.8716940280021667e+01\n1.2803832293579623e+01\n9.0082494439574443e+00\n-3.8716940280021667e+01\n1.2985681610724274e+01\n4.3935861460268617e+00\n-2.5448058871804996e+01\n8.9821676804403494e-01\n1.5999693547607787e+01\n-5.2046402894810342e+01\n1.2840924955651474e+01\n5.0842943219372039e+00\n-2.7581214047990663e+01\n1.4190162291220398e+01\n7.6430504625168441e+00\n-3.5947542307386428e+01\n1.3715551949097897e+01\n1.0205225209828916e+01\n-4.3416293564377270e+01\n1.2889231712998226e+01\n9.0763953935987445e+00\n-3.9765602319250675e+01\n-1.9107470316619228e+00\n1.5149060135174095e+01\n-4.8390959429067451e+01\n7.3969784909552718e+00\n1.3974102821327140e+01\n-5.2335038693822632e+01\n1.2519513913730480e+00\n1.5308798434490571e+01\n-5.2252501718208848e+01\n1.3870601054987421e+01\n9.2426960974497696e+00\n-4.3042544801571097e+01\n7.1698544651425591e+00\n1.3614436607547846e+01\n-5.2033349783511717e+01\n1.3070275957736367e+01\n4.7480148554461694e+00\n-2.8904106732213442e+01\n1.2997815255877766e+01\n4.5960498027351555e+00\n-2.8556928818505078e+01\n5.6175523392056572e+00\n1.3048606832956350e+01\n-5.0062969189815718e+01\n5.6175523392056572e+00\n1.3048606832956350e+01\n-5.0062969189815718e+01\n-3.5089512677526158e+00\n1.5017997760077622e+01\n-4.9824681161057811e+01\n-3.7618512450514308e+00\n1.4740660489939392e+01\n-4.8695321776384375e+01\n-3.5340509361441899e+00\n1.5632909328557222e+01\n-5.1942197897645627e+01\n1.2905299608816925e+01\n8.2911871559789478e+00\n-4.0541694854156660e+01\n1.3271995446881164e+01\n4.1501403621086599e+00\n-2.7792076015500488e+01\n1.2968717492989189e+01\n8.1770342104494684e+00\n-4.0293374870996857e+01\n-4.2820510218876713e+00\n1.4299488787562359e+01\n-4.7588158123179362e+01\n3.4168217604501261e+00\n1.2520665588660641e+01\n-5.0276000328319640e+01\n1.4153252714357743e+01\n6.2567496330866259e+00\n-3.7603320460499233e+01\n1.2467125573551538e+01\n4.7588198468832505e+00\n-3.1327806823618598e+01\n1.2316367768786749e+01\n3.6460630351628156e+00\n-2.8623682911278760e+01\n1.2316367768786749e+01\n3.6460630351628156e+00\n-2.8623682911278760e+01\n-3.1335515423425897e+00\n1.3995160050280267e+01\n-5.1747802970768674e+01\n6.4216241541672821e+00\n6.9687251011083049e+00\n-3.5072613634961336e+01\n1.3440238218175317e+01\n3.5283511153823355e+00\n-3.0076806242786372e+01\n1.2743398073778424e+01\n3.6250064373849358e+00\n-3.0196765465742516e+01\n3.5479826739195439e+00\n9.7185499215869910e+00\n-4.4783985948488095e+01\n2.8155107684929055e+00\n9.9816261977702236e+00\n-4.4960677080704158e+01\n2.6989457486687445e+00\n9.0096278073154643e+00\n-4.1779027466996453e+01\n3.3358341278792887e+00\n9.5197373933232914e+00\n-4.5276630595232525e+01\n1.2477552517210224e+01\n2.5638415757640809e+00\n-2.7812516356483226e+01\n1.3840696307450909e+01\n1.7880574338385975e+00\n-2.6871271327372426e+01\n1.2279042916955238e+01\n3.7444133348170272e+00\n-3.2507806138308517e+01\n1.2312758415492313e+01\n3.7492834389392429e+00\n-3.2668915888472149e+01\n-2.3715173840719697e+00\n1.1065162152896175e+01\n-4.7722991287814331e+01\n2.0932630040953391e+00\n9.2615413230630086e+00\n-4.5124087424283999e+01\n-1.2278726240660184e-01\n3.6108164800930176e+00\n-2.0909658050395283e+01\n1.1214874273401405e+00\n8.8495320114901883e+00\n-4.3002643264025480e+01\n1.3017756646226870e+01\n2.3050017108582406e+00\n-2.9414180830247140e+01\n1.5178422699150633e+00\n8.7951857965549287e+00\n-4.4121842484129751e+01\n1.4432164047362191e+01\n1.4601214006746011e+00\n-2.7994008015549440e+01\n1.4599901783621988e+01\n1.5211512653946913e+00\n-2.8178577587370182e+01\n2.5503860191548204e+00\n8.3836761331483256e+00\n-4.4130874790765354e+01\n1.2819685910491845e+01\n2.5812145560931614e+00\n-3.0982720004145541e+01\n1.2149076499661339e+01\n2.7911342485710193e+00\n-3.1685768560463430e+01\n-7.0644700918508652e-01\n3.6175301232298209e+00\n-2.1763131565469180e+01\n1.3520647982871957e+01\n2.0355459523121886e+00\n-3.0699018384026200e+01\n1.2248785205820822e+01\n2.1369769762654984e+00\n-3.1304511775797234e+01\n-5.1636462790220938e-01\n8.1951718482971394e+00\n-4.3646669325887288e+01\n1.4028043929206181e+01\n1.0014805699529319e+00\n-2.8880853430596730e+01\n1.3977244354618657e+01\n1.0719607912292095e+00\n-2.9040511470793064e+01\n1.3670388252586958e+01\n1.0233311554241256e+00\n-2.8353910182582428e+01\n1.4310933962746960e+01\n7.0464584460010604e-01\n-2.8148294627653303e+01\n1.4310933962746960e+01\n7.0464584460010604e-01\n-2.8148294627653303e+01\n1.2348802658250843e+01\n3.0403772822329234e-01\n-2.4850139545431229e+01\n1.2243901549245519e+01\n1.6709127830436146e+00\n-3.0992635311527188e+01\n-5.8273835641691851e-01\n3.0880700795300822e+00\n-2.2954258823522977e+01\n-1.3320167874500655e+00\n7.8791732315655540e+00\n-4.4148717382560221e+01\n-7.1045860326106758e-01\n3.0385732894532729e+00\n-2.3035597448524094e+01\n1.2246363438018944e+01\n1.2971461900440366e+00\n-3.0817257311711177e+01\n1.2863413327812422e+01\n1.4904094791768987e+00\n-3.2217790308019445e+01\n1.2335305280047315e+01\n1.3613401725886237e-02\n-2.5579533047981993e+01\n1.4240718698223082e+01\n2.8662455559983102e-01\n-2.9247150138948804e+01\n1.2323456297847944e+01\n-2.2860902047132602e-02\n-2.6352625182777629e+01\n-1.4246659777897808e+00\n3.5765292883997231e+00\n-2.6296300354057010e+01\n-1.4246659777897808e+00\n3.5765292883997231e+00\n-2.6296300354057010e+01\n1.2244208909641182e+01\n-9.0808124862232220e-02\n-2.6250927798296640e+01\n-1.3356012656597525e+00\n3.6545921326972577e+00\n-2.7161495794328701e+01\n-1.4282085848491997e+00\n3.5339448690537951e+00\n-2.6406730813647286e+01\n1.5410818439617744e+00\n9.8292026311965264e-01\n-1.7830604591378002e+01\n-2.1241638416446404e+00\n6.6809432491787790e+00\n-4.2004231949947133e+01\n-2.1043687863568978e+00\n3.7851313578796653e+00\n-2.8374610316936675e+01\n1.4102100203015029e+01\n-7.4806386858928792e-02\n-3.0415009663802831e+01\n5.4989867323398411e-01\n1.5337354040499376e+00\n-2.0793004339671242e+01\n-1.6660094078161132e+00\n3.1385587302436426e+00\n-2.6541637141399114e+01\n-1.7367742732668106e+00\n3.0334674712934731e+00\n-2.6304621662850064e+01\n1.8490515860705101e+00\n9.6819452524464822e-01\n-2.0367174686488170e+01\n-2.0054956765515728e+00\n3.0320847867832486e+00\n-2.6248541324192278e+01\n-2.6797092485836358e+00\n3.6066644463945776e+00\n-2.8377263628372145e+01\n1.2128231782630380e+01\n-8.5774658827005090e-01\n-2.5795495291420757e+01\n8.1095628773031458e-01\n1.2445486069262865e+00\n-2.0673564061841748e+01\n1.2232408881693823e+01\n-7.8824271113791289e-01\n-2.6648734533168309e+01\n6.9864539739296365e+00\n5.2182030131779862e-02\n-2.3544394098614831e+01\n-8.9513393525648452e-02\n1.5247672201916573e+00\n-2.1277419687705223e+01\n3.3071186000634376e+00\n4.6126182236007579e-01\n-2.0650141497968701e+01\n1.4022398934263560e+00\n9.0159386663408658e-01\n-2.0427661929492448e+01\n2.8491960926839743e+00\n4.9011878897176042e-01\n-2.0455680397679004e+01\n1.5127807528797460e+01\n-1.4013844786799783e+00\n-2.9355084421049245e+01\n2.8315681291796406e+00\n4.5423403198685214e-01\n-2.0426187706752224e+01\n2.0705379936511497e+00\n6.2168607192186498e-01\n-2.0330587142687222e+01\n-6.2276338129557449e-02\n1.1883584596684897e+00\n-2.1064704512265134e+01\n-3.1226655840504898e+00\n2.9246869513080487e+00\n-2.7367063928005614e+01\n7.0205851875730341e-01\n7.5795501564927237e-01\n-2.0579977304242650e+01\n-2.0051025177928299e+00\n2.2585579088414978e+00\n-2.5337139340438391e+01\n1.5140251042995196e+01\n-1.8725615141128160e+00\n-3.0117474343591507e+01\n3.2048205875131947e-01\n8.3089572562080238e-01\n-2.0795416974491172e+01\n3.8462077421383228e-01\n7.8796094425341423e-01\n-2.0682588927624469e+01\n4.9838845372393775e-01\n7.5178395033421153e-01\n-2.0654149213874913e+01\n-2.1227092153983342e+00\n2.1642334755833295e+00\n-2.5263218567592027e+01\n-2.7742781827573610e+00\n2.4967342253765490e+00\n-2.6742975357290383e+01\n-2.8054873252155286e+00\n2.5030002406262208e+00\n-2.6936367130624127e+01\n2.7784217084289869e-01\n7.0202893714962722e-01\n-2.0782951398454362e+01\n2.7784217084289869e-01\n7.0202893714962722e-01\n-2.0782951398454362e+01\n2.7597636884875438e+00\n-4.0460818423742974e-02\n-2.0394829371611390e+01\n2.8636081602271775e+00\n-1.9374647833313846e-01\n-2.0452390319220839e+01\n-3.4672866584305169e+00\n2.3543269491706234e+00\n-2.6694302880440091e+01\n-2.2927178718606873e+00\n1.4959027327373360e+00\n-2.4348051939843469e+01\n-1.7127641935268576e+00\n1.1431803356398860e+00\n-2.2873162626312141e+01\n-1.8411179962897208e+00\n1.1663510083924704e+00\n-2.3116903199672237e+01\n-2.0892410830457506e+00\n1.2704904211986257e+00\n-2.3296279896760279e+01\n-6.3437717751510514e-01\n4.5107739712835793e-01\n-2.1375767668253378e+01\n-2.6483991925600434e+00\n1.2700611831178861e+00\n-2.3906703145697445e+01\n-1.7187999799831362e+00\n7.9568854575006809e-01\n-2.2894380280139423e+01\n-1.7536625524925653e+00\n7.8400450562054380e-01\n-2.2826590306689454e+01\n-6.1884651494083309e-01\n2.5378467167114638e-01\n-2.1224054034504562e+01\n2.6001165676843128e+00\n-7.7423291669991789e-01\n-2.0464829283829552e+01\n-3.7924749118416051e-01\n1.4400688684775656e-01\n-2.1176163657493532e+01\n4.2451017612951008e+00\n-1.2423536334451952e+00\n-2.0604595661906174e+01\n-3.5599673980393418e+00\n1.5184054559692750e+00\n-2.5309131024820918e+01\n-3.1476902692584470e+00\n1.3606389067698001e+00\n-2.5358259265012510e+01\n-1.9797737503265864e+00\n6.7031711529766613e-01\n-2.3234886053991552e+01\n-1.6802575265435588e-01\n-1.1436600370243986e-01\n-2.0948566393389072e+01\n-1.4549403928732256e+00\n4.0802669623369775e-01\n-2.2359700260601876e+01\n2.6604847193000332e+00\n-1.0141145580629043e+00\n-2.0546885312896457e+01\n2.2057639997311562e+00\n-9.3588815468244668e-01\n-2.0416697533977480e+01\n-1.9678431383706269e-01\n-1.8806481668612335e-01\n-2.1007179498621355e+01\n-1.9323105967682970e+00\n5.4248342695687346e-01\n-2.3095959937505210e+01\n-2.0036794889330869e+00\n4.4739739970690029e-01\n-2.2929910837641632e+01\n-8.8190004395347577e-01\n-7.4805259493473442e-02\n-2.1530284841396213e+01\n1.2363179151266475e+00\n-8.2350325177577677e-01\n-2.0587619338931340e+01\n-2.7695820837630816e+00\n6.2516013165695816e-01\n-2.3738881541997383e+01\n1.4631350283127609e+00\n-1.1601948643110827e+00\n-2.0512462004446522e+01\n9.5876663305701659e-01\n-1.0920238736213412e+00\n-2.0569367114308424e+01\n-7.0928739150048192e-01\n-5.3772375586506727e-01\n-2.1537942211417018e+01\n-4.7548019018687064e+00\n2.0113761448272101e+00\n-3.6468256537538281e+01\n7.1983099069364398e-01\n-1.2214554235117789e+00\n-2.0669538119945607e+01\n-1.0099597215491520e+00\n-6.7391053455589667e-01\n-2.1519425584526342e+01\n-3.7817554566871592e+00\n3.4970914329781116e-01\n-2.3994828054082898e+01\n2.6965390549570492e+00\n-1.8915216905401560e+00\n-2.0175382112246695e+01\n4.4104503356523184e+00\n-2.3821059294282652e+00\n-2.0444295967814316e+01\n1.8755685792520773e+00\n-1.7374788333854294e+00\n-2.0193031456096861e+01\n-5.7581783229558536e-01\n-9.7783617493544261e-01\n-2.1044298882027498e+01\n4.8660655039465279e+00\n-2.6793509371225630e+00\n-2.0119613769641692e+01\n-1.6084176813518489e+00\n-6.5696697701221241e-01\n-2.1514838965253073e+01\n-6.9303790060540127e-01\n-1.0030200235179683e+00\n-2.0965552335280975e+01\n4.5707868029380448e-02\n-1.3245523776352861e+00\n-2.0562749390155222e+01\n1.0040599983095544e+00\n-1.6430825579332760e+00\n-2.0382168057080417e+01\n-3.8325003878891404e+00\n9.5636227302255510e-03\n-2.3605539307889870e+01\n2.6484654728299111e+00\n-2.1692671736572486e+00\n-2.0362041078202264e+01\n3.1102930438985177e-01\n-1.4888581770993330e+00\n-2.0545134903962495e+01\n4.8480753254621609e+00\n-2.8883622823223045e+00\n-2.0325582880372671e+01\n2.7606250478165193e+00\n-2.2027082412296322e+00\n-2.0852806469133327e+01\n4.5774492918299723e+00\n-2.8338480492162219e+00\n-2.0477831762006982e+01\n-9.0204047591425751e-01\n-1.1824346234605854e+00\n-2.0982414257166973e+01\n7.5444178028148412e-01\n-1.7855951957666771e+00\n-2.0398731862550015e+01\n-3.0414263367639482e+00\n-5.0662800580068246e-01\n-2.2901229849247745e+01\n-1.5044631251824361e+00\n-1.0770022407862703e+00\n-2.1599069094718946e+01\n-5.8229246083617276e+00\n8.7593084746892280e-01\n-3.3830166937653082e+01\n8.8843952737263782e-02\n-1.7583032391174667e+00\n-2.0480025857156445e+01\n4.6079762430537068e+00\n-3.2055799274765939e+00\n-2.0912127382619957e+01\n3.1383832263348466e+00\n-2.8536109092836841e+00\n-1.9553298807520157e+01\n3.0728168247722474e+00\n-2.9140293902448571e+00\n-1.9731326256873594e+01\n2.9913300763921713e+00\n-2.9307556075338832e+00\n-1.9498539758245407e+01\n4.3350076293353723e+00\n-3.3205698376507491e+00\n-2.0852095978750040e+01\n-3.0405660260384120e+00\n-1.1153549899049786e+00\n-2.2315076967690210e+01\n-2.4915007382643859e+00\n-1.4364224362371301e+00\n-2.1486235833780189e+01\n-1.8608177154112828e+00\n-1.7668576498994364e+00\n-2.1114165926085935e+01\n4.1585747072734042e-01\n-2.5070924769470171e+00\n-2.0423766342127330e+01\n-3.7498776893095481e-01\n-2.3440283263646218e+00\n-2.0634155024236190e+01\n1.7773870964467047e+00\n-3.0433101774878799e+00\n-1.9833681342547340e+01\n-1.8418869830503033e+00\n-1.9050759016558823e+00\n-2.0976876614085750e+01\n2.3899858808797978e+00\n-3.4088165765930358e+00\n-2.0346129034684441e+01\n-5.5145461024508813e-01\n-2.5194025652464074e+00\n-2.0188969956717077e+01\n2.2988848792092327e+00\n-3.5032670303889901e+00\n-2.0438033651882051e+01\n4.2768158294523824e+00\n-4.1209307117745473e+00\n-2.1540505639280273e+01\n-2.6852752682110843e+00\n-1.9288338910302072e+00\n-2.2208183259785187e+01\n2.1046418333589871e+00\n-3.5034913231644373e+00\n-2.0375653103388945e+01\n4.4227886682570512e+00\n-4.2306347097466670e+00\n-2.1864938157962630e+01\n-1.1691270347017466e+00\n-2.5110525967841384e+00\n-2.0200921192932306e+01\n1.6424254817965773e+00\n-3.4492833871189710e+00\n-2.0308462637293530e+01\n2.2450288810674039e+00\n-3.6733228833295328e+00\n-2.0555226374214172e+01\n2.9437525327676406e+00\n-3.9553372745334006e+00\n-2.0793077476450158e+01\n-5.3254749818929425e-01\n-3.0431412436037704e+00\n-2.0666376947276817e+01\n-1.7777859329730339e+00\n-2.6659965665896168e+00\n-2.1526860474571233e+01\n-4.2895087427826756e-01\n-3.1161607331088668e+00\n-2.0679013522967072e+01\n-6.2191006807788030e-01\n-3.0954996865764519e+00\n-2.0601867944924951e+01\n-6.2191006807788030e-01\n-3.0954996865764519e+00\n-2.0601867944924951e+01\n-1.3005841616049779e-01\n-3.3527244384747639e+00\n-2.0549982408097357e+01\n-1.3005841616049779e-01\n-3.3527244384747639e+00\n-2.0549982408097357e+01\n1.6960237656232608e+00\n-4.0370610327308087e+00\n-2.0899561864316656e+01\n-7.8146457660971003e-01\n-3.2609494486373731e+00\n-2.1123937782606763e+01\n-3.3420008684300435e+00\n-2.6225817263109357e+00\n-2.4265110190661865e+01\n-1.3991657542721421e+00\n-3.3299762145174556e+00\n-2.1659229319570368e+01\n-3.0393844335925140e+00\n-2.7276697430219694e+00\n-2.2162114138567958e+01\n2.1586725262599100e+00\n-4.5474802878408536e+00\n-2.1454423503916118e+01\n2.0697466507508082e+00\n-4.5603389785615844e+00\n-2.1346290681837047e+01\n-2.8461464281226112e+00\n-2.9972775535703207e+00\n-2.3300151938392965e+01\n-2.8174196598736558e+00\n-3.0008178262960410e+00\n-2.3259381944585343e+01\n2.2715194961477971e+00\n-4.6693507791578588e+00\n-2.1454523364933696e+01\n-3.2407256877825565e+00\n-2.9644550725986196e+00\n-2.4216678558327668e+01\n-2.7064159201563603e-01\n-3.9700443438198567e+00\n-2.1072059730993644e+01\n-3.2552929177470763e-01\n-3.9565095299468918e+00\n-2.1543002947472804e+01\n-2.1113280460217485e+00\n-3.4547696933063263e+00\n-2.2898036464067960e+01\n-2.1886588583453026e+00\n-3.3401084003886665e+00\n-2.2696541192272790e+01\n1.7949694403104819e+00\n-4.7019549979609963e+00\n-2.1153833310146435e+01\n-8.5329448880965479e+00\n-1.6676937685203408e+00\n-3.0372292225185785e+01\n3.0201448721299444e+00\n-5.2315042500499969e+00\n-2.1744128071182825e+01\n-3.6345295580889697e-01\n-4.1649014859889411e+00\n-2.1936827941149442e+01\n-1.5256289877291358e+00\n-3.8489154056364292e+00\n-2.2128052104895620e+01\n1.3133058133238842e+00\n-4.8457821349671590e+00\n-2.1007706068395507e+01\n1.9510551979573001e-01\n-4.4926080638928196e+00\n-2.1823077677429335e+01\n-7.9281026685484148e+00\n-2.1972349006974312e+00\n-2.9838945130215613e+01\n-2.0280247535341740e+00\n-3.9139657492108344e+00\n-2.3014182852341211e+01\n-2.0049288110225829e+00\n-3.9338837975603194e+00\n-2.3132515876814686e+01\n-2.5509787447125926e-01\n-4.4850916565381009e+00\n-2.1313840130846412e+01\n1.4056466568345387e+00\n-5.0935001078050881e+00\n-2.1520754728470163e+01\n3.2383303291434382e+00\n-5.9991176725510522e+00\n-2.2602947509734360e+01\n-7.3599382614630504e-01\n-4.7221730516943943e+00\n-2.2780690801398315e+01\n-2.5892854023609537e+00\n-4.2727003594952997e+00\n-2.3979772485519330e+01\n5.4659799533223108e-01\n-5.4202646082818573e+00\n-2.2260829934417973e+01\n8.4820778643482786e-01\n-5.7289565772236433e+00\n-2.2755789450574472e+01\n1.3383467198151500e+00\n-5.9830511972906368e+00\n-2.1596513231512606e+01\n-9.3822535853521560e-01\n-5.3103735999396209e+00\n-2.3080102483092382e+01\n-3.2427096669314994e+00\n-4.8316399706331596e+00\n-2.4090341000007779e+01\n-3.6143457460958519e+00\n-4.7653147228343080e+00\n-2.4156010390711781e+01\n7.3799425103478988e-01\n-6.1788306032327975e+00\n-2.1755255749848963e+01\n-7.5657778899396675e+00\n-4.0068789480340650e+00\n-2.7663692549484246e+01\n-1.5225077422813049e+00\n-5.7176681257966928e+00\n-2.2613630232263670e+01\n-8.6119973328602999e+00\n-3.7349070530697879e+00\n-2.7569853588685465e+01\n6.1811106811774208e-01\n-6.5506120901314588e+00\n-2.2368217875976711e+01\n7.0800223415874597e-01\n-6.6117995066692643e+00\n-2.2318069050526578e+01\n3.7720080990705934e-01\n-6.6193056463356532e+00\n-2.2752102193263745e+01\n-1.5306779173159004e+00\n-6.1052888004345292e+00\n-2.3059520946018313e+01\n7.9680149423927571e-01\n-6.8610773960513551e+00\n-2.2384547052971598e+01\n7.5194364562359550e-01\n-6.9149001196439652e+00\n-2.2502430950962172e+01\n-1.3743433704066801e+00\n-6.3451248562107834e+00\n-2.3191496279194123e+01\n-1.5556684123026108e+00\n-6.3035988982332389e+00\n-2.3309718028948815e+01\n-1.4296564313250413e+00\n-6.3429432383063631e+00\n-2.3275158884397875e+01\n-1.4296564313250413e+00\n-6.3429432383063631e+00\n-2.3275158884397875e+01\n4.7274590180853462e+00\n-8.3936412159242568e+00\n-2.0951177073691778e+01\n-4.1313956304597568e+00\n-6.1716306659238809e+00\n-2.4442426974037264e+01\n3.9276098549978586e+00\n-8.7010810896174604e+00\n-2.0948179996571088e+01\n3.6398078542424819e+00\n-8.6074900263034007e+00\n-2.0941949297556960e+01\n-2.7645113299960816e-01\n-7.5395453090735085e+00\n-2.1815433406325859e+01\n-6.4816956474949281e+00\n-5.8014429929949136e+00\n-2.4664844853527704e+01\n-5.4613331353535637e+00\n-6.3576124134475434e+00\n-2.3879608345978070e+01\n3.5634044833999026e+00\n-9.2481579373616256e+00\n-2.0150687716305736e+01\n-6.4101118664422456e+00\n-6.2234248576014952e+00\n-2.4212898310893276e+01\n-5.6435226819874336e+00\n-6.5300816162734945e+00\n-2.3812932640496907e+01\n4.5026637600703108e+00\n-9.6965658215616273e+00\n-1.9412293163873997e+01\n-5.8270694419491074e+00\n-6.5732106203307588e+00\n-2.3676351454529716e+01\n1.5385786717682786e+00\n-8.8102863608972815e+00\n-2.0343749801672171e+01\n3.8378224238399703e+00\n-9.6505990435421065e+00\n-1.9465439738226884e+01\n3.3914494188293500e+00\n-9.6042838975677292e+00\n-1.9433986538732487e+01\n2.3135673601046021e+00\n-9.3898093552325559e+00\n-2.0075622227676408e+01\n3.5355169484947844e+00\n-9.7557394761239422e+00\n-1.9450626092940468e+01\n4.1458189063866163e-01\n-8.9364465427850046e+00\n-2.1196589280177939e+01\n1.7566261780147114e+00\n-9.4056128174176727e+00\n-2.0033019455094337e+01\n1.9264088684697804e+00\n-9.4937987057819999e+00\n-1.9959752991417730e+01\n1.4391320951881457e+00\n-9.3643375596994467e+00\n-1.9803558891860224e+01\n1.5121930766977758e+00\n-9.4533374785872581e+00\n-2.0001844822846259e+01\n3.1366782842433949e+00\n-9.9322186291007206e+00\n-1.9229121895830090e+01\n2.7940721358740248e+00\n-9.8847651473971681e+00\n-1.9316865085231797e+01\n7.2612261674599310e-01\n-9.3096259497741940e+00\n-2.0194013524912720e+01\n2.7036767065550742e+00\n-9.9024129856781862e+00\n-1.9301156570758629e+01\n7.7638708785029864e-01\n-9.3643170129613118e+00\n-2.0158180498284082e+01\n-3.5594477513757856e+00\n-8.1439778082117602e+00\n-2.1913502487412785e+01\n-1.1035609308394023e+00\n-8.8007704970859866e+00\n-2.0598487263868119e+01\n2.8466739455431611e+00\n-1.0034969789232136e+01\n-1.9119583476267589e+01\n1.4647186356527824e+00\n-9.6433439937110048e+00\n-1.9728078998244243e+01\n-5.4111844281097055e+00\n-7.5051734474880716e+00\n-2.2349979981512778e+01\n-3.9774073268855594e+00\n-8.0629958504081998e+00\n-2.1558628255308584e+01\n-3.7976012673574453e+00\n-8.1601857012154344e+00\n-2.1443933312476378e+01\n-3.6806900398097167e+00\n-8.2610440554492719e+00\n-2.1283697746554854e+01\n1.9976594081980337e+00\n-9.9950503498356991e+00\n-1.9267996088811106e+01\n4.9601033008207213e-01\n-9.6294664005427251e+00\n-1.9823908760384334e+01\n-1.6862144144645392e+00\n-8.9987715155566299e+00\n-2.0751880068865162e+01\n2.9025324611439927e+00\n-1.0373538538849351e+01\n-1.8683888349280380e+01\n-1.5167849175232622e+00\n-9.6276778946421118e+00\n-1.9973726779357687e+01\n-9.2827612440429708e-01\n-9.7995616539887020e+00\n-1.9690964271159245e+01\n-2.7196424081353303e+00\n-9.3461824676072016e+00\n-2.0366931644228259e+01\n-4.7776406960289162e+00\n-9.2726259348062658e+00\n-2.0737053069025077e+01\n1.1030705683101432e+00\n2.4132179459218413e+01\n-3.9974785695759422e+01\n1.1030132295592868e+01\n2.1036775234281041e+01\n-3.7407181934147083e+01\n1.6951608800798276e+01\n2.8348605938979542e+01\n-5.1167853765392692e+01\n-6.5219679369051620e-01\n2.4744841705034780e+01\n-4.1278857156213824e+01\n1.2771558221022458e+01\n1.6301695353024339e+01\n-3.0648025075033090e+01\n6.0517129965426264e+00\n2.6534319373930497e+01\n-4.6577393562158704e+01\n1.5197524851366879e+01\n1.6332645325131292e+01\n-3.1547472142352806e+01\n1.8504864654143518e+01\n2.8049034690393839e+01\n-5.3139505611777231e+01\n3.2233396414034068e+01\n3.4668881372752722e+01\n-6.7569715210945432e+01\n3.2233396414034068e+01\n3.4668881372752722e+01\n-6.7569715210945432e+01\n1.2088250224530228e+01\n2.6508664273136652e+01\n-4.9181976019504560e+01\n1.4276485524670289e+01\n1.5125819525150286e+01\n-2.9903482625649509e+01\n3.1546317817866971e+01\n3.4042879100605333e+01\n-6.7151213802696816e+01\n1.0973208643775319e+01\n2.6601963587479396e+01\n-5.1291947565385563e+01\n-1.1676148268767763e+00\n2.1996203754763886e+01\n-4.0396531378494601e+01\n9.1202445742284355e-01\n2.2504613404581757e+01\n-4.2072522084697589e+01\n-5.9732925013089677e-01\n2.3021141184802925e+01\n-4.2880715106084835e+01\n2.6754361898158049e+01\n3.0541750315181691e+01\n-6.4627543285405011e+01\n1.2742991378301211e+01\n1.1167878381406934e+01\n-2.4911375040229892e+01\n1.2563831515280441e+01\n2.4673940915424271e+01\n-4.9972751487516405e+01\n1.2563831515280441e+01\n2.4673940915424271e+01\n-4.9972751487516405e+01\n1.5466411336148152e+01\n2.5033230181260997e+01\n-5.1515448296369364e+01\n2.3824693579863073e+01\n2.8442386802877078e+01\n-6.0562221598647355e+01\n1.6041233183092665e+01\n2.5553416511319348e+01\n-5.2978815669174907e+01\n1.6732499014041323e+01\n2.6242525553330655e+01\n-5.4594207028169109e+01\n1.4213881118164423e+01\n1.0860413570787765e+01\n-2.5119957611912756e+01\n1.4656113068439987e+01\n1.0174052384804272e+01\n-2.4061806643597528e+01\n1.4814022107667030e+01\n9.9770283827237627e+00\n-2.4046143399108210e+01\n1.4561523452763758e+01\n1.3055371021752528e+01\n-3.0118764165502842e+01\n9.9069274053041152e+00\n2.4158522897999745e+01\n-4.9968719991436508e+01\n1.4335697409294621e+01\n1.4926924698861860e+01\n-3.3553404570976802e+01\n1.3113496963808746e+01\n1.0115846305257012e+01\n-2.4429499253927698e+01\n-1.4610046402562191e+00\n2.2022533224381192e+01\n-4.3177912945314212e+01\n1.1343106782884580e+00\n2.1126633845145740e+01\n-4.2540292234139528e+01\n1.6032072790125781e+01\n2.5245313703529529e+01\n-5.5254514486073802e+01\n2.1503027841950080e+00\n2.1785166686832177e+01\n-4.4817488557321788e+01\n1.3188051647609324e+01\n1.1058771469773310e+01\n-2.6950813775866493e+01\n1.5978288457602780e+01\n2.3825036912201867e+01\n-5.3169054793806964e+01\n1.4143134768428320e+00\n1.9865062835845745e+01\n-4.0958287247954914e+01\n1.3357013404370871e+01\n1.2514604399962813e+01\n-3.0440430745532797e+01\n1.4271807173727993e+01\n1.2643162560920288e+01\n-3.1081446960299424e+01\n1.4271807173727993e+01\n1.2643162560920288e+01\n-3.1081446960299424e+01\n9.6272938100219001e+00\n2.3458267680904555e+01\n-5.1065273919081172e+01\n8.0598280139281062e+00\n2.3740066413853746e+01\n-5.1529412101850866e+01\n8.0598280139281062e+00\n2.3740066413853746e+01\n-5.1529412101850866e+01\n1.8154275863848980e+01\n2.7126481540879510e+01\n-6.2228771560709959e+01\n1.8042325865989383e+01\n2.5227576261271700e+01\n-5.8499920274894485e+01\n1.3782509546503615e+01\n2.4153575246593970e+01\n-5.4440323748273777e+01\n1.3993704818921708e+01\n9.9833669055254379e+00\n-2.6006505754640230e+01\n1.6434234735327966e+01\n2.4161334054931110e+01\n-5.6128443812174240e+01\n1.6785790511605580e+01\n2.4652712951506523e+01\n-5.6769586559214105e+01\n1.2976735865414799e+01\n2.2844676710501965e+01\n-5.2579905211655465e+01\n1.0860433611326336e+01\n2.3576200001144411e+01\n-5.2880612067532340e+01\n2.6616902506066631e+00\n2.1561267828496661e+01\n-4.6315094138881449e+01\n2.4896188384657858e+00\n2.1275411508534294e+01\n-4.5613941928792606e+01\n-2.1363503978897769e+00\n2.0995426961741302e+01\n-4.3579126484139003e+01\n1.5313375866112807e+01\n2.4655717558479676e+01\n-5.7618891918980985e+01\n1.3201542621607837e+01\n9.0267088856841244e+00\n-2.4988041647658967e+01\n4.4307953023009015e+00\n2.1200854037021625e+01\n-4.7550990729836457e+01\n9.3789521342262585e+00\n2.3376098004891919e+01\n-5.3558671657548899e+01\n3.1812630003933984e-01\n2.0445889033149911e+01\n-4.4455891622822534e+01\n1.4220376880321357e+01\n2.2658285456993443e+01\n-5.4719823934182266e+01\n1.3080436941098652e+01\n9.0789884463424624e+00\n-2.5333601477919895e+01\n3.3813412884589717e+00\n2.1060629563982335e+01\n-4.7367377985769402e+01\n6.2498776875726634e+00\n2.1048237525277006e+01\n-5.0092467362057555e+01\n5.3973317682158504e+00\n2.1043249791406993e+01\n-4.9508914916436026e+01\n8.4913104409879452e+00\n2.3257075795753561e+01\n-5.5899176364391671e+01\n1.3264411607054637e+01\n8.1801023457385682e+00\n-2.5429272544906748e+01\n9.4556173919663138e+00\n2.2742695460458375e+01\n-5.6574242525722120e+01\n8.6494470129306631e+00\n2.1176039981448206e+01\n-5.3031414280999414e+01\n1.2979818582879988e+01\n1.1977485717700842e+01\n-3.4804101099604495e+01\n7.8620489598936527e-01\n1.9550894786882512e+01\n-4.6439281842359648e+01\n7.6915352079394568e+00\n1.8690148501778712e+01\n-4.7445731056992265e+01\n7.5391775266441634e+00\n2.1841107846471637e+01\n-5.5384142384535465e+01\n8.7839522587961731e+00\n2.0544202568817063e+01\n-5.3852938859032903e+01\n9.2763379317379790e+00\n2.0591726049893598e+01\n-5.4239478042664516e+01\n3.2003138248718139e+00\n1.9563830251485651e+01\n-4.9447057333727599e+01\n3.6770381895083259e+00\n2.0925632291452501e+01\n-5.3160862129318112e+01\n1.2967414957995482e+01\n7.8870015715199520e+00\n-2.6730601588302260e+01\n1.4666620453067955e+01\n9.9275672397784902e+00\n-3.2467151039601113e+01\n8.8602762223723914e+00\n2.0305310253922727e+01\n-5.4554176783495073e+01\n-9.7310885895936117e-01\n1.9904012107836131e+01\n-4.9496543931862476e+01\n1.1726198152420476e+01\n7.6858254450668131e+00\n-2.6316026017399693e+01\n1.2074773064546322e+01\n7.5566181936997312e+00\n-2.6104796276387223e+01\n1.3091479569872364e+01\n7.6761271643492845e+00\n-2.6989765390861461e+01\n1.3951899483474566e+01\n6.4588353188191068e+00\n-2.4800908483258372e+01\n1.2191771343979298e+01\n7.4074426979981585e+00\n-2.6534695162152719e+01\n1.3269890282839794e+01\n6.8578644902303463e+00\n-2.6733229769574372e+01\n1.1491830462107979e+01\n6.9548120143471346e+00\n-2.6695247654989643e+01\n-5.5460593763120958e-01\n1.8974193988121453e+01\n-5.1139043360210003e+01\n-9.6908799301921078e-01\n1.8821662568368065e+01\n-5.0826207517476341e+01\n1.4381245912879489e+01\n9.0181047717131602e+00\n-3.4097961124175256e+01\n1.4012796660702424e+01\n8.6621010127420348e+00\n-3.3219203894596120e+01\n-1.9645045148077873e+00\n1.8410152676510982e+01\n-5.0293019136911070e+01\n1.2969719887731776e+01\n9.8238049459312471e+00\n-3.6279749159202161e+01\n-5.4568281762469373e-01\n1.7049285084829847e+01\n-4.8044565064035289e+01\n-5.4568281762469373e-01\n1.7049285084829847e+01\n-4.8044565064035289e+01\n1.3218153997765343e+01\n6.2658402134867135e+00\n-2.7398086788849536e+01\n1.2274212575988155e+01\n6.7720749383426249e+00\n-2.8788912633179297e+01\n1.2493966183878833e+01\n1.0310378965269674e+01\n-3.8769286986848378e+01\n1.2899076653625327e+01\n5.8378554762712698e+00\n-2.7278967326417987e+01\n1.2640552593056551e+01\n5.7301262394953705e+00\n-2.6848109336428131e+01\n1.2195493547865301e+01\n6.2200706772247747e+00\n-2.8295481044404927e+01\n1.3567629187497765e+01\n9.7414257752946529e+00\n-3.9722010238483151e+01\n1.4331600190474942e+01\n7.8140867878255262e+00\n-3.5953512534628885e+01\n1.3170410852267301e+01\n4.7206103019759418e+00\n-2.6695207438526428e+01\n-1.4094710381191888e+00\n1.5870717867190551e+01\n-5.0140190408775219e+01\n1.3648763238600734e+01\n4.6337929891402174e+00\n-2.6944107175429615e+01\n1.3336171125091973e+01\n9.5162268909273067e+00\n-4.1633398067800009e+01\n1.3791932791689542e+01\n9.9559454334389592e+00\n-4.3437891027063898e+01\n1.2387101921275667e+01\n5.4044239049053244e+00\n-2.9374242946725420e+01\n1.3481501307327301e+01\n4.7378946727726339e+00\n-2.7897254229587936e+01\n1.2017619098414162e+01\n5.4038293269330806e+00\n-2.8888958366190945e+01\n1.3256723243465355e+01\n3.7764440081089932e+00\n-2.5671329587649286e+01\n1.3059102509422695e+01\n4.9952160640312213e+00\n-2.9545639245794042e+01\n1.6362491233689222e-01\n1.4936285056823191e+01\n-5.1925824557167040e+01\n-3.8225924487538916e+00\n1.4397486665370620e+01\n-4.7909535531108375e+01\n4.4242192336487101e+00\n1.3613553336146083e+01\n-5.1521349918839924e+01\n6.1500844060304587e+00\n1.1834003385189545e+01\n-4.7799024283070153e+01\n9.4600712729663661e-01\n1.4203281902337372e+01\n-5.1717887043188000e+01\n3.1224620883577550e+00\n1.2681445925692156e+01\n-4.9305393408069747e+01\n5.2133023420976556e+00\n1.0697980411705142e+01\n-4.6045302879204989e+01\n1.3384735528926504e+01\n3.0807202176526109e+00\n-2.7374076511151166e+01\n2.9868963863839073e+00\n1.0528549522595144e+01\n-4.4577550794727216e+01\n5.7576400089471287e+00\n1.0463067542873450e+01\n-4.6978694104651566e+01\n1.4262920514293210e+01\n2.6446853023596701e+00\n-2.6796069610587406e+01\n5.3812688854228172e+00\n1.0329893853225173e+01\n-4.6518755486646448e+01\n4.0099949783425917e+00\n9.6301610388059817e+00\n-4.2672940812307843e+01\n1.3074456933968035e+01\n3.1963950385322590e+00\n-2.8371597520843270e+01\n2.3997892233729643e+00\n1.1388360566848663e+01\n-4.8593996300889707e+01\n1.3698587183351666e+01\n2.3972547990806699e+00\n-2.7321545171169824e+01\n1.2399231289853393e+01\n3.8353923722325214e+00\n-3.1344517726177688e+01\n2.2099122446808321e+00\n1.0526644819722181e+01\n-4.6757301755378712e+01\n1.2469858794244232e+01\n4.0441307928364125e+00\n-3.2186274090421009e+01\n1.3684497619950143e+01\n2.6902692507961148e+00\n-2.8576828103294883e+01\n3.3981337458611018e+00\n3.3890260129232357e+00\n-2.2938283869428965e+01\n3.4477197658738108e+00\n3.3617211650239689e+00\n-2.2888662891360845e+01\n1.2298029593870064e+01\n2.7507513954571450e+00\n-2.8990530866789026e+01\n3.5341759021156074e+00\n2.7792515107580367e+00\n-2.1924538014277996e+01\n1.3819993751059338e+00\n8.9487362251493874e+00\n-4.4452305335664825e+01\n1.2281216780567526e+01\n2.4432680403726037e+00\n-2.9560395925033355e+01\n1.4398246224516955e+01\n1.1618092790310137e+00\n-2.7112860846732794e+01\n1.4289613574998844e+01\n1.2820114024300788e+00\n-2.7479448322300030e+01\n4.1371565183605110e+00\n2.4325746262811956e+00\n-2.2438139495099026e+01\n1.2337305989182912e+01\n2.2325696142754921e+00\n-3.0885491855702064e+01\n-1.1251552525638899e+00\n8.9354180815475228e+00\n-4.4491286867127300e+01\n-7.3893872521757242e-01\n3.2903183333811947e+00\n-2.1027060215849648e+01\n1.3790160824036020e+01\n9.9058589671367425e-01\n-2.9176110004868729e+01\n2.5401309949578801e+00\n2.0731273262676706e+00\n-2.1097956901779835e+01\n1.2195795789955790e+01\n2.1021954812763330e+00\n-3.2233941002861179e+01\n2.6464814732216553e+00\n1.8508405887777202e+00\n-2.0806786427650618e+01\n1.4288301177649570e+01\n7.7833572578885446e-01\n-2.9244073210651276e+01\n7.2082531040257178e+00\n1.6668945370782289e+00\n-2.5532732062921646e+01\n1.2390718362107465e+01\n5.5115065959919118e-01\n-2.7091141193200507e+01\n4.0097746759590489e+00\n1.3362636020815968e+00\n-2.1147325186986443e+01\n1.2325691101787257e+01\n1.5093983657481813e-01\n-2.6112415201276274e+01\n-8.1252812441879807e-01\n2.8059492599071496e+00\n-2.2861353208551169e+01\n-8.7664513720086057e-01\n6.8579135546358572e+00\n-4.1697000686400564e+01\n1.4114763037775703e+01\n-1.4748235082146857e-02\n-2.8281771829409884e+01\n2.9224682188718134e+00\n1.4058185626894428e+00\n-2.0930763006797061e+01\n1.4265198741192268e+01\n-1.5557901384996831e-01\n-2.8215762256608475e+01\n-5.9519217308407335e-01\n2.2577283561926293e+00\n-2.1911901007784451e+01\n3.0018067178071899e+00\n9.9689990850594312e-01\n-2.0567232453364856e+01\n1.5702615445888279e+00\n1.3247830991929859e+00\n-2.0444412158749252e+01\n1.4518399623966223e+01\n-7.1061771921986150e-01\n-2.8630232022677593e+01\n1.6141988073804188e+00\n1.0982306511318602e+00\n-2.0405782718530816e+01\n1.4488855455575409e+01\n-9.7756074371668056e-01\n-2.8342576773646840e+01\n9.4610326974183090e-01\n1.1913533642253853e+00\n-2.0633451164369266e+01\n-2.1005217901575142e+00\n2.8150833267159512e+00\n-2.5940994345652349e+01\n1.9679559774864197e+00\n7.2295624968096361e-01\n-2.0369243019947341e+01\n-2.8113377394927999e+00\n5.2231429230748567e+00\n-3.9370102124671476e+01\n-4.3788617220433884e-01\n1.4772803334429743e+00\n-2.1501997982444742e+01\n6.9278848518950067e+00\n-3.2269124492426315e-01\n-2.3695352880977403e+01\n3.9273599060673279e+00\n3.8758898033766150e-02\n-2.1056854367479644e+01\n-3.0969298737288606e+00\n2.6336811965881726e+00\n-2.6516548932746613e+01\n4.0044749235642669e+00\n-1.8911808364037391e-01\n-2.1104376233897980e+01\n6.4852284140655918e+00\n-6.6536144284860266e-01\n-2.2516425797686964e+01\n4.1906201978439900e-01\n6.8049418502093684e-01\n-2.0590923902399364e+01\n-1.2673967879205055e+00\n1.3570919277449200e+00\n-2.2293515205139229e+01\n2.5208892964937146e-01\n6.3448473136605799e-01\n-2.0731618776017768e+01\n2.7604114670980778e-01\n5.8797302890769199e-01\n-2.0641305082450419e+01\n4.3076192664179302e+00\n-5.1962704215417810e-01\n-2.1456941402598915e+01\n-3.3553558446527894e+00\n3.9288539940967535e+00\n-3.7552839344895283e+01\n-3.3553558446527894e+00\n3.9288539940967535e+00\n-3.7552839344895283e+01\n-3.0563439626261975e+00\n2.0988947784929755e+00\n-2.6361990690426293e+01\n-2.9916220399798483e+00\n1.9732717397599833e+00\n-2.6046685749615040e+01\n-2.7728907618797285e+00\n3.5107822489213953e+00\n-3.7701417131432770e+01\n2.9019324202106369e+00\n-6.1780771511721166e-01\n-1.9557499704748174e+01\n5.7410719974537425e+00\n-1.2681526579565168e+00\n-2.1235604125567338e+01\n-1.5041236256548205e+00\n8.8694704422111192e-01\n-2.2308278113253930e+01\n3.4738847741572343e+00\n-7.1330754835946419e-01\n-2.0758536924974560e+01\n-2.4734807187818904e+00\n1.3783660159268691e+00\n-2.4091831660203322e+01\n4.5591517909308649e-01\n5.9535309655548964e-02\n-2.0514376088252813e+01\n1.1086412129265735e+00\n-4.0744870331149108e-01\n-1.7719532889333248e+01\n-1.7910748856743444e+00\n1.0228963063228940e+00\n-2.3105935269762917e+01\n-1.8161697745846637e+00\n8.9342126680809753e-01\n-2.2903975725172131e+01\n4.4655253429887498e+00\n-1.1753936238768350e+00\n-2.0658497084744297e+01\n1.5083860995359661e+00\n-5.7417314646845186e-01\n-2.0321601788891467e+01\n-8.9280135748697920e-01\n2.2288248535012828e-01\n-2.1592289899761582e+01\n-1.2311460883032892e+00\n3.2650540296582548e-01\n-2.1958555007826607e+01\n2.2074106510573105e-01\n-2.7704551130814875e-01\n-2.0848273476335649e+01\n-3.3807864845496677e-01\n-2.3057912734333413e-01\n-2.1251891016411161e+01\n-2.3091104957189561e+00\n5.3717736668229321e-01\n-2.3102029374158427e+01\n1.5640822032812918e+00\n-8.6682245382369683e-01\n-2.0516429947018416e+01\n-7.4732454491342110e-02\n-3.8194133991091384e-01\n-2.0959138156779716e+01\n-1.1450003866280412e+00\n1.3769840544880124e-02\n-2.1825946089924322e+01\n-2.3722756912805512e+00\n3.6467311021932930e-01\n-2.2880642494869210e+01\n-2.1037624235401915e+00\n2.9362613442469354e-01\n-2.2817075883639532e+01\n-1.1729017210507067e+00\n-8.5660227852976875e-02\n-2.1901394989414730e+01\n-2.9414274410751911e+00\n6.5137815789924691e-01\n-2.3629099778317435e+01\n-6.9826742697376554e-01\n-3.3693763967327411e-01\n-2.1295770143497549e+01\n4.3229831221639881e+00\n-2.2837961753665108e+00\n-2.0162474617895526e+01\n-1.3730174284089636e+00\n-6.6699893783189268e-01\n-2.1520364714330398e+01\n-3.2759939171506223e+00\n-1.2380380741276405e-02\n-2.3411695057472198e+01\n1.2728296336369243e+00\n-1.7164523010992163e+00\n-2.0231678064359528e+01\n1.1282651302413165e+00\n-1.6980784541483203e+00\n-2.0255282215127213e+01\n-3.9139818462637215e+00\n-9.0324745786720492e-02\n-2.3489363855213629e+01\n1.6532172978873441e-01\n-1.5413025399287883e+00\n-2.0329032370837709e+01\n-3.0931520323082120e+00\n-3.9114526031079122e-01\n-2.3065238195889744e+01\n6.1709577152694817e-01\n-1.8750057377854070e+00\n-2.0362380360619248e+01\n-3.6211638012754404e+00\n-5.8762329754873965e-01\n-2.3095399072401154e+01\n1.6589507280946576e+00\n-2.7002486999260285e+00\n-2.0008228592745642e+01\n-3.3883829455323493e+00\n-1.0268531507889815e+00\n-2.3276842064612307e+01\n-2.9761853800301141e+00\n-1.3275129609779019e+00\n-2.1665897368868343e+01\n5.5501981121232502e-01\n-2.6828514585999121e+00\n-2.0026390864320199e+01\n3.9597237956984610e-01\n-2.6272092455080132e+00\n-1.9530289216355676e+01\n1.4646325234286091e+00\n-3.0225849764967379e+00\n-1.9724552848429742e+01\n2.3643952434444784e+00\n-3.4769873292666484e+00\n-2.0262821078832722e+01\n2.5649746010409706e+00\n-3.6601021719052413e+00\n-2.0163049690215058e+01\n-1.4801834817388051e+00\n-2.3728650530701620e+00\n-2.1043663144872752e+01\n-1.6891333314863710e+00\n-2.6813691482285309e+00\n-2.1694908529025533e+01\n-4.6294279780666338e-02\n-3.2851453911587964e+00\n-2.0655478848755003e+01\n-1.3425357351627534e+00\n-3.0046306325280754e+00\n-1.9409547477282128e+01\n7.1528900811744556e-01\n-3.8685176309399565e+00\n-2.0120976999140087e+01\n2.6512417462429863e+00\n-4.5698876418270702e+00\n-2.0883131202153123e+01\n2.2735950350308376e+00\n-4.4499065752200879e+00\n-2.1354591222261348e+01\n-9.7230073435916853e-01\n-3.5901605323895107e+00\n-2.1496757504516168e+01\n1.9987938699006864e+00\n-4.5233924250893018e+00\n-2.0965632961817196e+01\n2.1367995717656756e+00\n-4.5817385301616058e+00\n-2.1346589788954763e+01\n-2.4542284242267600e+00\n-3.2378766941296973e+00\n-2.1323962263987863e+01\n-8.3000735388699756e+00\n-1.7494535963348949e+00\n-3.0565780781456411e+01\n-2.2662426164574883e+00\n-3.6366823416343537e+00\n-2.3027225080551311e+01\n-2.0121998341114578e-01\n-4.2857792411404150e+00\n-2.1878698532898824e+01\n-2.6544458445660832e+00\n-3.8492958254155498e+00\n-2.4122168392461415e+01\n-1.5797723505124592e+00\n-4.2958887151718663e+00\n-2.3216418355921686e+01\n1.2001362141550969e+00\n-5.3635675249824919e+00\n-2.2103254339070116e+01\n-2.9204231136819216e+00\n-3.9100241526232908e+00\n-2.2734600842309671e+01\n-7.3815007530067567e-01\n-4.8648351278471473e+00\n-2.2749175846130431e+01\n-7.3131024012815109e+00\n-3.7028336252639242e+00\n-2.8041774352131085e+01\n-7.6827480846086846e+00\n-3.7206947040390763e+00\n-2.7857848423906898e+01\n-7.7802609589025788e+00\n-3.8123721127975339e+00\n-2.8051914764140491e+01\n6.0902241159963533e-01\n-6.8948485184699138e+00\n-2.2626030677017884e+01\n2.0448210220373109e-01\n-7.1228306204065275e+00\n-2.2467511923757332e+01\n-6.7618460504132551e+00\n-5.1358059174605657e+00\n-2.6184832810774164e+01\n-6.5070243243739769e+00\n-5.1334686907798366e+00\n-2.5503705810087521e+01\n-7.6875671571109097e+00\n-5.1348857154724179e+00\n-2.6276219953218110e+01\n2.9735664206323862e+00\n-8.5923333180285208e+00\n-2.1072469034790945e+01\n-5.6816945116783302e+00\n-5.9913822184006209e+00\n-2.4443778586574116e+01\n4.9467778114506356e+00\n-9.3091530061203844e+00\n-1.9886175528980299e+01\n-4.8190047276147032e+00\n-6.5098738139852301e+00\n-2.3712146242955562e+01\n-4.7698378449979266e+00\n-6.6613832380236797e+00\n-2.3962852259694738e+01\n-6.5342216355375742e+00\n-6.1212027071149091e+00\n-2.4133211453487977e+01\n-6.7001245697701792e+00\n-6.1983910249578686e+00\n-2.4170083174407811e+01\n2.7897648034231253e+00\n-9.5184017653605082e+00\n-1.9753534243153169e+01\n-3.5561110422052042e+00\n-7.5784075385933605e+00\n-2.2192475125159397e+01\n-2.7826334761111995e+00\n-8.2228270112856965e+00\n-2.1284886658753262e+01\n-2.7826334761111995e+00\n-8.2228270112856965e+00\n-2.1284886658753262e+01\n3.7764545033307724e+00\n-1.0229347086145090e+01\n-1.8821011373034587e+01\n3.2190359493026102e+00\n-1.0160533255316494e+01\n-1.8931420595733456e+01\n2.4598632448748132e+00\n-1.0003989852159897e+01\n-1.9215179859907401e+01\n-5.2172906948808171e+00\n-7.7829226575696753e+00\n-2.2522638915042162e+01\n2.8240476458483266e-01\n-9.5310553522319719e+00\n-1.9834410744319889e+01\n-5.0396923378285301e+00\n-8.0064574093371252e+00\n-2.2220553205832566e+01\n-4.4865789562472616e+00\n-8.4681817320634831e+00\n-2.1712656655956820e+01\n-5.6927939116184838e+00\n-8.2636032799873078e+00\n-2.1988690546759138e+01\n-2.0186314415038429e+00\n-9.4649763670213503e+00\n-2.0188211593242208e+01\n-5.1395268498040680e+00\n-8.6405188363923244e+00\n-2.1512329996010973e+01\n-2.7973248362375416e+00\n-9.4667538136587090e+00\n-2.0283959785857455e+01\n-2.8541114393464531e+00\n-9.3263676429237385e+00\n-1.9972236503853427e+01\n-3.0033801234227884e+00\n-9.3110384721080148e+00\n-1.9960662447210041e+01\n-2.9471431707611924e+00\n-9.4548110462868209e+00\n-2.0284598156005558e+01\n-4.6367502342991163e+00\n-9.1297262728018911e+00\n-2.0870844875259301e+01\n1.0451777663709345e+01\n2.7191747343388936e+01\n-4.7418745936799638e+01\n1.4896395058505458e+01\n2.9918254521010898e+01\n-5.2665380466978092e+01\n1.2666801900590446e+01\n1.6661461907058122e+01\n-3.1092345687001849e+01\n1.5395983152145080e+01\n2.9481812440727364e+01\n-5.3491107082141077e+01\n1.5395983152145080e+01\n2.9481812440727364e+01\n-5.3491107082141077e+01\n1.8749598794857409e+01\n2.8238050942655928e+01\n-5.2831290880627847e+01\n1.8678215958220459e+01\n2.8067889214097129e+01\n-5.3131488171768964e+01\n3.1867842780265160e+01\n3.4451968919370337e+01\n-6.7431035350043700e+01\n1.3269496640772665e+01\n2.8013625058453798e+01\n-5.2672160036769625e+01\n1.4976558043868431e+01\n1.6117823847067196e+01\n-3.2490272367430279e+01\n1.8611839465298480e+01\n2.9385170638882823e+01\n-5.7062373176657388e+01\n1.8985053642953361e+01\n2.9453989675752752e+01\n-5.7536234040845578e+01\n1.6235312807970704e+01\n2.6359323107888592e+01\n-5.2107632282733739e+01\n2.1351862297660976e+01\n2.7000303026323021e+01\n-5.5702045710054904e+01\n1.3681457918183625e+01\n1.1580054004448721e+01\n-2.5705935627578675e+01\n5.8126262081675169e+00\n2.3974727467142305e+01\n-4.6654421886140341e+01\n2.4141252769911926e+01\n2.9717811103333528e+01\n-6.3012441878156089e+01\n1.9402604088371078e+01\n2.8134406025000786e+01\n-5.8824211167351443e+01\n1.2494296799480100e+01\n1.1239408270607175e+01\n-2.5422112398528075e+01\n1.3960415524219332e+01\n2.5541621155443899e+01\n-5.2939534313486789e+01\n1.4464893779963738e+01\n1.5216374303524942e+01\n-3.3811841157724508e+01\n1.3636746043683955e+01\n9.6470018750694138e+00\n-2.3221173423552994e+01\n1.3636746043683955e+01\n9.6470018750694138e+00\n-2.3221173423552994e+01\n1.4617724911635953e+01\n2.5178452547943174e+01\n-5.3765298061279339e+01\n1.9021186081566160e+01\n2.5993903690295365e+01\n-5.7721740178009981e+01\n1.3629167148524580e+01\n9.1557970450626183e+00\n-2.3431268065272018e+01\n1.0489849025383240e+01\n2.3339439117726709e+01\n-5.0506039569152350e+01\n1.1726291074158212e+01\n1.3456837429272824e+01\n-3.2958430967333051e+01\n7.7471699950504700e+00\n2.4499494685290006e+01\n-5.4309893284068849e+01\n6.0129976941756438e-02\n2.2625937136183779e+01\n-4.8677038799330646e+01\n1.0508702391353612e+01\n2.3962024741624088e+01\n-5.7274114157932260e+01\n9.4294970799378532e+00\n2.2281257514322114e+01\n-5.3337139931093589e+01\n1.3495389746178729e+01\n8.3021830071301466e+00\n-2.4640367733110082e+01\n1.2514722439550722e+01\n1.2066706995383043e+01\n-3.3698619670657266e+01\n8.9983302626029826e-01\n1.9969890440939977e+01\n-4.5976502095020948e+01\n1.1807544252156994e+01\n2.3376756925174078e+01\n-5.8979701813089406e+01\n1.1730754927097635e+01\n2.3136570818729833e+01\n-5.9183082729712233e+01\n2.5982363297161815e+00\n1.9793644460751054e+01\n-4.7946572111036126e+01\n1.2762623110464999e+01\n7.1566879542596800e+00\n-2.4331267109178143e+01\n8.2842522350203662e+00\n2.0395735033588064e+01\n-5.2746908459144272e+01\n1.0129011984017469e+01\n2.2423781516048312e+01\n-5.8442754401766329e+01\n8.9429196260486528e+00\n2.0731344306030110e+01\n-5.4051529567199211e+01\n5.6734992756218361e+00\n2.0744668002775619e+01\n-5.2818831343015660e+01\n1.4638699787566011e+01\n1.0107804585839226e+01\n-3.2438223011075557e+01\n2.1459239104193104e+00\n2.0574729138946893e+01\n-5.2210203088809322e+01\n9.6516802017226304e+00\n2.0983738456945574e+01\n-5.7124603008984963e+01\n1.6448926278797245e+00\n2.0047264392133485e+01\n-5.1891619207834715e+01\n1.0881596722823485e+01\n2.0257359190024331e+01\n-5.6677288424867768e+01\n1.0881596722823485e+01\n2.0257359190024331e+01\n-5.6677288424867768e+01\n1.2324288119663629e+01\n1.9682074465462936e+01\n-5.7431853516225154e+01\n1.0847291677924247e+00\n1.9531849148688170e+01\n-5.1916888924323914e+01\n1.2008025348160125e+01\n7.2459390564323272e+00\n-2.6586109852242782e+01\n1.3210375708259056e+01\n5.7016720202993332e+00\n-2.5425192883537331e+01\n8.1288673362910426e+00\n1.0423628592377252e+01\n-3.7949854108186230e+01\n-1.4187410760720298e+00\n1.6057179902436463e+01\n-4.8802714755031175e+01\n1.2864076998529281e+01\n6.5233363358970138e+00\n-3.0594520879316523e+01\n1.3966440362223530e+01\n7.7512813479658966e+00\n-3.6736543405326465e+01\n8.9154037674595654e-01\n1.5803257940504023e+01\n-5.1827865021957230e+01\n1.8535228163322988e-02\n1.5240497828977812e+01\n-5.2102013236136187e+01\n1.3758622312667805e+01\n4.0706012196805421e+00\n-2.7926988861601053e+01\n1.4084712810217784e+01\n3.3732276032746036e+00\n-2.6461413751472136e+01\n5.2972876589685898e+00\n1.0997545832204860e+01\n-4.6634903494614484e+01\n3.2689990628335508e+00\n1.1052208686003581e+01\n-4.6651624813064636e+01\n2.9559336271250189e+00\n1.0508857909622508e+01\n-4.6215441304000130e+01\n1.2070141394951268e+01\n3.7313822160869474e+00\n-3.0490844516028925e+01\n1.2670348824534257e+01\n3.5290241198617962e+00\n-3.0447368427971465e+01\n1.3448115123464234e+01\n3.2285615946645172e+00\n-3.0190700742045532e+01\n1.2931559695129062e+01\n3.3009077132231939e+00\n-3.0068021664970310e+01\n1.3047639600081741e+01\n3.4095182356057778e+00\n-3.0431381641218376e+01\n1.4444132272811883e+01\n2.2334615644552027e+00\n-2.7583098112883430e+01\n2.6378556222234608e+00\n8.4546907704514425e+00\n-4.3533828644113058e+01\n3.3558560045844605e+00\n2.8869847246974869e+00\n-2.2578444274922955e+01\n1.2069734382269329e+01\n3.0148563254190477e+00\n-3.2017079001443335e+01\n1.4406151161929881e+01\n1.2483683505580148e+00\n-2.7375469285820181e+01\n3.4591798972417740e+00\n2.4635946539347326e+00\n-2.1607407053210938e+01\n1.2256122149159596e+01\n2.3172737561199943e+00\n-3.1436919176911179e+01\n1.3455759070569043e+01\n2.6927618997322860e+00\n-3.4473960212718289e+01\n7.2025205581403560e+00\n1.6576241072108377e+00\n-2.5537640637218690e+01\n1.3061403863276766e+01\n3.1303202152331788e-01\n-2.6149190095942352e+01\n1.2618558235046542e+01\n1.7559750146357738e+00\n-3.3205499616025321e+01\n2.2918999523290378e+00\n1.6911448250800363e+00\n-2.0721059617763476e+01\n4.1205616325514303e+00\n1.2104535676284760e+00\n-2.1229127193538325e+01\n1.2870952747993423e+01\n4.9000465532463922e-01\n-2.9993443930739769e+01\n1.3419966957579577e+01\n5.5288900045326694e-01\n-3.0971146040057828e+01\n1.4359263791899293e+01\n-1.6004034434172185e-01\n-2.8616699943347800e+01\n-1.1534352706052089e+00\n2.6999836592405995e+00\n-2.2676600198713192e+01\n1.4381776713387797e+01\n-3.1445690997926168e-01\n-2.9253600975355834e+01\n2.7685657040410767e+00\n9.9644365894082543e-01\n-2.0693260856217041e+01\n4.0414335816394980e+00\n6.9885394216286578e-01\n-2.1040304698650992e+01\n1.3992738153783542e+01\n4.7107476119346975e-01\n-3.3393484615779514e+01\n3.8109283171407125e+00\n7.0199287083885165e-01\n-2.0787691827502204e+01\n1.8253444389629954e+00\n8.4995660487069646e-01\n-2.0363602652387176e+01\n7.2792821548634923e-02\n1.3429862024445702e+00\n-2.1003299214168511e+01\n-2.3386838897227573e+00\n2.7448859363356002e+00\n-2.6005466028310781e+01\n-3.3455307536775711e+00\n3.2990988204120866e+00\n-2.7874578265527468e+01\n-2.5205348569253103e+00\n2.8744134728261881e+00\n-2.7365873972145629e+01\n-3.7301889438736344e+00\n5.1078030909507035e+00\n-3.9117523383698888e+01\n-1.8795855766322003e+00\n1.8834080692139219e+00\n-2.3612989899628982e+01\n2.2923073093818882e+00\n-2.4431788608319613e-02\n-2.0298684348376405e+01\n1.9679390961579304e-01\n4.6899981973571231e-01\n-2.0750184200227419e+01\n-2.2835405346787168e+00\n1.7057511893444577e+00\n-2.4631495297988142e+01\n4.2137845877805340e+00\n-6.0534792113505698e-01\n-2.1309299791752110e+01\n-3.2770976718967287e-01\n5.7987885104503489e-01\n-2.1016401410014119e+01\n-1.8576979448042636e+00\n1.1165958894986585e+00\n-2.3212567553057710e+01\n1.1607228537166179e+01\n-1.9374581906199002e+00\n-2.8942446173284935e+01\n1.4061239986115397e+00\n-3.5714793877593010e-01\n-2.0366761993412659e+01\n-3.3394649310338389e+00\n1.5652226570908037e+00\n-2.5660757147963690e+01\n-1.5928098309456413e+00\n4.3925420049437092e-01\n-2.2537309420984524e+01\n1.2675964647083044e+00\n-6.4370357632435937e-01\n-2.0393224822650041e+01\n1.0295950596001411e+01\n-2.5029065029929911e+00\n-2.7030095439732246e+01\n-5.3616239260969767e-01\n-6.6989690879488015e-02\n-2.1245805284201939e+01\n5.4677569377696624e+00\n-1.8317024124392784e+00\n-2.1111717683929459e+01\n-2.1932880848424916e+00\n4.9738015698828764e-01\n-2.2948202779445353e+01\n3.9562708355207996e+00\n-1.5686791742429951e+00\n-2.0503914658179198e+01\n-2.1161796934614130e+00\n3.5782892683792977e-01\n-2.2806298394519015e+01\n1.1867002183313118e+00\n-1.0435312059546535e+00\n-2.0507579936396841e+01\n-9.9505298381129959e-01\n-5.0173399477782032e-01\n-2.1613588942696481e+01\n-4.3942813081507526e-01\n-7.5100377322943179e-01\n-2.1357438784111398e+01\n-1.6047871892541317e+00\n-4.7095463807870058e-01\n-2.1805211908149033e+01\n4.8342718420642656e+00\n-2.5275271575247711e+00\n-2.0674753417578859e+01\n2.2611309460197121e-01\n-1.7155823877634140e+00\n-2.0383159238261591e+01\n1.6392645901895606e+00\n-2.1373051572135502e+00\n-2.0360617281270102e+01\n2.2398816577944567e+00\n-2.6218579646032798e+00\n-1.9886138649734324e+01\n-3.8571496459250154e+00\n-7.4178250674529789e-01\n-2.4202026872287082e+01\n-3.3353463775289236e+00\n-1.0348983478023837e+00\n-2.3078055026114498e+01\n-2.8378063525375792e+00\n-1.3549260183641645e+00\n-2.1880224534732793e+01\n2.1898162040029017e-02\n-2.4076072081839968e+00\n-2.0445690673682432e+01\n-5.8868902856052818e-01\n-2.3792841994031031e+00\n-2.0341863061393795e+01\n4.2880595482486648e+00\n-4.0527027499028723e+00\n-2.1566133167335515e+01\n-1.7379644945137416e+00\n-2.1882417685318871e+00\n-2.0998056110922857e+01\n-2.7040559641164510e+00\n-2.0795833342835408e+00\n-2.2426663661666566e+01\n4.2702935493863929e+00\n-4.5280306576985714e+00\n-2.1960545780557865e+01\n4.4151090206639303e+00\n-4.5461860481293135e+00\n-2.2292530530011842e+01\n-1.2216303708722156e+00\n-3.4123999907524336e+00\n-2.1373392421005061e+01\n7.0114325445922610e-01\n-4.0459592022493469e+00\n-2.0238594105997272e+01\n-1.7523994235801574e+00\n-3.3088169395147422e+00\n-2.2069430744792399e+01\n-2.5319764541428982e+00\n-3.1190154546875113e+00\n-2.3067935592498443e+01\n-3.2203185527236617e+00\n-2.9717038114234122e+00\n-2.4582910288312505e+01\n2.2852204693625691e+00\n-4.7905919263112695e+00\n-2.1594585316316156e+01\n2.2852204693625691e+00\n-4.7905919263112695e+00\n-2.1594585316316156e+01\n1.7073969738900119e+00\n-4.6227726527263444e+00\n-2.1282368092662789e+01\n1.4610936513904080e+00\n-4.6930983341633770e+00\n-2.0922660187738810e+01\n1.4610936513904080e+00\n-4.6930983341633770e+00\n-2.0922660187738810e+01\n3.1647149577749158e+00\n-5.2954638502266684e+00\n-2.1871691542858159e+01\n-2.0563079773813104e+00\n-3.7633431509378976e+00\n-2.2607356058404097e+01\n-4.4371106031594110e-01\n-4.5841790364242678e+00\n-2.2461745522313684e+01\n-7.7916832500906894e+00\n-2.6220645228474648e+00\n-2.9425050511333367e+01\n-7.7924379758685429e+00\n-2.5652410662766103e+00\n-2.8935862888203129e+01\n-7.2374456018183650e+00\n-4.1818522899128086e+00\n-2.6452033271785599e+01\n5.9574162261084573e-01\n-6.7252633238017214e+00\n-2.2574979037112854e+01\n9.0479905691974383e-01\n-6.9384702365685396e+00\n-2.2505396533854004e+01\n3.3462804656375842e+00\n-8.3455129559566466e+00\n-2.1334059201567257e+01\n-5.7313168479624048e+00\n-6.0381786937601349e+00\n-2.4367352835548289e+01\n-5.0611623227272400e+00\n-6.9398586774847031e+00\n-2.2959683496466145e+01\n2.0045523336216724e+00\n-9.0114185441567596e+00\n-2.0281688194461502e+01\n2.2136364545438871e+00\n-9.8055912773103646e+00\n-1.9484849889040920e+01\n-4.1414510339442021e+00\n-8.0786223309800889e+00\n-2.2041550095099055e+01\n-4.0523336373489434e+00\n-8.1579125874492338e+00\n-2.1931283061877497e+01\n-3.1636957131014927e+00\n-9.5305078068244669e+00\n-1.9442085332600445e+01\n-4.5642468907467491e+00\n-9.2883147809719073e+00\n-2.0637833497150499e+01\n1.5450514783625216e+01\n1.7701432366135545e+01\n-3.1832666086122913e+01\n2.7057509423364163e+01\n3.4186722534696827e+01\n-6.2159238950074723e+01\n9.1292366472975779e+00\n2.8032777703950387e+01\n-4.8313368445076811e+01\n9.1292366472975779e+00\n2.8032777703950387e+01\n-4.8313368445076811e+01\n1.7067354298882066e+01\n2.7342930328086286e+01\n-4.9407531670367206e+01\n1.2236187056025653e+01\n1.6919219079982092e+01\n-3.1140993824947909e+01\n1.4657318966555298e+01\n2.9488488686917449e+01\n-5.3003600615450594e+01\n2.3900377674372115e+00\n2.5238105425251796e+01\n-4.3781239849165154e+01\n1.2692095472664326e+01\n1.6264184520968254e+01\n-3.1308744778391898e+01\n1.4473317518908880e+01\n1.2752343013335617e+01\n-2.5785751564972863e+01\n7.0923236806342294e-01\n2.3939259674703212e+01\n-4.3126338445346228e+01\n1.0786735525599083e+01\n2.0294884300572413e+01\n-4.0249028211582974e+01\n1.4614075606802933e+01\n2.4818109795139801e+01\n-4.9702507309880879e+01\n1.0994023282075398e+00\n2.2898655800779096e+01\n-4.5005821482333140e+01\n6.0640924360529702e+00\n2.3916765350790484e+01\n-4.8689476689628258e+01\n1.9963656730207067e+01\n2.7497998975824011e+01\n-6.0212895902087617e+01\n1.3119793045378962e+01\n9.8752760966709481e+00\n-2.4606395745829044e+01\n1.2068814195060593e+01\n2.4768558743532864e+01\n-5.4788055317944441e+01\n1.6758845744969488e+01\n2.5830381934356190e+01\n-6.1092259126019961e+01\n1.5111236923381707e+01\n2.3804841889618974e+01\n-5.6436273776914781e+01\n8.8435090352168846e+00\n2.2111241696096748e+01\n-5.1022110013081303e+01\n1.3147106198974242e+01\n2.5149205624984262e+01\n-5.9141529569487560e+01\n1.5012229744753602e+01\n2.4823287433311297e+01\n-6.0005331562250113e+01\n1.3496751630278279e+01\n8.3029560294623739e+00\n-2.5333044726098226e+01\n3.2829736881337843e+00\n2.2218194089265712e+01\n-5.1652080876238372e+01\n2.4021378114744532e+00\n2.0271936668912080e+01\n-4.7009896285413383e+01\n4.8928881571114893e+00\n2.1352513987700686e+01\n-5.3602687055888332e+01\n1.2229265049897050e+01\n7.0311513700251522e+00\n-2.4654854526403511e+01\n1.2229265049897050e+01\n7.0311513700251522e+00\n-2.4654854526403511e+01\n-1.4549320509697574e+00\n1.9124988705016804e+01\n-4.6584607529189000e+01\n1.2409704822949795e+01\n8.5092558751291811e+00\n-2.8256822390416477e+01\n1.2963588910233002e+01\n9.8886882799843310e+00\n-3.2942198470889245e+01\n1.2783846637344929e+01\n1.1086704935438309e+01\n-3.6192544567266992e+01\n1.1543555660574283e+01\n1.3236181594509132e+01\n-4.0949453039852685e+01\n1.7852032096429994e+01\n1.7749793780811750e+01\n-5.6236728698179760e+01\n1.2425295880014181e+01\n6.8601000380243429e+00\n-2.6225353684880755e+01\n-6.4698584531313427e-02\n1.9133809886999781e+01\n-5.1424090993141199e+01\n-1.1672447215337887e+00\n1.8928870867053540e+01\n-5.0551897072897425e+01\n1.4027688332625699e+01\n8.9586726017533280e+00\n-3.3670175009121003e+01\n8.2199824896256661e+00\n7.9219177051725884e+00\n-2.9471688753180484e+01\n1.2044353959891447e+01\n8.7382366848531792e+00\n-3.5574497875671497e+01\n1.3536078878059650e+01\n9.5108531088550823e+00\n-3.8551868039418018e+01\n1.2181752241572083e+01\n6.2056918317777106e+00\n-2.8757380837768530e+01\n1.3663379726516085e+01\n8.2631087693508860e+00\n-3.7414344029184143e+01\n1.3798052331225486e+01\n7.1984633189426876e+00\n-3.6655039802539648e+01\n1.3556024065677985e+01\n6.8063908206628243e+00\n-3.6129501977500077e+01\n1.2671381386503018e+01\n4.5777304953195292e+00\n-2.8764054274497990e+01\n1.3935674714697324e+01\n8.1215439108022949e+00\n-4.1156511804412702e+01\n1.3497441069531225e+01\n6.6723096859096511e+00\n-3.6319446969839099e+01\n1.4040035385163035e+01\n7.8289747610190910e+00\n-4.0828813685989211e+01\n1.4008689309994709e+01\n7.8245653741099410e+00\n-4.1146298969851735e+01\n-3.3967755977878467e+00\n1.4387806701777221e+01\n-5.0215107855243211e+01\n6.3334249733178511e+00\n9.0155358717465237e+00\n-3.9205816750331728e+01\n1.3018383617427007e+01\n4.1288337192788225e+00\n-2.8862543990797036e+01\n-9.9664633749032150e-01\n1.4247922448451176e+01\n-5.1894730619434824e+01\n5.0220211444295124e+00\n9.6899143614725194e+00\n-4.3839446286491075e+01\n1.4353068425868925e+01\n2.5331360228886823e+00\n-2.6632745620429635e+01\n4.2349152145556301e+00\n9.9935747648528945e+00\n-4.4652138448476833e+01\n3.7312339016221965e+00\n9.1683461289503327e+00\n-4.4847539672290303e+01\n1.2894286842461939e+01\n3.0887279483043333e+00\n-3.1307969715546509e+01\n1.4752275712200120e+01\n1.5238540907022891e+00\n-2.7582830107916315e+01\n1.3492742506917352e+01\n1.5089925069381780e+00\n-2.9605806330092854e+01\n1.2408460918934797e+01\n5.0269497103927419e-01\n-2.6133504902484489e+01\n1.0805028586027562e-01\n2.3380663622583073e+00\n-2.1594911688896694e+01\n1.2269061273806731e+01\n-2.0717129605466383e-01\n-2.5767653604074550e+01\n1.5847137702955192e+00\n1.5783709231281273e+00\n-2.0685666118123866e+01\n1.2279876446000500e+01\n-2.8605613550016368e-01\n-2.6652018208609427e+01\n-1.4642453137745364e+00\n2.7612686210601485e+00\n-2.3777132721740873e+01\n1.3385875356726210e+01\n1.7940769752054653e-01\n-3.1337149243617912e+01\n-2.7186384300899502e+00\n5.9929195151321464e+00\n-4.0700330303010176e+01\n1.2103346060549971e+01\n-8.4848695536594787e-01\n-2.5774089690385267e+01\n1.7449115381456364e+00\n7.8579908382728858e-01\n-2.0358161928443653e+01\n1.4753637988141238e+01\n-1.1290918244953754e+00\n-2.9491166626610937e+01\n-4.0972777348812244e+00\n5.4827643982084862e+00\n-4.0511660188488413e+01\n1.6688485429761568e+00\n2.1887754904550830e-01\n-2.0281850952803786e+01\n-3.1656158857266132e+00\n4.0235289773374490e+00\n-3.7758561196652863e+01\n-7.3115479327692823e-01\n4.3413130971832598e-01\n-2.1350125131614085e+01\n-2.0395428990297289e+00\n7.2076263976443100e-01\n-2.3324163836213447e+01\n-9.8364039760911889e-02\n-1.2556147597376227e-01\n-2.0969711895040515e+01\n2.2467606936689188e+00\n-8.8216498299662005e-01\n-2.0476396574171726e+01\n-9.9012442870426998e-01\n1.0015558286029087e-01\n-2.1675270051748303e+01\n1.2948857255392778e+00\n-7.7288248601716114e-01\n-2.0591840788611236e+01\n-8.6976854043927895e-02\n-5.4554549660537188e-01\n-1.8741783194413458e+01\n-1.7392316982057312e+00\n-1.0192940444839937e-01\n-2.2207877851910645e+01\n-1.5481607776014135e+00\n-2.2019890350284421e-01\n-2.2063614991029432e+01\n1.5912650878596349e-01\n-8.2689471178234542e-01\n-2.0801844228612474e+01\n-1.3912338946904637e+00\n-4.5402474073492494e-01\n-2.1747241957969845e+01\n1.3064887000629619e+00\n-1.6538485953397026e+00\n-2.0133680924499206e+01\n3.8817090579305957e-01\n-1.3846483757076735e+00\n-2.0713020042614549e+01\n-8.0726311822357866e-01\n-1.0182564171786246e+00\n-2.1104647806679804e+01\n-1.7787707342930454e+00\n-1.4617040675066422e+00\n-2.1731348255568143e+01\n-1.9202067063588915e+00\n-1.5046974207962636e+00\n-2.1443676979582037e+01\n-1.9202067063588915e+00\n-1.5046974207962636e+00\n-2.1443676979582037e+01\n4.0798996683760631e+00\n-4.4800588173444158e+00\n-2.1796395647306781e+01\n4.4521970214676871e+00\n-4.6508495099232929e+00\n-2.2216308143844383e+01\n3.8188596510272870e+00\n-4.4952465550503966e+00\n-2.1722257071044119e+01\n-2.8467983294051535e-01\n-3.2111649541765437e+00\n-2.0690164171358298e+01\n8.9170479650818679e-01\n-4.2657382509821922e+00\n-2.1096572871984993e+01\n-1.7922662157977078e+00\n-3.8801584793940833e+00\n-2.2680379462536191e+01\n2.6733543695343149e+00\n-5.3880207803725799e+00\n-2.2269023655252528e+01\n2.7773614683755272e+00\n-5.7508824600967765e+00\n-2.0673445747957032e+01\n-7.0879619526658235e+00\n-2.9178558019604872e+00\n-2.9076704077925335e+01\n8.9485876971423406e-01\n-5.3601103737644618e+00\n-2.2024769923833905e+01\n-8.1564256126278707e+00\n-3.2349756618725642e+00\n-2.8482823347217042e+01\n-1.8877026271274262e+00\n-4.8321279624141260e+00\n-2.0893439625072773e+01\n-7.2266204960209022e+00\n-3.8733537230809958e+00\n-2.7493408914387839e+01\n-8.2459062213369521e+00\n-3.8729231897956966e+00\n-2.8009402820493374e+01\n-6.7461617084928198e+00\n-4.8470342188021887e+00\n-2.5962848748004461e+01\n-5.4745964949640049e+00\n-5.8781561440565824e+00\n-2.4567938618963360e+01\n-6.9534802664049709e+00\n-5.6665009651784333e+00\n-2.5468304303482658e+01\n-6.0705477231418667e+00\n-5.9501966931980954e+00\n-2.4537791029913524e+01\n-6.7321454282918083e+00\n-6.2060435675853460e+00\n-2.3862675786509776e+01\n-3.4946872834343621e+00\n-7.3607676632945740e+00\n-2.2497691264305388e+01\n-5.6204218843584854e+00\n-6.9147335691316316e+00\n-2.2970303350451271e+01\n-4.0602343102783296e+00\n-7.5138688338592585e+00\n-2.2270846461247164e+01\n3.3642566372244929e+00\n-1.0142135740991526e+01\n-1.8913955455531550e+01\n-4.8333948199157666e+00\n-8.2060319522728893e+00\n-2.1193572777772896e+01\n-5.1588252723932593e+00\n-8.7503111435318548e+00\n-2.1345150070931986e+01\n-3.0349520299550097e+00\n-9.3156253854685804e+00\n-2.0065572616465275e+01\n-3.1450758529020368e+00\n-9.4531603149817069e+00\n-2.0356103296205898e+01\n-4.8246134256203668e+00\n-9.0705797616088102e+00\n-2.0925091137247730e+01\n-3.1494457757892698e+00\n-9.4902862367407632e+00\n-1.9869940722386591e+01\n-4.6903660651434578e+00\n-9.2093037371972564e+00\n-2.0756469389517097e+01\n1.4097605559787413e+01\n1.8365780982096812e+01\n-3.3542514117878589e+01\n1.1757361044168610e+01\n2.0423813194452389e+01\n-3.8967810158761345e+01\n1.3610747411785059e+01\n1.2900927867887008e+01\n-2.6039091093998689e+01\n1.8801068858037793e+00\n2.4725808593032493e+01\n-4.3833714983778592e+01\n1.6878104602674735e+01\n2.6524983770068033e+01\n-5.2422875345787368e+01\n1.5199492281223758e+01\n1.1214558910387620e+01\n-2.4422940270565775e+01\n1.4652081420528305e+01\n1.0444618762185174e+01\n-2.3700917849539767e+01\n1.3787538051757499e+01\n1.4931589883960186e+01\n-3.1914935148602563e+01\n1.8895394309149832e+01\n2.5700549365873758e+01\n-5.3885156564844145e+01\n2.2132281483006135e+01\n2.7643514502107088e+01\n-6.2638210232744783e+01\n-1.6161244552965592e+00\n2.1679467945843232e+01\n-4.3512551675144977e+01\n2.3063067003264194e+01\n2.6551385277711045e+01\n-6.2363408399744124e+01\n2.4391881362005478e+01\n2.7798748582592420e+01\n-6.4761832026376908e+01\n1.3924933101149827e+01\n2.3121915276179628e+01\n-5.5945497051305232e+01\n1.2588746178090105e+01\n7.9340046735603229e+00\n-2.5212663424894242e+01\n3.1161249951452613e-01\n1.9363273777797783e+01\n-4.5692674778390220e+01\n9.2128882200943529e+00\n2.2123979405599350e+01\n-5.6567846044571198e+01\n8.6847340171838994e+00\n2.1250892095722680e+01\n-5.4176654482075669e+01\n1.3082983647752709e+01\n7.7219249981581290e+00\n-2.6494805676408205e+01\n9.9710530321585744e-01\n1.9225888292307697e+01\n-4.9564238251223216e+01\n1.4509799286296840e+01\n9.3613466008933415e+00\n-3.3834602363893467e+01\n1.3932204252529770e+01\n9.0401829108717635e+00\n-3.3001962247533633e+01\n-9.1147170415611167e-01\n1.6762977258953512e+01\n-4.8577437705071659e+01\n1.3814311216666573e+01\n9.4106280077875404e+00\n-3.8121770040905268e+01\n1.2914534244964520e+01\n5.2464996277542451e+00\n-2.8186913534408220e+01\n1.3604381873841175e+01\n7.6453643138117320e+00\n-3.7171582217162275e+01\n1.4163966380161664e+01\n3.2292336724817421e+00\n-2.6865038022089660e+01\n1.3561876220624193e+01\n6.3368813443854348e+00\n-3.7449264494704003e+01\n2.8648936725661054e+00\n1.0866534751314614e+01\n-4.5680743364850613e+01\n5.2601212121495227e+00\n8.8752205897371255e+00\n-4.4336422959927731e+01\n1.3168050513447225e+01\n2.6456112324997645e+00\n-3.2065166792061419e+01\n1.3112767578096124e+01\n2.0739994777689770e+00\n-3.0692549364974063e+01\n3.1978166657053149e+00\n2.1091901348540718e+00\n-2.1284595756939630e+01\n1.8991763178189371e+00\n1.8239052533125841e+00\n-1.8721188312350996e+01\n1.3352490950232395e+01\n1.1768725656855230e+00\n-3.0654353559066184e+01\n2.6935345785489004e+00\n1.5461711514922274e+00\n-2.0872423728980834e+01\n1.4033463835057036e+01\n4.4391728912626571e-01\n-2.9363060371257287e+01\n8.8229958763451477e-01\n1.9388434645690213e+00\n-2.1019085076394706e+01\n1.2264095928671638e+01\n-6.3263354671580985e-01\n-2.5374646163533239e+01\n2.4184739208720609e+00\n9.0718973015203974e-01\n-2.0490430313325870e+01\n-2.5107500096306081e+00\n5.5142387511348439e+00\n-4.0481557951571865e+01\n3.2944564633774620e+00\n9.9429515892773893e-02\n-2.1143224901610761e+01\n-3.7818349526076697e-02\n9.4088036306861389e-01\n-2.0891578183627960e+01\n2.7919798186854701e+00\n-4.6594406116095603e-02\n-2.0403606795834406e+01\n2.3594092460368632e+00\n-3.0626803907927858e-01\n-2.0411397750792748e+01\n-2.4298265966373904e+00\n1.4512062086196034e+00\n-2.4305994929274046e+01\n-2.4099628884063802e+00\n6.5780838923511298e-01\n-2.3301794677848687e+01\n-2.9649858059398229e+00\n9.4565263987124515e-01\n-2.4691908076291785e+01\n-2.9649858059398229e+00\n9.4565263987124515e-01\n-2.4691908076291785e+01\n2.2916387487536345e+00\n-1.0503184002819250e+00\n-2.0498677076687155e+01\n2.2916387487536345e+00\n-1.0503184002819250e+00\n-2.0498677076687155e+01\n-1.8217147139172980e+00\n2.8049170234829529e-01\n-2.2729615168335741e+01\n-1.4913027390131928e+00\n2.4882554944177158e-02\n-2.2267250995185243e+01\n-1.6702195907180379e+00\n9.5357047404033460e-02\n-2.2450426922790395e+01\n-6.8737224130364882e-01\n-3.7478469902745698e-01\n-2.1467688964067328e+01\n1.8685313177216343e+00\n-1.2580689075188569e+00\n-2.0551290419716214e+01\n-1.7271116456134279e+00\n-6.0571492216403988e-01\n-2.1676078305942614e+01\n-6.1024331013368893e-01\n-9.6955565373286978e-01\n-2.1190118003578014e+01\n1.5338359303720135e+00\n-1.9066309981324525e+00\n-2.0204240253546214e+01\n4.3487419204220812e+00\n-2.8977829056156432e+00\n-2.0419148631579624e+01\n-1.3855211442498565e+00\n-1.3999967292303204e+00\n-2.1582874802521658e+01\n3.1959452846777823e+00\n-3.0164744831713675e+00\n-1.9646613312621387e+01\n-3.3596082685960718e+00\n-9.1880623913649151e-01\n-2.3064646170454385e+01\n-1.0327925084544280e+00\n-1.7478125416769970e+00\n-2.1302520948406695e+01\n4.5236742723071588e-01\n-2.3556245951462103e+00\n-2.0814490004602749e+01\n2.9835846089286711e+00\n-3.3984811812255522e+00\n-2.0133015598199254e+01\n-2.7083494163019988e+00\n-1.7542464667942623e+00\n-2.1952100423071517e+01\n3.0172886038305591e+00\n-4.2858179444815345e+00\n-2.1341313037251339e+01\n4.3471440897846252e+00\n-4.8870844555574147e+00\n-2.2465922918839151e+01\n-7.6274771857362547e+00\n-2.0959223283878607e+00\n-3.0705318941307262e+01\n-7.6373081462176016e+00\n-2.0902077836175632e+00\n-3.0424835953795704e+01\n-3.2647799008725981e-01\n-4.7384031796583113e+00\n-2.2673575375183894e+01\n-8.0755961900290760e+00\n-2.5234716430123441e+00\n-2.9272251750163829e+01\n-1.4235642800342991e+00\n-4.6937087803074924e+00\n-2.0620666800103582e+01\n-5.4177854600612969e+00\n-6.0106639437083986e+00\n-2.4458371480155407e+01\n-6.3524319349228859e+00\n-5.8786133164179137e+00\n-2.4881804455903843e+01\n4.3698266388319835e+00\n-9.4372453873653761e+00\n-1.9719133084888277e+01\n1.4498860805387012e-01\n-8.8467076596853538e+00\n-2.0835507916333160e+01\n3.8018049825539415e+00\n-1.0160861705789914e+01\n-1.8881387168987441e+01\n4.0356256980997490e-01\n-9.4150026334202561e+00\n-1.9911558353437020e+01\n8.5082192832482739e-01\n-1.0150643276902041e+01\n-1.8600095532267375e+01\n-3.6843391492375179e+00\n-9.2608858807381065e+00\n-2.0605758250167263e+01\n1.3072085986877054e+01\n1.4959930540113685e+01\n-3.0658370920258253e+01\n2.3809864957217016e+01\n2.9615295876905215e+01\n-6.2599914738185610e+01\n-2.8494201143173985e+00\n1.8469714853873484e+01\n-4.5647407851701225e+01\n1.3703598675068401e+01\n1.0147968686851881e+01\n-3.6770257014632847e+01\n-1.8202993143621082e-01\n1.6693299535443970e+01\n-4.9061470703342081e+01\n5.2015570823915214e+00\n9.8709968182817658e+00\n-4.3716748217651137e+01\n1.2806386917845654e+00\n6.7169921562665291e-01\n-2.0392956847676626e+01\n-2.1256656884008494e+00\n2.0707428054582744e+00\n-2.3627245996949753e+01\n-1.8744443246035130e+00\n1.2864611495260061e+00\n-2.3093151415820476e+01\n-8.9896020658334030e-01\n7.3938761710126444e-01\n-2.1613108031824876e+01\n-5.8620374434381395e-01\n1.6210969028194563e-01\n-2.1189609358480169e+01\n-3.1424840441502699e-01\n-7.9010398530536052e-01\n-2.1197859648112860e+01\n3.0171358646250335e+00\n-2.6324517240878889e+00\n-1.9851098267237859e+01\n2.3075250201071764e+00\n-2.5226929348702658e+00\n-1.9627245600837124e+01\n-9.3495790500649256e-01\n-1.8190019235792425e+00\n-2.1245301721749076e+01\n-1.8689496861193622e+00\n-1.6141509101515261e+00\n-2.1568221905293395e+01\n3.0872537551745625e+00\n-3.6236513532407932e+00\n-2.0833283622935340e+01\n4.7027250022291418e-02\n-3.8090946822621254e+00\n-2.0932587839079158e+01\n-3.2656621976514582e+00\n-3.3046360474326804e+00\n-2.4957325765000896e+01\n-2.5071401922782188e+00\n-3.8617303757592567e+00\n-2.4040843833539686e+01\n-6.5030326238083136e+00\n-5.0752898067751442e+00\n-2.5708883396304913e+01\n-7.4229412863297828e+00\n-5.0008730129249317e+00\n-2.6004502913504705e+01\n-3.1360677165319961e+00\n-7.5805431146478819e+00\n-2.2301094198899786e+01\n-5.3604054397495497e+00\n-7.1720130446341166e+00\n-2.3225819353920450e+01\n-1.2409745642360017e+00\n1.8999220254693679e+01\n-5.0885655395431328e+01\n-1.9439517067831895e+00\n1.7108158280179278e+01\n-4.7988719223794533e+01\n1.1576370396035312e+01\n6.6910262968558847e+00\n-2.8534831803579788e+01\n1.2628952318193067e+01\n4.7365497264662029e+00\n-2.7693935889425870e+01\n1.2447251952230205e+01\n4.5209302051588329e+00\n-2.7774781473543914e+01\n1.5806047521662763e+00\n4.1420437773670820e+00\n-2.3837562688742491e+01\n-2.3737311947113580e+00\n3.7239825079171514e+00\n-2.8437725372024129e+01\n-2.6966372402776155e+00\n3.4890091166071797e+00\n-2.8196342812551453e+01\n-2.5251967972461107e+00\n3.3273836138392503e+00\n-2.7971135212586681e+01\n1.1194162157650025e+00\n8.7495157175474636e-01\n-2.0411820811894597e+01\n-2.9706990751500038e-02\n-1.8566958951357054e-01\n-2.0557433857946918e+01\n2.1294226351751919e+00\n-1.8408578659522707e+00\n-2.0014628777919075e+01\n1.2841487275865131e+00\n-1.8526576516072764e+00\n-2.0037802680868985e+01\n5.5179009126178458e-01\n-1.7106379125512037e+00\n-2.0241042078038991e+01\n-8.6909165404879785e-01\n-1.6983772506136354e+00\n-2.1132075085819437e+01\n2.3929777562111427e+00\n-2.8323284760396885e+00\n-1.9770719880290134e+01\n-6.8497242107358558e-01\n-2.0134339684075648e+00\n-2.0922343980957695e+01\n4.9150685931680274e+00\n-4.3893679458588428e+00\n-2.1939024597859198e+01\n4.5852371038065662e+00\n-4.3991231366727126e+00\n-2.2162561941915790e+01\n4.5852371038065662e+00\n-4.3991231366727126e+00\n-2.2162561941915790e+01\n2.1100179625468414e+00\n-4.4842456559047763e+00\n-2.0989593356401961e+01\n2.8042963789819431e+00\n-4.9621171235219608e+00\n-2.1427950428329009e+01\n3.0202114772531643e+00\n-5.0602615693576398e+00\n-2.1960946408862501e+01\n-3.2410510021260315e+00\n-3.4212790753889575e+00\n-2.4791140778307863e+01\n3.0020719070721724e+00\n-5.4496979195471011e+00\n-2.2125280364258071e+01\n-2.7262711433187521e+00\n-3.7642276596539253e+00\n-2.4148494267830408e+01\n-7.3692878293602497e+00\n-4.6248419782910926e+00\n-2.6406075546965578e+01\n-7.6018326845899784e+00\n-4.7786723292581481e+00\n-2.6460444939033955e+01\n-4.5515347619747235e+00\n-6.2648350276902285e+00\n-2.4418452217217396e+01\n-5.7879582638018796e+00\n-5.8824820680961469e+00\n-2.4516351171622826e+01\n3.9359995187888779e+00\n-9.4960836701479359e+00\n-1.9867653945105648e+01\n4.2083311672475832e+00\n-9.8246303558988402e+00\n-1.9378833702480765e+01\n1.3756722350152872e+01\n1.7776120215746570e+01\n-3.4315566294739156e+01\n2.1876757813157141e+01\n3.0225079149338196e+01\n-5.9997667224586515e+01\n8.4990169896802872e+00\n2.5207568581684786e+01\n-5.0724710738695713e+01\n1.4682164108949106e+01\n1.2607572114553879e+01\n-3.1976872147104896e+01\n9.6875526069437470e+00\n2.1750106698307409e+01\n-5.3259737573881772e+01\n1.2907409459936028e+01\n5.4019455633162705e+00\n-2.6121489671150552e+01\n1.2932016845388112e+01\n5.2739410182279789e+00\n-2.8878142664603466e+01\n5.7749971779807154e+00\n1.1021831838120359e+01\n-4.7267042937376125e+01\n-1.8589733108122588e+00\n3.5999126377040080e+00\n-2.7570799282430652e+01\n9.7067230607075428e-01\n3.7790678577693276e-02\n-2.0405860131416404e+01\n2.0871809537403507e+00\n-1.6485535488614009e+00\n-2.0128665650059162e+01\n-7.2879162958974204e+00\n-2.6420158458611982e+00\n-2.9234714861715791e+01\n-3.3649644876540035e+00\n-4.1087458610016139e+00\n-2.4253958969043818e+01\n-4.2856672899738975e+00\n-6.9918490369084818e+00\n-2.3550123689191874e+01\n-6.2908475368031320e+00\n-6.4482240175691308e+00\n-2.3807299115862090e+01\n9.5314869830707796e+00\n2.7940013080602910e+01\n-4.9132836804084825e+01\n4.6307322735199579e+00\n1.0427091792898256e+01\n-4.5100325503913773e+01\n4.8206786539033153e-01\n9.4385412800516821e-01\n-2.0665992640312727e+01\n2.8843209098940790e+00\n-3.0852625061716297e+00\n-1.9703858695660205e+01\n2.2633196380218013e+00\n-4.6836636647904122e+00\n-2.1045736404998237e+01\n-2.0824339359346871e+00\n-3.4950765832488084e+00\n-2.3107606815825125e+01\n-6.9954377352977160e+00\n-4.8616259217587441e+00\n-2.6240068318888969e+01\n-6.9954377352977160e+00\n-4.8616259217587441e+00\n-2.6240068318888969e+01\n-7.0355399005732737e+00\n-5.1400457197513374e+00\n-2.5589177864433825e+01\n2.0356829020779255e+01\n2.9909141910540335e+01\n-5.8193601633769987e+01\n6.1550652014080445e+00\n2.5805747657583154e+01\n-4.7632568398817476e+01\n1.3545101317401027e+01\n1.4947276822450620e+01\n-3.2293782425934204e+01\n1.4481904609865104e+01\n1.3328489650377948e+01\n-3.2978640339046436e+01\n-2.3911505362561529e+00\n3.2077992751304456e+00\n-2.7093921965056289e+01\n5.3271713024604178e-02\n4.6042973522135566e-01\n-2.0951689342010162e+01\n4.7250364058491137e+00\n-9.9098152865527167e-01\n-2.0212674729577007e+01\n1.9240923089969346e+00\n-3.1437037520641260e+00\n-1.9813069692482969e+01\n-1.0468464580775367e+00\n-2.3703341533656141e+00\n-2.0269239460065297e+01\n-4.4091794630445191e+00\n-7.2955742870948121e+00\n-2.3158021403980879e+01\n1.4350446496846484e+01\n2.3978514034958160e+01\n-6.1858467616963559e+01\n1.4350446496846484e+01\n2.3978514034958160e+01\n-6.1858467616963559e+01\n1.3903413520737697e+00\n1.8996788933557404e+01\n-5.1401757367027045e+01\n-4.9087260975824776e-01\n8.3096344947912038e-01\n-2.1251513264628354e+01\n2.8309084922574344e+00\n-1.8860604431561641e+00\n-1.8523611764336916e+01\n1.0098215463806481e+00\n-2.8198167377485492e+00\n-1.9772595565064108e+01\n-2.2753399777497177e-01\n-1.8788564400111112e+00\n-2.0934652623313443e+01\n-2.2753399777497177e-01\n-1.8788564400111112e+00\n-2.0934652623313443e+01\n7.8391840990741501e-01\n1.8073241928854095e+01\n-4.6104094218746908e+01\n-6.1728240653611088e+00\n1.6617478953683527e+01\n-4.0891931430313718e+01\n-1.4456838018867944e+00\n1.8576146166352473e+01\n-4.7201830466822791e+01\n-1.0748808992340562e+01\n1.5664511730016713e+01\n-3.7408588168549493e+01\n-6.0036138738610410e+00\n1.6487948813162532e+01\n-4.1356467056041744e+01\n-3.9747879357670834e+00\n1.6939863716525714e+01\n-4.3140281662803233e+01\n-3.9747879357670834e+00\n1.6939863716525714e+01\n-4.3140281662803233e+01\n-3.3656244713840584e+00\n1.7707820487148002e+01\n-4.5400205868578851e+01\n1.2633213905837181e+01\n1.1000075397034108e+01\n-3.4880882410042105e+01\n-4.1668806319986045e+00\n1.6326698786506206e+01\n-4.3934432221367977e+01\n1.1606222478665057e+01\n7.8897760386757909e+00\n-2.6659884100698171e+01\n1.3503680269742441e+01\n9.6732124605851286e+00\n-3.2322932738142541e+01\n-5.7397990219152861e+00\n1.6640273709881473e+01\n-4.4945900555390629e+01\n-8.8132925780733089e+00\n1.4840538072694745e+01\n-4.0735045487612631e+01\n1.5254173131291909e+01\n7.4380183297122553e+00\n-2.8348943676751755e+01\n-8.1143685797681187e+00\n1.5155409655855600e+01\n-4.2095293297710093e+01\n-5.9738763132640145e+00\n1.7147251755019393e+01\n-4.8636434094246212e+01\n-3.4870315219141013e+00\n1.7057838814480309e+01\n-4.9436830296868663e+01\n1.2037166495244142e+01\n6.7482253655976923e+00\n-2.5670463128212290e+01\n1.6667868946612281e+00\n1.8349221294916578e+01\n-5.5054256821125925e+01\n1.5767174921708634e+01\n1.2793618840384291e+01\n-4.4678860908025939e+01\n-8.9407320102529599e+00\n1.5057813161997144e+01\n-4.2034089433071330e+01\n4.1641131795609017e+00\n1.7414770644800228e+01\n-5.4486737375178848e+01\n5.1492782256527718e+00\n1.9018158397223392e+01\n-6.0213248622403697e+01\n1.3462826476128287e+01\n8.5730522754231018e+00\n-3.3139177632199399e+01\n-7.1518873818859969e+00\n1.4566800384933897e+01\n-4.3633559996956357e+01\n-3.5154437934095903e+00\n1.6358142937409983e+01\n-5.0772654984706691e+01\n-8.5713629622441108e+00\n1.3495587531818021e+01\n-4.1120860106274904e+01\n-8.5713629622441108e+00\n1.3495587531818021e+01\n-4.1120860106274904e+01\n-3.4520742674957590e+00\n1.6061199461614777e+01\n-5.1081379666507019e+01\n-1.3296427052315977e+01\n1.6118514597261271e+01\n-4.7289515055318475e+01\n-7.6548270733021750e+00\n1.5602792465605186e+01\n-4.8080606567168203e+01\n-3.7089615075167441e+00\n1.5971429831809974e+01\n-5.0952180941205270e+01\n-1.0264680943604672e+01\n1.3361774436186298e+01\n-4.0366030699821579e+01\n-8.2341413548162024e+00\n1.4221411724319228e+01\n-4.3699003102000489e+01\n-9.4647499276931999e+00\n1.3969350997169952e+01\n-4.2372934380896780e+01\n-1.1016979984597763e+01\n1.2765542212923105e+01\n-3.8316519801138703e+01\n-1.1173184312044532e+01\n1.2652292300333333e+01\n-3.7971947832464238e+01\n-1.0571725165947187e+01\n1.5067742923288069e+01\n-4.5575737223820497e+01\n-9.4811483259420672e+00\n1.3609691778553220e+01\n-4.2061691182046417e+01\n-1.5338010596310557e+01\n1.3808105840014827e+01\n-3.9509133276013628e+01\n-9.1636888033477568e+00\n1.3521511379223199e+01\n-4.2584488066282667e+01\n4.6598706914114416e+00\n1.4765693089190574e+01\n-5.1890681169477325e+01\n4.4746408270768709e+00\n1.4490153163218205e+01\n-5.1252631679018734e+01\n1.4988956760000024e+01\n8.9064592966971272e+00\n-3.8146959199020202e+01\n-1.0348367582640037e+01\n1.2537817944177204e+01\n-3.9451560953102394e+01\n-8.9786546421424624e+00\n1.2710176212854233e+01\n-4.0874121557989461e+01\n-7.9818785979901792e+00\n1.4129514828517086e+01\n-4.5861232101149277e+01\n-1.0292984967914572e+01\n1.4549253930865206e+01\n-4.6165993257500865e+01\n1.4423158082890973e+01\n9.0484101788256144e+00\n-3.9294415872648536e+01\n1.4423158082890973e+01\n9.0484101788256144e+00\n-3.9294415872648536e+01\n-8.7123907491296197e+00\n1.3151354667643888e+01\n-4.3083130888800454e+01\n-9.0482201152941428e+00\n1.3542701056146768e+01\n-4.4173242386588882e+01\n-1.3634587139683251e+01\n1.5195364880370002e+01\n-4.7625580503315433e+01\n6.2425598201313841e+00\n1.3361191928291385e+01\n-5.0615074138780223e+01\n-1.0220828711950267e+01\n1.3266361152303947e+01\n-4.2816879426614221e+01\n-1.2340194387643448e+01\n1.4429968636177055e+01\n-4.5564441848172066e+01\n-3.6087843829200583e+00\n1.4270113265471739e+01\n-4.9512036525408568e+01\n-1.4171663174472275e+01\n1.2732840256651748e+01\n-3.9496797268501552e+01\n2.4710880017174222e+00\n1.5187442161495616e+01\n-5.5432327405830463e+01\n-8.8777379963845551e+00\n1.2576933409379906e+01\n-4.2040244097852089e+01\n1.4314076097775047e+01\n1.1001294269636681e+01\n-4.7667577735166603e+01\n4.4818862822343797e-01\n1.3618077936096723e+01\n-5.0610389193857493e+01\n1.4243205272482044e+01\n8.6890227515771077e+00\n-3.9713256660544360e+01\n1.3582672843070224e+01\n7.3944369357084838e+00\n-3.5066089999580036e+01\n-1.3629064146859433e+01\n1.3230917976235736e+01\n-4.2630807064098100e+01\n-9.6392118923547052e+00\n1.2355685333559721e+01\n-4.1603412488894335e+01\n-3.6232150051593233e+00\n1.4504878891461038e+01\n-5.2033189902210843e+01\n-1.3821000952623191e+01\n1.2399939656890682e+01\n-4.0194199726883738e+01\n-1.3821000952623191e+01\n1.2399939656890682e+01\n-4.0194199726883738e+01\n-7.1464632990124679e+00\n1.2584008484089491e+01\n-4.4588806490696342e+01\n-1.3463957551934135e+01\n1.2372473423425715e+01\n-4.0509909894310049e+01\n2.0322325893242397e+00\n1.2390150884822951e+01\n-4.8662922675495160e+01\n7.3762156530504897e-01\n1.2837951011913663e+01\n-4.9695369895509607e+01\n-7.4390098445975781e+00\n9.2165229950487682e+00\n-3.3668801255678311e+01\n-1.0476140618570772e+01\n1.3979347127852861e+01\n-4.8319054010266179e+01\n3.8063764568481080e+00\n1.3299460934304374e+01\n-5.3012801307274025e+01\n-5.7904712460248344e+00\n1.2675352436167110e+01\n-4.6517335190499495e+01\n1.2389202878454288e+00\n1.2620306611741897e+01\n-4.9391046644715679e+01\n-7.0509750787631207e+00\n1.3063846531390041e+01\n-4.7328985019746504e+01\n2.9391115708008204e+00\n1.1752994525796566e+01\n-4.8039081308449099e+01\n1.2443470879656672e+01\n5.4128688323976109e+00\n-2.9179472339591150e+01\n2.4251127498027616e+00\n1.2385460244136135e+01\n-5.0092650650373855e+01\n2.2768148968914286e+00\n1.2128473155418114e+01\n-4.8739794102013221e+01\n2.0211408629939926e+00\n1.1737682777300462e+01\n-4.8135302918080193e+01\n1.8177993008577646e+00\n1.1682075257026606e+01\n-4.7967051835321001e+01\n1.4245915094495260e+01\n7.3159294833038393e+00\n-3.7886716591702033e+01\n1.3761799201055920e+01\n5.1580671145822405e+00\n-2.9573888082652697e+01\n1.3761799201055920e+01\n5.1580671145822405e+00\n-2.9573888082652697e+01\n-9.0095769939951265e-01\n1.2558779963213384e+01\n-4.9895527333768349e+01\n-1.0786160358666295e+00\n1.2112722867546230e+01\n-4.8637909779016191e+01\n-1.2467093315478042e+01\n1.0481530358929366e+01\n-3.6631448397573998e+01\n-3.5807672374628323e+00\n1.2284290945348843e+01\n-4.8715684696236075e+01\n-1.2004438069662230e+01\n1.0713367102704360e+01\n-3.8233377797557338e+01\n-1.2004438069662230e+01\n1.0713367102704360e+01\n-3.8233377797557338e+01\n-1.1773662671818203e+01\n1.0840747441328586e+01\n-3.8883310694865592e+01\n-9.4043778180791353e+00\n1.1538846231037125e+01\n-4.3039271600787472e+01\n-1.8505845528132421e+00\n1.1998537051980211e+01\n-4.8783043293589671e+01\n8.3393382399680183e-01\n1.1432916597345878e+01\n-4.7703424824803349e+01\n-1.8582821315532261e+00\n1.1903401963634304e+01\n-4.8799281684665914e+01\n-4.1119841230397016e+00\n1.2506293038965737e+01\n-4.9798772925031130e+01\n-4.0165233319040432e+00\n1.2042769241534105e+01\n-4.8435387790005123e+01\n-2.6602618598884220e-01\n1.1189433860733962e+01\n-4.7126341678255109e+01\n-1.1503064839876052e+01\n1.0769365959977748e+01\n-3.9379896262032354e+01\n-8.6051831340865412e+00\n1.2241684428194919e+01\n-4.7317616282779028e+01\n-8.3455156546657481e+00\n1.1573940094467966e+01\n-4.5002936019946290e+01\n-4.0673869350027303e+00\n1.2042112378897436e+01\n-4.9248860872939908e+01\n-1.2931942391438765e+01\n1.1855528587855170e+01\n-4.4114863955155933e+01\n7.9746042690392320e+00\n8.8211708694289825e+00\n-4.4024001938588569e+01\n-1.0394470963557445e+01\n1.1596427278364592e+01\n-4.4824975780459809e+01\n1.3798055166450714e+01\n2.7985743851925444e+00\n-2.3248606859915128e+01\n1.6567995440526396e+01\n3.5166448847276688e+00\n-2.7866958984050747e+01\n-7.6145054036767608e+00\n1.2328064360424531e+01\n-5.0390731175472816e+01\n-1.0439353412323138e+01\n1.2400554498575678e+01\n-4.9177790377212808e+01\n-3.6603828179062972e+00\n1.1037723925509953e+01\n-4.7463074490130225e+01\n-2.5742178626409657e+00\n1.1220778560103007e+01\n-4.8880636613270937e+01\n-1.3721703216642181e+01\n1.0454818149279815e+01\n-3.9508428412609923e+01\n2.5332355771426611e+00\n9.5021047256011748e+00\n-4.4642278600281976e+01\n-8.2508931587811549e+00\n1.1106922626231343e+01\n-4.5888816681429702e+01\n-4.1305042794725981e+00\n1.1282333530168195e+01\n-4.8827760535760639e+01\n-1.2419023388356308e+01\n1.0691554155295430e+01\n-4.1597901597538851e+01\n-1.0777380370602742e+01\n1.2189111874208010e+01\n-4.9033570253417956e+01\n-9.9814705048591676e+00\n1.1815230684732954e+01\n-4.7495550097874464e+01\n-1.2322162888057807e+01\n1.1181271847963203e+01\n-4.3666551070595233e+01\n-8.4353215907062147e+00\n1.1040804519551060e+01\n-4.6019083595436250e+01\n-1.0338595399731403e+01\n1.1811216001272049e+01\n-4.7710130132997264e+01\n-1.0338595399731403e+01\n1.1811216001272049e+01\n-4.7710130132997264e+01\n-1.6485070783776232e+00\n1.0400665711795066e+01\n-4.7412106269621908e+01\n-1.3961473844824773e+01\n1.0632521960349976e+01\n-4.1259267024824958e+01\n-1.1855615353654429e+01\n1.0932564872966823e+01\n-4.3459419599483979e+01\n-1.6169278448142343e+01\n1.1328158661998520e+01\n-4.2956578910919156e+01\n9.9048431921893627e+00\n7.4718936815211867e+00\n-4.2547381826439143e+01\n1.4473027141660888e+01\n6.1313125722112147e+00\n-3.9558132811245635e+01\n1.5689233897895694e+01\n3.4928889091873234e+00\n-2.8884377220126876e+01\n-5.8304405108587183e+00\n1.0476758709959400e+01\n-4.6138963677844721e+01\n-5.8304405108587183e+00\n1.0476758709959400e+01\n-4.6138963677844721e+01\n1.3760375450252608e+01\n2.9798731549007211e+00\n-2.5324324156284263e+01\n-6.6674637102615506e+00\n1.0631405648252965e+01\n-4.6396727880222400e+01\n-1.0641096234234049e+00\n9.5012972100374693e+00\n-4.5004237073047811e+01\n-1.0247174254784083e+01\n1.1831254776323703e+01\n-4.9427432521764011e+01\n2.8088963030431926e+00\n8.5788553944112174e+00\n-4.3702995411203695e+01\n-5.0143345828586252e+00\n1.0749794478499018e+01\n-4.8127622480030759e+01\n-1.1353447884474043e+01\n1.0127743341023312e+01\n-4.1475863462419447e+01\n-1.1431064108863980e+01\n1.0195771123890941e+01\n-4.1905297060431892e+01\n-5.3528069359784656e+00\n1.0489843806912587e+01\n-4.7228124660989202e+01\n-1.2968928991438124e+00\n9.3889550592783273e+00\n-4.4889996584504210e+01\n-1.2264565437436882e+01\n1.1917377957555940e+01\n-4.8949040477969071e+01\n-1.6967470550060284e+01\n1.0849747518280006e+01\n-4.1320088091504729e+01\n-1.2142484299062010e+01\n1.1868878354643648e+01\n-4.9006029890215430e+01\n-1.1855552448366270e+01\n1.1447080516001702e+01\n-4.6843447336496418e+01\n1.4531531454082774e+01\n3.2323892649206805e+00\n-2.7326577290846142e+01\n-1.1975508271465754e+01\n9.9740860047519746e+00\n-4.0893082693364036e+01\n-1.1619821157696418e+01\n1.1724855381599429e+01\n-4.8984640163780185e+01\n-1.1457689444947034e+01\n1.1444199445763850e+01\n-4.7386991230221305e+01\n-1.3657768954805583e+01\n9.8547931168336582e+00\n-3.9333756263541886e+01\n-1.2710438198124821e+01\n1.1785837908524174e+01\n-4.8837056558748223e+01\n-1.0912171465769836e+01\n1.1428462209712436e+01\n-4.8011412544649666e+01\n-6.7526085098436308e+00\n1.0186031550009472e+01\n-4.5789495643814874e+01\n-4.5850650958374848e+00\n9.7602135722906525e+00\n-4.5337206875124302e+01\n1.3995287075387399e+01\n2.5740642790278874e+00\n-2.4614859518295248e+01\n-1.1698267686242426e+01\n1.1673286034035058e+01\n-4.9128215905349741e+01\n-1.1541762986137742e+01\n1.1630002473626689e+01\n-4.9153628844865267e+01\n-1.2205221060987380e+01\n1.1646278220977857e+01\n-4.8983246007068395e+01\n1.3402421353629427e+01\n2.7471082999254350e+00\n-2.5847130160029575e+01\n-1.2494884747969790e+01\n1.1636450464323532e+01\n-4.9024474307582921e+01\n-1.1219188580256574e+01\n1.1511189842496831e+01\n-4.9182303311738714e+01\n-1.0422313819606751e+01\n1.1429064485354610e+01\n-4.9059027427519858e+01\n2.2520058693704184e+00\n8.1724910902814880e+00\n-4.3305238843587738e+01\n-1.5583483271220183e+01\n1.0573646278294161e+01\n-4.2398428578970574e+01\n-1.5738775596850358e+01\n1.0566707855684470e+01\n-4.2354650957905221e+01\n-1.1048844969915866e+01\n1.1413738892095504e+01\n-4.9387050245025712e+01\n-1.5395382670746137e+01\n9.8555851617609296e+00\n-3.8735160789297922e+01\n-1.4051925830091252e+01\n1.0109362296387326e+01\n-4.1697735232481357e+01\n-1.1663298677844553e+01\n1.1435982550623027e+01\n-4.9295950096480418e+01\n-1.2479695048546828e+01\n1.1462356985503979e+01\n-4.8924493113055220e+01\n-1.2479695048546828e+01\n1.1462356985503979e+01\n-4.8924493113055220e+01\n1.3807420204299813e+01\n2.6040191308354825e+00\n-2.5671053730149293e+01\n-1.2596825504482611e+01\n1.1115571579626325e+01\n-4.7200203841490811e+01\n-6.6303047489804516e+00\n9.8344001142262663e+00\n-4.5670649863598079e+01\n-2.0986517783584264e+00\n8.6626771906247697e+00\n-4.3882923543737370e+01\n-3.3495764949578657e+00\n9.2992647876211372e+00\n-4.5501628334694018e+01\n1.2724786980964581e+01\n5.5365931608815329e+00\n-3.9702477663286210e+01\n1.4248799173247724e+01\n2.1654751016634450e+00\n-2.4498988131040580e+01\n-1.1329613473611621e+01\n1.0976254329385135e+01\n-4.8658920354461301e+01\n3.9367873954285776e-01\n3.8069483577882717e+00\n-2.3307621384479084e+01\n-1.5856975314624709e+01\n1.0071138978420031e+01\n-4.1806368202022675e+01\n-1.3840360568827542e+01\n9.4101212220792938e+00\n-4.0322198659553841e+01\n-1.2867468315540378e+01\n1.1045654294952712e+01\n-4.9014064412180559e+01\n-1.1232274211367562e+01\n1.0854832578755925e+01\n-4.9557042149856777e+01\n1.6158195638257581e+01\n2.4953025092402989e+00\n-2.8479258631158395e+01\n-1.1958788400343623e+01\n9.2237041883663284e+00\n-4.1489155870572482e+01\n6.2810008042936327e-01\n7.4540542545265405e+00\n-4.2081347466461239e+01\n-1.4591255198134396e+01\n8.5939731621173205e+00\n-3.6250749842964687e+01\n-1.5689680825547400e+01\n9.7120147668124908e+00\n-4.1420056195451515e+01\n-1.1451816439878915e+01\n1.0831644762200041e+01\n-4.9470177131188073e+01\n-3.2334272818801923e+00\n8.0493857133595093e+00\n-4.2843847078222936e+01\n-2.1749367813441371e+01\n1.2853652269411526e+01\n-5.2823827217365611e+01\n-1.6557295646522171e+01\n9.9436737270994584e+00\n-4.2369553977232606e+01\n-1.4023827912195404e+01\n8.5505487689770003e+00\n-3.7356006486943166e+01\n-1.2964661999647266e+01\n1.0721652055386366e+01\n-4.9167550206362563e+01\n-1.4594930989658874e+01\n8.5337112688251935e+00\n-3.6961387588033269e+01\n-1.1977434237701381e+01\n9.0918441825393383e+00\n-4.2467671333318798e+01\n-5.5543962783531784e+00\n8.1004502480951128e+00\n-4.2819472811705467e+01\n-5.5543962783531784e+00\n8.1004502480951128e+00\n-4.2819472811705467e+01\n-2.6255080634901873e-01\n3.5583414460949778e+00\n-2.3281177378158141e+01\n-2.7086268449847632e+00\n7.5509654593851474e+00\n-4.2241234192446974e+01\n-1.3013726089217361e+01\n9.7607936989327371e+00\n-4.5590588769371934e+01\n-1.4087133758472444e+01\n1.0564107966068917e+01\n-4.9005350141105538e+01\n1.3354108151775467e+01\n2.2290774852145412e+00\n-2.7514241804705382e+01\n-2.7440534519053319e+00\n7.4406747789825625e+00\n-4.2106746282105291e+01\n1.4994655174426773e+01\n2.4620129906967647e+00\n-2.9973037271752794e+01\n1.1843672081859701e+01\n4.4363811660645380e+00\n-3.8232352847407526e+01\n3.6525516036168053e+00\n2.5535712813510529e+00\n-2.1895104268935984e+01\n1.3616221382548522e+01\n1.9245083564337946e+00\n-2.7118764261535933e+01\n3.8893386048841307e+00\n2.4142453484658697e+00\n-2.1884461232428638e+01\n4.1182005456001667e+00\n2.3394733493605977e+00\n-2.2038579396039705e+01\n1.4183502188900658e+01\n1.6062634120936776e+00\n-2.6517500351390520e+01\n1.3891374561720651e+01\n2.3805159877193431e+00\n-3.0789107945611182e+01\n-6.8852285198072591e+00\n7.6008678560989891e+00\n-4.3120908543000226e+01\n1.1671188553568992e+01\n3.7333422042832272e+00\n-3.7290538713287951e+01\n4.5706798197893832e+00\n2.1105056900132353e+00\n-2.2314770093409816e+01\n1.1781828130849949e+01\n3.4599749741028329e+00\n-3.6876061157570859e+01\n3.1409828050582775e+00\n2.2746131787266508e+00\n-2.2337589969081595e+01\n1.4520198849400051e+01\n6.0143626343338885e-01\n-2.3202719111637201e+01\n1.1467327273657407e+01\n3.3292694285280811e+00\n-3.6527509950568565e+01\n1.4409606957113661e+01\n1.0354756139049699e+00\n-2.5153279161077936e+01\n1.3115522179499960e+01\n2.4921246477641086e+00\n-3.3264434500010061e+01\n-4.5591768128333127e-01\n2.7217450335631632e+00\n-2.2312011179079555e+01\n-1.2568086815555686e+00\n3.1015167214229762e+00\n-2.4106003295397368e+01\n-1.0520050102355203e+01\n7.1275230854840608e+00\n-4.0740950334395919e+01\n-1.0949614302875871e+01\n7.1624061491085529e+00\n-4.0765334669450702e+01\n-1.0949614302875871e+01\n7.1624061491085529e+00\n-4.0765334669450702e+01\n-1.5810563980320391e+00\n3.4706147571449022e+00\n-2.6773153204764117e+01\n-1.6366822737111035e+00\n3.3930177376484729e+00\n-2.6586755487590253e+01\n-1.3878598001274920e+01\n8.6678551439910834e+00\n-4.7207562437120266e+01\n1.4668002150690393e+01\n2.4361998057769255e-01\n-2.3019439645295471e+01\n1.3769185162032127e+01\n1.8366227888951530e+00\n-3.2845305153030047e+01\n-1.0992678836110619e+01\n6.6819499317897053e+00\n-4.0066546472714464e+01\n-7.4485144224202449e+00\n5.9657426083904896e+00\n-4.0001164953761318e+01\n7.1596025513980512e+00\n1.6633488723099072e+00\n-2.5911113131850030e+01\n-8.7248532621165555e+00\n6.0944919161504041e+00\n-3.9704627672144817e+01\n-1.3903407517399479e+01\n6.9016899675755674e+00\n-3.9766880289462804e+01\n1.3498794717928613e+01\n1.5591860404977043e+00\n-3.2316285326635132e+01\n1.4485230456152584e+01\n6.2151071879418573e-01\n-2.6894225323554661e+01\n-7.1752007749220983e+00\n5.7393044750301225e+00\n-4.0055003582283859e+01\n-6.9607963437344278e+00\n5.6125439206740051e+00\n-3.9534075112873182e+01\n-1.0757397484422666e+00\n2.2702064999560418e+00\n-2.2457952739676578e+01\n-7.8296041232715219e-02\n1.9772091877200655e+00\n-2.1406786884238109e+01\n-3.0123995095261571e+00\n3.3369684926696457e+00\n-2.8081817235072972e+01\n1.6575224243448208e+01\n3.8085699398340972e-01\n-2.8871231731287690e+01\n4.8054351899450287e+00\n1.2764394341322893e+00\n-2.2029638148965059e+01\n-1.3588146663990390e+01\n6.4027468163115024e+00\n-3.9218395817829375e+01\n-2.1981016621457270e+00\n2.7856381652386966e+00\n-2.5785788562680775e+01\n-2.1981016621457270e+00\n2.7856381652386966e+00\n-2.5785788562680775e+01\n7.2748164800618182e+00\n1.2680016314183611e+00\n-2.5511561170447667e+01\n2.5458120805674973e+00\n1.4530725391885939e+00\n-2.1662668708900444e+01\n-6.0485742961924966e+00\n5.0562380120723445e+00\n-3.9223433181753855e+01\n-1.6902736518688561e+00\n2.4585663279041201e+00\n-2.4314387876145901e+01\n2.8255150722346771e+00\n1.2538737351436509e+00\n-2.0696876855284103e+01\n2.8255150722346771e+00\n1.2538737351436509e+00\n-2.0696876855284103e+01\n1.4207274268813173e+01\n1.0357356649880738e-01\n-2.6488420132676112e+01\n-6.4437560993745366e+00\n5.0117658027746046e+00\n-3.8617773944100328e+01\n1.2821016884541608e+01\n1.4121760893913058e+00\n-3.4405184330688911e+01\n1.6070982871410173e+01\n2.5050054780760878e-01\n-2.9589807174858187e+01\n1.5623630742589931e+01\n1.7404011069268224e+00\n-4.1181373574960148e+01\n1.3122400379659677e+01\n1.3393244559130104e+00\n-3.4656026917894323e+01\n1.3616110366043632e+01\n7.9047829931060054e-01\n-3.1043655825775154e+01\n-1.7239275449509373e+00\n2.1498091609094669e+00\n-2.3391229221886348e+01\n-6.0731419271976099e+00\n4.7588878974628930e+00\n-3.8963013018409811e+01\n1.2766387368871431e+01\n1.1752836792146397e+00\n-3.4040978280659232e+01\n1.6326271393170970e+01\n-3.1037824895515070e-02\n-2.9414971376876423e+01\n1.2774896991820375e+01\n1.1107861502266558e+00\n-3.4155304639436402e+01\n3.7621810593636611e+00\n9.2437036393526995e-01\n-2.1002145997432944e+01\n7.4194000969956271e+00\n8.0940491563559924e-01\n-2.4872263400685814e+01\n1.5632834925779145e+01\n1.5598953730300141e-01\n-3.0417588039736152e+01\n-3.0404150756357904e+00\n2.5880917075154986e+00\n-2.6594467363676621e+01\n3.9846774563918377e+00\n8.3283332724183767e-01\n-2.1206690535416136e+01\n-4.8308534694888010e+00\n4.0877722483848569e+00\n-3.7422289200967953e+01\n-1.3578056370566657e+01\n5.5351689132159247e+00\n-3.7829513918348262e+01\n-8.8707055690696173e+00\n4.7337754191195138e+00\n-3.7933902854668084e+01\n-1.0990219237138207e+01\n5.0463692149695092e+00\n-3.7852286965162286e+01\n1.4605260273425678e+01\n-6.0957900035126344e-01\n-2.5393066573523253e+01\n-8.7918233542359019e+00\n3.9838331356952112e+00\n-3.2883682081693557e+01\n7.0232117544097488e+00\n5.3928827489363718e-01\n-2.4474515672237192e+01\n-6.4059460262218222e+00\n4.0700514604872007e+00\n-3.7434331533559948e+01\n5.9442707845015610e+00\n5.2244543213050743e-01\n-2.3341485700029992e+01\n-1.1627173384471629e+01\n4.8342314982065941e+00\n-3.7521063210196552e+01\n8.2240933979907704e-01\n9.6671213291513236e-01\n-2.0481593142851466e+01\n2.9434267962737444e+00\n6.2732488345924509e-01\n-2.0544775275097397e+01\n1.4231142935773804e+00\n7.8638125774012180e-01\n-2.0359518179003487e+01\n-8.2718170770607884e+00\n4.0006382091299928e+00\n-3.7238199136351092e+01\n-2.8178454889904163e+00\n1.8334339721392139e+00\n-2.4690495212952356e+01\n-3.2294703590968021e-01\n1.0796916692582079e+00\n-2.1066117084301098e+01\n-1.5648226160346088e+00\n1.3542941132850492e+00\n-2.2500769125308910e+01\n7.1195167672477968e+00\n6.6719189842764356e-02\n-2.3874866499897909e+01\n-7.5129209813652214e+00\n3.6139799759157771e+00\n-3.6863489402435711e+01\n-7.7690589190376871e+00\n3.5914223827346179e+00\n-3.6644790233854366e+01\n1.6817554373377803e+00\n5.3621513173216950e-01\n-2.0309208586441219e+01\n5.6812295438398230e+00\n1.1713329436959166e-01\n-2.2785826455383667e+01\n-8.1781568845811723e+00\n3.6038907185281390e+00\n-3.6546476006213915e+01\n4.1607738332380420e+00\n1.5418417175070995e-01\n-2.1162246009558171e+01\n1.6994008343489547e+01\n-1.2335520066837937e+00\n-2.9683641165354565e+01\n-8.4657570173293095e+00\n3.4629518495137317e+00\n-3.6350968300946327e+01\n1.3635021355466668e+01\n-4.9015890884773117e-01\n-3.2183451962497330e+01\n-8.8958932425044619e+00\n3.1974356373940278e+00\n-3.3377684037778970e+01\n-1.3639815266347860e-01\n6.8328762256438214e-01\n-2.0827532923558639e+01\n1.3833797705450632e+01\n-6.4301223785477846e-01\n-3.2055317870002277e+01\n-3.6509556837132857e+00\n1.5599256571792421e+00\n-2.5517107654263125e+01\n-1.8427279216162549e+00\n1.1061165800118733e+00\n-2.3510992362015763e+01\n-8.7419498321135478e+00\n3.1530022140005523e+00\n-3.5750283945924664e+01\n-3.6274611299157629e+00\n1.3859466186562186e+00\n-2.4986549655773707e+01\n3.0888474692043211e+00\n1.8238701023169528e-02\n-2.1870149405176235e+01\n-5.2447949190647387e+00\n2.2935729326312368e+00\n-3.5447706137014784e+01\n-6.6283371414432422e+00\n2.4743431268876552e+00\n-3.4882688033457491e+01\n-6.0205148585727022e+00\n2.3873311013656124e+00\n-3.5311632464430758e+01\n1.3600998255313257e+01\n-1.1558278991092510e+00\n-3.1689486058105448e+01\n6.7847770827262535e+00\n-7.1311871423635353e-01\n-2.2935235742728047e+01\n1.5417386034707853e+01\n-2.2722538808668267e+00\n-2.3534423655470498e+01\n-8.3705061846746425e+00\n2.4985972564995680e+00\n-3.4921825376829275e+01\n1.3938329039703433e+01\n-1.4358083212171457e+00\n-3.1079568428483519e+01\n1.4987454260714523e+01\n-2.1579824024995280e+00\n-2.6077565851514450e+01\n-1.0095848529064003e+01\n2.6789392248793393e+00\n-3.4828188345992132e+01\n1.5430157801828180e+01\n-2.4285408391872401e+00\n-2.3693451290931289e+01\n1.5502206011595204e+01\n-2.5022928246142717e+00\n-2.3563766411192024e+01\n1.6911217932003087e+01\n-2.2353973607806310e+00\n-3.0167003978022827e+01\n-6.7315271050178831e+00\n1.9402270895092832e+00\n-3.4509537604026434e+01\n1.4299636821244661e+01\n-1.7437008357578674e+00\n-3.1564117873716473e+01\n2.7962440975710732e+00\n-4.8084663667948574e-01\n-2.0518249408110044e+01\n-6.8642128241231273e+00\n1.8407812763553817e+00\n-3.4511729683266772e+01\n7.7851134259597138e-02\n-3.2925807260475941e-02\n-2.0770192929156838e+01\n2.0369923270047665e+00\n-3.8947920164159155e-01\n-2.0319250227980465e+01\n4.9847998730576641e+00\n-8.3627762903925684e-01\n-2.1547393768794752e+01\n-7.2481668959898418e+00\n1.8788085200248512e+00\n-3.5065889537464223e+01\n-1.1209241751763528e+00\n1.1018334388510051e-01\n-2.1640469531580269e+01\n-7.1989438333310387e+00\n1.6676896676553352e+00\n-3.4095539669154299e+01\n-5.9973539687299100e+00\n1.4354085458419605e+00\n-3.4051189133538180e+01\n-8.3995045934521286e+00\n1.8141966249154216e+00\n-3.3974845081003487e+01\n1.5545228391388443e+01\n-2.8760104594445850e+00\n-2.4054949051148821e+01\n-8.1901428760211470e+00\n1.7437511807508834e+00\n-3.4020925140659308e+01\n-8.6453289652181535e+00\n1.8115279109058176e+00\n-3.4070540961887311e+01\n1.5619779883965721e+01\n-2.9171474536114150e+00\n-2.3794672182478138e+01\n-8.6738254490868520e+00\n1.7494458076577029e+00\n-3.3884237819192194e+01\n6.5726886743984210e+00\n-1.3212159629113944e+00\n-2.2181422091929292e+01\n1.2640369414494286e+01\n-2.0292518554533703e+00\n-3.0146394408626435e+01\n-6.1363107777360275e+00\n1.1743393440419776e+00\n-3.3683745792222687e+01\n-2.3953582198042644e+00\n6.8952930520046640e-02\n-2.2449635768551321e+01\n4.4986949162845402e+00\n-1.1669928846883295e+00\n-2.1179796239942178e+01\n-8.3362567862677874e+00\n1.3633713600094541e+00\n-3.3469939450027283e+01\n-2.5801459829129008e+00\n1.0165567176058125e-01\n-2.3009692517287881e+01\n1.5553708741348434e+01\n-3.2151989337041544e+00\n-2.4708164097394732e+01\n-1.9807775636822664e+00\n-1.1173720868842099e-01\n-2.2046999392811017e+01\n4.9857073960320557e+00\n-1.3241407180010603e+00\n-2.1541900882145189e+01\n1.2778422623991579e+00\n-7.4694863588773630e-01\n-2.0531149549359995e+01\n-9.7640617096449862e+00\n1.4076059489855386e+00\n-3.3084572897997141e+01\n-9.7695442148918268e+00\n1.3945812099139967e+00\n-3.3128732690127713e+01\n-7.5851018360579445e+00\n9.5494976250471619e-01\n-3.3151191774181477e+01\n-7.6222627600926307e+00\n9.3221636862033541e-01\n-3.3877845427922971e+01\n-6.7364432882866208e+00\n7.4346887044603471e-01\n-3.3022977680578606e+01\n5.2438321677531743e+00\n-1.6251072764121179e+00\n-2.1445035190222061e+01\n-2.0659024700415429e+00\n-3.8018049583286623e-01\n-2.1853373122531710e+01\n-3.3695711956767509e+00\n-1.4572060691510028e-01\n-2.3091746699073092e+01\n-3.3695711956767509e+00\n-1.4572060691510028e-01\n-2.3091746699073092e+01\n-2.2034639967344805e+00\n-3.5027997316473825e-01\n-2.2399115319079492e+01\n5.8687827126377234e+00\n-1.8069257571333934e+00\n-2.1433682262492663e+01\n5.0886437850515991e+00\n-1.6779274641723441e+00\n-2.1461158494347391e+01\n-6.1806706368305662e+00\n3.8357103333763065e-01\n-3.2446768634084115e+01\n1.5035123971599203e+01\n-3.4402664668547294e+00\n-3.0006782191957992e+01\n5.1294291277798374e+00\n-1.8961918864954679e+00\n-2.1186093319939715e+01\n4.5182742625117953e+00\n-1.8227954122162227e+00\n-2.1171650437455739e+01\n5.4069891397579282e+00\n-2.0002685379905212e+00\n-2.1101168635353893e+01\n5.4069891397579282e+00\n-2.0002685379905212e+00\n-2.1101168635353893e+01\n-7.1787750774636967e+00\n1.5633925058625983e-01\n-3.1969966990377461e+01\n-3.3783896230239816e+00\n-5.2186795322364465e-01\n-2.2513162249028596e+01\n1.1472356428005780e+01\n-3.1516925486289620e+00\n-2.8537656706967805e+01\n-2.5899835784437899e+00\n-7.4070470694082557e-01\n-2.2264836630151354e+01\n-2.5899835784437899e+00\n-7.4070470694082557e-01\n-2.2264836630151354e+01\n-1.4554295269283932e+00\n-9.3937003705848454e-01\n-2.1308527908421567e+01\n2.5646175616148308e+00\n-1.6602164988796486e+00\n-2.0309326681565768e+01\n-1.2542970755847487e+00\n-9.9923254224698077e-01\n-2.1033149077556196e+01\n1.7592138909696349e+00\n-1.5579730370092240e+00\n-2.0363641445577528e+01\n-8.5760714723959595e+00\n1.7449786987226396e-01\n-3.1740172626870585e+01\n-3.4115101433427326e+00\n-7.3201456535523068e-01\n-2.2706332570537285e+01\n-8.6178443171263801e+00\n6.0046556842860740e-02\n-3.1580403258821505e+01\n-7.6573077592152243e+00\n-1.1660405395449502e-01\n-3.1601129387108060e+01\n5.3091712917202849e-01\n-1.4471589167283769e+00\n-2.0429070859033686e+01\n4.9179906982423800e+00\n-2.2304086195748818e+00\n-2.0809236620738268e+01\n1.8016966729854544e+00\n-1.6869091854974310e+00\n-2.0199038258935865e+01\n8.1392645496175609e-01\n-1.5238191190188815e+00\n-2.0363604486503643e+01\n4.9475329445651903e+00\n-2.2837525141545538e+00\n-2.0704261953044522e+01\n-3.3784118603043396e+00\n-8.9661359147066788e-01\n-2.3046333314649381e+01\n2.6762235805953183e+00\n-1.9144869320531710e+00\n-2.0218431517938111e+01\n-3.4252181085140512e+00\n-8.8549116794194405e-01\n-2.2862668579252475e+01\n5.1826998961843334e+00\n-2.4079344787510584e+00\n-2.0614982392099261e+01\n1.4259734798694343e+01\n-4.1096265246258543e+00\n-2.6439403803377157e+01\n3.8892267867452457e+00\n-2.2598863830665867e+00\n-2.0603163627417953e+01\n-1.7911344432668415e+00\n-1.2740549790181355e+00\n-2.1545332475301517e+01\n-8.8642399527852733e-01\n-1.4284779706409478e+00\n-2.0869918096407215e+01\n-1.7007415774898096e+00\n-1.3463449325115102e+00\n-2.1499525195663988e+01\n3.8665198048756899e+00\n-2.2800983238644750e+00\n-2.1244974826658591e+01\n-9.3713794345151591e+00\n-3.1414404718039490e-01\n-3.0725511072612996e+01\n-8.3509059181782384e+00\n-5.5874082864545915e-01\n-3.0881543337841887e+01\n-1.7436163530798348e+00\n-1.4782050329838590e+00\n-2.1389602602031690e+01\n-7.7411024395917503e+00\n-7.1622915363718631e-01\n-3.0783985027368988e+01\n1.4420009557090648e+01\n-4.5681115875335889e+00\n-2.5880297248965675e+01\n-1.0200062043254924e+01\n-3.1460354231545179e-01\n-3.0394413229310558e+01\n-7.4198065974452065e+00\n-8.6657190943456719e-01\n-3.0680717676174819e+01\n1.2197641144182487e+01\n-4.3042033079822577e+00\n-2.7403601654398258e+01\n-1.0100309930609530e+01\n-3.7322029886829333e-01\n-3.0456227057792130e+01\n3.6375855462711963e+00\n-2.5258190889331762e+00\n-2.0252069880510096e+01\n-2.9406277767023794e+00\n-1.4104680401464873e+00\n-2.1529731288493178e+01\n-1.0588375458338730e+01\n-4.1780173826617756e-01\n-2.9976792438375234e+01\n-9.5877433584651719e+00\n-7.1058262224790358e-01\n-3.1578828474899698e+01\n3.3477106508969530e+00\n-2.5965791751324465e+00\n-2.0218821034187165e+01\n-4.8396111052793547e+00\n-1.4756641205395813e+00\n-2.7095947670541765e+01\n-1.2063271749018377e+01\n-4.4212510058858034e-01\n-3.2313046983511484e+01\n-9.4085379745913151e+00\n-8.2665325585753757e-01\n-3.0109967557766922e+01\n1.3866019036544960e+01\n-5.1064002316000598e+00\n-2.7839313091064831e+01\n-7.4507109066388075e+00\n-1.4504834908238797e+00\n-2.9713663502572278e+01\n3.0149538490760381e+00\n-2.8433154555659801e+00\n-1.9868551476170865e+01\n-8.7704872980452091e+00\n-1.2447152773164383e+00\n-2.9625667731499274e+01\n-9.1317004949306990e-01\n-2.2052482329897130e+00\n-2.0401499079284928e+01\n-8.2965235365748899e+00\n-1.3998552196007175e+00\n-2.9583836967583672e+01\n-9.8526248130918752e+00\n-1.2768594353179259e+00\n-3.0831885758795877e+01\n-1.2446305629224449e+01\n-8.8776717349411616e-01\n-3.1501532118982659e+01\n9.0562192573005351e+00\n-4.5159311977070189e+00\n-2.6155463139553103e+01\n-8.8718323474691516e+00\n-1.5118472309278901e+00\n-2.9055919114469564e+01\n-1.3037284172330599e+00\n-2.3774967993553777e+00\n-2.0522939230450831e+01\n-2.0184988630173886e-01\n-2.5527889650803464e+00\n-2.0060570849260404e+01\n-8.6560881759952650e+00\n-1.6444250472793582e+00\n-2.9084494640841651e+01\n-8.5926536947026855e-01\n-2.4741475384355196e+00\n-2.0200941137777317e+01\n1.3146352782891728e+00\n-2.8429107229737869e+00\n-1.9713059303033507e+01\n1.3146352782891728e+00\n-2.8429107229737869e+00\n-1.9713059303033507e+01\n1.8627121363976464e+00\n-2.9434178490778979e+00\n-1.9729359679119238e+01\n-1.1061916391671920e+00\n-2.4295912816513976e+00\n-2.0172496953566529e+01\n-3.3349535770205305e+00\n-2.3184709288730772e+00\n-2.3774047009730960e+01\n-8.3167721826622942e-01\n-2.5283476343917157e+00\n-2.0218797745681265e+01\n2.4463824598002142e+00\n-3.1561986128067345e+00\n-1.9995482034400084e+01\n-1.1913952872879671e+01\n-1.3209341280699129e+00\n-3.0862121464458518e+01\n-9.0592490814965760e+00\n-1.7956719092714515e+00\n-2.8887051438963699e+01\n-1.1776230314098907e+01\n-1.5233972866482266e+00\n-3.1117303872792196e+01\n-1.1076479647051434e+01\n-1.4067221967454862e+00\n-2.8432086981604304e+01\n-1.2663311890900728e+01\n-1.1267217036468082e+00\n-2.7457645299748997e+01\n-9.0092751603542229e+00\n-1.9277824855922627e+00\n-2.8429133240978601e+01\n-9.3292941903724138e+00\n-1.8915557683122091e+00\n-2.8376455185315365e+01\n1.8962349196066044e+00\n-3.4250744637722437e+00\n-2.0324715679572666e+01\n-8.0639080484247661e+00\n-2.3941341404530303e+00\n-2.9264676770453551e+01\n1.0786732157981042e+01\n-5.6577283455217824e+00\n-2.5434334340153001e+01\n-6.7789807715964594e+00\n-2.7379580519055318e+00\n-2.8513410896723713e+01\n5.3975502341884720e+00\n-4.4725538036984887e+00\n-2.2829943784514640e+01\n1.0671719730015237e+01\n-5.7912368900195519e+00\n-2.5221550885403026e+01\n1.1292543837636099e+01\n-5.9371799859657139e+00\n-2.5199313360659751e+01\n4.5027694809190235e+00\n-4.4842166078693886e+00\n-2.2350755220839297e+01\n-2.7794493985995108e+00\n-3.2863770918246598e+00\n-2.3479983018858860e+01\n1.1802756969931117e+01\n-6.0940786253074126e+00\n-2.3851425000818828e+01\n1.6255612449309407e+00\n-3.9514459736138043e+00\n-2.0845710325685282e+01\n-8.9532337064173380e+00\n-2.7704673555857404e+00\n-2.7154519958122084e+01\n-9.8068983772320018e-01\n-3.7085914511379112e+00\n-2.1542963086169980e+01\n-4.8652089092487500e+00\n-3.5191170253922937e+00\n-2.6371894510254268e+01\n-1.0501362467665386e+01\n-2.5097631495800701e+00\n-2.6850896210263691e+01\n-1.0501362467665386e+01\n-2.5097631495800701e+00\n-2.6850896210263691e+01\n-9.1655897073962098e+00\n-2.9195758998009045e+00\n-2.6960621230466622e+01\n1.0447729547795992e+01\n-6.4037440298740025e+00\n-2.3946253941230797e+01\n2.1241446153013666e+00\n-4.6592395021614230e+00\n-2.1373328866930095e+01\n-1.0463808953659044e+01\n-2.8549810925177850e+00\n-2.6317079894230297e+01\n-6.8547620465634536e+00\n-3.6600914001526546e+00\n-2.6588108834638120e+01\n-8.7740608260834883e+00\n-3.5048430582818355e+00\n-2.7755941205394699e+01\n6.7525293150956756e-01\n-4.4109212766963299e+00\n-2.1263107883596501e+01\n1.8026796889088279e+00\n-4.7927597250528704e+00\n-2.1476123893469712e+01\n-7.9938263142392625e+00\n-3.5844336154382450e+00\n-2.6376311147086675e+01\n9.7470029475819668e+00\n-6.8462483637536184e+00\n-2.3777473609667691e+01\n-1.1581850038223635e+01\n-2.8130230572135639e+00\n-2.5155410990115151e+01\n9.7481445488805267e+00\n-6.9138938860221559e+00\n-2.3789660430000630e+01\n-8.5688284420252536e+00\n-3.6685752435855776e+00\n-2.5956893462191221e+01\n8.0582065949126740e+00\n-6.6517045768163241e+00\n-2.3726389202953552e+01\n1.2810887891252085e+00\n-5.1926833956848641e+00\n-2.1720721670406508e+01\n6.0977968927931068e+00\n-6.4491945458095978e+00\n-2.2929846113480068e+01\n7.0434933866833100e+00\n-6.8494303159169432e+00\n-2.3369380011715457e+01\n7.1028844148760673e+00\n-6.8986171569044759e+00\n-2.3496662105856320e+01\n6.3498133527474980e+00\n-6.7500184727407744e+00\n-2.2934255923991579e+01\n8.5267430668379376e+00\n-7.3033021678832153e+00\n-2.2971843531800285e+01\n-2.1480983979425381e+00\n-5.0854748291708374e+00\n-2.2066459937414887e+01\n3.1467406412372934e-01\n-5.6582425550947484e+00\n-2.1468308028702921e+01\n6.9445842037910632e-01\n-5.7804061629262016e+00\n-2.1339874667842999e+01\n6.0355039986745220e+00\n-7.1635158171283688e+00\n-2.2706033334590277e+01\n-1.6184259045288989e+00\n-5.4462012088266283e+00\n-2.1889565461298009e+01\n8.1350287142575972e+00\n-7.7101864765279462e+00\n-2.2390501249298111e+01\n-2.1406468997234835e+00\n-5.6876346357679148e+00\n-2.2910723067312773e+01\n-1.5762029852345794e+00\n-5.8478655826192805e+00\n-2.2590414928931729e+01\n-7.4831245982839114e+00\n-4.9581087366137000e+00\n-2.4415264239276109e+01\n-4.3559704301728503e+00\n-5.5392649140003796e+00\n-2.3861272305359865e+01\n-8.2836209037097301e+00\n-4.8050795255095027e+00\n-2.4090746401592245e+01\n-8.2836209037097301e+00\n-4.8050795255095027e+00\n-2.4090746401592245e+01\n-7.4167172202382936e+00\n-5.0612274528984118e+00\n-2.4311651627726068e+01\n-6.4546716996729652e+00\n-5.3191305296409235e+00\n-2.4107496677701398e+01\n-9.5563569596193449e+00\n-4.5861268441141050e+00\n-2.3510363706870709e+01\n-6.0858398454634628e+00\n-5.4811079920347199e+00\n-2.3954016657089984e+01\n-1.0803204420185645e+01\n-4.3163745005868162e+00\n-2.2918935573664722e+01\n-4.7087058361934035e+00\n-5.9192843110444731e+00\n-2.3613504973880666e+01\n7.3562961396171955e+00\n-7.9541850176169415e+00\n-2.1271674123108070e+01\n-9.2605637182730458e+00\n-4.9207766006450653e+00\n-2.3166945406415664e+01\n-1.0950123216930301e+00\n-6.4728136861257335e+00\n-2.2360537802723371e+01\n5.1945959562275545e+00\n-7.7242614344319103e+00\n-2.1940556749538572e+01\n8.3979069784752891e-01\n-6.8259309681232381e+00\n-2.1958211922705203e+01\n-1.1177004244229025e+00\n-6.5269666094834164e+00\n-2.2320277160401343e+01\n4.9383519579933459e+00\n-7.7267935520973623e+00\n-2.1805331652680909e+01\n-2.8797933037232999e-02\n-6.7056261497782508e+00\n-2.1779688815977238e+01\n-8.4565751121114676e+00\n-5.4470219529880382e+00\n-2.2680240437513490e+01\n-3.3786345936908795e+00\n-6.5979712079563475e+00\n-2.2791550424933959e+01\n-7.5296364623948415e+00\n-5.7315151048634698e+00\n-2.2837278403986808e+01\n-8.5499916112253587e+00\n-5.4947975637215203e+00\n-2.2651624761175508e+01\n-7.3297217005757949e+00\n-5.8266272855428634e+00\n-2.2823030735346929e+01\n-3.8898447146591439e+00\n-6.5483235438724838e+00\n-2.2747694988731759e+01\n-4.4827770706211734e+00\n-6.4433748584282347e+00\n-2.2776775293674110e+01\n-5.6180549781234141e+00\n-6.5797645211280749e+00\n-2.3898256318078793e+01\n-4.4071794191125964e+00\n-6.5181166414296854e+00\n-2.2702243539068636e+01\n-1.0896622403781497e+00\n-7.1875647038095529e+00\n-2.1656717554718682e+01\n4.4477635638467481e+00\n-8.2280216751585762e+00\n-2.0940601734865428e+01\n-5.8409459512866935e+00\n-6.4643182763165710e+00\n-2.2464574204253502e+01\n-3.9367088820057963e+00\n-6.8206078367862588e+00\n-2.2275176942664785e+01\n-7.0200311604976200e+00\n-6.2070317544011750e+00\n-2.2286539121555897e+01\n-5.3526808429145518e+00\n-6.5998359421376041e+00\n-2.2417884143319210e+01\n8.4050875082008574e+00\n-9.2663169254504769e+00\n-2.0922353280062961e+01\n1.6391854343594485e+00\n-7.8684387666329805e+00\n-2.1128740763776740e+01\n9.9335261374584469e+00\n-9.7888469848785462e+00\n-2.1098275675959812e+01\n8.2379834372129306e+00\n-9.3023285698232083e+00\n-2.0780921291277902e+01\n-1.0017759439551172e+01\n-5.5246025721625482e+00\n-2.1195210108198808e+01\n-3.8203955496070683e+00\n-7.4359443065355890e+00\n-2.2618060833628391e+01\n-1.7598689355796302e+00\n-7.5248975938187819e+00\n-2.1605390638423845e+01\n-9.6754734334803825e+00\n-5.6666159205898801e+00\n-2.1202480146755491e+01\n-7.5232506757229123e+00\n-6.3246012518488186e+00\n-2.1771989752453024e+01\n-7.5232506757229123e+00\n-6.3246012518488186e+00\n-2.1771989752453024e+01\n1.6325556275660391e+00\n-8.1192317319588323e+00\n-2.0995013058347755e+01\n6.0402003875899775e+00\n-8.9763153742303139e+00\n-2.0468748357814611e+01\n-6.4151341761658731e-01\n-7.7415742558199554e+00\n-2.1394588010530029e+01\n8.1896185036339126e+00\n-9.5300010925856036e+00\n-2.0505691152324484e+01\n-1.2330253548575694e+00\n-7.6694774788324684e+00\n-2.1467146224637531e+01\n1.4454215556562335e+00\n-8.0812430042829995e+00\n-2.0850247103344216e+01\n-8.2446015776125705e+00\n-6.1511023131475850e+00\n-2.1536656570604240e+01\n-5.5873777683651129e+00\n-7.1766493499909867e+00\n-2.2780077815689445e+01\n-7.5120173186056212e+00\n-6.4159280722256788e+00\n-2.1708108638265376e+01\n5.1091927678313978e+00\n-8.7311835209313262e+00\n-2.0151826471060847e+01\n-4.8085491165135508e-01\n-7.8560012971981710e+00\n-2.1256271421250457e+01\n-3.7479897699401132e-01\n-7.9040024231487500e+00\n-2.1159666751620840e+01\n-1.0598962024113872e+00\n-7.7511446197895184e+00\n-2.1139537939975341e+01\n7.6046696358504757e+00\n-9.4956823804763246e+00\n-2.0289535304563927e+01\n7.6046696358504757e+00\n-9.4956823804763246e+00\n-2.0289535304563927e+01\n-8.3245071107779047e+00\n-6.2232636594316411e+00\n-2.1332638967586057e+01\n-3.1632858500910868e-02\n-7.9782785557504585e+00\n-2.1037276275581153e+01\n-7.6446914757254403e+00\n-6.4542662297788196e+00\n-2.1584025206298637e+01\n-4.0320623585568631e+00\n-7.2755641678109644e+00\n-2.1532660372838524e+01\n1.8572881123291600e+00\n-8.3297345709597739e+00\n-2.0574083756451163e+01\n-1.7032779533794071e+00\n-7.7333616822697229e+00\n-2.1204344590125974e+01\n4.8129964134544645e+00\n-8.8935460228428216e+00\n-2.0120146505002154e+01\n2.0252101669369740e+00\n-8.4172816139925715e+00\n-2.0603886359971469e+01\n1.5168108606329940e+00\n-8.2835670657553528e+00\n-2.0526929406390931e+01\n-5.2282416372522569e+00\n-7.1457251545970379e+00\n-2.1323456116262626e+01\n3.3243832340637658e+00\n-8.7058951227706078e+00\n-2.0134668269508605e+01\n4.8509538833384775e+00\n-9.0341572107338504e+00\n-1.9905778089106644e+01\n-5.3136953446277762e+00\n-7.2043091658135205e+00\n-2.1243744182615369e+01\n4.4890884090878229e+00\n-9.0278240977316528e+00\n-1.9902504255957190e+01\n-7.6462038983987943e+00\n-6.6481541400683755e+00\n-2.1012640121419519e+01\n-6.2666889283116278e+00\n-7.0540355097637812e+00\n-2.1125533743809488e+01\n3.2120184243711862e+00\n-8.8349762326903054e+00\n-1.9927029658864633e+01\n-4.2348209385538294e+00\n-7.5167796293035121e+00\n-2.0936902431410108e+01\n4.0003687413150368e+00\n-8.9916025813010911e+00\n-1.9720669108870890e+01\n3.4881958498220174e+00\n-8.9433436720380772e+00\n-1.9689740984243191e+01\n6.4696073066770365e+00\n-9.7005145444600327e+00\n-1.9568726303729164e+01\n1.6065835934410682e+00\n-8.6838630138885247e+00\n-1.9940483812219810e+01\n5.4065680955093509e-01\n-8.4970858138980301e+00\n-2.0097294596645622e+01\n3.3493115933072519e+00\n-9.0416820472558239e+00\n-1.9627875705363266e+01\n-5.6212111648127978e+00\n-7.4347612765465403e+00\n-2.0656499317990058e+01\n1.8362218511795887e+00\n-8.8335299557186158e+00\n-1.9708381898274595e+01\n1.8477423691895194e+00\n-8.8650593820630768e+00\n-1.9783811728823839e+01\n-9.3759209395508094e+00\n-6.3458322683037487e+00\n-1.9971027252198791e+01\n3.1499383403387013e+00\n-9.0867680503725747e+00\n-1.9506198559438737e+01\n6.7421419590953082e+00\n-9.9440550504595606e+00\n-1.9438953933029872e+01\n3.9095248055039233e+00\n-9.2542370042832260e+00\n-1.9421482684333657e+01\n-3.9416805577841840e+00\n-7.8055110263665659e+00\n-2.0491754829072956e+01\n7.1676752618656892e+00\n-1.0094125682063696e+01\n-1.9447362174500508e+01\n-4.9002382772106658e+00\n-7.6498525361631122e+00\n-2.0569447817567021e+01\n2.9109488640485282e+00\n-9.1336925074002782e+00\n-1.9479635276963659e+01\n-3.6777015988179587e+00\n-7.9231906070857425e+00\n-2.0281656768008769e+01\n2.4951614414175407e+00\n-9.1016940172325569e+00\n-1.9436632214912780e+01\n-1.1044357422556885e+00\n-8.4344557998907579e+00\n-1.9894331472737967e+01\n-4.4940178043204302e+00\n-7.8345432005882678e+00\n-2.0236897315030173e+01\n-9.0389875027805522e-01\n-8.5676017476971520e+00\n-1.9686174126064842e+01\n2.5667731259526576e+00\n-9.2851403472427734e+00\n-1.9145645436572586e+01\n4.5692521702301747e-01\n-8.9028138643078805e+00\n-1.9394400888337607e+01\n2.6320125271284822e+00\n-9.4401472748347945e+00\n-1.8901134916769937e+01\n-3.6233533669821445e+00\n-8.2893662188154682e+00\n-1.9512094822364229e+01\n2.5096007226526384e-01\n-9.0575479027677961e+00\n-1.9016013585115950e+01\n2.7360971236038073e-01\n-9.1351282790457145e+00\n-1.8881110122019138e+01\n-3.7074182923141250e+00\n-8.5659676860054894e+00\n-1.9121734580027631e+01\n-4.3391372379023840e+00\n-8.5419565015725176e+00\n-1.8970063733471065e+01\n2.7535955581231346e+00\n2.1162462306909589e+01\n-5.2946756058449800e+01\n6.4835857526535556e-01\n1.9136373918243958e+01\n-4.8569507387885103e+01\n1.1889473649601978e+01\n7.8119385209940306e+00\n-2.4288388651138430e+01\n7.9441267317515587e+00\n2.0535501382375724e+01\n-5.4226227483777201e+01\n1.1796642850599692e+01\n7.9451797538316393e+00\n-2.4679487093378373e+01\n1.0643877649259519e+01\n2.2007331493291066e+01\n-5.9847248778682932e+01\n1.5726394718182323e+01\n2.0527955730191778e+01\n-5.8674082562542189e+01\n9.0462463872728147e+00\n1.9471411983486931e+01\n-5.5021355725753615e+01\n7.0771164212982205e+00\n1.8814384059642617e+01\n-5.3684106628571861e+01\n7.6141872896123411e-02\n1.8468569613163726e+01\n-5.1264233833109564e+01\n-5.0188891281278893e+00\n1.5998453904741213e+01\n-4.3339606223427801e+01\n-6.8831759032019137e+00\n1.6013187721284186e+01\n-4.2507628353371992e+01\n-6.9482626951620077e+00\n1.6182269704678653e+01\n-4.2952181893527033e+01\n-9.3805843545828012e+00\n1.5344904656871011e+01\n-4.0115985476608024e+01\n1.4606292106617762e+00\n1.8798390641515731e+01\n-5.3313762969609968e+01\n1.0651041500777806e+01\n2.0944465528042524e+01\n-6.3359322039277181e+01\n-9.6666934842151040e+00\n1.4942420133351369e+01\n-4.0637954818561255e+01\n6.0194423766762943e+00\n1.7785798349486214e+01\n-5.4512565289515528e+01\n4.4745589877198064e+00\n1.7287668537239583e+01\n-5.4178103293758433e+01\n1.2663545761559694e+01\n9.2237698722047714e+00\n-3.4808746930913181e+01\n1.5195142437602684e+01\n9.6177446264060649e+00\n-3.7517532824833332e+01\n8.7515867324469117e+00\n1.6290856992988203e+01\n-5.4767701466602389e+01\n-8.5335808087011564e+00\n1.4377245535427793e+01\n-4.3017491003219405e+01\n1.5048477776020997e+01\n9.4885170897746249e+00\n-3.7643794437128136e+01\n-1.0775917694010900e+01\n1.3748433470808918e+01\n-4.1052320179411907e+01\n-1.1494312806510790e+01\n1.3913685173475152e+01\n-4.1379212651242206e+01\n6.0219513933997389e-02\n1.5164551773928130e+01\n-5.0411323243562762e+01\n-1.1269205725877928e+01\n1.3656106095855209e+01\n-4.0741746098333728e+01\n1.2410316948767235e+01\n5.8874354761933922e+00\n-2.6288005323285795e+01\n-4.3622087587504667e-02\n1.5017557318524423e+01\n-5.0695286180041364e+01\n1.3610206800880269e+01\n7.9026595407822091e+00\n-3.4249824843207684e+01\n-6.7763351099861913e+00\n1.3460430335342735e+01\n-4.4265737916122539e+01\n-1.0675200149667994e+01\n1.2400668175617922e+01\n-3.9988369097938524e+01\n1.0253067122372292e-01\n1.4154761881526625e+01\n-5.2054023932607436e+01\n1.5230590650254925e+00\n1.3467845255481880e+01\n-5.0763696029968365e+01\n-9.8363386105313939e+00\n1.2247086460816494e+01\n-4.1573241769203797e+01\n-5.7047966750352945e-02\n1.2910007449374046e+01\n-4.9379754121518850e+01\n-5.7047966750352945e-02\n1.2910007449374046e+01\n-4.9379754121518850e+01\n-5.0035947832216836e+00\n1.3760206584351113e+01\n-4.9849374088094997e+01\n-3.8230856071692201e+00\n1.4024927156254289e+01\n-5.1631889840333884e+01\n2.6723379646518159e+00\n1.2032578277970307e+01\n-4.8472037564784777e+01\n-1.1100403896899182e+01\n1.2659340341025210e+01\n-4.3616974617434934e+01\n1.0902073493201145e+00\n1.2335888755799576e+01\n-4.8978850204959556e+01\n1.2873699797402621e+01\n9.7238615042501415e+00\n-4.5752381025728582e+01\n8.7962738979594146e+00\n1.0311355256508589e+01\n-4.6428535445783524e+01\n1.3712883309012707e+01\n4.1265911625640666e+00\n-2.5459291225793610e+01\n1.0170376288867825e+01\n9.9917056003882916e+00\n-4.6080431861455658e+01\n9.7132102870764925e+00\n9.5704550229283303e+00\n-4.5069021383356372e+01\n-1.3924638320740533e+01\n1.3420966145482900e+01\n-4.7444988372627122e+01\n-1.3924638320740533e+01\n1.3420966145482900e+01\n-4.7444988372627122e+01\n-3.6829288602958830e+00\n1.2354238252169608e+01\n-4.9705163335166795e+01\n-8.1882969790776450e+00\n1.1717493700090566e+01\n-4.5058670290131609e+01\n-2.1993913344077431e+00\n1.1972987444596399e+01\n-4.9267304094508418e+01\n-1.1444243693909916e+01\n1.0760130089552558e+01\n-3.9547221529074939e+01\n-1.8159284310906088e+00\n1.1293584651110285e+01\n-4.7325019259497381e+01\n1.2094872005157873e+01\n8.5254268121529151e+00\n-4.4061936193526492e+01\n1.2094872005157873e+01\n8.5254268121529151e+00\n-4.4061936193526492e+01\n1.5311925111390751e+01\n4.2444407898595742e+00\n-2.8824604955892575e+01\n-1.1914583258592399e+01\n1.1259434633377719e+01\n-4.1871195512793342e+01\n-1.2155224781359644e+01\n1.1901514020633069e+01\n-4.3990322120872619e+01\n1.4273675738196633e+01\n3.1577566083318569e+00\n-2.3870437357568509e+01\n-4.4231085438984277e+00\n1.2028862412888445e+01\n-4.9903333368030196e+01\n-9.8126165674212604e+00\n1.2429168225494388e+01\n-4.8952245499871893e+01\n1.3916292726808900e+01\n3.4563794569770976e+00\n-2.5653718368798927e+01\n-5.7915863526719082e+00\n1.2119599113593814e+01\n-5.0483900599008187e+01\n-1.0630592302552566e+01\n1.2406327262543170e+01\n-4.9093482553254475e+01\n-3.7516305166348798e+00\n1.0779269658642969e+01\n-4.6793396525259418e+01\n1.4962052598175720e+01\n3.3117083365401223e+00\n-2.6175752898012810e+01\n-1.1783115990419228e+01\n1.2356433821445506e+01\n-4.8600768255991547e+01\n-8.1920166889131867e+00\n1.2198026827653214e+01\n-5.0285015458515382e+01\n1.2801151512401587e+01\n4.6018393456518947e+00\n-3.0785156743325398e+01\n-1.3429103126619061e+01\n1.2040225424785929e+01\n-4.8070469653879940e+01\n-1.0838879240435094e+01\n1.1940509133865330e+01\n-4.9094035908276751e+01\n-1.0649019952919769e+01\n1.1610963092341713e+01\n-4.7292429592602304e+01\n-1.2006119417508373e+01\n1.1511384008211650e+01\n-4.6422351034384285e+01\n1.3467178387504919e+01\n6.5847378174204474e+00\n-4.1238461623647446e+01\n1.4027477401038450e+01\n3.0581265813306797e+00\n-2.5877516069101148e+01\n1.3732905901439421e+01\n2.9367158194687661e+00\n-2.5391276612707166e+01\n-9.6931652783484523e+00\n1.1414367859731328e+01\n-4.8114328610344707e+01\n-1.1051255318512718e+01\n1.1270356171204449e+01\n-4.7371934979357867e+01\n-1.2428186183664002e+01\n1.1024166814456732e+01\n-4.5608030165895848e+01\n2.3504114608184086e+00\n8.6703514034626998e+00\n-4.4909115142595311e+01\n-6.6763146977383023e+00\n1.0785031363941533e+01\n-4.8360894998051165e+01\n-8.9968844036374591e+00\n1.0299357712284330e+01\n-4.5531109310452756e+01\n-1.0564501656616503e+01\n1.1370399366483314e+01\n-4.9121116217075148e+01\n-1.3875094544755187e+01\n1.0251678673992982e+01\n-4.2656357560988596e+01\n-1.5072963931984136e+00\n8.6346531936810038e+00\n-4.3870698957241622e+01\n-6.1374447673476888e+00\n9.4058553944938446e+00\n-4.4516987125745494e+01\n-1.0599393333815133e+01\n1.1156267555835434e+01\n-4.9495927869551892e+01\n1.3650557423841613e+01\n5.4631336111312256e+00\n-3.9730642608978719e+01\n-1.2775623591002706e+01\n1.0927936450409343e+01\n-4.6852665222532757e+01\n-6.0871583487896928e+00\n9.2584073730420453e+00\n-4.4382451847394059e+01\n1.3394985836002304e+01\n5.4580692316392350e+00\n-3.9591458670732329e+01\n-1.1573518509841195e+01\n1.1019294138601408e+01\n-4.9115373250029165e+01\n-1.1631298780142643e+01\n1.1017437737187819e+01\n-4.9168027274865338e+01\n-1.1286739238738651e+01\n1.0807725312306895e+01\n-4.9167745673360351e+01\n-6.6027184750236918e+00\n9.3524352529368890e+00\n-4.5157765394493971e+01\n-1.3022356424329228e+01\n1.0937366490722299e+01\n-4.8760178741575324e+01\n3.9994360212706093e-01\n3.7360950742783863e+00\n-2.3194428062227839e+01\n-7.7019470373859358e+00\n9.6692088802467424e+00\n-4.6312393519780514e+01\n-1.2017837180554451e+01\n9.3463971452424932e+00\n-4.2232502886657784e+01\n-1.2568982761319511e+01\n1.0727425115374020e+01\n-4.9290249399435773e+01\n-7.1222443578216650e+00\n9.0046767844628821e+00\n-4.5317889882404529e+01\n1.2355700483730359e+01\n4.6835435601873492e+00\n-3.8591155799101607e+01\n-3.3772186847607415e+00\n8.2745586259574040e+00\n-4.4456133234026169e+01\n-1.6934939891708524e+01\n1.0092732195268091e+01\n-4.3493674211037685e+01\n-1.6934939891708524e+01\n1.0092732195268091e+01\n-4.3493674211037685e+01\n-1.4189745873336424e+01\n8.4991128000271718e+00\n-3.8679626261806860e+01\n-7.8628542242359112e+00\n8.8650682005567614e+00\n-4.5449189398725792e+01\n-1.3395236111309780e+01\n1.0287973942290099e+01\n-4.8573566013807650e+01\n-5.5737688050334082e+00\n7.8815608959080965e+00\n-4.2906259032801493e+01\n1.2231065349965482e+01\n4.3278701658238425e+00\n-3.8162523657028942e+01\n-1.3096599240461207e-01\n3.2473008861804828e+00\n-2.2639356615484473e+01\n1.4134198448527641e+01\n1.3800545628115750e+00\n-2.4338923334097501e+01\n-1.4020958870504955e+01\n8.6701088616163133e+00\n-4.0681235925346606e+01\n1.2893211744866310e+01\n2.7492764930321956e+00\n-3.0678959608088345e+01\n1.5062071254121319e+01\n3.8839099567865580e+00\n-3.9443856750762485e+01\n1.4032336421905116e+01\n1.2819973146134129e+00\n-2.4723596277213275e+01\n-8.9065469526246623e+00\n8.4319151954300722e+00\n-4.4769940298248301e+01\n-1.2336579896253406e+01\n8.9207997931503797e+00\n-4.5709516797548908e+01\n1.2032228214170173e+01\n3.5669879561973659e+00\n-3.6935779084081062e+01\n-1.5989041286760758e+01\n9.0345300745038255e+00\n-4.4845154955975069e+01\n4.5438632245911297e+00\n2.5847373286313080e+00\n-2.4997656588606009e+01\n4.3446462677413100e+00\n2.0076931263381663e+00\n-2.2026180771718522e+01\n4.8332443560644145e-02\n2.4795309840710646e+00\n-2.1573378042915916e+01\n-1.0881949092864229e+01\n7.2799312714768751e+00\n-4.1246005978355207e+01\n-1.3882687006282127e+01\n8.7316177477143242e+00\n-4.6991642732409574e+01\n-1.3882687006282127e+01\n8.7316177477143242e+00\n-4.6991642732409574e+01\n5.8785228285108939e+00\n2.3491022484847766e+00\n-2.6453487287121504e+01\n4.5262988582886550e+00\n1.8064322359413396e+00\n-2.2148559374344529e+01\n-1.3724704944520925e+01\n8.3743449405711399e+00\n-4.6688720393049508e+01\n-6.9637100374906220e+00\n6.0843104033306616e+00\n-4.0136719749224412e+01\n1.4706177684894788e+01\n9.2916345224544006e-02\n-2.3137879034228536e+01\n8.7177765423125730e-01\n1.9917661571491989e+00\n-2.0998489958580564e+01\n2.7031655197266486e+00\n2.0614434038919502e+00\n-2.3169992427908610e+01\n1.5723258888875858e+01\n9.7450241405582649e-01\n-2.9746683200537031e+01\n2.0707633926350897e+00\n1.6933468377091090e+00\n-2.0610929925623292e+01\n-6.2332692529647993e+00\n5.7460698344004397e+00\n-3.9873264379911426e+01\n6.2000823972156880e+00\n1.9337849678911680e+00\n-2.6793313162323109e+01\n1.5665497496270747e+01\n2.2283174590353521e+00\n-4.0415615793212453e+01\n1.2075286505374237e+01\n2.0602256729429880e+00\n-3.5161092962553390e+01\n2.1836458274097557e+00\n1.4597976642165480e+00\n-2.0568323573456226e+01\n1.2173078088187481e+01\n1.7543871643205216e+00\n-3.4788549955444950e+01\n1.1340870357216599e+00\n1.5309331784319742e+00\n-2.0623552065534032e+01\n1.4206610657819285e+01\n2.5371635537441595e-02\n-2.6322215993916249e+01\n1.6859292419043641e+01\n3.0954678865803466e-02\n-2.8796719686007119e+01\n-4.9412412324474246e+00\n4.7014893791160413e+00\n-3.8593416717042409e+01\n1.4537313522613140e+01\n8.2056870170799934e-01\n-3.2159918456481606e+01\n-1.9032122339238828e+01\n8.2399228374747899e+00\n-4.8960310434998718e+01\n1.4611883551769454e+01\n7.5232804967130740e-01\n-3.2399389845052447e+01\n1.3594709051364021e+01\n6.4900979211518994e-01\n-3.0984154771676334e+01\n1.3594709051364021e+01\n6.4900979211518994e-01\n-3.0984154771676334e+01\n-8.4056311431308544e+00\n5.0115890534127825e+00\n-3.8566167159721999e+01\n-1.1847306248862635e+00\n1.8809562732699989e+00\n-2.2678258377954052e+01\n1.2406953818222130e+01\n1.0778029713111983e+00\n-3.3964263006045648e+01\n1.4750923428024887e+01\n-2.2739381423612087e-01\n-2.6834328477947128e+01\n1.4058753211071899e+01\n6.2201153325381964e-01\n-3.3524530505084599e+01\n1.4372399015486396e+01\n-2.3250470861611069e-01\n-2.8515383181012190e+01\n1.4960600442427531e+01\n-1.0422324225646249e+00\n-2.3842274604931170e+01\n-6.5776945196180687e+00\n3.8985610466153013e+00\n-3.7771761882121012e+01\n-6.5386613444575019e+00\n3.8602685935124876e+00\n-3.7285354813481469e+01\n3.9244497651378900e+00\n4.4482106832822083e-01\n-2.0988636075550190e+01\n1.4274749089620887e+01\n-4.0304939316634775e-01\n-3.1813141721242118e+01\n-6.7937309991570602e+00\n3.1865098952995128e+00\n-3.6342676770777068e+01\n1.4537932048950024e+01\n-1.1159845732523688e+00\n-2.9127982097569689e+01\n1.0976274497166054e+00\n4.6572377219159616e-01\n-2.1114112379297161e+01\n1.4603274793536203e+01\n-9.5832684681941183e-01\n-3.2259715867585570e+01\n6.8714599182702685e+00\n-3.9022687134904188e-01\n-2.3324576125209319e+01\n1.7591506256489242e-01\n4.6081910933850068e-01\n-2.0590539571281095e+01\n-1.0146635587101089e+01\n3.2758476825195486e+00\n-3.5547378785141660e+01\n-5.2136515777591175e+00\n2.3900139794335344e+00\n-3.5419405037658876e+01\n-2.0724653555147734e+00\n9.6853069954472182e-01\n-2.3237824914478900e+01\n-1.9288866640457500e+00\n8.9776379699045339e-01\n-2.2961904958346995e+01\n-8.0916894208656931e+00\n2.6927314437319754e+00\n-3.5350451543353294e+01\n-7.1734872384419601e+00\n2.5130621513113254e+00\n-3.6007001626963600e+01\n-8.3745810740858904e+00\n2.6775412518144006e+00\n-3.5319454186905290e+01\n-1.3979353611011364e+01\n3.8913422265085842e+00\n-4.0380621106664073e+01\n1.4025906865680321e+01\n-1.4814951275126520e+00\n-3.1869721921688356e+01\n1.3059628466208745e+01\n-1.5089470453727092e+00\n-3.0820956409175736e+01\n1.3059628466208745e+01\n-1.5089470453727092e+00\n-3.0820956409175736e+01\n-1.9616136176102712e+00\n5.0799091970813359e-01\n-2.2815524437135430e+01\n9.9130881323308129e-01\n-6.1974443468649762e-02\n-2.1179040579968767e+01\n2.1564471668824221e+00\n-3.3603230581059040e-01\n-2.1506309570058104e+01\n-1.9765055456976952e+00\n3.5364706451284350e-01\n-2.2566354717724639e+01\n-1.3615434611526297e+01\n2.8698149232040437e+00\n-3.3355671334750888e+01\n-1.3615434611526297e+01\n2.8698149232040437e+00\n-3.3355671334750888e+01\n-1.4998653081919926e+00\n8.6762752574623698e-03\n-2.2089132885016866e+01\n1.3931295002872352e+01\n-2.3519720405777362e+00\n-3.0077741183152650e+01\n-9.6729696357782249e+00\n1.5585767936840875e+00\n-3.3474348058440938e+01\n-9.6393058949612591e+00\n1.5547042600081236e+00\n-3.3327744608259401e+01\n-8.6932675687998628e+00\n1.3030946473055940e+00\n-3.3186949405487617e+01\n-6.7910547733348041e+00\n9.5412425383995803e-01\n-3.3508124869344975e+01\n-1.8502617157804588e-01\n-5.4153627500029766e-01\n-2.0914131072100226e+01\n1.5188314953776375e+01\n-3.2506276495696951e+00\n-2.7165184988380076e+01\n1.5616817572871485e+01\n-3.3986013642469346e+00\n-2.4485352830421419e+01\n-7.7818684174658772e+00\n9.9266960435281870e-01\n-3.3974616322201705e+01\n-9.4342233049556974e+00\n1.2851046962795070e+00\n-3.3119268472798616e+01\n-8.3504637939772532e+00\n1.0768257100172383e+00\n-3.2950047995046816e+01\n-2.5728729913965274e+00\n-1.7949727821496059e-01\n-2.2819143152307959e+01\n5.3095046938049180e+00\n-1.5687371131401699e+00\n-2.1637268116403988e+01\n-8.2288438895389895e+00\n1.0204568589558909e+00\n-3.3787895533334833e+01\n-1.1199790822795928e+00\n-5.4670836132378664e-01\n-2.1513403453731726e+01\n-3.0013853180892864e+00\n-2.7209370802088478e-01\n-2.2903265505424191e+01\n-1.6229715438276480e+00\n-6.4869872832509812e-01\n-2.1383465665342527e+01\n-2.1881679283552606e+00\n-5.5713508197279138e-01\n-2.2095974834797705e+01\n-6.3279915356757233e+00\n2.4055539697325701e-01\n-3.2854108740889160e+01\n-6.2125664807542469e+00\n9.1570966526128353e-02\n-3.2741385049776866e+01\n-2.1465617539312070e+00\n-6.7616388540943451e-01\n-2.2044788748076190e+01\n2.2614688172775360e-01\n-1.0826648510468622e+00\n-2.1547341577744405e+01\n1.3106267688250492e+01\n-3.3966794270472915e+00\n-2.8638438685247969e+01\n1.3603365626837837e+01\n-3.4893406827699511e+00\n-2.8255258127070935e+01\n-6.6278302221626086e+00\n-7.1807994038546610e-02\n-3.1980811842107112e+01\n-1.1463577310284499e+01\n7.4034629423835852e-01\n-3.1783398828366266e+01\n-7.1381451388897643e+00\n-7.3960806475324256e-02\n-3.2614546106469952e+01\n-6.3855398865251747e+00\n-2.4567693741632318e-01\n-3.1682133600423871e+01\n-1.1965550624350607e+01\n6.6215575039034236e-01\n-3.3806692855978930e+01\n1.8635210931638749e-01\n-1.3457913282583727e+00\n-2.0531695354640387e+01\n-2.5473674446671106e+00\n-8.8524693962311307e-01\n-2.2381772050479285e+01\n-1.1238053794641393e+01\n5.1585151311238153e-01\n-3.1696047393852883e+01\n-2.5959263255500273e+00\n-9.4560312400535440e-01\n-2.2080161699849342e+01\n-7.3724455506328015e+00\n-3.1266892582945022e-01\n-3.2254844131367285e+01\n-2.7654152963908469e+00\n-9.3265065075495057e-01\n-2.2575010411728222e+01\n5.7329927798498048e-01\n-1.5305020459938201e+00\n-2.0970938787998985e+01\n-7.3255373232666221e+00\n-5.3247630703231175e-01\n-3.1967289763621466e+01\n-7.2207229619055333e+00\n-6.3515620639182435e-01\n-3.1750210070883792e+01\n-9.7225233976936671e+00\n-2.5918110670855421e-01\n-3.0637841074559343e+01\n-9.7225233976936671e+00\n-2.5918110670855421e-01\n-3.0637841074559343e+01\n-9.6433907721598011e+00\n-3.0469177502948613e-01\n-3.0575366324556018e+01\n-2.6594169041492393e+00\n-1.3087691711821263e+00\n-2.1699972870966636e+01\n2.6938917794185282e+00\n-2.1739201778281028e+00\n-2.0567757630369442e+01\n-8.0244063210848608e+00\n-7.3704469575263942e-01\n-3.1742116014200612e+01\n-9.1622158201928681e+00\n-5.9594896047460166e-01\n-3.1745320025592427e+01\n-1.6180293734017674e+00\n-1.5649569909152361e+00\n-2.2071221104009634e+01\n-7.7037617257680404e+00\n-8.6243765200932554e-01\n-3.1447987605145407e+01\n-1.1272286412329972e+01\n-3.5151134234378439e-01\n-3.2180602660830630e+01\n-1.0768878433954312e+01\n-4.9575445087115649e-01\n-3.1910943297770874e+01\n-7.6416706027076549e+00\n-9.9420679179588378e-01\n-3.1294925450717184e+01\n6.7202391797536727e+00\n-3.5526523501792426e+00\n-2.4223440189014966e+01\n-1.1558846497547933e+01\n-7.3897334396655123e-01\n-2.9430165963174403e+01\n1.2140980816426589e+01\n-4.9753148082537129e+00\n-2.6538062786079220e+01\n1.3682686424541538e+01\n-5.1423632587183379e+00\n-2.4999400060322419e+01\n-1.1214696756401366e+01\n-1.0545449180677671e+00\n-3.2459176091191097e+01\n-5.5765336543767367e-03\n-2.4525682832021034e+00\n-2.1016005632384989e+01\n-9.3082597811891592e+00\n-1.3878854117768931e+00\n-2.9301635262985915e+01\n9.9790726411394228e+00\n-4.7765476394922644e+00\n-2.6306941844383047e+01\n-9.0029395099804219e+00\n-1.4679095101693171e+00\n-2.9130035122156951e+01\n-9.1938445904076147e+00\n-1.4998250993668367e+00\n-2.8989406423184974e+01\n-9.3623755476346879e+00\n-1.6316700924155831e+00\n-3.0901825657594937e+01\n-1.9811443908565165e+00\n-2.3479833539336306e+00\n-2.1384342716101813e+01\n-1.2157578937796834e+00\n-2.5284089438548909e+00\n-2.0071352439200240e+01\n-7.2271163767221491e+00\n-2.3096210963289772e+00\n-2.9590287109248756e+01\n1.1210540682733059e+01\n-5.5895245916913812e+00\n-2.5469308662678433e+01\n1.1210540682733059e+01\n-5.5895245916913812e+00\n-2.5469308662678433e+01\n9.3707523767834981e+00\n-5.3200376230050654e+00\n-2.5501678604701972e+01\n-6.6924473720463480e+00\n-2.7668729650945822e+00\n-2.7994626992633204e+01\n-1.1143018894264117e+01\n-2.1776800246820409e+00\n-2.9777357178501461e+01\n-2.8689620404967484e+00\n-3.0083157862794452e+00\n-2.3498267696513270e+01\n5.4401863059591546e+00\n-4.5866513433958227e+00\n-2.2876493648730172e+01\n-1.0836203013660349e+01\n-2.2385336899262911e+00\n-2.9701410182699547e+01\n1.6760484657802193e+00\n-3.7201756361254277e+00\n-2.0607267577469980e+01\n1.6310646125773400e+00\n-3.6634783426565916e+00\n-2.0465562352772256e+01\n-1.0990027833657164e+01\n-2.3148968541014656e+00\n-2.9609497002780092e+01\n-1.0792673846699838e+01\n-2.3151866344618801e+00\n-2.9230536696939883e+01\n-1.0095509489005066e+01\n-2.2730642526731772e+00\n-2.7760488369558100e+01\n1.0951340812824339e+01\n-6.0869301741718260e+00\n-2.4982513531076975e+01\n8.8001734927544213e+00\n-5.7944268637188161e+00\n-2.4904593570554280e+01\n-7.8726840443398824e+00\n-3.0162584285213230e+00\n-2.8520350180987254e+01\n-3.0047768018585805e+00\n-3.4894197504221545e+00\n-2.3391173392826950e+01\n-9.0689475525389707e+00\n-2.8491797854852701e+00\n-2.7110204705613892e+01\n-1.0384379826336698e+01\n-2.8422424737545304e+00\n-2.6336120045213878e+01\n-1.1063752827146679e+01\n-3.0370025239545066e+00\n-2.8329514783463235e+01\n-1.0127894165664292e+01\n-2.9026763145767558e+00\n-2.6201449280980334e+01\n1.4598778393564094e-02\n-4.5512903995931904e+00\n-2.2894556454348653e+01\n7.7399452778445497e+00\n-6.4784754789625261e+00\n-2.3900368746336905e+01\n-9.0758804086965643e+00\n-3.5370670533370161e+00\n-2.5927940463295091e+01\n-8.1883960776095641e+00\n-3.9026029818245673e+00\n-2.5645554264740220e+01\n-8.5967524276798049e+00\n-3.9195016799750726e+00\n-2.5439033880482604e+01\n6.4615389441196500e+00\n-6.7091549638515975e+00\n-2.3002578192240488e+01\n6.5083879364260939e+00\n-6.7494923993865372e+00\n-2.3106770236709853e+01\n-8.3115887594457138e+00\n-4.1594985384618113e+00\n-2.5185645937601148e+01\n6.1582666372959034e+00\n-6.8671392368646060e+00\n-2.2821490581595501e+01\n-4.1928449293278724e+00\n-5.2529917128542785e+00\n-2.3997077509191552e+01\n-3.5183369918017831e+00\n-5.4097113476530732e+00\n-2.3488374871301705e+01\n-6.8886809708947361e+00\n-5.1850688231152704e+00\n-2.5634453104244205e+01\n-6.4814928951548456e+00\n-5.2535893662539648e+00\n-2.5226101961342540e+01\n-6.1389758867014663e+00\n-5.2215154540858375e+00\n-2.4270569941423457e+01\n-9.8923662850811276e+00\n-4.4620118353169316e+00\n-2.3488880211707038e+01\n-7.3961228860436341e+00\n-5.3641591871165675e+00\n-2.5410583996941522e+01\n-3.0183783726676283e-01\n-6.5746678895885644e+00\n-2.2104374074028414e+01\n-6.8069922454766205e+00\n-5.5647205975063061e+00\n-2.3526947396106564e+01\n-6.7208528017551314e+00\n-5.6061255716099225e+00\n-2.3560923169480624e+01\n-4.5629095142777114e+00\n-6.2062535233066578e+00\n-2.3204698244318738e+01\n-7.3878419371416451e+00\n-5.6589744783154350e+00\n-2.3013133406953976e+01\n-9.1504953513432756e+00\n-5.4098863260289081e+00\n-2.2271837036915993e+01\n-5.7451469612308994e+00\n-6.3077507987378301e+00\n-2.2707751868759242e+01\n6.4664345992296592e+00\n-8.5322768505562951e+00\n-2.1024486859355214e+01\n-6.1284794078622591e+00\n-6.2953159323290704e+00\n-2.2567617265506765e+01\n-7.8363702861670692e+00\n-5.9395060173818282e+00\n-2.2116872445621162e+01\n3.4161751654382639e+00\n-8.1071490610476946e+00\n-2.1054539642234591e+01\n8.2985106368398274e+00\n-9.2538721252905560e+00\n-2.0792020113430151e+01\n-5.9258619223600180e+00\n-6.5610480647857354e+00\n-2.2087086402227296e+01\n-7.9693724136971529e+00\n-6.0994806270261037e+00\n-2.2042655482387261e+01\n-6.7711573067233513e+00\n-6.4050412235273031e+00\n-2.1966747887545303e+01\n5.0475691762224573e+00\n-8.6592728025363623e+00\n-2.0400834928184718e+01\n-3.7160244965061962e+00\n-7.4429639557407201e+00\n-2.2600285310546116e+01\n2.6757247581246508e+00\n-8.2285084909843142e+00\n-2.0694425910744854e+01\n-5.8107216543638796e+00\n-6.7592056509029126e+00\n-2.1710015070112338e+01\n-5.8107216543638796e+00\n-6.7592056509029126e+00\n-2.1710015070112338e+01\n-1.4085336329385763e+00\n-7.6420861793050063e+00\n-2.1364778026837634e+01\n-3.9688825792218831e+00\n-7.1403398101165232e+00\n-2.1468847458274535e+01\n-4.0835388090489533e-01\n-7.8611166220738111e+00\n-2.1214569299640669e+01\n-8.4625962563095258e-01\n-7.7785544327813190e+00\n-2.1218854401849384e+01\n1.7848516137233641e+00\n-8.2605466168527553e+00\n-2.0613756446374573e+01\n2.1242507168196894e+00\n-8.3610612418828403e+00\n-2.0581942606106825e+01\n-9.4916251506751359e-01\n-7.8535751171005757e+00\n-2.1107190125223774e+01\n4.7375518001803307e+00\n-8.8096778077779323e+00\n-2.0105235368605324e+01\n3.1998458620532584e+00\n-8.5875740672209471e+00\n-2.0206790464658177e+01\n-7.4845396165777931e+00\n-6.5423317123913156e+00\n-2.1250679455235137e+01\n3.3339557297500546e+00\n-8.6183494585203277e+00\n-2.0196387393047448e+01\n3.7555130137960075e+00\n-8.7461152565811666e+00\n-2.0217337937400604e+01\n4.9127654423011844e+00\n-9.2253564285522458e+00\n-2.0199267469823674e+01\n1.7800606820390714e+00\n-8.4966505410680533e+00\n-2.0223534223130866e+01\n1.7800606820390714e+00\n-8.4966505410680533e+00\n-2.0223534223130866e+01\n-4.9665865026768863e+00\n-7.3667891678877160e+00\n-2.1097760915320958e+01\n4.9901410992566220e+00\n-9.1148607108472230e+00\n-1.9554958448994370e+01\n5.2357389385111341e+00\n-9.1554671541798207e+00\n-1.9513368205918187e+01\n6.0601232703287149e+00\n-9.6425985306974553e+00\n-1.9536526310894128e+01\n3.4455176741160467e+00\n-9.1555515670416785e+00\n-1.9511054312534498e+01\n-1.1478872353996872e+00\n-8.3923572140506337e+00\n-1.9964065283778073e+01\n-1.1478872353996872e+00\n-8.3923572140506337e+00\n-1.9964065283778073e+01\n1.9731541338345480e+00\n-9.0069673991504544e+00\n-1.9444308151038179e+01\n-4.2751992258077881e-01\n-8.5759757683672628e+00\n-1.9803978782720161e+01\n-1.0159412125980816e+00\n-8.5160368425154225e+00\n-1.9729868598904961e+01\n1.8315485722007732e+00\n-9.4091961027872948e+00\n-1.9778452296818607e+01\n-4.2026680289117202e+00\n-8.2692545107820159e+00\n-1.9554429739527805e+01\n-4.0896649187969185e+00\n-8.3637418718445158e+00\n-1.9405471814408791e+01\n-2.9133155025300033e+00\n-8.6011326048423840e+00\n-1.9233870825347310e+01\n-3.7013783956155959e+00\n-8.4781616697327493e+00\n-1.9200433469890942e+01\n-3.6282055425999711e+00\n-8.6437474564791135e+00\n-1.9000166137013142e+01\n2.8904416861422759e+00\n2.0837794033129025e+01\n-5.2773615762936217e+01\n2.1006838699023969e+01\n2.4765309446617184e+01\n-6.7018576476622030e+01\n9.7607351290014961e+00\n2.0217824748031166e+01\n-5.6297654648444642e+01\n9.7797259834412209e+00\n1.8774052275213123e+01\n-5.6125989371704648e+01\n1.6097496208433659e+00\n1.8729594914931663e+01\n-5.3732157762630273e+01\n1.3124547062788682e+01\n9.5654232328607840e+00\n-3.3184727922408904e+01\n1.3293978084965397e+01\n9.6945071748120135e+00\n-3.3548820994131304e+01\n-3.3728975625968589e+00\n1.6070667483454848e+01\n-4.9892128916302617e+01\n1.2944315056625562e+00\n1.5949390243728443e+01\n-5.2371269606240226e+01\n-1.0159262947664743e+01\n1.2855686937716895e+01\n-3.9509181756837940e+01\n-1.0026336078780762e+01\n1.2799093328680810e+01\n-3.9943074348667096e+01\n1.3570908446279510e+01\n4.9251174487899805e+00\n-2.4374388323950598e+01\n1.7194812660892937e+00\n1.4703322152215407e+01\n-5.2343737615075966e+01\n-9.5194925141811193e-01\n1.4751783333640187e+01\n-5.1542815431432118e+01\n1.4897932604704851e+01\n8.4419466948895536e+00\n-3.7854532096478067e+01\n-1.2796421663022118e+01\n1.4810015453332108e+01\n-4.7150948942080490e+01\n2.2650162632775857e+00\n1.3697460559477912e+01\n-5.0900747788290104e+01\n-9.5554293757935547e+00\n1.3273392552764419e+01\n-4.4749579487859471e+01\n-3.0506346909237608e-01\n1.4524174631449176e+01\n-5.3420157230866536e+01\n-1.0642077190506210e+01\n1.1975604189010600e+01\n-4.0303227340303252e+01\n1.1310303456249994e+01\n5.8946983988195525e+00\n-2.9307311054140314e+01\n-9.7530144211529297e+00\n1.2101253656900189e+01\n-4.1649282002351015e+01\n-1.3630537469429418e+01\n1.2181321217850046e+01\n-4.0011139885251744e+01\n9.7125544561180846e-02\n1.2718655953352759e+01\n-4.9372838132906580e+01\n1.7428955595899838e+00\n1.2504802508909128e+01\n-4.8928107750814213e+01\n-1.7786343819114659e+01\n1.3357385087886522e+01\n-4.2195565209731420e+01\n1.3420146966906142e+01\n8.3771509590818312e+00\n-4.0832869318569529e+01\n-9.8971513693375286e+00\n1.1630259026463888e+01\n-4.1826784259875204e+01\n3.0503662064853953e-02\n1.2211283699943255e+01\n-4.8907099019455842e+01\n-1.1192805535900661e+01\n1.1215886027376463e+01\n-4.0370774083843820e+01\n5.6699714440635640e+00\n1.0071914579138850e+01\n-4.5816738856124324e+01\n5.3918556518590028e+00\n9.9804220485108246e+00\n-4.4534915802771025e+01\n-6.1316444343742571e+00\n1.2781663622246080e+01\n-5.0077995661439687e+01\n-1.2027439321138997e+01\n1.0669619199815383e+01\n-3.9389629908611532e+01\n1.5923070900423220e+01\n3.8658975295073086e+00\n-2.7968417538316132e+01\n-7.3486847922743666e+00\n1.1435596131016691e+01\n-4.5775125946562753e+01\n-2.3585470352948086e+00\n1.1101344253581075e+01\n-4.7549067312121622e+01\n-1.0669938829170935e+01\n1.1919822198776208e+01\n-4.6684678054796848e+01\n-1.2111642189222325e+01\n1.1304667333733821e+01\n-4.5028772051672107e+01\n1.2370879153247488e+01\n4.7288887099981638e+00\n-3.1650815266130326e+01\n-2.5657016300466520e+00\n9.7417989023986813e+00\n-4.4992365942333997e+01\n-1.0353333811514014e+01\n1.1720227520120888e+01\n-4.9060220071765954e+01\n1.1253342319116189e+01\n7.1048054127335405e+00\n-4.2307651869108085e+01\n9.8003904801163664e+00\n7.1742497617187233e+00\n-4.2234450297935375e+01\n-1.0492662867494138e+01\n1.1703499986340949e+01\n-4.9289254186522719e+01\n1.1819614197517900e+01\n6.7460267092171620e+00\n-4.1938718520365747e+01\n1.4147800169202936e+01\n5.9532087247883094e+00\n-3.9939624324359535e+01\n-1.1876042190803439e+01\n1.1579715724871301e+01\n-4.8890618098337669e+01\n1.4230401636364448e+01\n5.7831193097760583e+00\n-3.9784575553603872e+01\n-1.3578902644150904e+01\n9.6050114880215691e+00\n-3.9246346693188791e+01\n-6.4783982381685101e+00\n9.7173426219199968e+00\n-4.5185849598548799e+01\n-6.4743922825265194e+00\n9.6921739658309178e+00\n-4.5005659507454361e+01\n-6.1205493250001712e+00\n9.7205854145154866e+00\n-4.5430860117758833e+01\n1.4900538914351082e+00\n8.2375885625401661e+00\n-4.3373609385067844e+01\n1.0176341857537050e+01\n6.1632580289569869e+00\n-4.0524481217405345e+01\n1.0182201973465808e+01\n6.1616706165408210e+00\n-4.0539904837972493e+01\n-1.1270113379717520e+01\n1.0898391209457136e+01\n-4.7882676971336004e+01\n-1.3098551649498667e+01\n1.0831921943941211e+01\n-4.6867237331908633e+01\n-1.3310654017066639e+01\n1.0702798509991696e+01\n-4.6693758931005945e+01\n-1.2377542168117980e+01\n1.0529805001394264e+01\n-4.7404974590818235e+01\n-1.2391042704107393e+01\n1.0554712529595168e+01\n-4.7459293256330362e+01\n-1.2575238251768347e+01\n1.0624062847746778e+01\n-4.9521646556545100e+01\n-1.2548332689378590e+01\n1.0311821870659889e+01\n-4.7779389364830848e+01\n-1.4313062366288522e+01\n8.0757386697568023e+00\n-3.7427544294583129e+01\n-1.4804540704426602e+01\n1.0083170797061014e+01\n-4.9594670387924360e+01\n-1.3862871500947243e+01\n8.2716754531162184e+00\n-4.0671463634787820e+01\n1.2129821063843170e+01\n3.5222814329552072e+00\n-3.6819846531568345e+01\n-5.4534623580054413e+00\n6.8201107186782668e+00\n-4.1736573361307052e+01\n-1.4076882708603332e+01\n8.7759716233664555e+00\n-4.6211445631379732e+01\n-3.4572947189490923e+00\n6.0790368699291166e+00\n-4.0914521999311219e+01\n-5.9007420140681859e+00\n6.0712540219058040e+00\n-4.0349183878405427e+01\n1.3551565001052376e+01\n1.3115354544751623e+00\n-2.9968224773824616e+01\n-9.0572151208699943e+00\n6.6396360740870968e+00\n-4.2456579220770372e+01\n-9.0572151208699943e+00\n6.6396360740870968e+00\n-4.2456579220770372e+01\n7.0541588695350255e+00\n1.7300567752867098e+00\n-2.5899347935524681e+01\n-3.7872635483347512e+00\n5.4257271442075190e+00\n-3.9918537430559510e+01\n-9.6155672261777383e+00\n6.3279871702047554e+00\n-4.0123104892613782e+01\n-9.6282747614432331e+00\n6.1866711574451010e+00\n-3.9738574791613829e+01\n-1.4050810810577431e+01\n7.6154472891843383e+00\n-4.5705794270204969e+01\n1.5168220978703880e+01\n2.4303938313236069e+00\n-4.1165347358697659e+01\n3.7427141963320891e+00\n1.3333571183124309e+00\n-2.1198209081769232e+01\n-6.3320982803558614e+00\n5.1630083826666970e+00\n-3.9080736020285208e+01\n-6.1943016757696778e+00\n5.0367908013314135e+00\n-3.9231744609281783e+01\n-1.5781910222835045e+01\n7.5318446646829873e+00\n-4.6514740164422555e+01\n-8.1264133416658080e-01\n1.9359263158076783e+00\n-2.1926604943630377e+01\n-1.1075531949085866e+01\n6.0502398015693952e+00\n-4.2286714499002514e+01\n-5.9632017993269280e+00\n4.8098266211853655e+00\n-3.8812604164521652e+01\n-1.7487930997239496e+00\n2.2705456085671667e+00\n-2.4153487414601614e+01\n-1.0525690027978158e+01\n5.0687116611209833e+00\n-3.8069638269291239e+01\n-7.9010478936841642e+00\n4.6232539013467413e+00\n-3.9238209147098217e+01\n1.1952163535217116e+01\n7.9685272006978125e-01\n-3.3504613117852443e+01\n-8.2954536844811653e+00\n4.4613412680128279e+00\n-3.7749321675828945e+01\n1.3750759935483680e+01\n4.3643091499069464e-01\n-3.3270343408183884e+01\n-1.0847729125312341e+01\n4.8021874836504734e+00\n-3.7443493730599329e+01\n1.3573855573747435e+01\n4.6900052192194608e-01\n-3.3987778392211261e+01\n-7.5738713635320796e+00\n4.1350966991494289e+00\n-3.7731860645963465e+01\n-5.7793353201051403e+00\n3.7152097919535931e+00\n-3.7298139342478009e+01\n4.7987218928096160e+00\n5.9615864201792934e-01\n-2.3231625985766932e+01\n-7.3660225314859815e+00\n3.7189024927071244e+00\n-3.6693901401665698e+01\n6.7599816478888384e+00\n1.3430473874632562e-01\n-2.3808539088729312e+01\n-6.7550239840520208e+00\n3.5387624958555994e+00\n-3.6895825631705208e+01\n1.3703111955763219e+01\n-4.4732477286889383e-01\n-3.2255108350099725e+01\n1.4132256861406674e+01\n-7.0017693320015639e-01\n-3.1563901123033506e+01\n-1.8427860912320369e+01\n5.6172962212465523e+00\n-4.5170606859006057e+01\n1.4886878276107687e+01\n-9.5928653558498522e-01\n-3.2502952600503100e+01\n1.4255765568324215e+01\n-1.1924390357629107e+00\n-3.1554091397065260e+01\n-1.2235925823463731e+01\n3.3620470537383609e+00\n-3.5540851665476325e+01\n1.4423965414000657e+01\n-1.3850620086677292e+00\n-3.1352844697106857e+01\n1.5410262487824438e+01\n-2.2559454079958576e+00\n-2.3606286167063224e+01\n-2.6085048414193914e+00\n8.7738992880876154e-01\n-2.3640774846807805e+01\n-5.9772950479603386e+00\n1.6773636888683923e+00\n-3.4848090022993418e+01\n2.6196623853857099e+00\n-4.1497115120387612e-01\n-2.1540666176533353e+01\n-3.3278446037988121e+00\n6.7366517316741692e-01\n-2.4072219101167022e+01\n-6.9764295706043002e+00\n1.7881158238592059e+00\n-3.4328961847924674e+01\n-7.8209037916160993e+00\n1.8065258029702445e+00\n-3.4162362498832692e+01\n-9.8429231396376000e+00\n2.0404805358621982e+00\n-3.3973000274399773e+01\n-2.9910335551466076e+00\n3.6106328067433990e-01\n-2.3740306934767936e+01\n1.2496541247512706e+01\n-2.2188260267891837e+00\n-3.0538880073461176e+01\n-5.9246344189894398e+00\n9.3802192024282394e-01\n-3.3544975129704852e+01\n1.3633960044265871e+01\n-2.5171535530023368e+00\n-3.0068964758051859e+01\n-9.4339723099793744e+00\n1.5089339381426969e+00\n-3.3157657727192543e+01\n5.5566114281378951e+00\n-1.4597219670096584e+00\n-2.1744420002336206e+01\n-2.8103469696479348e+00\n-2.1337921904638524e-01\n-2.2913132554438988e+01\n1.2847203132426085e+01\n-2.8916631845276686e+00\n-2.8087356909888477e+01\n-2.8221864906682077e+00\n-2.9750530587791590e-01\n-2.2933010133859227e+01\n1.5599270281709117e+01\n-3.6801258032638846e+00\n-2.5004157469893812e+01\n-6.2987680207158618e+00\n3.6488016968809756e-01\n-3.2462017835978934e+01\n-8.5980221894640625e+00\n6.1385194050897274e-01\n-3.2204623441740267e+01\n-2.9179460917817042e+00\n-4.8585608303599115e-01\n-2.2696614498889819e+01\n-7.1165876759285620e+00\n2.0973456789514153e-01\n-3.2219201793254221e+01\n1.1367798987172851e+01\n-3.0315571387943181e+00\n-2.8683634101406742e+01\n-1.6125046130660084e-01\n-1.0710169434214354e+00\n-2.0780779583152523e+01\n-2.4042975015695305e+00\n-8.8094524875535640e-01\n-2.2071412753759191e+01\n-2.1963702939873326e+00\n-9.9039537337595096e-01\n-2.1972506893214071e+01\n-2.5156684225472858e+00\n-9.5311248807494231e-01\n-2.2265063469645021e+01\n-8.6762634654024406e+00\n-1.5687700950561301e-01\n-3.2418759828852423e+01\n-2.6802616093314695e+00\n-1.0584347529467848e+00\n-2.1881396955779472e+01\n1.3197819931331118e+01\n-4.2655888501370365e+00\n-2.6829239741269276e+01\n-8.3361513991085427e+00\n-3.0702907172078081e-01\n-3.1196113243865817e+01\n-2.3413100406085707e+00\n-1.2158188298939314e+00\n-2.1942655561641587e+01\n-8.1341814868387612e+00\n-4.8176600107554812e-01\n-3.2038097181197912e+01\n-2.9089416452050818e+00\n-1.2783744498495659e+00\n-2.1901418704429016e+01\n3.8445434984347662e+00\n-2.4922682127131335e+00\n-2.0378237140729514e+01\n-1.4306574171408464e+00\n-1.5806720190829353e+00\n-2.1201183966944079e+01\n-1.2068928657652163e+00\n-1.6437974693635995e+00\n-2.1214671148163895e+01\n-7.0110265192271051e+00\n-9.7982232308129980e-01\n-3.1328570240539108e+01\n-8.7283653158542105e+00\n-7.4333602013794320e-01\n-3.1626221303559291e+01\n-8.7817308357222128e+00\n-7.0983850868583198e-01\n-3.2016116811157772e+01\n-4.1952623380337606e-01\n-1.9116508361473472e+00\n-2.0747189521363680e+01\n-8.9953977596857893e-01\n-1.8961710791153736e+00\n-2.0867458110625464e+01\n-9.7068546220757277e+00\n-9.4788288071576354e-01\n-3.1253744662502633e+01\n-7.9252406619439766e+00\n-1.2737818390798059e+00\n-2.9790248628110600e+01\n-8.9253882947011167e+00\n-1.3715011770242378e+00\n-3.1106556904140490e+01\n-8.5508356362179256e+00\n-1.4516366689138180e+00\n-3.0242371509894177e+01\n-8.5357308501163782e+00\n-1.4886474651711143e+00\n-2.9254489179928989e+01\n-9.0579346693437888e+00\n-1.7558619680114684e+00\n-3.0186578062435938e+01\n-5.3859334763311650e-01\n-2.5365141427548141e+00\n-2.1217404385597892e+01\n-2.0021632212431315e-01\n-2.6937248048940106e+00\n-2.1259372869469090e+01\n9.2982666351005439e-01\n-3.0696947101536249e+00\n-1.9493290130869319e+01\n1.0981760247485859e+01\n-6.1304806443540736e+00\n-2.4880118158678414e+01\n1.0380303348482380e+01\n-6.3283680103937421e+00\n-2.4588452153315853e+01\n-2.2619094088787817e+00\n-3.7913859327004524e+00\n-2.3559409597322887e+01\n-8.3289990707032899e+00\n-3.3409603883662968e+00\n-2.6759368005799764e+01\n-9.9518018930493408e+00\n-3.1044078302349551e+00\n-2.5978809504921980e+01\n-1.0641117581637674e+01\n-3.4072802375621150e+00\n-2.8004220323937822e+01\n-7.2906616563105846e+00\n-4.0849710350185102e+00\n-2.7138524661240922e+01\n7.8014310705202066e+00\n-6.5843059513416069e+00\n-2.3552313679809714e+01\n6.7885635299382558e+00\n-6.5515364348585958e+00\n-2.3273207641908183e+01\n-1.3513090623512323e+01\n-3.7677080202924857e+00\n-2.7797543779203391e+01\n-8.4412874438928025e+00\n-4.2094215716916716e+00\n-2.4920002532589532e+01\n-8.6879389992408118e+00\n-4.3036067813601990e+00\n-2.4776870909296083e+01\n-7.9189351307720672e+00\n-4.8964156157134520e+00\n-2.6054496768838867e+01\n-7.5515763051905891e+00\n-5.1319991297893086e+00\n-2.5818362530376838e+01\n-7.6812506771169726e+00\n-5.1619671220914576e+00\n-2.5588231374293688e+01\n-6.6094623704388686e+00\n-5.3406067471565768e+00\n-2.5246055421486652e+01\n-7.4450585766137536e+00\n-5.3953498456716327e+00\n-2.5272900093213792e+01\n-7.4577816843011790e+00\n-5.4308971246357522e+00\n-2.5406649072599198e+01\n-2.9086595087252171e-01\n-6.4064097250069736e+00\n-2.2439524232405201e+01\n1.2497614210563273e+00\n-6.5822864008833708e+00\n-2.1811872288050086e+01\n-7.0783961343668722e-01\n-6.2730462294086351e+00\n-2.2224417658631900e+01\n-4.6526919022414965e+00\n-6.1554107177288397e+00\n-2.3230797049765357e+01\n9.2946549645272754e+00\n-8.9417584149004696e+00\n-2.1552571573946604e+01\n-4.6829962266205660e+00\n-6.3399757631383320e+00\n-2.2898343920400965e+01\n-7.8149725866563786e+00\n-5.7364831357664832e+00\n-2.2709332933968199e+01\n3.4964589377869699e+00\n-7.9052678777813803e+00\n-2.1439807418234146e+01\n-8.8498786464745791e+00\n-5.4861573505155476e+00\n-2.2336338824505415e+01\n-3.7449368368411755e+00\n-6.6713993641764153e+00\n-2.2558991189777835e+01\n-7.0782008120505431e+00\n-5.9890098042676270e+00\n-2.2642866610183553e+01\n-4.2027313384243419e+00\n-6.5988609796433826e+00\n-2.2611555958620400e+01\n-4.3495959043078951e+00\n-6.6642414578109985e+00\n-2.2325340729071140e+01\n3.2557561571234692e+00\n-8.0663984208338118e+00\n-2.1268777174136083e+01\n3.3201426129559999e+00\n-8.0989658750114089e+00\n-2.0946926413748667e+01\n4.0602878692918081e+00\n-8.4816316692231375e+00\n-2.1163635007690875e+01\n-3.6636263002841343e+00\n-6.8979374687317492e+00\n-2.1922646934885222e+01\n-5.9337413549039191e+00\n-6.6412258793439394e+00\n-2.2018556763372377e+01\n3.2263175838695388e+00\n-8.2910717102407325e+00\n-2.0668606869052351e+01\n5.5054766173346676e+00\n-8.6539423514958447e+00\n-2.0225813883742614e+01\n-1.0336387381447374e+00\n-7.6841250884024843e+00\n-2.1330008291973328e+01\n-6.3603783152844189e+00\n-6.6848575876014840e+00\n-2.1730153727833937e+01\n-1.2038090770696279e+00\n-7.6891311496182499e+00\n-2.1318366555369000e+01\n-1.0975932379903592e+00\n-7.7273045241428999e+00\n-2.1314446879579158e+01\n-1.0065384338004935e+00\n-7.7606972182783851e+00\n-2.1322591854532934e+01\n-1.0065384338004935e+00\n-7.7606972182783851e+00\n-2.1322591854532934e+01\n1.9905445311586958e+00\n-8.3381424859526394e+00\n-2.0542318283350500e+01\n2.0557810643664420e+00\n-8.4108909103238130e+00\n-2.0467559406230169e+01\n3.8332532531721517e+00\n-8.8068966552125687e+00\n-2.0045752678188670e+01\n-9.6665879996696980e+00\n-6.0132926339371275e+00\n-2.0474639861327812e+01\n-8.2027006218642473e+00\n-6.4704964617027914e+00\n-2.0707928536111051e+01\n-1.2556474599788201e+00\n-8.4025722602988839e+00\n-2.1297020015672011e+01\n2.5004327627380212e+00\n-8.8619501623539954e+00\n-1.9892188804817692e+01\n2.1003703369811446e+00\n-9.1594533693672453e+00\n-2.0304895386847065e+01\n-7.9376107307886539e+00\n-6.7742269901910381e+00\n-2.0223702197944821e+01\n3.3459930644601354e+00\n-9.0973050672734299e+00\n-1.9448527586404843e+01\n3.7736154487330054e+00\n-9.1459053267368109e+00\n-1.9354405830142884e+01\n2.6940528245256683e+00\n-9.3251977390546443e+00\n-2.0024144997512447e+01\n9.2255496763149003e-01\n-9.1064193683861401e+00\n-2.0370889432808475e+01\n1.9056517615104362e+00\n-9.0003695150940981e+00\n-1.9404939175636233e+01\n6.9715287593502795e-01\n-9.1724400332312896e+00\n-2.0278701534241325e+01\n3.6076061049493848e+00\n-9.6520908741516660e+00\n-1.9563091101528649e+01\n6.3148568389315800e+00\n-1.0359066569383351e+01\n-1.8720460253184811e+01\n-3.9572210823316616e+00\n-8.4767335008240750e+00\n-1.9278853974006694e+01\n-3.1408518612276346e+00\n-8.6392675187977801e+00\n-1.9201216722649981e+01\n-2.7701516184422572e+00\n-9.4145288455712848e+00\n-1.9968274952866746e+01\n1.6565970262951058e+01\n2.0897231535984425e+01\n-5.8957373643361663e+01\n6.1141307198906123e+00\n1.7423850667915200e+01\n-5.5172005774878571e+01\n-4.0906924450524169e+00\n1.6379872065586596e+01\n-4.8924531204538496e+01\n6.0631244342041271e+00\n1.7058804432532657e+01\n-5.4947437473810204e+01\n1.3829187942049460e+01\n9.6921528622634678e+00\n-3.6349020237132059e+01\n1.4848540706853356e+01\n9.9330002421056722e+00\n-3.7550418314903816e+01\n-1.1269397248149664e+00\n1.5414101088070657e+01\n-4.8038083177024582e+01\n-9.9811427843677318e+00\n1.2686179299743770e+01\n-4.0305823459231540e+01\n1.3546325014123068e+01\n4.8866235986690585e+00\n-2.4535494988112166e+01\n-5.8891558929725241e+00\n1.3101865576386839e+01\n-4.7482566887349336e+01\n1.4073197581966461e+01\n7.6713247327917227e+00\n-3.9095115194825887e+01\n-6.4059570583225982e+00\n1.3034518522758919e+01\n-4.9776666817230684e+01\n-6.4059570583225982e+00\n1.3034518522758919e+01\n-4.9776666817230684e+01\n-2.7257871054135330e-01\n1.1685898587435089e+01\n-4.8128595136341126e+01\n-9.7400368446001231e+00\n1.1521986480246703e+01\n-4.2537544638968043e+01\n1.2236383258451479e+01\n9.0137129175063659e+00\n-4.4759555970781022e+01\n-5.4330974177754665e-01\n1.1399179848768586e+01\n-4.7398263188788803e+01\n7.2375877220248084e+00\n9.9057093321258360e+00\n-4.5692502110530526e+01\n-1.2965347904550526e+01\n1.2023510832666481e+01\n-4.2782607786712219e+01\n-1.0460798741599461e+01\n1.2202413881577009e+01\n-4.5654905478931589e+01\n2.6814359958722704e+00\n1.0464256948210615e+01\n-4.5950543335786577e+01\n6.8124825408493654e+00\n9.3919420827052207e+00\n-4.4865298590130266e+01\n-3.6610194761728634e+00\n1.1911880029767888e+01\n-4.8709674990639911e+01\n-1.0715912228572462e+01\n1.2358921775914991e+01\n-4.8513713234260308e+01\n-9.6588006952515908e+00\n1.2021871447909783e+01\n-4.7985755439816650e+01\n-1.0189796453784350e+01\n1.1993499580782927e+01\n-4.7642315599253855e+01\n1.3493406294645396e+01\n3.0186185750923400e+00\n-2.4655912922856764e+01\n-1.3430698324042012e+01\n1.0291666562014999e+01\n-3.8995568861473579e+01\n-1.0736367712226452e+01\n1.1776693290820726e+01\n-4.7333390692226310e+01\n9.8011950178866254e+00\n7.5009116918413961e+00\n-4.2589482719395001e+01\n9.8011950178866254e+00\n7.5009116918413961e+00\n-4.2589482719395001e+01\n-6.3033461715675214e+00\n1.0548814276571726e+01\n-4.6335705660948463e+01\n-1.3931795324640921e+01\n1.0474206086763735e+01\n-4.1476638403072151e+01\n-6.1520123999311576e+00\n1.0248383283072942e+01\n-4.5770409635401563e+01\n-8.0448342838696583e+00\n1.0436049998591415e+01\n-4.5782843022269859e+01\n-8.0448342838696583e+00\n1.0436049998591415e+01\n-4.5782843022269859e+01\n-1.2425286285395195e+01\n1.1167573776869567e+01\n-4.6695576355470592e+01\n1.3546077982312918e+01\n5.2571453687715159e+00\n-3.9443522135785692e+01\n-1.3327593840984397e+01\n1.0062468007048100e+01\n-4.7649488061367492e+01\n-9.0942328518248825e+00\n9.1083324409737454e+00\n-4.6576402453026276e+01\n-1.1269914079091244e+01\n9.1777050244514289e+00\n-4.6567623055213772e+01\n5.6691395968910161e+00\n2.8553435935889384e+00\n-2.6494269002142708e+01\n1.2992977200464527e+01\n2.8112992084041868e+00\n-3.2398100463295215e+01\n-2.1611202718711122e+00\n6.4903191989432276e+00\n-4.1320404655952558e+01\n1.1763633751029190e+01\n3.5163804180424671e+00\n-3.6912546736666322e+01\n1.2719753525437291e+01\n2.6559873844129558e+00\n-3.3948891301530267e+01\n1.5240850725823348e+01\n3.0372365050296848e+00\n-3.9923663710778371e+01\n1.2963279421240960e+01\n2.4075019397905613e+00\n-3.3224073739657030e+01\n6.3565860061938171e+00\n2.3339856291037608e+00\n-2.7175782428554797e+01\n-3.3883961112003189e+00\n5.3658104117451213e+00\n-3.9635433671304028e+01\n-1.4251792314683609e+01\n7.9869733478617979e+00\n-4.6349212033845937e+01\n1.2640414272835585e+01\n2.0047343524721311e+00\n-3.5189976468739289e+01\n1.1890487729354462e+01\n1.9405126247007245e+00\n-3.4897635093196484e+01\n2.4484057566979733e+00\n1.4489562064285770e+00\n-2.0675489456450038e+01\n-4.6386481792746030e+00\n4.9110898136774521e+00\n-3.9269765411534543e+01\n-8.7100103317246749e+00\n5.0896830725260909e+00\n-3.8555680286320836e+01\n4.7012499268145600e+00\n8.1737365050957922e-01\n-2.1766656011994744e+01\n1.3957842501418900e+01\n4.8358491933222869e-01\n-3.1872662384811552e+01\n7.2129806560837135e+00\n4.5181762947459653e-01\n-2.4482476238464592e+01\n-8.8755580855647835e+00\n4.2437343378969752e+00\n-3.7210587348903928e+01\n-1.3317099602522533e+00\n1.4382283478986766e+00\n-2.2205870728203497e+01\n2.1593957941866124e+00\n6.4186155377091636e-01\n-2.0314735568711672e+01\n2.1593957941866124e+00\n6.4186155377091636e-01\n-2.0314735568711672e+01\n-6.2080836015025325e+00\n3.2652535448072468e+00\n-3.6565046713689711e+01\n5.7179379981375567e+00\n-3.0551565376294398e-02\n-2.2645620549285372e+01\n5.7179379981375567e+00\n-3.0551565376294398e-02\n-2.2645620549285372e+01\n1.4382558978084562e+01\n-8.6803941648731830e-01\n-3.2188944750537082e+01\n-3.4589465637554664e+00\n1.4078074802889200e+00\n-2.4983796837875943e+01\n-7.4523454022689366e+00\n2.8497175283243275e+00\n-3.5964278285866527e+01\n-2.0729716981999107e+00\n9.0800737232046946e-01\n-2.3188413156752791e+01\n-8.5856068099336635e+00\n2.7200343823467863e+00\n-3.5245437098109058e+01\n-7.6885016103796193e+00\n2.5086713612933393e+00\n-3.6165157256220482e+01\n1.3914778105690504e+01\n-1.3920690116818695e+00\n-3.1176509666594157e+01\n-8.4711567033144615e+00\n2.5301533334967843e+00\n-3.5021687067628349e+01\n-7.4937755225884484e+00\n2.1546333588215520e+00\n-3.4725934955318174e+01\n-6.9577479386518455e+00\n1.9964052566511126e+00\n-3.4688261622537141e+01\n-8.9143827968192486e+00\n2.2625845561670990e+00\n-3.3980233187054502e+01\n1.7463043680162219e+01\n-2.4439640618741572e+00\n-2.9900188324283619e+01\n-1.3047335139492948e+00\n1.4899643541954102e-01\n-2.1845627957166588e+01\n-2.2341186649886171e+00\n2.7974318007328397e-01\n-2.3211182382926093e+01\n-1.0428340500565895e+01\n2.0683596170417506e+00\n-3.6451147622327376e+01\n-9.3994539368346963e+00\n1.3755435612936502e+00\n-3.2919523590465403e+01\n-2.7825787173422567e+00\n-7.3762902316184653e-02\n-2.3106018867746823e+01\n-2.7825787173422567e+00\n-7.3762902316184653e-02\n-2.3106018867746823e+01\n3.7438316552446484e+00\n-1.3645746690343457e+00\n-2.2124459564544651e+01\n-9.8796555797234618e+00\n8.7285594997259341e-01\n-3.4695880875118661e+01\n1.3227382125342640e+01\n-3.4372445617344880e+00\n-2.7919966184219842e+01\n1.2843209303065368e+01\n-3.1874856044710187e+00\n-2.8896179295739348e+01\n-6.7603615680064992e+00\n1.7028121613312883e-01\n-3.2174196227533905e+01\n-6.3354153125704347e+00\n-3.7669880068734021e-02\n-3.2033885458021672e+01\n-1.7930257210369989e+00\n-1.2532025629124888e+00\n-2.1616828651382225e+01\n-2.5439201281472137e+00\n-1.1748520582102489e+00\n-2.1868603950305275e+01\n-9.2435407449760625e+00\n-4.3303967231601331e-01\n-3.0512136765187094e+01\n-8.2726128714925018e+00\n-7.5448350782705353e-01\n-3.0495428267577704e+01\n-1.0549276027138513e+01\n-4.5258347356694073e-01\n-2.9943998768522420e+01\n-1.0549276027138513e+01\n-4.5258347356694073e-01\n-2.9943998768522420e+01\n-9.8928599493486118e+00\n-7.3218172056402664e-01\n-2.9906949825054735e+01\n-1.0161785964900545e+01\n-9.0561117149138237e-01\n-3.1480843978818562e+01\n-9.6983548056756010e+00\n-8.2681151645907547e-01\n-2.9674713962614479e+01\n-7.7499139402581436e+00\n-1.2736808785515266e+00\n-3.0416353861162040e+01\n-9.0361611849011929e+00\n-1.1562743136237117e+00\n-3.1218581992551240e+01\n-1.2315368027784764e+01\n-9.0347222421007856e-01\n-3.1582626072280704e+01\n2.6582257528626823e+00\n-3.1521416339714947e+00\n-1.9961057331189377e+01\n1.2831560547991744e+01\n-5.4835853165602515e+00\n-2.4682790863055882e+01\n1.1321705468825650e+01\n-5.5332551000034043e+00\n-2.5730362824313936e+01\n1.1305555785437138e+01\n-5.6926690072720580e+00\n-2.5517033950159522e+01\n-2.1907179352709654e+00\n-3.4189432303520557e+00\n-2.2829063281971123e+01\n9.9790153545379512e-01\n-4.1470698735664087e+00\n-2.0663390363597340e+01\n-2.4980476578781321e+00\n-4.7543350181419148e+00\n-2.2823870084090977e+01\n6.2393122813302124e+00\n-6.7632040400326563e+00\n-2.2794001967795843e+01\n-1.8300679753250764e+00\n-5.0919125577020372e+00\n-2.2245831454702387e+01\n-7.2856661637127278e+00\n-4.7636588084867659e+00\n-2.6262562072487214e+01\n-6.3908741128903408e+00\n-4.7642134856611040e+00\n-2.4945401115149508e+01\n1.8183424456523125e+00\n-6.7161278982832835e+00\n-2.2182166674952100e+01\n1.8183424456523125e+00\n-6.7161278982832835e+00\n-2.2182166674952100e+01\n9.1019606581992072e+00\n-8.8894864431424452e+00\n-2.1445761553386319e+01\n-6.4750122947255244e+00\n-6.0333950232990299e+00\n-2.2833917493431287e+01\n-7.7041661527899956e+00\n-6.1247148633186512e+00\n-2.1846599591180254e+01\n-8.0130441378629524e-01\n-7.6337447270965733e+00\n-2.1335025073754007e+01\n-2.7130367428796589e+00\n-7.7776357736362796e+00\n-2.2127316030311508e+01\n-6.3452658553869172e+00\n-6.8077489768924471e+00\n-2.1473635302771797e+01\n-7.4483207351143721e-02\n-8.1180095128921881e+00\n-2.1087169577173551e+01\n-9.1840478531521719e-02\n-8.1925458440464851e+00\n-2.0835400968826892e+01\n-5.8738666162782467e+00\n-7.1329607211766497e+00\n-2.1106178428770331e+01\n-5.9297470845181728e+00\n-7.2044505261038356e+00\n-2.0987264050129632e+01\n5.3790956208866296e+00\n-9.4263717573898802e+00\n-1.9607316377982755e+01\n-3.9197412920778829e+00\n-7.7240484803981309e+00\n-2.0462754232525846e+01\n-3.9197412920778829e+00\n-7.7240484803981309e+00\n-2.0462754232525846e+01\n4.0847668742012653e+00\n-9.4532389781674606e+00\n-1.9903449952172451e+01\n-9.0853266085318585e-01\n-9.2055970400633580e+00\n-2.0193084211631113e+01\n5.7938683151042865e+00\n-1.0329307631383443e+01\n-1.8740004390905018e+01\n-3.7587988218437420e+00\n-8.3548957637627908e+00\n-1.9636228989843751e+01\n5.4957059037484672e+00\n-1.0423108678547630e+01\n-1.8589023723769984e+01\n5.0566588481029937e+00\n-1.0532697315180750e+01\n-1.8467444283101177e+01\n1.8867413242025723e+01\n2.1648333654603345e+01\n-5.9393625899064105e+01\n4.2511473796244461e+00\n1.7634831879012733e+01\n-5.0523269148963109e+01\n7.1567329247820428e+00\n1.8261309891407546e+01\n-5.4311055584547134e+01\n-6.6129656212504742e+00\n1.5583455669034590e+01\n-4.3480245457000443e+01\n-4.7274045510425502e+00\n1.6219737990353902e+01\n-4.6554366942193774e+01\n6.9159771804110530e+00\n1.7648959600400591e+01\n-5.6280350163202911e+01\n-4.6886877872904984e+00\n1.5740660952060637e+01\n-4.7290687300831706e+01\n1.3085920852082635e+00\n1.6799765328458065e+01\n-5.3824425912827216e+01\n-9.0819156053857437e+00\n1.4434294539023909e+01\n-4.4224265544147322e+01\n-9.8932392339265132e+00\n1.3032338141626328e+01\n-3.9453436734385555e+01\n-8.3414386704065890e-01\n1.4936559236795564e+01\n-4.9418756682936234e+01\n5.0657197720171732e-01\n1.5023579182455475e+01\n-5.1641044930937937e+01\n1.1355958052899606e+01\n6.3606350150321820e+00\n-2.8908496050750657e+01\n1.4622395067572089e+00\n1.3694625587412879e+01\n-5.0919046116936798e+01\n1.5634746439555235e+01\n1.0021284731078753e+01\n-4.5638736801940482e+01\n1.3923349821146880e+01\n5.8811388677240348e+00\n-3.0266711567536714e+01\n-4.9411668287368231e+00\n1.3862561934178217e+01\n-4.9912153898449205e+01\n1.5311294397763260e+00\n1.2775369526305617e+01\n-4.9477164990124443e+01\n-6.4898996849673383e+00\n1.3261524571391645e+01\n-4.9521957521152729e+01\n1.3265351576048410e+01\n1.2145402306891157e+01\n-5.5933186319992750e+01\n-9.9188117093716688e+00\n1.1535632473012507e+01\n-4.2061363797429109e+01\n-1.3086881436747607e+01\n1.2472894219674748e+01\n-4.3640582063206438e+01\n8.4390601358919837e-01\n1.1672434339094691e+01\n-4.8121909193273090e+01\n-5.8454542081211098e+00\n1.3024638353872790e+01\n-5.1264295488328834e+01\n-6.8334764476552090e-01\n1.1196585184310916e+01\n-4.7322593678386689e+01\n8.8353426458952136e+00\n8.3503364423562960e+00\n-4.3068520813398017e+01\n-1.2946963999056811e+01\n1.0103039168555469e+01\n-3.7651182270183035e+01\n-1.0336772307659110e+01\n1.2010001384269335e+01\n-4.6834769587865452e+01\n-4.7943762787984827e+00\n1.0828178961071723e+01\n-4.6431687030283008e+01\n1.3816226925925244e+01\n2.6199501854135772e+00\n-2.3281708757527696e+01\n-1.0421717740778677e+01\n1.1568629419283608e+01\n-4.7380563420902753e+01\n9.1401506297562545e+00\n7.2822613632262394e+00\n-4.2119546840022672e+01\n-1.1022870226081226e+01\n1.1145940071003738e+01\n-4.6332751885258098e+01\n-1.5559110839387905e+01\n1.0841000990343950e+01\n-4.2149143908432734e+01\n-1.4554940705581553e+01\n1.0946638874740788e+01\n-4.3482822720620675e+01\n-1.2781004391518008e+01\n1.1248956626317890e+01\n-4.6407723614329193e+01\n-8.0693382013467208e+00\n1.0112710970690667e+01\n-4.5387366281740569e+01\n-7.2392853347816919e+00\n1.0553039574671295e+01\n-4.7724078671876796e+01\n-1.2007794734141211e+01\n1.1144814760335425e+01\n-4.7244001623267074e+01\n-1.2693057494321250e+01\n1.0903329004721813e+01\n-4.6920862609380556e+01\n-1.1349778815889714e+01\n1.0867298665190784e+01\n-4.7836203375473858e+01\n1.2680190575366577e+01\n4.0868078163268704e+00\n-3.2638876525051266e+01\n-8.4886441738366027e+00\n1.0287240680933891e+01\n-4.7724407016488939e+01\n4.0000689494435431e+00\n3.6755633152111264e+00\n-2.5950350817976410e+01\n-9.0866478943854148e+00\n9.9347639883090419e+00\n-4.7480865311207147e+01\n1.4154336145466630e+01\n1.5000490984800470e+00\n-2.3688138905500495e+01\n1.2998139946641095e+01\n3.4848618650804895e+00\n-3.3087006161129246e+01\n-1.6984934917289234e+01\n1.0461865117812346e+01\n-4.5784038246900799e+01\n-1.6693495699996713e+01\n9.8141455492724869e+00\n-4.4125970869897294e+01\n-1.4303761108001932e+01\n8.4028460978241313e+00\n-3.8621113389391624e+01\n-1.2347935794516191e+01\n9.8985727874754765e+00\n-4.7454405125998747e+01\n-1.4844136334074845e+01\n9.6240274002544410e+00\n-4.5063269814983762e+01\n-1.4622906265542127e+01\n8.7168517237729919e+00\n-4.7616172416310306e+01\n4.4096147622778797e-01\n2.2846019669224682e+00\n-2.1450367347180201e+01\n1.4370450502844429e+01\n9.3574322421200795e-01\n-2.6562806381488524e+01\n1.1961782939472464e+01\n1.8761979472498398e+00\n-3.4802124383173528e+01\n2.9824369515041669e+00\n1.1691089441387337e+00\n-2.0728185806618797e+01\n1.6274627525364377e+01\n1.7233734818777974e-01\n-2.9337334481711444e+01\n1.4900959599548603e+01\n-6.0342742279900718e-01\n-2.3286301285015711e+01\n-1.2771691861193014e+01\n5.9188907575263690e+00\n-4.3037430970657461e+01\n-1.2771691861193014e+01\n5.9188907575263690e+00\n-4.3037430970657461e+01\n1.4602681372947439e+01\n1.9877201069060879e-01\n-3.1006387424664187e+01\n-8.6499018592823678e+00\n4.3673921061403815e+00\n-3.7516966501074585e+01\n1.2582405823084102e+01\n5.0209737754564898e-01\n-3.3834399997756393e+01\n-6.8064758327631045e+00\n3.8589860760719343e+00\n-3.7559615268694586e+01\n-5.6091615548672955e+00\n3.5788574837582132e+00\n-3.7116160978960536e+01\n-2.1650270541091152e+00\n1.6258549876432336e+00\n-2.3968418696312643e+01\n-8.9104332254265444e+00\n3.9290585298459493e+00\n-3.7136943901972664e+01\n1.4486389320133084e+01\n-3.4835072502637449e-01\n-3.3201764845191619e+01\n1.4102871630497198e+01\n-5.4237719326690192e-01\n-3.2426546824317768e+01\n-6.4528312136901391e+00\n2.8937152649099271e+00\n-3.5954183016207232e+01\n1.5025439752818309e+01\n-1.6858246204696719e+00\n-2.4925093882222871e+01\n-2.5847846007987672e+00\n1.2049063641363458e+00\n-2.4210303012033318e+01\n1.4312850342083417e+01\n-1.0386269370829051e+00\n-3.2130116883651510e+01\n-2.3460315216451515e+00\n9.1928487176224416e-01\n-2.3293917021964148e+01\n1.3984927167374597e+01\n-1.2782337802625956e+00\n-3.1552652900127974e+01\n1.4147412154036832e+01\n-1.9631279484117943e+00\n-2.9902369400541605e+01\n1.9234746319047238e+00\n-2.5719734360496660e-01\n-2.0368789307943825e+01\n3.2751057349917416e+00\n-6.6787342663429539e-01\n-2.0769843590657889e+01\n1.2061083071196375e+01\n-1.7801968047648238e+00\n-2.9464667816124837e+01\n-5.8608954897990939e+00\n1.3644040983082399e+00\n-3.3827092639622130e+01\n-2.5339760733667207e+00\n2.5858322519913818e-01\n-2.3296797351269269e+01\n-9.7540125198899101e+00\n1.7630754590778228e+00\n-3.3576845337185937e+01\n6.0081945224905740e+00\n-1.3479790859566545e+00\n-2.1686949735964934e+01\n-1.5461606032228372e+00\n-9.8589851703468540e-02\n-2.2035351870927659e+01\n2.8323069997680199e+00\n-9.7037114618683917e-01\n-2.0666952226869196e+01\n-2.5213415413648175e+00\n-3.8180730189931740e-02\n-2.2964106761189651e+01\n2.4720637223350392e+00\n-1.2390913286960956e+00\n-2.0698162445854539e+01\n1.6366745396555149e+00\n-1.0170479285966232e+00\n-2.2485019802065768e+01\n-1.7407457129622359e+00\n-6.1397641200576936e-01\n-2.1523103192183616e+01\n1.3240429237891455e+01\n-3.9495750518014945e+00\n-2.7491110396524981e+01\n-1.6445260059017099e+00\n-1.2230961421373265e+00\n-2.1589089720693885e+01\n-2.9628138684027152e+00\n-1.0550659679073284e+00\n-2.2072625245307673e+01\n3.2593806571600181e+00\n-2.0704908608980528e+00\n-2.3314940840982391e+01\n-1.9111364859368498e+00\n-1.3462150566803290e+00\n-2.1536398913558592e+01\n3.0759199106837363e+00\n-2.1181360022511906e+00\n-2.3229459064891483e+01\n6.3383079861474889e-01\n-2.2969712397647561e+00\n-2.0414726704469409e+01\n1.1477431749313716e+01\n-4.8415613733280543e+00\n-2.5698209351953039e+01\n-1.1407941536210313e+01\n-9.7254106433762089e-01\n-2.9069462529420555e+01\n-1.1175209386279072e+01\n-1.2330476893340521e+00\n-3.1443655182643877e+01\n-8.5411545059450376e+00\n-1.7461117938961392e+00\n-3.0403568546625053e+01\n-9.4537758354324541e+00\n-2.4920885205421071e+00\n-2.7529680954823839e+01\n-9.6852253766566374e+00\n-2.4412742109993579e+00\n-2.7303788450549625e+01\n-7.1035993058252034e+00\n-3.3296351354619080e+00\n-2.8027568128578590e+01\n-2.1700314158450418e+00\n-3.7293747400391108e+00\n-2.3324659658475465e+01\n-8.3276122595960231e+00\n-3.1888688748508431e+00\n-2.6846478923276692e+01\n1.1554117518633714e+01\n-6.9506108587517224e+00\n-2.3270832786514404e+01\n4.3609793553463616e-02\n-4.4962728983936238e+00\n-2.2772766634701561e+01\n1.7802463564583049e-01\n-5.1153933322362715e+00\n-2.2100503690270308e+01\n-7.3374887271027749e+00\n-4.8838086135489291e+00\n-2.6103870929587782e+01\n3.3446420662559611e+00\n-7.5792184324927803e+00\n-2.1383971660172200e+01\n-7.6405739980788532e+00\n-5.7660691843690799e+00\n-2.2586916370633350e+01\n-7.6405739980788532e+00\n-5.7660691843690799e+00\n-2.2586916370633350e+01\n-5.8324924875475057e+00\n-6.3361941716383940e+00\n-2.2798666603610258e+01\n1.6008336934781704e+00\n-8.1218638530756557e+00\n-2.1715689524978366e+01\n1.0006956951822231e+01\n-9.6117463285359079e+00\n-1.9965774275863179e+01\n7.9381427273129086e+00\n-9.3224026048670314e+00\n-2.0844624508261042e+01\n-1.6525527627694971e+00\n-7.6440779623683888e+00\n-2.1333343014778823e+01\n5.1845191664977834e+00\n-9.2032002758610947e+00\n-1.9407775002761021e+01\n-4.2199909902036303e+00\n-7.8086836603441281e+00\n-2.0209882759729027e+01\n-2.2257317346956665e-01\n-9.1184871497694591e+00\n-2.0267212223497449e+01\n-4.9229149383489466e+00\n-8.8112380260294714e+00\n-2.0800544487009731e+01\n-7.3131403439618980e-01\n-9.5510710859064432e+00\n-1.9715280727145451e+01\n-3.3303262619351086e+00\n-9.2864703174979333e+00\n-2.0128741951748736e+01\n6.3458654093769322e+00\n1.7866587686712315e+01\n-5.4402623121438445e+01\n3.6873962660858073e+00\n1.6346051310806544e+01\n-5.4721494413343585e+01\n1.5945443173665657e+01\n1.1520721771237367e+01\n-4.6051149619311467e+01\n-6.2773119874713845e-01\n1.4667536022064317e+01\n-5.1585308426509883e+01\n1.6266254947415526e+01\n1.5139869392577182e+01\n-6.4212301459635853e+01\n1.5026224971742106e+01\n1.4481511818590711e+01\n-6.2372426054001373e+01\n-1.7413180011232410e+00\n1.1694435319367448e+01\n-4.8244737015775456e+01\n1.3046669033347765e+01\n3.8423082429429538e+00\n-2.6098513530517270e+01\n1.2833868801122037e+01\n3.9297679040341378e+00\n-2.7030647561365619e+01\n1.2482569473834284e+00\n9.4911902851939942e+00\n-4.4378723741226835e+01\n1.1674180481214073e+01\n4.7507572203853607e+00\n-3.1258498837260571e+01\n-5.2229305703749640e+00\n9.6987406916031151e+00\n-4.5371746271626478e+01\n-1.0593717157324825e+01\n1.1218974863691214e+01\n-4.8827967412553946e+01\n-1.2850193665199614e+01\n1.1082750812879196e+01\n-4.6825588947885628e+01\n-1.3765264477934302e+01\n1.0647523238606110e+01\n-4.5432378392748852e+01\n-2.2277866297335454e+00\n8.2863568245867114e+00\n-4.3371685354964143e+01\n-5.1231863997935001e+00\n9.2962875470560213e+00\n-4.5998814250631924e+01\n-1.3476352466039277e+01\n1.0469140798564267e+01\n-4.7237185887770224e+01\n-1.5571182355135102e+01\n9.6938612338749408e+00\n-4.5929976816589601e+01\n-1.6203341543930392e+01\n9.5358201753374665e+00\n-4.6712866198918356e+01\n-1.0734941502675740e+01\n7.4277610284358779e+00\n-4.1596831668546791e+01\n3.3972936632415993e+00\n1.7923583900440194e+00\n-2.1659785593355267e+01\n-8.2580978366119151e+00\n5.9801182543280609e+00\n-4.0835955312311434e+01\n-1.1983397345301553e+01\n6.1467064005038727e+00\n-4.2714350646583874e+01\n1.3492643013266534e+01\n1.1298813043773090e+00\n-3.4529075821002287e+01\n1.3492643013266534e+01\n1.1298813043773090e+00\n-3.4529075821002287e+01\n1.5009100534102044e+01\n-2.9149876791790909e-02\n-3.1486828512596809e+01\n1.5045163744775371e+01\n-2.4148302108400549e-02\n-3.1555795788320008e+01\n-1.1808075631309748e+01\n5.2169565622902452e+00\n-4.1047430841889742e+01\n-1.1808075631309748e+01\n5.2169565622902452e+00\n-4.1047430841889742e+01\n1.2600034910516380e+01\n2.5252597325103721e-01\n-3.3569432458501197e+01\n-1.8594759254369048e+01\n6.5447677811687548e+00\n-4.6763321134812365e+01\n8.8222017227362759e-01\n7.7796762339787706e-01\n-2.1179469729014759e+01\n-6.4482200097305595e+00\n2.6271760970471805e+00\n-3.5673802674100543e+01\n-6.2586924615316208e+00\n2.3629782470527827e+00\n-3.5618735711277530e+01\n-6.2508661873614324e+00\n2.3516563342088950e+00\n-3.5310866087179008e+01\n1.4521938513813552e+01\n-1.6364202665796335e+00\n-3.1269469668218420e+01\n-6.3264812294645543e+00\n1.7976956221013791e+00\n-3.4372993523972681e+01\n-1.7060919328494291e+00\n2.9956238098874111e-01\n-2.3092241997048401e+01\n1.1531967564521617e+01\n-2.0150401359206485e+00\n-2.9172071231657206e+01\n-6.9877042068470328e+00\n4.6197262219364127e-01\n-3.3346775356643512e+01\n1.3274441073080354e-01\n-2.1999873391825897e+00\n-2.0522128093224207e+01\n-1.1749512597034664e+00\n-2.2354910319002599e+00\n-2.0442592612399697e+01\n-6.7422906052512088e-01\n-2.3464282645745778e+00\n-2.0874457884164034e+01\n-8.4080073632465044e+00\n-1.8243016655174777e+00\n-2.8617082183486936e+01\n-8.6690114774183780e+00\n-1.8688046381834493e+00\n-2.9696094948123854e+01\n-9.1302914281300165e+00\n-1.7540226486818167e+00\n-2.9116745477239629e+01\n1.1677841397258758e+01\n-5.5369948609390249e+00\n-2.5767921242167130e+01\n-6.9947572279745867e+00\n-2.3968932590245400e+00\n-2.9120917975570940e+01\n-6.9947572279745867e+00\n-2.3968932590245400e+00\n-2.9120917975570940e+01\n-1.1854313121057716e+01\n-2.4208142200774478e+00\n-2.5525680450550254e+01\n-8.2658603365014063e+00\n-3.3809412099567968e+00\n-2.6335565292908498e+01\n1.1375515317872898e+01\n-6.9762587572339694e+00\n-2.3155325179654419e+01\n-6.6971561351743869e+00\n-5.2426032472446051e+00\n-2.5386290034590481e+01\n-7.8378904577397570e+00\n-5.4777994680184259e+00\n-2.3057531462046462e+01\n-4.6018976181313072e+00\n-6.3030218301853793e+00\n-2.2992189641877623e+01\n-7.7140409545094437e+00\n-5.6455995079928316e+00\n-2.2744296920561037e+01\n-8.1041066118255447e+00\n-5.6457753352641520e+00\n-2.2372381450871881e+01\n-5.9548998649644753e+00\n-6.3469125793063235e+00\n-2.2464492629930209e+01\n-8.3940570530279857e+00\n-5.8161052736056238e+00\n-2.1927911890345605e+01\n3.6254394118223274e+00\n-8.4519669308809586e+00\n-2.1376539047226146e+01\n6.8212844431090618e+00\n-8.8706996252657113e+00\n-2.0661364316837517e+01\n4.3716821034823363e+00\n-8.9101245976936596e+00\n-2.0065300350806989e+01\n-6.0618612418436335e+00\n-7.0538973770670976e+00\n-2.1096484506530079e+01\n4.9185842944280506e-01\n-8.8324806325482896e+00\n-2.0698569647972583e+01\n1.3480158198150248e+01\n9.9174857483851770e+00\n-3.2843928995367122e+01\n1.3609045692463901e+01\n8.1373933782351919e+00\n-3.5614922141500038e+01\n-9.6431158183164314e+00\n1.3461506369317016e+01\n-4.3895991539870387e+01\n8.0848591177147568e+00\n1.0376357797181496e+01\n-4.4465692149958478e+01\n5.8730255602866359e+00\n9.6949867063149995e+00\n-4.4236790297736718e+01\n9.2566884368737341e+00\n7.7560063694590244e+00\n-4.2667518411042067e+01\n1.0388002285111341e+01\n7.4198758417427184e+00\n-4.2389349436431971e+01\n-1.4881530783069678e+01\n1.0122541702694859e+01\n-4.1674146469160519e+01\n-1.3010423906642089e+01\n1.0631926220938917e+01\n-4.7295179854552465e+01\n-1.2492490700354972e+01\n1.0857281531692738e+01\n-4.9624927423257269e+01\n-1.5267137162414732e+01\n9.6239309819393171e+00\n-4.3409067471492726e+01\n-6.7122705655908632e+00\n5.7613034156071850e+00\n-3.9904529437336684e+01\n-5.5051551714544509e+00\n5.5376902673916302e+00\n-3.9585027793828502e+01\n1.2705069620338151e+01\n1.8147614750034522e+00\n-3.4818347401120398e+01\n-1.1410404275378843e+01\n4.9828096014298451e+00\n-4.0688894275599367e+01\n-3.5134929412849978e+00\n1.9228709466631819e+00\n-2.5663528862179646e+01\n1.5080749011499741e+01\n-6.4554413074132133e-01\n-3.2166737023707455e+01\n-6.6082581078233646e+00\n3.1659213424422208e+00\n-3.6422094071578037e+01\n-9.0914297506441564e+00\n1.0726382096964817e+00\n-3.3352465683996300e+01\n-2.4332525155060107e+00\n-3.0475030752690396e-01\n-2.2611693658706901e+01\n3.6900408203432677e-01\n-1.5062734337107024e+00\n-2.0368506852984659e+01\n-1.9871961202977799e+00\n-1.7310626793496766e+00\n-2.1301990098874491e+01\n-7.9537209232409500e+00\n-1.9114685411486354e+00\n-3.0201623199680711e+01\n-4.0062929836361638e+00\n-2.4360398462740482e+00\n-2.5771557818127320e+01\n-8.4558949258571197e+00\n-2.4630228871854998e+00\n-2.7527059313419254e+01\n1.1145309643331593e+01\n-6.2564871188885123e+00\n-2.5118339358652491e+01\n-6.4535185413766216e+00\n-5.0331567730276623e+00\n-2.5998831889440517e+01\n-7.7030087785262564e+00\n-4.8368065894850902e+00\n-2.6125783792133099e+01\n5.8807226695397219e-01\n-6.1669428485614191e+00\n-2.1672188887518711e+01\n7.9904664731315274e+00\n-9.4285528186602505e+00\n-2.0509464903766979e+01\n7.9904664731315274e+00\n-9.4285528186602505e+00\n-2.0509464903766979e+01\n6.9016476867788263e+00\n-9.2904882367852455e+00\n-2.0127687177521128e+01\n2.1702507553039649e+00\n-8.4502422736408302e+00\n-2.0257176517928158e+01\n6.4538409118092686e+00\n-9.6169345596708347e+00\n-1.9707541816635725e+01\n5.0133975163361981e+00\n-9.5297078510063233e+00\n-1.9637189775416438e+01\n6.8404259673236130e+00\n-9.9050031643941630e+00\n-1.9359770072140599e+01\n5.4422533473458872e+00\n-9.6344511283171528e+00\n-1.9529576164017918e+01\n1.4863007856206830e+01\n1.9860876032912866e+01\n-5.6905133267558867e+01\n3.5820432824400368e+00\n1.8190045979520182e+01\n-5.9542769755662214e+01\n1.3722127303636073e+01\n7.5951542405076520e+00\n-3.5525914755779638e+01\n1.5548302202989492e+01\n9.5716779306949018e+00\n-4.7006457296403234e+01\n7.1104012583102492e+00\n9.4937927323125031e+00\n-4.3129815495049620e+01\n-9.3926915233134043e+00\n1.1833360375065983e+01\n-4.9349244277933344e+01\n-9.6718386125004798e+00\n1.1281929150868816e+01\n-4.8085345591347235e+01\n-8.5527313496391089e-01\n2.9358385688428936e+00\n-2.2910810707267718e+01\n-1.5894388935093573e+01\n9.0695151178764917e+00\n-4.6097392459829919e+01\n-7.5297660187119642e-02\n1.9651577035715084e+00\n-2.0950677911215816e+01\n1.4391866046411083e+01\n-1.0614332868364629e+00\n-3.1744808204509518e+01\n1.4047275350381303e+01\n-1.4207980184814557e+00\n-3.1140591763391388e+01\n5.9463722115993878e-01\n1.9311791353973068e-02\n-2.1099587095838100e+01\n5.9463722115993878e-01\n1.9311791353973068e-02\n-2.1099587095838100e+01\n1.3481061177963852e+01\n-2.3385702400687398e+00\n-2.9430150832845275e+01\n1.1193451547898224e+01\n-2.8092246035017463e+00\n-2.8126155047945204e+01\n-3.0710612219300049e+00\n-8.4855059939339472e-01\n-2.2097605770456099e+01\n-1.9260260823521771e-01\n-1.3634846080675629e+00\n-2.0631829555757669e+01\n-2.1824390127064257e+00\n-1.3781313521846181e+00\n-2.1593571339847511e+01\n-8.2217108813436131e+00\n-1.2030427675853534e+00\n-3.1078071824856224e+01\n-7.9783312993160669e+00\n-1.4290632013839746e+00\n-3.0853458619820223e+01\n-7.9783312993160669e+00\n-1.4290632013839746e+00\n-3.0853458619820223e+01\n-9.1875256067867479e+00\n-1.2667153131227207e+00\n-3.0579445561116305e+01\n-3.7288098520996207e+00\n-2.3119744686472616e+00\n-2.4817650257945516e+01\n-7.4415996638697210e+00\n-3.0267751462782915e+00\n-2.8386316579910993e+01\n2.7886571476152540e+00\n-4.2972656286063220e+00\n-2.1245726403425941e+01\n1.6544266622424391e+00\n-4.8723066670586617e+00\n-2.2387085248784089e+01\n-7.4938576765988421e+00\n-4.3572551867743856e+00\n-2.6649646498017642e+01\n-6.6206043028374486e+00\n-5.6724158975604304e+00\n-2.5087643987491354e+01\n-7.7615288729645293e+00\n-5.8122477242762027e+00\n-2.2667553909546264e+01\n-8.2235775105618263e+00\n-6.0379969973049050e+00\n-2.1616169308114458e+01\n-2.0885844741609834e+00\n-7.8082095756668028e+00\n-2.2111394052906572e+01\n2.5139422984876103e+00\n-9.3550825713048091e+00\n-2.0101003786261654e+01\n2.3707110976065349e+00\n-9.4150215466962077e+00\n-1.9775410578055194e+01\n-2.3655305342555750e+00\n-6.9224855885259495e-01\n-2.2917058903217075e+01\n-2.4840339710481194e+00\n-4.0412570242181660e+00\n-2.3655683665409668e+01\n-6.8653337556237419e+00\n-5.4250863871551296e+00\n-2.5485630089732350e+01\n7.6688670284145468e+00\n-9.1890252774364090e+00\n-2.0798590136861595e+01\n6.7939888055808666e+00\n-9.5109495137446256e+00\n-1.9929424317558531e+01\n5.2978013782572173e+00\n-9.5391699795992206e+00\n-1.9731142550706963e+01\n4.2654914145957177e+00\n-1.0123503392149892e+01\n-1.8948197677736086e+01\n7.7598911397192412e+00\n1.8184027553850839e+01\n-5.4733091114017263e+01\n1.5568533774634835e+01\n2.7562354152269601e+00\n-2.8829335725917662e+01\n-2.2172227994443032e+00\n1.3324417763454388e+00\n-2.4262251870855316e+01\n-1.3513230560084561e+00\n-1.7164234868544042e+00\n-2.1216077372480793e+01\n-2.7286580121578523e+00\n1.3970632874608888e+00\n-2.4587970612199396e+01\n-6.8581279756515706e-02\n-9.0266443862796208e+00\n-2.0404487752142458e+01\n1.2822213231883117e+00\n1.7339498252388591e-01\n-2.0523123051997064e+01\n-2.0337540565527963e+00\n-1.7248512119261616e-01\n-2.1701644964105075e+01\n-8.4784276910597764e+00\n1.3257910383426852e+01\n-4.6185988933050801e+01\n7.5211288515235220e+00\n2.8233457140256256e+01\n-4.5307066791612577e+01\n9.9811294098795784e+00\n1.1909805223523399e+01\n-2.4781533729872148e+01\n1.3313182281309569e+01\n1.6183107913101065e+01\n-3.0807190110071492e+01\n1.0266227468461409e+01\n1.0965304011782667e+01\n-2.3941894622466183e+01\n1.7491737922836148e+01\n2.9762880990208853e+01\n-5.1242404429384543e+01\n-1.0481942115703838e+01\n1.9599226726149421e+01\n-3.4592134214114765e+01\n1.5653652142893231e+01\n2.7229895791740599e+01\n-4.9573473285590929e+01\n1.5752857637210835e-02\n2.3023910288833981e+01\n-4.1940381172666875e+01\n9.2795037924091428e+00\n6.8496404095590089e+00\n-2.0131459889014458e+01\n1.0578391828826222e+01\n1.0724349073509474e+01\n-2.6174578163063039e+01\n1.0679397033839289e+01\n1.0193725619792868e+01\n-2.6363107930956822e+01\n9.4422734440662257e+00\n6.3049083358292499e+00\n-2.0671211939871288e+01\n-7.7815870383189303e+00\n1.9154180124991424e+01\n-3.8097927490916497e+01\n9.6234257005966395e+00\n5.4669235611860989e+00\n-1.9745020480161877e+01\n1.2012784631006129e+01\n8.7286062586198288e+00\n-2.5930219088089533e+01\n6.6948102743468789e+00\n2.3053813712719709e+01\n-4.8324032144447749e+01\n-7.4284493308579140e+00\n1.8605277347477344e+01\n-3.9538795629858413e+01\n-6.6226333459616091e+00\n1.8686931037753357e+01\n-4.0062860275562748e+01\n-6.6226333459616091e+00\n1.8686931037753357e+01\n-4.0062860275562748e+01\n-1.4353866775520017e+00\n2.0183015894412563e+01\n-4.3499837627901037e+01\n9.5946167931266455e+00\n6.1609454209426104e+00\n-2.2107664242022320e+01\n9.5532388603389311e+00\n6.0710724894730426e+00\n-2.1943677803492072e+01\n-7.3640606950355281e+00\n1.8145272828495958e+01\n-4.0115038753261750e+01\n9.6291000191589493e+00\n5.7378426674573770e+00\n-2.2030123190767810e+01\n1.1231740319761006e+01\n1.1989790175142542e+01\n-3.3120876758545919e+01\n9.7538882537195484e+00\n2.3445773340891581e+01\n-5.2541860922875536e+01\n-9.0955956822864525e+00\n1.7525572971004486e+01\n-3.9495394675894026e+01\n-8.8869745267937041e+00\n1.7502055889067890e+01\n-3.9775188950410211e+01\n7.0952361453590296e+00\n2.0621105648037847e+01\n-4.8263281039600052e+01\n9.7694507863479298e+00\n4.1877646286792407e+00\n-1.9918488532870093e+01\n-8.9846329405655982e+00\n1.7242414281829877e+01\n-3.9238367141874626e+01\n1.2646053651327987e+01\n1.2000509110320692e+01\n-3.4298613361066216e+01\n9.4864332446736410e-01\n1.9909187585057641e+01\n-4.6611903316998877e+01\n1.2710973728408261e+01\n1.1396095350368583e+01\n-3.4089161679218037e+01\n5.6983192546936774e+00\n2.1549079469527644e+01\n-5.1127680608505344e+01\n1.4297319175445782e+01\n5.8845760016383295e+00\n-2.4975761530420087e+01\n8.3917170766031610e+00\n1.9993713747996971e+01\n-5.0427199727480449e+01\n3.6839788427661810e+00\n2.0694060311145353e+01\n-5.0524690263570747e+01\n1.0066286295523605e+01\n6.2049068515147718e+00\n-2.5479450305344280e+01\n9.9561705420032443e+00\n3.6704290759159792e+00\n-2.0704015363072276e+01\n1.1781257647833737e+01\n8.6903142494145378e+00\n-3.0601317926106013e+01\n1.1928079379769105e+01\n9.7470459501936855e+00\n-3.2880366471590285e+01\n1.3318532179494321e+01\n1.0275245063868546e+01\n-3.4415414334751965e+01\n1.3673733367689497e+01\n5.9264172845548089e+00\n-2.6381940638298492e+01\n6.2956305850382259e+00\n2.0845930355206018e+01\n-5.3007789974983581e+01\n1.2942648307678725e+01\n1.0616112531973741e+01\n-3.5484603834108036e+01\n1.7217513749437096e+01\n2.0050591652596250e+01\n-5.4800048523486367e+01\n1.7217513749437096e+01\n2.0050591652596250e+01\n-5.4800048523486367e+01\n1.0163046717611644e+01\n4.5371509906219751e+00\n-2.3618502732723535e+01\n-2.0348267329273120e+00\n1.7753052289191285e+01\n-4.6592692147146082e+01\n1.0152914910724352e+01\n4.2724555038085557e+00\n-2.3315735739765749e+01\n1.2244511872214025e+01\n7.2248821382723385e+00\n-3.0518856818469409e+01\n-1.2618206893184006e+01\n1.5059911049640853e+01\n-4.0253193745800665e+01\n1.1670304524843653e+01\n1.0166065005291523e+01\n-3.6073358516897024e+01\n-1.2477802584081847e+01\n1.4580822201469589e+01\n-3.9449744070348409e+01\n1.0381212784282958e+01\n4.1224547937099398e+00\n-2.5407312076694406e+01\n1.2483088012387135e+01\n5.6210715060261531e+00\n-2.9344343696499756e+01\n1.2455314624475260e+01\n5.5193059038007668e+00\n-2.9504262027676628e+01\n-7.5857107914140585e+00\n1.4872145394641379e+01\n-4.4295239995352723e+01\n1.1572165722256154e+01\n8.4683867064960285e+00\n-3.5567601598988048e+01\n1.0368653384311099e+01\n2.3668811844527626e+00\n-2.2281477845772134e+01\n1.0675522819680262e+01\n4.2858743072276688e+00\n-2.6731142258548704e+01\n4.5562262451043978e+00\n1.6949497630700595e+01\n-5.2946454153079600e+01\n-6.8702148673598975e+00\n1.4680966605913421e+01\n-4.4684169478139516e+01\n1.2694064845908272e+01\n5.3345884587563939e+00\n-2.9872207753504824e+01\n-8.3519598965879620e+00\n1.4406574177775461e+01\n-4.3671941213494677e+01\n1.3833049782230741e+01\n3.6268640846615998e+00\n-2.6667735827262522e+01\n1.2633113407397959e+01\n5.1414390584464043e+00\n-2.9690620592606496e+01\n-8.9472286413154904e+00\n1.4160635234621816e+01\n-4.3806207436513418e+01\n1.3459659887490121e+01\n4.0489219520299082e+00\n-2.8117754835093312e+01\n-1.2813073339880752e+01\n1.3401936498479975e+01\n-4.0795537383498065e+01\n-1.0241809425658957e+01\n1.3808132540835436e+01\n-4.3130682488494507e+01\n6.9911650967689132e-01\n1.5508111136055176e+01\n-5.0679680391350622e+01\n1.0735761135013746e+01\n3.4275916569089113e+00\n-2.6240764802585360e+01\n-1.3955227546693147e+01\n1.3287188576743569e+01\n-4.1027387719694815e+01\n-1.3084721713334012e+01\n1.2894609904310991e+01\n-4.0333816180896896e+01\n1.0056567414094697e+01\n1.7416311479729249e+01\n-5.8847396963167704e+01\n-1.5316156418154625e+01\n1.2577257163352430e+01\n-3.8823422155792706e+01\n-1.3567864260111534e+01\n1.2707931256097263e+01\n-3.9844596035856242e+01\n-1.3443038957199949e+01\n1.2625295234494498e+01\n-3.9827768533965852e+01\n1.0574260827710541e+01\n1.9156895735086503e+00\n-2.2998920001556769e+01\n-1.2951495700438198e+01\n1.2755253718440247e+01\n-4.0490557479338399e+01\n-1.5006429344326323e+01\n1.1792543839533694e+01\n-3.9254753114566036e+01\n-3.8193881310760944e+00\n1.4907471401758716e+01\n-5.1001879815645275e+01\n-1.1461087049905405e+01\n1.2240604927431601e+01\n-4.2390941904868939e+01\n-1.2628598597150736e+01\n1.2390004147579621e+01\n-4.2114630339307254e+01\n1.3142917176227213e+01\n2.5454812626728263e+00\n-2.7680035510007702e+01\n1.4126271816832061e+01\n2.5486468411681851e+00\n-2.8167085540546339e+01\n1.0881908973823277e+01\n1.7343654016681125e+00\n-2.5183809479504486e+01\n-1.0394448812035562e+00\n2.8398945562110338e+00\n-2.3287035395590440e+01\n7.2217440267668187e-01\n1.5207375710184450e+00\n-2.0802016241572655e+01\n1.0823466813942860e+01\n6.9374067385698901e-01\n-2.3685644945253546e+01\n-1.2527634479021946e+01\n1.1357120251409881e+01\n-4.2449635687742088e+01\n3.6945001269111372e-01\n1.4501928082857403e+00\n-2.0875198814066959e+01\n4.7731633840641402e-01\n1.2689147679603696e+01\n-5.2059078403295942e+01\n9.0516957718335422e-01\n1.1272785785111925e+00\n-2.0480167080837663e+01\n-1.5762355351435701e+01\n1.0580452676696519e+01\n-3.9680631099082149e+01\n-1.1997559525576879e+01\n1.1259784666747613e+01\n-4.3387814630822646e+01\n1.4315341701556639e+01\n1.5975595544174288e+00\n-2.8789002602494641e+01\n-1.2954754853771894e+01\n1.1110488295819511e+01\n-4.4251533861912648e+01\n-2.0833863060961599e+00\n9.9178926085096712e+00\n-4.5816544303165735e+01\n1.4392137454615659e+01\n1.0566387534976545e+00\n-2.8254211388719511e+01\n-1.4723265301488432e+01\n1.0260193047956708e+01\n-4.1216630558165868e+01\n-1.5993172081101813e+01\n1.0243564958783500e+01\n-4.1399425762122256e+01\n1.1345931018450987e+01\n-9.8982437832548203e-02\n-2.5725007295747741e+01\n-2.9766232268498385e+00\n3.1471739468632807e+00\n-2.7843998311272305e+01\n1.4775804735960191e+01\n1.1595494816626999e-01\n-2.8793621696850416e+01\n-2.7763344854265806e+00\n2.9083873293461275e+00\n-2.7488667596423678e+01\n1.4330643910938358e+01\n4.0421382267364314e-01\n-2.9800978095006197e+01\n-1.5536814241389225e+01\n9.4167902093623166e+00\n-4.2601947316307033e+01\n-3.2791545423868618e+00\n2.6220952738377217e+00\n-2.7066674117911401e+01\n-3.5157851864265299e+00\n2.4287721694158448e+00\n-2.6692560394986067e+01\n-1.0729539713237504e+00\n1.5800900359290726e-01\n-2.1560296359310303e+01\n-5.6374762293112946e-01\n1.8735901708752323e-01\n-2.2058423877936981e+01\n-2.0638743288419121e+00\n6.3487983724078312e+00\n-4.3316070698021370e+01\n2.7180673530472887e+00\n-1.0839258317411529e+00\n-2.0661292810506879e+01\n-7.9711905035238084e-01\n-2.4951544249116206e-01\n-2.1365842805329180e+01\n8.2464012505337003e-01\n-8.9458478722886803e-01\n-2.0552219445723232e+01\n4.4600193855370493e-02\n-1.3315801375801444e+00\n-2.0542168348907719e+01\n-1.0220607073225925e+00\n-1.0671874338317167e+00\n-2.1947850171371869e+01\n-9.4347236135726416e+00\n3.2712122960678234e+00\n-3.6980376756961356e+01\n-7.4383970974097335e-01\n-1.9469626067757608e+00\n-2.1496207358027458e+01\n-1.2606730447026315e+00\n-2.1034075892260673e+00\n-2.0670008733421628e+01\n-8.5300277253542245e-01\n-2.6899142296960763e+00\n-2.0395582018093272e+01\n1.3427060675410623e+00\n-3.3044516904842895e+00\n-1.9999171559032327e+01\n-8.4264328753543580e+00\n8.0497050786660940e-01\n-3.3556530718184057e+01\n-4.5740330454816028e-02\n-3.0662362324934427e+00\n-2.1444518798116579e+01\n-3.4649617917797166e+00\n-2.1994369452728812e+00\n-2.4163505701570369e+01\n-3.5259771327152878e+00\n-2.1835779022887558e+00\n-2.4520786548551062e+01\n1.9774406268941627e-01\n-3.5376697359598586e+00\n-2.0866467262197180e+01\n1.6454928494609769e-01\n-3.3968083657757986e+00\n-2.1763997792595667e+01\n-2.0646046887804159e+00\n-2.9024430290307159e+00\n-2.3956715193633190e+01\n-9.2954784418325751e+00\n-2.2369808309936348e-01\n-3.2782754807353172e+01\n5.7089664068289037e-01\n-3.8423390577137364e+00\n-2.1973671234326254e+01\n-7.1123976138053084e+00\n-1.0392252354541720e+00\n-3.1469482871402601e+01\n-2.0601380795808875e+00\n-3.4443967462298803e+00\n-2.4622285848397812e+01\n-1.2421986730770795e+00\n-3.8494995211345131e+00\n-2.3801257959787424e+01\n-1.7906288852009731e+00\n-3.6902417577273203e+00\n-2.4245438679616278e+01\n-8.1235846447545637e+00\n-1.8145474741163237e+00\n-3.0767592349513986e+01\n-7.3546389823395950e+00\n-1.8583919934047068e+00\n-3.1401247942385087e+01\n-9.5370200002801013e+00\n-3.0530211932375253e+00\n-2.9140351544826650e+01\n-7.6608628684887874e+00\n-3.7708816114890404e+00\n-2.8256073302511137e+01\n-7.1393436894981246e+00\n-3.9903246098252101e+00\n-2.8521571765844161e+01\n-6.8674419873073633e+00\n-4.7822449462465197e+00\n-2.5876603450176880e+01\n9.8530787375976736e+00\n1.4480061664985744e+01\n-2.8507348187448272e+01\n-1.2841776458007971e+01\n1.9671681968130795e+01\n-3.4400963477111198e+01\n1.4127313460153886e+01\n2.8264627407721495e+01\n-5.0147050067051303e+01\n1.8577858798133398e+01\n2.9323957262575419e+01\n-5.2771127804817368e+01\n1.8369867854594439e+01\n2.9274440490762725e+01\n-5.2576081035678733e+01\n2.0009747347863094e+00\n2.0699337012818606e+01\n-4.0003467798816786e+01\n1.6986572977119028e+01\n2.7419454389634701e+01\n-5.3170957207946216e+01\n9.2730712157068442e+00\n2.4063481881694443e+01\n-4.7734955206131318e+01\n9.4581480099589115e+00\n6.4762850213799208e+00\n-2.0909068231900282e+01\n2.3523727434102373e+00\n2.1474829336008991e+01\n-4.4300128524907990e+01\n9.5945981760902672e+00\n4.6116562402841055e+00\n-1.9480148889656981e+01\n5.3857597879979959e+00\n2.2232532417941627e+01\n-4.8194295719450317e+01\n-9.3212053945665883e+00\n1.7613787188501647e+01\n-3.8200950833273879e+01\n-1.3117029348913311e+01\n1.6752445453810108e+01\n-3.5713385390304865e+01\n4.1660919463800132e+00\n2.0707635556176982e+01\n-4.6473834807313686e+01\n6.3149181255570443e+00\n2.0870079017305152e+01\n-4.7746276359709128e+01\n1.5977901237658209e+01\n2.4208968803949904e+01\n-5.4899336888939203e+01\n1.2726436625605007e+01\n7.4076555790957306e+00\n-2.5938844248836151e+01\n-9.1938973831121356e+00\n1.7246557074886692e+01\n-3.8972137263334702e+01\n7.3734732032361201e+00\n2.0933223486111469e+01\n-4.8884836751885956e+01\n9.7212987769727270e+00\n5.7141150537639085e+00\n-2.3126601598747236e+01\n7.5236986102806993e+00\n1.9672090813248378e+01\n-4.9984972905033160e+01\n7.4291288615922388e+00\n2.0121323559670593e+01\n-5.0825115158579472e+01\n6.2612591266118320e+00\n2.0705781609672808e+01\n-5.1475191599038382e+01\n-1.1731167780971687e+01\n1.6158934163648890e+01\n-3.9485391255943021e+01\n-3.9569008608339082e+00\n1.7315606666843390e+01\n-4.4200851826710135e+01\n1.0148539547553174e+01\n3.6228109687782752e+00\n-2.2059561913626570e+01\n-7.3494409756027297e+00\n1.6043373432179699e+01\n-4.3128407337838603e+01\n-3.7888699444812977e+00\n1.6536292233694926e+01\n-4.5234377586771984e+01\n1.3028028603093333e+01\n5.2351445374295098e+00\n-2.7411100831600280e+01\n1.0423701305265677e+01\n5.3790601739442980e+00\n-2.7207448118222811e+01\n1.3874443600067744e+01\n4.0958848490582360e+00\n-2.6204856166381006e+01\n1.3108408743272879e+01\n4.8200969267497831e+00\n-2.7804575294174896e+01\n1.0457085170590721e+01\n3.8633332415816093e+00\n-2.5099616449698402e+01\n1.2028185838081075e+01\n5.9575626345047823e+00\n-3.0355005649369090e+01\n-1.1464756465944079e+01\n1.3975583727678380e+01\n-4.1196401693839100e+01\n7.3249400739331314e+00\n2.0268303117038624e+01\n-6.0840220691386129e+01\n1.3071806172507635e+01\n3.4675818397811837e+00\n-2.5782909121929880e+01\n-5.8488990715535960e-01\n1.6720931682379490e+01\n-5.1772497677688122e+01\n1.4983959865924943e+00\n1.5578385779564471e+01\n-5.2243301727392932e+01\n-1.2471150595201861e+01\n1.3194774392607471e+01\n-4.1657595568176269e+01\n-1.5163760113719242e+01\n1.2411989866593537e+01\n-3.9986367093775868e+01\n-1.5285240777247386e+01\n1.2083901721828560e+01\n-4.0175326769897175e+01\n-1.2578014658086222e+01\n1.2382790518757911e+01\n-4.3152986624623750e+01\n1.0914597343552895e+01\n8.8392993888016014e-01\n-2.4315704548078564e+01\n1.4067556510102588e-01\n1.2241127553330964e+00\n-2.0816384396411831e+01\n-1.5421227507980773e+00\n3.3558485057262990e+00\n-2.6973376745423103e+01\n-2.5428682736936241e+00\n3.5367424222175430e+00\n-2.8013662213992088e+01\n-3.4591030981951425e+00\n9.2386057868050013e+00\n-4.5399389788170240e+01\n-1.1383731133524902e+01\n1.0268837622529151e+01\n-4.4860015619505795e+01\n-1.6137602318192659e+01\n9.6352241457758403e+00\n-4.1544203765179326e+01\n-1.3605618944911020e+00\n9.1695057943561209e-01\n-2.2113347877247719e+01\n-6.1891244067764530e+00\n8.1058100825531039e+00\n-4.3388575584138742e+01\n-1.7383137140770404e+00\n7.0061866038826004e+00\n-4.2508592960405394e+01\n-3.3210753336696817e+00\n2.5042573859890846e+00\n-2.6976211992200877e+01\n3.0138701203023417e+00\n-6.1253090347681549e-01\n-2.0611479360391396e+01\n-1.1668409220531093e+00\n7.4334283868217783e+00\n-4.5052198526999589e+01\n4.5109298786904279e+00\n-1.1645892631639316e+00\n-2.1059613003308090e+01\n-3.5297332571536977e+00\n5.5920305822994445e+00\n-4.0323059779586615e+01\n2.2378048414820478e-01\n-7.1199873793522250e-01\n-2.0555234089902090e+01\n1.4043728226293309e+01\n-6.2846183472909845e-01\n-3.1178263088169579e+01\n-7.8874846251189341e+00\n5.6862130148360333e+00\n-4.0235004286655283e+01\n7.3198607044190134e-01\n-7.9056477926328339e-01\n-2.1402148244179894e+01\n1.4543468713284856e+01\n-1.3191609344049573e+00\n-3.0323579403601677e+01\n-1.8552126235268567e+00\n-1.0016144784245344e+00\n-2.1875361074726186e+01\n-4.7052708406298338e+00\n2.2550246731745545e+00\n-3.5971721968982138e+01\n-5.7075143702665763e+00\n1.3140479384155406e+00\n-3.4165223608043071e+01\n-1.4314730809211995e+00\n-2.2974488542884601e+00\n-2.2205878888639507e+01\n-2.8605095139058552e+00\n-1.9401761433432472e+00\n-2.4350271902563566e+01\n-9.0309130896097525e+00\n3.4635619360485030e-02\n-3.3271173772158527e+01\n-2.8691308453085531e+00\n-2.7372904779040148e+00\n-2.2654718002736292e+01\n-6.6763363623552969e+00\n-5.3989243200331327e-01\n-3.3489593942496022e+01\n-9.3414602270488842e+00\n-3.9657049088215957e-01\n-3.2102195799759571e+01\n-7.1628468290380809e+00\n-1.0393721667796949e+00\n-3.1708132914224983e+01\n-3.3743778004592144e+00\n-2.6931010820407035e+00\n-2.4942639341581160e+01\n-2.9336838363674693e+00\n-2.7487271186506184e+00\n-2.5639806407343293e+01\n1.3230802445159557e+00\n-4.3068752177472724e+00\n-2.1337337265356712e+01\n8.9915532953163044e+00\n7.7826010411859343e+00\n-2.0110515637663404e+01\n9.0843060568437739e+00\n7.7350299414643500e+00\n-2.0445224015056031e+01\n9.8249352227904030e+00\n2.4543671782245401e+01\n-4.9547058226139562e+01\n9.4551728533751511e+00\n6.8253493398351406e+00\n-2.2092441062218047e+01\n-1.3603920839513037e+01\n1.6599348632813726e+01\n-3.5142505348306670e+01\n8.6303056576718955e+00\n2.2805919124238809e+01\n-5.0180879256071137e+01\n9.0517115873165253e+00\n2.3232165896927256e+01\n-5.1532633885451474e+01\n9.0517115873165253e+00\n2.3232165896927256e+01\n-5.1532633885451474e+01\n1.4241542621930485e+01\n6.4338504699333381e+00\n-2.4856640925488986e+01\n7.9434728064192663e+00\n2.1349597641740697e+01\n-5.1003156389321667e+01\n1.1070586061189074e+01\n2.2617927905127733e+01\n-5.6008597907399746e+01\n1.7761709768742175e+01\n2.1219673494159426e+01\n-5.6413240750799574e+01\n1.2631349915504707e+01\n6.4468894530370280e+00\n-2.7553064598750176e+01\n1.2082554494940192e+01\n7.0413393384381671e+00\n-2.8898264831502658e+01\n4.5458241931412395e+00\n1.8545607603349474e+01\n-4.9733735844216390e+01\n4.5565145466882750e+00\n1.8680851759865909e+01\n-5.0465697368214350e+01\n1.0233615786633125e+01\n5.2765324525944051e+00\n-2.5492508802866990e+01\n1.0280315620518506e+01\n5.0495441829671970e+00\n-2.5228328554613963e+01\n1.0678330443115902e+01\n1.9857419291803282e+01\n-5.4912444547774172e+01\n1.0224190065498229e+01\n2.8563033547173360e+00\n-2.2121898415886641e+01\n-9.4164349473043440e+00\n1.4937954460117401e+01\n-4.2323440089578753e+01\n5.6027170853188570e+00\n1.9609400880785898e+01\n-5.8867802632802110e+01\n1.2591428460563746e+01\n4.3843350459766732e+00\n-2.7651686162087636e+01\n-1.2104230432923366e+01\n1.4124299691923703e+01\n-4.2006089238250439e+01\n-1.2047550806734945e+01\n1.3776554456116527e+01\n-4.1118743551800108e+01\n1.3376763313437584e+01\n3.9430690719364434e+00\n-2.8150790859283568e+01\n1.2814771138568876e+01\n4.6484588020691309e+00\n-2.9596137764422700e+01\n1.3896906054074329e+01\n7.3464073129558614e+00\n-3.6544908067422519e+01\n-1.2450015791602388e+01\n1.3269108041025012e+01\n-4.1365712488179163e+01\n-1.3876947014463697e+01\n1.2805233412837504e+01\n-4.0039652789337332e+01\n-6.7087231404298846e+00\n1.3142450483285749e+01\n-4.6908453665801581e+01\n-4.5168748918896295e-01\n2.0152366854165220e+00\n-2.1379765278915887e+01\n-4.5168748918896295e-01\n2.0152366854165220e+00\n-2.1379765278915887e+01\n1.4202738708206091e+01\n1.8092995838199444e+00\n-2.7756057712950906e+01\n-4.7161553279850360e-01\n9.0963766231100873e+00\n-4.4361760443899513e+01\n1.0391230490163117e+00\n5.0756484994986639e-01\n-2.0260132590926901e+01\n-3.2841134497653313e+00\n2.9716562310404822e+00\n-2.7647273113813235e+01\n-1.8393701877683692e+00\n6.6682342378851587e+00\n-4.3791733139178156e+01\n-3.1547282715390819e+00\n3.5217428585850252e-01\n-2.3953717993482666e+01\n8.6742491489205864e-01\n-2.8291223091062814e+00\n-2.0350179133378706e+01\n-7.6439332846478196e+00\n-4.5327875883171231e-01\n-3.2346173458611638e+01\n-8.4452733227937049e+00\n-7.6992959431600549e-01\n-3.2086576149806895e+01\n-2.5585953904799146e+00\n-3.5360400579438207e+00\n-2.4902336736139581e+01\n-1.1373306577581458e+01\n-1.3988004846988844e+00\n-3.1040817063611264e+01\n-5.0893272867058414e-01\n2.4043093878770968e+01\n-4.0583522954971912e+01\n-5.0893272867058414e-01\n2.4043093878770968e+01\n-4.0583522954971912e+01\n1.1191851944408656e+01\n1.2427398643139909e+01\n-3.3841842114977041e+01\n1.3045848779134822e+01\n2.4383133824344068e+01\n-5.6372927978156845e+01\n1.2180268319098495e+01\n2.3827077653300361e+01\n-5.5438515187614748e+01\n6.0742199639971490e+00\n2.1258070566765518e+01\n-5.1367274491532918e+01\n1.0121556869979408e+01\n2.0617898399844709e+01\n-5.1525305027927580e+01\n-2.2237230324916948e-01\n1.7933098574461219e+01\n-4.7696665852190080e+01\n4.0392856320560924e+00\n1.8151295707661738e+01\n-4.9780821645781629e+01\n1.3093141766347067e+01\n5.6088522170606607e+00\n-2.6943329175632357e+01\n-6.4968812978667648e-02\n1.8019834150295932e+01\n-5.1209315659629652e+01\n-5.3780263638657235e+00\n1.5306171019245662e+01\n-4.5615290116728055e+01\n1.2523048695451337e+01\n4.8333709950741159e+00\n-3.0834356279754811e+01\n-1.5325293411717137e+01\n1.2280222818212586e+01\n-4.0267447131978166e+01\n-1.2170062035609389e+01\n1.1390541286114637e+01\n-4.4448750570935573e+01\n-4.1261464717984425e-01\n9.0926755654388547e+00\n-4.5280379326392939e+01\n1.3587924915281661e+01\n1.2636092975950788e+00\n-3.1063404762737665e+01\n1.4354351362527749e+01\n3.1621256381190116e-01\n-2.9584829788033392e+01\n1.4354351362527749e+01\n3.1621256381190116e-01\n-2.9584829788033392e+01\n-1.2990919780700644e-01\n-3.4753140537896388e-01\n-2.0934787952483337e+01\n1.4225440767711303e+01\n-7.7036822218967682e-01\n-3.0636867009193619e+01\n1.4488086539195900e+01\n-1.0351025647746239e+00\n-3.0463073001781332e+01\n2.9166939692546565e+00\n-4.0945153033498602e+00\n-2.0882936374496321e+01\n-9.5336986760485303e+00\n-1.5655481603281964e+00\n-3.0400265821197028e+01\n-9.2927625989957967e+00\n-1.6934734956073703e+00\n-3.1308004198376604e+01\n-9.2927625989957967e+00\n-1.6934734956073703e+00\n-3.1308004198376604e+01\n-7.5620133807071497e+00\n-2.1130063389122027e+00\n-3.1115104579123710e+01\n-5.7627732331550474e+00\n2.2306661289362292e+01\n-3.8455827807531250e+01\n3.7760176044366571e+00\n1.9512913321847709e+01\n-5.1372867860795878e+01\n-9.6545758271574265e+00\n1.3680415994995498e+01\n-4.3988372922393438e+01\n1.0835094657590330e+01\n2.2087222296882540e+00\n-2.6287949843358589e+01\n3.2485804817488142e+00\n-6.2172218786033817e-01\n-2.0711714382854673e+01\n-3.7474106825097437e+00\n-4.4237222594913633e-01\n-2.7738332833956562e+01\n-1.6733831860104211e+00\n-3.8259503694477774e+00\n-2.4212027339186282e+01\n-7.8906017787677936e+00\n-2.6709305147429414e+00\n-2.9484118571903771e+01\n1.3090402187340118e+01\n5.8488506572357046e+00\n-2.7193936766598448e+01\n2.7182622208422598e+00\n1.7901046018535318e+01\n-4.9511001302348774e+01\n7.4967947693000178e-02\n8.2660921392021780e-01\n-2.0670651191316995e+01\n1.4973061250390225e+00\n2.7146392101816252e-01\n-2.0302694029989933e+01\n-2.9181582186850434e+00\n-7.2040238156617331e-01\n-2.2424609082625992e+01\n-2.1361660151672139e+00\n-1.4366796729679754e+00\n-2.1525085308995138e+01\n4.5139014980125394e+00\n-3.2303924316679353e+00\n-2.1163708796675870e+01\n2.0438915265066315e+00\n-4.6899277963360220e+00\n-2.1272073434662939e+01\n-4.4514214854045908e-01\n-4.0996836675448494e+00\n-2.1724604812796027e+01\n9.3574134164403677e+00\n7.9405530810656124e+00\n-2.3366342369405498e+01\n8.7077488659851099e+00\n2.0163358431441146e+01\n-5.0054891419686243e+01\n-8.7368734069142686e+00\n1.4573414128363428e+01\n-4.3706905365306390e+01\n-1.1415921878563888e+00\n1.0297829726390185e+01\n-4.6786048046524478e+01\n1.4398904629747465e+01\n3.5648595763306656e-01\n-2.9005296046674548e+01\n-7.5504729064172640e+00\n1.8587490972862362e+01\n-3.9451694566445326e+01\n1.5292388701089211e+01\n1.6627856841803169e+01\n-4.3759137783314635e+01\n6.9477655172224217e+00\n2.2764820748547788e+01\n-4.6770984055873086e+01\n1.6859949245637321e+01\n2.5423905070780169e+01\n-5.2740833807411498e+01\n1.0064051011615662e+01\n2.6335463493530189e+00\n-2.1882493054500916e+01\n6.4828082296189500e+00\n1.5836891981477585e+01\n-5.2825611099421529e+01\n8.9358871991530915e+00\n2.4363063555519997e+01\n-4.7403552074594479e+01\n1.7904805266478320e+01\n2.5601040701468168e+01\n-5.2441420521555777e+01\n5.6994158003903301e+00\n2.2781926504702138e+01\n-4.7308149870919813e+01\n5.6272771150519016e+00\n2.2146087295916338e+01\n-4.8068735909070064e+01\n1.2421292205289690e+01\n2.4091247519261987e+01\n-5.2533893110867460e+01\n1.3359927919056810e+01\n2.3732201964494475e+01\n-5.3254184224283975e+01\n1.7959197595767857e+00\n2.0669064643292678e+01\n-4.5959861549251919e+01\n1.2039022665181458e+01\n2.1871282885439321e+01\n-5.0597370656763538e+01\n1.2408677181063496e+01\n5.3653150385779442e+00\n-2.4520299115699675e+01\n1.2256256436593532e+01\n2.2789876524554920e+01\n-5.3510807597968018e+01\n1.4575269764841360e+01\n2.1738418492560655e+01\n-5.6439773819053372e+01\n1.1385792766355365e+01\n9.9854991270630418e+00\n-3.5185009029333848e+01\n1.2581638073230856e+01\n1.0388433189928946e+01\n-3.6604767420906747e+01\n-7.4306958107416987e-01\n1.2621139907732903e+01\n-3.6844461432563165e+01\n1.9397963890634207e+00\n1.7947856028245337e+01\n-4.7796582318227095e+01\n1.3702926119889407e+01\n2.0654961752448098e+00\n-2.3871071586358831e+01\n1.4592978750970552e+01\n2.2018807338378830e+00\n-2.4906017723446048e+01\n1.4683701983805229e+01\n2.0999656200215742e+00\n-2.4714253797165192e+01\n1.3749075864038820e+01\n1.7427305973861931e+00\n-2.4499093115405174e+01\n1.4059872096570722e+01\n1.2348215230764006e+00\n-2.3768964039529980e+01\n1.2599488818586806e+01\n4.2599723306150317e+00\n-3.0319377908062513e+01\n1.2495125000926381e+01\n4.2578488294266092e+00\n-3.0524885823412738e+01\n1.2944046634926316e+01\n3.3776966534171291e+00\n-2.9875311629529932e+01\n1.3908558917697910e+01\n1.0733628252667244e+00\n-2.5343500274420869e+01\n1.2783882264566463e+01\n3.4085555783782304e+00\n-3.0414523588083874e+01\n1.4091764805328143e+01\n3.3850692815923972e-01\n-2.5938499815571188e+01\n1.4777388336507610e+01\n3.2496059528950033e-01\n-2.6660182804863773e+01\n1.4176881892408959e+01\n-6.4215498577293612e-02\n-2.6315463434624906e+01\n4.4427457184134050e-01\n2.6461673718706130e-01\n-2.0599140010535219e+01\n4.4427457184134050e-01\n2.6461673718706130e-01\n-2.0599140010535219e+01\n1.4800229395922832e+01\n-2.5018827011718409e-01\n-2.7289350989829892e+01\n1.4803327885102849e+01\n-3.1527961299510537e-01\n-2.7244616779856891e+01\n1.4713175734406068e+01\n-3.6273854339711403e-01\n-2.7708387022804430e+01\n1.4845803121796777e+01\n-7.5074419781330393e-01\n-2.7808544377948230e+01\n-5.6355538973770847e-01\n7.1682472070662797e+00\n-4.2135172629854374e+01\n-1.2878698529868355e+00\n6.2920695049314235e+00\n-4.1152718204714091e+01\n1.5056207893966622e+01\n-2.6665728461958484e+00\n-2.7247870337578714e+01\n1.3243724573387222e+01\n-2.6883658433866535e+00\n-2.8940774797922952e+01\n-6.1217796310129788e+00\n5.2023400691459427e+00\n-3.9486594088934503e+01\n1.2576629481135186e+01\n-5.7085948120899594e+00\n-2.5059014160963287e+01\n-1.3835824204561122e-02\n-3.7250313972538640e+00\n-2.1292615213161717e+01\n1.1266474831186802e+01\n-7.0564531414782445e+00\n-2.3279993210964587e+01\n-3.9421679468824955e+00\n-7.4223585299184123e+00\n-2.2432423958122186e+01\n1.1174282379807746e+01\n8.6175169640542855e+00\n-2.5377185592215625e+01\n7.9634737622507519e+00\n2.1740892125779133e+01\n-4.8065224136366368e+01\n1.7145108096562886e+01\n2.3094745211839587e+01\n-5.3754432284631733e+01\n1.8127664255194269e+01\n2.0513451777127536e+01\n-5.6565022882510924e+01\n1.2729565301067849e+01\n4.0662282948619328e+00\n-2.5907170229457048e+01\n1.3043748121129687e+01\n9.5614581073210196e+00\n-3.6797775906696486e+01\n1.1947101707912854e+01\n5.6630193835794174e+00\n-2.9193273755939874e+01\n1.2082182382077516e+01\n5.1881194353898632e+00\n-3.1216637894952559e+01\n1.4330858470981914e+01\n7.7538847637132235e-01\n-2.3190530518995203e+01\n1.2564139412011281e+01\n4.4763118820078285e+00\n-3.0184959509156290e+01\n9.6962244933705417e+00\n1.4677241795134890e+01\n-5.0912891920937284e+01\n9.7825045474375170e+00\n1.4973412444475349e+01\n-5.1353969937422669e+01\n1.3753091561985787e+01\n9.8184569141451339e-01\n-2.6322440873916392e+01\n1.3918654974979802e+01\n5.9281616760611999e-01\n-2.6214679735440534e+01\n1.4384756610995435e+01\n-3.3699072432733973e-01\n-2.5619942479430879e+01\n-5.3186474290889629e+00\n1.3543978969456621e+01\n-4.8706592684205837e+01\n1.4240814938480753e+01\n-2.2275485500014966e-01\n-2.6529003646241584e+01\n1.4717136844617738e+01\n-1.9793316022203000e+00\n-2.7768566688550393e+01\n1.4980499759406229e+01\n-2.6289653007018647e+00\n-2.7433849710623925e+01\n1.4964749538030254e+01\n-2.8493811591682845e+00\n-2.8127683034091174e+01\n1.4787554599514396e+01\n-2.6019264062709393e+00\n-2.8927027733661681e+01\n1.5401418770724714e+01\n-3.5136631421031179e+00\n-2.6988483865663426e+01\n-6.7279807060881742e+00\n-4.6029007632540608e-01\n-3.2047897919688417e+01\n1.7378417677000884e+00\n-5.2952205191810133e+00\n-2.2045909754648047e+01\n-8.8475411446683925e+00\n-1.1896569061251503e+00\n-3.0734646426797923e+01\n3.9026141808945298e+00\n-9.0693945714073418e+00\n-2.0636779438429130e+01\n-6.5724116836129109e+00\n-5.4074983861184558e+00\n-2.5224487635397153e+01\n4.9831784270961341e+00\n2.3556876527224173e+01\n-4.5711141760405098e+01\n8.9177072165569040e+00\n2.3489480999239603e+01\n-4.8445525518313346e+01\n6.7807279786381391e+00\n2.2645952421367461e+01\n-4.8616215455041726e+01\n1.2466846662701258e+01\n2.4148968004910579e+01\n-5.2294885918227791e+01\n1.2512295479013689e+01\n6.8711800310504998e+00\n-2.6885015962844591e+01\n1.3197196595603138e+01\n5.7311807323749466e+00\n-2.5467177201199402e+01\n1.8867856003835119e+01\n2.1942651373365930e+01\n-5.5096734965725283e+01\n1.2021994278946222e+01\n5.8406583909013703e+00\n-2.6573510816622452e+01\n1.3443525847065841e+01\n2.7253590098167395e+00\n-2.3842903017165021e+01\n1.3349145734529788e+01\n8.4720426402805682e+00\n-3.4746254059098682e+01\n1.3475861942510276e+01\n2.5479588225326437e+00\n-2.4156535146880923e+01\n5.3570902832763849e+00\n1.8208011852978792e+01\n-5.3786123188476516e+01\n-1.1354721095604821e+00\n1.6499450617721884e+01\n-4.8272747044729208e+01\n1.4202779674840492e+01\n8.7671039881449087e-01\n-2.3404296426617691e+01\n1.4197733830721083e+01\n-2.1797259065146096e-01\n-2.6592696399088318e+01\n1.4926462580530096e+01\n-5.8937431528385498e-01\n-2.7149334307330093e+01\n1.4585303626750523e+01\n-5.0071537405495203e-01\n-2.8636700970397069e+01\n1.4451321552991445e+01\n-7.6046385922906801e-01\n-2.9701919126779753e+01\n-1.2115774883678625e+00\n7.0791866884626797e+00\n-4.2032789455293617e+01\n1.1848023281386428e+01\n-7.0037650200524935e+00\n-2.3318714153838403e+01\n1.1126592794311488e+01\n-7.0958764351512089e+00\n-2.3246672681697294e+01\n-8.3352449111878375e+00\n-5.7610114124351486e-01\n-3.1438212220750920e+01\n2.5912305885165487e+00\n-8.6267316621002621e+00\n-2.0953570108103730e+01\n-5.5893490265694599e+00\n-7.2562470332799185e+00\n-2.2640718011194814e+01\n9.0722492318368460e+00\n2.4185334334846434e+01\n-4.7917369762207883e+01\n1.1984966091746703e+01\n1.2514622216906586e+01\n-3.2805578923840713e+01\n1.2294902315632452e+01\n7.0396938739418990e+00\n-2.7492557723017224e+01\n1.1839472058086773e+01\n5.9193538996641548e+00\n-2.8066064787545294e+01\n2.4683495739371578e-01\n1.8293204673666938e+00\n-2.0786388054256580e+01\n1.3926748417413446e+01\n8.3921485025315590e-01\n-2.5824759298931451e+01\n1.5510891452483982e+01\n-2.0646871505500783e+00\n-2.6950277797850756e+01\n-1.7092578780804684e+00\n6.3126942037059974e+00\n-4.1395082285612894e+01\n-6.4371300576570372e+00\n-7.5209154723578061e-03\n-3.2523095269502470e+01\n-9.3383969741599717e+00\n-3.6426374796538941e-01\n-3.1771871664911874e+01\n6.0475399250648767e+00\n-8.9540270024796325e+00\n-2.0638129717402233e+01\n-2.3140311094510166e+00\n-6.1421218470122687e+00\n-2.3381593452292048e+01\n5.4106529203028781e+00\n-9.5433750641754109e+00\n-1.9982841452721434e+01\n5.3539052083476752e+00\n1.7657776675058859e+01\n-5.3690424631293318e+01\n7.3301278110407084e+00\n1.3002821267624025e+01\n-4.9072681003336442e+01\n1.4343845899259204e+01\n-2.5726726454255350e-01\n-2.5415272828253649e+01\n1.3765753225282563e+01\n2.4217415836117129e-01\n-2.8910740665662363e+01\n-1.9219755499346847e+00\n1.1440005280604753e+01\n-4.7968624530200579e+01\n6.2389986489038280e+00\n-9.1682049113815562e+00\n-2.0508916524734349e+01\n1.3479782638362511e+01\n2.6313000340606321e+00\n-2.8523501944297955e+01\n1.2614760879814439e+00\n1.8172922739102525e+01\n-4.7639008271667038e+01\n-1.7962470272749655e+00\n-5.1604483004745907e+00\n-2.2797914540115073e+01\n-7.3433980557541938e+00\n-4.5525118344512032e+00\n-2.6722032251842748e+01\n4.7595261195789460e+00\n-9.5867897125562482e+00\n-1.9914675672232324e+01\n1.3701929332318814e+01\n2.1667348070912236e+00\n-2.4166909348545399e+01\n8.3708322232344621e+00\n2.2333990359944462e+01\n-5.0653201676220768e+01\n3.0844156819864481e+00\n1.9656236157156759e+01\n-4.8941575308074114e+01\n3.0844156819864481e+00\n1.9656236157156759e+01\n-4.8941575308074114e+01\n1.2428877665922473e+00\n1.9002189917927439e+01\n-4.7727810020628830e+01\n1.3339054477283875e+01\n7.6647097141944469e+00\n-2.7171148337265972e+01\n9.4770961766116657e-01\n1.5593574602572019e+01\n-5.1072255766825364e+01\n-6.8818154545349657e+00\n1.3977593176251458e+01\n-4.4469721904757570e+01\n-8.1731640088793966e+00\n1.4155786907982447e+01\n-4.4560042130872255e+01\n-1.2058969360267357e+01\n1.2648926356954838e+01\n-3.9137780469475295e+01\n-6.9693618579334125e+00\n1.3690495651859681e+01\n-4.4504415987462870e+01\n-1.2819728224953078e+01\n1.2268097396011894e+01\n-3.8603239795793833e+01\n-1.4877254510070168e+01\n1.2938674905544991e+01\n-4.1036340613323425e+01\n-1.2129104538421154e+00\n1.4265406507392152e+01\n-5.1497596117731192e+01\n-1.0846449718649738e+00\n1.3763674103988766e+01\n-5.0959925540085919e+01\n-1.0005907690310535e+01\n1.2128653168070471e+01\n-4.3149242967355114e+01\n-1.0776162427715658e+01\n1.1897223889408636e+01\n-4.2168740932539983e+01\n-1.3141192885482150e+01\n1.2303791944919626e+01\n-4.3157345179678572e+01\n2.1464406532843974e+00\n1.2523352660987403e+01\n-4.9485883537233356e+01\n-9.7854938445596638e+00\n1.1677772945027394e+01\n-4.4088470382287014e+01\n1.3248775086323837e+01\n6.0687387935718080e+00\n-2.8209367563475038e+01\n-1.4341304766947831e+01\n1.0833332239538192e+01\n-4.1067514191170602e+01\n-1.4065802452725116e+01\n1.0826932529580635e+01\n-4.1140777978351139e+01\n-1.2425371573134500e+01\n1.0747035532696486e+01\n-4.1796751642126473e+01\n-1.2425371573134500e+01\n1.0747035532696486e+01\n-4.1796751642126473e+01\n-1.2442697216078244e+01\n1.0657491939456797e+01\n-4.1870981049619488e+01\n1.4197458202166800e+01\n7.2484979935706688e+00\n-3.7066929867571901e+01\n-1.3189599911309770e+01\n1.0375057982260699e+01\n-4.1741579963689986e+01\n-1.3199933791359431e+01\n1.0287344626460877e+01\n-4.1679183920797584e+01\n-1.7298430499772444e+01\n1.0634431850233932e+01\n-4.1549201056093985e+01\n-1.3296568948434242e+01\n9.7662334303826359e+00\n-4.2711509569558451e+01\n-1.6406977720881923e+01\n9.9812373488817379e+00\n-4.2454084097659774e+01\n-1.6609510692091760e+01\n9.8688885706894318e+00\n-4.2501701112986147e+01\n1.4663067752939371e+01\n3.7794318631450086e+00\n-2.6456601425244131e+01\n1.4564734722587835e+01\n3.7638503123355123e+00\n-2.6667139768437696e+01\n1.2961339713609329e+01\n4.1883328807711910e+00\n-3.0733644032180383e+01\n1.4981736538861663e+01\n3.2766090868156272e+00\n-2.6148761693495409e+01\n1.3015284121005985e+01\n4.0994620643433315e+00\n-3.0665668370516695e+01\n-6.6037830874096528e+00\n7.5049400438344112e+00\n-4.2068980517997687e+01\n1.4962115164362620e+01\n3.2124568658540644e+00\n-2.6265930157501298e+01\n1.5099683496660129e+01\n3.0967391925831977e+00\n-2.5964625376321443e+01\n-1.4751647538098915e+01\n8.2385561332161092e+00\n-4.4133821227665294e+01\n1.4935417785943157e+01\n3.0428934764428477e+00\n-2.6368643880349850e+01\n1.4528787795219346e+01\n2.8985458280526073e+00\n-2.7250804960388251e+01\n-1.3731797786706309e+01\n7.0186505250905338e+00\n-4.2058135699085639e+01\n1.4936574766259600e+01\n2.4429172634243170e+00\n-2.6668153195201153e+01\n1.3784734109266784e+01\n2.3631514332386656e+00\n-2.9963194423388273e+01\n1.4522734908834193e+01\n1.9655961779436091e+00\n-2.7923370461693590e+01\n1.4273712267410485e+01\n1.7483444460635305e+00\n-2.9075460757293754e+01\n1.5200614709630527e+01\n1.3799459224442561e+00\n-2.6812597360120190e+01\n1.3148472407606091e+01\n1.5412139369665325e+00\n-3.2971051031935424e+01\n1.2787285272106489e+01\n1.6166976910002044e+00\n-3.3832099413860796e+01\n8.7440747748588232e-01\n1.7654992237668432e+00\n-2.0866757261245052e+01\n2.5355187440474460e+00\n1.5501609334530075e+00\n-2.0694482113383444e+01\n1.5174708532173032e+01\n8.9333116794691936e-01\n-2.7407658312174675e+01\n-6.2737697195001746e-02\n1.6192150179242584e+00\n-2.1161356293698990e+01\n1.5213746013270478e+01\n6.2837465563054506e-01\n-2.7580491693474119e+01\n-1.5171278151874803e+00\n1.6463930271058695e+00\n-2.2627752992804798e+01\n1.1749799980764515e+00\n1.2214673935428659e+00\n-2.0522365803573599e+01\n1.1749799980764515e+00\n1.2214673935428659e+00\n-2.0522365803573599e+01\n-1.4962424895143042e-01\n1.1257116636210596e+00\n-2.1014529848555632e+01\n1.3641991699980617e+01\n1.5289224961586279e-01\n-3.2147676532430914e+01\n1.5835582277268452e+01\n-6.8565443173063401e-01\n-2.7032380358396363e+01\n2.1349895367413065e+00\n3.1270194445386401e-01\n-2.0311109734291609e+01\n1.4322473302062916e+01\n-9.1085118119045327e-01\n-3.0950929001745589e+01\n-6.8186081125842604e+00\n4.3629192334779238e-01\n-3.2931426645115380e+01\n-1.3192994962094971e+01\n3.0714342309274800e-01\n-3.3285668025290946e+01\n-1.7252296497737967e+00\n-5.0650352443735780e-01\n-2.1623275080333602e+01\n-6.7831411626258853e-01\n-1.0672835489885275e+00\n-2.0874873250744706e+01\n-2.3503391928301767e+00\n-1.1145834688481455e+00\n-2.1870927312387664e+01\n-9.6043606775673762e+00\n-1.1581486988844079e+00\n-3.0587102032530463e+01\n-9.6095665643325763e+00\n-1.1864035374339084e+00\n-3.0410306015407247e+01\n-2.4456652733702526e+00\n-1.2873893710033533e+00\n-2.1667931227188948e+01\n1.3558439254773905e+01\n-3.5225820366156961e+00\n-2.8246017692785291e+01\n2.6615239889592819e+00\n-2.0255709534034594e+00\n-2.0292530451211455e+01\n-1.2366776849783780e+00\n-1.9199891126392359e+00\n-2.0838359080490630e+01\n3.1220625079348121e+00\n-2.8895761859569431e+00\n-1.9745328928574086e+01\n-6.0206945145280599e+00\n-6.6649236565535528e+00\n-2.2793229515847475e+01\n5.2579421746112942e+00\n-8.0774896700739252e+00\n-2.1236543247935487e+01\n5.4300300817811129e+00\n-8.1686872549163532e+00\n-2.1080472516738368e+01\n5.1112991661622127e+00\n-8.2022404765296280e+00\n-2.0990721830637387e+01\n4.5178969146489489e+00\n-8.2920031783100647e+00\n-2.0845783446557913e+01\n3.4335178936198880e+00\n-8.4579421887585919e+00\n-2.0497246457492174e+01\n2.3066677703012268e+00\n-8.5388991284688771e+00\n-2.0308680821039065e+01\n4.6542145837861701e+00\n-8.8278584545738035e+00\n-2.0053661525941376e+01\n4.0995835313038524e+00\n-8.7950060746164009e+00\n-2.0071095235211278e+01\n4.0995835313038524e+00\n-8.7950060746164009e+00\n-2.0071095235211278e+01\n3.2928534779966174e+00\n-9.1201921029688098e+00\n-1.9503583254607872e+01\n1.2768015545955476e+01\n8.0653486890912145e+00\n-2.8307897483758509e+01\n4.6089476335593389e+00\n1.6918738790359438e+01\n-5.6178814583076161e+01\n1.4523131758246142e+00\n1.5332558288472013e+01\n-5.3403581021408904e+01\n-1.5614828367938481e+01\n1.3081925232029830e+01\n-4.0616368041719710e+01\n8.1342323240948584e+00\n1.4978242503132970e+01\n-5.4376298671790053e+01\n2.6984287546107852e+00\n1.5017467982647187e+01\n-5.3234627236362527e+01\n-4.7995764035210464e-01\n1.4683288103198436e+01\n-5.2201891397758537e+01\n6.2777889316596169e-01\n1.4282548563494647e+01\n-5.1666345099129906e+01\n-1.2354091973196587e+01\n1.2656590485863921e+01\n-4.2079928824151843e+01\n-1.3885571231849386e+01\n1.2108037950129313e+01\n-4.1765527511134472e+01\n-1.0080175525328148e+01\n1.1816773357028707e+01\n-4.5477601204948783e+01\n-1.0080175525328148e+01\n1.1816773357028707e+01\n-4.5477601204948783e+01\n-1.6999395268331522e+01\n1.0763635715497893e+01\n-4.1795895502284814e+01\n-1.3756177567900696e+01\n1.0257450089989293e+01\n-4.2649427736878728e+01\n1.3861169095434812e+01\n4.1031851431624782e+00\n-2.7921170892475651e+01\n8.9706186875809346e-01\n7.6416872635458306e+00\n-4.2782349813639307e+01\n-1.5958426796224282e+01\n8.6107509673775660e+00\n-4.4106869464684323e+01\n-1.5367776839836123e+01\n8.5026620342444499e+00\n-4.4544461964081790e+01\n-1.0670174349130940e+01\n7.8189664406863812e+00\n-4.2857192761400391e+01\n-1.4693688398287110e+01\n7.3302581367397348e+00\n-4.3198734675488566e+01\n-1.6705833299379407e+00\n3.3548317886439061e+00\n-2.6661055649558456e+01\n1.3189739479368477e+01\n1.0593448764581557e+00\n-3.3289922110393270e+01\n3.3800983500812554e+00\n1.0108835824507914e+00\n-2.2208944071228235e+01\n6.0713556683949514e+00\n4.3665990422216716e-01\n-2.3937179284928177e+01\n-1.4248719900713779e+01\n2.2740363388509977e+00\n-3.6138167505373374e+01\n4.2498584791415741e+00\n-2.2227049795027421e-02\n-2.2045124825935712e+01\n-6.2024490503385961e+00\n-5.1305726945875138e-02\n-3.1910928781169385e+01\n-1.4519537494946743e+01\n2.1293001901234246e-01\n-3.3455396855584226e+01\n1.3312440904737372e+01\n-2.4694681138389565e+00\n-2.9622569628587598e+01\n5.8525870900849633e+00\n-1.7995909737208287e+00\n-2.1368855494232406e+01\n-9.7925581083840783e+00\n-1.0380132726360254e+00\n-3.1042118400160621e+01\n5.2788438747165181e+00\n-2.2848489537549521e+00\n-2.0681557220010742e+01\n-2.0251973135784951e+00\n-1.8131702123245843e+00\n-2.1217910864238469e+01\n1.0653054313013348e+00\n-2.4175787869519572e+00\n-2.0934908710435298e+01\n-2.8878721547831137e+00\n-3.3069630691022094e+00\n-2.3522271011100621e+01\n-3.6225569235619024e+00\n-4.8303033747084205e+00\n-2.3996432213837622e+01\n4.8020275408077131e+00\n-8.7708736304680404e+00\n-2.0192193435499675e+01\n4.1822821574373243e+00\n-8.8892369755576013e+00\n-1.9961262592667047e+01\n7.4323584972333920e+00\n1.6795967228962727e+01\n-5.6235789100513053e+01\n-1.5137278180164252e+01\n1.3550031568907313e+01\n-3.9972300469440682e+01\n-3.4190244244066170e-01\n1.3845258583827345e+01\n-5.1036429744611880e+01\n-1.5463508106759514e+01\n1.2402217817510477e+01\n-4.1216068188209007e+01\n6.7667014534328223e+00\n1.2545147412059579e+01\n-5.0753222414941362e+01\n5.6291518115142027e+00\n1.1603313584927550e+01\n-4.9665777343047459e+01\n-4.8880777339938355e+00\n1.1170092207079970e+01\n-4.7353980882534962e+01\n-1.3910528093932276e+01\n1.0284137183186122e+01\n-4.2586623894829756e+01\n-1.5878351280228015e+01\n1.0321433709077912e+01\n-4.2877746291886488e+01\n-1.8281315032990726e+00\n9.4893469272191382e+00\n-4.5021414331712343e+01\n-6.1355612602523619e+00\n9.7537855407346861e+00\n-4.5208439347078723e+01\n2.2723698767287206e+00\n8.6194766734651278e+00\n-4.4479139016969953e+01\n-1.5948625932483592e+01\n9.4419853688381785e+00\n-4.3870742148344661e+01\n-5.4153733390923628e+00\n7.1591171589660796e+00\n-4.1812137082931521e+01\n-1.5857187113427091e+01\n7.9101073730250135e+00\n-4.3865149003805818e+01\n4.8103032302505957e+00\n1.1334024170205192e+00\n-2.3406620622763125e+01\n3.1661137007490709e+00\n9.7156809335494454e-01\n-2.0726609178183722e+01\n-1.2431941297488764e+01\n2.9091006371413441e+00\n-3.6723024950235860e+01\n3.3553514423560000e+00\n4.7026471320366753e-01\n-2.2032920749224878e+01\n-1.1926303585176179e+01\n1.9011577971874880e+00\n-3.5394912261322808e+01\n-6.2777693958395222e+00\n-1.9183974775789320e-01\n-3.1670783797950818e+01\n3.4449684107948557e+00\n-8.0160984720947004e-01\n-2.2223663395350300e+01\n-2.3380647676527071e-02\n-6.7109556919648283e-01\n-2.1449016844704747e+01\n-9.9870607540342959e-01\n-8.7478946323734930e-01\n-2.1488994372443248e+01\n1.7181818699938931e+00\n-2.9221544856818200e+00\n-2.0710492430117345e+01\n-1.1545841203609795e+01\n-3.1635529566447067e+00\n-2.8175922356737370e+01\n1.8683016959912430e-01\n-4.0565681076438311e+00\n-2.1858317982182403e+01\n-1.2899265148045785e+01\n-3.9401623280296683e+00\n-2.7147698991560318e+01\n3.8901804662718105e+00\n-8.7312660204271282e+00\n-2.0119772703687001e+01\n1.6268554736114769e+00\n1.4950235266648852e+01\n-5.2947990932920980e+01\n1.7086266559077761e+00\n1.4520487772845959e+01\n-5.2102977393664844e+01\n1.7086266559077761e+00\n1.4520487772845959e+01\n-5.2102977393664844e+01\n-1.4945595981012673e+01\n8.8486435603640494e+00\n-4.4904809725417365e+01\n-1.5011657530254842e+01\n8.2040816143621562e+00\n-4.4482868538047448e+01\n1.4962978401899786e+01\n6.9224307719610789e-01\n-2.8237428051213044e+01\n-1.2070304391625104e+01\n2.6635953926036509e+00\n-3.6227646573330318e+01\n-3.4938441372432298e+00\n1.3096243582325315e+00\n-2.5052184857998693e+01\n4.6910518989000165e+00\n-5.7238705319403094e-01\n-2.3454768231396134e+01\n-1.0656121069074809e+01\n-2.7585973540363448e-02\n-3.2432613957728670e+01\n5.0266685480206439e+00\n-1.0857730495927149e+00\n-2.3185375153278770e+01\n-1.2954341420319706e+01\n3.8958261524477455e-02\n-3.1806666447373271e+01\n1.3905793363233766e+01\n9.1791407657861122e+00\n-3.6438645378932492e+01\n-1.1882956950413428e+00\n6.8175411951859122e+00\n-4.1422307553203012e+01\n5.1569613469239215e+00\n-8.0148947892172451e-01\n-2.3616358035663122e+01\n2.0127817168338544e+00\n-7.0051402297631726e-01\n-2.0409114273774001e+01\n-2.8235911302676930e+00\n-1.2625422961586885e+00\n-2.1698517361871442e+01\n4.3769997856845606e+00\n-2.1135575726533680e+00\n-2.2622400278879759e+01\n-6.3860307202432294e+00\n-4.7509728324085776e+00\n-2.5538457299124573e+01\n-5.1426994118233562e+00\n1.1527681068093251e+01\n-4.7889424648451914e+01\n-1.9361154033802936e+01\n7.9201116135934688e+00\n-4.5013487471756605e+01\n3.6845332256778782e+00\n2.6429811528927312e+00\n-2.3049359619998469e+01\n-1.2256852458549790e+01\n5.3183167348485769e+00\n-4.0076172960687700e+01\n1.4802092391512286e+01\n1.4680397603821613e+00\n-2.7781528674410676e+01\n2.7885739739845632e+00\n9.1741230047892797e-01\n-2.0631071669035748e+01\n-1.2070992651919278e+01\n-2.4239875794188230e+00\n-2.9189171650591241e+01\n-1.9111435587127573e+01\n7.5136167406062953e+00\n-4.4346294437572780e+01\n1.5353164802717492e+01\n1.1386803951480667e-01\n-2.7579017951267190e+01\n-1.1017121998407291e+01\n2.8044482223013514e+00\n-3.6116500397213336e+01\n-1.3736808895985600e+01\n2.9609349676765034e-01\n-3.3377730889281487e+01\n3.1212220325824176e+00\n-1.4154564045578630e+00\n-2.1912056668293324e+01\n3.3151839901326969e+00\n-3.8665906727222241e+00\n-2.0600548859201322e+01\n-1.1797716479665862e+01\n6.9067384348539548e+01\n-7.0749303529937919e+01\n-1.8021526406863408e+01\n8.2181403125661589e+01\n-8.4471471892405560e+01\n-2.8120758429283757e+01\n7.1019659314840780e+01\n-7.6973879046402203e+01\n-2.9522997636553483e+00\n6.4325823458840972e+01\n-7.2609485666047078e+01\n-3.6892372944764862e+00\n6.3841630991333560e+01\n-7.2445937424330566e+01\n-5.2377071140476978e+00\n6.3496201974246169e+01\n-7.2080765677417219e+01\n-3.9321936645793945e+00\n6.3627203856405508e+01\n-7.2687634288650244e+01\n3.0822618928688783e+01\n7.3387452476099753e+01\n-9.0611639336574470e+01\n-4.0313939764817789e+01\n7.3299365470093520e+01\n-8.3216923976029591e+01\n3.0852620790557978e+01\n7.2800830702522461e+01\n-9.0604572952674076e+01\n3.0852620790557978e+01\n7.2800830702522461e+01\n-9.0604572952674076e+01\n-3.8871345691615439e+01\n6.3052235645749228e+01\n-7.3344465474786631e+01\n-1.1842665599957108e+01\n4.0533296679528064e+01\n-5.0894750574992869e+01\n-2.7559222705796888e+01\n4.1008411806382753e+01\n-4.9790106451638437e+01\n-1.2725832782134082e+01\n2.8279667896197697e+01\n-3.4783858446767525e+01\n5.3663905307414854e+00\n3.3301287592380419e+01\n-4.3613094365083768e+01\n5.5642698051066706e+00\n3.3754425629648352e+01\n-4.4761905697919921e+01\n-2.1116379112269822e+01\n3.5129504233733918e+01\n-4.4466617460695687e+01\n-2.1141952348157091e+01\n3.5221069368337098e+01\n-4.4799019117994042e+01\n-8.7445995534488108e-01\n2.9697667286658085e+01\n-3.9441208474198071e+01\n3.7415800029356774e+00\n3.1598207724223162e+01\n-4.2946716262768213e+01\n4.4238052622406236e+00\n3.1054852770265260e+01\n-4.2277879210206841e+01\n-2.2200054301093253e+01\n3.4770246023954037e+01\n-4.5252062707788070e+01\n7.0341715626057901e+00\n3.1466804529089451e+01\n-4.3536633067217458e+01\n-2.7434325638485049e+01\n3.8280864753684433e+01\n-5.0549376482894573e+01\n-2.7434325638485049e+01\n3.8280864753684433e+01\n-5.0549376482894573e+01\n-2.9539916312766014e+01\n4.0881628229300638e+01\n-5.4529909491916108e+01\n2.2550223540168015e+00\n2.8799594902327176e+01\n-4.0890699050758293e+01\n-2.7396687032963897e+01\n3.7116567713516773e+01\n-5.0099865298968844e+01\n-5.5646884999646097e+01\n6.2153265328791932e+01\n-8.4721954453311369e+01\n-3.2845695554693030e+01\n4.2045045295721309e+01\n-5.7090046578247708e+01\n-4.6549169792767600e+01\n5.5491675804822286e+01\n-7.6191530950025410e+01\n-4.7847904710541094e+01\n5.6181882508533370e+01\n-7.7668456308772775e+01\n-5.5106153438699479e+01\n6.0688017473754492e+01\n-8.3761353013994665e+01\n-4.9232838692707659e+01\n5.5898189076066764e+01\n-7.7442712242369623e+01\n-2.9826081423078620e+01\n3.7577126949136137e+01\n-5.2822498670448603e+01\n1.1541387984301588e+01\n3.0995331381542535e+01\n-4.7705965235530115e+01\n1.0440059308827900e+01\n2.9631061447253781e+01\n-4.5094888758523012e+01\n-2.0736681281095741e+00\n2.9594298363947829e+01\n-4.4320184831394066e+01\n1.1776443185728750e+01\n3.0044993077624401e+01\n-4.6722421233325342e+01\n-2.6965156730885681e+01\n3.1858072906565429e+01\n-4.6691690738051115e+01\n4.6296939181024541e+00\n2.7423020675441599e+01\n-4.3054594051674798e+01\n2.7890904058924995e+00\n2.6186396444968512e+01\n-4.0714802600976263e+01\n1.1692158735657118e+01\n2.9626123259382624e+01\n-4.7257364226251411e+01\n1.4871659944697734e+01\n3.1216766352762395e+01\n-5.0555546381298413e+01\n1.5541328555219117e+01\n3.1023980084783133e+01\n-5.0099930894239932e+01\n1.2202326325923709e+01\n3.0282418213321758e+01\n-4.9399924933207444e+01\n4.7041529673521820e+00\n2.6688362088330503e+01\n-4.2511401982888174e+01\n6.9228195893652620e+00\n2.7501379096644950e+01\n-4.4847186659766379e+01\n7.3227060833179598e+00\n2.7680736381305799e+01\n-4.5277620581532616e+01\n4.6385681890129566e+00\n2.6277969200296575e+01\n-4.2902554064578744e+01\n3.7353123263772869e+00\n2.5877360559222321e+01\n-4.2254411766751076e+01\n1.5547728842017028e+01\n3.0000966243385772e+01\n-5.1363466933145070e+01\n4.5465493253791349e+00\n2.5803291381593933e+01\n-4.3362166228903213e+01\n7.3186874110247579e+00\n2.6945162013881653e+01\n-4.5745944424384881e+01\n-4.6488713458356923e+00\n2.2195589648532980e+01\n-3.6619158602360528e+01\n1.8545904025990332e+01\n3.0800522343238914e+01\n-5.4046903466894328e+01\n-2.1142480888425251e+01\n2.3412967303707056e+01\n-3.7403234418618020e+01\n1.1780537305754654e+01\n2.8093425211002444e+01\n-4.9151334390974611e+01\n1.3436177226024171e+01\n2.8849712687843830e+01\n-5.1407521499593926e+01\n5.6941274193196776e+00\n2.5683327756840491e+01\n-4.5083013075687582e+01\n-1.0233389651426092e+01\n1.9813221134124674e+01\n-3.4248346581085428e+01\n-5.1902633226545651e+00\n6.3463450535468295e+00\n-9.1349609453574931e+00\n1.0317467333566876e+01\n2.6195535116101976e+01\n-4.9984501209525000e+01\n7.6138108568822718e+00\n2.5133060603445127e+01\n-4.8028996592863692e+01\n-1.6069370319891622e+01\n1.8237372621634680e+01\n-3.2586042972415946e+01\n1.6424271528611957e+01\n2.7988611299017848e+01\n-5.5041711084387636e+01\n9.5431799046985528e+00\n2.5626616026452524e+01\n-4.9891376553405735e+01\n-7.7019928136114357e+00\n1.9354074321553803e+01\n-3.7025494062881954e+01\n-1.4385535266279764e+01\n1.7944337281792816e+01\n-3.3573144918351360e+01\n1.7617560703404735e+01\n2.7622277533842393e+01\n-5.6744471186669401e+01\n5.7750751857809766e+00\n2.3600989096892384e+01\n-4.7890821151218297e+01\n5.7750751857809766e+00\n2.3600989096892384e+01\n-4.7890821151218297e+01\n-1.2257069576260765e+01\n1.8082928016699451e+01\n-3.5092199125540034e+01\n-7.2062043565329157e+00\n1.9223345602185621e+01\n-3.8142562234791733e+01\n2.9333353566832465e+00\n2.2267001079203943e+01\n-4.5685231422275777e+01\n-6.2377011983942561e+00\n1.9338115216236194e+01\n-3.8733522365006813e+01\n2.6895442573045236e+00\n2.2216224580967136e+01\n-4.5930484265513357e+01\n2.5041316072684427e+00\n2.2072032819933256e+01\n-4.5662353785358192e+01\n-1.6060364714179219e+01\n1.7055933431981778e+01\n-3.3223446465652025e+01\n-8.0077556656481441e+00\n1.8312140157415836e+01\n-3.7612412240130332e+01\n-1.9484504510917589e+01\n1.8884512018446262e+01\n-3.7463464407583828e+01\n-1.2963905686247827e+01\n1.7530147340455187e+01\n-3.5719885306726404e+01\n-9.6820099436428499e+00\n1.8088949014656567e+01\n-3.7235612215445038e+01\n-9.6820099436428499e+00\n1.8088949014656567e+01\n-3.7235612215445038e+01\n-6.7459666740634479e+00\n1.8660636598764636e+01\n-3.9443794159690526e+01\n1.2579249548628848e+01\n2.3971622970399071e+01\n-5.5534647339213350e+01\n-1.0446210690881404e+01\n1.7188785433019458e+01\n-3.7935622251991447e+01\n-1.4971620545367260e+01\n1.6227307715677579e+01\n-3.5816293408240426e+01\n1.4664412995974796e+00\n2.0262883275648843e+01\n-4.7331820281952311e+01\n1.5954545594568927e+00\n2.0146655832182173e+01\n-4.7423507979164313e+01\n9.2342709689886728e+00\n2.2476839963823807e+01\n-5.3492622125140258e+01\n-1.4770640540540443e+01\n1.6175318735965700e+01\n-3.6267343535463496e+01\n5.4422465071908546e+00\n2.0980241333220391e+01\n-5.0313453052682334e+01\n1.4276161326466298e+01\n2.3368030316646493e+01\n-5.8060325468374813e+01\n-6.9514801292157244e+00\n1.7075485733444676e+01\n-4.1037465782119483e+01\n2.0583999126952048e+00\n1.9313003259262334e+01\n-4.8844919710498480e+01\n-1.2496675438223562e+01\n1.4446349633201399e+01\n-3.7814203719461261e+01\n-1.6194590697375819e+01\n1.4732960394393633e+01\n-3.7659912131930980e+01\n-5.4674197282073491e+00\n1.6309752968696916e+01\n-4.3967548841695908e+01\n-5.7444271075971374e+00\n1.6332262845216452e+01\n-4.3703516626192652e+01\n-7.0496992346771989e+00\n1.5884106474402881e+01\n-4.2960020815681702e+01\n-4.8517235007989825e+01\n3.0795338696648354e+01\n-8.4710664971937192e+01\n-8.9668103127731662e+00\n1.4478671644730149e+01\n-4.2619642824244295e+01\n-1.1241744519738827e+01\n1.3639212534178055e+01\n-4.0965525778205389e+01\n-1.7148826945432930e+01\n1.2776560029072234e+01\n-3.9494177640827303e+01\n-9.9142669999447168e+00\n1.2892397706944386e+01\n-4.4835339537411748e+01\n2.1049604881225763e+00\n1.1191159112867805e+01\n-4.7494653707507268e+01\n-1.1556922583592630e+01\n1.1015749351888099e+01\n-4.6572073012671929e+01\n1.7208674359196261e+00\n8.5769158390044176e+00\n-4.3382338199292811e+01\n3.0000556915684232e+01\n7.6406630180769241e+01\n-9.2789659811190063e+01\n2.9833105515986055e+01\n7.6963247700357542e+01\n-9.4107760277096659e+01\n-6.6961525002732252e+00\n3.6342640560623231e+01\n-4.1090058280923053e+01\n-9.7309884424174911e+00\n4.8568849415598173e+01\n-5.5806739462039744e+01\n-1.2493809415363369e+01\n4.7589249424706658e+01\n-5.4707070996529836e+01\n-2.3505729958543590e+01\n4.3105376110072157e+01\n-4.9562361643649197e+01\n2.0916762339460124e+00\n3.5630825647861165e+01\n-4.3179365425272195e+01\n9.6904867263465533e-01\n3.5731814723559154e+01\n-4.3606458625017773e+01\n-3.8136186403084116e-01\n3.4529207980242788e+01\n-4.2460984449434370e+01\n-2.1129832200656836e+01\n3.5243566463986426e+01\n-4.4332317120237953e+01\n5.2672903102052455e+00\n3.2393422911317401e+01\n-4.3393700435699813e+01\n3.7157550124102641e+00\n3.1988747060055321e+01\n-4.3446893473516241e+01\n5.2859503214257249e+00\n3.2229931376127340e+01\n-4.3903657721815911e+01\n4.5463421798206678e+00\n3.1893376214125531e+01\n-4.3450397927890258e+01\n4.0081395540396016e+00\n3.1444096126526407e+01\n-4.2922055657103563e+01\n5.2506743138691512e+00\n3.1266844113998385e+01\n-4.3948687496690233e+01\n-1.1104055457230873e+01\n2.7090244876781902e+01\n-3.5891552820154288e+01\n-1.4958972729906840e+01\n2.6439182833991001e+01\n-3.4625176268547904e+01\n-2.8623024138918886e+01\n4.0412500998670161e+01\n-5.3961032607473093e+01\n-2.6694413522896919e+01\n3.7209522807431561e+01\n-5.0103869206165626e+01\n-7.7055757910879121e+00\n2.5361475759696432e+01\n-3.4947727267231947e+01\n-3.9131820454152724e+00\n1.2943628672602387e+01\n-1.6882157096003727e+01\n-2.7742444120468722e+01\n3.4427057677855977e+01\n-4.9179881170969381e+01\n1.9407816896161338e+00\n2.5743337180448567e+01\n-4.0557213967854480e+01\n1.5006166900667450e+01\n3.1491623720345888e+01\n-5.1998563429639809e+01\n7.3138359074388966e+00\n2.7650888744349615e+01\n-4.4493393784133751e+01\n7.0177167102222249e-01\n2.4743301455399582e+01\n-3.9546496138575918e+01\n9.8711414133256070e-01\n2.4926785387723552e+01\n-3.9929309498637650e+01\n8.9378635704536578e+00\n2.6470036593068027e+01\n-4.7848923442412968e+01\n-1.0424582189391005e+01\n1.9443019783609039e+01\n-3.4333555041075194e+01\n1.4425454102885459e+01\n2.8082841202207906e+01\n-5.4203972278661972e+01\n1.2738975511448773e+01\n2.7179405706728534e+01\n-5.2450914369601904e+01\n-9.4784008681189889e+00\n1.9132787070048199e+01\n-3.5699264592979659e+01\n-1.2674121930391157e+01\n1.8374599666516620e+01\n-3.3945792397564965e+01\n-9.2729844597131184e+00\n1.9177016944932753e+01\n-3.5959056191055041e+01\n-7.7653939786473538e+00\n1.9143841896515948e+01\n-3.7682976051469133e+01\n-1.5693952884851107e+01\n1.7378722641849432e+01\n-3.3429787678593534e+01\n1.4019510702770250e+00\n2.1795374256186751e+01\n-4.4550076154409254e+01\n1.3001517637491997e-01\n2.1423340378992261e+01\n-4.3920376655780466e+01\n-1.9191591168420150e+01\n1.8741856575917609e+01\n-3.6812022319709115e+01\n-4.9878315238272521e+01\n4.0097380097737911e+01\n-8.9555905189994462e+01\n-5.0089955466867856e+01\n3.9860499534190851e+01\n-9.0279957444584753e+01\n-1.1720177654663328e+01\n1.4331734801014573e+01\n-3.9114216409965529e+01\n-8.2949270481293453e+00\n1.4913469495851150e+01\n-4.3105494544123587e+01\n-3.2490145741820009e-01\n1.4246728733370130e+01\n-5.1283831349987672e+01\n-9.7036575194416432e+00\n1.2014164734220552e+01\n-4.6358095595352211e+01\n-1.3101120182251590e+01\n1.0388970713178848e+01\n-4.6134028031132814e+01\n1.1067735706571322e+00\n7.9763980585189298e+00\n-4.2347132078160712e+01\n-7.1045314420078798e+00\n7.3345791282241777e+01\n-7.7857421537518249e+01\n1.2589323257936938e+01\n7.4100183509904625e+01\n-8.3506453627359775e+01\n1.2589323257936938e+01\n7.4100183509904625e+01\n-8.3506453627359775e+01\n-5.5109274993195010e+00\n6.2812669966932326e+01\n-7.1702447221327262e+01\n-9.2384882599671396e+00\n6.1804527427235243e+01\n-7.0450900920548449e+01\n3.1930985670093133e+01\n7.4373894059731995e+01\n-9.1112223879580583e+01\n-1.6808788335558138e+01\n4.4899292671272498e+01\n-5.2116890677090566e+01\n-2.3949970193255076e+01\n4.4224529222493885e+01\n-5.0852582689947369e+01\n-1.2121288060451697e-01\n3.5302381719290473e+01\n-4.3417156822947256e+01\n-1.3584769883958985e+00\n3.4143491457887734e+01\n-4.1839674469667294e+01\n1.0792052136407839e+00\n3.5014459952207616e+01\n-4.3380744899491731e+01\n1.4824092520338017e+00\n3.4848385454819883e+01\n-4.3309474378176425e+01\n-1.8563628351108183e-01\n3.3994827029879623e+01\n-4.2251205441060613e+01\n6.4570326987844062e+00\n3.5439084067793068e+01\n-4.5851383866756713e+01\n-1.7526134401919492e+01\n3.2534872263622987e+01\n-3.9544291008848923e+01\n-1.1314453700512674e+00\n3.2168167264358068e+01\n-4.1010611783586469e+01\n5.3074924614499901e+00\n3.3822213271884927e+01\n-4.4518621530312643e+01\n5.2169118065785591e+00\n3.2871968029504771e+01\n-4.4056790829032515e+01\n-2.1812994326031006e+01\n3.7040084788455445e+01\n-4.6680326186367694e+01\n5.6922854100763169e+00\n3.2966737792201648e+01\n-4.4461047554851859e+01\n3.9341776476079202e+00\n3.1846617783618797e+01\n-4.2548139393098275e+01\n-2.2704505190631853e+01\n3.5121530842402663e+01\n-4.4481561812658192e+01\n5.4088723577088049e-01\n3.0235964489776098e+01\n-4.0808524409338133e+01\n-4.9893505150459383e-01\n2.9465886302111645e+01\n-3.9533654598631372e+01\n2.6260482982726963e+00\n2.9560580943255530e+01\n-4.1436402902326456e+01\n1.1129618686459331e+00\n2.8838983430225603e+01\n-4.0802349188832629e+01\n3.1370275575354101e+00\n2.8862007119872978e+01\n-4.0750470860740812e+01\n1.7787128625107738e+00\n2.8720746649878798e+01\n-4.1046867787859384e+01\n-2.2858151443264770e+01\n3.4006105444966174e+01\n-4.6511086982975293e+01\n3.9118880843235053e+00\n2.8293219820824888e+01\n-4.1194395615941922e+01\n8.1855549872664852e+00\n2.9358729517867349e+01\n-4.3948003319012408e+01\n-3.9841172178954565e+01\n4.6047576783156359e+01\n-6.4513873274198744e+01\n-2.6646914031829457e+01\n3.3184242237961868e+01\n-4.8429497956440485e+01\n4.8643944151357168e+00\n2.6630233943965653e+01\n-4.3617889465342316e+01\n-2.8912670859948143e+01\n3.1047676005383046e+01\n-4.8507839439544398e+01\n1.7549755029505693e+01\n3.0262599216256245e+01\n-5.3613108392102212e+01\n-5.3126316522633266e+00\n2.1894145078008389e+01\n-3.6482550274394974e+01\n-8.6743626755768890e+00\n2.0795336562039420e+01\n-3.4610773074855643e+01\n1.4884861085889195e+01\n2.8851666365723148e+01\n-5.2884928991067028e+01\n1.4184159784776817e+00\n2.3601011516250246e+01\n-4.1973869264869805e+01\n-1.0046800301716905e+01\n1.9259869438885232e+01\n-3.4973014247509099e+01\n-1.4390285588712526e+01\n1.8037919987480564e+01\n-3.3525993495823315e+01\n-8.3842862500627575e+00\n1.9072052618043354e+01\n-3.6818329052273079e+01\n-1.5586199853913214e+01\n1.7408383431827293e+01\n-3.3569108226624870e+01\n-9.1560546334628548e+00\n1.7904276419331804e+01\n-3.7834592477783140e+01\n-9.1216866472673956e+00\n1.8149175038175265e+01\n-3.8830832795467586e+01\n-7.7958556815867697e+00\n1.8330705756954579e+01\n-3.8772435897001763e+01\n1.4574488383245555e+01\n2.4661013584344062e+01\n-5.7003609887651479e+01\n-4.9581468667328636e+01\n3.1243491059940080e+01\n-8.5578717543022762e+01\n-3.2557561454818618e+01\n2.0654066859698254e+01\n-6.5347090601789901e+01\n-3.6408306069827674e+01\n2.2307272532948570e+01\n-7.1110571007090556e+01\n4.9896647713275870e+00\n1.2172170531870922e+01\n-4.8947017587163558e+01\n-1.2657240040933422e+01\n1.0155529433785560e+01\n-4.6897492724272787e+01\n-5.0188786563806742e+00\n9.7759047108236281e+00\n-4.5463245150384850e+01\n-6.2964852021480198e+00\n8.1138719677101090e+00\n-4.3832872926899576e+01\n-1.4890612173463724e+01\n6.8164381085037562e+01\n-7.5599735918980016e+01\n-2.6969058735753442e+00\n3.1104657971139979e+01\n-4.0648648164899029e+01\n2.6104177290266373e+00\n3.0030387011221453e+01\n-4.0939758780783698e+01\n-2.7944974672536902e+00\n2.6619113201728354e+01\n-3.8904562459272022e+01\n1.5340453674972858e+01\n3.1864971164262332e+01\n-4.8813573530684906e+01\n4.4692175141391095e+00\n2.7350575501796069e+01\n-4.0986603634693836e+01\n8.7573341954537280e+00\n2.9262945946021453e+01\n-4.5056242884330771e+01\n5.5529027688605401e+00\n2.6848456172884998e+01\n-4.3569502949038892e+01\n1.0237184957289756e+00\n2.4811700926607919e+01\n-4.0032641108246480e+01\n4.7092310709637353e+00\n2.5541550503635143e+01\n-4.3917916480344275e+01\n-1.6435944718378256e+01\n1.8361474868533168e+01\n-3.0888907516411894e+01\n-1.4645868317910450e+01\n1.8571164265497618e+01\n-3.1890384876305141e+01\n-2.2318936999054508e+00\n2.2080775194550792e+01\n-4.0262458695186908e+01\n-2.1917865972424252e+01\n2.2290373378866423e+01\n-3.9995897078474940e+01\n-3.8878742173447904e+01\n3.4524837755913083e+01\n-6.8884997615368164e+01\n-1.4055308319560259e+01\n1.6582652675217627e+01\n-3.5692336985228557e+01\n-1.2973493667725961e+01\n1.4254018840150547e+01\n-4.0016340792533121e+01\n-1.9445243612605037e+01\n6.5102432892453280e+01\n-7.2815927052228346e+01\n3.2552998986762738e+01\n7.3834808892641348e+01\n-9.1445666173184563e+01\n-9.7397886708465187e+00\n4.1763565841310928e+01\n-5.0917358411436581e+01\n-9.8425148418474446e+00\n4.2269226511465924e+01\n-5.1221943282693630e+01\n6.7604426084083364e+00\n3.6682460189144471e+01\n-4.6404092971200420e+01\n5.5256953694771767e+00\n3.3889775161780783e+01\n-4.4559426559833817e+01\n7.9155455928774296e+00\n3.2778037774663403e+01\n-4.5321918908097949e+01\n-7.6282657287136937e+00\n2.4047121228324944e+01\n-3.5533642567217584e+01\n4.0548768072014141e-01\n2.4575396803198974e+01\n-4.0096835196296958e+01\n6.8162826826593417e+00\n2.6586749704118596e+01\n-4.6605683928082449e+01\n-1.6685810790659190e+01\n2.0002609048928665e+01\n-3.2209501594665937e+01\n-6.3146719183388731e+00\n2.1527440289441181e+01\n-3.5918085388739911e+01\n-1.6417025907886046e+01\n1.9604261159550500e+01\n-3.1976030592203582e+01\n2.6989029664810413e+00\n2.4726225530539963e+01\n-4.3342151743193014e+01\n-1.5342310455222488e+01\n1.4011017280306996e+01\n-3.8878312400448529e+01\n-1.1632687104380572e+01\n6.3678938512595550e+01\n-7.0643866764470260e+01\n-8.9816427932374552e+00\n4.5271890984205434e+01\n-5.3662370534470718e+01\n5.1859679195743613e+00\n3.3181346913985927e+01\n-4.4224700208617733e+01\n-1.3705937994576979e+01\n9.9295142540632533e+00\n-4.6575281046187769e+01\n-4.0923784002865222e+00\n6.3161689948446451e+01\n-6.8840604387594240e+01\n-1.2555704449304979e+01\n4.6660789365708133e+01\n-5.3459804019380925e+01\n-1.8929225530016858e+01\n4.3974665648596144e+01\n-5.1357342689935216e+01\n1.6756060633402170e+00\n2.5451082168766600e+01\n-3.9804676594092982e+01\n1.8296543042338655e+01\n2.8959171119595371e+01\n-5.5946913140654011e+01\n3.3531717273723274e+01\n7.4615456167068601e+01\n-9.1474441673195855e+01\n3.3531717273723274e+01\n7.4615456167068601e+01\n-9.1474441673195855e+01\n7.1812110317457112e+00\n3.5941286277435744e+01\n-4.5539797536495101e+01\n6.5642565345853399e+00\n3.4291531261323072e+01\n-4.5744720430705300e+01\n6.6916501908239230e+00\n3.4801189874883057e+01\n-4.6689045368509419e+01\n-2.1820232227612717e+01\n3.5204618414869962e+01\n-4.3920329653290700e+01\n4.7990443547422066e+00\n3.1578771866170452e+01\n-4.3545814201672748e+01\n-2.6208121831164091e+00\n1.4803704635233423e+01\n-4.7462382535300648e+01\n2.9778787738547288e+00\n2.9328708106696784e+01\n-4.1600445246117395e+01\n8.5914881713293045e+00\n2.8287027592171736e+01\n-4.5701311316405231e+01\n-1.2876485552830367e+01\n2.8269074022657094e+01\n-3.5549729744007756e+01\n1.2434165699169060e+00\n2.5333967960100598e+01\n-3.9796894342155547e+01\n1.6969984878942590e+00\n1.4699414216489890e+01\n-2.7642093775522905e+01\n6.4730357480222933e+00\n2.2080618503456691e+01\n-5.0628587727637886e+01\n3.6626449461647481e-01\n2.1418953936637017e+01\n-5.3024633213419243e+01\n-1.5788372020887310e+01\n1.6568720104524502e+01\n-4.9293686360801537e+01\n-1.0841357887228055e+01\n1.1815035525100711e+01\n-4.1924662013568415e+01\n-1.0841357887228055e+01\n1.1815035525100711e+01\n-4.1924662013568415e+01\n-1.0417372148300338e+01\n1.1927730075811226e+01\n-4.2599208398176479e+01\n-9.6574331034546699e+00\n1.2050845170146575e+01\n-4.3598509517876408e+01\n-9.6895832102283901e+00\n1.1981062540084375e+01\n-4.3610069777969535e+01\n-9.6895832102283901e+00\n1.1981062540084375e+01\n-4.3610069777969535e+01\n-1.1504293994944650e+01\n1.1694018325177982e+01\n-4.1455366820655264e+01\n1.2269599940944840e+01\n4.2424596619996455e+00\n-3.2461241957222640e+01\n-1.3149759409354617e+01\n1.1012269822975894e+01\n-4.0351056194977488e+01\n-1.2106492958075165e+01\n1.1084932390509634e+01\n-4.1393606530675932e+01\n-1.2106492958075165e+01\n1.1084932390509634e+01\n-4.1393606530675932e+01\n8.2120492732594319e-01\n4.3504703623129588e+00\n-2.7150517135782948e+01\n-1.2466947799228363e+01\n1.0575368034165020e+01\n-4.1663138952184426e+01\n-1.2645876975963285e+01\n1.1045689628322814e+01\n-4.3381279434046597e+01\n-1.2541660128946704e+01\n1.0472267359121997e+01\n-4.1758214942489026e+01\n-1.3292963745654220e+01\n1.0217577713971306e+01\n-4.1371630493907844e+01\n-1.3309110980402442e+01\n1.0190313139995006e+01\n-4.1516622801052961e+01\n-1.3956589667403223e+01\n1.0316472709788767e+01\n-4.1884206013003372e+01\n2.5307705016461708e+00\n1.5564789111471187e+00\n-2.0692434519135432e+01\n-1.6110903757379862e+00\n7.2630020387830561e+00\n-4.2233149314627880e+01\n1.4039970936008844e+01\n5.7609413034803347e-01\n-2.9994397820203417e+01\n1.1091019893222780e+00\n1.0367512973908415e+00\n-2.0453374346879034e+01\n1.3568378698963077e+01\n1.4443187111103709e-01\n-3.2024264581913144e+01\n1.3086622219058837e+00\n5.5422049593119938e-01\n-2.0335832911839439e+01\n2.2155714471306962e+00\n3.1125402062236301e-01\n-2.0300919371787217e+01\n-5.7182352468302433e+00\n5.4106621080442299e+00\n-4.0291782444593480e+01\n5.7279523179679144e+00\n-2.3770447850715690e-01\n-2.3057066403481656e+01\n1.4189924095756446e+01\n-8.2719064786234975e-01\n-3.0868231229679509e+01\n1.4242846664213493e+01\n-1.0439795883834666e+00\n-3.0877353021366641e+01\n2.1142452301192334e+00\n-7.5524155361281631e-01\n-2.0417665148838093e+01\n2.8650311193963462e+00\n-1.1537906742498738e+00\n-2.0708737745821246e+01\n3.4924471994497615e+00\n-1.4162513735929567e+00\n-2.0592265958308090e+01\n1.3284424320581936e+01\n-2.8528298145201418e+00\n-2.8722401180065773e+01\n1.0142033178442444e+00\n-1.1795337000521364e+00\n-2.0589827395041862e+01\n3.9181365400828216e-01\n-1.8427098137502995e+00\n-2.0375548962340215e+01\n-2.7497993016378626e+00\n-1.0399726558249449e+00\n-2.2003677503238542e+01\n-2.8000427677316684e+00\n-1.3488424650793480e+00\n-2.1535898018371363e+01\n1.1510558382794696e+00\n-2.8043020031452155e+00\n-1.9763788749805830e+01\n1.5564749829575999e+00\n-3.3750366799157416e+00\n-2.0118936076912131e+01\n2.5791915107937124e+00\n-4.1924344902744739e+00\n-2.0987751996890960e+01\n-1.4811167174473916e-01\n-3.5792073543062228e+00\n-2.0901005099740956e+01\n-7.2054710196904868e+00\n-1.9521019437923706e+00\n-2.9552097456793046e+01\n-9.2067431107598150e+00\n-1.4820228690376009e+00\n-3.0073686987820658e+01\n-9.2828064898378653e+00\n-1.5029058190289504e+00\n-2.9993499140882857e+01\n-7.1928145320392227e+00\n-2.0402733286152381e+00\n-2.9450299131989802e+01\n-9.7676234060886920e+00\n-1.4054756611859325e+00\n-3.0064013195877955e+01\n1.0156435968885313e+01\n-6.7050605085299164e+00\n-2.3508341892248708e+01\n-1.1570823465196174e+01\n-1.2259575000388256e+00\n-2.9976251427944252e+01\n1.6234727806289200e+01\n2.2603138037516267e+01\n-5.6263708590419931e+01\n7.9417906808121028e+00\n2.2119681240716226e+01\n-5.3090177742243647e+01\n5.0212275236859227e+00\n2.1112269503873634e+01\n-5.1516165751805879e+01\n-1.0526309289766976e+01\n2.1400157801361800e+01\n-4.8990502477455941e+01\n-1.0644946831182605e+01\n1.6068371519799115e+01\n-4.8968366012386014e+01\n-1.5783365933521557e+01\n1.6369967890501844e+01\n-4.9214858737449561e+01\n-1.5471977363622235e+01\n1.5497893173235934e+01\n-4.9204230874374055e+01\n2.4939709900150078e+00\n9.0951197828113060e+00\n-4.4978284391814654e+01\n-1.3893303981830888e+01\n1.0078057782914934e+01\n-4.2612278013436303e+01\n2.7360310189947574e+00\n9.1135658938021857e-01\n-2.0555854443321479e+01\n-2.2016971062924720e+00\n3.5746059610946470e+00\n-2.8593859433633195e+01\n-1.5718771424219926e+00\n1.0625665468904140e+00\n-2.2379952587103244e+01\n-4.7930128617875027e+00\n2.0545828603583973e+00\n-3.5928073581971347e+01\n6.9396728390607798e-01\n4.5010540309798008e+00\n-2.6344190352191465e+01\n3.8518970392756513e+00\n2.5186608943402149e+00\n-2.2397226050484790e+01\n-1.1800433719813105e+01\n1.1131556192596078e+01\n-4.8016880288904872e+01\n-3.1483335114141791e+00\n-1.4404033334623639e-01\n-2.4883573723877589e+01\n-1.7773455066388397e+00\n-9.9912336980794314e-01\n-2.1842928104306292e+01\n-2.0313967026664566e+00\n-2.9322347335346559e+00\n-2.2119598437134723e+01\n-7.2029394532641415e+00\n-2.0732193672035995e+00\n-3.1554250857185959e+01\n-6.8637120697194591e+00\n-2.6770281043481372e+00\n-2.8538177895990799e+01\n5.2983273885889108e+00\n1.0705503485662108e+01\n-4.6605042410255628e+01\n-3.7336910041955158e+00\n-3.1349483038543715e+00\n-3.0722225173082041e+01\n1.6807324782172794e+00\n1.6789021559779037e+01\n-5.4256626826579939e+01\n-9.6057588838057626e+00\n1.4651901407585330e+01\n-4.8587135008024632e+01\n1.3574276562677117e+01\n2.2433304965773213e-01\n-3.1786740708230990e+01\n-7.0170053508199421e+00\n-2.8537123743328765e+00\n-2.8382353292255829e+01\n4.2993286735985849e+00\n1.0522008392721398e+00\n-2.2083278101526680e+01\n-1.4136066809451435e+00\n4.2451080838650873e-01\n-2.4687052055117885e+01\n2.3523626046086463e+01\n2.7505658523672917e+01\n-6.6924068639456138e+01\n1.2164662003854614e+00\n1.1601823373955874e+01\n-4.8327829619618178e+01\n-4.9302004422946011e+00\n1.0146322676190147e+01\n-4.5877428134257897e+01\n1.6127023291788209e+01\n7.9519998642869956e+00\n-4.7974543275400123e+01\n-1.7308842884700226e+01\n9.4506702760960657e+00\n-4.2399748281806183e+01\n-1.2028355713086775e+01\n8.1045616883984160e+00\n-4.3398482312761260e+01\n-8.3456973697429082e-01\n2.0439080110357604e+00\n-2.2356146123567900e+01\n-1.2811579233533800e+01\n2.5607811309056068e+00\n-3.6144359979515407e+01\n-1.4509027035540386e+01\n2.3122261689007937e+00\n-3.6147427581670065e+01\n-1.4534809958396254e+01\n2.2265570324105743e+00\n-3.6012141451094429e+01\n-1.1807014364063253e+00\n-2.2408150341356359e-01\n-2.2114659986178751e+01\n-6.5618453027753256e+00\n5.4609049687959776e-01\n-3.2907081241194227e+01\n-1.0951810421980541e+00\n-2.9678090741691082e-01\n-2.2043229245876269e+01\n-1.0390161284774097e+01\n7.2749709705900512e-01\n-3.3309461988597000e+01\n-6.8031592640029190e+00\n3.8896989924130521e-01\n-3.2684748440669793e+01\n-6.8851543277523275e-01\n-5.2093069306376860e-01\n-2.1802353220944880e+01\n-1.3132257998570669e+01\n6.6444742205992402e-01\n-3.3662573485934516e+01\n1.9064130111164024e+00\n-1.2829074563532774e+00\n-2.1579505810426287e+01\n-1.1031959547141333e-01\n-1.1933000585630773e+00\n-2.1212145159197128e+01\n-5.6438864704259339e+00\n-4.0851500419171174e+00\n-2.5992584564156957e+01\n1.5229744024977744e+01\n9.2043433065780658e+00\n-4.8488026380980727e+01\n-6.6501689231810586e+00\n8.1982596832350274e-01\n-3.3306631567991971e+01\n-8.7836330447702267e+00\n-1.2085803872807752e+00\n-3.0503756235111293e+01\n-1.3108115891677123e+01\n-1.5172812002955227e+00\n-3.0567982830551806e+01\n-6.6618727408066842e+00\n2.6961946187778332e+00\n-3.5808518937748651e+01\n-1.3008262829375791e+01\n5.6629347184104661e-01\n-3.3470149528663271e+01\n-9.2860689666160763e+00\n-1.7218500957221128e+00\n-2.9909626948891027e+01\n1.6040261369822417e+01\n8.2414526861626882e+00\n-4.7773881095770804e+01\n-1.1059584943217088e+01\n2.8979995607281932e+00\n-3.6438826430512037e+01\n-1.2213804131153926e+01\n1.9718006658458389e+00\n-3.5380268538162255e+01\n-6.2598084800410119e+00\n1.1392384427726711e-01\n-3.2206198950967291e+01\n8.7187661291294738e-02\n4.9153104750992266e-01\n-2.1328035006599070e+01\n-6.3887492046338297e+00\n-4.7332360001523517e+00\n-2.5438856930587917e+01\n-5.8958831441550847e+00\n-5.3940883771420340e+00\n-2.4565534365976252e+01\n-6.0586488955679432e+00\n-5.6140364629926722e+00\n-2.4187419398866680e+01\n5.0778083202364392e+00\n1.1271541509721448e+01\n-4.8092601879633222e+01\n-1.7115690838471973e+01\n1.2065579242779451e+01\n-4.0029391069533204e+01\n-8.7848335791500531e+00\n1.1652577405755647e+01\n-4.7192424437999875e+01\n-8.0867212049118109e+00\n1.1563968038805301e+01\n-4.7831875793951703e+01\n-8.6270704170090706e+00\n1.0684589720037730e+01\n-4.6810959170777309e+01\n-5.1658843840370494e+00\n8.7190890000602259e+00\n-4.3856247105773697e+01\n-7.9343522447974468e+00\n7.3540260405955173e+00\n-4.2005555023142122e+01\n-3.7719680164031812e+00\n1.1022501903417394e+01\n-4.7349911639646528e+01\n"
  },
  {
    "path": "3rdparty/ceres/docs/CMakeLists.txt",
    "content": "# Ceres Solver - A fast non-linear least squares minimizer\n# Copyright 2015 Google Inc. All rights reserved.\n# http://ceres-solver.org/\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice,\n#   this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright notice,\n#   this list of conditions and the following disclaimer in the documentation\n#   and/or other materials provided with the distribution.\n# * Neither the name of Google Inc. nor the names of its contributors may be\n#   used to endorse or promote products derived from this software without\n#   specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n\nadd_subdirectory(source)\n"
  },
  {
    "path": "3rdparty/ceres/docs/source/CMakeLists.txt",
    "content": "find_package(Sphinx REQUIRED)\n\n# HTML output directory\nset(SPHINX_HTML_DIR \"${Ceres_BINARY_DIR}/docs/html\")\n\n# Install documentation\n# install(DIRECTORY ${SPHINX_HTML_DIR}\n#         DESTINATION \"${CERES_DOCS_INSTALL_DIR}\"\n#         COMPONENT Doc\n#         PATTERN \"${SPHINX_HTML_DIR}/*\")\n\n# Building using 'make_docs.py' python script\nadd_custom_target(ceres_docs ALL\n                  python\n                  \"${Ceres_SOURCE_DIR}/scripts/make_docs.py\"\n                  \"${Ceres_SOURCE_DIR}\"\n                  \"${Ceres_BINARY_DIR}/docs\"\n                  \"${SPHINX_EXECUTABLE}\"\n                  COMMENT \"Building HTML documentation with Sphinx\")\n"
  },
  {
    "path": "3rdparty/ceres/docs/source/_templates/layout.html",
    "content": "{% extends \"!layout.html\" %}\n\n{% block footer %}\n{{ super() }}\n<script>\n  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n  ga('create', 'UA-49769510-1', 'ceres-solver.org');\n  ga('send', 'pageview');\n</script>\n{% endblock %}\n"
  },
  {
    "path": "3rdparty/ceres/docs/source/analytical_derivatives.rst",
    "content": ".. default-domain:: cpp\n\n.. cpp:namespace:: ceres\n\n.. _chapter-analytical_derivatives:\n\n====================\nAnalytic Derivatives\n====================\n\nConsider the problem of fitting the following curve (`Rat43\n<http://www.itl.nist.gov/div898/strd/nls/data/ratkowsky3.shtml>`_) to\ndata:\n\n.. math::\n  y = \\frac{b_1}{(1+e^{b_2-b_3x})^{1/b_4}}\n\nThat is, given some data :math:`\\{x_i, y_i\\},\\ \\forall i=1,... ,n`,\ndetermine parameters :math:`b_1, b_2, b_3` and :math:`b_4` that best\nfit this data.\n\nWhich can be stated as the problem of finding the\nvalues of :math:`b_1, b_2, b_3` and :math:`b_4` are the ones that\nminimize the following objective function [#f1]_:\n\n.. math::\n   \\begin{align}\n   E(b_1, b_2, b_3, b_4)\n   &= \\sum_i f^2(b_1, b_2, b_3, b_4 ; x_i, y_i)\\\\\n   &= \\sum_i \\left(\\frac{b_1}{(1+e^{b_2-b_3x_i})^{1/b_4}} - y_i\\right)^2\\\\\n   \\end{align}\n\nTo solve this problem using Ceres Solver, we need to define a\n:class:`CostFunction` that computes the residual :math:`f` for a given\n:math:`x` and :math:`y` and its derivatives with respect to\n:math:`b_1, b_2, b_3` and :math:`b_4`.\n\nUsing elementary differential calculus, we can see that:\n\n.. math::\n  \\begin{align}\n  D_1 f(b_1, b_2, b_3, b_4; x,y) &= \\frac{1}{(1+e^{b_2-b_3x})^{1/b_4}}\\\\\n  D_2 f(b_1, b_2, b_3, b_4; x,y) &=\n  \\frac{-b_1e^{b_2-b_3x}}{b_4(1+e^{b_2-b_3x})^{1/b_4 + 1}} \\\\\n  D_3 f(b_1, b_2, b_3, b_4; x,y) &=\n  \\frac{b_1xe^{b_2-b_3x}}{b_4(1+e^{b_2-b_3x})^{1/b_4 + 1}} \\\\\n  D_4 f(b_1, b_2, b_3, b_4; x,y) & = \\frac{b_1  \\log\\left(1+e^{b_2-b_3x}\\right) }{b_4^2(1+e^{b_2-b_3x})^{1/b_4}}\n  \\end{align}\n\nWith these derivatives in hand, we can now implement the\n:class:`CostFunction` as:\n\n.. code-block:: c++\n\n  class Rat43Analytic : public SizedCostFunction<1,4> {\n     public:\n       Rat43Analytic(const double x, const double y) : x_(x), y_(y) {}\n       virtual ~Rat43Analytic() {}\n       virtual bool Evaluate(double const* const* parameters,\n                             double* residuals,\n                             double** jacobians) const {\n         const double b1 = parameters[0][0];\n         const double b2 = parameters[0][1];\n         const double b3 = parameters[0][2];\n         const double b4 = parameters[0][3];\n\n         residuals[0] = b1 *  pow(1 + exp(b2 -  b3 * x_), -1.0 / b4) - y_;\n\n         if (!jacobians) return true;\n         double* jacobian = jacobians[0];\n         if (!jacobian) return true;\n\n         jacobian[0] = pow(1 + exp(b2 - b3 * x_), -1.0 / b4);\n         jacobian[1] = -b1 * exp(b2 - b3 * x_) *\n                       pow(1 + exp(b2 - b3 * x_), -1.0 / b4 - 1) / b4;\n         jacobian[2] = x_ * b1 * exp(b2 - b3 * x_) *\n                       pow(1 + exp(b2 - b3 * x_), -1.0 / b4 - 1) / b4;\n         jacobian[3] = b1 * log(1 + exp(b2 - b3 * x_)) *\n                       pow(1 + exp(b2 - b3 * x_), -1.0 / b4) / (b4 * b4);\n         return true;\n       }\n\n      private:\n       const double x_;\n       const double y_;\n   };\n\nThis is tedious code, hard to read and with a lot of\nredundancy. So in practice we will cache some sub-expressions to\nimprove its efficiency, which would give us something like:\n\n.. code-block:: c++\n\n  class Rat43AnalyticOptimized : public SizedCostFunction<1,4> {\n     public:\n       Rat43AnalyticOptimized(const double x, const double y) : x_(x), y_(y) {}\n       virtual ~Rat43AnalyticOptimized() {}\n       virtual bool Evaluate(double const* const* parameters,\n                             double* residuals,\n                             double** jacobians) const {\n         const double b1 = parameters[0][0];\n         const double b2 = parameters[0][1];\n         const double b3 = parameters[0][2];\n         const double b4 = parameters[0][3];\n\n         const double t1 = exp(b2 -  b3 * x_);\n         const double t2 = 1 + t1;\n         const double t3 = pow(t2, -1.0 / b4);\n         residuals[0] = b1 * t3 - y_;\n\n         if (!jacobians) return true;\n         double* jacobian = jacobians[0];\n         if (!jacobian) return true;\n\n         const double t4 = pow(t2, -1.0 / b4 - 1);\n         jacobian[0] = t3;\n         jacobian[1] = -b1 * t1 * t4 / b4;\n         jacobian[2] = -x_ * jacobian[1];\n         jacobian[3] = b1 * log(t2) * t3 / (b4 * b4);\n         return true;\n       }\n\n     private:\n       const double x_;\n       const double y_;\n   };\n\nWhat is the difference in performance of these two implementations?\n\n==========================   =========\nCostFunction                 Time (ns)\n==========================   =========\nRat43Analytic                      255\nRat43AnalyticOptimized              92\n==========================   =========\n\n``Rat43AnalyticOptimized`` is :math:`2.8` times faster than\n``Rat43Analytic``.  This difference in run-time is not uncommon. To\nget the best performance out of analytically computed derivatives, one\nusually needs to optimize the code to account for common\nsub-expressions.\n\n\nWhen should you use analytical derivatives?\n===========================================\n\n#. The expressions are simple, e.g. mostly linear.\n\n#. A computer algebra system like `Maple\n   <https://www.maplesoft.com/products/maple/>`_ , `Mathematica\n   <https://www.wolfram.com/mathematica/>`_, or `SymPy\n   <http://www.sympy.org/en/index.html>`_ can be used to symbolically\n   differentiate the objective function and generate the C++ to\n   evaluate them.\n\n#. Performance is of utmost concern and there is algebraic structure\n   in the terms that you can exploit to get better performance than\n   automatic differentiation.\n\n   That said, getting the best performance out of analytical\n   derivatives requires a non-trivial amount of work.  Before going\n   down this path, it is useful to measure the amount of time being\n   spent evaluating the Jacobian as a fraction of the total solve time\n   and remember `Amdahl's Law\n   <https://en.wikipedia.org/wiki/Amdahl's_law>`_ is your friend.\n\n#. There is no other way to compute the derivatives, e.g. you\n   wish to compute the derivative of the root of a polynomial:\n\n   .. math::\n     a_3(x,y)z^3 + a_2(x,y)z^2 + a_1(x,y)z + a_0(x,y) = 0\n\n\n   with respect to :math:`x` and :math:`y`. This requires the use of\n   the `Inverse Function Theorem\n   <https://en.wikipedia.org/wiki/Inverse_function_theorem>`_\n\n#. You love the chain rule and actually enjoy doing all the algebra by\n   hand.\n\n\n.. rubric:: Footnotes\n\n.. [#f1] The notion of best fit depends on the choice of the objective\n         function used to measure the quality of fit, which in turn\n         depends on the underlying noise process which generated the\n         observations. Minimizing the sum of squared differences is\n         the right thing to do when the noise is `Gaussian\n         <https://en.wikipedia.org/wiki/Normal_distribution>`_. In\n         that case the optimal value of the parameters is the `Maximum\n         Likelihood Estimate\n         <https://en.wikipedia.org/wiki/Maximum_likelihood_estimation>`_.\n"
  },
  {
    "path": "3rdparty/ceres/docs/source/automatic_derivatives.rst",
    "content": ".. default-domain:: cpp\n\n.. cpp:namespace:: ceres\n\n.. _chapter-automatic_derivatives:\n\n=====================\nAutomatic Derivatives\n=====================\n\nWe will now consider automatic differentiation. It is a technique that\ncan compute exact derivatives, fast, while requiring about the same\neffort from the user as is needed to use numerical differentiation.\n\nDon't believe me? Well here goes. The following code fragment\nimplements an automatically differentiated ``CostFunction`` for `Rat43\n<http://www.itl.nist.gov/div898/strd/nls/data/ratkowsky3.shtml>`_.\n\n.. code-block:: c++\n\n  struct Rat43CostFunctor {\n    Rat43CostFunctor(const double x, const double y) : x_(x), y_(y) {}\n\n    template <typename T>\n    bool operator()(const T* parameters, T* residuals) const {\n      const T b1 = parameters[0];\n      const T b2 = parameters[1];\n      const T b3 = parameters[2];\n      const T b4 = parameters[3];\n      residuals[0] = b1 * pow(1.0 + exp(b2 -  b3 * x_), -1.0 / b4) - y_;\n      return true;\n    }\n\n    private:\n      const double x_;\n      const double y_;\n  };\n\n\n  CostFunction* cost_function =\n        new AutoDiffCostFunction<Rat43CostFunctor, 1, 4>(\n          new Rat43CostFunctor(x, y));\n\nNotice that compared to numeric differentiation, the only difference\nwhen defining the functor for use with automatic differentiation is\nthe signature of the ``operator()``.\n\nIn the case of numeric differentiation it was\n\n.. code-block:: c++\n\n   bool operator()(const double* parameters, double* residuals) const;\n\nand for automatic differentiation it is a templated function of the\nform\n\n.. code-block:: c++\n\n   template <typename T> bool operator()(const T* parameters, T* residuals) const;\n\n\nSo what does this small change buy us? The following table compares\nthe time it takes to evaluate the residual and the Jacobian for\n`Rat43` using various methods.\n\n==========================   =========\nCostFunction                 Time (ns)\n==========================   =========\nRat43Analytic                      255\nRat43AnalyticOptimized              92\nRat43NumericDiffForward            262\nRat43NumericDiffCentral            517\nRat43NumericDiffRidders           3760\nRat43AutomaticDiff                 129\n==========================   =========\n\nWe can get exact derivatives using automatic differentiation\n(``Rat43AutomaticDiff``) with about the same effort that is required\nto write the code for numeric differentiation but only :math:`40\\%`\nslower than hand optimized analytical derivatives.\n\nSo how does it work? For this we will have to learn about **Dual\nNumbers** and **Jets** .\n\n\nDual Numbers & Jets\n===================\n\n.. NOTE::\n\n   Reading this and the next section on implementing Jets is not\n   necessary to use automatic differentiation in Ceres Solver. But\n   knowing the basics of how Jets work is useful when debugging and\n   reasoning about the performance of automatic differentiation.\n\nDual numbers are an extension of the real numbers analogous to complex\nnumbers: whereas complex numbers augment the reals by introducing an\nimaginary unit :math:`\\iota` such that :math:`\\iota^2 = -1`, dual\nnumbers introduce an *infinitesimal* unit :math:`\\epsilon` such that\n:math:`\\epsilon^2 = 0` . A dual number :math:`a + v\\epsilon` has two\ncomponents, the *real* component :math:`a` and the *infinitesimal*\ncomponent :math:`v`.\n\nSurprisingly, this simple change leads to a convenient method for\ncomputing exact derivatives without needing to manipulate complicated\nsymbolic expressions.\n\nFor example, consider the function\n\n.. math::\n\n   f(x) = x^2 ,\n\nThen,\n\n.. math::\n\n   \\begin{align}\n   f(10 + \\epsilon) &= (10 + \\epsilon)^2\\\\\n            &= 100 + 20 \\epsilon + \\epsilon^2\\\\\n            &= 100 + 20 \\epsilon\n   \\end{align}\n\nObserve that the coefficient of :math:`\\epsilon` is :math:`Df(10) =\n20`. Indeed this generalizes to functions which are not\npolynomial. Consider an arbitrary differentiable function\n:math:`f(x)`. Then we can evaluate :math:`f(x + \\epsilon)` by\nconsidering the Taylor expansion of :math:`f` near :math:`x`, which\ngives us the infinite series\n\n.. math::\n   \\begin{align}\n   f(x + \\epsilon) &= f(x) + Df(x) \\epsilon + D^2f(x)\n   \\frac{\\epsilon^2}{2} + D^3f(x) \\frac{\\epsilon^3}{6} + \\cdots\\\\\n   f(x + \\epsilon) &= f(x) + Df(x) \\epsilon\n   \\end{align}\n\nHere we are using the fact that :math:`\\epsilon^2 = 0`.\n\nA `Jet <https://en.wikipedia.org/wiki/Jet_(mathematics)>`_ is a\n:math:`n`-dimensional dual number, where we augment the real numbers\nwith :math:`n` infinitesimal units :math:`\\epsilon_i,\\ i=1,...,n` with\nthe property that :math:`\\forall i, j\\ :\\epsilon_i\\epsilon_j = 0`. Then\na Jet consists of a *real* part :math:`a` and a :math:`n`-dimensional\n*infinitesimal* part :math:`\\mathbf{v}`, i.e.,\n\n.. math::\n   x = a + \\sum_j v_{j} \\epsilon_j\n\nThe summation notation gets tedious, so we will also just write\n\n.. math::\n   x = a + \\mathbf{v}.\n\nwhere the :math:`\\epsilon_i`'s are implicit. Then, using the same\nTaylor series expansion used above, we can see that:\n\n.. math::\n\n  f(a + \\mathbf{v}) = f(a) + Df(a) \\mathbf{v}.\n\nSimilarly for a multivariate function\n:math:`f:\\mathbb{R}^{n}\\rightarrow \\mathbb{R}^m`, evaluated on\n:math:`x_i = a_i + \\mathbf{v}_i,\\ \\forall i = 1,...,n`:\n\n.. math::\n   f(x_1,..., x_n) = f(a_1, ..., a_n) + \\sum_i D_i f(a_1, ..., a_n) \\mathbf{v}_i\n\nSo if each :math:`\\mathbf{v}_i = e_i` were the :math:`i^{\\text{th}}`\nstandard basis vector, then, the above expression would simplify to\n\n.. math::\n   f(x_1,..., x_n) = f(a_1, ..., a_n) + \\sum_i D_i f(a_1, ..., a_n) \\epsilon_i\n\nand we can extract the coordinates of the Jacobian by inspecting the\ncoefficients of :math:`\\epsilon_i`.\n\nImplementing Jets\n-----------------\n\nIn order for the above to work in practice, we will need the ability\nto evaluate an arbitrary function :math:`f` not just on real numbers\nbut also on dual numbers, but one does not usually evaluate functions\nby evaluating their Taylor expansions,\n\nThis is where C++ templates and operator overloading comes into\nplay. The following code fragment has a simple implementation of a\n``Jet`` and some operators/functions that operate on them.\n\n.. code-block:: c++\n\n   template<int N> struct Jet {\n     double a;\n     Eigen::Matrix<double, 1, N> v;\n   };\n\n   template<int N> Jet<N> operator+(const Jet<N>& f, const Jet<N>& g) {\n     return Jet<N>(f.a + g.a, f.v + g.v);\n   }\n\n   template<int N> Jet<N> operator-(const Jet<N>& f, const Jet<N>& g) {\n     return Jet<N>(f.a - g.a, f.v - g.v);\n   }\n\n   template<int N> Jet<N> operator*(const Jet<N>& f, const Jet<N>& g) {\n     return Jet<N>(f.a * g.a, f.a * g.v + f.v * g.a);\n   }\n\n   template<int N> Jet<N> operator/(const Jet<N>& f, const Jet<N>& g) {\n     return Jet<N>(f.a / g.a, f.v / g.a - f.a * g.v / (g.a * g.a));\n   }\n\n   template <int N> Jet<N> exp(const Jet<N>& f) {\n     return Jet<T, N>(exp(f.a), exp(f.a) * f.v);\n   }\n\n   // This is a simple implementation for illustration purposes, the\n   // actual implementation of pow requires careful handling of a number\n   // of corner cases.\n   template <int N>  Jet<N> pow(const Jet<N>& f, const Jet<N>& g) {\n     return Jet<N>(pow(f.a, g.a),\n                   g.a * pow(f.a, g.a - 1.0) * f.v +\n                   pow(f.a, g.a) * log(f.a); * g.v);\n   }\n\n\nWith these overloaded functions in hand, we can now call\n``Rat43CostFunctor`` with an array of Jets instead of doubles. Putting\nthat together with appropriately initialized Jets allows us to compute\nthe Jacobian as follows:\n\n.. code-block:: c++\n\n  class Rat43Automatic : public ceres::SizedCostFunction<1,4> {\n   public:\n    Rat43Automatic(const Rat43CostFunctor* functor) : functor_(functor) {}\n    virtual ~Rat43Automatic() {}\n    virtual bool Evaluate(double const* const* parameters,\n                          double* residuals,\n                          double** jacobians) const {\n      // Just evaluate the residuals if Jacobians are not required.\n      if (!jacobians) return (*functor_)(parameters[0], residuals);\n\n      // Initialize the Jets\n      ceres::Jet<4> jets[4];\n      for (int i = 0; i < 4; ++i) {\n        jets[i].a = parameters[0][i];\n        jets[i].v.setZero();\n        jets[i].v[i] = 1.0;\n      }\n\n      ceres::Jet<4> result;\n      (*functor_)(jets, &result);\n\n      // Copy the values out of the Jet.\n      residuals[0] = result.a;\n      for (int i = 0; i < 4; ++i) {\n        jacobians[0][i] = result.v[i];\n      }\n      return true;\n    }\n\n   private:\n    std::unique_ptr<const Rat43CostFunctor> functor_;\n  };\n\nIndeed, this is essentially how :class:`AutoDiffCostFunction` works.\n\n\nPitfalls\n========\n\nAutomatic differentiation frees the user from the burden of computing\nand reasoning about the symbolic expressions for the Jacobians, but\nthis freedom comes at a cost. For example consider the following\nsimple functor:\n\n.. code-block:: c++\n\n   struct Functor {\n     template <typename T> bool operator()(const T* x, T* residual) const {\n       residual[0] = 1.0 - sqrt(x[0] * x[0] + x[1] * x[1]);\n       return true;\n     }\n   };\n\nLooking at the code for the residual computation, one does not foresee\nany problems. However, if we look at the analytical expressions for\nthe Jacobian:\n\n.. math::\n\n      y &= 1 - \\sqrt{x_0^2 + x_1^2}\\\\\n   D_1y &= -\\frac{x_0}{\\sqrt{x_0^2 + x_1^2}},\\\n   D_2y = -\\frac{x_1}{\\sqrt{x_0^2 + x_1^2}}\n\nwe find that it is an indeterminate form at :math:`x_0 = 0, x_1 =\n0`.\n\nThere is no single solution to this problem. In some cases one needs\nto reason explicitly about the points where indeterminacy may occur\nand use alternate expressions using `L'Hopital's rule\n<https://en.wikipedia.org/wiki/L'H%C3%B4pital's_rule>`_ (see for\nexample some of the conversion routines in `rotation.h\n<https://github.com/ceres-solver/ceres-solver/blob/master/include/ceres/rotation.h>`_. In\nother cases, one may need to regularize the expressions to eliminate\nthese points.\n"
  },
  {
    "path": "3rdparty/ceres/docs/source/bibliography.rst",
    "content": ".. _sec-bibliography:\n\n============\nBibliography\n============\n\n.. [Agarwal] S. Agarwal, N. Snavely, S. M. Seitz and R. Szeliski,\n   **Bundle Adjustment in the Large**, *Proceedings of the European\n   Conference on Computer Vision*, pp. 29--42, 2010.\n\n.. [Bjorck] A. Bjorck, **Numerical Methods for Least Squares\n   Problems**, SIAM, 1996\n\n.. [Brown] D. C. Brown, **A solution to the general problem of\n   multiple station analytical stereo triangulation**,  Technical\n   Report 43, Patrick Airforce Base, Florida, 1958.\n\n.. [ByrdNocedal] R. H. Byrd, J. Nocedal, R. B. Schanbel,\n   **Representations of Quasi-Newton Matrices and their use in Limited\n   Memory Methods**, *Mathematical Programming* 63(4):129-156, 1994.\n\n.. [ByrdSchnabel] R.H. Byrd, R.B. Schnabel, and G.A. Shultz, **Approximate\n   solution of the trust region problem by minimization over\n   two dimensional subspaces**, *Mathematical programming*,\n   40(1):247-263, 1988.\n\n.. [Chen] Y. Chen, T. A. Davis, W. W. Hager, and\n   S. Rajamanickam, **Algorithm 887: CHOLMOD, Supernodal Sparse\n   Cholesky Factorization and Update/Downdate**, *TOMS*, 35(3), 2008.\n\n.. [Conn] A.R. Conn, N.I.M. Gould, and P.L. Toint, **Trust region\n   methods**, *Society for Industrial Mathematics*, 2000.\n\n.. [GolubPereyra] G.H. Golub and V. Pereyra, **The differentiation of\n   pseudo-inverses and nonlinear least squares problems whose\n   variables separate**, *SIAM Journal on numerical analysis*,\n   10(2):413-432, 1973.\n\n.. [HartleyZisserman] R.I. Hartley & A. Zisserman, **Multiview\n   Geometry in Computer Vision**, Cambridge University Press, 2004.\n\n.. [KanataniMorris] K. Kanatani and D. D. Morris, **Gauges and gauge\n   transformations for uncertainty description of geometric structure\n   with indeterminacy**, *IEEE Transactions on Information Theory*\n   47(5):2017-2028, 2001.\n\n.. [Keys] R. G. Keys, **Cubic convolution interpolation for digital\n   image processing**, *IEEE Trans. on Acoustics, Speech, and Signal\n   Processing*, 29(6), 1981.\n\n.. [KushalAgarwal] A. Kushal and S. Agarwal, **Visibility based\n   preconditioning for bundle adjustment**, *In Proceedings of the\n   IEEE Conference on Computer Vision and Pattern Recognition*, 2012.\n\n.. [Kanzow] C. Kanzow, N. Yamashita and M. Fukushima,\n   **Levenberg-Marquardt methods with strong local convergence\n   properties for solving nonlinear equations with convex\n   constraints**, *Journal of Computational and Applied Mathematics*,\n   177(2):375-397, 2005.\n\n.. [Levenberg] K. Levenberg, **A method for the solution of certain\n   nonlinear problems in least squares**, *Quart. Appl.  Math*,\n   2(2):164-168, 1944.\n\n.. [LiSaad] Na Li and Y. Saad, **MIQR: A multilevel incomplete qr\n   preconditioner for large sparse least squares problems**, *SIAM\n   Journal on Matrix Analysis and Applications*, 28(2):524-550, 2007.\n\n.. [Madsen] K. Madsen, H.B. Nielsen, and O. Tingleff, **Methods for\n   nonlinear least squares problems**, 2004.\n\n.. [Mandel] J. Mandel, **On block diagonal and Schur complement\n   preconditioning**, *Numer. Math.*, 58(1):79-93, 1990.\n\n.. [Marquardt] D.W. Marquardt, **An algorithm for least squares\n   estimation of nonlinear parameters**, *J. SIAM*, 11(2):431-441,\n   1963.\n\n.. [Mathew] T.P.A. Mathew, **Domain decomposition methods for the\n   numerical solution of partial differential equations**, Springer\n   Verlag, 2008.\n\n.. [NashSofer] S.G. Nash and A. Sofer, **Assessing a search direction\n   within a truncated newton method**, *Operations Research Letters*,\n   9(4):219-221, 1990.\n\n.. [Nocedal] J. Nocedal, **Updating Quasi-Newton Matrices with Limited\n   Storage**, *Mathematics of Computation*, 35(151): 773--782, 1980.\n\n.. [NocedalWright] J. Nocedal & S. Wright, **Numerical Optimization**,\n   Springer, 2004.\n\n.. [Oren] S. S. Oren, **Self-scaling Variable Metric (SSVM) Algorithms\n   Part II: Implementation and Experiments**, Management Science,\n   20(5), 863-874, 1974.\n\n.. [Press] W. H. Press, S. A. Teukolsky, W. T. Vetterling\n   & B. P. Flannery, **Numerical Recipes**, Cambridge University\n   Press, 2007.\n\n.. [Ridders] C. J. F. Ridders, **Accurate computation of F'(x) and\n   F'(x) F\"(x)**, Advances in Engineering Software 4(2), 75-76, 1978.\n\n.. [RuheWedin] A. Ruhe and P.Å. Wedin, **Algorithms for separable\n   nonlinear least squares problems**, Siam Review, 22(3):318-337,\n   1980.\n\n.. [Saad] Y. Saad, **Iterative methods for sparse linear\n   systems**, SIAM, 2003.\n\n.. [Stigler] S. M. Stigler, **Gauss and the invention of least\n   squares**, *The Annals of Statistics*, 9(3):465-474, 1981.\n\n.. [TenenbaumDirector] J. Tenenbaum & B. Director, **How Gauss\n   Determined the Orbit of Ceres**.\n\n.. [TrefethenBau] L.N. Trefethen and D. Bau, **Numerical Linear\n   Algebra**, SIAM, 1997.\n\n.. [Triggs] B. Triggs, P. F. Mclauchlan, R. I. Hartley &\n   A. W. Fitzgibbon, **Bundle Adjustment: A Modern Synthesis**,\n   Proceedings of the International Workshop on Vision Algorithms:\n   Theory and Practice, pp. 298-372, 1999.\n\n.. [Wiberg] T. Wiberg, **Computation of principal components when data\n   are missing**, In Proc. *Second Symp. Computational Statistics*,\n   pages 229-236, 1976.\n\n.. [WrightHolt] S. J. Wright and J. N. Holt, **An Inexact\n   Levenberg Marquardt Method for Large Sparse Nonlinear Least\n   Squares**, *Journal of the Australian Mathematical Society Series\n   B*, 26(4):387-403, 1985.\n"
  },
  {
    "path": "3rdparty/ceres/docs/source/conf.py",
    "content": "# -*- coding: utf-8 -*-\n#\n# Ceres Solver documentation build configuration file, created by\n# sphinx-quickstart on Sun Jan 20 20:34:07 2013.\n#\n# This file is execfile()d with the current directory set to its containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#\n# All configuration values have a default; values that are commented out\n# serve to show the default.\n\nimport sys, os\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\n#sys.path.insert(0, os.path.abspath('.'))\n\n# -- General configuration -----------------------------------------------------\n\n# If your documentation needs a minimal Sphinx version, state it here.\n#needs_sphinx = '1.0'\n\n# Add any Sphinx extension module names here, as strings. They can be extensions\n# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.\nextensions = ['sphinx.ext.todo', 'sphinx.ext.mathjax', 'sphinx.ext.ifconfig']\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = ['_templates']\n\n# The suffix of source filenames.\nsource_suffix = '.rst'\n\n# The encoding of source files.\n#source_encoding = 'utf-8-sig'\n\n# The master toctree document.\nmaster_doc = 'index'\n\n# General information about the project.\nproject = u'Ceres Solver'\ncopyright = u'2018 Google Inc'\n\n# The version info for the project you're documenting, acts as replacement for\n# |version| and |release|, also used in various other places throughout the\n# built documents.\n#\n# The short X.Y version.\nversion = '1.14'\n# The full version, including alpha/beta/rc tags.\nrelease = '1.14.0'\n\n# The language for content autogenerated by Sphinx. Refer to documentation\n# for a list of supported languages.\n#language = None\n\n# There are two options for replacing |today|: either, you set today to some\n# non-false value, then it is used:\n#today = ''\n# Else, today_fmt is used as the format for a strftime call.\n#today_fmt = '%B %d, %Y'\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\nexclude_patterns = []\n\n# The reST default role (used for this markup: `text`) to use for all documents.\n#default_role = None\n\n# If true, '()' will be appended to :func: etc. cross-reference text.\n#add_function_parentheses = True\n\n# If true, the current module name will be prepended to all description\n# unit titles (such as .. function::).\n#add_module_names = True\n\n# If true, sectionauthor and moduleauthor directives will be shown in the\n# output. They are ignored by default.\n#show_authors = False\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = 'sphinx'\n\n# A list of ignored prefixes for module index sorting.\n#modindex_common_prefix = []\n\n# -- Options for HTML output ---------------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\nhtml_theme = 'sphinx_rtd_theme'\n\n# Theme options are theme-specific and customize the look and feel of a theme\n# further.  For a list of options available for each theme, see the\n# documentation.\n#html_theme_options = {}\n\n# Add any paths that contain custom themes here, relative to this directory.\nhtml_theme_path = [\"_themes\",]\nimport sphinx_rtd_theme\nhtml_theme_path = [sphinx_rtd_theme.get_html_theme_path()]\n\n# The name for this set of Sphinx documents.  If None, it defaults to\n# \"<project> v<release> documentation\".\nhtml_title = \"Ceres Solver\"\n\n# A shorter title for the navigation bar.  Default is the same as html_title.\n#html_short_title = None\n\n# The name of an image file (relative to this directory) to place at the top\n# of the sidebar.\n#html_logo = None\n\n# The name of an image file (within the static path) to use as favicon of the\n# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32\n# pixels large.\n#html_favicon = None\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\n#html_static_path = ['_static']\n\n# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,\n# using the given strftime format.\n#html_last_updated_fmt = '%b %d, %Y'\n\n# If true, SmartyPants will be used to convert quotes and dashes to\n# typographically correct entities.\n#html_use_smartypants = True\n\n# Custom sidebar templates, maps document names to template names.\n#html_sidebars = {}\n\n# Additional templates that should be rendered to pages, maps page names to\n# template names.\n#html_additional_pages = {}\n\n# If false, no module index is generated.\nhtml_domain_indices = True\n\n# If false, no index is generated.\nhtml_use_index = True\n\n# If true, the index is split into individual pages for each letter.\nhtml_split_index = False\n\n# If true, links to the reST sources are added to the pages.\nhtml_show_sourcelink = False\n\n# If true, \"Created using Sphinx\" is shown in the HTML footer. Default is True.\nhtml_show_sphinx = False\n\n# If true, \"(C) Copyright ...\" is shown in the HTML footer. Default is True.\nhtml_show_copyright = True\n\n# If true, an OpenSearch description file will be output, and all pages will\n# contain a <link> tag referring to it.  The value of this option must be the\n# base URL from which the finished HTML is served.\n#html_use_opensearch = ''\n\n# This is the file name suffix for HTML files (e.g. \".xhtml\").\n#html_file_suffix = None\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = 'CeresSolverdoc'\n\n# -- Options for LaTeX output --------------------------------------------------\n\nlatex_elements = {\n# The paper size ('letterpaper' or 'a4paper').\n#'papersize': 'letterpaper',\n\n# The font size ('10pt', '11pt' or '12pt').\n#'pointsize': '10pt',\n\n# Additional stuff for the LaTeX preamble.\n#'preamble': '',\n}\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title, author, documentclass [howto/manual]).\nlatex_documents = [\n  ('index', 'CeresSolver.tex', u'Ceres Solver',\n   u'Sameer Agarwal, Keir Mierle & Others', 'manual'),\n]\n\n# The name of an image file (relative to this directory) to place at the top of\n# the title page.\n#latex_logo = None\n\n# For \"manual\" documents, if this is true, then toplevel headings are parts,\n# not chapters.\n#latex_use_parts = False\n\n# If true, show page references after internal links.\n#latex_show_pagerefs = False\n\n# If true, show URL addresses after external links.\n#latex_show_urls = False\n\n# Documents to append as an appendix to all manuals.\n#latex_appendices = []\n\n# If false, no module index is generated.\n#latex_domain_indices = True\n\n\n# -- Options for manual page output --------------------------------------------\n\n# One entry per manual page. List of tuples\n# (source start file, name, description, authors, manual section).\nman_pages = [\n    ('index', 'ceressolver', u'Ceres Solver',\n     [u'Sameer Agarwal, Keir Mierle & Others'], 1)\n]\n\n# If true, show URL addresses after external links.\n#man_show_urls = False\n\n\n# -- Options for Texinfo output ------------------------------------------------\n\n# Grouping the document tree into Texinfo files. List of tuples\n# (source start file, target name, title, author,\n#  dir menu entry, description, category)\ntexinfo_documents = [\n  ('index', 'CeresSolver', u'Ceres Solver',\n   u'Sameer Agarwal, Keir Mierle & Others', 'CeresSolver', 'One line description of project.',\n   'Miscellaneous'),\n]\n\n# Documents to append as an appendix to all manuals.\n#texinfo_appendices = []\n\n# If false, no module index is generated.\n#texinfo_domain_indices = True\n\n# How to display URL addresses: 'footnote', 'no', or 'inline'.\n#texinfo_show_urls = 'footnote'\n"
  },
  {
    "path": "3rdparty/ceres/docs/source/contributing.rst",
    "content": ".. _chapter-contributing:\n\n============\nContributing\n============\n\nWe welcome contributions to Ceres, whether they are new features, bug\nfixes or tests. The Ceres `mailing\n<http://groups.google.com/group/ceres-solver>`_ list is the best place\nfor all development related discussions. Please consider joining\nit. If you have ideas on how you would like to contribute to Ceres, it\nis a good idea to let us know on the mailing list before you start\ndevelopment. We may have suggestions that will save effort when trying\nto merge your work into the main branch. If you are looking for ideas,\nplease let us know about your interest and skills and we will be happy\nto make a suggestion or three.\n\nWe follow Google's `C++ Style Guide\n<https://google.github.io/styleguide/cppguide.html>`_ and\nuse `git <http://git-scm.com/>`_ for version control. We use the\n`Gerrit <https://ceres-solver-review.googlesource.com/>`_ to collaborate and\nreview changes to Ceres. Gerrit enables pre-commit reviews so that\nCeres can maintain a linear history with clean, reviewed commits, and\nno merges.\n\nWe now describe how to set up your development environment and submit\na change list for review via Gerrit.\n\nSetting up your Environment\n===========================\n\n1. Download and configure ``git``.\n\n   * Mac ``brew install git``.\n   * Linux ``sudo apt-get install git``.\n   * Windows. Download `msysgit\n     <https://code.google.com/p/msysgit/>`_, which includes a minimal\n     `Cygwin <http://www.cygwin.com/>`_ install.\n\n2. Sign up for `Gerrit\n   <https://ceres-solver-review.googlesource.com/>`_. You will also need to\n   `sign the Contributor License Agreement (CLA)\n   <https://opensource.google.com/docs/cla/#sign>`_ with Google, which gives\n   Google a royalty-free unlimited license to use your contributions. You\n   retain copyright.\n\n3. Clone the Ceres Solver ``git`` repository from Gerrit.\n\n   .. code-block:: bash\n\n      git clone https://ceres-solver.googlesource.com/ceres-solver\n\n\n4. Build Ceres, following the instructions in\n   :ref:`chapter-installation`.\n\n   On Mac and Linux, the ``CMake`` build will download and enable\n   the Gerrit pre-commit hook automatically. This pre-submit hook\n   creates `Change-Id: ...` lines in your commits.\n\n   If this does not work OR you are on Windows, execute the\n   following in the root directory of the local ``git`` repository:\n\n   .. code-block:: bash\n\n      curl -o .git/hooks/commit-msg https://ceres-solver-review.googlesource.com/tools/hooks/commit-msg\n      chmod +x .git/hooks/commit-msg\n\n5. Configure your Gerrit password with a ``.gitcookies`` which allows pushing\n   to Gerrit without having to enter a very long random password every time:\n\n   * Sign into `http://ceres-solver-review.googlesource.com\n     <http://ceres-solver-review.googlesource.com>`_.\n\n   * Click ``Settings -> HTTP Credentials -> Obtain Password``.\n\n   * (maybe) Select an account for multi-login. This should be the\n     same as your Gerrit login.\n\n   * Click ``Allow access`` when the page requests access to your\n     ``git`` repositories.\n\n   * Follow the instructions from Gerrit to create a ``.gitcookies`` file on\n     your system, either in ``$HOME/.gitcookies`` (Mac and Linux) or\n     ``%USERPROFILE%\\.gitcookies`` (Windows). Note that for Windows, please get\n     a recent `Git for Windows <https://git-scm.com/download/win>`_ install to\n     enable automatic lookup in the ``%USERPROFILE%\\.gitcookies``.\n\nSubmitting a change\n===================\n\n1. Make your changes against master or whatever branch you\n   like. Commit your changes as one patch. When you commit, the Gerrit\n   hook will add a `Change-Id:` line as the last line of the commit.\n\n   Make sure that your commit message is formatted in the `50/72 style\n   <http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html>`_.\n\n2. Push your changes to the Ceres Gerrit instance:\n\n   .. code-block:: bash\n\n      git push origin HEAD:refs/for/master\n\n   When the push succeeds, the console will display a URL showing the\n   address of the review. Go to the URL and add at least one of the\n   maintainers (Sameer Agarwal, Keir Mierle, Alex Stewart or William\n   Rucklidge) as reviewers.\n\n3. Wait for a review.\n\n4. Once review comments come in, address them. Please reply to each\n   comment in Gerrit, which makes the re-review process easier. After\n   modifying the code in your ``git`` instance, *don't make a new\n   commit*. Instead, update the last commit using a command like the\n   following:\n\n   .. code-block:: bash\n\n      git commit --amend -a\n\n   This will update the last commit, so that it has both the original\n   patch and your updates as a single commit. You will have a chance\n   to edit the commit message as well. Push the new commit to Gerrit\n   as before.\n\n   Gerrit will use the ``Change-Id:`` to match the previous commit\n   with the new one. The review interface retains your original patch,\n   but also shows the new patch.\n\n   Publish your responses to the comments, and wait for a new round\n   of reviews.\n"
  },
  {
    "path": "3rdparty/ceres/docs/source/derivatives.rst",
    "content": ".. default-domain:: cpp\n\n.. cpp:namespace:: ceres\n\n.. _chapter-on_derivatives:\n\n==============\nOn Derivatives\n==============\n\nCeres Solver, like all gradient based optimization algorithms, depends\non being able to evaluate the objective function and its derivatives\nat arbitrary points in its domain. Indeed, defining the objective\nfunction and its `Jacobian\n<https://en.wikipedia.org/wiki/Jacobian_matrix_and_determinant>`_ is\nthe principal task that the user is required to perform when solving\nan optimization problem using Ceres Solver. The correct and efficient\ncomputation of the Jacobian is the key to good performance.\n\nCeres Solver offers considerable flexibility in how the user can\nprovide derivatives to the solver. She can use:\n\n#. :ref:`chapter-analytical_derivatives`: The user figures out the\n   derivatives herself, by hand or using a tool like `Maple\n   <https://www.maplesoft.com/products/maple/>`_ or `Mathematica\n   <https://www.wolfram.com/mathematica/>`_, and implements them in a\n   :class:`CostFunction`.\n#. :ref:`chapter-numerical_derivatives`: Ceres numerically computes\n   the derivative using finite differences.\n#. :ref:`chapter-automatic_derivatives`: Ceres automatically computes\n   the analytic derivative using C++ templates and operator\n   overloading.\n\nWhich of these three approaches (alone or in combination) should be\nused depends on the situation and the tradeoffs the user is willing to\nmake. Unfortunately, numerical optimization textbooks rarely discuss\nthese issues in detail and the user is left to her own devices.\n\nThe aim of this article is to fill this gap and describe each of these\nthree approaches in the context of Ceres Solver with sufficient detail\nthat the user can make an informed choice.\n\nFor the impatient amongst you, here is some high level advice:\n\n#. Use :ref:`chapter-automatic_derivatives`.\n#. In some cases it maybe worth using\n   :ref:`chapter-analytical_derivatives`.\n#. Avoid :ref:`chapter-numerical_derivatives`. Use it as a measure of\n   last resort, mostly to interface with external libraries.\n\nFor the rest, read on.\n\n.. toctree::\n   :maxdepth: 1\n\n   spivak_notation\n   analytical_derivatives\n   numerical_derivatives\n   automatic_derivatives\n   interfacing_with_autodiff\n"
  },
  {
    "path": "3rdparty/ceres/docs/source/faqs.rst",
    "content": ".. _chapter-tricks:\n\n.. default-domain:: cpp\n\n.. cpp:namespace:: ceres\n\n===================\nFAQS, Tips & Tricks\n===================\n\nAnswers to frequently asked questions, tricks of the trade and general\nwisdom.\n\n.. toctree::\n   :maxdepth: 2\n\n   modeling_faqs\n   solving_faqs\n\n\nFurther Reading\n===============\n\nFor a short but informative introduction to the subject we recommend\nthe booklet by [Madsen]_ . For a general introduction to non-linear\noptimization we recommend [NocedalWright]_. [Bjorck]_ remains the\nseminal reference on least squares problems. [TrefethenBau]_ book is\nour favorite text on introductory numerical linear algebra. [Triggs]_\nprovides a thorough coverage of the bundle adjustment problem.\n"
  },
  {
    "path": "3rdparty/ceres/docs/source/features.rst",
    "content": "====\nWhy?\n====\n.. _chapter-features:\n\n* **Code Quality** - Ceres Solver has been used in production at\n  Google for more than four years now. It is clean, extensively tested\n  and well documented code that is actively developed and supported.\n\n* **Modeling API** - It is rarely the case that one starts with the\n  exact and complete formulation of the problem that one is trying to\n  solve. Ceres's modeling API has been designed so that the user can\n  easily build and modify the objective function, one term at a\n  time. And to do so without worrying about how the solver is going to\n  deal with the resulting changes in the sparsity/structure of the\n  underlying problem.\n\n  - **Derivatives** Supplying derivatives is perhaps the most tedious\n    and error prone part of using an optimization library.  Ceres\n    ships with `automatic`_ and `numeric`_ differentiation. So you\n    never have to compute derivatives by hand (unless you really want\n    to). Not only this, Ceres allows you to mix automatic, numeric and\n    analytical derivatives in any combination that you want.\n\n  - **Robust Loss Functions** Most non-linear least squares problems\n    involve data. If there is data, there will be outliers. Ceres\n    allows the user to *shape* their residuals using a\n    :class:`LossFunction` to reduce the influence of outliers.\n\n  - **Local Parameterization** In many cases, some parameters lie on a\n    manifold other than Euclidean space, e.g., rotation matrices. In\n    such cases, the user can specify the geometry of the local tangent\n    space by specifying a :class:`LocalParameterization` object.\n\n* **Solver Choice** Depending on the size, sparsity structure, time &\n  memory budgets, and solution quality requirements, different\n  optimization algorithms will suit different needs. To this end,\n  Ceres Solver comes with a variety of optimization algorithms:\n\n  - **Trust Region Solvers** - Ceres supports Levenberg-Marquardt,\n    Powell's Dogleg, and Subspace dogleg methods. The key\n    computational cost in all of these methods is the solution of a\n    linear system. To this end Ceres ships with a variety of linear\n    solvers - dense QR and dense Cholesky factorization (using\n    `Eigen`_ or `LAPACK`_) for dense problems, sparse Cholesky\n    factorization (`SuiteSparse`_, `CXSparse`_ or `Eigen`_) for large\n    sparse problems custom Schur complement based dense, sparse, and\n    iterative linear solvers for `bundle adjustment`_ problems.\n\n  - **Line Search Solvers** - When the problem size is so large that\n    storing and factoring the Jacobian is not feasible or a low\n    accuracy solution is required cheaply, Ceres offers a number of\n    line search based algorithms. This includes a number of variants\n    of Non-linear Conjugate Gradients, BFGS and LBFGS.\n\n* **Speed** - Ceres Solver has been extensively optimized, with C++\n  templating, hand written linear algebra routines and OpenMP or C++11 threads\n  based multithreading of the Jacobian evaluation and the linear solvers.\n\n* **Solution Quality** Ceres is the `best performing`_ solver on the NIST\n  problem set used by Mondragon and Borchers for benchmarking\n  non-linear least squares solvers.\n\n* **Covariance estimation** - Evaluate the sensitivity/uncertainty of\n  the solution by evaluating all or part of the covariance\n  matrix. Ceres is one of the few solvers that allows you to to do\n  this analysis at scale.\n\n* **Community** Since its release as an open source software, Ceres\n  has developed an active developer community that contributes new\n  features, bug fixes and support.\n\n* **Portability** - Runs on *Linux*, *Windows*, *Mac OS X*, *Android*\n  *and iOS*.\n\n* **BSD Licensed** The BSD license offers the flexibility to ship your\n  application\n\n.. _best performing: https://groups.google.com/forum/#!topic/ceres-solver/UcicgMPgbXw\n.. _bundle adjustment: http://en.wikipedia.org/wiki/Bundle_adjustment\n.. _SuiteSparse: http://www.cise.ufl.edu/research/sparse/SuiteSparse/\n.. _Eigen: http://eigen.tuxfamily.org/\n.. _LAPACK: http://www.netlib.org/lapack/\n.. _CXSparse: https://www.cise.ufl.edu/research/sparse/CXSparse/\n.. _automatic: http://en.wikipedia.org/wiki/Automatic_differentiation\n.. _numeric: http://en.wikipedia.org/wiki/Numerical_differentiation\n"
  },
  {
    "path": "3rdparty/ceres/docs/source/gradient_solver.rst",
    "content": ".. highlight:: c++\n\n.. default-domain:: cpp\n\n.. _chapter-gradient_problem_solver:\n\n==================================\nGeneral Unconstrained Minimization\n==================================\n\nModeling\n========\n\n:class:`FirstOrderFunction`\n---------------------------\n\n.. class:: FirstOrderFunction\n\n  Instances of :class:`FirstOrderFunction` implement the evaluation of\n  a function and its gradient.\n\n  .. code-block:: c++\n\n   class FirstOrderFunction {\n     public:\n      virtual ~FirstOrderFunction() {}\n      virtual bool Evaluate(const double* const parameters,\n                            double* cost,\n                            double* gradient) const = 0;\n      virtual int NumParameters() const = 0;\n   };\n\n.. function:: bool FirstOrderFunction::Evaluate(const double* const parameters, double* cost, double* gradient) const\n\n   Evaluate the cost/value of the function. If ``gradient`` is not\n   ``NULL`` then evaluate the gradient too. If evaluation is\n   successful return, ``true`` else return ``false``.\n\n   ``cost`` guaranteed to be never ``NULL``, ``gradient`` can be ``NULL``.\n\n.. function:: int FirstOrderFunction::NumParameters() const\n\n   Number of parameters in the domain of the function.\n\n\n:class:`GradientProblem`\n------------------------\n\n.. class:: GradientProblem\n\n.. code-block:: c++\n\n  class GradientProblem {\n   public:\n    explicit GradientProblem(FirstOrderFunction* function);\n    GradientProblem(FirstOrderFunction* function,\n                    LocalParameterization* parameterization);\n    int NumParameters() const;\n    int NumLocalParameters() const;\n    bool Evaluate(const double* parameters, double* cost, double* gradient) const;\n    bool Plus(const double* x, const double* delta, double* x_plus_delta) const;\n  };\n\nInstances of :class:`GradientProblem` represent general non-linear\noptimization problems that must be solved using just the value of the\nobjective function and its gradient. Unlike the :class:`Problem`\nclass, which can only be used to model non-linear least squares\nproblems, instances of :class:`GradientProblem` not restricted in the\nform of the objective function.\n\nStructurally :class:`GradientProblem` is a composition of a\n:class:`FirstOrderFunction` and optionally a\n:class:`LocalParameterization`.\n\nThe :class:`FirstOrderFunction` is responsible for evaluating the cost\nand gradient of the objective function.\n\nThe :class:`LocalParameterization` is responsible for going back and\nforth between the ambient space and the local tangent space. When a\n:class:`LocalParameterization` is not provided, then the tangent space\nis assumed to coincide with the ambient Euclidean space that the\ngradient vector lives in.\n\nThe constructor takes ownership of the :class:`FirstOrderFunction` and\n:class:`LocalParamterization` objects passed to it.\n\n\n.. function:: void Solve(const GradientProblemSolver::Options& options, const GradientProblem& problem, double* parameters, GradientProblemSolver::Summary* summary)\n\n   Solve the given :class:`GradientProblem` using the values in\n   ``parameters`` as the initial guess of the solution.\n\n\nSolving\n=======\n\n:class:`GradientProblemSolver::Options`\n---------------------------------------\n\n.. class:: GradientProblemSolver::Options\n\n   :class:`GradientProblemSolver::Options` controls the overall\n   behavior of the solver. We list the various settings and their\n   default values below.\n\n.. function:: bool GradientProblemSolver::Options::IsValid(string* error) const\n\n   Validate the values in the options struct and returns true on\n   success. If there is a problem, the method returns false with\n   ``error`` containing a textual description of the cause.\n\n.. member:: LineSearchDirectionType GradientProblemSolver::Options::line_search_direction_type\n\n   Default: ``LBFGS``\n\n   Choices are ``STEEPEST_DESCENT``, ``NONLINEAR_CONJUGATE_GRADIENT``,\n   ``BFGS`` and ``LBFGS``.\n\n.. member:: LineSearchType GradientProblemSolver::Options::line_search_type\n\n   Default: ``WOLFE``\n\n   Choices are ``ARMIJO`` and ``WOLFE`` (strong Wolfe conditions).\n   Note that in order for the assumptions underlying the ``BFGS`` and\n   ``LBFGS`` line search direction algorithms to be guaranteed to be\n   satisifed, the ``WOLFE`` line search should be used.\n\n.. member:: NonlinearConjugateGradientType GradientProblemSolver::Options::nonlinear_conjugate_gradient_type\n\n   Default: ``FLETCHER_REEVES``\n\n   Choices are ``FLETCHER_REEVES``, ``POLAK_RIBIERE`` and\n   ``HESTENES_STIEFEL``.\n\n.. member:: int GradientProblemSolver::Options::max_lbfs_rank\n\n   Default: 20\n\n   The L-BFGS hessian approximation is a low rank approximation to the\n   inverse of the Hessian matrix. The rank of the approximation\n   determines (linearly) the space and time complexity of using the\n   approximation. Higher the rank, the better is the quality of the\n   approximation. The increase in quality is however is bounded for a\n   number of reasons.\n\n     1. The method only uses secant information and not actual\n        derivatives.\n\n     2. The Hessian approximation is constrained to be positive\n        definite.\n\n   So increasing this rank to a large number will cost time and space\n   complexity without the corresponding increase in solution\n   quality. There are no hard and fast rules for choosing the maximum\n   rank. The best choice usually requires some problem specific\n   experimentation.\n\n.. member:: bool GradientProblemSolver::Options::use_approximate_eigenvalue_bfgs_scaling\n\n   Default: ``false``\n\n   As part of the ``BFGS`` update step / ``LBFGS`` right-multiply\n   step, the initial inverse Hessian approximation is taken to be the\n   Identity.  However, [Oren]_ showed that using instead :math:`I *\n   \\gamma`, where :math:`\\gamma` is a scalar chosen to approximate an\n   eigenvalue of the true inverse Hessian can result in improved\n   convergence in a wide variety of cases.  Setting\n   ``use_approximate_eigenvalue_bfgs_scaling`` to true enables this\n   scaling in ``BFGS`` (before first iteration) and ``LBFGS`` (at each\n   iteration).\n\n   Precisely, approximate eigenvalue scaling equates to\n\n   .. math:: \\gamma = \\frac{y_k' s_k}{y_k' y_k}\n\n   With:\n\n  .. math:: y_k = \\nabla f_{k+1} - \\nabla f_k\n  .. math:: s_k = x_{k+1} - x_k\n\n  Where :math:`f()` is the line search objective and :math:`x` the\n  vector of parameter values [NocedalWright]_.\n\n  It is important to note that approximate eigenvalue scaling does\n  **not** *always* improve convergence, and that it can in fact\n  *significantly* degrade performance for certain classes of problem,\n  which is why it is disabled by default.  In particular it can\n  degrade performance when the sensitivity of the problem to different\n  parameters varies significantly, as in this case a single scalar\n  factor fails to capture this variation and detrimentally downscales\n  parts of the Jacobian approximation which correspond to\n  low-sensitivity parameters. It can also reduce the robustness of the\n  solution to errors in the Jacobians.\n\n.. member:: LineSearchIterpolationType GradientProblemSolver::Options::line_search_interpolation_type\n\n   Default: ``CUBIC``\n\n   Degree of the polynomial used to approximate the objective\n   function. Valid values are ``BISECTION``, ``QUADRATIC`` and\n   ``CUBIC``.\n\n.. member:: double GradientProblemSolver::Options::min_line_search_step_size\n\n   The line search terminates if:\n\n   .. math:: \\|\\Delta x_k\\|_\\infty < \\text{min_line_search_step_size}\n\n   where :math:`\\|\\cdot\\|_\\infty` refers to the max norm, and\n   :math:`\\Delta x_k` is the step change in the parameter values at\n   the :math:`k`-th iteration.\n\n.. member:: double GradientProblemSolver::Options::line_search_sufficient_function_decrease\n\n   Default: ``1e-4``\n\n   Solving the line search problem exactly is computationally\n   prohibitive. Fortunately, line search based optimization algorithms\n   can still guarantee convergence if instead of an exact solution,\n   the line search algorithm returns a solution which decreases the\n   value of the objective function sufficiently. More precisely, we\n   are looking for a step size s.t.\n\n   .. math:: f(\\text{step_size}) \\le f(0) + \\text{sufficient_decrease} * [f'(0) * \\text{step_size}]\n\n   This condition is known as the Armijo condition.\n\n.. member:: double GradientProblemSolver::Options::max_line_search_step_contraction\n\n   Default: ``1e-3``\n\n   In each iteration of the line search,\n\n   .. math:: \\text{new_step_size} \\geq \\text{max_line_search_step_contraction} * \\text{step_size}\n\n   Note that by definition, for contraction:\n\n   .. math:: 0 < \\text{max_step_contraction} < \\text{min_step_contraction} < 1\n\n.. member:: double GradientProblemSolver::Options::min_line_search_step_contraction\n\n   Default: ``0.6``\n\n   In each iteration of the line search,\n\n   .. math:: \\text{new_step_size} \\leq \\text{min_line_search_step_contraction} * \\text{step_size}\n\n   Note that by definition, for contraction:\n\n   .. math:: 0 < \\text{max_step_contraction} < \\text{min_step_contraction} < 1\n\n.. member:: int GradientProblemSolver::Options::max_num_line_search_step_size_iterations\n\n   Default: ``20``\n\n   Maximum number of trial step size iterations during each line\n   search, if a step size satisfying the search conditions cannot be\n   found within this number of trials, the line search will stop.\n\n   As this is an 'artificial' constraint (one imposed by the user, not\n   the underlying math), if ``WOLFE`` line search is being used, *and*\n   points satisfying the Armijo sufficient (function) decrease\n   condition have been found during the current search (in :math:`\\leq`\n   ``max_num_line_search_step_size_iterations``).  Then, the step size\n   with the lowest function value which satisfies the Armijo condition\n   will be returned as the new valid step, even though it does *not*\n   satisfy the strong Wolfe conditions.  This behaviour protects\n   against early termination of the optimizer at a sub-optimal point.\n\n.. member:: int GradientProblemSolver::Options::max_num_line_search_direction_restarts\n\n   Default: ``5``\n\n   Maximum number of restarts of the line search direction algorithm\n   before terminating the optimization. Restarts of the line search\n   direction algorithm occur when the current algorithm fails to\n   produce a new descent direction. This typically indicates a\n   numerical failure, or a breakdown in the validity of the\n   approximations used.\n\n.. member:: double GradientProblemSolver::Options::line_search_sufficient_curvature_decrease\n\n   Default: ``0.9``\n\n   The strong Wolfe conditions consist of the Armijo sufficient\n   decrease condition, and an additional requirement that the\n   step size be chosen s.t. the *magnitude* ('strong' Wolfe\n   conditions) of the gradient along the search direction\n   decreases sufficiently. Precisely, this second condition\n   is that we seek a step size s.t.\n\n   .. math:: \\|f'(\\text{step_size})\\| \\leq \\text{sufficient_curvature_decrease} * \\|f'(0)\\|\n\n   Where :math:`f()` is the line search objective and :math:`f'()` is the derivative\n   of :math:`f` with respect to the step size: :math:`\\frac{d f}{d~\\text{step size}}`.\n\n.. member:: double GradientProblemSolver::Options::max_line_search_step_expansion\n\n   Default: ``10.0``\n\n   During the bracketing phase of a Wolfe line search, the step size\n   is increased until either a point satisfying the Wolfe conditions\n   is found, or an upper bound for a bracket containing a point\n   satisfying the conditions is found.  Precisely, at each iteration\n   of the expansion:\n\n   .. math:: \\text{new_step_size} \\leq \\text{max_step_expansion} * \\text{step_size}\n\n   By definition for expansion\n\n   .. math:: \\text{max_step_expansion} > 1.0\n\n.. member:: int GradientProblemSolver::Options::max_num_iterations\n\n   Default: ``50``\n\n   Maximum number of iterations for which the solver should run.\n\n.. member:: double GradientProblemSolver::Options::max_solver_time_in_seconds\n\n   Default: ``1e6``\n   Maximum amount of time for which the solver should run.\n\n.. member:: double GradientProblemSolver::Options::function_tolerance\n\n   Default: ``1e-6``\n\n   Solver terminates if\n\n   .. math:: \\frac{|\\Delta \\text{cost}|}{\\text{cost}} \\leq \\text{function_tolerance}\n\n   where, :math:`\\Delta \\text{cost}` is the change in objective\n   function value (up or down) in the current iteration of the line search.\n\n.. member:: double GradientProblemSolver::Options::gradient_tolerance\n\n   Default: ``1e-10``\n\n   Solver terminates if\n\n   .. math:: \\|x - \\Pi \\boxplus(x, -g(x))\\|_\\infty \\leq \\text{gradient_tolerance}\n\n   where :math:`\\|\\cdot\\|_\\infty` refers to the max norm, :math:`\\Pi`\n   is projection onto the bounds constraints and :math:`\\boxplus` is\n   Plus operation for the overall local parameterization associated\n   with the parameter vector.\n\n.. member:: double GradientProblemSolver::Options::parameter_tolerance\n\n   Default: ``1e-8``\n\n   Solver terminates if\n\n   .. math:: \\|\\Delta x\\| \\leq (\\|x\\| + \\text{parameter_tolerance}) * \\text{parameter_tolerance}\n\n   where :math:`\\Delta x` is the step computed by the linear solver in\n   the current iteration of the line search.\n\n.. member:: LoggingType GradientProblemSolver::Options::logging_type\n\n   Default: ``PER_MINIMIZER_ITERATION``\n\n.. member:: bool GradientProblemSolver::Options::minimizer_progress_to_stdout\n\n   Default: ``false``\n\n   By default the :class:`Minimizer` progress is logged to ``STDERR``\n   depending on the ``vlog`` level. If this flag is set to true, and\n   :member:`GradientProblemSolver::Options::logging_type` is not\n   ``SILENT``, the logging output is sent to ``STDOUT``.\n\n   The progress display looks like\n\n   .. code-block:: bash\n\n      0: f: 2.317806e+05 d: 0.00e+00 g: 3.19e-01 h: 0.00e+00 s: 0.00e+00 e:  0 it: 2.98e-02 tt: 8.50e-02\n      1: f: 2.312019e+05 d: 5.79e+02 g: 3.18e-01 h: 2.41e+01 s: 1.00e+00 e:  1 it: 4.54e-02 tt: 1.31e-01\n      2: f: 2.300462e+05 d: 1.16e+03 g: 3.17e-01 h: 4.90e+01 s: 2.54e-03 e:  1 it: 4.96e-02 tt: 1.81e-01\n\n   Here\n\n   #. ``f`` is the value of the objective function.\n   #. ``d`` is the change in the value of the objective function if\n      the step computed in this iteration is accepted.\n   #. ``g`` is the max norm of the gradient.\n   #. ``h`` is the change in the parameter vector.\n   #. ``s`` is the optimal step length computed by the line search.\n   #. ``it`` is the time take by the current iteration.\n   #. ``tt`` is the total time taken by the minimizer.\n\n.. member:: vector<IterationCallback> GradientProblemSolver::Options::callbacks\n\n   Callbacks that are executed at the end of each iteration of the\n   :class:`Minimizer`. They are executed in the order that they are\n   specified in this vector. By default, parameter blocks are updated\n   only at the end of the optimization, i.e., when the\n   :class:`Minimizer` terminates. This behavior is controlled by\n   :member:`GradientProblemSolver::Options::update_state_every_variable`. If\n   the user wishes to have access to the update parameter blocks when\n   his/her callbacks are executed, then set\n   :member:`GradientProblemSolver::Options::update_state_every_iteration`\n   to true.\n\n   The solver does NOT take ownership of these pointers.\n\n\n.. member:: bool Solver::Options::update_state_every_iteration\n\n   Default: ``false``\n\n   Normally the parameter vector is only updated when the solver\n   terminates. Setting this to true updates it every iteration. This\n   setting is useful when building an interactive application using\n   Ceres and using an :class:`IterationCallback`.\n\n:class:`GradientProblemSolver::Summary`\n---------------------------------------\n\n.. class:: GradientProblemSolver::Summary\n\n   Summary of the various stages of the solver after termination.\n\n.. function:: string GradientProblemSolver::Summary::BriefReport() const\n\n   A brief one line description of the state of the solver after\n   termination.\n\n.. function:: string GradientProblemSolver::Summary::FullReport() const\n\n   A full multiline description of the state of the solver after\n   termination.\n\n.. function:: bool GradientProblemSolver::Summary::IsSolutionUsable() const\n\n   Whether the solution returned by the optimization algorithm can be\n   relied on to be numerically sane. This will be the case if\n   `GradientProblemSolver::Summary:termination_type` is set to `CONVERGENCE`,\n   `USER_SUCCESS` or `NO_CONVERGENCE`, i.e., either the solver\n   converged by meeting one of the convergence tolerances or because\n   the user indicated that it had converged or it ran to the maximum\n   number of iterations or time.\n\n.. member:: TerminationType GradientProblemSolver::Summary::termination_type\n\n   The cause of the minimizer terminating.\n\n.. member:: string GradientProblemSolver::Summary::message\n\n   Reason why the solver terminated.\n\n.. member:: double GradientProblemSolver::Summary::initial_cost\n\n   Cost of the problem (value of the objective function) before the\n   optimization.\n\n.. member:: double GradientProblemSolver::Summary::final_cost\n\n   Cost of the problem (value of the objective function) after the\n   optimization.\n\n.. member:: vector<IterationSummary> GradientProblemSolver::Summary::iterations\n\n   :class:`IterationSummary` for each minimizer iteration in order.\n\n.. member:: int num_cost_evaluations\n\n   Number of times the cost (and not the gradient) was evaluated.\n\n.. member:: int num_gradient_evaluations\n\n   Number of times the gradient (and the cost) were evaluated.\n\n.. member:: double GradientProblemSolver::Summary::total_time_in_seconds\n\n   Time (in seconds) spent in the solver.\n\n.. member:: double GradientProblemSolver::Summary::cost_evaluation_time_in_seconds\n\n   Time (in seconds) spent evaluating the cost vector.\n\n.. member:: double GradientProblemSolver::Summary::gradient_evaluation_time_in_seconds\n\n   Time (in seconds) spent evaluating the gradient vector.\n\n.. member:: int GradientProblemSolver::Summary::num_parameters\n\n   Number of parameters in the problem.\n\n.. member:: int GradientProblemSolver::Summary::num_local_parameters\n\n   Dimension of the tangent space of the problem. This is different\n   from :member:`GradientProblemSolver::Summary::num_parameters` if a\n   :class:`LocalParameterization` object is used.\n\n.. member:: LineSearchDirectionType GradientProblemSolver::Summary::line_search_direction_type\n\n   Type of line search direction used.\n\n.. member:: LineSearchType GradientProblemSolver::Summary::line_search_type\n\n   Type of the line search algorithm used.\n\n.. member:: LineSearchInterpolationType GradientProblemSolver::Summary::line_search_interpolation_type\n\n   When performing line search, the degree of the polynomial used to\n   approximate the objective function.\n\n.. member:: NonlinearConjugateGradientType GradientProblemSolver::Summary::nonlinear_conjugate_gradient_type\n\n   If the line search direction is `NONLINEAR_CONJUGATE_GRADIENT`,\n   then this indicates the particular variant of non-linear conjugate\n   gradient used.\n\n.. member:: int GradientProblemSolver::Summary::max_lbfgs_rank\n\n   If the type of the line search direction is `LBFGS`, then this\n   indicates the rank of the Hessian approximation.\n"
  },
  {
    "path": "3rdparty/ceres/docs/source/gradient_tutorial.rst",
    "content": ".. highlight:: c++\n\n.. default-domain:: cpp\n\n.. _chapter-gradient_tutorial:\n\n==================================\nGeneral Unconstrained Minimization\n==================================\n\nWhile much of Ceres Solver is devoted to solving non-linear least\nsquares problems, internally it contains a solver that can solve\ngeneral unconstrained optimization problems using just their objective\nfunction value and gradients. The ``GradientProblem`` and\n``GradientProblemSolver`` objects give the user access to this solver.\n\nSo without much further ado, let us look at how one goes about using\nthem.\n\nRosenbrock's Function\n=====================\n\nWe consider the minimization of the famous `Rosenbrock's function\n<http://en.wikipedia.org/wiki/Rosenbrock_function>`_ [#f1]_.\n\nWe begin by defining an instance of the ``FirstOrderFunction``\ninterface. This is the object that is responsible for computing the\nobjective function value and the gradient (if required). This is the\nanalog of the :class:`CostFunction` when defining non-linear least\nsquares problems in Ceres.\n\n.. code::\n\n  class Rosenbrock : public ceres::FirstOrderFunction {\n   public:\n    virtual bool Evaluate(const double* parameters,\n                          double* cost,\n                          double* gradient) const {\n      const double x = parameters[0];\n      const double y = parameters[1];\n\n      cost[0] = (1.0 - x) * (1.0 - x) + 100.0 * (y - x * x) * (y - x * x);\n      if (gradient != NULL) {\n        gradient[0] = -2.0 * (1.0 - x) - 200.0 * (y - x * x) * 2.0 * x;\n        gradient[1] = 200.0 * (y - x * x);\n      }\n      return true;\n    }\n\n    virtual int NumParameters() const { return 2; }\n  };\n\n\nMinimizing it then is a straightforward matter of constructing a\n:class:`GradientProblem` object and calling :func:`Solve` on it.\n\n.. code::\n\n    double parameters[2] = {-1.2, 1.0};\n\n    ceres::GradientProblem problem(new Rosenbrock());\n\n    ceres::GradientProblemSolver::Options options;\n    options.minimizer_progress_to_stdout = true;\n    ceres::GradientProblemSolver::Summary summary;\n    ceres::Solve(options, problem, parameters, &summary);\n\n    std::cout << summary.FullReport() << \"\\n\";\n\nExecuting this code results, solve the problem using limited memory\n`BFGS\n<http://en.wikipedia.org/wiki/Broyden%E2%80%93Fletcher%E2%80%93Goldfarb%E2%80%93Shanno_algorithm>`_\nalgorithm.\n\n.. code-block:: bash\n\n     0: f: 2.420000e+01 d: 0.00e+00 g: 2.16e+02 h: 0.00e+00 s: 0.00e+00 e:  0 it: 2.00e-05 tt: 2.00e-05\n     1: f: 4.280493e+00 d: 1.99e+01 g: 1.52e+01 h: 2.01e-01 s: 8.62e-04 e:  2 it: 7.32e-05 tt: 2.19e-04\n     2: f: 3.571154e+00 d: 7.09e-01 g: 1.35e+01 h: 3.78e-01 s: 1.34e-01 e:  3 it: 2.50e-05 tt: 2.68e-04\n     3: f: 3.440869e+00 d: 1.30e-01 g: 1.73e+01 h: 1.36e-01 s: 1.00e+00 e:  1 it: 4.05e-06 tt: 2.92e-04\n     4: f: 3.213597e+00 d: 2.27e-01 g: 1.55e+01 h: 1.06e-01 s: 4.59e-01 e:  1 it: 2.86e-06 tt: 3.14e-04\n     5: f: 2.839723e+00 d: 3.74e-01 g: 1.05e+01 h: 1.34e-01 s: 5.24e-01 e:  1 it: 2.86e-06 tt: 3.36e-04\n     6: f: 2.448490e+00 d: 3.91e-01 g: 1.29e+01 h: 3.04e-01 s: 1.00e+00 e:  1 it: 4.05e-06 tt: 3.58e-04\n     7: f: 1.943019e+00 d: 5.05e-01 g: 4.00e+00 h: 8.81e-02 s: 7.43e-01 e:  1 it: 4.05e-06 tt: 3.79e-04\n     8: f: 1.731469e+00 d: 2.12e-01 g: 7.36e+00 h: 1.71e-01 s: 4.60e-01 e:  2 it: 9.06e-06 tt: 4.06e-04\n     9: f: 1.503267e+00 d: 2.28e-01 g: 6.47e+00 h: 8.66e-02 s: 1.00e+00 e:  1 it: 3.81e-06 tt: 4.33e-04\n    10: f: 1.228331e+00 d: 2.75e-01 g: 2.00e+00 h: 7.70e-02 s: 7.90e-01 e:  1 it: 3.81e-06 tt: 4.54e-04\n    11: f: 1.016523e+00 d: 2.12e-01 g: 5.15e+00 h: 1.39e-01 s: 3.76e-01 e:  2 it: 1.00e-05 tt: 4.82e-04\n    12: f: 9.145773e-01 d: 1.02e-01 g: 6.74e+00 h: 7.98e-02 s: 1.00e+00 e:  1 it: 3.10e-06 tt: 5.03e-04\n    13: f: 7.508302e-01 d: 1.64e-01 g: 3.88e+00 h: 5.76e-02 s: 4.93e-01 e:  1 it: 2.86e-06 tt: 5.25e-04\n    14: f: 5.832378e-01 d: 1.68e-01 g: 5.56e+00 h: 1.42e-01 s: 1.00e+00 e:  1 it: 3.81e-06 tt: 5.47e-04\n    15: f: 3.969581e-01 d: 1.86e-01 g: 1.64e+00 h: 1.17e-01 s: 1.00e+00 e:  1 it: 4.05e-06 tt: 5.68e-04\n    16: f: 3.171557e-01 d: 7.98e-02 g: 3.84e+00 h: 1.18e-01 s: 3.97e-01 e:  2 it: 9.06e-06 tt: 5.94e-04\n    17: f: 2.641257e-01 d: 5.30e-02 g: 3.27e+00 h: 6.14e-02 s: 1.00e+00 e:  1 it: 3.10e-06 tt: 6.16e-04\n    18: f: 1.909730e-01 d: 7.32e-02 g: 5.29e-01 h: 8.55e-02 s: 6.82e-01 e:  1 it: 4.05e-06 tt: 6.42e-04\n    19: f: 1.472012e-01 d: 4.38e-02 g: 3.11e+00 h: 1.20e-01 s: 3.47e-01 e:  2 it: 1.00e-05 tt: 6.69e-04\n    20: f: 1.093558e-01 d: 3.78e-02 g: 2.97e+00 h: 8.43e-02 s: 1.00e+00 e:  1 it: 3.81e-06 tt: 6.91e-04\n    21: f: 6.710346e-02 d: 4.23e-02 g: 1.42e+00 h: 9.64e-02 s: 8.85e-01 e:  1 it: 3.81e-06 tt: 7.12e-04\n    22: f: 3.993377e-02 d: 2.72e-02 g: 2.30e+00 h: 1.29e-01 s: 4.63e-01 e:  2 it: 9.06e-06 tt: 7.39e-04\n    23: f: 2.911794e-02 d: 1.08e-02 g: 2.55e+00 h: 6.55e-02 s: 1.00e+00 e:  1 it: 4.05e-06 tt: 7.62e-04\n    24: f: 1.457683e-02 d: 1.45e-02 g: 2.77e-01 h: 6.37e-02 s: 6.14e-01 e:  1 it: 3.81e-06 tt: 7.84e-04\n    25: f: 8.577515e-03 d: 6.00e-03 g: 2.86e+00 h: 1.40e-01 s: 1.00e+00 e:  1 it: 4.05e-06 tt: 8.05e-04\n    26: f: 3.486574e-03 d: 5.09e-03 g: 1.76e-01 h: 1.23e-02 s: 1.00e+00 e:  1 it: 4.05e-06 tt: 8.27e-04\n    27: f: 1.257570e-03 d: 2.23e-03 g: 1.39e-01 h: 5.08e-02 s: 1.00e+00 e:  1 it: 4.05e-06 tt: 8.48e-04\n    28: f: 2.783568e-04 d: 9.79e-04 g: 6.20e-01 h: 6.47e-02 s: 1.00e+00 e:  1 it: 4.05e-06 tt: 8.69e-04\n    29: f: 2.533399e-05 d: 2.53e-04 g: 1.68e-02 h: 1.98e-03 s: 1.00e+00 e:  1 it: 3.81e-06 tt: 8.91e-04\n    30: f: 7.591572e-07 d: 2.46e-05 g: 5.40e-03 h: 9.27e-03 s: 1.00e+00 e:  1 it: 3.81e-06 tt: 9.12e-04\n    31: f: 1.902460e-09 d: 7.57e-07 g: 1.62e-03 h: 1.89e-03 s: 1.00e+00 e:  1 it: 2.86e-06 tt: 9.33e-04\n    32: f: 1.003030e-12 d: 1.90e-09 g: 3.50e-05 h: 3.52e-05 s: 1.00e+00 e:  1 it: 3.10e-06 tt: 9.54e-04\n    33: f: 4.835994e-17 d: 1.00e-12 g: 1.05e-07 h: 1.13e-06 s: 1.00e+00 e:  1 it: 4.05e-06 tt: 9.81e-04\n    34: f: 1.885250e-22 d: 4.84e-17 g: 2.69e-10 h: 1.45e-08 s: 1.00e+00 e:  1 it: 4.05e-06 tt: 1.00e-03\n\n  Solver Summary (v 1.12.0-lapack-suitesparse-cxsparse-no_openmp)\n\n  Parameters                                  2\n  Line search direction              LBFGS (20)\n  Line search type                  CUBIC WOLFE\n\n\n  Cost:\n  Initial                          2.420000e+01\n  Final                            1.885250e-22\n  Change                           2.420000e+01\n\n  Minimizer iterations                       35\n\n  Time (in seconds):\n\n    Cost evaluation                       0.000\n    Gradient evaluation                   0.000\n  Total                                   0.003\n\n  Termination:                      CONVERGENCE (Gradient tolerance reached. Gradient max norm: 9.032775e-13 <= 1.000000e-10)\n\n.. rubric:: Footnotes\n\n.. [#f1] `examples/rosenbrock.cc\n   <https://ceres-solver.googlesource.com/ceres-solver/+/master/examples/rosenbrock.cc>`_\n"
  },
  {
    "path": "3rdparty/ceres/docs/source/index.rst",
    "content": "============\nCeres Solver\n============\n\nCeres Solver [#f1]_ is an open source C++ library for modeling and\nsolving large, complicated optimization problems. It can be used to\nsolve `Non-linear Least Squares`_ problems with bounds constraints and\ngeneral unconstrained optimization problems. It is a mature, feature\nrich, and performant library that has been used in production at\nGoogle since 2010. For more, see :doc:`features`.\n\n`ceres-solver@googlegroups.com\n<https://groups.google.com/forum/?fromgroups#!forum/ceres-solver>`_ is\nthe place for discussions and questions about Ceres Solver. We use the\n`GitHub Issue Tracker\n<https://github.com/ceres-solver/ceres-solver/issues>`_ to manage bug\nreports and feature requests.\n\n\n.. toctree::\n   :maxdepth: 1\n   :hidden:\n\n   features\n   installation\n   tutorial\n   derivatives\n   nnls_modeling\n   nnls_solving\n   nnls_covariance\n   gradient_solver\n   faqs\n   users\n   contributing\n   version_history\n   bibliography\n   license\n\n.. _Non-linear Least Squares: http://en.wikipedia.org/wiki/Non-linear_least_squares\n\n\nCite Us\n=======\n\nIf you use Ceres Solver for a publication, please cite it as::\n\n    @misc{ceres-solver,\n      author = \"Sameer Agarwal and Keir Mierle and Others\",\n      title = \"Ceres Solver\",\n      howpublished = \"\\url{http://ceres-solver.org}\",\n    }\n\n\n.. rubric:: Footnotes\n\n.. [#f1] While there is some debate as to who invented the method of\n         Least Squares [Stigler]_, there is no questioning the fact\n         that it was `Carl Friedrich Gauss\n         <http://www-groups.dcs.st-and.ac.uk/~history/Biographies/Gauss.html>`_\n         who brought it to the attention of the world. Using just 22\n         observations of the newly discovered asteroid `Ceres\n         <http://en.wikipedia.org/wiki/Ceres_(dwarf_planet)>`_, Gauss\n         used the method of least squares to correctly predict when\n         and where the asteroid will emerge from behind the Sun\n         [TenenbaumDirector]_. We named our solver after Ceres to\n         celebrate this seminal event in the history of astronomy,\n         statistics and optimization.\n"
  },
  {
    "path": "3rdparty/ceres/docs/source/installation.rst",
    "content": ".. _chapter-installation:\n\n============\nInstallation\n============\n\nGetting the source code\n=======================\n.. _section-source:\n\nYou can start with the `latest stable release\n<http://ceres-solver.org/ceres-solver-1.14.0.tar.gz>`_ . Or if you want\nthe latest version, you can clone the git repository\n\n.. code-block:: bash\n\n       git clone https://ceres-solver.googlesource.com/ceres-solver\n\n.. _section-dependencies:\n\nDependencies\n============\n\n  .. NOTE ::\n\n    All versions of Ceres > 1.14 require a **fully C++11-compliant**\n    compiler.  In versions <= 1.14, C++11 was an optional requirement\n    controlled by the ``CXX11 [Default: OFF]`` build option.\n\nCeres relies on a number of open source libraries, some of which are\noptional. For details on customizing the build process, see\n:ref:`section-customizing` .\n\n- `Eigen <http://eigen.tuxfamily.org/index.php?title=Main_Page>`_\n  3.3 or later **required**.\n\n  .. NOTE ::\n\n    Ceres can also use Eigen as a sparse linear algebra\n    library. Please see the documentation for ``EIGENSPARSE`` for\n    more details.\n\n- `CMake <http://www.cmake.org>`_ 3.5 or later.\n  **Required on all platforms except for legacy Android.**\n\n- `glog <https://github.com/google/glog>`_ 0.3.1 or\n  later. **Recommended**\n\n  ``glog`` is used extensively throughout Ceres for logging detailed\n  information about memory allocations and time consumed in various\n  parts of the solve, internal error conditions etc. The Ceres\n  developers use it extensively to observe and analyze Ceres's\n  performance. `glog <https://github.com/google/glog>`_ allows you to\n  control its behaviour from the command line. Starting with\n  ``-logtostderr`` you can add ``-v=N`` for increasing values of ``N``\n  to get more and more verbose and detailed information about Ceres\n  internals.\n\n  Ceres also ships with a minimal replacement of ``glog`` called\n  ``miniglog`` that can be enabled with the ``MINIGLOG`` build option.\n  ``miniglog`` is supplied for platforms which do not support the full\n  version of ``glog``.\n\n  In an attempt to reduce dependencies, it may be tempting to use\n  ``miniglog`` on platforms which already support ``glog``. While\n  there is nothing preventing the user from doing so, we strongly\n  recommend against it. ``miniglog`` has worse performance than\n  ``glog`` and is much harder to control and use.\n\n  .. NOTE ::\n\n     If you are compiling ``glog`` from source, please note that\n     currently, the unit tests for ``glog`` (which are enabled by\n     default) do not compile against a default build of ``gflags`` 2.1\n     as the gflags namespace changed from ``google::`` to\n     ``gflags::``.  A patch to fix this is available from `here\n     <https://code.google.com/p/google-glog/issues/detail?id=194>`_.\n\n- `gflags <https://github.com/gflags/gflags>`_. Needed to build\n  examples and tests.\n\n- `SuiteSparse\n  <http://faculty.cse.tamu.edu/davis/suitesparse.html>`_. Needed for\n  solving large sparse linear systems. **Optional; strongly recomended\n  for large scale bundle adjustment**\n\n- `CXSparse <http://faculty.cse.tamu.edu/davis/suitesparse.html>`_.\n  Similar to ``SuiteSparse`` but simpler and slower. CXSparse has\n  no dependencies on ``LAPACK`` and ``BLAS``. This makes for a simpler\n  build process and a smaller binary. **Optional**\n\n- `Apple's Accelerate sparse solvers <https://developer.apple.com/documentation/accelerate/sparse_solvers>`_.\n  As of Xcode 9.0, Apple's Accelerate framework includes support for\n  solving sparse linear systems across macOS, iOS et al. **Optional**\n\n- `BLAS <http://www.netlib.org/blas/>`_ and `LAPACK\n  <http://www.netlib.org/lapack/>`_ routines are needed by\n  ``SuiteSparse``, and optionally used by Ceres directly for some\n  operations.\n\n  On ``UNIX`` OSes other than Mac OS X we recommend `ATLAS\n  <http://math-atlas.sourceforge.net/>`_, which includes ``BLAS`` and\n  ``LAPACK`` routines. It is also possible to use `OpenBLAS\n  <https://github.com/xianyi/OpenBLAS>`_ . However, one needs to be\n  careful to `turn off the threading\n  <https://github.com/xianyi/OpenBLAS/wiki/faq#wiki-multi-threaded>`_\n  inside ``OpenBLAS`` as it conflicts with use of threads in Ceres.\n\n  Mac OS X ships with an optimized ``LAPACK`` and ``BLAS``\n  implementation as part of the ``Accelerate`` framework. The Ceres\n  build system will automatically detect and use it.\n\n  For Windows things are much more complicated. `LAPACK For\n  Windows <http://icl.cs.utk.edu/lapack-for-windows/lapack/>`_\n  has detailed instructions..\n\n  **Optional but required for** ``SuiteSparse``.\n\n.. _section-linux:\n\nLinux\n=====\n\nWe will use `Ubuntu <http://www.ubuntu.com>`_ as our example linux\ndistribution.\n\n.. NOTE::\n\n Up to at least Ubuntu 14.04, the SuiteSparse package in the official\n package repository (built from SuiteSparse v3.4.0) **cannot** be used\n to build Ceres as a *shared* library.  Thus if you want to build\n Ceres as a shared library using SuiteSparse, you must perform a\n source install of SuiteSparse or use an external PPA (see `bug report\n here\n <https://bugs.launchpad.net/ubuntu/+source/suitesparse/+bug/1333214>`_).\n It is recommended that you use the current version of SuiteSparse\n (4.2.1 at the time of writing).\n\n\nStart by installing all the dependencies.\n\n.. code-block:: bash\n\n     # CMake\n     sudo apt-get install cmake\n     # google-glog + gflags\n     sudo apt-get install libgoogle-glog-dev\n     # BLAS & LAPACK\n     sudo apt-get install libatlas-base-dev\n     # Eigen3\n     sudo apt-get install libeigen3-dev\n     # SuiteSparse and CXSparse (optional)\n     # - If you want to build Ceres as a *static* library (the default)\n     #   you can use the SuiteSparse package in the main Ubuntu package\n     #   repository:\n     sudo apt-get install libsuitesparse-dev\n     # - However, if you want to build Ceres as a *shared* library, you must\n     #   add the following PPA:\n     sudo add-apt-repository ppa:bzindovic/suitesparse-bugfix-1319687\n     sudo apt-get update\n     sudo apt-get install libsuitesparse-dev\n\nWe are now ready to build, test, and install Ceres.\n\n.. code-block:: bash\n\n tar zxf ceres-solver-1.14.0.tar.gz\n mkdir ceres-bin\n cd ceres-bin\n cmake ../ceres-solver-1.14.0\n make -j3\n make test\n # Optionally install Ceres, it can also be exported using CMake which\n # allows Ceres to be used without requiring installation, see the documentation\n # for the EXPORT_BUILD_DIR option for more information.\n make install\n\nYou can also try running the command line bundling application with one of the\nincluded problems, which comes from the University of Washington's BAL\ndataset [Agarwal]_.\n\n.. code-block:: bash\n\n bin/simple_bundle_adjuster ../ceres-solver-1.14.0/data/problem-16-22106-pre.txt\n\nThis runs Ceres for a maximum of 10 iterations using the\n``DENSE_SCHUR`` linear solver. The output should look something like\nthis.\n\n.. code-block:: bash\n\n    iter      cost      cost_change  |gradient|   |step|    tr_ratio  tr_radius  ls_iter  iter_time  total_time\n       0  4.185660e+06    0.00e+00    1.09e+08   0.00e+00   0.00e+00  1.00e+04       0    7.59e-02    3.37e-01\n       1  1.062590e+05    4.08e+06    8.99e+06   5.36e+02   9.82e-01  3.00e+04       1    1.65e-01    5.03e-01\n       2  4.992817e+04    5.63e+04    8.32e+06   3.19e+02   6.52e-01  3.09e+04       1    1.45e-01    6.48e-01\n       3  1.899774e+04    3.09e+04    1.60e+06   1.24e+02   9.77e-01  9.26e+04       1    1.43e-01    7.92e-01\n       4  1.808729e+04    9.10e+02    3.97e+05   6.39e+01   9.51e-01  2.78e+05       1    1.45e-01    9.36e-01\n       5  1.803399e+04    5.33e+01    1.48e+04   1.23e+01   9.99e-01  8.33e+05       1    1.45e-01    1.08e+00\n       6  1.803390e+04    9.02e-02    6.35e+01   8.00e-01   1.00e+00  2.50e+06       1    1.50e-01    1.23e+00\n\n    Ceres Solver v1.14.0 Solve Report\n    ----------------------------------\n                                         Original                  Reduced\n    Parameter blocks                        22122                    22122\n    Parameters                              66462                    66462\n    Residual blocks                         83718                    83718\n    Residual                               167436                   167436\n\n    Minimizer                        TRUST_REGION\n\n    Dense linear algebra library            EIGEN\n    Trust region strategy     LEVENBERG_MARQUARDT\n\n                                            Given                     Used\n    Linear solver                     DENSE_SCHUR              DENSE_SCHUR\n    Threads                                     1                        1\n    Linear solver threads                       1                        1\n    Linear solver ordering              AUTOMATIC                22106, 16\n\n    Cost:\n    Initial                          4.185660e+06\n    Final                            1.803390e+04\n    Change                           4.167626e+06\n\n    Minimizer iterations                        6\n    Successful steps                            6\n    Unsuccessful steps                          0\n\n    Time (in seconds):\n    Preprocessor                            0.261\n\n      Residual evaluation                   0.082\n      Jacobian evaluation                   0.412\n      Linear solver                         0.442\n    Minimizer                               1.051\n\n    Postprocessor                           0.002\n    Total                                   1.357\n\n    Termination:                      CONVERGENCE (Function tolerance reached. |cost_change|/cost: 1.769766e-09 <= 1.000000e-06)\n\n.. section-osx:\n\nMac OS X\n========\n.. NOTE::\n\n Ceres will not compile using Xcode 4.5.x (Clang version 4.1) due to a\n bug in that version of Clang.  If you are running Xcode 4.5.x, please\n update to Xcode >= 4.6.x before attempting to build Ceres.\n\n\nOn OS X, you can either use `MacPorts <https://www.macports.org/>`_ or\n`Homebrew <http://mxcl.github.com/homebrew/>`_ to install Ceres Solver.\n\nIf using `MacPorts <https://www.macports.org/>`_, then\n\n.. code-block:: bash\n\n   sudo port install ceres-solver\n\nwill install the latest version.\n\nIf using `Homebrew <http://mxcl.github.com/homebrew/>`_ and assuming\nthat you have the ``homebrew/science`` [#f1]_ tap enabled, then\n\n.. code-block:: bash\n\n      brew install ceres-solver\n\nwill install the latest stable version along with all the required\ndependencies and\n\n.. code-block:: bash\n\n      brew install ceres-solver --HEAD\n\nwill install the latest version in the git repo.\n\nYou can also install each of the dependencies by hand using `Homebrew\n<http://mxcl.github.com/homebrew/>`_. There is no need to install\n``BLAS`` or ``LAPACK`` separately as OS X ships with optimized\n``BLAS`` and ``LAPACK`` routines as part of the `vecLib\n<https://developer.apple.com/library/mac/#documentation/Performance/Conceptual/vecLib/Reference/reference.html>`_\nframework.\n\n.. code-block:: bash\n\n      # CMake\n      brew install cmake\n      # google-glog and gflags\n      brew install glog\n      # Eigen3\n      brew install eigen\n      # SuiteSparse and CXSparse\n      brew install suite-sparse\n\nWe are now ready to build, test, and install Ceres.\n\n.. code-block:: bash\n\n   tar zxf ceres-solver-1.14.0.tar.gz\n   mkdir ceres-bin\n   cd ceres-bin\n   cmake ../ceres-solver-1.14.0\n   make -j3\n   make test\n   # Optionally install Ceres, it can also be exported using CMake which\n   # allows Ceres to be used without requiring installation, see the\n   # documentation for the EXPORT_BUILD_DIR option for more information.\n   make install\n\nBuilding with OpenMP on OS X\n----------------------------\n\nUp to at least Xcode 8, OpenMP support was disabled in Apple's version of\nClang.  However, you can install the latest version of the LLVM toolchain\nfrom Homebrew which does support OpenMP, and thus build Ceres with OpenMP\nsupport on OS X.  To do this, you must install llvm via Homebrew:\n\n.. code-block:: bash\n\n      # Install latest version of LLVM toolchain.\n      brew install llvm\n\nAs the LLVM formula in Homebrew is keg-only, it will not be installed to\n``/usr/local`` to avoid conflicts with the standard Apple LLVM toolchain.\nTo build Ceres with the Homebrew LLVM toolchain you should do the\nfollowing:\n\n.. code-block:: bash\n\n   tar zxf ceres-solver-1.14.0.tar.gz\n   mkdir ceres-bin\n   cd ceres-bin\n   # Configure the local shell only (not persistent) to use the Homebrew LLVM\n   # toolchain in favour of the default Apple version.  This is taken\n   # verbatim from the instructions output by Homebrew when installing the\n   # llvm formula.\n   export LDFLAGS=\"-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib\"\n   export CPPFLAGS=\"-I/usr/local/opt/llvm/include\"\n   export PATH=\"/usr/local/opt/llvm/bin:$PATH\"\n   # Force CMake to use the Homebrew version of Clang.  OpenMP will be\n   # automatically enabled if it is detected that the compiler supports it.\n   cmake -DCMAKE_C_COMPILER=/usr/local/opt/llvm/bin/clang -DCMAKE_CXX_COMPILER=/usr/local/opt/llvm/bin/clang++ ../ceres-solver-1.14.0\n   make -j3\n   make test\n   # Optionally install Ceres.  It can also be exported using CMake which\n   # allows Ceres to be used without requiring installation.  See the\n   # documentation for the EXPORT_BUILD_DIR option for more information.\n   make install\n\nLike the Linux build, you should now be able to run\n``bin/simple_bundle_adjuster``.\n\n\n.. rubric:: Footnotes\n\n.. [#f1] Ceres and many of its dependencies are in `homebrew/science\n   <https://github.com/Homebrew/homebrew-science>`_ tap. So, if you\n   don't have this tap enabled, then you will need to enable it as\n   follows before executing any of the commands in this section.\n\n   .. code-block:: bash\n\n      brew tap homebrew/science\n\n\n.. _section-windows:\n\nWindows\n=======\n\n.. NOTE::\n\n  If you find the following CMake difficult to set up, then you may\n  be interested in a `Microsoft Visual Studio wrapper\n  <https://github.com/tbennun/ceres-windows>`_ for Ceres Solver by Tal\n  Ben-Nun.\n\nOn Windows, we support building with Visual Studio 2013 Release 4 or newer. Note\nthat the Windows port is less featureful and less tested than the\nLinux or Mac OS X versions due to the lack of an officially supported\nway of building SuiteSparse and CXSparse.  There are however a number\nof unofficial ways of building these libraries. Building on Windows\nalso a bit more involved since there is no automated way to install\ndependencies.\n\n.. NOTE:: Using ``google-glog`` & ``miniglog`` with windows.h.\n\n The windows.h header if used with GDI (Graphics Device Interface)\n defines ``ERROR``, which conflicts with the definition of ``ERROR``\n as a LogSeverity level in ``google-glog`` and ``miniglog``.  There\n are at least two possible fixes to this problem:\n\n #. Use ``google-glog`` and define ``GLOG_NO_ABBREVIATED_SEVERITIES``\n    when building Ceres and your own project, as documented `here\n    <http://google-glog.googlecode.com/svn/trunk/doc/glog.html>`__.\n    Note that this fix will not work for ``miniglog``, but use of\n    ``miniglog`` is strongly discouraged on any platform for which\n    ``google-glog`` is available (which includes Windows).\n #. If you do not require GDI, then define ``NOGDI`` **before**\n    including windows.h.  This solution should work for both\n    ``google-glog`` and ``miniglog`` and is documented for\n    ``google-glog`` `here\n    <https://code.google.com/p/google-glog/issues/detail?id=33>`__.\n\n#. Make a toplevel directory for deps & build & src somewhere: ``ceres/``\n#. Get dependencies; unpack them as subdirectories in ``ceres/``\n   (``ceres/eigen``, ``ceres/glog``, etc)\n\n   #. ``Eigen`` 3.3 . There is no need to build anything; just unpack\n      the source tarball.\n\n   #. ``google-glog`` Open up the Visual Studio solution and build it.\n   #. ``gflags`` Open up the Visual Studio solution and build it.\n\n   #. (Experimental) ``SuiteSparse`` Previously SuiteSparse was not\n      available on Windows, recently it has become possible to build\n      it on Windows using the `suitesparse-metis-for-windows\n      <https://github.com/jlblancoc/suitesparse-metis-for-windows>`_\n      project.  If you wish to use ``SuiteSparse``, follow their\n      instructions for obtaining and building it.\n\n   #. (Experimental) ``CXSparse`` Previously CXSparse was not\n      available on Windows, there are now several ports that enable it\n      to be, including: `[1] <https://github.com/PetterS/CXSparse>`_\n      and `[2] <https://github.com/TheFrenchLeaf/CXSparse>`_.  If you\n      wish to use ``CXSparse``, follow their instructions for\n      obtaining and building it.\n\n#. Unpack the Ceres tarball into ``ceres``. For the tarball, you\n   should get a directory inside ``ceres`` similar to\n   ``ceres-solver-1.14.0``. Alternately, checkout Ceres via ``git`` to\n   get ``ceres-solver.git`` inside ``ceres``.\n\n#. Install ``CMake``,\n\n#. Make a dir ``ceres/ceres-bin`` (for an out-of-tree build)\n\n#. Run ``CMake``; select the ``ceres-solver-X.Y.Z`` or\n   ``ceres-solver.git`` directory for the CMake file. Then select the\n   ``ceres-bin`` for the build dir.\n\n#. Try running ``Configure``. It won't work. It'll show a bunch of options.\n   You'll need to set:\n\n   #. ``EIGEN_INCLUDE_DIR_HINTS``\n   #. ``GLOG_INCLUDE_DIR_HINTS``\n   #. ``GLOG_LIBRARY_DIR_HINTS``\n   #. ``GFLAGS_INCLUDE_DIR_HINTS``\n   #. ``GFLAGS_LIBRARY_DIR_HINTS``\n   #. (Optional) ``SUITESPARSE_INCLUDE_DIR_HINTS``\n   #. (Optional) ``SUITESPARSE_LIBRARY_DIR_HINTS``\n   #. (Optional) ``CXSPARSE_INCLUDE_DIR_HINTS``\n   #. (Optional) ``CXSPARSE_LIBRARY_DIR_HINTS``\n\n   to the appropriate directories where you unpacked/built them. If\n   any of the variables are not visible in the ``CMake`` GUI, create a\n   new entry for them.  We recommend using the\n   ``<NAME>_(INCLUDE/LIBRARY)_DIR_HINTS`` variables rather than\n   setting the ``<NAME>_INCLUDE_DIR`` & ``<NAME>_LIBRARY`` variables\n   directly to keep all of the validity checking, and to avoid having\n   to specify the library files manually.\n\n#. You may have to tweak some more settings to generate a MSVC\n   project.  After each adjustment, try pressing Configure & Generate\n   until it generates successfully.\n\n#. Open the solution and build it in MSVC\n\n\nTo run the tests, select the ``RUN_TESTS`` target and hit **Build\nRUN_TESTS** from the build menu.\n\nLike the Linux build, you should now be able to run\n``bin/simple_bundle_adjuster``.\n\nNotes:\n\n#. The default build is Debug; consider switching it to release mode.\n#. Currently ``system_test`` is not working properly.\n#. CMake puts the resulting test binaries in ``ceres-bin/examples/Debug``\n   by default.\n#. The solvers supported on Windows are ``DENSE_QR``, ``DENSE_SCHUR``,\n   ``CGNR``, and ``ITERATIVE_SCHUR``.\n#. We're looking for someone to work with upstream ``SuiteSparse`` to\n   port their build system to something sane like ``CMake``, and get a\n   fully supported Windows port.\n\n\n.. _section-android:\n\nAndroid\n=======\n\n.. NOTE::\n\n    You will need Android NDK r15 or higher to build Ceres solver.\n\nTo build Ceres for Android, we need to force ``CMake`` to find\nthe toolchains from the Android NDK instead of using the standard\nones. For example, assuming you have specified ``$NDK_DIR``:\n\n.. code-block:: bash\n\n    cmake \\\n    -DCMAKE_TOOLCHAIN_FILE=\\\n        $NDK_DIR/build/cmake/android.toolchain.cmake \\\n    -DEIGEN_INCLUDE_DIR=/path/to/eigen/header \\\n    -DANDROID_ABI=armeabi-v7a \\\n    -DANDROID_STL=c++_shared \\\n    -DANDROID_NATIVE_API_LEVEL=android-24 \\\n    -DBUILD_SHARED_LIBS=ON \\\n    -DMINIGLOG=ON \\\n    <PATH_TO_CERES_SOURCE>\n\nYou can build for any Android STL or ABI, but the c++_shared STL\nand the armeabi-v7a or arm64-v8a ABI are recommended for 32bit\nand 64bit architectures, respectively. Several API levels may\nbe supported, but it is recommended that you use the highest\nlevel that is suitable for your Android project.\n\n.. NOTE::\n\n    You must always use the same API level and STL library for\n    your Android project and the Ceres binaries.\n\nAfter building, you get a ``libceres.so`` library, which you can\nlink in your Android build system by using a\n``PREBUILT_SHARED_LIBRARY`` target in your build script.\n\nIf you are building any Ceres samples and would like to verify\nyour library, you will need to place them in an executable public\ndirectory together with ``libceres.so`` on your Android device\n(e.g. in /data/local/tmp) and ensure that the STL library from\nyour NDK is present in that same directory. You may then execute\nthe sample by running for example:\n\n.. code-block:: bash\n    adb shell\n    cd /data/local/tmp\n    LD_LIBRARY_PATH=/data/local/tmp ./helloworld\n\nNote that any solvers or other shared dependencies you include in\nyour project must also be present in your android build config and\nyour test directory on Android.\n\n.. _section-ios:\n\niOS\n===\n\n.. NOTE::\n\n   You need iOS version 7.0 or higher to build Ceres Solver.\n\nTo build Ceres for iOS, we need to force ``CMake`` to find the\ntoolchains from the iOS SDK instead of using the standard ones. For\nexample:\n\n.. code-block:: bash\n\n   cmake \\\n   -DCMAKE_TOOLCHAIN_FILE=../ceres-solver/cmake/iOS.cmake \\\n   -DEIGEN_INCLUDE_DIR=/path/to/eigen/header \\\n   -DIOS_PLATFORM=<PLATFORM> \\\n   <PATH_TO_CERES_SOURCE>\n\n``PLATFORM`` can be: ``OS``, ``SIMULATOR`` or ``SIMULATOR64``. You can\nbuild for ``OS`` (``armv7``, ``armv7s``, ``arm64``), ``SIMULATOR``\n(``i386``) or ``SIMULATOR64`` (``x86_64``) separately and use ``lipo``\nto merge them into one static library.  See ``cmake/iOS.cmake`` for\nmore options.\n\n.. NOTE::\n\n   iOS version 11.0+ requires a 64-bit architecture, so you cannot\n   build for armv7/armv7s with iOS 11.0+ (only arm64 is supported).\n\nAfter building, you will get a ``libceres.a`` library, which you will\nneed to add to your Xcode project.\n\nThe default CMake configuration builds a bare bones version of Ceres\nSolver that only depends on Eigen (``MINIGLOG`` is compiled into Ceres\nif it is used), this should be sufficient for solving small to\nmoderate sized problems (No ``SPARSE_SCHUR``,\n``SPARSE_NORMAL_CHOLESKY`` linear solvers and no ``CLUSTER_JACOBI``\nand ``CLUSTER_TRIDIAGONAL`` preconditioners).\n\nIf you decide to use ``LAPACK`` and ``BLAS``, then you also need to\nadd ``Accelerate.framework`` to your Xcode project's linking\ndependency.\n\n.. _section-customizing:\n\nCustomizing the build\n=====================\n\nIt is possible to reduce the libraries needed to build Ceres and\ncustomize the build process by setting the appropriate options in\n``CMake``.  These options can either be set in the ``CMake`` GUI, or\nvia ``-D<OPTION>=<ON/OFF>`` when running ``CMake`` from the command\nline.  In general, you should only modify these options from their\ndefaults if you know what you are doing.\n\n.. NOTE::\n\n If you are setting variables via ``-D<VARIABLE>=<VALUE>`` when\n calling ``CMake``, it is important to understand that this forcibly\n **overwrites** the variable ``<VARIABLE>`` in the ``CMake`` cache at\n the start of *every configure*.\n\n This can lead to confusion if you are invoking the ``CMake`` `curses\n <http://www.gnu.org/software/ncurses/ncurses.html>`_ terminal GUI\n (via ``ccmake``, e.g. ```ccmake -D<VARIABLE>=<VALUE>\n <PATH_TO_SRC>``).  In this case, even if you change the value of\n ``<VARIABLE>`` in the ``CMake`` GUI, your changes will be\n **overwritten** with the value passed via ``-D<VARIABLE>=<VALUE>``\n (if one exists) at the start of each configure.\n\n As such, it is generally easier not to pass values to ``CMake`` via\n ``-D`` and instead interactively experiment with their values in the\n ``CMake`` GUI.  If they are not present in the *Standard View*,\n toggle to the *Advanced View* with ``<t>``.\n\n\nModifying default compilation flags\n-----------------------------------\n\nThe ``CMAKE_CXX_FLAGS`` variable can be used to define additional\ndefault compilation flags for all build types.  Any flags specified\nin ``CMAKE_CXX_FLAGS`` will be used in addition to the default\nflags used by Ceres for the current build type.\n\nFor example, if you wished to build Ceres with `-march=native\n<https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html>`_ which is not\nenabled by default (even if ``CMAKE_BUILD_TYPE=Release``) you would invoke\nCMake with:\n\n.. code-block:: bash\n\n       cmake -DCMAKE_CXX_FLAGS=\"-march=native\" <PATH_TO_CERES_SOURCE>\n\n.. NOTE ::\n\n    The use of ``-march=native`` will limit portability, as it will tune the\n    implementation to the specific CPU of the compiling machine (e.g. use of\n    AVX if available).  Run-time segfaults may occur if you then tried to\n    run the resulting binaries on a machine with a different processor, even\n    if it is from the same family (e.g. x86) if the specific options available\n    are different.  Note that the performance gains from the use of\n    ``-march=native`` are not guaranteed to be significant.\n\n.. _options-controlling-ceres-configuration:\n\nOptions controlling Ceres configuration\n---------------------------------------\n\n#. ``LAPACK [Default: ON]``: If this option is enabled, and the ``BLAS`` and\n   ``LAPACK`` libraries are found, Ceres will enable **direct** use of\n   ``LAPACK`` routines (i.e. Ceres itself will call them).  If this option is\n   disabled, then Ceres will not require ``LAPACK`` or ``BLAS``.  It is\n   however still possible that Ceres may call ``LAPACK`` routines indirectly\n   via SuiteSparse if ``LAPACK=OFF`` and ``SUITESPARSE=ON``.  Finally\n   note that if ``LAPACK=ON`` and ``SUITESPARSE=ON``, the ``LAPACK`` and\n   ``BLAS`` libraries used by SuiteSparse and Ceres should be the same.\n\n#. ``SUITESPARSE [Default: ON]``: By default, Ceres will link to\n   ``SuiteSparse`` if it and all of its dependencies are present. Turn\n   this ``OFF`` to build Ceres without ``SuiteSparse``.\n\n   .. NOTE::\n\n      SuiteSparse is licensed under a mixture of GPL/LGPL/Commercial\n      terms.  Ceres requires some components that are only licensed under\n      GPL/Commercial terms.\n\n#. ``CXSPARSE [Default: ON]``: By default, Ceres will link to\n   ``CXSparse`` if all its dependencies are present. Turn this ``OFF``\n   to build Ceres without ``CXSparse``.\n\n   .. NOTE::\n\n      CXSparse is licensed under the LGPL.\n\n#. ``ACCELERATESPARSE [Default: ON]``: By default, Ceres will link to\n   Apple's Accelerate framework directly if a version of it is detected\n   which supports solving sparse linear systems.  Note that on Apple OSs\n   Accelerate usually also provides the BLAS/LAPACK implementations and\n   so would be linked against irrespective of the value of ``ACCELERATESPARSE``.\n\n#. ``EIGENSPARSE [Default: ON]``: By default, Ceres will not use\n   Eigen's sparse Cholesky factorization.\n\n#. ``GFLAGS [Default: ON]``: Turn this ``OFF`` to build Ceres without\n   ``gflags``. This will also prevent some of the example code from\n   building.\n\n#. ``MINIGLOG [Default: OFF]``: Ceres includes a stripped-down,\n   minimal implementation of ``glog`` which can optionally be used as\n   a substitute for ``glog``, thus removing ``glog`` as a required\n   dependency. Turn this ``ON`` to use this minimal ``glog``\n   implementation.\n\n#. ``SCHUR_SPECIALIZATIONS [Default: ON]``: If you are concerned about\n   binary size/compilation time over some small (10-20%) performance\n   gains in the ``SPARSE_SCHUR`` solver, you can disable some of the\n   template specializations by turning this ``OFF``.\n\n#. ``CERES_THREADING_MODEL [Default: CXX11_THREADS > OPENMP > NO_THREADS]``:\n   Multi-threading backend Ceres should be compiled with.  This will\n   automatically be set to only accept the available subset of threading\n   options in the CMake GUI.\n\n#. ``BUILD_SHARED_LIBS [Default: OFF]``: By default Ceres is built as\n   a static library, turn this ``ON`` to instead build Ceres as a\n   shared library.\n\n#. ``EXPORT_BUILD_DIR [Default: OFF]``: By default Ceres is configured\n   solely for installation, and so must be installed in order for\n   clients to use it.  Turn this ``ON`` to export Ceres' build\n   directory location into the `user's local CMake package registry\n   <http://www.cmake.org/cmake/help/v3.2/manual/cmake-packages.7.html#user-package-registry>`_\n   where it will be detected **without requiring installation** in a\n   client project using CMake when `find_package(Ceres)\n   <http://www.cmake.org/cmake/help/v3.2/command/find_package.html>`_\n   is invoked.\n\n#. ``BUILD_DOCUMENTATION [Default: OFF]``: Use this to enable building\n   the documentation, requires `Sphinx <http://sphinx-doc.org/>`_ and\n   the `sphinx-better-theme\n   <https://pypi.python.org/pypi/sphinx-better-theme>`_ package\n   available from the Python package index. In addition, ``make\n   ceres_docs`` can be used to build only the documentation.\n\n#. ``MSVC_USE_STATIC_CRT [Default: OFF]`` *Windows Only*: By default\n   Ceres will use the Visual Studio default, *shared* C-Run Time (CRT)\n   library.  Turn this ``ON`` to use the *static* C-Run Time library\n   instead.\n\n#. ``LIB_SUFFIX [Default: \"64\" on non-Debian/Arch based 64-bit Linux,\n   otherwise: \"\"]``: The suffix to append to the library install\n   directory, built from:\n   ``${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}``.\n\n   The filesystem hierarchy standard recommends that 64-bit systems\n   install native libraries to lib64 rather than lib.  Most Linux\n   distributions follow this convention, but Debian and Arch based\n   distros do not.  Note that the only generally sensible values for\n   ``LIB_SUFFIX`` are \"\" and \"64\".\n\n   Although by default Ceres will auto-detect non-Debian/Arch based\n   64-bit Linux distributions and default ``LIB_SUFFIX`` to \"64\", this\n   can always be overridden by manually specifying LIB_SUFFIX using:\n   ``-DLIB_SUFFIX=<VALUE>`` when invoking CMake.\n\n\nOptions controlling Ceres dependency locations\n----------------------------------------------\n\nCeres uses the ``CMake`` `find_package\n<http://www.cmake.org/cmake/help/v3.2/command/find_package.html>`_\nfunction to find all of its dependencies using\n``Find<DEPENDENCY_NAME>.cmake`` scripts which are either included in\nCeres (for most dependencies) or are shipped as standard with\n``CMake`` (for ``LAPACK`` & ``BLAS``).  These scripts will search all\nof the \"standard\" install locations for various OSs for each\ndependency.  However, particularly for Windows, they may fail to find\nthe library, in this case you will have to manually specify its\ninstalled location.  The ``Find<DEPENDENCY_NAME>.cmake`` scripts\nshipped with Ceres support two ways for you to do this:\n\n#. Set the *hints* variables specifying the *directories* to search in\n   preference, but in addition, to the search directories in the\n   ``Find<DEPENDENCY_NAME>.cmake`` script:\n\n   - ``<DEPENDENCY_NAME (CAPS)>_INCLUDE_DIR_HINTS``\n   - ``<DEPENDENCY_NAME (CAPS)>_LIBRARY_DIR_HINTS``\n\n   These variables should be set via ``-D<VAR>=<VALUE>``\n   ``CMake`` arguments as they are not visible in the GUI.\n\n#. Set the variables specifying the *explicit* include directory\n   and library file to use:\n\n   - ``<DEPENDENCY_NAME (CAPS)>_INCLUDE_DIR``\n   - ``<DEPENDENCY_NAME (CAPS)>_LIBRARY``\n\n   This bypasses *all* searching in the\n   ``Find<DEPENDENCY_NAME>.cmake`` script, but validation is still\n   performed.\n\n   These variables are available to set in the ``CMake`` GUI. They are\n   visible in the *Standard View* if the library has not been found\n   (but the current Ceres configuration requires it), but are always\n   visible in the *Advanced View*.  They can also be set directly via\n   ``-D<VAR>=<VALUE>`` arguments to ``CMake``.\n\nBuilding using custom BLAS & LAPACK installs\n----------------------------------------------\n\nIf the standard find package scripts for ``BLAS`` & ``LAPACK`` which\nship with ``CMake`` fail to find the desired libraries on your system,\ntry setting ``CMAKE_LIBRARY_PATH`` to the path(s) to the directories\ncontaining the ``BLAS`` & ``LAPACK`` libraries when invoking ``CMake``\nto build Ceres via ``-D<VAR>=<VALUE>``.  This should result in the\nlibraries being found for any common variant of each.\n\nAlternatively, you may also directly specify the ``BLAS_LIBRARIES`` and\n``LAPACK_LIBRARIES`` variables via ``-D<VAR>=<VALUE>`` when invoking CMake\nto configure Ceres.\n\n.. _section-using-ceres:\n\nUsing Ceres with CMake\n======================\n\nIn order to use Ceres in client code with CMake using `find_package()\n<http://www.cmake.org/cmake/help/v3.2/command/find_package.html>`_\nthen either:\n\n#. Ceres must have been installed with ``make install``.  If the\n    install location is non-standard (i.e. is not in CMake's default\n    search paths) then it will not be detected by default, see:\n    :ref:`section-local-installations`.\n\n    Note that if you are using a non-standard install location you\n    should consider exporting Ceres instead, as this will not require\n    any extra information to be provided in client code for Ceres to\n    be detected.\n\n#. Or Ceres' build directory must have been exported by enabling the\n    ``EXPORT_BUILD_DIR`` option when Ceres was configured.\n\n\nAs an example of how to use Ceres, to compile `examples/helloworld.cc\n<https://ceres-solver.googlesource.com/ceres-solver/+/master/examples/helloworld.cc>`_\nin a separate standalone project, the following CMakeList.txt can be\nused:\n\n.. code-block:: cmake\n\n    cmake_minimum_required(VERSION 3.5)\n\n    project(helloworld)\n\n    find_package(Ceres REQUIRED)\n\n    # helloworld\n    add_executable(helloworld helloworld.cc)\n    target_link_libraries(helloworld ${CERES_LIBRARIES})\n\nIrrespective of whether Ceres was installed or exported, if multiple\nversions are detected, set: ``Ceres_DIR`` to control which is used.\nIf Ceres was installed ``Ceres_DIR`` should be the path to the\ndirectory containing the installed ``CeresConfig.cmake`` file\n(e.g. ``/usr/local/share/Ceres``).  If Ceres was exported, then\n``Ceres_DIR`` should be the path to the exported Ceres build\ndirectory.\n\n  .. NOTE ::\n\n     You do not need to call include_directories(${CERES_INCLUDE_DIRS})\n     as the exported Ceres CMake target already contains the definitions\n     of its public include directories which will be automatically\n     included by CMake when compiling a target that links against Ceres.\n\nSpecify Ceres components\n-------------------------------------\n\nYou can specify particular Ceres components that you require (in order\nfor Ceres to be reported as found) when invoking\n``find_package(Ceres)``.  This allows you to specify, for example,\nthat you require a version of Ceres built with SuiteSparse support.\nBy definition, if you do not specify any components when calling\n``find_package(Ceres)`` (the default) any version of Ceres detected\nwill be reported as found, irrespective of which components it was\nbuilt with.\n\nThe Ceres components which can be specified are:\n\n#. ``LAPACK``: Ceres built using LAPACK (``LAPACK=ON``).\n\n#. ``SuiteSparse``: Ceres built with SuiteSparse (``SUITESPARSE=ON``).\n\n#. ``CXSparse``: Ceres built with CXSparse (``CXSPARSE=ON``).\n\n#. ``AccelerateSparse``: Ceres built with Apple's Accelerate sparse solvers (``ACCELERATESPARSE=ON``).\n\n#. ``EigenSparse``: Ceres built with Eigen's sparse Cholesky factorization\n   (``EIGENSPARSE=ON``).\n\n#. ``SparseLinearAlgebraLibrary``: Ceres built with *at least one* sparse linear\n   algebra library.  This is equivalent to ``SuiteSparse`` **OR** ``CXSparse``\n   **OR** ``AccelerateSparse``  **OR** ``EigenSparse``.\n\n#. ``SchurSpecializations``: Ceres built with Schur specializations\n   (``SCHUR_SPECIALIZATIONS=ON``).\n\n#. ``OpenMP``: Ceres built with OpenMP (``CERES_THREADING_MODEL=OPENMP``).\n\n#. ``Multithreading``: Ceres built with *a* multithreading library.\n   This is equivalent to (``CERES_THREAD != NO_THREADS``).\n\n#. ``C++11``: Ceres built with C++11.\n\nTo specify one/multiple Ceres components use the ``COMPONENTS`` argument to\n`find_package()\n<http://www.cmake.org/cmake/help/v3.2/command/find_package.html>`_ like so:\n\n.. code-block:: cmake\n\n    # Find a version of Ceres compiled with SuiteSparse & EigenSparse support.\n    #\n    # NOTE: This will report Ceres as **not** found if the detected version of\n    #            Ceres was not compiled with both SuiteSparse & EigenSparse.\n    #            Remember, if you have multiple versions of Ceres installed, you\n    #            can use Ceres_DIR to specify which should be used.\n    find_package(Ceres REQUIRED COMPONENTS SuiteSparse EigenSparse)\n\n\nSpecify Ceres version\n---------------------\n\nAdditionally, when CMake has found Ceres it can optionally check the package\nversion, if it has been specified in the `find_package()\n<http://www.cmake.org/cmake/help/v3.2/command/find_package.html>`_\ncall.  For example:\n\n.. code-block:: cmake\n\n    find_package(Ceres 1.2.3 REQUIRED)\n\n.. _section-local-installations:\n\nLocal installations\n-------------------\n\nIf Ceres was installed in a non-standard path by specifying\n``-DCMAKE_INSTALL_PREFIX=\"/some/where/local\"``, then the user should\nadd the **PATHS** option to the ``find_package()`` command, e.g.,\n\n.. code-block:: cmake\n\n   find_package(Ceres REQUIRED PATHS \"/some/where/local/\")\n\nNote that this can be used to have multiple versions of Ceres\ninstalled.  However, particularly if you have only a single version of\nCeres which you want to use but do not wish to install to a system\nlocation, you should consider exporting Ceres using the\n``EXPORT_BUILD_DIR`` option instead of a local install, as exported\nversions of Ceres will be automatically detected by CMake,\nirrespective of their location.\n\nUnderstanding the CMake Package System\n----------------------------------------\n\nAlthough a full tutorial on CMake is outside the scope of this guide,\nhere we cover some of the most common CMake misunderstandings that\ncrop up when using Ceres.  For more detailed CMake usage, the\nfollowing references are very useful:\n\n- The `official CMake tutorial <http://www.cmake.org/cmake-tutorial/>`_\n\n   Provides a tour of the core features of CMake.\n\n- `ProjectConfig tutorial\n  <http://www.cmake.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_file>`_\n  and the `cmake-packages documentation\n  <http://www.cmake.org/cmake/help/git-master/manual/cmake-packages.7.html>`_\n\n   Cover how to write a ``ProjectConfig.cmake`` file, discussed below,\n   for your own project when installing or exporting it using CMake.\n   It also covers how these processes in conjunction with\n   ``find_package()`` are actually handled by CMake.  The\n   `ProjectConfig tutorial\n   <http://www.cmake.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_file>`_\n   is the older style, currently used by Ceres for compatibility with\n   older versions of CMake.\n\n  .. NOTE :: **Targets in CMake.**\n\n    All libraries and executables built using CMake are represented as\n    *targets* created using `add_library()\n    <http://www.cmake.org/cmake/help/v3.2/command/add_library.html>`_\n    and `add_executable()\n    <http://www.cmake.org/cmake/help/v3.2/command/add_executable.html>`_.\n    Targets encapsulate the rules and dependencies (which can be other\n    targets) required to build or link against an object.  This allows\n    CMake to implicitly manage dependency chains.  Thus it is\n    sufficient to tell CMake that a library target: ``B`` depends on a\n    previously declared library target ``A``, and CMake will\n    understand that this means that ``B`` also depends on all of the\n    public dependencies of ``A``.\n\nWhen a project like Ceres is installed using CMake, or its build\ndirectory is exported into the local CMake package registry (see\n:ref:`section-install-vs-export`), in addition to the public headers\nand compiled libraries, a set of CMake-specific project configuration\nfiles are also installed to: ``<INSTALL_ROOT>/share/Ceres`` (if Ceres\nis installed), or created in the build directory (if Ceres' build\ndirectory is exported).  When `find_package\n<http://www.cmake.org/cmake/help/v3.2/command/find_package.html>`_ is\ninvoked, CMake checks various standard install locations (including\n``/usr/local`` on Linux & UNIX systems), and the local CMake package\nregistry for CMake configuration files for the project to be found\n(i.e. Ceres in the case of ``find_package(Ceres)``).  Specifically it\nlooks for:\n\n- ``<PROJECT_NAME>Config.cmake`` (or\n  ``<lower_case_project_name>-config.cmake``)\n\n   Which is written by the developers of the project, and is\n   configured with the selected options and installed locations when\n   the project is built and defines the CMake variables:\n   ``<PROJECT_NAME>_INCLUDE_DIRS`` & ``<PROJECT_NAME>_LIBRARIES``\n   which are used by the caller to import the project.\n\nThe ``<PROJECT_NAME>Config.cmake`` typically includes a second file\ninstalled to the same location:\n\n- ``<PROJECT_NAME>Targets.cmake``\n\n   Which is autogenerated by CMake as part of the install process and defines\n   **imported targets** for the project in the caller's CMake scope.\n\nAn **imported target** contains the same information about a library\nas a CMake target that was declared locally in the current CMake\nproject using ``add_library()``.  However, imported targets refer to\nobjects that have already been built by a different CMake project.\nPrincipally, an imported target contains the location of the compiled\nobject and all of its public dependencies required to link against it.\nAny locally declared target can depend on an imported target, and\nCMake will manage the dependency chain, just as if the imported target\nhad been declared locally by the current project.\n\nCrucially, just like any locally declared CMake target, an imported target is\nidentified by its **name** when adding it as a dependency to another target.\n\nThus, if in a project using Ceres you had the following in your CMakeLists.txt:\n\n.. code-block:: cmake\n\n    find_package(Ceres REQUIRED)\n    message(\"CERES_LIBRARIES = ${CERES_LIBRARIES}\")\n\nYou would see the output: ``CERES_LIBRARIES = ceres``.  **However**,\nhere ``ceres`` is an **imported target** created when\n``CeresTargets.cmake`` was read as part of ``find_package(Ceres\nREQUIRED)``.  It does **not** refer (directly) to the compiled Ceres\nlibrary: ``libceres.a/so/dylib/lib``.  This distinction is important,\nas depending on the options selected when it was built, Ceres can have\npublic link dependencies which are encapsulated in the imported target\nand automatically added to the link step when Ceres is added as a\ndependency of another target by CMake.  In this case, linking only\nagainst ``libceres.a/so/dylib/lib`` without these other public\ndependencies would result in a linker error.\n\nNote that this description applies both to projects that are\n**installed** using CMake, and to those whose **build directory is\nexported** using `export()\n<http://www.cmake.org/cmake/help/v3.2/command/export.html>`_ (instead\nof `install()\n<http://www.cmake.org/cmake/help/v3.2/command/install.html>`_).  Ceres\nsupports both installation and export of its build directory if the\n``EXPORT_BUILD_DIR`` option is enabled, see\n:ref:`section-customizing`.\n\n.. _section-install-vs-export:\n\nInstalling a project with CMake vs Exporting its build directory\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nWhen a project is **installed**, the compiled libraries and headers\nare copied from the source & build directory to the install location,\nand it is these copied files that are used by any client code.  When a\nproject's build directory is **exported**, instead of copying the\ncompiled libraries and headers, CMake creates an entry for the project\nin the `user's local CMake package registry\n<http://www.cmake.org/cmake/help/v3.2/manual/cmake-packages.7.html#user-package-registry>`_,\n``<USER_HOME>/.cmake/packages`` on Linux & OS X, which contains the\npath to the project's build directory which will be checked by CMake\nduring a call to ``find_package()``.  The effect of which is that any\nclient code uses the compiled libraries and headers in the build\ndirectory directly, **thus not requiring the project to be installed\nto be used**.\n\nInstalling / Exporting a project that uses Ceres\n--------------------------------------------------\n\nAs described in `Understanding the CMake Package System`_, the contents of\nthe ``CERES_LIBRARIES`` variable is the **name** of an imported target which\nrepresents Ceres.  If you are installing / exporting your *own* project which\n*uses* Ceres, it is important to understand that:\n\n**Imported targets are not (re)exported when a project which imported them is\nexported**.\n\nThus, when a project ``Foo`` which uses Ceres is exported, its list of\ndependencies as seen by another project ``Bar`` which imports ``Foo``\nvia: ``find_package(Foo REQUIRED)`` will contain: ``ceres``.  However,\nthe definition of ``ceres`` as an imported target is **not\n(re)exported** when Foo is exported.  Hence, without any additional\nsteps, when processing ``Bar``, ``ceres`` will not be defined as an\nimported target.  Thus, when processing ``Bar``, CMake will assume\nthat ``ceres`` refers only to: ``libceres.a/so/dylib/lib`` (the\ncompiled Ceres library) directly if it is on the current list of\nsearch paths.  In which case, no CMake errors will occur, but ``Bar``\nwill not link properly, as it does not have the required public link\ndependencies of Ceres, which are stored in the imported target\ndefinition.\n\nThe solution to this is for ``Foo`` (i.e., the project that uses\nCeres) to invoke ``find_package(Ceres)`` in ``FooConfig.cmake``, thus\n``ceres`` will be defined as an imported target when CMake processes\n``Bar``.  An example of the required modifications to\n``FooConfig.cmake`` are show below:\n\n.. code-block:: cmake\n\n    # Importing Ceres in FooConfig.cmake using CMake 2.8.x style.\n    #\n    # When configure_file() is used to generate FooConfig.cmake from\n    # FooConfig.cmake.in, @Ceres_DIR@ will be replaced with the current\n    # value of Ceres_DIR being used by Foo.  This should be passed as a hint\n    # when invoking find_package(Ceres) to ensure that the same install of\n    # Ceres is used as was used to build Foo.\n    set(CERES_DIR_HINTS @Ceres_DIR@)\n\n    # Forward the QUIET / REQUIRED options.\n    if (Foo_FIND_QUIETLY)\n       find_package(Ceres QUIET HINTS ${CERES_DIR_HINTS})\n    elseif (Foo_FIND_REQUIRED)\n       find_package(Ceres REQUIRED HINTS ${CERES_DIR_HINTS})\n    else ()\n       find_package(Ceres HINTS ${CERES_DIR_HINTS})\n    endif()\n\n.. code-block:: cmake\n\n    # Importing Ceres in FooConfig.cmake using CMake 3.x style.\n    #\n    # In CMake v3.x, the find_dependency() macro exists to forward the REQUIRED\n    # / QUIET parameters to find_package() when searching for dependencies.\n    #\n    # Note that find_dependency() does not take a path hint, so if Ceres was\n    # installed in a non-standard location, that location must be added to\n    # CMake's search list before this call.\n    include(CMakeFindDependencyMacro)\n    find_dependency(Ceres)\n"
  },
  {
    "path": "3rdparty/ceres/docs/source/interfacing_with_autodiff.rst",
    "content": ".. default-domain:: cpp\n\n.. cpp:namespace:: ceres\n\n.. _chapter-interfacing_with_automatic_differentiation:\n\nInterfacing with Automatic Differentiation\n==========================================\n\nAutomatic differentiation is straightforward to use in cases where an\nexplicit expression for the cost function is available. But this is\nnot always possible. Often one has to interface with external routines\nor data. In this chapter we will consider a number of different ways\nof doing so.\n\nTo do this, we will consider the problem of finding parameters\n:math:`\\theta` and :math:`t` that solve an optimization problem of the\nform:\n\n.. math::\n   \\min & \\quad \\sum_i \\left \\|y_i - f\\left (\\|q_{i}\\|^2\\right) q_i\n   \\right \\|^2\\\\\n   \\text{such that} & \\quad q_i = R(\\theta) x_i + t\n\nHere, :math:`R` is a two dimensional rotation matrix parameterized\nusing the angle :math:`\\theta` and :math:`t` is a two dimensional\nvector. :math:`f` is an external distortion function.\n\nWe begin by considering the case, where we have a templated function\n:code:`TemplatedComputeDistortion` that can compute the function\n:math:`f`. Then the implementation of the corresponding residual\nfunctor is straightforward and will look as follows:\n\n.. code-block:: c++\n   :emphasize-lines: 21\n\n   template <typename T> T TemplatedComputeDistortion(const T r2) {\n     const double k1 = 0.0082;\n     const double k2 = 0.000023;\n     return 1.0 + k1 * y2 + k2 * r2 * r2;\n   }\n\n   struct Affine2DWithDistortion {\n     Affine2DWithDistortion(const double x_in[2], const double y_in[2]) {\n       x[0] = x_in[0];\n       x[1] = x_in[1];\n       y[0] = y_in[0];\n       y[1] = y_in[1];\n     }\n\n     template <typename T>\n     bool operator()(const T* theta,\n                     const T* t,\n                     T* residuals) const {\n       const T q_0 =  cos(theta[0]) * x[0] - sin(theta[0]) * x[1] + t[0];\n       const T q_1 =  sin(theta[0]) * x[0] + cos(theta[0]) * x[1] + t[1];\n       const T f = TemplatedComputeDistortion(q_0 * q_0 + q_1 * q_1);\n       residuals[0] = y[0] - f * q_0;\n       residuals[1] = y[1] - f * q_1;\n       return true;\n     }\n\n     double x[2];\n     double y[2];\n   };\n\nSo far so good, but let us now consider three ways of defining\n:math:`f` which are not directly amenable to being used with automatic\ndifferentiation:\n\n#. A non-templated function that evaluates its value.\n#. A function that evaluates its value and derivative.\n#. A function that is defined as a table of values to be interpolated.\n\nWe will consider them in turn below.\n\nA function that returns its value\n----------------------------------\n\nSuppose we were given a function :code:`ComputeDistortionValue` with\nthe following signature\n\n.. code-block:: c++\n\n   double ComputeDistortionValue(double r2);\n\nthat computes the value of :math:`f`. The actual implementation of the\nfunction does not matter. Interfacing this function with\n:code:`Affine2DWithDistortion` is a three step process:\n\n1. Wrap :code:`ComputeDistortionValue` into a functor\n   :code:`ComputeDistortionValueFunctor`.\n2. Numerically differentiate :code:`ComputeDistortionValueFunctor`\n   using :class:`NumericDiffCostFunction` to create a\n   :class:`CostFunction`.\n3. Wrap the resulting :class:`CostFunction` object using\n   :class:`CostFunctionToFunctor`. The resulting object is a functor\n   with a templated :code:`operator()` method, which pipes the\n   Jacobian computed by :class:`NumericDiffCostFunction` into the\n   appropriate :code:`Jet` objects.\n\nAn implementation of the above three steps looks as follows:\n\n.. code-block:: c++\n   :emphasize-lines: 15,16,17,18,19,20, 29\n\n   struct ComputeDistortionValueFunctor {\n     bool operator()(const double* r2, double* value) const {\n       *value = ComputeDistortionValue(r2[0]);\n       return true;\n     }\n   };\n\n   struct Affine2DWithDistortion {\n     Affine2DWithDistortion(const double x_in[2], const double y_in[2]) {\n       x[0] = x_in[0];\n       x[1] = x_in[1];\n       y[0] = y_in[0];\n       y[1] = y_in[1];\n\n       compute_distortion.reset(new ceres::CostFunctionToFunctor<1, 1>(\n            new ceres::NumericDiffCostFunction<ComputeDistortionValueFunctor,\n                                               ceres::CENTRAL,\n                                               1,\n                                               1>(\n               new ComputeDistortionValueFunctor)));\n     }\n\n     template <typename T>\n     bool operator()(const T* theta, const T* t, T* residuals) const {\n       const T q_0 = cos(theta[0]) * x[0] - sin(theta[0]) * x[1] + t[0];\n       const T q_1 = sin(theta[0]) * x[0] + cos(theta[0]) * x[1] + t[1];\n       const T r2 = q_0 * q_0 + q_1 * q_1;\n       T f;\n       (*compute_distortion)(&r2, &f);\n       residuals[0] = y[0] - f * q_0;\n       residuals[1] = y[1] - f * q_1;\n       return true;\n     }\n\n     double x[2];\n     double y[2];\n     std::unique_ptr<ceres::CostFunctionToFunctor<1, 1> > compute_distortion;\n   };\n\n\nA function that returns its value and derivative\n------------------------------------------------\n\nNow suppose we are given a function :code:`ComputeDistortionValue`\nthatis able to compute its value and optionally its Jacobian on demand\nand has the following signature:\n\n.. code-block:: c++\n\n   void ComputeDistortionValueAndJacobian(double r2,\n                                          double* value,\n                                          double* jacobian);\n\nAgain, the actual implementation of the function does not\nmatter. Interfacing this function with :code:`Affine2DWithDistortion`\nis a two step process:\n\n1. Wrap :code:`ComputeDistortionValueAndJacobian` into a\n   :class:`CostFunction` object which we call\n   :code:`ComputeDistortionFunction`.\n2. Wrap the resulting :class:`ComputeDistortionFunction` object using\n   :class:`CostFunctionToFunctor`. The resulting object is a functor\n   with a templated :code:`operator()` method, which pipes the\n   Jacobian computed by :class:`NumericDiffCostFunction` into the\n   appropriate :code:`Jet` objects.\n\nThe resulting code will look as follows:\n\n.. code-block:: c++\n   :emphasize-lines: 21,22, 33\n\n   class ComputeDistortionFunction : public ceres::SizedCostFunction<1, 1> {\n    public:\n     virtual bool Evaluate(double const* const* parameters,\n                           double* residuals,\n                           double** jacobians) const {\n       if (!jacobians) {\n         ComputeDistortionValueAndJacobian(parameters[0][0], residuals, NULL);\n       } else {\n         ComputeDistortionValueAndJacobian(parameters[0][0], residuals, jacobians[0]);\n       }\n       return true;\n     }\n   };\n\n   struct Affine2DWithDistortion {\n     Affine2DWithDistortion(const double x_in[2], const double y_in[2]) {\n       x[0] = x_in[0];\n       x[1] = x_in[1];\n       y[0] = y_in[0];\n       y[1] = y_in[1];\n       compute_distortion.reset(\n           new ceres::CostFunctionToFunctor<1, 1>(new ComputeDistortionFunction));\n     }\n\n     template <typename T>\n     bool operator()(const T* theta,\n                     const T* t,\n                     T* residuals) const {\n       const T q_0 =  cos(theta[0]) * x[0] - sin(theta[0]) * x[1] + t[0];\n       const T q_1 =  sin(theta[0]) * x[0] + cos(theta[0]) * x[1] + t[1];\n       const T r2 = q_0 * q_0 + q_1 * q_1;\n       T f;\n       (*compute_distortion)(&r2, &f);\n       residuals[0] = y[0] - f * q_0;\n       residuals[1] = y[1] - f * q_1;\n       return true;\n     }\n\n     double x[2];\n     double y[2];\n     std::unique_ptr<ceres::CostFunctionToFunctor<1, 1> > compute_distortion;\n   };\n\n\nA function that is defined as a table of values\n-----------------------------------------------\n\nThe third and final case we will consider is where the function\n:math:`f` is defined as a table of values on the interval :math:`[0,\n100)`, with a value for each integer.\n\n.. code-block:: c++\n\n   vector<double> distortion_values;\n\nThere are many ways of interpolating a table of values. Perhaps the\nsimplest and most common method is linear interpolation. But it is not\na great idea to use linear interpolation because the interpolating\nfunction is not differentiable at the sample points.\n\nA simple (well behaved) differentiable interpolation is the `Cubic\nHermite Spline\n<http://en.wikipedia.org/wiki/Cubic_Hermite_spline>`_. Ceres Solver\nships with routines to perform Cubic & Bi-Cubic interpolation that is\nautomatic differentiation friendly.\n\nUsing Cubic interpolation requires first constructing a\n:class:`Grid1D` object to wrap the table of values and then\nconstructing a :class:`CubicInterpolator` object using it.\n\nThe resulting code will look as follows:\n\n.. code-block:: c++\n   :emphasize-lines: 10,11,12,13, 24, 32,33\n\n   struct Affine2DWithDistortion {\n     Affine2DWithDistortion(const double x_in[2],\n                            const double y_in[2],\n                            const std::vector<double>& distortion_values) {\n       x[0] = x_in[0];\n       x[1] = x_in[1];\n       y[0] = y_in[0];\n       y[1] = y_in[1];\n\n       grid.reset(new ceres::Grid1D<double, 1>(\n           &distortion_values[0], 0, distortion_values.size()));\n       compute_distortion.reset(\n           new ceres::CubicInterpolator<ceres::Grid1D<double, 1> >(*grid));\n     }\n\n     template <typename T>\n     bool operator()(const T* theta,\n                     const T* t,\n                     T* residuals) const {\n       const T q_0 =  cos(theta[0]) * x[0] - sin(theta[0]) * x[1] + t[0];\n       const T q_1 =  sin(theta[0]) * x[0] + cos(theta[0]) * x[1] + t[1];\n       const T r2 = q_0 * q_0 + q_1 * q_1;\n       T f;\n       compute_distortion->Evaluate(r2, &f);\n       residuals[0] = y[0] - f * q_0;\n       residuals[1] = y[1] - f * q_1;\n       return true;\n     }\n\n     double x[2];\n     double y[2];\n     std::unique_ptr<ceres::Grid1D<double, 1> > grid;\n     std::unique_ptr<ceres::CubicInterpolator<ceres::Grid1D<double, 1> > > compute_distortion;\n   };\n\nIn the above example we used :class:`Grid1D` and\n:class:`CubicInterpolator` to interpolate a one dimensional table of\nvalues. :class:`Grid2D` combined with :class:`CubicInterpolator` lets\nthe user to interpolate two dimensional tables of values. Note that\nneither :class:`Grid1D` or :class:`Grid2D` are limited to scalar\nvalued functions, they also work with vector valued functions.\n"
  },
  {
    "path": "3rdparty/ceres/docs/source/license.rst",
    "content": "=======\nLicense\n=======\n\n.. NOTE::\n\n   This page refers only to the license for Ceres itself, independent of its\n   optional dependencies which are separately licensed and which can affect\n   the resulting license of Ceres if built with them enabled.  See\n   :ref:`options-controlling-ceres-configuration` for an overview of these\n   implications.\n\nCeres Solver is licensed under the New BSD license, whose terms are as follows.\n\nCopyright 2016 Google Inc. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n1.    Redistributions of source code must retain the above copyright notice,\n      this list of conditions and the following disclaimer.\n2.    Redistributions in binary form must reproduce the above copyright notice,\n      this list of conditions and the following disclaimer in the documentation\n      and/or other materials provided with the distribution.\n3.    Neither the name of Google Inc.,  nor the names of its contributors may\n      be used to endorse or promote products derived from this software without\n      specific prior written permission.\n\nThis software is provided by the copyright holders and contributors \"AS IS\" and\nany express or implied warranties, including, but not limited to, the implied\nwarranties of merchantability and fitness for a particular purpose are\ndisclaimed. In no event shall Google Inc. be liable for any direct, indirect,\nincidental, special, exemplary, or consequential damages (including, but not\nlimited to, procurement of substitute goods or services; loss of use, data, or\nprofits; or business interruption) however caused and on any theory of\nliability, whether in contract, strict liability, or tort (including negligence\nor otherwise) arising in any way out of the use of this software, even if\nadvised of the possibility of such damage.\n"
  },
  {
    "path": "3rdparty/ceres/docs/source/modeling_faqs.rst",
    "content": ".. _chapter-modeling_faqs:\n\n.. default-domain:: cpp\n\n.. cpp:namespace:: ceres\n\n========\nModeling\n========\n\n#. Use analytical/automatic derivatives.\n\n   This is the single most important piece of advice we can give to\n   you. It is tempting to take the easy way out and use numeric\n   differentiation. This is a bad idea. Numeric differentiation is\n   slow, ill-behaved, hard to get right, and results in poor\n   convergence behaviour.\n\n   Ceres allows the user to define templated functors which will\n   be automatically differentiated. For most situations this is enough\n   and we recommend using this facility. In some cases the derivatives\n   are simple enough or the performance considerations are such that\n   the overhead of automatic differentiation is too much. In such\n   cases, analytic derivatives are recommended.\n\n   The use of numerical derivatives should be a measure of last\n   resort, where it is simply not possible to write a templated\n   implementation of the cost function.\n\n   In many cases it is not possible to do analytic or automatic\n   differentiation of the entire cost function, but it is generally\n   the case that it is possible to decompose the cost function into\n   parts that need to be numerically differentiated and parts that can\n   be automatically or analytically differentiated.\n\n   To this end, Ceres has extensive support for mixing analytic,\n   automatic and numeric differentiation. See\n   :class:`CostFunctionToFunctor`.\n\n#. When using Quaternions,  consider using :class:`QuaternionParameterization`.\n\n   `Quaternions <https://en.wikipedia.org/wiki/Quaternion>`_ are a\n   four dimensional parameterization of the space of three dimensional\n   rotations :math:`SO(3)`.  However, the :math:`SO(3)` is a three\n   dimensional set, and so is the tangent space of a\n   Quaternion. Therefore, it is sometimes (not always) beneficial to\n   associate a local parameterization with parameter blocks\n   representing a Quaternion. Assuming that the order of entries in\n   your parameter block is :math:`w,x,y,z`, you can use\n   :class:`QuaternionParameterization`.\n\n   .. NOTE::\n\n     If you are using `Eigen's Quaternion\n     <http://eigen.tuxfamily.org/dox/classEigen_1_1Quaternion.html>`_\n     object, whose layout is :math:`x,y,z,w`, then you should use\n     :class:`EigenQuaternionParameterization`.\n\n\n#. How do I solve problems with general linear & non-linear\n   **inequality** constraints with Ceres Solver?\n\n   Currently, Ceres Solver only supports upper and lower bounds\n   constraints on the parameter blocks.\n\n   A crude way of dealing with inequality constraints is have one or\n   more of your cost functions check if the inequalities you are\n   interested in are satisfied, and if not return false instead of\n   true. This will prevent the solver from ever stepping into an\n   infeasible region.\n\n   This requires that the starting point for the optimization be a\n   feasible point.  You also risk pre-mature convergence using this\n   method.\n\n#. How do I solve problems with general linear & non-linear **equality**\n   constraints with Ceres Solver?\n\n   There is no built in support in ceres for solving problems with\n   equality constraints.  Currently, Ceres Solver only supports upper\n   and lower bounds constraints on the parameter blocks.\n\n   The trick described above for dealing with inequality\n   constraints will **not** work for equality constraints.\n\n#. How do I set one or more components of a parameter block constant?\n\n   Using :class:`SubsetParameterization`.\n\n#. Putting `Inverse Function Theorem\n   <http://en.wikipedia.org/wiki/Inverse_function_theorem>`_ to use.\n\n   Every now and then we have to deal with functions which cannot be\n   evaluated analytically. Computing the Jacobian in such cases is\n   tricky. A particularly interesting case is where the inverse of the\n   function is easy to compute analytically. An example of such a\n   function is the Coordinate transformation between the `ECEF\n   <http://en.wikipedia.org/wiki/ECEF>`_ and the `WGS84\n   <http://en.wikipedia.org/wiki/World_Geodetic_System>`_ where the\n   conversion from WGS84 to ECEF is analytic, but the conversion\n   back to WGS84 uses an iterative algorithm. So how do you compute the\n   derivative of the ECEF to WGS84 transformation?\n\n   One obvious approach would be to numerically\n   differentiate the conversion function. This is not a good idea. For\n   one, it will be slow, but it will also be numerically quite\n   bad.\n\n   Turns out you can use the `Inverse Function Theorem\n   <http://en.wikipedia.org/wiki/Inverse_function_theorem>`_ in this\n   case to compute the derivatives more or less analytically.\n\n   The key result here is. If :math:`x = f^{-1}(y)`, and :math:`Df(x)`\n   is the invertible Jacobian of :math:`f` at :math:`x`. Then the\n   Jacobian :math:`Df^{-1}(y) = [Df(x)]^{-1}`, i.e., the Jacobian of\n   the :math:`f^{-1}` is the inverse of the Jacobian of :math:`f`.\n\n   Algorithmically this means that given :math:`y`, compute :math:`x =\n   f^{-1}(y)` by whatever means you can. Evaluate the Jacobian of\n   :math:`f` at :math:`x`. If the Jacobian matrix is invertible, then\n   its inverse is the Jacobian of :math:`f^{-1}(y)` at  :math:`y`.\n\n   One can put this into practice with the following code fragment.\n\n   .. code-block:: c++\n\n      Eigen::Vector3d ecef; // Fill some values\n      // Iterative computation.\n      Eigen::Vector3d lla = ECEFToLLA(ecef);\n      // Analytic derivatives\n      Eigen::Matrix3d lla_to_ecef_jacobian = LLAToECEFJacobian(lla);\n      bool invertible;\n      Eigen::Matrix3d ecef_to_lla_jacobian;\n      lla_to_ecef_jacobian.computeInverseWithCheck(ecef_to_lla_jacobian, invertible);\n"
  },
  {
    "path": "3rdparty/ceres/docs/source/nnls_covariance.rst",
    "content": "\n.. default-domain:: cpp\n\n.. cpp:namespace:: ceres\n\n.. _chapter-nnls_covariance:\n\n=====================\nCovariance Estimation\n=====================\n\nIntroduction\n============\n\nOne way to assess the quality of the solution returned by a non-linear\nleast squares solver is to analyze the covariance of the solution.\n\nLet us consider the non-linear regression problem\n\n.. math::  y = f(x) + N(0, I)\n\ni.e., the observation :math:`y` is a random non-linear function of the\nindependent variable :math:`x` with mean :math:`f(x)` and identity\ncovariance. Then the maximum likelihood estimate of :math:`x` given\nobservations :math:`y` is the solution to the non-linear least squares\nproblem:\n\n.. math:: x^* = \\arg \\min_x \\|f(x)\\|^2\n\nAnd the covariance of :math:`x^*` is given by\n\n.. math:: C(x^*) = \\left(J'(x^*)J(x^*)\\right)^{-1}\n\nHere :math:`J(x^*)` is the Jacobian of :math:`f` at :math:`x^*`. The\nabove formula assumes that :math:`J(x^*)` has full column rank.\n\nIf :math:`J(x^*)` is rank deficient, then the covariance matrix :math:`C(x^*)`\nis also rank deficient and is given by the Moore-Penrose pseudo inverse.\n\n.. math:: C(x^*) =  \\left(J'(x^*)J(x^*)\\right)^{\\dagger}\n\nNote that in the above, we assumed that the covariance matrix for\n:math:`y` was identity. This is an important assumption. If this is\nnot the case and we have\n\n.. math:: y = f(x) + N(0, S)\n\nWhere :math:`S` is a positive semi-definite matrix denoting the\ncovariance of :math:`y`, then the maximum likelihood problem to be\nsolved is\n\n.. math:: x^* = \\arg \\min_x f'(x) S^{-1} f(x)\n\nand the corresponding covariance estimate of :math:`x^*` is given by\n\n.. math:: C(x^*) = \\left(J'(x^*) S^{-1} J(x^*)\\right)^{-1}\n\nSo, if it is the case that the observations being fitted to have a\ncovariance matrix not equal to identity, then it is the user's\nresponsibility that the corresponding cost functions are correctly\nscaled, e.g. in the above case the cost function for this problem\nshould evaluate :math:`S^{-1/2} f(x)` instead of just :math:`f(x)`,\nwhere :math:`S^{-1/2}` is the inverse square root of the covariance\nmatrix :math:`S`.\n\nGauge Invariance\n================\n\nIn structure from motion (3D reconstruction) problems, the\nreconstruction is ambiguous up to a similarity transform. This is\nknown as a *Gauge Ambiguity*. Handling Gauges correctly requires the\nuse of SVD or custom inversion algorithms. For small problems the\nuser can use the dense algorithm. For more details see the work of\nKanatani & Morris [KanataniMorris]_.\n\n\n:class:`Covariance`\n===================\n\n:class:`Covariance` allows the user to evaluate the covariance for a\nnon-linear least squares problem and provides random access to its\nblocks. The computation assumes that the cost functions compute\nresiduals such that their covariance is identity.\n\nSince the computation of the covariance matrix requires computing the\ninverse of a potentially large matrix, this can involve a rather large\namount of time and memory. However, it is usually the case that the\nuser is only interested in a small part of the covariance\nmatrix. Quite often just the block diagonal. :class:`Covariance`\nallows the user to specify the parts of the covariance matrix that she\nis interested in and then uses this information to only compute and\nstore those parts of the covariance matrix.\n\nRank of the Jacobian\n====================\n\nAs we noted above, if the Jacobian is rank deficient, then the inverse\nof :math:`J'J` is not defined and instead a pseudo inverse needs to be\ncomputed.\n\nThe rank deficiency in :math:`J` can be *structural* -- columns\nwhich are always known to be zero or *numerical* -- depending on the\nexact values in the Jacobian.\n\nStructural rank deficiency occurs when the problem contains parameter\nblocks that are constant. This class correctly handles structural rank\ndeficiency like that.\n\nNumerical rank deficiency, where the rank of the matrix cannot be\npredicted by its sparsity structure and requires looking at its\nnumerical values is more complicated. Here again there are two\ncases.\n\n  a. The rank deficiency arises from overparameterization. e.g., a\n     four dimensional quaternion used to parameterize :math:`SO(3)`,\n     which is a three dimensional manifold. In cases like this, the\n     user should use an appropriate\n     :class:`LocalParameterization`. Not only will this lead to better\n     numerical behaviour of the Solver, it will also expose the rank\n     deficiency to the :class:`Covariance` object so that it can\n     handle it correctly.\n\n  b. More general numerical rank deficiency in the Jacobian requires\n     the computation of the so called Singular Value Decomposition\n     (SVD) of :math:`J'J`. We do not know how to do this for large\n     sparse matrices efficiently. For small and moderate sized\n     problems this is done using dense linear algebra.\n\n\n:class:`Covariance::Options`\n\n.. class:: Covariance::Options\n\n.. member:: int Covariance::Options::num_threads\n\n   Default: ``1``\n\n   Number of threads to be used for evaluating the Jacobian and\n   estimation of covariance.\n\n.. member:: SparseLinearAlgebraLibraryType Covariance::Options::sparse_linear_algebra_library_type\n\n   Default: ``SUITE_SPARSE`` Ceres Solver is built with support for\n   `SuiteSparse <http://faculty.cse.tamu.edu/davis/suitesparse.html>`_\n   and ``EIGEN_SPARSE`` otherwise. Note that ``EIGEN_SPARSE`` is\n   always available.\n\n.. member:: CovarianceAlgorithmType Covariance::Options::algorithm_type\n\n   Default: ``SPARSE_QR``\n\n   Ceres supports two different algorithms for covariance estimation,\n   which represent different tradeoffs in speed, accuracy and\n   reliability.\n\n   1. ``SPARSE_QR`` uses the sparse QR factorization algorithm to\n      compute the decomposition\n\n       .. math::\n\n          QR &= J\\\\\n          \\left(J^\\top J\\right)^{-1} &= \\left(R^\\top R\\right)^{-1}\n\n      The speed of this algorithm depends on the sparse linear algebra\n      library being used. ``Eigen``'s sparse QR factorization is a\n      moderately fast algorithm suitable for small to medium sized\n      matrices. For best performance we recommend using\n      ``SuiteSparseQR`` which is enabled by setting\n      :member:`Covaraince::Options::sparse_linear_algebra_library_type`\n      to ``SUITE_SPARSE``.\n\n      Neither ``SPARSE_QR`` cannot compute the covariance if the\n      Jacobian is rank deficient.\n\n\n   2. ``DENSE_SVD`` uses ``Eigen``'s ``JacobiSVD`` to perform the\n      computations. It computes the singular value decomposition\n\n      .. math::   U S V^\\top = J\n\n      and then uses it to compute the pseudo inverse of J'J as\n\n      .. math::   (J'J)^{\\dagger} = V  S^{\\dagger}  V^\\top\n\n      It is an accurate but slow method and should only be used for\n      small to moderate sized problems. It can handle full-rank as\n      well as rank deficient Jacobians.\n\n\n.. member:: int Covariance::Options::min_reciprocal_condition_number\n\n   Default: :math:`10^{-14}`\n\n   If the Jacobian matrix is near singular, then inverting :math:`J'J`\n   will result in unreliable results, e.g, if\n\n   .. math::\n\n     J = \\begin{bmatrix}\n         1.0& 1.0 \\\\\n         1.0& 1.0000001\n         \\end{bmatrix}\n\n   which is essentially a rank deficient matrix, we have\n\n   .. math::\n\n     (J'J)^{-1} = \\begin{bmatrix}\n                  2.0471e+14&  -2.0471e+14 \\\\\n                  -2.0471e+14&   2.0471e+14\n                  \\end{bmatrix}\n\n\n   This is not a useful result. Therefore, by default\n   :func:`Covariance::Compute` will return ``false`` if a rank\n   deficient Jacobian is encountered. How rank deficiency is detected\n   depends on the algorithm being used.\n\n   1. ``DENSE_SVD``\n\n      .. math:: \\frac{\\sigma_{\\text{min}}}{\\sigma_{\\text{max}}}  < \\sqrt{\\text{min_reciprocal_condition_number}}\n\n      where :math:`\\sigma_{\\text{min}}` and\n      :math:`\\sigma_{\\text{max}}` are the minimum and maxiumum\n      singular values of :math:`J` respectively.\n\n   2. ``SPARSE_QR``\n\n       .. math:: \\operatorname{rank}(J) < \\operatorname{num\\_col}(J)\n\n       Here :math:`\\operatorname{rank}(J)` is the estimate of the rank\n       of :math:`J` returned by the sparse QR factorization\n       algorithm. It is a fairly reliable indication of rank\n       deficiency.\n\n.. member:: int Covariance::Options::null_space_rank\n\n    When using ``DENSE_SVD``, the user has more control in dealing\n    with singular and near singular covariance matrices.\n\n    As mentioned above, when the covariance matrix is near singular,\n    instead of computing the inverse of :math:`J'J`, the Moore-Penrose\n    pseudoinverse of :math:`J'J` should be computed.\n\n    If :math:`J'J` has the eigen decomposition :math:`(\\lambda_i,\n    e_i)`, where :math:`\\lambda_i` is the :math:`i^\\textrm{th}`\n    eigenvalue and :math:`e_i` is the corresponding eigenvector, then\n    the inverse of :math:`J'J` is\n\n    .. math:: (J'J)^{-1} = \\sum_i \\frac{1}{\\lambda_i} e_i e_i'\n\n    and computing the pseudo inverse involves dropping terms from this\n    sum that correspond to small eigenvalues.\n\n    How terms are dropped is controlled by\n    `min_reciprocal_condition_number` and `null_space_rank`.\n\n    If `null_space_rank` is non-negative, then the smallest\n    `null_space_rank` eigenvalue/eigenvectors are dropped irrespective\n    of the magnitude of :math:`\\lambda_i`. If the ratio of the\n    smallest non-zero eigenvalue to the largest eigenvalue in the\n    truncated matrix is still below min_reciprocal_condition_number,\n    then the `Covariance::Compute()` will fail and return `false`.\n\n    Setting `null_space_rank = -1` drops all terms for which\n\n    .. math::  \\frac{\\lambda_i}{\\lambda_{\\textrm{max}}} < \\textrm{min_reciprocal_condition_number}\n\n    This option has no effect on ``SPARSE_QR``.\n\n.. member:: bool Covariance::Options::apply_loss_function\n\n   Default: `true`\n\n   Even though the residual blocks in the problem may contain loss\n   functions, setting ``apply_loss_function`` to false will turn off\n   the application of the loss function to the output of the cost\n   function and in turn its effect on the covariance.\n\n.. class:: Covariance\n\n   :class:`Covariance::Options` as the name implies is used to control\n   the covariance estimation algorithm. Covariance estimation is a\n   complicated and numerically sensitive procedure. Please read the\n   entire documentation for :class:`Covariance::Options` before using\n   :class:`Covariance`.\n\n.. function:: bool Covariance::Compute(const vector<pair<const double*, const double*> >& covariance_blocks, Problem* problem)\n\n   Compute a part of the covariance matrix.\n\n   The vector ``covariance_blocks``, indexes into the covariance\n   matrix block-wise using pairs of parameter blocks. This allows the\n   covariance estimation algorithm to only compute and store these\n   blocks.\n\n   Since the covariance matrix is symmetric, if the user passes\n   ``<block1, block2>``, then ``GetCovarianceBlock`` can be called with\n   ``block1``, ``block2`` as well as ``block2``, ``block1``.\n\n   ``covariance_blocks`` cannot contain duplicates. Bad things will\n   happen if they do.\n\n   Note that the list of ``covariance_blocks`` is only used to\n   determine what parts of the covariance matrix are computed. The\n   full Jacobian is used to do the computation, i.e. they do not have\n   an impact on what part of the Jacobian is used for computation.\n\n   The return value indicates the success or failure of the covariance\n   computation. Please see the documentation for\n   :class:`Covariance::Options` for more on the conditions under which\n   this function returns ``false``.\n\n.. function:: bool GetCovarianceBlock(const double* parameter_block1, const double* parameter_block2, double* covariance_block) const\n\n   Return the block of the cross-covariance matrix corresponding to\n   ``parameter_block1`` and ``parameter_block2``.\n\n   Compute must be called before the first call to ``GetCovarianceBlock``\n   and the pair ``<parameter_block1, parameter_block2>`` OR the pair\n   ``<parameter_block2, parameter_block1>`` must have been present in the\n   vector covariance_blocks when ``Compute`` was called. Otherwise\n   ``GetCovarianceBlock`` will return false.\n\n   ``covariance_block`` must point to a memory location that can store\n   a ``parameter_block1_size x parameter_block2_size`` matrix. The\n   returned covariance will be a row-major matrix.\n\n.. function:: bool GetCovarianceBlockInTangentSpace(const double* parameter_block1, const double* parameter_block2, double* covariance_block) const\n\n   Return the block of the cross-covariance matrix corresponding to\n   ``parameter_block1`` and ``parameter_block2``.\n   Returns cross-covariance in the tangent space if a local\n   parameterization is associated with either parameter block;\n   else returns cross-covariance in the ambient space.\n\n   Compute must be called before the first call to ``GetCovarianceBlock``\n   and the pair ``<parameter_block1, parameter_block2>`` OR the pair\n   ``<parameter_block2, parameter_block1>`` must have been present in the\n   vector covariance_blocks when ``Compute`` was called. Otherwise\n   ``GetCovarianceBlock`` will return false.\n\n   ``covariance_block`` must point to a memory location that can store\n   a ``parameter_block1_local_size x parameter_block2_local_size`` matrix. The\n   returned covariance will be a row-major matrix.\n\nExample Usage\n=============\n\n.. code-block:: c++\n\n double x[3];\n double y[2];\n\n Problem problem;\n problem.AddParameterBlock(x, 3);\n problem.AddParameterBlock(y, 2);\n <Build Problem>\n <Solve Problem>\n\n Covariance::Options options;\n Covariance covariance(options);\n\n vector<pair<const double*, const double*> > covariance_blocks;\n covariance_blocks.push_back(make_pair(x, x));\n covariance_blocks.push_back(make_pair(y, y));\n covariance_blocks.push_back(make_pair(x, y));\n\n CHECK(covariance.Compute(covariance_blocks, &problem));\n\n double covariance_xx[3 * 3];\n double covariance_yy[2 * 2];\n double covariance_xy[3 * 2];\n covariance.GetCovarianceBlock(x, x, covariance_xx)\n covariance.GetCovarianceBlock(y, y, covariance_yy)\n covariance.GetCovarianceBlock(x, y, covariance_xy)\n"
  },
  {
    "path": "3rdparty/ceres/docs/source/nnls_modeling.rst",
    "content": ".. default-domain:: cpp\n\n.. cpp:namespace:: ceres\n\n.. _`chapter-nnls_modeling`:\n\n=================================\nModeling Non-linear Least Squares\n=================================\n\nIntroduction\n============\n\nCeres solver consists of two distinct parts. A modeling API which\nprovides a rich set of tools to construct an optimization problem one\nterm at a time and a solver API that controls the minimization\nalgorithm. This chapter is devoted to the task of modeling\noptimization problems using Ceres. :ref:`chapter-nnls_solving` discusses\nthe various ways in which an optimization problem can be solved using\nCeres.\n\nCeres solves robustified bounds constrained non-linear least squares\nproblems of the form:\n\n.. math:: :label: ceresproblem_modeling\n\n   \\min_{\\mathbf{x}} &\\quad \\frac{1}{2}\\sum_{i}\n   \\rho_i\\left(\\left\\|f_i\\left(x_{i_1},\n   ... ,x_{i_k}\\right)\\right\\|^2\\right)  \\\\\n   \\text{s.t.} &\\quad l_j \\le x_j \\le u_j\n\nIn Ceres parlance, the expression\n:math:`\\rho_i\\left(\\left\\|f_i\\left(x_{i_1},...,x_{i_k}\\right)\\right\\|^2\\right)`\nis known as a **residual block**, where :math:`f_i(\\cdot)` is a\n:class:`CostFunction` that depends on the **parameter blocks**\n:math:`\\left\\{x_{i_1},... , x_{i_k}\\right\\}`.\n\nIn most optimization problems small groups of scalars occur\ntogether. For example the three components of a translation vector and\nthe four components of the quaternion that define the pose of a\ncamera. We refer to such a group of scalars as a **parameter block**. Of\ncourse a parameter block can be just a single scalar too.\n\n:math:`\\rho_i` is a :class:`LossFunction`. A :class:`LossFunction` is\na scalar valued function that is used to reduce the influence of\noutliers on the solution of non-linear least squares problems.\n\n:math:`l_j` and :math:`u_j` are lower and upper bounds on the\nparameter block :math:`x_j`.\n\nAs a special case, when :math:`\\rho_i(x) = x`, i.e., the identity\nfunction, and :math:`l_j = -\\infty` and :math:`u_j = \\infty` we get\nthe more familiar unconstrained `non-linear least squares problem\n<http://en.wikipedia.org/wiki/Non-linear_least_squares>`_.\n\n.. math:: :label: ceresproblemunconstrained\n\n   \\frac{1}{2}\\sum_{i} \\left\\|f_i\\left(x_{i_1}, ... ,x_{i_k}\\right)\\right\\|^2.\n\n:class:`CostFunction`\n=====================\n\nFor each term in the objective function, a :class:`CostFunction` is\nresponsible for computing a vector of residuals and Jacobian\nmatrices. Concretely, consider a function\n:math:`f\\left(x_{1},...,x_{k}\\right)` that depends on parameter blocks\n:math:`\\left[x_{1}, ... , x_{k}\\right]`.\n\nThen, given :math:`\\left[x_{1}, ... , x_{k}\\right]`,\n:class:`CostFunction` is responsible for computing the vector\n:math:`f\\left(x_{1},...,x_{k}\\right)` and the Jacobian matrices\n\n.. math:: J_i =  \\frac{\\partial}{\\partial x_i} f(x_1, ..., x_k) \\quad \\forall i \\in \\{1, \\ldots, k\\}\n\n.. class:: CostFunction\n\n   .. code-block:: c++\n\n    class CostFunction {\n     public:\n      virtual bool Evaluate(double const* const* parameters,\n                            double* residuals,\n                            double** jacobians) = 0;\n      const vector<int32>& parameter_block_sizes();\n      int num_residuals() const;\n\n     protected:\n      vector<int32>* mutable_parameter_block_sizes();\n      void set_num_residuals(int num_residuals);\n    };\n\n\nThe signature of the :class:`CostFunction` (number and sizes of input\nparameter blocks and number of outputs) is stored in\n:member:`CostFunction::parameter_block_sizes_` and\n:member:`CostFunction::num_residuals_` respectively. User code\ninheriting from this class is expected to set these two members with\nthe corresponding accessors. This information will be verified by the\n:class:`Problem` when added with :func:`Problem::AddResidualBlock`.\n\n.. function:: bool CostFunction::Evaluate(double const* const* parameters, double* residuals, double** jacobians)\n\n   Compute the residual vector and the Jacobian matrices.\n\n   ``parameters`` is an array of arrays of size\n   ``CostFunction::parameter_block_sizes_.size()`` and\n   ``parameters[i]`` is an array of size ``parameter_block_sizes_[i]``\n   that contains the :math:`i^{\\text{th}}` parameter block that the\n   ``CostFunction`` depends on.\n\n   ``parameters`` is never ``NULL``.\n\n   ``residuals`` is an array of size ``num_residuals_``.\n\n   ``residuals`` is never ``NULL``.\n\n   ``jacobians`` is an array of arrays of size\n   ``CostFunction::parameter_block_sizes_.size()``.\n\n   If ``jacobians`` is ``NULL``, the user is only expected to compute\n   the residuals.\n\n   ``jacobians[i]`` is a row-major array of size ``num_residuals x\n   parameter_block_sizes_[i]``.\n\n   If ``jacobians[i]`` is **not** ``NULL``, the user is required to\n   compute the Jacobian of the residual vector with respect to\n   ``parameters[i]`` and store it in this array, i.e.\n\n   ``jacobians[i][r * parameter_block_sizes_[i] + c]`` =\n   :math:`\\frac{\\displaystyle \\partial \\text{residual}[r]}{\\displaystyle \\partial \\text{parameters}[i][c]}`\n\n   If ``jacobians[i]`` is ``NULL``, then this computation can be\n   skipped. This is the case when the corresponding parameter block is\n   marked constant.\n\n   The return value indicates whether the computation of the residuals\n   and/or jacobians was successful or not. This can be used to\n   communicate numerical failures in Jacobian computations for\n   instance.\n\n:class:`SizedCostFunction`\n==========================\n\n.. class:: SizedCostFunction\n\n   If the size of the parameter blocks and the size of the residual\n   vector is known at compile time (this is the common case),\n   :class:`SizeCostFunction` can be used where these values can be\n   specified as template parameters and the user only needs to\n   implement :func:`CostFunction::Evaluate`.\n\n   .. code-block:: c++\n\n    template<int kNumResiduals,\n             int N0 = 0, int N1 = 0, int N2 = 0, int N3 = 0, int N4 = 0,\n             int N5 = 0, int N6 = 0, int N7 = 0, int N8 = 0, int N9 = 0>\n    class SizedCostFunction : public CostFunction {\n     public:\n      virtual bool Evaluate(double const* const* parameters,\n                            double* residuals,\n                            double** jacobians) const = 0;\n    };\n\n\n:class:`AutoDiffCostFunction`\n=============================\n\n.. class:: AutoDiffCostFunction\n\n   Defining a :class:`CostFunction` or a :class:`SizedCostFunction`\n   can be a tedious and error prone especially when computing\n   derivatives.  To this end Ceres provides `automatic differentiation\n   <http://en.wikipedia.org/wiki/Automatic_differentiation>`_.\n\n   .. code-block:: c++\n\n     template <typename CostFunctor,\n            int kNumResiduals,  // Number of residuals, or ceres::DYNAMIC.\n            int N0,       // Number of parameters in block 0.\n            int N1 = 0,   // Number of parameters in block 1.\n            int N2 = 0,   // Number of parameters in block 2.\n            int N3 = 0,   // Number of parameters in block 3.\n            int N4 = 0,   // Number of parameters in block 4.\n            int N5 = 0,   // Number of parameters in block 5.\n            int N6 = 0,   // Number of parameters in block 6.\n            int N7 = 0,   // Number of parameters in block 7.\n            int N8 = 0,   // Number of parameters in block 8.\n            int N9 = 0>   // Number of parameters in block 9.\n     class AutoDiffCostFunction : public\n     SizedCostFunction<kNumResiduals, N0, N1, N2, N3, N4, N5, N6, N7, N8, N9> {\n      public:\n       explicit AutoDiffCostFunction(CostFunctor* functor);\n       // Ignore the template parameter kNumResiduals and use\n       // num_residuals instead.\n       AutoDiffCostFunction(CostFunctor* functor, int num_residuals);\n     };\n\n   To get an auto differentiated cost function, you must define a\n   class with a templated ``operator()`` (a functor) that computes the\n   cost function in terms of the template parameter ``T``. The\n   autodiff framework substitutes appropriate ``Jet`` objects for\n   ``T`` in order to compute the derivative when necessary, but this\n   is hidden, and you should write the function as if ``T`` were a\n   scalar type (e.g. a double-precision floating point number).\n\n   The function must write the computed value in the last argument\n   (the only non-``const`` one) and return true to indicate success.\n\n   For example, consider a scalar error :math:`e = k - x^\\top y`,\n   where both :math:`x` and :math:`y` are two-dimensional vector\n   parameters and :math:`k` is a constant. The form of this error,\n   which is the difference between a constant and an expression, is a\n   common pattern in least squares problems. For example, the value\n   :math:`x^\\top y` might be the model expectation for a series of\n   measurements, where there is an instance of the cost function for\n   each measurement :math:`k`.\n\n   The actual cost added to the total problem is :math:`e^2`, or\n   :math:`(k - x^\\top y)^2`; however, the squaring is implicitly done\n   by the optimization framework.\n\n   To write an auto-differentiable cost function for the above model,\n   first define the object\n\n   .. code-block:: c++\n\n    class MyScalarCostFunctor {\n      MyScalarCostFunctor(double k): k_(k) {}\n\n      template <typename T>\n      bool operator()(const T* const x , const T* const y, T* e) const {\n        e[0] = k_ - x[0] * y[0] - x[1] * y[1];\n        return true;\n      }\n\n     private:\n      double k_;\n    };\n\n\n   Note that in the declaration of ``operator()`` the input parameters\n   ``x`` and ``y`` come first, and are passed as const pointers to arrays\n   of ``T``. If there were three input parameters, then the third input\n   parameter would come after ``y``. The output is always the last\n   parameter, and is also a pointer to an array. In the example above,\n   ``e`` is a scalar, so only ``e[0]`` is set.\n\n   Then given this class definition, the auto differentiated cost\n   function for it can be constructed as follows.\n\n   .. code-block:: c++\n\n    CostFunction* cost_function\n        = new AutoDiffCostFunction<MyScalarCostFunctor, 1, 2, 2>(\n            new MyScalarCostFunctor(1.0));              ^  ^  ^\n                                                        |  |  |\n                            Dimension of residual ------+  |  |\n                            Dimension of x ----------------+  |\n                            Dimension of y -------------------+\n\n\n   In this example, there is usually an instance for each measurement\n   of ``k``.\n\n   In the instantiation above, the template parameters following\n   ``MyScalarCostFunction``, ``<1, 2, 2>`` describe the functor as\n   computing a 1-dimensional output from two arguments, both\n   2-dimensional.\n\n   :class:`AutoDiffCostFunction` also supports cost functions with a\n   runtime-determined number of residuals. For example:\n\n   .. code-block:: c++\n\n     CostFunction* cost_function\n         = new AutoDiffCostFunction<MyScalarCostFunctor, DYNAMIC, 2, 2>(\n             new CostFunctorWithDynamicNumResiduals(1.0),   ^     ^  ^\n             runtime_number_of_residuals); <----+           |     |  |\n                                                |           |     |  |\n                                                |           |     |  |\n               Actual number of residuals ------+           |     |  |\n               Indicate dynamic number of residuals --------+     |  |\n               Dimension of x ------------------------------------+  |\n               Dimension of y ---------------------------------------+\n\n   The framework can currently accommodate cost functions of up to 10\n   independent variables, and there is no limit on the dimensionality\n   of each of them.\n\n   **WARNING 1** A common beginner's error when first using\n   :class:`AutoDiffCostFunction` is to get the sizing wrong. In particular,\n   there is a tendency to set the template parameters to (dimension of\n   residual, number of parameters) instead of passing a dimension\n   parameter for *every parameter block*. In the example above, that\n   would be ``<MyScalarCostFunction, 1, 2>``, which is missing the 2\n   as the last template argument.\n\n\n:class:`DynamicAutoDiffCostFunction`\n====================================\n\n.. class:: DynamicAutoDiffCostFunction\n\n   :class:`AutoDiffCostFunction` requires that the number of parameter\n   blocks and their sizes be known at compile time. It also has an\n   upper limit of 10 parameter blocks. In a number of applications,\n   this is not enough e.g., Bezier curve fitting, Neural Network\n   training etc.\n\n     .. code-block:: c++\n\n      template <typename CostFunctor, int Stride = 4>\n      class DynamicAutoDiffCostFunction : public CostFunction {\n      };\n\n   In such cases :class:`DynamicAutoDiffCostFunction` can be\n   used. Like :class:`AutoDiffCostFunction` the user must define a\n   templated functor, but the signature of the functor differs\n   slightly. The expected interface for the cost functors is:\n\n     .. code-block:: c++\n\n       struct MyCostFunctor {\n         template<typename T>\n         bool operator()(T const* const* parameters, T* residuals) const {\n         }\n       }\n\n   Since the sizing of the parameters is done at runtime, you must\n   also specify the sizes after creating the dynamic autodiff cost\n   function. For example:\n\n     .. code-block:: c++\n\n       DynamicAutoDiffCostFunction<MyCostFunctor, 4>* cost_function =\n         new DynamicAutoDiffCostFunction<MyCostFunctor, 4>(\n           new MyCostFunctor());\n       cost_function->AddParameterBlock(5);\n       cost_function->AddParameterBlock(10);\n       cost_function->SetNumResiduals(21);\n\n   Under the hood, the implementation evaluates the cost function\n   multiple times, computing a small set of the derivatives (four by\n   default, controlled by the ``Stride`` template parameter) with each\n   pass. There is a performance tradeoff with the size of the passes;\n   Smaller sizes are more cache efficient but result in larger number\n   of passes, and larger stride lengths can destroy cache-locality\n   while reducing the number of passes over the cost function. The\n   optimal value depends on the number and sizes of the various\n   parameter blocks.\n\n   As a rule of thumb, try using :class:`AutoDiffCostFunction` before\n   you use :class:`DynamicAutoDiffCostFunction`.\n\n:class:`NumericDiffCostFunction`\n================================\n\n.. class:: NumericDiffCostFunction\n\n  In some cases, its not possible to define a templated cost functor,\n  for example when the evaluation of the residual involves a call to a\n  library function that you do not have control over.  In such a\n  situation, `numerical differentiation\n  <http://en.wikipedia.org/wiki/Numerical_differentiation>`_ can be\n  used.\n\n  .. NOTE ::\n\n    TODO(sameeragarwal): Add documentation for the constructor and for\n    NumericDiffOptions. Update DynamicNumericDiffOptions in a similar\n    manner.\n\n  .. code-block:: c++\n\n      template <typename CostFunctor,\n                NumericDiffMethodType method = CENTRAL,\n                int kNumResiduals,  // Number of residuals, or ceres::DYNAMIC.\n                int N0,       // Number of parameters in block 0.\n                int N1 = 0,   // Number of parameters in block 1.\n                int N2 = 0,   // Number of parameters in block 2.\n                int N3 = 0,   // Number of parameters in block 3.\n                int N4 = 0,   // Number of parameters in block 4.\n                int N5 = 0,   // Number of parameters in block 5.\n                int N6 = 0,   // Number of parameters in block 6.\n                int N7 = 0,   // Number of parameters in block 7.\n                int N8 = 0,   // Number of parameters in block 8.\n                int N9 = 0>   // Number of parameters in block 9.\n      class NumericDiffCostFunction : public\n      SizedCostFunction<kNumResiduals, N0, N1, N2, N3, N4, N5, N6, N7, N8, N9> {\n      };\n\n  To get a numerically differentiated :class:`CostFunction`, you must\n  define a class with a ``operator()`` (a functor) that computes the\n  residuals. The functor must write the computed value in the last\n  argument (the only non-``const`` one) and return ``true`` to\n  indicate success.  Please see :class:`CostFunction` for details on\n  how the return value may be used to impose simple constraints on the\n  parameter block. e.g., an object of the form\n\n  .. code-block:: c++\n\n     struct ScalarFunctor {\n      public:\n       bool operator()(const double* const x1,\n                       const double* const x2,\n                       double* residuals) const;\n     }\n\n  For example, consider a scalar error :math:`e = k - x'y`, where both\n  :math:`x` and :math:`y` are two-dimensional column vector\n  parameters, the prime sign indicates transposition, and :math:`k` is\n  a constant. The form of this error, which is the difference between\n  a constant and an expression, is a common pattern in least squares\n  problems. For example, the value :math:`x'y` might be the model\n  expectation for a series of measurements, where there is an instance\n  of the cost function for each measurement :math:`k`.\n\n  To write an numerically-differentiable class:`CostFunction` for the\n  above model, first define the object\n\n  .. code-block::  c++\n\n     class MyScalarCostFunctor {\n       MyScalarCostFunctor(double k): k_(k) {}\n\n       bool operator()(const double* const x,\n                       const double* const y,\n                       double* residuals) const {\n         residuals[0] = k_ - x[0] * y[0] + x[1] * y[1];\n         return true;\n       }\n\n      private:\n       double k_;\n     };\n\n  Note that in the declaration of ``operator()`` the input parameters\n  ``x`` and ``y`` come first, and are passed as const pointers to\n  arrays of ``double`` s. If there were three input parameters, then\n  the third input parameter would come after ``y``. The output is\n  always the last parameter, and is also a pointer to an array. In the\n  example above, the residual is a scalar, so only ``residuals[0]`` is\n  set.\n\n  Then given this class definition, the numerically differentiated\n  :class:`CostFunction` with central differences used for computing\n  the derivative can be constructed as follows.\n\n  .. code-block:: c++\n\n    CostFunction* cost_function\n        = new NumericDiffCostFunction<MyScalarCostFunctor, CENTRAL, 1, 2, 2>(\n            new MyScalarCostFunctor(1.0));                    ^     ^  ^  ^\n                                                              |     |  |  |\n                                  Finite Differencing Scheme -+     |  |  |\n                                  Dimension of residual ------------+  |  |\n                                  Dimension of x ----------------------+  |\n                                  Dimension of y -------------------------+\n\n  In this example, there is usually an instance for each measurement\n  of `k`.\n\n  In the instantiation above, the template parameters following\n  ``MyScalarCostFunctor``, ``1, 2, 2``, describe the functor as\n  computing a 1-dimensional output from two arguments, both\n  2-dimensional.\n\n  NumericDiffCostFunction also supports cost functions with a\n  runtime-determined number of residuals. For example:\n\n   .. code-block:: c++\n\n     CostFunction* cost_function\n         = new NumericDiffCostFunction<MyScalarCostFunctor, CENTRAL, DYNAMIC, 2, 2>(\n             new CostFunctorWithDynamicNumResiduals(1.0),               ^     ^  ^\n             TAKE_OWNERSHIP,                                            |     |  |\n             runtime_number_of_residuals); <----+                       |     |  |\n                                                |                       |     |  |\n                                                |                       |     |  |\n               Actual number of residuals ------+                       |     |  |\n               Indicate dynamic number of residuals --------------------+     |  |\n               Dimension of x ------------------------------------------------+  |\n               Dimension of y ---------------------------------------------------+\n\n\n  The framework can currently accommodate cost functions of up to 10\n  independent variables, and there is no limit on the dimensionality\n  of each of them.\n\n  There are three available numeric differentiation schemes in ceres-solver:\n\n  The ``FORWARD`` difference method, which approximates :math:`f'(x)`\n  by computing :math:`\\frac{f(x+h)-f(x)}{h}`, computes the cost\n  function one additional time at :math:`x+h`. It is the fastest but\n  least accurate method.\n\n  The ``CENTRAL`` difference method is more accurate at the cost of\n  twice as many function evaluations than forward difference,\n  estimating :math:`f'(x)` by computing\n  :math:`\\frac{f(x+h)-f(x-h)}{2h}`.\n\n  The ``RIDDERS`` difference method[Ridders]_ is an adaptive scheme\n  that estimates derivatives by performing multiple central\n  differences at varying scales. Specifically, the algorithm starts at\n  a certain :math:`h` and as the derivative is estimated, this step\n  size decreases.  To conserve function evaluations and estimate the\n  derivative error, the method performs Richardson extrapolations\n  between the tested step sizes.  The algorithm exhibits considerably\n  higher accuracy, but does so by additional evaluations of the cost\n  function.\n\n  Consider using ``CENTRAL`` differences to begin with. Based on the\n  results, either try forward difference to improve performance or\n  Ridders' method to improve accuracy.\n\n  **WARNING** A common beginner's error when first using\n  :class:`NumericDiffCostFunction` is to get the sizing wrong. In\n  particular, there is a tendency to set the template parameters to\n  (dimension of residual, number of parameters) instead of passing a\n  dimension parameter for *every parameter*. In the example above,\n  that would be ``<MyScalarCostFunctor, 1, 2>``, which is missing the\n  last ``2`` argument. Please be careful when setting the size\n  parameters.\n\n\nNumeric Differentiation & LocalParameterization\n-----------------------------------------------\n\n   If your cost function depends on a parameter block that must lie on\n   a manifold and the functor cannot be evaluated for values of that\n   parameter block not on the manifold then you may have problems\n   numerically differentiating such functors.\n\n   This is because numeric differentiation in Ceres is performed by\n   perturbing the individual coordinates of the parameter blocks that\n   a cost functor depends on. In doing so, we assume that the\n   parameter blocks live in an Euclidean space and ignore the\n   structure of manifold that they live As a result some of the\n   perturbations may not lie on the manifold corresponding to the\n   parameter block.\n\n   For example consider a four dimensional parameter block that is\n   interpreted as a unit Quaternion. Perturbing the coordinates of\n   this parameter block will violate the unit norm property of the\n   parameter block.\n\n   Fixing this problem requires that :class:`NumericDiffCostFunction`\n   be aware of the :class:`LocalParameterization` associated with each\n   parameter block and only generate perturbations in the local\n   tangent space of each parameter block.\n\n   For now this is not considered to be a serious enough problem to\n   warrant changing the :class:`NumericDiffCostFunction` API. Further,\n   in most cases it is relatively straightforward to project a point\n   off the manifold back onto the manifold before using it in the\n   functor. For example in case of the Quaternion, normalizing the\n   4-vector before using it does the trick.\n\n   **Alternate Interface**\n\n   For a variety of reasons, including compatibility with legacy code,\n   :class:`NumericDiffCostFunction` can also take\n   :class:`CostFunction` objects as input. The following describes\n   how.\n\n   To get a numerically differentiated cost function, define a\n   subclass of :class:`CostFunction` such that the\n   :func:`CostFunction::Evaluate` function ignores the ``jacobians``\n   parameter. The numeric differentiation wrapper will fill in the\n   jacobian parameter if necessary by repeatedly calling the\n   :func:`CostFunction::Evaluate` with small changes to the\n   appropriate parameters, and computing the slope. For performance,\n   the numeric differentiation wrapper class is templated on the\n   concrete cost function, even though it could be implemented only in\n   terms of the :class:`CostFunction` interface.\n\n   The numerically differentiated version of a cost function for a\n   cost function can be constructed as follows:\n\n   .. code-block:: c++\n\n     CostFunction* cost_function\n         = new NumericDiffCostFunction<MyCostFunction, CENTRAL, 1, 4, 8>(\n             new MyCostFunction(...), TAKE_OWNERSHIP);\n\n   where ``MyCostFunction`` has 1 residual and 2 parameter blocks with\n   sizes 4 and 8 respectively. Look at the tests for a more detailed\n   example.\n\n:class:`DynamicNumericDiffCostFunction`\n=======================================\n\n.. class:: DynamicNumericDiffCostFunction\n\n   Like :class:`AutoDiffCostFunction` :class:`NumericDiffCostFunction`\n   requires that the number of parameter blocks and their sizes be\n   known at compile time. It also has an upper limit of 10 parameter\n   blocks. In a number of applications, this is not enough.\n\n     .. code-block:: c++\n\n      template <typename CostFunctor, NumericDiffMethodType method = CENTRAL>\n      class DynamicNumericDiffCostFunction : public CostFunction {\n      };\n\n   In such cases when numeric differentiation is desired,\n   :class:`DynamicNumericDiffCostFunction` can be used.\n\n   Like :class:`NumericDiffCostFunction` the user must define a\n   functor, but the signature of the functor differs slightly. The\n   expected interface for the cost functors is:\n\n     .. code-block:: c++\n\n       struct MyCostFunctor {\n         bool operator()(double const* const* parameters, double* residuals) const {\n         }\n       }\n\n   Since the sizing of the parameters is done at runtime, you must\n   also specify the sizes after creating the dynamic numeric diff cost\n   function. For example:\n\n     .. code-block:: c++\n\n       DynamicNumericDiffCostFunction<MyCostFunctor>* cost_function =\n         new DynamicNumericDiffCostFunction<MyCostFunctor>(new MyCostFunctor);\n       cost_function->AddParameterBlock(5);\n       cost_function->AddParameterBlock(10);\n       cost_function->SetNumResiduals(21);\n\n   As a rule of thumb, try using :class:`NumericDiffCostFunction` before\n   you use :class:`DynamicNumericDiffCostFunction`.\n\n   **WARNING** The same caution about mixing local parameterizations\n   with numeric differentiation applies as is the case with\n   :class:`NumericDiffCostFunction`.\n\n:class:`CostFunctionToFunctor`\n==============================\n\n.. class:: CostFunctionToFunctor\n\n   :class:`CostFunctionToFunctor` is an adapter class that allows\n   users to use :class:`CostFunction` objects in templated functors\n   which are to be used for automatic differentiation. This allows\n   the user to seamlessly mix analytic, numeric and automatic\n   differentiation.\n\n   For example, let us assume that\n\n   .. code-block:: c++\n\n     class IntrinsicProjection : public SizedCostFunction<2, 5, 3> {\n       public:\n         IntrinsicProjection(const double* observation);\n         virtual bool Evaluate(double const* const* parameters,\n                               double* residuals,\n                               double** jacobians) const;\n     };\n\n   is a :class:`CostFunction` that implements the projection of a\n   point in its local coordinate system onto its image plane and\n   subtracts it from the observed point projection. It can compute its\n   residual and either via analytic or numerical differentiation can\n   compute its jacobians.\n\n   Now we would like to compose the action of this\n   :class:`CostFunction` with the action of camera extrinsics, i.e.,\n   rotation and translation. Say we have a templated function\n\n   .. code-block:: c++\n\n      template<typename T>\n      void RotateAndTranslatePoint(const T* rotation,\n                                   const T* translation,\n                                   const T* point,\n                                   T* result);\n\n\n   Then we can now do the following,\n\n   .. code-block:: c++\n\n    struct CameraProjection {\n      CameraProjection(double* observation)\n      : intrinsic_projection_(new IntrinsicProjection(observation)) {\n      }\n\n      template <typename T>\n      bool operator()(const T* rotation,\n                      const T* translation,\n                      const T* intrinsics,\n                      const T* point,\n                      T* residual) const {\n        T transformed_point[3];\n        RotateAndTranslatePoint(rotation, translation, point, transformed_point);\n\n        // Note that we call intrinsic_projection_, just like it was\n        // any other templated functor.\n        return intrinsic_projection_(intrinsics, transformed_point, residual);\n      }\n\n     private:\n      CostFunctionToFunctor<2,5,3> intrinsic_projection_;\n    };\n\n   Note that :class:`CostFunctionToFunctor` takes ownership of the\n   :class:`CostFunction` that was passed in to the constructor.\n\n   In the above example, we assumed that ``IntrinsicProjection`` is a\n   ``CostFunction`` capable of evaluating its value and its\n   derivatives. Suppose, if that were not the case and\n   ``IntrinsicProjection`` was defined as follows:\n\n   .. code-block:: c++\n\n    struct IntrinsicProjection {\n      IntrinsicProjection(const double* observation) {\n        observation_[0] = observation[0];\n        observation_[1] = observation[1];\n      }\n\n      bool operator()(const double* calibration,\n                      const double* point,\n                      double* residuals) const {\n        double projection[2];\n        ThirdPartyProjectionFunction(calibration, point, projection);\n        residuals[0] = observation_[0] - projection[0];\n        residuals[1] = observation_[1] - projection[1];\n        return true;\n      }\n      double observation_[2];\n    };\n\n\n  Here ``ThirdPartyProjectionFunction`` is some third party library\n  function that we have no control over. So this function can compute\n  its value and we would like to use numeric differentiation to\n  compute its derivatives. In this case we can use a combination of\n  ``NumericDiffCostFunction`` and ``CostFunctionToFunctor`` to get the\n  job done.\n\n  .. code-block:: c++\n\n   struct CameraProjection {\n     CameraProjection(double* observation)\n        : intrinsic_projection_(\n              new NumericDiffCostFunction<IntrinsicProjection, CENTRAL, 2, 5, 3>(\n                  new IntrinsicProjection(observation))) {}\n\n     template <typename T>\n     bool operator()(const T* rotation,\n                     const T* translation,\n                     const T* intrinsics,\n                     const T* point,\n                     T* residuals) const {\n       T transformed_point[3];\n       RotateAndTranslatePoint(rotation, translation, point, transformed_point);\n       return intrinsic_projection_(intrinsics, transformed_point, residuals);\n     }\n\n    private:\n     CostFunctionToFunctor<2, 5, 3> intrinsic_projection_;\n   };\n\n\n:class:`DynamicCostFunctionToFunctor`\n=====================================\n\n.. class:: DynamicCostFunctionToFunctor\n\n   :class:`DynamicCostFunctionToFunctor` provides the same functionality as\n   :class:`CostFunctionToFunctor` for cases where the number and size of the\n   parameter vectors and residuals are not known at compile-time. The API\n   provided by :class:`DynamicCostFunctionToFunctor` matches what would be\n   expected by :class:`DynamicAutoDiffCostFunction`, i.e. it provides a\n   templated functor of this form:\n\n   .. code-block:: c++\n\n    template<typename T>\n    bool operator()(T const* const* parameters, T* residuals) const;\n\n   Similar to the example given for :class:`CostFunctionToFunctor`, let us\n   assume that\n\n   .. code-block:: c++\n\n     class IntrinsicProjection : public CostFunction {\n       public:\n         IntrinsicProjection(const double* observation);\n         virtual bool Evaluate(double const* const* parameters,\n                               double* residuals,\n                               double** jacobians) const;\n     };\n\n   is a :class:`CostFunction` that projects a point in its local coordinate\n   system onto its image plane and subtracts it from the observed point\n   projection.\n\n   Using this :class:`CostFunction` in a templated functor would then look like\n   this:\n\n   .. code-block:: c++\n\n    struct CameraProjection {\n      CameraProjection(double* observation)\n          : intrinsic_projection_(new IntrinsicProjection(observation)) {\n      }\n\n      template <typename T>\n      bool operator()(T const* const* parameters,\n                      T* residual) const {\n        const T* rotation = parameters[0];\n        const T* translation = parameters[1];\n        const T* intrinsics = parameters[2];\n        const T* point = parameters[3];\n\n        T transformed_point[3];\n        RotateAndTranslatePoint(rotation, translation, point, transformed_point);\n\n        const T* projection_parameters[2];\n        projection_parameters[0] = intrinsics;\n        projection_parameters[1] = transformed_point;\n        return intrinsic_projection_(projection_parameters, residual);\n      }\n\n     private:\n      DynamicCostFunctionToFunctor intrinsic_projection_;\n    };\n\n   Like :class:`CostFunctionToFunctor`, :class:`DynamicCostFunctionToFunctor`\n   takes ownership of the :class:`CostFunction` that was passed in to the\n   constructor.\n\n:class:`ConditionedCostFunction`\n================================\n\n.. class:: ConditionedCostFunction\n\n   This class allows you to apply different conditioning to the residual\n   values of a wrapped cost function. An example where this is useful is\n   where you have an existing cost function that produces N values, but you\n   want the total cost to be something other than just the sum of these\n   squared values - maybe you want to apply a different scaling to some\n   values, to change their contribution to the cost.\n\n   Usage:\n\n   .. code-block:: c++\n\n       //  my_cost_function produces N residuals\n       CostFunction* my_cost_function = ...\n       CHECK_EQ(N, my_cost_function->num_residuals());\n       vector<CostFunction*> conditioners;\n\n       //  Make N 1x1 cost functions (1 parameter, 1 residual)\n       CostFunction* f_1 = ...\n       conditioners.push_back(f_1);\n\n       CostFunction* f_N = ...\n       conditioners.push_back(f_N);\n       ConditionedCostFunction* ccf =\n         new ConditionedCostFunction(my_cost_function, conditioners);\n\n\n   Now ``ccf`` 's ``residual[i]`` (i=0..N-1) will be passed though the\n   :math:`i^{\\text{th}}` conditioner.\n\n   .. code-block:: c++\n\n      ccf_residual[i] = f_i(my_cost_function_residual[i])\n\n   and the Jacobian will be affected appropriately.\n\n\n:class:`GradientChecker`\n================================\n\n.. class:: GradientChecker\n\n    This class compares the Jacobians returned by a cost function against\n    derivatives estimated using finite differencing. It is meant as a tool for\n    unit testing, giving you more fine-grained control than the check_gradients\n    option in the solver options.\n\n    The condition enforced is that\n\n    .. math:: \\forall{i,j}: \\frac{J_{ij} - J'_{ij}}{max_{ij}(J_{ij} - J'_{ij})} < r\n\n    where :math:`J_{ij}` is the jacobian as computed by the supplied cost\n    function (by the user) multiplied by the local parameterization Jacobian,\n    :math:`J'_{ij}` is the jacobian as computed by finite differences,\n    multiplied by the local parameterization Jacobian as well, and :math:`r`\n    is the relative precision.\n\n   Usage:\n\n   .. code-block:: c++\n\n       //  my_cost_function takes two parameter blocks. The first has a local\n       //  parameterization associated with it.\n       CostFunction* my_cost_function = ...\n       LocalParameterization* my_parameterization = ...\n       NumericDiffOptions numeric_diff_options;\n\n       std::vector<LocalParameterization*> local_parameterizations;\n       local_parameterizations.push_back(my_parameterization);\n       local_parameterizations.push_back(NULL);\n\n       std::vector parameter1;\n       std::vector parameter2;\n       // Fill parameter 1 & 2 with test data...\n\n       std::vector<double*> parameter_blocks;\n       parameter_blocks.push_back(parameter1.data());\n       parameter_blocks.push_back(parameter2.data());\n\n       GradientChecker gradient_checker(my_cost_function,\n           local_parameterizations, numeric_diff_options);\n       GradientCheckResults results;\n       if (!gradient_checker.Probe(parameter_blocks.data(), 1e-9, &results) {\n         LOG(ERROR) << \"An error has occurred:\\n\" << results.error_log;\n       }\n\n\n:class:`NormalPrior`\n====================\n\n.. class:: NormalPrior\n\n   .. code-block:: c++\n\n     class NormalPrior: public CostFunction {\n      public:\n       // Check that the number of rows in the vector b are the same as the\n       // number of columns in the matrix A, crash otherwise.\n       NormalPrior(const Matrix& A, const Vector& b);\n\n       virtual bool Evaluate(double const* const* parameters,\n                             double* residuals,\n                             double** jacobians) const;\n      };\n\n   Implements a cost function of the form\n\n   .. math::  cost(x) = ||A(x - b)||^2\n\n   where, the matrix :math:`A` and the vector :math:`b` are fixed and :math:`x`\n   is the variable. In case the user is interested in implementing a cost\n   function of the form\n\n  .. math::  cost(x) = (x - \\mu)^T S^{-1} (x - \\mu)\n\n  where, :math:`\\mu` is a vector and :math:`S` is a covariance matrix,\n  then, :math:`A = S^{-1/2}`, i.e the matrix :math:`A` is the square\n  root of the inverse of the covariance, also known as the stiffness\n  matrix. There are however no restrictions on the shape of\n  :math:`A`. It is free to be rectangular, which would be the case if\n  the covariance matrix :math:`S` is rank deficient.\n\n\n\n.. _`section-loss_function`:\n\n:class:`LossFunction`\n=====================\n\n.. class:: LossFunction\n\n   For least squares problems where the minimization may encounter\n   input terms that contain outliers, that is, completely bogus\n   measurements, it is important to use a loss function that reduces\n   their influence.\n\n   Consider a structure from motion problem. The unknowns are 3D\n   points and camera parameters, and the measurements are image\n   coordinates describing the expected reprojected position for a\n   point in a camera. For example, we want to model the geometry of a\n   street scene with fire hydrants and cars, observed by a moving\n   camera with unknown parameters, and the only 3D points we care\n   about are the pointy tippy-tops of the fire hydrants. Our magic\n   image processing algorithm, which is responsible for producing the\n   measurements that are input to Ceres, has found and matched all\n   such tippy-tops in all image frames, except that in one of the\n   frame it mistook a car's headlight for a hydrant. If we didn't do\n   anything special the residual for the erroneous measurement will\n   result in the entire solution getting pulled away from the optimum\n   to reduce the large error that would otherwise be attributed to the\n   wrong measurement.\n\n   Using a robust loss function, the cost for large residuals is\n   reduced. In the example above, this leads to outlier terms getting\n   down-weighted so they do not overly influence the final solution.\n\n   .. code-block:: c++\n\n    class LossFunction {\n     public:\n      virtual void Evaluate(double s, double out[3]) const = 0;\n    };\n\n\n   The key method is :func:`LossFunction::Evaluate`, which given a\n   non-negative scalar ``s``, computes\n\n   .. math:: out = \\begin{bmatrix}\\rho(s), & \\rho'(s), & \\rho''(s)\\end{bmatrix}\n\n   Here the convention is that the contribution of a term to the cost\n   function is given by :math:`\\frac{1}{2}\\rho(s)`, where :math:`s\n   =\\|f_i\\|^2`. Calling the method with a negative value of :math:`s`\n   is an error and the implementations are not required to handle that\n   case.\n\n   Most sane choices of :math:`\\rho` satisfy:\n\n   .. math::\n\n      \\rho(0) &= 0\\\\\n      \\rho'(0) &= 1\\\\\n      \\rho'(s) &< 1 \\text{ in the outlier region}\\\\\n      \\rho''(s) &< 0 \\text{ in the outlier region}\n\n   so that they mimic the squared cost for small residuals.\n\n   **Scaling**\n\n   Given one robustifier :math:`\\rho(s)` one can change the length\n   scale at which robustification takes place, by adding a scale\n   factor :math:`a > 0` which gives us :math:`\\rho(s,a) = a^2 \\rho(s /\n   a^2)` and the first and second derivatives as :math:`\\rho'(s /\n   a^2)` and :math:`(1 / a^2) \\rho''(s / a^2)` respectively.\n\n\n   The reason for the appearance of squaring is that :math:`a` is in\n   the units of the residual vector norm whereas :math:`s` is a squared\n   norm. For applications it is more convenient to specify :math:`a` than\n   its square.\n\nInstances\n---------\n\nCeres includes a number of predefined loss functions. For simplicity\nwe described their unscaled versions. The figure below illustrates\ntheir shape graphically. More details can be found in\n``include/ceres/loss_function.h``.\n\n.. figure:: loss.png\n   :figwidth: 500px\n   :height: 400px\n   :align: center\n\n   Shape of the various common loss functions.\n\n.. class:: TrivialLoss\n\n      .. math:: \\rho(s) = s\n\n.. class:: HuberLoss\n\n   .. math:: \\rho(s) = \\begin{cases} s & s \\le 1\\\\ 2 \\sqrt{s} - 1 & s > 1 \\end{cases}\n\n.. class:: SoftLOneLoss\n\n   .. math:: \\rho(s) = 2 (\\sqrt{1+s} - 1)\n\n.. class:: CauchyLoss\n\n   .. math:: \\rho(s) = \\log(1 + s)\n\n.. class:: ArctanLoss\n\n   .. math:: \\rho(s) = \\arctan(s)\n\n.. class:: TolerantLoss\n\n   .. math:: \\rho(s,a,b) = b \\log(1 + e^{(s - a) / b}) - b \\log(1 + e^{-a / b})\n\n.. class:: ComposedLoss\n\n   Given two loss functions ``f`` and ``g``, implements the loss\n   function ``h(s) = f(g(s))``.\n\n   .. code-block:: c++\n\n      class ComposedLoss : public LossFunction {\n       public:\n        explicit ComposedLoss(const LossFunction* f,\n                              Ownership ownership_f,\n                              const LossFunction* g,\n                              Ownership ownership_g);\n      };\n\n.. class:: ScaledLoss\n\n   Sometimes you want to simply scale the output value of the\n   robustifier. For example, you might want to weight different error\n   terms differently (e.g., weight pixel reprojection errors\n   differently from terrain errors).\n\n   Given a loss function :math:`\\rho(s)` and a scalar :math:`a`, :class:`ScaledLoss`\n   implements the function :math:`a \\rho(s)`.\n\n   Since we treat a ``NULL`` Loss function as the Identity loss\n   function, :math:`rho` = ``NULL``: is a valid input and will result\n   in the input being scaled by :math:`a`. This provides a simple way\n   of implementing a scaled ResidualBlock.\n\n.. class:: LossFunctionWrapper\n\n   Sometimes after the optimization problem has been constructed, we\n   wish to mutate the scale of the loss function. For example, when\n   performing estimation from data which has substantial outliers,\n   convergence can be improved by starting out with a large scale,\n   optimizing the problem and then reducing the scale. This can have\n   better convergence behavior than just using a loss function with a\n   small scale.\n\n   This templated class allows the user to implement a loss function\n   whose scale can be mutated after an optimization problem has been\n   constructed, e.g,\n\n   .. code-block:: c++\n\n     Problem problem;\n\n     // Add parameter blocks\n\n     CostFunction* cost_function =\n         new AutoDiffCostFunction < UW_Camera_Mapper, 2, 9, 3>(\n             new UW_Camera_Mapper(feature_x, feature_y));\n\n     LossFunctionWrapper* loss_function(new HuberLoss(1.0), TAKE_OWNERSHIP);\n     problem.AddResidualBlock(cost_function, loss_function, parameters);\n\n     Solver::Options options;\n     Solver::Summary summary;\n     Solve(options, &problem, &summary);\n\n     loss_function->Reset(new HuberLoss(1.0), TAKE_OWNERSHIP);\n     Solve(options, &problem, &summary);\n\n\nTheory\n------\n\nLet us consider a problem with a single problem and a single parameter\nblock.\n\n.. math::\n\n \\min_x \\frac{1}{2}\\rho(f^2(x))\n\n\nThen, the robustified gradient and the Gauss-Newton Hessian are\n\n.. math::\n\n        g(x) &= \\rho'J^\\top(x)f(x)\\\\\n        H(x) &= J^\\top(x)\\left(\\rho' + 2 \\rho''f(x)f^\\top(x)\\right)J(x)\n\nwhere the terms involving the second derivatives of :math:`f(x)` have\nbeen ignored. Note that :math:`H(x)` is indefinite if\n:math:`\\rho''f(x)^\\top f(x) + \\frac{1}{2}\\rho' < 0`. If this is not\nthe case, then its possible to re-weight the residual and the Jacobian\nmatrix such that the corresponding linear least squares problem for\nthe robustified Gauss-Newton step.\n\n\nLet :math:`\\alpha` be a root of\n\n.. math:: \\frac{1}{2}\\alpha^2 - \\alpha - \\frac{\\rho''}{\\rho'}\\|f(x)\\|^2 = 0.\n\n\nThen, define the rescaled residual and Jacobian as\n\n.. math::\n\n        \\tilde{f}(x) &= \\frac{\\sqrt{\\rho'}}{1 - \\alpha} f(x)\\\\\n        \\tilde{J}(x) &= \\sqrt{\\rho'}\\left(1 - \\alpha\n                        \\frac{f(x)f^\\top(x)}{\\left\\|f(x)\\right\\|^2} \\right)J(x)\n\n\nIn the case :math:`2 \\rho''\\left\\|f(x)\\right\\|^2 + \\rho' \\lesssim 0`,\nwe limit :math:`\\alpha \\le 1- \\epsilon` for some small\n:math:`\\epsilon`. For more details see [Triggs]_.\n\nWith this simple rescaling, one can use any Jacobian based non-linear\nleast squares algorithm to robustified non-linear least squares\nproblems.\n\n\n:class:`LocalParameterization`\n==============================\n\n.. class:: LocalParameterization\n\n   .. code-block:: c++\n\n     class LocalParameterization {\n      public:\n       virtual ~LocalParameterization() {}\n       virtual bool Plus(const double* x,\n                         const double* delta,\n                         double* x_plus_delta) const = 0;\n       virtual bool ComputeJacobian(const double* x, double* jacobian) const = 0;\n       virtual bool MultiplyByJacobian(const double* x,\n                                       const int num_rows,\n                                       const double* global_matrix,\n                                       double* local_matrix) const;\n       virtual int GlobalSize() const = 0;\n       virtual int LocalSize() const = 0;\n     };\n\n   Sometimes the parameters :math:`x` can overparameterize a\n   problem. In that case it is desirable to choose a parameterization\n   to remove the null directions of the cost. More generally, if\n   :math:`x` lies on a manifold of a smaller dimension than the\n   ambient space that it is embedded in, then it is numerically and\n   computationally more effective to optimize it using a\n   parameterization that lives in the tangent space of that manifold\n   at each point.\n\n   For example, a sphere in three dimensions is a two dimensional\n   manifold, embedded in a three dimensional space. At each point on\n   the sphere, the plane tangent to it defines a two dimensional\n   tangent space. For a cost function defined on this sphere, given a\n   point :math:`x`, moving in the direction normal to the sphere at\n   that point is not useful. Thus a better way to parameterize a point\n   on a sphere is to optimize over two dimensional vector\n   :math:`\\Delta x` in the tangent space at the point on the sphere\n   point and then \"move\" to the point :math:`x + \\Delta x`, where the\n   move operation involves projecting back onto the sphere. Doing so\n   removes a redundant dimension from the optimization, making it\n   numerically more robust and efficient.\n\n   More generally we can define a function\n\n   .. math:: x' = \\boxplus(x, \\Delta x),\n\n   where :math:`x'` has the same size as :math:`x`, and :math:`\\Delta\n   x` is of size less than or equal to :math:`x`. The function\n   :math:`\\boxplus`, generalizes the definition of vector\n   addition. Thus it satisfies the identity\n\n   .. math:: \\boxplus(x, 0) = x,\\quad \\forall x.\n\n   Instances of :class:`LocalParameterization` implement the\n   :math:`\\boxplus` operation and its derivative with respect to\n   :math:`\\Delta x` at :math:`\\Delta x = 0`.\n\n\n.. function:: int LocalParameterization::GlobalSize()\n\n   The dimension of the ambient space in which the parameter block\n   :math:`x` lives.\n\n.. function:: int LocalParameterization::LocalSize()\n\n   The size of the tangent space\n   that :math:`\\Delta x` lives in.\n\n.. function:: bool LocalParameterization::Plus(const double* x, const double* delta, double* x_plus_delta) const\n\n    :func:`LocalParameterization::Plus` implements :math:`\\boxplus(x,\\Delta x)`.\n\n.. function:: bool LocalParameterization::ComputeJacobian(const double* x, double* jacobian) const\n\n   Computes the Jacobian matrix\n\n   .. math:: J = \\left . \\frac{\\partial }{\\partial \\Delta x} \\boxplus(x,\\Delta x)\\right|_{\\Delta x = 0}\n\n   in row major form.\n\n.. function:: bool MultiplyByJacobian(const double* x, const int num_rows, const double* global_matrix, double* local_matrix) const\n\n   local_matrix = global_matrix * jacobian\n\n   global_matrix is a num_rows x GlobalSize  row major matrix.\n   local_matrix is a num_rows x LocalSize row major matrix.\n   jacobian is the matrix returned by :func:`LocalParameterization::ComputeJacobian` at :math:`x`.\n\n   This is only used by GradientProblem. For most normal uses, it is\n   okay to use the default implementation.\n\nInstances\n---------\n\n.. class:: IdentityParameterization\n\n   A trivial version of :math:`\\boxplus` is when :math:`\\Delta x` is\n   of the same size as :math:`x` and\n\n   .. math::  \\boxplus(x, \\Delta x) = x + \\Delta x\n\n.. class:: SubsetParameterization\n\n   A more interesting case if :math:`x` is a two dimensional vector,\n   and the user wishes to hold the first coordinate constant. Then,\n   :math:`\\Delta x` is a scalar and :math:`\\boxplus` is defined as\n\n   .. math::\n\n      \\boxplus(x, \\Delta x) = x + \\left[ \\begin{array}{c} 0 \\\\ 1\n                                  \\end{array} \\right] \\Delta x\n\n   :class:`SubsetParameterization` generalizes this construction to\n   hold any part of a parameter block constant.\n\n.. class:: QuaternionParameterization\n\n   Another example that occurs commonly in Structure from Motion\n   problems is when camera rotations are parameterized using a\n   quaternion. There, it is useful only to make updates orthogonal to\n   that 4-vector defining the quaternion. One way to do this is to let\n   :math:`\\Delta x` be a 3 dimensional vector and define\n   :math:`\\boxplus` to be\n\n    .. math:: \\boxplus(x, \\Delta x) = \\left[ \\cos(|\\Delta x|), \\frac{\\sin\\left(|\\Delta x|\\right)}{|\\Delta x|} \\Delta x \\right] * x\n      :label: quaternion\n\n   The multiplication between the two 4-vectors on the right hand side\n   is the standard quaternion\n   product. :class:`QuaternionParameterization` is an implementation\n   of :eq:`quaternion`.\n\n.. class:: EigenQuaternionParameterization\n\n   Eigen uses a different internal memory layout for the elements of the\n   quaternion than what is commonly used. Specifically, Eigen stores the\n   elements in memory as [x, y, z, w] where the real part is last\n   whereas it is typically stored first. Note, when creating an Eigen\n   quaternion through the constructor the elements are accepted in w, x,\n   y, z order. Since Ceres operates on parameter blocks which are raw\n   double pointers this difference is important and requires a different\n   parameterization. :class:`EigenQuaternionParameterization` uses the\n   same update as :class:`QuaternionParameterization` but takes into\n   account Eigen's internal memory element ordering.\n\n.. _`homogeneous_vector_parameterization`:\n.. class:: HomogeneousVectorParameterization\n\n   In computer vision, homogeneous vectors are commonly used to\n   represent entities in projective geometry such as points in\n   projective space. One example where it is useful to use this\n   over-parameterization is in representing points whose triangulation\n   is ill-conditioned. Here it is advantageous to use homogeneous\n   vectors, instead of an Euclidean vector, because it can represent\n   points at infinity.\n\n   When using homogeneous vectors it is useful to only make updates\n   orthogonal to that :math:`n`-vector defining the homogeneous\n   vector [HartleyZisserman]_. One way to do this is to let :math:`\\Delta x`\n   be a :math:`n-1` dimensional vector and define :math:`\\boxplus` to be\n\n    .. math:: \\boxplus(x, \\Delta x) = \\left[ \\frac{\\sin\\left(0.5 |\\Delta x|\\right)}{|\\Delta x|} \\Delta x, \\cos(0.5 |\\Delta x|) \\right] * x\n\n   The multiplication between the two vectors on the right hand side\n   is defined as an operator which applies the update orthogonal to\n   :math:`x` to remain on the sphere. Note, it is assumed that\n   last element of :math:`x` is the scalar component of the homogeneous\n   vector.\n\n.. class:: LineParameterization\n\n   This class provides a parameterization for lines, where the line is\n   over-parameterized by an origin point and a direction vector. So the\n   parameter vector size needs to be two times the ambient space dimension,\n   where the first half is interpreted as the origin point and the second\n   half as the direction.\n\n   To give an example: Given n distinct points in 3D (measurements) we search\n   for the line which has the closest distance to all of these. We parameterize\n   the line with a 3D origin point and a 3D direction vector. As a cost\n   function the distance between the line and the given points is used.\n   We use six parameters for the line (two 3D vectors) but a line in 3D only\n   has four degrees of freedom. To make the over-parameterization visible to\n   the optimizer and covariance estimator this line parameterization can be\n   used.\n\n   The plus operator for the line direction is the same as for the\n   :ref:`HomogeneousVectorParameterization <homogeneous_vector_parameterization>`.\n   The update of the origin point is perpendicular to the line direction\n   before the update.\n\n.. class:: ProductParameterization\n\n   Consider an optimization problem over the space of rigid\n   transformations :math:`SE(3)`, which is the Cartesian product of\n   :math:`SO(3)` and :math:`\\mathbb{R}^3`. Suppose you are using\n   Quaternions to represent the rotation, Ceres ships with a local\n   parameterization for that and :math:`\\mathbb{R}^3` requires no, or\n   :class:`IdentityParameterization` parameterization. So how do we\n   construct a local parameterization for a parameter block a rigid\n   transformation?\n\n   In cases, where a parameter block is the Cartesian product of a\n   number of manifolds and you have the local parameterization of the\n   individual manifolds available, :class:`ProductParameterization`\n   can be used to construct a local parameterization of the cartesian\n   product. For the case of the rigid transformation, where say you\n   have a parameter block of size 7, where the first four entries\n   represent the rotation as a quaternion, a local parameterization\n   can be constructed as\n\n   .. code-block:: c++\n\n     ProductParameterization se3_param(new QuaternionParameterization(),\n                                       new IdentityParameterization(3));\n\n\n:class:`AutoDiffLocalParameterization`\n======================================\n\n.. class:: AutoDiffLocalParameterization\n\n  :class:`AutoDiffLocalParameterization` does for\n  :class:`LocalParameterization` what :class:`AutoDiffCostFunction`\n  does for :class:`CostFunction`. It allows the user to define a\n  templated functor that implements the\n  :func:`LocalParameterization::Plus` operation and it uses automatic\n  differentiation to implement the computation of the Jacobian.\n\n  To get an auto differentiated local parameterization, you must\n  define a class with a templated operator() (a functor) that computes\n\n     .. math:: x' = \\boxplus(x, \\Delta x),\n\n  For example, Quaternions have a three dimensional local\n  parameterization. Its plus operation can be implemented as (taken\n  from `internal/ceres/autodiff_local_parameterization_test.cc\n  <https://ceres-solver.googlesource.com/ceres-solver/+/master/internal/ceres/autodiff_local_parameterization_test.cc>`_\n  )\n\n    .. code-block:: c++\n\n      struct QuaternionPlus {\n        template<typename T>\n        bool operator()(const T* x, const T* delta, T* x_plus_delta) const {\n          const T squared_norm_delta =\n              delta[0] * delta[0] + delta[1] * delta[1] + delta[2] * delta[2];\n\n          T q_delta[4];\n          if (squared_norm_delta > 0.0) {\n            T norm_delta = sqrt(squared_norm_delta);\n            const T sin_delta_by_delta = sin(norm_delta) / norm_delta;\n            q_delta[0] = cos(norm_delta);\n            q_delta[1] = sin_delta_by_delta * delta[0];\n            q_delta[2] = sin_delta_by_delta * delta[1];\n            q_delta[3] = sin_delta_by_delta * delta[2];\n          } else {\n            // We do not just use q_delta = [1,0,0,0] here because that is a\n            // constant and when used for automatic differentiation will\n            // lead to a zero derivative. Instead we take a first order\n            // approximation and evaluate it at zero.\n            q_delta[0] = T(1.0);\n            q_delta[1] = delta[0];\n            q_delta[2] = delta[1];\n            q_delta[3] = delta[2];\n          }\n\n          Quaternionproduct(q_delta, x, x_plus_delta);\n          return true;\n        }\n      };\n\n  Given this struct, the auto differentiated local\n  parameterization can now be constructed as\n\n  .. code-block:: c++\n\n     LocalParameterization* local_parameterization =\n         new AutoDiffLocalParameterization<QuaternionPlus, 4, 3>;\n                                                           |  |\n                                Global Size ---------------+  |\n                                Local Size -------------------+\n\n\n:class:`Problem`\n================\n\n.. class:: Problem\n\n   :class:`Problem` holds the robustified bounds constrained\n   non-linear least squares problem :eq:`ceresproblem_modeling`. To\n   create a least squares problem, use the\n   :func:`Problem::AddResidualBlock` and\n   :func:`Problem::AddParameterBlock` methods.\n\n   For example a problem containing 3 parameter blocks of sizes 3, 4\n   and 5 respectively and two residual blocks of size 2 and 6:\n\n   .. code-block:: c++\n\n     double x1[] = { 1.0, 2.0, 3.0 };\n     double x2[] = { 1.0, 2.0, 3.0, 5.0 };\n     double x3[] = { 1.0, 2.0, 3.0, 6.0, 7.0 };\n\n     Problem problem;\n     problem.AddResidualBlock(new MyUnaryCostFunction(...), x1);\n     problem.AddResidualBlock(new MyBinaryCostFunction(...), x2, x3);\n\n   :func:`Problem::AddResidualBlock` as the name implies, adds a\n   residual block to the problem. It adds a :class:`CostFunction`, an\n   optional :class:`LossFunction` and connects the\n   :class:`CostFunction` to a set of parameter block.\n\n   The cost function carries with it information about the sizes of\n   the parameter blocks it expects. The function checks that these\n   match the sizes of the parameter blocks listed in\n   ``parameter_blocks``. The program aborts if a mismatch is\n   detected. ``loss_function`` can be ``NULL``, in which case the cost\n   of the term is just the squared norm of the residuals.\n\n   The user has the option of explicitly adding the parameter blocks\n   using :func:`Problem::AddParameterBlock`. This causes additional\n   correctness checking; however, :func:`Problem::AddResidualBlock`\n   implicitly adds the parameter blocks if they are not present, so\n   calling :func:`Problem::AddParameterBlock` explicitly is not\n   required.\n\n   :func:`Problem::AddParameterBlock` explicitly adds a parameter\n   block to the :class:`Problem`. Optionally it allows the user to\n   associate a :class:`LocalParameterization` object with the\n   parameter block too. Repeated calls with the same arguments are\n   ignored. Repeated calls with the same double pointer but a\n   different size results in undefined behavior.\n\n   You can set any parameter block to be constant using\n   :func:`Problem::SetParameterBlockConstant` and undo this using\n   :func:`SetParameterBlockVariable`.\n\n   In fact you can set any number of parameter blocks to be constant,\n   and Ceres is smart enough to figure out what part of the problem\n   you have constructed depends on the parameter blocks that are free\n   to change and only spends time solving it. So for example if you\n   constructed a problem with a million parameter blocks and 2 million\n   residual blocks, but then set all but one parameter blocks to be\n   constant and say only 10 residual blocks depend on this one\n   non-constant parameter block. Then the computational effort Ceres\n   spends in solving this problem will be the same if you had defined\n   a problem with one parameter block and 10 residual blocks.\n\n   **Ownership**\n\n   :class:`Problem` by default takes ownership of the\n   ``cost_function``, ``loss_function`` and ``local_parameterization``\n   pointers. These objects remain live for the life of the\n   :class:`Problem`. If the user wishes to keep control over the\n   destruction of these objects, then they can do this by setting the\n   corresponding enums in the :class:`Problem::Options` struct.\n\n   Note that even though the Problem takes ownership of ``cost_function``\n   and ``loss_function``, it does not preclude the user from re-using\n   them in another residual block. The destructor takes care to call\n   delete on each ``cost_function`` or ``loss_function`` pointer only\n   once, regardless of how many residual blocks refer to them.\n\n.. class:: Problem::Options\n\n   Options struct that is used to control :class:`Problem::`.\n\n.. member:: Ownership Problem::Options::cost_function_ownership\n\n   Default: ``TAKE_OWNERSHIP``\n\n   This option controls whether the Problem object owns the cost\n   functions.\n\n   If set to TAKE_OWNERSHIP, then the problem object will delete the\n   cost functions on destruction. The destructor is careful to delete\n   the pointers only once, since sharing cost functions is allowed.\n\n.. member:: Ownership Problem::Options::loss_function_ownership\n\n   Default: ``TAKE_OWNERSHIP``\n\n   This option controls whether the Problem object owns the loss\n   functions.\n\n   If set to TAKE_OWNERSHIP, then the problem object will delete the\n   loss functions on destruction. The destructor is careful to delete\n   the pointers only once, since sharing loss functions is allowed.\n\n.. member:: Ownership Problem::Options::local_parameterization_ownership\n\n   Default: ``TAKE_OWNERSHIP``\n\n   This option controls whether the Problem object owns the local\n   parameterizations.\n\n   If set to TAKE_OWNERSHIP, then the problem object will delete the\n   local parameterizations on destruction. The destructor is careful\n   to delete the pointers only once, since sharing local\n   parameterizations is allowed.\n\n.. member:: bool Problem::Options::enable_fast_removal\n\n    Default: ``false``\n\n    If true, trades memory for faster\n    :member:`Problem::RemoveResidualBlock` and\n    :member:`Problem::RemoveParameterBlock` operations.\n\n    By default, :member:`Problem::RemoveParameterBlock` and\n    :member:`Problem::RemoveResidualBlock` take time proportional to\n    the size of the entire problem.  If you only ever remove\n    parameters or residuals from the problem occasionally, this might\n    be acceptable.  However, if you have memory to spare, enable this\n    option to make :member:`Problem::RemoveParameterBlock` take time\n    proportional to the number of residual blocks that depend on it,\n    and :member:`Problem::RemoveResidualBlock` take (on average)\n    constant time.\n\n    The increase in memory usage is twofold: an additional hash set\n    per parameter block containing all the residuals that depend on\n    the parameter block; and a hash set in the problem containing all\n    residuals.\n\n.. member:: bool Problem::Options::disable_all_safety_checks\n\n    Default: `false`\n\n    By default, Ceres performs a variety of safety checks when\n    constructing the problem. There is a small but measurable\n    performance penalty to these checks, typically around 5% of\n    construction time. If you are sure your problem construction is\n    correct, and 5% of the problem construction time is truly an\n    overhead you want to avoid, then you can set\n    disable_all_safety_checks to true.\n\n    **WARNING** Do not set this to true, unless you are absolutely\n    sure of what you are doing.\n\n.. member:: Context* Problem::Options::context\n\n    Default: `nullptr`\n\n    A Ceres global context to use for solving this problem. This may\n    help to reduce computation time as Ceres can reuse expensive\n    objects to create.  The context object can be `nullptr`, in which\n    case Ceres may create one.\n\n    Ceres does NOT take ownership of the pointer.\n\n.. member:: EvaluationCallback* Problem::Options::evaluation_callback\n\n    Default: `nullptr`\n\n    Using this callback interface, Ceres can notify you when it is\n    about to evaluate the residuals or Jacobians. With the callback,\n    you can share computation between residual blocks by doing the\n    shared computation in\n    :member:`EvaluationCallback::PrepareForEvaluation` before Ceres\n    calls :member:`CostFunction::Evaluate`. It also enables caching\n    results between a pure residual evaluation and a residual &\n    Jacobian evaluation.\n\n    Problem does NOT take ownership of the callback.\n\n    .. NOTE::\n\n       Evaluation callbacks are incompatible with inner iterations. So\n       calling Solve with\n       :member:`Solver::Options::use_inner_iterations` set to `true`\n       on a :class:`Problem` with a non-null evaluation callback is an\n       error.\n\n.. function:: ResidualBlockId Problem::AddResidualBlock(CostFunction* cost_function, LossFunction* loss_function, const vector<double*> parameter_blocks)\n.. function:: ResidualBlockId Problem::AddResidualBlock(CostFunction* cost_function, LossFunction* loss_function, double *x0, double *x1, ...)\n\n   Add a residual block to the overall cost function. The cost\n   function carries with it information about the sizes of the\n   parameter blocks it expects. The function checks that these match\n   the sizes of the parameter blocks listed in parameter_blocks. The\n   program aborts if a mismatch is detected. loss_function can be\n   NULL, in which case the cost of the term is just the squared norm\n   of the residuals.\n\n   The parameter blocks may be passed together as a\n   ``vector<double*>``, or as up to ten separate ``double*`` pointers.\n\n   The user has the option of explicitly adding the parameter blocks\n   using AddParameterBlock. This causes additional correctness\n   checking; however, AddResidualBlock implicitly adds the parameter\n   blocks if they are not present, so calling AddParameterBlock\n   explicitly is not required.\n\n   The Problem object by default takes ownership of the\n   cost_function and loss_function pointers. These objects remain\n   live for the life of the Problem object. If the user wishes to\n   keep control over the destruction of these objects, then they can\n   do this by setting the corresponding enums in the Options struct.\n\n   Note: Even though the Problem takes ownership of cost_function\n   and loss_function, it does not preclude the user from re-using\n   them in another residual block. The destructor takes care to call\n   delete on each cost_function or loss_function pointer only once,\n   regardless of how many residual blocks refer to them.\n\n   Example usage:\n\n   .. code-block:: c++\n\n      double x1[] = {1.0, 2.0, 3.0};\n      double x2[] = {1.0, 2.0, 5.0, 6.0};\n      double x3[] = {3.0, 6.0, 2.0, 5.0, 1.0};\n      vector<double*> v1;\n      v1.push_back(x1);\n      vector<double*> v2;\n      v2.push_back(x2);\n      v2.push_back(x1);\n\n      Problem problem;\n\n      problem.AddResidualBlock(new MyUnaryCostFunction(...), NULL, x1);\n      problem.AddResidualBlock(new MyBinaryCostFunction(...), NULL, x2, x1);\n      problem.AddResidualBlock(new MyUnaryCostFunction(...), NULL, v1);\n      problem.AddResidualBlock(new MyBinaryCostFunction(...), NULL, v2);\n\n.. function:: void Problem::AddParameterBlock(double* values, int size, LocalParameterization* local_parameterization)\n\n   Add a parameter block with appropriate size to the problem.\n   Repeated calls with the same arguments are ignored. Repeated calls\n   with the same double pointer but a different size results in\n   undefined behavior.\n\n.. function:: void Problem::AddParameterBlock(double* values, int size)\n\n   Add a parameter block with appropriate size and parameterization to\n   the problem. Repeated calls with the same arguments are\n   ignored. Repeated calls with the same double pointer but a\n   different size results in undefined behavior.\n\n.. function:: void Problem::RemoveResidualBlock(ResidualBlockId residual_block)\n\n   Remove a residual block from the problem. Any parameters that the residual\n   block depends on are not removed. The cost and loss functions for the\n   residual block will not get deleted immediately; won't happen until the\n   problem itself is deleted.  If Problem::Options::enable_fast_removal is\n   true, then the removal is fast (almost constant time). Otherwise, removing a\n   residual block will incur a scan of the entire Problem object to verify that\n   the residual_block represents a valid residual in the problem.\n\n   **WARNING:** Removing a residual or parameter block will destroy\n   the implicit ordering, rendering the jacobian or residuals returned\n   from the solver uninterpretable. If you depend on the evaluated\n   jacobian, do not use remove! This may change in a future release.\n   Hold the indicated parameter block constant during optimization.\n\n.. function:: void Problem::RemoveParameterBlock(const double* values)\n\n   Remove a parameter block from the problem. The parameterization of\n   the parameter block, if it exists, will persist until the deletion\n   of the problem (similar to cost/loss functions in residual block\n   removal). Any residual blocks that depend on the parameter are also\n   removed, as described above in RemoveResidualBlock().  If\n   Problem::Options::enable_fast_removal is true, then\n   the removal is fast (almost constant time). Otherwise, removing a\n   parameter block will incur a scan of the entire Problem object.\n\n   **WARNING:** Removing a residual or parameter block will destroy\n   the implicit ordering, rendering the jacobian or residuals returned\n   from the solver uninterpretable. If you depend on the evaluated\n   jacobian, do not use remove! This may change in a future release.\n\n.. function:: void Problem::SetParameterBlockConstant(const double* values)\n\n   Hold the indicated parameter block constant during optimization.\n\n.. function:: void Problem::SetParameterBlockVariable(double* values)\n\n   Allow the indicated parameter to vary during optimization.\n\n.. function:: bool Problem::IsParameterBlockConstant(const double* values) const\n\n   Returns ``true`` if a parameter block is set constant, and false\n   otherwise. A parameter block may be set constant in two ways:\n   either by calling ``SetParameterBlockConstant`` or by associating a\n   ``LocalParameterization`` with a zero dimensional tangent space\n   with it.\n\n.. function:: void Problem::SetParameterization(double* values, LocalParameterization* local_parameterization)\n\n   Set the local parameterization for one of the parameter blocks.\n   The local_parameterization is owned by the Problem by default. It\n   is acceptable to set the same parameterization for multiple\n   parameters; the destructor is careful to delete local\n   parameterizations only once. Calling `SetParameterization` with\n   `nullptr` will clear any previously set parameterization.\n\n.. function:: LocalParameterization* Problem::GetParameterization(const double* values) const\n\n   Get the local parameterization object associated with this\n   parameter block. If there is no parameterization object associated\n   then `NULL` is returned\n\n.. function:: void Problem::SetParameterLowerBound(double* values, int index, double lower_bound)\n\n   Set the lower bound for the parameter at position `index` in the\n   parameter block corresponding to `values`. By default the lower\n   bound is ``-std::numeric_limits<double>::max()``, which is treated\n   by the solver as the same as :math:`-\\infty`.\n\n.. function:: void Problem::SetParameterUpperBound(double* values, int index, double upper_bound)\n\n   Set the upper bound for the parameter at position `index` in the\n   parameter block corresponding to `values`. By default the value is\n   ``std::numeric_limits<double>::max()``, which is treated by the\n   solver as the same as :math:`\\infty`.\n\n.. function:: double Problem::GetParameterLowerBound(const double* values, int index)\n\n   Get the lower bound for the parameter with position `index`. If the\n   parameter is not bounded by the user, then its lower bound is\n   ``-std::numeric_limits<double>::max()``.\n\n.. function:: double Problem::GetParameterUpperBound(const double* values, int index)\n\n   Get the upper bound for the parameter with position `index`. If the\n   parameter is not bounded by the user, then its upper bound is\n   ``std::numeric_limits<double>::max()``.\n\n.. function:: int Problem::NumParameterBlocks() const\n\n   Number of parameter blocks in the problem. Always equals\n   parameter_blocks().size() and parameter_block_sizes().size().\n\n.. function:: int Problem::NumParameters() const\n\n   The size of the parameter vector obtained by summing over the sizes\n   of all the parameter blocks.\n\n.. function:: int Problem::NumResidualBlocks() const\n\n   Number of residual blocks in the problem. Always equals\n   residual_blocks().size().\n\n.. function:: int Problem::NumResiduals() const\n\n   The size of the residual vector obtained by summing over the sizes\n   of all of the residual blocks.\n\n.. function:: int Problem::ParameterBlockSize(const double* values) const\n\n   The size of the parameter block.\n\n.. function:: int Problem::ParameterBlockLocalSize(const double* values) const\n\n   The size of local parameterization for the parameter block. If\n   there is no local parameterization associated with this parameter\n   block, then ``ParameterBlockLocalSize`` = ``ParameterBlockSize``.\n\n.. function:: bool Problem::HasParameterBlock(const double* values) const\n\n   Is the given parameter block present in the problem or not?\n\n.. function:: void Problem::GetParameterBlocks(vector<double*>* parameter_blocks) const\n\n   Fills the passed ``parameter_blocks`` vector with pointers to the\n   parameter blocks currently in the problem. After this call,\n   ``parameter_block.size() == NumParameterBlocks``.\n\n.. function:: void Problem::GetResidualBlocks(vector<ResidualBlockId>* residual_blocks) const\n\n   Fills the passed `residual_blocks` vector with pointers to the\n   residual blocks currently in the problem. After this call,\n   `residual_blocks.size() == NumResidualBlocks`.\n\n.. function:: void Problem::GetParameterBlocksForResidualBlock(const ResidualBlockId residual_block, vector<double*>* parameter_blocks) const\n\n   Get all the parameter blocks that depend on the given residual\n   block.\n\n.. function:: void Problem::GetResidualBlocksForParameterBlock(const double* values, vector<ResidualBlockId>* residual_blocks) const\n\n   Get all the residual blocks that depend on the given parameter\n   block.\n\n   If `Problem::Options::enable_fast_removal` is\n   `true`, then getting the residual blocks is fast and depends only\n   on the number of residual blocks. Otherwise, getting the residual\n   blocks for a parameter block will incur a scan of the entire\n   :class:`Problem` object.\n\n.. function:: const CostFunction* Problem::GetCostFunctionForResidualBlock(const ResidualBlockId residual_block) const\n\n   Get the :class:`CostFunction` for the given residual block.\n\n.. function:: const LossFunction* Problem::GetLossFunctionForResidualBlock(const ResidualBlockId residual_block) const\n\n   Get the :class:`LossFunction` for the given residual block.\n\n.. function::  bool EvaluateResidualBlock(ResidualBlockId residual_block_id, bool apply_loss_function, double* cost,double* residuals, double** jacobians) const\n\n   Evaluates the residual block, storing the scalar cost in ``cost``, the\n   residual components in ``residuals``, and the jacobians between the\n   parameters and residuals in ``jacobians[i]``, in row-major order.\n\n   If ``residuals`` is ``nullptr``, the residuals are not computed.\n\n   If ``jacobians`` is ``nullptr``, no Jacobians are computed. If\n   ``jacobians[i]`` is ``nullptr``, then the Jacobian for that\n   parameter block is not computed.\n\n   It is not okay to request the Jacobian w.r.t a parameter block\n   that is constant.\n\n   The return value indicates the success or failure. Even if the\n   function returns false, the caller should expect the output\n   memory locations to have been modified.\n\n   The returned cost and jacobians have had robustification and local\n   parameterizations applied already; for example, the jacobian for a\n   4-dimensional quaternion parameter using the\n   :class:`QuaternionParameterization` is ``num_residuals x 3``\n   instead of ``num_residuals x 4``.\n\n   ``apply_loss_function`` as the name implies allows the user to\n   switch the application of the loss function on and off.\n\n   .. NOTE::\n\n      If an :class:`EvaluationCallback` is associated with the problem\n      then it is the user's responsibility to call\n      :func:`EvaluationCalback::PrepareForEvaluation` it before\n      calling this method.\n\n      This is because, if the user calls this method multiple times,\n      we cannot tell if the underlying parameter blocks have changed\n      between calls or not. So if ``EvaluateResidualBlock`` was\n      responsible for calling the\n      :func:`EvaluationCalback::PrepareForEvaluation`, it will have to\n      do it everytime it is called. Which makes the common case where\n      the parameter blocks do not change, inefficient. So we leave it\n      to the user to call the\n      :func:`EvaluationCalback::PrepareForEvaluation` as needed.\n\n\n.. function:: bool Problem::Evaluate(const Problem::EvaluateOptions& options, double* cost, vector<double>* residuals, vector<double>* gradient, CRSMatrix* jacobian)\n\n   Evaluate a :class:`Problem`. Any of the output pointers can be\n   `NULL`. Which residual blocks and parameter blocks are used is\n   controlled by the :class:`Problem::EvaluateOptions` struct below.\n\n   .. NOTE::\n\n      The evaluation will use the values stored in the memory\n      locations pointed to by the parameter block pointers used at the\n      time of the construction of the problem, for example in the\n      following code:\n\n      .. code-block:: c++\n\n        Problem problem;\n        double x = 1;\n        problem.Add(new MyCostFunction, NULL, &x);\n\n        double cost = 0.0;\n        problem.Evaluate(Problem::EvaluateOptions(), &cost, NULL, NULL, NULL);\n\n      The cost is evaluated at `x = 1`. If you wish to evaluate the\n      problem at `x = 2`, then\n\n      .. code-block:: c++\n\n         x = 2;\n         problem.Evaluate(Problem::EvaluateOptions(), &cost, NULL, NULL, NULL);\n\n      is the way to do so.\n\n   .. NOTE::\n\n      If no local parameterizations are used, then the size of\n      the gradient vector is the sum of the sizes of all the parameter\n      blocks. If a parameter block has a local parameterization, then\n      it contributes \"LocalSize\" entries to the gradient vector.\n\n   .. NOTE::\n\n      This function cannot be called while the problem is being\n      solved, for example it cannot be called from an\n      :class:`IterationCallback` at the end of an iteration during a\n      solve.\n\n   .. NOTE::\n\n      If an EvaluationCallback is associated with the problem, then\n      its PrepareForEvaluation method will be called everytime this\n      method is called with ``new_point = true``.\n\n.. class:: Problem::EvaluateOptions\n\n   Options struct that is used to control :func:`Problem::Evaluate`.\n\n.. member:: vector<double*> Problem::EvaluateOptions::parameter_blocks\n\n   The set of parameter blocks for which evaluation should be\n   performed. This vector determines the order in which parameter\n   blocks occur in the gradient vector and in the columns of the\n   jacobian matrix. If parameter_blocks is empty, then it is assumed\n   to be equal to a vector containing ALL the parameter\n   blocks. Generally speaking the ordering of the parameter blocks in\n   this case depends on the order in which they were added to the\n   problem and whether or not the user removed any parameter blocks.\n\n   **NOTE** This vector should contain the same pointers as the ones\n   used to add parameter blocks to the Problem. These parameter block\n   should NOT point to new memory locations. Bad things will happen if\n   you do.\n\n.. member:: vector<ResidualBlockId> Problem::EvaluateOptions::residual_blocks\n\n   The set of residual blocks for which evaluation should be\n   performed. This vector determines the order in which the residuals\n   occur, and how the rows of the jacobian are ordered. If\n   residual_blocks is empty, then it is assumed to be equal to the\n   vector containing all the residual blocks.\n\n.. member:: bool Problem::EvaluateOptions::apply_loss_function\n\n   Even though the residual blocks in the problem may contain loss\n   functions, setting apply_loss_function to false will turn off the\n   application of the loss function to the output of the cost\n   function. This is of use for example if the user wishes to analyse\n   the solution quality by studying the distribution of residuals\n   before and after the solve.\n\n.. member:: int Problem::EvaluateOptions::num_threads\n\n   Number of threads to use. (Requires OpenMP).\n\n\n:class:`EvaluationCallback`\n===========================\n\n.. class:: EvaluationCallback\n\n   Interface for receiving callbacks before Ceres evaluates residuals or\n   Jacobians:\n\n   .. code-block:: c++\n\n      class EvaluationCallback {\n       public:\n        virtual ~EvaluationCallback() {}\n        virtual void PrepareForEvaluation()(bool evaluate_jacobians\n                                            bool new_evaluation_point) = 0;\n      };\n\n   Ceres will call ``PrepareForEvaluation()`` every time, and once\n   before it computes the residuals and/or the Jacobians.\n\n   User parameters (the double* values provided by the us)\n   are fixed until the next call to ``PrepareForEvaluation()``. If\n   ``new_evaluation_point == true``, then this is a new point that is\n   different from the last evaluated point. Otherwise, it is the same\n   point that was evaluated previously (either Jacobian or residual)\n   and the user can use cached results from previous evaluations. If\n   ``evaluate_jacobians`` is true, then Ceres will request Jacobians\n   in the upcoming cost evaluation.\n\n   Using this callback interface, Ceres can notify you when it is about\n   to evaluate the residuals or Jacobians. With the callback, you can\n   share computation between residual blocks by doing the shared\n   computation in PrepareForEvaluation() before Ceres calls\n   CostFunction::Evaluate() on all the residuals. It also enables\n   caching results between a pure residual evaluation and a residual &\n   Jacobian evaluation, via the new_evaluation_point argument.\n\n   One use case for this callback is if the cost function compute is\n   moved to the GPU. In that case, the prepare call does the actual cost\n   function evaluation, and subsequent calls from Ceres to the actual\n   cost functions merely copy the results from the GPU onto the\n   corresponding blocks for Ceres to plug into the solver.\n\n   **Note**: Ceres provides no mechanism to share data other than the\n   notification from the callback. Users must provide access to\n   pre-computed shared data to their cost functions behind the scenes;\n   this all happens without Ceres knowing. One approach is to put a\n   pointer to the shared data in each cost function (recommended) or to\n   use a global shared variable (discouraged; bug-prone).  As far as\n   Ceres is concerned, it is evaluating cost functions like any other;\n   it just so happens that behind the scenes the cost functions reuse\n   pre-computed data to execute faster.\n\n   See ``evaluation_callback_test.cc`` for code that explicitly verifies\n   the preconditions between ``PrepareForEvaluation()`` and\n   ``CostFunction::Evaluate()``.\n\n``rotation.h``\n==============\n\nMany applications of Ceres Solver involve optimization problems where\nsome of the variables correspond to rotations. To ease the pain of\nwork with the various representations of rotations (angle-axis,\nquaternion and matrix) we provide a handy set of templated\nfunctions. These functions are templated so that the user can use them\nwithin Ceres Solver's automatic differentiation framework.\n\n.. function:: template <typename T> void AngleAxisToQuaternion(T const* angle_axis, T* quaternion)\n\n   Convert a value in combined axis-angle representation to a\n   quaternion.\n\n   The value ``angle_axis`` is a triple whose norm is an angle in radians,\n   and whose direction is aligned with the axis of rotation, and\n   ``quaternion`` is a 4-tuple that will contain the resulting quaternion.\n\n.. function::  template <typename T> void QuaternionToAngleAxis(T const* quaternion, T* angle_axis)\n\n   Convert a quaternion to the equivalent combined axis-angle\n   representation.\n\n   The value ``quaternion`` must be a unit quaternion - it is not\n   normalized first, and ``angle_axis`` will be filled with a value\n   whose norm is the angle of rotation in radians, and whose direction\n   is the axis of rotation.\n\n.. function:: template <typename T, int row_stride, int col_stride> void RotationMatrixToAngleAxis(const MatrixAdapter<const T, row_stride, col_stride>& R, T * angle_axis)\n.. function:: template <typename T, int row_stride, int col_stride> void AngleAxisToRotationMatrix(T const * angle_axis, const MatrixAdapter<T, row_stride, col_stride>& R)\n.. function:: template <typename T> void RotationMatrixToAngleAxis(T const * R, T * angle_axis)\n.. function:: template <typename T> void AngleAxisToRotationMatrix(T const * angle_axis, T * R)\n\n   Conversions between 3x3 rotation matrix with given column and row strides and\n   axis-angle rotation representations. The functions that take a pointer to T instead\n   of a MatrixAdapter assume a column major representation with unit row stride and a column stride of 3.\n\n.. function:: template <typename T, int row_stride, int col_stride> void EulerAnglesToRotationMatrix(const T* euler, const MatrixAdapter<T, row_stride, col_stride>& R)\n.. function:: template <typename T> void EulerAnglesToRotationMatrix(const T* euler, int row_stride, T* R)\n\n   Conversions between 3x3 rotation matrix with given column and row strides and\n   Euler angle (in degrees) rotation representations.\n\n   The {pitch,roll,yaw} Euler angles are rotations around the {x,y,z}\n   axes, respectively.  They are applied in that same order, so the\n   total rotation R is Rz * Ry * Rx.\n\n   The function that takes a pointer to T as the rotation matrix assumes a row\n   major representation with unit column stride and a row stride of 3.\n   The additional parameter row_stride is required to be 3.\n\n.. function:: template <typename T, int row_stride, int col_stride> void QuaternionToScaledRotation(const T q[4], const MatrixAdapter<T, row_stride, col_stride>& R)\n.. function:: template <typename T> void QuaternionToScaledRotation(const T q[4], T R[3 * 3])\n\n   Convert a 4-vector to a 3x3 scaled rotation matrix.\n\n   The choice of rotation is such that the quaternion\n   :math:`\\begin{bmatrix} 1 &0 &0 &0\\end{bmatrix}` goes to an identity\n   matrix and for small :math:`a, b, c` the quaternion\n   :math:`\\begin{bmatrix}1 &a &b &c\\end{bmatrix}` goes to the matrix\n\n   .. math::\n\n     I + 2 \\begin{bmatrix} 0 & -c & b \\\\ c & 0 & -a\\\\ -b & a & 0\n           \\end{bmatrix} + O(q^2)\n\n   which corresponds to a Rodrigues approximation, the last matrix\n   being the cross-product matrix of :math:`\\begin{bmatrix} a& b&\n   c\\end{bmatrix}`. Together with the property that :math:`R(q1 * q2)\n   = R(q1) * R(q2)` this uniquely defines the mapping from :math:`q` to\n   :math:`R`.\n\n   In the function that accepts a pointer to T instead of a MatrixAdapter,\n   the rotation matrix ``R`` is a row-major matrix with unit column stride\n   and a row stride of 3.\n\n   No normalization of the quaternion is performed, i.e.\n   :math:`R = \\|q\\|^2  Q`, where :math:`Q` is an orthonormal matrix\n   such that :math:`\\det(Q) = 1` and :math:`Q*Q' = I`.\n\n\n.. function:: template <typename T> void QuaternionToRotation(const T q[4], const MatrixAdapter<T, row_stride, col_stride>& R)\n.. function:: template <typename T> void QuaternionToRotation(const T q[4], T R[3 * 3])\n\n   Same as above except that the rotation matrix is normalized by the\n   Frobenius norm, so that :math:`R R' = I` (and :math:`\\det(R) = 1`).\n\n.. function:: template <typename T> void UnitQuaternionRotatePoint(const T q[4], const T pt[3], T result[3])\n\n   Rotates a point pt by a quaternion q:\n\n   .. math:: \\text{result} = R(q)  \\text{pt}\n\n   Assumes the quaternion is unit norm. If you pass in a quaternion\n   with :math:`|q|^2 = 2` then you WILL NOT get back 2 times the\n   result you get for a unit quaternion.\n\n\n.. function:: template <typename T> void QuaternionRotatePoint(const T q[4], const T pt[3], T result[3])\n\n   With this function you do not need to assume that :math:`q` has unit norm.\n   It does assume that the norm is non-zero.\n\n.. function:: template <typename T> void QuaternionProduct(const T z[4], const T w[4], T zw[4])\n\n   .. math:: zw = z * w\n\n   where :math:`*` is the Quaternion product between 4-vectors.\n\n\n.. function:: template <typename T> void CrossProduct(const T x[3], const T y[3], T x_cross_y[3])\n\n   .. math:: \\text{x_cross_y} = x \\times y\n\n.. function:: template <typename T> void AngleAxisRotatePoint(const T angle_axis[3], const T pt[3], T result[3])\n\n   .. math:: y = R(\\text{angle_axis}) x\n\n\nCubic Interpolation\n===================\n\nOptimization problems often involve functions that are given in the\nform of a table of values, for example an image. Evaluating these\nfunctions and their derivatives requires interpolating these\nvalues. Interpolating tabulated functions is a vast area of research\nand there are a lot of libraries which implement a variety of\ninterpolation schemes. However, using them within the automatic\ndifferentiation framework in Ceres is quite painful. To this end,\nCeres provides the ability to interpolate one dimensional and two\ndimensional tabular functions.\n\nThe one dimensional interpolation is based on the Cubic Hermite\nSpline, also known as the Catmull-Rom Spline. This produces a first\norder differentiable interpolating function. The two dimensional\ninterpolation scheme is a generalization of the one dimensional scheme\nwhere the interpolating function is assumed to be separable in the two\ndimensions,\n\nMore details of the construction can be found `Linear Methods for\nImage Interpolation <http://www.ipol.im/pub/art/2011/g_lmii/>`_ by\nPascal Getreuer.\n\n.. class:: CubicInterpolator\n\nGiven as input an infinite one dimensional grid, which provides the\nfollowing interface.\n\n.. code::\n\n  struct Grid1D {\n    enum { DATA_DIMENSION = 2; };\n    void GetValue(int n, double* f) const;\n  };\n\nWhere, ``GetValue`` gives us the value of a function :math:`f`\n(possibly vector valued) for any integer :math:`n` and the enum\n``DATA_DIMENSION`` indicates the dimensionality of the function being\ninterpolated. For example if you are interpolating rotations in\naxis-angle format over time, then ``DATA_DIMENSION = 3``.\n\n:class:`CubicInterpolator` uses Cubic Hermite splines to produce a\nsmooth approximation to it that can be used to evaluate the\n:math:`f(x)` and :math:`f'(x)` at any point on the real number\nline. For example, the following code interpolates an array of four\nnumbers.\n\n.. code::\n\n  const double data[] = {1.0, 2.0, 5.0, 6.0};\n  Grid1D<double, 1> array(x, 0, 4);\n  CubicInterpolator interpolator(array);\n  double f, dfdx;\n  interpolator.Evaluate(1.5, &f, &dfdx);\n\n\nIn the above code we use ``Grid1D`` a templated helper class that\nallows easy interfacing between ``C++`` arrays and\n:class:`CubicInterpolator`.\n\n``Grid1D`` supports vector valued functions where the various\ncoordinates of the function can be interleaved or stacked. It also\nallows the use of any numeric type as input, as long as it can be\nsafely cast to a double.\n\n.. class:: BiCubicInterpolator\n\nGiven as input an infinite two dimensional grid, which provides the\nfollowing interface:\n\n.. code::\n\n  struct Grid2D {\n    enum { DATA_DIMENSION = 2 };\n    void GetValue(int row, int col, double* f) const;\n  };\n\nWhere, ``GetValue`` gives us the value of a function :math:`f`\n(possibly vector valued) for any pair of integers :code:`row` and\n:code:`col` and the enum ``DATA_DIMENSION`` indicates the\ndimensionality of the function being interpolated. For example if you\nare interpolating a color image with three channels (Red, Green &\nBlue), then ``DATA_DIMENSION = 3``.\n\n:class:`BiCubicInterpolator` uses the cubic convolution interpolation\nalgorithm of R. Keys [Keys]_, to produce a smooth approximation to it\nthat can be used to evaluate the :math:`f(r,c)`, :math:`\\frac{\\partial\nf(r,c)}{\\partial r}` and :math:`\\frac{\\partial f(r,c)}{\\partial c}` at\nany any point in the real plane.\n\nFor example the following code interpolates a two dimensional array.\n\n.. code::\n\n   const double data[] = {1.0, 3.0, -1.0, 4.0,\n                          3.6, 2.1,  4.2, 2.0,\n                          2.0, 1.0,  3.1, 5.2};\n   Grid2D<double, 1>  array(data, 0, 3, 0, 4);\n   BiCubicInterpolator interpolator(array);\n   double f, dfdr, dfdc;\n   interpolator.Evaluate(1.2, 2.5, &f, &dfdr, &dfdc);\n\nIn the above code, the templated helper class ``Grid2D`` is used to\nmake a ``C++`` array look like a two dimensional table to\n:class:`BiCubicInterpolator`.\n\n``Grid2D`` supports row or column major layouts. It also supports\nvector valued functions where the individual coordinates of the\nfunction may be interleaved or stacked. It also allows the use of any\nnumeric type as input, as long as it can be safely cast to double.\n"
  },
  {
    "path": "3rdparty/ceres/docs/source/nnls_solving.rst",
    "content": "\n.. default-domain:: cpp\n\n.. cpp:namespace:: ceres\n\n.. _chapter-nnls_solving:\n\n================================\nSolving Non-linear Least Squares\n================================\n\nIntroduction\n============\n\nEffective use of Ceres requires some familiarity with the basic\ncomponents of a non-linear least squares solver, so before we describe\nhow to configure and use the solver, we will take a brief look at how\nsome of the core optimization algorithms in Ceres work.\n\nLet :math:`x \\in \\mathbb{R}^n` be an :math:`n`-dimensional vector of\nvariables, and\n:math:`F(x) = \\left[f_1(x), ... ,  f_{m}(x) \\right]^{\\top}` be a\n:math:`m`-dimensional function of :math:`x`.  We are interested in\nsolving the optimization problem [#f1]_\n\n.. math:: \\arg \\min_x \\frac{1}{2}\\|F(x)\\|^2\\ . \\\\\n          L \\le x \\le U\n  :label: nonlinsq\n\nWhere, :math:`L` and :math:`U` are lower and upper bounds on the\nparameter vector :math:`x`.\n\nSince the efficient global minimization of :eq:`nonlinsq` for\ngeneral :math:`F(x)` is an intractable problem, we will have to settle\nfor finding a local minimum.\n\nIn the following, the Jacobian :math:`J(x)` of :math:`F(x)` is an\n:math:`m\\times n` matrix, where :math:`J_{ij}(x) = \\partial_j f_i(x)`\nand the gradient vector is :math:`g(x) = \\nabla \\frac{1}{2}\\|F(x)\\|^2\n= J(x)^\\top F(x)`.\n\nThe general strategy when solving non-linear optimization problems is\nto solve a sequence of approximations to the original problem\n[NocedalWright]_. At each iteration, the approximation is solved to\ndetermine a correction :math:`\\Delta x` to the vector :math:`x`. For\nnon-linear least squares, an approximation can be constructed by using\nthe linearization :math:`F(x+\\Delta x) \\approx F(x) + J(x)\\Delta x`,\nwhich leads to the following linear least squares problem:\n\n.. math:: \\min_{\\Delta x} \\frac{1}{2}\\|J(x)\\Delta x + F(x)\\|^2\n   :label: linearapprox\n\nUnfortunately, naively solving a sequence of these problems and\nupdating :math:`x \\leftarrow x+ \\Delta x` leads to an algorithm that\nmay not converge.  To get a convergent algorithm, we need to control\nthe size of the step :math:`\\Delta x`. Depending on how the size of\nthe step :math:`\\Delta x` is controlled, non-linear optimization\nalgorithms can be divided into two major categories [NocedalWright]_.\n\n1. **Trust Region** The trust region approach approximates the\n   objective function using using a model function (often a quadratic)\n   over a subset of the search space known as the trust region. If the\n   model function succeeds in minimizing the true objective function\n   the trust region is expanded; conversely, otherwise it is\n   contracted and the model optimization problem is solved again.\n\n2. **Line Search** The line search approach first finds a descent\n   direction along which the objective function will be reduced and\n   then computes a step size that decides how far should move along\n   that direction. The descent direction can be computed by various\n   methods, such as gradient descent, Newton's method and Quasi-Newton\n   method. The step size can be determined either exactly or\n   inexactly.\n\nTrust region methods are in some sense dual to line search methods:\ntrust region methods first choose a step size (the size of the trust\nregion) and then a step direction while line search methods first\nchoose a step direction and then a step size. Ceres implements\nmultiple algorithms in both categories.\n\n.. _section-trust-region-methods:\n\nTrust Region Methods\n====================\n\nThe basic trust region algorithm looks something like this.\n\n   1. Given an initial point :math:`x` and a trust region radius :math:`\\mu`.\n   2. Solve\n\n      .. math::\n         \\arg \\min_{\\Delta x}& \\frac{1}{2}\\|J(x)\\Delta x + F(x)\\|^2 \\\\\n         \\text{such that} &\\|D(x)\\Delta x\\|^2 \\le \\mu\\\\\n         &L \\le x + \\Delta x \\le U.\n\n   3. :math:`\\rho = \\frac{\\displaystyle \\|F(x + \\Delta x)\\|^2 -\n      \\|F(x)\\|^2}{\\displaystyle \\|J(x)\\Delta x + F(x)\\|^2 -\n      \\|F(x)\\|^2}`\n   4. if :math:`\\rho > \\epsilon` then  :math:`x = x + \\Delta x`.\n   5. if :math:`\\rho > \\eta_1` then :math:`\\mu = 2  \\mu`\n   6. else if :math:`\\rho < \\eta_2` then :math:`\\mu = 0.5 * \\mu`\n   7. Go to 2.\n\nHere, :math:`\\mu` is the trust region radius, :math:`D(x)` is some\nmatrix used to define a metric on the domain of :math:`F(x)` and\n:math:`\\rho` measures the quality of the step :math:`\\Delta x`, i.e.,\nhow well did the linear model predict the decrease in the value of the\nnon-linear objective. The idea is to increase or decrease the radius\nof the trust region depending on how well the linearization predicts\nthe behavior of the non-linear objective, which in turn is reflected\nin the value of :math:`\\rho`.\n\nThe key computational step in a trust-region algorithm is the solution\nof the constrained optimization problem\n\n.. math::\n   \\arg \\min_{\\Delta x}&\\quad \\frac{1}{2}\\|J(x)\\Delta x + F(x)\\|^2 \\\\\n   \\text{such that} &\\quad \\|D(x)\\Delta x\\|^2 \\le \\mu\\\\\n    &\\quad L \\le x + \\Delta x \\le U.\n   :label: trp\n\nThere are a number of different ways of solving this problem, each\ngiving rise to a different concrete trust-region algorithm. Currently,\nCeres implements two trust-region algorithms - Levenberg-Marquardt\nand Dogleg, each of which is augmented with a line search if bounds\nconstraints are present [Kanzow]_. The user can choose between them by\nsetting :member:`Solver::Options::trust_region_strategy_type`.\n\n.. rubric:: Footnotes\n\n.. [#f1] At the level of the non-linear solver, the block structure is\n         not relevant, therefore our discussion here is in terms of an\n         optimization problem defined over a state vector of size\n         :math:`n`. Similarly the presence of loss functions is also\n         ignored as the problem is internally converted into a pure\n         non-linear least squares problem.\n\n\n.. _section-levenberg-marquardt:\n\nLevenberg-Marquardt\n-------------------\n\nThe Levenberg-Marquardt algorithm [Levenberg]_  [Marquardt]_ is the\nmost popular algorithm for solving non-linear least squares problems.\nIt was also the first trust region algorithm to be developed\n[Levenberg]_ [Marquardt]_. Ceres implements an exact step [Madsen]_\nand an inexact step variant of the Levenberg-Marquardt algorithm\n[WrightHolt]_ [NashSofer]_.\n\nIt can be shown, that the solution to :eq:`trp` can be obtained by\nsolving an unconstrained optimization of the form\n\n.. math:: \\arg\\min_{\\Delta x} \\frac{1}{2}\\|J(x)\\Delta x + F(x)\\|^2 +\\lambda  \\|D(x)\\Delta x\\|^2\n\nWhere, :math:`\\lambda` is a Lagrange multiplier that is inverse\nrelated to :math:`\\mu`. In Ceres, we solve for\n\n.. math:: \\arg\\min_{\\Delta x} \\frac{1}{2}\\|J(x)\\Delta x + F(x)\\|^2 + \\frac{1}{\\mu} \\|D(x)\\Delta x\\|^2\n   :label: lsqr\n\nThe matrix :math:`D(x)` is a non-negative diagonal matrix, typically\nthe square root of the diagonal of the matrix :math:`J(x)^\\top J(x)`.\n\nBefore going further, let us make some notational simplifications. We\nwill assume that the matrix :math:`\\frac{1}{\\sqrt{\\mu}} D` has been concatenated\nat the bottom of the matrix :math:`J` and similarly a vector of zeros\nhas been added to the bottom of the vector :math:`f` and the rest of\nour discussion will be in terms of :math:`J` and :math:`f`, i.e, the\nlinear least squares problem.\n\n.. math:: \\min_{\\Delta x} \\frac{1}{2} \\|J(x)\\Delta x + f(x)\\|^2 .\n   :label: simple\n\nFor all but the smallest problems the solution of :eq:`simple` in\neach iteration of the Levenberg-Marquardt algorithm is the dominant\ncomputational cost in Ceres. Ceres provides a number of different\noptions for solving :eq:`simple`. There are two major classes of\nmethods - factorization and iterative.\n\nThe factorization methods are based on computing an exact solution of\n:eq:`lsqr` using a Cholesky or a QR factorization and lead to an exact\nstep Levenberg-Marquardt algorithm. But it is not clear if an exact\nsolution of :eq:`lsqr` is necessary at each step of the LM algorithm\nto solve :eq:`nonlinsq`. In fact, we have already seen evidence\nthat this may not be the case, as :eq:`lsqr` is itself a regularized\nversion of :eq:`linearapprox`. Indeed, it is possible to\nconstruct non-linear optimization algorithms in which the linearized\nproblem is solved approximately. These algorithms are known as inexact\nNewton or truncated Newton methods [NocedalWright]_.\n\nAn inexact Newton method requires two ingredients. First, a cheap\nmethod for approximately solving systems of linear\nequations. Typically an iterative linear solver like the Conjugate\nGradients method is used for this\npurpose [NocedalWright]_. Second, a termination rule for\nthe iterative solver. A typical termination rule is of the form\n\n.. math:: \\|H(x) \\Delta x + g(x)\\| \\leq \\eta_k \\|g(x)\\|.\n   :label: inexact\n\nHere, :math:`k` indicates the Levenberg-Marquardt iteration number and\n:math:`0 < \\eta_k <1` is known as the forcing sequence.  [WrightHolt]_\nprove that a truncated Levenberg-Marquardt algorithm that uses an\ninexact Newton step based on :eq:`inexact` converges for any\nsequence :math:`\\eta_k \\leq \\eta_0 < 1` and the rate of convergence\ndepends on the choice of the forcing sequence :math:`\\eta_k`.\n\nCeres supports both exact and inexact step solution strategies. When\nthe user chooses a factorization based linear solver, the exact step\nLevenberg-Marquardt algorithm is used. When the user chooses an\niterative linear solver, the inexact step Levenberg-Marquardt\nalgorithm is used.\n\n.. _section-dogleg:\n\nDogleg\n------\n\nAnother strategy for solving the trust region problem :eq:`trp` was\nintroduced by M. J. D. Powell. The key idea there is to compute two\nvectors\n\n.. math::\n\n        \\Delta x^{\\text{Gauss-Newton}} &= \\arg \\min_{\\Delta x}\\frac{1}{2} \\|J(x)\\Delta x + f(x)\\|^2.\\\\\n        \\Delta x^{\\text{Cauchy}} &= -\\frac{\\|g(x)\\|^2}{\\|J(x)g(x)\\|^2}g(x).\n\nNote that the vector :math:`\\Delta x^{\\text{Gauss-Newton}}` is the\nsolution to :eq:`linearapprox` and :math:`\\Delta\nx^{\\text{Cauchy}}` is the vector that minimizes the linear\napproximation if we restrict ourselves to moving along the direction\nof the gradient. Dogleg methods finds a vector :math:`\\Delta x`\ndefined by :math:`\\Delta x^{\\text{Gauss-Newton}}` and :math:`\\Delta\nx^{\\text{Cauchy}}` that solves the trust region problem. Ceres\nsupports two variants that can be chose by setting\n:member:`Solver::Options::dogleg_type`.\n\n``TRADITIONAL_DOGLEG`` as described by Powell, constructs two line\nsegments using the Gauss-Newton and Cauchy vectors and finds the point\nfarthest along this line shaped like a dogleg (hence the name) that is\ncontained in the trust-region. For more details on the exact reasoning\nand computations, please see Madsen et al [Madsen]_.\n\n``SUBSPACE_DOGLEG`` is a more sophisticated method that considers the\nentire two dimensional subspace spanned by these two vectors and finds\nthe point that minimizes the trust region problem in this subspace\n[ByrdSchnabel]_.\n\nThe key advantage of the Dogleg over Levenberg-Marquardt is that if\nthe step computation for a particular choice of :math:`\\mu` does not\nresult in sufficient decrease in the value of the objective function,\nLevenberg-Marquardt solves the linear approximation from scratch with\na smaller value of :math:`\\mu`. Dogleg on the other hand, only needs\nto compute the interpolation between the Gauss-Newton and the Cauchy\nvectors, as neither of them depend on the value of :math:`\\mu`.\n\nThe Dogleg method can only be used with the exact factorization based\nlinear solvers.\n\n.. _section-inner-iterations:\n\nInner Iterations\n----------------\n\nSome non-linear least squares problems have additional structure in\nthe way the parameter blocks interact that it is beneficial to modify\nthe way the trust region step is computed. For example, consider the\nfollowing regression problem\n\n.. math::   y = a_1 e^{b_1 x} + a_2 e^{b_3 x^2 + c_1}\n\n\nGiven a set of pairs :math:`\\{(x_i, y_i)\\}`, the user wishes to estimate\n:math:`a_1, a_2, b_1, b_2`, and :math:`c_1`.\n\nNotice that the expression on the left is linear in :math:`a_1` and\n:math:`a_2`, and given any value for :math:`b_1, b_2` and :math:`c_1`,\nit is possible to use linear regression to estimate the optimal values\nof :math:`a_1` and :math:`a_2`. It's possible to analytically\neliminate the variables :math:`a_1` and :math:`a_2` from the problem\nentirely. Problems like these are known as separable least squares\nproblem and the most famous algorithm for solving them is the Variable\nProjection algorithm invented by Golub & Pereyra [GolubPereyra]_.\n\nSimilar structure can be found in the matrix factorization with\nmissing data problem. There the corresponding algorithm is known as\nWiberg's algorithm [Wiberg]_.\n\nRuhe & Wedin present an analysis of various algorithms for solving\nseparable non-linear least squares problems and refer to *Variable\nProjection* as Algorithm I in their paper [RuheWedin]_.\n\nImplementing Variable Projection is tedious and expensive. Ruhe &\nWedin present a simpler algorithm with comparable convergence\nproperties, which they call Algorithm II.  Algorithm II performs an\nadditional optimization step to estimate :math:`a_1` and :math:`a_2`\nexactly after computing a successful Newton step.\n\n\nThis idea can be generalized to cases where the residual is not\nlinear in :math:`a_1` and :math:`a_2`, i.e.,\n\n.. math:: y = f_1(a_1, e^{b_1 x}) + f_2(a_2, e^{b_3 x^2 + c_1})\n\nIn this case, we solve for the trust region step for the full problem,\nand then use it as the starting point to further optimize just `a_1`\nand `a_2`. For the linear case, this amounts to doing a single linear\nleast squares solve. For non-linear problems, any method for solving\nthe :math:`a_1` and :math:`a_2` optimization problems will do. The\nonly constraint on :math:`a_1` and :math:`a_2` (if they are two\ndifferent parameter block) is that they do not co-occur in a residual\nblock.\n\nThis idea can be further generalized, by not just optimizing\n:math:`(a_1, a_2)`, but decomposing the graph corresponding to the\nHessian matrix's sparsity structure into a collection of\nnon-overlapping independent sets and optimizing each of them.\n\nSetting :member:`Solver::Options::use_inner_iterations` to ``true``\nenables the use of this non-linear generalization of Ruhe & Wedin's\nAlgorithm II.  This version of Ceres has a higher iteration\ncomplexity, but also displays better convergence behavior per\niteration.\n\nSetting :member:`Solver::Options::num_threads` to the maximum number\npossible is highly recommended.\n\n.. _section-non-monotonic-steps:\n\nNon-monotonic Steps\n-------------------\n\nNote that the basic trust-region algorithm described in\n:ref:`section-trust-region-methods` is a descent algorithm in that it\nonly accepts a point if it strictly reduces the value of the objective\nfunction.\n\nRelaxing this requirement allows the algorithm to be more efficient in\nthe long term at the cost of some local increase in the value of the\nobjective function.\n\nThis is because allowing for non-decreasing objective function values\nin a principled manner allows the algorithm to *jump over boulders* as\nthe method is not restricted to move into narrow valleys while\npreserving its convergence properties.\n\nSetting :member:`Solver::Options::use_nonmonotonic_steps` to ``true``\nenables the non-monotonic trust region algorithm as described by Conn,\nGould & Toint in [Conn]_.\n\nEven though the value of the objective function may be larger\nthan the minimum value encountered over the course of the\noptimization, the final parameters returned to the user are the\nones corresponding to the minimum cost over all iterations.\n\nThe option to take non-monotonic steps is available for all trust\nregion strategies.\n\n\n.. _section-line-search-methods:\n\nLine Search Methods\n===================\n\nThe line search method in Ceres Solver cannot handle bounds\nconstraints right now, so it can only be used for solving\nunconstrained problems.\n\nLine search algorithms\n\n   1. Given an initial point :math:`x`\n   2. :math:`\\Delta x = -H^{-1}(x) g(x)`\n   3. :math:`\\arg \\min_\\mu \\frac{1}{2} \\| F(x + \\mu \\Delta x) \\|^2`\n   4. :math:`x = x + \\mu \\Delta x`\n   5. Goto 2.\n\nHere :math:`H(x)` is some approximation to the Hessian of the\nobjective function, and :math:`g(x)` is the gradient at\n:math:`x`. Depending on the choice of :math:`H(x)` we get a variety of\ndifferent search directions :math:`\\Delta x`.\n\nStep 4, which is a one dimensional optimization or `Line Search` along\n:math:`\\Delta x` is what gives this class of methods its name.\n\nDifferent line search algorithms differ in their choice of the search\ndirection :math:`\\Delta x` and the method used for one dimensional\noptimization along :math:`\\Delta x`. The choice of :math:`H(x)` is the\nprimary source of computational complexity in these\nmethods. Currently, Ceres Solver supports three choices of search\ndirections, all aimed at large scale problems.\n\n1. ``STEEPEST_DESCENT`` This corresponds to choosing :math:`H(x)` to\n   be the identity matrix. This is not a good search direction for\n   anything but the simplest of the problems. It is only included here\n   for completeness.\n\n2. ``NONLINEAR_CONJUGATE_GRADIENT`` A generalization of the Conjugate\n   Gradient method to non-linear functions. The generalization can be\n   performed in a number of different ways, resulting in a variety of\n   search directions. Ceres Solver currently supports\n   ``FLETCHER_REEVES``, ``POLAK_RIBIERE`` and ``HESTENES_STIEFEL``\n   directions.\n\n3. ``BFGS`` A generalization of the Secant method to multiple\n   dimensions in which a full, dense approximation to the inverse\n   Hessian is maintained and used to compute a quasi-Newton step\n   [NocedalWright]_.  BFGS is currently the best known general\n   quasi-Newton algorithm.\n\n4. ``LBFGS`` A limited memory approximation to the full ``BFGS``\n   method in which the last `M` iterations are used to approximate the\n   inverse Hessian used to compute a quasi-Newton step [Nocedal]_,\n   [ByrdNocedal]_.\n\nCurrently Ceres Solver supports both a backtracking and interpolation\nbased Armijo line search algorithm, and a sectioning / zoom\ninterpolation (strong) Wolfe condition line search algorithm.\nHowever, note that in order for the assumptions underlying the\n``BFGS`` and ``LBFGS`` methods to be guaranteed to be satisfied the\nWolfe line search algorithm should be used.\n\n.. _section-linear-solver:\n\nLinearSolver\n============\n\nRecall that in both of the trust-region methods described above, the\nkey computational cost is the solution of a linear least squares\nproblem of the form\n\n.. math:: \\min_{\\Delta x} \\frac{1}{2} \\|J(x)\\Delta x + f(x)\\|^2 .\n   :label: simple2\n\nLet :math:`H(x)= J(x)^\\top J(x)` and :math:`g(x) = -J(x)^\\top\nf(x)`. For notational convenience let us also drop the dependence on\n:math:`x`. Then it is easy to see that solving :eq:`simple2` is\nequivalent to solving the *normal equations*.\n\n.. math:: H \\Delta x = g\n   :label: normal\n\nCeres provides a number of different options for solving :eq:`normal`.\n\n.. _section-qr:\n\n``DENSE_QR``\n------------\n\nFor small problems (a couple of hundred parameters and a few thousand\nresiduals) with relatively dense Jacobians, ``DENSE_QR`` is the method\nof choice [Bjorck]_. Let :math:`J = QR` be the QR-decomposition of\n:math:`J`, where :math:`Q` is an orthonormal matrix and :math:`R` is\nan upper triangular matrix [TrefethenBau]_. Then it can be shown that\nthe solution to :eq:`normal` is given by\n\n.. math:: \\Delta x^* = -R^{-1}Q^\\top f\n\n\nCeres uses ``Eigen`` 's dense QR factorization routines.\n\n.. _section-cholesky:\n\n``DENSE_NORMAL_CHOLESKY`` & ``SPARSE_NORMAL_CHOLESKY``\n------------------------------------------------------\n\nLarge non-linear least square problems are usually sparse. In such\ncases, using a dense QR factorization is inefficient. Let :math:`H =\nR^\\top R` be the Cholesky factorization of the normal equations, where\n:math:`R` is an upper triangular matrix, then the solution to\n:eq:`normal` is given by\n\n.. math::\n\n    \\Delta x^* = R^{-1} R^{-\\top} g.\n\n\nThe observant reader will note that the :math:`R` in the Cholesky\nfactorization of :math:`H` is the same upper triangular matrix\n:math:`R` in the QR factorization of :math:`J`. Since :math:`Q` is an\northonormal matrix, :math:`J=QR` implies that :math:`J^\\top J = R^\\top\nQ^\\top Q R = R^\\top R`. There are two variants of Cholesky\nfactorization -- sparse and dense.\n\n``DENSE_NORMAL_CHOLESKY``  as the name implies performs a dense\nCholesky factorization of the normal equations. Ceres uses\n``Eigen`` 's dense LDLT factorization routines.\n\n``SPARSE_NORMAL_CHOLESKY``, as the name implies performs a sparse\nCholesky factorization of the normal equations. This leads to\nsubstantial savings in time and memory for large sparse\nproblems. Ceres uses the sparse Cholesky factorization routines in\nProfessor Tim Davis' ``SuiteSparse`` or ``CXSparse`` packages [Chen]_\nor the sparse Cholesky factorization algorithm in ``Eigen`` (which\nincidently is a port of the algorithm implemented inside ``CXSparse``)\n\n.. _section-cgnr:\n\n``CGNR``\n--------\n\nFor general sparse problems, if the problem is too large for\n``CHOLMOD`` or a sparse linear algebra library is not linked into\nCeres, another option is the ``CGNR`` solver. This solver uses the\nConjugate Gradients solver on the *normal equations*, but without\nforming the normal equations explicitly. It exploits the relation\n\n.. math::\n    H x = J^\\top J x = J^\\top(J x)\n\nThe convergence of Conjugate Gradients depends on the conditioner\nnumber :math:`\\kappa(H)`. Usually :math:`H` is poorly conditioned and\na :ref:`section-preconditioner` must be used to get reasonable\nperformance. Currently only the ``JACOBI`` preconditioner is available\nfor use with ``CGNR``. It uses the block diagonal of :math:`H` to\nprecondition the normal equations.\n\nWhen the user chooses ``CGNR`` as the linear solver, Ceres\nautomatically switches from the exact step algorithm to an inexact\nstep algorithm.\n\n.. _section-schur:\n\n``DENSE_SCHUR`` & ``SPARSE_SCHUR``\n----------------------------------\n\nWhile it is possible to use ``SPARSE_NORMAL_CHOLESKY`` to solve bundle\nadjustment problems, bundle adjustment problem have a special\nstructure, and a more efficient scheme for solving :eq:`normal`\ncan be constructed.\n\nSuppose that the SfM problem consists of :math:`p` cameras and\n:math:`q` points and the variable vector :math:`x` has the block\nstructure :math:`x = [y_{1}, ... ,y_{p},z_{1}, ... ,z_{q}]`. Where,\n:math:`y` and :math:`z` correspond to camera and point parameters,\nrespectively.  Further, let the camera blocks be of size :math:`c` and\nthe point blocks be of size :math:`s` (for most problems :math:`c` =\n:math:`6`--`9` and :math:`s = 3`). Ceres does not impose any constancy\nrequirement on these block sizes, but choosing them to be constant\nsimplifies the exposition.\n\nA key characteristic of the bundle adjustment problem is that there is\nno term :math:`f_{i}` that includes two or more point blocks.  This in\nturn implies that the matrix :math:`H` is of the form\n\n.. math:: H = \\left[ \\begin{matrix} B & E\\\\ E^\\top & C \\end{matrix} \\right]\\ ,\n   :label: hblock\n\nwhere :math:`B \\in \\mathbb{R}^{pc\\times pc}` is a block sparse matrix\nwith :math:`p` blocks of size :math:`c\\times c` and :math:`C \\in\n\\mathbb{R}^{qs\\times qs}` is a block diagonal matrix with :math:`q` blocks\nof size :math:`s\\times s`. :math:`E \\in \\mathbb{R}^{pc\\times qs}` is a\ngeneral block sparse matrix, with a block of size :math:`c\\times s`\nfor each observation. Let us now block partition :math:`\\Delta x =\n[\\Delta y,\\Delta z]` and :math:`g=[v,w]` to restate :eq:`normal`\nas the block structured linear system\n\n.. math:: \\left[ \\begin{matrix} B & E\\\\ E^\\top & C \\end{matrix}\n                \\right]\\left[ \\begin{matrix} \\Delta y \\\\ \\Delta z\n                    \\end{matrix} \\right] = \\left[ \\begin{matrix} v\\\\ w\n                    \\end{matrix} \\right]\\ ,\n   :label: linear2\n\nand apply Gaussian elimination to it. As we noted above, :math:`C` is\na block diagonal matrix, with small diagonal blocks of size\n:math:`s\\times s`.  Thus, calculating the inverse of :math:`C` by\ninverting each of these blocks is cheap. This allows us to eliminate\n:math:`\\Delta z` by observing that :math:`\\Delta z = C^{-1}(w - E^\\top\n\\Delta y)`, giving us\n\n.. math:: \\left[B - EC^{-1}E^\\top\\right] \\Delta y = v - EC^{-1}w\\ .\n   :label: schur\n\nThe matrix\n\n.. math:: S = B - EC^{-1}E^\\top\n\nis the Schur complement of :math:`C` in :math:`H`. It is also known as\nthe *reduced camera matrix*, because the only variables\nparticipating in :eq:`schur` are the ones corresponding to the\ncameras. :math:`S \\in \\mathbb{R}^{pc\\times pc}` is a block structured\nsymmetric positive definite matrix, with blocks of size :math:`c\\times\nc`. The block :math:`S_{ij}` corresponding to the pair of images\n:math:`i` and :math:`j` is non-zero if and only if the two images\nobserve at least one common point.\n\n\nNow, :eq:`linear2` can be solved by first forming :math:`S`, solving for\n:math:`\\Delta y`, and then back-substituting :math:`\\Delta y` to\nobtain the value of :math:`\\Delta z`.  Thus, the solution of what was\nan :math:`n\\times n`, :math:`n=pc+qs` linear system is reduced to the\ninversion of the block diagonal matrix :math:`C`, a few matrix-matrix\nand matrix-vector multiplies, and the solution of block sparse\n:math:`pc\\times pc` linear system :eq:`schur`.  For almost all\nproblems, the number of cameras is much smaller than the number of\npoints, :math:`p \\ll q`, thus solving :eq:`schur` is\nsignificantly cheaper than solving :eq:`linear2`. This is the\n*Schur complement trick* [Brown]_.\n\nThis still leaves open the question of solving :eq:`schur`. The\nmethod of choice for solving symmetric positive definite systems\nexactly is via the Cholesky factorization [TrefethenBau]_ and\ndepending upon the structure of the matrix, there are, in general, two\noptions. The first is direct factorization, where we store and factor\n:math:`S` as a dense matrix [TrefethenBau]_. This method has\n:math:`O(p^2)` space complexity and :math:`O(p^3)` time complexity and\nis only practical for problems with up to a few hundred cameras. Ceres\nimplements this strategy as the ``DENSE_SCHUR`` solver.\n\n\nBut, :math:`S` is typically a fairly sparse matrix, as most images\nonly see a small fraction of the scene. This leads us to the second\noption: Sparse Direct Methods. These methods store :math:`S` as a\nsparse matrix, use row and column re-ordering algorithms to maximize\nthe sparsity of the Cholesky decomposition, and focus their compute\neffort on the non-zero part of the factorization [Chen]_. Sparse\ndirect methods, depending on the exact sparsity structure of the Schur\ncomplement, allow bundle adjustment algorithms to significantly scale\nup over those based on dense factorization. Ceres implements this\nstrategy as the ``SPARSE_SCHUR`` solver.\n\n.. _section-iterative_schur:\n\n``ITERATIVE_SCHUR``\n-------------------\n\nAnother option for bundle adjustment problems is to apply\nPreconditioned Conjugate Gradients to the reduced camera matrix\n:math:`S` instead of :math:`H`. One reason to do this is that\n:math:`S` is a much smaller matrix than :math:`H`, but more\nimportantly, it can be shown that :math:`\\kappa(S)\\leq \\kappa(H)`.\nCeres implements Conjugate Gradients on :math:`S` as the\n``ITERATIVE_SCHUR`` solver. When the user chooses ``ITERATIVE_SCHUR``\nas the linear solver, Ceres automatically switches from the exact step\nalgorithm to an inexact step algorithm.\n\nThe key computational operation when using Conjuagate Gradients is the\nevaluation of the matrix vector product :math:`Sx` for an arbitrary\nvector :math:`x`. There are two ways in which this product can be\nevaluated, and this can be controlled using\n``Solver::Options::use_explicit_schur_complement``. Depending on the\nproblem at hand, the performance difference between these two methods\ncan be quite substantial.\n\n  1. **Implicit** This is default. Implicit evaluation is suitable for\n     large problems where the cost of computing and storing the Schur\n     Complement :math:`S` is prohibitive. Because PCG only needs\n     access to :math:`S` via its product with a vector, one way to\n     evaluate :math:`Sx` is to observe that\n\n     .. math::  x_1 &= E^\\top x\n     .. math::  x_2 &= C^{-1} x_1\n     .. math::  x_3 &= Ex_2\\\\\n     .. math::  x_4 &= Bx\\\\\n     .. math::   Sx &= x_4 - x_3\n        :label: schurtrick1\n\n     Thus, we can run PCG on :math:`S` with the same computational\n     effort per iteration as PCG on :math:`H`, while reaping the\n     benefits of a more powerful preconditioner. In fact, we do not\n     even need to compute :math:`H`, :eq:`schurtrick1` can be\n     implemented using just the columns of :math:`J`.\n\n     Equation :eq:`schurtrick1` is closely related to *Domain\n     Decomposition methods* for solving large linear systems that\n     arise in structural engineering and partial differential\n     equations. In the language of Domain Decomposition, each point in\n     a bundle adjustment problem is a domain, and the cameras form the\n     interface between these domains. The iterative solution of the\n     Schur complement then falls within the sub-category of techniques\n     known as Iterative Sub-structuring [Saad]_ [Mathew]_.\n\n  2. **Explicit** The complexity of implicit matrix-vector product\n     evaluation scales with the number of non-zeros in the\n     Jacobian. For small to medium sized problems, the cost of\n     constructing the Schur Complement is small enough that it is\n     better to construct it explicitly in memory and use it to\n     evaluate the product :math:`Sx`.\n\nWhen the user chooses ``ITERATIVE_SCHUR`` as the linear solver, Ceres\nautomatically switches from the exact step algorithm to an inexact\nstep algorithm.\n\n  .. NOTE::\n\n     In exact arithmetic, the choice of implicit versus explicit Schur\n     complement would have no impact on solution quality. However, in\n     practice if the Jacobian is poorly conditioned, one may observe\n     (usually small) differences in solution quality. This is a\n     natural consequence of performing computations in finite arithmetic.\n\n\n.. _section-preconditioner:\n\nPreconditioner\n--------------\n\nThe convergence rate of Conjugate Gradients for\nsolving :eq:`normal` depends on the distribution of eigenvalues\nof :math:`H` [Saad]_. A useful upper bound is\n:math:`\\sqrt{\\kappa(H)}`, where, :math:`\\kappa(H)` is the condition\nnumber of the matrix :math:`H`. For most bundle adjustment problems,\n:math:`\\kappa(H)` is high and a direct application of Conjugate\nGradients to :eq:`normal` results in extremely poor performance.\n\nThe solution to this problem is to replace :eq:`normal` with a\n*preconditioned* system.  Given a linear system, :math:`Ax =b` and a\npreconditioner :math:`M` the preconditioned system is given by\n:math:`M^{-1}Ax = M^{-1}b`. The resulting algorithm is known as\nPreconditioned Conjugate Gradients algorithm (PCG) and its worst case\ncomplexity now depends on the condition number of the *preconditioned*\nmatrix :math:`\\kappa(M^{-1}A)`.\n\nThe computational cost of using a preconditioner :math:`M` is the cost\nof computing :math:`M` and evaluating the product :math:`M^{-1}y` for\narbitrary vectors :math:`y`. Thus, there are two competing factors to\nconsider: How much of :math:`H`'s structure is captured by :math:`M`\nso that the condition number :math:`\\kappa(HM^{-1})` is low, and the\ncomputational cost of constructing and using :math:`M`.  The ideal\npreconditioner would be one for which :math:`\\kappa(M^{-1}A)\n=1`. :math:`M=A` achieves this, but it is not a practical choice, as\napplying this preconditioner would require solving a linear system\nequivalent to the unpreconditioned problem.  It is usually the case\nthat the more information :math:`M` has about :math:`H`, the more\nexpensive it is use. For example, Incomplete Cholesky factorization\nbased preconditioners have much better convergence behavior than the\nJacobi preconditioner, but are also much more expensive.\n\nThe simplest of all preconditioners is the diagonal or Jacobi\npreconditioner, i.e., :math:`M=\\operatorname{diag}(A)`, which for\nblock structured matrices like :math:`H` can be generalized to the\nblock Jacobi preconditioner. Ceres implements the block Jacobi\npreconditioner and refers to it as ``JACOBI``. When used with\n:ref:`section-cgnr` it refers to the block diagonal of :math:`H` and\nwhen used with :ref:`section-iterative_schur` it refers to the block\ndiagonal of :math:`B` [Mandel]_.\n\nAnother obvious choice for :ref:`section-iterative_schur` is the block\ndiagonal of the Schur complement matrix :math:`S`, i.e, the block\nJacobi preconditioner for :math:`S`. Ceres implements it and refers to\nis as the ``SCHUR_JACOBI`` preconditioner.\n\nFor bundle adjustment problems arising in reconstruction from\ncommunity photo collections, more effective preconditioners can be\nconstructed by analyzing and exploiting the camera-point visibility\nstructure of the scene [KushalAgarwal]_. Ceres implements the two\nvisibility based preconditioners described by Kushal & Agarwal as\n``CLUSTER_JACOBI`` and ``CLUSTER_TRIDIAGONAL``. These are fairly new\npreconditioners and Ceres' implementation of them is in its early\nstages and is not as mature as the other preconditioners described\nabove.\n\nTODO(sameeragarwal): Rewrite this section and add the description of\nthe SubsetPreconditioner.\n\n.. _section-ordering:\n\nOrdering\n--------\n\nThe order in which variables are eliminated in a linear solver can\nhave a significant of impact on the efficiency and accuracy of the\nmethod. For example when doing sparse Cholesky factorization, there\nare matrices for which a good ordering will give a Cholesky factor\nwith :math:`O(n)` storage, where as a bad ordering will result in an\ncompletely dense factor.\n\nCeres allows the user to provide varying amounts of hints to the\nsolver about the variable elimination ordering to use. This can range\nfrom no hints, where the solver is free to decide the best ordering\nbased on the user's choices like the linear solver being used, to an\nexact order in which the variables should be eliminated, and a variety\nof possibilities in between.\n\nInstances of the :class:`ParameterBlockOrdering` class are used to\ncommunicate this information to Ceres.\n\nFormally an ordering is an ordered partitioning of the parameter\nblocks. Each parameter block belongs to exactly one group, and each\ngroup has a unique integer associated with it, that determines its\norder in the set of groups. We call these groups *Elimination Groups*\n\nGiven such an ordering, Ceres ensures that the parameter blocks in the\nlowest numbered elimination group are eliminated first, and then the\nparameter blocks in the next lowest numbered elimination group and so\non. Within each elimination group, Ceres is free to order the\nparameter blocks as it chooses. For example, consider the linear system\n\n.. math::\n  x + y &= 3\\\\\n  2x + 3y &= 7\n\nThere are two ways in which it can be solved. First eliminating\n:math:`x` from the two equations, solving for :math:`y` and then back\nsubstituting for :math:`x`, or first eliminating :math:`y`, solving\nfor :math:`x` and back substituting for :math:`y`. The user can\nconstruct three orderings here.\n\n1. :math:`\\{0: x\\}, \\{1: y\\}` : Eliminate :math:`x` first.\n2. :math:`\\{0: y\\}, \\{1: x\\}` : Eliminate :math:`y` first.\n3. :math:`\\{0: x, y\\}`        : Solver gets to decide the elimination order.\n\nThus, to have Ceres determine the ordering automatically using\nheuristics, put all the variables in the same elimination group. The\nidentity of the group does not matter. This is the same as not\nspecifying an ordering at all. To control the ordering for every\nvariable, create an elimination group per variable, ordering them in\nthe desired order.\n\nIf the user is using one of the Schur solvers (``DENSE_SCHUR``,\n``SPARSE_SCHUR``, ``ITERATIVE_SCHUR``) and chooses to specify an\nordering, it must have one important property. The lowest numbered\nelimination group must form an independent set in the graph\ncorresponding to the Hessian, or in other words, no two parameter\nblocks in in the first elimination group should co-occur in the same\nresidual block. For the best performance, this elimination group\nshould be as large as possible. For standard bundle adjustment\nproblems, this corresponds to the first elimination group containing\nall the 3d points, and the second containing the all the cameras\nparameter blocks.\n\nIf the user leaves the choice to Ceres, then the solver uses an\napproximate maximum independent set algorithm to identify the first\nelimination group [LiSaad]_.\n\n.. _section-solver-options:\n\n:class:`Solver::Options`\n========================\n\n.. class:: Solver::Options\n\n   :class:`Solver::Options` controls the overall behavior of the\n   solver. We list the various settings and their default values below.\n\n.. function:: bool Solver::Options::IsValid(string* error) const\n\n   Validate the values in the options struct and returns true on\n   success. If there is a problem, the method returns false with\n   ``error`` containing a textual description of the cause.\n\n.. member:: MinimizerType Solver::Options::minimizer_type\n\n   Default: ``TRUST_REGION``\n\n   Choose between ``LINE_SEARCH`` and ``TRUST_REGION`` algorithms. See\n   :ref:`section-trust-region-methods` and\n   :ref:`section-line-search-methods` for more details.\n\n.. member:: LineSearchDirectionType Solver::Options::line_search_direction_type\n\n   Default: ``LBFGS``\n\n   Choices are ``STEEPEST_DESCENT``, ``NONLINEAR_CONJUGATE_GRADIENT``,\n   ``BFGS`` and ``LBFGS``.\n\n.. member:: LineSearchType Solver::Options::line_search_type\n\n   Default: ``WOLFE``\n\n   Choices are ``ARMIJO`` and ``WOLFE`` (strong Wolfe conditions).\n   Note that in order for the assumptions underlying the ``BFGS`` and\n   ``LBFGS`` line search direction algorithms to be guaranteed to be\n   satisifed, the ``WOLFE`` line search should be used.\n\n.. member:: NonlinearConjugateGradientType Solver::Options::nonlinear_conjugate_gradient_type\n\n   Default: ``FLETCHER_REEVES``\n\n   Choices are ``FLETCHER_REEVES``, ``POLAK_RIBIERE`` and\n   ``HESTENES_STIEFEL``.\n\n.. member:: int Solver::Options::max_lbfgs_rank\n\n   Default: 20\n\n   The L-BFGS hessian approximation is a low rank approximation to the\n   inverse of the Hessian matrix. The rank of the approximation\n   determines (linearly) the space and time complexity of using the\n   approximation. Higher the rank, the better is the quality of the\n   approximation. The increase in quality is however is bounded for a\n   number of reasons.\n\n     1. The method only uses secant information and not actual\n        derivatives.\n\n     2. The Hessian approximation is constrained to be positive\n        definite.\n\n   So increasing this rank to a large number will cost time and space\n   complexity without the corresponding increase in solution\n   quality. There are no hard and fast rules for choosing the maximum\n   rank. The best choice usually requires some problem specific\n   experimentation.\n\n.. member:: bool Solver::Options::use_approximate_eigenvalue_bfgs_scaling\n\n   Default: ``false``\n\n   As part of the ``BFGS`` update step / ``LBFGS`` right-multiply\n   step, the initial inverse Hessian approximation is taken to be the\n   Identity.  However, [Oren]_ showed that using instead :math:`I *\n   \\gamma`, where :math:`\\gamma` is a scalar chosen to approximate an\n   eigenvalue of the true inverse Hessian can result in improved\n   convergence in a wide variety of cases.  Setting\n   ``use_approximate_eigenvalue_bfgs_scaling`` to true enables this\n   scaling in ``BFGS`` (before first iteration) and ``LBFGS`` (at each\n   iteration).\n\n   Precisely, approximate eigenvalue scaling equates to\n\n   .. math:: \\gamma = \\frac{y_k' s_k}{y_k' y_k}\n\n   With:\n\n  .. math:: y_k = \\nabla f_{k+1} - \\nabla f_k\n  .. math:: s_k = x_{k+1} - x_k\n\n  Where :math:`f()` is the line search objective and :math:`x` the\n  vector of parameter values [NocedalWright]_.\n\n  It is important to note that approximate eigenvalue scaling does\n  **not** *always* improve convergence, and that it can in fact\n  *significantly* degrade performance for certain classes of problem,\n  which is why it is disabled by default.  In particular it can\n  degrade performance when the sensitivity of the problem to different\n  parameters varies significantly, as in this case a single scalar\n  factor fails to capture this variation and detrimentally downscales\n  parts of the Jacobian approximation which correspond to\n  low-sensitivity parameters. It can also reduce the robustness of the\n  solution to errors in the Jacobians.\n\n.. member:: LineSearchIterpolationType Solver::Options::line_search_interpolation_type\n\n   Default: ``CUBIC``\n\n   Degree of the polynomial used to approximate the objective\n   function. Valid values are ``BISECTION``, ``QUADRATIC`` and\n   ``CUBIC``.\n\n.. member:: double Solver::Options::min_line_search_step_size\n\n   The line search terminates if:\n\n   .. math:: \\|\\Delta x_k\\|_\\infty < \\text{min_line_search_step_size}\n\n   where :math:`\\|\\cdot\\|_\\infty` refers to the max norm, and\n   :math:`\\Delta x_k` is the step change in the parameter values at\n   the :math:`k`-th iteration.\n\n.. member:: double Solver::Options::line_search_sufficient_function_decrease\n\n   Default: ``1e-4``\n\n   Solving the line search problem exactly is computationally\n   prohibitive. Fortunately, line search based optimization algorithms\n   can still guarantee convergence if instead of an exact solution,\n   the line search algorithm returns a solution which decreases the\n   value of the objective function sufficiently. More precisely, we\n   are looking for a step size s.t.\n\n   .. math:: f(\\text{step_size}) \\le f(0) + \\text{sufficient_decrease} * [f'(0) * \\text{step_size}]\n\n   This condition is known as the Armijo condition.\n\n.. member:: double Solver::Options::max_line_search_step_contraction\n\n   Default: ``1e-3``\n\n   In each iteration of the line search,\n\n   .. math:: \\text{new_step_size} >= \\text{max_line_search_step_contraction} * \\text{step_size}\n\n   Note that by definition, for contraction:\n\n   .. math:: 0 < \\text{max_step_contraction} < \\text{min_step_contraction} < 1\n\n.. member:: double Solver::Options::min_line_search_step_contraction\n\n   Default: ``0.6``\n\n   In each iteration of the line search,\n\n   .. math:: \\text{new_step_size} <= \\text{min_line_search_step_contraction} * \\text{step_size}\n\n   Note that by definition, for contraction:\n\n   .. math:: 0 < \\text{max_step_contraction} < \\text{min_step_contraction} < 1\n\n.. member:: int Solver::Options::max_num_line_search_step_size_iterations\n\n   Default: ``20``\n\n   Maximum number of trial step size iterations during each line\n   search, if a step size satisfying the search conditions cannot be\n   found within this number of trials, the line search will stop.\n\n   The minimum allowed value is 0 for trust region minimizer and 1\n   otherwise. If 0 is specified for the trust region minimizer, then\n   line search will not be used when solving constrained optimization\n   problems.\n\n   As this is an 'artificial' constraint (one imposed by the user, not\n   the underlying math), if ``WOLFE`` line search is being used, *and*\n   points satisfying the Armijo sufficient (function) decrease\n   condition have been found during the current search (in :math:`<=`\n   ``max_num_line_search_step_size_iterations``).  Then, the step size\n   with the lowest function value which satisfies the Armijo condition\n   will be returned as the new valid step, even though it does *not*\n   satisfy the strong Wolfe conditions.  This behaviour protects\n   against early termination of the optimizer at a sub-optimal point.\n\n.. member:: int Solver::Options::max_num_line_search_direction_restarts\n\n   Default: ``5``\n\n   Maximum number of restarts of the line search direction algorithm\n   before terminating the optimization. Restarts of the line search\n   direction algorithm occur when the current algorithm fails to\n   produce a new descent direction. This typically indicates a\n   numerical failure, or a breakdown in the validity of the\n   approximations used.\n\n.. member:: double Solver::Options::line_search_sufficient_curvature_decrease\n\n   Default: ``0.9``\n\n   The strong Wolfe conditions consist of the Armijo sufficient\n   decrease condition, and an additional requirement that the\n   step size be chosen s.t. the *magnitude* ('strong' Wolfe\n   conditions) of the gradient along the search direction\n   decreases sufficiently. Precisely, this second condition\n   is that we seek a step size s.t.\n\n   .. math:: \\|f'(\\text{step_size})\\| <= \\text{sufficient_curvature_decrease} * \\|f'(0)\\|\n\n   Where :math:`f()` is the line search objective and :math:`f'()` is the derivative\n   of :math:`f` with respect to the step size: :math:`\\frac{d f}{d~\\text{step size}}`.\n\n.. member:: double Solver::Options::max_line_search_step_expansion\n\n   Default: ``10.0``\n\n   During the bracketing phase of a Wolfe line search, the step size\n   is increased until either a point satisfying the Wolfe conditions\n   is found, or an upper bound for a bracket containing a point\n   satisfying the conditions is found.  Precisely, at each iteration\n   of the expansion:\n\n   .. math:: \\text{new_step_size} <= \\text{max_step_expansion} * \\text{step_size}\n\n   By definition for expansion\n\n   .. math:: \\text{max_step_expansion} > 1.0\n\n.. member:: TrustRegionStrategyType Solver::Options::trust_region_strategy_type\n\n   Default: ``LEVENBERG_MARQUARDT``\n\n   The trust region step computation algorithm used by\n   Ceres. Currently ``LEVENBERG_MARQUARDT`` and ``DOGLEG`` are the two\n   valid choices. See :ref:`section-levenberg-marquardt` and\n   :ref:`section-dogleg` for more details.\n\n.. member:: DoglegType Solver::Options::dogleg_type\n\n   Default: ``TRADITIONAL_DOGLEG``\n\n   Ceres supports two different dogleg strategies.\n   ``TRADITIONAL_DOGLEG`` method by Powell and the ``SUBSPACE_DOGLEG``\n   method described by [ByrdSchnabel]_ .  See :ref:`section-dogleg`\n   for more details.\n\n.. member:: bool Solver::Options::use_nonmonotonic_steps\n\n   Default: ``false``\n\n   Relax the requirement that the trust-region algorithm take strictly\n   decreasing steps. See :ref:`section-non-monotonic-steps` for more\n   details.\n\n.. member:: int Solver::Options::max_consecutive_nonmonotonic_steps\n\n   Default: ``5``\n\n   The window size used by the step selection algorithm to accept\n   non-monotonic steps.\n\n.. member:: int Solver::Options::max_num_iterations\n\n   Default: ``50``\n\n   Maximum number of iterations for which the solver should run.\n\n.. member:: double Solver::Options::max_solver_time_in_seconds\n\n   Default: ``1e6``\n   Maximum amount of time for which the solver should run.\n\n.. member:: int Solver::Options::num_threads\n\n   Default: ``1``\n\n   Number of threads used by Ceres to evaluate the Jacobian.\n\n.. member::  double Solver::Options::initial_trust_region_radius\n\n   Default: ``1e4``\n\n   The size of the initial trust region. When the\n   ``LEVENBERG_MARQUARDT`` strategy is used, the reciprocal of this\n   number is the initial regularization parameter.\n\n.. member:: double Solver::Options::max_trust_region_radius\n\n   Default: ``1e16``\n\n   The trust region radius is not allowed to grow beyond this value.\n\n.. member:: double Solver::Options::min_trust_region_radius\n\n   Default: ``1e-32``\n\n   The solver terminates, when the trust region becomes smaller than\n   this value.\n\n.. member:: double Solver::Options::min_relative_decrease\n\n   Default: ``1e-3``\n\n   Lower threshold for relative decrease before a trust-region step is\n   accepted.\n\n.. member:: double Solver::Options::min_lm_diagonal\n\n   Default: ``1e6``\n\n   The ``LEVENBERG_MARQUARDT`` strategy, uses a diagonal matrix to\n   regularize the trust region step. This is the lower bound on\n   the values of this diagonal matrix.\n\n.. member:: double Solver::Options::max_lm_diagonal\n\n   Default:  ``1e32``\n\n   The ``LEVENBERG_MARQUARDT`` strategy, uses a diagonal matrix to\n   regularize the trust region step. This is the upper bound on\n   the values of this diagonal matrix.\n\n.. member:: int Solver::Options::max_num_consecutive_invalid_steps\n\n   Default: ``5``\n\n   The step returned by a trust region strategy can sometimes be\n   numerically invalid, usually because of conditioning\n   issues. Instead of crashing or stopping the optimization, the\n   optimizer can go ahead and try solving with a smaller trust\n   region/better conditioned problem. This parameter sets the number\n   of consecutive retries before the minimizer gives up.\n\n.. member:: double Solver::Options::function_tolerance\n\n   Default: ``1e-6``\n\n   Solver terminates if\n\n   .. math:: \\frac{|\\Delta \\text{cost}|}{\\text{cost}} <= \\text{function_tolerance}\n\n   where, :math:`\\Delta \\text{cost}` is the change in objective\n   function value (up or down) in the current iteration of\n   Levenberg-Marquardt.\n\n.. member:: double Solver::Options::gradient_tolerance\n\n   Default: ``1e-10``\n\n   Solver terminates if\n\n   .. math:: \\|x - \\Pi \\boxplus(x, -g(x))\\|_\\infty <= \\text{gradient_tolerance}\n\n   where :math:`\\|\\cdot\\|_\\infty` refers to the max norm, :math:`\\Pi`\n   is projection onto the bounds constraints and :math:`\\boxplus` is\n   Plus operation for the overall local parameterization associated\n   with the parameter vector.\n\n.. member:: double Solver::Options::parameter_tolerance\n\n   Default: ``1e-8``\n\n   Solver terminates if\n\n   .. math:: \\|\\Delta x\\| <= (\\|x\\| + \\text{parameter_tolerance}) * \\text{parameter_tolerance}\n\n   where :math:`\\Delta x` is the step computed by the linear solver in\n   the current iteration.\n\n.. member:: LinearSolverType Solver::Options::linear_solver_type\n\n   Default: ``SPARSE_NORMAL_CHOLESKY`` / ``DENSE_QR``\n\n   Type of linear solver used to compute the solution to the linear\n   least squares problem in each iteration of the Levenberg-Marquardt\n   algorithm. If Ceres is built with support for ``SuiteSparse`` or\n   ``CXSparse`` or ``Eigen``'s sparse Cholesky factorization, the\n   default is ``SPARSE_NORMAL_CHOLESKY``, it is ``DENSE_QR``\n   otherwise.\n\n.. member:: PreconditionerType Solver::Options::preconditioner_type\n\n   Default: ``JACOBI``\n\n   The preconditioner used by the iterative linear solver. The default\n   is the block Jacobi preconditioner. Valid values are (in increasing\n   order of complexity) ``IDENTITY``, ``JACOBI``, ``SCHUR_JACOBI``,\n   ``CLUSTER_JACOBI`` and ``CLUSTER_TRIDIAGONAL``. See\n   :ref:`section-preconditioner` for more details.\n\n.. member:: VisibilityClusteringType Solver::Options::visibility_clustering_type\n\n   Default: ``CANONICAL_VIEWS``\n\n   Type of clustering algorithm to use when constructing a visibility\n   based preconditioner. The original visibility based preconditioning\n   paper and implementation only used the canonical views algorithm.\n\n   This algorithm gives high quality results but for large dense\n   graphs can be particularly expensive. As its worst case complexity\n   is cubic in size of the graph.\n\n   Another option is to use ``SINGLE_LINKAGE`` which is a simple\n   thresholded single linkage clustering algorithm that only pays\n   attention to tightly coupled blocks in the Schur complement. This\n   is a fast algorithm that works well.\n\n   The optimal choice of the clustering algorithm depends on the\n   sparsity structure of the problem, but generally speaking we\n   recommend that you try ``CANONICAL_VIEWS`` first and if it is too\n   expensive try ``SINGLE_LINKAGE``.\n\n.. member:: DenseLinearAlgebraLibrary Solver::Options::dense_linear_algebra_library_type\n\n   Default:``EIGEN``\n\n   Ceres supports using multiple dense linear algebra libraries for\n   dense matrix factorizations. Currently ``EIGEN`` and ``LAPACK`` are\n   the valid choices. ``EIGEN`` is always available, ``LAPACK`` refers\n   to the system ``BLAS + LAPACK`` library which may or may not be\n   available.\n\n   This setting affects the ``DENSE_QR``, ``DENSE_NORMAL_CHOLESKY``\n   and ``DENSE_SCHUR`` solvers. For small to moderate sized probem\n   ``EIGEN`` is a fine choice but for large problems, an optimized\n   ``LAPACK + BLAS`` implementation can make a substantial difference\n   in performance.\n\n.. member:: SparseLinearAlgebraLibrary Solver::Options::sparse_linear_algebra_library_type\n\n   Default: The highest available according to: ``SUITE_SPARSE`` >\n   ``CX_SPARSE`` > ``EIGEN_SPARSE`` > ``NO_SPARSE``\n\n   Ceres supports the use of three sparse linear algebra libraries,\n   ``SuiteSparse``, which is enabled by setting this parameter to\n   ``SUITE_SPARSE``, ``CXSparse``, which can be selected by setting\n   this parameter to ``CX_SPARSE`` and ``Eigen`` which is enabled by\n   setting this parameter to ``EIGEN_SPARSE``.  Lastly, ``NO_SPARSE``\n   means that no sparse linear solver should be used; note that this is\n   irrespective of whether Ceres was compiled with support for one.\n\n   ``SuiteSparse`` is a sophisticated and complex sparse linear\n   algebra library and should be used in general.\n\n   If your needs/platforms prevent you from using ``SuiteSparse``,\n   consider using ``CXSparse``, which is a much smaller, easier to\n   build library. As can be expected, its performance on large\n   problems is not comparable to that of ``SuiteSparse``.\n\n   Last but not the least you can use the sparse linear algebra\n   routines in ``Eigen``. Currently the performance of this library is\n   the poorest of the three. But this should change in the near\n   future.\n\n   Another thing to consider here is that the sparse Cholesky\n   factorization libraries in Eigen are licensed under ``LGPL`` and\n   building Ceres with support for ``EIGEN_SPARSE`` will result in an\n   LGPL licensed library (since the corresponding code from Eigen is\n   compiled into the library).\n\n   The upside is that you do not need to build and link to an external\n   library to use ``EIGEN_SPARSE``.\n\n\n.. member:: shared_ptr<ParameterBlockOrdering> Solver::Options::linear_solver_ordering\n\n   Default: ``NULL``\n\n   An instance of the ordering object informs the solver about the\n   desired order in which parameter blocks should be eliminated by the\n   linear solvers. See section~\\ref{sec:ordering`` for more details.\n\n   If ``NULL``, the solver is free to choose an ordering that it\n   thinks is best.\n\n   See :ref:`section-ordering` for more details.\n\n.. member:: bool Solver::Options::use_explicit_schur_complement\n\n   Default: ``false``\n\n   Use an explicitly computed Schur complement matrix with\n   ``ITERATIVE_SCHUR``.\n\n   By default this option is disabled and ``ITERATIVE_SCHUR``\n   evaluates evaluates matrix-vector products between the Schur\n   complement and a vector implicitly by exploiting the algebraic\n   expression for the Schur complement.\n\n   The cost of this evaluation scales with the number of non-zeros in\n   the Jacobian.\n\n   For small to medium sized problems there is a sweet spot where\n   computing the Schur complement is cheap enough that it is much more\n   efficient to explicitly compute it and use it for evaluating the\n   matrix-vector products.\n\n   Enabling this option tells ``ITERATIVE_SCHUR`` to use an explicitly\n   computed Schur complement. This can improve the performance of the\n   ``ITERATIVE_SCHUR`` solver significantly.\n\n   .. NOTE:\n\n     This option can only be used with the ``SCHUR_JACOBI``\n     preconditioner.\n\n.. member:: bool Solver::Options::use_post_ordering\n\n   Default: ``false``\n\n   Sparse Cholesky factorization algorithms use a fill-reducing\n   ordering to permute the columns of the Jacobian matrix. There are\n   two ways of doing this.\n\n   1. Compute the Jacobian matrix in some order and then have the\n      factorization algorithm permute the columns of the Jacobian.\n\n   2. Compute the Jacobian with its columns already permuted.\n\n   The first option incurs a significant memory penalty. The\n   factorization algorithm has to make a copy of the permuted Jacobian\n   matrix, thus Ceres pre-permutes the columns of the Jacobian matrix\n   and generally speaking, there is no performance penalty for doing\n   so.\n\n   In some rare cases, it is worth using a more complicated reordering\n   algorithm which has slightly better runtime performance at the\n   expense of an extra copy of the Jacobian matrix. Setting\n   ``use_postordering`` to ``true`` enables this tradeoff.\n\n.. member:: bool Solver::Options::dynamic_sparsity\n\n   Some non-linear least squares problems are symbolically dense but\n   numerically sparse. i.e. at any given state only a small number of\n   Jacobian entries are non-zero, but the position and number of\n   non-zeros is different depending on the state. For these problems\n   it can be useful to factorize the sparse jacobian at each solver\n   iteration instead of including all of the zero entries in a single\n   general factorization.\n\n   If your problem does not have this property (or you do not know),\n   then it is probably best to keep this false, otherwise it will\n   likely lead to worse performance.\n\n   This setting only affects the `SPARSE_NORMAL_CHOLESKY` solver.\n\n.. member:: int Solver::Options::min_linear_solver_iterations\n\n   Default: ``0``\n\n   Minimum number of iterations used by the linear solver. This only\n   makes sense when the linear solver is an iterative solver, e.g.,\n   ``ITERATIVE_SCHUR`` or ``CGNR``.\n\n.. member:: int Solver::Options::max_linear_solver_iterations\n\n   Default: ``500``\n\n   Minimum number of iterations used by the linear solver. This only\n   makes sense when the linear solver is an iterative solver, e.g.,\n   ``ITERATIVE_SCHUR`` or ``CGNR``.\n\n.. member:: double Solver::Options::eta\n\n   Default: ``1e-1``\n\n   Forcing sequence parameter. The truncated Newton solver uses this\n   number to control the relative accuracy with which the Newton step\n   is computed. This constant is passed to\n   ``ConjugateGradientsSolver`` which uses it to terminate the\n   iterations when\n\n   .. math:: \\frac{Q_i - Q_{i-1}}{Q_i} < \\frac{\\eta}{i}\n\n.. member:: bool Solver::Options::jacobi_scaling\n\n   Default: ``true``\n\n   ``true`` means that the Jacobian is scaled by the norm of its\n   columns before being passed to the linear solver. This improves the\n   numerical conditioning of the normal equations.\n\n.. member:: bool Solver::Options::use_inner_iterations\n\n   Default: ``false``\n\n   Use a non-linear version of a simplified variable projection\n   algorithm. Essentially this amounts to doing a further optimization\n   on each Newton/Trust region step using a coordinate descent\n   algorithm.  For more details, see :ref:`section-inner-iterations`.\n\n   **Note** Inner iterations cannot be used with :class:`Problem`\n   objects that have an :class:`EvaluationCallback` associated with\n   them.\n\n.. member:: double Solver::Options::inner_iteration_tolerance\n\n   Default: ``1e-3``\n\n   Generally speaking, inner iterations make significant progress in\n   the early stages of the solve and then their contribution drops\n   down sharply, at which point the time spent doing inner iterations\n   is not worth it.\n\n   Once the relative decrease in the objective function due to inner\n   iterations drops below ``inner_iteration_tolerance``, the use of\n   inner iterations in subsequent trust region minimizer iterations is\n   disabled.\n\n.. member:: shared_ptr<ParameterBlockOrdering> Solver::Options::inner_iteration_ordering\n\n   Default: ``NULL``\n\n   If :member:`Solver::Options::use_inner_iterations` true, then the\n   user has two choices.\n\n   1. Let the solver heuristically decide which parameter blocks to\n      optimize in each inner iteration. To do this, set\n      :member:`Solver::Options::inner_iteration_ordering` to ``NULL``.\n\n   2. Specify a collection of of ordered independent sets. The lower\n      numbered groups are optimized before the higher number groups\n      during the inner optimization phase. Each group must be an\n      independent set. Not all parameter blocks need to be included in\n      the ordering.\n\n   See :ref:`section-ordering` for more details.\n\n.. member:: LoggingType Solver::Options::logging_type\n\n   Default: ``PER_MINIMIZER_ITERATION``\n\n.. member:: bool Solver::Options::minimizer_progress_to_stdout\n\n   Default: ``false``\n\n   By default the :class:`Minimizer` progress is logged to ``STDERR``\n   depending on the ``vlog`` level. If this flag is set to true, and\n   :member:`Solver::Options::logging_type` is not ``SILENT``, the logging\n   output is sent to ``STDOUT``.\n\n   For ``TRUST_REGION_MINIMIZER`` the progress display looks like\n\n   .. code-block:: bash\n\n      iter      cost      cost_change  |gradient|   |step|    tr_ratio  tr_radius  ls_iter  iter_time  total_time\n         0  4.185660e+06    0.00e+00    1.09e+08   0.00e+00   0.00e+00  1.00e+04       0    7.59e-02    3.37e-01\n         1  1.062590e+05    4.08e+06    8.99e+06   5.36e+02   9.82e-01  3.00e+04       1    1.65e-01    5.03e-01\n         2  4.992817e+04    5.63e+04    8.32e+06   3.19e+02   6.52e-01  3.09e+04       1    1.45e-01    6.48e-01\n\n   Here\n\n   #. ``cost`` is the value of the objective function.\n   #. ``cost_change`` is the change in the value of the objective\n      function if the step computed in this iteration is accepted.\n   #. ``|gradient|`` is the max norm of the gradient.\n   #. ``|step|`` is the change in the parameter vector.\n   #. ``tr_ratio`` is the ratio of the actual change in the objective\n      function value to the change in the value of the trust\n      region model.\n   #. ``tr_radius`` is the size of the trust region radius.\n   #. ``ls_iter`` is the number of linear solver iterations used to\n      compute the trust region step. For direct/factorization based\n      solvers it is always 1, for iterative solvers like\n      ``ITERATIVE_SCHUR`` it is the number of iterations of the\n      Conjugate Gradients algorithm.\n   #. ``iter_time`` is the time take by the current iteration.\n   #. ``total_time`` is the total time taken by the minimizer.\n\n   For ``LINE_SEARCH_MINIMIZER`` the progress display looks like\n\n   .. code-block:: bash\n\n      0: f: 2.317806e+05 d: 0.00e+00 g: 3.19e-01 h: 0.00e+00 s: 0.00e+00 e:  0 it: 2.98e-02 tt: 8.50e-02\n      1: f: 2.312019e+05 d: 5.79e+02 g: 3.18e-01 h: 2.41e+01 s: 1.00e+00 e:  1 it: 4.54e-02 tt: 1.31e-01\n      2: f: 2.300462e+05 d: 1.16e+03 g: 3.17e-01 h: 4.90e+01 s: 2.54e-03 e:  1 it: 4.96e-02 tt: 1.81e-01\n\n   Here\n\n   #. ``f`` is the value of the objective function.\n   #. ``d`` is the change in the value of the objective function if\n      the step computed in this iteration is accepted.\n   #. ``g`` is the max norm of the gradient.\n   #. ``h`` is the change in the parameter vector.\n   #. ``s`` is the optimal step length computed by the line search.\n   #. ``it`` is the time take by the current iteration.\n   #. ``tt`` is the total time taken by the minimizer.\n\n.. member:: vector<int> Solver::Options::trust_region_minimizer_iterations_to_dump\n\n   Default: ``empty``\n\n   List of iterations at which the trust region minimizer should dump\n   the trust region problem. Useful for testing and benchmarking. If\n   ``empty``, no problems are dumped.\n\n.. member:: string Solver::Options::trust_region_problem_dump_directory\n\n   Default: ``/tmp``\n\n    Directory to which the problems should be written to. Should be\n    non-empty if\n    :member:`Solver::Options::trust_region_minimizer_iterations_to_dump` is\n    non-empty and\n    :member:`Solver::Options::trust_region_problem_dump_format_type` is not\n    ``CONSOLE``.\n\n.. member:: DumpFormatType Solver::Options::trust_region_problem_dump_format\n\n   Default: ``TEXTFILE``\n\n   The format in which trust region problems should be logged when\n   :member:`Solver::Options::trust_region_minimizer_iterations_to_dump`\n   is non-empty.  There are three options:\n\n   * ``CONSOLE`` prints the linear least squares problem in a human\n      readable format to ``stderr``. The Jacobian is printed as a\n      dense matrix. The vectors :math:`D`, :math:`x` and :math:`f` are\n      printed as dense vectors. This should only be used for small\n      problems.\n\n   * ``TEXTFILE`` Write out the linear least squares problem to the\n     directory pointed to by\n     :member:`Solver::Options::trust_region_problem_dump_directory` as\n     text files which can be read into ``MATLAB/Octave``. The Jacobian\n     is dumped as a text file containing :math:`(i,j,s)` triplets, the\n     vectors :math:`D`, `x` and `f` are dumped as text files\n     containing a list of their values.\n\n     A ``MATLAB/Octave`` script called\n     ``ceres_solver_iteration_???.m`` is also output, which can be\n     used to parse and load the problem into memory.\n\n.. member:: bool Solver::Options::check_gradients\n\n   Default: ``false``\n\n   Check all Jacobians computed by each residual block with finite\n   differences. This is expensive since it involves computing the\n   derivative by normal means (e.g. user specified, autodiff, etc),\n   then also computing it using finite differences. The results are\n   compared, and if they differ substantially, the optimization fails\n   and the details are stored in the solver summary.\n\n.. member:: double Solver::Options::gradient_check_relative_precision\n\n   Default: ``1e-8``\n\n   Precision to check for in the gradient checker. If the relative\n   difference between an element in a Jacobian exceeds this number,\n   then the Jacobian for that cost term is dumped.\n\n.. member:: double Solver::Options::gradient_check_numeric_derivative_relative_step_size\n\n   Default: ``1e-6``\n\n   .. NOTE::\n\n      This option only applies to the numeric differentiation used for\n      checking the user provided derivatives when when\n      `Solver::Options::check_gradients` is true. If you are using\n      :class:`NumericDiffCostFunction` and are interested in changing\n      the step size for numeric differentiation in your cost function,\n      please have a look at :class:`NumericDiffOptions`.\n\n   Relative shift used for taking numeric derivatives when\n   `Solver::Options::check_gradients` is `true`.\n\n   For finite differencing, each dimension is evaluated at slightly\n   shifted values, e.g., for forward differences, the numerical\n   derivative is\n\n   .. math::\n\n     \\delta &= gradient\\_check\\_numeric\\_derivative\\_relative\\_step\\_size\\\\\n     \\Delta f &= \\frac{f((1 + \\delta)  x) - f(x)}{\\delta x}\n\n   The finite differencing is done along each dimension. The reason to\n   use a relative (rather than absolute) step size is that this way,\n   numeric differentiation works for functions where the arguments are\n   typically large (e.g. :math:`10^9`) and when the values are small\n   (e.g. :math:`10^{-5}`). It is possible to construct *torture cases*\n   which break this finite difference heuristic, but they do not come\n   up often in practice.\n\n.. member:: bool Solver::Options::update_state_every_iteration\n\n   Default: ``false``\n\n   If ``update_state_every_iteration`` is ``true``, then Ceres Solver\n   will guarantee that at the end of every iteration and before any\n   user :class:`IterationCallback` is called, the parameter blocks are\n   updated to the current best solution found by the solver. Thus the\n   IterationCallback can inspect the values of the parameter blocks\n   for purposes of computation, visualization or termination.\n\n   If ``update_state_every_iteration`` is ``false`` then there is no\n   such guarantee, and user provided :class:`IterationCallback` s should\n   not expect to look at the parameter blocks and interpret their\n   values.\n\n.. member:: vector<IterationCallback> Solver::Options::callbacks\n\n   Callbacks that are executed at the end of each iteration of the\n   :class:`Minimizer`. They are executed in the order that they are\n   specified in this vector.\n\n   By default, parameter blocks are updated only at the end of the\n   optimization, i.e., when the :class:`Minimizer` terminates. This\n   means that by default, if an :class:`IterationCallback` inspects\n   the parameter blocks, they will not see them changing in the course\n   of the optimization.\n\n   To tell Ceres to update the parameter blocks at the end of each\n   iteration and before calling the user's callback, set\n   :member:`Solver::Options::update_state_every_iteration` to\n   ``true``.\n\n   The solver does NOT take ownership of these pointers.\n\n:class:`ParameterBlockOrdering`\n===============================\n\n.. class:: ParameterBlockOrdering\n\n   ``ParameterBlockOrdering`` is a class for storing and manipulating\n   an ordered collection of groups/sets with the following semantics:\n\n   Group IDs are non-negative integer values. Elements are any type\n   that can serve as a key in a map or an element of a set.\n\n   An element can only belong to one group at a time. A group may\n   contain an arbitrary number of elements.\n\n   Groups are ordered by their group id.\n\n.. function:: bool ParameterBlockOrdering::AddElementToGroup(const double* element, const int group)\n\n   Add an element to a group. If a group with this id does not exist,\n   one is created. This method can be called any number of times for\n   the same element. Group ids should be non-negative numbers.  Return\n   value indicates if adding the element was a success.\n\n.. function:: void ParameterBlockOrdering::Clear()\n\n   Clear the ordering.\n\n.. function:: bool ParameterBlockOrdering::Remove(const double* element)\n\n   Remove the element, no matter what group it is in. If the element\n   is not a member of any group, calling this method will result in a\n   crash.  Return value indicates if the element was actually removed.\n\n.. function:: void ParameterBlockOrdering::Reverse()\n\n   Reverse the order of the groups in place.\n\n.. function:: int ParameterBlockOrdering::GroupId(const double* element) const\n\n   Return the group id for the element. If the element is not a member\n   of any group, return -1.\n\n.. function:: bool ParameterBlockOrdering::IsMember(const double* element) const\n\n   True if there is a group containing the parameter block.\n\n.. function:: int ParameterBlockOrdering::GroupSize(const int group) const\n\n   This function always succeeds, i.e., implicitly there exists a\n   group for every integer.\n\n.. function:: int ParameterBlockOrdering::NumElements() const\n\n   Number of elements in the ordering.\n\n.. function:: int ParameterBlockOrdering::NumGroups() const\n\n   Number of groups with one or more elements.\n\n:class:`IterationCallback`\n==========================\n\n.. class:: IterationSummary\n\n   :class:`IterationSummary` describes the state of the minimizer at\n   the end of each iteration.\n\n.. member:: int32 IterationSummary::iteration\n\n   Current iteration number.\n\n.. member:: bool IterationSummary::step_is_valid\n\n   Step was numerically valid, i.e., all values are finite and the\n   step reduces the value of the linearized model.\n\n    **Note**: :member:`IterationSummary::step_is_valid` is `false`\n    when :member:`IterationSummary::iteration` = 0.\n\n.. member::  bool IterationSummary::step_is_nonmonotonic\n\n    Step did not reduce the value of the objective function\n    sufficiently, but it was accepted because of the relaxed\n    acceptance criterion used by the non-monotonic trust region\n    algorithm.\n\n    **Note**: :member:`IterationSummary::step_is_nonmonotonic` is\n    `false` when when :member:`IterationSummary::iteration` = 0.\n\n.. member:: bool IterationSummary::step_is_successful\n\n   Whether or not the minimizer accepted this step or not.\n\n   If the ordinary trust region algorithm is used, this means that the\n   relative reduction in the objective function value was greater than\n   :member:`Solver::Options::min_relative_decrease`. However, if the\n   non-monotonic trust region algorithm is used\n   (:member:`Solver::Options::use_nonmonotonic_steps` = `true`), then\n   even if the relative decrease is not sufficient, the algorithm may\n   accept the step and the step is declared successful.\n\n   **Note**: :member:`IterationSummary::step_is_successful` is `false`\n   when when :member:`IterationSummary::iteration` = 0.\n\n.. member:: double IterationSummary::cost\n\n   Value of the objective function.\n\n.. member:: double IterationSummary::cost_change\n\n   Change in the value of the objective function in this\n   iteration. This can be positive or negative.\n\n.. member:: double IterationSummary::gradient_max_norm\n\n   Infinity norm of the gradient vector.\n\n.. member:: double IterationSummary::gradient_norm\n\n   2-norm of the gradient vector.\n\n.. member:: double IterationSummary::step_norm\n\n   2-norm of the size of the step computed in this iteration.\n\n.. member:: double IterationSummary::relative_decrease\n\n   For trust region algorithms, the ratio of the actual change in cost\n   and the change in the cost of the linearized approximation.\n\n   This field is not used when a linear search minimizer is used.\n\n.. member:: double IterationSummary::trust_region_radius\n\n   Size of the trust region at the end of the current iteration. For\n   the Levenberg-Marquardt algorithm, the regularization parameter is\n   1.0 / member::`IterationSummary::trust_region_radius`.\n\n.. member:: double IterationSummary::eta\n\n   For the inexact step Levenberg-Marquardt algorithm, this is the\n   relative accuracy with which the step is solved. This number is\n   only applicable to the iterative solvers capable of solving linear\n   systems inexactly. Factorization-based exact solvers always have an\n   eta of 0.0.\n\n.. member:: double IterationSummary::step_size\n\n   Step sized computed by the line search algorithm.\n\n   This field is not used when a trust region minimizer is used.\n\n.. member:: int IterationSummary::line_search_function_evaluations\n\n   Number of function evaluations used by the line search algorithm.\n\n   This field is not used when a trust region minimizer is used.\n\n.. member:: int IterationSummary::linear_solver_iterations\n\n   Number of iterations taken by the linear solver to solve for the\n   trust region step.\n\n   Currently this field is not used when a line search minimizer is\n   used.\n\n.. member:: double IterationSummary::iteration_time_in_seconds\n\n   Time (in seconds) spent inside the minimizer loop in the current\n   iteration.\n\n.. member:: double IterationSummary::step_solver_time_in_seconds\n\n   Time (in seconds) spent inside the trust region step solver.\n\n.. member:: double IterationSummary::cumulative_time_in_seconds\n\n   Time (in seconds) since the user called Solve().\n\n\n.. class:: IterationCallback\n\n   Interface for specifying callbacks that are executed at the end of\n   each iteration of the minimizer.\n\n   .. code-block:: c++\n\n      class IterationCallback {\n       public:\n        virtual ~IterationCallback() {}\n        virtual CallbackReturnType operator()(const IterationSummary& summary) = 0;\n      };\n\n\n  The solver uses the return value of ``operator()`` to decide whether\n  to continue solving or to terminate. The user can return three\n  values.\n\n  #. ``SOLVER_ABORT`` indicates that the callback detected an abnormal\n     situation. The solver returns without updating the parameter\n     blocks (unless ``Solver::Options::update_state_every_iteration`` is\n     set true). Solver returns with ``Solver::Summary::termination_type``\n     set to ``USER_FAILURE``.\n\n  #. ``SOLVER_TERMINATE_SUCCESSFULLY`` indicates that there is no need\n     to optimize anymore (some user specified termination criterion\n     has been met). Solver returns with\n     ``Solver::Summary::termination_type``` set to ``USER_SUCCESS``.\n\n  #. ``SOLVER_CONTINUE`` indicates that the solver should continue\n     optimizing.\n\n  For example, the following :class:`IterationCallback` is used\n  internally by Ceres to log the progress of the optimization.\n\n  .. code-block:: c++\n\n    class LoggingCallback : public IterationCallback {\n     public:\n      explicit LoggingCallback(bool log_to_stdout)\n          : log_to_stdout_(log_to_stdout) {}\n\n      ~LoggingCallback() {}\n\n      CallbackReturnType operator()(const IterationSummary& summary) {\n        const char* kReportRowFormat =\n            \"% 4d: f:% 8e d:% 3.2e g:% 3.2e h:% 3.2e \"\n            \"rho:% 3.2e mu:% 3.2e eta:% 3.2e li:% 3d\";\n        string output = StringPrintf(kReportRowFormat,\n                                     summary.iteration,\n                                     summary.cost,\n                                     summary.cost_change,\n                                     summary.gradient_max_norm,\n                                     summary.step_norm,\n                                     summary.relative_decrease,\n                                     summary.trust_region_radius,\n                                     summary.eta,\n                                     summary.linear_solver_iterations);\n        if (log_to_stdout_) {\n          cout << output << endl;\n        } else {\n          VLOG(1) << output;\n        }\n        return SOLVER_CONTINUE;\n      }\n\n     private:\n      const bool log_to_stdout_;\n    };\n\n\n\n:class:`CRSMatrix`\n==================\n\n.. class:: CRSMatrix\n\n   A compressed row sparse matrix used primarily for communicating the\n   Jacobian matrix to the user.\n\n.. member:: int CRSMatrix::num_rows\n\n   Number of rows.\n\n.. member:: int CRSMatrix::num_cols\n\n   Number of columns.\n\n.. member:: vector<int> CRSMatrix::rows\n\n   :member:`CRSMatrix::rows` is a :member:`CRSMatrix::num_rows` + 1\n   sized array that points into the :member:`CRSMatrix::cols` and\n   :member:`CRSMatrix::values` array.\n\n.. member:: vector<int> CRSMatrix::cols\n\n   :member:`CRSMatrix::cols` contain as many entries as there are\n   non-zeros in the matrix.\n\n   For each row ``i``, ``cols[rows[i]]`` ... ``cols[rows[i + 1] - 1]``\n   are the indices of the non-zero columns of row ``i``.\n\n.. member:: vector<int> CRSMatrix::values\n\n   :member:`CRSMatrix::values` contain as many entries as there are\n   non-zeros in the matrix.\n\n   For each row ``i``,\n   ``values[rows[i]]`` ... ``values[rows[i + 1] - 1]`` are the values\n   of the non-zero columns of row ``i``.\n\ne.g., consider the 3x4 sparse matrix\n\n.. code-block:: c++\n\n   0 10  0  4\n   0  2 -3  2\n   1  2  0  0\n\nThe three arrays will be:\n\n.. code-block:: c++\n\n            -row0-  ---row1---  -row2-\n   rows   = [ 0,      2,          5,     7]\n   cols   = [ 1,  3,  1,  2,  3,  0,  1]\n   values = [10,  4,  2, -3,  2,  1,  2]\n\n\n:class:`Solver::Summary`\n========================\n\n.. class:: Solver::Summary\n\n   Summary of the various stages of the solver after termination.\n\n.. function:: string Solver::Summary::BriefReport() const\n\n   A brief one line description of the state of the solver after\n   termination.\n\n.. function:: string Solver::Summary::FullReport() const\n\n   A full multiline description of the state of the solver after\n   termination.\n\n.. function:: bool Solver::Summary::IsSolutionUsable() const\n\n   Whether the solution returned by the optimization algorithm can be\n   relied on to be numerically sane. This will be the case if\n   `Solver::Summary:termination_type` is set to `CONVERGENCE`,\n   `USER_SUCCESS` or `NO_CONVERGENCE`, i.e., either the solver\n   converged by meeting one of the convergence tolerances or because\n   the user indicated that it had converged or it ran to the maximum\n   number of iterations or time.\n\n.. member:: MinimizerType Solver::Summary::minimizer_type\n\n   Type of minimization algorithm used.\n\n.. member:: TerminationType Solver::Summary::termination_type\n\n   The cause of the minimizer terminating.\n\n.. member:: string Solver::Summary::message\n\n   Reason why the solver terminated.\n\n.. member:: double Solver::Summary::initial_cost\n\n   Cost of the problem (value of the objective function) before the\n   optimization.\n\n.. member:: double Solver::Summary::final_cost\n\n   Cost of the problem (value of the objective function) after the\n   optimization.\n\n.. member:: double Solver::Summary::fixed_cost\n\n   The part of the total cost that comes from residual blocks that\n   were held fixed by the preprocessor because all the parameter\n   blocks that they depend on were fixed.\n\n.. member:: vector<IterationSummary> Solver::Summary::iterations\n\n   :class:`IterationSummary` for each minimizer iteration in order.\n\n.. member:: int Solver::Summary::num_successful_steps\n\n   Number of minimizer iterations in which the step was\n   accepted. Unless :member:`Solver::Options::use_non_monotonic_steps`\n   is `true` this is also the number of steps in which the objective\n   function value/cost went down.\n\n.. member:: int Solver::Summary::num_unsuccessful_steps\n\n   Number of minimizer iterations in which the step was rejected\n   either because it did not reduce the cost enough or the step was\n   not numerically valid.\n\n.. member:: int Solver::Summary::num_inner_iteration_steps\n\n   Number of times inner iterations were performed.\n\n .. member:: int Solver::Summary::num_line_search_steps\n\n    Total number of iterations inside the line search algorithm across\n    all invocations. We call these iterations \"steps\" to distinguish\n    them from the outer iterations of the line search and trust region\n    minimizer algorithms which call the line search algorithm as a\n    subroutine.\n\n.. member:: double Solver::Summary::preprocessor_time_in_seconds\n\n   Time (in seconds) spent in the preprocessor.\n\n.. member:: double Solver::Summary::minimizer_time_in_seconds\n\n   Time (in seconds) spent in the Minimizer.\n\n.. member:: double Solver::Summary::postprocessor_time_in_seconds\n\n   Time (in seconds) spent in the post processor.\n\n.. member:: double Solver::Summary::total_time_in_seconds\n\n   Time (in seconds) spent in the solver.\n\n.. member:: double Solver::Summary::linear_solver_time_in_seconds\n\n   Time (in seconds) spent in the linear solver computing the trust\n   region step.\n\n.. member:: int Solver::Summary::num_linear_solves\n\n   Number of times the Newton step was computed by solving a linear\n   system. This does not include linear solves used by inner\n   iterations.\n\n.. member:: double Solver::Summary::residual_evaluation_time_in_seconds\n\n   Time (in seconds) spent evaluating the residual vector.\n\n.. member:: int Solver::Summary::num_residual_evaluations\n\n   Number of times only the residuals were evaluated.\n\n.. member:: double Solver::Summary::jacobian_evaluation_time_in_seconds\n\n   Time (in seconds) spent evaluating the Jacobian matrix.\n\n.. member:: int Solver::Summary::num_jacobian_evaluations\n\n   Number of times only the Jacobian and the residuals were evaluated.\n\n.. member:: double Solver::Summary::inner_iteration_time_in_seconds\n\n   Time (in seconds) spent doing inner iterations.\n\n.. member:: int Solver::Summary::num_parameter_blocks\n\n   Number of parameter blocks in the problem.\n\n.. member:: int Solver::Summary::num_parameters\n\n   Number of parameters in the problem.\n\n.. member:: int Solver::Summary::num_effective_parameters\n\n   Dimension of the tangent space of the problem (or the number of\n   columns in the Jacobian for the problem). This is different from\n   :member:`Solver::Summary::num_parameters` if a parameter block is\n   associated with a :class:`LocalParameterization`.\n\n.. member:: int Solver::Summary::num_residual_blocks\n\n   Number of residual blocks in the problem.\n\n.. member:: int Solver::Summary::num_residuals\n\n   Number of residuals in the problem.\n\n.. member:: int Solver::Summary::num_parameter_blocks_reduced\n\n   Number of parameter blocks in the problem after the inactive and\n   constant parameter blocks have been removed. A parameter block is\n   inactive if no residual block refers to it.\n\n.. member:: int Solver::Summary::num_parameters_reduced\n\n   Number of parameters in the reduced problem.\n\n.. member:: int Solver::Summary::num_effective_parameters_reduced\n\n   Dimension of the tangent space of the reduced problem (or the\n   number of columns in the Jacobian for the reduced problem). This is\n   different from :member:`Solver::Summary::num_parameters_reduced` if\n   a parameter block in the reduced problem is associated with a\n   :class:`LocalParameterization`.\n\n.. member:: int Solver::Summary::num_residual_blocks_reduced\n\n   Number of residual blocks in the reduced problem.\n\n.. member:: int Solver::Summary::num_residuals_reduced\n\n   Number of residuals in the reduced problem.\n\n.. member:: int Solver::Summary::num_threads_given\n\n   Number of threads specified by the user for Jacobian and residual\n   evaluation.\n\n.. member:: int Solver::Summary::num_threads_used\n\n   Number of threads actually used by the solver for Jacobian and\n   residual evaluation. This number is not equal to\n   :member:`Solver::Summary::num_threads_given` if none of `OpenMP`\n   or `CXX11_THREADS` is available.\n\n.. member:: LinearSolverType Solver::Summary::linear_solver_type_given\n\n   Type of the linear solver requested by the user.\n\n.. member:: LinearSolverType Solver::Summary::linear_solver_type_used\n\n   Type of the linear solver actually used. This may be different from\n   :member:`Solver::Summary::linear_solver_type_given` if Ceres\n   determines that the problem structure is not compatible with the\n   linear solver requested or if the linear solver requested by the\n   user is not available, e.g. The user requested\n   `SPARSE_NORMAL_CHOLESKY` but no sparse linear algebra library was\n   available.\n\n.. member:: vector<int> Solver::Summary::linear_solver_ordering_given\n\n   Size of the elimination groups given by the user as hints to the\n   linear solver.\n\n.. member:: vector<int> Solver::Summary::linear_solver_ordering_used\n\n   Size of the parameter groups used by the solver when ordering the\n   columns of the Jacobian.  This maybe different from\n   :member:`Solver::Summary::linear_solver_ordering_given` if the user\n   left :member:`Solver::Summary::linear_solver_ordering_given` blank\n   and asked for an automatic ordering, or if the problem contains\n   some constant or inactive parameter blocks.\n\n.. member:: std::string Solver::Summary::schur_structure_given\n\n    For Schur type linear solvers, this string describes the template\n    specialization which was detected in the problem and should be\n    used.\n\n.. member:: std::string Solver::Summary::schur_structure_used\n\n   For Schur type linear solvers, this string describes the template\n   specialization that was actually instantiated and used. The reason\n   this will be different from\n   :member:`Solver::Summary::schur_structure_given` is because the\n   corresponding template specialization does not exist.\n\n   Template specializations can be added to ceres by editing\n   ``internal/ceres/generate_template_specializations.py``\n\n.. member:: bool Solver::Summary::inner_iterations_given\n\n   `True` if the user asked for inner iterations to be used as part of\n   the optimization.\n\n.. member:: bool Solver::Summary::inner_iterations_used\n\n   `True` if the user asked for inner iterations to be used as part of\n   the optimization and the problem structure was such that they were\n   actually performed. For example, in a problem with just one parameter\n   block, inner iterations are not performed.\n\n.. member:: vector<int> inner_iteration_ordering_given\n\n   Size of the parameter groups given by the user for performing inner\n   iterations.\n\n.. member:: vector<int> inner_iteration_ordering_used\n\n   Size of the parameter groups given used by the solver for\n   performing inner iterations. This maybe different from\n   :member:`Solver::Summary::inner_iteration_ordering_given` if the\n   user left :member:`Solver::Summary::inner_iteration_ordering_given`\n   blank and asked for an automatic ordering, or if the problem\n   contains some constant or inactive parameter blocks.\n\n.. member:: PreconditionerType Solver::Summary::preconditioner_type_given\n\n   Type of the preconditioner requested by the user.\n\n.. member:: PreconditionerType Solver::Summary::preconditioner_type_used\n\n   Type of the preconditioner actually used. This may be different\n   from :member:`Solver::Summary::linear_solver_type_given` if Ceres\n   determines that the problem structure is not compatible with the\n   linear solver requested or if the linear solver requested by the\n   user is not available.\n\n.. member:: VisibilityClusteringType Solver::Summary::visibility_clustering_type\n\n   Type of clustering algorithm used for visibility based\n   preconditioning. Only meaningful when the\n   :member:`Solver::Summary::preconditioner_type` is\n   ``CLUSTER_JACOBI`` or ``CLUSTER_TRIDIAGONAL``.\n\n.. member:: TrustRegionStrategyType Solver::Summary::trust_region_strategy_type\n\n   Type of trust region strategy.\n\n.. member:: DoglegType Solver::Summary::dogleg_type\n\n   Type of dogleg strategy used for solving the trust region problem.\n\n.. member:: DenseLinearAlgebraLibraryType Solver::Summary::dense_linear_algebra_library_type\n\n   Type of the dense linear algebra library used.\n\n.. member:: SparseLinearAlgebraLibraryType Solver::Summary::sparse_linear_algebra_library_type\n\n   Type of the sparse linear algebra library used.\n\n.. member:: LineSearchDirectionType Solver::Summary::line_search_direction_type\n\n   Type of line search direction used.\n\n.. member:: LineSearchType Solver::Summary::line_search_type\n\n   Type of the line search algorithm used.\n\n.. member:: LineSearchInterpolationType Solver::Summary::line_search_interpolation_type\n\n   When performing line search, the degree of the polynomial used to\n   approximate the objective function.\n\n.. member:: NonlinearConjugateGradientType Solver::Summary::nonlinear_conjugate_gradient_type\n\n   If the line search direction is `NONLINEAR_CONJUGATE_GRADIENT`,\n   then this indicates the particular variant of non-linear conjugate\n   gradient used.\n\n.. member:: int Solver::Summary::max_lbfgs_rank\n\n   If the type of the line search direction is `LBFGS`, then this\n   indicates the rank of the Hessian approximation.\n"
  },
  {
    "path": "3rdparty/ceres/docs/source/nnls_tutorial.rst",
    "content": ".. highlight:: c++\n\n.. default-domain:: cpp\n\n.. _chapter-nnls_tutorial:\n\n========================\nNon-linear Least Squares\n========================\n\nIntroduction\n============\n\nCeres can solve bounds constrained robustified non-linear least\nsquares problems of the form\n\n.. math:: :label: ceresproblem\n\n   \\min_{\\mathbf{x}} &\\quad \\frac{1}{2}\\sum_{i} \\rho_i\\left(\\left\\|f_i\\left(x_{i_1}, ... ,x_{i_k}\\right)\\right\\|^2\\right) \\\\\n   \\text{s.t.} &\\quad l_j \\le x_j \\le u_j\n\nProblems of this form comes up in a broad range of areas across\nscience and engineering - from `fitting curves`_ in statistics, to\nconstructing `3D models from photographs`_ in computer vision.\n\n.. _fitting curves: http://en.wikipedia.org/wiki/Nonlinear_regression\n.. _3D models from photographs: http://en.wikipedia.org/wiki/Bundle_adjustment\n\nIn this chapter we will learn how to solve :eq:`ceresproblem` using\nCeres Solver. Full working code for all the examples described in this\nchapter and more can be found in the `examples\n<https://ceres-solver.googlesource.com/ceres-solver/+/master/examples/>`_\ndirectory.\n\nThe expression\n:math:`\\rho_i\\left(\\left\\|f_i\\left(x_{i_1},...,x_{i_k}\\right)\\right\\|^2\\right)`\nis known as a ``ResidualBlock``, where :math:`f_i(\\cdot)` is a\n:class:`CostFunction` that depends on the parameter blocks\n:math:`\\left[x_{i_1},... , x_{i_k}\\right]`. In most optimization\nproblems small groups of scalars occur together. For example the three\ncomponents of a translation vector and the four components of the\nquaternion that define the pose of a camera. We refer to such a group\nof small scalars as a ``ParameterBlock``. Of course a\n``ParameterBlock`` can just be a single parameter. :math:`l_j` and\n:math:`u_j` are bounds on the parameter block :math:`x_j`.\n\n:math:`\\rho_i` is a :class:`LossFunction`. A :class:`LossFunction` is\na scalar function that is used to reduce the influence of outliers on\nthe solution of non-linear least squares problems.\n\nAs a special case, when :math:`\\rho_i(x) = x`, i.e., the identity\nfunction, and :math:`l_j = -\\infty` and :math:`u_j = \\infty` we get\nthe more familiar `non-linear least squares problem\n<http://en.wikipedia.org/wiki/Non-linear_least_squares>`_.\n\n.. math:: \\frac{1}{2}\\sum_{i} \\left\\|f_i\\left(x_{i_1}, ... ,x_{i_k}\\right)\\right\\|^2.\n   :label: ceresproblemnonrobust\n\n.. _section-hello-world:\n\nHello World!\n============\n\nTo get started, consider the problem of finding the minimum of the\nfunction\n\n.. math:: \\frac{1}{2}(10 -x)^2.\n\nThis is a trivial problem, whose minimum is located at :math:`x = 10`,\nbut it is a good place to start to illustrate the basics of solving a\nproblem with Ceres [#f1]_.\n\nThe first step is to write a functor that will evaluate this the\nfunction :math:`f(x) = 10 - x`:\n\n.. code-block:: c++\n\n   struct CostFunctor {\n      template <typename T>\n      bool operator()(const T* const x, T* residual) const {\n        residual[0] = 10.0 - x[0];\n        return true;\n      }\n   };\n\nThe important thing to note here is that ``operator()`` is a templated\nmethod, which assumes that all its inputs and outputs are of some type\n``T``. The use of templating here allows Ceres to call\n``CostFunctor::operator<T>()``, with ``T=double`` when just the value\nof the residual is needed, and with a special type ``T=Jet`` when the\nJacobians are needed. In :ref:`section-derivatives` we will discuss the\nvarious ways of supplying derivatives to Ceres in more detail.\n\nOnce we have a way of computing the residual function, it is now time\nto construct a non-linear least squares problem using it and have\nCeres solve it.\n\n.. code-block:: c++\n\n   int main(int argc, char** argv) {\n     google::InitGoogleLogging(argv[0]);\n\n     // The variable to solve for with its initial value.\n     double initial_x = 5.0;\n     double x = initial_x;\n\n     // Build the problem.\n     Problem problem;\n\n     // Set up the only cost function (also known as residual). This uses\n     // auto-differentiation to obtain the derivative (jacobian).\n     CostFunction* cost_function =\n         new AutoDiffCostFunction<CostFunctor, 1, 1>(new CostFunctor);\n     problem.AddResidualBlock(cost_function, NULL, &x);\n\n     // Run the solver!\n     Solver::Options options;\n     options.linear_solver_type = ceres::DENSE_QR;\n     options.minimizer_progress_to_stdout = true;\n     Solver::Summary summary;\n     Solve(options, &problem, &summary);\n\n     std::cout << summary.BriefReport() << \"\\n\";\n     std::cout << \"x : \" << initial_x\n               << \" -> \" << x << \"\\n\";\n     return 0;\n   }\n\n:class:`AutoDiffCostFunction` takes a ``CostFunctor`` as input,\nautomatically differentiates it and gives it a :class:`CostFunction`\ninterface.\n\nCompiling and running `examples/helloworld.cc\n<https://ceres-solver.googlesource.com/ceres-solver/+/master/examples/helloworld.cc>`_\ngives us\n\n.. code-block:: bash\n\n   iter      cost      cost_change  |gradient|   |step|    tr_ratio  tr_radius  ls_iter  iter_time  total_time\n      0  4.512500e+01    0.00e+00    9.50e+00   0.00e+00   0.00e+00  1.00e+04       0    5.33e-04    3.46e-03\n      1  4.511598e-07    4.51e+01    9.50e-04   9.50e+00   1.00e+00  3.00e+04       1    5.00e-04    4.05e-03\n      2  5.012552e-16    4.51e-07    3.17e-08   9.50e-04   1.00e+00  9.00e+04       1    1.60e-05    4.09e-03\n   Ceres Solver Report: Iterations: 2, Initial cost: 4.512500e+01, Final cost: 5.012552e-16, Termination: CONVERGENCE\n   x : 0.5 -> 10\n\nStarting from a :math:`x=5`, the solver in two iterations goes to 10\n[#f2]_. The careful reader will note that this is a linear problem and\none linear solve should be enough to get the optimal value.  The\ndefault configuration of the solver is aimed at non-linear problems,\nand for reasons of simplicity we did not change it in this example. It\nis indeed possible to obtain the solution to this problem using Ceres\nin one iteration. Also note that the solver did get very close to the\noptimal function value of 0 in the very first iteration. We will\ndiscuss these issues in greater detail when we talk about convergence\nand parameter settings for Ceres.\n\n.. rubric:: Footnotes\n\n.. [#f1] `examples/helloworld.cc\n   <https://ceres-solver.googlesource.com/ceres-solver/+/master/examples/helloworld.cc>`_\n.. [#f2] Actually the solver ran for three iterations, and it was\n   by looking at the value returned by the linear solver in the third\n   iteration, it observed that the update to the parameter block was too\n   small and declared convergence. Ceres only prints out the display at\n   the end of an iteration, and terminates as soon as it detects\n   convergence, which is why you only see two iterations here and not\n   three.\n\n.. _section-derivatives:\n\n\nDerivatives\n===========\n\nCeres Solver like most optimization packages, depends on being able to\nevaluate the value and the derivatives of each term in the objective\nfunction at arbitrary parameter values. Doing so correctly and\nefficiently is essential to getting good results.  Ceres Solver\nprovides a number of ways of doing so. You have already seen one of\nthem in action --\nAutomatic Differentiation in `examples/helloworld.cc\n<https://ceres-solver.googlesource.com/ceres-solver/+/master/examples/helloworld.cc>`_\n\nWe now consider the other two possibilities. Analytic and numeric\nderivatives.\n\n\nNumeric Derivatives\n-------------------\n\nIn some cases, its not possible to define a templated cost functor,\nfor example when the evaluation of the residual involves a call to a\nlibrary function that you do not have control over.  In such a\nsituation, numerical differentiation can be used. The user defines a\nfunctor which computes the residual value and construct a\n:class:`NumericDiffCostFunction` using it. e.g., for :math:`f(x) = 10 - x`\nthe corresponding functor would be\n\n.. code-block:: c++\n\n  struct NumericDiffCostFunctor {\n    bool operator()(const double* const x, double* residual) const {\n      residual[0] = 10.0 - x[0];\n      return true;\n    }\n  };\n\nWhich is added to the :class:`Problem` as:\n\n.. code-block:: c++\n\n  CostFunction* cost_function =\n    new NumericDiffCostFunction<NumericDiffCostFunctor, ceres::CENTRAL, 1, 1>(\n        new NumericDiffCostFunctor);\n  problem.AddResidualBlock(cost_function, NULL, &x);\n\nNotice the parallel from when we were using automatic differentiation\n\n.. code-block:: c++\n\n  CostFunction* cost_function =\n      new AutoDiffCostFunction<CostFunctor, 1, 1>(new CostFunctor);\n  problem.AddResidualBlock(cost_function, NULL, &x);\n\nThe construction looks almost identical to the one used for automatic\ndifferentiation, except for an extra template parameter that indicates\nthe kind of finite differencing scheme to be used for computing the\nnumerical derivatives [#f3]_. For more details see the documentation\nfor :class:`NumericDiffCostFunction`.\n\n**Generally speaking we recommend automatic differentiation instead of\nnumeric differentiation. The use of C++ templates makes automatic\ndifferentiation efficient, whereas numeric differentiation is\nexpensive, prone to numeric errors, and leads to slower convergence.**\n\n\nAnalytic Derivatives\n--------------------\n\nIn some cases, using automatic differentiation is not possible. For\nexample, it may be the case that it is more efficient to compute the\nderivatives in closed form instead of relying on the chain rule used\nby the automatic differentiation code.\n\nIn such cases, it is possible to supply your own residual and jacobian\ncomputation code. To do this, define a subclass of\n:class:`CostFunction` or :class:`SizedCostFunction` if you know the\nsizes of the parameters and residuals at compile time. Here for\nexample is ``SimpleCostFunction`` that implements :math:`f(x) = 10 -\nx`.\n\n.. code-block:: c++\n\n  class QuadraticCostFunction : public ceres::SizedCostFunction<1, 1> {\n   public:\n    virtual ~QuadraticCostFunction() {}\n    virtual bool Evaluate(double const* const* parameters,\n                          double* residuals,\n                          double** jacobians) const {\n      const double x = parameters[0][0];\n      residuals[0] = 10 - x;\n\n      // Compute the Jacobian if asked for.\n      if (jacobians != NULL && jacobians[0] != NULL) {\n        jacobians[0][0] = -1;\n      }\n      return true;\n    }\n  };\n\n\n``SimpleCostFunction::Evaluate`` is provided with an input array of\n``parameters``, an output array ``residuals`` for residuals and an\noutput array ``jacobians`` for Jacobians. The ``jacobians`` array is\noptional, ``Evaluate`` is expected to check when it is non-null, and\nif it is the case then fill it with the values of the derivative of\nthe residual function. In this case since the residual function is\nlinear, the Jacobian is constant [#f4]_ .\n\nAs can be seen from the above code fragments, implementing\n:class:`CostFunction` objects is a bit tedious. We recommend that\nunless you have a good reason to manage the jacobian computation\nyourself, you use :class:`AutoDiffCostFunction` or\n:class:`NumericDiffCostFunction` to construct your residual blocks.\n\nMore About Derivatives\n----------------------\n\nComputing derivatives is by far the most complicated part of using\nCeres, and depending on the circumstance the user may need more\nsophisticated ways of computing derivatives. This section just\nscratches the surface of how derivatives can be supplied to\nCeres. Once you are comfortable with using\n:class:`NumericDiffCostFunction` and :class:`AutoDiffCostFunction` we\nrecommend taking a look at :class:`DynamicAutoDiffCostFunction`,\n:class:`CostFunctionToFunctor`, :class:`NumericDiffFunctor` and\n:class:`ConditionedCostFunction` for more advanced ways of\nconstructing and computing cost functions.\n\n.. rubric:: Footnotes\n\n.. [#f3] `examples/helloworld_numeric_diff.cc\n   <https://ceres-solver.googlesource.com/ceres-solver/+/master/examples/helloworld_numeric_diff.cc>`_.\n.. [#f4] `examples/helloworld_analytic_diff.cc\n   <https://ceres-solver.googlesource.com/ceres-solver/+/master/examples/helloworld_analytic_diff.cc>`_.\n\n\n.. _section-powell:\n\nPowell's Function\n=================\n\nConsider now a slightly more complicated example -- the minimization\nof Powell's function. Let :math:`x = \\left[x_1, x_2, x_3, x_4 \\right]`\nand\n\n.. math::\n\n  \\begin{align}\n     f_1(x) &= x_1 + 10x_2 \\\\\n     f_2(x) &= \\sqrt{5}  (x_3 - x_4)\\\\\n     f_3(x) &= (x_2 - 2x_3)^2\\\\\n     f_4(x) &= \\sqrt{10}  (x_1 - x_4)^2\\\\\n       F(x) &= \\left[f_1(x),\\ f_2(x),\\ f_3(x),\\ f_4(x) \\right]\n  \\end{align}\n\n\n:math:`F(x)` is a function of four parameters, has four residuals\nand we wish to find :math:`x` such that :math:`\\frac{1}{2}\\|F(x)\\|^2`\nis minimized.\n\nAgain, the first step is to define functors that evaluate of the terms\nin the objective functor. Here is the code for evaluating\n:math:`f_4(x_1, x_4)`:\n\n.. code-block:: c++\n\n struct F4 {\n   template <typename T>\n   bool operator()(const T* const x1, const T* const x4, T* residual) const {\n     residual[0] = sqrt(10.0) * (x1[0] - x4[0]) * (x1[0] - x4[0]);\n     return true;\n   }\n };\n\n\nSimilarly, we can define classes ``F1``, ``F2`` and ``F3`` to evaluate\n:math:`f_1(x_1, x_2)`, :math:`f_2(x_3, x_4)` and :math:`f_3(x_2, x_3)`\nrespectively. Using these, the problem can be constructed as follows:\n\n\n.. code-block:: c++\n\n  double x1 =  3.0; double x2 = -1.0; double x3 =  0.0; double x4 = 1.0;\n\n  Problem problem;\n\n  // Add residual terms to the problem using the using the autodiff\n  // wrapper to get the derivatives automatically.\n  problem.AddResidualBlock(\n    new AutoDiffCostFunction<F1, 1, 1, 1>(new F1), NULL, &x1, &x2);\n  problem.AddResidualBlock(\n    new AutoDiffCostFunction<F2, 1, 1, 1>(new F2), NULL, &x3, &x4);\n  problem.AddResidualBlock(\n    new AutoDiffCostFunction<F3, 1, 1, 1>(new F3), NULL, &x2, &x3)\n  problem.AddResidualBlock(\n    new AutoDiffCostFunction<F4, 1, 1, 1>(new F4), NULL, &x1, &x4);\n\n\nNote that each ``ResidualBlock`` only depends on the two parameters\nthat the corresponding residual object depends on and not on all four\nparameters. Compiling and running `examples/powell.cc\n<https://ceres-solver.googlesource.com/ceres-solver/+/master/examples/powell.cc>`_\ngives us:\n\n.. code-block:: bash\n\n    Initial x1 = 3, x2 = -1, x3 = 0, x4 = 1\n    iter      cost      cost_change  |gradient|   |step|    tr_ratio  tr_radius  ls_iter  iter_time  total_time\n       0  1.075000e+02    0.00e+00    1.55e+02   0.00e+00   0.00e+00  1.00e+04       0    4.95e-04    2.30e-03\n       1  5.036190e+00    1.02e+02    2.00e+01   2.16e+00   9.53e-01  3.00e+04       1    4.39e-05    2.40e-03\n       2  3.148168e-01    4.72e+00    2.50e+00   6.23e-01   9.37e-01  9.00e+04       1    9.06e-06    2.43e-03\n       3  1.967760e-02    2.95e-01    3.13e-01   3.08e-01   9.37e-01  2.70e+05       1    8.11e-06    2.45e-03\n       4  1.229900e-03    1.84e-02    3.91e-02   1.54e-01   9.37e-01  8.10e+05       1    6.91e-06    2.48e-03\n       5  7.687123e-05    1.15e-03    4.89e-03   7.69e-02   9.37e-01  2.43e+06       1    7.87e-06    2.50e-03\n       6  4.804625e-06    7.21e-05    6.11e-04   3.85e-02   9.37e-01  7.29e+06       1    5.96e-06    2.52e-03\n       7  3.003028e-07    4.50e-06    7.64e-05   1.92e-02   9.37e-01  2.19e+07       1    5.96e-06    2.55e-03\n       8  1.877006e-08    2.82e-07    9.54e-06   9.62e-03   9.37e-01  6.56e+07       1    5.96e-06    2.57e-03\n       9  1.173223e-09    1.76e-08    1.19e-06   4.81e-03   9.37e-01  1.97e+08       1    7.87e-06    2.60e-03\n      10  7.333425e-11    1.10e-09    1.49e-07   2.40e-03   9.37e-01  5.90e+08       1    6.20e-06    2.63e-03\n      11  4.584044e-12    6.88e-11    1.86e-08   1.20e-03   9.37e-01  1.77e+09       1    6.91e-06    2.65e-03\n      12  2.865573e-13    4.30e-12    2.33e-09   6.02e-04   9.37e-01  5.31e+09       1    5.96e-06    2.67e-03\n      13  1.791438e-14    2.69e-13    2.91e-10   3.01e-04   9.37e-01  1.59e+10       1    7.15e-06    2.69e-03\n\n    Ceres Solver v1.12.0 Solve Report\n    ----------------------------------\n                                         Original                  Reduced\n    Parameter blocks                            4                        4\n    Parameters                                  4                        4\n    Residual blocks                             4                        4\n    Residual                                    4                        4\n\n    Minimizer                        TRUST_REGION\n\n    Dense linear algebra library            EIGEN\n    Trust region strategy     LEVENBERG_MARQUARDT\n\n                                            Given                     Used\n    Linear solver                        DENSE_QR                 DENSE_QR\n    Threads                                     1                        1\n    Linear solver threads                       1                        1\n\n    Cost:\n    Initial                          1.075000e+02\n    Final                            1.791438e-14\n    Change                           1.075000e+02\n\n    Minimizer iterations                       14\n    Successful steps                           14\n    Unsuccessful steps                          0\n\n    Time (in seconds):\n    Preprocessor                            0.002\n\n      Residual evaluation                   0.000\n      Jacobian evaluation                   0.000\n      Linear solver                         0.000\n    Minimizer                               0.001\n\n    Postprocessor                           0.000\n    Total                                   0.005\n\n    Termination:                      CONVERGENCE (Gradient tolerance reached. Gradient max norm: 3.642190e-11 <= 1.000000e-10)\n\n    Final x1 = 0.000292189, x2 = -2.92189e-05, x3 = 4.79511e-05, x4 = 4.79511e-05\n\nIt is easy to see that the optimal solution to this problem is at\n:math:`x_1=0, x_2=0, x_3=0, x_4=0` with an objective function value of\n:math:`0`. In 10 iterations, Ceres finds a solution with an objective\nfunction value of :math:`4\\times 10^{-12}`.\n\n.. rubric:: Footnotes\n\n.. [#f5] `examples/powell.cc\n   <https://ceres-solver.googlesource.com/ceres-solver/+/master/examples/powell.cc>`_.\n\n\n.. _section-fitting:\n\nCurve Fitting\n=============\n\nThe examples we have seen until now are simple optimization problems\nwith no data. The original purpose of least squares and non-linear\nleast squares analysis was fitting curves to data. It is only\nappropriate that we now consider an example of such a problem\n[#f6]_. It contains data generated by sampling the curve :math:`y =\ne^{0.3x + 0.1}` and adding Gaussian noise with standard deviation\n:math:`\\sigma = 0.2`. Let us fit some data to the curve\n\n.. math::  y = e^{mx + c}.\n\nWe begin by defining a templated object to evaluate the\nresidual. There will be a residual for each observation.\n\n.. code-block:: c++\n\n struct ExponentialResidual {\n   ExponentialResidual(double x, double y)\n       : x_(x), y_(y) {}\n\n   template <typename T>\n   bool operator()(const T* const m, const T* const c, T* residual) const {\n     residual[0] = y_ - exp(m[0] * x_ + c[0]);\n     return true;\n   }\n\n  private:\n   // Observations for a sample.\n   const double x_;\n   const double y_;\n };\n\nAssuming the observations are in a :math:`2n` sized array called\n``data`` the problem construction is a simple matter of creating a\n:class:`CostFunction` for every observation.\n\n\n.. code-block:: c++\n\n double m = 0.0;\n double c = 0.0;\n\n Problem problem;\n for (int i = 0; i < kNumObservations; ++i) {\n   CostFunction* cost_function =\n        new AutoDiffCostFunction<ExponentialResidual, 1, 1, 1>(\n            new ExponentialResidual(data[2 * i], data[2 * i + 1]));\n   problem.AddResidualBlock(cost_function, NULL, &m, &c);\n }\n\nCompiling and running `examples/curve_fitting.cc\n<https://ceres-solver.googlesource.com/ceres-solver/+/master/examples/curve_fitting.cc>`_\ngives us:\n\n.. code-block:: bash\n\n    iter      cost      cost_change  |gradient|   |step|    tr_ratio  tr_radius  ls_iter  iter_time  total_time\n       0  1.211734e+02    0.00e+00    3.61e+02   0.00e+00   0.00e+00  1.00e+04       0    5.34e-04    2.56e-03\n       1  1.211734e+02   -2.21e+03    0.00e+00   7.52e-01  -1.87e+01  5.00e+03       1    4.29e-05    3.25e-03\n       2  1.211734e+02   -2.21e+03    0.00e+00   7.51e-01  -1.86e+01  1.25e+03       1    1.10e-05    3.28e-03\n       3  1.211734e+02   -2.19e+03    0.00e+00   7.48e-01  -1.85e+01  1.56e+02       1    1.41e-05    3.31e-03\n       4  1.211734e+02   -2.02e+03    0.00e+00   7.22e-01  -1.70e+01  9.77e+00       1    1.00e-05    3.34e-03\n       5  1.211734e+02   -7.34e+02    0.00e+00   5.78e-01  -6.32e+00  3.05e-01       1    1.00e-05    3.36e-03\n       6  3.306595e+01    8.81e+01    4.10e+02   3.18e-01   1.37e+00  9.16e-01       1    2.79e-05    3.41e-03\n       7  6.426770e+00    2.66e+01    1.81e+02   1.29e-01   1.10e+00  2.75e+00       1    2.10e-05    3.45e-03\n       8  3.344546e+00    3.08e+00    5.51e+01   3.05e-02   1.03e+00  8.24e+00       1    2.10e-05    3.48e-03\n       9  1.987485e+00    1.36e+00    2.33e+01   8.87e-02   9.94e-01  2.47e+01       1    2.10e-05    3.52e-03\n      10  1.211585e+00    7.76e-01    8.22e+00   1.05e-01   9.89e-01  7.42e+01       1    2.10e-05    3.56e-03\n      11  1.063265e+00    1.48e-01    1.44e+00   6.06e-02   9.97e-01  2.22e+02       1    2.60e-05    3.61e-03\n      12  1.056795e+00    6.47e-03    1.18e-01   1.47e-02   1.00e+00  6.67e+02       1    2.10e-05    3.64e-03\n      13  1.056751e+00    4.39e-05    3.79e-03   1.28e-03   1.00e+00  2.00e+03       1    2.10e-05    3.68e-03\n    Ceres Solver Report: Iterations: 13, Initial cost: 1.211734e+02, Final cost: 1.056751e+00, Termination: CONVERGENCE\n    Initial m: 0 c: 0\n    Final   m: 0.291861 c: 0.131439\n\nStarting from parameter values :math:`m = 0, c=0` with an initial\nobjective function value of :math:`121.173` Ceres finds a solution\n:math:`m= 0.291861, c = 0.131439` with an objective function value of\n:math:`1.05675`. These values are a bit different than the\nparameters of the original model :math:`m=0.3, c= 0.1`, but this is\nexpected. When reconstructing a curve from noisy data, we expect to\nsee such deviations. Indeed, if you were to evaluate the objective\nfunction for :math:`m=0.3, c=0.1`, the fit is worse with an objective\nfunction value of :math:`1.082425`.  The figure below illustrates the fit.\n\n.. figure:: least_squares_fit.png\n   :figwidth: 500px\n   :height: 400px\n   :align: center\n\n   Least squares curve fitting.\n\n\n.. rubric:: Footnotes\n\n.. [#f6] `examples/curve_fitting.cc\n   <https://ceres-solver.googlesource.com/ceres-solver/+/master/examples/curve_fitting.cc>`_\n\n\nRobust Curve Fitting\n=====================\n\nNow suppose the data we are given has some outliers, i.e., we have\nsome points that do not obey the noise model. If we were to use the\ncode above to fit such data, we would get a fit that looks as\nbelow. Notice how the fitted curve deviates from the ground truth.\n\n.. figure:: non_robust_least_squares_fit.png\n   :figwidth: 500px\n   :height: 400px\n   :align: center\n\nTo deal with outliers, a standard technique is to use a\n:class:`LossFunction`. Loss functions reduce the influence of\nresidual blocks with high residuals, usually the ones corresponding to\noutliers. To associate a loss function with a residual block, we change\n\n.. code-block:: c++\n\n   problem.AddResidualBlock(cost_function, NULL , &m, &c);\n\nto\n\n.. code-block:: c++\n\n   problem.AddResidualBlock(cost_function, new CauchyLoss(0.5) , &m, &c);\n\n:class:`CauchyLoss` is one of the loss functions that ships with Ceres\nSolver. The argument :math:`0.5` specifies the scale of the loss\nfunction. As a result, we get the fit below [#f7]_. Notice how the\nfitted curve moves back closer to the ground truth curve.\n\n.. figure:: robust_least_squares_fit.png\n   :figwidth: 500px\n   :height: 400px\n   :align: center\n\n   Using :class:`LossFunction` to reduce the effect of outliers on a\n   least squares fit.\n\n\n.. rubric:: Footnotes\n\n.. [#f7] `examples/robust_curve_fitting.cc\n   <https://ceres-solver.googlesource.com/ceres-solver/+/master/examples/robust_curve_fitting.cc>`_\n\n\nBundle Adjustment\n=================\n\nOne of the main reasons for writing Ceres was our need to solve large\nscale bundle adjustment problems [HartleyZisserman]_, [Triggs]_.\n\nGiven a set of measured image feature locations and correspondences,\nthe goal of bundle adjustment is to find 3D point positions and camera\nparameters that minimize the reprojection error. This optimization\nproblem is usually formulated as a non-linear least squares problem,\nwhere the error is the squared :math:`L_2` norm of the difference between\nthe observed feature location and the projection of the corresponding\n3D point on the image plane of the camera. Ceres has extensive support\nfor solving bundle adjustment problems.\n\nLet us solve a problem from the `BAL\n<http://grail.cs.washington.edu/projects/bal/>`_ dataset [#f8]_.\n\nThe first step as usual is to define a templated functor that computes\nthe reprojection error/residual. The structure of the functor is\nsimilar to the ``ExponentialResidual``, in that there is an\ninstance of this object responsible for each image observation.\n\nEach residual in a BAL problem depends on a three dimensional point\nand a nine parameter camera. The nine parameters defining the camera\nare: three for rotation as a Rodrigues' axis-angle vector, three\nfor translation, one for focal length and two for radial distortion.\nThe details of this camera model can be found the `Bundler homepage\n<http://phototour.cs.washington.edu/bundler/>`_ and the `BAL homepage\n<http://grail.cs.washington.edu/projects/bal/>`_.\n\n.. code-block:: c++\n\n struct SnavelyReprojectionError {\n   SnavelyReprojectionError(double observed_x, double observed_y)\n       : observed_x(observed_x), observed_y(observed_y) {}\n\n   template <typename T>\n   bool operator()(const T* const camera,\n                   const T* const point,\n                   T* residuals) const {\n     // camera[0,1,2] are the angle-axis rotation.\n     T p[3];\n     ceres::AngleAxisRotatePoint(camera, point, p);\n     // camera[3,4,5] are the translation.\n     p[0] += camera[3]; p[1] += camera[4]; p[2] += camera[5];\n\n     // Compute the center of distortion. The sign change comes from\n     // the camera model that Noah Snavely's Bundler assumes, whereby\n     // the camera coordinate system has a negative z axis.\n     T xp = - p[0] / p[2];\n     T yp = - p[1] / p[2];\n\n     // Apply second and fourth order radial distortion.\n     const T& l1 = camera[7];\n     const T& l2 = camera[8];\n     T r2 = xp*xp + yp*yp;\n     T distortion = 1.0 + r2  * (l1 + l2  * r2);\n\n     // Compute final projected point position.\n     const T& focal = camera[6];\n     T predicted_x = focal * distortion * xp;\n     T predicted_y = focal * distortion * yp;\n\n     // The error is the difference between the predicted and observed position.\n     residuals[0] = predicted_x - T(observed_x);\n     residuals[1] = predicted_y - T(observed_y);\n     return true;\n   }\n\n    // Factory to hide the construction of the CostFunction object from\n    // the client code.\n    static ceres::CostFunction* Create(const double observed_x,\n                                       const double observed_y) {\n      return (new ceres::AutoDiffCostFunction<SnavelyReprojectionError, 2, 9, 3>(\n                  new SnavelyReprojectionError(observed_x, observed_y)));\n    }\n\n   double observed_x;\n   double observed_y;\n };\n\n\nNote that unlike the examples before, this is a non-trivial function\nand computing its analytic Jacobian is a bit of a pain. Automatic\ndifferentiation makes life much simpler. The function\n:func:`AngleAxisRotatePoint` and other functions for manipulating\nrotations can be found in ``include/ceres/rotation.h``.\n\nGiven this functor, the bundle adjustment problem can be constructed\nas follows:\n\n.. code-block:: c++\n\n ceres::Problem problem;\n for (int i = 0; i < bal_problem.num_observations(); ++i) {\n   ceres::CostFunction* cost_function =\n       SnavelyReprojectionError::Create(\n            bal_problem.observations()[2 * i + 0],\n            bal_problem.observations()[2 * i + 1]);\n   problem.AddResidualBlock(cost_function,\n                            NULL /* squared loss */,\n                            bal_problem.mutable_camera_for_observation(i),\n                            bal_problem.mutable_point_for_observation(i));\n }\n\n\nNotice that the problem construction for bundle adjustment is very\nsimilar to the curve fitting example -- one term is added to the\nobjective function per observation.\n\nSince this is a large sparse problem (well large for ``DENSE_QR``\nanyways), one way to solve this problem is to set\n:member:`Solver::Options::linear_solver_type` to\n``SPARSE_NORMAL_CHOLESKY`` and call :func:`Solve`. And while this is\na reasonable thing to do, bundle adjustment problems have a special\nsparsity structure that can be exploited to solve them much more\nefficiently. Ceres provides three specialized solvers (collectively\nknown as Schur-based solvers) for this task. The example code uses the\nsimplest of them ``DENSE_SCHUR``.\n\n.. code-block:: c++\n\n ceres::Solver::Options options;\n options.linear_solver_type = ceres::DENSE_SCHUR;\n options.minimizer_progress_to_stdout = true;\n ceres::Solver::Summary summary;\n ceres::Solve(options, &problem, &summary);\n std::cout << summary.FullReport() << \"\\n\";\n\nFor a more sophisticated bundle adjustment example which demonstrates\nthe use of Ceres' more advanced features including its various linear\nsolvers, robust loss functions and local parameterizations see\n`examples/bundle_adjuster.cc\n<https://ceres-solver.googlesource.com/ceres-solver/+/master/examples/bundle_adjuster.cc>`_\n\n\n.. rubric:: Footnotes\n\n.. [#f8] `examples/simple_bundle_adjuster.cc\n   <https://ceres-solver.googlesource.com/ceres-solver/+/master/examples/simple_bundle_adjuster.cc>`_\n\nOther Examples\n==============\n\nBesides the examples in this chapter, the  `example\n<https://ceres-solver.googlesource.com/ceres-solver/+/master/examples/>`_\ndirectory contains a number of other examples:\n\n#. `bundle_adjuster.cc\n   <https://ceres-solver.googlesource.com/ceres-solver/+/master/examples/bundle_adjuster.cc>`_\n   shows how to use the various features of Ceres to solve bundle\n   adjustment problems.\n\n#. `circle_fit.cc\n   <https://ceres-solver.googlesource.com/ceres-solver/+/master/examples/circle_fit.cc>`_\n   shows how to fit data to a circle.\n\n#. `ellipse_approximation.cc\n   <https://ceres-solver.googlesource.com/ceres-solver/+/master/examples/ellipse_approximation.cc>`_\n   fits points randomly distributed on an ellipse with an approximate\n   line segment contour. This is done by jointly optimizing the\n   control points of the line segment contour along with the preimage\n   positions for the data points. The purpose of this example is to\n   show an example use case for ``Solver::Options::dynamic_sparsity``,\n   and how it can benefit problems which are numerically dense but\n   dynamically sparse.\n\n#. `denoising.cc\n   <https://ceres-solver.googlesource.com/ceres-solver/+/master/examples/denoising.cc>`_\n   implements image denoising using the `Fields of Experts\n   <http://www.gris.informatik.tu-darmstadt.de/~sroth/research/foe/index.html>`_\n   model.\n\n#. `nist.cc\n   <https://ceres-solver.googlesource.com/ceres-solver/+/master/examples/nist.cc>`_\n   implements and attempts to solves the `NIST\n   <http://www.itl.nist.gov/div898/strd/nls/nls_main.shtml>`_\n   non-linear regression problems.\n\n#. `more_garbow_hillstrom.cc\n   <https://ceres-solver.googlesource.com/ceres-solver/+/master/examples/more_garbow_hillstrom.cc>`_\n   A subset of the test problems from the paper\n\n   Testing Unconstrained Optimization Software\n   Jorge J. More, Burton S. Garbow and Kenneth E. Hillstrom\n   ACM Transactions on Mathematical Software, 7(1), pp. 17-41, 1981\n\n   which were augmented with bounds and used for testing bounds\n   constrained optimization algorithms by\n\n   A Trust Region Approach to Linearly Constrained Optimization\n   David M. Gay\n   Numerical Analysis (Griffiths, D.F., ed.), pp. 72-105\n   Lecture Notes in Mathematics 1066, Springer Verlag, 1984.\n\n\n#. `libmv_bundle_adjuster.cc\n   <https://ceres-solver.googlesource.com/ceres-solver/+/master/examples/libmv_bundle_adjuster.cc>`_\n   is the bundle adjustment algorithm used by `Blender <www.blender.org>`_/libmv.\n\n#. `libmv_homography.cc\n   <https://ceres-solver.googlesource.com/ceres-solver/+/master/examples/libmv_homography.cc>`_\n   This file demonstrates solving for a homography between two sets of\n   points and using a custom exit criterion by having a callback check\n   for image-space error.\n\n#. `robot_pose_mle.cc\n   <https://ceres-solver.googlesource.com/ceres-solver/+/master/examples/robot_pose_mle.cc>`_\n   This example demonstrates how to use the ``DynamicAutoDiffCostFunction``\n   variant of CostFunction. The ``DynamicAutoDiffCostFunction`` is meant to\n   be used in cases where the number of parameter blocks or the sizes are not\n   known at compile time.\n\n   This example simulates a robot traversing down a 1-dimension hallway with\n   noise odometry readings and noisy range readings of the end of the hallway.\n   By fusing the noisy odometry and sensor readings this example demonstrates\n   how to compute the maximum likelihood estimate (MLE) of the robot's pose at\n   each timestep.\n\n#. `slam/pose_graph_2d/pose_graph_2d.cc\n   <https://ceres-solver.googlesource.com/ceres-solver/+/master/examples/slam/pose_graph_2d/pose_graph_2d.cc>`_\n   The Simultaneous Localization and Mapping (SLAM) problem consists of building\n   a map of an unknown environment while simultaneously localizing against this\n   map. The main difficulty of this problem stems from not having any additional\n   external aiding information such as GPS. SLAM has been considered one of the\n   fundamental challenges of robotics. There are many resources on SLAM\n   [#f9]_. A pose graph optimization problem is one example of a SLAM\n   problem. The following explains how to formulate the pose graph based SLAM\n   problem in 2-Dimensions with relative pose constraints.\n\n   Consider a robot moving in a 2-Dimensional plane. The robot has access to a\n   set of sensors such as wheel odometry or a laser range scanner. From these\n   raw measurements, we want to estimate the trajectory of the robot as well as\n   build a map of the environment. In order to reduce the computational\n   complexity of the problem, the pose graph approach abstracts the raw\n   measurements away.  Specifically, it creates a graph of nodes which represent\n   the pose of the robot, and edges which represent the relative transformation\n   (delta position and orientation) between the two nodes. The edges are virtual\n   measurements derived from the raw sensor measurements, e.g. by integrating\n   the raw wheel odometry or aligning the laser range scans acquired from the\n   robot. A visualization of the resulting graph is shown below.\n\n   .. figure:: slam2d.png\n      :figwidth: 500px\n      :height: 400px\n      :align: center\n\n      Visual representation of a graph SLAM problem.\n\n   The figure depicts the pose of the robot as the triangles, the measurements\n   are indicated by the connecting lines, and the loop closure measurements are\n   shown as dotted lines. Loop closures are measurements between non-sequential\n   robot states and they reduce the accumulation of error over time. The\n   following will describe the mathematical formulation of the pose graph\n   problem.\n\n   The robot at timestamp :math:`t` has state :math:`x_t = [p^T, \\psi]^T` where\n   :math:`p` is a 2D vector that represents the position in the plane and\n   :math:`\\psi` is the orientation in radians. The measurement of the relative\n   transform between the robot state at two timestamps :math:`a` and :math:`b`\n   is given as: :math:`z_{ab} = [\\hat{p}_{ab}^T, \\hat{\\psi}_{ab}]`. The residual\n   implemented in the Ceres cost function which computes the error between the\n   measurement and the predicted measurement is:\n\n   .. math:: r_{ab} =\n\t     \\left[\n\t     \\begin{array}{c}\n\t       R_a^T\\left(p_b - p_a\\right) - \\hat{p}_{ab} \\\\\n\t       \\mathrm{Normalize}\\left(\\psi_b - \\psi_a - \\hat{\\psi}_{ab}\\right)\n\t     \\end{array}\n\t     \\right]\n\n   where the function :math:`\\mathrm{Normalize}()` normalizes the angle in the range\n   :math:`[-\\pi,\\pi)`, and :math:`R` is the rotation matrix given by\n\n   .. math:: R_a =\n\t     \\left[\n\t     \\begin{array}{cc}\n\t       \\cos \\psi_a & -\\sin \\psi_a \\\\\n\t       \\sin \\psi_a & \\cos \\psi_a \\\\\n\t     \\end{array}\n\t     \\right]\n\n   To finish the cost function, we need to weight the residual by the\n   uncertainty of the measurement. Hence, we pre-multiply the residual by the\n   inverse square root of the covariance matrix for the measurement,\n   i.e. :math:`\\Sigma_{ab}^{-\\frac{1}{2}} r_{ab}` where :math:`\\Sigma_{ab}` is\n   the covariance.\n\n   Lastly, we use a local parameterization to normalize the orientation in the\n   range which is normalized between :math:`[-\\pi,\\pi)`.  Specially, we define\n   the :member:`AngleLocalParameterization::operator()` function to be:\n   :math:`\\mathrm{Normalize}(\\psi + \\delta \\psi)`.\n\n   This package includes an executable :member:`pose_graph_2d` that will read a\n   problem definition file. This executable can work with any 2D problem\n   definition that uses the g2o format. It would be relatively straightforward\n   to implement a new reader for a different format such as TORO or\n   others. :member:`pose_graph_2d` will print the Ceres solver full summary and\n   then output to disk the original and optimized poses (``poses_original.txt``\n   and ``poses_optimized.txt``, respectively) of the robot in the following\n   format:\n\n   .. code-block:: bash\n\n      pose_id x y yaw_radians\n      pose_id x y yaw_radians\n      pose_id x y yaw_radians\n\n   where ``pose_id`` is the corresponding integer ID from the file\n   definition. Note, the file will be sorted in ascending order for the\n   ``pose_id``.\n\n   The executable :member:`pose_graph_2d` expects the first argument to be\n   the path to the problem definition. To run the executable,\n\n   .. code-block:: bash\n\n      /path/to/bin/pose_graph_2d /path/to/dataset/dataset.g2o\n\n   A python script is provided to visualize the resulting output files.\n\n   .. code-block:: bash\n\n      /path/to/repo/examples/slam/pose_graph_2d/plot_results.py --optimized_poses ./poses_optimized.txt --initial_poses ./poses_original.txt\n\n   As an example, a standard synthetic benchmark dataset [#f10]_ created by\n   Edwin Olson which has 3500 nodes in a grid world with a total of 5598 edges\n   was solved.  Visualizing the results with the provided script produces:\n\n   .. figure:: manhattan_olson_3500_result.png\n      :figwidth: 600px\n      :height: 600px\n      :align: center\n\n   with the original poses in green and the optimized poses in blue. As shown,\n   the optimized poses more closely match the underlying grid world. Note, the\n   left side of the graph has a small yaw drift due to a lack of relative\n   constraints to provide enough information to reconstruct the trajectory.\n\n   .. rubric:: Footnotes\n\n   .. [#f9] Giorgio Grisetti, Rainer Kummerle, Cyrill Stachniss, Wolfram\n      Burgard. A Tutorial on Graph-Based SLAM. IEEE Intelligent Transportation\n      Systems Magazine, 52(3):199-222, 2010.\n\n   .. [#f10] E. Olson, J. Leonard, and S. Teller, “Fast iterative optimization of\n      pose graphs with poor initial estimates,” in Robotics and Automation\n      (ICRA), IEEE International Conference on, 2006, pp. 2262-2269.\n\n#. `slam/pose_graph_3d/pose_graph_3d.cc\n   <https://ceres-solver.googlesource.com/ceres-solver/+/master/examples/slam/pose_graph_3d/pose_graph_3d.cc>`_\n   The following explains how to formulate the pose graph based SLAM problem in\n   3-Dimensions with relative pose constraints. The example also illustrates how\n   to use Eigen's geometry module with Ceres's automatic differentiation\n   functionality.\n\n   The robot at timestamp :math:`t` has state :math:`x_t = [p^T, q^T]^T` where\n   :math:`p` is a 3D vector that represents the position and :math:`q` is the\n   orientation represented as an Eigen quaternion. The measurement of the\n   relative transform between the robot state at two timestamps :math:`a` and\n   :math:`b` is given as: :math:`z_{ab} = [\\hat{p}_{ab}^T, \\hat{q}_{ab}^T]^T`.\n   The residual implemented in the Ceres cost function which computes the error\n   between the measurement and the predicted measurement is:\n\n   .. math:: r_{ab} =\n             \\left[\n             \\begin{array}{c}\n                R(q_a)^{T} (p_b - p_a) - \\hat{p}_{ab} \\\\\n                2.0 \\mathrm{vec}\\left((q_a^{-1} q_b) \\hat{q}_{ab}^{-1}\\right)\n             \\end{array}\n             \\right]\n\n   where the function :math:`\\mathrm{vec}()` returns the vector part of the\n   quaternion, i.e. :math:`[q_x, q_y, q_z]`, and :math:`R(q)` is the rotation\n   matrix for the quaternion.\n\n   To finish the cost function, we need to weight the residual by the\n   uncertainty of the measurement. Hence, we pre-multiply the residual by the\n   inverse square root of the covariance matrix for the measurement,\n   i.e. :math:`\\Sigma_{ab}^{-\\frac{1}{2}} r_{ab}` where :math:`\\Sigma_{ab}` is\n   the covariance.\n\n   Given that we are using a quaternion to represent the orientation, we need to\n   use a local parameterization (:class:`EigenQuaternionParameterization`) to\n   only apply updates orthogonal to the 4-vector defining the\n   quaternion. Eigen's quaternion uses a different internal memory layout for\n   the elements of the quaternion than what is commonly used. Specifically,\n   Eigen stores the elements in memory as :math:`[x, y, z, w]` where the real\n   part is last whereas it is typically stored first. Note, when creating an\n   Eigen quaternion through the constructor the elements are accepted in\n   :math:`w`, :math:`x`, :math:`y`, :math:`z` order. Since Ceres operates on\n   parameter blocks which are raw double pointers this difference is important\n   and requires a different parameterization.\n\n   This package includes an executable :member:`pose_graph_3d` that will read a\n   problem definition file. This executable can work with any 3D problem\n   definition that uses the g2o format with quaternions used for the orientation\n   representation. It would be relatively straightforward to implement a new\n   reader for a different format such as TORO or others. :member:`pose_graph_3d`\n   will print the Ceres solver full summary and then output to disk the original\n   and optimized poses (``poses_original.txt`` and ``poses_optimized.txt``,\n   respectively) of the robot in the following format:\n\n   .. code-block:: bash\n\n      pose_id x y z q_x q_y q_z q_w\n      pose_id x y z q_x q_y q_z q_w\n      pose_id x y z q_x q_y q_z q_w\n      ...\n\n   where ``pose_id`` is the corresponding integer ID from the file\n   definition. Note, the file will be sorted in ascending order for the\n   ``pose_id``.\n\n   The executable :member:`pose_graph_3d` expects the first argument to be the\n   path to the problem definition. The executable can be run via\n\n   .. code-block:: bash\n\n      /path/to/bin/pose_graph_3d /path/to/dataset/dataset.g2o\n\n   A script is provided to visualize the resulting output files. There is also\n   an option to enable equal axes using ``--axes_equal``\n\n   .. code-block:: bash\n\n      /path/to/repo/examples/slam/pose_graph_3d/plot_results.py --optimized_poses ./poses_optimized.txt --initial_poses ./poses_original.txt\n\n   As an example, a standard synthetic benchmark dataset [#f9]_ where the robot is\n   traveling on the surface of a sphere which has 2500 nodes with a total of\n   4949 edges was solved. Visualizing the results with the provided script\n   produces:\n\n   .. figure:: pose_graph_3d_ex.png\n      :figwidth: 600px\n      :height: 300px\n      :align: center\n"
  },
  {
    "path": "3rdparty/ceres/docs/source/numerical_derivatives.rst",
    "content": ".. default-domain:: cpp\n\n.. cpp:namespace:: ceres\n\n.. _chapter-numerical_derivatives:\n\n===================\nNumeric derivatives\n===================\n\nThe other extreme from using analytic derivatives is to use numeric\nderivatives. The key observation here is that the process of\ndifferentiating a function :math:`f(x)` w.r.t :math:`x` can be written\nas the limiting process:\n\n.. math::\n   Df(x) = \\lim_{h \\rightarrow 0} \\frac{f(x + h) - f(x)}{h}\n\n\nForward Differences\n===================\n\nNow of course one cannot perform the limiting operation numerically on\na computer so we do the next best thing, which is to choose a small\nvalue of :math:`h` and approximate the derivative as\n\n.. math::\n   Df(x) \\approx \\frac{f(x + h) - f(x)}{h}\n\n\nThe above formula is the simplest most basic form of numeric\ndifferentiation. It is known as the *Forward Difference* formula.\n\nSo how would one go about constructing a numerically differentiated\nversion of ``Rat43Analytic`` (`Rat43\n<http://www.itl.nist.gov/div898/strd/nls/data/ratkowsky3.shtml>`_) in\nCeres Solver. This is done in two steps:\n\n  1. Define *Functor* that given the parameter values will evaluate the\n     residual for a given :math:`(x,y)`.\n  2. Construct a :class:`CostFunction` by using\n     :class:`NumericDiffCostFunction` to wrap an instance of\n     ``Rat43CostFunctor``.\n\n.. code-block:: c++\n\n  struct Rat43CostFunctor {\n    Rat43CostFunctor(const double x, const double y) : x_(x), y_(y) {}\n\n    bool operator()(const double* parameters, double* residuals) const {\n      const double b1 = parameters[0];\n      const double b2 = parameters[1];\n      const double b3 = parameters[2];\n      const double b4 = parameters[3];\n      residuals[0] = b1 * pow(1.0 + exp(b2 -  b3 * x_), -1.0 / b4) - y_;\n      return true;\n    }\n\n    const double x_;\n    const double y_;\n  }\n\n  CostFunction* cost_function =\n    new NumericDiffCostFunction<Rat43CostFunctor, FORWARD, 1, 4>(\n      new Rat43CostFunctor(x, y));\n\nThis is about the minimum amount of work one can expect to do to\ndefine the cost function. The only thing that the user needs to do is\nto make sure that the evaluation of the residual is implemented\ncorrectly and efficiently.\n\nBefore going further, it is instructive to get an estimate of the\nerror in the forward difference formula. We do this by considering the\n`Taylor expansion <https://en.wikipedia.org/wiki/Taylor_series>`_ of\n:math:`f` near :math:`x`.\n\n.. math::\n   \\begin{align}\n   f(x+h) &= f(x) + h Df(x) + \\frac{h^2}{2!} D^2f(x) +\n   \\frac{h^3}{3!}D^3f(x) + \\cdots \\\\\n   Df(x) &= \\frac{f(x + h) - f(x)}{h} - \\left [\\frac{h}{2!}D^2f(x) +\n   \\frac{h^2}{3!}D^3f(x) + \\cdots  \\right]\\\\\n   Df(x) &= \\frac{f(x + h) - f(x)}{h} + O(h)\n   \\end{align}\n\ni.e., the error in the forward difference formula is\n:math:`O(h)` [#f4]_.\n\n\nImplementation Details\n----------------------\n\n:class:`NumericDiffCostFunction` implements a generic algorithm to\nnumerically differentiate a given functor. While the actual\nimplementation of :class:`NumericDiffCostFunction` is complicated, the\nnet result is a :class:`CostFunction` that roughly looks something\nlike the following:\n\n.. code-block:: c++\n\n  class Rat43NumericDiffForward : public SizedCostFunction<1,4> {\n     public:\n       Rat43NumericDiffForward(const Rat43Functor* functor) : functor_(functor) {}\n       virtual ~Rat43NumericDiffForward() {}\n       virtual bool Evaluate(double const* const* parameters,\n                             double* residuals,\n\t\t\t     double** jacobians) const {\n \t functor_(parameters[0], residuals);\n\t if (!jacobians) return true;\n\t double* jacobian = jacobians[0];\n\t if (!jacobian) return true;\n\n\t const double f = residuals[0];\n\t double parameters_plus_h[4];\n\t for (int i = 0; i < 4; ++i) {\n\t   std::copy(parameters, parameters + 4, parameters_plus_h);\n\t   const double kRelativeStepSize = 1e-6;\n\t   const double h = std::abs(parameters[i]) * kRelativeStepSize;\n\t   parameters_plus_h[i] += h;\n           double f_plus;\n  \t   functor_(parameters_plus_h, &f_plus);\n\t   jacobian[i] = (f_plus - f) / h;\n         }\n\t return true;\n       }\n\n     private:\n       std::unique_ptr<Rat43Functor> functor_;\n   };\n\n\nNote the choice of step size :math:`h` in the above code, instead of\nan absolute step size which is the same for all parameters, we use a\nrelative step size of :math:`\\text{kRelativeStepSize} = 10^{-6}`. This\ngives better derivative estimates than an absolute step size [#f2]_\n[#f3]_. This choice of step size only works for parameter values that\nare not close to zero. So the actual implementation of\n:class:`NumericDiffCostFunction`, uses a more complex step size\nselection logic, where close to zero, it switches to a fixed step\nsize.\n\n\nCentral Differences\n===================\n\n:math:`O(h)` error in the Forward Difference formula is okay but not\ngreat. A better method is to use the *Central Difference* formula:\n\n.. math::\n   Df(x) \\approx \\frac{f(x + h) - f(x - h)}{2h}\n\nNotice that if the value of :math:`f(x)` is known, the Forward\nDifference formula only requires one extra evaluation, but the Central\nDifference formula requires two evaluations, making it twice as\nexpensive. So is the extra evaluation worth it?\n\nTo answer this question, we again compute the error of approximation\nin the central difference formula:\n\n.. math::\n   \\begin{align}\n  f(x + h) &= f(x) + h Df(x) + \\frac{h^2}{2!}\n  D^2f(x) + \\frac{h^3}{3!} D^3f(x) + \\frac{h^4}{4!} D^4f(x) + \\cdots\\\\\n    f(x - h) &= f(x) - h Df(x) + \\frac{h^2}{2!}\n  D^2f(x) - \\frac{h^3}{3!} D^3f(c_2) + \\frac{h^4}{4!} D^4f(x) +\n  \\cdots\\\\\n  Df(x) & =  \\frac{f(x + h) - f(x - h)}{2h} + \\frac{h^2}{3!}\n  D^3f(x) +  \\frac{h^4}{5!}\n  D^5f(x) + \\cdots \\\\\n  Df(x) & =  \\frac{f(x + h) - f(x - h)}{2h} + O(h^2)\n   \\end{align}\n\nThe error of the Central Difference formula is :math:`O(h^2)`, i.e.,\nthe error goes down quadratically whereas the error in the Forward\nDifference formula only goes down linearly.\n\nUsing central differences instead of forward differences in Ceres\nSolver is a simple matter of changing a template argument to\n:class:`NumericDiffCostFunction` as follows:\n\n.. code-block:: c++\n\n  CostFunction* cost_function =\n    new NumericDiffCostFunction<Rat43CostFunctor, CENTRAL, 1, 4>(\n      new Rat43CostFunctor(x, y));\n\nBut what do these differences in the error mean in practice? To see\nthis, consider the problem of evaluating the derivative of the\nunivariate function\n\n.. math::\n   f(x) = \\frac{e^x}{\\sin x - x^2},\n\nat :math:`x = 1.0`.\n\nIt is easy to determine that :math:`Df(1.0) =\n140.73773557129658`. Using this value as reference, we can now compute\nthe relative error in the forward and central difference formulae as a\nfunction of the absolute step size and plot them.\n\n.. figure:: forward_central_error.png\n   :figwidth: 100%\n   :align: center\n\nReading the graph from right to left, a number of things stand out in\nthe above graph:\n\n 1. The graph for both formulae have two distinct regions. At first,\n    starting from a large value of :math:`h` the error goes down as\n    the effect of truncating the Taylor series dominates, but as the\n    value of :math:`h` continues to decrease, the error starts\n    increasing again as roundoff error starts to dominate the\n    computation. So we cannot just keep on reducing the value of\n    :math:`h` to get better estimates of :math:`Df`. The fact that we\n    are using finite precision arithmetic becomes a limiting factor.\n 2. Forward Difference formula is not a great method for evaluating\n    derivatives. Central Difference formula converges much more\n    quickly to a more accurate estimate of the derivative with\n    decreasing step size. So unless the evaluation of :math:`f(x)` is\n    so expensive that you absolutely cannot afford the extra\n    evaluation required by central differences, **do not use the\n    Forward Difference formula**.\n 3. Neither formula works well for a poorly chosen value of :math:`h`.\n\n\nRidders' Method\n===============\n\nSo, can we get better estimates of :math:`Df` without requiring such\nsmall values of :math:`h` that we start hitting floating point\nroundoff errors?\n\nOne possible approach is to find a method whose error goes down faster\nthan :math:`O(h^2)`. This can be done by applying `Richardson\nExtrapolation\n<https://en.wikipedia.org/wiki/Richardson_extrapolation>`_ to the\nproblem of differentiation. This is also known as *Ridders' Method*\n[Ridders]_.\n\nLet us recall, the error in the central differences formula.\n\n.. math::\n   \\begin{align}\n   Df(x) & =  \\frac{f(x + h) - f(x - h)}{2h} + \\frac{h^2}{3!}\n   D^3f(x) +  \\frac{h^4}{5!}\n   D^5f(x) + \\cdots\\\\\n           & =  \\frac{f(x + h) - f(x - h)}{2h} + K_2 h^2 + K_4 h^4 + \\cdots\n   \\end{align}\n\nThe key thing to note here is that the terms :math:`K_2, K_4, ...`\nare independent of :math:`h` and only depend on :math:`x`.\n\nLet us now define:\n\n.. math::\n\n   A(1, m) = \\frac{f(x + h/2^{m-1}) - f(x - h/2^{m-1})}{2h/2^{m-1}}.\n\nThen observe that\n\n.. math::\n\n   Df(x) = A(1,1) + K_2 h^2 + K_4 h^4 + \\cdots\n\nand\n\n.. math::\n\n   Df(x) = A(1, 2) + K_2 (h/2)^2 + K_4 (h/2)^4 + \\cdots\n\nHere we have halved the step size to obtain a second central\ndifferences estimate of :math:`Df(x)`. Combining these two estimates,\nwe get:\n\n.. math::\n\n   Df(x) = \\frac{4 A(1, 2) - A(1,1)}{4 - 1} + O(h^4)\n\nwhich is an approximation of :math:`Df(x)` with truncation error that\ngoes down as :math:`O(h^4)`. But we do not have to stop here. We can\niterate this process to obtain even more accurate estimates as\nfollows:\n\n.. math::\n\n   A(n, m) =  \\begin{cases}\n    \\frac{\\displaystyle f(x + h/2^{m-1}) - f(x -\n    h/2^{m-1})}{\\displaystyle 2h/2^{m-1}} & n = 1 \\\\\n   \\frac{\\displaystyle 4^{n-1} A(n - 1, m + 1) - A(n - 1, m)}{\\displaystyle 4^{n-1} - 1} & n > 1\n   \\end{cases}\n\nIt is straightforward to show that the approximation error in\n:math:`A(n, 1)` is :math:`O(h^{2n})`. To see how the above formula can\nbe implemented in practice to compute :math:`A(n,1)` it is helpful to\nstructure the computation as the following tableau:\n\n.. math::\n   \\begin{array}{ccccc}\n   A(1,1) & A(1, 2) & A(1, 3) & A(1, 4) & \\cdots\\\\\n          & A(2, 1) & A(2, 2) & A(2, 3) & \\cdots\\\\\n\t  &         & A(3, 1) & A(3, 2) & \\cdots\\\\\n\t  &         &         & A(4, 1) & \\cdots \\\\\n\t  &         &         &         & \\ddots\n   \\end{array}\n\nSo, to compute :math:`A(n, 1)` for increasing values of :math:`n` we\nmove from the left to the right, computing one column at a\ntime. Assuming that the primary cost here is the evaluation of the\nfunction :math:`f(x)`, the cost of computing a new column of the above\ntableau is two function evaluations. Since the cost of evaluating\n:math:`A(1, n)`, requires evaluating the central difference formula\nfor step size of :math:`2^{1-n}h`\n\nApplying this method to :math:`f(x) = \\frac{e^x}{\\sin x - x^2}`\nstarting with a fairly large step size :math:`h = 0.01`, we get:\n\n.. math::\n   \\begin{array}{rrrrr}\n   141.678097131 &140.971663667 &140.796145400 &140.752333523 &140.741384778\\\\\n   &140.736185846 &140.737639311 &140.737729564 &140.737735196\\\\\n   & &140.737736209 &140.737735581 &140.737735571\\\\\n   & & &140.737735571 &140.737735571\\\\\n   & & & &140.737735571\\\\\n   \\end{array}\n\nCompared to the *correct* value :math:`Df(1.0) = 140.73773557129658`,\n:math:`A(5, 1)` has a relative error of :math:`10^{-13}`. For\ncomparison, the relative error for the central difference formula with\nthe same stepsize (:math:`0.01/2^4 = 0.000625`) is :math:`10^{-5}`.\n\nThe above tableau is the basis of Ridders' method for numeric\ndifferentiation. The full implementation is an adaptive scheme that\ntracks its own estimation error and stops automatically when the\ndesired precision is reached. Of course it is more expensive than the\nforward and central difference formulae, but is also significantly\nmore robust and accurate.\n\nUsing Ridder's method instead of forward or central differences in\nCeres is again a simple matter of changing a template argument to\n:class:`NumericDiffCostFunction` as follows:\n\n.. code-block:: c++\n\n  CostFunction* cost_function =\n    new NumericDiffCostFunction<Rat43CostFunctor, RIDDERS, 1, 4>(\n      new Rat43CostFunctor(x, y));\n\nThe following graph shows the relative error of the three methods as a\nfunction of the absolute step size. For Ridders's method we assume\nthat the step size for evaluating :math:`A(n,1)` is :math:`2^{1-n}h`.\n\n.. figure:: forward_central_ridders_error.png\n   :figwidth: 100%\n   :align: center\n\nUsing the 10 function evaluations that are needed to compute\n:math:`A(5,1)` we are able to approximate :math:`Df(1.0)` about a 1000\ntimes better than the best central differences estimate. To put these\nnumbers in perspective, machine epsilon for double precision\narithmetic is :math:`\\approx 2.22 \\times 10^{-16}`.\n\nGoing back to ``Rat43``, let us also look at the runtime cost of the\nvarious methods for computing numeric derivatives.\n\n==========================   =========\nCostFunction                 Time (ns)\n==========================   =========\nRat43Analytic                      255\nRat43AnalyticOptimized              92\nRat43NumericDiffForward            262\nRat43NumericDiffCentral            517\nRat43NumericDiffRidders           3760\n==========================   =========\n\nAs expected, Central Differences is about twice as expensive as\nForward Differences and the remarkable accuracy improvements of\nRidders' method cost an order of magnitude more runtime.\n\nRecommendations\n===============\n\nNumeric differentiation should be used when you cannot compute the\nderivatives either analytically or using automatic differentiation. This\nis usually the case when you are calling an external library or\nfunction whose analytic form you do not know or even if you do, you\nare not in a position to re-write it in a manner required to use\n:ref:`chapter-automatic_derivatives`.\n\n\nWhen using numeric differentiation, use at least Central Differences,\nand if execution time is not a concern or the objective function is\nsuch that determining a good static relative step size is hard,\nRidders' method is recommended.\n\n.. rubric:: Footnotes\n\n.. [#f2] `Numerical Differentiation\n\t <https://en.wikipedia.org/wiki/Numerical_differentiation#Practical_considerations_using_floating_point_arithmetic>`_\n.. [#f3] [Press]_ Numerical Recipes, Section 5.7\n.. [#f4] In asymptotic error analysis, an error of :math:`O(h^k)`\n\t means that the absolute-value of the error is at most some\n\t constant times :math:`h^k` when :math:`h` is close enough to\n\t :math:`0`.\n"
  },
  {
    "path": "3rdparty/ceres/docs/source/solving_faqs.rst",
    "content": ".. _chapter-solving_faqs:\n\n.. default-domain:: cpp\n\n.. cpp:namespace:: ceres\n\n=======\nSolving\n=======\n\n#. How do I evaluate the Jacobian for a solved problem?\n\n   Using :func:`Problem::Evaluate`.\n\n#. How do I choose the right linear solver?\n\n   When using the ``TRUST_REGION`` minimizer, the choice of linear\n   solver is an important decision. It affects solution quality and\n   runtime. Here is a simple way to reason about it.\n\n   1. For small (a few hundred parameters) or dense problems use\n      ``DENSE_QR``.\n\n   2. For general sparse problems (i.e., the Jacobian matrix has a\n      substantial number of zeros) use\n      ``SPARSE_NORMAL_CHOLESKY``. This requires that you have\n      ``SuiteSparse`` or ``CXSparse`` installed.\n\n   3. For bundle adjustment problems with up to a hundred or so\n      cameras, use ``DENSE_SCHUR``.\n\n   4. For larger bundle adjustment problems with sparse Schur\n      Complement/Reduced camera matrices use ``SPARSE_SCHUR``. This\n      requires that you build Ceres with support for ``SuiteSparse``,\n      ``CXSparse`` or Eigen's sparse linear algebra libraries.\n\n      If you do not have access to these libraries for whatever\n      reason, ``ITERATIVE_SCHUR`` with ``SCHUR_JACOBI`` is an\n      excellent alternative.\n\n   5. For large bundle adjustment problems (a few thousand cameras or\n      more) use the ``ITERATIVE_SCHUR`` solver. There are a number of\n      preconditioner choices here. ``SCHUR_JACOBI`` offers an\n      excellent balance of speed and accuracy. This is also the\n      recommended option if you are solving medium sized problems for\n      which ``DENSE_SCHUR`` is too slow but ``SuiteSparse`` is not\n      available.\n\n      .. NOTE::\n\n        If you are solving small to medium sized problems, consider\n        setting ``Solver::Options::use_explicit_schur_complement`` to\n        ``true``, it can result in a substantial performance boost.\n\n      If you are not satisfied with ``SCHUR_JACOBI``'s performance try\n      ``CLUSTER_JACOBI`` and ``CLUSTER_TRIDIAGONAL`` in that\n      order. They require that you have ``SuiteSparse``\n      installed. Both of these preconditioners use a clustering\n      algorithm. Use ``SINGLE_LINKAGE`` before ``CANONICAL_VIEWS``.\n\n#. Use :func:`Solver::Summary::FullReport` to diagnose performance problems.\n\n   When diagnosing Ceres performance issues - runtime and convergence,\n   the first place to start is by looking at the output of\n   ``Solver::Summary::FullReport``. Here is an example\n\n   .. code-block:: bash\n\n     ./bin/bundle_adjuster --input ../data/problem-16-22106-pre.txt\n\n     iter      cost      cost_change  |gradient|   |step|    tr_ratio  tr_radius  ls_iter  iter_time  total_time\n        0  4.185660e+06    0.00e+00    2.16e+07   0.00e+00   0.00e+00  1.00e+04       0    7.50e-02    3.58e-01\n        1  1.980525e+05    3.99e+06    5.34e+06   2.40e+03   9.60e-01  3.00e+04       1    1.84e-01    5.42e-01\n        2  5.086543e+04    1.47e+05    2.11e+06   1.01e+03   8.22e-01  4.09e+04       1    1.53e-01    6.95e-01\n        3  1.859667e+04    3.23e+04    2.87e+05   2.64e+02   9.85e-01  1.23e+05       1    1.71e-01    8.66e-01\n        4  1.803857e+04    5.58e+02    2.69e+04   8.66e+01   9.93e-01  3.69e+05       1    1.61e-01    1.03e+00\n        5  1.803391e+04    4.66e+00    3.11e+02   1.02e+01   1.00e+00  1.11e+06       1    1.49e-01    1.18e+00\n\n     Ceres Solver v1.12.0 Solve Report\n     ----------------------------------\n                                          Original                  Reduced\n     Parameter blocks                        22122                    22122\n     Parameters                              66462                    66462\n     Residual blocks                         83718                    83718\n     Residual                               167436                   167436\n\n     Minimizer                        TRUST_REGION\n\n     Sparse linear algebra library    SUITE_SPARSE\n     Trust region strategy     LEVENBERG_MARQUARDT\n\n                                             Given                     Used\n     Linear solver                    SPARSE_SCHUR             SPARSE_SCHUR\n     Threads                                     1                        1\n     Linear solver threads                       1                        1\n     Linear solver ordering              AUTOMATIC                22106, 16\n\n     Cost:\n     Initial                          4.185660e+06\n     Final                            1.803391e+04\n     Change                           4.167626e+06\n\n     Minimizer iterations                        5\n     Successful steps                            5\n     Unsuccessful steps                          0\n\n     Time (in seconds):\n     Preprocessor                            0.283\n\n       Residual evaluation                   0.061\n       Jacobian evaluation                   0.361\n       Linear solver                         0.382\n     Minimizer                               0.895\n\n     Postprocessor                           0.002\n     Total                                   1.220\n\n     Termination:                   NO_CONVERGENCE (Maximum number of iterations reached.)\n\n  Let us focus on run-time performance. The relevant lines to look at\n  are\n\n\n   .. code-block:: bash\n\n     Time (in seconds):\n     Preprocessor                            0.283\n\n       Residual evaluation                   0.061\n       Jacobian evaluation                   0.361\n       Linear solver                         0.382\n     Minimizer                               0.895\n\n     Postprocessor                           0.002\n     Total                                   1.220\n\n\n  Which tell us that of the total 1.2 seconds, about .3 seconds was\n  spent in the linear solver and the rest was mostly spent in\n  preprocessing and jacobian evaluation.\n\n  The preprocessing seems particularly expensive. Looking back at the\n  report, we observe\n\n   .. code-block:: bash\n\n     Linear solver ordering              AUTOMATIC                22106, 16\n\n  Which indicates that we are using automatic ordering for the\n  ``SPARSE_SCHUR`` solver. This can be expensive at times. A straight\n  forward way to deal with this is to give the ordering manually. For\n  ``bundle_adjuster`` this can be done by passing the flag\n  ``-ordering=user``. Doing so and looking at the timing block of the\n  full report gives us\n\n   .. code-block:: bash\n\n     Time (in seconds):\n     Preprocessor                            0.051\n\n       Residual evaluation                   0.053\n       Jacobian evaluation                   0.344\n       Linear solver                         0.372\n     Minimizer                               0.854\n\n     Postprocessor                           0.002\n     Total                                   0.935\n\n\n\n  The preprocessor time has gone down by more than 5.5x!.\n"
  },
  {
    "path": "3rdparty/ceres/docs/source/spivak_notation.rst",
    "content": ".. default-domain:: cpp\n\n.. cpp:namespace:: ceres\n\n.. _chapter-spivak_notation:\n\n===============\nSpivak Notation\n===============\n\nTo preserve our collective sanities, we will use Spivak's notation for\nderivatives. It is a functional notation that makes reading and\nreasoning about expressions involving derivatives simple.\n\nFor a univariate function :math:`f`, :math:`f(a)` denotes its value at\n:math:`a`. :math:`Df` denotes its first derivative, and\n:math:`Df(a)` is the derivative evaluated at :math:`a`, i.e\n\n.. math::\n   Df(a) = \\left . \\frac{d}{dx} f(x) \\right |_{x = a}\n\n:math:`D^kf` denotes the :math:`k^{\\text{th}}` derivative of :math:`f`.\n\nFor a bi-variate function :math:`g(x,y)`. :math:`D_1g` and\n:math:`D_2g` denote the partial derivatives of :math:`g` w.r.t the\nfirst and second variable respectively. In the classical notation this\nis equivalent to saying:\n\n.. math::\n\n   D_1 g = \\frac{\\partial}{\\partial x}g(x,y) \\text{ and }  D_2 g  = \\frac{\\partial}{\\partial y}g(x,y).\n\n\n:math:`Dg` denotes the Jacobian of `g`, i.e.,\n\n.. math::\n\n  Dg = \\begin{bmatrix} D_1g & D_2g \\end{bmatrix}\n\nMore generally for a multivariate function :math:`g:\\mathbb{R}^n\n\\longrightarrow \\mathbb{R}^m`, :math:`Dg` denotes the :math:`m\\times\nn` Jacobian matrix. :math:`D_i g` is the partial derivative of\n:math:`g` w.r.t the :math:`i^{\\text{th}}` coordinate and the\n:math:`i^{\\text{th}}` column of :math:`Dg`.\n\nFinally, :math:`D^2_1g` and :math:`D_1D_2g` have the obvious meaning\nas higher order partial derivatives.\n\nFor more see Michael Spivak's book `Calculus on Manifolds\n<https://www.amazon.com/Calculus-Manifolds-Approach-Classical-Theorems/dp/0805390219>`_\nor a brief discussion of the `merits of this notation\n<http://www.vendian.org/mncharity/dir3/dxdoc/>`_ by\nMitchell N. Charity.\n"
  },
  {
    "path": "3rdparty/ceres/docs/source/tutorial.rst",
    "content": ".. _chapter-tutorial:\n\n========\nTutorial\n========\n\n.. toctree::\n   :maxdepth: 3\n\n   nnls_tutorial\n   gradient_tutorial\n"
  },
  {
    "path": "3rdparty/ceres/docs/source/users.rst",
    "content": ".. _chapter-users:\n\n=====\nUsers\n=====\n\n* At `Google <http://www.google.com>`_, Ceres is used to:\n\n  * Estimate the pose of `Street View`_ cars, aircrafts, and satellites.\n  * Build 3D models for `PhotoTours`_.\n  * Estimate satellite image sensor characteristics.\n  * Stitch `panoramas`_ on Android and iOS.\n  * Apply `Lens Blur`_ on Android.\n  * Solve `bundle adjustment`_ and `SLAM`_ problems in `Project\n    Tango`_.\n\n* `Willow Garage`_ uses Ceres to solve `SLAM`_ problems.\n* `Southwest Research Institute <http://www.swri.org/>`_ uses Ceres for\n  `calibrating robot-camera systems`_.\n* `Blender <http://www.blender.org>`_ uses Ceres for `planar\n  tracking`_ and `bundle adjustment`_.\n* `OpenMVG <http://imagine.enpc.fr/~moulonp/openMVG/>`_ an open source\n  multi-view geometry library uses Ceres for `bundle adjustment`_.\n* `Microsoft Research <http://research.microsoft.com/en-us/>`_ uses\n  Ceres for nonlinear optimization of objectives involving subdivision\n  surfaces under `skinned control meshes`_.\n* `Matterport <http://www.matterport.com>`_, uses Ceres for global\n  alignment of 3D point clouds and for pose graph optimization.\n* `Obvious Engineering <http://obviousengine.com/>`_ uses Ceres for\n  bundle adjustment for their 3D photography app `Seene\n  <http://seene.co/>`_.\n* The `Autonomous Systems Lab <http://www.asl.ethz.ch/>`_ at ETH\n  Zurich uses Ceres for\n\n  * Camera and Camera/IMU Calibration.\n  * Large scale optimization of visual, inertial, gps and\n    wheel-odometry data for long term autonomy.\n\n* `OpenPTrack <http://openptrack.org/>`_ uses Ceres for camera\n  calibration.\n* The `Intelligent Autonomous System Lab <http://robotics.dei.unipd.it/>`_\n  at University of Padova, Italy, uses Ceres for\n\n  * Camera/depth sensors network calibration.\n  * Depth sensor distortion map estimation.\n\n* `Theia <http://cs.ucsb.edu/~cmsweeney/theia>`_ is an open source\n  Structure from Motion library that uses Ceres for `bundle adjustment`_\n  and camera pose estimation.\n\n* The `Applied Research Laboratory <https://www.arl.psu.edu/>`_ at\n  Pennsylvania State University uses in their synthetic aperture Sonar\n  beamforming engine, called ASASIN , for estimating platform\n  kinematics.\n\n* `Colmap <https://github.com/colmap/colmap>`_ is an open source\n  structure from motion library that makes heavy use of Ceres for\n  bundle adjustment with support for many camera models and for other\n  non-linear least-squares problems (relative, absolute pose\n  refinement, etc.).\n\n\n\n.. _bundle adjustment: http://en.wikipedia.org/wiki/Structure_from_motion\n.. _Street View: http://youtu.be/z00ORu4bU-A\n.. _PhotoTours: http://google-latlong.blogspot.com/2012/04/visit-global-landmarks-with-photo-tours.html\n.. _panoramas: http://www.google.com/maps/about/contribute/photosphere/\n.. _Project Tango: https://www.google.com/atap/projecttango/\n.. _planar tracking: http://mango.blender.org/development/planar-tracking-preview/\n.. _Willow Garage: https://www.willowgarage.com/blog/2013/08/09/enabling-robots-see-better-through-improved-camera-calibration\n.. _Lens Blur: http://googleresearch.blogspot.com/2014/04/lens-blur-in-new-google-camera-app.html\n.. _SLAM: http://en.wikipedia.org/wiki/Simultaneous_localization_and_mapping\n.. _calibrating robot-camera systems:\n   http://rosindustrial.org/news/2014/9/24/industrial-calibration-library-update-and-presentation\n.. _skinned control meshes: http://research.microsoft.com/en-us/projects/handmodelingfrommonoculardepth/\n"
  },
  {
    "path": "3rdparty/ceres/docs/source/version_history.rst",
    "content": ".. _chapter-version-history:\n\n===============\nVersion History\n===============\n\n1.14.0\n======\n\nNew Features\n------------\n\n#. New ``EvaluationCallback`` API. (Keir Mierle)\n#. TBB based threading (Yury Prokazov & Mike Vitus)\n#. C++11 threads based threading (Mike Vitus)\n#. A ``ceres::Context`` object to cache and keep track of global\n   state. (Mike Vitus)\n#. TinySolver - A small dense solver meant for solving small problems\n   really fast. [EXPERIMENTAL] (Keir Mierle & Sameer Agarwal)\n#. Bazel Build. (Keir Mierle & Rodrigo Queiro)\n\n\nBackward Incompatible API Changes\n---------------------------------\n\n#. ``Solver::Options::num_linear_solver_threads`` is deprecated,\n   ``Solver::Options::num_threads`` controls all parallelism in Ceres\n   Solver now. Similarly,\n   ``Solver::Summary::num_linear_solver_threads_given`` and\n   ``Solver::Summary::num_linear_solver_threads_used`` are also\n   deprecated.\n\n\nBug Fixes & Minor Changes\n-------------------------\n\n#. Remove armv7 from target architectures when building for iOS >= 11. (Alex Stewart)\n#. Corrects the documentation of Problem::AddResidualBlock. (Mike Vitus)\n#. Fixes the configuration check in port.h. (Mike Vitus)\n#. Add small_blas_gemm_benchmark. (Sameer Agarwal)\n#. Implement some C++11 math functions for Jet (Emil Ernerfeldt)\n#. Fix integer conversion warning in MSVC. (Alex Stewart)\n#. Improve NDK build error handling (Keir Mierle)\n#. Fix build: -Wreorder, test fail (Keir Mierle)\n#. An implementation of SubsetPreconditioner. (Sameer Agarwal)\n#. Split bundle adjustment tests into individual binaries (Keir Mierle)\n#. Require Eigen >= 3.3.4 on aarch64. (Alex Stewart)\n#. Fix TBB detection on Windows. (Alex Stewart)\n#. Improve ExecutionSummary (Sameer Agarwal)\n#. Remove as typo from callbacks.h (Sameer Agarwal)\n#. Removes two unimplemented class functions. (Mike Vitus)\n#. Update EigenTypes to deal with 1 column matrices (Sameer Agarwal)\n#. Add GradientProblemSolver::Options::update_state_every_iteration (Sameer Agarwal)\n#. Fixes the pose graph example documentation. (Mike Vitus)\n#. Fix Eigen >= 3.3 compilation if EIGEN_DONT_VECTORIZE set (Janick Martinez Esturo)\n#. Add an optional dependency on the Google Benchmark library. (Sameer Agarwal)\n#. Fix the documentation for CostFunction::Evaluate. (Sameer Agarwal)\n#. Fix a mathematical typo. (Sameer Agarwal)\n#. Add TBB information to Ceres version string. (Alex Stewart)\n#. Move discussion of dependency licensing to Sphinx docs. (Alex Stewart)\n#. Fix an erroneous namespace comment (Sameer Agarwal)\n#. Fix use of unnamed type as template argument warnings on Clang. (Alex Stewart)\n#. Add link for CLA in docs; minor fixes (Keir Mierle)\n#. Fix tiny_solver_test (Sameer Agarwal)\n#. Improve compatibility with ceres::Solver (Sameer Agarwal)\n#. Refactor nist.cc to be compatible with TinySolver (Sameer Agarwal)\n#. Report timings with microsecond resolution (Thomas Gamper)\n#. Add missing Eigen traits to Jets (Sameer Agarwal)\n#. Use high-resolution timer on Windows (Thomas Gamper)\n#. Add a comment about default constructed reference counts= (Keir Mierle)\n#. Delete cost and loss functions when not in use. (Sameer Agarwal)\n#. Fix assert_ndk_version for >= r11. (Alex Stewart)\n#. Add docs explaining how to build Ceres with OpenMP on OS X. (Alex Stewart)\n#. Update LAPACK option to refer to direct use by Ceres only. (Alex Stewart)\n#. Hide optional SuiteSparse vars in CMake GUI by default. (Alex Stewart)\n#. Always hide TBB_LIBRARY in CMake GUI by default. (Alex Stewart)\n#. Fix typo in definition of f3 in powell example (x4 -> x3). (Alex Stewart)\n#. Fix suppression of C++11 propagation warning. (Alex Stewart)\n#. Add new Schur specialization for 2, 4, 6. (Chris Sweeney)\n#. Use const keyword for 'int thread_id' variables. (pmoulon)\n\n\n1.13.0\n======\n\nNew Features\n------------\n#. ``LineSearchMinimizer`` and ``GradientProblemSolver`` are up to 2x\n   faster due to fewer function evaluations. (Sameer Agarwal)\n#. ``SPARSE_NORMAL_CHOLESKY`` is significantly faster because Ceres\n   now computes the normal equations exploiting the static block\n   sparsity structure. (Cheng Wang & Sameer Agarwal)\n#. Add compound with scalar operators for Jets. (Alex Stewart)\n#. Enable support for AVX instructions for Jets. (Alex Stewart)\n\nBackward Incompatible API Changes\n---------------------------------\nThe enum ``CovarianceAlgorithmType`` which controls the linear algebra\nalgorithm used to compute the covariance used to combine the choice of\nthe algorithm and the choice of the sparse linear algebra library into\nthe enum name. So we had ``SUITE_SPARSE_QR`` and\n``EIGEN_SPARSE_QR``. ``Covariance::Options`` now has a separate member\nallowing the user to choose the sparse linear algebra library, just\nlike the solver and ``CovarianceAlgorithmType`` now takes values\n``DENSE_SVD`` and ``SPARSE_QR``. This is a forward looking change that\nwill allow us to develop more flexible covariance estimation\nalgorithms with multiple linear algebra backends.\n\nBug Fixes & Minor Changes\n-------------------------\n#. Fix ``InvertPSDMatrix`` as it was triggering an Eigen assert in\n   Debug mode. (Philipp Hubner)\n#. Fix cmake error from CeresConfig.cmake when Ceres not found (Taylor\n   Braun-Jones)\n#. Completely refactored ``SparseNormalCholeskySolver``. (Sameer\n   Agarwal)\n#. Fixed time reporting in ``Summary::FullReport`` when\n   ``LineSearchMinimizer`` is used. (Sameer Agarwal)\n#. Remove unused file: collections_port.cc. (Sameer Agarwal)\n#. ``SPARSE_SCHUR`` + ``CX_SPARSE`` = Faster (Sameer Agarwal)\n#. Refactored a number of linear solver tests to be more thorough and\n   informative. (Sameer Agarwal)\n#. Pass user-specified search hints as HINTS not PATHS. (Alex Stewart)\n#. Prefer Eigen installs over exported build directories. (Alex\n   Stewart)\n#. Add OpenMP flags when compiling for C if enabled. (Alex Stewart)\n#. Add a missing ``CERES_EXPORT`` to GradientChecker (Sameer Agarwal)\n#. Use target_compile_features() to specify C++11 requirement if\n   available. (Alex Stewart)\n#. Update docs: .netrc --> .gitcookies (Keir Mierle)\n#. Fix implicit precision loss warning on 64-bit archs (Ricardo\n   Sanchez-Saez)\n#. Optionally use exported Eigen CMake configuration if\n   available. (Alex Stewart)\n#. Use ``Ceres_[SOURCE/BINARY]_DIR`` not ``CMAKE_XXX_DIR`` to support\n   nesting. (Alex Stewart)\n#. Update ``Problem::EvaluateOptions`` documentation. (Sameer Agarwal)\n#. Add public headers to CMake target for IDEs. (Devin Lane)\n#. Add an article on interfacing with automatic\n   differentiation. (Sameer Agarwal)\n#. Add default Fedora/Debian locations for CXSparse to search\n   paths. (Alex Stewart)\n#. Add a test for ``LineSearchMinimizer`` (Sameer Agarwal)\n#. Flatten the table of contents. (Sameer Agarwal)\n#. Fix when ``LineSearchMinimizer`` adds the ``IterationSummary``` to\n   ``Solver::Summary`` (Sameer Agarwal)\n#. Fix search path for miniglog headers when Ceres is exported. (Alex\n   Stewart)\n#. Fix ambiguous reference to ``WARNING`` when using miniglog. (Alex\n   Stewart)\n#. Fix Jet/Eigen compatibility for Eigen > 3.3 (Julien Pilet)\n#. Add max severity option when ``MINIGLOG`` is enabled (Taylor\n   Braun-Jones)\n#. Improvements to Schur template specializations (Sameer Agarwal)\n#. Added an article on derivatives (Sameer Agarwal)\n#. Require Eigen >= 3.3 to define ScalarBinaryOpTraits in Jet. (Alex\n   Stewart)\n#. A hacky fix for the Eigen::FullPivLU changes. (Sameer Agarwal)\n#. Specify ``ScalarBinaryOpTraits`` for Jet types. (Chris Sweeney)\n#. Remove spurious conversion from doubles to Jets. (Sameer Agarwal)\n#. Fix an error in the tutorial code for ``NumericDiffCostFunction``\n   (Sameer Agarwal)\n#. ``CERES_EXPORT`` fix to compile Ceres as DLL (Je Hyeong Hong)\n#. Fix detection of deprecated Bessel function names on MSVC. (Alex\n   Stewart)\n#. Ensure that partial evaluation of residuals triggers an error\n   (Sameer Agarwal)\n#. Fix detection of CMake-built glog on Windows. (Alex Stewart)\n#. Add additional search paths for glog & Eigen on Windows. (Alex\n   Stewart)\n#. Various minor grammar and bug fixes to the documentation (Sameer\n   Agarwal, Alex Stewart, William Rucklidge)\n\n\n1.12.0\n======\n\nNew Features\n------------\n#. Aligned ``Jet`` matrices for improved automatic differentiation\n   performance. (Andrew Hunter)\n#. Auto-differentiable implementations of Bessel functions, ``floor``,\n   and ``ceil`` (Alessandro Gentilini & Michael Vitus)\n#. New 2D and 3D SLAM examples. (Michael Vitus)\n#. Added ``EigenQuaternionParameterization``. (Michael Vitus)\n#. Added ``Problem::IsParameterBlockConstant`` (Thomas Schneider)\n#. A complete refactoring of ``TrustRegionMinimizer``. (Sameer Agarwal)\n#. Gradient checking cleanup and local parameterization bugfix (David\n   Gossow)\n\n\nBackward Incompatible API Changes\n---------------------------------\n#. ``Solver::Options::numeric_derivative_relative_step_size`` has been\n   renamed to\n   ``Solver::Options::gradient_check_numeric_derivative_relative_step_size``. (Sameer\n   Agarwal)\n\nBug Fixes & Minor Changes\n-------------------------\n#. Clear XXX_FOUND in Find<XXX>.cmake prior to searching. (Alex\n   Stewart)\n#. Fix versioning in the documentation (Sameer Agarwal)\n#. Fix missing gflags imported target definition in\n   CeresConfig.cmake. (Alex Stewart)\n#. Make gflags a public dependency of Ceres if it and glog are\n   found. (Alex Stewart)\n#. Add support for glog exported CMake target. (Alex Stewart)\n#. Use ``google::GLOG_WARNING`` instead of ``WARNING`` in tests to\n   support MSVC. (Alex Stewart)\n#. Update gtest and gmock to\n   ``a2b8a8e07628e5fd60644b6dd99c1b5e7d7f1f47`` (Sameer Agarwal)\n#. Add MSVC-specific ``#define`` to expose math constants in\n   ``<cmath>``. (Alex Stewart)\n#. Fix typo. indepdendent -> independent (Hung Lun)\n#. Fix potential invalid reset of CMAKE_FIND_LIBRARY_PREFIXES on MSVC\n   (Alex Stewart)\n#. Fix use of alignas(0) which is not ignored on GCC (Alex Stewart)\n#. Use default alignment if alignof(std::max_align_t) < 16 with C++11\n   (Alex Stewart)\n#. Introduce a common base class for DynamicAutoDiffCostFunction and\n   DynamicNumericDiffCostFunction. (Sameer Agarwal)\n#. Fix an exact equality test causing breakage in\n   gradient_checker_test. (Sameer Agarwal)\n#. Add GradientProblemSolver::Options::parameter_tolerance. (Sameer\n   Agarwal)\n#. Add missing T() wrappers for constants. (Rob Carroll)\n#. Remove two checks from rotation.h (Sameer Agarwal)\n#. Relax the tolerance in QuaternionParameterizationTestHelper. (Je\n   Hyeong Hong)\n#. Occured -> Occurred. (Sameer Agarwal)\n#. Fix a test error in autodiff_test.cc. (Je Hyeong Hong)\n#. Fix documentation source for templated function in ``rotation.h``.\n#. Add ``package.xml`` to enable Catkin builds. (Damon Kohler)\n#. Relaxing Jacobian matching in Gradient Checker test. (David Gossow)\n#. Allow SubsetParameterization to hold all parameters constant\n   (Sameer Agarwal)\n#. Fix an Intel compiler error in covariance_impl.cc (Je Hyeong Hong)\n#. Removing duplicate include directive. (David Gossow)\n#. Remove two DCHECKs from CubicHermiteSpline. (Sameer Agarwal)\n#. Fix some compiler warnings. (Richard Trieu)\n#. Update ExpectArraysClose to use ExpectClose instead of\n   EXPECT_NEAR. (Phillip Hubner)\n#. FindWithDefault returns by value rather than reference. (@aradval)\n#. Fix compiler errors on some systems. (David Gossow)\n#. Note that Problem::Evaluate cannot be called from an\n   IterationCallback. (Sameer Agarwal)\n#. Use ProductParameterization in bundle_adjuster.cc (Sameer Agarwal)\n#. Enable support for OpenMP in Clang if detected. (Alex Stewart)\n#. Remove duplicate entry for the NIST example in the docs. (Michael\n   Vitus)\n#. Add additional logging for analyzing orderings (Sameer Agarwal)\n#. Add readme for the sampled_function example. (Michael Vitus)\n#. Use _j[0,1,n]() Bessel functions on MSVC to avoid deprecation\n   errors. (Alex Stewart & Kichang Kim)\n#. Fix: Copy minimizer option ``is_silent`` to\n   ``LineSearchDirection::Options`` (Nicolai Wojke)\n#. Fix typos in ``users.rst`` (Sameer Agarwal)\n#. Make some Jet comparisons exact. (Sameer Agarwal)\n#. Add colmap to users.rst (Sameer Agarwal)\n#. Fix step norm evaluation in LineSearchMinimizer (Sameer Agarwal)\n#. Remove use of -Werror when compiling Ceres. (Alex Stewart)\n#. Report Ceres compile options as components in find_package(). (Alex\n   Stewart)\n#. Fix a spelling error in nnls_modeling.rst (Timer)\n#. Only use collapse() directive with OpenMP 3.0 or higher. (Keir\n   Mierle)\n#. Fix install path for CeresConfig.cmake to be architecture-aware.\n#. Fix double conversion to degrees in rotation_test (Keir Mierle)\n#. Make Jet string output more readable (Keir Mierle)\n#. Fix rotation_test IsClose() and related tests (Keir Mierle)\n#. Loosen an exact equality in local_parameterization_test (Sameer\n   Agarwal)\n#. make_docs: Pass the file encoding to open() (Niels Ole Salscheider)\n#. Fix error message returned when using SUITE_SPARSE_QR in covariance\n   estimation on a ceres built without SuiteSparse support. (Simon\n   Rutishauser)\n#. Fix CXX11 option to be available on MinGW & CygWin, but not\n   MSVC. (Alex Stewart)\n#. Fix missing early return() in xxx_not_found() dependency\n   macros. (Alex Stewart)\n#. Initialize ``inner_iterations_were_useful_`` correctly. (Sameer\n   Agarwal)\n#. Add an implementation for GradientProblemSolver::Options::IsValid\n   (Sameer Agarwal)\n#. Fix use of va_copy() if compiling with explicit C++ version <\n   C++11. (Alex Stewart)\n#. Install CMake files to lib/cmake/Ceres (Niels Ole Salscheider)\n#. Allow users to override the documentation install directory. (Niels\n   Ole Salscheider)\n#. Add covariance matrix for a vector of parameters (Wannes Van Loock)\n#. Saner tolerances & stricter LRE test. (Sameer Agarwal)\n#. Fix a malformed sentence in the tutorial. (Sameer Agarwal)\n#. Add logging for sparse Cholesky factorization using Eigen. (Sameer\n   Agarwal)\n#. Use std::adjacent_find instead of std::unique. (Sameer Agarwal)\n#. Improve logging in CompressedRowJacobianWriter on crash. (Sameer\n   Agarwal)\n#. Fix free parameter block handling in covariance computation (Wannes\n   Van Loock)\n#. Report the number of line search steps in FullReport. (Sameer\n   Agarwal)\n#. Make CMake read Ceres version directly from\n   include/ceres/version.h. (Alex Stewart)\n#. Lots of code style/lint changes. (William Rucklidge)\n#. Fix covariance computation for constant blocks (Wannes Van Loock)\n#. Add IOS_DEPLOYMENT_TARGET variable to iOS.cmake (Eduard Feicho)\n#. Make miniglog threadsafe on non-windows system by using\n   localtime_r() instead of localtime() for time formatting (Simon\n   Rutishauser)\n\n1.11.0\n======\n\nNew Features\n------------\n#. Adaptive numeric differentiation using Ridders' method. (Tal\n   Ben-Nun)\n#. Add ``CubicInterpolator`` and ``BiCubicInterpolator`` to allow\n   smooth interpolation of sampled functions and integration with\n   automatic differentiation.\n#. Add method to return covariance in tangent space. (Michael Vitus &\n   Steve Hsu)\n#. Add Homogeneous vector parameterization. (Michael Vitus)\n#. Add a ``ProductParameterization``, a local parameterization that\n   can be constructed as a cartesian product of other local\n   parameterization.\n#. Add DynamicCostFunctionToFunctor. (David Gossow)\n#. Optionally export Ceres build directory into local CMake package\n   registry.\n#. Faster ``SPARSE_NORMAL_CHOLESKY`` in the presence of dynamic\n   sparsity.\n\nBug Fixes & Minor Changes\n-------------------------\n#. Remove use of link-time optimisation (LTO) for all compilers due to\n   portability issues with gtest / type_info::operator== & Eigen with\n   Clang on OS X vs GCC 4.9+ on Linux requiring contradictory 'fixes'.\n#. Use link-time optimisation (LTO) only when compiling Ceres itself,\n   not tests or examples, to bypass gtest / type_info::operator==\n   issue.\n#. Use old minimum iOS version flags on Xcode < 7.0.\n#. Add gtest-specific flags when building/using as a shared library.\n#. Clean up iOS.cmake to use xcrun/xcodebuild & libtool.\n#. Import the latest version of ``googletest``.\n#. Refactored ``system_test`` into ``bundle_adjustment_test`` and\n   ``system_test``, where each test case is its own test.\n#. Fix invalid memory access bug in\n   ``CompressedRowSparseMatrix::AppendRows`` when it was called with a\n   matrix of size zero.\n#. Build position independent code when compiling Ceres statically\n   (Alexander Alekhin).\n#. Fix a bug in DetectStructure (Johannes Schonberger).\n#. Reduce memory footprint of SubsetParameterization (Johannes\n   Schonberger).\n#. Fix for reorder program unit test when built without suitesparse\n   (Sergey Sharybin).\n#. Fix a bug in the Schur eliminator (Werner Trobin).\n#. Fix a bug in the reordering code (Bernhard Zeisl).\n#. Add missing CERES_EXPORT to ComposedLoss (Simon Rutishauser).\n#. Add the option to use numeric differentiation to ``nist`` and\n   ``more_garbow_hillstrom``.\n#. Fix EIGENSPARSE option help s/t it displays in CMake ncurses GUI.\n#. Fix SparseNormalCholeskySolver with dynamic sparsity (Richie\n   Stebbing).\n#. Remove legacy dependency detection macros.\n#. Fix failed if() condition expansion if gflags is not found.\n#. Update all CMake to lowercase function name style.\n#. Update minimum iOS version to 7.0 for shared_ptr/unordered_map.\n#. Fix bug in gflags' <= 2.1.2 exported CMake configuration.\n#. Remove the spec file needed for generating RPMs.\n#. Fix a typo in small_blas.h (Werber Trobin).\n#. Cleanup FindGflags & use installed gflags CMake config if present.\n#. Add default glog install location on Windows to search paths\n   (bvanevery).\n#. Add default Eigen install location on Windows to search paths\n   (bvanevery).\n#. Fix explanation of config.h generation in bare config.h.\n#. Fix unused parameter compiler warnings in numeric_diff.h.\n#. Increase tolerance for a test in polynomial_test (Taylor Braun\n   Jones).\n#. Fix addition of Gerrit commit hook when Ceres is a git submodule\n   (Chris Cooper).\n#. Fix missing EIGEN_VERSION expansion typo.\n#. Fix links to SuiteSparse & CXSparse (Henrique Mendonça).\n#. Ensure Eigen is at least 3.1.0 for Eigen/SparseCore.\n#. Add option to use C++11 (not TR1) shared_ptr & unordered_map\n   (Norman Goldstein).\n#. Fix an incorrect usage message in bundle_adjuster.cc\n#. Gracefully disable docs if Sphinx is not found.\n#. Explicitly use (new) default OS X rpath policy if present.\n#. Add support of EIGEN_SPARSE type in\n   IsSparseLinearAlgebraLibraryTypeAvailable function (Pierre Moulon).\n#. Allow the LossFunction contained in a LossFunctionWrapper to be\n   NULL. This is consistent with how NULL LossFunctions are treated\n   everywhere else. (Simon Rutishauser).\n#. Improve numeric differentation near zero.\n#. Refactored DynamicNumericDiffCostFunction to use NumericDiff (Tal\n   Ben-Nun).\n#. Remove use of :caption tag in Sphinx.\n#. Add a small test to make sure GradientProblemSolver works correctly\n   (Petter Strandmark).\n#. Add simple unit tests for GradientProblem (Petter Strandmark).\n#. Make the robust curve fitting example robust.\n#. Homogenize convergence operators in docs and code (Johannes\n   Schonberger).\n#. Add parameter_tolerance convergence to line search minimizer\n   (Johannes Schonberger).\n#. Fix bug where pow(JetA,JetB) returned wrong result for JetA==0\n   (Russell Smith).\n#. Remove duplicate step norm computation (Johannes Schonberger).\n#. Enhance usability when encountering Eigen version mismatches\n   (Andrew Hundt).\n#. Add PLY file logger before and after BA in order to ease visual\n   comparison (Pierre Moulon).\n#. Fix CMake config file docs to include 2.8.x & 3.x styles.\n#. Python3 fixes (Markus Moll).\n#. Remove confusing code from DenseJacobianWriter (Michael Vitus).\n#. Add documentation on CMake package installation process.\n#. Revert a call to SolveUpperTriangularUsingCholesky.\n#. Make CERES_EIGEN_VERSION macro independent of CMake.\n#. Add versions of dependencies used to FullReport().\n#. Ensure local config.h is used if Ceres is already installed.\n#. Small messaging and comment updates in CMake\n#. Handle possible presence of library prefixes in MSVC (Sylvain\n   Duchêne).\n#. Use -O2 not -O3 on MinGW to workaround issue with Eigen\n   (s1m3mu3@gmail.com).\n#. Increase tolerance in small_blas test for Cygwin\n   (s1m3mu3@gmail.com).\n#. Fix iOS cmake file for cmake 3.0 (Jack Feng)\n#. Fix missing gflags shlwapi dependency on MinGW (s1m3mu3@gmail.com).\n#. Add thread dependency & fix namespace detection on Windows for\n   gflags (arrigo.benedetti@gmail.com).\n#. Rename macros in the public API to have a ``CERES_`` prefix.\n#. Fix ``OrderedGroup::Reverse()`` when it is empty (Chris Sweeney).\n#. Update the code to point to ceres-solver.org.\n#. Update documentation to point to the GitHub issue tracker.\n#. Disable ``LAPACK`` for iOS builds. (Greg Coombe)\n#. Force use of single-thread in ``Problem::Evaluate()`` without\n   OpenMP.\n#. Less strict check for multithreading. (Chris Sweeney)\n#. Update tolerances in small_blas_test.cc (Philipp Hubner)\n#. Documentation corrections (Steve Hsu)\n#. Fixed ``sampled_function.cc`` (Pablo Speciale)\n#. Fix example code in the documentation. (Rodney Hoskinson)\n#. Improve the error handling in Conjugate Gradients.\n#. Improve preconditioner documentation.\n#. Remove dead code from fpclassify.h.\n#. Make Android.mk threads sensitive.\n#. Changed the ``CURRENT_CONFIG_INSTALL_DIR`` to be a variable local\n   to Ceres. (Chris Sweeney)\n#. Fix typo in the comments in ``Jet.h``. (Julius Ziegler)\n#. Add the ASL at ETH Zurich, Theia & OpenPTrack to the list of users.\n#. Fixed a typo in the documentation. (Richard Stebbing)\n#. Fixed a boundary handling bug in the BiCubic interpolation\n   code. (Bernhard Zeisl)\n#. Fixed a ``MSVC`` compilation bug in the cubic interpolation code\n   (Johannes Schönberger)\n#. Add covariance related files to the Android build.\n#. Update Ubuntu 14.04 installation instructions. (Filippo Basso)\n#. Improved logging for linear solver failures.\n#. Improved crash messages in ``Problem``.\n#. Hide Homebrew related variables in CMake GUI.\n#. Add SuiteSparse link dependency for\n   compressed_col_sparse_matrix_utils_test.\n#. Autodetect Homebrew install prefix on OSX.\n#. Lint changes from William Rucklidge and Jim Roseborough.\n#. Remove ``using namespace std:`` from ``port.h``\n#. Add note about glog not currently compiling against gflags 2.1.\n#. Add explicit no sparse linear algebra library available option.\n#. Improve some wording in the FAQ. (Vasily Vylkov)\n#. Delete Incomplete LQ Factorization.\n#. Add a pointer to MacPorts. (Markus Moll)\n\n\n1.10.0\n======\n\nNew Features\n------------\n#. Ceres Solver can now be used to solve general unconstrained\n   optimization problems. See the documentation for\n   ``GradientProblem`` and ``GradientProblemSolver``.\n#. ``Eigen`` can now be as a sparse linear algebra backend. This can\n   be done by setting\n   ``Solver::Options::sparse_linear_algebra_library_type`` to\n   ``EIGEN_SPARSE``. Performance should be comparable to\n   ``CX_SPARSE``.\n\n   .. NOTE::\n\n      Because ``Eigen`` is a header only library, and some of the code\n      related to sparse Cholesky factorization is LGPL, building Ceres\n      with support for Eigen's sparse linear algebra is disabled by\n      default and should be enabled explicitly.\n\n   .. NOTE::\n\n      For good performance, use Eigen version 3.2.2 or later.\n\n#. Added ``EIGEN_SPARSE_QR`` algorithm for covariance estimation using\n   ``Eigen``'s sparse QR factorization. (Michael Vitus)\n#. Faster inner iterations when using multiple threads.\n#. Faster ``ITERATIVE_SCHUR`` + ``SCHUR_JACOBI`` for small to medium\n   sized problems (see documentation for\n   ``Solver::Options::use_explicit_schur_complement``).\n#. Faster automatic Schur ordering.\n#. Reduced memory usage when solving problems with dynamic sparsity.\n#. ``CostFunctionToFunctor`` now supports dynamic number of residuals.\n#. A complete re-write of the problem preprocessing phase.\n#. ``Solver::Summary::FullReport`` now reports the build configuration\n   for Ceres.\n#. When building on Android, the ``NDK`` version detection logic has\n   been improved.\n#. The ``CERES_VERSION`` macro has been improved and replaced with the\n   ``CERES_VERSION_STRING`` macro.\n#. Added ``Solver::Options::IsValid`` which allows users to validate\n   their solver configuration before calling ``Solve``.\n#. Added ``Problem::GetCostFunctionForResidualBlock`` and\n   ``Problem::GetLossFunctionForResidualBlock``.\n#. Added Tukey's loss function. (Michael Vitus)\n#. Added RotationMatrixToQuaternion\n#. Compute & report timing information for line searches.\n#. Autodetect gflags namespace.\n#. Expanded ``more_garbow_hillstrom.cc``.\n#. Added a pointer to Tal Ben-Nun's MSVC wrapper to the docs.\n#. Added the ``<2,3,6>`` Schur template specialization. (Alessandro\n   Dal Grande)\n\nBackward Incompatible API Changes\n---------------------------------\n#. ``NumericDiffFunctor`` has been removed. It's API was broken, and\n   the implementation was an unnecessary layer of abstraction over\n   ``CostFunctionToFunctor``.\n#. ``POLAK_RIBIRERE`` conjugate gradients direction type has been\n   renamed to ``POLAK_RIBIERE``.\n#. ``Solver::Options::solver_log`` has been removed. If needed this\n   iteration callback can easily be implemented in user code.\n#. The ``SPARSE_CHOLESKY`` algorithm for covariance estimation has\n   been removed. It is not rank revealing and numerically poorly\n   behaved. Sparse QR factorization is a much better way to do this.\n#. The ``SPARSE_QR`` algorithm for covariance estimation has been\n   renamed to ``SUITE_SPARSE_QR`` to be consistent with\n   ``EIGEN_SPARSE_QR``.\n#. ``Solver::Summary::preconditioner_type`` has been replaced with\n   ``Solver::Summary::preconditioner_type_given`` and\n   ``Solver::Summary::preconditioner_type_used`` to be more consistent\n   with how information about the linear solver is communicated.\n#. ``CERES_VERSION`` and ``CERES_ABI_VERSION`` macros were not\n   terribly useful. They have been replaced with\n   ``CERES_VERSION_MAJOR``, ``CERES_VERSION_MINOR`` ,\n   ``CERES_VERSION_REVISION`` and ``CERES_VERSION_ABI`` macros. In\n   particular the functionality of ``CERES_VERSION`` is provided by\n   ``CERES_VERSION_STRING`` macro.\n\nBug Fixes\n---------\n#. Do not try the gradient step if TR step line search fails.\n#. Fix missing include in libmv_bundle_adjuster on OSX.\n#. Conditionally log evaluation failure warnings.\n#. Runtime uses four digits after the decimal in Summary:FullReport.\n#. Better options checking for TrustRegionMinimizer.\n#. Fix RotationMatrixToAngleAxis when the angle of rotation is near\n   PI. (Tobias Strauss)\n#. Sometimes gradient norm based convergence would miss a step with a\n   substantial solution quality improvement. (Rodney Hoskinson)\n#. Ignore warnings from within Eigen/SparseQR (3.2.2).\n#. Fix empty Cache HELPSTRING parsing error on OS X 10.10 Yosemite.\n#. Fix a formatting error TrustRegionMinimizer logging.\n#. Add an explicit include for local_parameterization.h (cooordz)\n#. Fix a number of typos in the documentation (Martin Baeuml)\n#. Made the logging in TrustRegionMinimizer consistent with\n   LineSearchMinimizer.\n#. Fix some obsolete documentation in CostFunction::Evaluate.\n#. Fix CG solver options for ITERATIVE_SCHUR, which did not copy\n   min_num_iterations (Johannes Schönberger)\n#. Remove obsolete include of numeric_diff_functor.h. (Martin Baeuml)\n#. Fix max. linear solver iterations in ConjugateGradientsSolver\n   (Johannes Schönberger)\n#. Expand check for lack of a sparse linear algebra library. (Michael\n   Samples and Domink Reitzle)\n#. Fix Eigen Row/ColMajor bug in NumericDiffCostFunction. (Dominik\n   Reitzle)\n#. Fix crash in Covariance if # threads > 1 requested without OpenMP.\n#. Fixed Malformed regex. (Björn Piltz)\n#. Fixed MSVC error C2124: divide or mod by zero. (Björn Piltz)\n#. Add missing #include of <limits> for loss functions.\n#. Make canned loss functions more robust.\n#. Fix type of suppressed compiler warning for Eigen 3.2.0.\n#. Suppress unused variable warning from Eigen 3.2.0.\n#. Add \"make install\" to the install instructions.\n#. Correct formula in documentation of\n   Solver::Options::function_tolerance. (Alessandro Gentilini)\n#. Add release flags to iOS toolchain.\n#. Fix a broken hyperlink in the documentation. (Henrique Mendonca)\n#. Add fixes for multiple definitions of ERROR on Windows to docs.\n#. Compile miniglog into Ceres if enabled on all platforms.\n#. Add two missing files to Android.mk (Greg Coombe)\n#. Fix Cmake error when using miniglog. (Greg Coombe)\n#. Don't build miniglog unconditionally as a static library (Björn\n   Piltz)\n#. Added a missing include. (Björn Piltz)\n#. Conditionally disable SparseNormalCholesky.\n#. Fix a memory leak in program_test.cc.\n\n\n1.9.0\n=====\n\nNew Features\n------------\n#. Bounds constraints: Support for upper and/or lower bounds on\n   parameters when using the trust region minimizer.\n#. Dynamic Sparsity: Problems in which the sparsity structure of the\n   Jacobian changes over the course of the optimization can now be\n   solved much more efficiently. (Richard Stebbing)\n#. Improved support for Microsoft Visual C++ including the ability to\n   build and ship DLLs. (Björn Piltz, Alex Stewart and Sergey\n   Sharybin)\n#. Support for building on iOS 6.0 or higher (Jack Feng).\n#. Autogeneration of config.h that captures all the defines used to\n   build and use Ceres Solver.\n#. Simpler and more informative solver termination type\n   reporting. (See below for more details)\n#. New `website <http://www.ceres-solver.org>`_ based entirely on\n   Sphinx.\n#. ``AutoDiffLocalParameterization`` allows the use of automatic\n   differentiation for defining ``LocalParameterization`` objects\n   (Alex Stewart)\n#. LBFGS is faster due to fewer memory copies.\n#. Parameter blocks are not restricted to be less than 32k in size,\n   they can be up to 2G in size.\n#. Faster ``SPARSE_NORMAL_CHOLESKY`` solver when using ``CX_SPARSE``\n   as the sparse linear algebra library.\n#. Added ``Problem::IsParameterBlockPresent`` and\n   ``Problem::GetParameterization``.\n#. Added the (2,4,9) and (2,4,8) template specializations.\n#. An example demonstrating the use of\n   DynamicAutoDiffCostFunction. (Joydeep Biswas)\n#. Homography estimation example from Blender demonstrating the use of\n   a custom ``IterationCallback``. (Sergey Sharybin)\n#. Support user passing a custom CMAKE_MODULE_PATH (for BLAS /\n   LAPACK).\n\nBackward Incompatible API Changes\n---------------------------------\n#. ``Solver::Options::linear_solver_ordering`` used to be a naked\n   pointer that Ceres took ownership of. This is error prone behaviour\n   which leads to problems when copying the ``Solver::Options`` struct\n   around. This has been replaced with a ``shared_ptr`` to handle\n   ownership correctly across copies.\n\n#. The enum used for reporting the termination/convergence status of\n   the solver has been renamed from ``SolverTerminationType`` to\n   ``TerminationType``.\n\n   The enum values have also changed. ``FUNCTION_TOLERANCE``,\n   ``GRADIENT_TOLERANCE`` and ``PARAMETER_TOLERANCE`` have all been\n   replaced by ``CONVERGENCE``.\n\n   ``NUMERICAL_FAILURE`` has been replaced by ``FAILURE``.\n\n   ``USER_ABORT`` has been renamed to ``USER_FAILURE``.\n\n   Further ``Solver::Summary::error`` has been renamed to\n   ``Solver::Summary::message``. It contains a more detailed\n   explanation for why the solver terminated.\n\n#. ``Solver::Options::gradient_tolerance`` used to be a relative\n   gradient tolerance. i.e., The solver converged when\n\n   .. math:: \\|g(x)\\|_\\infty < \\text{gradient_tolerance} *\n      \\|g(x_0)\\|_\\infty\n\n   where :math:`g(x)` is the gradient of the objective function at\n   :math:`x` and :math:`x_0` is the parmeter vector at the start of\n   the optimization.\n\n   This has changed to an absolute tolerance, i.e. the solver\n   converges when\n\n   .. math:: \\|g(x)\\|_\\infty < \\text{gradient_tolerance}\n\n#. Ceres cannot be built without the line search minimizer\n   anymore. Thus the preprocessor define\n   ``CERES_NO_LINE_SEARCH_MINIMIZER`` has been removed.\n\nBug Fixes\n---------\n#. Disabled warning C4251. (Björn Piltz)\n#. Do not propagate 3d party libs through\n   `IMPORTED_LINK_INTERFACE_LIBRARIES_[DEBUG/RELEASE]` mechanism when\n   building shared libraries. (Björn Piltz)\n#. Fixed errant verbose levels (Björn Piltz)\n#. Variety of code cleanups, optimizations and bug fixes to the line\n   search minimizer code (Alex Stewart)\n#. Fixed ``BlockSparseMatrix::Transpose`` when the matrix has row and\n   column blocks. (Richard Bowen)\n#. Better error checking when ``Problem::RemoveResidualBlock`` is\n   called. (Alex Stewart)\n#. Fixed a memory leak in ``SchurComplementSolver``.\n#. Added ``epsilon()`` method to ``NumTraits<ceres::Jet<T, N>\n   >``. (Filippo Basso)\n#. Fixed a bug in `CompressedRowSparseMatrix::AppendRows`` and\n   ``DeleteRows``.q\n#. Handle empty problems consistently.\n#. Restore the state of the ``Problem`` after a call to\n   ``Problem::Evaluate``. (Stefan Leutenegger)\n#. Better error checking and reporting for linear solvers.\n#. Use explicit formula to solve quadratic polynomials instead of the\n   eigenvalue solver.\n#. Fix constant parameter handling in inner iterations (Mikael\n   Persson).\n#. SuiteSparse errors do not cause a fatal crash anymore.\n#. Fix ``corrector_test.cc``.\n#. Relax the requirements on loss function derivatives.\n#. Minor bugfix to logging.h (Scott Ettinger)\n#. Updated ``gmock`` and ``gtest`` to the latest upstream version.\n#. Fix build breakage on old versions of SuiteSparse.\n#. Fixed build issues related to Clang / LLVM 3.4 (Johannes\n   Schönberger)\n#. METIS_FOUND is never set. Changed the commit to fit the setting of\n   the other #._FOUND definitions. (Andreas Franek)\n#. Variety of bug fixes and cleanups to the ``CMake`` build system\n   (Alex Stewart)\n#. Removed fictitious shared library target from the NDK build.\n#. Solver::Options now uses ``shared_ptr`` to handle ownership of\n   ``Solver::Options::linear_solver_ordering`` and\n   ``Solver::Options::inner_iteration_ordering``. As a consequence the\n   ``NDK`` build now depends on ``libc++`` from the ``LLVM`` project.\n#. Variety of lint cleanups (William Rucklidge & Jim Roseborough)\n#. Various internal cleanups including dead code removal.\n\n\n1.8.0\n=====\n\nNew Features\n------------\n#. Significant improved ``CMake`` files with better robustness,\n   dependency checking and GUI support. (Alex Stewart)\n#. Added ``DynamicNumericDiffCostFunction`` for numerically\n   differentiated cost functions whose sizing is determined at run\n   time.\n#. ``NumericDiffCostFunction`` now supports a dynamic number of\n   residuals just like ``AutoDiffCostFunction``.\n#. ``Problem`` exposes more of its structure in its API.\n#. Faster automatic differentiation (Tim Langlois)\n#. Added the commonly occurring ``2_d_d`` template specialization for\n   the Schur Eliminator.\n#. Faster ``ITERATIVE_SCHUR`` solver using template specializations.\n#. Faster ``SCHUR_JACOBI`` preconditioner construction.\n#. Faster ``AngleAxisRotatePoint``.\n#. Faster Jacobian evaluation when a loss function is used.\n#. Added support for multiple clustering algorithms in visibility\n   based preconditioning, including a new fast single linkage\n   clustering algorithm.\n\nBug Fixes\n---------\n#. Fix ordering of ParseCommandLineFlags() & InitGoogleTest() for\n   Windows. (Alex Stewart)\n#. Remove DCHECK_GE checks from fixed_array.h.\n#. Fix build on MSVC 2013 (Petter Strandmark)\n#. Fixed ``AngleAxisToRotationMatrix`` near zero.\n#. Move ``CERES_HASH_NAMESPACE`` macros to ``collections_port.h``.\n#. Fix handling of unordered_map/unordered_set on OSX 10.9.0.\n#. Explicitly link to libm for ``curve_fitting_c.c``. (Alex Stewart)\n#. Minor type conversion fix to autodiff.h\n#. Remove RuntimeNumericDiffCostFunction.\n#. Fix operator= ambiguity on some versions of Clang. (Alex Stewart)\n#. Various Lint cleanups (William Rucklidge & Jim Roseborough)\n#. Modified installation folders for Windows. (Pablo Speciale)\n#. Added librt to link libraries for SuiteSparse_config on\n   Linux. (Alex Stewart)\n#. Check for presence of return-type-c-linkage option with\n   Clang. (Alex Stewart)\n#. Fix Problem::RemoveParameterBlock after calling solve. (Simon\n   Lynen)\n#. Fix a free/delete bug in covariance_impl.cc\n#. Fix two build errors. (Dustin Lang)\n#. Add RequireInitialization = 1 to NumTraits::Jet.\n#. Update gmock/gtest to 1.7.0\n#. Added IterationSummary::gradient_norm.\n#. Reduced verbosity of the inner iteration minimizer.\n#. Fixed a bug in TrustRegionMinimizer. (Michael Vitus)\n#. Removed android/build_android.sh.\n\n\n1.7.0\n=====\n\nBackward Incompatible API Changes\n---------------------------------\n\n#. ``Solver::Options::sparse_linear_algebra_library`` has been renamed\n   to ``Solver::Options::sparse_linear_algebra_library_type``.\n\nNew Features\n------------\n#. Sparse and dense covariance estimation.\n#. A new Wolfe line search. (Alex Stewart)\n#. ``BFGS`` line search direction. (Alex Stewart)\n#. C API\n#. Speeded up the use of loss functions > 17x.\n#. Faster ``DENSE_QR``, ``DENSE_NORMAL_CHOLESKY`` and ``DENSE_SCHUR``\n   solvers.\n#. Support for multiple dense linear algebra backends. In particular\n   optimized ``BLAS`` and ``LAPACK`` implementations (e.g., Intel MKL,\n   ACML, OpenBLAS etc) can now be used to do the dense linear algebra\n   for ``DENSE_QR``, ``DENSE_NORMAL_CHOLESKY`` and ``DENSE_SCHUR``\n#. Use of Inner iterations can now be adaptively stopped. Iteration\n   and runtime statistics for inner iterations are not reported in\n   ``Solver::Summary`` and ``Solver::Summary::FullReport``.\n#. Improved inner iteration step acceptance criterion.\n#. Add BlockRandomAccessCRSMatrix.\n#. Speeded up automatic differentiation by 7\\%.\n#. Bundle adjustment example from libmv/Blender (Sergey Sharybin)\n#. Shared library building is now controlled by CMake, rather than a\n   custom solution. Previously, Ceres had a custom option, but this is\n   now deprecated in favor of CMake's built in support for switching\n   between static and shared. Turn on BUILD_SHARED_LIBS to get shared\n   Ceres libraries.\n#. No more dependence on Protocol Buffers.\n#. Incomplete LQ factorization.\n#. Ability to write trust region problems to disk.\n#. Add sinh, cosh, tanh and tan functions to automatic differentiation\n   (Johannes Schönberger)\n#. Simplifications to the cmake build file.\n#. ``miniglog`` can now be used as a replacement for ``google-glog``\n   on non Android platforms. (This is NOT recommended).\n\nBug Fixes\n---------\n#. Fix ``ITERATIVE_SCHUR`` solver to work correctly when the schur\n   complement is of size zero. (Soohyun Bae)\n#. Fix the ``spec`` file for generating ``RPM`` packages (Brian Pitts\n   and Taylor Braun-Jones).\n#. Fix how ceres calls CAMD (Manas Jagadev)\n#. Fix breakage on old versions of SuiteSparse. (Fisher Yu)\n#. Fix warning C4373 in Visual Studio (Petter Strandmark)\n#. Fix compilation error caused by missing suitesparse headers and\n   reorganize them to be more robust. (Sergey Sharybin)\n#. Check GCC Version before adding -fast compiler option on\n   OSX. (Steven Lovegrove)\n#. Add documentation for minimizer progress output.\n#. Lint and other cleanups (William Rucklidge and James Roseborough)\n#. Collections port fix for MSC 2008 (Sergey Sharybin)\n#. Various corrections and cleanups in the documentation.\n#. Change the path where CeresConfig.cmake is installed (Pablo\n   Speciale)\n#. Minor errors in documentation (Pablo Speciale)\n#. Updated depend.cmake to follow CMake IF convention. (Joydeep\n   Biswas)\n#. Stabilize the schur ordering algorithm.\n#. Update license header in split.h.\n#. Enabling -O4 (link-time optimization) only if compiler/linker\n   support it. (Alex Stewart)\n#. Consistent glog path across files.\n#. ceres-solver.spec: Use cleaner, more conventional Release string\n   (Taylor Braun-Jones)\n#. Fix compile bug on RHEL6 due to missing header (Taylor Braun-Jones)\n#. CMake file is less verbose.\n#. Use the latest upstream version of google-test and gmock.\n#. Rationalize some of the variable names in ``Solver::Options``.\n#. Improve Summary::FullReport when line search is used.\n#. Expose line search parameters in ``Solver::Options``.\n#. Fix update of L-BFGS history buffers after they become full. (Alex\n   Stewart)\n#. Fix configuration error on systems without SuiteSparse installed\n   (Sergey Sharybin)\n#. Enforce the read call returns correct value in\n   ``curve_fitting_c.c`` (Arnaud Gelas)\n#. Fix DynamicAutoDiffCostFunction (Richard Stebbing)\n#. Fix Problem::RemoveParameterBlock documentation (Johannes\n   Schönberger)\n#. Fix a logging bug in parameter_block.h\n#. Refactor the preconditioner class structure.\n#. Fix an uninitialized variable warning when building with ``GCC``.\n#. Fix a reallocation bug in\n   ``CreateJacobianBlockSparsityTranspose``. (Yuliy Schwartzburg)\n#. Add a define for O_BINARY.\n#. Fix miniglog-based Android NDK build; now works with NDK r9. (Scott\n   Ettinger)\n\n\n1.6.0\n=====\n\nNew Features\n------------\n#. Major Performance improvements.\n\n   a. Schur type solvers (``SPARSE_SCHUR``, ``DENSE_SCHUR``,\n      ``ITERATIVE_SCHUR``) are significantly faster due to custom BLAS\n      routines and fewer heap allocations.\n\n   b. ``SPARSE_SCHUR`` when used with ``CX_SPARSE`` now uses a block\n      AMD for much improved factorization performance.\n\n   c. The jacobian matrix is pre-ordered so that\n      ``SPARSE_NORMAL_CHOLESKY`` and ``SPARSE_SCHUR`` do not have to\n      make copies inside ``CHOLMOD``.\n\n   d. Faster autodiff by replacing division by multplication by inverse.\n\n   e. When compiled without threads, the schur eliminator does not pay\n      the penalty for locking and unlocking mutexes.\n\n#. Users can now use ``linear_solver_ordering`` to affect the\n   fill-reducing ordering used by ``SUITE_SPARSE`` for\n   ``SPARSE_NORMAL_CHOLESKY``.\n#. ``Problem`` can now report the set of parameter blocks it knows about.\n#. ``TrustRegionMinimizer`` uses the evaluator to compute the gradient\n   instead of a matrix vector multiply.\n#. On ``Mac OS``, whole program optimization is enabled.\n#. Users can now use automatic differentiation to define new\n   ``LocalParameterization`` objects. (Sergey Sharybin)\n#. Enable larger tuple sizes for Visual Studio 2012. (Petter Strandmark)\n\n\nBug Fixes\n---------\n\n#. Update the documentation for ``CostFunction``.\n#. Fixed a typo in the documentation. (Pablo Speciale)\n#. Fix a typo in suitesparse.cc.\n#. Bugfix in ``NumericDiffCostFunction``. (Nicolas Brodu)\n#. Death to BlockSparseMatrixBase.\n#. Change Minimizer::Options::min_trust_region_radius to double.\n#. Update to compile with stricter gcc checks. (Joydeep Biswas)\n#. Do not modify cached CMAKE_CXX_FLAGS_RELEASE. (Sergey Sharybin)\n#. ``<iterator>`` needed for back_insert_iterator. (Petter Strandmark)\n#. Lint cleanup. (William Rucklidge)\n#. Documentation corrections. (Pablo Speciale)\n\n\n1.5.0\n=====\n\nBackward Incompatible API Changes\n---------------------------------\n#. Added ``Problem::Evaluate``. Now you can evaluate a problem or any\n   part of it without calling the solver.\n\n   In light of this the following settings have been deprecated and\n   removed from the API.\n\n   - ``Solver::Options::return_initial_residuals``\n   - ``Solver::Options::return_initial_gradient``\n   - ``Solver::Options::return_initial_jacobian``\n   - ``Solver::Options::return_final_residuals``\n   - ``Solver::Options::return_final_gradient``\n   - ``Solver::Options::return_final_jacobian``\n\n   Instead we recommend using something like this.\n\n   .. code-block:: c++\n\n     Problem problem;\n     // Build problem\n\n     vector<double> initial_residuals;\n     problem.Evaluate(Problem::EvaluateOptions(),\n                      NULL, /* No cost */\n                      &initial_residuals,\n                      NULL, /* No gradient */\n                      NULL  /* No jacobian */ );\n\n     Solver::Options options;\n     Solver::Summary summary;\n     Solver::Solve(options, &problem, &summary);\n\n     vector<double> final_residuals;\n     problem.Evaluate(Problem::EvaluateOptions(),\n                      NULL, /* No cost */\n                      &final_residuals,\n                      NULL, /* No gradient */\n                      NULL  /* No jacobian */ );\n\n\nNew Features\n------------\n#. Problem now supports removal of ParameterBlocks and\n   ResidualBlocks. There is a space/time tradeoff in doing this which\n   is controlled by\n   ``Problem::Options::enable_fast_parameter_block_removal``.\n\n#. Ceres now supports Line search based optimization algorithms in\n   addition to trust region algorithms. Currently there is support for\n   gradient descent, non-linear conjugate gradient and LBFGS search\n   directions.\n#. Added ``Problem::Evaluate``. Now you can evaluate a problem or any\n   part of it without calling the solver. In light of this the\n   following settings have been deprecated and removed from the API.\n\n   - ``Solver::Options::return_initial_residuals``\n   - ``Solver::Options::return_initial_gradient``\n   - ``Solver::Options::return_initial_jacobian``\n   - ``Solver::Options::return_final_residuals``\n   - ``Solver::Options::return_final_gradient``\n   - ``Solver::Options::return_final_jacobian``\n\n#. New, much improved HTML documentation using Sphinx.\n#. Changed ``NumericDiffCostFunction`` to take functors like\n   ``AutoDiffCostFunction``.\n#. Added support for mixing automatic, analytic and numeric\n   differentiation. This is done by adding ``CostFunctionToFunctor``\n   and ``NumericDiffFunctor`` objects to the API.\n#. Sped up the robust loss function correction logic when residual is\n   one dimensional.\n#. Sped up ``DenseQRSolver`` by changing the way dense jacobians are\n   stored. This is a 200-500% improvement in linear solver performance\n   depending on the size of the problem.\n#. ``DENSE_SCHUR`` now supports multi-threading.\n#. Greatly expanded ``Summary::FullReport``:\n\n   - Report the ordering used by the ``LinearSolver``.\n   - Report the ordering used by the inner iterations.\n   - Execution timing breakdown into evaluations and linear solves.\n   - Effective size of the problem solved by the solver, which now\n     accounts for the size of the tangent space when using a\n     ``LocalParameterization``.\n#. Ceres when run at the ``VLOG`` level 3 or higher will report\n   detailed timing information about its internals.\n#. Remove extraneous initial and final residual evaluations. This\n   speeds up the solver a bit.\n#. Automatic differenatiation with a dynamic number of parameter\n   blocks. (Based on an idea by Thad Hughes).\n#. Sped up problem construction and destruction.\n#. Added matrix adapters to ``rotation.h`` so that the rotation matrix\n   routines can work with row and column major matrices. (Markus Moll)\n#. ``SCHUR_JACOBI`` can now be used without ``SuiteSparse``.\n#. A ``.spec`` file for producing RPMs. (Taylor Braun-Jones)\n#. ``CMake`` can now build the sphinx documentation (Pablo Speciale)\n#. Add support for creating a CMake config file during build to make\n   embedding Ceres in other CMake-using projects easier. (Pablo\n   Speciale).\n#. Better error reporting in ``Problem`` for missing parameter blocks.\n#. A more flexible ``Android.mk`` and a more modular build. If binary\n   size and/or compile time is a concern, larger parts of the solver\n   can be disabled at compile time.\n\nBug Fixes\n---------\n#. Compilation fixes for MSVC2010 (Sergey Sharybin)\n#. Fixed \"deprecated conversion from string constant to char*\"\n   warnings. (Pablo Speciale)\n#. Correctly propagate ifdefs when building without Schur eliminator\n   template specializations.\n#. Correct handling of ``LIB_SUFFIX`` on Linux. (Yuliy Schwartzburg).\n#. Code and signature cleanup in ``rotation.h``.\n#. Make examples independent of internal code.\n#. Disable unused member in ``gtest`` which results in build error on\n   OS X with latest Xcode. (Taylor Braun-Jones)\n#. Pass the correct flags to the linker when using\n   ``pthreads``. (Taylor Braun-Jones)\n#. Only use ``cmake28`` macro when building on RHEL6. (Taylor\n   Braun-Jones)\n#. Remove ``-Wno-return-type-c-linkage`` when compiling with\n   GCC. (Taylor Braun-Jones)\n#. Fix ``No previous prototype`` warnings. (Sergey Sharybin)\n#. MinGW build fixes. (Sergey Sharybin)\n#. Lots of minor code and lint fixes. (William Rucklidge)\n#. Fixed a bug in ``solver_impl.cc`` residual evaluation. (Markus\n   Moll)\n#. Fixed variadic evaluation bug in ``AutoDiff``.\n#. Fixed ``SolverImpl`` tests.\n#. Fixed a bug in ``DenseSparseMatrix::ToDenseMatrix()``.\n#. Fixed an initialization bug in ``ProgramEvaluator``.\n#. Fixes to Android.mk paths (Carlos Hernandez)\n#. Modify ``nist.cc`` to compute accuracy based on ground truth\n   solution rather than the ground truth function value.\n#. Fixed a memory leak in ``cxsparse.cc``. (Alexander Mordvintsev).\n#. Fixed the install directory for libraries by correctly handling\n   ``LIB_SUFFIX``. (Taylor Braun-Jones)\n\n1.4.0\n=====\n\nBackward Incompatible API Changes\n---------------------------------\nThe new ordering API breaks existing code. Here the common case fixes.\n\n**Before**\n\n.. code-block:: c++\n\n options.linear_solver_type = ceres::DENSE_SCHUR\n options.ordering_type = ceres::SCHUR\n\n**After**\n\n\n.. code-block:: c++\n\n  options.linear_solver_type = ceres::DENSE_SCHUR\n\n\n**Before**\n\n.. code-block:: c++\n\n options.linear_solver_type = ceres::DENSE_SCHUR;\n options.ordering_type = ceres::USER;\n for (int i = 0; i < num_points; ++i) {\n   options.ordering.push_back(my_points[i])\n }\n for (int i = 0; i < num_cameras; ++i) {\n   options.ordering.push_back(my_cameras[i])\n }\n options.num_eliminate_blocks = num_points;\n\n\n**After**\n\n.. code-block:: c++\n\n options.linear_solver_type = ceres::DENSE_SCHUR;\n options.ordering = new ceres::ParameterBlockOrdering;\n for (int i = 0; i < num_points; ++i) {\n   options.linear_solver_ordering->AddElementToGroup(my_points[i], 0);\n }\n for (int i = 0; i < num_cameras; ++i) {\n   options.linear_solver_ordering->AddElementToGroup(my_cameras[i], 1);\n }\n\n\nNew Features\n------------\n#. A new richer, more expressive and consistent API for ordering\n   parameter blocks.\n#. A non-linear generalization of Ruhe & Wedin's Algorithm II. This\n   allows the user to use variable projection on separable and\n   non-separable non-linear least squares problems. With\n   multithreading, this results in significant improvements to the\n   convergence behavior of the solver at a small increase in run time.\n#. An image denoising example using fields of experts. (Petter\n   Strandmark)\n#. Defines for Ceres version and ABI version.\n#. Higher precision timer code where available. (Petter Strandmark)\n#. Example Makefile for users of Ceres.\n#. IterationSummary now informs the user when the step is a\n   non-monotonic step.\n#. Fewer memory allocations when using ``DenseQRSolver``.\n#. GradientChecker for testing CostFunctions (William Rucklidge)\n#. Add support for cost functions with 10 parameter blocks in\n   ``Problem``. (Fisher)\n#. Add support for 10 parameter blocks in ``AutoDiffCostFunction``.\n\n\nBug Fixes\n---------\n\n#. static cast to force Eigen::Index to long conversion\n#. Change LOG(ERROR) to LOG(WARNING) in ``schur_complement_solver.cc``.\n#. Remove verbose logging from ``DenseQRSolve``.\n#. Fix the Android NDK build.\n#. Better handling of empty and constant Problems.\n#. Remove an internal header that was leaking into the public API.\n#. Memory leak in ``trust_region_minimizer.cc``\n#. Schur ordering was operating on the wrong object (Ricardo Martin)\n#. MSVC fixes (Petter Strandmark)\n#. Various fixes to ``nist.cc`` (Markus Moll)\n#. Fixed a jacobian scaling bug.\n#. Numerically robust computation of ``model_cost_change``.\n#. Signed comparison compiler warning fixes (Ricardo Martin)\n#. Various compiler warning fixes all over.\n#. Inclusion guard fixes (Petter Strandmark)\n#. Segfault in test code (Sergey Popov)\n#. Replaced ``EXPECT/ASSERT_DEATH`` with the more portable\n   ``EXPECT_DEATH_IF_SUPPORTED`` macros.\n#. Fixed the camera projection model in Ceres' implementation of\n   Snavely's camera model. (Ricardo Martin)\n\n\n1.3.0\n=====\n\nNew Features\n------------\n#. Android Port (Scott Ettinger also contributed to the port)\n#. Windows port. (Changchang Wu and Pierre Moulon also contributed to the port)\n#. New subspace Dogleg Solver. (Markus Moll)\n#. Trust region algorithm now supports the option of non-monotonic steps.\n#. New loss functions ``ArcTanLossFunction``, ``TolerantLossFunction``\n   and ``ComposedLossFunction``. (James Roseborough).\n#. New ``DENSE_NORMAL_CHOLESKY`` linear solver, which uses Eigen's\n   LDLT factorization on the normal equations.\n#. Cached symbolic factorization when using ``CXSparse``.\n   (Petter Strandark)\n#. New example ``nist.cc`` and data from the NIST non-linear\n   regression test suite. (Thanks to Douglas Bates for suggesting this.)\n#. The traditional Dogleg solver now uses an elliptical trust\n   region (Markus Moll)\n#. Support for returning initial and final gradients & Jacobians.\n#. Gradient computation support in the evaluators, with an eye\n   towards developing first order/gradient based solvers.\n#. A better way to compute ``Solver::Summary::fixed_cost``. (Markus Moll)\n#. ``CMake`` support for building documentation, separate examples,\n   installing and uninstalling the library and Gerrit hooks (Arnaud\n   Gelas)\n#. ``SuiteSparse4`` support (Markus Moll)\n#. Support for building Ceres without ``TR1`` (This leads to\n   slightly slower ``DENSE_SCHUR`` and ``SPARSE_SCHUR`` solvers).\n#. ``BALProblem`` can now write a problem back to disk.\n#. ``bundle_adjuster`` now allows the user to normalize and perturb the\n   problem before solving.\n#. Solver progress logging to file.\n#. Added ``Program::ToString`` and ``ParameterBlock::ToString`` to\n   help with debugging.\n#. Ability to build Ceres as a shared library (MacOS and Linux only),\n   associated versioning and build release script changes.\n#. Portable floating point classification API.\n\n\nBug Fixes\n---------\n#. Fix how invalid step evaluations are handled.\n#. Change the slop handling around zero for model cost changes to use\n   relative tolerances rather than absolute tolerances.\n#. Fix an inadvertant integer to bool conversion. (Petter Strandmark)\n#. Do not link to ``libgomp`` when building on\n   windows. (Petter Strandmark)\n#. Include ``gflags.h`` in ``test_utils.cc``. (Petter\n   Strandmark)\n#. Use standard random number generation routines. (Petter Strandmark)\n#. ``TrustRegionMinimizer`` does not implicitly negate the\n   steps that it takes. (Markus Moll)\n#. Diagonal scaling allows for equal upper and lower bounds. (Markus Moll)\n#. TrustRegionStrategy does not misuse LinearSolver:Summary anymore.\n#. Fix Eigen3 Row/Column Major storage issue. (Lena Gieseke)\n#. QuaternionToAngleAxis now guarantees an angle in $[-\\pi, \\pi]$. (Guoxuan Zhang)\n#. Added a workaround for a compiler bug in the Android NDK to the\n   Schur eliminator.\n#. The sparse linear algebra library is only logged in\n   Summary::FullReport if it is used.\n#. Rename the macro ``CERES_DONT_HAVE_PROTOCOL_BUFFERS``\n   to ``CERES_NO_PROTOCOL_BUFFERS`` for consistency.\n#. Fix how static structure detection for the Schur eliminator logs\n   its results.\n#. Correct example code in the documentation. (Petter Strandmark)\n#. Fix ``fpclassify.h`` to work with the Android NDK and STLport.\n#. Fix a memory leak in the ``levenber_marquardt_strategy_test.cc``\n#. Fix an early return bug in the Dogleg solver. (Markus Moll)\n#. Zero initialize Jets.\n#. Moved ``internal/ceres/mock_log.h`` to ``internal/ceres/gmock/mock-log.h``\n#. Unified file path handling in tests.\n#. ``data_fitting.cc`` includes ``gflags``\n#. Renamed Ceres' Mutex class and associated macros to avoid\n   namespace conflicts.\n#. Close the BAL problem file after reading it (Markus Moll)\n#. Fix IsInfinite on Jets.\n#. Drop alignment requirements for Jets.\n#. Fixed Jet to integer comparison. (Keith Leung)\n#. Fix use of uninitialized arrays. (Sebastian Koch & Markus Moll)\n#. Conditionally compile gflag dependencies.(Casey Goodlett)\n#. Add ``data_fitting.cc`` to the examples ``CMake`` file.\n\n\n1.2.3\n=====\n\nBug Fixes\n---------\n#. ``suitesparse_test`` is enabled even when ``-DSUITESPARSE=OFF``.\n#. ``FixedArray`` internal struct did not respect ``Eigen``\n   alignment requirements (Koichi Akabe & Stephan Kassemeyer).\n#. Fixed ``quadratic.cc`` documentation and code mismatch\n   (Nick Lewycky).\n\n1.2.2\n=====\n\nBug Fixes\n---------\n#. Fix constant parameter blocks, and other minor fixes (Markus Moll)\n#. Fix alignment issues when combining ``Jet`` and\n   ``FixedArray`` in automatic differeniation.\n#. Remove obsolete ``build_defs`` file.\n\n1.2.1\n=====\n\nNew Features\n------------\n#. Powell's Dogleg solver\n#. Documentation now has a brief overview of Trust Region methods and\n   how the Levenberg-Marquardt and Dogleg methods work.\n\nBug Fixes\n---------\n#. Destructor for ``TrustRegionStrategy`` was not virtual (Markus\n   Moll)\n#. Invalid ``DCHECK`` in ``suitesparse.cc`` (Markus Moll)\n#. Iteration callbacks were not properly invoked (Luis Alberto\n   Zarrabeiti)\n#. Logging level changes in ConjugateGradientsSolver\n#. VisibilityBasedPreconditioner setup does not account for skipped\n   camera pairs. This was debugging code.\n#. Enable SSE support on MacOS\n#. ``system_test`` was taking too long and too much memory (Koichi\n   Akabe)\n\n1.2.0\n=====\n\nNew Features\n------------\n\n#. ``CXSparse`` support.\n#. Block oriented fill reducing orderings. This reduces the\n   factorization time for sparse ``CHOLMOD`` significantly.\n#. New Trust region loop with support for multiple trust region step\n   strategies. Currently only Levenberg-Marquardt is supported, but\n   this refactoring opens the door for Dog-leg, Stiehaug and others.\n#. ``CMake`` file restructuring.  Builds in ``Release`` mode by   default, and now has platform specific tuning flags.\n#. Re-organized documentation. No new content, but better\n   organization.\n\n\nBug Fixes\n---------\n\n#. Fixed integer overflow bug in ``block_random_access_sparse_matrix.cc``.\n#. Renamed some macros to prevent name conflicts.\n#. Fixed incorrect input to ``StateUpdatingCallback``.\n#. Fixes to AutoDiff tests.\n#. Various internal cleanups.\n\n\n1.1.1\n=====\n\nBug Fixes\n---------\n#. Fix a bug in the handling of constant blocks. (Louis Simard)\n#. Add an optional lower bound to the Levenberg-Marquardt regularizer\n   to prevent oscillating between well and ill posed linear problems.\n#. Some internal refactoring and test fixes.\n\n1.1.0\n=====\n\nNew Features\n------------\n#. New iterative linear solver for general sparse problems - ``CGNR``\n   and a block Jacobi preconditioner for it.\n#. Changed the semantics of how ``SuiteSparse`` dependencies are\n   checked and used. Now ``SuiteSparse`` is built by default, only if\n   all of its dependencies are present.\n#. Automatic differentiation now supports dynamic number of residuals.\n#. Support for writing the linear least squares problems to disk in\n   text format so that they can loaded into ``MATLAB``.\n#. Linear solver results are now checked for nan and infinities.\n#. Added ``.gitignore`` file.\n#. A better more robust build system.\n\n\nBug Fixes\n---------\n#. Fixed a strict weak ordering bug in the schur ordering.\n#. Grammar and typos in the documents and code comments.\n#. Fixed tests which depended on exact equality between floating point\n   values.\n\n1.0.0\n=====\nInitial open source release. Nathan Wiegand contributed to the Mac OSX\nport.\n\n\nOrigins\n=======\n\nCeres Solver grew out of the need for general least squares solving at\nGoogle. In early 2010, Sameer Agarwal and Fredrik Schaffalitzky\nstarted the development of Ceres Solver. Fredrik left Google shortly\nthereafter and Keir Mierle stepped in to take his place. After two\nyears of on-and-off development, Ceres Solver was released as open\nsource in May of 2012.\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/autodiff_cost_function.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Create CostFunctions as needed by the least squares framework, with\n// Jacobians computed via automatic differentiation. For more\n// information on automatic differentiation, see the wikipedia article\n// at http://en.wikipedia.org/wiki/Automatic_differentiation\n//\n// To get an auto differentiated cost function, you must define a class with a\n// templated operator() (a functor) that computes the cost function in terms of\n// the template parameter T. The autodiff framework substitutes appropriate\n// \"jet\" objects for T in order to compute the derivative when necessary, but\n// this is hidden, and you should write the function as if T were a scalar type\n// (e.g. a double-precision floating point number).\n//\n// The function must write the computed value in the last argument\n// (the only non-const one) and return true to indicate\n// success. Please see cost_function.h for details on how the return\n// value maybe used to impose simple constraints on the parameter\n// block.\n//\n// For example, consider a scalar error e = k - x'y, where both x and y are\n// two-dimensional column vector parameters, the prime sign indicates\n// transposition, and k is a constant. The form of this error, which is the\n// difference between a constant and an expression, is a common pattern in least\n// squares problems. For example, the value x'y might be the model expectation\n// for a series of measurements, where there is an instance of the cost function\n// for each measurement k.\n//\n// The actual cost added to the total problem is e^2, or (k - x'k)^2; however,\n// the squaring is implicitly done by the optimization framework.\n//\n// To write an auto-differentiable cost function for the above model, first\n// define the object\n//\n//   class MyScalarCostFunctor {\n//     MyScalarCostFunctor(double k): k_(k) {}\n//\n//     template <typename T>\n//     bool operator()(const T* const x , const T* const y, T* e) const {\n//       e[0] = T(k_) - x[0] * y[0] + x[1] * y[1];\n//       return true;\n//     }\n//\n//    private:\n//     double k_;\n//   };\n//\n// Note that in the declaration of operator() the input parameters x and y come\n// first, and are passed as const pointers to arrays of T. If there were three\n// input parameters, then the third input parameter would come after y. The\n// output is always the last parameter, and is also a pointer to an array. In\n// the example above, e is a scalar, so only e[0] is set.\n//\n// Then given this class definition, the auto differentiated cost function for\n// it can be constructed as follows.\n//\n//   CostFunction* cost_function\n//       = new AutoDiffCostFunction<MyScalarCostFunctor, 1, 2, 2>(\n//            new MyScalarCostFunctor(1.0));             ^  ^  ^\n//                                                       |  |  |\n//                            Dimension of residual -----+  |  |\n//                            Dimension of x ---------------+  |\n//                            Dimension of y ------------------+\n//\n// In this example, there is usually an instance for each measurement of k.\n//\n// In the instantiation above, the template parameters following\n// \"MyScalarCostFunctor\", \"1, 2, 2\", describe the functor as computing a\n// 1-dimensional output from two arguments, both 2-dimensional.\n//\n// AutoDiffCostFunction also supports cost functions with a\n// runtime-determined number of residuals. For example:\n//\n//   CostFunction* cost_function\n//       = new AutoDiffCostFunction<MyScalarCostFunctor, DYNAMIC, 2, 2>(\n//           new CostFunctorWithDynamicNumResiduals(1.0),   ^     ^  ^\n//           runtime_number_of_residuals); <----+           |     |  |\n//                                              |           |     |  |\n//                                              |           |     |  |\n//             Actual number of residuals ------+           |     |  |\n//             Indicate dynamic number of residuals --------+     |  |\n//             Dimension of x ------------------------------------+  |\n//             Dimension of y ---------------------------------------+\n//\n// WARNING #1: Since the functor will get instantiated with different types for\n// T, you must convert from other numeric types to T before mixing\n// computations with other variables of type T. In the example above, this is\n// seen where instead of using k_ directly, k_ is wrapped with T(k_).\n//\n// WARNING #2: A common beginner's error when first using autodiff cost\n// functions is to get the sizing wrong. In particular, there is a tendency to\n// set the template parameters to (dimension of residual, number of parameters)\n// instead of passing a dimension parameter for *every parameter*. In the\n// example above, that would be <MyScalarCostFunctor, 1, 2>, which is missing\n// the last '2' argument. Please be careful when setting the size parameters.\n\n#ifndef CERES_PUBLIC_AUTODIFF_COST_FUNCTION_H_\n#define CERES_PUBLIC_AUTODIFF_COST_FUNCTION_H_\n\n#include <memory>\n\n#include \"ceres/internal/autodiff.h\"\n#include \"ceres/sized_cost_function.h\"\n#include \"ceres/types.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\n\n// A cost function which computes the derivative of the cost with respect to\n// the parameters (a.k.a. the jacobian) using an auto differentiation framework.\n// The first template argument is the functor object, described in the header\n// comment. The second argument is the dimension of the residual (or\n// ceres::DYNAMIC to indicate it will be set at runtime), and subsequent\n// arguments describe the size of the Nth parameter, one per parameter.\n//\n// The constructors take ownership of the cost functor.\n//\n// If the number of residuals (argument kNumResiduals below) is\n// ceres::DYNAMIC, then the two-argument constructor must be used. The\n// second constructor takes a number of residuals (in addition to the\n// templated number of residuals). This allows for varying the number\n// of residuals for a single autodiff cost function at runtime.\ntemplate <typename CostFunctor,\n          int kNumResiduals,  // Number of residuals, or ceres::DYNAMIC.\n          int... Ns>          // Number of parameters in each parameter block.\nclass AutoDiffCostFunction : public SizedCostFunction<kNumResiduals, Ns...> {\n public:\n  // Takes ownership of functor. Uses the template-provided value for the\n  // number of residuals (\"kNumResiduals\").\n  explicit AutoDiffCostFunction(CostFunctor* functor) : functor_(functor) {\n    static_assert(kNumResiduals != DYNAMIC,\n                  \"Can't run the fixed-size constructor if the number of \"\n                  \"residuals is set to ceres::DYNAMIC.\");\n  }\n\n  // Takes ownership of functor. Ignores the template-provided\n  // kNumResiduals in favor of the \"num_residuals\" argument provided.\n  //\n  // This allows for having autodiff cost functions which return varying\n  // numbers of residuals at runtime.\n  AutoDiffCostFunction(CostFunctor* functor, int num_residuals)\n      : functor_(functor) {\n    static_assert(kNumResiduals == DYNAMIC,\n                  \"Can't run the dynamic-size constructor if the number of \"\n                  \"residuals is not ceres::DYNAMIC.\");\n    SizedCostFunction<kNumResiduals, Ns...>::set_num_residuals(num_residuals);\n  }\n\n  virtual ~AutoDiffCostFunction() {}\n\n  // Implementation details follow; clients of the autodiff cost function should\n  // not have to examine below here.\n  //\n  // To handle variadic cost functions, some template magic is needed. It's\n  // mostly hidden inside autodiff.h.\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const override {\n    using ParameterDims =\n        typename SizedCostFunction<kNumResiduals, Ns...>::ParameterDims;\n\n    if (!jacobians) {\n      return internal::VariadicEvaluate<ParameterDims>(\n          *functor_, parameters, residuals);\n    }\n    return internal::AutoDifferentiate<kNumResiduals, ParameterDims>(\n        *functor_,\n        parameters,\n        SizedCostFunction<kNumResiduals, Ns...>::num_residuals(),\n        residuals,\n        jacobians);\n  };\n\n private:\n  std::unique_ptr<CostFunctor> functor_;\n};\n\n}  // namespace ceres\n\n#endif  // CERES_PUBLIC_AUTODIFF_COST_FUNCTION_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/autodiff_first_order_function.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_PUBLIC_AUTODIFF_FIRST_ORDER_FUNCTION_H_\n#define CERES_PUBLIC_AUTODIFF_FIRST_ORDER_FUNCTION_H_\n\n#include <memory>\n\n#include \"ceres/first_order_function.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/internal/fixed_array.h\"\n#include \"ceres/jet.h\"\n#include \"ceres/types.h\"\n\nnamespace ceres {\n\n// Create FirstOrderFunctions as needed by the GradientProblem\n// framework, with gradients computed via automatic\n// differentiation. For more information on automatic differentiation,\n// see the wikipedia article at\n// http://en.wikipedia.org/wiki/Automatic_differentiation\n//\n// To get an auto differentiated function, you must define a class\n// with a templated operator() (a functor) that computes the cost\n// function in terms of the template parameter T. The autodiff\n// framework substitutes appropriate \"jet\" objects for T in order to\n// compute the derivative when necessary, but this is hidden, and you\n// should write the function as if T were a scalar type (e.g. a\n// double-precision floating point number).\n//\n// The function must write the computed value in the last argument\n// (the only non-const one) and return true to indicate\n// success.\n//\n// For example, consider a scalar error e = x'y - a, where both x and y are\n// two-dimensional column vector parameters, the prime sign indicates\n// transposition, and a is a constant.\n//\n// To write an auto-differentiable FirstOrderFunction for the above model, first\n// define the object\n//\n//  class QuadraticCostFunctor {\n//   public:\n//    explicit QuadraticCostFunctor(double a) : a_(a) {}\n//    template <typename T>\n//    bool operator()(const T* const xy, T* cost) const {\n//      const T* const x = xy;\n//      const T* const y = xy + 2;\n//      *cost = x[0] * y[0] + x[1] * y[1] - T(a_);\n//      return true;\n//    }\n//\n//   private:\n//    double a_;\n//  };\n//\n// Note that in the declaration of operator() the input parameters xy come\n// first, and are passed as const pointers to arrays of T. The\n// output is the last parameter.\n//\n// Then given this class definition, the auto differentiated FirstOrderFunction\n// for it can be constructed as follows.\n//\n//    FirstOrderFunction* function =\n//      new AutoDiffFirstOrderFunction<QuadraticCostFunctor, 4>(\n//          new QuadraticCostFunctor(1.0)));\n//\n// In the instantiation above, the template parameters following\n// \"QuadraticCostFunctor\", \"4\", describe the functor as computing a\n// 1-dimensional output from a four dimensional vector.\n//\n// WARNING: Since the functor will get instantiated with different types for\n// T, you must convert from other numeric types to T before mixing\n// computations with other variables of type T. In the example above, this is\n// seen where instead of using a_ directly, a_ is wrapped with T(a_).\n\ntemplate <typename FirstOrderFunctor, int kNumParameters>\nclass AutoDiffFirstOrderFunction : public FirstOrderFunction {\n public:\n  // Takes ownership of functor.\n  explicit AutoDiffFirstOrderFunction(FirstOrderFunctor* functor)\n      : functor_(functor) {\n    static_assert(kNumParameters > 0, \"kNumParameters must be positive\");\n  }\n\n  virtual ~AutoDiffFirstOrderFunction() {}\n\n  bool Evaluate(const double* const parameters,\n                double* cost,\n                double* gradient) const override {\n    if (gradient == nullptr) {\n      return (*functor_)(parameters, cost);\n    }\n\n    typedef Jet<double, kNumParameters> JetT;\n    internal::FixedArray<JetT, (256 * 7) / sizeof(JetT)> x(kNumParameters);\n    for (int i = 0; i < kNumParameters; ++i) {\n      x[i].a = parameters[i];\n      x[i].v.setZero();\n      x[i].v[i] = 1.0;\n    }\n\n    JetT output;\n    output.a = kImpossibleValue;\n    output.v.setConstant(kImpossibleValue);\n\n    if (!(*functor_)(x.data(), &output)) {\n      return false;\n    }\n\n    *cost = output.a;\n    VectorRef(gradient, kNumParameters) = output.v;\n    return true;\n  }\n\n  int NumParameters() const override { return kNumParameters; }\n\n private:\n  std::unique_ptr<FirstOrderFunctor> functor_;\n};\n\n}  // namespace ceres\n\n#endif  // CERES_PUBLIC_AUTODIFF_FIRST_ORDER_FUNCTION_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/autodiff_local_parameterization.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sergey.vfx@gmail.com (Sergey Sharybin)\n//         mierle@gmail.com (Keir Mierle)\n//         sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_PUBLIC_AUTODIFF_LOCAL_PARAMETERIZATION_H_\n#define CERES_PUBLIC_AUTODIFF_LOCAL_PARAMETERIZATION_H_\n\n#include <memory>\n\n#include \"ceres/internal/autodiff.h\"\n#include \"ceres/local_parameterization.h\"\n\nnamespace ceres {\n\n// Create local parameterization with Jacobians computed via automatic\n// differentiation. For more information on local parameterizations,\n// see include/ceres/local_parameterization.h\n//\n// To get an auto differentiated local parameterization, you must define\n// a class with a templated operator() (a functor) that computes\n//\n//   x_plus_delta = Plus(x, delta);\n//\n// the template parameter T. The autodiff framework substitutes appropriate\n// \"Jet\" objects for T in order to compute the derivative when necessary, but\n// this is hidden, and you should write the function as if T were a scalar type\n// (e.g. a double-precision floating point number).\n//\n// The function must write the computed value in the last argument (the only\n// non-const one) and return true to indicate success.\n//\n// For example, Quaternions have a three dimensional local\n// parameterization. It's plus operation can be implemented as (taken\n// from internal/ceres/auto_diff_local_parameterization_test.cc)\n//\n//   struct QuaternionPlus {\n//     template<typename T>\n//     bool operator()(const T* x, const T* delta, T* x_plus_delta) const {\n//       const T squared_norm_delta =\n//           delta[0] * delta[0] + delta[1] * delta[1] + delta[2] * delta[2];\n//\n//       T q_delta[4];\n//       if (squared_norm_delta > T(0.0)) {\n//         T norm_delta = sqrt(squared_norm_delta);\n//         const T sin_delta_by_delta = sin(norm_delta) / norm_delta;\n//         q_delta[0] = cos(norm_delta);\n//         q_delta[1] = sin_delta_by_delta * delta[0];\n//         q_delta[2] = sin_delta_by_delta * delta[1];\n//         q_delta[3] = sin_delta_by_delta * delta[2];\n//       } else {\n//         // We do not just use q_delta = [1,0,0,0] here because that is a\n//         // constant and when used for automatic differentiation will\n//         // lead to a zero derivative. Instead we take a first order\n//         // approximation and evaluate it at zero.\n//         q_delta[0] = T(1.0);\n//         q_delta[1] = delta[0];\n//         q_delta[2] = delta[1];\n//         q_delta[3] = delta[2];\n//       }\n//\n//       QuaternionProduct(q_delta, x, x_plus_delta);\n//       return true;\n//     }\n//   };\n//\n// Then given this struct, the auto differentiated local\n// parameterization can now be constructed as\n//\n//   LocalParameterization* local_parameterization =\n//     new AutoDiffLocalParameterization<QuaternionPlus, 4, 3>;\n//                                                       |  |\n//                            Global Size ---------------+  |\n//                            Local Size -------------------+\n//\n// WARNING: Since the functor will get instantiated with different types for\n// T, you must to convert from other numeric types to T before mixing\n// computations with other variables of type T. In the example above, this is\n// seen where instead of using k_ directly, k_ is wrapped with T(k_).\n\ntemplate <typename Functor, int kGlobalSize, int kLocalSize>\nclass AutoDiffLocalParameterization : public LocalParameterization {\n public:\n  AutoDiffLocalParameterization() : functor_(new Functor()) {}\n\n  // Takes ownership of functor.\n  explicit AutoDiffLocalParameterization(Functor* functor)\n      : functor_(functor) {}\n\n  virtual ~AutoDiffLocalParameterization() {}\n  bool Plus(const double* x,\n            const double* delta,\n            double* x_plus_delta) const override {\n    return (*functor_)(x, delta, x_plus_delta);\n  }\n\n  bool ComputeJacobian(const double* x, double* jacobian) const override {\n    double zero_delta[kLocalSize];\n    for (int i = 0; i < kLocalSize; ++i) {\n      zero_delta[i] = 0.0;\n    }\n\n    double x_plus_delta[kGlobalSize];\n    for (int i = 0; i < kGlobalSize; ++i) {\n      x_plus_delta[i] = 0.0;\n    }\n\n    const double* parameter_ptrs[2] = {x, zero_delta};\n    double* jacobian_ptrs[2] = {NULL, jacobian};\n    return internal::AutoDifferentiate<\n        kGlobalSize,\n        internal::StaticParameterDims<kGlobalSize, kLocalSize>>(\n        *functor_, parameter_ptrs, kGlobalSize, x_plus_delta, jacobian_ptrs);\n  }\n\n  int GlobalSize() const override { return kGlobalSize; }\n  int LocalSize() const override { return kLocalSize; }\n\n private:\n  std::unique_ptr<Functor> functor_;\n};\n\n}  // namespace ceres\n\n#endif  // CERES_PUBLIC_AUTODIFF_LOCAL_PARAMETERIZATION_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/c_api.h",
    "content": "/* Ceres Solver - A fast non-linear least squares minimizer\n * Copyright 2019 Google Inc. All rights reserved.\n * http://ceres-solver.org/\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * - Redistributions of source code must retain the above copyright notice,\n *   this list of conditions and the following disclaimer.\n * - Redistributions in binary form must reproduce the above copyright notice,\n *   this list of conditions and the following disclaimer in the documentation\n *   and/or other materials provided with the distribution.\n * - Neither the name of Google Inc. nor the names of its contributors may be\n *   used to endorse or promote products derived from this software without\n *   specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *\n * Author: mierle@gmail.com (Keir Mierle)\n *\n * A minimal C API for Ceres. Not all functionality is included. This API is\n * not intended for clients of Ceres, but is instead intended for easing the\n * process of binding Ceres to other languages.\n *\n * Currently this is a work in progress.\n */\n\n#ifndef CERES_PUBLIC_C_API_H_\n#define CERES_PUBLIC_C_API_H_\n\n#include \"ceres/internal/port.h\"\n#include \"ceres/internal/disable_warnings.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Init the Ceres private data. Must be called before anything else. */\nCERES_EXPORT void ceres_init();\n\n/* Equivalent to CostFunction::Evaluate() in the C++ API.\n *\n * The user may keep private information inside the opaque user_data object.\n * The pointer here is the same one passed in the ceres_add_residual_block().\n */\ntypedef int (*ceres_cost_function_t)(void* user_data,\n                                     double** parameters,\n                                     double* residuals,\n                                     double** jacobians);\n\n/* Equivalent to LossFunction::Evaluate() from the C++ API. */\ntypedef void (*ceres_loss_function_t)(void* user_data,\n                                      double squared_norm,\n                                      double out[3]);\n\n/* Create callback data for Ceres' stock loss functions.\n *\n * Ceres has several loss functions available by default, and these functions\n * expose those to the C API. To use the stock loss functions, call\n * ceres_create_*_loss_data(), which internally creates an instance of one of\n * the stock loss functions (for example ceres::CauchyLoss), and pass the\n * returned \"loss_function_data\" along with the ceres_stock_loss_function to\n * ceres_add_residual_block().\n *\n * For example:\n *\n *   void* cauchy_loss_function_data =\n *       ceres_create_cauchy_loss_function_data(1.2, 0.0);\n *   ceres_problem_add_residual_block(\n *       problem,\n *       my_cost_function,\n *       my_cost_function_data,\n *       ceres_stock_loss_function,\n *       cauchy_loss_function_data,\n *       1,\n *       2,\n *       parameter_sizes,\n *       parameter_pointers);\n *    ...\n *    ceres_free_stock_loss_function_data(cauchy_loss_function_data);\n *\n * See loss_function.h for the details of each loss function.\n */\nCERES_EXPORT void* ceres_create_huber_loss_function_data(double a);\nCERES_EXPORT void* ceres_create_softl1_loss_function_data(double a);\nCERES_EXPORT void* ceres_create_cauchy_loss_function_data(double a);\nCERES_EXPORT void* ceres_create_arctan_loss_function_data(double a);\nCERES_EXPORT void* ceres_create_tolerant_loss_function_data(double a, double b);\n\n/* Free the given stock loss function data. */\nCERES_EXPORT void ceres_free_stock_loss_function_data(void* loss_function_data);\n\n/* This is an implementation of ceres_loss_function_t contained within Ceres\n * itself, intended as a way to access the various stock Ceres loss functions\n * from the C API. This should be passed to ceres_add_residual() below, in\n * combination with a user_data pointer generated by\n * ceres_create_stock_loss_function() above. */\nCERES_EXPORT void ceres_stock_loss_function(void* user_data,\n                                            double squared_norm,\n                                            double out[3]);\n\n/* Equivalent to Problem from the C++ API. */\nstruct ceres_problem_s;\ntypedef struct ceres_problem_s ceres_problem_t;\n\nstruct ceres_residual_block_id_s;\ntypedef struct ceres_residual_block_id_s ceres_residual_block_id_t;\n\n/* Create and destroy a problem */\n/* TODO(keir): Add options for the problem. */\nCERES_EXPORT ceres_problem_t* ceres_create_problem();\nCERES_EXPORT void ceres_free_problem(ceres_problem_t* problem);\n\n/* Add a residual block. */\nCERES_EXPORT ceres_residual_block_id_t* ceres_problem_add_residual_block(\n    ceres_problem_t* problem,\n    ceres_cost_function_t cost_function,\n    void* cost_function_data,\n    ceres_loss_function_t loss_function,\n    void* loss_function_data,\n    int num_residuals,\n    int num_parameter_blocks,\n    int* parameter_block_sizes,\n    double** parameters);\n\nCERES_EXPORT void ceres_solve(ceres_problem_t* problem);\n\n/* TODO(keir): Figure out a way to pass a config in. */\n\n#ifdef __cplusplus\n}\n#endif\n\n#include \"ceres/internal/reenable_warnings.h\"\n\n#endif /* CERES_PUBLIC_C_API_H_ */\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/ceres.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n//\n// This is a forwarding header containing the public symbols exported from\n// Ceres. Anything in the \"ceres\" namespace is available for use.\n\n#ifndef CERES_PUBLIC_CERES_H_\n#define CERES_PUBLIC_CERES_H_\n\n#include \"ceres/autodiff_cost_function.h\"\n#include \"ceres/autodiff_local_parameterization.h\"\n#include \"ceres/conditioned_cost_function.h\"\n#include \"ceres/context.h\"\n#include \"ceres/cost_function.h\"\n#include \"ceres/cost_function_to_functor.h\"\n#include \"ceres/covariance.h\"\n#include \"ceres/crs_matrix.h\"\n#include \"ceres/dynamic_autodiff_cost_function.h\"\n#include \"ceres/dynamic_cost_function.h\"\n#include \"ceres/dynamic_cost_function_to_functor.h\"\n#include \"ceres/dynamic_numeric_diff_cost_function.h\"\n#include \"ceres/evaluation_callback.h\"\n#include \"ceres/gradient_checker.h\"\n#include \"ceres/gradient_problem.h\"\n#include \"ceres/gradient_problem_solver.h\"\n#include \"ceres/iteration_callback.h\"\n#include \"ceres/jet.h\"\n#include \"ceres/local_parameterization.h\"\n#include \"ceres/loss_function.h\"\n#include \"ceres/numeric_diff_cost_function.h\"\n#include \"ceres/numeric_diff_options.h\"\n#include \"ceres/ordered_groups.h\"\n#include \"ceres/problem.h\"\n#include \"ceres/sized_cost_function.h\"\n#include \"ceres/solver.h\"\n#include \"ceres/types.h\"\n#include \"ceres/version.h\"\n\n#endif  // CERES_PUBLIC_CERES_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/conditioned_cost_function.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: wjr@google.com (William Rucklidge)\n//\n// This file contains a cost function that can apply a transformation to\n// each residual value before they are square-summed.\n\n#ifndef CERES_PUBLIC_CONDITIONED_COST_FUNCTION_H_\n#define CERES_PUBLIC_CONDITIONED_COST_FUNCTION_H_\n\n#include <memory>\n#include <vector>\n\n#include \"ceres/cost_function.h\"\n#include \"ceres/internal/disable_warnings.h\"\n#include \"ceres/types.h\"\n\nnamespace ceres {\n\n// This class allows you to apply different conditioning to the residual\n// values of a wrapped cost function. An example where this is useful is\n// where you have an existing cost function that produces N values, but you\n// want the total cost to be something other than just the sum of these\n// squared values - maybe you want to apply a different scaling to some\n// values, to change their contribution to the cost.\n//\n// Usage:\n//\n//   // my_cost_function produces N residuals\n//   CostFunction* my_cost_function = ...\n//   CHECK_EQ(N, my_cost_function->num_residuals());\n//   vector<CostFunction*> conditioners;\n//\n//   // Make N 1x1 cost functions (1 parameter, 1 residual)\n//   CostFunction* f_1 = ...\n//   conditioners.push_back(f_1);\n//   ...\n//   CostFunction* f_N = ...\n//   conditioners.push_back(f_N);\n//   ConditionedCostFunction* ccf =\n//     new ConditionedCostFunction(my_cost_function, conditioners);\n//\n// Now ccf's residual i (i=0..N-1) will be passed though the i'th conditioner.\n//\n//   ccf_residual[i] = f_i(my_cost_function_residual[i])\n//\n// and the Jacobian will be affected appropriately.\nclass CERES_EXPORT ConditionedCostFunction : public CostFunction {\n public:\n  // Builds a cost function based on a wrapped cost function, and a\n  // per-residual conditioner. Takes ownership of all of the wrapped cost\n  // functions, or not, depending on the ownership parameter. Conditioners\n  // may be NULL, in which case the corresponding residual is not modified.\n  //\n  // The conditioners can repeat.\n  ConditionedCostFunction(CostFunction* wrapped_cost_function,\n                          const std::vector<CostFunction*>& conditioners,\n                          Ownership ownership);\n  virtual ~ConditionedCostFunction();\n\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const override;\n\n private:\n  std::unique_ptr<CostFunction> wrapped_cost_function_;\n  std::vector<CostFunction*> conditioners_;\n  Ownership ownership_;\n};\n\n}  // namespace ceres\n\n#include \"ceres/internal/reenable_warnings.h\"\n\n#endif  // CERES_PUBLIC_CONDITIONED_COST_FUNCTION_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/context.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: vitus@google.com (Michael Vitus)\n\n#ifndef CERES_PUBLIC_CONTEXT_H_\n#define CERES_PUBLIC_CONTEXT_H_\n\nnamespace ceres {\n\n// A global context for processing data in Ceres.  This provides a mechanism to\n// allow Ceres to reuse items that are expensive to create between multiple\n// calls; for example, thread pools.  The same Context can be used on multiple\n// Problems, either serially or in parallel. When using it with multiple\n// Problems at the same time, they may end up contending for resources\n// (e.g. threads) managed by the Context.\nclass Context {\n public:\n  Context() {}\n  Context(const Context&) = delete;\n  void operator=(const Context&) = delete;\n\n  virtual ~Context() {}\n\n  // Creates a context object and the caller takes ownership.\n  static Context* Create();\n};\n\n}  // namespace ceres\n\n#endif  // CERES_PUBLIC_CONTEXT_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/cost_function.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//         keir@google.m (Keir Mierle)\n//\n// This is the interface through which the least squares solver accesses the\n// residual and Jacobian of the least squares problem. Users are expected to\n// subclass CostFunction to define their own terms in the least squares problem.\n//\n// It is recommended that users define templated residual functors for use as\n// arguments for AutoDiffCostFunction (see autodiff_cost_function.h), instead of\n// directly implementing the CostFunction interface. This often results in both\n// shorter code and faster execution than hand-coded derivatives. However,\n// specialized cases may demand direct implementation of the lower-level\n// CostFunction interface; for example, this is true when calling legacy code\n// which is not templated on numeric types.\n\n#ifndef CERES_PUBLIC_COST_FUNCTION_H_\n#define CERES_PUBLIC_COST_FUNCTION_H_\n\n#include <cstdint>\n#include <vector>\n\n#include \"ceres/internal/disable_warnings.h\"\n#include \"ceres/internal/port.h\"\n\nnamespace ceres {\n\n// This class implements the computation of the cost (a.k.a. residual) terms as\n// a function of the input (control) variables, and is the interface for users\n// to describe their least squares problem to Ceres. In other words, this is the\n// modeling layer between users and the Ceres optimizer. The signature of the\n// function (number and sizes of input parameter blocks and number of outputs)\n// is stored in parameter_block_sizes_ and num_residuals_ respectively. User\n// code inheriting from this class is expected to set these two members with the\n// corresponding accessors. This information will be verified by the Problem\n// when added with AddResidualBlock().\nclass CERES_EXPORT CostFunction {\n public:\n  CostFunction() : num_residuals_(0) {}\n  CostFunction(const CostFunction&) = delete;\n  void operator=(const CostFunction&) = delete;\n\n  virtual ~CostFunction() {}\n\n  // Inputs:\n  //\n  // parameters is an array of pointers to arrays containing the\n  // various parameter blocks. parameters has the same number of\n  // elements as parameter_block_sizes_.  Parameter blocks are in the\n  // same order as parameter_block_sizes_.i.e.,\n  //\n  //   parameters_[i] = double[parameter_block_sizes_[i]]\n  //\n  // Outputs:\n  //\n  // residuals is an array of size num_residuals_.\n  //\n  // jacobians is an array of size parameter_block_sizes_ containing\n  // pointers to storage for jacobian blocks corresponding to each\n  // parameter block. Jacobian blocks are in the same order as\n  // parameter_block_sizes, i.e. jacobians[i], is an\n  // array that contains num_residuals_* parameter_block_sizes_[i]\n  // elements. Each jacobian block is stored in row-major order, i.e.,\n  //\n  //   jacobians[i][r*parameter_block_size_[i] + c] =\n  //                              d residual[r] / d parameters[i][c]\n  //\n  // If jacobians is NULL, then no derivatives are returned; this is\n  // the case when computing cost only. If jacobians[i] is NULL, then\n  // the jacobian block corresponding to the i'th parameter block must\n  // not to be returned.\n  //\n  // The return value indicates whether the computation of the\n  // residuals and/or jacobians was successful or not.\n  //\n  // This can be used to communicate numerical failures in jacobian\n  // computations for instance.\n  //\n  // A more interesting and common use is to impose constraints on the\n  // parameters. If the initial values of the parameter blocks satisfy\n  // the constraints, then returning false whenever the constraints\n  // are not satisfied will prevent the solver from moving into the\n  // infeasible region. This is not a very sophisticated mechanism for\n  // enforcing constraints, but is often good enough.\n  //\n  // Note that it is important that the initial values of the\n  // parameter block must be feasible, otherwise the solver will\n  // declare a numerical problem at iteration 0.\n  virtual bool Evaluate(double const* const* parameters,\n                        double* residuals,\n                        double** jacobians) const = 0;\n\n  const std::vector<int32_t>& parameter_block_sizes() const {\n    return parameter_block_sizes_;\n  }\n\n  int num_residuals() const { return num_residuals_; }\n\n protected:\n  std::vector<int32_t>* mutable_parameter_block_sizes() {\n    return &parameter_block_sizes_;\n  }\n\n  void set_num_residuals(int num_residuals) { num_residuals_ = num_residuals; }\n\n private:\n  // Cost function signature metadata: number of inputs & their sizes,\n  // number of outputs (residuals).\n  std::vector<int32_t> parameter_block_sizes_;\n  int num_residuals_;\n};\n\n}  // namespace ceres\n\n#include \"ceres/internal/reenable_warnings.h\"\n\n#endif  // CERES_PUBLIC_COST_FUNCTION_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/cost_function_to_functor.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// CostFunctionToFunctor is an adapter class that allows users to use\n// SizedCostFunction objects in templated functors which are to be used for\n// automatic differentiation. This allows the user to seamlessly mix\n// analytic, numeric and automatic differentiation.\n//\n// For example, let us assume that\n//\n//  class IntrinsicProjection : public SizedCostFunction<2, 5, 3> {\n//    public:\n//      IntrinsicProjection(const double* observation);\n//      bool Evaluate(double const* const* parameters,\n//                    double* residuals,\n//                    double** jacobians) const override;\n//  };\n//\n// is a cost function that implements the projection of a point in its\n// local coordinate system onto its image plane and subtracts it from\n// the observed point projection. It can compute its residual and\n// jacobians either via analytic or numerical differentiation.\n//\n// Now we would like to compose the action of this CostFunction with\n// the action of camera extrinsics, i.e., rotation and\n// translation. Say we have a templated function\n//\n//   template<typename T>\n//   void RotateAndTranslatePoint(const T* rotation,\n//                                const T* translation,\n//                                const T* point,\n//                                T* result);\n//\n// Then we can now do the following,\n//\n// struct CameraProjection {\n//   CameraProjection(const double* observation)\n//       : intrinsic_projection_(new IntrinsicProjection(observation)) {\n//   }\n//   template <typename T>\n//   bool operator()(const T* rotation,\n//                   const T* translation,\n//                   const T* intrinsics,\n//                   const T* point,\n//                   T* residual) const {\n//     T transformed_point[3];\n//     RotateAndTranslatePoint(rotation, translation, point, transformed_point);\n//\n//     // Note that we call intrinsic_projection_, just like it was\n//     // any other templated functor.\n//\n//     return intrinsic_projection_(intrinsics, transformed_point, residual);\n//   }\n//\n//  private:\n//   CostFunctionToFunctor<2,5,3> intrinsic_projection_;\n// };\n\n#ifndef CERES_PUBLIC_COST_FUNCTION_TO_FUNCTOR_H_\n#define CERES_PUBLIC_COST_FUNCTION_TO_FUNCTOR_H_\n\n#include <cstdint>\n#include <numeric>\n#include <tuple>\n#include <vector>\n\n#include \"ceres/cost_function.h\"\n#include \"ceres/dynamic_cost_function_to_functor.h\"\n#include \"ceres/internal/fixed_array.h\"\n#include \"ceres/internal/integer_sequence.h\"\n#include \"ceres/internal/parameter_dims.h\"\n#include \"ceres/internal/port.h\"\n#include \"ceres/types.h\"\n\nnamespace ceres {\n\ntemplate <int kNumResiduals, int... Ns>\nclass CostFunctionToFunctor {\n public:\n  // Takes ownership of cost_function.\n  explicit CostFunctionToFunctor(CostFunction* cost_function)\n      : cost_functor_(cost_function) {\n    CHECK(cost_function != nullptr);\n    CHECK(kNumResiduals > 0 || kNumResiduals == DYNAMIC);\n\n    const std::vector<int32_t>& parameter_block_sizes =\n        cost_function->parameter_block_sizes();\n    const int num_parameter_blocks = ParameterDims::kNumParameterBlocks;\n    CHECK_EQ(static_cast<int>(parameter_block_sizes.size()),\n             num_parameter_blocks);\n\n    if (parameter_block_sizes.size() == num_parameter_blocks) {\n      for (int block = 0; block < num_parameter_blocks; ++block) {\n        CHECK_EQ(ParameterDims::GetDim(block), parameter_block_sizes[block])\n            << \"Parameter block size missmatch. The specified static parameter \"\n               \"block dimension does not match the one from the cost function.\";\n      }\n    }\n\n    CHECK_EQ(accumulate(\n                 parameter_block_sizes.begin(), parameter_block_sizes.end(), 0),\n             ParameterDims::kNumParameters);\n  }\n\n  template <typename T, typename... Ts>\n  bool operator()(const T* p1, Ts*... ps) const {\n    // Add one because of residual block.\n    static_assert(sizeof...(Ts) + 1 == ParameterDims::kNumParameterBlocks + 1,\n                  \"Invalid number of parameter blocks specified.\");\n\n    auto params = std::make_tuple(p1, ps...);\n\n    // Extract residual pointer from params. The residual pointer is the\n    // last pointer.\n    constexpr int kResidualIndex = ParameterDims::kNumParameterBlocks;\n    T* residuals = std::get<kResidualIndex>(params);\n\n    // Extract parameter block pointers from params.\n    using Indices =\n        internal::make_integer_sequence<int,\n                                        ParameterDims::kNumParameterBlocks>;\n    std::array<const T*, ParameterDims::kNumParameterBlocks> parameter_blocks =\n        GetParameterPointers<T>(params, Indices());\n\n    return cost_functor_(parameter_blocks.data(), residuals);\n  }\n\n private:\n  using ParameterDims = internal::StaticParameterDims<Ns...>;\n\n  template <typename T, typename Tuple, int... Indices>\n  static std::array<const T*, ParameterDims::kNumParameterBlocks>\n  GetParameterPointers(const Tuple& paramPointers,\n                       internal::integer_sequence<int, Indices...>) {\n    return std::array<const T*, ParameterDims::kNumParameterBlocks>{\n        {std::get<Indices>(paramPointers)...}};\n  }\n\n  DynamicCostFunctionToFunctor cost_functor_;\n};\n\n}  // namespace ceres\n\n#endif  // CERES_PUBLIC_COST_FUNCTION_TO_FUNCTOR_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/covariance.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_PUBLIC_COVARIANCE_H_\n#define CERES_PUBLIC_COVARIANCE_H_\n\n#include <memory>\n#include <utility>\n#include <vector>\n\n#include \"ceres/internal/disable_warnings.h\"\n#include \"ceres/internal/port.h\"\n#include \"ceres/types.h\"\n\nnamespace ceres {\n\nclass Problem;\n\nnamespace internal {\nclass CovarianceImpl;\n}  // namespace internal\n\n// WARNING\n// =======\n// It is very easy to use this class incorrectly without understanding\n// the underlying mathematics. Please read and understand the\n// documentation completely before attempting to use this class.\n//\n//\n// This class allows the user to evaluate the covariance for a\n// non-linear least squares problem and provides random access to its\n// blocks\n//\n// Background\n// ==========\n// One way to assess the quality of the solution returned by a\n// non-linear least squares solver is to analyze the covariance of the\n// solution.\n//\n// Let us consider the non-linear regression problem\n//\n//   y = f(x) + N(0, I)\n//\n// i.e., the observation y is a random non-linear function of the\n// independent variable x with mean f(x) and identity covariance. Then\n// the maximum likelihood estimate of x given observations y is the\n// solution to the non-linear least squares problem:\n//\n//  x* = arg min_x |f(x)|^2\n//\n// And the covariance of x* is given by\n//\n//  C(x*) = inverse[J'(x*)J(x*)]\n//\n// Here J(x*) is the Jacobian of f at x*. The above formula assumes\n// that J(x*) has full column rank.\n//\n// If J(x*) is rank deficient, then the covariance matrix C(x*) is\n// also rank deficient and is given by\n//\n//  C(x*) =  pseudoinverse[J'(x*)J(x*)]\n//\n// Note that in the above, we assumed that the covariance\n// matrix for y was identity. This is an important assumption. If this\n// is not the case and we have\n//\n//  y = f(x) + N(0, S)\n//\n// Where S is a positive semi-definite matrix denoting the covariance\n// of y, then the maximum likelihood problem to be solved is\n//\n//  x* = arg min_x f'(x) inverse[S] f(x)\n//\n// and the corresponding covariance estimate of x* is given by\n//\n//  C(x*) = inverse[J'(x*) inverse[S] J(x*)]\n//\n// So, if it is the case that the observations being fitted to have a\n// covariance matrix not equal to identity, then it is the user's\n// responsibility that the corresponding cost functions are correctly\n// scaled, e.g. in the above case the cost function for this problem\n// should evaluate S^{-1/2} f(x) instead of just f(x), where S^{-1/2}\n// is the inverse square root of the covariance matrix S.\n//\n// This class allows the user to evaluate the covariance for a\n// non-linear least squares problem and provides random access to its\n// blocks. The computation assumes that the CostFunctions compute\n// residuals such that their covariance is identity.\n//\n// Since the computation of the covariance matrix requires computing\n// the inverse of a potentially large matrix, this can involve a\n// rather large amount of time and memory. However, it is usually the\n// case that the user is only interested in a small part of the\n// covariance matrix. Quite often just the block diagonal. This class\n// allows the user to specify the parts of the covariance matrix that\n// she is interested in and then uses this information to only compute\n// and store those parts of the covariance matrix.\n//\n// Rank of the Jacobian\n// --------------------\n// As we noted above, if the jacobian is rank deficient, then the\n// inverse of J'J is not defined and instead a pseudo inverse needs to\n// be computed.\n//\n// The rank deficiency in J can be structural -- columns which are\n// always known to be zero or numerical -- depending on the exact\n// values in the Jacobian.\n//\n// Structural rank deficiency occurs when the problem contains\n// parameter blocks that are constant. This class correctly handles\n// structural rank deficiency like that.\n//\n// Numerical rank deficiency, where the rank of the matrix cannot be\n// predicted by its sparsity structure and requires looking at its\n// numerical values is more complicated. Here again there are two\n// cases.\n//\n//   a. The rank deficiency arises from overparameterization. e.g., a\n//   four dimensional quaternion used to parameterize SO(3), which is\n//   a three dimensional manifold. In cases like this, the user should\n//   use an appropriate LocalParameterization. Not only will this lead\n//   to better numerical behaviour of the Solver, it will also expose\n//   the rank deficiency to the Covariance object so that it can\n//   handle it correctly.\n//\n//   b. More general numerical rank deficiency in the Jacobian\n//   requires the computation of the so called Singular Value\n//   Decomposition (SVD) of J'J. We do not know how to do this for\n//   large sparse matrices efficiently. For small and moderate sized\n//   problems this is done using dense linear algebra.\n//\n// Gauge Invariance\n// ----------------\n// In structure from motion (3D reconstruction) problems, the\n// reconstruction is ambiguous up to a similarity transform. This is\n// known as a Gauge Ambiguity. Handling Gauges correctly requires the\n// use of SVD or custom inversion algorithms. For small problems the\n// user can use the dense algorithm. For more details see\n//\n// Ken-ichi Kanatani, Daniel D. Morris: Gauges and gauge\n// transformations for uncertainty description of geometric structure\n// with indeterminacy. IEEE Transactions on Information Theory 47(5):\n// 2017-2028 (2001)\n//\n// Example Usage\n// =============\n//\n//  double x[3];\n//  double y[2];\n//\n//  Problem problem;\n//  problem.AddParameterBlock(x, 3);\n//  problem.AddParameterBlock(y, 2);\n//  <Build Problem>\n//  <Solve Problem>\n//\n//  Covariance::Options options;\n//  Covariance covariance(options);\n//\n//  std::vector<std::pair<const double*, const double*>> covariance_blocks;\n//  covariance_blocks.push_back(make_pair(x, x));\n//  covariance_blocks.push_back(make_pair(y, y));\n//  covariance_blocks.push_back(make_pair(x, y));\n//\n//  CHECK(covariance.Compute(covariance_blocks, &problem));\n//\n//  double covariance_xx[3 * 3];\n//  double covariance_yy[2 * 2];\n//  double covariance_xy[3 * 2];\n//  covariance.GetCovarianceBlock(x, x, covariance_xx)\n//  covariance.GetCovarianceBlock(y, y, covariance_yy)\n//  covariance.GetCovarianceBlock(x, y, covariance_xy)\n//\nclass CERES_EXPORT Covariance {\n public:\n  struct CERES_EXPORT Options {\n    // Sparse linear algebra library to use when a sparse matrix\n    // factorization is being used to compute the covariance matrix.\n    //\n    // Currently this only applies to SPARSE_QR.\n    SparseLinearAlgebraLibraryType sparse_linear_algebra_library_type =\n#if !defined(CERES_NO_SUITESPARSE)\n        SUITE_SPARSE;\n#else\n        // Eigen's QR factorization is always available.\n        EIGEN_SPARSE;\n#endif\n\n    // Ceres supports two different algorithms for covariance\n    // estimation, which represent different tradeoffs in speed,\n    // accuracy and reliability.\n    //\n    // 1. DENSE_SVD uses Eigen's JacobiSVD to perform the\n    //    computations. It computes the singular value decomposition\n    //\n    //      U * S * V' = J\n    //\n    //    and then uses it to compute the pseudo inverse of J'J as\n    //\n    //      pseudoinverse[J'J]^ = V * pseudoinverse[S] * V'\n    //\n    //    It is an accurate but slow method and should only be used\n    //    for small to moderate sized problems. It can handle\n    //    full-rank as well as rank deficient Jacobians.\n    //\n    // 2. SPARSE_QR uses the sparse QR factorization algorithm\n    //    to compute the decomposition\n    //\n    //      Q * R = J\n    //\n    //    [J'J]^-1 = [R*R']^-1\n    //\n    // SPARSE_QR is not capable of computing the covariance if the\n    // Jacobian is rank deficient. Depending on the value of\n    // Covariance::Options::sparse_linear_algebra_library_type, either\n    // Eigen's Sparse QR factorization algorithm will be used or\n    // SuiteSparse's high performance SuiteSparseQR algorithm will be\n    // used.\n    CovarianceAlgorithmType algorithm_type = SPARSE_QR;\n\n    // If the Jacobian matrix is near singular, then inverting J'J\n    // will result in unreliable results, e.g, if\n    //\n    //   J = [1.0 1.0         ]\n    //       [1.0 1.0000001   ]\n    //\n    // which is essentially a rank deficient matrix, we have\n    //\n    //   inv(J'J) = [ 2.0471e+14  -2.0471e+14]\n    //              [-2.0471e+14   2.0471e+14]\n    //\n    // This is not a useful result. Therefore, by default\n    // Covariance::Compute will return false if a rank deficient\n    // Jacobian is encountered. How rank deficiency is detected\n    // depends on the algorithm being used.\n    //\n    // 1. DENSE_SVD\n    //\n    //      min_sigma / max_sigma < sqrt(min_reciprocal_condition_number)\n    //\n    //    where min_sigma and max_sigma are the minimum and maxiumum\n    //    singular values of J respectively.\n    //\n    // 2. SPARSE_QR\n    //\n    //      rank(J) < num_col(J)\n    //\n    //   Here rank(J) is the estimate of the rank of J returned by the\n    //   sparse QR factorization algorithm. It is a fairly reliable\n    //   indication of rank deficiency.\n    //\n    double min_reciprocal_condition_number = 1e-14;\n\n    // When using DENSE_SVD, the user has more control in dealing with\n    // singular and near singular covariance matrices.\n    //\n    // As mentioned above, when the covariance matrix is near\n    // singular, instead of computing the inverse of J'J, the\n    // Moore-Penrose pseudoinverse of J'J should be computed.\n    //\n    // If J'J has the eigen decomposition (lambda_i, e_i), where\n    // lambda_i is the i^th eigenvalue and e_i is the corresponding\n    // eigenvector, then the inverse of J'J is\n    //\n    //   inverse[J'J] = sum_i e_i e_i' / lambda_i\n    //\n    // and computing the pseudo inverse involves dropping terms from\n    // this sum that correspond to small eigenvalues.\n    //\n    // How terms are dropped is controlled by\n    // min_reciprocal_condition_number and null_space_rank.\n    //\n    // If null_space_rank is non-negative, then the smallest\n    // null_space_rank eigenvalue/eigenvectors are dropped\n    // irrespective of the magnitude of lambda_i. If the ratio of the\n    // smallest non-zero eigenvalue to the largest eigenvalue in the\n    // truncated matrix is still below\n    // min_reciprocal_condition_number, then the Covariance::Compute()\n    // will fail and return false.\n    //\n    // Setting null_space_rank = -1 drops all terms for which\n    //\n    //   lambda_i / lambda_max < min_reciprocal_condition_number.\n    //\n    // This option has no effect on the SUITE_SPARSE_QR and\n    // EIGEN_SPARSE_QR algorithms.\n    int null_space_rank = 0;\n\n    int num_threads = 1;\n\n    // Even though the residual blocks in the problem may contain loss\n    // functions, setting apply_loss_function to false will turn off\n    // the application of the loss function to the output of the cost\n    // function and in turn its effect on the covariance.\n    //\n    // TODO(sameergaarwal): Expand this based on Jim's experiments.\n    bool apply_loss_function = true;\n  };\n\n  explicit Covariance(const Options& options);\n  ~Covariance();\n\n  // Compute a part of the covariance matrix.\n  //\n  // The vector covariance_blocks, indexes into the covariance matrix\n  // block-wise using pairs of parameter blocks. This allows the\n  // covariance estimation algorithm to only compute and store these\n  // blocks.\n  //\n  // Since the covariance matrix is symmetric, if the user passes\n  // (block1, block2), then GetCovarianceBlock can be called with\n  // block1, block2 as well as block2, block1.\n  //\n  // covariance_blocks cannot contain duplicates. Bad things will\n  // happen if they do.\n  //\n  // Note that the list of covariance_blocks is only used to determine\n  // what parts of the covariance matrix are computed. The full\n  // Jacobian is used to do the computation, i.e. they do not have an\n  // impact on what part of the Jacobian is used for computation.\n  //\n  // The return value indicates the success or failure of the\n  // covariance computation. Please see the documentation for\n  // Covariance::Options for more on the conditions under which this\n  // function returns false.\n  bool Compute(const std::vector<std::pair<const double*, const double*>>&\n                   covariance_blocks,\n               Problem* problem);\n\n  // Compute a part of the covariance matrix.\n  //\n  // The vector parameter_blocks contains the parameter blocks that\n  // are used for computing the covariance matrix. From this vector\n  // all covariance pairs are generated. This allows the covariance\n  // estimation algorithm to only compute and store these blocks.\n  //\n  // parameter_blocks cannot contain duplicates. Bad things will\n  // happen if they do.\n  //\n  // Note that the list of covariance_blocks is only used to determine\n  // what parts of the covariance matrix are computed. The full\n  // Jacobian is used to do the computation, i.e. they do not have an\n  // impact on what part of the Jacobian is used for computation.\n  //\n  // The return value indicates the success or failure of the\n  // covariance computation. Please see the documentation for\n  // Covariance::Options for more on the conditions under which this\n  // function returns false.\n  bool Compute(const std::vector<const double*>& parameter_blocks,\n               Problem* problem);\n\n  // Return the block of the cross-covariance matrix corresponding to\n  // parameter_block1 and parameter_block2.\n  //\n  // Compute must be called before the first call to\n  // GetCovarianceBlock and the pair <parameter_block1,\n  // parameter_block2> OR the pair <parameter_block2,\n  // parameter_block1> must have been present in the vector\n  // covariance_blocks when Compute was called. Otherwise\n  // GetCovarianceBlock will return false.\n  //\n  // covariance_block must point to a memory location that can store a\n  // parameter_block1_size x parameter_block2_size matrix. The\n  // returned covariance will be a row-major matrix.\n  bool GetCovarianceBlock(const double* parameter_block1,\n                          const double* parameter_block2,\n                          double* covariance_block) const;\n\n  // Return the block of the cross-covariance matrix corresponding to\n  // parameter_block1 and parameter_block2.\n  // Returns cross-covariance in the tangent space if a local\n  // parameterization is associated with either parameter block;\n  // else returns cross-covariance in the ambient space.\n  //\n  // Compute must be called before the first call to\n  // GetCovarianceBlock and the pair <parameter_block1,\n  // parameter_block2> OR the pair <parameter_block2,\n  // parameter_block1> must have been present in the vector\n  // covariance_blocks when Compute was called. Otherwise\n  // GetCovarianceBlock will return false.\n  //\n  // covariance_block must point to a memory location that can store a\n  // parameter_block1_local_size x parameter_block2_local_size matrix. The\n  // returned covariance will be a row-major matrix.\n  bool GetCovarianceBlockInTangentSpace(const double* parameter_block1,\n                                        const double* parameter_block2,\n                                        double* covariance_block) const;\n\n  // Return the covariance matrix corresponding to all parameter_blocks.\n  //\n  // Compute must be called before calling GetCovarianceMatrix and all\n  // parameter_blocks must have been present in the vector\n  // parameter_blocks when Compute was called. Otherwise\n  // GetCovarianceMatrix returns false.\n  //\n  // covariance_matrix must point to a memory location that can store\n  // the size of the covariance matrix. The covariance matrix will be\n  // a square matrix whose row and column count is equal to the sum of\n  // the sizes of the individual parameter blocks. The covariance\n  // matrix will be a row-major matrix.\n  bool GetCovarianceMatrix(const std::vector<const double*>& parameter_blocks,\n                           double* covariance_matrix) const;\n\n  // Return the covariance matrix corresponding to parameter_blocks\n  // in the tangent space if a local parameterization is associated\n  // with one of the parameter blocks else returns the covariance\n  // matrix in the ambient space.\n  //\n  // Compute must be called before calling GetCovarianceMatrix and all\n  // parameter_blocks must have been present in the vector\n  // parameters_blocks when Compute was called. Otherwise\n  // GetCovarianceMatrix returns false.\n  //\n  // covariance_matrix must point to a memory location that can store\n  // the size of the covariance matrix. The covariance matrix will be\n  // a square matrix whose row and column count is equal to the sum of\n  // the sizes of the tangent spaces of the individual parameter\n  // blocks. The covariance matrix will be a row-major matrix.\n  bool GetCovarianceMatrixInTangentSpace(\n      const std::vector<const double*>& parameter_blocks,\n      double* covariance_matrix) const;\n\n private:\n  std::unique_ptr<internal::CovarianceImpl> impl_;\n};\n\n}  // namespace ceres\n\n#include \"ceres/internal/reenable_warnings.h\"\n\n#endif  // CERES_PUBLIC_COVARIANCE_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/crs_matrix.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_PUBLIC_CRS_MATRIX_H_\n#define CERES_PUBLIC_CRS_MATRIX_H_\n\n#include <vector>\n\n#include \"ceres/internal/disable_warnings.h\"\n#include \"ceres/internal/port.h\"\n\nnamespace ceres {\n\n// A compressed row sparse matrix used primarily for communicating the\n// Jacobian matrix to the user.\nstruct CERES_EXPORT CRSMatrix {\n  CRSMatrix() : num_rows(0), num_cols(0) {}\n\n  int num_rows;\n  int num_cols;\n\n  // A compressed row matrix stores its contents in three arrays,\n  // rows, cols and values.\n  //\n  // rows is a num_rows + 1 sized array that points into the cols and\n  // values array. For each row i:\n  //\n  // cols[rows[i]] ... cols[rows[i + 1] - 1] are the indices of the\n  // non-zero columns of row i.\n  //\n  // values[rows[i]] .. values[rows[i + 1] - 1] are the values of the\n  // corresponding entries.\n  //\n  // cols and values contain as many entries as there are non-zeros in\n  // the matrix.\n  //\n  // e.g, consider the 3x4 sparse matrix\n  //\n  //  [ 0 10  0  4 ]\n  //  [ 0  2 -3  2 ]\n  //  [ 1  2  0  0 ]\n  //\n  // The three arrays will be:\n  //\n  //\n  //            -row0-  ---row1---  -row2-\n  //  rows   = [ 0,      2,          5,     7]\n  //  cols   = [ 1,  3,  1,  2,  3,  0,  1]\n  //  values = [10,  4,  2, -3,  2,  1,  2]\n\n  std::vector<int> cols;\n  std::vector<int> rows;\n  std::vector<double> values;\n};\n\n}  // namespace ceres\n\n#include \"ceres/internal/reenable_warnings.h\"\n\n#endif  // CERES_PUBLIC_CRS_MATRIX_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/cubic_interpolation.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_PUBLIC_CUBIC_INTERPOLATION_H_\n#define CERES_PUBLIC_CUBIC_INTERPOLATION_H_\n\n#include \"Eigen/Core\"\n#include \"ceres/internal/port.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\n\n// Given samples from a function sampled at four equally spaced points,\n//\n//   p0 = f(-1)\n//   p1 = f(0)\n//   p2 = f(1)\n//   p3 = f(2)\n//\n// Evaluate the cubic Hermite spline (also known as the Catmull-Rom\n// spline) at a point x that lies in the interval [0, 1].\n//\n// This is also the interpolation kernel (for the case of a = 0.5) as\n// proposed by R. Keys, in:\n//\n// \"Cubic convolution interpolation for digital image processing\".\n// IEEE Transactions on Acoustics, Speech, and Signal Processing\n// 29 (6): 1153-1160.\n//\n// For more details see\n//\n// http://en.wikipedia.org/wiki/Cubic_Hermite_spline\n// http://en.wikipedia.org/wiki/Bicubic_interpolation\n//\n// f if not NULL will contain the interpolated function values.\n// dfdx if not NULL will contain the interpolated derivative values.\ntemplate <int kDataDimension>\nvoid CubicHermiteSpline(const Eigen::Matrix<double, kDataDimension, 1>& p0,\n                        const Eigen::Matrix<double, kDataDimension, 1>& p1,\n                        const Eigen::Matrix<double, kDataDimension, 1>& p2,\n                        const Eigen::Matrix<double, kDataDimension, 1>& p3,\n                        const double x,\n                        double* f,\n                        double* dfdx) {\n  typedef Eigen::Matrix<double, kDataDimension, 1> VType;\n  const VType a = 0.5 * (-p0 + 3.0 * p1 - 3.0 * p2 + p3);\n  const VType b = 0.5 * (2.0 * p0 - 5.0 * p1 + 4.0 * p2 - p3);\n  const VType c = 0.5 * (-p0 + p2);\n  const VType d = p1;\n\n  // Use Horner's rule to evaluate the function value and its\n  // derivative.\n\n  // f = ax^3 + bx^2 + cx + d\n  if (f != NULL) {\n    Eigen::Map<VType>(f, kDataDimension) = d + x * (c + x * (b + x * a));\n  }\n\n  // dfdx = 3ax^2 + 2bx + c\n  if (dfdx != NULL) {\n    Eigen::Map<VType>(dfdx, kDataDimension) = c + x * (2.0 * b + 3.0 * a * x);\n  }\n}\n\n// Given as input an infinite one dimensional grid, which provides the\n// following interface.\n//\n//   class Grid {\n//    public:\n//     enum { DATA_DIMENSION = 2; };\n//     void GetValue(int n, double* f) const;\n//   };\n//\n// Here, GetValue gives the value of a function f (possibly vector\n// valued) for any integer n.\n//\n// The enum DATA_DIMENSION indicates the dimensionality of the\n// function being interpolated. For example if you are interpolating\n// rotations in axis-angle format over time, then DATA_DIMENSION = 3.\n//\n// CubicInterpolator uses cubic Hermite splines to produce a smooth\n// approximation to it that can be used to evaluate the f(x) and f'(x)\n// at any point on the real number line.\n//\n// For more details on cubic interpolation see\n//\n// http://en.wikipedia.org/wiki/Cubic_Hermite_spline\n//\n// Example usage:\n//\n//  const double data[] = {1.0, 2.0, 5.0, 6.0};\n//  Grid1D<double, 1> grid(data, 0, 4);\n//  CubicInterpolator<Grid1D<double, 1>> interpolator(grid);\n//  double f, dfdx;\n//  interpolator.Evaluator(1.5, &f, &dfdx);\ntemplate <typename Grid>\nclass CubicInterpolator {\n public:\n  explicit CubicInterpolator(const Grid& grid) : grid_(grid) {\n    // The + casts the enum into an int before doing the\n    // comparison. It is needed to prevent\n    // \"-Wunnamed-type-template-args\" related errors.\n    CHECK_GE(+Grid::DATA_DIMENSION, 1);\n  }\n\n  void Evaluate(double x, double* f, double* dfdx) const {\n    const int n = std::floor(x);\n    Eigen::Matrix<double, Grid::DATA_DIMENSION, 1> p0, p1, p2, p3;\n    grid_.GetValue(n - 1, p0.data());\n    grid_.GetValue(n, p1.data());\n    grid_.GetValue(n + 1, p2.data());\n    grid_.GetValue(n + 2, p3.data());\n    CubicHermiteSpline<Grid::DATA_DIMENSION>(p0, p1, p2, p3, x - n, f, dfdx);\n  }\n\n  // The following two Evaluate overloads are needed for interfacing\n  // with automatic differentiation. The first is for when a scalar\n  // evaluation is done, and the second one is for when Jets are used.\n  void Evaluate(const double& x, double* f) const { Evaluate(x, f, NULL); }\n\n  template <typename JetT>\n  void Evaluate(const JetT& x, JetT* f) const {\n    double fx[Grid::DATA_DIMENSION], dfdx[Grid::DATA_DIMENSION];\n    Evaluate(x.a, fx, dfdx);\n    for (int i = 0; i < Grid::DATA_DIMENSION; ++i) {\n      f[i].a = fx[i];\n      f[i].v = dfdx[i] * x.v;\n    }\n  }\n\n private:\n  const Grid& grid_;\n};\n\n// An object that implements an infinite one dimensional grid needed\n// by the CubicInterpolator where the source of the function values is\n// an array of type T on the interval\n//\n//   [begin, ..., end - 1]\n//\n// Since the input array is finite and the grid is infinite, values\n// outside this interval needs to be computed. Grid1D uses the value\n// from the nearest edge.\n//\n// The function being provided can be vector valued, in which case\n// kDataDimension > 1. The dimensional slices of the function maybe\n// interleaved, or they maybe stacked, i.e, if the function has\n// kDataDimension = 2, if kInterleaved = true, then it is stored as\n//\n//   f01, f02, f11, f12 ....\n//\n// and if kInterleaved = false, then it is stored as\n//\n//  f01, f11, .. fn1, f02, f12, .. , fn2\n//\ntemplate <typename T, int kDataDimension = 1, bool kInterleaved = true>\nstruct Grid1D {\n public:\n  enum { DATA_DIMENSION = kDataDimension };\n\n  Grid1D(const T* data, const int begin, const int end)\n      : data_(data), begin_(begin), end_(end), num_values_(end - begin) {\n    CHECK_LT(begin, end);\n  }\n\n  EIGEN_STRONG_INLINE void GetValue(const int n, double* f) const {\n    const int idx = std::min(std::max(begin_, n), end_ - 1) - begin_;\n    if (kInterleaved) {\n      for (int i = 0; i < kDataDimension; ++i) {\n        f[i] = static_cast<double>(data_[kDataDimension * idx + i]);\n      }\n    } else {\n      for (int i = 0; i < kDataDimension; ++i) {\n        f[i] = static_cast<double>(data_[i * num_values_ + idx]);\n      }\n    }\n  }\n\n private:\n  const T* data_;\n  const int begin_;\n  const int end_;\n  const int num_values_;\n};\n\n// Given as input an infinite two dimensional grid like object, which\n// provides the following interface:\n//\n//   struct Grid {\n//     enum { DATA_DIMENSION = 1 };\n//     void GetValue(int row, int col, double* f) const;\n//   };\n//\n// Where, GetValue gives us the value of a function f (possibly vector\n// valued) for any pairs of integers (row, col), and the enum\n// DATA_DIMENSION indicates the dimensionality of the function being\n// interpolated. For example if you are interpolating a color image\n// with three channels (Red, Green & Blue), then DATA_DIMENSION = 3.\n//\n// BiCubicInterpolator uses the cubic convolution interpolation\n// algorithm of R. Keys, to produce a smooth approximation to it that\n// can be used to evaluate the f(r,c), df(r, c)/dr and df(r,c)/dc at\n// any point in the real plane.\n//\n// For more details on the algorithm used here see:\n//\n// \"Cubic convolution interpolation for digital image processing\".\n// Robert G. Keys, IEEE Trans. on Acoustics, Speech, and Signal\n// Processing 29 (6): 1153-1160, 1981.\n//\n// http://en.wikipedia.org/wiki/Cubic_Hermite_spline\n// http://en.wikipedia.org/wiki/Bicubic_interpolation\n//\n// Example usage:\n//\n// const double data[] = {1.0, 3.0, -1.0, 4.0,\n//                         3.6, 2.1,  4.2, 2.0,\n//                        2.0, 1.0,  3.1, 5.2};\n//  Grid2D<double, 1>  grid(data, 3, 4);\n//  BiCubicInterpolator<Grid2D<double, 1>> interpolator(grid);\n//  double f, dfdr, dfdc;\n//  interpolator.Evaluate(1.2, 2.5, &f, &dfdr, &dfdc);\n\ntemplate <typename Grid>\nclass BiCubicInterpolator {\n public:\n  explicit BiCubicInterpolator(const Grid& grid) : grid_(grid) {\n    // The + casts the enum into an int before doing the\n    // comparison. It is needed to prevent\n    // \"-Wunnamed-type-template-args\" related errors.\n    CHECK_GE(+Grid::DATA_DIMENSION, 1);\n  }\n\n  // Evaluate the interpolated function value and/or its\n  // derivative. Uses the nearest point on the grid boundary if r or\n  // c is out of bounds.\n  void Evaluate(\n      double r, double c, double* f, double* dfdr, double* dfdc) const {\n    // BiCubic interpolation requires 16 values around the point being\n    // evaluated.  We will use pij, to indicate the elements of the\n    // 4x4 grid of values.\n    //\n    //          col\n    //      p00 p01 p02 p03\n    // row  p10 p11 p12 p13\n    //      p20 p21 p22 p23\n    //      p30 p31 p32 p33\n    //\n    // The point (r,c) being evaluated is assumed to lie in the square\n    // defined by p11, p12, p22 and p21.\n\n    const int row = std::floor(r);\n    const int col = std::floor(c);\n\n    Eigen::Matrix<double, Grid::DATA_DIMENSION, 1> p0, p1, p2, p3;\n\n    // Interpolate along each of the four rows, evaluating the function\n    // value and the horizontal derivative in each row.\n    Eigen::Matrix<double, Grid::DATA_DIMENSION, 1> f0, f1, f2, f3;\n    Eigen::Matrix<double, Grid::DATA_DIMENSION, 1> df0dc, df1dc, df2dc, df3dc;\n\n    grid_.GetValue(row - 1, col - 1, p0.data());\n    grid_.GetValue(row - 1, col, p1.data());\n    grid_.GetValue(row - 1, col + 1, p2.data());\n    grid_.GetValue(row - 1, col + 2, p3.data());\n    CubicHermiteSpline<Grid::DATA_DIMENSION>(\n        p0, p1, p2, p3, c - col, f0.data(), df0dc.data());\n\n    grid_.GetValue(row, col - 1, p0.data());\n    grid_.GetValue(row, col, p1.data());\n    grid_.GetValue(row, col + 1, p2.data());\n    grid_.GetValue(row, col + 2, p3.data());\n    CubicHermiteSpline<Grid::DATA_DIMENSION>(\n        p0, p1, p2, p3, c - col, f1.data(), df1dc.data());\n\n    grid_.GetValue(row + 1, col - 1, p0.data());\n    grid_.GetValue(row + 1, col, p1.data());\n    grid_.GetValue(row + 1, col + 1, p2.data());\n    grid_.GetValue(row + 1, col + 2, p3.data());\n    CubicHermiteSpline<Grid::DATA_DIMENSION>(\n        p0, p1, p2, p3, c - col, f2.data(), df2dc.data());\n\n    grid_.GetValue(row + 2, col - 1, p0.data());\n    grid_.GetValue(row + 2, col, p1.data());\n    grid_.GetValue(row + 2, col + 1, p2.data());\n    grid_.GetValue(row + 2, col + 2, p3.data());\n    CubicHermiteSpline<Grid::DATA_DIMENSION>(\n        p0, p1, p2, p3, c - col, f3.data(), df3dc.data());\n\n    // Interpolate vertically the interpolated value from each row and\n    // compute the derivative along the columns.\n    CubicHermiteSpline<Grid::DATA_DIMENSION>(f0, f1, f2, f3, r - row, f, dfdr);\n    if (dfdc != NULL) {\n      // Interpolate vertically the derivative along the columns.\n      CubicHermiteSpline<Grid::DATA_DIMENSION>(\n          df0dc, df1dc, df2dc, df3dc, r - row, dfdc, NULL);\n    }\n  }\n\n  // The following two Evaluate overloads are needed for interfacing\n  // with automatic differentiation. The first is for when a scalar\n  // evaluation is done, and the second one is for when Jets are used.\n  void Evaluate(const double& r, const double& c, double* f) const {\n    Evaluate(r, c, f, NULL, NULL);\n  }\n\n  template <typename JetT>\n  void Evaluate(const JetT& r, const JetT& c, JetT* f) const {\n    double frc[Grid::DATA_DIMENSION];\n    double dfdr[Grid::DATA_DIMENSION];\n    double dfdc[Grid::DATA_DIMENSION];\n    Evaluate(r.a, c.a, frc, dfdr, dfdc);\n    for (int i = 0; i < Grid::DATA_DIMENSION; ++i) {\n      f[i].a = frc[i];\n      f[i].v = dfdr[i] * r.v + dfdc[i] * c.v;\n    }\n  }\n\n private:\n  const Grid& grid_;\n};\n\n// An object that implements an infinite two dimensional grid needed\n// by the BiCubicInterpolator where the source of the function values\n// is an grid of type T on the grid\n//\n//   [(row_start,   col_start), ..., (row_start,   col_end - 1)]\n//   [                          ...                            ]\n//   [(row_end - 1, col_start), ..., (row_end - 1, col_end - 1)]\n//\n// Since the input grid is finite and the grid is infinite, values\n// outside this interval needs to be computed. Grid2D uses the value\n// from the nearest edge.\n//\n// The function being provided can be vector valued, in which case\n// kDataDimension > 1. The data maybe stored in row or column major\n// format and the various dimensional slices of the function maybe\n// interleaved, or they maybe stacked, i.e, if the function has\n// kDataDimension = 2, is stored in row-major format and if\n// kInterleaved = true, then it is stored as\n//\n//   f001, f002, f011, f012, ...\n//\n// A commonly occuring example are color images (RGB) where the three\n// channels are stored interleaved.\n//\n// If kInterleaved = false, then it is stored as\n//\n//  f001, f011, ..., fnm1, f002, f012, ...\ntemplate <typename T,\n          int kDataDimension = 1,\n          bool kRowMajor = true,\n          bool kInterleaved = true>\nstruct Grid2D {\n public:\n  enum { DATA_DIMENSION = kDataDimension };\n\n  Grid2D(const T* data,\n         const int row_begin,\n         const int row_end,\n         const int col_begin,\n         const int col_end)\n      : data_(data),\n        row_begin_(row_begin),\n        row_end_(row_end),\n        col_begin_(col_begin),\n        col_end_(col_end),\n        num_rows_(row_end - row_begin),\n        num_cols_(col_end - col_begin),\n        num_values_(num_rows_ * num_cols_) {\n    CHECK_GE(kDataDimension, 1);\n    CHECK_LT(row_begin, row_end);\n    CHECK_LT(col_begin, col_end);\n  }\n\n  EIGEN_STRONG_INLINE void GetValue(const int r, const int c, double* f) const {\n    const int row_idx =\n        std::min(std::max(row_begin_, r), row_end_ - 1) - row_begin_;\n    const int col_idx =\n        std::min(std::max(col_begin_, c), col_end_ - 1) - col_begin_;\n\n    const int n = (kRowMajor) ? num_cols_ * row_idx + col_idx\n                              : num_rows_ * col_idx + row_idx;\n\n    if (kInterleaved) {\n      for (int i = 0; i < kDataDimension; ++i) {\n        f[i] = static_cast<double>(data_[kDataDimension * n + i]);\n      }\n    } else {\n      for (int i = 0; i < kDataDimension; ++i) {\n        f[i] = static_cast<double>(data_[i * num_values_ + n]);\n      }\n    }\n  }\n\n private:\n  const T* data_;\n  const int row_begin_;\n  const int row_end_;\n  const int col_begin_;\n  const int col_end_;\n  const int num_rows_;\n  const int num_cols_;\n  const int num_values_;\n};\n\n}  // namespace ceres\n\n#endif  // CERES_PUBLIC_CUBIC_INTERPOLATOR_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/dynamic_autodiff_cost_function.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//         mierle@gmail.com (Keir Mierle)\n\n#ifndef CERES_PUBLIC_DYNAMIC_AUTODIFF_COST_FUNCTION_H_\n#define CERES_PUBLIC_DYNAMIC_AUTODIFF_COST_FUNCTION_H_\n\n#include <cmath>\n#include <memory>\n#include <numeric>\n#include <vector>\n\n#include \"ceres/dynamic_cost_function.h\"\n#include \"ceres/internal/fixed_array.h\"\n#include \"ceres/jet.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\n\n// This autodiff implementation differs from the one found in\n// autodiff_cost_function.h by supporting autodiff on cost functions\n// with variable numbers of parameters with variable sizes. With the\n// other implementation, all the sizes (both the number of parameter\n// blocks and the size of each block) must be fixed at compile time.\n//\n// The functor API differs slightly from the API for fixed size\n// autodiff; the expected interface for the cost functors is:\n//\n//   struct MyCostFunctor {\n//     template<typename T>\n//     bool operator()(T const* const* parameters, T* residuals) const {\n//       // Use parameters[i] to access the i'th parameter block.\n//     }\n//   };\n//\n// Since the sizing of the parameters is done at runtime, you must\n// also specify the sizes after creating the dynamic autodiff cost\n// function. For example:\n//\n//   DynamicAutoDiffCostFunction<MyCostFunctor, 3> cost_function(\n//       new MyCostFunctor());\n//   cost_function.AddParameterBlock(5);\n//   cost_function.AddParameterBlock(10);\n//   cost_function.SetNumResiduals(21);\n//\n// Under the hood, the implementation evaluates the cost function\n// multiple times, computing a small set of the derivatives (four by\n// default, controlled by the Stride template parameter) with each\n// pass. There is a tradeoff with the size of the passes; you may want\n// to experiment with the stride.\ntemplate <typename CostFunctor, int Stride = 4>\nclass DynamicAutoDiffCostFunction : public DynamicCostFunction {\n public:\n  explicit DynamicAutoDiffCostFunction(CostFunctor* functor)\n      : functor_(functor) {}\n\n  virtual ~DynamicAutoDiffCostFunction() {}\n\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const override {\n    CHECK_GT(num_residuals(), 0)\n        << \"You must call DynamicAutoDiffCostFunction::SetNumResiduals() \"\n        << \"before DynamicAutoDiffCostFunction::Evaluate().\";\n\n    if (jacobians == NULL) {\n      return (*functor_)(parameters, residuals);\n    }\n\n    // The difficulty with Jets, as implemented in Ceres, is that they were\n    // originally designed for strictly compile-sized use. At this point, there\n    // is a large body of code that assumes inside a cost functor it is\n    // acceptable to do e.g. T(1.5) and get an appropriately sized jet back.\n    //\n    // Unfortunately, it is impossible to communicate the expected size of a\n    // dynamically sized jet to the static instantiations that existing code\n    // depends on.\n    //\n    // To work around this issue, the solution here is to evaluate the\n    // jacobians in a series of passes, each one computing Stride *\n    // num_residuals() derivatives. This is done with small, fixed-size jets.\n    const int num_parameter_blocks =\n        static_cast<int>(parameter_block_sizes().size());\n    const int num_parameters = std::accumulate(\n        parameter_block_sizes().begin(), parameter_block_sizes().end(), 0);\n\n    // Allocate scratch space for the strided evaluation.\n    using JetT = Jet<double, Stride>;\n    internal::FixedArray<JetT, (256 * 7) / sizeof(JetT)> input_jets(\n        num_parameters);\n    internal::FixedArray<JetT, (256 * 7) / sizeof(JetT)> output_jets(\n        num_residuals());\n\n    // Make the parameter pack that is sent to the functor (reused).\n    internal::FixedArray<Jet<double, Stride>*> jet_parameters(\n        num_parameter_blocks, nullptr);\n    int num_active_parameters = 0;\n\n    // To handle constant parameters between non-constant parameter blocks, the\n    // start position --- a raw parameter index --- of each contiguous block of\n    // non-constant parameters is recorded in start_derivative_section.\n    std::vector<int> start_derivative_section;\n    bool in_derivative_section = false;\n    int parameter_cursor = 0;\n\n    // Discover the derivative sections and set the parameter values.\n    for (int i = 0; i < num_parameter_blocks; ++i) {\n      jet_parameters[i] = &input_jets[parameter_cursor];\n\n      const int parameter_block_size = parameter_block_sizes()[i];\n      if (jacobians[i] != NULL) {\n        if (!in_derivative_section) {\n          start_derivative_section.push_back(parameter_cursor);\n          in_derivative_section = true;\n        }\n\n        num_active_parameters += parameter_block_size;\n      } else {\n        in_derivative_section = false;\n      }\n\n      for (int j = 0; j < parameter_block_size; ++j, parameter_cursor++) {\n        input_jets[parameter_cursor].a = parameters[i][j];\n      }\n    }\n\n    // When `num_active_parameters % Stride != 0` then it can be the case\n    // that `active_parameter_count < Stride` while parameter_cursor is less\n    // than the total number of parameters and with no remaining non-constant\n    // parameter blocks. Pushing parameter_cursor (the total number of\n    // parameters) as a final entry to start_derivative_section is required\n    // because if a constant parameter block is encountered after the\n    // last non-constant block then current_derivative_section is incremented\n    // and would otherwise index an invalid position in\n    // start_derivative_section. Setting the final element to the total number\n    // of parameters means that this can only happen at most once in the loop\n    // below.\n    start_derivative_section.push_back(parameter_cursor);\n\n    // Evaluate all of the strides. Each stride is a chunk of the derivative to\n    // evaluate, typically some size proportional to the size of the SIMD\n    // registers of the CPU.\n    int num_strides = static_cast<int>(\n        ceil(num_active_parameters / static_cast<float>(Stride)));\n\n    int current_derivative_section = 0;\n    int current_derivative_section_cursor = 0;\n\n    for (int pass = 0; pass < num_strides; ++pass) {\n      // Set most of the jet components to zero, except for\n      // non-constant #Stride parameters.\n      const int initial_derivative_section = current_derivative_section;\n      const int initial_derivative_section_cursor =\n          current_derivative_section_cursor;\n\n      int active_parameter_count = 0;\n      parameter_cursor = 0;\n\n      for (int i = 0; i < num_parameter_blocks; ++i) {\n        for (int j = 0; j < parameter_block_sizes()[i];\n             ++j, parameter_cursor++) {\n          input_jets[parameter_cursor].v.setZero();\n          if (active_parameter_count < Stride &&\n              parameter_cursor >=\n                  (start_derivative_section[current_derivative_section] +\n                   current_derivative_section_cursor)) {\n            if (jacobians[i] != NULL) {\n              input_jets[parameter_cursor].v[active_parameter_count] = 1.0;\n              ++active_parameter_count;\n              ++current_derivative_section_cursor;\n            } else {\n              ++current_derivative_section;\n              current_derivative_section_cursor = 0;\n            }\n          }\n        }\n      }\n\n      if (!(*functor_)(&jet_parameters[0], &output_jets[0])) {\n        return false;\n      }\n\n      // Copy the pieces of the jacobians into their final place.\n      active_parameter_count = 0;\n\n      current_derivative_section = initial_derivative_section;\n      current_derivative_section_cursor = initial_derivative_section_cursor;\n\n      for (int i = 0, parameter_cursor = 0; i < num_parameter_blocks; ++i) {\n        for (int j = 0; j < parameter_block_sizes()[i];\n             ++j, parameter_cursor++) {\n          if (active_parameter_count < Stride &&\n              parameter_cursor >=\n                  (start_derivative_section[current_derivative_section] +\n                   current_derivative_section_cursor)) {\n            if (jacobians[i] != NULL) {\n              for (int k = 0; k < num_residuals(); ++k) {\n                jacobians[i][k * parameter_block_sizes()[i] + j] =\n                    output_jets[k].v[active_parameter_count];\n              }\n              ++active_parameter_count;\n              ++current_derivative_section_cursor;\n            } else {\n              ++current_derivative_section;\n              current_derivative_section_cursor = 0;\n            }\n          }\n        }\n      }\n\n      // Only copy the residuals over once (even though we compute them on\n      // every loop).\n      if (pass == num_strides - 1) {\n        for (int k = 0; k < num_residuals(); ++k) {\n          residuals[k] = output_jets[k].a;\n        }\n      }\n    }\n    return true;\n  }\n\n private:\n  std::unique_ptr<CostFunctor> functor_;\n};\n\n}  // namespace ceres\n\n#endif  // CERES_PUBLIC_DYNAMIC_AUTODIFF_COST_FUNCTION_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/dynamic_cost_function.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_PUBLIC_DYNAMIC_COST_FUNCTION_H_\n#define CERES_PUBLIC_DYNAMIC_COST_FUNCTION_H_\n\n#include \"ceres/cost_function.h\"\n\nnamespace ceres {\n\n// A common base class for DynamicAutoDiffCostFunction and\n// DynamicNumericDiffCostFunction which depend on methods that can add\n// parameter blocks and set the number of residuals at run time.\nclass CERES_EXPORT DynamicCostFunction : public CostFunction {\n public:\n  ~DynamicCostFunction() {}\n\n  virtual void AddParameterBlock(int size) {\n    mutable_parameter_block_sizes()->push_back(size);\n  }\n\n  virtual void SetNumResiduals(int num_residuals) {\n    set_num_residuals(num_residuals);\n  }\n};\n\n}  // namespace ceres\n\n#endif  // CERES_PUBLIC_DYNAMIC_COST_FUNCTION_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/dynamic_cost_function_to_functor.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//         dgossow@google.com (David Gossow)\n\n#ifndef CERES_PUBLIC_DYNAMIC_COST_FUNCTION_TO_FUNCTOR_H_\n#define CERES_PUBLIC_DYNAMIC_COST_FUNCTION_TO_FUNCTOR_H_\n\n#include <memory>\n#include <numeric>\n#include <vector>\n\n#include \"ceres/dynamic_cost_function.h\"\n#include \"ceres/internal/fixed_array.h\"\n#include \"ceres/internal/port.h\"\n\nnamespace ceres {\n\n// DynamicCostFunctionToFunctor allows users to use CostFunction\n// objects in templated functors which are to be used for automatic\n// differentiation. It works similar to CostFunctionToFunctor, with the\n// difference that it allows you to wrap a cost function with dynamic numbers\n// of parameters and residuals.\n//\n// For example, let us assume that\n//\n//  class IntrinsicProjection : public CostFunction {\n//    public:\n//      IntrinsicProjection(const double* observation);\n//      bool Evaluate(double const* const* parameters,\n//                    double* residuals,\n//                    double** jacobians) const override;\n//  };\n//\n// is a cost function that implements the projection of a point in its\n// local coordinate system onto its image plane and subtracts it from\n// the observed point projection. It can compute its residual and\n// either via analytic or numerical differentiation can compute its\n// jacobians. The intrinsics are passed in as parameters[0] and the point as\n// parameters[1].\n//\n// Now we would like to compose the action of this CostFunction with\n// the action of camera extrinsics, i.e., rotation and\n// translation. Say we have a templated function\n//\n//   template<typename T>\n//   void RotateAndTranslatePoint(double const* const* parameters,\n//                                double* residuals);\n//\n// Then we can now do the following,\n//\n// struct CameraProjection {\n//   CameraProjection(const double* observation)\n//       : intrinsic_projection_.(new IntrinsicProjection(observation)) {\n//   }\n//   template <typename T>\n//   bool operator()(T const* const* parameters,\n//                   T* residual) const {\n//     const T* rotation = parameters[0];\n//     const T* translation = parameters[1];\n//     const T* intrinsics = parameters[2];\n//     const T* point = parameters[3];\n//     T transformed_point[3];\n//     RotateAndTranslatePoint(rotation, translation, point, transformed_point);\n//\n//     // Note that we call intrinsic_projection_, just like it was\n//     // any other templated functor.\n//     const T* projection_parameters[2];\n//     projection_parameters[0] = intrinsics;\n//     projection_parameters[1] = transformed_point;\n//     return intrinsic_projection_(projection_parameters, residual);\n//   }\n//\n//  private:\n//   DynamicCostFunctionToFunctor intrinsic_projection_;\n// };\nclass DynamicCostFunctionToFunctor {\n public:\n  // Takes ownership of cost_function.\n  explicit DynamicCostFunctionToFunctor(CostFunction* cost_function)\n      : cost_function_(cost_function) {\n    CHECK(cost_function != nullptr);\n  }\n\n  bool operator()(double const* const* parameters, double* residuals) const {\n    return cost_function_->Evaluate(parameters, residuals, NULL);\n  }\n\n  template <typename JetT>\n  bool operator()(JetT const* const* inputs, JetT* output) const {\n    const std::vector<int32_t>& parameter_block_sizes =\n        cost_function_->parameter_block_sizes();\n    const int num_parameter_blocks =\n        static_cast<int>(parameter_block_sizes.size());\n    const int num_residuals = cost_function_->num_residuals();\n    const int num_parameters = std::accumulate(\n        parameter_block_sizes.begin(), parameter_block_sizes.end(), 0);\n\n    internal::FixedArray<double> parameters(num_parameters);\n    internal::FixedArray<double*> parameter_blocks(num_parameter_blocks);\n    internal::FixedArray<double> jacobians(num_residuals * num_parameters);\n    internal::FixedArray<double*> jacobian_blocks(num_parameter_blocks);\n    internal::FixedArray<double> residuals(num_residuals);\n\n    // Build a set of arrays to get the residuals and jacobians from\n    // the CostFunction wrapped by this functor.\n    double* parameter_ptr = parameters.data();\n    double* jacobian_ptr = jacobians.data();\n    for (int i = 0; i < num_parameter_blocks; ++i) {\n      parameter_blocks[i] = parameter_ptr;\n      jacobian_blocks[i] = jacobian_ptr;\n      for (int j = 0; j < parameter_block_sizes[i]; ++j) {\n        *parameter_ptr++ = inputs[i][j].a;\n      }\n      jacobian_ptr += num_residuals * parameter_block_sizes[i];\n    }\n\n    if (!cost_function_->Evaluate(parameter_blocks.data(),\n                                  residuals.data(),\n                                  jacobian_blocks.data())) {\n      return false;\n    }\n\n    // Now that we have the incoming Jets, which are carrying the\n    // partial derivatives of each of the inputs w.r.t to some other\n    // underlying parameters. The derivative of the outputs of the\n    // cost function w.r.t to the same underlying parameters can now\n    // be computed by applying the chain rule.\n    //\n    //  d output[i]               d output[i]   d input[j]\n    //  --------------  = sum_j   ----------- * ------------\n    //  d parameter[k]            d input[j]    d parameter[k]\n    //\n    // d input[j]\n    // --------------  = inputs[j], so\n    // d parameter[k]\n    //\n    //  outputJet[i]  = sum_k jacobian[i][k] * inputJet[k]\n    //\n    // The following loop, iterates over the residuals, computing one\n    // output jet at a time.\n    for (int i = 0; i < num_residuals; ++i) {\n      output[i].a = residuals[i];\n      output[i].v.setZero();\n\n      for (int j = 0; j < num_parameter_blocks; ++j) {\n        const int32_t block_size = parameter_block_sizes[j];\n        for (int k = 0; k < parameter_block_sizes[j]; ++k) {\n          output[i].v +=\n              jacobian_blocks[j][i * block_size + k] * inputs[j][k].v;\n        }\n      }\n    }\n\n    return true;\n  }\n\n private:\n  std::unique_ptr<CostFunction> cost_function_;\n};\n\n}  // namespace ceres\n\n#endif  // CERES_PUBLIC_DYNAMIC_COST_FUNCTION_TO_FUNCTOR_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/dynamic_numeric_diff_cost_function.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: mierle@gmail.com (Keir Mierle)\n//         sameeragarwal@google.com (Sameer Agarwal)\n//         thadh@gmail.com (Thad Hughes)\n//         tbennun@gmail.com (Tal Ben-Nun)\n\n#ifndef CERES_PUBLIC_DYNAMIC_NUMERIC_DIFF_COST_FUNCTION_H_\n#define CERES_PUBLIC_DYNAMIC_NUMERIC_DIFF_COST_FUNCTION_H_\n\n#include <cmath>\n#include <memory>\n#include <numeric>\n#include <vector>\n\n#include \"ceres/dynamic_cost_function.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/internal/numeric_diff.h\"\n#include \"ceres/internal/parameter_dims.h\"\n#include \"ceres/numeric_diff_options.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\n\n// This numeric diff implementation differs from the one found in\n// numeric_diff_cost_function.h by supporting numericdiff on cost\n// functions with variable numbers of parameters with variable\n// sizes. With the other implementation, all the sizes (both the\n// number of parameter blocks and the size of each block) must be\n// fixed at compile time.\n//\n// The functor API differs slightly from the API for fixed size\n// numeric diff; the expected interface for the cost functors is:\n//\n//   struct MyCostFunctor {\n//     bool operator()(double const*\n//                     const* parameters,\n//                     double* residuals) const {\n//       // Use parameters[i] to access the i'th parameter block.\n//     }\n//   }\n//\n// Since the sizing of the parameters is done at runtime, you must\n// also specify the sizes after creating the\n// DynamicNumericDiffCostFunction. For example:\n//\n//   DynamicAutoDiffCostFunction<MyCostFunctor, CENTRAL> cost_function(\n//       new MyCostFunctor());\n//   cost_function.AddParameterBlock(5);\n//   cost_function.AddParameterBlock(10);\n//   cost_function.SetNumResiduals(21);\ntemplate <typename CostFunctor, NumericDiffMethodType method = CENTRAL>\nclass DynamicNumericDiffCostFunction : public DynamicCostFunction {\n public:\n  explicit DynamicNumericDiffCostFunction(\n      const CostFunctor* functor,\n      Ownership ownership = TAKE_OWNERSHIP,\n      const NumericDiffOptions& options = NumericDiffOptions())\n      : functor_(functor), ownership_(ownership), options_(options) {}\n\n  virtual ~DynamicNumericDiffCostFunction() {\n    if (ownership_ != TAKE_OWNERSHIP) {\n      functor_.release();\n    }\n  }\n\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const override {\n    using internal::NumericDiff;\n    CHECK_GT(num_residuals(), 0)\n        << \"You must call DynamicNumericDiffCostFunction::SetNumResiduals() \"\n        << \"before DynamicNumericDiffCostFunction::Evaluate().\";\n\n    const std::vector<int32_t>& block_sizes = parameter_block_sizes();\n    CHECK(!block_sizes.empty())\n        << \"You must call DynamicNumericDiffCostFunction::AddParameterBlock() \"\n        << \"before DynamicNumericDiffCostFunction::Evaluate().\";\n\n    const bool status =\n        internal::VariadicEvaluate<internal::DynamicParameterDims>(\n            *functor_.get(), parameters, residuals);\n    if (jacobians == NULL || !status) {\n      return status;\n    }\n\n    // Create local space for a copy of the parameters which will get mutated.\n    int parameters_size = accumulate(block_sizes.begin(), block_sizes.end(), 0);\n    std::vector<double> parameters_copy(parameters_size);\n    std::vector<double*> parameters_references_copy(block_sizes.size());\n    parameters_references_copy[0] = &parameters_copy[0];\n    for (size_t block = 1; block < block_sizes.size(); ++block) {\n      parameters_references_copy[block] =\n          parameters_references_copy[block - 1] + block_sizes[block - 1];\n    }\n\n    // Copy the parameters into the local temp space.\n    for (size_t block = 0; block < block_sizes.size(); ++block) {\n      memcpy(parameters_references_copy[block],\n             parameters[block],\n             block_sizes[block] * sizeof(*parameters[block]));\n    }\n\n    for (size_t block = 0; block < block_sizes.size(); ++block) {\n      if (jacobians[block] != NULL &&\n          !NumericDiff<CostFunctor,\n                       method,\n                       ceres::DYNAMIC,\n                       internal::DynamicParameterDims,\n                       ceres::DYNAMIC,\n                       ceres::DYNAMIC>::\n              EvaluateJacobianForParameterBlock(functor_.get(),\n                                                residuals,\n                                                options_,\n                                                this->num_residuals(),\n                                                block,\n                                                block_sizes[block],\n                                                &parameters_references_copy[0],\n                                                jacobians[block])) {\n        return false;\n      }\n    }\n    return true;\n  }\n\n private:\n  std::unique_ptr<const CostFunctor> functor_;\n  Ownership ownership_;\n  NumericDiffOptions options_;\n};\n\n}  // namespace ceres\n\n#endif  // CERES_PUBLIC_DYNAMIC_AUTODIFF_COST_FUNCTION_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/evaluation_callback.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: mierle@gmail.com (Keir Mierle)\n\n#ifndef CERES_PUBLIC_EVALUATION_CALLBACK_H_\n#define CERES_PUBLIC_EVALUATION_CALLBACK_H_\n\n#include \"ceres/internal/port.h\"\n\nnamespace ceres {\n\n// Using this callback interface, Ceres can notify you when it is\n// about to evaluate the residuals or jacobians. With the callback,\n// you can share computation between residual blocks by doing the\n// shared computation in PrepareForEvaluation() before Ceres calls\n// CostFunction::Evaluate(). It also enables caching results between a\n// pure residual evaluation and a residual & jacobian evaluation, via\n// the new_evaluation_point argument.\n//\n// One use case for this callback is if the cost function compute is\n// moved to the GPU. In that case, the prepare call does the actual\n// cost function evaluation, and subsequent calls from Ceres to the\n// actual cost functions merely copy the results from the GPU onto the\n// corresponding blocks for Ceres to plug into the solver.\n//\n// NOTE: Ceres provides no mechanism to share data other than the\n// notification from the callback. Users must provide access to\n// pre-computed shared data to their cost functions behind the scenes;\n// this all happens without Ceres knowing.\n//\n// One approach is to put a pointer to the shared data in each cost\n// function (recommended) or to use a global shared variable\n// (discouraged; bug-prone).  As far as Ceres is concerned, it is\n// evaluating cost functions like any other; it just so happens that\n// behind the scenes the cost functions reuse pre-computed data to\n// execute faster.\nclass CERES_EXPORT EvaluationCallback {\n public:\n  virtual ~EvaluationCallback() {}\n\n  // Called before Ceres requests residuals or jacobians for a given setting of\n  // the parameters. User parameters (the double* values provided to the cost\n  // functions) are fixed until the next call to PrepareForEvaluation(). If\n  // new_evaluation_point == true, then this is a new point that is different\n  // from the last evaluated point. Otherwise, it is the same point that was\n  // evaluated previously (either jacobian or residual) and the user can use\n  // cached results from previous evaluations.\n  virtual void PrepareForEvaluation(bool evaluate_jacobians,\n                                    bool new_evaluation_point) = 0;\n};\n\n}  // namespace ceres\n\n#endif  // CERES_PUBLIC_EVALUATION_CALLBACK_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/first_order_function.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_PUBLIC_FIRST_ORDER_FUNCTION_H_\n#define CERES_PUBLIC_FIRST_ORDER_FUNCTION_H_\n\n#include \"ceres/internal/port.h\"\n\nnamespace ceres {\n\n// A FirstOrderFunction object implements the evaluation of a function\n// and its gradient.\nclass CERES_EXPORT FirstOrderFunction {\n public:\n  virtual ~FirstOrderFunction() {}\n\n  // cost is never null. gradient may be null. The return value\n  // indicates whether the evaluation was successful or not.\n  virtual bool Evaluate(const double* const parameters,\n                        double* cost,\n                        double* gradient) const = 0;\n  virtual int NumParameters() const = 0;\n};\n\n}  // namespace ceres\n\n#endif  // CERES_PUBLIC_FIRST_ORDER_FUNCTION_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/gradient_checker.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n// Copyright 2007 Google Inc. All Rights Reserved.\n//\n// Authors: wjr@google.com (William Rucklidge),\n//          keir@google.com (Keir Mierle),\n//          dgossow@google.com (David Gossow)\n\n#ifndef CERES_PUBLIC_GRADIENT_CHECKER_H_\n#define CERES_PUBLIC_GRADIENT_CHECKER_H_\n\n#include <memory>\n#include <string>\n#include <vector>\n\n#include \"ceres/cost_function.h\"\n#include \"ceres/dynamic_numeric_diff_cost_function.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/internal/fixed_array.h\"\n#include \"ceres/local_parameterization.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\n\n// GradientChecker compares the Jacobians returned by a cost function against\n// derivatives estimated using finite differencing.\n//\n// The condition enforced is that\n//\n//    (J_actual(i, j) - J_numeric(i, j))\n//   ------------------------------------  <  relative_precision\n//   max(J_actual(i, j), J_numeric(i, j))\n//\n// where J_actual(i, j) is the jacobian as computed by the supplied cost\n// function (by the user) multiplied by the local parameterization Jacobian\n// and J_numeric is the jacobian as computed by finite differences, multiplied\n// by the local parameterization Jacobian as well.\n//\n// How to use: Fill in an array of pointers to parameter blocks for your\n// CostFunction, and then call Probe(). Check that the return value is 'true'.\nclass CERES_EXPORT GradientChecker {\n public:\n  // This will not take ownership of the cost function or local\n  // parameterizations.\n  //\n  // function: The cost function to probe.\n  // local_parameterizations: A vector of local parameterizations for each\n  // parameter. May be NULL or contain NULL pointers to indicate that the\n  // respective parameter does not have a local parameterization.\n  // options: Options to use for numerical differentiation.\n  GradientChecker(\n      const CostFunction* function,\n      const std::vector<const LocalParameterization*>* local_parameterizations,\n      const NumericDiffOptions& options);\n\n  // Contains results from a call to Probe for later inspection.\n  struct CERES_EXPORT ProbeResults {\n    // The return value of the cost function.\n    bool return_value;\n\n    // Computed residual vector.\n    Vector residuals;\n\n    // The sizes of the Jacobians below are dictated by the cost function's\n    // parameter block size and residual block sizes. If a parameter block\n    // has a local parameterization associated with it, the size of the \"local\"\n    // Jacobian will be determined by the local parameterization dimension and\n    // residual block size, otherwise it will be identical to the regular\n    // Jacobian.\n\n    // Derivatives as computed by the cost function.\n    std::vector<Matrix> jacobians;\n\n    // Derivatives as computed by the cost function in local space.\n    std::vector<Matrix> local_jacobians;\n\n    // Derivatives as computed by numerical differentiation in local space.\n    std::vector<Matrix> numeric_jacobians;\n\n    // Derivatives as computed by numerical differentiation in local space.\n    std::vector<Matrix> local_numeric_jacobians;\n\n    // Contains the maximum relative error found in the local Jacobians.\n    double maximum_relative_error;\n\n    // If an error was detected, this will contain a detailed description of\n    // that error.\n    std::string error_log;\n  };\n\n  // Call the cost function, compute alternative Jacobians using finite\n  // differencing and compare results. If local parameterizations are given,\n  // the Jacobians will be multiplied by the local parameterization Jacobians\n  // before performing the check, which effectively means that all errors along\n  // the null space of the local parameterization will be ignored.\n  // Returns false if the Jacobians don't match, the cost function return false,\n  // or if the cost function returns different residual when called with a\n  // Jacobian output argument vs. calling it without. Otherwise returns true.\n  //\n  // parameters: The parameter values at which to probe.\n  // relative_precision: A threshold for the relative difference between the\n  // Jacobians. If the Jacobians differ by more than this amount, then the\n  // probe fails.\n  // results: On return, the Jacobians (and other information) will be stored\n  // here. May be NULL.\n  //\n  // Returns true if no problems are detected and the difference between the\n  // Jacobians is less than error_tolerance.\n  bool Probe(double const* const* parameters,\n             double relative_precision,\n             ProbeResults* results) const;\n\n private:\n  GradientChecker() = delete;\n  GradientChecker(const GradientChecker&) = delete;\n  void operator=(const GradientChecker&) = delete;\n\n  std::vector<const LocalParameterization*> local_parameterizations_;\n  const CostFunction* function_;\n  std::unique_ptr<CostFunction> finite_diff_cost_function_;\n};\n\n}  // namespace ceres\n\n#endif  // CERES_PUBLIC_GRADIENT_CHECKER_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/gradient_problem.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_PUBLIC_GRADIENT_PROBLEM_H_\n#define CERES_PUBLIC_GRADIENT_PROBLEM_H_\n\n#include <memory>\n\n#include \"ceres/first_order_function.h\"\n#include \"ceres/internal/port.h\"\n#include \"ceres/local_parameterization.h\"\n\nnamespace ceres {\n\nclass FirstOrderFunction;\n\n// Instances of GradientProblem represent general non-linear\n// optimization problems that must be solved using just the value of\n// the objective function and its gradient. Unlike the Problem class,\n// which can only be used to model non-linear least squares problems,\n// instances of GradientProblem not restricted in the form of the\n// objective function.\n//\n// Structurally GradientProblem is a composition of a\n// FirstOrderFunction and optionally a LocalParameterization.\n//\n// The FirstOrderFunction is responsible for evaluating the cost and\n// gradient of the objective function.\n//\n// The LocalParameterization is responsible for going back and forth\n// between the ambient space and the local tangent space. (See\n// local_parameterization.h for more details). When a\n// LocalParameterization is not provided, then the tangent space is\n// assumed to coincide with the ambient Euclidean space that the\n// gradient vector lives in.\n//\n// Example usage:\n//\n// The following demonstrate the problem construction for Rosenbrock's function\n//\n//   f(x,y) = (1-x)^2 + 100(y - x^2)^2;\n//\n// class Rosenbrock : public ceres::FirstOrderFunction {\n//  public:\n//   virtual ~Rosenbrock() {}\n//\n//   virtual bool Evaluate(const double* parameters,\n//                         double* cost,\n//                         double* gradient) const {\n//     const double x = parameters[0];\n//     const double y = parameters[1];\n//\n//     cost[0] = (1.0 - x) * (1.0 - x) + 100.0 * (y - x * x) * (y - x * x);\n//     if (gradient != NULL) {\n//       gradient[0] = -2.0 * (1.0 - x) - 200.0 * (y - x * x) * 2.0 * x;\n//       gradient[1] = 200.0 * (y - x * x);\n//     }\n//     return true;\n//   };\n//\n//   virtual int NumParameters() const { return 2; };\n// };\n//\n// ceres::GradientProblem problem(new Rosenbrock());\nclass CERES_EXPORT GradientProblem {\n public:\n  // Takes ownership of the function.\n  explicit GradientProblem(FirstOrderFunction* function);\n\n  // Takes ownership of the function and the parameterization.\n  GradientProblem(FirstOrderFunction* function,\n                  LocalParameterization* parameterization);\n\n  int NumParameters() const;\n  int NumLocalParameters() const;\n\n  // This call is not thread safe.\n  bool Evaluate(const double* parameters, double* cost, double* gradient) const;\n  bool Plus(const double* x, const double* delta, double* x_plus_delta) const;\n\n private:\n  std::unique_ptr<FirstOrderFunction> function_;\n  std::unique_ptr<LocalParameterization> parameterization_;\n  std::unique_ptr<double[]> scratch_;\n};\n\n}  // namespace ceres\n\n#endif  // CERES_PUBLIC_GRADIENT_PROBLEM_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/gradient_problem_solver.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_PUBLIC_GRADIENT_PROBLEM_SOLVER_H_\n#define CERES_PUBLIC_GRADIENT_PROBLEM_SOLVER_H_\n\n#include <cmath>\n#include <string>\n#include <vector>\n\n#include \"ceres/internal/disable_warnings.h\"\n#include \"ceres/internal/port.h\"\n#include \"ceres/iteration_callback.h\"\n#include \"ceres/types.h\"\n\nnamespace ceres {\n\nclass GradientProblem;\n\nclass CERES_EXPORT GradientProblemSolver {\n public:\n  virtual ~GradientProblemSolver();\n\n  // The options structure contains, not surprisingly, options that control how\n  // the solver operates. The defaults should be suitable for a wide range of\n  // problems; however, better performance is often obtainable with tweaking.\n  //\n  // The constants are defined inside types.h\n  struct CERES_EXPORT Options {\n    // Returns true if the options struct has a valid\n    // configuration. Returns false otherwise, and fills in *error\n    // with a message describing the problem.\n    bool IsValid(std::string* error) const;\n\n    // Minimizer options ----------------------------------------\n    LineSearchDirectionType line_search_direction_type = LBFGS;\n    LineSearchType line_search_type = WOLFE;\n    NonlinearConjugateGradientType nonlinear_conjugate_gradient_type = FLETCHER_REEVES;\n\n    // The LBFGS hessian approximation is a low rank approximation to\n    // the inverse of the Hessian matrix. The rank of the\n    // approximation determines (linearly) the space and time\n    // complexity of using the approximation. Higher the rank, the\n    // better is the quality of the approximation. The increase in\n    // quality is however is bounded for a number of reasons.\n    //\n    // 1. The method only uses secant information and not actual\n    // derivatives.\n    //\n    // 2. The Hessian approximation is constrained to be positive\n    // definite.\n    //\n    // So increasing this rank to a large number will cost time and\n    // space complexity without the corresponding increase in solution\n    // quality. There are no hard and fast rules for choosing the\n    // maximum rank. The best choice usually requires some problem\n    // specific experimentation.\n    //\n    // For more theoretical and implementation details of the LBFGS\n    // method, please see:\n    //\n    // Nocedal, J. (1980). \"Updating Quasi-Newton Matrices with\n    // Limited Storage\". Mathematics of Computation 35 (151): 773-782.\n    int max_lbfgs_rank = 20;\n\n    // As part of the (L)BFGS update step (BFGS) / right-multiply step (L-BFGS),\n    // the initial inverse Hessian approximation is taken to be the Identity.\n    // However, Oren showed that using instead I * \\gamma, where \\gamma is\n    // chosen to approximate an eigenvalue of the true inverse Hessian can\n    // result in improved convergence in a wide variety of cases. Setting\n    // use_approximate_eigenvalue_bfgs_scaling to true enables this scaling.\n    //\n    // It is important to note that approximate eigenvalue scaling does not\n    // always improve convergence, and that it can in fact significantly degrade\n    // performance for certain classes of problem, which is why it is disabled\n    // by default.  In particular it can degrade performance when the\n    // sensitivity of the problem to different parameters varies significantly,\n    // as in this case a single scalar factor fails to capture this variation\n    // and detrimentally downscales parts of the jacobian approximation which\n    // correspond to low-sensitivity parameters. It can also reduce the\n    // robustness of the solution to errors in the jacobians.\n    //\n    // Oren S.S., Self-scaling variable metric (SSVM) algorithms\n    // Part II: Implementation and experiments, Management Science,\n    // 20(5), 863-874, 1974.\n    bool use_approximate_eigenvalue_bfgs_scaling = false;\n\n    // Degree of the polynomial used to approximate the objective\n    // function. Valid values are BISECTION, QUADRATIC and CUBIC.\n    //\n    // BISECTION corresponds to pure backtracking search with no\n    // interpolation.\n    LineSearchInterpolationType line_search_interpolation_type = CUBIC;\n\n    // If during the line search, the step_size falls below this\n    // value, it is truncated to zero.\n    double min_line_search_step_size = 1e-9;\n\n    // Line search parameters.\n\n    // Solving the line search problem exactly is computationally\n    // prohibitive. Fortunately, line search based optimization\n    // algorithms can still guarantee convergence if instead of an\n    // exact solution, the line search algorithm returns a solution\n    // which decreases the value of the objective function\n    // sufficiently. More precisely, we are looking for a step_size\n    // s.t.\n    //\n    //   f(step_size) <= f(0) + sufficient_decrease * f'(0) * step_size\n    //\n    double line_search_sufficient_function_decrease = 1e-4;\n\n    // In each iteration of the line search,\n    //\n    //  new_step_size >= max_line_search_step_contraction * step_size\n    //\n    // Note that by definition, for contraction:\n    //\n    //  0 < max_step_contraction < min_step_contraction < 1\n    //\n    double max_line_search_step_contraction = 1e-3;\n\n    // In each iteration of the line search,\n    //\n    //  new_step_size <= min_line_search_step_contraction * step_size\n    //\n    // Note that by definition, for contraction:\n    //\n    //  0 < max_step_contraction < min_step_contraction < 1\n    //\n    double min_line_search_step_contraction = 0.6;\n\n    // Maximum number of trial step size iterations during each line search,\n    // if a step size satisfying the search conditions cannot be found within\n    // this number of trials, the line search will terminate.\n    int max_num_line_search_step_size_iterations = 20;\n\n    // Maximum number of restarts of the line search direction algorithm before\n    // terminating the optimization. Restarts of the line search direction\n    // algorithm occur when the current algorithm fails to produce a new descent\n    // direction. This typically indicates a numerical failure, or a breakdown\n    // in the validity of the approximations used.\n    int max_num_line_search_direction_restarts = 5;\n\n    // The strong Wolfe conditions consist of the Armijo sufficient\n    // decrease condition, and an additional requirement that the\n    // step-size be chosen s.t. the _magnitude_ ('strong' Wolfe\n    // conditions) of the gradient along the search direction\n    // decreases sufficiently. Precisely, this second condition\n    // is that we seek a step_size s.t.\n    //\n    //   |f'(step_size)| <= sufficient_curvature_decrease * |f'(0)|\n    //\n    // Where f() is the line search objective and f'() is the derivative\n    // of f w.r.t step_size (d f / d step_size).\n    double line_search_sufficient_curvature_decrease = 0.9;\n\n    // During the bracketing phase of the Wolfe search, the step size is\n    // increased until either a point satisfying the Wolfe conditions is\n    // found, or an upper bound for a bracket containing a point satisfying\n    // the conditions is found.  Precisely, at each iteration of the\n    // expansion:\n    //\n    //   new_step_size <= max_step_expansion * step_size.\n    //\n    // By definition for expansion, max_step_expansion > 1.0.\n    double max_line_search_step_expansion = 10.0;\n\n    // Maximum number of iterations for the minimizer to run for.\n    int max_num_iterations = 50;\n\n    // Maximum time for which the minimizer should run for.\n    double max_solver_time_in_seconds = 1e9;\n\n    // Minimizer terminates when\n    //\n    //   (new_cost - old_cost) < function_tolerance * old_cost;\n    //\n    double function_tolerance = 1e-6;\n\n    // Minimizer terminates when\n    //\n    //   max_i |x - Project(Plus(x, -g(x))| < gradient_tolerance\n    //\n    // This value should typically be 1e-4 * function_tolerance.\n    double gradient_tolerance = 1e-10;\n\n    // Minimizer terminates when\n    //\n    //   |step|_2 <= parameter_tolerance * ( |x|_2 +  parameter_tolerance)\n    //\n    double parameter_tolerance = 1e-8;\n\n    // Logging options ---------------------------------------------------------\n\n    LoggingType logging_type = PER_MINIMIZER_ITERATION;\n\n    // By default the Minimizer progress is logged to VLOG(1), which\n    // is sent to STDERR depending on the vlog level. If this flag is\n    // set to true, and logging_type is not SILENT, the logging output\n    // is sent to STDOUT.\n    bool minimizer_progress_to_stdout = false;\n\n    // If true, the user's parameter blocks are updated at the end of\n    // every Minimizer iteration, otherwise they are updated when the\n    // Minimizer terminates. This is useful if, for example, the user\n    // wishes to visualize the state of the optimization every\n    // iteration.\n    bool update_state_every_iteration = false;\n\n    // Callbacks that are executed at the end of each iteration of the\n    // Minimizer. An iteration may terminate midway, either due to\n    // numerical failures or because one of the convergence tests has\n    // been satisfied. In this case none of the callbacks are\n    // executed.\n\n    // Callbacks are executed in the order that they are specified in\n    // this vector. By default, parameter blocks are updated only at\n    // the end of the optimization, i.e when the Minimizer\n    // terminates. This behaviour is controlled by\n    // update_state_every_variable. If the user wishes to have access\n    // to the update parameter blocks when his/her callbacks are\n    // executed, then set update_state_every_iteration to true.\n    //\n    // The solver does NOT take ownership of these pointers.\n    std::vector<IterationCallback*> callbacks;\n  };\n\n  struct CERES_EXPORT Summary {\n    // A brief one line description of the state of the solver after\n    // termination.\n    std::string BriefReport() const;\n\n    // A full multiline description of the state of the solver after\n    // termination.\n    std::string FullReport() const;\n\n    bool IsSolutionUsable() const;\n\n    // Minimizer summary -------------------------------------------------\n    TerminationType termination_type = FAILURE;\n\n    // Reason why the solver terminated.\n    std::string message = \"ceres::GradientProblemSolve was not called.\";\n\n    // Cost of the problem (value of the objective function) before\n    // the optimization.\n    double initial_cost = -1.0;\n\n    // Cost of the problem (value of the objective function) after the\n    // optimization.\n    double final_cost = -1.0;\n\n    // IterationSummary for each minimizer iteration in order.\n    std::vector<IterationSummary> iterations;\n\n    // Number of times the cost (and not the gradient) was evaluated.\n    int num_cost_evaluations = -1;\n\n    // Number of times the gradient (and the cost) were evaluated.\n    int num_gradient_evaluations = -1;\n\n    // Sum total of all time spent inside Ceres when Solve is called.\n    double total_time_in_seconds = -1.0;\n\n    // Time (in seconds) spent evaluating the cost.\n    double cost_evaluation_time_in_seconds = -1.0;\n\n    // Time (in seconds) spent evaluating the gradient.\n    double gradient_evaluation_time_in_seconds = -1.0;\n\n    // Time (in seconds) spent minimizing the interpolating polynomial\n    // to compute the next candidate step size as part of a line search.\n    double line_search_polynomial_minimization_time_in_seconds = -1.0;\n\n    // Number of parameters in the problem.\n    int num_parameters = -1;\n\n    // Dimension of the tangent space of the problem.\n    int num_local_parameters = -1;\n\n    // Type of line search direction used.\n    LineSearchDirectionType line_search_direction_type = LBFGS;\n\n    // Type of the line search algorithm used.\n    LineSearchType line_search_type = WOLFE;\n\n    //  When performing line search, the degree of the polynomial used\n    //  to approximate the objective function.\n    LineSearchInterpolationType line_search_interpolation_type = CUBIC;\n\n    // If the line search direction is NONLINEAR_CONJUGATE_GRADIENT,\n    // then this indicates the particular variant of non-linear\n    // conjugate gradient used.\n    NonlinearConjugateGradientType nonlinear_conjugate_gradient_type =\n        FLETCHER_REEVES;\n\n    // If the type of the line search direction is LBFGS, then this\n    // indicates the rank of the Hessian approximation.\n    int max_lbfgs_rank = -1;\n  };\n\n  // Once a least squares problem has been built, this function takes\n  // the problem and optimizes it based on the values of the options\n  // parameters. Upon return, a detailed summary of the work performed\n  // by the preprocessor, the non-linear minimizer and the linear\n  // solver are reported in the summary object.\n  virtual void Solve(const GradientProblemSolver::Options& options,\n                     const GradientProblem& problem,\n                     double* parameters,\n                     GradientProblemSolver::Summary* summary);\n};\n\n// Helper function which avoids going through the interface.\nCERES_EXPORT void Solve(const GradientProblemSolver::Options& options,\n                        const GradientProblem& problem,\n                        double* parameters,\n                        GradientProblemSolver::Summary* summary);\n\n}  // namespace ceres\n\n#include \"ceres/internal/reenable_warnings.h\"\n\n#endif  // CERES_PUBLIC_GRADIENT_PROBLEM_SOLVER_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/internal/algorithm.h",
    "content": "// Copyright 2017 The Abseil Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      https://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n// -----------------------------------------------------------------------------\n// File: algorithm.h\n// -----------------------------------------------------------------------------\n//\n// This header file contains Google extensions to the standard <algorithm> C++\n// header.\n\n#ifndef CERES_PUBLIC_INTERNAL_ALGORITHM_H_\n#define CERES_PUBLIC_INTERNAL_ALGORITHM_H_\n\n#include <algorithm>\n#include <iterator>\n#include <type_traits>\n\nnamespace ceres {\nnamespace internal {\n\n// Performs comparisons with operator==, similar to C++14's `std::equal_to<>`.\nstruct EqualTo {\n  template <typename T, typename U>\n  bool operator()(const T& a, const U& b) const {\n    return a == b;\n  }\n};\n\ntemplate <typename InputIter1, typename InputIter2, typename Pred>\nbool EqualImpl(InputIter1 first1,\n               InputIter1 last1,\n               InputIter2 first2,\n               InputIter2 last2,\n               Pred pred,\n               std::input_iterator_tag,\n               std::input_iterator_tag) {\n  while (true) {\n    if (first1 == last1) return first2 == last2;\n    if (first2 == last2) return false;\n    if (!pred(*first1, *first2)) return false;\n    ++first1;\n    ++first2;\n  }\n}\n\ntemplate <typename InputIter1, typename InputIter2, typename Pred>\nbool EqualImpl(InputIter1 first1,\n               InputIter1 last1,\n               InputIter2 first2,\n               InputIter2 last2,\n               Pred&& pred,\n               std::random_access_iterator_tag,\n               std::random_access_iterator_tag) {\n  return (last1 - first1 == last2 - first2) &&\n         std::equal(first1, last1, first2, std::forward<Pred>(pred));\n}\n\n// When we are using our own internal predicate that just applies operator==, we\n// forward to the non-predicate form of std::equal. This enables an optimization\n// in libstdc++ that can result in std::memcmp being used for integer types.\ntemplate <typename InputIter1, typename InputIter2>\nbool EqualImpl(InputIter1 first1,\n               InputIter1 last1,\n               InputIter2 first2,\n               InputIter2 last2,\n               internal::EqualTo /* unused */,\n               std::random_access_iterator_tag,\n               std::random_access_iterator_tag) {\n  return (last1 - first1 == last2 - first2) &&\n         std::equal(first1, last1, first2);\n}\n\n// Compares the equality of two ranges specified by pairs of iterators, using\n// the given predicate, returning true iff for each corresponding iterator i1\n// and i2 in the first and second range respectively, pred(*i1, *i2) == true\n//\n// This comparison takes at most min(`last1` - `first1`, `last2` - `first2`)\n// invocations of the predicate. Additionally, if InputIter1 and InputIter2 are\n// both random-access iterators, and `last1` - `first1` != `last2` - `first2`,\n// then the predicate is never invoked and the function returns false.\n//\n// This is a C++11-compatible implementation of C++14 `std::equal`.  See\n// https://en.cppreference.com/w/cpp/algorithm/equal for more information.\ntemplate <typename InputIter1, typename InputIter2, typename Pred>\nbool equal(InputIter1 first1,\n           InputIter1 last1,\n           InputIter2 first2,\n           InputIter2 last2,\n           Pred&& pred) {\n  return internal::EqualImpl(\n      first1,\n      last1,\n      first2,\n      last2,\n      std::forward<Pred>(pred),\n      typename std::iterator_traits<InputIter1>::iterator_category{},\n      typename std::iterator_traits<InputIter2>::iterator_category{});\n}\n\n// Performs comparison of two ranges specified by pairs of iterators using\n// operator==.\ntemplate <typename InputIter1, typename InputIter2>\nbool equal(InputIter1 first1,\n           InputIter1 last1,\n           InputIter2 first2,\n           InputIter2 last2) {\n  return internal::equal(first1, last1, first2, last2, internal::EqualTo{});\n}\n}  // namespace internal\n}  // namespace ceres\n#endif  // CERES_PUBLIC_INTERNAL_ALGORITHM_H_"
  },
  {
    "path": "3rdparty/ceres/include/ceres/internal/array_selector.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2020 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: darius.rueckert@fau.de (Darius Rueckert)\n//\n\n#ifndef CERES_PUBLIC_INTERNAL_ARRAY_SELECTOR_H_\n#define CERES_PUBLIC_INTERNAL_ARRAY_SELECTOR_H_\n\n#include <array>\n#include <vector>\n\n#include \"ceres/internal/fixed_array.h\"\n#include \"ceres/types.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// StaticFixedArray selects the best array implementation based on template\n// arguments. If the size is not known at compile-time, pass\n// ceres::DYNAMIC as a size-template argument.\n//\n// Three different containers are selected in different scenarios:\n//\n//   num_elements == DYNAMIC:\n//      -> ceres::internal::FixedArray<T, max_stack_size>(size)\n\n//   num_elements != DYNAMIC  &&  num_elements <= max_stack_size\n//      -> std::array<T,num_elements>\n\n//   num_elements != DYNAMIC  &&  num_elements >  max_stack_size\n//      -> std::vector<T>(num_elements)\n//\ntemplate <typename T,\n          int num_elements,\n          int max_num_elements_on_stack,\n          bool dynamic = (num_elements == DYNAMIC),\n          bool fits_on_stack = (num_elements <= max_num_elements_on_stack)>\nstruct ArraySelector {};\n\ntemplate <typename T,\n          int num_elements,\n          int max_num_elements_on_stack,\n          bool fits_on_stack>\nstruct ArraySelector<T,\n                     num_elements,\n                     max_num_elements_on_stack,\n                     true,\n                     fits_on_stack>\n    : ceres::internal::FixedArray<T, max_num_elements_on_stack> {\n  ArraySelector(int s)\n      : ceres::internal::FixedArray<T, max_num_elements_on_stack>(s) {}\n};\n\ntemplate <typename T, int num_elements, int max_num_elements_on_stack>\nstruct ArraySelector<T, num_elements, max_num_elements_on_stack, false, true>\n    : std::array<T, num_elements> {\n  ArraySelector(int s) { CHECK_EQ(s, num_elements); }\n};\n\ntemplate <typename T, int num_elements, int max_num_elements_on_stack>\nstruct ArraySelector<T, num_elements, max_num_elements_on_stack, false, false>\n    : std::vector<T> {\n  ArraySelector(int s) : std::vector<T>(s) { CHECK_EQ(s, num_elements); }\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_PUBLIC_INTERNAL_ARRAY_SELECTOR_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/internal/autodiff.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n//\n// Computation of the Jacobian matrix for vector-valued functions of multiple\n// variables, using automatic differentiation based on the implementation of\n// dual numbers in jet.h. Before reading the rest of this file, it is advisable\n// to read jet.h's header comment in detail.\n//\n// The helper wrapper AutoDifferentiate() computes the jacobian of\n// functors with templated operator() taking this form:\n//\n//   struct F {\n//     template<typename T>\n//     bool operator()(const T *x, const T *y, ..., T *z) {\n//       // Compute z[] based on x[], y[], ...\n//       // return true if computation succeeded, false otherwise.\n//     }\n//   };\n//\n// All inputs and outputs may be vector-valued.\n//\n// To understand how jets are used to compute the jacobian, a\n// picture may help. Consider a vector-valued function, F, returning 3\n// dimensions and taking a vector-valued parameter of 4 dimensions:\n//\n//     y            x\n//   [ * ]    F   [ * ]\n//   [ * ]  <---  [ * ]\n//   [ * ]        [ * ]\n//                [ * ]\n//\n// Similar to the 2-parameter example for f described in jet.h, computing the\n// jacobian dy/dx is done by substituting a suitable jet object for x and all\n// intermediate steps of the computation of F. Since x is has 4 dimensions, use\n// a Jet<double, 4>.\n//\n// Before substituting a jet object for x, the dual components are set\n// appropriately for each dimension of x:\n//\n//          y                       x\n//   [ * | * * * * ]    f   [ * | 1 0 0 0 ]   x0\n//   [ * | * * * * ]  <---  [ * | 0 1 0 0 ]   x1\n//   [ * | * * * * ]        [ * | 0 0 1 0 ]   x2\n//         ---+---          [ * | 0 0 0 1 ]   x3\n//            |                   ^ ^ ^ ^\n//          dy/dx                 | | | +----- infinitesimal for x3\n//                                | | +------- infinitesimal for x2\n//                                | +--------- infinitesimal for x1\n//                                +----------- infinitesimal for x0\n//\n// The reason to set the internal 4x4 submatrix to the identity is that we wish\n// to take the derivative of y separately with respect to each dimension of x.\n// Each column of the 4x4 identity is therefore for a single component of the\n// independent variable x.\n//\n// Then the jacobian of the mapping, dy/dx, is the 3x4 sub-matrix of the\n// extended y vector, indicated in the above diagram.\n//\n// Functors with multiple parameters\n// ---------------------------------\n// In practice, it is often convenient to use a function f of two or more\n// vector-valued parameters, for example, x[3] and z[6]. Unfortunately, the jet\n// framework is designed for a single-parameter vector-valued input. The wrapper\n// in this file addresses this issue adding support for functions with one or\n// more parameter vectors.\n//\n// To support multiple parameters, all the parameter vectors are concatenated\n// into one and treated as a single parameter vector, except that since the\n// functor expects different inputs, we need to construct the jets as if they\n// were part of a single parameter vector. The extended jets are passed\n// separately for each parameter.\n//\n// For example, consider a functor F taking two vector parameters, p[2] and\n// q[3], and producing an output y[4]:\n//\n//   struct F {\n//     template<typename T>\n//     bool operator()(const T *p, const T *q, T *z) {\n//       // ...\n//     }\n//   };\n//\n// In this case, the necessary jet type is Jet<double, 5>. Here is a\n// visualization of the jet objects in this case:\n//\n//          Dual components for p ----+\n//                                    |\n//                                   -+-\n//           y                 [ * | 1 0 | 0 0 0 ]    --- p[0]\n//                             [ * | 0 1 | 0 0 0 ]    --- p[1]\n//   [ * | . . | + + + ]         |\n//   [ * | . . | + + + ]         v\n//   [ * | . . | + + + ]  <--- F(p, q)\n//   [ * | . . | + + + ]            ^\n//         ^^^   ^^^^^              |\n//        dy/dp  dy/dq            [ * | 0 0 | 1 0 0 ] --- q[0]\n//                                [ * | 0 0 | 0 1 0 ] --- q[1]\n//                                [ * | 0 0 | 0 0 1 ] --- q[2]\n//                                            --+--\n//                                              |\n//          Dual components for q --------------+\n//\n// where the 4x2 submatrix (marked with \".\") and 4x3 submatrix (marked with \"+\"\n// of y in the above diagram are the derivatives of y with respect to p and q\n// respectively. This is how autodiff works for functors taking multiple vector\n// valued arguments (up to 6).\n//\n// Jacobian NULL pointers\n// ----------------------\n// In general, the functions below will accept NULL pointers for all or some of\n// the Jacobian parameters, meaning that those Jacobians will not be computed.\n\n#ifndef CERES_PUBLIC_INTERNAL_AUTODIFF_H_\n#define CERES_PUBLIC_INTERNAL_AUTODIFF_H_\n\n#include <stddef.h>\n\n#include <array>\n\n#include \"ceres/internal/array_selector.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/internal/fixed_array.h\"\n#include \"ceres/internal/parameter_dims.h\"\n#include \"ceres/internal/variadic_evaluate.h\"\n#include \"ceres/jet.h\"\n#include \"ceres/types.h\"\n#include \"glog/logging.h\"\n\n// If the number of parameters exceeds this values, the corresponding jets are\n// placed on the heap. This will reduce performance by a factor of 2-5 on\n// current compilers.\n#ifndef CERES_AUTODIFF_MAX_PARAMETERS_ON_STACK\n#define CERES_AUTODIFF_MAX_PARAMETERS_ON_STACK 50\n#endif\n\n#ifndef CERES_AUTODIFF_MAX_RESIDUALS_ON_STACK\n#define CERES_AUTODIFF_MAX_RESIDUALS_ON_STACK 20\n#endif\n\nnamespace ceres {\nnamespace internal {\n\n// Extends src by a 1st order perturbation for every dimension and puts it in\n// dst. The size of src is N. Since this is also used for perturbations in\n// blocked arrays, offset is used to shift which part of the jet the\n// perturbation occurs. This is used to set up the extended x augmented by an\n// identity matrix. The JetT type should be a Jet type, and T should be a\n// numeric type (e.g. double). For example,\n//\n//             0   1 2   3 4 5   6 7 8\n//   dst[0]  [ * | . . | 1 0 0 | . . . ]\n//   dst[1]  [ * | . . | 0 1 0 | . . . ]\n//   dst[2]  [ * | . . | 0 0 1 | . . . ]\n//\n// is what would get put in dst if N was 3, offset was 3, and the jet type JetT\n// was 8-dimensional.\ntemplate <int j, int N, int Offset, typename T, typename JetT>\nstruct Make1stOrderPerturbation {\n public:\n  static void Apply(const T* src, JetT* dst) {\n    if (j == 0) {\n      DCHECK(src);\n      DCHECK(dst);\n    }\n    dst[j] = JetT(src[j], j + Offset);\n    Make1stOrderPerturbation<j + 1, N, Offset, T, JetT>::Apply(src, dst);\n  }\n};\n\ntemplate <int N, int Offset, typename T, typename JetT>\nstruct Make1stOrderPerturbation<N, N, Offset, T, JetT> {\n public:\n  static void Apply(const T* src, JetT* dst) {}\n};\n\n// Calls Make1stOrderPerturbation for every parameter block.\n//\n// Example:\n// If one having three parameter blocks with dimensions (3, 2, 4), the call\n// Make1stOrderPerturbations<integer_sequence<3, 2, 4>::Apply(params, x);\n// will result in the following calls to Make1stOrderPerturbation:\n// Make1stOrderPerturbation<0, 3, 0>::Apply(params[0], x + 0);\n// Make1stOrderPerturbation<0, 2, 3>::Apply(params[1], x + 3);\n// Make1stOrderPerturbation<0, 4, 5>::Apply(params[2], x + 5);\ntemplate <typename Seq, int ParameterIdx = 0, int Offset = 0>\nstruct Make1stOrderPerturbations;\n\ntemplate <int N, int... Ns, int ParameterIdx, int Offset>\nstruct Make1stOrderPerturbations<integer_sequence<int, N, Ns...>,\n                                 ParameterIdx,\n                                 Offset> {\n  template <typename T, typename JetT>\n  static void Apply(T const* const* parameters, JetT* x) {\n    Make1stOrderPerturbation<0, N, Offset, T, JetT>::Apply(\n        parameters[ParameterIdx], x + Offset);\n    Make1stOrderPerturbations<integer_sequence<int, Ns...>,\n                              ParameterIdx + 1,\n                              Offset + N>::Apply(parameters, x);\n  }\n};\n\n// End of 'recursion'. Nothing more to do.\ntemplate <int ParameterIdx, int Total>\nstruct Make1stOrderPerturbations<integer_sequence<int>, ParameterIdx, Total> {\n  template <typename T, typename JetT>\n  static void Apply(T const* const* /* NOT USED */, JetT* /* NOT USED */) {}\n};\n\n// Takes the 0th order part of src, assumed to be a Jet type, and puts it in\n// dst. This is used to pick out the \"vector\" part of the extended y.\ntemplate <typename JetT, typename T>\ninline void Take0thOrderPart(int M, const JetT* src, T dst) {\n  DCHECK(src);\n  for (int i = 0; i < M; ++i) {\n    dst[i] = src[i].a;\n  }\n}\n\n// Takes N 1st order parts, starting at index N0, and puts them in the M x N\n// matrix 'dst'. This is used to pick out the \"matrix\" parts of the extended y.\ntemplate <int N0, int N, typename JetT, typename T>\ninline void Take1stOrderPart(const int M, const JetT* src, T* dst) {\n  DCHECK(src);\n  DCHECK(dst);\n  for (int i = 0; i < M; ++i) {\n    Eigen::Map<Eigen::Matrix<T, N, 1>>(dst + N * i, N) =\n        src[i].v.template segment<N>(N0);\n  }\n}\n\n// Calls Take1stOrderPart for every parameter block.\n//\n// Example:\n// If one having three parameter blocks with dimensions (3, 2, 4), the call\n// Take1stOrderParts<integer_sequence<3, 2, 4>::Apply(num_outputs,\n//                                                    output,\n//                                                    jacobians);\n// will result in the following calls to Take1stOrderPart:\n// if (jacobians[0]) {\n//   Take1stOrderPart<0, 3>(num_outputs, output, jacobians[0]);\n// }\n// if (jacobians[1]) {\n//   Take1stOrderPart<3, 2>(num_outputs, output, jacobians[1]);\n// }\n// if (jacobians[2]) {\n//   Take1stOrderPart<5, 4>(num_outputs, output, jacobians[2]);\n// }\ntemplate <typename Seq, int ParameterIdx = 0, int Offset = 0>\nstruct Take1stOrderParts;\n\ntemplate <int N, int... Ns, int ParameterIdx, int Offset>\nstruct Take1stOrderParts<integer_sequence<int, N, Ns...>,\n                         ParameterIdx,\n                         Offset> {\n  template <typename JetT, typename T>\n  static void Apply(int num_outputs, JetT* output, T** jacobians) {\n    if (jacobians[ParameterIdx]) {\n      Take1stOrderPart<Offset, N>(num_outputs, output, jacobians[ParameterIdx]);\n    }\n    Take1stOrderParts<integer_sequence<int, Ns...>,\n                      ParameterIdx + 1,\n                      Offset + N>::Apply(num_outputs, output, jacobians);\n  }\n};\n\n// End of 'recursion'. Nothing more to do.\ntemplate <int ParameterIdx, int Offset>\nstruct Take1stOrderParts<integer_sequence<int>, ParameterIdx, Offset> {\n  template <typename T, typename JetT>\n  static void Apply(int /* NOT USED*/,\n                    JetT* /* NOT USED*/,\n                    T** /* NOT USED */) {}\n};\n\ntemplate <int kNumResiduals,\n          typename ParameterDims,\n          typename Functor,\n          typename T>\ninline bool AutoDifferentiate(const Functor& functor,\n                              T const* const* parameters,\n                              int dynamic_num_outputs,\n                              T* function_value,\n                              T** jacobians) {\n  typedef Jet<T, ParameterDims::kNumParameters> JetT;\n  using Parameters = typename ParameterDims::Parameters;\n\n  if (kNumResiduals != DYNAMIC) {\n    DCHECK_EQ(kNumResiduals, dynamic_num_outputs);\n  }\n\n  ArraySelector<JetT,\n                ParameterDims::kNumParameters,\n                CERES_AUTODIFF_MAX_PARAMETERS_ON_STACK>\n      parameters_as_jets(ParameterDims::kNumParameters);\n\n  // Pointers to the beginning of each parameter block\n  std::array<JetT*, ParameterDims::kNumParameterBlocks> unpacked_parameters =\n      ParameterDims::GetUnpackedParameters(parameters_as_jets.data());\n\n  // If the number of residuals is fixed, we use the template argument as the\n  // number of outputs. Otherwise we use the num_outputs parameter. Note: The\n  // ?-operator here is compile-time evaluated, therefore num_outputs is also\n  // a compile-time constant for functors with fixed residuals.\n  const int num_outputs =\n      kNumResiduals == DYNAMIC ? dynamic_num_outputs : kNumResiduals;\n  DCHECK_GT(num_outputs, 0);\n\n  ArraySelector<JetT, kNumResiduals, CERES_AUTODIFF_MAX_RESIDUALS_ON_STACK>\n      residuals_as_jets(num_outputs);\n\n  // Invalidate the output Jets, so that we can detect if the user\n  // did not assign values to all of them.\n  for (int i = 0; i < num_outputs; ++i) {\n    residuals_as_jets[i].a = kImpossibleValue;\n    residuals_as_jets[i].v.setConstant(kImpossibleValue);\n  }\n\n  Make1stOrderPerturbations<Parameters>::Apply(parameters,\n                                               parameters_as_jets.data());\n\n  if (!VariadicEvaluate<ParameterDims>(\n          functor, unpacked_parameters.data(), residuals_as_jets.data())) {\n    return false;\n  }\n\n  Take0thOrderPart(num_outputs, residuals_as_jets.data(), function_value);\n  Take1stOrderParts<Parameters>::Apply(\n      num_outputs, residuals_as_jets.data(), jacobians);\n\n  return true;\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_PUBLIC_INTERNAL_AUTODIFF_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/internal/config.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: alexs.mac@gmail.com (Alex Stewart)\n\n// Configuration options for Ceres.\n//\n// Do not edit this file, it was automatically configured by CMake when\n// Ceres was compiled with the relevant configuration for the machine\n// on which Ceres was compiled.\n//\n// Ceres Developers: All options should have the same name as their mapped\n//                   CMake options, in the preconfigured version of this file\n//                   all options should be enclosed in '@'.\n\n#ifndef CERES_PUBLIC_INTERNAL_CONFIG_H_\n#define CERES_PUBLIC_INTERNAL_CONFIG_H_\n\n// If defined, use the LGPL code in Eigen.\n// #define CERES_USE_EIGEN_SPARSE\n\n// If defined, Ceres was compiled without LAPACK.\n#define CERES_NO_LAPACK\n\n// If defined, Ceres was compiled without SuiteSparse.\n#define CERES_NO_SUITESPARSE\n\n// If defined, Ceres was compiled without CXSparse.\n#define CERES_NO_CXSPARSE\n\n// If defined, Ceres was compiled without Apple's Accelerate framework solvers.\n#define CERES_NO_ACCELERATE_SPARSE\n\n#if defined(CERES_NO_SUITESPARSE) &&              \\\n    defined(CERES_NO_ACCELERATE_SPARSE) &&        \\\n    defined(CERES_NO_CXSPARSE) &&                 \\\n    !defined(CERES_USE_EIGEN_SPARSE)  // NOLINT\n// If defined Ceres was compiled without any sparse linear algebra support.\n#define CERES_NO_SPARSE\n#endif\n\n// If defined, Ceres was compiled without Schur specializations.\n// #define CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n// If defined, Ceres was compiled to use Eigen instead of hardcoded BLAS\n// routines.\n// #define CERES_NO_CUSTOM_BLAS\n\n// If defined, Ceres was compiled without multithreading support.\n// #define CERES_NO_THREADS\n// If defined Ceres was compiled with OpenMP multithreading support.\n// #define CERES_USE_OPENMP\n// If defined Ceres was compiled with C++11 thread support.\n#define CERES_USE_CXX11_THREADS\n\n// If defined, Ceres was built as a shared library.\n// #define CERES_USING_SHARED_LIBRARY\n\n// If defined, Ceres was compiled with a version MSVC >= 2005 which\n// deprecated the standard POSIX names for bessel functions, replacing them\n// with underscore prefixed versions (e.g. j0() -> _j0()).\n// #define CERES_MSVC_USE_UNDERSCORE_PREFIXED_BESSEL_FUNCTIONS\n\n#endif  // CERES_PUBLIC_INTERNAL_CONFIG_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/internal/disable_warnings.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// This file has the sole purpose to silence warnings when including Ceres.\n\n// This is not your usual header guard. The macro CERES_WARNINGS_DISABLED\n// shows up again in reenable_warnings.h.\n#ifndef CERES_WARNINGS_DISABLED\n#define CERES_WARNINGS_DISABLED\n\n#ifdef _MSC_VER\n#pragma warning( push )\n// Disable the warning C4251 which is triggered by stl classes in\n// Ceres' public interface. To quote MSDN: \"C4251 can be ignored \"\n// \"if you are deriving from a type in the Standard C++ Library\"\n#pragma warning( disable : 4251 )\n#endif\n\n#endif  // CERES_WARNINGS_DISABLED\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/internal/eigen.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_EIGEN_H_\n#define CERES_INTERNAL_EIGEN_H_\n\n#include \"Eigen/Core\"\n\nnamespace ceres {\n\ntypedef Eigen::Matrix<double, Eigen::Dynamic, 1> Vector;\ntypedef Eigen::Matrix<double,\n                      Eigen::Dynamic,\n                      Eigen::Dynamic,\n                      Eigen::RowMajor> Matrix;\ntypedef Eigen::Map<Vector> VectorRef;\ntypedef Eigen::Map<Matrix> MatrixRef;\ntypedef Eigen::Map<const Vector> ConstVectorRef;\ntypedef Eigen::Map<const Matrix> ConstMatrixRef;\n\n// Column major matrices for DenseSparseMatrix/DenseQRSolver\ntypedef Eigen::Matrix<double,\n                      Eigen::Dynamic,\n                      Eigen::Dynamic,\n                      Eigen::ColMajor> ColMajorMatrix;\n\ntypedef Eigen::Map<ColMajorMatrix, 0,\n                   Eigen::Stride<Eigen::Dynamic, 1>> ColMajorMatrixRef;\n\ntypedef Eigen::Map<const ColMajorMatrix,\n                   0,\n                   Eigen::Stride<Eigen::Dynamic, 1>> ConstColMajorMatrixRef;\n\n// C++ does not support templated typdefs, thus the need for this\n// struct so that we can support statically sized Matrix and Maps.\n template <int num_rows = Eigen::Dynamic, int num_cols = Eigen::Dynamic>\nstruct EigenTypes {\n  typedef Eigen::Matrix<double,\n                        num_rows,\n                        num_cols,\n                        num_cols == 1 ? Eigen::ColMajor : Eigen::RowMajor>\n      Matrix;\n\n  typedef Eigen::Map<Matrix> MatrixRef;\n  typedef Eigen::Map<const Matrix> ConstMatrixRef;\n  typedef Eigen::Matrix<double, num_rows, 1> Vector;\n  typedef Eigen::Map<Eigen::Matrix<double, num_rows, 1>> VectorRef;\n  typedef Eigen::Map<const Eigen::Matrix<double, num_rows, 1>> ConstVectorRef;\n};\n\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_EIGEN_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/internal/fixed_array.h",
    "content": "// Copyright 2018 The Abseil Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      https://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n// -----------------------------------------------------------------------------\n// File: fixed_array.h\n// -----------------------------------------------------------------------------\n//\n// A `FixedArray<T>` represents a non-resizable array of `T` where the length of\n// the array can be determined at run-time. It is a good replacement for\n// non-standard and deprecated uses of `alloca()` and variable length arrays\n// within the GCC extension. (See\n// https://gcc.gnu.org/onlinedocs/gcc/Variable-Length.html).\n//\n// `FixedArray` allocates small arrays inline, keeping performance fast by\n// avoiding heap operations. It also helps reduce the chances of\n// accidentally overflowing your stack if large input is passed to\n// your function.\n\n#ifndef CERES_PUBLIC_INTERNAL_FIXED_ARRAY_H_\n#define CERES_PUBLIC_INTERNAL_FIXED_ARRAY_H_\n\n#include <algorithm>\n#include <array>\n#include <cstddef>\n#include <memory>\n#include <tuple>\n#include <type_traits>\n\n#include <Eigen/Core> // For Eigen::aligned_allocator\n\n#include \"ceres/internal/algorithm.h\"\n#include \"ceres/internal/memory.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nconstexpr static auto kFixedArrayUseDefault = static_cast<size_t>(-1);\n\n// The default fixed array allocator.\n//\n// As one can not easily detect if a struct contains or inherits from a fixed\n// size Eigen type, to be safe the Eigen::aligned_allocator is used by default.\n// But trivial types can never contain Eigen types, so std::allocator is used to\n// safe some heap memory.\ntemplate <typename T>\nusing FixedArrayDefaultAllocator =\n    typename std::conditional<std::is_trivial<T>::value,\n                              std::allocator<T>,\n                              Eigen::aligned_allocator<T>>::type;\n\n// -----------------------------------------------------------------------------\n// FixedArray\n// -----------------------------------------------------------------------------\n//\n// A `FixedArray` provides a run-time fixed-size array, allocating a small array\n// inline for efficiency.\n//\n// Most users should not specify an `inline_elements` argument and let\n// `FixedArray` automatically determine the number of elements\n// to store inline based on `sizeof(T)`. If `inline_elements` is specified, the\n// `FixedArray` implementation will use inline storage for arrays with a\n// length <= `inline_elements`.\n//\n// Note that a `FixedArray` constructed with a `size_type` argument will\n// default-initialize its values by leaving trivially constructible types\n// uninitialized (e.g. int, int[4], double), and others default-constructed.\n// This matches the behavior of c-style arrays and `std::array`, but not\n// `std::vector`.\n//\n// Note that `FixedArray` does not provide a public allocator; if it requires a\n// heap allocation, it will do so with global `::operator new[]()` and\n// `::operator delete[]()`, even if T provides class-scope overrides for these\n// operators.\ntemplate <typename T,\n          size_t N = kFixedArrayUseDefault,\n          typename A = FixedArrayDefaultAllocator<T>>\nclass FixedArray {\n  static_assert(!std::is_array<T>::value || std::extent<T>::value > 0,\n                \"Arrays with unknown bounds cannot be used with FixedArray.\");\n\n  static constexpr size_t kInlineBytesDefault = 256;\n\n  using AllocatorTraits = std::allocator_traits<A>;\n  // std::iterator_traits isn't guaranteed to be SFINAE-friendly until C++17,\n  // but this seems to be mostly pedantic.\n  template <typename Iterator>\n  using EnableIfForwardIterator = typename std::enable_if<std::is_convertible<\n      typename std::iterator_traits<Iterator>::iterator_category,\n      std::forward_iterator_tag>::value>::type;\n  static constexpr bool DefaultConstructorIsNonTrivial() {\n    return !std::is_trivially_default_constructible<StorageElement>::value;\n  }\n\n public:\n  using allocator_type = typename AllocatorTraits::allocator_type;\n  using value_type = typename allocator_type::value_type;\n  using pointer = typename allocator_type::pointer;\n  using const_pointer = typename allocator_type::const_pointer;\n  using reference = typename allocator_type::reference;\n  using const_reference = typename allocator_type::const_reference;\n  using size_type = typename allocator_type::size_type;\n  using difference_type = typename allocator_type::difference_type;\n  using iterator = pointer;\n  using const_iterator = const_pointer;\n  using reverse_iterator = std::reverse_iterator<iterator>;\n  using const_reverse_iterator = std::reverse_iterator<const_iterator>;\n\n  static constexpr size_type inline_elements =\n      (N == kFixedArrayUseDefault ? kInlineBytesDefault / sizeof(value_type)\n                                  : static_cast<size_type>(N));\n\n  FixedArray(const FixedArray& other,\n             const allocator_type& a = allocator_type())\n      : FixedArray(other.begin(), other.end(), a) {}\n\n  FixedArray(FixedArray&& other, const allocator_type& a = allocator_type())\n      : FixedArray(std::make_move_iterator(other.begin()),\n                   std::make_move_iterator(other.end()),\n                   a) {}\n\n  // Creates an array object that can store `n` elements.\n  // Note that trivially constructible elements will be uninitialized.\n  explicit FixedArray(size_type n, const allocator_type& a = allocator_type())\n      : storage_(n, a) {\n    if (DefaultConstructorIsNonTrivial()) {\n      ConstructRange(storage_.alloc(), storage_.begin(), storage_.end());\n    }\n  }\n\n  // Creates an array initialized with `n` copies of `val`.\n  FixedArray(size_type n,\n             const value_type& val,\n             const allocator_type& a = allocator_type())\n      : storage_(n, a) {\n    ConstructRange(storage_.alloc(), storage_.begin(), storage_.end(), val);\n  }\n\n  // Creates an array initialized with the size and contents of `init_list`.\n  FixedArray(std::initializer_list<value_type> init_list,\n             const allocator_type& a = allocator_type())\n      : FixedArray(init_list.begin(), init_list.end(), a) {}\n\n  // Creates an array initialized with the elements from the input\n  // range. The array's size will always be `std::distance(first, last)`.\n  // REQUIRES: Iterator must be a forward_iterator or better.\n  template <typename Iterator, EnableIfForwardIterator<Iterator>* = nullptr>\n  FixedArray(Iterator first,\n             Iterator last,\n             const allocator_type& a = allocator_type())\n      : storage_(std::distance(first, last), a) {\n    CopyRange(storage_.alloc(), storage_.begin(), first, last);\n  }\n\n  ~FixedArray() noexcept {\n    for (auto* cur = storage_.begin(); cur != storage_.end(); ++cur) {\n      AllocatorTraits::destroy(storage_.alloc(), cur);\n    }\n  }\n\n  // Assignments are deleted because they break the invariant that the size of a\n  // `FixedArray` never changes.\n  void operator=(FixedArray&&) = delete;\n  void operator=(const FixedArray&) = delete;\n\n  // FixedArray::size()\n  //\n  // Returns the length of the fixed array.\n  size_type size() const { return storage_.size(); }\n\n  // FixedArray::max_size()\n  //\n  // Returns the largest possible value of `std::distance(begin(), end())` for a\n  // `FixedArray<T>`. This is equivalent to the most possible addressable bytes\n  // over the number of bytes taken by T.\n  constexpr size_type max_size() const {\n    return (std::numeric_limits<difference_type>::max)() / sizeof(value_type);\n  }\n\n  // FixedArray::empty()\n  //\n  // Returns whether or not the fixed array is empty.\n  bool empty() const { return size() == 0; }\n\n  // FixedArray::memsize()\n  //\n  // Returns the memory size of the fixed array in bytes.\n  size_t memsize() const { return size() * sizeof(value_type); }\n\n  // FixedArray::data()\n  //\n  // Returns a const T* pointer to elements of the `FixedArray`. This pointer\n  // can be used to access (but not modify) the contained elements.\n  const_pointer data() const { return AsValueType(storage_.begin()); }\n\n  // Overload of FixedArray::data() to return a T* pointer to elements of the\n  // fixed array. This pointer can be used to access and modify the contained\n  // elements.\n  pointer data() { return AsValueType(storage_.begin()); }\n\n  // FixedArray::operator[]\n  //\n  // Returns a reference the ith element of the fixed array.\n  // REQUIRES: 0 <= i < size()\n  reference operator[](size_type i) {\n    DCHECK_LT(i, size());\n    return data()[i];\n  }\n\n  // Overload of FixedArray::operator()[] to return a const reference to the\n  // ith element of the fixed array.\n  // REQUIRES: 0 <= i < size()\n  const_reference operator[](size_type i) const {\n    DCHECK_LT(i, size());\n    return data()[i];\n  }\n\n  // FixedArray::front()\n  //\n  // Returns a reference to the first element of the fixed array.\n  reference front() { return *begin(); }\n\n  // Overload of FixedArray::front() to return a reference to the first element\n  // of a fixed array of const values.\n  const_reference front() const { return *begin(); }\n\n  // FixedArray::back()\n  //\n  // Returns a reference to the last element of the fixed array.\n  reference back() { return *(end() - 1); }\n\n  // Overload of FixedArray::back() to return a reference to the last element\n  // of a fixed array of const values.\n  const_reference back() const { return *(end() - 1); }\n\n  // FixedArray::begin()\n  //\n  // Returns an iterator to the beginning of the fixed array.\n  iterator begin() { return data(); }\n\n  // Overload of FixedArray::begin() to return a const iterator to the\n  // beginning of the fixed array.\n  const_iterator begin() const { return data(); }\n\n  // FixedArray::cbegin()\n  //\n  // Returns a const iterator to the beginning of the fixed array.\n  const_iterator cbegin() const { return begin(); }\n\n  // FixedArray::end()\n  //\n  // Returns an iterator to the end of the fixed array.\n  iterator end() { return data() + size(); }\n\n  // Overload of FixedArray::end() to return a const iterator to the end of the\n  // fixed array.\n  const_iterator end() const { return data() + size(); }\n\n  // FixedArray::cend()\n  //\n  // Returns a const iterator to the end of the fixed array.\n  const_iterator cend() const { return end(); }\n\n  // FixedArray::rbegin()\n  //\n  // Returns a reverse iterator from the end of the fixed array.\n  reverse_iterator rbegin() { return reverse_iterator(end()); }\n\n  // Overload of FixedArray::rbegin() to return a const reverse iterator from\n  // the end of the fixed array.\n  const_reverse_iterator rbegin() const {\n    return const_reverse_iterator(end());\n  }\n\n  // FixedArray::crbegin()\n  //\n  // Returns a const reverse iterator from the end of the fixed array.\n  const_reverse_iterator crbegin() const { return rbegin(); }\n\n  // FixedArray::rend()\n  //\n  // Returns a reverse iterator from the beginning of the fixed array.\n  reverse_iterator rend() { return reverse_iterator(begin()); }\n\n  // Overload of FixedArray::rend() for returning a const reverse iterator\n  // from the beginning of the fixed array.\n  const_reverse_iterator rend() const {\n    return const_reverse_iterator(begin());\n  }\n\n  // FixedArray::crend()\n  //\n  // Returns a reverse iterator from the beginning of the fixed array.\n  const_reverse_iterator crend() const { return rend(); }\n\n  // FixedArray::fill()\n  //\n  // Assigns the given `value` to all elements in the fixed array.\n  void fill(const value_type& val) { std::fill(begin(), end(), val); }\n\n  // Relational operators. Equality operators are elementwise using\n  // `operator==`, while order operators order FixedArrays lexicographically.\n  friend bool operator==(const FixedArray& lhs, const FixedArray& rhs) {\n    return internal::equal(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());\n  }\n\n  friend bool operator!=(const FixedArray& lhs, const FixedArray& rhs) {\n    return !(lhs == rhs);\n  }\n\n  friend bool operator<(const FixedArray& lhs, const FixedArray& rhs) {\n    return std::lexicographical_compare(\n        lhs.begin(), lhs.end(), rhs.begin(), rhs.end());\n  }\n\n  friend bool operator>(const FixedArray& lhs, const FixedArray& rhs) {\n    return rhs < lhs;\n  }\n\n  friend bool operator<=(const FixedArray& lhs, const FixedArray& rhs) {\n    return !(rhs < lhs);\n  }\n\n  friend bool operator>=(const FixedArray& lhs, const FixedArray& rhs) {\n    return !(lhs < rhs);\n  }\n\n private:\n  // StorageElement\n  //\n  // For FixedArrays with a C-style-array value_type, StorageElement is a POD\n  // wrapper struct called StorageElementWrapper that holds the value_type\n  // instance inside. This is needed for construction and destruction of the\n  // entire array regardless of how many dimensions it has. For all other cases,\n  // StorageElement is just an alias of value_type.\n  //\n  // Maintainer's Note: The simpler solution would be to simply wrap value_type\n  // in a struct whether it's an array or not. That causes some paranoid\n  // diagnostics to misfire, believing that 'data()' returns a pointer to a\n  // single element, rather than the packed array that it really is.\n  // e.g.:\n  //\n  //     FixedArray<char> buf(1);\n  //     sprintf(buf.data(), \"foo\");\n  //\n  //     error: call to int __builtin___sprintf_chk(etc...)\n  //     will always overflow destination buffer [-Werror]\n  //\n  template <typename OuterT,\n            typename InnerT = typename std::remove_extent<OuterT>::type,\n            size_t InnerN = std::extent<OuterT>::value>\n  struct StorageElementWrapper {\n    InnerT array[InnerN];\n  };\n\n  using StorageElement =\n      typename std::conditional<std::is_array<value_type>::value,\n                                StorageElementWrapper<value_type>,\n                                value_type>::type;\n\n  static pointer AsValueType(pointer ptr) { return ptr; }\n  static pointer AsValueType(StorageElementWrapper<value_type>* ptr) {\n    return std::addressof(ptr->array);\n  }\n\n  static_assert(sizeof(StorageElement) == sizeof(value_type), \"\");\n  static_assert(alignof(StorageElement) == alignof(value_type), \"\");\n\n  class NonEmptyInlinedStorage {\n   public:\n    StorageElement* data() { return reinterpret_cast<StorageElement*>(buff_); }\n    void AnnotateConstruct(size_type) {}\n    void AnnotateDestruct(size_type) {}\n\n    // #ifdef ADDRESS_SANITIZER\n    //     void* RedzoneBegin() { return &redzone_begin_; }\n    //     void* RedzoneEnd() { return &redzone_end_ + 1; }\n    // #endif  // ADDRESS_SANITIZER\n\n   private:\n    // ADDRESS_SANITIZER_REDZONE(redzone_begin_);\n    alignas(StorageElement) char buff_[sizeof(StorageElement[inline_elements])];\n    // ADDRESS_SANITIZER_REDZONE(redzone_end_);\n  };\n\n  class EmptyInlinedStorage {\n   public:\n    StorageElement* data() { return nullptr; }\n    void AnnotateConstruct(size_type) {}\n    void AnnotateDestruct(size_type) {}\n  };\n\n  using InlinedStorage =\n      typename std::conditional<inline_elements == 0,\n                                EmptyInlinedStorage,\n                                NonEmptyInlinedStorage>::type;\n\n  // Storage\n  //\n  // An instance of Storage manages the inline and out-of-line memory for\n  // instances of FixedArray. This guarantees that even when construction of\n  // individual elements fails in the FixedArray constructor body, the\n  // destructor for Storage will still be called and out-of-line memory will be\n  // properly deallocated.\n  //\n  class Storage : public InlinedStorage {\n   public:\n    Storage(size_type n, const allocator_type& a)\n        : size_alloc_(n, a), data_(InitializeData()) {}\n\n    ~Storage() noexcept {\n      if (UsingInlinedStorage(size())) {\n        InlinedStorage::AnnotateDestruct(size());\n      } else {\n        AllocatorTraits::deallocate(alloc(), AsValueType(begin()), size());\n      }\n    }\n\n    size_type size() const { return std::get<0>(size_alloc_); }\n    StorageElement* begin() const { return data_; }\n    StorageElement* end() const { return begin() + size(); }\n    allocator_type& alloc() { return std::get<1>(size_alloc_); }\n\n   private:\n    static bool UsingInlinedStorage(size_type n) {\n      return n <= inline_elements;\n    }\n\n    StorageElement* InitializeData() {\n      if (UsingInlinedStorage(size())) {\n        InlinedStorage::AnnotateConstruct(size());\n        return InlinedStorage::data();\n      } else {\n        return reinterpret_cast<StorageElement*>(\n            AllocatorTraits::allocate(alloc(), size()));\n      }\n    }\n\n    // Using std::tuple and not absl::CompressedTuple, as it has a lot of\n    // dependencies to other absl headers.\n    std::tuple<size_type, allocator_type> size_alloc_;\n    StorageElement* data_;\n  };\n\n  Storage storage_;\n};\n\ntemplate <typename T, size_t N, typename A>\nconstexpr size_t FixedArray<T, N, A>::kInlineBytesDefault;\n\ntemplate <typename T, size_t N, typename A>\nconstexpr typename FixedArray<T, N, A>::size_type\n    FixedArray<T, N, A>::inline_elements;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_PUBLIC_INTERNAL_FIXED_ARRAY_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/internal/householder_vector.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://code.google.com/p/ceres-solver/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: vitus@google.com (Michael Vitus)\n\n#ifndef CERES_PUBLIC_INTERNAL_HOUSEHOLDER_VECTOR_H_\n#define CERES_PUBLIC_INTERNAL_HOUSEHOLDER_VECTOR_H_\n\n#include \"Eigen/Core\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// Algorithm 5.1.1 from 'Matrix Computations' by Golub et al. (Johns Hopkins\n// Studies in Mathematical Sciences) but using the nth element of the input\n// vector as pivot instead of first. This computes the vector v with v(n) = 1\n// and beta such that H = I - beta * v * v^T is orthogonal and\n// H * x = ||x||_2 * e_n.\n//\n// NOTE: Some versions of MSVC have trouble deducing the type of v if\n// you do not specify all the template arguments explicitly.\ntemplate <typename XVectorType, typename Scalar, int N>\nvoid ComputeHouseholderVector(const XVectorType& x,\n                              Eigen::Matrix<Scalar, N, 1>* v,\n                              Scalar* beta) {\n  CHECK(beta != nullptr);\n  CHECK(v != nullptr);\n  CHECK_GT(x.rows(), 1);\n  CHECK_EQ(x.rows(), v->rows());\n\n  Scalar sigma = x.head(x.rows() - 1).squaredNorm();\n  *v = x;\n  (*v)(v->rows() - 1) = Scalar(1.0);\n\n  *beta = Scalar(0.0);\n  const Scalar& x_pivot = x(x.rows() - 1);\n\n  if (sigma <= Scalar(std::numeric_limits<double>::epsilon())) {\n    if (x_pivot < Scalar(0.0)) {\n      *beta = Scalar(2.0);\n    }\n    return;\n  }\n\n  const Scalar mu = sqrt(x_pivot * x_pivot + sigma);\n  Scalar v_pivot = Scalar(1.0);\n\n  if (x_pivot <= Scalar(0.0)) {\n    v_pivot = x_pivot - mu;\n  } else {\n    v_pivot = -sigma / (x_pivot + mu);\n  }\n\n  *beta = Scalar(2.0) * v_pivot * v_pivot / (sigma + v_pivot * v_pivot);\n\n  v->head(v->rows() - 1) /= v_pivot;\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_PUBLIC_INTERNAL_HOUSEHOLDER_VECTOR_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/internal/integer_sequence.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: jodebo_beck@gmx.de (Johannes Beck)\n//\n// This class mimics std::integer_sequence. That is the reason to follow the\n// naming convention of the stl and not the google one. Once Ceres switches\n// to c++ 14 this class can be removed.\n\n#ifndef CERES_PUBLIC_INTERNAL_INTEGER_SEQUENCE_H_\n#define CERES_PUBLIC_INTERNAL_INTEGER_SEQUENCE_H_\n\n#if __cplusplus >= 201402L\n// We have at least c++ 14 support. Use integer_sequence from the standard.\n// Sometimes the STL implementation uses a compiler intrinsic to generate\n// the sequences which will speed up compilation.\n#include <utility>\n\nnamespace ceres {\nnamespace internal {\ntemplate <typename T, T... Ns>\nusing integer_sequence = std::integer_sequence<T, Ns...>;\n\ntemplate <typename T, T N>\nusing make_integer_sequence = std::make_integer_sequence<T, N>;\n\n}  // namespace internal\n}  // namespace ceres\n#else\n\nnamespace ceres {\nnamespace internal {\n\ntemplate <typename T, T... Ns>\nstruct integer_sequence {\n  using value_type = T;\n};\n\n// Implementation of make_integer_sequence.\n//\n// Recursively instantiate make_integer_sequence_impl until Ns\n// contains the sequence 0, 1, ..., Total-1.\n//\n// Example for Total = 4:\n//                            T    CurIdx, Total, Ns...\n// make_integer_sequence_impl<int, 0,      4                >\n// make_integer_sequence_impl<int, 1,      4,     0         >\n// make_integer_sequence_impl<int, 2,      4,     0, 1      >\n// make_integer_sequence_impl<int, 3,      4,     0, 1, 2   >\n// make_integer_sequence_impl<int, 4,      4,     0, 1, 2, 3>\n//                                                ^^^^^^^^^^\n//                                                resulting sequence.\n//\n// The implemented algorithm has linear complexity for simplicity. A O(log(N))\n// implementation can be found e.g. here:\n// https://stackoverflow.com/questions/17424477/implementation-c14-make-integer-sequence\ntemplate <typename T, T CurIdx, T Total, T... Ns>\nstruct make_integer_sequence_impl {\n  using type = typename make_integer_sequence_impl<T, CurIdx + 1, Total, Ns...,\n                                                   CurIdx>::type;\n};\n\n// End of 'recursion' when CurIdx reaches Total. All indices 0, 1, ..., N-1 are\n// contained in Ns. The final integer_sequence is created here.\ntemplate <typename T, T Total, T... Ns>\nstruct make_integer_sequence_impl<T, Total, Total, Ns...> {\n  using type = integer_sequence<T, Ns...>;\n};\n\n// A helper alias template to simplify creation of integer_sequence with 0, 1,\n// ..., N-1 as Ns:\ntemplate <typename T, T N>\nusing make_integer_sequence =\n    typename make_integer_sequence_impl<T, 0, N>::type;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif\n\n#endif  // CERES_PUBLIC_INTERNAL_INTEGER_SEQUENCE_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/internal/integer_sequence_algorithm.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: jodebo_beck@gmx.de (Johannes Beck)\n//\n// Algorithms to be used together with integer_sequence, like computing the sum\n// or the exclusive scan (sometimes called exclusive prefix sum) at compile\n// time.\n\n#ifndef CERES_PUBLIC_INTERNAL_INTEGER_SEQUENCE_ALGORITHM_H_\n#define CERES_PUBLIC_INTERNAL_INTEGER_SEQUENCE_ALGORITHM_H_\n\n#include \"integer_sequence.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// Implementation of calculating the sum of an integer sequence.\n// Recursively instantiate SumImpl and calculate the sum of the N first\n// numbers. This reduces the number of instantiations and speeds up\n// compilation.\n//\n// Examples:\n// 1) integer_sequence<int, 5>:\n//   Value = 5\n//\n// 2) integer_sequence<int, 4, 2>:\n//   Value = 4 + 2 + SumImpl<integer_sequence<int>>::Value\n//   Value = 4 + 2 + 0\n//\n// 3) integer_sequence<int, 2, 1, 4>:\n//   Value = 2 + 1 + SumImpl<integer_sequence<int, 4>>::Value\n//   Value = 2 + 1 + 4\ntemplate <typename Seq>\nstruct SumImpl;\n\n// Strip of and sum the first number.\ntemplate <typename T, T N, T... Ns>\nstruct SumImpl<integer_sequence<T, N, Ns...>> {\n  static constexpr T Value = N + SumImpl<integer_sequence<T, Ns...>>::Value;\n};\n\n// Strip of and sum the first two numbers.\ntemplate <typename T, T N1, T N2, T... Ns>\nstruct SumImpl<integer_sequence<T, N1, N2, Ns...>> {\n  static constexpr T Value =\n      N1 + N2 + SumImpl<integer_sequence<T, Ns...>>::Value;\n};\n\n// Strip of and sum the first four numbers.\ntemplate <typename T, T N1, T N2, T N3, T N4, T... Ns>\nstruct SumImpl<integer_sequence<T, N1, N2, N3, N4, Ns...>> {\n  static constexpr T Value =\n      N1 + N2 + N3 + N4 + SumImpl<integer_sequence<T, Ns...>>::Value;\n};\n\n// Only one number is left. 'Value' is just that number ('recursion' ends).\ntemplate <typename T, T N>\nstruct SumImpl<integer_sequence<T, N>> {\n  static constexpr T Value = N;\n};\n\n// No number is left. 'Value' is the identity element (for sum this is zero).\ntemplate <typename T>\nstruct SumImpl<integer_sequence<T>> {\n  static constexpr T Value = T(0);\n};\n\n// Calculate the sum of an integer sequence. The resulting sum will be stored in\n// 'Value'.\ntemplate <typename Seq>\nclass Sum {\n  using T = typename Seq::value_type;\n\n public:\n  static constexpr T Value = SumImpl<Seq>::Value;\n};\n\n// Implementation of calculating an exclusive scan (exclusive prefix sum) of an\n// integer sequence. Exclusive means that the i-th input element is not included\n// in the i-th sum. Calculating the exclusive scan for an input array I results\n// in the following output R:\n//\n// R[0] = 0\n// R[1] = I[0];\n// R[2] = I[0] + I[1];\n// R[3] = I[0] + I[1] + I[2];\n// ...\n//\n// In C++17 std::exclusive_scan does the same operation at runtime (but\n// cannot be used to calculate the prefix sum at compile time). See\n// https://en.cppreference.com/w/cpp/algorithm/exclusive_scan for a more\n// detailed description.\n//\n// Example for integer_sequence<int, 1, 4, 3> (seq := integer_sequence):\n//                   T  , Sum,          Ns...   ,          Rs...\n// ExclusiveScanImpl<int,   0, seq<int, 1, 4, 3>, seq<int         >>\n// ExclusiveScanImpl<int,   1, seq<int,    4, 3>, seq<int, 0      >>\n// ExclusiveScanImpl<int,   5, seq<int,       3>, seq<int, 0, 1   >>\n// ExclusiveScanImpl<int,   8, seq<int         >, seq<int, 0, 1, 5>>\n//                                                ^^^^^^^^^^^^^^^^^\n//                                                resulting sequence\ntemplate <typename T, T Sum, typename SeqIn, typename SeqOut>\nstruct ExclusiveScanImpl;\n\ntemplate <typename T, T Sum, T N, T... Ns, T... Rs>\nstruct ExclusiveScanImpl<T, Sum, integer_sequence<T, N, Ns...>,\n                         integer_sequence<T, Rs...>> {\n  using Type =\n      typename ExclusiveScanImpl<T, Sum + N, integer_sequence<T, Ns...>,\n                                 integer_sequence<T, Rs..., Sum>>::Type;\n};\n\n// End of 'recursion'. The resulting type is SeqOut.\ntemplate <typename T, T Sum, typename SeqOut>\nstruct ExclusiveScanImpl<T, Sum, integer_sequence<T>, SeqOut> {\n  using Type = SeqOut;\n};\n\n// Calculates the exclusive scan of the specified integer sequence. The last\n// element (the total) is not included in the resulting sequence so they have\n// same length. This means the exclusive scan of integer_sequence<int, 1, 2, 3>\n// will be integer_sequence<int, 0, 1, 3>.\ntemplate <typename Seq>\nclass ExclusiveScanT {\n  using T = typename Seq::value_type;\n\n public:\n  using Type =\n      typename ExclusiveScanImpl<T, T(0), Seq, integer_sequence<T>>::Type;\n};\n\n// Helper to use exclusive scan without typename.\ntemplate <typename Seq>\nusing ExclusiveScan = typename ExclusiveScanT<Seq>::Type;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_PUBLIC_INTERNAL_INTEGER_SEQUENCE_ALGORITHM_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/internal/line_parameterization.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2020 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: jodebo_beck@gmx.de (Johannes Beck)\n//\n\n#ifndef CERES_PUBLIC_INTERNAL_LINE_PARAMETERIZATION_H_\n#define CERES_PUBLIC_INTERNAL_LINE_PARAMETERIZATION_H_\n\n#include \"householder_vector.h\"\n\nnamespace ceres {\n\ntemplate <int AmbientSpaceDimension>\nbool LineParameterization<AmbientSpaceDimension>::Plus(\n    const double* x_ptr,\n    const double* delta_ptr,\n    double* x_plus_delta_ptr) const {\n  // We seek a box plus operator of the form\n  //\n  //   [o*, d*] = Plus([o, d], [delta_o, delta_d])\n  //\n  // where o is the origin point, d is the direction vector, delta_o is\n  // the delta of the origin point and delta_d the delta of the direction and\n  // o* and d* is the updated origin point and direction.\n  //\n  // We separate the Plus operator into the origin point and directional part\n  //   d* = Plus_d(d, delta_d)\n  //   o* = Plus_o(o, d, delta_o)\n  //\n  // The direction update function Plus_d is the same as for the homogeneous\n  // vector parameterization:\n  //\n  //   d* = H_{v(d)} [0.5 sinc(0.5 |delta_d|) delta_d, cos(0.5 |delta_d|)]^T\n  //\n  // where H is the householder matrix\n  //   H_{v} = I - (2 / |v|^2) v v^T\n  // and\n  //   v(d) = d - sign(d_n) |d| e_n.\n  //\n  // The origin point update function Plus_o is defined as\n  //\n  //   o* = o + H_{v(d)} [0.5 delta_o, 0]^T.\n\n  static constexpr int kDim = AmbientSpaceDimension;\n  using AmbientVector = Eigen::Matrix<double, kDim, 1>;\n  using AmbientVectorRef = Eigen::Map<Eigen::Matrix<double, kDim, 1>>;\n  using ConstAmbientVectorRef =\n      Eigen::Map<const Eigen::Matrix<double, kDim, 1>>;\n  using ConstTangentVectorRef =\n      Eigen::Map<const Eigen::Matrix<double, kDim - 1, 1>>;\n\n  ConstAmbientVectorRef o(x_ptr);\n  ConstAmbientVectorRef d(x_ptr + kDim);\n\n  ConstTangentVectorRef delta_o(delta_ptr);\n  ConstTangentVectorRef delta_d(delta_ptr + kDim - 1);\n  AmbientVectorRef o_plus_delta(x_plus_delta_ptr);\n  AmbientVectorRef d_plus_delta(x_plus_delta_ptr + kDim);\n\n  const double norm_delta_d = delta_d.norm();\n\n  o_plus_delta = o;\n\n  // Shortcut for zero delta direction.\n  if (norm_delta_d == 0.0) {\n    d_plus_delta = d;\n\n    if (delta_o.isZero(0.0)) {\n      return true;\n    }\n  }\n\n  // Calculate the householder transformation which is needed for f_d and f_o.\n  AmbientVector v;\n  double beta;\n\n  // NOTE: The explicit template arguments are needed here because\n  // ComputeHouseholderVector is templated and some versions of MSVC\n  // have trouble deducing the type of v automatically.\n  internal::ComputeHouseholderVector<ConstAmbientVectorRef, double, kDim>(\n      d, &v, &beta);\n\n  if (norm_delta_d != 0.0) {\n    // Map the delta from the minimum representation to the over parameterized\n    // homogeneous vector. See section A6.9.2 on page 624 of Hartley & Zisserman\n    // (2nd Edition) for a detailed description.  Note there is a typo on Page\n    // 625, line 4 so check the book errata.\n    const double norm_delta_div_2 = 0.5 * norm_delta_d;\n    const double sin_delta_by_delta =\n        std::sin(norm_delta_div_2) / norm_delta_div_2;\n\n    // Apply the delta update to remain on the unit sphere. See section A6.9.3\n    // on page 625 of Hartley & Zisserman (2nd Edition) for a detailed\n    // description.\n    AmbientVector y;\n    y.template head<kDim - 1>() = 0.5 * sin_delta_by_delta * delta_d;\n    y[kDim - 1] = std::cos(norm_delta_div_2);\n\n    d_plus_delta = d.norm() * (y - v * (beta * (v.transpose() * y)));\n  }\n\n  // The null space is in the direction of the line, so the tangent space is\n  // perpendicular to the line direction. This is achieved by using the\n  // householder matrix of the direction and allow only movements\n  // perpendicular to e_n.\n  //\n  // The factor of 0.5 is used to be consistent with the line direction\n  // update.\n  AmbientVector y;\n  y << 0.5 * delta_o, 0;\n  o_plus_delta += y - v * (beta * (v.transpose() * y));\n\n  return true;\n}\n\ntemplate <int AmbientSpaceDimension>\nbool LineParameterization<AmbientSpaceDimension>::ComputeJacobian(\n    const double* x_ptr, double* jacobian_ptr) const {\n  static constexpr int kDim = AmbientSpaceDimension;\n  using AmbientVector = Eigen::Matrix<double, kDim, 1>;\n  using ConstAmbientVectorRef =\n      Eigen::Map<const Eigen::Matrix<double, kDim, 1>>;\n  using MatrixRef = Eigen::Map<\n      Eigen::Matrix<double, 2 * kDim, 2 * (kDim - 1), Eigen::RowMajor>>;\n\n  ConstAmbientVectorRef d(x_ptr + kDim);\n  MatrixRef jacobian(jacobian_ptr);\n\n  // Clear the Jacobian as only half of the matrix is not zero.\n  jacobian.setZero();\n\n  AmbientVector v;\n  double beta;\n\n  // NOTE: The explicit template arguments are needed here because\n  // ComputeHouseholderVector is templated and some versions of MSVC\n  // have trouble deducing the type of v automatically.\n  internal::ComputeHouseholderVector<ConstAmbientVectorRef, double, kDim>(\n      d, &v, &beta);\n\n  // The Jacobian is equal to J = 0.5 * H.leftCols(kDim - 1) where H is\n  // the Householder matrix (H = I - beta * v * v') for the origin point. For\n  // the line direction part the Jacobian is scaled by the norm of the\n  // direction.\n  for (int i = 0; i < kDim - 1; ++i) {\n    jacobian.block(0, i, kDim, 1) = -0.5 * beta * v(i) * v;\n    jacobian.col(i)(i) += 0.5;\n  }\n\n  jacobian.template block<kDim, kDim - 1>(kDim, kDim - 1) =\n      jacobian.template block<kDim, kDim - 1>(0, 0) * d.norm();\n  return true;\n}\n\n}  // namespace ceres\n\n#endif  // CERES_PUBLIC_INTERNAL_LINE_PARAMETERIZATION_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/internal/memory.h",
    "content": "// Copyright 2017 The Abseil Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      https://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n// -----------------------------------------------------------------------------\n// File: memory.h\n// -----------------------------------------------------------------------------\n//\n// This header file contains utility functions for managing the creation and\n// conversion of smart pointers. This file is an extension to the C++\n// standard <memory> library header file.\n\n#ifndef CERES_PUBLIC_INTERNAL_MEMORY_H_\n#define CERES_PUBLIC_INTERNAL_MEMORY_H_\n\n#include <memory>\n\n#ifdef CERES_HAVE_EXCEPTIONS\n#define CERES_INTERNAL_TRY try\n#define CERES_INTERNAL_CATCH_ANY catch (...)\n#define CERES_INTERNAL_RETHROW \\\n  do {                         \\\n    throw;                     \\\n  } while (false)\n#else  // CERES_HAVE_EXCEPTIONS\n#define CERES_INTERNAL_TRY if (true)\n#define CERES_INTERNAL_CATCH_ANY else if (false)\n#define CERES_INTERNAL_RETHROW \\\n  do {                         \\\n  } while (false)\n#endif  // CERES_HAVE_EXCEPTIONS\n\nnamespace ceres {\nnamespace internal {\n\ntemplate <typename Allocator, typename Iterator, typename... Args>\nvoid ConstructRange(Allocator& alloc,\n                    Iterator first,\n                    Iterator last,\n                    const Args&... args) {\n  for (Iterator cur = first; cur != last; ++cur) {\n    CERES_INTERNAL_TRY {\n      std::allocator_traits<Allocator>::construct(\n          alloc, std::addressof(*cur), args...);\n    }\n    CERES_INTERNAL_CATCH_ANY {\n      while (cur != first) {\n        --cur;\n        std::allocator_traits<Allocator>::destroy(alloc, std::addressof(*cur));\n      }\n      CERES_INTERNAL_RETHROW;\n    }\n  }\n}\n\ntemplate <typename Allocator, typename Iterator, typename InputIterator>\nvoid CopyRange(Allocator& alloc,\n               Iterator destination,\n               InputIterator first,\n               InputIterator last) {\n  for (Iterator cur = destination; first != last;\n       static_cast<void>(++cur), static_cast<void>(++first)) {\n    CERES_INTERNAL_TRY {\n      std::allocator_traits<Allocator>::construct(\n          alloc, std::addressof(*cur), *first);\n    }\n    CERES_INTERNAL_CATCH_ANY {\n      while (cur != destination) {\n        --cur;\n        std::allocator_traits<Allocator>::destroy(alloc, std::addressof(*cur));\n      }\n      CERES_INTERNAL_RETHROW;\n    }\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_PUBLIC_INTERNAL_MEMORY_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/internal/numeric_diff.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//         mierle@gmail.com (Keir Mierle)\n//         tbennun@gmail.com (Tal Ben-Nun)\n//\n// Finite differencing routines used by NumericDiffCostFunction.\n\n#ifndef CERES_PUBLIC_INTERNAL_NUMERIC_DIFF_H_\n#define CERES_PUBLIC_INTERNAL_NUMERIC_DIFF_H_\n\n#include <cstring>\n\n#include \"Eigen/Dense\"\n#include \"Eigen/StdVector\"\n#include \"ceres/cost_function.h\"\n#include \"ceres/internal/fixed_array.h\"\n#include \"ceres/internal/variadic_evaluate.h\"\n#include \"ceres/numeric_diff_options.h\"\n#include \"ceres/types.h\"\n#include \"glog/logging.h\"\n\n\nnamespace ceres {\nnamespace internal {\n\n// This is split from the main class because C++ doesn't allow partial template\n// specializations for member functions. The alternative is to repeat the main\n// class for differing numbers of parameters, which is also unfortunate.\ntemplate <typename CostFunctor, NumericDiffMethodType kMethod,\n          int kNumResiduals, typename ParameterDims, int kParameterBlock,\n          int kParameterBlockSize>\nstruct NumericDiff {\n  // Mutates parameters but must restore them before return.\n  static bool EvaluateJacobianForParameterBlock(\n      const CostFunctor* functor,\n      const double* residuals_at_eval_point,\n      const NumericDiffOptions& options,\n      int num_residuals,\n      int parameter_block_index,\n      int parameter_block_size,\n      double **parameters,\n      double *jacobian) {\n    using Eigen::Map;\n    using Eigen::Matrix;\n    using Eigen::RowMajor;\n    using Eigen::ColMajor;\n\n    DCHECK(jacobian);\n\n    const int num_residuals_internal =\n        (kNumResiduals != ceres::DYNAMIC ? kNumResiduals : num_residuals);\n    const int parameter_block_index_internal =\n        (kParameterBlock != ceres::DYNAMIC ? kParameterBlock :\n                                             parameter_block_index);\n    const int parameter_block_size_internal =\n        (kParameterBlockSize != ceres::DYNAMIC ? kParameterBlockSize :\n                                                 parameter_block_size);\n\n    typedef Matrix<double, kNumResiduals, 1> ResidualVector;\n    typedef Matrix<double, kParameterBlockSize, 1> ParameterVector;\n\n    // The convoluted reasoning for choosing the Row/Column major\n    // ordering of the matrix is an artifact of the restrictions in\n    // Eigen that prevent it from creating RowMajor matrices with a\n    // single column. In these cases, we ask for a ColMajor matrix.\n    typedef Matrix<double,\n                   kNumResiduals,\n                   kParameterBlockSize,\n                   (kParameterBlockSize == 1) ? ColMajor : RowMajor>\n        JacobianMatrix;\n\n    Map<JacobianMatrix> parameter_jacobian(jacobian,\n                                           num_residuals_internal,\n                                           parameter_block_size_internal);\n\n    Map<ParameterVector> x_plus_delta(\n        parameters[parameter_block_index_internal],\n        parameter_block_size_internal);\n    ParameterVector x(x_plus_delta);\n    ParameterVector step_size = x.array().abs() *\n        ((kMethod == RIDDERS) ? options.ridders_relative_initial_step_size :\n        options.relative_step_size);\n\n    // It is not a good idea to make the step size arbitrarily\n    // small. This will lead to problems with round off and numerical\n    // instability when dividing by the step size. The general\n    // recommendation is to not go down below sqrt(epsilon).\n    double min_step_size = std::sqrt(std::numeric_limits<double>::epsilon());\n\n    // For Ridders' method, the initial step size is required to be large,\n    // thus ridders_relative_initial_step_size is used.\n    if (kMethod == RIDDERS) {\n      min_step_size = std::max(min_step_size,\n                               options.ridders_relative_initial_step_size);\n    }\n\n    // For each parameter in the parameter block, use finite differences to\n    // compute the derivative for that parameter.\n    FixedArray<double> temp_residual_array(num_residuals_internal);\n    FixedArray<double> residual_array(num_residuals_internal);\n    Map<ResidualVector> residuals(residual_array.data(),\n                                  num_residuals_internal);\n\n    for (int j = 0; j < parameter_block_size_internal; ++j) {\n      const double delta = std::max(min_step_size, step_size(j));\n\n      if (kMethod == RIDDERS) {\n        if (!EvaluateRiddersJacobianColumn(functor, j, delta,\n                                           options,\n                                           num_residuals_internal,\n                                           parameter_block_size_internal,\n                                           x.data(),\n                                           residuals_at_eval_point,\n                                           parameters,\n                                           x_plus_delta.data(),\n                                           temp_residual_array.data(),\n                                           residual_array.data())) {\n          return false;\n        }\n      } else {\n        if (!EvaluateJacobianColumn(functor, j, delta,\n                                    num_residuals_internal,\n                                    parameter_block_size_internal,\n                                    x.data(),\n                                    residuals_at_eval_point,\n                                    parameters,\n                                    x_plus_delta.data(),\n                                    temp_residual_array.data(),\n                                    residual_array.data())) {\n          return false;\n        }\n      }\n\n      parameter_jacobian.col(j).matrix() = residuals;\n    }\n    return true;\n  }\n\n  static bool EvaluateJacobianColumn(const CostFunctor* functor,\n                                     int parameter_index,\n                                     double delta,\n                                     int num_residuals,\n                                     int parameter_block_size,\n                                     const double* x_ptr,\n                                     const double* residuals_at_eval_point,\n                                     double** parameters,\n                                     double* x_plus_delta_ptr,\n                                     double* temp_residuals_ptr,\n                                     double* residuals_ptr) {\n    using Eigen::Map;\n    using Eigen::Matrix;\n\n    typedef Matrix<double, kNumResiduals, 1> ResidualVector;\n    typedef Matrix<double, kParameterBlockSize, 1> ParameterVector;\n\n    Map<const ParameterVector> x(x_ptr, parameter_block_size);\n    Map<ParameterVector> x_plus_delta(x_plus_delta_ptr,\n                                      parameter_block_size);\n\n    Map<ResidualVector> residuals(residuals_ptr, num_residuals);\n    Map<ResidualVector> temp_residuals(temp_residuals_ptr, num_residuals);\n\n    // Mutate 1 element at a time and then restore.\n    x_plus_delta(parameter_index) = x(parameter_index) + delta;\n\n    if (!VariadicEvaluate<ParameterDims>(*functor,\n                                         parameters,\n                                         residuals.data())) {\n      return false;\n    }\n\n    // Compute this column of the jacobian in 3 steps:\n    // 1. Store residuals for the forward part.\n    // 2. Subtract residuals for the backward (or 0) part.\n    // 3. Divide out the run.\n    double one_over_delta = 1.0 / delta;\n    if (kMethod == CENTRAL || kMethod == RIDDERS) {\n      // Compute the function on the other side of x(parameter_index).\n      x_plus_delta(parameter_index) = x(parameter_index) - delta;\n\n      if (!VariadicEvaluate<ParameterDims>(*functor,\n                                           parameters,\n                                           temp_residuals.data())) {\n        return false;\n      }\n\n      residuals -= temp_residuals;\n      one_over_delta /= 2;\n    } else {\n      // Forward difference only; reuse existing residuals evaluation.\n      residuals -=\n          Map<const ResidualVector>(residuals_at_eval_point,\n                                    num_residuals);\n    }\n\n    // Restore x_plus_delta.\n    x_plus_delta(parameter_index) = x(parameter_index);\n\n    // Divide out the run to get slope.\n    residuals *= one_over_delta;\n\n    return true;\n  }\n\n  // This numeric difference implementation uses adaptive differentiation\n  // on the parameters to obtain the Jacobian matrix. The adaptive algorithm\n  // is based on Ridders' method for adaptive differentiation, which creates\n  // a Romberg tableau from varying step sizes and extrapolates the\n  // intermediate results to obtain the current computational error.\n  //\n  // References:\n  // C.J.F. Ridders, Accurate computation of F'(x) and F'(x) F\"(x), Advances\n  // in Engineering Software (1978), Volume 4, Issue 2, April 1982,\n  // Pages 75-76, ISSN 0141-1195,\n  // http://dx.doi.org/10.1016/S0141-1195(82)80057-0.\n  static bool EvaluateRiddersJacobianColumn(\n      const CostFunctor* functor,\n      int parameter_index,\n      double delta,\n      const NumericDiffOptions& options,\n      int num_residuals,\n      int parameter_block_size,\n      const double* x_ptr,\n      const double* residuals_at_eval_point,\n      double** parameters,\n      double* x_plus_delta_ptr,\n      double* temp_residuals_ptr,\n      double* residuals_ptr) {\n    using Eigen::Map;\n    using Eigen::Matrix;\n    using Eigen::aligned_allocator;\n\n    typedef Matrix<double, kNumResiduals, 1> ResidualVector;\n    typedef Matrix<double, kNumResiduals, Eigen::Dynamic> ResidualCandidateMatrix;\n    typedef Matrix<double, kParameterBlockSize, 1> ParameterVector;\n\n    Map<const ParameterVector> x(x_ptr, parameter_block_size);\n    Map<ParameterVector> x_plus_delta(x_plus_delta_ptr,\n                                      parameter_block_size);\n\n    Map<ResidualVector> residuals(residuals_ptr, num_residuals);\n    Map<ResidualVector> temp_residuals(temp_residuals_ptr, num_residuals);\n\n    // In order for the algorithm to converge, the step size should be\n    // initialized to a value that is large enough to produce a significant\n    // change in the function.\n    // As the derivative is estimated, the step size decreases.\n    // By default, the step sizes are chosen so that the middle column\n    // of the Romberg tableau uses the input delta.\n    double current_step_size = delta *\n        pow(options.ridders_step_shrink_factor,\n            options.max_num_ridders_extrapolations / 2);\n\n    // Double-buffering temporary differential candidate vectors\n    // from previous step size.\n    ResidualCandidateMatrix stepsize_candidates_a(\n        num_residuals,\n        options.max_num_ridders_extrapolations);\n    ResidualCandidateMatrix stepsize_candidates_b(\n        num_residuals,\n        options.max_num_ridders_extrapolations);\n    ResidualCandidateMatrix* current_candidates = &stepsize_candidates_a;\n    ResidualCandidateMatrix* previous_candidates = &stepsize_candidates_b;\n\n    // Represents the computational error of the derivative. This variable is\n    // initially set to a large value, and is set to the difference between\n    // current and previous finite difference extrapolations.\n    // norm_error is supposed to decrease as the finite difference tableau\n    // generation progresses, serving both as an estimate for differentiation\n    // error and as a measure of differentiation numerical stability.\n    double norm_error = std::numeric_limits<double>::max();\n\n    // Loop over decreasing step sizes until:\n    //  1. Error is smaller than a given value (ridders_epsilon),\n    //  2. Maximal order of extrapolation reached, or\n    //  3. Extrapolation becomes numerically unstable.\n    for (int i = 0; i < options.max_num_ridders_extrapolations; ++i) {\n      // Compute the numerical derivative at this step size.\n      if (!EvaluateJacobianColumn(functor, parameter_index, current_step_size,\n                                  num_residuals,\n                                  parameter_block_size,\n                                  x.data(),\n                                  residuals_at_eval_point,\n                                  parameters,\n                                  x_plus_delta.data(),\n                                  temp_residuals.data(),\n                                  current_candidates->col(0).data())) {\n        // Something went wrong; bail.\n        return false;\n      }\n\n      // Store initial results.\n      if (i == 0) {\n        residuals = current_candidates->col(0);\n      }\n\n      // Shrink differentiation step size.\n      current_step_size /= options.ridders_step_shrink_factor;\n\n      // Extrapolation factor for Richardson acceleration method (see below).\n      double richardson_factor = options.ridders_step_shrink_factor *\n          options.ridders_step_shrink_factor;\n      for (int k = 1; k <= i; ++k) {\n        // Extrapolate the various orders of finite differences using\n        // the Richardson acceleration method.\n        current_candidates->col(k) =\n            (richardson_factor * current_candidates->col(k - 1) -\n             previous_candidates->col(k - 1)) / (richardson_factor - 1.0);\n\n        richardson_factor *= options.ridders_step_shrink_factor *\n            options.ridders_step_shrink_factor;\n\n        // Compute the difference between the previous value and the current.\n        double candidate_error = std::max(\n            (current_candidates->col(k) -\n             current_candidates->col(k - 1)).norm(),\n            (current_candidates->col(k) -\n             previous_candidates->col(k - 1)).norm());\n\n        // If the error has decreased, update results.\n        if (candidate_error <= norm_error) {\n          norm_error = candidate_error;\n          residuals = current_candidates->col(k);\n\n          // If the error is small enough, stop.\n          if (norm_error < options.ridders_epsilon) {\n            break;\n          }\n        }\n      }\n\n      // After breaking out of the inner loop, declare convergence.\n      if (norm_error < options.ridders_epsilon) {\n        break;\n      }\n\n      // Check to see if the current gradient estimate is numerically unstable.\n      // If so, bail out and return the last stable result.\n      if (i > 0) {\n        double tableau_error = (current_candidates->col(i) -\n            previous_candidates->col(i - 1)).norm();\n\n        // Compare current error to the chosen candidate's error.\n        if (tableau_error >= 2 * norm_error) {\n          break;\n        }\n      }\n\n      std::swap(current_candidates, previous_candidates);\n    }\n    return true;\n  }\n};\n\n// This function calls NumericDiff<...>::EvaluateJacobianForParameterBlock for\n// each parameter block.\n//\n// Example:\n// A call to\n// EvaluateJacobianForParameterBlocks<StaticParameterDims<2, 3>>(\n//        functor,\n//        residuals_at_eval_point,\n//        options,\n//        num_residuals,\n//        parameters,\n//        jacobians);\n// will result in the following calls to\n// NumericDiff<...>::EvaluateJacobianForParameterBlock:\n//\n// if (jacobians[0] != nullptr) {\n//   if (!NumericDiff<\n//           CostFunctor,\n//           method,\n//           kNumResiduals,\n//           StaticParameterDims<2, 3>,\n//           0,\n//           2>::EvaluateJacobianForParameterBlock(functor,\n//                                                 residuals_at_eval_point,\n//                                                 options,\n//                                                 num_residuals,\n//                                                 0,\n//                                                 2,\n//                                                 parameters,\n//                                                 jacobians[0])) {\n//     return false;\n//   }\n// }\n// if (jacobians[1] != nullptr) {\n//   if (!NumericDiff<\n//           CostFunctor,\n//           method,\n//           kNumResiduals,\n//           StaticParameterDims<2, 3>,\n//           1,\n//           3>::EvaluateJacobianForParameterBlock(functor,\n//                                                 residuals_at_eval_point,\n//                                                 options,\n//                                                 num_residuals,\n//                                                 1,\n//                                                 3,\n//                                                 parameters,\n//                                                 jacobians[1])) {\n//     return false;\n//   }\n// }\ntemplate <typename ParameterDims,\n          typename Parameters = typename ParameterDims::Parameters,\n          int ParameterIdx = 0>\nstruct EvaluateJacobianForParameterBlocks;\n\ntemplate <typename ParameterDims, int N, int... Ns, int ParameterIdx>\nstruct EvaluateJacobianForParameterBlocks<ParameterDims,\n                                          integer_sequence<int, N, Ns...>,\n                                          ParameterIdx> {\n  template <NumericDiffMethodType method,\n            int kNumResiduals,\n            typename CostFunctor>\n  static bool Apply(const CostFunctor* functor,\n                    const double* residuals_at_eval_point,\n                    const NumericDiffOptions& options,\n                    int num_residuals,\n                    double** parameters,\n                    double** jacobians) {\n    if (jacobians[ParameterIdx] != nullptr) {\n      if (!NumericDiff<\n              CostFunctor,\n              method,\n              kNumResiduals,\n              ParameterDims,\n              ParameterIdx,\n              N>::EvaluateJacobianForParameterBlock(functor,\n                                                    residuals_at_eval_point,\n                                                    options,\n                                                    num_residuals,\n                                                    ParameterIdx,\n                                                    N,\n                                                    parameters,\n                                                    jacobians[ParameterIdx])) {\n        return false;\n      }\n    }\n\n    return EvaluateJacobianForParameterBlocks<ParameterDims,\n                                              integer_sequence<int, Ns...>,\n                                              ParameterIdx + 1>::\n        template Apply<method, kNumResiduals>(functor,\n                                              residuals_at_eval_point,\n                                              options,\n                                              num_residuals,\n                                              parameters,\n                                              jacobians);\n  }\n};\n\n// End of 'recursion'. Nothing more to do.\ntemplate <typename ParameterDims, int ParameterIdx>\nstruct EvaluateJacobianForParameterBlocks<ParameterDims, integer_sequence<int>,\n                                          ParameterIdx> {\n  template <NumericDiffMethodType method, int kNumResiduals,\n            typename CostFunctor>\n  static bool Apply(const CostFunctor* /* NOT USED*/,\n                    const double* /* NOT USED*/,\n                    const NumericDiffOptions& /* NOT USED*/, int /* NOT USED*/,\n                    double** /* NOT USED*/, double** /* NOT USED*/) {\n    return true;\n  }\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_PUBLIC_INTERNAL_NUMERIC_DIFF_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/internal/parameter_dims.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: jodebo_beck@gmx.de (Johannes Beck)\n\n#ifndef CERES_PUBLIC_INTERNAL_PARAMETER_DIMS_H_\n#define CERES_PUBLIC_INTERNAL_PARAMETER_DIMS_H_\n\n#include <array>\n\n#include \"ceres/internal/integer_sequence.h\"\n#include \"ceres/internal/integer_sequence_algorithm.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// Checks, whether the given parameter block sizes are valid. Valid means every\n// dimension is bigger than zero.\nconstexpr bool IsValidParameterDimensionSequence(integer_sequence<int>) {\n  return true;\n}\n\ntemplate <int N, int... Ts>\nconstexpr bool IsValidParameterDimensionSequence(\n    integer_sequence<int, N, Ts...>) {\n  return (N <= 0) ? false\n                  : IsValidParameterDimensionSequence(\n                        integer_sequence<int, Ts...>());\n}\n\n// Helper class that represents the parameter dimensions. The parameter\n// dimensions are either dynamic or the sizes are known at compile time. It is\n// used to pass parameter block dimensions around (e.g. between functions or\n// classes).\n//\n// As an example if one have three parameter blocks with dimensions (2, 4, 1),\n// one would use 'StaticParameterDims<2, 4, 1>' which is a synonym for\n// 'ParameterDims<false, 2, 4, 1>'.\n// For dynamic parameter dims, one would just use 'DynamicParameterDims', which\n// is a synonym for 'ParameterDims<true>'.\ntemplate <bool IsDynamic, int... Ns>\nclass ParameterDims {\n public:\n  using Parameters = integer_sequence<int, Ns...>;\n\n  // The parameter dimensions are only valid if all parameter block dimensions\n  // are greater than zero.\n  static constexpr bool kIsValid =\n      IsValidParameterDimensionSequence(Parameters());\n  static_assert(kIsValid,\n                \"Invalid parameter block dimension detected. Each parameter \"\n                \"block dimension must be bigger than zero.\");\n\n  static constexpr bool kIsDynamic = IsDynamic;\n  static constexpr int kNumParameterBlocks = sizeof...(Ns);\n  static_assert(kIsDynamic || kNumParameterBlocks > 0,\n                \"At least one parameter block must be specified.\");\n\n  static constexpr int kNumParameters =\n      Sum<integer_sequence<int, Ns...>>::Value;\n\n  static constexpr int GetDim(int dim) { return params_[dim]; }\n\n  // If one has all parameters packed into a single array this function unpacks\n  // the parameters.\n  template <typename T>\n  static inline std::array<T*, kNumParameterBlocks> GetUnpackedParameters(\n      T* ptr) {\n    using Offsets = ExclusiveScan<Parameters>;\n    return GetUnpackedParameters(ptr, Offsets());\n  }\n\n private:\n  template <typename T, int... Indices>\n  static inline std::array<T*, kNumParameterBlocks> GetUnpackedParameters(\n      T* ptr, integer_sequence<int, Indices...>) {\n    return std::array<T*, kNumParameterBlocks>{{ptr + Indices...}};\n  }\n\n  static constexpr std::array<int, kNumParameterBlocks> params_{Ns...};\n};\n\n// Even static constexpr member variables needs to be defined (not only\n// declared). As the ParameterDims class is tempalted this definition must\n// be in the header file.\ntemplate <bool IsDynamic, int... Ns>\nconstexpr std::array<int, ParameterDims<IsDynamic, Ns...>::kNumParameterBlocks>\n    ParameterDims<IsDynamic, Ns...>::params_;\n\n// Using declarations for static and dynamic parameter dims. This makes client\n// code easier to read.\ntemplate <int... Ns>\nusing StaticParameterDims = ParameterDims<false, Ns...>;\nusing DynamicParameterDims = ParameterDims<true>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_PUBLIC_INTERNAL_PARAMETER_DIMS_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/internal/port.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n\n#ifndef CERES_PUBLIC_INTERNAL_PORT_H_\n#define CERES_PUBLIC_INTERNAL_PORT_H_\n\n// This file needs to compile as c code.\n#include \"ceres/internal/config.h\"\n\n#if defined(CERES_USE_OPENMP)\n#  if defined(CERES_USE_CXX11_THREADS) || defined(CERES_NO_THREADS)\n#    error CERES_USE_OPENMP is mutually exclusive to CERES_USE_CXX11_THREADS and CERES_NO_THREADS\n#  endif\n#elif defined(CERES_USE_CXX11_THREADS)\n#  if defined(CERES_USE_OPENMP) || defined(CERES_NO_THREADS)\n#    error CERES_USE_CXX11_THREADS is mutually exclusive to CERES_USE_OPENMP, CERES_USE_CXX11_THREADS and CERES_NO_THREADS\n#  endif\n#elif defined(CERES_NO_THREADS)\n#  if defined(CERES_USE_OPENMP) || defined(CERES_USE_CXX11_THREADS)\n#    error CERES_NO_THREADS is mutually exclusive to CERES_USE_OPENMP and CERES_USE_CXX11_THREADS\n#  endif\n#else\n#  error One of CERES_USE_OPENMP, CERES_USE_CXX11_THREADS or CERES_NO_THREADS must be defined.\n#endif\n\n// CERES_NO_SPARSE should be automatically defined by config.h if Ceres was\n// compiled without any sparse back-end.  Verify that it has not subsequently\n// been inconsistently redefined.\n#if defined(CERES_NO_SPARSE)\n#  if !defined(CERES_NO_SUITESPARSE)\n#    error CERES_NO_SPARSE requires CERES_NO_SUITESPARSE.\n#  endif\n#  if !defined(CERES_NO_CXSPARSE)\n#    error CERES_NO_SPARSE requires CERES_NO_CXSPARSE\n#  endif\n#  if !defined(CERES_NO_ACCELERATE_SPARSE)\n#    error CERES_NO_SPARSE requires CERES_NO_ACCELERATE_SPARSE\n#  endif\n#  if defined(CERES_USE_EIGEN_SPARSE)\n#    error CERES_NO_SPARSE requires !CERES_USE_EIGEN_SPARSE\n#  endif\n#endif\n\n// A macro to signal which functions and classes are exported when\n// building a DLL with MSVC.\n//\n// Note that the ordering here is important, CERES_BUILDING_SHARED_LIBRARY\n// is only defined locally when Ceres is compiled, it is never exported to\n// users.  However, in order that we do not have to configure config.h\n// separately for building vs installing, if we are using MSVC and building\n// a shared library, then both CERES_BUILDING_SHARED_LIBRARY and\n// CERES_USING_SHARED_LIBRARY will be defined when Ceres is compiled.\n// Hence it is important that the check for CERES_BUILDING_SHARED_LIBRARY\n// happens first.\n#if defined(_MSC_VER) && defined(CERES_BUILDING_SHARED_LIBRARY)\n# define CERES_EXPORT __declspec(dllexport)\n#elif defined(_MSC_VER) && defined(CERES_USING_SHARED_LIBRARY)\n# define CERES_EXPORT __declspec(dllimport)\n#else\n# define CERES_EXPORT\n#endif\n\n#endif  // CERES_PUBLIC_INTERNAL_PORT_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/internal/reenable_warnings.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n\n// This is not your usual header guard. See disable_warnings.h\n#ifdef CERES_WARNINGS_DISABLED\n#undef CERES_WARNINGS_DISABLED\n\n#ifdef _MSC_VER\n#pragma warning( pop )\n#endif\n\n#endif  // CERES_WARNINGS_DISABLED\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/internal/variadic_evaluate.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//         mierle@gmail.com (Keir Mierle)\n//         jodebo_beck@gmx.de (Johannes Beck)\n\n#ifndef CERES_PUBLIC_INTERNAL_VARIADIC_EVALUATE_H_\n#define CERES_PUBLIC_INTERNAL_VARIADIC_EVALUATE_H_\n\n#include <stddef.h>\n\n#include <type_traits>\n\n#include \"ceres/cost_function.h\"\n#include \"ceres/internal/parameter_dims.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// For fixed size cost functors\ntemplate <typename Functor, typename T, int... Indices>\ninline bool VariadicEvaluateImpl(const Functor& functor, T const* const* input,\n                                 T* output, std::false_type /*is_dynamic*/,\n                                 integer_sequence<int, Indices...>) {\n  static_assert(sizeof...(Indices),\n                \"Invalid number of parameter blocks. At least one parameter \"\n                \"block must be specified.\");\n  return functor(input[Indices]..., output);\n}\n\n// For dynamic sized cost functors\ntemplate <typename Functor, typename T>\ninline bool VariadicEvaluateImpl(const Functor& functor, T const* const* input,\n                                 T* output, std::true_type /*is_dynamic*/,\n                                 integer_sequence<int>) {\n  return functor(input, output);\n}\n\n// For ceres cost functors (not ceres::CostFunction)\ntemplate <typename ParameterDims, typename Functor, typename T>\ninline bool VariadicEvaluateImpl(const Functor& functor, T const* const* input,\n                                 T* output, const void* /* NOT USED */) {\n  using ParameterBlockIndices =\n      make_integer_sequence<int, ParameterDims::kNumParameterBlocks>;\n  using IsDynamic = std::integral_constant<bool, ParameterDims::kIsDynamic>;\n  return VariadicEvaluateImpl(functor, input, output, IsDynamic(),\n                              ParameterBlockIndices());\n}\n\n// For ceres::CostFunction\ntemplate <typename ParameterDims, typename Functor, typename T>\ninline bool VariadicEvaluateImpl(const Functor& functor, T const* const* input,\n                                 T* output,\n                                 const CostFunction* /* NOT USED */) {\n  return functor.Evaluate(input, output, nullptr);\n}\n\n// Variadic evaluate is a helper function to evaluate ceres cost function or\n// functors using an input, output and the parameter dimensions. There are\n// several ways different possibilities:\n// 1) If the passed functor is a 'ceres::CostFunction' its evaluate method is\n// called.\n// 2) If the functor is not a 'ceres::CostFunction' and the specified parameter\n// dims is dynamic, the functor must have the following signature\n// 'bool(T const* const* input, T* output)'.\n// 3) If the functor is not a 'ceres::CostFunction' and the specified parameter\n// dims is not dynamic, the input is expanded by using the number of parameter\n// blocks. The signature of the functor must have the following signature\n// 'bool()(const T* i_1, const T* i_2, ... const T* i_n, T* output)'.\ntemplate <typename ParameterDims, typename Functor, typename T>\ninline bool VariadicEvaluate(const Functor& functor, T const* const* input,\n                             T* output) {\n  return VariadicEvaluateImpl<ParameterDims>(functor, input, output, &functor);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_PUBLIC_INTERNAL_VARIADIC_EVALUATE_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/iteration_callback.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// When an iteration callback is specified, Ceres calls the callback\n// after each minimizer step (if the minimizer has not converged) and\n// passes it an IterationSummary object, defined below.\n\n#ifndef CERES_PUBLIC_ITERATION_CALLBACK_H_\n#define CERES_PUBLIC_ITERATION_CALLBACK_H_\n\n#include \"ceres/internal/disable_warnings.h\"\n#include \"ceres/types.h\"\n\nnamespace ceres {\n\n// This struct describes the state of the optimizer after each\n// iteration of the minimization.\nstruct CERES_EXPORT IterationSummary {\n  // Current iteration number.\n  int iteration = 0;\n\n  // Step was numerically valid, i.e., all values are finite and the\n  // step reduces the value of the linearized model.\n  //\n  // Note: step_is_valid is always true when iteration = 0.\n  bool step_is_valid = false;\n\n  // Step did not reduce the value of the objective function\n  // sufficiently, but it was accepted because of the relaxed\n  // acceptance criterion used by the non-monotonic trust region\n  // algorithm.\n  //\n  // Note: step_is_nonmonotonic is always false when iteration = 0;\n  bool step_is_nonmonotonic = false;\n\n  // Whether or not the minimizer accepted this step or not. If the\n  // ordinary trust region algorithm is used, this means that the\n  // relative reduction in the objective function value was greater\n  // than Solver::Options::min_relative_decrease. However, if the\n  // non-monotonic trust region algorithm is used\n  // (Solver::Options:use_nonmonotonic_steps = true), then even if the\n  // relative decrease is not sufficient, the algorithm may accept the\n  // step and the step is declared successful.\n  //\n  // Note: step_is_successful is always true when iteration = 0.\n  bool step_is_successful = false;\n\n  // Value of the objective function.\n  double cost = 0.90;\n\n  // Change in the value of the objective function in this\n  // iteration. This can be positive or negative.\n  double cost_change = 0.0;\n\n  // Infinity norm of the gradient vector.\n  double gradient_max_norm = 0.0;\n\n  // 2-norm of the gradient vector.\n  double gradient_norm = 0.0;\n\n  // 2-norm of the size of the step computed by the optimization\n  // algorithm.\n  double step_norm = 0.0;\n\n  // For trust region algorithms, the ratio of the actual change in\n  // cost and the change in the cost of the linearized approximation.\n  double relative_decrease = 0.0;\n\n  // Size of the trust region at the end of the current iteration. For\n  // the Levenberg-Marquardt algorithm, the regularization parameter\n  // mu = 1.0 / trust_region_radius.\n  double trust_region_radius = 0.0;\n\n  // For the inexact step Levenberg-Marquardt algorithm, this is the\n  // relative accuracy with which the Newton(LM) step is solved. This\n  // number affects only the iterative solvers capable of solving\n  // linear systems inexactly. Factorization-based exact solvers\n  // ignore it.\n  double eta = 0.0;\n\n  // Step sized computed by the line search algorithm.\n  double step_size = 0.0;\n\n  // Number of function value evaluations used by the line search algorithm.\n  int line_search_function_evaluations = 0;\n\n  // Number of function gradient evaluations used by the line search algorithm.\n  int line_search_gradient_evaluations = 0;\n\n  // Number of iterations taken by the line search algorithm.\n  int line_search_iterations = 0;\n\n  // Number of iterations taken by the linear solver to solve for the\n  // Newton step.\n  int linear_solver_iterations = 0;\n\n  // All times reported below are wall times.\n\n  // Time (in seconds) spent inside the minimizer loop in the current\n  // iteration.\n  double iteration_time_in_seconds = 0.0;\n\n  // Time (in seconds) spent inside the trust region step solver.\n  double step_solver_time_in_seconds = 0.0;\n\n  // Time (in seconds) since the user called Solve().\n  double cumulative_time_in_seconds = 0.0;\n};\n\n// Interface for specifying callbacks that are executed at the end of\n// each iteration of the Minimizer. The solver uses the return value\n// of operator() to decide whether to continue solving or to\n// terminate. The user can return three values.\n//\n// SOLVER_ABORT indicates that the callback detected an abnormal\n// situation. The solver returns without updating the parameter blocks\n// (unless Solver::Options::update_state_every_iteration is set\n// true). Solver returns with Solver::Summary::termination_type set to\n// USER_ABORT.\n//\n// SOLVER_TERMINATE_SUCCESSFULLY indicates that there is no need to\n// optimize anymore (some user specified termination criterion has\n// been met). Solver returns with Solver::Summary::termination_type\n// set to USER_SUCCESS.\n//\n// SOLVER_CONTINUE indicates that the solver should continue\n// optimizing.\n//\n// For example, the following Callback is used internally by Ceres to\n// log the progress of the optimization.\n//\n// Callback for logging the state of the minimizer to STDERR or STDOUT\n// depending on the user's preferences and logging level.\n//\n//   class LoggingCallback : public IterationCallback {\n//    public:\n//     explicit LoggingCallback(bool log_to_stdout)\n//         : log_to_stdout_(log_to_stdout) {}\n//\n//     ~LoggingCallback() {}\n//\n//     CallbackReturnType operator()(const IterationSummary& summary) {\n//       const char* kReportRowFormat =\n//           \"% 4d: f:% 8e d:% 3.2e g:% 3.2e h:% 3.2e \"\n//           \"rho:% 3.2e mu:% 3.2e eta:% 3.2e li:% 3d\";\n//       string output = StringPrintf(kReportRowFormat,\n//                                    summary.iteration,\n//                                    summary.cost,\n//                                    summary.cost_change,\n//                                    summary.gradient_max_norm,\n//                                    summary.step_norm,\n//                                    summary.relative_decrease,\n//                                    summary.trust_region_radius,\n//                                    summary.eta,\n//                                    summary.linear_solver_iterations);\n//       if (log_to_stdout_) {\n//         cout << output << endl;\n//       } else {\n//         VLOG(1) << output;\n//       }\n//       return SOLVER_CONTINUE;\n//     }\n//\n//    private:\n//     const bool log_to_stdout_;\n//   };\n//\nclass CERES_EXPORT IterationCallback {\n public:\n  virtual ~IterationCallback() {}\n  virtual CallbackReturnType operator()(const IterationSummary& summary) = 0;\n};\n\n}  // namespace ceres\n\n#include \"ceres/internal/reenable_warnings.h\"\n\n#endif  // CERES_PUBLIC_ITERATION_CALLBACK_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/jet.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n//\n// A simple implementation of N-dimensional dual numbers, for automatically\n// computing exact derivatives of functions.\n//\n// While a complete treatment of the mechanics of automatic differentiation is\n// beyond the scope of this header (see\n// http://en.wikipedia.org/wiki/Automatic_differentiation for details), the\n// basic idea is to extend normal arithmetic with an extra element, \"e,\" often\n// denoted with the greek symbol epsilon, such that e != 0 but e^2 = 0. Dual\n// numbers are extensions of the real numbers analogous to complex numbers:\n// whereas complex numbers augment the reals by introducing an imaginary unit i\n// such that i^2 = -1, dual numbers introduce an \"infinitesimal\" unit e such\n// that e^2 = 0. Dual numbers have two components: the \"real\" component and the\n// \"infinitesimal\" component, generally written as x + y*e. Surprisingly, this\n// leads to a convenient method for computing exact derivatives without needing\n// to manipulate complicated symbolic expressions.\n//\n// For example, consider the function\n//\n//   f(x) = x^2 ,\n//\n// evaluated at 10. Using normal arithmetic, f(10) = 100, and df/dx(10) = 20.\n// Next, argument 10 with an infinitesimal to get:\n//\n//   f(10 + e) = (10 + e)^2\n//             = 100 + 2 * 10 * e + e^2\n//             = 100 + 20 * e       -+-\n//                     --            |\n//                     |             +--- This is zero, since e^2 = 0\n//                     |\n//                     +----------------- This is df/dx!\n//\n// Note that the derivative of f with respect to x is simply the infinitesimal\n// component of the value of f(x + e). So, in order to take the derivative of\n// any function, it is only necessary to replace the numeric \"object\" used in\n// the function with one extended with infinitesimals. The class Jet, defined in\n// this header, is one such example of this, where substitution is done with\n// templates.\n//\n// To handle derivatives of functions taking multiple arguments, different\n// infinitesimals are used, one for each variable to take the derivative of. For\n// example, consider a scalar function of two scalar parameters x and y:\n//\n//   f(x, y) = x^2 + x * y\n//\n// Following the technique above, to compute the derivatives df/dx and df/dy for\n// f(1, 3) involves doing two evaluations of f, the first time replacing x with\n// x + e, the second time replacing y with y + e.\n//\n// For df/dx:\n//\n//   f(1 + e, y) = (1 + e)^2 + (1 + e) * 3\n//               = 1 + 2 * e + 3 + 3 * e\n//               = 4 + 5 * e\n//\n//               --> df/dx = 5\n//\n// For df/dy:\n//\n//   f(1, 3 + e) = 1^2 + 1 * (3 + e)\n//               = 1 + 3 + e\n//               = 4 + e\n//\n//               --> df/dy = 1\n//\n// To take the gradient of f with the implementation of dual numbers (\"jets\") in\n// this file, it is necessary to create a single jet type which has components\n// for the derivative in x and y, and passing them to a templated version of f:\n//\n//   template<typename T>\n//   T f(const T &x, const T &y) {\n//     return x * x + x * y;\n//   }\n//\n//   // The \"2\" means there should be 2 dual number components.\n//   // It computes the partial derivative at x=10, y=20.\n//   Jet<double, 2> x(10, 0);  // Pick the 0th dual number for x.\n//   Jet<double, 2> y(20, 1);  // Pick the 1st dual number for y.\n//   Jet<double, 2> z = f(x, y);\n//\n//   LOG(INFO) << \"df/dx = \" << z.v[0]\n//             << \"df/dy = \" << z.v[1];\n//\n// Most users should not use Jet objects directly; a wrapper around Jet objects,\n// which makes computing the derivative, gradient, or jacobian of templated\n// functors simple, is in autodiff.h. Even autodiff.h should not be used\n// directly; instead autodiff_cost_function.h is typically the file of interest.\n//\n// For the more mathematically inclined, this file implements first-order\n// \"jets\". A 1st order jet is an element of the ring\n//\n//   T[N] = T[t_1, ..., t_N] / (t_1, ..., t_N)^2\n//\n// which essentially means that each jet consists of a \"scalar\" value 'a' from T\n// and a 1st order perturbation vector 'v' of length N:\n//\n//   x = a + \\sum_i v[i] t_i\n//\n// A shorthand is to write an element as x = a + u, where u is the perturbation.\n// Then, the main point about the arithmetic of jets is that the product of\n// perturbations is zero:\n//\n//   (a + u) * (b + v) = ab + av + bu + uv\n//                     = ab + (av + bu) + 0\n//\n// which is what operator* implements below. Addition is simpler:\n//\n//   (a + u) + (b + v) = (a + b) + (u + v).\n//\n// The only remaining question is how to evaluate the function of a jet, for\n// which we use the chain rule:\n//\n//   f(a + u) = f(a) + f'(a) u\n//\n// where f'(a) is the (scalar) derivative of f at a.\n//\n// By pushing these things through sufficiently and suitably templated\n// functions, we can do automatic differentiation. Just be sure to turn on\n// function inlining and common-subexpression elimination, or it will be very\n// slow!\n//\n// WARNING: Most Ceres users should not directly include this file or know the\n// details of how jets work. Instead the suggested method for automatic\n// derivatives is to use autodiff_cost_function.h, which is a wrapper around\n// both jets.h and autodiff.h to make taking derivatives of cost functions for\n// use in Ceres easier.\n\n#ifndef CERES_PUBLIC_JET_H_\n#define CERES_PUBLIC_JET_H_\n\n#include <cmath>\n#include <iosfwd>\n#include <iostream>  // NOLINT\n#include <limits>\n#include <string>\n\n#include \"Eigen/Core\"\n#include \"ceres/internal/port.h\"\n\nnamespace ceres {\n\ntemplate <typename T, int N>\nstruct Jet {\n  enum { DIMENSION = N };\n  typedef T Scalar;\n\n  // Default-construct \"a\" because otherwise this can lead to false errors about\n  // uninitialized uses when other classes relying on default constructed T\n  // (where T is a Jet<T, N>). This usually only happens in opt mode. Note that\n  // the C++ standard mandates that e.g. default constructed doubles are\n  // initialized to 0.0; see sections 8.5 of the C++03 standard.\n  Jet() : a() { v.setConstant(Scalar()); }\n\n  // Constructor from scalar: a + 0.\n  explicit Jet(const T& value) {\n    a = value;\n    v.setConstant(Scalar());\n  }\n\n  // Constructor from scalar plus variable: a + t_i.\n  Jet(const T& value, int k) {\n    a = value;\n    v.setConstant(Scalar());\n    v[k] = T(1.0);\n  }\n\n  // Constructor from scalar and vector part\n  // The use of Eigen::DenseBase allows Eigen expressions\n  // to be passed in without being fully evaluated until\n  // they are assigned to v\n  template <typename Derived>\n  EIGEN_STRONG_INLINE Jet(const T& a, const Eigen::DenseBase<Derived>& v)\n      : a(a), v(v) {}\n\n  // Compound operators\n  Jet<T, N>& operator+=(const Jet<T, N>& y) {\n    *this = *this + y;\n    return *this;\n  }\n\n  Jet<T, N>& operator-=(const Jet<T, N>& y) {\n    *this = *this - y;\n    return *this;\n  }\n\n  Jet<T, N>& operator*=(const Jet<T, N>& y) {\n    *this = *this * y;\n    return *this;\n  }\n\n  Jet<T, N>& operator/=(const Jet<T, N>& y) {\n    *this = *this / y;\n    return *this;\n  }\n\n  // Compound with scalar operators.\n  Jet<T, N>& operator+=(const T& s) {\n    *this = *this + s;\n    return *this;\n  }\n\n  Jet<T, N>& operator-=(const T& s) {\n    *this = *this - s;\n    return *this;\n  }\n\n  Jet<T, N>& operator*=(const T& s) {\n    *this = *this * s;\n    return *this;\n  }\n\n  Jet<T, N>& operator/=(const T& s) {\n    *this = *this / s;\n    return *this;\n  }\n\n  // The scalar part.\n  T a;\n\n  // The infinitesimal part.\n  Eigen::Matrix<T, N, 1> v;\n\n  // This struct needs to have an Eigen aligned operator new as it contains\n  // fixed-size Eigen types.\n  EIGEN_MAKE_ALIGNED_OPERATOR_NEW\n};\n\n// Unary +\ntemplate <typename T, int N>\ninline Jet<T, N> const& operator+(const Jet<T, N>& f) {\n  return f;\n}\n\n// TODO(keir): Try adding __attribute__((always_inline)) to these functions to\n// see if it causes a performance increase.\n\n// Unary -\ntemplate <typename T, int N>\ninline Jet<T, N> operator-(const Jet<T, N>& f) {\n  return Jet<T, N>(-f.a, -f.v);\n}\n\n// Binary +\ntemplate <typename T, int N>\ninline Jet<T, N> operator+(const Jet<T, N>& f, const Jet<T, N>& g) {\n  return Jet<T, N>(f.a + g.a, f.v + g.v);\n}\n\n// Binary + with a scalar: x + s\ntemplate <typename T, int N>\ninline Jet<T, N> operator+(const Jet<T, N>& f, T s) {\n  return Jet<T, N>(f.a + s, f.v);\n}\n\n// Binary + with a scalar: s + x\ntemplate <typename T, int N>\ninline Jet<T, N> operator+(T s, const Jet<T, N>& f) {\n  return Jet<T, N>(f.a + s, f.v);\n}\n\n// Binary -\ntemplate <typename T, int N>\ninline Jet<T, N> operator-(const Jet<T, N>& f, const Jet<T, N>& g) {\n  return Jet<T, N>(f.a - g.a, f.v - g.v);\n}\n\n// Binary - with a scalar: x - s\ntemplate <typename T, int N>\ninline Jet<T, N> operator-(const Jet<T, N>& f, T s) {\n  return Jet<T, N>(f.a - s, f.v);\n}\n\n// Binary - with a scalar: s - x\ntemplate <typename T, int N>\ninline Jet<T, N> operator-(T s, const Jet<T, N>& f) {\n  return Jet<T, N>(s - f.a, -f.v);\n}\n\n// Binary *\ntemplate <typename T, int N>\ninline Jet<T, N> operator*(const Jet<T, N>& f, const Jet<T, N>& g) {\n  return Jet<T, N>(f.a * g.a, f.a * g.v + f.v * g.a);\n}\n\n// Binary * with a scalar: x * s\ntemplate <typename T, int N>\ninline Jet<T, N> operator*(const Jet<T, N>& f, T s) {\n  return Jet<T, N>(f.a * s, f.v * s);\n}\n\n// Binary * with a scalar: s * x\ntemplate <typename T, int N>\ninline Jet<T, N> operator*(T s, const Jet<T, N>& f) {\n  return Jet<T, N>(f.a * s, f.v * s);\n}\n\n// Binary /\ntemplate <typename T, int N>\ninline Jet<T, N> operator/(const Jet<T, N>& f, const Jet<T, N>& g) {\n  // This uses:\n  //\n  //   a + u   (a + u)(b - v)   (a + u)(b - v)\n  //   ----- = -------------- = --------------\n  //   b + v   (b + v)(b - v)        b^2\n  //\n  // which holds because v*v = 0.\n  const T g_a_inverse = T(1.0) / g.a;\n  const T f_a_by_g_a = f.a * g_a_inverse;\n  return Jet<T, N>(f_a_by_g_a, (f.v - f_a_by_g_a * g.v) * g_a_inverse);\n}\n\n// Binary / with a scalar: s / x\ntemplate <typename T, int N>\ninline Jet<T, N> operator/(T s, const Jet<T, N>& g) {\n  const T minus_s_g_a_inverse2 = -s / (g.a * g.a);\n  return Jet<T, N>(s / g.a, g.v * minus_s_g_a_inverse2);\n}\n\n// Binary / with a scalar: x / s\ntemplate <typename T, int N>\ninline Jet<T, N> operator/(const Jet<T, N>& f, T s) {\n  const T s_inverse = T(1.0) / s;\n  return Jet<T, N>(f.a * s_inverse, f.v * s_inverse);\n}\n\n// Binary comparison operators for both scalars and jets.\n#define CERES_DEFINE_JET_COMPARISON_OPERATOR(op)                    \\\n  template <typename T, int N>                                      \\\n  inline bool operator op(const Jet<T, N>& f, const Jet<T, N>& g) { \\\n    return f.a op g.a;                                              \\\n  }                                                                 \\\n  template <typename T, int N>                                      \\\n  inline bool operator op(const T& s, const Jet<T, N>& g) {         \\\n    return s op g.a;                                                \\\n  }                                                                 \\\n  template <typename T, int N>                                      \\\n  inline bool operator op(const Jet<T, N>& f, const T& s) {         \\\n    return f.a op s;                                                \\\n  }\nCERES_DEFINE_JET_COMPARISON_OPERATOR(<)   // NOLINT\nCERES_DEFINE_JET_COMPARISON_OPERATOR(<=)  // NOLINT\nCERES_DEFINE_JET_COMPARISON_OPERATOR(>)   // NOLINT\nCERES_DEFINE_JET_COMPARISON_OPERATOR(>=)  // NOLINT\nCERES_DEFINE_JET_COMPARISON_OPERATOR(==)  // NOLINT\nCERES_DEFINE_JET_COMPARISON_OPERATOR(!=)  // NOLINT\n#undef CERES_DEFINE_JET_COMPARISON_OPERATOR\n\n// Pull some functions from namespace std.\n//\n// This is necessary because we want to use the same name (e.g. 'sqrt') for\n// double-valued and Jet-valued functions, but we are not allowed to put\n// Jet-valued functions inside namespace std.\nusing std::abs;\nusing std::acos;\nusing std::asin;\nusing std::atan;\nusing std::atan2;\nusing std::cbrt;\nusing std::ceil;\nusing std::cos;\nusing std::cosh;\nusing std::exp;\nusing std::exp2;\nusing std::floor;\nusing std::fmax;\nusing std::fmin;\nusing std::hypot;\nusing std::isfinite;\nusing std::isinf;\nusing std::isnan;\nusing std::isnormal;\nusing std::log;\nusing std::log2;\nusing std::pow;\nusing std::sin;\nusing std::sinh;\nusing std::sqrt;\nusing std::tan;\nusing std::tanh;\n\n// Legacy names from pre-C++11 days.\n// clang-format off\ninline bool IsFinite(double x)   { return std::isfinite(x); }\ninline bool IsInfinite(double x) { return std::isinf(x);    }\ninline bool IsNaN(double x)      { return std::isnan(x);    }\ninline bool IsNormal(double x)   { return std::isnormal(x); }\n// clang-format on\n\n// In general, f(a + h) ~= f(a) + f'(a) h, via the chain rule.\n\n// abs(x + h) ~= x + h or -(x + h)\ntemplate <typename T, int N>\ninline Jet<T, N> abs(const Jet<T, N>& f) {\n  return (f.a < T(0.0) ? -f : f);\n}\n\n// log(a + h) ~= log(a) + h / a\ntemplate <typename T, int N>\ninline Jet<T, N> log(const Jet<T, N>& f) {\n  const T a_inverse = T(1.0) / f.a;\n  return Jet<T, N>(log(f.a), f.v * a_inverse);\n}\n\n// exp(a + h) ~= exp(a) + exp(a) h\ntemplate <typename T, int N>\ninline Jet<T, N> exp(const Jet<T, N>& f) {\n  const T tmp = exp(f.a);\n  return Jet<T, N>(tmp, tmp * f.v);\n}\n\n// sqrt(a + h) ~= sqrt(a) + h / (2 sqrt(a))\ntemplate <typename T, int N>\ninline Jet<T, N> sqrt(const Jet<T, N>& f) {\n  const T tmp = sqrt(f.a);\n  const T two_a_inverse = T(1.0) / (T(2.0) * tmp);\n  return Jet<T, N>(tmp, f.v * two_a_inverse);\n}\n\n// cos(a + h) ~= cos(a) - sin(a) h\ntemplate <typename T, int N>\ninline Jet<T, N> cos(const Jet<T, N>& f) {\n  return Jet<T, N>(cos(f.a), -sin(f.a) * f.v);\n}\n\n// acos(a + h) ~= acos(a) - 1 / sqrt(1 - a^2) h\ntemplate <typename T, int N>\ninline Jet<T, N> acos(const Jet<T, N>& f) {\n  const T tmp = -T(1.0) / sqrt(T(1.0) - f.a * f.a);\n  return Jet<T, N>(acos(f.a), tmp * f.v);\n}\n\n// sin(a + h) ~= sin(a) + cos(a) h\ntemplate <typename T, int N>\ninline Jet<T, N> sin(const Jet<T, N>& f) {\n  return Jet<T, N>(sin(f.a), cos(f.a) * f.v);\n}\n\n// asin(a + h) ~= asin(a) + 1 / sqrt(1 - a^2) h\ntemplate <typename T, int N>\ninline Jet<T, N> asin(const Jet<T, N>& f) {\n  const T tmp = T(1.0) / sqrt(T(1.0) - f.a * f.a);\n  return Jet<T, N>(asin(f.a), tmp * f.v);\n}\n\n// tan(a + h) ~= tan(a) + (1 + tan(a)^2) h\ntemplate <typename T, int N>\ninline Jet<T, N> tan(const Jet<T, N>& f) {\n  const T tan_a = tan(f.a);\n  const T tmp = T(1.0) + tan_a * tan_a;\n  return Jet<T, N>(tan_a, tmp * f.v);\n}\n\n// atan(a + h) ~= atan(a) + 1 / (1 + a^2) h\ntemplate <typename T, int N>\ninline Jet<T, N> atan(const Jet<T, N>& f) {\n  const T tmp = T(1.0) / (T(1.0) + f.a * f.a);\n  return Jet<T, N>(atan(f.a), tmp * f.v);\n}\n\n// sinh(a + h) ~= sinh(a) + cosh(a) h\ntemplate <typename T, int N>\ninline Jet<T, N> sinh(const Jet<T, N>& f) {\n  return Jet<T, N>(sinh(f.a), cosh(f.a) * f.v);\n}\n\n// cosh(a + h) ~= cosh(a) + sinh(a) h\ntemplate <typename T, int N>\ninline Jet<T, N> cosh(const Jet<T, N>& f) {\n  return Jet<T, N>(cosh(f.a), sinh(f.a) * f.v);\n}\n\n// tanh(a + h) ~= tanh(a) + (1 - tanh(a)^2) h\ntemplate <typename T, int N>\ninline Jet<T, N> tanh(const Jet<T, N>& f) {\n  const T tanh_a = tanh(f.a);\n  const T tmp = T(1.0) - tanh_a * tanh_a;\n  return Jet<T, N>(tanh_a, tmp * f.v);\n}\n\n// The floor function should be used with extreme care as this operation will\n// result in a zero derivative which provides no information to the solver.\n//\n// floor(a + h) ~= floor(a) + 0\ntemplate <typename T, int N>\ninline Jet<T, N> floor(const Jet<T, N>& f) {\n  return Jet<T, N>(floor(f.a));\n}\n\n// The ceil function should be used with extreme care as this operation will\n// result in a zero derivative which provides no information to the solver.\n//\n// ceil(a + h) ~= ceil(a) + 0\ntemplate <typename T, int N>\ninline Jet<T, N> ceil(const Jet<T, N>& f) {\n  return Jet<T, N>(ceil(f.a));\n}\n\n// Some new additions to C++11:\n\n// cbrt(a + h) ~= cbrt(a) + h / (3 a ^ (2/3))\ntemplate <typename T, int N>\ninline Jet<T, N> cbrt(const Jet<T, N>& f) {\n  const T derivative = T(1.0) / (T(3.0) * cbrt(f.a * f.a));\n  return Jet<T, N>(cbrt(f.a), f.v * derivative);\n}\n\n// exp2(x + h) = 2^(x+h) ~= 2^x + h*2^x*log(2)\ntemplate <typename T, int N>\ninline Jet<T, N> exp2(const Jet<T, N>& f) {\n  const T tmp = exp2(f.a);\n  const T derivative = tmp * log(T(2));\n  return Jet<T, N>(tmp, f.v * derivative);\n}\n\n// log2(x + h) ~= log2(x) + h / (x * log(2))\ntemplate <typename T, int N>\ninline Jet<T, N> log2(const Jet<T, N>& f) {\n  const T derivative = T(1.0) / (f.a * log(T(2)));\n  return Jet<T, N>(log2(f.a), f.v * derivative);\n}\n\n// Like sqrt(x^2 + y^2),\n// but acts to prevent underflow/overflow for small/large x/y.\n// Note that the function is non-smooth at x=y=0,\n// so the derivative is undefined there.\ntemplate <typename T, int N>\ninline Jet<T, N> hypot(const Jet<T, N>& x, const Jet<T, N>& y) {\n  // d/da sqrt(a) = 0.5 / sqrt(a)\n  // d/dx x^2 + y^2 = 2x\n  // So by the chain rule:\n  // d/dx sqrt(x^2 + y^2) = 0.5 / sqrt(x^2 + y^2) * 2x = x / sqrt(x^2 + y^2)\n  // d/dy sqrt(x^2 + y^2) = y / sqrt(x^2 + y^2)\n  const T tmp = hypot(x.a, y.a);\n  return Jet<T, N>(tmp, x.a / tmp * x.v + y.a / tmp * y.v);\n}\n\ntemplate <typename T, int N>\ninline Jet<T, N> fmax(const Jet<T, N>& x, const Jet<T, N>& y) {\n  return x < y ? y : x;\n}\n\ntemplate <typename T, int N>\ninline Jet<T, N> fmin(const Jet<T, N>& x, const Jet<T, N>& y) {\n  return y < x ? y : x;\n}\n\n// Bessel functions of the first kind with integer order equal to 0, 1, n.\n//\n// Microsoft has deprecated the j[0,1,n]() POSIX Bessel functions in favour of\n// _j[0,1,n]().  Where available on MSVC, use _j[0,1,n]() to avoid deprecated\n// function errors in client code (the specific warning is suppressed when\n// Ceres itself is built).\ninline double BesselJ0(double x) {\n#if defined(CERES_MSVC_USE_UNDERSCORE_PREFIXED_BESSEL_FUNCTIONS)\n  return _j0(x);\n#else\n  return j0(x);\n#endif\n}\ninline double BesselJ1(double x) {\n#if defined(CERES_MSVC_USE_UNDERSCORE_PREFIXED_BESSEL_FUNCTIONS)\n  return _j1(x);\n#else\n  return j1(x);\n#endif\n}\ninline double BesselJn(int n, double x) {\n#if defined(CERES_MSVC_USE_UNDERSCORE_PREFIXED_BESSEL_FUNCTIONS)\n  return _jn(n, x);\n#else\n  return jn(n, x);\n#endif\n}\n\n// For the formulae of the derivatives of the Bessel functions see the book:\n// Olver, Lozier, Boisvert, Clark, NIST Handbook of Mathematical Functions,\n// Cambridge University Press 2010.\n//\n// Formulae are also available at http://dlmf.nist.gov\n\n// See formula http://dlmf.nist.gov/10.6#E3\n// j0(a + h) ~= j0(a) - j1(a) h\ntemplate <typename T, int N>\ninline Jet<T, N> BesselJ0(const Jet<T, N>& f) {\n  return Jet<T, N>(BesselJ0(f.a), -BesselJ1(f.a) * f.v);\n}\n\n// See formula http://dlmf.nist.gov/10.6#E1\n// j1(a + h) ~= j1(a) + 0.5 ( j0(a) - j2(a) ) h\ntemplate <typename T, int N>\ninline Jet<T, N> BesselJ1(const Jet<T, N>& f) {\n  return Jet<T, N>(BesselJ1(f.a),\n                   T(0.5) * (BesselJ0(f.a) - BesselJn(2, f.a)) * f.v);\n}\n\n// See formula http://dlmf.nist.gov/10.6#E1\n// j_n(a + h) ~= j_n(a) + 0.5 ( j_{n-1}(a) - j_{n+1}(a) ) h\ntemplate <typename T, int N>\ninline Jet<T, N> BesselJn(int n, const Jet<T, N>& f) {\n  return Jet<T, N>(\n      BesselJn(n, f.a),\n      T(0.5) * (BesselJn(n - 1, f.a) - BesselJn(n + 1, f.a)) * f.v);\n}\n\n// Jet Classification. It is not clear what the appropriate semantics are for\n// these classifications. This picks that std::isfinite and std::isnormal are\n// \"all\" operations, i.e. all elements of the jet must be finite for the jet\n// itself to be finite (or normal). For IsNaN and IsInfinite, the answer is less\n// clear. This takes a \"any\" approach for IsNaN and IsInfinite such that if any\n// part of a jet is nan or inf, then the entire jet is nan or inf. This leads\n// to strange situations like a jet can be both IsInfinite and IsNaN, but in\n// practice the \"any\" semantics are the most useful for e.g. checking that\n// derivatives are sane.\n\n// The jet is finite if all parts of the jet are finite.\ntemplate <typename T, int N>\ninline bool isfinite(const Jet<T, N>& f) {\n  // Branchless implementation. This is more efficient for the false-case and\n  // works with the codegen system.\n  auto result = isfinite(f.a);\n  for (int i = 0; i < N; ++i) {\n    result = result & isfinite(f.v[i]);\n  }\n  return result;\n}\n\n// The jet is infinite if any part of the Jet is infinite.\ntemplate <typename T, int N>\ninline bool isinf(const Jet<T, N>& f) {\n  auto result = isinf(f.a);\n  for (int i = 0; i < N; ++i) {\n    result = result | isinf(f.v[i]);\n  }\n  return result;\n}\n\n// The jet is NaN if any part of the jet is NaN.\ntemplate <typename T, int N>\ninline bool isnan(const Jet<T, N>& f) {\n  auto result = isnan(f.a);\n  for (int i = 0; i < N; ++i) {\n    result = result | isnan(f.v[i]);\n  }\n  return result;\n}\n\n// The jet is normal if all parts of the jet are normal.\ntemplate <typename T, int N>\ninline bool isnormal(const Jet<T, N>& f) {\n  auto result = isnormal(f.a);\n  for (int i = 0; i < N; ++i) {\n    result = result & isnormal(f.v[i]);\n  }\n  return result;\n}\n\n// Legacy functions from the pre-C++11 days.\ntemplate <typename T, int N>\ninline bool IsFinite(const Jet<T, N>& f) {\n  return isfinite(f);\n}\n\ntemplate <typename T, int N>\ninline bool IsNaN(const Jet<T, N>& f) {\n  return isnan(f);\n}\n\ntemplate <typename T, int N>\ninline bool IsNormal(const Jet<T, N>& f) {\n  return isnormal(f);\n}\n\n// The jet is infinite if any part of the jet is infinite.\ntemplate <typename T, int N>\ninline bool IsInfinite(const Jet<T, N>& f) {\n  return isinf(f);\n}\n\n// atan2(b + db, a + da) ~= atan2(b, a) + (- b da + a db) / (a^2 + b^2)\n//\n// In words: the rate of change of theta is 1/r times the rate of\n// change of (x, y) in the positive angular direction.\ntemplate <typename T, int N>\ninline Jet<T, N> atan2(const Jet<T, N>& g, const Jet<T, N>& f) {\n  // Note order of arguments:\n  //\n  //   f = a + da\n  //   g = b + db\n\n  T const tmp = T(1.0) / (f.a * f.a + g.a * g.a);\n  return Jet<T, N>(atan2(g.a, f.a), tmp * (-g.a * f.v + f.a * g.v));\n}\n\n// pow -- base is a differentiable function, exponent is a constant.\n// (a+da)^p ~= a^p + p*a^(p-1) da\ntemplate <typename T, int N>\ninline Jet<T, N> pow(const Jet<T, N>& f, double g) {\n  T const tmp = g * pow(f.a, g - T(1.0));\n  return Jet<T, N>(pow(f.a, g), tmp * f.v);\n}\n\n// pow -- base is a constant, exponent is a differentiable function.\n// We have various special cases, see the comment for pow(Jet, Jet) for\n// analysis:\n//\n// 1. For f > 0 we have: (f)^(g + dg) ~= f^g + f^g log(f) dg\n//\n// 2. For f == 0 and g > 0 we have: (f)^(g + dg) ~= f^g\n//\n// 3. For f < 0 and integer g we have: (f)^(g + dg) ~= f^g but if dg\n// != 0, the derivatives are not defined and we return NaN.\n\ntemplate <typename T, int N>\ninline Jet<T, N> pow(T f, const Jet<T, N>& g) {\n  Jet<T, N> result;\n\n  if (f == T(0) && g.a > T(0)) {\n    // Handle case 2.\n    result = Jet<T, N>(T(0.0));\n  } else {\n    if (f < 0 && g.a == floor(g.a)) {  // Handle case 3.\n      result = Jet<T, N>(pow(f, g.a));\n      for (int i = 0; i < N; i++) {\n        if (g.v[i] != T(0.0)) {\n          // Return a NaN when g.v != 0.\n          result.v[i] = std::numeric_limits<T>::quiet_NaN();\n        }\n      }\n    } else {\n      // Handle case 1.\n      T const tmp = pow(f, g.a);\n      result = Jet<T, N>(tmp, log(f) * tmp * g.v);\n    }\n  }\n\n  return result;\n}\n\n// pow -- both base and exponent are differentiable functions. This has a\n// variety of special cases that require careful handling.\n//\n// 1. For f > 0:\n//    (f + df)^(g + dg) ~= f^g + f^(g - 1) * (g * df + f * log(f) * dg)\n//    The numerical evaluation of f * log(f) for f > 0 is well behaved, even for\n//    extremely small values (e.g. 1e-99).\n//\n// 2. For f == 0 and g > 1: (f + df)^(g + dg) ~= 0\n//    This cases is needed because log(0) can not be evaluated in the f > 0\n//    expression. However the function f*log(f) is well behaved around f == 0\n//    and its limit as f-->0 is zero.\n//\n// 3. For f == 0 and g == 1: (f + df)^(g + dg) ~= 0 + df\n//\n// 4. For f == 0 and 0 < g < 1: The value is finite but the derivatives are not.\n//\n// 5. For f == 0 and g < 0: The value and derivatives of f^g are not finite.\n//\n// 6. For f == 0 and g == 0: The C standard incorrectly defines 0^0 to be 1\n//    \"because there are applications that can exploit this definition\". We\n//    (arbitrarily) decree that derivatives here will be nonfinite, since that\n//    is consistent with the behavior for f == 0, g < 0 and 0 < g < 1.\n//    Practically any definition could have been justified because mathematical\n//    consistency has been lost at this point.\n//\n// 7. For f < 0, g integer, dg == 0: (f + df)^(g + dg) ~= f^g + g * f^(g - 1) df\n//    This is equivalent to the case where f is a differentiable function and g\n//    is a constant (to first order).\n//\n// 8. For f < 0, g integer, dg != 0: The value is finite but the derivatives are\n//    not, because any change in the value of g moves us away from the point\n//    with a real-valued answer into the region with complex-valued answers.\n//\n// 9. For f < 0, g noninteger: The value and derivatives of f^g are not finite.\n\ntemplate <typename T, int N>\ninline Jet<T, N> pow(const Jet<T, N>& f, const Jet<T, N>& g) {\n  Jet<T, N> result;\n\n  if (f.a == T(0) && g.a >= T(1)) {\n    // Handle cases 2 and 3.\n    if (g.a > T(1)) {\n      result = Jet<T, N>(T(0.0));\n    } else {\n      result = f;\n    }\n\n  } else {\n    if (f.a < T(0) && g.a == floor(g.a)) {\n      // Handle cases 7 and 8.\n      T const tmp = g.a * pow(f.a, g.a - T(1.0));\n      result = Jet<T, N>(pow(f.a, g.a), tmp * f.v);\n      for (int i = 0; i < N; i++) {\n        if (g.v[i] != T(0.0)) {\n          // Return a NaN when g.v != 0.\n          result.v[i] = T(std::numeric_limits<double>::quiet_NaN());\n        }\n      }\n    } else {\n      // Handle the remaining cases. For cases 4,5,6,9 we allow the log()\n      // function to generate -HUGE_VAL or NaN, since those cases result in a\n      // nonfinite derivative.\n      T const tmp1 = pow(f.a, g.a);\n      T const tmp2 = g.a * pow(f.a, g.a - T(1.0));\n      T const tmp3 = tmp1 * log(f.a);\n      result = Jet<T, N>(tmp1, tmp2 * f.v + tmp3 * g.v);\n    }\n  }\n\n  return result;\n}\n\n// Note: This has to be in the ceres namespace for argument dependent lookup to\n// function correctly. Otherwise statements like CHECK_LE(x, 2.0) fail with\n// strange compile errors.\ntemplate <typename T, int N>\ninline std::ostream& operator<<(std::ostream& s, const Jet<T, N>& z) {\n  s << \"[\" << z.a << \" ; \";\n  for (int i = 0; i < N; ++i) {\n    s << z.v[i];\n    if (i != N - 1) {\n      s << \", \";\n    }\n  }\n  s << \"]\";\n  return s;\n}\n}  // namespace ceres\n\nnamespace std {\ntemplate <typename T, int N>\nstruct numeric_limits<ceres::Jet<T, N>> {\n  static constexpr bool is_specialized = true;\n  static constexpr bool is_signed = std::numeric_limits<T>::is_signed;\n  static constexpr bool is_integer = std::numeric_limits<T>::is_integer;\n  static constexpr bool is_exact = std::numeric_limits<T>::is_exact;\n  static constexpr bool has_infinity = std::numeric_limits<T>::has_infinity;\n  static constexpr bool has_quiet_NaN = std::numeric_limits<T>::has_quiet_NaN;\n  static constexpr bool has_signaling_NaN =\n      std::numeric_limits<T>::has_signaling_NaN;\n  static constexpr bool is_iec559 = std::numeric_limits<T>::is_iec559;\n  static constexpr bool is_bounded = std::numeric_limits<T>::is_bounded;\n  static constexpr bool is_modulo = std::numeric_limits<T>::is_modulo;\n\n  static constexpr std::float_denorm_style has_denorm =\n      std::numeric_limits<T>::has_denorm;\n  static constexpr std::float_round_style round_style =\n      std::numeric_limits<T>::round_style;\n\n  static constexpr int digits = std::numeric_limits<T>::digits;\n  static constexpr int digits10 = std::numeric_limits<T>::digits10;\n  static constexpr int max_digits10 = std::numeric_limits<T>::max_digits10;\n  static constexpr int radix = std::numeric_limits<T>::radix;\n  static constexpr int min_exponent = std::numeric_limits<T>::min_exponent;\n  static constexpr int min_exponent10 = std::numeric_limits<T>::max_exponent10;\n  static constexpr int max_exponent = std::numeric_limits<T>::max_exponent;\n  static constexpr int max_exponent10 = std::numeric_limits<T>::max_exponent10;\n  static constexpr bool traps = std::numeric_limits<T>::traps;\n  static constexpr bool tinyness_before =\n      std::numeric_limits<T>::tinyness_before;\n\n  static constexpr ceres::Jet<T, N> min() noexcept {\n    return ceres::Jet<T, N>(std::numeric_limits<T>::min());\n  }\n  static constexpr ceres::Jet<T, N> lowest() noexcept {\n    return ceres::Jet<T, N>(std::numeric_limits<T>::lowest());\n  }\n  static constexpr ceres::Jet<T, N> epsilon() noexcept {\n    return ceres::Jet<T, N>(std::numeric_limits<T>::epsilon());\n  }\n  static constexpr ceres::Jet<T, N> round_error() noexcept {\n    return ceres::Jet<T, N>(std::numeric_limits<T>::round_error());\n  }\n  static constexpr ceres::Jet<T, N> infinity() noexcept {\n    return ceres::Jet<T, N>(std::numeric_limits<T>::infinity());\n  }\n  static constexpr ceres::Jet<T, N> quiet_NaN() noexcept {\n    return ceres::Jet<T, N>(std::numeric_limits<T>::quiet_NaN());\n  }\n  static constexpr ceres::Jet<T, N> signaling_NaN() noexcept {\n    return ceres::Jet<T, N>(std::numeric_limits<T>::signaling_NaN());\n  }\n  static constexpr ceres::Jet<T, N> denorm_min() noexcept {\n    return ceres::Jet<T, N>(std::numeric_limits<T>::denorm_min());\n  }\n\n  static constexpr ceres::Jet<T, N> max() noexcept {\n    return ceres::Jet<T, N>(std::numeric_limits<T>::max());\n  }\n};\n\n}  // namespace std\n\nnamespace Eigen {\n\n// Creating a specialization of NumTraits enables placing Jet objects inside\n// Eigen arrays, getting all the goodness of Eigen combined with autodiff.\ntemplate <typename T, int N>\nstruct NumTraits<ceres::Jet<T, N>> {\n  typedef ceres::Jet<T, N> Real;\n  typedef ceres::Jet<T, N> NonInteger;\n  typedef ceres::Jet<T, N> Nested;\n  typedef ceres::Jet<T, N> Literal;\n\n  static typename ceres::Jet<T, N> dummy_precision() {\n    return ceres::Jet<T, N>(1e-12);\n  }\n\n  static inline Real epsilon() {\n    return Real(std::numeric_limits<T>::epsilon());\n  }\n\n  static inline int digits10() { return NumTraits<T>::digits10(); }\n\n  enum {\n    IsComplex = 0,\n    IsInteger = 0,\n    IsSigned,\n    ReadCost = 1,\n    AddCost = 1,\n    // For Jet types, multiplication is more expensive than addition.\n    MulCost = 3,\n    HasFloatingPoint = 1,\n    RequireInitialization = 1\n  };\n\n  template <bool Vectorized>\n  struct Div {\n    enum {\n#if defined(EIGEN_VECTORIZE_AVX)\n      AVX = true,\n#else\n      AVX = false,\n#endif\n\n      // Assuming that for Jets, division is as expensive as\n      // multiplication.\n      Cost = 3\n    };\n  };\n\n  static inline Real highest() { return Real(std::numeric_limits<T>::max()); }\n  static inline Real lowest() { return Real(-std::numeric_limits<T>::max()); }\n};\n\n#if EIGEN_VERSION_AT_LEAST(3, 3, 0)\n// Specifying the return type of binary operations between Jets and scalar types\n// allows you to perform matrix/array operations with Eigen matrices and arrays\n// such as addition, subtraction, multiplication, and division where one Eigen\n// matrix/array is of type Jet and the other is a scalar type. This improves\n// performance by using the optimized scalar-to-Jet binary operations but\n// is only available on Eigen versions >= 3.3\ntemplate <typename BinaryOp, typename T, int N>\nstruct ScalarBinaryOpTraits<ceres::Jet<T, N>, T, BinaryOp> {\n  typedef ceres::Jet<T, N> ReturnType;\n};\ntemplate <typename BinaryOp, typename T, int N>\nstruct ScalarBinaryOpTraits<T, ceres::Jet<T, N>, BinaryOp> {\n  typedef ceres::Jet<T, N> ReturnType;\n};\n#endif\n\n}  // namespace Eigen\n\n#endif  // CERES_PUBLIC_JET_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/local_parameterization.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n//         sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_PUBLIC_LOCAL_PARAMETERIZATION_H_\n#define CERES_PUBLIC_LOCAL_PARAMETERIZATION_H_\n\n#include <array>\n#include <memory>\n#include <vector>\n\n#include \"ceres/internal/disable_warnings.h\"\n#include \"ceres/internal/port.h\"\n\nnamespace ceres {\n\n// Purpose: Sometimes parameter blocks x can overparameterize a problem\n//\n//   min f(x)\n//    x\n//\n// In that case it is desirable to choose a parameterization for the\n// block itself to remove the null directions of the cost. More\n// generally, if x lies on a manifold of a smaller dimension than the\n// ambient space that it is embedded in, then it is numerically and\n// computationally more effective to optimize it using a\n// parameterization that lives in the tangent space of that manifold\n// at each point.\n//\n// For example, a sphere in three dimensions is a 2 dimensional\n// manifold, embedded in a three dimensional space. At each point on\n// the sphere, the plane tangent to it defines a two dimensional\n// tangent space. For a cost function defined on this sphere, given a\n// point x, moving in the direction normal to the sphere at that point\n// is not useful. Thus a better way to do a local optimization is to\n// optimize over two dimensional vector delta in the tangent space at\n// that point and then \"move\" to the point x + delta, where the move\n// operation involves projecting back onto the sphere. Doing so\n// removes a redundant dimension from the optimization, making it\n// numerically more robust and efficient.\n//\n// More generally we can define a function\n//\n//   x_plus_delta = Plus(x, delta),\n//\n// where x_plus_delta has the same size as x, and delta is of size\n// less than or equal to x. The function Plus, generalizes the\n// definition of vector addition. Thus it satisfies the identify\n//\n//   Plus(x, 0) = x, for all x.\n//\n// A trivial version of Plus is when delta is of the same size as x\n// and\n//\n//   Plus(x, delta) = x + delta\n//\n// A more interesting case if x is two dimensional vector, and the\n// user wishes to hold the first coordinate constant. Then, delta is a\n// scalar and Plus is defined as\n//\n//   Plus(x, delta) = x + [0] * delta\n//                        [1]\n//\n// An example that occurs commonly in Structure from Motion problems\n// is when camera rotations are parameterized using Quaternion. There,\n// it is useful only make updates orthogonal to that 4-vector defining\n// the quaternion. One way to do this is to let delta be a 3\n// dimensional vector and define Plus to be\n//\n//   Plus(x, delta) = [cos(|delta|), sin(|delta|) delta / |delta|] * x\n//\n// The multiplication between the two 4-vectors on the RHS is the\n// standard quaternion product.\n//\n// Given g and a point x, optimizing f can now be restated as\n//\n//     min  f(Plus(x, delta))\n//    delta\n//\n// Given a solution delta to this problem, the optimal value is then\n// given by\n//\n//   x* = Plus(x, delta)\n//\n// The class LocalParameterization defines the function Plus and its\n// Jacobian which is needed to compute the Jacobian of f w.r.t delta.\nclass CERES_EXPORT LocalParameterization {\n public:\n  virtual ~LocalParameterization();\n\n  // Generalization of the addition operation,\n  //\n  //   x_plus_delta = Plus(x, delta)\n  //\n  // with the condition that Plus(x, 0) = x.\n  virtual bool Plus(const double* x,\n                    const double* delta,\n                    double* x_plus_delta) const = 0;\n\n  // The jacobian of Plus(x, delta) w.r.t delta at delta = 0.\n  //\n  // jacobian is a row-major GlobalSize() x LocalSize() matrix.\n  virtual bool ComputeJacobian(const double* x, double* jacobian) const = 0;\n\n  // local_matrix = global_matrix * jacobian\n  //\n  // global_matrix is a num_rows x GlobalSize  row major matrix.\n  // local_matrix is a num_rows x LocalSize row major matrix.\n  // jacobian(x) is the matrix returned by ComputeJacobian at x.\n  //\n  // This is only used by GradientProblem. For most normal uses, it is\n  // okay to use the default implementation.\n  virtual bool MultiplyByJacobian(const double* x,\n                                  const int num_rows,\n                                  const double* global_matrix,\n                                  double* local_matrix) const;\n\n  // Size of x.\n  virtual int GlobalSize() const = 0;\n\n  // Size of delta.\n  virtual int LocalSize() const = 0;\n};\n\n// Some basic parameterizations\n\n// Identity Parameterization: Plus(x, delta) = x + delta\nclass CERES_EXPORT IdentityParameterization : public LocalParameterization {\n public:\n  explicit IdentityParameterization(int size);\n  virtual ~IdentityParameterization() {}\n  bool Plus(const double* x,\n            const double* delta,\n            double* x_plus_delta) const override;\n  bool ComputeJacobian(const double* x, double* jacobian) const override;\n  bool MultiplyByJacobian(const double* x,\n                          const int num_cols,\n                          const double* global_matrix,\n                          double* local_matrix) const override;\n  int GlobalSize() const override { return size_; }\n  int LocalSize() const override { return size_; }\n\n private:\n  const int size_;\n};\n\n// Hold a subset of the parameters inside a parameter block constant.\nclass CERES_EXPORT SubsetParameterization : public LocalParameterization {\n public:\n  explicit SubsetParameterization(int size,\n                                  const std::vector<int>& constant_parameters);\n  virtual ~SubsetParameterization() {}\n  bool Plus(const double* x,\n            const double* delta,\n            double* x_plus_delta) const override;\n  bool ComputeJacobian(const double* x, double* jacobian) const override;\n  bool MultiplyByJacobian(const double* x,\n                          const int num_cols,\n                          const double* global_matrix,\n                          double* local_matrix) const override;\n  int GlobalSize() const override {\n    return static_cast<int>(constancy_mask_.size());\n  }\n  int LocalSize() const override { return local_size_; }\n\n private:\n  const int local_size_;\n  std::vector<char> constancy_mask_;\n};\n\n// Plus(x, delta) = [cos(|delta|), sin(|delta|) delta / |delta|] * x\n// with * being the quaternion multiplication operator. Here we assume\n// that the first element of the quaternion vector is the real (cos\n// theta) part.\nclass CERES_EXPORT QuaternionParameterization : public LocalParameterization {\n public:\n  virtual ~QuaternionParameterization() {}\n  bool Plus(const double* x,\n            const double* delta,\n            double* x_plus_delta) const override;\n  bool ComputeJacobian(const double* x, double* jacobian) const override;\n  int GlobalSize() const override { return 4; }\n  int LocalSize() const override { return 3; }\n};\n\n// Implements the quaternion local parameterization for Eigen's representation\n// of the quaternion. Eigen uses a different internal memory layout for the\n// elements of the quaternion than what is commonly used. Specifically, Eigen\n// stores the elements in memory as [x, y, z, w] where the real part is last\n// whereas it is typically stored first. Note, when creating an Eigen quaternion\n// through the constructor the elements are accepted in w, x, y, z order. Since\n// Ceres operates on parameter blocks which are raw double pointers this\n// difference is important and requires a different parameterization.\n//\n// Plus(x, delta) = [sin(|delta|) delta / |delta|, cos(|delta|)] * x\n// with * being the quaternion multiplication operator.\nclass CERES_EXPORT EigenQuaternionParameterization\n    : public ceres::LocalParameterization {\n public:\n  virtual ~EigenQuaternionParameterization() {}\n  bool Plus(const double* x,\n            const double* delta,\n            double* x_plus_delta) const override;\n  bool ComputeJacobian(const double* x, double* jacobian) const override;\n  int GlobalSize() const override { return 4; }\n  int LocalSize() const override { return 3; }\n};\n\n// This provides a parameterization for homogeneous vectors which are commonly\n// used in Structure for Motion problems.  One example where they are used is\n// in representing points whose triangulation is ill-conditioned. Here\n// it is advantageous to use an over-parameterization since homogeneous vectors\n// can represent points at infinity.\n//\n// The plus operator is defined as\n// Plus(x, delta) =\n//    [sin(0.5 * |delta|) * delta / |delta|, cos(0.5 * |delta|)] * x\n// with * defined as an operator which applies the update orthogonal to x to\n// remain on the sphere. We assume that the last element of x is the scalar\n// component. The size of the homogeneous vector is required to be greater than\n// 1.\nclass CERES_EXPORT HomogeneousVectorParameterization\n    : public LocalParameterization {\n public:\n  explicit HomogeneousVectorParameterization(int size);\n  virtual ~HomogeneousVectorParameterization() {}\n  bool Plus(const double* x,\n            const double* delta,\n            double* x_plus_delta) const override;\n  bool ComputeJacobian(const double* x, double* jacobian) const override;\n  int GlobalSize() const override { return size_; }\n  int LocalSize() const override { return size_ - 1; }\n\n private:\n  const int size_;\n};\n\n// This provides a parameterization for lines, where the line is\n// over-parameterized by an origin point and a direction vector. So the\n// parameter vector size needs to be two times the ambient space dimension,\n// where the first half is interpreted as the origin point and the second half\n// as the direction.\n//\n// The plus operator for the line direction is the same as for the\n// HomogeneousVectorParameterization. The update of the origin point is\n// perpendicular to the line direction before the update.\n//\n// This local parameterization is a special case of the affine Grassmannian\n// manifold (see https://en.wikipedia.org/wiki/Affine_Grassmannian_(manifold))\n// for the case Graff_1(R^n).\ntemplate <int AmbientSpaceDimension>\nclass CERES_EXPORT LineParameterization : public LocalParameterization {\n public:\n  static_assert(AmbientSpaceDimension >= 2,\n                \"The ambient space must be at least 2\");\n\n  bool Plus(const double* x,\n            const double* delta,\n            double* x_plus_delta) const override;\n  bool ComputeJacobian(const double* x, double* jacobian) const override;\n  int GlobalSize() const override { return 2 * AmbientSpaceDimension; }\n  int LocalSize() const override { return 2 * (AmbientSpaceDimension - 1); }\n};\n\n// Construct a local parameterization by taking the Cartesian product\n// of a number of other local parameterizations. This is useful, when\n// a parameter block is the cartesian product of two or more\n// manifolds. For example the parameters of a camera consist of a\n// rotation and a translation, i.e., SO(3) x R^3.\n//\n// Example usage:\n//\n// ProductParameterization product_param(new QuaterionionParameterization(),\n//                                       new IdentityParameterization(3));\n//\n// is the local parameterization for a rigid transformation, where the\n// rotation is represented using a quaternion.\nclass CERES_EXPORT ProductParameterization : public LocalParameterization {\n public:\n  ProductParameterization(const ProductParameterization&) = delete;\n  ProductParameterization& operator=(const ProductParameterization&) = delete;\n  //\n  // NOTE: The constructor takes ownership of the input local\n  // parameterizations.\n  //\n  template <typename... LocalParams>\n  ProductParameterization(LocalParams*... local_params)\n      : local_params_(sizeof...(LocalParams)),\n        local_size_{0},\n        global_size_{0},\n        buffer_size_{0} {\n    constexpr int kNumLocalParams = sizeof...(LocalParams);\n    static_assert(kNumLocalParams >= 2,\n                  \"At least two local parameterizations must be specified.\");\n\n    using LocalParameterizationPtr = std::unique_ptr<LocalParameterization>;\n\n    // Wrap all raw pointers into std::unique_ptr for exception safety.\n    std::array<LocalParameterizationPtr, kNumLocalParams> local_params_array{\n        LocalParameterizationPtr(local_params)...};\n\n    // Initialize internal state.\n    for (int i = 0; i < kNumLocalParams; ++i) {\n      LocalParameterizationPtr& param = local_params_[i];\n      param = std::move(local_params_array[i]);\n\n      buffer_size_ =\n          std::max(buffer_size_, param->LocalSize() * param->GlobalSize());\n      global_size_ += param->GlobalSize();\n      local_size_ += param->LocalSize();\n    }\n  }\n\n  bool Plus(const double* x,\n            const double* delta,\n            double* x_plus_delta) const override;\n  bool ComputeJacobian(const double* x, double* jacobian) const override;\n  int GlobalSize() const override { return global_size_; }\n  int LocalSize() const override { return local_size_; }\n\n private:\n  std::vector<std::unique_ptr<LocalParameterization>> local_params_;\n  int local_size_;\n  int global_size_;\n  int buffer_size_;\n};\n\n}  // namespace ceres\n\n#include \"ceres/internal/reenable_warnings.h\"\n#include \"ceres/internal/line_parameterization.h\"\n\n#endif  // CERES_PUBLIC_LOCAL_PARAMETERIZATION_H_\n\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/loss_function.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// The LossFunction interface is the way users describe how residuals\n// are converted to cost terms for the overall problem cost function.\n// For the exact manner in which loss functions are converted to the\n// overall cost for a problem, see problem.h.\n//\n// For least squares problem where there are no outliers and standard\n// squared loss is expected, it is not necessary to create a loss\n// function; instead passing a NULL to the problem when adding\n// residuals implies a standard squared loss.\n//\n// For least squares problems where the minimization may encounter\n// input terms that contain outliers, that is, completely bogus\n// measurements, it is important to use a loss function that reduces\n// their associated penalty.\n//\n// Consider a structure from motion problem. The unknowns are 3D\n// points and camera parameters, and the measurements are image\n// coordinates describing the expected reprojected position for a\n// point in a camera. For example, we want to model the geometry of a\n// street scene with fire hydrants and cars, observed by a moving\n// camera with unknown parameters, and the only 3D points we care\n// about are the pointy tippy-tops of the fire hydrants. Our magic\n// image processing algorithm, which is responsible for producing the\n// measurements that are input to Ceres, has found and matched all\n// such tippy-tops in all image frames, except that in one of the\n// frame it mistook a car's headlight for a hydrant. If we didn't do\n// anything special (i.e. if we used a basic quadratic loss), the\n// residual for the erroneous measurement will result in extreme error\n// due to the quadratic nature of squared loss. This results in the\n// entire solution getting pulled away from the optimum to reduce\n// the large error that would otherwise be attributed to the wrong\n// measurement.\n//\n// Using a robust loss function, the cost for large residuals is\n// reduced. In the example above, this leads to outlier terms getting\n// downweighted so they do not overly influence the final solution.\n//\n// What cost function is best?\n//\n// In general, there isn't a principled way to select a robust loss\n// function. The authors suggest starting with a non-robust cost, then\n// only experimenting with robust loss functions if standard squared\n// loss doesn't work.\n\n#ifndef CERES_PUBLIC_LOSS_FUNCTION_H_\n#define CERES_PUBLIC_LOSS_FUNCTION_H_\n\n#include <memory>\n\n#include \"ceres/internal/disable_warnings.h\"\n#include \"ceres/types.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\n\nclass CERES_EXPORT LossFunction {\n public:\n  virtual ~LossFunction() {}\n\n  // For a residual vector with squared 2-norm 'sq_norm', this method\n  // is required to fill in the value and derivatives of the loss\n  // function (rho in this example):\n  //\n  //   out[0] = rho(sq_norm),\n  //   out[1] = rho'(sq_norm),\n  //   out[2] = rho''(sq_norm),\n  //\n  // Here the convention is that the contribution of a term to the\n  // cost function is given by 1/2 rho(s),  where\n  //\n  //   s = ||residuals||^2.\n  //\n  // Calling the method with a negative value of 's' is an error and\n  // the implementations are not required to handle that case.\n  //\n  // Most sane choices of rho() satisfy:\n  //\n  //   rho(0) = 0,\n  //   rho'(0) = 1,\n  //   rho'(s) < 1 in outlier region,\n  //   rho''(s) < 0 in outlier region,\n  //\n  // so that they mimic the least squares cost for small residuals.\n  virtual void Evaluate(double sq_norm, double out[3]) const = 0;\n};\n\n// Some common implementations follow below.\n//\n// Note: in the region of interest (i.e. s < 3) we have:\n//   TrivialLoss >= HuberLoss >= SoftLOneLoss >= CauchyLoss\n\n// This corresponds to no robustification.\n//\n//   rho(s) = s\n//\n// At s = 0: rho = [0, 1, 0].\n//\n// It is not normally necessary to use this, as passing NULL for the\n// loss function when building the problem accomplishes the same\n// thing.\nclass CERES_EXPORT TrivialLoss : public LossFunction {\n public:\n  void Evaluate(double, double*) const override;\n};\n\n// Scaling\n// -------\n// Given one robustifier\n//   s -> rho(s)\n// one can change the length scale at which robustification takes\n// place, by adding a scale factor 'a' as follows:\n//\n//   s -> a^2 rho(s / a^2).\n//\n// The first and second derivatives are:\n//\n//   s -> rho'(s / a^2),\n//   s -> (1 / a^2) rho''(s / a^2),\n//\n// but the behaviour near s = 0 is the same as the original function,\n// i.e.\n//\n//   rho(s) = s + higher order terms,\n//   a^2 rho(s / a^2) = s + higher order terms.\n//\n// The scalar 'a' should be positive.\n//\n// The reason for the appearance of squaring is that 'a' is in the\n// units of the residual vector norm whereas 's' is a squared\n// norm. For applications it is more convenient to specify 'a' than\n// its square. The commonly used robustifiers below are described in\n// un-scaled format (a = 1) but their implementations work for any\n// non-zero value of 'a'.\n\n// Huber.\n//\n//   rho(s) = s               for s <= 1,\n//   rho(s) = 2 sqrt(s) - 1   for s >= 1.\n//\n// At s = 0: rho = [0, 1, 0].\n//\n// The scaling parameter 'a' corresponds to 'delta' on this page:\n//   http://en.wikipedia.org/wiki/Huber_Loss_Function\nclass CERES_EXPORT HuberLoss : public LossFunction {\n public:\n  explicit HuberLoss(double a) : a_(a), b_(a * a) {}\n  void Evaluate(double, double*) const override;\n\n private:\n  const double a_;\n  // b = a^2.\n  const double b_;\n};\n\n// Soft L1, similar to Huber but smooth.\n//\n//   rho(s) = 2 (sqrt(1 + s) - 1).\n//\n// At s = 0: rho = [0, 1, -1 / (2 * a^2)].\nclass CERES_EXPORT SoftLOneLoss : public LossFunction {\n public:\n  explicit SoftLOneLoss(double a) : b_(a * a), c_(1 / b_) {}\n  void Evaluate(double, double*) const override;\n\n private:\n  // b = a^2.\n  const double b_;\n  // c = 1 / a^2.\n  const double c_;\n};\n\n// Inspired by the Cauchy distribution\n//\n//   rho(s) = log(1 + s).\n//\n// At s = 0: rho = [0, 1, -1 / a^2].\nclass CERES_EXPORT CauchyLoss : public LossFunction {\n public:\n  explicit CauchyLoss(double a) : b_(a * a), c_(1 / b_) {}\n  void Evaluate(double, double*) const override;\n\n private:\n  // b = a^2.\n  const double b_;\n  // c = 1 / a^2.\n  const double c_;\n};\n\n// Loss that is capped beyond a certain level using the arc-tangent function.\n// The scaling parameter 'a' determines the level where falloff occurs.\n// For costs much smaller than 'a', the loss function is linear and behaves like\n// TrivialLoss, and for values much larger than 'a' the value asymptotically\n// approaches the constant value of a * PI / 2.\n//\n//   rho(s) = a atan(s / a).\n//\n// At s = 0: rho = [0, 1, 0].\nclass CERES_EXPORT ArctanLoss : public LossFunction {\n public:\n  explicit ArctanLoss(double a) : a_(a), b_(1 / (a * a)) {}\n  void Evaluate(double, double*) const override;\n\n private:\n  const double a_;\n  // b = 1 / a^2.\n  const double b_;\n};\n\n// Loss function that maps to approximately zero cost in a range around the\n// origin, and reverts to linear in error (quadratic in cost) beyond this range.\n// The tolerance parameter 'a' sets the nominal point at which the\n// transition occurs, and the transition size parameter 'b' sets the nominal\n// distance over which most of the transition occurs. Both a and b must be\n// greater than zero, and typically b will be set to a fraction of a.\n// The slope rho'[s] varies smoothly from about 0 at s <= a - b to\n// about 1 at s >= a + b.\n//\n// The term is computed as:\n//\n//   rho(s) = b log(1 + exp((s - a) / b)) - c0.\n//\n// where c0 is chosen so that rho(0) == 0\n//\n//   c0 = b log(1 + exp(-a / b)\n//\n// This has the following useful properties:\n//\n//   rho(s) == 0               for s = 0\n//   rho'(s) ~= 0              for s << a - b\n//   rho'(s) ~= 1              for s >> a + b\n//   rho''(s) > 0              for all s\n//\n// In addition, all derivatives are continuous, and the curvature is\n// concentrated in the range a - b to a + b.\n//\n// At s = 0: rho = [0, ~0, ~0].\nclass CERES_EXPORT TolerantLoss : public LossFunction {\n public:\n  explicit TolerantLoss(double a, double b);\n  void Evaluate(double, double*) const override;\n\n private:\n  const double a_, b_, c_;\n};\n\n// This is the Tukey biweight loss function which aggressively\n// attempts to suppress large errors.\n//\n// The term is computed as follows where the equations are scaled by a\n// factor of 2 because the cost function is given by 1/2 rho(s):\n//\n//   rho(s) = a^2 / 3 * (1 - (1 - s / a^2)^3 )   for s <= a^2,\n//   rho(s) = a^2 / 3                            for s >  a^2.\n//\n// At s = 0: rho = [0, 1, -2 / a^2]\nclass CERES_EXPORT TukeyLoss : public ceres::LossFunction {\n public:\n  explicit TukeyLoss(double a) : a_squared_(a * a) {}\n  void Evaluate(double, double*) const override;\n\n private:\n  const double a_squared_;\n};\n\n// Composition of two loss functions.  The error is the result of first\n// evaluating g followed by f to yield the composition f(g(s)).\n// The loss functions must not be NULL.\nclass CERES_EXPORT ComposedLoss : public LossFunction {\n public:\n  explicit ComposedLoss(const LossFunction* f,\n                        Ownership ownership_f,\n                        const LossFunction* g,\n                        Ownership ownership_g);\n  virtual ~ComposedLoss();\n  void Evaluate(double, double*) const override;\n\n private:\n  std::unique_ptr<const LossFunction> f_, g_;\n  const Ownership ownership_f_, ownership_g_;\n};\n\n// The discussion above has to do with length scaling: it affects the space\n// in which s is measured. Sometimes you want to simply scale the output\n// value of the robustifier. For example, you might want to weight\n// different error terms differently (e.g., weight pixel reprojection\n// errors differently from terrain errors).\n//\n// If rho is the wrapped robustifier, then this simply outputs\n// s -> a * rho(s)\n//\n// The first and second derivatives are, not surprisingly\n// s -> a * rho'(s)\n// s -> a * rho''(s)\n//\n// Since we treat the a NULL Loss function as the Identity loss\n// function, rho = NULL is a valid input and will result in the input\n// being scaled by a. This provides a simple way of implementing a\n// scaled ResidualBlock.\nclass CERES_EXPORT ScaledLoss : public LossFunction {\n public:\n  // Constructs a ScaledLoss wrapping another loss function. Takes\n  // ownership of the wrapped loss function or not depending on the\n  // ownership parameter.\n  ScaledLoss(const LossFunction* rho, double a, Ownership ownership)\n      : rho_(rho), a_(a), ownership_(ownership) {}\n  ScaledLoss(const ScaledLoss&) = delete;\n  void operator=(const ScaledLoss&) = delete;\n\n  virtual ~ScaledLoss() {\n    if (ownership_ == DO_NOT_TAKE_OWNERSHIP) {\n      rho_.release();\n    }\n  }\n  void Evaluate(double, double*) const override;\n\n private:\n  std::unique_ptr<const LossFunction> rho_;\n  const double a_;\n  const Ownership ownership_;\n};\n\n// Sometimes after the optimization problem has been constructed, we\n// wish to mutate the scale of the loss function. For example, when\n// performing estimation from data which has substantial outliers,\n// convergence can be improved by starting out with a large scale,\n// optimizing the problem and then reducing the scale. This can have\n// better convergence behaviour than just using a loss function with a\n// small scale.\n//\n// This templated class allows the user to implement a loss function\n// whose scale can be mutated after an optimization problem has been\n// constructed.\n//\n// Since we treat the a NULL Loss function as the Identity loss\n// function, rho = NULL is a valid input.\n//\n// Example usage\n//\n//  Problem problem;\n//\n//  // Add parameter blocks\n//\n//  CostFunction* cost_function =\n//    new AutoDiffCostFunction < UW_Camera_Mapper, 2, 9, 3>(\n//      new UW_Camera_Mapper(feature_x, feature_y));\n//\n//  LossFunctionWrapper* loss_function(new HuberLoss(1.0), TAKE_OWNERSHIP);\n//\n//  problem.AddResidualBlock(cost_function, loss_function, parameters);\n//\n//  Solver::Options options;\n//  Solger::Summary summary;\n//\n//  Solve(options, &problem, &summary)\n//\n//  loss_function->Reset(new HuberLoss(1.0), TAKE_OWNERSHIP);\n//\n//  Solve(options, &problem, &summary)\n//\nclass CERES_EXPORT LossFunctionWrapper : public LossFunction {\n public:\n  LossFunctionWrapper(LossFunction* rho, Ownership ownership)\n      : rho_(rho), ownership_(ownership) {}\n\n  LossFunctionWrapper(const LossFunctionWrapper&) = delete;\n  void operator=(const LossFunctionWrapper&) = delete;\n\n  virtual ~LossFunctionWrapper() {\n    if (ownership_ == DO_NOT_TAKE_OWNERSHIP) {\n      rho_.release();\n    }\n  }\n\n  void Evaluate(double sq_norm, double out[3]) const override {\n    if (rho_.get() == NULL) {\n      out[0] = sq_norm;\n      out[1] = 1.0;\n      out[2] = 0.0;\n    } else {\n      rho_->Evaluate(sq_norm, out);\n    }\n  }\n\n  void Reset(LossFunction* rho, Ownership ownership) {\n    if (ownership_ == DO_NOT_TAKE_OWNERSHIP) {\n      rho_.release();\n    }\n    rho_.reset(rho);\n    ownership_ = ownership;\n  }\n\n private:\n  std::unique_ptr<const LossFunction> rho_;\n  Ownership ownership_;\n};\n\n}  // namespace ceres\n\n#include \"ceres/internal/reenable_warnings.h\"\n\n#endif  // CERES_PUBLIC_LOSS_FUNCTION_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/normal_prior.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Cost term that implements a prior on a parameter block using a\n// normal distribution.\n\n#ifndef CERES_PUBLIC_NORMAL_PRIOR_H_\n#define CERES_PUBLIC_NORMAL_PRIOR_H_\n\n#include \"ceres/cost_function.h\"\n#include \"ceres/internal/disable_warnings.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\n\n// Implements a cost function of the form\n//\n//   cost(x) = ||A(x - b)||^2\n//\n// where, the matrix A and the vector b are fixed and x is the\n// variable. In case the user is interested in implementing a cost\n// function of the form\n//\n//   cost(x) = (x - mu)^T S^{-1} (x - mu)\n//\n// where, mu is a vector and S is a covariance matrix, then, A =\n// S^{-1/2}, i.e the matrix A is the square root of the inverse of the\n// covariance, also known as the stiffness matrix. There are however\n// no restrictions on the shape of A. It is free to be rectangular,\n// which would be the case if the covariance matrix S is rank\n// deficient.\n\nclass CERES_EXPORT NormalPrior : public CostFunction {\n public:\n  // Check that the number of rows in the vector b are the same as the\n  // number of columns in the matrix A, crash otherwise.\n  NormalPrior(const Matrix& A, const Vector& b);\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const override;\n\n private:\n  Matrix A_;\n  Vector b_;\n};\n\n}  // namespace ceres\n\n#include \"ceres/internal/reenable_warnings.h\"\n\n#endif  // CERES_PUBLIC_NORMAL_PRIOR_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/numeric_diff_cost_function.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n//         sameeragarwal@google.com (Sameer Agarwal)\n//\n// Create CostFunctions as needed by the least squares framework with jacobians\n// computed via numeric (a.k.a. finite) differentiation. For more details see\n// http://en.wikipedia.org/wiki/Numerical_differentiation.\n//\n// To get an numerically differentiated cost function, you must define\n// a class with a operator() (a functor) that computes the residuals.\n//\n// The function must write the computed value in the last argument\n// (the only non-const one) and return true to indicate success.\n// Please see cost_function.h for details on how the return value\n// maybe used to impose simple constraints on the parameter block.\n//\n// For example, consider a scalar error e = k - x'y, where both x and y are\n// two-dimensional column vector parameters, the prime sign indicates\n// transposition, and k is a constant. The form of this error, which is the\n// difference between a constant and an expression, is a common pattern in least\n// squares problems. For example, the value x'y might be the model expectation\n// for a series of measurements, where there is an instance of the cost function\n// for each measurement k.\n//\n// The actual cost added to the total problem is e^2, or (k - x'k)^2; however,\n// the squaring is implicitly done by the optimization framework.\n//\n// To write an numerically-differentiable cost function for the above model,\n// first define the object\n//\n//   class MyScalarCostFunctor {\n//     explicit MyScalarCostFunctor(double k): k_(k) {}\n//\n//     bool operator()(const double* const x,\n//                     const double* const y,\n//                     double* residuals) const {\n//       residuals[0] = k_ - x[0] * y[0] - x[1] * y[1];\n//       return true;\n//     }\n//\n//    private:\n//     double k_;\n//   };\n//\n// Note that in the declaration of operator() the input parameters x\n// and y come first, and are passed as const pointers to arrays of\n// doubles. If there were three input parameters, then the third input\n// parameter would come after y. The output is always the last\n// parameter, and is also a pointer to an array. In the example above,\n// the residual is a scalar, so only residuals[0] is set.\n//\n// Then given this class definition, the numerically differentiated\n// cost function with central differences used for computing the\n// derivative can be constructed as follows.\n//\n//   CostFunction* cost_function\n//       = new NumericDiffCostFunction<MyScalarCostFunctor, CENTRAL, 1, 2, 2>(\n//           new MyScalarCostFunctor(1.0));                    ^     ^  ^  ^\n//                                                             |     |  |  |\n//                                 Finite Differencing Scheme -+     |  |  |\n//                                 Dimension of residual ------------+  |  |\n//                                 Dimension of x ----------------------+  |\n//                                 Dimension of y -------------------------+\n//\n// In this example, there is usually an instance for each measurement of k.\n//\n// In the instantiation above, the template parameters following\n// \"MyScalarCostFunctor\", \"1, 2, 2\", describe the functor as computing\n// a 1-dimensional output from two arguments, both 2-dimensional.\n//\n// NumericDiffCostFunction also supports cost functions with a\n// runtime-determined number of residuals. For example:\n//\n// clang-format off\n//\n//   CostFunction* cost_function\n//       = new NumericDiffCostFunction<MyScalarCostFunctor, CENTRAL, DYNAMIC, 2, 2>(\n//           new CostFunctorWithDynamicNumResiduals(1.0),               ^     ^  ^\n//           TAKE_OWNERSHIP,                                            |     |  |\n//           runtime_number_of_residuals); <----+                       |     |  |\n//                                              |                       |     |  |\n//                                              |                       |     |  |\n//             Actual number of residuals ------+                       |     |  |\n//             Indicate dynamic number of residuals --------------------+     |  |\n//             Dimension of x ------------------------------------------------+  |\n//             Dimension of y ---------------------------------------------------+\n// clang-format on\n//\n//\n// The central difference method is considerably more accurate at the cost of\n// twice as many function evaluations than forward difference. Consider using\n// central differences begin with, and only after that works, trying forward\n// difference to improve performance.\n//\n// WARNING #1: A common beginner's error when first using\n// NumericDiffCostFunction is to get the sizing wrong. In particular,\n// there is a tendency to set the template parameters to (dimension of\n// residual, number of parameters) instead of passing a dimension\n// parameter for *every parameter*. In the example above, that would\n// be <MyScalarCostFunctor, 1, 2>, which is missing the last '2'\n// argument. Please be careful when setting the size parameters.\n//\n////////////////////////////////////////////////////////////////////////////\n////////////////////////////////////////////////////////////////////////////\n//\n// ALTERNATE INTERFACE\n//\n// For a variety of reasons, including compatibility with legacy code,\n// NumericDiffCostFunction can also take CostFunction objects as\n// input. The following describes how.\n//\n// To get a numerically differentiated cost function, define a\n// subclass of CostFunction such that the Evaluate() function ignores\n// the jacobian parameter. The numeric differentiation wrapper will\n// fill in the jacobian parameter if necessary by repeatedly calling\n// the Evaluate() function with small changes to the appropriate\n// parameters, and computing the slope. For performance, the numeric\n// differentiation wrapper class is templated on the concrete cost\n// function, even though it could be implemented only in terms of the\n// virtual CostFunction interface.\n//\n// The numerically differentiated version of a cost function for a cost function\n// can be constructed as follows:\n//\n//   CostFunction* cost_function\n//       = new NumericDiffCostFunction<MyCostFunction, CENTRAL, 1, 4, 8>(\n//           new MyCostFunction(...), TAKE_OWNERSHIP);\n//\n// where MyCostFunction has 1 residual and 2 parameter blocks with sizes 4 and 8\n// respectively. Look at the tests for a more detailed example.\n//\n// TODO(keir): Characterize accuracy; mention pitfalls; provide alternatives.\n\n#ifndef CERES_PUBLIC_NUMERIC_DIFF_COST_FUNCTION_H_\n#define CERES_PUBLIC_NUMERIC_DIFF_COST_FUNCTION_H_\n\n#include <array>\n#include <memory>\n\n#include \"Eigen/Dense\"\n#include \"ceres/cost_function.h\"\n#include \"ceres/internal/numeric_diff.h\"\n#include \"ceres/internal/parameter_dims.h\"\n#include \"ceres/numeric_diff_options.h\"\n#include \"ceres/sized_cost_function.h\"\n#include \"ceres/types.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\n\ntemplate <typename CostFunctor,\n          NumericDiffMethodType method = CENTRAL,\n          int kNumResiduals = 0,  // Number of residuals, or ceres::DYNAMIC\n          int... Ns>              // Parameters dimensions for each block.\nclass NumericDiffCostFunction : public SizedCostFunction<kNumResiduals, Ns...> {\n public:\n  NumericDiffCostFunction(\n      CostFunctor* functor,\n      Ownership ownership = TAKE_OWNERSHIP,\n      int num_residuals = kNumResiduals,\n      const NumericDiffOptions& options = NumericDiffOptions())\n      : functor_(functor), ownership_(ownership), options_(options) {\n    if (kNumResiduals == DYNAMIC) {\n      SizedCostFunction<kNumResiduals, Ns...>::set_num_residuals(num_residuals);\n    }\n  }\n\n  ~NumericDiffCostFunction() {\n    if (ownership_ != TAKE_OWNERSHIP) {\n      functor_.release();\n    }\n  }\n\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const override {\n    using internal::FixedArray;\n    using internal::NumericDiff;\n\n    using ParameterDims =\n        typename SizedCostFunction<kNumResiduals, Ns...>::ParameterDims;\n\n    constexpr int kNumParameters = ParameterDims::kNumParameters;\n    constexpr int kNumParameterBlocks = ParameterDims::kNumParameterBlocks;\n\n    // Get the function value (residuals) at the the point to evaluate.\n    if (!internal::VariadicEvaluate<ParameterDims>(\n            *functor_, parameters, residuals)) {\n      return false;\n    }\n\n    if (jacobians == NULL) {\n      return true;\n    }\n\n    // Create a copy of the parameters which will get mutated.\n    FixedArray<double> parameters_copy(kNumParameters);\n    std::array<double*, kNumParameterBlocks> parameters_reference_copy =\n        ParameterDims::GetUnpackedParameters(parameters_copy.data());\n\n    for (int block = 0; block < kNumParameterBlocks; ++block) {\n      memcpy(parameters_reference_copy[block],\n             parameters[block],\n             sizeof(double) * ParameterDims::GetDim(block));\n    }\n\n    internal::EvaluateJacobianForParameterBlocks<ParameterDims>::\n        template Apply<method, kNumResiduals>(\n            functor_.get(),\n            residuals,\n            options_,\n            SizedCostFunction<kNumResiduals, Ns...>::num_residuals(),\n            parameters_reference_copy.data(),\n            jacobians);\n\n    return true;\n  }\n\n private:\n  std::unique_ptr<CostFunctor> functor_;\n  Ownership ownership_;\n  NumericDiffOptions options_;\n};\n\n}  // namespace ceres\n\n#endif  // CERES_PUBLIC_NUMERIC_DIFF_COST_FUNCTION_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/numeric_diff_options.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: tbennun@gmail.com (Tal Ben-Nun)\n//\n\n#ifndef CERES_PUBLIC_NUMERIC_DIFF_OPTIONS_H_\n#define CERES_PUBLIC_NUMERIC_DIFF_OPTIONS_H_\n\n#include \"ceres/internal/port.h\"\n\nnamespace ceres {\n\n// Options pertaining to numeric differentiation (e.g., convergence criteria,\n// step sizes).\nstruct CERES_EXPORT NumericDiffOptions {\n  // Numeric differentiation step size (multiplied by parameter block's\n  // order of magnitude). If parameters are close to zero, the step size\n  // is set to sqrt(machine_epsilon).\n  double relative_step_size = 1e-6;\n\n  // Initial step size for Ridders adaptive numeric differentiation (multiplied\n  // by parameter block's order of magnitude).\n  // If parameters are close to zero, Ridders' method sets the step size\n  // directly to this value. This parameter is separate from\n  // \"relative_step_size\" in order to set a different default value.\n  //\n  // Note: For Ridders' method to converge, the step size should be initialized\n  // to a value that is large enough to produce a significant change in the\n  // function. As the derivative is estimated, the step size decreases.\n  double ridders_relative_initial_step_size = 1e-2;\n\n  // Maximal number of adaptive extrapolations (sampling) in Ridders' method.\n  int max_num_ridders_extrapolations = 10;\n\n  // Convergence criterion on extrapolation error for Ridders adaptive\n  // differentiation. The available error estimation methods are defined in\n  // NumericDiffErrorType and set in the \"ridders_error_method\" field.\n  double ridders_epsilon = 1e-12;\n\n  // The factor in which to shrink the step size with each extrapolation in\n  // Ridders' method.\n  double ridders_step_shrink_factor = 2.0;\n};\n\n}  // namespace ceres\n\n#endif  // CERES_PUBLIC_NUMERIC_DIFF_OPTIONS_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/ordered_groups.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_PUBLIC_ORDERED_GROUPS_H_\n#define CERES_PUBLIC_ORDERED_GROUPS_H_\n\n#include <map>\n#include <set>\n#include <unordered_map>\n#include <vector>\n\n#include \"ceres/internal/port.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\n\n// A class for storing and manipulating an ordered collection of\n// groups/sets with the following semantics:\n//\n// Group ids are non-negative integer values. Elements are any type\n// that can serve as a key in a map or an element of a set.\n//\n// An element can only belong to one group at a time. A group may\n// contain an arbitrary number of elements.\n//\n// Groups are ordered by their group id.\ntemplate <typename T>\nclass OrderedGroups {\n public:\n  // Add an element to a group. If a group with this id does not\n  // exist, one is created. This method can be called any number of\n  // times for the same element. Group ids should be non-negative\n  // numbers.\n  //\n  // Return value indicates if adding the element was a success.\n  bool AddElementToGroup(const T element, const int group) {\n    if (group < 0) {\n      return false;\n    }\n\n    auto it = element_to_group_.find(element);\n    if (it != element_to_group_.end()) {\n      if (it->second == group) {\n        // Element is already in the right group, nothing to do.\n        return true;\n      }\n\n      group_to_elements_[it->second].erase(element);\n      if (group_to_elements_[it->second].size() == 0) {\n        group_to_elements_.erase(it->second);\n      }\n    }\n\n    element_to_group_[element] = group;\n    group_to_elements_[group].insert(element);\n    return true;\n  }\n\n  void Clear() {\n    group_to_elements_.clear();\n    element_to_group_.clear();\n  }\n\n  // Remove the element, no matter what group it is in. Return value\n  // indicates if the element was actually removed.\n  bool Remove(const T element) {\n    const int current_group = GroupId(element);\n    if (current_group < 0) {\n      return false;\n    }\n\n    group_to_elements_[current_group].erase(element);\n\n    if (group_to_elements_[current_group].size() == 0) {\n      // If the group is empty, then get rid of it.\n      group_to_elements_.erase(current_group);\n    }\n\n    element_to_group_.erase(element);\n    return true;\n  }\n\n  // Bulk remove elements. The return value indicates the number of\n  // elements successfully removed.\n  int Remove(const std::vector<T>& elements) {\n    if (NumElements() == 0 || elements.size() == 0) {\n      return 0;\n    }\n\n    int num_removed = 0;\n    for (int i = 0; i < elements.size(); ++i) {\n      num_removed += Remove(elements[i]);\n    }\n    return num_removed;\n  }\n\n  // Reverse the order of the groups in place.\n  void Reverse() {\n    if (NumGroups() == 0) {\n      return;\n    }\n\n    auto it = group_to_elements_.rbegin();\n    std::map<int, std::set<T>> new_group_to_elements;\n    new_group_to_elements[it->first] = it->second;\n\n    int new_group_id = it->first + 1;\n    for (++it; it != group_to_elements_.rend(); ++it) {\n      for (const auto& element : it->second) {\n        element_to_group_[element] = new_group_id;\n      }\n      new_group_to_elements[new_group_id] = it->second;\n      new_group_id++;\n    }\n\n    group_to_elements_.swap(new_group_to_elements);\n  }\n\n  // Return the group id for the element. If the element is not a\n  // member of any group, return -1.\n  int GroupId(const T element) const {\n    auto it = element_to_group_.find(element);\n    if (it == element_to_group_.end()) {\n      return -1;\n    }\n    return it->second;\n  }\n\n  bool IsMember(const T element) const {\n    auto it = element_to_group_.find(element);\n    return (it != element_to_group_.end());\n  }\n\n  // This function always succeeds, i.e., implicitly there exists a\n  // group for every integer.\n  int GroupSize(const int group) const {\n    auto it = group_to_elements_.find(group);\n    return (it == group_to_elements_.end()) ? 0 : it->second.size();\n  }\n\n  int NumElements() const { return element_to_group_.size(); }\n\n  // Number of groups with one or more elements.\n  int NumGroups() const { return group_to_elements_.size(); }\n\n  // The first group with one or more elements. Calling this when\n  // there are no groups with non-zero elements will result in a\n  // crash.\n  int MinNonZeroGroup() const {\n    CHECK_NE(NumGroups(), 0);\n    return group_to_elements_.begin()->first;\n  }\n\n  const std::map<int, std::set<T>>& group_to_elements() const {\n    return group_to_elements_;\n  }\n\n  const std::map<T, int>& element_to_group() const { return element_to_group_; }\n\n private:\n  std::map<int, std::set<T>> group_to_elements_;\n  std::unordered_map<T, int> element_to_group_;\n};\n\n// Typedef for the most commonly used version of OrderedGroups.\ntypedef OrderedGroups<double*> ParameterBlockOrdering;\n\n}  // namespace ceres\n\n#endif  // CERES_PUBLIC_ORDERED_GROUP_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/problem.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//         keir@google.com (Keir Mierle)\n//\n// The Problem object is used to build and hold least squares problems.\n\n#ifndef CERES_PUBLIC_PROBLEM_H_\n#define CERES_PUBLIC_PROBLEM_H_\n\n#include <array>\n#include <cstddef>\n#include <map>\n#include <memory>\n#include <set>\n#include <vector>\n\n#include \"ceres/context.h\"\n#include \"ceres/internal/disable_warnings.h\"\n#include \"ceres/internal/port.h\"\n#include \"ceres/types.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\n\nclass CostFunction;\nclass EvaluationCallback;\nclass LossFunction;\nclass LocalParameterization;\nclass Solver;\nstruct CRSMatrix;\n\nnamespace internal {\nclass Preprocessor;\nclass ProblemImpl;\nclass ParameterBlock;\nclass ResidualBlock;\n}  // namespace internal\n\n// A ResidualBlockId is an opaque handle clients can use to remove residual\n// blocks from a Problem after adding them.\ntypedef internal::ResidualBlock* ResidualBlockId;\n\n// A class to represent non-linear least squares problems. Such\n// problems have a cost function that is a sum of error terms (known\n// as \"residuals\"), where each residual is a function of some subset\n// of the parameters. The cost function takes the form\n//\n//    N    1\n//   SUM  --- loss( || r_i1, r_i2,..., r_ik ||^2  ),\n//   i=1   2\n//\n// where\n//\n//   r_ij     is residual number i, component j; the residual is a\n//            function of some subset of the parameters x1...xk. For\n//            example, in a structure from motion problem a residual\n//            might be the difference between a measured point in an\n//            image and the reprojected position for the matching\n//            camera, point pair. The residual would have two\n//            components, error in x and error in y.\n//\n//   loss(y)  is the loss function; for example, squared error or\n//            Huber L1 loss. If loss(y) = y, then the cost function is\n//            non-robustified least squares.\n//\n// This class is specifically designed to address the important subset\n// of \"sparse\" least squares problems, where each component of the\n// residual depends only on a small number number of parameters, even\n// though the total number of residuals and parameters may be very\n// large. This property affords tremendous gains in scale, allowing\n// efficient solving of large problems that are otherwise\n// inaccessible.\n//\n// The canonical example of a sparse least squares problem is\n// \"structure-from-motion\" (SFM), where the parameters are points and\n// cameras, and residuals are reprojection errors. Typically a single\n// residual will depend only on 9 parameters (3 for the point, 6 for\n// the camera).\n//\n// To create a least squares problem, use the AddResidualBlock() and\n// AddParameterBlock() methods, documented below. Here is an example least\n// squares problem containing 3 parameter blocks of sizes 3, 4 and 5\n// respectively and two residual terms of size 2 and 6:\n//\n//   double x1[] = { 1.0, 2.0, 3.0 };\n//   double x2[] = { 1.0, 2.0, 3.0, 5.0 };\n//   double x3[] = { 1.0, 2.0, 3.0, 6.0, 7.0 };\n//\n//   Problem problem;\n//\n//   problem.AddResidualBlock(new MyUnaryCostFunction(...), nullptr, x1);\n//   problem.AddResidualBlock(new MyBinaryCostFunction(...), nullptr, x2, x3);\n//\n// Please see cost_function.h for details of the CostFunction object.\nclass CERES_EXPORT Problem {\n public:\n  struct CERES_EXPORT Options {\n    // These flags control whether the Problem object owns the cost\n    // functions, loss functions, and parameterizations passed into\n    // the Problem. If set to TAKE_OWNERSHIP, then the problem object\n    // will delete the corresponding cost or loss functions on\n    // destruction. The destructor is careful to delete the pointers\n    // only once, since sharing cost/loss/parameterizations is\n    // allowed.\n    Ownership cost_function_ownership = TAKE_OWNERSHIP;\n    Ownership loss_function_ownership = TAKE_OWNERSHIP;\n    Ownership local_parameterization_ownership = TAKE_OWNERSHIP;\n\n    // If true, trades memory for faster RemoveResidualBlock() and\n    // RemoveParameterBlock() operations.\n    //\n    // By default, RemoveParameterBlock() and RemoveResidualBlock() take time\n    // proportional to the size of the entire problem.  If you only ever remove\n    // parameters or residuals from the problem occasionally, this might be\n    // acceptable.  However, if you have memory to spare, enable this option to\n    // make RemoveParameterBlock() take time proportional to the number of\n    // residual blocks that depend on it, and RemoveResidualBlock() take (on\n    // average) constant time.\n    //\n    // The increase in memory usage is twofold: an additional hash set per\n    // parameter block containing all the residuals that depend on the parameter\n    // block; and a hash set in the problem containing all residuals.\n    bool enable_fast_removal = false;\n\n    // By default, Ceres performs a variety of safety checks when constructing\n    // the problem. There is a small but measurable performance penalty to\n    // these checks, typically around 5% of construction time. If you are sure\n    // your problem construction is correct, and 5% of the problem construction\n    // time is truly an overhead you want to avoid, then you can set\n    // disable_all_safety_checks to true.\n    //\n    // WARNING: Do not set this to true, unless you are absolutely sure of what\n    // you are doing.\n    bool disable_all_safety_checks = false;\n\n    // A Ceres global context to use for solving this problem. This may help to\n    // reduce computation time as Ceres can reuse expensive objects to create.\n    // The context object can be nullptr, in which case Ceres may create one.\n    //\n    // Ceres does NOT take ownership of the pointer.\n    Context* context = nullptr;\n\n    // Using this callback interface, Ceres can notify you when it is\n    // about to evaluate the residuals or jacobians. With the\n    // callback, you can share computation between residual blocks by\n    // doing the shared computation in\n    // EvaluationCallback::PrepareForEvaluation() before Ceres calls\n    // CostFunction::Evaluate(). It also enables caching results\n    // between a pure residual evaluation and a residual & jacobian\n    // evaluation.\n    //\n    // Problem DOES NOT take ownership of the callback.\n    //\n    // NOTE: Evaluation callbacks are incompatible with inner\n    // iterations. So calling Solve with\n    // Solver::Options::use_inner_iterations = true on a Problem with\n    // a non-null evaluation callback is an error.\n    EvaluationCallback* evaluation_callback = nullptr;\n  };\n\n  // The default constructor is equivalent to the\n  // invocation Problem(Problem::Options()).\n  Problem();\n  explicit Problem(const Options& options);\n  Problem(Problem&&);\n  Problem& operator=(Problem&&);\n\n  Problem(const Problem&) = delete;\n  Problem& operator=(const Problem&) = delete;\n\n  ~Problem();\n\n  // Add a residual block to the overall cost function. The cost\n  // function carries with its information about the sizes of the\n  // parameter blocks it expects. The function checks that these match\n  // the sizes of the parameter blocks listed in parameter_blocks. The\n  // program aborts if a mismatch is detected. loss_function can be\n  // nullptr, in which case the cost of the term is just the squared norm\n  // of the residuals.\n  //\n  // The user has the option of explicitly adding the parameter blocks\n  // using AddParameterBlock. This causes additional correctness\n  // checking; however, AddResidualBlock implicitly adds the parameter\n  // blocks if they are not present, so calling AddParameterBlock\n  // explicitly is not required.\n  //\n  // The Problem object by default takes ownership of the\n  // cost_function and loss_function pointers. These objects remain\n  // live for the life of the Problem object. If the user wishes to\n  // keep control over the destruction of these objects, then they can\n  // do this by setting the corresponding enums in the Options struct.\n  //\n  // Note: Even though the Problem takes ownership of cost_function\n  // and loss_function, it does not preclude the user from re-using\n  // them in another residual block. The destructor takes care to call\n  // delete on each cost_function or loss_function pointer only once,\n  // regardless of how many residual blocks refer to them.\n  //\n  // Example usage:\n  //\n  //   double x1[] = {1.0, 2.0, 3.0};\n  //   double x2[] = {1.0, 2.0, 5.0, 6.0};\n  //   double x3[] = {3.0, 6.0, 2.0, 5.0, 1.0};\n  //\n  //   Problem problem;\n  //\n  //   problem.AddResidualBlock(new MyUnaryCostFunction(...), nullptr, x1);\n  //   problem.AddResidualBlock(new MyBinaryCostFunction(...), nullptr, x2, x1);\n  //\n  // Add a residual block by listing the parameter block pointers\n  // directly instead of wapping them in a container.\n  template <typename... Ts>\n  ResidualBlockId AddResidualBlock(CostFunction* cost_function,\n                                   LossFunction* loss_function,\n                                   double* x0,\n                                   Ts*... xs) {\n    const std::array<double*, sizeof...(Ts) + 1> parameter_blocks{{x0, xs...}};\n    return AddResidualBlock(cost_function,\n                            loss_function,\n                            parameter_blocks.data(),\n                            static_cast<int>(parameter_blocks.size()));\n  }\n\n  // Add a residual block by providing a vector of parameter blocks.\n  ResidualBlockId AddResidualBlock(\n      CostFunction* cost_function,\n      LossFunction* loss_function,\n      const std::vector<double*>& parameter_blocks);\n\n  // Add a residual block by providing a pointer to the parameter block array\n  // and the number of parameter blocks.\n  ResidualBlockId AddResidualBlock(CostFunction* cost_function,\n                                   LossFunction* loss_function,\n                                   double* const* const parameter_blocks,\n                                   int num_parameter_blocks);\n\n  // Add a parameter block with appropriate size to the problem.\n  // Repeated calls with the same arguments are ignored. Repeated\n  // calls with the same double pointer but a different size results\n  // in undefined behaviour.\n  void AddParameterBlock(double* values, int size);\n\n  // Add a parameter block with appropriate size and parameterization\n  // to the problem. Repeated calls with the same arguments are\n  // ignored. Repeated calls with the same double pointer but a\n  // different size results in undefined behaviour.\n  void AddParameterBlock(double* values,\n                         int size,\n                         LocalParameterization* local_parameterization);\n\n  // Remove a parameter block from the problem. The parameterization of the\n  // parameter block, if it exists, will persist until the deletion of the\n  // problem (similar to cost/loss functions in residual block removal). Any\n  // residual blocks that depend on the parameter are also removed, as\n  // described above in RemoveResidualBlock().\n  //\n  // If Problem::Options::enable_fast_removal is true, then the\n  // removal is fast (almost constant time). Otherwise, removing a parameter\n  // block will incur a scan of the entire Problem object.\n  //\n  // WARNING: Removing a residual or parameter block will destroy the implicit\n  // ordering, rendering the jacobian or residuals returned from the solver\n  // uninterpretable. If you depend on the evaluated jacobian, do not use\n  // remove! This may change in a future release.\n  void RemoveParameterBlock(const double* values);\n\n  // Remove a residual block from the problem. Any parameters that the residual\n  // block depends on are not removed. The cost and loss functions for the\n  // residual block will not get deleted immediately; won't happen until the\n  // problem itself is deleted.\n  //\n  // WARNING: Removing a residual or parameter block will destroy the implicit\n  // ordering, rendering the jacobian or residuals returned from the solver\n  // uninterpretable. If you depend on the evaluated jacobian, do not use\n  // remove! This may change in a future release.\n  void RemoveResidualBlock(ResidualBlockId residual_block);\n\n  // Hold the indicated parameter block constant during optimization.\n  void SetParameterBlockConstant(const double* values);\n\n  // Allow the indicated parameter block to vary during optimization.\n  void SetParameterBlockVariable(double* values);\n\n  // Returns true if a parameter block is set constant, and false\n  // otherwise. A parameter block may be set constant in two ways:\n  // either by calling SetParameterBlockConstant or by associating a\n  // LocalParameterization with a zero dimensional tangent space with\n  // it.\n  bool IsParameterBlockConstant(const double* values) const;\n\n  // Set the local parameterization for one of the parameter blocks.\n  // The local_parameterization is owned by the Problem by default. It\n  // is acceptable to set the same parameterization for multiple\n  // parameters; the destructor is careful to delete local\n  // parameterizations only once. Calling SetParameterization with\n  // nullptr will clear any previously set parameterization.\n  void SetParameterization(double* values,\n                           LocalParameterization* local_parameterization);\n\n  // Get the local parameterization object associated with this\n  // parameter block. If there is no parameterization object\n  // associated then nullptr is returned.\n  const LocalParameterization* GetParameterization(const double* values) const;\n\n  // Set the lower/upper bound for the parameter at position \"index\".\n  void SetParameterLowerBound(double* values, int index, double lower_bound);\n  void SetParameterUpperBound(double* values, int index, double upper_bound);\n\n  // Get the lower/upper bound for the parameter at position\n  // \"index\". If the parameter is not bounded by the user, then its\n  // lower bound is -std::numeric_limits<double>::max() and upper\n  // bound is std::numeric_limits<double>::max().\n  double GetParameterLowerBound(const double* values, int index) const;\n  double GetParameterUpperBound(const double* values, int index) const;\n\n  // Number of parameter blocks in the problem. Always equals\n  // parameter_blocks().size() and parameter_block_sizes().size().\n  int NumParameterBlocks() const;\n\n  // The size of the parameter vector obtained by summing over the\n  // sizes of all the parameter blocks.\n  int NumParameters() const;\n\n  // Number of residual blocks in the problem. Always equals\n  // residual_blocks().size().\n  int NumResidualBlocks() const;\n\n  // The size of the residual vector obtained by summing over the\n  // sizes of all of the residual blocks.\n  int NumResiduals() const;\n\n  // The size of the parameter block.\n  int ParameterBlockSize(const double* values) const;\n\n  // The size of local parameterization for the parameter block. If\n  // there is no local parameterization associated with this parameter\n  // block, then ParameterBlockLocalSize = ParameterBlockSize.\n  int ParameterBlockLocalSize(const double* values) const;\n\n  // Is the given parameter block present in this problem or not?\n  bool HasParameterBlock(const double* values) const;\n\n  // Fills the passed parameter_blocks vector with pointers to the\n  // parameter blocks currently in the problem. After this call,\n  // parameter_block.size() == NumParameterBlocks.\n  void GetParameterBlocks(std::vector<double*>* parameter_blocks) const;\n\n  // Fills the passed residual_blocks vector with pointers to the\n  // residual blocks currently in the problem. After this call,\n  // residual_blocks.size() == NumResidualBlocks.\n  void GetResidualBlocks(std::vector<ResidualBlockId>* residual_blocks) const;\n\n  // Get all the parameter blocks that depend on the given residual block.\n  void GetParameterBlocksForResidualBlock(\n      const ResidualBlockId residual_block,\n      std::vector<double*>* parameter_blocks) const;\n\n  // Get the CostFunction for the given residual block.\n  const CostFunction* GetCostFunctionForResidualBlock(\n      const ResidualBlockId residual_block) const;\n\n  // Get the LossFunction for the given residual block. Returns nullptr\n  // if no loss function is associated with this residual block.\n  const LossFunction* GetLossFunctionForResidualBlock(\n      const ResidualBlockId residual_block) const;\n\n  // Get all the residual blocks that depend on the given parameter block.\n  //\n  // If Problem::Options::enable_fast_removal is true, then\n  // getting the residual blocks is fast and depends only on the number of\n  // residual blocks. Otherwise, getting the residual blocks for a parameter\n  // block will incur a scan of the entire Problem object.\n  void GetResidualBlocksForParameterBlock(\n      const double* values,\n      std::vector<ResidualBlockId>* residual_blocks) const;\n\n  // Options struct to control Problem::Evaluate.\n  struct EvaluateOptions {\n    // The set of parameter blocks for which evaluation should be\n    // performed. This vector determines the order that parameter\n    // blocks occur in the gradient vector and in the columns of the\n    // jacobian matrix. If parameter_blocks is empty, then it is\n    // assumed to be equal to vector containing ALL the parameter\n    // blocks.  Generally speaking the parameter blocks will occur in\n    // the order in which they were added to the problem. But, this\n    // may change if the user removes any parameter blocks from the\n    // problem.\n    //\n    // NOTE: This vector should contain the same pointers as the ones\n    // used to add parameter blocks to the Problem. These parameter\n    // block should NOT point to new memory locations. Bad things will\n    // happen otherwise.\n    std::vector<double*> parameter_blocks;\n\n    // The set of residual blocks to evaluate. This vector determines\n    // the order in which the residuals occur, and how the rows of the\n    // jacobian are ordered. If residual_blocks is empty, then it is\n    // assumed to be equal to the vector containing ALL the residual\n    // blocks. Generally speaking the residual blocks will occur in\n    // the order in which they were added to the problem. But, this\n    // may change if the user removes any residual blocks from the\n    // problem.\n    std::vector<ResidualBlockId> residual_blocks;\n\n    // Even though the residual blocks in the problem may contain loss\n    // functions, setting apply_loss_function to false will turn off\n    // the application of the loss function to the output of the cost\n    // function. This is of use for example if the user wishes to\n    // analyse the solution quality by studying the distribution of\n    // residuals before and after the solve.\n    bool apply_loss_function = true;\n\n    int num_threads = 1;\n  };\n\n  // Evaluate Problem. Any of the output pointers can be nullptr. Which\n  // residual blocks and parameter blocks are used is controlled by\n  // the EvaluateOptions struct above.\n  //\n  // Note 1: The evaluation will use the values stored in the memory\n  // locations pointed to by the parameter block pointers used at the\n  // time of the construction of the problem. i.e.,\n  //\n  //   Problem problem;\n  //   double x = 1;\n  //   problem.AddResidualBlock(new MyCostFunction, nullptr, &x);\n  //\n  //   double cost = 0.0;\n  //   problem.Evaluate(Problem::EvaluateOptions(), &cost, nullptr, nullptr, nullptr);\n  //\n  // The cost is evaluated at x = 1. If you wish to evaluate the\n  // problem at x = 2, then\n  //\n  //   x = 2;\n  //   problem.Evaluate(Problem::EvaluateOptions(), &cost, nullptr, nullptr, nullptr);\n  //\n  // is the way to do so.\n  //\n  // Note 2: If no local parameterizations are used, then the size of\n  // the gradient vector (and the number of columns in the jacobian)\n  // is the sum of the sizes of all the parameter blocks. If a\n  // parameter block has a local parameterization, then it contributes\n  // \"LocalSize\" entries to the gradient vector (and the number of\n  // columns in the jacobian).\n  //\n  // Note 3: This function cannot be called while the problem is being\n  // solved, for example it cannot be called from an IterationCallback\n  // at the end of an iteration during a solve.\n  //\n  // Note 4: If an EvaluationCallback is associated with the problem,\n  // then its PrepareForEvaluation method will be called everytime\n  // this method is called with new_point = true.\n  bool Evaluate(const EvaluateOptions& options,\n                double* cost,\n                std::vector<double>* residuals,\n                std::vector<double>* gradient,\n                CRSMatrix* jacobian);\n\n  // Evaluates the residual block, storing the scalar cost in *cost,\n  // the residual components in *residuals, and the jacobians between\n  // the parameters and residuals in jacobians[i], in row-major order.\n  //\n  // If residuals is nullptr, the residuals are not computed.\n  //\n  // If jacobians is nullptr, no Jacobians are computed. If\n  // jacobians[i] is nullptr, then the Jacobian for that parameter\n  // block is not computed.\n  //\n  // It is not okay to request the Jacobian w.r.t a parameter block\n  // that is constant.\n  //\n  // The return value indicates the success or failure. Even if the\n  // function returns false, the caller should expect the output\n  // memory locations to have been modified.\n  //\n  // The returned cost and jacobians have had robustification and\n  // local parameterizations applied already; for example, the\n  // jacobian for a 4-dimensional quaternion parameter using the\n  // \"QuaternionParameterization\" is num_residuals by 3 instead of\n  // num_residuals by 4.\n  //\n  // apply_loss_function as the name implies allows the user to switch\n  // the application of the loss function on and off.\n  //\n  // WARNING: If an EvaluationCallback is associated with the problem\n  // then it is the user's responsibility to call it before calling\n  // this method.\n  //\n  // This is because, if the user calls this method multiple times, we\n  // cannot tell if the underlying parameter blocks have changed\n  // between calls or not. So if EvaluateResidualBlock was responsible\n  // for calling the EvaluationCallback, it will have to do it\n  // everytime it is called. Which makes the common case where the\n  // parameter blocks do not change, inefficient. So we leave it to\n  // the user to call the EvaluationCallback as needed.\n  bool EvaluateResidualBlock(ResidualBlockId residual_block_id,\n                             bool apply_loss_function,\n                             double* cost,\n                             double* residuals,\n                             double** jacobians) const;\n\n private:\n  friend class Solver;\n  friend class Covariance;\n  std::unique_ptr<internal::ProblemImpl> impl_;\n};\n\n}  // namespace ceres\n\n#include \"ceres/internal/reenable_warnings.h\"\n\n#endif  // CERES_PUBLIC_PROBLEM_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/rotation.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n//         sameeragarwal@google.com (Sameer Agarwal)\n//\n// Templated functions for manipulating rotations. The templated\n// functions are useful when implementing functors for automatic\n// differentiation.\n//\n// In the following, the Quaternions are laid out as 4-vectors, thus:\n//\n//   q[0]  scalar part.\n//   q[1]  coefficient of i.\n//   q[2]  coefficient of j.\n//   q[3]  coefficient of k.\n//\n// where: i*i = j*j = k*k = -1 and i*j = k, j*k = i, k*i = j.\n\n#ifndef CERES_PUBLIC_ROTATION_H_\n#define CERES_PUBLIC_ROTATION_H_\n\n#include <algorithm>\n#include <cmath>\n#include <limits>\n\n#include \"glog/logging.h\"\n\nnamespace ceres {\n\n// Trivial wrapper to index linear arrays as matrices, given a fixed\n// column and row stride. When an array \"T* array\" is wrapped by a\n//\n//   (const) MatrixAdapter<T, row_stride, col_stride> M\"\n//\n// the expression  M(i, j) is equivalent to\n//\n//   arrary[i * row_stride + j * col_stride]\n//\n// Conversion functions to and from rotation matrices accept\n// MatrixAdapters to permit using row-major and column-major layouts,\n// and rotation matrices embedded in larger matrices (such as a 3x4\n// projection matrix).\ntemplate <typename T, int row_stride, int col_stride>\nstruct MatrixAdapter;\n\n// Convenience functions to create a MatrixAdapter that treats the\n// array pointed to by \"pointer\" as a 3x3 (contiguous) column-major or\n// row-major matrix.\ntemplate <typename T>\nMatrixAdapter<T, 1, 3> ColumnMajorAdapter3x3(T* pointer);\n\ntemplate <typename T>\nMatrixAdapter<T, 3, 1> RowMajorAdapter3x3(T* pointer);\n\n// Convert a value in combined axis-angle representation to a quaternion.\n// The value angle_axis is a triple whose norm is an angle in radians,\n// and whose direction is aligned with the axis of rotation,\n// and quaternion is a 4-tuple that will contain the resulting quaternion.\n// The implementation may be used with auto-differentiation up to the first\n// derivative, higher derivatives may have unexpected results near the origin.\ntemplate <typename T>\nvoid AngleAxisToQuaternion(const T* angle_axis, T* quaternion);\n\n// Convert a quaternion to the equivalent combined axis-angle representation.\n// The value quaternion must be a unit quaternion - it is not normalized first,\n// and angle_axis will be filled with a value whose norm is the angle of\n// rotation in radians, and whose direction is the axis of rotation.\n// The implementation may be used with auto-differentiation up to the first\n// derivative, higher derivatives may have unexpected results near the origin.\ntemplate <typename T>\nvoid QuaternionToAngleAxis(const T* quaternion, T* angle_axis);\n\n// Conversions between 3x3 rotation matrix (in column major order) and\n// quaternion rotation representations. Templated for use with\n// autodifferentiation.\ntemplate <typename T>\nvoid RotationMatrixToQuaternion(const T* R, T* quaternion);\n\ntemplate <typename T, int row_stride, int col_stride>\nvoid RotationMatrixToQuaternion(\n    const MatrixAdapter<const T, row_stride, col_stride>& R, T* quaternion);\n\n// Conversions between 3x3 rotation matrix (in column major order) and\n// axis-angle rotation representations. Templated for use with\n// autodifferentiation.\ntemplate <typename T>\nvoid RotationMatrixToAngleAxis(const T* R, T* angle_axis);\n\ntemplate <typename T, int row_stride, int col_stride>\nvoid RotationMatrixToAngleAxis(\n    const MatrixAdapter<const T, row_stride, col_stride>& R, T* angle_axis);\n\ntemplate <typename T>\nvoid AngleAxisToRotationMatrix(const T* angle_axis, T* R);\n\ntemplate <typename T, int row_stride, int col_stride>\nvoid AngleAxisToRotationMatrix(\n    const T* angle_axis, const MatrixAdapter<T, row_stride, col_stride>& R);\n\n// Conversions between 3x3 rotation matrix (in row major order) and\n// Euler angle (in degrees) rotation representations.\n//\n// The {pitch,roll,yaw} Euler angles are rotations around the {x,y,z}\n// axes, respectively.  They are applied in that same order, so the\n// total rotation R is Rz * Ry * Rx.\ntemplate <typename T>\nvoid EulerAnglesToRotationMatrix(const T* euler, int row_stride, T* R);\n\ntemplate <typename T, int row_stride, int col_stride>\nvoid EulerAnglesToRotationMatrix(\n    const T* euler, const MatrixAdapter<T, row_stride, col_stride>& R);\n\n// Convert a 4-vector to a 3x3 scaled rotation matrix.\n//\n// The choice of rotation is such that the quaternion [1 0 0 0] goes to an\n// identity matrix and for small a, b, c the quaternion [1 a b c] goes to\n// the matrix\n//\n//         [  0 -c  b ]\n//   I + 2 [  c  0 -a ] + higher order terms\n//         [ -b  a  0 ]\n//\n// which corresponds to a Rodrigues approximation, the last matrix being\n// the cross-product matrix of [a b c]. Together with the property that\n// R(q1 * q2) = R(q1) * R(q2) this uniquely defines the mapping from q to R.\n//\n// No normalization of the quaternion is performed, i.e.\n// R = ||q||^2 * Q, where Q is an orthonormal matrix\n// such that det(Q) = 1 and Q*Q' = I\n//\n// WARNING: The rotation matrix is ROW MAJOR\ntemplate <typename T>\ninline void QuaternionToScaledRotation(const T q[4], T R[3 * 3]);\n\ntemplate <typename T, int row_stride, int col_stride>\ninline void QuaternionToScaledRotation(\n    const T q[4], const MatrixAdapter<T, row_stride, col_stride>& R);\n\n// Same as above except that the rotation matrix is normalized by the\n// Frobenius norm, so that R * R' = I (and det(R) = 1).\n//\n// WARNING: The rotation matrix is ROW MAJOR\ntemplate <typename T>\ninline void QuaternionToRotation(const T q[4], T R[3 * 3]);\n\ntemplate <typename T, int row_stride, int col_stride>\ninline void QuaternionToRotation(\n    const T q[4], const MatrixAdapter<T, row_stride, col_stride>& R);\n\n// Rotates a point pt by a quaternion q:\n//\n//   result = R(q) * pt\n//\n// Assumes the quaternion is unit norm. This assumption allows us to\n// write the transform as (something)*pt + pt, as is clear from the\n// formula below. If you pass in a quaternion with |q|^2 = 2 then you\n// WILL NOT get back 2 times the result you get for a unit quaternion.\n//\n// Inplace rotation is not supported. pt and result must point to different\n// memory locations, otherwise the result will be undefined.\ntemplate <typename T>\ninline void UnitQuaternionRotatePoint(const T q[4], const T pt[3], T result[3]);\n\n// With this function you do not need to assume that q has unit norm.\n// It does assume that the norm is non-zero.\n//\n// Inplace rotation is not supported. pt and result must point to different\n// memory locations, otherwise the result will be undefined.\ntemplate <typename T>\ninline void QuaternionRotatePoint(const T q[4], const T pt[3], T result[3]);\n\n// zw = z * w, where * is the Quaternion product between 4 vectors.\n//\n// Inplace quaternion product is not supported. The resulting quaternion zw must\n// not share the memory with the input quaternion z and w, otherwise the result\n// will be undefined.\ntemplate <typename T>\ninline void QuaternionProduct(const T z[4], const T w[4], T zw[4]);\n\n// xy = x cross y;\n//\n// Inplace cross product is not supported. The resulting vector x_cross_y must\n// not share the memory with the input vectors x and y, otherwise the result\n// will be undefined.\ntemplate <typename T>\ninline void CrossProduct(const T x[3], const T y[3], T x_cross_y[3]);\n\ntemplate <typename T>\ninline T DotProduct(const T x[3], const T y[3]);\n\n// y = R(angle_axis) * x;\n//\n// Inplace rotation is not supported. pt and result must point to different\n// memory locations, otherwise the result will be undefined.\ntemplate <typename T>\ninline void AngleAxisRotatePoint(const T angle_axis[3],\n                                 const T pt[3],\n                                 T result[3]);\n\n// --- IMPLEMENTATION\n\ntemplate <typename T, int row_stride, int col_stride>\nstruct MatrixAdapter {\n  T* pointer_;\n  explicit MatrixAdapter(T* pointer) : pointer_(pointer) {}\n\n  T& operator()(int r, int c) const {\n    return pointer_[r * row_stride + c * col_stride];\n  }\n};\n\ntemplate <typename T>\nMatrixAdapter<T, 1, 3> ColumnMajorAdapter3x3(T* pointer) {\n  return MatrixAdapter<T, 1, 3>(pointer);\n}\n\ntemplate <typename T>\nMatrixAdapter<T, 3, 1> RowMajorAdapter3x3(T* pointer) {\n  return MatrixAdapter<T, 3, 1>(pointer);\n}\n\ntemplate <typename T>\ninline void AngleAxisToQuaternion(const T* angle_axis, T* quaternion) {\n  const T& a0 = angle_axis[0];\n  const T& a1 = angle_axis[1];\n  const T& a2 = angle_axis[2];\n  const T theta_squared = a0 * a0 + a1 * a1 + a2 * a2;\n\n  // For points not at the origin, the full conversion is numerically stable.\n  if (theta_squared > T(0.0)) {\n    const T theta = sqrt(theta_squared);\n    const T half_theta = theta * T(0.5);\n    const T k = sin(half_theta) / theta;\n    quaternion[0] = cos(half_theta);\n    quaternion[1] = a0 * k;\n    quaternion[2] = a1 * k;\n    quaternion[3] = a2 * k;\n  } else {\n    // At the origin, sqrt() will produce NaN in the derivative since\n    // the argument is zero.  By approximating with a Taylor series,\n    // and truncating at one term, the value and first derivatives will be\n    // computed correctly when Jets are used.\n    const T k(0.5);\n    quaternion[0] = T(1.0);\n    quaternion[1] = a0 * k;\n    quaternion[2] = a1 * k;\n    quaternion[3] = a2 * k;\n  }\n}\n\ntemplate <typename T>\ninline void QuaternionToAngleAxis(const T* quaternion, T* angle_axis) {\n  const T& q1 = quaternion[1];\n  const T& q2 = quaternion[2];\n  const T& q3 = quaternion[3];\n  const T sin_squared_theta = q1 * q1 + q2 * q2 + q3 * q3;\n\n  // For quaternions representing non-zero rotation, the conversion\n  // is numerically stable.\n  if (sin_squared_theta > T(0.0)) {\n    const T sin_theta = sqrt(sin_squared_theta);\n    const T& cos_theta = quaternion[0];\n\n    // If cos_theta is negative, theta is greater than pi/2, which\n    // means that angle for the angle_axis vector which is 2 * theta\n    // would be greater than pi.\n    //\n    // While this will result in the correct rotation, it does not\n    // result in a normalized angle-axis vector.\n    //\n    // In that case we observe that 2 * theta ~ 2 * theta - 2 * pi,\n    // which is equivalent saying\n    //\n    //   theta - pi = atan(sin(theta - pi), cos(theta - pi))\n    //              = atan(-sin(theta), -cos(theta))\n    //\n    const T two_theta =\n        T(2.0) * ((cos_theta < T(0.0)) ? atan2(-sin_theta, -cos_theta)\n                                       : atan2(sin_theta, cos_theta));\n    const T k = two_theta / sin_theta;\n    angle_axis[0] = q1 * k;\n    angle_axis[1] = q2 * k;\n    angle_axis[2] = q3 * k;\n  } else {\n    // For zero rotation, sqrt() will produce NaN in the derivative since\n    // the argument is zero.  By approximating with a Taylor series,\n    // and truncating at one term, the value and first derivatives will be\n    // computed correctly when Jets are used.\n    const T k(2.0);\n    angle_axis[0] = q1 * k;\n    angle_axis[1] = q2 * k;\n    angle_axis[2] = q3 * k;\n  }\n}\n\ntemplate <typename T>\nvoid RotationMatrixToQuaternion(const T* R, T* angle_axis) {\n  RotationMatrixToQuaternion(ColumnMajorAdapter3x3(R), angle_axis);\n}\n\n// This algorithm comes from \"Quaternion Calculus and Fast Animation\",\n// Ken Shoemake, 1987 SIGGRAPH course notes\ntemplate <typename T, int row_stride, int col_stride>\nvoid RotationMatrixToQuaternion(\n    const MatrixAdapter<const T, row_stride, col_stride>& R, T* quaternion) {\n  const T trace = R(0, 0) + R(1, 1) + R(2, 2);\n  if (trace >= 0.0) {\n    T t = sqrt(trace + T(1.0));\n    quaternion[0] = T(0.5) * t;\n    t = T(0.5) / t;\n    quaternion[1] = (R(2, 1) - R(1, 2)) * t;\n    quaternion[2] = (R(0, 2) - R(2, 0)) * t;\n    quaternion[3] = (R(1, 0) - R(0, 1)) * t;\n  } else {\n    int i = 0;\n    if (R(1, 1) > R(0, 0)) {\n      i = 1;\n    }\n\n    if (R(2, 2) > R(i, i)) {\n      i = 2;\n    }\n\n    const int j = (i + 1) % 3;\n    const int k = (j + 1) % 3;\n    T t = sqrt(R(i, i) - R(j, j) - R(k, k) + T(1.0));\n    quaternion[i + 1] = T(0.5) * t;\n    t = T(0.5) / t;\n    quaternion[0] = (R(k, j) - R(j, k)) * t;\n    quaternion[j + 1] = (R(j, i) + R(i, j)) * t;\n    quaternion[k + 1] = (R(k, i) + R(i, k)) * t;\n  }\n}\n\n// The conversion of a rotation matrix to the angle-axis form is\n// numerically problematic when then rotation angle is close to zero\n// or to Pi. The following implementation detects when these two cases\n// occurs and deals with them by taking code paths that are guaranteed\n// to not perform division by a small number.\ntemplate <typename T>\ninline void RotationMatrixToAngleAxis(const T* R, T* angle_axis) {\n  RotationMatrixToAngleAxis(ColumnMajorAdapter3x3(R), angle_axis);\n}\n\ntemplate <typename T, int row_stride, int col_stride>\nvoid RotationMatrixToAngleAxis(\n    const MatrixAdapter<const T, row_stride, col_stride>& R, T* angle_axis) {\n  T quaternion[4];\n  RotationMatrixToQuaternion(R, quaternion);\n  QuaternionToAngleAxis(quaternion, angle_axis);\n  return;\n}\n\ntemplate <typename T>\ninline void AngleAxisToRotationMatrix(const T* angle_axis, T* R) {\n  AngleAxisToRotationMatrix(angle_axis, ColumnMajorAdapter3x3(R));\n}\n\ntemplate <typename T, int row_stride, int col_stride>\nvoid AngleAxisToRotationMatrix(\n    const T* angle_axis, const MatrixAdapter<T, row_stride, col_stride>& R) {\n  static const T kOne = T(1.0);\n  const T theta2 = DotProduct(angle_axis, angle_axis);\n  if (theta2 > T(std::numeric_limits<double>::epsilon())) {\n    // We want to be careful to only evaluate the square root if the\n    // norm of the angle_axis vector is greater than zero. Otherwise\n    // we get a division by zero.\n    const T theta = sqrt(theta2);\n    const T wx = angle_axis[0] / theta;\n    const T wy = angle_axis[1] / theta;\n    const T wz = angle_axis[2] / theta;\n\n    const T costheta = cos(theta);\n    const T sintheta = sin(theta);\n\n    // clang-format off\n    R(0, 0) =     costheta   + wx*wx*(kOne -    costheta);\n    R(1, 0) =  wz*sintheta   + wx*wy*(kOne -    costheta);\n    R(2, 0) = -wy*sintheta   + wx*wz*(kOne -    costheta);\n    R(0, 1) =  wx*wy*(kOne - costheta)     - wz*sintheta;\n    R(1, 1) =     costheta   + wy*wy*(kOne -    costheta);\n    R(2, 1) =  wx*sintheta   + wy*wz*(kOne -    costheta);\n    R(0, 2) =  wy*sintheta   + wx*wz*(kOne -    costheta);\n    R(1, 2) = -wx*sintheta   + wy*wz*(kOne -    costheta);\n    R(2, 2) =     costheta   + wz*wz*(kOne -    costheta);\n    // clang-format on\n  } else {\n    // Near zero, we switch to using the first order Taylor expansion.\n    R(0, 0) = kOne;\n    R(1, 0) = angle_axis[2];\n    R(2, 0) = -angle_axis[1];\n    R(0, 1) = -angle_axis[2];\n    R(1, 1) = kOne;\n    R(2, 1) = angle_axis[0];\n    R(0, 2) = angle_axis[1];\n    R(1, 2) = -angle_axis[0];\n    R(2, 2) = kOne;\n  }\n}\n\ntemplate <typename T>\ninline void EulerAnglesToRotationMatrix(const T* euler,\n                                        const int row_stride_parameter,\n                                        T* R) {\n  EulerAnglesToRotationMatrix(euler, RowMajorAdapter3x3(R));\n}\n\ntemplate <typename T, int row_stride, int col_stride>\nvoid EulerAnglesToRotationMatrix(\n    const T* euler, const MatrixAdapter<T, row_stride, col_stride>& R) {\n  const double kPi = 3.14159265358979323846;\n  const T degrees_to_radians(kPi / 180.0);\n\n  const T pitch(euler[0] * degrees_to_radians);\n  const T roll(euler[1] * degrees_to_radians);\n  const T yaw(euler[2] * degrees_to_radians);\n\n  const T c1 = cos(yaw);\n  const T s1 = sin(yaw);\n  const T c2 = cos(roll);\n  const T s2 = sin(roll);\n  const T c3 = cos(pitch);\n  const T s3 = sin(pitch);\n\n  R(0, 0) = c1 * c2;\n  R(0, 1) = -s1 * c3 + c1 * s2 * s3;\n  R(0, 2) = s1 * s3 + c1 * s2 * c3;\n\n  R(1, 0) = s1 * c2;\n  R(1, 1) = c1 * c3 + s1 * s2 * s3;\n  R(1, 2) = -c1 * s3 + s1 * s2 * c3;\n\n  R(2, 0) = -s2;\n  R(2, 1) = c2 * s3;\n  R(2, 2) = c2 * c3;\n}\n\ntemplate <typename T>\ninline void QuaternionToScaledRotation(const T q[4], T R[3 * 3]) {\n  QuaternionToScaledRotation(q, RowMajorAdapter3x3(R));\n}\n\ntemplate <typename T, int row_stride, int col_stride>\ninline void QuaternionToScaledRotation(\n    const T q[4], const MatrixAdapter<T, row_stride, col_stride>& R) {\n  // Make convenient names for elements of q.\n  T a = q[0];\n  T b = q[1];\n  T c = q[2];\n  T d = q[3];\n  // This is not to eliminate common sub-expression, but to\n  // make the lines shorter so that they fit in 80 columns!\n  T aa = a * a;\n  T ab = a * b;\n  T ac = a * c;\n  T ad = a * d;\n  T bb = b * b;\n  T bc = b * c;\n  T bd = b * d;\n  T cc = c * c;\n  T cd = c * d;\n  T dd = d * d;\n\n  // clang-format off\n  R(0, 0) = aa + bb - cc - dd; R(0, 1) = T(2) * (bc - ad);  R(0, 2) = T(2) * (ac + bd);\n  R(1, 0) = T(2) * (ad + bc);  R(1, 1) = aa - bb + cc - dd; R(1, 2) = T(2) * (cd - ab);\n  R(2, 0) = T(2) * (bd - ac);  R(2, 1) = T(2) * (ab + cd);  R(2, 2) = aa - bb - cc + dd;\n  // clang-format on\n}\n\ntemplate <typename T>\ninline void QuaternionToRotation(const T q[4], T R[3 * 3]) {\n  QuaternionToRotation(q, RowMajorAdapter3x3(R));\n}\n\ntemplate <typename T, int row_stride, int col_stride>\ninline void QuaternionToRotation(\n    const T q[4], const MatrixAdapter<T, row_stride, col_stride>& R) {\n  QuaternionToScaledRotation(q, R);\n\n  T normalizer = q[0] * q[0] + q[1] * q[1] + q[2] * q[2] + q[3] * q[3];\n  normalizer = T(1) / normalizer;\n\n  for (int i = 0; i < 3; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      R(i, j) *= normalizer;\n    }\n  }\n}\n\ntemplate <typename T>\ninline void UnitQuaternionRotatePoint(const T q[4],\n                                      const T pt[3],\n                                      T result[3]) {\n  DCHECK_NE(pt, result) << \"Inplace rotation is not supported.\";\n\n  // clang-format off\n  const T t2 =  q[0] * q[1];\n  const T t3 =  q[0] * q[2];\n  const T t4 =  q[0] * q[3];\n  const T t5 = -q[1] * q[1];\n  const T t6 =  q[1] * q[2];\n  const T t7 =  q[1] * q[3];\n  const T t8 = -q[2] * q[2];\n  const T t9 =  q[2] * q[3];\n  const T t1 = -q[3] * q[3];\n  result[0] = T(2) * ((t8 + t1) * pt[0] + (t6 - t4) * pt[1] + (t3 + t7) * pt[2]) + pt[0];  // NOLINT\n  result[1] = T(2) * ((t4 + t6) * pt[0] + (t5 + t1) * pt[1] + (t9 - t2) * pt[2]) + pt[1];  // NOLINT\n  result[2] = T(2) * ((t7 - t3) * pt[0] + (t2 + t9) * pt[1] + (t5 + t8) * pt[2]) + pt[2];  // NOLINT\n  // clang-format on\n}\n\ntemplate <typename T>\ninline void QuaternionRotatePoint(const T q[4], const T pt[3], T result[3]) {\n  DCHECK_NE(pt, result) << \"Inplace rotation is not supported.\";\n\n  // 'scale' is 1 / norm(q).\n  const T scale =\n      T(1) / sqrt(q[0] * q[0] + q[1] * q[1] + q[2] * q[2] + q[3] * q[3]);\n\n  // Make unit-norm version of q.\n  const T unit[4] = {\n      scale * q[0],\n      scale * q[1],\n      scale * q[2],\n      scale * q[3],\n  };\n\n  UnitQuaternionRotatePoint(unit, pt, result);\n}\n\ntemplate <typename T>\ninline void QuaternionProduct(const T z[4], const T w[4], T zw[4]) {\n  DCHECK_NE(z, zw) << \"Inplace quaternion product is not supported.\";\n  DCHECK_NE(w, zw) << \"Inplace quaternion product is not supported.\";\n\n  // clang-format off\n  zw[0] = z[0] * w[0] - z[1] * w[1] - z[2] * w[2] - z[3] * w[3];\n  zw[1] = z[0] * w[1] + z[1] * w[0] + z[2] * w[3] - z[3] * w[2];\n  zw[2] = z[0] * w[2] - z[1] * w[3] + z[2] * w[0] + z[3] * w[1];\n  zw[3] = z[0] * w[3] + z[1] * w[2] - z[2] * w[1] + z[3] * w[0];\n  // clang-format on\n}\n\n// xy = x cross y;\ntemplate <typename T>\ninline void CrossProduct(const T x[3], const T y[3], T x_cross_y[3]) {\n  DCHECK_NE(x, x_cross_y) << \"Inplace cross product is not supported.\";\n  DCHECK_NE(y, x_cross_y) << \"Inplace cross product is not supported.\";\n\n  x_cross_y[0] = x[1] * y[2] - x[2] * y[1];\n  x_cross_y[1] = x[2] * y[0] - x[0] * y[2];\n  x_cross_y[2] = x[0] * y[1] - x[1] * y[0];\n}\n\ntemplate <typename T>\ninline T DotProduct(const T x[3], const T y[3]) {\n  return (x[0] * y[0] + x[1] * y[1] + x[2] * y[2]);\n}\n\ntemplate <typename T>\ninline void AngleAxisRotatePoint(const T angle_axis[3],\n                                 const T pt[3],\n                                 T result[3]) {\n  DCHECK_NE(pt, result) << \"Inplace rotation is not supported.\";\n\n  const T theta2 = DotProduct(angle_axis, angle_axis);\n  if (theta2 > T(std::numeric_limits<double>::epsilon())) {\n    // Away from zero, use the rodriguez formula\n    //\n    //   result = pt costheta +\n    //            (w x pt) * sintheta +\n    //            w (w . pt) (1 - costheta)\n    //\n    // We want to be careful to only evaluate the square root if the\n    // norm of the angle_axis vector is greater than zero. Otherwise\n    // we get a division by zero.\n    //\n    const T theta = sqrt(theta2);\n    const T costheta = cos(theta);\n    const T sintheta = sin(theta);\n    const T theta_inverse = T(1.0) / theta;\n\n    const T w[3] = {angle_axis[0] * theta_inverse,\n                    angle_axis[1] * theta_inverse,\n                    angle_axis[2] * theta_inverse};\n\n    // Explicitly inlined evaluation of the cross product for\n    // performance reasons.\n    const T w_cross_pt[3] = {w[1] * pt[2] - w[2] * pt[1],\n                             w[2] * pt[0] - w[0] * pt[2],\n                             w[0] * pt[1] - w[1] * pt[0]};\n    const T tmp =\n        (w[0] * pt[0] + w[1] * pt[1] + w[2] * pt[2]) * (T(1.0) - costheta);\n\n    result[0] = pt[0] * costheta + w_cross_pt[0] * sintheta + w[0] * tmp;\n    result[1] = pt[1] * costheta + w_cross_pt[1] * sintheta + w[1] * tmp;\n    result[2] = pt[2] * costheta + w_cross_pt[2] * sintheta + w[2] * tmp;\n  } else {\n    // Near zero, the first order Taylor approximation of the rotation\n    // matrix R corresponding to a vector w and angle w is\n    //\n    //   R = I + hat(w) * sin(theta)\n    //\n    // But sintheta ~ theta and theta * w = angle_axis, which gives us\n    //\n    //  R = I + hat(w)\n    //\n    // and actually performing multiplication with the point pt, gives us\n    // R * pt = pt + w x pt.\n    //\n    // Switching to the Taylor expansion near zero provides meaningful\n    // derivatives when evaluated using Jets.\n    //\n    // Explicitly inlined evaluation of the cross product for\n    // performance reasons.\n    const T w_cross_pt[3] = {angle_axis[1] * pt[2] - angle_axis[2] * pt[1],\n                             angle_axis[2] * pt[0] - angle_axis[0] * pt[2],\n                             angle_axis[0] * pt[1] - angle_axis[1] * pt[0]};\n\n    result[0] = pt[0] + w_cross_pt[0];\n    result[1] = pt[1] + w_cross_pt[1];\n    result[2] = pt[2] + w_cross_pt[2];\n  }\n}\n\n}  // namespace ceres\n\n#endif  // CERES_PUBLIC_ROTATION_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/sized_cost_function.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n//\n// A convenience class for cost functions which are statically sized.\n// Compared to the dynamically-sized base class, this reduces boilerplate.\n//\n// The kNumResiduals template parameter can be a constant such as 2 or 5, or it\n// can be ceres::DYNAMIC. If kNumResiduals is ceres::DYNAMIC, then subclasses\n// are responsible for calling set_num_residuals() at runtime.\n\n#ifndef CERES_PUBLIC_SIZED_COST_FUNCTION_H_\n#define CERES_PUBLIC_SIZED_COST_FUNCTION_H_\n\n#include \"ceres/cost_function.h\"\n#include \"ceres/types.h\"\n#include \"glog/logging.h\"\n#include \"internal/parameter_dims.h\"\n\nnamespace ceres {\n\ntemplate <int kNumResiduals, int... Ns>\nclass SizedCostFunction : public CostFunction {\n public:\n  static_assert(kNumResiduals > 0 || kNumResiduals == DYNAMIC,\n                \"Cost functions must have at least one residual block.\");\n  static_assert(internal::StaticParameterDims<Ns...>::kIsValid,\n                \"Invalid parameter block dimension detected. Each parameter \"\n                \"block dimension must be bigger than zero.\");\n\n  using ParameterDims = internal::StaticParameterDims<Ns...>;\n\n  SizedCostFunction() {\n    set_num_residuals(kNumResiduals);\n    *mutable_parameter_block_sizes() = std::vector<int32_t>{Ns...};\n  }\n\n  virtual ~SizedCostFunction() {}\n\n  // Subclasses must implement Evaluate().\n};\n\n}  // namespace ceres\n\n#endif  // CERES_PUBLIC_SIZED_COST_FUNCTION_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/solver.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_PUBLIC_SOLVER_H_\n#define CERES_PUBLIC_SOLVER_H_\n\n#include <cmath>\n#include <memory>\n#include <string>\n#include <unordered_set>\n#include <vector>\n\n#include \"ceres/crs_matrix.h\"\n#include \"ceres/internal/disable_warnings.h\"\n#include \"ceres/internal/port.h\"\n#include \"ceres/iteration_callback.h\"\n#include \"ceres/ordered_groups.h\"\n#include \"ceres/problem.h\"\n#include \"ceres/types.h\"\n\nnamespace ceres {\n\n// Interface for non-linear least squares solvers.\nclass CERES_EXPORT Solver {\n public:\n  virtual ~Solver();\n\n  // The options structure contains, not surprisingly, options that control how\n  // the solver operates. The defaults should be suitable for a wide range of\n  // problems; however, better performance is often obtainable with tweaking.\n  //\n  // The constants are defined inside types.h\n  struct CERES_EXPORT Options {\n    // Returns true if the options struct has a valid\n    // configuration. Returns false otherwise, and fills in *error\n    // with a message describing the problem.\n    bool IsValid(std::string* error) const;\n\n    // Minimizer options ----------------------------------------\n\n    // Ceres supports the two major families of optimization strategies -\n    // Trust Region and Line Search.\n    //\n    // 1. The line search approach first finds a descent direction\n    // along which the objective function will be reduced and then\n    // computes a step size that decides how far should move along\n    // that direction. The descent direction can be computed by\n    // various methods, such as gradient descent, Newton's method and\n    // Quasi-Newton method. The step size can be determined either\n    // exactly or inexactly.\n    //\n    // 2. The trust region approach approximates the objective\n    // function using a model function (often a quadratic) over\n    // a subset of the search space known as the trust region. If the\n    // model function succeeds in minimizing the true objective\n    // function the trust region is expanded; conversely, otherwise it\n    // is contracted and the model optimization problem is solved\n    // again.\n    //\n    // Trust region methods are in some sense dual to line search methods:\n    // trust region methods first choose a step size (the size of the\n    // trust region) and then a step direction while line search methods\n    // first choose a step direction and then a step size.\n    MinimizerType minimizer_type = TRUST_REGION;\n\n    LineSearchDirectionType line_search_direction_type = LBFGS;\n    LineSearchType line_search_type = WOLFE;\n    NonlinearConjugateGradientType nonlinear_conjugate_gradient_type =\n        FLETCHER_REEVES;\n\n    // The LBFGS hessian approximation is a low rank approximation to\n    // the inverse of the Hessian matrix. The rank of the\n    // approximation determines (linearly) the space and time\n    // complexity of using the approximation. Higher the rank, the\n    // better is the quality of the approximation. The increase in\n    // quality is however is bounded for a number of reasons.\n    //\n    // 1. The method only uses secant information and not actual\n    // derivatives.\n    //\n    // 2. The Hessian approximation is constrained to be positive\n    // definite.\n    //\n    // So increasing this rank to a large number will cost time and\n    // space complexity without the corresponding increase in solution\n    // quality. There are no hard and fast rules for choosing the\n    // maximum rank. The best choice usually requires some problem\n    // specific experimentation.\n    //\n    // For more theoretical and implementation details of the LBFGS\n    // method, please see:\n    //\n    // Nocedal, J. (1980). \"Updating Quasi-Newton Matrices with\n    // Limited Storage\". Mathematics of Computation 35 (151): 773-782.\n    int max_lbfgs_rank = 20;\n\n    // As part of the (L)BFGS update step (BFGS) / right-multiply step (L-BFGS),\n    // the initial inverse Hessian approximation is taken to be the Identity.\n    // However, Oren showed that using instead I * \\gamma, where \\gamma is\n    // chosen to approximate an eigenvalue of the true inverse Hessian can\n    // result in improved convergence in a wide variety of cases. Setting\n    // use_approximate_eigenvalue_bfgs_scaling to true enables this scaling.\n    //\n    // It is important to note that approximate eigenvalue scaling does not\n    // always improve convergence, and that it can in fact significantly degrade\n    // performance for certain classes of problem, which is why it is disabled\n    // by default.  In particular it can degrade performance when the\n    // sensitivity of the problem to different parameters varies significantly,\n    // as in this case a single scalar factor fails to capture this variation\n    // and detrimentally downscales parts of the jacobian approximation which\n    // correspond to low-sensitivity parameters. It can also reduce the\n    // robustness of the solution to errors in the jacobians.\n    //\n    // Oren S.S., Self-scaling variable metric (SSVM) algorithms\n    // Part II: Implementation and experiments, Management Science,\n    // 20(5), 863-874, 1974.\n    bool use_approximate_eigenvalue_bfgs_scaling = false;\n\n    // Degree of the polynomial used to approximate the objective\n    // function. Valid values are BISECTION, QUADRATIC and CUBIC.\n    //\n    // BISECTION corresponds to pure backtracking search with no\n    // interpolation.\n    LineSearchInterpolationType line_search_interpolation_type = CUBIC;\n\n    // If during the line search, the step_size falls below this\n    // value, it is truncated to zero.\n    double min_line_search_step_size = 1e-9;\n\n    // Line search parameters.\n\n    // Solving the line search problem exactly is computationally\n    // prohibitive. Fortunately, line search based optimization\n    // algorithms can still guarantee convergence if instead of an\n    // exact solution, the line search algorithm returns a solution\n    // which decreases the value of the objective function\n    // sufficiently. More precisely, we are looking for a step_size\n    // s.t.\n    //\n    //   f(step_size) <= f(0) + sufficient_decrease * f'(0) * step_size\n    //\n    double line_search_sufficient_function_decrease = 1e-4;\n\n    // In each iteration of the line search,\n    //\n    //  new_step_size >= max_line_search_step_contraction * step_size\n    //\n    // Note that by definition, for contraction:\n    //\n    //  0 < max_step_contraction < min_step_contraction < 1\n    //\n    double max_line_search_step_contraction = 1e-3;\n\n    // In each iteration of the line search,\n    //\n    //  new_step_size <= min_line_search_step_contraction * step_size\n    //\n    // Note that by definition, for contraction:\n    //\n    //  0 < max_step_contraction < min_step_contraction < 1\n    //\n    double min_line_search_step_contraction = 0.6;\n\n    // Maximum number of trial step size iterations during each line\n    // search, if a step size satisfying the search conditions cannot\n    // be found within this number of trials, the line search will\n    // terminate.\n\n    // The minimum allowed value is 0 for trust region minimizer and 1\n    // otherwise. If 0 is specified for the trust region minimizer,\n    // then line search will not be used when solving constrained\n    // optimization problems.\n    int max_num_line_search_step_size_iterations = 20;\n\n    // Maximum number of restarts of the line search direction algorithm before\n    // terminating the optimization. Restarts of the line search direction\n    // algorithm occur when the current algorithm fails to produce a new descent\n    // direction. This typically indicates a numerical failure, or a breakdown\n    // in the validity of the approximations used.\n    int max_num_line_search_direction_restarts = 5;\n\n    // The strong Wolfe conditions consist of the Armijo sufficient\n    // decrease condition, and an additional requirement that the\n    // step-size be chosen s.t. the _magnitude_ ('strong' Wolfe\n    // conditions) of the gradient along the search direction\n    // decreases sufficiently. Precisely, this second condition\n    // is that we seek a step_size s.t.\n    //\n    //   |f'(step_size)| <= sufficient_curvature_decrease * |f'(0)|\n    //\n    // Where f() is the line search objective and f'() is the derivative\n    // of f w.r.t step_size (d f / d step_size).\n    double line_search_sufficient_curvature_decrease = 0.9;\n\n    // During the bracketing phase of the Wolfe search, the step size is\n    // increased until either a point satisfying the Wolfe conditions is\n    // found, or an upper bound for a bracket containing a point satisfying\n    // the conditions is found.  Precisely, at each iteration of the\n    // expansion:\n    //\n    //   new_step_size <= max_step_expansion * step_size.\n    //\n    // By definition for expansion, max_step_expansion > 1.0.\n    double max_line_search_step_expansion = 10.0;\n\n    TrustRegionStrategyType trust_region_strategy_type = LEVENBERG_MARQUARDT;\n\n    // Type of dogleg strategy to use.\n    DoglegType dogleg_type = TRADITIONAL_DOGLEG;\n\n    // The classical trust region methods are descent methods, in that\n    // they only accept a point if it strictly reduces the value of\n    // the objective function.\n    //\n    // Relaxing this requirement allows the algorithm to be more\n    // efficient in the long term at the cost of some local increase\n    // in the value of the objective function.\n    //\n    // This is because allowing for non-decreasing objective function\n    // values in a principled manner allows the algorithm to \"jump over\n    // boulders\" as the method is not restricted to move into narrow\n    // valleys while preserving its convergence properties.\n    //\n    // Setting use_nonmonotonic_steps to true enables the\n    // non-monotonic trust region algorithm as described by Conn,\n    // Gould & Toint in \"Trust Region Methods\", Section 10.1.\n    //\n    // The parameter max_consecutive_nonmonotonic_steps controls the\n    // window size used by the step selection algorithm to accept\n    // non-monotonic steps.\n    //\n    // Even though the value of the objective function may be larger\n    // than the minimum value encountered over the course of the\n    // optimization, the final parameters returned to the user are the\n    // ones corresponding to the minimum cost over all iterations.\n    bool use_nonmonotonic_steps = false;\n    int max_consecutive_nonmonotonic_steps = 5;\n\n    // Maximum number of iterations for the minimizer to run for.\n    int max_num_iterations = 50;\n\n    // Maximum time for which the minimizer should run for.\n    double max_solver_time_in_seconds = 1e9;\n\n    // Number of threads used by Ceres for evaluating the cost and\n    // jacobians.\n    int num_threads = 1;\n\n    // Trust region minimizer settings.\n    double initial_trust_region_radius = 1e4;\n    double max_trust_region_radius = 1e16;\n\n    // Minimizer terminates when the trust region radius becomes\n    // smaller than this value.\n    double min_trust_region_radius = 1e-32;\n\n    // Lower bound for the relative decrease before a step is\n    // accepted.\n    double min_relative_decrease = 1e-3;\n\n    // For the Levenberg-Marquadt algorithm, the scaled diagonal of\n    // the normal equations J'J is used to control the size of the\n    // trust region. Extremely small and large values along the\n    // diagonal can make this regularization scheme\n    // fail. max_lm_diagonal and min_lm_diagonal, clamp the values of\n    // diag(J'J) from above and below. In the normal course of\n    // operation, the user should not have to modify these parameters.\n    double min_lm_diagonal = 1e-6;\n    double max_lm_diagonal = 1e32;\n\n    // Sometimes due to numerical conditioning problems or linear\n    // solver flakiness, the trust region strategy may return a\n    // numerically invalid step that can be fixed by reducing the\n    // trust region size. So the TrustRegionMinimizer allows for a few\n    // successive invalid steps before it declares NUMERICAL_FAILURE.\n    int max_num_consecutive_invalid_steps = 5;\n\n    // Minimizer terminates when\n    //\n    //   (new_cost - old_cost) < function_tolerance * old_cost;\n    //\n    double function_tolerance = 1e-6;\n\n    // Minimizer terminates when\n    //\n    //   max_i |x - Project(Plus(x, -g(x))| < gradient_tolerance\n    //\n    // This value should typically be 1e-4 * function_tolerance.\n    double gradient_tolerance = 1e-10;\n\n    // Minimizer terminates when\n    //\n    //   |step|_2 <= parameter_tolerance * ( |x|_2 +  parameter_tolerance)\n    //\n    double parameter_tolerance = 1e-8;\n\n    // Linear least squares solver options -------------------------------------\n\n    LinearSolverType linear_solver_type =\n#if defined(CERES_NO_SPARSE)\n        DENSE_QR;\n#else\n        SPARSE_NORMAL_CHOLESKY;\n#endif\n\n    // Type of preconditioner to use with the iterative linear solvers.\n    PreconditionerType preconditioner_type = JACOBI;\n\n    // Type of clustering algorithm to use for visibility based\n    // preconditioning. This option is used only when the\n    // preconditioner_type is CLUSTER_JACOBI or CLUSTER_TRIDIAGONAL.\n    VisibilityClusteringType visibility_clustering_type = CANONICAL_VIEWS;\n\n    // Subset preconditioner is a general purpose preconditioner for\n    // linear least squares problems. Given a set of residual blocks,\n    // it uses the corresponding subset of the rows of the Jacobian to\n    // construct a preconditioner.\n    //\n    // Suppose the Jacobian J has been horizontally partitioned as\n    //\n    // J = [P]\n    //     [Q]\n    //\n    // Where, Q is the set of rows corresponding to the residual\n    // blocks in residual_blocks_for_subset_preconditioner.\n    //\n    // The preconditioner is the inverse of the matrix Q'Q.\n    //\n    // Obviously, the efficacy of the preconditioner depends on how\n    // well the matrix Q approximates J'J, or how well the chosen\n    // residual blocks approximate the non-linear least squares\n    // problem.\n    //\n    // If Solver::Options::preconditioner_type == SUBSET, then\n    // residual_blocks_for_subset_preconditioner must be non-empty.\n    std::unordered_set<ResidualBlockId> residual_blocks_for_subset_preconditioner;\n\n    // Ceres supports using multiple dense linear algebra libraries\n    // for dense matrix factorizations. Currently EIGEN and LAPACK are\n    // the valid choices. EIGEN is always available, LAPACK refers to\n    // the system BLAS + LAPACK library which may or may not be\n    // available.\n    //\n    // This setting affects the DENSE_QR, DENSE_NORMAL_CHOLESKY and\n    // DENSE_SCHUR solvers. For small to moderate sized problem EIGEN\n    // is a fine choice but for large problems, an optimized LAPACK +\n    // BLAS implementation can make a substantial difference in\n    // performance.\n    DenseLinearAlgebraLibraryType dense_linear_algebra_library_type = EIGEN;\n\n    // Ceres supports using multiple sparse linear algebra libraries\n    // for sparse matrix ordering and factorizations. Currently,\n    // SUITE_SPARSE and CX_SPARSE are the valid choices, depending on\n    // whether they are linked into Ceres at build time.\n    SparseLinearAlgebraLibraryType sparse_linear_algebra_library_type =\n#if !defined(CERES_NO_SUITESPARSE)\n        SUITE_SPARSE;\n#elif defined(CERES_USE_EIGEN_SPARSE)\n        EIGEN_SPARSE;\n#elif !defined(CERES_NO_CXSPARSE)\n        CX_SPARSE;\n#elif !defined(CERES_NO_ACCELERATE_SPARSE)\n        ACCELERATE_SPARSE;\n#else\n        NO_SPARSE;\n#endif\n\n    // The order in which variables are eliminated in a linear solver\n    // can have a significant of impact on the efficiency and accuracy\n    // of the method. e.g., when doing sparse Cholesky factorization,\n    // there are matrices for which a good ordering will give a\n    // Cholesky factor with O(n) storage, where as a bad ordering will\n    // result in an completely dense factor.\n    //\n    // Ceres allows the user to provide varying amounts of hints to\n    // the solver about the variable elimination ordering to use. This\n    // can range from no hints, where the solver is free to decide the\n    // best possible ordering based on the user's choices like the\n    // linear solver being used, to an exact order in which the\n    // variables should be eliminated, and a variety of possibilities\n    // in between.\n    //\n    // Instances of the ParameterBlockOrdering class are used to\n    // communicate this information to Ceres.\n    //\n    // Formally an ordering is an ordered partitioning of the\n    // parameter blocks, i.e, each parameter block belongs to exactly\n    // one group, and each group has a unique non-negative integer\n    // associated with it, that determines its order in the set of\n    // groups.\n    //\n    // Given such an ordering, Ceres ensures that the parameter blocks in\n    // the lowest numbered group are eliminated first, and then the\n    // parameter blocks in the next lowest numbered group and so on. Within\n    // each group, Ceres is free to order the parameter blocks as it\n    // chooses.\n    //\n    // If NULL, then all parameter blocks are assumed to be in the\n    // same group and the solver is free to decide the best\n    // ordering.\n    //\n    // e.g. Consider the linear system\n    //\n    //   x + y = 3\n    //   2x + 3y = 7\n    //\n    // There are two ways in which it can be solved. First eliminating x\n    // from the two equations, solving for y and then back substituting\n    // for x, or first eliminating y, solving for x and back substituting\n    // for y. The user can construct three orderings here.\n    //\n    //   {0: x}, {1: y} - eliminate x first.\n    //   {0: y}, {1: x} - eliminate y first.\n    //   {0: x, y}      - Solver gets to decide the elimination order.\n    //\n    // Thus, to have Ceres determine the ordering automatically using\n    // heuristics, put all the variables in group 0 and to control the\n    // ordering for every variable, create groups 0..N-1, one per\n    // variable, in the desired order.\n    //\n    // Bundle Adjustment\n    // -----------------\n    //\n    // A particular case of interest is bundle adjustment, where the user\n    // has two options. The default is to not specify an ordering at all,\n    // the solver will see that the user wants to use a Schur type solver\n    // and figure out the right elimination ordering.\n    //\n    // But if the user already knows what parameter blocks are points and\n    // what are cameras, they can save preprocessing time by partitioning\n    // the parameter blocks into two groups, one for the points and one\n    // for the cameras, where the group containing the points has an id\n    // smaller than the group containing cameras.\n    std::shared_ptr<ParameterBlockOrdering> linear_solver_ordering;\n\n    // Use an explicitly computed Schur complement matrix with\n    // ITERATIVE_SCHUR.\n    //\n    // By default this option is disabled and ITERATIVE_SCHUR\n    // evaluates matrix-vector products between the Schur\n    // complement and a vector implicitly by exploiting the algebraic\n    // expression for the Schur complement.\n    //\n    // The cost of this evaluation scales with the number of non-zeros\n    // in the Jacobian.\n    //\n    // For small to medium sized problems there is a sweet spot where\n    // computing the Schur complement is cheap enough that it is much\n    // more efficient to explicitly compute it and use it for evaluating\n    // the matrix-vector products.\n    //\n    // Enabling this option tells ITERATIVE_SCHUR to use an explicitly\n    // computed Schur complement.\n    //\n    // NOTE: This option can only be used with the SCHUR_JACOBI\n    // preconditioner.\n    bool use_explicit_schur_complement = false;\n\n    // Sparse Cholesky factorization algorithms use a fill-reducing\n    // ordering to permute the columns of the Jacobian matrix. There\n    // are two ways of doing this.\n\n    // 1. Compute the Jacobian matrix in some order and then have the\n    //    factorization algorithm permute the columns of the Jacobian.\n\n    // 2. Compute the Jacobian with its columns already permuted.\n\n    // The first option incurs a significant memory penalty. The\n    // factorization algorithm has to make a copy of the permuted\n    // Jacobian matrix, thus Ceres pre-permutes the columns of the\n    // Jacobian matrix and generally speaking, there is no performance\n    // penalty for doing so.\n\n    // In some rare cases, it is worth using a more complicated\n    // reordering algorithm which has slightly better runtime\n    // performance at the expense of an extra copy of the Jacobian\n    // matrix. Setting use_postordering to true enables this tradeoff.\n    bool use_postordering = false;\n\n    // Some non-linear least squares problems are symbolically dense but\n    // numerically sparse. i.e. at any given state only a small number\n    // of jacobian entries are non-zero, but the position and number of\n    // non-zeros is different depending on the state. For these problems\n    // it can be useful to factorize the sparse jacobian at each solver\n    // iteration instead of including all of the zero entries in a single\n    // general factorization.\n    //\n    // If your problem does not have this property (or you do not know),\n    // then it is probably best to keep this false, otherwise it will\n    // likely lead to worse performance.\n\n    // This settings only affects the SPARSE_NORMAL_CHOLESKY solver.\n    bool dynamic_sparsity = false;\n\n    // TODO(sameeragarwal): Further expand the documentation for the\n    // following two options.\n\n    // NOTE1: EXPERIMENTAL FEATURE, UNDER DEVELOPMENT, USE AT YOUR OWN RISK.\n    //\n    // If use_mixed_precision_solves is true, the Gauss-Newton matrix\n    // is computed in double precision, but its factorization is\n    // computed in single precision. This can result in significant\n    // time and memory savings at the cost of some accuracy in the\n    // Gauss-Newton step. Iterative refinement is used to recover some\n    // of this accuracy back.\n    //\n    // If use_mixed_precision_solves is true, we recommend setting\n    // max_num_refinement_iterations to 2-3.\n    //\n    // NOTE2: The following two options are currently only applicable\n    // if sparse_linear_algebra_library_type is EIGEN_SPARSE and\n    // linear_solver_type is SPARSE_NORMAL_CHOLESKY, or SPARSE_SCHUR.\n    bool use_mixed_precision_solves = false;\n\n    // Number steps of the iterative refinement process to run when\n    // computing the Gauss-Newton step.\n    int max_num_refinement_iterations = 0;\n\n    // Some non-linear least squares problems have additional\n    // structure in the way the parameter blocks interact that it is\n    // beneficial to modify the way the trust region step is computed.\n    //\n    // e.g., consider the following regression problem\n    //\n    //   y = a_1 exp(b_1 x) + a_2 exp(b_3 x^2 + c_1)\n    //\n    // Given a set of pairs{(x_i, y_i)}, the user wishes to estimate\n    // a_1, a_2, b_1, b_2, and c_1.\n    //\n    // Notice here that the expression on the left is linear in a_1\n    // and a_2, and given any value for b_1, b_2 and c_1, it is\n    // possible to use linear regression to estimate the optimal\n    // values of a_1 and a_2. Indeed, its possible to analytically\n    // eliminate the variables a_1 and a_2 from the problem all\n    // together. Problems like these are known as separable least\n    // squares problem and the most famous algorithm for solving them\n    // is the Variable Projection algorithm invented by Golub &\n    // Pereyra.\n    //\n    // Similar structure can be found in the matrix factorization with\n    // missing data problem. There the corresponding algorithm is\n    // known as Wiberg's algorithm.\n    //\n    // Ruhe & Wedin (Algorithms for Separable Nonlinear Least Squares\n    // Problems, SIAM Reviews, 22(3), 1980) present an analysis of\n    // various algorithms for solving separable non-linear least\n    // squares problems and refer to \"Variable Projection\" as\n    // Algorithm I in their paper.\n    //\n    // Implementing Variable Projection is tedious and expensive, and\n    // they present a simpler algorithm, which they refer to as\n    // Algorithm II, where once the Newton/Trust Region step has been\n    // computed for the whole problem (a_1, a_2, b_1, b_2, c_1) and\n    // additional optimization step is performed to estimate a_1 and\n    // a_2 exactly.\n    //\n    // This idea can be generalized to cases where the residual is not\n    // linear in a_1 and a_2, i.e., Solve for the trust region step\n    // for the full problem, and then use it as the starting point to\n    // further optimize just a_1 and a_2. For the linear case, this\n    // amounts to doing a single linear least squares solve. For\n    // non-linear problems, any method for solving the a_1 and a_2\n    // optimization problems will do. The only constraint on a_1 and\n    // a_2 is that they do not co-occur in any residual block.\n    //\n    // This idea can be further generalized, by not just optimizing\n    // (a_1, a_2), but decomposing the graph corresponding to the\n    // Hessian matrix's sparsity structure in a collection of\n    // non-overlapping independent sets and optimizing each of them.\n    //\n    // Setting \"use_inner_iterations\" to true enables the use of this\n    // non-linear generalization of Ruhe & Wedin's Algorithm II.  This\n    // version of Ceres has a higher iteration complexity, but also\n    // displays better convergence behaviour per iteration. Setting\n    // Solver::Options::num_threads to the maximum number possible is\n    // highly recommended.\n    bool use_inner_iterations = false;\n\n    // If inner_iterations is true, then the user has two choices.\n    //\n    // 1. Let the solver heuristically decide which parameter blocks\n    //    to optimize in each inner iteration. To do this leave\n    //    Solver::Options::inner_iteration_ordering untouched.\n    //\n    // 2. Specify a collection of of ordered independent sets. Where\n    //    the lower numbered groups are optimized before the higher\n    //    number groups. Each group must be an independent set. Not\n    //    all parameter blocks need to be present in the ordering.\n    std::shared_ptr<ParameterBlockOrdering> inner_iteration_ordering;\n\n    // Generally speaking, inner iterations make significant progress\n    // in the early stages of the solve and then their contribution\n    // drops down sharply, at which point the time spent doing inner\n    // iterations is not worth it.\n    //\n    // Once the relative decrease in the objective function due to\n    // inner iterations drops below inner_iteration_tolerance, the use\n    // of inner iterations in subsequent trust region minimizer\n    // iterations is disabled.\n    double inner_iteration_tolerance = 1e-3;\n\n    // Minimum number of iterations for which the linear solver should\n    // run, even if the convergence criterion is satisfied.\n    int min_linear_solver_iterations = 0;\n\n    // Maximum number of iterations for which the linear solver should\n    // run. If the solver does not converge in less than\n    // max_linear_solver_iterations, then it returns MAX_ITERATIONS,\n    // as its termination type.\n    int max_linear_solver_iterations = 500;\n\n    // Forcing sequence parameter. The truncated Newton solver uses\n    // this number to control the relative accuracy with which the\n    // Newton step is computed.\n    //\n    // This constant is passed to ConjugateGradientsSolver which uses\n    // it to terminate the iterations when\n    //\n    //  (Q_i - Q_{i-1})/Q_i < eta/i\n    double eta = 1e-1;\n\n    // Normalize the jacobian using Jacobi scaling before calling\n    // the linear least squares solver.\n    bool jacobi_scaling = true;\n\n    // Logging options ---------------------------------------------------------\n\n    LoggingType logging_type = PER_MINIMIZER_ITERATION;\n\n    // By default the Minimizer progress is logged to VLOG(1), which\n    // is sent to STDERR depending on the vlog level. If this flag is\n    // set to true, and logging_type is not SILENT, the logging output\n    // is sent to STDOUT.\n    bool minimizer_progress_to_stdout = false;\n\n    // List of iterations at which the minimizer should dump the trust\n    // region problem. Useful for testing and benchmarking. If empty\n    // (default), no problems are dumped.\n    std::vector<int> trust_region_minimizer_iterations_to_dump;\n\n    // Directory to which the problems should be written to. Should be\n    // non-empty if trust_region_minimizer_iterations_to_dump is\n    // non-empty and trust_region_problem_dump_format_type is not\n    // CONSOLE.\n    std::string trust_region_problem_dump_directory = \"/tmp\";\n    DumpFormatType trust_region_problem_dump_format_type = TEXTFILE;\n\n    // Finite differences options ----------------------------------------------\n\n    // Check all jacobians computed by each residual block with finite\n    // differences. This is expensive since it involves computing the\n    // derivative by normal means (e.g. user specified, autodiff,\n    // etc), then also computing it using finite differences. The\n    // results are compared, and if they differ substantially, details\n    // are printed to the log.\n    bool check_gradients = false;\n\n    // Relative precision to check for in the gradient checker. If the\n    // relative difference between an element in a jacobian exceeds\n    // this number, then the jacobian for that cost term is dumped.\n    double gradient_check_relative_precision = 1e-8;\n\n    // WARNING: This option only applies to the to the numeric\n    // differentiation used for checking the user provided derivatives\n    // when when Solver::Options::check_gradients is true. If you are\n    // using NumericDiffCostFunction and are interested in changing\n    // the step size for numeric differentiation in your cost\n    // function, please have a look at\n    // include/ceres/numeric_diff_options.h.\n    //\n    // Relative shift used for taking numeric derivatives when\n    // Solver::Options::check_gradients is true.\n    //\n    // For finite differencing, each dimension is evaluated at\n    // slightly shifted values; for the case of central difference,\n    // this is what gets evaluated:\n    //\n    //   delta = gradient_check_numeric_derivative_relative_step_size;\n    //   f_initial  = f(x)\n    //   f_forward  = f((1 + delta) * x)\n    //   f_backward = f((1 - delta) * x)\n    //\n    // The finite differencing is done along each dimension. The\n    // reason to use a relative (rather than absolute) step size is\n    // that this way, numeric differentiation works for functions where\n    // the arguments are typically large (e.g. 1e9) and when the\n    // values are small (e.g. 1e-5). It is possible to construct\n    // \"torture cases\" which break this finite difference heuristic,\n    // but they do not come up often in practice.\n    //\n    // TODO(keir): Pick a smarter number than the default above! In\n    // theory a good choice is sqrt(eps) * x, which for doubles means\n    // about 1e-8 * x. However, I have found this number too\n    // optimistic. This number should be exposed for users to change.\n    double gradient_check_numeric_derivative_relative_step_size = 1e-6;\n\n    // If update_state_every_iteration is true, then Ceres Solver will\n    // guarantee that at the end of every iteration and before any\n    // user provided IterationCallback is called, the parameter blocks\n    // are updated to the current best solution found by the\n    // solver. Thus the IterationCallback can inspect the values of\n    // the parameter blocks for purposes of computation, visualization\n    // or termination.\n\n    // If update_state_every_iteration is false then there is no such\n    // guarantee, and user provided IterationCallbacks should not\n    // expect to look at the parameter blocks and interpret their\n    // values.\n    bool update_state_every_iteration = false;\n\n    // Callbacks that are executed at the end of each iteration of the\n    // Minimizer. An iteration may terminate midway, either due to\n    // numerical failures or because one of the convergence tests has\n    // been satisfied. In this case none of the callbacks are\n    // executed.\n\n    // Callbacks are executed in the order that they are specified in\n    // this vector. By default, parameter blocks are updated only at the\n    // end of the optimization, i.e when the Minimizer terminates. This\n    // behaviour is controlled by update_state_every_iteration. If the\n    // user wishes to have access to the updated parameter blocks when\n    // his/her callbacks are executed, then set\n    // update_state_every_iteration to true.\n    //\n    // The solver does NOT take ownership of these pointers.\n    std::vector<IterationCallback*> callbacks;\n  };\n\n  struct CERES_EXPORT Summary {\n    // A brief one line description of the state of the solver after\n    // termination.\n    std::string BriefReport() const;\n\n    // A full multiline description of the state of the solver after\n    // termination.\n    std::string FullReport() const;\n\n    bool IsSolutionUsable() const;\n\n    // Minimizer summary -------------------------------------------------\n    MinimizerType minimizer_type = TRUST_REGION;\n\n    TerminationType termination_type = FAILURE;\n\n    // Reason why the solver terminated.\n    std::string message = \"ceres::Solve was not called.\";\n\n    // Cost of the problem (value of the objective function) before\n    // the optimization.\n    double initial_cost = -1.0;\n\n    // Cost of the problem (value of the objective function) after the\n    // optimization.\n    double final_cost = -1.0;\n\n    // The part of the total cost that comes from residual blocks that\n    // were held fixed by the preprocessor because all the parameter\n    // blocks that they depend on were fixed.\n    double fixed_cost = -1.0;\n\n    // IterationSummary for each minimizer iteration in order.\n    std::vector<IterationSummary> iterations;\n\n    // Number of minimizer iterations in which the step was\n    // accepted. Unless use_non_monotonic_steps is true this is also\n    // the number of steps in which the objective function value/cost\n    // went down.\n    int num_successful_steps = -1.0;\n\n    // Number of minimizer iterations in which the step was rejected\n    // either because it did not reduce the cost enough or the step\n    // was not numerically valid.\n    int num_unsuccessful_steps = -1.0;\n\n    // Number of times inner iterations were performed.\n    int num_inner_iteration_steps = -1.0;\n\n    // Total number of iterations inside the line search algorithm\n    // across all invocations. We call these iterations \"steps\" to\n    // distinguish them from the outer iterations of the line search\n    // and trust region minimizer algorithms which call the line\n    // search algorithm as a subroutine.\n    int num_line_search_steps = -1.0;\n\n    // All times reported below are wall times.\n\n    // When the user calls Solve, before the actual optimization\n    // occurs, Ceres performs a number of preprocessing steps. These\n    // include error checks, memory allocations, and reorderings. This\n    // time is accounted for as preprocessing time.\n    double preprocessor_time_in_seconds = -1.0;\n\n    // Time spent in the TrustRegionMinimizer.\n    double minimizer_time_in_seconds = -1.0;\n\n    // After the Minimizer is finished, some time is spent in\n    // re-evaluating residuals etc. This time is accounted for in the\n    // postprocessor time.\n    double postprocessor_time_in_seconds = -1.0;\n\n    // Some total of all time spent inside Ceres when Solve is called.\n    double total_time_in_seconds = -1.0;\n\n    // Time (in seconds) spent in the linear solver computing the\n    // trust region step.\n    double linear_solver_time_in_seconds = -1.0;\n\n    // Number of times the Newton step was computed by solving a\n    // linear system. This does not include linear solves used by\n    // inner iterations.\n    int num_linear_solves = -1;\n\n    // Time (in seconds) spent evaluating the residual vector.\n    double residual_evaluation_time_in_seconds = 1.0;\n\n    // Number of residual only evaluations.\n    int num_residual_evaluations = -1;\n\n    // Time (in seconds) spent evaluating the jacobian matrix.\n    double jacobian_evaluation_time_in_seconds = -1.0;\n\n    // Number of Jacobian (and residual) evaluations.\n    int num_jacobian_evaluations = -1;\n\n    // Time (in seconds) spent doing inner iterations.\n    double inner_iteration_time_in_seconds = -1.0;\n\n    // Cumulative timing information for line searches performed as part of the\n    // solve.  Note that in addition to the case when the Line Search minimizer\n    // is used, the Trust Region minimizer also uses a line search when\n    // solving a constrained problem.\n\n    // Time (in seconds) spent evaluating the univariate cost function as part\n    // of a line search.\n    double line_search_cost_evaluation_time_in_seconds = -1.0;\n\n    // Time (in seconds) spent evaluating the gradient of the univariate cost\n    // function as part of a line search.\n    double line_search_gradient_evaluation_time_in_seconds = -1.0;\n\n    // Time (in seconds) spent minimizing the interpolating polynomial\n    // to compute the next candidate step size as part of a line search.\n    double line_search_polynomial_minimization_time_in_seconds = -1.0;\n\n    // Total time (in seconds) spent performing line searches.\n    double line_search_total_time_in_seconds = -1.0;\n\n    // Number of parameter blocks in the problem.\n    int num_parameter_blocks = -1;\n\n    // Number of parameters in the problem.\n    int num_parameters = -1;\n\n    // Dimension of the tangent space of the problem (or the number of\n    // columns in the Jacobian for the problem). This is different\n    // from num_parameters if a parameter block is associated with a\n    // LocalParameterization\n    int num_effective_parameters = -1;\n\n    // Number of residual blocks in the problem.\n    int num_residual_blocks = -1;\n\n    // Number of residuals in the problem.\n    int num_residuals = -1;\n\n    // Number of parameter blocks in the problem after the inactive\n    // and constant parameter blocks have been removed. A parameter\n    // block is inactive if no residual block refers to it.\n    int num_parameter_blocks_reduced = -1;\n\n    // Number of parameters in the reduced problem.\n    int num_parameters_reduced = -1;\n\n    // Dimension of the tangent space of the reduced problem (or the\n    // number of columns in the Jacobian for the reduced\n    // problem). This is different from num_parameters_reduced if a\n    // parameter block in the reduced problem is associated with a\n    // LocalParameterization.\n    int num_effective_parameters_reduced = -1;\n\n    // Number of residual blocks in the reduced problem.\n    int num_residual_blocks_reduced = -1;\n\n    //  Number of residuals in the reduced problem.\n    int num_residuals_reduced = -1;\n\n    // Is the reduced problem bounds constrained.\n    bool is_constrained = false;\n\n    //  Number of threads specified by the user for Jacobian and\n    //  residual evaluation.\n    int num_threads_given = -1;\n\n    // Number of threads actually used by the solver for Jacobian and\n    // residual evaluation. This number is not equal to\n    // num_threads_given if OpenMP is not available.\n    int num_threads_used = -1;\n\n    // Type of the linear solver requested by the user.\n    LinearSolverType linear_solver_type_given =\n#if defined(CERES_NO_SPARSE)\n        DENSE_QR;\n#else\n        SPARSE_NORMAL_CHOLESKY;\n#endif\n    // Type of the linear solver actually used. This may be different\n    // from linear_solver_type_given if Ceres determines that the\n    // problem structure is not compatible with the linear solver\n    // requested or if the linear solver requested by the user is not\n    // available, e.g. The user requested SPARSE_NORMAL_CHOLESKY but\n    // no sparse linear algebra library was available.\n    LinearSolverType linear_solver_type_used =\n#if defined(CERES_NO_SPARSE)\n        DENSE_QR;\n#else\n        SPARSE_NORMAL_CHOLESKY;\n#endif\n\n    // Size of the elimination groups given by the user as hints to\n    // the linear solver.\n    std::vector<int> linear_solver_ordering_given;\n\n    // Size of the parameter groups used by the solver when ordering\n    // the columns of the Jacobian.  This maybe different from\n    // linear_solver_ordering_given if the user left\n    // linear_solver_ordering_given blank and asked for an automatic\n    // ordering, or if the problem contains some constant or inactive\n    // parameter blocks.\n    std::vector<int> linear_solver_ordering_used;\n\n    // For Schur type linear solvers, this string describes the\n    // template specialization which was detected in the problem and\n    // should be used.\n    std::string schur_structure_given;\n\n    // This is the Schur template specialization that was actually\n    // instantiated and used. The reason this will be different from\n    // schur_structure_given is because the corresponding template\n    // specialization does not exist.\n    //\n    // Template specializations can be added to ceres by editing\n    // internal/ceres/generate_template_specializations.py\n    std::string schur_structure_used;\n\n    // True if the user asked for inner iterations to be used as part\n    // of the optimization.\n    bool inner_iterations_given = false;\n\n    // True if the user asked for inner iterations to be used as part\n    // of the optimization and the problem structure was such that\n    // they were actually performed. e.g., in a problem with just one\n    // parameter block, inner iterations are not performed.\n    bool inner_iterations_used = false;\n\n    // Size of the parameter groups given by the user for performing\n    // inner iterations.\n    std::vector<int> inner_iteration_ordering_given;\n\n    // Size of the parameter groups given used by the solver for\n    // performing inner iterations. This maybe different from\n    // inner_iteration_ordering_given if the user left\n    // inner_iteration_ordering_given blank and asked for an automatic\n    // ordering, or if the problem contains some constant or inactive\n    // parameter blocks.\n    std::vector<int> inner_iteration_ordering_used;\n\n    // Type of the preconditioner requested by the user.\n    PreconditionerType preconditioner_type_given = IDENTITY;\n\n    // Type of the preconditioner actually used. This may be different\n    // from linear_solver_type_given if Ceres determines that the\n    // problem structure is not compatible with the linear solver\n    // requested or if the linear solver requested by the user is not\n    // available.\n    PreconditionerType preconditioner_type_used = IDENTITY;\n\n    // Type of clustering algorithm used for visibility based\n    // preconditioning. Only meaningful when the preconditioner_type\n    // is CLUSTER_JACOBI or CLUSTER_TRIDIAGONAL.\n    VisibilityClusteringType visibility_clustering_type = CANONICAL_VIEWS;\n\n    //  Type of trust region strategy.\n    TrustRegionStrategyType trust_region_strategy_type = LEVENBERG_MARQUARDT;\n\n    //  Type of dogleg strategy used for solving the trust region\n    //  problem.\n    DoglegType dogleg_type = TRADITIONAL_DOGLEG;\n\n    //  Type of the dense linear algebra library used.\n    DenseLinearAlgebraLibraryType dense_linear_algebra_library_type = EIGEN;\n\n    // Type of the sparse linear algebra library used.\n    SparseLinearAlgebraLibraryType sparse_linear_algebra_library_type =\n        NO_SPARSE;\n\n    // Type of line search direction used.\n    LineSearchDirectionType line_search_direction_type = LBFGS;\n\n    // Type of the line search algorithm used.\n    LineSearchType line_search_type = WOLFE;\n\n    //  When performing line search, the degree of the polynomial used\n    //  to approximate the objective function.\n    LineSearchInterpolationType line_search_interpolation_type = CUBIC;\n\n    // If the line search direction is NONLINEAR_CONJUGATE_GRADIENT,\n    // then this indicates the particular variant of non-linear\n    // conjugate gradient used.\n    NonlinearConjugateGradientType nonlinear_conjugate_gradient_type =\n        FLETCHER_REEVES;\n\n    // If the type of the line search direction is LBFGS, then this\n    // indicates the rank of the Hessian approximation.\n    int max_lbfgs_rank = -1;\n  };\n\n  // Once a least squares problem has been built, this function takes\n  // the problem and optimizes it based on the values of the options\n  // parameters. Upon return, a detailed summary of the work performed\n  // by the preprocessor, the non-linear minimizer and the linear\n  // solver are reported in the summary object.\n  virtual void Solve(const Options& options,\n                     Problem* problem,\n                     Solver::Summary* summary);\n};\n\n// Helper function which avoids going through the interface.\nCERES_EXPORT void Solve(const Solver::Options& options,\n                        Problem* problem,\n                        Solver::Summary* summary);\n\n}  // namespace ceres\n\n#include \"ceres/internal/reenable_warnings.h\"\n\n#endif  // CERES_PUBLIC_SOLVER_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/tiny_solver.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: mierle@gmail.com (Keir Mierle)\n//\n// WARNING WARNING WARNING\n// WARNING WARNING WARNING  Tiny solver is experimental and will change.\n// WARNING WARNING WARNING\n//\n// A tiny least squares solver using Levenberg-Marquardt, intended for solving\n// small dense problems with low latency and low overhead. The implementation\n// takes care to do all allocation up front, so that no memory is allocated\n// during solving. This is especially useful when solving many similar problems;\n// for example, inverse pixel distortion for every pixel on a grid.\n//\n// Note: This code has no dependencies beyond Eigen, including on other parts of\n// Ceres, so it is possible to take this file alone and put it in another\n// project without the rest of Ceres.\n//\n// Algorithm based off of:\n//\n// [1] K. Madsen, H. Nielsen, O. Tingleoff.\n//     Methods for Non-linear Least Squares Problems.\n//     http://www2.imm.dtu.dk/pubdb/views/edoc_download.php/3215/pdf/imm3215.pdf\n\n#ifndef CERES_PUBLIC_TINY_SOLVER_H_\n#define CERES_PUBLIC_TINY_SOLVER_H_\n\n#include <cassert>\n#include <cmath>\n\n#include \"Eigen/Dense\"\n\nnamespace ceres {\n\n// To use tiny solver, create a class or struct that allows computing the cost\n// function (described below). This is similar to a ceres::CostFunction, but is\n// different to enable statically allocating all memory for the solver\n// (specifically, enum sizes). Key parts are the Scalar typedef, the enums to\n// describe problem sizes (needed to remove all heap allocations), and the\n// operator() overload to evaluate the cost and (optionally) jacobians.\n//\n//   struct TinySolverCostFunctionTraits {\n//     typedef double Scalar;\n//     enum {\n//       NUM_RESIDUALS = <int> OR Eigen::Dynamic,\n//       NUM_PARAMETERS = <int> OR Eigen::Dynamic,\n//     };\n//     bool operator()(const double* parameters,\n//                     double* residuals,\n//                     double* jacobian) const;\n//\n//     int NumResiduals() const;  -- Needed if NUM_RESIDUALS == Eigen::Dynamic.\n//     int NumParameters() const; -- Needed if NUM_PARAMETERS == Eigen::Dynamic.\n//   };\n//\n// For operator(), the size of the objects is:\n//\n//   double* parameters -- NUM_PARAMETERS or NumParameters()\n//   double* residuals  -- NUM_RESIDUALS or NumResiduals()\n//   double* jacobian   -- NUM_RESIDUALS * NUM_PARAMETERS in column-major format\n//                         (Eigen's default); or NULL if no jacobian requested.\n//\n// An example (fully statically sized):\n//\n//   struct MyCostFunctionExample {\n//     typedef double Scalar;\n//     enum {\n//       NUM_RESIDUALS = 2,\n//       NUM_PARAMETERS = 3,\n//     };\n//     bool operator()(const double* parameters,\n//                     double* residuals,\n//                     double* jacobian) const {\n//       residuals[0] = x + 2*y + 4*z;\n//       residuals[1] = y * z;\n//       if (jacobian) {\n//         jacobian[0 * 2 + 0] = 1;   // First column (x).\n//         jacobian[0 * 2 + 1] = 0;\n//\n//         jacobian[1 * 2 + 0] = 2;   // Second column (y).\n//         jacobian[1 * 2 + 1] = z;\n//\n//         jacobian[2 * 2 + 0] = 4;   // Third column (z).\n//         jacobian[2 * 2 + 1] = y;\n//       }\n//       return true;\n//     }\n//   };\n//\n// The solver supports either statically or dynamically sized cost\n// functions. If the number of residuals is dynamic then the Function\n// must define:\n//\n//   int NumResiduals() const;\n//\n// If the number of parameters is dynamic then the Function must\n// define:\n//\n//   int NumParameters() const;\n//\ntemplate <typename Function,\n          typename LinearSolver =\n              Eigen::LDLT<Eigen::Matrix<typename Function::Scalar,\n                                        Function::NUM_PARAMETERS,\n                                        Function::NUM_PARAMETERS>>>\nclass TinySolver {\n public:\n  // This class needs to have an Eigen aligned operator new as it contains\n  // fixed-size Eigen types.\n  EIGEN_MAKE_ALIGNED_OPERATOR_NEW\n\n  enum {\n    NUM_RESIDUALS = Function::NUM_RESIDUALS,\n    NUM_PARAMETERS = Function::NUM_PARAMETERS\n  };\n  typedef typename Function::Scalar Scalar;\n  typedef typename Eigen::Matrix<Scalar, NUM_PARAMETERS, 1> Parameters;\n\n  enum Status {\n    GRADIENT_TOO_SMALL,            // eps > max(J'*f(x))\n    RELATIVE_STEP_SIZE_TOO_SMALL,  // eps > ||dx|| / (||x|| + eps)\n    COST_TOO_SMALL,                // eps > ||f(x)||^2 / 2\n    HIT_MAX_ITERATIONS,\n\n    // TODO(sameeragarwal): Deal with numerical failures.\n  };\n\n  struct Options {\n    Scalar gradient_tolerance = 1e-10;  // eps > max(J'*f(x))\n    Scalar parameter_tolerance = 1e-8;  // eps > ||dx|| / ||x||\n    Scalar cost_threshold =             // eps > ||f(x)||\n        std::numeric_limits<Scalar>::epsilon();\n    Scalar initial_trust_region_radius = 1e4;\n    int max_num_iterations = 50;\n  };\n\n  struct Summary {\n    Scalar initial_cost = -1;       // 1/2 ||f(x)||^2\n    Scalar final_cost = -1;         // 1/2 ||f(x)||^2\n    Scalar gradient_max_norm = -1;  // max(J'f(x))\n    int iterations = -1;\n    Status status = HIT_MAX_ITERATIONS;\n  };\n\n  bool Update(const Function& function, const Parameters& x) {\n    if (!function(x.data(), error_.data(), jacobian_.data())) {\n      return false;\n    }\n\n    error_ = -error_;\n\n    // On the first iteration, compute a diagonal (Jacobi) scaling\n    // matrix, which we store as a vector.\n    if (summary.iterations == 0) {\n      // jacobi_scaling = 1 / (1 + diagonal(J'J))\n      //\n      // 1 is added to the denominator to regularize small diagonal\n      // entries.\n      jacobi_scaling_ = 1.0 / (1.0 + jacobian_.colwise().norm().array());\n    }\n\n    // This explicitly computes the normal equations, which is numerically\n    // unstable. Nevertheless, it is often good enough and is fast.\n    //\n    // TODO(sameeragarwal): Refactor this to allow for DenseQR\n    // factorization.\n    jacobian_ = jacobian_ * jacobi_scaling_.asDiagonal();\n    jtj_ = jacobian_.transpose() * jacobian_;\n    g_ = jacobian_.transpose() * error_;\n    summary.gradient_max_norm = g_.array().abs().maxCoeff();\n    cost_ = error_.squaredNorm() / 2;\n    return true;\n  }\n\n  const Summary& Solve(const Function& function, Parameters* x_and_min) {\n    Initialize<NUM_RESIDUALS, NUM_PARAMETERS>(function);\n    assert(x_and_min);\n    Parameters& x = *x_and_min;\n    summary = Summary();\n    summary.iterations = 0;\n\n    // TODO(sameeragarwal): Deal with failure here.\n    Update(function, x);\n    summary.initial_cost = cost_;\n    summary.final_cost = cost_;\n\n    if (summary.gradient_max_norm < options.gradient_tolerance) {\n      summary.status = GRADIENT_TOO_SMALL;\n      return summary;\n    }\n\n    if (cost_ < options.cost_threshold) {\n      summary.status = COST_TOO_SMALL;\n      return summary;\n    }\n\n    Scalar u = 1.0 / options.initial_trust_region_radius;\n    Scalar v = 2;\n\n    for (summary.iterations = 1;\n         summary.iterations < options.max_num_iterations;\n         summary.iterations++) {\n      jtj_regularized_ = jtj_;\n      const Scalar min_diagonal = 1e-6;\n      const Scalar max_diagonal = 1e32;\n      for (int i = 0; i < lm_diagonal_.rows(); ++i) {\n        lm_diagonal_[i] = std::sqrt(\n            u * std::min(std::max(jtj_(i, i), min_diagonal), max_diagonal));\n        jtj_regularized_(i, i) += lm_diagonal_[i] * lm_diagonal_[i];\n      }\n\n      // TODO(sameeragarwal): Check for failure and deal with it.\n      linear_solver_.compute(jtj_regularized_);\n      lm_step_ = linear_solver_.solve(g_);\n      dx_ = jacobi_scaling_.asDiagonal() * lm_step_;\n\n      // Adding parameter_tolerance to x.norm() ensures that this\n      // works if x is near zero.\n      const Scalar parameter_tolerance =\n          options.parameter_tolerance *\n          (x.norm() + options.parameter_tolerance);\n      if (dx_.norm() < parameter_tolerance) {\n        summary.status = RELATIVE_STEP_SIZE_TOO_SMALL;\n        break;\n      }\n      x_new_ = x + dx_;\n\n      // TODO(keir): Add proper handling of errors from user eval of cost\n      // functions.\n      function(&x_new_[0], &f_x_new_[0], NULL);\n\n      const Scalar cost_change = (2 * cost_ - f_x_new_.squaredNorm());\n\n      // TODO(sameeragarwal): Better more numerically stable evaluation.\n      const Scalar model_cost_change = lm_step_.dot(2 * g_ - jtj_ * lm_step_);\n\n      // rho is the ratio of the actual reduction in error to the reduction\n      // in error that would be obtained if the problem was linear. See [1]\n      // for details.\n      Scalar rho(cost_change / model_cost_change);\n      if (rho > 0) {\n        // Accept the Levenberg-Marquardt step because the linear\n        // model fits well.\n        x = x_new_;\n\n        // TODO(sameeragarwal): Deal with failure.\n        Update(function, x);\n        if (summary.gradient_max_norm < options.gradient_tolerance) {\n          summary.status = GRADIENT_TOO_SMALL;\n          break;\n        }\n\n        if (cost_ < options.cost_threshold) {\n          summary.status = COST_TOO_SMALL;\n          break;\n        }\n\n        Scalar tmp = Scalar(2 * rho - 1);\n        u = u * std::max(1 / 3., 1 - tmp * tmp * tmp);\n        v = 2;\n        continue;\n      }\n\n      // Reject the update because either the normal equations failed to solve\n      // or the local linear model was not good (rho < 0). Instead, increase u\n      // to move closer to gradient descent.\n      u *= v;\n      v *= 2;\n    }\n\n    summary.final_cost = cost_;\n    return summary;\n  }\n\n  Options options;\n  Summary summary;\n\n private:\n  // Preallocate everything, including temporary storage needed for solving the\n  // linear system. This allows reusing the intermediate storage across solves.\n  LinearSolver linear_solver_;\n  Scalar cost_;\n  Parameters dx_, x_new_, g_, jacobi_scaling_, lm_diagonal_, lm_step_;\n  Eigen::Matrix<Scalar, NUM_RESIDUALS, 1> error_, f_x_new_;\n  Eigen::Matrix<Scalar, NUM_RESIDUALS, NUM_PARAMETERS> jacobian_;\n  Eigen::Matrix<Scalar, NUM_PARAMETERS, NUM_PARAMETERS> jtj_, jtj_regularized_;\n\n  // The following definitions are needed for template metaprogramming.\n  template <bool Condition, typename T>\n  struct enable_if;\n\n  template <typename T>\n  struct enable_if<true, T> {\n    typedef T type;\n  };\n\n  // The number of parameters and residuals are dynamically sized.\n  template <int R, int P>\n  typename enable_if<(R == Eigen::Dynamic && P == Eigen::Dynamic), void>::type\n  Initialize(const Function& function) {\n    Initialize(function.NumResiduals(), function.NumParameters());\n  }\n\n  // The number of parameters is dynamically sized and the number of\n  // residuals is statically sized.\n  template <int R, int P>\n  typename enable_if<(R == Eigen::Dynamic && P != Eigen::Dynamic), void>::type\n  Initialize(const Function& function) {\n    Initialize(function.NumResiduals(), P);\n  }\n\n  // The number of parameters is statically sized and the number of\n  // residuals is dynamically sized.\n  template <int R, int P>\n  typename enable_if<(R != Eigen::Dynamic && P == Eigen::Dynamic), void>::type\n  Initialize(const Function& function) {\n    Initialize(R, function.NumParameters());\n  }\n\n  // The number of parameters and residuals are statically sized.\n  template <int R, int P>\n  typename enable_if<(R != Eigen::Dynamic && P != Eigen::Dynamic), void>::type\n  Initialize(const Function& /* function */) {}\n\n  void Initialize(int num_residuals, int num_parameters) {\n    dx_.resize(num_parameters);\n    x_new_.resize(num_parameters);\n    g_.resize(num_parameters);\n    jacobi_scaling_.resize(num_parameters);\n    lm_diagonal_.resize(num_parameters);\n    lm_step_.resize(num_parameters);\n    error_.resize(num_residuals);\n    f_x_new_.resize(num_residuals);\n    jacobian_.resize(num_residuals, num_parameters);\n    jtj_.resize(num_parameters, num_parameters);\n    jtj_regularized_.resize(num_parameters, num_parameters);\n  }\n};\n\n}  // namespace ceres\n\n#endif  // CERES_PUBLIC_TINY_SOLVER_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/tiny_solver_autodiff_function.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: mierle@gmail.com (Keir Mierle)\n//\n// WARNING WARNING WARNING\n// WARNING WARNING WARNING  Tiny solver is experimental and will change.\n// WARNING WARNING WARNING\n\n#ifndef CERES_PUBLIC_TINY_SOLVER_AUTODIFF_FUNCTION_H_\n#define CERES_PUBLIC_TINY_SOLVER_AUTODIFF_FUNCTION_H_\n\n#include <memory>\n#include <type_traits>\n\n#include \"Eigen/Core\"\n#include \"ceres/jet.h\"\n#include \"ceres/types.h\"  // For kImpossibleValue.\n\nnamespace ceres {\n\n// An adapter around autodiff-style CostFunctors to enable easier use of\n// TinySolver. See the example below showing how to use it:\n//\n//   // Example for cost functor with static residual size.\n//   // Same as an autodiff cost functor, but taking only 1 parameter.\n//   struct MyFunctor {\n//     template<typename T>\n//     bool operator()(const T* const parameters, T* residuals) const {\n//       const T& x = parameters[0];\n//       const T& y = parameters[1];\n//       const T& z = parameters[2];\n//       residuals[0] = x + 2.*y + 4.*z;\n//       residuals[1] = y * z;\n//       return true;\n//     }\n//   };\n//\n//   typedef TinySolverAutoDiffFunction<MyFunctor, 2, 3>\n//       AutoDiffFunction;\n//\n//   MyFunctor my_functor;\n//   AutoDiffFunction f(my_functor);\n//\n//   Vec3 x = ...;\n//   TinySolver<AutoDiffFunction> solver;\n//   solver.Solve(f, &x);\n//\n//   // Example for cost functor with dynamic residual size.\n//   // NumResiduals() supplies dynamic size of residuals.\n//   // Same functionality as in tiny_solver.h but with autodiff.\n//   struct MyFunctorWithDynamicResiduals {\n//     int NumResiduals() const {\n//       return 2;\n//     }\n//\n//     template<typename T>\n//     bool operator()(const T* const parameters, T* residuals) const {\n//       const T& x = parameters[0];\n//       const T& y = parameters[1];\n//       const T& z = parameters[2];\n//       residuals[0] = x + static_cast<T>(2.)*y + static_cast<T>(4.)*z;\n//       residuals[1] = y * z;\n//       return true;\n//     }\n//   };\n//\n//   typedef TinySolverAutoDiffFunction<MyFunctorWithDynamicResiduals,\n//                                      Eigen::Dynamic,\n//                                      3>\n//       AutoDiffFunctionWithDynamicResiduals;\n//\n//   MyFunctorWithDynamicResiduals my_functor_dyn;\n//   AutoDiffFunctionWithDynamicResiduals f(my_functor_dyn);\n//\n//   Vec3 x = ...;\n//   TinySolver<AutoDiffFunctionWithDynamicResiduals> solver;\n//   solver.Solve(f, &x);\n//\n// WARNING: The cost function adapter is not thread safe.\ntemplate <typename CostFunctor,\n          int kNumResiduals,\n          int kNumParameters,\n          typename T = double>\nclass TinySolverAutoDiffFunction {\n public:\n  // This class needs to have an Eigen aligned operator new as it contains\n  // as a member a Jet type, which itself has a fixed-size Eigen type as member.\n  EIGEN_MAKE_ALIGNED_OPERATOR_NEW\n\n  TinySolverAutoDiffFunction(const CostFunctor& cost_functor)\n      : cost_functor_(cost_functor) {\n    Initialize<kNumResiduals>(cost_functor);\n  }\n\n  typedef T Scalar;\n  enum {\n    NUM_PARAMETERS = kNumParameters,\n    NUM_RESIDUALS = kNumResiduals,\n  };\n\n  // This is similar to AutoDifferentiate(), but since there is only one\n  // parameter block it is easier to inline to avoid overhead.\n  bool operator()(const T* parameters, T* residuals, T* jacobian) const {\n    if (jacobian == NULL) {\n      // No jacobian requested, so just directly call the cost function with\n      // doubles, skipping jets and derivatives.\n      return cost_functor_(parameters, residuals);\n    }\n    // Initialize the input jets with passed parameters.\n    for (int i = 0; i < kNumParameters; ++i) {\n      jet_parameters_[i].a = parameters[i];  // Scalar part.\n      jet_parameters_[i].v.setZero();        // Derivative part.\n      jet_parameters_[i].v[i] = T(1.0);\n    }\n\n    // Initialize the output jets such that we can detect user errors.\n    for (int i = 0; i < num_residuals_; ++i) {\n      jet_residuals_[i].a = kImpossibleValue;\n      jet_residuals_[i].v.setConstant(kImpossibleValue);\n    }\n\n    // Execute the cost function, but with jets to find the derivative.\n    if (!cost_functor_(jet_parameters_, jet_residuals_.data())) {\n      return false;\n    }\n\n    // Copy the jacobian out of the derivative part of the residual jets.\n    Eigen::Map<Eigen::Matrix<T, kNumResiduals, kNumParameters>> jacobian_matrix(\n        jacobian, num_residuals_, kNumParameters);\n    for (int r = 0; r < num_residuals_; ++r) {\n      residuals[r] = jet_residuals_[r].a;\n      // Note that while this looks like a fast vectorized write, in practice it\n      // unfortunately thrashes the cache since the writes to the column-major\n      // jacobian are strided (e.g. rows are non-contiguous).\n      jacobian_matrix.row(r) = jet_residuals_[r].v;\n    }\n    return true;\n  }\n\n  int NumResiduals() const {\n    return num_residuals_;  // Set by Initialize.\n  }\n\n private:\n  const CostFunctor& cost_functor_;\n\n  // The number of residuals at runtime.\n  // This will be overriden if NUM_RESIDUALS == Eigen::Dynamic.\n  int num_residuals_ = kNumResiduals;\n\n  // To evaluate the cost function with jets, temporary storage is needed. These\n  // are the buffers that are used during evaluation; parameters for the input,\n  // and jet_residuals_ are where the final cost and derivatives end up.\n  //\n  // Since this buffer is used for evaluation, the adapter is not thread safe.\n  using JetType = Jet<T, kNumParameters>;\n  mutable JetType jet_parameters_[kNumParameters];\n  // Eigen::Matrix serves as static or dynamic container.\n  mutable Eigen::Matrix<JetType, kNumResiduals, 1> jet_residuals_;\n\n  // The number of residuals is dynamically sized and the number of\n  // parameters is statically sized.\n  template <int R>\n  typename std::enable_if<(R == Eigen::Dynamic), void>::type Initialize(\n      const CostFunctor& function) {\n    jet_residuals_.resize(function.NumResiduals());\n    num_residuals_ = function.NumResiduals();\n  }\n\n  // The number of parameters and residuals are statically sized.\n  template <int R>\n  typename std::enable_if<(R != Eigen::Dynamic), void>::type Initialize(\n      const CostFunctor& /* function */) {\n    num_residuals_ = kNumResiduals;\n  }\n};\n\n}  // namespace ceres\n\n#endif  // CERES_PUBLIC_TINY_SOLVER_AUTODIFF_FUNCTION_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/tiny_solver_cost_function_adapter.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_PUBLIC_TINY_SOLVER_COST_FUNCTION_ADAPTER_H_\n#define CERES_PUBLIC_TINY_SOLVER_COST_FUNCTION_ADAPTER_H_\n\n#include \"Eigen/Core\"\n#include \"ceres/cost_function.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\n\n// An adapter class that lets users of TinySolver use\n// ceres::CostFunction objects that have exactly one parameter block.\n//\n// The adapter allows for the number of residuals and the size of the\n// parameter block to be specified at compile or run-time.\n//\n// WARNING: This object is not thread-safe.\n//\n// Example usage:\n//\n//  CostFunction* cost_function = ...\n//\n// Number of residuals and parameter block size known at compile time:\n//\n//   TinySolverCostFunctionAdapter<kNumResiduals, kNumParameters>\n//   cost_function_adapter(*cost_function);\n//\n// Number of residuals known at compile time and the parameter block\n// size not known at compile time.\n//\n//   TinySolverCostFunctionAdapter<kNumResiduals, Eigen::Dynamic>\n//   cost_function_adapter(*cost_function);\n//\n// Number of residuals not known at compile time and the parameter\n// block size known at compile time.\n//\n//   TinySolverCostFunctionAdapter<Eigen::Dynamic, kParameterBlockSize>\n//   cost_function_adapter(*cost_function);\n//\n// Number of residuals not known at compile time and the parameter\n// block size not known at compile time.\n//\n//   TinySolverCostFunctionAdapter cost_function_adapter(*cost_function);\n//\ntemplate <int kNumResiduals = Eigen::Dynamic,\n          int kNumParameters = Eigen::Dynamic>\nclass TinySolverCostFunctionAdapter {\n public:\n  typedef double Scalar;\n  enum ComponentSizeType {\n    NUM_PARAMETERS = kNumParameters,\n    NUM_RESIDUALS = kNumResiduals\n  };\n\n  // This struct needs to have an Eigen aligned operator new as it contains\n  // fixed-size Eigen types.\n  EIGEN_MAKE_ALIGNED_OPERATOR_NEW\n\n  TinySolverCostFunctionAdapter(const CostFunction& cost_function)\n      : cost_function_(cost_function) {\n    CHECK_EQ(cost_function_.parameter_block_sizes().size(), 1)\n        << \"Only CostFunctions with exactly one parameter blocks are allowed.\";\n\n    const int parameter_block_size = cost_function_.parameter_block_sizes()[0];\n    if (NUM_PARAMETERS == Eigen::Dynamic || NUM_RESIDUALS == Eigen::Dynamic) {\n      if (NUM_RESIDUALS != Eigen::Dynamic) {\n        CHECK_EQ(cost_function_.num_residuals(), NUM_RESIDUALS);\n      }\n      if (NUM_PARAMETERS != Eigen::Dynamic) {\n        CHECK_EQ(parameter_block_size, NUM_PARAMETERS);\n      }\n\n      row_major_jacobian_.resize(cost_function_.num_residuals(),\n                                 parameter_block_size);\n    }\n  }\n\n  bool operator()(const double* parameters,\n                  double* residuals,\n                  double* jacobian) const {\n    if (!jacobian) {\n      return cost_function_.Evaluate(&parameters, residuals, NULL);\n    }\n\n    double* jacobians[1] = {row_major_jacobian_.data()};\n    if (!cost_function_.Evaluate(&parameters, residuals, jacobians)) {\n      return false;\n    }\n\n    // The Function object used by TinySolver takes its Jacobian in a\n    // column-major layout, and the CostFunction objects use row-major\n    // Jacobian matrices. So the following bit of code does the\n    // conversion from row-major Jacobians to column-major Jacobians.\n    Eigen::Map<Eigen::Matrix<double, NUM_RESIDUALS, NUM_PARAMETERS>>\n        col_major_jacobian(jacobian, NumResiduals(), NumParameters());\n    col_major_jacobian = row_major_jacobian_;\n    return true;\n  }\n\n  int NumResiduals() const { return cost_function_.num_residuals(); }\n  int NumParameters() const {\n    return cost_function_.parameter_block_sizes()[0];\n  }\n\n private:\n  const CostFunction& cost_function_;\n  mutable Eigen::Matrix<double, NUM_RESIDUALS, NUM_PARAMETERS, Eigen::RowMajor>\n      row_major_jacobian_;\n};\n\n}  // namespace ceres\n\n#endif  // CERES_PUBLIC_TINY_SOLVER_COST_FUNCTION_ADAPTER_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/types.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Enums and other top level class definitions.\n//\n// Note: internal/types.cc defines stringification routines for some\n// of these enums. Please update those routines if you extend or\n// remove enums from here.\n\n#ifndef CERES_PUBLIC_TYPES_H_\n#define CERES_PUBLIC_TYPES_H_\n\n#include <string>\n\n#include \"ceres/internal/disable_warnings.h\"\n#include \"ceres/internal/port.h\"\n\nnamespace ceres {\n\n// Argument type used in interfaces that can optionally take ownership\n// of a passed in argument. If TAKE_OWNERSHIP is passed, the called\n// object takes ownership of the pointer argument, and will call\n// delete on it upon completion.\nenum Ownership {\n  DO_NOT_TAKE_OWNERSHIP,\n  TAKE_OWNERSHIP\n};\n\n// TODO(keir): Considerably expand the explanations of each solver type.\nenum LinearSolverType {\n  // These solvers are for general rectangular systems formed from the\n  // normal equations A'A x = A'b. They are direct solvers and do not\n  // assume any special problem structure.\n\n  // Solve the normal equations using a dense Cholesky solver; based\n  // on Eigen.\n  DENSE_NORMAL_CHOLESKY,\n\n  // Solve the normal equations using a dense QR solver; based on\n  // Eigen.\n  DENSE_QR,\n\n  // Solve the normal equations using a sparse cholesky solver; requires\n  // SuiteSparse or CXSparse.\n  SPARSE_NORMAL_CHOLESKY,\n\n  // Specialized solvers, specific to problems with a generalized\n  // bi-partitite structure.\n\n  // Solves the reduced linear system using a dense Cholesky solver;\n  // based on Eigen.\n  DENSE_SCHUR,\n\n  // Solves the reduced linear system using a sparse Cholesky solver;\n  // based on CHOLMOD.\n  SPARSE_SCHUR,\n\n  // Solves the reduced linear system using Conjugate Gradients, based\n  // on a new Ceres implementation.  Suitable for large scale\n  // problems.\n  ITERATIVE_SCHUR,\n\n  // Conjugate gradients on the normal equations.\n  CGNR\n};\n\nenum PreconditionerType {\n  // Trivial preconditioner - the identity matrix.\n  IDENTITY,\n\n  // Block diagonal of the Gauss-Newton Hessian.\n  JACOBI,\n\n  // Note: The following three preconditioners can only be used with\n  // the ITERATIVE_SCHUR solver. They are well suited for Structure\n  // from Motion problems.\n\n  // Block diagonal of the Schur complement. This preconditioner may\n  // only be used with the ITERATIVE_SCHUR solver.\n  SCHUR_JACOBI,\n\n  // Visibility clustering based preconditioners.\n  //\n  // The following two preconditioners use the visibility structure of\n  // the scene to determine the sparsity structure of the\n  // preconditioner. This is done using a clustering algorithm. The\n  // available visibility clustering algorithms are described below.\n  CLUSTER_JACOBI,\n  CLUSTER_TRIDIAGONAL,\n\n  // Subset preconditioner is a general purpose preconditioner\n  // linear least squares problems. Given a set of residual blocks,\n  // it uses the corresponding subset of the rows of the Jacobian to\n  // construct a preconditioner.\n  //\n  // Suppose the Jacobian J has been horizontally partitioned as\n  //\n  // J = [P]\n  //     [Q]\n  //\n  // Where, Q is the set of rows corresponding to the residual\n  // blocks in residual_blocks_for_subset_preconditioner.\n  //\n  // The preconditioner is the inverse of the matrix Q'Q.\n  //\n  // Obviously, the efficacy of the preconditioner depends on how\n  // well the matrix Q approximates J'J, or how well the chosen\n  // residual blocks approximate the non-linear least squares\n  // problem.\n  SUBSET,\n};\n\nenum VisibilityClusteringType {\n  // Canonical views algorithm as described in\n  //\n  // \"Scene Summarization for Online Image Collections\", Ian Simon, Noah\n  // Snavely, Steven M. Seitz, ICCV 2007.\n  //\n  // This clustering algorithm can be quite slow, but gives high\n  // quality clusters. The original visibility based clustering paper\n  // used this algorithm.\n  CANONICAL_VIEWS,\n\n  // The classic single linkage algorithm. It is extremely fast as\n  // compared to CANONICAL_VIEWS, but can give slightly poorer\n  // results. For problems with large number of cameras though, this\n  // is generally a pretty good option.\n  //\n  // If you are using SCHUR_JACOBI preconditioner and have SuiteSparse\n  // available, CLUSTER_JACOBI and CLUSTER_TRIDIAGONAL in combination\n  // with the SINGLE_LINKAGE algorithm will generally give better\n  // results.\n  SINGLE_LINKAGE\n};\n\nenum SparseLinearAlgebraLibraryType {\n  // High performance sparse Cholesky factorization and approximate\n  // minimum degree ordering.\n  SUITE_SPARSE,\n\n  // A lightweight replacement for SuiteSparse, which does not require\n  // a LAPACK/BLAS implementation. Consequently, its performance is\n  // also a bit lower than SuiteSparse.\n  CX_SPARSE,\n\n  // Eigen's sparse linear algebra routines. In particular Ceres uses\n  // the Simplicial LDLT routines.\n  EIGEN_SPARSE,\n\n  // Apple's Accelerate framework sparse linear algebra routines.\n  ACCELERATE_SPARSE,\n\n  // No sparse linear solver should be used.  This does not necessarily\n  // imply that Ceres was built without any sparse library, although that\n  // is the likely use case, merely that one should not be used.\n  NO_SPARSE\n};\n\nenum DenseLinearAlgebraLibraryType {\n  EIGEN,\n  LAPACK\n};\n\n// Logging options\n// The options get progressively noisier.\nenum LoggingType {\n  SILENT,\n  PER_MINIMIZER_ITERATION\n};\n\nenum MinimizerType {\n  LINE_SEARCH,\n  TRUST_REGION\n};\n\nenum LineSearchDirectionType {\n  // Negative of the gradient.\n  STEEPEST_DESCENT,\n\n  // A generalization of the Conjugate Gradient method to non-linear\n  // functions. The generalization can be performed in a number of\n  // different ways, resulting in a variety of search directions. The\n  // precise choice of the non-linear conjugate gradient algorithm\n  // used is determined by NonlinerConjuateGradientType.\n  NONLINEAR_CONJUGATE_GRADIENT,\n\n  // BFGS, and it's limited memory approximation L-BFGS, are quasi-Newton\n  // algorithms that approximate the Hessian matrix by iteratively refining\n  // an initial estimate with rank-one updates using the gradient at each\n  // iteration. They are a generalisation of the Secant method and satisfy\n  // the Secant equation.  The Secant equation has an infinium of solutions\n  // in multiple dimensions, as there are N*(N+1)/2 degrees of freedom in a\n  // symmetric matrix but only N conditions are specified by the Secant\n  // equation. The requirement that the Hessian approximation be positive\n  // definite imposes another N additional constraints, but that still leaves\n  // remaining degrees-of-freedom.  (L)BFGS methods uniquely determine the\n  // approximate Hessian by imposing the additional constraints that the\n  // approximation at the next iteration must be the 'closest' to the current\n  // approximation (the nature of how this proximity is measured is actually\n  // the defining difference between a family of quasi-Newton methods including\n  // (L)BFGS & DFP). (L)BFGS is currently regarded as being the best known\n  // general quasi-Newton method.\n  //\n  // The principal difference between BFGS and L-BFGS is that whilst BFGS\n  // maintains a full, dense approximation to the (inverse) Hessian, L-BFGS\n  // maintains only a window of the last M observations of the parameters and\n  // gradients. Using this observation history, the calculation of the next\n  // search direction can be computed without requiring the construction of the\n  // full dense inverse Hessian approximation. This is particularly important\n  // for problems with a large number of parameters, where storage of an N-by-N\n  // matrix in memory would be prohibitive.\n  //\n  // For more details on BFGS see:\n  //\n  // Broyden, C.G., \"The Convergence of a Class of Double-rank Minimization\n  // Algorithms,\"; J. Inst. Maths. Applics., Vol. 6, pp 76-90, 1970.\n  //\n  // Fletcher, R., \"A New Approach to Variable Metric Algorithms,\"\n  // Computer Journal, Vol. 13, pp 317-322, 1970.\n  //\n  // Goldfarb, D., \"A Family of Variable Metric Updates Derived by Variational\n  // Means,\" Mathematics of Computing, Vol. 24, pp 23-26, 1970.\n  //\n  // Shanno, D.F., \"Conditioning of Quasi-Newton Methods for Function\n  // Minimization,\" Mathematics of Computing, Vol. 24, pp 647-656, 1970.\n  //\n  // For more details on L-BFGS see:\n  //\n  // Nocedal, J. (1980). \"Updating Quasi-Newton Matrices with Limited\n  // Storage\". Mathematics of Computation 35 (151): 773-782.\n  //\n  // Byrd, R. H.; Nocedal, J.; Schnabel, R. B. (1994).\n  // \"Representations of Quasi-Newton Matrices and their use in\n  // Limited Memory Methods\". Mathematical Programming 63 (4):\n  // 129-156.\n  //\n  // A general reference for both methods:\n  //\n  // Nocedal J., Wright S., Numerical Optimization, 2nd Ed. Springer, 1999.\n  LBFGS,\n  BFGS,\n};\n\n// Nonlinear conjugate gradient methods are a generalization of the\n// method of Conjugate Gradients for linear systems. The\n// generalization can be carried out in a number of different ways\n// leading to number of different rules for computing the search\n// direction. Ceres provides a number of different variants. For more\n// details see Numerical Optimization by Nocedal & Wright.\nenum NonlinearConjugateGradientType {\n  FLETCHER_REEVES,\n  POLAK_RIBIERE,\n  HESTENES_STIEFEL,\n};\n\nenum LineSearchType {\n  // Backtracking line search with polynomial interpolation or\n  // bisection.\n  ARMIJO,\n  WOLFE,\n};\n\n// Ceres supports different strategies for computing the trust region\n// step.\nenum TrustRegionStrategyType {\n  // The default trust region strategy is to use the step computation\n  // used in the Levenberg-Marquardt algorithm. For more details see\n  // levenberg_marquardt_strategy.h\n  LEVENBERG_MARQUARDT,\n\n  // Powell's dogleg algorithm interpolates between the Cauchy point\n  // and the Gauss-Newton step. It is particularly useful if the\n  // LEVENBERG_MARQUARDT algorithm is making a large number of\n  // unsuccessful steps. For more details see dogleg_strategy.h.\n  //\n  // NOTES:\n  //\n  // 1. This strategy has not been experimented with or tested as\n  // extensively as LEVENBERG_MARQUARDT, and therefore it should be\n  // considered EXPERIMENTAL for now.\n  //\n  // 2. For now this strategy should only be used with exact\n  // factorization based linear solvers, i.e., SPARSE_SCHUR,\n  // DENSE_SCHUR, DENSE_QR and SPARSE_NORMAL_CHOLESKY.\n  DOGLEG\n};\n\n// Ceres supports two different dogleg strategies.\n// The \"traditional\" dogleg method by Powell and the\n// \"subspace\" method described in\n// R. H. Byrd, R. B. Schnabel, and G. A. Shultz,\n// \"Approximate solution of the trust region problem by minimization\n//  over two-dimensional subspaces\", Mathematical Programming,\n// 40 (1988), pp. 247--263\nenum DoglegType {\n  // The traditional approach constructs a dogleg path\n  // consisting of two line segments and finds the furthest\n  // point on that path that is still inside the trust region.\n  TRADITIONAL_DOGLEG,\n\n  // The subspace approach finds the exact minimum of the model\n  // constrained to the subspace spanned by the dogleg path.\n  SUBSPACE_DOGLEG\n};\n\nenum TerminationType {\n  // Minimizer terminated because one of the convergence criterion set\n  // by the user was satisfied.\n  //\n  // 1.  (new_cost - old_cost) < function_tolerance * old_cost;\n  // 2.  max_i |gradient_i| < gradient_tolerance\n  // 3.  |step|_2 <= parameter_tolerance * ( |x|_2 +  parameter_tolerance)\n  //\n  // The user's parameter blocks will be updated with the solution.\n  CONVERGENCE,\n\n  // The solver ran for maximum number of iterations or maximum amount\n  // of time specified by the user, but none of the convergence\n  // criterion specified by the user were met. The user's parameter\n  // blocks will be updated with the solution found so far.\n  NO_CONVERGENCE,\n\n  // The minimizer terminated because of an error.  The user's\n  // parameter blocks will not be updated.\n  FAILURE,\n\n  // Using an IterationCallback object, user code can control the\n  // minimizer. The following enums indicate that the user code was\n  // responsible for termination.\n  //\n  // Minimizer terminated successfully because a user\n  // IterationCallback returned SOLVER_TERMINATE_SUCCESSFULLY.\n  //\n  // The user's parameter blocks will be updated with the solution.\n  USER_SUCCESS,\n\n  // Minimizer terminated because because a user IterationCallback\n  // returned SOLVER_ABORT.\n  //\n  // The user's parameter blocks will not be updated.\n  USER_FAILURE\n};\n\n// Enums used by the IterationCallback instances to indicate to the\n// solver whether it should continue solving, the user detected an\n// error or the solution is good enough and the solver should\n// terminate.\nenum CallbackReturnType {\n  // Continue solving to next iteration.\n  SOLVER_CONTINUE,\n\n  // Terminate solver, and do not update the parameter blocks upon\n  // return. Unless the user has set\n  // Solver:Options:::update_state_every_iteration, in which case the\n  // state would have been updated every iteration\n  // anyways. Solver::Summary::termination_type is set to USER_ABORT.\n  SOLVER_ABORT,\n\n  // Terminate solver, update state and\n  // return. Solver::Summary::termination_type is set to USER_SUCCESS.\n  SOLVER_TERMINATE_SUCCESSFULLY\n};\n\n// The format in which linear least squares problems should be logged\n// when Solver::Options::lsqp_iterations_to_dump is non-empty.\nenum DumpFormatType {\n  // Print the linear least squares problem in a human readable format\n  // to stderr. The Jacobian is printed as a dense matrix. The vectors\n  // D, x and f are printed as dense vectors. This should only be used\n  // for small problems.\n  CONSOLE,\n\n  // Write out the linear least squares problem to the directory\n  // pointed to by Solver::Options::lsqp_dump_directory as text files\n  // which can be read into MATLAB/Octave. The Jacobian is dumped as a\n  // text file containing (i,j,s) triplets, the vectors D, x and f are\n  // dumped as text files containing a list of their values.\n  //\n  // A MATLAB/octave script called lm_iteration_???.m is also output,\n  // which can be used to parse and load the problem into memory.\n  TEXTFILE\n};\n\n// For SizedCostFunction and AutoDiffCostFunction, DYNAMIC can be\n// specified for the number of residuals. If specified, then the\n// number of residuas for that cost function can vary at runtime.\nenum DimensionType {\n  DYNAMIC = -1\n};\n\n// The differentiation method used to compute numerical derivatives in\n// NumericDiffCostFunction and DynamicNumericDiffCostFunction.\nenum NumericDiffMethodType {\n  // Compute central finite difference: f'(x) ~ (f(x+h) - f(x-h)) / 2h.\n  CENTRAL,\n\n  // Compute forward finite difference: f'(x) ~ (f(x+h) - f(x)) / h.\n  FORWARD,\n\n  // Adaptive numerical differentiation using Ridders' method. Provides more\n  // accurate and robust derivatives at the expense of additional cost\n  // function evaluations.\n  RIDDERS\n};\n\nenum LineSearchInterpolationType {\n  BISECTION,\n  QUADRATIC,\n  CUBIC\n};\n\nenum CovarianceAlgorithmType {\n  DENSE_SVD,\n  SPARSE_QR,\n};\n\n// It is a near impossibility that user code generates this exact\n// value in normal operation, thus we will use it to fill arrays\n// before passing them to user code. If on return an element of the\n// array still contains this value, we will assume that the user code\n// did not write to that memory location.\nconst double kImpossibleValue = 1e302;\n\nCERES_EXPORT const char* LinearSolverTypeToString(\n    LinearSolverType type);\nCERES_EXPORT bool StringToLinearSolverType(std::string value,\n                                           LinearSolverType* type);\n\nCERES_EXPORT const char* PreconditionerTypeToString(PreconditionerType type);\nCERES_EXPORT bool StringToPreconditionerType(std::string value,\n                                             PreconditionerType* type);\n\nCERES_EXPORT const char* VisibilityClusteringTypeToString(\n    VisibilityClusteringType type);\nCERES_EXPORT bool StringToVisibilityClusteringType(std::string value,\n                                      VisibilityClusteringType* type);\n\nCERES_EXPORT const char* SparseLinearAlgebraLibraryTypeToString(\n    SparseLinearAlgebraLibraryType type);\nCERES_EXPORT bool StringToSparseLinearAlgebraLibraryType(\n    std::string value,\n    SparseLinearAlgebraLibraryType* type);\n\nCERES_EXPORT const char* DenseLinearAlgebraLibraryTypeToString(\n    DenseLinearAlgebraLibraryType type);\nCERES_EXPORT bool StringToDenseLinearAlgebraLibraryType(\n    std::string value,\n    DenseLinearAlgebraLibraryType* type);\n\nCERES_EXPORT const char* TrustRegionStrategyTypeToString(\n    TrustRegionStrategyType type);\nCERES_EXPORT bool StringToTrustRegionStrategyType(std::string value,\n                                     TrustRegionStrategyType* type);\n\nCERES_EXPORT const char* DoglegTypeToString(DoglegType type);\nCERES_EXPORT bool StringToDoglegType(std::string value, DoglegType* type);\n\nCERES_EXPORT const char* MinimizerTypeToString(MinimizerType type);\nCERES_EXPORT bool StringToMinimizerType(std::string value, MinimizerType* type);\n\nCERES_EXPORT const char* LineSearchDirectionTypeToString(\n    LineSearchDirectionType type);\nCERES_EXPORT bool StringToLineSearchDirectionType(std::string value,\n                                     LineSearchDirectionType* type);\n\nCERES_EXPORT const char* LineSearchTypeToString(LineSearchType type);\nCERES_EXPORT bool StringToLineSearchType(std::string value, LineSearchType* type);\n\nCERES_EXPORT const char* NonlinearConjugateGradientTypeToString(\n    NonlinearConjugateGradientType type);\nCERES_EXPORT bool StringToNonlinearConjugateGradientType(\n    std::string value,\n    NonlinearConjugateGradientType* type);\n\nCERES_EXPORT const char* LineSearchInterpolationTypeToString(\n    LineSearchInterpolationType type);\nCERES_EXPORT bool StringToLineSearchInterpolationType(\n    std::string value,\n    LineSearchInterpolationType* type);\n\nCERES_EXPORT const char* CovarianceAlgorithmTypeToString(\n    CovarianceAlgorithmType type);\nCERES_EXPORT bool StringToCovarianceAlgorithmType(\n    std::string value,\n    CovarianceAlgorithmType* type);\n\nCERES_EXPORT const char* NumericDiffMethodTypeToString(\n    NumericDiffMethodType type);\nCERES_EXPORT bool StringToNumericDiffMethodType(\n    std::string value,\n    NumericDiffMethodType* type);\n\nCERES_EXPORT const char* LoggingTypeToString(LoggingType type);\nCERES_EXPORT bool StringtoLoggingType(std::string value, LoggingType* type);\n\nCERES_EXPORT const char* DumpFormatTypeToString(DumpFormatType type);\nCERES_EXPORT bool StringtoDumpFormatType(std::string value, DumpFormatType* type);\nCERES_EXPORT bool StringtoDumpFormatType(std::string value, LoggingType* type);\n\nCERES_EXPORT const char* TerminationTypeToString(TerminationType type);\n\nCERES_EXPORT bool IsSchurType(LinearSolverType type);\nCERES_EXPORT bool IsSparseLinearAlgebraLibraryTypeAvailable(\n    SparseLinearAlgebraLibraryType type);\nCERES_EXPORT bool IsDenseLinearAlgebraLibraryTypeAvailable(\n    DenseLinearAlgebraLibraryType type);\n\n}  // namespace ceres\n\n#include \"ceres/internal/reenable_warnings.h\"\n\n#endif  // CERES_PUBLIC_TYPES_H_\n"
  },
  {
    "path": "3rdparty/ceres/include/ceres/version.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: mierle@gmail.com (Keir Mierle)\n\n#ifndef CERES_PUBLIC_VERSION_H_\n#define CERES_PUBLIC_VERSION_H_\n\n#define CERES_VERSION_MAJOR 2\n#define CERES_VERSION_MINOR 0\n#define CERES_VERSION_REVISION 0\n\n// Classic CPP stringifcation; the extra level of indirection allows the\n// preprocessor to expand the macro before being converted to a string.\n#define CERES_TO_STRING_HELPER(x) #x\n#define CERES_TO_STRING(x) CERES_TO_STRING_HELPER(x)\n\n// The Ceres version as a string; for example \"1.9.0\".\n#define CERES_VERSION_STRING CERES_TO_STRING(CERES_VERSION_MAJOR) \".\" \\\n                             CERES_TO_STRING(CERES_VERSION_MINOR) \".\" \\\n                             CERES_TO_STRING(CERES_VERSION_REVISION)\n\n#endif  // CERES_PUBLIC_VERSION_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/CMakeLists.txt",
    "content": "# Ceres Solver - A fast non-linear least squares minimizer\n# Copyright 2015 Google Inc. All rights reserved.\n# http://ceres-solver.org/\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice,\n#   this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright notice,\n#   this list of conditions and the following disclaimer in the documentation\n#   and/or other materials provided with the distribution.\n# * Neither the name of Google Inc. nor the names of its contributors may be\n#   used to endorse or promote products derived from this software without\n#   specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n#\n# Author: keir@google.com (Keir Mierle)\n\n# Avoid 'xxx.cc has no symbols' warnings from source files which are 'empty'\n# when their enclosing #ifdefs are disabled.\nif (CERES_THREADING_MODEL STREQUAL \"CXX11_THREADS\")\n  set(CERES_PARALLEL_FOR_SRC parallel_for_cxx.cc thread_pool.cc)\nelseif (CERES_THREADING_MODEL STREQUAL \"OPENMP\")\n  set(CERES_PARALLEL_FOR_SRC parallel_for_openmp.cc)\n  if (CMAKE_COMPILER_IS_GNUCXX)\n    # OpenMP in GCC requires the GNU OpenMP library.\n    list(APPEND CERES_LIBRARY_PRIVATE_DEPENDENCIES gomp)\n  endif()\nelseif (CERES_THREADING_MODEL STREQUAL \"NO_THREADS\")\n  set(CERES_PARALLEL_FOR_SRC parallel_for_nothreads.cc)\nendif()\n\nset(CERES_INTERNAL_SRC\n    ${CERES_PARALLEL_FOR_SRC}\n    accelerate_sparse.cc\n    array_utils.cc\n    blas.cc\n    block_evaluate_preparer.cc\n    block_jacobi_preconditioner.cc\n    block_jacobian_writer.cc\n    block_random_access_dense_matrix.cc\n    block_random_access_diagonal_matrix.cc\n    block_random_access_matrix.cc\n    block_random_access_sparse_matrix.cc\n    block_sparse_matrix.cc\n    block_structure.cc\n    c_api.cc\n    canonical_views_clustering.cc\n    cgnr_solver.cc\n    callbacks.cc\n    compressed_col_sparse_matrix_utils.cc\n    compressed_row_jacobian_writer.cc\n    compressed_row_sparse_matrix.cc\n    conditioned_cost_function.cc\n    conjugate_gradients_solver.cc\n    context.cc\n    context_impl.cc\n    coordinate_descent_minimizer.cc\n    corrector.cc\n    covariance.cc\n    covariance_impl.cc\n    cxsparse.cc\n    dense_normal_cholesky_solver.cc\n    dense_qr_solver.cc\n    dense_sparse_matrix.cc\n    detect_structure.cc\n    dogleg_strategy.cc\n    dynamic_compressed_row_jacobian_writer.cc\n    dynamic_compressed_row_sparse_matrix.cc\n    dynamic_sparse_normal_cholesky_solver.cc\n    evaluator.cc\n    eigensparse.cc\n    file.cc\n    float_suitesparse.cc\n    float_cxsparse.cc\n    function_sample.cc\n    gradient_checker.cc\n    gradient_checking_cost_function.cc\n    gradient_problem.cc\n    gradient_problem_solver.cc\n    implicit_schur_complement.cc\n    inner_product_computer.cc\n    is_close.cc\n    iterative_refiner.cc\n    iterative_schur_complement_solver.cc\n    levenberg_marquardt_strategy.cc\n    lapack.cc\n    line_search.cc\n    line_search_direction.cc\n    line_search_minimizer.cc\n    line_search_preprocessor.cc\n    linear_least_squares_problems.cc\n    linear_operator.cc\n    linear_solver.cc\n    local_parameterization.cc\n    loss_function.cc\n    low_rank_inverse_hessian.cc\n    minimizer.cc\n    normal_prior.cc\n    parallel_utils.cc\n    parameter_block_ordering.cc\n    partitioned_matrix_view.cc\n    polynomial.cc\n    preconditioner.cc\n    preprocessor.cc\n    problem.cc\n    problem_impl.cc\n    program.cc\n    reorder_program.cc\n    residual_block.cc\n    residual_block_utils.cc\n    schur_complement_solver.cc\n    schur_eliminator.cc\n    schur_jacobi_preconditioner.cc\n    schur_templates.cc\n    scratch_evaluate_preparer.cc\n    single_linkage_clustering.cc\n    solver.cc\n    solver_utils.cc\n    sparse_matrix.cc\n    sparse_cholesky.cc\n    sparse_normal_cholesky_solver.cc\n    subset_preconditioner.cc\n    split.cc\n    stringprintf.cc\n    suitesparse.cc\n    thread_token_provider.cc\n    triplet_sparse_matrix.cc\n    trust_region_preprocessor.cc\n    trust_region_minimizer.cc\n    trust_region_step_evaluator.cc\n    trust_region_strategy.cc\n    types.cc\n    visibility.cc\n    visibility_based_preconditioner.cc\n    wall_time.cc\n)\n\n# Also depend on the header files so that they appear in IDEs.\nfile(GLOB CERES_INTERNAL_HDRS *.h)\nif (MINIGLOG)\n  file(GLOB MINIGLOG_HDRS miniglog/glog/*.h)\n  list(APPEND CERES_INTERNAL_HDRS ${MINIGLOG_HDRS})\n  if (ANDROID)\n    list(APPEND CERES_LIBRARY_PUBLIC_DEPENDENCIES log)\n  endif()\nendif()\n\n# Depend also on public headers so they appear in IDEs.\nfile(GLOB CERES_PUBLIC_HDRS ${Ceres_SOURCE_DIR}/include/ceres/*.h)\nfile(GLOB CERES_PUBLIC_INTERNAL_HDRS ${Ceres_SOURCE_DIR}/include/ceres/internal/*.h)\n\n# Include the specialized schur solvers.\nif (SCHUR_SPECIALIZATIONS)\n  file(GLOB CERES_INTERNAL_SCHUR_FILES generated/*.cc)\nelse (SCHUR_SPECIALIZATIONS)\n  # Only the fully dynamic solver. The build is much faster this way.\n  file(GLOB CERES_INTERNAL_SCHUR_FILES generated/*_d_d_d.cc)\nendif (SCHUR_SPECIALIZATIONS)\n\n# Build the list of dependencies for Ceres based on the current configuration.\nfind_package(Threads QUIET)\nlist(APPEND CERES_LIBRARY_PUBLIC_DEPENDENCIES Threads::Threads)\n\nif (NOT MINIGLOG AND GLOG_FOUND)\n  list(APPEND CERES_LIBRARY_PUBLIC_DEPENDENCIES ${GLOG_LIBRARIES})\n  if (gflags_FOUND)\n    # If glog & gflags are both found, we assume that glog was built with\n    # gflags, as it is awkward to perform a try_compile() to verify this\n    # when gflags is an imported target (as it is in newer versions).\n    # As glog #includes gflags/gflags.h in glog/logging.h if compiled with\n    # gflags, it is thus a public dependency for Ceres in this case.\n    list(APPEND CERES_LIBRARY_PUBLIC_DEPENDENCIES gflags)\n  endif()\nendif (NOT MINIGLOG AND GLOG_FOUND)\n\nif (SUITESPARSE AND SUITESPARSE_FOUND)\n  # Define version information for use in Solver::FullReport.\n  add_definitions(-DCERES_SUITESPARSE_VERSION=\"${SUITESPARSE_VERSION}\")\n  list(APPEND CERES_LIBRARY_PRIVATE_DEPENDENCIES ${SUITESPARSE_LIBRARIES})\nendif (SUITESPARSE AND SUITESPARSE_FOUND)\n\nif (CXSPARSE AND CXSPARSE_FOUND)\n  # Define version information for use in Solver::FullReport.\n  add_definitions(-DCERES_CXSPARSE_VERSION=\"${CXSPARSE_VERSION}\")\n  list(APPEND CERES_LIBRARY_PRIVATE_DEPENDENCIES ${CXSPARSE_LIBRARIES})\nendif (CXSPARSE AND CXSPARSE_FOUND)\n\nif (ACCELERATESPARSE AND AccelerateSparse_FOUND)\n  list(APPEND CERES_LIBRARY_PRIVATE_DEPENDENCIES ${AccelerateSparse_LIBRARIES})\nendif()\n\nif (LAPACK_FOUND)\n  list(APPEND CERES_LIBRARY_PRIVATE_DEPENDENCIES ${LAPACK_LIBRARIES})\nendif ()\n\nset(CERES_LIBRARY_SOURCE\n    ${CERES_INTERNAL_SRC}\n    ${CERES_INTERNAL_HDRS}\n    ${CERES_PUBLIC_HDRS}\n    ${CERES_PUBLIC_INTERNAL_HDRS}\n    ${CERES_INTERNAL_SCHUR_FILES})\n\n# Primarily for Android, but optionally for others, compile the minimal\n# glog implementation into Ceres.\nif (MINIGLOG)\n  list(APPEND CERES_LIBRARY_SOURCE miniglog/glog/logging.cc)\nendif (MINIGLOG)\n\n# Ceres C++ compiler flags can be too strict for an external library code\n# which we do not maintain.\ninclude(CheckCXXCompilerFlag)\ncheck_cxx_compiler_flag(\"-Wno-missing-declarations\"\n                        CHECK_CXX_FLAG_Wno_missing_declarations)\nif (CHECK_CXX_FLAG_Wno_missing_declarations)\n  set_property(SOURCE gmock_gtest_all.cc\n               APPEND_STRING PROPERTY COMPILE_FLAGS \"-Wno-missing-declarations\")\nendif()\n\nadd_library(ceres ${CERES_LIBRARY_SOURCE})\nset_target_properties(ceres PROPERTIES\n  VERSION ${CERES_VERSION}\n  SOVERSION ${CERES_VERSION_MAJOR})\n\n# The ability to specify a minimum language version via cxx_std_[11,14,17]\n# requires CMake >= 3.8.  Prior to that we have to specify the compiler features\n# we require.\nif (CMAKE_VERSION VERSION_LESS 3.8)\n  set(REQUIRED_PUBLIC_CXX_FEATURES cxx_alignas cxx_alignof cxx_constexpr)\nelse()\n  # Forward whatever C++ version Ceres was compiled with as our requirement\n  # for downstream clients.\n  set(REQUIRED_PUBLIC_CXX_FEATURES cxx_std_${CMAKE_CXX_STANDARD})\nendif()\ntarget_compile_features(ceres PUBLIC ${REQUIRED_PUBLIC_CXX_FEATURES})\n\ninclude(AppendTargetProperty)\n# Always build position-independent code (PIC), even when building Ceres as a\n# static library so that shared libraries can link against it, not just\n# executables (PIC does not apply on Windows).\nif (NOT WIN32 AND NOT BUILD_SHARED_LIBS)\n  # Use set_target_properties() not append_target_property() here as\n  # POSITION_INDEPENDENT_CODE is a binary ON/OFF switch.\n  set_target_properties(ceres PROPERTIES POSITION_INDEPENDENT_CODE ON)\nendif()\n\nif (BUILD_SHARED_LIBS)\n  # When building a shared library, mark all external libraries as\n  # PRIVATE so they don't show up as a dependency.\n  target_link_libraries(ceres\n        PUBLIC ${CERES_LIBRARY_PUBLIC_DEPENDENCIES}\n        PRIVATE ${CERES_LIBRARY_PRIVATE_DEPENDENCIES})\nelse (BUILD_SHARED_LIBS)\n  # When building a static library, all external libraries are\n  # PUBLIC(default) since the user needs to link to them.\n  # They will be listed in CeresTargets.cmake.\n  set(CERES_LIBRARY_DEPENDENCIES\n        ${CERES_LIBRARY_PUBLIC_DEPENDENCIES}\n        ${CERES_LIBRARY_PRIVATE_DEPENDENCIES})\n  target_link_libraries(ceres PUBLIC ${CERES_LIBRARY_DEPENDENCIES})\nendif (BUILD_SHARED_LIBS)\n\n# Add the Ceres headers to its target.\n#\n# Force the location containing the configured config.h to the front of the\n# include_directories list (by default it is appended to the back) to ensure\n# that if the user has an installed version of Ceres in the same location as one\n# of the dependencies (e.g. /usr/local) that we find the config.h we just\n# configured, not the (older) installed config.h.\ntarget_include_directories(ceres BEFORE PUBLIC\n  $<BUILD_INTERFACE:${Ceres_BINARY_DIR}/config>)\ntarget_include_directories(ceres PRIVATE ${Ceres_SOURCE_DIR}/internal)\ntarget_include_directories(ceres PUBLIC\n  $<BUILD_INTERFACE:${Ceres_SOURCE_DIR}/include>\n  $<INSTALL_INTERFACE:include>)\n\n# Eigen SparseQR generates various compiler warnings related to unused and\n# uninitialised local variables.  To avoid having to individually suppress these\n# warnings around the #include statments for Eigen headers across all GCC/Clang\n# versions, we tell CMake to treat Eigen headers as system headers.  This\n# results in all compiler warnings from them being suppressed.\ntarget_link_libraries(ceres PUBLIC Eigen3::Eigen)\n\n# Gather the list of public & private include locations for all enabled optional\n# dependencies to be added to the Ceres target.\nset(CERES_LIBRARY_PRIVATE_DEPENDENCIES_INCLUDE_DIRS \"\")\nset(CERES_LIBRARY_PUBLIC_DEPENDENCIES_INCLUDE_DIRS \"\")\nif (MINIGLOG)\n  # Force the miniglog headers to the front of the public include directories\n  # to protect against the case when the user has glog installed in a standard\n  # location (specifically the same as the Ceres install location) but compiled\n  # Ceres with MINIGLOG anyway.  Otherwise: \"glog/logging.h\" in the public Ceres\n  # headers used in client code would match the installed version of glog, not\n  # the miniglog headers, and the client application would fail to link.\n  #\n  # Note that this is an imperfect fix, as we cannot control the include\n  # directories in client projects, and they could easily invert this ordering\n  # themselves (intentionally or otherwise) and so break their build.\n  target_include_directories(ceres BEFORE PUBLIC\n    $<BUILD_INTERFACE:${Ceres_SOURCE_DIR}/internal/ceres/miniglog>\n    $<INSTALL_INTERFACE:include/ceres/internal/miniglog>)\nelseif (NOT FOUND_INSTALLED_GLOG_CMAKE_CONFIGURATION)\n  # Only append glog include directories if the glog found was not a CMake\n  # exported target that already includes them.\n  list(APPEND CERES_LIBRARY_PUBLIC_DEPENDENCIES_INCLUDE_DIRS\n    ${GLOG_INCLUDE_DIRS})\nendif()\nif (SUITESPARSE)\n  list(APPEND CERES_LIBRARY_PRIVATE_DEPENDENCIES_INCLUDE_DIRS\n    ${SUITESPARSE_INCLUDE_DIRS})\nendif()\nif (CXSPARSE)\n  list(APPEND CERES_LIBRARY_PRIVATE_DEPENDENCIES_INCLUDE_DIRS\n    ${CXSPARSE_INCLUDE_DIRS})\nendif()\nif (ACCELERATESPARSE)\n  list(APPEND CERES_LIBRARY_PRIVATE_DEPENDENCIES_INCLUDE_DIRS\n    ${AccelerateSparse_INCLUDE_DIRS})\nendif()\n# Add include locations for optional dependencies to the Ceres target without\n# duplication.\nlist(REMOVE_DUPLICATES CERES_LIBRARY_PRIVATE_DEPENDENCIES_INCLUDE_DIRS)\nforeach(INC_DIR ${CERES_LIBRARY_PRIVATE_DEPENDENCIES_INCLUDE_DIRS})\n  target_include_directories(ceres PRIVATE ${INC_DIR})\nendforeach()\nlist(REMOVE_DUPLICATES CERES_LIBRARY_PUBLIC_DEPENDENCIES_INCLUDE_DIRS)\nforeach(INC_DIR ${CERES_LIBRARY_PUBLIC_DEPENDENCIES_INCLUDE_DIRS})\n  target_include_directories(ceres PUBLIC ${INC_DIR})\nendforeach()\n\n# install(TARGETS ceres\n#         EXPORT  CeresExport\n#         RUNTIME DESTINATION bin\n#         LIBRARY DESTINATION lib${LIB_SUFFIX}\n#         ARCHIVE DESTINATION lib${LIB_SUFFIX})\nset(BUILD_TESTING false)\nif (BUILD_TESTING AND GFLAGS)\n  add_library(gtest gmock_gtest_all.cc gmock_main.cc)\n  target_include_directories(gtest PUBLIC ${Ceres_SOURCE_DIR}/internal/ceres)\n  if (BUILD_SHARED_LIBS)\n    # Define gtest-specific shared library flags for compilation.\n    append_target_property(gtest COMPILE_DEFINITIONS\n      GTEST_CREATE_SHARED_LIBRARY)\n  endif()\n\n  add_library(test_util\n              evaluator_test_utils.cc\n              numeric_diff_test_utils.cc\n              test_util.cc)\n  target_include_directories(test_util PUBLIC ${Ceres_SOURCE_DIR}/internal)\n\n  if (MINIGLOG)\n    # When using miniglog, it is compiled into Ceres, thus Ceres becomes\n    # the library against which other libraries should link for logging.\n    target_link_libraries(gtest PUBLIC gflags ceres)\n    target_link_libraries(test_util PUBLIC ceres gtest)\n  else (MINIGLOG)\n    target_link_libraries(gtest PUBLIC gflags ${GLOG_LIBRARIES})\n    target_link_libraries(test_util PUBLIC ceres gtest ${GLOG_LIBRARIES})\n  endif (MINIGLOG)\n\n  macro (CERES_TEST NAME)\n    add_executable(${NAME}_test ${NAME}_test.cc)\n    # Pull in local headers from the generated test directories when ceres_test()\n    # is invoked there, as well as the private headers in this directory which\n    # may be referenced without the 'ceres' path prefix and all private\n    # dependencies that may be directly referenced.\n    target_include_directories(${NAME}_test\n      PUBLIC ${CMAKE_CURRENT_LIST_DIR}\n             ${Ceres_SOURCE_DIR}/internal/ceres\n             ${CERES_LIBRARY_PRIVATE_DEPENDENCIES_INCLUDE_DIRS})\n\n    target_link_libraries(${NAME}_test PUBLIC test_util ceres gtest)\n    if (BUILD_SHARED_LIBS)\n      # Define gtest-specific shared library flags for linking.\n      append_target_property(${NAME}_test COMPILE_DEFINITIONS\n        GTEST_LINKED_AS_SHARED_LIBRARY)\n    endif()\n    add_test(NAME ${NAME}_test\n             COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${NAME}_test\n             --test_srcdir\n             ${Ceres_SOURCE_DIR}/data)\n  endmacro (CERES_TEST)\n\n  ceres_test(algorithm)\n  ceres_test(array_utils)\n  ceres_test(array_selector)\n  ceres_test(autodiff)\n  ceres_test(autodiff_first_order_function)\n  ceres_test(autodiff_cost_function)\n  ceres_test(autodiff_local_parameterization)\n  ceres_test(block_jacobi_preconditioner)\n  ceres_test(block_random_access_dense_matrix)\n  ceres_test(block_random_access_diagonal_matrix)\n  ceres_test(block_random_access_sparse_matrix)\n  ceres_test(block_sparse_matrix)\n  ceres_test(c_api)\n  ceres_test(canonical_views_clustering)\n  ceres_test(compressed_col_sparse_matrix_utils)\n  ceres_test(compressed_row_sparse_matrix)\n  ceres_test(concurrent_queue)\n  ceres_test(conditioned_cost_function)\n  ceres_test(conjugate_gradients_solver)\n  ceres_test(corrector)\n  ceres_test(cost_function_to_functor)\n  ceres_test(covariance)\n  ceres_test(cubic_interpolation)\n  ceres_test(dense_linear_solver)\n  ceres_test(dense_sparse_matrix)\n  ceres_test(detect_structure)\n  ceres_test(dogleg_strategy)\n  ceres_test(dynamic_autodiff_cost_function)\n  ceres_test(dynamic_compressed_row_sparse_matrix)\n  ceres_test(dynamic_numeric_diff_cost_function)\n  ceres_test(dynamic_sparse_normal_cholesky_solver)\n  ceres_test(dynamic_sparsity)\n  ceres_test(evaluation_callback)\n  ceres_test(evaluator)\n  ceres_test(fixed_array)\n  ceres_test(gradient_checker)\n  ceres_test(gradient_checking_cost_function)\n  ceres_test(gradient_problem)\n  ceres_test(gradient_problem_solver)\n  ceres_test(graph)\n  ceres_test(graph_algorithms)\n  ceres_test(householder_vector)\n  ceres_test(implicit_schur_complement)\n  ceres_test(inner_product_computer)\n  ceres_test(invert_psd_matrix)\n  ceres_test(integer_sequence)\n  ceres_test(integer_sequence_algorithm)\n  ceres_test(is_close)\n  ceres_test(iterative_refiner)\n  ceres_test(iterative_schur_complement_solver)\n  ceres_test(jet)\n  ceres_test(levenberg_marquardt_strategy)\n  ceres_test(line_search_minimizer)\n  ceres_test(line_search_preprocessor)\n  ceres_test(local_parameterization)\n  ceres_test(loss_function)\n  ceres_test(minimizer)\n  ceres_test(normal_prior)\n  ceres_test(numeric_diff_cost_function)\n  ceres_test(ordered_groups)\n  ceres_test(parallel_for)\n  ceres_test(parallel_utils)\n  ceres_test(parameter_block)\n  ceres_test(parameter_block_ordering)\n  ceres_test(parameter_dims)\n  ceres_test(partitioned_matrix_view)\n  ceres_test(polynomial)\n  ceres_test(problem)\n  ceres_test(program)\n  ceres_test(reorder_program)\n  ceres_test(residual_block)\n  ceres_test(residual_block_utils)\n  ceres_test(rotation)\n  ceres_test(schur_complement_solver)\n  ceres_test(schur_eliminator)\n  ceres_test(single_linkage_clustering)\n  ceres_test(small_blas)\n  ceres_test(solver)\n  ceres_test(sparse_cholesky)\n  ceres_test(sparse_normal_cholesky_solver)\n  ceres_test(subset_preconditioner)\n  ceres_test(system)\n  ceres_test(tiny_solver)\n  ceres_test(tiny_solver_autodiff_function)\n  ceres_test(tiny_solver_cost_function_adapter)\n  ceres_test(thread_pool)\n  ceres_test(triplet_sparse_matrix)\n  ceres_test(trust_region_minimizer)\n  ceres_test(trust_region_preprocessor)\n  ceres_test(visibility)\n  ceres_test(visibility_based_preconditioner)\n\n  add_subdirectory(generated_bundle_adjustment_tests)\n\nendif (BUILD_TESTING AND GFLAGS)\n\nmacro(add_dependencies_to_benchmark BENCHMARK_TARGET)\n  target_link_libraries(${BENCHMARK_TARGET} PUBLIC ceres benchmark::benchmark)\n  target_include_directories(${BENCHMARK_TARGET} PUBLIC\n                             ${Ceres_SOURCE_DIR}/internal\n                             ${Ceres_SOURCE_DIR}/internal/ceres\n                             ${CERES_LIBRARY_PRIVATE_DEPENDENCIES_INCLUDE_DIRS})\nendmacro()\n\nif (BUILD_BENCHMARKS)\n  add_executable(small_blas_gemv_benchmark small_blas_gemv_benchmark.cc)\n  add_dependencies_to_benchmark(small_blas_gemv_benchmark)\n\n  add_executable(small_blas_gemm_benchmark small_blas_gemm_benchmark.cc)\n  add_dependencies_to_benchmark(small_blas_gemm_benchmark)\n\n  add_executable(invert_psd_matrix_benchmark invert_psd_matrix_benchmark.cc)\n  add_dependencies_to_benchmark(invert_psd_matrix_benchmark)\n\n  add_executable(schur_eliminator_benchmark schur_eliminator_benchmark.cc)\n  add_dependencies_to_benchmark(schur_eliminator_benchmark)\n\n  add_subdirectory(autodiff_benchmarks)\nendif (BUILD_BENCHMARKS)\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/accelerate_sparse.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: alexs.mac@gmail.com (Alex Stewart)\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_NO_ACCELERATE_SPARSE\n\n#include \"ceres/accelerate_sparse.h\"\n\n#include <algorithm>\n#include <string>\n#include <vector>\n\n#include \"ceres/compressed_col_sparse_matrix_utils.h\"\n#include \"ceres/compressed_row_sparse_matrix.h\"\n#include \"ceres/triplet_sparse_matrix.h\"\n#include \"glog/logging.h\"\n\n#define CASESTR(x) case x: return #x\n\nnamespace ceres {\nnamespace internal {\n\nnamespace {\nconst char* SparseStatusToString(SparseStatus_t status) {\n  switch (status) {\n    CASESTR(SparseStatusOK);\n    CASESTR(SparseFactorizationFailed);\n    CASESTR(SparseMatrixIsSingular);\n    CASESTR(SparseInternalError);\n    CASESTR(SparseParameterError);\n    CASESTR(SparseStatusReleased);\n    default:\n      return \"UKNOWN\";\n  }\n}\n}  // namespace.\n\n// Resizes workspace as required to contain at least required_size bytes\n// aligned to kAccelerateRequiredAlignment and returns a pointer to the\n// aligned start.\nvoid* ResizeForAccelerateAlignment(const size_t required_size,\n                                   std::vector<uint8_t> *workspace) {\n  // As per the Accelerate documentation, all workspace memory passed to the\n  // sparse solver functions must be 16-byte aligned.\n  constexpr int kAccelerateRequiredAlignment = 16;\n  // Although malloc() on macOS should always be 16-byte aligned, it is unclear\n  // if this holds for new(), or on other Apple OSs (phoneOS, watchOS etc).\n  // As such we assume it is not and use std::align() to create a (potentially\n  // offset) 16-byte aligned sub-buffer of the specified size within workspace.\n  workspace->resize(required_size + kAccelerateRequiredAlignment);\n  size_t size_from_aligned_start = workspace->size();\n  void* aligned_solve_workspace_start =\n      reinterpret_cast<void*>(workspace->data());\n  aligned_solve_workspace_start =\n      std::align(kAccelerateRequiredAlignment,\n                 required_size,\n                 aligned_solve_workspace_start,\n                 size_from_aligned_start);\n  CHECK(aligned_solve_workspace_start != nullptr)\n      << \"required_size: \" << required_size\n      << \", workspace size: \" << workspace->size();\n  return aligned_solve_workspace_start;\n}\n\ntemplate<typename Scalar>\nvoid AccelerateSparse<Scalar>::Solve(NumericFactorization* numeric_factor,\n                                     DenseVector* rhs_and_solution) {\n  // From SparseSolve() documentation in Solve.h\n  const int required_size =\n      numeric_factor->solveWorkspaceRequiredStatic +\n      numeric_factor->solveWorkspaceRequiredPerRHS;\n  SparseSolve(*numeric_factor, *rhs_and_solution,\n              ResizeForAccelerateAlignment(required_size, &solve_workspace_));\n}\n\ntemplate<typename Scalar>\ntypename AccelerateSparse<Scalar>::ASSparseMatrix\nAccelerateSparse<Scalar>::CreateSparseMatrixTransposeView(\n    CompressedRowSparseMatrix* A) {\n  // Accelerate uses CSC as its sparse storage format whereas Ceres uses CSR.\n  // As this method returns the transpose view we can flip rows/cols to map\n  // from CSR to CSC^T.\n  //\n  // Accelerate's columnStarts is a long*, not an int*.  These types might be\n  // different (e.g. ARM on iOS) so always make a copy.\n  column_starts_.resize(A->num_rows() +1); // +1 for final column length.\n  std::copy_n(A->rows(), column_starts_.size(), &column_starts_[0]);\n\n  ASSparseMatrix At;\n  At.structure.rowCount = A->num_cols();\n  At.structure.columnCount = A->num_rows();\n  At.structure.columnStarts = &column_starts_[0];\n  At.structure.rowIndices = A->mutable_cols();\n  At.structure.attributes.transpose = false;\n  At.structure.attributes.triangle = SparseUpperTriangle;\n  At.structure.attributes.kind = SparseSymmetric;\n  At.structure.attributes._reserved = 0;\n  At.structure.attributes._allocatedBySparse = 0;\n  At.structure.blockSize = 1;\n  if (std::is_same<Scalar, double>::value) {\n    At.data = reinterpret_cast<Scalar*>(A->mutable_values());\n  } else {\n    values_ =\n        ConstVectorRef(A->values(), A->num_nonzeros()).template cast<Scalar>();\n    At.data = values_.data();\n  }\n  return At;\n}\n\ntemplate<typename Scalar>\ntypename AccelerateSparse<Scalar>::SymbolicFactorization\nAccelerateSparse<Scalar>::AnalyzeCholesky(ASSparseMatrix* A) {\n  return SparseFactor(SparseFactorizationCholesky, A->structure);\n}\n\ntemplate<typename Scalar>\ntypename AccelerateSparse<Scalar>::NumericFactorization\nAccelerateSparse<Scalar>::Cholesky(ASSparseMatrix* A,\n                                   SymbolicFactorization* symbolic_factor) {\n  return SparseFactor(*symbolic_factor, *A);\n}\n\ntemplate<typename Scalar>\nvoid AccelerateSparse<Scalar>::Cholesky(ASSparseMatrix* A,\n                                        NumericFactorization* numeric_factor) {\n  // From SparseRefactor() documentation in Solve.h\n  const int required_size = std::is_same<Scalar, double>::value\n      ? numeric_factor->symbolicFactorization.workspaceSize_Double\n      : numeric_factor->symbolicFactorization.workspaceSize_Float;\n  return SparseRefactor(*A, numeric_factor,\n                        ResizeForAccelerateAlignment(required_size,\n                                                     &factorization_workspace_));\n}\n\n// Instantiate only for the specific template types required/supported s/t the\n// definition can be in the .cc file.\ntemplate class AccelerateSparse<double>;\ntemplate class AccelerateSparse<float>;\n\ntemplate<typename Scalar>\nstd::unique_ptr<SparseCholesky>\nAppleAccelerateCholesky<Scalar>::Create(OrderingType ordering_type) {\n  return std::unique_ptr<SparseCholesky>(\n      new AppleAccelerateCholesky<Scalar>(ordering_type));\n}\n\ntemplate<typename Scalar>\nAppleAccelerateCholesky<Scalar>::AppleAccelerateCholesky(\n    const OrderingType ordering_type)\n    : ordering_type_(ordering_type) {}\n\ntemplate<typename Scalar>\nAppleAccelerateCholesky<Scalar>::~AppleAccelerateCholesky() {\n  FreeSymbolicFactorization();\n  FreeNumericFactorization();\n}\n\ntemplate<typename Scalar>\nCompressedRowSparseMatrix::StorageType\nAppleAccelerateCholesky<Scalar>::StorageType() const {\n  return CompressedRowSparseMatrix::LOWER_TRIANGULAR;\n}\n\ntemplate<typename Scalar>\nLinearSolverTerminationType\nAppleAccelerateCholesky<Scalar>::Factorize(CompressedRowSparseMatrix* lhs,\n                                           std::string* message) {\n  CHECK_EQ(lhs->storage_type(), StorageType());\n  if (lhs == NULL) {\n    *message = \"Failure: Input lhs is NULL.\";\n    return LINEAR_SOLVER_FATAL_ERROR;\n  }\n  typename SparseTypesTrait<Scalar>::SparseMatrix as_lhs =\n      as_.CreateSparseMatrixTransposeView(lhs);\n\n  if (!symbolic_factor_) {\n    symbolic_factor_.reset(\n        new typename SparseTypesTrait<Scalar>::SymbolicFactorization(\n            as_.AnalyzeCholesky(&as_lhs)));\n    if (symbolic_factor_->status != SparseStatusOK) {\n      *message = StringPrintf(\n          \"Apple Accelerate Failure : Symbolic factorisation failed: %s\",\n          SparseStatusToString(symbolic_factor_->status));\n      FreeSymbolicFactorization();\n      return LINEAR_SOLVER_FATAL_ERROR;\n    }\n  }\n\n  if (!numeric_factor_) {\n    numeric_factor_.reset(\n        new typename SparseTypesTrait<Scalar>::NumericFactorization(\n            as_.Cholesky(&as_lhs, symbolic_factor_.get())));\n  } else {\n    // Recycle memory from previous numeric factorization.\n    as_.Cholesky(&as_lhs, numeric_factor_.get());\n  }\n  if (numeric_factor_->status != SparseStatusOK) {\n    *message = StringPrintf(\n        \"Apple Accelerate Failure : Numeric factorisation failed: %s\",\n        SparseStatusToString(numeric_factor_->status));\n    FreeNumericFactorization();\n    return LINEAR_SOLVER_FAILURE;\n  }\n\n  return LINEAR_SOLVER_SUCCESS;\n}\n\ntemplate<typename Scalar>\nLinearSolverTerminationType\nAppleAccelerateCholesky<Scalar>::Solve(const double* rhs,\n                                       double* solution,\n                                       std::string* message) {\n  CHECK_EQ(numeric_factor_->status, SparseStatusOK)\n      << \"Solve called without a call to Factorize first (\"\n      << SparseStatusToString(numeric_factor_->status) << \").\";\n  const int num_cols = numeric_factor_->symbolicFactorization.columnCount;\n\n  typename SparseTypesTrait<Scalar>::DenseVector as_rhs_and_solution;\n  as_rhs_and_solution.count = num_cols;\n  if (std::is_same<Scalar, double>::value) {\n    as_rhs_and_solution.data = reinterpret_cast<Scalar*>(solution);\n    std::copy_n(rhs, num_cols, solution);\n  } else {\n    scalar_rhs_and_solution_ =\n        ConstVectorRef(rhs, num_cols).template cast<Scalar>();\n    as_rhs_and_solution.data = scalar_rhs_and_solution_.data();\n  }\n  as_.Solve(numeric_factor_.get(), &as_rhs_and_solution);\n  if (!std::is_same<Scalar, double>::value) {\n    VectorRef(solution, num_cols) =\n        scalar_rhs_and_solution_.template cast<double>();\n  }\n  return LINEAR_SOLVER_SUCCESS;\n}\n\ntemplate<typename Scalar>\nvoid AppleAccelerateCholesky<Scalar>::FreeSymbolicFactorization() {\n  if (symbolic_factor_) {\n    SparseCleanup(*symbolic_factor_);\n    symbolic_factor_.reset();\n  }\n}\n\ntemplate<typename Scalar>\nvoid AppleAccelerateCholesky<Scalar>::FreeNumericFactorization() {\n  if (numeric_factor_) {\n    SparseCleanup(*numeric_factor_);\n    numeric_factor_.reset();\n  }\n}\n\n// Instantiate only for the specific template types required/supported s/t the\n// definition can be in the .cc file.\ntemplate class AppleAccelerateCholesky<double>;\ntemplate class AppleAccelerateCholesky<float>;\n\n}\n}\n\n#endif  // CERES_NO_ACCELERATE_SPARSE\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/accelerate_sparse.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: alexs.mac@gmail.com (Alex Stewart)\n\n#ifndef CERES_INTERNAL_ACCELERATE_SPARSE_H_\n#define CERES_INTERNAL_ACCELERATE_SPARSE_H_\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_NO_ACCELERATE_SPARSE\n\n#include <memory>\n#include <string>\n#include <vector>\n\n#include \"ceres/linear_solver.h\"\n#include \"ceres/sparse_cholesky.h\"\n#include \"Accelerate.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass CompressedRowSparseMatrix;\nclass TripletSparseMatrix;\n\ntemplate<typename Scalar>\nstruct SparseTypesTrait {\n};\n\ntemplate<>\nstruct SparseTypesTrait<double> {\n  typedef DenseVector_Double DenseVector;\n  typedef SparseMatrix_Double SparseMatrix;\n  typedef SparseOpaqueSymbolicFactorization SymbolicFactorization;\n  typedef SparseOpaqueFactorization_Double NumericFactorization;\n};\n\ntemplate<>\nstruct SparseTypesTrait<float> {\n  typedef DenseVector_Float DenseVector;\n  typedef SparseMatrix_Float SparseMatrix;\n  typedef SparseOpaqueSymbolicFactorization SymbolicFactorization;\n  typedef SparseOpaqueFactorization_Float NumericFactorization;\n};\n\ntemplate<typename Scalar>\nclass AccelerateSparse {\n public:\n  using DenseVector = typename SparseTypesTrait<Scalar>::DenseVector;\n  // Use ASSparseMatrix to avoid collision with ceres::internal::SparseMatrix.\n  using ASSparseMatrix = typename SparseTypesTrait<Scalar>::SparseMatrix;\n  using SymbolicFactorization = typename SparseTypesTrait<Scalar>::SymbolicFactorization;\n  using NumericFactorization = typename SparseTypesTrait<Scalar>::NumericFactorization;\n\n  // Solves a linear system given its symbolic (reference counted within\n  // NumericFactorization) and numeric factorization.\n  void Solve(NumericFactorization* numeric_factor,\n             DenseVector* rhs_and_solution);\n\n  // Note: Accelerate's API passes/returns its objects by value, but as the\n  //       objects contain pointers to the underlying data these copies are\n  //       all shallow (in some cases Accelerate also reference counts the\n  //       objects internally).\n  ASSparseMatrix CreateSparseMatrixTransposeView(CompressedRowSparseMatrix* A);\n  // Computes a symbolic factorisation of A that can be used in Solve().\n  SymbolicFactorization AnalyzeCholesky(ASSparseMatrix* A);\n  // Compute the numeric Cholesky factorization of A, given its\n  // symbolic factorization.\n  NumericFactorization Cholesky(ASSparseMatrix* A,\n                                SymbolicFactorization* symbolic_factor);\n  // Reuse the NumericFactorization from a previous matrix with the same\n  // symbolic factorization to represent a new numeric factorization.\n  void Cholesky(ASSparseMatrix* A, NumericFactorization* numeric_factor);\n\n private:\n  std::vector<long> column_starts_;\n  std::vector<uint8_t> solve_workspace_;\n  std::vector<uint8_t> factorization_workspace_;\n  // Storage for the values of A if Scalar != double (necessitating a copy).\n  Eigen::Matrix<Scalar, Eigen::Dynamic, 1> values_;\n};\n\n// An implementation of SparseCholesky interface using Apple's Accelerate\n// framework.\ntemplate<typename Scalar>\nclass AppleAccelerateCholesky : public SparseCholesky {\n public:\n  // Factory\n  static std::unique_ptr<SparseCholesky> Create(OrderingType ordering_type);\n\n  // SparseCholesky interface.\n  virtual ~AppleAccelerateCholesky();\n  CompressedRowSparseMatrix::StorageType StorageType() const;\n  LinearSolverTerminationType Factorize(CompressedRowSparseMatrix* lhs,\n                                        std::string* message) final;\n  LinearSolverTerminationType Solve(const double* rhs,\n                                    double* solution,\n                                    std::string* message) final ;\n\n private:\n  AppleAccelerateCholesky(const OrderingType ordering_type);\n  void FreeSymbolicFactorization();\n  void FreeNumericFactorization();\n\n  const OrderingType ordering_type_;\n  AccelerateSparse<Scalar> as_;\n  std::unique_ptr<typename AccelerateSparse<Scalar>::SymbolicFactorization>\n  symbolic_factor_;\n  std::unique_ptr<typename AccelerateSparse<Scalar>::NumericFactorization>\n  numeric_factor_;\n  // Copy of rhs/solution if Scalar != double (necessitating a copy).\n  Eigen::Matrix<Scalar, Eigen::Dynamic, 1> scalar_rhs_and_solution_;\n};\n\n}\n}\n\n#endif  // CERES_NO_ACCELERATE_SPARSE\n\n#endif  // CERES_INTERNAL_ACCELERATE_SPARSE_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/algorithm_test.cc",
    "content": "// Copyright 2017 The Abseil Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      https://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include \"ceres/internal/algorithm.h\"\n\n#include <algorithm>\n#include <list>\n#include <vector>\n\n#include \"gmock/gmock.h\"\n#include \"gtest/gtest.h\"\n\nnamespace {\n\nTEST(EqualTest, DefaultComparisonRandomAccess) {\n  std::vector<int> v1{1, 2, 3};\n  std::vector<int> v2 = v1;\n  std::vector<int> v3 = {1, 2};\n  std::vector<int> v4 = {1, 2, 4};\n\n  EXPECT_TRUE(\n      ceres::internal::equal(v1.begin(), v1.end(), v2.begin(), v2.end()));\n  EXPECT_FALSE(\n      ceres::internal::equal(v1.begin(), v1.end(), v3.begin(), v3.end()));\n  EXPECT_FALSE(\n      ceres::internal::equal(v1.begin(), v1.end(), v4.begin(), v4.end()));\n}\n\nTEST(EqualTest, DefaultComparison) {\n  std::list<int> lst1{1, 2, 3};\n  std::list<int> lst2 = lst1;\n  std::list<int> lst3{1, 2};\n  std::list<int> lst4{1, 2, 4};\n\n  EXPECT_TRUE(ceres::internal::equal(\n      lst1.begin(), lst1.end(), lst2.begin(), lst2.end()));\n  EXPECT_FALSE(ceres::internal::equal(\n      lst1.begin(), lst1.end(), lst3.begin(), lst3.end()));\n  EXPECT_FALSE(ceres::internal::equal(\n      lst1.begin(), lst1.end(), lst4.begin(), lst4.end()));\n}\n\nTEST(EqualTest, EmptyRange) {\n  std::vector<int> v1{1, 2, 3};\n  std::vector<int> empty1;\n  std::vector<int> empty2;\n\n  EXPECT_FALSE(ceres::internal::equal(\n      v1.begin(), v1.end(), empty1.begin(), empty1.end()));\n  EXPECT_FALSE(ceres::internal::equal(\n      empty1.begin(), empty1.end(), v1.begin(), v1.end()));\n  EXPECT_TRUE(ceres::internal::equal(\n      empty1.begin(), empty1.end(), empty2.begin(), empty2.end()));\n}\n\nTEST(EqualTest, MixedIterTypes) {\n  std::vector<int> v1{1, 2, 3};\n  std::list<int> lst1{v1.begin(), v1.end()};\n  std::list<int> lst2{1, 2, 4};\n  std::list<int> lst3{1, 2};\n\n  EXPECT_TRUE(\n      ceres::internal::equal(v1.begin(), v1.end(), lst1.begin(), lst1.end()));\n  EXPECT_FALSE(\n      ceres::internal::equal(v1.begin(), v1.end(), lst2.begin(), lst2.end()));\n  EXPECT_FALSE(\n      ceres::internal::equal(v1.begin(), v1.end(), lst3.begin(), lst3.end()));\n}\n\nTEST(EqualTest, MixedValueTypes) {\n  std::vector<int> v1{1, 2, 3};\n  std::vector<char> v2{1, 2, 3};\n  std::vector<char> v3{1, 2};\n  std::vector<char> v4{1, 2, 4};\n\n  EXPECT_TRUE(\n      ceres::internal::equal(v1.begin(), v1.end(), v2.begin(), v2.end()));\n  EXPECT_FALSE(\n      ceres::internal::equal(v1.begin(), v1.end(), v3.begin(), v3.end()));\n  EXPECT_FALSE(\n      ceres::internal::equal(v1.begin(), v1.end(), v4.begin(), v4.end()));\n}\n\nTEST(EqualTest, WeirdIterators) {\n  std::vector<bool> v1{true, false};\n  std::vector<bool> v2 = v1;\n  std::vector<bool> v3{true};\n  std::vector<bool> v4{true, true, true};\n\n  EXPECT_TRUE(\n      ceres::internal::equal(v1.begin(), v1.end(), v2.begin(), v2.end()));\n  EXPECT_FALSE(\n      ceres::internal::equal(v1.begin(), v1.end(), v3.begin(), v3.end()));\n  EXPECT_FALSE(\n      ceres::internal::equal(v1.begin(), v1.end(), v4.begin(), v4.end()));\n}\n\nTEST(EqualTest, CustomComparison) {\n  int n[] = {1, 2, 3, 4};\n  std::vector<int*> v1{&n[0], &n[1], &n[2]};\n  std::vector<int*> v2 = v1;\n  std::vector<int*> v3{&n[0], &n[1], &n[3]};\n  std::vector<int*> v4{&n[0], &n[1]};\n\n  auto eq = [](int* a, int* b) { return *a == *b; };\n\n  EXPECT_TRUE(\n      ceres::internal::equal(v1.begin(), v1.end(), v2.begin(), v2.end(), eq));\n  EXPECT_FALSE(\n      ceres::internal::equal(v1.begin(), v1.end(), v3.begin(), v3.end(), eq));\n  EXPECT_FALSE(\n      ceres::internal::equal(v1.begin(), v1.end(), v4.begin(), v4.end(), eq));\n}\n\nTEST(EqualTest, MoveOnlyPredicate) {\n  std::vector<int> v1{1, 2, 3};\n  std::vector<int> v2{4, 5, 6};\n\n  // move-only equality predicate\n  struct Eq {\n    Eq() = default;\n    Eq(Eq&&) = default;\n    Eq(const Eq&) = delete;\n    Eq& operator=(const Eq&) = delete;\n    bool operator()(const int a, const int b) const { return a == b; }\n  };\n\n  EXPECT_TRUE(\n      ceres::internal::equal(v1.begin(), v1.end(), v1.begin(), v1.end(), Eq()));\n  EXPECT_FALSE(\n      ceres::internal::equal(v1.begin(), v1.end(), v2.begin(), v2.end(), Eq()));\n}\n\nstruct CountingTrivialPred {\n  int* count;\n  bool operator()(int, int) const {\n    ++*count;\n    return true;\n  }\n};\n\nTEST(EqualTest, RandomAccessComplexity) {\n  std::vector<int> v1{1, 1, 3};\n  std::vector<int> v2 = v1;\n  std::vector<int> v3{1, 2};\n\n  do {\n    int count = 0;\n    ceres::internal::equal(v1.begin(),\n                           v1.end(),\n                           v2.begin(),\n                           v2.end(),\n                           CountingTrivialPred{&count});\n    EXPECT_LE(count, 3);\n  } while (std::next_permutation(v2.begin(), v2.end()));\n\n  int count = 0;\n  ceres::internal::equal(\n      v1.begin(), v1.end(), v3.begin(), v3.end(), CountingTrivialPred{&count});\n  EXPECT_EQ(count, 0);\n}\n}  // namespace\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/array_selector_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2020 Google Inc. All rights reserved.\n// http://code.google.com/p/ceres-solver/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: darius.rueckert@fau.de (Darius Rueckert)\n//\n\n#include \"ceres/internal/array_selector.h\"\n\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// This test only checks, if the correct array implementations are selected. The\n// test for FixedArray is in fixed_array_test.cc. Tests for std::array and\n// std::vector are not included in ceres.\nTEST(ArraySelector, FixedArray) {\n  ArraySelector<int, DYNAMIC, 20> array1(10);\n  static_assert(\n      std::is_base_of<internal::FixedArray<int, 20>, decltype(array1)>::value,\n      \"\");\n  EXPECT_EQ(array1.size(), 10);\n\n  ArraySelector<int, DYNAMIC, 10> array2(20);\n  static_assert(\n      std::is_base_of<internal::FixedArray<int, 10>, decltype(array2)>::value,\n      \"\");\n  EXPECT_EQ(array2.size(), 20);\n}\n\nTEST(ArraySelector, Array) {\n  ArraySelector<int, 10, 20> array1(10);\n  static_assert(std::is_base_of<std::array<int, 10>, decltype(array1)>::value,\n                \"\");\n  EXPECT_EQ(array1.size(), 10);\n\n  ArraySelector<int, 20, 20> array2(20);\n  static_assert(std::is_base_of<std::array<int, 20>, decltype(array2)>::value,\n                \"\");\n  EXPECT_EQ(array2.size(), 20);\n}\n\nTEST(ArraySelector, Vector) {\n  ArraySelector<int, 20, 10> array1(20);\n  static_assert(std::is_base_of<std::vector<int>, decltype(array1)>::value, \"\");\n  EXPECT_EQ(array1.size(), 20);\n\n  ArraySelector<int, 1, 0> array2(1);\n  static_assert(std::is_base_of<std::vector<int>, decltype(array2)>::value, \"\");\n  EXPECT_EQ(array2.size(), 1);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/array_utils.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/array_utils.h\"\n\n#include <algorithm>\n#include <cmath>\n#include <cstddef>\n#include <string>\n#include <vector>\n#include \"ceres/stringprintf.h\"\n#include \"ceres/types.h\"\nnamespace ceres {\nnamespace internal {\n\nusing std::string;\n\nbool IsArrayValid(const int size, const double* x) {\n  if (x != NULL) {\n    for (int i = 0; i < size; ++i) {\n      if (!std::isfinite(x[i]) || (x[i] == kImpossibleValue))  {\n        return false;\n      }\n    }\n  }\n  return true;\n}\n\nint FindInvalidValue(const int size, const double* x) {\n  if (x == NULL) {\n    return size;\n  }\n\n  for (int i = 0; i < size; ++i) {\n    if (!std::isfinite(x[i]) || (x[i] == kImpossibleValue))  {\n      return i;\n    }\n  }\n\n  return size;\n}\n\nvoid InvalidateArray(const int size, double* x) {\n  if (x != NULL) {\n    for (int i = 0; i < size; ++i) {\n      x[i] = kImpossibleValue;\n    }\n  }\n}\n\nvoid AppendArrayToString(const int size, const double* x, string* result) {\n  for (int i = 0; i < size; ++i) {\n    if (x == NULL) {\n      StringAppendF(result, \"Not Computed  \");\n    } else {\n      if (x[i] == kImpossibleValue) {\n        StringAppendF(result, \"Uninitialized \");\n      } else {\n        StringAppendF(result, \"%12g \", x[i]);\n      }\n    }\n  }\n}\n\nvoid MapValuesToContiguousRange(const int size, int* array) {\n  std::vector<int> unique_values(array, array + size);\n  std::sort(unique_values.begin(), unique_values.end());\n  unique_values.erase(std::unique(unique_values.begin(),\n                                  unique_values.end()),\n                      unique_values.end());\n\n  for (int i = 0; i < size; ++i) {\n    array[i] = std::lower_bound(unique_values.begin(),\n                                unique_values.end(),\n                                array[i]) - unique_values.begin();\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/array_utils.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Utility routines for validating arrays.\n//\n// These are useful for detecting two common class of errors.\n//\n// 1. Uninitialized memory - where the user for some reason did not\n// compute part of an array, but the code expects it.\n//\n// 2. Numerical failure while computing the cost/residual/jacobian,\n// e.g. NaN, infinities etc. This is particularly useful since the\n// automatic differentiation code does computations that are not\n// evident to the user and can silently generate hard to debug errors.\n\n#ifndef CERES_INTERNAL_ARRAY_UTILS_H_\n#define CERES_INTERNAL_ARRAY_UTILS_H_\n\n#include <string>\n#include \"ceres/internal/port.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// Fill the array x with an impossible value that the user code is\n// never expected to compute.\nvoid InvalidateArray(int size, double* x);\n\n// Check if all the entries of the array x are valid, i.e. all the\n// values in the array should be finite and none of them should be\n// equal to the \"impossible\" value used by InvalidateArray.\nbool IsArrayValid(int size, const double* x);\n\n// If the array contains an invalid value, return the index for it,\n// otherwise return size.\nint FindInvalidValue(const int size, const double* x);\n\n// Utility routine to print an array of doubles to a string. If the\n// array pointer is NULL, it is treated as an array of zeros.\nvoid AppendArrayToString(const int size, const double* x, std::string* result);\n\n// This routine takes an array of integer values, sorts and uniques\n// them and then maps each value in the array to its position in the\n// sorted+uniqued array. By doing this, if there are k unique\n// values in the array, each value is replaced by an integer in the\n// range [0, k-1], while preserving their relative order.\n//\n// For example\n//\n// [1 0 3 5 0 1 5]\n//\n// gets mapped to\n//\n// [1 0 2 3 0 1 3]\nvoid MapValuesToContiguousRange(int size, int* array);\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_ARRAY_UTILS_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/array_utils_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/array_utils.h\"\n\n#include <limits>\n#include <cmath>\n#include <vector>\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::vector;\n\nTEST(ArrayUtils, IsArrayValid) {\n  double x[3];\n  x[0] = 0.0;\n  x[1] = 1.0;\n  x[2] = 2.0;\n  EXPECT_TRUE(IsArrayValid(3, x));\n  x[1] = std::numeric_limits<double>::infinity();\n  EXPECT_FALSE(IsArrayValid(3, x));\n  x[1] = std::numeric_limits<double>::quiet_NaN();\n  EXPECT_FALSE(IsArrayValid(3, x));\n  x[1] = std::numeric_limits<double>::signaling_NaN();\n  EXPECT_FALSE(IsArrayValid(3, x));\n  EXPECT_TRUE(IsArrayValid(1, NULL));\n  InvalidateArray(3, x);\n  EXPECT_FALSE(IsArrayValid(3, x));\n}\n\nTEST(ArrayUtils, FindInvalidIndex) {\n  double x[3];\n  x[0] = 0.0;\n  x[1] = 1.0;\n  x[2] = 2.0;\n  EXPECT_EQ(FindInvalidValue(3, x), 3);\n  x[1] = std::numeric_limits<double>::infinity();\n  EXPECT_EQ(FindInvalidValue(3, x), 1);\n  x[1] = std::numeric_limits<double>::quiet_NaN();\n  EXPECT_EQ(FindInvalidValue(3, x), 1);\n  x[1] = std::numeric_limits<double>::signaling_NaN();\n  EXPECT_EQ(FindInvalidValue(3, x), 1);\n  EXPECT_EQ(FindInvalidValue(1, NULL), 1);\n  InvalidateArray(3, x);\n  EXPECT_EQ(FindInvalidValue(3, x), 0);\n}\n\nTEST(MapValuesToContiguousRange, ContiguousEntries) {\n  vector<int> array;\n  array.push_back(0);\n  array.push_back(1);\n  vector<int> expected = array;\n  MapValuesToContiguousRange(array.size(), &array[0]);\n  EXPECT_EQ(array, expected);\n  array.clear();\n\n  array.push_back(1);\n  array.push_back(0);\n  expected = array;\n  MapValuesToContiguousRange(array.size(), &array[0]);\n  EXPECT_EQ(array, expected);\n}\n\nTEST(MapValuesToContiguousRange, NonContiguousEntries) {\n  vector<int> array;\n  array.push_back(0);\n  array.push_back(2);\n  vector<int> expected;\n  expected.push_back(0);\n  expected.push_back(1);\n  MapValuesToContiguousRange(array.size(), &array[0]);\n  EXPECT_EQ(array, expected);\n}\n\nTEST(MapValuesToContiguousRange, NonContiguousRepeatingEntries) {\n  vector<int> array;\n  array.push_back(3);\n  array.push_back(1);\n  array.push_back(0);\n  array.push_back(0);\n  array.push_back(0);\n  array.push_back(5);\n  vector<int> expected;\n  expected.push_back(2);\n  expected.push_back(1);\n  expected.push_back(0);\n  expected.push_back(0);\n  expected.push_back(0);\n  expected.push_back(3);\n  MapValuesToContiguousRange(array.size(), &array[0]);\n  EXPECT_EQ(array, expected);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/autodiff_benchmarks/CMakeLists.txt",
    "content": "# TODO: Add support for other compilers\nif(CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  list(APPEND CERES_BENCHMARK_FLAGS \"-mllvm\" \"-inline-threshold=1000000\")\nendif()\n\nadd_executable(autodiff_benchmarks autodiff_benchmarks.cc)\nadd_dependencies_to_benchmark(autodiff_benchmarks)\ntarget_compile_options(autodiff_benchmarks PRIVATE ${CERES_BENCHMARK_FLAGS})\n\n# All other flags + fast-math\nlist(APPEND CERES_BENCHMARK_FAST_MATH_FLAGS ${CERES_BENCHMARK_FLAGS} \"-ffast-math\")\nadd_executable(autodiff_benchmarks_fast_math autodiff_benchmarks.cc)\nadd_dependencies_to_benchmark(autodiff_benchmarks_fast_math)\ntarget_compile_options(autodiff_benchmarks_fast_math PRIVATE ${CERES_BENCHMARK_FAST_MATH_FLAGS})\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/autodiff_benchmarks/autodiff_benchmarks.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2020 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: darius.rueckert@fau.de (Darius Rueckert)\n\n#include <memory>\n#include <random>\n\n#include \"benchmark/benchmark.h\"\n#include \"ceres/autodiff_benchmarks/brdf_cost_function.h\"\n#include \"ceres/autodiff_benchmarks/constant_cost_function.h\"\n#include \"ceres/autodiff_benchmarks/linear_cost_functions.h\"\n#include \"ceres/autodiff_benchmarks/photometric_error.h\"\n#include \"ceres/autodiff_benchmarks/relative_pose_error.h\"\n#include \"ceres/autodiff_benchmarks/snavely_reprojection_error.h\"\n#include \"ceres/ceres.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// If we want to use functors with both operator() and an Evaluate() method\n// with AutoDiff then this wrapper class here has to be used. Autodiff doesn't\n// support functors that have an Evaluate() function.\n//\n// CostFunctionToFunctor hides the Evaluate() function, because it doesn't\n// derive from CostFunction. Autodiff sees it as a simple functor and will use\n// the operator() as expected.\ntemplate <typename CostFunction>\nstruct CostFunctionToFunctor {\n    template <typename... _Args>\n    explicit CostFunctionToFunctor(_Args&&... __args)\n        : cost_function(std::forward<_Args>(__args)...) {}\n\n    template <typename... _Args>\n    bool operator()(_Args&&... __args) const {\n        return cost_function(std::forward<_Args>(__args)...);\n    }\n\n    CostFunction cost_function;\n};\n\n}  // namespace internal\n\ntemplate <int kParameterBlockSize>\nstatic void BM_ConstantAnalytic(benchmark::State& state) {\n  constexpr int num_residuals = 1;\n  std::array<double, kParameterBlockSize> parameters_values;\n  std::iota(parameters_values.begin(), parameters_values.end(), 0);\n  double* parameters[] = {parameters_values.data()};\n\n  std::array<double, num_residuals> residuals;\n\n  std::array<double, num_residuals * kParameterBlockSize> jacobian_values;\n  double* jacobians[] = {jacobian_values.data()};\n\n  std::unique_ptr<ceres::CostFunction> cost_function(\n      new ConstantCostFunction<kParameterBlockSize>());\n\n  for (auto _ : state) {\n    cost_function->Evaluate(parameters, residuals.data(), jacobians);\n  }\n}\n\ntemplate <int kParameterBlockSize>\nstatic void BM_ConstantAutodiff(benchmark::State& state) {\n  constexpr int num_residuals = 1;\n  std::array<double, kParameterBlockSize> parameters_values;\n  std::iota(parameters_values.begin(), parameters_values.end(), 0);\n  double* parameters[] = {parameters_values.data()};\n\n  std::array<double, num_residuals> residuals;\n\n  std::array<double, num_residuals * kParameterBlockSize> jacobian_values;\n  double* jacobians[] = {jacobian_values.data()};\n\n  using AutoDiffFunctor = ceres::internal::CostFunctionToFunctor<\n      ConstantCostFunction<kParameterBlockSize>>;\n  std::unique_ptr<ceres::CostFunction> cost_function(\n      new ceres::AutoDiffCostFunction<AutoDiffFunctor, 1, kParameterBlockSize>(\n          new AutoDiffFunctor()));\n\n  for (auto _ : state) {\n    cost_function->Evaluate(parameters, residuals.data(), jacobians);\n  }\n}\n\nBENCHMARK_TEMPLATE(BM_ConstantAnalytic, 1);\nBENCHMARK_TEMPLATE(BM_ConstantAutodiff, 1);\nBENCHMARK_TEMPLATE(BM_ConstantAnalytic, 10);\nBENCHMARK_TEMPLATE(BM_ConstantAutodiff, 10);\nBENCHMARK_TEMPLATE(BM_ConstantAnalytic, 20);\nBENCHMARK_TEMPLATE(BM_ConstantAutodiff, 20);\nBENCHMARK_TEMPLATE(BM_ConstantAnalytic, 30);\nBENCHMARK_TEMPLATE(BM_ConstantAutodiff, 30);\nBENCHMARK_TEMPLATE(BM_ConstantAnalytic, 40);\nBENCHMARK_TEMPLATE(BM_ConstantAutodiff, 40);\nBENCHMARK_TEMPLATE(BM_ConstantAnalytic, 50);\nBENCHMARK_TEMPLATE(BM_ConstantAutodiff, 50);\nBENCHMARK_TEMPLATE(BM_ConstantAnalytic, 60);\nBENCHMARK_TEMPLATE(BM_ConstantAutodiff, 60);\n\nstatic void BM_Linear1AutoDiff(benchmark::State& state) {\n  using FunctorType =\n      ceres::internal::CostFunctionToFunctor<Linear1CostFunction>;\n\n  double parameter_block1[] = {1.};\n  double* parameters[] = {parameter_block1};\n\n  double jacobian1[1];\n  double residuals[1];\n  double* jacobians[] = {jacobian1};\n\n  std::unique_ptr<ceres::CostFunction> cost_function(\n      new ceres::AutoDiffCostFunction<FunctorType, 1, 1>(new FunctorType()));\n\n  for (auto _ : state) {\n    cost_function->Evaluate(\n        parameters, residuals, state.range(0) ? jacobians : nullptr);\n  }\n}\nBENCHMARK(BM_Linear1AutoDiff)->Arg(0)->Arg(1);\n\nstatic void BM_Linear10AutoDiff(benchmark::State& state) {\n  using FunctorType =\n      ceres::internal::CostFunctionToFunctor<Linear10CostFunction>;\n\n  double parameter_block1[] = {1., 2., 3., 4., 5., 6., 7., 8., 9., 10.};\n  double* parameters[] = {parameter_block1};\n\n  double jacobian1[10 * 10];\n  double residuals[10];\n  double* jacobians[] = {jacobian1};\n\n  std::unique_ptr<ceres::CostFunction> cost_function(\n      new ceres::AutoDiffCostFunction<FunctorType, 10, 10>(new FunctorType()));\n\n  for (auto _ : state) {\n    cost_function->Evaluate(\n        parameters, residuals, state.range(0) ? jacobians : nullptr);\n  }\n}\nBENCHMARK(BM_Linear10AutoDiff)->Arg(0)->Arg(1);\n\n// From the NIST problem collection.\nstruct Rat43CostFunctor {\n  Rat43CostFunctor(const double x, const double y) : x_(x), y_(y) {}\n\n  template <typename T>\n  bool operator()(const T* parameters, T* residuals) const {\n    const T& b1 = parameters[0];\n    const T& b2 = parameters[1];\n    const T& b3 = parameters[2];\n    const T& b4 = parameters[3];\n    residuals[0] = b1 * pow(1.0 + exp(b2 - b3 * x_), -1.0 / b4) - y_;\n    return true;\n  }\n\n private:\n  const double x_;\n  const double y_;\n};\n\nstatic void BM_Rat43AutoDiff(benchmark::State& state) {\n  double parameter_block1[] = {1., 2., 3., 4.};\n  double* parameters[] = {parameter_block1};\n\n  double jacobian1[] = {0.0, 0.0, 0.0, 0.0};\n  double residuals;\n  double* jacobians[] = {jacobian1};\n  const double x = 0.2;\n  const double y = 0.3;\n  std::unique_ptr<ceres::CostFunction> cost_function(\n      new ceres::AutoDiffCostFunction<Rat43CostFunctor, 1, 4>(\n          new Rat43CostFunctor(x, y)));\n\n  for (auto _ : state) {\n    cost_function->Evaluate(\n        parameters, &residuals, state.range(0) ? jacobians : nullptr);\n  }\n}\nBENCHMARK(BM_Rat43AutoDiff)->Arg(0)->Arg(1);\n\nstatic void BM_SnavelyReprojectionAutoDiff(benchmark::State& state) {\n  using FunctorType =\n      ceres::internal::CostFunctionToFunctor<SnavelyReprojectionError>;\n\n  double parameter_block1[] = {1., 2., 3., 4., 5., 6., 7., 8., 9.};\n  double parameter_block2[] = {1., 2., 3.};\n  double* parameters[] = {parameter_block1, parameter_block2};\n\n  double jacobian1[2 * 9];\n  double jacobian2[2 * 3];\n  double residuals[2];\n  double* jacobians[] = {jacobian1, jacobian2};\n\n  const double x = 0.2;\n  const double y = 0.3;\n  std::unique_ptr<ceres::CostFunction> cost_function(\n      new ceres::AutoDiffCostFunction<FunctorType, 2, 9, 3>(\n          new FunctorType(x, y)));\n\n  for (auto _ : state) {\n    cost_function->Evaluate(\n        parameters, residuals, state.range(0) ? jacobians : nullptr);\n  }\n}\n\nBENCHMARK(BM_SnavelyReprojectionAutoDiff)->Arg(0)->Arg(1);\n\nstatic void BM_PhotometricAutoDiff(benchmark::State& state) {\n  constexpr int PATCH_SIZE = 8;\n\n  using FunctorType = PhotometricError<PATCH_SIZE>;\n  using ImageType = Eigen::Matrix<uint8_t, 128, 128, Eigen::RowMajor>;\n\n  // Prepare parameter / residual / jacobian blocks.\n  double parameter_block1[] = {1., 2., 3., 4., 5., 6., 7.};\n  double parameter_block2[] = {1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1};\n  double parameter_block3[] = {1.};\n  double* parameters[] = {parameter_block1, parameter_block2, parameter_block3};\n\n  Eigen::Map<Eigen::Quaterniond>(parameter_block1).normalize();\n  Eigen::Map<Eigen::Quaterniond>(parameter_block2).normalize();\n\n  double jacobian1[FunctorType::PATCH_SIZE * FunctorType::POSE_SIZE];\n  double jacobian2[FunctorType::PATCH_SIZE * FunctorType::POSE_SIZE];\n  double jacobian3[FunctorType::PATCH_SIZE * FunctorType::POINT_SIZE];\n  double residuals[FunctorType::PATCH_SIZE];\n  double* jacobians[] = {jacobian1, jacobian2, jacobian3};\n\n  // Prepare data (fixed seed for repeatability).\n  std::mt19937::result_type seed = 42;\n  std::mt19937 gen(seed);\n  std::uniform_real_distribution<double> uniform01(0.0, 1.0);\n  std::uniform_int_distribution<unsigned int> uniform0255(0, 255);\n\n  FunctorType::Patch<double> intensities_host =\n      FunctorType::Patch<double>::NullaryExpr(\n          [&]() { return uniform0255(gen); });\n\n  // Set bearing vector's z component to 1, i.e. pointing away from the camera,\n  // to ensure they are (likely) in the domain of the projection function (given\n  // a small rotation between host and target frame).\n  FunctorType::PatchVectors<double> bearings_host =\n      FunctorType::PatchVectors<double>::NullaryExpr(\n          [&]() { return uniform01(gen); });\n  bearings_host.row(2).array() = 1;\n  bearings_host.colwise().normalize();\n\n  ImageType image = ImageType::NullaryExpr(\n      [&]() { return static_cast<uint8_t>(uniform0255(gen)); });\n  FunctorType::Grid grid(image.data(), 0, image.rows(), 0, image.cols());\n  FunctorType::Interpolator image_target(grid);\n\n  FunctorType::Intrinsics intrinsics;\n  intrinsics << 128, 128, 1, -1, 0.5, 0.5;\n\n  std::unique_ptr<ceres::CostFunction> cost_function(\n      new ceres::AutoDiffCostFunction<FunctorType,\n                                      FunctorType::PATCH_SIZE,\n                                      FunctorType::POSE_SIZE,\n                                      FunctorType::POSE_SIZE,\n                                      FunctorType::POINT_SIZE>(new FunctorType(\n          intensities_host, bearings_host, image_target, intrinsics)));\n\n  for (auto _ : state) {\n    cost_function->Evaluate(\n        parameters, residuals, state.range(0) ? jacobians : nullptr);\n  }\n}\n\nBENCHMARK(BM_PhotometricAutoDiff)->Arg(0)->Arg(1);\n\nstatic void BM_RelativePoseAutoDiff(benchmark::State& state) {\n  using FunctorType = RelativePoseError;\n\n  double parameter_block1[] = {1., 2., 3., 4., 5., 6., 7.};\n  double parameter_block2[] = {1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1};\n  double* parameters[] = {parameter_block1, parameter_block2};\n\n  Eigen::Map<Eigen::Quaterniond>(parameter_block1).normalize();\n  Eigen::Map<Eigen::Quaterniond>(parameter_block2).normalize();\n\n  double jacobian1[6 * 7];\n  double jacobian2[6 * 7];\n  double residuals[6];\n  double* jacobians[] = {jacobian1, jacobian2};\n\n  Eigen::Quaterniond q_i_j = Eigen::Quaterniond(1, 2, 3, 4).normalized();\n  Eigen::Vector3d t_i_j(1, 2, 3);\n\n  std::unique_ptr<ceres::CostFunction> cost_function(\n      new ceres::AutoDiffCostFunction<FunctorType, 6, 7, 7>(\n          new FunctorType(q_i_j, t_i_j)));\n\n  for (auto _ : state) {\n    cost_function->Evaluate(\n        parameters, residuals, state.range(0) ? jacobians : nullptr);\n  }\n}\n\nBENCHMARK(BM_RelativePoseAutoDiff)->Arg(0)->Arg(1);\n\nstatic void BM_BrdfAutoDiff(benchmark::State& state) {\n  using FunctorType = ceres::internal::CostFunctionToFunctor<Brdf>;\n\n  double material[] = {1., 2., 3., 4., 5., 6., 7., 8., 9., 10.};\n  auto c = Eigen::Vector3d(0.1, 0.2, 0.3);\n  auto n = Eigen::Vector3d(-0.1, 0.5, 0.2).normalized();\n  auto v = Eigen::Vector3d(0.5, -0.2, 0.9).normalized();\n  auto l = Eigen::Vector3d(-0.3, 0.4, -0.3).normalized();\n  auto x = Eigen::Vector3d(0.5, 0.7, -0.1).normalized();\n  auto y = Eigen::Vector3d(0.2, -0.2, -0.2).normalized();\n\n  double* parameters[7] = {\n      material, c.data(), n.data(), v.data(), l.data(), x.data(), y.data()};\n\n  double jacobian[(10 + 6 * 3) * 3];\n  double residuals[3];\n  double* jacobians[7] = {\n      jacobian + 0,\n      jacobian + 10 * 3,\n      jacobian + 13 * 3,\n      jacobian + 16 * 3,\n      jacobian + 19 * 3,\n      jacobian + 22 * 3,\n      jacobian + 25 * 3,\n  };\n\n  std::unique_ptr<ceres::CostFunction> cost_function(\n      new ceres::AutoDiffCostFunction<FunctorType, 3, 10, 3, 3, 3, 3, 3, 3>(\n          new FunctorType));\n\n  for (auto _ : state) {\n    cost_function->Evaluate(\n        parameters, residuals, state.range(0) ? jacobians : nullptr);\n  }\n}\n\nBENCHMARK(BM_BrdfAutoDiff)->Arg(0)->Arg(1);\n\n}  // namespace ceres\n\nBENCHMARK_MAIN();\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/autodiff_benchmarks/brdf_cost_function.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2020 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: darius.rueckert@fau.de (Darius Rueckert)\n//\n//\n#ifndef CERES_INTERNAL_AUTODIFF_BENCHMARK_BRDF_COST_FUNCTION_H_\n#define CERES_INTERNAL_AUTODIFF_BENCHMARK_BRDF_COST_FUNCTION_H_\n\n#include <Eigen/Core>\n#include <cmath>\n\nnamespace ceres {\n\n// The brdf is based on:\n// Burley, Brent, and Walt Disney Animation Studios. \"Physically-based shading\n// at disney.\" ACM SIGGRAPH. Vol. 2012. 2012.\n//\n// The implementation is based on:\n// https://github.com/wdas/brdf/blob/master/src/brdfs/disney.brdf\nstruct Brdf {\n public:\n  Brdf() {}\n\n  template <typename T>\n  bool operator()(const T* const material,\n                  const T* const c_ptr,\n                  const T* const n_ptr,\n                  const T* const v_ptr,\n                  const T* const l_ptr,\n                  const T* const x_ptr,\n                  const T* const y_ptr,\n                  T* residual) const {\n    using Vec3 = Eigen::Matrix<T, 3, 1>;\n\n    T metallic = material[0];\n    T subsurface = material[1];\n    T specular = material[2];\n    T roughness = material[3];\n    T specular_tint = material[4];\n    T anisotropic = material[5];\n    T sheen = material[6];\n    T sheen_tint = material[7];\n    T clearcoat = material[8];\n    T clearcoat_gloss = material[9];\n\n    Eigen::Map<const Vec3> c(c_ptr);\n    Eigen::Map<const Vec3> n(n_ptr);\n    Eigen::Map<const Vec3> v(v_ptr);\n    Eigen::Map<const Vec3> l(l_ptr);\n    Eigen::Map<const Vec3> x(x_ptr);\n    Eigen::Map<const Vec3> y(y_ptr);\n\n    const T n_dot_l = n.dot(l);\n    const T n_dot_v = n.dot(v);\n\n    const Vec3 l_p_v = l + v;\n    const Vec3 h = l_p_v / l_p_v.norm();\n\n    const T n_dot_h = n.dot(h);\n    const T l_dot_h = l.dot(h);\n\n    const T h_dot_x = h.dot(x);\n    const T h_dot_y = h.dot(y);\n\n    const T c_dlum = T(0.3) * c[0] + T(0.6) * c[1] + T(0.1) * c[2];\n\n    const Vec3 c_tint = c / c_dlum;\n\n    const Vec3 c_spec0 =\n        Lerp(specular * T(0.08) *\n                 Lerp(Vec3(T(1), T(1), T(1)), c_tint, specular_tint),\n             c,\n             metallic);\n    const Vec3 c_sheen = Lerp(Vec3(T(1), T(1), T(1)), c_tint, sheen_tint);\n\n    // Diffuse fresnel - go from 1 at normal incidence to .5 at grazing\n    // and mix in diffuse retro-reflection based on roughness\n    const T fl = SchlickFresnel(n_dot_l);\n    const T fv = SchlickFresnel(n_dot_v);\n    const T fd_90 = T(0.5) + T(2) * l_dot_h * l_dot_h * roughness;\n    const T fd = Lerp(T(1), fd_90, fl) * Lerp(T(1), fd_90, fv);\n\n    // Based on Hanrahan-Krueger brdf approximation of isotropic bssrdf\n    // 1.25 scale is used to (roughly) preserve albedo\n    // Fss90 used to \"flatten\" retroreflection based on roughness\n    const T fss_90 = l_dot_h * l_dot_h * roughness;\n    const T fss = Lerp(T(1), fss_90, fl) * Lerp(T(1), fss_90, fv);\n    const T ss =\n        T(1.25) * (fss * (T(1) / (n_dot_l + n_dot_v) - T(0.5)) + T(0.5));\n\n    // specular\n    const T eps = T(0.001);\n    const T aspct = Aspect(anisotropic);\n    const T ax_temp = Square(roughness) / aspct;\n    const T ay_temp = Square(roughness) * aspct;\n    const T ax = (ax_temp < eps ? eps : ax_temp);\n    const T ay = (ay_temp < eps ? eps : ay_temp);\n    const T ds = GTR2Aniso(n_dot_h, h_dot_x, h_dot_y, ax, ay);\n    const T fh = SchlickFresnel(l_dot_h);\n    const Vec3 fs = Lerp(c_spec0, Vec3(T(1), T(1), T(1)), fh);\n    const T roughg = Square(roughness * T(0.5) + T(0.5));\n    const T ggxn_dot_l = SmithG_GGX(n_dot_l, roughg);\n    const T ggxn_dot_v = SmithG_GGX(n_dot_v, roughg);\n    const T gs = ggxn_dot_l * ggxn_dot_v;\n\n    // sheen\n    const Vec3 f_sheen = fh * sheen * c_sheen;\n\n    // clearcoat (ior = 1.5 -> F0 = 0.04)\n    const T a = Lerp(T(0.1), T(0.001), clearcoat_gloss);\n    const T dr = GTR1(n_dot_h, a);\n    const T fr = Lerp(T(0.04), T(1), fh);\n    const T cggxn_dot_l = SmithG_GGX(n_dot_l, T(0.25));\n    const T cggxn_dot_v = SmithG_GGX(n_dot_v, T(0.25));\n    const T gr = cggxn_dot_l * cggxn_dot_v;\n\n    const Vec3 result_no_cosine =\n        (T(1.0 / M_PI) * Lerp(fd, ss, subsurface) * c + f_sheen) *\n            (T(1) - metallic) +\n        gs * fs * ds +\n        Vec3(T(0.25), T(0.25), T(0.25)) * clearcoat * gr * fr * dr;\n    const Vec3 result = n_dot_l * result_no_cosine;\n    residual[0] = result(0);\n    residual[1] = result(1);\n    residual[2] = result(2);\n\n    return true;\n  }\n\n  template <typename T>\n  T SchlickFresnel(const T& u) const {\n    T m = T(1) - u;\n    const T m2 = m * m;\n    return m2 * m2 * m;  // (1-u)^5\n  }\n\n  template <typename T>\n  T Aspect(const T& anisotropic) const {\n    return T(sqrt(T(1) - anisotropic * T(0.9)));\n  }\n\n  template <typename T>\n  T SmithG_GGX(const T& n_dot_v, const T& alpha_g) const {\n    const T a = alpha_g * alpha_g;\n    const T b = n_dot_v * n_dot_v;\n    return T(1) / (n_dot_v + T(sqrt(a + b - a * b)));\n  }\n\n  // Generalized-Trowbridge-Reitz (GTR) Microfacet Distribution\n  // See paper, Appendix B\n  template <typename T>\n  T GTR1(const T& n_dot_h, const T& a) const {\n    T result = T(0);\n\n    if (a >= T(1)) {\n      result = T(1 / M_PI);\n    } else {\n      const T a2 = a * a;\n      const T t = T(1) + (a2 - T(1)) * n_dot_h * n_dot_h;\n      result = (a2 - T(1)) / (T(M_PI) * T(log(a2) * t));\n    }\n    return result;\n  }\n\n  template <typename T>\n  T GTR2Aniso(const T& n_dot_h,\n              const T& h_dot_x,\n              const T& h_dot_y,\n              const T& ax,\n              const T& ay) const {\n    return T(1) / (T(M_PI) * ax * ay *\n                   Square(Square(h_dot_x / ax) + Square(h_dot_y / ay) +\n                          n_dot_h * n_dot_h));\n  }\n\n  template <typename T>\n  inline T Lerp(const T& a, const T& b, const T& u) const {\n    return a + u * (b - a);\n  }\n\n  template <typename Derived1, typename Derived2>\n  typename Derived1::PlainObject Lerp(const Eigen::MatrixBase<Derived1>& a,\n                                      const Eigen::MatrixBase<Derived2>& b,\n                                      typename Derived1::Scalar alpha) const {\n    return (typename Derived1::Scalar(1) - alpha) * a + alpha * b;\n  }\n\n  template <typename T>\n  inline T Square(const T& x) const {\n    return x * x;\n  }\n};\n\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_AUTODIFF_BENCHMARK_BRDF_COST_FUNCTION_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/autodiff_benchmarks/constant_cost_function.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2020 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: darius.rueckert@fau.de (Darius Rueckert)\n//\n//\n#ifndef CERES_INTERNAL_AUTODIFF_BENCHMARKS_CONSTANT_COST_FUNCTIONS_H_\n#define CERES_INTERNAL_AUTODIFF_BENCHMARKS_CONSTANT_COST_FUNCTIONS_H_\n\n#include \"ceres/sized_cost_function.h\"\n\nnamespace ceres {\n\ntemplate <int kParameterBlockSize>\nstruct ConstantCostFunction\n    : public ceres::SizedCostFunction<1, kParameterBlockSize> {\n  template <typename T>\n  bool operator()(const T* const x, T* residuals) const {\n    residuals[0] = T(5);\n    return true;\n  }\n\n  virtual bool Evaluate(double const* const* parameters,\n                        double* residuals,\n                        double** jacobians) const {\n    residuals[0] = 5.0;\n    if (jacobians) {\n      if (jacobians[0]) {\n        memset(jacobians[0], 0, sizeof(double) * kParameterBlockSize);\n      }\n    }\n    return true;\n  }\n};\n\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_AUTODIFF_BENCHMARKS_CONSTANT_COST_FUNCTIONS_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/autodiff_benchmarks/linear_cost_functions.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2020 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: darius.rueckert@fau.de (Darius Rueckert)\n//\n//\n#ifndef CERES_INTERNAL_AUTODIFF_BENCHMARKS_LINEAR_COST_FUNCTIONS_H_\n#define CERES_INTERNAL_AUTODIFF_BENCHMARKS_LINEAR_COST_FUNCTIONS_H_\n\n#include \"ceres/rotation.h\"\n\nnamespace ceres {\n\nstruct Linear1CostFunction {\n  template <typename T>\n  bool operator()(const T* const x, T* residuals) const {\n    residuals[0] = x[0] + T(10);\n    return true;\n  }\n};\n\nstruct Linear10CostFunction {\n  template <typename T>\n  bool operator()(const T* const x, T* residuals) const {\n    for (int i = 0; i < 10; ++i) {\n      residuals[i] = x[i] + T(i);\n    }\n    return true;\n  }\n};\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_AUTODIFF_BENCHMARKS_LINEAR_COST_FUNCTIONS_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/autodiff_benchmarks/photometric_error.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2020 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: nikolaus@nikolaus-demmel.de (Nikolaus Demmel)\n//\n//\n#ifndef CERES_INTERNAL_AUTODIFF_BENCHMARK_PHOTOMETRIC_ERROR_H_\n#define CERES_INTERNAL_AUTODIFF_BENCHMARK_PHOTOMETRIC_ERROR_H_\n\n#include <Eigen/Dense>\n\n#include \"ceres/cubic_interpolation.h\"\n\nnamespace ceres {\n\n// Photometric residual that computes the intensity difference for a patch\n// between host and target frame. The point is parameterized with inverse\n// distance relative to the host frame. The relative pose between host and\n// target frame is computed from their respective absolute poses.\n//\n// The residual is similar to the one defined by Engel et al. [1]. Differences\n// include:\n//\n// 1. Use of a camera model based on spherical projection, namely the enhanced\n// unified camera model [2][3]. This is intended to bring some variability to\n// the benchmark compared to the SnavelyReprojection that uses a\n// polynomial-based distortion model.\n//\n// 2. To match the camera model, inverse distance parameterization is used for\n// points instead of inverse depth [4].\n//\n// 3. For simplicity, camera intrinsics are assumed constant, and thus host\n// frame points are passed as (unprojected) bearing vectors, which avoids the\n// need for an 'unproject' function.\n//\n// 4. Some details of the residual in [1] are omitted for simplicity: The\n// brightness transform parameters [a,b], the constant pre-weight w, and the\n// per-pixel robust norm.\n//\n// [1] J. Engel, V. Koltun and D. Cremers, \"Direct Sparse Odometry,\" in IEEE\n// Transactions on Pattern Analysis and Machine Intelligence, vol. 40, no. 3,\n// pp. 611-625, 1 March 2018.\n//\n// [2] B. Khomutenko, G. Garcia and P. Martinet, \"An Enhanced Unified Camera\n// Model,\" in IEEE Robotics and Automation Letters, vol. 1, no. 1, pp. 137-144,\n// Jan. 2016.\n//\n// [3] V. Usenko, N. Demmel and D. Cremers, \"The Double Sphere Camera Model,\"\n// 2018 International Conference on 3D Vision (3DV), Verona, 2018, pp. 552-560.\n//\n// [4] H. Matsuki, L. von Stumberg, V. Usenko, J. Stückler and D. Cremers,\n// \"Omnidirectional DSO: Direct Sparse Odometry With Fisheye Cameras,\" in IEEE\n// Robotics and Automation Letters, vol. 3, no. 4, pp. 3693-3700, Oct. 2018.\ntemplate <int PATCH_SIZE_ = 8>\nstruct PhotometricError {\n  static constexpr int PATCH_SIZE = PATCH_SIZE_;\n  static constexpr int POSE_SIZE = 7;\n  static constexpr int POINT_SIZE = 1;\n\n  using Grid = Grid2D<uint8_t, 1>;\n  using Interpolator = BiCubicInterpolator<Grid>;\n  using Intrinsics = Eigen::Array<double, 6, 1>;\n\n  template <typename T>\n  using Patch = Eigen::Array<T, PATCH_SIZE, 1>;\n\n  template <typename T>\n  using PatchVectors = Eigen::Matrix<T, 3, PATCH_SIZE>;\n\n  PhotometricError(const Patch<double>& intensities_host,\n                   const PatchVectors<double>& bearings_host,\n                   const Interpolator& image_target,\n                   const Intrinsics& intrinsics)\n      : intensities_host_(intensities_host),\n        bearings_host_(bearings_host),\n        image_target_(image_target),\n        intrinsics_(intrinsics) {}\n\n  template <typename T>\n  bool Project(Eigen::Matrix<T, 2, 1>& proj,\n               const Eigen::Matrix<T, 3, 1>& p) const {\n    const double& fx = intrinsics_[0];\n    const double& fy = intrinsics_[1];\n    const double& cx = intrinsics_[2];\n    const double& cy = intrinsics_[3];\n    const double& alpha = intrinsics_[4];\n    const double& beta = intrinsics_[5];\n\n    const T rho2 = beta * (p.x() * p.x() + p.y() * p.y()) + p.z() * p.z();\n    const T rho = sqrt(rho2);\n\n    // Check if 3D point is in domain of projection function.\n    // See (8) and (17) in [3].\n    constexpr double NUMERIC_EPSILON = 1e-10;\n    const double w =\n        alpha > 0.5 ? (1.0 - alpha) / alpha : alpha / (1.0 - alpha);\n    if (p.z() <= -w * rho + NUMERIC_EPSILON) {\n      return false;\n    }\n\n    const T norm = alpha * rho + (1.0 - alpha) * p.z();\n    const T norm_inv = 1.0 / norm;\n\n    const T mx = p.x() * norm_inv;\n    const T my = p.y() * norm_inv;\n\n    proj[0] = fx * mx + cx;\n    proj[1] = fy * my + cy;\n\n    return true;\n  }\n\n  template <typename T>\n  bool operator()(const T* const pose_host_ptr,\n                  const T* const pose_target_ptr,\n                  const T* const idist_ptr,\n                  T* residuals_ptr) const {\n    Eigen::Map<const Eigen::Quaternion<T>> q_w_h(pose_host_ptr);\n    Eigen::Map<const Eigen::Matrix<T, 3, 1>> t_w_h(pose_host_ptr + 4);\n    Eigen::Map<const Eigen::Quaternion<T>> q_w_t(pose_target_ptr);\n    Eigen::Map<const Eigen::Matrix<T, 3, 1>> t_w_t(pose_target_ptr + 4);\n    const T& idist = *idist_ptr;\n    Eigen::Map<Patch<T>> residuals(residuals_ptr);\n\n    // Compute relative pose from host to target frame.\n    const Eigen::Quaternion<T> q_t_h = q_w_t.conjugate() * q_w_h;\n    const Eigen::Matrix<T, 3, 3> R_t_h = q_t_h.toRotationMatrix();\n    const Eigen::Matrix<T, 3, 1> t_t_h = q_w_t.conjugate() * (t_w_h - t_w_t);\n\n    // Transform points from host to target frame. 3D point in target frame is\n    // scaled by idist for numerical stability when idist is close to 0\n    // (projection is invariant to scaling).\n    PatchVectors<T> p_target_scaled =\n        (R_t_h * bearings_host_).colwise() + idist * t_t_h;\n\n    // Project points and interpolate image.\n    Patch<T> intensities_target;\n    for (int i = 0; i < p_target_scaled.cols(); ++i) {\n      Eigen::Matrix<T, 2, 1> uv;\n      if (!Project(uv, Eigen::Matrix<T, 3, 1>(p_target_scaled.col(i)))) {\n        // If any point of the patch is outside the domain of the projection\n        // function, the residual cannot be evaluated. For the benchmark we want\n        // to avoid this case and thus throw an exception to indicate\n        // immediately if it does actually happen after possible future changes.\n        throw std::runtime_error(\"Benchmark data leads to invalid projection.\");\n      }\n\n      // Mind the order of u and v: Evaluate takes (row, column), but u is\n      // left-to-right and v top-to-bottom image axis.\n      image_target_.Evaluate(uv[1], uv[0], &intensities_target[i]);\n    }\n\n    // Residual is intensity difference between host and target frame.\n    residuals = intensities_target - intensities_host_;\n\n    return true;\n  }\n\n private:\n  const Patch<double>& intensities_host_;\n  const PatchVectors<double>& bearings_host_;\n  const Interpolator& image_target_;\n  const Intrinsics& intrinsics_;\n};\n}  // namespace ceres\n#endif  // CERES_INTERNAL_AUTODIFF_BENCHMARK_PHOTOMETRIC_ERROR_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/autodiff_benchmarks/relative_pose_error.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2020 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: nikolaus@nikolaus-demmel.de (Nikolaus Demmel)\n//\n//\n#ifndef CERES_INTERNAL_AUTODIFF_BENCHMARK_RELATIVE_POSE_ERROR_H_\n#define CERES_INTERNAL_AUTODIFF_BENCHMARK_RELATIVE_POSE_ERROR_H_\n\n#include <Eigen/Dense>\n\n#include \"ceres/rotation.h\"\n\nnamespace ceres {\n\n// Relative pose error as one might use in SE(3) pose graph optimization.\n// The measurement is a relative pose T_i_j, and the parameters are absolute\n// poses T_w_i and T_w_j. For the residual we use the log of the the residual\n// pose, in split representation SO(3) x R^3.\nstruct RelativePoseError {\n  RelativePoseError(const Eigen::Quaterniond& q_i_j,\n                    const Eigen::Vector3d& t_i_j)\n      : meas_q_i_j_(q_i_j), meas_t_i_j_(t_i_j) {}\n\n  template <typename T>\n  bool operator()(const T* const pose_i_ptr,\n                  const T* const pose_j_ptr,\n                  T* residuals_ptr) const {\n    Eigen::Map<const Eigen::Quaternion<T>> q_w_i(pose_i_ptr);\n    Eigen::Map<const Eigen::Matrix<T, 3, 1>> t_w_i(pose_i_ptr + 4);\n    Eigen::Map<const Eigen::Quaternion<T>> q_w_j(pose_j_ptr);\n    Eigen::Map<const Eigen::Matrix<T, 3, 1>> t_w_j(pose_j_ptr + 4);\n    Eigen::Map<Eigen::Matrix<T, 6, 1>> residuals(residuals_ptr);\n\n    // Compute estimate of relative pose from i to j.\n    const Eigen::Quaternion<T> est_q_j_i = q_w_j.conjugate() * q_w_i;\n    const Eigen::Matrix<T, 3, 1> est_t_j_i =\n        q_w_j.conjugate() * (t_w_i - t_w_j);\n\n    // Compute residual pose.\n    const Eigen::Quaternion<T> res_q = meas_q_i_j_.cast<T>() * est_q_j_i;\n    const Eigen::Matrix<T, 3, 1> res_t =\n        meas_q_i_j_.cast<T>() * est_t_j_i + meas_t_i_j_;\n\n    // Convert quaternion to ceres convention (Eigen stores xyzw, Ceres wxyz).\n    Eigen::Matrix<T, 4, 1> res_q_ceres;\n    res_q_ceres << res_q.w(), res_q.vec();\n\n    // Residual is log of pose. Use split representation SO(3) x R^3.\n    QuaternionToAngleAxis(res_q_ceres.data(), residuals.data());\n    residuals.template bottomRows<3>() = res_t;\n\n    return true;\n  }\n\n private:\n  // Measurement of relative pose from j to i.\n  Eigen::Quaterniond meas_q_i_j_;\n  Eigen::Vector3d meas_t_i_j_;\n};\n}  // namespace ceres\n#endif  // CERES_INTERNAL_AUTODIFF_BENCHMARK_RELATIVE_POSE_ERROR_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/autodiff_benchmarks/snavely_reprojection_error.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2020 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: darius.rueckert@fau.de (Darius Rueckert)\n//\n//\n#ifndef CERES_INTERNAL_AUTODIFF_BENCHMARK_SNAVELY_REPROJECTION_ERROR_H_\n#define CERES_INTERNAL_AUTODIFF_BENCHMARK_SNAVELY_REPROJECTION_ERROR_H_\n\n#include \"ceres/rotation.h\"\n\nnamespace ceres {\n\nstruct SnavelyReprojectionError {\n  SnavelyReprojectionError(double observed_x, double observed_y)\n      : observed_x(observed_x), observed_y(observed_y) {}\n\n  SnavelyReprojectionError() = default;\n  template <typename T>\n  bool operator()(const T* const camera,\n                  const T* const point,\n                  T* residuals) const {\n    T ox = T(observed_x);\n    T oy = T(observed_y);\n\n    // camera[0,1,2] are the angle-axis rotation.\n    T p[3];\n    ceres::AngleAxisRotatePoint(camera, point, p);\n\n    // camera[3,4,5] are the translation.\n    p[0] += camera[3];\n    p[1] += camera[4];\n    p[2] += camera[5];\n\n    // Compute the center of distortion. The sign change comes from\n    // the camera model that Noah Snavely's Bundler assumes, whereby\n    // the camera coordinate system has a negative z axis.\n    const T xp = -p[0] / p[2];\n    const T yp = -p[1] / p[2];\n\n    // Apply second and fourth order radial distortion.\n    const T& l1 = camera[7];\n    const T& l2 = camera[8];\n    const T r2 = xp * xp + yp * yp;\n    const T distortion = T(1.0) + r2 * (l1 + l2 * r2);\n\n    // Compute final projected point position.\n    const T& focal = camera[6];\n    const T predicted_x = focal * distortion * xp;\n    const T predicted_y = focal * distortion * yp;\n\n    // The error is the difference between the predicted and observed position.\n    residuals[0] = predicted_x - ox;\n    residuals[1] = predicted_y - oy;\n\n    return true;\n  }\n  double observed_x;\n  double observed_y;\n};\n}  // namespace ceres\n#endif  // CERES_INTERNAL_AUTODIFF_BENCHMARK_SNAVELY_REPROJECTION_ERROR_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/autodiff_cost_function_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/autodiff_cost_function.h\"\n\n#include <memory>\n\n#include \"gtest/gtest.h\"\n#include \"ceres/cost_function.h\"\n#include \"ceres/array_utils.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass BinaryScalarCost {\n public:\n  explicit BinaryScalarCost(double a): a_(a) {}\n  template <typename T>\n  bool operator()(const T* const x, const T* const y,\n                  T* cost) const {\n    cost[0] = x[0] * y[0] + x[1] * y[1]  - T(a_);\n    return true;\n  }\n private:\n  double a_;\n};\n\nTEST(AutodiffCostFunction, BilinearDifferentiationTest) {\n  CostFunction* cost_function  =\n    new AutoDiffCostFunction<BinaryScalarCost, 1, 2, 2>(\n        new BinaryScalarCost(1.0));\n\n  double** parameters = new double*[2];\n  parameters[0] = new double[2];\n  parameters[1] = new double[2];\n\n  parameters[0][0] = 1;\n  parameters[0][1] = 2;\n\n  parameters[1][0] = 3;\n  parameters[1][1] = 4;\n\n  double** jacobians = new double*[2];\n  jacobians[0] = new double[2];\n  jacobians[1] = new double[2];\n\n  double residuals = 0.0;\n\n  cost_function->Evaluate(parameters, &residuals, nullptr);\n  EXPECT_EQ(10.0, residuals);\n\n  cost_function->Evaluate(parameters, &residuals, jacobians);\n  EXPECT_EQ(10.0, residuals);\n\n  EXPECT_EQ(3, jacobians[0][0]);\n  EXPECT_EQ(4, jacobians[0][1]);\n  EXPECT_EQ(1, jacobians[1][0]);\n  EXPECT_EQ(2, jacobians[1][1]);\n\n  delete[] jacobians[0];\n  delete[] jacobians[1];\n  delete[] parameters[0];\n  delete[] parameters[1];\n  delete[] jacobians;\n  delete[] parameters;\n  delete cost_function;\n}\n\nstruct TenParameterCost {\n  template <typename T>\n  bool operator()(const T* const x0,\n                  const T* const x1,\n                  const T* const x2,\n                  const T* const x3,\n                  const T* const x4,\n                  const T* const x5,\n                  const T* const x6,\n                  const T* const x7,\n                  const T* const x8,\n                  const T* const x9,\n                  T* cost) const {\n    cost[0] = *x0 + *x1 + *x2 + *x3 + *x4 + *x5 + *x6 + *x7 + *x8 + *x9;\n    return true;\n  }\n};\n\nTEST(AutodiffCostFunction, ManyParameterAutodiffInstantiates) {\n  CostFunction* cost_function  =\n      new AutoDiffCostFunction<\n          TenParameterCost, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1>(\n              new TenParameterCost);\n\n  double** parameters = new double*[10];\n  double** jacobians = new double*[10];\n  for (int i = 0; i < 10; ++i) {\n    parameters[i] = new double[1];\n    parameters[i][0] = i;\n    jacobians[i] = new double[1];\n  }\n\n  double residuals = 0.0;\n\n  cost_function->Evaluate(parameters, &residuals, nullptr);\n  EXPECT_EQ(45.0, residuals);\n\n  cost_function->Evaluate(parameters, &residuals, jacobians);\n  EXPECT_EQ(residuals, 45.0);\n  for (int i = 0; i < 10; ++i) {\n    EXPECT_EQ(1.0, jacobians[i][0]);\n  }\n\n  for (int i = 0; i < 10; ++i) {\n    delete[] jacobians[i];\n    delete[] parameters[i];\n  }\n  delete[] jacobians;\n  delete[] parameters;\n  delete cost_function;\n}\n\nstruct OnlyFillsOneOutputFunctor {\n  template <typename T>\n  bool operator()(const T* x, T* output) const {\n    output[0] = x[0];\n    return true;\n  }\n};\n\nTEST(AutoDiffCostFunction, PartiallyFilledResidualShouldFailEvaluation) {\n  double parameter = 1.0;\n  double jacobian[2];\n  double residuals[2];\n  double* parameters[] = {&parameter};\n  double* jacobians[] = {jacobian};\n\n  std::unique_ptr<CostFunction> cost_function(\n      new AutoDiffCostFunction<OnlyFillsOneOutputFunctor, 2, 1>(\n          new OnlyFillsOneOutputFunctor));\n  InvalidateArray(2, jacobian);\n  InvalidateArray(2, residuals);\n  EXPECT_TRUE(cost_function->Evaluate(parameters, residuals, jacobians));\n  EXPECT_FALSE(IsArrayValid(2, jacobian));\n  EXPECT_FALSE(IsArrayValid(2, residuals));\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/autodiff_first_order_function_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/autodiff_first_order_function.h\"\n\n#include <memory>\n\n#include \"ceres/array_utils.h\"\n#include \"ceres/first_order_function.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass QuadraticCostFunctor {\n public:\n  explicit QuadraticCostFunctor(double a) : a_(a) {}\n  template <typename T>\n  bool operator()(const T* const x, T* cost) const {\n    cost[0] = x[0] * x[1] + x[2] * x[3] - T(a_);\n    return true;\n  }\n\n private:\n  double a_;\n};\n\nTEST(AutoDiffFirstOrderFunction, BilinearDifferentiationTest) {\n  std::unique_ptr<FirstOrderFunction> function(\n      new AutoDiffFirstOrderFunction<QuadraticCostFunctor, 4>(\n          new QuadraticCostFunctor(1.0)));\n\n  double parameters[4] = {1.0, 2.0, 3.0, 4.0};\n  double gradient[4];\n  double cost;\n\n  function->Evaluate(parameters, &cost, nullptr);\n  EXPECT_EQ(cost, 13.0);\n\n  cost = -1.0;\n  function->Evaluate(parameters, &cost, gradient);\n  EXPECT_EQ(cost, 13.0);\n  EXPECT_EQ(gradient[0], parameters[1]);\n  EXPECT_EQ(gradient[1], parameters[0]);\n  EXPECT_EQ(gradient[2], parameters[3]);\n  EXPECT_EQ(gradient[3], parameters[2]);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/autodiff_local_parameterization_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include <cmath>\n#include \"ceres/autodiff_local_parameterization.h\"\n#include \"ceres/local_parameterization.h\"\n#include \"ceres/rotation.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nstruct IdentityPlus {\n  template <typename T>\n  bool operator()(const T* x, const T* delta, T* x_plus_delta) const {\n    for (int i = 0; i < 3; ++i) {\n      x_plus_delta[i] = x[i] + delta[i];\n    }\n    return true;\n  }\n};\n\nTEST(AutoDiffLocalParameterizationTest, IdentityParameterization) {\n  AutoDiffLocalParameterization<IdentityPlus, 3, 3>\n      parameterization;\n\n  double x[3] = {1.0, 2.0, 3.0};\n  double delta[3] = {0.0, 1.0, 2.0};\n  double x_plus_delta[3] = {0.0, 0.0, 0.0};\n  parameterization.Plus(x, delta, x_plus_delta);\n\n  EXPECT_EQ(x_plus_delta[0], 1.0);\n  EXPECT_EQ(x_plus_delta[1], 3.0);\n  EXPECT_EQ(x_plus_delta[2], 5.0);\n\n  double jacobian[9];\n  parameterization.ComputeJacobian(x, jacobian);\n  int k = 0;\n  for (int i = 0; i < 3; ++i) {\n    for (int j = 0; j < 3; ++j, ++k) {\n      EXPECT_EQ(jacobian[k], (i == j) ? 1.0 : 0.0);\n    }\n  }\n}\n\nstruct ScaledPlus {\n  explicit ScaledPlus(const double &scale_factor)\n     : scale_factor_(scale_factor)\n  {}\n\n  template <typename T>\n  bool operator()(const T* x, const T* delta, T* x_plus_delta) const {\n    for (int i = 0; i < 3; ++i) {\n      x_plus_delta[i] = x[i] + T(scale_factor_) * delta[i];\n    }\n    return true;\n  }\n\n  const double scale_factor_;\n};\n\nTEST(AutoDiffLocalParameterizationTest, ScaledParameterization) {\n  const double kTolerance = 1e-14;\n\n  AutoDiffLocalParameterization<ScaledPlus, 3, 3>\n      parameterization(new ScaledPlus(1.2345));\n\n  double x[3] = {1.0, 2.0, 3.0};\n  double delta[3] = {0.0, 1.0, 2.0};\n  double x_plus_delta[3] = {0.0, 0.0, 0.0};\n  parameterization.Plus(x, delta, x_plus_delta);\n\n  EXPECT_NEAR(x_plus_delta[0], 1.0, kTolerance);\n  EXPECT_NEAR(x_plus_delta[1], 3.2345, kTolerance);\n  EXPECT_NEAR(x_plus_delta[2], 5.469, kTolerance);\n\n  double jacobian[9];\n  parameterization.ComputeJacobian(x, jacobian);\n  int k = 0;\n  for (int i = 0; i < 3; ++i) {\n    for (int j = 0; j < 3; ++j, ++k) {\n      EXPECT_NEAR(jacobian[k], (i == j) ? 1.2345 : 0.0, kTolerance);\n    }\n  }\n}\n\nstruct QuaternionPlus {\n  template<typename T>\n  bool operator()(const T* x, const T* delta, T* x_plus_delta) const {\n    const T squared_norm_delta =\n        delta[0] * delta[0] + delta[1] * delta[1] + delta[2] * delta[2];\n\n    T q_delta[4];\n    if (squared_norm_delta > T(0.0)) {\n      T norm_delta = sqrt(squared_norm_delta);\n      const T sin_delta_by_delta = sin(norm_delta) / norm_delta;\n      q_delta[0] = cos(norm_delta);\n      q_delta[1] = sin_delta_by_delta * delta[0];\n      q_delta[2] = sin_delta_by_delta * delta[1];\n      q_delta[3] = sin_delta_by_delta * delta[2];\n    } else {\n      // We do not just use q_delta = [1,0,0,0] here because that is a\n      // constant and when used for automatic differentiation will\n      // lead to a zero derivative. Instead we take a first order\n      // approximation and evaluate it at zero.\n      q_delta[0] = T(1.0);\n      q_delta[1] = delta[0];\n      q_delta[2] = delta[1];\n      q_delta[3] = delta[2];\n    }\n\n    QuaternionProduct(q_delta, x, x_plus_delta);\n    return true;\n  }\n};\n\nstatic void QuaternionParameterizationTestHelper(const double* x,\n                                                 const double* delta) {\n  const double kTolerance = 1e-14;\n  double x_plus_delta_ref[4] = {0.0, 0.0, 0.0, 0.0};\n  double jacobian_ref[12];\n\n\n  QuaternionParameterization ref_parameterization;\n  ref_parameterization.Plus(x, delta, x_plus_delta_ref);\n  ref_parameterization.ComputeJacobian(x, jacobian_ref);\n\n  double x_plus_delta[4] = {0.0, 0.0, 0.0, 0.0};\n  double jacobian[12];\n  AutoDiffLocalParameterization<QuaternionPlus, 4, 3> parameterization;\n  parameterization.Plus(x, delta, x_plus_delta);\n  parameterization.ComputeJacobian(x, jacobian);\n\n  for (int i = 0; i < 4; ++i) {\n    EXPECT_NEAR(x_plus_delta[i], x_plus_delta_ref[i], kTolerance);\n  }\n\n  const double x_plus_delta_norm =\n      sqrt(x_plus_delta[0] * x_plus_delta[0] +\n           x_plus_delta[1] * x_plus_delta[1] +\n           x_plus_delta[2] * x_plus_delta[2] +\n           x_plus_delta[3] * x_plus_delta[3]);\n\n  EXPECT_NEAR(x_plus_delta_norm, 1.0, kTolerance);\n\n  for (int i = 0; i < 12; ++i) {\n    EXPECT_TRUE(std::isfinite(jacobian[i]));\n    EXPECT_NEAR(jacobian[i], jacobian_ref[i], kTolerance)\n        << \"Jacobian mismatch: i = \" << i\n        << \"\\n Expected \\n\" << ConstMatrixRef(jacobian_ref, 4, 3)\n        << \"\\n Actual \\n\" << ConstMatrixRef(jacobian, 4, 3);\n  }\n}\n\nTEST(AutoDiffLocalParameterization, QuaternionParameterizationZeroTest) {\n  double x[4] = {0.5, 0.5, 0.5, 0.5};\n  double delta[3] = {0.0, 0.0, 0.0};\n  QuaternionParameterizationTestHelper(x, delta);\n}\n\n\nTEST(AutoDiffLocalParameterization, QuaternionParameterizationNearZeroTest) {\n  double x[4] = {0.52, 0.25, 0.15, 0.45};\n  double norm_x = sqrt(x[0] * x[0] +\n                       x[1] * x[1] +\n                       x[2] * x[2] +\n                       x[3] * x[3]);\n  for (int i = 0; i < 4; ++i) {\n    x[i] = x[i] / norm_x;\n  }\n\n  double delta[3] = {0.24, 0.15, 0.10};\n  for (int i = 0; i < 3; ++i) {\n    delta[i] = delta[i] * 1e-14;\n  }\n\n  QuaternionParameterizationTestHelper(x, delta);\n}\n\nTEST(AutoDiffLocalParameterization, QuaternionParameterizationNonZeroTest) {\n  double x[4] = {0.52, 0.25, 0.15, 0.45};\n  double norm_x = sqrt(x[0] * x[0] +\n                       x[1] * x[1] +\n                       x[2] * x[2] +\n                       x[3] * x[3]);\n\n  for (int i = 0; i < 4; ++i) {\n    x[i] = x[i] / norm_x;\n  }\n\n  double delta[3] = {0.24, 0.15, 0.10};\n  QuaternionParameterizationTestHelper(x, delta);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/autodiff_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n\n#include \"ceres/internal/autodiff.h\"\n\n#include \"ceres/random.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate <typename T>\ninline T& RowMajorAccess(T* base, int rows, int cols, int i, int j) {\n  return base[cols * i + j];\n}\n\n// Do (symmetric) finite differencing using the given function object 'b' of\n// type 'B' and scalar type 'T' with step size 'del'.\n//\n// The type B should have a signature\n//\n//   bool operator()(T const *, T *) const;\n//\n// which maps a vector of parameters to a vector of outputs.\ntemplate <typename B, typename T, int M, int N>\ninline bool SymmetricDiff(const B& b,\n                          const T par[N],\n                          T del,  // step size.\n                          T fun[M],\n                          T jac[M * N]) {  // row-major.\n  if (!b(par, fun)) {\n    return false;\n  }\n\n  // Temporary parameter vector.\n  T tmp_par[N];\n  for (int j = 0; j < N; ++j) {\n    tmp_par[j] = par[j];\n  }\n\n  // For each dimension, we do one forward step and one backward step in\n  // parameter space, and store the output vector vectors in these vectors.\n  T fwd_fun[M];\n  T bwd_fun[M];\n\n  for (int j = 0; j < N; ++j) {\n    // Forward step.\n    tmp_par[j] = par[j] + del;\n    if (!b(tmp_par, fwd_fun)) {\n      return false;\n    }\n\n    // Backward step.\n    tmp_par[j] = par[j] - del;\n    if (!b(tmp_par, bwd_fun)) {\n      return false;\n    }\n\n    // Symmetric differencing:\n    //   f'(a) = (f(a + h) - f(a - h)) / (2 h)\n    for (int i = 0; i < M; ++i) {\n      RowMajorAccess(jac, M, N, i, j) =\n          (fwd_fun[i] - bwd_fun[i]) / (T(2) * del);\n    }\n\n    // Restore our temporary vector.\n    tmp_par[j] = par[j];\n  }\n\n  return true;\n}\n\ntemplate <typename A>\ninline void QuaternionToScaledRotation(A const q[4], A R[3 * 3]) {\n  // Make convenient names for elements of q.\n  A a = q[0];\n  A b = q[1];\n  A c = q[2];\n  A d = q[3];\n  // This is not to eliminate common sub-expression, but to\n  // make the lines shorter so that they fit in 80 columns!\n  A aa = a * a;\n  A ab = a * b;\n  A ac = a * c;\n  A ad = a * d;\n  A bb = b * b;\n  A bc = b * c;\n  A bd = b * d;\n  A cc = c * c;\n  A cd = c * d;\n  A dd = d * d;\n#define R(i, j) RowMajorAccess(R, 3, 3, (i), (j))\n  R(0, 0) = aa + bb - cc - dd;\n  R(0, 1) = A(2) * (bc - ad);\n  R(0, 2) = A(2) * (ac + bd);  // NOLINT\n  R(1, 0) = A(2) * (ad + bc);\n  R(1, 1) = aa - bb + cc - dd;\n  R(1, 2) = A(2) * (cd - ab);  // NOLINT\n  R(2, 0) = A(2) * (bd - ac);\n  R(2, 1) = A(2) * (ab + cd);\n  R(2, 2) = aa - bb - cc + dd;  // NOLINT\n#undef R\n}\n\n// A structure for projecting a 3x4 camera matrix and a\n// homogeneous 3D point, to a 2D inhomogeneous point.\nstruct Projective {\n  // Function that takes P and X as separate vectors:\n  //   P, X -> x\n  template <typename A>\n  bool operator()(A const P[12], A const X[4], A x[2]) const {\n    A PX[3];\n    for (int i = 0; i < 3; ++i) {\n      PX[i] = RowMajorAccess(P, 3, 4, i, 0) * X[0] +\n              RowMajorAccess(P, 3, 4, i, 1) * X[1] +\n              RowMajorAccess(P, 3, 4, i, 2) * X[2] +\n              RowMajorAccess(P, 3, 4, i, 3) * X[3];\n    }\n    if (PX[2] != 0.0) {\n      x[0] = PX[0] / PX[2];\n      x[1] = PX[1] / PX[2];\n      return true;\n    }\n    return false;\n  }\n\n  // Version that takes P and X packed in one vector:\n  //\n  //   (P, X) -> x\n  //\n  template <typename A>\n  bool operator()(A const P_X[12 + 4], A x[2]) const {\n    return operator()(P_X + 0, P_X + 12, x);\n  }\n};\n\n// Test projective camera model projector.\nTEST(AutoDiff, ProjectiveCameraModel) {\n  srand(5);\n  double const tol = 1e-10;  // floating-point tolerance.\n  double const del = 1e-4;   // finite-difference step.\n  double const err = 1e-6;   // finite-difference tolerance.\n\n  Projective b;\n\n  // Make random P and X, in a single vector.\n  double PX[12 + 4];\n  for (int i = 0; i < 12 + 4; ++i) {\n    PX[i] = RandDouble();\n  }\n\n  // Handy names for the P and X parts.\n  double* P = PX + 0;\n  double* X = PX + 12;\n\n  // Apply the mapping, to get image point b_x.\n  double b_x[2];\n  b(P, X, b_x);\n\n  // Use finite differencing to estimate the Jacobian.\n  double fd_x[2];\n  double fd_J[2 * (12 + 4)];\n  ASSERT_TRUE(\n      (SymmetricDiff<Projective, double, 2, 12 + 4>(b, PX, del, fd_x, fd_J)));\n\n  for (int i = 0; i < 2; ++i) {\n    ASSERT_NEAR(fd_x[i], b_x[i], tol);\n  }\n\n  // Use automatic differentiation to compute the Jacobian.\n  double ad_x1[2];\n  double J_PX[2 * (12 + 4)];\n  {\n    double* parameters[] = {PX};\n    double* jacobians[] = {J_PX};\n    ASSERT_TRUE((AutoDifferentiate<2, StaticParameterDims<12 + 4>>(\n        b, parameters, 2, ad_x1, jacobians)));\n\n    for (int i = 0; i < 2; ++i) {\n      ASSERT_NEAR(ad_x1[i], b_x[i], tol);\n    }\n  }\n\n  // Use automatic differentiation (again), with two arguments.\n  {\n    double ad_x2[2];\n    double J_P[2 * 12];\n    double J_X[2 * 4];\n    double* parameters[] = {P, X};\n    double* jacobians[] = {J_P, J_X};\n    ASSERT_TRUE((AutoDifferentiate<2, StaticParameterDims<12, 4>>(\n        b, parameters, 2, ad_x2, jacobians)));\n\n    for (int i = 0; i < 2; ++i) {\n      ASSERT_NEAR(ad_x2[i], b_x[i], tol);\n    }\n\n    // Now compare the jacobians we got.\n    for (int i = 0; i < 2; ++i) {\n      for (int j = 0; j < 12 + 4; ++j) {\n        ASSERT_NEAR(J_PX[(12 + 4) * i + j], fd_J[(12 + 4) * i + j], err);\n      }\n\n      for (int j = 0; j < 12; ++j) {\n        ASSERT_NEAR(J_PX[(12 + 4) * i + j], J_P[12 * i + j], tol);\n      }\n      for (int j = 0; j < 4; ++j) {\n        ASSERT_NEAR(J_PX[(12 + 4) * i + 12 + j], J_X[4 * i + j], tol);\n      }\n    }\n  }\n}\n\n// Object to implement the projection by a calibrated camera.\nstruct Metric {\n  // The mapping is\n  //\n  //   q, c, X -> x = dehomg(R(q) (X - c))\n  //\n  // where q is a quaternion and c is the center of projection.\n  //\n  // This function takes three input vectors.\n  template <typename A>\n  bool operator()(A const q[4], A const c[3], A const X[3], A x[2]) const {\n    A R[3 * 3];\n    QuaternionToScaledRotation(q, R);\n\n    // Convert the quaternion mapping all the way to projective matrix.\n    A P[3 * 4];\n\n    // Set P(:, 1:3) = R\n    for (int i = 0; i < 3; ++i) {\n      for (int j = 0; j < 3; ++j) {\n        RowMajorAccess(P, 3, 4, i, j) = RowMajorAccess(R, 3, 3, i, j);\n      }\n    }\n\n    // Set P(:, 4) = - R c\n    for (int i = 0; i < 3; ++i) {\n      RowMajorAccess(P, 3, 4, i, 3) = -(RowMajorAccess(R, 3, 3, i, 0) * c[0] +\n                                        RowMajorAccess(R, 3, 3, i, 1) * c[1] +\n                                        RowMajorAccess(R, 3, 3, i, 2) * c[2]);\n    }\n\n    A X1[4] = {X[0], X[1], X[2], A(1)};\n    Projective p;\n    return p(P, X1, x);\n  }\n\n  // A version that takes a single vector.\n  template <typename A>\n  bool operator()(A const q_c_X[4 + 3 + 3], A x[2]) const {\n    return operator()(q_c_X, q_c_X + 4, q_c_X + 4 + 3, x);\n  }\n};\n\n// This test is similar in structure to the previous one.\nTEST(AutoDiff, Metric) {\n  srand(5);\n  double const tol = 1e-10;  // floating-point tolerance.\n  double const del = 1e-4;   // finite-difference step.\n  double const err = 1e-5;   // finite-difference tolerance.\n\n  Metric b;\n\n  // Make random parameter vector.\n  double qcX[4 + 3 + 3];\n  for (int i = 0; i < 4 + 3 + 3; ++i) qcX[i] = RandDouble();\n\n  // Handy names.\n  double* q = qcX;\n  double* c = qcX + 4;\n  double* X = qcX + 4 + 3;\n\n  // Compute projection, b_x.\n  double b_x[2];\n  ASSERT_TRUE(b(q, c, X, b_x));\n\n  // Finite differencing estimate of Jacobian.\n  double fd_x[2];\n  double fd_J[2 * (4 + 3 + 3)];\n  ASSERT_TRUE(\n      (SymmetricDiff<Metric, double, 2, 4 + 3 + 3>(b, qcX, del, fd_x, fd_J)));\n\n  for (int i = 0; i < 2; ++i) {\n    ASSERT_NEAR(fd_x[i], b_x[i], tol);\n  }\n\n  // Automatic differentiation.\n  double ad_x[2];\n  double J_q[2 * 4];\n  double J_c[2 * 3];\n  double J_X[2 * 3];\n  double* parameters[] = {q, c, X};\n  double* jacobians[] = {J_q, J_c, J_X};\n  ASSERT_TRUE((AutoDifferentiate<2, StaticParameterDims<4, 3, 3>>(\n      b, parameters, 2, ad_x, jacobians)));\n\n  for (int i = 0; i < 2; ++i) {\n    ASSERT_NEAR(ad_x[i], b_x[i], tol);\n  }\n\n  // Compare the pieces.\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 4; ++j) {\n      ASSERT_NEAR(J_q[4 * i + j], fd_J[(4 + 3 + 3) * i + j], err);\n    }\n    for (int j = 0; j < 3; ++j) {\n      ASSERT_NEAR(J_c[3 * i + j], fd_J[(4 + 3 + 3) * i + j + 4], err);\n    }\n    for (int j = 0; j < 3; ++j) {\n      ASSERT_NEAR(J_X[3 * i + j], fd_J[(4 + 3 + 3) * i + j + 4 + 3], err);\n    }\n  }\n}\n\nstruct VaryingResidualFunctor {\n  template <typename T>\n  bool operator()(const T x[2], T* y) const {\n    for (int i = 0; i < num_residuals; ++i) {\n      y[i] = T(i) * x[0] * x[1] * x[1];\n    }\n    return true;\n  }\n\n  int num_residuals;\n};\n\nTEST(AutoDiff, VaryingNumberOfResidualsForOneCostFunctorType) {\n  double x[2] = {1.0, 5.5};\n  double* parameters[] = {x};\n  const int kMaxResiduals = 10;\n  double J_x[2 * kMaxResiduals];\n  double residuals[kMaxResiduals];\n  double* jacobians[] = {J_x};\n\n  // Use a single functor, but tweak it to produce different numbers of\n  // residuals.\n  VaryingResidualFunctor functor;\n\n  for (int num_residuals = 1; num_residuals < kMaxResiduals; ++num_residuals) {\n    // Tweak the number of residuals to produce.\n    functor.num_residuals = num_residuals;\n\n    // Run autodiff with the new number of residuals.\n    ASSERT_TRUE((AutoDifferentiate<DYNAMIC, StaticParameterDims<2>>(\n        functor, parameters, num_residuals, residuals, jacobians)));\n\n    const double kTolerance = 1e-14;\n    for (int i = 0; i < num_residuals; ++i) {\n      EXPECT_NEAR(J_x[2 * i + 0], i * x[1] * x[1], kTolerance) << \"i: \" << i;\n      EXPECT_NEAR(J_x[2 * i + 1], 2 * i * x[0] * x[1], kTolerance)\n          << \"i: \" << i;\n    }\n  }\n}\n\nstruct Residual1Param {\n  template <typename T>\n  bool operator()(const T* x0, T* y) const {\n    y[0] = *x0;\n    return true;\n  }\n};\n\nstruct Residual2Param {\n  template <typename T>\n  bool operator()(const T* x0, const T* x1, T* y) const {\n    y[0] = *x0 + pow(*x1, 2);\n    return true;\n  }\n};\n\nstruct Residual3Param {\n  template <typename T>\n  bool operator()(const T* x0, const T* x1, const T* x2, T* y) const {\n    y[0] = *x0 + pow(*x1, 2) + pow(*x2, 3);\n    return true;\n  }\n};\n\nstruct Residual4Param {\n  template <typename T>\n  bool operator()(\n      const T* x0, const T* x1, const T* x2, const T* x3, T* y) const {\n    y[0] = *x0 + pow(*x1, 2) + pow(*x2, 3) + pow(*x3, 4);\n    return true;\n  }\n};\n\nstruct Residual5Param {\n  template <typename T>\n  bool operator()(const T* x0,\n                  const T* x1,\n                  const T* x2,\n                  const T* x3,\n                  const T* x4,\n                  T* y) const {\n    y[0] = *x0 + pow(*x1, 2) + pow(*x2, 3) + pow(*x3, 4) + pow(*x4, 5);\n    return true;\n  }\n};\n\nstruct Residual6Param {\n  template <typename T>\n  bool operator()(const T* x0,\n                  const T* x1,\n                  const T* x2,\n                  const T* x3,\n                  const T* x4,\n                  const T* x5,\n                  T* y) const {\n    y[0] = *x0 + pow(*x1, 2) + pow(*x2, 3) + pow(*x3, 4) + pow(*x4, 5) +\n           pow(*x5, 6);\n    return true;\n  }\n};\n\nstruct Residual7Param {\n  template <typename T>\n  bool operator()(const T* x0,\n                  const T* x1,\n                  const T* x2,\n                  const T* x3,\n                  const T* x4,\n                  const T* x5,\n                  const T* x6,\n                  T* y) const {\n    y[0] = *x0 + pow(*x1, 2) + pow(*x2, 3) + pow(*x3, 4) + pow(*x4, 5) +\n           pow(*x5, 6) + pow(*x6, 7);\n    return true;\n  }\n};\n\nstruct Residual8Param {\n  template <typename T>\n  bool operator()(const T* x0,\n                  const T* x1,\n                  const T* x2,\n                  const T* x3,\n                  const T* x4,\n                  const T* x5,\n                  const T* x6,\n                  const T* x7,\n                  T* y) const {\n    y[0] = *x0 + pow(*x1, 2) + pow(*x2, 3) + pow(*x3, 4) + pow(*x4, 5) +\n           pow(*x5, 6) + pow(*x6, 7) + pow(*x7, 8);\n    return true;\n  }\n};\n\nstruct Residual9Param {\n  template <typename T>\n  bool operator()(const T* x0,\n                  const T* x1,\n                  const T* x2,\n                  const T* x3,\n                  const T* x4,\n                  const T* x5,\n                  const T* x6,\n                  const T* x7,\n                  const T* x8,\n                  T* y) const {\n    y[0] = *x0 + pow(*x1, 2) + pow(*x2, 3) + pow(*x3, 4) + pow(*x4, 5) +\n           pow(*x5, 6) + pow(*x6, 7) + pow(*x7, 8) + pow(*x8, 9);\n    return true;\n  }\n};\n\nstruct Residual10Param {\n  template <typename T>\n  bool operator()(const T* x0,\n                  const T* x1,\n                  const T* x2,\n                  const T* x3,\n                  const T* x4,\n                  const T* x5,\n                  const T* x6,\n                  const T* x7,\n                  const T* x8,\n                  const T* x9,\n                  T* y) const {\n    y[0] = *x0 + pow(*x1, 2) + pow(*x2, 3) + pow(*x3, 4) + pow(*x4, 5) +\n           pow(*x5, 6) + pow(*x6, 7) + pow(*x7, 8) + pow(*x8, 9) + pow(*x9, 10);\n    return true;\n  }\n};\n\nTEST(AutoDiff, VariadicAutoDiff) {\n  double x[10];\n  double residual = 0;\n  double* parameters[10];\n  double jacobian_values[10];\n  double* jacobians[10];\n\n  for (int i = 0; i < 10; ++i) {\n    x[i] = 2.0;\n    parameters[i] = x + i;\n    jacobians[i] = jacobian_values + i;\n  }\n\n  {\n    Residual1Param functor;\n    int num_variables = 1;\n    EXPECT_TRUE((AutoDifferentiate<1, StaticParameterDims<1>>(\n        functor, parameters, 1, &residual, jacobians)));\n    EXPECT_EQ(residual, pow(2, num_variables + 1) - 2);\n    for (int i = 0; i < num_variables; ++i) {\n      EXPECT_EQ(jacobian_values[i], (i + 1) * pow(2, i));\n    }\n  }\n\n  {\n    Residual2Param functor;\n    int num_variables = 2;\n    EXPECT_TRUE((AutoDifferentiate<1, StaticParameterDims<1, 1>>(\n        functor, parameters, 1, &residual, jacobians)));\n    EXPECT_EQ(residual, pow(2, num_variables + 1) - 2);\n    for (int i = 0; i < num_variables; ++i) {\n      EXPECT_EQ(jacobian_values[i], (i + 1) * pow(2, i));\n    }\n  }\n\n  {\n    Residual3Param functor;\n    int num_variables = 3;\n    EXPECT_TRUE((AutoDifferentiate<1, StaticParameterDims<1, 1, 1>>(\n        functor, parameters, 1, &residual, jacobians)));\n    EXPECT_EQ(residual, pow(2, num_variables + 1) - 2);\n    for (int i = 0; i < num_variables; ++i) {\n      EXPECT_EQ(jacobian_values[i], (i + 1) * pow(2, i));\n    }\n  }\n\n  {\n    Residual4Param functor;\n    int num_variables = 4;\n    EXPECT_TRUE((AutoDifferentiate<1, StaticParameterDims<1, 1, 1, 1>>(\n        functor, parameters, 1, &residual, jacobians)));\n    EXPECT_EQ(residual, pow(2, num_variables + 1) - 2);\n    for (int i = 0; i < num_variables; ++i) {\n      EXPECT_EQ(jacobian_values[i], (i + 1) * pow(2, i));\n    }\n  }\n\n  {\n    Residual5Param functor;\n    int num_variables = 5;\n    EXPECT_TRUE((AutoDifferentiate<1, StaticParameterDims<1, 1, 1, 1, 1>>(\n        functor, parameters, 1, &residual, jacobians)));\n    EXPECT_EQ(residual, pow(2, num_variables + 1) - 2);\n    for (int i = 0; i < num_variables; ++i) {\n      EXPECT_EQ(jacobian_values[i], (i + 1) * pow(2, i));\n    }\n  }\n\n  {\n    Residual6Param functor;\n    int num_variables = 6;\n    EXPECT_TRUE((AutoDifferentiate<1, StaticParameterDims<1, 1, 1, 1, 1, 1>>(\n        functor, parameters, 1, &residual, jacobians)));\n    EXPECT_EQ(residual, pow(2, num_variables + 1) - 2);\n    for (int i = 0; i < num_variables; ++i) {\n      EXPECT_EQ(jacobian_values[i], (i + 1) * pow(2, i));\n    }\n  }\n\n  {\n    Residual7Param functor;\n    int num_variables = 7;\n    EXPECT_TRUE((AutoDifferentiate<1, StaticParameterDims<1, 1, 1, 1, 1, 1, 1>>(\n        functor, parameters, 1, &residual, jacobians)));\n    EXPECT_EQ(residual, pow(2, num_variables + 1) - 2);\n    for (int i = 0; i < num_variables; ++i) {\n      EXPECT_EQ(jacobian_values[i], (i + 1) * pow(2, i));\n    }\n  }\n\n  {\n    Residual8Param functor;\n    int num_variables = 8;\n    EXPECT_TRUE(\n        (AutoDifferentiate<1, StaticParameterDims<1, 1, 1, 1, 1, 1, 1, 1>>(\n            functor, parameters, 1, &residual, jacobians)));\n    EXPECT_EQ(residual, pow(2, num_variables + 1) - 2);\n    for (int i = 0; i < num_variables; ++i) {\n      EXPECT_EQ(jacobian_values[i], (i + 1) * pow(2, i));\n    }\n  }\n\n  {\n    Residual9Param functor;\n    int num_variables = 9;\n    EXPECT_TRUE(\n        (AutoDifferentiate<1, StaticParameterDims<1, 1, 1, 1, 1, 1, 1, 1, 1>>(\n            functor, parameters, 1, &residual, jacobians)));\n    EXPECT_EQ(residual, pow(2, num_variables + 1) - 2);\n    for (int i = 0; i < num_variables; ++i) {\n      EXPECT_EQ(jacobian_values[i], (i + 1) * pow(2, i));\n    }\n  }\n\n  {\n    Residual10Param functor;\n    int num_variables = 10;\n    EXPECT_TRUE((\n        AutoDifferentiate<1, StaticParameterDims<1, 1, 1, 1, 1, 1, 1, 1, 1, 1>>(\n            functor, parameters, 1, &residual, jacobians)));\n    EXPECT_EQ(residual, pow(2, num_variables + 1) - 2);\n    for (int i = 0; i < num_variables; ++i) {\n      EXPECT_EQ(jacobian_values[i], (i + 1) * pow(2, i));\n    }\n  }\n}\n\n// This is fragile test that triggers the alignment bug on\n// i686-apple-darwin10-llvm-g++-4.2 (GCC) 4.2.1. It is quite possible,\n// that other combinations of operating system + compiler will\n// re-arrange the operations in this test.\n//\n// But this is the best (and only) way we know of to trigger this\n// problem for now. A more robust solution that guarantees the\n// alignment of Eigen types used for automatic differentiation would\n// be nice.\nTEST(AutoDiff, AlignedAllocationTest) {\n  // This int is needed to allocate 16 bits on the stack, so that the\n  // next allocation is not aligned by default.\n  char y = 0;\n\n  // This is needed to prevent the compiler from optimizing y out of\n  // this function.\n  y += 1;\n\n  typedef Jet<double, 2> JetT;\n  FixedArray<JetT, (256 * 7) / sizeof(JetT)> x(3);\n\n  // Need this to makes sure that x does not get optimized out.\n  x[0] = x[0] + JetT(1.0);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/benchmarks/macbook-pro-2014-small_blas_gemm_benchmark.json",
    "content": "{\n  \"context\": {\n    \"date\": \"2018-03-23 13:15:00\",\n    \"num_cpus\": 8,\n    \"mhz_per_cpu\": 2200,\n    \"cpu_scaling_enabled\": false,\n    \"library_build_type\": \"release\"\n  },\n  \"benchmarks\": [\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/1/1\",\n      \"iterations\": 70805770,\n      \"real_time\": 9.7085774076082654e+00,\n      \"cpu_time\": 9.7053531089344833e+00,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/1/2\",\n      \"iterations\": 74727246,\n      \"real_time\": 1.0385020397774865e+01,\n      \"cpu_time\": 1.0330810264304402e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/1/3\",\n      \"iterations\": 58161273,\n      \"real_time\": 1.1918587820938697e+01,\n      \"cpu_time\": 1.1860538196954527e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/1/4\",\n      \"iterations\": 48633401,\n      \"real_time\": 1.3997796658213307e+01,\n      \"cpu_time\": 1.3981090896768663e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/1/8\",\n      \"iterations\": 32240533,\n      \"real_time\": 2.1278021890062710e+01,\n      \"cpu_time\": 2.1243600408219077e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/1/12\",\n      \"iterations\": 25863853,\n      \"real_time\": 2.6210347317374435e+01,\n      \"cpu_time\": 2.6019054469571898e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/1/15\",\n      \"iterations\": 18352905,\n      \"real_time\": 3.6613193819894164e+01,\n      \"cpu_time\": 3.6547020757749202e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/2/1\",\n      \"iterations\": 73026206,\n      \"real_time\": 9.8186158953423952e+00,\n      \"cpu_time\": 9.8166677315811768e+00,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/2/2\",\n      \"iterations\": 58211574,\n      \"real_time\": 1.2254592290921693e+01,\n      \"cpu_time\": 1.2253937679128907e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/2/3\",\n      \"iterations\": 41788051,\n      \"real_time\": 1.6580228591773523e+01,\n      \"cpu_time\": 1.6553320469528451e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/2/4\",\n      \"iterations\": 37355846,\n      \"real_time\": 1.8618565967193987e+01,\n      \"cpu_time\": 1.8617300221229108e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/2/8\",\n      \"iterations\": 23951522,\n      \"real_time\": 2.9064576941597569e+01,\n      \"cpu_time\": 2.9063497509678122e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/2/12\",\n      \"iterations\": 17955394,\n      \"real_time\": 3.9849777902603556e+01,\n      \"cpu_time\": 3.9844906772861613e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/2/15\",\n      \"iterations\": 15072693,\n      \"real_time\": 4.7936877638126703e+01,\n      \"cpu_time\": 4.7922026939711373e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/3/1\",\n      \"iterations\": 70635009,\n      \"real_time\": 1.0202552222711139e+01,\n      \"cpu_time\": 1.0198639600937826e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/3/2\",\n      \"iterations\": 49235444,\n      \"real_time\": 1.5070878878523310e+01,\n      \"cpu_time\": 1.5068494152302112e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/3/3\",\n      \"iterations\": 38174808,\n      \"real_time\": 1.7475222821439619e+01,\n      \"cpu_time\": 1.7473879632872062e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/3/4\",\n      \"iterations\": 34106744,\n      \"real_time\": 2.0029404214340389e+01,\n      \"cpu_time\": 2.0028736838673233e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/3/8\",\n      \"iterations\": 20587933,\n      \"real_time\": 3.3617301212484371e+01,\n      \"cpu_time\": 3.3614787846842148e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/3/12\",\n      \"iterations\": 15313500,\n      \"real_time\": 4.6273360696817100e+01,\n      \"cpu_time\": 4.6255069056714703e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/3/15\",\n      \"iterations\": 11989586,\n      \"real_time\": 5.6997383313299295e+01,\n      \"cpu_time\": 5.6992209739351992e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/4/1\",\n      \"iterations\": 62076549,\n      \"real_time\": 1.1642173391475032e+01,\n      \"cpu_time\": 1.1573790933513360e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/4/2\",\n      \"iterations\": 43844265,\n      \"real_time\": 1.6274509083373967e+01,\n      \"cpu_time\": 1.6270428983129257e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/4/3\",\n      \"iterations\": 32460306,\n      \"real_time\": 2.0151312527943880e+01,\n      \"cpu_time\": 2.0150641833136220e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/4/4\",\n      \"iterations\": 30627603,\n      \"real_time\": 2.3542954928378649e+01,\n      \"cpu_time\": 2.3537787139267902e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/4/8\",\n      \"iterations\": 16957323,\n      \"real_time\": 3.8976102596893007e+01,\n      \"cpu_time\": 3.8964463907422207e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/4/12\",\n      \"iterations\": 11970314,\n      \"real_time\": 5.6122851917381425e+01,\n      \"cpu_time\": 5.6107550729245602e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/4/15\",\n      \"iterations\": 9639749,\n      \"real_time\": 7.5149670604821367e+01,\n      \"cpu_time\": 7.5115545020933837e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/8/1\",\n      \"iterations\": 46089625,\n      \"real_time\": 1.4720880177102261e+01,\n      \"cpu_time\": 1.4720059015450884e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/8/2\",\n      \"iterations\": 35845047,\n      \"real_time\": 2.0075989328449982e+01,\n      \"cpu_time\": 2.0073735710264213e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/8/3\",\n      \"iterations\": 27662955,\n      \"real_time\": 2.5734411745732761e+01,\n      \"cpu_time\": 2.5734018654189445e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/8/4\",\n      \"iterations\": 21879855,\n      \"real_time\": 3.4106283108315687e+01,\n      \"cpu_time\": 3.4089714031468731e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/8/8\",\n      \"iterations\": 10406446,\n      \"real_time\": 5.9840372689427156e+01,\n      \"cpu_time\": 5.9830512741813799e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/8/12\",\n      \"iterations\": 8903134,\n      \"real_time\": 8.5126016525115261e+01,\n      \"cpu_time\": 8.5104750754060177e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/8/15\",\n      \"iterations\": 6940176,\n      \"real_time\": 1.0028962911611278e+02,\n      \"cpu_time\": 1.0025855252085725e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/12/1\",\n      \"iterations\": 35671516,\n      \"real_time\": 1.8399173111134672e+01,\n      \"cpu_time\": 1.8397255670322537e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/12/2\",\n      \"iterations\": 25982607,\n      \"real_time\": 2.7018409545851057e+01,\n      \"cpu_time\": 2.7011839112218500e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/12/3\",\n      \"iterations\": 18737168,\n      \"real_time\": 3.3898883702445445e+01,\n      \"cpu_time\": 3.3861787437674536e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/12/4\",\n      \"iterations\": 15761399,\n      \"real_time\": 4.5105465061861274e+01,\n      \"cpu_time\": 4.5099042286791622e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/12/8\",\n      \"iterations\": 9303562,\n      \"real_time\": 7.9825693855906351e+01,\n      \"cpu_time\": 7.9811151900745131e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/12/12\",\n      \"iterations\": 5956180,\n      \"real_time\": 1.2225934256378150e+02,\n      \"cpu_time\": 1.2222196105557559e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/12/15\",\n      \"iterations\": 4506302,\n      \"real_time\": 1.4818435404415453e+02,\n      \"cpu_time\": 1.4815784650030173e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/15/1\",\n      \"iterations\": 35319999,\n      \"real_time\": 1.9630753360924967e+01,\n      \"cpu_time\": 1.9626416184213337e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/15/2\",\n      \"iterations\": 23526644,\n      \"real_time\": 3.0066773439214494e+01,\n      \"cpu_time\": 3.0055710453220922e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/15/3\",\n      \"iterations\": 17598729,\n      \"real_time\": 4.1083973283990723e+01,\n      \"cpu_time\": 4.1070806874746893e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/15/4\",\n      \"iterations\": 12271659,\n      \"real_time\": 5.3032831420852794e+01,\n      \"cpu_time\": 5.3028526949779170e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/15/8\",\n      \"iterations\": 7952738,\n      \"real_time\": 9.2429693026570703e+01,\n      \"cpu_time\": 9.2422131849433242e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/15/12\",\n      \"iterations\": 4950880,\n      \"real_time\": 1.2875667093472620e+02,\n      \"cpu_time\": 1.2874357689946041e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/1/15/15\",\n      \"iterations\": 3689648,\n      \"real_time\": 1.7201106256625351e+02,\n      \"cpu_time\": 1.7199635303963902e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/1/1\",\n      \"iterations\": 71110750,\n      \"real_time\": 1.0465632580976097e+01,\n      \"cpu_time\": 1.0462187503295935e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/1/2\",\n      \"iterations\": 38512960,\n      \"real_time\": 1.5239588699711753e+01,\n      \"cpu_time\": 1.5233105946673353e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/1/3\",\n      \"iterations\": 39388909,\n      \"real_time\": 1.8149611024686859e+01,\n      \"cpu_time\": 1.8142772118923137e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/1/4\",\n      \"iterations\": 32544668,\n      \"real_time\": 2.0374460451575882e+01,\n      \"cpu_time\": 2.0370863823222830e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/1/8\",\n      \"iterations\": 22523030,\n      \"real_time\": 3.1021126554300547e+01,\n      \"cpu_time\": 3.1018428692764868e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/1/12\",\n      \"iterations\": 16353383,\n      \"real_time\": 4.2191290576420187e+01,\n      \"cpu_time\": 4.2190903252250827e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/1/15\",\n      \"iterations\": 13760296,\n      \"real_time\": 6.3105678174993102e+01,\n      \"cpu_time\": 6.3084180747274651e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/2/1\",\n      \"iterations\": 53321552,\n      \"real_time\": 1.3571924725902662e+01,\n      \"cpu_time\": 1.3570760280946285e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/2/2\",\n      \"iterations\": 34553227,\n      \"real_time\": 1.9240029591502111e+01,\n      \"cpu_time\": 1.9238347839407254e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/2/3\",\n      \"iterations\": 26606966,\n      \"real_time\": 2.5684070292204609e+01,\n      \"cpu_time\": 2.5683123735340747e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/2/4\",\n      \"iterations\": 21813649,\n      \"real_time\": 3.3015750690106444e+01,\n      \"cpu_time\": 3.3012312612163001e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/2/8\",\n      \"iterations\": 13165814,\n      \"real_time\": 5.3961429801958381e+01,\n      \"cpu_time\": 5.3950329239043157e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/2/12\",\n      \"iterations\": 9855407,\n      \"real_time\": 7.7330575997830607e+01,\n      \"cpu_time\": 7.7299699545640294e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/2/15\",\n      \"iterations\": 7160320,\n      \"real_time\": 9.3059447338051214e+01,\n      \"cpu_time\": 9.3031456694673452e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/3/1\",\n      \"iterations\": 44724434,\n      \"real_time\": 1.5451907116408652e+01,\n      \"cpu_time\": 1.5450704194490172e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/3/2\",\n      \"iterations\": 31958363,\n      \"real_time\": 2.2135768501125039e+01,\n      \"cpu_time\": 2.2130576588043589e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/3/3\",\n      \"iterations\": 22712598,\n      \"real_time\": 2.8762911975815388e+01,\n      \"cpu_time\": 2.8760734461112644e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/3/4\",\n      \"iterations\": 19248749,\n      \"real_time\": 3.3782859186998586e+01,\n      \"cpu_time\": 3.3780377103987405e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/3/8\",\n      \"iterations\": 11206634,\n      \"real_time\": 6.0281978239576361e+01,\n      \"cpu_time\": 6.0263233366950296e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/3/12\",\n      \"iterations\": 7864550,\n      \"real_time\": 8.5909877865634058e+01,\n      \"cpu_time\": 8.5903198530112036e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/3/15\",\n      \"iterations\": 6630295,\n      \"real_time\": 1.0815029754593648e+02,\n      \"cpu_time\": 1.0812912547631571e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/4/1\",\n      \"iterations\": 40941658,\n      \"real_time\": 1.5922779899567644e+01,\n      \"cpu_time\": 1.5922657553340848e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/4/2\",\n      \"iterations\": 27517887,\n      \"real_time\": 2.4661230893842301e+01,\n      \"cpu_time\": 2.4659415165124962e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/4/3\",\n      \"iterations\": 21047188,\n      \"real_time\": 3.2587989757196986e+01,\n      \"cpu_time\": 3.2584495372968519e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/4/4\",\n      \"iterations\": 17532786,\n      \"real_time\": 4.0907714269629892e+01,\n      \"cpu_time\": 4.0893672003981131e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/4/8\",\n      \"iterations\": 10142723,\n      \"real_time\": 7.0529643763447154e+01,\n      \"cpu_time\": 7.0525045394614580e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/4/12\",\n      \"iterations\": 7004763,\n      \"real_time\": 1.0097909736219086e+02,\n      \"cpu_time\": 1.0097914804540859e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/4/15\",\n      \"iterations\": 4970108,\n      \"real_time\": 1.3961298447974306e+02,\n      \"cpu_time\": 1.3959455207009790e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/8/1\",\n      \"iterations\": 29905201,\n      \"real_time\": 2.1529462050555786e+01,\n      \"cpu_time\": 2.1529265093385952e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/8/2\",\n      \"iterations\": 21023483,\n      \"real_time\": 3.3446591554646147e+01,\n      \"cpu_time\": 3.3438988201907023e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/8/3\",\n      \"iterations\": 15687962,\n      \"real_time\": 4.4666488545947821e+01,\n      \"cpu_time\": 4.4652390157497358e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/8/4\",\n      \"iterations\": 12333715,\n      \"real_time\": 5.8456414226244306e+01,\n      \"cpu_time\": 5.8452218167843370e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/8/8\",\n      \"iterations\": 6708579,\n      \"real_time\": 1.0254277962264361e+02,\n      \"cpu_time\": 1.0254228205406758e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/8/12\",\n      \"iterations\": 4610116,\n      \"real_time\": 1.5292074472764102e+02,\n      \"cpu_time\": 1.5290352780710978e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/8/15\",\n      \"iterations\": 3740855,\n      \"real_time\": 1.8836253878858312e+02,\n      \"cpu_time\": 1.8835346464912590e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/12/1\",\n      \"iterations\": 26222827,\n      \"real_time\": 2.6458015643267686e+01,\n      \"cpu_time\": 2.6457444881896041e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/12/2\",\n      \"iterations\": 16369904,\n      \"real_time\": 4.2282200980283513e+01,\n      \"cpu_time\": 4.2270925962668763e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/12/3\",\n      \"iterations\": 12297530,\n      \"real_time\": 5.6847899220390829e+01,\n      \"cpu_time\": 5.6844911132561492e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/12/4\",\n      \"iterations\": 9635768,\n      \"real_time\": 7.4954440888332272e+01,\n      \"cpu_time\": 7.4952821612143552e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/12/8\",\n      \"iterations\": 4942805,\n      \"real_time\": 1.4190911294302057e+02,\n      \"cpu_time\": 1.4189574543199674e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/12/12\",\n      \"iterations\": 2953823,\n      \"real_time\": 2.4287571296928039e+02,\n      \"cpu_time\": 2.4285578384351490e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/12/15\",\n      \"iterations\": 2647384,\n      \"real_time\": 2.6651603998259009e+02,\n      \"cpu_time\": 2.6651366027747002e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/15/1\",\n      \"iterations\": 24894908,\n      \"real_time\": 2.8931135794891475e+01,\n      \"cpu_time\": 2.8924790563596211e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/15/2\",\n      \"iterations\": 10000000,\n      \"real_time\": 5.0149341800715774e+01,\n      \"cpu_time\": 5.0140900000000954e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/15/3\",\n      \"iterations\": 10387914,\n      \"real_time\": 6.7789764718536929e+01,\n      \"cpu_time\": 6.7788874647981260e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/15/4\",\n      \"iterations\": 8232001,\n      \"real_time\": 8.7254512836870219e+01,\n      \"cpu_time\": 8.7242457817970333e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/15/8\",\n      \"iterations\": 4078969,\n      \"real_time\": 1.6140622300919441e+02,\n      \"cpu_time\": 1.6140279565743089e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/15/12\",\n      \"iterations\": 2913983,\n      \"real_time\": 2.4624524953984053e+02,\n      \"cpu_time\": 2.4622140897871080e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/2/15/15\",\n      \"iterations\": 1980545,\n      \"real_time\": 3.5652687670272678e+02,\n      \"cpu_time\": 3.5642613523045270e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/1/1\",\n      \"iterations\": 56068628,\n      \"real_time\": 1.2794681797167486e+01,\n      \"cpu_time\": 1.2793286113582157e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/1/2\",\n      \"iterations\": 39670171,\n      \"real_time\": 1.7598980981713570e+01,\n      \"cpu_time\": 1.7598336039438660e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/1/3\",\n      \"iterations\": 31158472,\n      \"real_time\": 2.2851131887169714e+01,\n      \"cpu_time\": 2.2848938163591246e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/1/4\",\n      \"iterations\": 26125739,\n      \"real_time\": 2.5647778157089107e+01,\n      \"cpu_time\": 2.5647810383468983e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/1/8\",\n      \"iterations\": 16180744,\n      \"real_time\": 4.4158160894780949e+01,\n      \"cpu_time\": 4.4148896985206250e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/1/12\",\n      \"iterations\": 11614209,\n      \"real_time\": 6.1220418967741509e+01,\n      \"cpu_time\": 6.1203737594182591e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/1/15\",\n      \"iterations\": 7775445,\n      \"real_time\": 8.8192231440357872e+01,\n      \"cpu_time\": 8.8191351105949565e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/2/1\",\n      \"iterations\": 42433758,\n      \"real_time\": 1.6789013218782308e+01,\n      \"cpu_time\": 1.6788143062888754e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/2/2\",\n      \"iterations\": 27240110,\n      \"real_time\": 2.6047708914648279e+01,\n      \"cpu_time\": 2.6045709800731100e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/2/3\",\n      \"iterations\": 21036625,\n      \"real_time\": 3.4483314841215552e+01,\n      \"cpu_time\": 3.4475159394627752e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/2/4\",\n      \"iterations\": 16349143,\n      \"real_time\": 4.0972523638050760e+01,\n      \"cpu_time\": 4.0972545166434649e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/2/8\",\n      \"iterations\": 9121829,\n      \"real_time\": 7.3690651728074570e+01,\n      \"cpu_time\": 7.3678206421101962e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/2/12\",\n      \"iterations\": 6573758,\n      \"real_time\": 1.0611354388329170e+02,\n      \"cpu_time\": 1.0610658317510315e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/2/15\",\n      \"iterations\": 5281106,\n      \"real_time\": 1.2952993671592768e+02,\n      \"cpu_time\": 1.2952267952963081e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/3/1\",\n      \"iterations\": 37443767,\n      \"real_time\": 1.8692536893444267e+01,\n      \"cpu_time\": 1.8691949450491798e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/3/2\",\n      \"iterations\": 24253512,\n      \"real_time\": 2.8977756462325814e+01,\n      \"cpu_time\": 2.8977040520977290e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/3/3\",\n      \"iterations\": 18031942,\n      \"real_time\": 3.8052576424921078e+01,\n      \"cpu_time\": 3.8050310942659422e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/3/4\",\n      \"iterations\": 14793400,\n      \"real_time\": 4.8389559534583100e+01,\n      \"cpu_time\": 4.8378871658984025e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/3/8\",\n      \"iterations\": 7509118,\n      \"real_time\": 8.7285071553661098e+01,\n      \"cpu_time\": 8.7281622155892137e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/3/12\",\n      \"iterations\": 5617437,\n      \"real_time\": 1.2594982336650604e+02,\n      \"cpu_time\": 1.2594996615004284e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/3/15\",\n      \"iterations\": 4235468,\n      \"real_time\": 1.5662988364866754e+02,\n      \"cpu_time\": 1.5658930725010819e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/4/1\",\n      \"iterations\": 33582967,\n      \"real_time\": 2.0666642557179625e+01,\n      \"cpu_time\": 2.0664940057261749e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/4/2\",\n      \"iterations\": 20330280,\n      \"real_time\": 3.4482593843841727e+01,\n      \"cpu_time\": 3.4467995521949824e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/4/3\",\n      \"iterations\": 14817261,\n      \"real_time\": 4.4999856386574585e+01,\n      \"cpu_time\": 4.4999882231946614e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/4/4\",\n      \"iterations\": 12703713,\n      \"real_time\": 5.7508433168632642e+01,\n      \"cpu_time\": 5.7498071626775889e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/4/8\",\n      \"iterations\": 6803250,\n      \"real_time\": 1.0353664954199472e+02,\n      \"cpu_time\": 1.0353022452504064e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/4/12\",\n      \"iterations\": 4761484,\n      \"real_time\": 1.5105595102614049e+02,\n      \"cpu_time\": 1.5101636380590460e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/4/15\",\n      \"iterations\": 3477121,\n      \"real_time\": 2.0255288986918265e+02,\n      \"cpu_time\": 2.0255291662268490e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/8/1\",\n      \"iterations\": 24105845,\n      \"real_time\": 3.0166071218608963e+01,\n      \"cpu_time\": 3.0152521100172752e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/8/2\",\n      \"iterations\": 14274178,\n      \"real_time\": 4.7932456426425794e+01,\n      \"cpu_time\": 4.7932427352385140e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/8/3\",\n      \"iterations\": 11208070,\n      \"real_time\": 6.4670979126310669e+01,\n      \"cpu_time\": 6.4656626876885724e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/8/4\",\n      \"iterations\": 8661544,\n      \"real_time\": 8.1036356563132159e+01,\n      \"cpu_time\": 8.1029779448099646e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/8/8\",\n      \"iterations\": 4408532,\n      \"real_time\": 1.5933889874913777e+02,\n      \"cpu_time\": 1.5933898177443112e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/8/12\",\n      \"iterations\": 3025836,\n      \"real_time\": 2.2925236332784999e+02,\n      \"cpu_time\": 2.2921764431383914e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/8/15\",\n      \"iterations\": 2491999,\n      \"real_time\": 2.8641806799325639e+02,\n      \"cpu_time\": 2.8639016307791479e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/12/1\",\n      \"iterations\": 19248855,\n      \"real_time\": 3.5610818100409780e+01,\n      \"cpu_time\": 3.5608871280915714e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/12/2\",\n      \"iterations\": 12091481,\n      \"real_time\": 5.8460851325769724e+01,\n      \"cpu_time\": 5.8460084418112018e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/12/3\",\n      \"iterations\": 8702571,\n      \"real_time\": 8.2073278220417663e+01,\n      \"cpu_time\": 8.2066437607921230e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/12/4\",\n      \"iterations\": 6588049,\n      \"real_time\": 1.0495601975858659e+02,\n      \"cpu_time\": 1.0495353024848519e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/12/8\",\n      \"iterations\": 3441545,\n      \"real_time\": 2.0682049776183950e+02,\n      \"cpu_time\": 2.0680363034625137e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/12/12\",\n      \"iterations\": 1913520,\n      \"real_time\": 3.5206489242527891e+02,\n      \"cpu_time\": 3.5197646222668027e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/12/15\",\n      \"iterations\": 1769187,\n      \"real_time\": 3.9255757818155735e+02,\n      \"cpu_time\": 3.9251644964607959e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/15/1\",\n      \"iterations\": 17529493,\n      \"real_time\": 4.0357623289387469e+01,\n      \"cpu_time\": 4.0355017683627686e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/15/2\",\n      \"iterations\": 10120287,\n      \"real_time\": 6.8401365789683695e+01,\n      \"cpu_time\": 6.8394305418413964e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/15/3\",\n      \"iterations\": 7331839,\n      \"real_time\": 9.5766700952043223e+01,\n      \"cpu_time\": 9.5763832239086980e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/15/4\",\n      \"iterations\": 5777437,\n      \"real_time\": 1.2417593458644886e+02,\n      \"cpu_time\": 1.2417166989445052e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/15/8\",\n      \"iterations\": 2843390,\n      \"real_time\": 2.4545334972027791e+02,\n      \"cpu_time\": 2.4543344388213094e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/15/12\",\n      \"iterations\": 2003899,\n      \"real_time\": 3.4996039020923655e+02,\n      \"cpu_time\": 3.4996075151492676e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/3/15/15\",\n      \"iterations\": 1369917,\n      \"real_time\": 5.3407925510682742e+02,\n      \"cpu_time\": 5.3400388490691137e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/1/1\",\n      \"iterations\": 43784206,\n      \"real_time\": 1.5567154102293838e+01,\n      \"cpu_time\": 1.5566777664073646e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/1/2\",\n      \"iterations\": 33442579,\n      \"real_time\": 2.1867037525565301e+01,\n      \"cpu_time\": 2.1860634611941059e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/1/3\",\n      \"iterations\": 26232949,\n      \"real_time\": 2.7432051955857808e+01,\n      \"cpu_time\": 2.7423260724518492e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/1/4\",\n      \"iterations\": 21726783,\n      \"real_time\": 3.3097775082474257e+01,\n      \"cpu_time\": 3.3093072269374041e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/1/8\",\n      \"iterations\": 12635379,\n      \"real_time\": 5.5527680649909243e+01,\n      \"cpu_time\": 5.5527736841135230e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/1/12\",\n      \"iterations\": 7856077,\n      \"real_time\": 8.8061040521836091e+01,\n      \"cpu_time\": 8.8058200040553615e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/1/15\",\n      \"iterations\": 5300460,\n      \"real_time\": 1.2661529226403675e+02,\n      \"cpu_time\": 1.2660165344139702e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/2/1\",\n      \"iterations\": 34390768,\n      \"real_time\": 2.0377612358162786e+01,\n      \"cpu_time\": 2.0377561792164304e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/2/2\",\n      \"iterations\": 20908879,\n      \"real_time\": 3.4186949283789282e+01,\n      \"cpu_time\": 3.4171846324233805e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/2/3\",\n      \"iterations\": 15411815,\n      \"real_time\": 4.5325916440705925e+01,\n      \"cpu_time\": 4.5313287240988785e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/2/4\",\n      \"iterations\": 12438032,\n      \"real_time\": 5.4548608170088684e+01,\n      \"cpu_time\": 5.4541345447574550e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/2/8\",\n      \"iterations\": 7252233,\n      \"real_time\": 9.5601186552427208e+01,\n      \"cpu_time\": 9.5590282330976379e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/2/12\",\n      \"iterations\": 4715647,\n      \"real_time\": 1.4106606686984432e+02,\n      \"cpu_time\": 1.4105275479695544e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/2/15\",\n      \"iterations\": 4108608,\n      \"real_time\": 1.7176933988395049e+02,\n      \"cpu_time\": 1.7176571724535870e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/3/1\",\n      \"iterations\": 30653086,\n      \"real_time\": 2.3378084249479144e+01,\n      \"cpu_time\": 2.3371578313517723e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/3/2\",\n      \"iterations\": 18987479,\n      \"real_time\": 3.6601283509988470e+01,\n      \"cpu_time\": 3.6600540809024764e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/3/3\",\n      \"iterations\": 14597262,\n      \"real_time\": 4.8923792148898187e+01,\n      \"cpu_time\": 4.8915611708551786e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/3/4\",\n      \"iterations\": 11609779,\n      \"real_time\": 6.1787660821110308e+01,\n      \"cpu_time\": 6.1783949548049065e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/3/8\",\n      \"iterations\": 6170445,\n      \"real_time\": 1.1533432271722650e+02,\n      \"cpu_time\": 1.1532134230189035e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/3/12\",\n      \"iterations\": 3942551,\n      \"real_time\": 1.7028375181379528e+02,\n      \"cpu_time\": 1.7027756901559130e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/3/15\",\n      \"iterations\": 3143680,\n      \"real_time\": 2.1163193262032627e+02,\n      \"cpu_time\": 2.1153902432817358e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/4/1\",\n      \"iterations\": 26297796,\n      \"real_time\": 2.7622421285563462e+01,\n      \"cpu_time\": 2.7617903796958281e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/4/2\",\n      \"iterations\": 16116963,\n      \"real_time\": 4.2681934678112448e+01,\n      \"cpu_time\": 4.2673548360196982e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/4/3\",\n      \"iterations\": 11333463,\n      \"real_time\": 5.9496259266019280e+01,\n      \"cpu_time\": 5.9488260560782976e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/4/4\",\n      \"iterations\": 9425832,\n      \"real_time\": 7.2428386902398671e+01,\n      \"cpu_time\": 7.2426816009451187e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/4/8\",\n      \"iterations\": 5303754,\n      \"real_time\": 1.3631801739144950e+02,\n      \"cpu_time\": 1.3630609564470390e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/4/12\",\n      \"iterations\": 3471792,\n      \"real_time\": 2.0895634672966241e+02,\n      \"cpu_time\": 2.0888780203422081e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/4/15\",\n      \"iterations\": 2520089,\n      \"real_time\": 2.8573527243793194e+02,\n      \"cpu_time\": 2.8568475160995524e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/8/1\",\n      \"iterations\": 19096621,\n      \"real_time\": 3.6688983777001837e+01,\n      \"cpu_time\": 3.6686385512912835e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/8/2\",\n      \"iterations\": 11715481,\n      \"real_time\": 5.9865703340908404e+01,\n      \"cpu_time\": 5.9863867305149718e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/8/3\",\n      \"iterations\": 8174992,\n      \"real_time\": 8.2275007966704990e+01,\n      \"cpu_time\": 8.2264056038215699e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/8/4\",\n      \"iterations\": 6602839,\n      \"real_time\": 1.0513826369751193e+02,\n      \"cpu_time\": 1.0513825946687413e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/8/8\",\n      \"iterations\": 3103153,\n      \"real_time\": 2.2933769686453937e+02,\n      \"cpu_time\": 2.2922105355424063e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/8/12\",\n      \"iterations\": 2360909,\n      \"real_time\": 3.0008286085974277e+02,\n      \"cpu_time\": 3.0007382749609508e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/8/15\",\n      \"iterations\": 1889522,\n      \"real_time\": 3.6764128913401316e+02,\n      \"cpu_time\": 3.6759773106638625e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/12/1\",\n      \"iterations\": 15594924,\n      \"real_time\": 4.5340802243594723e+01,\n      \"cpu_time\": 4.5338855130040670e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/12/2\",\n      \"iterations\": 9416323,\n      \"real_time\": 7.7935394432093759e+01,\n      \"cpu_time\": 7.7923197834230493e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/12/3\",\n      \"iterations\": 6504911,\n      \"real_time\": 1.0715989640776804e+02,\n      \"cpu_time\": 1.0713782248519193e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/12/4\",\n      \"iterations\": 5121452,\n      \"real_time\": 1.4158639932237980e+02,\n      \"cpu_time\": 1.4156454068104333e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/12/8\",\n      \"iterations\": 2629809,\n      \"real_time\": 2.6729956094762065e+02,\n      \"cpu_time\": 2.6729964039213291e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/12/12\",\n      \"iterations\": 1465266,\n      \"real_time\": 4.8055055047316051e+02,\n      \"cpu_time\": 4.8045406090090495e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/12/15\",\n      \"iterations\": 1347579,\n      \"real_time\": 5.0750709527862261e+02,\n      \"cpu_time\": 5.0747525748026823e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/15/1\",\n      \"iterations\": 13992164,\n      \"real_time\": 5.1035651877709000e+01,\n      \"cpu_time\": 5.1031848969179904e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/15/2\",\n      \"iterations\": 8114437,\n      \"real_time\": 9.1338025169208450e+01,\n      \"cpu_time\": 9.1289266279351281e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/15/3\",\n      \"iterations\": 5584453,\n      \"real_time\": 1.3020937251867338e+02,\n      \"cpu_time\": 1.3020093463048300e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/15/4\",\n      \"iterations\": 4225191,\n      \"real_time\": 1.6777847509516360e+02,\n      \"cpu_time\": 1.6776780031956187e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/15/8\",\n      \"iterations\": 2208097,\n      \"real_time\": 3.1420101474920136e+02,\n      \"cpu_time\": 3.1417641525712475e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/15/12\",\n      \"iterations\": 1362239,\n      \"real_time\": 4.7193459299910199e+02,\n      \"cpu_time\": 4.7192966872919396e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/4/15/15\",\n      \"iterations\": 1013934,\n      \"real_time\": 6.9074462639740500e+02,\n      \"cpu_time\": 6.9067611895843174e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/1/1\",\n      \"iterations\": 35883083,\n      \"real_time\": 1.9658060568729933e+01,\n      \"cpu_time\": 1.9653244399317629e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/1/2\",\n      \"iterations\": 24056388,\n      \"real_time\": 2.9539796622717901e+01,\n      \"cpu_time\": 2.9535938645485025e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/1/3\",\n      \"iterations\": 18012176,\n      \"real_time\": 3.7624106551207404e+01,\n      \"cpu_time\": 3.7622994578778332e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/1/4\",\n      \"iterations\": 14678345,\n      \"real_time\": 4.5918100918078160e+01,\n      \"cpu_time\": 4.5913827478505929e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/1/8\",\n      \"iterations\": 7894084,\n      \"real_time\": 8.9416150485226595e+01,\n      \"cpu_time\": 8.9416200790360904e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/1/12\",\n      \"iterations\": 5637614,\n      \"real_time\": 1.2666981333290803e+02,\n      \"cpu_time\": 1.2665606407249378e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/1/15\",\n      \"iterations\": 3823507,\n      \"real_time\": 1.8736620963154931e+02,\n      \"cpu_time\": 1.8730395942781817e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/2/1\",\n      \"iterations\": 24223046,\n      \"real_time\": 2.8497691000545316e+01,\n      \"cpu_time\": 2.8491338372555116e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/2/2\",\n      \"iterations\": 15398423,\n      \"real_time\": 4.5795887799865483e+01,\n      \"cpu_time\": 4.5794819378582773e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/2/3\",\n      \"iterations\": 11563176,\n      \"real_time\": 6.2808566696334694e+01,\n      \"cpu_time\": 6.2802987691271042e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/2/4\",\n      \"iterations\": 9189970,\n      \"real_time\": 7.9181958046114659e+01,\n      \"cpu_time\": 7.9176972286086510e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/2/8\",\n      \"iterations\": 5045518,\n      \"real_time\": 1.4116900465724606e+02,\n      \"cpu_time\": 1.4116370212137321e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/2/12\",\n      \"iterations\": 3222317,\n      \"real_time\": 2.1623090867295952e+02,\n      \"cpu_time\": 2.1613391854370431e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/2/15\",\n      \"iterations\": 2661132,\n      \"real_time\": 2.5762627518753141e+02,\n      \"cpu_time\": 2.5762607792473091e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/3/1\",\n      \"iterations\": 21216879,\n      \"real_time\": 3.1723128644065358e+01,\n      \"cpu_time\": 3.1721536423899945e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/3/2\",\n      \"iterations\": 12753475,\n      \"real_time\": 5.0896364085014220e+01,\n      \"cpu_time\": 5.0893109525054015e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/3/3\",\n      \"iterations\": 10091108,\n      \"real_time\": 7.2624663025969213e+01,\n      \"cpu_time\": 7.2617595609916108e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/3/4\",\n      \"iterations\": 7049416,\n      \"real_time\": 9.1072403728374738e+01,\n      \"cpu_time\": 9.1064848492413887e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/3/8\",\n      \"iterations\": 4191818,\n      \"real_time\": 1.7144981293848105e+02,\n      \"cpu_time\": 1.7140486538298720e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/3/12\",\n      \"iterations\": 2730067,\n      \"real_time\": 2.5822554940052413e+02,\n      \"cpu_time\": 2.5821783860981856e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/3/15\",\n      \"iterations\": 2247191,\n      \"real_time\": 3.2026805378443191e+02,\n      \"cpu_time\": 3.2021443660107224e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/4/1\",\n      \"iterations\": 18121429,\n      \"real_time\": 3.8547122245533529e+01,\n      \"cpu_time\": 3.8529798063938813e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/4/2\",\n      \"iterations\": 11586335,\n      \"real_time\": 6.0852216685201718e+01,\n      \"cpu_time\": 6.0840377910704561e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/4/3\",\n      \"iterations\": 7775445,\n      \"real_time\": 8.3481185069736838e+01,\n      \"cpu_time\": 8.3473421778429085e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/4/4\",\n      \"iterations\": 5806575,\n      \"real_time\": 1.0983559688561705e+02,\n      \"cpu_time\": 1.0980741659239386e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/4/8\",\n      \"iterations\": 3438553,\n      \"real_time\": 2.1037594070842158e+02,\n      \"cpu_time\": 2.1031026713853169e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/4/12\",\n      \"iterations\": 2353234,\n      \"real_time\": 3.0354535504545981e+02,\n      \"cpu_time\": 3.0353844963994919e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/4/15\",\n      \"iterations\": 1707234,\n      \"real_time\": 4.1212674833869283e+02,\n      \"cpu_time\": 4.1206594995178187e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/8/1\",\n      \"iterations\": 13362349,\n      \"real_time\": 5.2982092895293206e+01,\n      \"cpu_time\": 5.2980205800642366e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/8/2\",\n      \"iterations\": 8183210,\n      \"real_time\": 8.6807440359333526e+01,\n      \"cpu_time\": 8.6797234825940336e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/8/3\",\n      \"iterations\": 5575956,\n      \"real_time\": 1.2095788793507765e+02,\n      \"cpu_time\": 1.2092742482186435e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/8/4\",\n      \"iterations\": 4406784,\n      \"real_time\": 1.6091419163453321e+02,\n      \"cpu_time\": 1.6090282618798929e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/8/8\",\n      \"iterations\": 2054986,\n      \"real_time\": 3.2413642234595721e+02,\n      \"cpu_time\": 3.2408687942400189e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/8/12\",\n      \"iterations\": 1551202,\n      \"real_time\": 4.4303657167700601e+02,\n      \"cpu_time\": 4.4300548864687693e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/8/15\",\n      \"iterations\": 1191347,\n      \"real_time\": 5.5736654808529727e+02,\n      \"cpu_time\": 5.5727424503526106e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/12/1\",\n      \"iterations\": 10931863,\n      \"real_time\": 6.4586304002781674e+01,\n      \"cpu_time\": 6.4583227945685735e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/12/2\",\n      \"iterations\": 6480881,\n      \"real_time\": 1.1095950659776847e+02,\n      \"cpu_time\": 1.1091346994336570e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/12/3\",\n      \"iterations\": 4402294,\n      \"real_time\": 1.6057101819994259e+02,\n      \"cpu_time\": 1.6057105681719801e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/12/4\",\n      \"iterations\": 3377482,\n      \"real_time\": 2.1260607102163365e+02,\n      \"cpu_time\": 2.1259239871595997e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/12/8\",\n      \"iterations\": 1774438,\n      \"real_time\": 4.0620272672379355e+02,\n      \"cpu_time\": 4.0617254589902825e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/12/12\",\n      \"iterations\": 1019947,\n      \"real_time\": 6.9195249654498321e+02,\n      \"cpu_time\": 6.9188300960735296e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/12/15\",\n      \"iterations\": 884553,\n      \"real_time\": 7.5831573007795248e+02,\n      \"cpu_time\": 7.5825982162740524e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/15/1\",\n      \"iterations\": 9880168,\n      \"real_time\": 7.0872998011871360e+01,\n      \"cpu_time\": 7.0861244464668601e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/15/2\",\n      \"iterations\": 5605516,\n      \"real_time\": 1.3012630738160823e+02,\n      \"cpu_time\": 1.3010452561369684e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/15/3\",\n      \"iterations\": 3594887,\n      \"real_time\": 1.8727335103647246e+02,\n      \"cpu_time\": 1.8727320218965750e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/15/4\",\n      \"iterations\": 2914275,\n      \"real_time\": 2.5004251521486941e+02,\n      \"cpu_time\": 2.5001964468006324e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/15/8\",\n      \"iterations\": 1496673,\n      \"real_time\": 4.5904399752450018e+02,\n      \"cpu_time\": 4.5904415994676094e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/15/12\",\n      \"iterations\": 1019264,\n      \"real_time\": 6.9263589708023426e+02,\n      \"cpu_time\": 6.9257523075474012e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/6/15/15\",\n      \"iterations\": 703822,\n      \"real_time\": 1.0274121383928141e+03,\n      \"cpu_time\": 1.0269911994794356e+03,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/1/1\",\n      \"iterations\": 28848967,\n      \"real_time\": 2.4540278929744005e+01,\n      \"cpu_time\": 2.4540116115768196e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/1/2\",\n      \"iterations\": 16448953,\n      \"real_time\": 4.1712574414326596e+01,\n      \"cpu_time\": 4.1707396209352183e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/1/3\",\n      \"iterations\": 14226312,\n      \"real_time\": 4.9027181393759875e+01,\n      \"cpu_time\": 4.9021137734081250e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/1/4\",\n      \"iterations\": 11454941,\n      \"real_time\": 5.9979401986663639e+01,\n      \"cpu_time\": 5.9975865436584797e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/1/8\",\n      \"iterations\": 6124502,\n      \"real_time\": 1.1666736185728730e+02,\n      \"cpu_time\": 1.1663968760235049e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/1/12\",\n      \"iterations\": 3998583,\n      \"real_time\": 1.6762970205238750e+02,\n      \"cpu_time\": 1.6757736428129780e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/1/15\",\n      \"iterations\": 2814308,\n      \"real_time\": 2.4954055349218976e+02,\n      \"cpu_time\": 2.4952741490982092e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/2/1\",\n      \"iterations\": 18724488,\n      \"real_time\": 3.5947751575164503e+01,\n      \"cpu_time\": 3.5943626335737079e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/2/2\",\n      \"iterations\": 11921590,\n      \"real_time\": 5.9207167255952854e+01,\n      \"cpu_time\": 5.9207203066035085e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/2/3\",\n      \"iterations\": 8754158,\n      \"real_time\": 8.2119780673261829e+01,\n      \"cpu_time\": 8.2108410654686921e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/2/4\",\n      \"iterations\": 6998810,\n      \"real_time\": 1.0214988562003887e+02,\n      \"cpu_time\": 1.0214522183056609e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/2/8\",\n      \"iterations\": 3592562,\n      \"real_time\": 1.9437585320576306e+02,\n      \"cpu_time\": 1.9436908813265629e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/2/12\",\n      \"iterations\": 2396431,\n      \"real_time\": 2.8026308038860464e+02,\n      \"cpu_time\": 2.8025509601569246e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/2/15\",\n      \"iterations\": 2046951,\n      \"real_time\": 3.5115058444827230e+02,\n      \"cpu_time\": 3.5108852141550892e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/3/1\",\n      \"iterations\": 16325388,\n      \"real_time\": 3.9796095745111217e+01,\n      \"cpu_time\": 3.9796113881031708e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/3/2\",\n      \"iterations\": 10737679,\n      \"real_time\": 6.5906308716831845e+01,\n      \"cpu_time\": 6.5905024726480917e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/3/3\",\n      \"iterations\": 7088320,\n      \"real_time\": 9.3004828643787533e+01,\n      \"cpu_time\": 9.2977461514156531e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/3/4\",\n      \"iterations\": 5870267,\n      \"real_time\": 1.2000603959593791e+02,\n      \"cpu_time\": 1.2000510368608558e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/3/8\",\n      \"iterations\": 3068143,\n      \"real_time\": 2.3626721927352122e+02,\n      \"cpu_time\": 2.3623996665083703e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/3/12\",\n      \"iterations\": 2099580,\n      \"real_time\": 3.3583827954933315e+02,\n      \"cpu_time\": 3.3581573457548717e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/3/15\",\n      \"iterations\": 1649656,\n      \"real_time\": 4.2427198941703512e+02,\n      \"cpu_time\": 4.2424359987778223e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/4/1\",\n      \"iterations\": 15155944,\n      \"real_time\": 4.6883314822829128e+01,\n      \"cpu_time\": 4.6868476156946230e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/4/2\",\n      \"iterations\": 8977697,\n      \"real_time\": 7.8234271655284971e+01,\n      \"cpu_time\": 7.8221396868264293e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/4/3\",\n      \"iterations\": 6523279,\n      \"real_time\": 1.0760156249974737e+02,\n      \"cpu_time\": 1.0759956764075524e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/4/4\",\n      \"iterations\": 4932391,\n      \"real_time\": 1.4628502665592592e+02,\n      \"cpu_time\": 1.4624246131338307e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/4/8\",\n      \"iterations\": 2622518,\n      \"real_time\": 2.7004358482882026e+02,\n      \"cpu_time\": 2.7002712660123399e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/4/12\",\n      \"iterations\": 1776519,\n      \"real_time\": 4.0179950733230476e+02,\n      \"cpu_time\": 4.0170074173144076e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/4/15\",\n      \"iterations\": 1306653,\n      \"real_time\": 5.3862783928653209e+02,\n      \"cpu_time\": 5.3852629581072210e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/8/1\",\n      \"iterations\": 10522044,\n      \"real_time\": 6.7281942654985912e+01,\n      \"cpu_time\": 6.7279323294977956e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/8/2\",\n      \"iterations\": 5683202,\n      \"real_time\": 1.1714747144106124e+02,\n      \"cpu_time\": 1.1712921694495108e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/8/3\",\n      \"iterations\": 4012588,\n      \"real_time\": 1.7086801410540352e+02,\n      \"cpu_time\": 1.7082840301570150e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/8/4\",\n      \"iterations\": 3210391,\n      \"real_time\": 2.1769298412875284e+02,\n      \"cpu_time\": 2.1764763232889757e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/8/8\",\n      \"iterations\": 1386276,\n      \"real_time\": 4.2298219331094850e+02,\n      \"cpu_time\": 4.2296988478487037e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/8/12\",\n      \"iterations\": 1229796,\n      \"real_time\": 5.8270287912404478e+02,\n      \"cpu_time\": 5.8268444522507320e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/8/15\",\n      \"iterations\": 913278,\n      \"real_time\": 7.2295903331698173e+02,\n      \"cpu_time\": 7.2266932960169106e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/12/1\",\n      \"iterations\": 8666906,\n      \"real_time\": 8.2825083479215138e+01,\n      \"cpu_time\": 8.2813290002222786e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/12/2\",\n      \"iterations\": 4787962,\n      \"real_time\": 1.5893517973517132e+02,\n      \"cpu_time\": 1.5890017506404547e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/12/3\",\n      \"iterations\": 3376993,\n      \"real_time\": 2.1209493534458539e+02,\n      \"cpu_time\": 2.1208572241637498e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/12/4\",\n      \"iterations\": 2528052,\n      \"real_time\": 2.8361835277337747e+02,\n      \"cpu_time\": 2.8356220520780306e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/12/8\",\n      \"iterations\": 1365161,\n      \"real_time\": 5.1563232464065175e+02,\n      \"cpu_time\": 5.1561244424649635e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/12/12\",\n      \"iterations\": 774816,\n      \"real_time\": 9.1982087090455320e+02,\n      \"cpu_time\": 9.1976933878501256e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/12/15\",\n      \"iterations\": 644128,\n      \"real_time\": 1.0335456059649105e+03,\n      \"cpu_time\": 1.0334296909931829e+03,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/15/1\",\n      \"iterations\": 6749330,\n      \"real_time\": 9.3389646673451765e+01,\n      \"cpu_time\": 9.3385713841225680e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/15/2\",\n      \"iterations\": 4076855,\n      \"real_time\": 1.7768800584069561e+02,\n      \"cpu_time\": 1.7766268361275348e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/15/3\",\n      \"iterations\": 2646983,\n      \"real_time\": 2.4629957616369117e+02,\n      \"cpu_time\": 2.4629398828781095e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/15/4\",\n      \"iterations\": 2202297,\n      \"real_time\": 3.2136069111042735e+02,\n      \"cpu_time\": 3.2135175228409929e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/15/8\",\n      \"iterations\": 1097884,\n      \"real_time\": 6.1847880284255530e+02,\n      \"cpu_time\": 6.1845240480779523e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/15/12\",\n      \"iterations\": 782910,\n      \"real_time\": 9.0918598563572277e+02,\n      \"cpu_time\": 9.0896271602092418e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixMatrixMultiplyDynamic/8/15/15\",\n      \"iterations\": 527999,\n      \"real_time\": 1.3869756686825481e+03,\n      \"cpu_time\": 1.3864761107502002e+03,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/1/1\",\n      \"iterations\": 71473060,\n      \"real_time\": 1.0218954287241552e+01,\n      \"cpu_time\": 1.0190986645876869e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/1/2\",\n      \"iterations\": 56615982,\n      \"real_time\": 1.1715988235202534e+01,\n      \"cpu_time\": 1.1687053312967441e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/1/3\",\n      \"iterations\": 41964917,\n      \"real_time\": 1.5662750051657548e+01,\n      \"cpu_time\": 1.5605130352097801e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/1/4\",\n      \"iterations\": 43787767,\n      \"real_time\": 1.6259733979111644e+01,\n      \"cpu_time\": 1.6258513479347108e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/1/6\",\n      \"iterations\": 36258346,\n      \"real_time\": 1.9466160398137074e+01,\n      \"cpu_time\": 1.9460291983534194e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/1/8\",\n      \"iterations\": 29992202,\n      \"real_time\": 2.3460926542272730e+01,\n      \"cpu_time\": 2.3460664875490462e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/2/1\",\n      \"iterations\": 64820817,\n      \"real_time\": 1.1306831399178281e+01,\n      \"cpu_time\": 1.1305241647910986e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/2/2\",\n      \"iterations\": 42461300,\n      \"real_time\": 1.6090760857123335e+01,\n      \"cpu_time\": 1.6089709924096166e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/2/3\",\n      \"iterations\": 34222131,\n      \"real_time\": 2.0463437795226742e+01,\n      \"cpu_time\": 2.0461291554286287e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/2/4\",\n      \"iterations\": 28672426,\n      \"real_time\": 2.4036501725380685e+01,\n      \"cpu_time\": 2.4036508107125368e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/2/6\",\n      \"iterations\": 22107753,\n      \"real_time\": 3.2366105997698078e+01,\n      \"cpu_time\": 3.2339243160535105e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/2/8\",\n      \"iterations\": 17977851,\n      \"real_time\": 3.8303000509294193e+01,\n      \"cpu_time\": 3.8302408891917274e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/3/1\",\n      \"iterations\": 47772113,\n      \"real_time\": 1.5043972116588071e+01,\n      \"cpu_time\": 1.5041369428227512e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/3/2\",\n      \"iterations\": 34204071,\n      \"real_time\": 2.0490502315173504e+01,\n      \"cpu_time\": 2.0488379877355843e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/3/3\",\n      \"iterations\": 24970214,\n      \"real_time\": 2.7615499291093524e+01,\n      \"cpu_time\": 2.7611537490226628e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/3/4\",\n      \"iterations\": 21303857,\n      \"real_time\": 3.2186434312846430e+01,\n      \"cpu_time\": 3.2186425209294711e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/3/6\",\n      \"iterations\": 15983487,\n      \"real_time\": 4.3950274933558802e+01,\n      \"cpu_time\": 4.3944290754573188e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/3/8\",\n      \"iterations\": 13054830,\n      \"real_time\": 5.3519842379947981e+01,\n      \"cpu_time\": 5.3519042377420412e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/4/1\",\n      \"iterations\": 38605567,\n      \"real_time\": 1.7140124584280613e+01,\n      \"cpu_time\": 1.7139237975704773e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/4/2\",\n      \"iterations\": 24963892,\n      \"real_time\": 2.6611483778803432e+01,\n      \"cpu_time\": 2.6610874618428802e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/4/3\",\n      \"iterations\": 20679041,\n      \"real_time\": 3.3410864169128558e+01,\n      \"cpu_time\": 3.3410833703554680e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/4/4\",\n      \"iterations\": 16227632,\n      \"real_time\": 4.1827737282765789e+01,\n      \"cpu_time\": 4.1814603634095711e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/4/6\",\n      \"iterations\": 12500000,\n      \"real_time\": 5.5144667755812407e+01,\n      \"cpu_time\": 5.5142799999998715e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/4/8\",\n      \"iterations\": 10199175,\n      \"real_time\": 7.1093479030740511e+01,\n      \"cpu_time\": 7.1083690592624933e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/8/1\",\n      \"iterations\": 23249326,\n      \"real_time\": 2.9231176507753009e+01,\n      \"cpu_time\": 2.9228202142289398e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/8/2\",\n      \"iterations\": 15252472,\n      \"real_time\": 4.5119020311992401e+01,\n      \"cpu_time\": 4.5116489969624652e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/8/3\",\n      \"iterations\": 11697861,\n      \"real_time\": 5.9494903808970463e+01,\n      \"cpu_time\": 5.9494979466764093e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/8/4\",\n      \"iterations\": 9670378,\n      \"real_time\": 7.5506631901856167e+01,\n      \"cpu_time\": 7.5465302390455705e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/8/6\",\n      \"iterations\": 6613757,\n      \"real_time\": 1.0650588401303291e+02,\n      \"cpu_time\": 1.0650482018011422e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/8/8\",\n      \"iterations\": 5224816,\n      \"real_time\": 1.3476276754677889e+02,\n      \"cpu_time\": 1.3475019981565049e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/12/1\",\n      \"iterations\": 16780897,\n      \"real_time\": 3.9535694129434802e+01,\n      \"cpu_time\": 3.9532570875080800e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/12/2\",\n      \"iterations\": 11076475,\n      \"real_time\": 6.2615060207266964e+01,\n      \"cpu_time\": 6.2613782814477034e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/12/3\",\n      \"iterations\": 7716475,\n      \"real_time\": 9.3239785648289768e+01,\n      \"cpu_time\": 9.3230523004355803e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/12/4\",\n      \"iterations\": 6209031,\n      \"real_time\": 1.1262584290792275e+02,\n      \"cpu_time\": 1.1260195028821359e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/12/6\",\n      \"iterations\": 4598547,\n      \"real_time\": 1.5699447042687075e+02,\n      \"cpu_time\": 1.5698610887308206e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/12/8\",\n      \"iterations\": 3632307,\n      \"real_time\": 1.9546146239308518e+02,\n      \"cpu_time\": 1.9545126554555083e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/15/1\",\n      \"iterations\": 14862532,\n      \"real_time\": 4.8933481992353883e+01,\n      \"cpu_time\": 4.8925445543194087e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/15/2\",\n      \"iterations\": 9272751,\n      \"real_time\": 7.5060414440919416e+01,\n      \"cpu_time\": 7.5058307939039238e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/15/3\",\n      \"iterations\": 6480341,\n      \"real_time\": 1.0979939651246349e+02,\n      \"cpu_time\": 1.0979591969003172e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/15/4\",\n      \"iterations\": 4876180,\n      \"real_time\": 1.3706889409129832e+02,\n      \"cpu_time\": 1.3701832171905659e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/15/6\",\n      \"iterations\": 3760125,\n      \"real_time\": 1.8651585653560488e+02,\n      \"cpu_time\": 1.8650789534924448e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/1/15/8\",\n      \"iterations\": 2847137,\n      \"real_time\": 2.4058243597574796e+02,\n      \"cpu_time\": 2.4055217574707797e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/1/1\",\n      \"iterations\": 68775115,\n      \"real_time\": 1.0161083190702918e+01,\n      \"cpu_time\": 1.0160099332440879e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/1/2\",\n      \"iterations\": 49986789,\n      \"real_time\": 1.4439146730228050e+01,\n      \"cpu_time\": 1.4437994806987415e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/1/3\",\n      \"iterations\": 39209975,\n      \"real_time\": 1.7907087851448971e+01,\n      \"cpu_time\": 1.7905188666914789e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/1/4\",\n      \"iterations\": 33433954,\n      \"real_time\": 2.1579039621029189e+01,\n      \"cpu_time\": 2.1575940434684497e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/1/6\",\n      \"iterations\": 23979419,\n      \"real_time\": 2.9080755623547759e+01,\n      \"cpu_time\": 2.9078352565590922e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/1/8\",\n      \"iterations\": 18695882,\n      \"real_time\": 3.7289310238280216e+01,\n      \"cpu_time\": 3.7285964898579948e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/2/1\",\n      \"iterations\": 46248885,\n      \"real_time\": 1.5789034589756211e+01,\n      \"cpu_time\": 1.5788380627987841e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/2/2\",\n      \"iterations\": 31242050,\n      \"real_time\": 2.3166515994496951e+01,\n      \"cpu_time\": 2.3160420010851698e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/2/3\",\n      \"iterations\": 23434728,\n      \"real_time\": 3.0073514528259938e+01,\n      \"cpu_time\": 3.0070415154806401e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/2/4\",\n      \"iterations\": 18801991,\n      \"real_time\": 3.8634371435713341e+01,\n      \"cpu_time\": 3.8631493866794607e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/2/6\",\n      \"iterations\": 13261846,\n      \"real_time\": 5.3974149983132079e+01,\n      \"cpu_time\": 5.3973104498422586e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/2/8\",\n      \"iterations\": 10277341,\n      \"real_time\": 6.8221806885820996e+01,\n      \"cpu_time\": 6.8221828973073386e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/3/1\",\n      \"iterations\": 36620838,\n      \"real_time\": 1.9742956780825988e+01,\n      \"cpu_time\": 1.9738516087478931e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/3/2\",\n      \"iterations\": 22380520,\n      \"real_time\": 3.0584310238259096e+01,\n      \"cpu_time\": 3.0581461020569659e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/3/3\",\n      \"iterations\": 15505215,\n      \"real_time\": 4.3842810372514549e+01,\n      \"cpu_time\": 4.3827125260759594e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/3/4\",\n      \"iterations\": 13073116,\n      \"real_time\": 5.4027797198758762e+01,\n      \"cpu_time\": 5.4026599320315746e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/3/6\",\n      \"iterations\": 9122780,\n      \"real_time\": 8.0540206384536461e+01,\n      \"cpu_time\": 8.0530934649306928e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/3/8\",\n      \"iterations\": 6801796,\n      \"real_time\": 1.0112268436776978e+02,\n      \"cpu_time\": 1.0112270347419975e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/4/1\",\n      \"iterations\": 28346967,\n      \"real_time\": 2.4199674908345415e+01,\n      \"cpu_time\": 2.4198109095763538e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/4/2\",\n      \"iterations\": 17579106,\n      \"real_time\": 3.9392355676616084e+01,\n      \"cpu_time\": 3.9392333148229547e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/4/3\",\n      \"iterations\": 12823096,\n      \"real_time\": 5.5229829597677757e+01,\n      \"cpu_time\": 5.5228940031327966e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/4/4\",\n      \"iterations\": 9197335,\n      \"real_time\": 7.1939196631556840e+01,\n      \"cpu_time\": 7.1900936521278567e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/4/6\",\n      \"iterations\": 6933302,\n      \"real_time\": 1.0101546536387012e+02,\n      \"cpu_time\": 1.0101564882072290e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/4/8\",\n      \"iterations\": 4975301,\n      \"real_time\": 1.3746609339775961e+02,\n      \"cpu_time\": 1.3745037737415063e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/8/1\",\n      \"iterations\": 16063741,\n      \"real_time\": 4.3754604925193078e+01,\n      \"cpu_time\": 4.3751078904970491e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/8/2\",\n      \"iterations\": 9354662,\n      \"real_time\": 7.6260448106230101e+01,\n      \"cpu_time\": 7.6245298868089733e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/8/3\",\n      \"iterations\": 6419133,\n      \"real_time\": 1.0508850618775932e+02,\n      \"cpu_time\": 1.0508864670665862e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/8/4\",\n      \"iterations\": 5161975,\n      \"real_time\": 1.3653278172737677e+02,\n      \"cpu_time\": 1.3649988618696295e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/8/6\",\n      \"iterations\": 3333905,\n      \"real_time\": 2.0003050893993625e+02,\n      \"cpu_time\": 2.0002939495876288e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/8/8\",\n      \"iterations\": 2567385,\n      \"real_time\": 2.6870413744843034e+02,\n      \"cpu_time\": 2.6869674785822286e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/12/1\",\n      \"iterations\": 11365666,\n      \"real_time\": 6.4047146198390067e+01,\n      \"cpu_time\": 6.4030651613372697e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/12/2\",\n      \"iterations\": 6117651,\n      \"real_time\": 1.1035232166828166e+02,\n      \"cpu_time\": 1.1034970775546375e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/12/3\",\n      \"iterations\": 4512461,\n      \"real_time\": 1.5934719212622446e+02,\n      \"cpu_time\": 1.5933079532431327e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/12/4\",\n      \"iterations\": 3394713,\n      \"real_time\": 2.0214799867461599e+02,\n      \"cpu_time\": 2.0209661317467911e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/12/6\",\n      \"iterations\": 2270648,\n      \"real_time\": 3.1233783523621946e+02,\n      \"cpu_time\": 3.1229102881643064e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/12/8\",\n      \"iterations\": 1759811,\n      \"real_time\": 3.9604278754467276e+02,\n      \"cpu_time\": 3.9604082483857508e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/15/1\",\n      \"iterations\": 8687343,\n      \"real_time\": 7.6983039231792091e+01,\n      \"cpu_time\": 7.6981419980770895e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/15/2\",\n      \"iterations\": 4955963,\n      \"real_time\": 1.3700803639520927e+02,\n      \"cpu_time\": 1.3700808500788966e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/15/3\",\n      \"iterations\": 3639010,\n      \"real_time\": 1.9288314461828989e+02,\n      \"cpu_time\": 1.9288350402994513e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/15/4\",\n      \"iterations\": 2613725,\n      \"real_time\": 2.6284468681672615e+02,\n      \"cpu_time\": 2.6271738610605422e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/15/6\",\n      \"iterations\": 1863660,\n      \"real_time\": 3.7728085221995713e+02,\n      \"cpu_time\": 3.7727428822852801e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/2/15/8\",\n      \"iterations\": 1000000,\n      \"real_time\": 5.0862821191549301e+02,\n      \"cpu_time\": 5.0845500000002630e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/1/1\",\n      \"iterations\": 64992944,\n      \"real_time\": 1.0316672268313182e+01,\n      \"cpu_time\": 1.0316150627058047e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/1/2\",\n      \"iterations\": 42592807,\n      \"real_time\": 1.6668357031118255e+01,\n      \"cpu_time\": 1.6667368271831350e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/1/3\",\n      \"iterations\": 35216936,\n      \"real_time\": 1.9412243503492750e+01,\n      \"cpu_time\": 1.9411796642388449e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/1/4\",\n      \"iterations\": 29286742,\n      \"real_time\": 2.3951316948384065e+01,\n      \"cpu_time\": 2.3944281682133134e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/1/6\",\n      \"iterations\": 20663231,\n      \"real_time\": 3.2769599775902847e+01,\n      \"cpu_time\": 3.2765785757320138e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/1/8\",\n      \"iterations\": 17026825,\n      \"real_time\": 4.2386166947748293e+01,\n      \"cpu_time\": 4.2375663108065687e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/2/1\",\n      \"iterations\": 43096283,\n      \"real_time\": 1.5777518098728892e+01,\n      \"cpu_time\": 1.5777532368627053e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/2/2\",\n      \"iterations\": 28043074,\n      \"real_time\": 2.4808773925286083e+01,\n      \"cpu_time\": 2.4808763832383935e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/2/3\",\n      \"iterations\": 20537676,\n      \"real_time\": 3.2383738596587712e+01,\n      \"cpu_time\": 3.2383167404140650e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/2/4\",\n      \"iterations\": 16883825,\n      \"real_time\": 4.1009372165414604e+01,\n      \"cpu_time\": 4.1008065411719905e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/2/6\",\n      \"iterations\": 11024664,\n      \"real_time\": 5.8886719720938295e+01,\n      \"cpu_time\": 5.8876352150046408e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/2/8\",\n      \"iterations\": 9310368,\n      \"real_time\": 7.5767626156437032e+01,\n      \"cpu_time\": 7.5761774400326203e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/3/1\",\n      \"iterations\": 33339525,\n      \"real_time\": 2.2024360966450818e+01,\n      \"cpu_time\": 2.2020649664324235e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/3/2\",\n      \"iterations\": 20745351,\n      \"real_time\": 3.3640688990218322e+01,\n      \"cpu_time\": 3.3640741966717030e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/3/3\",\n      \"iterations\": 15184579,\n      \"real_time\": 4.7369305992448858e+01,\n      \"cpu_time\": 4.7351921972943934e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/3/4\",\n      \"iterations\": 11774006,\n      \"real_time\": 5.8984107456603738e+01,\n      \"cpu_time\": 5.8981454570349520e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/3/6\",\n      \"iterations\": 8160791,\n      \"real_time\": 8.4328569250943218e+01,\n      \"cpu_time\": 8.4317316789508908e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/3/8\",\n      \"iterations\": 6131476,\n      \"real_time\": 1.0972331784711314e+02,\n      \"cpu_time\": 1.0971143000478807e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/4/1\",\n      \"iterations\": 27312916,\n      \"real_time\": 2.5933041459098458e+01,\n      \"cpu_time\": 2.5931614185758573e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/4/2\",\n      \"iterations\": 15306067,\n      \"real_time\": 4.3585445437467484e+01,\n      \"cpu_time\": 4.3584808559901866e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/4/3\",\n      \"iterations\": 11960496,\n      \"real_time\": 5.9213498838155310e+01,\n      \"cpu_time\": 5.9199133547639811e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/4/4\",\n      \"iterations\": 9180809,\n      \"real_time\": 7.6254237082330079e+01,\n      \"cpu_time\": 7.6239250811118566e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/4/6\",\n      \"iterations\": 6431459,\n      \"real_time\": 1.0985451155096177e+02,\n      \"cpu_time\": 1.0985190141149032e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/4/8\",\n      \"iterations\": 4887415,\n      \"real_time\": 1.4419382576976491e+02,\n      \"cpu_time\": 1.4417682967376621e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/8/1\",\n      \"iterations\": 13676416,\n      \"real_time\": 4.7890571114145779e+01,\n      \"cpu_time\": 4.7883305099816475e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/8/2\",\n      \"iterations\": 8807801,\n      \"real_time\": 8.0382177334846844e+01,\n      \"cpu_time\": 8.0377837782663065e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/8/3\",\n      \"iterations\": 5998183,\n      \"real_time\": 1.1687517603400644e+02,\n      \"cpu_time\": 1.1686455715005215e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/8/4\",\n      \"iterations\": 4804755,\n      \"real_time\": 1.4730310453699278e+02,\n      \"cpu_time\": 1.4729970622850630e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/8/6\",\n      \"iterations\": 3168984,\n      \"real_time\": 2.1250873814887458e+02,\n      \"cpu_time\": 2.1250880408357332e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/8/8\",\n      \"iterations\": 2316745,\n      \"real_time\": 2.9031885426550616e+02,\n      \"cpu_time\": 2.9029047219266567e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/12/1\",\n      \"iterations\": 10610884,\n      \"real_time\": 6.7091701507706901e+01,\n      \"cpu_time\": 6.7091394081776471e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/12/2\",\n      \"iterations\": 6071698,\n      \"real_time\": 1.1987622769820872e+02,\n      \"cpu_time\": 1.1985032852425132e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/12/3\",\n      \"iterations\": 4199286,\n      \"real_time\": 1.7022283193257698e+02,\n      \"cpu_time\": 1.7022036603364435e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/12/4\",\n      \"iterations\": 3223341,\n      \"real_time\": 2.2084220750673069e+02,\n      \"cpu_time\": 2.2083049854173322e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/12/6\",\n      \"iterations\": 2110258,\n      \"real_time\": 3.2486837439454968e+02,\n      \"cpu_time\": 3.2486785975931156e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/12/8\",\n      \"iterations\": 1658882,\n      \"real_time\": 4.3248637153984356e+02,\n      \"cpu_time\": 4.3237433403940628e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/15/1\",\n      \"iterations\": 8549096,\n      \"real_time\": 8.1755232245320613e+01,\n      \"cpu_time\": 8.1755310736949070e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/15/2\",\n      \"iterations\": 4906771,\n      \"real_time\": 1.4219038120679400e+02,\n      \"cpu_time\": 1.4219045478177148e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/15/3\",\n      \"iterations\": 3242032,\n      \"real_time\": 2.1243927882894664e+02,\n      \"cpu_time\": 2.1236866261651991e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/15/4\",\n      \"iterations\": 2557479,\n      \"real_time\": 2.8195440313855738e+02,\n      \"cpu_time\": 2.8177435670049420e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/15/6\",\n      \"iterations\": 1664534,\n      \"real_time\": 4.0540242255935544e+02,\n      \"cpu_time\": 4.0532124907033818e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/3/15/8\",\n      \"iterations\": 1341844,\n      \"real_time\": 5.2444090298103026e+02,\n      \"cpu_time\": 5.2437690223306686e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/1/1\",\n      \"iterations\": 62403609,\n      \"real_time\": 1.1623122679202432e+01,\n      \"cpu_time\": 1.1620882375569181e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/1/2\",\n      \"iterations\": 39838824,\n      \"real_time\": 1.7179659544895046e+01,\n      \"cpu_time\": 1.7179648676375070e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/1/3\",\n      \"iterations\": 32766167,\n      \"real_time\": 2.1615556255131441e+01,\n      \"cpu_time\": 2.1606860515603756e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/1/4\",\n      \"iterations\": 24391349,\n      \"real_time\": 2.7071690169481549e+01,\n      \"cpu_time\": 2.7070335470169983e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/1/6\",\n      \"iterations\": 18509753,\n      \"real_time\": 3.6619271630814140e+01,\n      \"cpu_time\": 3.6617452431698268e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/1/8\",\n      \"iterations\": 14812088,\n      \"real_time\": 4.7171374350631837e+01,\n      \"cpu_time\": 4.7167489148051850e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/2/1\",\n      \"iterations\": 36807816,\n      \"real_time\": 1.7987491516422690e+01,\n      \"cpu_time\": 1.7987483962645410e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/2/2\",\n      \"iterations\": 23621436,\n      \"real_time\": 2.8243106264286279e+01,\n      \"cpu_time\": 2.8235285949593514e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/2/3\",\n      \"iterations\": 18059529,\n      \"real_time\": 3.7942342518010385e+01,\n      \"cpu_time\": 3.7940911969518403e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/2/4\",\n      \"iterations\": 13767061,\n      \"real_time\": 4.8099409165246634e+01,\n      \"cpu_time\": 4.8085208600441149e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/2/6\",\n      \"iterations\": 10139637,\n      \"real_time\": 6.6952879276907154e+01,\n      \"cpu_time\": 6.6951805079415081e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/2/8\",\n      \"iterations\": 8250728,\n      \"real_time\": 8.8170155535245442e+01,\n      \"cpu_time\": 8.8151372824304005e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/3/1\",\n      \"iterations\": 29278168,\n      \"real_time\": 2.3159023406592443e+01,\n      \"cpu_time\": 2.3158996833409589e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/3/2\",\n      \"iterations\": 17631620,\n      \"real_time\": 3.9443389771288025e+01,\n      \"cpu_time\": 3.9430863414704994e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/3/3\",\n      \"iterations\": 12529758,\n      \"real_time\": 5.4492783743921215e+01,\n      \"cpu_time\": 5.4488362823931574e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/3/4\",\n      \"iterations\": 10417752,\n      \"real_time\": 6.6576565565740083e+01,\n      \"cpu_time\": 6.6576647245975579e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/3/6\",\n      \"iterations\": 7166110,\n      \"real_time\": 9.9976441742425465e+01,\n      \"cpu_time\": 9.9964694932119912e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/3/8\",\n      \"iterations\": 5464481,\n      \"real_time\": 1.2876205205738952e+02,\n      \"cpu_time\": 1.2875696703859336e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/4/1\",\n      \"iterations\": 23519688,\n      \"real_time\": 3.0345575244046909e+01,\n      \"cpu_time\": 3.0342069163502853e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/4/2\",\n      \"iterations\": 14302118,\n      \"real_time\": 4.9426612122235376e+01,\n      \"cpu_time\": 4.9414918825307758e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/4/3\",\n      \"iterations\": 10335459,\n      \"real_time\": 7.2294355962834658e+01,\n      \"cpu_time\": 7.2122873304418945e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/4/4\",\n      \"iterations\": 6493205,\n      \"real_time\": 9.9755975976824729e+01,\n      \"cpu_time\": 9.9201857942263970e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/4/6\",\n      \"iterations\": 4564305,\n      \"real_time\": 1.4452828283853472e+02,\n      \"cpu_time\": 1.4386439994697531e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/4/8\",\n      \"iterations\": 3651520,\n      \"real_time\": 1.9601295598578233e+02,\n      \"cpu_time\": 1.9472247173779311e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/8/1\",\n      \"iterations\": 11624238,\n      \"real_time\": 6.0146263001210585e+01,\n      \"cpu_time\": 6.0092627146829116e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/8/2\",\n      \"iterations\": 6388727,\n      \"real_time\": 1.1215399483707569e+02,\n      \"cpu_time\": 1.1142470166592707e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/8/3\",\n      \"iterations\": 4873871,\n      \"real_time\": 1.6555171444420100e+02,\n      \"cpu_time\": 1.6384717609472713e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/8/4\",\n      \"iterations\": 3594075,\n      \"real_time\": 2.0919734646946930e+02,\n      \"cpu_time\": 2.0288057427848855e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/8/6\",\n      \"iterations\": 2429594,\n      \"real_time\": 2.8568016052816324e+02,\n      \"cpu_time\": 2.8101032518191158e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/8/8\",\n      \"iterations\": 1837989,\n      \"real_time\": 3.6725845149562946e+02,\n      \"cpu_time\": 3.6611372538137834e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/12/1\",\n      \"iterations\": 8204695,\n      \"real_time\": 8.1424655276155079e+01,\n      \"cpu_time\": 8.1355979716493493e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/12/2\",\n      \"iterations\": 4796985,\n      \"real_time\": 1.4769030756716896e+02,\n      \"cpu_time\": 1.4744532242648097e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/12/3\",\n      \"iterations\": 3062104,\n      \"real_time\": 2.1750303906765461e+02,\n      \"cpu_time\": 2.1693645937564966e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/12/4\",\n      \"iterations\": 2520624,\n      \"real_time\": 2.8551301858828515e+02,\n      \"cpu_time\": 2.8371427075199244e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/12/6\",\n      \"iterations\": 1757372,\n      \"real_time\": 3.9824948044242757e+02,\n      \"cpu_time\": 3.9803126486596364e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/12/8\",\n      \"iterations\": 1000000,\n      \"real_time\": 5.2905927901156247e+02,\n      \"cpu_time\": 5.2889500000003409e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/15/1\",\n      \"iterations\": 7131796,\n      \"real_time\": 9.7810379170248950e+01,\n      \"cpu_time\": 9.7782662319559932e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/15/2\",\n      \"iterations\": 4083847,\n      \"real_time\": 1.7354053151036834e+02,\n      \"cpu_time\": 1.7344307952771672e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/15/3\",\n      \"iterations\": 2619378,\n      \"real_time\": 2.7425471238659838e+02,\n      \"cpu_time\": 2.7410744077410118e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/15/4\",\n      \"iterations\": 1974891,\n      \"real_time\": 3.3991598773577073e+02,\n      \"cpu_time\": 3.3965165672437047e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/15/6\",\n      \"iterations\": 1448622,\n      \"real_time\": 4.7448258004178871e+02,\n      \"cpu_time\": 4.7440671203394760e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/4/15/8\",\n      \"iterations\": 1077006,\n      \"real_time\": 6.0661674584073819e+02,\n      \"cpu_time\": 6.0651286993756878e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/1/1\",\n      \"iterations\": 51451294,\n      \"real_time\": 1.3556582503605545e+01,\n      \"cpu_time\": 1.3554275233581883e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/1/2\",\n      \"iterations\": 34442208,\n      \"real_time\": 2.0249190380766187e+01,\n      \"cpu_time\": 2.0235955836513707e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/1/3\",\n      \"iterations\": 27289172,\n      \"real_time\": 2.6551243473243439e+01,\n      \"cpu_time\": 2.6547635816873239e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/1/4\",\n      \"iterations\": 21995218,\n      \"real_time\": 3.3027670287106289e+01,\n      \"cpu_time\": 3.3017949628870511e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/1/6\",\n      \"iterations\": 15328322,\n      \"real_time\": 4.5239383604584916e+01,\n      \"cpu_time\": 4.5235805980591003e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/1/8\",\n      \"iterations\": 12413989,\n      \"real_time\": 5.8476646226957911e+01,\n      \"cpu_time\": 5.8470568968607047e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/2/1\",\n      \"iterations\": 32691338,\n      \"real_time\": 2.1089277898415219e+01,\n      \"cpu_time\": 2.1081149997593990e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/2/2\",\n      \"iterations\": 21468112,\n      \"real_time\": 3.3973607689995347e+01,\n      \"cpu_time\": 3.3965119988195426e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/2/3\",\n      \"iterations\": 15165072,\n      \"real_time\": 4.6516005137118221e+01,\n      \"cpu_time\": 4.6511285933889241e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/2/4\",\n      \"iterations\": 12315921,\n      \"real_time\": 5.9578955238892931e+01,\n      \"cpu_time\": 5.9571103127403411e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/2/6\",\n      \"iterations\": 8621858,\n      \"real_time\": 8.1341206143922918e+01,\n      \"cpu_time\": 8.1339196261410933e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/2/8\",\n      \"iterations\": 6631048,\n      \"real_time\": 1.1145818444051133e+02,\n      \"cpu_time\": 1.1137621081917288e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/3/1\",\n      \"iterations\": 23903757,\n      \"real_time\": 2.8763526841208261e+01,\n      \"cpu_time\": 2.8741716208041286e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/3/2\",\n      \"iterations\": 14966123,\n      \"real_time\": 4.7201062097685181e+01,\n      \"cpu_time\": 4.7191714246902819e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/3/3\",\n      \"iterations\": 10801136,\n      \"real_time\": 6.7185940348810547e+01,\n      \"cpu_time\": 6.7169971751122972e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/3/4\",\n      \"iterations\": 8389362,\n      \"real_time\": 8.3364553351704686e+01,\n      \"cpu_time\": 8.3363907767948348e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/3/6\",\n      \"iterations\": 5463884,\n      \"real_time\": 1.2765818125495605e+02,\n      \"cpu_time\": 1.2763740957896786e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/3/8\",\n      \"iterations\": 4501260,\n      \"real_time\": 1.5720641530327470e+02,\n      \"cpu_time\": 1.5720176128461773e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/4/1\",\n      \"iterations\": 19483845,\n      \"real_time\": 3.6366074509964967e+01,\n      \"cpu_time\": 3.6343288503885347e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/4/2\",\n      \"iterations\": 11406782,\n      \"real_time\": 6.0186339667239302e+01,\n      \"cpu_time\": 6.0182968342866729e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/4/3\",\n      \"iterations\": 8338197,\n      \"real_time\": 8.5351657319080601e+01,\n      \"cpu_time\": 8.5340631793654168e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/4/4\",\n      \"iterations\": 6058246,\n      \"real_time\": 1.0923495844860254e+02,\n      \"cpu_time\": 1.0923343159058757e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/4/6\",\n      \"iterations\": 4363056,\n      \"real_time\": 1.6283051558762142e+02,\n      \"cpu_time\": 1.6282990637755179e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/4/8\",\n      \"iterations\": 3260667,\n      \"real_time\": 2.2207680725963471e+02,\n      \"cpu_time\": 2.2203064587705936e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/8/1\",\n      \"iterations\": 11241368,\n      \"real_time\": 6.3151522032228591e+01,\n      \"cpu_time\": 6.3135287449004743e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/8/2\",\n      \"iterations\": 6031415,\n      \"real_time\": 1.1361559816589077e+02,\n      \"cpu_time\": 1.1358727595430599e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/8/3\",\n      \"iterations\": 4288112,\n      \"real_time\": 1.6079261434146306e+02,\n      \"cpu_time\": 1.6078684511972247e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/8/4\",\n      \"iterations\": 3241987,\n      \"real_time\": 2.1923580079367372e+02,\n      \"cpu_time\": 2.1919489498261038e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/8/6\",\n      \"iterations\": 2082937,\n      \"real_time\": 3.2217429718655586e+02,\n      \"cpu_time\": 3.2217681091649717e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/8/8\",\n      \"iterations\": 1690944,\n      \"real_time\": 4.2858118184490007e+02,\n      \"cpu_time\": 4.2856652851899872e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/12/1\",\n      \"iterations\": 7393091,\n      \"real_time\": 9.2698583996211596e+01,\n      \"cpu_time\": 9.2666247446426070e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/12/2\",\n      \"iterations\": 4260836,\n      \"real_time\": 1.6870986257641803e+02,\n      \"cpu_time\": 1.6869811464230420e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/12/3\",\n      \"iterations\": 2726122,\n      \"real_time\": 2.4784465480026338e+02,\n      \"cpu_time\": 2.4781356080175183e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/12/4\",\n      \"iterations\": 2133932,\n      \"real_time\": 3.2471268155478242e+02,\n      \"cpu_time\": 3.2467716871952445e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/12/6\",\n      \"iterations\": 1448394,\n      \"real_time\": 4.7851793436190400e+02,\n      \"cpu_time\": 4.7846511377426896e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/12/8\",\n      \"iterations\": 1137120,\n      \"real_time\": 6.1080555608747670e+02,\n      \"cpu_time\": 6.1080536794706779e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/15/1\",\n      \"iterations\": 6325054,\n      \"real_time\": 1.1604534015976786e+02,\n      \"cpu_time\": 1.1599711243572453e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/15/2\",\n      \"iterations\": 3266251,\n      \"real_time\": 2.1890909332904664e+02,\n      \"cpu_time\": 2.1888091270389398e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/15/3\",\n      \"iterations\": 2340417,\n      \"real_time\": 3.0651368499006946e+02,\n      \"cpu_time\": 3.0642573524291839e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/15/4\",\n      \"iterations\": 1737520,\n      \"real_time\": 3.9936560269846456e+02,\n      \"cpu_time\": 3.9928633915007259e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/15/6\",\n      \"iterations\": 1217984,\n      \"real_time\": 5.9439453058201616e+02,\n      \"cpu_time\": 5.9431815196256832e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/6/15/8\",\n      \"iterations\": 931830,\n      \"real_time\": 7.5877669842632963e+02,\n      \"cpu_time\": 7.5873818185715822e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/1/1\",\n      \"iterations\": 46516573,\n      \"real_time\": 1.4977390101744058e+01,\n      \"cpu_time\": 1.4972341148175227e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/1/2\",\n      \"iterations\": 29132194,\n      \"real_time\": 2.2459752739197551e+01,\n      \"cpu_time\": 2.2457731813814231e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/1/3\",\n      \"iterations\": 23066226,\n      \"real_time\": 3.0230697554256871e+01,\n      \"cpu_time\": 3.0222065803047059e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/1/4\",\n      \"iterations\": 18471704,\n      \"real_time\": 3.6375699396191663e+01,\n      \"cpu_time\": 3.6374229470113249e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/1/6\",\n      \"iterations\": 10000000,\n      \"real_time\": 5.0868511397857219e+01,\n      \"cpu_time\": 5.0868200000007846e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/1/8\",\n      \"iterations\": 10894094,\n      \"real_time\": 6.6185205023448887e+01,\n      \"cpu_time\": 6.6171633914671787e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/2/1\",\n      \"iterations\": 29674848,\n      \"real_time\": 2.4224997445737838e+01,\n      \"cpu_time\": 2.4216804749935658e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/2/2\",\n      \"iterations\": 18571827,\n      \"real_time\": 3.8720325686354229e+01,\n      \"cpu_time\": 3.8710623354393242e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/2/3\",\n      \"iterations\": 13801806,\n      \"real_time\": 5.1563614210871776e+01,\n      \"cpu_time\": 5.1561730399628566e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/2/4\",\n      \"iterations\": 10916520,\n      \"real_time\": 6.5205774635663829e+01,\n      \"cpu_time\": 6.5198524804604475e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/2/6\",\n      \"iterations\": 7301783,\n      \"real_time\": 9.5048175634761677e+01,\n      \"cpu_time\": 9.5020627153679243e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/2/8\",\n      \"iterations\": 5840975,\n      \"real_time\": 1.2915930182068388e+02,\n      \"cpu_time\": 1.2900209297249791e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/3/1\",\n      \"iterations\": 21209486,\n      \"real_time\": 3.7087220640826175e+01,\n      \"cpu_time\": 3.6957567005632619e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/3/2\",\n      \"iterations\": 9589435,\n      \"real_time\": 5.4345414620661082e+01,\n      \"cpu_time\": 5.4340114928559998e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/3/3\",\n      \"iterations\": 9362920,\n      \"real_time\": 7.8291851360821411e+01,\n      \"cpu_time\": 7.8260841703224330e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/3/4\",\n      \"iterations\": 7038359,\n      \"real_time\": 9.6070806847655447e+01,\n      \"cpu_time\": 9.6065432297503520e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/3/6\",\n      \"iterations\": 5137238,\n      \"real_time\": 1.4327072583245283e+02,\n      \"cpu_time\": 1.4320730322402366e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/3/8\",\n      \"iterations\": 3697092,\n      \"real_time\": 1.9392137144099195e+02,\n      \"cpu_time\": 1.9382585015465978e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/4/1\",\n      \"iterations\": 16382623,\n      \"real_time\": 4.3238417985279668e+01,\n      \"cpu_time\": 4.3192594983110659e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/4/2\",\n      \"iterations\": 10265284,\n      \"real_time\": 7.3805508839851271e+01,\n      \"cpu_time\": 7.3513601766887291e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/4/3\",\n      \"iterations\": 6711088,\n      \"real_time\": 9.7472410299774424e+01,\n      \"cpu_time\": 9.7390765848993198e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/4/4\",\n      \"iterations\": 5544906,\n      \"real_time\": 1.2865057497267418e+02,\n      \"cpu_time\": 1.2861083668506240e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/4/6\",\n      \"iterations\": 3905509,\n      \"real_time\": 1.8542579443530406e+02,\n      \"cpu_time\": 1.8540067376621201e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/4/8\",\n      \"iterations\": 2729811,\n      \"real_time\": 2.6029918041362305e+02,\n      \"cpu_time\": 2.6025904357483864e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/8/1\",\n      \"iterations\": 8843744,\n      \"real_time\": 7.5617499890368904e+01,\n      \"cpu_time\": 7.5583825131078228e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/8/2\",\n      \"iterations\": 5366041,\n      \"real_time\": 1.3194637276852586e+02,\n      \"cpu_time\": 1.3192892115434097e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/8/3\",\n      \"iterations\": 3604866,\n      \"real_time\": 1.9550793538299345e+02,\n      \"cpu_time\": 1.9549436789050722e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/8/4\",\n      \"iterations\": 2839284,\n      \"real_time\": 2.5175813584366495e+02,\n      \"cpu_time\": 2.5172261739227918e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/8/6\",\n      \"iterations\": 1987287,\n      \"real_time\": 3.6079913467532680e+02,\n      \"cpu_time\": 3.6075916563636036e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/8/8\",\n      \"iterations\": 1484979,\n      \"real_time\": 4.8329740019174761e+02,\n      \"cpu_time\": 4.8325329853153823e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/12/1\",\n      \"iterations\": 6513627,\n      \"real_time\": 1.0758186768089902e+02,\n      \"cpu_time\": 1.0752427180739905e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/12/2\",\n      \"iterations\": 3404090,\n      \"real_time\": 1.9945774643077795e+02,\n      \"cpu_time\": 1.9941834675345973e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/12/3\",\n      \"iterations\": 2538715,\n      \"real_time\": 2.8033430340346098e+02,\n      \"cpu_time\": 2.8028983166679978e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/12/4\",\n      \"iterations\": 1962808,\n      \"real_time\": 3.6131444033815620e+02,\n      \"cpu_time\": 3.6130380556836366e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/12/6\",\n      \"iterations\": 1330849,\n      \"real_time\": 5.3696716454749549e+02,\n      \"cpu_time\": 5.3680019295954082e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/12/8\",\n      \"iterations\": 938841,\n      \"real_time\": 7.0354190640354318e+02,\n      \"cpu_time\": 7.0351848715594713e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/15/1\",\n      \"iterations\": 5313496,\n      \"real_time\": 1.2908906454210609e+02,\n      \"cpu_time\": 1.2904761761371651e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/15/2\",\n      \"iterations\": 2750783,\n      \"real_time\": 2.3788409413018474e+02,\n      \"cpu_time\": 2.3787990546689804e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/15/3\",\n      \"iterations\": 2038748,\n      \"real_time\": 3.3997233348810170e+02,\n      \"cpu_time\": 3.3994245487917595e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/15/4\",\n      \"iterations\": 1511667,\n      \"real_time\": 4.4431510644682237e+02,\n      \"cpu_time\": 4.4431280169507704e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/15/6\",\n      \"iterations\": 1036361,\n      \"real_time\": 6.5201146125101457e+02,\n      \"cpu_time\": 6.5199095681905658e+02,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeMatrixMultiplyDynamic/8/15/8\",\n      \"iterations\": 799114,\n      \"real_time\": 8.9333044218943689e+02,\n      \"cpu_time\": 8.9311412389216093e+02,\n      \"time_unit\": \"ns\"\n    }\n  ]\n}\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/benchmarks/macbook-pro-2014-small_blas_gemv_benchmark.json",
    "content": "{\n  \"context\": {\n    \"date\": \"2018-03-23 13:34:44\",\n    \"num_cpus\": 8,\n    \"mhz_per_cpu\": 2200,\n    \"cpu_scaling_enabled\": false,\n    \"library_build_type\": \"release\"\n  },\n  \"benchmarks\": [\n    {\n      \"name\": \"BM_MatrixVectorMultiply/1/1\",\n      \"iterations\": 75370933,\n      \"real_time\": 8.9246668610270454e+00,\n      \"cpu_time\": 8.9241564782009526e+00,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/1/2\",\n      \"iterations\": 79276096,\n      \"real_time\": 9.1768834835134339e+00,\n      \"cpu_time\": 9.1733452666488553e+00,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/1/3\",\n      \"iterations\": 86461383,\n      \"real_time\": 8.1339961325563639e+00,\n      \"cpu_time\": 8.1315146208105382e+00,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/1/4\",\n      \"iterations\": 80784766,\n      \"real_time\": 8.6175041966102217e+00,\n      \"cpu_time\": 8.6169092821287645e+00,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/1/8\",\n      \"iterations\": 62071595,\n      \"real_time\": 1.1623699777324967e+01,\n      \"cpu_time\": 1.1622159862333158e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/1/12\",\n      \"iterations\": 46187548,\n      \"real_time\": 1.4648812380771005e+01,\n      \"cpu_time\": 1.4647497632911776e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/1/15\",\n      \"iterations\": 43216546,\n      \"real_time\": 1.5979603784946462e+01,\n      \"cpu_time\": 1.5978764244602067e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/2/1\",\n      \"iterations\": 85460694,\n      \"real_time\": 8.4557136173013969e+00,\n      \"cpu_time\": 8.4517333781539410e+00,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/2/2\",\n      \"iterations\": 73809298,\n      \"real_time\": 9.3563609147448190e+00,\n      \"cpu_time\": 9.3563550760230729e+00,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/2/3\",\n      \"iterations\": 60910879,\n      \"real_time\": 1.1561664410556345e+01,\n      \"cpu_time\": 1.1560660616964670e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/2/4\",\n      \"iterations\": 57011614,\n      \"real_time\": 1.2235077136567469e+01,\n      \"cpu_time\": 1.2233770473503897e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/2/8\",\n      \"iterations\": 37294746,\n      \"real_time\": 1.7008151843698663e+01,\n      \"cpu_time\": 1.7008079368605955e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/2/12\",\n      \"iterations\": 36096615,\n      \"real_time\": 2.0234282769587981e+01,\n      \"cpu_time\": 2.0232423455772722e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/2/15\",\n      \"iterations\": 29620477,\n      \"real_time\": 2.4192867556653738e+01,\n      \"cpu_time\": 2.4189515921705162e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/3/1\",\n      \"iterations\": 70819380,\n      \"real_time\": 1.0241319961826111e+01,\n      \"cpu_time\": 1.0236957736709932e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/3/2\",\n      \"iterations\": 49055678,\n      \"real_time\": 1.4430740841341054e+01,\n      \"cpu_time\": 1.4428604982281607e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/3/3\",\n      \"iterations\": 46364678,\n      \"real_time\": 1.4935508190628967e+01,\n      \"cpu_time\": 1.4931711593036367e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/3/4\",\n      \"iterations\": 41730007,\n      \"real_time\": 1.6495830781686326e+01,\n      \"cpu_time\": 1.6495492080794520e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/3/8\",\n      \"iterations\": 32099490,\n      \"real_time\": 2.1899212414803351e+01,\n      \"cpu_time\": 2.1896111122014723e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/3/12\",\n      \"iterations\": 26976615,\n      \"real_time\": 2.5065036735486377e+01,\n      \"cpu_time\": 2.5063782094232344e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/3/15\",\n      \"iterations\": 23158717,\n      \"real_time\": 3.0120809500024972e+01,\n      \"cpu_time\": 3.0119803268894366e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/4/1\",\n      \"iterations\": 54510341,\n      \"real_time\": 1.2223535017736792e+01,\n      \"cpu_time\": 1.2219974921822656e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/4/2\",\n      \"iterations\": 45100187,\n      \"real_time\": 1.5694088963631776e+01,\n      \"cpu_time\": 1.5693859539872824e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/4/3\",\n      \"iterations\": 39166098,\n      \"real_time\": 1.7640497530917788e+01,\n      \"cpu_time\": 1.7634996470672178e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/4/4\",\n      \"iterations\": 34750664,\n      \"real_time\": 2.1339453860003271e+01,\n      \"cpu_time\": 2.1335160674915432e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/4/8\",\n      \"iterations\": 30043950,\n      \"real_time\": 2.3893673667994594e+01,\n      \"cpu_time\": 2.3885541015745137e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/4/12\",\n      \"iterations\": 21692445,\n      \"real_time\": 3.2236621367456465e+01,\n      \"cpu_time\": 3.2233111574098835e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/4/15\",\n      \"iterations\": 17051627,\n      \"real_time\": 3.9894564547043721e+01,\n      \"cpu_time\": 3.9893026043790357e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/6/1\",\n      \"iterations\": 43622404,\n      \"real_time\": 1.6067802864650357e+01,\n      \"cpu_time\": 1.6063832703947249e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/6/2\",\n      \"iterations\": 33862065,\n      \"real_time\": 1.9549917288877438e+01,\n      \"cpu_time\": 1.9548601067300531e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/6/3\",\n      \"iterations\": 32245731,\n      \"real_time\": 2.1789015355885351e+01,\n      \"cpu_time\": 2.1776557027037121e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/6/4\",\n      \"iterations\": 31862790,\n      \"real_time\": 2.2554395395088299e+01,\n      \"cpu_time\": 2.2547178071976678e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/6/8\",\n      \"iterations\": 20659998,\n      \"real_time\": 3.2157974121069905e+01,\n      \"cpu_time\": 3.2154552967527074e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/6/12\",\n      \"iterations\": 15551719,\n      \"real_time\": 4.5013863291655184e+01,\n      \"cpu_time\": 4.4924037014814900e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/6/15\",\n      \"iterations\": 12874274,\n      \"real_time\": 5.4008553339302892e+01,\n      \"cpu_time\": 5.4001647005493055e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/8/1\",\n      \"iterations\": 35825968,\n      \"real_time\": 1.9189763050020964e+01,\n      \"cpu_time\": 1.9188037012705493e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/8/2\",\n      \"iterations\": 28860743,\n      \"real_time\": 2.3957427986537024e+01,\n      \"cpu_time\": 2.3950526845410646e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/8/3\",\n      \"iterations\": 25577503,\n      \"real_time\": 2.6716626640397276e+01,\n      \"cpu_time\": 2.6707845562563413e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/8/4\",\n      \"iterations\": 27263982,\n      \"real_time\": 2.6871541249702378e+01,\n      \"cpu_time\": 2.6865224602921419e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/8/8\",\n      \"iterations\": 18390176,\n      \"real_time\": 3.8055934538584296e+01,\n      \"cpu_time\": 3.8052327503554217e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/8/12\",\n      \"iterations\": 13196592,\n      \"real_time\": 5.7004881560951908e+01,\n      \"cpu_time\": 5.7001989604588779e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixVectorMultiply/8/15\",\n      \"iterations\": 10753844,\n      \"real_time\": 6.5649689450107800e+01,\n      \"cpu_time\": 6.5649734178773684e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/1/1\",\n      \"iterations\": 87950748,\n      \"real_time\": 8.1611993221244958e+00,\n      \"cpu_time\": 8.1607606111547870e+00,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/1/2\",\n      \"iterations\": 82828474,\n      \"real_time\": 8.1970134683295868e+00,\n      \"cpu_time\": 8.1947664519329049e+00,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/1/3\",\n      \"iterations\": 79647729,\n      \"real_time\": 9.1236429599833766e+00,\n      \"cpu_time\": 9.1225827669236015e+00,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/1/4\",\n      \"iterations\": 60000343,\n      \"real_time\": 1.1501341685749610e+01,\n      \"cpu_time\": 1.1497550939000405e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/1/8\",\n      \"iterations\": 42555778,\n      \"real_time\": 1.6328523285845055e+01,\n      \"cpu_time\": 1.6328429009099469e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/1/12\",\n      \"iterations\": 34690560,\n      \"real_time\": 2.0900962193107770e+01,\n      \"cpu_time\": 2.0898105997712126e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/1/15\",\n      \"iterations\": 22984807,\n      \"real_time\": 3.0876962381519814e+01,\n      \"cpu_time\": 3.0874873128149208e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/2/1\",\n      \"iterations\": 82616342,\n      \"real_time\": 8.4971062507129691e+00,\n      \"cpu_time\": 8.4946026780028845e+00,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/2/2\",\n      \"iterations\": 66217648,\n      \"real_time\": 1.0427153785878781e+01,\n      \"cpu_time\": 1.0426691687992145e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/2/3\",\n      \"iterations\": 52740629,\n      \"real_time\": 1.3438166219244954e+01,\n      \"cpu_time\": 1.3437818498524338e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/2/4\",\n      \"iterations\": 44820940,\n      \"real_time\": 1.6290960697977020e+01,\n      \"cpu_time\": 1.6288391095769057e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/2/8\",\n      \"iterations\": 28365116,\n      \"real_time\": 2.4753231118037846e+01,\n      \"cpu_time\": 2.4752586945175814e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/2/12\",\n      \"iterations\": 20152990,\n      \"real_time\": 3.3992543981506721e+01,\n      \"cpu_time\": 3.3989646201382811e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/2/15\",\n      \"iterations\": 17477847,\n      \"real_time\": 4.1158645625261137e+01,\n      \"cpu_time\": 4.1148031562468589e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/3/1\",\n      \"iterations\": 85071217,\n      \"real_time\": 8.6638082650656063e+00,\n      \"cpu_time\": 8.6620601654259222e+00,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/3/2\",\n      \"iterations\": 56597671,\n      \"real_time\": 1.2288259387556581e+01,\n      \"cpu_time\": 1.2287025026171113e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/3/3\",\n      \"iterations\": 44866043,\n      \"real_time\": 1.6032917745159793e+01,\n      \"cpu_time\": 1.6028580902488002e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/3/4\",\n      \"iterations\": 40158108,\n      \"real_time\": 1.7255109055033969e+01,\n      \"cpu_time\": 1.7254896570326416e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/3/8\",\n      \"iterations\": 25254165,\n      \"real_time\": 2.8276512487003924e+01,\n      \"cpu_time\": 2.8273039318464768e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/3/12\",\n      \"iterations\": 18068759,\n      \"real_time\": 3.9514967575238380e+01,\n      \"cpu_time\": 3.9513781771067336e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/3/15\",\n      \"iterations\": 14997033,\n      \"real_time\": 4.7088586853686969e+01,\n      \"cpu_time\": 4.7085713554140796e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/4/1\",\n      \"iterations\": 78983594,\n      \"real_time\": 8.9500300024881376e+00,\n      \"cpu_time\": 8.9485925393569730e+00,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/4/2\",\n      \"iterations\": 50655629,\n      \"real_time\": 1.3881427511987113e+01,\n      \"cpu_time\": 1.3880806810236136e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/4/3\",\n      \"iterations\": 42322156,\n      \"real_time\": 1.6617042784854270e+01,\n      \"cpu_time\": 1.6616851939206612e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/4/4\",\n      \"iterations\": 35709549,\n      \"real_time\": 1.9691253563928413e+01,\n      \"cpu_time\": 1.9687591125835635e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/4/8\",\n      \"iterations\": 20404356,\n      \"real_time\": 3.3671754796556790e+01,\n      \"cpu_time\": 3.3668153996136844e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/4/12\",\n      \"iterations\": 15090728,\n      \"real_time\": 4.7125273353021399e+01,\n      \"cpu_time\": 4.7122776316689396e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/4/15\",\n      \"iterations\": 11336950,\n      \"real_time\": 6.2453472226796620e+01,\n      \"cpu_time\": 6.2451805820789019e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/6/1\",\n      \"iterations\": 65892276,\n      \"real_time\": 1.0683369458878103e+01,\n      \"cpu_time\": 1.0683331078137206e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/6/2\",\n      \"iterations\": 45151386,\n      \"real_time\": 1.5743454386474488e+01,\n      \"cpu_time\": 1.5741886638873094e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/6/3\",\n      \"iterations\": 35555194,\n      \"real_time\": 2.0272604644448467e+01,\n      \"cpu_time\": 2.0265815453011015e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/6/4\",\n      \"iterations\": 28844688,\n      \"real_time\": 2.4899265682219198e+01,\n      \"cpu_time\": 2.4896646481320971e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/6/8\",\n      \"iterations\": 16677944,\n      \"real_time\": 4.2613494320617384e+01,\n      \"cpu_time\": 4.2610288174610147e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/6/12\",\n      \"iterations\": 10657572,\n      \"real_time\": 6.7212158173757643e+01,\n      \"cpu_time\": 6.7206583263055407e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/6/15\",\n      \"iterations\": 8660580,\n      \"real_time\": 8.0843434848483710e+01,\n      \"cpu_time\": 8.0843430809486151e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/8/1\",\n      \"iterations\": 57066458,\n      \"real_time\": 1.2319644088657304e+01,\n      \"cpu_time\": 1.2319338270477425e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/8/2\",\n      \"iterations\": 38263912,\n      \"real_time\": 1.8003573181401965e+01,\n      \"cpu_time\": 1.7997610908158087e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/8/3\",\n      \"iterations\": 29869088,\n      \"real_time\": 2.4137524754083010e+01,\n      \"cpu_time\": 2.4137328866552775e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/8/4\",\n      \"iterations\": 22616613,\n      \"real_time\": 3.0444019799836454e+01,\n      \"cpu_time\": 3.0442931485806785e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/8/8\",\n      \"iterations\": 12552902,\n      \"real_time\": 5.4102999925791671e+01,\n      \"cpu_time\": 5.4099761154830723e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/8/12\",\n      \"iterations\": 9204229,\n      \"real_time\": 7.7715734577381653e+01,\n      \"cpu_time\": 7.7705802408872202e+01,\n      \"time_unit\": \"ns\"\n    },\n    {\n      \"name\": \"BM_MatrixTransposeVectorMultiply/8/15\",\n      \"iterations\": 7493764,\n      \"real_time\": 9.3483444364895007e+01,\n      \"cpu_time\": 9.3483461715635883e+01,\n      \"time_unit\": \"ns\"\n    }\n  ]\n}\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/blas.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/blas.h\"\n#include \"ceres/internal/port.h\"\n#include \"glog/logging.h\"\n\n#ifndef CERES_NO_LAPACK\nextern \"C\" void dsyrk_(char* uplo,\n                       char* trans,\n                       int* n,\n                       int* k,\n                       double* alpha,\n                       double* a,\n                       int* lda,\n                       double* beta,\n                       double* c,\n                       int* ldc);\n#endif\n\nnamespace ceres {\nnamespace internal {\n\nvoid BLAS::SymmetricRankKUpdate(int num_rows,\n                                int num_cols,\n                                const double* a,\n                                bool transpose,\n                                double alpha,\n                                double beta,\n                                double* c) {\n#ifdef CERES_NO_LAPACK\n  LOG(FATAL) << \"Ceres was built without a BLAS library.\";\n#else\n  char uplo = 'L';\n  char trans = transpose ? 'T' : 'N';\n  int n = transpose ? num_cols : num_rows;\n  int k = transpose ? num_rows : num_cols;\n  int lda = k;\n  int ldc = n;\n  dsyrk_(&uplo,\n         &trans,\n         &n,\n         &k,\n         &alpha,\n         const_cast<double*>(a),\n         &lda,\n         &beta,\n         c,\n         &ldc);\n#endif\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/blas.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Wrapper functions around BLAS functions.\n\n#ifndef CERES_INTERNAL_BLAS_H_\n#define CERES_INTERNAL_BLAS_H_\n\nnamespace ceres {\nnamespace internal {\n\nclass BLAS {\n public:\n  // transpose = true  : c = alpha * a'a + beta * c;\n  // transpose = false : c = alpha * aa' + beta * c;\n  //\n  // Assumes column major matrices.\n  static void SymmetricRankKUpdate(int num_rows,\n                                   int num_cols,\n                                   const double* a,\n                                   bool transpose,\n                                   double alpha,\n                                   double beta,\n                                   double* c);\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_BLAS_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/block_evaluate_preparer.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n\n#include \"ceres/block_evaluate_preparer.h\"\n\n#include <vector>\n#include \"ceres/block_sparse_matrix.h\"\n#include \"ceres/casts.h\"\n#include \"ceres/parameter_block.h\"\n#include \"ceres/residual_block.h\"\n#include \"ceres/sparse_matrix.h\"\n\nnamespace ceres {\nnamespace internal {\n\nvoid BlockEvaluatePreparer::Init(int const* const* jacobian_layout,\n                                 int max_derivatives_per_residual_block) {\n  jacobian_layout_ = jacobian_layout;\n  scratch_evaluate_preparer_.Init(max_derivatives_per_residual_block);\n}\n\n// Point the jacobian blocks directly into the block sparse matrix.\nvoid BlockEvaluatePreparer::Prepare(const ResidualBlock* residual_block,\n                                    int residual_block_index,\n                                    SparseMatrix* jacobian,\n                                    double** jacobians) {\n  // If the overall jacobian is not available, use the scratch space.\n  if (jacobian == NULL) {\n    scratch_evaluate_preparer_.Prepare(residual_block,\n                                       residual_block_index,\n                                       jacobian,\n                                       jacobians);\n    return;\n  }\n\n  double* jacobian_values =\n      down_cast<BlockSparseMatrix*>(jacobian)->mutable_values();\n\n  const int* jacobian_block_offset = jacobian_layout_[residual_block_index];\n  const int num_parameter_blocks = residual_block->NumParameterBlocks();\n  for (int j = 0; j < num_parameter_blocks; ++j) {\n    if (!residual_block->parameter_blocks()[j]->IsConstant()) {\n      jacobians[j] = jacobian_values + *jacobian_block_offset;\n\n      // The jacobian_block_offset can't be indexed with 'j' since the code\n      // that creates the layout strips out any blocks for inactive\n      // parameters. Instead, bump the pointer for active parameters only.\n      jacobian_block_offset++;\n    } else {\n      jacobians[j] = NULL;\n    }\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/block_evaluate_preparer.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n//\n// A evaluate preparer which puts jacobian the evaluated jacobian blocks\n// directly into their final resting place in an overall block sparse matrix.\n// The evaluator takes care to avoid evaluating the jacobian for fixed\n// parameters.\n\n#ifndef CERES_INTERNAL_BLOCK_EVALUATE_PREPARER_H_\n#define CERES_INTERNAL_BLOCK_EVALUATE_PREPARER_H_\n\n#include \"ceres/scratch_evaluate_preparer.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass ResidualBlock;\nclass SparseMatrix;\n\nclass BlockEvaluatePreparer {\n public:\n  // Using Init() instead of a constructor allows for allocating this structure\n  // with new[]. This is because C++ doesn't allow passing arguments to objects\n  // constructed with new[] (as opposed to plain 'new').\n  void Init(int const* const* jacobian_layout,\n            int max_derivatives_per_residual_block);\n\n  // EvaluatePreparer interface\n\n  // Point the jacobian blocks directly into the block sparse matrix, if\n  // jacobian is non-null. Otherwise, uses an internal per-thread buffer to\n  // store the jacobians temporarily.\n  void Prepare(const ResidualBlock* residual_block,\n               int residual_block_index,\n               SparseMatrix* jacobian,\n               double** jacobians);\n\n private:\n  int const* const* jacobian_layout_;\n\n  // For the case that the overall jacobian is not available, but the\n  // individual jacobians are requested, use a pass-through scratch evaluate\n  // preparer.\n  ScratchEvaluatePreparer scratch_evaluate_preparer_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_BLOCK_EVALUATE_PREPARER_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/block_jacobi_preconditioner.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n\n#include \"ceres/block_jacobi_preconditioner.h\"\n\n#include \"ceres/block_sparse_matrix.h\"\n#include \"ceres/block_structure.h\"\n#include \"ceres/block_random_access_diagonal_matrix.h\"\n#include \"ceres/casts.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\nBlockJacobiPreconditioner::BlockJacobiPreconditioner(\n    const BlockSparseMatrix& A) {\n  const CompressedRowBlockStructure* bs = A.block_structure();\n  std::vector<int> blocks(bs->cols.size());\n  for (int i = 0; i < blocks.size(); ++i) {\n    blocks[i] = bs->cols[i].size;\n  }\n\n  m_.reset(new BlockRandomAccessDiagonalMatrix(blocks));\n}\n\nBlockJacobiPreconditioner::~BlockJacobiPreconditioner() {}\n\nbool BlockJacobiPreconditioner::UpdateImpl(const BlockSparseMatrix& A,\n                                           const double* D) {\n  const CompressedRowBlockStructure* bs = A.block_structure();\n  const double* values = A.values();\n  m_->SetZero();\n  for (int i = 0; i < bs->rows.size(); ++i) {\n    const int row_block_size = bs->rows[i].block.size;\n    const std::vector<Cell>& cells = bs->rows[i].cells;\n    for (int j = 0; j < cells.size(); ++j) {\n      const int block_id = cells[j].block_id;\n      const int col_block_size = bs->cols[block_id].size;\n\n      int r, c, row_stride, col_stride;\n      CellInfo* cell_info = m_->GetCell(block_id, block_id,\n                                        &r, &c,\n                                        &row_stride, &col_stride);\n      MatrixRef m(cell_info->values, row_stride, col_stride);\n      ConstMatrixRef b(values + cells[j].position,\n                       row_block_size,\n                       col_block_size);\n      m.block(r, c, col_block_size, col_block_size) += b.transpose() * b;\n    }\n  }\n\n  if (D != NULL) {\n    // Add the diagonal.\n    int position = 0;\n    for (int i = 0; i < bs->cols.size(); ++i) {\n      const int block_size = bs->cols[i].size;\n      int r, c, row_stride, col_stride;\n      CellInfo* cell_info = m_->GetCell(i, i,\n                                        &r, &c,\n                                        &row_stride, &col_stride);\n      MatrixRef m(cell_info->values, row_stride, col_stride);\n      m.block(r, c, block_size, block_size).diagonal() +=\n          ConstVectorRef(D + position, block_size).array().square().matrix();\n      position += block_size;\n    }\n  }\n\n  m_->Invert();\n  return true;\n}\n\nvoid BlockJacobiPreconditioner::RightMultiply(const double* x,\n                                              double* y) const {\n  m_->RightMultiply(x, y);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/block_jacobi_preconditioner.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n\n#ifndef CERES_INTERNAL_BLOCK_JACOBI_PRECONDITIONER_H_\n#define CERES_INTERNAL_BLOCK_JACOBI_PRECONDITIONER_H_\n\n#include <memory>\n#include \"ceres/block_random_access_diagonal_matrix.h\"\n#include \"ceres/preconditioner.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass BlockSparseMatrix;\nstruct CompressedRowBlockStructure;\n\n// A block Jacobi preconditioner. This is intended for use with\n// conjugate gradients, or other iterative symmetric solvers. To use\n// the preconditioner, create one by passing a BlockSparseMatrix \"A\"\n// to the constructor. This fixes the sparsity pattern to the pattern\n// of the matrix A^TA.\n//\n// Before each use of the preconditioner in a solve with conjugate gradients,\n// update the matrix by running Update(A, D). The values of the matrix A are\n// inspected to construct the preconditioner. The vector D is applied as the\n// D^TD diagonal term.\nclass BlockJacobiPreconditioner : public BlockSparseMatrixPreconditioner {\n public:\n  // A must remain valid while the BlockJacobiPreconditioner is.\n  explicit BlockJacobiPreconditioner(const BlockSparseMatrix& A);\n  BlockJacobiPreconditioner(const BlockJacobiPreconditioner&) = delete;\n  void operator=(const BlockJacobiPreconditioner&) = delete;\n\n  virtual ~BlockJacobiPreconditioner();\n\n  // Preconditioner interface\n  void RightMultiply(const double* x, double* y) const final;\n  int num_rows() const final { return m_->num_rows(); }\n  int num_cols() const final { return m_->num_rows(); }\n  const BlockRandomAccessDiagonalMatrix& matrix() const { return *m_; }\n\n private:\n  bool UpdateImpl(const BlockSparseMatrix& A, const double* D) final;\n\n  std::unique_ptr<BlockRandomAccessDiagonalMatrix> m_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_BLOCK_JACOBI_PRECONDITIONER_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/block_jacobi_preconditioner_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/block_jacobi_preconditioner.h\"\n\n#include <memory>\n#include <vector>\n#include \"ceres/block_random_access_diagonal_matrix.h\"\n#include \"ceres/linear_least_squares_problems.h\"\n#include \"ceres/block_sparse_matrix.h\"\n#include \"gtest/gtest.h\"\n#include \"Eigen/Dense\"\n\nnamespace ceres {\nnamespace internal {\n\n\nclass BlockJacobiPreconditionerTest : public ::testing::Test {\n protected:\n  void SetUpFromProblemId(int problem_id) {\n    std::unique_ptr<LinearLeastSquaresProblem> problem(\n        CreateLinearLeastSquaresProblemFromId(problem_id));\n\n    CHECK(problem != nullptr);\n    A.reset(down_cast<BlockSparseMatrix*>(problem->A.release()));\n    D.reset(problem->D.release());\n\n    Matrix dense_a;\n    A->ToDenseMatrix(&dense_a);\n    dense_ata = dense_a.transpose() * dense_a;\n    dense_ata += VectorRef(D.get(), A->num_cols())\n        .array().square().matrix().asDiagonal();\n  }\n\n  void VerifyDiagonalBlocks(const int problem_id) {\n    SetUpFromProblemId(problem_id);\n\n    BlockJacobiPreconditioner pre(*A);\n    pre.Update(*A, D.get());\n    BlockRandomAccessDiagonalMatrix* m =\n        const_cast<BlockRandomAccessDiagonalMatrix*>(&pre.matrix());\n    EXPECT_EQ(m->num_rows(), A->num_cols());\n    EXPECT_EQ(m->num_cols(), A->num_cols());\n\n    const CompressedRowBlockStructure* bs = A->block_structure();\n    for (int i = 0; i < bs->cols.size(); ++i) {\n      const int block_size = bs->cols[i].size;\n      int r, c, row_stride, col_stride;\n      CellInfo* cell_info = m->GetCell(i, i,\n                                       &r, &c,\n                                       &row_stride, &col_stride);\n      MatrixRef m(cell_info->values, row_stride, col_stride);\n      Matrix actual_block_inverse = m.block(r, c, block_size, block_size);\n      Matrix expected_block = dense_ata.block(bs->cols[i].position,\n                                              bs->cols[i].position,\n                                              block_size,\n                                              block_size);\n      const double residual = (actual_block_inverse * expected_block -\n                               Matrix::Identity(block_size, block_size)).norm();\n      EXPECT_NEAR(residual, 0.0, 1e-12) << \"Block: \" << i;\n    }\n  }\n\n  std::unique_ptr<BlockSparseMatrix> A;\n  std::unique_ptr<double[]> D;\n  Matrix dense_ata;\n};\n\nTEST_F(BlockJacobiPreconditionerTest, SmallProblem) {\n  VerifyDiagonalBlocks(2);\n}\n\nTEST_F(BlockJacobiPreconditionerTest, LargeProblem) {\n  VerifyDiagonalBlocks(3);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/block_jacobian_writer.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n\n#include \"ceres/block_jacobian_writer.h\"\n\n#include \"ceres/block_evaluate_preparer.h\"\n#include \"ceres/block_sparse_matrix.h\"\n#include \"ceres/parameter_block.h\"\n#include \"ceres/program.h\"\n#include \"ceres/residual_block.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/internal/port.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::vector;\n\nnamespace {\n\n// Given the residual block ordering, build a lookup table to determine which\n// per-parameter jacobian goes where in the overall program jacobian.\n//\n// Since we expect to use a Schur type linear solver to solve the LM step, take\n// extra care to place the E blocks and the F blocks contiguously. E blocks are\n// the first num_eliminate_blocks parameter blocks as indicated by the parameter\n// block ordering. The remaining parameter blocks are the F blocks.\n//\n// TODO(keir): Consider if we should use a boolean for each parameter block\n// instead of num_eliminate_blocks.\nvoid BuildJacobianLayout(const Program& program,\n                         int num_eliminate_blocks,\n                         vector<int*>* jacobian_layout,\n                         vector<int>* jacobian_layout_storage) {\n  const vector<ResidualBlock*>& residual_blocks = program.residual_blocks();\n\n  // Iterate over all the active residual blocks and determine how many E blocks\n  // are there. This will determine where the F blocks start in the jacobian\n  // matrix. Also compute the number of jacobian blocks.\n  int f_block_pos = 0;\n  int num_jacobian_blocks = 0;\n  for (int i = 0; i < residual_blocks.size(); ++i) {\n    ResidualBlock* residual_block = residual_blocks[i];\n    const int num_residuals = residual_block->NumResiduals();\n    const int num_parameter_blocks = residual_block->NumParameterBlocks();\n\n    // Advance f_block_pos over each E block for this residual.\n    for (int j = 0; j < num_parameter_blocks; ++j) {\n      ParameterBlock* parameter_block = residual_block->parameter_blocks()[j];\n      if (!parameter_block->IsConstant()) {\n        // Only count blocks for active parameters.\n        num_jacobian_blocks++;\n        if (parameter_block->index() < num_eliminate_blocks) {\n          f_block_pos += num_residuals * parameter_block->LocalSize();\n        }\n      }\n    }\n  }\n\n  // We now know that the E blocks are laid out starting at zero, and the F\n  // blocks are laid out starting at f_block_pos. Iterate over the residual\n  // blocks again, and this time fill the jacobian_layout array with the\n  // position information.\n\n  jacobian_layout->resize(program.NumResidualBlocks());\n  jacobian_layout_storage->resize(num_jacobian_blocks);\n\n  int e_block_pos = 0;\n  int* jacobian_pos = &(*jacobian_layout_storage)[0];\n  for (int i = 0; i < residual_blocks.size(); ++i) {\n    const ResidualBlock* residual_block = residual_blocks[i];\n    const int num_residuals = residual_block->NumResiduals();\n    const int num_parameter_blocks = residual_block->NumParameterBlocks();\n\n    (*jacobian_layout)[i] = jacobian_pos;\n    for (int j = 0; j < num_parameter_blocks; ++j) {\n      ParameterBlock* parameter_block = residual_block->parameter_blocks()[j];\n      const int parameter_block_index = parameter_block->index();\n      if (parameter_block->IsConstant()) {\n        continue;\n      }\n      const int jacobian_block_size =\n          num_residuals * parameter_block->LocalSize();\n      if (parameter_block_index < num_eliminate_blocks) {\n        *jacobian_pos = e_block_pos;\n        e_block_pos += jacobian_block_size;\n      } else {\n        *jacobian_pos = f_block_pos;\n        f_block_pos += jacobian_block_size;\n      }\n      jacobian_pos++;\n    }\n  }\n}\n\n}  // namespace\n\nBlockJacobianWriter::BlockJacobianWriter(const Evaluator::Options& options,\n                                         Program* program)\n    : program_(program) {\n  CHECK_GE(options.num_eliminate_blocks, 0)\n      << \"num_eliminate_blocks must be greater than 0.\";\n\n  BuildJacobianLayout(*program,\n                      options.num_eliminate_blocks,\n                      &jacobian_layout_,\n                      &jacobian_layout_storage_);\n}\n\n// Create evaluate prepareres that point directly into the final jacobian. This\n// makes the final Write() a nop.\nBlockEvaluatePreparer* BlockJacobianWriter::CreateEvaluatePreparers(\n    int num_threads) {\n  int max_derivatives_per_residual_block =\n      program_->MaxDerivativesPerResidualBlock();\n\n  BlockEvaluatePreparer* preparers = new BlockEvaluatePreparer[num_threads];\n  for (int i = 0; i < num_threads; i++) {\n    preparers[i].Init(&jacobian_layout_[0], max_derivatives_per_residual_block);\n  }\n  return preparers;\n}\n\nSparseMatrix* BlockJacobianWriter::CreateJacobian() const {\n  CompressedRowBlockStructure* bs = new CompressedRowBlockStructure;\n\n  const vector<ParameterBlock*>& parameter_blocks =\n      program_->parameter_blocks();\n\n  // Construct the column blocks.\n  bs->cols.resize(parameter_blocks.size());\n  for (int i = 0, cursor = 0; i < parameter_blocks.size(); ++i) {\n    CHECK_NE(parameter_blocks[i]->index(), -1);\n    CHECK(!parameter_blocks[i]->IsConstant());\n    bs->cols[i].size = parameter_blocks[i]->LocalSize();\n    bs->cols[i].position = cursor;\n    cursor += bs->cols[i].size;\n  }\n\n  // Construct the cells in each row.\n  const vector<ResidualBlock*>& residual_blocks = program_->residual_blocks();\n  int row_block_position = 0;\n  bs->rows.resize(residual_blocks.size());\n  for (int i = 0; i < residual_blocks.size(); ++i) {\n    const ResidualBlock* residual_block = residual_blocks[i];\n    CompressedRow* row = &bs->rows[i];\n\n    row->block.size = residual_block->NumResiduals();\n    row->block.position = row_block_position;\n    row_block_position += row->block.size;\n\n    // Size the row by the number of active parameters in this residual.\n    const int num_parameter_blocks = residual_block->NumParameterBlocks();\n    int num_active_parameter_blocks = 0;\n    for (int j = 0; j < num_parameter_blocks; ++j) {\n      if (residual_block->parameter_blocks()[j]->index() != -1) {\n        num_active_parameter_blocks++;\n      }\n    }\n    row->cells.resize(num_active_parameter_blocks);\n\n    // Add layout information for the active parameters in this row.\n    for (int j = 0, k = 0; j < num_parameter_blocks; ++j) {\n      const ParameterBlock* parameter_block =\n          residual_block->parameter_blocks()[j];\n      if (!parameter_block->IsConstant()) {\n        Cell& cell = row->cells[k];\n        cell.block_id = parameter_block->index();\n        cell.position = jacobian_layout_[i][k];\n\n        // Only increment k for active parameters, since there is only layout\n        // information for active parameters.\n        k++;\n      }\n    }\n\n    sort(row->cells.begin(), row->cells.end(), CellLessThan);\n  }\n\n  BlockSparseMatrix* jacobian = new BlockSparseMatrix(bs);\n  CHECK(jacobian != nullptr);\n  return jacobian;\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/block_jacobian_writer.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n//\n// A jacobian writer that writes to block sparse matrices. The \"writer\" name is\n// misleading, since the Write() operation on the block jacobian writer does not\n// write anything. Instead, the Prepare() method on the BlockEvaluatePreparers\n// makes a jacobians array which has direct pointers into the block sparse\n// jacobian. When the cost function is evaluated, the jacobian blocks get placed\n// directly in their final location.\n\n#ifndef CERES_INTERNAL_BLOCK_JACOBIAN_WRITER_H_\n#define CERES_INTERNAL_BLOCK_JACOBIAN_WRITER_H_\n\n#include <vector>\n#include \"ceres/evaluator.h\"\n#include \"ceres/internal/port.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass BlockEvaluatePreparer;\nclass Program;\nclass SparseMatrix;\n\n// TODO(sameeragarwal): This class needs documemtation.\nclass BlockJacobianWriter {\n public:\n  BlockJacobianWriter(const Evaluator::Options& options,\n                      Program* program);\n\n  // JacobianWriter interface.\n\n  // Create evaluate prepareres that point directly into the final jacobian.\n  // This makes the final Write() a nop.\n  BlockEvaluatePreparer* CreateEvaluatePreparers(int num_threads);\n\n  SparseMatrix* CreateJacobian() const;\n\n  void Write(int /* residual_id */,\n             int /* residual_offset */,\n             double** /* jacobians */,\n             SparseMatrix* /* jacobian */) {\n    // This is a noop since the blocks were written directly into their final\n    // position by the outside evaluate call, thanks to the jacobians array\n    // prepared by the BlockEvaluatePreparers.\n  }\n\n private:\n  Program* program_;\n\n  // Stores the position of each residual / parameter jacobian.\n  //\n  // The block sparse matrix that this writer writes to is stored as a set of\n  // contiguos dense blocks, one after each other; see BlockSparseMatrix. The\n  // \"double* values_\" member of the block sparse matrix contains all of these\n  // blocks. Given a pointer to the first element of a block and the size of\n  // that block, it's possible to write to it.\n  //\n  // In the case of a block sparse jacobian, the jacobian writer needs a way to\n  // find the offset in the values_ array of each residual/parameter jacobian\n  // block.\n  //\n  // That is the purpose of jacobian_layout_.\n  //\n  // In particular, jacobian_layout_[i][j] is the offset in the values_ array of\n  // the derivative of residual block i with respect to the parameter block at\n  // active argument position j.\n  //\n  // The active qualifier means that non-active parameters do not count. Care\n  // must be taken when indexing into jacobian_layout_ to account for this.\n  // Consider a single residual example:\n  //\n  //   r(x, y, z)\n  //\n  // with r in R^3, x in R^4, y in R^2, and z in R^5.\n  // Take y as a constant (non-active) parameter.\n  // Take r as residual number 0.\n  //\n  // In this case, the active arguments are only (x, z), so the active argument\n  // position for x is 0, and the active argument position for z is 1. This is\n  // similar to thinking of r as taking only 2 parameters:\n  //\n  //   r(x, z)\n  //\n  // There are only 2 jacobian blocks: dr/dx and dr/dz. jacobian_layout_ would\n  // have the following contents:\n  //\n  //   jacobian_layout_[0] = { 0, 12 }\n  //\n  // which indicates that dr/dx is located at values_[0], and dr/dz is at\n  // values_[12]. See BlockEvaluatePreparer::Prepare()'s comments about 'j'.\n  std::vector<int*> jacobian_layout_;\n\n  // The pointers in jacobian_layout_ point directly into this vector.\n  std::vector<int> jacobian_layout_storage_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_BLOCK_JACOBIAN_WRITER_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/block_random_access_dense_matrix.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/block_random_access_dense_matrix.h\"\n\n#include <vector>\n#include \"ceres/internal/eigen.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nBlockRandomAccessDenseMatrix::BlockRandomAccessDenseMatrix(\n    const std::vector<int>& blocks) {\n  const int num_blocks = blocks.size();\n  block_layout_.resize(num_blocks, 0);\n  num_rows_ = 0;\n  for (int i = 0; i < num_blocks; ++i) {\n    block_layout_[i] = num_rows_;\n    num_rows_ += blocks[i];\n  }\n\n  values_.reset(new double[num_rows_ * num_rows_]);\n\n  cell_infos_.reset(new CellInfo[num_blocks * num_blocks]);\n  for (int i = 0; i < num_blocks * num_blocks; ++i) {\n    cell_infos_[i].values = values_.get();\n  }\n\n  SetZero();\n}\n\n// Assume that the user does not hold any locks on any cell blocks\n// when they are calling SetZero.\nBlockRandomAccessDenseMatrix::~BlockRandomAccessDenseMatrix() {\n}\n\nCellInfo* BlockRandomAccessDenseMatrix::GetCell(const int row_block_id,\n                                                const int col_block_id,\n                                                int* row,\n                                                int* col,\n                                                int* row_stride,\n                                                int* col_stride) {\n  *row = block_layout_[row_block_id];\n  *col = block_layout_[col_block_id];\n  *row_stride = num_rows_;\n  *col_stride = num_rows_;\n  return &cell_infos_[row_block_id * block_layout_.size() + col_block_id];\n}\n\n// Assume that the user does not hold any locks on any cell blocks\n// when they are calling SetZero.\nvoid BlockRandomAccessDenseMatrix::SetZero() {\n  if (num_rows_) {\n    VectorRef(values_.get(), num_rows_ * num_rows_).setZero();\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/block_random_access_dense_matrix.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_BLOCK_RANDOM_ACCESS_DENSE_MATRIX_H_\n#define CERES_INTERNAL_BLOCK_RANDOM_ACCESS_DENSE_MATRIX_H_\n\n#include \"ceres/block_random_access_matrix.h\"\n\n#include <memory>\n#include <vector>\n\n#include \"ceres/internal/port.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// A square block random accessible matrix with the same row and\n// column block structure. All cells are stored in the same single\n// array, so that its also accessible as a dense matrix of size\n// num_rows x num_cols.\n//\n// This class is NOT thread safe. Since all n^2 cells are stored,\n// GetCell never returns NULL for any (row_block_id, col_block_id)\n// pair.\n//\n// ReturnCell is a nop.\nclass BlockRandomAccessDenseMatrix : public BlockRandomAccessMatrix {\n public:\n  // blocks is a vector of block sizes. The resulting matrix has\n  // blocks.size() * blocks.size() cells.\n  explicit BlockRandomAccessDenseMatrix(const std::vector<int>& blocks);\n  BlockRandomAccessDenseMatrix(const BlockRandomAccessDenseMatrix&) = delete;\n  void operator=(const BlockRandomAccessDenseMatrix&) = delete;\n\n  // The destructor is not thread safe. It assumes that no one is\n  // modifying any cells when the matrix is being destroyed.\n  virtual ~BlockRandomAccessDenseMatrix();\n\n  // BlockRandomAccessMatrix interface.\n  CellInfo* GetCell(int row_block_id,\n                    int col_block_id,\n                    int* row,\n                    int* col,\n                    int* row_stride,\n                    int* col_stride) final;\n\n  // This is not a thread safe method, it assumes that no cell is\n  // locked.\n  void SetZero() final;\n\n  // Since the matrix is square with the same row and column block\n  // structure, num_rows() = num_cols().\n  int num_rows() const final { return num_rows_; }\n  int num_cols() const final { return num_rows_; }\n\n  // The underlying matrix storing the cells.\n  const double* values() const { return values_.get(); }\n  double* mutable_values() { return values_.get(); }\n\n private:\n  int num_rows_;\n  std::vector<int> block_layout_;\n  std::unique_ptr<double[]> values_;\n  std::unique_ptr<CellInfo[]> cell_infos_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_BLOCK_RANDOM_ACCESS_DENSE_MATRIX_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/block_random_access_dense_matrix_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include <vector>\n#include \"gtest/gtest.h\"\n#include \"ceres/block_random_access_dense_matrix.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\nTEST(BlockRandomAccessDenseMatrix, GetCell) {\n  std::vector<int> blocks;\n  blocks.push_back(3);\n  blocks.push_back(4);\n  blocks.push_back(5);\n  const int num_rows = 3 + 4 + 5;\n  BlockRandomAccessDenseMatrix m(blocks);\n  EXPECT_EQ(m.num_rows(), num_rows);\n  EXPECT_EQ(m.num_cols(), num_rows);\n\n  int row_idx = 0;\n  for (int i = 0; i < blocks.size(); ++i) {\n    int col_idx = 0;\n    for (int j = 0; j < blocks.size(); ++j) {\n      int row;\n      int col;\n      int row_stride;\n      int col_stride;\n      CellInfo* cell =\n          m.GetCell(i, j, &row, &col, &row_stride, &col_stride);\n\n      EXPECT_TRUE(cell != NULL);\n      EXPECT_EQ(row, row_idx);\n      EXPECT_EQ(col, col_idx);\n      EXPECT_EQ(row_stride, 3 + 4 + 5);\n      EXPECT_EQ(col_stride, 3 + 4 + 5);\n      col_idx += blocks[j];\n    }\n    row_idx += blocks[i];\n  }\n}\n\nTEST(BlockRandomAccessDenseMatrix, WriteCell) {\n  std::vector<int> blocks;\n  blocks.push_back(3);\n  blocks.push_back(4);\n  blocks.push_back(5);\n  const int num_rows = 3 + 4 + 5;\n\n  BlockRandomAccessDenseMatrix m(blocks);\n\n  // Fill the cell (i,j) with (i + 1) * (j + 1)\n  for (int i = 0; i < blocks.size(); ++i) {\n    for (int j = 0; j < blocks.size(); ++j) {\n      int row;\n      int col;\n      int row_stride;\n      int col_stride;\n      CellInfo* cell = m.GetCell(\n          i, j, &row, &col, &row_stride, &col_stride);\n      MatrixRef(cell->values, row_stride, col_stride).block(\n          row, col, blocks[i], blocks[j]) =\n          (i+1) * (j+1) * Matrix::Ones(blocks[i], blocks[j]);\n    }\n  }\n\n  // Check the values in the array are correct by going over the\n  // entries of each block manually.\n  int row_idx = 0;\n  for (int i = 0; i < blocks.size(); ++i) {\n    int col_idx = 0;\n    for (int j = 0; j < blocks.size(); ++j) {\n      // Check the values of this block.\n      for (int r = 0; r < blocks[i]; ++r) {\n        for (int c = 0; c < blocks[j]; ++c) {\n          int pos = row_idx * num_rows + col_idx;\n          EXPECT_EQ(m.values()[pos], (i + 1) * (j + 1));\n        }\n      }\n      col_idx += blocks[j];\n    }\n    row_idx += blocks[i];\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/block_random_access_diagonal_matrix.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/block_random_access_diagonal_matrix.h\"\n\n#include <algorithm>\n#include <set>\n#include <utility>\n#include <vector>\n\n#include \"Eigen/Dense\"\n#include \"ceres/internal/port.h\"\n#include \"ceres/stl_util.h\"\n#include \"ceres/triplet_sparse_matrix.h\"\n#include \"ceres/types.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::vector;\n\n// TODO(sameeragarwal): Drop the dependence on TripletSparseMatrix.\n\nBlockRandomAccessDiagonalMatrix::BlockRandomAccessDiagonalMatrix(\n    const vector<int>& blocks)\n    : blocks_(blocks) {\n  // Build the row/column layout vector and count the number of scalar\n  // rows/columns.\n  int num_cols = 0;\n  int num_nonzeros = 0;\n  vector<int> block_positions;\n  for (int i = 0; i < blocks_.size(); ++i) {\n    block_positions.push_back(num_cols);\n    num_cols += blocks_[i];\n    num_nonzeros += blocks_[i] * blocks_[i];\n  }\n\n  VLOG(1) << \"Matrix Size [\" << num_cols\n          << \",\" << num_cols\n          << \"] \" << num_nonzeros;\n\n  tsm_.reset(new TripletSparseMatrix(num_cols, num_cols, num_nonzeros));\n  tsm_->set_num_nonzeros(num_nonzeros);\n  int* rows = tsm_->mutable_rows();\n  int* cols = tsm_->mutable_cols();\n  double* values = tsm_->mutable_values();\n\n  int pos = 0;\n  for (int i = 0; i < blocks_.size(); ++i) {\n    const int block_size = blocks_[i];\n    layout_.push_back(new CellInfo(values + pos));\n    const int block_begin = block_positions[i];\n    for (int r = 0; r < block_size; ++r) {\n      for (int c = 0; c < block_size; ++c, ++pos) {\n        rows[pos] = block_begin + r;\n        cols[pos] = block_begin + c;\n      }\n    }\n  }\n}\n\n// Assume that the user does not hold any locks on any cell blocks\n// when they are calling SetZero.\nBlockRandomAccessDiagonalMatrix::~BlockRandomAccessDiagonalMatrix() {\n  STLDeleteContainerPointers(layout_.begin(), layout_.end());\n}\n\nCellInfo* BlockRandomAccessDiagonalMatrix::GetCell(int row_block_id,\n                                                   int col_block_id,\n                                                   int* row,\n                                                   int* col,\n                                                   int* row_stride,\n                                                   int* col_stride) {\n  if (row_block_id != col_block_id) {\n    return NULL;\n  }\n  const int stride = blocks_[row_block_id];\n\n  // Each cell is stored contiguously as its own little dense matrix.\n  *row = 0;\n  *col = 0;\n  *row_stride = stride;\n  *col_stride = stride;\n  return layout_[row_block_id];\n}\n\n// Assume that the user does not hold any locks on any cell blocks\n// when they are calling SetZero.\nvoid BlockRandomAccessDiagonalMatrix::SetZero() {\n  if (tsm_->num_nonzeros()) {\n    VectorRef(tsm_->mutable_values(),\n              tsm_->num_nonzeros()).setZero();\n  }\n}\n\nvoid BlockRandomAccessDiagonalMatrix::Invert() {\n  double* values = tsm_->mutable_values();\n  for (int i = 0; i < blocks_.size(); ++i) {\n    const int block_size = blocks_[i];\n    MatrixRef block(values, block_size, block_size);\n    block =\n        block\n        .selfadjointView<Eigen::Upper>()\n        .llt()\n        .solve(Matrix::Identity(block_size, block_size));\n    values += block_size * block_size;\n  }\n}\n\nvoid BlockRandomAccessDiagonalMatrix::RightMultiply(const double* x,\n                                                    double* y) const {\n  CHECK(x != nullptr);\n  CHECK(y != nullptr);\n  const double* values = tsm_->values();\n  for (int i = 0; i < blocks_.size(); ++i) {\n    const int block_size = blocks_[i];\n    ConstMatrixRef block(values, block_size, block_size);\n    VectorRef(y, block_size).noalias() += block * ConstVectorRef(x, block_size);\n    x += block_size;\n    y += block_size;\n    values += block_size * block_size;\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/block_random_access_diagonal_matrix.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_BLOCK_RANDOM_ACCESS_DIAGONAL_MATRIX_H_\n#define CERES_INTERNAL_BLOCK_RANDOM_ACCESS_DIAGONAL_MATRIX_H_\n\n#include <memory>\n#include <set>\n#include <utility>\n#include <vector>\n\n#include \"ceres/block_random_access_matrix.h\"\n#include \"ceres/internal/port.h\"\n#include \"ceres/triplet_sparse_matrix.h\"\n#include \"ceres/types.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// A thread safe block diagonal matrix implementation of\n// BlockRandomAccessMatrix.\nclass BlockRandomAccessDiagonalMatrix : public BlockRandomAccessMatrix {\n public:\n  // blocks is an array of block sizes.\n  explicit BlockRandomAccessDiagonalMatrix(const std::vector<int>& blocks);\n  BlockRandomAccessDiagonalMatrix(const BlockRandomAccessDiagonalMatrix&) = delete;\n  void operator=(const BlockRandomAccessDiagonalMatrix&) = delete;\n\n  // The destructor is not thread safe. It assumes that no one is\n  // modifying any cells when the matrix is being destroyed.\n  virtual ~BlockRandomAccessDiagonalMatrix();\n\n  // BlockRandomAccessMatrix Interface.\n  CellInfo* GetCell(int row_block_id,\n                    int col_block_id,\n                    int* row,\n                    int* col,\n                    int* row_stride,\n                    int* col_stride) final;\n\n  // This is not a thread safe method, it assumes that no cell is\n  // locked.\n  void SetZero() final;\n\n  // Invert the matrix assuming that each block is positive definite.\n  void Invert();\n\n  // y += S * x\n  void RightMultiply(const double* x, double* y) const;\n\n  // Since the matrix is square, num_rows() == num_cols().\n  int num_rows() const final { return tsm_->num_rows(); }\n  int num_cols() const final { return tsm_->num_cols(); }\n\n  const TripletSparseMatrix* matrix() const { return tsm_.get(); }\n  TripletSparseMatrix* mutable_matrix() { return tsm_.get(); }\n\n private:\n  // row/column block sizes.\n  const std::vector<int> blocks_;\n  std::vector<CellInfo*> layout_;\n\n  // The underlying matrix object which actually stores the cells.\n  std::unique_ptr<TripletSparseMatrix> tsm_;\n\n  friend class BlockRandomAccessDiagonalMatrixTest;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_BLOCK_RANDOM_ACCESS_DIAGONAL_MATRIX_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/block_random_access_diagonal_matrix_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include <limits>\n#include <memory>\n#include <vector>\n\n#include \"ceres/block_random_access_diagonal_matrix.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"glog/logging.h\"\n#include \"gtest/gtest.h\"\n#include \"Eigen/Cholesky\"\n\nnamespace ceres {\nnamespace internal {\n\nclass BlockRandomAccessDiagonalMatrixTest : public ::testing::Test {\n public:\n  void SetUp() {\n    std::vector<int> blocks;\n    blocks.push_back(3);\n    blocks.push_back(4);\n    blocks.push_back(5);\n    const int num_rows = 3 + 4 + 5;\n    num_nonzeros_ =  3 * 3 + 4 * 4 + 5 * 5;\n\n    m_.reset(new BlockRandomAccessDiagonalMatrix(blocks));\n\n    EXPECT_EQ(m_->num_rows(), num_rows);\n    EXPECT_EQ(m_->num_cols(), num_rows);\n\n    for (int i = 0; i < blocks.size(); ++i) {\n      const int row_block_id = i;\n      int col_block_id;\n      int row;\n      int col;\n      int row_stride;\n      int col_stride;\n\n      for (int j = 0; j < blocks.size(); ++j) {\n        col_block_id = j;\n        CellInfo* cell =  m_->GetCell(row_block_id, col_block_id,\n                                    &row, &col,\n                                    &row_stride, &col_stride);\n        // Off diagonal entries are not present.\n        if (i != j) {\n          EXPECT_TRUE(cell == NULL);\n          continue;\n        }\n\n        EXPECT_TRUE(cell != NULL);\n        EXPECT_EQ(row, 0);\n        EXPECT_EQ(col, 0);\n        EXPECT_EQ(row_stride, blocks[row_block_id]);\n        EXPECT_EQ(col_stride, blocks[col_block_id]);\n\n        // Write into the block\n        MatrixRef(cell->values, row_stride, col_stride).block(\n            row, col, blocks[row_block_id], blocks[col_block_id]) =\n            (row_block_id + 1) * (col_block_id +1) *\n            Matrix::Ones(blocks[row_block_id], blocks[col_block_id])\n            + Matrix::Identity(blocks[row_block_id], blocks[row_block_id]);\n      }\n    }\n  }\n\n protected:\n  int num_nonzeros_;\n  std::unique_ptr<BlockRandomAccessDiagonalMatrix> m_;\n};\n\nTEST_F(BlockRandomAccessDiagonalMatrixTest, MatrixContents) {\n  const TripletSparseMatrix* tsm = m_->matrix();\n  EXPECT_EQ(tsm->num_nonzeros(), num_nonzeros_);\n  EXPECT_EQ(tsm->max_num_nonzeros(), num_nonzeros_);\n\n  Matrix dense;\n  tsm->ToDenseMatrix(&dense);\n\n  double kTolerance = 1e-14;\n\n  // (0,0)\n  EXPECT_NEAR((dense.block(0, 0, 3, 3) -\n               (Matrix::Ones(3, 3) + Matrix::Identity(3, 3))).norm(),\n              0.0,\n              kTolerance);\n\n  // (1,1)\n  EXPECT_NEAR((dense.block(3, 3, 4, 4) -\n               (2 * 2 * Matrix::Ones(4, 4) + Matrix::Identity(4, 4))).norm(),\n              0.0,\n              kTolerance);\n\n  // (1,1)\n  EXPECT_NEAR((dense.block(7, 7, 5, 5) -\n               (3 * 3 * Matrix::Ones(5, 5) + Matrix::Identity(5, 5))).norm(),\n              0.0,\n              kTolerance);\n\n  // There is nothing else in the matrix besides these four blocks.\n  EXPECT_NEAR(dense.norm(),\n              sqrt(6 * 1.0 + 3 * 4.0 +\n                   12 * 16.0 + 4 * 25.0 +\n                   20 * 81.0 + 5 * 100.0), kTolerance);\n}\n\nTEST_F(BlockRandomAccessDiagonalMatrixTest, RightMultiply) {\n  double kTolerance = 1e-14;\n  const TripletSparseMatrix* tsm = m_->matrix();\n  Matrix dense;\n  tsm->ToDenseMatrix(&dense);\n  Vector x = Vector::Random(dense.rows());\n  Vector expected_y = dense * x;\n  Vector actual_y = Vector::Zero(dense.rows());\n  m_->RightMultiply(x.data(),  actual_y.data());\n  EXPECT_NEAR((expected_y - actual_y).norm(), 0, kTolerance);\n}\n\nTEST_F(BlockRandomAccessDiagonalMatrixTest, Invert) {\n  double kTolerance = 1e-14;\n  const TripletSparseMatrix* tsm = m_->matrix();\n  Matrix dense;\n  tsm->ToDenseMatrix(&dense);\n  Matrix expected_inverse =\n      dense.llt().solve(Matrix::Identity(dense.rows(), dense.rows()));\n\n  m_->Invert();\n  tsm->ToDenseMatrix(&dense);\n\n  EXPECT_NEAR((expected_inverse - dense).norm(), 0.0, kTolerance);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/block_random_access_matrix.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/block_random_access_matrix.h\"\n\nnamespace ceres {\nnamespace internal {\n\nBlockRandomAccessMatrix::~BlockRandomAccessMatrix() {\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/block_random_access_matrix.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Interface for matrices that allow block based random access.\n\n#ifndef CERES_INTERNAL_BLOCK_RANDOM_ACCESS_MATRIX_H_\n#define CERES_INTERNAL_BLOCK_RANDOM_ACCESS_MATRIX_H_\n\n#include <mutex>\n\nnamespace ceres {\nnamespace internal {\n\n// A matrix implementing the BlockRandomAccessMatrix interface is a\n// matrix whose rows and columns are divided into blocks. For example\n// the matrix A:\n//\n//            3     4      5\n//  A =  5 [c_11  c_12  c_13]\n//       4 [c_21  c_22  c_23]\n//\n// has row blocks of size 5 and 4, and column blocks of size 3, 4 and\n// 5. It has six cells corresponding to the six row-column block\n// combinations.\n//\n// BlockRandomAccessMatrix objects provide access to cells c_ij using\n// the GetCell method. when a cell is present, GetCell will return a\n// CellInfo object containing a pointer to an array which contains the\n// cell as a submatrix and a mutex that guards this submatrix. If the\n// user is accessing the matrix concurrently, it is his responsibility\n// to use the mutex to exclude other writers from writing to the cell\n// concurrently.\n//\n// There is no requirement that all cells be present, i.e. the matrix\n// itself can be block sparse. When a cell is not present, the GetCell\n// method will return a NULL pointer.\n//\n// There is no requirement about how the cells are stored beyond that\n// form a dense submatrix of a larger dense matrix. Like everywhere\n// else in Ceres, RowMajor storage assumed.\n//\n// Example usage:\n//\n//  BlockRandomAccessMatrix* A = new BlockRandomAccessMatrixSubClass(...)\n//\n//  int row, col, row_stride, col_stride;\n//  CellInfo* cell = A->GetCell(row_block_id, col_block_id,\n//                              &row, &col,\n//                              &row_stride, &col_stride);\n//\n//  if (cell != NULL) {\n//     MatrixRef m(cell->values, row_stride, col_stride);\n//     std::lock_guard<std::mutex> l(&cell->m);\n//     m.block(row, col, row_block_size, col_block_size) = ...\n//  }\n\n// Structure to carry a pointer to the array containing a cell and the\n// mutex guarding it.\nstruct CellInfo {\n  CellInfo() : values(nullptr) {}\n  explicit CellInfo(double* values) : values(values) {}\n\n  double* values;\n  std::mutex m;\n};\n\nclass BlockRandomAccessMatrix {\n public:\n  virtual ~BlockRandomAccessMatrix();\n\n  // If the cell (row_block_id, col_block_id) is present, then return\n  // a CellInfo with a pointer to the dense matrix containing it,\n  // otherwise return NULL. The dense matrix containing this cell has\n  // size row_stride, col_stride and the cell is located at position\n  // (row, col) within this matrix.\n  //\n  // The size of the cell is row_block_size x col_block_size is\n  // assumed known to the caller. row_block_size less than or equal to\n  // row_stride and col_block_size is upper bounded by col_stride.\n  virtual CellInfo* GetCell(int row_block_id,\n                            int col_block_id,\n                            int* row,\n                            int* col,\n                            int* row_stride,\n                            int* col_stride) = 0;\n\n  // Zero out the values of the array. The structure of the matrix\n  // (size and sparsity) is preserved.\n  virtual void SetZero() = 0;\n\n  // Number of scalar rows and columns in the matrix, i.e the sum of\n  // all row blocks and column block sizes respectively.\n  virtual int num_rows() const = 0;\n  virtual int num_cols() const = 0;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_BLOCK_RANDOM_ACCESS_MATRIX_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/block_random_access_sparse_matrix.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/block_random_access_sparse_matrix.h\"\n\n#include <algorithm>\n#include <memory>\n#include <set>\n#include <utility>\n#include <vector>\n\n#include \"ceres/internal/port.h\"\n#include \"ceres/triplet_sparse_matrix.h\"\n#include \"ceres/types.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::make_pair;\nusing std::pair;\nusing std::set;\nusing std::vector;\n\nBlockRandomAccessSparseMatrix::BlockRandomAccessSparseMatrix(\n    const vector<int>& blocks,\n    const set<pair<int, int>>& block_pairs)\n    : kMaxRowBlocks(10 * 1000 * 1000),\n      blocks_(blocks) {\n  CHECK_LT(blocks.size(), kMaxRowBlocks);\n\n  // Build the row/column layout vector and count the number of scalar\n  // rows/columns.\n  int num_cols = 0;\n  block_positions_.reserve(blocks_.size());\n  for (int i = 0; i < blocks_.size(); ++i) {\n    block_positions_.push_back(num_cols);\n    num_cols += blocks_[i];\n  }\n\n  // Count the number of scalar non-zero entries and build the layout\n  // object for looking into the values array of the\n  // TripletSparseMatrix.\n  int num_nonzeros = 0;\n  for (const auto& block_pair : block_pairs) {\n    const int row_block_size = blocks_[block_pair.first];\n    const int col_block_size = blocks_[block_pair.second];\n    num_nonzeros += row_block_size * col_block_size;\n  }\n\n  VLOG(1) << \"Matrix Size [\" << num_cols\n          << \",\" << num_cols\n          << \"] \" << num_nonzeros;\n\n  tsm_.reset(new TripletSparseMatrix(num_cols, num_cols, num_nonzeros));\n  tsm_->set_num_nonzeros(num_nonzeros);\n  int* rows = tsm_->mutable_rows();\n  int* cols = tsm_->mutable_cols();\n  double* values = tsm_->mutable_values();\n\n  int pos = 0;\n  for (const auto& block_pair : block_pairs) {\n    const int row_block_size = blocks_[block_pair.first];\n    const int col_block_size = blocks_[block_pair.second];\n    cell_values_.push_back(make_pair(block_pair, values + pos));\n    layout_[IntPairToLong(block_pair.first, block_pair.second)] =\n        new CellInfo(values + pos);\n    pos += row_block_size * col_block_size;\n  }\n\n  // Fill the sparsity pattern of the underlying matrix.\n  for (const auto& block_pair : block_pairs) {\n    const int row_block_id = block_pair.first;\n    const int col_block_id = block_pair.second;\n    const int row_block_size = blocks_[row_block_id];\n    const int col_block_size = blocks_[col_block_id];\n    int pos =\n        layout_[IntPairToLong(row_block_id, col_block_id)]->values - values;\n    for (int r = 0; r < row_block_size; ++r) {\n      for (int c = 0; c < col_block_size; ++c, ++pos) {\n          rows[pos] = block_positions_[row_block_id] + r;\n          cols[pos] = block_positions_[col_block_id] + c;\n          values[pos] = 1.0;\n          DCHECK_LT(rows[pos], tsm_->num_rows());\n          DCHECK_LT(cols[pos], tsm_->num_rows());\n      }\n    }\n  }\n}\n\n// Assume that the user does not hold any locks on any cell blocks\n// when they are calling SetZero.\nBlockRandomAccessSparseMatrix::~BlockRandomAccessSparseMatrix() {\n  for (const auto& entry : layout_) {\n    delete entry.second;\n  }\n}\n\nCellInfo* BlockRandomAccessSparseMatrix::GetCell(int row_block_id,\n                                                 int col_block_id,\n                                                 int* row,\n                                                 int* col,\n                                                 int* row_stride,\n                                                 int* col_stride) {\n  const LayoutType::iterator it  =\n      layout_.find(IntPairToLong(row_block_id, col_block_id));\n  if (it == layout_.end()) {\n    return NULL;\n  }\n\n  // Each cell is stored contiguously as its own little dense matrix.\n  *row = 0;\n  *col = 0;\n  *row_stride = blocks_[row_block_id];\n  *col_stride = blocks_[col_block_id];\n  return it->second;\n}\n\n// Assume that the user does not hold any locks on any cell blocks\n// when they are calling SetZero.\nvoid BlockRandomAccessSparseMatrix::SetZero() {\n  if (tsm_->num_nonzeros()) {\n    VectorRef(tsm_->mutable_values(),\n              tsm_->num_nonzeros()).setZero();\n  }\n}\n\nvoid BlockRandomAccessSparseMatrix::SymmetricRightMultiply(const double* x,\n                                                           double* y) const {\n  for (const auto& cell_position_and_data : cell_values_) {\n    const int row = cell_position_and_data.first.first;\n    const int row_block_size = blocks_[row];\n    const int row_block_pos = block_positions_[row];\n\n    const int col = cell_position_and_data.first.second;\n    const int col_block_size = blocks_[col];\n    const int col_block_pos = block_positions_[col];\n\n    MatrixVectorMultiply<Eigen::Dynamic, Eigen::Dynamic, 1>(\n        cell_position_and_data.second, row_block_size, col_block_size,\n        x + col_block_pos,\n        y + row_block_pos);\n\n    // Since the matrix is symmetric, but only the upper triangular\n    // part is stored, if the block being accessed is not a diagonal\n    // block, then use the same block to do the corresponding lower\n    // triangular multiply also.\n    if (row != col) {\n      MatrixTransposeVectorMultiply<Eigen::Dynamic, Eigen::Dynamic, 1>(\n          cell_position_and_data.second, row_block_size, col_block_size,\n          x + row_block_pos,\n          y + col_block_pos);\n    }\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/block_random_access_sparse_matrix.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_BLOCK_RANDOM_ACCESS_SPARSE_MATRIX_H_\n#define CERES_INTERNAL_BLOCK_RANDOM_ACCESS_SPARSE_MATRIX_H_\n\n#include <cstdint>\n#include <memory>\n#include <set>\n#include <unordered_map>\n#include <utility>\n#include <vector>\n\n#include \"ceres/block_random_access_matrix.h\"\n#include \"ceres/triplet_sparse_matrix.h\"\n#include \"ceres/internal/port.h\"\n#include \"ceres/types.h\"\n#include \"ceres/small_blas.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// A thread safe square block sparse implementation of\n// BlockRandomAccessMatrix. Internally a TripletSparseMatrix is used\n// for doing the actual storage. This class augments this matrix with\n// an unordered_map that allows random read/write access.\nclass BlockRandomAccessSparseMatrix : public BlockRandomAccessMatrix {\n public:\n  // blocks is an array of block sizes. block_pairs is a set of\n  // <row_block_id, col_block_id> pairs to identify the non-zero cells\n  // of this matrix.\n  BlockRandomAccessSparseMatrix(\n      const std::vector<int>& blocks,\n      const std::set<std::pair<int, int>>& block_pairs);\n  BlockRandomAccessSparseMatrix(const BlockRandomAccessSparseMatrix&) = delete;\n  void operator=(const BlockRandomAccessSparseMatrix&) = delete;\n\n  // The destructor is not thread safe. It assumes that no one is\n  // modifying any cells when the matrix is being destroyed.\n  virtual ~BlockRandomAccessSparseMatrix();\n\n  // BlockRandomAccessMatrix Interface.\n  CellInfo* GetCell(int row_block_id,\n                    int col_block_id,\n                    int* row,\n                    int* col,\n                    int* row_stride,\n                    int* col_stride) final;\n\n  // This is not a thread safe method, it assumes that no cell is\n  // locked.\n  void SetZero() final;\n\n  // Assume that the matrix is symmetric and only one half of the\n  // matrix is stored.\n  //\n  // y += S * x\n  void SymmetricRightMultiply(const double* x, double* y) const;\n\n  // Since the matrix is square, num_rows() == num_cols().\n  int num_rows() const final { return tsm_->num_rows(); }\n  int num_cols() const final { return tsm_->num_cols(); }\n\n  // Access to the underlying matrix object.\n  const TripletSparseMatrix* matrix() const { return tsm_.get(); }\n  TripletSparseMatrix* mutable_matrix() { return tsm_.get(); }\n\n private:\n  int64_t IntPairToLong(int row, int col) const {\n    return row * kMaxRowBlocks + col;\n  }\n\n  void LongToIntPair(int64_t index, int* row, int* col) const {\n    *row = index / kMaxRowBlocks;\n    *col = index % kMaxRowBlocks;\n  }\n\n  const int64_t kMaxRowBlocks;\n\n  // row/column block sizes.\n  const std::vector<int> blocks_;\n  std::vector<int> block_positions_;\n\n  // A mapping from <row_block_id, col_block_id> to the position in\n  // the values array of tsm_ where the block is stored.\n  typedef std::unordered_map<long int, CellInfo* > LayoutType;\n  LayoutType layout_;\n\n  // In order traversal of contents of the matrix. This allows us to\n  // implement a matrix-vector which is 20% faster than using the\n  // iterator in the Layout object instead.\n  std::vector<std::pair<std::pair<int, int>, double*>> cell_values_;\n  // The underlying matrix object which actually stores the cells.\n  std::unique_ptr<TripletSparseMatrix> tsm_;\n\n  friend class BlockRandomAccessSparseMatrixTest;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_BLOCK_RANDOM_ACCESS_SPARSE_MATRIX_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/block_random_access_sparse_matrix_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include <limits>\n#include <memory>\n#include <vector>\n\n#include \"ceres/block_random_access_sparse_matrix.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"glog/logging.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::make_pair;\nusing std::pair;\nusing std::set;\nusing std::vector;\n\nTEST(BlockRandomAccessSparseMatrix, GetCell) {\n  vector<int> blocks;\n  blocks.push_back(3);\n  blocks.push_back(4);\n  blocks.push_back(5);\n  const int num_rows = 3 + 4 + 5;\n\n  set<pair<int, int>> block_pairs;\n  int num_nonzeros = 0;\n  block_pairs.insert(make_pair(0, 0));\n  num_nonzeros += blocks[0] * blocks[0];\n\n  block_pairs.insert(make_pair(1, 1));\n  num_nonzeros += blocks[1] * blocks[1];\n\n  block_pairs.insert(make_pair(1, 2));\n  num_nonzeros += blocks[1] * blocks[2];\n\n  block_pairs.insert(make_pair(0, 2));\n  num_nonzeros += blocks[2] * blocks[0];\n\n  BlockRandomAccessSparseMatrix m(blocks, block_pairs);\n  EXPECT_EQ(m.num_rows(), num_rows);\n  EXPECT_EQ(m.num_cols(), num_rows);\n\n  for (const auto& block_pair : block_pairs) {\n    const int row_block_id = block_pair.first;\n    const int col_block_id = block_pair.second;\n    int row;\n    int col;\n    int row_stride;\n    int col_stride;\n    CellInfo* cell =  m.GetCell(row_block_id, col_block_id,\n                                &row, &col,\n                                &row_stride, &col_stride);\n    EXPECT_TRUE(cell != NULL);\n    EXPECT_EQ(row, 0);\n    EXPECT_EQ(col, 0);\n    EXPECT_EQ(row_stride, blocks[row_block_id]);\n    EXPECT_EQ(col_stride, blocks[col_block_id]);\n\n    // Write into the block\n    MatrixRef(cell->values, row_stride, col_stride).block(\n        row, col, blocks[row_block_id], blocks[col_block_id]) =\n        (row_block_id + 1) * (col_block_id +1) *\n        Matrix::Ones(blocks[row_block_id], blocks[col_block_id]);\n  }\n\n  const TripletSparseMatrix* tsm = m.matrix();\n  EXPECT_EQ(tsm->num_nonzeros(), num_nonzeros);\n  EXPECT_EQ(tsm->max_num_nonzeros(), num_nonzeros);\n\n  Matrix dense;\n  tsm->ToDenseMatrix(&dense);\n\n  double kTolerance = 1e-14;\n\n  // (0, 0)\n  EXPECT_NEAR((dense.block(0, 0, 3, 3) - Matrix::Ones(3, 3)).norm(),\n              0.0,\n              kTolerance);\n  // (1, 1)\n  EXPECT_NEAR((dense.block(3, 3, 4, 4) - 2 * 2 * Matrix::Ones(4, 4)).norm(),\n              0.0,\n              kTolerance);\n  // (1, 2)\n  EXPECT_NEAR((dense.block(3, 3 + 4, 4, 5) - 2 * 3 * Matrix::Ones(4, 5)).norm(),\n              0.0,\n              kTolerance);\n  // (0, 2)\n  EXPECT_NEAR((dense.block(0, 3 + 4, 3, 5) - 3 * 1 * Matrix::Ones(3, 5)).norm(),\n              0.0,\n              kTolerance);\n\n  // There is nothing else in the matrix besides these four blocks.\n  EXPECT_NEAR(dense.norm(), sqrt(9. + 16. * 16. + 36. * 20. + 9. * 15.),\n              kTolerance);\n\n  Vector x = Vector::Ones(dense.rows());\n  Vector actual_y = Vector::Zero(dense.rows());\n  Vector expected_y = Vector::Zero(dense.rows());\n\n  expected_y += dense.selfadjointView<Eigen::Upper>() * x;\n  m.SymmetricRightMultiply(x.data(), actual_y.data());\n  EXPECT_NEAR((expected_y - actual_y).norm(), 0.0, kTolerance)\n      << \"actual: \" << actual_y.transpose() << \"\\n\"\n      << \"expected: \" << expected_y.transpose()\n      << \"matrix: \\n \" << dense;\n}\n\n// IntPairToLong is private, thus this fixture is needed to access and\n// test it.\nclass BlockRandomAccessSparseMatrixTest : public ::testing::Test {\n public:\n  void SetUp() final {\n    vector<int> blocks;\n    blocks.push_back(1);\n    set<pair<int, int>> block_pairs;\n    block_pairs.insert(make_pair(0, 0));\n    m_.reset(new BlockRandomAccessSparseMatrix(blocks, block_pairs));\n  }\n\n  void CheckIntPairToLong(int a, int b) {\n    int64_t value = m_->IntPairToLong(a, b);\n    EXPECT_GT(value, 0) << \"Overflow a = \" << a << \" b = \" << b;\n    EXPECT_GT(value, a) << \"Overflow a = \" << a << \" b = \" << b;\n    EXPECT_GT(value, b) << \"Overflow a = \" << a << \" b = \" << b;\n  }\n\n  void CheckLongToIntPair() {\n    uint64_t max_rows =  m_->kMaxRowBlocks;\n    for (int row = max_rows - 10; row < max_rows; ++row) {\n      for (int col = 0; col < 10; ++col) {\n        int row_computed;\n        int col_computed;\n        m_->LongToIntPair(m_->IntPairToLong(row, col),\n                          &row_computed,\n                          &col_computed);\n        EXPECT_EQ(row, row_computed);\n        EXPECT_EQ(col, col_computed);\n      }\n    }\n  }\n\n private:\n  std::unique_ptr<BlockRandomAccessSparseMatrix> m_;\n};\n\nTEST_F(BlockRandomAccessSparseMatrixTest, IntPairToLongOverflow) {\n  CheckIntPairToLong(std::numeric_limits<int>::max(),\n                     std::numeric_limits<int>::max());\n}\n\nTEST_F(BlockRandomAccessSparseMatrixTest, LongToIntPair) {\n  CheckLongToIntPair();\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/block_sparse_matrix.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/block_sparse_matrix.h\"\n\n#include <cstddef>\n#include <algorithm>\n#include <vector>\n#include \"ceres/block_structure.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/random.h\"\n#include \"ceres/small_blas.h\"\n#include \"ceres/triplet_sparse_matrix.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::vector;\n\nBlockSparseMatrix::~BlockSparseMatrix() {}\n\nBlockSparseMatrix::BlockSparseMatrix(\n    CompressedRowBlockStructure* block_structure)\n    : num_rows_(0),\n      num_cols_(0),\n      num_nonzeros_(0),\n      block_structure_(block_structure) {\n  CHECK(block_structure_ != nullptr);\n\n  // Count the number of columns in the matrix.\n  for (int i = 0; i < block_structure_->cols.size(); ++i) {\n    num_cols_ += block_structure_->cols[i].size;\n  }\n\n  // Count the number of non-zero entries and the number of rows in\n  // the matrix.\n  for (int i = 0; i < block_structure_->rows.size(); ++i) {\n    int row_block_size = block_structure_->rows[i].block.size;\n    num_rows_ += row_block_size;\n\n    const vector<Cell>& cells = block_structure_->rows[i].cells;\n    for (int j = 0; j < cells.size(); ++j) {\n      int col_block_id = cells[j].block_id;\n      int col_block_size = block_structure_->cols[col_block_id].size;\n      num_nonzeros_ += col_block_size * row_block_size;\n    }\n  }\n\n  CHECK_GE(num_rows_, 0);\n  CHECK_GE(num_cols_, 0);\n  CHECK_GE(num_nonzeros_, 0);\n  VLOG(2) << \"Allocating values array with \"\n          << num_nonzeros_ * sizeof(double) << \" bytes.\";  // NOLINT\n  values_.reset(new double[num_nonzeros_]);\n  max_num_nonzeros_ = num_nonzeros_;\n  CHECK(values_ != nullptr);\n}\n\nvoid BlockSparseMatrix::SetZero() {\n  std::fill(values_.get(), values_.get() + num_nonzeros_, 0.0);\n}\n\nvoid BlockSparseMatrix::RightMultiply(const double* x,  double* y) const {\n  CHECK(x != nullptr);\n  CHECK(y != nullptr);\n\n  for (int i = 0; i < block_structure_->rows.size(); ++i) {\n    int row_block_pos = block_structure_->rows[i].block.position;\n    int row_block_size = block_structure_->rows[i].block.size;\n    const vector<Cell>& cells = block_structure_->rows[i].cells;\n    for (int j = 0; j < cells.size(); ++j) {\n      int col_block_id = cells[j].block_id;\n      int col_block_size = block_structure_->cols[col_block_id].size;\n      int col_block_pos = block_structure_->cols[col_block_id].position;\n      MatrixVectorMultiply<Eigen::Dynamic, Eigen::Dynamic, 1>(\n          values_.get() + cells[j].position, row_block_size, col_block_size,\n          x + col_block_pos,\n          y + row_block_pos);\n    }\n  }\n}\n\nvoid BlockSparseMatrix::LeftMultiply(const double* x, double* y) const {\n  CHECK(x != nullptr);\n  CHECK(y != nullptr);\n\n  for (int i = 0; i < block_structure_->rows.size(); ++i) {\n    int row_block_pos = block_structure_->rows[i].block.position;\n    int row_block_size = block_structure_->rows[i].block.size;\n    const vector<Cell>& cells = block_structure_->rows[i].cells;\n    for (int j = 0; j < cells.size(); ++j) {\n      int col_block_id = cells[j].block_id;\n      int col_block_size = block_structure_->cols[col_block_id].size;\n      int col_block_pos = block_structure_->cols[col_block_id].position;\n      MatrixTransposeVectorMultiply<Eigen::Dynamic, Eigen::Dynamic, 1>(\n          values_.get() + cells[j].position, row_block_size, col_block_size,\n          x + row_block_pos,\n          y + col_block_pos);\n    }\n  }\n}\n\nvoid BlockSparseMatrix::SquaredColumnNorm(double* x) const {\n  CHECK(x != nullptr);\n  VectorRef(x, num_cols_).setZero();\n  for (int i = 0; i < block_structure_->rows.size(); ++i) {\n    int row_block_size = block_structure_->rows[i].block.size;\n    const vector<Cell>& cells = block_structure_->rows[i].cells;\n    for (int j = 0; j < cells.size(); ++j) {\n      int col_block_id = cells[j].block_id;\n      int col_block_size = block_structure_->cols[col_block_id].size;\n      int col_block_pos = block_structure_->cols[col_block_id].position;\n      const MatrixRef m(values_.get() + cells[j].position,\n                        row_block_size, col_block_size);\n      VectorRef(x + col_block_pos, col_block_size) += m.colwise().squaredNorm();\n    }\n  }\n}\n\nvoid BlockSparseMatrix::ScaleColumns(const double* scale) {\n  CHECK(scale != nullptr);\n\n  for (int i = 0; i < block_structure_->rows.size(); ++i) {\n    int row_block_size = block_structure_->rows[i].block.size;\n    const vector<Cell>& cells = block_structure_->rows[i].cells;\n    for (int j = 0; j < cells.size(); ++j) {\n      int col_block_id = cells[j].block_id;\n      int col_block_size = block_structure_->cols[col_block_id].size;\n      int col_block_pos = block_structure_->cols[col_block_id].position;\n      MatrixRef m(values_.get() + cells[j].position,\n                        row_block_size, col_block_size);\n      m *= ConstVectorRef(scale + col_block_pos, col_block_size).asDiagonal();\n    }\n  }\n}\n\nvoid BlockSparseMatrix::ToDenseMatrix(Matrix* dense_matrix) const {\n  CHECK(dense_matrix != nullptr);\n\n  dense_matrix->resize(num_rows_, num_cols_);\n  dense_matrix->setZero();\n  Matrix& m = *dense_matrix;\n\n  for (int i = 0; i < block_structure_->rows.size(); ++i) {\n    int row_block_pos = block_structure_->rows[i].block.position;\n    int row_block_size = block_structure_->rows[i].block.size;\n    const vector<Cell>& cells = block_structure_->rows[i].cells;\n    for (int j = 0; j < cells.size(); ++j) {\n      int col_block_id = cells[j].block_id;\n      int col_block_size = block_structure_->cols[col_block_id].size;\n      int col_block_pos = block_structure_->cols[col_block_id].position;\n      int jac_pos = cells[j].position;\n      m.block(row_block_pos, col_block_pos, row_block_size, col_block_size)\n          += MatrixRef(values_.get() + jac_pos, row_block_size, col_block_size);\n    }\n  }\n}\n\nvoid BlockSparseMatrix::ToTripletSparseMatrix(\n    TripletSparseMatrix* matrix) const {\n  CHECK(matrix != nullptr);\n\n  matrix->Reserve(num_nonzeros_);\n  matrix->Resize(num_rows_, num_cols_);\n  matrix->SetZero();\n\n  for (int i = 0; i < block_structure_->rows.size(); ++i) {\n    int row_block_pos = block_structure_->rows[i].block.position;\n    int row_block_size = block_structure_->rows[i].block.size;\n    const vector<Cell>& cells = block_structure_->rows[i].cells;\n    for (int j = 0; j < cells.size(); ++j) {\n      int col_block_id = cells[j].block_id;\n      int col_block_size = block_structure_->cols[col_block_id].size;\n      int col_block_pos = block_structure_->cols[col_block_id].position;\n      int jac_pos = cells[j].position;\n       for (int r = 0; r < row_block_size; ++r) {\n        for (int c = 0; c < col_block_size; ++c, ++jac_pos) {\n          matrix->mutable_rows()[jac_pos] = row_block_pos + r;\n          matrix->mutable_cols()[jac_pos] = col_block_pos + c;\n          matrix->mutable_values()[jac_pos] = values_[jac_pos];\n        }\n      }\n    }\n  }\n  matrix->set_num_nonzeros(num_nonzeros_);\n}\n\n// Return a pointer to the block structure. We continue to hold\n// ownership of the object though.\nconst CompressedRowBlockStructure* BlockSparseMatrix::block_structure()\n    const {\n  return block_structure_.get();\n}\n\nvoid BlockSparseMatrix::ToTextFile(FILE* file) const {\n  CHECK(file != nullptr);\n  for (int i = 0; i < block_structure_->rows.size(); ++i) {\n    const int row_block_pos = block_structure_->rows[i].block.position;\n    const int row_block_size = block_structure_->rows[i].block.size;\n    const vector<Cell>& cells = block_structure_->rows[i].cells;\n    for (int j = 0; j < cells.size(); ++j) {\n      const int col_block_id = cells[j].block_id;\n      const int col_block_size = block_structure_->cols[col_block_id].size;\n      const int col_block_pos = block_structure_->cols[col_block_id].position;\n      int jac_pos = cells[j].position;\n      for (int r = 0; r < row_block_size; ++r) {\n        for (int c = 0; c < col_block_size; ++c) {\n          fprintf(file, \"% 10d % 10d %17f\\n\",\n                  row_block_pos + r,\n                  col_block_pos + c,\n                  values_[jac_pos++]);\n        }\n      }\n    }\n  }\n}\n\nBlockSparseMatrix* BlockSparseMatrix::CreateDiagonalMatrix(\n    const double* diagonal, const std::vector<Block>& column_blocks) {\n  // Create the block structure for the diagonal matrix.\n  CompressedRowBlockStructure* bs = new CompressedRowBlockStructure();\n  bs->cols = column_blocks;\n  int position = 0;\n  bs->rows.resize(column_blocks.size(), CompressedRow(1));\n  for (int i = 0; i < column_blocks.size(); ++i) {\n    CompressedRow& row = bs->rows[i];\n    row.block = column_blocks[i];\n    Cell& cell = row.cells[0];\n    cell.block_id = i;\n    cell.position = position;\n    position += row.block.size * row.block.size;\n  }\n\n  // Create the BlockSparseMatrix with the given block structure.\n  BlockSparseMatrix* matrix = new BlockSparseMatrix(bs);\n  matrix->SetZero();\n\n  // Fill the values array of the block sparse matrix.\n  double* values = matrix->mutable_values();\n  for (int i = 0; i < column_blocks.size(); ++i) {\n    const int size = column_blocks[i].size;\n    for (int j = 0; j < size; ++j) {\n      // (j + 1) * size is compact way of accessing the (j,j) entry.\n      values[j * (size + 1)] = diagonal[j];\n    }\n    diagonal += size;\n    values += size * size;\n  }\n\n  return matrix;\n}\n\nvoid BlockSparseMatrix::AppendRows(const BlockSparseMatrix& m) {\n  CHECK_EQ(m.num_cols(), num_cols());\n  const CompressedRowBlockStructure* m_bs = m.block_structure();\n  CHECK_EQ(m_bs->cols.size(), block_structure_->cols.size());\n\n  const int old_num_nonzeros = num_nonzeros_;\n  const int old_num_row_blocks = block_structure_->rows.size();\n  block_structure_->rows.resize(old_num_row_blocks + m_bs->rows.size());\n\n  for (int i = 0; i < m_bs->rows.size(); ++i) {\n    const CompressedRow& m_row = m_bs->rows[i];\n    CompressedRow& row = block_structure_->rows[old_num_row_blocks + i];\n    row.block.size = m_row.block.size;\n    row.block.position = num_rows_;\n    num_rows_ += m_row.block.size;\n    row.cells.resize(m_row.cells.size());\n    for (int c = 0; c < m_row.cells.size(); ++c) {\n      const int block_id = m_row.cells[c].block_id;\n      row.cells[c].block_id = block_id;\n      row.cells[c].position = num_nonzeros_;\n      num_nonzeros_ += m_row.block.size * m_bs->cols[block_id].size;\n    }\n  }\n\n  if (num_nonzeros_ > max_num_nonzeros_) {\n    double* new_values = new double[num_nonzeros_];\n    std::copy(values_.get(), values_.get() + old_num_nonzeros, new_values);\n    values_.reset(new_values);\n    max_num_nonzeros_ = num_nonzeros_;\n  }\n\n  std::copy(m.values(),\n            m.values() + m.num_nonzeros(),\n            values_.get() + old_num_nonzeros);\n}\n\nvoid BlockSparseMatrix::DeleteRowBlocks(const int delta_row_blocks) {\n  const int num_row_blocks = block_structure_->rows.size();\n  int delta_num_nonzeros = 0;\n  int delta_num_rows = 0;\n  const std::vector<Block>& column_blocks = block_structure_->cols;\n  for (int i = 0; i < delta_row_blocks; ++i) {\n    const CompressedRow& row = block_structure_->rows[num_row_blocks - i - 1];\n    delta_num_rows += row.block.size;\n    for (int c = 0; c < row.cells.size(); ++c) {\n      const Cell& cell = row.cells[c];\n      delta_num_nonzeros += row.block.size * column_blocks[cell.block_id].size;\n    }\n  }\n  num_nonzeros_ -= delta_num_nonzeros;\n  num_rows_ -= delta_num_rows;\n  block_structure_->rows.resize(num_row_blocks - delta_row_blocks);\n}\n\nBlockSparseMatrix* BlockSparseMatrix::CreateRandomMatrix(\n    const BlockSparseMatrix::RandomMatrixOptions& options) {\n  CHECK_GT(options.num_row_blocks, 0);\n  CHECK_GT(options.min_row_block_size, 0);\n  CHECK_GT(options.max_row_block_size, 0);\n  CHECK_LE(options.min_row_block_size, options.max_row_block_size);\n  CHECK_GT(options.block_density, 0.0);\n  CHECK_LE(options.block_density, 1.0);\n\n  CompressedRowBlockStructure* bs = new CompressedRowBlockStructure();\n  if (options.col_blocks.empty()) {\n    CHECK_GT(options.num_col_blocks, 0);\n    CHECK_GT(options.min_col_block_size, 0);\n    CHECK_GT(options.max_col_block_size, 0);\n    CHECK_LE(options.min_col_block_size, options.max_col_block_size);\n\n    // Generate the col block structure.\n    int col_block_position = 0;\n    for (int i = 0; i < options.num_col_blocks; ++i) {\n      // Generate a random integer in [min_col_block_size, max_col_block_size]\n      const int delta_block_size =\n          Uniform(options.max_col_block_size - options.min_col_block_size);\n      const int col_block_size = options.min_col_block_size + delta_block_size;\n      bs->cols.push_back(Block(col_block_size, col_block_position));\n      col_block_position += col_block_size;\n    }\n  } else {\n    bs->cols = options.col_blocks;\n  }\n\n  bool matrix_has_blocks = false;\n  while (!matrix_has_blocks) {\n    VLOG(1) << \"Clearing\";\n    bs->rows.clear();\n    int row_block_position = 0;\n    int value_position = 0;\n    for (int r = 0; r < options.num_row_blocks; ++r) {\n\n      const int delta_block_size =\n          Uniform(options.max_row_block_size - options.min_row_block_size);\n      const int row_block_size = options.min_row_block_size + delta_block_size;\n      bs->rows.push_back(CompressedRow());\n      CompressedRow& row = bs->rows.back();\n      row.block.size = row_block_size;\n      row.block.position = row_block_position;\n      row_block_position += row_block_size;\n      for (int c = 0; c < bs->cols.size(); ++c) {\n        if (RandDouble() > options.block_density) continue;\n\n        row.cells.push_back(Cell());\n        Cell& cell = row.cells.back();\n        cell.block_id = c;\n        cell.position = value_position;\n        value_position += row_block_size * bs->cols[c].size;\n        matrix_has_blocks = true;\n      }\n    }\n  }\n\n  BlockSparseMatrix* matrix = new BlockSparseMatrix(bs);\n  double* values = matrix->mutable_values();\n  for (int i = 0; i < matrix->num_nonzeros(); ++i) {\n    values[i] = RandNormal();\n  }\n\n  return matrix;\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/block_sparse_matrix.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Implementation of the SparseMatrix interface for block sparse\n// matrices.\n\n#ifndef CERES_INTERNAL_BLOCK_SPARSE_MATRIX_H_\n#define CERES_INTERNAL_BLOCK_SPARSE_MATRIX_H_\n\n#include <memory>\n#include \"ceres/block_structure.h\"\n#include \"ceres/sparse_matrix.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass TripletSparseMatrix;\n\n// This class implements the SparseMatrix interface for storing and\n// manipulating block sparse matrices. The block structure is stored\n// in the CompressedRowBlockStructure object and one is needed to\n// initialize the matrix. For details on how the blocks structure of\n// the matrix is stored please see the documentation\n//\n//   internal/ceres/block_structure.h\n//\nclass BlockSparseMatrix : public SparseMatrix {\n public:\n  // Construct a block sparse matrix with a fully initialized\n  // CompressedRowBlockStructure objected. The matrix takes over\n  // ownership of this object and destroys it upon destruction.\n  //\n  // TODO(sameeragarwal): Add a function which will validate legal\n  // CompressedRowBlockStructure objects.\n  explicit BlockSparseMatrix(CompressedRowBlockStructure* block_structure);\n\n  BlockSparseMatrix();\n  BlockSparseMatrix(const BlockSparseMatrix&) = delete;\n  void operator=(const BlockSparseMatrix&) = delete;\n\n  virtual ~BlockSparseMatrix();\n\n  // Implementation of SparseMatrix interface.\n  void SetZero() final;\n  void RightMultiply(const double* x, double* y) const final;\n  void LeftMultiply(const double* x, double* y) const final;\n  void SquaredColumnNorm(double* x) const final;\n  void ScaleColumns(const double* scale) final;\n  void ToDenseMatrix(Matrix* dense_matrix) const final;\n  void ToTextFile(FILE* file) const final;\n\n  int num_rows()         const final { return num_rows_;     }\n  int num_cols()         const final { return num_cols_;     }\n  int num_nonzeros()     const final { return num_nonzeros_; }\n  const double* values() const final { return values_.get(); }\n  double* mutable_values()     final { return values_.get(); }\n\n  void ToTripletSparseMatrix(TripletSparseMatrix* matrix) const;\n  const CompressedRowBlockStructure* block_structure() const;\n\n  // Append the contents of m to the bottom of this matrix. m must\n  // have the same column blocks structure as this matrix.\n  void AppendRows(const BlockSparseMatrix& m);\n\n  // Delete the bottom delta_rows_blocks.\n  void DeleteRowBlocks(int delta_row_blocks);\n\n  static BlockSparseMatrix* CreateDiagonalMatrix(\n      const double* diagonal,\n      const std::vector<Block>& column_blocks);\n\n  struct RandomMatrixOptions {\n    int num_row_blocks = 0;\n    int min_row_block_size = 0;\n    int max_row_block_size = 0;\n    int num_col_blocks = 0;\n    int min_col_block_size = 0;\n    int max_col_block_size = 0;\n\n    // 0 < block_density <= 1 is the probability of a block being\n    // present in the matrix. A given random matrix will not have\n    // precisely this density.\n    double block_density = 0.0;\n\n    // If col_blocks is non-empty, then the generated random matrix\n    // has this block structure and the column related options in this\n    // struct are ignored.\n    std::vector<Block> col_blocks;\n  };\n\n  // Create a random BlockSparseMatrix whose entries are normally\n  // distributed and whose structure is determined by\n  // RandomMatrixOptions.\n  //\n  // Caller owns the result.\n  static BlockSparseMatrix* CreateRandomMatrix(\n      const RandomMatrixOptions& options);\n\n private:\n  int num_rows_;\n  int num_cols_;\n  int num_nonzeros_;\n  int max_num_nonzeros_;\n  std::unique_ptr<double[]> values_;\n  std::unique_ptr<CompressedRowBlockStructure> block_structure_;\n};\n\n// A number of algorithms like the SchurEliminator do not need\n// access to the full BlockSparseMatrix interface. They only\n// need read only access to the values array and the block structure.\n//\n// BlockSparseDataMatrix a struct that carries these two bits of\n// information\nclass BlockSparseMatrixData {\n public:\n  BlockSparseMatrixData(const BlockSparseMatrix& m)\n      : block_structure_(m.block_structure()), values_(m.values()){};\n\n  BlockSparseMatrixData(const CompressedRowBlockStructure* block_structure,\n                        const double* values)\n      : block_structure_(block_structure), values_(values) {}\n\n  const CompressedRowBlockStructure* block_structure() const {\n    return block_structure_;\n  }\n  const double* values() const { return values_; }\n\n private:\n  const CompressedRowBlockStructure* block_structure_;\n  const double* values_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_BLOCK_SPARSE_MATRIX_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/block_sparse_matrix_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/block_sparse_matrix.h\"\n\n#include <memory>\n#include <string>\n#include \"ceres/casts.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/linear_least_squares_problems.h\"\n#include \"ceres/triplet_sparse_matrix.h\"\n#include \"glog/logging.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass BlockSparseMatrixTest : public ::testing::Test {\n protected :\n  void SetUp() final {\n    std::unique_ptr<LinearLeastSquaresProblem> problem(\n        CreateLinearLeastSquaresProblemFromId(2));\n    CHECK(problem != nullptr);\n    A_.reset(down_cast<BlockSparseMatrix*>(problem->A.release()));\n\n    problem.reset(CreateLinearLeastSquaresProblemFromId(1));\n    CHECK(problem != nullptr);\n    B_.reset(down_cast<TripletSparseMatrix*>(problem->A.release()));\n\n    CHECK_EQ(A_->num_rows(), B_->num_rows());\n    CHECK_EQ(A_->num_cols(), B_->num_cols());\n    CHECK_EQ(A_->num_nonzeros(), B_->num_nonzeros());\n  }\n\n  std::unique_ptr<BlockSparseMatrix> A_;\n  std::unique_ptr<TripletSparseMatrix> B_;\n};\n\nTEST_F(BlockSparseMatrixTest, SetZeroTest) {\n  A_->SetZero();\n  EXPECT_EQ(13, A_->num_nonzeros());\n}\n\nTEST_F(BlockSparseMatrixTest, RightMultiplyTest) {\n  Vector y_a = Vector::Zero(A_->num_rows());\n  Vector y_b = Vector::Zero(A_->num_rows());\n  for (int i = 0; i < A_->num_cols(); ++i) {\n    Vector x = Vector::Zero(A_->num_cols());\n    x[i] = 1.0;\n    A_->RightMultiply(x.data(), y_a.data());\n    B_->RightMultiply(x.data(), y_b.data());\n    EXPECT_LT((y_a - y_b).norm(), 1e-12);\n  }\n}\n\nTEST_F(BlockSparseMatrixTest, LeftMultiplyTest) {\n  Vector y_a = Vector::Zero(A_->num_cols());\n  Vector y_b = Vector::Zero(A_->num_cols());\n  for (int i = 0; i < A_->num_rows(); ++i) {\n    Vector x = Vector::Zero(A_->num_rows());\n    x[i] = 1.0;\n    A_->LeftMultiply(x.data(), y_a.data());\n    B_->LeftMultiply(x.data(), y_b.data());\n    EXPECT_LT((y_a - y_b).norm(), 1e-12);\n  }\n}\n\nTEST_F(BlockSparseMatrixTest, SquaredColumnNormTest) {\n  Vector y_a = Vector::Zero(A_->num_cols());\n  Vector y_b = Vector::Zero(A_->num_cols());\n  A_->SquaredColumnNorm(y_a.data());\n  B_->SquaredColumnNorm(y_b.data());\n  EXPECT_LT((y_a - y_b).norm(), 1e-12);\n}\n\nTEST_F(BlockSparseMatrixTest, ToDenseMatrixTest) {\n  Matrix m_a;\n  Matrix m_b;\n  A_->ToDenseMatrix(&m_a);\n  B_->ToDenseMatrix(&m_b);\n  EXPECT_LT((m_a - m_b).norm(), 1e-12);\n}\n\nTEST_F(BlockSparseMatrixTest, AppendRows) {\n  std::unique_ptr<LinearLeastSquaresProblem> problem(\n      CreateLinearLeastSquaresProblemFromId(2));\n  std::unique_ptr<BlockSparseMatrix> m(\n      down_cast<BlockSparseMatrix*>(problem->A.release()));\n  A_->AppendRows(*m);\n  EXPECT_EQ(A_->num_rows(), 2 * m->num_rows());\n  EXPECT_EQ(A_->num_cols(), m->num_cols());\n\n  problem.reset(CreateLinearLeastSquaresProblemFromId(1));\n  std::unique_ptr<TripletSparseMatrix> m2(\n      down_cast<TripletSparseMatrix*>(problem->A.release()));\n  B_->AppendRows(*m2);\n\n  Vector y_a = Vector::Zero(A_->num_rows());\n  Vector y_b = Vector::Zero(A_->num_rows());\n  for (int i = 0; i < A_->num_cols(); ++i) {\n    Vector x = Vector::Zero(A_->num_cols());\n    x[i] = 1.0;\n    y_a.setZero();\n    y_b.setZero();\n\n    A_->RightMultiply(x.data(), y_a.data());\n    B_->RightMultiply(x.data(), y_b.data());\n    EXPECT_LT((y_a - y_b).norm(), 1e-12);\n  }\n}\n\nTEST_F(BlockSparseMatrixTest, AppendAndDeleteBlockDiagonalMatrix) {\n  const std::vector<Block>& column_blocks = A_->block_structure()->cols;\n  const int num_cols =\n      column_blocks.back().size + column_blocks.back().position;\n  Vector diagonal(num_cols);\n  for (int i = 0; i < num_cols; ++i) {\n    diagonal(i) = 2 * i * i + 1;\n  }\n  std::unique_ptr<BlockSparseMatrix> appendage(\n      BlockSparseMatrix::CreateDiagonalMatrix(diagonal.data(), column_blocks));\n\n  A_->AppendRows(*appendage);\n  Vector y_a, y_b;\n  y_a.resize(A_->num_rows());\n  y_b.resize(A_->num_rows());\n  for (int i = 0; i < A_->num_cols(); ++i) {\n    Vector x = Vector::Zero(A_->num_cols());\n    x[i] = 1.0;\n    y_a.setZero();\n    y_b.setZero();\n\n    A_->RightMultiply(x.data(), y_a.data());\n    B_->RightMultiply(x.data(), y_b.data());\n    EXPECT_LT((y_a.head(B_->num_rows()) - y_b.head(B_->num_rows())).norm(), 1e-12);\n    Vector expected_tail = Vector::Zero(A_->num_cols());\n    expected_tail(i) = diagonal(i);\n    EXPECT_LT((y_a.tail(A_->num_cols()) - expected_tail).norm(), 1e-12);\n  }\n\n\n  A_->DeleteRowBlocks(column_blocks.size());\n  EXPECT_EQ(A_->num_rows(), B_->num_rows());\n  EXPECT_EQ(A_->num_cols(), B_->num_cols());\n\n  y_a.resize(A_->num_rows());\n  y_b.resize(A_->num_rows());\n  for (int i = 0; i < A_->num_cols(); ++i) {\n    Vector x = Vector::Zero(A_->num_cols());\n    x[i] = 1.0;\n    y_a.setZero();\n    y_b.setZero();\n\n    A_->RightMultiply(x.data(), y_a.data());\n    B_->RightMultiply(x.data(), y_b.data());\n    EXPECT_LT((y_a - y_b).norm(), 1e-12);\n  }\n}\n\nTEST(BlockSparseMatrix, CreateDiagonalMatrix) {\n  std::vector<Block> column_blocks;\n  column_blocks.push_back(Block(2, 0));\n  column_blocks.push_back(Block(1, 2));\n  column_blocks.push_back(Block(3, 3));\n  const int num_cols =\n      column_blocks.back().size + column_blocks.back().position;\n  Vector diagonal(num_cols);\n  for (int i = 0; i < num_cols; ++i) {\n    diagonal(i) = 2 * i * i + 1;\n  }\n\n  std::unique_ptr<BlockSparseMatrix> m(\n      BlockSparseMatrix::CreateDiagonalMatrix(diagonal.data(), column_blocks));\n  const CompressedRowBlockStructure* bs = m->block_structure();\n  EXPECT_EQ(bs->cols.size(), column_blocks.size());\n  for (int i = 0; i < column_blocks.size(); ++i) {\n    EXPECT_EQ(bs->cols[i].size, column_blocks[i].size);\n    EXPECT_EQ(bs->cols[i].position, column_blocks[i].position);\n  }\n  EXPECT_EQ(m->num_rows(), m->num_cols());\n  Vector x = Vector::Ones(num_cols);\n  Vector y = Vector::Zero(num_cols);\n  m->RightMultiply(x.data(), y.data());\n  for (int i = 0; i < num_cols; ++i) {\n    EXPECT_NEAR(y[i], diagonal[i], std::numeric_limits<double>::epsilon());\n  }\n}\n\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/block_structure.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/block_structure.h\"\n\nnamespace ceres {\nnamespace internal {\n\nbool CellLessThan(const Cell& lhs, const Cell& rhs) {\n  if (lhs.block_id == rhs.block_id) {\n    return (lhs.position  < rhs.position);\n  }\n  return (lhs.block_id < rhs.block_id);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/block_structure.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Block structure objects are used to carry information about the\n// dense block structure of sparse matrices. The BlockSparseMatrix\n// object uses the BlockStructure objects to keep track of the matrix\n// structure and operate upon it. This allows us to use more cache\n// friendly block oriented linear algebra operations on the matrix\n// instead of accessing it one scalar entry at a time.\n\n#ifndef CERES_INTERNAL_BLOCK_STRUCTURE_H_\n#define CERES_INTERNAL_BLOCK_STRUCTURE_H_\n\n#include <cstdint>\n#include <vector>\n#include \"ceres/internal/port.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntypedef int32_t BlockSize;\n\nstruct Block {\n  Block() : size(-1), position(-1) {}\n  Block(int size_, int position_) : size(size_), position(position_) {}\n\n  BlockSize size;\n  int position;  // Position along the row/column.\n};\n\nstruct Cell {\n  Cell() : block_id(-1), position(-1) {}\n  Cell(int block_id_, int position_)\n      : block_id(block_id_), position(position_) {}\n\n  // Column or row block id as the case maybe.\n  int block_id;\n  // Where in the values array of the jacobian is this cell located.\n  int position;\n};\n\n// Order cell by their block_id;\nbool CellLessThan(const Cell& lhs, const Cell& rhs);\n\nstruct CompressedList {\n  CompressedList() {}\n\n  // Construct a CompressedList with the cells containing num_cells\n  // entries.\n  CompressedList(int num_cells) : cells(num_cells) {}\n  Block block;\n  std::vector<Cell> cells;\n};\n\ntypedef CompressedList CompressedRow;\ntypedef CompressedList CompressedColumn;\n\nstruct CompressedRowBlockStructure {\n  std::vector<Block> cols;\n  std::vector<CompressedRow> rows;\n};\n\nstruct CompressedColumnBlockStructure {\n  std::vector<Block> rows;\n  std::vector<CompressedColumn> cols;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_BLOCK_STRUCTURE_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/bundle_adjustment_test_util.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n//\n// End-to-end bundle adjustment test utilities for Ceres. This base is used in\n// the generated bundle adjustment test binaries. The reason to split the\n// bundle tests into separate binaries is so the tests can get parallelized.\n\n#include <cmath>\n#include <cstdio>\n#include <cstdlib>\n#include <string>\n\n#include \"ceres/internal/port.h\"\n\n#include \"ceres/autodiff_cost_function.h\"\n#include \"ceres/ordered_groups.h\"\n#include \"ceres/problem.h\"\n#include \"ceres/rotation.h\"\n#include \"ceres/solver.h\"\n#include \"ceres/stringprintf.h\"\n#include \"ceres/test_util.h\"\n#include \"ceres/types.h\"\n#include \"gflags/gflags.h\"\n#include \"glog/logging.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::string;\nusing std::vector;\n\nconst bool kAutomaticOrdering = true;\nconst bool kUserOrdering = false;\n\n// This class implements the SystemTestProblem interface and provides\n// access to a bundle adjustment problem. It is based on\n// examples/bundle_adjustment_example.cc. Currently a small 16 camera\n// problem is hard coded in the constructor.\nclass BundleAdjustmentProblem {\n public:\n  BundleAdjustmentProblem() {\n    const string input_file = TestFileAbsolutePath(\"problem-16-22106-pre.txt\");\n    ReadData(input_file);\n    BuildProblem();\n  }\n\n  ~BundleAdjustmentProblem() {\n    delete []point_index_;\n    delete []camera_index_;\n    delete []observations_;\n    delete []parameters_;\n  }\n\n  Problem* mutable_problem() { return &problem_; }\n  Solver::Options* mutable_solver_options() { return &options_; }\n\n  int num_cameras()            const { return num_cameras_;        }\n  int num_points()             const { return num_points_;         }\n  int num_observations()       const { return num_observations_;   }\n  const int* point_index()     const { return point_index_;  }\n  const int* camera_index()    const { return camera_index_; }\n  const double* observations() const { return observations_; }\n  double* mutable_cameras() { return parameters_; }\n  double* mutable_points() { return parameters_  + 9 * num_cameras_; }\n\n  static double kResidualTolerance;\n\n private:\n  void ReadData(const string& filename) {\n    FILE * fptr = fopen(filename.c_str(), \"r\");\n\n    if (!fptr) {\n      LOG(FATAL) << \"File Error: unable to open file \" << filename;\n    }\n\n    // This will die horribly on invalid files. Them's the breaks.\n    FscanfOrDie(fptr, \"%d\", &num_cameras_);\n    FscanfOrDie(fptr, \"%d\", &num_points_);\n    FscanfOrDie(fptr, \"%d\", &num_observations_);\n\n    VLOG(1) << \"Header: \" << num_cameras_\n            << \" \" << num_points_\n            << \" \" << num_observations_;\n\n    point_index_ = new int[num_observations_];\n    camera_index_ = new int[num_observations_];\n    observations_ = new double[2 * num_observations_];\n\n    num_parameters_ = 9 * num_cameras_ + 3 * num_points_;\n    parameters_ = new double[num_parameters_];\n\n    for (int i = 0; i < num_observations_; ++i) {\n      FscanfOrDie(fptr, \"%d\", camera_index_ + i);\n      FscanfOrDie(fptr, \"%d\", point_index_ + i);\n      for (int j = 0; j < 2; ++j) {\n        FscanfOrDie(fptr, \"%lf\", observations_ + 2*i + j);\n      }\n    }\n\n    for (int i = 0; i < num_parameters_; ++i) {\n      FscanfOrDie(fptr, \"%lf\", parameters_ + i);\n    }\n\n    fclose(fptr);\n  }\n\n  void BuildProblem() {\n    double* points = mutable_points();\n    double* cameras = mutable_cameras();\n\n    for (int i = 0; i < num_observations(); ++i) {\n      // Each Residual block takes a point and a camera as input and\n      // outputs a 2 dimensional residual.\n      CostFunction* cost_function =\n          new AutoDiffCostFunction<BundlerResidual, 2, 9, 3>(\n              new BundlerResidual(observations_[2*i + 0],\n                                  observations_[2*i + 1]));\n\n      // Each observation corresponds to a pair of a camera and a point\n      // which are identified by camera_index()[i] and\n      // point_index()[i] respectively.\n      double* camera = cameras + 9 * camera_index_[i];\n      double* point = points + 3 * point_index()[i];\n      problem_.AddResidualBlock(cost_function, NULL, camera, point);\n    }\n\n    options_.linear_solver_ordering.reset(new ParameterBlockOrdering);\n\n    // The points come before the cameras.\n    for (int i = 0; i < num_points_; ++i) {\n      options_.linear_solver_ordering->AddElementToGroup(points + 3 * i, 0);\n    }\n\n    for (int i = 0; i < num_cameras_; ++i) {\n      options_.linear_solver_ordering->AddElementToGroup(cameras + 9 * i, 1);\n    }\n\n    options_.linear_solver_type = DENSE_SCHUR;\n    options_.max_num_iterations = 25;\n    options_.function_tolerance = 1e-10;\n    options_.gradient_tolerance = 1e-10;\n    options_.parameter_tolerance = 1e-10;\n  }\n\n  template<typename T>\n  void FscanfOrDie(FILE *fptr, const char *format, T *value) {\n    int num_scanned = fscanf(fptr, format, value);\n    if (num_scanned != 1) {\n      LOG(FATAL) << \"Invalid UW data file.\";\n    }\n  }\n\n  // Templated pinhole camera model.  The camera is parameterized\n  // using 9 parameters. 3 for rotation, 3 for translation, 1 for\n  // focal length and 2 for radial distortion. The principal point is\n  // not modeled (i.e. it is assumed to be located at the image\n  // center).\n  struct BundlerResidual {\n    // (u, v): the position of the observation with respect to the image\n    // center point.\n    BundlerResidual(double u, double v): u(u), v(v) {}\n\n    template <typename T>\n    bool operator()(const T* const camera,\n                    const T* const point,\n                    T* residuals) const {\n      T p[3];\n      AngleAxisRotatePoint(camera, point, p);\n\n      // Add the translation vector\n      p[0] += camera[3];\n      p[1] += camera[4];\n      p[2] += camera[5];\n\n      const T& focal = camera[6];\n      const T& l1 = camera[7];\n      const T& l2 = camera[8];\n\n      // Compute the center of distortion.  The sign change comes from\n      // the camera model that Noah Snavely's Bundler assumes, whereby\n      // the camera coordinate system has a negative z axis.\n      T xp = - focal * p[0] / p[2];\n      T yp = - focal * p[1] / p[2];\n\n      // Apply second and fourth order radial distortion.\n      T r2 = xp*xp + yp*yp;\n      T distortion = T(1.0) + r2  * (l1 + l2  * r2);\n\n      residuals[0] = distortion * xp - u;\n      residuals[1] = distortion * yp - v;\n\n      return true;\n    }\n\n    double u;\n    double v;\n  };\n\n  Problem problem_;\n  Solver::Options options_;\n\n  int num_cameras_;\n  int num_points_;\n  int num_observations_;\n  int num_parameters_;\n\n  int* point_index_;\n  int* camera_index_;\n  double* observations_;\n  // The parameter vector is laid out as follows\n  // [camera_1, ..., camera_n, point_1, ..., point_m]\n  double* parameters_;\n};\n\ndouble BundleAdjustmentProblem::kResidualTolerance = 1e-4;\ntypedef SystemTest<BundleAdjustmentProblem> BundleAdjustmentTest;\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/c_api.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: mierle@gmail.com (Keir Mierle)\n//\n// An incomplete C API for Ceres.\n//\n// TODO(keir): Figure out why logging does not seem to work.\n\n#include \"ceres/c_api.h\"\n\n#include <vector>\n#include <iostream>\n#include <string>\n#include \"ceres/cost_function.h\"\n#include \"ceres/loss_function.h\"\n#include \"ceres/problem.h\"\n#include \"ceres/solver.h\"\n#include \"ceres/types.h\"  // for std\n#include \"glog/logging.h\"\n\nusing ceres::Problem;\n\nvoid ceres_init() {\n  // This is not ideal, but it's not clear what to do if there is no gflags and\n  // no access to command line arguments.\n  char message[] = \"<unknown>\";\n  google::InitGoogleLogging(message);\n}\n\nceres_problem_t* ceres_create_problem() {\n  return reinterpret_cast<ceres_problem_t*>(new Problem);\n}\n\nvoid ceres_free_problem(ceres_problem_t* problem) {\n  delete reinterpret_cast<Problem*>(problem);\n}\n\n// This cost function wraps a C-level function pointer from the user, to bridge\n// between C and C++.\nclass CallbackCostFunction : public ceres::CostFunction {\n public:\n  CallbackCostFunction(ceres_cost_function_t cost_function,\n                       void* user_data,\n                       int num_residuals,\n                       int num_parameter_blocks,\n                       int* parameter_block_sizes)\n      : cost_function_(cost_function),\n        user_data_(user_data) {\n    set_num_residuals(num_residuals);\n    for (int i = 0; i < num_parameter_blocks; ++i) {\n      mutable_parameter_block_sizes()->push_back(parameter_block_sizes[i]);\n    }\n  }\n\n  virtual ~CallbackCostFunction() {}\n\n  bool Evaluate(double const* const* parameters,\n                        double* residuals,\n                        double** jacobians) const final {\n    return (*cost_function_)(user_data_,\n                             const_cast<double**>(parameters),\n                             residuals,\n                             jacobians);\n  }\n\n private:\n  ceres_cost_function_t cost_function_;\n  void* user_data_;\n};\n\n// This loss function wraps a C-level function pointer from the user, to bridge\n// between C and C++.\nclass CallbackLossFunction : public ceres::LossFunction {\n public:\n  explicit CallbackLossFunction(ceres_loss_function_t loss_function,\n                                void* user_data)\n    : loss_function_(loss_function), user_data_(user_data) {}\n  void Evaluate(double sq_norm, double* rho) const final {\n    (*loss_function_)(user_data_, sq_norm, rho);\n  }\n\n private:\n  ceres_loss_function_t loss_function_;\n  void* user_data_;\n};\n\n// Wrappers for the stock loss functions.\nvoid* ceres_create_huber_loss_function_data(double a) {\n  return new ceres::HuberLoss(a);\n}\nvoid* ceres_create_softl1_loss_function_data(double a) {\n  return new ceres::SoftLOneLoss(a);\n}\nvoid* ceres_create_cauchy_loss_function_data(double a) {\n  return new ceres::CauchyLoss(a);\n}\nvoid* ceres_create_arctan_loss_function_data(double a) {\n  return new ceres::ArctanLoss(a);\n}\nvoid* ceres_create_tolerant_loss_function_data(double a, double b) {\n  return new ceres::TolerantLoss(a, b);\n}\n\nvoid ceres_free_stock_loss_function_data(void* loss_function_data) {\n  delete reinterpret_cast<ceres::LossFunction*>(loss_function_data);\n}\n\nvoid ceres_stock_loss_function(void* user_data,\n                               double squared_norm,\n                               double out[3]) {\n  reinterpret_cast<ceres::LossFunction*>(user_data)\n      ->Evaluate(squared_norm, out);\n}\n\nceres_residual_block_id_t* ceres_problem_add_residual_block(\n    ceres_problem_t* problem,\n    ceres_cost_function_t cost_function,\n    void* cost_function_data,\n    ceres_loss_function_t loss_function,\n    void* loss_function_data,\n    int num_residuals,\n    int num_parameter_blocks,\n    int* parameter_block_sizes,\n    double** parameters) {\n  Problem* ceres_problem = reinterpret_cast<Problem*>(problem);\n\n  ceres::CostFunction* callback_cost_function =\n      new CallbackCostFunction(cost_function,\n                               cost_function_data,\n                               num_residuals,\n                               num_parameter_blocks,\n                               parameter_block_sizes);\n\n  ceres::LossFunction* callback_loss_function = NULL;\n  if (loss_function != NULL) {\n    callback_loss_function = new CallbackLossFunction(loss_function,\n                                                      loss_function_data);\n  }\n\n  std::vector<double*> parameter_blocks(parameters,\n                                        parameters + num_parameter_blocks);\n  return reinterpret_cast<ceres_residual_block_id_t*>(\n      ceres_problem->AddResidualBlock(callback_cost_function,\n                                      callback_loss_function,\n                                      parameter_blocks));\n}\n\nvoid ceres_solve(ceres_problem_t* c_problem) {\n  Problem* problem = reinterpret_cast<Problem*>(c_problem);\n\n  // TODO(keir): Obviously, this way of setting options won't scale or last.\n  // Instead, figure out a way to specify some of the options without\n  // duplicating everything.\n  ceres::Solver::Options options;\n  options.max_num_iterations = 100;\n  options.linear_solver_type = ceres::DENSE_QR;\n  options.minimizer_progress_to_stdout = true;\n\n  ceres::Solver::Summary summary;\n  ceres::Solve(options, problem, &summary);\n  std::cout << summary.FullReport() << \"\\n\";\n}\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/c_api_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: mierle@gmail.com (Keir Mierle)\n\n#include \"ceres/c_api.h\"\n\n#include <cmath>\n\n#include \"glog/logging.h\"\n#include \"gtest/gtest.h\"\n\n// Duplicated from curve_fitting.cc.\nint num_observations = 67;\ndouble data[] = {\n  0.000000e+00, 1.133898e+00,\n  7.500000e-02, 1.334902e+00,\n  1.500000e-01, 1.213546e+00,\n  2.250000e-01, 1.252016e+00,\n  3.000000e-01, 1.392265e+00,\n  3.750000e-01, 1.314458e+00,\n  4.500000e-01, 1.472541e+00,\n  5.250000e-01, 1.536218e+00,\n  6.000000e-01, 1.355679e+00,\n  6.750000e-01, 1.463566e+00,\n  7.500000e-01, 1.490201e+00,\n  8.250000e-01, 1.658699e+00,\n  9.000000e-01, 1.067574e+00,\n  9.750000e-01, 1.464629e+00,\n  1.050000e+00, 1.402653e+00,\n  1.125000e+00, 1.713141e+00,\n  1.200000e+00, 1.527021e+00,\n  1.275000e+00, 1.702632e+00,\n  1.350000e+00, 1.423899e+00,\n  1.425000e+00, 1.543078e+00,\n  1.500000e+00, 1.664015e+00,\n  1.575000e+00, 1.732484e+00,\n  1.650000e+00, 1.543296e+00,\n  1.725000e+00, 1.959523e+00,\n  1.800000e+00, 1.685132e+00,\n  1.875000e+00, 1.951791e+00,\n  1.950000e+00, 2.095346e+00,\n  2.025000e+00, 2.361460e+00,\n  2.100000e+00, 2.169119e+00,\n  2.175000e+00, 2.061745e+00,\n  2.250000e+00, 2.178641e+00,\n  2.325000e+00, 2.104346e+00,\n  2.400000e+00, 2.584470e+00,\n  2.475000e+00, 1.914158e+00,\n  2.550000e+00, 2.368375e+00,\n  2.625000e+00, 2.686125e+00,\n  2.700000e+00, 2.712395e+00,\n  2.775000e+00, 2.499511e+00,\n  2.850000e+00, 2.558897e+00,\n  2.925000e+00, 2.309154e+00,\n  3.000000e+00, 2.869503e+00,\n  3.075000e+00, 3.116645e+00,\n  3.150000e+00, 3.094907e+00,\n  3.225000e+00, 2.471759e+00,\n  3.300000e+00, 3.017131e+00,\n  3.375000e+00, 3.232381e+00,\n  3.450000e+00, 2.944596e+00,\n  3.525000e+00, 3.385343e+00,\n  3.600000e+00, 3.199826e+00,\n  3.675000e+00, 3.423039e+00,\n  3.750000e+00, 3.621552e+00,\n  3.825000e+00, 3.559255e+00,\n  3.900000e+00, 3.530713e+00,\n  3.975000e+00, 3.561766e+00,\n  4.050000e+00, 3.544574e+00,\n  4.125000e+00, 3.867945e+00,\n  4.200000e+00, 4.049776e+00,\n  4.275000e+00, 3.885601e+00,\n  4.350000e+00, 4.110505e+00,\n  4.425000e+00, 4.345320e+00,\n  4.500000e+00, 4.161241e+00,\n  4.575000e+00, 4.363407e+00,\n  4.650000e+00, 4.161576e+00,\n  4.725000e+00, 4.619728e+00,\n  4.800000e+00, 4.737410e+00,\n  4.875000e+00, 4.727863e+00,\n  4.950000e+00, 4.669206e+00,\n};\n\n// A test cost function, similar to the one in curve_fitting.c.\nstatic int exponential_residual(void* user_data,\n                                double** parameters,\n                                double* residuals,\n                                double** jacobians) {\n  double* measurement = (double*) user_data;\n  double x = measurement[0];\n  double y = measurement[1];\n  double m = parameters[0][0];\n  double c = parameters[1][0];\n\n  residuals[0] = y - exp(m * x + c);\n  if (jacobians == NULL) {\n    return 1;\n  }\n  if (jacobians[0] != NULL) {\n    jacobians[0][0] = - x * exp(m * x + c);  // dr/dm\n  }\n  if (jacobians[1] != NULL) {\n    jacobians[1][0] =     - exp(m * x + c);  // dr/dc\n  }\n  return 1;\n}\n\nnamespace ceres {\nnamespace internal {\n\nTEST(C_API, SimpleEndToEndTest) {\n  double m = 0.0;\n  double c = 0.0;\n  double *parameter_pointers[] = { &m, &c };\n  int parameter_sizes[] = { 1, 1 };\n\n  ceres_problem_t* problem = ceres_create_problem();\n  for (int i = 0; i < num_observations; ++i) {\n    ceres_problem_add_residual_block(\n        problem,\n        exponential_residual,  // Cost function\n        &data[2 * i],          // Points to the (x,y) measurement\n        NULL,                  // Loss function\n        NULL,                  // Loss function user data\n        1,                     // Number of residuals\n        2,                     // Number of parameter blocks\n        parameter_sizes,\n        parameter_pointers);\n  }\n\n  ceres_solve(problem);\n\n  EXPECT_NEAR(0.3, m, 0.02);\n  EXPECT_NEAR(0.1, c, 0.04);\n\n  ceres_free_problem(problem);\n}\n\ntemplate<typename T>\nclass ScopedSetValue {\n public:\n  ScopedSetValue(T* variable, T new_value)\n      : variable_(variable), old_value_(*variable) {\n    *variable = new_value;\n  }\n  ~ScopedSetValue() {\n    *variable_ = old_value_;\n  }\n\n private:\n  T* variable_;\n  T old_value_;\n};\n\nTEST(C_API, LossFunctions) {\n  double m = 0.2;\n  double c = 0.03;\n  double *parameter_pointers[] = { &m, &c };\n  int parameter_sizes[] = { 1, 1 };\n\n  // Create two outliers, but be careful to leave the data intact.\n  ScopedSetValue<double> outlier1x(&data[12], 2.5);\n  ScopedSetValue<double> outlier1y(&data[13], 1.0e3);\n  ScopedSetValue<double> outlier2x(&data[14], 3.2);\n  ScopedSetValue<double> outlier2y(&data[15], 30e3);\n\n  // Create a cauchy cost function, and reuse it many times.\n  void* cauchy_loss_data =\n      ceres_create_cauchy_loss_function_data(5.0);\n\n  ceres_problem_t* problem = ceres_create_problem();\n  for (int i = 0; i < num_observations; ++i) {\n    ceres_problem_add_residual_block(\n        problem,\n        exponential_residual,  // Cost function\n        &data[2 * i],          // Points to the (x,y) measurement\n        ceres_stock_loss_function,\n        cauchy_loss_data,      // Loss function user data\n        1,                     // Number of residuals\n        2,                     // Number of parameter blocks\n        parameter_sizes,\n        parameter_pointers);\n  }\n\n  ceres_solve(problem);\n\n  EXPECT_NEAR(0.3, m, 0.02);\n  EXPECT_NEAR(0.1, c, 0.04);\n\n  ceres_free_stock_loss_function_data(cauchy_loss_data);\n  ceres_free_problem(problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/callbacks.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include <iostream>  // NO LINT\n#include \"ceres/callbacks.h\"\n#include \"ceres/program.h\"\n#include \"ceres/stringprintf.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::string;\n\nStateUpdatingCallback::StateUpdatingCallback(Program* program,\n                                             double* parameters)\n    : program_(program), parameters_(parameters) {}\n\nStateUpdatingCallback::~StateUpdatingCallback() {}\n\nCallbackReturnType StateUpdatingCallback::operator()(\n    const IterationSummary& summary) {\n  program_->StateVectorToParameterBlocks(parameters_);\n  program_->CopyParameterBlockStateToUserState();\n  return SOLVER_CONTINUE;\n}\n\nGradientProblemSolverStateUpdatingCallback::\n    GradientProblemSolverStateUpdatingCallback(\n        int num_parameters,\n        const double* internal_parameters,\n        double* user_parameters)\n    : num_parameters_(num_parameters),\n      internal_parameters_(internal_parameters),\n      user_parameters_(user_parameters) {}\n\nGradientProblemSolverStateUpdatingCallback::\n    ~GradientProblemSolverStateUpdatingCallback() {}\n\nCallbackReturnType GradientProblemSolverStateUpdatingCallback::operator()(\n    const IterationSummary& summary) {\n  if (summary.step_is_successful) {\n    std::copy(internal_parameters_,\n              internal_parameters_ + num_parameters_,\n              user_parameters_);\n  }\n  return SOLVER_CONTINUE;\n}\n\nLoggingCallback::LoggingCallback(const MinimizerType minimizer_type,\n                                 const bool log_to_stdout)\n    : minimizer_type(minimizer_type),\n      log_to_stdout_(log_to_stdout) {}\n\nLoggingCallback::~LoggingCallback() {}\n\nCallbackReturnType LoggingCallback::operator()(\n    const IterationSummary& summary) {\n  string output;\n  if (minimizer_type == LINE_SEARCH) {\n    const char* kReportRowFormat =\n        \"% 4d: f:% 8e d:% 3.2e g:% 3.2e h:% 3.2e \"\n        \"s:% 3.2e e:% 3d it:% 3.2e tt:% 3.2e\";\n    output = StringPrintf(kReportRowFormat,\n                          summary.iteration,\n                          summary.cost,\n                          summary.cost_change,\n                          summary.gradient_max_norm,\n                          summary.step_norm,\n                          summary.step_size,\n                          summary.line_search_function_evaluations,\n                          summary.iteration_time_in_seconds,\n                          summary.cumulative_time_in_seconds);\n  } else if (minimizer_type == TRUST_REGION) {\n    if (summary.iteration == 0) {\n      output = \"iter      cost      cost_change  |gradient|   |step|    tr_ratio  tr_radius  ls_iter  iter_time  total_time\\n\";  // NOLINT\n    }\n    const char* kReportRowFormat =\n        \"% 4d % 8e   % 3.2e   % 3.2e  % 3.2e  % 3.2e % 3.2e     % 4d   % 3.2e   % 3.2e\";  // NOLINT\n    output += StringPrintf(kReportRowFormat,\n                           summary.iteration,\n                           summary.cost,\n                           summary.cost_change,\n                           summary.gradient_max_norm,\n                           summary.step_norm,\n                           summary.relative_decrease,\n                           summary.trust_region_radius,\n                           summary.linear_solver_iterations,\n                           summary.iteration_time_in_seconds,\n                           summary.cumulative_time_in_seconds);\n  } else {\n    LOG(FATAL) << \"Unknown minimizer type.\";\n  }\n\n  if (log_to_stdout_) {\n    std::cout << output << std::endl;\n  } else {\n    VLOG(1) << output;\n  }\n  return SOLVER_CONTINUE;\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/callbacks.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_CALLBACKS_H_\n#define CERES_INTERNAL_CALLBACKS_H_\n\n#include <string>\n#include \"ceres/iteration_callback.h\"\n#include \"ceres/internal/port.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass Program;\n\n// Callback for updating the externally visible state of parameter\n// blocks.\nclass StateUpdatingCallback : public IterationCallback {\n public:\n  StateUpdatingCallback(Program* program, double* parameters);\n  virtual ~StateUpdatingCallback();\n  CallbackReturnType operator()(const IterationSummary& summary) final;\n private:\n  Program* program_;\n  double* parameters_;\n};\n\n// Callback for updating the externally visible state of the\n// parameters vector for GradientProblemSolver.\nclass GradientProblemSolverStateUpdatingCallback : public IterationCallback {\n public:\n  GradientProblemSolverStateUpdatingCallback(int num_parameters,\n                                             const double* internal_parameters,\n                                             double* user_parameters);\n  virtual ~GradientProblemSolverStateUpdatingCallback();\n  CallbackReturnType operator()(const IterationSummary& summary) final;\n private:\n  int num_parameters_;\n  const double* internal_parameters_;\n  double* user_parameters_;\n};\n\n// Callback for logging the state of the minimizer to STDERR or\n// STDOUT depending on the user's preferences and logging level.\nclass LoggingCallback : public IterationCallback {\n public:\n  LoggingCallback(MinimizerType minimizer_type, bool log_to_stdout);\n  virtual ~LoggingCallback();\n  CallbackReturnType operator()(const IterationSummary& summary) final;\n\n private:\n  const MinimizerType minimizer_type;\n  const bool log_to_stdout_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_CALLBACKS_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/canonical_views_clustering.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: David Gallup (dgallup@google.com)\n//         Sameer Agarwal (sameeragarwal@google.com)\n\n#include \"ceres/canonical_views_clustering.h\"\n\n#include <unordered_set>\n#include <unordered_map>\n\n#include \"ceres/graph.h\"\n#include \"ceres/map_util.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::vector;\n\ntypedef std::unordered_map<int, int> IntMap;\ntypedef std::unordered_set<int> IntSet;\n\nclass CanonicalViewsClustering {\n public:\n  CanonicalViewsClustering() {}\n\n  // Compute the canonical views clustering of the vertices of the\n  // graph. centers will contain the vertices that are the identified\n  // as the canonical views/cluster centers, and membership is a map\n  // from vertices to cluster_ids. The i^th cluster center corresponds\n  // to the i^th cluster. It is possible depending on the\n  // configuration of the clustering algorithm that some of the\n  // vertices may not be assigned to any cluster. In this case they\n  // are assigned to a cluster with id = kInvalidClusterId.\n  void ComputeClustering(const CanonicalViewsClusteringOptions& options,\n                         const WeightedGraph<int>& graph,\n                         vector<int>* centers,\n                         IntMap* membership);\n\n private:\n  void FindValidViews(IntSet* valid_views) const;\n  double ComputeClusteringQualityDifference(const int candidate,\n                                            const vector<int>& centers) const;\n  void UpdateCanonicalViewAssignments(const int canonical_view);\n  void ComputeClusterMembership(const vector<int>& centers,\n                                IntMap* membership) const;\n\n  CanonicalViewsClusteringOptions options_;\n  const WeightedGraph<int>* graph_;\n  // Maps a view to its representative canonical view (its cluster\n  // center).\n  IntMap view_to_canonical_view_;\n  // Maps a view to its similarity to its current cluster center.\n  std::unordered_map<int, double> view_to_canonical_view_similarity_;\n};\n\nvoid ComputeCanonicalViewsClustering(\n    const CanonicalViewsClusteringOptions& options,\n    const WeightedGraph<int>& graph,\n    vector<int>* centers,\n    IntMap* membership) {\n  time_t start_time = time(NULL);\n  CanonicalViewsClustering cv;\n  cv.ComputeClustering(options, graph, centers, membership);\n  VLOG(2) << \"Canonical views clustering time (secs): \"\n          << time(NULL) - start_time;\n}\n\n// Implementation of CanonicalViewsClustering\nvoid CanonicalViewsClustering::ComputeClustering(\n    const CanonicalViewsClusteringOptions& options,\n    const WeightedGraph<int>& graph,\n    vector<int>* centers,\n    IntMap* membership) {\n  options_ = options;\n  CHECK(centers != nullptr);\n  CHECK(membership != nullptr);\n  centers->clear();\n  membership->clear();\n  graph_ = &graph;\n\n  IntSet valid_views;\n  FindValidViews(&valid_views);\n  while (valid_views.size() > 0) {\n    // Find the next best canonical view.\n    double best_difference = -std::numeric_limits<double>::max();\n    int best_view = 0;\n\n    // TODO(sameeragarwal): Make this loop multi-threaded.\n    for (const auto& view : valid_views) {\n      const double difference =\n          ComputeClusteringQualityDifference(view, *centers);\n      if (difference > best_difference) {\n        best_difference = difference;\n        best_view = view;\n      }\n    }\n\n    CHECK_GT(best_difference, -std::numeric_limits<double>::max());\n\n    // Add canonical view if quality improves, or if minimum is not\n    // yet met, otherwise break.\n    if ((best_difference <= 0) &&\n        (centers->size() >= options_.min_views)) {\n      break;\n    }\n\n    centers->push_back(best_view);\n    valid_views.erase(best_view);\n    UpdateCanonicalViewAssignments(best_view);\n  }\n\n  ComputeClusterMembership(*centers, membership);\n}\n\n// Return the set of vertices of the graph which have valid vertex\n// weights.\nvoid CanonicalViewsClustering::FindValidViews(\n    IntSet* valid_views) const {\n  const IntSet& views = graph_->vertices();\n  for (const auto& view : views) {\n    if (graph_->VertexWeight(view) != WeightedGraph<int>::InvalidWeight()) {\n      valid_views->insert(view);\n    }\n  }\n}\n\n// Computes the difference in the quality score if 'candidate' were\n// added to the set of canonical views.\ndouble CanonicalViewsClustering::ComputeClusteringQualityDifference(\n    const int candidate,\n    const vector<int>& centers) const {\n  // View score.\n  double difference =\n      options_.view_score_weight * graph_->VertexWeight(candidate);\n\n  // Compute how much the quality score changes if the candidate view\n  // was added to the list of canonical views and its nearest\n  // neighbors became members of its cluster.\n  const IntSet& neighbors = graph_->Neighbors(candidate);\n  for (const auto& neighbor : neighbors) {\n    const double old_similarity =\n        FindWithDefault(view_to_canonical_view_similarity_, neighbor, 0.0);\n    const double new_similarity = graph_->EdgeWeight(neighbor, candidate);\n    if (new_similarity > old_similarity) {\n      difference += new_similarity - old_similarity;\n    }\n  }\n\n  // Number of views penalty.\n  difference -= options_.size_penalty_weight;\n\n  // Orthogonality.\n  for (int i = 0; i < centers.size(); ++i) {\n    difference -= options_.similarity_penalty_weight *\n        graph_->EdgeWeight(centers[i], candidate);\n  }\n\n  return difference;\n}\n\n// Reassign views if they're more similar to the new canonical view.\nvoid CanonicalViewsClustering::UpdateCanonicalViewAssignments(\n    const int canonical_view) {\n  const IntSet& neighbors = graph_->Neighbors(canonical_view);\n  for (const auto& neighbor : neighbors) {\n    const double old_similarity =\n        FindWithDefault(view_to_canonical_view_similarity_, neighbor, 0.0);\n    const double new_similarity =\n        graph_->EdgeWeight(neighbor, canonical_view);\n    if (new_similarity > old_similarity) {\n      view_to_canonical_view_[neighbor] = canonical_view;\n      view_to_canonical_view_similarity_[neighbor] = new_similarity;\n    }\n  }\n}\n\n// Assign a cluster id to each view.\nvoid CanonicalViewsClustering::ComputeClusterMembership(\n    const vector<int>& centers,\n    IntMap* membership) const {\n  CHECK(membership != nullptr);\n  membership->clear();\n\n  // The i^th cluster has cluster id i.\n  IntMap center_to_cluster_id;\n  for (int i = 0; i < centers.size(); ++i) {\n    center_to_cluster_id[centers[i]] = i;\n  }\n\n  static constexpr int kInvalidClusterId = -1;\n\n  const IntSet& views = graph_->vertices();\n  for (const auto& view : views) {\n    auto it = view_to_canonical_view_.find(view);\n    int cluster_id = kInvalidClusterId;\n    if (it != view_to_canonical_view_.end()) {\n      cluster_id = FindOrDie(center_to_cluster_id, it->second);\n    }\n\n    InsertOrDie(membership, view, cluster_id);\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/canonical_views_clustering.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// An implementation of the Canonical Views clustering algorithm from\n// \"Scene Summarization for Online Image Collections\", Ian Simon, Noah\n// Snavely, Steven M. Seitz, ICCV 2007.\n//\n// More details can be found at\n// http://grail.cs.washington.edu/projects/canonview/\n//\n// Ceres uses this algorithm to perform view clustering for\n// constructing visibility based preconditioners.\n\n#ifndef CERES_INTERNAL_CANONICAL_VIEWS_CLUSTERING_H_\n#define CERES_INTERNAL_CANONICAL_VIEWS_CLUSTERING_H_\n\n#include <unordered_map>\n#include <vector>\n\n#include \"ceres/graph.h\"\n\nnamespace ceres {\nnamespace internal {\n\nstruct CanonicalViewsClusteringOptions;\n\n// Compute a partitioning of the vertices of the graph using the\n// canonical views clustering algorithm.\n//\n// In the following we will use the terms vertices and views\n// interchangeably.  Given a weighted Graph G(V,E), the canonical views\n// of G are the set of vertices that best \"summarize\" the content\n// of the graph. If w_ij i s the weight connecting the vertex i to\n// vertex j, and C is the set of canonical views. Then the objective\n// of the canonical views algorithm is\n//\n//   E[C] = sum_[i in V] max_[j in C] w_ij\n//          - size_penalty_weight * |C|\n//          - similarity_penalty_weight * sum_[i in C, j in C, j > i] w_ij\n//\n// alpha is the size penalty that penalizes large number of canonical\n// views.\n//\n// beta is the similarity penalty that penalizes canonical views that\n// are too similar to other canonical views.\n//\n// Thus the canonical views algorithm tries to find a canonical view\n// for each vertex in the graph which best explains it, while trying\n// to minimize the number of canonical views and the overlap between\n// them.\n//\n// We further augment the above objective function by allowing for per\n// vertex weights, higher weights indicating a higher preference for\n// being chosen as a canonical view. Thus if w_i is the vertex weight\n// for vertex i, the objective function is then\n//\n//   E[C] = sum_[i in V] max_[j in C] w_ij\n//          - size_penalty_weight * |C|\n//          - similarity_penalty_weight * sum_[i in C, j in C, j > i] w_ij\n//          + view_score_weight * sum_[i in C] w_i\n//\n// centers will contain the vertices that are the identified\n// as the canonical views/cluster centers, and membership is a map\n// from vertices to cluster_ids. The i^th cluster center corresponds\n// to the i^th cluster.\n//\n// It is possible depending on the configuration of the clustering\n// algorithm that some of the vertices may not be assigned to any\n// cluster. In this case they are assigned to a cluster with id = -1;\nvoid ComputeCanonicalViewsClustering(\n    const CanonicalViewsClusteringOptions& options,\n    const WeightedGraph<int>& graph,\n    std::vector<int>* centers,\n    std::unordered_map<int, int>* membership);\n\nstruct CanonicalViewsClusteringOptions {\n  // The minimum number of canonical views to compute.\n  int min_views = 3;\n\n  // Penalty weight for the number of canonical views.  A higher\n  // number will result in fewer canonical views.\n  double size_penalty_weight = 5.75;\n\n  // Penalty weight for the diversity (orthogonality) of the\n  // canonical views.  A higher number will encourage less similar\n  // canonical views.\n  double similarity_penalty_weight = 100;\n\n  // Weight for per-view scores.  Lower weight places less\n  // confidence in the view scores.\n  double view_score_weight = 0.0;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_CANONICAL_VIEWS_CLUSTERING_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/canonical_views_clustering_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: Sameer Agarwal (sameeragarwal@google.com)\n//         David Gallup (dgallup@google.com)\n\n#include \"ceres/canonical_views_clustering.h\"\n\n#include <unordered_map>\n#include \"ceres/graph.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nconst int kVertexIds[] = {0, 1, 2, 3};\nclass CanonicalViewsTest : public ::testing::Test {\n protected:\n  void SetUp() final {\n    // The graph structure is as follows.\n    //\n    // Vertex weights:   0      2      2      0\n    //                   V0-----V1-----V2-----V3\n    // Edge weights:        0.8    0.9    0.3\n    const double kVertexWeights[] = {0.0, 2.0, 2.0, -1.0};\n    for (int i = 0; i < 4; ++i) {\n      graph_.AddVertex(i, kVertexWeights[i]);\n    }\n    // Create self edges.\n    // CanonicalViews requires that every view \"sees\" itself.\n    for (int i = 0; i < 4; ++i) {\n      graph_.AddEdge(i, i, 1.0);\n    }\n\n    // Create three edges.\n    const double kEdgeWeights[] = {0.8, 0.9, 0.3};\n    for (int i = 0; i < 3; ++i) {\n      // The graph interface is directed, so remember to create both\n      // edges.\n      graph_.AddEdge(kVertexIds[i], kVertexIds[i + 1], kEdgeWeights[i]);\n    }\n  }\n\n  void ComputeClustering() {\n    ComputeCanonicalViewsClustering(options_, graph_, &centers_, &membership_);\n  }\n\n  WeightedGraph<int> graph_;\n\n  CanonicalViewsClusteringOptions options_;\n  std::vector<int> centers_;\n  std::unordered_map<int, int> membership_;\n};\n\nTEST_F(CanonicalViewsTest, ComputeCanonicalViewsTest) {\n  options_.min_views = 0;\n  options_.size_penalty_weight = 0.5;\n  options_.similarity_penalty_weight = 0.0;\n  options_.view_score_weight = 0.0;\n  ComputeClustering();\n\n  // 2 canonical views.\n  EXPECT_EQ(centers_.size(), 2);\n  EXPECT_EQ(centers_[0], kVertexIds[1]);\n  EXPECT_EQ(centers_[1], kVertexIds[3]);\n\n  // Check cluster membership.\n  EXPECT_EQ(FindOrDie(membership_, kVertexIds[0]), 0);\n  EXPECT_EQ(FindOrDie(membership_, kVertexIds[1]), 0);\n  EXPECT_EQ(FindOrDie(membership_, kVertexIds[2]), 0);\n  EXPECT_EQ(FindOrDie(membership_, kVertexIds[3]), 1);\n}\n\n// Increases size penalty so the second canonical view won't be\n// chosen.\nTEST_F(CanonicalViewsTest, SizePenaltyTest) {\n  options_.min_views = 0;\n  options_.size_penalty_weight = 2.0;\n  options_.similarity_penalty_weight = 0.0;\n  options_.view_score_weight = 0.0;\n  ComputeClustering();\n\n  // 1 canonical view.\n  EXPECT_EQ(centers_.size(), 1);\n  EXPECT_EQ(centers_[0], kVertexIds[1]);\n}\n\n\n// Increases view score weight so vertex 2 will be chosen.\nTEST_F(CanonicalViewsTest, ViewScoreTest) {\n  options_.min_views = 0;\n  options_.size_penalty_weight = 0.5;\n  options_.similarity_penalty_weight = 0.0;\n  options_.view_score_weight = 1.0;\n  ComputeClustering();\n\n  // 2 canonical views.\n  EXPECT_EQ(centers_.size(), 2);\n  EXPECT_EQ(centers_[0], kVertexIds[1]);\n  EXPECT_EQ(centers_[1], kVertexIds[2]);\n}\n\n// Increases similarity penalty so vertex 2 won't be chosen despite\n// it's view score.\nTEST_F(CanonicalViewsTest, SimilarityPenaltyTest) {\n  options_.min_views = 0;\n  options_.size_penalty_weight = 0.5;\n  options_.similarity_penalty_weight = 3.0;\n  options_.view_score_weight = 1.0;\n  ComputeClustering();\n\n  // 2 canonical views.\n  EXPECT_EQ(centers_.size(), 1);\n  EXPECT_EQ(centers_[0], kVertexIds[1]);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/casts.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n\n#ifndef CERES_INTERNAL_CASTS_H_\n#define CERES_INTERNAL_CASTS_H_\n\n#include <cassert>\n#include <cstddef>  // For NULL.\n\nnamespace ceres {\n\n// Identity metafunction.\ntemplate <class T>\nstruct identity_ {\n  typedef T type;\n};\n\n// Use implicit_cast as a safe version of static_cast or const_cast\n// for implicit conversions. For example:\n// - Upcasting in a type hierarchy.\n// - Performing arithmetic conversions (int32 to int64, int to double, etc.).\n// - Adding const or volatile qualifiers.\n//\n// In general, implicit_cast can be used to convert this code\n//   To to = from;\n//   DoSomething(to);\n// to this\n//   DoSomething(implicit_cast<To>(from));\n//\n// base::identity_ is used to make a non-deduced context, which\n// forces all callers to explicitly specify the template argument.\ntemplate<typename To>\ninline To implicit_cast(typename identity_<To>::type to) {\n  return to;\n}\n\n// This version of implicit_cast is used when two template arguments\n// are specified. It's obsolete and should not be used.\ntemplate<typename To, typename From>\ninline To implicit_cast(typename identity_<From>::type const &f) {\n  return f;\n}\n\n// When you upcast (that is, cast a pointer from type Foo to type\n// SuperclassOfFoo), it's fine to use implicit_cast<>, since upcasts\n// always succeed.  When you downcast (that is, cast a pointer from\n// type Foo to type SubclassOfFoo), static_cast<> isn't safe, because\n// how do you know the pointer is really of type SubclassOfFoo?  It\n// could be a bare Foo, or of type DifferentSubclassOfFoo.  Thus,\n// when you downcast, you should use this macro.  In debug mode, we\n// use dynamic_cast<> to double-check the downcast is legal (we die\n// if it's not).  In normal mode, we do the efficient static_cast<>\n// instead.  Thus, it's important to test in debug mode to make sure\n// the cast is legal!\n//    This is the only place in the code we should use dynamic_cast<>.\n// In particular, you SHOULDN'T be using dynamic_cast<> in order to\n// do RTTI (eg code like this:\n//    if (dynamic_cast<Subclass1>(foo)) HandleASubclass1Object(foo);\n//    if (dynamic_cast<Subclass2>(foo)) HandleASubclass2Object(foo);\n// You should design the code some other way not to need this.\n\ntemplate<typename To, typename From>     // use like this: down_cast<T*>(foo);\ninline To down_cast(From* f) {                   // so we only accept pointers\n  // Ensures that To is a sub-type of From *.  This test is here only\n  // for compile-time type checking, and has no overhead in an\n  // optimized build at run-time, as it will be optimized away\n  // completely.\n\n  // TODO(csilvers): This should use COMPILE_ASSERT.\n  if (false) {\n    implicit_cast<From*, To>(NULL);\n  }\n\n  // uses RTTI in dbg and fastbuild. asserts are disabled in opt builds.\n  assert(f == NULL || dynamic_cast<To>(f) != NULL);  // NOLINT\n  return static_cast<To>(f);\n}\n\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_CASTS_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/cgnr_linear_operator.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n\n#ifndef CERES_INTERNAL_CGNR_LINEAR_OPERATOR_H_\n#define CERES_INTERNAL_CGNR_LINEAR_OPERATOR_H_\n\n#include <algorithm>\n#include <memory>\n#include \"ceres/linear_operator.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass SparseMatrix;\n\n// A linear operator which takes a matrix A and a diagonal vector D and\n// performs products of the form\n//\n//   (A^T A + D^T D)x\n//\n// This is used to implement iterative general sparse linear solving with\n// conjugate gradients, where A is the Jacobian and D is a regularizing\n// parameter. A brief proof that D^T D is the correct regularizer:\n//\n// Given a regularized least squares problem:\n//\n//   min  ||Ax - b||^2 + ||Dx||^2\n//    x\n//\n// First expand into matrix notation:\n//\n//   (Ax - b)^T (Ax - b) + xD^TDx\n//\n// Then multiply out to get:\n//\n//   = xA^TAx - 2b^T Ax + b^Tb + xD^TDx\n//\n// Take the derivative:\n//\n//   0 = 2A^TAx - 2A^T b + 2 D^TDx\n//   0 = A^TAx - A^T b + D^TDx\n//   0 = (A^TA + D^TD)x - A^T b\n//\n// Thus, the symmetric system we need to solve for CGNR is\n//\n//   Sx = z\n//\n// with S = A^TA + D^TD\n//  and z = A^T b\n//\n// Note: This class is not thread safe, since it uses some temporary storage.\nclass CgnrLinearOperator : public LinearOperator {\n public:\n  CgnrLinearOperator(const LinearOperator& A, const double *D)\n      : A_(A), D_(D), z_(new double[A.num_rows()]) {\n  }\n  virtual ~CgnrLinearOperator() {}\n\n  void RightMultiply(const double* x, double* y) const final {\n    std::fill(z_.get(), z_.get() + A_.num_rows(), 0.0);\n\n    // z = Ax\n    A_.RightMultiply(x, z_.get());\n\n    // y = y + Atz\n    A_.LeftMultiply(z_.get(), y);\n\n    // y = y + DtDx\n    if (D_ != NULL) {\n      int n = A_.num_cols();\n      VectorRef(y, n).array() += ConstVectorRef(D_, n).array().square() *\n                                 ConstVectorRef(x, n).array();\n    }\n  }\n\n  void LeftMultiply(const double* x, double* y) const final {\n    RightMultiply(x, y);\n  }\n\n  int num_rows() const final { return A_.num_cols(); }\n  int num_cols() const final { return A_.num_cols(); }\n\n private:\n  const LinearOperator& A_;\n  const double* D_;\n  std::unique_ptr<double[]> z_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_CGNR_LINEAR_OPERATOR_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/cgnr_solver.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n\n#include \"ceres/cgnr_solver.h\"\n\n#include \"ceres/block_jacobi_preconditioner.h\"\n#include \"ceres/cgnr_linear_operator.h\"\n#include \"ceres/conjugate_gradients_solver.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/linear_solver.h\"\n#include \"ceres/subset_preconditioner.h\"\n#include \"ceres/wall_time.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nCgnrSolver::CgnrSolver(const LinearSolver::Options& options)\n    : options_(options) {\n  if (options_.preconditioner_type != JACOBI &&\n      options_.preconditioner_type != IDENTITY &&\n      options_.preconditioner_type != SUBSET) {\n    LOG(FATAL)\n        << \"Preconditioner = \"\n        << PreconditionerTypeToString(options_.preconditioner_type) << \". \"\n        << \"Congratulations, you found a bug in Ceres. Please report it.\";\n  }\n}\n\nCgnrSolver::~CgnrSolver() {}\n\nLinearSolver::Summary CgnrSolver::SolveImpl(\n    BlockSparseMatrix* A,\n    const double* b,\n    const LinearSolver::PerSolveOptions& per_solve_options,\n    double* x) {\n  EventLogger event_logger(\"CgnrSolver::Solve\");\n\n  // Form z = Atb.\n  Vector z(A->num_cols());\n  z.setZero();\n  A->LeftMultiply(b, z.data());\n\n  if (!preconditioner_) {\n    if (options_.preconditioner_type == JACOBI) {\n      preconditioner_.reset(new BlockJacobiPreconditioner(*A));\n    } else if (options_.preconditioner_type == SUBSET) {\n      Preconditioner::Options preconditioner_options;\n      preconditioner_options.type = SUBSET;\n      preconditioner_options.subset_preconditioner_start_row_block =\n          options_.subset_preconditioner_start_row_block;\n      preconditioner_options.sparse_linear_algebra_library_type =\n          options_.sparse_linear_algebra_library_type;\n      preconditioner_options.use_postordering = options_.use_postordering;\n      preconditioner_options.num_threads = options_.num_threads;\n      preconditioner_options.context = options_.context;\n      preconditioner_.reset(\n          new SubsetPreconditioner(preconditioner_options, *A));\n    }\n  }\n\n  if (preconditioner_) {\n    preconditioner_->Update(*A, per_solve_options.D);\n  }\n\n  LinearSolver::PerSolveOptions cg_per_solve_options = per_solve_options;\n  cg_per_solve_options.preconditioner = preconditioner_.get();\n\n  // Solve (AtA + DtD)x = z (= Atb).\n  VectorRef(x, A->num_cols()).setZero();\n  CgnrLinearOperator lhs(*A, per_solve_options.D);\n  event_logger.AddEvent(\"Setup\");\n\n  ConjugateGradientsSolver conjugate_gradient_solver(options_);\n  LinearSolver::Summary summary =\n      conjugate_gradient_solver.Solve(&lhs, z.data(), cg_per_solve_options, x);\n  event_logger.AddEvent(\"Solve\");\n  return summary;\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/cgnr_solver.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n\n#ifndef CERES_INTERNAL_CGNR_SOLVER_H_\n#define CERES_INTERNAL_CGNR_SOLVER_H_\n\n#include <memory>\n#include \"ceres/linear_solver.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass Preconditioner;\n\nclass BlockJacobiPreconditioner;\n\n// A conjugate gradients on the normal equations solver. This directly solves\n// for the solution to\n//\n//   (A^T A + D^T D)x = A^T b\n//\n// as required for solving for x in the least squares sense. Currently only\n// block diagonal preconditioning is supported.\nclass CgnrSolver : public BlockSparseMatrixSolver {\n public:\n  explicit CgnrSolver(const LinearSolver::Options& options);\n  CgnrSolver(const CgnrSolver&) = delete;\n  void operator=(const CgnrSolver&) = delete;\n  virtual ~CgnrSolver();\n\n  Summary SolveImpl(\n      BlockSparseMatrix* A,\n      const double* b,\n      const LinearSolver::PerSolveOptions& per_solve_options,\n      double* x) final;\n\n private:\n  const LinearSolver::Options options_;\n  std::unique_ptr<Preconditioner> preconditioner_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_CGNR_SOLVER_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/compressed_col_sparse_matrix_utils.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/compressed_col_sparse_matrix_utils.h\"\n\n#include <vector>\n#include <algorithm>\n#include \"ceres/internal/port.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::vector;\n\nvoid CompressedColumnScalarMatrixToBlockMatrix(\n    const int* scalar_rows,\n    const int* scalar_cols,\n    const vector<int>& row_blocks,\n    const vector<int>& col_blocks,\n    vector<int>* block_rows,\n    vector<int>* block_cols) {\n  CHECK(block_rows != nullptr);\n  CHECK(block_cols != nullptr);\n  block_rows->clear();\n  block_cols->clear();\n  const int num_row_blocks = row_blocks.size();\n  const int num_col_blocks = col_blocks.size();\n\n  vector<int> row_block_starts(num_row_blocks);\n  for (int i = 0, cursor = 0; i < num_row_blocks; ++i) {\n    row_block_starts[i] = cursor;\n    cursor += row_blocks[i];\n  }\n\n  // This loop extracts the block sparsity of the scalar sparse matrix\n  // It does so by iterating over the columns, but only considering\n  // the columns corresponding to the first element of each column\n  // block. Within each column, the inner loop iterates over the rows,\n  // and detects the presence of a row block by checking for the\n  // presence of a non-zero entry corresponding to its first element.\n  block_cols->push_back(0);\n  int c = 0;\n  for (int col_block = 0; col_block < num_col_blocks; ++col_block) {\n    int column_size = 0;\n    for (int idx = scalar_cols[c]; idx < scalar_cols[c + 1]; ++idx) {\n      vector<int>::const_iterator it =\n          std::lower_bound(row_block_starts.begin(),\n                           row_block_starts.end(),\n                           scalar_rows[idx]);\n      // Since we are using lower_bound, it will return the row id\n      // where the row block starts. For everything but the first row\n      // of the block, where these values will be the same, we can\n      // skip, as we only need the first row to detect the presence of\n      // the block.\n      //\n      // For rows all but the first row in the last row block,\n      // lower_bound will return row_block_starts.end(), but those can\n      // be skipped like the rows in other row blocks too.\n      if (it == row_block_starts.end() || *it != scalar_rows[idx]) {\n        continue;\n      }\n\n      block_rows->push_back(it - row_block_starts.begin());\n      ++column_size;\n    }\n    block_cols->push_back(block_cols->back() + column_size);\n    c += col_blocks[col_block];\n  }\n}\n\nvoid BlockOrderingToScalarOrdering(const vector<int>& blocks,\n                                   const vector<int>& block_ordering,\n                                   vector<int>* scalar_ordering) {\n  CHECK_EQ(blocks.size(), block_ordering.size());\n  const int num_blocks = blocks.size();\n\n  // block_starts = [0, block1, block1 + block2 ..]\n  vector<int> block_starts(num_blocks);\n  for (int i = 0, cursor = 0; i < num_blocks ; ++i) {\n    block_starts[i] = cursor;\n    cursor += blocks[i];\n  }\n\n  scalar_ordering->resize(block_starts.back() + blocks.back());\n  int cursor = 0;\n  for (int i = 0; i < num_blocks; ++i) {\n    const int block_id = block_ordering[i];\n    const int block_size = blocks[block_id];\n    int block_position = block_starts[block_id];\n    for (int j = 0; j < block_size; ++j) {\n      (*scalar_ordering)[cursor++] = block_position++;\n    }\n  }\n}\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/compressed_col_sparse_matrix_utils.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_COMPRESSED_COL_SPARSE_MATRIX_UTILS_H_\n#define CERES_INTERNAL_COMPRESSED_COL_SPARSE_MATRIX_UTILS_H_\n\n#include <vector>\n#include \"ceres/internal/port.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// Extract the block sparsity pattern of the scalar compressed columns\n// matrix and return it in compressed column form. The compressed\n// column form is stored in two vectors block_rows, and block_cols,\n// which correspond to the row and column arrays in a compressed\n// column sparse matrix.\n//\n// If c_ij is the block in the matrix A corresponding to row block i\n// and column block j, then it is expected that A contains at least\n// one non-zero entry corresponding to the top left entry of c_ij,\n// as that entry is used to detect the presence of a non-zero c_ij.\nvoid CompressedColumnScalarMatrixToBlockMatrix(\n    const int* scalar_rows,\n    const int* scalar_cols,\n    const std::vector<int>& row_blocks,\n    const std::vector<int>& col_blocks,\n    std::vector<int>* block_rows,\n    std::vector<int>* block_cols);\n\n// Given a set of blocks and a permutation of these blocks, compute\n// the corresponding \"scalar\" ordering, where the scalar ordering of\n// size sum(blocks).\nvoid BlockOrderingToScalarOrdering(\n    const std::vector<int>& blocks,\n    const std::vector<int>& block_ordering,\n    std::vector<int>* scalar_ordering);\n\n// Solve the linear system\n//\n//   R * solution = rhs\n//\n// Where R is an upper triangular compressed column sparse matrix.\ntemplate <typename IntegerType>\nvoid SolveUpperTriangularInPlace(IntegerType num_cols,\n                                 const IntegerType* rows,\n                                 const IntegerType* cols,\n                                 const double* values,\n                                 double* rhs_and_solution) {\n  for (IntegerType c = num_cols - 1; c >= 0; --c) {\n    rhs_and_solution[c] /= values[cols[c + 1] - 1];\n    for (IntegerType idx = cols[c]; idx < cols[c + 1] - 1; ++idx) {\n      const IntegerType r = rows[idx];\n      const double v = values[idx];\n      rhs_and_solution[r] -= v * rhs_and_solution[c];\n    }\n  }\n}\n\n// Solve the linear system\n//\n//   R' * solution = rhs\n//\n// Where R is an upper triangular compressed column sparse matrix.\ntemplate <typename IntegerType>\nvoid SolveUpperTriangularTransposeInPlace(IntegerType num_cols,\n                                          const IntegerType* rows,\n                                          const IntegerType* cols,\n                                          const double* values,\n                                          double* rhs_and_solution) {\n  for (IntegerType c = 0; c < num_cols; ++c) {\n    for (IntegerType idx = cols[c]; idx < cols[c + 1] - 1; ++idx) {\n      const IntegerType r = rows[idx];\n      const double v = values[idx];\n      rhs_and_solution[c] -= v * rhs_and_solution[r];\n    }\n    rhs_and_solution[c] =  rhs_and_solution[c] / values[cols[c + 1] - 1];\n  }\n}\n\n// Given a upper triangular matrix R in compressed column form, solve\n// the linear system,\n//\n//  R'R x = b\n//\n// Where b is all zeros except for rhs_nonzero_index, where it is\n// equal to one.\n//\n// The function exploits this knowledge to reduce the number of\n// floating point operations.\ntemplate <typename IntegerType>\nvoid SolveRTRWithSparseRHS(IntegerType num_cols,\n                           const IntegerType* rows,\n                           const IntegerType* cols,\n                           const double* values,\n                           const int rhs_nonzero_index,\n                           double* solution) {\n  std::fill(solution, solution + num_cols, 0.0);\n  solution[rhs_nonzero_index] = 1.0 / values[cols[rhs_nonzero_index + 1] - 1];\n\n  for (IntegerType c = rhs_nonzero_index + 1; c < num_cols; ++c) {\n    for (IntegerType idx = cols[c]; idx < cols[c + 1] - 1; ++idx) {\n      const IntegerType r = rows[idx];\n      if (r < rhs_nonzero_index) continue;\n      const double v = values[idx];\n      solution[c] -= v * solution[r];\n    }\n    solution[c] =  solution[c] / values[cols[c + 1] - 1];\n  }\n\n  SolveUpperTriangularInPlace(num_cols, rows, cols, values, solution);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_COMPRESSED_COL_SPARSE_MATRIX_UTILS_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/compressed_col_sparse_matrix_utils_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n\n#include <algorithm>\n#include <numeric>\n#include \"ceres/compressed_col_sparse_matrix_utils.h\"\n#include \"ceres/internal/port.h\"\n#include \"ceres/triplet_sparse_matrix.h\"\n#include \"glog/logging.h\"\n#include \"gtest/gtest.h\"\n#include \"Eigen/SparseCore\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::vector;\n\nTEST(_, BlockPermutationToScalarPermutation) {\n  vector<int> blocks;\n  //  Block structure\n  //  0  --1-  ---2---  ---3---  4\n  // [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n  blocks.push_back(1);\n  blocks.push_back(2);\n  blocks.push_back(3);\n  blocks.push_back(3);\n  blocks.push_back(1);\n\n  // Block ordering\n  // [1, 0, 2, 4, 5]\n  vector<int> block_ordering;\n  block_ordering.push_back(1);\n  block_ordering.push_back(0);\n  block_ordering.push_back(2);\n  block_ordering.push_back(4);\n  block_ordering.push_back(3);\n\n  // Expected ordering\n  // [1, 2, 0, 3, 4, 5, 9, 6, 7, 8]\n  vector<int> expected_scalar_ordering;\n  expected_scalar_ordering.push_back(1);\n  expected_scalar_ordering.push_back(2);\n  expected_scalar_ordering.push_back(0);\n  expected_scalar_ordering.push_back(3);\n  expected_scalar_ordering.push_back(4);\n  expected_scalar_ordering.push_back(5);\n  expected_scalar_ordering.push_back(9);\n  expected_scalar_ordering.push_back(6);\n  expected_scalar_ordering.push_back(7);\n  expected_scalar_ordering.push_back(8);\n\n  vector<int> scalar_ordering;\n  BlockOrderingToScalarOrdering(blocks,\n                                block_ordering,\n                                &scalar_ordering);\n  EXPECT_EQ(scalar_ordering.size(), expected_scalar_ordering.size());\n  for (int i = 0; i < expected_scalar_ordering.size(); ++i) {\n    EXPECT_EQ(scalar_ordering[i], expected_scalar_ordering[i]);\n  }\n}\n\nstatic void FillBlock(const vector<int>& row_blocks,\n                      const vector<int>& col_blocks,\n                      const int row_block_id,\n                      const int col_block_id,\n                      vector<Eigen::Triplet<double>>* triplets) {\n  const int row_offset = std::accumulate(&row_blocks[0], &row_blocks[row_block_id], 0);\n  const int col_offset = std::accumulate(&col_blocks[0], &col_blocks[col_block_id], 0);\n  for (int r = 0; r < row_blocks[row_block_id]; ++r) {\n    for (int c = 0; c < col_blocks[col_block_id]; ++c) {\n      triplets->push_back(Eigen::Triplet<double>(row_offset + r, col_offset + c, 1.0));\n    }\n  }\n}\n\nTEST(_, ScalarMatrixToBlockMatrix) {\n  // Block sparsity.\n  //\n  //     [1 2 3 2]\n  // [1]  x   x\n  // [2]    x   x\n  // [2]  x x\n  // num_nonzeros = 1 + 3 + 4 + 4 + 1 + 2 = 15\n\n\n  vector<int> col_blocks;\n  col_blocks.push_back(1);\n  col_blocks.push_back(2);\n  col_blocks.push_back(3);\n  col_blocks.push_back(2);\n\n  vector<int> row_blocks;\n  row_blocks.push_back(1);\n  row_blocks.push_back(2);\n  row_blocks.push_back(2);\n\n  const int num_rows = std::accumulate(row_blocks.begin(), row_blocks.end(), 0.0);\n  const int num_cols = std::accumulate(col_blocks.begin(), col_blocks.end(), 0.0);\n\n  vector<Eigen::Triplet<double>> triplets;\n  FillBlock(row_blocks, col_blocks, 0, 0, &triplets);\n  FillBlock(row_blocks, col_blocks, 2, 0, &triplets);\n  FillBlock(row_blocks, col_blocks, 1, 1, &triplets);\n  FillBlock(row_blocks, col_blocks, 2, 1, &triplets);\n  FillBlock(row_blocks, col_blocks, 0, 2, &triplets);\n  FillBlock(row_blocks, col_blocks, 1, 3, &triplets);\n  Eigen::SparseMatrix<double> sparse_matrix(num_rows, num_cols);\n  sparse_matrix.setFromTriplets(triplets.begin(), triplets.end());\n\n  vector<int> expected_compressed_block_rows;\n  expected_compressed_block_rows.push_back(0);\n  expected_compressed_block_rows.push_back(2);\n  expected_compressed_block_rows.push_back(1);\n  expected_compressed_block_rows.push_back(2);\n  expected_compressed_block_rows.push_back(0);\n  expected_compressed_block_rows.push_back(1);\n\n  vector<int> expected_compressed_block_cols;\n  expected_compressed_block_cols.push_back(0);\n  expected_compressed_block_cols.push_back(2);\n  expected_compressed_block_cols.push_back(4);\n  expected_compressed_block_cols.push_back(5);\n  expected_compressed_block_cols.push_back(6);\n\n  vector<int> compressed_block_rows;\n  vector<int> compressed_block_cols;\n  CompressedColumnScalarMatrixToBlockMatrix(\n      sparse_matrix.innerIndexPtr(),\n      sparse_matrix.outerIndexPtr(),\n      row_blocks,\n      col_blocks,\n      &compressed_block_rows,\n      &compressed_block_cols);\n\n  EXPECT_EQ(compressed_block_rows, expected_compressed_block_rows);\n  EXPECT_EQ(compressed_block_cols, expected_compressed_block_cols);\n}\n\nclass SolveUpperTriangularTest : public ::testing::Test {\n protected:\n  void SetUp() {\n    cols.resize(5);\n    rows.resize(7);\n    values.resize(7);\n\n    cols[0] = 0;\n    rows[0] = 0;\n    values[0] = 0.50754;\n\n    cols[1] = 1;\n    rows[1] = 1;\n    values[1] = 0.80483;\n\n    cols[2] = 2;\n    rows[2] = 1;\n    values[2] = 0.14120;\n    rows[3] = 2;\n    values[3] = 0.3;\n\n    cols[3] = 4;\n    rows[4] = 0;\n    values[4] = 0.77696;\n    rows[5] = 1;\n    values[5] = 0.41860;\n    rows[6] = 3;\n    values[6] = 0.88979;\n\n    cols[4] = 7;\n  }\n\n  vector<int> cols;\n  vector<int> rows;\n  vector<double> values;\n};\n\nTEST_F(SolveUpperTriangularTest, SolveInPlace) {\n  double rhs_and_solution[] = {1.0, 1.0, 2.0, 2.0};\n  const double expected[] = { -1.4706, -1.0962, 6.6667, 2.2477};\n\n  SolveUpperTriangularInPlace<int>(cols.size() - 1,\n                                   &rows[0],\n                                   &cols[0],\n                                   &values[0],\n                                   rhs_and_solution);\n\n  for (int i = 0; i < 4; ++i) {\n    EXPECT_NEAR(rhs_and_solution[i], expected[i], 1e-4) << i;\n  }\n}\n\nTEST_F(SolveUpperTriangularTest, TransposeSolveInPlace) {\n  double rhs_and_solution[] = {1.0, 1.0, 2.0, 2.0};\n  double expected[] = {1.970288,  1.242498,  6.081864, -0.057255};\n\n  SolveUpperTriangularTransposeInPlace<int>(cols.size() - 1,\n                                            &rows[0],\n                                            &cols[0],\n                                            &values[0],\n                                            rhs_and_solution);\n\n  for (int i = 0; i < 4; ++i) {\n    EXPECT_NEAR(rhs_and_solution[i], expected[i], 1e-4) << i;\n  }\n}\n\nTEST_F(SolveUpperTriangularTest, RTRSolveWithSparseRHS) {\n  double solution[4];\n  double expected[] = { 6.8420e+00,   1.0057e+00,  -1.4907e-16,  -1.9335e+00,\n                        1.0057e+00,   2.2275e+00,  -1.9493e+00,  -6.5693e-01,\n                        -1.4907e-16,  -1.9493e+00,   1.1111e+01,   9.7381e-17,\n                        -1.9335e+00,  -6.5693e-01,   9.7381e-17,   1.2631e+00 };\n\n  for (int i = 0; i < 4; ++i) {\n    SolveRTRWithSparseRHS<int>(cols.size() - 1,\n                               &rows[0],\n                               &cols[0],\n                               &values[0],\n                               i,\n                               solution);\n    for (int j = 0; j < 4; ++j) {\n      EXPECT_NEAR(solution[j], expected[4 * i + j], 1e-3) << i;\n    }\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/compressed_row_jacobian_writer.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n\n#include \"ceres/compressed_row_jacobian_writer.h\"\n\n#include <iterator>\n#include <utility>\n#include <vector>\n\n#include \"ceres/casts.h\"\n#include \"ceres/compressed_row_sparse_matrix.h\"\n#include \"ceres/parameter_block.h\"\n#include \"ceres/program.h\"\n#include \"ceres/residual_block.h\"\n#include \"ceres/scratch_evaluate_preparer.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::make_pair;\nusing std::pair;\nusing std::vector;\nusing std::adjacent_find;\n\nvoid CompressedRowJacobianWriter::PopulateJacobianRowAndColumnBlockVectors(\n    const Program* program, CompressedRowSparseMatrix* jacobian) {\n  const vector<ParameterBlock*>& parameter_blocks =\n      program->parameter_blocks();\n  vector<int>& col_blocks = *(jacobian->mutable_col_blocks());\n  col_blocks.resize(parameter_blocks.size());\n  for (int i = 0; i < parameter_blocks.size(); ++i) {\n    col_blocks[i] = parameter_blocks[i]->LocalSize();\n  }\n\n  const vector<ResidualBlock*>& residual_blocks =\n      program->residual_blocks();\n  vector<int>& row_blocks = *(jacobian->mutable_row_blocks());\n  row_blocks.resize(residual_blocks.size());\n  for (int i = 0; i < residual_blocks.size(); ++i) {\n    row_blocks[i] = residual_blocks[i]->NumResiduals();\n  }\n}\n\nvoid CompressedRowJacobianWriter::GetOrderedParameterBlocks(\n      const Program* program,\n      int residual_id,\n      vector<pair<int, int>>* evaluated_jacobian_blocks) {\n  const ResidualBlock* residual_block =\n      program->residual_blocks()[residual_id];\n  const int num_parameter_blocks = residual_block->NumParameterBlocks();\n\n  for (int j = 0; j < num_parameter_blocks; ++j) {\n    const ParameterBlock* parameter_block =\n        residual_block->parameter_blocks()[j];\n    if (!parameter_block->IsConstant()) {\n      evaluated_jacobian_blocks->push_back(\n          make_pair(parameter_block->index(), j));\n    }\n  }\n  sort(evaluated_jacobian_blocks->begin(), evaluated_jacobian_blocks->end());\n}\n\nSparseMatrix* CompressedRowJacobianWriter::CreateJacobian() const {\n  const vector<ResidualBlock*>& residual_blocks =\n      program_->residual_blocks();\n\n  int total_num_residuals = program_->NumResiduals();\n  int total_num_effective_parameters = program_->NumEffectiveParameters();\n\n  // Count the number of jacobian nonzeros.\n  int num_jacobian_nonzeros = 0;\n  for (int i = 0; i < residual_blocks.size(); ++i) {\n    ResidualBlock* residual_block = residual_blocks[i];\n    const int num_residuals = residual_block->NumResiduals();\n    const int num_parameter_blocks = residual_block->NumParameterBlocks();\n    for (int j = 0; j < num_parameter_blocks; ++j) {\n      ParameterBlock* parameter_block = residual_block->parameter_blocks()[j];\n      if (!parameter_block->IsConstant()) {\n        num_jacobian_nonzeros += num_residuals * parameter_block->LocalSize();\n      }\n    }\n  }\n\n  // Allocate storage for the jacobian with some extra space at the end.\n  // Allocate more space than needed to store the jacobian so that when the LM\n  // algorithm adds the diagonal, no reallocation is necessary. This reduces\n  // peak memory usage significantly.\n  CompressedRowSparseMatrix* jacobian =\n      new CompressedRowSparseMatrix(\n          total_num_residuals,\n          total_num_effective_parameters,\n          num_jacobian_nonzeros + total_num_effective_parameters);\n\n  // At this stage, the CompressedRowSparseMatrix is an invalid state. But this\n  // seems to be the only way to construct it without doing a memory copy.\n  int* rows = jacobian->mutable_rows();\n  int* cols = jacobian->mutable_cols();\n\n  int row_pos = 0;\n  rows[0] = 0;\n  for (int i = 0; i < residual_blocks.size(); ++i) {\n    const ResidualBlock* residual_block = residual_blocks[i];\n    const int num_parameter_blocks = residual_block->NumParameterBlocks();\n\n    // Count the number of derivatives for a row of this residual block and\n    // build a list of active parameter block indices.\n    int num_derivatives = 0;\n    vector<int> parameter_indices;\n    for (int j = 0; j < num_parameter_blocks; ++j) {\n      ParameterBlock* parameter_block = residual_block->parameter_blocks()[j];\n      if (!parameter_block->IsConstant()) {\n        parameter_indices.push_back(parameter_block->index());\n        num_derivatives += parameter_block->LocalSize();\n      }\n    }\n\n    // Sort the parameters by their position in the state vector.\n    sort(parameter_indices.begin(), parameter_indices.end());\n    if (adjacent_find(parameter_indices.begin(), parameter_indices.end()) !=\n        parameter_indices.end()) {\n      std::string parameter_block_description;\n      for (int j = 0; j < num_parameter_blocks; ++j) {\n        ParameterBlock* parameter_block = residual_block->parameter_blocks()[j];\n        parameter_block_description +=\n            parameter_block->ToString() + \"\\n\";\n      }\n      LOG(FATAL) << \"Ceres internal error: \"\n                 << \"Duplicate parameter blocks detected in a cost function. \"\n                 << \"This should never happen. Please report this to \"\n                 << \"the Ceres developers.\\n\"\n                 << \"Residual Block: \" << residual_block->ToString() << \"\\n\"\n                 << \"Parameter Blocks: \" << parameter_block_description;\n    }\n\n    // Update the row indices.\n    const int num_residuals = residual_block->NumResiduals();\n    for (int j = 0; j < num_residuals; ++j) {\n      rows[row_pos + j + 1] = rows[row_pos + j] + num_derivatives;\n    }\n\n    // Iterate over parameter blocks in the order which they occur in the\n    // parameter vector. This code mirrors that in Write(), where jacobian\n    // values are updated.\n    int col_pos = 0;\n    for (int j = 0; j < parameter_indices.size(); ++j) {\n      ParameterBlock* parameter_block =\n          program_->parameter_blocks()[parameter_indices[j]];\n      const int parameter_block_size = parameter_block->LocalSize();\n\n      for (int r = 0; r < num_residuals; ++r) {\n        // This is the position in the values array of the jacobian where this\n        // row of the jacobian block should go.\n        const int column_block_begin = rows[row_pos + r] + col_pos;\n\n        for (int c = 0; c < parameter_block_size; ++c) {\n          cols[column_block_begin + c] = parameter_block->delta_offset() + c;\n        }\n      }\n      col_pos += parameter_block_size;\n    }\n    row_pos += num_residuals;\n  }\n  CHECK_EQ(num_jacobian_nonzeros, rows[total_num_residuals]);\n\n  PopulateJacobianRowAndColumnBlockVectors(program_, jacobian);\n\n  return jacobian;\n}\n\nvoid CompressedRowJacobianWriter::Write(int residual_id,\n                                        int residual_offset,\n                                        double **jacobians,\n                                        SparseMatrix* base_jacobian) {\n  CompressedRowSparseMatrix* jacobian =\n      down_cast<CompressedRowSparseMatrix*>(base_jacobian);\n\n  double* jacobian_values = jacobian->mutable_values();\n  const int* jacobian_rows = jacobian->rows();\n\n  const ResidualBlock* residual_block =\n      program_->residual_blocks()[residual_id];\n  const int num_residuals = residual_block->NumResiduals();\n\n  vector<pair<int, int>> evaluated_jacobian_blocks;\n  GetOrderedParameterBlocks(program_, residual_id, &evaluated_jacobian_blocks);\n\n  // Where in the current row does the jacobian for a parameter block begin.\n  int col_pos = 0;\n\n  // Iterate over the jacobian blocks in increasing order of their\n  // positions in the reduced parameter vector.\n  for (int i = 0; i < evaluated_jacobian_blocks.size(); ++i) {\n    const ParameterBlock* parameter_block =\n        program_->parameter_blocks()[evaluated_jacobian_blocks[i].first];\n    const int argument = evaluated_jacobian_blocks[i].second;\n    const int parameter_block_size = parameter_block->LocalSize();\n\n    // Copy one row of the jacobian block at a time.\n    for (int r = 0; r < num_residuals; ++r) {\n      // Position of the r^th row of the current jacobian block.\n      const double* block_row_begin =\n          jacobians[argument] + r * parameter_block_size;\n\n      // Position in the values array of the jacobian where this\n      // row of the jacobian block should go.\n      double* column_block_begin =\n          jacobian_values + jacobian_rows[residual_offset + r] + col_pos;\n\n      std::copy(block_row_begin,\n                block_row_begin + parameter_block_size,\n                column_block_begin);\n    }\n    col_pos += parameter_block_size;\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/compressed_row_jacobian_writer.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n//\n// A jacobian writer that directly writes to compressed row sparse matrices.\n\n#ifndef CERES_INTERNAL_COMPRESSED_ROW_JACOBIAN_WRITER_H_\n#define CERES_INTERNAL_COMPRESSED_ROW_JACOBIAN_WRITER_H_\n\n#include <utility>\n#include <vector>\n\n#include \"ceres/evaluator.h\"\n#include \"ceres/scratch_evaluate_preparer.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass CompressedRowSparseMatrix;\nclass Program;\nclass SparseMatrix;\n\nclass CompressedRowJacobianWriter {\n public:\n  CompressedRowJacobianWriter(Evaluator::Options /* ignored */,\n                              Program* program)\n    : program_(program) {\n  }\n\n  // PopulateJacobianRowAndColumnBlockVectors sets col_blocks and\n  // row_blocks for a CompressedRowSparseMatrix, based on the\n  // parameter block sizes and residual sizes respectively from the\n  // program. This is useful when Solver::Options::use_block_amd =\n  // true;\n  //\n  // This function is static so that it is available to other jacobian\n  // writers which use CompressedRowSparseMatrix (or derived types).\n  // (Jacobian writers do not fall under any type hierarchy; they only\n  // have to provide an interface as specified in program_evaluator.h).\n  static void PopulateJacobianRowAndColumnBlockVectors(\n      const Program* program,\n      CompressedRowSparseMatrix* jacobian);\n\n  // It is necessary to determine the order of the jacobian blocks\n  // before copying them into a CompressedRowSparseMatrix (or derived\n  // type).  Just because a cost function uses parameter blocks 1\n  // after 2 in its arguments does not mean that the block 1 occurs\n  // before block 2 in the column layout of the jacobian. Thus,\n  // GetOrderedParameterBlocks determines the order by sorting the\n  // jacobian blocks by their position in the state vector.\n  //\n  // This function is static so that it is available to other jacobian\n  // writers which use CompressedRowSparseMatrix (or derived types).\n  // (Jacobian writers do not fall under any type hierarchy; they only\n  // have to provide an interface as specified in\n  // program_evaluator.h).\n  static void GetOrderedParameterBlocks(\n      const Program* program,\n      int residual_id,\n      std::vector<std::pair<int, int>>* evaluated_jacobian_blocks);\n\n  // JacobianWriter interface.\n\n  // Since the compressed row matrix has different layout than that\n  // assumed by the cost functions, use scratch space to store the\n  // jacobians temporarily then copy them over to the larger jacobian\n  // in the Write() function.\n  ScratchEvaluatePreparer* CreateEvaluatePreparers(int num_threads) {\n    return ScratchEvaluatePreparer::Create(*program_, num_threads);\n  }\n\n  SparseMatrix* CreateJacobian() const;\n\n  void Write(int residual_id,\n             int residual_offset,\n             double **jacobians,\n             SparseMatrix* base_jacobian);\n\n private:\n  Program* program_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_COMPRESSED_ROW_JACOBIAN_WRITER_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/compressed_row_sparse_matrix.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/compressed_row_sparse_matrix.h\"\n\n#include <algorithm>\n#include <numeric>\n#include <vector>\n#include \"ceres/crs_matrix.h\"\n#include \"ceres/internal/port.h\"\n#include \"ceres/random.h\"\n#include \"ceres/triplet_sparse_matrix.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::vector;\n\nnamespace {\n\n// Helper functor used by the constructor for reordering the contents\n// of a TripletSparseMatrix. This comparator assumes thay there are no\n// duplicates in the pair of arrays rows and cols, i.e., there is no\n// indices i and j (not equal to each other) s.t.\n//\n//  rows[i] == rows[j] && cols[i] == cols[j]\n//\n// If this is the case, this functor will not be a StrictWeakOrdering.\nstruct RowColLessThan {\n  RowColLessThan(const int* rows, const int* cols) : rows(rows), cols(cols) {}\n\n  bool operator()(const int x, const int y) const {\n    if (rows[x] == rows[y]) {\n      return (cols[x] < cols[y]);\n    }\n    return (rows[x] < rows[y]);\n  }\n\n  const int* rows;\n  const int* cols;\n};\n\nvoid TransposeForCompressedRowSparseStructure(const int num_rows,\n                                              const int num_cols,\n                                              const int num_nonzeros,\n                                              const int* rows,\n                                              const int* cols,\n                                              const double* values,\n                                              int* transpose_rows,\n                                              int* transpose_cols,\n                                              double* transpose_values) {\n  // Explicitly zero out transpose_rows.\n  std::fill(transpose_rows, transpose_rows + num_cols + 1, 0);\n\n  // Count the number of entries in each column of the original matrix\n  // and assign to transpose_rows[col + 1].\n  for (int idx = 0; idx < num_nonzeros; ++idx) {\n    ++transpose_rows[cols[idx] + 1];\n  }\n\n  // Compute the starting position for each row in the transpose by\n  // computing the cumulative sum of the entries of transpose_rows.\n  for (int i = 1; i < num_cols + 1; ++i) {\n    transpose_rows[i] += transpose_rows[i - 1];\n  }\n\n  // Populate transpose_cols and (optionally) transpose_values by\n  // walking the entries of the source matrices. For each entry that\n  // is added, the value of transpose_row is incremented allowing us\n  // to keep track of where the next entry for that row should go.\n  //\n  // As a result transpose_row is shifted to the left by one entry.\n  for (int r = 0; r < num_rows; ++r) {\n    for (int idx = rows[r]; idx < rows[r + 1]; ++idx) {\n      const int c = cols[idx];\n      const int transpose_idx = transpose_rows[c]++;\n      transpose_cols[transpose_idx] = r;\n      if (values != NULL && transpose_values != NULL) {\n        transpose_values[transpose_idx] = values[idx];\n      }\n    }\n  }\n\n  // This loop undoes the left shift to transpose_rows introduced by\n  // the previous loop.\n  for (int i = num_cols - 1; i > 0; --i) {\n    transpose_rows[i] = transpose_rows[i - 1];\n  }\n  transpose_rows[0] = 0;\n}\n\nvoid AddRandomBlock(const int num_rows,\n                    const int num_cols,\n                    const int row_block_begin,\n                    const int col_block_begin,\n                    std::vector<int>* rows,\n                    std::vector<int>* cols,\n                    std::vector<double>* values) {\n  for (int r = 0; r < num_rows; ++r) {\n    for (int c = 0; c < num_cols; ++c) {\n      rows->push_back(row_block_begin + r);\n      cols->push_back(col_block_begin + c);\n      values->push_back(RandNormal());\n    }\n  }\n}\n\nvoid AddSymmetricRandomBlock(const int num_rows,\n                             const int row_block_begin,\n                             std::vector<int>* rows,\n                             std::vector<int>* cols,\n                             std::vector<double>* values) {\n  for (int r = 0; r < num_rows; ++r) {\n    for (int c = r; c < num_rows; ++c) {\n      const double v = RandNormal();\n      rows->push_back(row_block_begin + r);\n      cols->push_back(row_block_begin + c);\n      values->push_back(v);\n      if (r != c) {\n        rows->push_back(row_block_begin + c);\n        cols->push_back(row_block_begin + r);\n        values->push_back(v);\n      }\n    }\n  }\n}\n\n}  // namespace\n\n// This constructor gives you a semi-initialized CompressedRowSparseMatrix.\nCompressedRowSparseMatrix::CompressedRowSparseMatrix(int num_rows,\n                                                     int num_cols,\n                                                     int max_num_nonzeros) {\n  num_rows_ = num_rows;\n  num_cols_ = num_cols;\n  storage_type_ = UNSYMMETRIC;\n  rows_.resize(num_rows + 1, 0);\n  cols_.resize(max_num_nonzeros, 0);\n  values_.resize(max_num_nonzeros, 0.0);\n\n  VLOG(1) << \"# of rows: \" << num_rows_ << \" # of columns: \" << num_cols_\n          << \" max_num_nonzeros: \" << cols_.size() << \". Allocating \"\n          << (num_rows_ + 1) * sizeof(int) +     // NOLINT\n                 cols_.size() * sizeof(int) +    // NOLINT\n                 cols_.size() * sizeof(double);  // NOLINT\n}\n\nCompressedRowSparseMatrix* CompressedRowSparseMatrix::FromTripletSparseMatrix(\n    const TripletSparseMatrix& input) {\n  return CompressedRowSparseMatrix::FromTripletSparseMatrix(input, false);\n}\n\nCompressedRowSparseMatrix*\nCompressedRowSparseMatrix::FromTripletSparseMatrixTransposed(\n    const TripletSparseMatrix& input) {\n  return CompressedRowSparseMatrix::FromTripletSparseMatrix(input, true);\n}\n\nCompressedRowSparseMatrix* CompressedRowSparseMatrix::FromTripletSparseMatrix(\n    const TripletSparseMatrix& input, bool transpose) {\n  int num_rows = input.num_rows();\n  int num_cols = input.num_cols();\n  const int* rows = input.rows();\n  const int* cols = input.cols();\n  const double* values = input.values();\n\n  if (transpose) {\n    std::swap(num_rows, num_cols);\n    std::swap(rows, cols);\n  }\n\n  // index is the list of indices into the TripletSparseMatrix input.\n  vector<int> index(input.num_nonzeros(), 0);\n  for (int i = 0; i < input.num_nonzeros(); ++i) {\n    index[i] = i;\n  }\n\n  // Sort index such that the entries of m are ordered by row and ties\n  // are broken by column.\n  std::sort(index.begin(), index.end(), RowColLessThan(rows, cols));\n\n  VLOG(1) << \"# of rows: \" << num_rows << \" # of columns: \" << num_cols\n          << \" num_nonzeros: \" << input.num_nonzeros() << \". Allocating \"\n          << ((num_rows + 1) * sizeof(int) +           // NOLINT\n              input.num_nonzeros() * sizeof(int) +     // NOLINT\n              input.num_nonzeros() * sizeof(double));  // NOLINT\n\n  CompressedRowSparseMatrix* output =\n      new CompressedRowSparseMatrix(num_rows, num_cols, input.num_nonzeros());\n\n  if (num_rows == 0) {\n    // No data to copy.\n    return output;\n  }\n\n  // Copy the contents of the cols and values array in the order given\n  // by index and count the number of entries in each row.\n  int* output_rows = output->mutable_rows();\n  int* output_cols = output->mutable_cols();\n  double* output_values = output->mutable_values();\n\n  output_rows[0] = 0;\n  for (int i = 0; i < index.size(); ++i) {\n    const int idx = index[i];\n    ++output_rows[rows[idx] + 1];\n    output_cols[i] = cols[idx];\n    output_values[i] = values[idx];\n  }\n\n  // Find the cumulative sum of the row counts.\n  for (int i = 1; i < num_rows + 1; ++i) {\n    output_rows[i] += output_rows[i - 1];\n  }\n\n  CHECK_EQ(output->num_nonzeros(), input.num_nonzeros());\n  return output;\n}\n\nCompressedRowSparseMatrix::CompressedRowSparseMatrix(const double* diagonal,\n                                                     int num_rows) {\n  CHECK(diagonal != nullptr);\n\n  num_rows_ = num_rows;\n  num_cols_ = num_rows;\n  storage_type_ = UNSYMMETRIC;\n  rows_.resize(num_rows + 1);\n  cols_.resize(num_rows);\n  values_.resize(num_rows);\n\n  rows_[0] = 0;\n  for (int i = 0; i < num_rows_; ++i) {\n    cols_[i] = i;\n    values_[i] = diagonal[i];\n    rows_[i + 1] = i + 1;\n  }\n\n  CHECK_EQ(num_nonzeros(), num_rows);\n}\n\nCompressedRowSparseMatrix::~CompressedRowSparseMatrix() {}\n\nvoid CompressedRowSparseMatrix::SetZero() {\n  std::fill(values_.begin(), values_.end(), 0);\n}\n\n// TODO(sameeragarwal): Make RightMultiply and LeftMultiply\n// block-aware for higher performance.\nvoid CompressedRowSparseMatrix::RightMultiply(const double* x,\n                                              double* y) const {\n  CHECK(x != nullptr);\n  CHECK(y != nullptr);\n\n  if (storage_type_ == UNSYMMETRIC) {\n    for (int r = 0; r < num_rows_; ++r) {\n      for (int idx = rows_[r]; idx < rows_[r + 1]; ++idx) {\n        const int c = cols_[idx];\n        const double v = values_[idx];\n        y[r] += v * x[c];\n      }\n    }\n  } else if (storage_type_ == UPPER_TRIANGULAR) {\n    // Because of their block structure, we will have entries that lie\n    // above (below) the diagonal for lower (upper) triangular matrices,\n    // so the loops below need to account for this.\n    for (int r = 0; r < num_rows_; ++r) {\n      int idx = rows_[r];\n      const int idx_end = rows_[r + 1];\n\n      // For upper triangular matrices r <= c, so skip entries with r\n      // > c.\n      while (idx < idx_end && r > cols_[idx]) {\n        ++idx;\n      }\n\n      for (; idx < idx_end; ++idx) {\n        const int c = cols_[idx];\n        const double v = values_[idx];\n        y[r] += v * x[c];\n        // Since we are only iterating over the upper triangular part\n        // of the matrix, add contributions for the strictly lower\n        // triangular part.\n        if (r != c) {\n          y[c] += v * x[r];\n        }\n      }\n    }\n  } else if (storage_type_ == LOWER_TRIANGULAR) {\n    for (int r = 0; r < num_rows_; ++r) {\n      int idx = rows_[r];\n      const int idx_end = rows_[r + 1];\n      // For lower triangular matrices, we only iterate till we are r >=\n      // c.\n      for (; idx < idx_end && r >= cols_[idx]; ++idx) {\n        const int c = cols_[idx];\n        const double v = values_[idx];\n        y[r] += v * x[c];\n        // Since we are only iterating over the lower triangular part\n        // of the matrix, add contributions for the strictly upper\n        // triangular part.\n        if (r != c) {\n          y[c] += v * x[r];\n        }\n      }\n    }\n  } else {\n    LOG(FATAL) << \"Unknown storage type: \" << storage_type_;\n  }\n}\n\nvoid CompressedRowSparseMatrix::LeftMultiply(const double* x, double* y) const {\n  CHECK(x != nullptr);\n  CHECK(y != nullptr);\n\n  if (storage_type_ == UNSYMMETRIC) {\n    for (int r = 0; r < num_rows_; ++r) {\n      for (int idx = rows_[r]; idx < rows_[r + 1]; ++idx) {\n        y[cols_[idx]] += values_[idx] * x[r];\n      }\n    }\n  } else {\n    // Since the matrix is symmetric, LeftMultiply = RightMultiply.\n    RightMultiply(x, y);\n  }\n}\n\nvoid CompressedRowSparseMatrix::SquaredColumnNorm(double* x) const {\n  CHECK(x != nullptr);\n\n  std::fill(x, x + num_cols_, 0.0);\n  if (storage_type_ == UNSYMMETRIC) {\n    for (int idx = 0; idx < rows_[num_rows_]; ++idx) {\n      x[cols_[idx]] += values_[idx] * values_[idx];\n    }\n  } else if (storage_type_ == UPPER_TRIANGULAR) {\n    // Because of their block structure, we will have entries that lie\n    // above (below) the diagonal for lower (upper) triangular\n    // matrices, so the loops below need to account for this.\n    for (int r = 0; r < num_rows_; ++r) {\n      int idx = rows_[r];\n      const int idx_end = rows_[r + 1];\n\n      // For upper triangular matrices r <= c, so skip entries with r\n      // > c.\n      while (idx < idx_end && r > cols_[idx]) {\n        ++idx;\n      }\n\n      for (; idx < idx_end; ++idx) {\n        const int c = cols_[idx];\n        const double v2 = values_[idx] * values_[idx];\n        x[c] += v2;\n        // Since we are only iterating over the upper triangular part\n        // of the matrix, add contributions for the strictly lower\n        // triangular part.\n        if (r != c) {\n          x[r] += v2;\n        }\n      }\n    }\n  } else if (storage_type_ == LOWER_TRIANGULAR) {\n    for (int r = 0; r < num_rows_; ++r) {\n      int idx = rows_[r];\n      const int idx_end = rows_[r + 1];\n      // For lower triangular matrices, we only iterate till we are r >=\n      // c.\n      for (; idx < idx_end && r >= cols_[idx]; ++idx) {\n        const int c = cols_[idx];\n        const double v2 = values_[idx] * values_[idx];\n        x[c] += v2;\n        // Since we are only iterating over the lower triangular part\n        // of the matrix, add contributions for the strictly upper\n        // triangular part.\n        if (r != c) {\n          x[r] += v2;\n        }\n      }\n    }\n  } else {\n    LOG(FATAL) << \"Unknown storage type: \" << storage_type_;\n  }\n}\nvoid CompressedRowSparseMatrix::ScaleColumns(const double* scale) {\n  CHECK(scale != nullptr);\n\n  for (int idx = 0; idx < rows_[num_rows_]; ++idx) {\n    values_[idx] *= scale[cols_[idx]];\n  }\n}\n\nvoid CompressedRowSparseMatrix::ToDenseMatrix(Matrix* dense_matrix) const {\n  CHECK(dense_matrix != nullptr);\n  dense_matrix->resize(num_rows_, num_cols_);\n  dense_matrix->setZero();\n\n  for (int r = 0; r < num_rows_; ++r) {\n    for (int idx = rows_[r]; idx < rows_[r + 1]; ++idx) {\n      (*dense_matrix)(r, cols_[idx]) = values_[idx];\n    }\n  }\n}\n\nvoid CompressedRowSparseMatrix::DeleteRows(int delta_rows) {\n  CHECK_GE(delta_rows, 0);\n  CHECK_LE(delta_rows, num_rows_);\n  CHECK_EQ(storage_type_, UNSYMMETRIC);\n\n  num_rows_ -= delta_rows;\n  rows_.resize(num_rows_ + 1);\n\n  // The rest of the code updates the block information. Immediately\n  // return in case of no block information.\n  if (row_blocks_.empty()) {\n    return;\n  }\n\n  // Walk the list of row blocks until we reach the new number of rows\n  // and the drop the rest of the row blocks.\n  int num_row_blocks = 0;\n  int num_rows = 0;\n  while (num_row_blocks < row_blocks_.size() && num_rows < num_rows_) {\n    num_rows += row_blocks_[num_row_blocks];\n    ++num_row_blocks;\n  }\n\n  row_blocks_.resize(num_row_blocks);\n}\n\nvoid CompressedRowSparseMatrix::AppendRows(const CompressedRowSparseMatrix& m) {\n  CHECK_EQ(storage_type_, UNSYMMETRIC);\n  CHECK_EQ(m.num_cols(), num_cols_);\n\n  CHECK((row_blocks_.empty() && m.row_blocks().empty()) ||\n        (!row_blocks_.empty() && !m.row_blocks().empty()))\n      << \"Cannot append a matrix with row blocks to one without and vice versa.\"\n      << \"This matrix has : \" << row_blocks_.size() << \" row blocks.\"\n      << \"The matrix being appended has: \" << m.row_blocks().size()\n      << \" row blocks.\";\n\n  if (m.num_rows() == 0) {\n    return;\n  }\n\n  if (cols_.size() < num_nonzeros() + m.num_nonzeros()) {\n    cols_.resize(num_nonzeros() + m.num_nonzeros());\n    values_.resize(num_nonzeros() + m.num_nonzeros());\n  }\n\n  // Copy the contents of m into this matrix.\n  DCHECK_LT(num_nonzeros(), cols_.size());\n  if (m.num_nonzeros() > 0) {\n    std::copy(m.cols(), m.cols() + m.num_nonzeros(), &cols_[num_nonzeros()]);\n    std::copy(\n        m.values(), m.values() + m.num_nonzeros(), &values_[num_nonzeros()]);\n  }\n\n  rows_.resize(num_rows_ + m.num_rows() + 1);\n  // new_rows = [rows_, m.row() + rows_[num_rows_]]\n  std::fill(rows_.begin() + num_rows_,\n            rows_.begin() + num_rows_ + m.num_rows() + 1,\n            rows_[num_rows_]);\n\n  for (int r = 0; r < m.num_rows() + 1; ++r) {\n    rows_[num_rows_ + r] += m.rows()[r];\n  }\n\n  num_rows_ += m.num_rows();\n\n  // The rest of the code updates the block information. Immediately\n  // return in case of no block information.\n  if (row_blocks_.empty()) {\n    return;\n  }\n\n  row_blocks_.insert(\n      row_blocks_.end(), m.row_blocks().begin(), m.row_blocks().end());\n}\n\nvoid CompressedRowSparseMatrix::ToTextFile(FILE* file) const {\n  CHECK(file != nullptr);\n  for (int r = 0; r < num_rows_; ++r) {\n    for (int idx = rows_[r]; idx < rows_[r + 1]; ++idx) {\n      fprintf(file, \"% 10d % 10d %17f\\n\", r, cols_[idx], values_[idx]);\n    }\n  }\n}\n\nvoid CompressedRowSparseMatrix::ToCRSMatrix(CRSMatrix* matrix) const {\n  matrix->num_rows = num_rows_;\n  matrix->num_cols = num_cols_;\n  matrix->rows = rows_;\n  matrix->cols = cols_;\n  matrix->values = values_;\n\n  // Trim.\n  matrix->rows.resize(matrix->num_rows + 1);\n  matrix->cols.resize(matrix->rows[matrix->num_rows]);\n  matrix->values.resize(matrix->rows[matrix->num_rows]);\n}\n\nvoid CompressedRowSparseMatrix::SetMaxNumNonZeros(int num_nonzeros) {\n  CHECK_GE(num_nonzeros, 0);\n\n  cols_.resize(num_nonzeros);\n  values_.resize(num_nonzeros);\n}\n\nCompressedRowSparseMatrix* CompressedRowSparseMatrix::CreateBlockDiagonalMatrix(\n    const double* diagonal, const vector<int>& blocks) {\n  int num_rows = 0;\n  int num_nonzeros = 0;\n  for (int i = 0; i < blocks.size(); ++i) {\n    num_rows += blocks[i];\n    num_nonzeros += blocks[i] * blocks[i];\n  }\n\n  CompressedRowSparseMatrix* matrix =\n      new CompressedRowSparseMatrix(num_rows, num_rows, num_nonzeros);\n\n  int* rows = matrix->mutable_rows();\n  int* cols = matrix->mutable_cols();\n  double* values = matrix->mutable_values();\n  std::fill(values, values + num_nonzeros, 0.0);\n\n  int idx_cursor = 0;\n  int col_cursor = 0;\n  for (int i = 0; i < blocks.size(); ++i) {\n    const int block_size = blocks[i];\n    for (int r = 0; r < block_size; ++r) {\n      *(rows++) = idx_cursor;\n      values[idx_cursor + r] = diagonal[col_cursor + r];\n      for (int c = 0; c < block_size; ++c, ++idx_cursor) {\n        *(cols++) = col_cursor + c;\n      }\n    }\n    col_cursor += block_size;\n  }\n  *rows = idx_cursor;\n\n  *matrix->mutable_row_blocks() = blocks;\n  *matrix->mutable_col_blocks() = blocks;\n\n  CHECK_EQ(idx_cursor, num_nonzeros);\n  CHECK_EQ(col_cursor, num_rows);\n  return matrix;\n}\n\nCompressedRowSparseMatrix* CompressedRowSparseMatrix::Transpose() const {\n  CompressedRowSparseMatrix* transpose =\n      new CompressedRowSparseMatrix(num_cols_, num_rows_, num_nonzeros());\n\n  switch (storage_type_) {\n    case UNSYMMETRIC:\n      transpose->set_storage_type(UNSYMMETRIC);\n      break;\n    case LOWER_TRIANGULAR:\n      transpose->set_storage_type(UPPER_TRIANGULAR);\n      break;\n    case UPPER_TRIANGULAR:\n      transpose->set_storage_type(LOWER_TRIANGULAR);\n      break;\n    default:\n      LOG(FATAL) << \"Unknown storage type: \" << storage_type_;\n  };\n\n  TransposeForCompressedRowSparseStructure(num_rows(),\n                                           num_cols(),\n                                           num_nonzeros(),\n                                           rows(),\n                                           cols(),\n                                           values(),\n                                           transpose->mutable_rows(),\n                                           transpose->mutable_cols(),\n                                           transpose->mutable_values());\n\n  // The rest of the code updates the block information. Immediately\n  // return in case of no block information.\n  if (row_blocks_.empty()) {\n    return transpose;\n  }\n\n  *(transpose->mutable_row_blocks()) = col_blocks_;\n  *(transpose->mutable_col_blocks()) = row_blocks_;\n  return transpose;\n}\n\nCompressedRowSparseMatrix* CompressedRowSparseMatrix::CreateRandomMatrix(\n    CompressedRowSparseMatrix::RandomMatrixOptions options) {\n  CHECK_GT(options.num_row_blocks, 0);\n  CHECK_GT(options.min_row_block_size, 0);\n  CHECK_GT(options.max_row_block_size, 0);\n  CHECK_LE(options.min_row_block_size, options.max_row_block_size);\n\n  if (options.storage_type == UNSYMMETRIC) {\n    CHECK_GT(options.num_col_blocks, 0);\n    CHECK_GT(options.min_col_block_size, 0);\n    CHECK_GT(options.max_col_block_size, 0);\n    CHECK_LE(options.min_col_block_size, options.max_col_block_size);\n  } else {\n    // Symmetric matrices (LOWER_TRIANGULAR or UPPER_TRIANGULAR);\n    options.num_col_blocks = options.num_row_blocks;\n    options.min_col_block_size = options.min_row_block_size;\n    options.max_col_block_size = options.max_row_block_size;\n  }\n\n  CHECK_GT(options.block_density, 0.0);\n  CHECK_LE(options.block_density, 1.0);\n\n  vector<int> row_blocks;\n  vector<int> col_blocks;\n\n  // Generate the row block structure.\n  for (int i = 0; i < options.num_row_blocks; ++i) {\n    // Generate a random integer in [min_row_block_size, max_row_block_size]\n    const int delta_block_size =\n        Uniform(options.max_row_block_size - options.min_row_block_size);\n    row_blocks.push_back(options.min_row_block_size + delta_block_size);\n  }\n\n  if (options.storage_type == UNSYMMETRIC) {\n    // Generate the col block structure.\n    for (int i = 0; i < options.num_col_blocks; ++i) {\n      // Generate a random integer in [min_col_block_size, max_col_block_size]\n      const int delta_block_size =\n          Uniform(options.max_col_block_size - options.min_col_block_size);\n      col_blocks.push_back(options.min_col_block_size + delta_block_size);\n    }\n  } else {\n    // Symmetric matrices (LOWER_TRIANGULAR or UPPER_TRIANGULAR);\n    col_blocks = row_blocks;\n  }\n\n  vector<int> tsm_rows;\n  vector<int> tsm_cols;\n  vector<double> tsm_values;\n\n  // For ease of construction, we are going to generate the\n  // CompressedRowSparseMatrix by generating it as a\n  // TripletSparseMatrix and then converting it to a\n  // CompressedRowSparseMatrix.\n\n  // It is possible that the random matrix is empty which is likely\n  // not what the user wants, so do the matrix generation till we have\n  // at least one non-zero entry.\n  while (tsm_values.empty()) {\n    tsm_rows.clear();\n    tsm_cols.clear();\n    tsm_values.clear();\n\n    int row_block_begin = 0;\n    for (int r = 0; r < options.num_row_blocks; ++r) {\n      int col_block_begin = 0;\n      for (int c = 0; c < options.num_col_blocks; ++c) {\n        if (((options.storage_type == UPPER_TRIANGULAR) && (r > c)) ||\n            ((options.storage_type == LOWER_TRIANGULAR) && (r < c))) {\n          col_block_begin += col_blocks[c];\n          continue;\n        }\n\n        // Randomly determine if this block is present or not.\n        if (RandDouble() <= options.block_density) {\n          // If the matrix is symmetric, then we take care to generate\n          // symmetric diagonal blocks.\n          if (options.storage_type == UNSYMMETRIC || r != c) {\n            AddRandomBlock(row_blocks[r],\n                           col_blocks[c],\n                           row_block_begin,\n                           col_block_begin,\n                           &tsm_rows,\n                           &tsm_cols,\n                           &tsm_values);\n          } else {\n            AddSymmetricRandomBlock(row_blocks[r],\n                                    row_block_begin,\n                                    &tsm_rows,\n                                    &tsm_cols,\n                                    &tsm_values);\n          }\n        }\n        col_block_begin += col_blocks[c];\n      }\n      row_block_begin += row_blocks[r];\n    }\n  }\n\n  const int num_rows = std::accumulate(row_blocks.begin(), row_blocks.end(), 0);\n  const int num_cols = std::accumulate(col_blocks.begin(), col_blocks.end(), 0);\n  const bool kDoNotTranspose = false;\n  CompressedRowSparseMatrix* matrix =\n      CompressedRowSparseMatrix::FromTripletSparseMatrix(\n          TripletSparseMatrix(\n              num_rows, num_cols, tsm_rows, tsm_cols, tsm_values),\n          kDoNotTranspose);\n  (*matrix->mutable_row_blocks()) = row_blocks;\n  (*matrix->mutable_col_blocks()) = col_blocks;\n  matrix->set_storage_type(options.storage_type);\n  return matrix;\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/compressed_row_sparse_matrix.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_COMPRESSED_ROW_SPARSE_MATRIX_H_\n#define CERES_INTERNAL_COMPRESSED_ROW_SPARSE_MATRIX_H_\n\n#include <vector>\n#include \"ceres/internal/port.h\"\n#include \"ceres/sparse_matrix.h\"\n#include \"ceres/types.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\n\nstruct CRSMatrix;\n\nnamespace internal {\n\nclass TripletSparseMatrix;\n\nclass CompressedRowSparseMatrix : public SparseMatrix {\n public:\n  enum StorageType {\n    UNSYMMETRIC,\n    // Matrix is assumed to be symmetric but only the lower triangular\n    // part of the matrix is stored.\n    LOWER_TRIANGULAR,\n    // Matrix is assumed to be symmetric but only the upper triangular\n    // part of the matrix is stored.\n    UPPER_TRIANGULAR\n  };\n\n  // Create a matrix with the same content as the TripletSparseMatrix\n  // input. We assume that input does not have any repeated\n  // entries.\n  //\n  // The storage type of the matrix is set to UNSYMMETRIC.\n  //\n  // Caller owns the result.\n  static CompressedRowSparseMatrix* FromTripletSparseMatrix(\n      const TripletSparseMatrix& input);\n\n  // Create a matrix with the same content as the TripletSparseMatrix\n  // input transposed. We assume that input does not have any repeated\n  // entries.\n  //\n  // The storage type of the matrix is set to UNSYMMETRIC.\n  //\n  // Caller owns the result.\n  static CompressedRowSparseMatrix* FromTripletSparseMatrixTransposed(\n      const TripletSparseMatrix& input);\n\n  // Use this constructor only if you know what you are doing. This\n  // creates a \"blank\" matrix with the appropriate amount of memory\n  // allocated. However, the object itself is in an inconsistent state\n  // as the rows and cols matrices do not match the values of\n  // num_rows, num_cols and max_num_nonzeros.\n  //\n  // The use case for this constructor is that when the user knows the\n  // size of the matrix to begin with and wants to update the layout\n  // manually, instead of going via the indirect route of first\n  // constructing a TripletSparseMatrix, which leads to more than\n  // double the peak memory usage.\n  //\n  // The storage type is set to UNSYMMETRIC.\n  CompressedRowSparseMatrix(int num_rows, int num_cols, int max_num_nonzeros);\n\n  // Build a square sparse diagonal matrix with num_rows rows and\n  // columns. The diagonal m(i,i) = diagonal(i);\n  //\n  // The storage type is set to UNSYMMETRIC\n  CompressedRowSparseMatrix(const double* diagonal, int num_rows);\n\n  // SparseMatrix interface.\n  virtual ~CompressedRowSparseMatrix();\n  void SetZero() final;\n  void RightMultiply(const double* x, double* y) const final;\n  void LeftMultiply(const double* x, double* y) const final;\n  void SquaredColumnNorm(double* x) const final;\n  void ScaleColumns(const double* scale) final;\n  void ToDenseMatrix(Matrix* dense_matrix) const final;\n  void ToTextFile(FILE* file) const final;\n  int num_rows() const final { return num_rows_; }\n  int num_cols() const final { return num_cols_; }\n  int num_nonzeros() const final { return rows_[num_rows_]; }\n  const double* values() const final { return &values_[0]; }\n  double* mutable_values() final { return &values_[0]; }\n\n  // Delete the bottom delta_rows.\n  // num_rows -= delta_rows\n  void DeleteRows(int delta_rows);\n\n  // Append the contents of m to the bottom of this matrix. m must\n  // have the same number of columns as this matrix.\n  void AppendRows(const CompressedRowSparseMatrix& m);\n\n  void ToCRSMatrix(CRSMatrix* matrix) const;\n\n  CompressedRowSparseMatrix* Transpose() const;\n\n  // Destructive array resizing method.\n  void SetMaxNumNonZeros(int num_nonzeros);\n\n  // Non-destructive array resizing method.\n  void set_num_rows(const int num_rows) { num_rows_ = num_rows; }\n  void set_num_cols(const int num_cols) { num_cols_ = num_cols; }\n\n  // Low level access methods that expose the structure of the matrix.\n  const int* cols() const { return &cols_[0]; }\n  int* mutable_cols() { return &cols_[0]; }\n\n  const int* rows() const { return &rows_[0]; }\n  int* mutable_rows() { return &rows_[0]; }\n\n  const StorageType storage_type() const { return storage_type_; }\n  void set_storage_type(const StorageType storage_type) {\n    storage_type_ = storage_type;\n  }\n\n  const std::vector<int>& row_blocks() const { return row_blocks_; }\n  std::vector<int>* mutable_row_blocks() { return &row_blocks_; }\n\n  const std::vector<int>& col_blocks() const { return col_blocks_; }\n  std::vector<int>* mutable_col_blocks() { return &col_blocks_; }\n\n  // Create a block diagonal CompressedRowSparseMatrix with the given\n  // block structure. The individual blocks are assumed to be laid out\n  // contiguously in the diagonal array, one block at a time.\n  //\n  // Caller owns the result.\n  static CompressedRowSparseMatrix* CreateBlockDiagonalMatrix(\n      const double* diagonal, const std::vector<int>& blocks);\n\n  // Options struct to control the generation of random block sparse\n  // matrices in compressed row sparse format.\n  //\n  // The random matrix generation proceeds as follows.\n  //\n  // First the row and column block structure is determined by\n  // generating random row and column block sizes that lie within the\n  // given bounds.\n  //\n  // Then we walk the block structure of the resulting matrix, and with\n  // probability block_density detemine whether they are structurally\n  // zero or not. If the answer is no, then we generate entries for the\n  // block which are distributed normally.\n  struct RandomMatrixOptions {\n    // Type of matrix to create.\n    //\n    // If storage_type is UPPER_TRIANGULAR (LOWER_TRIANGULAR), then\n    // create a square symmetric matrix with just the upper triangular\n    // (lower triangular) part. In this case, num_col_blocks,\n    // min_col_block_size and max_col_block_size will be ignored and\n    // assumed to be equal to the corresponding row settings.\n    StorageType storage_type = UNSYMMETRIC;\n\n    int num_row_blocks = 0;\n    int min_row_block_size = 0;\n    int max_row_block_size = 0;\n    int num_col_blocks = 0;\n    int min_col_block_size = 0;\n    int max_col_block_size = 0;\n\n    // 0 < block_density <= 1 is the probability of a block being\n    // present in the matrix. A given random matrix will not have\n    // precisely this density.\n    double block_density = 0.0;\n  };\n\n  // Create a random CompressedRowSparseMatrix whose entries are\n  // normally distributed and whose structure is determined by\n  // RandomMatrixOptions.\n  //\n  // Caller owns the result.\n  static CompressedRowSparseMatrix* CreateRandomMatrix(\n      RandomMatrixOptions options);\n\n private:\n  static CompressedRowSparseMatrix* FromTripletSparseMatrix(\n      const TripletSparseMatrix& input, bool transpose);\n\n  int num_rows_;\n  int num_cols_;\n  std::vector<int> rows_;\n  std::vector<int> cols_;\n  std::vector<double> values_;\n  StorageType storage_type_;\n\n  // If the matrix has an underlying block structure, then it can also\n  // carry with it row and column block sizes. This is auxilliary and\n  // optional information for use by algorithms operating on the\n  // matrix. The class itself does not make use of this information in\n  // any way.\n  std::vector<int> row_blocks_;\n  std::vector<int> col_blocks_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_COMPRESSED_ROW_SPARSE_MATRIX_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/compressed_row_sparse_matrix_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/compressed_row_sparse_matrix.h\"\n\n#include <memory>\n#include <numeric>\n#include \"ceres/casts.h\"\n#include \"ceres/crs_matrix.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/linear_least_squares_problems.h\"\n#include \"ceres/random.h\"\n#include \"ceres/triplet_sparse_matrix.h\"\n#include \"glog/logging.h\"\n#include \"gtest/gtest.h\"\n\n#include \"Eigen/SparseCore\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::vector;\n\nstatic void CompareMatrices(const SparseMatrix* a, const SparseMatrix* b) {\n  EXPECT_EQ(a->num_rows(), b->num_rows());\n  EXPECT_EQ(a->num_cols(), b->num_cols());\n\n  int num_rows = a->num_rows();\n  int num_cols = a->num_cols();\n\n  for (int i = 0; i < num_cols; ++i) {\n    Vector x = Vector::Zero(num_cols);\n    x(i) = 1.0;\n\n    Vector y_a = Vector::Zero(num_rows);\n    Vector y_b = Vector::Zero(num_rows);\n\n    a->RightMultiply(x.data(), y_a.data());\n    b->RightMultiply(x.data(), y_b.data());\n\n    EXPECT_EQ((y_a - y_b).norm(), 0);\n  }\n}\n\nclass CompressedRowSparseMatrixTest : public ::testing::Test {\n protected:\n  void SetUp() final {\n    std::unique_ptr<LinearLeastSquaresProblem> problem(\n        CreateLinearLeastSquaresProblemFromId(1));\n\n    CHECK(problem != nullptr);\n\n    tsm.reset(down_cast<TripletSparseMatrix*>(problem->A.release()));\n    crsm.reset(CompressedRowSparseMatrix::FromTripletSparseMatrix(*tsm));\n\n    num_rows = tsm->num_rows();\n    num_cols = tsm->num_cols();\n\n    vector<int>* row_blocks = crsm->mutable_row_blocks();\n    row_blocks->resize(num_rows);\n    std::fill(row_blocks->begin(), row_blocks->end(), 1);\n\n    vector<int>* col_blocks = crsm->mutable_col_blocks();\n    col_blocks->resize(num_cols);\n    std::fill(col_blocks->begin(), col_blocks->end(), 1);\n  }\n\n  int num_rows;\n  int num_cols;\n\n  std::unique_ptr<TripletSparseMatrix> tsm;\n  std::unique_ptr<CompressedRowSparseMatrix> crsm;\n};\n\nTEST_F(CompressedRowSparseMatrixTest, Scale) {\n  Vector scale(num_cols);\n  for (int i = 0; i < num_cols; ++i) {\n    scale(i) = i + 1;\n  }\n\n  tsm->ScaleColumns(scale.data());\n  crsm->ScaleColumns(scale.data());\n  CompareMatrices(tsm.get(), crsm.get());\n}\n\nTEST_F(CompressedRowSparseMatrixTest, DeleteRows) {\n  // Clear the row and column blocks as these are purely scalar tests.\n  crsm->mutable_row_blocks()->clear();\n  crsm->mutable_col_blocks()->clear();\n\n  for (int i = 0; i < num_rows; ++i) {\n    tsm->Resize(num_rows - i, num_cols);\n    crsm->DeleteRows(crsm->num_rows() - tsm->num_rows());\n    CompareMatrices(tsm.get(), crsm.get());\n  }\n}\n\nTEST_F(CompressedRowSparseMatrixTest, AppendRows) {\n  // Clear the row and column blocks as these are purely scalar tests.\n  crsm->mutable_row_blocks()->clear();\n  crsm->mutable_col_blocks()->clear();\n\n  for (int i = 0; i < num_rows; ++i) {\n    TripletSparseMatrix tsm_appendage(*tsm);\n    tsm_appendage.Resize(i, num_cols);\n\n    tsm->AppendRows(tsm_appendage);\n    std::unique_ptr<CompressedRowSparseMatrix> crsm_appendage(\n        CompressedRowSparseMatrix::FromTripletSparseMatrix(tsm_appendage));\n\n    crsm->AppendRows(*crsm_appendage);\n    CompareMatrices(tsm.get(), crsm.get());\n  }\n}\n\nTEST_F(CompressedRowSparseMatrixTest, AppendAndDeleteBlockDiagonalMatrix) {\n  int num_diagonal_rows = crsm->num_cols();\n\n  std::unique_ptr<double[]> diagonal(new double[num_diagonal_rows]);\n  for (int i = 0; i < num_diagonal_rows; ++i) {\n    diagonal[i] = i;\n  }\n\n  vector<int> row_and_column_blocks;\n  row_and_column_blocks.push_back(1);\n  row_and_column_blocks.push_back(2);\n  row_and_column_blocks.push_back(2);\n\n  const vector<int> pre_row_blocks = crsm->row_blocks();\n  const vector<int> pre_col_blocks = crsm->col_blocks();\n\n  std::unique_ptr<CompressedRowSparseMatrix> appendage(\n      CompressedRowSparseMatrix::CreateBlockDiagonalMatrix(\n          diagonal.get(), row_and_column_blocks));\n\n  crsm->AppendRows(*appendage);\n\n  const vector<int> post_row_blocks = crsm->row_blocks();\n  const vector<int> post_col_blocks = crsm->col_blocks();\n\n  vector<int> expected_row_blocks = pre_row_blocks;\n  expected_row_blocks.insert(expected_row_blocks.end(),\n                             row_and_column_blocks.begin(),\n                             row_and_column_blocks.end());\n\n  vector<int> expected_col_blocks = pre_col_blocks;\n\n  EXPECT_EQ(expected_row_blocks, crsm->row_blocks());\n  EXPECT_EQ(expected_col_blocks, crsm->col_blocks());\n\n  crsm->DeleteRows(num_diagonal_rows);\n  EXPECT_EQ(crsm->row_blocks(), pre_row_blocks);\n  EXPECT_EQ(crsm->col_blocks(), pre_col_blocks);\n}\n\nTEST_F(CompressedRowSparseMatrixTest, ToDenseMatrix) {\n  Matrix tsm_dense;\n  Matrix crsm_dense;\n\n  tsm->ToDenseMatrix(&tsm_dense);\n  crsm->ToDenseMatrix(&crsm_dense);\n\n  EXPECT_EQ((tsm_dense - crsm_dense).norm(), 0.0);\n}\n\nTEST_F(CompressedRowSparseMatrixTest, ToCRSMatrix) {\n  CRSMatrix crs_matrix;\n  crsm->ToCRSMatrix(&crs_matrix);\n  EXPECT_EQ(crsm->num_rows(), crs_matrix.num_rows);\n  EXPECT_EQ(crsm->num_cols(), crs_matrix.num_cols);\n  EXPECT_EQ(crsm->num_rows() + 1, crs_matrix.rows.size());\n  EXPECT_EQ(crsm->num_nonzeros(), crs_matrix.cols.size());\n  EXPECT_EQ(crsm->num_nonzeros(), crs_matrix.values.size());\n\n  for (int i = 0; i < crsm->num_rows() + 1; ++i) {\n    EXPECT_EQ(crsm->rows()[i], crs_matrix.rows[i]);\n  }\n\n  for (int i = 0; i < crsm->num_nonzeros(); ++i) {\n    EXPECT_EQ(crsm->cols()[i], crs_matrix.cols[i]);\n    EXPECT_EQ(crsm->values()[i], crs_matrix.values[i]);\n  }\n}\n\nTEST(CompressedRowSparseMatrix, CreateBlockDiagonalMatrix) {\n  vector<int> blocks;\n  blocks.push_back(1);\n  blocks.push_back(2);\n  blocks.push_back(2);\n\n  Vector diagonal(5);\n  for (int i = 0; i < 5; ++i) {\n    diagonal(i) = i + 1;\n  }\n\n  std::unique_ptr<CompressedRowSparseMatrix> matrix(\n      CompressedRowSparseMatrix::CreateBlockDiagonalMatrix(diagonal.data(),\n                                                           blocks));\n\n  EXPECT_EQ(matrix->num_rows(), 5);\n  EXPECT_EQ(matrix->num_cols(), 5);\n  EXPECT_EQ(matrix->num_nonzeros(), 9);\n  EXPECT_EQ(blocks, matrix->row_blocks());\n  EXPECT_EQ(blocks, matrix->col_blocks());\n\n  Vector x(5);\n  Vector y(5);\n\n  x.setOnes();\n  y.setZero();\n  matrix->RightMultiply(x.data(), y.data());\n  for (int i = 0; i < diagonal.size(); ++i) {\n    EXPECT_EQ(y[i], diagonal[i]);\n  }\n\n  y.setZero();\n  matrix->LeftMultiply(x.data(), y.data());\n  for (int i = 0; i < diagonal.size(); ++i) {\n    EXPECT_EQ(y[i], diagonal[i]);\n  }\n\n  Matrix dense;\n  matrix->ToDenseMatrix(&dense);\n  EXPECT_EQ((dense.diagonal() - diagonal).norm(), 0.0);\n}\n\nTEST(CompressedRowSparseMatrix, Transpose) {\n  //  0  1  0  2  3  0\n  //  4  6  7  0  0  8\n  //  9 10  0 11 12  0\n  // 13  0 14 15  9  0\n  //  0 16 17  0  0  0\n\n  // Block structure:\n  //  A  A  A  A  B  B\n  //  A  A  A  A  B  B\n  //  A  A  A  A  B  B\n  //  C  C  C  C  D  D\n  //  C  C  C  C  D  D\n  //  C  C  C  C  D  D\n\n  CompressedRowSparseMatrix matrix(5, 6, 30);\n  int* rows = matrix.mutable_rows();\n  int* cols = matrix.mutable_cols();\n  double* values = matrix.mutable_values();\n  matrix.mutable_row_blocks()->push_back(3);\n  matrix.mutable_row_blocks()->push_back(3);\n  matrix.mutable_col_blocks()->push_back(4);\n  matrix.mutable_col_blocks()->push_back(2);\n\n  rows[0] = 0;\n  cols[0] = 1;\n  cols[1] = 3;\n  cols[2] = 4;\n\n  rows[1] = 3;\n  cols[3] = 0;\n  cols[4] = 1;\n  cols[5] = 2;\n  cols[6] = 5;\n\n  rows[2] = 7;\n  cols[7] = 0;\n  cols[8] = 1;\n  cols[9] = 3;\n  cols[10] = 4;\n\n  rows[3] = 11;\n  cols[11] = 0;\n  cols[12] = 2;\n  cols[13] = 3;\n  cols[14] = 4;\n\n  rows[4] = 15;\n  cols[15] = 1;\n  cols[16] = 2;\n  rows[5] = 17;\n\n  std::copy(values, values + 17, cols);\n\n  std::unique_ptr<CompressedRowSparseMatrix> transpose(matrix.Transpose());\n\n  ASSERT_EQ(transpose->row_blocks().size(), matrix.col_blocks().size());\n  for (int i = 0; i < transpose->row_blocks().size(); ++i) {\n    EXPECT_EQ(transpose->row_blocks()[i], matrix.col_blocks()[i]);\n  }\n\n  ASSERT_EQ(transpose->col_blocks().size(), matrix.row_blocks().size());\n  for (int i = 0; i < transpose->col_blocks().size(); ++i) {\n    EXPECT_EQ(transpose->col_blocks()[i], matrix.row_blocks()[i]);\n  }\n\n  Matrix dense_matrix;\n  matrix.ToDenseMatrix(&dense_matrix);\n\n  Matrix dense_transpose;\n  transpose->ToDenseMatrix(&dense_transpose);\n  EXPECT_NEAR((dense_matrix - dense_transpose.transpose()).norm(), 0.0, 1e-14);\n}\n\nTEST(CompressedRowSparseMatrix, FromTripletSparseMatrix) {\n  TripletSparseMatrix::RandomMatrixOptions options;\n  options.num_rows = 5;\n  options.num_cols = 7;\n  options.density = 0.5;\n\n  const int kNumTrials = 10;\n  for (int i = 0; i < kNumTrials; ++i) {\n    std::unique_ptr<TripletSparseMatrix> tsm(\n        TripletSparseMatrix::CreateRandomMatrix(options));\n    std::unique_ptr<CompressedRowSparseMatrix> crsm(\n        CompressedRowSparseMatrix::FromTripletSparseMatrix(*tsm));\n\n    Matrix expected;\n    tsm->ToDenseMatrix(&expected);\n    Matrix actual;\n    crsm->ToDenseMatrix(&actual);\n    EXPECT_NEAR((expected - actual).norm() / actual.norm(),\n                0.0,\n                std::numeric_limits<double>::epsilon())\n        << \"\\nexpected: \\n\"\n        << expected << \"\\nactual: \\n\"\n        << actual;\n  }\n}\n\nTEST(CompressedRowSparseMatrix, FromTripletSparseMatrixTransposed) {\n  TripletSparseMatrix::RandomMatrixOptions options;\n  options.num_rows = 5;\n  options.num_cols = 7;\n  options.density = 0.5;\n\n  const int kNumTrials = 10;\n  for (int i = 0; i < kNumTrials; ++i) {\n    std::unique_ptr<TripletSparseMatrix> tsm(\n        TripletSparseMatrix::CreateRandomMatrix(options));\n    std::unique_ptr<CompressedRowSparseMatrix> crsm(\n        CompressedRowSparseMatrix::FromTripletSparseMatrixTransposed(*tsm));\n\n    Matrix tmp;\n    tsm->ToDenseMatrix(&tmp);\n    Matrix expected = tmp.transpose();\n    Matrix actual;\n    crsm->ToDenseMatrix(&actual);\n    EXPECT_NEAR((expected - actual).norm() / actual.norm(),\n                0.0,\n                std::numeric_limits<double>::epsilon())\n        << \"\\nexpected: \\n\"\n        << expected << \"\\nactual: \\n\"\n        << actual;\n  }\n}\n\ntypedef ::testing::tuple<CompressedRowSparseMatrix::StorageType> Param;\n\nstatic std::string ParamInfoToString(testing::TestParamInfo<Param> info) {\n  if (::testing::get<0>(info.param) ==\n      CompressedRowSparseMatrix::UPPER_TRIANGULAR) {\n    return \"UPPER\";\n  }\n\n  if (::testing::get<0>(info.param) ==\n      CompressedRowSparseMatrix::LOWER_TRIANGULAR) {\n    return \"LOWER\";\n  }\n\n  return \"UNSYMMETRIC\";\n}\n\nclass RightMultiplyTest : public ::testing::TestWithParam<Param> {};\n\nTEST_P(RightMultiplyTest, _) {\n  const int kMinNumBlocks = 1;\n  const int kMaxNumBlocks = 10;\n  const int kMinBlockSize = 1;\n  const int kMaxBlockSize = 5;\n  const int kNumTrials = 10;\n\n  for (int num_blocks = kMinNumBlocks; num_blocks < kMaxNumBlocks;\n       ++num_blocks) {\n    for (int trial = 0; trial < kNumTrials; ++trial) {\n      Param param = GetParam();\n      CompressedRowSparseMatrix::RandomMatrixOptions options;\n      options.num_col_blocks = num_blocks;\n      options.min_col_block_size = kMinBlockSize;\n      options.max_col_block_size = kMaxBlockSize;\n      options.num_row_blocks = 2 * num_blocks;\n      options.min_row_block_size = kMinBlockSize;\n      options.max_row_block_size = kMaxBlockSize;\n      options.block_density = std::max(0.5, RandDouble());\n      options.storage_type = ::testing::get<0>(param);\n      std::unique_ptr<CompressedRowSparseMatrix> matrix(\n          CompressedRowSparseMatrix::CreateRandomMatrix(options));\n      const int num_rows = matrix->num_rows();\n      const int num_cols = matrix->num_cols();\n\n      Vector x(num_cols);\n      x.setRandom();\n\n      Vector actual_y(num_rows);\n      actual_y.setZero();\n      matrix->RightMultiply(x.data(), actual_y.data());\n\n      Matrix dense;\n      matrix->ToDenseMatrix(&dense);\n      Vector expected_y;\n      if (::testing::get<0>(param) ==\n          CompressedRowSparseMatrix::UPPER_TRIANGULAR) {\n        expected_y = dense.selfadjointView<Eigen::Upper>() * x;\n      } else if (::testing::get<0>(param) ==\n                 CompressedRowSparseMatrix::LOWER_TRIANGULAR) {\n        expected_y = dense.selfadjointView<Eigen::Lower>() * x;\n      } else {\n        expected_y = dense * x;\n      }\n\n      ASSERT_NEAR((expected_y - actual_y).norm() / actual_y.norm(),\n                  0.0,\n                  std::numeric_limits<double>::epsilon() * 10)\n          << \"\\n\"\n          << dense\n          << \"x:\\n\"\n          << x.transpose() << \"\\n\"\n          << \"expected: \\n\" << expected_y.transpose() << \"\\n\"\n          << \"actual: \\n\" << actual_y.transpose();\n    }\n  }\n}\n\nINSTANTIATE_TEST_SUITE_P(\n    CompressedRowSparseMatrix,\n    RightMultiplyTest,\n    ::testing::Values(CompressedRowSparseMatrix::LOWER_TRIANGULAR,\n                      CompressedRowSparseMatrix::UPPER_TRIANGULAR,\n                      CompressedRowSparseMatrix::UNSYMMETRIC),\n    ParamInfoToString);\n\nclass LeftMultiplyTest : public ::testing::TestWithParam<Param> {};\n\nTEST_P(LeftMultiplyTest, _) {\n  const int kMinNumBlocks = 1;\n  const int kMaxNumBlocks = 10;\n  const int kMinBlockSize = 1;\n  const int kMaxBlockSize = 5;\n  const int kNumTrials = 10;\n\n  for (int num_blocks = kMinNumBlocks; num_blocks < kMaxNumBlocks;\n       ++num_blocks) {\n    for (int trial = 0; trial < kNumTrials; ++trial) {\n      Param param = GetParam();\n      CompressedRowSparseMatrix::RandomMatrixOptions options;\n      options.num_col_blocks = num_blocks;\n      options.min_col_block_size = kMinBlockSize;\n      options.max_col_block_size = kMaxBlockSize;\n      options.num_row_blocks = 2 * num_blocks;\n      options.min_row_block_size = kMinBlockSize;\n      options.max_row_block_size = kMaxBlockSize;\n      options.block_density = std::max(0.5, RandDouble());\n      options.storage_type = ::testing::get<0>(param);\n      std::unique_ptr<CompressedRowSparseMatrix> matrix(\n          CompressedRowSparseMatrix::CreateRandomMatrix(options));\n      const int num_rows = matrix->num_rows();\n      const int num_cols = matrix->num_cols();\n\n      Vector x(num_rows);\n      x.setRandom();\n\n      Vector actual_y(num_cols);\n      actual_y.setZero();\n      matrix->LeftMultiply(x.data(), actual_y.data());\n\n      Matrix dense;\n      matrix->ToDenseMatrix(&dense);\n      Vector expected_y;\n      if (::testing::get<0>(param) ==\n          CompressedRowSparseMatrix::UPPER_TRIANGULAR) {\n        expected_y = dense.selfadjointView<Eigen::Upper>() * x;\n      } else if (::testing::get<0>(param) ==\n                 CompressedRowSparseMatrix::LOWER_TRIANGULAR) {\n        expected_y = dense.selfadjointView<Eigen::Lower>() * x;\n      } else {\n        expected_y = dense.transpose() * x;\n      }\n\n      ASSERT_NEAR((expected_y - actual_y).norm() / actual_y.norm(),\n                  0.0,\n                  std::numeric_limits<double>::epsilon() * 10)\n          << \"\\n\"\n          << dense\n          << \"x\\n\"\n          << x.transpose() << \"\\n\"\n          << \"expected: \\n\" << expected_y.transpose() << \"\\n\"\n          << \"actual: \\n\" << actual_y.transpose();\n    }\n  }\n}\n\nINSTANTIATE_TEST_SUITE_P(\n    CompressedRowSparseMatrix,\n    LeftMultiplyTest,\n    ::testing::Values(CompressedRowSparseMatrix::LOWER_TRIANGULAR,\n                      CompressedRowSparseMatrix::UPPER_TRIANGULAR,\n                      CompressedRowSparseMatrix::UNSYMMETRIC),\n    ParamInfoToString);\n\nclass SquaredColumnNormTest : public ::testing::TestWithParam<Param> {};\n\nTEST_P(SquaredColumnNormTest, _) {\n  const int kMinNumBlocks = 1;\n  const int kMaxNumBlocks = 10;\n  const int kMinBlockSize = 1;\n  const int kMaxBlockSize = 5;\n  const int kNumTrials = 10;\n\n  for (int num_blocks = kMinNumBlocks; num_blocks < kMaxNumBlocks;\n       ++num_blocks) {\n    for (int trial = 0; trial < kNumTrials; ++trial) {\n      Param param = GetParam();\n      CompressedRowSparseMatrix::RandomMatrixOptions options;\n      options.num_col_blocks = num_blocks;\n      options.min_col_block_size = kMinBlockSize;\n      options.max_col_block_size = kMaxBlockSize;\n      options.num_row_blocks = 2 * num_blocks;\n      options.min_row_block_size = kMinBlockSize;\n      options.max_row_block_size = kMaxBlockSize;\n      options.block_density = std::max(0.5, RandDouble());\n      options.storage_type = ::testing::get<0>(param);\n      std::unique_ptr<CompressedRowSparseMatrix> matrix(\n          CompressedRowSparseMatrix::CreateRandomMatrix(options));\n      const int num_cols = matrix->num_cols();\n\n      Vector actual(num_cols);\n      actual.setZero();\n      matrix->SquaredColumnNorm(actual.data());\n\n      Matrix dense;\n      matrix->ToDenseMatrix(&dense);\n      Vector expected;\n      if (::testing::get<0>(param) ==\n          CompressedRowSparseMatrix::UPPER_TRIANGULAR) {\n        const Matrix full = dense.selfadjointView<Eigen::Upper>();\n        expected = full.colwise().squaredNorm();\n      } else if (::testing::get<0>(param) ==\n                 CompressedRowSparseMatrix::LOWER_TRIANGULAR) {\n        const Matrix full = dense.selfadjointView<Eigen::Lower>();\n        expected = full.colwise().squaredNorm();\n      } else {\n        expected = dense.colwise().squaredNorm();\n      }\n\n      ASSERT_NEAR((expected - actual).norm() / actual.norm(),\n                  0.0,\n                  std::numeric_limits<double>::epsilon() * 10)\n          << \"\\n\"\n          << dense\n          << \"expected: \\n\" << expected.transpose() << \"\\n\"\n          << \"actual: \\n\" << actual.transpose();\n    }\n  }\n}\n\nINSTANTIATE_TEST_SUITE_P(\n    CompressedRowSparseMatrix,\n    SquaredColumnNormTest,\n    ::testing::Values(CompressedRowSparseMatrix::LOWER_TRIANGULAR,\n                      CompressedRowSparseMatrix::UPPER_TRIANGULAR,\n                      CompressedRowSparseMatrix::UNSYMMETRIC),\n    ParamInfoToString);\n\n\n// TODO(sameeragarwal) Add tests for the random matrix creation methods.\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/concurrent_queue.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: vitus@google.com (Michael Vitus)\n\n#ifndef CERES_INTERNAL_CONCURRENT_QUEUE_H_\n#define CERES_INTERNAL_CONCURRENT_QUEUE_H_\n\n#include <condition_variable>\n#include <mutex>\n#include <queue>\n#include <thread>\n\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// A thread-safe multi-producer, multi-consumer queue for queueing items that\n// are typically handled asynchronously by multiple threads. The ConcurrentQueue\n// has two states which only affect the Wait call:\n//\n//  (1) Waiters have been enabled (enabled by default or calling\n//      EnableWaiters). The call to Wait will block until an item is available.\n//      Push and pop will operate as expected.\n//\n//  (2) StopWaiters has been called. All threads blocked in a Wait() call will\n//      be woken up and pop any available items from the queue. All future Wait\n//      requests will either return an element from the queue or return\n//      immediately if no element is present.  Push and pop will operate as\n//      expected.\n//\n// A common use case is using the concurrent queue as an interface for\n// scheduling tasks for a set of thread workers:\n//\n// ConcurrentQueue<Task> task_queue;\n//\n// [Worker threads]:\n//   Task task;\n//   while(task_queue.Wait(&task)) {\n//     ...\n//   }\n//\n// [Producers]:\n//   task_queue.Push(...);\n//   ..\n//   task_queue.Push(...);\n//   ...\n//   // Signal worker threads to stop blocking on Wait and terminate.\n//   task_queue.StopWaiters();\n//\ntemplate <typename T>\nclass ConcurrentQueue {\n public:\n  // Defaults the queue to blocking on Wait calls.\n  ConcurrentQueue() : wait_(true) {}\n\n  // Atomically push an element onto the queue.  If a thread was waiting for an\n  // element, wake it up.\n  void Push(const T& value) {\n    std::lock_guard<std::mutex> lock(mutex_);\n    queue_.push(value);\n    work_pending_condition_.notify_one();\n  }\n\n  // Atomically pop an element from the queue.  If an element is present, return\n  // true. If the queue was empty, return false.\n  bool Pop(T* value) {\n    CHECK(value != nullptr);\n\n    std::lock_guard<std::mutex> lock(mutex_);\n    return PopUnlocked(value);\n  }\n\n  // Atomically pop an element from the queue. Blocks until one is available or\n  // StopWaiters is called.  Returns true if an element was successfully popped\n  // from the queue, otherwise returns false.\n  bool Wait(T* value) {\n    CHECK(value != nullptr);\n\n    std::unique_lock<std::mutex> lock(mutex_);\n    work_pending_condition_.wait(lock,\n                                 [&]() { return !(wait_ && queue_.empty()); });\n\n    return PopUnlocked(value);\n  }\n\n  // Unblock all threads waiting to pop a value from the queue, and they will\n  // exit Wait() without getting a value. All future Wait requests will return\n  // immediately if no element is present until EnableWaiters is called.\n  void StopWaiters() {\n    std::lock_guard<std::mutex> lock(mutex_);\n    wait_ = false;\n    work_pending_condition_.notify_all();\n  }\n\n  // Enable threads to block on Wait calls.\n  void EnableWaiters() {\n    std::lock_guard<std::mutex> lock(mutex_);\n    wait_ = true;\n  }\n\n private:\n  // Pops an element from the queue.  If an element is present, return\n  // true. If the queue was empty, return false.  Not thread-safe. Must acquire\n  // the lock before calling.\n  bool PopUnlocked(T* value) {\n    if (queue_.empty()) {\n      return false;\n    }\n\n    *value = queue_.front();\n    queue_.pop();\n\n    return true;\n  }\n\n  // The mutex controls read and write access to the queue_ and stop_\n  // variables. It is also used to block the calling thread until an element is\n  // available to pop from the queue.\n  std::mutex mutex_;\n  std::condition_variable work_pending_condition_;\n\n  std::queue<T> queue_;\n  // If true, signals that callers of Wait will block waiting to pop an\n  // element off the queue.\n  bool wait_;\n};\n\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_CONCURRENT_QUEUE_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/concurrent_queue_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: vitus@google.com (Michael Vitus)\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifdef CERES_USE_CXX11_THREADS\n\n#include <chrono>\n#include <thread>\n\n#include \"ceres/concurrent_queue.h\"\n\n#include \"gmock/gmock.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// A basic test of push and pop.\nTEST(ConcurrentQueue, PushPop) {\n  ConcurrentQueue<int> queue;\n\n  const int num_to_add = 10;\n  for (int i = 0; i < num_to_add; ++i) {\n    queue.Push(i);\n  }\n\n  for (int i = 0; i < num_to_add; ++i) {\n    int value;\n    ASSERT_TRUE(queue.Pop(&value));\n    EXPECT_EQ(i, value);\n  }\n}\n\n// Push and pop elements from the queue after StopWaiters has been called.\nTEST(ConcurrentQueue, PushPopAfterStopWaiters) {\n  ConcurrentQueue<int> queue;\n\n  const int num_to_add = 10;\n  int value;\n\n  // Pop should return immediately with false with an empty queue.\n  ASSERT_FALSE(queue.Pop(&value));\n\n  for (int i = 0; i < num_to_add; ++i) {\n    queue.Push(i);\n  }\n\n  // Call stop waiters to ensure we can still Push and Pop from the queue.\n  queue.StopWaiters();\n\n  for (int i = 0; i < num_to_add; ++i) {\n    ASSERT_TRUE(queue.Pop(&value));\n    EXPECT_EQ(i, value);\n  }\n\n  // Pop should return immediately with false with an empty queue.\n  ASSERT_FALSE(queue.Pop(&value));\n\n  // Ensure we can still push onto the queue after StopWaiters has been called.\n  const int offset = 123;\n  for (int i = 0; i < num_to_add; ++i) {\n    queue.Push(i + offset);\n  }\n\n  for (int i = 0; i < num_to_add; ++i) {\n    int value;\n    ASSERT_TRUE(queue.Pop(&value));\n    EXPECT_EQ(i + offset, value);\n  }\n\n  // Pop should return immediately with false with an empty queue.\n  ASSERT_FALSE(queue.Pop(&value));\n\n  // Try calling StopWaiters again to ensure nothing changes.\n  queue.StopWaiters();\n\n  queue.Push(13456);\n  ASSERT_TRUE(queue.Pop(&value));\n  EXPECT_EQ(13456, value);\n}\n\n// Push and pop elements after StopWaiters and EnableWaiters has been called.\nTEST(ConcurrentQueue, PushPopStopAndStart) {\n  ConcurrentQueue<int> queue;\n\n  int value;\n\n  queue.Push(13456);\n  queue.Push(256);\n\n  queue.StopWaiters();\n\n  ASSERT_TRUE(queue.Pop(&value));\n  EXPECT_EQ(13456, value);\n\n  queue.EnableWaiters();\n\n  // Try adding another entry after enable has been called.\n  queue.Push(989);\n\n  // Ensure we can pop both elements off.\n  ASSERT_TRUE(queue.Pop(&value));\n  EXPECT_EQ(256, value);\n\n  ASSERT_TRUE(queue.Pop(&value));\n  EXPECT_EQ(989, value);\n\n  // Re-enable waiting.\n  queue.EnableWaiters();\n\n  // Pop should return immediately with false with an empty queue.\n  ASSERT_FALSE(queue.Pop(&value));\n}\n\n// A basic test for Wait.\nTEST(ConcurrentQueue, Wait) {\n  ConcurrentQueue<int> queue;\n\n  int value;\n\n  queue.Push(13456);\n\n  ASSERT_TRUE(queue.Wait(&value));\n  EXPECT_EQ(13456, value);\n\n  queue.StopWaiters();\n\n  // Ensure waiting returns immediately after StopWaiters.\n  EXPECT_FALSE(queue.Wait(&value));\n  EXPECT_FALSE(queue.Wait(&value));\n\n  EXPECT_FALSE(queue.Pop(&value));\n\n  // Calling StopWaiters multiple times does not change anything.\n  queue.StopWaiters();\n\n  EXPECT_FALSE(queue.Wait(&value));\n  EXPECT_FALSE(queue.Wait(&value));\n\n  queue.Push(989);\n  queue.Push(789);\n\n  ASSERT_TRUE(queue.Wait(&value));\n  EXPECT_EQ(989, value);\n\n  ASSERT_TRUE(queue.Wait(&value));\n  EXPECT_EQ(789, value);\n}\n\n// Ensure wait blocks until an element is pushed. Also ensure wait does not\n// block after StopWaiters is called and there is no value in the queue.\n// Finally, ensures EnableWaiters re-enables waiting.\nTEST(ConcurrentQueue, EnsureWaitBlocks) {\n  ConcurrentQueue<int> queue;\n\n  int value = 0;\n  bool valid_value = false;\n  bool waiting = false;\n  std::mutex mutex;\n\n  std::thread thread([&]() {\n    {\n      std::lock_guard<std::mutex> lock(mutex);\n      waiting = true;\n    }\n\n    int element = 87987;\n    bool valid = queue.Wait(&element);\n\n    {\n      std::lock_guard<std::mutex> lock(mutex);\n      waiting = false;\n      value = element;\n      valid_value = valid;\n    }\n  });\n\n  // Give the thread time to start and wait.\n  std::this_thread::sleep_for(std::chrono::milliseconds(500));\n\n  // Ensure nothing is has been popped off the queue\n  {\n    std::lock_guard<std::mutex> lock(mutex);\n    EXPECT_TRUE(waiting);\n    ASSERT_FALSE(valid_value);\n    ASSERT_EQ(0, value);\n  }\n\n  queue.Push(13456);\n\n  // Wait for the thread to pop the value.\n  thread.join();\n\n  EXPECT_TRUE(valid_value);\n  EXPECT_EQ(13456, value);\n}\n\nTEST(ConcurrentQueue, StopAndEnableWaiters) {\n  ConcurrentQueue<int> queue;\n\n  int value = 0;\n  bool valid_value = false;\n  bool waiting = false;\n  std::mutex mutex;\n\n  auto task = [&]() {\n    {\n      std::lock_guard<std::mutex> lock(mutex);\n      waiting = true;\n    }\n\n    int element = 87987;\n    bool valid = queue.Wait(&element);\n\n    {\n      std::lock_guard<std::mutex> lock(mutex);\n      waiting = false;\n      value = element;\n      valid_value = valid;\n    }\n  };\n\n  std::thread thread_1(task);\n\n  // Give the thread time to start and wait.\n  std::this_thread::sleep_for(std::chrono::milliseconds(500));\n\n  // Ensure the thread is waiting.\n  {\n    std::lock_guard<std::mutex> lock(mutex);\n    EXPECT_TRUE(waiting);\n  }\n\n  // Unblock the thread.\n  queue.StopWaiters();\n\n  thread_1.join();\n\n  // Ensure nothing has been popped off the queue.\n  EXPECT_FALSE(valid_value);\n  EXPECT_EQ(87987, value);\n\n  // Ensure another call to Wait returns immediately.\n  EXPECT_FALSE(queue.Wait(&value));\n\n  queue.EnableWaiters();\n\n  value = 0;\n  valid_value = false;\n  waiting = false;\n\n  // Start another task waiting for an element to be pushed.\n  std::thread thread_2(task);\n\n  // Give the thread time to start and wait.\n  std::this_thread::sleep_for(std::chrono::milliseconds(500));\n\n  // Ensure nothing is popped off the queue.\n  {\n    std::lock_guard<std::mutex> lock(mutex);\n    EXPECT_TRUE(waiting);\n    ASSERT_FALSE(valid_value);\n    ASSERT_EQ(0, value);\n  }\n\n  queue.Push(13456);\n\n  // Wait for the thread to pop the value.\n  thread_2.join();\n\n  EXPECT_TRUE(valid_value);\n  EXPECT_EQ(13456, value);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif // CERES_USE_CXX11_THREADS\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/conditioned_cost_function.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: wjr@google.com (William Rucklidge)\n//\n// This file contains the implementation of the conditioned cost function.\n\n#include \"ceres/conditioned_cost_function.h\"\n\n#include <cstddef>\n\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/stl_util.h\"\n#include \"ceres/types.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\n\n// This cost function has the same dimensions (parameters, residuals) as\n// the one it's wrapping.\nConditionedCostFunction::ConditionedCostFunction(\n    CostFunction* wrapped_cost_function,\n    const std::vector<CostFunction*>& conditioners,\n    Ownership ownership)\n    : wrapped_cost_function_(wrapped_cost_function),\n      conditioners_(conditioners),\n      ownership_(ownership) {\n  // Set up our dimensions.\n  set_num_residuals(wrapped_cost_function_->num_residuals());\n  *mutable_parameter_block_sizes() =\n      wrapped_cost_function_->parameter_block_sizes();\n\n  // Sanity-check the conditioners' dimensions.\n  CHECK_EQ(wrapped_cost_function_->num_residuals(), conditioners_.size());\n  for (int i = 0; i < wrapped_cost_function_->num_residuals(); i++) {\n    if (conditioners[i]) {\n      CHECK_EQ(1, conditioners[i]->num_residuals());\n      CHECK_EQ(1, conditioners[i]->parameter_block_sizes().size());\n      CHECK_EQ(1, conditioners[i]->parameter_block_sizes()[0]);\n    }\n  }\n}\n\nConditionedCostFunction::~ConditionedCostFunction() {\n  if (ownership_ == TAKE_OWNERSHIP) {\n    STLDeleteUniqueContainerPointers(conditioners_.begin(), conditioners_.end());\n  } else {\n    wrapped_cost_function_.release();\n  }\n}\n\nbool ConditionedCostFunction::Evaluate(double const* const* parameters,\n                                       double* residuals,\n                                       double** jacobians) const {\n  bool success = wrapped_cost_function_->Evaluate(parameters, residuals,\n                                                  jacobians);\n  if (!success) {\n    return false;\n  }\n\n  for (int r = 0; r < wrapped_cost_function_->num_residuals(); r++) {\n    // On output, we want to have\n    // residuals[r] = conditioners[r](wrapped_residuals[r])\n    // For parameter block i, column c,\n    // jacobians[i][r*parameter_block_size_[i] + c] =\n    //   = d residual[r] / d parameters[i][c]\n    //   = conditioners[r]'(wrapped_residuals[r]) *\n    //       d wrapped_residuals[r] / d parameters[i][c]\n    if (conditioners_[r]) {\n      double conditioner_derivative;\n      double* conditioner_derivative_pointer = &conditioner_derivative;\n      double** conditioner_derivative_pointer2 =\n          &conditioner_derivative_pointer;\n      if (!jacobians) {\n        conditioner_derivative_pointer2 = NULL;\n      }\n\n      double unconditioned_residual = residuals[r];\n      double* parameter_pointer = &unconditioned_residual;\n      success = conditioners_[r]->Evaluate(&parameter_pointer,\n                                           &residuals[r],\n                                           conditioner_derivative_pointer2);\n      if (!success) {\n        return false;\n      }\n\n      if (jacobians) {\n        for (int i = 0;\n             i < wrapped_cost_function_->parameter_block_sizes().size();\n             i++) {\n          if (jacobians[i]) {\n            int parameter_block_size =\n                wrapped_cost_function_->parameter_block_sizes()[i];\n            VectorRef jacobian_row(jacobians[i] + r * parameter_block_size,\n                                   parameter_block_size, 1);\n            jacobian_row *= conditioner_derivative;\n          }\n        }\n      }\n    }\n  }\n  return true;\n}\n\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/conditioned_cost_function_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: wjr@google.com (William Rucklidge)\n//\n// Tests for the conditioned cost function.\n\n#include \"ceres/conditioned_cost_function.h\"\n\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/normal_prior.h\"\n#include \"ceres/types.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// The size of the cost functions we build.\nstatic constexpr int kTestCostFunctionSize = 3;\n\n// A simple cost function: return ax + b.\nclass LinearCostFunction : public CostFunction {\n public:\n  LinearCostFunction(double a, double b) : a_(a), b_(b) {\n    set_num_residuals(1);\n    mutable_parameter_block_sizes()->push_back(1);\n  }\n\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const final {\n    *residuals = **parameters * a_ + b_;\n    if (jacobians && *jacobians) {\n      **jacobians = a_;\n    }\n\n    return true;\n  }\n\n private:\n  const double a_, b_;\n};\n\n// Tests that ConditionedCostFunction does what it's supposed to.\nTEST(ConditionedCostFunction, NormalOperation) {\n  double v1[kTestCostFunctionSize], v2[kTestCostFunctionSize],\n      jac[kTestCostFunctionSize * kTestCostFunctionSize],\n      result[kTestCostFunctionSize];\n\n  for (int i = 0; i < kTestCostFunctionSize; i++) {\n    v1[i] = i;\n    v2[i] = i * 10;\n    // Seed a few garbage values in the Jacobian matrix, to make sure that\n    // they're overwritten.\n    jac[i * 2] = i * i;\n    result[i] = i * i * i;\n  }\n\n  // Make a cost function that computes x - v2\n  VectorRef v2_vector(v2, kTestCostFunctionSize, 1);\n  Matrix identity(kTestCostFunctionSize, kTestCostFunctionSize);\n  identity.setIdentity();\n  NormalPrior* difference_cost_function = new NormalPrior(identity, v2_vector);\n\n  std::vector<CostFunction*> conditioners;\n  for (int i = 0; i < kTestCostFunctionSize; i++) {\n    conditioners.push_back(new LinearCostFunction(i + 2, i * 7));\n  }\n\n  ConditionedCostFunction conditioned_cost_function(\n      difference_cost_function, conditioners, TAKE_OWNERSHIP);\n  EXPECT_EQ(difference_cost_function->num_residuals(),\n            conditioned_cost_function.num_residuals());\n  EXPECT_EQ(difference_cost_function->parameter_block_sizes(),\n            conditioned_cost_function.parameter_block_sizes());\n\n  double* parameters[1];\n  parameters[0] = v1;\n  double* jacs[1];\n  jacs[0] = jac;\n\n  conditioned_cost_function.Evaluate(parameters, result, jacs);\n  for (int i = 0; i < kTestCostFunctionSize; i++) {\n    EXPECT_DOUBLE_EQ((i + 2) * (v1[i] - v2[i]) + i * 7, result[i]);\n  }\n\n  for (int i = 0; i < kTestCostFunctionSize; i++) {\n    for (int j = 0; j < kTestCostFunctionSize; j++) {\n      double actual = jac[i * kTestCostFunctionSize + j];\n      if (i != j) {\n        EXPECT_DOUBLE_EQ(0, actual);\n      } else {\n        EXPECT_DOUBLE_EQ(i + 2, actual);\n      }\n    }\n  }\n}\n\nTEST(ConditionedCostFunction, SharedConditionersDoNotTriggerDoubleFree) {\n  // Make a cost function that computes x - v2\n  double v2[kTestCostFunctionSize];\n  VectorRef v2_vector(v2, kTestCostFunctionSize, 1);\n  Matrix identity = Matrix::Identity(kTestCostFunctionSize, kTestCostFunctionSize);\n  NormalPrior* difference_cost_function = new NormalPrior(identity, v2_vector);\n  CostFunction* conditioner = new LinearCostFunction(2, 7);\n  std::vector<CostFunction*> conditioners;\n  for (int i = 0; i < kTestCostFunctionSize; i++) {\n    conditioners.push_back(conditioner);\n  }\n\n  ConditionedCostFunction conditioned_cost_function(\n      difference_cost_function, conditioners, TAKE_OWNERSHIP);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/conjugate_gradients_solver.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// A preconditioned conjugate gradients solver\n// (ConjugateGradientsSolver) for positive semidefinite linear\n// systems.\n//\n// We have also augmented the termination criterion used by this\n// solver to support not just residual based termination but also\n// termination based on decrease in the value of the quadratic model\n// that CG optimizes.\n\n#include \"ceres/conjugate_gradients_solver.h\"\n\n#include <cmath>\n#include <cstddef>\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/linear_operator.h\"\n#include \"ceres/stringprintf.h\"\n#include \"ceres/types.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\nnamespace {\n\nbool IsZeroOrInfinity(double x) {\n  return ((x == 0.0) || std::isinf(x));\n}\n\n}  // namespace\n\nConjugateGradientsSolver::ConjugateGradientsSolver(\n    const LinearSolver::Options& options)\n    : options_(options) {\n}\n\nLinearSolver::Summary ConjugateGradientsSolver::Solve(\n    LinearOperator* A,\n    const double* b,\n    const LinearSolver::PerSolveOptions& per_solve_options,\n    double* x) {\n  CHECK(A != nullptr);\n  CHECK(x != nullptr);\n  CHECK(b != nullptr);\n  CHECK_EQ(A->num_rows(), A->num_cols());\n\n  LinearSolver::Summary summary;\n  summary.termination_type = LINEAR_SOLVER_NO_CONVERGENCE;\n  summary.message = \"Maximum number of iterations reached.\";\n  summary.num_iterations = 0;\n\n  const int num_cols = A->num_cols();\n  VectorRef xref(x, num_cols);\n  ConstVectorRef bref(b, num_cols);\n\n  const double norm_b = bref.norm();\n  if (norm_b == 0.0) {\n    xref.setZero();\n    summary.termination_type = LINEAR_SOLVER_SUCCESS;\n    summary.message = \"Convergence. |b| = 0.\";\n    return summary;\n  }\n\n  Vector r(num_cols);\n  Vector p(num_cols);\n  Vector z(num_cols);\n  Vector tmp(num_cols);\n\n  const double tol_r = per_solve_options.r_tolerance * norm_b;\n\n  tmp.setZero();\n  A->RightMultiply(x, tmp.data());\n  r = bref - tmp;\n  double norm_r = r.norm();\n  if (options_.min_num_iterations == 0 && norm_r <= tol_r) {\n    summary.termination_type = LINEAR_SOLVER_SUCCESS;\n    summary.message =\n        StringPrintf(\"Convergence. |r| = %e <= %e.\", norm_r, tol_r);\n    return summary;\n  }\n\n  double rho = 1.0;\n\n  // Initial value of the quadratic model Q = x'Ax - 2 * b'x.\n  double Q0 = -1.0 * xref.dot(bref + r);\n\n  for (summary.num_iterations = 1;; ++summary.num_iterations) {\n    // Apply preconditioner\n    if (per_solve_options.preconditioner != NULL) {\n      z.setZero();\n      per_solve_options.preconditioner->RightMultiply(r.data(), z.data());\n    } else {\n      z = r;\n    }\n\n    double last_rho = rho;\n    rho = r.dot(z);\n    if (IsZeroOrInfinity(rho)) {\n      summary.termination_type = LINEAR_SOLVER_FAILURE;\n      summary.message = StringPrintf(\"Numerical failure. rho = r'z = %e.\", rho);\n      break;\n    }\n\n    if (summary.num_iterations == 1) {\n      p = z;\n    } else {\n      double beta = rho / last_rho;\n      if (IsZeroOrInfinity(beta)) {\n        summary.termination_type = LINEAR_SOLVER_FAILURE;\n        summary.message = StringPrintf(\n            \"Numerical failure. beta = rho_n / rho_{n-1} = %e, \"\n            \"rho_n = %e, rho_{n-1} = %e\", beta, rho, last_rho);\n        break;\n      }\n      p = z + beta * p;\n    }\n\n    Vector& q = z;\n    q.setZero();\n    A->RightMultiply(p.data(), q.data());\n    const double pq = p.dot(q);\n    if ((pq <= 0) || std::isinf(pq)) {\n      summary.termination_type = LINEAR_SOLVER_NO_CONVERGENCE;\n      summary.message = StringPrintf(\n          \"Matrix is indefinite, no more progress can be made. \"\n          \"p'q = %e. |p| = %e, |q| = %e\",\n          pq, p.norm(), q.norm());\n      break;\n    }\n\n    const double alpha = rho / pq;\n    if (std::isinf(alpha)) {\n      summary.termination_type = LINEAR_SOLVER_FAILURE;\n      summary.message =\n          StringPrintf(\"Numerical failure. alpha = rho / pq = %e, \"\n                       \"rho = %e, pq = %e.\", alpha, rho, pq);\n      break;\n    }\n\n    xref = xref + alpha * p;\n\n    // Ideally we would just use the update r = r - alpha*q to keep\n    // track of the residual vector. However this estimate tends to\n    // drift over time due to round off errors. Thus every\n    // residual_reset_period iterations, we calculate the residual as\n    // r = b - Ax. We do not do this every iteration because this\n    // requires an additional matrix vector multiply which would\n    // double the complexity of the CG algorithm.\n    if (summary.num_iterations % options_.residual_reset_period == 0) {\n      tmp.setZero();\n      A->RightMultiply(x, tmp.data());\n      r = bref - tmp;\n    } else {\n      r = r - alpha * q;\n    }\n\n    // Quadratic model based termination.\n    //   Q1 = x'Ax - 2 * b' x.\n    const double Q1 = -1.0 * xref.dot(bref + r);\n\n    // For PSD matrices A, let\n    //\n    //   Q(x) = x'Ax - 2b'x\n    //\n    // be the cost of the quadratic function defined by A and b. Then,\n    // the solver terminates at iteration i if\n    //\n    //   i * (Q(x_i) - Q(x_i-1)) / Q(x_i) < q_tolerance.\n    //\n    // This termination criterion is more useful when using CG to\n    // solve the Newton step. This particular convergence test comes\n    // from Stephen Nash's work on truncated Newton\n    // methods. References:\n    //\n    //   1. Stephen G. Nash & Ariela Sofer, Assessing A Search\n    //   Direction Within A Truncated Newton Method, Operation\n    //   Research Letters 9(1990) 219-221.\n    //\n    //   2. Stephen G. Nash, A Survey of Truncated Newton Methods,\n    //   Journal of Computational and Applied Mathematics,\n    //   124(1-2), 45-59, 2000.\n    //\n    const double zeta = summary.num_iterations * (Q1 - Q0) / Q1;\n    if (zeta < per_solve_options.q_tolerance &&\n        summary.num_iterations >= options_.min_num_iterations) {\n      summary.termination_type = LINEAR_SOLVER_SUCCESS;\n      summary.message =\n          StringPrintf(\"Iteration: %d Convergence: zeta = %e < %e. |r| = %e\",\n                       summary.num_iterations,\n                       zeta,\n                       per_solve_options.q_tolerance,\n                       r.norm());\n      break;\n    }\n    Q0 = Q1;\n\n    // Residual based termination.\n    norm_r = r. norm();\n    if (norm_r <= tol_r &&\n        summary.num_iterations >= options_.min_num_iterations) {\n      summary.termination_type = LINEAR_SOLVER_SUCCESS;\n      summary.message =\n          StringPrintf(\"Iteration: %d Convergence. |r| = %e <= %e.\",\n                       summary.num_iterations,\n                       norm_r,\n                       tol_r);\n      break;\n    }\n\n    if (summary.num_iterations >= options_.max_num_iterations) {\n      break;\n    }\n  }\n\n  return summary;\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/conjugate_gradients_solver.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Preconditioned Conjugate Gradients based solver for positive\n// semidefinite linear systems.\n\n#ifndef CERES_INTERNAL_CONJUGATE_GRADIENTS_SOLVER_H_\n#define CERES_INTERNAL_CONJUGATE_GRADIENTS_SOLVER_H_\n\n#include \"ceres/linear_solver.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass LinearOperator;\n\n// This class implements the now classical Conjugate Gradients\n// algorithm of Hestenes & Stiefel for solving postive semidefinite\n// linear sytems. Optionally it can use a preconditioner also to\n// reduce the condition number of the linear system and improve the\n// convergence rate. Modern references for Conjugate Gradients are the\n// books by Yousef Saad and Trefethen & Bau. This implementation of CG\n// has been augmented with additional termination tests that are\n// needed for forcing early termination when used as part of an\n// inexact Newton solver.\n//\n// For more details see the documentation for\n// LinearSolver::PerSolveOptions::r_tolerance and\n// LinearSolver::PerSolveOptions::q_tolerance in linear_solver.h.\nclass ConjugateGradientsSolver : public LinearSolver {\n public:\n  explicit ConjugateGradientsSolver(const LinearSolver::Options& options);\n  Summary Solve(LinearOperator* A,\n                const double* b,\n                const LinearSolver::PerSolveOptions& per_solve_options,\n                double* x) final;\n\n private:\n  const LinearSolver::Options options_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_CONJUGATE_GRADIENTS_SOLVER_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/conjugate_gradients_solver_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: fredp@google.com (Fred Pighin)\n//\n// TODO(sameeragarwal): More comprehensive testing with larger and\n// more badly conditioned problem.\n\n#include <memory>\n#include \"gtest/gtest.h\"\n#include \"ceres/conjugate_gradients_solver.h\"\n#include \"ceres/linear_solver.h\"\n#include \"ceres/triplet_sparse_matrix.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/types.h\"\n\nnamespace ceres {\nnamespace internal {\n\nTEST(ConjugateGradientTest, Solves3x3IdentitySystem) {\n  double diagonal[] = { 1.0, 1.0, 1.0 };\n  std::unique_ptr<TripletSparseMatrix>\n      A(TripletSparseMatrix::CreateSparseDiagonalMatrix(diagonal, 3));\n  Vector b(3);\n  Vector x(3);\n\n  b(0) = 1.0;\n  b(1) = 2.0;\n  b(2) = 3.0;\n\n  x(0) = 1;\n  x(1) = 1;\n  x(2) = 1;\n\n  LinearSolver::Options options;\n  options.max_num_iterations = 10;\n\n  LinearSolver::PerSolveOptions per_solve_options;\n  per_solve_options.r_tolerance = 1e-9;\n\n  ConjugateGradientsSolver solver(options);\n  LinearSolver::Summary summary =\n      solver.Solve(A.get(), b.data(), per_solve_options, x.data());\n\n  EXPECT_EQ(summary.termination_type, LINEAR_SOLVER_SUCCESS);\n  ASSERT_EQ(summary.num_iterations, 1);\n\n  ASSERT_DOUBLE_EQ(1, x(0));\n  ASSERT_DOUBLE_EQ(2, x(1));\n  ASSERT_DOUBLE_EQ(3, x(2));\n}\n\n\nTEST(ConjuateGradientTest, Solves3x3SymmetricSystem) {\n  std::unique_ptr<TripletSparseMatrix> A(new TripletSparseMatrix(3, 3, 9));\n  Vector b(3);\n  Vector x(3);\n\n  //      | 2  -1  0|\n  //  A = |-1   2 -1| is symmetric positive definite.\n  //      | 0  -1  2|\n  int* Ai = A->mutable_rows();\n  int* Aj = A->mutable_cols();\n  double* Ax = A->mutable_values();\n  int counter = 0;\n  for (int i = 0; i < 3; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      Ai[counter] = i;\n      Aj[counter] = j;\n      ++counter;\n    }\n  }\n  Ax[0] = 2.;\n  Ax[1] = -1.;\n  Ax[2] = 0;\n  Ax[3] = -1.;\n  Ax[4] = 2;\n  Ax[5] = -1;\n  Ax[6] = 0;\n  Ax[7] = -1;\n  Ax[8] = 2;\n  A->set_num_nonzeros(9);\n\n  b(0) = -1;\n  b(1) = 0;\n  b(2) = 3;\n\n  x(0) = 1;\n  x(1) = 1;\n  x(2) = 1;\n\n  LinearSolver::Options options;\n  options.max_num_iterations = 10;\n\n  LinearSolver::PerSolveOptions per_solve_options;\n  per_solve_options.r_tolerance = 1e-9;\n\n  ConjugateGradientsSolver solver(options);\n  LinearSolver::Summary summary =\n      solver.Solve(A.get(), b.data(), per_solve_options, x.data());\n\n  EXPECT_EQ(summary.termination_type, LINEAR_SOLVER_SUCCESS);\n\n  ASSERT_DOUBLE_EQ(0, x(0));\n  ASSERT_DOUBLE_EQ(1, x(1));\n  ASSERT_DOUBLE_EQ(2, x(2));\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/context.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: vitus@google.com (Michael Vitus)\n\n#include \"ceres/context.h\"\n\n#include \"ceres/context_impl.h\"\n\nnamespace ceres {\n\nContext* Context::Create() {\n  return new internal::ContextImpl();\n}\n\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/context_impl.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: vitus@google.com (Michael Vitus)\n\n#include \"ceres/context_impl.h\"\n\nnamespace ceres {\nnamespace internal {\n\nvoid ContextImpl::EnsureMinimumThreads(int num_threads) {\n#ifdef CERES_USE_CXX11_THREADS\n  thread_pool.Resize(num_threads);\n#endif  // CERES_USE_CXX11_THREADS\n\n}\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/context_impl.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: vitus@google.com (Michael Vitus)\n\n#ifndef CERES_INTERNAL_CONTEXT_IMPL_H_\n#define CERES_INTERNAL_CONTEXT_IMPL_H_\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#include \"ceres/context.h\"\n\n#ifdef CERES_USE_CXX11_THREADS\n#include \"ceres/thread_pool.h\"\n#endif  // CERES_USE_CXX11_THREADS\n\nnamespace ceres {\nnamespace internal {\n\nclass ContextImpl : public Context {\n public:\n  ContextImpl() {}\n  ContextImpl(const ContextImpl&) = delete;\n  void operator=(const ContextImpl&) = delete;\n\n  virtual ~ContextImpl() {}\n\n  // When compiled with C++11 threading support, resize the thread pool to have\n  // at min(num_thread, num_hardware_threads) where num_hardware_threads is\n  // defined by the hardware.  Otherwise this call is a no-op.\n  void EnsureMinimumThreads(int num_threads);\n\n#ifdef CERES_USE_CXX11_THREADS\n  ThreadPool thread_pool;\n#endif  // CERES_USE_CXX11_THREADS\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_CONTEXT_IMPL_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/coordinate_descent_minimizer.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/coordinate_descent_minimizer.h\"\n\n#include <algorithm>\n#include <iterator>\n#include <memory>\n#include <numeric>\n#include <vector>\n\n#include \"ceres/evaluator.h\"\n#include \"ceres/linear_solver.h\"\n#include \"ceres/minimizer.h\"\n#include \"ceres/parallel_for.h\"\n#include \"ceres/parameter_block.h\"\n#include \"ceres/parameter_block_ordering.h\"\n#include \"ceres/problem_impl.h\"\n#include \"ceres/program.h\"\n#include \"ceres/residual_block.h\"\n#include \"ceres/solver.h\"\n#include \"ceres/trust_region_minimizer.h\"\n#include \"ceres/trust_region_strategy.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::map;\nusing std::max;\nusing std::min;\nusing std::set;\nusing std::string;\nusing std::vector;\n\nCoordinateDescentMinimizer::CoordinateDescentMinimizer(ContextImpl* context)\n    : context_(context) {\n  CHECK(context_ != nullptr);\n}\n\nCoordinateDescentMinimizer::~CoordinateDescentMinimizer() {\n}\n\nbool CoordinateDescentMinimizer::Init(\n    const Program& program,\n    const ProblemImpl::ParameterMap& parameter_map,\n    const ParameterBlockOrdering& ordering,\n    string* error) {\n  parameter_blocks_.clear();\n  independent_set_offsets_.clear();\n  independent_set_offsets_.push_back(0);\n\n  // Serialize the OrderedGroups into a vector of parameter block\n  // offsets for parallel access.\n  map<ParameterBlock*, int> parameter_block_index;\n  map<int, set<double*>> group_to_elements = ordering.group_to_elements();\n  for (const auto& g_t_e : group_to_elements) {\n    const auto& elements = g_t_e.second;\n    for (double* parameter_block: elements) {\n      parameter_blocks_.push_back(parameter_map.find(parameter_block)->second);\n      parameter_block_index[parameter_blocks_.back()] =\n          parameter_blocks_.size() - 1;\n    }\n    independent_set_offsets_.push_back(\n        independent_set_offsets_.back() + elements.size());\n  }\n\n  // The ordering does not have to contain all parameter blocks, so\n  // assign zero offsets/empty independent sets to these parameter\n  // blocks.\n  const vector<ParameterBlock*>& parameter_blocks = program.parameter_blocks();\n  for (int i = 0; i < parameter_blocks.size(); ++i) {\n    if (!ordering.IsMember(parameter_blocks[i]->mutable_user_state())) {\n      parameter_blocks_.push_back(parameter_blocks[i]);\n      independent_set_offsets_.push_back(independent_set_offsets_.back());\n    }\n  }\n\n  // Compute the set of residual blocks that depend on each parameter\n  // block.\n  residual_blocks_.resize(parameter_block_index.size());\n  const vector<ResidualBlock*>& residual_blocks = program.residual_blocks();\n  for (int i = 0; i < residual_blocks.size(); ++i) {\n    ResidualBlock* residual_block = residual_blocks[i];\n    const int num_parameter_blocks = residual_block->NumParameterBlocks();\n    for (int j = 0; j < num_parameter_blocks; ++j) {\n      ParameterBlock* parameter_block = residual_block->parameter_blocks()[j];\n      const auto it = parameter_block_index.find(parameter_block);\n      if (it != parameter_block_index.end()) {\n        residual_blocks_[it->second].push_back(residual_block);\n      }\n    }\n  }\n\n  evaluator_options_.linear_solver_type = DENSE_QR;\n  evaluator_options_.num_eliminate_blocks = 0;\n  evaluator_options_.num_threads = 1;\n  evaluator_options_.context = context_;\n\n  return true;\n}\n\nvoid CoordinateDescentMinimizer::Minimize(\n    const Minimizer::Options& options,\n    double* parameters,\n    Solver::Summary* summary) {\n  // Set the state and mark all parameter blocks constant.\n  for (int i = 0; i < parameter_blocks_.size(); ++i) {\n    ParameterBlock* parameter_block = parameter_blocks_[i];\n    parameter_block->SetState(parameters + parameter_block->state_offset());\n    parameter_block->SetConstant();\n  }\n\n  std::unique_ptr<LinearSolver*[]> linear_solvers(\n      new LinearSolver*[options.num_threads]);\n\n  LinearSolver::Options linear_solver_options;\n  linear_solver_options.type = DENSE_QR;\n  linear_solver_options.context = context_;\n\n  for (int i = 0; i < options.num_threads; ++i) {\n    linear_solvers[i] = LinearSolver::Create(linear_solver_options);\n  }\n\n  for (int i = 0; i < independent_set_offsets_.size() - 1; ++i) {\n    const int num_problems =\n        independent_set_offsets_[i + 1] - independent_set_offsets_[i];\n    // Avoid parallelization overhead call if the set is empty.\n    if (num_problems == 0) {\n      continue;\n    }\n\n    const int num_inner_iteration_threads =\n        min(options.num_threads, num_problems);\n    evaluator_options_.num_threads =\n        max(1, options.num_threads / num_inner_iteration_threads);\n\n    // The parameter blocks in each independent set can be optimized\n    // in parallel, since they do not co-occur in any residual block.\n    ParallelFor(\n        context_,\n        independent_set_offsets_[i],\n        independent_set_offsets_[i + 1],\n        num_inner_iteration_threads,\n        [&](int thread_id, int j) {\n          ParameterBlock* parameter_block = parameter_blocks_[j];\n          const int old_index = parameter_block->index();\n          const int old_delta_offset = parameter_block->delta_offset();\n          parameter_block->SetVarying();\n          parameter_block->set_index(0);\n          parameter_block->set_delta_offset(0);\n\n          Program inner_program;\n          inner_program.mutable_parameter_blocks()->push_back(parameter_block);\n          *inner_program.mutable_residual_blocks() = residual_blocks_[j];\n\n          // TODO(sameeragarwal): Better error handling. Right now we\n          // assume that this is not going to lead to problems of any\n          // sort. Basically we should be checking for numerical failure\n          // of some sort.\n          //\n          // On the other hand, if the optimization is a failure, that in\n          // some ways is fine, since it won't change the parameters and\n          // we are fine.\n          Solver::Summary inner_summary;\n          Solve(&inner_program,\n                linear_solvers[thread_id],\n                parameters + parameter_block->state_offset(),\n                &inner_summary);\n\n          parameter_block->set_index(old_index);\n          parameter_block->set_delta_offset(old_delta_offset);\n          parameter_block->SetState(parameters +\n                                    parameter_block->state_offset());\n          parameter_block->SetConstant();\n        });\n  }\n\n  for (int i =  0; i < parameter_blocks_.size(); ++i) {\n    parameter_blocks_[i]->SetVarying();\n  }\n\n  for (int i = 0; i < options.num_threads; ++i) {\n    delete linear_solvers[i];\n  }\n}\n\n// Solve the optimization problem for one parameter block.\nvoid CoordinateDescentMinimizer::Solve(Program* program,\n                                       LinearSolver* linear_solver,\n                                       double* parameter,\n                                       Solver::Summary* summary) {\n  *summary = Solver::Summary();\n  summary->initial_cost = 0.0;\n  summary->fixed_cost = 0.0;\n  summary->final_cost = 0.0;\n  string error;\n\n  Minimizer::Options minimizer_options;\n  minimizer_options.evaluator.reset(\n      Evaluator::Create(evaluator_options_, program, &error));\n  CHECK(minimizer_options.evaluator != nullptr);\n  minimizer_options.jacobian.reset(\n      minimizer_options.evaluator->CreateJacobian());\n  CHECK(minimizer_options.jacobian != nullptr);\n\n  TrustRegionStrategy::Options trs_options;\n  trs_options.linear_solver = linear_solver;\n  minimizer_options.trust_region_strategy.reset(\n      TrustRegionStrategy::Create(trs_options));\n  CHECK(minimizer_options.trust_region_strategy != nullptr);\n  minimizer_options.is_silent = true;\n\n  TrustRegionMinimizer minimizer;\n  minimizer.Minimize(minimizer_options, parameter, summary);\n}\n\nbool CoordinateDescentMinimizer::IsOrderingValid(\n    const Program& program,\n    const ParameterBlockOrdering& ordering,\n    string* message) {\n  const map<int, set<double*>>& group_to_elements =\n      ordering.group_to_elements();\n\n  // Verify that each group is an independent set\n  for (const auto& g_t_e : group_to_elements) {\n    if (!program.IsParameterBlockSetIndependent(g_t_e.second)) {\n      *message =\n          StringPrintf(\"The user-provided \"\n                       \"parameter_blocks_for_inner_iterations does not \"\n                       \"form an independent set. Group Id: %d\", g_t_e.first);\n      return false;\n    }\n  }\n  return true;\n}\n\n// Find a recursive decomposition of the Hessian matrix as a set\n// of independent sets of decreasing size and invert it. This\n// seems to work better in practice, i.e., Cameras before\n// points.\nParameterBlockOrdering* CoordinateDescentMinimizer::CreateOrdering(\n    const Program& program) {\n  std::unique_ptr<ParameterBlockOrdering> ordering(new ParameterBlockOrdering);\n  ComputeRecursiveIndependentSetOrdering(program, ordering.get());\n  ordering->Reverse();\n  return ordering.release();\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/coordinate_descent_minimizer.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_COORDINATE_DESCENT_MINIMIZER_H_\n#define CERES_INTERNAL_COORDINATE_DESCENT_MINIMIZER_H_\n\n#include <string>\n#include <vector>\n\n#include \"ceres/context_impl.h\"\n#include \"ceres/evaluator.h\"\n#include \"ceres/minimizer.h\"\n#include \"ceres/problem_impl.h\"\n#include \"ceres/solver.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass Program;\nclass LinearSolver;\n\n// Given a Program, and a ParameterBlockOrdering which partitions\n// (non-exhaustively) the Hessian matrix into independent sets,\n// perform coordinate descent on the parameter blocks in the\n// ordering. The independent set structure allows for all parameter\n// blocks in the same independent set to be optimized in parallel, and\n// the order of the independent set determines the order in which the\n// parameter block groups are optimized.\n//\n// The minimizer assumes that none of the parameter blocks in the\n// program are constant.\nclass CoordinateDescentMinimizer : public Minimizer {\n public:\n  explicit CoordinateDescentMinimizer(ContextImpl* context);\n\n  bool Init(const Program& program,\n            const ProblemImpl::ParameterMap& parameter_map,\n            const ParameterBlockOrdering& ordering,\n            std::string* error);\n\n  // Minimizer interface.\n  virtual ~CoordinateDescentMinimizer();\n\n  void Minimize(const Minimizer::Options& options,\n                double* parameters,\n                Solver::Summary* summary) final;\n\n  // Verify that each group in the ordering forms an independent set.\n  static bool IsOrderingValid(const Program& program,\n                              const ParameterBlockOrdering& ordering,\n                              std::string* message);\n\n  // Find a recursive decomposition of the Hessian matrix as a set\n  // of independent sets of decreasing size and invert it. This\n  // seems to work better in practice, i.e., Cameras before\n  // points.\n  static ParameterBlockOrdering* CreateOrdering(const Program& program);\n\n private:\n  void Solve(Program* program,\n             LinearSolver* linear_solver,\n             double* parameters,\n             Solver::Summary* summary);\n\n  std::vector<ParameterBlock*> parameter_blocks_;\n  std::vector<std::vector<ResidualBlock*>> residual_blocks_;\n  // The optimization is performed in rounds. In each round all the\n  // parameter blocks that form one independent set are optimized in\n  // parallel. This array, marks the boundaries of the independent\n  // sets in parameter_blocks_.\n  std::vector<int> independent_set_offsets_;\n\n  Evaluator::Options evaluator_options_;\n\n  ContextImpl* context_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_COORDINATE_DESCENT_MINIMIZER_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/corrector.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/corrector.h\"\n\n#include <cstddef>\n#include <cmath>\n#include \"ceres/internal/eigen.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nCorrector::Corrector(const double sq_norm, const double rho[3]) {\n  CHECK_GE(sq_norm, 0.0);\n  sqrt_rho1_ = sqrt(rho[1]);\n\n  // If sq_norm = 0.0, the correction becomes trivial, the residual\n  // and the jacobian are scaled by the square root of the derivative\n  // of rho. Handling this case explicitly avoids the divide by zero\n  // error that would occur below.\n  //\n  // The case where rho'' < 0 also gets special handling. Technically\n  // it shouldn't, and the computation of the scaling should proceed\n  // as below, however we found in experiments that applying the\n  // curvature correction when rho'' < 0, which is the case when we\n  // are in the outlier region slows down the convergence of the\n  // algorithm significantly.\n  //\n  // Thus, we have divided the action of the robustifier into two\n  // parts. In the inliner region, we do the full second order\n  // correction which re-wights the gradient of the function by the\n  // square root of the derivative of rho, and the Gauss-Newton\n  // Hessian gets both the scaling and the rank-1 curvature\n  // correction. Normally, alpha is upper bounded by one, but with this\n  // change, alpha is bounded above by zero.\n  //\n  // Empirically we have observed that the full Triggs correction and\n  // the clamped correction both start out as very good approximations\n  // to the loss function when we are in the convex part of the\n  // function, but as the function starts transitioning from convex to\n  // concave, the Triggs approximation diverges more and more and\n  // ultimately becomes linear. The clamped Triggs model however\n  // remains quadratic.\n  //\n  // The reason why the Triggs approximation becomes so poor is\n  // because the curvature correction that it applies to the gauss\n  // newton hessian goes from being a full rank correction to a rank\n  // deficient correction making the inversion of the Hessian fraught\n  // with all sorts of misery and suffering.\n  //\n  // The clamped correction retains its quadratic nature and inverting it\n  // is always well formed.\n  if ((sq_norm == 0.0) || (rho[2] <= 0.0)) {\n    residual_scaling_ = sqrt_rho1_;\n    alpha_sq_norm_ = 0.0;\n    return;\n  }\n\n  // We now require that the first derivative of the loss function be\n  // positive only if the second derivative is positive. This is\n  // because when the second derivative is non-positive, we do not use\n  // the second order correction suggested by BANS and instead use a\n  // simpler first order strategy which does not use a division by the\n  // gradient of the loss function.\n  CHECK_GT(rho[1], 0.0);\n\n  // Calculate the smaller of the two solutions to the equation\n  //\n  // 0.5 *  alpha^2 - alpha - rho'' / rho' *  z'z = 0.\n  //\n  // Start by calculating the discriminant D.\n  const double D = 1.0 + 2.0 * sq_norm * rho[2] / rho[1];\n\n  // Since both rho[1] and rho[2] are guaranteed to be positive at\n  // this point, we know that D > 1.0.\n\n  const double alpha = 1.0 - sqrt(D);\n\n  // Calculate the constants needed by the correction routines.\n  residual_scaling_ = sqrt_rho1_ / (1 - alpha);\n  alpha_sq_norm_ = alpha / sq_norm;\n}\n\nvoid Corrector::CorrectResiduals(const int num_rows, double* residuals) {\n  DCHECK(residuals != NULL);\n  // Equation 11 in BANS.\n  VectorRef(residuals, num_rows) *= residual_scaling_;\n}\n\nvoid Corrector::CorrectJacobian(const int num_rows,\n                                const int num_cols,\n                                double* residuals,\n                                double* jacobian) {\n  DCHECK(residuals != NULL);\n  DCHECK(jacobian != NULL);\n\n  // The common case (rho[2] <= 0).\n  if (alpha_sq_norm_ == 0.0) {\n    VectorRef(jacobian, num_rows * num_cols) *= sqrt_rho1_;\n    return;\n  }\n\n  // Equation 11 in BANS.\n  //\n  //  J = sqrt(rho) * (J - alpha^2 r * r' J)\n  //\n  // In days gone by this loop used to be a single Eigen expression of\n  // the form\n  //\n  //  J = sqrt_rho1_ * (J - alpha_sq_norm_ * r* (r.transpose() * J));\n  //\n  // Which turns out to about 17x slower on bal problems. The reason\n  // is that Eigen is unable to figure out that this expression can be\n  // evaluated columnwise and ends up creating a temporary.\n  for (int c = 0; c < num_cols; ++c) {\n    double r_transpose_j = 0.0;\n    for (int r = 0; r < num_rows; ++r) {\n      r_transpose_j += jacobian[r * num_cols + c] * residuals[r];\n    }\n\n    for (int r = 0; r < num_rows; ++r) {\n      jacobian[r * num_cols + c] = sqrt_rho1_ *\n          (jacobian[r * num_cols + c] -\n           alpha_sq_norm_ * residuals[r] * r_transpose_j);\n    }\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/corrector.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Class definition for the object that is responsible for applying a\n// second order correction to the Gauss-Newton based on the ideas in\n// BANS by Triggs et al.\n\n#ifndef CERES_INTERNAL_CORRECTOR_H_\n#define CERES_INTERNAL_CORRECTOR_H_\n\nnamespace ceres {\nnamespace internal {\n\n// Corrector is responsible for applying the second order correction\n// to the residual and jacobian of a least squares problem based on a\n// radial robust loss.\n//\n// The key idea here is to look at the expressions for the robustified\n// gauss newton approximation and then take its square root to get the\n// corresponding corrections to the residual and jacobian.  For the\n// full expressions see Eq. 10 and 11 in BANS by Triggs et al.\nclass Corrector {\n public:\n  // The constructor takes the squared norm, the value, the first and\n  // second derivatives of the LossFunction. It precalculates some of\n  // the constants that are needed to apply the correction. The\n  // correction constant alpha is constrained to be smaller than 1, if\n  // it becomes larger than 1, then it will reverse the sign of the\n  // residual and the correction. If alpha is equal to 1 will result\n  // in a divide by zero error. Thus we constrain alpha to be upper\n  // bounded by 1 - epsilon_.\n  //\n  // rho[1] needs to be positive. The constructor will crash if this\n  // condition is not met.\n  //\n  // In practical use CorrectJacobian should always be called before\n  // CorrectResidual, because the jacobian correction depends on the\n  // value of the uncorrected residual values.\n  explicit Corrector(double sq_norm, const double rho[3]);\n\n  // residuals *= sqrt(rho[1]) / (1 - alpha)\n  void CorrectResiduals(int num_rows, double* residuals);\n\n  // jacobian = sqrt(rho[1]) * jacobian -\n  // sqrt(rho[1]) * alpha / sq_norm * residuals residuals' * jacobian.\n  //\n  // The method assumes that the jacobian has row-major storage. It is\n  // the caller's responsibility to ensure that the pointer to\n  // jacobian is not null.\n  void CorrectJacobian(int num_rows,\n                       int num_cols,\n                       double* residuals,\n                       double* jacobian);\n\n private:\n  double sqrt_rho1_;\n  double residual_scaling_;\n  double alpha_sq_norm_;\n};\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_CORRECTOR_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/corrector_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/corrector.h\"\n\n#include <algorithm>\n#include <cmath>\n#include <cstring>\n#include <cstdlib>\n#include \"gtest/gtest.h\"\n#include \"ceres/random.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// If rho[1] is zero, the Corrector constructor should crash.\nTEST(Corrector, ZeroGradientDeathTest) {\n  const double kRho[] = {0.0, 0.0, 1.0};\n  EXPECT_DEATH_IF_SUPPORTED({Corrector c(1.0, kRho);},\n               \".*\");\n}\n\n// If rho[1] is negative, the Corrector constructor should crash.\nTEST(Corrector, NegativeGradientDeathTest) {\n  const double kRho[] = {0.0, -0.1, 1.0};\n  EXPECT_DEATH_IF_SUPPORTED({Corrector c(1.0, kRho);},\n               \".*\");\n}\n\nTEST(Corrector, ScalarCorrection) {\n  double residuals = sqrt(3.0);\n  double jacobian = 10.0;\n  double sq_norm = residuals * residuals;\n\n  const double kRho[] = {sq_norm, 0.1, -0.01};\n\n  // In light of the rho'' < 0 clamping now implemented in\n  // corrector.cc, alpha = 0 whenever rho'' < 0.\n  const double kAlpha = 0.0;\n\n  // Thus the expected value of the residual is\n  // residual[i] * sqrt(kRho[1]) / (1.0 - kAlpha).\n  const double kExpectedResidual =\n      residuals * sqrt(kRho[1]) / (1 - kAlpha);\n\n  // The jacobian in this case will be\n  // sqrt(kRho[1]) * (1 - kAlpha) * jacobian.\n  const double kExpectedJacobian = sqrt(kRho[1]) * (1 - kAlpha) * jacobian;\n\n  Corrector c(sq_norm, kRho);\n  c.CorrectJacobian(1.0, 1.0, &residuals, &jacobian);\n  c.CorrectResiduals(1.0, &residuals);\n\n  ASSERT_NEAR(residuals, kExpectedResidual, 1e-6);\n  ASSERT_NEAR(kExpectedJacobian, jacobian, 1e-6);\n}\n\nTEST(Corrector, ScalarCorrectionZeroResidual) {\n  double residuals = 0.0;\n  double jacobian = 10.0;\n  double sq_norm = residuals * residuals;\n\n  const double kRho[] = {0.0, 0.1, -0.01};\n  Corrector c(sq_norm, kRho);\n\n  // The alpha equation is\n  // 1/2 alpha^2 - alpha + 0.0 = 0.\n  // i.e. alpha = 1.0 - sqrt(1.0).\n  //      alpha = 0.0.\n  // Thus the expected value of the residual is\n  // residual[i] * sqrt(kRho[1])\n  const double kExpectedResidual = residuals * sqrt(kRho[1]);\n\n  // The jacobian in this case will be\n  // sqrt(kRho[1]) * jacobian.\n  const double kExpectedJacobian = sqrt(kRho[1]) * jacobian;\n\n  c.CorrectJacobian(1, 1, &residuals, &jacobian);\n  c.CorrectResiduals(1, &residuals);\n\n  ASSERT_NEAR(residuals, kExpectedResidual, 1e-6);\n  ASSERT_NEAR(kExpectedJacobian, jacobian, 1e-6);\n}\n\n// Scaling behaviour for one dimensional functions.\nTEST(Corrector, ScalarCorrectionAlphaClamped) {\n  double residuals = sqrt(3.0);\n  double jacobian = 10.0;\n  double sq_norm = residuals * residuals;\n\n  const double kRho[] = {3, 0.1, -0.1};\n\n  // rho[2] < 0 -> alpha = 0.0\n  const double kAlpha = 0.0;\n\n  // Thus the expected value of the residual is\n  // residual[i] * sqrt(kRho[1]) / (1.0 - kAlpha).\n  const double kExpectedResidual =\n      residuals * sqrt(kRho[1]) / (1.0 - kAlpha);\n\n  // The jacobian in this case will be scaled by\n  // sqrt(rho[1]) * (1 - alpha) * J.\n  const double kExpectedJacobian = sqrt(kRho[1]) *\n      (1.0 - kAlpha) * jacobian;\n\n  Corrector c(sq_norm, kRho);\n  c.CorrectJacobian(1, 1, &residuals, &jacobian);\n  c.CorrectResiduals(1, &residuals);\n\n  ASSERT_NEAR(residuals, kExpectedResidual, 1e-6);\n  ASSERT_NEAR(kExpectedJacobian, jacobian, 1e-6);\n}\n\n// Test that the corrected multidimensional residual and jacobians\n// match the expected values and the resulting modified normal\n// equations match the robustified gauss newton approximation.\nTEST(Corrector, MultidimensionalGaussNewtonApproximation) {\n  double residuals[3];\n  double jacobian[2 * 3];\n  double rho[3];\n\n  // Eigen matrix references for linear algebra.\n  MatrixRef jac(jacobian, 3, 2);\n  VectorRef res(residuals, 3);\n\n  // Ground truth values of the modified jacobian and residuals.\n  Matrix g_jac(3, 2);\n  Vector g_res(3);\n\n  // Ground truth values of the robustified Gauss-Newton\n  // approximation.\n  Matrix g_hess(2, 2);\n  Vector g_grad(2);\n\n  // Corrected hessian and gradient implied by the modified jacobian\n  // and hessians.\n  Matrix c_hess(2, 2);\n  Vector c_grad(2);\n\n  srand(5);\n  for (int iter = 0; iter < 10000; ++iter) {\n    // Initialize the jacobian and residual.\n    for (int i = 0; i < 2 * 3; ++i)\n      jacobian[i] = RandDouble();\n    for (int i = 0; i < 3; ++i)\n      residuals[i] = RandDouble();\n\n    const double sq_norm = res.dot(res);\n\n    rho[0] = sq_norm;\n    rho[1] = RandDouble();\n    rho[2] = 2.0 * RandDouble() - 1.0;\n\n    // If rho[2] > 0, then the curvature correction to the correction\n    // and the gauss newton approximation will match. Otherwise, we\n    // will clamp alpha to 0.\n\n    const double kD = 1 + 2 * rho[2] / rho[1] * sq_norm;\n    const double kAlpha = (rho[2] > 0.0) ? 1 - sqrt(kD) : 0.0;\n\n    // Ground truth values.\n    g_res = sqrt(rho[1]) / (1.0 - kAlpha) * res;\n    g_jac = sqrt(rho[1]) * (jac - kAlpha / sq_norm *\n                            res * res.transpose() * jac);\n\n    g_grad = rho[1] * jac.transpose() * res;\n    g_hess = rho[1] * jac.transpose() * jac +\n        2.0 * rho[2] * jac.transpose() * res * res.transpose() * jac;\n\n    Corrector c(sq_norm, rho);\n    c.CorrectJacobian(3, 2, residuals, jacobian);\n    c.CorrectResiduals(3, residuals);\n\n    // Corrected gradient and hessian.\n    c_grad  = jac.transpose() * res;\n    c_hess = jac.transpose() * jac;\n\n    ASSERT_NEAR((g_res - res).norm(), 0.0, 1e-10);\n    ASSERT_NEAR((g_jac - jac).norm(), 0.0, 1e-10);\n\n    ASSERT_NEAR((g_grad - c_grad).norm(), 0.0, 1e-10);\n  }\n}\n\nTEST(Corrector, MultidimensionalGaussNewtonApproximationZeroResidual) {\n  double residuals[3];\n  double jacobian[2 * 3];\n  double rho[3];\n\n  // Eigen matrix references for linear algebra.\n  MatrixRef jac(jacobian, 3, 2);\n  VectorRef res(residuals, 3);\n\n  // Ground truth values of the modified jacobian and residuals.\n  Matrix g_jac(3, 2);\n  Vector g_res(3);\n\n  // Ground truth values of the robustified Gauss-Newton\n  // approximation.\n  Matrix g_hess(2, 2);\n  Vector g_grad(2);\n\n  // Corrected hessian and gradient implied by the modified jacobian\n  // and hessians.\n  Matrix c_hess(2, 2);\n  Vector c_grad(2);\n\n  srand(5);\n  for (int iter = 0; iter < 10000; ++iter) {\n    // Initialize the jacobian.\n    for (int i = 0; i < 2 * 3; ++i)\n      jacobian[i] = RandDouble();\n\n    // Zero residuals\n    res.setZero();\n\n    const double sq_norm = res.dot(res);\n\n    rho[0] = sq_norm;\n    rho[1] = RandDouble();\n    rho[2] = 2 * RandDouble() - 1.0;\n\n    // Ground truth values.\n    g_res = sqrt(rho[1]) * res;\n    g_jac = sqrt(rho[1]) * jac;\n\n    g_grad = rho[1] * jac.transpose() * res;\n    g_hess = rho[1] * jac.transpose() * jac +\n        2.0 * rho[2] * jac.transpose() * res * res.transpose() * jac;\n\n    Corrector c(sq_norm, rho);\n    c.CorrectJacobian(3, 2, residuals, jacobian);\n    c.CorrectResiduals(3, residuals);\n\n    // Corrected gradient and hessian.\n    c_grad = jac.transpose() * res;\n    c_hess = jac.transpose() * jac;\n\n    ASSERT_NEAR((g_res - res).norm(), 0.0, 1e-10);\n    ASSERT_NEAR((g_jac - jac).norm(), 0.0, 1e-10);\n\n    ASSERT_NEAR((g_grad - c_grad).norm(), 0.0, 1e-10);\n    ASSERT_NEAR((g_hess - c_hess).norm(), 0.0, 1e-10);\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/cost_function_to_functor_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/cost_function_to_functor.h\"\n\n#include <cstdint>\n#include <memory>\n#include \"ceres/dynamic_autodiff_cost_function.h\"\n#include \"ceres/dynamic_cost_function_to_functor.h\"\n#include \"ceres/autodiff_cost_function.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::vector;\nconst double kTolerance = 1e-18;\n\nstatic void ExpectCostFunctionsAreEqual(\n    const CostFunction& cost_function,\n    const CostFunction& actual_cost_function) {\n  EXPECT_EQ(cost_function.num_residuals(),\n            actual_cost_function.num_residuals());\n  const int num_residuals = cost_function.num_residuals();\n  const vector<int32_t>& parameter_block_sizes =\n      cost_function.parameter_block_sizes();\n  const vector<int32_t>& actual_parameter_block_sizes =\n      actual_cost_function.parameter_block_sizes();\n  EXPECT_EQ(parameter_block_sizes.size(),\n            actual_parameter_block_sizes.size());\n\n  int num_parameters = 0;\n  for (int i = 0; i < parameter_block_sizes.size(); ++i) {\n    EXPECT_EQ(parameter_block_sizes[i], actual_parameter_block_sizes[i]);\n    num_parameters += parameter_block_sizes[i];\n  }\n\n  std::unique_ptr<double[]> parameters(new double[num_parameters]);\n  for (int i = 0; i < num_parameters; ++i) {\n    parameters[i] = static_cast<double>(i) + 1.0;\n  }\n\n  std::unique_ptr<double[]> residuals(new double[num_residuals]);\n  std::unique_ptr<double[]> jacobians(new double[num_parameters * num_residuals]);\n\n  std::unique_ptr<double[]> actual_residuals(new double[num_residuals]);\n  std::unique_ptr<double[]> actual_jacobians\n      (new double[num_parameters * num_residuals]);\n\n  std::unique_ptr<double*[]> parameter_blocks(\n      new double*[parameter_block_sizes.size()]);\n  std::unique_ptr<double*[]> jacobian_blocks(\n      new double*[parameter_block_sizes.size()]);\n  std::unique_ptr<double*[]> actual_jacobian_blocks(\n      new double*[parameter_block_sizes.size()]);\n\n  num_parameters = 0;\n  for (int i = 0; i < parameter_block_sizes.size(); ++i) {\n    parameter_blocks[i] = parameters.get() + num_parameters;\n    jacobian_blocks[i] = jacobians.get() + num_parameters * num_residuals;\n    actual_jacobian_blocks[i] =\n        actual_jacobians.get() + num_parameters * num_residuals;\n    num_parameters += parameter_block_sizes[i];\n  }\n\n  EXPECT_TRUE(cost_function.Evaluate(parameter_blocks.get(),\n                                     residuals.get(), NULL));\n  EXPECT_TRUE(actual_cost_function.Evaluate(parameter_blocks.get(),\n                                            actual_residuals.get(), NULL));\n  for (int i = 0; i < num_residuals; ++i) {\n    EXPECT_NEAR(residuals[i], actual_residuals[i], kTolerance)\n        << \"residual id: \" << i;\n  }\n\n\n  EXPECT_TRUE(cost_function.Evaluate(parameter_blocks.get(),\n                                     residuals.get(),\n                                     jacobian_blocks.get()));\n  EXPECT_TRUE(actual_cost_function.Evaluate(parameter_blocks.get(),\n                                            actual_residuals.get(),\n                                            actual_jacobian_blocks.get()));\n  for (int i = 0; i < num_residuals; ++i) {\n    EXPECT_NEAR(residuals[i], actual_residuals[i], kTolerance)\n        << \"residual : \" << i;\n  }\n\n  for (int i = 0; i < num_residuals * num_parameters; ++i) {\n    EXPECT_NEAR(jacobians[i], actual_jacobians[i], kTolerance)\n        << \"jacobian : \" << i << \" \"\n        << jacobians[i] << \" \" << actual_jacobians[i];\n  }\n}\n\nstruct OneParameterBlockFunctor {\n public:\n  template <typename T>\n  bool operator()(const T* x1, T* residuals) const {\n    residuals[0] = x1[0] * x1[0];\n    residuals[1] = x1[1] * x1[1];\n    return true;\n  }\n};\n\nstruct TwoParameterBlockFunctor {\n public:\n  template <typename T>\n  bool operator()(const T* x1, const T* x2, T* residuals) const {\n    residuals[0] = x1[0] * x1[0]  + x2[0] * x2[0];\n    residuals[1] = x1[1] * x1[1]  + x2[1] * x2[1];\n    return true;\n  }\n};\n\nstruct ThreeParameterBlockFunctor {\n public:\n  template <typename T>\n  bool operator()(const T* x1, const T* x2, const T* x3, T* residuals) const {\n    residuals[0] = x1[0] * x1[0]  + x2[0] * x2[0] + x3[0] * x3[0];\n    residuals[1] = x1[1] * x1[1]  + x2[1] * x2[1] + x3[1] * x3[1];\n    return true;\n  }\n};\n\nstruct FourParameterBlockFunctor {\n public:\n  template <typename T>\n  bool operator()(const T* x1, const T* x2, const T* x3, const T* x4,\n                  T* residuals) const {\n    residuals[0] = x1[0] * x1[0]  + x2[0] * x2[0] + x3[0] * x3[0]\n        + x4[0] * x4[0];\n    residuals[1] = x1[1] * x1[1]  + x2[1] * x2[1] + x3[1] * x3[1]\n        + x4[1] * x4[1];\n    return true;\n  }\n};\n\nstruct FiveParameterBlockFunctor {\n public:\n  template <typename T>\n  bool operator()(const T* x1, const T* x2, const T* x3, const T* x4,\n                  const T* x5, T* residuals) const {\n    residuals[0] = x1[0] * x1[0]  + x2[0] * x2[0] + x3[0] * x3[0]\n        + x4[0] * x4[0] + x5[0] * x5[0];\n    residuals[1] = x1[1] * x1[1]  + x2[1] * x2[1] + x3[1] * x3[1]\n        + x4[1] * x4[1] + x5[1] * x5[1];\n    return true;\n  }\n};\n\nstruct SixParameterBlockFunctor {\n public:\n  template <typename T>\n  bool operator()(const T* x1, const T* x2, const T* x3, const T* x4,\n                  const T* x5, const T* x6,  T* residuals) const {\n    residuals[0] = x1[0] * x1[0]  + x2[0] * x2[0] + x3[0] * x3[0]\n        + x4[0] * x4[0] + x5[0] * x5[0] + x6[0] * x6[0];\n    residuals[1] = x1[1] * x1[1]  + x2[1] * x2[1] + x3[1] * x3[1]\n        + x4[1] * x4[1] + x5[1] * x5[1] + x6[1] * x6[1];\n    return true;\n  }\n};\n\nstruct SevenParameterBlockFunctor {\n public:\n  template <typename T>\n  bool operator()(const T* x1, const T* x2, const T* x3, const T* x4,\n                  const T* x5, const T* x6, const T* x7, T* residuals) const {\n    residuals[0] = x1[0] * x1[0]  + x2[0] * x2[0] + x3[0] * x3[0]\n        + x4[0] * x4[0] + x5[0] * x5[0] + x6[0] * x6[0] + x7[0] * x7[0];\n    residuals[1] = x1[1] * x1[1]  + x2[1] * x2[1] + x3[1] * x3[1]\n        + x4[1] * x4[1] + x5[1] * x5[1] + x6[1] * x6[1] + x7[1] * x7[1];\n    return true;\n  }\n};\n\nstruct EightParameterBlockFunctor {\n public:\n  template <typename T>\n  bool operator()(const T* x1, const T* x2, const T* x3, const T* x4,\n                  const T* x5, const T* x6, const T* x7, const T* x8,\n                  T* residuals) const {\n    residuals[0] = x1[0] * x1[0]  + x2[0] * x2[0] + x3[0] * x3[0]\n        + x4[0] * x4[0] + x5[0] * x5[0] + x6[0] * x6[0] + x7[0] * x7[0]\n        + x8[0] * x8[0];\n    residuals[1] = x1[1] * x1[1]  + x2[1] * x2[1] + x3[1] * x3[1]\n        + x4[1] * x4[1] + x5[1] * x5[1] + x6[1] * x6[1] + x7[1] * x7[1]\n        + x8[1] * x8[1];\n    return true;\n  }\n};\n\nstruct NineParameterBlockFunctor {\n public:\n  template <typename T>\n  bool operator()(const T* x1, const T* x2, const T* x3, const T* x4,\n                  const T* x5, const T* x6, const T* x7, const T* x8,\n                  const T* x9, T* residuals) const {\n    residuals[0] = x1[0] * x1[0]  + x2[0] * x2[0] + x3[0] * x3[0]\n        + x4[0] * x4[0] + x5[0] * x5[0] + x6[0] * x6[0] + x7[0] * x7[0]\n        + x8[0] * x8[0] + x9[0] * x9[0];\n    residuals[1] = x1[1] * x1[1]  + x2[1] * x2[1] + x3[1] * x3[1]\n        + x4[1] * x4[1] + x5[1] * x5[1] + x6[1] * x6[1] + x7[1] * x7[1]\n        + x8[1] * x8[1] + x9[1] * x9[1];\n    return true;\n  }\n};\n\nstruct TenParameterBlockFunctor {\n public:\n  template <typename T>\n  bool operator()(const T* x1, const T* x2, const T* x3, const T* x4,\n                  const T* x5, const T* x6, const T* x7, const T* x8,\n                  const T* x9, const T* x10, T* residuals) const {\n    residuals[0] = x1[0] * x1[0]  + x2[0] * x2[0] + x3[0] * x3[0]\n        + x4[0] * x4[0] + x5[0] * x5[0] + x6[0] * x6[0] + x7[0] * x7[0]\n        + x8[0] * x8[0] + x9[0] * x9[0] + x10[0] * x10[0];\n    residuals[1] = x1[1] * x1[1]  + x2[1] * x2[1] + x3[1] * x3[1]\n        + x4[1] * x4[1] + x5[1] * x5[1] + x6[1] * x6[1] + x7[1] * x7[1]\n        + x8[1] * x8[1] + x9[1] * x9[1] + x10[1] * x10[1];\n    return true;\n  }\n};\n\nclass DynamicTwoParameterBlockFunctor {\n public:\n  template <typename T>\n  bool operator()(T const* const* parameters, T* residuals) const {\n    for (int i = 0; i < 2; ++i) {\n      residuals[0] = parameters[i][0] * parameters[i][0];\n      residuals[1] = parameters[i][1] * parameters[i][1];\n    }\n    return true;\n  }\n};\n\n// Check that AutoDiff(Functor1) == AutoDiff(CostToFunctor(AutoDiff(Functor1)))\n#define TEST_BODY(Functor1)                                                    \\\n  TEST(CostFunctionToFunctor, Functor1) {                                      \\\n    typedef AutoDiffCostFunction<Functor1, 2, PARAMETER_BLOCK_SIZES>           \\\n        CostFunction1;                                                         \\\n    typedef CostFunctionToFunctor<2, PARAMETER_BLOCK_SIZES> FunctionToFunctor; \\\n    typedef AutoDiffCostFunction<FunctionToFunctor, 2, PARAMETER_BLOCK_SIZES>  \\\n        CostFunction2;                                                         \\\n                                                                               \\\n    std::unique_ptr<CostFunction> cost_function(new CostFunction2(             \\\n        new FunctionToFunctor(new CostFunction1(new Functor1))));              \\\n                                                                               \\\n    std::unique_ptr<CostFunction> actual_cost_function(                        \\\n        new CostFunction1(new Functor1));                                      \\\n    ExpectCostFunctionsAreEqual(*cost_function, *actual_cost_function);        \\\n  }\n\n#define PARAMETER_BLOCK_SIZES 2\nTEST_BODY(OneParameterBlockFunctor)\n#undef PARAMETER_BLOCK_SIZES\n\n#define PARAMETER_BLOCK_SIZES 2,2\nTEST_BODY(TwoParameterBlockFunctor)\n#undef PARAMETER_BLOCK_SIZES\n\n#define PARAMETER_BLOCK_SIZES 2,2,2\nTEST_BODY(ThreeParameterBlockFunctor)\n#undef PARAMETER_BLOCK_SIZES\n\n#define PARAMETER_BLOCK_SIZES 2,2,2,2\nTEST_BODY(FourParameterBlockFunctor)\n#undef PARAMETER_BLOCK_SIZES\n\n#define PARAMETER_BLOCK_SIZES 2,2,2,2,2\nTEST_BODY(FiveParameterBlockFunctor)\n#undef PARAMETER_BLOCK_SIZES\n\n#define PARAMETER_BLOCK_SIZES 2,2,2,2,2,2\nTEST_BODY(SixParameterBlockFunctor)\n#undef PARAMETER_BLOCK_SIZES\n\n#define PARAMETER_BLOCK_SIZES 2,2,2,2,2,2,2\nTEST_BODY(SevenParameterBlockFunctor)\n#undef PARAMETER_BLOCK_SIZES\n\n#define PARAMETER_BLOCK_SIZES 2,2,2,2,2,2,2,2\nTEST_BODY(EightParameterBlockFunctor)\n#undef PARAMETER_BLOCK_SIZES\n\n#define PARAMETER_BLOCK_SIZES 2,2,2,2,2,2,2,2,2\nTEST_BODY(NineParameterBlockFunctor)\n#undef PARAMETER_BLOCK_SIZES\n\n#define PARAMETER_BLOCK_SIZES 2,2,2,2,2,2,2,2,2,2\nTEST_BODY(TenParameterBlockFunctor)\n#undef PARAMETER_BLOCK_SIZES\n\n#undef TEST_BODY\n\nTEST(CostFunctionToFunctor, DynamicNumberOfResiduals) {\n  std::unique_ptr<CostFunction> cost_function(\n      new AutoDiffCostFunction<\n      CostFunctionToFunctor<ceres::DYNAMIC, 2, 2 >, ceres::DYNAMIC, 2, 2>(\n          new CostFunctionToFunctor<ceres::DYNAMIC, 2, 2 >(\n              new AutoDiffCostFunction<TwoParameterBlockFunctor, 2, 2, 2 >(\n                  new TwoParameterBlockFunctor)), 2));\n\n  std::unique_ptr<CostFunction> actual_cost_function(\n      new AutoDiffCostFunction<TwoParameterBlockFunctor, 2, 2, 2 >(\n          new TwoParameterBlockFunctor));\n  ExpectCostFunctionsAreEqual(*cost_function, *actual_cost_function);\n}\n\nTEST(CostFunctionToFunctor, DynamicCostFunctionToFunctor) {\n  DynamicAutoDiffCostFunction<DynamicTwoParameterBlockFunctor>*\n      actual_cost_function(\n      new DynamicAutoDiffCostFunction<DynamicTwoParameterBlockFunctor>(\n          new DynamicTwoParameterBlockFunctor));\n  actual_cost_function->AddParameterBlock(2);\n  actual_cost_function->AddParameterBlock(2);\n  actual_cost_function->SetNumResiduals(2);\n\n  DynamicAutoDiffCostFunction<DynamicCostFunctionToFunctor> cost_function(\n      new DynamicCostFunctionToFunctor(actual_cost_function));\n  cost_function.AddParameterBlock(2);\n  cost_function.AddParameterBlock(2);\n  cost_function.SetNumResiduals(2);\n\n  ExpectCostFunctionsAreEqual(cost_function, *actual_cost_function);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/covariance.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/covariance.h\"\n\n#include <utility>\n#include <vector>\n#include \"ceres/covariance_impl.h\"\n#include \"ceres/problem.h\"\n#include \"ceres/problem_impl.h\"\n\nnamespace ceres {\n\nusing std::make_pair;\nusing std::pair;\nusing std::vector;\n\nCovariance::Covariance(const Covariance::Options& options) {\n  impl_.reset(new internal::CovarianceImpl(options));\n}\n\nCovariance::~Covariance() {\n}\n\nbool Covariance::Compute(\n    const vector<pair<const double*, const double*>>& covariance_blocks,\n    Problem* problem) {\n  return impl_->Compute(covariance_blocks, problem->impl_.get());\n}\n\nbool Covariance::Compute(\n    const vector<const double*>& parameter_blocks,\n    Problem* problem) {\n  return impl_->Compute(parameter_blocks, problem->impl_.get());\n}\n\nbool Covariance::GetCovarianceBlock(const double* parameter_block1,\n                                    const double* parameter_block2,\n                                    double* covariance_block) const {\n  return impl_->GetCovarianceBlockInTangentOrAmbientSpace(parameter_block1,\n                                                          parameter_block2,\n                                                          true,  // ambient\n                                                          covariance_block);\n}\n\nbool Covariance::GetCovarianceBlockInTangentSpace(\n    const double* parameter_block1,\n    const double* parameter_block2,\n    double* covariance_block) const {\n  return impl_->GetCovarianceBlockInTangentOrAmbientSpace(parameter_block1,\n                                                          parameter_block2,\n                                                          false,  // tangent\n                                                          covariance_block);\n}\n\nbool Covariance::GetCovarianceMatrix(\n    const vector<const double*>& parameter_blocks,\n    double* covariance_matrix) const {\n  return impl_->GetCovarianceMatrixInTangentOrAmbientSpace(parameter_blocks,\n                                                           true,  // ambient\n                                                           covariance_matrix);\n}\n\nbool Covariance::GetCovarianceMatrixInTangentSpace(\n    const std::vector<const double *>& parameter_blocks,\n    double *covariance_matrix) const {\n  return impl_->GetCovarianceMatrixInTangentOrAmbientSpace(parameter_blocks,\n                                                           false,  // tangent\n                                                           covariance_matrix);\n}\n\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/covariance_impl.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/covariance_impl.h\"\n\n#include <algorithm>\n#include <cstdlib>\n#include <memory>\n#include <numeric>\n#include <sstream>\n#include <unordered_set>\n#include <utility>\n#include <vector>\n\n#include \"Eigen/SparseCore\"\n#include \"Eigen/SparseQR\"\n#include \"Eigen/SVD\"\n\n#include \"ceres/compressed_col_sparse_matrix_utils.h\"\n#include \"ceres/compressed_row_sparse_matrix.h\"\n#include \"ceres/covariance.h\"\n#include \"ceres/crs_matrix.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/map_util.h\"\n#include \"ceres/parallel_for.h\"\n#include \"ceres/parallel_utils.h\"\n#include \"ceres/parameter_block.h\"\n#include \"ceres/problem_impl.h\"\n#include \"ceres/residual_block.h\"\n#include \"ceres/suitesparse.h\"\n#include \"ceres/wall_time.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::make_pair;\nusing std::map;\nusing std::pair;\nusing std::sort;\nusing std::swap;\nusing std::vector;\n\ntypedef vector<pair<const double*, const double*>> CovarianceBlocks;\n\nCovarianceImpl::CovarianceImpl(const Covariance::Options& options)\n    : options_(options),\n      is_computed_(false),\n      is_valid_(false) {\n#ifdef CERES_NO_THREADS\n  if (options_.num_threads > 1) {\n    LOG(WARNING)\n        << \"No threading support is compiled into this binary; \"\n        << \"only options.num_threads = 1 is supported. Switching \"\n        << \"to single threaded mode.\";\n    options_.num_threads = 1;\n  }\n#endif\n\n  evaluate_options_.num_threads = options_.num_threads;\n  evaluate_options_.apply_loss_function = options_.apply_loss_function;\n}\n\nCovarianceImpl::~CovarianceImpl() {\n}\n\ntemplate <typename T> void CheckForDuplicates(vector<T> blocks) {\n  sort(blocks.begin(), blocks.end());\n  typename vector<T>::iterator it =\n      std::adjacent_find(blocks.begin(), blocks.end());\n  if (it != blocks.end()) {\n    // In case there are duplicates, we search for their location.\n    map<T, vector<int>> blocks_map;\n    for (int i = 0; i < blocks.size(); ++i) {\n      blocks_map[blocks[i]].push_back(i);\n    }\n\n    std::ostringstream duplicates;\n    while (it != blocks.end()) {\n      duplicates << \"(\";\n      for (int i = 0; i < blocks_map[*it].size() - 1; ++i) {\n        duplicates << blocks_map[*it][i] << \", \";\n      }\n      duplicates << blocks_map[*it].back() << \")\";\n      it = std::adjacent_find(it + 1, blocks.end());\n      if (it < blocks.end()) {\n        duplicates << \" and \";\n      }\n    }\n\n    LOG(FATAL) << \"Covariance::Compute called with duplicate blocks at \"\n               << \"indices \" << duplicates.str();\n  }\n}\n\nbool CovarianceImpl::Compute(const CovarianceBlocks& covariance_blocks,\n                             ProblemImpl* problem) {\n  CheckForDuplicates<pair<const double*, const double*>>(covariance_blocks);\n  problem_ = problem;\n  parameter_block_to_row_index_.clear();\n  covariance_matrix_.reset(NULL);\n  is_valid_ = (ComputeCovarianceSparsity(covariance_blocks, problem) &&\n               ComputeCovarianceValues());\n  is_computed_ = true;\n  return is_valid_;\n}\n\nbool CovarianceImpl::Compute(const vector<const double*>& parameter_blocks,\n                             ProblemImpl* problem) {\n  CheckForDuplicates<const double*>(parameter_blocks);\n  CovarianceBlocks covariance_blocks;\n  for (int i = 0; i < parameter_blocks.size(); ++i) {\n    for (int j = i; j < parameter_blocks.size(); ++j) {\n      covariance_blocks.push_back(make_pair(parameter_blocks[i],\n                                            parameter_blocks[j]));\n    }\n  }\n\n  return Compute(covariance_blocks, problem);\n}\n\nbool CovarianceImpl::GetCovarianceBlockInTangentOrAmbientSpace(\n    const double* original_parameter_block1,\n    const double* original_parameter_block2,\n    bool lift_covariance_to_ambient_space,\n    double* covariance_block) const {\n  CHECK(is_computed_)\n      << \"Covariance::GetCovarianceBlock called before Covariance::Compute\";\n  CHECK(is_valid_)\n      << \"Covariance::GetCovarianceBlock called when Covariance::Compute \"\n      << \"returned false.\";\n\n  // If either of the two parameter blocks is constant, then the\n  // covariance block is also zero.\n  if (constant_parameter_blocks_.count(original_parameter_block1) > 0 ||\n      constant_parameter_blocks_.count(original_parameter_block2) > 0) {\n    const ProblemImpl::ParameterMap& parameter_map = problem_->parameter_map();\n    ParameterBlock* block1 =\n        FindOrDie(parameter_map,\n                  const_cast<double*>(original_parameter_block1));\n\n    ParameterBlock* block2 =\n        FindOrDie(parameter_map,\n                  const_cast<double*>(original_parameter_block2));\n\n    const int block1_size = block1->Size();\n    const int block2_size = block2->Size();\n    const int block1_local_size = block1->LocalSize();\n    const int block2_local_size = block2->LocalSize();\n    if (!lift_covariance_to_ambient_space) {\n      MatrixRef(covariance_block, block1_local_size, block2_local_size)\n          .setZero();\n    } else {\n      MatrixRef(covariance_block, block1_size, block2_size).setZero();\n    }\n    return true;\n  }\n\n  const double* parameter_block1 = original_parameter_block1;\n  const double* parameter_block2 = original_parameter_block2;\n  const bool transpose = parameter_block1 > parameter_block2;\n  if (transpose) {\n    swap(parameter_block1, parameter_block2);\n  }\n\n  // Find where in the covariance matrix the block is located.\n  const int row_begin =\n      FindOrDie(parameter_block_to_row_index_, parameter_block1);\n  const int col_begin =\n      FindOrDie(parameter_block_to_row_index_, parameter_block2);\n  const int* rows = covariance_matrix_->rows();\n  const int* cols = covariance_matrix_->cols();\n  const int row_size = rows[row_begin + 1] - rows[row_begin];\n  const int* cols_begin = cols + rows[row_begin];\n\n  // The only part that requires work is walking the compressed column\n  // vector to determine where the set of columns correspnding to the\n  // covariance block begin.\n  int offset = 0;\n  while (cols_begin[offset] != col_begin && offset < row_size) {\n    ++offset;\n  }\n\n  if (offset == row_size) {\n    LOG(ERROR) << \"Unable to find covariance block for \"\n               << original_parameter_block1 << \" \"\n               << original_parameter_block2;\n    return false;\n  }\n\n  const ProblemImpl::ParameterMap& parameter_map = problem_->parameter_map();\n  ParameterBlock* block1 =\n      FindOrDie(parameter_map, const_cast<double*>(parameter_block1));\n  ParameterBlock* block2 =\n      FindOrDie(parameter_map, const_cast<double*>(parameter_block2));\n  const LocalParameterization* local_param1 = block1->local_parameterization();\n  const LocalParameterization* local_param2 = block2->local_parameterization();\n  const int block1_size = block1->Size();\n  const int block1_local_size = block1->LocalSize();\n  const int block2_size = block2->Size();\n  const int block2_local_size = block2->LocalSize();\n\n  ConstMatrixRef cov(covariance_matrix_->values() + rows[row_begin],\n                     block1_size,\n                     row_size);\n\n  // Fast path when there are no local parameterizations or if the\n  // user does not want it lifted to the ambient space.\n  if ((local_param1 == NULL && local_param2 == NULL) ||\n      !lift_covariance_to_ambient_space) {\n    if (transpose) {\n      MatrixRef(covariance_block, block2_local_size, block1_local_size) =\n          cov.block(0, offset, block1_local_size,\n                    block2_local_size).transpose();\n    } else {\n      MatrixRef(covariance_block, block1_local_size, block2_local_size) =\n          cov.block(0, offset, block1_local_size, block2_local_size);\n    }\n    return true;\n  }\n\n  // If local parameterizations are used then the covariance that has\n  // been computed is in the tangent space and it needs to be lifted\n  // back to the ambient space.\n  //\n  // This is given by the formula\n  //\n  //  C'_12 = J_1 C_12 J_2'\n  //\n  // Where C_12 is the local tangent space covariance for parameter\n  // blocks 1 and 2. J_1 and J_2 are respectively the local to global\n  // jacobians for parameter blocks 1 and 2.\n  //\n  // See Result 5.11 on page 142 of Hartley & Zisserman (2nd Edition)\n  // for a proof.\n  //\n  // TODO(sameeragarwal): Add caching of local parameterization, so\n  // that they are computed just once per parameter block.\n  Matrix block1_jacobian(block1_size, block1_local_size);\n  if (local_param1 == NULL) {\n    block1_jacobian.setIdentity();\n  } else {\n    local_param1->ComputeJacobian(parameter_block1, block1_jacobian.data());\n  }\n\n  Matrix block2_jacobian(block2_size, block2_local_size);\n  // Fast path if the user is requesting a diagonal block.\n  if (parameter_block1 == parameter_block2) {\n    block2_jacobian = block1_jacobian;\n  } else {\n    if (local_param2 == NULL) {\n      block2_jacobian.setIdentity();\n    } else {\n      local_param2->ComputeJacobian(parameter_block2, block2_jacobian.data());\n    }\n  }\n\n  if (transpose) {\n    MatrixRef(covariance_block, block2_size, block1_size) =\n        block2_jacobian *\n        cov.block(0, offset, block1_local_size, block2_local_size).transpose() *\n        block1_jacobian.transpose();\n  } else {\n    MatrixRef(covariance_block, block1_size, block2_size) =\n        block1_jacobian *\n        cov.block(0, offset, block1_local_size, block2_local_size) *\n        block2_jacobian.transpose();\n  }\n\n  return true;\n}\n\nbool CovarianceImpl::GetCovarianceMatrixInTangentOrAmbientSpace(\n    const vector<const double*>& parameters,\n    bool lift_covariance_to_ambient_space,\n    double* covariance_matrix) const {\n  CHECK(is_computed_)\n      << \"Covariance::GetCovarianceMatrix called before Covariance::Compute\";\n  CHECK(is_valid_)\n      << \"Covariance::GetCovarianceMatrix called when Covariance::Compute \"\n      << \"returned false.\";\n\n  const ProblemImpl::ParameterMap& parameter_map = problem_->parameter_map();\n  // For OpenMP compatibility we need to define these vectors in advance\n  const int num_parameters = parameters.size();\n  vector<int> parameter_sizes;\n  vector<int> cum_parameter_size;\n  parameter_sizes.reserve(num_parameters);\n  cum_parameter_size.resize(num_parameters + 1);\n  cum_parameter_size[0] = 0;\n  for (int i = 0; i < num_parameters; ++i) {\n    ParameterBlock* block =\n        FindOrDie(parameter_map, const_cast<double*>(parameters[i]));\n    if (lift_covariance_to_ambient_space) {\n      parameter_sizes.push_back(block->Size());\n    } else {\n      parameter_sizes.push_back(block->LocalSize());\n    }\n  }\n  std::partial_sum(parameter_sizes.begin(), parameter_sizes.end(),\n                   cum_parameter_size.begin() + 1);\n  const int max_covariance_block_size =\n      *std::max_element(parameter_sizes.begin(), parameter_sizes.end());\n  const int covariance_size = cum_parameter_size.back();\n\n  // Assemble the blocks in the covariance matrix.\n  MatrixRef covariance(covariance_matrix, covariance_size, covariance_size);\n  const int num_threads = options_.num_threads;\n  std::unique_ptr<double[]> workspace(\n      new double[num_threads * max_covariance_block_size *\n                 max_covariance_block_size]);\n\n  bool success = true;\n\n  // Technically the following code is a double nested loop where\n  // i = 1:n, j = i:n.\n  int iteration_count = (num_parameters * (num_parameters + 1)) / 2;\n  problem_->context()->EnsureMinimumThreads(num_threads);\n  ParallelFor(\n      problem_->context(),\n      0,\n      iteration_count,\n      num_threads,\n      [&](int thread_id, int k) {\n        int i, j;\n        LinearIndexToUpperTriangularIndex(k, num_parameters, &i, &j);\n\n        int covariance_row_idx = cum_parameter_size[i];\n        int covariance_col_idx = cum_parameter_size[j];\n        int size_i = parameter_sizes[i];\n        int size_j = parameter_sizes[j];\n        double* covariance_block =\n            workspace.get() + thread_id * max_covariance_block_size *\n            max_covariance_block_size;\n        if (!GetCovarianceBlockInTangentOrAmbientSpace(\n                parameters[i], parameters[j],\n                lift_covariance_to_ambient_space, covariance_block)) {\n          success = false;\n        }\n\n        covariance.block(covariance_row_idx, covariance_col_idx, size_i,\n                         size_j) = MatrixRef(covariance_block, size_i, size_j);\n\n        if (i != j) {\n          covariance.block(covariance_col_idx, covariance_row_idx,\n                           size_j, size_i) =\n              MatrixRef(covariance_block, size_i, size_j).transpose();\n        }\n      });\n  return success;\n}\n\n// Determine the sparsity pattern of the covariance matrix based on\n// the block pairs requested by the user.\nbool CovarianceImpl::ComputeCovarianceSparsity(\n    const CovarianceBlocks&  original_covariance_blocks,\n    ProblemImpl* problem) {\n  EventLogger event_logger(\"CovarianceImpl::ComputeCovarianceSparsity\");\n\n  // Determine an ordering for the parameter block, by sorting the\n  // parameter blocks by their pointers.\n  vector<double*> all_parameter_blocks;\n  problem->GetParameterBlocks(&all_parameter_blocks);\n  const ProblemImpl::ParameterMap& parameter_map = problem->parameter_map();\n  std::unordered_set<ParameterBlock*> parameter_blocks_in_use;\n  vector<ResidualBlock*> residual_blocks;\n  problem->GetResidualBlocks(&residual_blocks);\n\n  for (int i = 0; i < residual_blocks.size(); ++i) {\n    ResidualBlock* residual_block = residual_blocks[i];\n    parameter_blocks_in_use.insert(residual_block->parameter_blocks(),\n                                   residual_block->parameter_blocks() +\n                                   residual_block->NumParameterBlocks());\n  }\n\n  constant_parameter_blocks_.clear();\n  vector<double*>& active_parameter_blocks =\n      evaluate_options_.parameter_blocks;\n  active_parameter_blocks.clear();\n  for (int i = 0; i < all_parameter_blocks.size(); ++i) {\n    double* parameter_block = all_parameter_blocks[i];\n    ParameterBlock* block = FindOrDie(parameter_map, parameter_block);\n    if (!block->IsConstant() && (parameter_blocks_in_use.count(block) > 0)) {\n      active_parameter_blocks.push_back(parameter_block);\n    } else {\n      constant_parameter_blocks_.insert(parameter_block);\n    }\n  }\n\n  std::sort(active_parameter_blocks.begin(), active_parameter_blocks.end());\n\n  // Compute the number of rows.  Map each parameter block to the\n  // first row corresponding to it in the covariance matrix using the\n  // ordering of parameter blocks just constructed.\n  int num_rows = 0;\n  parameter_block_to_row_index_.clear();\n  for (int i = 0; i < active_parameter_blocks.size(); ++i) {\n    double* parameter_block = active_parameter_blocks[i];\n    const int parameter_block_size =\n        problem->ParameterBlockLocalSize(parameter_block);\n    parameter_block_to_row_index_[parameter_block] = num_rows;\n    num_rows += parameter_block_size;\n  }\n\n  // Compute the number of non-zeros in the covariance matrix.  Along\n  // the way flip any covariance blocks which are in the lower\n  // triangular part of the matrix.\n  int num_nonzeros = 0;\n  CovarianceBlocks covariance_blocks;\n  for (int i = 0; i <  original_covariance_blocks.size(); ++i) {\n    const pair<const double*, const double*>& block_pair =\n        original_covariance_blocks[i];\n    if (constant_parameter_blocks_.count(block_pair.first) > 0 ||\n        constant_parameter_blocks_.count(block_pair.second) > 0) {\n      continue;\n    }\n\n    int index1 = FindOrDie(parameter_block_to_row_index_, block_pair.first);\n    int index2 = FindOrDie(parameter_block_to_row_index_, block_pair.second);\n    const int size1 = problem->ParameterBlockLocalSize(block_pair.first);\n    const int size2 = problem->ParameterBlockLocalSize(block_pair.second);\n    num_nonzeros += size1 * size2;\n\n    // Make sure we are constructing a block upper triangular matrix.\n    if (index1 > index2) {\n      covariance_blocks.push_back(make_pair(block_pair.second,\n                                            block_pair.first));\n    } else {\n      covariance_blocks.push_back(block_pair);\n    }\n  }\n\n  if (covariance_blocks.size() == 0) {\n    VLOG(2) << \"No non-zero covariance blocks found\";\n    covariance_matrix_.reset(NULL);\n    return true;\n  }\n\n  // Sort the block pairs. As a consequence we get the covariance\n  // blocks as they will occur in the CompressedRowSparseMatrix that\n  // will store the covariance.\n  sort(covariance_blocks.begin(), covariance_blocks.end());\n\n  // Fill the sparsity pattern of the covariance matrix.\n  covariance_matrix_.reset(\n      new CompressedRowSparseMatrix(num_rows, num_rows, num_nonzeros));\n\n  int* rows = covariance_matrix_->mutable_rows();\n  int* cols = covariance_matrix_->mutable_cols();\n\n  // Iterate over parameter blocks and in turn over the rows of the\n  // covariance matrix. For each parameter block, look in the upper\n  // triangular part of the covariance matrix to see if there are any\n  // blocks requested by the user. If this is the case then fill out a\n  // set of compressed rows corresponding to this parameter block.\n  //\n  // The key thing that makes this loop work is the fact that the\n  // row/columns of the covariance matrix are ordered by the pointer\n  // values of the parameter blocks. Thus iterating over the keys of\n  // parameter_block_to_row_index_ corresponds to iterating over the\n  // rows of the covariance matrix in order.\n  int i = 0;  // index into covariance_blocks.\n  int cursor = 0;  // index into the covariance matrix.\n  for (const auto& entry : parameter_block_to_row_index_) {\n    const double* row_block =  entry.first;\n    const int row_block_size = problem->ParameterBlockLocalSize(row_block);\n    int row_begin = entry.second;\n\n    // Iterate over the covariance blocks contained in this row block\n    // and count the number of columns in this row block.\n    int num_col_blocks = 0;\n    int num_columns = 0;\n    for (int j = i; j < covariance_blocks.size(); ++j, ++num_col_blocks) {\n      const pair<const double*, const double*>& block_pair =\n          covariance_blocks[j];\n      if (block_pair.first != row_block) {\n        break;\n      }\n      num_columns += problem->ParameterBlockLocalSize(block_pair.second);\n    }\n\n    // Fill out all the compressed rows for this parameter block.\n    for (int r = 0; r < row_block_size; ++r) {\n      rows[row_begin + r] = cursor;\n      for (int c = 0; c < num_col_blocks; ++c) {\n        const double* col_block = covariance_blocks[i + c].second;\n        const int col_block_size = problem->ParameterBlockLocalSize(col_block);\n        int col_begin = FindOrDie(parameter_block_to_row_index_, col_block);\n        for (int k = 0; k < col_block_size; ++k) {\n          cols[cursor++] = col_begin++;\n        }\n      }\n    }\n\n    i+= num_col_blocks;\n  }\n\n  rows[num_rows] = cursor;\n  return true;\n}\n\nbool CovarianceImpl::ComputeCovarianceValues() {\n  if (options_.algorithm_type == DENSE_SVD) {\n    return ComputeCovarianceValuesUsingDenseSVD();\n  }\n\n  if (options_.algorithm_type == SPARSE_QR) {\n    if (options_.sparse_linear_algebra_library_type == EIGEN_SPARSE) {\n      return ComputeCovarianceValuesUsingEigenSparseQR();\n    }\n\n    if (options_.sparse_linear_algebra_library_type == SUITE_SPARSE) {\n#if !defined(CERES_NO_SUITESPARSE)\n      return ComputeCovarianceValuesUsingSuiteSparseQR();\n#else\n      LOG(ERROR) << \"SuiteSparse is required to use the SPARSE_QR algorithm \"\n                 << \"with \"\n                 << \"Covariance::Options::sparse_linear_algebra_library_type \"\n                 << \"= SUITE_SPARSE.\";\n      return false;\n#endif\n    }\n\n    LOG(ERROR) << \"Unsupported \"\n               << \"Covariance::Options::sparse_linear_algebra_library_type \"\n               << \"= \"\n               << SparseLinearAlgebraLibraryTypeToString(\n                      options_.sparse_linear_algebra_library_type);\n    return false;\n  }\n\n  LOG(ERROR) << \"Unsupported Covariance::Options::algorithm_type = \"\n             << CovarianceAlgorithmTypeToString(options_.algorithm_type);\n  return false;\n}\n\nbool CovarianceImpl::ComputeCovarianceValuesUsingSuiteSparseQR() {\n  EventLogger event_logger(\n      \"CovarianceImpl::ComputeCovarianceValuesUsingSparseQR\");\n\n#ifndef CERES_NO_SUITESPARSE\n  if (covariance_matrix_.get() == NULL) {\n    // Nothing to do, all zeros covariance matrix.\n    return true;\n  }\n\n  CRSMatrix jacobian;\n  problem_->Evaluate(evaluate_options_, NULL, NULL, NULL, &jacobian);\n  event_logger.AddEvent(\"Evaluate\");\n\n  // Construct a compressed column form of the Jacobian.\n  const int num_rows = jacobian.num_rows;\n  const int num_cols = jacobian.num_cols;\n  const int num_nonzeros = jacobian.values.size();\n\n  vector<SuiteSparse_long> transpose_rows(num_cols + 1, 0);\n  vector<SuiteSparse_long> transpose_cols(num_nonzeros, 0);\n  vector<double> transpose_values(num_nonzeros, 0);\n\n  for (int idx = 0; idx < num_nonzeros; ++idx) {\n    transpose_rows[jacobian.cols[idx] + 1] += 1;\n  }\n\n  for (int i = 1; i < transpose_rows.size(); ++i) {\n    transpose_rows[i] += transpose_rows[i - 1];\n  }\n\n  for (int r = 0; r < num_rows; ++r) {\n    for (int idx = jacobian.rows[r]; idx < jacobian.rows[r + 1]; ++idx) {\n      const int c = jacobian.cols[idx];\n      const int transpose_idx = transpose_rows[c];\n      transpose_cols[transpose_idx] = r;\n      transpose_values[transpose_idx] = jacobian.values[idx];\n      ++transpose_rows[c];\n    }\n  }\n\n  for (int i = transpose_rows.size() - 1; i > 0 ; --i) {\n    transpose_rows[i] = transpose_rows[i - 1];\n  }\n  transpose_rows[0] = 0;\n\n  cholmod_sparse cholmod_jacobian;\n  cholmod_jacobian.nrow = num_rows;\n  cholmod_jacobian.ncol = num_cols;\n  cholmod_jacobian.nzmax = num_nonzeros;\n  cholmod_jacobian.nz = NULL;\n  cholmod_jacobian.p = reinterpret_cast<void*>(&transpose_rows[0]);\n  cholmod_jacobian.i = reinterpret_cast<void*>(&transpose_cols[0]);\n  cholmod_jacobian.x = reinterpret_cast<void*>(&transpose_values[0]);\n  cholmod_jacobian.z = NULL;\n  cholmod_jacobian.stype = 0;  // Matrix is not symmetric.\n  cholmod_jacobian.itype = CHOLMOD_LONG;\n  cholmod_jacobian.xtype = CHOLMOD_REAL;\n  cholmod_jacobian.dtype = CHOLMOD_DOUBLE;\n  cholmod_jacobian.sorted = 1;\n  cholmod_jacobian.packed = 1;\n\n  cholmod_common cc;\n  cholmod_l_start(&cc);\n\n  cholmod_sparse* R = NULL;\n  SuiteSparse_long* permutation = NULL;\n\n  // Compute a Q-less QR factorization of the Jacobian. Since we are\n  // only interested in inverting J'J = R'R, we do not need Q. This\n  // saves memory and gives us R as a permuted compressed column\n  // sparse matrix.\n  //\n  // TODO(sameeragarwal): Currently the symbolic factorization and the\n  // numeric factorization is done at the same time, and this does not\n  // explicitly account for the block column and row structure in the\n  // matrix. When using AMD, we have observed in the past that\n  // computing the ordering with the block matrix is significantly\n  // more efficient, both in runtime as well as the quality of\n  // ordering computed. So, it maybe worth doing that analysis\n  // separately.\n  const SuiteSparse_long rank =\n      SuiteSparseQR<double>(SPQR_ORDERING_BESTAMD,\n                            SPQR_DEFAULT_TOL,\n                            cholmod_jacobian.ncol,\n                            &cholmod_jacobian,\n                            &R,\n                            &permutation,\n                            &cc);\n  event_logger.AddEvent(\"Numeric Factorization\");\n  if (R == nullptr) {\n    LOG(ERROR) << \"Something is wrong. SuiteSparseQR returned R = nullptr.\";\n    free(permutation);\n    cholmod_l_finish(&cc);\n    return false;\n  }\n\n  if (rank < cholmod_jacobian.ncol) {\n    LOG(ERROR) << \"Jacobian matrix is rank deficient. \"\n               << \"Number of columns: \" << cholmod_jacobian.ncol\n               << \" rank: \" << rank;\n    free(permutation);\n    cholmod_l_free_sparse(&R, &cc);\n    cholmod_l_finish(&cc);\n    return false;\n  }\n\n  vector<int> inverse_permutation(num_cols);\n  if (permutation) {\n    for (SuiteSparse_long i = 0; i < num_cols; ++i) {\n      inverse_permutation[permutation[i]] = i;\n    }\n  } else {\n    for (SuiteSparse_long i = 0; i < num_cols; ++i) {\n      inverse_permutation[i] = i;\n    }\n  }\n\n  const int* rows = covariance_matrix_->rows();\n  const int* cols = covariance_matrix_->cols();\n  double* values = covariance_matrix_->mutable_values();\n\n  // The following loop exploits the fact that the i^th column of A^{-1}\n  // is given by the solution to the linear system\n  //\n  //  A x = e_i\n  //\n  // where e_i is a vector with e(i) = 1 and all other entries zero.\n  //\n  // Since the covariance matrix is symmetric, the i^th row and column\n  // are equal.\n  const int num_threads = options_.num_threads;\n  std::unique_ptr<double[]> workspace(new double[num_threads * num_cols]);\n\n  problem_->context()->EnsureMinimumThreads(num_threads);\n  ParallelFor(\n      problem_->context(),\n      0,\n      num_cols,\n      num_threads,\n      [&](int thread_id, int r) {\n        const int row_begin = rows[r];\n        const int row_end = rows[r + 1];\n        if (row_end != row_begin) {\n          double* solution = workspace.get() + thread_id * num_cols;\n          SolveRTRWithSparseRHS<SuiteSparse_long>(\n              num_cols, static_cast<SuiteSparse_long*>(R->i),\n              static_cast<SuiteSparse_long*>(R->p), static_cast<double*>(R->x),\n              inverse_permutation[r], solution);\n          for (int idx = row_begin; idx < row_end; ++idx) {\n            const int c = cols[idx];\n            values[idx] = solution[inverse_permutation[c]];\n          }\n        }\n      });\n\n  free(permutation);\n  cholmod_l_free_sparse(&R, &cc);\n  cholmod_l_finish(&cc);\n  event_logger.AddEvent(\"Inversion\");\n  return true;\n\n#else  // CERES_NO_SUITESPARSE\n\n  return false;\n\n#endif  // CERES_NO_SUITESPARSE\n}\n\nbool CovarianceImpl::ComputeCovarianceValuesUsingDenseSVD() {\n  EventLogger event_logger(\n      \"CovarianceImpl::ComputeCovarianceValuesUsingDenseSVD\");\n  if (covariance_matrix_.get() == NULL) {\n    // Nothing to do, all zeros covariance matrix.\n    return true;\n  }\n\n  CRSMatrix jacobian;\n  problem_->Evaluate(evaluate_options_, NULL, NULL, NULL, &jacobian);\n  event_logger.AddEvent(\"Evaluate\");\n\n  Matrix dense_jacobian(jacobian.num_rows, jacobian.num_cols);\n  dense_jacobian.setZero();\n  for (int r = 0; r < jacobian.num_rows; ++r) {\n    for (int idx = jacobian.rows[r]; idx < jacobian.rows[r + 1]; ++idx) {\n      const int c = jacobian.cols[idx];\n      dense_jacobian(r, c) = jacobian.values[idx];\n    }\n  }\n  event_logger.AddEvent(\"ConvertToDenseMatrix\");\n\n  Eigen::BDCSVD<Matrix> svd(dense_jacobian,\n                            Eigen::ComputeThinU | Eigen::ComputeThinV);\n\n  event_logger.AddEvent(\"SingularValueDecomposition\");\n\n  const Vector singular_values = svd.singularValues();\n  const int num_singular_values = singular_values.rows();\n  Vector inverse_squared_singular_values(num_singular_values);\n  inverse_squared_singular_values.setZero();\n\n  const double max_singular_value = singular_values[0];\n  const double min_singular_value_ratio =\n      sqrt(options_.min_reciprocal_condition_number);\n\n  const bool automatic_truncation = (options_.null_space_rank < 0);\n  const int max_rank = std::min(num_singular_values,\n                                num_singular_values - options_.null_space_rank);\n\n  // Compute the squared inverse of the singular values. Truncate the\n  // computation based on min_singular_value_ratio and\n  // null_space_rank. When either of these two quantities are active,\n  // the resulting covariance matrix is a Moore-Penrose inverse\n  // instead of a regular inverse.\n  for (int i = 0; i < max_rank; ++i) {\n    const double singular_value_ratio = singular_values[i] / max_singular_value;\n    if (singular_value_ratio < min_singular_value_ratio) {\n      // Since the singular values are in decreasing order, if\n      // automatic truncation is enabled, then from this point on\n      // all values will fail the ratio test and there is nothing to\n      // do in this loop.\n      if (automatic_truncation) {\n        break;\n      } else {\n        LOG(ERROR) << \"Error: Covariance matrix is near rank deficient \"\n                   << \"and the user did not specify a non-zero\"\n                   << \"Covariance::Options::null_space_rank \"\n                   << \"to enable the computation of a Pseudo-Inverse. \"\n                   << \"Reciprocal condition number: \"\n                   << singular_value_ratio * singular_value_ratio << \" \"\n                   << \"min_reciprocal_condition_number: \"\n                   << options_.min_reciprocal_condition_number;\n        return false;\n      }\n    }\n\n    inverse_squared_singular_values[i] =\n        1.0 / (singular_values[i] * singular_values[i]);\n  }\n\n  Matrix dense_covariance =\n      svd.matrixV() *\n      inverse_squared_singular_values.asDiagonal() *\n      svd.matrixV().transpose();\n  event_logger.AddEvent(\"PseudoInverse\");\n\n  const int num_rows = covariance_matrix_->num_rows();\n  const int* rows = covariance_matrix_->rows();\n  const int* cols = covariance_matrix_->cols();\n  double* values = covariance_matrix_->mutable_values();\n\n  for (int r = 0; r < num_rows; ++r) {\n    for (int idx = rows[r]; idx < rows[r + 1]; ++idx) {\n      const int c = cols[idx];\n      values[idx] = dense_covariance(r, c);\n    }\n  }\n  event_logger.AddEvent(\"CopyToCovarianceMatrix\");\n  return true;\n}\n\nbool CovarianceImpl::ComputeCovarianceValuesUsingEigenSparseQR() {\n  EventLogger event_logger(\n      \"CovarianceImpl::ComputeCovarianceValuesUsingEigenSparseQR\");\n  if (covariance_matrix_.get() == NULL) {\n    // Nothing to do, all zeros covariance matrix.\n    return true;\n  }\n\n  CRSMatrix jacobian;\n  problem_->Evaluate(evaluate_options_, NULL, NULL, NULL, &jacobian);\n  event_logger.AddEvent(\"Evaluate\");\n\n  typedef Eigen::SparseMatrix<double, Eigen::ColMajor> EigenSparseMatrix;\n\n  // Convert the matrix to column major order as required by SparseQR.\n  EigenSparseMatrix sparse_jacobian =\n      Eigen::MappedSparseMatrix<double, Eigen::RowMajor>(\n          jacobian.num_rows, jacobian.num_cols,\n          static_cast<int>(jacobian.values.size()),\n          jacobian.rows.data(), jacobian.cols.data(), jacobian.values.data());\n  event_logger.AddEvent(\"ConvertToSparseMatrix\");\n\n  Eigen::SparseQR<EigenSparseMatrix, Eigen::COLAMDOrdering<int>>\n      qr_solver(sparse_jacobian);\n  event_logger.AddEvent(\"QRDecomposition\");\n\n  if (qr_solver.info() != Eigen::Success) {\n    LOG(ERROR) << \"Eigen::SparseQR decomposition failed.\";\n    return false;\n  }\n\n  if (qr_solver.rank() < jacobian.num_cols) {\n    LOG(ERROR) << \"Jacobian matrix is rank deficient. \"\n               << \"Number of columns: \" << jacobian.num_cols\n               << \" rank: \" << qr_solver.rank();\n    return false;\n  }\n\n  const int* rows = covariance_matrix_->rows();\n  const int* cols = covariance_matrix_->cols();\n  double* values = covariance_matrix_->mutable_values();\n\n  // Compute the inverse column permutation used by QR factorization.\n  Eigen::PermutationMatrix<Eigen::Dynamic, Eigen::Dynamic> inverse_permutation =\n      qr_solver.colsPermutation().inverse();\n\n  // The following loop exploits the fact that the i^th column of A^{-1}\n  // is given by the solution to the linear system\n  //\n  //  A x = e_i\n  //\n  // where e_i is a vector with e(i) = 1 and all other entries zero.\n  //\n  // Since the covariance matrix is symmetric, the i^th row and column\n  // are equal.\n  const int num_cols = jacobian.num_cols;\n  const int num_threads = options_.num_threads;\n  std::unique_ptr<double[]> workspace(new double[num_threads * num_cols]);\n\n  problem_->context()->EnsureMinimumThreads(num_threads);\n  ParallelFor(\n      problem_->context(),\n      0,\n      num_cols,\n      num_threads,\n      [&](int thread_id, int r) {\n        const int row_begin = rows[r];\n        const int row_end = rows[r + 1];\n        if (row_end != row_begin) {\n          double* solution = workspace.get() + thread_id * num_cols;\n          SolveRTRWithSparseRHS<int>(\n              num_cols,\n              qr_solver.matrixR().innerIndexPtr(),\n              qr_solver.matrixR().outerIndexPtr(),\n              &qr_solver.matrixR().data().value(0),\n              inverse_permutation.indices().coeff(r),\n              solution);\n\n          // Assign the values of the computed covariance using the\n          // inverse permutation used in the QR factorization.\n          for (int idx = row_begin; idx < row_end; ++idx) {\n            const int c = cols[idx];\n            values[idx] = solution[inverse_permutation.indices().coeff(c)];\n          }\n        }\n      });\n\n  event_logger.AddEvent(\"Inverse\");\n\n  return true;\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/covariance_impl.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_COVARIANCE_IMPL_H_\n#define CERES_INTERNAL_COVARIANCE_IMPL_H_\n\n#include <map>\n#include <memory>\n#include <set>\n#include <utility>\n#include <vector>\n#include \"ceres/covariance.h\"\n#include \"ceres/problem_impl.h\"\n#include \"ceres/suitesparse.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass CompressedRowSparseMatrix;\n\nclass CovarianceImpl {\n public:\n  explicit CovarianceImpl(const Covariance::Options& options);\n  ~CovarianceImpl();\n\n  bool Compute(\n      const std::vector<std::pair<const double*,\n                                  const double*>>& covariance_blocks,\n      ProblemImpl* problem);\n\n  bool Compute(\n      const std::vector<const double*>& parameter_blocks,\n      ProblemImpl* problem);\n\n  bool GetCovarianceBlockInTangentOrAmbientSpace(\n      const double* parameter_block1,\n      const double* parameter_block2,\n      bool lift_covariance_to_ambient_space,\n      double* covariance_block) const;\n\n  bool GetCovarianceMatrixInTangentOrAmbientSpace(\n      const std::vector<const double*>& parameters,\n      bool lift_covariance_to_ambient_space,\n      double *covariance_matrix) const;\n\n  bool ComputeCovarianceSparsity(\n      const std::vector<std::pair<const double*,\n                                  const double*>>& covariance_blocks,\n      ProblemImpl* problem);\n\n  bool ComputeCovarianceValues();\n  bool ComputeCovarianceValuesUsingDenseSVD();\n  bool ComputeCovarianceValuesUsingSuiteSparseQR();\n  bool ComputeCovarianceValuesUsingEigenSparseQR();\n\n  const CompressedRowSparseMatrix* covariance_matrix() const {\n    return covariance_matrix_.get();\n  }\n\n private:\n  ProblemImpl* problem_;\n  Covariance::Options options_;\n  Problem::EvaluateOptions evaluate_options_;\n  bool is_computed_;\n  bool is_valid_;\n  std::map<const double*, int> parameter_block_to_row_index_;\n  std::set<const double*> constant_parameter_blocks_;\n  std::unique_ptr<CompressedRowSparseMatrix> covariance_matrix_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_COVARIANCE_IMPL_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/covariance_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/covariance.h\"\n\n#include <algorithm>\n#include <cstdint>\n#include <cmath>\n#include <map>\n#include <memory>\n#include <utility>\n\n#include \"ceres/autodiff_cost_function.h\"\n#include \"ceres/compressed_row_sparse_matrix.h\"\n#include \"ceres/cost_function.h\"\n#include \"ceres/covariance_impl.h\"\n#include \"ceres/local_parameterization.h\"\n#include \"ceres/map_util.h\"\n#include \"ceres/problem_impl.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::make_pair;\nusing std::map;\nusing std::pair;\nusing std::vector;\n\nclass UnaryCostFunction: public CostFunction {\n public:\n  UnaryCostFunction(const int num_residuals,\n                    const int32_t parameter_block_size,\n                    const double* jacobian)\n      : jacobian_(jacobian, jacobian + num_residuals * parameter_block_size) {\n    set_num_residuals(num_residuals);\n    mutable_parameter_block_sizes()->push_back(parameter_block_size);\n  }\n\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const final {\n    for (int i = 0; i < num_residuals(); ++i) {\n      residuals[i] = 1;\n    }\n\n    if (jacobians == NULL) {\n      return true;\n    }\n\n    if (jacobians[0] != NULL) {\n      copy(jacobian_.begin(), jacobian_.end(), jacobians[0]);\n    }\n\n    return true;\n  }\n\n private:\n  vector<double> jacobian_;\n};\n\n\nclass BinaryCostFunction: public CostFunction {\n public:\n  BinaryCostFunction(const int num_residuals,\n                     const int32_t parameter_block1_size,\n                     const int32_t parameter_block2_size,\n                     const double* jacobian1,\n                     const double* jacobian2)\n      : jacobian1_(jacobian1,\n                   jacobian1 + num_residuals * parameter_block1_size),\n        jacobian2_(jacobian2,\n                   jacobian2 + num_residuals * parameter_block2_size) {\n    set_num_residuals(num_residuals);\n    mutable_parameter_block_sizes()->push_back(parameter_block1_size);\n    mutable_parameter_block_sizes()->push_back(parameter_block2_size);\n  }\n\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const final {\n    for (int i = 0; i < num_residuals(); ++i) {\n      residuals[i] = 2;\n    }\n\n    if (jacobians == NULL) {\n      return true;\n    }\n\n    if (jacobians[0] != NULL) {\n      copy(jacobian1_.begin(), jacobian1_.end(), jacobians[0]);\n    }\n\n    if (jacobians[1] != NULL) {\n      copy(jacobian2_.begin(), jacobian2_.end(), jacobians[1]);\n    }\n\n    return true;\n  }\n\n private:\n  vector<double> jacobian1_;\n  vector<double> jacobian2_;\n};\n\n// x_plus_delta = delta * x;\nclass PolynomialParameterization : public LocalParameterization {\n public:\n  virtual ~PolynomialParameterization() {}\n\n  bool Plus(const double* x,\n            const double* delta,\n            double* x_plus_delta) const final {\n    x_plus_delta[0] = delta[0] * x[0];\n    x_plus_delta[1] = delta[0] * x[1];\n    return true;\n  }\n\n  bool ComputeJacobian(const double* x, double* jacobian) const final {\n    jacobian[0] = x[0];\n    jacobian[1] = x[1];\n    return true;\n  }\n\n  int GlobalSize() const final { return 2; }\n  int LocalSize() const final { return 1; }\n};\n\nTEST(CovarianceImpl, ComputeCovarianceSparsity) {\n  double parameters[10];\n\n  double* block1 = parameters;\n  double* block2 = block1 + 1;\n  double* block3 = block2 + 2;\n  double* block4 = block3 + 3;\n\n  ProblemImpl problem;\n\n  // Add in random order\n  Vector junk_jacobian = Vector::Zero(10);\n  problem.AddResidualBlock(\n      new UnaryCostFunction(1, 1, junk_jacobian.data()), NULL, block1);\n  problem.AddResidualBlock(\n      new UnaryCostFunction(1, 4, junk_jacobian.data()), NULL, block4);\n  problem.AddResidualBlock(\n      new UnaryCostFunction(1, 3, junk_jacobian.data()), NULL, block3);\n  problem.AddResidualBlock(\n      new UnaryCostFunction(1, 2, junk_jacobian.data()), NULL, block2);\n\n  // Sparsity pattern\n  //\n  // Note that the problem structure does not imply this sparsity\n  // pattern since all the residual blocks are unary. But the\n  // ComputeCovarianceSparsity function in its current incarnation\n  // does not pay attention to this fact and only looks at the\n  // parameter block pairs that the user provides.\n  //\n  //  X . . . . . X X X X\n  //  . X X X X X . . . .\n  //  . X X X X X . . . .\n  //  . . . X X X . . . .\n  //  . . . X X X . . . .\n  //  . . . X X X . . . .\n  //  . . . . . . X X X X\n  //  . . . . . . X X X X\n  //  . . . . . . X X X X\n  //  . . . . . . X X X X\n\n  int expected_rows[] = {0, 5, 10, 15, 18, 21, 24, 28, 32, 36, 40};\n  int expected_cols[] = {0, 6, 7, 8, 9,\n                         1, 2, 3, 4, 5,\n                         1, 2, 3, 4, 5,\n                         3, 4, 5,\n                         3, 4, 5,\n                         3, 4, 5,\n                         6, 7, 8, 9,\n                         6, 7, 8, 9,\n                         6, 7, 8, 9,\n                         6, 7, 8, 9};\n\n\n  vector<pair<const double*, const double*>> covariance_blocks;\n  covariance_blocks.push_back(make_pair(block1, block1));\n  covariance_blocks.push_back(make_pair(block4, block4));\n  covariance_blocks.push_back(make_pair(block2, block2));\n  covariance_blocks.push_back(make_pair(block3, block3));\n  covariance_blocks.push_back(make_pair(block2, block3));\n  covariance_blocks.push_back(make_pair(block4, block1));  // reversed\n\n  Covariance::Options options;\n  CovarianceImpl covariance_impl(options);\n  EXPECT_TRUE(covariance_impl\n              .ComputeCovarianceSparsity(covariance_blocks, &problem));\n\n  const CompressedRowSparseMatrix* crsm = covariance_impl.covariance_matrix();\n\n  EXPECT_EQ(crsm->num_rows(), 10);\n  EXPECT_EQ(crsm->num_cols(), 10);\n  EXPECT_EQ(crsm->num_nonzeros(), 40);\n\n  const int* rows = crsm->rows();\n  for (int r = 0; r < crsm->num_rows() + 1; ++r) {\n    EXPECT_EQ(rows[r], expected_rows[r])\n        << r << \" \"\n        << rows[r] << \" \"\n        << expected_rows[r];\n  }\n\n  const int* cols = crsm->cols();\n  for (int c = 0; c < crsm->num_nonzeros(); ++c) {\n    EXPECT_EQ(cols[c], expected_cols[c])\n        << c << \" \"\n        << cols[c] << \" \"\n        << expected_cols[c];\n  }\n}\n\nTEST(CovarianceImpl, ComputeCovarianceSparsityWithConstantParameterBlock) {\n  double parameters[10];\n\n  double* block1 = parameters;\n  double* block2 = block1 + 1;\n  double* block3 = block2 + 2;\n  double* block4 = block3 + 3;\n\n  ProblemImpl problem;\n\n  // Add in random order\n  Vector junk_jacobian = Vector::Zero(10);\n  problem.AddResidualBlock(\n      new UnaryCostFunction(1, 1, junk_jacobian.data()), NULL, block1);\n  problem.AddResidualBlock(\n      new UnaryCostFunction(1, 4, junk_jacobian.data()), NULL, block4);\n  problem.AddResidualBlock(\n      new UnaryCostFunction(1, 3, junk_jacobian.data()), NULL, block3);\n  problem.AddResidualBlock(\n      new UnaryCostFunction(1, 2, junk_jacobian.data()), NULL, block2);\n  problem.SetParameterBlockConstant(block3);\n\n  // Sparsity pattern\n  //\n  // Note that the problem structure does not imply this sparsity\n  // pattern since all the residual blocks are unary. But the\n  // ComputeCovarianceSparsity function in its current incarnation\n  // does not pay attention to this fact and only looks at the\n  // parameter block pairs that the user provides.\n  //\n  //  X . . X X X X\n  //  . X X . . . .\n  //  . X X . . . .\n  //  . . . X X X X\n  //  . . . X X X X\n  //  . . . X X X X\n  //  . . . X X X X\n\n  int expected_rows[] = {0, 5, 7, 9, 13, 17, 21, 25};\n  int expected_cols[] = {0, 3, 4, 5, 6,\n                         1, 2,\n                         1, 2,\n                         3, 4, 5, 6,\n                         3, 4, 5, 6,\n                         3, 4, 5, 6,\n                         3, 4, 5, 6};\n\n  vector<pair<const double*, const double*>> covariance_blocks;\n  covariance_blocks.push_back(make_pair(block1, block1));\n  covariance_blocks.push_back(make_pair(block4, block4));\n  covariance_blocks.push_back(make_pair(block2, block2));\n  covariance_blocks.push_back(make_pair(block3, block3));\n  covariance_blocks.push_back(make_pair(block2, block3));\n  covariance_blocks.push_back(make_pair(block4, block1));  // reversed\n\n  Covariance::Options options;\n  CovarianceImpl covariance_impl(options);\n  EXPECT_TRUE(covariance_impl\n              .ComputeCovarianceSparsity(covariance_blocks, &problem));\n\n  const CompressedRowSparseMatrix* crsm = covariance_impl.covariance_matrix();\n\n  EXPECT_EQ(crsm->num_rows(), 7);\n  EXPECT_EQ(crsm->num_cols(), 7);\n  EXPECT_EQ(crsm->num_nonzeros(), 25);\n\n  const int* rows = crsm->rows();\n  for (int r = 0; r < crsm->num_rows() + 1; ++r) {\n    EXPECT_EQ(rows[r], expected_rows[r])\n        << r << \" \"\n        << rows[r] << \" \"\n        << expected_rows[r];\n  }\n\n  const int* cols = crsm->cols();\n  for (int c = 0; c < crsm->num_nonzeros(); ++c) {\n    EXPECT_EQ(cols[c], expected_cols[c])\n        << c << \" \"\n        << cols[c] << \" \"\n        << expected_cols[c];\n  }\n}\n\nTEST(CovarianceImpl, ComputeCovarianceSparsityWithFreeParameterBlock) {\n  double parameters[10];\n\n  double* block1 = parameters;\n  double* block2 = block1 + 1;\n  double* block3 = block2 + 2;\n  double* block4 = block3 + 3;\n\n  ProblemImpl problem;\n\n  // Add in random order\n  Vector junk_jacobian = Vector::Zero(10);\n  problem.AddResidualBlock(\n      new UnaryCostFunction(1, 1, junk_jacobian.data()), NULL, block1);\n  problem.AddResidualBlock(\n      new UnaryCostFunction(1, 4, junk_jacobian.data()), NULL, block4);\n  problem.AddParameterBlock(block3, 3);\n  problem.AddResidualBlock(\n      new UnaryCostFunction(1, 2, junk_jacobian.data()), NULL, block2);\n\n  // Sparsity pattern\n  //\n  // Note that the problem structure does not imply this sparsity\n  // pattern since all the residual blocks are unary. But the\n  // ComputeCovarianceSparsity function in its current incarnation\n  // does not pay attention to this fact and only looks at the\n  // parameter block pairs that the user provides.\n  //\n  //  X . . X X X X\n  //  . X X . . . .\n  //  . X X . . . .\n  //  . . . X X X X\n  //  . . . X X X X\n  //  . . . X X X X\n  //  . . . X X X X\n\n  int expected_rows[] = {0, 5, 7, 9, 13, 17, 21, 25};\n  int expected_cols[] = {0, 3, 4, 5, 6,\n                         1, 2,\n                         1, 2,\n                         3, 4, 5, 6,\n                         3, 4, 5, 6,\n                         3, 4, 5, 6,\n                         3, 4, 5, 6};\n\n  vector<pair<const double*, const double*>> covariance_blocks;\n  covariance_blocks.push_back(make_pair(block1, block1));\n  covariance_blocks.push_back(make_pair(block4, block4));\n  covariance_blocks.push_back(make_pair(block2, block2));\n  covariance_blocks.push_back(make_pair(block3, block3));\n  covariance_blocks.push_back(make_pair(block2, block3));\n  covariance_blocks.push_back(make_pair(block4, block1));  // reversed\n\n  Covariance::Options options;\n  CovarianceImpl covariance_impl(options);\n  EXPECT_TRUE(covariance_impl\n              .ComputeCovarianceSparsity(covariance_blocks, &problem));\n\n  const CompressedRowSparseMatrix* crsm = covariance_impl.covariance_matrix();\n\n  EXPECT_EQ(crsm->num_rows(), 7);\n  EXPECT_EQ(crsm->num_cols(), 7);\n  EXPECT_EQ(crsm->num_nonzeros(), 25);\n\n  const int* rows = crsm->rows();\n  for (int r = 0; r < crsm->num_rows() + 1; ++r) {\n    EXPECT_EQ(rows[r], expected_rows[r])\n        << r << \" \"\n        << rows[r] << \" \"\n        << expected_rows[r];\n  }\n\n  const int* cols = crsm->cols();\n  for (int c = 0; c < crsm->num_nonzeros(); ++c) {\n    EXPECT_EQ(cols[c], expected_cols[c])\n        << c << \" \"\n        << cols[c] << \" \"\n        << expected_cols[c];\n  }\n}\n\nclass CovarianceTest : public ::testing::Test {\n protected:\n  typedef map<const double*, pair<int, int>> BoundsMap;\n\n  void SetUp() override {\n    double* x = parameters_;\n    double* y = x + 2;\n    double* z = y + 3;\n\n    x[0] = 1;\n    x[1] = 1;\n    y[0] = 2;\n    y[1] = 2;\n    y[2] = 2;\n    z[0] = 3;\n\n    {\n      double jacobian[] = { 1.0, 0.0, 0.0, 1.0};\n      problem_.AddResidualBlock(new UnaryCostFunction(2, 2, jacobian), NULL, x);\n    }\n\n    {\n      double jacobian[] = { 2.0, 0.0, 0.0, 0.0, 2.0, 0.0, 0.0, 0.0, 2.0 };\n      problem_.AddResidualBlock(new UnaryCostFunction(3, 3, jacobian), NULL, y);\n    }\n\n    {\n      double jacobian = 5.0;\n      problem_.AddResidualBlock(new UnaryCostFunction(1, 1, &jacobian),\n                                NULL,\n                                z);\n    }\n\n    {\n      double jacobian1[] = { 1.0, 2.0, 3.0 };\n      double jacobian2[] = { -5.0, -6.0 };\n      problem_.AddResidualBlock(\n          new BinaryCostFunction(1, 3, 2, jacobian1, jacobian2),\n          NULL,\n          y,\n          x);\n    }\n\n    {\n      double jacobian1[] = {2.0 };\n      double jacobian2[] = { 3.0, -2.0 };\n      problem_.AddResidualBlock(\n          new BinaryCostFunction(1, 1, 2, jacobian1, jacobian2),\n          NULL,\n          z,\n          x);\n    }\n\n    all_covariance_blocks_.push_back(make_pair(x, x));\n    all_covariance_blocks_.push_back(make_pair(y, y));\n    all_covariance_blocks_.push_back(make_pair(z, z));\n    all_covariance_blocks_.push_back(make_pair(x, y));\n    all_covariance_blocks_.push_back(make_pair(x, z));\n    all_covariance_blocks_.push_back(make_pair(y, z));\n\n    column_bounds_[x] = make_pair(0, 2);\n    column_bounds_[y] = make_pair(2, 5);\n    column_bounds_[z] = make_pair(5, 6);\n  }\n\n  // Computes covariance in ambient space.\n  void ComputeAndCompareCovarianceBlocks(const Covariance::Options& options,\n                                         const double* expected_covariance) {\n    ComputeAndCompareCovarianceBlocksInTangentOrAmbientSpace(\n        options,\n        true,  // ambient\n        expected_covariance);\n  }\n\n  // Computes covariance in tangent space.\n  void ComputeAndCompareCovarianceBlocksInTangentSpace(\n                                         const Covariance::Options& options,\n                                         const double* expected_covariance) {\n    ComputeAndCompareCovarianceBlocksInTangentOrAmbientSpace(\n        options,\n        false,  // tangent\n        expected_covariance);\n  }\n\n  void ComputeAndCompareCovarianceBlocksInTangentOrAmbientSpace(\n      const Covariance::Options& options,\n      bool lift_covariance_to_ambient_space,\n      const double* expected_covariance) {\n    // Generate all possible combination of block pairs and check if the\n    // covariance computation is correct.\n    for (int i = 0; i <= 64; ++i) {\n      vector<pair<const double*, const double*>> covariance_blocks;\n      if (i & 1) {\n        covariance_blocks.push_back(all_covariance_blocks_[0]);\n      }\n\n      if (i & 2) {\n        covariance_blocks.push_back(all_covariance_blocks_[1]);\n      }\n\n      if (i & 4) {\n        covariance_blocks.push_back(all_covariance_blocks_[2]);\n      }\n\n      if (i & 8) {\n        covariance_blocks.push_back(all_covariance_blocks_[3]);\n      }\n\n      if (i & 16) {\n        covariance_blocks.push_back(all_covariance_blocks_[4]);\n      }\n\n      if (i & 32) {\n        covariance_blocks.push_back(all_covariance_blocks_[5]);\n      }\n\n      Covariance covariance(options);\n      EXPECT_TRUE(covariance.Compute(covariance_blocks, &problem_));\n\n      for (int i = 0; i < covariance_blocks.size(); ++i) {\n        const double* block1 = covariance_blocks[i].first;\n        const double* block2 = covariance_blocks[i].second;\n        // block1, block2\n        GetCovarianceBlockAndCompare(block1,\n                                     block2,\n                                     lift_covariance_to_ambient_space,\n                                     covariance,\n                                     expected_covariance);\n        // block2, block1\n        GetCovarianceBlockAndCompare(block2,\n                                     block1,\n                                     lift_covariance_to_ambient_space,\n                                     covariance,\n                                     expected_covariance);\n      }\n    }\n  }\n\n  void GetCovarianceBlockAndCompare(const double* block1,\n                                    const double* block2,\n                                    bool lift_covariance_to_ambient_space,\n                                    const Covariance& covariance,\n                                    const double* expected_covariance) {\n    const BoundsMap& column_bounds = lift_covariance_to_ambient_space ?\n        column_bounds_ : local_column_bounds_;\n    const int row_begin = FindOrDie(column_bounds, block1).first;\n    const int row_end = FindOrDie(column_bounds, block1).second;\n    const int col_begin = FindOrDie(column_bounds, block2).first;\n    const int col_end = FindOrDie(column_bounds, block2).second;\n\n    Matrix actual(row_end - row_begin, col_end - col_begin);\n    if (lift_covariance_to_ambient_space) {\n      EXPECT_TRUE(covariance.GetCovarianceBlock(block1,\n                                                block2,\n                                                actual.data()));\n    } else {\n      EXPECT_TRUE(covariance.GetCovarianceBlockInTangentSpace(block1,\n                                                              block2,\n                                                              actual.data()));\n    }\n\n    int dof = 0;  // degrees of freedom = sum of LocalSize()s\n    for (const auto& bound : column_bounds) {\n      dof = std::max(dof, bound.second.second);\n    }\n    ConstMatrixRef expected(expected_covariance, dof, dof);\n    double diff_norm = (expected.block(row_begin,\n                                       col_begin,\n                                       row_end - row_begin,\n                                       col_end - col_begin) - actual).norm();\n    diff_norm /= (row_end - row_begin) * (col_end - col_begin);\n\n    const double kTolerance = 1e-5;\n    EXPECT_NEAR(diff_norm, 0.0, kTolerance)\n        << \"rows: \" << row_begin << \" \" << row_end << \"  \"\n        << \"cols: \" << col_begin << \" \" << col_end << \"  \"\n        << \"\\n\\n expected: \\n \" << expected.block(row_begin,\n                                                  col_begin,\n                                                  row_end - row_begin,\n                                                  col_end - col_begin)\n        << \"\\n\\n actual: \\n \" << actual\n        << \"\\n\\n full expected: \\n\" << expected;\n  }\n\n  double parameters_[6];\n  Problem problem_;\n  vector<pair<const double*, const double*>> all_covariance_blocks_;\n  BoundsMap column_bounds_;\n  BoundsMap local_column_bounds_;\n};\n\n\nTEST_F(CovarianceTest, NormalBehavior) {\n  // J\n  //\n  //   1  0  0  0  0  0\n  //   0  1  0  0  0  0\n  //   0  0  2  0  0  0\n  //   0  0  0  2  0  0\n  //   0  0  0  0  2  0\n  //   0  0  0  0  0  5\n  //  -5 -6  1  2  3  0\n  //   3 -2  0  0  0  2\n\n  // J'J\n  //\n  //   35  24 -5 -10 -15  6\n  //   24  41 -6 -12 -18 -4\n  //   -5  -6  5   2   3  0\n  //  -10 -12  2   8   6  0\n  //  -15 -18  3   6  13  0\n  //    6  -4  0   0   0 29\n\n  // inv(J'J) computed using octave.\n  double expected_covariance[] = {\n     7.0747e-02,  -8.4923e-03,   1.6821e-02,   3.3643e-02,   5.0464e-02,  -1.5809e-02,  // NOLINT\n    -8.4923e-03,   8.1352e-02,   2.4758e-02,   4.9517e-02,   7.4275e-02,   1.2978e-02,  // NOLINT\n     1.6821e-02,   2.4758e-02,   2.4904e-01,  -1.9271e-03,  -2.8906e-03,  -6.5325e-05,  // NOLINT\n     3.3643e-02,   4.9517e-02,  -1.9271e-03,   2.4615e-01,  -5.7813e-03,  -1.3065e-04,  // NOLINT\n     5.0464e-02,   7.4275e-02,  -2.8906e-03,  -5.7813e-03,   2.4133e-01,  -1.9598e-04,  // NOLINT\n    -1.5809e-02,   1.2978e-02,  -6.5325e-05,  -1.3065e-04,  -1.9598e-04,   3.9544e-02,  // NOLINT\n  };\n\n  Covariance::Options options;\n\n#ifndef CERES_NO_SUITESPARSE\n  options.algorithm_type = SPARSE_QR;\n  options.sparse_linear_algebra_library_type = SUITE_SPARSE;\n  ComputeAndCompareCovarianceBlocks(options, expected_covariance);\n#endif\n\n  options.algorithm_type = DENSE_SVD;\n  ComputeAndCompareCovarianceBlocks(options, expected_covariance);\n\n  options.algorithm_type = SPARSE_QR;\n  options.sparse_linear_algebra_library_type = EIGEN_SPARSE;\n  ComputeAndCompareCovarianceBlocks(options, expected_covariance);\n}\n\n#ifdef CERES_USE_OPENMP\n\nTEST_F(CovarianceTest, ThreadedNormalBehavior) {\n  // J\n  //\n  //   1  0  0  0  0  0\n  //   0  1  0  0  0  0\n  //   0  0  2  0  0  0\n  //   0  0  0  2  0  0\n  //   0  0  0  0  2  0\n  //   0  0  0  0  0  5\n  //  -5 -6  1  2  3  0\n  //   3 -2  0  0  0  2\n\n  // J'J\n  //\n  //   35  24 -5 -10 -15  6\n  //   24  41 -6 -12 -18 -4\n  //   -5  -6  5   2   3  0\n  //  -10 -12  2   8   6  0\n  //  -15 -18  3   6  13  0\n  //    6  -4  0   0   0 29\n\n  // inv(J'J) computed using octave.\n  double expected_covariance[] = {\n     7.0747e-02,  -8.4923e-03,   1.6821e-02,   3.3643e-02,   5.0464e-02,  -1.5809e-02,  // NOLINT\n    -8.4923e-03,   8.1352e-02,   2.4758e-02,   4.9517e-02,   7.4275e-02,   1.2978e-02,  // NOLINT\n     1.6821e-02,   2.4758e-02,   2.4904e-01,  -1.9271e-03,  -2.8906e-03,  -6.5325e-05,  // NOLINT\n     3.3643e-02,   4.9517e-02,  -1.9271e-03,   2.4615e-01,  -5.7813e-03,  -1.3065e-04,  // NOLINT\n     5.0464e-02,   7.4275e-02,  -2.8906e-03,  -5.7813e-03,   2.4133e-01,  -1.9598e-04,  // NOLINT\n    -1.5809e-02,   1.2978e-02,  -6.5325e-05,  -1.3065e-04,  -1.9598e-04,   3.9544e-02,  // NOLINT\n  };\n\n  Covariance::Options options;\n  options.num_threads = 4;\n\n#ifndef CERES_NO_SUITESPARSE\n  options.algorithm_type = SPARSE_QR;\n  options.sparse_linear_algebra_library_type = SUITE_SPARSE;\n  ComputeAndCompareCovarianceBlocks(options, expected_covariance);\n#endif\n\n  options.algorithm_type = DENSE_SVD;\n  ComputeAndCompareCovarianceBlocks(options, expected_covariance);\n\n  options.algorithm_type = SPARSE_QR;\n  options.sparse_linear_algebra_library_type = EIGEN_SPARSE;\n  ComputeAndCompareCovarianceBlocks(options, expected_covariance);\n}\n\n#endif  // CERES_USE_OPENMP\n\nTEST_F(CovarianceTest, ConstantParameterBlock) {\n  problem_.SetParameterBlockConstant(parameters_);\n\n  // J\n  //\n  //  0  0  0  0  0  0\n  //  0  0  0  0  0  0\n  //  0  0  2  0  0  0\n  //  0  0  0  2  0  0\n  //  0  0  0  0  2  0\n  //  0  0  0  0  0  5\n  //  0  0  1  2  3  0\n  //  0  0  0  0  0  2\n\n  // J'J\n  //\n  //  0  0  0  0  0  0\n  //  0  0  0  0  0  0\n  //  0  0  5  2  3  0\n  //  0  0  2  8  6  0\n  //  0  0  3  6 13  0\n  //  0  0  0  0  0 29\n\n  // pinv(J'J) computed using octave.\n  double expected_covariance[] = {\n              0,            0,            0,            0,            0,            0,  // NOLINT\n              0,            0,            0,            0,            0,            0,  // NOLINT\n              0,            0,      0.23611,     -0.02778,     -0.04167,     -0.00000,  // NOLINT\n              0,            0,     -0.02778,      0.19444,     -0.08333,     -0.00000,  // NOLINT\n              0,            0,     -0.04167,     -0.08333,      0.12500,     -0.00000,  // NOLINT\n              0,            0,     -0.00000,     -0.00000,     -0.00000,      0.03448   // NOLINT\n  };\n\n  Covariance::Options options;\n\n#ifndef CERES_NO_SUITESPARSE\n  options.algorithm_type = SPARSE_QR;\n  options.sparse_linear_algebra_library_type = SUITE_SPARSE;\n  ComputeAndCompareCovarianceBlocks(options, expected_covariance);\n#endif\n\n  options.algorithm_type = DENSE_SVD;\n  ComputeAndCompareCovarianceBlocks(options, expected_covariance);\n\n  options.algorithm_type = SPARSE_QR;\n  options.sparse_linear_algebra_library_type = EIGEN_SPARSE;\n  ComputeAndCompareCovarianceBlocks(options, expected_covariance);\n}\n\nTEST_F(CovarianceTest, LocalParameterization) {\n  double* x = parameters_;\n  double* y = x + 2;\n\n  problem_.SetParameterization(x, new PolynomialParameterization);\n\n  vector<int> subset;\n  subset.push_back(2);\n  problem_.SetParameterization(y, new SubsetParameterization(3, subset));\n\n  // Raw Jacobian: J\n  //\n  //   1   0  0  0  0  0\n  //   0   1  0  0  0  0\n  //   0   0  2  0  0  0\n  //   0   0  0  2  0  0\n  //   0   0  0  0  2  0\n  //   0   0  0  0  0  5\n  //  -5  -6  1  2  3  0\n  //   3  -2  0  0  0  2\n\n  // Local to global jacobian: A\n  //\n  //  1   0   0   0\n  //  1   0   0   0\n  //  0   1   0   0\n  //  0   0   1   0\n  //  0   0   0   0\n  //  0   0   0   1\n\n  // A * inv((J*A)'*(J*A)) * A'\n  // Computed using octave.\n  double expected_covariance[] = {\n    0.01766,   0.01766,   0.02158,   0.04316,   0.00000,  -0.00122,\n    0.01766,   0.01766,   0.02158,   0.04316,   0.00000,  -0.00122,\n    0.02158,   0.02158,   0.24860,  -0.00281,   0.00000,  -0.00149,\n    0.04316,   0.04316,  -0.00281,   0.24439,   0.00000,  -0.00298,\n    0.00000,   0.00000,   0.00000,   0.00000,   0.00000,   0.00000,\n   -0.00122,  -0.00122,  -0.00149,  -0.00298,   0.00000,   0.03457\n  };\n\n  Covariance::Options options;\n\n#ifndef CERES_NO_SUITESPARSE\n  options.algorithm_type = SPARSE_QR;\n  options.sparse_linear_algebra_library_type = SUITE_SPARSE;\n  ComputeAndCompareCovarianceBlocks(options, expected_covariance);\n#endif\n\n  options.algorithm_type = DENSE_SVD;\n  ComputeAndCompareCovarianceBlocks(options, expected_covariance);\n\n  options.algorithm_type = SPARSE_QR;\n  options.sparse_linear_algebra_library_type = EIGEN_SPARSE;\n  ComputeAndCompareCovarianceBlocks(options, expected_covariance);\n}\n\nTEST_F(CovarianceTest, LocalParameterizationInTangentSpace) {\n  double* x = parameters_;\n  double* y = x + 2;\n  double* z = y + 3;\n\n  problem_.SetParameterization(x, new PolynomialParameterization);\n\n  vector<int> subset;\n  subset.push_back(2);\n  problem_.SetParameterization(y, new SubsetParameterization(3, subset));\n\n  local_column_bounds_[x] = make_pair(0, 1);\n  local_column_bounds_[y] = make_pair(1, 3);\n  local_column_bounds_[z] = make_pair(3, 4);\n\n  // Raw Jacobian: J\n  //\n  //   1   0  0  0  0  0\n  //   0   1  0  0  0  0\n  //   0   0  2  0  0  0\n  //   0   0  0  2  0  0\n  //   0   0  0  0  2  0\n  //   0   0  0  0  0  5\n  //  -5  -6  1  2  3  0\n  //   3  -2  0  0  0  2\n\n  // Local to global jacobian: A\n  //\n  //  1   0   0   0\n  //  1   0   0   0\n  //  0   1   0   0\n  //  0   0   1   0\n  //  0   0   0   0\n  //  0   0   0   1\n\n  // inv((J*A)'*(J*A))\n  // Computed using octave.\n  double expected_covariance[] = {\n    0.01766,   0.02158,   0.04316,   -0.00122,\n    0.02158,   0.24860,  -0.00281,   -0.00149,\n    0.04316,  -0.00281,   0.24439,   -0.00298,\n   -0.00122,  -0.00149,  -0.00298,    0.03457  // NOLINT\n  };\n\n  Covariance::Options options;\n\n#ifndef CERES_NO_SUITESPARSE\n  options.algorithm_type = SPARSE_QR;\n  options.sparse_linear_algebra_library_type = SUITE_SPARSE;\n\n  ComputeAndCompareCovarianceBlocksInTangentSpace(options, expected_covariance);\n#endif\n\n  options.algorithm_type = DENSE_SVD;\n  ComputeAndCompareCovarianceBlocksInTangentSpace(options, expected_covariance);\n\n  options.algorithm_type = SPARSE_QR;\n  options.sparse_linear_algebra_library_type = EIGEN_SPARSE;\n  ComputeAndCompareCovarianceBlocksInTangentSpace(options, expected_covariance);\n}\n\nTEST_F(CovarianceTest, LocalParameterizationInTangentSpaceWithConstantBlocks) {\n  double* x = parameters_;\n  double* y = x + 2;\n  double* z = y + 3;\n\n  problem_.SetParameterization(x, new PolynomialParameterization);\n  problem_.SetParameterBlockConstant(x);\n\n  vector<int> subset;\n  subset.push_back(2);\n  problem_.SetParameterization(y, new SubsetParameterization(3, subset));\n  problem_.SetParameterBlockConstant(y);\n\n  local_column_bounds_[x] = make_pair(0, 1);\n  local_column_bounds_[y] = make_pair(1, 3);\n  local_column_bounds_[z] = make_pair(3, 4);\n\n  // Raw Jacobian: J\n  //\n  //   1   0  0  0  0  0\n  //   0   1  0  0  0  0\n  //   0   0  2  0  0  0\n  //   0   0  0  2  0  0\n  //   0   0  0  0  2  0\n  //   0   0  0  0  0  5\n  //  -5  -6  1  2  3  0\n  //   3  -2  0  0  0  2\n\n  // Local to global jacobian: A\n  //\n  //  0   0   0   0\n  //  0   0   0   0\n  //  0   0   0   0\n  //  0   0   0   0\n  //  0   0   0   0\n  //  0   0   0   1\n\n  // pinv((J*A)'*(J*A))\n  // Computed using octave.\n  double expected_covariance[] = {\n    0.0, 0.0, 0.0, 0.0,\n    0.0, 0.0, 0.0, 0.0,\n    0.0, 0.0, 0.0, 0.0,\n    0.0, 0.0, 0.0, 0.034482 // NOLINT\n  };\n\n  Covariance::Options options;\n\n#ifndef CERES_NO_SUITESPARSE\n  options.algorithm_type = SPARSE_QR;\n  options.sparse_linear_algebra_library_type = SUITE_SPARSE;\n\n  ComputeAndCompareCovarianceBlocksInTangentSpace(options, expected_covariance);\n#endif\n\n  options.algorithm_type = DENSE_SVD;\n  ComputeAndCompareCovarianceBlocksInTangentSpace(options, expected_covariance);\n\n  options.algorithm_type = SPARSE_QR;\n  options.sparse_linear_algebra_library_type = EIGEN_SPARSE;\n  ComputeAndCompareCovarianceBlocksInTangentSpace(options, expected_covariance);\n}\n\nTEST_F(CovarianceTest, TruncatedRank) {\n  // J\n  //\n  //   1  0  0  0  0  0\n  //   0  1  0  0  0  0\n  //   0  0  2  0  0  0\n  //   0  0  0  2  0  0\n  //   0  0  0  0  2  0\n  //   0  0  0  0  0  5\n  //  -5 -6  1  2  3  0\n  //   3 -2  0  0  0  2\n\n  // J'J\n  //\n  //   35  24 -5 -10 -15  6\n  //   24  41 -6 -12 -18 -4\n  //   -5  -6  5   2   3  0\n  //  -10 -12  2   8   6  0\n  //  -15 -18  3   6  13  0\n  //    6  -4  0   0   0 29\n\n  // 3.4142 is the smallest eigen value of J'J. The following matrix\n  // was obtained by dropping the eigenvector corresponding to this\n  // eigenvalue.\n  double expected_covariance[] = {\n     5.4135e-02,  -3.5121e-02,   1.7257e-04,   3.4514e-04,   5.1771e-04,  -1.6076e-02,  // NOLINT\n    -3.5121e-02,   3.8667e-02,  -1.9288e-03,  -3.8576e-03,  -5.7864e-03,   1.2549e-02,  // NOLINT\n     1.7257e-04,  -1.9288e-03,   2.3235e-01,  -3.5297e-02,  -5.2946e-02,  -3.3329e-04,  // NOLINT\n     3.4514e-04,  -3.8576e-03,  -3.5297e-02,   1.7941e-01,  -1.0589e-01,  -6.6659e-04,  // NOLINT\n     5.1771e-04,  -5.7864e-03,  -5.2946e-02,  -1.0589e-01,   9.1162e-02,  -9.9988e-04,  // NOLINT\n    -1.6076e-02,   1.2549e-02,  -3.3329e-04,  -6.6659e-04,  -9.9988e-04,   3.9539e-02   // NOLINT\n  };\n\n\n  {\n    Covariance::Options options;\n    options.algorithm_type = DENSE_SVD;\n    // Force dropping of the smallest eigenvector.\n    options.null_space_rank = 1;\n    ComputeAndCompareCovarianceBlocks(options, expected_covariance);\n  }\n\n  {\n    Covariance::Options options;\n    options.algorithm_type = DENSE_SVD;\n    // Force dropping of the smallest eigenvector via the ratio but\n    // automatic truncation.\n    options.min_reciprocal_condition_number = 0.044494;\n    options.null_space_rank = -1;\n    ComputeAndCompareCovarianceBlocks(options, expected_covariance);\n  }\n}\n\nTEST_F(CovarianceTest, DenseCovarianceMatrixFromSetOfParameters) {\n  Covariance::Options options;\n  Covariance covariance(options);\n  double* x = parameters_;\n  double* y = x + 2;\n  double* z = y + 3;\n  vector<const double*> parameter_blocks;\n  parameter_blocks.push_back(x);\n  parameter_blocks.push_back(y);\n  parameter_blocks.push_back(z);\n  covariance.Compute(parameter_blocks, &problem_);\n  double expected_covariance[36];\n  covariance.GetCovarianceMatrix(parameter_blocks, expected_covariance);\n\n#ifndef CERES_NO_SUITESPARSE\n  options.algorithm_type = SPARSE_QR;\n  options.sparse_linear_algebra_library_type = SUITE_SPARSE;\n  ComputeAndCompareCovarianceBlocks(options, expected_covariance);\n#endif\n\n  options.algorithm_type = DENSE_SVD;\n  ComputeAndCompareCovarianceBlocks(options, expected_covariance);\n\n  options.algorithm_type = SPARSE_QR;\n  options.sparse_linear_algebra_library_type = EIGEN_SPARSE;\n  ComputeAndCompareCovarianceBlocks(options, expected_covariance);\n}\n\nTEST_F(CovarianceTest, DenseCovarianceMatrixFromSetOfParametersThreaded) {\n  Covariance::Options options;\n  options.num_threads = 4;\n  Covariance covariance(options);\n  double* x = parameters_;\n  double* y = x + 2;\n  double* z = y + 3;\n  vector<const double*> parameter_blocks;\n  parameter_blocks.push_back(x);\n  parameter_blocks.push_back(y);\n  parameter_blocks.push_back(z);\n  covariance.Compute(parameter_blocks, &problem_);\n  double expected_covariance[36];\n  covariance.GetCovarianceMatrix(parameter_blocks, expected_covariance);\n\n#ifndef CERES_NO_SUITESPARSE\n  options.algorithm_type = SPARSE_QR;\n  options.sparse_linear_algebra_library_type = SUITE_SPARSE;\n  ComputeAndCompareCovarianceBlocks(options, expected_covariance);\n#endif\n\n  options.algorithm_type = DENSE_SVD;\n  ComputeAndCompareCovarianceBlocks(options, expected_covariance);\n\n  options.algorithm_type = SPARSE_QR;\n  options.sparse_linear_algebra_library_type = EIGEN_SPARSE;\n  ComputeAndCompareCovarianceBlocks(options, expected_covariance);\n}\n\nTEST_F(CovarianceTest, DenseCovarianceMatrixFromSetOfParametersInTangentSpace) {\n  Covariance::Options options;\n  Covariance covariance(options);\n  double* x = parameters_;\n  double* y = x + 2;\n  double* z = y + 3;\n\n  problem_.SetParameterization(x, new PolynomialParameterization);\n\n  vector<int> subset;\n  subset.push_back(2);\n  problem_.SetParameterization(y, new SubsetParameterization(3, subset));\n\n  local_column_bounds_[x] = make_pair(0, 1);\n  local_column_bounds_[y] = make_pair(1, 3);\n  local_column_bounds_[z] = make_pair(3, 4);\n\n  vector<const double*> parameter_blocks;\n  parameter_blocks.push_back(x);\n  parameter_blocks.push_back(y);\n  parameter_blocks.push_back(z);\n  covariance.Compute(parameter_blocks, &problem_);\n  double expected_covariance[16];\n  covariance.GetCovarianceMatrixInTangentSpace(parameter_blocks,\n                                               expected_covariance);\n\n#ifndef CERES_NO_SUITESPARSE\n  options.algorithm_type = SPARSE_QR;\n  options.sparse_linear_algebra_library_type = SUITE_SPARSE;\n\n  ComputeAndCompareCovarianceBlocksInTangentSpace(options, expected_covariance);\n#endif\n\n  options.algorithm_type = DENSE_SVD;\n  ComputeAndCompareCovarianceBlocksInTangentSpace(options, expected_covariance);\n\n  options.algorithm_type = SPARSE_QR;\n  options.sparse_linear_algebra_library_type = EIGEN_SPARSE;\n  ComputeAndCompareCovarianceBlocksInTangentSpace(options, expected_covariance);\n}\n\nTEST_F(CovarianceTest, ComputeCovarianceFailure) {\n  Covariance::Options options;\n  Covariance covariance(options);\n  double* x = parameters_;\n  double* y = x + 2;\n  vector<const double*> parameter_blocks;\n  parameter_blocks.push_back(x);\n  parameter_blocks.push_back(x);\n  parameter_blocks.push_back(y);\n  parameter_blocks.push_back(y);\n  EXPECT_DEATH_IF_SUPPORTED(covariance.Compute(parameter_blocks, &problem_),\n                            \"Covariance::Compute called with duplicate blocks \"\n                            \"at indices \\\\(0, 1\\\\) and \\\\(2, 3\\\\)\");\n  vector<pair<const double*, const double*>> covariance_blocks;\n  covariance_blocks.push_back(make_pair(x, x));\n  covariance_blocks.push_back(make_pair(x, x));\n  covariance_blocks.push_back(make_pair(y, y));\n  covariance_blocks.push_back(make_pair(y, y));\n  EXPECT_DEATH_IF_SUPPORTED(covariance.Compute(covariance_blocks, &problem_),\n                            \"Covariance::Compute called with duplicate blocks \"\n                            \"at indices \\\\(0, 1\\\\) and \\\\(2, 3\\\\)\");\n}\n\nclass RankDeficientCovarianceTest : public CovarianceTest {\n protected:\n  void SetUp() final {\n    double* x = parameters_;\n    double* y = x + 2;\n    double* z = y + 3;\n\n    {\n      double jacobian[] = { 1.0, 0.0, 0.0, 1.0};\n      problem_.AddResidualBlock(new UnaryCostFunction(2, 2, jacobian), NULL, x);\n    }\n\n    {\n      double jacobian[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };\n      problem_.AddResidualBlock(new UnaryCostFunction(3, 3, jacobian), NULL, y);\n    }\n\n    {\n      double jacobian = 5.0;\n      problem_.AddResidualBlock(new UnaryCostFunction(1, 1, &jacobian),\n                                NULL,\n                                z);\n    }\n\n    {\n      double jacobian1[] = { 0.0, 0.0, 0.0 };\n      double jacobian2[] = { -5.0, -6.0 };\n      problem_.AddResidualBlock(\n          new BinaryCostFunction(1, 3, 2, jacobian1, jacobian2),\n          NULL,\n          y,\n          x);\n    }\n\n    {\n      double jacobian1[] = {2.0 };\n      double jacobian2[] = { 3.0, -2.0 };\n      problem_.AddResidualBlock(\n          new BinaryCostFunction(1, 1, 2, jacobian1, jacobian2),\n          NULL,\n          z,\n          x);\n    }\n\n    all_covariance_blocks_.push_back(make_pair(x, x));\n    all_covariance_blocks_.push_back(make_pair(y, y));\n    all_covariance_blocks_.push_back(make_pair(z, z));\n    all_covariance_blocks_.push_back(make_pair(x, y));\n    all_covariance_blocks_.push_back(make_pair(x, z));\n    all_covariance_blocks_.push_back(make_pair(y, z));\n\n    column_bounds_[x] = make_pair(0, 2);\n    column_bounds_[y] = make_pair(2, 5);\n    column_bounds_[z] = make_pair(5, 6);\n  }\n};\n\nTEST_F(RankDeficientCovarianceTest, AutomaticTruncation) {\n  // J\n  //\n  //   1  0  0  0  0  0\n  //   0  1  0  0  0  0\n  //   0  0  0  0  0  0\n  //   0  0  0  0  0  0\n  //   0  0  0  0  0  0\n  //   0  0  0  0  0  5\n  //  -5 -6  0  0  0  0\n  //   3 -2  0  0  0  2\n\n  // J'J\n  //\n  //  35 24  0  0  0  6\n  //  24 41  0  0  0 -4\n  //   0  0  0  0  0  0\n  //   0  0  0  0  0  0\n  //   0  0  0  0  0  0\n  //   6 -4  0  0  0 29\n\n  // pinv(J'J) computed using octave.\n  double expected_covariance[] = {\n     0.053998,  -0.033145,   0.000000,   0.000000,   0.000000,  -0.015744,\n    -0.033145,   0.045067,   0.000000,   0.000000,   0.000000,   0.013074,\n     0.000000,   0.000000,   0.000000,   0.000000,   0.000000,   0.000000,\n     0.000000,   0.000000,   0.000000,   0.000000,   0.000000,   0.000000,\n     0.000000,   0.000000,   0.000000,   0.000000,   0.000000,   0.000000,\n    -0.015744,   0.013074,   0.000000,   0.000000,   0.000000,   0.039543\n  };\n\n  Covariance::Options options;\n  options.algorithm_type = DENSE_SVD;\n  options.null_space_rank = -1;\n  ComputeAndCompareCovarianceBlocks(options, expected_covariance);\n}\n\nstruct LinearCostFunction {\n  template <typename T>\n  bool operator()(const T* x, const T* y, T* residual) const {\n    residual[0] = T(10.0) - *x;\n    residual[1] = T(5.0) - *y;\n    return true;\n  }\n  static CostFunction* Create() {\n    return new AutoDiffCostFunction<LinearCostFunction, 2, 1, 1>(\n        new LinearCostFunction);\n  }\n};\n\nTEST(Covariance, ZeroSizedLocalParameterizationGetCovariance) {\n  double x = 0.0;\n  double y = 1.0;\n  Problem problem;\n  problem.AddResidualBlock(LinearCostFunction::Create(), nullptr, &x, &y);\n  problem.SetParameterization(&y, new SubsetParameterization(1, {0}));\n  // J = [-1 0]\n  //     [ 0 0]\n  Covariance::Options options;\n  options.algorithm_type = DENSE_SVD;\n  Covariance covariance(options);\n  vector<pair<const double*, const double*>> covariance_blocks;\n  covariance_blocks.push_back(std::make_pair(&x, &x));\n  covariance_blocks.push_back(std::make_pair(&x, &y));\n  covariance_blocks.push_back(std::make_pair(&y, &x));\n  covariance_blocks.push_back(std::make_pair(&y, &y));\n  EXPECT_TRUE(covariance.Compute(covariance_blocks, &problem));\n\n  double value = -1;\n  covariance.GetCovarianceBlock(&x, &x, &value);\n  EXPECT_NEAR(value, 1.0, std::numeric_limits<double>::epsilon());\n\n  value = -1;\n  covariance.GetCovarianceBlock(&x, &y, &value);\n  EXPECT_NEAR(value, 0.0, std::numeric_limits<double>::epsilon());\n\n  value = -1;\n  covariance.GetCovarianceBlock(&y, &x, &value);\n  EXPECT_NEAR(value, 0.0, std::numeric_limits<double>::epsilon());\n\n  value = -1;\n  covariance.GetCovarianceBlock(&y, &y, &value);\n  EXPECT_NEAR(value, 0.0, std::numeric_limits<double>::epsilon());\n}\n\nTEST(Covariance, ZeroSizedLocalParameterizationGetCovarianceInTangentSpace) {\n  double x = 0.0;\n  double y = 1.0;\n  Problem problem;\n  problem.AddResidualBlock(LinearCostFunction::Create(), nullptr, &x, &y);\n  problem.SetParameterization(&y, new SubsetParameterization(1, {0}));\n  // J = [-1 0]\n  //     [ 0 0]\n  Covariance::Options options;\n  options.algorithm_type = DENSE_SVD;\n  Covariance covariance(options);\n  vector<pair<const double*, const double*>> covariance_blocks;\n  covariance_blocks.push_back(std::make_pair(&x, &x));\n  covariance_blocks.push_back(std::make_pair(&x, &y));\n  covariance_blocks.push_back(std::make_pair(&y, &x));\n  covariance_blocks.push_back(std::make_pair(&y, &y));\n  EXPECT_TRUE(covariance.Compute(covariance_blocks, &problem));\n\n  double value = -1;\n  covariance.GetCovarianceBlockInTangentSpace(&x, &x, &value);\n  EXPECT_NEAR(value, 1.0, std::numeric_limits<double>::epsilon());\n\n  value = -1;\n  // The following three calls, should not touch this value, since the\n  // tangent space is of size zero\n  covariance.GetCovarianceBlockInTangentSpace(&x, &y, &value);\n  EXPECT_EQ(value, -1);\n  covariance.GetCovarianceBlockInTangentSpace(&y, &x, &value);\n  EXPECT_EQ(value, -1);\n  covariance.GetCovarianceBlockInTangentSpace(&y, &y, &value);\n  EXPECT_EQ(value, -1);\n}\n\nclass LargeScaleCovarianceTest : public ::testing::Test {\n protected:\n  void SetUp() final {\n    num_parameter_blocks_ = 2000;\n    parameter_block_size_ = 5;\n    parameters_.reset(\n        new double[parameter_block_size_ * num_parameter_blocks_]);\n\n    Matrix jacobian(parameter_block_size_, parameter_block_size_);\n    for (int i = 0; i < num_parameter_blocks_; ++i) {\n      jacobian.setIdentity();\n      jacobian *= (i + 1);\n\n      double* block_i = parameters_.get() + i * parameter_block_size_;\n      problem_.AddResidualBlock(new UnaryCostFunction(parameter_block_size_,\n                                                      parameter_block_size_,\n                                                      jacobian.data()),\n                                NULL,\n                                block_i);\n      for (int j = i; j < num_parameter_blocks_; ++j) {\n        double* block_j = parameters_.get() + j * parameter_block_size_;\n        all_covariance_blocks_.push_back(make_pair(block_i, block_j));\n      }\n    }\n  }\n\n  void ComputeAndCompare(\n      CovarianceAlgorithmType algorithm_type,\n      SparseLinearAlgebraLibraryType sparse_linear_algebra_library_type,\n      int num_threads) {\n    Covariance::Options options;\n    options.algorithm_type = algorithm_type;\n    options.sparse_linear_algebra_library_type =\n        sparse_linear_algebra_library_type;\n    options.num_threads = num_threads;\n    Covariance covariance(options);\n    EXPECT_TRUE(covariance.Compute(all_covariance_blocks_, &problem_));\n\n    Matrix expected(parameter_block_size_, parameter_block_size_);\n    Matrix actual(parameter_block_size_, parameter_block_size_);\n    const double kTolerance = 1e-16;\n\n    for (int i = 0; i < num_parameter_blocks_; ++i) {\n      expected.setIdentity();\n      expected /= (i + 1.0) * (i + 1.0);\n\n      double* block_i = parameters_.get() + i * parameter_block_size_;\n      covariance.GetCovarianceBlock(block_i, block_i, actual.data());\n      EXPECT_NEAR((expected - actual).norm(), 0.0, kTolerance)\n          << \"block: \" << i << \", \" << i << \"\\n\"\n          << \"expected: \\n\" << expected << \"\\n\"\n          << \"actual: \\n\" << actual;\n\n      expected.setZero();\n      for (int j = i + 1; j < num_parameter_blocks_; ++j) {\n        double* block_j = parameters_.get() + j * parameter_block_size_;\n        covariance.GetCovarianceBlock(block_i, block_j, actual.data());\n        EXPECT_NEAR((expected - actual).norm(), 0.0, kTolerance)\n            << \"block: \" << i << \", \" << j << \"\\n\"\n            << \"expected: \\n\" << expected << \"\\n\"\n            << \"actual: \\n\" << actual;\n      }\n    }\n  }\n\n  std::unique_ptr<double[]> parameters_;\n  int parameter_block_size_;\n  int num_parameter_blocks_;\n\n  Problem problem_;\n  vector<pair<const double*, const double*>> all_covariance_blocks_;\n};\n\n#if !defined(CERES_NO_SUITESPARSE) && defined(CERES_USE_OPENMP)\n\nTEST_F(LargeScaleCovarianceTest, Parallel) {\n  ComputeAndCompare(SPARSE_QR, SUITE_SPARSE, 4);\n}\n\n#endif  // !defined(CERES_NO_SUITESPARSE) && defined(CERES_USE_OPENMP)\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/cubic_interpolation_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/cubic_interpolation.h\"\n\n#include <memory>\n#include \"ceres/jet.h\"\n#include \"glog/logging.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nstatic constexpr double kTolerance = 1e-12;\n\nTEST(Grid1D, OneDataDimension) {\n  int x[] = {1, 2, 3};\n  Grid1D<int, 1> grid(x, 0, 3);\n  for (int i = 0; i < 3; ++i) {\n    double value;\n    grid.GetValue(i, &value);\n    EXPECT_EQ(value, static_cast<double>(i + 1));\n  }\n}\n\nTEST(Grid1D, OneDataDimensionOutOfBounds) {\n  int x[] = {1, 2, 3};\n  Grid1D<int, 1> grid(x, 0, 3);\n  double value;\n  grid.GetValue(-1, &value);\n  EXPECT_EQ(value, x[0]);\n  grid.GetValue(-2, &value);\n  EXPECT_EQ(value, x[0]);\n  grid.GetValue(3, &value);\n  EXPECT_EQ(value, x[2]);\n  grid.GetValue(4, &value);\n  EXPECT_EQ(value, x[2]);\n}\n\nTEST(Grid1D, TwoDataDimensionIntegerDataInterleaved) {\n  int x[] = {1, 5,\n             2, 6,\n             3, 7};\n\n  Grid1D<int, 2, true> grid(x, 0, 3);\n  for (int i = 0; i < 3; ++i) {\n    double value[2];\n    grid.GetValue(i, value);\n    EXPECT_EQ(value[0], static_cast<double>(i + 1));\n    EXPECT_EQ(value[1], static_cast<double>(i + 5));\n  }\n}\n\n\nTEST(Grid1D, TwoDataDimensionIntegerDataStacked) {\n  int x[] = {1, 2, 3,\n             5, 6, 7};\n\n  Grid1D<int, 2, false> grid(x, 0, 3);\n  for (int i = 0; i < 3; ++i) {\n    double value[2];\n    grid.GetValue(i, value);\n    EXPECT_EQ(value[0], static_cast<double>(i + 1));\n    EXPECT_EQ(value[1], static_cast<double>(i + 5));\n  }\n}\n\nTEST(Grid2D, OneDataDimensionRowMajor) {\n  int x[] = {1, 2, 3,\n             2, 3, 4};\n  Grid2D<int, 1, true, true> grid(x, 0, 2, 0, 3);\n  for (int r = 0; r < 2; ++r) {\n    for (int c = 0; c < 3; ++c) {\n      double value;\n      grid.GetValue(r, c, &value);\n      EXPECT_EQ(value, static_cast<double>(r + c + 1));\n    }\n  }\n}\n\nTEST(Grid2D, OneDataDimensionRowMajorOutOfBounds) {\n  int x[] = {1, 2, 3,\n             2, 3, 4};\n  Grid2D<int, 1, true, true> grid(x, 0, 2, 0, 3);\n  double value;\n  grid.GetValue(-1, -1, &value);\n  EXPECT_EQ(value, x[0]);\n  grid.GetValue(-1, 0, &value);\n  EXPECT_EQ(value, x[0]);\n  grid.GetValue(-1, 1, &value);\n  EXPECT_EQ(value, x[1]);\n  grid.GetValue(-1, 2, &value);\n  EXPECT_EQ(value, x[2]);\n  grid.GetValue(-1, 3, &value);\n  EXPECT_EQ(value, x[2]);\n  grid.GetValue(0, 3, &value);\n  EXPECT_EQ(value, x[2]);\n  grid.GetValue(1, 3, &value);\n  EXPECT_EQ(value, x[5]);\n  grid.GetValue(2, 3, &value);\n  EXPECT_EQ(value, x[5]);\n  grid.GetValue(2, 2, &value);\n  EXPECT_EQ(value, x[5]);\n  grid.GetValue(2, 1, &value);\n  EXPECT_EQ(value, x[4]);\n  grid.GetValue(2, 0, &value);\n  EXPECT_EQ(value, x[3]);\n  grid.GetValue(2, -1, &value);\n  EXPECT_EQ(value, x[3]);\n  grid.GetValue(1, -1, &value);\n  EXPECT_EQ(value, x[3]);\n  grid.GetValue(0, -1, &value);\n  EXPECT_EQ(value, x[0]);\n}\n\nTEST(Grid2D, TwoDataDimensionRowMajorInterleaved) {\n  int x[] = {1, 4, 2, 8, 3, 12,\n             2, 8, 3, 12, 4, 16};\n  Grid2D<int, 2, true, true> grid(x, 0, 2, 0, 3);\n  for (int r = 0; r < 2; ++r) {\n    for (int c = 0; c < 3; ++c) {\n      double value[2];\n      grid.GetValue(r, c, value);\n      EXPECT_EQ(value[0], static_cast<double>(r + c + 1));\n      EXPECT_EQ(value[1], static_cast<double>(4 *(r + c + 1)));\n    }\n  }\n}\n\nTEST(Grid2D, TwoDataDimensionRowMajorStacked) {\n  int x[] = {1,  2,  3,\n             2,  3,  4,\n             4,  8, 12,\n             8, 12, 16};\n  Grid2D<int, 2, true, false> grid(x, 0, 2, 0, 3);\n  for (int r = 0; r < 2; ++r) {\n    for (int c = 0; c < 3; ++c) {\n      double value[2];\n      grid.GetValue(r, c, value);\n      EXPECT_EQ(value[0], static_cast<double>(r + c + 1));\n      EXPECT_EQ(value[1], static_cast<double>(4 *(r + c + 1)));\n    }\n  }\n}\n\nTEST(Grid2D, TwoDataDimensionColMajorInterleaved) {\n  int x[] = { 1,  4, 2,  8,\n              2,  8, 3, 12,\n              3, 12, 4, 16};\n  Grid2D<int, 2, false, true> grid(x, 0, 2, 0, 3);\n  for (int r = 0; r < 2; ++r) {\n    for (int c = 0; c < 3; ++c) {\n      double value[2];\n      grid.GetValue(r, c, value);\n      EXPECT_EQ(value[0], static_cast<double>(r + c + 1));\n      EXPECT_EQ(value[1], static_cast<double>(4 *(r + c + 1)));\n    }\n  }\n}\n\nTEST(Grid2D, TwoDataDimensionColMajorStacked) {\n  int x[] = {1,   2,\n             2,   3,\n             3,   4,\n             4,   8,\n             8,  12,\n             12, 16};\n  Grid2D<int, 2, false, false> grid(x, 0, 2, 0, 3);\n  for (int r = 0; r < 2; ++r) {\n    for (int c = 0; c < 3; ++c) {\n      double value[2];\n      grid.GetValue(r, c, value);\n      EXPECT_EQ(value[0], static_cast<double>(r + c + 1));\n      EXPECT_EQ(value[1], static_cast<double>(4 *(r + c + 1)));\n    }\n  }\n}\n\nclass CubicInterpolatorTest : public ::testing::Test {\n public:\n  template <int kDataDimension>\n  void RunPolynomialInterpolationTest(const double a,\n                                      const double b,\n                                      const double c,\n                                      const double d) {\n    values_.reset(new double[kDataDimension * kNumSamples]);\n\n    for (int x = 0; x < kNumSamples; ++x) {\n      for (int dim = 0; dim < kDataDimension; ++dim) {\n      values_[x * kDataDimension + dim] =\n          (dim * dim  + 1) * (a  * x * x * x + b * x * x + c * x + d);\n      }\n    }\n\n    Grid1D<double, kDataDimension> grid(values_.get(), 0, kNumSamples);\n    CubicInterpolator<Grid1D<double, kDataDimension>> interpolator(grid);\n\n    // Check values in the all the cells but the first and the last\n    // ones. In these cells, the interpolated function values should\n    // match exactly the values of the function being interpolated.\n    //\n    // On the boundary, we extrapolate the values of the function on\n    // the basis of its first derivative, so we do not expect the\n    // function values and its derivatives not to match.\n    for (int j = 0; j < kNumTestSamples; ++j) {\n      const double x = 1.0 + 7.0 / (kNumTestSamples - 1) * j;\n      double expected_f[kDataDimension], expected_dfdx[kDataDimension];\n      double f[kDataDimension], dfdx[kDataDimension];\n\n      for (int dim = 0; dim < kDataDimension; ++dim) {\n        expected_f[dim] =\n            (dim * dim  + 1) * (a  * x * x * x + b * x * x + c * x + d);\n        expected_dfdx[dim] = (dim * dim + 1) * (3.0 * a * x * x + 2.0 * b * x + c);\n      }\n\n      interpolator.Evaluate(x, f, dfdx);\n      for (int dim = 0; dim < kDataDimension; ++dim) {\n        EXPECT_NEAR(f[dim], expected_f[dim], kTolerance)\n            << \"x: \" << x << \" dim: \" << dim\n            << \" actual f(x): \" << expected_f[dim]\n            << \" estimated f(x): \" << f[dim];\n        EXPECT_NEAR(dfdx[dim], expected_dfdx[dim], kTolerance)\n            << \"x: \" << x << \" dim: \" << dim\n            << \" actual df(x)/dx: \" << expected_dfdx[dim]\n            << \" estimated df(x)/dx: \" << dfdx[dim];\n      }\n    }\n  }\n\n private:\n  static constexpr int kNumSamples = 10;\n  static constexpr int kNumTestSamples = 100;\n  std::unique_ptr<double[]> values_;\n};\n\nTEST_F(CubicInterpolatorTest, ConstantFunction) {\n  RunPolynomialInterpolationTest<1>(0.0, 0.0, 0.0, 0.5);\n  RunPolynomialInterpolationTest<2>(0.0, 0.0, 0.0, 0.5);\n  RunPolynomialInterpolationTest<3>(0.0, 0.0, 0.0, 0.5);\n}\n\nTEST_F(CubicInterpolatorTest, LinearFunction) {\n  RunPolynomialInterpolationTest<1>(0.0, 0.0, 1.0, 0.5);\n  RunPolynomialInterpolationTest<2>(0.0, 0.0, 1.0, 0.5);\n  RunPolynomialInterpolationTest<3>(0.0, 0.0, 1.0, 0.5);\n}\n\nTEST_F(CubicInterpolatorTest, QuadraticFunction) {\n  RunPolynomialInterpolationTest<1>(0.0, 0.4, 1.0, 0.5);\n  RunPolynomialInterpolationTest<2>(0.0, 0.4, 1.0, 0.5);\n  RunPolynomialInterpolationTest<3>(0.0, 0.4, 1.0, 0.5);\n}\n\n\nTEST(CubicInterpolator, JetEvaluation) {\n  const double values[] = {1.0, 2.0, 2.0, 5.0, 3.0, 9.0, 2.0, 7.0};\n\n  Grid1D<double, 2, true> grid(values, 0, 4);\n  CubicInterpolator<Grid1D<double, 2, true>> interpolator(grid);\n\n  double f[2], dfdx[2];\n  const double x = 2.5;\n  interpolator.Evaluate(x, f, dfdx);\n\n  // Create a Jet with the same scalar part as x, so that the output\n  // Jet will be evaluated at x.\n  Jet<double, 4> x_jet;\n  x_jet.a = x;\n  x_jet.v(0) = 1.0;\n  x_jet.v(1) = 1.1;\n  x_jet.v(2) = 1.2;\n  x_jet.v(3) = 1.3;\n\n  Jet<double, 4> f_jets[2];\n  interpolator.Evaluate(x_jet, f_jets);\n\n  // Check that the scalar part of the Jet is f(x).\n  EXPECT_EQ(f_jets[0].a, f[0]);\n  EXPECT_EQ(f_jets[1].a, f[1]);\n\n  // Check that the derivative part of the Jet is dfdx * x_jet.v\n  // by the chain rule.\n  EXPECT_NEAR((f_jets[0].v - dfdx[0] * x_jet.v).norm(), 0.0, kTolerance);\n  EXPECT_NEAR((f_jets[1].v - dfdx[1] * x_jet.v).norm(), 0.0, kTolerance);\n}\n\nclass BiCubicInterpolatorTest : public ::testing::Test {\n public:\n  // This class needs to have an Eigen aligned operator new as it contains\n  // fixed-size Eigen types.\n  EIGEN_MAKE_ALIGNED_OPERATOR_NEW\n\n  template <int kDataDimension>\n  void RunPolynomialInterpolationTest(const Eigen::Matrix3d& coeff) {\n    values_.reset(new double[kNumRows * kNumCols * kDataDimension]);\n    coeff_ = coeff;\n    double* v = values_.get();\n    for (int r = 0; r < kNumRows; ++r) {\n      for (int c = 0; c < kNumCols; ++c) {\n        for (int dim = 0; dim < kDataDimension; ++dim) {\n          *v++ = (dim * dim + 1) * EvaluateF(r, c);\n        }\n      }\n    }\n\n    Grid2D<double, kDataDimension> grid(values_.get(), 0, kNumRows, 0, kNumCols);\n    BiCubicInterpolator<Grid2D<double, kDataDimension>> interpolator(grid);\n\n    for (int j = 0; j < kNumRowSamples; ++j) {\n      const double r = 1.0 + 7.0 / (kNumRowSamples - 1) * j;\n      for (int k = 0; k < kNumColSamples; ++k) {\n        const double c = 1.0 + 7.0 / (kNumColSamples - 1) * k;\n        double f[kDataDimension], dfdr[kDataDimension], dfdc[kDataDimension];\n        interpolator.Evaluate(r, c, f, dfdr, dfdc);\n        for (int dim = 0; dim < kDataDimension; ++dim) {\n          EXPECT_NEAR(f[dim], (dim * dim + 1) * EvaluateF(r, c), kTolerance);\n          EXPECT_NEAR(dfdr[dim], (dim * dim + 1) * EvaluatedFdr(r, c), kTolerance);\n          EXPECT_NEAR(dfdc[dim], (dim * dim + 1) * EvaluatedFdc(r, c), kTolerance);\n        }\n      }\n    }\n  }\n\n private:\n  double EvaluateF(double r, double c) {\n    Eigen::Vector3d x;\n    x(0) = r;\n    x(1) = c;\n    x(2) = 1;\n    return x.transpose() * coeff_ * x;\n  }\n\n  double EvaluatedFdr(double r, double c) {\n    Eigen::Vector3d x;\n    x(0) = r;\n    x(1) = c;\n    x(2) = 1;\n    return (coeff_.row(0) + coeff_.col(0).transpose()) * x;\n  }\n\n  double EvaluatedFdc(double r, double c) {\n    Eigen::Vector3d x;\n    x(0) = r;\n    x(1) = c;\n    x(2) = 1;\n    return (coeff_.row(1) + coeff_.col(1).transpose()) * x;\n  }\n\n\n  Eigen::Matrix3d coeff_;\n  static constexpr int kNumRows = 10;\n  static constexpr int kNumCols = 10;\n  static constexpr int kNumRowSamples = 100;\n  static constexpr int kNumColSamples = 100;\n  std::unique_ptr<double[]> values_;\n};\n\nTEST_F(BiCubicInterpolatorTest, ZeroFunction) {\n  Eigen::Matrix3d coeff = Eigen::Matrix3d::Zero();\n  RunPolynomialInterpolationTest<1>(coeff);\n  RunPolynomialInterpolationTest<2>(coeff);\n  RunPolynomialInterpolationTest<3>(coeff);\n}\n\nTEST_F(BiCubicInterpolatorTest, Degree00Function) {\n  Eigen::Matrix3d coeff = Eigen::Matrix3d::Zero();\n  coeff(2, 2) = 1.0;\n  RunPolynomialInterpolationTest<1>(coeff);\n  RunPolynomialInterpolationTest<2>(coeff);\n  RunPolynomialInterpolationTest<3>(coeff);\n}\n\nTEST_F(BiCubicInterpolatorTest, Degree01Function) {\n  Eigen::Matrix3d coeff = Eigen::Matrix3d::Zero();\n  coeff(2, 2) = 1.0;\n  coeff(0, 2) = 0.1;\n  coeff(2, 0) = 0.1;\n  RunPolynomialInterpolationTest<1>(coeff);\n  RunPolynomialInterpolationTest<2>(coeff);\n  RunPolynomialInterpolationTest<3>(coeff);\n}\n\nTEST_F(BiCubicInterpolatorTest, Degree10Function) {\n  Eigen::Matrix3d coeff = Eigen::Matrix3d::Zero();\n  coeff(2, 2) = 1.0;\n  coeff(0, 1) = 0.1;\n  coeff(1, 0) = 0.1;\n  RunPolynomialInterpolationTest<1>(coeff);\n  RunPolynomialInterpolationTest<2>(coeff);\n  RunPolynomialInterpolationTest<3>(coeff);\n}\n\nTEST_F(BiCubicInterpolatorTest, Degree11Function) {\n  Eigen::Matrix3d coeff = Eigen::Matrix3d::Zero();\n  coeff(2, 2) = 1.0;\n  coeff(0, 1) = 0.1;\n  coeff(1, 0) = 0.1;\n  coeff(0, 2) = 0.2;\n  coeff(2, 0) = 0.2;\n  RunPolynomialInterpolationTest<1>(coeff);\n  RunPolynomialInterpolationTest<2>(coeff);\n  RunPolynomialInterpolationTest<3>(coeff);\n}\n\nTEST_F(BiCubicInterpolatorTest, Degree12Function) {\n  Eigen::Matrix3d coeff = Eigen::Matrix3d::Zero();\n  coeff(2, 2) = 1.0;\n  coeff(0, 1) = 0.1;\n  coeff(1, 0) = 0.1;\n  coeff(0, 2) = 0.2;\n  coeff(2, 0) = 0.2;\n  coeff(1, 1) = 0.3;\n  RunPolynomialInterpolationTest<1>(coeff);\n  RunPolynomialInterpolationTest<2>(coeff);\n  RunPolynomialInterpolationTest<3>(coeff);\n}\n\nTEST_F(BiCubicInterpolatorTest, Degree21Function) {\n  Eigen::Matrix3d coeff = Eigen::Matrix3d::Zero();\n  coeff(2, 2) = 1.0;\n  coeff(0, 1) = 0.1;\n  coeff(1, 0) = 0.1;\n  coeff(0, 2) = 0.2;\n  coeff(2, 0) = 0.2;\n  coeff(0, 0) = 0.3;\n  RunPolynomialInterpolationTest<1>(coeff);\n  RunPolynomialInterpolationTest<2>(coeff);\n  RunPolynomialInterpolationTest<3>(coeff);\n}\n\nTEST_F(BiCubicInterpolatorTest, Degree22Function) {\n  Eigen::Matrix3d coeff = Eigen::Matrix3d::Zero();\n  coeff(2, 2) = 1.0;\n  coeff(0, 1) = 0.1;\n  coeff(1, 0) = 0.1;\n  coeff(0, 2) = 0.2;\n  coeff(2, 0) = 0.2;\n  coeff(0, 0) = 0.3;\n  coeff(0, 1) = -0.4;\n  coeff(1, 0) = -0.4;\n  RunPolynomialInterpolationTest<1>(coeff);\n  RunPolynomialInterpolationTest<2>(coeff);\n  RunPolynomialInterpolationTest<3>(coeff);\n}\n\nTEST(BiCubicInterpolator, JetEvaluation) {\n  const double values[] = {1.0, 5.0, 2.0, 10.0, 2.0, 6.0, 3.0, 5.0,\n                           1.0, 2.0, 2.0,  2.0, 2.0, 2.0, 3.0, 1.0};\n\n  Grid2D<double, 2> grid(values, 0, 2, 0, 4);\n  BiCubicInterpolator<Grid2D<double, 2>> interpolator(grid);\n\n  double f[2], dfdr[2], dfdc[2];\n  const double r = 0.5;\n  const double c = 2.5;\n  interpolator.Evaluate(r, c, f, dfdr, dfdc);\n\n  // Create a Jet with the same scalar part as x, so that the output\n  // Jet will be evaluated at x.\n  Jet<double, 4> r_jet;\n  r_jet.a = r;\n  r_jet.v(0) = 1.0;\n  r_jet.v(1) = 1.1;\n  r_jet.v(2) = 1.2;\n  r_jet.v(3) = 1.3;\n\n  Jet<double, 4> c_jet;\n  c_jet.a = c;\n  c_jet.v(0) = 2.0;\n  c_jet.v(1) = 3.1;\n  c_jet.v(2) = 4.2;\n  c_jet.v(3) = 5.3;\n\n  Jet<double, 4> f_jets[2];\n  interpolator.Evaluate(r_jet, c_jet, f_jets);\n  EXPECT_EQ(f_jets[0].a, f[0]);\n  EXPECT_EQ(f_jets[1].a, f[1]);\n  EXPECT_NEAR((f_jets[0].v - dfdr[0] * r_jet.v - dfdc[0] * c_jet.v).norm(),\n              0.0,\n              kTolerance);\n  EXPECT_NEAR((f_jets[1].v - dfdr[1] * r_jet.v - dfdc[1] * c_jet.v).norm(),\n              0.0,\n              kTolerance);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/cxsparse.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: strandmark@google.com (Petter Strandmark)\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_NO_CXSPARSE\n\n#include \"ceres/cxsparse.h\"\n\n#include <string>\n#include <vector>\n\n#include \"ceres/compressed_col_sparse_matrix_utils.h\"\n#include \"ceres/compressed_row_sparse_matrix.h\"\n#include \"ceres/triplet_sparse_matrix.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::vector;\n\nCXSparse::CXSparse() : scratch_(NULL), scratch_size_(0) {}\n\nCXSparse::~CXSparse() {\n  if (scratch_size_ > 0) {\n    cs_di_free(scratch_);\n  }\n}\n\ncsn* CXSparse::Cholesky(cs_di* A, cs_dis* symbolic_factor) {\n  return cs_di_chol(A, symbolic_factor);\n}\n\nvoid CXSparse::Solve(cs_dis* symbolic_factor, csn* numeric_factor, double* b) {\n  // Make sure we have enough scratch space available.\n  const int num_cols = numeric_factor->L->n;\n  if (scratch_size_ < num_cols) {\n    if (scratch_size_ > 0) {\n      cs_di_free(scratch_);\n    }\n    scratch_ =\n        reinterpret_cast<CS_ENTRY*>(cs_di_malloc(num_cols, sizeof(CS_ENTRY)));\n    scratch_size_ = num_cols;\n  }\n\n  // When the Cholesky factor succeeded, these methods are\n  // guaranteed to succeeded as well. In the comments below, \"x\"\n  // refers to the scratch space.\n  //\n  // Set x = P * b.\n  CHECK(cs_di_ipvec(symbolic_factor->pinv, b, scratch_, num_cols));\n  // Set x = L \\ x.\n  CHECK(cs_di_lsolve(numeric_factor->L, scratch_));\n  // Set x = L' \\ x.\n  CHECK(cs_di_ltsolve(numeric_factor->L, scratch_));\n  // Set b = P' * x.\n  CHECK(cs_di_pvec(symbolic_factor->pinv, scratch_, b, num_cols));\n}\n\nbool CXSparse::SolveCholesky(cs_di* lhs, double* rhs_and_solution) {\n  return cs_cholsol(1, lhs, rhs_and_solution);\n}\n\ncs_dis* CXSparse::AnalyzeCholesky(cs_di* A) {\n  // order = 1 for Cholesky factor.\n  return cs_schol(1, A);\n}\n\ncs_dis* CXSparse::AnalyzeCholeskyWithNaturalOrdering(cs_di* A) {\n  // order = 0 for Natural ordering.\n  return cs_schol(0, A);\n}\n\ncs_dis* CXSparse::BlockAnalyzeCholesky(cs_di* A,\n                                       const vector<int>& row_blocks,\n                                       const vector<int>& col_blocks) {\n  const int num_row_blocks = row_blocks.size();\n  const int num_col_blocks = col_blocks.size();\n\n  vector<int> block_rows;\n  vector<int> block_cols;\n  CompressedColumnScalarMatrixToBlockMatrix(\n      A->i, A->p, row_blocks, col_blocks, &block_rows, &block_cols);\n  cs_di block_matrix;\n  block_matrix.m = num_row_blocks;\n  block_matrix.n = num_col_blocks;\n  block_matrix.nz = -1;\n  block_matrix.nzmax = block_rows.size();\n  block_matrix.p = &block_cols[0];\n  block_matrix.i = &block_rows[0];\n  block_matrix.x = NULL;\n\n  int* ordering = cs_amd(1, &block_matrix);\n  vector<int> block_ordering(num_row_blocks, -1);\n  std::copy(ordering, ordering + num_row_blocks, &block_ordering[0]);\n  cs_free(ordering);\n\n  vector<int> scalar_ordering;\n  BlockOrderingToScalarOrdering(row_blocks, block_ordering, &scalar_ordering);\n\n  cs_dis* symbolic_factor =\n      reinterpret_cast<cs_dis*>(cs_calloc(1, sizeof(cs_dis)));\n  symbolic_factor->pinv = cs_pinv(&scalar_ordering[0], A->n);\n  cs* permuted_A = cs_symperm(A, symbolic_factor->pinv, 0);\n\n  symbolic_factor->parent = cs_etree(permuted_A, 0);\n  int* postordering = cs_post(symbolic_factor->parent, A->n);\n  int* column_counts =\n      cs_counts(permuted_A, symbolic_factor->parent, postordering, 0);\n  cs_free(postordering);\n  cs_spfree(permuted_A);\n\n  symbolic_factor->cp = (int*)cs_malloc(A->n + 1, sizeof(int));\n  symbolic_factor->lnz = cs_cumsum(symbolic_factor->cp, column_counts, A->n);\n  symbolic_factor->unz = symbolic_factor->lnz;\n\n  cs_free(column_counts);\n\n  if (symbolic_factor->lnz < 0) {\n    cs_sfree(symbolic_factor);\n    symbolic_factor = NULL;\n  }\n\n  return symbolic_factor;\n}\n\ncs_di CXSparse::CreateSparseMatrixTransposeView(CompressedRowSparseMatrix* A) {\n  cs_di At;\n  At.m = A->num_cols();\n  At.n = A->num_rows();\n  At.nz = -1;\n  At.nzmax = A->num_nonzeros();\n  At.p = A->mutable_rows();\n  At.i = A->mutable_cols();\n  At.x = A->mutable_values();\n  return At;\n}\n\ncs_di* CXSparse::CreateSparseMatrix(TripletSparseMatrix* tsm) {\n  cs_di_sparse tsm_wrapper;\n  tsm_wrapper.nzmax = tsm->num_nonzeros();\n  tsm_wrapper.nz = tsm->num_nonzeros();\n  tsm_wrapper.m = tsm->num_rows();\n  tsm_wrapper.n = tsm->num_cols();\n  tsm_wrapper.p = tsm->mutable_cols();\n  tsm_wrapper.i = tsm->mutable_rows();\n  tsm_wrapper.x = tsm->mutable_values();\n\n  return cs_compress(&tsm_wrapper);\n}\n\nvoid CXSparse::ApproximateMinimumDegreeOrdering(cs_di* A, int* ordering) {\n  int* cs_ordering = cs_amd(1, A);\n  std::copy(cs_ordering, cs_ordering + A->m, ordering);\n  cs_free(cs_ordering);\n}\n\ncs_di* CXSparse::TransposeMatrix(cs_di* A) { return cs_di_transpose(A, 1); }\n\ncs_di* CXSparse::MatrixMatrixMultiply(cs_di* A, cs_di* B) {\n  return cs_di_multiply(A, B);\n}\n\nvoid CXSparse::Free(cs_di* sparse_matrix) { cs_di_spfree(sparse_matrix); }\n\nvoid CXSparse::Free(cs_dis* symbolic_factor) { cs_di_sfree(symbolic_factor); }\n\nvoid CXSparse::Free(csn* numeric_factor) { cs_di_nfree(numeric_factor); }\n\nstd::unique_ptr<SparseCholesky> CXSparseCholesky::Create(\n    const OrderingType ordering_type) {\n  return std::unique_ptr<SparseCholesky>(new CXSparseCholesky(ordering_type));\n}\n\nCompressedRowSparseMatrix::StorageType CXSparseCholesky::StorageType() const {\n  return CompressedRowSparseMatrix::LOWER_TRIANGULAR;\n}\n\nCXSparseCholesky::CXSparseCholesky(const OrderingType ordering_type)\n    : ordering_type_(ordering_type),\n      symbolic_factor_(NULL),\n      numeric_factor_(NULL) {}\n\nCXSparseCholesky::~CXSparseCholesky() {\n  FreeSymbolicFactorization();\n  FreeNumericFactorization();\n}\n\nLinearSolverTerminationType CXSparseCholesky::Factorize(\n    CompressedRowSparseMatrix* lhs, std::string* message) {\n  CHECK_EQ(lhs->storage_type(), StorageType());\n  if (lhs == NULL) {\n    *message = \"Failure: Input lhs is NULL.\";\n    return LINEAR_SOLVER_FATAL_ERROR;\n  }\n\n  cs_di cs_lhs = cs_.CreateSparseMatrixTransposeView(lhs);\n\n  if (symbolic_factor_ == NULL) {\n    if (ordering_type_ == NATURAL) {\n      symbolic_factor_ = cs_.AnalyzeCholeskyWithNaturalOrdering(&cs_lhs);\n    } else {\n      if (!lhs->col_blocks().empty() && !(lhs->row_blocks().empty())) {\n        symbolic_factor_ = cs_.BlockAnalyzeCholesky(\n            &cs_lhs, lhs->col_blocks(), lhs->row_blocks());\n      } else {\n        symbolic_factor_ = cs_.AnalyzeCholesky(&cs_lhs);\n      }\n    }\n\n    if (symbolic_factor_ == NULL) {\n      *message = \"CXSparse Failure : Symbolic factorization failed.\";\n      return LINEAR_SOLVER_FATAL_ERROR;\n    }\n  }\n\n  FreeNumericFactorization();\n  numeric_factor_ = cs_.Cholesky(&cs_lhs, symbolic_factor_);\n  if (numeric_factor_ == NULL) {\n    *message = \"CXSparse Failure : Numeric factorization failed.\";\n    return LINEAR_SOLVER_FAILURE;\n  }\n\n  return LINEAR_SOLVER_SUCCESS;\n}\n\nLinearSolverTerminationType CXSparseCholesky::Solve(const double* rhs,\n                                                    double* solution,\n                                                    std::string* message) {\n  CHECK(numeric_factor_ != NULL)\n      << \"Solve called without a call to Factorize first.\";\n  const int num_cols = numeric_factor_->L->n;\n  memcpy(solution, rhs, num_cols * sizeof(*solution));\n  cs_.Solve(symbolic_factor_, numeric_factor_, solution);\n  return LINEAR_SOLVER_SUCCESS;\n}\n\nvoid CXSparseCholesky::FreeSymbolicFactorization() {\n  if (symbolic_factor_ != NULL) {\n    cs_.Free(symbolic_factor_);\n    symbolic_factor_ = NULL;\n  }\n}\n\nvoid CXSparseCholesky::FreeNumericFactorization() {\n  if (numeric_factor_ != NULL) {\n    cs_.Free(numeric_factor_);\n    numeric_factor_ = NULL;\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_CXSPARSE\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/cxsparse.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: strandmark@google.com (Petter Strandmark)\n\n#ifndef CERES_INTERNAL_CXSPARSE_H_\n#define CERES_INTERNAL_CXSPARSE_H_\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_NO_CXSPARSE\n\n#include <memory>\n#include <string>\n#include <vector>\n\n#include \"ceres/linear_solver.h\"\n#include \"ceres/sparse_cholesky.h\"\n#include \"cs.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass CompressedRowSparseMatrix;\nclass TripletSparseMatrix;\n\n// This object provides access to solving linear systems using Cholesky\n// factorization with a known symbolic factorization. This features does not\n// explicitly exist in CXSparse. The methods in the class are nonstatic because\n// the class manages internal scratch space.\nclass CXSparse {\n public:\n  CXSparse();\n  ~CXSparse();\n\n  // Solve the system lhs * solution = rhs in place by using an\n  // approximate minimum degree fill reducing ordering.\n  bool SolveCholesky(cs_di* lhs, double* rhs_and_solution);\n\n  // Solves a linear system given its symbolic and numeric factorization.\n  void Solve(cs_dis* symbolic_factor,\n             csn* numeric_factor,\n             double* rhs_and_solution);\n\n  // Compute the numeric Cholesky factorization of A, given its\n  // symbolic factorization.\n  //\n  // Caller owns the result.\n  csn* Cholesky(cs_di* A, cs_dis* symbolic_factor);\n\n  // Creates a sparse matrix from a compressed-column form. No memory is\n  // allocated or copied; the structure A is filled out with info from the\n  // argument.\n  cs_di CreateSparseMatrixTransposeView(CompressedRowSparseMatrix* A);\n\n  // Creates a new matrix from a triplet form. Deallocate the returned matrix\n  // with Free. May return NULL if the compression or allocation fails.\n  cs_di* CreateSparseMatrix(TripletSparseMatrix* A);\n\n  // B = A'\n  //\n  // The returned matrix should be deallocated with Free when not used\n  // anymore.\n  cs_di* TransposeMatrix(cs_di* A);\n\n  // C = A * B\n  //\n  // The returned matrix should be deallocated with Free when not used\n  // anymore.\n  cs_di* MatrixMatrixMultiply(cs_di* A, cs_di* B);\n\n  // Computes a symbolic factorization of A that can be used in SolveCholesky.\n  //\n  // The returned matrix should be deallocated with Free when not used anymore.\n  cs_dis* AnalyzeCholesky(cs_di* A);\n\n  // Computes a symbolic factorization of A that can be used in\n  // SolveCholesky, but does not compute a fill-reducing ordering.\n  //\n  // The returned matrix should be deallocated with Free when not used anymore.\n  cs_dis* AnalyzeCholeskyWithNaturalOrdering(cs_di* A);\n\n  // Computes a symbolic factorization of A that can be used in\n  // SolveCholesky. The difference from AnalyzeCholesky is that this\n  // function first detects the block sparsity of the matrix using\n  // information about the row and column blocks and uses this block\n  // sparse matrix to find a fill-reducing ordering. This ordering is\n  // then used to find a symbolic factorization. This can result in a\n  // significant performance improvement AnalyzeCholesky on block\n  // sparse matrices.\n  //\n  // The returned matrix should be deallocated with Free when not used\n  // anymore.\n  cs_dis* BlockAnalyzeCholesky(cs_di* A,\n                               const std::vector<int>& row_blocks,\n                               const std::vector<int>& col_blocks);\n\n  // Compute an fill-reducing approximate minimum degree ordering of\n  // the matrix A. ordering should be non-NULL and should point to\n  // enough memory to hold the ordering for the rows of A.\n  void ApproximateMinimumDegreeOrdering(cs_di* A, int* ordering);\n\n  void Free(cs_di* sparse_matrix);\n  void Free(cs_dis* symbolic_factorization);\n  void Free(csn* numeric_factorization);\n\n private:\n  // Cached scratch space\n  CS_ENTRY* scratch_;\n  int scratch_size_;\n};\n\n// An implementation of SparseCholesky interface using the CXSparse\n// library.\nclass CXSparseCholesky : public SparseCholesky {\n public:\n  // Factory\n  static std::unique_ptr<SparseCholesky> Create(OrderingType ordering_type);\n\n  // SparseCholesky interface.\n  virtual ~CXSparseCholesky();\n  CompressedRowSparseMatrix::StorageType StorageType() const final;\n  LinearSolverTerminationType Factorize(CompressedRowSparseMatrix* lhs,\n                                        std::string* message) final;\n  LinearSolverTerminationType Solve(const double* rhs,\n                                    double* solution,\n                                    std::string* message) final;\n\n private:\n  CXSparseCholesky(const OrderingType ordering_type);\n  void FreeSymbolicFactorization();\n  void FreeNumericFactorization();\n\n  const OrderingType ordering_type_;\n  CXSparse cs_;\n  cs_dis* symbolic_factor_;\n  csn* numeric_factor_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#else   // CERES_NO_CXSPARSE\n\ntypedef void cs_dis;\n\nclass CXSparse {\n public:\n  void Free(void* arg) {}\n};\n#endif  // CERES_NO_CXSPARSE\n\n#endif  // CERES_INTERNAL_CXSPARSE_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/dense_jacobian_writer.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n//\n// A jacobian writer that writes to dense Eigen matrices.\n\n#ifndef CERES_INTERNAL_DENSE_JACOBIAN_WRITER_H_\n#define CERES_INTERNAL_DENSE_JACOBIAN_WRITER_H_\n\n#include \"ceres/casts.h\"\n#include \"ceres/dense_sparse_matrix.h\"\n#include \"ceres/parameter_block.h\"\n#include \"ceres/program.h\"\n#include \"ceres/residual_block.h\"\n#include \"ceres/scratch_evaluate_preparer.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass DenseJacobianWriter {\n public:\n  DenseJacobianWriter(Evaluator::Options /* ignored */,\n                      Program* program)\n    : program_(program) {\n  }\n\n  // JacobianWriter interface.\n\n  // Since the dense matrix has different layout than that assumed by the cost\n  // functions, use scratch space to store the jacobians temporarily then copy\n  // them over to the larger jacobian later.\n  ScratchEvaluatePreparer* CreateEvaluatePreparers(int num_threads) {\n    return ScratchEvaluatePreparer::Create(*program_, num_threads);\n  }\n\n  SparseMatrix* CreateJacobian() const {\n    return new DenseSparseMatrix(program_->NumResiduals(),\n                                 program_->NumEffectiveParameters(),\n                                 true);\n  }\n\n  void Write(int residual_id,\n             int residual_offset,\n             double **jacobians,\n             SparseMatrix* jacobian) {\n    DenseSparseMatrix* dense_jacobian = down_cast<DenseSparseMatrix*>(jacobian);\n    const ResidualBlock* residual_block =\n        program_->residual_blocks()[residual_id];\n    int num_parameter_blocks = residual_block->NumParameterBlocks();\n    int num_residuals = residual_block->NumResiduals();\n\n    // Now copy the jacobians for each parameter into the dense jacobian matrix.\n    for (int j = 0; j < num_parameter_blocks; ++j) {\n      ParameterBlock* parameter_block = residual_block->parameter_blocks()[j];\n\n      // If the parameter block is fixed, then there is nothing to do.\n      if (parameter_block->IsConstant()) {\n        continue;\n      }\n\n      const int parameter_block_size = parameter_block->LocalSize();\n      ConstMatrixRef parameter_jacobian(jacobians[j],\n                                        num_residuals,\n                                        parameter_block_size);\n\n      dense_jacobian->mutable_matrix().block(\n          residual_offset,\n          parameter_block->delta_offset(),\n          num_residuals,\n          parameter_block_size) = parameter_jacobian;\n    }\n  }\n\n private:\n  Program* program_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_DENSE_JACOBIAN_WRITER_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/dense_linear_solver_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include <memory>\n#include \"ceres/casts.h\"\n#include \"ceres/context_impl.h\"\n#include \"ceres/linear_least_squares_problems.h\"\n#include \"ceres/linear_solver.h\"\n#include \"ceres/triplet_sparse_matrix.h\"\n#include \"ceres/types.h\"\n#include \"glog/logging.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntypedef ::testing::\n    tuple<LinearSolverType, DenseLinearAlgebraLibraryType, bool, int>\n        Param;\n\nstatic std::string ParamInfoToString(testing::TestParamInfo<Param> info) {\n  Param param = info.param;\n  std::stringstream ss;\n  ss << LinearSolverTypeToString(::testing::get<0>(param)) << \"_\"\n     << DenseLinearAlgebraLibraryTypeToString(::testing::get<1>(param)) << \"_\"\n     << (::testing::get<2>(param) ? \"Regularized\" : \"Unregularized\") << \"_\"\n     << ::testing::get<3>(param);\n  return ss.str();\n}\n\nclass DenseLinearSolverTest : public ::testing::TestWithParam<Param> {};\n\nTEST_P(DenseLinearSolverTest, _) {\n  Param param = GetParam();\n  const bool regularized = testing::get<2>(param);\n\n  std::unique_ptr<LinearLeastSquaresProblem> problem(\n      CreateLinearLeastSquaresProblemFromId(testing::get<3>(param)));\n  DenseSparseMatrix lhs(*down_cast<TripletSparseMatrix*>(problem->A.get()));\n\n  const int num_cols = lhs.num_cols();\n  const int num_rows = lhs.num_rows();\n\n  Vector rhs = Vector::Zero(num_rows + num_cols);\n  rhs.head(num_rows) = ConstVectorRef(problem->b.get(), num_rows);\n\n  LinearSolver::Options options;\n  options.type = ::testing::get<0>(param);\n  options.dense_linear_algebra_library_type = ::testing::get<1>(param);\n  ContextImpl context;\n  options.context = &context;\n  std::unique_ptr<LinearSolver> solver(LinearSolver::Create(options));\n\n  LinearSolver::PerSolveOptions per_solve_options;\n  if (regularized) {\n    per_solve_options.D = problem->D.get();\n  }\n\n  Vector solution(num_cols);\n  LinearSolver::Summary summary =\n      solver->Solve(&lhs, rhs.data(), per_solve_options, solution.data());\n  EXPECT_EQ(summary.termination_type, LINEAR_SOLVER_SUCCESS);\n\n  // If solving for the regularized solution, add the diagonal to the\n  // matrix. This makes subsequent computations simpler.\n  if (testing::get<2>(param)) {\n    lhs.AppendDiagonal(problem->D.get());\n  };\n\n  Vector tmp = Vector::Zero(num_rows + num_cols);\n  lhs.RightMultiply(solution.data(), tmp.data());\n  Vector actual_normal_rhs = Vector::Zero(num_cols);\n  lhs.LeftMultiply(tmp.data(), actual_normal_rhs.data());\n\n  Vector expected_normal_rhs = Vector::Zero(num_cols);\n  lhs.LeftMultiply(rhs.data(), expected_normal_rhs.data());\n  const double residual = (expected_normal_rhs - actual_normal_rhs).norm() /\n                          expected_normal_rhs.norm();\n\n  EXPECT_NEAR(residual, 0.0, 10 * std::numeric_limits<double>::epsilon());\n}\n\nnamespace {\n\n// TODO(sameeragarwal): Should we move away from hard coded linear\n// least squares problem to randomly generated ones?\n#ifndef CERES_NO_LAPACK\n\nINSTANTIATE_TEST_SUITE_P(\n    DenseLinearSolver,\n    DenseLinearSolverTest,\n    ::testing::Combine(::testing::Values(DENSE_QR, DENSE_NORMAL_CHOLESKY),\n                       ::testing::Values(EIGEN, LAPACK),\n                       ::testing::Values(true, false),\n                       ::testing::Values(0, 1)),\n    ParamInfoToString);\n\n#else\n\nINSTANTIATE_TEST_SUITE_P(\n    DenseLinearSolver,\n    DenseLinearSolverTest,\n    ::testing::Combine(::testing::Values(DENSE_QR, DENSE_NORMAL_CHOLESKY),\n                       ::testing::Values(EIGEN),\n                       ::testing::Values(true, false),\n                       ::testing::Values(0, 1)),\n    ParamInfoToString);\n\n#endif\n}  // namespace\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/dense_normal_cholesky_solver.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/dense_normal_cholesky_solver.h\"\n\n#include <cstddef>\n\n#include \"Eigen/Dense\"\n#include \"ceres/blas.h\"\n#include \"ceres/dense_sparse_matrix.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/lapack.h\"\n#include \"ceres/linear_solver.h\"\n#include \"ceres/types.h\"\n#include \"ceres/wall_time.h\"\n\nnamespace ceres {\nnamespace internal {\n\nDenseNormalCholeskySolver::DenseNormalCholeskySolver(\n    const LinearSolver::Options& options)\n    : options_(options) {}\n\nLinearSolver::Summary DenseNormalCholeskySolver::SolveImpl(\n    DenseSparseMatrix* A,\n    const double* b,\n    const LinearSolver::PerSolveOptions& per_solve_options,\n    double* x) {\n  if (options_.dense_linear_algebra_library_type == EIGEN) {\n    return SolveUsingEigen(A, b, per_solve_options, x);\n  } else {\n    return SolveUsingLAPACK(A, b, per_solve_options, x);\n  }\n}\n\nLinearSolver::Summary DenseNormalCholeskySolver::SolveUsingEigen(\n    DenseSparseMatrix* A,\n    const double* b,\n    const LinearSolver::PerSolveOptions& per_solve_options,\n    double* x) {\n  EventLogger event_logger(\"DenseNormalCholeskySolver::Solve\");\n\n  const int num_rows = A->num_rows();\n  const int num_cols = A->num_cols();\n\n  ConstColMajorMatrixRef Aref = A->matrix();\n  Matrix lhs(num_cols, num_cols);\n  lhs.setZero();\n\n  event_logger.AddEvent(\"Setup\");\n\n  //   lhs += A'A\n  //\n  // Using rankUpdate instead of GEMM, exposes the fact that its the\n  // same matrix being multiplied with itself and that the product is\n  // symmetric.\n  lhs.selfadjointView<Eigen::Upper>().rankUpdate(Aref.transpose());\n\n  //   rhs = A'b\n  Vector rhs = Aref.transpose() * ConstVectorRef(b, num_rows);\n\n  if (per_solve_options.D != NULL) {\n    ConstVectorRef D(per_solve_options.D, num_cols);\n    lhs += D.array().square().matrix().asDiagonal();\n  }\n  event_logger.AddEvent(\"Product\");\n\n  LinearSolver::Summary summary;\n  summary.num_iterations = 1;\n  summary.termination_type = LINEAR_SOLVER_SUCCESS;\n  Eigen::LLT<Matrix, Eigen::Upper> llt =\n      lhs.selfadjointView<Eigen::Upper>().llt();\n\n  if (llt.info() != Eigen::Success) {\n    summary.termination_type = LINEAR_SOLVER_FAILURE;\n    summary.message = \"Eigen LLT decomposition failed.\";\n  } else {\n    summary.termination_type = LINEAR_SOLVER_SUCCESS;\n    summary.message = \"Success.\";\n  }\n\n  VectorRef(x, num_cols) = llt.solve(rhs);\n  event_logger.AddEvent(\"Solve\");\n  return summary;\n}\n\nLinearSolver::Summary DenseNormalCholeskySolver::SolveUsingLAPACK(\n    DenseSparseMatrix* A,\n    const double* b,\n    const LinearSolver::PerSolveOptions& per_solve_options,\n    double* x) {\n  EventLogger event_logger(\"DenseNormalCholeskySolver::Solve\");\n\n  if (per_solve_options.D != NULL) {\n    // Temporarily append a diagonal block to the A matrix, but undo\n    // it before returning the matrix to the user.\n    A->AppendDiagonal(per_solve_options.D);\n  }\n\n  const int num_cols = A->num_cols();\n  Matrix lhs(num_cols, num_cols);\n  event_logger.AddEvent(\"Setup\");\n\n  // lhs = A'A\n  //\n  // Note: This is a bit delicate, it assumes that the stride on this\n  // matrix is the same as the number of rows.\n  BLAS::SymmetricRankKUpdate(A->num_rows(),\n                             num_cols,\n                             A->values(),\n                             true,\n                             1.0,\n                             0.0,\n                             lhs.data());\n\n  if (per_solve_options.D != NULL) {\n    // Undo the modifications to the matrix A.\n    A->RemoveDiagonal();\n  }\n\n  // TODO(sameeragarwal): Replace this with a gemv call for true blasness.\n  //   rhs = A'b\n  VectorRef(x, num_cols) =\n      A->matrix().transpose() * ConstVectorRef(b, A->num_rows());\n  event_logger.AddEvent(\"Product\");\n\n  LinearSolver::Summary summary;\n  summary.num_iterations = 1;\n  summary.termination_type =\n      LAPACK::SolveInPlaceUsingCholesky(num_cols,\n                                        lhs.data(),\n                                        x,\n                                        &summary.message);\n  event_logger.AddEvent(\"Solve\");\n  return summary;\n}\n}   // namespace internal\n}   // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/dense_normal_cholesky_solver.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Solve dense rectangular systems Ax = b by forming the normal\n// equations and solving them using the Cholesky factorization.\n\n#ifndef CERES_INTERNAL_DENSE_NORMAL_CHOLESKY_SOLVER_H_\n#define CERES_INTERNAL_DENSE_NORMAL_CHOLESKY_SOLVER_H_\n\n#include \"ceres/linear_solver.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass DenseSparseMatrix;\n\n// This class implements the LinearSolver interface for solving\n// rectangular/unsymmetric (well constrained) linear systems of the\n// form\n//\n//   Ax = b\n//\n// Since there does not usually exist a solution that satisfies these\n// equations, the solver instead solves the linear least squares\n// problem\n//\n//   min_x |Ax - b|^2\n//\n// Setting the gradient of the above optimization problem to zero\n// gives us the normal equations\n//\n//   A'Ax = A'b\n//\n// A'A is a positive definite matrix (hopefully), and the resulting\n// linear system can be solved using Cholesky factorization.\n//\n// If the PerSolveOptions struct has a non-null array D, then the\n// augmented/regularized linear system\n//\n//   [    A    ]x = [b]\n//   [ diag(D) ]    [0]\n//\n// is solved.\n//\n// This class uses the LDLT factorization routines from the Eigen\n// library. This solver always returns a solution, it is the user's\n// responsibility to judge if the solution is good enough for their\n// purposes.\nclass DenseNormalCholeskySolver: public DenseSparseMatrixSolver {\n public:\n  explicit DenseNormalCholeskySolver(const LinearSolver::Options& options);\n\n private:\n  LinearSolver::Summary SolveImpl(\n      DenseSparseMatrix* A,\n      const double* b,\n      const LinearSolver::PerSolveOptions& per_solve_options,\n      double* x) final;\n\n  LinearSolver::Summary SolveUsingLAPACK(\n      DenseSparseMatrix* A,\n      const double* b,\n      const LinearSolver::PerSolveOptions& per_solve_options,\n      double* x);\n\n  LinearSolver::Summary SolveUsingEigen(\n      DenseSparseMatrix* A,\n      const double* b,\n      const LinearSolver::PerSolveOptions& per_solve_options,\n      double* x);\n\n  const LinearSolver::Options options_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_DENSE_NORMAL_CHOLESKY_SOLVER_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/dense_qr_solver.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/dense_qr_solver.h\"\n\n#include <cstddef>\n#include \"Eigen/Dense\"\n#include \"ceres/dense_sparse_matrix.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/lapack.h\"\n#include \"ceres/linear_solver.h\"\n#include \"ceres/types.h\"\n#include \"ceres/wall_time.h\"\n\nnamespace ceres {\nnamespace internal {\n\nDenseQRSolver::DenseQRSolver(const LinearSolver::Options& options)\n    : options_(options) {\n  work_.resize(1);\n}\n\nLinearSolver::Summary DenseQRSolver::SolveImpl(\n    DenseSparseMatrix* A,\n    const double* b,\n    const LinearSolver::PerSolveOptions& per_solve_options,\n    double* x) {\n  if (options_.dense_linear_algebra_library_type == EIGEN) {\n    return SolveUsingEigen(A, b, per_solve_options, x);\n  } else {\n    return SolveUsingLAPACK(A, b, per_solve_options, x);\n  }\n}\n\nLinearSolver::Summary DenseQRSolver::SolveUsingLAPACK(\n    DenseSparseMatrix* A,\n    const double* b,\n    const LinearSolver::PerSolveOptions& per_solve_options,\n    double* x) {\n  EventLogger event_logger(\"DenseQRSolver::Solve\");\n\n  const int num_rows = A->num_rows();\n  const int num_cols = A->num_cols();\n\n  if (per_solve_options.D != NULL) {\n    // Temporarily append a diagonal block to the A matrix, but undo\n    // it before returning the matrix to the user.\n    A->AppendDiagonal(per_solve_options.D);\n  }\n\n  // TODO(sameeragarwal): Since we are copying anyways, the diagonal\n  // can be appended to the matrix instead of doing it on A.\n  lhs_ =  A->matrix();\n\n  if (per_solve_options.D != NULL) {\n    // Undo the modifications to the matrix A.\n    A->RemoveDiagonal();\n  }\n\n  // rhs = [b;0] to account for the additional rows in the lhs.\n  if (rhs_.rows() != lhs_.rows()) {\n    rhs_.resize(lhs_.rows());\n  }\n  rhs_.setZero();\n  rhs_.head(num_rows) = ConstVectorRef(b, num_rows);\n\n  if (work_.rows() == 1) {\n    const int work_size =\n        LAPACK::EstimateWorkSizeForQR(lhs_.rows(), lhs_.cols());\n    VLOG(3) << \"Working memory for Dense QR factorization: \"\n            << work_size * sizeof(double);\n    work_.resize(work_size);\n  }\n\n  LinearSolver::Summary summary;\n  summary.num_iterations = 1;\n  summary.termination_type = LAPACK::SolveInPlaceUsingQR(lhs_.rows(),\n                                                         lhs_.cols(),\n                                                         lhs_.data(),\n                                                         work_.rows(),\n                                                         work_.data(),\n                                                         rhs_.data(),\n                                                         &summary.message);\n  event_logger.AddEvent(\"Solve\");\n  if (summary.termination_type == LINEAR_SOLVER_SUCCESS) {\n    VectorRef(x, num_cols) = rhs_.head(num_cols);\n  }\n\n  event_logger.AddEvent(\"TearDown\");\n  return summary;\n}\n\nLinearSolver::Summary DenseQRSolver::SolveUsingEigen(\n    DenseSparseMatrix* A,\n    const double* b,\n    const LinearSolver::PerSolveOptions& per_solve_options,\n    double* x) {\n  EventLogger event_logger(\"DenseQRSolver::Solve\");\n\n  const int num_rows = A->num_rows();\n  const int num_cols = A->num_cols();\n\n  if (per_solve_options.D != NULL) {\n    // Temporarily append a diagonal block to the A matrix, but undo\n    // it before returning the matrix to the user.\n    A->AppendDiagonal(per_solve_options.D);\n  }\n\n  // rhs = [b;0] to account for the additional rows in the lhs.\n  const int augmented_num_rows =\n      num_rows + ((per_solve_options.D != NULL) ? num_cols : 0);\n  if (rhs_.rows() != augmented_num_rows) {\n    rhs_.resize(augmented_num_rows);\n    rhs_.setZero();\n  }\n  rhs_.head(num_rows) = ConstVectorRef(b, num_rows);\n  event_logger.AddEvent(\"Setup\");\n\n  // Solve the system.\n  VectorRef(x, num_cols) = A->matrix().householderQr().solve(rhs_);\n  event_logger.AddEvent(\"Solve\");\n\n  if (per_solve_options.D != NULL) {\n    // Undo the modifications to the matrix A.\n    A->RemoveDiagonal();\n  }\n\n  // We always succeed, since the QR solver returns the best solution\n  // it can. It is the job of the caller to determine if the solution\n  // is good enough or not.\n  LinearSolver::Summary summary;\n  summary.num_iterations = 1;\n  summary.termination_type = LINEAR_SOLVER_SUCCESS;\n  summary.message = \"Success.\";\n\n  event_logger.AddEvent(\"TearDown\");\n  return summary;\n}\n\n}   // namespace internal\n}   // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/dense_qr_solver.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Solve dense rectangular systems Ax = b using the QR factorization.\n#ifndef CERES_INTERNAL_DENSE_QR_SOLVER_H_\n#define CERES_INTERNAL_DENSE_QR_SOLVER_H_\n\n#include \"ceres/linear_solver.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass DenseSparseMatrix;\n\n// This class implements the LinearSolver interface for solving\n// rectangular/unsymmetric (well constrained) linear systems of the\n// form\n//\n//   Ax = b\n//\n// Since there does not usually exist a solution that satisfies these\n// equations, the solver instead solves the linear least squares\n// problem\n//\n//   min_x |Ax - b|^2\n//\n// The solution strategy is based on computing the QR decomposition of\n// A, i.e.\n//\n//   A = QR\n//\n// Where Q is an orthonormal matrix and R is an upper triangular\n// matrix. Then\n//\n//     Ax = b\n//    QRx = b\n//  Q'QRx = Q'b\n//     Rx = Q'b\n//      x = R^{-1} Q'b\n//\n// If the PerSolveOptions struct has a non-null array D, then the\n// augmented/regularized linear system\n//\n//   [    A    ]x = [b]\n//   [ diag(D) ]    [0]\n//\n// is solved.\n//\n// This class uses the dense QR factorization routines from the Eigen\n// library. This solver always returns a solution, it is the user's\n// responsibility to judge if the solution is good enough for their\n// purposes.\nclass DenseQRSolver: public DenseSparseMatrixSolver {\n public:\n  explicit DenseQRSolver(const LinearSolver::Options& options);\n\n private:\n  LinearSolver::Summary SolveImpl(\n      DenseSparseMatrix* A,\n      const double* b,\n      const LinearSolver::PerSolveOptions& per_solve_options,\n      double* x) final;\n\n  LinearSolver::Summary SolveUsingEigen(\n      DenseSparseMatrix* A,\n      const double* b,\n      const LinearSolver::PerSolveOptions& per_solve_options,\n      double* x);\n\n  LinearSolver::Summary SolveUsingLAPACK(\n      DenseSparseMatrix* A,\n      const double* b,\n      const LinearSolver::PerSolveOptions& per_solve_options,\n      double* x);\n\n  const LinearSolver::Options options_;\n  ColMajorMatrix lhs_;\n  Vector rhs_;\n  Vector work_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_DENSE_QR_SOLVER_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/dense_sparse_matrix.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n\n#include \"ceres/dense_sparse_matrix.h\"\n\n#include <algorithm>\n#include \"ceres/triplet_sparse_matrix.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/internal/port.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nDenseSparseMatrix::DenseSparseMatrix(int num_rows, int num_cols)\n    : has_diagonal_appended_(false),\n      has_diagonal_reserved_(false) {\n  m_.resize(num_rows, num_cols);\n  m_.setZero();\n}\n\nDenseSparseMatrix::DenseSparseMatrix(int num_rows,\n                                     int num_cols,\n                                     bool reserve_diagonal)\n    : has_diagonal_appended_(false),\n      has_diagonal_reserved_(reserve_diagonal) {\n  if (reserve_diagonal) {\n    // Allocate enough space for the diagonal.\n    m_.resize(num_rows +  num_cols, num_cols);\n  } else {\n    m_.resize(num_rows, num_cols);\n  }\n  m_.setZero();\n}\n\nDenseSparseMatrix::DenseSparseMatrix(const TripletSparseMatrix& m)\n    : m_(Eigen::MatrixXd::Zero(m.num_rows(), m.num_cols())),\n      has_diagonal_appended_(false),\n      has_diagonal_reserved_(false) {\n  const double *values = m.values();\n  const int *rows = m.rows();\n  const int *cols = m.cols();\n  int num_nonzeros = m.num_nonzeros();\n\n  for (int i = 0; i < num_nonzeros; ++i) {\n    m_(rows[i], cols[i]) += values[i];\n  }\n}\n\nDenseSparseMatrix::DenseSparseMatrix(const ColMajorMatrix& m)\n    : m_(m),\n      has_diagonal_appended_(false),\n      has_diagonal_reserved_(false) {\n}\n\nvoid DenseSparseMatrix::SetZero() {\n  m_.setZero();\n}\n\nvoid DenseSparseMatrix::RightMultiply(const double* x, double* y) const {\n  VectorRef(y, num_rows()) += matrix() * ConstVectorRef(x, num_cols());\n}\n\nvoid DenseSparseMatrix::LeftMultiply(const double* x, double* y) const {\n  VectorRef(y, num_cols()) +=\n      matrix().transpose() * ConstVectorRef(x, num_rows());\n}\n\nvoid DenseSparseMatrix::SquaredColumnNorm(double* x) const {\n  VectorRef(x, num_cols()) = m_.colwise().squaredNorm();\n}\n\nvoid DenseSparseMatrix::ScaleColumns(const double* scale) {\n  m_ *= ConstVectorRef(scale, num_cols()).asDiagonal();\n}\n\nvoid DenseSparseMatrix::ToDenseMatrix(Matrix* dense_matrix) const {\n  *dense_matrix = m_.block(0, 0, num_rows(), num_cols());\n}\n\nvoid DenseSparseMatrix::AppendDiagonal(double *d) {\n  CHECK(!has_diagonal_appended_);\n  if (!has_diagonal_reserved_) {\n    ColMajorMatrix tmp = m_;\n    m_.resize(m_.rows() + m_.cols(), m_.cols());\n    m_.setZero();\n    m_.block(0, 0, tmp.rows(), tmp.cols()) = tmp;\n    has_diagonal_reserved_ = true;\n  }\n\n  m_.bottomLeftCorner(m_.cols(), m_.cols()) =\n      ConstVectorRef(d, m_.cols()).asDiagonal();\n  has_diagonal_appended_ = true;\n}\n\nvoid DenseSparseMatrix::RemoveDiagonal() {\n  CHECK(has_diagonal_appended_);\n  has_diagonal_appended_ = false;\n  // Leave the diagonal reserved.\n}\n\nint DenseSparseMatrix::num_rows() const {\n  if (has_diagonal_reserved_ && !has_diagonal_appended_) {\n    return m_.rows() - m_.cols();\n  }\n  return m_.rows();\n}\n\nint DenseSparseMatrix::num_cols() const {\n  return m_.cols();\n}\n\nint DenseSparseMatrix::num_nonzeros() const {\n  if (has_diagonal_reserved_ && !has_diagonal_appended_) {\n    return (m_.rows() - m_.cols()) * m_.cols();\n  }\n  return m_.rows() * m_.cols();\n}\n\nConstColMajorMatrixRef DenseSparseMatrix::matrix() const {\n  return ConstColMajorMatrixRef(\n      m_.data(),\n      ((has_diagonal_reserved_ && !has_diagonal_appended_)\n       ? m_.rows() - m_.cols()\n       : m_.rows()),\n      m_.cols(),\n      Eigen::Stride<Eigen::Dynamic, 1>(m_.rows(), 1));\n}\n\nColMajorMatrixRef DenseSparseMatrix::mutable_matrix() {\n  return ColMajorMatrixRef(\n      m_.data(),\n      ((has_diagonal_reserved_ && !has_diagonal_appended_)\n       ? m_.rows() - m_.cols()\n       : m_.rows()),\n      m_.cols(),\n      Eigen::Stride<Eigen::Dynamic, 1>(m_.rows(), 1));\n}\n\n\nvoid DenseSparseMatrix::ToTextFile(FILE* file) const {\n  CHECK(file != nullptr);\n  const int active_rows =\n      (has_diagonal_reserved_ && !has_diagonal_appended_)\n      ? (m_.rows() - m_.cols())\n      : m_.rows();\n\n  for (int r = 0; r < active_rows; ++r) {\n    for (int c = 0; c < m_.cols(); ++c) {\n      fprintf(file,  \"% 10d % 10d %17f\\n\", r, c, m_(r, c));\n    }\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/dense_sparse_matrix.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n//\n// A dense matrix implemented under the SparseMatrix interface.\n\n#ifndef CERES_INTERNAL_DENSE_SPARSE_MATRIX_H_\n#define CERES_INTERNAL_DENSE_SPARSE_MATRIX_H_\n\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/sparse_matrix.h\"\n#include \"ceres/types.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass TripletSparseMatrix;\n\nclass DenseSparseMatrix : public SparseMatrix {\n public:\n  // Build a matrix with the same content as the TripletSparseMatrix\n  // m. This assumes that m does not have any repeated entries.\n  explicit DenseSparseMatrix(const TripletSparseMatrix& m);\n  explicit DenseSparseMatrix(const ColMajorMatrix& m);\n\n  DenseSparseMatrix(int num_rows, int num_cols);\n  DenseSparseMatrix(int num_rows, int num_cols, bool reserve_diagonal);\n\n  virtual ~DenseSparseMatrix() {}\n\n  // SparseMatrix interface.\n  void SetZero() final;\n  void RightMultiply(const double* x, double* y) const final;\n  void LeftMultiply(const double* x, double* y) const final;\n  void SquaredColumnNorm(double* x) const final;\n  void ScaleColumns(const double* scale) final;\n  void ToDenseMatrix(Matrix* dense_matrix) const final;\n  void ToTextFile(FILE* file) const final;\n  int num_rows() const final;\n  int num_cols() const final;\n  int num_nonzeros() const final;\n  const double* values() const final { return m_.data(); }\n  double* mutable_values() final { return m_.data(); }\n\n  ConstColMajorMatrixRef matrix() const;\n  ColMajorMatrixRef mutable_matrix();\n\n  // Only one diagonal can be appended at a time. The diagonal is appended to\n  // as a new set of rows, e.g.\n  //\n  // Original matrix:\n  //\n  //   x x x\n  //   x x x\n  //   x x x\n  //\n  // After append diagonal (1, 2, 3):\n  //\n  //   x x x\n  //   x x x\n  //   x x x\n  //   1 0 0\n  //   0 2 0\n  //   0 0 3\n  //\n  // Calling RemoveDiagonal removes the block. It is a fatal error to append a\n  // diagonal to a matrix that already has an appended diagonal, and it is also\n  // a fatal error to remove a diagonal from a matrix that has none.\n  void AppendDiagonal(double *d);\n  void RemoveDiagonal();\n\n private:\n  ColMajorMatrix m_;\n  bool has_diagonal_appended_;\n  bool has_diagonal_reserved_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_DENSE_SPARSE_MATRIX_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/dense_sparse_matrix_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n//\n// TODO(keir): Implement a generic \"compare sparse matrix implementations\" test\n// suite that can compare all the implementations. Then this file would shrink\n// in size.\n\n#include \"ceres/dense_sparse_matrix.h\"\n\n#include <memory>\n#include \"ceres/casts.h\"\n#include \"ceres/linear_least_squares_problems.h\"\n#include \"ceres/triplet_sparse_matrix.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"glog/logging.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nstatic void CompareMatrices(const SparseMatrix* a, const SparseMatrix* b) {\n  EXPECT_EQ(a->num_rows(), b->num_rows());\n  EXPECT_EQ(a->num_cols(), b->num_cols());\n\n  int num_rows = a->num_rows();\n  int num_cols = a->num_cols();\n\n  for (int i = 0; i < num_cols; ++i) {\n    Vector x = Vector::Zero(num_cols);\n    x(i) = 1.0;\n\n    Vector y_a = Vector::Zero(num_rows);\n    Vector y_b = Vector::Zero(num_rows);\n\n    a->RightMultiply(x.data(), y_a.data());\n    b->RightMultiply(x.data(), y_b.data());\n\n    EXPECT_EQ((y_a - y_b).norm(), 0);\n  }\n}\n\nclass DenseSparseMatrixTest : public ::testing::Test {\n protected :\n  void SetUp() final {\n    std::unique_ptr<LinearLeastSquaresProblem> problem(\n        CreateLinearLeastSquaresProblemFromId(1));\n\n    CHECK(problem != nullptr);\n\n    tsm.reset(down_cast<TripletSparseMatrix*>(problem->A.release()));\n    dsm.reset(new DenseSparseMatrix(*tsm));\n\n    num_rows = tsm->num_rows();\n    num_cols = tsm->num_cols();\n  }\n\n  int num_rows;\n  int num_cols;\n\n  std::unique_ptr<TripletSparseMatrix> tsm;\n  std::unique_ptr<DenseSparseMatrix> dsm;\n};\n\nTEST_F(DenseSparseMatrixTest, RightMultiply) {\n  CompareMatrices(tsm.get(), dsm.get());\n\n  // Try with a not entirely zero vector to verify column interactions, which\n  // could be masked by a subtle bug when using the elementary vectors.\n  Vector a(num_cols);\n  for (int i = 0; i < num_cols; i++) {\n    a(i) = i;\n  }\n  Vector b1 = Vector::Zero(num_rows);\n  Vector b2 = Vector::Zero(num_rows);\n\n  tsm->RightMultiply(a.data(), b1.data());\n  dsm->RightMultiply(a.data(), b2.data());\n\n  EXPECT_EQ((b1 - b2).norm(), 0);\n}\n\nTEST_F(DenseSparseMatrixTest, LeftMultiply) {\n  for (int i = 0; i < num_rows; ++i) {\n    Vector a = Vector::Zero(num_rows);\n    a(i) = 1.0;\n\n    Vector b1 = Vector::Zero(num_cols);\n    Vector b2 = Vector::Zero(num_cols);\n\n    tsm->LeftMultiply(a.data(), b1.data());\n    dsm->LeftMultiply(a.data(), b2.data());\n\n    EXPECT_EQ((b1 - b2).norm(), 0);\n  }\n\n  // Try with a not entirely zero vector to verify column interactions, which\n  // could be masked by a subtle bug when using the elementary vectors.\n  Vector a(num_rows);\n  for (int i = 0; i < num_rows; i++) {\n    a(i) = i;\n  }\n  Vector b1 = Vector::Zero(num_cols);\n  Vector b2 = Vector::Zero(num_cols);\n\n  tsm->LeftMultiply(a.data(), b1.data());\n  dsm->LeftMultiply(a.data(), b2.data());\n\n  EXPECT_EQ((b1 - b2).norm(), 0);\n}\n\nTEST_F(DenseSparseMatrixTest, ColumnNorm) {\n  Vector b1 = Vector::Zero(num_cols);\n  Vector b2 = Vector::Zero(num_cols);\n\n  tsm->SquaredColumnNorm(b1.data());\n  dsm->SquaredColumnNorm(b2.data());\n\n  EXPECT_EQ((b1 - b2).norm(), 0);\n}\n\nTEST_F(DenseSparseMatrixTest, Scale) {\n  Vector scale(num_cols);\n  for (int i = 0; i < num_cols; ++i) {\n    scale(i) = i + 1;\n  }\n  tsm->ScaleColumns(scale.data());\n  dsm->ScaleColumns(scale.data());\n  CompareMatrices(tsm.get(), dsm.get());\n}\n\nTEST_F(DenseSparseMatrixTest, ToDenseMatrix) {\n  Matrix tsm_dense;\n  Matrix dsm_dense;\n\n  tsm->ToDenseMatrix(&tsm_dense);\n  dsm->ToDenseMatrix(&dsm_dense);\n\n  EXPECT_EQ((tsm_dense - dsm_dense).norm(), 0.0);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/detect_structure.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/detect_structure.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nvoid DetectStructure(const CompressedRowBlockStructure& bs,\n                     const int num_eliminate_blocks,\n                     int* row_block_size,\n                     int* e_block_size,\n                     int* f_block_size) {\n  const int num_row_blocks = bs.rows.size();\n  *row_block_size = 0;\n  *e_block_size = 0;\n  *f_block_size = 0;\n\n  // Iterate over row blocks of the matrix, checking if row_block,\n  // e_block or f_block sizes remain constant.\n  for (int r = 0; r < num_row_blocks; ++r) {\n    const CompressedRow& row = bs.rows[r];\n    // We do not care about the sizes of the blocks in rows which do\n    // not contain e_blocks.\n    if (row.cells.front().block_id >= num_eliminate_blocks) {\n      break;\n    }\n\n    // Detect fixed or dynamic row block size.\n    if (*row_block_size == 0) {\n      *row_block_size = row.block.size;\n    } else if (*row_block_size != Eigen::Dynamic &&\n               *row_block_size != row.block.size) {\n      VLOG(2) << \"Dynamic row block size because the block size changed from \"\n              << *row_block_size << \" to \"\n              << row.block.size;\n      *row_block_size = Eigen::Dynamic;\n    }\n\n    // Detect fixed or dynamic e-block size.\n    const int e_block_id = row.cells.front().block_id;\n    if (*e_block_size == 0) {\n      *e_block_size = bs.cols[e_block_id].size;\n    } else if (*e_block_size != Eigen::Dynamic &&\n               *e_block_size != bs.cols[e_block_id].size) {\n      VLOG(2) << \"Dynamic e block size because the block size changed from \"\n              << *e_block_size << \" to \"\n              << bs.cols[e_block_id].size;\n      *e_block_size = Eigen::Dynamic;\n    }\n\n    // Detect fixed or dynamic f-block size. We are only interested in\n    // rows with e-blocks, and the e-block is always the first block,\n    // so only rows of size greater than 1 are of interest.\n    if (row.cells.size() > 1) {\n      if (*f_block_size == 0) {\n        const int f_block_id = row.cells[1].block_id;\n        *f_block_size = bs.cols[f_block_id].size;\n      }\n\n      for (int c = 1;\n           (c < row.cells.size()) && (*f_block_size != Eigen::Dynamic);\n           ++c) {\n        const int f_block_id = row.cells[c].block_id;\n        if (*f_block_size != bs.cols[f_block_id].size) {\n          VLOG(2) << \"Dynamic f block size because the block size \"\n                  << \"changed from \" << *f_block_size << \" to \"\n                  << bs.cols[f_block_id].size;\n          *f_block_size = Eigen::Dynamic;\n        }\n      }\n    }\n\n    const bool is_everything_dynamic = (*row_block_size == Eigen::Dynamic &&\n                                        *e_block_size == Eigen::Dynamic &&\n                                        *f_block_size == Eigen::Dynamic);\n    if (is_everything_dynamic) {\n      break;\n    }\n  }\n\n  CHECK_NE(*row_block_size, 0) << \"No rows found\";\n  CHECK_NE(*e_block_size, 0) << \"No e type blocks found\";\n  VLOG(1) << \"Schur complement static structure <\"\n          << *row_block_size << \",\"\n          << *e_block_size << \",\"\n          << *f_block_size << \">.\";\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/detect_structure.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_DETECT_STRUCTURE_H_\n#define CERES_INTERNAL_DETECT_STRUCTURE_H_\n\n#include \"ceres/block_structure.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// Detect static blocks in the problem sparsity. For rows containing\n// e_blocks, we are interested in detecting if the size of the row\n// blocks, e_blocks and the f_blocks remain constant. If they do, then\n// we can use template specialization to improve the performance of\n// the block level linear algebra operations used by the\n// SchurEliminator.\n//\n// If a block size is not constant, we return Eigen::Dynamic as the\n// value. This just means that the eliminator uses dynamically sized\n// linear algebra operations rather than static operations whose size\n// is known as compile time.\n//\n// For more details about e_blocks and f_blocks, see\n// schur_eliminator.h. This information is used to initialized an\n// appropriate template specialization of SchurEliminator.\n//\n// Note: The structure of rows without any e-blocks has no effect on\n// the values returned by this function. It is entirely possible that\n// the f_block_size and row_blocks_size is not constant in such rows.\nvoid DetectStructure(const CompressedRowBlockStructure& bs,\n                     const int num_eliminate_blocks,\n                     int* row_block_size,\n                     int* e_block_size,\n                     int* f_block_size);\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_DETECT_STRUCTURE_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/detect_structure_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"Eigen/Core\"\n#include \"glog/logging.h\"\n#include \"gtest/gtest.h\"\n#include \"ceres/block_structure.h\"\n#include \"ceres/detect_structure.h\"\n\nnamespace ceres {\nnamespace internal {\n\nTEST(DetectStructure, EverythingStatic) {\n  const int expected_row_block_size = 2;\n  const int expected_e_block_size = 3;\n  const int expected_f_block_size = 4;\n\n  CompressedRowBlockStructure bs;\n\n  bs.cols.push_back(Block());\n  bs.cols.back().size = 3;\n  bs.cols.back().position = 0;\n\n  bs.cols.push_back(Block());\n  bs.cols.back().size = 4;\n  bs.cols.back().position = 3;\n\n  bs.cols.push_back(Block());\n  bs.cols.back().size = 4;\n  bs.cols.back().position = 7;\n\n  {\n    bs.rows.push_back(CompressedRow());\n    CompressedRow& row = bs.rows.back();\n    row.block.size = 2;\n    row.block.position = 0;\n    row.cells.push_back(Cell(0, 0));\n    row.cells.push_back(Cell(1, 0));\n  }\n\n  {\n    bs.rows.push_back(CompressedRow());\n    CompressedRow& row = bs.rows.back();\n    row.block.size = 2;\n    row.block.position = 2;\n    row.cells.push_back(Cell(0, 0));\n    row.cells.push_back(Cell(2, 0));\n  }\n\n  int row_block_size = 0;\n  int e_block_size = 0;\n  int f_block_size = 0;\n  const int num_eliminate_blocks = 1;\n  DetectStructure(bs,\n                  num_eliminate_blocks,\n                  &row_block_size,\n                  &e_block_size,\n                  &f_block_size);\n\n  EXPECT_EQ(row_block_size, expected_row_block_size);\n  EXPECT_EQ(e_block_size, expected_e_block_size);\n  EXPECT_EQ(f_block_size, expected_f_block_size);\n}\n\nTEST(DetectStructure, DynamicRow) {\n  const int expected_row_block_size = Eigen::Dynamic;\n  const int expected_e_block_size = 3;\n  const int expected_f_block_size = 4;\n\n  CompressedRowBlockStructure bs;\n\n  bs.cols.push_back(Block());\n  bs.cols.back().size = 3;\n  bs.cols.back().position = 0;\n\n  bs.cols.push_back(Block());\n  bs.cols.back().size = 4;\n  bs.cols.back().position = 3;\n\n  bs.cols.push_back(Block());\n  bs.cols.back().size = 4;\n  bs.cols.back().position = 7;\n\n  {\n    bs.rows.push_back(CompressedRow());\n    CompressedRow& row = bs.rows.back();\n    row.block.size = 2;\n    row.block.position = 0;\n    row.cells.push_back(Cell(0, 0));\n    row.cells.push_back(Cell(1, 0));\n  }\n\n  {\n    bs.rows.push_back(CompressedRow());\n    CompressedRow& row = bs.rows.back();\n    row.block.size = 1;\n    row.block.position = 2;\n    row.cells.push_back(Cell(0, 0));\n    row.cells.push_back(Cell(2, 0));\n  }\n\n  int row_block_size = 0;\n  int e_block_size = 0;\n  int f_block_size = 0;\n  const int num_eliminate_blocks = 1;\n  DetectStructure(bs,\n                  num_eliminate_blocks,\n                  &row_block_size,\n                  &e_block_size,\n                  &f_block_size);\n\n  EXPECT_EQ(row_block_size, expected_row_block_size);\n  EXPECT_EQ(e_block_size, expected_e_block_size);\n  EXPECT_EQ(f_block_size, expected_f_block_size);\n}\n\nTEST(DetectStructure, DynamicFBlockDifferentRows) {\n  const int expected_row_block_size = 2;\n  const int expected_e_block_size = 3;\n  const int expected_f_block_size = Eigen::Dynamic;\n\n\n  CompressedRowBlockStructure bs;\n\n  bs.cols.push_back(Block());\n  bs.cols.back().size = 3;\n  bs.cols.back().position = 0;\n\n  bs.cols.push_back(Block());\n  bs.cols.back().size = 4;\n  bs.cols.back().position = 3;\n\n  bs.cols.push_back(Block());\n  bs.cols.back().size = 3;\n  bs.cols.back().position = 7;\n\n  {\n    bs.rows.push_back(CompressedRow());\n    CompressedRow& row = bs.rows.back();\n    row.block.size = 2;\n    row.block.position = 0;\n    row.cells.push_back(Cell(0, 0));\n    row.cells.push_back(Cell(1, 0));\n  }\n\n  {\n    bs.rows.push_back(CompressedRow());\n    CompressedRow& row = bs.rows.back();\n    row.block.size = 2;\n    row.block.position = 2;\n    row.cells.push_back(Cell(0, 0));\n    row.cells.push_back(Cell(2, 0));\n  }\n\n  int row_block_size = 0;\n  int e_block_size = 0;\n  int f_block_size = 0;\n  const int num_eliminate_blocks = 1;\n  DetectStructure(bs,\n                  num_eliminate_blocks,\n                  &row_block_size,\n                  &e_block_size,\n                  &f_block_size);\n\n  EXPECT_EQ(row_block_size, expected_row_block_size);\n  EXPECT_EQ(e_block_size, expected_e_block_size);\n  EXPECT_EQ(f_block_size, expected_f_block_size);\n}\n\nTEST(DetectStructure, DynamicEBlock) {\n  const int expected_row_block_size = 2;\n  const int expected_e_block_size = Eigen::Dynamic;\n  const int expected_f_block_size = 3;\n\n  CompressedRowBlockStructure bs;\n\n  bs.cols.push_back(Block());\n  bs.cols.back().size = 3;\n  bs.cols.back().position = 0;\n\n  bs.cols.push_back(Block());\n  bs.cols.back().size = 4;\n  bs.cols.back().position = 3;\n\n  bs.cols.push_back(Block());\n  bs.cols.back().size = 3;\n  bs.cols.back().position = 7;\n\n  {\n    bs.rows.push_back(CompressedRow());\n    CompressedRow& row = bs.rows.back();\n    row.block.size = 2;\n    row.block.position = 0;\n    row.cells.push_back(Cell(0, 0));\n    row.cells.push_back(Cell(2, 0));\n  }\n\n  {\n    bs.rows.push_back(CompressedRow());\n    CompressedRow& row = bs.rows.back();\n    row.block.size = 2;\n    row.block.position = 2;\n    row.cells.push_back(Cell(1, 0));\n    row.cells.push_back(Cell(2, 0));\n  }\n\n  int row_block_size = 0;\n  int e_block_size = 0;\n  int f_block_size = 0;\n  const int num_eliminate_blocks = 2;\n  DetectStructure(bs,\n                  num_eliminate_blocks,\n                  &row_block_size,\n                  &e_block_size,\n                  &f_block_size);\n\n  EXPECT_EQ(row_block_size, expected_row_block_size);\n  EXPECT_EQ(e_block_size, expected_e_block_size);\n  EXPECT_EQ(f_block_size, expected_f_block_size);\n}\n\nTEST(DetectStructure, DynamicFBlockSameRow) {\n  const int expected_row_block_size = 2;\n  const int expected_e_block_size = 3;\n  const int expected_f_block_size = Eigen::Dynamic;\n\n  CompressedRowBlockStructure bs;\n\n  bs.cols.push_back(Block());\n  bs.cols.back().size = 3;\n  bs.cols.back().position = 0;\n\n  bs.cols.push_back(Block());\n  bs.cols.back().size = 4;\n  bs.cols.back().position = 3;\n\n  bs.cols.push_back(Block());\n  bs.cols.back().size = 3;\n  bs.cols.back().position = 7;\n\n  {\n    bs.rows.push_back(CompressedRow());\n    CompressedRow& row = bs.rows.back();\n    row.block.size = 2;\n    row.block.position = 0;\n    row.cells.push_back(Cell(0, 0));\n    row.cells.push_back(Cell(1, 0));\n    row.cells.push_back(Cell(2, 0));\n  }\n\n  int row_block_size = 0;\n  int e_block_size = 0;\n  int f_block_size = 0;\n  const int num_eliminate_blocks = 1;\n  DetectStructure(bs,\n                  num_eliminate_blocks,\n                  &row_block_size,\n                  &e_block_size,\n                  &f_block_size);\n\n  EXPECT_EQ(row_block_size, expected_row_block_size);\n  EXPECT_EQ(e_block_size, expected_e_block_size);\n  EXPECT_EQ(f_block_size, expected_f_block_size);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/dogleg_strategy.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/dogleg_strategy.h\"\n\n#include <algorithm>\n#include <cmath>\n\n#include \"Eigen/Dense\"\n#include \"ceres/array_utils.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/linear_least_squares_problems.h\"\n#include \"ceres/linear_solver.h\"\n#include \"ceres/polynomial.h\"\n#include \"ceres/sparse_matrix.h\"\n#include \"ceres/trust_region_strategy.h\"\n#include \"ceres/types.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\nnamespace {\nconst double kMaxMu = 1.0;\nconst double kMinMu = 1e-8;\n}\n\nDoglegStrategy::DoglegStrategy(const TrustRegionStrategy::Options& options)\n    : linear_solver_(options.linear_solver),\n      radius_(options.initial_radius),\n      max_radius_(options.max_radius),\n      min_diagonal_(options.min_lm_diagonal),\n      max_diagonal_(options.max_lm_diagonal),\n      mu_(kMinMu),\n      min_mu_(kMinMu),\n      max_mu_(kMaxMu),\n      mu_increase_factor_(10.0),\n      increase_threshold_(0.75),\n      decrease_threshold_(0.25),\n      dogleg_step_norm_(0.0),\n      reuse_(false),\n      dogleg_type_(options.dogleg_type) {\n  CHECK(linear_solver_ != nullptr);\n  CHECK_GT(min_diagonal_, 0.0);\n  CHECK_LE(min_diagonal_, max_diagonal_);\n  CHECK_GT(max_radius_, 0.0);\n}\n\n// If the reuse_ flag is not set, then the Cauchy point (scaled\n// gradient) and the new Gauss-Newton step are computed from\n// scratch. The Dogleg step is then computed as interpolation of these\n// two vectors.\nTrustRegionStrategy::Summary DoglegStrategy::ComputeStep(\n    const TrustRegionStrategy::PerSolveOptions& per_solve_options,\n    SparseMatrix* jacobian,\n    const double* residuals,\n    double* step) {\n  CHECK(jacobian != nullptr);\n  CHECK(residuals != nullptr);\n  CHECK(step != nullptr);\n\n  const int n = jacobian->num_cols();\n  if (reuse_) {\n    // Gauss-Newton and gradient vectors are always available, only a\n    // new interpolant need to be computed. For the subspace case,\n    // the subspace and the two-dimensional model are also still valid.\n    switch (dogleg_type_) {\n      case TRADITIONAL_DOGLEG:\n        ComputeTraditionalDoglegStep(step);\n        break;\n\n      case SUBSPACE_DOGLEG:\n        ComputeSubspaceDoglegStep(step);\n        break;\n    }\n    TrustRegionStrategy::Summary summary;\n    summary.num_iterations = 0;\n    summary.termination_type = LINEAR_SOLVER_SUCCESS;\n    return summary;\n  }\n\n  reuse_ = true;\n  // Check that we have the storage needed to hold the various\n  // temporary vectors.\n  if (diagonal_.rows() != n) {\n    diagonal_.resize(n, 1);\n    gradient_.resize(n, 1);\n    gauss_newton_step_.resize(n, 1);\n  }\n\n  // Vector used to form the diagonal matrix that is used to\n  // regularize the Gauss-Newton solve and that defines the\n  // elliptical trust region\n  //\n  //   || D * step || <= radius_ .\n  //\n  jacobian->SquaredColumnNorm(diagonal_.data());\n  for (int i = 0; i < n; ++i) {\n    diagonal_[i] = std::min(std::max(diagonal_[i], min_diagonal_),\n                            max_diagonal_);\n  }\n  diagonal_ = diagonal_.array().sqrt();\n\n  ComputeGradient(jacobian, residuals);\n  ComputeCauchyPoint(jacobian);\n\n  LinearSolver::Summary linear_solver_summary =\n      ComputeGaussNewtonStep(per_solve_options, jacobian, residuals);\n\n  TrustRegionStrategy::Summary summary;\n  summary.residual_norm = linear_solver_summary.residual_norm;\n  summary.num_iterations = linear_solver_summary.num_iterations;\n  summary.termination_type = linear_solver_summary.termination_type;\n\n  if (linear_solver_summary.termination_type == LINEAR_SOLVER_FATAL_ERROR) {\n    return summary;\n  }\n\n  if (linear_solver_summary.termination_type != LINEAR_SOLVER_FAILURE) {\n    switch (dogleg_type_) {\n      // Interpolate the Cauchy point and the Gauss-Newton step.\n      case TRADITIONAL_DOGLEG:\n        ComputeTraditionalDoglegStep(step);\n        break;\n\n      // Find the minimum in the subspace defined by the\n      // Cauchy point and the (Gauss-)Newton step.\n      case SUBSPACE_DOGLEG:\n        if (!ComputeSubspaceModel(jacobian)) {\n          summary.termination_type = LINEAR_SOLVER_FAILURE;\n          break;\n        }\n        ComputeSubspaceDoglegStep(step);\n        break;\n    }\n  }\n\n  return summary;\n}\n\n// The trust region is assumed to be elliptical with the\n// diagonal scaling matrix D defined by sqrt(diagonal_).\n// It is implemented by substituting step' = D * step.\n// The trust region for step' is spherical.\n// The gradient, the Gauss-Newton step, the Cauchy point,\n// and all calculations involving the Jacobian have to\n// be adjusted accordingly.\nvoid DoglegStrategy::ComputeGradient(\n    SparseMatrix* jacobian,\n    const double* residuals) {\n  gradient_.setZero();\n  jacobian->LeftMultiply(residuals, gradient_.data());\n  gradient_.array() /= diagonal_.array();\n}\n\n// The Cauchy point is the global minimizer of the quadratic model\n// along the one-dimensional subspace spanned by the gradient.\nvoid DoglegStrategy::ComputeCauchyPoint(SparseMatrix* jacobian) {\n  // alpha * -gradient is the Cauchy point.\n  Vector Jg(jacobian->num_rows());\n  Jg.setZero();\n  // The Jacobian is scaled implicitly by computing J * (D^-1 * (D^-1 * g))\n  // instead of (J * D^-1) * (D^-1 * g).\n  Vector scaled_gradient =\n      (gradient_.array() / diagonal_.array()).matrix();\n  jacobian->RightMultiply(scaled_gradient.data(), Jg.data());\n  alpha_ = gradient_.squaredNorm() / Jg.squaredNorm();\n}\n\n// The dogleg step is defined as the intersection of the trust region\n// boundary with the piecewise linear path from the origin to the Cauchy\n// point and then from there to the Gauss-Newton point (global minimizer\n// of the model function). The Gauss-Newton point is taken if it lies\n// within the trust region.\nvoid DoglegStrategy::ComputeTraditionalDoglegStep(double* dogleg) {\n  VectorRef dogleg_step(dogleg, gradient_.rows());\n\n  // Case 1. The Gauss-Newton step lies inside the trust region, and\n  // is therefore the optimal solution to the trust-region problem.\n  const double gradient_norm = gradient_.norm();\n  const double gauss_newton_norm = gauss_newton_step_.norm();\n  if (gauss_newton_norm <= radius_) {\n    dogleg_step = gauss_newton_step_;\n    dogleg_step_norm_ = gauss_newton_norm;\n    dogleg_step.array() /= diagonal_.array();\n    VLOG(3) << \"GaussNewton step size: \" << dogleg_step_norm_\n            << \" radius: \" << radius_;\n    return;\n  }\n\n  // Case 2. The Cauchy point and the Gauss-Newton steps lie outside\n  // the trust region. Rescale the Cauchy point to the trust region\n  // and return.\n  if  (gradient_norm * alpha_ >= radius_) {\n    dogleg_step = -(radius_ / gradient_norm) * gradient_;\n    dogleg_step_norm_ = radius_;\n    dogleg_step.array() /= diagonal_.array();\n    VLOG(3) << \"Cauchy step size: \" << dogleg_step_norm_\n            << \" radius: \" << radius_;\n    return;\n  }\n\n  // Case 3. The Cauchy point is inside the trust region and the\n  // Gauss-Newton step is outside. Compute the line joining the two\n  // points and the point on it which intersects the trust region\n  // boundary.\n\n  // a = alpha * -gradient\n  // b = gauss_newton_step\n  const double b_dot_a = -alpha_ * gradient_.dot(gauss_newton_step_);\n  const double a_squared_norm = pow(alpha_ * gradient_norm, 2.0);\n  const double b_minus_a_squared_norm =\n      a_squared_norm - 2 * b_dot_a + pow(gauss_newton_norm, 2);\n\n  // c = a' (b - a)\n  //   = alpha * -gradient' gauss_newton_step - alpha^2 |gradient|^2\n  const double c = b_dot_a - a_squared_norm;\n  const double d = sqrt(c * c + b_minus_a_squared_norm *\n                        (pow(radius_, 2.0) - a_squared_norm));\n\n  double beta =\n      (c <= 0)\n      ? (d - c) /  b_minus_a_squared_norm\n      : (radius_ * radius_ - a_squared_norm) / (d + c);\n  dogleg_step = (-alpha_ * (1.0 - beta)) * gradient_\n      + beta * gauss_newton_step_;\n  dogleg_step_norm_ = dogleg_step.norm();\n  dogleg_step.array() /= diagonal_.array();\n  VLOG(3) << \"Dogleg step size: \" << dogleg_step_norm_\n          << \" radius: \" << radius_;\n}\n\n// The subspace method finds the minimum of the two-dimensional problem\n//\n//   min. 1/2 x' B' H B x + g' B x\n//   s.t. || B x ||^2 <= r^2\n//\n// where r is the trust region radius and B is the matrix with unit columns\n// spanning the subspace defined by the steepest descent and Newton direction.\n// This subspace by definition includes the Gauss-Newton point, which is\n// therefore taken if it lies within the trust region.\nvoid DoglegStrategy::ComputeSubspaceDoglegStep(double* dogleg) {\n  VectorRef dogleg_step(dogleg, gradient_.rows());\n\n  // The Gauss-Newton point is inside the trust region if |GN| <= radius_.\n  // This test is valid even though radius_ is a length in the two-dimensional\n  // subspace while gauss_newton_step_ is expressed in the (scaled)\n  // higher dimensional original space. This is because\n  //\n  //   1. gauss_newton_step_ by definition lies in the subspace, and\n  //   2. the subspace basis is orthonormal.\n  //\n  // As a consequence, the norm of the gauss_newton_step_ in the subspace is\n  // the same as its norm in the original space.\n  const double gauss_newton_norm = gauss_newton_step_.norm();\n  if (gauss_newton_norm <= radius_) {\n    dogleg_step = gauss_newton_step_;\n    dogleg_step_norm_ = gauss_newton_norm;\n    dogleg_step.array() /= diagonal_.array();\n    VLOG(3) << \"GaussNewton step size: \" << dogleg_step_norm_\n            << \" radius: \" << radius_;\n    return;\n  }\n\n  // The optimum lies on the boundary of the trust region. The above problem\n  // therefore becomes\n  //\n  //   min. 1/2 x^T B^T H B x + g^T B x\n  //   s.t. || B x ||^2 = r^2\n  //\n  // Notice the equality in the constraint.\n  //\n  // This can be solved by forming the Lagrangian, solving for x(y), where\n  // y is the Lagrange multiplier, using the gradient of the objective, and\n  // putting x(y) back into the constraint. This results in a fourth order\n  // polynomial in y, which can be solved using e.g. the companion matrix.\n  // See the description of MakePolynomialForBoundaryConstrainedProblem for\n  // details. The result is up to four real roots y*, not all of which\n  // correspond to feasible points. The feasible points x(y*) have to be\n  // tested for optimality.\n\n  if (subspace_is_one_dimensional_) {\n    // The subspace is one-dimensional, so both the gradient and\n    // the Gauss-Newton step point towards the same direction.\n    // In this case, we move along the gradient until we reach the trust\n    // region boundary.\n    dogleg_step = -(radius_ / gradient_.norm()) * gradient_;\n    dogleg_step_norm_ = radius_;\n    dogleg_step.array() /= diagonal_.array();\n    VLOG(3) << \"Dogleg subspace step size (1D): \" << dogleg_step_norm_\n            << \" radius: \" << radius_;\n    return;\n  }\n\n  Vector2d minimum(0.0, 0.0);\n  if (!FindMinimumOnTrustRegionBoundary(&minimum)) {\n    // For the positive semi-definite case, a traditional dogleg step\n    // is taken in this case.\n    LOG(WARNING) << \"Failed to compute polynomial roots. \"\n                 << \"Taking traditional dogleg step instead.\";\n    ComputeTraditionalDoglegStep(dogleg);\n    return;\n  }\n\n  // Test first order optimality at the minimum.\n  // The first order KKT conditions state that the minimum x*\n  // has to satisfy either || x* ||^2 < r^2 (i.e. has to lie within\n  // the trust region), or\n  //\n  //   (B x* + g) + y x* = 0\n  //\n  // for some positive scalar y.\n  // Here, as it is already known that the minimum lies on the boundary, the\n  // latter condition is tested. To allow for small imprecisions, we test if\n  // the angle between (B x* + g) and -x* is smaller than acos(0.99).\n  // The exact value of the cosine is arbitrary but should be close to 1.\n  //\n  // This condition should not be violated. If it is, the minimum was not\n  // correctly determined.\n  const double kCosineThreshold = 0.99;\n  const Vector2d grad_minimum = subspace_B_ * minimum + subspace_g_;\n  const double cosine_angle = -minimum.dot(grad_minimum) /\n      (minimum.norm() * grad_minimum.norm());\n  if (cosine_angle < kCosineThreshold) {\n    LOG(WARNING) << \"First order optimality seems to be violated \"\n                 << \"in the subspace method!\\n\"\n                 << \"Cosine of angle between x and B x + g is \"\n                 << cosine_angle << \".\\n\"\n                 << \"Taking a regular dogleg step instead.\\n\"\n                 << \"Please consider filing a bug report if this \"\n                 << \"happens frequently or consistently.\\n\";\n    ComputeTraditionalDoglegStep(dogleg);\n    return;\n  }\n\n  // Create the full step from the optimal 2d solution.\n  dogleg_step = subspace_basis_ * minimum;\n  dogleg_step_norm_ = radius_;\n  dogleg_step.array() /= diagonal_.array();\n  VLOG(3) << \"Dogleg subspace step size: \" << dogleg_step_norm_\n          << \" radius: \" << radius_;\n}\n\n// Build the polynomial that defines the optimal Lagrange multipliers.\n// Let the Lagrangian be\n//\n//   L(x, y) = 0.5 x^T B x + x^T g + y (0.5 x^T x - 0.5 r^2).       (1)\n//\n// Stationary points of the Lagrangian are given by\n//\n//   0 = d L(x, y) / dx = Bx + g + y x                              (2)\n//   0 = d L(x, y) / dy = 0.5 x^T x - 0.5 r^2                       (3)\n//\n// For any given y, we can solve (2) for x as\n//\n//   x(y) = -(B + y I)^-1 g .                                       (4)\n//\n// As B + y I is 2x2, we form the inverse explicitly:\n//\n//   (B + y I)^-1 = (1 / det(B + y I)) adj(B + y I)                 (5)\n//\n// where adj() denotes adjugation. This should be safe, as B is positive\n// semi-definite and y is necessarily positive, so (B + y I) is indeed\n// invertible.\n// Plugging (5) into (4) and the result into (3), then dividing by 0.5 we\n// obtain\n//\n//   0 = (1 / det(B + y I))^2 g^T adj(B + y I)^T adj(B + y I) g - r^2\n//                                                                  (6)\n//\n// or\n//\n//   det(B + y I)^2 r^2 = g^T adj(B + y I)^T adj(B + y I) g         (7a)\n//                      = g^T adj(B)^T adj(B) g\n//                           + 2 y g^T adj(B)^T g + y^2 g^T g       (7b)\n//\n// as\n//\n//   adj(B + y I) = adj(B) + y I = adj(B)^T + y I .                 (8)\n//\n// The left hand side can be expressed explicitly using\n//\n//   det(B + y I) = det(B) + y tr(B) + y^2 .                        (9)\n//\n// So (7) is a polynomial in y of degree four.\n// Bringing everything back to the left hand side, the coefficients can\n// be read off as\n//\n//     y^4  r^2\n//   + y^3  2 r^2 tr(B)\n//   + y^2 (r^2 tr(B)^2 + 2 r^2 det(B) - g^T g)\n//   + y^1 (2 r^2 det(B) tr(B) - 2 g^T adj(B)^T g)\n//   + y^0 (r^2 det(B)^2 - g^T adj(B)^T adj(B) g)\n//\nVector DoglegStrategy::MakePolynomialForBoundaryConstrainedProblem() const {\n  const double detB = subspace_B_.determinant();\n  const double trB = subspace_B_.trace();\n  const double r2 = radius_ * radius_;\n  Matrix2d B_adj;\n  B_adj <<  subspace_B_(1, 1) , -subspace_B_(0, 1),\n            -subspace_B_(1, 0) ,  subspace_B_(0, 0);\n\n  Vector polynomial(5);\n  polynomial(0) = r2;\n  polynomial(1) = 2.0 * r2 * trB;\n  polynomial(2) = r2 * (trB * trB + 2.0 * detB) - subspace_g_.squaredNorm();\n  polynomial(3) = -2.0 * (subspace_g_.transpose() * B_adj * subspace_g_\n      - r2 * detB * trB);\n  polynomial(4) = r2 * detB * detB - (B_adj * subspace_g_).squaredNorm();\n\n  return polynomial;\n}\n\n// Given a Lagrange multiplier y that corresponds to a stationary point\n// of the Lagrangian L(x, y), compute the corresponding x from the\n// equation\n//\n//   0 = d L(x, y) / dx\n//     = B * x + g + y * x\n//     = (B + y * I) * x + g\n//\nDoglegStrategy::Vector2d DoglegStrategy::ComputeSubspaceStepFromRoot(\n    double y) const {\n  const Matrix2d B_i = subspace_B_ + y * Matrix2d::Identity();\n  return -B_i.partialPivLu().solve(subspace_g_);\n}\n\n// This function evaluates the quadratic model at a point x in the\n// subspace spanned by subspace_basis_.\ndouble DoglegStrategy::EvaluateSubspaceModel(const Vector2d& x) const {\n  return 0.5 * x.dot(subspace_B_ * x) + subspace_g_.dot(x);\n}\n\n// This function attempts to solve the boundary-constrained subspace problem\n//\n//   min. 1/2 x^T B^T H B x + g^T B x\n//   s.t. || B x ||^2 = r^2\n//\n// where B is an orthonormal subspace basis and r is the trust-region radius.\n//\n// This is done by finding the roots of a fourth degree polynomial. If the\n// root finding fails, the function returns false and minimum will be set\n// to (0, 0). If it succeeds, true is returned.\n//\n// In the failure case, another step should be taken, such as the traditional\n// dogleg step.\nbool DoglegStrategy::FindMinimumOnTrustRegionBoundary(Vector2d* minimum) const {\n  CHECK(minimum != nullptr);\n\n  // Return (0, 0) in all error cases.\n  minimum->setZero();\n\n  // Create the fourth-degree polynomial that is a necessary condition for\n  // optimality.\n  const Vector polynomial = MakePolynomialForBoundaryConstrainedProblem();\n\n  // Find the real parts y_i of its roots (not only the real roots).\n  Vector roots_real;\n  if (!FindPolynomialRoots(polynomial, &roots_real, NULL)) {\n    // Failed to find the roots of the polynomial, i.e. the candidate\n    // solutions of the constrained problem. Report this back to the caller.\n    return false;\n  }\n\n  // For each root y, compute B x(y) and check for feasibility.\n  // Notice that there should always be four roots, as the leading term of\n  // the polynomial is r^2 and therefore non-zero. However, as some roots\n  // may be complex, the real parts are not necessarily unique.\n  double minimum_value = std::numeric_limits<double>::max();\n  bool valid_root_found = false;\n  for (int i = 0; i < roots_real.size(); ++i) {\n    const Vector2d x_i = ComputeSubspaceStepFromRoot(roots_real(i));\n\n    // Not all roots correspond to points on the trust region boundary.\n    // There are at most four candidate solutions. As we are interested\n    // in the minimum, it is safe to consider all of them after projecting\n    // them onto the trust region boundary.\n    if (x_i.norm() > 0) {\n      const double f_i = EvaluateSubspaceModel((radius_ / x_i.norm()) * x_i);\n      valid_root_found = true;\n      if (f_i < minimum_value) {\n        minimum_value = f_i;\n        *minimum = x_i;\n      }\n    }\n  }\n\n  return valid_root_found;\n}\n\nLinearSolver::Summary DoglegStrategy::ComputeGaussNewtonStep(\n    const PerSolveOptions& per_solve_options,\n    SparseMatrix* jacobian,\n    const double* residuals) {\n  const int n = jacobian->num_cols();\n  LinearSolver::Summary linear_solver_summary;\n  linear_solver_summary.termination_type = LINEAR_SOLVER_FAILURE;\n\n  // The Jacobian matrix is often quite poorly conditioned. Thus it is\n  // necessary to add a diagonal matrix at the bottom to prevent the\n  // linear solver from failing.\n  //\n  // We do this by computing the same diagonal matrix as the one used\n  // by Levenberg-Marquardt (other choices are possible), and scaling\n  // it by a small constant (independent of the trust region radius).\n  //\n  // If the solve fails, the multiplier to the diagonal is increased\n  // up to max_mu_ by a factor of mu_increase_factor_ every time. If\n  // the linear solver is still not successful, the strategy returns\n  // with LINEAR_SOLVER_FAILURE.\n  //\n  // Next time when a new Gauss-Newton step is requested, the\n  // multiplier starts out from the last successful solve.\n  //\n  // When a step is declared successful, the multiplier is decreased\n  // by half of mu_increase_factor_.\n\n  while (mu_ < max_mu_) {\n    // Dogleg, as far as I (sameeragarwal) understand it, requires a\n    // reasonably good estimate of the Gauss-Newton step. This means\n    // that we need to solve the normal equations more or less\n    // exactly. This is reflected in the values of the tolerances set\n    // below.\n    //\n    // For now, this strategy should only be used with exact\n    // factorization based solvers, for which these tolerances are\n    // automatically satisfied.\n    //\n    // The right way to combine inexact solves with trust region\n    // methods is to use Stiehaug's method.\n    LinearSolver::PerSolveOptions solve_options;\n    solve_options.q_tolerance = 0.0;\n    solve_options.r_tolerance = 0.0;\n\n    lm_diagonal_ = diagonal_ * std::sqrt(mu_);\n    solve_options.D = lm_diagonal_.data();\n\n    // As in the LevenbergMarquardtStrategy, solve Jy = r instead\n    // of Jx = -r and later set x = -y to avoid having to modify\n    // either jacobian or residuals.\n    InvalidateArray(n, gauss_newton_step_.data());\n    linear_solver_summary = linear_solver_->Solve(jacobian,\n                                                  residuals,\n                                                  solve_options,\n                                                  gauss_newton_step_.data());\n\n    if (per_solve_options.dump_format_type == CONSOLE ||\n        (per_solve_options.dump_format_type != CONSOLE &&\n         !per_solve_options.dump_filename_base.empty())) {\n      if (!DumpLinearLeastSquaresProblem(per_solve_options.dump_filename_base,\n                                         per_solve_options.dump_format_type,\n                                         jacobian,\n                                         solve_options.D,\n                                         residuals,\n                                         gauss_newton_step_.data(),\n                                         0)) {\n        LOG(ERROR) << \"Unable to dump trust region problem.\"\n                   << \" Filename base: \"\n                   << per_solve_options.dump_filename_base;\n      }\n    }\n\n    if (linear_solver_summary.termination_type == LINEAR_SOLVER_FATAL_ERROR) {\n      return linear_solver_summary;\n    }\n\n    if (linear_solver_summary.termination_type == LINEAR_SOLVER_FAILURE ||\n        !IsArrayValid(n, gauss_newton_step_.data())) {\n      mu_ *= mu_increase_factor_;\n      VLOG(2) << \"Increasing mu \" << mu_;\n      linear_solver_summary.termination_type = LINEAR_SOLVER_FAILURE;\n      continue;\n    }\n    break;\n  }\n\n  if (linear_solver_summary.termination_type != LINEAR_SOLVER_FAILURE) {\n    // The scaled Gauss-Newton step is D * GN:\n    //\n    //     - (D^-1 J^T J D^-1)^-1 (D^-1 g)\n    //   = - D (J^T J)^-1 D D^-1 g\n    //   = D -(J^T J)^-1 g\n    //\n    gauss_newton_step_.array() *= -diagonal_.array();\n  }\n\n  return linear_solver_summary;\n}\n\nvoid DoglegStrategy::StepAccepted(double step_quality) {\n  CHECK_GT(step_quality, 0.0);\n\n  if (step_quality < decrease_threshold_) {\n    radius_ *= 0.5;\n  }\n\n  if (step_quality > increase_threshold_) {\n    radius_ = std::max(radius_, 3.0 * dogleg_step_norm_);\n  }\n\n  // Reduce the regularization multiplier, in the hope that whatever\n  // was causing the rank deficiency has gone away and we can return\n  // to doing a pure Gauss-Newton solve.\n  mu_ = std::max(min_mu_, 2.0 * mu_ / mu_increase_factor_);\n  reuse_ = false;\n}\n\nvoid DoglegStrategy::StepRejected(double step_quality) {\n  radius_ *= 0.5;\n  reuse_ = true;\n}\n\nvoid DoglegStrategy::StepIsInvalid() {\n  mu_ *= mu_increase_factor_;\n  reuse_ = false;\n}\n\ndouble DoglegStrategy::Radius() const {\n  return radius_;\n}\n\nbool DoglegStrategy::ComputeSubspaceModel(SparseMatrix* jacobian) {\n  // Compute an orthogonal basis for the subspace using QR decomposition.\n  Matrix basis_vectors(jacobian->num_cols(), 2);\n  basis_vectors.col(0) = gradient_;\n  basis_vectors.col(1) = gauss_newton_step_;\n  Eigen::ColPivHouseholderQR<Matrix> basis_qr(basis_vectors);\n\n  switch (basis_qr.rank()) {\n    case 0:\n      // This should never happen, as it implies that both the gradient\n      // and the Gauss-Newton step are zero. In this case, the minimizer should\n      // have stopped due to the gradient being too small.\n      LOG(ERROR) << \"Rank of subspace basis is 0. \"\n                 << \"This means that the gradient at the current iterate is \"\n                 << \"zero but the optimization has not been terminated. \"\n                 << \"You may have found a bug in Ceres.\";\n      return false;\n\n    case 1:\n      // Gradient and Gauss-Newton step coincide, so we lie on one of the\n      // major axes of the quadratic problem. In this case, we simply move\n      // along the gradient until we reach the trust region boundary.\n      subspace_is_one_dimensional_ = true;\n      return true;\n\n    case 2:\n      subspace_is_one_dimensional_ = false;\n      break;\n\n    default:\n      LOG(ERROR) << \"Rank of the subspace basis matrix is reported to be \"\n                 << \"greater than 2. As the matrix contains only two \"\n                 << \"columns this cannot be true and is indicative of \"\n                 << \"a bug.\";\n      return false;\n  }\n\n  // The subspace is two-dimensional, so compute the subspace model.\n  // Given the basis U, this is\n  //\n  //   subspace_g_ = g_scaled^T U\n  //\n  // and\n  //\n  //   subspace_B_ = U^T (J_scaled^T J_scaled) U\n  //\n  // As J_scaled = J * D^-1, the latter becomes\n  //\n  //   subspace_B_ = ((U^T D^-1) J^T) (J (D^-1 U))\n  //               = (J (D^-1 U))^T (J (D^-1 U))\n\n  subspace_basis_ =\n      basis_qr.householderQ() * Matrix::Identity(jacobian->num_cols(), 2);\n\n  subspace_g_ = subspace_basis_.transpose() * gradient_;\n\n  Eigen::Matrix<double, 2, Eigen::Dynamic, Eigen::RowMajor>\n      Jb(2, jacobian->num_rows());\n  Jb.setZero();\n\n  Vector tmp;\n  tmp = (subspace_basis_.col(0).array() / diagonal_.array()).matrix();\n  jacobian->RightMultiply(tmp.data(), Jb.row(0).data());\n  tmp = (subspace_basis_.col(1).array() / diagonal_.array()).matrix();\n  jacobian->RightMultiply(tmp.data(), Jb.row(1).data());\n\n  subspace_B_ = Jb * Jb.transpose();\n\n  return true;\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/dogleg_strategy.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_DOGLEG_STRATEGY_H_\n#define CERES_INTERNAL_DOGLEG_STRATEGY_H_\n\n#include \"ceres/linear_solver.h\"\n#include \"ceres/trust_region_strategy.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// Dogleg step computation and trust region sizing strategy based on\n// on \"Methods for Nonlinear Least Squares\" by K. Madsen, H.B. Nielsen\n// and O. Tingleff. Available to download from\n//\n// http://www2.imm.dtu.dk/pubdb/views/edoc_download.php/3215/pdf/imm3215.pdf\n//\n// One minor modification is that instead of computing the pure\n// Gauss-Newton step, we compute a regularized version of it. This is\n// because the Jacobian is often rank-deficient and in such cases\n// using a direct solver leads to numerical failure.\n//\n// If SUBSPACE is passed as the type argument to the constructor, the\n// DoglegStrategy follows the approach by Shultz, Schnabel, Byrd.\n// This finds the exact optimum over the two-dimensional subspace\n// spanned by the two Dogleg vectors.\nclass DoglegStrategy : public TrustRegionStrategy {\n public:\n  explicit DoglegStrategy(const TrustRegionStrategy::Options& options);\n  virtual ~DoglegStrategy() {}\n\n  // TrustRegionStrategy interface\n  Summary ComputeStep(const PerSolveOptions& per_solve_options,\n                              SparseMatrix* jacobian,\n                              const double* residuals,\n                              double* step) final;\n  void StepAccepted(double step_quality) final;\n  void StepRejected(double step_quality) final;\n  void StepIsInvalid();\n  double Radius() const final;\n\n  // These functions are predominantly for testing.\n  Vector gradient() const { return gradient_; }\n  Vector gauss_newton_step() const { return gauss_newton_step_; }\n  Matrix subspace_basis() const { return subspace_basis_; }\n  Vector subspace_g() const { return subspace_g_; }\n  Matrix subspace_B() const { return subspace_B_; }\n\n private:\n  typedef Eigen::Matrix<double, 2, 1, Eigen::DontAlign> Vector2d;\n  typedef Eigen::Matrix<double, 2, 2, Eigen::DontAlign> Matrix2d;\n\n  LinearSolver::Summary ComputeGaussNewtonStep(\n      const PerSolveOptions& per_solve_options,\n      SparseMatrix* jacobian,\n      const double* residuals);\n  void ComputeCauchyPoint(SparseMatrix* jacobian);\n  void ComputeGradient(SparseMatrix* jacobian, const double* residuals);\n  void ComputeTraditionalDoglegStep(double* step);\n  bool ComputeSubspaceModel(SparseMatrix* jacobian);\n  void ComputeSubspaceDoglegStep(double* step);\n\n  bool FindMinimumOnTrustRegionBoundary(Vector2d* minimum) const;\n  Vector MakePolynomialForBoundaryConstrainedProblem() const;\n  Vector2d ComputeSubspaceStepFromRoot(double lambda) const;\n  double EvaluateSubspaceModel(const Vector2d& x) const;\n\n  LinearSolver* linear_solver_;\n  double radius_;\n  const double max_radius_;\n\n  const double min_diagonal_;\n  const double max_diagonal_;\n\n  // mu is used to scale the diagonal matrix used to make the\n  // Gauss-Newton solve full rank. In each solve, the strategy starts\n  // out with mu = min_mu, and tries values up to max_mu. If the user\n  // reports an invalid step, the value of mu_ is increased so that\n  // the next solve starts with a stronger regularization.\n  //\n  // If a successful step is reported, then the value of mu_ is\n  // decreased with a lower bound of min_mu_.\n  double mu_;\n  const double min_mu_;\n  const double max_mu_;\n  const double mu_increase_factor_;\n  const double increase_threshold_;\n  const double decrease_threshold_;\n\n  Vector diagonal_;  // sqrt(diag(J^T J))\n  Vector lm_diagonal_;\n\n  Vector gradient_;\n  Vector gauss_newton_step_;\n\n  // cauchy_step = alpha * gradient\n  double alpha_;\n  double dogleg_step_norm_;\n\n  // When, ComputeStep is called, reuse_ indicates whether the\n  // Gauss-Newton and Cauchy steps from the last call to ComputeStep\n  // can be reused or not.\n  //\n  // If the user called StepAccepted, then it is expected that the\n  // user has recomputed the Jacobian matrix and new Gauss-Newton\n  // solve is needed and reuse is set to false.\n  //\n  // If the user called StepRejected, then it is expected that the\n  // user wants to solve the trust region problem with the same matrix\n  // but a different trust region radius and the Gauss-Newton and\n  // Cauchy steps can be reused to compute the Dogleg, thus reuse is\n  // set to true.\n  //\n  // If the user called StepIsInvalid, then there was a numerical\n  // problem with the step computed in the last call to ComputeStep,\n  // and the regularization used to do the Gauss-Newton solve is\n  // increased and a new solve should be done when ComputeStep is\n  // called again, thus reuse is set to false.\n  bool reuse_;\n\n  // The dogleg type determines how the minimum of the local\n  // quadratic model is found.\n  DoglegType dogleg_type_;\n\n  // If the type is SUBSPACE_DOGLEG, the two-dimensional\n  // model 1/2 x^T B x + g^T x has to be computed and stored.\n  bool subspace_is_one_dimensional_;\n  Matrix subspace_basis_;\n  Vector2d subspace_g_;\n  Matrix2d subspace_B_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_DOGLEG_STRATEGY_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/dogleg_strategy_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: moll.markus@arcor.de (Markus Moll)\n\n#include <limits>\n#include <memory>\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/dense_qr_solver.h\"\n#include \"ceres/dogleg_strategy.h\"\n#include \"ceres/linear_solver.h\"\n#include \"ceres/trust_region_strategy.h\"\n#include \"glog/logging.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\nnamespace {\n\nclass Fixture : public testing::Test {\n protected:\n  std::unique_ptr<DenseSparseMatrix> jacobian_;\n  Vector residual_;\n  Vector x_;\n  TrustRegionStrategy::Options options_;\n};\n\n// A test problem where\n//\n//   J^T J = Q diag([1 2 4 8 16 32]) Q^T\n//\n// where Q is a randomly chosen orthonormal basis of R^6.\n// The residual is chosen so that the minimum of the quadratic function is\n// at (1, 1, 1, 1, 1, 1). It is therefore at a distance of sqrt(6) ~ 2.45\n// from the origin.\nclass DoglegStrategyFixtureEllipse : public Fixture {\n protected:\n  void SetUp() final {\n    Matrix basis(6, 6);\n    // The following lines exceed 80 characters for better readability.\n    basis << -0.1046920933796121, -0.7449367449921986, -0.4190744502875876, -0.4480450716142566,  0.2375351607929440, -0.0363053418882862,  // NOLINT\n              0.4064975684355914,  0.2681113508511354, -0.7463625494601520, -0.0803264850508117, -0.4463149623021321,  0.0130224954867195,  // NOLINT\n             -0.5514387729089798,  0.1026621026168657, -0.5008316122125011,  0.5738122212666414,  0.2974664724007106,  0.1296020877535158,  // NOLINT\n              0.5037835370947156,  0.2668479925183712, -0.1051754618492798, -0.0272739396578799,  0.7947481647088278, -0.1776623363955670,  // NOLINT\n             -0.4005458426625444,  0.2939330589634109, -0.0682629380550051, -0.2895448882503687, -0.0457239396341685, -0.8139899477847840,  // NOLINT\n             -0.3247764582762654,  0.4528151365941945, -0.0276683863102816, -0.6155994592510784,  0.1489240599972848,  0.5362574892189350;  // NOLINT\n\n    Vector Ddiag(6);\n    Ddiag << 1.0, 2.0, 4.0, 8.0, 16.0, 32.0;\n\n    Matrix sqrtD = Ddiag.array().sqrt().matrix().asDiagonal();\n    Matrix jacobian = sqrtD * basis;\n    jacobian_.reset(new DenseSparseMatrix(jacobian));\n\n    Vector minimum(6);\n    minimum << 1.0, 1.0, 1.0, 1.0, 1.0, 1.0;\n    residual_ = -jacobian * minimum;\n\n    x_.resize(6);\n    x_.setZero();\n\n    options_.min_lm_diagonal = 1.0;\n    options_.max_lm_diagonal = 1.0;\n  }\n};\n\n// A test problem where\n//\n//   J^T J = diag([1 2 4 8 16 32]) .\n//\n// The residual is chosen so that the minimum of the quadratic function is\n// at (0, 0, 1, 0, 0, 0). It is therefore at a distance of 1 from the origin.\n// The gradient at the origin points towards the global minimum.\nclass DoglegStrategyFixtureValley : public Fixture {\n protected:\n  void SetUp() final {\n    Vector Ddiag(6);\n    Ddiag << 1.0, 2.0, 4.0, 8.0, 16.0, 32.0;\n\n    Matrix jacobian = Ddiag.asDiagonal();\n    jacobian_.reset(new DenseSparseMatrix(jacobian));\n\n    Vector minimum(6);\n    minimum << 0.0, 0.0, 1.0, 0.0, 0.0, 0.0;\n    residual_ = -jacobian * minimum;\n\n    x_.resize(6);\n    x_.setZero();\n\n    options_.min_lm_diagonal = 1.0;\n    options_.max_lm_diagonal = 1.0;\n  }\n};\n\nconst double kTolerance = 1e-14;\nconst double kToleranceLoose = 1e-5;\nconst double kEpsilon = std::numeric_limits<double>::epsilon();\n\n}  // namespace\n\n// The DoglegStrategy must never return a step that is longer than the current\n// trust region radius.\nTEST_F(DoglegStrategyFixtureEllipse, TrustRegionObeyedTraditional) {\n  std::unique_ptr<LinearSolver> linear_solver(\n      new DenseQRSolver(LinearSolver::Options()));\n  options_.linear_solver = linear_solver.get();\n  // The global minimum is at (1, 1, ..., 1), so the distance to it is\n  // sqrt(6.0).  By restricting the trust region to a radius of 2.0,\n  // we test if the trust region is actually obeyed.\n  options_.dogleg_type = TRADITIONAL_DOGLEG;\n  options_.initial_radius = 2.0;\n  options_.max_radius = 2.0;\n\n  DoglegStrategy strategy(options_);\n  TrustRegionStrategy::PerSolveOptions pso;\n\n  TrustRegionStrategy::Summary summary = strategy.ComputeStep(pso,\n                                                              jacobian_.get(),\n                                                              residual_.data(),\n                                                              x_.data());\n\n  EXPECT_NE(summary.termination_type, LINEAR_SOLVER_FAILURE);\n  EXPECT_LE(x_.norm(), options_.initial_radius * (1.0 + 4.0 * kEpsilon));\n}\n\nTEST_F(DoglegStrategyFixtureEllipse, TrustRegionObeyedSubspace) {\n  std::unique_ptr<LinearSolver> linear_solver(\n      new DenseQRSolver(LinearSolver::Options()));\n  options_.linear_solver = linear_solver.get();\n  options_.dogleg_type = SUBSPACE_DOGLEG;\n  options_.initial_radius = 2.0;\n  options_.max_radius = 2.0;\n\n  DoglegStrategy strategy(options_);\n  TrustRegionStrategy::PerSolveOptions pso;\n\n  TrustRegionStrategy::Summary summary = strategy.ComputeStep(pso,\n                                                              jacobian_.get(),\n                                                              residual_.data(),\n                                                              x_.data());\n\n  EXPECT_NE(summary.termination_type, LINEAR_SOLVER_FAILURE);\n  EXPECT_LE(x_.norm(), options_.initial_radius * (1.0 + 4.0 * kEpsilon));\n}\n\nTEST_F(DoglegStrategyFixtureEllipse, CorrectGaussNewtonStep) {\n  std::unique_ptr<LinearSolver> linear_solver(\n      new DenseQRSolver(LinearSolver::Options()));\n  options_.linear_solver = linear_solver.get();\n  options_.dogleg_type = SUBSPACE_DOGLEG;\n  options_.initial_radius = 10.0;\n  options_.max_radius = 10.0;\n\n  DoglegStrategy strategy(options_);\n  TrustRegionStrategy::PerSolveOptions pso;\n\n  TrustRegionStrategy::Summary summary = strategy.ComputeStep(pso,\n                                                              jacobian_.get(),\n                                                              residual_.data(),\n                                                              x_.data());\n\n  EXPECT_NE(summary.termination_type, LINEAR_SOLVER_FAILURE);\n  EXPECT_NEAR(x_(0), 1.0, kToleranceLoose);\n  EXPECT_NEAR(x_(1), 1.0, kToleranceLoose);\n  EXPECT_NEAR(x_(2), 1.0, kToleranceLoose);\n  EXPECT_NEAR(x_(3), 1.0, kToleranceLoose);\n  EXPECT_NEAR(x_(4), 1.0, kToleranceLoose);\n  EXPECT_NEAR(x_(5), 1.0, kToleranceLoose);\n}\n\n// Test if the subspace basis is a valid orthonormal basis of the space spanned\n// by the gradient and the Gauss-Newton point.\nTEST_F(DoglegStrategyFixtureEllipse, ValidSubspaceBasis) {\n  std::unique_ptr<LinearSolver> linear_solver(\n      new DenseQRSolver(LinearSolver::Options()));\n  options_.linear_solver = linear_solver.get();\n  options_.dogleg_type = SUBSPACE_DOGLEG;\n  options_.initial_radius = 2.0;\n  options_.max_radius = 2.0;\n\n  DoglegStrategy strategy(options_);\n  TrustRegionStrategy::PerSolveOptions pso;\n\n  strategy.ComputeStep(pso, jacobian_.get(), residual_.data(), x_.data());\n\n  // Check if the basis is orthonormal.\n  const Matrix basis = strategy.subspace_basis();\n  EXPECT_NEAR(basis.col(0).norm(), 1.0, kTolerance);\n  EXPECT_NEAR(basis.col(1).norm(), 1.0, kTolerance);\n  EXPECT_NEAR(basis.col(0).dot(basis.col(1)), 0.0, kTolerance);\n\n  // Check if the gradient projects onto itself.\n  const Vector gradient = strategy.gradient();\n  EXPECT_NEAR((gradient - basis*(basis.transpose()*gradient)).norm(),\n              0.0,\n              kTolerance);\n\n  // Check if the Gauss-Newton point projects onto itself.\n  const Vector gn = strategy.gauss_newton_step();\n  EXPECT_NEAR((gn - basis*(basis.transpose()*gn)).norm(),\n              0.0,\n              kTolerance);\n}\n\n// Test if the step is correct if the gradient and the Gauss-Newton step point\n// in the same direction and the Gauss-Newton step is outside the trust region,\n// i.e. the trust region is active.\nTEST_F(DoglegStrategyFixtureValley, CorrectStepLocalOptimumAlongGradient) {\n  std::unique_ptr<LinearSolver> linear_solver(\n      new DenseQRSolver(LinearSolver::Options()));\n  options_.linear_solver = linear_solver.get();\n  options_.dogleg_type = SUBSPACE_DOGLEG;\n  options_.initial_radius = 0.25;\n  options_.max_radius = 0.25;\n\n  DoglegStrategy strategy(options_);\n  TrustRegionStrategy::PerSolveOptions pso;\n\n  TrustRegionStrategy::Summary summary = strategy.ComputeStep(pso,\n                                                              jacobian_.get(),\n                                                              residual_.data(),\n                                                              x_.data());\n\n  EXPECT_NE(summary.termination_type, LINEAR_SOLVER_FAILURE);\n  EXPECT_NEAR(x_(0), 0.0, kToleranceLoose);\n  EXPECT_NEAR(x_(1), 0.0, kToleranceLoose);\n  EXPECT_NEAR(x_(2), options_.initial_radius, kToleranceLoose);\n  EXPECT_NEAR(x_(3), 0.0, kToleranceLoose);\n  EXPECT_NEAR(x_(4), 0.0, kToleranceLoose);\n  EXPECT_NEAR(x_(5), 0.0, kToleranceLoose);\n}\n\n// Test if the step is correct if the gradient and the Gauss-Newton step point\n// in the same direction and the Gauss-Newton step is inside the trust region,\n// i.e. the trust region is inactive.\nTEST_F(DoglegStrategyFixtureValley, CorrectStepGlobalOptimumAlongGradient) {\n  std::unique_ptr<LinearSolver> linear_solver(\n      new DenseQRSolver(LinearSolver::Options()));\n  options_.linear_solver = linear_solver.get();\n  options_.dogleg_type = SUBSPACE_DOGLEG;\n  options_.initial_radius = 2.0;\n  options_.max_radius = 2.0;\n\n  DoglegStrategy strategy(options_);\n  TrustRegionStrategy::PerSolveOptions pso;\n\n  TrustRegionStrategy::Summary summary = strategy.ComputeStep(pso,\n                                                              jacobian_.get(),\n                                                              residual_.data(),\n                                                              x_.data());\n\n  EXPECT_NE(summary.termination_type, LINEAR_SOLVER_FAILURE);\n  EXPECT_NEAR(x_(0), 0.0, kToleranceLoose);\n  EXPECT_NEAR(x_(1), 0.0, kToleranceLoose);\n  EXPECT_NEAR(x_(2), 1.0, kToleranceLoose);\n  EXPECT_NEAR(x_(3), 0.0, kToleranceLoose);\n  EXPECT_NEAR(x_(4), 0.0, kToleranceLoose);\n  EXPECT_NEAR(x_(5), 0.0, kToleranceLoose);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/dynamic_autodiff_cost_function_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: thadh@gmail.com (Thad Hughes)\n//         mierle@gmail.com (Keir Mierle)\n//         sameeragarwal@google.com (Sameer Agarwal)\n\n#include <cstddef>\n\n#include <memory>\n#include \"ceres/dynamic_autodiff_cost_function.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::vector;\n\n// Takes 2 parameter blocks:\n//     parameters[0] is size 10.\n//     parameters[1] is size 5.\n// Emits 21 residuals:\n//     A: i - parameters[0][i], for i in [0,10)  -- this is 10 residuals\n//     B: parameters[0][i] - i, for i in [0,10)  -- this is another 10.\n//     C: sum(parameters[0][i]^2 - 8*parameters[0][i]) + sum(parameters[1][i])\nclass MyCostFunctor {\n public:\n  template <typename T>\n  bool operator()(T const* const* parameters, T* residuals) const {\n    const T* params0 = parameters[0];\n    int r = 0;\n    for (int i = 0; i < 10; ++i) {\n      residuals[r++] = T(i) - params0[i];\n      residuals[r++] = params0[i] - T(i);\n    }\n\n    T c_residual(0.0);\n    for (int i = 0; i < 10; ++i) {\n      c_residual += pow(params0[i], 2) - T(8) * params0[i];\n    }\n\n    const T* params1 = parameters[1];\n    for (int i = 0; i < 5; ++i) {\n      c_residual += params1[i];\n    }\n    residuals[r++] = c_residual;\n    return true;\n  }\n};\n\nTEST(DynamicAutodiffCostFunctionTest, TestResiduals) {\n  vector<double> param_block_0(10, 0.0);\n  vector<double> param_block_1(5, 0.0);\n  DynamicAutoDiffCostFunction<MyCostFunctor, 3> cost_function(\n      new MyCostFunctor());\n  cost_function.AddParameterBlock(param_block_0.size());\n  cost_function.AddParameterBlock(param_block_1.size());\n  cost_function.SetNumResiduals(21);\n\n  // Test residual computation.\n  vector<double> residuals(21, -100000);\n  vector<double*> parameter_blocks(2);\n  parameter_blocks[0] = &param_block_0[0];\n  parameter_blocks[1] = &param_block_1[0];\n  EXPECT_TRUE(cost_function.Evaluate(&parameter_blocks[0],\n                                     residuals.data(),\n                                     NULL));\n  for (int r = 0; r < 10; ++r) {\n    EXPECT_EQ(1.0 * r, residuals.at(r * 2));\n    EXPECT_EQ(-1.0 * r, residuals.at(r * 2 + 1));\n  }\n  EXPECT_EQ(0, residuals.at(20));\n}\n\nTEST(DynamicAutodiffCostFunctionTest, TestJacobian) {\n  // Test the residual counting.\n  vector<double> param_block_0(10, 0.0);\n  for (int i = 0; i < 10; ++i) {\n    param_block_0[i] = 2 * i;\n  }\n  vector<double> param_block_1(5, 0.0);\n  DynamicAutoDiffCostFunction<MyCostFunctor, 3> cost_function(\n      new MyCostFunctor());\n  cost_function.AddParameterBlock(param_block_0.size());\n  cost_function.AddParameterBlock(param_block_1.size());\n  cost_function.SetNumResiduals(21);\n\n  // Prepare the residuals.\n  vector<double> residuals(21, -100000);\n\n  // Prepare the parameters.\n  vector<double*> parameter_blocks(2);\n  parameter_blocks[0] = &param_block_0[0];\n  parameter_blocks[1] = &param_block_1[0];\n\n  // Prepare the jacobian.\n  vector<vector<double>> jacobian_vect(2);\n  jacobian_vect[0].resize(21 * 10, -100000);\n  jacobian_vect[1].resize(21 * 5, -100000);\n  vector<double*> jacobian;\n  jacobian.push_back(jacobian_vect[0].data());\n  jacobian.push_back(jacobian_vect[1].data());\n\n  // Test jacobian computation.\n  EXPECT_TRUE(cost_function.Evaluate(parameter_blocks.data(),\n                                     residuals.data(),\n                                     jacobian.data()));\n\n  for (int r = 0; r < 10; ++r) {\n    EXPECT_EQ(-1.0 * r, residuals.at(r * 2));\n    EXPECT_EQ(+1.0 * r, residuals.at(r * 2 + 1));\n  }\n  EXPECT_EQ(420, residuals.at(20));\n  for (int p = 0; p < 10; ++p) {\n    // Check \"A\" Jacobian.\n    EXPECT_EQ(-1.0, jacobian_vect[0][2*p * 10 + p]);\n    // Check \"B\" Jacobian.\n    EXPECT_EQ(+1.0, jacobian_vect[0][(2*p+1) * 10 + p]);\n    jacobian_vect[0][2*p * 10 + p] = 0.0;\n    jacobian_vect[0][(2*p+1) * 10 + p] = 0.0;\n  }\n\n  // Check \"C\" Jacobian for first parameter block.\n  for (int p = 0; p < 10; ++p) {\n    EXPECT_EQ(4 * p - 8, jacobian_vect[0][20 * 10 + p]);\n    jacobian_vect[0][20 * 10 + p] = 0.0;\n  }\n  for (int i = 0; i < jacobian_vect[0].size(); ++i) {\n    EXPECT_EQ(0.0, jacobian_vect[0][i]);\n  }\n\n  // Check \"C\" Jacobian for second parameter block.\n  for (int p = 0; p < 5; ++p) {\n    EXPECT_EQ(1.0, jacobian_vect[1][20 * 5 + p]);\n    jacobian_vect[1][20 * 5 + p] = 0.0;\n  }\n  for (int i = 0; i < jacobian_vect[1].size(); ++i) {\n    EXPECT_EQ(0.0, jacobian_vect[1][i]);\n  }\n}\n\nTEST(DynamicAutodiffCostFunctionTest, JacobianWithFirstParameterBlockConstant) {\n  // Test the residual counting.\n  vector<double> param_block_0(10, 0.0);\n  for (int i = 0; i < 10; ++i) {\n    param_block_0[i] = 2 * i;\n  }\n  vector<double> param_block_1(5, 0.0);\n  DynamicAutoDiffCostFunction<MyCostFunctor, 3> cost_function(\n      new MyCostFunctor());\n  cost_function.AddParameterBlock(param_block_0.size());\n  cost_function.AddParameterBlock(param_block_1.size());\n  cost_function.SetNumResiduals(21);\n\n  // Prepare the residuals.\n  vector<double> residuals(21, -100000);\n\n  // Prepare the parameters.\n  vector<double*> parameter_blocks(2);\n  parameter_blocks[0] = &param_block_0[0];\n  parameter_blocks[1] = &param_block_1[0];\n\n  // Prepare the jacobian.\n  vector<vector<double>> jacobian_vect(2);\n  jacobian_vect[0].resize(21 * 10, -100000);\n  jacobian_vect[1].resize(21 * 5, -100000);\n  vector<double*> jacobian;\n  jacobian.push_back(NULL);\n  jacobian.push_back(jacobian_vect[1].data());\n\n  // Test jacobian computation.\n  EXPECT_TRUE(cost_function.Evaluate(parameter_blocks.data(),\n                                     residuals.data(),\n                                     jacobian.data()));\n\n  for (int r = 0; r < 10; ++r) {\n    EXPECT_EQ(-1.0 * r, residuals.at(r * 2));\n    EXPECT_EQ(+1.0 * r, residuals.at(r * 2 + 1));\n  }\n  EXPECT_EQ(420, residuals.at(20));\n\n  // Check \"C\" Jacobian for second parameter block.\n  for (int p = 0; p < 5; ++p) {\n    EXPECT_EQ(1.0, jacobian_vect[1][20 * 5 + p]);\n    jacobian_vect[1][20 * 5 + p] = 0.0;\n  }\n  for (int i = 0; i < jacobian_vect[1].size(); ++i) {\n    EXPECT_EQ(0.0, jacobian_vect[1][i]);\n  }\n}\n\nTEST(DynamicAutodiffCostFunctionTest, JacobianWithSecondParameterBlockConstant) {  // NOLINT\n  // Test the residual counting.\n  vector<double> param_block_0(10, 0.0);\n  for (int i = 0; i < 10; ++i) {\n    param_block_0[i] = 2 * i;\n  }\n  vector<double> param_block_1(5, 0.0);\n  DynamicAutoDiffCostFunction<MyCostFunctor, 3> cost_function(\n      new MyCostFunctor());\n  cost_function.AddParameterBlock(param_block_0.size());\n  cost_function.AddParameterBlock(param_block_1.size());\n  cost_function.SetNumResiduals(21);\n\n  // Prepare the residuals.\n  vector<double> residuals(21, -100000);\n\n  // Prepare the parameters.\n  vector<double*> parameter_blocks(2);\n  parameter_blocks[0] = &param_block_0[0];\n  parameter_blocks[1] = &param_block_1[0];\n\n  // Prepare the jacobian.\n  vector<vector<double>> jacobian_vect(2);\n  jacobian_vect[0].resize(21 * 10, -100000);\n  jacobian_vect[1].resize(21 * 5, -100000);\n  vector<double*> jacobian;\n  jacobian.push_back(jacobian_vect[0].data());\n  jacobian.push_back(NULL);\n\n  // Test jacobian computation.\n  EXPECT_TRUE(cost_function.Evaluate(parameter_blocks.data(),\n                                     residuals.data(),\n                                     jacobian.data()));\n\n  for (int r = 0; r < 10; ++r) {\n    EXPECT_EQ(-1.0 * r, residuals.at(r * 2));\n    EXPECT_EQ(+1.0 * r, residuals.at(r * 2 + 1));\n  }\n  EXPECT_EQ(420, residuals.at(20));\n  for (int p = 0; p < 10; ++p) {\n    // Check \"A\" Jacobian.\n    EXPECT_EQ(-1.0, jacobian_vect[0][2*p * 10 + p]);\n    // Check \"B\" Jacobian.\n    EXPECT_EQ(+1.0, jacobian_vect[0][(2*p+1) * 10 + p]);\n    jacobian_vect[0][2*p * 10 + p] = 0.0;\n    jacobian_vect[0][(2*p+1) * 10 + p] = 0.0;\n  }\n\n  // Check \"C\" Jacobian for first parameter block.\n  for (int p = 0; p < 10; ++p) {\n    EXPECT_EQ(4 * p - 8, jacobian_vect[0][20 * 10 + p]);\n    jacobian_vect[0][20 * 10 + p] = 0.0;\n  }\n  for (int i = 0; i < jacobian_vect[0].size(); ++i) {\n    EXPECT_EQ(0.0, jacobian_vect[0][i]);\n  }\n}\n\n// Takes 3 parameter blocks:\n//     parameters[0] (x) is size 1.\n//     parameters[1] (y) is size 2.\n//     parameters[2] (z) is size 3.\n// Emits 7 residuals:\n//     A: x[0] (= sum_x)\n//     B: y[0] + 2.0 * y[1] (= sum_y)\n//     C: z[0] + 3.0 * z[1] + 6.0 * z[2] (= sum_z)\n//     D: sum_x * sum_y\n//     E: sum_y * sum_z\n//     F: sum_x * sum_z\n//     G: sum_x * sum_y * sum_z\nclass MyThreeParameterCostFunctor {\n public:\n  template <typename T>\n  bool operator()(T const* const* parameters, T* residuals) const {\n    const T* x = parameters[0];\n    const T* y = parameters[1];\n    const T* z = parameters[2];\n\n    T sum_x = x[0];\n    T sum_y = y[0] + 2.0 * y[1];\n    T sum_z = z[0] + 3.0 * z[1] + 6.0 * z[2];\n\n    residuals[0] = sum_x;\n    residuals[1] = sum_y;\n    residuals[2] = sum_z;\n    residuals[3] = sum_x * sum_y;\n    residuals[4] = sum_y * sum_z;\n    residuals[5] = sum_x * sum_z;\n    residuals[6] = sum_x * sum_y * sum_z;\n    return true;\n  }\n};\n\nclass ThreeParameterCostFunctorTest : public ::testing::Test {\n protected:\n  void SetUp() final {\n    // Prepare the parameters.\n    x_.resize(1);\n    x_[0] = 0.0;\n\n    y_.resize(2);\n    y_[0] = 1.0;\n    y_[1] = 3.0;\n\n    z_.resize(3);\n    z_[0] = 2.0;\n    z_[1] = 4.0;\n    z_[2] = 6.0;\n\n    parameter_blocks_.resize(3);\n    parameter_blocks_[0] = &x_[0];\n    parameter_blocks_[1] = &y_[0];\n    parameter_blocks_[2] = &z_[0];\n\n    // Prepare the cost function.\n    typedef DynamicAutoDiffCostFunction<MyThreeParameterCostFunctor, 3>\n      DynamicMyThreeParameterCostFunction;\n    DynamicMyThreeParameterCostFunction * cost_function =\n      new DynamicMyThreeParameterCostFunction(\n        new MyThreeParameterCostFunctor());\n    cost_function->AddParameterBlock(1);\n    cost_function->AddParameterBlock(2);\n    cost_function->AddParameterBlock(3);\n    cost_function->SetNumResiduals(7);\n\n    cost_function_.reset(cost_function);\n\n    // Setup jacobian data.\n    jacobian_vect_.resize(3);\n    jacobian_vect_[0].resize(7 * x_.size(), -100000);\n    jacobian_vect_[1].resize(7 * y_.size(), -100000);\n    jacobian_vect_[2].resize(7 * z_.size(), -100000);\n\n    // Prepare the expected residuals.\n    const double sum_x = x_[0];\n    const double sum_y = y_[0] + 2.0 * y_[1];\n    const double sum_z = z_[0] + 3.0 * z_[1] + 6.0 * z_[2];\n\n    expected_residuals_.resize(7);\n    expected_residuals_[0] = sum_x;\n    expected_residuals_[1] = sum_y;\n    expected_residuals_[2] = sum_z;\n    expected_residuals_[3] = sum_x * sum_y;\n    expected_residuals_[4] = sum_y * sum_z;\n    expected_residuals_[5] = sum_x * sum_z;\n    expected_residuals_[6] = sum_x * sum_y * sum_z;\n\n    // Prepare the expected jacobian entries.\n    expected_jacobian_x_.resize(7);\n    expected_jacobian_x_[0] = 1.0;\n    expected_jacobian_x_[1] = 0.0;\n    expected_jacobian_x_[2] = 0.0;\n    expected_jacobian_x_[3] = sum_y;\n    expected_jacobian_x_[4] = 0.0;\n    expected_jacobian_x_[5] = sum_z;\n    expected_jacobian_x_[6] = sum_y * sum_z;\n\n    expected_jacobian_y_.resize(14);\n    expected_jacobian_y_[0] = 0.0;\n    expected_jacobian_y_[1] = 0.0;\n    expected_jacobian_y_[2] = 1.0;\n    expected_jacobian_y_[3] = 2.0;\n    expected_jacobian_y_[4] = 0.0;\n    expected_jacobian_y_[5] = 0.0;\n    expected_jacobian_y_[6] = sum_x;\n    expected_jacobian_y_[7] = 2.0 * sum_x;\n    expected_jacobian_y_[8] = sum_z;\n    expected_jacobian_y_[9] = 2.0 * sum_z;\n    expected_jacobian_y_[10] = 0.0;\n    expected_jacobian_y_[11] = 0.0;\n    expected_jacobian_y_[12] = sum_x * sum_z;\n    expected_jacobian_y_[13] = 2.0 * sum_x * sum_z;\n\n    expected_jacobian_z_.resize(21);\n    expected_jacobian_z_[0] = 0.0;\n    expected_jacobian_z_[1] = 0.0;\n    expected_jacobian_z_[2] = 0.0;\n    expected_jacobian_z_[3] = 0.0;\n    expected_jacobian_z_[4] = 0.0;\n    expected_jacobian_z_[5] = 0.0;\n    expected_jacobian_z_[6] = 1.0;\n    expected_jacobian_z_[7] = 3.0;\n    expected_jacobian_z_[8] = 6.0;\n    expected_jacobian_z_[9] = 0.0;\n    expected_jacobian_z_[10] = 0.0;\n    expected_jacobian_z_[11] = 0.0;\n    expected_jacobian_z_[12] = sum_y;\n    expected_jacobian_z_[13] = 3.0 * sum_y;\n    expected_jacobian_z_[14] = 6.0 * sum_y;\n    expected_jacobian_z_[15] = sum_x;\n    expected_jacobian_z_[16] = 3.0 * sum_x;\n    expected_jacobian_z_[17] = 6.0 * sum_x;\n    expected_jacobian_z_[18] = sum_x * sum_y;\n    expected_jacobian_z_[19] = 3.0 * sum_x * sum_y;\n    expected_jacobian_z_[20] = 6.0 * sum_x * sum_y;\n  }\n\n protected:\n  vector<double> x_;\n  vector<double> y_;\n  vector<double> z_;\n\n  vector<double*> parameter_blocks_;\n\n  std::unique_ptr<CostFunction> cost_function_;\n\n  vector<vector<double>> jacobian_vect_;\n\n  vector<double> expected_residuals_;\n\n  vector<double> expected_jacobian_x_;\n  vector<double> expected_jacobian_y_;\n  vector<double> expected_jacobian_z_;\n};\n\nTEST_F(ThreeParameterCostFunctorTest, TestThreeParameterResiduals) {\n  vector<double> residuals(7, -100000);\n  EXPECT_TRUE(cost_function_->Evaluate(parameter_blocks_.data(),\n                                       residuals.data(),\n                                       NULL));\n  for (int i = 0; i < 7; ++i) {\n    EXPECT_EQ(expected_residuals_[i], residuals[i]);\n  }\n}\n\nTEST_F(ThreeParameterCostFunctorTest, TestThreeParameterJacobian) {\n  vector<double> residuals(7, -100000);\n\n  vector<double*> jacobian;\n  jacobian.push_back(jacobian_vect_[0].data());\n  jacobian.push_back(jacobian_vect_[1].data());\n  jacobian.push_back(jacobian_vect_[2].data());\n\n  EXPECT_TRUE(cost_function_->Evaluate(parameter_blocks_.data(),\n                                       residuals.data(),\n                                       jacobian.data()));\n\n  for (int i = 0; i < 7; ++i) {\n    EXPECT_EQ(expected_residuals_[i], residuals[i]);\n  }\n\n  for (int i = 0; i < 7; ++i) {\n    EXPECT_EQ(expected_jacobian_x_[i], jacobian[0][i]);\n  }\n\n  for (int i = 0; i < 14; ++i) {\n    EXPECT_EQ(expected_jacobian_y_[i], jacobian[1][i]);\n  }\n\n  for (int i = 0; i < 21; ++i) {\n    EXPECT_EQ(expected_jacobian_z_[i], jacobian[2][i]);\n  }\n}\n\nTEST_F(ThreeParameterCostFunctorTest,\n       ThreeParameterJacobianWithFirstAndLastParameterBlockConstant) {\n  vector<double> residuals(7, -100000);\n\n  vector<double*> jacobian;\n  jacobian.push_back(NULL);\n  jacobian.push_back(jacobian_vect_[1].data());\n  jacobian.push_back(NULL);\n\n  EXPECT_TRUE(cost_function_->Evaluate(parameter_blocks_.data(),\n                                       residuals.data(),\n                                       jacobian.data()));\n\n  for (int i = 0; i < 7; ++i) {\n    EXPECT_EQ(expected_residuals_[i], residuals[i]);\n  }\n\n  for (int i = 0; i < 14; ++i) {\n    EXPECT_EQ(expected_jacobian_y_[i], jacobian[1][i]);\n  }\n}\n\nTEST_F(ThreeParameterCostFunctorTest,\n       ThreeParameterJacobianWithSecondParameterBlockConstant) {\n  vector<double> residuals(7, -100000);\n\n  vector<double*> jacobian;\n  jacobian.push_back(jacobian_vect_[0].data());\n  jacobian.push_back(NULL);\n  jacobian.push_back(jacobian_vect_[2].data());\n\n  EXPECT_TRUE(cost_function_->Evaluate(parameter_blocks_.data(),\n                                       residuals.data(),\n                                       jacobian.data()));\n\n  for (int i = 0; i < 7; ++i) {\n    EXPECT_EQ(expected_residuals_[i], residuals[i]);\n  }\n\n  for (int i = 0; i < 7; ++i) {\n    EXPECT_EQ(expected_jacobian_x_[i], jacobian[0][i]);\n  }\n\n  for (int i = 0; i < 21; ++i) {\n    EXPECT_EQ(expected_jacobian_z_[i], jacobian[2][i]);\n  }\n}\n\n// Takes 6 parameter blocks all of size 1:\n//     x0, y0, y1, z0, z1, z2\n// Same 7 residuals as MyThreeParameterCostFunctor.\n// Naming convention for tests is (V)ariable and (C)onstant.\nclass MySixParameterCostFunctor {\n public:\n  template <typename T>\n  bool operator()(T const* const* parameters, T* residuals) const {\n    const T* x0 = parameters[0];\n    const T* y0 = parameters[1];\n    const T* y1 = parameters[2];\n    const T* z0 = parameters[3];\n    const T* z1 = parameters[4];\n    const T* z2 = parameters[5];\n\n    T sum_x = x0[0];\n    T sum_y = y0[0] + 2.0 * y1[0];\n    T sum_z = z0[0] + 3.0 * z1[0] + 6.0 * z2[0];\n\n    residuals[0] = sum_x;\n    residuals[1] = sum_y;\n    residuals[2] = sum_z;\n    residuals[3] = sum_x * sum_y;\n    residuals[4] = sum_y * sum_z;\n    residuals[5] = sum_x * sum_z;\n    residuals[6] = sum_x * sum_y * sum_z;\n    return true;\n  }\n};\n\nclass SixParameterCostFunctorTest : public ::testing::Test {\n protected:\n  void SetUp() final {\n    // Prepare the parameters.\n    x0_ = 0.0;\n    y0_ = 1.0;\n    y1_ = 3.0;\n    z0_ = 2.0;\n    z1_ = 4.0;\n    z2_ = 6.0;\n\n    parameter_blocks_.resize(6);\n    parameter_blocks_[0] = &x0_;\n    parameter_blocks_[1] = &y0_;\n    parameter_blocks_[2] = &y1_;\n    parameter_blocks_[3] = &z0_;\n    parameter_blocks_[4] = &z1_;\n    parameter_blocks_[5] = &z2_;\n\n    // Prepare the cost function.\n    typedef DynamicAutoDiffCostFunction<MySixParameterCostFunctor, 3>\n      DynamicMySixParameterCostFunction;\n    DynamicMySixParameterCostFunction * cost_function =\n      new DynamicMySixParameterCostFunction(\n        new MySixParameterCostFunctor());\n    for (int i = 0; i < 6; ++i) {\n      cost_function->AddParameterBlock(1);\n    }\n    cost_function->SetNumResiduals(7);\n\n    cost_function_.reset(cost_function);\n\n    // Setup jacobian data.\n    jacobian_vect_.resize(6);\n    for (int i = 0; i < 6; ++i) {\n      jacobian_vect_[i].resize(7, -100000);\n    }\n\n    // Prepare the expected residuals.\n    const double sum_x = x0_;\n    const double sum_y = y0_ + 2.0 * y1_;\n    const double sum_z = z0_ + 3.0 * z1_ + 6.0 * z2_;\n\n    expected_residuals_.resize(7);\n    expected_residuals_[0] = sum_x;\n    expected_residuals_[1] = sum_y;\n    expected_residuals_[2] = sum_z;\n    expected_residuals_[3] = sum_x * sum_y;\n    expected_residuals_[4] = sum_y * sum_z;\n    expected_residuals_[5] = sum_x * sum_z;\n    expected_residuals_[6] = sum_x * sum_y * sum_z;\n\n    // Prepare the expected jacobian entries.\n    expected_jacobians_.resize(6);\n    expected_jacobians_[0].resize(7);\n    expected_jacobians_[0][0] = 1.0;\n    expected_jacobians_[0][1] = 0.0;\n    expected_jacobians_[0][2] = 0.0;\n    expected_jacobians_[0][3] = sum_y;\n    expected_jacobians_[0][4] = 0.0;\n    expected_jacobians_[0][5] = sum_z;\n    expected_jacobians_[0][6] = sum_y * sum_z;\n\n    expected_jacobians_[1].resize(7);\n    expected_jacobians_[1][0] = 0.0;\n    expected_jacobians_[1][1] = 1.0;\n    expected_jacobians_[1][2] = 0.0;\n    expected_jacobians_[1][3] = sum_x;\n    expected_jacobians_[1][4] = sum_z;\n    expected_jacobians_[1][5] = 0.0;\n    expected_jacobians_[1][6] = sum_x * sum_z;\n\n    expected_jacobians_[2].resize(7);\n    expected_jacobians_[2][0] = 0.0;\n    expected_jacobians_[2][1] = 2.0;\n    expected_jacobians_[2][2] = 0.0;\n    expected_jacobians_[2][3] = 2.0 * sum_x;\n    expected_jacobians_[2][4] = 2.0 * sum_z;\n    expected_jacobians_[2][5] = 0.0;\n    expected_jacobians_[2][6] = 2.0 * sum_x * sum_z;\n\n    expected_jacobians_[3].resize(7);\n    expected_jacobians_[3][0] = 0.0;\n    expected_jacobians_[3][1] = 0.0;\n    expected_jacobians_[3][2] = 1.0;\n    expected_jacobians_[3][3] = 0.0;\n    expected_jacobians_[3][4] = sum_y;\n    expected_jacobians_[3][5] = sum_x;\n    expected_jacobians_[3][6] = sum_x * sum_y;\n\n    expected_jacobians_[4].resize(7);\n    expected_jacobians_[4][0] = 0.0;\n    expected_jacobians_[4][1] = 0.0;\n    expected_jacobians_[4][2] = 3.0;\n    expected_jacobians_[4][3] = 0.0;\n    expected_jacobians_[4][4] = 3.0 * sum_y;\n    expected_jacobians_[4][5] = 3.0 * sum_x;\n    expected_jacobians_[4][6] = 3.0 * sum_x * sum_y;\n\n    expected_jacobians_[5].resize(7);\n    expected_jacobians_[5][0] = 0.0;\n    expected_jacobians_[5][1] = 0.0;\n    expected_jacobians_[5][2] = 6.0;\n    expected_jacobians_[5][3] = 0.0;\n    expected_jacobians_[5][4] = 6.0 * sum_y;\n    expected_jacobians_[5][5] = 6.0 * sum_x;\n    expected_jacobians_[5][6] = 6.0 * sum_x * sum_y;\n  }\n\n protected:\n  double x0_;\n  double y0_;\n  double y1_;\n  double z0_;\n  double z1_;\n  double z2_;\n\n  vector<double*> parameter_blocks_;\n\n  std::unique_ptr<CostFunction> cost_function_;\n\n  vector<vector<double>> jacobian_vect_;\n\n  vector<double> expected_residuals_;\n  vector<vector<double>> expected_jacobians_;\n};\n\nTEST_F(SixParameterCostFunctorTest, TestSixParameterResiduals) {\n  vector<double> residuals(7, -100000);\n  EXPECT_TRUE(cost_function_->Evaluate(parameter_blocks_.data(),\n                                       residuals.data(),\n                                       NULL));\n  for (int i = 0; i < 7; ++i) {\n    EXPECT_EQ(expected_residuals_[i], residuals[i]);\n  }\n}\n\nTEST_F(SixParameterCostFunctorTest, TestSixParameterJacobian) {\n  vector<double> residuals(7, -100000);\n\n  vector<double*> jacobian;\n  jacobian.push_back(jacobian_vect_[0].data());\n  jacobian.push_back(jacobian_vect_[1].data());\n  jacobian.push_back(jacobian_vect_[2].data());\n  jacobian.push_back(jacobian_vect_[3].data());\n  jacobian.push_back(jacobian_vect_[4].data());\n  jacobian.push_back(jacobian_vect_[5].data());\n\n  EXPECT_TRUE(cost_function_->Evaluate(parameter_blocks_.data(),\n                                       residuals.data(),\n                                       jacobian.data()));\n\n  for (int i = 0; i < 7; ++i) {\n    EXPECT_EQ(expected_residuals_[i], residuals[i]);\n  }\n\n  for (int i = 0; i < 6; ++i) {\n    for (int j = 0; j < 7; ++j) {\n      EXPECT_EQ(expected_jacobians_[i][j], jacobian[i][j]);\n    }\n  }\n}\n\nTEST_F(SixParameterCostFunctorTest, TestSixParameterJacobianVVCVVC) {\n  vector<double> residuals(7, -100000);\n\n  vector<double*> jacobian;\n  jacobian.push_back(jacobian_vect_[0].data());\n  jacobian.push_back(jacobian_vect_[1].data());\n  jacobian.push_back(NULL);\n  jacobian.push_back(jacobian_vect_[3].data());\n  jacobian.push_back(jacobian_vect_[4].data());\n  jacobian.push_back(NULL);\n\n  EXPECT_TRUE(cost_function_->Evaluate(parameter_blocks_.data(),\n                                       residuals.data(),\n                                       jacobian.data()));\n\n  for (int i = 0; i < 7; ++i) {\n    EXPECT_EQ(expected_residuals_[i], residuals[i]);\n  }\n\n  for (int i = 0; i < 6; ++i) {\n    // Skip the constant variables.\n    if (i == 2 || i == 5) {\n      continue;\n    }\n\n    for (int j = 0; j < 7; ++j) {\n      EXPECT_EQ(expected_jacobians_[i][j], jacobian[i][j]);\n    }\n  }\n}\n\nTEST_F(SixParameterCostFunctorTest, TestSixParameterJacobianVCCVCV) {\n  vector<double> residuals(7, -100000);\n\n  vector<double*> jacobian;\n  jacobian.push_back(jacobian_vect_[0].data());\n  jacobian.push_back(NULL);\n  jacobian.push_back(NULL);\n  jacobian.push_back(jacobian_vect_[3].data());\n  jacobian.push_back(NULL);\n  jacobian.push_back(jacobian_vect_[5].data());\n\n  EXPECT_TRUE(cost_function_->Evaluate(parameter_blocks_.data(),\n                                       residuals.data(),\n                                       jacobian.data()));\n\n  for (int i = 0; i < 7; ++i) {\n    EXPECT_EQ(expected_residuals_[i], residuals[i]);\n  }\n\n  for (int i = 0; i < 6; ++i) {\n    // Skip the constant variables.\n    if (i == 1 || i == 2 || i == 4) {\n      continue;\n    }\n\n    for (int j = 0; j < 7; ++j) {\n      EXPECT_EQ(expected_jacobians_[i][j], jacobian[i][j]);\n    }\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/dynamic_compressed_row_finalizer.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: richie.stebbing@gmail.com (Richard Stebbing)\n\n#ifndef CERES_INTERNAL_DYNAMIC_COMPRESED_ROW_FINALIZER_H_\n#define CERES_INTERNAL_DYNAMIC_COMPRESED_ROW_FINALIZER_H_\n\n#include \"ceres/casts.h\"\n#include \"ceres/dynamic_compressed_row_sparse_matrix.h\"\n\nnamespace ceres {\nnamespace internal {\n\nstruct DynamicCompressedRowJacobianFinalizer {\n  void operator()(SparseMatrix* base_jacobian, int num_parameters) {\n    DynamicCompressedRowSparseMatrix* jacobian =\n      down_cast<DynamicCompressedRowSparseMatrix*>(base_jacobian);\n    jacobian->Finalize(num_parameters);\n  }\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_DYNAMIC_COMPRESED_ROW_FINALISER_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/dynamic_compressed_row_jacobian_writer.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: richie.stebbing@gmail.com (Richard Stebbing)\n\n#include \"ceres/dynamic_compressed_row_jacobian_writer.h\"\n#include \"ceres/casts.h\"\n#include \"ceres/compressed_row_jacobian_writer.h\"\n#include \"ceres/dynamic_compressed_row_sparse_matrix.h\"\n#include \"ceres/parameter_block.h\"\n#include \"ceres/program.h\"\n#include \"ceres/residual_block.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::pair;\nusing std::vector;\n\nScratchEvaluatePreparer*\nDynamicCompressedRowJacobianWriter::CreateEvaluatePreparers(int num_threads) {\n  return ScratchEvaluatePreparer::Create(*program_, num_threads);\n}\n\nSparseMatrix* DynamicCompressedRowJacobianWriter::CreateJacobian() const {\n  DynamicCompressedRowSparseMatrix* jacobian =\n      new DynamicCompressedRowSparseMatrix(program_->NumResiduals(),\n                                           program_->NumEffectiveParameters(),\n                                           0 /* max_num_nonzeros */);\n  return jacobian;\n}\n\nvoid DynamicCompressedRowJacobianWriter::Write(int residual_id,\n                                               int residual_offset,\n                                               double** jacobians,\n                                               SparseMatrix* base_jacobian) {\n  DynamicCompressedRowSparseMatrix* jacobian =\n      down_cast<DynamicCompressedRowSparseMatrix*>(base_jacobian);\n\n  // Get the `residual_block` of interest.\n  const ResidualBlock* residual_block =\n      program_->residual_blocks()[residual_id];\n  const int num_residuals = residual_block->NumResiduals();\n\n  vector<pair<int, int>> evaluated_jacobian_blocks;\n  CompressedRowJacobianWriter::GetOrderedParameterBlocks(\n      program_, residual_id, &evaluated_jacobian_blocks);\n\n  // `residual_offset` is the residual row in the global jacobian.\n  // Empty the jacobian rows.\n  jacobian->ClearRows(residual_offset, num_residuals);\n\n  // Iterate over each parameter block.\n  for (int i = 0; i < evaluated_jacobian_blocks.size(); ++i) {\n    const ParameterBlock* parameter_block =\n        program_->parameter_blocks()[evaluated_jacobian_blocks[i].first];\n    const int parameter_block_jacobian_index =\n        evaluated_jacobian_blocks[i].second;\n    const int parameter_block_size = parameter_block->LocalSize();\n\n    // For each parameter block only insert its non-zero entries.\n    for (int r = 0; r < num_residuals; ++r) {\n      for (int c = 0; c < parameter_block_size; ++c) {\n        const double& v = jacobians[parameter_block_jacobian_index]\n                                   [r * parameter_block_size + c];\n        // Only insert non-zero entries.\n        if (v != 0.0) {\n          jacobian->InsertEntry(\n              residual_offset + r, parameter_block->delta_offset() + c, v);\n        }\n      }\n    }\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/dynamic_compressed_row_jacobian_writer.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: richie.stebbing@gmail.com (Richard Stebbing)\n//\n// A jacobian writer that directly writes to dynamic compressed row sparse\n// matrices.\n\n#ifndef CERES_INTERNAL_DYNAMIC_COMPRESSED_ROW_JACOBIAN_WRITER_H_\n#define CERES_INTERNAL_DYNAMIC_COMPRESSED_ROW_JACOBIAN_WRITER_H_\n\n#include \"ceres/evaluator.h\"\n#include \"ceres/scratch_evaluate_preparer.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass Program;\nclass SparseMatrix;\n\nclass DynamicCompressedRowJacobianWriter {\n public:\n  DynamicCompressedRowJacobianWriter(Evaluator::Options /* ignored */,\n                                     Program* program)\n    : program_(program) {\n  }\n\n  // JacobianWriter interface.\n\n  // The compressed row matrix has different layout than that assumed by\n  // the cost functions. The scratch space is therefore used to store\n  // the jacobians (including zeros) temporarily before only the non-zero\n  // entries are copied over to the larger jacobian in `Write`.\n  ScratchEvaluatePreparer* CreateEvaluatePreparers(int num_threads);\n\n  // Return a `DynamicCompressedRowSparseMatrix` which is filled by\n  // `Write`. Note that `Finalize` must be called to make the\n  // `CompressedRowSparseMatrix` interface valid.\n  SparseMatrix* CreateJacobian() const;\n\n  // Write only the non-zero jacobian entries for a residual block\n  // (specified by `residual_id`) into `base_jacobian`, starting at the row\n  // specifed by `residual_offset`.\n  //\n  // This method is thread-safe over residual blocks (each `residual_id`).\n  void Write(int residual_id,\n             int residual_offset,\n             double **jacobians,\n             SparseMatrix* base_jacobian);\n\n private:\n  Program* program_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_DYNAMIC_COMPRESSED_ROW_JACOBIAN_WRITER_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/dynamic_compressed_row_sparse_matrix.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: richie.stebbing@gmail.com (Richard Stebbing)\n\n#include <cstring>\n#include \"ceres/dynamic_compressed_row_sparse_matrix.h\"\n\nnamespace ceres {\nnamespace internal {\n\nDynamicCompressedRowSparseMatrix::DynamicCompressedRowSparseMatrix(\n  int num_rows,\n  int num_cols,\n  int initial_max_num_nonzeros)\n    : CompressedRowSparseMatrix(num_rows,\n                                num_cols,\n                                initial_max_num_nonzeros) {\n    dynamic_cols_.resize(num_rows);\n    dynamic_values_.resize(num_rows);\n  }\n\nvoid DynamicCompressedRowSparseMatrix::InsertEntry(int row,\n                                                   int col,\n                                                   const double& value) {\n  CHECK_GE(row, 0);\n  CHECK_LT(row, num_rows());\n  CHECK_GE(col, 0);\n  CHECK_LT(col, num_cols());\n  dynamic_cols_[row].push_back(col);\n  dynamic_values_[row].push_back(value);\n}\n\nvoid DynamicCompressedRowSparseMatrix::ClearRows(int row_start,\n                                                 int num_rows) {\n  for (int r = 0; r < num_rows; ++r) {\n    const int i = row_start + r;\n    CHECK_GE(i, 0);\n    CHECK_LT(i, this->num_rows());\n    dynamic_cols_[i].resize(0);\n    dynamic_values_[i].resize(0);\n  }\n}\n\nvoid DynamicCompressedRowSparseMatrix::Finalize(int num_additional_elements) {\n  // `num_additional_elements` is provided as an argument so that additional\n  // storage can be reserved when it is known by the finalizer.\n  CHECK_GE(num_additional_elements, 0);\n\n  // Count the number of non-zeros and resize `cols_` and `values_`.\n  int num_jacobian_nonzeros = 0;\n  for (int i = 0; i < dynamic_cols_.size(); ++i) {\n    num_jacobian_nonzeros += dynamic_cols_[i].size();\n  }\n\n  SetMaxNumNonZeros(num_jacobian_nonzeros + num_additional_elements);\n\n  // Flatten `dynamic_cols_` into `cols_` and `dynamic_values_`\n  // into `values_`.\n  int index_into_values_and_cols = 0;\n  for (int i = 0; i < num_rows(); ++i) {\n    mutable_rows()[i] = index_into_values_and_cols;\n    const int num_nonzero_columns = dynamic_cols_[i].size();\n    if (num_nonzero_columns > 0) {\n      memcpy(mutable_cols() + index_into_values_and_cols,\n             &dynamic_cols_[i][0],\n             dynamic_cols_[i].size() * sizeof(dynamic_cols_[0][0]));\n      memcpy(mutable_values() + index_into_values_and_cols,\n             &dynamic_values_[i][0],\n             dynamic_values_[i].size() * sizeof(dynamic_values_[0][0]));\n      index_into_values_and_cols += dynamic_cols_[i].size();\n    }\n  }\n  mutable_rows()[num_rows()] = index_into_values_and_cols;\n\n  CHECK_EQ(index_into_values_and_cols, num_jacobian_nonzeros)\n    << \"Ceres bug: final index into values_ and cols_ should be equal to \"\n    << \"the number of jacobian nonzeros. Please contact the developers!\";\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/dynamic_compressed_row_sparse_matrix.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: richie.stebbing@gmail.com (Richard Stebbing)\n//\n// A compressed row sparse matrix that provides an extended interface to\n// allow dynamic insertion of entries. This is provided for the use case\n// where the sparsity structure and number of non-zero entries is dynamic.\n// This flexibility is achieved by using an (internal) scratch space that\n// allows independent insertion of entries into each row (thread-safe).\n// Once insertion is complete, the `Finalize` method must be called to ensure\n// that the underlying `CompressedRowSparseMatrix` is consistent.\n//\n// This should only be used if you really do need a dynamic sparsity pattern.\n\n#ifndef CERES_INTERNAL_DYNAMIC_COMPRESSED_ROW_SPARSE_MATRIX_H_\n#define CERES_INTERNAL_DYNAMIC_COMPRESSED_ROW_SPARSE_MATRIX_H_\n\n#include <vector>\n\n#include \"ceres/compressed_row_sparse_matrix.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass DynamicCompressedRowSparseMatrix : public CompressedRowSparseMatrix {\n public:\n  // Set the number of rows and columns for the underlyig\n  // `CompressedRowSparseMatrix` and set the initial number of maximum non-zero\n  // entries. Note that following the insertion of entries, when `Finalize`\n  // is called the number of non-zeros is determined and all internal\n  // structures are adjusted as required. If you know the upper limit on the\n  // number of non-zeros, then passing this value here can prevent future\n  // memory reallocations which may improve performance. Otherwise, if no\n  // upper limit is available a value of 0 is sufficient.\n  //\n  // Typical usage of this class is to define a new instance with a given\n  // number of rows, columns and maximum number of non-zero elements\n  // (if available). Next, entries are inserted at row and column positions\n  // using `InsertEntry`. Finally, once all elements have been inserted,\n  // `Finalize` must be called to make the underlying\n  // `CompressedRowSparseMatrix` consistent.\n  DynamicCompressedRowSparseMatrix(int num_rows,\n                                   int num_cols,\n                                   int initial_max_num_nonzeros);\n\n  // Insert an entry at a given row and column position. This method is\n  // thread-safe across rows i.e. different threads can insert values\n  // simultaneously into different rows. It should be emphasised that this\n  // method always inserts a new entry and does not check for existing\n  // entries at the specified row and column position. Duplicate entries\n  // for a given row and column position will result in undefined\n  // behavior.\n  void InsertEntry(int row, int col, const double& value);\n\n  // Clear all entries for rows, starting from row index `row_start`\n  // and proceeding for `num_rows`.\n  void ClearRows(int row_start, int num_rows);\n\n  // Make the underlying internal `CompressedRowSparseMatrix` data structures\n  // consistent. Additional space for non-zero entries in the\n  // `CompressedRowSparseMatrix` can be reserved by specifying\n  // `num_additional_elements`. This is useful when it is known that rows will\n  // be appended to the `CompressedRowSparseMatrix` (e.g. appending a diagonal\n  // matrix to the jacobian) as it prevents need for future reallocation.\n  void Finalize(int num_additional_elements);\n\n private:\n  std::vector<std::vector<int>> dynamic_cols_;\n  std::vector<std::vector<double>> dynamic_values_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_DYNAMIC_COMPRESSED_ROW_SPARSE_MATRIX_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/dynamic_compressed_row_sparse_matrix_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: richie.stebbing@gmail.com (Richard Stebbing)\n\n#include \"ceres/dynamic_compressed_row_sparse_matrix.h\"\n\n#include <memory>\n#include \"ceres/casts.h\"\n#include \"ceres/compressed_row_sparse_matrix.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/linear_least_squares_problems.h\"\n#include \"ceres/triplet_sparse_matrix.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::copy;\nusing std::vector;\n\nclass DynamicCompressedRowSparseMatrixTest : public ::testing::Test {\n protected:\n  void SetUp() final {\n    num_rows = 7;\n    num_cols = 4;\n\n    // The number of additional elements reserved when `Finalize` is called\n    // should have no effect on the number of rows, columns or nonzeros.\n    // Set this to some nonzero value to be sure.\n    num_additional_elements = 13;\n\n    expected_num_nonzeros = num_rows * num_cols - std::min(num_rows, num_cols);\n\n    InitialiseDenseReference();\n    InitialiseSparseMatrixReferences();\n\n    dcrsm.reset(new DynamicCompressedRowSparseMatrix(num_rows,\n                                                     num_cols,\n                                                     0));\n  }\n\n  void Finalize() {\n    dcrsm->Finalize(num_additional_elements);\n  }\n\n  void InitialiseDenseReference() {\n    dense.resize(num_rows, num_cols);\n    dense.setZero();\n    int num_nonzeros = 0;\n    for (int i = 0; i < (num_rows * num_cols); ++i) {\n      const int r = i / num_cols, c = i % num_cols;\n      if (r != c) {\n        dense(r, c) = i + 1;\n        ++num_nonzeros;\n      }\n    }\n    ASSERT_EQ(num_nonzeros, expected_num_nonzeros);\n  }\n\n  void InitialiseSparseMatrixReferences() {\n    vector<int> rows, cols;\n    vector<double> values;\n    for (int i = 0; i < (num_rows * num_cols); ++i) {\n      const int r = i / num_cols, c = i % num_cols;\n      if (r != c) {\n        rows.push_back(r);\n        cols.push_back(c);\n        values.push_back(i + 1);\n      }\n    }\n    ASSERT_EQ(values.size(), expected_num_nonzeros);\n\n    tsm.reset(new TripletSparseMatrix(num_rows,\n                                      num_cols,\n                                      expected_num_nonzeros));\n    copy(rows.begin(), rows.end(), tsm->mutable_rows());\n    copy(cols.begin(), cols.end(), tsm->mutable_cols());\n    copy(values.begin(), values.end(), tsm->mutable_values());\n    tsm->set_num_nonzeros(values.size());\n\n    Matrix dense_from_tsm;\n    tsm->ToDenseMatrix(&dense_from_tsm);\n    ASSERT_TRUE((dense.array() == dense_from_tsm.array()).all());\n\n    crsm.reset(CompressedRowSparseMatrix::FromTripletSparseMatrix(*tsm));\n    Matrix dense_from_crsm;\n    crsm->ToDenseMatrix(&dense_from_crsm);\n    ASSERT_TRUE((dense.array() == dense_from_crsm.array()).all());\n  }\n\n  void InsertNonZeroEntriesFromDenseReference() {\n    for (int r = 0; r < num_rows; ++r) {\n      for (int c = 0; c < num_cols; ++c) {\n        const double& v = dense(r, c);\n        if (v != 0.0) {\n          dcrsm->InsertEntry(r, c, v);\n        }\n      }\n    }\n  }\n\n  void ExpectEmpty() {\n    EXPECT_EQ(dcrsm->num_rows(), num_rows);\n    EXPECT_EQ(dcrsm->num_cols(), num_cols);\n    EXPECT_EQ(dcrsm->num_nonzeros(), 0);\n\n    Matrix dense_from_dcrsm;\n    dcrsm->ToDenseMatrix(&dense_from_dcrsm);\n    EXPECT_EQ(dense_from_dcrsm.rows(), num_rows);\n    EXPECT_EQ(dense_from_dcrsm.cols(), num_cols);\n    EXPECT_TRUE((dense_from_dcrsm.array() == 0.0).all());\n  }\n\n  void ExpectEqualToDenseReference() {\n    Matrix dense_from_dcrsm;\n    dcrsm->ToDenseMatrix(&dense_from_dcrsm);\n    EXPECT_TRUE((dense.array() == dense_from_dcrsm.array()).all());\n  }\n\n  void ExpectEqualToCompressedRowSparseMatrixReference() {\n    typedef Eigen::Map<const Eigen::VectorXi> ConstIntVectorRef;\n\n    ConstIntVectorRef crsm_rows(crsm->rows(), crsm->num_rows() + 1);\n    ConstIntVectorRef dcrsm_rows(dcrsm->rows(), dcrsm->num_rows() + 1);\n    EXPECT_TRUE((crsm_rows.array() == dcrsm_rows.array()).all());\n\n    ConstIntVectorRef crsm_cols(crsm->cols(), crsm->num_nonzeros());\n    ConstIntVectorRef dcrsm_cols(dcrsm->cols(), dcrsm->num_nonzeros());\n    EXPECT_TRUE((crsm_cols.array() == dcrsm_cols.array()).all());\n\n    ConstVectorRef crsm_values(crsm->values(), crsm->num_nonzeros());\n    ConstVectorRef dcrsm_values(dcrsm->values(), dcrsm->num_nonzeros());\n    EXPECT_TRUE((crsm_values.array() == dcrsm_values.array()).all());\n  }\n\n  int num_rows;\n  int num_cols;\n\n  int num_additional_elements;\n\n  int expected_num_nonzeros;\n\n  Matrix dense;\n  std::unique_ptr<TripletSparseMatrix> tsm;\n  std::unique_ptr<CompressedRowSparseMatrix> crsm;\n\n  std::unique_ptr<DynamicCompressedRowSparseMatrix> dcrsm;\n};\n\nTEST_F(DynamicCompressedRowSparseMatrixTest, Initialization) {\n  ExpectEmpty();\n\n  Finalize();\n  ExpectEmpty();\n}\n\nTEST_F(DynamicCompressedRowSparseMatrixTest, InsertEntryAndFinalize) {\n  InsertNonZeroEntriesFromDenseReference();\n  ExpectEmpty();\n\n  Finalize();\n  ExpectEqualToDenseReference();\n  ExpectEqualToCompressedRowSparseMatrixReference();\n}\n\nTEST_F(DynamicCompressedRowSparseMatrixTest, ClearRows) {\n  InsertNonZeroEntriesFromDenseReference();\n  Finalize();\n  ExpectEqualToDenseReference();\n  ExpectEqualToCompressedRowSparseMatrixReference();\n\n  dcrsm->ClearRows(0, 0);\n  Finalize();\n  ExpectEqualToDenseReference();\n  ExpectEqualToCompressedRowSparseMatrixReference();\n\n  dcrsm->ClearRows(0, num_rows);\n  ExpectEqualToCompressedRowSparseMatrixReference();\n\n  Finalize();\n  ExpectEmpty();\n\n  InsertNonZeroEntriesFromDenseReference();\n  dcrsm->ClearRows(1, 2);\n  Finalize();\n  dense.block(1, 0, 2, num_cols).setZero();\n  ExpectEqualToDenseReference();\n\n  InitialiseDenseReference();\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/dynamic_numeric_diff_cost_function_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//         mierle@gmail.com (Keir Mierle)\n\n#include <cstddef>\n\n#include <memory>\n#include \"ceres/dynamic_numeric_diff_cost_function.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::vector;\n\nconst double kTolerance = 1e-6;\n\n// Takes 2 parameter blocks:\n//     parameters[0] is size 10.\n//     parameters[1] is size 5.\n// Emits 21 residuals:\n//     A: i - parameters[0][i], for i in [0,10)  -- this is 10 residuals\n//     B: parameters[0][i] - i, for i in [0,10)  -- this is another 10.\n//     C: sum(parameters[0][i]^2 - 8*parameters[0][i]) + sum(parameters[1][i])\nclass MyCostFunctor {\n public:\n  bool operator()(double const* const* parameters, double* residuals) const {\n    const double* params0 = parameters[0];\n    int r = 0;\n    for (int i = 0; i < 10; ++i) {\n      residuals[r++] = i - params0[i];\n      residuals[r++] = params0[i] - i;\n    }\n\n    double c_residual = 0.0;\n    for (int i = 0; i < 10; ++i) {\n      c_residual += pow(params0[i], 2) - 8.0 * params0[i];\n    }\n\n    const double* params1 = parameters[1];\n    for (int i = 0; i < 5; ++i) {\n      c_residual += params1[i];\n    }\n    residuals[r++] = c_residual;\n    return true;\n  }\n};\n\nTEST(DynamicNumericdiffCostFunctionTest, TestResiduals) {\n  vector<double> param_block_0(10, 0.0);\n  vector<double> param_block_1(5, 0.0);\n  DynamicNumericDiffCostFunction<MyCostFunctor> cost_function(\n      new MyCostFunctor());\n  cost_function.AddParameterBlock(param_block_0.size());\n  cost_function.AddParameterBlock(param_block_1.size());\n  cost_function.SetNumResiduals(21);\n\n  // Test residual computation.\n  vector<double> residuals(21, -100000);\n  vector<double*> parameter_blocks(2);\n  parameter_blocks[0] = &param_block_0[0];\n  parameter_blocks[1] = &param_block_1[0];\n  EXPECT_TRUE(cost_function.Evaluate(&parameter_blocks[0],\n                                     residuals.data(),\n                                     NULL));\n  for (int r = 0; r < 10; ++r) {\n    EXPECT_EQ(1.0 * r, residuals.at(r * 2));\n    EXPECT_EQ(-1.0 * r, residuals.at(r * 2 + 1));\n  }\n  EXPECT_EQ(0, residuals.at(20));\n}\n\n\nTEST(DynamicNumericdiffCostFunctionTest, TestJacobian) {\n  // Test the residual counting.\n  vector<double> param_block_0(10, 0.0);\n  for (int i = 0; i < 10; ++i) {\n    param_block_0[i] = 2 * i;\n  }\n  vector<double> param_block_1(5, 0.0);\n  DynamicNumericDiffCostFunction<MyCostFunctor> cost_function(\n      new MyCostFunctor());\n  cost_function.AddParameterBlock(param_block_0.size());\n  cost_function.AddParameterBlock(param_block_1.size());\n  cost_function.SetNumResiduals(21);\n\n  // Prepare the residuals.\n  vector<double> residuals(21, -100000);\n\n  // Prepare the parameters.\n  vector<double*> parameter_blocks(2);\n  parameter_blocks[0] = &param_block_0[0];\n  parameter_blocks[1] = &param_block_1[0];\n\n  // Prepare the jacobian.\n  vector<vector<double>> jacobian_vect(2);\n  jacobian_vect[0].resize(21 * 10, -100000);\n  jacobian_vect[1].resize(21 * 5, -100000);\n  vector<double*> jacobian;\n  jacobian.push_back(jacobian_vect[0].data());\n  jacobian.push_back(jacobian_vect[1].data());\n\n  // Test jacobian computation.\n  EXPECT_TRUE(cost_function.Evaluate(parameter_blocks.data(),\n                                     residuals.data(),\n                                     jacobian.data()));\n\n  for (int r = 0; r < 10; ++r) {\n    EXPECT_EQ(-1.0 * r, residuals.at(r * 2));\n    EXPECT_EQ(+1.0 * r, residuals.at(r * 2 + 1));\n  }\n  EXPECT_EQ(420, residuals.at(20));\n  for (int p = 0; p < 10; ++p) {\n    // Check \"A\" Jacobian.\n    EXPECT_NEAR(-1.0, jacobian_vect[0][2*p * 10 + p], kTolerance);\n    // Check \"B\" Jacobian.\n    EXPECT_NEAR(+1.0, jacobian_vect[0][(2*p+1) * 10 + p], kTolerance);\n    jacobian_vect[0][2*p * 10 + p] = 0.0;\n    jacobian_vect[0][(2*p+1) * 10 + p] = 0.0;\n  }\n\n  // Check \"C\" Jacobian for first parameter block.\n  for (int p = 0; p < 10; ++p) {\n    EXPECT_NEAR(4 * p - 8, jacobian_vect[0][20 * 10 + p], kTolerance);\n    jacobian_vect[0][20 * 10 + p] = 0.0;\n  }\n  for (int i = 0; i < jacobian_vect[0].size(); ++i) {\n    EXPECT_NEAR(0.0, jacobian_vect[0][i], kTolerance);\n  }\n\n  // Check \"C\" Jacobian for second parameter block.\n  for (int p = 0; p < 5; ++p) {\n    EXPECT_NEAR(1.0, jacobian_vect[1][20 * 5 + p], kTolerance);\n    jacobian_vect[1][20 * 5 + p] = 0.0;\n  }\n  for (int i = 0; i < jacobian_vect[1].size(); ++i) {\n    EXPECT_NEAR(0.0, jacobian_vect[1][i], kTolerance);\n  }\n}\n\nTEST(DynamicNumericdiffCostFunctionTest, JacobianWithFirstParameterBlockConstant) {  // NOLINT\n  // Test the residual counting.\n  vector<double> param_block_0(10, 0.0);\n  for (int i = 0; i < 10; ++i) {\n    param_block_0[i] = 2 * i;\n  }\n  vector<double> param_block_1(5, 0.0);\n  DynamicNumericDiffCostFunction<MyCostFunctor> cost_function(\n      new MyCostFunctor());\n  cost_function.AddParameterBlock(param_block_0.size());\n  cost_function.AddParameterBlock(param_block_1.size());\n  cost_function.SetNumResiduals(21);\n\n  // Prepare the residuals.\n  vector<double> residuals(21, -100000);\n\n  // Prepare the parameters.\n  vector<double*> parameter_blocks(2);\n  parameter_blocks[0] = &param_block_0[0];\n  parameter_blocks[1] = &param_block_1[0];\n\n  // Prepare the jacobian.\n  vector<vector<double>> jacobian_vect(2);\n  jacobian_vect[0].resize(21 * 10, -100000);\n  jacobian_vect[1].resize(21 * 5, -100000);\n  vector<double*> jacobian;\n  jacobian.push_back(NULL);\n  jacobian.push_back(jacobian_vect[1].data());\n\n  // Test jacobian computation.\n  EXPECT_TRUE(cost_function.Evaluate(parameter_blocks.data(),\n                                     residuals.data(),\n                                     jacobian.data()));\n\n  for (int r = 0; r < 10; ++r) {\n    EXPECT_EQ(-1.0 * r, residuals.at(r * 2));\n    EXPECT_EQ(+1.0 * r, residuals.at(r * 2 + 1));\n  }\n  EXPECT_EQ(420, residuals.at(20));\n\n  // Check \"C\" Jacobian for second parameter block.\n  for (int p = 0; p < 5; ++p) {\n    EXPECT_NEAR(1.0, jacobian_vect[1][20 * 5 + p], kTolerance);\n    jacobian_vect[1][20 * 5 + p] = 0.0;\n  }\n  for (int i = 0; i < jacobian_vect[1].size(); ++i) {\n    EXPECT_EQ(0.0, jacobian_vect[1][i]);\n  }\n}\n\nTEST(DynamicNumericdiffCostFunctionTest, JacobianWithSecondParameterBlockConstant) {  // NOLINT\n  // Test the residual counting.\n  vector<double> param_block_0(10, 0.0);\n  for (int i = 0; i < 10; ++i) {\n    param_block_0[i] = 2 * i;\n  }\n  vector<double> param_block_1(5, 0.0);\n  DynamicNumericDiffCostFunction<MyCostFunctor> cost_function(\n      new MyCostFunctor());\n  cost_function.AddParameterBlock(param_block_0.size());\n  cost_function.AddParameterBlock(param_block_1.size());\n  cost_function.SetNumResiduals(21);\n\n  // Prepare the residuals.\n  vector<double> residuals(21, -100000);\n\n  // Prepare the parameters.\n  vector<double*> parameter_blocks(2);\n  parameter_blocks[0] = &param_block_0[0];\n  parameter_blocks[1] = &param_block_1[0];\n\n  // Prepare the jacobian.\n  vector<vector<double>> jacobian_vect(2);\n  jacobian_vect[0].resize(21 * 10, -100000);\n  jacobian_vect[1].resize(21 * 5, -100000);\n  vector<double*> jacobian;\n  jacobian.push_back(jacobian_vect[0].data());\n  jacobian.push_back(NULL);\n\n  // Test jacobian computation.\n  EXPECT_TRUE(cost_function.Evaluate(parameter_blocks.data(),\n                                     residuals.data(),\n                                     jacobian.data()));\n\n  for (int r = 0; r < 10; ++r) {\n    EXPECT_EQ(-1.0 * r, residuals.at(r * 2));\n    EXPECT_EQ(+1.0 * r, residuals.at(r * 2 + 1));\n  }\n  EXPECT_EQ(420, residuals.at(20));\n  for (int p = 0; p < 10; ++p) {\n    // Check \"A\" Jacobian.\n    EXPECT_NEAR(-1.0, jacobian_vect[0][2*p * 10 + p], kTolerance);\n    // Check \"B\" Jacobian.\n    EXPECT_NEAR(+1.0, jacobian_vect[0][(2*p+1) * 10 + p], kTolerance);\n    jacobian_vect[0][2*p * 10 + p] = 0.0;\n    jacobian_vect[0][(2*p+1) * 10 + p] = 0.0;\n  }\n\n  // Check \"C\" Jacobian for first parameter block.\n  for (int p = 0; p < 10; ++p) {\n    EXPECT_NEAR(4 * p - 8, jacobian_vect[0][20 * 10 + p], kTolerance);\n    jacobian_vect[0][20 * 10 + p] = 0.0;\n  }\n  for (int i = 0; i < jacobian_vect[0].size(); ++i) {\n    EXPECT_EQ(0.0, jacobian_vect[0][i]);\n  }\n}\n\n// Takes 3 parameter blocks:\n//     parameters[0] (x) is size 1.\n//     parameters[1] (y) is size 2.\n//     parameters[2] (z) is size 3.\n// Emits 7 residuals:\n//     A: x[0] (= sum_x)\n//     B: y[0] + 2.0 * y[1] (= sum_y)\n//     C: z[0] + 3.0 * z[1] + 6.0 * z[2] (= sum_z)\n//     D: sum_x * sum_y\n//     E: sum_y * sum_z\n//     F: sum_x * sum_z\n//     G: sum_x * sum_y * sum_z\nclass MyThreeParameterCostFunctor {\n public:\n  template <typename T>\n  bool operator()(T const* const* parameters, T* residuals) const {\n    const T* x = parameters[0];\n    const T* y = parameters[1];\n    const T* z = parameters[2];\n\n    T sum_x = x[0];\n    T sum_y = y[0] + 2.0 * y[1];\n    T sum_z = z[0] + 3.0 * z[1] + 6.0 * z[2];\n\n    residuals[0] = sum_x;\n    residuals[1] = sum_y;\n    residuals[2] = sum_z;\n    residuals[3] = sum_x * sum_y;\n    residuals[4] = sum_y * sum_z;\n    residuals[5] = sum_x * sum_z;\n    residuals[6] = sum_x * sum_y * sum_z;\n    return true;\n  }\n};\n\nclass ThreeParameterCostFunctorTest : public ::testing::Test {\n protected:\n  void SetUp() final {\n    // Prepare the parameters.\n    x_.resize(1);\n    x_[0] = 0.0;\n\n    y_.resize(2);\n    y_[0] = 1.0;\n    y_[1] = 3.0;\n\n    z_.resize(3);\n    z_[0] = 2.0;\n    z_[1] = 4.0;\n    z_[2] = 6.0;\n\n    parameter_blocks_.resize(3);\n    parameter_blocks_[0] = &x_[0];\n    parameter_blocks_[1] = &y_[0];\n    parameter_blocks_[2] = &z_[0];\n\n    // Prepare the cost function.\n    typedef DynamicNumericDiffCostFunction<MyThreeParameterCostFunctor>\n      DynamicMyThreeParameterCostFunction;\n    DynamicMyThreeParameterCostFunction * cost_function =\n      new DynamicMyThreeParameterCostFunction(\n        new MyThreeParameterCostFunctor());\n    cost_function->AddParameterBlock(1);\n    cost_function->AddParameterBlock(2);\n    cost_function->AddParameterBlock(3);\n    cost_function->SetNumResiduals(7);\n\n    cost_function_.reset(cost_function);\n\n    // Setup jacobian data.\n    jacobian_vect_.resize(3);\n    jacobian_vect_[0].resize(7 * x_.size(), -100000);\n    jacobian_vect_[1].resize(7 * y_.size(), -100000);\n    jacobian_vect_[2].resize(7 * z_.size(), -100000);\n\n    // Prepare the expected residuals.\n    const double sum_x = x_[0];\n    const double sum_y = y_[0] + 2.0 * y_[1];\n    const double sum_z = z_[0] + 3.0 * z_[1] + 6.0 * z_[2];\n\n    expected_residuals_.resize(7);\n    expected_residuals_[0] = sum_x;\n    expected_residuals_[1] = sum_y;\n    expected_residuals_[2] = sum_z;\n    expected_residuals_[3] = sum_x * sum_y;\n    expected_residuals_[4] = sum_y * sum_z;\n    expected_residuals_[5] = sum_x * sum_z;\n    expected_residuals_[6] = sum_x * sum_y * sum_z;\n\n    // Prepare the expected jacobian entries.\n    expected_jacobian_x_.resize(7);\n    expected_jacobian_x_[0] = 1.0;\n    expected_jacobian_x_[1] = 0.0;\n    expected_jacobian_x_[2] = 0.0;\n    expected_jacobian_x_[3] = sum_y;\n    expected_jacobian_x_[4] = 0.0;\n    expected_jacobian_x_[5] = sum_z;\n    expected_jacobian_x_[6] = sum_y * sum_z;\n\n    expected_jacobian_y_.resize(14);\n    expected_jacobian_y_[0] = 0.0;\n    expected_jacobian_y_[1] = 0.0;\n    expected_jacobian_y_[2] = 1.0;\n    expected_jacobian_y_[3] = 2.0;\n    expected_jacobian_y_[4] = 0.0;\n    expected_jacobian_y_[5] = 0.0;\n    expected_jacobian_y_[6] = sum_x;\n    expected_jacobian_y_[7] = 2.0 * sum_x;\n    expected_jacobian_y_[8] = sum_z;\n    expected_jacobian_y_[9] = 2.0 * sum_z;\n    expected_jacobian_y_[10] = 0.0;\n    expected_jacobian_y_[11] = 0.0;\n    expected_jacobian_y_[12] = sum_x * sum_z;\n    expected_jacobian_y_[13] = 2.0 * sum_x * sum_z;\n\n    expected_jacobian_z_.resize(21);\n    expected_jacobian_z_[0] = 0.0;\n    expected_jacobian_z_[1] = 0.0;\n    expected_jacobian_z_[2] = 0.0;\n    expected_jacobian_z_[3] = 0.0;\n    expected_jacobian_z_[4] = 0.0;\n    expected_jacobian_z_[5] = 0.0;\n    expected_jacobian_z_[6] = 1.0;\n    expected_jacobian_z_[7] = 3.0;\n    expected_jacobian_z_[8] = 6.0;\n    expected_jacobian_z_[9] = 0.0;\n    expected_jacobian_z_[10] = 0.0;\n    expected_jacobian_z_[11] = 0.0;\n    expected_jacobian_z_[12] = sum_y;\n    expected_jacobian_z_[13] = 3.0 * sum_y;\n    expected_jacobian_z_[14] = 6.0 * sum_y;\n    expected_jacobian_z_[15] = sum_x;\n    expected_jacobian_z_[16] = 3.0 * sum_x;\n    expected_jacobian_z_[17] = 6.0 * sum_x;\n    expected_jacobian_z_[18] = sum_x * sum_y;\n    expected_jacobian_z_[19] = 3.0 * sum_x * sum_y;\n    expected_jacobian_z_[20] = 6.0 * sum_x * sum_y;\n  }\n\n protected:\n  vector<double> x_;\n  vector<double> y_;\n  vector<double> z_;\n\n  vector<double*> parameter_blocks_;\n\n  std::unique_ptr<CostFunction> cost_function_;\n\n  vector<vector<double>> jacobian_vect_;\n\n  vector<double> expected_residuals_;\n\n  vector<double> expected_jacobian_x_;\n  vector<double> expected_jacobian_y_;\n  vector<double> expected_jacobian_z_;\n};\n\nTEST_F(ThreeParameterCostFunctorTest, TestThreeParameterResiduals) {\n  vector<double> residuals(7, -100000);\n  EXPECT_TRUE(cost_function_->Evaluate(parameter_blocks_.data(),\n                                       residuals.data(),\n                                       NULL));\n  for (int i = 0; i < 7; ++i) {\n    EXPECT_EQ(expected_residuals_[i], residuals[i]);\n  }\n}\n\nTEST_F(ThreeParameterCostFunctorTest, TestThreeParameterJacobian) {\n  vector<double> residuals(7, -100000);\n\n  vector<double*> jacobian;\n  jacobian.push_back(jacobian_vect_[0].data());\n  jacobian.push_back(jacobian_vect_[1].data());\n  jacobian.push_back(jacobian_vect_[2].data());\n\n  EXPECT_TRUE(cost_function_->Evaluate(parameter_blocks_.data(),\n                                       residuals.data(),\n                                       jacobian.data()));\n\n  for (int i = 0; i < 7; ++i) {\n    EXPECT_EQ(expected_residuals_[i], residuals[i]);\n  }\n\n  for (int i = 0; i < 7; ++i) {\n    EXPECT_NEAR(expected_jacobian_x_[i], jacobian[0][i], kTolerance);\n  }\n\n  for (int i = 0; i < 14; ++i) {\n    EXPECT_NEAR(expected_jacobian_y_[i], jacobian[1][i], kTolerance);\n  }\n\n  for (int i = 0; i < 21; ++i) {\n    EXPECT_NEAR(expected_jacobian_z_[i], jacobian[2][i], kTolerance);\n  }\n}\n\nTEST_F(ThreeParameterCostFunctorTest,\n       ThreeParameterJacobianWithFirstAndLastParameterBlockConstant) {\n  vector<double> residuals(7, -100000);\n\n  vector<double*> jacobian;\n  jacobian.push_back(NULL);\n  jacobian.push_back(jacobian_vect_[1].data());\n  jacobian.push_back(NULL);\n\n  EXPECT_TRUE(cost_function_->Evaluate(parameter_blocks_.data(),\n                                       residuals.data(),\n                                       jacobian.data()));\n\n  for (int i = 0; i < 7; ++i) {\n    EXPECT_EQ(expected_residuals_[i], residuals[i]);\n  }\n\n  for (int i = 0; i < 14; ++i) {\n    EXPECT_NEAR(expected_jacobian_y_[i], jacobian[1][i], kTolerance);\n  }\n}\n\nTEST_F(ThreeParameterCostFunctorTest,\n       ThreeParameterJacobianWithSecondParameterBlockConstant) {\n  vector<double> residuals(7, -100000);\n\n  vector<double*> jacobian;\n  jacobian.push_back(jacobian_vect_[0].data());\n  jacobian.push_back(NULL);\n  jacobian.push_back(jacobian_vect_[2].data());\n\n  EXPECT_TRUE(cost_function_->Evaluate(parameter_blocks_.data(),\n                                       residuals.data(),\n                                       jacobian.data()));\n\n  for (int i = 0; i < 7; ++i) {\n    EXPECT_EQ(expected_residuals_[i], residuals[i]);\n  }\n\n  for (int i = 0; i < 7; ++i) {\n    EXPECT_NEAR(expected_jacobian_x_[i], jacobian[0][i], kTolerance);\n  }\n\n  for (int i = 0; i < 21; ++i) {\n    EXPECT_NEAR(expected_jacobian_z_[i], jacobian[2][i], kTolerance);\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/dynamic_sparse_normal_cholesky_solver.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/dynamic_sparse_normal_cholesky_solver.h\"\n\n#include <algorithm>\n#include <cstring>\n#include <ctime>\n#include <memory>\n#include <sstream>\n\n#include \"Eigen/SparseCore\"\n#include \"ceres/compressed_row_sparse_matrix.h\"\n#include \"ceres/cxsparse.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/linear_solver.h\"\n#include \"ceres/suitesparse.h\"\n#include \"ceres/triplet_sparse_matrix.h\"\n#include \"ceres/types.h\"\n#include \"ceres/wall_time.h\"\n\n#ifdef CERES_USE_EIGEN_SPARSE\n#include \"Eigen/SparseCholesky\"\n#endif\n\nnamespace ceres {\nnamespace internal {\n\nDynamicSparseNormalCholeskySolver::DynamicSparseNormalCholeskySolver(\n    const LinearSolver::Options& options)\n    : options_(options) {}\n\nLinearSolver::Summary DynamicSparseNormalCholeskySolver::SolveImpl(\n    CompressedRowSparseMatrix* A,\n    const double* b,\n    const LinearSolver::PerSolveOptions& per_solve_options,\n    double* x) {\n  const int num_cols = A->num_cols();\n  VectorRef(x, num_cols).setZero();\n  A->LeftMultiply(b, x);\n\n  if (per_solve_options.D != nullptr) {\n    // Temporarily append a diagonal block to the A matrix, but undo\n    // it before returning the matrix to the user.\n    std::unique_ptr<CompressedRowSparseMatrix> regularizer;\n    if (!A->col_blocks().empty()) {\n      regularizer.reset(CompressedRowSparseMatrix::CreateBlockDiagonalMatrix(\n          per_solve_options.D, A->col_blocks()));\n    } else {\n      regularizer.reset(\n          new CompressedRowSparseMatrix(per_solve_options.D, num_cols));\n    }\n    A->AppendRows(*regularizer);\n  }\n\n  LinearSolver::Summary summary;\n  switch (options_.sparse_linear_algebra_library_type) {\n    case SUITE_SPARSE:\n      summary = SolveImplUsingSuiteSparse(A, x);\n      break;\n    case CX_SPARSE:\n      summary = SolveImplUsingCXSparse(A, x);\n      break;\n    case EIGEN_SPARSE:\n      summary = SolveImplUsingEigen(A, x);\n      break;\n    default:\n      LOG(FATAL) << \"Unsupported sparse linear algebra library for \"\n                 << \"dynamic sparsity: \"\n                 << SparseLinearAlgebraLibraryTypeToString(\n                     options_.sparse_linear_algebra_library_type);\n  }\n\n  if (per_solve_options.D != nullptr) {\n    A->DeleteRows(num_cols);\n  }\n\n  return summary;\n}\n\nLinearSolver::Summary DynamicSparseNormalCholeskySolver::SolveImplUsingEigen(\n    CompressedRowSparseMatrix* A, double* rhs_and_solution) {\n#ifndef CERES_USE_EIGEN_SPARSE\n\n  LinearSolver::Summary summary;\n  summary.num_iterations = 0;\n  summary.termination_type = LINEAR_SOLVER_FATAL_ERROR;\n  summary.message =\n      \"SPARSE_NORMAL_CHOLESKY cannot be used with EIGEN_SPARSE \"\n      \"because Ceres was not built with support for \"\n      \"Eigen's SimplicialLDLT decomposition. \"\n      \"This requires enabling building with -DEIGENSPARSE=ON.\";\n  return summary;\n\n#else\n\n  EventLogger event_logger(\"DynamicSparseNormalCholeskySolver::Eigen::Solve\");\n\n  Eigen::MappedSparseMatrix<double, Eigen::RowMajor> a(A->num_rows(),\n                                                       A->num_cols(),\n                                                       A->num_nonzeros(),\n                                                       A->mutable_rows(),\n                                                       A->mutable_cols(),\n                                                       A->mutable_values());\n\n  Eigen::SparseMatrix<double> lhs = a.transpose() * a;\n  Eigen::SimplicialLDLT<Eigen::SparseMatrix<double>> solver;\n\n  LinearSolver::Summary summary;\n  summary.num_iterations = 1;\n  summary.termination_type = LINEAR_SOLVER_SUCCESS;\n  summary.message = \"Success.\";\n\n  solver.analyzePattern(lhs);\n  if (VLOG_IS_ON(2)) {\n    std::stringstream ss;\n    solver.dumpMemory(ss);\n    VLOG(2) << \"Symbolic Analysis\\n\" << ss.str();\n  }\n\n  event_logger.AddEvent(\"Analyze\");\n  if (solver.info() != Eigen::Success) {\n    summary.termination_type = LINEAR_SOLVER_FATAL_ERROR;\n    summary.message = \"Eigen failure. Unable to find symbolic factorization.\";\n    return summary;\n  }\n\n  solver.factorize(lhs);\n  event_logger.AddEvent(\"Factorize\");\n  if (solver.info() != Eigen::Success) {\n    summary.termination_type = LINEAR_SOLVER_FAILURE;\n    summary.message = \"Eigen failure. Unable to find numeric factorization.\";\n    return summary;\n  }\n\n  const Vector rhs = VectorRef(rhs_and_solution, lhs.cols());\n  VectorRef(rhs_and_solution, lhs.cols()) = solver.solve(rhs);\n  event_logger.AddEvent(\"Solve\");\n  if (solver.info() != Eigen::Success) {\n    summary.termination_type = LINEAR_SOLVER_FAILURE;\n    summary.message = \"Eigen failure. Unable to do triangular solve.\";\n    return summary;\n  }\n\n  return summary;\n#endif  // CERES_USE_EIGEN_SPARSE\n}\n\nLinearSolver::Summary DynamicSparseNormalCholeskySolver::SolveImplUsingCXSparse(\n    CompressedRowSparseMatrix* A, double* rhs_and_solution) {\n#ifdef CERES_NO_CXSPARSE\n\n  LinearSolver::Summary summary;\n  summary.num_iterations = 0;\n  summary.termination_type = LINEAR_SOLVER_FATAL_ERROR;\n  summary.message =\n      \"SPARSE_NORMAL_CHOLESKY cannot be used with CX_SPARSE \"\n      \"because Ceres was not built with support for CXSparse. \"\n      \"This requires enabling building with -DCXSPARSE=ON.\";\n\n  return summary;\n\n#else\n  EventLogger event_logger(\n      \"DynamicSparseNormalCholeskySolver::CXSparse::Solve\");\n\n  LinearSolver::Summary summary;\n  summary.num_iterations = 1;\n  summary.termination_type = LINEAR_SOLVER_SUCCESS;\n  summary.message = \"Success.\";\n\n  CXSparse cxsparse;\n\n  // Wrap the augmented Jacobian in a compressed sparse column matrix.\n  cs_di a_transpose = cxsparse.CreateSparseMatrixTransposeView(A);\n\n  // Compute the normal equations. J'J delta = J'f and solve them\n  // using a sparse Cholesky factorization. Notice that when compared\n  // to SuiteSparse we have to explicitly compute the transpose of Jt,\n  // and then the normal equations before they can be\n  // factorized. CHOLMOD/SuiteSparse on the other hand can just work\n  // off of Jt to compute the Cholesky factorization of the normal\n  // equations.\n  cs_di* a = cxsparse.TransposeMatrix(&a_transpose);\n  cs_di* lhs = cxsparse.MatrixMatrixMultiply(&a_transpose, a);\n  cxsparse.Free(a);\n  event_logger.AddEvent(\"NormalEquations\");\n\n  if (!cxsparse.SolveCholesky(lhs, rhs_and_solution)) {\n    summary.termination_type = LINEAR_SOLVER_FAILURE;\n    summary.message = \"CXSparse::SolveCholesky failed\";\n  }\n  event_logger.AddEvent(\"Solve\");\n\n  cxsparse.Free(lhs);\n  event_logger.AddEvent(\"TearDown\");\n  return summary;\n#endif\n}\n\nLinearSolver::Summary\nDynamicSparseNormalCholeskySolver::SolveImplUsingSuiteSparse(\n    CompressedRowSparseMatrix* A, double* rhs_and_solution) {\n#ifdef CERES_NO_SUITESPARSE\n\n  LinearSolver::Summary summary;\n  summary.num_iterations = 0;\n  summary.termination_type = LINEAR_SOLVER_FATAL_ERROR;\n  summary.message =\n      \"SPARSE_NORMAL_CHOLESKY cannot be used with SUITE_SPARSE \"\n      \"because Ceres was not built with support for SuiteSparse. \"\n      \"This requires enabling building with -DSUITESPARSE=ON.\";\n  return summary;\n\n#else\n\n  EventLogger event_logger(\n      \"DynamicSparseNormalCholeskySolver::SuiteSparse::Solve\");\n  LinearSolver::Summary summary;\n  summary.termination_type = LINEAR_SOLVER_SUCCESS;\n  summary.num_iterations = 1;\n  summary.message = \"Success.\";\n\n  SuiteSparse ss;\n  const int num_cols = A->num_cols();\n  cholmod_sparse lhs = ss.CreateSparseMatrixTransposeView(A);\n  event_logger.AddEvent(\"Setup\");\n  cholmod_factor* factor = ss.AnalyzeCholesky(&lhs, &summary.message);\n  event_logger.AddEvent(\"Analysis\");\n\n  if (factor == nullptr) {\n    summary.termination_type = LINEAR_SOLVER_FATAL_ERROR;\n    return summary;\n  }\n\n  summary.termination_type = ss.Cholesky(&lhs, factor, &summary.message);\n  if (summary.termination_type == LINEAR_SOLVER_SUCCESS) {\n    cholmod_dense cholmod_rhs =\n        ss.CreateDenseVectorView(rhs_and_solution, num_cols);\n    cholmod_dense* solution = ss.Solve(factor, &cholmod_rhs, &summary.message);\n    event_logger.AddEvent(\"Solve\");\n    if (solution != nullptr) {\n      memcpy(\n          rhs_and_solution, solution->x, num_cols * sizeof(*rhs_and_solution));\n      ss.Free(solution);\n    } else {\n      summary.termination_type = LINEAR_SOLVER_FAILURE;\n    }\n  }\n\n  ss.Free(factor);\n  event_logger.AddEvent(\"Teardown\");\n  return summary;\n\n#endif\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/dynamic_sparse_normal_cholesky_solver.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// A solver for sparse linear least squares problem based on solving\n// the normal equations via a sparse cholesky factorization.\n\n#ifndef CERES_INTERNAL_DYNAMIC_SPARSE_NORMAL_CHOLESKY_SOLVER_H_\n#define CERES_INTERNAL_DYNAMIC_SPARSE_NORMAL_CHOLESKY_SOLVER_H_\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#include \"ceres/linear_solver.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass CompressedRowSparseMatrix;\n\n// A variant of SparseNormalCholeskySolver in the case where matrix\n// sparsity is not constant across calls to Solve. This means that\n// there is no benefit to symbolically factorizing the matrix and\n// caching this factorization.\n//\n// TODO(alex): Add support for Accelerate sparse solvers:\n// https://github.com/ceres-solver/ceres-solver/issues/397\nclass DynamicSparseNormalCholeskySolver\n    : public CompressedRowSparseMatrixSolver {\n public:\n  explicit DynamicSparseNormalCholeskySolver(\n      const LinearSolver::Options& options);\n  virtual ~DynamicSparseNormalCholeskySolver() {}\n\n private:\n  LinearSolver::Summary SolveImpl(\n      CompressedRowSparseMatrix* A,\n      const double* b,\n      const LinearSolver::PerSolveOptions& options,\n      double* x) final;\n\n  LinearSolver::Summary SolveImplUsingSuiteSparse(\n      CompressedRowSparseMatrix* A,\n      double* rhs_and_solution);\n\n  LinearSolver::Summary SolveImplUsingCXSparse(\n      CompressedRowSparseMatrix* A,\n      double* rhs_and_solution);\n\n  LinearSolver::Summary SolveImplUsingEigen(\n      CompressedRowSparseMatrix* A,\n      double* rhs_and_solution);\n\n  const LinearSolver::Options options_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_DYNAMIC_SPARSE_NORMAL_CHOLESKY_SOLVER_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/dynamic_sparse_normal_cholesky_solver_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include <memory>\n#include \"ceres/casts.h\"\n#include \"ceres/compressed_row_sparse_matrix.h\"\n#include \"ceres/context_impl.h\"\n#include \"ceres/linear_least_squares_problems.h\"\n#include \"ceres/linear_solver.h\"\n#include \"ceres/triplet_sparse_matrix.h\"\n#include \"ceres/types.h\"\n#include \"glog/logging.h\"\n#include \"gtest/gtest.h\"\n\n#include \"Eigen/Cholesky\"\n\nnamespace ceres {\nnamespace internal {\n\n// TODO(sameeragarwal): These tests needs to be re-written to be more\n// thorough, they do not really test the dynamic nature of the\n// sparsity.\nclass DynamicSparseNormalCholeskySolverTest : public ::testing::Test {\n protected:\n  void SetUp() final {\n    std::unique_ptr<LinearLeastSquaresProblem> problem(\n        CreateLinearLeastSquaresProblemFromId(1));\n    A_.reset(CompressedRowSparseMatrix::FromTripletSparseMatrix(\n        *down_cast<TripletSparseMatrix*>(problem->A.get())));\n    b_.reset(problem->b.release());\n    D_.reset(problem->D.release());\n  }\n\n  void TestSolver(const LinearSolver::Options& options, double* D) {\n    Matrix dense_A;\n    A_->ToDenseMatrix(&dense_A);\n    Matrix lhs = dense_A.transpose() * dense_A;\n    if (D != NULL) {\n      lhs += (ConstVectorRef(D, A_->num_cols()).array() *\n              ConstVectorRef(D, A_->num_cols()).array())\n                 .matrix()\n                 .asDiagonal();\n    }\n\n    Vector rhs(A_->num_cols());\n    rhs.setZero();\n    A_->LeftMultiply(b_.get(), rhs.data());\n    Vector expected_solution = lhs.llt().solve(rhs);\n\n    std::unique_ptr<LinearSolver> solver(LinearSolver::Create(options));\n    LinearSolver::PerSolveOptions per_solve_options;\n    per_solve_options.D = D;\n    Vector actual_solution(A_->num_cols());\n    LinearSolver::Summary summary;\n    summary = solver->Solve(\n        A_.get(), b_.get(), per_solve_options, actual_solution.data());\n\n    EXPECT_EQ(summary.termination_type, LINEAR_SOLVER_SUCCESS);\n\n    for (int i = 0; i < A_->num_cols(); ++i) {\n      EXPECT_NEAR(expected_solution(i), actual_solution(i), 1e-8)\n          << \"\\nExpected: \" << expected_solution.transpose()\n          << \"\\nActual: \" << actual_solution.transpose();\n    }\n  }\n\n  void TestSolver(\n      const SparseLinearAlgebraLibraryType sparse_linear_algebra_library_type) {\n    LinearSolver::Options options;\n    options.type = SPARSE_NORMAL_CHOLESKY;\n    options.dynamic_sparsity = true;\n    options.sparse_linear_algebra_library_type =\n        sparse_linear_algebra_library_type;\n    ContextImpl context;\n    options.context = &context;\n    TestSolver(options, NULL);\n    TestSolver(options, D_.get());\n  }\n\n  std::unique_ptr<CompressedRowSparseMatrix> A_;\n  std::unique_ptr<double[]> b_;\n  std::unique_ptr<double[]> D_;\n};\n\n#ifndef CERES_NO_SUITESPARSE\nTEST_F(DynamicSparseNormalCholeskySolverTest, SuiteSparse) {\n  TestSolver(SUITE_SPARSE);\n}\n#endif\n\n#ifndef CERES_NO_CXSPARSE\nTEST_F(DynamicSparseNormalCholeskySolverTest, CXSparse) {\n  TestSolver(CX_SPARSE);\n}\n#endif\n\n#ifdef CERES_USE_EIGEN_SPARSE\nTEST_F(DynamicSparseNormalCholeskySolverTest, Eigen) {\n  TestSolver(EIGEN_SPARSE);\n}\n#endif  // CERES_USE_EIGEN_SPARSE\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/dynamic_sparsity_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: richie.stebbing@gmail.com (Richard Stebbing)\n//         sameeragarwal@google.com (Sameer Agarwal)\n//\n// Based on examples/ellipse_approximation.cc\n\n#include <cmath>\n#include <vector>\n#include \"ceres/ceres.h\"\n#include \"glog/logging.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// Data generated with the following Python code.\n//   import numpy as np\n//   np.random.seed(1337)\n//   t = np.linspace(0.0, 2.0 * np.pi, 212, endpoint=False)\n//   t += 2.0 * np.pi * 0.01 * np.random.randn(t.size)\n//   theta = np.deg2rad(15)\n//   a, b = np.cos(theta), np.sin(theta)\n//   R = np.array([[a, -b],\n//                 [b, a]])\n//   Y = np.dot(np.c_[4.0 * np.cos(t), np.sin(t)], R.T)\n\nconst int kYRows = 212;\nconst int kYCols = 2;\nconst double kYData[kYRows * kYCols] = {\n  +3.871364e+00, +9.916027e-01,\n  +3.864003e+00, +1.034148e+00,\n  +3.850651e+00, +1.072202e+00,\n  +3.868350e+00, +1.014408e+00,\n  +3.796381e+00, +1.153021e+00,\n  +3.857138e+00, +1.056102e+00,\n  +3.787532e+00, +1.162215e+00,\n  +3.704477e+00, +1.227272e+00,\n  +3.564711e+00, +1.294959e+00,\n  +3.754363e+00, +1.191948e+00,\n  +3.482098e+00, +1.322725e+00,\n  +3.602777e+00, +1.279658e+00,\n  +3.585433e+00, +1.286858e+00,\n  +3.347505e+00, +1.356415e+00,\n  +3.220855e+00, +1.378914e+00,\n  +3.558808e+00, +1.297174e+00,\n  +3.403618e+00, +1.343809e+00,\n  +3.179828e+00, +1.384721e+00,\n  +3.054789e+00, +1.398759e+00,\n  +3.294153e+00, +1.366808e+00,\n  +3.247312e+00, +1.374813e+00,\n  +2.988547e+00, +1.404247e+00,\n  +3.114508e+00, +1.392698e+00,\n  +2.899226e+00, +1.409802e+00,\n  +2.533256e+00, +1.414778e+00,\n  +2.654773e+00, +1.415909e+00,\n  +2.565100e+00, +1.415313e+00,\n  +2.976456e+00, +1.405118e+00,\n  +2.484200e+00, +1.413640e+00,\n  +2.324751e+00, +1.407476e+00,\n  +1.930468e+00, +1.378221e+00,\n  +2.329017e+00, +1.407688e+00,\n  +1.760640e+00, +1.360319e+00,\n  +2.147375e+00, +1.396603e+00,\n  +1.741989e+00, +1.358178e+00,\n  +1.743859e+00, +1.358394e+00,\n  +1.557372e+00, +1.335208e+00,\n  +1.280551e+00, +1.295087e+00,\n  +1.429880e+00, +1.317546e+00,\n  +1.213485e+00, +1.284400e+00,\n  +9.168172e-01, +1.232870e+00,\n  +1.311141e+00, +1.299839e+00,\n  +1.231969e+00, +1.287382e+00,\n  +7.453773e-01, +1.200049e+00,\n  +6.151587e-01, +1.173683e+00,\n  +5.935666e-01, +1.169193e+00,\n  +2.538707e-01, +1.094227e+00,\n  +6.806136e-01, +1.187089e+00,\n  +2.805447e-01, +1.100405e+00,\n  +6.184807e-01, +1.174371e+00,\n  +1.170550e-01, +1.061762e+00,\n  +2.890507e-01, +1.102365e+00,\n  +3.834234e-01, +1.123772e+00,\n  +3.980161e-04, +1.033061e+00,\n  -3.651680e-01, +9.370367e-01,\n  -8.386351e-01, +7.987201e-01,\n  -8.105704e-01, +8.073702e-01,\n  -8.735139e-01, +7.878886e-01,\n  -9.913836e-01, +7.506100e-01,\n  -8.784011e-01, +7.863636e-01,\n  -1.181440e+00, +6.882566e-01,\n  -1.229556e+00, +6.720191e-01,\n  -1.035839e+00, +7.362765e-01,\n  -8.031520e-01, +8.096470e-01,\n  -1.539136e+00, +5.629549e-01,\n  -1.755423e+00, +4.817306e-01,\n  -1.337589e+00, +6.348763e-01,\n  -1.836966e+00, +4.499485e-01,\n  -1.913367e+00, +4.195617e-01,\n  -2.126467e+00, +3.314900e-01,\n  -1.927625e+00, +4.138238e-01,\n  -2.339862e+00, +2.379074e-01,\n  -1.881736e+00, +4.322152e-01,\n  -2.116753e+00, +3.356163e-01,\n  -2.255733e+00, +2.754930e-01,\n  -2.555834e+00, +1.368473e-01,\n  -2.770277e+00, +2.895711e-02,\n  -2.563376e+00, +1.331890e-01,\n  -2.826715e+00, -9.000818e-04,\n  -2.978191e+00, -8.457804e-02,\n  -3.115855e+00, -1.658786e-01,\n  -2.982049e+00, -8.678322e-02,\n  -3.307892e+00, -2.902083e-01,\n  -3.038346e+00, -1.194222e-01,\n  -3.190057e+00, -2.122060e-01,\n  -3.279086e+00, -2.705777e-01,\n  -3.322028e+00, -2.999889e-01,\n  -3.122576e+00, -1.699965e-01,\n  -3.551973e+00, -4.768674e-01,\n  -3.581866e+00, -5.032175e-01,\n  -3.497799e+00, -4.315203e-01,\n  -3.565384e+00, -4.885602e-01,\n  -3.699493e+00, -6.199815e-01,\n  -3.585166e+00, -5.061925e-01,\n  -3.758914e+00, -6.918275e-01,\n  -3.741104e+00, -6.689131e-01,\n  -3.688331e+00, -6.077239e-01,\n  -3.810425e+00, -7.689015e-01,\n  -3.791829e+00, -7.386911e-01,\n  -3.789951e+00, -7.358189e-01,\n  -3.823100e+00, -7.918398e-01,\n  -3.857021e+00, -8.727074e-01,\n  -3.858250e+00, -8.767645e-01,\n  -3.872100e+00, -9.563174e-01,\n  -3.864397e+00, -1.032630e+00,\n  -3.846230e+00, -1.081669e+00,\n  -3.834799e+00, -1.102536e+00,\n  -3.866684e+00, -1.022901e+00,\n  -3.808643e+00, -1.139084e+00,\n  -3.868840e+00, -1.011569e+00,\n  -3.791071e+00, -1.158615e+00,\n  -3.797999e+00, -1.151267e+00,\n  -3.696278e+00, -1.232314e+00,\n  -3.779007e+00, -1.170504e+00,\n  -3.622855e+00, -1.270793e+00,\n  -3.647249e+00, -1.259166e+00,\n  -3.655412e+00, -1.255042e+00,\n  -3.573218e+00, -1.291696e+00,\n  -3.638019e+00, -1.263684e+00,\n  -3.498409e+00, -1.317750e+00,\n  -3.304143e+00, -1.364970e+00,\n  -3.183001e+00, -1.384295e+00,\n  -3.202456e+00, -1.381599e+00,\n  -3.244063e+00, -1.375332e+00,\n  -3.233308e+00, -1.377019e+00,\n  -3.060112e+00, -1.398264e+00,\n  -3.078187e+00, -1.396517e+00,\n  -2.689594e+00, -1.415761e+00,\n  -2.947662e+00, -1.407039e+00,\n  -2.854490e+00, -1.411860e+00,\n  -2.660499e+00, -1.415900e+00,\n  -2.875955e+00, -1.410930e+00,\n  -2.675385e+00, -1.415848e+00,\n  -2.813155e+00, -1.413363e+00,\n  -2.417673e+00, -1.411512e+00,\n  -2.725461e+00, -1.415373e+00,\n  -2.148334e+00, -1.396672e+00,\n  -2.108972e+00, -1.393738e+00,\n  -2.029905e+00, -1.387302e+00,\n  -2.046214e+00, -1.388687e+00,\n  -2.057402e+00, -1.389621e+00,\n  -1.650250e+00, -1.347160e+00,\n  -1.806764e+00, -1.365469e+00,\n  -1.206973e+00, -1.283343e+00,\n  -8.029259e-01, -1.211308e+00,\n  -1.229551e+00, -1.286993e+00,\n  -1.101507e+00, -1.265754e+00,\n  -9.110645e-01, -1.231804e+00,\n  -1.110046e+00, -1.267211e+00,\n  -8.465274e-01, -1.219677e+00,\n  -7.594163e-01, -1.202818e+00,\n  -8.023823e-01, -1.211203e+00,\n  -3.732519e-01, -1.121494e+00,\n  -1.918373e-01, -1.079668e+00,\n  -4.671988e-01, -1.142253e+00,\n  -4.033645e-01, -1.128215e+00,\n  -1.920740e-01, -1.079724e+00,\n  -3.022157e-01, -1.105389e+00,\n  -1.652831e-01, -1.073354e+00,\n  +4.671625e-01, -9.085886e-01,\n  +5.940178e-01, -8.721832e-01,\n  +3.147557e-01, -9.508290e-01,\n  +6.383631e-01, -8.591867e-01,\n  +9.888923e-01, -7.514088e-01,\n  +7.076339e-01, -8.386023e-01,\n  +1.326682e+00, -6.386698e-01,\n  +1.149834e+00, -6.988221e-01,\n  +1.257742e+00, -6.624207e-01,\n  +1.492352e+00, -5.799632e-01,\n  +1.595574e+00, -5.421766e-01,\n  +1.240173e+00, -6.684113e-01,\n  +1.706612e+00, -5.004442e-01,\n  +1.873984e+00, -4.353002e-01,\n  +1.985633e+00, -3.902561e-01,\n  +1.722880e+00, -4.942329e-01,\n  +2.095182e+00, -3.447402e-01,\n  +2.018118e+00, -3.768991e-01,\n  +2.422702e+00, -1.999563e-01,\n  +2.370611e+00, -2.239326e-01,\n  +2.152154e+00, -3.205250e-01,\n  +2.525121e+00, -1.516499e-01,\n  +2.422116e+00, -2.002280e-01,\n  +2.842806e+00, +9.536372e-03,\n  +3.030128e+00, +1.146027e-01,\n  +2.888424e+00, +3.433444e-02,\n  +2.991609e+00, +9.226409e-02,\n  +2.924807e+00, +5.445844e-02,\n  +3.007772e+00, +1.015875e-01,\n  +2.781973e+00, -2.282382e-02,\n  +3.164737e+00, +1.961781e-01,\n  +3.237671e+00, +2.430139e-01,\n  +3.046123e+00, +1.240014e-01,\n  +3.414834e+00, +3.669060e-01,\n  +3.436591e+00, +3.833600e-01,\n  +3.626207e+00, +5.444311e-01,\n  +3.223325e+00, +2.336361e-01,\n  +3.511963e+00, +4.431060e-01,\n  +3.698380e+00, +6.187442e-01,\n  +3.670244e+00, +5.884943e-01,\n  +3.558833e+00, +4.828230e-01,\n  +3.661807e+00, +5.797689e-01,\n  +3.767261e+00, +7.030893e-01,\n  +3.801065e+00, +7.532650e-01,\n  +3.828523e+00, +8.024454e-01,\n  +3.840719e+00, +8.287032e-01,\n  +3.848748e+00, +8.485921e-01,\n  +3.865801e+00, +9.066551e-01,\n  +3.870983e+00, +9.404873e-01,\n  +3.870263e+00, +1.001884e+00,\n  +3.864462e+00, +1.032374e+00,\n  +3.870542e+00, +9.996121e-01,\n  +3.865424e+00, +1.028474e+00\n};\n\nConstMatrixRef kY(kYData, kYRows, kYCols);\n\nclass PointToLineSegmentContourCostFunction : public CostFunction {\n public:\n  // This class needs to have an Eigen aligned operator new as it contains\n  // fixed-size Eigen types.\n  EIGEN_MAKE_ALIGNED_OPERATOR_NEW\n\n  PointToLineSegmentContourCostFunction(const int num_segments,\n                                        const Eigen::Vector2d& y)\n      : num_segments_(num_segments), y_(y) {\n    // The first parameter is the preimage position.\n    mutable_parameter_block_sizes()->push_back(1);\n    // The next parameters are the control points for the line segment contour.\n    for (int i = 0; i < num_segments_; ++i) {\n      mutable_parameter_block_sizes()->push_back(2);\n    }\n    set_num_residuals(2);\n  }\n\n  bool Evaluate(const double* const* x,\n                double* residuals,\n                double** jacobians) const final {\n    // Convert the preimage position `t` into a segment index `i0` and the\n    // line segment interpolation parameter `u`. `i1` is the index of the next\n    // control point.\n    const double t = ModuloNumSegments(*x[0]);\n    CHECK_GE(t, 0.0);\n    CHECK_LT(t, num_segments_);\n    const int i0 = floor(t), i1 = (i0 + 1) % num_segments_;\n    const double u = t - i0;\n\n    // Linearly interpolate between control points `i0` and `i1`.\n    residuals[0] = y_[0] - ((1.0 - u) * x[1 + i0][0] + u * x[1 + i1][0]);\n    residuals[1] = y_[1] - ((1.0 - u) * x[1 + i0][1] + u * x[1 + i1][1]);\n\n    if (jacobians == NULL) {\n      return true;\n    }\n\n    if (jacobians[0] != NULL) {\n      jacobians[0][0] = x[1 + i0][0] - x[1 + i1][0];\n      jacobians[0][1] = x[1 + i0][1] - x[1 + i1][1];\n    }\n    for (int i = 0; i < num_segments_; ++i) {\n      if (jacobians[i + 1] != NULL) {\n        MatrixRef(jacobians[i + 1], 2, 2).setZero();\n        if (i == i0) {\n          jacobians[i + 1][0] = -(1.0 - u);\n          jacobians[i + 1][3] = -(1.0 - u);\n        } else if (i == i1) {\n          jacobians[i + 1][0] = -u;\n          jacobians[i + 1][3] = -u;\n        }\n      }\n    }\n    return true;\n  }\n\n  static CostFunction* Create(const int num_segments, const Eigen::Vector2d& y) {\n    return new PointToLineSegmentContourCostFunction(num_segments, y);\n  }\n\n private:\n  inline double ModuloNumSegments(const double t) const {\n    return t - num_segments_ * floor(t / num_segments_);\n  }\n\n  const int num_segments_;\n  const Eigen::Vector2d y_;\n};\n\nclass EuclideanDistanceFunctor {\n public:\n  explicit EuclideanDistanceFunctor(const double sqrt_weight)\n      : sqrt_weight_(sqrt_weight) {}\n\n  template <typename T>\n  bool operator()(const T* x0, const T* x1, T* residuals) const {\n    residuals[0] = sqrt_weight_ * (x0[0] - x1[0]);\n    residuals[1] = sqrt_weight_ * (x0[1] - x1[1]);\n    return true;\n  }\n\n  static CostFunction* Create(const double sqrt_weight) {\n    return new AutoDiffCostFunction<EuclideanDistanceFunctor, 2, 2, 2>(\n        new EuclideanDistanceFunctor(sqrt_weight));\n  }\n\n private:\n  const double sqrt_weight_;\n};\n\nTEST(DynamicSparsity, StaticAndDynamicSparsityProduceSameSolution) {\n  // Skip test if there is no sparse linear algebra library.\n  if (!IsSparseLinearAlgebraLibraryTypeAvailable(SUITE_SPARSE) &&\n      !IsSparseLinearAlgebraLibraryTypeAvailable(CX_SPARSE) &&\n      !IsSparseLinearAlgebraLibraryTypeAvailable(EIGEN_SPARSE)) {\n    return;\n  }\n\n  // Problem configuration.\n  const int num_segments = 151;\n  const double regularization_weight = 1e-2;\n\n  // `X` is the matrix of control points which make up the contour of line\n  // segments. The number of control points is equal to the number of line\n  // segments because the contour is closed.\n  //\n  // Initialize `X` to points on the unit circle.\n  Vector w(num_segments + 1);\n  w.setLinSpaced(num_segments + 1, 0.0, 2.0 * M_PI);\n  w.conservativeResize(num_segments);\n  Matrix X(num_segments, 2);\n  X.col(0) = w.array().cos();\n  X.col(1) = w.array().sin();\n\n  // Each data point has an associated preimage position on the line segment\n  // contour. For each data point we initialize the preimage positions to\n  // the index of the closest control point.\n  const int num_observations = kY.rows();\n  Vector t(num_observations);\n  for (int i = 0; i < num_observations; ++i) {\n    (X.rowwise() - kY.row(i)).rowwise().squaredNorm().minCoeff(&t[i]);\n  }\n\n  Problem problem;\n\n  // For each data point add a residual which measures its distance to its\n  // corresponding position on the line segment contour.\n  std::vector<double*> parameter_blocks(1 + num_segments);\n  parameter_blocks[0] = NULL;\n  for (int i = 0; i < num_segments; ++i) {\n    parameter_blocks[i + 1] = X.data() + 2 * i;\n  }\n  for (int i = 0; i < num_observations; ++i) {\n    parameter_blocks[0] = &t[i];\n    problem.AddResidualBlock(\n        PointToLineSegmentContourCostFunction::Create(num_segments, kY.row(i)),\n        NULL,\n        parameter_blocks);\n  }\n\n  // Add regularization to minimize the length of the line segment contour.\n  for (int i = 0; i < num_segments; ++i) {\n    problem.AddResidualBlock(\n        EuclideanDistanceFunctor::Create(sqrt(regularization_weight)),\n        NULL,\n        X.data() + 2 * i,\n        X.data() + 2 * ((i + 1) % num_segments));\n  }\n\n  Solver::Options options;\n  options.max_num_iterations = 100;\n  options.linear_solver_type = SPARSE_NORMAL_CHOLESKY;\n\n  // First, solve `X` and `t` jointly with dynamic_sparsity = true.\n  Matrix X0 = X;\n  Vector t0 = t;\n  options.dynamic_sparsity = false;\n  Solver::Summary static_summary;\n  Solve(options, &problem, &static_summary);\n  EXPECT_EQ(static_summary.termination_type, CONVERGENCE)\n      << static_summary.FullReport();\n\n  X = X0;\n  t = t0;\n  options.dynamic_sparsity = true;\n  Solver::Summary dynamic_summary;\n  Solve(options, &problem, &dynamic_summary);\n  EXPECT_EQ(dynamic_summary.termination_type, CONVERGENCE)\n      << dynamic_summary.FullReport();\n\n  EXPECT_NEAR(static_summary.final_cost,\n              dynamic_summary.final_cost,\n              std::numeric_limits<double>::epsilon())\n      << \"Static: \\n\"\n      << static_summary.FullReport() << \"\\nDynamic: \\n\"\n      << dynamic_summary.FullReport();\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/eigensparse.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/eigensparse.h\"\n\n#ifdef CERES_USE_EIGEN_SPARSE\n\n#include <sstream>\n\n#include \"Eigen/SparseCholesky\"\n#include \"Eigen/SparseCore\"\n#include \"ceres/compressed_row_sparse_matrix.h\"\n#include \"ceres/linear_solver.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// TODO(sameeragarwal): Use enable_if to clean up the implementations\n// for when Scalar == double.\ntemplate <typename Solver>\nclass EigenSparseCholeskyTemplate : public SparseCholesky {\n public:\n  EigenSparseCholeskyTemplate() : analyzed_(false) {}\n  virtual ~EigenSparseCholeskyTemplate() {}\n  CompressedRowSparseMatrix::StorageType StorageType() const final {\n    return CompressedRowSparseMatrix::LOWER_TRIANGULAR;\n  }\n\n  LinearSolverTerminationType Factorize(\n      const Eigen::SparseMatrix<typename Solver::Scalar>& lhs,\n      std::string* message) {\n    if (!analyzed_) {\n      solver_.analyzePattern(lhs);\n\n      if (VLOG_IS_ON(2)) {\n        std::stringstream ss;\n        solver_.dumpMemory(ss);\n        VLOG(2) << \"Symbolic Analysis\\n\" << ss.str();\n      }\n\n      if (solver_.info() != Eigen::Success) {\n        *message = \"Eigen failure. Unable to find symbolic factorization.\";\n        return LINEAR_SOLVER_FATAL_ERROR;\n      }\n\n      analyzed_ = true;\n    }\n\n    solver_.factorize(lhs);\n    if (solver_.info() != Eigen::Success) {\n      *message = \"Eigen failure. Unable to find numeric factorization.\";\n      return LINEAR_SOLVER_FAILURE;\n    }\n    return LINEAR_SOLVER_SUCCESS;\n  }\n\n  LinearSolverTerminationType Solve(const double* rhs_ptr,\n                                    double* solution_ptr,\n                                    std::string* message) {\n    CHECK(analyzed_) << \"Solve called without a call to Factorize first.\";\n\n    scalar_rhs_ = ConstVectorRef(rhs_ptr, solver_.cols())\n                      .template cast<typename Solver::Scalar>();\n\n    // The two casts are needed if the Scalar in this class is not\n    // double. For code simplicity we are going to assume that Eigen\n    // is smart enough to figure out that casting a double Vector to a\n    // double Vector is a straight copy. If this turns into a\n    // performance bottleneck (unlikely), we can revisit this.\n    scalar_solution_ = solver_.solve(scalar_rhs_);\n    VectorRef(solution_ptr, solver_.cols()) =\n        scalar_solution_.template cast<double>();\n\n    if (solver_.info() != Eigen::Success) {\n      *message = \"Eigen failure. Unable to do triangular solve.\";\n      return LINEAR_SOLVER_FAILURE;\n    }\n    return LINEAR_SOLVER_SUCCESS;\n  }\n\n  LinearSolverTerminationType Factorize(CompressedRowSparseMatrix* lhs,\n                                        std::string* message) final {\n    CHECK_EQ(lhs->storage_type(), StorageType());\n\n    typename Solver::Scalar* values_ptr = NULL;\n    if (std::is_same<typename Solver::Scalar, double>::value) {\n      values_ptr =\n          reinterpret_cast<typename Solver::Scalar*>(lhs->mutable_values());\n    } else {\n      // In the case where the scalar used in this class is not\n      // double. In that case, make a copy of the values array in the\n      // CompressedRowSparseMatrix and cast it to Scalar along the way.\n      values_ = ConstVectorRef(lhs->values(), lhs->num_nonzeros())\n                    .cast<typename Solver::Scalar>();\n      values_ptr = values_.data();\n    }\n\n    Eigen::MappedSparseMatrix<typename Solver::Scalar, Eigen::ColMajor>\n        eigen_lhs(lhs->num_rows(),\n                  lhs->num_rows(),\n                  lhs->num_nonzeros(),\n                  lhs->mutable_rows(),\n                  lhs->mutable_cols(),\n                  values_ptr);\n    return Factorize(eigen_lhs, message);\n  }\n\n private:\n  Eigen::Matrix<typename Solver::Scalar, Eigen::Dynamic, 1> values_,\n      scalar_rhs_, scalar_solution_;\n  bool analyzed_;\n  Solver solver_;\n};\n\nstd::unique_ptr<SparseCholesky> EigenSparseCholesky::Create(\n    const OrderingType ordering_type) {\n  std::unique_ptr<SparseCholesky> sparse_cholesky;\n\n  typedef Eigen::SimplicialLDLT<Eigen::SparseMatrix<double>,\n                                Eigen::Upper,\n                                Eigen::AMDOrdering<int>>\n      WithAMDOrdering;\n  typedef Eigen::SimplicialLDLT<Eigen::SparseMatrix<double>,\n                                Eigen::Upper,\n                                Eigen::NaturalOrdering<int>>\n      WithNaturalOrdering;\n  if (ordering_type == AMD) {\n    sparse_cholesky.reset(new EigenSparseCholeskyTemplate<WithAMDOrdering>());\n  } else {\n    sparse_cholesky.reset(\n        new EigenSparseCholeskyTemplate<WithNaturalOrdering>());\n  }\n  return sparse_cholesky;\n}\n\nEigenSparseCholesky::~EigenSparseCholesky() {}\n\nstd::unique_ptr<SparseCholesky> FloatEigenSparseCholesky::Create(\n    const OrderingType ordering_type) {\n  std::unique_ptr<SparseCholesky> sparse_cholesky;\n  typedef Eigen::SimplicialLDLT<Eigen::SparseMatrix<float>,\n                                Eigen::Upper,\n                                Eigen::AMDOrdering<int>>\n      WithAMDOrdering;\n  typedef Eigen::SimplicialLDLT<Eigen::SparseMatrix<float>,\n                                Eigen::Upper,\n                                Eigen::NaturalOrdering<int>>\n      WithNaturalOrdering;\n  if (ordering_type == AMD) {\n    sparse_cholesky.reset(new EigenSparseCholeskyTemplate<WithAMDOrdering>());\n  } else {\n    sparse_cholesky.reset(\n        new EigenSparseCholeskyTemplate<WithNaturalOrdering>());\n  }\n  return sparse_cholesky;\n}\n\nFloatEigenSparseCholesky::~FloatEigenSparseCholesky() {}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_USE_EIGEN_SPARSE\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/eigensparse.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// A simple C++ interface to the Eigen's Sparse Cholesky routines.\n\n#ifndef CERES_INTERNAL_EIGENSPARSE_H_\n#define CERES_INTERNAL_EIGENSPARSE_H_\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifdef CERES_USE_EIGEN_SPARSE\n\n#include <memory>\n#include <string>\n\n#include \"Eigen/SparseCore\"\n#include \"ceres/linear_solver.h\"\n#include \"ceres/sparse_cholesky.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass EigenSparseCholesky : public SparseCholesky {\n public:\n  // Factory\n  static std::unique_ptr<SparseCholesky> Create(\n      const OrderingType ordering_type);\n\n  // SparseCholesky interface.\n  virtual ~EigenSparseCholesky();\n  virtual LinearSolverTerminationType Factorize(\n      CompressedRowSparseMatrix* lhs, std::string* message) = 0;\n  virtual CompressedRowSparseMatrix::StorageType StorageType() const = 0;\n  virtual LinearSolverTerminationType Solve(const double* rhs,\n                                            double* solution,\n                                            std::string* message) = 0;\n};\n\n// Even though the input is double precision linear system, this class\n// solves it by computing a single precision Cholesky factorization.\nclass FloatEigenSparseCholesky : public SparseCholesky {\n public:\n  // Factory\n  static std::unique_ptr<SparseCholesky> Create(\n      const OrderingType ordering_type);\n\n  // SparseCholesky interface.\n  virtual ~FloatEigenSparseCholesky();\n  virtual LinearSolverTerminationType Factorize(\n      CompressedRowSparseMatrix* lhs, std::string* message) = 0;\n  virtual CompressedRowSparseMatrix::StorageType StorageType() const = 0;\n  virtual LinearSolverTerminationType Solve(const double* rhs,\n                                            double* solution,\n                                            std::string* message) = 0;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_USE_EIGEN_SPARSE\n\n#endif  // CERES_INTERNAL_EIGENSPARSE_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/evaluation_callback_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: mierle@gmail.com (Keir Mierle)\n\n#include \"ceres/solver.h\"\n\n#include <cmath>\n#include <limits>\n#include <vector>\n\n#include \"gtest/gtest.h\"\n#include \"ceres/evaluation_callback.h\"\n#include \"ceres/sized_cost_function.h\"\n#include \"ceres/problem.h\"\n#include \"ceres/problem_impl.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// Use an inline hash function to avoid portability wrangling. Algorithm from\n// Daniel Bernstein, known as the \"djb2\" hash.\ntemplate<typename T>\nuint64_t Djb2Hash(const T* data, const int size) {\n  uint64_t hash = 5381;\n  const uint8_t* data_as_bytes = reinterpret_cast<const uint8_t*>(data);\n  for (int i = 0; i < sizeof(*data) * size; ++i) {\n    hash = hash * 33 + data_as_bytes[i];\n  }\n  return hash;\n}\n\nconst double kUninitialized = 0;\n\n// Generally multiple inheritance is a terrible idea, but in this (test)\n// case it makes for a relatively elegant test implementation.\nstruct WigglyBowlCostFunctionAndEvaluationCallback :\n      SizedCostFunction<2, 2>,\n      EvaluationCallback  {\n\n  explicit WigglyBowlCostFunctionAndEvaluationCallback(double *parameter)\n      : EvaluationCallback(),\n        user_parameter_block(parameter),\n        prepare_num_calls(0),\n        prepare_requested_jacobians(false),\n        prepare_new_evaluation_point(false),\n        prepare_parameter_hash(kUninitialized),\n        evaluate_num_calls(0),\n        evaluate_last_parameter_hash(kUninitialized) {}\n\n  virtual ~WigglyBowlCostFunctionAndEvaluationCallback() {}\n\n  // Evaluation callback interface. This checks that all the preconditions are\n  // met at the point that Ceres calls into it.\n  void PrepareForEvaluation(bool evaluate_jacobians,\n                            bool new_evaluation_point) final {\n    // At this point, the incoming parameters are implicitly pushed by Ceres\n    // into the user parameter blocks; in contrast to in Evaluate().\n    uint64_t incoming_parameter_hash = Djb2Hash(user_parameter_block, 2);\n\n    // Check: Prepare() & Evaluate() come in pairs, in that order. Before this\n    // call, the number of calls excluding this one should match.\n    EXPECT_EQ(prepare_num_calls, evaluate_num_calls);\n\n    // Check: new_evaluation_point indicates that the parameter has changed.\n    if (new_evaluation_point) {\n      // If it's a new evaluation point, then the parameter should have\n      // changed. Technically, it's not required that it must change but\n      // in practice it does, and that helps with testing.\n      EXPECT_NE(evaluate_last_parameter_hash, incoming_parameter_hash);\n      EXPECT_NE(prepare_parameter_hash, incoming_parameter_hash);\n    } else {\n      // If this is the same evaluation point as last time, ensure that\n      // the parameters match both from the previous evaluate, the\n      // previous prepare, and the current prepare.\n      EXPECT_EQ(evaluate_last_parameter_hash, prepare_parameter_hash);\n      EXPECT_EQ(evaluate_last_parameter_hash, incoming_parameter_hash);\n    }\n\n    // Save details for to check at the next call to Evaluate().\n    prepare_num_calls++;\n    prepare_requested_jacobians = evaluate_jacobians;\n    prepare_new_evaluation_point = new_evaluation_point;\n    prepare_parameter_hash = incoming_parameter_hash;\n  }\n\n  // Cost function interface. This checks that preconditions that were\n  // set as part of the PrepareForEvaluation() call are met in this one.\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const final {\n    // Cost function implementation of the \"Wiggly Bowl\" function:\n    //\n    //   1/2 * [(y - a*sin(x))^2 + x^2],\n    //\n    // expressed as a Ceres cost function with two residuals:\n    //\n    //   r[0] = y - a*sin(x)\n    //   r[1] = x.\n    //\n    // This is harder to optimize than the Rosenbrock function because the\n    // minimizer has to navigate a sine-shaped valley while descending the 1D\n    // parabola formed along the y axis. Note that the \"a\" needs to be more\n    // than 5 to get a strong enough wiggle effect in the cost surface to\n    // trigger failed iterations in the optimizer.\n    const double a = 10.0;\n    double x = (*parameters)[0];\n    double y = (*parameters)[1];\n    residuals[0] = y - a * sin(x);\n    residuals[1] = x;\n    if (jacobians != NULL) {\n      (*jacobians)[2 * 0 + 0] = - a * cos(x);  // df1/dx\n      (*jacobians)[2 * 0 + 1] = 1.0;           // df1/dy\n      (*jacobians)[2 * 1 + 0] = 1.0;           // df2/dx\n      (*jacobians)[2 * 1 + 1] = 0.0;           // df2/dy\n    }\n\n    uint64_t incoming_parameter_hash = Djb2Hash(*parameters, 2);\n\n    // Check: PrepareForEvaluation() & Evaluate() come in pairs, in that order.\n    EXPECT_EQ(prepare_num_calls, evaluate_num_calls + 1);\n\n    // Check: if new_evaluation_point indicates that the parameter has\n    // changed, it has changed; otherwise it is the same.\n    if (prepare_new_evaluation_point) {\n      EXPECT_NE(evaluate_last_parameter_hash, incoming_parameter_hash);\n    } else {\n      EXPECT_NE(evaluate_last_parameter_hash, kUninitialized);\n      EXPECT_EQ(evaluate_last_parameter_hash, incoming_parameter_hash);\n    }\n\n    // Check: Parameter matches value in in parameter blocks during prepare.\n    EXPECT_EQ(prepare_parameter_hash, incoming_parameter_hash);\n\n    // Check: jacobians are requested if they were in PrepareForEvaluation().\n    EXPECT_EQ(prepare_requested_jacobians, jacobians != NULL);\n\n    evaluate_num_calls++;\n    evaluate_last_parameter_hash = incoming_parameter_hash;\n    return true;\n  }\n\n  // Pointer to the parameter block associated with this cost function.\n  // Contents should get set by Ceres before calls to PrepareForEvaluation()\n  // and Evaluate().\n  double* user_parameter_block;\n\n  // Track state: PrepareForEvaluation().\n  //\n  // These track details from the PrepareForEvaluation() call (hence the\n  // \"prepare_\" prefix), which are checked for consistency in Evaluate().\n  int prepare_num_calls;\n  bool prepare_requested_jacobians;\n  bool prepare_new_evaluation_point;\n  uint64_t prepare_parameter_hash;\n\n  // Track state: Evaluate().\n  //\n  // These track details from the Evaluate() call (hence the \"evaluate_\"\n  // prefix), which are then checked for consistency in the calls to\n  // PrepareForEvaluation(). Mutable is reasonable for this case.\n  mutable int evaluate_num_calls;\n  mutable uint64_t evaluate_last_parameter_hash;\n};\n\nTEST(EvaluationCallback, WithTrustRegionMinimizer) {\n  double parameters[2] = {50.0, 50.0};\n  const uint64_t original_parameters_hash = Djb2Hash(parameters, 2);\n\n  WigglyBowlCostFunctionAndEvaluationCallback cost_function(parameters);\n  Problem::Options problem_options;\n  problem_options.evaluation_callback = &cost_function;\n  problem_options.cost_function_ownership = DO_NOT_TAKE_OWNERSHIP;\n  Problem problem(problem_options);\n  problem.AddResidualBlock(&cost_function, NULL, parameters);\n\n  Solver::Options options;\n  options.linear_solver_type = DENSE_QR;\n  options.max_num_iterations = 300;  // Cost function is hard.\n\n  // Run the solve. Checking is done inside the cost function / callback.\n  Solver::Summary summary;\n  Solve(options, &problem, &summary);\n\n  // Ensure that this was a hard cost function (not all steps succeed).\n  EXPECT_GT(summary.num_successful_steps, 10);\n  EXPECT_GT(summary.num_unsuccessful_steps, 10);\n\n  // Ensure PrepareForEvaluation() is called the appropriate number of times.\n  EXPECT_EQ(cost_function.prepare_num_calls,\n            // Unsuccessful steps are evaluated only once (no jacobians).\n            summary.num_unsuccessful_steps +\n            // Successful steps are evaluated twice: with and without jacobians.\n            2 * summary.num_successful_steps\n            // Final iteration doesn't re-evaluate the jacobian.\n            // Note: This may be sensitive to tweaks to the TR algorithm; if\n            // this becomes too brittle, remove this EXPECT_EQ() entirely.\n            - 1);\n\n  // Ensure the callback calls ran a reasonable number of times.\n  EXPECT_GT(cost_function.prepare_num_calls, 0);\n  EXPECT_GT(cost_function.evaluate_num_calls, 0);\n  EXPECT_EQ(cost_function.prepare_num_calls,\n            cost_function.evaluate_num_calls);\n\n  // Ensure that the parameters did actually change.\n  EXPECT_NE(Djb2Hash(parameters, 2), original_parameters_hash);\n}\n\nstatic void WithLineSearchMinimizerImpl(\n    LineSearchType line_search,\n    LineSearchDirectionType line_search_direction,\n    LineSearchInterpolationType line_search_interpolation) {\n  double parameters[2] = {50.0, 50.0};\n  const uint64_t original_parameters_hash = Djb2Hash(parameters, 2);\n\n  WigglyBowlCostFunctionAndEvaluationCallback cost_function(parameters);\n  Problem::Options problem_options;\n  problem_options.evaluation_callback = &cost_function;\n  problem_options.cost_function_ownership = DO_NOT_TAKE_OWNERSHIP;\n  Problem problem(problem_options);\n  problem.AddResidualBlock(&cost_function, NULL, parameters);\n\n  Solver::Options options;\n  options.linear_solver_type = DENSE_QR;\n  options.max_num_iterations = 300;  // Cost function is hard.\n  options.minimizer_type = ceres::LINE_SEARCH;\n\n  options.line_search_type = line_search;\n  options.line_search_direction_type = line_search_direction;\n  options.line_search_interpolation_type = line_search_interpolation;\n\n  // Run the solve. Checking is done inside the cost function / callback.\n  Solver::Summary summary;\n  Solve(options, &problem, &summary);\n\n  // Ensure the callback calls ran a reasonable number of times.\n  EXPECT_GT(summary.num_line_search_steps, 10);\n  EXPECT_GT(cost_function.prepare_num_calls, 30);\n  EXPECT_EQ(cost_function.prepare_num_calls,\n            cost_function.evaluate_num_calls);\n\n  // Ensure that the parameters did actually change.\n  EXPECT_NE(Djb2Hash(parameters, 2), original_parameters_hash);\n}\n\n// Note: These tests omit combinations of Wolfe line search with bisection.\n// Due to an implementation quirk in Wolfe line search with bisection, there\n// are calls to re-evaluate an existing point with new_point = true. That\n// causes the (overly) strict tests to break, since they check the new_point\n// preconditions in an if-and-only-if way. Strictly speaking, if new_point =\n// true, the interface does not *require* that the point has changed; only that\n// if new_point = false, the same point is reused.\n//\n// Since the strict checking is useful to verify that there aren't missed\n// optimizations, omit tests of the Wolfe with bisection cases.\n\n// Wolfe with L-BFGS.\nTEST(EvaluationCallback, WithLineSearchMinimizerWolfeLbfgsCubic) {\n  WithLineSearchMinimizerImpl(WOLFE, LBFGS, CUBIC);\n}\nTEST(EvaluationCallback, WithLineSearchMinimizerWolfeLbfgsQuadratic) {\n  WithLineSearchMinimizerImpl(WOLFE, LBFGS, QUADRATIC);\n}\n\n// Wolfe with full BFGS.\nTEST(EvaluationCallback, WithLineSearchMinimizerWolfeBfgsCubic) {\n  WithLineSearchMinimizerImpl(WOLFE, BFGS, CUBIC);\n}\n\nTEST(EvaluationCallback, WithLineSearchMinimizerWolfeBfgsQuadratic) {\n  WithLineSearchMinimizerImpl(WOLFE, BFGS, QUADRATIC);\n}\n\n// Armijo with nonlinear conjugate gradient.\nTEST(EvaluationCallback, WithLineSearchMinimizerArmijoCubic) {\n  WithLineSearchMinimizerImpl(ARMIJO, NONLINEAR_CONJUGATE_GRADIENT, CUBIC);\n}\n\nTEST(EvaluationCallback, WithLineSearchMinimizerArmijoBisection) {\n  WithLineSearchMinimizerImpl(ARMIJO, NONLINEAR_CONJUGATE_GRADIENT, BISECTION);\n}\n\nTEST(EvaluationCallback, WithLineSearchMinimizerArmijoQuadratic) {\n  WithLineSearchMinimizerImpl(ARMIJO, NONLINEAR_CONJUGATE_GRADIENT, QUADRATIC);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/evaluator.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n\n#include <vector>\n#include \"ceres/block_evaluate_preparer.h\"\n#include \"ceres/block_jacobian_writer.h\"\n#include \"ceres/compressed_row_jacobian_writer.h\"\n#include \"ceres/compressed_row_sparse_matrix.h\"\n#include \"ceres/crs_matrix.h\"\n#include \"ceres/dense_jacobian_writer.h\"\n#include \"ceres/dynamic_compressed_row_finalizer.h\"\n#include \"ceres/dynamic_compressed_row_jacobian_writer.h\"\n#include \"ceres/evaluator.h\"\n#include \"ceres/internal/port.h\"\n#include \"ceres/program_evaluator.h\"\n#include \"ceres/scratch_evaluate_preparer.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nEvaluator::~Evaluator() {}\n\nEvaluator* Evaluator::Create(const Evaluator::Options& options,\n                             Program* program,\n                             std::string* error) {\n  CHECK(options.context != NULL);\n\n  switch (options.linear_solver_type) {\n    case DENSE_QR:\n    case DENSE_NORMAL_CHOLESKY:\n      return new ProgramEvaluator<ScratchEvaluatePreparer,\n                                  DenseJacobianWriter>(options,\n                                                       program);\n    case DENSE_SCHUR:\n    case SPARSE_SCHUR:\n    case ITERATIVE_SCHUR:\n    case CGNR:\n      return new ProgramEvaluator<BlockEvaluatePreparer,\n                                  BlockJacobianWriter>(options,\n                                                       program);\n    case SPARSE_NORMAL_CHOLESKY:\n      if (options.dynamic_sparsity) {\n        return new ProgramEvaluator<ScratchEvaluatePreparer,\n                                    DynamicCompressedRowJacobianWriter,\n                                    DynamicCompressedRowJacobianFinalizer>(\n                                        options, program);\n      } else {\n        return new ProgramEvaluator<BlockEvaluatePreparer,\n                                    BlockJacobianWriter>(options,\n                                                         program);\n      }\n\n    default:\n      *error = \"Invalid Linear Solver Type. Unable to create evaluator.\";\n      return NULL;\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/evaluator.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//         keir@google.com (Keir Mierle)\n\n#ifndef CERES_INTERNAL_EVALUATOR_H_\n#define CERES_INTERNAL_EVALUATOR_H_\n\n#include <map>\n#include <string>\n#include <vector>\n\n#include \"ceres/context_impl.h\"\n#include \"ceres/execution_summary.h\"\n#include \"ceres/internal/port.h\"\n#include \"ceres/types.h\"\n\nnamespace ceres {\n\nstruct CRSMatrix;\nclass EvaluationCallback;\n\nnamespace internal {\n\nclass Program;\nclass SparseMatrix;\n\n// The Evaluator interface offers a way to interact with a least squares cost\n// function that is useful for an optimizer that wants to minimize the least\n// squares objective. This insulates the optimizer from issues like Jacobian\n// storage, parameterization, etc.\nclass Evaluator {\n public:\n  virtual ~Evaluator();\n\n  struct Options {\n    int num_threads = 1;\n    int num_eliminate_blocks = -1;\n    LinearSolverType linear_solver_type = DENSE_QR;\n    bool dynamic_sparsity = false;\n    ContextImpl* context = nullptr;\n    EvaluationCallback* evaluation_callback = nullptr;\n  };\n\n  static Evaluator* Create(const Options& options,\n                           Program* program,\n                           std::string* error);\n\n  // Build and return a sparse matrix for storing and working with the Jacobian\n  // of the objective function. The jacobian has dimensions\n  // NumEffectiveParameters() by NumParameters(), and is typically extremely\n  // sparse. Since the sparsity pattern of the Jacobian remains constant over\n  // the lifetime of the optimization problem, this method is used to\n  // instantiate a SparseMatrix object with the appropriate sparsity structure\n  // (which can be an expensive operation) and then reused by the optimization\n  // algorithm and the various linear solvers.\n  //\n  // It is expected that the classes implementing this interface will be aware\n  // of their client's requirements for the kind of sparse matrix storage and\n  // layout that is needed for an efficient implementation. For example\n  // CompressedRowOptimizationProblem creates a compressed row representation of\n  // the jacobian for use with CHOLMOD, where as BlockOptimizationProblem\n  // creates a BlockSparseMatrix representation of the jacobian for use in the\n  // Schur complement based methods.\n  virtual SparseMatrix* CreateJacobian() const = 0;\n\n  // Options struct to control Evaluator::Evaluate;\n  struct EvaluateOptions {\n    // If false, the loss function correction is not applied to the\n    // residual blocks.\n    bool apply_loss_function = true;\n\n    // If false, this evaluation point is the same as the last one.\n    bool new_evaluation_point = true;\n  };\n\n  // Evaluate the cost function for the given state. Returns the cost,\n  // residuals, and jacobian in the corresponding arguments. Both residuals and\n  // jacobian are optional; to avoid computing them, pass NULL.\n  //\n  // If non-NULL, the Jacobian must have a suitable sparsity pattern; only the\n  // values array of the jacobian is modified.\n  //\n  // state is an array of size NumParameters(), cost is a pointer to a single\n  // double, and residuals is an array of doubles of size NumResiduals().\n  virtual bool Evaluate(const EvaluateOptions& evaluate_options,\n                        const double* state,\n                        double* cost,\n                        double* residuals,\n                        double* gradient,\n                        SparseMatrix* jacobian) = 0;\n\n  // Variant of Evaluator::Evaluate where the user wishes to use the\n  // default EvaluateOptions struct. This is mostly here as a\n  // convenience method.\n  bool Evaluate(const double* state,\n                double* cost,\n                double* residuals,\n                double* gradient,\n                SparseMatrix* jacobian) {\n    return Evaluate(EvaluateOptions(),\n                    state,\n                    cost,\n                    residuals,\n                    gradient,\n                    jacobian);\n  }\n\n  // Make a change delta (of size NumEffectiveParameters()) to state (of size\n  // NumParameters()) and store the result in state_plus_delta.\n  //\n  // In the case that there are no parameterizations used, this is equivalent to\n  //\n  //   state_plus_delta[i] = state[i] + delta[i] ;\n  //\n  // however, the mapping is more complicated in the case of parameterizations\n  // like quaternions. This is the same as the \"Plus()\" operation in\n  // local_parameterization.h, but operating over the entire state vector for a\n  // problem.\n  virtual bool Plus(const double* state,\n                    const double* delta,\n                    double* state_plus_delta) const = 0;\n\n  // The number of parameters in the optimization problem.\n  virtual int NumParameters() const = 0;\n\n  // This is the effective number of parameters that the optimizer may adjust.\n  // This applies when there are parameterizations on some of the parameters.\n  virtual int NumEffectiveParameters()  const = 0;\n\n  // The number of residuals in the optimization problem.\n  virtual int NumResiduals() const = 0;\n\n  // The following two methods return copies instead of references so\n  // that the base class implementation does not have to worry about\n  // life time issues. Further, these calls are not expected to be\n  // frequent or performance sensitive.\n  virtual std::map<std::string, CallStatistics> Statistics() const {\n    return std::map<std::string, CallStatistics>();\n  }\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_EVALUATOR_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/evaluator_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n//\n// Tests shared across evaluators. The tests try all combinations of linear\n// solver and num_eliminate_blocks (for schur-based solvers).\n\n#include \"ceres/evaluator.h\"\n\n#include <memory>\n#include \"ceres/casts.h\"\n#include \"ceres/cost_function.h\"\n#include \"ceres/crs_matrix.h\"\n#include \"ceres/evaluator_test_utils.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/local_parameterization.h\"\n#include \"ceres/problem_impl.h\"\n#include \"ceres/program.h\"\n#include \"ceres/sized_cost_function.h\"\n#include \"ceres/sparse_matrix.h\"\n#include \"ceres/stringprintf.h\"\n#include \"ceres/types.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::string;\nusing std::vector;\n\n// TODO(keir): Consider pushing this into a common test utils file.\ntemplate <int kFactor, int kNumResiduals, int... Ns>\nclass ParameterIgnoringCostFunction\n    : public SizedCostFunction<kNumResiduals, Ns...> {\n  typedef SizedCostFunction<kNumResiduals, Ns...> Base;\n\n public:\n  explicit ParameterIgnoringCostFunction(bool succeeds = true)\n      : succeeds_(succeeds) {}\n\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const final {\n    for (int i = 0; i < Base::num_residuals(); ++i) {\n      residuals[i] = i + 1;\n    }\n    if (jacobians) {\n      for (int k = 0; k < Base::parameter_block_sizes().size(); ++k) {\n        // The jacobians here are full sized, but they are transformed in the\n        // evaluator into the \"local\" jacobian. In the tests, the \"subset\n        // constant\" parameterization is used, which should pick out columns\n        // from these jacobians. Put values in the jacobian that make this\n        // obvious; in particular, make the jacobians like this:\n        //\n        //   1 2 3 4 ...\n        //   1 2 3 4 ...   .*  kFactor\n        //   1 2 3 4 ...\n        //\n        // where the multiplication by kFactor makes it easier to distinguish\n        // between Jacobians of different residuals for the same parameter.\n        if (jacobians[k] != nullptr) {\n          MatrixRef jacobian(jacobians[k],\n                             Base::num_residuals(),\n                             Base::parameter_block_sizes()[k]);\n          for (int j = 0; j < Base::parameter_block_sizes()[k]; ++j) {\n            jacobian.col(j).setConstant(kFactor * (j + 1));\n          }\n        }\n      }\n    }\n    return succeeds_;\n  }\n\n private:\n  bool succeeds_;\n};\n\nstruct EvaluatorTestOptions {\n  EvaluatorTestOptions(LinearSolverType linear_solver_type,\n                       int num_eliminate_blocks,\n                       bool dynamic_sparsity = false)\n    : linear_solver_type(linear_solver_type),\n      num_eliminate_blocks(num_eliminate_blocks),\n      dynamic_sparsity(dynamic_sparsity) {}\n\n  LinearSolverType linear_solver_type;\n  int num_eliminate_blocks;\n  bool dynamic_sparsity;\n};\n\nstruct EvaluatorTest\n    : public ::testing::TestWithParam<EvaluatorTestOptions> {\n  Evaluator* CreateEvaluator(Program* program) {\n    // This program is straight from the ProblemImpl, and so has no index/offset\n    // yet; compute it here as required by the evaluator implementations.\n    program->SetParameterOffsetsAndIndex();\n\n    if (VLOG_IS_ON(1)) {\n      string report;\n      StringAppendF(&report, \"Creating evaluator with type: %d\",\n                    GetParam().linear_solver_type);\n      if (GetParam().linear_solver_type == SPARSE_NORMAL_CHOLESKY) {\n        StringAppendF(&report, \", dynamic_sparsity: %d\",\n                      GetParam().dynamic_sparsity);\n      }\n      StringAppendF(&report, \" and num_eliminate_blocks: %d\",\n                    GetParam().num_eliminate_blocks);\n      VLOG(1) << report;\n    }\n    Evaluator::Options options;\n    options.linear_solver_type = GetParam().linear_solver_type;\n    options.num_eliminate_blocks = GetParam().num_eliminate_blocks;\n    options.dynamic_sparsity = GetParam().dynamic_sparsity;\n    options.context = problem.context();\n    string error;\n    return Evaluator::Create(options, program, &error);\n  }\n\n  void EvaluateAndCompare(ProblemImpl *problem,\n                          int expected_num_rows,\n                          int expected_num_cols,\n                          double expected_cost,\n                          const double* expected_residuals,\n                          const double* expected_gradient,\n                          const double* expected_jacobian) {\n    std::unique_ptr<Evaluator> evaluator(\n        CreateEvaluator(problem->mutable_program()));\n    int num_residuals = expected_num_rows;\n    int num_parameters = expected_num_cols;\n\n    double cost = -1;\n\n    Vector residuals(num_residuals);\n    residuals.setConstant(-2000);\n\n    Vector gradient(num_parameters);\n    gradient.setConstant(-3000);\n\n    std::unique_ptr<SparseMatrix> jacobian(evaluator->CreateJacobian());\n\n    ASSERT_EQ(expected_num_rows, evaluator->NumResiduals());\n    ASSERT_EQ(expected_num_cols, evaluator->NumEffectiveParameters());\n    ASSERT_EQ(expected_num_rows, jacobian->num_rows());\n    ASSERT_EQ(expected_num_cols, jacobian->num_cols());\n\n    vector<double> state(evaluator->NumParameters());\n\n    ASSERT_TRUE(evaluator->Evaluate(\n          &state[0],\n          &cost,\n          expected_residuals != nullptr ? &residuals[0]  : nullptr,\n          expected_gradient  != nullptr ? &gradient[0]   : nullptr,\n          expected_jacobian  != nullptr ? jacobian.get() : nullptr));\n\n    Matrix actual_jacobian;\n    if (expected_jacobian != nullptr) {\n      jacobian->ToDenseMatrix(&actual_jacobian);\n    }\n\n    CompareEvaluations(expected_num_rows,\n                       expected_num_cols,\n                       expected_cost,\n                       expected_residuals,\n                       expected_gradient,\n                       expected_jacobian,\n                       cost,\n                       &residuals[0],\n                       &gradient[0],\n                       actual_jacobian.data());\n  }\n\n  // Try all combinations of parameters for the evaluator.\n  void CheckAllEvaluationCombinations(const ExpectedEvaluation &expected) {\n    for (int i = 0; i < 8; ++i) {\n      EvaluateAndCompare(&problem,\n                         expected.num_rows,\n                         expected.num_cols,\n                         expected.cost,\n                         (i & 1) ? expected.residuals : nullptr,\n                         (i & 2) ? expected.gradient  : nullptr,\n                         (i & 4) ? expected.jacobian  : nullptr);\n    }\n  }\n\n  // The values are ignored completely by the cost function.\n  double x[2];\n  double y[3];\n  double z[4];\n\n  ProblemImpl problem;\n};\n\nstatic void SetSparseMatrixConstant(SparseMatrix* sparse_matrix, double value) {\n  VectorRef(sparse_matrix->mutable_values(),\n            sparse_matrix->num_nonzeros()).setConstant(value);\n}\n\nTEST_P(EvaluatorTest, SingleResidualProblem) {\n  problem.AddResidualBlock(new ParameterIgnoringCostFunction<1, 3, 2, 3, 4>,\n                           nullptr,\n                           x, y, z);\n\n  ExpectedEvaluation expected = {\n    // Rows/columns\n    3, 9,\n    // Cost\n    7.0,\n    // Residuals\n    { 1.0, 2.0, 3.0 },\n    // Gradient\n    { 6.0, 12.0,              // x\n      6.0, 12.0, 18.0,        // y\n      6.0, 12.0, 18.0, 24.0,  // z\n    },\n    // Jacobian\n    //   x          y             z\n    { 1, 2,   1, 2, 3,   1, 2, 3, 4,\n      1, 2,   1, 2, 3,   1, 2, 3, 4,\n      1, 2,   1, 2, 3,   1, 2, 3, 4\n    }\n  };\n  CheckAllEvaluationCombinations(expected);\n}\n\nTEST_P(EvaluatorTest, SingleResidualProblemWithPermutedParameters) {\n  // Add the parameters in explicit order to force the ordering in the program.\n  problem.AddParameterBlock(x,  2);\n  problem.AddParameterBlock(y,  3);\n  problem.AddParameterBlock(z,  4);\n\n  // Then use a cost function which is similar to the others, but swap around\n  // the ordering of the parameters to the cost function. This shouldn't affect\n  // the jacobian evaluation, but requires explicit handling in the evaluators.\n  // At one point the compressed row evaluator had a bug that went undetected\n  // for a long time, since by chance most users added parameters to the problem\n  // in the same order that they occurred as parameters to a cost function.\n  problem.AddResidualBlock(new ParameterIgnoringCostFunction<1, 3, 4, 3, 2>,\n                           nullptr,\n                           z, y, x);\n\n  ExpectedEvaluation expected = {\n    // Rows/columns\n    3, 9,\n    // Cost\n    7.0,\n    // Residuals\n    { 1.0, 2.0, 3.0 },\n    // Gradient\n    { 6.0, 12.0,              // x\n      6.0, 12.0, 18.0,        // y\n      6.0, 12.0, 18.0, 24.0,  // z\n    },\n    // Jacobian\n    //   x          y             z\n    { 1, 2,   1, 2, 3,   1, 2, 3, 4,\n      1, 2,   1, 2, 3,   1, 2, 3, 4,\n      1, 2,   1, 2, 3,   1, 2, 3, 4\n    }\n  };\n  CheckAllEvaluationCombinations(expected);\n}\n\nTEST_P(EvaluatorTest, SingleResidualProblemWithNuisanceParameters) {\n  // These parameters are not used.\n  double a[2];\n  double b[1];\n  double c[1];\n  double d[3];\n\n  // Add the parameters in a mixed order so the Jacobian is \"checkered\" with the\n  // values from the other parameters.\n  problem.AddParameterBlock(a, 2);\n  problem.AddParameterBlock(x, 2);\n  problem.AddParameterBlock(b, 1);\n  problem.AddParameterBlock(y, 3);\n  problem.AddParameterBlock(c, 1);\n  problem.AddParameterBlock(z, 4);\n  problem.AddParameterBlock(d, 3);\n\n  problem.AddResidualBlock(new ParameterIgnoringCostFunction<1, 3, 2, 3, 4>,\n                           nullptr,\n                           x, y, z);\n\n  ExpectedEvaluation expected = {\n    // Rows/columns\n    3, 16,\n    // Cost\n    7.0,\n    // Residuals\n    { 1.0, 2.0, 3.0 },\n    // Gradient\n    { 0.0, 0.0,               // a\n      6.0, 12.0,              // x\n      0.0,                    // b\n      6.0, 12.0, 18.0,        // y\n      0.0,                    // c\n      6.0, 12.0, 18.0, 24.0,  // z\n      0.0, 0.0, 0.0,          // d\n    },\n    // Jacobian\n    //   a        x     b           y     c              z           d\n    { 0, 0,    1, 2,    0,    1, 2, 3,    0,    1, 2, 3, 4,    0, 0, 0,\n      0, 0,    1, 2,    0,    1, 2, 3,    0,    1, 2, 3, 4,    0, 0, 0,\n      0, 0,    1, 2,    0,    1, 2, 3,    0,    1, 2, 3, 4,    0, 0, 0\n    }\n  };\n  CheckAllEvaluationCombinations(expected);\n}\n\nTEST_P(EvaluatorTest, MultipleResidualProblem) {\n  // Add the parameters in explicit order to force the ordering in the program.\n  problem.AddParameterBlock(x,  2);\n  problem.AddParameterBlock(y,  3);\n  problem.AddParameterBlock(z,  4);\n\n  // f(x, y) in R^2\n  problem.AddResidualBlock(new ParameterIgnoringCostFunction<1, 2, 2, 3>,\n                           nullptr,\n                           x, y);\n\n  // g(x, z) in R^3\n  problem.AddResidualBlock(new ParameterIgnoringCostFunction<2, 3, 2, 4>,\n                           nullptr,\n                           x, z);\n\n  // h(y, z) in R^4\n  problem.AddResidualBlock(new ParameterIgnoringCostFunction<3, 4, 3, 4>,\n                           nullptr,\n                           y, z);\n\n  ExpectedEvaluation expected = {\n    // Rows/columns\n    9, 9,\n    // Cost\n    // f       g           h\n    (  1 + 4 + 1 + 4 + 9 + 1 + 4 + 9 + 16) / 2.0,\n    // Residuals\n    { 1.0, 2.0,           // f\n      1.0, 2.0, 3.0,      // g\n      1.0, 2.0, 3.0, 4.0  // h\n    },\n    // Gradient\n    { 15.0, 30.0,               // x\n      33.0, 66.0, 99.0,         // y\n      42.0, 84.0, 126.0, 168.0  // z\n    },\n    // Jacobian\n    //                x        y           z\n    {   /* f(x, y) */ 1, 2,    1, 2, 3,    0, 0, 0, 0,\n                      1, 2,    1, 2, 3,    0, 0, 0, 0,\n\n        /* g(x, z) */ 2, 4,    0, 0, 0,    2, 4, 6, 8,\n                      2, 4,    0, 0, 0,    2, 4, 6, 8,\n                      2, 4,    0, 0, 0,    2, 4, 6, 8,\n\n        /* h(y, z) */ 0, 0,    3, 6, 9,    3, 6, 9, 12,\n                      0, 0,    3, 6, 9,    3, 6, 9, 12,\n                      0, 0,    3, 6, 9,    3, 6, 9, 12,\n                      0, 0,    3, 6, 9,    3, 6, 9, 12\n    }\n  };\n  CheckAllEvaluationCombinations(expected);\n}\n\nTEST_P(EvaluatorTest, MultipleResidualsWithLocalParameterizations) {\n  // Add the parameters in explicit order to force the ordering in the program.\n  problem.AddParameterBlock(x,  2);\n\n  // Fix y's first dimension.\n  vector<int> y_fixed;\n  y_fixed.push_back(0);\n  problem.AddParameterBlock(y, 3, new SubsetParameterization(3, y_fixed));\n\n  // Fix z's second dimension.\n  vector<int> z_fixed;\n  z_fixed.push_back(1);\n  problem.AddParameterBlock(z, 4, new SubsetParameterization(4, z_fixed));\n\n  // f(x, y) in R^2\n  problem.AddResidualBlock(new ParameterIgnoringCostFunction<1, 2, 2, 3>,\n                           nullptr,\n                           x, y);\n\n  // g(x, z) in R^3\n  problem.AddResidualBlock(new ParameterIgnoringCostFunction<2, 3, 2, 4>,\n                           nullptr,\n                           x, z);\n\n  // h(y, z) in R^4\n  problem.AddResidualBlock(new ParameterIgnoringCostFunction<3, 4, 3, 4>,\n                           nullptr,\n                           y, z);\n\n  ExpectedEvaluation expected = {\n    // Rows/columns\n    9, 7,\n    // Cost\n    // f       g           h\n    (  1 + 4 + 1 + 4 + 9 + 1 + 4 + 9 + 16) / 2.0,\n    // Residuals\n    { 1.0, 2.0,           // f\n      1.0, 2.0, 3.0,      // g\n      1.0, 2.0, 3.0, 4.0  // h\n    },\n    // Gradient\n    { 15.0, 30.0,         // x\n      66.0, 99.0,         // y\n      42.0, 126.0, 168.0  // z\n    },\n    // Jacobian\n    //                x        y           z\n    {   /* f(x, y) */ 1, 2,    2, 3,    0, 0, 0,\n                      1, 2,    2, 3,    0, 0, 0,\n\n        /* g(x, z) */ 2, 4,    0, 0,    2, 6, 8,\n                      2, 4,    0, 0,    2, 6, 8,\n                      2, 4,    0, 0,    2, 6, 8,\n\n        /* h(y, z) */ 0, 0,    6, 9,    3, 9, 12,\n                      0, 0,    6, 9,    3, 9, 12,\n                      0, 0,    6, 9,    3, 9, 12,\n                      0, 0,    6, 9,    3, 9, 12\n    }\n  };\n  CheckAllEvaluationCombinations(expected);\n}\n\nTEST_P(EvaluatorTest, MultipleResidualProblemWithSomeConstantParameters) {\n  // The values are ignored completely by the cost function.\n  double x[2];\n  double y[3];\n  double z[4];\n\n  // Add the parameters in explicit order to force the ordering in the program.\n  problem.AddParameterBlock(x,  2);\n  problem.AddParameterBlock(y,  3);\n  problem.AddParameterBlock(z,  4);\n\n  // f(x, y) in R^2\n problem.AddResidualBlock(new ParameterIgnoringCostFunction<1, 2, 2, 3>,\n                          nullptr,\n                          x, y);\n\n  // g(x, z) in R^3\n problem.AddResidualBlock(new ParameterIgnoringCostFunction<2, 3, 2, 4>,\n                          nullptr,\n                          x, z);\n\n  // h(y, z) in R^4\n  problem.AddResidualBlock(new ParameterIgnoringCostFunction<3, 4, 3, 4>,\n                           nullptr,\n                           y, z);\n\n  // For this test, \"z\" is constant.\n  problem.SetParameterBlockConstant(z);\n\n  // Create the reduced program which is missing the fixed \"z\" variable.\n  // Normally, the preprocessing of the program that happens in solver_impl\n  // takes care of this, but we don't want to invoke the solver here.\n  Program reduced_program;\n  vector<ParameterBlock*>* parameter_blocks =\n      problem.mutable_program()->mutable_parameter_blocks();\n\n  // \"z\" is the last parameter; save it for later and pop it off temporarily.\n  // Note that \"z\" will still get read during evaluation, so it cannot be\n  // deleted at this point.\n  ParameterBlock* parameter_block_z = parameter_blocks->back();\n  parameter_blocks->pop_back();\n\n  ExpectedEvaluation expected = {\n    // Rows/columns\n    9, 5,\n    // Cost\n    // f       g           h\n    (  1 + 4 + 1 + 4 + 9 + 1 + 4 + 9 + 16) / 2.0,\n    // Residuals\n    { 1.0, 2.0,           // f\n      1.0, 2.0, 3.0,      // g\n      1.0, 2.0, 3.0, 4.0  // h\n    },\n    // Gradient\n    { 15.0, 30.0,        // x\n      33.0, 66.0, 99.0,  // y\n    },\n    // Jacobian\n    //                x        y\n    {   /* f(x, y) */ 1, 2,    1, 2, 3,\n                      1, 2,    1, 2, 3,\n\n        /* g(x, z) */ 2, 4,    0, 0, 0,\n                      2, 4,    0, 0, 0,\n                      2, 4,    0, 0, 0,\n\n        /* h(y, z) */ 0, 0,    3, 6, 9,\n                      0, 0,    3, 6, 9,\n                      0, 0,    3, 6, 9,\n                      0, 0,    3, 6, 9\n    }\n  };\n  CheckAllEvaluationCombinations(expected);\n\n  // Restore parameter block z, so it will get freed in a consistent way.\n  parameter_blocks->push_back(parameter_block_z);\n}\n\nTEST_P(EvaluatorTest, EvaluatorAbortsForResidualsThatFailToEvaluate) {\n  // Switch the return value to failure.\n  problem.AddResidualBlock(\n      new ParameterIgnoringCostFunction<20, 3, 2, 3, 4>(false),\n      nullptr,\n      x,\n      y,\n      z);\n\n  // The values are ignored.\n  double state[9];\n\n  std::unique_ptr<Evaluator> evaluator(\n      CreateEvaluator(problem.mutable_program()));\n  std::unique_ptr<SparseMatrix> jacobian(evaluator->CreateJacobian());\n  double cost;\n  EXPECT_FALSE(evaluator->Evaluate(state, &cost, nullptr, nullptr, nullptr));\n}\n\n// In the pairs, the first argument is the linear solver type, and the second\n// argument is num_eliminate_blocks. Changing the num_eliminate_blocks only\n// makes sense for the schur-based solvers.\n//\n// Try all values of num_eliminate_blocks that make sense given that in the\n// tests a maximum of 4 parameter blocks are present.\nINSTANTIATE_TEST_SUITE_P(\n    LinearSolvers,\n    EvaluatorTest,\n    ::testing::Values(EvaluatorTestOptions(DENSE_QR, 0),\n                      EvaluatorTestOptions(DENSE_SCHUR, 0),\n                      EvaluatorTestOptions(DENSE_SCHUR, 1),\n                      EvaluatorTestOptions(DENSE_SCHUR, 2),\n                      EvaluatorTestOptions(DENSE_SCHUR, 3),\n                      EvaluatorTestOptions(DENSE_SCHUR, 4),\n                      EvaluatorTestOptions(SPARSE_SCHUR, 0),\n                      EvaluatorTestOptions(SPARSE_SCHUR, 1),\n                      EvaluatorTestOptions(SPARSE_SCHUR, 2),\n                      EvaluatorTestOptions(SPARSE_SCHUR, 3),\n                      EvaluatorTestOptions(SPARSE_SCHUR, 4),\n                      EvaluatorTestOptions(ITERATIVE_SCHUR, 0),\n                      EvaluatorTestOptions(ITERATIVE_SCHUR, 1),\n                      EvaluatorTestOptions(ITERATIVE_SCHUR, 2),\n                      EvaluatorTestOptions(ITERATIVE_SCHUR, 3),\n                      EvaluatorTestOptions(ITERATIVE_SCHUR, 4),\n                      EvaluatorTestOptions(SPARSE_NORMAL_CHOLESKY, 0, false),\n                      EvaluatorTestOptions(SPARSE_NORMAL_CHOLESKY, 0, true)));\n\n// Simple cost function used to check if the evaluator is sensitive to\n// state changes.\nclass ParameterSensitiveCostFunction : public SizedCostFunction<2, 2> {\n public:\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const final {\n    double x1 = parameters[0][0];\n    double x2 = parameters[0][1];\n    residuals[0] = x1 * x1;\n    residuals[1] = x2 * x2;\n\n    if (jacobians != nullptr) {\n      double* jacobian = jacobians[0];\n      if (jacobian != nullptr) {\n        jacobian[0] = 2.0 * x1;\n        jacobian[1] = 0.0;\n        jacobian[2] = 0.0;\n        jacobian[3] = 2.0 * x2;\n      }\n    }\n    return true;\n  }\n};\n\nTEST(Evaluator, EvaluatorRespectsParameterChanges) {\n  ProblemImpl problem;\n\n  double x[2];\n  x[0] = 1.0;\n  x[1] = 1.0;\n\n  problem.AddResidualBlock(new ParameterSensitiveCostFunction(), nullptr, x);\n  Program* program = problem.mutable_program();\n  program->SetParameterOffsetsAndIndex();\n\n  Evaluator::Options options;\n  options.linear_solver_type = DENSE_QR;\n  options.num_eliminate_blocks = 0;\n  options.context = problem.context();\n  string error;\n  std::unique_ptr<Evaluator> evaluator(\n      Evaluator::Create(options, program, &error));\n  std::unique_ptr<SparseMatrix> jacobian(evaluator->CreateJacobian());\n\n  ASSERT_EQ(2, jacobian->num_rows());\n  ASSERT_EQ(2, jacobian->num_cols());\n\n  double state[2];\n  state[0] = 2.0;\n  state[1] = 3.0;\n\n  // The original state of a residual block comes from the user's\n  // state. So the original state is 1.0, 1.0, and the only way we get\n  // the 2.0, 3.0 results in the following tests is if it respects the\n  // values in the state vector.\n\n  // Cost only; no residuals and no jacobian.\n  {\n    double cost = -1;\n    ASSERT_TRUE(evaluator->Evaluate(state, &cost, nullptr, nullptr, nullptr));\n    EXPECT_EQ(48.5, cost);\n  }\n\n  // Cost and residuals, no jacobian.\n  {\n    double cost = -1;\n    double residuals[2] = {-2, -2};\n    ASSERT_TRUE(evaluator->Evaluate(state, &cost, residuals, nullptr, nullptr));\n    EXPECT_EQ(48.5, cost);\n    EXPECT_EQ(4, residuals[0]);\n    EXPECT_EQ(9, residuals[1]);\n  }\n\n  // Cost, residuals, and jacobian.\n  {\n    double cost = -1;\n    double residuals[2] = {-2, -2};\n    SetSparseMatrixConstant(jacobian.get(), -1);\n    ASSERT_TRUE(\n        evaluator->Evaluate(state, &cost, residuals, nullptr, jacobian.get()));\n    EXPECT_EQ(48.5, cost);\n    EXPECT_EQ(4, residuals[0]);\n    EXPECT_EQ(9, residuals[1]);\n    Matrix actual_jacobian;\n    jacobian->ToDenseMatrix(&actual_jacobian);\n\n    Matrix expected_jacobian(2, 2);\n    expected_jacobian << 2 * state[0], 0, 0, 2 * state[1];\n\n    EXPECT_TRUE((actual_jacobian.array() == expected_jacobian.array()).all())\n        << \"Actual:\\n\"\n        << actual_jacobian << \"\\nExpected:\\n\"\n        << expected_jacobian;\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/evaluator_test_utils.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n//         sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/evaluator_test_utils.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nvoid CompareEvaluations(int expected_num_rows,\n                        int expected_num_cols,\n                        double expected_cost,\n                        const double* expected_residuals,\n                        const double* expected_gradient,\n                        const double* expected_jacobian,\n                        const double actual_cost,\n                        const double* actual_residuals,\n                        const double* actual_gradient,\n                        const double* actual_jacobian) {\n  EXPECT_EQ(expected_cost, actual_cost);\n\n  if (expected_residuals != NULL) {\n    ConstVectorRef expected_residuals_vector(expected_residuals,\n                                             expected_num_rows);\n    ConstVectorRef actual_residuals_vector(actual_residuals,\n                                           expected_num_rows);\n    EXPECT_TRUE((actual_residuals_vector.array() ==\n                 expected_residuals_vector.array()).all())\n        << \"Actual:\\n\" << actual_residuals_vector\n        << \"\\nExpected:\\n\" << expected_residuals_vector;\n  }\n\n  if (expected_gradient != NULL) {\n    ConstVectorRef expected_gradient_vector(expected_gradient,\n                                            expected_num_cols);\n    ConstVectorRef actual_gradient_vector(actual_gradient,\n                                            expected_num_cols);\n\n    EXPECT_TRUE((actual_gradient_vector.array() ==\n                 expected_gradient_vector.array()).all())\n        << \"Actual:\\n\" << actual_gradient_vector.transpose()\n        << \"\\nExpected:\\n\" << expected_gradient_vector.transpose();\n  }\n\n  if (expected_jacobian != NULL) {\n    ConstMatrixRef expected_jacobian_matrix(expected_jacobian,\n                                            expected_num_rows,\n                                            expected_num_cols);\n    ConstMatrixRef actual_jacobian_matrix(actual_jacobian,\n                                          expected_num_rows,\n                                          expected_num_cols);\n    EXPECT_TRUE((actual_jacobian_matrix.array() ==\n                 expected_jacobian_matrix.array()).all())\n        << \"Actual:\\n\" << actual_jacobian_matrix\n        << \"\\nExpected:\\n\" << expected_jacobian_matrix;\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/evaluator_test_utils.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n//         sameeragarwal@google.com (Sameer Agarwal)\n//\n// Test utils used for evaluation testing.\n\nnamespace ceres {\nnamespace internal {\n\n// Fixed sized struct for storing an evaluation.\nstruct ExpectedEvaluation {\n  int num_rows;\n  int num_cols;\n  double cost;\n  const double residuals[50];\n  const double gradient[50];\n  const double jacobian[200];\n};\n\n// Compare two evaluations.\nvoid CompareEvaluations(int expected_num_rows,\n                        int expected_num_cols,\n                        double expected_cost,\n                        const double* expected_residuals,\n                        const double* expected_gradient,\n                        const double* expected_jacobian,\n                        const double actual_cost,\n                        const double* actual_residuals,\n                        const double* actual_gradient,\n                        const double* actual_jacobian);\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/execution_summary.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_EXECUTION_SUMMARY_H_\n#define CERES_INTERNAL_EXECUTION_SUMMARY_H_\n\n#include <map>\n#include <mutex>\n#include <string>\n\n#include \"ceres/internal/port.h\"\n#include \"ceres/wall_time.h\"\n\nnamespace ceres {\nnamespace internal {\n\nstruct CallStatistics {\n  CallStatistics() : time(0.), calls(0) {}\n  double time;\n  int calls;\n};\n\n// Struct used by various objects to report statistics about their\n// execution.\nclass ExecutionSummary {\n public:\n  void IncrementTimeBy(const std::string& name, const double value) {\n    std::lock_guard<std::mutex> l(mutex_);\n    CallStatistics& call_stats = statistics_[name];\n    call_stats.time += value;\n    ++call_stats.calls;\n  }\n\n  const std::map<std::string, CallStatistics>& statistics() const {\n    return statistics_;\n  }\n\n private:\n  std::mutex mutex_;\n  std::map<std::string, CallStatistics> statistics_;\n};\n\nclass ScopedExecutionTimer {\n public:\n  ScopedExecutionTimer(const std::string& name, ExecutionSummary* summary)\n      : start_time_(WallTimeInSeconds()), name_(name), summary_(summary) {}\n\n  ~ScopedExecutionTimer() {\n    summary_->IncrementTimeBy(name_, WallTimeInSeconds() - start_time_);\n  }\n\n private:\n  const double start_time_;\n  const std::string name_;\n  ExecutionSummary* summary_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_EXECUTION_SUMMARY_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/file.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n//\n// Really simple file IO.\n\n#include \"ceres/file.h\"\n\n#include <cstdio>\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::string;\n\nvoid WriteStringToFileOrDie(const string &data, const string &filename) {\n  FILE* file_descriptor = fopen(filename.c_str(), \"wb\");\n  if (!file_descriptor) {\n    LOG(FATAL) << \"Couldn't write to file: \" << filename;\n  }\n  fwrite(data.c_str(), 1, data.size(), file_descriptor);\n  fclose(file_descriptor);\n}\n\nvoid ReadFileToStringOrDie(const string &filename, string *data) {\n  FILE* file_descriptor = fopen(filename.c_str(), \"r\");\n\n  if (!file_descriptor) {\n    LOG(FATAL) << \"Couldn't read file: \" << filename;\n  }\n\n  // Resize the input buffer appropriately.\n  fseek(file_descriptor, 0L, SEEK_END);\n  int num_bytes = ftell(file_descriptor);\n  data->resize(num_bytes);\n\n  // Read the data.\n  fseek(file_descriptor, 0L, SEEK_SET);\n  int num_read = fread(&((*data)[0]),\n                       sizeof((*data)[0]),\n                       num_bytes,\n                       file_descriptor);\n  if (num_read != num_bytes) {\n    LOG(FATAL) << \"Couldn't read all of \" << filename\n               << \"expected bytes: \" << num_bytes * sizeof((*data)[0])\n               << \"actual bytes: \" << num_read;\n  }\n  fclose(file_descriptor);\n}\n\nstring JoinPath(const string& dirname, const string& basename) {\n#ifdef _WIN32\n    static const char separator = '\\\\';\n#else\n    static const char separator = '/';\n#endif  // _WIN32\n\n  if ((!basename.empty() && basename[0] == separator) || dirname.empty()) {\n    return basename;\n  } else if (dirname[dirname.size() - 1] == separator) {\n    return dirname + basename;\n  } else {\n    return dirname + string(&separator, 1) + basename;\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/file.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n//\n// Simple file IO support. This is a portability shim.\n\n#ifndef CERES_INTERNAL_FILE_H_\n#define CERES_INTERNAL_FILE_H_\n\n#include <string>\n#include \"ceres/internal/port.h\"\n\nnamespace ceres {\nnamespace internal {\n\nvoid WriteStringToFileOrDie(const std::string &data,\n                            const std::string &filename);\nvoid ReadFileToStringOrDie(const std::string &filename, std::string *data);\n\n// Join two path components, adding a slash if necessary.  If basename is an\n// absolute path then JoinPath ignores dirname and simply returns basename.\nstd::string JoinPath(const std::string& dirname, const std::string& basename);\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_FILE_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/fixed_array_test.cc",
    "content": "// Copyright 2017 The Abseil Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      https://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include \"ceres/internal/fixed_array.h\"\n\n#include <stdio.h>\n#include <cstring>\n#include <list>\n#include <memory>\n#include <numeric>\n#include <scoped_allocator>\n#include <stdexcept>\n#include <string>\n#include <vector>\n\n#include \"gmock/gmock.h\"\n#include \"gtest/gtest.h\"\n\nusing ::testing::ElementsAreArray;\n\nnamespace {\n\n// CERES_INTERNAL_ARRAYSIZE()\n//\n// Returns the number of elements in an array as a compile-time constant, which\n// can be used in defining new arrays. If you use this macro on a pointer by\n// mistake, you will get a compile-time error.\n#define CERES_INTERNAL_ARRAYSIZE(array) (sizeof(ArraySizeHelper(array)))\n\n// Note: this internal template function declaration is used by\n// CERES_INTERNAL_ARRAYSIZE. The function doesn't need a definition, as we only\n// use its type.\ntemplate <typename T, size_t N>\nauto ArraySizeHelper(const T (&array)[N]) -> char (&)[N];\n\n// Helper routine to determine if a ceres::internal::FixedArray used stack\n// allocation.\ntemplate <typename ArrayType>\nstatic bool IsOnStack(const ArrayType& a) {\n  return a.size() <= ArrayType::inline_elements;\n}\n\nclass ConstructionTester {\n public:\n  ConstructionTester() : self_ptr_(this), value_(0) { constructions++; }\n  ~ConstructionTester() {\n    assert(self_ptr_ == this);\n    self_ptr_ = nullptr;\n    destructions++;\n  }\n\n  // These are incremented as elements are constructed and destructed so we can\n  // be sure all elements are properly cleaned up.\n  static int constructions;\n  static int destructions;\n\n  void CheckConstructed() { assert(self_ptr_ == this); }\n\n  void set(int value) { value_ = value; }\n  int get() { return value_; }\n\n private:\n  // self_ptr_ should always point to 'this' -- that's how we can be sure the\n  // constructor has been called.\n  ConstructionTester* self_ptr_;\n  int value_;\n};\n\nint ConstructionTester::constructions = 0;\nint ConstructionTester::destructions = 0;\n\n// ThreeInts will initialize its three ints to the value stored in\n// ThreeInts::counter. The constructor increments counter so that each object\n// in an array of ThreeInts will have different values.\nclass ThreeInts {\n public:\n  ThreeInts() {\n    x_ = counter;\n    y_ = counter;\n    z_ = counter;\n    ++counter;\n  }\n\n  static int counter;\n\n  int x_, y_, z_;\n};\n\nint ThreeInts::counter = 0;\n\nTEST(FixedArrayTest, CopyCtor) {\n  ceres::internal::FixedArray<int, 10> on_stack(5);\n  std::iota(on_stack.begin(), on_stack.end(), 0);\n  ceres::internal::FixedArray<int, 10> stack_copy = on_stack;\n  EXPECT_THAT(stack_copy, ElementsAreArray(on_stack));\n  EXPECT_TRUE(IsOnStack(stack_copy));\n\n  ceres::internal::FixedArray<int, 10> allocated(15);\n  std::iota(allocated.begin(), allocated.end(), 0);\n  ceres::internal::FixedArray<int, 10> alloced_copy = allocated;\n  EXPECT_THAT(alloced_copy, ElementsAreArray(allocated));\n  EXPECT_FALSE(IsOnStack(alloced_copy));\n}\n\nTEST(FixedArrayTest, MoveCtor) {\n  ceres::internal::FixedArray<std::unique_ptr<int>, 10> on_stack(5);\n  for (int i = 0; i < 5; ++i) {\n    on_stack[i] = std::unique_ptr<int>(new int(i));\n  }\n\n  ceres::internal::FixedArray<std::unique_ptr<int>, 10> stack_copy =\n      std::move(on_stack);\n  for (int i = 0; i < 5; ++i) EXPECT_EQ(*(stack_copy[i]), i);\n  EXPECT_EQ(stack_copy.size(), on_stack.size());\n\n  ceres::internal::FixedArray<std::unique_ptr<int>, 10> allocated(15);\n  for (int i = 0; i < 15; ++i) {\n    allocated[i] = std::unique_ptr<int>(new int(i));\n  }\n\n  ceres::internal::FixedArray<std::unique_ptr<int>, 10> alloced_copy =\n      std::move(allocated);\n  for (int i = 0; i < 15; ++i) EXPECT_EQ(*(alloced_copy[i]), i);\n  EXPECT_EQ(allocated.size(), alloced_copy.size());\n}\n\nTEST(FixedArrayTest, SmallObjects) {\n  // Small object arrays\n  {\n    // Short arrays should be on the stack\n    ceres::internal::FixedArray<int> array(4);\n    EXPECT_TRUE(IsOnStack(array));\n  }\n\n  {\n    // Large arrays should be on the heap\n    ceres::internal::FixedArray<int> array(1048576);\n    EXPECT_FALSE(IsOnStack(array));\n  }\n\n  {\n    // Arrays of <= default size should be on the stack\n    ceres::internal::FixedArray<int, 100> array(100);\n    EXPECT_TRUE(IsOnStack(array));\n  }\n\n  {\n    // Arrays of > default size should be on the heap\n    ceres::internal::FixedArray<int, 100> array(101);\n    EXPECT_FALSE(IsOnStack(array));\n  }\n\n  {\n    // Arrays with different size elements should use approximately\n    // same amount of stack space\n    ceres::internal::FixedArray<int> array1(0);\n    ceres::internal::FixedArray<char> array2(0);\n    EXPECT_LE(sizeof(array1), sizeof(array2) + 100);\n    EXPECT_LE(sizeof(array2), sizeof(array1) + 100);\n  }\n\n  {\n    // Ensure that vectors are properly constructed inside a fixed array.\n    ceres::internal::FixedArray<std::vector<int>> array(2);\n    EXPECT_EQ(0, array[0].size());\n    EXPECT_EQ(0, array[1].size());\n  }\n\n  {\n    // Regardless of ceres::internal::FixedArray implementation, check that a\n    // type with a low alignment requirement and a non power-of-two size is\n    // initialized correctly.\n    ThreeInts::counter = 1;\n    ceres::internal::FixedArray<ThreeInts> array(2);\n    EXPECT_EQ(1, array[0].x_);\n    EXPECT_EQ(1, array[0].y_);\n    EXPECT_EQ(1, array[0].z_);\n    EXPECT_EQ(2, array[1].x_);\n    EXPECT_EQ(2, array[1].y_);\n    EXPECT_EQ(2, array[1].z_);\n  }\n}\n\nTEST(FixedArrayRelationalsTest, EqualArrays) {\n  for (int i = 0; i < 10; ++i) {\n    ceres::internal::FixedArray<int, 5> a1(i);\n    std::iota(a1.begin(), a1.end(), 0);\n    ceres::internal::FixedArray<int, 5> a2(a1.begin(), a1.end());\n\n    EXPECT_TRUE(a1 == a2);\n    EXPECT_FALSE(a1 != a2);\n    EXPECT_TRUE(a2 == a1);\n    EXPECT_FALSE(a2 != a1);\n    EXPECT_FALSE(a1 < a2);\n    EXPECT_FALSE(a1 > a2);\n    EXPECT_FALSE(a2 < a1);\n    EXPECT_FALSE(a2 > a1);\n    EXPECT_TRUE(a1 <= a2);\n    EXPECT_TRUE(a1 >= a2);\n    EXPECT_TRUE(a2 <= a1);\n    EXPECT_TRUE(a2 >= a1);\n  }\n}\n\nTEST(FixedArrayRelationalsTest, UnequalArrays) {\n  for (int i = 1; i < 10; ++i) {\n    ceres::internal::FixedArray<int, 5> a1(i);\n    std::iota(a1.begin(), a1.end(), 0);\n    ceres::internal::FixedArray<int, 5> a2(a1.begin(), a1.end());\n    --a2[i / 2];\n\n    EXPECT_FALSE(a1 == a2);\n    EXPECT_TRUE(a1 != a2);\n    EXPECT_FALSE(a2 == a1);\n    EXPECT_TRUE(a2 != a1);\n    EXPECT_FALSE(a1 < a2);\n    EXPECT_TRUE(a1 > a2);\n    EXPECT_TRUE(a2 < a1);\n    EXPECT_FALSE(a2 > a1);\n    EXPECT_FALSE(a1 <= a2);\n    EXPECT_TRUE(a1 >= a2);\n    EXPECT_TRUE(a2 <= a1);\n    EXPECT_FALSE(a2 >= a1);\n  }\n}\n\ntemplate <int stack_elements>\nstatic void TestArray(int n) {\n  SCOPED_TRACE(n);\n  SCOPED_TRACE(stack_elements);\n  ConstructionTester::constructions = 0;\n  ConstructionTester::destructions = 0;\n  {\n    ceres::internal::FixedArray<ConstructionTester, stack_elements> array(n);\n\n    EXPECT_THAT(array.size(), n);\n    EXPECT_THAT(array.memsize(), sizeof(ConstructionTester) * n);\n    EXPECT_THAT(array.begin() + n, array.end());\n\n    // Check that all elements were constructed\n    for (int i = 0; i < n; i++) {\n      array[i].CheckConstructed();\n    }\n    // Check that no other elements were constructed\n    EXPECT_THAT(ConstructionTester::constructions, n);\n\n    // Test operator[]\n    for (int i = 0; i < n; i++) {\n      array[i].set(i);\n    }\n    for (int i = 0; i < n; i++) {\n      EXPECT_THAT(array[i].get(), i);\n      EXPECT_THAT(array.data()[i].get(), i);\n    }\n\n    // Test data()\n    for (int i = 0; i < n; i++) {\n      array.data()[i].set(i + 1);\n    }\n    for (int i = 0; i < n; i++) {\n      EXPECT_THAT(array[i].get(), i + 1);\n      EXPECT_THAT(array.data()[i].get(), i + 1);\n    }\n  }  // Close scope containing 'array'.\n\n  // Check that all constructed elements were destructed.\n  EXPECT_EQ(ConstructionTester::constructions,\n            ConstructionTester::destructions);\n}\n\ntemplate <int elements_per_inner_array, int inline_elements>\nstatic void TestArrayOfArrays(int n) {\n  SCOPED_TRACE(n);\n  SCOPED_TRACE(inline_elements);\n  SCOPED_TRACE(elements_per_inner_array);\n  ConstructionTester::constructions = 0;\n  ConstructionTester::destructions = 0;\n  {\n    using InnerArray = ConstructionTester[elements_per_inner_array];\n    // Heap-allocate the FixedArray to avoid blowing the stack frame.\n    auto array_ptr = std::unique_ptr<\n        ceres::internal::FixedArray<InnerArray, inline_elements>>(\n        new ceres::internal::FixedArray<InnerArray, inline_elements>(n));\n    auto& array = *array_ptr;\n\n    ASSERT_EQ(array.size(), n);\n    ASSERT_EQ(array.memsize(),\n              sizeof(ConstructionTester) * elements_per_inner_array * n);\n    ASSERT_EQ(array.begin() + n, array.end());\n\n    // Check that all elements were constructed\n    for (int i = 0; i < n; i++) {\n      for (int j = 0; j < elements_per_inner_array; j++) {\n        (array[i])[j].CheckConstructed();\n      }\n    }\n    // Check that no other elements were constructed\n    ASSERT_EQ(ConstructionTester::constructions, n * elements_per_inner_array);\n\n    // Test operator[]\n    for (int i = 0; i < n; i++) {\n      for (int j = 0; j < elements_per_inner_array; j++) {\n        (array[i])[j].set(i * elements_per_inner_array + j);\n      }\n    }\n    for (int i = 0; i < n; i++) {\n      for (int j = 0; j < elements_per_inner_array; j++) {\n        ASSERT_EQ((array[i])[j].get(), i * elements_per_inner_array + j);\n        ASSERT_EQ((array.data()[i])[j].get(), i * elements_per_inner_array + j);\n      }\n    }\n\n    // Test data()\n    for (int i = 0; i < n; i++) {\n      for (int j = 0; j < elements_per_inner_array; j++) {\n        (array.data()[i])[j].set((i + 1) * elements_per_inner_array + j);\n      }\n    }\n    for (int i = 0; i < n; i++) {\n      for (int j = 0; j < elements_per_inner_array; j++) {\n        ASSERT_EQ((array[i])[j].get(), (i + 1) * elements_per_inner_array + j);\n        ASSERT_EQ((array.data()[i])[j].get(),\n                  (i + 1) * elements_per_inner_array + j);\n      }\n    }\n  }  // Close scope containing 'array'.\n\n  // Check that all constructed elements were destructed.\n  EXPECT_EQ(ConstructionTester::constructions,\n            ConstructionTester::destructions);\n}\n\nTEST(IteratorConstructorTest, NonInline) {\n  int const kInput[] = {2, 3, 5, 7, 11, 13, 17};\n  ceres::internal::FixedArray<int, CERES_INTERNAL_ARRAYSIZE(kInput) - 1> const\n      fixed(kInput, kInput + CERES_INTERNAL_ARRAYSIZE(kInput));\n  ASSERT_EQ(CERES_INTERNAL_ARRAYSIZE(kInput), fixed.size());\n  for (size_t i = 0; i < CERES_INTERNAL_ARRAYSIZE(kInput); ++i) {\n    ASSERT_EQ(kInput[i], fixed[i]);\n  }\n}\n\nTEST(IteratorConstructorTest, Inline) {\n  int const kInput[] = {2, 3, 5, 7, 11, 13, 17};\n  ceres::internal::FixedArray<int, CERES_INTERNAL_ARRAYSIZE(kInput)> const\n      fixed(kInput, kInput + CERES_INTERNAL_ARRAYSIZE(kInput));\n  ASSERT_EQ(CERES_INTERNAL_ARRAYSIZE(kInput), fixed.size());\n  for (size_t i = 0; i < CERES_INTERNAL_ARRAYSIZE(kInput); ++i) {\n    ASSERT_EQ(kInput[i], fixed[i]);\n  }\n}\n\nTEST(IteratorConstructorTest, NonPod) {\n  char const* kInput[] = {\n      \"red\", \"orange\", \"yellow\", \"green\", \"blue\", \"indigo\", \"violet\"};\n  ceres::internal::FixedArray<std::string> const fixed(\n      kInput, kInput + CERES_INTERNAL_ARRAYSIZE(kInput));\n  ASSERT_EQ(CERES_INTERNAL_ARRAYSIZE(kInput), fixed.size());\n  for (size_t i = 0; i < CERES_INTERNAL_ARRAYSIZE(kInput); ++i) {\n    ASSERT_EQ(kInput[i], fixed[i]);\n  }\n}\n\nTEST(IteratorConstructorTest, FromEmptyVector) {\n  std::vector<int> const empty;\n  ceres::internal::FixedArray<int> const fixed(empty.begin(), empty.end());\n  EXPECT_EQ(0, fixed.size());\n  EXPECT_EQ(empty.size(), fixed.size());\n}\n\nTEST(IteratorConstructorTest, FromNonEmptyVector) {\n  int const kInput[] = {2, 3, 5, 7, 11, 13, 17};\n  std::vector<int> const items(kInput,\n                               kInput + CERES_INTERNAL_ARRAYSIZE(kInput));\n  ceres::internal::FixedArray<int> const fixed(items.begin(), items.end());\n  ASSERT_EQ(items.size(), fixed.size());\n  for (size_t i = 0; i < items.size(); ++i) {\n    ASSERT_EQ(items[i], fixed[i]);\n  }\n}\n\nTEST(IteratorConstructorTest, FromBidirectionalIteratorRange) {\n  int const kInput[] = {2, 3, 5, 7, 11, 13, 17};\n  std::list<int> const items(kInput, kInput + CERES_INTERNAL_ARRAYSIZE(kInput));\n  ceres::internal::FixedArray<int> const fixed(items.begin(), items.end());\n  EXPECT_THAT(fixed, testing::ElementsAreArray(kInput));\n}\n\nTEST(InitListConstructorTest, InitListConstruction) {\n  ceres::internal::FixedArray<int> fixed = {1, 2, 3};\n  EXPECT_THAT(fixed, testing::ElementsAreArray({1, 2, 3}));\n}\n\nTEST(FillConstructorTest, NonEmptyArrays) {\n  ceres::internal::FixedArray<int> stack_array(4, 1);\n  EXPECT_THAT(stack_array, testing::ElementsAreArray({1, 1, 1, 1}));\n\n  ceres::internal::FixedArray<int, 0> heap_array(4, 1);\n  EXPECT_THAT(stack_array, testing::ElementsAreArray({1, 1, 1, 1}));\n}\n\nTEST(FillConstructorTest, EmptyArray) {\n  ceres::internal::FixedArray<int> empty_fill(0, 1);\n  ceres::internal::FixedArray<int> empty_size(0);\n  EXPECT_EQ(empty_fill, empty_size);\n}\n\nTEST(FillConstructorTest, NotTriviallyCopyable) {\n  std::string str = \"abcd\";\n  ceres::internal::FixedArray<std::string> strings = {str, str, str, str};\n\n  ceres::internal::FixedArray<std::string> array(4, str);\n  EXPECT_EQ(array, strings);\n}\n\nTEST(FillConstructorTest, Disambiguation) {\n  ceres::internal::FixedArray<size_t> a(1, 2);\n  EXPECT_THAT(a, testing::ElementsAre(2));\n}\n\nTEST(FixedArrayTest, ManySizedArrays) {\n  std::vector<int> sizes;\n  for (int i = 1; i < 100; i++) sizes.push_back(i);\n  for (int i = 100; i <= 1000; i += 100) sizes.push_back(i);\n  for (int n : sizes) {\n    TestArray<0>(n);\n    TestArray<1>(n);\n    TestArray<64>(n);\n    TestArray<1000>(n);\n  }\n}\n\nTEST(FixedArrayTest, ManySizedArraysOfArraysOf1) {\n  for (int n = 1; n < 1000; n++) {\n    ASSERT_NO_FATAL_FAILURE((TestArrayOfArrays<1, 0>(n)));\n    ASSERT_NO_FATAL_FAILURE((TestArrayOfArrays<1, 1>(n)));\n    ASSERT_NO_FATAL_FAILURE((TestArrayOfArrays<1, 64>(n)));\n    ASSERT_NO_FATAL_FAILURE((TestArrayOfArrays<1, 1000>(n)));\n  }\n}\n\nTEST(FixedArrayTest, ManySizedArraysOfArraysOf2) {\n  for (int n = 1; n < 1000; n++) {\n    TestArrayOfArrays<2, 0>(n);\n    TestArrayOfArrays<2, 1>(n);\n    TestArrayOfArrays<2, 64>(n);\n    TestArrayOfArrays<2, 1000>(n);\n  }\n}\n\n// If value_type is put inside of a struct container,\n// we might evoke this error in a hardened build unless data() is carefully\n// written, so check on that.\n//     error: call to int __builtin___sprintf_chk(etc...)\n//     will always overflow destination buffer [-Werror]\nTEST(FixedArrayTest, AvoidParanoidDiagnostics) {\n  ceres::internal::FixedArray<char, 32> buf(32);\n  sprintf(buf.data(), \"foo\");  // NOLINT(runtime/printf)\n}\n\nTEST(FixedArrayTest, TooBigInlinedSpace) {\n  struct TooBig {\n    char c[1 << 20];\n  };  // too big for even one on the stack\n\n  // Simulate the data members of ceres::internal::FixedArray, a pointer and a\n  // size_t.\n  struct Data {\n    std::tuple<size_t, std::allocator<double>> size_alloc_;\n    TooBig* p;\n  };\n\n  // Make sure TooBig objects are not inlined for 0 or default size.\n  static_assert(\n      sizeof(ceres::internal::FixedArray<TooBig, 0>) == sizeof(Data),\n      \"0-sized ceres::internal::FixedArray should have same size as Data.\");\n  static_assert(\n      alignof(ceres::internal::FixedArray<TooBig, 0>) == alignof(Data),\n      \"0-sized ceres::internal::FixedArray should have same alignment as \"\n      \"Data.\");\n  static_assert(sizeof(ceres::internal::FixedArray<TooBig>) == sizeof(Data),\n                \"default-sized ceres::internal::FixedArray should have same \"\n                \"size as Data\");\n  static_assert(alignof(ceres::internal::FixedArray<TooBig>) == alignof(Data),\n                \"default-sized ceres::internal::FixedArray should have same \"\n                \"alignment as Data.\");\n}\n\n// PickyDelete EXPECTs its class-scope deallocation funcs are unused.\nstruct PickyDelete {\n  PickyDelete() {}\n  ~PickyDelete() {}\n  void operator delete(void* p) {\n    EXPECT_TRUE(false) << __FUNCTION__;\n    ::operator delete(p);\n  }\n  void operator delete[](void* p) {\n    EXPECT_TRUE(false) << __FUNCTION__;\n    ::operator delete[](p);\n  }\n};\n\nTEST(FixedArrayTest, UsesGlobalAlloc) {\n  ceres::internal::FixedArray<PickyDelete, 0> a(5);\n}\n\nTEST(FixedArrayTest, Data) {\n  static const int kInput[] = {2, 3, 5, 7, 11, 13, 17};\n  ceres::internal::FixedArray<int> fa(std::begin(kInput), std::end(kInput));\n  EXPECT_EQ(fa.data(), &*fa.begin());\n  EXPECT_EQ(fa.data(), &fa[0]);\n\n  const ceres::internal::FixedArray<int>& cfa = fa;\n  EXPECT_EQ(cfa.data(), &*cfa.begin());\n  EXPECT_EQ(cfa.data(), &cfa[0]);\n}\n\nTEST(FixedArrayTest, Empty) {\n  ceres::internal::FixedArray<int> empty(0);\n  ceres::internal::FixedArray<int> inline_filled(1);\n  ceres::internal::FixedArray<int, 0> heap_filled(1);\n  EXPECT_TRUE(empty.empty());\n  EXPECT_FALSE(inline_filled.empty());\n  EXPECT_FALSE(heap_filled.empty());\n}\n\nTEST(FixedArrayTest, FrontAndBack) {\n  ceres::internal::FixedArray<int, 3 * sizeof(int)> inlined = {1, 2, 3};\n  EXPECT_EQ(inlined.front(), 1);\n  EXPECT_EQ(inlined.back(), 3);\n\n  ceres::internal::FixedArray<int, 0> allocated = {1, 2, 3};\n  EXPECT_EQ(allocated.front(), 1);\n  EXPECT_EQ(allocated.back(), 3);\n\n  ceres::internal::FixedArray<int> one_element = {1};\n  EXPECT_EQ(one_element.front(), one_element.back());\n}\n\nTEST(FixedArrayTest, ReverseIteratorInlined) {\n  ceres::internal::FixedArray<int, 5 * sizeof(int)> a = {0, 1, 2, 3, 4};\n\n  int counter = 5;\n  for (ceres::internal::FixedArray<int>::reverse_iterator iter = a.rbegin();\n       iter != a.rend();\n       ++iter) {\n    counter--;\n    EXPECT_EQ(counter, *iter);\n  }\n  EXPECT_EQ(counter, 0);\n\n  counter = 5;\n  for (ceres::internal::FixedArray<int>::const_reverse_iterator iter =\n           a.rbegin();\n       iter != a.rend();\n       ++iter) {\n    counter--;\n    EXPECT_EQ(counter, *iter);\n  }\n  EXPECT_EQ(counter, 0);\n\n  counter = 5;\n  for (auto iter = a.crbegin(); iter != a.crend(); ++iter) {\n    counter--;\n    EXPECT_EQ(counter, *iter);\n  }\n  EXPECT_EQ(counter, 0);\n}\n\nTEST(FixedArrayTest, ReverseIteratorAllocated) {\n  ceres::internal::FixedArray<int, 0> a = {0, 1, 2, 3, 4};\n\n  int counter = 5;\n  for (ceres::internal::FixedArray<int>::reverse_iterator iter = a.rbegin();\n       iter != a.rend();\n       ++iter) {\n    counter--;\n    EXPECT_EQ(counter, *iter);\n  }\n  EXPECT_EQ(counter, 0);\n\n  counter = 5;\n  for (ceres::internal::FixedArray<int>::const_reverse_iterator iter =\n           a.rbegin();\n       iter != a.rend();\n       ++iter) {\n    counter--;\n    EXPECT_EQ(counter, *iter);\n  }\n  EXPECT_EQ(counter, 0);\n\n  counter = 5;\n  for (auto iter = a.crbegin(); iter != a.crend(); ++iter) {\n    counter--;\n    EXPECT_EQ(counter, *iter);\n  }\n  EXPECT_EQ(counter, 0);\n}\n\nTEST(FixedArrayTest, Fill) {\n  ceres::internal::FixedArray<int, 5 * sizeof(int)> inlined(5);\n  int fill_val = 42;\n  inlined.fill(fill_val);\n  for (int i : inlined) EXPECT_EQ(i, fill_val);\n\n  ceres::internal::FixedArray<int, 0> allocated(5);\n  allocated.fill(fill_val);\n  for (int i : allocated) EXPECT_EQ(i, fill_val);\n\n  // It doesn't do anything, just make sure this compiles.\n  ceres::internal::FixedArray<int> empty(0);\n  empty.fill(fill_val);\n}\n\n// TODO(johnsoncj): Investigate InlinedStorage default initialization in GCC 4.x\n#ifndef __GNUC__\nTEST(FixedArrayTest, DefaultCtorDoesNotValueInit) {\n  using T = char;\n  constexpr auto capacity = 10;\n  using FixedArrType = ceres::internal::FixedArray<T, capacity>;\n  using FixedArrBuffType =\n      typename std::aligned_storage<sizeof(FixedArrType),\n                                    alignof(FixedArrType)>::type;\n  constexpr auto scrubbed_bits = 0x95;\n  constexpr auto length = capacity / 2;\n\n  FixedArrBuffType buff;\n  std::memset(std::addressof(buff), scrubbed_bits, sizeof(FixedArrBuffType));\n\n  FixedArrType* arr =\n      ::new (static_cast<void*>(std::addressof(buff))) FixedArrType(length);\n  EXPECT_THAT(*arr, testing::Each(scrubbed_bits));\n  arr->~FixedArrType();\n}\n#endif  // __GNUC__\n\n// This is a stateful allocator, but the state lives outside of the\n// allocator (in whatever test is using the allocator). This is odd\n// but helps in tests where the allocator is propagated into nested\n// containers - that chain of allocators uses the same state and is\n// thus easier to query for aggregate allocation information.\ntemplate <typename T>\nclass CountingAllocator : public std::allocator<T> {\n public:\n  using Alloc = std::allocator<T>;\n  using pointer = typename Alloc::pointer;\n  using size_type = typename Alloc::size_type;\n\n  CountingAllocator() : bytes_used_(nullptr), instance_count_(nullptr) {}\n  explicit CountingAllocator(int64_t* b)\n      : bytes_used_(b), instance_count_(nullptr) {}\n  CountingAllocator(int64_t* b, int64_t* a)\n      : bytes_used_(b), instance_count_(a) {}\n\n  template <typename U>\n  explicit CountingAllocator(const CountingAllocator<U>& x)\n      : Alloc(x),\n        bytes_used_(x.bytes_used_),\n        instance_count_(x.instance_count_) {}\n\n  pointer allocate(size_type n, const void* const hint = nullptr) {\n    assert(bytes_used_ != nullptr);\n    *bytes_used_ += n * sizeof(T);\n    return Alloc::allocate(n, hint);\n  }\n\n  void deallocate(pointer p, size_type n) {\n    Alloc::deallocate(p, n);\n    assert(bytes_used_ != nullptr);\n    *bytes_used_ -= n * sizeof(T);\n  }\n\n  template <typename... Args>\n  void construct(pointer p, Args&&... args) {\n    Alloc::construct(p, std::forward<Args>(args)...);\n    if (instance_count_) {\n      *instance_count_ += 1;\n    }\n  }\n\n  void destroy(pointer p) {\n    Alloc::destroy(p);\n    if (instance_count_) {\n      *instance_count_ -= 1;\n    }\n  }\n\n  template <typename U>\n  class rebind {\n   public:\n    using other = CountingAllocator<U>;\n  };\n\n  int64_t* bytes_used_;\n  int64_t* instance_count_;\n};\n\nTEST(AllocatorSupportTest, CountInlineAllocations) {\n  constexpr size_t inlined_size = 4;\n  using Alloc = CountingAllocator<int>;\n  using AllocFxdArr = ceres::internal::FixedArray<int, inlined_size, Alloc>;\n\n  int64_t allocated = 0;\n  int64_t active_instances = 0;\n\n  {\n    const int ia[] = {0, 1, 2, 3, 4, 5, 6, 7};\n\n    Alloc alloc(&allocated, &active_instances);\n\n    AllocFxdArr arr(ia, ia + inlined_size, alloc);\n    static_cast<void>(arr);\n  }\n\n  EXPECT_EQ(allocated, 0);\n  EXPECT_EQ(active_instances, 0);\n}\n\nTEST(AllocatorSupportTest, CountOutoflineAllocations) {\n  constexpr size_t inlined_size = 4;\n  using Alloc = CountingAllocator<int>;\n  using AllocFxdArr = ceres::internal::FixedArray<int, inlined_size, Alloc>;\n\n  int64_t allocated = 0;\n  int64_t active_instances = 0;\n\n  {\n    const int ia[] = {0, 1, 2, 3, 4, 5, 6, 7};\n    Alloc alloc(&allocated, &active_instances);\n\n    AllocFxdArr arr(ia, ia + CERES_INTERNAL_ARRAYSIZE(ia), alloc);\n\n    EXPECT_EQ(allocated, arr.size() * sizeof(int));\n    static_cast<void>(arr);\n  }\n\n  EXPECT_EQ(active_instances, 0);\n}\n\nTEST(AllocatorSupportTest, CountCopyInlineAllocations) {\n  constexpr size_t inlined_size = 4;\n  using Alloc = CountingAllocator<int>;\n  using AllocFxdArr = ceres::internal::FixedArray<int, inlined_size, Alloc>;\n\n  int64_t allocated1 = 0;\n  int64_t allocated2 = 0;\n  int64_t active_instances = 0;\n  Alloc alloc(&allocated1, &active_instances);\n  Alloc alloc2(&allocated2, &active_instances);\n\n  {\n    int initial_value = 1;\n\n    AllocFxdArr arr1(inlined_size / 2, initial_value, alloc);\n\n    EXPECT_EQ(allocated1, 0);\n\n    AllocFxdArr arr2(arr1, alloc2);\n\n    EXPECT_EQ(allocated2, 0);\n    static_cast<void>(arr1);\n    static_cast<void>(arr2);\n  }\n\n  EXPECT_EQ(active_instances, 0);\n}\n\nTEST(AllocatorSupportTest, CountCopyOutoflineAllocations) {\n  constexpr size_t inlined_size = 4;\n  using Alloc = CountingAllocator<int>;\n  using AllocFxdArr = ceres::internal::FixedArray<int, inlined_size, Alloc>;\n\n  int64_t allocated1 = 0;\n  int64_t allocated2 = 0;\n  int64_t active_instances = 0;\n  Alloc alloc(&allocated1, &active_instances);\n  Alloc alloc2(&allocated2, &active_instances);\n\n  {\n    int initial_value = 1;\n\n    AllocFxdArr arr1(inlined_size * 2, initial_value, alloc);\n\n    EXPECT_EQ(allocated1, arr1.size() * sizeof(int));\n\n    AllocFxdArr arr2(arr1, alloc2);\n\n    EXPECT_EQ(allocated2, inlined_size * 2 * sizeof(int));\n    static_cast<void>(arr1);\n    static_cast<void>(arr2);\n  }\n\n  EXPECT_EQ(active_instances, 0);\n}\n\nTEST(AllocatorSupportTest, SizeValAllocConstructor) {\n  using testing::AllOf;\n  using testing::Each;\n  using testing::SizeIs;\n\n  constexpr size_t inlined_size = 4;\n  using Alloc = CountingAllocator<int>;\n  using AllocFxdArr = ceres::internal::FixedArray<int, inlined_size, Alloc>;\n\n  {\n    auto len = inlined_size / 2;\n    auto val = 0;\n    int64_t allocated = 0;\n    AllocFxdArr arr(len, val, Alloc(&allocated));\n\n    EXPECT_EQ(allocated, 0);\n    EXPECT_THAT(arr, AllOf(SizeIs(len), Each(0)));\n  }\n\n  {\n    auto len = inlined_size * 2;\n    auto val = 0;\n    int64_t allocated = 0;\n    AllocFxdArr arr(len, val, Alloc(&allocated));\n\n    EXPECT_EQ(allocated, len * sizeof(int));\n    EXPECT_THAT(arr, AllOf(SizeIs(len), Each(0)));\n  }\n}\n\nstruct EigenStruct {\n  Eigen::Vector4d data;\n};\n\nstatic_assert(\n    std::is_same<ceres::internal::FixedArrayDefaultAllocator<double>,\n                 std::allocator<double>>::value,\n    \"Double is a trivial type, so std::allocator should be used here.\");\nstatic_assert(\n    std::is_same<ceres::internal::FixedArrayDefaultAllocator<double*>,\n                 std::allocator<double*>>::value,\n    \"A pointer is a trivial type, so std::allocator should be used here.\");\nstatic_assert(\n    std::is_same<ceres::internal::FixedArrayDefaultAllocator<Eigen::Matrix4d>,\n                 Eigen::aligned_allocator<Eigen::Matrix4d>>::value,\n    \"An Eigen::Matrix4d needs the Eigen::aligned_allocator for proper \"\n    \"alignment.\");\nstatic_assert(\n    std::is_same<ceres::internal::FixedArrayDefaultAllocator<EigenStruct>,\n                 Eigen::aligned_allocator<EigenStruct>>::value,\n    \"A struct containing fixed size Eigen types needs Eigen::aligned_allocator \"\n    \"for proper alignment.\");\n\n}  // namespace\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/float_cxsparse.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/float_cxsparse.h\"\n\n#if !defined(CERES_NO_CXSPARSE)\n\nnamespace ceres {\nnamespace internal {\n\nstd::unique_ptr<SparseCholesky> FloatCXSparseCholesky::Create(\n    OrderingType ordering_type) {\n  LOG(FATAL) << \"FloatCXSparseCholesky is not available.\";\n  return std::unique_ptr<SparseCholesky>();\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // !defined(CERES_NO_CXSPARSE)\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/float_cxsparse.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_FLOAT_CXSPARSE_H_\n#define CERES_INTERNAL_FLOAT_CXSPARSE_H_\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#if !defined(CERES_NO_CXSPARSE)\n\n#include <memory>\n#include \"ceres/sparse_cholesky.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// Fake implementation of a single precision Sparse Cholesky using\n// CXSparse.\nclass FloatCXSparseCholesky : public SparseCholesky {\n public:\n  static std::unique_ptr<SparseCholesky> Create(\n      OrderingType ordering_type);\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // !defined(CERES_NO_CXSPARSE)\n\n#endif  // CERES_INTERNAL_FLOAT_CXSPARSE_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/float_suitesparse.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/float_suitesparse.h\"\n\n#if !defined(CERES_NO_SUITESPARSE)\n\nnamespace ceres {\nnamespace internal {\n\nstd::unique_ptr<SparseCholesky> FloatSuiteSparseCholesky::Create(\n    OrderingType ordering_type) {\n  LOG(FATAL) << \"FloatSuiteSparseCholesky is not available.\";\n  return std::unique_ptr<SparseCholesky>();\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // !defined(CERES_NO_SUITESPARSE)\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/float_suitesparse.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_FLOAT_SUITESPARSE_H_\n#define CERES_INTERNAL_FLOAT_SUITESPARSE_H_\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#include <memory>\n#include \"ceres/sparse_cholesky.h\"\n\n#if !defined(CERES_NO_SUITESPARSE)\n\nnamespace ceres {\nnamespace internal {\n\n// Fake implementation of a single precision Sparse Cholesky using\n// SuiteSparse.\nclass FloatSuiteSparseCholesky : public SparseCholesky {\n public:\n  static std::unique_ptr<SparseCholesky> Create(\n      OrderingType ordering_type);\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // !defined(CERES_NO_SUITESPARSE)\n\n#endif  // CERES_INTERNAL_FLOAT_SUITESPARSE_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/function_sample.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/function_sample.h\"\n#include \"ceres/stringprintf.h\"\n\nnamespace ceres {\nnamespace internal {\n\nFunctionSample::FunctionSample()\n    : x(0.0),\n      vector_x_is_valid(false),\n      value(0.0),\n      value_is_valid(false),\n      vector_gradient_is_valid(false),\n      gradient(0.0),\n      gradient_is_valid(false) {}\n\nFunctionSample::FunctionSample(const double x, const double value)\n    : x(x),\n      vector_x_is_valid(false),\n      value(value),\n      value_is_valid(true),\n      vector_gradient_is_valid(false),\n      gradient(0.0),\n      gradient_is_valid(false) {}\n\nFunctionSample::FunctionSample(const double x,\n                               const double value,\n                               const double gradient)\n    : x(x),\n      vector_x_is_valid(false),\n      value(value),\n      value_is_valid(true),\n      vector_gradient_is_valid(false),\n      gradient(gradient),\n      gradient_is_valid(true) {}\n\nstd::string FunctionSample::ToDebugString() const {\n  return StringPrintf(\"[x: %.8e, value: %.8e, gradient: %.8e, \"\n                      \"value_is_valid: %d, gradient_is_valid: %d]\",\n                      x, value, gradient, value_is_valid, gradient_is_valid);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/function_sample.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_FUNCTION_SAMPLE_H_\n#define CERES_INTERNAL_FUNCTION_SAMPLE_H_\n\n#include <string>\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// FunctionSample is used by the line search routines to store and\n// communicate the value and (optionally) the gradient of the function\n// being minimized.\n//\n// Since line search as the name implies happens along a certain\n// line/direction. FunctionSample contains the information in two\n// ways. Information in the ambient space and information along the\n// direction of search.\nstruct FunctionSample {\n  FunctionSample();\n  FunctionSample(double x, double value);\n  FunctionSample(double x, double value, double gradient);\n\n  std::string ToDebugString() const;\n\n  // x is the location of the sample along the search direction.\n  double x;\n\n  // Let p be a point and d be the search direction then\n  //\n  // vector_x = p + x * d;\n  Vector vector_x;\n  // True if vector_x has been assigned a valid value.\n  bool vector_x_is_valid;\n\n  // value = f(vector_x)\n  double value;\n  // True of the evaluation was successful and value is a finite\n  // number.\n  bool value_is_valid;\n\n  // vector_gradient = Df(vector_position);\n  //\n  // D is the derivative operator.\n  Vector vector_gradient;\n  // True if the vector gradient was evaluated and the evaluation was\n  // successful (the value is a finite number).\n  bool vector_gradient_is_valid;\n\n  // gradient = d.transpose() * vector_gradient\n  //\n  // where d is the search direction.\n  double gradient;\n  // True if the evaluation of the gradient was sucessful and the\n  // value is a finite number.\n  bool gradient_is_valid;\n};\n\n\n\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_FUNCTION_SAMPLE_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generate_bundle_adjustment_tests.py",
    "content": "# Ceres Solver - A fast non-linear least squares minimizer\n# Copyright 2018 Google Inc. All rights reserved.\n# http://ceres-solver.org/\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice,\n#   this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright notice,\n#   this list of conditions and the following disclaimer in the documentation\n#   and/or other materials provided with the distribution.\n# * Neither the name of Google Inc. nor the names of its contributors may be\n#   used to endorse or promote products derived from this software without\n#   specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n#\n# Author: keir@google.com (Keir Mierle)\n#\n# Generate bundle adjustment tests as separate binaries. Since the bundle\n# adjustment tests are fairly processing intensive, serializing them makes the\n# tests take forever to run. Splitting them into separate binaries makes it\n# easier to parallelize in continuous integration systems, and makes local\n# processing on multi-core workstations much faster.\n\n# Product of ORDERINGS, THREAD_CONFIGS, and SOLVER_CONFIGS is the full set of\n# tests to generate.\nORDERINGS = [\"kAutomaticOrdering\", \"kUserOrdering\"]\nSINGLE_THREADED = \"1\"\nMULTI_THREADED = \"4\"\nTHREAD_CONFIGS = [SINGLE_THREADED, MULTI_THREADED]\n\nSOLVER_CONFIGS = [\n  # Linear solver            Sparse backend      Preconditioner\n  ('DENSE_SCHUR',            'NO_SPARSE',        'IDENTITY'),\n  ('ITERATIVE_SCHUR',        'NO_SPARSE',        'JACOBI'),\n  ('ITERATIVE_SCHUR',        'NO_SPARSE',        'SCHUR_JACOBI'),\n  ('ITERATIVE_SCHUR',        'SUITE_SPARSE',     'CLUSTER_JACOBI'),\n  ('ITERATIVE_SCHUR',        'EIGEN_SPARSE',     'CLUSTER_JACOBI'),\n  ('ITERATIVE_SCHUR',        'CX_SPARSE',        'CLUSTER_JACOBI'),\n  ('ITERATIVE_SCHUR',        'ACCELERATE_SPARSE','CLUSTER_JACOBI'),\n  ('ITERATIVE_SCHUR',        'SUITE_SPARSE',     'CLUSTER_TRIDIAGONAL'),\n  ('ITERATIVE_SCHUR',        'EIGEN_SPARSE',     'CLUSTER_TRIDIAGONAL'),\n  ('ITERATIVE_SCHUR',        'CX_SPARSE',        'CLUSTER_TRIDIAGONAL'),\n  ('ITERATIVE_SCHUR',        'ACCELERATE_SPARSE','CLUSTER_TRIDIAGONAL'),\n  ('SPARSE_NORMAL_CHOLESKY', 'SUITE_SPARSE',     'IDENTITY'),\n  ('SPARSE_NORMAL_CHOLESKY', 'EIGEN_SPARSE',     'IDENTITY'),\n  ('SPARSE_NORMAL_CHOLESKY', 'CX_SPARSE',        'IDENTITY'),\n  ('SPARSE_NORMAL_CHOLESKY', 'ACCELERATE_SPARSE','IDENTITY'),\n  ('SPARSE_SCHUR',           'SUITE_SPARSE',     'IDENTITY'),\n  ('SPARSE_SCHUR',           'EIGEN_SPARSE',     'IDENTITY'),\n  ('SPARSE_SCHUR',           'CX_SPARSE',        'IDENTITY'),\n  ('SPARSE_SCHUR',           'ACCELERATE_SPARSE','IDENTITY'),\n]\n\nFILENAME_SHORTENING_MAP = dict(\n  DENSE_SCHUR='denseschur',\n  ITERATIVE_SCHUR='iterschur',\n  SPARSE_NORMAL_CHOLESKY='sparsecholesky',\n  SPARSE_SCHUR='sparseschur',\n  NO_SPARSE='',  # Omit sparse reference entirely for dense tests.\n  SUITE_SPARSE='suitesparse',\n  EIGEN_SPARSE='eigensparse',\n  CX_SPARSE='cxsparse',\n  ACCELERATE_SPARSE='acceleratesparse',\n  IDENTITY='identity',\n  JACOBI='jacobi',\n  SCHUR_JACOBI='schurjacobi',\n  CLUSTER_JACOBI='clustjacobi',\n  CLUSTER_TRIDIAGONAL='clusttri',\n  kAutomaticOrdering='auto',\n  kUserOrdering='user',\n)\n\nCOPYRIGHT_HEADER = (\n\"\"\"// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\"\"\")\n\nBUNDLE_ADJUSTMENT_TEST_TEMPLATE = (COPYRIGHT_HEADER + \"\"\"\n\n#include \"bundle_adjustment_test_util.h\"\n%(preprocessor_conditions_begin)s\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       %(test_class_name)s) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = %(num_threads)s;\n   options->linear_solver_type = %(linear_solver)s;\n   options->sparse_linear_algebra_library_type = %(sparse_backend)s;\n   options->preconditioner_type = %(preconditioner)s;\n   if (%(ordering)s) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n%(preprocessor_conditions_end)s\n\"\"\")\n\ndef camelcasify(token):\n  \"\"\"Convert capitalized underscore tokens to camel case\"\"\"\n  return ''.join([x.lower().capitalize() for x in token.split('_')])\n\n\ndef generate_bundle_test(linear_solver,\n                         sparse_backend,\n                         preconditioner,\n                         ordering,\n                         thread_config):\n  \"\"\"Generate a bundle adjustment test executable configured appropriately\"\"\"\n\n  # Preconditioner only makes sense for iterative schur; drop it otherwise.\n  preconditioner_tag = preconditioner\n  if linear_solver != 'ITERATIVE_SCHUR':\n    preconditioner_tag = ''\n\n  # Omit references to the sparse backend when one is not in use.\n  sparse_backend_tag = sparse_backend\n  if sparse_backend == 'NO_SPARSE':\n    sparse_backend_tag = ''\n\n  # Use a double underscore; otherwise the names are harder to understand.\n  test_class_name = '_'.join(filter(lambda x: x, [\n      camelcasify(linear_solver),\n      camelcasify(sparse_backend_tag),\n      camelcasify(preconditioner_tag),\n      ordering[1:],  # Strip 'k'\n      'Threads' if thread_config == MULTI_THREADED else '']))\n\n  # Initial template parameters (augmented more below).\n  template_parameters = dict(\n          linear_solver=linear_solver,\n          sparse_backend=sparse_backend,\n          preconditioner=preconditioner,\n          ordering=ordering,\n          num_threads=thread_config,\n          test_class_name=test_class_name)\n\n  # Accumulate appropriate #ifdef/#ifndefs for the solver's sparse backend.\n  preprocessor_conditions_begin = []\n  preprocessor_conditions_end = []\n  if sparse_backend == 'SUITE_SPARSE':\n    preprocessor_conditions_begin.append('#ifndef CERES_NO_SUITESPARSE')\n    preprocessor_conditions_end.insert(0, '#endif  // CERES_NO_SUITESPARSE')\n  elif sparse_backend == 'CX_SPARSE':\n    preprocessor_conditions_begin.append('#ifndef CERES_NO_CXSPARSE')\n    preprocessor_conditions_end.insert(0, '#endif  // CERES_NO_CXSPARSE')\n  elif sparse_backend == 'ACCELERATE_SPARSE':\n    preprocessor_conditions_begin.append('#ifndef CERES_NO_ACCELERATE_SPARSE')\n    preprocessor_conditions_end.insert(0, '#endif  // CERES_NO_ACCELERATE_SPARSE')\n  elif sparse_backend == 'EIGEN_SPARSE':\n    preprocessor_conditions_begin.append('#ifdef CERES_USE_EIGEN_SPARSE')\n    preprocessor_conditions_end.insert(0, '#endif  // CERES_USE_EIGEN_SPARSE')\n\n  # Accumulate appropriate #ifdef/#ifndefs for threading conditions.\n  if thread_config == MULTI_THREADED:\n    preprocessor_conditions_begin.append('#ifndef CERES_NO_THREADS')\n    preprocessor_conditions_end.insert(0, '#endif  // CERES_NO_THREADS')\n\n  # If there are #ifdefs, put newlines around them.\n  if preprocessor_conditions_begin:\n    preprocessor_conditions_begin.insert(0, '')\n    preprocessor_conditions_begin.append('')\n    preprocessor_conditions_end.insert(0, '')\n    preprocessor_conditions_end.append('')\n\n  # Put #ifdef/#ifndef stacks into the template parameters.\n  template_parameters['preprocessor_conditions_begin'] = '\\n'.join(\n      preprocessor_conditions_begin)\n  template_parameters['preprocessor_conditions_end'] = '\\n'.join(\n      preprocessor_conditions_end)\n\n  # Substitute variables into the test template, and write the result to a file.\n  filename_tag = '_'.join(FILENAME_SHORTENING_MAP.get(x) for x in [\n      linear_solver,\n      sparse_backend_tag,\n      preconditioner_tag,\n      ordering]\n      if FILENAME_SHORTENING_MAP.get(x))\n  if (thread_config == MULTI_THREADED):\n    filename_tag += '_threads'\n\n  filename = ('generated_bundle_adjustment_tests/ba_%s_test.cc' %\n                filename_tag.lower())\n  with open(filename, 'w') as fd:\n    fd.write(BUNDLE_ADJUSTMENT_TEST_TEMPLATE % template_parameters)\n\n  # All done.\n  print 'Generated', filename\n\n  return filename\n\n\nif __name__ == '__main__':\n  # Iterate over all the possible configurations and generate the tests.\n  generated_files = []\n  for linear_solver, sparse_backend, preconditioner in SOLVER_CONFIGS:\n    for ordering in ORDERINGS:\n      for thread_config in THREAD_CONFIGS:\n        generated_files.append(\n            generate_bundle_test(linear_solver,\n                                 sparse_backend,\n                                 preconditioner,\n                                 ordering,\n                                 thread_config))\n\n  # Generate the CMakeLists.txt as well.\n  with open('generated_bundle_adjustment_tests/CMakeLists.txt', 'w') as fd:\n    fd.write(COPYRIGHT_HEADER.replace('//', '#').replace('http:#', 'http://'))\n    fd.write('\\n')\n    fd.write('\\n')\n    for generated_file in generated_files:\n      fd.write('ceres_test(%s)\\n' %\n               generated_file.split('/')[1].replace('_test.cc', ''))\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generate_template_specializations.py",
    "content": "# Ceres Solver - A fast non-linear least squares minimizer\n# Copyright 2015 Google Inc. All rights reserved.\n# http://ceres-solver.org/\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice,\n#   this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright notice,\n#   this list of conditions and the following disclaimer in the documentation\n#   and/or other materials provided with the distribution.\n# * Neither the name of Google Inc. nor the names of its contributors may be\n#   used to endorse or promote products derived from this software without\n#   specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n#\n# Author: sameeragarwal@google.com (Sameer Agarwal)\n#\n# Script for explicitly generating template specialization of the\n# SchurEliminator class. It is a rather large class\n# and the number of explicit instantiations is also large. Explicitly\n# generating these instantiations in separate .cc files breaks the\n# compilation into separate compilation unit rather than one large cc\n# file which takes 2+GB of RAM to compile.\n#\n# This script creates three sets of files.\n#\n# 1. schur_eliminator_x_x_x.cc and partitioned_matrix_view_x_x_x.cc\n# where, the x indicates the template parameters and\n#\n# 2. schur_eliminator.cc & partitioned_matrix_view.cc\n#\n# that contains a factory function for instantiating these classes\n# based on runtime parameters.\n#\n# 3. schur_templates.cc\n#\n# that contains a function which can be queried to determine what\n# template specializations are available.\n#\n# The following list of tuples, specializations indicates the set of\n# specializations that is generated.\nSPECIALIZATIONS = [(2, 2, 2),\n                   (2, 2, 3),\n                   (2, 2, 4),\n                   (2, 2, \"Eigen::Dynamic\"),\n                   (2, 3, 3),\n                   (2, 3, 4),\n                   (2, 3, 6),\n                   (2, 3, 9),\n                   (2, 3, \"Eigen::Dynamic\"),\n                   (2, 4, 3),\n                   (2, 4, 4),\n                   (2, 4, 6),\n                   (2, 4, 8),\n                   (2, 4, 9),\n                   (2, 4, \"Eigen::Dynamic\"),\n                   (2, \"Eigen::Dynamic\", \"Eigen::Dynamic\"),\n                   (3, 3, 3),\n                   (4, 4, 2),\n                   (4, 4, 3),\n                   (4, 4, 4),\n                   (4, 4, \"Eigen::Dynamic\")]\n\nimport schur_eliminator_template\nimport partitioned_matrix_view_template\nimport os\nimport glob\n\ndef SuffixForSize(size):\n  if size == \"Eigen::Dynamic\":\n    return \"d\"\n  return str(size)\n\ndef SpecializationFilename(prefix, row_block_size, e_block_size, f_block_size):\n  return \"_\".join([prefix] + map(SuffixForSize, (row_block_size,\n                                                 e_block_size,\n                                                 f_block_size)))\n\ndef GenerateFactoryConditional(row_block_size, e_block_size, f_block_size):\n  conditionals = []\n  if (row_block_size != \"Eigen::Dynamic\"):\n    conditionals.append(\"(options.row_block_size == %s)\" % row_block_size)\n  if (e_block_size != \"Eigen::Dynamic\"):\n    conditionals.append(\"(options.e_block_size == %s)\" % e_block_size)\n  if (f_block_size != \"Eigen::Dynamic\"):\n    conditionals.append(\"(options.f_block_size == %s)\" % f_block_size)\n  if (len(conditionals) == 0):\n    return \"%s\"\n\n  if (len(conditionals) == 1):\n    return \" if \" + conditionals[0] + \"{\\n  %s\\n }\\n\"\n\n  return \" if (\" + \" &&\\n     \".join(conditionals) + \") {\\n  %s\\n }\\n\"\n\ndef Specialize(name, data):\n  \"\"\"\n  Generate specialization code and the conditionals to instantiate it.\n  \"\"\"\n\n  # Specialization files\n  for row_block_size, e_block_size, f_block_size in SPECIALIZATIONS:\n      output = SpecializationFilename(\"generated/\" + name,\n                                      row_block_size,\n                                      e_block_size,\n                                      f_block_size) + \".cc\"\n\n      with open(output, \"w\") as f:\n        f.write(data[\"HEADER\"])\n        f.write(data[\"SPECIALIZATION_FILE\"] %\n                  (row_block_size, e_block_size, f_block_size))\n\n  # Generate the _d_d_d specialization.\n  output = SpecializationFilename(\"generated/\" + name,\n                                   \"Eigen::Dynamic\",\n                                   \"Eigen::Dynamic\",\n                                   \"Eigen::Dynamic\") + \".cc\"\n  with open(output, \"w\") as f:\n    f.write(data[\"HEADER\"])\n    f.write(data[\"DYNAMIC_FILE\"] %\n              (\"Eigen::Dynamic\", \"Eigen::Dynamic\", \"Eigen::Dynamic\"))\n\n  # Factory\n  with open(name + \".cc\", \"w\") as f:\n    f.write(data[\"HEADER\"])\n    f.write(data[\"FACTORY_FILE_HEADER\"])\n    for row_block_size, e_block_size, f_block_size in SPECIALIZATIONS:\n        factory_conditional = GenerateFactoryConditional(\n            row_block_size, e_block_size, f_block_size)\n        factory = data[\"FACTORY\"] % (row_block_size, e_block_size, f_block_size)\n        f.write(factory_conditional % factory);\n    f.write(data[\"FACTORY_FOOTER\"])\n\nQUERY_HEADER = \"\"\"// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// What template specializations are available.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\"\"\"\n\nQUERY_FILE_HEADER = \"\"\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/schur_templates.h\"\n\nnamespace ceres {\nnamespace internal {\n\nvoid GetBestSchurTemplateSpecialization(int* row_block_size,\n                                        int* e_block_size,\n                                        int* f_block_size) {\n  LinearSolver::Options options;\n  options.row_block_size = *row_block_size;\n  options.e_block_size = *e_block_size;\n  options.f_block_size = *f_block_size;\n  *row_block_size = Eigen::Dynamic;\n  *e_block_size = Eigen::Dynamic;\n  *f_block_size = Eigen::Dynamic;\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\"\"\"\n\nQUERY_FOOTER = \"\"\"\n#endif\n  return;\n}\n\n}  // namespace internal\n}  // namespace ceres\n\"\"\"\n\nQUERY_ACTION = \"\"\" *row_block_size = %s;\n   *e_block_size = %s;\n   *f_block_size = %s;\n  return;\"\"\"\n\ndef GenerateQueryFile():\n  \"\"\"\n  Generate file that allows querying for available template specializations.\n  \"\"\"\n\n  with open(\"schur_templates.cc\", \"w\") as f:\n    f.write(QUERY_HEADER)\n    f.write(QUERY_FILE_HEADER)\n    for row_block_size, e_block_size, f_block_size in SPECIALIZATIONS:\n      factory_conditional = GenerateFactoryConditional(\n        row_block_size, e_block_size, f_block_size)\n      action = QUERY_ACTION % (row_block_size, e_block_size, f_block_size)\n      f.write(factory_conditional % action)\n    f.write(QUERY_FOOTER)\n\n\nif __name__ == \"__main__\":\n  for f in glob.glob(\"generated/*\"):\n    os.remove(f)\n\n  Specialize(\"schur_eliminator\",\n               schur_eliminator_template.__dict__)\n  Specialize(\"partitioned_matrix_view\",\n               partitioned_matrix_view_template.__dict__)\n  GenerateQueryFile()\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/partitioned_matrix_view_2_2_2.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of PartitionedMatrixView.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/partitioned_matrix_view_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class PartitionedMatrixView<2, 2, 2>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/partitioned_matrix_view_2_2_3.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of PartitionedMatrixView.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/partitioned_matrix_view_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class PartitionedMatrixView<2, 2, 3>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/partitioned_matrix_view_2_2_4.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of PartitionedMatrixView.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/partitioned_matrix_view_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class PartitionedMatrixView<2, 2, 4>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/partitioned_matrix_view_2_2_d.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of PartitionedMatrixView.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/partitioned_matrix_view_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class PartitionedMatrixView<2, 2, Eigen::Dynamic>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/partitioned_matrix_view_2_3_3.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of PartitionedMatrixView.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/partitioned_matrix_view_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class PartitionedMatrixView<2, 3, 3>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/partitioned_matrix_view_2_3_4.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of PartitionedMatrixView.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/partitioned_matrix_view_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class PartitionedMatrixView<2, 3, 4>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/partitioned_matrix_view_2_3_6.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of PartitionedMatrixView.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/partitioned_matrix_view_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class PartitionedMatrixView<2, 3, 6>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/partitioned_matrix_view_2_3_9.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of PartitionedMatrixView.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/partitioned_matrix_view_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class PartitionedMatrixView<2, 3, 9>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/partitioned_matrix_view_2_3_d.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of PartitionedMatrixView.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/partitioned_matrix_view_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class PartitionedMatrixView<2, 3, Eigen::Dynamic>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/partitioned_matrix_view_2_4_3.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of PartitionedMatrixView.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/partitioned_matrix_view_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class PartitionedMatrixView<2, 4, 3>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/partitioned_matrix_view_2_4_4.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of PartitionedMatrixView.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/partitioned_matrix_view_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class PartitionedMatrixView<2, 4, 4>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/partitioned_matrix_view_2_4_6.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of PartitionedMatrixView.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/partitioned_matrix_view_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class PartitionedMatrixView<2, 4, 6>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/partitioned_matrix_view_2_4_8.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of PartitionedMatrixView.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/partitioned_matrix_view_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class PartitionedMatrixView<2, 4, 8>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/partitioned_matrix_view_2_4_9.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of PartitionedMatrixView.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/partitioned_matrix_view_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class PartitionedMatrixView<2, 4, 9>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/partitioned_matrix_view_2_4_d.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of PartitionedMatrixView.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/partitioned_matrix_view_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class PartitionedMatrixView<2, 4, Eigen::Dynamic>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/partitioned_matrix_view_2_d_d.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of PartitionedMatrixView.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/partitioned_matrix_view_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class PartitionedMatrixView<2, Eigen::Dynamic, Eigen::Dynamic>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/partitioned_matrix_view_3_3_3.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of PartitionedMatrixView.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/partitioned_matrix_view_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class PartitionedMatrixView<3, 3, 3>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/partitioned_matrix_view_4_4_2.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of PartitionedMatrixView.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/partitioned_matrix_view_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class PartitionedMatrixView<4, 4, 2>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/partitioned_matrix_view_4_4_3.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of PartitionedMatrixView.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/partitioned_matrix_view_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class PartitionedMatrixView<4, 4, 3>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/partitioned_matrix_view_4_4_4.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of PartitionedMatrixView.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/partitioned_matrix_view_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class PartitionedMatrixView<4, 4, 4>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/partitioned_matrix_view_4_4_d.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of PartitionedMatrixView.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/partitioned_matrix_view_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class PartitionedMatrixView<4, 4, Eigen::Dynamic>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/partitioned_matrix_view_d_d_d.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of PartitionedMatrixView.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n\n#include \"ceres/partitioned_matrix_view_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class PartitionedMatrixView<Eigen::Dynamic, Eigen::Dynamic, Eigen::Dynamic>;\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/schur_eliminator_2_2_2.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of SchurEliminator.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/schur_eliminator_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class SchurEliminator<2, 2, 2>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/schur_eliminator_2_2_3.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of SchurEliminator.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/schur_eliminator_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class SchurEliminator<2, 2, 3>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/schur_eliminator_2_2_4.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of SchurEliminator.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/schur_eliminator_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class SchurEliminator<2, 2, 4>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/schur_eliminator_2_2_d.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of SchurEliminator.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/schur_eliminator_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class SchurEliminator<2, 2, Eigen::Dynamic>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/schur_eliminator_2_3_3.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of SchurEliminator.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/schur_eliminator_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class SchurEliminator<2, 3, 3>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/schur_eliminator_2_3_4.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of SchurEliminator.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/schur_eliminator_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class SchurEliminator<2, 3, 4>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/schur_eliminator_2_3_6.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of SchurEliminator.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/schur_eliminator_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class SchurEliminator<2, 3, 6>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/schur_eliminator_2_3_9.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of SchurEliminator.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/schur_eliminator_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class SchurEliminator<2, 3, 9>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/schur_eliminator_2_3_d.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of SchurEliminator.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/schur_eliminator_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class SchurEliminator<2, 3, Eigen::Dynamic>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/schur_eliminator_2_4_3.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of SchurEliminator.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/schur_eliminator_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class SchurEliminator<2, 4, 3>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/schur_eliminator_2_4_4.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of SchurEliminator.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/schur_eliminator_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class SchurEliminator<2, 4, 4>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/schur_eliminator_2_4_6.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of SchurEliminator.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/schur_eliminator_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class SchurEliminator<2, 4, 6>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/schur_eliminator_2_4_8.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of SchurEliminator.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/schur_eliminator_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class SchurEliminator<2, 4, 8>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/schur_eliminator_2_4_9.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of SchurEliminator.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/schur_eliminator_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class SchurEliminator<2, 4, 9>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/schur_eliminator_2_4_d.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of SchurEliminator.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/schur_eliminator_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class SchurEliminator<2, 4, Eigen::Dynamic>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/schur_eliminator_2_d_d.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of SchurEliminator.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/schur_eliminator_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class SchurEliminator<2, Eigen::Dynamic, Eigen::Dynamic>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/schur_eliminator_3_3_3.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of SchurEliminator.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/schur_eliminator_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class SchurEliminator<3, 3, 3>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/schur_eliminator_4_4_2.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of SchurEliminator.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/schur_eliminator_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class SchurEliminator<4, 4, 2>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/schur_eliminator_4_4_3.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of SchurEliminator.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/schur_eliminator_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class SchurEliminator<4, 4, 3>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/schur_eliminator_4_4_4.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of SchurEliminator.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/schur_eliminator_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class SchurEliminator<4, 4, 4>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/schur_eliminator_4_4_d.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of SchurEliminator.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/schur_eliminator_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class SchurEliminator<4, 4, Eigen::Dynamic>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated/schur_eliminator_d_d_d.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of SchurEliminator.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n\n#include \"ceres/schur_eliminator_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class SchurEliminator<Eigen::Dynamic, Eigen::Dynamic, Eigen::Dynamic>;\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/CMakeLists.txt",
    "content": "# Ceres Solver - A fast non-linear least squares minimizer\n# Copyright 2018 Google Inc. All rights reserved.\n# http://ceres-solver.org/\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice,\n#   this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright notice,\n#   this list of conditions and the following disclaimer in the documentation\n#   and/or other materials provided with the distribution.\n# * Neither the name of Google Inc. nor the names of its contributors may be\n#   used to endorse or promote products derived from this software without\n#   specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n#\n# ========================================\n# THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n# THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n# THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n# THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n# ========================================\n#\n# This file is generated using generate_bundle_adjustment_tests.py.\n\nceres_test(ba_denseschur_auto)\nceres_test(ba_denseschur_auto_threads)\nceres_test(ba_denseschur_user)\nceres_test(ba_denseschur_user_threads)\nceres_test(ba_iterschur_jacobi_auto)\nceres_test(ba_iterschur_jacobi_auto_threads)\nceres_test(ba_iterschur_jacobi_user)\nceres_test(ba_iterschur_jacobi_user_threads)\nceres_test(ba_iterschur_schurjacobi_auto)\nceres_test(ba_iterschur_schurjacobi_auto_threads)\nceres_test(ba_iterschur_schurjacobi_user)\nceres_test(ba_iterschur_schurjacobi_user_threads)\nceres_test(ba_iterschur_suitesparse_clustjacobi_auto)\nceres_test(ba_iterschur_suitesparse_clustjacobi_auto_threads)\nceres_test(ba_iterschur_suitesparse_clustjacobi_user)\nceres_test(ba_iterschur_suitesparse_clustjacobi_user_threads)\nceres_test(ba_iterschur_eigensparse_clustjacobi_auto)\nceres_test(ba_iterschur_eigensparse_clustjacobi_auto_threads)\nceres_test(ba_iterschur_eigensparse_clustjacobi_user)\nceres_test(ba_iterschur_eigensparse_clustjacobi_user_threads)\nceres_test(ba_iterschur_cxsparse_clustjacobi_auto)\nceres_test(ba_iterschur_cxsparse_clustjacobi_auto_threads)\nceres_test(ba_iterschur_cxsparse_clustjacobi_user)\nceres_test(ba_iterschur_cxsparse_clustjacobi_user_threads)\nceres_test(ba_iterschur_acceleratesparse_clustjacobi_auto)\nceres_test(ba_iterschur_acceleratesparse_clustjacobi_auto_threads)\nceres_test(ba_iterschur_acceleratesparse_clustjacobi_user)\nceres_test(ba_iterschur_acceleratesparse_clustjacobi_user_threads)\nceres_test(ba_iterschur_suitesparse_clusttri_auto)\nceres_test(ba_iterschur_suitesparse_clusttri_auto_threads)\nceres_test(ba_iterschur_suitesparse_clusttri_user)\nceres_test(ba_iterschur_suitesparse_clusttri_user_threads)\nceres_test(ba_iterschur_eigensparse_clusttri_auto)\nceres_test(ba_iterschur_eigensparse_clusttri_auto_threads)\nceres_test(ba_iterschur_eigensparse_clusttri_user)\nceres_test(ba_iterschur_eigensparse_clusttri_user_threads)\nceres_test(ba_iterschur_cxsparse_clusttri_auto)\nceres_test(ba_iterschur_cxsparse_clusttri_auto_threads)\nceres_test(ba_iterschur_cxsparse_clusttri_user)\nceres_test(ba_iterschur_cxsparse_clusttri_user_threads)\nceres_test(ba_iterschur_acceleratesparse_clusttri_auto)\nceres_test(ba_iterschur_acceleratesparse_clusttri_auto_threads)\nceres_test(ba_iterschur_acceleratesparse_clusttri_user)\nceres_test(ba_iterschur_acceleratesparse_clusttri_user_threads)\nceres_test(ba_sparsecholesky_suitesparse_auto)\nceres_test(ba_sparsecholesky_suitesparse_auto_threads)\nceres_test(ba_sparsecholesky_suitesparse_user)\nceres_test(ba_sparsecholesky_suitesparse_user_threads)\nceres_test(ba_sparsecholesky_eigensparse_auto)\nceres_test(ba_sparsecholesky_eigensparse_auto_threads)\nceres_test(ba_sparsecholesky_eigensparse_user)\nceres_test(ba_sparsecholesky_eigensparse_user_threads)\nceres_test(ba_sparsecholesky_cxsparse_auto)\nceres_test(ba_sparsecholesky_cxsparse_auto_threads)\nceres_test(ba_sparsecholesky_cxsparse_user)\nceres_test(ba_sparsecholesky_cxsparse_user_threads)\nceres_test(ba_sparsecholesky_acceleratesparse_auto)\nceres_test(ba_sparsecholesky_acceleratesparse_auto_threads)\nceres_test(ba_sparsecholesky_acceleratesparse_user)\nceres_test(ba_sparsecholesky_acceleratesparse_user_threads)\nceres_test(ba_sparseschur_suitesparse_auto)\nceres_test(ba_sparseschur_suitesparse_auto_threads)\nceres_test(ba_sparseschur_suitesparse_user)\nceres_test(ba_sparseschur_suitesparse_user_threads)\nceres_test(ba_sparseschur_eigensparse_auto)\nceres_test(ba_sparseschur_eigensparse_auto_threads)\nceres_test(ba_sparseschur_eigensparse_user)\nceres_test(ba_sparseschur_eigensparse_user_threads)\nceres_test(ba_sparseschur_cxsparse_auto)\nceres_test(ba_sparseschur_cxsparse_auto_threads)\nceres_test(ba_sparseschur_cxsparse_user)\nceres_test(ba_sparseschur_cxsparse_user_threads)\nceres_test(ba_sparseschur_acceleratesparse_auto)\nceres_test(ba_sparseschur_acceleratesparse_auto_threads)\nceres_test(ba_sparseschur_acceleratesparse_user)\nceres_test(ba_sparseschur_acceleratesparse_user_threads)\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_denseschur_auto_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       DenseSchur_AutomaticOrdering) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 1;\n   options->linear_solver_type = DENSE_SCHUR;\n   options->sparse_linear_algebra_library_type = NO_SPARSE;\n   options->preconditioner_type = IDENTITY;\n   if (kAutomaticOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_denseschur_auto_threads_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_THREADS\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       DenseSchur_AutomaticOrdering_Threads) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 4;\n   options->linear_solver_type = DENSE_SCHUR;\n   options->sparse_linear_algebra_library_type = NO_SPARSE;\n   options->preconditioner_type = IDENTITY;\n   if (kAutomaticOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_THREADS\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_denseschur_user_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       DenseSchur_UserOrdering) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 1;\n   options->linear_solver_type = DENSE_SCHUR;\n   options->sparse_linear_algebra_library_type = NO_SPARSE;\n   options->preconditioner_type = IDENTITY;\n   if (kUserOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_denseschur_user_threads_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_THREADS\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       DenseSchur_UserOrdering_Threads) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 4;\n   options->linear_solver_type = DENSE_SCHUR;\n   options->sparse_linear_algebra_library_type = NO_SPARSE;\n   options->preconditioner_type = IDENTITY;\n   if (kUserOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_THREADS\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_acceleratesparse_clustjacobi_auto_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_ACCELERATE_SPARSE\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_AccelerateSparse_ClusterJacobi_AutomaticOrdering) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 1;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = ACCELERATE_SPARSE;\n   options->preconditioner_type = CLUSTER_JACOBI;\n   if (kAutomaticOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_ACCELERATE_SPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_acceleratesparse_clustjacobi_auto_threads_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_ACCELERATE_SPARSE\n#ifndef CERES_NO_THREADS\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_AccelerateSparse_ClusterJacobi_AutomaticOrdering_Threads) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 4;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = ACCELERATE_SPARSE;\n   options->preconditioner_type = CLUSTER_JACOBI;\n   if (kAutomaticOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_THREADS\n#endif  // CERES_NO_ACCELERATE_SPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_acceleratesparse_clustjacobi_user_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_ACCELERATE_SPARSE\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_AccelerateSparse_ClusterJacobi_UserOrdering) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 1;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = ACCELERATE_SPARSE;\n   options->preconditioner_type = CLUSTER_JACOBI;\n   if (kUserOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_ACCELERATE_SPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_acceleratesparse_clustjacobi_user_threads_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_ACCELERATE_SPARSE\n#ifndef CERES_NO_THREADS\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_AccelerateSparse_ClusterJacobi_UserOrdering_Threads) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 4;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = ACCELERATE_SPARSE;\n   options->preconditioner_type = CLUSTER_JACOBI;\n   if (kUserOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_THREADS\n#endif  // CERES_NO_ACCELERATE_SPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_acceleratesparse_clusttri_auto_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_ACCELERATE_SPARSE\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_AccelerateSparse_ClusterTridiagonal_AutomaticOrdering) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 1;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = ACCELERATE_SPARSE;\n   options->preconditioner_type = CLUSTER_TRIDIAGONAL;\n   if (kAutomaticOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_ACCELERATE_SPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_acceleratesparse_clusttri_auto_threads_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_ACCELERATE_SPARSE\n#ifndef CERES_NO_THREADS\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_AccelerateSparse_ClusterTridiagonal_AutomaticOrdering_Threads) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 4;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = ACCELERATE_SPARSE;\n   options->preconditioner_type = CLUSTER_TRIDIAGONAL;\n   if (kAutomaticOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_THREADS\n#endif  // CERES_NO_ACCELERATE_SPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_acceleratesparse_clusttri_user_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_ACCELERATE_SPARSE\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_AccelerateSparse_ClusterTridiagonal_UserOrdering) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 1;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = ACCELERATE_SPARSE;\n   options->preconditioner_type = CLUSTER_TRIDIAGONAL;\n   if (kUserOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_ACCELERATE_SPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_acceleratesparse_clusttri_user_threads_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_ACCELERATE_SPARSE\n#ifndef CERES_NO_THREADS\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_AccelerateSparse_ClusterTridiagonal_UserOrdering_Threads) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 4;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = ACCELERATE_SPARSE;\n   options->preconditioner_type = CLUSTER_TRIDIAGONAL;\n   if (kUserOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_THREADS\n#endif  // CERES_NO_ACCELERATE_SPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_cxsparse_clustjacobi_auto_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_CXSPARSE\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_CxSparse_ClusterJacobi_AutomaticOrdering) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 1;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = CX_SPARSE;\n   options->preconditioner_type = CLUSTER_JACOBI;\n   if (kAutomaticOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_CXSPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_cxsparse_clustjacobi_auto_threads_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_CXSPARSE\n#ifndef CERES_NO_THREADS\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_CxSparse_ClusterJacobi_AutomaticOrdering_Threads) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 4;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = CX_SPARSE;\n   options->preconditioner_type = CLUSTER_JACOBI;\n   if (kAutomaticOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_THREADS\n#endif  // CERES_NO_CXSPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_cxsparse_clustjacobi_user_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_CXSPARSE\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_CxSparse_ClusterJacobi_UserOrdering) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 1;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = CX_SPARSE;\n   options->preconditioner_type = CLUSTER_JACOBI;\n   if (kUserOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_CXSPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_cxsparse_clustjacobi_user_threads_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_CXSPARSE\n#ifndef CERES_NO_THREADS\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_CxSparse_ClusterJacobi_UserOrdering_Threads) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 4;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = CX_SPARSE;\n   options->preconditioner_type = CLUSTER_JACOBI;\n   if (kUserOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_THREADS\n#endif  // CERES_NO_CXSPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_cxsparse_clusttri_auto_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_CXSPARSE\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_CxSparse_ClusterTridiagonal_AutomaticOrdering) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 1;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = CX_SPARSE;\n   options->preconditioner_type = CLUSTER_TRIDIAGONAL;\n   if (kAutomaticOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_CXSPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_cxsparse_clusttri_auto_threads_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_CXSPARSE\n#ifndef CERES_NO_THREADS\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_CxSparse_ClusterTridiagonal_AutomaticOrdering_Threads) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 4;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = CX_SPARSE;\n   options->preconditioner_type = CLUSTER_TRIDIAGONAL;\n   if (kAutomaticOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_THREADS\n#endif  // CERES_NO_CXSPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_cxsparse_clusttri_user_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_CXSPARSE\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_CxSparse_ClusterTridiagonal_UserOrdering) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 1;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = CX_SPARSE;\n   options->preconditioner_type = CLUSTER_TRIDIAGONAL;\n   if (kUserOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_CXSPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_cxsparse_clusttri_user_threads_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_CXSPARSE\n#ifndef CERES_NO_THREADS\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_CxSparse_ClusterTridiagonal_UserOrdering_Threads) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 4;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = CX_SPARSE;\n   options->preconditioner_type = CLUSTER_TRIDIAGONAL;\n   if (kUserOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_THREADS\n#endif  // CERES_NO_CXSPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_eigensparse_clustjacobi_auto_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifdef CERES_USE_EIGEN_SPARSE\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_EigenSparse_ClusterJacobi_AutomaticOrdering) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 1;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = EIGEN_SPARSE;\n   options->preconditioner_type = CLUSTER_JACOBI;\n   if (kAutomaticOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_USE_EIGEN_SPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_eigensparse_clustjacobi_auto_threads_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifdef CERES_USE_EIGEN_SPARSE\n#ifndef CERES_NO_THREADS\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_EigenSparse_ClusterJacobi_AutomaticOrdering_Threads) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 4;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = EIGEN_SPARSE;\n   options->preconditioner_type = CLUSTER_JACOBI;\n   if (kAutomaticOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_THREADS\n#endif  // CERES_USE_EIGEN_SPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_eigensparse_clustjacobi_user_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifdef CERES_USE_EIGEN_SPARSE\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_EigenSparse_ClusterJacobi_UserOrdering) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 1;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = EIGEN_SPARSE;\n   options->preconditioner_type = CLUSTER_JACOBI;\n   if (kUserOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_USE_EIGEN_SPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_eigensparse_clustjacobi_user_threads_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifdef CERES_USE_EIGEN_SPARSE\n#ifndef CERES_NO_THREADS\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_EigenSparse_ClusterJacobi_UserOrdering_Threads) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 4;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = EIGEN_SPARSE;\n   options->preconditioner_type = CLUSTER_JACOBI;\n   if (kUserOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_THREADS\n#endif  // CERES_USE_EIGEN_SPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_eigensparse_clusttri_auto_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifdef CERES_USE_EIGEN_SPARSE\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_EigenSparse_ClusterTridiagonal_AutomaticOrdering) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 1;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = EIGEN_SPARSE;\n   options->preconditioner_type = CLUSTER_TRIDIAGONAL;\n   if (kAutomaticOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_USE_EIGEN_SPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_eigensparse_clusttri_auto_threads_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifdef CERES_USE_EIGEN_SPARSE\n#ifndef CERES_NO_THREADS\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_EigenSparse_ClusterTridiagonal_AutomaticOrdering_Threads) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 4;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = EIGEN_SPARSE;\n   options->preconditioner_type = CLUSTER_TRIDIAGONAL;\n   if (kAutomaticOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_THREADS\n#endif  // CERES_USE_EIGEN_SPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_eigensparse_clusttri_user_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifdef CERES_USE_EIGEN_SPARSE\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_EigenSparse_ClusterTridiagonal_UserOrdering) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 1;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = EIGEN_SPARSE;\n   options->preconditioner_type = CLUSTER_TRIDIAGONAL;\n   if (kUserOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_USE_EIGEN_SPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_eigensparse_clusttri_user_threads_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifdef CERES_USE_EIGEN_SPARSE\n#ifndef CERES_NO_THREADS\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_EigenSparse_ClusterTridiagonal_UserOrdering_Threads) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 4;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = EIGEN_SPARSE;\n   options->preconditioner_type = CLUSTER_TRIDIAGONAL;\n   if (kUserOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_THREADS\n#endif  // CERES_USE_EIGEN_SPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_jacobi_auto_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_Jacobi_AutomaticOrdering) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 1;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = NO_SPARSE;\n   options->preconditioner_type = JACOBI;\n   if (kAutomaticOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_jacobi_auto_threads_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_THREADS\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_Jacobi_AutomaticOrdering_Threads) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 4;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = NO_SPARSE;\n   options->preconditioner_type = JACOBI;\n   if (kAutomaticOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_THREADS\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_jacobi_user_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_Jacobi_UserOrdering) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 1;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = NO_SPARSE;\n   options->preconditioner_type = JACOBI;\n   if (kUserOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_jacobi_user_threads_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_THREADS\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_Jacobi_UserOrdering_Threads) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 4;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = NO_SPARSE;\n   options->preconditioner_type = JACOBI;\n   if (kUserOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_THREADS\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_schurjacobi_auto_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_SchurJacobi_AutomaticOrdering) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 1;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = NO_SPARSE;\n   options->preconditioner_type = SCHUR_JACOBI;\n   if (kAutomaticOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_schurjacobi_auto_threads_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_THREADS\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_SchurJacobi_AutomaticOrdering_Threads) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 4;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = NO_SPARSE;\n   options->preconditioner_type = SCHUR_JACOBI;\n   if (kAutomaticOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_THREADS\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_schurjacobi_user_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_SchurJacobi_UserOrdering) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 1;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = NO_SPARSE;\n   options->preconditioner_type = SCHUR_JACOBI;\n   if (kUserOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_schurjacobi_user_threads_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_THREADS\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_SchurJacobi_UserOrdering_Threads) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 4;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = NO_SPARSE;\n   options->preconditioner_type = SCHUR_JACOBI;\n   if (kUserOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_THREADS\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_suitesparse_clustjacobi_auto_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_SUITESPARSE\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_SuiteSparse_ClusterJacobi_AutomaticOrdering) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 1;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = SUITE_SPARSE;\n   options->preconditioner_type = CLUSTER_JACOBI;\n   if (kAutomaticOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_SUITESPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_suitesparse_clustjacobi_auto_threads_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_SUITESPARSE\n#ifndef CERES_NO_THREADS\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_SuiteSparse_ClusterJacobi_AutomaticOrdering_Threads) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 4;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = SUITE_SPARSE;\n   options->preconditioner_type = CLUSTER_JACOBI;\n   if (kAutomaticOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_THREADS\n#endif  // CERES_NO_SUITESPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_suitesparse_clustjacobi_user_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_SUITESPARSE\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_SuiteSparse_ClusterJacobi_UserOrdering) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 1;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = SUITE_SPARSE;\n   options->preconditioner_type = CLUSTER_JACOBI;\n   if (kUserOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_SUITESPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_suitesparse_clustjacobi_user_threads_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_SUITESPARSE\n#ifndef CERES_NO_THREADS\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_SuiteSparse_ClusterJacobi_UserOrdering_Threads) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 4;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = SUITE_SPARSE;\n   options->preconditioner_type = CLUSTER_JACOBI;\n   if (kUserOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_THREADS\n#endif  // CERES_NO_SUITESPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_suitesparse_clusttri_auto_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_SUITESPARSE\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_SuiteSparse_ClusterTridiagonal_AutomaticOrdering) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 1;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = SUITE_SPARSE;\n   options->preconditioner_type = CLUSTER_TRIDIAGONAL;\n   if (kAutomaticOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_SUITESPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_suitesparse_clusttri_auto_threads_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_SUITESPARSE\n#ifndef CERES_NO_THREADS\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_SuiteSparse_ClusterTridiagonal_AutomaticOrdering_Threads) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 4;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = SUITE_SPARSE;\n   options->preconditioner_type = CLUSTER_TRIDIAGONAL;\n   if (kAutomaticOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_THREADS\n#endif  // CERES_NO_SUITESPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_suitesparse_clusttri_user_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_SUITESPARSE\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_SuiteSparse_ClusterTridiagonal_UserOrdering) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 1;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = SUITE_SPARSE;\n   options->preconditioner_type = CLUSTER_TRIDIAGONAL;\n   if (kUserOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_SUITESPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_iterschur_suitesparse_clusttri_user_threads_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_SUITESPARSE\n#ifndef CERES_NO_THREADS\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       IterativeSchur_SuiteSparse_ClusterTridiagonal_UserOrdering_Threads) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 4;\n   options->linear_solver_type = ITERATIVE_SCHUR;\n   options->sparse_linear_algebra_library_type = SUITE_SPARSE;\n   options->preconditioner_type = CLUSTER_TRIDIAGONAL;\n   if (kUserOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_THREADS\n#endif  // CERES_NO_SUITESPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_sparsecholesky_acceleratesparse_auto_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_ACCELERATE_SPARSE\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       SparseNormalCholesky_AccelerateSparse_AutomaticOrdering) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 1;\n   options->linear_solver_type = SPARSE_NORMAL_CHOLESKY;\n   options->sparse_linear_algebra_library_type = ACCELERATE_SPARSE;\n   options->preconditioner_type = IDENTITY;\n   if (kAutomaticOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_ACCELERATE_SPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_sparsecholesky_acceleratesparse_auto_threads_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_ACCELERATE_SPARSE\n#ifndef CERES_NO_THREADS\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       SparseNormalCholesky_AccelerateSparse_AutomaticOrdering_Threads) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 4;\n   options->linear_solver_type = SPARSE_NORMAL_CHOLESKY;\n   options->sparse_linear_algebra_library_type = ACCELERATE_SPARSE;\n   options->preconditioner_type = IDENTITY;\n   if (kAutomaticOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_THREADS\n#endif  // CERES_NO_ACCELERATE_SPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_sparsecholesky_acceleratesparse_user_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_ACCELERATE_SPARSE\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       SparseNormalCholesky_AccelerateSparse_UserOrdering) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 1;\n   options->linear_solver_type = SPARSE_NORMAL_CHOLESKY;\n   options->sparse_linear_algebra_library_type = ACCELERATE_SPARSE;\n   options->preconditioner_type = IDENTITY;\n   if (kUserOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_ACCELERATE_SPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_sparsecholesky_acceleratesparse_user_threads_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_ACCELERATE_SPARSE\n#ifndef CERES_NO_THREADS\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       SparseNormalCholesky_AccelerateSparse_UserOrdering_Threads) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 4;\n   options->linear_solver_type = SPARSE_NORMAL_CHOLESKY;\n   options->sparse_linear_algebra_library_type = ACCELERATE_SPARSE;\n   options->preconditioner_type = IDENTITY;\n   if (kUserOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_THREADS\n#endif  // CERES_NO_ACCELERATE_SPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_sparsecholesky_cxsparse_auto_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_CXSPARSE\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       SparseNormalCholesky_CxSparse_AutomaticOrdering) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 1;\n   options->linear_solver_type = SPARSE_NORMAL_CHOLESKY;\n   options->sparse_linear_algebra_library_type = CX_SPARSE;\n   options->preconditioner_type = IDENTITY;\n   if (kAutomaticOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_CXSPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_sparsecholesky_cxsparse_auto_threads_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_CXSPARSE\n#ifndef CERES_NO_THREADS\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       SparseNormalCholesky_CxSparse_AutomaticOrdering_Threads) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 4;\n   options->linear_solver_type = SPARSE_NORMAL_CHOLESKY;\n   options->sparse_linear_algebra_library_type = CX_SPARSE;\n   options->preconditioner_type = IDENTITY;\n   if (kAutomaticOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_THREADS\n#endif  // CERES_NO_CXSPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_sparsecholesky_cxsparse_user_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_CXSPARSE\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       SparseNormalCholesky_CxSparse_UserOrdering) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 1;\n   options->linear_solver_type = SPARSE_NORMAL_CHOLESKY;\n   options->sparse_linear_algebra_library_type = CX_SPARSE;\n   options->preconditioner_type = IDENTITY;\n   if (kUserOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_CXSPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_sparsecholesky_cxsparse_user_threads_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_CXSPARSE\n#ifndef CERES_NO_THREADS\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       SparseNormalCholesky_CxSparse_UserOrdering_Threads) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 4;\n   options->linear_solver_type = SPARSE_NORMAL_CHOLESKY;\n   options->sparse_linear_algebra_library_type = CX_SPARSE;\n   options->preconditioner_type = IDENTITY;\n   if (kUserOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_THREADS\n#endif  // CERES_NO_CXSPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_sparsecholesky_eigensparse_auto_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifdef CERES_USE_EIGEN_SPARSE\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       SparseNormalCholesky_EigenSparse_AutomaticOrdering) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 1;\n   options->linear_solver_type = SPARSE_NORMAL_CHOLESKY;\n   options->sparse_linear_algebra_library_type = EIGEN_SPARSE;\n   options->preconditioner_type = IDENTITY;\n   if (kAutomaticOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_USE_EIGEN_SPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_sparsecholesky_eigensparse_auto_threads_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifdef CERES_USE_EIGEN_SPARSE\n#ifndef CERES_NO_THREADS\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       SparseNormalCholesky_EigenSparse_AutomaticOrdering_Threads) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 4;\n   options->linear_solver_type = SPARSE_NORMAL_CHOLESKY;\n   options->sparse_linear_algebra_library_type = EIGEN_SPARSE;\n   options->preconditioner_type = IDENTITY;\n   if (kAutomaticOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_THREADS\n#endif  // CERES_USE_EIGEN_SPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_sparsecholesky_eigensparse_user_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifdef CERES_USE_EIGEN_SPARSE\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       SparseNormalCholesky_EigenSparse_UserOrdering) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 1;\n   options->linear_solver_type = SPARSE_NORMAL_CHOLESKY;\n   options->sparse_linear_algebra_library_type = EIGEN_SPARSE;\n   options->preconditioner_type = IDENTITY;\n   if (kUserOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_USE_EIGEN_SPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_sparsecholesky_eigensparse_user_threads_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifdef CERES_USE_EIGEN_SPARSE\n#ifndef CERES_NO_THREADS\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       SparseNormalCholesky_EigenSparse_UserOrdering_Threads) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 4;\n   options->linear_solver_type = SPARSE_NORMAL_CHOLESKY;\n   options->sparse_linear_algebra_library_type = EIGEN_SPARSE;\n   options->preconditioner_type = IDENTITY;\n   if (kUserOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_THREADS\n#endif  // CERES_USE_EIGEN_SPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_sparsecholesky_suitesparse_auto_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_SUITESPARSE\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       SparseNormalCholesky_SuiteSparse_AutomaticOrdering) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 1;\n   options->linear_solver_type = SPARSE_NORMAL_CHOLESKY;\n   options->sparse_linear_algebra_library_type = SUITE_SPARSE;\n   options->preconditioner_type = IDENTITY;\n   if (kAutomaticOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_SUITESPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_sparsecholesky_suitesparse_auto_threads_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_SUITESPARSE\n#ifndef CERES_NO_THREADS\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       SparseNormalCholesky_SuiteSparse_AutomaticOrdering_Threads) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 4;\n   options->linear_solver_type = SPARSE_NORMAL_CHOLESKY;\n   options->sparse_linear_algebra_library_type = SUITE_SPARSE;\n   options->preconditioner_type = IDENTITY;\n   if (kAutomaticOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_THREADS\n#endif  // CERES_NO_SUITESPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_sparsecholesky_suitesparse_user_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_SUITESPARSE\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       SparseNormalCholesky_SuiteSparse_UserOrdering) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 1;\n   options->linear_solver_type = SPARSE_NORMAL_CHOLESKY;\n   options->sparse_linear_algebra_library_type = SUITE_SPARSE;\n   options->preconditioner_type = IDENTITY;\n   if (kUserOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_SUITESPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_sparsecholesky_suitesparse_user_threads_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_SUITESPARSE\n#ifndef CERES_NO_THREADS\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       SparseNormalCholesky_SuiteSparse_UserOrdering_Threads) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 4;\n   options->linear_solver_type = SPARSE_NORMAL_CHOLESKY;\n   options->sparse_linear_algebra_library_type = SUITE_SPARSE;\n   options->preconditioner_type = IDENTITY;\n   if (kUserOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_THREADS\n#endif  // CERES_NO_SUITESPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_sparseschur_acceleratesparse_auto_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_ACCELERATE_SPARSE\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       SparseSchur_AccelerateSparse_AutomaticOrdering) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 1;\n   options->linear_solver_type = SPARSE_SCHUR;\n   options->sparse_linear_algebra_library_type = ACCELERATE_SPARSE;\n   options->preconditioner_type = IDENTITY;\n   if (kAutomaticOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_ACCELERATE_SPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_sparseschur_acceleratesparse_auto_threads_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_ACCELERATE_SPARSE\n#ifndef CERES_NO_THREADS\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       SparseSchur_AccelerateSparse_AutomaticOrdering_Threads) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 4;\n   options->linear_solver_type = SPARSE_SCHUR;\n   options->sparse_linear_algebra_library_type = ACCELERATE_SPARSE;\n   options->preconditioner_type = IDENTITY;\n   if (kAutomaticOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_THREADS\n#endif  // CERES_NO_ACCELERATE_SPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_sparseschur_acceleratesparse_user_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_ACCELERATE_SPARSE\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       SparseSchur_AccelerateSparse_UserOrdering) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 1;\n   options->linear_solver_type = SPARSE_SCHUR;\n   options->sparse_linear_algebra_library_type = ACCELERATE_SPARSE;\n   options->preconditioner_type = IDENTITY;\n   if (kUserOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_ACCELERATE_SPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_sparseschur_acceleratesparse_user_threads_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_ACCELERATE_SPARSE\n#ifndef CERES_NO_THREADS\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       SparseSchur_AccelerateSparse_UserOrdering_Threads) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 4;\n   options->linear_solver_type = SPARSE_SCHUR;\n   options->sparse_linear_algebra_library_type = ACCELERATE_SPARSE;\n   options->preconditioner_type = IDENTITY;\n   if (kUserOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_THREADS\n#endif  // CERES_NO_ACCELERATE_SPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_sparseschur_cxsparse_auto_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_CXSPARSE\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       SparseSchur_CxSparse_AutomaticOrdering) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 1;\n   options->linear_solver_type = SPARSE_SCHUR;\n   options->sparse_linear_algebra_library_type = CX_SPARSE;\n   options->preconditioner_type = IDENTITY;\n   if (kAutomaticOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_CXSPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_sparseschur_cxsparse_auto_threads_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_CXSPARSE\n#ifndef CERES_NO_THREADS\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       SparseSchur_CxSparse_AutomaticOrdering_Threads) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 4;\n   options->linear_solver_type = SPARSE_SCHUR;\n   options->sparse_linear_algebra_library_type = CX_SPARSE;\n   options->preconditioner_type = IDENTITY;\n   if (kAutomaticOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_THREADS\n#endif  // CERES_NO_CXSPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_sparseschur_cxsparse_user_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_CXSPARSE\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       SparseSchur_CxSparse_UserOrdering) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 1;\n   options->linear_solver_type = SPARSE_SCHUR;\n   options->sparse_linear_algebra_library_type = CX_SPARSE;\n   options->preconditioner_type = IDENTITY;\n   if (kUserOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_CXSPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_sparseschur_cxsparse_user_threads_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_CXSPARSE\n#ifndef CERES_NO_THREADS\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       SparseSchur_CxSparse_UserOrdering_Threads) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 4;\n   options->linear_solver_type = SPARSE_SCHUR;\n   options->sparse_linear_algebra_library_type = CX_SPARSE;\n   options->preconditioner_type = IDENTITY;\n   if (kUserOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_THREADS\n#endif  // CERES_NO_CXSPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_sparseschur_eigensparse_auto_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifdef CERES_USE_EIGEN_SPARSE\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       SparseSchur_EigenSparse_AutomaticOrdering) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 1;\n   options->linear_solver_type = SPARSE_SCHUR;\n   options->sparse_linear_algebra_library_type = EIGEN_SPARSE;\n   options->preconditioner_type = IDENTITY;\n   if (kAutomaticOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_USE_EIGEN_SPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_sparseschur_eigensparse_auto_threads_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifdef CERES_USE_EIGEN_SPARSE\n#ifndef CERES_NO_THREADS\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       SparseSchur_EigenSparse_AutomaticOrdering_Threads) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 4;\n   options->linear_solver_type = SPARSE_SCHUR;\n   options->sparse_linear_algebra_library_type = EIGEN_SPARSE;\n   options->preconditioner_type = IDENTITY;\n   if (kAutomaticOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_THREADS\n#endif  // CERES_USE_EIGEN_SPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_sparseschur_eigensparse_user_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifdef CERES_USE_EIGEN_SPARSE\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       SparseSchur_EigenSparse_UserOrdering) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 1;\n   options->linear_solver_type = SPARSE_SCHUR;\n   options->sparse_linear_algebra_library_type = EIGEN_SPARSE;\n   options->preconditioner_type = IDENTITY;\n   if (kUserOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_USE_EIGEN_SPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_sparseschur_eigensparse_user_threads_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifdef CERES_USE_EIGEN_SPARSE\n#ifndef CERES_NO_THREADS\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       SparseSchur_EigenSparse_UserOrdering_Threads) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 4;\n   options->linear_solver_type = SPARSE_SCHUR;\n   options->sparse_linear_algebra_library_type = EIGEN_SPARSE;\n   options->preconditioner_type = IDENTITY;\n   if (kUserOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_THREADS\n#endif  // CERES_USE_EIGEN_SPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_sparseschur_suitesparse_auto_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_SUITESPARSE\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       SparseSchur_SuiteSparse_AutomaticOrdering) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 1;\n   options->linear_solver_type = SPARSE_SCHUR;\n   options->sparse_linear_algebra_library_type = SUITE_SPARSE;\n   options->preconditioner_type = IDENTITY;\n   if (kAutomaticOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_SUITESPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_sparseschur_suitesparse_auto_threads_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_SUITESPARSE\n#ifndef CERES_NO_THREADS\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       SparseSchur_SuiteSparse_AutomaticOrdering_Threads) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 4;\n   options->linear_solver_type = SPARSE_SCHUR;\n   options->sparse_linear_algebra_library_type = SUITE_SPARSE;\n   options->preconditioner_type = IDENTITY;\n   if (kAutomaticOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_THREADS\n#endif  // CERES_NO_SUITESPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_sparseschur_suitesparse_user_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_SUITESPARSE\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       SparseSchur_SuiteSparse_UserOrdering) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 1;\n   options->linear_solver_type = SPARSE_SCHUR;\n   options->sparse_linear_algebra_library_type = SUITE_SPARSE;\n   options->preconditioner_type = IDENTITY;\n   if (kUserOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_SUITESPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/generated_bundle_adjustment_tests/ba_sparseschur_suitesparse_user_threads_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// ========================================\n//\n// This file is generated using generate_bundle_adjustment_tests.py.\n\n#include \"bundle_adjustment_test_util.h\"\n\n#ifndef CERES_NO_SUITESPARSE\n#ifndef CERES_NO_THREADS\n\nnamespace ceres {\nnamespace internal {\n\nTEST_F(BundleAdjustmentTest,\n       SparseSchur_SuiteSparse_UserOrdering_Threads) {  // NOLINT\n   BundleAdjustmentProblem bundle_adjustment_problem;\n   Solver::Options* options =\n     bundle_adjustment_problem.mutable_solver_options();\n   options->num_threads = 4;\n   options->linear_solver_type = SPARSE_SCHUR;\n   options->sparse_linear_algebra_library_type = SUITE_SPARSE;\n   options->preconditioner_type = IDENTITY;\n   if (kUserOrdering) {\n     options->linear_solver_ordering.reset();\n   }\n   Problem* problem = bundle_adjustment_problem.mutable_problem();\n   RunSolverForConfigAndExpectResidualsMatch(*options, problem);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_THREADS\n#endif  // CERES_NO_SUITESPARSE\n\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/glog/logging.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n\n#include \"glog/logging.h\"\n\nnamespace google {\n\n// This is the set of log sinks. This must be in a separate library to ensure\n// that there is only one instance of this across the entire program.\nstd::set<google::LogSink *> log_sinks_global;\n\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/glog/logging.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: settinger@google.com (Scott Ettinger)\n//         mierle@gmail.com (Keir Mierle)\n//\n// Simplified Glog style logging with Android support. Supported macros in\n// decreasing severity level per line:\n//\n//   VLOG(2), VLOG(N)\n//   VLOG(1),\n//   LOG(INFO), VLOG(0), LG\n//   LOG(WARNING),\n//   LOG(ERROR),\n//   LOG(FATAL),\n//\n// With VLOG(n), the output is directed to one of the 5 Android log levels:\n//\n//   2 - Verbose\n//   1 - Debug\n//   0 - Info\n//  -1 - Warning\n//  -2 - Error\n//  -3 - Fatal\n//\n// Any logging of level 2 and above is directed to the Verbose level. All\n// Android log output is tagged with the string \"native\".\n//\n// If the symbol ANDROID is not defined, all output goes to std::cerr.\n// This allows code to be built on a different system for debug.\n//\n// Portions of this code are taken from the GLOG package.  This code is only a\n// small subset of the GLOG functionality. Notable differences from GLOG\n// behavior include lack of support for displaying unprintable characters and\n// lack of stack trace information upon failure of the CHECK macros.  On\n// non-Android systems, log output goes to std::cerr and is not written to a\n// file.\n//\n// CHECK macros are defined to test for conditions within code.  Any CHECK that\n// fails will log the failure and terminate the application.\n// e.g. CHECK_GE(3, 2) will pass while CHECK_GE(3, 4) will fail after logging\n//      \"Check failed 3 >= 4\".\n//\n// The following CHECK macros are defined:\n//\n//   CHECK(condition)        - fails if condition is false and logs condition.\n//   CHECK_NOTNULL(variable) - fails if the variable is NULL.\n//\n// The following binary check macros are also defined :\n//\n//   Macro                     Operator equivalent\n//   --------------------      -------------------\n//   CHECK_EQ(val1, val2)      val1 == val2\n//   CHECK_NE(val1, val2)      val1 != val2\n//   CHECK_GT(val1, val2)      val1 > val2\n//   CHECK_GE(val1, val2)      val1 >= val2\n//   CHECK_LT(val1, val2)      val1 < val2\n//   CHECK_LE(val1, val2)      val1 <= val2\n//\n// Debug only versions of all of the check macros are also defined.  These\n// macros generate no code in a release build, but avoid unused variable\n// warnings / errors.\n//\n// To use the debug only versions, prepend a D to the normal check macros, e.g.\n// DCHECK_EQ(a, b).\n\n#ifndef CERCES_INTERNAL_MINIGLOG_GLOG_LOGGING_H_\n#define CERCES_INTERNAL_MINIGLOG_GLOG_LOGGING_H_\n\n#ifdef ANDROID\n#  include <android/log.h>\n#endif  // ANDROID\n\n#include <algorithm>\n#include <ctime>\n#include <fstream>\n#include <iostream>\n#include <set>\n#include <sstream>\n#include <string>\n#include <vector>\n\n// For appropriate definition of CERES_EXPORT macro.\n#include \"ceres/internal/port.h\"\n#include \"ceres/internal/disable_warnings.h\"\n\n// Log severity level constants.\nconst int FATAL   = -3;\nconst int ERROR   = -2;\nconst int WARNING = -1;\nconst int INFO    =  0;\n\n// ------------------------- Glog compatibility ------------------------------\n\nnamespace google {\n\ntypedef int LogSeverity;\nconst int INFO    = ::INFO;\nconst int WARNING = ::WARNING;\nconst int ERROR   = ::ERROR;\nconst int FATAL   = ::FATAL;\n\n// Sink class used for integration with mock and test functions. If sinks are\n// added, all log output is also sent to each sink through the send function.\n// In this implementation, WaitTillSent() is called immediately after the send.\n// This implementation is not thread safe.\nclass CERES_EXPORT LogSink {\n public:\n  virtual ~LogSink() {}\n  virtual void send(LogSeverity severity,\n                    const char* full_filename,\n                    const char* base_filename,\n                    int line,\n                    const struct tm* tm_time,\n                    const char* message,\n                    size_t message_len) = 0;\n  virtual void WaitTillSent() = 0;\n};\n\n// Global set of log sinks. The actual object is defined in logging.cc.\nextern CERES_EXPORT std::set<LogSink *> log_sinks_global;\n\ninline void InitGoogleLogging(char *argv) {\n  // Do nothing; this is ignored.\n}\n\n// Note: the Log sink functions are not thread safe.\ninline void AddLogSink(LogSink *sink) {\n  // TODO(settinger): Add locks for thread safety.\n  log_sinks_global.insert(sink);\n}\ninline void RemoveLogSink(LogSink *sink) {\n  log_sinks_global.erase(sink);\n}\n\n}  // namespace google\n\n// ---------------------------- Logger Class --------------------------------\n\n// Class created for each use of the logging macros.\n// The logger acts as a stream and routes the final stream contents to the\n// Android logcat output at the proper filter level.  If ANDROID is not\n// defined, output is directed to std::cerr.  This class should not\n// be directly instantiated in code, rather it should be invoked through the\n// use of the log macros LG, LOG, or VLOG.\nclass CERES_EXPORT MessageLogger {\n public:\n  MessageLogger(const char *file, int line, const char *tag, int severity)\n    : file_(file), line_(line), tag_(tag), severity_(severity) {\n    // Pre-pend the stream with the file and line number.\n    StripBasename(std::string(file), &filename_only_);\n    stream_ << filename_only_ << \":\" << line << \" \";\n  }\n\n  // Output the contents of the stream to the proper channel on destruction.\n  ~MessageLogger() {\n    stream_ << \"\\n\";\n\n#ifdef ANDROID\n    static const int android_log_levels[] = {\n        ANDROID_LOG_FATAL,    // LOG(FATAL)\n        ANDROID_LOG_ERROR,    // LOG(ERROR)\n        ANDROID_LOG_WARN,     // LOG(WARNING)\n        ANDROID_LOG_INFO,     // LOG(INFO), LG, VLOG(0)\n        ANDROID_LOG_DEBUG,    // VLOG(1)\n        ANDROID_LOG_VERBOSE,  // VLOG(2) .. VLOG(N)\n    };\n\n    // Bound the logging level.\n    const int kMaxVerboseLevel = 2;\n    int android_level_index = std::min(std::max(FATAL, severity_),\n                                       kMaxVerboseLevel) - FATAL;\n    int android_log_level = android_log_levels[android_level_index];\n\n    // Output the log string the Android log at the appropriate level.\n    __android_log_write(android_log_level, tag_.c_str(), stream_.str().c_str());\n\n    // Indicate termination if needed.\n    if (severity_ == FATAL) {\n      __android_log_write(ANDROID_LOG_FATAL,\n                          tag_.c_str(),\n                          \"terminating.\\n\");\n    }\n#else\n    // If not building on Android, log all output to std::cerr.\n    std::cerr << stream_.str();\n#endif  // ANDROID\n\n    LogToSinks(severity_);\n    WaitForSinks();\n\n    // Android logging at level FATAL does not terminate execution, so abort()\n    // is still required to stop the program.\n    if (severity_ == FATAL) {\n      abort();\n    }\n  }\n\n  // Return the stream associated with the logger object.\n  std::stringstream &stream() { return stream_; }\n\n private:\n  void LogToSinks(int severity) {\n    time_t rawtime;\n    time (&rawtime);\n\n    struct tm timeinfo;\n#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__)\n    // On Windows, use secure localtime_s not localtime.\n    localtime_s(&timeinfo, &rawtime);\n#else\n    // On non-Windows systems, use threadsafe localtime_r not localtime.\n    localtime_r(&rawtime, &timeinfo);\n#endif\n\n    std::set<google::LogSink*>::iterator iter;\n    // Send the log message to all sinks.\n    for (iter = google::log_sinks_global.begin();\n         iter != google::log_sinks_global.end(); ++iter) {\n      (*iter)->send(severity, file_.c_str(), filename_only_.c_str(), line_,\n                    &timeinfo, stream_.str().c_str(), stream_.str().size());\n    }\n  }\n\n  void WaitForSinks() {\n    // TODO(settinger): Add locks for thread safety.\n    std::set<google::LogSink *>::iterator iter;\n\n    // Call WaitTillSent() for all sinks.\n    for (iter = google::log_sinks_global.begin();\n         iter != google::log_sinks_global.end(); ++iter) {\n      (*iter)->WaitTillSent();\n    }\n  }\n\n  void StripBasename(const std::string &full_path, std::string *filename) {\n    // TODO(settinger): Add support for OSs with different path separators.\n    const char kSeparator = '/';\n    size_t pos = full_path.rfind(kSeparator);\n    if (pos != std::string::npos) {\n      *filename = full_path.substr(pos + 1, std::string::npos);\n    } else {\n      *filename = full_path;\n    }\n  }\n\n  std::string file_;\n  std::string filename_only_;\n  int line_;\n  std::string tag_;\n  std::stringstream stream_;\n  int severity_;\n};\n\n// ---------------------- Logging Macro definitions --------------------------\n\n// This class is used to explicitly ignore values in the conditional\n// logging macros.  This avoids compiler warnings like \"value computed\n// is not used\" and \"statement has no effect\".\nclass CERES_EXPORT LoggerVoidify {\n public:\n  LoggerVoidify() { }\n  // This has to be an operator with a precedence lower than << but\n  // higher than ?:\n  void operator&(const std::ostream &s) { }\n};\n\n// Log only if condition is met.  Otherwise evaluates to void.\n#define LOG_IF(severity, condition) \\\n    !(condition) ? (void) 0 : LoggerVoidify() & \\\n      MessageLogger((char *)__FILE__, __LINE__, \"native\", severity).stream()\n\n// Log only if condition is NOT met.  Otherwise evaluates to void.\n#define LOG_IF_FALSE(severity, condition) LOG_IF(severity, !(condition))\n\n// LG is a convenient shortcut for LOG(INFO). Its use is in new\n// google3 code is discouraged and the following shortcut exists for\n// backward compatibility with existing code.\n#ifdef MAX_LOG_LEVEL\n#  define LOG(n)  LOG_IF(n, n <= MAX_LOG_LEVEL)\n#  define VLOG(n) LOG_IF(n, n <= MAX_LOG_LEVEL)\n#  define LG      LOG_IF(INFO, INFO <= MAX_LOG_LEVEL)\n#  define VLOG_IF(n, condition) LOG_IF(n, (n <= MAX_LOG_LEVEL) && condition)\n#else\n#  define LOG(n)  MessageLogger((char *)__FILE__, __LINE__, \"native\", n).stream()    // NOLINT\n#  define VLOG(n) MessageLogger((char *)__FILE__, __LINE__, \"native\", n).stream()    // NOLINT\n#  define LG      MessageLogger((char *)__FILE__, __LINE__, \"native\", INFO).stream() // NOLINT\n#  define VLOG_IF(n, condition) LOG_IF(n, condition)\n#endif\n\n// Currently, VLOG is always on for levels below MAX_LOG_LEVEL.\n#ifndef MAX_LOG_LEVEL\n#  define VLOG_IS_ON(x) (1)\n#else\n#  define VLOG_IS_ON(x) (x <= MAX_LOG_LEVEL)\n#endif\n\n#ifndef NDEBUG\n#  define DLOG LOG\n#else\n#  define DLOG(severity) true ? (void) 0 : LoggerVoidify() & \\\n      MessageLogger((char *)__FILE__, __LINE__, \"native\", severity).stream()\n#endif\n\n\n// Log a message and terminate.\ntemplate<class T>\nvoid LogMessageFatal(const char *file, int line, const T &message) {\n  MessageLogger((char *)__FILE__, __LINE__, \"native\", FATAL).stream()\n      << message;\n}\n\n// ---------------------------- CHECK macros ---------------------------------\n\n// Check for a given boolean condition.\n#define CHECK(condition) LOG_IF_FALSE(FATAL, condition) \\\n        << \"Check failed: \" #condition \" \"\n\n#ifndef NDEBUG\n// Debug only version of CHECK\n#  define DCHECK(condition) LOG_IF_FALSE(FATAL, condition) \\\n          << \"Check failed: \" #condition \" \"\n#else\n// Optimized version - generates no code.\n#  define DCHECK(condition) if (false) LOG_IF_FALSE(FATAL, condition) \\\n          << \"Check failed: \" #condition \" \"\n#endif  // NDEBUG\n\n// ------------------------- CHECK_OP macros ---------------------------------\n\n// Generic binary operator check macro. This should not be directly invoked,\n// instead use the binary comparison macros defined below.\n#define CHECK_OP(val1, val2, op) LOG_IF_FALSE(FATAL, ((val1) op (val2))) \\\n  << \"Check failed: \" #val1 \" \" #op \" \" #val2 \" \"\n\n// Check_op macro definitions\n#define CHECK_EQ(val1, val2) CHECK_OP(val1, val2, ==)\n#define CHECK_NE(val1, val2) CHECK_OP(val1, val2, !=)\n#define CHECK_LE(val1, val2) CHECK_OP(val1, val2, <=)\n#define CHECK_LT(val1, val2) CHECK_OP(val1, val2, <)\n#define CHECK_GE(val1, val2) CHECK_OP(val1, val2, >=)\n#define CHECK_GT(val1, val2) CHECK_OP(val1, val2, >)\n\n#ifndef NDEBUG\n// Debug only versions of CHECK_OP macros.\n#  define DCHECK_EQ(val1, val2) CHECK_OP(val1, val2, ==)\n#  define DCHECK_NE(val1, val2) CHECK_OP(val1, val2, !=)\n#  define DCHECK_LE(val1, val2) CHECK_OP(val1, val2, <=)\n#  define DCHECK_LT(val1, val2) CHECK_OP(val1, val2, <)\n#  define DCHECK_GE(val1, val2) CHECK_OP(val1, val2, >=)\n#  define DCHECK_GT(val1, val2) CHECK_OP(val1, val2, >)\n#else\n// These versions generate no code in optimized mode.\n#  define DCHECK_EQ(val1, val2) if (false) CHECK_OP(val1, val2, ==)\n#  define DCHECK_NE(val1, val2) if (false) CHECK_OP(val1, val2, !=)\n#  define DCHECK_LE(val1, val2) if (false) CHECK_OP(val1, val2, <=)\n#  define DCHECK_LT(val1, val2) if (false) CHECK_OP(val1, val2, <)\n#  define DCHECK_GE(val1, val2) if (false) CHECK_OP(val1, val2, >=)\n#  define DCHECK_GT(val1, val2) if (false) CHECK_OP(val1, val2, >)\n#endif  // NDEBUG\n\n// ---------------------------CHECK_NOTNULL macros ---------------------------\n\n// Helpers for CHECK_NOTNULL(). Two are necessary to support both raw pointers\n// and smart pointers.\ntemplate <typename T>\nT& CheckNotNullCommon(const char *file, int line, const char *names, T& t) {\n  if (t == NULL) {\n    LogMessageFatal(file, line, std::string(names));\n  }\n  return t;\n}\n\ntemplate <typename T>\nT* CheckNotNull(const char *file, int line, const char *names, T* t) {\n  return CheckNotNullCommon(file, line, names, t);\n}\n\ntemplate <typename T>\nT& CheckNotNull(const char *file, int line, const char *names, T& t) {\n  return CheckNotNullCommon(file, line, names, t);\n}\n\n// Check that a pointer is not null.\n#define CHECK_NOTNULL(val) \\\n  CheckNotNull(__FILE__, __LINE__, \"'\" #val \"' Must be non NULL\", (val))\n\n#ifndef NDEBUG\n// Debug only version of CHECK_NOTNULL\n#define DCHECK_NOTNULL(val) \\\n  CheckNotNull(__FILE__, __LINE__, \"'\" #val \"' Must be non NULL\", (val))\n#else\n// Optimized version - generates no code.\n#define DCHECK_NOTNULL(val) if (false)\\\n  CheckNotNull(__FILE__, __LINE__, \"'\" #val \"' Must be non NULL\", (val))\n#endif  // NDEBUG\n\n#include \"ceres/internal/reenable_warnings.h\"\n\n#endif  // CERCES_INTERNAL_MINIGLOG_GLOG_LOGGING_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/gmock/gmock.h",
    "content": "// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n// Google Mock - a framework for writing C++ mock classes.\n//\n// This is the main header file a user should include.\n\n// GOOGLETEST_CM0002 DO NOT DELETE\n\n#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_H_\n#define GMOCK_INCLUDE_GMOCK_GMOCK_H_\n\n// This file implements the following syntax:\n//\n//   ON_CALL(mock_object.Method(...))\n//     .With(...) ?\n//     .WillByDefault(...);\n//\n// where With() is optional and WillByDefault() must appear exactly\n// once.\n//\n//   EXPECT_CALL(mock_object.Method(...))\n//     .With(...) ?\n//     .Times(...) ?\n//     .InSequence(...) *\n//     .WillOnce(...) *\n//     .WillRepeatedly(...) ?\n//     .RetiresOnSaturation() ? ;\n//\n// where all clauses are optional and WillOnce() can be repeated.\n\n// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n// Google Mock - a framework for writing C++ mock classes.\n//\n// This file implements some commonly used actions.\n\n// GOOGLETEST_CM0002 DO NOT DELETE\n\n#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_ACTIONS_H_\n#define GMOCK_INCLUDE_GMOCK_GMOCK_ACTIONS_H_\n\n#ifndef _WIN32_WCE\n# include <errno.h>\n#endif\n\n#include <algorithm>\n#include <functional>\n#include <memory>\n#include <string>\n#include <type_traits>\n#include <utility>\n\n// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n// Google Mock - a framework for writing C++ mock classes.\n//\n// This file defines some utilities useful for implementing Google\n// Mock.  They are subject to change without notice, so please DO NOT\n// USE THEM IN USER CODE.\n\n// GOOGLETEST_CM0002 DO NOT DELETE\n\n#ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_INTERNAL_UTILS_H_\n#define GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_INTERNAL_UTILS_H_\n\n#include <stdio.h>\n#include <ostream>  // NOLINT\n#include <string>\n#include <type_traits>\n// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n//\n// Low-level types and utilities for porting Google Mock to various\n// platforms.  All macros ending with _ and symbols defined in an\n// internal namespace are subject to change without notice.  Code\n// outside Google Mock MUST NOT USE THEM DIRECTLY.  Macros that don't\n// end with _ are part of Google Mock's public API and can be used by\n// code outside Google Mock.\n\n// GOOGLETEST_CM0002 DO NOT DELETE\n\n#ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_PORT_H_\n#define GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_PORT_H_\n\n#include <assert.h>\n#include <stdlib.h>\n#include <iostream>\n\n// Most of the utilities needed for porting Google Mock are also\n// required for Google Test and are defined in gtest-port.h.\n//\n// Note to maintainers: to reduce code duplication, prefer adding\n// portability utilities to Google Test's gtest-port.h instead of\n// here, as Google Mock depends on Google Test.  Only add a utility\n// here if it's truly specific to Google Mock.\n\n#include \"gtest/gtest.h\"\n// Copyright 2015, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Injection point for custom user configurations. See README for details\n//\n// ** Custom implementation starts here **\n\n// GOOGLETEST_CM0002 DO NOT DELETE\n\n#ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_PORT_H_\n#define GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_PORT_H_\n\n#endif  // GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_PORT_H_\n\n// For MS Visual C++, check the compiler version. At least VS 2015 is\n// required to compile Google Mock.\n#if defined(_MSC_VER) && _MSC_VER < 1900\n# error \"At least Visual C++ 2015 (14.0) is required to compile Google Mock.\"\n#endif\n\n// Macro for referencing flags.  This is public as we want the user to\n// use this syntax to reference Google Mock flags.\n#define GMOCK_FLAG(name) FLAGS_gmock_##name\n\n#if !defined(GMOCK_DECLARE_bool_)\n\n// Macros for declaring flags.\n# define GMOCK_DECLARE_bool_(name) extern GTEST_API_ bool GMOCK_FLAG(name)\n# define GMOCK_DECLARE_int32_(name) \\\n    extern GTEST_API_ ::testing::internal::Int32 GMOCK_FLAG(name)\n# define GMOCK_DECLARE_string_(name) \\\n    extern GTEST_API_ ::std::string GMOCK_FLAG(name)\n\n// Macros for defining flags.\n# define GMOCK_DEFINE_bool_(name, default_val, doc) \\\n    GTEST_API_ bool GMOCK_FLAG(name) = (default_val)\n# define GMOCK_DEFINE_int32_(name, default_val, doc) \\\n    GTEST_API_ ::testing::internal::Int32 GMOCK_FLAG(name) = (default_val)\n# define GMOCK_DEFINE_string_(name, default_val, doc) \\\n    GTEST_API_ ::std::string GMOCK_FLAG(name) = (default_val)\n\n#endif  // !defined(GMOCK_DECLARE_bool_)\n\n#endif  // GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_PORT_H_\n\nnamespace testing {\n\ntemplate <typename>\nclass Matcher;\n\nnamespace internal {\n\n// Silence MSVC C4100 (unreferenced formal parameter) and\n// C4805('==': unsafe mix of type 'const int' and type 'const bool')\n#ifdef _MSC_VER\n# pragma warning(push)\n# pragma warning(disable:4100)\n# pragma warning(disable:4805)\n#endif\n\n// Joins a vector of strings as if they are fields of a tuple; returns\n// the joined string.\nGTEST_API_ std::string JoinAsTuple(const Strings& fields);\n\n// Converts an identifier name to a space-separated list of lower-case\n// words.  Each maximum substring of the form [A-Za-z][a-z]*|\\d+ is\n// treated as one word.  For example, both \"FooBar123\" and\n// \"foo_bar_123\" are converted to \"foo bar 123\".\nGTEST_API_ std::string ConvertIdentifierNameToWords(const char* id_name);\n\n// PointeeOf<Pointer>::type is the type of a value pointed to by a\n// Pointer, which can be either a smart pointer or a raw pointer.  The\n// following default implementation is for the case where Pointer is a\n// smart pointer.\ntemplate <typename Pointer>\nstruct PointeeOf {\n  // Smart pointer classes define type element_type as the type of\n  // their pointees.\n  typedef typename Pointer::element_type type;\n};\n// This specialization is for the raw pointer case.\ntemplate <typename T>\nstruct PointeeOf<T*> { typedef T type; };  // NOLINT\n\n// GetRawPointer(p) returns the raw pointer underlying p when p is a\n// smart pointer, or returns p itself when p is already a raw pointer.\n// The following default implementation is for the smart pointer case.\ntemplate <typename Pointer>\ninline const typename Pointer::element_type* GetRawPointer(const Pointer& p) {\n  return p.get();\n}\n// This overloaded version is for the raw pointer case.\ntemplate <typename Element>\ninline Element* GetRawPointer(Element* p) { return p; }\n\n// MSVC treats wchar_t as a native type usually, but treats it as the\n// same as unsigned short when the compiler option /Zc:wchar_t- is\n// specified.  It defines _NATIVE_WCHAR_T_DEFINED symbol when wchar_t\n// is a native type.\n#if defined(_MSC_VER) && !defined(_NATIVE_WCHAR_T_DEFINED)\n// wchar_t is a typedef.\n#else\n# define GMOCK_WCHAR_T_IS_NATIVE_ 1\n#endif\n\n// signed wchar_t and unsigned wchar_t are NOT in the C++ standard.\n// Using them is a bad practice and not portable.  So DON'T use them.\n//\n// Still, Google Mock is designed to work even if the user uses signed\n// wchar_t or unsigned wchar_t (obviously, assuming the compiler\n// supports them).\n//\n// To gcc,\n//   wchar_t == signed wchar_t != unsigned wchar_t == unsigned int\n#ifdef __GNUC__\n#if !defined(__WCHAR_UNSIGNED__)\n// signed/unsigned wchar_t are valid types.\n# define GMOCK_HAS_SIGNED_WCHAR_T_ 1\n#endif\n#endif\n\n// In what follows, we use the term \"kind\" to indicate whether a type\n// is bool, an integer type (excluding bool), a floating-point type,\n// or none of them.  This categorization is useful for determining\n// when a matcher argument type can be safely converted to another\n// type in the implementation of SafeMatcherCast.\nenum TypeKind {\n  kBool, kInteger, kFloatingPoint, kOther\n};\n\n// KindOf<T>::value is the kind of type T.\ntemplate <typename T> struct KindOf {\n  enum { value = kOther };  // The default kind.\n};\n\n// This macro declares that the kind of 'type' is 'kind'.\n#define GMOCK_DECLARE_KIND_(type, kind) \\\n  template <> struct KindOf<type> { enum { value = kind }; }\n\nGMOCK_DECLARE_KIND_(bool, kBool);\n\n// All standard integer types.\nGMOCK_DECLARE_KIND_(char, kInteger);\nGMOCK_DECLARE_KIND_(signed char, kInteger);\nGMOCK_DECLARE_KIND_(unsigned char, kInteger);\nGMOCK_DECLARE_KIND_(short, kInteger);  // NOLINT\nGMOCK_DECLARE_KIND_(unsigned short, kInteger);  // NOLINT\nGMOCK_DECLARE_KIND_(int, kInteger);\nGMOCK_DECLARE_KIND_(unsigned int, kInteger);\nGMOCK_DECLARE_KIND_(long, kInteger);  // NOLINT\nGMOCK_DECLARE_KIND_(unsigned long, kInteger);  // NOLINT\n\n#if GMOCK_WCHAR_T_IS_NATIVE_\nGMOCK_DECLARE_KIND_(wchar_t, kInteger);\n#endif\n\n// Non-standard integer types.\nGMOCK_DECLARE_KIND_(Int64, kInteger);\nGMOCK_DECLARE_KIND_(UInt64, kInteger);\n\n// All standard floating-point types.\nGMOCK_DECLARE_KIND_(float, kFloatingPoint);\nGMOCK_DECLARE_KIND_(double, kFloatingPoint);\nGMOCK_DECLARE_KIND_(long double, kFloatingPoint);\n\n#undef GMOCK_DECLARE_KIND_\n\n// Evaluates to the kind of 'type'.\n#define GMOCK_KIND_OF_(type) \\\n  static_cast< ::testing::internal::TypeKind>( \\\n      ::testing::internal::KindOf<type>::value)\n\n// Evaluates to true iff integer type T is signed.\n#define GMOCK_IS_SIGNED_(T) (static_cast<T>(-1) < 0)\n\n// LosslessArithmeticConvertibleImpl<kFromKind, From, kToKind, To>::value\n// is true iff arithmetic type From can be losslessly converted to\n// arithmetic type To.\n//\n// It's the user's responsibility to ensure that both From and To are\n// raw (i.e. has no CV modifier, is not a pointer, and is not a\n// reference) built-in arithmetic types, kFromKind is the kind of\n// From, and kToKind is the kind of To; the value is\n// implementation-defined when the above pre-condition is violated.\ntemplate <TypeKind kFromKind, typename From, TypeKind kToKind, typename To>\nstruct LosslessArithmeticConvertibleImpl : public false_type {};\n\n// Converting bool to bool is lossless.\ntemplate <>\nstruct LosslessArithmeticConvertibleImpl<kBool, bool, kBool, bool>\n    : public true_type {};  // NOLINT\n\n// Converting bool to any integer type is lossless.\ntemplate <typename To>\nstruct LosslessArithmeticConvertibleImpl<kBool, bool, kInteger, To>\n    : public true_type {};  // NOLINT\n\n// Converting bool to any floating-point type is lossless.\ntemplate <typename To>\nstruct LosslessArithmeticConvertibleImpl<kBool, bool, kFloatingPoint, To>\n    : public true_type {};  // NOLINT\n\n// Converting an integer to bool is lossy.\ntemplate <typename From>\nstruct LosslessArithmeticConvertibleImpl<kInteger, From, kBool, bool>\n    : public false_type {};  // NOLINT\n\n// Converting an integer to another non-bool integer is lossless iff\n// the target type's range encloses the source type's range.\ntemplate <typename From, typename To>\nstruct LosslessArithmeticConvertibleImpl<kInteger, From, kInteger, To>\n    : public bool_constant<\n      // When converting from a smaller size to a larger size, we are\n      // fine as long as we are not converting from signed to unsigned.\n      ((sizeof(From) < sizeof(To)) &&\n       (!GMOCK_IS_SIGNED_(From) || GMOCK_IS_SIGNED_(To))) ||\n      // When converting between the same size, the signedness must match.\n      ((sizeof(From) == sizeof(To)) &&\n       (GMOCK_IS_SIGNED_(From) == GMOCK_IS_SIGNED_(To)))> {};  // NOLINT\n\n#undef GMOCK_IS_SIGNED_\n\n// Converting an integer to a floating-point type may be lossy, since\n// the format of a floating-point number is implementation-defined.\ntemplate <typename From, typename To>\nstruct LosslessArithmeticConvertibleImpl<kInteger, From, kFloatingPoint, To>\n    : public false_type {};  // NOLINT\n\n// Converting a floating-point to bool is lossy.\ntemplate <typename From>\nstruct LosslessArithmeticConvertibleImpl<kFloatingPoint, From, kBool, bool>\n    : public false_type {};  // NOLINT\n\n// Converting a floating-point to an integer is lossy.\ntemplate <typename From, typename To>\nstruct LosslessArithmeticConvertibleImpl<kFloatingPoint, From, kInteger, To>\n    : public false_type {};  // NOLINT\n\n// Converting a floating-point to another floating-point is lossless\n// iff the target type is at least as big as the source type.\ntemplate <typename From, typename To>\nstruct LosslessArithmeticConvertibleImpl<\n  kFloatingPoint, From, kFloatingPoint, To>\n    : public bool_constant<sizeof(From) <= sizeof(To)> {};  // NOLINT\n\n// LosslessArithmeticConvertible<From, To>::value is true iff arithmetic\n// type From can be losslessly converted to arithmetic type To.\n//\n// It's the user's responsibility to ensure that both From and To are\n// raw (i.e. has no CV modifier, is not a pointer, and is not a\n// reference) built-in arithmetic types; the value is\n// implementation-defined when the above pre-condition is violated.\ntemplate <typename From, typename To>\nstruct LosslessArithmeticConvertible\n    : public LosslessArithmeticConvertibleImpl<\n  GMOCK_KIND_OF_(From), From, GMOCK_KIND_OF_(To), To> {};  // NOLINT\n\n// This interface knows how to report a Google Mock failure (either\n// non-fatal or fatal).\nclass FailureReporterInterface {\n public:\n  // The type of a failure (either non-fatal or fatal).\n  enum FailureType {\n    kNonfatal, kFatal\n  };\n\n  virtual ~FailureReporterInterface() {}\n\n  // Reports a failure that occurred at the given source file location.\n  virtual void ReportFailure(FailureType type, const char* file, int line,\n                             const std::string& message) = 0;\n};\n\n// Returns the failure reporter used by Google Mock.\nGTEST_API_ FailureReporterInterface* GetFailureReporter();\n\n// Asserts that condition is true; aborts the process with the given\n// message if condition is false.  We cannot use LOG(FATAL) or CHECK()\n// as Google Mock might be used to mock the log sink itself.  We\n// inline this function to prevent it from showing up in the stack\n// trace.\ninline void Assert(bool condition, const char* file, int line,\n                   const std::string& msg) {\n  if (!condition) {\n    GetFailureReporter()->ReportFailure(FailureReporterInterface::kFatal,\n                                        file, line, msg);\n  }\n}\ninline void Assert(bool condition, const char* file, int line) {\n  Assert(condition, file, line, \"Assertion failed.\");\n}\n\n// Verifies that condition is true; generates a non-fatal failure if\n// condition is false.\ninline void Expect(bool condition, const char* file, int line,\n                   const std::string& msg) {\n  if (!condition) {\n    GetFailureReporter()->ReportFailure(FailureReporterInterface::kNonfatal,\n                                        file, line, msg);\n  }\n}\ninline void Expect(bool condition, const char* file, int line) {\n  Expect(condition, file, line, \"Expectation failed.\");\n}\n\n// Severity level of a log.\nenum LogSeverity {\n  kInfo = 0,\n  kWarning = 1\n};\n\n// Valid values for the --gmock_verbose flag.\n\n// All logs (informational and warnings) are printed.\nconst char kInfoVerbosity[] = \"info\";\n// Only warnings are printed.\nconst char kWarningVerbosity[] = \"warning\";\n// No logs are printed.\nconst char kErrorVerbosity[] = \"error\";\n\n// Returns true iff a log with the given severity is visible according\n// to the --gmock_verbose flag.\nGTEST_API_ bool LogIsVisible(LogSeverity severity);\n\n// Prints the given message to stdout iff 'severity' >= the level\n// specified by the --gmock_verbose flag.  If stack_frames_to_skip >=\n// 0, also prints the stack trace excluding the top\n// stack_frames_to_skip frames.  In opt mode, any positive\n// stack_frames_to_skip is treated as 0, since we don't know which\n// function calls will be inlined by the compiler and need to be\n// conservative.\nGTEST_API_ void Log(LogSeverity severity, const std::string& message,\n                    int stack_frames_to_skip);\n\n// A marker class that is used to resolve parameterless expectations to the\n// correct overload. This must not be instantiable, to prevent client code from\n// accidentally resolving to the overload; for example:\n//\n//    ON_CALL(mock, Method({}, nullptr))...\n//\nclass WithoutMatchers {\n private:\n  WithoutMatchers() {}\n  friend GTEST_API_ WithoutMatchers GetWithoutMatchers();\n};\n\n// Internal use only: access the singleton instance of WithoutMatchers.\nGTEST_API_ WithoutMatchers GetWithoutMatchers();\n\n// Type traits.\n\n// is_reference<T>::value is non-zero iff T is a reference type.\ntemplate <typename T> struct is_reference : public false_type {};\ntemplate <typename T> struct is_reference<T&> : public true_type {};\n\n// type_equals<T1, T2>::value is non-zero iff T1 and T2 are the same type.\ntemplate <typename T1, typename T2> struct type_equals : public false_type {};\ntemplate <typename T> struct type_equals<T, T> : public true_type {};\n\n// remove_reference<T>::type removes the reference from type T, if any.\ntemplate <typename T> struct remove_reference { typedef T type; };  // NOLINT\ntemplate <typename T> struct remove_reference<T&> { typedef T type; }; // NOLINT\n\n// DecayArray<T>::type turns an array type U[N] to const U* and preserves\n// other types.  Useful for saving a copy of a function argument.\ntemplate <typename T> struct DecayArray { typedef T type; };  // NOLINT\ntemplate <typename T, size_t N> struct DecayArray<T[N]> {\n  typedef const T* type;\n};\n// Sometimes people use arrays whose size is not available at the use site\n// (e.g. extern const char kNamePrefix[]).  This specialization covers that\n// case.\ntemplate <typename T> struct DecayArray<T[]> {\n  typedef const T* type;\n};\n\n// Disable MSVC warnings for infinite recursion, since in this case the\n// the recursion is unreachable.\n#ifdef _MSC_VER\n# pragma warning(push)\n# pragma warning(disable:4717)\n#endif\n\n// Invalid<T>() is usable as an expression of type T, but will terminate\n// the program with an assertion failure if actually run.  This is useful\n// when a value of type T is needed for compilation, but the statement\n// will not really be executed (or we don't care if the statement\n// crashes).\ntemplate <typename T>\ninline T Invalid() {\n  Assert(false, \"\", -1, \"Internal error: attempt to return invalid value\");\n  // This statement is unreachable, and would never terminate even if it\n  // could be reached. It is provided only to placate compiler warnings\n  // about missing return statements.\n  return Invalid<T>();\n}\n\n#ifdef _MSC_VER\n# pragma warning(pop)\n#endif\n\n// Given a raw type (i.e. having no top-level reference or const\n// modifier) RawContainer that's either an STL-style container or a\n// native array, class StlContainerView<RawContainer> has the\n// following members:\n//\n//   - type is a type that provides an STL-style container view to\n//     (i.e. implements the STL container concept for) RawContainer;\n//   - const_reference is a type that provides a reference to a const\n//     RawContainer;\n//   - ConstReference(raw_container) returns a const reference to an STL-style\n//     container view to raw_container, which is a RawContainer.\n//   - Copy(raw_container) returns an STL-style container view of a\n//     copy of raw_container, which is a RawContainer.\n//\n// This generic version is used when RawContainer itself is already an\n// STL-style container.\ntemplate <class RawContainer>\nclass StlContainerView {\n public:\n  typedef RawContainer type;\n  typedef const type& const_reference;\n\n  static const_reference ConstReference(const RawContainer& container) {\n    // Ensures that RawContainer is not a const type.\n    testing::StaticAssertTypeEq<RawContainer,\n        GTEST_REMOVE_CONST_(RawContainer)>();\n    return container;\n  }\n  static type Copy(const RawContainer& container) { return container; }\n};\n\n// This specialization is used when RawContainer is a native array type.\ntemplate <typename Element, size_t N>\nclass StlContainerView<Element[N]> {\n public:\n  typedef GTEST_REMOVE_CONST_(Element) RawElement;\n  typedef internal::NativeArray<RawElement> type;\n  // NativeArray<T> can represent a native array either by value or by\n  // reference (selected by a constructor argument), so 'const type'\n  // can be used to reference a const native array.  We cannot\n  // 'typedef const type& const_reference' here, as that would mean\n  // ConstReference() has to return a reference to a local variable.\n  typedef const type const_reference;\n\n  static const_reference ConstReference(const Element (&array)[N]) {\n    // Ensures that Element is not a const type.\n    testing::StaticAssertTypeEq<Element, RawElement>();\n    return type(array, N, RelationToSourceReference());\n  }\n  static type Copy(const Element (&array)[N]) {\n    return type(array, N, RelationToSourceCopy());\n  }\n};\n\n// This specialization is used when RawContainer is a native array\n// represented as a (pointer, size) tuple.\ntemplate <typename ElementPointer, typename Size>\nclass StlContainerView< ::std::tuple<ElementPointer, Size> > {\n public:\n  typedef GTEST_REMOVE_CONST_(\n      typename internal::PointeeOf<ElementPointer>::type) RawElement;\n  typedef internal::NativeArray<RawElement> type;\n  typedef const type const_reference;\n\n  static const_reference ConstReference(\n      const ::std::tuple<ElementPointer, Size>& array) {\n    return type(std::get<0>(array), std::get<1>(array),\n                RelationToSourceReference());\n  }\n  static type Copy(const ::std::tuple<ElementPointer, Size>& array) {\n    return type(std::get<0>(array), std::get<1>(array), RelationToSourceCopy());\n  }\n};\n\n// The following specialization prevents the user from instantiating\n// StlContainer with a reference type.\ntemplate <typename T> class StlContainerView<T&>;\n\n// A type transform to remove constness from the first part of a pair.\n// Pairs like that are used as the value_type of associative containers,\n// and this transform produces a similar but assignable pair.\ntemplate <typename T>\nstruct RemoveConstFromKey {\n  typedef T type;\n};\n\n// Partially specialized to remove constness from std::pair<const K, V>.\ntemplate <typename K, typename V>\nstruct RemoveConstFromKey<std::pair<const K, V> > {\n  typedef std::pair<K, V> type;\n};\n\n// Mapping from booleans to types. Similar to boost::bool_<kValue> and\n// std::integral_constant<bool, kValue>.\ntemplate <bool kValue>\nstruct BooleanConstant {};\n\n// Emit an assertion failure due to incorrect DoDefault() usage. Out-of-lined to\n// reduce code size.\nGTEST_API_ void IllegalDoDefault(const char* file, int line);\n\n// Helper types for Apply() below.\ntemplate <size_t... Is> struct int_pack { typedef int_pack type; };\n\ntemplate <class Pack, size_t I> struct append;\ntemplate <size_t... Is, size_t I>\nstruct append<int_pack<Is...>, I> : int_pack<Is..., I> {};\n\ntemplate <size_t C>\nstruct make_int_pack : append<typename make_int_pack<C - 1>::type, C - 1> {};\ntemplate <> struct make_int_pack<0> : int_pack<> {};\n\ntemplate <typename F, typename Tuple, size_t... Idx>\nauto ApplyImpl(F&& f, Tuple&& args, int_pack<Idx...>) -> decltype(\n    std::forward<F>(f)(std::get<Idx>(std::forward<Tuple>(args))...)) {\n  return std::forward<F>(f)(std::get<Idx>(std::forward<Tuple>(args))...);\n}\n\n// Apply the function to a tuple of arguments.\ntemplate <typename F, typename Tuple>\nauto Apply(F&& f, Tuple&& args)\n    -> decltype(ApplyImpl(std::forward<F>(f), std::forward<Tuple>(args),\n                          make_int_pack<std::tuple_size<Tuple>::value>())) {\n  return ApplyImpl(std::forward<F>(f), std::forward<Tuple>(args),\n                   make_int_pack<std::tuple_size<Tuple>::value>());\n}\n\n// Template struct Function<F>, where F must be a function type, contains\n// the following typedefs:\n//\n//   Result:               the function's return type.\n//   Arg<N>:               the type of the N-th argument, where N starts with 0.\n//   ArgumentTuple:        the tuple type consisting of all parameters of F.\n//   ArgumentMatcherTuple: the tuple type consisting of Matchers for all\n//                         parameters of F.\n//   MakeResultVoid:       the function type obtained by substituting void\n//                         for the return type of F.\n//   MakeResultIgnoredValue:\n//                         the function type obtained by substituting Something\n//                         for the return type of F.\ntemplate <typename T>\nstruct Function;\n\ntemplate <typename R, typename... Args>\nstruct Function<R(Args...)> {\n  using Result = R;\n  static constexpr size_t ArgumentCount = sizeof...(Args);\n  template <size_t I>\n  using Arg = ElemFromList<I, typename MakeIndexSequence<sizeof...(Args)>::type,\n                           Args...>;\n  using ArgumentTuple = std::tuple<Args...>;\n  using ArgumentMatcherTuple = std::tuple<Matcher<Args>...>;\n  using MakeResultVoid = void(Args...);\n  using MakeResultIgnoredValue = IgnoredValue(Args...);\n};\n\ntemplate <typename R, typename... Args>\nconstexpr size_t Function<R(Args...)>::ArgumentCount;\n\n#ifdef _MSC_VER\n# pragma warning(pop)\n#endif\n\n}  // namespace internal\n}  // namespace testing\n\n#endif  // GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_INTERNAL_UTILS_H_\n\n#ifdef _MSC_VER\n# pragma warning(push)\n# pragma warning(disable:4100)\n#endif\n\nnamespace testing {\n\n// To implement an action Foo, define:\n//   1. a class FooAction that implements the ActionInterface interface, and\n//   2. a factory function that creates an Action object from a\n//      const FooAction*.\n//\n// The two-level delegation design follows that of Matcher, providing\n// consistency for extension developers.  It also eases ownership\n// management as Action objects can now be copied like plain values.\n\nnamespace internal {\n\n// BuiltInDefaultValueGetter<T, true>::Get() returns a\n// default-constructed T value.  BuiltInDefaultValueGetter<T,\n// false>::Get() crashes with an error.\n//\n// This primary template is used when kDefaultConstructible is true.\ntemplate <typename T, bool kDefaultConstructible>\nstruct BuiltInDefaultValueGetter {\n  static T Get() { return T(); }\n};\ntemplate <typename T>\nstruct BuiltInDefaultValueGetter<T, false> {\n  static T Get() {\n    Assert(false, __FILE__, __LINE__,\n           \"Default action undefined for the function return type.\");\n    return internal::Invalid<T>();\n    // The above statement will never be reached, but is required in\n    // order for this function to compile.\n  }\n};\n\n// BuiltInDefaultValue<T>::Get() returns the \"built-in\" default value\n// for type T, which is NULL when T is a raw pointer type, 0 when T is\n// a numeric type, false when T is bool, or \"\" when T is string or\n// std::string.  In addition, in C++11 and above, it turns a\n// default-constructed T value if T is default constructible.  For any\n// other type T, the built-in default T value is undefined, and the\n// function will abort the process.\ntemplate <typename T>\nclass BuiltInDefaultValue {\n public:\n  // This function returns true iff type T has a built-in default value.\n  static bool Exists() {\n    return ::std::is_default_constructible<T>::value;\n  }\n\n  static T Get() {\n    return BuiltInDefaultValueGetter<\n        T, ::std::is_default_constructible<T>::value>::Get();\n  }\n};\n\n// This partial specialization says that we use the same built-in\n// default value for T and const T.\ntemplate <typename T>\nclass BuiltInDefaultValue<const T> {\n public:\n  static bool Exists() { return BuiltInDefaultValue<T>::Exists(); }\n  static T Get() { return BuiltInDefaultValue<T>::Get(); }\n};\n\n// This partial specialization defines the default values for pointer\n// types.\ntemplate <typename T>\nclass BuiltInDefaultValue<T*> {\n public:\n  static bool Exists() { return true; }\n  static T* Get() { return nullptr; }\n};\n\n// The following specializations define the default values for\n// specific types we care about.\n#define GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(type, value) \\\n  template <> \\\n  class BuiltInDefaultValue<type> { \\\n   public: \\\n    static bool Exists() { return true; } \\\n    static type Get() { return value; } \\\n  }\n\nGMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(void, );  // NOLINT\n#if GTEST_HAS_GLOBAL_STRING\nGMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(::string, \"\");\n#endif  // GTEST_HAS_GLOBAL_STRING\nGMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(::std::string, \"\");\nGMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(bool, false);\nGMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned char, '\\0');\nGMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed char, '\\0');\nGMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(char, '\\0');\n\n// There's no need for a default action for signed wchar_t, as that\n// type is the same as wchar_t for gcc, and invalid for MSVC.\n//\n// There's also no need for a default action for unsigned wchar_t, as\n// that type is the same as unsigned int for gcc, and invalid for\n// MSVC.\n#if GMOCK_WCHAR_T_IS_NATIVE_\nGMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(wchar_t, 0U);  // NOLINT\n#endif\n\nGMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned short, 0U);  // NOLINT\nGMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed short, 0);     // NOLINT\nGMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned int, 0U);\nGMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed int, 0);\nGMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned long, 0UL);  // NOLINT\nGMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed long, 0L);     // NOLINT\nGMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(UInt64, 0);\nGMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(Int64, 0);\nGMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(float, 0);\nGMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(double, 0);\n\n#undef GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_\n\n}  // namespace internal\n\n// When an unexpected function call is encountered, Google Mock will\n// let it return a default value if the user has specified one for its\n// return type, or if the return type has a built-in default value;\n// otherwise Google Mock won't know what value to return and will have\n// to abort the process.\n//\n// The DefaultValue<T> class allows a user to specify the\n// default value for a type T that is both copyable and publicly\n// destructible (i.e. anything that can be used as a function return\n// type).  The usage is:\n//\n//   // Sets the default value for type T to be foo.\n//   DefaultValue<T>::Set(foo);\ntemplate <typename T>\nclass DefaultValue {\n public:\n  // Sets the default value for type T; requires T to be\n  // copy-constructable and have a public destructor.\n  static void Set(T x) {\n    delete producer_;\n    producer_ = new FixedValueProducer(x);\n  }\n\n  // Provides a factory function to be called to generate the default value.\n  // This method can be used even if T is only move-constructible, but it is not\n  // limited to that case.\n  typedef T (*FactoryFunction)();\n  static void SetFactory(FactoryFunction factory) {\n    delete producer_;\n    producer_ = new FactoryValueProducer(factory);\n  }\n\n  // Unsets the default value for type T.\n  static void Clear() {\n    delete producer_;\n    producer_ = nullptr;\n  }\n\n  // Returns true iff the user has set the default value for type T.\n  static bool IsSet() { return producer_ != nullptr; }\n\n  // Returns true if T has a default return value set by the user or there\n  // exists a built-in default value.\n  static bool Exists() {\n    return IsSet() || internal::BuiltInDefaultValue<T>::Exists();\n  }\n\n  // Returns the default value for type T if the user has set one;\n  // otherwise returns the built-in default value. Requires that Exists()\n  // is true, which ensures that the return value is well-defined.\n  static T Get() {\n    return producer_ == nullptr ? internal::BuiltInDefaultValue<T>::Get()\n                                : producer_->Produce();\n  }\n\n private:\n  class ValueProducer {\n   public:\n    virtual ~ValueProducer() {}\n    virtual T Produce() = 0;\n  };\n\n  class FixedValueProducer : public ValueProducer {\n   public:\n    explicit FixedValueProducer(T value) : value_(value) {}\n    T Produce() override { return value_; }\n\n   private:\n    const T value_;\n    GTEST_DISALLOW_COPY_AND_ASSIGN_(FixedValueProducer);\n  };\n\n  class FactoryValueProducer : public ValueProducer {\n   public:\n    explicit FactoryValueProducer(FactoryFunction factory)\n        : factory_(factory) {}\n    T Produce() override { return factory_(); }\n\n   private:\n    const FactoryFunction factory_;\n    GTEST_DISALLOW_COPY_AND_ASSIGN_(FactoryValueProducer);\n  };\n\n  static ValueProducer* producer_;\n};\n\n// This partial specialization allows a user to set default values for\n// reference types.\ntemplate <typename T>\nclass DefaultValue<T&> {\n public:\n  // Sets the default value for type T&.\n  static void Set(T& x) {  // NOLINT\n    address_ = &x;\n  }\n\n  // Unsets the default value for type T&.\n  static void Clear() { address_ = nullptr; }\n\n  // Returns true iff the user has set the default value for type T&.\n  static bool IsSet() { return address_ != nullptr; }\n\n  // Returns true if T has a default return value set by the user or there\n  // exists a built-in default value.\n  static bool Exists() {\n    return IsSet() || internal::BuiltInDefaultValue<T&>::Exists();\n  }\n\n  // Returns the default value for type T& if the user has set one;\n  // otherwise returns the built-in default value if there is one;\n  // otherwise aborts the process.\n  static T& Get() {\n    return address_ == nullptr ? internal::BuiltInDefaultValue<T&>::Get()\n                               : *address_;\n  }\n\n private:\n  static T* address_;\n};\n\n// This specialization allows DefaultValue<void>::Get() to\n// compile.\ntemplate <>\nclass DefaultValue<void> {\n public:\n  static bool Exists() { return true; }\n  static void Get() {}\n};\n\n// Points to the user-set default value for type T.\ntemplate <typename T>\ntypename DefaultValue<T>::ValueProducer* DefaultValue<T>::producer_ = nullptr;\n\n// Points to the user-set default value for type T&.\ntemplate <typename T>\nT* DefaultValue<T&>::address_ = nullptr;\n\n// Implement this interface to define an action for function type F.\ntemplate <typename F>\nclass ActionInterface {\n public:\n  typedef typename internal::Function<F>::Result Result;\n  typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;\n\n  ActionInterface() {}\n  virtual ~ActionInterface() {}\n\n  // Performs the action.  This method is not const, as in general an\n  // action can have side effects and be stateful.  For example, a\n  // get-the-next-element-from-the-collection action will need to\n  // remember the current element.\n  virtual Result Perform(const ArgumentTuple& args) = 0;\n\n private:\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(ActionInterface);\n};\n\n// An Action<F> is a copyable and IMMUTABLE (except by assignment)\n// object that represents an action to be taken when a mock function\n// of type F is called.  The implementation of Action<T> is just a\n// std::shared_ptr to const ActionInterface<T>. Don't inherit from Action!\n// You can view an object implementing ActionInterface<F> as a\n// concrete action (including its current state), and an Action<F>\n// object as a handle to it.\ntemplate <typename F>\nclass Action {\n  // Adapter class to allow constructing Action from a legacy ActionInterface.\n  // New code should create Actions from functors instead.\n  struct ActionAdapter {\n    // Adapter must be copyable to satisfy std::function requirements.\n    ::std::shared_ptr<ActionInterface<F>> impl_;\n\n    template <typename... Args>\n    typename internal::Function<F>::Result operator()(Args&&... args) {\n      return impl_->Perform(\n          ::std::forward_as_tuple(::std::forward<Args>(args)...));\n    }\n  };\n\n public:\n  typedef typename internal::Function<F>::Result Result;\n  typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;\n\n  // Constructs a null Action.  Needed for storing Action objects in\n  // STL containers.\n  Action() {}\n\n  // Construct an Action from a specified callable.\n  // This cannot take std::function directly, because then Action would not be\n  // directly constructible from lambda (it would require two conversions).\n  template <typename G,\n            typename = typename ::std::enable_if<\n                ::std::is_constructible<::std::function<F>, G>::value>::type>\n  Action(G&& fun) : fun_(::std::forward<G>(fun)) {}  // NOLINT\n\n  // Constructs an Action from its implementation.\n  explicit Action(ActionInterface<F>* impl)\n      : fun_(ActionAdapter{::std::shared_ptr<ActionInterface<F>>(impl)}) {}\n\n  // This constructor allows us to turn an Action<Func> object into an\n  // Action<F>, as long as F's arguments can be implicitly converted\n  // to Func's and Func's return type can be implicitly converted to F's.\n  template <typename Func>\n  explicit Action(const Action<Func>& action) : fun_(action.fun_) {}\n\n  // Returns true iff this is the DoDefault() action.\n  bool IsDoDefault() const { return fun_ == nullptr; }\n\n  // Performs the action.  Note that this method is const even though\n  // the corresponding method in ActionInterface is not.  The reason\n  // is that a const Action<F> means that it cannot be re-bound to\n  // another concrete action, not that the concrete action it binds to\n  // cannot change state.  (Think of the difference between a const\n  // pointer and a pointer to const.)\n  Result Perform(ArgumentTuple args) const {\n    if (IsDoDefault()) {\n      internal::IllegalDoDefault(__FILE__, __LINE__);\n    }\n    return internal::Apply(fun_, ::std::move(args));\n  }\n\n private:\n  template <typename G>\n  friend class Action;\n\n  // fun_ is an empty function iff this is the DoDefault() action.\n  ::std::function<F> fun_;\n};\n\n// The PolymorphicAction class template makes it easy to implement a\n// polymorphic action (i.e. an action that can be used in mock\n// functions of than one type, e.g. Return()).\n//\n// To define a polymorphic action, a user first provides a COPYABLE\n// implementation class that has a Perform() method template:\n//\n//   class FooAction {\n//    public:\n//     template <typename Result, typename ArgumentTuple>\n//     Result Perform(const ArgumentTuple& args) const {\n//       // Processes the arguments and returns a result, using\n//       // std::get<N>(args) to get the N-th (0-based) argument in the tuple.\n//     }\n//     ...\n//   };\n//\n// Then the user creates the polymorphic action using\n// MakePolymorphicAction(object) where object has type FooAction.  See\n// the definition of Return(void) and SetArgumentPointee<N>(value) for\n// complete examples.\ntemplate <typename Impl>\nclass PolymorphicAction {\n public:\n  explicit PolymorphicAction(const Impl& impl) : impl_(impl) {}\n\n  template <typename F>\n  operator Action<F>() const {\n    return Action<F>(new MonomorphicImpl<F>(impl_));\n  }\n\n private:\n  template <typename F>\n  class MonomorphicImpl : public ActionInterface<F> {\n   public:\n    typedef typename internal::Function<F>::Result Result;\n    typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;\n\n    explicit MonomorphicImpl(const Impl& impl) : impl_(impl) {}\n\n    Result Perform(const ArgumentTuple& args) override {\n      return impl_.template Perform<Result>(args);\n    }\n\n   private:\n    Impl impl_;\n\n    GTEST_DISALLOW_ASSIGN_(MonomorphicImpl);\n  };\n\n  Impl impl_;\n\n  GTEST_DISALLOW_ASSIGN_(PolymorphicAction);\n};\n\n// Creates an Action from its implementation and returns it.  The\n// created Action object owns the implementation.\ntemplate <typename F>\nAction<F> MakeAction(ActionInterface<F>* impl) {\n  return Action<F>(impl);\n}\n\n// Creates a polymorphic action from its implementation.  This is\n// easier to use than the PolymorphicAction<Impl> constructor as it\n// doesn't require you to explicitly write the template argument, e.g.\n//\n//   MakePolymorphicAction(foo);\n// vs\n//   PolymorphicAction<TypeOfFoo>(foo);\ntemplate <typename Impl>\ninline PolymorphicAction<Impl> MakePolymorphicAction(const Impl& impl) {\n  return PolymorphicAction<Impl>(impl);\n}\n\nnamespace internal {\n\n// Helper struct to specialize ReturnAction to execute a move instead of a copy\n// on return. Useful for move-only types, but could be used on any type.\ntemplate <typename T>\nstruct ByMoveWrapper {\n  explicit ByMoveWrapper(T value) : payload(std::move(value)) {}\n  T payload;\n};\n\n// Implements the polymorphic Return(x) action, which can be used in\n// any function that returns the type of x, regardless of the argument\n// types.\n//\n// Note: The value passed into Return must be converted into\n// Function<F>::Result when this action is cast to Action<F> rather than\n// when that action is performed. This is important in scenarios like\n//\n// MOCK_METHOD1(Method, T(U));\n// ...\n// {\n//   Foo foo;\n//   X x(&foo);\n//   EXPECT_CALL(mock, Method(_)).WillOnce(Return(x));\n// }\n//\n// In the example above the variable x holds reference to foo which leaves\n// scope and gets destroyed.  If copying X just copies a reference to foo,\n// that copy will be left with a hanging reference.  If conversion to T\n// makes a copy of foo, the above code is safe. To support that scenario, we\n// need to make sure that the type conversion happens inside the EXPECT_CALL\n// statement, and conversion of the result of Return to Action<T(U)> is a\n// good place for that.\n//\n// The real life example of the above scenario happens when an invocation\n// of gtl::Container() is passed into Return.\n//\ntemplate <typename R>\nclass ReturnAction {\n public:\n  // Constructs a ReturnAction object from the value to be returned.\n  // 'value' is passed by value instead of by const reference in order\n  // to allow Return(\"string literal\") to compile.\n  explicit ReturnAction(R value) : value_(new R(std::move(value))) {}\n\n  // This template type conversion operator allows Return(x) to be\n  // used in ANY function that returns x's type.\n  template <typename F>\n  operator Action<F>() const {  // NOLINT\n    // Assert statement belongs here because this is the best place to verify\n    // conditions on F. It produces the clearest error messages\n    // in most compilers.\n    // Impl really belongs in this scope as a local class but can't\n    // because MSVC produces duplicate symbols in different translation units\n    // in this case. Until MS fixes that bug we put Impl into the class scope\n    // and put the typedef both here (for use in assert statement) and\n    // in the Impl class. But both definitions must be the same.\n    typedef typename Function<F>::Result Result;\n    GTEST_COMPILE_ASSERT_(\n        !is_reference<Result>::value,\n        use_ReturnRef_instead_of_Return_to_return_a_reference);\n    static_assert(!std::is_void<Result>::value,\n                  \"Can't use Return() on an action expected to return `void`.\");\n    return Action<F>(new Impl<R, F>(value_));\n  }\n\n private:\n  // Implements the Return(x) action for a particular function type F.\n  template <typename R_, typename F>\n  class Impl : public ActionInterface<F> {\n   public:\n    typedef typename Function<F>::Result Result;\n    typedef typename Function<F>::ArgumentTuple ArgumentTuple;\n\n    // The implicit cast is necessary when Result has more than one\n    // single-argument constructor (e.g. Result is std::vector<int>) and R\n    // has a type conversion operator template.  In that case, value_(value)\n    // won't compile as the compiler doesn't known which constructor of\n    // Result to call.  ImplicitCast_ forces the compiler to convert R to\n    // Result without considering explicit constructors, thus resolving the\n    // ambiguity. value_ is then initialized using its copy constructor.\n    explicit Impl(const std::shared_ptr<R>& value)\n        : value_before_cast_(*value),\n          value_(ImplicitCast_<Result>(value_before_cast_)) {}\n\n    Result Perform(const ArgumentTuple&) override { return value_; }\n\n   private:\n    GTEST_COMPILE_ASSERT_(!is_reference<Result>::value,\n                          Result_cannot_be_a_reference_type);\n    // We save the value before casting just in case it is being cast to a\n    // wrapper type.\n    R value_before_cast_;\n    Result value_;\n\n    GTEST_DISALLOW_COPY_AND_ASSIGN_(Impl);\n  };\n\n  // Partially specialize for ByMoveWrapper. This version of ReturnAction will\n  // move its contents instead.\n  template <typename R_, typename F>\n  class Impl<ByMoveWrapper<R_>, F> : public ActionInterface<F> {\n   public:\n    typedef typename Function<F>::Result Result;\n    typedef typename Function<F>::ArgumentTuple ArgumentTuple;\n\n    explicit Impl(const std::shared_ptr<R>& wrapper)\n        : performed_(false), wrapper_(wrapper) {}\n\n    Result Perform(const ArgumentTuple&) override {\n      GTEST_CHECK_(!performed_)\n          << \"A ByMove() action should only be performed once.\";\n      performed_ = true;\n      return std::move(wrapper_->payload);\n    }\n\n   private:\n    bool performed_;\n    const std::shared_ptr<R> wrapper_;\n\n    GTEST_DISALLOW_ASSIGN_(Impl);\n  };\n\n  const std::shared_ptr<R> value_;\n\n  GTEST_DISALLOW_ASSIGN_(ReturnAction);\n};\n\n// Implements the ReturnNull() action.\nclass ReturnNullAction {\n public:\n  // Allows ReturnNull() to be used in any pointer-returning function. In C++11\n  // this is enforced by returning nullptr, and in non-C++11 by asserting a\n  // pointer type on compile time.\n  template <typename Result, typename ArgumentTuple>\n  static Result Perform(const ArgumentTuple&) {\n    return nullptr;\n  }\n};\n\n// Implements the Return() action.\nclass ReturnVoidAction {\n public:\n  // Allows Return() to be used in any void-returning function.\n  template <typename Result, typename ArgumentTuple>\n  static void Perform(const ArgumentTuple&) {\n    CompileAssertTypesEqual<void, Result>();\n  }\n};\n\n// Implements the polymorphic ReturnRef(x) action, which can be used\n// in any function that returns a reference to the type of x,\n// regardless of the argument types.\ntemplate <typename T>\nclass ReturnRefAction {\n public:\n  // Constructs a ReturnRefAction object from the reference to be returned.\n  explicit ReturnRefAction(T& ref) : ref_(ref) {}  // NOLINT\n\n  // This template type conversion operator allows ReturnRef(x) to be\n  // used in ANY function that returns a reference to x's type.\n  template <typename F>\n  operator Action<F>() const {\n    typedef typename Function<F>::Result Result;\n    // Asserts that the function return type is a reference.  This\n    // catches the user error of using ReturnRef(x) when Return(x)\n    // should be used, and generates some helpful error message.\n    GTEST_COMPILE_ASSERT_(internal::is_reference<Result>::value,\n                          use_Return_instead_of_ReturnRef_to_return_a_value);\n    return Action<F>(new Impl<F>(ref_));\n  }\n\n private:\n  // Implements the ReturnRef(x) action for a particular function type F.\n  template <typename F>\n  class Impl : public ActionInterface<F> {\n   public:\n    typedef typename Function<F>::Result Result;\n    typedef typename Function<F>::ArgumentTuple ArgumentTuple;\n\n    explicit Impl(T& ref) : ref_(ref) {}  // NOLINT\n\n    Result Perform(const ArgumentTuple&) override { return ref_; }\n\n   private:\n    T& ref_;\n\n    GTEST_DISALLOW_ASSIGN_(Impl);\n  };\n\n  T& ref_;\n\n  GTEST_DISALLOW_ASSIGN_(ReturnRefAction);\n};\n\n// Implements the polymorphic ReturnRefOfCopy(x) action, which can be\n// used in any function that returns a reference to the type of x,\n// regardless of the argument types.\ntemplate <typename T>\nclass ReturnRefOfCopyAction {\n public:\n  // Constructs a ReturnRefOfCopyAction object from the reference to\n  // be returned.\n  explicit ReturnRefOfCopyAction(const T& value) : value_(value) {}  // NOLINT\n\n  // This template type conversion operator allows ReturnRefOfCopy(x) to be\n  // used in ANY function that returns a reference to x's type.\n  template <typename F>\n  operator Action<F>() const {\n    typedef typename Function<F>::Result Result;\n    // Asserts that the function return type is a reference.  This\n    // catches the user error of using ReturnRefOfCopy(x) when Return(x)\n    // should be used, and generates some helpful error message.\n    GTEST_COMPILE_ASSERT_(\n        internal::is_reference<Result>::value,\n        use_Return_instead_of_ReturnRefOfCopy_to_return_a_value);\n    return Action<F>(new Impl<F>(value_));\n  }\n\n private:\n  // Implements the ReturnRefOfCopy(x) action for a particular function type F.\n  template <typename F>\n  class Impl : public ActionInterface<F> {\n   public:\n    typedef typename Function<F>::Result Result;\n    typedef typename Function<F>::ArgumentTuple ArgumentTuple;\n\n    explicit Impl(const T& value) : value_(value) {}  // NOLINT\n\n    Result Perform(const ArgumentTuple&) override { return value_; }\n\n   private:\n    T value_;\n\n    GTEST_DISALLOW_ASSIGN_(Impl);\n  };\n\n  const T value_;\n\n  GTEST_DISALLOW_ASSIGN_(ReturnRefOfCopyAction);\n};\n\n// Implements the polymorphic DoDefault() action.\nclass DoDefaultAction {\n public:\n  // This template type conversion operator allows DoDefault() to be\n  // used in any function.\n  template <typename F>\n  operator Action<F>() const { return Action<F>(); }  // NOLINT\n};\n\n// Implements the Assign action to set a given pointer referent to a\n// particular value.\ntemplate <typename T1, typename T2>\nclass AssignAction {\n public:\n  AssignAction(T1* ptr, T2 value) : ptr_(ptr), value_(value) {}\n\n  template <typename Result, typename ArgumentTuple>\n  void Perform(const ArgumentTuple& /* args */) const {\n    *ptr_ = value_;\n  }\n\n private:\n  T1* const ptr_;\n  const T2 value_;\n\n  GTEST_DISALLOW_ASSIGN_(AssignAction);\n};\n\n#if !GTEST_OS_WINDOWS_MOBILE\n\n// Implements the SetErrnoAndReturn action to simulate return from\n// various system calls and libc functions.\ntemplate <typename T>\nclass SetErrnoAndReturnAction {\n public:\n  SetErrnoAndReturnAction(int errno_value, T result)\n      : errno_(errno_value),\n        result_(result) {}\n  template <typename Result, typename ArgumentTuple>\n  Result Perform(const ArgumentTuple& /* args */) const {\n    errno = errno_;\n    return result_;\n  }\n\n private:\n  const int errno_;\n  const T result_;\n\n  GTEST_DISALLOW_ASSIGN_(SetErrnoAndReturnAction);\n};\n\n#endif  // !GTEST_OS_WINDOWS_MOBILE\n\n// Implements the SetArgumentPointee<N>(x) action for any function\n// whose N-th argument (0-based) is a pointer to x's type.  The\n// template parameter kIsProto is true iff type A is ProtocolMessage,\n// proto2::Message, or a sub-class of those.\ntemplate <size_t N, typename A, bool kIsProto>\nclass SetArgumentPointeeAction {\n public:\n  // Constructs an action that sets the variable pointed to by the\n  // N-th function argument to 'value'.\n  explicit SetArgumentPointeeAction(const A& value) : value_(value) {}\n\n  template <typename Result, typename ArgumentTuple>\n  void Perform(const ArgumentTuple& args) const {\n    CompileAssertTypesEqual<void, Result>();\n    *::std::get<N>(args) = value_;\n  }\n\n private:\n  const A value_;\n\n  GTEST_DISALLOW_ASSIGN_(SetArgumentPointeeAction);\n};\n\ntemplate <size_t N, typename Proto>\nclass SetArgumentPointeeAction<N, Proto, true> {\n public:\n  // Constructs an action that sets the variable pointed to by the\n  // N-th function argument to 'proto'.  Both ProtocolMessage and\n  // proto2::Message have the CopyFrom() method, so the same\n  // implementation works for both.\n  explicit SetArgumentPointeeAction(const Proto& proto) : proto_(new Proto) {\n    proto_->CopyFrom(proto);\n  }\n\n  template <typename Result, typename ArgumentTuple>\n  void Perform(const ArgumentTuple& args) const {\n    CompileAssertTypesEqual<void, Result>();\n    ::std::get<N>(args)->CopyFrom(*proto_);\n  }\n\n private:\n  const std::shared_ptr<Proto> proto_;\n\n  GTEST_DISALLOW_ASSIGN_(SetArgumentPointeeAction);\n};\n\n// Implements the Invoke(object_ptr, &Class::Method) action.\ntemplate <class Class, typename MethodPtr>\nstruct InvokeMethodAction {\n  Class* const obj_ptr;\n  const MethodPtr method_ptr;\n\n  template <typename... Args>\n  auto operator()(Args&&... args) const\n      -> decltype((obj_ptr->*method_ptr)(std::forward<Args>(args)...)) {\n    return (obj_ptr->*method_ptr)(std::forward<Args>(args)...);\n  }\n};\n\n// Implements the InvokeWithoutArgs(f) action.  The template argument\n// FunctionImpl is the implementation type of f, which can be either a\n// function pointer or a functor.  InvokeWithoutArgs(f) can be used as an\n// Action<F> as long as f's type is compatible with F.\ntemplate <typename FunctionImpl>\nstruct InvokeWithoutArgsAction {\n  FunctionImpl function_impl;\n\n  // Allows InvokeWithoutArgs(f) to be used as any action whose type is\n  // compatible with f.\n  template <typename... Args>\n  auto operator()(const Args&...) -> decltype(function_impl()) {\n    return function_impl();\n  }\n};\n\n// Implements the InvokeWithoutArgs(object_ptr, &Class::Method) action.\ntemplate <class Class, typename MethodPtr>\nstruct InvokeMethodWithoutArgsAction {\n  Class* const obj_ptr;\n  const MethodPtr method_ptr;\n\n  using ReturnType = typename std::result_of<MethodPtr(Class*)>::type;\n\n  template <typename... Args>\n  ReturnType operator()(const Args&...) const {\n    return (obj_ptr->*method_ptr)();\n  }\n};\n\n// Implements the IgnoreResult(action) action.\ntemplate <typename A>\nclass IgnoreResultAction {\n public:\n  explicit IgnoreResultAction(const A& action) : action_(action) {}\n\n  template <typename F>\n  operator Action<F>() const {\n    // Assert statement belongs here because this is the best place to verify\n    // conditions on F. It produces the clearest error messages\n    // in most compilers.\n    // Impl really belongs in this scope as a local class but can't\n    // because MSVC produces duplicate symbols in different translation units\n    // in this case. Until MS fixes that bug we put Impl into the class scope\n    // and put the typedef both here (for use in assert statement) and\n    // in the Impl class. But both definitions must be the same.\n    typedef typename internal::Function<F>::Result Result;\n\n    // Asserts at compile time that F returns void.\n    CompileAssertTypesEqual<void, Result>();\n\n    return Action<F>(new Impl<F>(action_));\n  }\n\n private:\n  template <typename F>\n  class Impl : public ActionInterface<F> {\n   public:\n    typedef typename internal::Function<F>::Result Result;\n    typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;\n\n    explicit Impl(const A& action) : action_(action) {}\n\n    void Perform(const ArgumentTuple& args) override {\n      // Performs the action and ignores its result.\n      action_.Perform(args);\n    }\n\n   private:\n    // Type OriginalFunction is the same as F except that its return\n    // type is IgnoredValue.\n    typedef typename internal::Function<F>::MakeResultIgnoredValue\n        OriginalFunction;\n\n    const Action<OriginalFunction> action_;\n\n    GTEST_DISALLOW_ASSIGN_(Impl);\n  };\n\n  const A action_;\n\n  GTEST_DISALLOW_ASSIGN_(IgnoreResultAction);\n};\n\ntemplate <typename InnerAction, size_t... I>\nstruct WithArgsAction {\n  InnerAction action;\n\n  // The inner action could be anything convertible to Action<X>.\n  // We use the conversion operator to detect the signature of the inner Action.\n  template <typename R, typename... Args>\n  operator Action<R(Args...)>() const {  // NOLINT\n    Action<R(typename std::tuple_element<I, std::tuple<Args...>>::type...)>\n        converted(action);\n\n    return [converted](Args... args) -> R {\n      return converted.Perform(std::forward_as_tuple(\n        std::get<I>(std::forward_as_tuple(std::forward<Args>(args)...))...));\n    };\n  }\n};\n\ntemplate <typename... Actions>\nstruct DoAllAction {\n private:\n  template <typename... Args, size_t... I>\n  std::vector<Action<void(Args...)>> Convert(IndexSequence<I...>) const {\n    return {std::get<I>(actions)...};\n  }\n\n public:\n  std::tuple<Actions...> actions;\n\n  template <typename R, typename... Args>\n  operator Action<R(Args...)>() const {  // NOLINT\n    struct Op {\n      std::vector<Action<void(Args...)>> converted;\n      Action<R(Args...)> last;\n      R operator()(Args... args) const {\n        auto tuple_args = std::forward_as_tuple(std::forward<Args>(args)...);\n        for (auto& a : converted) {\n          a.Perform(tuple_args);\n        }\n        return last.Perform(tuple_args);\n      }\n    };\n    return Op{Convert<Args...>(MakeIndexSequence<sizeof...(Actions) - 1>()),\n              std::get<sizeof...(Actions) - 1>(actions)};\n  }\n};\n\n}  // namespace internal\n\n// An Unused object can be implicitly constructed from ANY value.\n// This is handy when defining actions that ignore some or all of the\n// mock function arguments.  For example, given\n//\n//   MOCK_METHOD3(Foo, double(const string& label, double x, double y));\n//   MOCK_METHOD3(Bar, double(int index, double x, double y));\n//\n// instead of\n//\n//   double DistanceToOriginWithLabel(const string& label, double x, double y) {\n//     return sqrt(x*x + y*y);\n//   }\n//   double DistanceToOriginWithIndex(int index, double x, double y) {\n//     return sqrt(x*x + y*y);\n//   }\n//   ...\n//   EXPECT_CALL(mock, Foo(\"abc\", _, _))\n//       .WillOnce(Invoke(DistanceToOriginWithLabel));\n//   EXPECT_CALL(mock, Bar(5, _, _))\n//       .WillOnce(Invoke(DistanceToOriginWithIndex));\n//\n// you could write\n//\n//   // We can declare any uninteresting argument as Unused.\n//   double DistanceToOrigin(Unused, double x, double y) {\n//     return sqrt(x*x + y*y);\n//   }\n//   ...\n//   EXPECT_CALL(mock, Foo(\"abc\", _, _)).WillOnce(Invoke(DistanceToOrigin));\n//   EXPECT_CALL(mock, Bar(5, _, _)).WillOnce(Invoke(DistanceToOrigin));\ntypedef internal::IgnoredValue Unused;\n\n// Creates an action that does actions a1, a2, ..., sequentially in\n// each invocation.\ntemplate <typename... Action>\ninternal::DoAllAction<typename std::decay<Action>::type...> DoAll(\n    Action&&... action) {\n  return {std::forward_as_tuple(std::forward<Action>(action)...)};\n}\n\n// WithArg<k>(an_action) creates an action that passes the k-th\n// (0-based) argument of the mock function to an_action and performs\n// it.  It adapts an action accepting one argument to one that accepts\n// multiple arguments.  For convenience, we also provide\n// WithArgs<k>(an_action) (defined below) as a synonym.\ntemplate <size_t k, typename InnerAction>\ninternal::WithArgsAction<typename std::decay<InnerAction>::type, k>\nWithArg(InnerAction&& action) {\n  return {std::forward<InnerAction>(action)};\n}\n\n// WithArgs<N1, N2, ..., Nk>(an_action) creates an action that passes\n// the selected arguments of the mock function to an_action and\n// performs it.  It serves as an adaptor between actions with\n// different argument lists.\ntemplate <size_t k, size_t... ks, typename InnerAction>\ninternal::WithArgsAction<typename std::decay<InnerAction>::type, k, ks...>\nWithArgs(InnerAction&& action) {\n  return {std::forward<InnerAction>(action)};\n}\n\n// WithoutArgs(inner_action) can be used in a mock function with a\n// non-empty argument list to perform inner_action, which takes no\n// argument.  In other words, it adapts an action accepting no\n// argument to one that accepts (and ignores) arguments.\ntemplate <typename InnerAction>\ninternal::WithArgsAction<typename std::decay<InnerAction>::type>\nWithoutArgs(InnerAction&& action) {\n  return {std::forward<InnerAction>(action)};\n}\n\n// Creates an action that returns 'value'.  'value' is passed by value\n// instead of const reference - otherwise Return(\"string literal\")\n// will trigger a compiler error about using array as initializer.\ntemplate <typename R>\ninternal::ReturnAction<R> Return(R value) {\n  return internal::ReturnAction<R>(std::move(value));\n}\n\n// Creates an action that returns NULL.\ninline PolymorphicAction<internal::ReturnNullAction> ReturnNull() {\n  return MakePolymorphicAction(internal::ReturnNullAction());\n}\n\n// Creates an action that returns from a void function.\ninline PolymorphicAction<internal::ReturnVoidAction> Return() {\n  return MakePolymorphicAction(internal::ReturnVoidAction());\n}\n\n// Creates an action that returns the reference to a variable.\ntemplate <typename R>\ninline internal::ReturnRefAction<R> ReturnRef(R& x) {  // NOLINT\n  return internal::ReturnRefAction<R>(x);\n}\n\n// Creates an action that returns the reference to a copy of the\n// argument.  The copy is created when the action is constructed and\n// lives as long as the action.\ntemplate <typename R>\ninline internal::ReturnRefOfCopyAction<R> ReturnRefOfCopy(const R& x) {\n  return internal::ReturnRefOfCopyAction<R>(x);\n}\n\n// Modifies the parent action (a Return() action) to perform a move of the\n// argument instead of a copy.\n// Return(ByMove()) actions can only be executed once and will assert this\n// invariant.\ntemplate <typename R>\ninternal::ByMoveWrapper<R> ByMove(R x) {\n  return internal::ByMoveWrapper<R>(std::move(x));\n}\n\n// Creates an action that does the default action for the give mock function.\ninline internal::DoDefaultAction DoDefault() {\n  return internal::DoDefaultAction();\n}\n\n// Creates an action that sets the variable pointed by the N-th\n// (0-based) function argument to 'value'.\ntemplate <size_t N, typename T>\nPolymorphicAction<\n  internal::SetArgumentPointeeAction<\n    N, T, internal::IsAProtocolMessage<T>::value> >\nSetArgPointee(const T& x) {\n  return MakePolymorphicAction(internal::SetArgumentPointeeAction<\n      N, T, internal::IsAProtocolMessage<T>::value>(x));\n}\n\ntemplate <size_t N>\nPolymorphicAction<\n  internal::SetArgumentPointeeAction<N, const char*, false> >\nSetArgPointee(const char* p) {\n  return MakePolymorphicAction(internal::SetArgumentPointeeAction<\n      N, const char*, false>(p));\n}\n\ntemplate <size_t N>\nPolymorphicAction<\n  internal::SetArgumentPointeeAction<N, const wchar_t*, false> >\nSetArgPointee(const wchar_t* p) {\n  return MakePolymorphicAction(internal::SetArgumentPointeeAction<\n      N, const wchar_t*, false>(p));\n}\n\n// The following version is DEPRECATED.\ntemplate <size_t N, typename T>\nPolymorphicAction<\n  internal::SetArgumentPointeeAction<\n    N, T, internal::IsAProtocolMessage<T>::value> >\nSetArgumentPointee(const T& x) {\n  return MakePolymorphicAction(internal::SetArgumentPointeeAction<\n      N, T, internal::IsAProtocolMessage<T>::value>(x));\n}\n\n// Creates an action that sets a pointer referent to a given value.\ntemplate <typename T1, typename T2>\nPolymorphicAction<internal::AssignAction<T1, T2> > Assign(T1* ptr, T2 val) {\n  return MakePolymorphicAction(internal::AssignAction<T1, T2>(ptr, val));\n}\n\n#if !GTEST_OS_WINDOWS_MOBILE\n\n// Creates an action that sets errno and returns the appropriate error.\ntemplate <typename T>\nPolymorphicAction<internal::SetErrnoAndReturnAction<T> >\nSetErrnoAndReturn(int errval, T result) {\n  return MakePolymorphicAction(\n      internal::SetErrnoAndReturnAction<T>(errval, result));\n}\n\n#endif  // !GTEST_OS_WINDOWS_MOBILE\n\n// Various overloads for Invoke().\n\n// Legacy function.\n// Actions can now be implicitly constructed from callables. No need to create\n// wrapper objects.\n// This function exists for backwards compatibility.\ntemplate <typename FunctionImpl>\ntypename std::decay<FunctionImpl>::type Invoke(FunctionImpl&& function_impl) {\n  return std::forward<FunctionImpl>(function_impl);\n}\n\n// Creates an action that invokes the given method on the given object\n// with the mock function's arguments.\ntemplate <class Class, typename MethodPtr>\ninternal::InvokeMethodAction<Class, MethodPtr> Invoke(Class* obj_ptr,\n                                                      MethodPtr method_ptr) {\n  return {obj_ptr, method_ptr};\n}\n\n// Creates an action that invokes 'function_impl' with no argument.\ntemplate <typename FunctionImpl>\ninternal::InvokeWithoutArgsAction<typename std::decay<FunctionImpl>::type>\nInvokeWithoutArgs(FunctionImpl function_impl) {\n  return {std::move(function_impl)};\n}\n\n// Creates an action that invokes the given method on the given object\n// with no argument.\ntemplate <class Class, typename MethodPtr>\ninternal::InvokeMethodWithoutArgsAction<Class, MethodPtr> InvokeWithoutArgs(\n    Class* obj_ptr, MethodPtr method_ptr) {\n  return {obj_ptr, method_ptr};\n}\n\n// Creates an action that performs an_action and throws away its\n// result.  In other words, it changes the return type of an_action to\n// void.  an_action MUST NOT return void, or the code won't compile.\ntemplate <typename A>\ninline internal::IgnoreResultAction<A> IgnoreResult(const A& an_action) {\n  return internal::IgnoreResultAction<A>(an_action);\n}\n\n// Creates a reference wrapper for the given L-value.  If necessary,\n// you can explicitly specify the type of the reference.  For example,\n// suppose 'derived' is an object of type Derived, ByRef(derived)\n// would wrap a Derived&.  If you want to wrap a const Base& instead,\n// where Base is a base class of Derived, just write:\n//\n//   ByRef<const Base>(derived)\n//\n// N.B. ByRef is redundant with std::ref, std::cref and std::reference_wrapper.\n// However, it may still be used for consistency with ByMove().\ntemplate <typename T>\ninline ::std::reference_wrapper<T> ByRef(T& l_value) {  // NOLINT\n  return ::std::reference_wrapper<T>(l_value);\n}\n\n}  // namespace testing\n\n#ifdef _MSC_VER\n# pragma warning(pop)\n#endif\n\n\n#endif  // GMOCK_INCLUDE_GMOCK_GMOCK_ACTIONS_H_\n// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n// Google Mock - a framework for writing C++ mock classes.\n//\n// This file implements some commonly used cardinalities.  More\n// cardinalities can be defined by the user implementing the\n// CardinalityInterface interface if necessary.\n\n// GOOGLETEST_CM0002 DO NOT DELETE\n\n#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_CARDINALITIES_H_\n#define GMOCK_INCLUDE_GMOCK_GMOCK_CARDINALITIES_H_\n\n#include <limits.h>\n#include <memory>\n#include <ostream>  // NOLINT\n\nGTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \\\n/* class A needs to have dll-interface to be used by clients of class B */)\n\nnamespace testing {\n\n// To implement a cardinality Foo, define:\n//   1. a class FooCardinality that implements the\n//      CardinalityInterface interface, and\n//   2. a factory function that creates a Cardinality object from a\n//      const FooCardinality*.\n//\n// The two-level delegation design follows that of Matcher, providing\n// consistency for extension developers.  It also eases ownership\n// management as Cardinality objects can now be copied like plain values.\n\n// The implementation of a cardinality.\nclass CardinalityInterface {\n public:\n  virtual ~CardinalityInterface() {}\n\n  // Conservative estimate on the lower/upper bound of the number of\n  // calls allowed.\n  virtual int ConservativeLowerBound() const { return 0; }\n  virtual int ConservativeUpperBound() const { return INT_MAX; }\n\n  // Returns true iff call_count calls will satisfy this cardinality.\n  virtual bool IsSatisfiedByCallCount(int call_count) const = 0;\n\n  // Returns true iff call_count calls will saturate this cardinality.\n  virtual bool IsSaturatedByCallCount(int call_count) const = 0;\n\n  // Describes self to an ostream.\n  virtual void DescribeTo(::std::ostream* os) const = 0;\n};\n\n// A Cardinality is a copyable and IMMUTABLE (except by assignment)\n// object that specifies how many times a mock function is expected to\n// be called.  The implementation of Cardinality is just a std::shared_ptr\n// to const CardinalityInterface. Don't inherit from Cardinality!\nclass GTEST_API_ Cardinality {\n public:\n  // Constructs a null cardinality.  Needed for storing Cardinality\n  // objects in STL containers.\n  Cardinality() {}\n\n  // Constructs a Cardinality from its implementation.\n  explicit Cardinality(const CardinalityInterface* impl) : impl_(impl) {}\n\n  // Conservative estimate on the lower/upper bound of the number of\n  // calls allowed.\n  int ConservativeLowerBound() const { return impl_->ConservativeLowerBound(); }\n  int ConservativeUpperBound() const { return impl_->ConservativeUpperBound(); }\n\n  // Returns true iff call_count calls will satisfy this cardinality.\n  bool IsSatisfiedByCallCount(int call_count) const {\n    return impl_->IsSatisfiedByCallCount(call_count);\n  }\n\n  // Returns true iff call_count calls will saturate this cardinality.\n  bool IsSaturatedByCallCount(int call_count) const {\n    return impl_->IsSaturatedByCallCount(call_count);\n  }\n\n  // Returns true iff call_count calls will over-saturate this\n  // cardinality, i.e. exceed the maximum number of allowed calls.\n  bool IsOverSaturatedByCallCount(int call_count) const {\n    return impl_->IsSaturatedByCallCount(call_count) &&\n        !impl_->IsSatisfiedByCallCount(call_count);\n  }\n\n  // Describes self to an ostream\n  void DescribeTo(::std::ostream* os) const { impl_->DescribeTo(os); }\n\n  // Describes the given actual call count to an ostream.\n  static void DescribeActualCallCountTo(int actual_call_count,\n                                        ::std::ostream* os);\n\n private:\n  std::shared_ptr<const CardinalityInterface> impl_;\n};\n\n// Creates a cardinality that allows at least n calls.\nGTEST_API_ Cardinality AtLeast(int n);\n\n// Creates a cardinality that allows at most n calls.\nGTEST_API_ Cardinality AtMost(int n);\n\n// Creates a cardinality that allows any number of calls.\nGTEST_API_ Cardinality AnyNumber();\n\n// Creates a cardinality that allows between min and max calls.\nGTEST_API_ Cardinality Between(int min, int max);\n\n// Creates a cardinality that allows exactly n calls.\nGTEST_API_ Cardinality Exactly(int n);\n\n// Creates a cardinality from its implementation.\ninline Cardinality MakeCardinality(const CardinalityInterface* c) {\n  return Cardinality(c);\n}\n\n}  // namespace testing\n\nGTEST_DISABLE_MSC_WARNINGS_POP_()  //  4251\n\n#endif  // GMOCK_INCLUDE_GMOCK_GMOCK_CARDINALITIES_H_\n#ifndef THIRD_PARTY_GOOGLETEST_GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_FUNCTION_MOCKER_H_  // NOLINT\n#define THIRD_PARTY_GOOGLETEST_GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_FUNCTION_MOCKER_H_  // NOLINT\n\n// This file was GENERATED by command:\n//     pump.py gmock-generated-function-mockers.h.pump\n// DO NOT EDIT BY HAND!!!\n\n// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n// Google Mock - a framework for writing C++ mock classes.\n//\n// This file implements function mockers of various arities.\n\n// GOOGLETEST_CM0002 DO NOT DELETE\n\n#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_\n#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_\n\n#include <functional>\n#include <utility>\n\n// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n// Google Mock - a framework for writing C++ mock classes.\n//\n// This file implements the ON_CALL() and EXPECT_CALL() macros.\n//\n// A user can use the ON_CALL() macro to specify the default action of\n// a mock method.  The syntax is:\n//\n//   ON_CALL(mock_object, Method(argument-matchers))\n//       .With(multi-argument-matcher)\n//       .WillByDefault(action);\n//\n//  where the .With() clause is optional.\n//\n// A user can use the EXPECT_CALL() macro to specify an expectation on\n// a mock method.  The syntax is:\n//\n//   EXPECT_CALL(mock_object, Method(argument-matchers))\n//       .With(multi-argument-matchers)\n//       .Times(cardinality)\n//       .InSequence(sequences)\n//       .After(expectations)\n//       .WillOnce(action)\n//       .WillRepeatedly(action)\n//       .RetiresOnSaturation();\n//\n// where all clauses are optional, and .InSequence()/.After()/\n// .WillOnce() can appear any number of times.\n\n// GOOGLETEST_CM0002 DO NOT DELETE\n\n#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_SPEC_BUILDERS_H_\n#define GMOCK_INCLUDE_GMOCK_GMOCK_SPEC_BUILDERS_H_\n\n#include <map>\n#include <memory>\n#include <set>\n#include <sstream>\n#include <string>\n#include <utility>\n#include <vector>\n// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n// Google Mock - a framework for writing C++ mock classes.\n//\n// This file implements some commonly used argument matchers.  More\n// matchers can be defined by the user implementing the\n// MatcherInterface<T> interface if necessary.\n//\n// See googletest/include/gtest/gtest-matchers.h for the definition of class\n// Matcher, class MatcherInterface, and others.\n\n// GOOGLETEST_CM0002 DO NOT DELETE\n\n#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_MATCHERS_H_\n#define GMOCK_INCLUDE_GMOCK_GMOCK_MATCHERS_H_\n\n#include <math.h>\n#include <algorithm>\n#include <initializer_list>\n#include <iterator>\n#include <limits>\n#include <memory>\n#include <ostream>  // NOLINT\n#include <sstream>\n#include <string>\n#include <type_traits>\n#include <utility>\n#include <vector>\n\nGTEST_DISABLE_MSC_WARNINGS_PUSH_(\n    4251 5046 /* class A needs to have dll-interface to be used by clients of\n                 class B */\n    /* Symbol involving type with internal linkage not defined */)\n\nnamespace testing {\n\n// To implement a matcher Foo for type T, define:\n//   1. a class FooMatcherImpl that implements the\n//      MatcherInterface<T> interface, and\n//   2. a factory function that creates a Matcher<T> object from a\n//      FooMatcherImpl*.\n//\n// The two-level delegation design makes it possible to allow a user\n// to write \"v\" instead of \"Eq(v)\" where a Matcher is expected, which\n// is impossible if we pass matchers by pointers.  It also eases\n// ownership management as Matcher objects can now be copied like\n// plain values.\n\n// A match result listener that stores the explanation in a string.\nclass StringMatchResultListener : public MatchResultListener {\n public:\n  StringMatchResultListener() : MatchResultListener(&ss_) {}\n\n  // Returns the explanation accumulated so far.\n  std::string str() const { return ss_.str(); }\n\n  // Clears the explanation accumulated so far.\n  void Clear() { ss_.str(\"\"); }\n\n private:\n  ::std::stringstream ss_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(StringMatchResultListener);\n};\n\n// Anything inside the 'internal' namespace IS INTERNAL IMPLEMENTATION\n// and MUST NOT BE USED IN USER CODE!!!\nnamespace internal {\n\n// The MatcherCastImpl class template is a helper for implementing\n// MatcherCast().  We need this helper in order to partially\n// specialize the implementation of MatcherCast() (C++ allows\n// class/struct templates to be partially specialized, but not\n// function templates.).\n\n// This general version is used when MatcherCast()'s argument is a\n// polymorphic matcher (i.e. something that can be converted to a\n// Matcher but is not one yet; for example, Eq(value)) or a value (for\n// example, \"hello\").\ntemplate <typename T, typename M>\nclass MatcherCastImpl {\n public:\n  static Matcher<T> Cast(const M& polymorphic_matcher_or_value) {\n    // M can be a polymorphic matcher, in which case we want to use\n    // its conversion operator to create Matcher<T>.  Or it can be a value\n    // that should be passed to the Matcher<T>'s constructor.\n    //\n    // We can't call Matcher<T>(polymorphic_matcher_or_value) when M is a\n    // polymorphic matcher because it'll be ambiguous if T has an implicit\n    // constructor from M (this usually happens when T has an implicit\n    // constructor from any type).\n    //\n    // It won't work to unconditionally implict_cast\n    // polymorphic_matcher_or_value to Matcher<T> because it won't trigger\n    // a user-defined conversion from M to T if one exists (assuming M is\n    // a value).\n    return CastImpl(\n        polymorphic_matcher_or_value,\n        BooleanConstant<\n            std::is_convertible<M, Matcher<T> >::value>(),\n        BooleanConstant<\n            std::is_convertible<M, T>::value>());\n  }\n\n private:\n  template <bool Ignore>\n  static Matcher<T> CastImpl(const M& polymorphic_matcher_or_value,\n                             BooleanConstant<true> /* convertible_to_matcher */,\n                             BooleanConstant<Ignore>) {\n    // M is implicitly convertible to Matcher<T>, which means that either\n    // M is a polymorphic matcher or Matcher<T> has an implicit constructor\n    // from M.  In both cases using the implicit conversion will produce a\n    // matcher.\n    //\n    // Even if T has an implicit constructor from M, it won't be called because\n    // creating Matcher<T> would require a chain of two user-defined conversions\n    // (first to create T from M and then to create Matcher<T> from T).\n    return polymorphic_matcher_or_value;\n  }\n\n  // M can't be implicitly converted to Matcher<T>, so M isn't a polymorphic\n  // matcher. It's a value of a type implicitly convertible to T. Use direct\n  // initialization to create a matcher.\n  static Matcher<T> CastImpl(\n      const M& value, BooleanConstant<false> /* convertible_to_matcher */,\n      BooleanConstant<true> /* convertible_to_T */) {\n    return Matcher<T>(ImplicitCast_<T>(value));\n  }\n\n  // M can't be implicitly converted to either Matcher<T> or T. Attempt to use\n  // polymorphic matcher Eq(value) in this case.\n  //\n  // Note that we first attempt to perform an implicit cast on the value and\n  // only fall back to the polymorphic Eq() matcher afterwards because the\n  // latter calls bool operator==(const Lhs& lhs, const Rhs& rhs) in the end\n  // which might be undefined even when Rhs is implicitly convertible to Lhs\n  // (e.g. std::pair<const int, int> vs. std::pair<int, int>).\n  //\n  // We don't define this method inline as we need the declaration of Eq().\n  static Matcher<T> CastImpl(\n      const M& value, BooleanConstant<false> /* convertible_to_matcher */,\n      BooleanConstant<false> /* convertible_to_T */);\n};\n\n// This more specialized version is used when MatcherCast()'s argument\n// is already a Matcher.  This only compiles when type T can be\n// statically converted to type U.\ntemplate <typename T, typename U>\nclass MatcherCastImpl<T, Matcher<U> > {\n public:\n  static Matcher<T> Cast(const Matcher<U>& source_matcher) {\n    return Matcher<T>(new Impl(source_matcher));\n  }\n\n private:\n  class Impl : public MatcherInterface<T> {\n   public:\n    explicit Impl(const Matcher<U>& source_matcher)\n        : source_matcher_(source_matcher) {}\n\n    // We delegate the matching logic to the source matcher.\n    bool MatchAndExplain(T x, MatchResultListener* listener) const override {\n      using FromType = typename std::remove_cv<typename std::remove_pointer<\n          typename std::remove_reference<T>::type>::type>::type;\n      using ToType = typename std::remove_cv<typename std::remove_pointer<\n          typename std::remove_reference<U>::type>::type>::type;\n      // Do not allow implicitly converting base*/& to derived*/&.\n      static_assert(\n          // Do not trigger if only one of them is a pointer. That implies a\n          // regular conversion and not a down_cast.\n          (std::is_pointer<typename std::remove_reference<T>::type>::value !=\n           std::is_pointer<typename std::remove_reference<U>::type>::value) ||\n              std::is_same<FromType, ToType>::value ||\n              !std::is_base_of<FromType, ToType>::value,\n          \"Can't implicitly convert from <base> to <derived>\");\n\n      return source_matcher_.MatchAndExplain(static_cast<U>(x), listener);\n    }\n\n    void DescribeTo(::std::ostream* os) const override {\n      source_matcher_.DescribeTo(os);\n    }\n\n    void DescribeNegationTo(::std::ostream* os) const override {\n      source_matcher_.DescribeNegationTo(os);\n    }\n\n   private:\n    const Matcher<U> source_matcher_;\n\n    GTEST_DISALLOW_ASSIGN_(Impl);\n  };\n};\n\n// This even more specialized version is used for efficiently casting\n// a matcher to its own type.\ntemplate <typename T>\nclass MatcherCastImpl<T, Matcher<T> > {\n public:\n  static Matcher<T> Cast(const Matcher<T>& matcher) { return matcher; }\n};\n\n}  // namespace internal\n\n// In order to be safe and clear, casting between different matcher\n// types is done explicitly via MatcherCast<T>(m), which takes a\n// matcher m and returns a Matcher<T>.  It compiles only when T can be\n// statically converted to the argument type of m.\ntemplate <typename T, typename M>\ninline Matcher<T> MatcherCast(const M& matcher) {\n  return internal::MatcherCastImpl<T, M>::Cast(matcher);\n}\n\n// Implements SafeMatcherCast().\n//\n// FIXME: The intermediate SafeMatcherCastImpl class was introduced as a\n// workaround for a compiler bug, and can now be removed.\ntemplate <typename T>\nclass SafeMatcherCastImpl {\n public:\n  // This overload handles polymorphic matchers and values only since\n  // monomorphic matchers are handled by the next one.\n  template <typename M>\n  static inline Matcher<T> Cast(const M& polymorphic_matcher_or_value) {\n    return internal::MatcherCastImpl<T, M>::Cast(polymorphic_matcher_or_value);\n  }\n\n  // This overload handles monomorphic matchers.\n  //\n  // In general, if type T can be implicitly converted to type U, we can\n  // safely convert a Matcher<U> to a Matcher<T> (i.e. Matcher is\n  // contravariant): just keep a copy of the original Matcher<U>, convert the\n  // argument from type T to U, and then pass it to the underlying Matcher<U>.\n  // The only exception is when U is a reference and T is not, as the\n  // underlying Matcher<U> may be interested in the argument's address, which\n  // is not preserved in the conversion from T to U.\n  template <typename U>\n  static inline Matcher<T> Cast(const Matcher<U>& matcher) {\n    // Enforce that T can be implicitly converted to U.\n    GTEST_COMPILE_ASSERT_((std::is_convertible<T, U>::value),\n                          \"T must be implicitly convertible to U\");\n    // Enforce that we are not converting a non-reference type T to a reference\n    // type U.\n    GTEST_COMPILE_ASSERT_(\n        internal::is_reference<T>::value || !internal::is_reference<U>::value,\n        cannot_convert_non_reference_arg_to_reference);\n    // In case both T and U are arithmetic types, enforce that the\n    // conversion is not lossy.\n    typedef GTEST_REMOVE_REFERENCE_AND_CONST_(T) RawT;\n    typedef GTEST_REMOVE_REFERENCE_AND_CONST_(U) RawU;\n    const bool kTIsOther = GMOCK_KIND_OF_(RawT) == internal::kOther;\n    const bool kUIsOther = GMOCK_KIND_OF_(RawU) == internal::kOther;\n    GTEST_COMPILE_ASSERT_(\n        kTIsOther || kUIsOther ||\n        (internal::LosslessArithmeticConvertible<RawT, RawU>::value),\n        conversion_of_arithmetic_types_must_be_lossless);\n    return MatcherCast<T>(matcher);\n  }\n};\n\ntemplate <typename T, typename M>\ninline Matcher<T> SafeMatcherCast(const M& polymorphic_matcher) {\n  return SafeMatcherCastImpl<T>::Cast(polymorphic_matcher);\n}\n\n// A<T>() returns a matcher that matches any value of type T.\ntemplate <typename T>\nMatcher<T> A();\n\n// Anything inside the 'internal' namespace IS INTERNAL IMPLEMENTATION\n// and MUST NOT BE USED IN USER CODE!!!\nnamespace internal {\n\n// If the explanation is not empty, prints it to the ostream.\ninline void PrintIfNotEmpty(const std::string& explanation,\n                            ::std::ostream* os) {\n  if (explanation != \"\" && os != nullptr) {\n    *os << \", \" << explanation;\n  }\n}\n\n// Returns true if the given type name is easy to read by a human.\n// This is used to decide whether printing the type of a value might\n// be helpful.\ninline bool IsReadableTypeName(const std::string& type_name) {\n  // We consider a type name readable if it's short or doesn't contain\n  // a template or function type.\n  return (type_name.length() <= 20 ||\n          type_name.find_first_of(\"<(\") == std::string::npos);\n}\n\n// Matches the value against the given matcher, prints the value and explains\n// the match result to the listener. Returns the match result.\n// 'listener' must not be NULL.\n// Value cannot be passed by const reference, because some matchers take a\n// non-const argument.\ntemplate <typename Value, typename T>\nbool MatchPrintAndExplain(Value& value, const Matcher<T>& matcher,\n                          MatchResultListener* listener) {\n  if (!listener->IsInterested()) {\n    // If the listener is not interested, we do not need to construct the\n    // inner explanation.\n    return matcher.Matches(value);\n  }\n\n  StringMatchResultListener inner_listener;\n  const bool match = matcher.MatchAndExplain(value, &inner_listener);\n\n  UniversalPrint(value, listener->stream());\n#if GTEST_HAS_RTTI\n  const std::string& type_name = GetTypeName<Value>();\n  if (IsReadableTypeName(type_name))\n    *listener->stream() << \" (of type \" << type_name << \")\";\n#endif\n  PrintIfNotEmpty(inner_listener.str(), listener->stream());\n\n  return match;\n}\n\n// An internal helper class for doing compile-time loop on a tuple's\n// fields.\ntemplate <size_t N>\nclass TuplePrefix {\n public:\n  // TuplePrefix<N>::Matches(matcher_tuple, value_tuple) returns true\n  // iff the first N fields of matcher_tuple matches the first N\n  // fields of value_tuple, respectively.\n  template <typename MatcherTuple, typename ValueTuple>\n  static bool Matches(const MatcherTuple& matcher_tuple,\n                      const ValueTuple& value_tuple) {\n    return TuplePrefix<N - 1>::Matches(matcher_tuple, value_tuple) &&\n           std::get<N - 1>(matcher_tuple).Matches(std::get<N - 1>(value_tuple));\n  }\n\n  // TuplePrefix<N>::ExplainMatchFailuresTo(matchers, values, os)\n  // describes failures in matching the first N fields of matchers\n  // against the first N fields of values.  If there is no failure,\n  // nothing will be streamed to os.\n  template <typename MatcherTuple, typename ValueTuple>\n  static void ExplainMatchFailuresTo(const MatcherTuple& matchers,\n                                     const ValueTuple& values,\n                                     ::std::ostream* os) {\n    // First, describes failures in the first N - 1 fields.\n    TuplePrefix<N - 1>::ExplainMatchFailuresTo(matchers, values, os);\n\n    // Then describes the failure (if any) in the (N - 1)-th (0-based)\n    // field.\n    typename std::tuple_element<N - 1, MatcherTuple>::type matcher =\n        std::get<N - 1>(matchers);\n    typedef typename std::tuple_element<N - 1, ValueTuple>::type Value;\n    const Value& value = std::get<N - 1>(values);\n    StringMatchResultListener listener;\n    if (!matcher.MatchAndExplain(value, &listener)) {\n      *os << \"  Expected arg #\" << N - 1 << \": \";\n      std::get<N - 1>(matchers).DescribeTo(os);\n      *os << \"\\n           Actual: \";\n      // We remove the reference in type Value to prevent the\n      // universal printer from printing the address of value, which\n      // isn't interesting to the user most of the time.  The\n      // matcher's MatchAndExplain() method handles the case when\n      // the address is interesting.\n      internal::UniversalPrint(value, os);\n      PrintIfNotEmpty(listener.str(), os);\n      *os << \"\\n\";\n    }\n  }\n};\n\n// The base case.\ntemplate <>\nclass TuplePrefix<0> {\n public:\n  template <typename MatcherTuple, typename ValueTuple>\n  static bool Matches(const MatcherTuple& /* matcher_tuple */,\n                      const ValueTuple& /* value_tuple */) {\n    return true;\n  }\n\n  template <typename MatcherTuple, typename ValueTuple>\n  static void ExplainMatchFailuresTo(const MatcherTuple& /* matchers */,\n                                     const ValueTuple& /* values */,\n                                     ::std::ostream* /* os */) {}\n};\n\n// TupleMatches(matcher_tuple, value_tuple) returns true iff all\n// matchers in matcher_tuple match the corresponding fields in\n// value_tuple.  It is a compiler error if matcher_tuple and\n// value_tuple have different number of fields or incompatible field\n// types.\ntemplate <typename MatcherTuple, typename ValueTuple>\nbool TupleMatches(const MatcherTuple& matcher_tuple,\n                  const ValueTuple& value_tuple) {\n  // Makes sure that matcher_tuple and value_tuple have the same\n  // number of fields.\n  GTEST_COMPILE_ASSERT_(std::tuple_size<MatcherTuple>::value ==\n                            std::tuple_size<ValueTuple>::value,\n                        matcher_and_value_have_different_numbers_of_fields);\n  return TuplePrefix<std::tuple_size<ValueTuple>::value>::Matches(matcher_tuple,\n                                                                  value_tuple);\n}\n\n// Describes failures in matching matchers against values.  If there\n// is no failure, nothing will be streamed to os.\ntemplate <typename MatcherTuple, typename ValueTuple>\nvoid ExplainMatchFailureTupleTo(const MatcherTuple& matchers,\n                                const ValueTuple& values,\n                                ::std::ostream* os) {\n  TuplePrefix<std::tuple_size<MatcherTuple>::value>::ExplainMatchFailuresTo(\n      matchers, values, os);\n}\n\n// TransformTupleValues and its helper.\n//\n// TransformTupleValuesHelper hides the internal machinery that\n// TransformTupleValues uses to implement a tuple traversal.\ntemplate <typename Tuple, typename Func, typename OutIter>\nclass TransformTupleValuesHelper {\n private:\n  typedef ::std::tuple_size<Tuple> TupleSize;\n\n public:\n  // For each member of tuple 't', taken in order, evaluates '*out++ = f(t)'.\n  // Returns the final value of 'out' in case the caller needs it.\n  static OutIter Run(Func f, const Tuple& t, OutIter out) {\n    return IterateOverTuple<Tuple, TupleSize::value>()(f, t, out);\n  }\n\n private:\n  template <typename Tup, size_t kRemainingSize>\n  struct IterateOverTuple {\n    OutIter operator() (Func f, const Tup& t, OutIter out) const {\n      *out++ = f(::std::get<TupleSize::value - kRemainingSize>(t));\n      return IterateOverTuple<Tup, kRemainingSize - 1>()(f, t, out);\n    }\n  };\n  template <typename Tup>\n  struct IterateOverTuple<Tup, 0> {\n    OutIter operator() (Func /* f */, const Tup& /* t */, OutIter out) const {\n      return out;\n    }\n  };\n};\n\n// Successively invokes 'f(element)' on each element of the tuple 't',\n// appending each result to the 'out' iterator. Returns the final value\n// of 'out'.\ntemplate <typename Tuple, typename Func, typename OutIter>\nOutIter TransformTupleValues(Func f, const Tuple& t, OutIter out) {\n  return TransformTupleValuesHelper<Tuple, Func, OutIter>::Run(f, t, out);\n}\n\n// Implements A<T>().\ntemplate <typename T>\nclass AnyMatcherImpl : public MatcherInterface<const T&> {\n public:\n  bool MatchAndExplain(const T& /* x */,\n                       MatchResultListener* /* listener */) const override {\n    return true;\n  }\n  void DescribeTo(::std::ostream* os) const override { *os << \"is anything\"; }\n  void DescribeNegationTo(::std::ostream* os) const override {\n    // This is mostly for completeness' safe, as it's not very useful\n    // to write Not(A<bool>()).  However we cannot completely rule out\n    // such a possibility, and it doesn't hurt to be prepared.\n    *os << \"never matches\";\n  }\n};\n\n// Implements _, a matcher that matches any value of any\n// type.  This is a polymorphic matcher, so we need a template type\n// conversion operator to make it appearing as a Matcher<T> for any\n// type T.\nclass AnythingMatcher {\n public:\n  template <typename T>\n  operator Matcher<T>() const { return A<T>(); }\n};\n\n// Implements the polymorphic IsNull() matcher, which matches any raw or smart\n// pointer that is NULL.\nclass IsNullMatcher {\n public:\n  template <typename Pointer>\n  bool MatchAndExplain(const Pointer& p,\n                       MatchResultListener* /* listener */) const {\n    return p == nullptr;\n  }\n\n  void DescribeTo(::std::ostream* os) const { *os << \"is NULL\"; }\n  void DescribeNegationTo(::std::ostream* os) const {\n    *os << \"isn't NULL\";\n  }\n};\n\n// Implements the polymorphic NotNull() matcher, which matches any raw or smart\n// pointer that is not NULL.\nclass NotNullMatcher {\n public:\n  template <typename Pointer>\n  bool MatchAndExplain(const Pointer& p,\n                       MatchResultListener* /* listener */) const {\n    return p != nullptr;\n  }\n\n  void DescribeTo(::std::ostream* os) const { *os << \"isn't NULL\"; }\n  void DescribeNegationTo(::std::ostream* os) const {\n    *os << \"is NULL\";\n  }\n};\n\n// Ref(variable) matches any argument that is a reference to\n// 'variable'.  This matcher is polymorphic as it can match any\n// super type of the type of 'variable'.\n//\n// The RefMatcher template class implements Ref(variable).  It can\n// only be instantiated with a reference type.  This prevents a user\n// from mistakenly using Ref(x) to match a non-reference function\n// argument.  For example, the following will righteously cause a\n// compiler error:\n//\n//   int n;\n//   Matcher<int> m1 = Ref(n);   // This won't compile.\n//   Matcher<int&> m2 = Ref(n);  // This will compile.\ntemplate <typename T>\nclass RefMatcher;\n\ntemplate <typename T>\nclass RefMatcher<T&> {\n  // Google Mock is a generic framework and thus needs to support\n  // mocking any function types, including those that take non-const\n  // reference arguments.  Therefore the template parameter T (and\n  // Super below) can be instantiated to either a const type or a\n  // non-const type.\n public:\n  // RefMatcher() takes a T& instead of const T&, as we want the\n  // compiler to catch using Ref(const_value) as a matcher for a\n  // non-const reference.\n  explicit RefMatcher(T& x) : object_(x) {}  // NOLINT\n\n  template <typename Super>\n  operator Matcher<Super&>() const {\n    // By passing object_ (type T&) to Impl(), which expects a Super&,\n    // we make sure that Super is a super type of T.  In particular,\n    // this catches using Ref(const_value) as a matcher for a\n    // non-const reference, as you cannot implicitly convert a const\n    // reference to a non-const reference.\n    return MakeMatcher(new Impl<Super>(object_));\n  }\n\n private:\n  template <typename Super>\n  class Impl : public MatcherInterface<Super&> {\n   public:\n    explicit Impl(Super& x) : object_(x) {}  // NOLINT\n\n    // MatchAndExplain() takes a Super& (as opposed to const Super&)\n    // in order to match the interface MatcherInterface<Super&>.\n    bool MatchAndExplain(Super& x,\n                         MatchResultListener* listener) const override {\n      *listener << \"which is located @\" << static_cast<const void*>(&x);\n      return &x == &object_;\n    }\n\n    void DescribeTo(::std::ostream* os) const override {\n      *os << \"references the variable \";\n      UniversalPrinter<Super&>::Print(object_, os);\n    }\n\n    void DescribeNegationTo(::std::ostream* os) const override {\n      *os << \"does not reference the variable \";\n      UniversalPrinter<Super&>::Print(object_, os);\n    }\n\n   private:\n    const Super& object_;\n\n    GTEST_DISALLOW_ASSIGN_(Impl);\n  };\n\n  T& object_;\n\n  GTEST_DISALLOW_ASSIGN_(RefMatcher);\n};\n\n// Polymorphic helper functions for narrow and wide string matchers.\ninline bool CaseInsensitiveCStringEquals(const char* lhs, const char* rhs) {\n  return String::CaseInsensitiveCStringEquals(lhs, rhs);\n}\n\ninline bool CaseInsensitiveCStringEquals(const wchar_t* lhs,\n                                         const wchar_t* rhs) {\n  return String::CaseInsensitiveWideCStringEquals(lhs, rhs);\n}\n\n// String comparison for narrow or wide strings that can have embedded NUL\n// characters.\ntemplate <typename StringType>\nbool CaseInsensitiveStringEquals(const StringType& s1,\n                                 const StringType& s2) {\n  // Are the heads equal?\n  if (!CaseInsensitiveCStringEquals(s1.c_str(), s2.c_str())) {\n    return false;\n  }\n\n  // Skip the equal heads.\n  const typename StringType::value_type nul = 0;\n  const size_t i1 = s1.find(nul), i2 = s2.find(nul);\n\n  // Are we at the end of either s1 or s2?\n  if (i1 == StringType::npos || i2 == StringType::npos) {\n    return i1 == i2;\n  }\n\n  // Are the tails equal?\n  return CaseInsensitiveStringEquals(s1.substr(i1 + 1), s2.substr(i2 + 1));\n}\n\n// String matchers.\n\n// Implements equality-based string matchers like StrEq, StrCaseNe, and etc.\ntemplate <typename StringType>\nclass StrEqualityMatcher {\n public:\n  StrEqualityMatcher(const StringType& str, bool expect_eq,\n                     bool case_sensitive)\n      : string_(str), expect_eq_(expect_eq), case_sensitive_(case_sensitive) {}\n\n#if GTEST_HAS_ABSL\n  bool MatchAndExplain(const absl::string_view& s,\n                       MatchResultListener* listener) const {\n    // This should fail to compile if absl::string_view is used with wide\n    // strings.\n    const StringType& str = string(s);\n    return MatchAndExplain(str, listener);\n  }\n#endif  // GTEST_HAS_ABSL\n\n  // Accepts pointer types, particularly:\n  //   const char*\n  //   char*\n  //   const wchar_t*\n  //   wchar_t*\n  template <typename CharType>\n  bool MatchAndExplain(CharType* s, MatchResultListener* listener) const {\n    if (s == nullptr) {\n      return !expect_eq_;\n    }\n    return MatchAndExplain(StringType(s), listener);\n  }\n\n  // Matches anything that can convert to StringType.\n  //\n  // This is a template, not just a plain function with const StringType&,\n  // because absl::string_view has some interfering non-explicit constructors.\n  template <typename MatcheeStringType>\n  bool MatchAndExplain(const MatcheeStringType& s,\n                       MatchResultListener* /* listener */) const {\n    const StringType& s2(s);\n    const bool eq = case_sensitive_ ? s2 == string_ :\n        CaseInsensitiveStringEquals(s2, string_);\n    return expect_eq_ == eq;\n  }\n\n  void DescribeTo(::std::ostream* os) const {\n    DescribeToHelper(expect_eq_, os);\n  }\n\n  void DescribeNegationTo(::std::ostream* os) const {\n    DescribeToHelper(!expect_eq_, os);\n  }\n\n private:\n  void DescribeToHelper(bool expect_eq, ::std::ostream* os) const {\n    *os << (expect_eq ? \"is \" : \"isn't \");\n    *os << \"equal to \";\n    if (!case_sensitive_) {\n      *os << \"(ignoring case) \";\n    }\n    UniversalPrint(string_, os);\n  }\n\n  const StringType string_;\n  const bool expect_eq_;\n  const bool case_sensitive_;\n\n  GTEST_DISALLOW_ASSIGN_(StrEqualityMatcher);\n};\n\n// Implements the polymorphic HasSubstr(substring) matcher, which\n// can be used as a Matcher<T> as long as T can be converted to a\n// string.\ntemplate <typename StringType>\nclass HasSubstrMatcher {\n public:\n  explicit HasSubstrMatcher(const StringType& substring)\n      : substring_(substring) {}\n\n#if GTEST_HAS_ABSL\n  bool MatchAndExplain(const absl::string_view& s,\n                       MatchResultListener* listener) const {\n    // This should fail to compile if absl::string_view is used with wide\n    // strings.\n    const StringType& str = string(s);\n    return MatchAndExplain(str, listener);\n  }\n#endif  // GTEST_HAS_ABSL\n\n  // Accepts pointer types, particularly:\n  //   const char*\n  //   char*\n  //   const wchar_t*\n  //   wchar_t*\n  template <typename CharType>\n  bool MatchAndExplain(CharType* s, MatchResultListener* listener) const {\n    return s != nullptr && MatchAndExplain(StringType(s), listener);\n  }\n\n  // Matches anything that can convert to StringType.\n  //\n  // This is a template, not just a plain function with const StringType&,\n  // because absl::string_view has some interfering non-explicit constructors.\n  template <typename MatcheeStringType>\n  bool MatchAndExplain(const MatcheeStringType& s,\n                       MatchResultListener* /* listener */) const {\n    const StringType& s2(s);\n    return s2.find(substring_) != StringType::npos;\n  }\n\n  // Describes what this matcher matches.\n  void DescribeTo(::std::ostream* os) const {\n    *os << \"has substring \";\n    UniversalPrint(substring_, os);\n  }\n\n  void DescribeNegationTo(::std::ostream* os) const {\n    *os << \"has no substring \";\n    UniversalPrint(substring_, os);\n  }\n\n private:\n  const StringType substring_;\n\n  GTEST_DISALLOW_ASSIGN_(HasSubstrMatcher);\n};\n\n// Implements the polymorphic StartsWith(substring) matcher, which\n// can be used as a Matcher<T> as long as T can be converted to a\n// string.\ntemplate <typename StringType>\nclass StartsWithMatcher {\n public:\n  explicit StartsWithMatcher(const StringType& prefix) : prefix_(prefix) {\n  }\n\n#if GTEST_HAS_ABSL\n  bool MatchAndExplain(const absl::string_view& s,\n                       MatchResultListener* listener) const {\n    // This should fail to compile if absl::string_view is used with wide\n    // strings.\n    const StringType& str = string(s);\n    return MatchAndExplain(str, listener);\n  }\n#endif  // GTEST_HAS_ABSL\n\n  // Accepts pointer types, particularly:\n  //   const char*\n  //   char*\n  //   const wchar_t*\n  //   wchar_t*\n  template <typename CharType>\n  bool MatchAndExplain(CharType* s, MatchResultListener* listener) const {\n    return s != nullptr && MatchAndExplain(StringType(s), listener);\n  }\n\n  // Matches anything that can convert to StringType.\n  //\n  // This is a template, not just a plain function with const StringType&,\n  // because absl::string_view has some interfering non-explicit constructors.\n  template <typename MatcheeStringType>\n  bool MatchAndExplain(const MatcheeStringType& s,\n                       MatchResultListener* /* listener */) const {\n    const StringType& s2(s);\n    return s2.length() >= prefix_.length() &&\n        s2.substr(0, prefix_.length()) == prefix_;\n  }\n\n  void DescribeTo(::std::ostream* os) const {\n    *os << \"starts with \";\n    UniversalPrint(prefix_, os);\n  }\n\n  void DescribeNegationTo(::std::ostream* os) const {\n    *os << \"doesn't start with \";\n    UniversalPrint(prefix_, os);\n  }\n\n private:\n  const StringType prefix_;\n\n  GTEST_DISALLOW_ASSIGN_(StartsWithMatcher);\n};\n\n// Implements the polymorphic EndsWith(substring) matcher, which\n// can be used as a Matcher<T> as long as T can be converted to a\n// string.\ntemplate <typename StringType>\nclass EndsWithMatcher {\n public:\n  explicit EndsWithMatcher(const StringType& suffix) : suffix_(suffix) {}\n\n#if GTEST_HAS_ABSL\n  bool MatchAndExplain(const absl::string_view& s,\n                       MatchResultListener* listener) const {\n    // This should fail to compile if absl::string_view is used with wide\n    // strings.\n    const StringType& str = string(s);\n    return MatchAndExplain(str, listener);\n  }\n#endif  // GTEST_HAS_ABSL\n\n  // Accepts pointer types, particularly:\n  //   const char*\n  //   char*\n  //   const wchar_t*\n  //   wchar_t*\n  template <typename CharType>\n  bool MatchAndExplain(CharType* s, MatchResultListener* listener) const {\n    return s != nullptr && MatchAndExplain(StringType(s), listener);\n  }\n\n  // Matches anything that can convert to StringType.\n  //\n  // This is a template, not just a plain function with const StringType&,\n  // because absl::string_view has some interfering non-explicit constructors.\n  template <typename MatcheeStringType>\n  bool MatchAndExplain(const MatcheeStringType& s,\n                       MatchResultListener* /* listener */) const {\n    const StringType& s2(s);\n    return s2.length() >= suffix_.length() &&\n        s2.substr(s2.length() - suffix_.length()) == suffix_;\n  }\n\n  void DescribeTo(::std::ostream* os) const {\n    *os << \"ends with \";\n    UniversalPrint(suffix_, os);\n  }\n\n  void DescribeNegationTo(::std::ostream* os) const {\n    *os << \"doesn't end with \";\n    UniversalPrint(suffix_, os);\n  }\n\n private:\n  const StringType suffix_;\n\n  GTEST_DISALLOW_ASSIGN_(EndsWithMatcher);\n};\n\n// Implements a matcher that compares the two fields of a 2-tuple\n// using one of the ==, <=, <, etc, operators.  The two fields being\n// compared don't have to have the same type.\n//\n// The matcher defined here is polymorphic (for example, Eq() can be\n// used to match a std::tuple<int, short>, a std::tuple<const long&, double>,\n// etc).  Therefore we use a template type conversion operator in the\n// implementation.\ntemplate <typename D, typename Op>\nclass PairMatchBase {\n public:\n  template <typename T1, typename T2>\n  operator Matcher<::std::tuple<T1, T2>>() const {\n    return Matcher<::std::tuple<T1, T2>>(new Impl<const ::std::tuple<T1, T2>&>);\n  }\n  template <typename T1, typename T2>\n  operator Matcher<const ::std::tuple<T1, T2>&>() const {\n    return MakeMatcher(new Impl<const ::std::tuple<T1, T2>&>);\n  }\n\n private:\n  static ::std::ostream& GetDesc(::std::ostream& os) {  // NOLINT\n    return os << D::Desc();\n  }\n\n  template <typename Tuple>\n  class Impl : public MatcherInterface<Tuple> {\n   public:\n    bool MatchAndExplain(Tuple args,\n                         MatchResultListener* /* listener */) const override {\n      return Op()(::std::get<0>(args), ::std::get<1>(args));\n    }\n    void DescribeTo(::std::ostream* os) const override {\n      *os << \"are \" << GetDesc;\n    }\n    void DescribeNegationTo(::std::ostream* os) const override {\n      *os << \"aren't \" << GetDesc;\n    }\n  };\n};\n\nclass Eq2Matcher : public PairMatchBase<Eq2Matcher, AnyEq> {\n public:\n  static const char* Desc() { return \"an equal pair\"; }\n};\nclass Ne2Matcher : public PairMatchBase<Ne2Matcher, AnyNe> {\n public:\n  static const char* Desc() { return \"an unequal pair\"; }\n};\nclass Lt2Matcher : public PairMatchBase<Lt2Matcher, AnyLt> {\n public:\n  static const char* Desc() { return \"a pair where the first < the second\"; }\n};\nclass Gt2Matcher : public PairMatchBase<Gt2Matcher, AnyGt> {\n public:\n  static const char* Desc() { return \"a pair where the first > the second\"; }\n};\nclass Le2Matcher : public PairMatchBase<Le2Matcher, AnyLe> {\n public:\n  static const char* Desc() { return \"a pair where the first <= the second\"; }\n};\nclass Ge2Matcher : public PairMatchBase<Ge2Matcher, AnyGe> {\n public:\n  static const char* Desc() { return \"a pair where the first >= the second\"; }\n};\n\n// Implements the Not(...) matcher for a particular argument type T.\n// We do not nest it inside the NotMatcher class template, as that\n// will prevent different instantiations of NotMatcher from sharing\n// the same NotMatcherImpl<T> class.\ntemplate <typename T>\nclass NotMatcherImpl : public MatcherInterface<const T&> {\n public:\n  explicit NotMatcherImpl(const Matcher<T>& matcher)\n      : matcher_(matcher) {}\n\n  bool MatchAndExplain(const T& x,\n                       MatchResultListener* listener) const override {\n    return !matcher_.MatchAndExplain(x, listener);\n  }\n\n  void DescribeTo(::std::ostream* os) const override {\n    matcher_.DescribeNegationTo(os);\n  }\n\n  void DescribeNegationTo(::std::ostream* os) const override {\n    matcher_.DescribeTo(os);\n  }\n\n private:\n  const Matcher<T> matcher_;\n\n  GTEST_DISALLOW_ASSIGN_(NotMatcherImpl);\n};\n\n// Implements the Not(m) matcher, which matches a value that doesn't\n// match matcher m.\ntemplate <typename InnerMatcher>\nclass NotMatcher {\n public:\n  explicit NotMatcher(InnerMatcher matcher) : matcher_(matcher) {}\n\n  // This template type conversion operator allows Not(m) to be used\n  // to match any type m can match.\n  template <typename T>\n  operator Matcher<T>() const {\n    return Matcher<T>(new NotMatcherImpl<T>(SafeMatcherCast<T>(matcher_)));\n  }\n\n private:\n  InnerMatcher matcher_;\n\n  GTEST_DISALLOW_ASSIGN_(NotMatcher);\n};\n\n// Implements the AllOf(m1, m2) matcher for a particular argument type\n// T. We do not nest it inside the BothOfMatcher class template, as\n// that will prevent different instantiations of BothOfMatcher from\n// sharing the same BothOfMatcherImpl<T> class.\ntemplate <typename T>\nclass AllOfMatcherImpl : public MatcherInterface<const T&> {\n public:\n  explicit AllOfMatcherImpl(std::vector<Matcher<T> > matchers)\n      : matchers_(std::move(matchers)) {}\n\n  void DescribeTo(::std::ostream* os) const override {\n    *os << \"(\";\n    for (size_t i = 0; i < matchers_.size(); ++i) {\n      if (i != 0) *os << \") and (\";\n      matchers_[i].DescribeTo(os);\n    }\n    *os << \")\";\n  }\n\n  void DescribeNegationTo(::std::ostream* os) const override {\n    *os << \"(\";\n    for (size_t i = 0; i < matchers_.size(); ++i) {\n      if (i != 0) *os << \") or (\";\n      matchers_[i].DescribeNegationTo(os);\n    }\n    *os << \")\";\n  }\n\n  bool MatchAndExplain(const T& x,\n                       MatchResultListener* listener) const override {\n    // If either matcher1_ or matcher2_ doesn't match x, we only need\n    // to explain why one of them fails.\n    std::string all_match_result;\n\n    for (size_t i = 0; i < matchers_.size(); ++i) {\n      StringMatchResultListener slistener;\n      if (matchers_[i].MatchAndExplain(x, &slistener)) {\n        if (all_match_result.empty()) {\n          all_match_result = slistener.str();\n        } else {\n          std::string result = slistener.str();\n          if (!result.empty()) {\n            all_match_result += \", and \";\n            all_match_result += result;\n          }\n        }\n      } else {\n        *listener << slistener.str();\n        return false;\n      }\n    }\n\n    // Otherwise we need to explain why *both* of them match.\n    *listener << all_match_result;\n    return true;\n  }\n\n private:\n  const std::vector<Matcher<T> > matchers_;\n\n  GTEST_DISALLOW_ASSIGN_(AllOfMatcherImpl);\n};\n\n// VariadicMatcher is used for the variadic implementation of\n// AllOf(m_1, m_2, ...) and AnyOf(m_1, m_2, ...).\n// CombiningMatcher<T> is used to recursively combine the provided matchers\n// (of type Args...).\ntemplate <template <typename T> class CombiningMatcher, typename... Args>\nclass VariadicMatcher {\n public:\n  VariadicMatcher(const Args&... matchers)  // NOLINT\n      : matchers_(matchers...) {\n    static_assert(sizeof...(Args) > 0, \"Must have at least one matcher.\");\n  }\n\n  // This template type conversion operator allows an\n  // VariadicMatcher<Matcher1, Matcher2...> object to match any type that\n  // all of the provided matchers (Matcher1, Matcher2, ...) can match.\n  template <typename T>\n  operator Matcher<T>() const {\n    std::vector<Matcher<T> > values;\n    CreateVariadicMatcher<T>(&values, std::integral_constant<size_t, 0>());\n    return Matcher<T>(new CombiningMatcher<T>(std::move(values)));\n  }\n\n private:\n  template <typename T, size_t I>\n  void CreateVariadicMatcher(std::vector<Matcher<T> >* values,\n                             std::integral_constant<size_t, I>) const {\n    values->push_back(SafeMatcherCast<T>(std::get<I>(matchers_)));\n    CreateVariadicMatcher<T>(values, std::integral_constant<size_t, I + 1>());\n  }\n\n  template <typename T>\n  void CreateVariadicMatcher(\n      std::vector<Matcher<T> >*,\n      std::integral_constant<size_t, sizeof...(Args)>) const {}\n\n  std::tuple<Args...> matchers_;\n\n  GTEST_DISALLOW_ASSIGN_(VariadicMatcher);\n};\n\ntemplate <typename... Args>\nusing AllOfMatcher = VariadicMatcher<AllOfMatcherImpl, Args...>;\n\n// Implements the AnyOf(m1, m2) matcher for a particular argument type\n// T.  We do not nest it inside the AnyOfMatcher class template, as\n// that will prevent different instantiations of AnyOfMatcher from\n// sharing the same EitherOfMatcherImpl<T> class.\ntemplate <typename T>\nclass AnyOfMatcherImpl : public MatcherInterface<const T&> {\n public:\n  explicit AnyOfMatcherImpl(std::vector<Matcher<T> > matchers)\n      : matchers_(std::move(matchers)) {}\n\n  void DescribeTo(::std::ostream* os) const override {\n    *os << \"(\";\n    for (size_t i = 0; i < matchers_.size(); ++i) {\n      if (i != 0) *os << \") or (\";\n      matchers_[i].DescribeTo(os);\n    }\n    *os << \")\";\n  }\n\n  void DescribeNegationTo(::std::ostream* os) const override {\n    *os << \"(\";\n    for (size_t i = 0; i < matchers_.size(); ++i) {\n      if (i != 0) *os << \") and (\";\n      matchers_[i].DescribeNegationTo(os);\n    }\n    *os << \")\";\n  }\n\n  bool MatchAndExplain(const T& x,\n                       MatchResultListener* listener) const override {\n    std::string no_match_result;\n\n    // If either matcher1_ or matcher2_ matches x, we just need to\n    // explain why *one* of them matches.\n    for (size_t i = 0; i < matchers_.size(); ++i) {\n      StringMatchResultListener slistener;\n      if (matchers_[i].MatchAndExplain(x, &slistener)) {\n        *listener << slistener.str();\n        return true;\n      } else {\n        if (no_match_result.empty()) {\n          no_match_result = slistener.str();\n        } else {\n          std::string result = slistener.str();\n          if (!result.empty()) {\n            no_match_result += \", and \";\n            no_match_result += result;\n          }\n        }\n      }\n    }\n\n    // Otherwise we need to explain why *both* of them fail.\n    *listener << no_match_result;\n    return false;\n  }\n\n private:\n  const std::vector<Matcher<T> > matchers_;\n\n  GTEST_DISALLOW_ASSIGN_(AnyOfMatcherImpl);\n};\n\n// AnyOfMatcher is used for the variadic implementation of AnyOf(m_1, m_2, ...).\ntemplate <typename... Args>\nusing AnyOfMatcher = VariadicMatcher<AnyOfMatcherImpl, Args...>;\n\n// Wrapper for implementation of Any/AllOfArray().\ntemplate <template <class> class MatcherImpl, typename T>\nclass SomeOfArrayMatcher {\n public:\n  // Constructs the matcher from a sequence of element values or\n  // element matchers.\n  template <typename Iter>\n  SomeOfArrayMatcher(Iter first, Iter last) : matchers_(first, last) {}\n\n  template <typename U>\n  operator Matcher<U>() const {  // NOLINT\n    using RawU = typename std::decay<U>::type;\n    std::vector<Matcher<RawU>> matchers;\n    for (const auto& matcher : matchers_) {\n      matchers.push_back(MatcherCast<RawU>(matcher));\n    }\n    return Matcher<U>(new MatcherImpl<RawU>(std::move(matchers)));\n  }\n\n private:\n  const ::std::vector<T> matchers_;\n\n  GTEST_DISALLOW_ASSIGN_(SomeOfArrayMatcher);\n};\n\ntemplate <typename T>\nusing AllOfArrayMatcher = SomeOfArrayMatcher<AllOfMatcherImpl, T>;\n\ntemplate <typename T>\nusing AnyOfArrayMatcher = SomeOfArrayMatcher<AnyOfMatcherImpl, T>;\n\n// Used for implementing Truly(pred), which turns a predicate into a\n// matcher.\ntemplate <typename Predicate>\nclass TrulyMatcher {\n public:\n  explicit TrulyMatcher(Predicate pred) : predicate_(pred) {}\n\n  // This method template allows Truly(pred) to be used as a matcher\n  // for type T where T is the argument type of predicate 'pred'.  The\n  // argument is passed by reference as the predicate may be\n  // interested in the address of the argument.\n  template <typename T>\n  bool MatchAndExplain(T& x,  // NOLINT\n                       MatchResultListener* /* listener */) const {\n    // Without the if-statement, MSVC sometimes warns about converting\n    // a value to bool (warning 4800).\n    //\n    // We cannot write 'return !!predicate_(x);' as that doesn't work\n    // when predicate_(x) returns a class convertible to bool but\n    // having no operator!().\n    if (predicate_(x))\n      return true;\n    return false;\n  }\n\n  void DescribeTo(::std::ostream* os) const {\n    *os << \"satisfies the given predicate\";\n  }\n\n  void DescribeNegationTo(::std::ostream* os) const {\n    *os << \"doesn't satisfy the given predicate\";\n  }\n\n private:\n  Predicate predicate_;\n\n  GTEST_DISALLOW_ASSIGN_(TrulyMatcher);\n};\n\n// Used for implementing Matches(matcher), which turns a matcher into\n// a predicate.\ntemplate <typename M>\nclass MatcherAsPredicate {\n public:\n  explicit MatcherAsPredicate(M matcher) : matcher_(matcher) {}\n\n  // This template operator() allows Matches(m) to be used as a\n  // predicate on type T where m is a matcher on type T.\n  //\n  // The argument x is passed by reference instead of by value, as\n  // some matcher may be interested in its address (e.g. as in\n  // Matches(Ref(n))(x)).\n  template <typename T>\n  bool operator()(const T& x) const {\n    // We let matcher_ commit to a particular type here instead of\n    // when the MatcherAsPredicate object was constructed.  This\n    // allows us to write Matches(m) where m is a polymorphic matcher\n    // (e.g. Eq(5)).\n    //\n    // If we write Matcher<T>(matcher_).Matches(x) here, it won't\n    // compile when matcher_ has type Matcher<const T&>; if we write\n    // Matcher<const T&>(matcher_).Matches(x) here, it won't compile\n    // when matcher_ has type Matcher<T>; if we just write\n    // matcher_.Matches(x), it won't compile when matcher_ is\n    // polymorphic, e.g. Eq(5).\n    //\n    // MatcherCast<const T&>() is necessary for making the code work\n    // in all of the above situations.\n    return MatcherCast<const T&>(matcher_).Matches(x);\n  }\n\n private:\n  M matcher_;\n\n  GTEST_DISALLOW_ASSIGN_(MatcherAsPredicate);\n};\n\n// For implementing ASSERT_THAT() and EXPECT_THAT().  The template\n// argument M must be a type that can be converted to a matcher.\ntemplate <typename M>\nclass PredicateFormatterFromMatcher {\n public:\n  explicit PredicateFormatterFromMatcher(M m) : matcher_(std::move(m)) {}\n\n  // This template () operator allows a PredicateFormatterFromMatcher\n  // object to act as a predicate-formatter suitable for using with\n  // Google Test's EXPECT_PRED_FORMAT1() macro.\n  template <typename T>\n  AssertionResult operator()(const char* value_text, const T& x) const {\n    // We convert matcher_ to a Matcher<const T&> *now* instead of\n    // when the PredicateFormatterFromMatcher object was constructed,\n    // as matcher_ may be polymorphic (e.g. NotNull()) and we won't\n    // know which type to instantiate it to until we actually see the\n    // type of x here.\n    //\n    // We write SafeMatcherCast<const T&>(matcher_) instead of\n    // Matcher<const T&>(matcher_), as the latter won't compile when\n    // matcher_ has type Matcher<T> (e.g. An<int>()).\n    // We don't write MatcherCast<const T&> either, as that allows\n    // potentially unsafe downcasting of the matcher argument.\n    const Matcher<const T&> matcher = SafeMatcherCast<const T&>(matcher_);\n\n    // The expected path here is that the matcher should match (i.e. that most\n    // tests pass) so optimize for this case.\n    if (matcher.Matches(x)) {\n      return AssertionSuccess();\n    }\n\n    ::std::stringstream ss;\n    ss << \"Value of: \" << value_text << \"\\n\"\n       << \"Expected: \";\n    matcher.DescribeTo(&ss);\n\n    // Rerun the matcher to \"PrintAndExain\" the failure.\n    StringMatchResultListener listener;\n    if (MatchPrintAndExplain(x, matcher, &listener)) {\n      ss << \"\\n  The matcher failed on the initial attempt; but passed when \"\n            \"rerun to generate the explanation.\";\n    }\n    ss << \"\\n  Actual: \" << listener.str();\n    return AssertionFailure() << ss.str();\n  }\n\n private:\n  const M matcher_;\n\n  GTEST_DISALLOW_ASSIGN_(PredicateFormatterFromMatcher);\n};\n\n// A helper function for converting a matcher to a predicate-formatter\n// without the user needing to explicitly write the type.  This is\n// used for implementing ASSERT_THAT() and EXPECT_THAT().\n// Implementation detail: 'matcher' is received by-value to force decaying.\ntemplate <typename M>\ninline PredicateFormatterFromMatcher<M>\nMakePredicateFormatterFromMatcher(M matcher) {\n  return PredicateFormatterFromMatcher<M>(std::move(matcher));\n}\n\n// Implements the polymorphic floating point equality matcher, which matches\n// two float values using ULP-based approximation or, optionally, a\n// user-specified epsilon.  The template is meant to be instantiated with\n// FloatType being either float or double.\ntemplate <typename FloatType>\nclass FloatingEqMatcher {\n public:\n  // Constructor for FloatingEqMatcher.\n  // The matcher's input will be compared with expected.  The matcher treats two\n  // NANs as equal if nan_eq_nan is true.  Otherwise, under IEEE standards,\n  // equality comparisons between NANs will always return false.  We specify a\n  // negative max_abs_error_ term to indicate that ULP-based approximation will\n  // be used for comparison.\n  FloatingEqMatcher(FloatType expected, bool nan_eq_nan) :\n    expected_(expected), nan_eq_nan_(nan_eq_nan), max_abs_error_(-1) {\n  }\n\n  // Constructor that supports a user-specified max_abs_error that will be used\n  // for comparison instead of ULP-based approximation.  The max absolute\n  // should be non-negative.\n  FloatingEqMatcher(FloatType expected, bool nan_eq_nan,\n                    FloatType max_abs_error)\n      : expected_(expected),\n        nan_eq_nan_(nan_eq_nan),\n        max_abs_error_(max_abs_error) {\n    GTEST_CHECK_(max_abs_error >= 0)\n        << \", where max_abs_error is\" << max_abs_error;\n  }\n\n  // Implements floating point equality matcher as a Matcher<T>.\n  template <typename T>\n  class Impl : public MatcherInterface<T> {\n   public:\n    Impl(FloatType expected, bool nan_eq_nan, FloatType max_abs_error)\n        : expected_(expected),\n          nan_eq_nan_(nan_eq_nan),\n          max_abs_error_(max_abs_error) {}\n\n    bool MatchAndExplain(T value,\n                         MatchResultListener* listener) const override {\n      const FloatingPoint<FloatType> actual(value), expected(expected_);\n\n      // Compares NaNs first, if nan_eq_nan_ is true.\n      if (actual.is_nan() || expected.is_nan()) {\n        if (actual.is_nan() && expected.is_nan()) {\n          return nan_eq_nan_;\n        }\n        // One is nan; the other is not nan.\n        return false;\n      }\n      if (HasMaxAbsError()) {\n        // We perform an equality check so that inf will match inf, regardless\n        // of error bounds.  If the result of value - expected_ would result in\n        // overflow or if either value is inf, the default result is infinity,\n        // which should only match if max_abs_error_ is also infinity.\n        if (value == expected_) {\n          return true;\n        }\n\n        const FloatType diff = value - expected_;\n        if (fabs(diff) <= max_abs_error_) {\n          return true;\n        }\n\n        if (listener->IsInterested()) {\n          *listener << \"which is \" << diff << \" from \" << expected_;\n        }\n        return false;\n      } else {\n        return actual.AlmostEquals(expected);\n      }\n    }\n\n    void DescribeTo(::std::ostream* os) const override {\n      // os->precision() returns the previously set precision, which we\n      // store to restore the ostream to its original configuration\n      // after outputting.\n      const ::std::streamsize old_precision = os->precision(\n          ::std::numeric_limits<FloatType>::digits10 + 2);\n      if (FloatingPoint<FloatType>(expected_).is_nan()) {\n        if (nan_eq_nan_) {\n          *os << \"is NaN\";\n        } else {\n          *os << \"never matches\";\n        }\n      } else {\n        *os << \"is approximately \" << expected_;\n        if (HasMaxAbsError()) {\n          *os << \" (absolute error <= \" << max_abs_error_ << \")\";\n        }\n      }\n      os->precision(old_precision);\n    }\n\n    void DescribeNegationTo(::std::ostream* os) const override {\n      // As before, get original precision.\n      const ::std::streamsize old_precision = os->precision(\n          ::std::numeric_limits<FloatType>::digits10 + 2);\n      if (FloatingPoint<FloatType>(expected_).is_nan()) {\n        if (nan_eq_nan_) {\n          *os << \"isn't NaN\";\n        } else {\n          *os << \"is anything\";\n        }\n      } else {\n        *os << \"isn't approximately \" << expected_;\n        if (HasMaxAbsError()) {\n          *os << \" (absolute error > \" << max_abs_error_ << \")\";\n        }\n      }\n      // Restore original precision.\n      os->precision(old_precision);\n    }\n\n   private:\n    bool HasMaxAbsError() const {\n      return max_abs_error_ >= 0;\n    }\n\n    const FloatType expected_;\n    const bool nan_eq_nan_;\n    // max_abs_error will be used for value comparison when >= 0.\n    const FloatType max_abs_error_;\n\n    GTEST_DISALLOW_ASSIGN_(Impl);\n  };\n\n  // The following 3 type conversion operators allow FloatEq(expected) and\n  // NanSensitiveFloatEq(expected) to be used as a Matcher<float>, a\n  // Matcher<const float&>, or a Matcher<float&>, but nothing else.\n  // (While Google's C++ coding style doesn't allow arguments passed\n  // by non-const reference, we may see them in code not conforming to\n  // the style.  Therefore Google Mock needs to support them.)\n  operator Matcher<FloatType>() const {\n    return MakeMatcher(\n        new Impl<FloatType>(expected_, nan_eq_nan_, max_abs_error_));\n  }\n\n  operator Matcher<const FloatType&>() const {\n    return MakeMatcher(\n        new Impl<const FloatType&>(expected_, nan_eq_nan_, max_abs_error_));\n  }\n\n  operator Matcher<FloatType&>() const {\n    return MakeMatcher(\n        new Impl<FloatType&>(expected_, nan_eq_nan_, max_abs_error_));\n  }\n\n private:\n  const FloatType expected_;\n  const bool nan_eq_nan_;\n  // max_abs_error will be used for value comparison when >= 0.\n  const FloatType max_abs_error_;\n\n  GTEST_DISALLOW_ASSIGN_(FloatingEqMatcher);\n};\n\n// A 2-tuple (\"binary\") wrapper around FloatingEqMatcher:\n// FloatingEq2Matcher() matches (x, y) by matching FloatingEqMatcher(x, false)\n// against y, and FloatingEq2Matcher(e) matches FloatingEqMatcher(x, false, e)\n// against y. The former implements \"Eq\", the latter \"Near\". At present, there\n// is no version that compares NaNs as equal.\ntemplate <typename FloatType>\nclass FloatingEq2Matcher {\n public:\n  FloatingEq2Matcher() { Init(-1, false); }\n\n  explicit FloatingEq2Matcher(bool nan_eq_nan) { Init(-1, nan_eq_nan); }\n\n  explicit FloatingEq2Matcher(FloatType max_abs_error) {\n    Init(max_abs_error, false);\n  }\n\n  FloatingEq2Matcher(FloatType max_abs_error, bool nan_eq_nan) {\n    Init(max_abs_error, nan_eq_nan);\n  }\n\n  template <typename T1, typename T2>\n  operator Matcher<::std::tuple<T1, T2>>() const {\n    return MakeMatcher(\n        new Impl<::std::tuple<T1, T2>>(max_abs_error_, nan_eq_nan_));\n  }\n  template <typename T1, typename T2>\n  operator Matcher<const ::std::tuple<T1, T2>&>() const {\n    return MakeMatcher(\n        new Impl<const ::std::tuple<T1, T2>&>(max_abs_error_, nan_eq_nan_));\n  }\n\n private:\n  static ::std::ostream& GetDesc(::std::ostream& os) {  // NOLINT\n    return os << \"an almost-equal pair\";\n  }\n\n  template <typename Tuple>\n  class Impl : public MatcherInterface<Tuple> {\n   public:\n    Impl(FloatType max_abs_error, bool nan_eq_nan) :\n        max_abs_error_(max_abs_error),\n        nan_eq_nan_(nan_eq_nan) {}\n\n    bool MatchAndExplain(Tuple args,\n                         MatchResultListener* listener) const override {\n      if (max_abs_error_ == -1) {\n        FloatingEqMatcher<FloatType> fm(::std::get<0>(args), nan_eq_nan_);\n        return static_cast<Matcher<FloatType>>(fm).MatchAndExplain(\n            ::std::get<1>(args), listener);\n      } else {\n        FloatingEqMatcher<FloatType> fm(::std::get<0>(args), nan_eq_nan_,\n                                        max_abs_error_);\n        return static_cast<Matcher<FloatType>>(fm).MatchAndExplain(\n            ::std::get<1>(args), listener);\n      }\n    }\n    void DescribeTo(::std::ostream* os) const override {\n      *os << \"are \" << GetDesc;\n    }\n    void DescribeNegationTo(::std::ostream* os) const override {\n      *os << \"aren't \" << GetDesc;\n    }\n\n   private:\n    FloatType max_abs_error_;\n    const bool nan_eq_nan_;\n  };\n\n  void Init(FloatType max_abs_error_val, bool nan_eq_nan_val) {\n    max_abs_error_ = max_abs_error_val;\n    nan_eq_nan_ = nan_eq_nan_val;\n  }\n  FloatType max_abs_error_;\n  bool nan_eq_nan_;\n};\n\n// Implements the Pointee(m) matcher for matching a pointer whose\n// pointee matches matcher m.  The pointer can be either raw or smart.\ntemplate <typename InnerMatcher>\nclass PointeeMatcher {\n public:\n  explicit PointeeMatcher(const InnerMatcher& matcher) : matcher_(matcher) {}\n\n  // This type conversion operator template allows Pointee(m) to be\n  // used as a matcher for any pointer type whose pointee type is\n  // compatible with the inner matcher, where type Pointer can be\n  // either a raw pointer or a smart pointer.\n  //\n  // The reason we do this instead of relying on\n  // MakePolymorphicMatcher() is that the latter is not flexible\n  // enough for implementing the DescribeTo() method of Pointee().\n  template <typename Pointer>\n  operator Matcher<Pointer>() const {\n    return Matcher<Pointer>(new Impl<const Pointer&>(matcher_));\n  }\n\n private:\n  // The monomorphic implementation that works for a particular pointer type.\n  template <typename Pointer>\n  class Impl : public MatcherInterface<Pointer> {\n   public:\n    typedef typename PointeeOf<GTEST_REMOVE_CONST_(  // NOLINT\n        GTEST_REMOVE_REFERENCE_(Pointer))>::type Pointee;\n\n    explicit Impl(const InnerMatcher& matcher)\n        : matcher_(MatcherCast<const Pointee&>(matcher)) {}\n\n    void DescribeTo(::std::ostream* os) const override {\n      *os << \"points to a value that \";\n      matcher_.DescribeTo(os);\n    }\n\n    void DescribeNegationTo(::std::ostream* os) const override {\n      *os << \"does not point to a value that \";\n      matcher_.DescribeTo(os);\n    }\n\n    bool MatchAndExplain(Pointer pointer,\n                         MatchResultListener* listener) const override {\n      if (GetRawPointer(pointer) == nullptr) return false;\n\n      *listener << \"which points to \";\n      return MatchPrintAndExplain(*pointer, matcher_, listener);\n    }\n\n   private:\n    const Matcher<const Pointee&> matcher_;\n\n    GTEST_DISALLOW_ASSIGN_(Impl);\n  };\n\n  const InnerMatcher matcher_;\n\n  GTEST_DISALLOW_ASSIGN_(PointeeMatcher);\n};\n\n#if GTEST_HAS_RTTI\n// Implements the WhenDynamicCastTo<T>(m) matcher that matches a pointer or\n// reference that matches inner_matcher when dynamic_cast<T> is applied.\n// The result of dynamic_cast<To> is forwarded to the inner matcher.\n// If To is a pointer and the cast fails, the inner matcher will receive NULL.\n// If To is a reference and the cast fails, this matcher returns false\n// immediately.\ntemplate <typename To>\nclass WhenDynamicCastToMatcherBase {\n public:\n  explicit WhenDynamicCastToMatcherBase(const Matcher<To>& matcher)\n      : matcher_(matcher) {}\n\n  void DescribeTo(::std::ostream* os) const {\n    GetCastTypeDescription(os);\n    matcher_.DescribeTo(os);\n  }\n\n  void DescribeNegationTo(::std::ostream* os) const {\n    GetCastTypeDescription(os);\n    matcher_.DescribeNegationTo(os);\n  }\n\n protected:\n  const Matcher<To> matcher_;\n\n  static std::string GetToName() {\n    return GetTypeName<To>();\n  }\n\n private:\n  static void GetCastTypeDescription(::std::ostream* os) {\n    *os << \"when dynamic_cast to \" << GetToName() << \", \";\n  }\n\n  GTEST_DISALLOW_ASSIGN_(WhenDynamicCastToMatcherBase);\n};\n\n// Primary template.\n// To is a pointer. Cast and forward the result.\ntemplate <typename To>\nclass WhenDynamicCastToMatcher : public WhenDynamicCastToMatcherBase<To> {\n public:\n  explicit WhenDynamicCastToMatcher(const Matcher<To>& matcher)\n      : WhenDynamicCastToMatcherBase<To>(matcher) {}\n\n  template <typename From>\n  bool MatchAndExplain(From from, MatchResultListener* listener) const {\n    To to = dynamic_cast<To>(from);\n    return MatchPrintAndExplain(to, this->matcher_, listener);\n  }\n};\n\n// Specialize for references.\n// In this case we return false if the dynamic_cast fails.\ntemplate <typename To>\nclass WhenDynamicCastToMatcher<To&> : public WhenDynamicCastToMatcherBase<To&> {\n public:\n  explicit WhenDynamicCastToMatcher(const Matcher<To&>& matcher)\n      : WhenDynamicCastToMatcherBase<To&>(matcher) {}\n\n  template <typename From>\n  bool MatchAndExplain(From& from, MatchResultListener* listener) const {\n    // We don't want an std::bad_cast here, so do the cast with pointers.\n    To* to = dynamic_cast<To*>(&from);\n    if (to == nullptr) {\n      *listener << \"which cannot be dynamic_cast to \" << this->GetToName();\n      return false;\n    }\n    return MatchPrintAndExplain(*to, this->matcher_, listener);\n  }\n};\n#endif  // GTEST_HAS_RTTI\n\n// Implements the Field() matcher for matching a field (i.e. member\n// variable) of an object.\ntemplate <typename Class, typename FieldType>\nclass FieldMatcher {\n public:\n  FieldMatcher(FieldType Class::*field,\n               const Matcher<const FieldType&>& matcher)\n      : field_(field), matcher_(matcher), whose_field_(\"whose given field \") {}\n\n  FieldMatcher(const std::string& field_name, FieldType Class::*field,\n               const Matcher<const FieldType&>& matcher)\n      : field_(field),\n        matcher_(matcher),\n        whose_field_(\"whose field `\" + field_name + \"` \") {}\n\n  void DescribeTo(::std::ostream* os) const {\n    *os << \"is an object \" << whose_field_;\n    matcher_.DescribeTo(os);\n  }\n\n  void DescribeNegationTo(::std::ostream* os) const {\n    *os << \"is an object \" << whose_field_;\n    matcher_.DescribeNegationTo(os);\n  }\n\n  template <typename T>\n  bool MatchAndExplain(const T& value, MatchResultListener* listener) const {\n    // FIXME: The dispatch on std::is_pointer was introduced as a workaround for\n    // a compiler bug, and can now be removed.\n    return MatchAndExplainImpl(\n        typename std::is_pointer<GTEST_REMOVE_CONST_(T)>::type(), value,\n        listener);\n  }\n\n private:\n  bool MatchAndExplainImpl(std::false_type /* is_not_pointer */,\n                           const Class& obj,\n                           MatchResultListener* listener) const {\n    *listener << whose_field_ << \"is \";\n    return MatchPrintAndExplain(obj.*field_, matcher_, listener);\n  }\n\n  bool MatchAndExplainImpl(std::true_type /* is_pointer */, const Class* p,\n                           MatchResultListener* listener) const {\n    if (p == nullptr) return false;\n\n    *listener << \"which points to an object \";\n    // Since *p has a field, it must be a class/struct/union type and\n    // thus cannot be a pointer.  Therefore we pass false_type() as\n    // the first argument.\n    return MatchAndExplainImpl(std::false_type(), *p, listener);\n  }\n\n  const FieldType Class::*field_;\n  const Matcher<const FieldType&> matcher_;\n\n  // Contains either \"whose given field \" if the name of the field is unknown\n  // or \"whose field `name_of_field` \" if the name is known.\n  const std::string whose_field_;\n\n  GTEST_DISALLOW_ASSIGN_(FieldMatcher);\n};\n\n// Implements the Property() matcher for matching a property\n// (i.e. return value of a getter method) of an object.\n//\n// Property is a const-qualified member function of Class returning\n// PropertyType.\ntemplate <typename Class, typename PropertyType, typename Property>\nclass PropertyMatcher {\n public:\n  typedef const PropertyType& RefToConstProperty;\n\n  PropertyMatcher(Property property, const Matcher<RefToConstProperty>& matcher)\n      : property_(property),\n        matcher_(matcher),\n        whose_property_(\"whose given property \") {}\n\n  PropertyMatcher(const std::string& property_name, Property property,\n                  const Matcher<RefToConstProperty>& matcher)\n      : property_(property),\n        matcher_(matcher),\n        whose_property_(\"whose property `\" + property_name + \"` \") {}\n\n  void DescribeTo(::std::ostream* os) const {\n    *os << \"is an object \" << whose_property_;\n    matcher_.DescribeTo(os);\n  }\n\n  void DescribeNegationTo(::std::ostream* os) const {\n    *os << \"is an object \" << whose_property_;\n    matcher_.DescribeNegationTo(os);\n  }\n\n  template <typename T>\n  bool MatchAndExplain(const T&value, MatchResultListener* listener) const {\n    return MatchAndExplainImpl(\n        typename std::is_pointer<GTEST_REMOVE_CONST_(T)>::type(), value,\n        listener);\n  }\n\n private:\n  bool MatchAndExplainImpl(std::false_type /* is_not_pointer */,\n                           const Class& obj,\n                           MatchResultListener* listener) const {\n    *listener << whose_property_ << \"is \";\n    // Cannot pass the return value (for example, int) to MatchPrintAndExplain,\n    // which takes a non-const reference as argument.\n    RefToConstProperty result = (obj.*property_)();\n    return MatchPrintAndExplain(result, matcher_, listener);\n  }\n\n  bool MatchAndExplainImpl(std::true_type /* is_pointer */, const Class* p,\n                           MatchResultListener* listener) const {\n    if (p == nullptr) return false;\n\n    *listener << \"which points to an object \";\n    // Since *p has a property method, it must be a class/struct/union\n    // type and thus cannot be a pointer.  Therefore we pass\n    // false_type() as the first argument.\n    return MatchAndExplainImpl(std::false_type(), *p, listener);\n  }\n\n  Property property_;\n  const Matcher<RefToConstProperty> matcher_;\n\n  // Contains either \"whose given property \" if the name of the property is\n  // unknown or \"whose property `name_of_property` \" if the name is known.\n  const std::string whose_property_;\n\n  GTEST_DISALLOW_ASSIGN_(PropertyMatcher);\n};\n\n// Type traits specifying various features of different functors for ResultOf.\n// The default template specifies features for functor objects.\ntemplate <typename Functor>\nstruct CallableTraits {\n  typedef Functor StorageType;\n\n  static void CheckIsValid(Functor /* functor */) {}\n\n  template <typename T>\n  static auto Invoke(Functor f, T arg) -> decltype(f(arg)) { return f(arg); }\n};\n\n// Specialization for function pointers.\ntemplate <typename ArgType, typename ResType>\nstruct CallableTraits<ResType(*)(ArgType)> {\n  typedef ResType ResultType;\n  typedef ResType(*StorageType)(ArgType);\n\n  static void CheckIsValid(ResType(*f)(ArgType)) {\n    GTEST_CHECK_(f != nullptr)\n        << \"NULL function pointer is passed into ResultOf().\";\n  }\n  template <typename T>\n  static ResType Invoke(ResType(*f)(ArgType), T arg) {\n    return (*f)(arg);\n  }\n};\n\n// Implements the ResultOf() matcher for matching a return value of a\n// unary function of an object.\ntemplate <typename Callable, typename InnerMatcher>\nclass ResultOfMatcher {\n public:\n  ResultOfMatcher(Callable callable, InnerMatcher matcher)\n      : callable_(std::move(callable)), matcher_(std::move(matcher)) {\n    CallableTraits<Callable>::CheckIsValid(callable_);\n  }\n\n  template <typename T>\n  operator Matcher<T>() const {\n    return Matcher<T>(new Impl<T>(callable_, matcher_));\n  }\n\n private:\n  typedef typename CallableTraits<Callable>::StorageType CallableStorageType;\n\n  template <typename T>\n  class Impl : public MatcherInterface<T> {\n    using ResultType = decltype(CallableTraits<Callable>::template Invoke<T>(\n        std::declval<CallableStorageType>(), std::declval<T>()));\n\n   public:\n    template <typename M>\n    Impl(const CallableStorageType& callable, const M& matcher)\n        : callable_(callable), matcher_(MatcherCast<ResultType>(matcher)) {}\n\n    void DescribeTo(::std::ostream* os) const override {\n      *os << \"is mapped by the given callable to a value that \";\n      matcher_.DescribeTo(os);\n    }\n\n    void DescribeNegationTo(::std::ostream* os) const override {\n      *os << \"is mapped by the given callable to a value that \";\n      matcher_.DescribeNegationTo(os);\n    }\n\n    bool MatchAndExplain(T obj, MatchResultListener* listener) const override {\n      *listener << \"which is mapped by the given callable to \";\n      // Cannot pass the return value directly to MatchPrintAndExplain, which\n      // takes a non-const reference as argument.\n      // Also, specifying template argument explicitly is needed because T could\n      // be a non-const reference (e.g. Matcher<Uncopyable&>).\n      ResultType result =\n          CallableTraits<Callable>::template Invoke<T>(callable_, obj);\n      return MatchPrintAndExplain(result, matcher_, listener);\n    }\n\n   private:\n    // Functors often define operator() as non-const method even though\n    // they are actually stateless. But we need to use them even when\n    // 'this' is a const pointer. It's the user's responsibility not to\n    // use stateful callables with ResultOf(), which doesn't guarantee\n    // how many times the callable will be invoked.\n    mutable CallableStorageType callable_;\n    const Matcher<ResultType> matcher_;\n\n    GTEST_DISALLOW_ASSIGN_(Impl);\n  };  // class Impl\n\n  const CallableStorageType callable_;\n  const InnerMatcher matcher_;\n\n  GTEST_DISALLOW_ASSIGN_(ResultOfMatcher);\n};\n\n// Implements a matcher that checks the size of an STL-style container.\ntemplate <typename SizeMatcher>\nclass SizeIsMatcher {\n public:\n  explicit SizeIsMatcher(const SizeMatcher& size_matcher)\n       : size_matcher_(size_matcher) {\n  }\n\n  template <typename Container>\n  operator Matcher<Container>() const {\n    return Matcher<Container>(new Impl<const Container&>(size_matcher_));\n  }\n\n  template <typename Container>\n  class Impl : public MatcherInterface<Container> {\n   public:\n    using SizeType = decltype(std::declval<Container>().size());\n    explicit Impl(const SizeMatcher& size_matcher)\n        : size_matcher_(MatcherCast<SizeType>(size_matcher)) {}\n\n    void DescribeTo(::std::ostream* os) const override {\n      *os << \"size \";\n      size_matcher_.DescribeTo(os);\n    }\n    void DescribeNegationTo(::std::ostream* os) const override {\n      *os << \"size \";\n      size_matcher_.DescribeNegationTo(os);\n    }\n\n    bool MatchAndExplain(Container container,\n                         MatchResultListener* listener) const override {\n      SizeType size = container.size();\n      StringMatchResultListener size_listener;\n      const bool result = size_matcher_.MatchAndExplain(size, &size_listener);\n      *listener\n          << \"whose size \" << size << (result ? \" matches\" : \" doesn't match\");\n      PrintIfNotEmpty(size_listener.str(), listener->stream());\n      return result;\n    }\n\n   private:\n    const Matcher<SizeType> size_matcher_;\n    GTEST_DISALLOW_ASSIGN_(Impl);\n  };\n\n private:\n  const SizeMatcher size_matcher_;\n  GTEST_DISALLOW_ASSIGN_(SizeIsMatcher);\n};\n\n// Implements a matcher that checks the begin()..end() distance of an STL-style\n// container.\ntemplate <typename DistanceMatcher>\nclass BeginEndDistanceIsMatcher {\n public:\n  explicit BeginEndDistanceIsMatcher(const DistanceMatcher& distance_matcher)\n      : distance_matcher_(distance_matcher) {}\n\n  template <typename Container>\n  operator Matcher<Container>() const {\n    return Matcher<Container>(new Impl<const Container&>(distance_matcher_));\n  }\n\n  template <typename Container>\n  class Impl : public MatcherInterface<Container> {\n   public:\n    typedef internal::StlContainerView<\n        GTEST_REMOVE_REFERENCE_AND_CONST_(Container)> ContainerView;\n    typedef typename std::iterator_traits<\n        typename ContainerView::type::const_iterator>::difference_type\n        DistanceType;\n    explicit Impl(const DistanceMatcher& distance_matcher)\n        : distance_matcher_(MatcherCast<DistanceType>(distance_matcher)) {}\n\n    void DescribeTo(::std::ostream* os) const override {\n      *os << \"distance between begin() and end() \";\n      distance_matcher_.DescribeTo(os);\n    }\n    void DescribeNegationTo(::std::ostream* os) const override {\n      *os << \"distance between begin() and end() \";\n      distance_matcher_.DescribeNegationTo(os);\n    }\n\n    bool MatchAndExplain(Container container,\n                         MatchResultListener* listener) const override {\n      using std::begin;\n      using std::end;\n      DistanceType distance = std::distance(begin(container), end(container));\n      StringMatchResultListener distance_listener;\n      const bool result =\n          distance_matcher_.MatchAndExplain(distance, &distance_listener);\n      *listener << \"whose distance between begin() and end() \" << distance\n                << (result ? \" matches\" : \" doesn't match\");\n      PrintIfNotEmpty(distance_listener.str(), listener->stream());\n      return result;\n    }\n\n   private:\n    const Matcher<DistanceType> distance_matcher_;\n    GTEST_DISALLOW_ASSIGN_(Impl);\n  };\n\n private:\n  const DistanceMatcher distance_matcher_;\n  GTEST_DISALLOW_ASSIGN_(BeginEndDistanceIsMatcher);\n};\n\n// Implements an equality matcher for any STL-style container whose elements\n// support ==. This matcher is like Eq(), but its failure explanations provide\n// more detailed information that is useful when the container is used as a set.\n// The failure message reports elements that are in one of the operands but not\n// the other. The failure messages do not report duplicate or out-of-order\n// elements in the containers (which don't properly matter to sets, but can\n// occur if the containers are vectors or lists, for example).\n//\n// Uses the container's const_iterator, value_type, operator ==,\n// begin(), and end().\ntemplate <typename Container>\nclass ContainerEqMatcher {\n public:\n  typedef internal::StlContainerView<Container> View;\n  typedef typename View::type StlContainer;\n  typedef typename View::const_reference StlContainerReference;\n\n  // We make a copy of expected in case the elements in it are modified\n  // after this matcher is created.\n  explicit ContainerEqMatcher(const Container& expected)\n      : expected_(View::Copy(expected)) {\n    // Makes sure the user doesn't instantiate this class template\n    // with a const or reference type.\n    (void)testing::StaticAssertTypeEq<Container,\n        GTEST_REMOVE_REFERENCE_AND_CONST_(Container)>();\n  }\n\n  void DescribeTo(::std::ostream* os) const {\n    *os << \"equals \";\n    UniversalPrint(expected_, os);\n  }\n  void DescribeNegationTo(::std::ostream* os) const {\n    *os << \"does not equal \";\n    UniversalPrint(expected_, os);\n  }\n\n  template <typename LhsContainer>\n  bool MatchAndExplain(const LhsContainer& lhs,\n                       MatchResultListener* listener) const {\n    // GTEST_REMOVE_CONST_() is needed to work around an MSVC 8.0 bug\n    // that causes LhsContainer to be a const type sometimes.\n    typedef internal::StlContainerView<GTEST_REMOVE_CONST_(LhsContainer)>\n        LhsView;\n    typedef typename LhsView::type LhsStlContainer;\n    StlContainerReference lhs_stl_container = LhsView::ConstReference(lhs);\n    if (lhs_stl_container == expected_)\n      return true;\n\n    ::std::ostream* const os = listener->stream();\n    if (os != nullptr) {\n      // Something is different. Check for extra values first.\n      bool printed_header = false;\n      for (typename LhsStlContainer::const_iterator it =\n               lhs_stl_container.begin();\n           it != lhs_stl_container.end(); ++it) {\n        if (internal::ArrayAwareFind(expected_.begin(), expected_.end(), *it) ==\n            expected_.end()) {\n          if (printed_header) {\n            *os << \", \";\n          } else {\n            *os << \"which has these unexpected elements: \";\n            printed_header = true;\n          }\n          UniversalPrint(*it, os);\n        }\n      }\n\n      // Now check for missing values.\n      bool printed_header2 = false;\n      for (typename StlContainer::const_iterator it = expected_.begin();\n           it != expected_.end(); ++it) {\n        if (internal::ArrayAwareFind(\n                lhs_stl_container.begin(), lhs_stl_container.end(), *it) ==\n            lhs_stl_container.end()) {\n          if (printed_header2) {\n            *os << \", \";\n          } else {\n            *os << (printed_header ? \",\\nand\" : \"which\")\n                << \" doesn't have these expected elements: \";\n            printed_header2 = true;\n          }\n          UniversalPrint(*it, os);\n        }\n      }\n    }\n\n    return false;\n  }\n\n private:\n  const StlContainer expected_;\n\n  GTEST_DISALLOW_ASSIGN_(ContainerEqMatcher);\n};\n\n// A comparator functor that uses the < operator to compare two values.\nstruct LessComparator {\n  template <typename T, typename U>\n  bool operator()(const T& lhs, const U& rhs) const { return lhs < rhs; }\n};\n\n// Implements WhenSortedBy(comparator, container_matcher).\ntemplate <typename Comparator, typename ContainerMatcher>\nclass WhenSortedByMatcher {\n public:\n  WhenSortedByMatcher(const Comparator& comparator,\n                      const ContainerMatcher& matcher)\n      : comparator_(comparator), matcher_(matcher) {}\n\n  template <typename LhsContainer>\n  operator Matcher<LhsContainer>() const {\n    return MakeMatcher(new Impl<LhsContainer>(comparator_, matcher_));\n  }\n\n  template <typename LhsContainer>\n  class Impl : public MatcherInterface<LhsContainer> {\n   public:\n    typedef internal::StlContainerView<\n         GTEST_REMOVE_REFERENCE_AND_CONST_(LhsContainer)> LhsView;\n    typedef typename LhsView::type LhsStlContainer;\n    typedef typename LhsView::const_reference LhsStlContainerReference;\n    // Transforms std::pair<const Key, Value> into std::pair<Key, Value>\n    // so that we can match associative containers.\n    typedef typename RemoveConstFromKey<\n        typename LhsStlContainer::value_type>::type LhsValue;\n\n    Impl(const Comparator& comparator, const ContainerMatcher& matcher)\n        : comparator_(comparator), matcher_(matcher) {}\n\n    void DescribeTo(::std::ostream* os) const override {\n      *os << \"(when sorted) \";\n      matcher_.DescribeTo(os);\n    }\n\n    void DescribeNegationTo(::std::ostream* os) const override {\n      *os << \"(when sorted) \";\n      matcher_.DescribeNegationTo(os);\n    }\n\n    bool MatchAndExplain(LhsContainer lhs,\n                         MatchResultListener* listener) const override {\n      LhsStlContainerReference lhs_stl_container = LhsView::ConstReference(lhs);\n      ::std::vector<LhsValue> sorted_container(lhs_stl_container.begin(),\n                                               lhs_stl_container.end());\n      ::std::sort(\n           sorted_container.begin(), sorted_container.end(), comparator_);\n\n      if (!listener->IsInterested()) {\n        // If the listener is not interested, we do not need to\n        // construct the inner explanation.\n        return matcher_.Matches(sorted_container);\n      }\n\n      *listener << \"which is \";\n      UniversalPrint(sorted_container, listener->stream());\n      *listener << \" when sorted\";\n\n      StringMatchResultListener inner_listener;\n      const bool match = matcher_.MatchAndExplain(sorted_container,\n                                                  &inner_listener);\n      PrintIfNotEmpty(inner_listener.str(), listener->stream());\n      return match;\n    }\n\n   private:\n    const Comparator comparator_;\n    const Matcher<const ::std::vector<LhsValue>&> matcher_;\n\n    GTEST_DISALLOW_COPY_AND_ASSIGN_(Impl);\n  };\n\n private:\n  const Comparator comparator_;\n  const ContainerMatcher matcher_;\n\n  GTEST_DISALLOW_ASSIGN_(WhenSortedByMatcher);\n};\n\n// Implements Pointwise(tuple_matcher, rhs_container).  tuple_matcher\n// must be able to be safely cast to Matcher<std::tuple<const T1&, const\n// T2&> >, where T1 and T2 are the types of elements in the LHS\n// container and the RHS container respectively.\ntemplate <typename TupleMatcher, typename RhsContainer>\nclass PointwiseMatcher {\n  GTEST_COMPILE_ASSERT_(\n      !IsHashTable<GTEST_REMOVE_REFERENCE_AND_CONST_(RhsContainer)>::value,\n      use_UnorderedPointwise_with_hash_tables);\n\n public:\n  typedef internal::StlContainerView<RhsContainer> RhsView;\n  typedef typename RhsView::type RhsStlContainer;\n  typedef typename RhsStlContainer::value_type RhsValue;\n\n  // Like ContainerEq, we make a copy of rhs in case the elements in\n  // it are modified after this matcher is created.\n  PointwiseMatcher(const TupleMatcher& tuple_matcher, const RhsContainer& rhs)\n      : tuple_matcher_(tuple_matcher), rhs_(RhsView::Copy(rhs)) {\n    // Makes sure the user doesn't instantiate this class template\n    // with a const or reference type.\n    (void)testing::StaticAssertTypeEq<RhsContainer,\n        GTEST_REMOVE_REFERENCE_AND_CONST_(RhsContainer)>();\n  }\n\n  template <typename LhsContainer>\n  operator Matcher<LhsContainer>() const {\n    GTEST_COMPILE_ASSERT_(\n        !IsHashTable<GTEST_REMOVE_REFERENCE_AND_CONST_(LhsContainer)>::value,\n        use_UnorderedPointwise_with_hash_tables);\n\n    return Matcher<LhsContainer>(\n        new Impl<const LhsContainer&>(tuple_matcher_, rhs_));\n  }\n\n  template <typename LhsContainer>\n  class Impl : public MatcherInterface<LhsContainer> {\n   public:\n    typedef internal::StlContainerView<\n         GTEST_REMOVE_REFERENCE_AND_CONST_(LhsContainer)> LhsView;\n    typedef typename LhsView::type LhsStlContainer;\n    typedef typename LhsView::const_reference LhsStlContainerReference;\n    typedef typename LhsStlContainer::value_type LhsValue;\n    // We pass the LHS value and the RHS value to the inner matcher by\n    // reference, as they may be expensive to copy.  We must use tuple\n    // instead of pair here, as a pair cannot hold references (C++ 98,\n    // 20.2.2 [lib.pairs]).\n    typedef ::std::tuple<const LhsValue&, const RhsValue&> InnerMatcherArg;\n\n    Impl(const TupleMatcher& tuple_matcher, const RhsStlContainer& rhs)\n        // mono_tuple_matcher_ holds a monomorphic version of the tuple matcher.\n        : mono_tuple_matcher_(SafeMatcherCast<InnerMatcherArg>(tuple_matcher)),\n          rhs_(rhs) {}\n\n    void DescribeTo(::std::ostream* os) const override {\n      *os << \"contains \" << rhs_.size()\n          << \" values, where each value and its corresponding value in \";\n      UniversalPrinter<RhsStlContainer>::Print(rhs_, os);\n      *os << \" \";\n      mono_tuple_matcher_.DescribeTo(os);\n    }\n    void DescribeNegationTo(::std::ostream* os) const override {\n      *os << \"doesn't contain exactly \" << rhs_.size()\n          << \" values, or contains a value x at some index i\"\n          << \" where x and the i-th value of \";\n      UniversalPrint(rhs_, os);\n      *os << \" \";\n      mono_tuple_matcher_.DescribeNegationTo(os);\n    }\n\n    bool MatchAndExplain(LhsContainer lhs,\n                         MatchResultListener* listener) const override {\n      LhsStlContainerReference lhs_stl_container = LhsView::ConstReference(lhs);\n      const size_t actual_size = lhs_stl_container.size();\n      if (actual_size != rhs_.size()) {\n        *listener << \"which contains \" << actual_size << \" values\";\n        return false;\n      }\n\n      typename LhsStlContainer::const_iterator left = lhs_stl_container.begin();\n      typename RhsStlContainer::const_iterator right = rhs_.begin();\n      for (size_t i = 0; i != actual_size; ++i, ++left, ++right) {\n        if (listener->IsInterested()) {\n          StringMatchResultListener inner_listener;\n          // Create InnerMatcherArg as a temporarily object to avoid it outlives\n          // *left and *right. Dereference or the conversion to `const T&` may\n          // return temp objects, e.g for vector<bool>.\n          if (!mono_tuple_matcher_.MatchAndExplain(\n                  InnerMatcherArg(ImplicitCast_<const LhsValue&>(*left),\n                                  ImplicitCast_<const RhsValue&>(*right)),\n                  &inner_listener)) {\n            *listener << \"where the value pair (\";\n            UniversalPrint(*left, listener->stream());\n            *listener << \", \";\n            UniversalPrint(*right, listener->stream());\n            *listener << \") at index #\" << i << \" don't match\";\n            PrintIfNotEmpty(inner_listener.str(), listener->stream());\n            return false;\n          }\n        } else {\n          if (!mono_tuple_matcher_.Matches(\n                  InnerMatcherArg(ImplicitCast_<const LhsValue&>(*left),\n                                  ImplicitCast_<const RhsValue&>(*right))))\n            return false;\n        }\n      }\n\n      return true;\n    }\n\n   private:\n    const Matcher<InnerMatcherArg> mono_tuple_matcher_;\n    const RhsStlContainer rhs_;\n\n    GTEST_DISALLOW_ASSIGN_(Impl);\n  };\n\n private:\n  const TupleMatcher tuple_matcher_;\n  const RhsStlContainer rhs_;\n\n  GTEST_DISALLOW_ASSIGN_(PointwiseMatcher);\n};\n\n// Holds the logic common to ContainsMatcherImpl and EachMatcherImpl.\ntemplate <typename Container>\nclass QuantifierMatcherImpl : public MatcherInterface<Container> {\n public:\n  typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;\n  typedef StlContainerView<RawContainer> View;\n  typedef typename View::type StlContainer;\n  typedef typename View::const_reference StlContainerReference;\n  typedef typename StlContainer::value_type Element;\n\n  template <typename InnerMatcher>\n  explicit QuantifierMatcherImpl(InnerMatcher inner_matcher)\n      : inner_matcher_(\n           testing::SafeMatcherCast<const Element&>(inner_matcher)) {}\n\n  // Checks whether:\n  // * All elements in the container match, if all_elements_should_match.\n  // * Any element in the container matches, if !all_elements_should_match.\n  bool MatchAndExplainImpl(bool all_elements_should_match,\n                           Container container,\n                           MatchResultListener* listener) const {\n    StlContainerReference stl_container = View::ConstReference(container);\n    size_t i = 0;\n    for (typename StlContainer::const_iterator it = stl_container.begin();\n         it != stl_container.end(); ++it, ++i) {\n      StringMatchResultListener inner_listener;\n      const bool matches = inner_matcher_.MatchAndExplain(*it, &inner_listener);\n\n      if (matches != all_elements_should_match) {\n        *listener << \"whose element #\" << i\n                  << (matches ? \" matches\" : \" doesn't match\");\n        PrintIfNotEmpty(inner_listener.str(), listener->stream());\n        return !all_elements_should_match;\n      }\n    }\n    return all_elements_should_match;\n  }\n\n protected:\n  const Matcher<const Element&> inner_matcher_;\n\n  GTEST_DISALLOW_ASSIGN_(QuantifierMatcherImpl);\n};\n\n// Implements Contains(element_matcher) for the given argument type Container.\n// Symmetric to EachMatcherImpl.\ntemplate <typename Container>\nclass ContainsMatcherImpl : public QuantifierMatcherImpl<Container> {\n public:\n  template <typename InnerMatcher>\n  explicit ContainsMatcherImpl(InnerMatcher inner_matcher)\n      : QuantifierMatcherImpl<Container>(inner_matcher) {}\n\n  // Describes what this matcher does.\n  void DescribeTo(::std::ostream* os) const override {\n    *os << \"contains at least one element that \";\n    this->inner_matcher_.DescribeTo(os);\n  }\n\n  void DescribeNegationTo(::std::ostream* os) const override {\n    *os << \"doesn't contain any element that \";\n    this->inner_matcher_.DescribeTo(os);\n  }\n\n  bool MatchAndExplain(Container container,\n                       MatchResultListener* listener) const override {\n    return this->MatchAndExplainImpl(false, container, listener);\n  }\n\n private:\n  GTEST_DISALLOW_ASSIGN_(ContainsMatcherImpl);\n};\n\n// Implements Each(element_matcher) for the given argument type Container.\n// Symmetric to ContainsMatcherImpl.\ntemplate <typename Container>\nclass EachMatcherImpl : public QuantifierMatcherImpl<Container> {\n public:\n  template <typename InnerMatcher>\n  explicit EachMatcherImpl(InnerMatcher inner_matcher)\n      : QuantifierMatcherImpl<Container>(inner_matcher) {}\n\n  // Describes what this matcher does.\n  void DescribeTo(::std::ostream* os) const override {\n    *os << \"only contains elements that \";\n    this->inner_matcher_.DescribeTo(os);\n  }\n\n  void DescribeNegationTo(::std::ostream* os) const override {\n    *os << \"contains some element that \";\n    this->inner_matcher_.DescribeNegationTo(os);\n  }\n\n  bool MatchAndExplain(Container container,\n                       MatchResultListener* listener) const override {\n    return this->MatchAndExplainImpl(true, container, listener);\n  }\n\n private:\n  GTEST_DISALLOW_ASSIGN_(EachMatcherImpl);\n};\n\n// Implements polymorphic Contains(element_matcher).\ntemplate <typename M>\nclass ContainsMatcher {\n public:\n  explicit ContainsMatcher(M m) : inner_matcher_(m) {}\n\n  template <typename Container>\n  operator Matcher<Container>() const {\n    return Matcher<Container>(\n        new ContainsMatcherImpl<const Container&>(inner_matcher_));\n  }\n\n private:\n  const M inner_matcher_;\n\n  GTEST_DISALLOW_ASSIGN_(ContainsMatcher);\n};\n\n// Implements polymorphic Each(element_matcher).\ntemplate <typename M>\nclass EachMatcher {\n public:\n  explicit EachMatcher(M m) : inner_matcher_(m) {}\n\n  template <typename Container>\n  operator Matcher<Container>() const {\n    return Matcher<Container>(\n        new EachMatcherImpl<const Container&>(inner_matcher_));\n  }\n\n private:\n  const M inner_matcher_;\n\n  GTEST_DISALLOW_ASSIGN_(EachMatcher);\n};\n\nstruct Rank1 {};\nstruct Rank0 : Rank1 {};\n\nnamespace pair_getters {\nusing std::get;\ntemplate <typename T>\nauto First(T& x, Rank1) -> decltype(get<0>(x)) {  // NOLINT\n  return get<0>(x);\n}\ntemplate <typename T>\nauto First(T& x, Rank0) -> decltype((x.first)) {  // NOLINT\n  return x.first;\n}\n\ntemplate <typename T>\nauto Second(T& x, Rank1) -> decltype(get<1>(x)) {  // NOLINT\n  return get<1>(x);\n}\ntemplate <typename T>\nauto Second(T& x, Rank0) -> decltype((x.second)) {  // NOLINT\n  return x.second;\n}\n}  // namespace pair_getters\n\n// Implements Key(inner_matcher) for the given argument pair type.\n// Key(inner_matcher) matches an std::pair whose 'first' field matches\n// inner_matcher.  For example, Contains(Key(Ge(5))) can be used to match an\n// std::map that contains at least one element whose key is >= 5.\ntemplate <typename PairType>\nclass KeyMatcherImpl : public MatcherInterface<PairType> {\n public:\n  typedef GTEST_REMOVE_REFERENCE_AND_CONST_(PairType) RawPairType;\n  typedef typename RawPairType::first_type KeyType;\n\n  template <typename InnerMatcher>\n  explicit KeyMatcherImpl(InnerMatcher inner_matcher)\n      : inner_matcher_(\n          testing::SafeMatcherCast<const KeyType&>(inner_matcher)) {\n  }\n\n  // Returns true iff 'key_value.first' (the key) matches the inner matcher.\n  bool MatchAndExplain(PairType key_value,\n                       MatchResultListener* listener) const override {\n    StringMatchResultListener inner_listener;\n    const bool match = inner_matcher_.MatchAndExplain(\n        pair_getters::First(key_value, Rank0()), &inner_listener);\n    const std::string explanation = inner_listener.str();\n    if (explanation != \"\") {\n      *listener << \"whose first field is a value \" << explanation;\n    }\n    return match;\n  }\n\n  // Describes what this matcher does.\n  void DescribeTo(::std::ostream* os) const override {\n    *os << \"has a key that \";\n    inner_matcher_.DescribeTo(os);\n  }\n\n  // Describes what the negation of this matcher does.\n  void DescribeNegationTo(::std::ostream* os) const override {\n    *os << \"doesn't have a key that \";\n    inner_matcher_.DescribeTo(os);\n  }\n\n private:\n  const Matcher<const KeyType&> inner_matcher_;\n\n  GTEST_DISALLOW_ASSIGN_(KeyMatcherImpl);\n};\n\n// Implements polymorphic Key(matcher_for_key).\ntemplate <typename M>\nclass KeyMatcher {\n public:\n  explicit KeyMatcher(M m) : matcher_for_key_(m) {}\n\n  template <typename PairType>\n  operator Matcher<PairType>() const {\n    return Matcher<PairType>(\n        new KeyMatcherImpl<const PairType&>(matcher_for_key_));\n  }\n\n private:\n  const M matcher_for_key_;\n\n  GTEST_DISALLOW_ASSIGN_(KeyMatcher);\n};\n\n// Implements Pair(first_matcher, second_matcher) for the given argument pair\n// type with its two matchers. See Pair() function below.\ntemplate <typename PairType>\nclass PairMatcherImpl : public MatcherInterface<PairType> {\n public:\n  typedef GTEST_REMOVE_REFERENCE_AND_CONST_(PairType) RawPairType;\n  typedef typename RawPairType::first_type FirstType;\n  typedef typename RawPairType::second_type SecondType;\n\n  template <typename FirstMatcher, typename SecondMatcher>\n  PairMatcherImpl(FirstMatcher first_matcher, SecondMatcher second_matcher)\n      : first_matcher_(\n            testing::SafeMatcherCast<const FirstType&>(first_matcher)),\n        second_matcher_(\n            testing::SafeMatcherCast<const SecondType&>(second_matcher)) {\n  }\n\n  // Describes what this matcher does.\n  void DescribeTo(::std::ostream* os) const override {\n    *os << \"has a first field that \";\n    first_matcher_.DescribeTo(os);\n    *os << \", and has a second field that \";\n    second_matcher_.DescribeTo(os);\n  }\n\n  // Describes what the negation of this matcher does.\n  void DescribeNegationTo(::std::ostream* os) const override {\n    *os << \"has a first field that \";\n    first_matcher_.DescribeNegationTo(os);\n    *os << \", or has a second field that \";\n    second_matcher_.DescribeNegationTo(os);\n  }\n\n  // Returns true iff 'a_pair.first' matches first_matcher and 'a_pair.second'\n  // matches second_matcher.\n  bool MatchAndExplain(PairType a_pair,\n                       MatchResultListener* listener) const override {\n    if (!listener->IsInterested()) {\n      // If the listener is not interested, we don't need to construct the\n      // explanation.\n      return first_matcher_.Matches(pair_getters::First(a_pair, Rank0())) &&\n             second_matcher_.Matches(pair_getters::Second(a_pair, Rank0()));\n    }\n    StringMatchResultListener first_inner_listener;\n    if (!first_matcher_.MatchAndExplain(pair_getters::First(a_pair, Rank0()),\n                                        &first_inner_listener)) {\n      *listener << \"whose first field does not match\";\n      PrintIfNotEmpty(first_inner_listener.str(), listener->stream());\n      return false;\n    }\n    StringMatchResultListener second_inner_listener;\n    if (!second_matcher_.MatchAndExplain(pair_getters::Second(a_pair, Rank0()),\n                                         &second_inner_listener)) {\n      *listener << \"whose second field does not match\";\n      PrintIfNotEmpty(second_inner_listener.str(), listener->stream());\n      return false;\n    }\n    ExplainSuccess(first_inner_listener.str(), second_inner_listener.str(),\n                   listener);\n    return true;\n  }\n\n private:\n  void ExplainSuccess(const std::string& first_explanation,\n                      const std::string& second_explanation,\n                      MatchResultListener* listener) const {\n    *listener << \"whose both fields match\";\n    if (first_explanation != \"\") {\n      *listener << \", where the first field is a value \" << first_explanation;\n    }\n    if (second_explanation != \"\") {\n      *listener << \", \";\n      if (first_explanation != \"\") {\n        *listener << \"and \";\n      } else {\n        *listener << \"where \";\n      }\n      *listener << \"the second field is a value \" << second_explanation;\n    }\n  }\n\n  const Matcher<const FirstType&> first_matcher_;\n  const Matcher<const SecondType&> second_matcher_;\n\n  GTEST_DISALLOW_ASSIGN_(PairMatcherImpl);\n};\n\n// Implements polymorphic Pair(first_matcher, second_matcher).\ntemplate <typename FirstMatcher, typename SecondMatcher>\nclass PairMatcher {\n public:\n  PairMatcher(FirstMatcher first_matcher, SecondMatcher second_matcher)\n      : first_matcher_(first_matcher), second_matcher_(second_matcher) {}\n\n  template <typename PairType>\n  operator Matcher<PairType> () const {\n    return Matcher<PairType>(\n        new PairMatcherImpl<const PairType&>(first_matcher_, second_matcher_));\n  }\n\n private:\n  const FirstMatcher first_matcher_;\n  const SecondMatcher second_matcher_;\n\n  GTEST_DISALLOW_ASSIGN_(PairMatcher);\n};\n\n// Implements ElementsAre() and ElementsAreArray().\ntemplate <typename Container>\nclass ElementsAreMatcherImpl : public MatcherInterface<Container> {\n public:\n  typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;\n  typedef internal::StlContainerView<RawContainer> View;\n  typedef typename View::type StlContainer;\n  typedef typename View::const_reference StlContainerReference;\n  typedef typename StlContainer::value_type Element;\n\n  // Constructs the matcher from a sequence of element values or\n  // element matchers.\n  template <typename InputIter>\n  ElementsAreMatcherImpl(InputIter first, InputIter last) {\n    while (first != last) {\n      matchers_.push_back(MatcherCast<const Element&>(*first++));\n    }\n  }\n\n  // Describes what this matcher does.\n  void DescribeTo(::std::ostream* os) const override {\n    if (count() == 0) {\n      *os << \"is empty\";\n    } else if (count() == 1) {\n      *os << \"has 1 element that \";\n      matchers_[0].DescribeTo(os);\n    } else {\n      *os << \"has \" << Elements(count()) << \" where\\n\";\n      for (size_t i = 0; i != count(); ++i) {\n        *os << \"element #\" << i << \" \";\n        matchers_[i].DescribeTo(os);\n        if (i + 1 < count()) {\n          *os << \",\\n\";\n        }\n      }\n    }\n  }\n\n  // Describes what the negation of this matcher does.\n  void DescribeNegationTo(::std::ostream* os) const override {\n    if (count() == 0) {\n      *os << \"isn't empty\";\n      return;\n    }\n\n    *os << \"doesn't have \" << Elements(count()) << \", or\\n\";\n    for (size_t i = 0; i != count(); ++i) {\n      *os << \"element #\" << i << \" \";\n      matchers_[i].DescribeNegationTo(os);\n      if (i + 1 < count()) {\n        *os << \", or\\n\";\n      }\n    }\n  }\n\n  bool MatchAndExplain(Container container,\n                       MatchResultListener* listener) const override {\n    // To work with stream-like \"containers\", we must only walk\n    // through the elements in one pass.\n\n    const bool listener_interested = listener->IsInterested();\n\n    // explanations[i] is the explanation of the element at index i.\n    ::std::vector<std::string> explanations(count());\n    StlContainerReference stl_container = View::ConstReference(container);\n    typename StlContainer::const_iterator it = stl_container.begin();\n    size_t exam_pos = 0;\n    bool mismatch_found = false;  // Have we found a mismatched element yet?\n\n    // Go through the elements and matchers in pairs, until we reach\n    // the end of either the elements or the matchers, or until we find a\n    // mismatch.\n    for (; it != stl_container.end() && exam_pos != count(); ++it, ++exam_pos) {\n      bool match;  // Does the current element match the current matcher?\n      if (listener_interested) {\n        StringMatchResultListener s;\n        match = matchers_[exam_pos].MatchAndExplain(*it, &s);\n        explanations[exam_pos] = s.str();\n      } else {\n        match = matchers_[exam_pos].Matches(*it);\n      }\n\n      if (!match) {\n        mismatch_found = true;\n        break;\n      }\n    }\n    // If mismatch_found is true, 'exam_pos' is the index of the mismatch.\n\n    // Find how many elements the actual container has.  We avoid\n    // calling size() s.t. this code works for stream-like \"containers\"\n    // that don't define size().\n    size_t actual_count = exam_pos;\n    for (; it != stl_container.end(); ++it) {\n      ++actual_count;\n    }\n\n    if (actual_count != count()) {\n      // The element count doesn't match.  If the container is empty,\n      // there's no need to explain anything as Google Mock already\n      // prints the empty container.  Otherwise we just need to show\n      // how many elements there actually are.\n      if (listener_interested && (actual_count != 0)) {\n        *listener << \"which has \" << Elements(actual_count);\n      }\n      return false;\n    }\n\n    if (mismatch_found) {\n      // The element count matches, but the exam_pos-th element doesn't match.\n      if (listener_interested) {\n        *listener << \"whose element #\" << exam_pos << \" doesn't match\";\n        PrintIfNotEmpty(explanations[exam_pos], listener->stream());\n      }\n      return false;\n    }\n\n    // Every element matches its expectation.  We need to explain why\n    // (the obvious ones can be skipped).\n    if (listener_interested) {\n      bool reason_printed = false;\n      for (size_t i = 0; i != count(); ++i) {\n        const std::string& s = explanations[i];\n        if (!s.empty()) {\n          if (reason_printed) {\n            *listener << \",\\nand \";\n          }\n          *listener << \"whose element #\" << i << \" matches, \" << s;\n          reason_printed = true;\n        }\n      }\n    }\n    return true;\n  }\n\n private:\n  static Message Elements(size_t count) {\n    return Message() << count << (count == 1 ? \" element\" : \" elements\");\n  }\n\n  size_t count() const { return matchers_.size(); }\n\n  ::std::vector<Matcher<const Element&> > matchers_;\n\n  GTEST_DISALLOW_ASSIGN_(ElementsAreMatcherImpl);\n};\n\n// Connectivity matrix of (elements X matchers), in element-major order.\n// Initially, there are no edges.\n// Use NextGraph() to iterate over all possible edge configurations.\n// Use Randomize() to generate a random edge configuration.\nclass GTEST_API_ MatchMatrix {\n public:\n  MatchMatrix(size_t num_elements, size_t num_matchers)\n      : num_elements_(num_elements),\n        num_matchers_(num_matchers),\n        matched_(num_elements_* num_matchers_, 0) {\n  }\n\n  size_t LhsSize() const { return num_elements_; }\n  size_t RhsSize() const { return num_matchers_; }\n  bool HasEdge(size_t ilhs, size_t irhs) const {\n    return matched_[SpaceIndex(ilhs, irhs)] == 1;\n  }\n  void SetEdge(size_t ilhs, size_t irhs, bool b) {\n    matched_[SpaceIndex(ilhs, irhs)] = b ? 1 : 0;\n  }\n\n  // Treating the connectivity matrix as a (LhsSize()*RhsSize())-bit number,\n  // adds 1 to that number; returns false if incrementing the graph left it\n  // empty.\n  bool NextGraph();\n\n  void Randomize();\n\n  std::string DebugString() const;\n\n private:\n  size_t SpaceIndex(size_t ilhs, size_t irhs) const {\n    return ilhs * num_matchers_ + irhs;\n  }\n\n  size_t num_elements_;\n  size_t num_matchers_;\n\n  // Each element is a char interpreted as bool. They are stored as a\n  // flattened array in lhs-major order, use 'SpaceIndex()' to translate\n  // a (ilhs, irhs) matrix coordinate into an offset.\n  ::std::vector<char> matched_;\n};\n\ntypedef ::std::pair<size_t, size_t> ElementMatcherPair;\ntypedef ::std::vector<ElementMatcherPair> ElementMatcherPairs;\n\n// Returns a maximum bipartite matching for the specified graph 'g'.\n// The matching is represented as a vector of {element, matcher} pairs.\nGTEST_API_ ElementMatcherPairs\nFindMaxBipartiteMatching(const MatchMatrix& g);\n\nstruct UnorderedMatcherRequire {\n  enum Flags {\n    Superset = 1 << 0,\n    Subset = 1 << 1,\n    ExactMatch = Superset | Subset,\n  };\n};\n\n// Untyped base class for implementing UnorderedElementsAre.  By\n// putting logic that's not specific to the element type here, we\n// reduce binary bloat and increase compilation speed.\nclass GTEST_API_ UnorderedElementsAreMatcherImplBase {\n protected:\n  explicit UnorderedElementsAreMatcherImplBase(\n      UnorderedMatcherRequire::Flags matcher_flags)\n      : match_flags_(matcher_flags) {}\n\n  // A vector of matcher describers, one for each element matcher.\n  // Does not own the describers (and thus can be used only when the\n  // element matchers are alive).\n  typedef ::std::vector<const MatcherDescriberInterface*> MatcherDescriberVec;\n\n  // Describes this UnorderedElementsAre matcher.\n  void DescribeToImpl(::std::ostream* os) const;\n\n  // Describes the negation of this UnorderedElementsAre matcher.\n  void DescribeNegationToImpl(::std::ostream* os) const;\n\n  bool VerifyMatchMatrix(const ::std::vector<std::string>& element_printouts,\n                         const MatchMatrix& matrix,\n                         MatchResultListener* listener) const;\n\n  bool FindPairing(const MatchMatrix& matrix,\n                   MatchResultListener* listener) const;\n\n  MatcherDescriberVec& matcher_describers() {\n    return matcher_describers_;\n  }\n\n  static Message Elements(size_t n) {\n    return Message() << n << \" element\" << (n == 1 ? \"\" : \"s\");\n  }\n\n  UnorderedMatcherRequire::Flags match_flags() const { return match_flags_; }\n\n private:\n  UnorderedMatcherRequire::Flags match_flags_;\n  MatcherDescriberVec matcher_describers_;\n\n  GTEST_DISALLOW_ASSIGN_(UnorderedElementsAreMatcherImplBase);\n};\n\n// Implements UnorderedElementsAre, UnorderedElementsAreArray, IsSubsetOf, and\n// IsSupersetOf.\ntemplate <typename Container>\nclass UnorderedElementsAreMatcherImpl\n    : public MatcherInterface<Container>,\n      public UnorderedElementsAreMatcherImplBase {\n public:\n  typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;\n  typedef internal::StlContainerView<RawContainer> View;\n  typedef typename View::type StlContainer;\n  typedef typename View::const_reference StlContainerReference;\n  typedef typename StlContainer::const_iterator StlContainerConstIterator;\n  typedef typename StlContainer::value_type Element;\n\n  template <typename InputIter>\n  UnorderedElementsAreMatcherImpl(UnorderedMatcherRequire::Flags matcher_flags,\n                                  InputIter first, InputIter last)\n      : UnorderedElementsAreMatcherImplBase(matcher_flags) {\n    for (; first != last; ++first) {\n      matchers_.push_back(MatcherCast<const Element&>(*first));\n      matcher_describers().push_back(matchers_.back().GetDescriber());\n    }\n  }\n\n  // Describes what this matcher does.\n  void DescribeTo(::std::ostream* os) const override {\n    return UnorderedElementsAreMatcherImplBase::DescribeToImpl(os);\n  }\n\n  // Describes what the negation of this matcher does.\n  void DescribeNegationTo(::std::ostream* os) const override {\n    return UnorderedElementsAreMatcherImplBase::DescribeNegationToImpl(os);\n  }\n\n  bool MatchAndExplain(Container container,\n                       MatchResultListener* listener) const override {\n    StlContainerReference stl_container = View::ConstReference(container);\n    ::std::vector<std::string> element_printouts;\n    MatchMatrix matrix =\n        AnalyzeElements(stl_container.begin(), stl_container.end(),\n                        &element_printouts, listener);\n\n    if (matrix.LhsSize() == 0 && matrix.RhsSize() == 0) {\n      return true;\n    }\n\n    if (match_flags() == UnorderedMatcherRequire::ExactMatch) {\n      if (matrix.LhsSize() != matrix.RhsSize()) {\n        // The element count doesn't match.  If the container is empty,\n        // there's no need to explain anything as Google Mock already\n        // prints the empty container. Otherwise we just need to show\n        // how many elements there actually are.\n        if (matrix.LhsSize() != 0 && listener->IsInterested()) {\n          *listener << \"which has \" << Elements(matrix.LhsSize());\n        }\n        return false;\n      }\n    }\n\n    return VerifyMatchMatrix(element_printouts, matrix, listener) &&\n           FindPairing(matrix, listener);\n  }\n\n private:\n  template <typename ElementIter>\n  MatchMatrix AnalyzeElements(ElementIter elem_first, ElementIter elem_last,\n                              ::std::vector<std::string>* element_printouts,\n                              MatchResultListener* listener) const {\n    element_printouts->clear();\n    ::std::vector<char> did_match;\n    size_t num_elements = 0;\n    for (; elem_first != elem_last; ++num_elements, ++elem_first) {\n      if (listener->IsInterested()) {\n        element_printouts->push_back(PrintToString(*elem_first));\n      }\n      for (size_t irhs = 0; irhs != matchers_.size(); ++irhs) {\n        did_match.push_back(Matches(matchers_[irhs])(*elem_first));\n      }\n    }\n\n    MatchMatrix matrix(num_elements, matchers_.size());\n    ::std::vector<char>::const_iterator did_match_iter = did_match.begin();\n    for (size_t ilhs = 0; ilhs != num_elements; ++ilhs) {\n      for (size_t irhs = 0; irhs != matchers_.size(); ++irhs) {\n        matrix.SetEdge(ilhs, irhs, *did_match_iter++ != 0);\n      }\n    }\n    return matrix;\n  }\n\n  ::std::vector<Matcher<const Element&> > matchers_;\n\n  GTEST_DISALLOW_ASSIGN_(UnorderedElementsAreMatcherImpl);\n};\n\n// Functor for use in TransformTuple.\n// Performs MatcherCast<Target> on an input argument of any type.\ntemplate <typename Target>\nstruct CastAndAppendTransform {\n  template <typename Arg>\n  Matcher<Target> operator()(const Arg& a) const {\n    return MatcherCast<Target>(a);\n  }\n};\n\n// Implements UnorderedElementsAre.\ntemplate <typename MatcherTuple>\nclass UnorderedElementsAreMatcher {\n public:\n  explicit UnorderedElementsAreMatcher(const MatcherTuple& args)\n      : matchers_(args) {}\n\n  template <typename Container>\n  operator Matcher<Container>() const {\n    typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;\n    typedef typename internal::StlContainerView<RawContainer>::type View;\n    typedef typename View::value_type Element;\n    typedef ::std::vector<Matcher<const Element&> > MatcherVec;\n    MatcherVec matchers;\n    matchers.reserve(::std::tuple_size<MatcherTuple>::value);\n    TransformTupleValues(CastAndAppendTransform<const Element&>(), matchers_,\n                         ::std::back_inserter(matchers));\n    return Matcher<Container>(\n        new UnorderedElementsAreMatcherImpl<const Container&>(\n            UnorderedMatcherRequire::ExactMatch, matchers.begin(),\n            matchers.end()));\n  }\n\n private:\n  const MatcherTuple matchers_;\n  GTEST_DISALLOW_ASSIGN_(UnorderedElementsAreMatcher);\n};\n\n// Implements ElementsAre.\ntemplate <typename MatcherTuple>\nclass ElementsAreMatcher {\n public:\n  explicit ElementsAreMatcher(const MatcherTuple& args) : matchers_(args) {}\n\n  template <typename Container>\n  operator Matcher<Container>() const {\n    GTEST_COMPILE_ASSERT_(\n        !IsHashTable<GTEST_REMOVE_REFERENCE_AND_CONST_(Container)>::value ||\n            ::std::tuple_size<MatcherTuple>::value < 2,\n        use_UnorderedElementsAre_with_hash_tables);\n\n    typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;\n    typedef typename internal::StlContainerView<RawContainer>::type View;\n    typedef typename View::value_type Element;\n    typedef ::std::vector<Matcher<const Element&> > MatcherVec;\n    MatcherVec matchers;\n    matchers.reserve(::std::tuple_size<MatcherTuple>::value);\n    TransformTupleValues(CastAndAppendTransform<const Element&>(), matchers_,\n                         ::std::back_inserter(matchers));\n    return Matcher<Container>(new ElementsAreMatcherImpl<const Container&>(\n        matchers.begin(), matchers.end()));\n  }\n\n private:\n  const MatcherTuple matchers_;\n  GTEST_DISALLOW_ASSIGN_(ElementsAreMatcher);\n};\n\n// Implements UnorderedElementsAreArray(), IsSubsetOf(), and IsSupersetOf().\ntemplate <typename T>\nclass UnorderedElementsAreArrayMatcher {\n public:\n  template <typename Iter>\n  UnorderedElementsAreArrayMatcher(UnorderedMatcherRequire::Flags match_flags,\n                                   Iter first, Iter last)\n      : match_flags_(match_flags), matchers_(first, last) {}\n\n  template <typename Container>\n  operator Matcher<Container>() const {\n    return Matcher<Container>(\n        new UnorderedElementsAreMatcherImpl<const Container&>(\n            match_flags_, matchers_.begin(), matchers_.end()));\n  }\n\n private:\n  UnorderedMatcherRequire::Flags match_flags_;\n  ::std::vector<T> matchers_;\n\n  GTEST_DISALLOW_ASSIGN_(UnorderedElementsAreArrayMatcher);\n};\n\n// Implements ElementsAreArray().\ntemplate <typename T>\nclass ElementsAreArrayMatcher {\n public:\n  template <typename Iter>\n  ElementsAreArrayMatcher(Iter first, Iter last) : matchers_(first, last) {}\n\n  template <typename Container>\n  operator Matcher<Container>() const {\n    GTEST_COMPILE_ASSERT_(\n        !IsHashTable<GTEST_REMOVE_REFERENCE_AND_CONST_(Container)>::value,\n        use_UnorderedElementsAreArray_with_hash_tables);\n\n    return Matcher<Container>(new ElementsAreMatcherImpl<const Container&>(\n        matchers_.begin(), matchers_.end()));\n  }\n\n private:\n  const ::std::vector<T> matchers_;\n\n  GTEST_DISALLOW_ASSIGN_(ElementsAreArrayMatcher);\n};\n\n// Given a 2-tuple matcher tm of type Tuple2Matcher and a value second\n// of type Second, BoundSecondMatcher<Tuple2Matcher, Second>(tm,\n// second) is a polymorphic matcher that matches a value x iff tm\n// matches tuple (x, second).  Useful for implementing\n// UnorderedPointwise() in terms of UnorderedElementsAreArray().\n//\n// BoundSecondMatcher is copyable and assignable, as we need to put\n// instances of this class in a vector when implementing\n// UnorderedPointwise().\ntemplate <typename Tuple2Matcher, typename Second>\nclass BoundSecondMatcher {\n public:\n  BoundSecondMatcher(const Tuple2Matcher& tm, const Second& second)\n      : tuple2_matcher_(tm), second_value_(second) {}\n\n  template <typename T>\n  operator Matcher<T>() const {\n    return MakeMatcher(new Impl<T>(tuple2_matcher_, second_value_));\n  }\n\n  // We have to define this for UnorderedPointwise() to compile in\n  // C++98 mode, as it puts BoundSecondMatcher instances in a vector,\n  // which requires the elements to be assignable in C++98.  The\n  // compiler cannot generate the operator= for us, as Tuple2Matcher\n  // and Second may not be assignable.\n  //\n  // However, this should never be called, so the implementation just\n  // need to assert.\n  void operator=(const BoundSecondMatcher& /*rhs*/) {\n    GTEST_LOG_(FATAL) << \"BoundSecondMatcher should never be assigned.\";\n  }\n\n private:\n  template <typename T>\n  class Impl : public MatcherInterface<T> {\n   public:\n    typedef ::std::tuple<T, Second> ArgTuple;\n\n    Impl(const Tuple2Matcher& tm, const Second& second)\n        : mono_tuple2_matcher_(SafeMatcherCast<const ArgTuple&>(tm)),\n          second_value_(second) {}\n\n    void DescribeTo(::std::ostream* os) const override {\n      *os << \"and \";\n      UniversalPrint(second_value_, os);\n      *os << \" \";\n      mono_tuple2_matcher_.DescribeTo(os);\n    }\n\n    bool MatchAndExplain(T x, MatchResultListener* listener) const override {\n      return mono_tuple2_matcher_.MatchAndExplain(ArgTuple(x, second_value_),\n                                                  listener);\n    }\n\n   private:\n    const Matcher<const ArgTuple&> mono_tuple2_matcher_;\n    const Second second_value_;\n\n    GTEST_DISALLOW_ASSIGN_(Impl);\n  };\n\n  const Tuple2Matcher tuple2_matcher_;\n  const Second second_value_;\n};\n\n// Given a 2-tuple matcher tm and a value second,\n// MatcherBindSecond(tm, second) returns a matcher that matches a\n// value x iff tm matches tuple (x, second).  Useful for implementing\n// UnorderedPointwise() in terms of UnorderedElementsAreArray().\ntemplate <typename Tuple2Matcher, typename Second>\nBoundSecondMatcher<Tuple2Matcher, Second> MatcherBindSecond(\n    const Tuple2Matcher& tm, const Second& second) {\n  return BoundSecondMatcher<Tuple2Matcher, Second>(tm, second);\n}\n\n// Returns the description for a matcher defined using the MATCHER*()\n// macro where the user-supplied description string is \"\", if\n// 'negation' is false; otherwise returns the description of the\n// negation of the matcher.  'param_values' contains a list of strings\n// that are the print-out of the matcher's parameters.\nGTEST_API_ std::string FormatMatcherDescription(bool negation,\n                                                const char* matcher_name,\n                                                const Strings& param_values);\n\n// Implements a matcher that checks the value of a optional<> type variable.\ntemplate <typename ValueMatcher>\nclass OptionalMatcher {\n public:\n  explicit OptionalMatcher(const ValueMatcher& value_matcher)\n      : value_matcher_(value_matcher) {}\n\n  template <typename Optional>\n  operator Matcher<Optional>() const {\n    return Matcher<Optional>(new Impl<const Optional&>(value_matcher_));\n  }\n\n  template <typename Optional>\n  class Impl : public MatcherInterface<Optional> {\n   public:\n    typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Optional) OptionalView;\n    typedef typename OptionalView::value_type ValueType;\n    explicit Impl(const ValueMatcher& value_matcher)\n        : value_matcher_(MatcherCast<ValueType>(value_matcher)) {}\n\n    void DescribeTo(::std::ostream* os) const override {\n      *os << \"value \";\n      value_matcher_.DescribeTo(os);\n    }\n\n    void DescribeNegationTo(::std::ostream* os) const override {\n      *os << \"value \";\n      value_matcher_.DescribeNegationTo(os);\n    }\n\n    bool MatchAndExplain(Optional optional,\n                         MatchResultListener* listener) const override {\n      if (!optional) {\n        *listener << \"which is not engaged\";\n        return false;\n      }\n      const ValueType& value = *optional;\n      StringMatchResultListener value_listener;\n      const bool match = value_matcher_.MatchAndExplain(value, &value_listener);\n      *listener << \"whose value \" << PrintToString(value)\n                << (match ? \" matches\" : \" doesn't match\");\n      PrintIfNotEmpty(value_listener.str(), listener->stream());\n      return match;\n    }\n\n   private:\n    const Matcher<ValueType> value_matcher_;\n    GTEST_DISALLOW_ASSIGN_(Impl);\n  };\n\n private:\n  const ValueMatcher value_matcher_;\n  GTEST_DISALLOW_ASSIGN_(OptionalMatcher);\n};\n\nnamespace variant_matcher {\n// Overloads to allow VariantMatcher to do proper ADL lookup.\ntemplate <typename T>\nvoid holds_alternative() {}\ntemplate <typename T>\nvoid get() {}\n\n// Implements a matcher that checks the value of a variant<> type variable.\ntemplate <typename T>\nclass VariantMatcher {\n public:\n  explicit VariantMatcher(::testing::Matcher<const T&> matcher)\n      : matcher_(std::move(matcher)) {}\n\n  template <typename Variant>\n  bool MatchAndExplain(const Variant& value,\n                       ::testing::MatchResultListener* listener) const {\n    using std::get;\n    if (!listener->IsInterested()) {\n      return holds_alternative<T>(value) && matcher_.Matches(get<T>(value));\n    }\n\n    if (!holds_alternative<T>(value)) {\n      *listener << \"whose value is not of type '\" << GetTypeName() << \"'\";\n      return false;\n    }\n\n    const T& elem = get<T>(value);\n    StringMatchResultListener elem_listener;\n    const bool match = matcher_.MatchAndExplain(elem, &elem_listener);\n    *listener << \"whose value \" << PrintToString(elem)\n              << (match ? \" matches\" : \" doesn't match\");\n    PrintIfNotEmpty(elem_listener.str(), listener->stream());\n    return match;\n  }\n\n  void DescribeTo(std::ostream* os) const {\n    *os << \"is a variant<> with value of type '\" << GetTypeName()\n        << \"' and the value \";\n    matcher_.DescribeTo(os);\n  }\n\n  void DescribeNegationTo(std::ostream* os) const {\n    *os << \"is a variant<> with value of type other than '\" << GetTypeName()\n        << \"' or the value \";\n    matcher_.DescribeNegationTo(os);\n  }\n\n private:\n  static std::string GetTypeName() {\n#if GTEST_HAS_RTTI\n    GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(\n        return internal::GetTypeName<T>());\n#endif\n    return \"the element type\";\n  }\n\n  const ::testing::Matcher<const T&> matcher_;\n};\n\n}  // namespace variant_matcher\n\nnamespace any_cast_matcher {\n\n// Overloads to allow AnyCastMatcher to do proper ADL lookup.\ntemplate <typename T>\nvoid any_cast() {}\n\n// Implements a matcher that any_casts the value.\ntemplate <typename T>\nclass AnyCastMatcher {\n public:\n  explicit AnyCastMatcher(const ::testing::Matcher<const T&>& matcher)\n      : matcher_(matcher) {}\n\n  template <typename AnyType>\n  bool MatchAndExplain(const AnyType& value,\n                       ::testing::MatchResultListener* listener) const {\n    if (!listener->IsInterested()) {\n      const T* ptr = any_cast<T>(&value);\n      return ptr != nullptr && matcher_.Matches(*ptr);\n    }\n\n    const T* elem = any_cast<T>(&value);\n    if (elem == nullptr) {\n      *listener << \"whose value is not of type '\" << GetTypeName() << \"'\";\n      return false;\n    }\n\n    StringMatchResultListener elem_listener;\n    const bool match = matcher_.MatchAndExplain(*elem, &elem_listener);\n    *listener << \"whose value \" << PrintToString(*elem)\n              << (match ? \" matches\" : \" doesn't match\");\n    PrintIfNotEmpty(elem_listener.str(), listener->stream());\n    return match;\n  }\n\n  void DescribeTo(std::ostream* os) const {\n    *os << \"is an 'any' type with value of type '\" << GetTypeName()\n        << \"' and the value \";\n    matcher_.DescribeTo(os);\n  }\n\n  void DescribeNegationTo(std::ostream* os) const {\n    *os << \"is an 'any' type with value of type other than '\" << GetTypeName()\n        << \"' or the value \";\n    matcher_.DescribeNegationTo(os);\n  }\n\n private:\n  static std::string GetTypeName() {\n#if GTEST_HAS_RTTI\n    GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(\n        return internal::GetTypeName<T>());\n#endif\n    return \"the element type\";\n  }\n\n  const ::testing::Matcher<const T&> matcher_;\n};\n\n}  // namespace any_cast_matcher\n\n// Implements the Args() matcher.\ntemplate <class ArgsTuple, size_t... k>\nclass ArgsMatcherImpl : public MatcherInterface<ArgsTuple> {\n public:\n  using RawArgsTuple = typename std::decay<ArgsTuple>::type;\n  using SelectedArgs =\n      std::tuple<typename std::tuple_element<k, RawArgsTuple>::type...>;\n  using MonomorphicInnerMatcher = Matcher<const SelectedArgs&>;\n\n  template <typename InnerMatcher>\n  explicit ArgsMatcherImpl(const InnerMatcher& inner_matcher)\n      : inner_matcher_(SafeMatcherCast<const SelectedArgs&>(inner_matcher)) {}\n\n  bool MatchAndExplain(ArgsTuple args,\n                       MatchResultListener* listener) const override {\n    // Workaround spurious C4100 on MSVC<=15.7 when k is empty.\n    (void)args;\n    const SelectedArgs& selected_args =\n        std::forward_as_tuple(std::get<k>(args)...);\n    if (!listener->IsInterested()) return inner_matcher_.Matches(selected_args);\n\n    PrintIndices(listener->stream());\n    *listener << \"are \" << PrintToString(selected_args);\n\n    StringMatchResultListener inner_listener;\n    const bool match =\n        inner_matcher_.MatchAndExplain(selected_args, &inner_listener);\n    PrintIfNotEmpty(inner_listener.str(), listener->stream());\n    return match;\n  }\n\n  void DescribeTo(::std::ostream* os) const override {\n    *os << \"are a tuple \";\n    PrintIndices(os);\n    inner_matcher_.DescribeTo(os);\n  }\n\n  void DescribeNegationTo(::std::ostream* os) const override {\n    *os << \"are a tuple \";\n    PrintIndices(os);\n    inner_matcher_.DescribeNegationTo(os);\n  }\n\n private:\n  // Prints the indices of the selected fields.\n  static void PrintIndices(::std::ostream* os) {\n    *os << \"whose fields (\";\n    const char* sep = \"\";\n    // Workaround spurious C4189 on MSVC<=15.7 when k is empty.\n    (void)sep;\n    const char* dummy[] = {\"\", (*os << sep << \"#\" << k, sep = \", \")...};\n    (void)dummy;\n    *os << \") \";\n  }\n\n  MonomorphicInnerMatcher inner_matcher_;\n};\n\ntemplate <class InnerMatcher, size_t... k>\nclass ArgsMatcher {\n public:\n  explicit ArgsMatcher(InnerMatcher inner_matcher)\n      : inner_matcher_(std::move(inner_matcher)) {}\n\n  template <typename ArgsTuple>\n  operator Matcher<ArgsTuple>() const {  // NOLINT\n    return MakeMatcher(new ArgsMatcherImpl<ArgsTuple, k...>(inner_matcher_));\n  }\n\n private:\n  InnerMatcher inner_matcher_;\n};\n\n}  // namespace internal\n\n// ElementsAreArray(iterator_first, iterator_last)\n// ElementsAreArray(pointer, count)\n// ElementsAreArray(array)\n// ElementsAreArray(container)\n// ElementsAreArray({ e1, e2, ..., en })\n//\n// The ElementsAreArray() functions are like ElementsAre(...), except\n// that they are given a homogeneous sequence rather than taking each\n// element as a function argument. The sequence can be specified as an\n// array, a pointer and count, a vector, an initializer list, or an\n// STL iterator range. In each of these cases, the underlying sequence\n// can be either a sequence of values or a sequence of matchers.\n//\n// All forms of ElementsAreArray() make a copy of the input matcher sequence.\n\ntemplate <typename Iter>\ninline internal::ElementsAreArrayMatcher<\n    typename ::std::iterator_traits<Iter>::value_type>\nElementsAreArray(Iter first, Iter last) {\n  typedef typename ::std::iterator_traits<Iter>::value_type T;\n  return internal::ElementsAreArrayMatcher<T>(first, last);\n}\n\ntemplate <typename T>\ninline internal::ElementsAreArrayMatcher<T> ElementsAreArray(\n    const T* pointer, size_t count) {\n  return ElementsAreArray(pointer, pointer + count);\n}\n\ntemplate <typename T, size_t N>\ninline internal::ElementsAreArrayMatcher<T> ElementsAreArray(\n    const T (&array)[N]) {\n  return ElementsAreArray(array, N);\n}\n\ntemplate <typename Container>\ninline internal::ElementsAreArrayMatcher<typename Container::value_type>\nElementsAreArray(const Container& container) {\n  return ElementsAreArray(container.begin(), container.end());\n}\n\ntemplate <typename T>\ninline internal::ElementsAreArrayMatcher<T>\nElementsAreArray(::std::initializer_list<T> xs) {\n  return ElementsAreArray(xs.begin(), xs.end());\n}\n\n// UnorderedElementsAreArray(iterator_first, iterator_last)\n// UnorderedElementsAreArray(pointer, count)\n// UnorderedElementsAreArray(array)\n// UnorderedElementsAreArray(container)\n// UnorderedElementsAreArray({ e1, e2, ..., en })\n//\n// UnorderedElementsAreArray() verifies that a bijective mapping onto a\n// collection of matchers exists.\n//\n// The matchers can be specified as an array, a pointer and count, a container,\n// an initializer list, or an STL iterator range. In each of these cases, the\n// underlying matchers can be either values or matchers.\n\ntemplate <typename Iter>\ninline internal::UnorderedElementsAreArrayMatcher<\n    typename ::std::iterator_traits<Iter>::value_type>\nUnorderedElementsAreArray(Iter first, Iter last) {\n  typedef typename ::std::iterator_traits<Iter>::value_type T;\n  return internal::UnorderedElementsAreArrayMatcher<T>(\n      internal::UnorderedMatcherRequire::ExactMatch, first, last);\n}\n\ntemplate <typename T>\ninline internal::UnorderedElementsAreArrayMatcher<T>\nUnorderedElementsAreArray(const T* pointer, size_t count) {\n  return UnorderedElementsAreArray(pointer, pointer + count);\n}\n\ntemplate <typename T, size_t N>\ninline internal::UnorderedElementsAreArrayMatcher<T>\nUnorderedElementsAreArray(const T (&array)[N]) {\n  return UnorderedElementsAreArray(array, N);\n}\n\ntemplate <typename Container>\ninline internal::UnorderedElementsAreArrayMatcher<\n    typename Container::value_type>\nUnorderedElementsAreArray(const Container& container) {\n  return UnorderedElementsAreArray(container.begin(), container.end());\n}\n\ntemplate <typename T>\ninline internal::UnorderedElementsAreArrayMatcher<T>\nUnorderedElementsAreArray(::std::initializer_list<T> xs) {\n  return UnorderedElementsAreArray(xs.begin(), xs.end());\n}\n\n// _ is a matcher that matches anything of any type.\n//\n// This definition is fine as:\n//\n//   1. The C++ standard permits using the name _ in a namespace that\n//      is not the global namespace or ::std.\n//   2. The AnythingMatcher class has no data member or constructor,\n//      so it's OK to create global variables of this type.\n//   3. c-style has approved of using _ in this case.\nconst internal::AnythingMatcher _ = {};\n// Creates a matcher that matches any value of the given type T.\ntemplate <typename T>\ninline Matcher<T> A() {\n  return Matcher<T>(new internal::AnyMatcherImpl<T>());\n}\n\n// Creates a matcher that matches any value of the given type T.\ntemplate <typename T>\ninline Matcher<T> An() { return A<T>(); }\n\ntemplate <typename T, typename M>\nMatcher<T> internal::MatcherCastImpl<T, M>::CastImpl(\n    const M& value,\n    internal::BooleanConstant<false> /* convertible_to_matcher */,\n    internal::BooleanConstant<false> /* convertible_to_T */) {\n  return Eq(value);\n}\n\n// Creates a polymorphic matcher that matches any NULL pointer.\ninline PolymorphicMatcher<internal::IsNullMatcher > IsNull() {\n  return MakePolymorphicMatcher(internal::IsNullMatcher());\n}\n\n// Creates a polymorphic matcher that matches any non-NULL pointer.\n// This is convenient as Not(NULL) doesn't compile (the compiler\n// thinks that that expression is comparing a pointer with an integer).\ninline PolymorphicMatcher<internal::NotNullMatcher > NotNull() {\n  return MakePolymorphicMatcher(internal::NotNullMatcher());\n}\n\n// Creates a polymorphic matcher that matches any argument that\n// references variable x.\ntemplate <typename T>\ninline internal::RefMatcher<T&> Ref(T& x) {  // NOLINT\n  return internal::RefMatcher<T&>(x);\n}\n\n// Creates a matcher that matches any double argument approximately\n// equal to rhs, where two NANs are considered unequal.\ninline internal::FloatingEqMatcher<double> DoubleEq(double rhs) {\n  return internal::FloatingEqMatcher<double>(rhs, false);\n}\n\n// Creates a matcher that matches any double argument approximately\n// equal to rhs, including NaN values when rhs is NaN.\ninline internal::FloatingEqMatcher<double> NanSensitiveDoubleEq(double rhs) {\n  return internal::FloatingEqMatcher<double>(rhs, true);\n}\n\n// Creates a matcher that matches any double argument approximately equal to\n// rhs, up to the specified max absolute error bound, where two NANs are\n// considered unequal.  The max absolute error bound must be non-negative.\ninline internal::FloatingEqMatcher<double> DoubleNear(\n    double rhs, double max_abs_error) {\n  return internal::FloatingEqMatcher<double>(rhs, false, max_abs_error);\n}\n\n// Creates a matcher that matches any double argument approximately equal to\n// rhs, up to the specified max absolute error bound, including NaN values when\n// rhs is NaN.  The max absolute error bound must be non-negative.\ninline internal::FloatingEqMatcher<double> NanSensitiveDoubleNear(\n    double rhs, double max_abs_error) {\n  return internal::FloatingEqMatcher<double>(rhs, true, max_abs_error);\n}\n\n// Creates a matcher that matches any float argument approximately\n// equal to rhs, where two NANs are considered unequal.\ninline internal::FloatingEqMatcher<float> FloatEq(float rhs) {\n  return internal::FloatingEqMatcher<float>(rhs, false);\n}\n\n// Creates a matcher that matches any float argument approximately\n// equal to rhs, including NaN values when rhs is NaN.\ninline internal::FloatingEqMatcher<float> NanSensitiveFloatEq(float rhs) {\n  return internal::FloatingEqMatcher<float>(rhs, true);\n}\n\n// Creates a matcher that matches any float argument approximately equal to\n// rhs, up to the specified max absolute error bound, where two NANs are\n// considered unequal.  The max absolute error bound must be non-negative.\ninline internal::FloatingEqMatcher<float> FloatNear(\n    float rhs, float max_abs_error) {\n  return internal::FloatingEqMatcher<float>(rhs, false, max_abs_error);\n}\n\n// Creates a matcher that matches any float argument approximately equal to\n// rhs, up to the specified max absolute error bound, including NaN values when\n// rhs is NaN.  The max absolute error bound must be non-negative.\ninline internal::FloatingEqMatcher<float> NanSensitiveFloatNear(\n    float rhs, float max_abs_error) {\n  return internal::FloatingEqMatcher<float>(rhs, true, max_abs_error);\n}\n\n// Creates a matcher that matches a pointer (raw or smart) that points\n// to a value that matches inner_matcher.\ntemplate <typename InnerMatcher>\ninline internal::PointeeMatcher<InnerMatcher> Pointee(\n    const InnerMatcher& inner_matcher) {\n  return internal::PointeeMatcher<InnerMatcher>(inner_matcher);\n}\n\n#if GTEST_HAS_RTTI\n// Creates a matcher that matches a pointer or reference that matches\n// inner_matcher when dynamic_cast<To> is applied.\n// The result of dynamic_cast<To> is forwarded to the inner matcher.\n// If To is a pointer and the cast fails, the inner matcher will receive NULL.\n// If To is a reference and the cast fails, this matcher returns false\n// immediately.\ntemplate <typename To>\ninline PolymorphicMatcher<internal::WhenDynamicCastToMatcher<To> >\nWhenDynamicCastTo(const Matcher<To>& inner_matcher) {\n  return MakePolymorphicMatcher(\n      internal::WhenDynamicCastToMatcher<To>(inner_matcher));\n}\n#endif  // GTEST_HAS_RTTI\n\n// Creates a matcher that matches an object whose given field matches\n// 'matcher'.  For example,\n//   Field(&Foo::number, Ge(5))\n// matches a Foo object x iff x.number >= 5.\ntemplate <typename Class, typename FieldType, typename FieldMatcher>\ninline PolymorphicMatcher<\n  internal::FieldMatcher<Class, FieldType> > Field(\n    FieldType Class::*field, const FieldMatcher& matcher) {\n  return MakePolymorphicMatcher(\n      internal::FieldMatcher<Class, FieldType>(\n          field, MatcherCast<const FieldType&>(matcher)));\n  // The call to MatcherCast() is required for supporting inner\n  // matchers of compatible types.  For example, it allows\n  //   Field(&Foo::bar, m)\n  // to compile where bar is an int32 and m is a matcher for int64.\n}\n\n// Same as Field() but also takes the name of the field to provide better error\n// messages.\ntemplate <typename Class, typename FieldType, typename FieldMatcher>\ninline PolymorphicMatcher<internal::FieldMatcher<Class, FieldType> > Field(\n    const std::string& field_name, FieldType Class::*field,\n    const FieldMatcher& matcher) {\n  return MakePolymorphicMatcher(internal::FieldMatcher<Class, FieldType>(\n      field_name, field, MatcherCast<const FieldType&>(matcher)));\n}\n\n// Creates a matcher that matches an object whose given property\n// matches 'matcher'.  For example,\n//   Property(&Foo::str, StartsWith(\"hi\"))\n// matches a Foo object x iff x.str() starts with \"hi\".\ntemplate <typename Class, typename PropertyType, typename PropertyMatcher>\ninline PolymorphicMatcher<internal::PropertyMatcher<\n    Class, PropertyType, PropertyType (Class::*)() const> >\nProperty(PropertyType (Class::*property)() const,\n         const PropertyMatcher& matcher) {\n  return MakePolymorphicMatcher(\n      internal::PropertyMatcher<Class, PropertyType,\n                                PropertyType (Class::*)() const>(\n          property, MatcherCast<const PropertyType&>(matcher)));\n  // The call to MatcherCast() is required for supporting inner\n  // matchers of compatible types.  For example, it allows\n  //   Property(&Foo::bar, m)\n  // to compile where bar() returns an int32 and m is a matcher for int64.\n}\n\n// Same as Property() above, but also takes the name of the property to provide\n// better error messages.\ntemplate <typename Class, typename PropertyType, typename PropertyMatcher>\ninline PolymorphicMatcher<internal::PropertyMatcher<\n    Class, PropertyType, PropertyType (Class::*)() const> >\nProperty(const std::string& property_name,\n         PropertyType (Class::*property)() const,\n         const PropertyMatcher& matcher) {\n  return MakePolymorphicMatcher(\n      internal::PropertyMatcher<Class, PropertyType,\n                                PropertyType (Class::*)() const>(\n          property_name, property, MatcherCast<const PropertyType&>(matcher)));\n}\n\n// The same as above but for reference-qualified member functions.\ntemplate <typename Class, typename PropertyType, typename PropertyMatcher>\ninline PolymorphicMatcher<internal::PropertyMatcher<\n    Class, PropertyType, PropertyType (Class::*)() const &> >\nProperty(PropertyType (Class::*property)() const &,\n         const PropertyMatcher& matcher) {\n  return MakePolymorphicMatcher(\n      internal::PropertyMatcher<Class, PropertyType,\n                                PropertyType (Class::*)() const&>(\n          property, MatcherCast<const PropertyType&>(matcher)));\n}\n\n// Three-argument form for reference-qualified member functions.\ntemplate <typename Class, typename PropertyType, typename PropertyMatcher>\ninline PolymorphicMatcher<internal::PropertyMatcher<\n    Class, PropertyType, PropertyType (Class::*)() const &> >\nProperty(const std::string& property_name,\n         PropertyType (Class::*property)() const &,\n         const PropertyMatcher& matcher) {\n  return MakePolymorphicMatcher(\n      internal::PropertyMatcher<Class, PropertyType,\n                                PropertyType (Class::*)() const&>(\n          property_name, property, MatcherCast<const PropertyType&>(matcher)));\n}\n\n// Creates a matcher that matches an object iff the result of applying\n// a callable to x matches 'matcher'.\n// For example,\n//   ResultOf(f, StartsWith(\"hi\"))\n// matches a Foo object x iff f(x) starts with \"hi\".\n// `callable` parameter can be a function, function pointer, or a functor. It is\n// required to keep no state affecting the results of the calls on it and make\n// no assumptions about how many calls will be made. Any state it keeps must be\n// protected from the concurrent access.\ntemplate <typename Callable, typename InnerMatcher>\ninternal::ResultOfMatcher<Callable, InnerMatcher> ResultOf(\n    Callable callable, InnerMatcher matcher) {\n  return internal::ResultOfMatcher<Callable, InnerMatcher>(\n      std::move(callable), std::move(matcher));\n}\n\n// String matchers.\n\n// Matches a string equal to str.\ninline PolymorphicMatcher<internal::StrEqualityMatcher<std::string> > StrEq(\n    const std::string& str) {\n  return MakePolymorphicMatcher(\n      internal::StrEqualityMatcher<std::string>(str, true, true));\n}\n\n// Matches a string not equal to str.\ninline PolymorphicMatcher<internal::StrEqualityMatcher<std::string> > StrNe(\n    const std::string& str) {\n  return MakePolymorphicMatcher(\n      internal::StrEqualityMatcher<std::string>(str, false, true));\n}\n\n// Matches a string equal to str, ignoring case.\ninline PolymorphicMatcher<internal::StrEqualityMatcher<std::string> > StrCaseEq(\n    const std::string& str) {\n  return MakePolymorphicMatcher(\n      internal::StrEqualityMatcher<std::string>(str, true, false));\n}\n\n// Matches a string not equal to str, ignoring case.\ninline PolymorphicMatcher<internal::StrEqualityMatcher<std::string> > StrCaseNe(\n    const std::string& str) {\n  return MakePolymorphicMatcher(\n      internal::StrEqualityMatcher<std::string>(str, false, false));\n}\n\n// Creates a matcher that matches any string, std::string, or C string\n// that contains the given substring.\ninline PolymorphicMatcher<internal::HasSubstrMatcher<std::string> > HasSubstr(\n    const std::string& substring) {\n  return MakePolymorphicMatcher(\n      internal::HasSubstrMatcher<std::string>(substring));\n}\n\n// Matches a string that starts with 'prefix' (case-sensitive).\ninline PolymorphicMatcher<internal::StartsWithMatcher<std::string> > StartsWith(\n    const std::string& prefix) {\n  return MakePolymorphicMatcher(\n      internal::StartsWithMatcher<std::string>(prefix));\n}\n\n// Matches a string that ends with 'suffix' (case-sensitive).\ninline PolymorphicMatcher<internal::EndsWithMatcher<std::string> > EndsWith(\n    const std::string& suffix) {\n  return MakePolymorphicMatcher(internal::EndsWithMatcher<std::string>(suffix));\n}\n\n#if GTEST_HAS_GLOBAL_WSTRING || GTEST_HAS_STD_WSTRING\n// Wide string matchers.\n\n// Matches a string equal to str.\ninline PolymorphicMatcher<internal::StrEqualityMatcher<std::wstring> > StrEq(\n    const std::wstring& str) {\n  return MakePolymorphicMatcher(\n      internal::StrEqualityMatcher<std::wstring>(str, true, true));\n}\n\n// Matches a string not equal to str.\ninline PolymorphicMatcher<internal::StrEqualityMatcher<std::wstring> > StrNe(\n    const std::wstring& str) {\n  return MakePolymorphicMatcher(\n      internal::StrEqualityMatcher<std::wstring>(str, false, true));\n}\n\n// Matches a string equal to str, ignoring case.\ninline PolymorphicMatcher<internal::StrEqualityMatcher<std::wstring> >\nStrCaseEq(const std::wstring& str) {\n  return MakePolymorphicMatcher(\n      internal::StrEqualityMatcher<std::wstring>(str, true, false));\n}\n\n// Matches a string not equal to str, ignoring case.\ninline PolymorphicMatcher<internal::StrEqualityMatcher<std::wstring> >\nStrCaseNe(const std::wstring& str) {\n  return MakePolymorphicMatcher(\n      internal::StrEqualityMatcher<std::wstring>(str, false, false));\n}\n\n// Creates a matcher that matches any ::wstring, std::wstring, or C wide string\n// that contains the given substring.\ninline PolymorphicMatcher<internal::HasSubstrMatcher<std::wstring> > HasSubstr(\n    const std::wstring& substring) {\n  return MakePolymorphicMatcher(\n      internal::HasSubstrMatcher<std::wstring>(substring));\n}\n\n// Matches a string that starts with 'prefix' (case-sensitive).\ninline PolymorphicMatcher<internal::StartsWithMatcher<std::wstring> >\nStartsWith(const std::wstring& prefix) {\n  return MakePolymorphicMatcher(\n      internal::StartsWithMatcher<std::wstring>(prefix));\n}\n\n// Matches a string that ends with 'suffix' (case-sensitive).\ninline PolymorphicMatcher<internal::EndsWithMatcher<std::wstring> > EndsWith(\n    const std::wstring& suffix) {\n  return MakePolymorphicMatcher(\n      internal::EndsWithMatcher<std::wstring>(suffix));\n}\n\n#endif  // GTEST_HAS_GLOBAL_WSTRING || GTEST_HAS_STD_WSTRING\n\n// Creates a polymorphic matcher that matches a 2-tuple where the\n// first field == the second field.\ninline internal::Eq2Matcher Eq() { return internal::Eq2Matcher(); }\n\n// Creates a polymorphic matcher that matches a 2-tuple where the\n// first field >= the second field.\ninline internal::Ge2Matcher Ge() { return internal::Ge2Matcher(); }\n\n// Creates a polymorphic matcher that matches a 2-tuple where the\n// first field > the second field.\ninline internal::Gt2Matcher Gt() { return internal::Gt2Matcher(); }\n\n// Creates a polymorphic matcher that matches a 2-tuple where the\n// first field <= the second field.\ninline internal::Le2Matcher Le() { return internal::Le2Matcher(); }\n\n// Creates a polymorphic matcher that matches a 2-tuple where the\n// first field < the second field.\ninline internal::Lt2Matcher Lt() { return internal::Lt2Matcher(); }\n\n// Creates a polymorphic matcher that matches a 2-tuple where the\n// first field != the second field.\ninline internal::Ne2Matcher Ne() { return internal::Ne2Matcher(); }\n\n// Creates a polymorphic matcher that matches a 2-tuple where\n// FloatEq(first field) matches the second field.\ninline internal::FloatingEq2Matcher<float> FloatEq() {\n  return internal::FloatingEq2Matcher<float>();\n}\n\n// Creates a polymorphic matcher that matches a 2-tuple where\n// DoubleEq(first field) matches the second field.\ninline internal::FloatingEq2Matcher<double> DoubleEq() {\n  return internal::FloatingEq2Matcher<double>();\n}\n\n// Creates a polymorphic matcher that matches a 2-tuple where\n// FloatEq(first field) matches the second field with NaN equality.\ninline internal::FloatingEq2Matcher<float> NanSensitiveFloatEq() {\n  return internal::FloatingEq2Matcher<float>(true);\n}\n\n// Creates a polymorphic matcher that matches a 2-tuple where\n// DoubleEq(first field) matches the second field with NaN equality.\ninline internal::FloatingEq2Matcher<double> NanSensitiveDoubleEq() {\n  return internal::FloatingEq2Matcher<double>(true);\n}\n\n// Creates a polymorphic matcher that matches a 2-tuple where\n// FloatNear(first field, max_abs_error) matches the second field.\ninline internal::FloatingEq2Matcher<float> FloatNear(float max_abs_error) {\n  return internal::FloatingEq2Matcher<float>(max_abs_error);\n}\n\n// Creates a polymorphic matcher that matches a 2-tuple where\n// DoubleNear(first field, max_abs_error) matches the second field.\ninline internal::FloatingEq2Matcher<double> DoubleNear(double max_abs_error) {\n  return internal::FloatingEq2Matcher<double>(max_abs_error);\n}\n\n// Creates a polymorphic matcher that matches a 2-tuple where\n// FloatNear(first field, max_abs_error) matches the second field with NaN\n// equality.\ninline internal::FloatingEq2Matcher<float> NanSensitiveFloatNear(\n    float max_abs_error) {\n  return internal::FloatingEq2Matcher<float>(max_abs_error, true);\n}\n\n// Creates a polymorphic matcher that matches a 2-tuple where\n// DoubleNear(first field, max_abs_error) matches the second field with NaN\n// equality.\ninline internal::FloatingEq2Matcher<double> NanSensitiveDoubleNear(\n    double max_abs_error) {\n  return internal::FloatingEq2Matcher<double>(max_abs_error, true);\n}\n\n// Creates a matcher that matches any value of type T that m doesn't\n// match.\ntemplate <typename InnerMatcher>\ninline internal::NotMatcher<InnerMatcher> Not(InnerMatcher m) {\n  return internal::NotMatcher<InnerMatcher>(m);\n}\n\n// Returns a matcher that matches anything that satisfies the given\n// predicate.  The predicate can be any unary function or functor\n// whose return type can be implicitly converted to bool.\ntemplate <typename Predicate>\ninline PolymorphicMatcher<internal::TrulyMatcher<Predicate> >\nTruly(Predicate pred) {\n  return MakePolymorphicMatcher(internal::TrulyMatcher<Predicate>(pred));\n}\n\n// Returns a matcher that matches the container size. The container must\n// support both size() and size_type which all STL-like containers provide.\n// Note that the parameter 'size' can be a value of type size_type as well as\n// matcher. For instance:\n//   EXPECT_THAT(container, SizeIs(2));     // Checks container has 2 elements.\n//   EXPECT_THAT(container, SizeIs(Le(2));  // Checks container has at most 2.\ntemplate <typename SizeMatcher>\ninline internal::SizeIsMatcher<SizeMatcher>\nSizeIs(const SizeMatcher& size_matcher) {\n  return internal::SizeIsMatcher<SizeMatcher>(size_matcher);\n}\n\n// Returns a matcher that matches the distance between the container's begin()\n// iterator and its end() iterator, i.e. the size of the container. This matcher\n// can be used instead of SizeIs with containers such as std::forward_list which\n// do not implement size(). The container must provide const_iterator (with\n// valid iterator_traits), begin() and end().\ntemplate <typename DistanceMatcher>\ninline internal::BeginEndDistanceIsMatcher<DistanceMatcher>\nBeginEndDistanceIs(const DistanceMatcher& distance_matcher) {\n  return internal::BeginEndDistanceIsMatcher<DistanceMatcher>(distance_matcher);\n}\n\n// Returns a matcher that matches an equal container.\n// This matcher behaves like Eq(), but in the event of mismatch lists the\n// values that are included in one container but not the other. (Duplicate\n// values and order differences are not explained.)\ntemplate <typename Container>\ninline PolymorphicMatcher<internal::ContainerEqMatcher<  // NOLINT\n                            GTEST_REMOVE_CONST_(Container)> >\n    ContainerEq(const Container& rhs) {\n  // This following line is for working around a bug in MSVC 8.0,\n  // which causes Container to be a const type sometimes.\n  typedef GTEST_REMOVE_CONST_(Container) RawContainer;\n  return MakePolymorphicMatcher(\n      internal::ContainerEqMatcher<RawContainer>(rhs));\n}\n\n// Returns a matcher that matches a container that, when sorted using\n// the given comparator, matches container_matcher.\ntemplate <typename Comparator, typename ContainerMatcher>\ninline internal::WhenSortedByMatcher<Comparator, ContainerMatcher>\nWhenSortedBy(const Comparator& comparator,\n             const ContainerMatcher& container_matcher) {\n  return internal::WhenSortedByMatcher<Comparator, ContainerMatcher>(\n      comparator, container_matcher);\n}\n\n// Returns a matcher that matches a container that, when sorted using\n// the < operator, matches container_matcher.\ntemplate <typename ContainerMatcher>\ninline internal::WhenSortedByMatcher<internal::LessComparator, ContainerMatcher>\nWhenSorted(const ContainerMatcher& container_matcher) {\n  return\n      internal::WhenSortedByMatcher<internal::LessComparator, ContainerMatcher>(\n          internal::LessComparator(), container_matcher);\n}\n\n// Matches an STL-style container or a native array that contains the\n// same number of elements as in rhs, where its i-th element and rhs's\n// i-th element (as a pair) satisfy the given pair matcher, for all i.\n// TupleMatcher must be able to be safely cast to Matcher<std::tuple<const\n// T1&, const T2&> >, where T1 and T2 are the types of elements in the\n// LHS container and the RHS container respectively.\ntemplate <typename TupleMatcher, typename Container>\ninline internal::PointwiseMatcher<TupleMatcher,\n                                  GTEST_REMOVE_CONST_(Container)>\nPointwise(const TupleMatcher& tuple_matcher, const Container& rhs) {\n  // This following line is for working around a bug in MSVC 8.0,\n  // which causes Container to be a const type sometimes (e.g. when\n  // rhs is a const int[])..\n  typedef GTEST_REMOVE_CONST_(Container) RawContainer;\n  return internal::PointwiseMatcher<TupleMatcher, RawContainer>(\n      tuple_matcher, rhs);\n}\n\n\n// Supports the Pointwise(m, {a, b, c}) syntax.\ntemplate <typename TupleMatcher, typename T>\ninline internal::PointwiseMatcher<TupleMatcher, std::vector<T> > Pointwise(\n    const TupleMatcher& tuple_matcher, std::initializer_list<T> rhs) {\n  return Pointwise(tuple_matcher, std::vector<T>(rhs));\n}\n\n\n// UnorderedPointwise(pair_matcher, rhs) matches an STL-style\n// container or a native array that contains the same number of\n// elements as in rhs, where in some permutation of the container, its\n// i-th element and rhs's i-th element (as a pair) satisfy the given\n// pair matcher, for all i.  Tuple2Matcher must be able to be safely\n// cast to Matcher<std::tuple<const T1&, const T2&> >, where T1 and T2 are\n// the types of elements in the LHS container and the RHS container\n// respectively.\n//\n// This is like Pointwise(pair_matcher, rhs), except that the element\n// order doesn't matter.\ntemplate <typename Tuple2Matcher, typename RhsContainer>\ninline internal::UnorderedElementsAreArrayMatcher<\n    typename internal::BoundSecondMatcher<\n        Tuple2Matcher, typename internal::StlContainerView<GTEST_REMOVE_CONST_(\n                           RhsContainer)>::type::value_type> >\nUnorderedPointwise(const Tuple2Matcher& tuple2_matcher,\n                   const RhsContainer& rhs_container) {\n  // This following line is for working around a bug in MSVC 8.0,\n  // which causes RhsContainer to be a const type sometimes (e.g. when\n  // rhs_container is a const int[]).\n  typedef GTEST_REMOVE_CONST_(RhsContainer) RawRhsContainer;\n\n  // RhsView allows the same code to handle RhsContainer being a\n  // STL-style container and it being a native C-style array.\n  typedef typename internal::StlContainerView<RawRhsContainer> RhsView;\n  typedef typename RhsView::type RhsStlContainer;\n  typedef typename RhsStlContainer::value_type Second;\n  const RhsStlContainer& rhs_stl_container =\n      RhsView::ConstReference(rhs_container);\n\n  // Create a matcher for each element in rhs_container.\n  ::std::vector<internal::BoundSecondMatcher<Tuple2Matcher, Second> > matchers;\n  for (typename RhsStlContainer::const_iterator it = rhs_stl_container.begin();\n       it != rhs_stl_container.end(); ++it) {\n    matchers.push_back(\n        internal::MatcherBindSecond(tuple2_matcher, *it));\n  }\n\n  // Delegate the work to UnorderedElementsAreArray().\n  return UnorderedElementsAreArray(matchers);\n}\n\n\n// Supports the UnorderedPointwise(m, {a, b, c}) syntax.\ntemplate <typename Tuple2Matcher, typename T>\ninline internal::UnorderedElementsAreArrayMatcher<\n    typename internal::BoundSecondMatcher<Tuple2Matcher, T> >\nUnorderedPointwise(const Tuple2Matcher& tuple2_matcher,\n                   std::initializer_list<T> rhs) {\n  return UnorderedPointwise(tuple2_matcher, std::vector<T>(rhs));\n}\n\n\n// Matches an STL-style container or a native array that contains at\n// least one element matching the given value or matcher.\n//\n// Examples:\n//   ::std::set<int> page_ids;\n//   page_ids.insert(3);\n//   page_ids.insert(1);\n//   EXPECT_THAT(page_ids, Contains(1));\n//   EXPECT_THAT(page_ids, Contains(Gt(2)));\n//   EXPECT_THAT(page_ids, Not(Contains(4)));\n//\n//   ::std::map<int, size_t> page_lengths;\n//   page_lengths[1] = 100;\n//   EXPECT_THAT(page_lengths,\n//               Contains(::std::pair<const int, size_t>(1, 100)));\n//\n//   const char* user_ids[] = { \"joe\", \"mike\", \"tom\" };\n//   EXPECT_THAT(user_ids, Contains(Eq(::std::string(\"tom\"))));\ntemplate <typename M>\ninline internal::ContainsMatcher<M> Contains(M matcher) {\n  return internal::ContainsMatcher<M>(matcher);\n}\n\n// IsSupersetOf(iterator_first, iterator_last)\n// IsSupersetOf(pointer, count)\n// IsSupersetOf(array)\n// IsSupersetOf(container)\n// IsSupersetOf({e1, e2, ..., en})\n//\n// IsSupersetOf() verifies that a surjective partial mapping onto a collection\n// of matchers exists. In other words, a container matches\n// IsSupersetOf({e1, ..., en}) if and only if there is a permutation\n// {y1, ..., yn} of some of the container's elements where y1 matches e1,\n// ..., and yn matches en. Obviously, the size of the container must be >= n\n// in order to have a match. Examples:\n//\n// - {1, 2, 3} matches IsSupersetOf({Ge(3), Ne(0)}), as 3 matches Ge(3) and\n//   1 matches Ne(0).\n// - {1, 2} doesn't match IsSupersetOf({Eq(1), Lt(2)}), even though 1 matches\n//   both Eq(1) and Lt(2). The reason is that different matchers must be used\n//   for elements in different slots of the container.\n// - {1, 1, 2} matches IsSupersetOf({Eq(1), Lt(2)}), as (the first) 1 matches\n//   Eq(1) and (the second) 1 matches Lt(2).\n// - {1, 2, 3} matches IsSupersetOf(Gt(1), Gt(1)), as 2 matches (the first)\n//   Gt(1) and 3 matches (the second) Gt(1).\n//\n// The matchers can be specified as an array, a pointer and count, a container,\n// an initializer list, or an STL iterator range. In each of these cases, the\n// underlying matchers can be either values or matchers.\n\ntemplate <typename Iter>\ninline internal::UnorderedElementsAreArrayMatcher<\n    typename ::std::iterator_traits<Iter>::value_type>\nIsSupersetOf(Iter first, Iter last) {\n  typedef typename ::std::iterator_traits<Iter>::value_type T;\n  return internal::UnorderedElementsAreArrayMatcher<T>(\n      internal::UnorderedMatcherRequire::Superset, first, last);\n}\n\ntemplate <typename T>\ninline internal::UnorderedElementsAreArrayMatcher<T> IsSupersetOf(\n    const T* pointer, size_t count) {\n  return IsSupersetOf(pointer, pointer + count);\n}\n\ntemplate <typename T, size_t N>\ninline internal::UnorderedElementsAreArrayMatcher<T> IsSupersetOf(\n    const T (&array)[N]) {\n  return IsSupersetOf(array, N);\n}\n\ntemplate <typename Container>\ninline internal::UnorderedElementsAreArrayMatcher<\n    typename Container::value_type>\nIsSupersetOf(const Container& container) {\n  return IsSupersetOf(container.begin(), container.end());\n}\n\ntemplate <typename T>\ninline internal::UnorderedElementsAreArrayMatcher<T> IsSupersetOf(\n    ::std::initializer_list<T> xs) {\n  return IsSupersetOf(xs.begin(), xs.end());\n}\n\n// IsSubsetOf(iterator_first, iterator_last)\n// IsSubsetOf(pointer, count)\n// IsSubsetOf(array)\n// IsSubsetOf(container)\n// IsSubsetOf({e1, e2, ..., en})\n//\n// IsSubsetOf() verifies that an injective mapping onto a collection of matchers\n// exists.  In other words, a container matches IsSubsetOf({e1, ..., en}) if and\n// only if there is a subset of matchers {m1, ..., mk} which would match the\n// container using UnorderedElementsAre.  Obviously, the size of the container\n// must be <= n in order to have a match. Examples:\n//\n// - {1} matches IsSubsetOf({Gt(0), Lt(0)}), as 1 matches Gt(0).\n// - {1, -1} matches IsSubsetOf({Lt(0), Gt(0)}), as 1 matches Gt(0) and -1\n//   matches Lt(0).\n// - {1, 2} doesn't matches IsSubsetOf({Gt(0), Lt(0)}), even though 1 and 2 both\n//   match Gt(0). The reason is that different matchers must be used for\n//   elements in different slots of the container.\n//\n// The matchers can be specified as an array, a pointer and count, a container,\n// an initializer list, or an STL iterator range. In each of these cases, the\n// underlying matchers can be either values or matchers.\n\ntemplate <typename Iter>\ninline internal::UnorderedElementsAreArrayMatcher<\n    typename ::std::iterator_traits<Iter>::value_type>\nIsSubsetOf(Iter first, Iter last) {\n  typedef typename ::std::iterator_traits<Iter>::value_type T;\n  return internal::UnorderedElementsAreArrayMatcher<T>(\n      internal::UnorderedMatcherRequire::Subset, first, last);\n}\n\ntemplate <typename T>\ninline internal::UnorderedElementsAreArrayMatcher<T> IsSubsetOf(\n    const T* pointer, size_t count) {\n  return IsSubsetOf(pointer, pointer + count);\n}\n\ntemplate <typename T, size_t N>\ninline internal::UnorderedElementsAreArrayMatcher<T> IsSubsetOf(\n    const T (&array)[N]) {\n  return IsSubsetOf(array, N);\n}\n\ntemplate <typename Container>\ninline internal::UnorderedElementsAreArrayMatcher<\n    typename Container::value_type>\nIsSubsetOf(const Container& container) {\n  return IsSubsetOf(container.begin(), container.end());\n}\n\ntemplate <typename T>\ninline internal::UnorderedElementsAreArrayMatcher<T> IsSubsetOf(\n    ::std::initializer_list<T> xs) {\n  return IsSubsetOf(xs.begin(), xs.end());\n}\n\n// Matches an STL-style container or a native array that contains only\n// elements matching the given value or matcher.\n//\n// Each(m) is semantically equivalent to Not(Contains(Not(m))). Only\n// the messages are different.\n//\n// Examples:\n//   ::std::set<int> page_ids;\n//   // Each(m) matches an empty container, regardless of what m is.\n//   EXPECT_THAT(page_ids, Each(Eq(1)));\n//   EXPECT_THAT(page_ids, Each(Eq(77)));\n//\n//   page_ids.insert(3);\n//   EXPECT_THAT(page_ids, Each(Gt(0)));\n//   EXPECT_THAT(page_ids, Not(Each(Gt(4))));\n//   page_ids.insert(1);\n//   EXPECT_THAT(page_ids, Not(Each(Lt(2))));\n//\n//   ::std::map<int, size_t> page_lengths;\n//   page_lengths[1] = 100;\n//   page_lengths[2] = 200;\n//   page_lengths[3] = 300;\n//   EXPECT_THAT(page_lengths, Not(Each(Pair(1, 100))));\n//   EXPECT_THAT(page_lengths, Each(Key(Le(3))));\n//\n//   const char* user_ids[] = { \"joe\", \"mike\", \"tom\" };\n//   EXPECT_THAT(user_ids, Not(Each(Eq(::std::string(\"tom\")))));\ntemplate <typename M>\ninline internal::EachMatcher<M> Each(M matcher) {\n  return internal::EachMatcher<M>(matcher);\n}\n\n// Key(inner_matcher) matches an std::pair whose 'first' field matches\n// inner_matcher.  For example, Contains(Key(Ge(5))) can be used to match an\n// std::map that contains at least one element whose key is >= 5.\ntemplate <typename M>\ninline internal::KeyMatcher<M> Key(M inner_matcher) {\n  return internal::KeyMatcher<M>(inner_matcher);\n}\n\n// Pair(first_matcher, second_matcher) matches a std::pair whose 'first' field\n// matches first_matcher and whose 'second' field matches second_matcher.  For\n// example, EXPECT_THAT(map_type, ElementsAre(Pair(Ge(5), \"foo\"))) can be used\n// to match a std::map<int, string> that contains exactly one element whose key\n// is >= 5 and whose value equals \"foo\".\ntemplate <typename FirstMatcher, typename SecondMatcher>\ninline internal::PairMatcher<FirstMatcher, SecondMatcher>\nPair(FirstMatcher first_matcher, SecondMatcher second_matcher) {\n  return internal::PairMatcher<FirstMatcher, SecondMatcher>(\n      first_matcher, second_matcher);\n}\n\n// Returns a predicate that is satisfied by anything that matches the\n// given matcher.\ntemplate <typename M>\ninline internal::MatcherAsPredicate<M> Matches(M matcher) {\n  return internal::MatcherAsPredicate<M>(matcher);\n}\n\n// Returns true iff the value matches the matcher.\ntemplate <typename T, typename M>\ninline bool Value(const T& value, M matcher) {\n  return testing::Matches(matcher)(value);\n}\n\n// Matches the value against the given matcher and explains the match\n// result to listener.\ntemplate <typename T, typename M>\ninline bool ExplainMatchResult(\n    M matcher, const T& value, MatchResultListener* listener) {\n  return SafeMatcherCast<const T&>(matcher).MatchAndExplain(value, listener);\n}\n\n// Returns a string representation of the given matcher.  Useful for description\n// strings of matchers defined using MATCHER_P* macros that accept matchers as\n// their arguments.  For example:\n//\n// MATCHER_P(XAndYThat, matcher,\n//           \"X that \" + DescribeMatcher<int>(matcher, negation) +\n//               \" and Y that \" + DescribeMatcher<double>(matcher, negation)) {\n//   return ExplainMatchResult(matcher, arg.x(), result_listener) &&\n//          ExplainMatchResult(matcher, arg.y(), result_listener);\n// }\ntemplate <typename T, typename M>\nstd::string DescribeMatcher(const M& matcher, bool negation = false) {\n  ::std::stringstream ss;\n  Matcher<T> monomorphic_matcher = SafeMatcherCast<T>(matcher);\n  if (negation) {\n    monomorphic_matcher.DescribeNegationTo(&ss);\n  } else {\n    monomorphic_matcher.DescribeTo(&ss);\n  }\n  return ss.str();\n}\n\ntemplate <typename... Args>\ninternal::ElementsAreMatcher<\n    std::tuple<typename std::decay<const Args&>::type...>>\nElementsAre(const Args&... matchers) {\n  return internal::ElementsAreMatcher<\n      std::tuple<typename std::decay<const Args&>::type...>>(\n      std::make_tuple(matchers...));\n}\n\ntemplate <typename... Args>\ninternal::UnorderedElementsAreMatcher<\n    std::tuple<typename std::decay<const Args&>::type...>>\nUnorderedElementsAre(const Args&... matchers) {\n  return internal::UnorderedElementsAreMatcher<\n      std::tuple<typename std::decay<const Args&>::type...>>(\n      std::make_tuple(matchers...));\n}\n\n// Define variadic matcher versions.\ntemplate <typename... Args>\ninternal::AllOfMatcher<typename std::decay<const Args&>::type...> AllOf(\n    const Args&... matchers) {\n  return internal::AllOfMatcher<typename std::decay<const Args&>::type...>(\n      matchers...);\n}\n\ntemplate <typename... Args>\ninternal::AnyOfMatcher<typename std::decay<const Args&>::type...> AnyOf(\n    const Args&... matchers) {\n  return internal::AnyOfMatcher<typename std::decay<const Args&>::type...>(\n      matchers...);\n}\n\n// AnyOfArray(array)\n// AnyOfArray(pointer, count)\n// AnyOfArray(container)\n// AnyOfArray({ e1, e2, ..., en })\n// AnyOfArray(iterator_first, iterator_last)\n//\n// AnyOfArray() verifies whether a given value matches any member of a\n// collection of matchers.\n//\n// AllOfArray(array)\n// AllOfArray(pointer, count)\n// AllOfArray(container)\n// AllOfArray({ e1, e2, ..., en })\n// AllOfArray(iterator_first, iterator_last)\n//\n// AllOfArray() verifies whether a given value matches all members of a\n// collection of matchers.\n//\n// The matchers can be specified as an array, a pointer and count, a container,\n// an initializer list, or an STL iterator range. In each of these cases, the\n// underlying matchers can be either values or matchers.\n\ntemplate <typename Iter>\ninline internal::AnyOfArrayMatcher<\n    typename ::std::iterator_traits<Iter>::value_type>\nAnyOfArray(Iter first, Iter last) {\n  return internal::AnyOfArrayMatcher<\n      typename ::std::iterator_traits<Iter>::value_type>(first, last);\n}\n\ntemplate <typename Iter>\ninline internal::AllOfArrayMatcher<\n    typename ::std::iterator_traits<Iter>::value_type>\nAllOfArray(Iter first, Iter last) {\n  return internal::AllOfArrayMatcher<\n      typename ::std::iterator_traits<Iter>::value_type>(first, last);\n}\n\ntemplate <typename T>\ninline internal::AnyOfArrayMatcher<T> AnyOfArray(const T* ptr, size_t count) {\n  return AnyOfArray(ptr, ptr + count);\n}\n\ntemplate <typename T>\ninline internal::AllOfArrayMatcher<T> AllOfArray(const T* ptr, size_t count) {\n  return AllOfArray(ptr, ptr + count);\n}\n\ntemplate <typename T, size_t N>\ninline internal::AnyOfArrayMatcher<T> AnyOfArray(const T (&array)[N]) {\n  return AnyOfArray(array, N);\n}\n\ntemplate <typename T, size_t N>\ninline internal::AllOfArrayMatcher<T> AllOfArray(const T (&array)[N]) {\n  return AllOfArray(array, N);\n}\n\ntemplate <typename Container>\ninline internal::AnyOfArrayMatcher<typename Container::value_type> AnyOfArray(\n    const Container& container) {\n  return AnyOfArray(container.begin(), container.end());\n}\n\ntemplate <typename Container>\ninline internal::AllOfArrayMatcher<typename Container::value_type> AllOfArray(\n    const Container& container) {\n  return AllOfArray(container.begin(), container.end());\n}\n\ntemplate <typename T>\ninline internal::AnyOfArrayMatcher<T> AnyOfArray(\n    ::std::initializer_list<T> xs) {\n  return AnyOfArray(xs.begin(), xs.end());\n}\n\ntemplate <typename T>\ninline internal::AllOfArrayMatcher<T> AllOfArray(\n    ::std::initializer_list<T> xs) {\n  return AllOfArray(xs.begin(), xs.end());\n}\n\n// Args<N1, N2, ..., Nk>(a_matcher) matches a tuple if the selected\n// fields of it matches a_matcher.  C++ doesn't support default\n// arguments for function templates, so we have to overload it.\ntemplate <size_t... k, typename InnerMatcher>\ninternal::ArgsMatcher<typename std::decay<InnerMatcher>::type, k...> Args(\n    InnerMatcher&& matcher) {\n  return internal::ArgsMatcher<typename std::decay<InnerMatcher>::type, k...>(\n      std::forward<InnerMatcher>(matcher));\n}\n\n// AllArgs(m) is a synonym of m.  This is useful in\n//\n//   EXPECT_CALL(foo, Bar(_, _)).With(AllArgs(Eq()));\n//\n// which is easier to read than\n//\n//   EXPECT_CALL(foo, Bar(_, _)).With(Eq());\ntemplate <typename InnerMatcher>\ninline InnerMatcher AllArgs(const InnerMatcher& matcher) { return matcher; }\n\n// Returns a matcher that matches the value of an optional<> type variable.\n// The matcher implementation only uses '!arg' and requires that the optional<>\n// type has a 'value_type' member type and that '*arg' is of type 'value_type'\n// and is printable using 'PrintToString'. It is compatible with\n// std::optional/std::experimental::optional.\n// Note that to compare an optional type variable against nullopt you should\n// use Eq(nullopt) and not Optional(Eq(nullopt)). The latter implies that the\n// optional value contains an optional itself.\ntemplate <typename ValueMatcher>\ninline internal::OptionalMatcher<ValueMatcher> Optional(\n    const ValueMatcher& value_matcher) {\n  return internal::OptionalMatcher<ValueMatcher>(value_matcher);\n}\n\n// Returns a matcher that matches the value of a absl::any type variable.\ntemplate <typename T>\nPolymorphicMatcher<internal::any_cast_matcher::AnyCastMatcher<T> > AnyWith(\n    const Matcher<const T&>& matcher) {\n  return MakePolymorphicMatcher(\n      internal::any_cast_matcher::AnyCastMatcher<T>(matcher));\n}\n\n// Returns a matcher that matches the value of a variant<> type variable.\n// The matcher implementation uses ADL to find the holds_alternative and get\n// functions.\n// It is compatible with std::variant.\ntemplate <typename T>\nPolymorphicMatcher<internal::variant_matcher::VariantMatcher<T> > VariantWith(\n    const Matcher<const T&>& matcher) {\n  return MakePolymorphicMatcher(\n      internal::variant_matcher::VariantMatcher<T>(matcher));\n}\n\n// These macros allow using matchers to check values in Google Test\n// tests.  ASSERT_THAT(value, matcher) and EXPECT_THAT(value, matcher)\n// succeed iff the value matches the matcher.  If the assertion fails,\n// the value and the description of the matcher will be printed.\n#define ASSERT_THAT(value, matcher) ASSERT_PRED_FORMAT1(\\\n    ::testing::internal::MakePredicateFormatterFromMatcher(matcher), value)\n#define EXPECT_THAT(value, matcher) EXPECT_PRED_FORMAT1(\\\n    ::testing::internal::MakePredicateFormatterFromMatcher(matcher), value)\n\n}  // namespace testing\n\nGTEST_DISABLE_MSC_WARNINGS_POP_()  //  4251 5046\n\n// Include any custom callback matchers added by the local installation.\n// We must include this header at the end to make sure it can use the\n// declarations from this file.\n// Copyright 2015, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Injection point for custom user configurations. See README for details\n//\n// GOOGLETEST_CM0002 DO NOT DELETE\n\n#ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_MATCHERS_H_\n#define GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_MATCHERS_H_\n#endif  // GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_MATCHERS_H_\n\n#endif  // GMOCK_INCLUDE_GMOCK_GMOCK_MATCHERS_H_\n\n#if GTEST_HAS_EXCEPTIONS\n# include <stdexcept>  // NOLINT\n#endif\n\nGTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \\\n/* class A needs to have dll-interface to be used by clients of class B */)\n\nnamespace testing {\n\n// An abstract handle of an expectation.\nclass Expectation;\n\n// A set of expectation handles.\nclass ExpectationSet;\n\n// Anything inside the 'internal' namespace IS INTERNAL IMPLEMENTATION\n// and MUST NOT BE USED IN USER CODE!!!\nnamespace internal {\n\n// Implements a mock function.\ntemplate <typename F> class FunctionMocker;\n\n// Base class for expectations.\nclass ExpectationBase;\n\n// Implements an expectation.\ntemplate <typename F> class TypedExpectation;\n\n// Helper class for testing the Expectation class template.\nclass ExpectationTester;\n\n// Protects the mock object registry (in class Mock), all function\n// mockers, and all expectations.\n//\n// The reason we don't use more fine-grained protection is: when a\n// mock function Foo() is called, it needs to consult its expectations\n// to see which one should be picked.  If another thread is allowed to\n// call a mock function (either Foo() or a different one) at the same\n// time, it could affect the \"retired\" attributes of Foo()'s\n// expectations when InSequence() is used, and thus affect which\n// expectation gets picked.  Therefore, we sequence all mock function\n// calls to ensure the integrity of the mock objects' states.\nGTEST_API_ GTEST_DECLARE_STATIC_MUTEX_(g_gmock_mutex);\n\n// Untyped base class for ActionResultHolder<R>.\nclass UntypedActionResultHolderBase;\n\n// Abstract base class of FunctionMocker.  This is the\n// type-agnostic part of the function mocker interface.  Its pure\n// virtual methods are implemented by FunctionMocker.\nclass GTEST_API_ UntypedFunctionMockerBase {\n public:\n  UntypedFunctionMockerBase();\n  virtual ~UntypedFunctionMockerBase();\n\n  // Verifies that all expectations on this mock function have been\n  // satisfied.  Reports one or more Google Test non-fatal failures\n  // and returns false if not.\n  bool VerifyAndClearExpectationsLocked()\n      GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex);\n\n  // Clears the ON_CALL()s set on this mock function.\n  virtual void ClearDefaultActionsLocked()\n      GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) = 0;\n\n  // In all of the following Untyped* functions, it's the caller's\n  // responsibility to guarantee the correctness of the arguments'\n  // types.\n\n  // Performs the default action with the given arguments and returns\n  // the action's result.  The call description string will be used in\n  // the error message to describe the call in the case the default\n  // action fails.\n  // L = *\n  virtual UntypedActionResultHolderBase* UntypedPerformDefaultAction(\n      void* untyped_args, const std::string& call_description) const = 0;\n\n  // Performs the given action with the given arguments and returns\n  // the action's result.\n  // L = *\n  virtual UntypedActionResultHolderBase* UntypedPerformAction(\n      const void* untyped_action, void* untyped_args) const = 0;\n\n  // Writes a message that the call is uninteresting (i.e. neither\n  // explicitly expected nor explicitly unexpected) to the given\n  // ostream.\n  virtual void UntypedDescribeUninterestingCall(\n      const void* untyped_args,\n      ::std::ostream* os) const\n          GTEST_LOCK_EXCLUDED_(g_gmock_mutex) = 0;\n\n  // Returns the expectation that matches the given function arguments\n  // (or NULL is there's no match); when a match is found,\n  // untyped_action is set to point to the action that should be\n  // performed (or NULL if the action is \"do default\"), and\n  // is_excessive is modified to indicate whether the call exceeds the\n  // expected number.\n  virtual const ExpectationBase* UntypedFindMatchingExpectation(\n      const void* untyped_args,\n      const void** untyped_action, bool* is_excessive,\n      ::std::ostream* what, ::std::ostream* why)\n          GTEST_LOCK_EXCLUDED_(g_gmock_mutex) = 0;\n\n  // Prints the given function arguments to the ostream.\n  virtual void UntypedPrintArgs(const void* untyped_args,\n                                ::std::ostream* os) const = 0;\n\n  // Sets the mock object this mock method belongs to, and registers\n  // this information in the global mock registry.  Will be called\n  // whenever an EXPECT_CALL() or ON_CALL() is executed on this mock\n  // method.\n  void RegisterOwner(const void* mock_obj)\n      GTEST_LOCK_EXCLUDED_(g_gmock_mutex);\n\n  // Sets the mock object this mock method belongs to, and sets the\n  // name of the mock function.  Will be called upon each invocation\n  // of this mock function.\n  void SetOwnerAndName(const void* mock_obj, const char* name)\n      GTEST_LOCK_EXCLUDED_(g_gmock_mutex);\n\n  // Returns the mock object this mock method belongs to.  Must be\n  // called after RegisterOwner() or SetOwnerAndName() has been\n  // called.\n  const void* MockObject() const\n      GTEST_LOCK_EXCLUDED_(g_gmock_mutex);\n\n  // Returns the name of this mock method.  Must be called after\n  // SetOwnerAndName() has been called.\n  const char* Name() const\n      GTEST_LOCK_EXCLUDED_(g_gmock_mutex);\n\n  // Returns the result of invoking this mock function with the given\n  // arguments.  This function can be safely called from multiple\n  // threads concurrently.  The caller is responsible for deleting the\n  // result.\n  UntypedActionResultHolderBase* UntypedInvokeWith(void* untyped_args)\n      GTEST_LOCK_EXCLUDED_(g_gmock_mutex);\n\n protected:\n  typedef std::vector<const void*> UntypedOnCallSpecs;\n\n  using UntypedExpectations = std::vector<std::shared_ptr<ExpectationBase>>;\n\n  // Returns an Expectation object that references and co-owns exp,\n  // which must be an expectation on this mock function.\n  Expectation GetHandleOf(ExpectationBase* exp);\n\n  // Address of the mock object this mock method belongs to.  Only\n  // valid after this mock method has been called or\n  // ON_CALL/EXPECT_CALL has been invoked on it.\n  const void* mock_obj_;  // Protected by g_gmock_mutex.\n\n  // Name of the function being mocked.  Only valid after this mock\n  // method has been called.\n  const char* name_;  // Protected by g_gmock_mutex.\n\n  // All default action specs for this function mocker.\n  UntypedOnCallSpecs untyped_on_call_specs_;\n\n  // All expectations for this function mocker.\n  //\n  // It's undefined behavior to interleave expectations (EXPECT_CALLs\n  // or ON_CALLs) and mock function calls.  Also, the order of\n  // expectations is important.  Therefore it's a logic race condition\n  // to read/write untyped_expectations_ concurrently.  In order for\n  // tools like tsan to catch concurrent read/write accesses to\n  // untyped_expectations, we deliberately leave accesses to it\n  // unprotected.\n  UntypedExpectations untyped_expectations_;\n};  // class UntypedFunctionMockerBase\n\n// Untyped base class for OnCallSpec<F>.\nclass UntypedOnCallSpecBase {\n public:\n  // The arguments are the location of the ON_CALL() statement.\n  UntypedOnCallSpecBase(const char* a_file, int a_line)\n      : file_(a_file), line_(a_line), last_clause_(kNone) {}\n\n  // Where in the source file was the default action spec defined?\n  const char* file() const { return file_; }\n  int line() const { return line_; }\n\n protected:\n  // Gives each clause in the ON_CALL() statement a name.\n  enum Clause {\n    // Do not change the order of the enum members!  The run-time\n    // syntax checking relies on it.\n    kNone,\n    kWith,\n    kWillByDefault\n  };\n\n  // Asserts that the ON_CALL() statement has a certain property.\n  void AssertSpecProperty(bool property,\n                          const std::string& failure_message) const {\n    Assert(property, file_, line_, failure_message);\n  }\n\n  // Expects that the ON_CALL() statement has a certain property.\n  void ExpectSpecProperty(bool property,\n                          const std::string& failure_message) const {\n    Expect(property, file_, line_, failure_message);\n  }\n\n  const char* file_;\n  int line_;\n\n  // The last clause in the ON_CALL() statement as seen so far.\n  // Initially kNone and changes as the statement is parsed.\n  Clause last_clause_;\n};  // class UntypedOnCallSpecBase\n\n// This template class implements an ON_CALL spec.\ntemplate <typename F>\nclass OnCallSpec : public UntypedOnCallSpecBase {\n public:\n  typedef typename Function<F>::ArgumentTuple ArgumentTuple;\n  typedef typename Function<F>::ArgumentMatcherTuple ArgumentMatcherTuple;\n\n  // Constructs an OnCallSpec object from the information inside\n  // the parenthesis of an ON_CALL() statement.\n  OnCallSpec(const char* a_file, int a_line,\n             const ArgumentMatcherTuple& matchers)\n      : UntypedOnCallSpecBase(a_file, a_line),\n        matchers_(matchers),\n        // By default, extra_matcher_ should match anything.  However,\n        // we cannot initialize it with _ as that causes ambiguity between\n        // Matcher's copy and move constructor for some argument types.\n        extra_matcher_(A<const ArgumentTuple&>()) {}\n\n  // Implements the .With() clause.\n  OnCallSpec& With(const Matcher<const ArgumentTuple&>& m) {\n    // Makes sure this is called at most once.\n    ExpectSpecProperty(last_clause_ < kWith,\n                       \".With() cannot appear \"\n                       \"more than once in an ON_CALL().\");\n    last_clause_ = kWith;\n\n    extra_matcher_ = m;\n    return *this;\n  }\n\n  // Implements the .WillByDefault() clause.\n  OnCallSpec& WillByDefault(const Action<F>& action) {\n    ExpectSpecProperty(last_clause_ < kWillByDefault,\n                       \".WillByDefault() must appear \"\n                       \"exactly once in an ON_CALL().\");\n    last_clause_ = kWillByDefault;\n\n    ExpectSpecProperty(!action.IsDoDefault(),\n                       \"DoDefault() cannot be used in ON_CALL().\");\n    action_ = action;\n    return *this;\n  }\n\n  // Returns true iff the given arguments match the matchers.\n  bool Matches(const ArgumentTuple& args) const {\n    return TupleMatches(matchers_, args) && extra_matcher_.Matches(args);\n  }\n\n  // Returns the action specified by the user.\n  const Action<F>& GetAction() const {\n    AssertSpecProperty(last_clause_ == kWillByDefault,\n                       \".WillByDefault() must appear exactly \"\n                       \"once in an ON_CALL().\");\n    return action_;\n  }\n\n private:\n  // The information in statement\n  //\n  //   ON_CALL(mock_object, Method(matchers))\n  //       .With(multi-argument-matcher)\n  //       .WillByDefault(action);\n  //\n  // is recorded in the data members like this:\n  //\n  //   source file that contains the statement => file_\n  //   line number of the statement            => line_\n  //   matchers                                => matchers_\n  //   multi-argument-matcher                  => extra_matcher_\n  //   action                                  => action_\n  ArgumentMatcherTuple matchers_;\n  Matcher<const ArgumentTuple&> extra_matcher_;\n  Action<F> action_;\n};  // class OnCallSpec\n\n// Possible reactions on uninteresting calls.\nenum CallReaction {\n  kAllow,\n  kWarn,\n  kFail,\n};\n\n}  // namespace internal\n\n// Utilities for manipulating mock objects.\nclass GTEST_API_ Mock {\n public:\n  // The following public methods can be called concurrently.\n\n  // Tells Google Mock to ignore mock_obj when checking for leaked\n  // mock objects.\n  static void AllowLeak(const void* mock_obj)\n      GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex);\n\n  // Verifies and clears all expectations on the given mock object.\n  // If the expectations aren't satisfied, generates one or more\n  // Google Test non-fatal failures and returns false.\n  static bool VerifyAndClearExpectations(void* mock_obj)\n      GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex);\n\n  // Verifies all expectations on the given mock object and clears its\n  // default actions and expectations.  Returns true iff the\n  // verification was successful.\n  static bool VerifyAndClear(void* mock_obj)\n      GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex);\n\n  // Returns whether the mock was created as a naggy mock (default)\n  static bool IsNaggy(void* mock_obj)\n      GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex);\n  // Returns whether the mock was created as a nice mock\n  static bool IsNice(void* mock_obj)\n      GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex);\n  // Returns whether the mock was created as a strict mock\n  static bool IsStrict(void* mock_obj)\n      GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex);\n\n private:\n  friend class internal::UntypedFunctionMockerBase;\n\n  // Needed for a function mocker to register itself (so that we know\n  // how to clear a mock object).\n  template <typename F>\n  friend class internal::FunctionMocker;\n\n  template <typename M>\n  friend class NiceMock;\n\n  template <typename M>\n  friend class NaggyMock;\n\n  template <typename M>\n  friend class StrictMock;\n\n  // Tells Google Mock to allow uninteresting calls on the given mock\n  // object.\n  static void AllowUninterestingCalls(const void* mock_obj)\n      GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex);\n\n  // Tells Google Mock to warn the user about uninteresting calls on\n  // the given mock object.\n  static void WarnUninterestingCalls(const void* mock_obj)\n      GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex);\n\n  // Tells Google Mock to fail uninteresting calls on the given mock\n  // object.\n  static void FailUninterestingCalls(const void* mock_obj)\n      GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex);\n\n  // Tells Google Mock the given mock object is being destroyed and\n  // its entry in the call-reaction table should be removed.\n  static void UnregisterCallReaction(const void* mock_obj)\n      GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex);\n\n  // Returns the reaction Google Mock will have on uninteresting calls\n  // made on the given mock object.\n  static internal::CallReaction GetReactionOnUninterestingCalls(\n      const void* mock_obj)\n          GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex);\n\n  // Verifies that all expectations on the given mock object have been\n  // satisfied.  Reports one or more Google Test non-fatal failures\n  // and returns false if not.\n  static bool VerifyAndClearExpectationsLocked(void* mock_obj)\n      GTEST_EXCLUSIVE_LOCK_REQUIRED_(internal::g_gmock_mutex);\n\n  // Clears all ON_CALL()s set on the given mock object.\n  static void ClearDefaultActionsLocked(void* mock_obj)\n      GTEST_EXCLUSIVE_LOCK_REQUIRED_(internal::g_gmock_mutex);\n\n  // Registers a mock object and a mock method it owns.\n  static void Register(\n      const void* mock_obj,\n      internal::UntypedFunctionMockerBase* mocker)\n          GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex);\n\n  // Tells Google Mock where in the source code mock_obj is used in an\n  // ON_CALL or EXPECT_CALL.  In case mock_obj is leaked, this\n  // information helps the user identify which object it is.\n  static void RegisterUseByOnCallOrExpectCall(\n      const void* mock_obj, const char* file, int line)\n          GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex);\n\n  // Unregisters a mock method; removes the owning mock object from\n  // the registry when the last mock method associated with it has\n  // been unregistered.  This is called only in the destructor of\n  // FunctionMocker.\n  static void UnregisterLocked(internal::UntypedFunctionMockerBase* mocker)\n      GTEST_EXCLUSIVE_LOCK_REQUIRED_(internal::g_gmock_mutex);\n};  // class Mock\n\n// An abstract handle of an expectation.  Useful in the .After()\n// clause of EXPECT_CALL() for setting the (partial) order of\n// expectations.  The syntax:\n//\n//   Expectation e1 = EXPECT_CALL(...)...;\n//   EXPECT_CALL(...).After(e1)...;\n//\n// sets two expectations where the latter can only be matched after\n// the former has been satisfied.\n//\n// Notes:\n//   - This class is copyable and has value semantics.\n//   - Constness is shallow: a const Expectation object itself cannot\n//     be modified, but the mutable methods of the ExpectationBase\n//     object it references can be called via expectation_base().\n\nclass GTEST_API_ Expectation {\n public:\n  // Constructs a null object that doesn't reference any expectation.\n  Expectation();\n\n  ~Expectation();\n\n  // This single-argument ctor must not be explicit, in order to support the\n  //   Expectation e = EXPECT_CALL(...);\n  // syntax.\n  //\n  // A TypedExpectation object stores its pre-requisites as\n  // Expectation objects, and needs to call the non-const Retire()\n  // method on the ExpectationBase objects they reference.  Therefore\n  // Expectation must receive a *non-const* reference to the\n  // ExpectationBase object.\n  Expectation(internal::ExpectationBase& exp);  // NOLINT\n\n  // The compiler-generated copy ctor and operator= work exactly as\n  // intended, so we don't need to define our own.\n\n  // Returns true iff rhs references the same expectation as this object does.\n  bool operator==(const Expectation& rhs) const {\n    return expectation_base_ == rhs.expectation_base_;\n  }\n\n  bool operator!=(const Expectation& rhs) const { return !(*this == rhs); }\n\n private:\n  friend class ExpectationSet;\n  friend class Sequence;\n  friend class ::testing::internal::ExpectationBase;\n  friend class ::testing::internal::UntypedFunctionMockerBase;\n\n  template <typename F>\n  friend class ::testing::internal::FunctionMocker;\n\n  template <typename F>\n  friend class ::testing::internal::TypedExpectation;\n\n  // This comparator is needed for putting Expectation objects into a set.\n  class Less {\n   public:\n    bool operator()(const Expectation& lhs, const Expectation& rhs) const {\n      return lhs.expectation_base_.get() < rhs.expectation_base_.get();\n    }\n  };\n\n  typedef ::std::set<Expectation, Less> Set;\n\n  Expectation(\n      const std::shared_ptr<internal::ExpectationBase>& expectation_base);\n\n  // Returns the expectation this object references.\n  const std::shared_ptr<internal::ExpectationBase>& expectation_base() const {\n    return expectation_base_;\n  }\n\n  // A shared_ptr that co-owns the expectation this handle references.\n  std::shared_ptr<internal::ExpectationBase> expectation_base_;\n};\n\n// A set of expectation handles.  Useful in the .After() clause of\n// EXPECT_CALL() for setting the (partial) order of expectations.  The\n// syntax:\n//\n//   ExpectationSet es;\n//   es += EXPECT_CALL(...)...;\n//   es += EXPECT_CALL(...)...;\n//   EXPECT_CALL(...).After(es)...;\n//\n// sets three expectations where the last one can only be matched\n// after the first two have both been satisfied.\n//\n// This class is copyable and has value semantics.\nclass ExpectationSet {\n public:\n  // A bidirectional iterator that can read a const element in the set.\n  typedef Expectation::Set::const_iterator const_iterator;\n\n  // An object stored in the set.  This is an alias of Expectation.\n  typedef Expectation::Set::value_type value_type;\n\n  // Constructs an empty set.\n  ExpectationSet() {}\n\n  // This single-argument ctor must not be explicit, in order to support the\n  //   ExpectationSet es = EXPECT_CALL(...);\n  // syntax.\n  ExpectationSet(internal::ExpectationBase& exp) {  // NOLINT\n    *this += Expectation(exp);\n  }\n\n  // This single-argument ctor implements implicit conversion from\n  // Expectation and thus must not be explicit.  This allows either an\n  // Expectation or an ExpectationSet to be used in .After().\n  ExpectationSet(const Expectation& e) {  // NOLINT\n    *this += e;\n  }\n\n  // The compiler-generator ctor and operator= works exactly as\n  // intended, so we don't need to define our own.\n\n  // Returns true iff rhs contains the same set of Expectation objects\n  // as this does.\n  bool operator==(const ExpectationSet& rhs) const {\n    return expectations_ == rhs.expectations_;\n  }\n\n  bool operator!=(const ExpectationSet& rhs) const { return !(*this == rhs); }\n\n  // Implements the syntax\n  //   expectation_set += EXPECT_CALL(...);\n  ExpectationSet& operator+=(const Expectation& e) {\n    expectations_.insert(e);\n    return *this;\n  }\n\n  int size() const { return static_cast<int>(expectations_.size()); }\n\n  const_iterator begin() const { return expectations_.begin(); }\n  const_iterator end() const { return expectations_.end(); }\n\n private:\n  Expectation::Set expectations_;\n};\n\n\n// Sequence objects are used by a user to specify the relative order\n// in which the expectations should match.  They are copyable (we rely\n// on the compiler-defined copy constructor and assignment operator).\nclass GTEST_API_ Sequence {\n public:\n  // Constructs an empty sequence.\n  Sequence() : last_expectation_(new Expectation) {}\n\n  // Adds an expectation to this sequence.  The caller must ensure\n  // that no other thread is accessing this Sequence object.\n  void AddExpectation(const Expectation& expectation) const;\n\n private:\n  // The last expectation in this sequence.\n  std::shared_ptr<Expectation> last_expectation_;\n};  // class Sequence\n\n// An object of this type causes all EXPECT_CALL() statements\n// encountered in its scope to be put in an anonymous sequence.  The\n// work is done in the constructor and destructor.  You should only\n// create an InSequence object on the stack.\n//\n// The sole purpose for this class is to support easy definition of\n// sequential expectations, e.g.\n//\n//   {\n//     InSequence dummy;  // The name of the object doesn't matter.\n//\n//     // The following expectations must match in the order they appear.\n//     EXPECT_CALL(a, Bar())...;\n//     EXPECT_CALL(a, Baz())...;\n//     ...\n//     EXPECT_CALL(b, Xyz())...;\n//   }\n//\n// You can create InSequence objects in multiple threads, as long as\n// they are used to affect different mock objects.  The idea is that\n// each thread can create and set up its own mocks as if it's the only\n// thread.  However, for clarity of your tests we recommend you to set\n// up mocks in the main thread unless you have a good reason not to do\n// so.\nclass GTEST_API_ InSequence {\n public:\n  InSequence();\n  ~InSequence();\n private:\n  bool sequence_created_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(InSequence);  // NOLINT\n} GTEST_ATTRIBUTE_UNUSED_;\n\nnamespace internal {\n\n// Points to the implicit sequence introduced by a living InSequence\n// object (if any) in the current thread or NULL.\nGTEST_API_ extern ThreadLocal<Sequence*> g_gmock_implicit_sequence;\n\n// Base class for implementing expectations.\n//\n// There are two reasons for having a type-agnostic base class for\n// Expectation:\n//\n//   1. We need to store collections of expectations of different\n//   types (e.g. all pre-requisites of a particular expectation, all\n//   expectations in a sequence).  Therefore these expectation objects\n//   must share a common base class.\n//\n//   2. We can avoid binary code bloat by moving methods not depending\n//   on the template argument of Expectation to the base class.\n//\n// This class is internal and mustn't be used by user code directly.\nclass GTEST_API_ ExpectationBase {\n public:\n  // source_text is the EXPECT_CALL(...) source that created this Expectation.\n  ExpectationBase(const char* file, int line, const std::string& source_text);\n\n  virtual ~ExpectationBase();\n\n  // Where in the source file was the expectation spec defined?\n  const char* file() const { return file_; }\n  int line() const { return line_; }\n  const char* source_text() const { return source_text_.c_str(); }\n  // Returns the cardinality specified in the expectation spec.\n  const Cardinality& cardinality() const { return cardinality_; }\n\n  // Describes the source file location of this expectation.\n  void DescribeLocationTo(::std::ostream* os) const {\n    *os << FormatFileLocation(file(), line()) << \" \";\n  }\n\n  // Describes how many times a function call matching this\n  // expectation has occurred.\n  void DescribeCallCountTo(::std::ostream* os) const\n      GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex);\n\n  // If this mock method has an extra matcher (i.e. .With(matcher)),\n  // describes it to the ostream.\n  virtual void MaybeDescribeExtraMatcherTo(::std::ostream* os) = 0;\n\n protected:\n  friend class ::testing::Expectation;\n  friend class UntypedFunctionMockerBase;\n\n  enum Clause {\n    // Don't change the order of the enum members!\n    kNone,\n    kWith,\n    kTimes,\n    kInSequence,\n    kAfter,\n    kWillOnce,\n    kWillRepeatedly,\n    kRetiresOnSaturation\n  };\n\n  typedef std::vector<const void*> UntypedActions;\n\n  // Returns an Expectation object that references and co-owns this\n  // expectation.\n  virtual Expectation GetHandle() = 0;\n\n  // Asserts that the EXPECT_CALL() statement has the given property.\n  void AssertSpecProperty(bool property,\n                          const std::string& failure_message) const {\n    Assert(property, file_, line_, failure_message);\n  }\n\n  // Expects that the EXPECT_CALL() statement has the given property.\n  void ExpectSpecProperty(bool property,\n                          const std::string& failure_message) const {\n    Expect(property, file_, line_, failure_message);\n  }\n\n  // Explicitly specifies the cardinality of this expectation.  Used\n  // by the subclasses to implement the .Times() clause.\n  void SpecifyCardinality(const Cardinality& cardinality);\n\n  // Returns true iff the user specified the cardinality explicitly\n  // using a .Times().\n  bool cardinality_specified() const { return cardinality_specified_; }\n\n  // Sets the cardinality of this expectation spec.\n  void set_cardinality(const Cardinality& a_cardinality) {\n    cardinality_ = a_cardinality;\n  }\n\n  // The following group of methods should only be called after the\n  // EXPECT_CALL() statement, and only when g_gmock_mutex is held by\n  // the current thread.\n\n  // Retires all pre-requisites of this expectation.\n  void RetireAllPreRequisites()\n      GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex);\n\n  // Returns true iff this expectation is retired.\n  bool is_retired() const\n      GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {\n    g_gmock_mutex.AssertHeld();\n    return retired_;\n  }\n\n  // Retires this expectation.\n  void Retire()\n      GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {\n    g_gmock_mutex.AssertHeld();\n    retired_ = true;\n  }\n\n  // Returns true iff this expectation is satisfied.\n  bool IsSatisfied() const\n      GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {\n    g_gmock_mutex.AssertHeld();\n    return cardinality().IsSatisfiedByCallCount(call_count_);\n  }\n\n  // Returns true iff this expectation is saturated.\n  bool IsSaturated() const\n      GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {\n    g_gmock_mutex.AssertHeld();\n    return cardinality().IsSaturatedByCallCount(call_count_);\n  }\n\n  // Returns true iff this expectation is over-saturated.\n  bool IsOverSaturated() const\n      GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {\n    g_gmock_mutex.AssertHeld();\n    return cardinality().IsOverSaturatedByCallCount(call_count_);\n  }\n\n  // Returns true iff all pre-requisites of this expectation are satisfied.\n  bool AllPrerequisitesAreSatisfied() const\n      GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex);\n\n  // Adds unsatisfied pre-requisites of this expectation to 'result'.\n  void FindUnsatisfiedPrerequisites(ExpectationSet* result) const\n      GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex);\n\n  // Returns the number this expectation has been invoked.\n  int call_count() const\n      GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {\n    g_gmock_mutex.AssertHeld();\n    return call_count_;\n  }\n\n  // Increments the number this expectation has been invoked.\n  void IncrementCallCount()\n      GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {\n    g_gmock_mutex.AssertHeld();\n    call_count_++;\n  }\n\n  // Checks the action count (i.e. the number of WillOnce() and\n  // WillRepeatedly() clauses) against the cardinality if this hasn't\n  // been done before.  Prints a warning if there are too many or too\n  // few actions.\n  void CheckActionCountIfNotDone() const\n      GTEST_LOCK_EXCLUDED_(mutex_);\n\n  friend class ::testing::Sequence;\n  friend class ::testing::internal::ExpectationTester;\n\n  template <typename Function>\n  friend class TypedExpectation;\n\n  // Implements the .Times() clause.\n  void UntypedTimes(const Cardinality& a_cardinality);\n\n  // This group of fields are part of the spec and won't change after\n  // an EXPECT_CALL() statement finishes.\n  const char* file_;          // The file that contains the expectation.\n  int line_;                  // The line number of the expectation.\n  const std::string source_text_;  // The EXPECT_CALL(...) source text.\n  // True iff the cardinality is specified explicitly.\n  bool cardinality_specified_;\n  Cardinality cardinality_;            // The cardinality of the expectation.\n  // The immediate pre-requisites (i.e. expectations that must be\n  // satisfied before this expectation can be matched) of this\n  // expectation.  We use std::shared_ptr in the set because we want an\n  // Expectation object to be co-owned by its FunctionMocker and its\n  // successors.  This allows multiple mock objects to be deleted at\n  // different times.\n  ExpectationSet immediate_prerequisites_;\n\n  // This group of fields are the current state of the expectation,\n  // and can change as the mock function is called.\n  int call_count_;  // How many times this expectation has been invoked.\n  bool retired_;    // True iff this expectation has retired.\n  UntypedActions untyped_actions_;\n  bool extra_matcher_specified_;\n  bool repeated_action_specified_;  // True if a WillRepeatedly() was specified.\n  bool retires_on_saturation_;\n  Clause last_clause_;\n  mutable bool action_count_checked_;  // Under mutex_.\n  mutable Mutex mutex_;  // Protects action_count_checked_.\n\n  GTEST_DISALLOW_ASSIGN_(ExpectationBase);\n};  // class ExpectationBase\n\n// Impements an expectation for the given function type.\ntemplate <typename F>\nclass TypedExpectation : public ExpectationBase {\n public:\n  typedef typename Function<F>::ArgumentTuple ArgumentTuple;\n  typedef typename Function<F>::ArgumentMatcherTuple ArgumentMatcherTuple;\n  typedef typename Function<F>::Result Result;\n\n  TypedExpectation(FunctionMocker<F>* owner, const char* a_file, int a_line,\n                   const std::string& a_source_text,\n                   const ArgumentMatcherTuple& m)\n      : ExpectationBase(a_file, a_line, a_source_text),\n        owner_(owner),\n        matchers_(m),\n        // By default, extra_matcher_ should match anything.  However,\n        // we cannot initialize it with _ as that causes ambiguity between\n        // Matcher's copy and move constructor for some argument types.\n        extra_matcher_(A<const ArgumentTuple&>()),\n        repeated_action_(DoDefault()) {}\n\n  ~TypedExpectation() override {\n    // Check the validity of the action count if it hasn't been done\n    // yet (for example, if the expectation was never used).\n    CheckActionCountIfNotDone();\n    for (UntypedActions::const_iterator it = untyped_actions_.begin();\n         it != untyped_actions_.end(); ++it) {\n      delete static_cast<const Action<F>*>(*it);\n    }\n  }\n\n  // Implements the .With() clause.\n  TypedExpectation& With(const Matcher<const ArgumentTuple&>& m) {\n    if (last_clause_ == kWith) {\n      ExpectSpecProperty(false,\n                         \".With() cannot appear \"\n                         \"more than once in an EXPECT_CALL().\");\n    } else {\n      ExpectSpecProperty(last_clause_ < kWith,\n                         \".With() must be the first \"\n                         \"clause in an EXPECT_CALL().\");\n    }\n    last_clause_ = kWith;\n\n    extra_matcher_ = m;\n    extra_matcher_specified_ = true;\n    return *this;\n  }\n\n  // Implements the .Times() clause.\n  TypedExpectation& Times(const Cardinality& a_cardinality) {\n    ExpectationBase::UntypedTimes(a_cardinality);\n    return *this;\n  }\n\n  // Implements the .Times() clause.\n  TypedExpectation& Times(int n) {\n    return Times(Exactly(n));\n  }\n\n  // Implements the .InSequence() clause.\n  TypedExpectation& InSequence(const Sequence& s) {\n    ExpectSpecProperty(last_clause_ <= kInSequence,\n                       \".InSequence() cannot appear after .After(),\"\n                       \" .WillOnce(), .WillRepeatedly(), or \"\n                       \".RetiresOnSaturation().\");\n    last_clause_ = kInSequence;\n\n    s.AddExpectation(GetHandle());\n    return *this;\n  }\n  TypedExpectation& InSequence(const Sequence& s1, const Sequence& s2) {\n    return InSequence(s1).InSequence(s2);\n  }\n  TypedExpectation& InSequence(const Sequence& s1, const Sequence& s2,\n                               const Sequence& s3) {\n    return InSequence(s1, s2).InSequence(s3);\n  }\n  TypedExpectation& InSequence(const Sequence& s1, const Sequence& s2,\n                               const Sequence& s3, const Sequence& s4) {\n    return InSequence(s1, s2, s3).InSequence(s4);\n  }\n  TypedExpectation& InSequence(const Sequence& s1, const Sequence& s2,\n                               const Sequence& s3, const Sequence& s4,\n                               const Sequence& s5) {\n    return InSequence(s1, s2, s3, s4).InSequence(s5);\n  }\n\n  // Implements that .After() clause.\n  TypedExpectation& After(const ExpectationSet& s) {\n    ExpectSpecProperty(last_clause_ <= kAfter,\n                       \".After() cannot appear after .WillOnce(),\"\n                       \" .WillRepeatedly(), or \"\n                       \".RetiresOnSaturation().\");\n    last_clause_ = kAfter;\n\n    for (ExpectationSet::const_iterator it = s.begin(); it != s.end(); ++it) {\n      immediate_prerequisites_ += *it;\n    }\n    return *this;\n  }\n  TypedExpectation& After(const ExpectationSet& s1, const ExpectationSet& s2) {\n    return After(s1).After(s2);\n  }\n  TypedExpectation& After(const ExpectationSet& s1, const ExpectationSet& s2,\n                          const ExpectationSet& s3) {\n    return After(s1, s2).After(s3);\n  }\n  TypedExpectation& After(const ExpectationSet& s1, const ExpectationSet& s2,\n                          const ExpectationSet& s3, const ExpectationSet& s4) {\n    return After(s1, s2, s3).After(s4);\n  }\n  TypedExpectation& After(const ExpectationSet& s1, const ExpectationSet& s2,\n                          const ExpectationSet& s3, const ExpectationSet& s4,\n                          const ExpectationSet& s5) {\n    return After(s1, s2, s3, s4).After(s5);\n  }\n\n  // Implements the .WillOnce() clause.\n  TypedExpectation& WillOnce(const Action<F>& action) {\n    ExpectSpecProperty(last_clause_ <= kWillOnce,\n                       \".WillOnce() cannot appear after \"\n                       \".WillRepeatedly() or .RetiresOnSaturation().\");\n    last_clause_ = kWillOnce;\n\n    untyped_actions_.push_back(new Action<F>(action));\n    if (!cardinality_specified()) {\n      set_cardinality(Exactly(static_cast<int>(untyped_actions_.size())));\n    }\n    return *this;\n  }\n\n  // Implements the .WillRepeatedly() clause.\n  TypedExpectation& WillRepeatedly(const Action<F>& action) {\n    if (last_clause_ == kWillRepeatedly) {\n      ExpectSpecProperty(false,\n                         \".WillRepeatedly() cannot appear \"\n                         \"more than once in an EXPECT_CALL().\");\n    } else {\n      ExpectSpecProperty(last_clause_ < kWillRepeatedly,\n                         \".WillRepeatedly() cannot appear \"\n                         \"after .RetiresOnSaturation().\");\n    }\n    last_clause_ = kWillRepeatedly;\n    repeated_action_specified_ = true;\n\n    repeated_action_ = action;\n    if (!cardinality_specified()) {\n      set_cardinality(AtLeast(static_cast<int>(untyped_actions_.size())));\n    }\n\n    // Now that no more action clauses can be specified, we check\n    // whether their count makes sense.\n    CheckActionCountIfNotDone();\n    return *this;\n  }\n\n  // Implements the .RetiresOnSaturation() clause.\n  TypedExpectation& RetiresOnSaturation() {\n    ExpectSpecProperty(last_clause_ < kRetiresOnSaturation,\n                       \".RetiresOnSaturation() cannot appear \"\n                       \"more than once.\");\n    last_clause_ = kRetiresOnSaturation;\n    retires_on_saturation_ = true;\n\n    // Now that no more action clauses can be specified, we check\n    // whether their count makes sense.\n    CheckActionCountIfNotDone();\n    return *this;\n  }\n\n  // Returns the matchers for the arguments as specified inside the\n  // EXPECT_CALL() macro.\n  const ArgumentMatcherTuple& matchers() const {\n    return matchers_;\n  }\n\n  // Returns the matcher specified by the .With() clause.\n  const Matcher<const ArgumentTuple&>& extra_matcher() const {\n    return extra_matcher_;\n  }\n\n  // Returns the action specified by the .WillRepeatedly() clause.\n  const Action<F>& repeated_action() const { return repeated_action_; }\n\n  // If this mock method has an extra matcher (i.e. .With(matcher)),\n  // describes it to the ostream.\n  void MaybeDescribeExtraMatcherTo(::std::ostream* os) override {\n    if (extra_matcher_specified_) {\n      *os << \"    Expected args: \";\n      extra_matcher_.DescribeTo(os);\n      *os << \"\\n\";\n    }\n  }\n\n private:\n  template <typename Function>\n  friend class FunctionMocker;\n\n  // Returns an Expectation object that references and co-owns this\n  // expectation.\n  Expectation GetHandle() override { return owner_->GetHandleOf(this); }\n\n  // The following methods will be called only after the EXPECT_CALL()\n  // statement finishes and when the current thread holds\n  // g_gmock_mutex.\n\n  // Returns true iff this expectation matches the given arguments.\n  bool Matches(const ArgumentTuple& args) const\n      GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {\n    g_gmock_mutex.AssertHeld();\n    return TupleMatches(matchers_, args) && extra_matcher_.Matches(args);\n  }\n\n  // Returns true iff this expectation should handle the given arguments.\n  bool ShouldHandleArguments(const ArgumentTuple& args) const\n      GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {\n    g_gmock_mutex.AssertHeld();\n\n    // In case the action count wasn't checked when the expectation\n    // was defined (e.g. if this expectation has no WillRepeatedly()\n    // or RetiresOnSaturation() clause), we check it when the\n    // expectation is used for the first time.\n    CheckActionCountIfNotDone();\n    return !is_retired() && AllPrerequisitesAreSatisfied() && Matches(args);\n  }\n\n  // Describes the result of matching the arguments against this\n  // expectation to the given ostream.\n  void ExplainMatchResultTo(\n      const ArgumentTuple& args,\n      ::std::ostream* os) const\n          GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {\n    g_gmock_mutex.AssertHeld();\n\n    if (is_retired()) {\n      *os << \"         Expected: the expectation is active\\n\"\n          << \"           Actual: it is retired\\n\";\n    } else if (!Matches(args)) {\n      if (!TupleMatches(matchers_, args)) {\n        ExplainMatchFailureTupleTo(matchers_, args, os);\n      }\n      StringMatchResultListener listener;\n      if (!extra_matcher_.MatchAndExplain(args, &listener)) {\n        *os << \"    Expected args: \";\n        extra_matcher_.DescribeTo(os);\n        *os << \"\\n           Actual: don't match\";\n\n        internal::PrintIfNotEmpty(listener.str(), os);\n        *os << \"\\n\";\n      }\n    } else if (!AllPrerequisitesAreSatisfied()) {\n      *os << \"         Expected: all pre-requisites are satisfied\\n\"\n          << \"           Actual: the following immediate pre-requisites \"\n          << \"are not satisfied:\\n\";\n      ExpectationSet unsatisfied_prereqs;\n      FindUnsatisfiedPrerequisites(&unsatisfied_prereqs);\n      int i = 0;\n      for (ExpectationSet::const_iterator it = unsatisfied_prereqs.begin();\n           it != unsatisfied_prereqs.end(); ++it) {\n        it->expectation_base()->DescribeLocationTo(os);\n        *os << \"pre-requisite #\" << i++ << \"\\n\";\n      }\n      *os << \"                   (end of pre-requisites)\\n\";\n    } else {\n      // This line is here just for completeness' sake.  It will never\n      // be executed as currently the ExplainMatchResultTo() function\n      // is called only when the mock function call does NOT match the\n      // expectation.\n      *os << \"The call matches the expectation.\\n\";\n    }\n  }\n\n  // Returns the action that should be taken for the current invocation.\n  const Action<F>& GetCurrentAction(const FunctionMocker<F>* mocker,\n                                    const ArgumentTuple& args) const\n      GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {\n    g_gmock_mutex.AssertHeld();\n    const int count = call_count();\n    Assert(count >= 1, __FILE__, __LINE__,\n           \"call_count() is <= 0 when GetCurrentAction() is \"\n           \"called - this should never happen.\");\n\n    const int action_count = static_cast<int>(untyped_actions_.size());\n    if (action_count > 0 && !repeated_action_specified_ &&\n        count > action_count) {\n      // If there is at least one WillOnce() and no WillRepeatedly(),\n      // we warn the user when the WillOnce() clauses ran out.\n      ::std::stringstream ss;\n      DescribeLocationTo(&ss);\n      ss << \"Actions ran out in \" << source_text() << \"...\\n\"\n         << \"Called \" << count << \" times, but only \"\n         << action_count << \" WillOnce()\"\n         << (action_count == 1 ? \" is\" : \"s are\") << \" specified - \";\n      mocker->DescribeDefaultActionTo(args, &ss);\n      Log(kWarning, ss.str(), 1);\n    }\n\n    return count <= action_count\n               ? *static_cast<const Action<F>*>(\n                     untyped_actions_[static_cast<size_t>(count - 1)])\n               : repeated_action();\n  }\n\n  // Given the arguments of a mock function call, if the call will\n  // over-saturate this expectation, returns the default action;\n  // otherwise, returns the next action in this expectation.  Also\n  // describes *what* happened to 'what', and explains *why* Google\n  // Mock does it to 'why'.  This method is not const as it calls\n  // IncrementCallCount().  A return value of NULL means the default\n  // action.\n  const Action<F>* GetActionForArguments(const FunctionMocker<F>* mocker,\n                                         const ArgumentTuple& args,\n                                         ::std::ostream* what,\n                                         ::std::ostream* why)\n      GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {\n    g_gmock_mutex.AssertHeld();\n    if (IsSaturated()) {\n      // We have an excessive call.\n      IncrementCallCount();\n      *what << \"Mock function called more times than expected - \";\n      mocker->DescribeDefaultActionTo(args, what);\n      DescribeCallCountTo(why);\n\n      return nullptr;\n    }\n\n    IncrementCallCount();\n    RetireAllPreRequisites();\n\n    if (retires_on_saturation_ && IsSaturated()) {\n      Retire();\n    }\n\n    // Must be done after IncrementCount()!\n    *what << \"Mock function call matches \" << source_text() <<\"...\\n\";\n    return &(GetCurrentAction(mocker, args));\n  }\n\n  // All the fields below won't change once the EXPECT_CALL()\n  // statement finishes.\n  FunctionMocker<F>* const owner_;\n  ArgumentMatcherTuple matchers_;\n  Matcher<const ArgumentTuple&> extra_matcher_;\n  Action<F> repeated_action_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(TypedExpectation);\n};  // class TypedExpectation\n\n// A MockSpec object is used by ON_CALL() or EXPECT_CALL() for\n// specifying the default behavior of, or expectation on, a mock\n// function.\n\n// Note: class MockSpec really belongs to the ::testing namespace.\n// However if we define it in ::testing, MSVC will complain when\n// classes in ::testing::internal declare it as a friend class\n// template.  To workaround this compiler bug, we define MockSpec in\n// ::testing::internal and import it into ::testing.\n\n// Logs a message including file and line number information.\nGTEST_API_ void LogWithLocation(testing::internal::LogSeverity severity,\n                                const char* file, int line,\n                                const std::string& message);\n\ntemplate <typename F>\nclass MockSpec {\n public:\n  typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;\n  typedef typename internal::Function<F>::ArgumentMatcherTuple\n      ArgumentMatcherTuple;\n\n  // Constructs a MockSpec object, given the function mocker object\n  // that the spec is associated with.\n  MockSpec(internal::FunctionMocker<F>* function_mocker,\n           const ArgumentMatcherTuple& matchers)\n      : function_mocker_(function_mocker), matchers_(matchers) {}\n\n  // Adds a new default action spec to the function mocker and returns\n  // the newly created spec.\n  internal::OnCallSpec<F>& InternalDefaultActionSetAt(\n      const char* file, int line, const char* obj, const char* call) {\n    LogWithLocation(internal::kInfo, file, line,\n                    std::string(\"ON_CALL(\") + obj + \", \" + call + \") invoked\");\n    return function_mocker_->AddNewOnCallSpec(file, line, matchers_);\n  }\n\n  // Adds a new expectation spec to the function mocker and returns\n  // the newly created spec.\n  internal::TypedExpectation<F>& InternalExpectedAt(\n      const char* file, int line, const char* obj, const char* call) {\n    const std::string source_text(std::string(\"EXPECT_CALL(\") + obj + \", \" +\n                                  call + \")\");\n    LogWithLocation(internal::kInfo, file, line, source_text + \" invoked\");\n    return function_mocker_->AddNewExpectation(\n        file, line, source_text, matchers_);\n  }\n\n  // This operator overload is used to swallow the superfluous parameter list\n  // introduced by the ON/EXPECT_CALL macros. See the macro comments for more\n  // explanation.\n  MockSpec<F>& operator()(const internal::WithoutMatchers&, void* const) {\n    return *this;\n  }\n\n private:\n  template <typename Function>\n  friend class internal::FunctionMocker;\n\n  // The function mocker that owns this spec.\n  internal::FunctionMocker<F>* const function_mocker_;\n  // The argument matchers specified in the spec.\n  ArgumentMatcherTuple matchers_;\n\n  GTEST_DISALLOW_ASSIGN_(MockSpec);\n};  // class MockSpec\n\n// Wrapper type for generically holding an ordinary value or lvalue reference.\n// If T is not a reference type, it must be copyable or movable.\n// ReferenceOrValueWrapper<T> is movable, and will also be copyable unless\n// T is a move-only value type (which means that it will always be copyable\n// if the current platform does not support move semantics).\n//\n// The primary template defines handling for values, but function header\n// comments describe the contract for the whole template (including\n// specializations).\ntemplate <typename T>\nclass ReferenceOrValueWrapper {\n public:\n  // Constructs a wrapper from the given value/reference.\n  explicit ReferenceOrValueWrapper(T value)\n      : value_(std::move(value)) {\n  }\n\n  // Unwraps and returns the underlying value/reference, exactly as\n  // originally passed. The behavior of calling this more than once on\n  // the same object is unspecified.\n  T Unwrap() { return std::move(value_); }\n\n  // Provides nondestructive access to the underlying value/reference.\n  // Always returns a const reference (more precisely,\n  // const RemoveReference<T>&). The behavior of calling this after\n  // calling Unwrap on the same object is unspecified.\n  const T& Peek() const {\n    return value_;\n  }\n\n private:\n  T value_;\n};\n\n// Specialization for lvalue reference types. See primary template\n// for documentation.\ntemplate <typename T>\nclass ReferenceOrValueWrapper<T&> {\n public:\n  // Workaround for debatable pass-by-reference lint warning (c-library-team\n  // policy precludes NOLINT in this context)\n  typedef T& reference;\n  explicit ReferenceOrValueWrapper(reference ref)\n      : value_ptr_(&ref) {}\n  T& Unwrap() { return *value_ptr_; }\n  const T& Peek() const { return *value_ptr_; }\n\n private:\n  T* value_ptr_;\n};\n\n// MSVC warns about using 'this' in base member initializer list, so\n// we need to temporarily disable the warning.  We have to do it for\n// the entire class to suppress the warning, even though it's about\n// the constructor only.\nGTEST_DISABLE_MSC_WARNINGS_PUSH_(4355)\n\n// C++ treats the void type specially.  For example, you cannot define\n// a void-typed variable or pass a void value to a function.\n// ActionResultHolder<T> holds a value of type T, where T must be a\n// copyable type or void (T doesn't need to be default-constructable).\n// It hides the syntactic difference between void and other types, and\n// is used to unify the code for invoking both void-returning and\n// non-void-returning mock functions.\n\n// Untyped base class for ActionResultHolder<T>.\nclass UntypedActionResultHolderBase {\n public:\n  virtual ~UntypedActionResultHolderBase() {}\n\n  // Prints the held value as an action's result to os.\n  virtual void PrintAsActionResult(::std::ostream* os) const = 0;\n};\n\n// This generic definition is used when T is not void.\ntemplate <typename T>\nclass ActionResultHolder : public UntypedActionResultHolderBase {\n public:\n  // Returns the held value. Must not be called more than once.\n  T Unwrap() {\n    return result_.Unwrap();\n  }\n\n  // Prints the held value as an action's result to os.\n  void PrintAsActionResult(::std::ostream* os) const override {\n    *os << \"\\n          Returns: \";\n    // T may be a reference type, so we don't use UniversalPrint().\n    UniversalPrinter<T>::Print(result_.Peek(), os);\n  }\n\n  // Performs the given mock function's default action and returns the\n  // result in a new-ed ActionResultHolder.\n  template <typename F>\n  static ActionResultHolder* PerformDefaultAction(\n      const FunctionMocker<F>* func_mocker,\n      typename Function<F>::ArgumentTuple&& args,\n      const std::string& call_description) {\n    return new ActionResultHolder(Wrapper(func_mocker->PerformDefaultAction(\n        std::move(args), call_description)));\n  }\n\n  // Performs the given action and returns the result in a new-ed\n  // ActionResultHolder.\n  template <typename F>\n  static ActionResultHolder* PerformAction(\n      const Action<F>& action, typename Function<F>::ArgumentTuple&& args) {\n    return new ActionResultHolder(\n        Wrapper(action.Perform(std::move(args))));\n  }\n\n private:\n  typedef ReferenceOrValueWrapper<T> Wrapper;\n\n  explicit ActionResultHolder(Wrapper result)\n      : result_(std::move(result)) {\n  }\n\n  Wrapper result_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(ActionResultHolder);\n};\n\n// Specialization for T = void.\ntemplate <>\nclass ActionResultHolder<void> : public UntypedActionResultHolderBase {\n public:\n  void Unwrap() { }\n\n  void PrintAsActionResult(::std::ostream* /* os */) const override {}\n\n  // Performs the given mock function's default action and returns ownership\n  // of an empty ActionResultHolder*.\n  template <typename F>\n  static ActionResultHolder* PerformDefaultAction(\n      const FunctionMocker<F>* func_mocker,\n      typename Function<F>::ArgumentTuple&& args,\n      const std::string& call_description) {\n    func_mocker->PerformDefaultAction(std::move(args), call_description);\n    return new ActionResultHolder;\n  }\n\n  // Performs the given action and returns ownership of an empty\n  // ActionResultHolder*.\n  template <typename F>\n  static ActionResultHolder* PerformAction(\n      const Action<F>& action, typename Function<F>::ArgumentTuple&& args) {\n    action.Perform(std::move(args));\n    return new ActionResultHolder;\n  }\n\n private:\n  ActionResultHolder() {}\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(ActionResultHolder);\n};\n\ntemplate <typename F>\nclass FunctionMocker;\n\ntemplate <typename R, typename... Args>\nclass FunctionMocker<R(Args...)> final : public UntypedFunctionMockerBase {\n  using F = R(Args...);\n\n public:\n  using Result = R;\n  using ArgumentTuple = std::tuple<Args...>;\n  using ArgumentMatcherTuple = std::tuple<Matcher<Args>...>;\n\n  FunctionMocker() {}\n\n  // There is no generally useful and implementable semantics of\n  // copying a mock object, so copying a mock is usually a user error.\n  // Thus we disallow copying function mockers.  If the user really\n  // wants to copy a mock object, they should implement their own copy\n  // operation, for example:\n  //\n  //   class MockFoo : public Foo {\n  //    public:\n  //     // Defines a copy constructor explicitly.\n  //     MockFoo(const MockFoo& src) {}\n  //     ...\n  //   };\n  FunctionMocker(const FunctionMocker&) = delete;\n  FunctionMocker& operator=(const FunctionMocker&) = delete;\n\n  // The destructor verifies that all expectations on this mock\n  // function have been satisfied.  If not, it will report Google Test\n  // non-fatal failures for the violations.\n  ~FunctionMocker() override GTEST_LOCK_EXCLUDED_(g_gmock_mutex) {\n    MutexLock l(&g_gmock_mutex);\n    VerifyAndClearExpectationsLocked();\n    Mock::UnregisterLocked(this);\n    ClearDefaultActionsLocked();\n  }\n\n  // Returns the ON_CALL spec that matches this mock function with the\n  // given arguments; returns NULL if no matching ON_CALL is found.\n  // L = *\n  const OnCallSpec<F>* FindOnCallSpec(\n      const ArgumentTuple& args) const {\n    for (UntypedOnCallSpecs::const_reverse_iterator it\n             = untyped_on_call_specs_.rbegin();\n         it != untyped_on_call_specs_.rend(); ++it) {\n      const OnCallSpec<F>* spec = static_cast<const OnCallSpec<F>*>(*it);\n      if (spec->Matches(args))\n        return spec;\n    }\n\n    return nullptr;\n  }\n\n  // Performs the default action of this mock function on the given\n  // arguments and returns the result. Asserts (or throws if\n  // exceptions are enabled) with a helpful call descrption if there\n  // is no valid return value. This method doesn't depend on the\n  // mutable state of this object, and thus can be called concurrently\n  // without locking.\n  // L = *\n  Result PerformDefaultAction(ArgumentTuple&& args,\n                              const std::string& call_description) const {\n    const OnCallSpec<F>* const spec =\n        this->FindOnCallSpec(args);\n    if (spec != nullptr) {\n      return spec->GetAction().Perform(std::move(args));\n    }\n    const std::string message =\n        call_description +\n        \"\\n    The mock function has no default action \"\n        \"set, and its return type has no default value set.\";\n#if GTEST_HAS_EXCEPTIONS\n    if (!DefaultValue<Result>::Exists()) {\n      throw std::runtime_error(message);\n    }\n#else\n    Assert(DefaultValue<Result>::Exists(), \"\", -1, message);\n#endif\n    return DefaultValue<Result>::Get();\n  }\n\n  // Performs the default action with the given arguments and returns\n  // the action's result.  The call description string will be used in\n  // the error message to describe the call in the case the default\n  // action fails.  The caller is responsible for deleting the result.\n  // L = *\n  UntypedActionResultHolderBase* UntypedPerformDefaultAction(\n      void* untyped_args,  // must point to an ArgumentTuple\n      const std::string& call_description) const override {\n    ArgumentTuple* args = static_cast<ArgumentTuple*>(untyped_args);\n    return ResultHolder::PerformDefaultAction(this, std::move(*args),\n                                              call_description);\n  }\n\n  // Performs the given action with the given arguments and returns\n  // the action's result.  The caller is responsible for deleting the\n  // result.\n  // L = *\n  UntypedActionResultHolderBase* UntypedPerformAction(\n      const void* untyped_action, void* untyped_args) const override {\n    // Make a copy of the action before performing it, in case the\n    // action deletes the mock object (and thus deletes itself).\n    const Action<F> action = *static_cast<const Action<F>*>(untyped_action);\n    ArgumentTuple* args = static_cast<ArgumentTuple*>(untyped_args);\n    return ResultHolder::PerformAction(action, std::move(*args));\n  }\n\n  // Implements UntypedFunctionMockerBase::ClearDefaultActionsLocked():\n  // clears the ON_CALL()s set on this mock function.\n  void ClearDefaultActionsLocked() override\n      GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {\n    g_gmock_mutex.AssertHeld();\n\n    // Deleting our default actions may trigger other mock objects to be\n    // deleted, for example if an action contains a reference counted smart\n    // pointer to that mock object, and that is the last reference. So if we\n    // delete our actions within the context of the global mutex we may deadlock\n    // when this method is called again. Instead, make a copy of the set of\n    // actions to delete, clear our set within the mutex, and then delete the\n    // actions outside of the mutex.\n    UntypedOnCallSpecs specs_to_delete;\n    untyped_on_call_specs_.swap(specs_to_delete);\n\n    g_gmock_mutex.Unlock();\n    for (UntypedOnCallSpecs::const_iterator it =\n             specs_to_delete.begin();\n         it != specs_to_delete.end(); ++it) {\n      delete static_cast<const OnCallSpec<F>*>(*it);\n    }\n\n    // Lock the mutex again, since the caller expects it to be locked when we\n    // return.\n    g_gmock_mutex.Lock();\n  }\n\n  // Returns the result of invoking this mock function with the given\n  // arguments.  This function can be safely called from multiple\n  // threads concurrently.\n  Result Invoke(Args... args) GTEST_LOCK_EXCLUDED_(g_gmock_mutex) {\n    ArgumentTuple tuple(std::forward<Args>(args)...);\n    std::unique_ptr<ResultHolder> holder(DownCast_<ResultHolder*>(\n        this->UntypedInvokeWith(static_cast<void*>(&tuple))));\n    return holder->Unwrap();\n  }\n\n  MockSpec<F> With(Matcher<Args>... m) {\n    return MockSpec<F>(this, ::std::make_tuple(std::move(m)...));\n  }\n\n protected:\n  template <typename Function>\n  friend class MockSpec;\n\n  typedef ActionResultHolder<Result> ResultHolder;\n\n  // Adds and returns a default action spec for this mock function.\n  OnCallSpec<F>& AddNewOnCallSpec(\n      const char* file, int line,\n      const ArgumentMatcherTuple& m)\n          GTEST_LOCK_EXCLUDED_(g_gmock_mutex) {\n    Mock::RegisterUseByOnCallOrExpectCall(MockObject(), file, line);\n    OnCallSpec<F>* const on_call_spec = new OnCallSpec<F>(file, line, m);\n    untyped_on_call_specs_.push_back(on_call_spec);\n    return *on_call_spec;\n  }\n\n  // Adds and returns an expectation spec for this mock function.\n  TypedExpectation<F>& AddNewExpectation(const char* file, int line,\n                                         const std::string& source_text,\n                                         const ArgumentMatcherTuple& m)\n      GTEST_LOCK_EXCLUDED_(g_gmock_mutex) {\n    Mock::RegisterUseByOnCallOrExpectCall(MockObject(), file, line);\n    TypedExpectation<F>* const expectation =\n        new TypedExpectation<F>(this, file, line, source_text, m);\n    const std::shared_ptr<ExpectationBase> untyped_expectation(expectation);\n    // See the definition of untyped_expectations_ for why access to\n    // it is unprotected here.\n    untyped_expectations_.push_back(untyped_expectation);\n\n    // Adds this expectation into the implicit sequence if there is one.\n    Sequence* const implicit_sequence = g_gmock_implicit_sequence.get();\n    if (implicit_sequence != nullptr) {\n      implicit_sequence->AddExpectation(Expectation(untyped_expectation));\n    }\n\n    return *expectation;\n  }\n\n private:\n  template <typename Func> friend class TypedExpectation;\n\n  // Some utilities needed for implementing UntypedInvokeWith().\n\n  // Describes what default action will be performed for the given\n  // arguments.\n  // L = *\n  void DescribeDefaultActionTo(const ArgumentTuple& args,\n                               ::std::ostream* os) const {\n    const OnCallSpec<F>* const spec = FindOnCallSpec(args);\n\n    if (spec == nullptr) {\n      *os << (internal::type_equals<Result, void>::value ?\n              \"returning directly.\\n\" :\n              \"returning default value.\\n\");\n    } else {\n      *os << \"taking default action specified at:\\n\"\n          << FormatFileLocation(spec->file(), spec->line()) << \"\\n\";\n    }\n  }\n\n  // Writes a message that the call is uninteresting (i.e. neither\n  // explicitly expected nor explicitly unexpected) to the given\n  // ostream.\n  void UntypedDescribeUninterestingCall(const void* untyped_args,\n                                        ::std::ostream* os) const override\n      GTEST_LOCK_EXCLUDED_(g_gmock_mutex) {\n    const ArgumentTuple& args =\n        *static_cast<const ArgumentTuple*>(untyped_args);\n    *os << \"Uninteresting mock function call - \";\n    DescribeDefaultActionTo(args, os);\n    *os << \"    Function call: \" << Name();\n    UniversalPrint(args, os);\n  }\n\n  // Returns the expectation that matches the given function arguments\n  // (or NULL is there's no match); when a match is found,\n  // untyped_action is set to point to the action that should be\n  // performed (or NULL if the action is \"do default\"), and\n  // is_excessive is modified to indicate whether the call exceeds the\n  // expected number.\n  //\n  // Critical section: We must find the matching expectation and the\n  // corresponding action that needs to be taken in an ATOMIC\n  // transaction.  Otherwise another thread may call this mock\n  // method in the middle and mess up the state.\n  //\n  // However, performing the action has to be left out of the critical\n  // section.  The reason is that we have no control on what the\n  // action does (it can invoke an arbitrary user function or even a\n  // mock function) and excessive locking could cause a dead lock.\n  const ExpectationBase* UntypedFindMatchingExpectation(\n      const void* untyped_args, const void** untyped_action, bool* is_excessive,\n      ::std::ostream* what, ::std::ostream* why) override\n      GTEST_LOCK_EXCLUDED_(g_gmock_mutex) {\n    const ArgumentTuple& args =\n        *static_cast<const ArgumentTuple*>(untyped_args);\n    MutexLock l(&g_gmock_mutex);\n    TypedExpectation<F>* exp = this->FindMatchingExpectationLocked(args);\n    if (exp == nullptr) {  // A match wasn't found.\n      this->FormatUnexpectedCallMessageLocked(args, what, why);\n      return nullptr;\n    }\n\n    // This line must be done before calling GetActionForArguments(),\n    // which will increment the call count for *exp and thus affect\n    // its saturation status.\n    *is_excessive = exp->IsSaturated();\n    const Action<F>* action = exp->GetActionForArguments(this, args, what, why);\n    if (action != nullptr && action->IsDoDefault())\n      action = nullptr;  // Normalize \"do default\" to NULL.\n    *untyped_action = action;\n    return exp;\n  }\n\n  // Prints the given function arguments to the ostream.\n  void UntypedPrintArgs(const void* untyped_args,\n                        ::std::ostream* os) const override {\n    const ArgumentTuple& args =\n        *static_cast<const ArgumentTuple*>(untyped_args);\n    UniversalPrint(args, os);\n  }\n\n  // Returns the expectation that matches the arguments, or NULL if no\n  // expectation matches them.\n  TypedExpectation<F>* FindMatchingExpectationLocked(\n      const ArgumentTuple& args) const\n          GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {\n    g_gmock_mutex.AssertHeld();\n    // See the definition of untyped_expectations_ for why access to\n    // it is unprotected here.\n    for (typename UntypedExpectations::const_reverse_iterator it =\n             untyped_expectations_.rbegin();\n         it != untyped_expectations_.rend(); ++it) {\n      TypedExpectation<F>* const exp =\n          static_cast<TypedExpectation<F>*>(it->get());\n      if (exp->ShouldHandleArguments(args)) {\n        return exp;\n      }\n    }\n    return nullptr;\n  }\n\n  // Returns a message that the arguments don't match any expectation.\n  void FormatUnexpectedCallMessageLocked(\n      const ArgumentTuple& args,\n      ::std::ostream* os,\n      ::std::ostream* why) const\n          GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {\n    g_gmock_mutex.AssertHeld();\n    *os << \"\\nUnexpected mock function call - \";\n    DescribeDefaultActionTo(args, os);\n    PrintTriedExpectationsLocked(args, why);\n  }\n\n  // Prints a list of expectations that have been tried against the\n  // current mock function call.\n  void PrintTriedExpectationsLocked(\n      const ArgumentTuple& args,\n      ::std::ostream* why) const\n          GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {\n    g_gmock_mutex.AssertHeld();\n    const size_t count = untyped_expectations_.size();\n    *why << \"Google Mock tried the following \" << count << \" \"\n         << (count == 1 ? \"expectation, but it didn't match\" :\n             \"expectations, but none matched\")\n         << \":\\n\";\n    for (size_t i = 0; i < count; i++) {\n      TypedExpectation<F>* const expectation =\n          static_cast<TypedExpectation<F>*>(untyped_expectations_[i].get());\n      *why << \"\\n\";\n      expectation->DescribeLocationTo(why);\n      if (count > 1) {\n        *why << \"tried expectation #\" << i << \": \";\n      }\n      *why << expectation->source_text() << \"...\\n\";\n      expectation->ExplainMatchResultTo(args, why);\n      expectation->DescribeCallCountTo(why);\n    }\n  }\n};  // class FunctionMocker\n\nGTEST_DISABLE_MSC_WARNINGS_POP_()  //  4355\n\n// Reports an uninteresting call (whose description is in msg) in the\n// manner specified by 'reaction'.\nvoid ReportUninterestingCall(CallReaction reaction, const std::string& msg);\n\n}  // namespace internal\n\n// A MockFunction<F> class has one mock method whose type is F.  It is\n// useful when you just want your test code to emit some messages and\n// have Google Mock verify the right messages are sent (and perhaps at\n// the right times).  For example, if you are exercising code:\n//\n//   Foo(1);\n//   Foo(2);\n//   Foo(3);\n//\n// and want to verify that Foo(1) and Foo(3) both invoke\n// mock.Bar(\"a\"), but Foo(2) doesn't invoke anything, you can write:\n//\n// TEST(FooTest, InvokesBarCorrectly) {\n//   MyMock mock;\n//   MockFunction<void(string check_point_name)> check;\n//   {\n//     InSequence s;\n//\n//     EXPECT_CALL(mock, Bar(\"a\"));\n//     EXPECT_CALL(check, Call(\"1\"));\n//     EXPECT_CALL(check, Call(\"2\"));\n//     EXPECT_CALL(mock, Bar(\"a\"));\n//   }\n//   Foo(1);\n//   check.Call(\"1\");\n//   Foo(2);\n//   check.Call(\"2\");\n//   Foo(3);\n// }\n//\n// The expectation spec says that the first Bar(\"a\") must happen\n// before check point \"1\", the second Bar(\"a\") must happen after check\n// point \"2\", and nothing should happen between the two check\n// points. The explicit check points make it easy to tell which\n// Bar(\"a\") is called by which call to Foo().\n//\n// MockFunction<F> can also be used to exercise code that accepts\n// std::function<F> callbacks. To do so, use AsStdFunction() method\n// to create std::function proxy forwarding to original object's Call.\n// Example:\n//\n// TEST(FooTest, RunsCallbackWithBarArgument) {\n//   MockFunction<int(string)> callback;\n//   EXPECT_CALL(callback, Call(\"bar\")).WillOnce(Return(1));\n//   Foo(callback.AsStdFunction());\n// }\ntemplate <typename F>\nclass MockFunction;\n\ntemplate <typename R, typename... Args>\nclass MockFunction<R(Args...)> {\n public:\n  MockFunction() {}\n  MockFunction(const MockFunction&) = delete;\n  MockFunction& operator=(const MockFunction&) = delete;\n\n  std::function<R(Args...)> AsStdFunction() {\n    return [this](Args... args) -> R {\n      return this->Call(std::forward<Args>(args)...);\n    };\n  }\n\n  // Implementation detail: the expansion of the MOCK_METHOD macro.\n  R Call(Args... args) {\n    mock_.SetOwnerAndName(this, \"Call\");\n    return mock_.Invoke(std::forward<Args>(args)...);\n  }\n\n  internal::MockSpec<R(Args...)> gmock_Call(Matcher<Args>... m) {\n    mock_.RegisterOwner(this);\n    return mock_.With(std::move(m)...);\n  }\n\n  internal::MockSpec<R(Args...)> gmock_Call(const internal::WithoutMatchers&,\n                                            R (*)(Args...)) {\n    return this->gmock_Call(::testing::A<Args>()...);\n  }\n\n private:\n  mutable internal::FunctionMocker<R(Args...)> mock_;\n};\n\n// The style guide prohibits \"using\" statements in a namespace scope\n// inside a header file.  However, the MockSpec class template is\n// meant to be defined in the ::testing namespace.  The following line\n// is just a trick for working around a bug in MSVC 8.0, which cannot\n// handle it if we define MockSpec in ::testing.\nusing internal::MockSpec;\n\n// Const(x) is a convenient function for obtaining a const reference\n// to x.  This is useful for setting expectations on an overloaded\n// const mock method, e.g.\n//\n//   class MockFoo : public FooInterface {\n//    public:\n//     MOCK_METHOD0(Bar, int());\n//     MOCK_CONST_METHOD0(Bar, int&());\n//   };\n//\n//   MockFoo foo;\n//   // Expects a call to non-const MockFoo::Bar().\n//   EXPECT_CALL(foo, Bar());\n//   // Expects a call to const MockFoo::Bar().\n//   EXPECT_CALL(Const(foo), Bar());\ntemplate <typename T>\ninline const T& Const(const T& x) { return x; }\n\n// Constructs an Expectation object that references and co-owns exp.\ninline Expectation::Expectation(internal::ExpectationBase& exp)  // NOLINT\n    : expectation_base_(exp.GetHandle().expectation_base()) {}\n\n}  // namespace testing\n\nGTEST_DISABLE_MSC_WARNINGS_POP_()  //  4251\n\n// Implementation for ON_CALL and EXPECT_CALL macros. A separate macro is\n// required to avoid compile errors when the name of the method used in call is\n// a result of macro expansion. See CompilesWithMethodNameExpandedFromMacro\n// tests in internal/gmock-spec-builders_test.cc for more details.\n//\n// This macro supports statements both with and without parameter matchers. If\n// the parameter list is omitted, gMock will accept any parameters, which allows\n// tests to be written that don't need to encode the number of method\n// parameter. This technique may only be used for non-overloaded methods.\n//\n//   // These are the same:\n//   ON_CALL(mock, NoArgsMethod()).WillByDefault(...);\n//   ON_CALL(mock, NoArgsMethod).WillByDefault(...);\n//\n//   // As are these:\n//   ON_CALL(mock, TwoArgsMethod(_, _)).WillByDefault(...);\n//   ON_CALL(mock, TwoArgsMethod).WillByDefault(...);\n//\n//   // Can also specify args if you want, of course:\n//   ON_CALL(mock, TwoArgsMethod(_, 45)).WillByDefault(...);\n//\n//   // Overloads work as long as you specify parameters:\n//   ON_CALL(mock, OverloadedMethod(_)).WillByDefault(...);\n//   ON_CALL(mock, OverloadedMethod(_, _)).WillByDefault(...);\n//\n//   // Oops! Which overload did you want?\n//   ON_CALL(mock, OverloadedMethod).WillByDefault(...);\n//     => ERROR: call to member function 'gmock_OverloadedMethod' is ambiguous\n//\n// How this works: The mock class uses two overloads of the gmock_Method\n// expectation setter method plus an operator() overload on the MockSpec object.\n// In the matcher list form, the macro expands to:\n//\n//   // This statement:\n//   ON_CALL(mock, TwoArgsMethod(_, 45))...\n//\n//   // ...expands to:\n//   mock.gmock_TwoArgsMethod(_, 45)(WithoutMatchers(), nullptr)...\n//   |-------------v---------------||------------v-------------|\n//       invokes first overload        swallowed by operator()\n//\n//   // ...which is essentially:\n//   mock.gmock_TwoArgsMethod(_, 45)...\n//\n// Whereas the form without a matcher list:\n//\n//   // This statement:\n//   ON_CALL(mock, TwoArgsMethod)...\n//\n//   // ...expands to:\n//   mock.gmock_TwoArgsMethod(WithoutMatchers(), nullptr)...\n//   |-----------------------v--------------------------|\n//                 invokes second overload\n//\n//   // ...which is essentially:\n//   mock.gmock_TwoArgsMethod(_, _)...\n//\n// The WithoutMatchers() argument is used to disambiguate overloads and to\n// block the caller from accidentally invoking the second overload directly. The\n// second argument is an internal type derived from the method signature. The\n// failure to disambiguate two overloads of this method in the ON_CALL statement\n// is how we block callers from setting expectations on overloaded methods.\n#define GMOCK_ON_CALL_IMPL_(mock_expr, Setter, call)                    \\\n  ((mock_expr).gmock_##call)(::testing::internal::GetWithoutMatchers(), \\\n                             nullptr)                                   \\\n      .Setter(__FILE__, __LINE__, #mock_expr, #call)\n\n#define ON_CALL(obj, call) \\\n  GMOCK_ON_CALL_IMPL_(obj, InternalDefaultActionSetAt, call)\n\n#define EXPECT_CALL(obj, call) \\\n  GMOCK_ON_CALL_IMPL_(obj, InternalExpectedAt, call)\n\n#endif  // GMOCK_INCLUDE_GMOCK_GMOCK_SPEC_BUILDERS_H_\n\nnamespace testing {\nnamespace internal {\n// Removes the given pointer; this is a helper for the expectation setter method\n// for parameterless matchers.\n//\n// We want to make sure that the user cannot set a parameterless expectation on\n// overloaded methods, including methods which are overloaded on const. Example:\n//\n//   class MockClass {\n//     MOCK_METHOD0(GetName, string&());\n//     MOCK_CONST_METHOD0(GetName, const string&());\n//   };\n//\n//   TEST() {\n//     // This should be an error, as it's not clear which overload is expected.\n//     EXPECT_CALL(mock, GetName).WillOnce(ReturnRef(value));\n//   }\n//\n// Here are the generated expectation-setter methods:\n//\n//   class MockClass {\n//     // Overload 1\n//     MockSpec<string&()> gmock_GetName() { ... }\n//     // Overload 2. Declared const so that the compiler will generate an\n//     // error when trying to resolve between this and overload 4 in\n//     // 'gmock_GetName(WithoutMatchers(), nullptr)'.\n//     MockSpec<string&()> gmock_GetName(\n//         const WithoutMatchers&, const Function<string&()>*) const {\n//       // Removes const from this, calls overload 1\n//       return AdjustConstness_(this)->gmock_GetName();\n//     }\n//\n//     // Overload 3\n//     const string& gmock_GetName() const { ... }\n//     // Overload 4\n//     MockSpec<const string&()> gmock_GetName(\n//         const WithoutMatchers&, const Function<const string&()>*) const {\n//       // Does not remove const, calls overload 3\n//       return AdjustConstness_const(this)->gmock_GetName();\n//     }\n//   }\n//\ntemplate <typename MockType>\nconst MockType* AdjustConstness_const(const MockType* mock) {\n  return mock;\n}\n\n// Removes const from and returns the given pointer; this is a helper for the\n// expectation setter method for parameterless matchers.\ntemplate <typename MockType>\nMockType* AdjustConstness_(const MockType* mock) {\n  return const_cast<MockType*>(mock);\n}\n\n}  // namespace internal\n\n// The style guide prohibits \"using\" statements in a namespace scope\n// inside a header file.  However, the FunctionMocker class template\n// is meant to be defined in the ::testing namespace.  The following\n// line is just a trick for working around a bug in MSVC 8.0, which\n// cannot handle it if we define FunctionMocker in ::testing.\nusing internal::FunctionMocker;\n\n// GMOCK_RESULT_(tn, F) expands to the result type of function type F.\n// We define this as a variadic macro in case F contains unprotected\n// commas (the same reason that we use variadic macros in other places\n// in this file).\n// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!\n#define GMOCK_RESULT_(tn, ...) \\\n    tn ::testing::internal::Function<__VA_ARGS__>::Result\n\n// The type of argument N of the given function type.\n// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!\n#define GMOCK_ARG_(tn, N, ...) \\\n    tn ::testing::internal::Function<__VA_ARGS__>::template Arg<N-1>::type\n\n// The matcher type for argument N of the given function type.\n// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!\n#define GMOCK_MATCHER_(tn, N, ...) \\\n    const ::testing::Matcher<GMOCK_ARG_(tn, N, __VA_ARGS__)>&\n\n// The variable for mocking the given method.\n// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!\n#define GMOCK_MOCKER_(arity, constness, Method) \\\n    GTEST_CONCAT_TOKEN_(gmock##constness##arity##_##Method##_, __LINE__)\n\n// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!\n#define GMOCK_METHOD0_(tn, constness, ct, Method, ...) \\\n  static_assert(0 == \\\n      ::testing::internal::Function<__VA_ARGS__>::ArgumentCount, \\\n      \"MOCK_METHOD<N> must match argument count.\");\\\n  GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \\\n      ) constness { \\\n    GMOCK_MOCKER_(0, constness, Method).SetOwnerAndName(this, #Method); \\\n    return GMOCK_MOCKER_(0, constness, Method).Invoke(); \\\n  } \\\n  ::testing::MockSpec<__VA_ARGS__> \\\n      gmock_##Method() constness { \\\n    GMOCK_MOCKER_(0, constness, Method).RegisterOwner(this); \\\n    return GMOCK_MOCKER_(0, constness, Method).With(); \\\n  } \\\n  ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \\\n      const ::testing::internal::WithoutMatchers&, \\\n      constness ::testing::internal::Function<__VA_ARGS__>* ) const { \\\n        return ::testing::internal::AdjustConstness_##constness(this)-> \\\n            gmock_##Method(); \\\n      } \\\n  mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(0, constness, \\\n      Method)\n\n// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!\n#define GMOCK_METHOD1_(tn, constness, ct, Method, ...) \\\n  static_assert(1 == \\\n      ::testing::internal::Function<__VA_ARGS__>::ArgumentCount, \\\n      \"MOCK_METHOD<N> must match argument count.\");\\\n  GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \\\n      GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1) constness { \\\n    GMOCK_MOCKER_(1, constness, Method).SetOwnerAndName(this, #Method); \\\n    return GMOCK_MOCKER_(1, constness, \\\n        Method).Invoke(::std::forward<GMOCK_ARG_(tn, 1, \\\n        __VA_ARGS__)>(gmock_a1)); \\\n  } \\\n  ::testing::MockSpec<__VA_ARGS__> \\\n      gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1) constness { \\\n    GMOCK_MOCKER_(1, constness, Method).RegisterOwner(this); \\\n    return GMOCK_MOCKER_(1, constness, Method).With(gmock_a1); \\\n  } \\\n  ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \\\n      const ::testing::internal::WithoutMatchers&, \\\n      constness ::testing::internal::Function<__VA_ARGS__>* ) const { \\\n        return ::testing::internal::AdjustConstness_##constness(this)-> \\\n            gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>()); \\\n      } \\\n  mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(1, constness, \\\n      Method)\n\n// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!\n#define GMOCK_METHOD2_(tn, constness, ct, Method, ...) \\\n  static_assert(2 == \\\n      ::testing::internal::Function<__VA_ARGS__>::ArgumentCount, \\\n      \"MOCK_METHOD<N> must match argument count.\");\\\n  GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \\\n      GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, GMOCK_ARG_(tn, 2, \\\n          __VA_ARGS__) gmock_a2) constness { \\\n    GMOCK_MOCKER_(2, constness, Method).SetOwnerAndName(this, #Method); \\\n    return GMOCK_MOCKER_(2, constness, \\\n        Method).Invoke(::std::forward<GMOCK_ARG_(tn, 1, \\\n        __VA_ARGS__)>(gmock_a1), \\\n  ::std::forward<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(gmock_a2)); \\\n  } \\\n  ::testing::MockSpec<__VA_ARGS__> \\\n      gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \\\n                     GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2) constness { \\\n    GMOCK_MOCKER_(2, constness, Method).RegisterOwner(this); \\\n    return GMOCK_MOCKER_(2, constness, Method).With(gmock_a1, gmock_a2); \\\n  } \\\n  ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \\\n      const ::testing::internal::WithoutMatchers&, \\\n      constness ::testing::internal::Function<__VA_ARGS__>* ) const { \\\n        return ::testing::internal::AdjustConstness_##constness(this)-> \\\n            gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 2, __VA_ARGS__)>()); \\\n      } \\\n  mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(2, constness, \\\n      Method)\n\n// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!\n#define GMOCK_METHOD3_(tn, constness, ct, Method, ...) \\\n  static_assert(3 == \\\n      ::testing::internal::Function<__VA_ARGS__>::ArgumentCount, \\\n      \"MOCK_METHOD<N> must match argument count.\");\\\n  GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \\\n      GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, GMOCK_ARG_(tn, 2, \\\n          __VA_ARGS__) gmock_a2, GMOCK_ARG_(tn, 3, \\\n          __VA_ARGS__) gmock_a3) constness { \\\n    GMOCK_MOCKER_(3, constness, Method).SetOwnerAndName(this, #Method); \\\n    return GMOCK_MOCKER_(3, constness, \\\n        Method).Invoke(::std::forward<GMOCK_ARG_(tn, 1, \\\n        __VA_ARGS__)>(gmock_a1), \\\n  ::std::forward<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(gmock_a2), \\\n  ::std::forward<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(gmock_a3)); \\\n  } \\\n  ::testing::MockSpec<__VA_ARGS__> \\\n      gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \\\n                     GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \\\n                     GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3) constness { \\\n    GMOCK_MOCKER_(3, constness, Method).RegisterOwner(this); \\\n    return GMOCK_MOCKER_(3, constness, Method).With(gmock_a1, gmock_a2, \\\n        gmock_a3); \\\n  } \\\n  ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \\\n      const ::testing::internal::WithoutMatchers&, \\\n      constness ::testing::internal::Function<__VA_ARGS__>* ) const { \\\n        return ::testing::internal::AdjustConstness_##constness(this)-> \\\n            gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 3, __VA_ARGS__)>()); \\\n      } \\\n  mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(3, constness, \\\n      Method)\n\n// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!\n#define GMOCK_METHOD4_(tn, constness, ct, Method, ...) \\\n  static_assert(4 == \\\n      ::testing::internal::Function<__VA_ARGS__>::ArgumentCount, \\\n      \"MOCK_METHOD<N> must match argument count.\");\\\n  GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \\\n      GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, GMOCK_ARG_(tn, 2, \\\n          __VA_ARGS__) gmock_a2, GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \\\n          GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4) constness { \\\n    GMOCK_MOCKER_(4, constness, Method).SetOwnerAndName(this, #Method); \\\n    return GMOCK_MOCKER_(4, constness, \\\n        Method).Invoke(::std::forward<GMOCK_ARG_(tn, 1, \\\n        __VA_ARGS__)>(gmock_a1), \\\n  ::std::forward<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(gmock_a2), \\\n  ::std::forward<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(gmock_a3), \\\n  ::std::forward<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(gmock_a4)); \\\n  } \\\n  ::testing::MockSpec<__VA_ARGS__> \\\n      gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \\\n                     GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \\\n                     GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \\\n                     GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4) constness { \\\n    GMOCK_MOCKER_(4, constness, Method).RegisterOwner(this); \\\n    return GMOCK_MOCKER_(4, constness, Method).With(gmock_a1, gmock_a2, \\\n        gmock_a3, gmock_a4); \\\n  } \\\n  ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \\\n      const ::testing::internal::WithoutMatchers&, \\\n      constness ::testing::internal::Function<__VA_ARGS__>* ) const { \\\n        return ::testing::internal::AdjustConstness_##constness(this)-> \\\n            gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 4, __VA_ARGS__)>()); \\\n      } \\\n  mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(4, constness, \\\n      Method)\n\n// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!\n#define GMOCK_METHOD5_(tn, constness, ct, Method, ...) \\\n  static_assert(5 == \\\n      ::testing::internal::Function<__VA_ARGS__>::ArgumentCount, \\\n      \"MOCK_METHOD<N> must match argument count.\");\\\n  GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \\\n      GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, GMOCK_ARG_(tn, 2, \\\n          __VA_ARGS__) gmock_a2, GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \\\n          GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, GMOCK_ARG_(tn, 5, \\\n          __VA_ARGS__) gmock_a5) constness { \\\n    GMOCK_MOCKER_(5, constness, Method).SetOwnerAndName(this, #Method); \\\n    return GMOCK_MOCKER_(5, constness, \\\n        Method).Invoke(::std::forward<GMOCK_ARG_(tn, 1, \\\n        __VA_ARGS__)>(gmock_a1), \\\n  ::std::forward<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(gmock_a2), \\\n  ::std::forward<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(gmock_a3), \\\n  ::std::forward<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(gmock_a4), \\\n  ::std::forward<GMOCK_ARG_(tn, 5, __VA_ARGS__)>(gmock_a5)); \\\n  } \\\n  ::testing::MockSpec<__VA_ARGS__> \\\n      gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \\\n                     GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \\\n                     GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \\\n                     GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \\\n                     GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5) constness { \\\n    GMOCK_MOCKER_(5, constness, Method).RegisterOwner(this); \\\n    return GMOCK_MOCKER_(5, constness, Method).With(gmock_a1, gmock_a2, \\\n        gmock_a3, gmock_a4, gmock_a5); \\\n  } \\\n  ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \\\n      const ::testing::internal::WithoutMatchers&, \\\n      constness ::testing::internal::Function<__VA_ARGS__>* ) const { \\\n        return ::testing::internal::AdjustConstness_##constness(this)-> \\\n            gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 5, __VA_ARGS__)>()); \\\n      } \\\n  mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(5, constness, \\\n      Method)\n\n// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!\n#define GMOCK_METHOD6_(tn, constness, ct, Method, ...) \\\n  static_assert(6 == \\\n      ::testing::internal::Function<__VA_ARGS__>::ArgumentCount, \\\n      \"MOCK_METHOD<N> must match argument count.\");\\\n  GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \\\n      GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, GMOCK_ARG_(tn, 2, \\\n          __VA_ARGS__) gmock_a2, GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \\\n          GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, GMOCK_ARG_(tn, 5, \\\n          __VA_ARGS__) gmock_a5, GMOCK_ARG_(tn, 6, \\\n          __VA_ARGS__) gmock_a6) constness { \\\n    GMOCK_MOCKER_(6, constness, Method).SetOwnerAndName(this, #Method); \\\n    return GMOCK_MOCKER_(6, constness, \\\n        Method).Invoke(::std::forward<GMOCK_ARG_(tn, 1, \\\n        __VA_ARGS__)>(gmock_a1), \\\n  ::std::forward<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(gmock_a2), \\\n  ::std::forward<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(gmock_a3), \\\n  ::std::forward<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(gmock_a4), \\\n  ::std::forward<GMOCK_ARG_(tn, 5, __VA_ARGS__)>(gmock_a5), \\\n  ::std::forward<GMOCK_ARG_(tn, 6, __VA_ARGS__)>(gmock_a6)); \\\n  } \\\n  ::testing::MockSpec<__VA_ARGS__> \\\n      gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \\\n                     GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \\\n                     GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \\\n                     GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \\\n                     GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \\\n                     GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6) constness { \\\n    GMOCK_MOCKER_(6, constness, Method).RegisterOwner(this); \\\n    return GMOCK_MOCKER_(6, constness, Method).With(gmock_a1, gmock_a2, \\\n        gmock_a3, gmock_a4, gmock_a5, gmock_a6); \\\n  } \\\n  ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \\\n      const ::testing::internal::WithoutMatchers&, \\\n      constness ::testing::internal::Function<__VA_ARGS__>* ) const { \\\n        return ::testing::internal::AdjustConstness_##constness(this)-> \\\n            gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 5, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 6, __VA_ARGS__)>()); \\\n      } \\\n  mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(6, constness, \\\n      Method)\n\n// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!\n#define GMOCK_METHOD7_(tn, constness, ct, Method, ...) \\\n  static_assert(7 == \\\n      ::testing::internal::Function<__VA_ARGS__>::ArgumentCount, \\\n      \"MOCK_METHOD<N> must match argument count.\");\\\n  GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \\\n      GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, GMOCK_ARG_(tn, 2, \\\n          __VA_ARGS__) gmock_a2, GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \\\n          GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, GMOCK_ARG_(tn, 5, \\\n          __VA_ARGS__) gmock_a5, GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6, \\\n          GMOCK_ARG_(tn, 7, __VA_ARGS__) gmock_a7) constness { \\\n    GMOCK_MOCKER_(7, constness, Method).SetOwnerAndName(this, #Method); \\\n    return GMOCK_MOCKER_(7, constness, \\\n        Method).Invoke(::std::forward<GMOCK_ARG_(tn, 1, \\\n        __VA_ARGS__)>(gmock_a1), \\\n  ::std::forward<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(gmock_a2), \\\n  ::std::forward<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(gmock_a3), \\\n  ::std::forward<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(gmock_a4), \\\n  ::std::forward<GMOCK_ARG_(tn, 5, __VA_ARGS__)>(gmock_a5), \\\n  ::std::forward<GMOCK_ARG_(tn, 6, __VA_ARGS__)>(gmock_a6), \\\n  ::std::forward<GMOCK_ARG_(tn, 7, __VA_ARGS__)>(gmock_a7)); \\\n  } \\\n  ::testing::MockSpec<__VA_ARGS__> \\\n      gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \\\n                     GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \\\n                     GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \\\n                     GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \\\n                     GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \\\n                     GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6, \\\n                     GMOCK_MATCHER_(tn, 7, __VA_ARGS__) gmock_a7) constness { \\\n    GMOCK_MOCKER_(7, constness, Method).RegisterOwner(this); \\\n    return GMOCK_MOCKER_(7, constness, Method).With(gmock_a1, gmock_a2, \\\n        gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7); \\\n  } \\\n  ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \\\n      const ::testing::internal::WithoutMatchers&, \\\n      constness ::testing::internal::Function<__VA_ARGS__>* ) const { \\\n        return ::testing::internal::AdjustConstness_##constness(this)-> \\\n            gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 5, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 6, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 7, __VA_ARGS__)>()); \\\n      } \\\n  mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(7, constness, \\\n      Method)\n\n// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!\n#define GMOCK_METHOD8_(tn, constness, ct, Method, ...) \\\n  static_assert(8 == \\\n      ::testing::internal::Function<__VA_ARGS__>::ArgumentCount, \\\n      \"MOCK_METHOD<N> must match argument count.\");\\\n  GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \\\n      GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, GMOCK_ARG_(tn, 2, \\\n          __VA_ARGS__) gmock_a2, GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \\\n          GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, GMOCK_ARG_(tn, 5, \\\n          __VA_ARGS__) gmock_a5, GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6, \\\n          GMOCK_ARG_(tn, 7, __VA_ARGS__) gmock_a7, GMOCK_ARG_(tn, 8, \\\n          __VA_ARGS__) gmock_a8) constness { \\\n    GMOCK_MOCKER_(8, constness, Method).SetOwnerAndName(this, #Method); \\\n    return GMOCK_MOCKER_(8, constness, \\\n        Method).Invoke(::std::forward<GMOCK_ARG_(tn, 1, \\\n        __VA_ARGS__)>(gmock_a1), \\\n  ::std::forward<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(gmock_a2), \\\n  ::std::forward<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(gmock_a3), \\\n  ::std::forward<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(gmock_a4), \\\n  ::std::forward<GMOCK_ARG_(tn, 5, __VA_ARGS__)>(gmock_a5), \\\n  ::std::forward<GMOCK_ARG_(tn, 6, __VA_ARGS__)>(gmock_a6), \\\n  ::std::forward<GMOCK_ARG_(tn, 7, __VA_ARGS__)>(gmock_a7), \\\n  ::std::forward<GMOCK_ARG_(tn, 8, __VA_ARGS__)>(gmock_a8)); \\\n  } \\\n  ::testing::MockSpec<__VA_ARGS__> \\\n      gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \\\n                     GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \\\n                     GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \\\n                     GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \\\n                     GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \\\n                     GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6, \\\n                     GMOCK_MATCHER_(tn, 7, __VA_ARGS__) gmock_a7, \\\n                     GMOCK_MATCHER_(tn, 8, __VA_ARGS__) gmock_a8) constness { \\\n    GMOCK_MOCKER_(8, constness, Method).RegisterOwner(this); \\\n    return GMOCK_MOCKER_(8, constness, Method).With(gmock_a1, gmock_a2, \\\n        gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8); \\\n  } \\\n  ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \\\n      const ::testing::internal::WithoutMatchers&, \\\n      constness ::testing::internal::Function<__VA_ARGS__>* ) const { \\\n        return ::testing::internal::AdjustConstness_##constness(this)-> \\\n            gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 5, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 6, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 7, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 8, __VA_ARGS__)>()); \\\n      } \\\n  mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(8, constness, \\\n      Method)\n\n// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!\n#define GMOCK_METHOD9_(tn, constness, ct, Method, ...) \\\n  static_assert(9 == \\\n      ::testing::internal::Function<__VA_ARGS__>::ArgumentCount, \\\n      \"MOCK_METHOD<N> must match argument count.\");\\\n  GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \\\n      GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, GMOCK_ARG_(tn, 2, \\\n          __VA_ARGS__) gmock_a2, GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \\\n          GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, GMOCK_ARG_(tn, 5, \\\n          __VA_ARGS__) gmock_a5, GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6, \\\n          GMOCK_ARG_(tn, 7, __VA_ARGS__) gmock_a7, GMOCK_ARG_(tn, 8, \\\n          __VA_ARGS__) gmock_a8, GMOCK_ARG_(tn, 9, \\\n          __VA_ARGS__) gmock_a9) constness { \\\n    GMOCK_MOCKER_(9, constness, Method).SetOwnerAndName(this, #Method); \\\n    return GMOCK_MOCKER_(9, constness, \\\n        Method).Invoke(::std::forward<GMOCK_ARG_(tn, 1, \\\n        __VA_ARGS__)>(gmock_a1), \\\n  ::std::forward<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(gmock_a2), \\\n  ::std::forward<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(gmock_a3), \\\n  ::std::forward<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(gmock_a4), \\\n  ::std::forward<GMOCK_ARG_(tn, 5, __VA_ARGS__)>(gmock_a5), \\\n  ::std::forward<GMOCK_ARG_(tn, 6, __VA_ARGS__)>(gmock_a6), \\\n  ::std::forward<GMOCK_ARG_(tn, 7, __VA_ARGS__)>(gmock_a7), \\\n  ::std::forward<GMOCK_ARG_(tn, 8, __VA_ARGS__)>(gmock_a8), \\\n  ::std::forward<GMOCK_ARG_(tn, 9, __VA_ARGS__)>(gmock_a9)); \\\n  } \\\n  ::testing::MockSpec<__VA_ARGS__> \\\n      gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \\\n                     GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \\\n                     GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \\\n                     GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \\\n                     GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \\\n                     GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6, \\\n                     GMOCK_MATCHER_(tn, 7, __VA_ARGS__) gmock_a7, \\\n                     GMOCK_MATCHER_(tn, 8, __VA_ARGS__) gmock_a8, \\\n                     GMOCK_MATCHER_(tn, 9, __VA_ARGS__) gmock_a9) constness { \\\n    GMOCK_MOCKER_(9, constness, Method).RegisterOwner(this); \\\n    return GMOCK_MOCKER_(9, constness, Method).With(gmock_a1, gmock_a2, \\\n        gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8, \\\n        gmock_a9); \\\n  } \\\n  ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \\\n      const ::testing::internal::WithoutMatchers&, \\\n      constness ::testing::internal::Function<__VA_ARGS__>* ) const { \\\n        return ::testing::internal::AdjustConstness_##constness(this)-> \\\n            gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 5, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 6, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 7, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 8, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 9, __VA_ARGS__)>()); \\\n      } \\\n  mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(9, constness, \\\n      Method)\n\n// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!\n#define GMOCK_METHOD10_(tn, constness, ct, Method, ...) \\\n  static_assert(10 == \\\n      ::testing::internal::Function<__VA_ARGS__>::ArgumentCount, \\\n      \"MOCK_METHOD<N> must match argument count.\");\\\n  GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \\\n      GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, GMOCK_ARG_(tn, 2, \\\n          __VA_ARGS__) gmock_a2, GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \\\n          GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, GMOCK_ARG_(tn, 5, \\\n          __VA_ARGS__) gmock_a5, GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6, \\\n          GMOCK_ARG_(tn, 7, __VA_ARGS__) gmock_a7, GMOCK_ARG_(tn, 8, \\\n          __VA_ARGS__) gmock_a8, GMOCK_ARG_(tn, 9, __VA_ARGS__) gmock_a9, \\\n          GMOCK_ARG_(tn, 10, __VA_ARGS__) gmock_a10) constness { \\\n    GMOCK_MOCKER_(10, constness, Method).SetOwnerAndName(this, #Method); \\\n    return GMOCK_MOCKER_(10, constness, \\\n        Method).Invoke(::std::forward<GMOCK_ARG_(tn, 1, \\\n        __VA_ARGS__)>(gmock_a1), \\\n  ::std::forward<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(gmock_a2), \\\n  ::std::forward<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(gmock_a3), \\\n  ::std::forward<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(gmock_a4), \\\n  ::std::forward<GMOCK_ARG_(tn, 5, __VA_ARGS__)>(gmock_a5), \\\n  ::std::forward<GMOCK_ARG_(tn, 6, __VA_ARGS__)>(gmock_a6), \\\n  ::std::forward<GMOCK_ARG_(tn, 7, __VA_ARGS__)>(gmock_a7), \\\n  ::std::forward<GMOCK_ARG_(tn, 8, __VA_ARGS__)>(gmock_a8), \\\n  ::std::forward<GMOCK_ARG_(tn, 9, __VA_ARGS__)>(gmock_a9), \\\n  ::std::forward<GMOCK_ARG_(tn, 10, __VA_ARGS__)>(gmock_a10)); \\\n  } \\\n  ::testing::MockSpec<__VA_ARGS__> \\\n      gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \\\n                     GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \\\n                     GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \\\n                     GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \\\n                     GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \\\n                     GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6, \\\n                     GMOCK_MATCHER_(tn, 7, __VA_ARGS__) gmock_a7, \\\n                     GMOCK_MATCHER_(tn, 8, __VA_ARGS__) gmock_a8, \\\n                     GMOCK_MATCHER_(tn, 9, __VA_ARGS__) gmock_a9, \\\n                     GMOCK_MATCHER_(tn, 10, \\\n                         __VA_ARGS__) gmock_a10) constness { \\\n    GMOCK_MOCKER_(10, constness, Method).RegisterOwner(this); \\\n    return GMOCK_MOCKER_(10, constness, Method).With(gmock_a1, gmock_a2, \\\n        gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8, gmock_a9, \\\n        gmock_a10); \\\n  } \\\n  ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \\\n      const ::testing::internal::WithoutMatchers&, \\\n      constness ::testing::internal::Function<__VA_ARGS__>* ) const { \\\n        return ::testing::internal::AdjustConstness_##constness(this)-> \\\n            gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 5, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 6, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 7, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 8, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 9, __VA_ARGS__)>(), \\\n                     ::testing::A<GMOCK_ARG_(tn, 10, __VA_ARGS__)>()); \\\n      } \\\n  mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(10, constness, \\\n      Method)\n\n#define MOCK_METHOD0(m, ...) GMOCK_METHOD0_(, , , m, __VA_ARGS__)\n#define MOCK_METHOD1(m, ...) GMOCK_METHOD1_(, , , m, __VA_ARGS__)\n#define MOCK_METHOD2(m, ...) GMOCK_METHOD2_(, , , m, __VA_ARGS__)\n#define MOCK_METHOD3(m, ...) GMOCK_METHOD3_(, , , m, __VA_ARGS__)\n#define MOCK_METHOD4(m, ...) GMOCK_METHOD4_(, , , m, __VA_ARGS__)\n#define MOCK_METHOD5(m, ...) GMOCK_METHOD5_(, , , m, __VA_ARGS__)\n#define MOCK_METHOD6(m, ...) GMOCK_METHOD6_(, , , m, __VA_ARGS__)\n#define MOCK_METHOD7(m, ...) GMOCK_METHOD7_(, , , m, __VA_ARGS__)\n#define MOCK_METHOD8(m, ...) GMOCK_METHOD8_(, , , m, __VA_ARGS__)\n#define MOCK_METHOD9(m, ...) GMOCK_METHOD9_(, , , m, __VA_ARGS__)\n#define MOCK_METHOD10(m, ...) GMOCK_METHOD10_(, , , m, __VA_ARGS__)\n\n#define MOCK_CONST_METHOD0(m, ...) GMOCK_METHOD0_(, const, , m, __VA_ARGS__)\n#define MOCK_CONST_METHOD1(m, ...) GMOCK_METHOD1_(, const, , m, __VA_ARGS__)\n#define MOCK_CONST_METHOD2(m, ...) GMOCK_METHOD2_(, const, , m, __VA_ARGS__)\n#define MOCK_CONST_METHOD3(m, ...) GMOCK_METHOD3_(, const, , m, __VA_ARGS__)\n#define MOCK_CONST_METHOD4(m, ...) GMOCK_METHOD4_(, const, , m, __VA_ARGS__)\n#define MOCK_CONST_METHOD5(m, ...) GMOCK_METHOD5_(, const, , m, __VA_ARGS__)\n#define MOCK_CONST_METHOD6(m, ...) GMOCK_METHOD6_(, const, , m, __VA_ARGS__)\n#define MOCK_CONST_METHOD7(m, ...) GMOCK_METHOD7_(, const, , m, __VA_ARGS__)\n#define MOCK_CONST_METHOD8(m, ...) GMOCK_METHOD8_(, const, , m, __VA_ARGS__)\n#define MOCK_CONST_METHOD9(m, ...) GMOCK_METHOD9_(, const, , m, __VA_ARGS__)\n#define MOCK_CONST_METHOD10(m, ...) GMOCK_METHOD10_(, const, , m, __VA_ARGS__)\n\n#define MOCK_METHOD0_T(m, ...) GMOCK_METHOD0_(typename, , , m, __VA_ARGS__)\n#define MOCK_METHOD1_T(m, ...) GMOCK_METHOD1_(typename, , , m, __VA_ARGS__)\n#define MOCK_METHOD2_T(m, ...) GMOCK_METHOD2_(typename, , , m, __VA_ARGS__)\n#define MOCK_METHOD3_T(m, ...) GMOCK_METHOD3_(typename, , , m, __VA_ARGS__)\n#define MOCK_METHOD4_T(m, ...) GMOCK_METHOD4_(typename, , , m, __VA_ARGS__)\n#define MOCK_METHOD5_T(m, ...) GMOCK_METHOD5_(typename, , , m, __VA_ARGS__)\n#define MOCK_METHOD6_T(m, ...) GMOCK_METHOD6_(typename, , , m, __VA_ARGS__)\n#define MOCK_METHOD7_T(m, ...) GMOCK_METHOD7_(typename, , , m, __VA_ARGS__)\n#define MOCK_METHOD8_T(m, ...) GMOCK_METHOD8_(typename, , , m, __VA_ARGS__)\n#define MOCK_METHOD9_T(m, ...) GMOCK_METHOD9_(typename, , , m, __VA_ARGS__)\n#define MOCK_METHOD10_T(m, ...) GMOCK_METHOD10_(typename, , , m, __VA_ARGS__)\n\n#define MOCK_CONST_METHOD0_T(m, ...) \\\n    GMOCK_METHOD0_(typename, const, , m, __VA_ARGS__)\n#define MOCK_CONST_METHOD1_T(m, ...) \\\n    GMOCK_METHOD1_(typename, const, , m, __VA_ARGS__)\n#define MOCK_CONST_METHOD2_T(m, ...) \\\n    GMOCK_METHOD2_(typename, const, , m, __VA_ARGS__)\n#define MOCK_CONST_METHOD3_T(m, ...) \\\n    GMOCK_METHOD3_(typename, const, , m, __VA_ARGS__)\n#define MOCK_CONST_METHOD4_T(m, ...) \\\n    GMOCK_METHOD4_(typename, const, , m, __VA_ARGS__)\n#define MOCK_CONST_METHOD5_T(m, ...) \\\n    GMOCK_METHOD5_(typename, const, , m, __VA_ARGS__)\n#define MOCK_CONST_METHOD6_T(m, ...) \\\n    GMOCK_METHOD6_(typename, const, , m, __VA_ARGS__)\n#define MOCK_CONST_METHOD7_T(m, ...) \\\n    GMOCK_METHOD7_(typename, const, , m, __VA_ARGS__)\n#define MOCK_CONST_METHOD8_T(m, ...) \\\n    GMOCK_METHOD8_(typename, const, , m, __VA_ARGS__)\n#define MOCK_CONST_METHOD9_T(m, ...) \\\n    GMOCK_METHOD9_(typename, const, , m, __VA_ARGS__)\n#define MOCK_CONST_METHOD10_T(m, ...) \\\n    GMOCK_METHOD10_(typename, const, , m, __VA_ARGS__)\n\n#define MOCK_METHOD0_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD0_(, , ct, m, __VA_ARGS__)\n#define MOCK_METHOD1_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD1_(, , ct, m, __VA_ARGS__)\n#define MOCK_METHOD2_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD2_(, , ct, m, __VA_ARGS__)\n#define MOCK_METHOD3_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD3_(, , ct, m, __VA_ARGS__)\n#define MOCK_METHOD4_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD4_(, , ct, m, __VA_ARGS__)\n#define MOCK_METHOD5_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD5_(, , ct, m, __VA_ARGS__)\n#define MOCK_METHOD6_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD6_(, , ct, m, __VA_ARGS__)\n#define MOCK_METHOD7_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD7_(, , ct, m, __VA_ARGS__)\n#define MOCK_METHOD8_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD8_(, , ct, m, __VA_ARGS__)\n#define MOCK_METHOD9_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD9_(, , ct, m, __VA_ARGS__)\n#define MOCK_METHOD10_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD10_(, , ct, m, __VA_ARGS__)\n\n#define MOCK_CONST_METHOD0_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD0_(, const, ct, m, __VA_ARGS__)\n#define MOCK_CONST_METHOD1_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD1_(, const, ct, m, __VA_ARGS__)\n#define MOCK_CONST_METHOD2_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD2_(, const, ct, m, __VA_ARGS__)\n#define MOCK_CONST_METHOD3_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD3_(, const, ct, m, __VA_ARGS__)\n#define MOCK_CONST_METHOD4_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD4_(, const, ct, m, __VA_ARGS__)\n#define MOCK_CONST_METHOD5_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD5_(, const, ct, m, __VA_ARGS__)\n#define MOCK_CONST_METHOD6_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD6_(, const, ct, m, __VA_ARGS__)\n#define MOCK_CONST_METHOD7_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD7_(, const, ct, m, __VA_ARGS__)\n#define MOCK_CONST_METHOD8_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD8_(, const, ct, m, __VA_ARGS__)\n#define MOCK_CONST_METHOD9_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD9_(, const, ct, m, __VA_ARGS__)\n#define MOCK_CONST_METHOD10_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD10_(, const, ct, m, __VA_ARGS__)\n\n#define MOCK_METHOD0_T_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD0_(typename, , ct, m, __VA_ARGS__)\n#define MOCK_METHOD1_T_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD1_(typename, , ct, m, __VA_ARGS__)\n#define MOCK_METHOD2_T_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD2_(typename, , ct, m, __VA_ARGS__)\n#define MOCK_METHOD3_T_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD3_(typename, , ct, m, __VA_ARGS__)\n#define MOCK_METHOD4_T_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD4_(typename, , ct, m, __VA_ARGS__)\n#define MOCK_METHOD5_T_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD5_(typename, , ct, m, __VA_ARGS__)\n#define MOCK_METHOD6_T_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD6_(typename, , ct, m, __VA_ARGS__)\n#define MOCK_METHOD7_T_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD7_(typename, , ct, m, __VA_ARGS__)\n#define MOCK_METHOD8_T_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD8_(typename, , ct, m, __VA_ARGS__)\n#define MOCK_METHOD9_T_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD9_(typename, , ct, m, __VA_ARGS__)\n#define MOCK_METHOD10_T_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD10_(typename, , ct, m, __VA_ARGS__)\n\n#define MOCK_CONST_METHOD0_T_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD0_(typename, const, ct, m, __VA_ARGS__)\n#define MOCK_CONST_METHOD1_T_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD1_(typename, const, ct, m, __VA_ARGS__)\n#define MOCK_CONST_METHOD2_T_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD2_(typename, const, ct, m, __VA_ARGS__)\n#define MOCK_CONST_METHOD3_T_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD3_(typename, const, ct, m, __VA_ARGS__)\n#define MOCK_CONST_METHOD4_T_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD4_(typename, const, ct, m, __VA_ARGS__)\n#define MOCK_CONST_METHOD5_T_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD5_(typename, const, ct, m, __VA_ARGS__)\n#define MOCK_CONST_METHOD6_T_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD6_(typename, const, ct, m, __VA_ARGS__)\n#define MOCK_CONST_METHOD7_T_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD7_(typename, const, ct, m, __VA_ARGS__)\n#define MOCK_CONST_METHOD8_T_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD8_(typename, const, ct, m, __VA_ARGS__)\n#define MOCK_CONST_METHOD9_T_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD9_(typename, const, ct, m, __VA_ARGS__)\n#define MOCK_CONST_METHOD10_T_WITH_CALLTYPE(ct, m, ...) \\\n    GMOCK_METHOD10_(typename, const, ct, m, __VA_ARGS__)\n\n}  // namespace testing\n\n#endif  // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_\n#ifndef THIRD_PARTY_GOOGLETEST_GOOGLEMOCK_INCLUDE_GMOCK_PP_H_\n#define THIRD_PARTY_GOOGLETEST_GOOGLEMOCK_INCLUDE_GMOCK_PP_H_\n\n#undef GMOCK_PP_INTERNAL_USE_MSVC\n#if defined(__clang__)\n#define GMOCK_PP_INTERNAL_USE_MSVC 0\n#elif defined(_MSC_VER)\n// TODO(iserna): Also verify tradional versus comformant preprocessor.\nstatic_assert(\n    _MSC_VER >= 1900,\n    \"MSVC version not supported. There is support for MSVC 14.0 and above.\");\n#define GMOCK_PP_INTERNAL_USE_MSVC 1\n#else\n#define GMOCK_PP_INTERNAL_USE_MSVC 0\n#endif\n\n// Expands and concatenates the arguments. Constructed macros reevaluate.\n#define GMOCK_PP_CAT(_1, _2) GMOCK_PP_INTERNAL_CAT(_1, _2)\n\n// Expands and stringifies the only argument.\n#define GMOCK_PP_STRINGIZE(...) GMOCK_PP_INTERNAL_STRINGIZE(__VA_ARGS__)\n\n// Returns empty. Given a variadic number of arguments.\n#define GMOCK_PP_EMPTY(...)\n\n// Returns a comma. Given a variadic number of arguments.\n#define GMOCK_PP_COMMA(...) ,\n\n// Returns the only argument.\n#define GMOCK_PP_IDENTITY(_1) _1\n\n// MSVC preprocessor collapses __VA_ARGS__ in a single argument, we use a\n// CAT-like directive to force correct evaluation. Each macro has its own.\n#if GMOCK_PP_INTERNAL_USE_MSVC\n\n// Evaluates to the number of arguments after expansion.\n//\n//   #define PAIR x, y\n//\n//   GMOCK_PP_NARG() => 1\n//   GMOCK_PP_NARG(x) => 1\n//   GMOCK_PP_NARG(x, y) => 2\n//   GMOCK_PP_NARG(PAIR) => 2\n//\n// Requires: the number of arguments after expansion is at most 15.\n#define GMOCK_PP_NARG(...)                                                    \\\n  GMOCK_PP_INTERNAL_NARG_CAT(                                                 \\\n      GMOCK_PP_INTERNAL_INTERNAL_16TH(__VA_ARGS__, 15, 14, 13, 12, 11, 10, 9, \\\n                                      8, 7, 6, 5, 4, 3, 2, 1), )\n\n// Returns 1 if the expansion of arguments has an unprotected comma. Otherwise\n// returns 0. Requires no more than 15 unprotected commas.\n#define GMOCK_PP_HAS_COMMA(...)                                               \\\n  GMOCK_PP_INTERNAL_HAS_COMMA_CAT(                                            \\\n      GMOCK_PP_INTERNAL_INTERNAL_16TH(__VA_ARGS__, 1, 1, 1, 1, 1, 1, 1, 1, 1, \\\n                                      1, 1, 1, 1, 1, 0), )\n// Returns the first argument.\n#define GMOCK_PP_HEAD(...) \\\n  GMOCK_PP_INTERNAL_HEAD_CAT(GMOCK_PP_INTERNAL_HEAD(__VA_ARGS__), )\n\n// Returns the tail. A variadic list of all arguments minus the first. Requires\n// at least one argument.\n#define GMOCK_PP_TAIL(...) \\\n  GMOCK_PP_INTERNAL_TAIL_CAT(GMOCK_PP_INTERNAL_TAIL(__VA_ARGS__), )\n\n// Calls CAT(_Macro, NARG(__VA_ARGS__))(__VA_ARGS__)\n#define GMOCK_PP_VARIADIC_CALL(_Macro, ...) \\\n  GMOCK_PP_INTERNAL_VARIADIC_CALL_CAT(      \\\n      GMOCK_PP_CAT(_Macro, GMOCK_PP_NARG(__VA_ARGS__))(__VA_ARGS__), )\n\n#else  // GMOCK_PP_INTERNAL_USE_MSVC\n\n#define GMOCK_PP_NARG(...)                                                   \\\n  GMOCK_PP_INTERNAL_INTERNAL_16TH(__VA_ARGS__, 15, 14, 13, 12, 11, 10, 9, 8, \\\n                                  7, 6, 5, 4, 3, 2, 1)\n#define GMOCK_PP_HAS_COMMA(...)                                              \\\n  GMOCK_PP_INTERNAL_INTERNAL_16TH(__VA_ARGS__, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \\\n                                  1, 1, 1, 1, 0)\n#define GMOCK_PP_HEAD(...) GMOCK_PP_INTERNAL_HEAD(__VA_ARGS__)\n#define GMOCK_PP_TAIL(...) GMOCK_PP_INTERNAL_TAIL(__VA_ARGS__)\n#define GMOCK_PP_VARIADIC_CALL(_Macro, ...) \\\n  GMOCK_PP_CAT(_Macro, GMOCK_PP_NARG(__VA_ARGS__))(__VA_ARGS__)\n\n#endif  // GMOCK_PP_INTERNAL_USE_MSVC\n\n// If the arguments after expansion have no tokens, evaluates to `1`. Otherwise\n// evaluates to `0`.\n//\n// Requires: * the number of arguments after expansion is at most 15.\n//           * If the argument is a macro, it must be able to be called with one\n//             argument.\n//\n// Implementation details:\n//\n// There is one case when it generates a compile error: if the argument is macro\n// that cannot be called with one argument.\n//\n//   #define M(a, b)  // it doesn't matter what it expands to\n//\n//   // Expected: expands to `0`.\n//   // Actual: compile error.\n//   GMOCK_PP_IS_EMPTY(M)\n//\n// There are 4 cases tested:\n//\n// * __VA_ARGS__ possible expansion has no unparen'd commas. Expected 0.\n// * __VA_ARGS__ possible expansion is not enclosed in parenthesis. Expected 0.\n// * __VA_ARGS__ possible expansion is not a macro that ()-evaluates to a comma.\n//   Expected 0\n// * __VA_ARGS__ is empty, or has unparen'd commas, or is enclosed in\n//   parenthesis, or is a macro that ()-evaluates to comma. Expected 1.\n//\n// We trigger detection on '0001', i.e. on empty.\n#define GMOCK_PP_IS_EMPTY(...)                                               \\\n  GMOCK_PP_INTERNAL_IS_EMPTY(GMOCK_PP_HAS_COMMA(__VA_ARGS__),                \\\n                             GMOCK_PP_HAS_COMMA(GMOCK_PP_COMMA __VA_ARGS__), \\\n                             GMOCK_PP_HAS_COMMA(__VA_ARGS__()),              \\\n                             GMOCK_PP_HAS_COMMA(GMOCK_PP_COMMA __VA_ARGS__()))\n\n// Evaluates to _Then if _Cond is 1 and _Else if _Cond is 0.\n#define GMOCK_PP_IF(_Cond, _Then, _Else) \\\n  GMOCK_PP_CAT(GMOCK_PP_INTERNAL_IF_, _Cond)(_Then, _Else)\n\n// Evaluates to the number of arguments after expansion. Identifies 'empty' as\n// 0.\n//\n//   #define PAIR x, y\n//\n//   GMOCK_PP_NARG0() => 0\n//   GMOCK_PP_NARG0(x) => 1\n//   GMOCK_PP_NARG0(x, y) => 2\n//   GMOCK_PP_NARG0(PAIR) => 2\n//\n// Requires: * the number of arguments after expansion is at most 15.\n//           * If the argument is a macro, it must be able to be called with one\n//             argument.\n#define GMOCK_PP_NARG0(...) \\\n  GMOCK_PP_IF(GMOCK_PP_IS_EMPTY(__VA_ARGS__), 0, GMOCK_PP_NARG(__VA_ARGS__))\n\n// Expands to 1 if the first argument starts with something in parentheses,\n// otherwise to 0.\n#define GMOCK_PP_IS_BEGIN_PARENS(...)                    \\\n  GMOCK_PP_INTERNAL_ALTERNATE_HEAD(                      \\\n      GMOCK_PP_CAT(GMOCK_PP_INTERNAL_IBP_IS_VARIADIC_R_, \\\n                   GMOCK_PP_INTERNAL_IBP_IS_VARIADIC_C __VA_ARGS__))\n\n// Expands to 1 is there is only one argument and it is enclosed in parentheses.\n#define GMOCK_PP_IS_ENCLOSED_PARENS(...)             \\\n  GMOCK_PP_IF(GMOCK_PP_IS_BEGIN_PARENS(__VA_ARGS__), \\\n              GMOCK_PP_IS_EMPTY(GMOCK_PP_EMPTY __VA_ARGS__), 0)\n\n// Remove the parens, requires GMOCK_PP_IS_ENCLOSED_PARENS(args) => 1.\n#define GMOCK_PP_REMOVE_PARENS(...) GMOCK_PP_INTERNAL_REMOVE_PARENS __VA_ARGS__\n\n// Expands to _Macro(0, _Data, e1) _Macro(1, _Data, e2) ... _Macro(K -1, _Data,\n// eK) as many of GMOCK_INTERNAL_NARG0 _Tuple.\n// Requires: * |_Macro| can be called with 3 arguments.\n//           * |_Tuple| expansion has no more than 15 elements.\n#define GMOCK_PP_FOR_EACH(_Macro, _Data, _Tuple)                        \\\n  GMOCK_PP_CAT(GMOCK_PP_INTERNAL_FOR_EACH_IMPL_, GMOCK_PP_NARG0 _Tuple) \\\n  (0, _Macro, _Data, _Tuple)\n\n// Expands to _Macro(0, _Data, ) _Macro(1, _Data, ) ... _Macro(K - 1, _Data, )\n// Empty if _K = 0.\n// Requires: * |_Macro| can be called with 3 arguments.\n//           * |_K| literal between 0 and 15\n#define GMOCK_PP_REPEAT(_Macro, _Data, _N)           \\\n  GMOCK_PP_CAT(GMOCK_PP_INTERNAL_FOR_EACH_IMPL_, _N) \\\n  (0, _Macro, _Data, GMOCK_PP_INTENRAL_EMPTY_TUPLE)\n\n// Increments the argument, requires the argument to be between 0 and 15.\n#define GMOCK_PP_INC(_i) GMOCK_PP_CAT(GMOCK_PP_INTERNAL_INC_, _i)\n\n// Returns comma if _i != 0. Requires _i to be between 0 and 15.\n#define GMOCK_PP_COMMA_IF(_i) GMOCK_PP_CAT(GMOCK_PP_INTERNAL_COMMA_IF_, _i)\n\n// Internal details follow. Do not use any of these symbols outside of this\n// file or we will break your code.\n#define GMOCK_PP_INTENRAL_EMPTY_TUPLE (, , , , , , , , , , , , , , , )\n#define GMOCK_PP_INTERNAL_CAT(_1, _2) _1##_2\n#define GMOCK_PP_INTERNAL_STRINGIZE(...) #__VA_ARGS__\n#define GMOCK_PP_INTERNAL_INTERNAL_16TH(_1, _2, _3, _4, _5, _6, _7, _8, _9, \\\n                                        _10, _11, _12, _13, _14, _15, _16,  \\\n                                        ...)                                \\\n  _16\n#define GMOCK_PP_INTERNAL_CAT_5(_1, _2, _3, _4, _5) _1##_2##_3##_4##_5\n#define GMOCK_PP_INTERNAL_IS_EMPTY(_1, _2, _3, _4)                             \\\n  GMOCK_PP_HAS_COMMA(GMOCK_PP_INTERNAL_CAT_5(GMOCK_PP_INTERNAL_IS_EMPTY_CASE_, \\\n                                             _1, _2, _3, _4))\n#define GMOCK_PP_INTERNAL_IS_EMPTY_CASE_0001 ,\n#define GMOCK_PP_INTERNAL_IF_1(_Then, _Else) _Then\n#define GMOCK_PP_INTERNAL_IF_0(_Then, _Else) _Else\n#define GMOCK_PP_INTERNAL_HEAD(_1, ...) _1\n#define GMOCK_PP_INTERNAL_TAIL(_1, ...) __VA_ARGS__\n\n#if GMOCK_PP_INTERNAL_USE_MSVC\n#define GMOCK_PP_INTERNAL_NARG_CAT(_1, _2) GMOCK_PP_INTERNAL_NARG_CAT_I(_1, _2)\n#define GMOCK_PP_INTERNAL_HEAD_CAT(_1, _2) GMOCK_PP_INTERNAL_HEAD_CAT_I(_1, _2)\n#define GMOCK_PP_INTERNAL_HAS_COMMA_CAT(_1, _2) \\\n  GMOCK_PP_INTERNAL_HAS_COMMA_CAT_I(_1, _2)\n#define GMOCK_PP_INTERNAL_TAIL_CAT(_1, _2) GMOCK_PP_INTERNAL_TAIL_CAT_I(_1, _2)\n#define GMOCK_PP_INTERNAL_VARIADIC_CALL_CAT(_1, _2) \\\n  GMOCK_PP_INTERNAL_VARIADIC_CALL_CAT_I(_1, _2)\n#define GMOCK_PP_INTERNAL_NARG_CAT_I(_1, _2) _1##_2\n#define GMOCK_PP_INTERNAL_HEAD_CAT_I(_1, _2) _1##_2\n#define GMOCK_PP_INTERNAL_HAS_COMMA_CAT_I(_1, _2) _1##_2\n#define GMOCK_PP_INTERNAL_TAIL_CAT_I(_1, _2) _1##_2\n#define GMOCK_PP_INTERNAL_VARIADIC_CALL_CAT_I(_1, _2) _1##_2\n#define GMOCK_PP_INTERNAL_ALTERNATE_HEAD(...) \\\n  GMOCK_PP_INTERNAL_ALTERNATE_HEAD_CAT(GMOCK_PP_HEAD(__VA_ARGS__), )\n#define GMOCK_PP_INTERNAL_ALTERNATE_HEAD_CAT(_1, _2) \\\n  GMOCK_PP_INTERNAL_ALTERNATE_HEAD_CAT_I(_1, _2)\n#define GMOCK_PP_INTERNAL_ALTERNATE_HEAD_CAT_I(_1, _2) _1##_2\n#else  // GMOCK_PP_INTERNAL_USE_MSVC\n#define GMOCK_PP_INTERNAL_ALTERNATE_HEAD(...) GMOCK_PP_HEAD(__VA_ARGS__)\n#endif  // GMOCK_PP_INTERNAL_USE_MSVC\n\n#define GMOCK_PP_INTERNAL_IBP_IS_VARIADIC_C(...) 1 _\n#define GMOCK_PP_INTERNAL_IBP_IS_VARIADIC_R_1 1,\n#define GMOCK_PP_INTERNAL_IBP_IS_VARIADIC_R_GMOCK_PP_INTERNAL_IBP_IS_VARIADIC_C \\\n  0,\n#define GMOCK_PP_INTERNAL_REMOVE_PARENS(...) __VA_ARGS__\n#define GMOCK_PP_INTERNAL_INC_0 1\n#define GMOCK_PP_INTERNAL_INC_1 2\n#define GMOCK_PP_INTERNAL_INC_2 3\n#define GMOCK_PP_INTERNAL_INC_3 4\n#define GMOCK_PP_INTERNAL_INC_4 5\n#define GMOCK_PP_INTERNAL_INC_5 6\n#define GMOCK_PP_INTERNAL_INC_6 7\n#define GMOCK_PP_INTERNAL_INC_7 8\n#define GMOCK_PP_INTERNAL_INC_8 9\n#define GMOCK_PP_INTERNAL_INC_9 10\n#define GMOCK_PP_INTERNAL_INC_10 11\n#define GMOCK_PP_INTERNAL_INC_11 12\n#define GMOCK_PP_INTERNAL_INC_12 13\n#define GMOCK_PP_INTERNAL_INC_13 14\n#define GMOCK_PP_INTERNAL_INC_14 15\n#define GMOCK_PP_INTERNAL_INC_15 16\n#define GMOCK_PP_INTERNAL_COMMA_IF_0\n#define GMOCK_PP_INTERNAL_COMMA_IF_1 ,\n#define GMOCK_PP_INTERNAL_COMMA_IF_2 ,\n#define GMOCK_PP_INTERNAL_COMMA_IF_3 ,\n#define GMOCK_PP_INTERNAL_COMMA_IF_4 ,\n#define GMOCK_PP_INTERNAL_COMMA_IF_5 ,\n#define GMOCK_PP_INTERNAL_COMMA_IF_6 ,\n#define GMOCK_PP_INTERNAL_COMMA_IF_7 ,\n#define GMOCK_PP_INTERNAL_COMMA_IF_8 ,\n#define GMOCK_PP_INTERNAL_COMMA_IF_9 ,\n#define GMOCK_PP_INTERNAL_COMMA_IF_10 ,\n#define GMOCK_PP_INTERNAL_COMMA_IF_11 ,\n#define GMOCK_PP_INTERNAL_COMMA_IF_12 ,\n#define GMOCK_PP_INTERNAL_COMMA_IF_13 ,\n#define GMOCK_PP_INTERNAL_COMMA_IF_14 ,\n#define GMOCK_PP_INTERNAL_COMMA_IF_15 ,\n#define GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, _element) \\\n  _Macro(_i, _Data, _element)\n#define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_0(_i, _Macro, _Data, _Tuple)\n#define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_1(_i, _Macro, _Data, _Tuple) \\\n  GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple)\n#define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_2(_i, _Macro, _Data, _Tuple)    \\\n  GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \\\n  GMOCK_PP_INTERNAL_FOR_EACH_IMPL_1(GMOCK_PP_INC(_i), _Macro, _Data,    \\\n                                    (GMOCK_PP_TAIL _Tuple))\n#define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_3(_i, _Macro, _Data, _Tuple)    \\\n  GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \\\n  GMOCK_PP_INTERNAL_FOR_EACH_IMPL_2(GMOCK_PP_INC(_i), _Macro, _Data,    \\\n                                    (GMOCK_PP_TAIL _Tuple))\n#define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_4(_i, _Macro, _Data, _Tuple)    \\\n  GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \\\n  GMOCK_PP_INTERNAL_FOR_EACH_IMPL_3(GMOCK_PP_INC(_i), _Macro, _Data,    \\\n                                    (GMOCK_PP_TAIL _Tuple))\n#define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_5(_i, _Macro, _Data, _Tuple)    \\\n  GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \\\n  GMOCK_PP_INTERNAL_FOR_EACH_IMPL_4(GMOCK_PP_INC(_i), _Macro, _Data,    \\\n                                    (GMOCK_PP_TAIL _Tuple))\n#define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_6(_i, _Macro, _Data, _Tuple)    \\\n  GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \\\n  GMOCK_PP_INTERNAL_FOR_EACH_IMPL_5(GMOCK_PP_INC(_i), _Macro, _Data,    \\\n                                    (GMOCK_PP_TAIL _Tuple))\n#define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_7(_i, _Macro, _Data, _Tuple)    \\\n  GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \\\n  GMOCK_PP_INTERNAL_FOR_EACH_IMPL_6(GMOCK_PP_INC(_i), _Macro, _Data,    \\\n                                    (GMOCK_PP_TAIL _Tuple))\n#define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_8(_i, _Macro, _Data, _Tuple)    \\\n  GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \\\n  GMOCK_PP_INTERNAL_FOR_EACH_IMPL_7(GMOCK_PP_INC(_i), _Macro, _Data,    \\\n                                    (GMOCK_PP_TAIL _Tuple))\n#define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_9(_i, _Macro, _Data, _Tuple)    \\\n  GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \\\n  GMOCK_PP_INTERNAL_FOR_EACH_IMPL_8(GMOCK_PP_INC(_i), _Macro, _Data,    \\\n                                    (GMOCK_PP_TAIL _Tuple))\n#define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_10(_i, _Macro, _Data, _Tuple)   \\\n  GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \\\n  GMOCK_PP_INTERNAL_FOR_EACH_IMPL_9(GMOCK_PP_INC(_i), _Macro, _Data,    \\\n                                    (GMOCK_PP_TAIL _Tuple))\n#define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_11(_i, _Macro, _Data, _Tuple)   \\\n  GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \\\n  GMOCK_PP_INTERNAL_FOR_EACH_IMPL_10(GMOCK_PP_INC(_i), _Macro, _Data,   \\\n                                     (GMOCK_PP_TAIL _Tuple))\n#define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_12(_i, _Macro, _Data, _Tuple)   \\\n  GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \\\n  GMOCK_PP_INTERNAL_FOR_EACH_IMPL_11(GMOCK_PP_INC(_i), _Macro, _Data,   \\\n                                     (GMOCK_PP_TAIL _Tuple))\n#define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_13(_i, _Macro, _Data, _Tuple)   \\\n  GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \\\n  GMOCK_PP_INTERNAL_FOR_EACH_IMPL_12(GMOCK_PP_INC(_i), _Macro, _Data,   \\\n                                     (GMOCK_PP_TAIL _Tuple))\n#define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_14(_i, _Macro, _Data, _Tuple)   \\\n  GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \\\n  GMOCK_PP_INTERNAL_FOR_EACH_IMPL_13(GMOCK_PP_INC(_i), _Macro, _Data,   \\\n                                     (GMOCK_PP_TAIL _Tuple))\n#define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_15(_i, _Macro, _Data, _Tuple)   \\\n  GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \\\n  GMOCK_PP_INTERNAL_FOR_EACH_IMPL_14(GMOCK_PP_INC(_i), _Macro, _Data,   \\\n                                     (GMOCK_PP_TAIL _Tuple))\n\n#endif  // THIRD_PARTY_GOOGLETEST_GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_PP_H_\n\n#define MOCK_METHOD(...) \\\n  GMOCK_PP_VARIADIC_CALL(GMOCK_INTERNAL_MOCK_METHOD_ARG_, __VA_ARGS__)\n\n#define GMOCK_INTERNAL_MOCK_METHOD_ARG_1(...) \\\n  GMOCK_INTERNAL_WRONG_ARITY(__VA_ARGS__)\n\n#define GMOCK_INTERNAL_MOCK_METHOD_ARG_2(...) \\\n  GMOCK_INTERNAL_WRONG_ARITY(__VA_ARGS__)\n\n#define GMOCK_INTERNAL_MOCK_METHOD_ARG_3(_Ret, _MethodName, _Args) \\\n  GMOCK_INTERNAL_MOCK_METHOD_ARG_4(_Ret, _MethodName, _Args, ())\n\n#define GMOCK_INTERNAL_MOCK_METHOD_ARG_4(_Ret, _MethodName, _Args, _Spec)     \\\n  GMOCK_INTERNAL_ASSERT_PARENTHESIS(_Args);                                   \\\n  GMOCK_INTERNAL_ASSERT_PARENTHESIS(_Spec);                                   \\\n  GMOCK_INTERNAL_ASSERT_VALID_SIGNATURE(                                      \\\n      GMOCK_PP_NARG0 _Args, GMOCK_INTERNAL_SIGNATURE(_Ret, _Args));           \\\n  GMOCK_INTERNAL_ASSERT_VALID_SPEC(_Spec)                                     \\\n  GMOCK_INTERNAL_MOCK_METHOD_IMPL(                                            \\\n      GMOCK_PP_NARG0 _Args, _MethodName, GMOCK_INTERNAL_HAS_CONST(_Spec),     \\\n      GMOCK_INTERNAL_HAS_OVERRIDE(_Spec), GMOCK_INTERNAL_HAS_FINAL(_Spec),    \\\n      GMOCK_INTERNAL_HAS_NOEXCEPT(_Spec), GMOCK_INTERNAL_GET_CALLTYPE(_Spec), \\\n      (GMOCK_INTERNAL_SIGNATURE(_Ret, _Args)))\n\n#define GMOCK_INTERNAL_MOCK_METHOD_ARG_5(...) \\\n  GMOCK_INTERNAL_WRONG_ARITY(__VA_ARGS__)\n\n#define GMOCK_INTERNAL_MOCK_METHOD_ARG_6(...) \\\n  GMOCK_INTERNAL_WRONG_ARITY(__VA_ARGS__)\n\n#define GMOCK_INTERNAL_MOCK_METHOD_ARG_7(...) \\\n  GMOCK_INTERNAL_WRONG_ARITY(__VA_ARGS__)\n\n#define GMOCK_INTERNAL_WRONG_ARITY(...)                                      \\\n  static_assert(                                                             \\\n      false,                                                                 \\\n      \"MOCK_METHOD must be called with 3 or 4 arguments. _Ret, \"             \\\n      \"_MethodName, _Args and optionally _Spec. _Args and _Spec must be \"    \\\n      \"enclosed in parentheses. If _Ret is a type with unprotected commas, \" \\\n      \"it must also be enclosed in parentheses.\")\n\n#define GMOCK_INTERNAL_ASSERT_PARENTHESIS(_Tuple) \\\n  static_assert(                                  \\\n      GMOCK_PP_IS_ENCLOSED_PARENS(_Tuple),        \\\n      GMOCK_PP_STRINGIZE(_Tuple) \" should be enclosed in parentheses.\")\n\n#define GMOCK_INTERNAL_ASSERT_VALID_SIGNATURE(_N, ...)                 \\\n  static_assert(                                                       \\\n      std::is_function<__VA_ARGS__>::value,                            \\\n      \"Signature must be a function type, maybe return type contains \" \\\n      \"unprotected comma.\");                                           \\\n  static_assert(                                                       \\\n      ::testing::tuple_size<typename ::testing::internal::Function<    \\\n              __VA_ARGS__>::ArgumentTuple>::value == _N,               \\\n      \"This method does not take \" GMOCK_PP_STRINGIZE(                 \\\n          _N) \" arguments. Parenthesize all types with unproctected commas.\")\n\n#define GMOCK_INTERNAL_ASSERT_VALID_SPEC(_Spec) \\\n  GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_ASSERT_VALID_SPEC_ELEMENT, ~, _Spec)\n\n#define GMOCK_INTERNAL_MOCK_METHOD_IMPL(_N, _MethodName, _Constness,           \\\n                                        _Override, _Final, _Noexcept,          \\\n                                        _CallType, _Signature)                 \\\n  typename ::testing::internal::Function<GMOCK_PP_REMOVE_PARENS(               \\\n      _Signature)>::Result                                                     \\\n  GMOCK_INTERNAL_EXPAND(_CallType)                                             \\\n      _MethodName(GMOCK_PP_REPEAT(GMOCK_INTERNAL_PARAMETER, _Signature, _N))   \\\n          GMOCK_PP_IF(_Constness, const, ) GMOCK_PP_IF(_Noexcept, noexcept, )  \\\n              GMOCK_PP_IF(_Override, override, )                               \\\n                  GMOCK_PP_IF(_Final, final, ) {                               \\\n    GMOCK_MOCKER_(_N, _Constness, _MethodName)                                 \\\n        .SetOwnerAndName(this, #_MethodName);                                  \\\n    return GMOCK_MOCKER_(_N, _Constness, _MethodName)                          \\\n        .Invoke(GMOCK_PP_REPEAT(GMOCK_INTERNAL_FORWARD_ARG, _Signature, _N));  \\\n  }                                                                            \\\n  ::testing::MockSpec<GMOCK_PP_REMOVE_PARENS(_Signature)> gmock_##_MethodName( \\\n      GMOCK_PP_REPEAT(GMOCK_INTERNAL_MATCHER_PARAMETER, _Signature, _N))       \\\n      GMOCK_PP_IF(_Constness, const, ) {                                       \\\n    GMOCK_MOCKER_(_N, _Constness, _MethodName).RegisterOwner(this);            \\\n    return GMOCK_MOCKER_(_N, _Constness, _MethodName)                          \\\n        .With(GMOCK_PP_REPEAT(GMOCK_INTERNAL_MATCHER_ARGUMENT, , _N));         \\\n  }                                                                            \\\n  ::testing::MockSpec<GMOCK_PP_REMOVE_PARENS(_Signature)> gmock_##_MethodName( \\\n      const ::testing::internal::WithoutMatchers&,                             \\\n      GMOCK_PP_IF(_Constness, const, )::testing::internal::Function<           \\\n          GMOCK_PP_REMOVE_PARENS(_Signature)>*)                                \\\n      const GMOCK_PP_IF(_Noexcept, noexcept, ) {                               \\\n    return GMOCK_PP_CAT(::testing::internal::AdjustConstness_,                 \\\n                        GMOCK_PP_IF(_Constness, const, ))(this)                \\\n        ->gmock_##_MethodName(GMOCK_PP_REPEAT(                                 \\\n            GMOCK_INTERNAL_A_MATCHER_ARGUMENT, _Signature, _N));               \\\n  }                                                                            \\\n  mutable ::testing::FunctionMocker<GMOCK_PP_REMOVE_PARENS(_Signature)>        \\\n      GMOCK_MOCKER_(_N, _Constness, _MethodName)\n\n#define GMOCK_INTERNAL_EXPAND(...) __VA_ARGS__\n\n// Five Valid modifiers.\n#define GMOCK_INTERNAL_HAS_CONST(_Tuple) \\\n  GMOCK_PP_HAS_COMMA(GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_DETECT_CONST, ~, _Tuple))\n\n#define GMOCK_INTERNAL_HAS_OVERRIDE(_Tuple) \\\n  GMOCK_PP_HAS_COMMA(                       \\\n      GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_DETECT_OVERRIDE, ~, _Tuple))\n\n#define GMOCK_INTERNAL_HAS_FINAL(_Tuple) \\\n  GMOCK_PP_HAS_COMMA(GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_DETECT_FINAL, ~, _Tuple))\n\n#define GMOCK_INTERNAL_HAS_NOEXCEPT(_Tuple) \\\n  GMOCK_PP_HAS_COMMA(                       \\\n      GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_DETECT_NOEXCEPT, ~, _Tuple))\n\n#define GMOCK_INTERNAL_GET_CALLTYPE(_Tuple) \\\n  GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_GET_CALLTYPE_IMPL, ~, _Tuple)\n\n#define GMOCK_INTERNAL_ASSERT_VALID_SPEC_ELEMENT(_i, _, _elem)            \\\n  static_assert(                                                          \\\n      (GMOCK_PP_HAS_COMMA(GMOCK_INTERNAL_DETECT_CONST(_i, _, _elem)) +    \\\n       GMOCK_PP_HAS_COMMA(GMOCK_INTERNAL_DETECT_OVERRIDE(_i, _, _elem)) + \\\n       GMOCK_PP_HAS_COMMA(GMOCK_INTERNAL_DETECT_FINAL(_i, _, _elem)) +    \\\n       GMOCK_PP_HAS_COMMA(GMOCK_INTERNAL_DETECT_NOEXCEPT(_i, _, _elem)) + \\\n       GMOCK_INTERNAL_IS_CALLTYPE(_elem)) == 1,                           \\\n      GMOCK_PP_STRINGIZE(                                                 \\\n          _elem) \" cannot be recognized as a valid specification modifier.\");\n\n// Modifiers implementation.\n#define GMOCK_INTERNAL_DETECT_CONST(_i, _, _elem) \\\n  GMOCK_PP_CAT(GMOCK_INTERNAL_DETECT_CONST_I_, _elem)\n\n#define GMOCK_INTERNAL_DETECT_CONST_I_const ,\n\n#define GMOCK_INTERNAL_DETECT_OVERRIDE(_i, _, _elem) \\\n  GMOCK_PP_CAT(GMOCK_INTERNAL_DETECT_OVERRIDE_I_, _elem)\n\n#define GMOCK_INTERNAL_DETECT_OVERRIDE_I_override ,\n\n#define GMOCK_INTERNAL_DETECT_FINAL(_i, _, _elem) \\\n  GMOCK_PP_CAT(GMOCK_INTERNAL_DETECT_FINAL_I_, _elem)\n\n#define GMOCK_INTERNAL_DETECT_FINAL_I_final ,\n\n// TODO(iserna): Maybe noexcept should accept an argument here as well.\n#define GMOCK_INTERNAL_DETECT_NOEXCEPT(_i, _, _elem) \\\n  GMOCK_PP_CAT(GMOCK_INTERNAL_DETECT_NOEXCEPT_I_, _elem)\n\n#define GMOCK_INTERNAL_DETECT_NOEXCEPT_I_noexcept ,\n\n#define GMOCK_INTERNAL_GET_CALLTYPE_IMPL(_i, _, _elem)           \\\n  GMOCK_PP_IF(GMOCK_INTERNAL_IS_CALLTYPE(_elem),                 \\\n              GMOCK_INTERNAL_GET_VALUE_CALLTYPE, GMOCK_PP_EMPTY) \\\n  (_elem)\n\n// TODO(iserna): GMOCK_INTERNAL_IS_CALLTYPE and\n// GMOCK_INTERNAL_GET_VALUE_CALLTYPE needed more expansions to work on windows\n// maybe they can be simplified somehow.\n#define GMOCK_INTERNAL_IS_CALLTYPE(_arg) \\\n  GMOCK_INTERNAL_IS_CALLTYPE_I(          \\\n      GMOCK_PP_CAT(GMOCK_INTERNAL_IS_CALLTYPE_HELPER_, _arg))\n#define GMOCK_INTERNAL_IS_CALLTYPE_I(_arg) GMOCK_PP_IS_ENCLOSED_PARENS(_arg)\n\n#define GMOCK_INTERNAL_GET_VALUE_CALLTYPE(_arg) \\\n  GMOCK_INTERNAL_GET_VALUE_CALLTYPE_I(          \\\n      GMOCK_PP_CAT(GMOCK_INTERNAL_IS_CALLTYPE_HELPER_, _arg))\n#define GMOCK_INTERNAL_GET_VALUE_CALLTYPE_I(_arg) \\\n  GMOCK_PP_CAT(GMOCK_PP_IDENTITY, _arg)\n\n#define GMOCK_INTERNAL_IS_CALLTYPE_HELPER_Calltype\n\n#define GMOCK_INTERNAL_SIGNATURE(_Ret, _Args)                         \\\n  GMOCK_PP_IF(GMOCK_PP_IS_BEGIN_PARENS(_Ret), GMOCK_PP_REMOVE_PARENS, \\\n              GMOCK_PP_IDENTITY)                                      \\\n  (_Ret)(GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_GET_TYPE, _, _Args))\n\n#define GMOCK_INTERNAL_GET_TYPE(_i, _, _elem)                          \\\n  GMOCK_PP_COMMA_IF(_i)                                                \\\n  GMOCK_PP_IF(GMOCK_PP_IS_BEGIN_PARENS(_elem), GMOCK_PP_REMOVE_PARENS, \\\n              GMOCK_PP_IDENTITY)                                       \\\n  (_elem)\n\n#define GMOCK_INTERNAL_PARAMETER(_i, _Signature, _)        \\\n  GMOCK_PP_COMMA_IF(_i)                                    \\\n  GMOCK_INTERNAL_ARG_O(typename, GMOCK_PP_INC(_i),         \\\n                       GMOCK_PP_REMOVE_PARENS(_Signature)) \\\n  gmock_a##_i\n\n#define GMOCK_INTERNAL_FORWARD_ARG(_i, _Signature, _)                       \\\n  GMOCK_PP_COMMA_IF(_i)                                                     \\\n  ::std::forward<GMOCK_INTERNAL_ARG_O(typename, GMOCK_PP_INC(_i),           \\\n                                      GMOCK_PP_REMOVE_PARENS(_Signature))>( \\\n      gmock_a##_i)\n\n#define GMOCK_INTERNAL_MATCHER_PARAMETER(_i, _Signature, _)    \\\n  GMOCK_PP_COMMA_IF(_i)                                        \\\n  GMOCK_INTERNAL_MATCHER_O(typename, GMOCK_PP_INC(_i),         \\\n                           GMOCK_PP_REMOVE_PARENS(_Signature)) \\\n  gmock_a##_i\n\n#define GMOCK_INTERNAL_MATCHER_ARGUMENT(_i, _1, _2) \\\n  GMOCK_PP_COMMA_IF(_i)                             \\\n  gmock_a##_i\n\n#define GMOCK_INTERNAL_A_MATCHER_ARGUMENT(_i, _Signature, _)    \\\n  GMOCK_PP_COMMA_IF(_i)                                         \\\n  ::testing::A<GMOCK_INTERNAL_ARG_O(typename, GMOCK_PP_INC(_i), \\\n                                    GMOCK_PP_REMOVE_PARENS(_Signature))>()\n\n#define GMOCK_INTERNAL_ARG_O(_tn, _i, ...) GMOCK_ARG_(_tn, _i, __VA_ARGS__)\n\n#define GMOCK_INTERNAL_MATCHER_O(_tn, _i, ...) \\\n  GMOCK_MATCHER_(_tn, _i, __VA_ARGS__)\n\n#endif  // THIRD_PARTY_GOOGLETEST_GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_FUNCTION_MOCKER_H_\n// This file was GENERATED by command:\n//     pump.py gmock-generated-actions.h.pump\n// DO NOT EDIT BY HAND!!!\n\n// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n// Google Mock - a framework for writing C++ mock classes.\n//\n// This file implements some commonly used variadic actions.\n\n// GOOGLETEST_CM0002 DO NOT DELETE\n\n#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_\n#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_\n\n#include <memory>\n#include <utility>\n\n\nnamespace testing {\nnamespace internal {\n\n// A macro from the ACTION* family (defined later in this file)\n// defines an action that can be used in a mock function.  Typically,\n// these actions only care about a subset of the arguments of the mock\n// function.  For example, if such an action only uses the second\n// argument, it can be used in any mock function that takes >= 2\n// arguments where the type of the second argument is compatible.\n//\n// Therefore, the action implementation must be prepared to take more\n// arguments than it needs.  The ExcessiveArg type is used to\n// represent those excessive arguments.  In order to keep the compiler\n// error messages tractable, we define it in the testing namespace\n// instead of testing::internal.  However, this is an INTERNAL TYPE\n// and subject to change without notice, so a user MUST NOT USE THIS\n// TYPE DIRECTLY.\nstruct ExcessiveArg {};\n\n// A helper class needed for implementing the ACTION* macros.\ntemplate <typename Result, class Impl>\nclass ActionHelper {\n public:\n  static Result Perform(Impl* impl, const ::std::tuple<>& args) {\n    return impl->template gmock_PerformImpl<>(args, ExcessiveArg(),\n        ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),\n        ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),\n        ExcessiveArg());\n  }\n\n  template <typename A0>\n  static Result Perform(Impl* impl, const ::std::tuple<A0>& args) {\n    return impl->template gmock_PerformImpl<A0>(args, std::get<0>(args),\n        ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),\n        ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),\n        ExcessiveArg());\n  }\n\n  template <typename A0, typename A1>\n  static Result Perform(Impl* impl, const ::std::tuple<A0, A1>& args) {\n    return impl->template gmock_PerformImpl<A0, A1>(args, std::get<0>(args),\n        std::get<1>(args), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),\n        ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),\n        ExcessiveArg());\n  }\n\n  template <typename A0, typename A1, typename A2>\n  static Result Perform(Impl* impl, const ::std::tuple<A0, A1, A2>& args) {\n    return impl->template gmock_PerformImpl<A0, A1, A2>(args,\n        std::get<0>(args), std::get<1>(args), std::get<2>(args),\n        ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),\n        ExcessiveArg(), ExcessiveArg(), ExcessiveArg());\n  }\n\n  template <typename A0, typename A1, typename A2, typename A3>\n  static Result Perform(Impl* impl, const ::std::tuple<A0, A1, A2, A3>& args) {\n    return impl->template gmock_PerformImpl<A0, A1, A2, A3>(args,\n        std::get<0>(args), std::get<1>(args), std::get<2>(args),\n        std::get<3>(args), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),\n        ExcessiveArg(), ExcessiveArg(), ExcessiveArg());\n  }\n\n  template <typename A0, typename A1, typename A2, typename A3, typename A4>\n  static Result Perform(Impl* impl, const ::std::tuple<A0, A1, A2, A3,\n      A4>& args) {\n    return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4>(args,\n        std::get<0>(args), std::get<1>(args), std::get<2>(args),\n        std::get<3>(args), std::get<4>(args), ExcessiveArg(), ExcessiveArg(),\n        ExcessiveArg(), ExcessiveArg(), ExcessiveArg());\n  }\n\n  template <typename A0, typename A1, typename A2, typename A3, typename A4,\n      typename A5>\n  static Result Perform(Impl* impl, const ::std::tuple<A0, A1, A2, A3, A4,\n      A5>& args) {\n    return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4, A5>(args,\n        std::get<0>(args), std::get<1>(args), std::get<2>(args),\n        std::get<3>(args), std::get<4>(args), std::get<5>(args),\n        ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg());\n  }\n\n  template <typename A0, typename A1, typename A2, typename A3, typename A4,\n      typename A5, typename A6>\n  static Result Perform(Impl* impl, const ::std::tuple<A0, A1, A2, A3, A4, A5,\n      A6>& args) {\n    return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4, A5, A6>(args,\n        std::get<0>(args), std::get<1>(args), std::get<2>(args),\n        std::get<3>(args), std::get<4>(args), std::get<5>(args),\n        std::get<6>(args), ExcessiveArg(), ExcessiveArg(), ExcessiveArg());\n  }\n\n  template <typename A0, typename A1, typename A2, typename A3, typename A4,\n      typename A5, typename A6, typename A7>\n  static Result Perform(Impl* impl, const ::std::tuple<A0, A1, A2, A3, A4, A5,\n      A6, A7>& args) {\n    return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4, A5, A6,\n        A7>(args, std::get<0>(args), std::get<1>(args), std::get<2>(args),\n        std::get<3>(args), std::get<4>(args), std::get<5>(args),\n        std::get<6>(args), std::get<7>(args), ExcessiveArg(), ExcessiveArg());\n  }\n\n  template <typename A0, typename A1, typename A2, typename A3, typename A4,\n      typename A5, typename A6, typename A7, typename A8>\n  static Result Perform(Impl* impl, const ::std::tuple<A0, A1, A2, A3, A4, A5,\n      A6, A7, A8>& args) {\n    return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4, A5, A6, A7,\n        A8>(args, std::get<0>(args), std::get<1>(args), std::get<2>(args),\n        std::get<3>(args), std::get<4>(args), std::get<5>(args),\n        std::get<6>(args), std::get<7>(args), std::get<8>(args),\n        ExcessiveArg());\n  }\n\n  template <typename A0, typename A1, typename A2, typename A3, typename A4,\n      typename A5, typename A6, typename A7, typename A8, typename A9>\n  static Result Perform(Impl* impl, const ::std::tuple<A0, A1, A2, A3, A4, A5,\n      A6, A7, A8, A9>& args) {\n    return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4, A5, A6, A7, A8,\n        A9>(args, std::get<0>(args), std::get<1>(args), std::get<2>(args),\n        std::get<3>(args), std::get<4>(args), std::get<5>(args),\n        std::get<6>(args), std::get<7>(args), std::get<8>(args),\n        std::get<9>(args));\n  }\n};\n\n}  // namespace internal\n}  // namespace testing\n\n// The ACTION* family of macros can be used in a namespace scope to\n// define custom actions easily.  The syntax:\n//\n//   ACTION(name) { statements; }\n//\n// will define an action with the given name that executes the\n// statements.  The value returned by the statements will be used as\n// the return value of the action.  Inside the statements, you can\n// refer to the K-th (0-based) argument of the mock function by\n// 'argK', and refer to its type by 'argK_type'.  For example:\n//\n//   ACTION(IncrementArg1) {\n//     arg1_type temp = arg1;\n//     return ++(*temp);\n//   }\n//\n// allows you to write\n//\n//   ...WillOnce(IncrementArg1());\n//\n// You can also refer to the entire argument tuple and its type by\n// 'args' and 'args_type', and refer to the mock function type and its\n// return type by 'function_type' and 'return_type'.\n//\n// Note that you don't need to specify the types of the mock function\n// arguments.  However rest assured that your code is still type-safe:\n// you'll get a compiler error if *arg1 doesn't support the ++\n// operator, or if the type of ++(*arg1) isn't compatible with the\n// mock function's return type, for example.\n//\n// Sometimes you'll want to parameterize the action.   For that you can use\n// another macro:\n//\n//   ACTION_P(name, param_name) { statements; }\n//\n// For example:\n//\n//   ACTION_P(Add, n) { return arg0 + n; }\n//\n// will allow you to write:\n//\n//   ...WillOnce(Add(5));\n//\n// Note that you don't need to provide the type of the parameter\n// either.  If you need to reference the type of a parameter named\n// 'foo', you can write 'foo_type'.  For example, in the body of\n// ACTION_P(Add, n) above, you can write 'n_type' to refer to the type\n// of 'n'.\n//\n// We also provide ACTION_P2, ACTION_P3, ..., up to ACTION_P10 to support\n// multi-parameter actions.\n//\n// For the purpose of typing, you can view\n//\n//   ACTION_Pk(Foo, p1, ..., pk) { ... }\n//\n// as shorthand for\n//\n//   template <typename p1_type, ..., typename pk_type>\n//   FooActionPk<p1_type, ..., pk_type> Foo(p1_type p1, ..., pk_type pk) { ... }\n//\n// In particular, you can provide the template type arguments\n// explicitly when invoking Foo(), as in Foo<long, bool>(5, false);\n// although usually you can rely on the compiler to infer the types\n// for you automatically.  You can assign the result of expression\n// Foo(p1, ..., pk) to a variable of type FooActionPk<p1_type, ...,\n// pk_type>.  This can be useful when composing actions.\n//\n// You can also overload actions with different numbers of parameters:\n//\n//   ACTION_P(Plus, a) { ... }\n//   ACTION_P2(Plus, a, b) { ... }\n//\n// While it's tempting to always use the ACTION* macros when defining\n// a new action, you should also consider implementing ActionInterface\n// or using MakePolymorphicAction() instead, especially if you need to\n// use the action a lot.  While these approaches require more work,\n// they give you more control on the types of the mock function\n// arguments and the action parameters, which in general leads to\n// better compiler error messages that pay off in the long run.  They\n// also allow overloading actions based on parameter types (as opposed\n// to just based on the number of parameters).\n//\n// CAVEAT:\n//\n// ACTION*() can only be used in a namespace scope.  The reason is\n// that C++ doesn't yet allow function-local types to be used to\n// instantiate templates.  The up-coming C++0x standard will fix this.\n// Once that's done, we'll consider supporting using ACTION*() inside\n// a function.\n//\n// MORE INFORMATION:\n//\n// To learn more about using these macros, please search for 'ACTION' on\n// https://github.com/google/googletest/blob/master/googlemock/docs/CookBook.md\n\n// An internal macro needed for implementing ACTION*().\n#define GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_\\\n    const args_type& args GTEST_ATTRIBUTE_UNUSED_, \\\n    arg0_type arg0 GTEST_ATTRIBUTE_UNUSED_, \\\n    arg1_type arg1 GTEST_ATTRIBUTE_UNUSED_, \\\n    arg2_type arg2 GTEST_ATTRIBUTE_UNUSED_, \\\n    arg3_type arg3 GTEST_ATTRIBUTE_UNUSED_, \\\n    arg4_type arg4 GTEST_ATTRIBUTE_UNUSED_, \\\n    arg5_type arg5 GTEST_ATTRIBUTE_UNUSED_, \\\n    arg6_type arg6 GTEST_ATTRIBUTE_UNUSED_, \\\n    arg7_type arg7 GTEST_ATTRIBUTE_UNUSED_, \\\n    arg8_type arg8 GTEST_ATTRIBUTE_UNUSED_, \\\n    arg9_type arg9 GTEST_ATTRIBUTE_UNUSED_\n\n// Sometimes you want to give an action explicit template parameters\n// that cannot be inferred from its value parameters.  ACTION() and\n// ACTION_P*() don't support that.  ACTION_TEMPLATE() remedies that\n// and can be viewed as an extension to ACTION() and ACTION_P*().\n//\n// The syntax:\n//\n//   ACTION_TEMPLATE(ActionName,\n//                   HAS_m_TEMPLATE_PARAMS(kind1, name1, ..., kind_m, name_m),\n//                   AND_n_VALUE_PARAMS(p1, ..., p_n)) { statements; }\n//\n// defines an action template that takes m explicit template\n// parameters and n value parameters.  name_i is the name of the i-th\n// template parameter, and kind_i specifies whether it's a typename,\n// an integral constant, or a template.  p_i is the name of the i-th\n// value parameter.\n//\n// Example:\n//\n//   // DuplicateArg<k, T>(output) converts the k-th argument of the mock\n//   // function to type T and copies it to *output.\n//   ACTION_TEMPLATE(DuplicateArg,\n//                   HAS_2_TEMPLATE_PARAMS(int, k, typename, T),\n//                   AND_1_VALUE_PARAMS(output)) {\n//     *output = T(::std::get<k>(args));\n//   }\n//   ...\n//     int n;\n//     EXPECT_CALL(mock, Foo(_, _))\n//         .WillOnce(DuplicateArg<1, unsigned char>(&n));\n//\n// To create an instance of an action template, write:\n//\n//   ActionName<t1, ..., t_m>(v1, ..., v_n)\n//\n// where the ts are the template arguments and the vs are the value\n// arguments.  The value argument types are inferred by the compiler.\n// If you want to explicitly specify the value argument types, you can\n// provide additional template arguments:\n//\n//   ActionName<t1, ..., t_m, u1, ..., u_k>(v1, ..., v_n)\n//\n// where u_i is the desired type of v_i.\n//\n// ACTION_TEMPLATE and ACTION/ACTION_P* can be overloaded on the\n// number of value parameters, but not on the number of template\n// parameters.  Without the restriction, the meaning of the following\n// is unclear:\n//\n//   OverloadedAction<int, bool>(x);\n//\n// Are we using a single-template-parameter action where 'bool' refers\n// to the type of x, or are we using a two-template-parameter action\n// where the compiler is asked to infer the type of x?\n//\n// Implementation notes:\n//\n// GMOCK_INTERNAL_*_HAS_m_TEMPLATE_PARAMS and\n// GMOCK_INTERNAL_*_AND_n_VALUE_PARAMS are internal macros for\n// implementing ACTION_TEMPLATE.  The main trick we use is to create\n// new macro invocations when expanding a macro.  For example, we have\n//\n//   #define ACTION_TEMPLATE(name, template_params, value_params)\n//       ... GMOCK_INTERNAL_DECL_##template_params ...\n//\n// which causes ACTION_TEMPLATE(..., HAS_1_TEMPLATE_PARAMS(typename, T), ...)\n// to expand to\n//\n//       ... GMOCK_INTERNAL_DECL_HAS_1_TEMPLATE_PARAMS(typename, T) ...\n//\n// Since GMOCK_INTERNAL_DECL_HAS_1_TEMPLATE_PARAMS is a macro, the\n// preprocessor will continue to expand it to\n//\n//       ... typename T ...\n//\n// This technique conforms to the C++ standard and is portable.  It\n// allows us to implement action templates using O(N) code, where N is\n// the maximum number of template/value parameters supported.  Without\n// using it, we'd have to devote O(N^2) amount of code to implement all\n// combinations of m and n.\n\n// Declares the template parameters.\n#define GMOCK_INTERNAL_DECL_HAS_1_TEMPLATE_PARAMS(kind0, name0) kind0 name0\n#define GMOCK_INTERNAL_DECL_HAS_2_TEMPLATE_PARAMS(kind0, name0, kind1, \\\n    name1) kind0 name0, kind1 name1\n#define GMOCK_INTERNAL_DECL_HAS_3_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \\\n    kind2, name2) kind0 name0, kind1 name1, kind2 name2\n#define GMOCK_INTERNAL_DECL_HAS_4_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \\\n    kind2, name2, kind3, name3) kind0 name0, kind1 name1, kind2 name2, \\\n    kind3 name3\n#define GMOCK_INTERNAL_DECL_HAS_5_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \\\n    kind2, name2, kind3, name3, kind4, name4) kind0 name0, kind1 name1, \\\n    kind2 name2, kind3 name3, kind4 name4\n#define GMOCK_INTERNAL_DECL_HAS_6_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \\\n    kind2, name2, kind3, name3, kind4, name4, kind5, name5) kind0 name0, \\\n    kind1 name1, kind2 name2, kind3 name3, kind4 name4, kind5 name5\n#define GMOCK_INTERNAL_DECL_HAS_7_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \\\n    kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \\\n    name6) kind0 name0, kind1 name1, kind2 name2, kind3 name3, kind4 name4, \\\n    kind5 name5, kind6 name6\n#define GMOCK_INTERNAL_DECL_HAS_8_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \\\n    kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \\\n    kind7, name7) kind0 name0, kind1 name1, kind2 name2, kind3 name3, \\\n    kind4 name4, kind5 name5, kind6 name6, kind7 name7\n#define GMOCK_INTERNAL_DECL_HAS_9_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \\\n    kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \\\n    kind7, name7, kind8, name8) kind0 name0, kind1 name1, kind2 name2, \\\n    kind3 name3, kind4 name4, kind5 name5, kind6 name6, kind7 name7, \\\n    kind8 name8\n#define GMOCK_INTERNAL_DECL_HAS_10_TEMPLATE_PARAMS(kind0, name0, kind1, \\\n    name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \\\n    name6, kind7, name7, kind8, name8, kind9, name9) kind0 name0, \\\n    kind1 name1, kind2 name2, kind3 name3, kind4 name4, kind5 name5, \\\n    kind6 name6, kind7 name7, kind8 name8, kind9 name9\n\n// Lists the template parameters.\n#define GMOCK_INTERNAL_LIST_HAS_1_TEMPLATE_PARAMS(kind0, name0) name0\n#define GMOCK_INTERNAL_LIST_HAS_2_TEMPLATE_PARAMS(kind0, name0, kind1, \\\n    name1) name0, name1\n#define GMOCK_INTERNAL_LIST_HAS_3_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \\\n    kind2, name2) name0, name1, name2\n#define GMOCK_INTERNAL_LIST_HAS_4_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \\\n    kind2, name2, kind3, name3) name0, name1, name2, name3\n#define GMOCK_INTERNAL_LIST_HAS_5_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \\\n    kind2, name2, kind3, name3, kind4, name4) name0, name1, name2, name3, \\\n    name4\n#define GMOCK_INTERNAL_LIST_HAS_6_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \\\n    kind2, name2, kind3, name3, kind4, name4, kind5, name5) name0, name1, \\\n    name2, name3, name4, name5\n#define GMOCK_INTERNAL_LIST_HAS_7_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \\\n    kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \\\n    name6) name0, name1, name2, name3, name4, name5, name6\n#define GMOCK_INTERNAL_LIST_HAS_8_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \\\n    kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \\\n    kind7, name7) name0, name1, name2, name3, name4, name5, name6, name7\n#define GMOCK_INTERNAL_LIST_HAS_9_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \\\n    kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \\\n    kind7, name7, kind8, name8) name0, name1, name2, name3, name4, name5, \\\n    name6, name7, name8\n#define GMOCK_INTERNAL_LIST_HAS_10_TEMPLATE_PARAMS(kind0, name0, kind1, \\\n    name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \\\n    name6, kind7, name7, kind8, name8, kind9, name9) name0, name1, name2, \\\n    name3, name4, name5, name6, name7, name8, name9\n\n// Declares the types of value parameters.\n#define GMOCK_INTERNAL_DECL_TYPE_AND_0_VALUE_PARAMS()\n#define GMOCK_INTERNAL_DECL_TYPE_AND_1_VALUE_PARAMS(p0) , typename p0##_type\n#define GMOCK_INTERNAL_DECL_TYPE_AND_2_VALUE_PARAMS(p0, p1) , \\\n    typename p0##_type, typename p1##_type\n#define GMOCK_INTERNAL_DECL_TYPE_AND_3_VALUE_PARAMS(p0, p1, p2) , \\\n    typename p0##_type, typename p1##_type, typename p2##_type\n#define GMOCK_INTERNAL_DECL_TYPE_AND_4_VALUE_PARAMS(p0, p1, p2, p3) , \\\n    typename p0##_type, typename p1##_type, typename p2##_type, \\\n    typename p3##_type\n#define GMOCK_INTERNAL_DECL_TYPE_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) , \\\n    typename p0##_type, typename p1##_type, typename p2##_type, \\\n    typename p3##_type, typename p4##_type\n#define GMOCK_INTERNAL_DECL_TYPE_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) , \\\n    typename p0##_type, typename p1##_type, typename p2##_type, \\\n    typename p3##_type, typename p4##_type, typename p5##_type\n#define GMOCK_INTERNAL_DECL_TYPE_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \\\n    p6) , typename p0##_type, typename p1##_type, typename p2##_type, \\\n    typename p3##_type, typename p4##_type, typename p5##_type, \\\n    typename p6##_type\n#define GMOCK_INTERNAL_DECL_TYPE_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \\\n    p6, p7) , typename p0##_type, typename p1##_type, typename p2##_type, \\\n    typename p3##_type, typename p4##_type, typename p5##_type, \\\n    typename p6##_type, typename p7##_type\n#define GMOCK_INTERNAL_DECL_TYPE_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \\\n    p6, p7, p8) , typename p0##_type, typename p1##_type, typename p2##_type, \\\n    typename p3##_type, typename p4##_type, typename p5##_type, \\\n    typename p6##_type, typename p7##_type, typename p8##_type\n#define GMOCK_INTERNAL_DECL_TYPE_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \\\n    p6, p7, p8, p9) , typename p0##_type, typename p1##_type, \\\n    typename p2##_type, typename p3##_type, typename p4##_type, \\\n    typename p5##_type, typename p6##_type, typename p7##_type, \\\n    typename p8##_type, typename p9##_type\n\n// Initializes the value parameters.\n#define GMOCK_INTERNAL_INIT_AND_0_VALUE_PARAMS()\\\n    ()\n#define GMOCK_INTERNAL_INIT_AND_1_VALUE_PARAMS(p0)\\\n    (p0##_type gmock_p0) : p0(::std::move(gmock_p0))\n#define GMOCK_INTERNAL_INIT_AND_2_VALUE_PARAMS(p0, p1)\\\n    (p0##_type gmock_p0, p1##_type gmock_p1) : p0(::std::move(gmock_p0)), \\\n        p1(::std::move(gmock_p1))\n#define GMOCK_INTERNAL_INIT_AND_3_VALUE_PARAMS(p0, p1, p2)\\\n    (p0##_type gmock_p0, p1##_type gmock_p1, \\\n        p2##_type gmock_p2) : p0(::std::move(gmock_p0)), \\\n        p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2))\n#define GMOCK_INTERNAL_INIT_AND_4_VALUE_PARAMS(p0, p1, p2, p3)\\\n    (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \\\n        p3##_type gmock_p3) : p0(::std::move(gmock_p0)), \\\n        p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \\\n        p3(::std::move(gmock_p3))\n#define GMOCK_INTERNAL_INIT_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)\\\n    (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \\\n        p3##_type gmock_p3, p4##_type gmock_p4) : p0(::std::move(gmock_p0)), \\\n        p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \\\n        p3(::std::move(gmock_p3)), p4(::std::move(gmock_p4))\n#define GMOCK_INTERNAL_INIT_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)\\\n    (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \\\n        p3##_type gmock_p3, p4##_type gmock_p4, \\\n        p5##_type gmock_p5) : p0(::std::move(gmock_p0)), \\\n        p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \\\n        p3(::std::move(gmock_p3)), p4(::std::move(gmock_p4)), \\\n        p5(::std::move(gmock_p5))\n#define GMOCK_INTERNAL_INIT_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)\\\n    (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \\\n        p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \\\n        p6##_type gmock_p6) : p0(::std::move(gmock_p0)), \\\n        p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \\\n        p3(::std::move(gmock_p3)), p4(::std::move(gmock_p4)), \\\n        p5(::std::move(gmock_p5)), p6(::std::move(gmock_p6))\n#define GMOCK_INTERNAL_INIT_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)\\\n    (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \\\n        p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \\\n        p6##_type gmock_p6, p7##_type gmock_p7) : p0(::std::move(gmock_p0)), \\\n        p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \\\n        p3(::std::move(gmock_p3)), p4(::std::move(gmock_p4)), \\\n        p5(::std::move(gmock_p5)), p6(::std::move(gmock_p6)), \\\n        p7(::std::move(gmock_p7))\n#define GMOCK_INTERNAL_INIT_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \\\n    p7, p8)\\\n    (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \\\n        p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \\\n        p6##_type gmock_p6, p7##_type gmock_p7, \\\n        p8##_type gmock_p8) : p0(::std::move(gmock_p0)), \\\n        p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \\\n        p3(::std::move(gmock_p3)), p4(::std::move(gmock_p4)), \\\n        p5(::std::move(gmock_p5)), p6(::std::move(gmock_p6)), \\\n        p7(::std::move(gmock_p7)), p8(::std::move(gmock_p8))\n#define GMOCK_INTERNAL_INIT_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \\\n    p7, p8, p9)\\\n    (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \\\n        p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \\\n        p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8, \\\n        p9##_type gmock_p9) : p0(::std::move(gmock_p0)), \\\n        p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \\\n        p3(::std::move(gmock_p3)), p4(::std::move(gmock_p4)), \\\n        p5(::std::move(gmock_p5)), p6(::std::move(gmock_p6)), \\\n        p7(::std::move(gmock_p7)), p8(::std::move(gmock_p8)), \\\n        p9(::std::move(gmock_p9))\n\n// Declares the fields for storing the value parameters.\n#define GMOCK_INTERNAL_DEFN_AND_0_VALUE_PARAMS()\n#define GMOCK_INTERNAL_DEFN_AND_1_VALUE_PARAMS(p0) p0##_type p0;\n#define GMOCK_INTERNAL_DEFN_AND_2_VALUE_PARAMS(p0, p1) p0##_type p0; \\\n    p1##_type p1;\n#define GMOCK_INTERNAL_DEFN_AND_3_VALUE_PARAMS(p0, p1, p2) p0##_type p0; \\\n    p1##_type p1; p2##_type p2;\n#define GMOCK_INTERNAL_DEFN_AND_4_VALUE_PARAMS(p0, p1, p2, p3) p0##_type p0; \\\n    p1##_type p1; p2##_type p2; p3##_type p3;\n#define GMOCK_INTERNAL_DEFN_AND_5_VALUE_PARAMS(p0, p1, p2, p3, \\\n    p4) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4;\n#define GMOCK_INTERNAL_DEFN_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, \\\n    p5) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4; \\\n    p5##_type p5;\n#define GMOCK_INTERNAL_DEFN_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \\\n    p6) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4; \\\n    p5##_type p5; p6##_type p6;\n#define GMOCK_INTERNAL_DEFN_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \\\n    p7) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4; \\\n    p5##_type p5; p6##_type p6; p7##_type p7;\n#define GMOCK_INTERNAL_DEFN_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \\\n    p7, p8) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; \\\n    p4##_type p4; p5##_type p5; p6##_type p6; p7##_type p7; p8##_type p8;\n#define GMOCK_INTERNAL_DEFN_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \\\n    p7, p8, p9) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; \\\n    p4##_type p4; p5##_type p5; p6##_type p6; p7##_type p7; p8##_type p8; \\\n    p9##_type p9;\n\n// Lists the value parameters.\n#define GMOCK_INTERNAL_LIST_AND_0_VALUE_PARAMS()\n#define GMOCK_INTERNAL_LIST_AND_1_VALUE_PARAMS(p0) p0\n#define GMOCK_INTERNAL_LIST_AND_2_VALUE_PARAMS(p0, p1) p0, p1\n#define GMOCK_INTERNAL_LIST_AND_3_VALUE_PARAMS(p0, p1, p2) p0, p1, p2\n#define GMOCK_INTERNAL_LIST_AND_4_VALUE_PARAMS(p0, p1, p2, p3) p0, p1, p2, p3\n#define GMOCK_INTERNAL_LIST_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) p0, p1, \\\n    p2, p3, p4\n#define GMOCK_INTERNAL_LIST_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) p0, \\\n    p1, p2, p3, p4, p5\n#define GMOCK_INTERNAL_LIST_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \\\n    p6) p0, p1, p2, p3, p4, p5, p6\n#define GMOCK_INTERNAL_LIST_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \\\n    p7) p0, p1, p2, p3, p4, p5, p6, p7\n#define GMOCK_INTERNAL_LIST_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \\\n    p7, p8) p0, p1, p2, p3, p4, p5, p6, p7, p8\n#define GMOCK_INTERNAL_LIST_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \\\n    p7, p8, p9) p0, p1, p2, p3, p4, p5, p6, p7, p8, p9\n\n// Lists the value parameter types.\n#define GMOCK_INTERNAL_LIST_TYPE_AND_0_VALUE_PARAMS()\n#define GMOCK_INTERNAL_LIST_TYPE_AND_1_VALUE_PARAMS(p0) , p0##_type\n#define GMOCK_INTERNAL_LIST_TYPE_AND_2_VALUE_PARAMS(p0, p1) , p0##_type, \\\n    p1##_type\n#define GMOCK_INTERNAL_LIST_TYPE_AND_3_VALUE_PARAMS(p0, p1, p2) , p0##_type, \\\n    p1##_type, p2##_type\n#define GMOCK_INTERNAL_LIST_TYPE_AND_4_VALUE_PARAMS(p0, p1, p2, p3) , \\\n    p0##_type, p1##_type, p2##_type, p3##_type\n#define GMOCK_INTERNAL_LIST_TYPE_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) , \\\n    p0##_type, p1##_type, p2##_type, p3##_type, p4##_type\n#define GMOCK_INTERNAL_LIST_TYPE_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) , \\\n    p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, p5##_type\n#define GMOCK_INTERNAL_LIST_TYPE_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \\\n    p6) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, p5##_type, \\\n    p6##_type\n#define GMOCK_INTERNAL_LIST_TYPE_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \\\n    p6, p7) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \\\n    p5##_type, p6##_type, p7##_type\n#define GMOCK_INTERNAL_LIST_TYPE_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \\\n    p6, p7, p8) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \\\n    p5##_type, p6##_type, p7##_type, p8##_type\n#define GMOCK_INTERNAL_LIST_TYPE_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \\\n    p6, p7, p8, p9) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \\\n    p5##_type, p6##_type, p7##_type, p8##_type, p9##_type\n\n// Declares the value parameters.\n#define GMOCK_INTERNAL_DECL_AND_0_VALUE_PARAMS()\n#define GMOCK_INTERNAL_DECL_AND_1_VALUE_PARAMS(p0) p0##_type p0\n#define GMOCK_INTERNAL_DECL_AND_2_VALUE_PARAMS(p0, p1) p0##_type p0, \\\n    p1##_type p1\n#define GMOCK_INTERNAL_DECL_AND_3_VALUE_PARAMS(p0, p1, p2) p0##_type p0, \\\n    p1##_type p1, p2##_type p2\n#define GMOCK_INTERNAL_DECL_AND_4_VALUE_PARAMS(p0, p1, p2, p3) p0##_type p0, \\\n    p1##_type p1, p2##_type p2, p3##_type p3\n#define GMOCK_INTERNAL_DECL_AND_5_VALUE_PARAMS(p0, p1, p2, p3, \\\n    p4) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4\n#define GMOCK_INTERNAL_DECL_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, \\\n    p5) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, \\\n    p5##_type p5\n#define GMOCK_INTERNAL_DECL_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \\\n    p6) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, \\\n    p5##_type p5, p6##_type p6\n#define GMOCK_INTERNAL_DECL_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \\\n    p7) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, \\\n    p5##_type p5, p6##_type p6, p7##_type p7\n#define GMOCK_INTERNAL_DECL_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \\\n    p7, p8) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \\\n    p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8\n#define GMOCK_INTERNAL_DECL_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \\\n    p7, p8, p9) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \\\n    p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8, \\\n    p9##_type p9\n\n// The suffix of the class template implementing the action template.\n#define GMOCK_INTERNAL_COUNT_AND_0_VALUE_PARAMS()\n#define GMOCK_INTERNAL_COUNT_AND_1_VALUE_PARAMS(p0) P\n#define GMOCK_INTERNAL_COUNT_AND_2_VALUE_PARAMS(p0, p1) P2\n#define GMOCK_INTERNAL_COUNT_AND_3_VALUE_PARAMS(p0, p1, p2) P3\n#define GMOCK_INTERNAL_COUNT_AND_4_VALUE_PARAMS(p0, p1, p2, p3) P4\n#define GMOCK_INTERNAL_COUNT_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) P5\n#define GMOCK_INTERNAL_COUNT_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) P6\n#define GMOCK_INTERNAL_COUNT_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6) P7\n#define GMOCK_INTERNAL_COUNT_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \\\n    p7) P8\n#define GMOCK_INTERNAL_COUNT_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \\\n    p7, p8) P9\n#define GMOCK_INTERNAL_COUNT_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \\\n    p7, p8, p9) P10\n\n// The name of the class template implementing the action template.\n#define GMOCK_ACTION_CLASS_(name, value_params)\\\n    GTEST_CONCAT_TOKEN_(name##Action, GMOCK_INTERNAL_COUNT_##value_params)\n\n#define ACTION_TEMPLATE(name, template_params, value_params)\\\n  template <GMOCK_INTERNAL_DECL_##template_params\\\n            GMOCK_INTERNAL_DECL_TYPE_##value_params>\\\n  class GMOCK_ACTION_CLASS_(name, value_params) {\\\n   public:\\\n    explicit GMOCK_ACTION_CLASS_(name, value_params)\\\n        GMOCK_INTERNAL_INIT_##value_params {}\\\n    template <typename F>\\\n    class gmock_Impl : public ::testing::ActionInterface<F> {\\\n     public:\\\n      typedef F function_type;\\\n      typedef typename ::testing::internal::Function<F>::Result return_type;\\\n      typedef typename ::testing::internal::Function<F>::ArgumentTuple\\\n          args_type;\\\n      explicit gmock_Impl GMOCK_INTERNAL_INIT_##value_params {}\\\n      virtual return_type Perform(const args_type& args) {\\\n        return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\\\n            Perform(this, args);\\\n      }\\\n      template <typename arg0_type, typename arg1_type, typename arg2_type, \\\n          typename arg3_type, typename arg4_type, typename arg5_type, \\\n          typename arg6_type, typename arg7_type, typename arg8_type, \\\n          typename arg9_type>\\\n      return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \\\n          arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \\\n          arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \\\n          arg9_type arg9) const;\\\n      GMOCK_INTERNAL_DEFN_##value_params\\\n     private:\\\n      GTEST_DISALLOW_ASSIGN_(gmock_Impl);\\\n    };\\\n    template <typename F> operator ::testing::Action<F>() const {\\\n      return ::testing::Action<F>(\\\n          new gmock_Impl<F>(GMOCK_INTERNAL_LIST_##value_params));\\\n    }\\\n    GMOCK_INTERNAL_DEFN_##value_params\\\n   private:\\\n    GTEST_DISALLOW_ASSIGN_(GMOCK_ACTION_CLASS_(name, value_params));\\\n  };\\\n  template <GMOCK_INTERNAL_DECL_##template_params\\\n            GMOCK_INTERNAL_DECL_TYPE_##value_params>\\\n  inline GMOCK_ACTION_CLASS_(name, value_params)<\\\n      GMOCK_INTERNAL_LIST_##template_params\\\n      GMOCK_INTERNAL_LIST_TYPE_##value_params> name(\\\n          GMOCK_INTERNAL_DECL_##value_params) {\\\n    return GMOCK_ACTION_CLASS_(name, value_params)<\\\n        GMOCK_INTERNAL_LIST_##template_params\\\n        GMOCK_INTERNAL_LIST_TYPE_##value_params>(\\\n            GMOCK_INTERNAL_LIST_##value_params);\\\n  }\\\n  template <GMOCK_INTERNAL_DECL_##template_params\\\n            GMOCK_INTERNAL_DECL_TYPE_##value_params>\\\n  template <typename F>\\\n  template <typename arg0_type, typename arg1_type, typename arg2_type, \\\n      typename arg3_type, typename arg4_type, typename arg5_type, \\\n      typename arg6_type, typename arg7_type, typename arg8_type, \\\n      typename arg9_type>\\\n  typename ::testing::internal::Function<F>::Result\\\n      GMOCK_ACTION_CLASS_(name, value_params)<\\\n          GMOCK_INTERNAL_LIST_##template_params\\\n          GMOCK_INTERNAL_LIST_TYPE_##value_params>::gmock_Impl<F>::\\\n              gmock_PerformImpl(\\\n          GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const\n\n#define ACTION(name)\\\n  class name##Action {\\\n   public:\\\n    name##Action() {}\\\n    template <typename F>\\\n    class gmock_Impl : public ::testing::ActionInterface<F> {\\\n     public:\\\n      typedef F function_type;\\\n      typedef typename ::testing::internal::Function<F>::Result return_type;\\\n      typedef typename ::testing::internal::Function<F>::ArgumentTuple\\\n          args_type;\\\n      gmock_Impl() {}\\\n      virtual return_type Perform(const args_type& args) {\\\n        return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\\\n            Perform(this, args);\\\n      }\\\n      template <typename arg0_type, typename arg1_type, typename arg2_type, \\\n          typename arg3_type, typename arg4_type, typename arg5_type, \\\n          typename arg6_type, typename arg7_type, typename arg8_type, \\\n          typename arg9_type>\\\n      return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \\\n          arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \\\n          arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \\\n          arg9_type arg9) const;\\\n     private:\\\n      GTEST_DISALLOW_ASSIGN_(gmock_Impl);\\\n    };\\\n    template <typename F> operator ::testing::Action<F>() const {\\\n      return ::testing::Action<F>(new gmock_Impl<F>());\\\n    }\\\n   private:\\\n    GTEST_DISALLOW_ASSIGN_(name##Action);\\\n  };\\\n  inline name##Action name() {\\\n    return name##Action();\\\n  }\\\n  template <typename F>\\\n  template <typename arg0_type, typename arg1_type, typename arg2_type, \\\n      typename arg3_type, typename arg4_type, typename arg5_type, \\\n      typename arg6_type, typename arg7_type, typename arg8_type, \\\n      typename arg9_type>\\\n  typename ::testing::internal::Function<F>::Result\\\n      name##Action::gmock_Impl<F>::gmock_PerformImpl(\\\n          GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const\n\n#define ACTION_P(name, p0)\\\n  template <typename p0##_type>\\\n  class name##ActionP {\\\n   public:\\\n    explicit name##ActionP(p0##_type gmock_p0) : \\\n        p0(::std::forward<p0##_type>(gmock_p0)) {}\\\n    template <typename F>\\\n    class gmock_Impl : public ::testing::ActionInterface<F> {\\\n     public:\\\n      typedef F function_type;\\\n      typedef typename ::testing::internal::Function<F>::Result return_type;\\\n      typedef typename ::testing::internal::Function<F>::ArgumentTuple\\\n          args_type;\\\n      explicit gmock_Impl(p0##_type gmock_p0) : \\\n          p0(::std::forward<p0##_type>(gmock_p0)) {}\\\n      virtual return_type Perform(const args_type& args) {\\\n        return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\\\n            Perform(this, args);\\\n      }\\\n      template <typename arg0_type, typename arg1_type, typename arg2_type, \\\n          typename arg3_type, typename arg4_type, typename arg5_type, \\\n          typename arg6_type, typename arg7_type, typename arg8_type, \\\n          typename arg9_type>\\\n      return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \\\n          arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \\\n          arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \\\n          arg9_type arg9) const;\\\n      p0##_type p0;\\\n     private:\\\n      GTEST_DISALLOW_ASSIGN_(gmock_Impl);\\\n    };\\\n    template <typename F> operator ::testing::Action<F>() const {\\\n      return ::testing::Action<F>(new gmock_Impl<F>(p0));\\\n    }\\\n    p0##_type p0;\\\n   private:\\\n    GTEST_DISALLOW_ASSIGN_(name##ActionP);\\\n  };\\\n  template <typename p0##_type>\\\n  inline name##ActionP<p0##_type> name(p0##_type p0) {\\\n    return name##ActionP<p0##_type>(p0);\\\n  }\\\n  template <typename p0##_type>\\\n  template <typename F>\\\n  template <typename arg0_type, typename arg1_type, typename arg2_type, \\\n      typename arg3_type, typename arg4_type, typename arg5_type, \\\n      typename arg6_type, typename arg7_type, typename arg8_type, \\\n      typename arg9_type>\\\n  typename ::testing::internal::Function<F>::Result\\\n      name##ActionP<p0##_type>::gmock_Impl<F>::gmock_PerformImpl(\\\n          GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const\n\n#define ACTION_P2(name, p0, p1)\\\n  template <typename p0##_type, typename p1##_type>\\\n  class name##ActionP2 {\\\n   public:\\\n    name##ActionP2(p0##_type gmock_p0, \\\n        p1##_type gmock_p1) : p0(::std::forward<p0##_type>(gmock_p0)), \\\n        p1(::std::forward<p1##_type>(gmock_p1)) {}\\\n    template <typename F>\\\n    class gmock_Impl : public ::testing::ActionInterface<F> {\\\n     public:\\\n      typedef F function_type;\\\n      typedef typename ::testing::internal::Function<F>::Result return_type;\\\n      typedef typename ::testing::internal::Function<F>::ArgumentTuple\\\n          args_type;\\\n      gmock_Impl(p0##_type gmock_p0, \\\n          p1##_type gmock_p1) : p0(::std::forward<p0##_type>(gmock_p0)), \\\n          p1(::std::forward<p1##_type>(gmock_p1)) {}\\\n      virtual return_type Perform(const args_type& args) {\\\n        return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\\\n            Perform(this, args);\\\n      }\\\n      template <typename arg0_type, typename arg1_type, typename arg2_type, \\\n          typename arg3_type, typename arg4_type, typename arg5_type, \\\n          typename arg6_type, typename arg7_type, typename arg8_type, \\\n          typename arg9_type>\\\n      return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \\\n          arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \\\n          arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \\\n          arg9_type arg9) const;\\\n      p0##_type p0;\\\n      p1##_type p1;\\\n     private:\\\n      GTEST_DISALLOW_ASSIGN_(gmock_Impl);\\\n    };\\\n    template <typename F> operator ::testing::Action<F>() const {\\\n      return ::testing::Action<F>(new gmock_Impl<F>(p0, p1));\\\n    }\\\n    p0##_type p0;\\\n    p1##_type p1;\\\n   private:\\\n    GTEST_DISALLOW_ASSIGN_(name##ActionP2);\\\n  };\\\n  template <typename p0##_type, typename p1##_type>\\\n  inline name##ActionP2<p0##_type, p1##_type> name(p0##_type p0, \\\n      p1##_type p1) {\\\n    return name##ActionP2<p0##_type, p1##_type>(p0, p1);\\\n  }\\\n  template <typename p0##_type, typename p1##_type>\\\n  template <typename F>\\\n  template <typename arg0_type, typename arg1_type, typename arg2_type, \\\n      typename arg3_type, typename arg4_type, typename arg5_type, \\\n      typename arg6_type, typename arg7_type, typename arg8_type, \\\n      typename arg9_type>\\\n  typename ::testing::internal::Function<F>::Result\\\n      name##ActionP2<p0##_type, p1##_type>::gmock_Impl<F>::gmock_PerformImpl(\\\n          GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const\n\n#define ACTION_P3(name, p0, p1, p2)\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type>\\\n  class name##ActionP3 {\\\n   public:\\\n    name##ActionP3(p0##_type gmock_p0, p1##_type gmock_p1, \\\n        p2##_type gmock_p2) : p0(::std::forward<p0##_type>(gmock_p0)), \\\n        p1(::std::forward<p1##_type>(gmock_p1)), \\\n        p2(::std::forward<p2##_type>(gmock_p2)) {}\\\n    template <typename F>\\\n    class gmock_Impl : public ::testing::ActionInterface<F> {\\\n     public:\\\n      typedef F function_type;\\\n      typedef typename ::testing::internal::Function<F>::Result return_type;\\\n      typedef typename ::testing::internal::Function<F>::ArgumentTuple\\\n          args_type;\\\n      gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, \\\n          p2##_type gmock_p2) : p0(::std::forward<p0##_type>(gmock_p0)), \\\n          p1(::std::forward<p1##_type>(gmock_p1)), \\\n          p2(::std::forward<p2##_type>(gmock_p2)) {}\\\n      virtual return_type Perform(const args_type& args) {\\\n        return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\\\n            Perform(this, args);\\\n      }\\\n      template <typename arg0_type, typename arg1_type, typename arg2_type, \\\n          typename arg3_type, typename arg4_type, typename arg5_type, \\\n          typename arg6_type, typename arg7_type, typename arg8_type, \\\n          typename arg9_type>\\\n      return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \\\n          arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \\\n          arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \\\n          arg9_type arg9) const;\\\n      p0##_type p0;\\\n      p1##_type p1;\\\n      p2##_type p2;\\\n     private:\\\n      GTEST_DISALLOW_ASSIGN_(gmock_Impl);\\\n    };\\\n    template <typename F> operator ::testing::Action<F>() const {\\\n      return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2));\\\n    }\\\n    p0##_type p0;\\\n    p1##_type p1;\\\n    p2##_type p2;\\\n   private:\\\n    GTEST_DISALLOW_ASSIGN_(name##ActionP3);\\\n  };\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type>\\\n  inline name##ActionP3<p0##_type, p1##_type, p2##_type> name(p0##_type p0, \\\n      p1##_type p1, p2##_type p2) {\\\n    return name##ActionP3<p0##_type, p1##_type, p2##_type>(p0, p1, p2);\\\n  }\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type>\\\n  template <typename F>\\\n  template <typename arg0_type, typename arg1_type, typename arg2_type, \\\n      typename arg3_type, typename arg4_type, typename arg5_type, \\\n      typename arg6_type, typename arg7_type, typename arg8_type, \\\n      typename arg9_type>\\\n  typename ::testing::internal::Function<F>::Result\\\n      name##ActionP3<p0##_type, p1##_type, \\\n          p2##_type>::gmock_Impl<F>::gmock_PerformImpl(\\\n          GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const\n\n#define ACTION_P4(name, p0, p1, p2, p3)\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type>\\\n  class name##ActionP4 {\\\n   public:\\\n    name##ActionP4(p0##_type gmock_p0, p1##_type gmock_p1, \\\n        p2##_type gmock_p2, \\\n        p3##_type gmock_p3) : p0(::std::forward<p0##_type>(gmock_p0)), \\\n        p1(::std::forward<p1##_type>(gmock_p1)), \\\n        p2(::std::forward<p2##_type>(gmock_p2)), \\\n        p3(::std::forward<p3##_type>(gmock_p3)) {}\\\n    template <typename F>\\\n    class gmock_Impl : public ::testing::ActionInterface<F> {\\\n     public:\\\n      typedef F function_type;\\\n      typedef typename ::testing::internal::Function<F>::Result return_type;\\\n      typedef typename ::testing::internal::Function<F>::ArgumentTuple\\\n          args_type;\\\n      gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \\\n          p3##_type gmock_p3) : p0(::std::forward<p0##_type>(gmock_p0)), \\\n          p1(::std::forward<p1##_type>(gmock_p1)), \\\n          p2(::std::forward<p2##_type>(gmock_p2)), \\\n          p3(::std::forward<p3##_type>(gmock_p3)) {}\\\n      virtual return_type Perform(const args_type& args) {\\\n        return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\\\n            Perform(this, args);\\\n      }\\\n      template <typename arg0_type, typename arg1_type, typename arg2_type, \\\n          typename arg3_type, typename arg4_type, typename arg5_type, \\\n          typename arg6_type, typename arg7_type, typename arg8_type, \\\n          typename arg9_type>\\\n      return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \\\n          arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \\\n          arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \\\n          arg9_type arg9) const;\\\n      p0##_type p0;\\\n      p1##_type p1;\\\n      p2##_type p2;\\\n      p3##_type p3;\\\n     private:\\\n      GTEST_DISALLOW_ASSIGN_(gmock_Impl);\\\n    };\\\n    template <typename F> operator ::testing::Action<F>() const {\\\n      return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3));\\\n    }\\\n    p0##_type p0;\\\n    p1##_type p1;\\\n    p2##_type p2;\\\n    p3##_type p3;\\\n   private:\\\n    GTEST_DISALLOW_ASSIGN_(name##ActionP4);\\\n  };\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type>\\\n  inline name##ActionP4<p0##_type, p1##_type, p2##_type, \\\n      p3##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, \\\n      p3##_type p3) {\\\n    return name##ActionP4<p0##_type, p1##_type, p2##_type, p3##_type>(p0, p1, \\\n        p2, p3);\\\n  }\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type>\\\n  template <typename F>\\\n  template <typename arg0_type, typename arg1_type, typename arg2_type, \\\n      typename arg3_type, typename arg4_type, typename arg5_type, \\\n      typename arg6_type, typename arg7_type, typename arg8_type, \\\n      typename arg9_type>\\\n  typename ::testing::internal::Function<F>::Result\\\n      name##ActionP4<p0##_type, p1##_type, p2##_type, \\\n          p3##_type>::gmock_Impl<F>::gmock_PerformImpl(\\\n          GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const\n\n#define ACTION_P5(name, p0, p1, p2, p3, p4)\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type, typename p4##_type>\\\n  class name##ActionP5 {\\\n   public:\\\n    name##ActionP5(p0##_type gmock_p0, p1##_type gmock_p1, \\\n        p2##_type gmock_p2, p3##_type gmock_p3, \\\n        p4##_type gmock_p4) : p0(::std::forward<p0##_type>(gmock_p0)), \\\n        p1(::std::forward<p1##_type>(gmock_p1)), \\\n        p2(::std::forward<p2##_type>(gmock_p2)), \\\n        p3(::std::forward<p3##_type>(gmock_p3)), \\\n        p4(::std::forward<p4##_type>(gmock_p4)) {}\\\n    template <typename F>\\\n    class gmock_Impl : public ::testing::ActionInterface<F> {\\\n     public:\\\n      typedef F function_type;\\\n      typedef typename ::testing::internal::Function<F>::Result return_type;\\\n      typedef typename ::testing::internal::Function<F>::ArgumentTuple\\\n          args_type;\\\n      gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \\\n          p3##_type gmock_p3, \\\n          p4##_type gmock_p4) : p0(::std::forward<p0##_type>(gmock_p0)), \\\n          p1(::std::forward<p1##_type>(gmock_p1)), \\\n          p2(::std::forward<p2##_type>(gmock_p2)), \\\n          p3(::std::forward<p3##_type>(gmock_p3)), \\\n          p4(::std::forward<p4##_type>(gmock_p4)) {}\\\n      virtual return_type Perform(const args_type& args) {\\\n        return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\\\n            Perform(this, args);\\\n      }\\\n      template <typename arg0_type, typename arg1_type, typename arg2_type, \\\n          typename arg3_type, typename arg4_type, typename arg5_type, \\\n          typename arg6_type, typename arg7_type, typename arg8_type, \\\n          typename arg9_type>\\\n      return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \\\n          arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \\\n          arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \\\n          arg9_type arg9) const;\\\n      p0##_type p0;\\\n      p1##_type p1;\\\n      p2##_type p2;\\\n      p3##_type p3;\\\n      p4##_type p4;\\\n     private:\\\n      GTEST_DISALLOW_ASSIGN_(gmock_Impl);\\\n    };\\\n    template <typename F> operator ::testing::Action<F>() const {\\\n      return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3, p4));\\\n    }\\\n    p0##_type p0;\\\n    p1##_type p1;\\\n    p2##_type p2;\\\n    p3##_type p3;\\\n    p4##_type p4;\\\n   private:\\\n    GTEST_DISALLOW_ASSIGN_(name##ActionP5);\\\n  };\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type, typename p4##_type>\\\n  inline name##ActionP5<p0##_type, p1##_type, p2##_type, p3##_type, \\\n      p4##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \\\n      p4##_type p4) {\\\n    return name##ActionP5<p0##_type, p1##_type, p2##_type, p3##_type, \\\n        p4##_type>(p0, p1, p2, p3, p4);\\\n  }\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type, typename p4##_type>\\\n  template <typename F>\\\n  template <typename arg0_type, typename arg1_type, typename arg2_type, \\\n      typename arg3_type, typename arg4_type, typename arg5_type, \\\n      typename arg6_type, typename arg7_type, typename arg8_type, \\\n      typename arg9_type>\\\n  typename ::testing::internal::Function<F>::Result\\\n      name##ActionP5<p0##_type, p1##_type, p2##_type, p3##_type, \\\n          p4##_type>::gmock_Impl<F>::gmock_PerformImpl(\\\n          GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const\n\n#define ACTION_P6(name, p0, p1, p2, p3, p4, p5)\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type, typename p4##_type, typename p5##_type>\\\n  class name##ActionP6 {\\\n   public:\\\n    name##ActionP6(p0##_type gmock_p0, p1##_type gmock_p1, \\\n        p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \\\n        p5##_type gmock_p5) : p0(::std::forward<p0##_type>(gmock_p0)), \\\n        p1(::std::forward<p1##_type>(gmock_p1)), \\\n        p2(::std::forward<p2##_type>(gmock_p2)), \\\n        p3(::std::forward<p3##_type>(gmock_p3)), \\\n        p4(::std::forward<p4##_type>(gmock_p4)), \\\n        p5(::std::forward<p5##_type>(gmock_p5)) {}\\\n    template <typename F>\\\n    class gmock_Impl : public ::testing::ActionInterface<F> {\\\n     public:\\\n      typedef F function_type;\\\n      typedef typename ::testing::internal::Function<F>::Result return_type;\\\n      typedef typename ::testing::internal::Function<F>::ArgumentTuple\\\n          args_type;\\\n      gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \\\n          p3##_type gmock_p3, p4##_type gmock_p4, \\\n          p5##_type gmock_p5) : p0(::std::forward<p0##_type>(gmock_p0)), \\\n          p1(::std::forward<p1##_type>(gmock_p1)), \\\n          p2(::std::forward<p2##_type>(gmock_p2)), \\\n          p3(::std::forward<p3##_type>(gmock_p3)), \\\n          p4(::std::forward<p4##_type>(gmock_p4)), \\\n          p5(::std::forward<p5##_type>(gmock_p5)) {}\\\n      virtual return_type Perform(const args_type& args) {\\\n        return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\\\n            Perform(this, args);\\\n      }\\\n      template <typename arg0_type, typename arg1_type, typename arg2_type, \\\n          typename arg3_type, typename arg4_type, typename arg5_type, \\\n          typename arg6_type, typename arg7_type, typename arg8_type, \\\n          typename arg9_type>\\\n      return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \\\n          arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \\\n          arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \\\n          arg9_type arg9) const;\\\n      p0##_type p0;\\\n      p1##_type p1;\\\n      p2##_type p2;\\\n      p3##_type p3;\\\n      p4##_type p4;\\\n      p5##_type p5;\\\n     private:\\\n      GTEST_DISALLOW_ASSIGN_(gmock_Impl);\\\n    };\\\n    template <typename F> operator ::testing::Action<F>() const {\\\n      return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3, p4, p5));\\\n    }\\\n    p0##_type p0;\\\n    p1##_type p1;\\\n    p2##_type p2;\\\n    p3##_type p3;\\\n    p4##_type p4;\\\n    p5##_type p5;\\\n   private:\\\n    GTEST_DISALLOW_ASSIGN_(name##ActionP6);\\\n  };\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type, typename p4##_type, typename p5##_type>\\\n  inline name##ActionP6<p0##_type, p1##_type, p2##_type, p3##_type, \\\n      p4##_type, p5##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, \\\n      p3##_type p3, p4##_type p4, p5##_type p5) {\\\n    return name##ActionP6<p0##_type, p1##_type, p2##_type, p3##_type, \\\n        p4##_type, p5##_type>(p0, p1, p2, p3, p4, p5);\\\n  }\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type, typename p4##_type, typename p5##_type>\\\n  template <typename F>\\\n  template <typename arg0_type, typename arg1_type, typename arg2_type, \\\n      typename arg3_type, typename arg4_type, typename arg5_type, \\\n      typename arg6_type, typename arg7_type, typename arg8_type, \\\n      typename arg9_type>\\\n  typename ::testing::internal::Function<F>::Result\\\n      name##ActionP6<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \\\n          p5##_type>::gmock_Impl<F>::gmock_PerformImpl(\\\n          GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const\n\n#define ACTION_P7(name, p0, p1, p2, p3, p4, p5, p6)\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type, typename p4##_type, typename p5##_type, \\\n      typename p6##_type>\\\n  class name##ActionP7 {\\\n   public:\\\n    name##ActionP7(p0##_type gmock_p0, p1##_type gmock_p1, \\\n        p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \\\n        p5##_type gmock_p5, \\\n        p6##_type gmock_p6) : p0(::std::forward<p0##_type>(gmock_p0)), \\\n        p1(::std::forward<p1##_type>(gmock_p1)), \\\n        p2(::std::forward<p2##_type>(gmock_p2)), \\\n        p3(::std::forward<p3##_type>(gmock_p3)), \\\n        p4(::std::forward<p4##_type>(gmock_p4)), \\\n        p5(::std::forward<p5##_type>(gmock_p5)), \\\n        p6(::std::forward<p6##_type>(gmock_p6)) {}\\\n    template <typename F>\\\n    class gmock_Impl : public ::testing::ActionInterface<F> {\\\n     public:\\\n      typedef F function_type;\\\n      typedef typename ::testing::internal::Function<F>::Result return_type;\\\n      typedef typename ::testing::internal::Function<F>::ArgumentTuple\\\n          args_type;\\\n      gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \\\n          p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \\\n          p6##_type gmock_p6) : p0(::std::forward<p0##_type>(gmock_p0)), \\\n          p1(::std::forward<p1##_type>(gmock_p1)), \\\n          p2(::std::forward<p2##_type>(gmock_p2)), \\\n          p3(::std::forward<p3##_type>(gmock_p3)), \\\n          p4(::std::forward<p4##_type>(gmock_p4)), \\\n          p5(::std::forward<p5##_type>(gmock_p5)), \\\n          p6(::std::forward<p6##_type>(gmock_p6)) {}\\\n      virtual return_type Perform(const args_type& args) {\\\n        return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\\\n            Perform(this, args);\\\n      }\\\n      template <typename arg0_type, typename arg1_type, typename arg2_type, \\\n          typename arg3_type, typename arg4_type, typename arg5_type, \\\n          typename arg6_type, typename arg7_type, typename arg8_type, \\\n          typename arg9_type>\\\n      return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \\\n          arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \\\n          arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \\\n          arg9_type arg9) const;\\\n      p0##_type p0;\\\n      p1##_type p1;\\\n      p2##_type p2;\\\n      p3##_type p3;\\\n      p4##_type p4;\\\n      p5##_type p5;\\\n      p6##_type p6;\\\n     private:\\\n      GTEST_DISALLOW_ASSIGN_(gmock_Impl);\\\n    };\\\n    template <typename F> operator ::testing::Action<F>() const {\\\n      return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3, p4, p5, \\\n          p6));\\\n    }\\\n    p0##_type p0;\\\n    p1##_type p1;\\\n    p2##_type p2;\\\n    p3##_type p3;\\\n    p4##_type p4;\\\n    p5##_type p5;\\\n    p6##_type p6;\\\n   private:\\\n    GTEST_DISALLOW_ASSIGN_(name##ActionP7);\\\n  };\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type, typename p4##_type, typename p5##_type, \\\n      typename p6##_type>\\\n  inline name##ActionP7<p0##_type, p1##_type, p2##_type, p3##_type, \\\n      p4##_type, p5##_type, p6##_type> name(p0##_type p0, p1##_type p1, \\\n      p2##_type p2, p3##_type p3, p4##_type p4, p5##_type p5, \\\n      p6##_type p6) {\\\n    return name##ActionP7<p0##_type, p1##_type, p2##_type, p3##_type, \\\n        p4##_type, p5##_type, p6##_type>(p0, p1, p2, p3, p4, p5, p6);\\\n  }\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type, typename p4##_type, typename p5##_type, \\\n      typename p6##_type>\\\n  template <typename F>\\\n  template <typename arg0_type, typename arg1_type, typename arg2_type, \\\n      typename arg3_type, typename arg4_type, typename arg5_type, \\\n      typename arg6_type, typename arg7_type, typename arg8_type, \\\n      typename arg9_type>\\\n  typename ::testing::internal::Function<F>::Result\\\n      name##ActionP7<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \\\n          p5##_type, p6##_type>::gmock_Impl<F>::gmock_PerformImpl(\\\n          GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const\n\n#define ACTION_P8(name, p0, p1, p2, p3, p4, p5, p6, p7)\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type, typename p4##_type, typename p5##_type, \\\n      typename p6##_type, typename p7##_type>\\\n  class name##ActionP8 {\\\n   public:\\\n    name##ActionP8(p0##_type gmock_p0, p1##_type gmock_p1, \\\n        p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \\\n        p5##_type gmock_p5, p6##_type gmock_p6, \\\n        p7##_type gmock_p7) : p0(::std::forward<p0##_type>(gmock_p0)), \\\n        p1(::std::forward<p1##_type>(gmock_p1)), \\\n        p2(::std::forward<p2##_type>(gmock_p2)), \\\n        p3(::std::forward<p3##_type>(gmock_p3)), \\\n        p4(::std::forward<p4##_type>(gmock_p4)), \\\n        p5(::std::forward<p5##_type>(gmock_p5)), \\\n        p6(::std::forward<p6##_type>(gmock_p6)), \\\n        p7(::std::forward<p7##_type>(gmock_p7)) {}\\\n    template <typename F>\\\n    class gmock_Impl : public ::testing::ActionInterface<F> {\\\n     public:\\\n      typedef F function_type;\\\n      typedef typename ::testing::internal::Function<F>::Result return_type;\\\n      typedef typename ::testing::internal::Function<F>::ArgumentTuple\\\n          args_type;\\\n      gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \\\n          p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \\\n          p6##_type gmock_p6, \\\n          p7##_type gmock_p7) : p0(::std::forward<p0##_type>(gmock_p0)), \\\n          p1(::std::forward<p1##_type>(gmock_p1)), \\\n          p2(::std::forward<p2##_type>(gmock_p2)), \\\n          p3(::std::forward<p3##_type>(gmock_p3)), \\\n          p4(::std::forward<p4##_type>(gmock_p4)), \\\n          p5(::std::forward<p5##_type>(gmock_p5)), \\\n          p6(::std::forward<p6##_type>(gmock_p6)), \\\n          p7(::std::forward<p7##_type>(gmock_p7)) {}\\\n      virtual return_type Perform(const args_type& args) {\\\n        return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\\\n            Perform(this, args);\\\n      }\\\n      template <typename arg0_type, typename arg1_type, typename arg2_type, \\\n          typename arg3_type, typename arg4_type, typename arg5_type, \\\n          typename arg6_type, typename arg7_type, typename arg8_type, \\\n          typename arg9_type>\\\n      return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \\\n          arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \\\n          arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \\\n          arg9_type arg9) const;\\\n      p0##_type p0;\\\n      p1##_type p1;\\\n      p2##_type p2;\\\n      p3##_type p3;\\\n      p4##_type p4;\\\n      p5##_type p5;\\\n      p6##_type p6;\\\n      p7##_type p7;\\\n     private:\\\n      GTEST_DISALLOW_ASSIGN_(gmock_Impl);\\\n    };\\\n    template <typename F> operator ::testing::Action<F>() const {\\\n      return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3, p4, p5, \\\n          p6, p7));\\\n    }\\\n    p0##_type p0;\\\n    p1##_type p1;\\\n    p2##_type p2;\\\n    p3##_type p3;\\\n    p4##_type p4;\\\n    p5##_type p5;\\\n    p6##_type p6;\\\n    p7##_type p7;\\\n   private:\\\n    GTEST_DISALLOW_ASSIGN_(name##ActionP8);\\\n  };\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type, typename p4##_type, typename p5##_type, \\\n      typename p6##_type, typename p7##_type>\\\n  inline name##ActionP8<p0##_type, p1##_type, p2##_type, p3##_type, \\\n      p4##_type, p5##_type, p6##_type, p7##_type> name(p0##_type p0, \\\n      p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, p5##_type p5, \\\n      p6##_type p6, p7##_type p7) {\\\n    return name##ActionP8<p0##_type, p1##_type, p2##_type, p3##_type, \\\n        p4##_type, p5##_type, p6##_type, p7##_type>(p0, p1, p2, p3, p4, p5, \\\n        p6, p7);\\\n  }\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type, typename p4##_type, typename p5##_type, \\\n      typename p6##_type, typename p7##_type>\\\n  template <typename F>\\\n  template <typename arg0_type, typename arg1_type, typename arg2_type, \\\n      typename arg3_type, typename arg4_type, typename arg5_type, \\\n      typename arg6_type, typename arg7_type, typename arg8_type, \\\n      typename arg9_type>\\\n  typename ::testing::internal::Function<F>::Result\\\n      name##ActionP8<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \\\n          p5##_type, p6##_type, \\\n          p7##_type>::gmock_Impl<F>::gmock_PerformImpl(\\\n          GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const\n\n#define ACTION_P9(name, p0, p1, p2, p3, p4, p5, p6, p7, p8)\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type, typename p4##_type, typename p5##_type, \\\n      typename p6##_type, typename p7##_type, typename p8##_type>\\\n  class name##ActionP9 {\\\n   public:\\\n    name##ActionP9(p0##_type gmock_p0, p1##_type gmock_p1, \\\n        p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \\\n        p5##_type gmock_p5, p6##_type gmock_p6, p7##_type gmock_p7, \\\n        p8##_type gmock_p8) : p0(::std::forward<p0##_type>(gmock_p0)), \\\n        p1(::std::forward<p1##_type>(gmock_p1)), \\\n        p2(::std::forward<p2##_type>(gmock_p2)), \\\n        p3(::std::forward<p3##_type>(gmock_p3)), \\\n        p4(::std::forward<p4##_type>(gmock_p4)), \\\n        p5(::std::forward<p5##_type>(gmock_p5)), \\\n        p6(::std::forward<p6##_type>(gmock_p6)), \\\n        p7(::std::forward<p7##_type>(gmock_p7)), \\\n        p8(::std::forward<p8##_type>(gmock_p8)) {}\\\n    template <typename F>\\\n    class gmock_Impl : public ::testing::ActionInterface<F> {\\\n     public:\\\n      typedef F function_type;\\\n      typedef typename ::testing::internal::Function<F>::Result return_type;\\\n      typedef typename ::testing::internal::Function<F>::ArgumentTuple\\\n          args_type;\\\n      gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \\\n          p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \\\n          p6##_type gmock_p6, p7##_type gmock_p7, \\\n          p8##_type gmock_p8) : p0(::std::forward<p0##_type>(gmock_p0)), \\\n          p1(::std::forward<p1##_type>(gmock_p1)), \\\n          p2(::std::forward<p2##_type>(gmock_p2)), \\\n          p3(::std::forward<p3##_type>(gmock_p3)), \\\n          p4(::std::forward<p4##_type>(gmock_p4)), \\\n          p5(::std::forward<p5##_type>(gmock_p5)), \\\n          p6(::std::forward<p6##_type>(gmock_p6)), \\\n          p7(::std::forward<p7##_type>(gmock_p7)), \\\n          p8(::std::forward<p8##_type>(gmock_p8)) {}\\\n      virtual return_type Perform(const args_type& args) {\\\n        return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\\\n            Perform(this, args);\\\n      }\\\n      template <typename arg0_type, typename arg1_type, typename arg2_type, \\\n          typename arg3_type, typename arg4_type, typename arg5_type, \\\n          typename arg6_type, typename arg7_type, typename arg8_type, \\\n          typename arg9_type>\\\n      return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \\\n          arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \\\n          arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \\\n          arg9_type arg9) const;\\\n      p0##_type p0;\\\n      p1##_type p1;\\\n      p2##_type p2;\\\n      p3##_type p3;\\\n      p4##_type p4;\\\n      p5##_type p5;\\\n      p6##_type p6;\\\n      p7##_type p7;\\\n      p8##_type p8;\\\n     private:\\\n      GTEST_DISALLOW_ASSIGN_(gmock_Impl);\\\n    };\\\n    template <typename F> operator ::testing::Action<F>() const {\\\n      return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3, p4, p5, \\\n          p6, p7, p8));\\\n    }\\\n    p0##_type p0;\\\n    p1##_type p1;\\\n    p2##_type p2;\\\n    p3##_type p3;\\\n    p4##_type p4;\\\n    p5##_type p5;\\\n    p6##_type p6;\\\n    p7##_type p7;\\\n    p8##_type p8;\\\n   private:\\\n    GTEST_DISALLOW_ASSIGN_(name##ActionP9);\\\n  };\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type, typename p4##_type, typename p5##_type, \\\n      typename p6##_type, typename p7##_type, typename p8##_type>\\\n  inline name##ActionP9<p0##_type, p1##_type, p2##_type, p3##_type, \\\n      p4##_type, p5##_type, p6##_type, p7##_type, \\\n      p8##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \\\n      p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, \\\n      p8##_type p8) {\\\n    return name##ActionP9<p0##_type, p1##_type, p2##_type, p3##_type, \\\n        p4##_type, p5##_type, p6##_type, p7##_type, p8##_type>(p0, p1, p2, \\\n        p3, p4, p5, p6, p7, p8);\\\n  }\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type, typename p4##_type, typename p5##_type, \\\n      typename p6##_type, typename p7##_type, typename p8##_type>\\\n  template <typename F>\\\n  template <typename arg0_type, typename arg1_type, typename arg2_type, \\\n      typename arg3_type, typename arg4_type, typename arg5_type, \\\n      typename arg6_type, typename arg7_type, typename arg8_type, \\\n      typename arg9_type>\\\n  typename ::testing::internal::Function<F>::Result\\\n      name##ActionP9<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \\\n          p5##_type, p6##_type, p7##_type, \\\n          p8##_type>::gmock_Impl<F>::gmock_PerformImpl(\\\n          GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const\n\n#define ACTION_P10(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type, typename p4##_type, typename p5##_type, \\\n      typename p6##_type, typename p7##_type, typename p8##_type, \\\n      typename p9##_type>\\\n  class name##ActionP10 {\\\n   public:\\\n    name##ActionP10(p0##_type gmock_p0, p1##_type gmock_p1, \\\n        p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \\\n        p5##_type gmock_p5, p6##_type gmock_p6, p7##_type gmock_p7, \\\n        p8##_type gmock_p8, \\\n        p9##_type gmock_p9) : p0(::std::forward<p0##_type>(gmock_p0)), \\\n        p1(::std::forward<p1##_type>(gmock_p1)), \\\n        p2(::std::forward<p2##_type>(gmock_p2)), \\\n        p3(::std::forward<p3##_type>(gmock_p3)), \\\n        p4(::std::forward<p4##_type>(gmock_p4)), \\\n        p5(::std::forward<p5##_type>(gmock_p5)), \\\n        p6(::std::forward<p6##_type>(gmock_p6)), \\\n        p7(::std::forward<p7##_type>(gmock_p7)), \\\n        p8(::std::forward<p8##_type>(gmock_p8)), \\\n        p9(::std::forward<p9##_type>(gmock_p9)) {}\\\n    template <typename F>\\\n    class gmock_Impl : public ::testing::ActionInterface<F> {\\\n     public:\\\n      typedef F function_type;\\\n      typedef typename ::testing::internal::Function<F>::Result return_type;\\\n      typedef typename ::testing::internal::Function<F>::ArgumentTuple\\\n          args_type;\\\n      gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \\\n          p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \\\n          p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8, \\\n          p9##_type gmock_p9) : p0(::std::forward<p0##_type>(gmock_p0)), \\\n          p1(::std::forward<p1##_type>(gmock_p1)), \\\n          p2(::std::forward<p2##_type>(gmock_p2)), \\\n          p3(::std::forward<p3##_type>(gmock_p3)), \\\n          p4(::std::forward<p4##_type>(gmock_p4)), \\\n          p5(::std::forward<p5##_type>(gmock_p5)), \\\n          p6(::std::forward<p6##_type>(gmock_p6)), \\\n          p7(::std::forward<p7##_type>(gmock_p7)), \\\n          p8(::std::forward<p8##_type>(gmock_p8)), \\\n          p9(::std::forward<p9##_type>(gmock_p9)) {}\\\n      virtual return_type Perform(const args_type& args) {\\\n        return ::testing::internal::ActionHelper<return_type, gmock_Impl>::\\\n            Perform(this, args);\\\n      }\\\n      template <typename arg0_type, typename arg1_type, typename arg2_type, \\\n          typename arg3_type, typename arg4_type, typename arg5_type, \\\n          typename arg6_type, typename arg7_type, typename arg8_type, \\\n          typename arg9_type>\\\n      return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \\\n          arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \\\n          arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \\\n          arg9_type arg9) const;\\\n      p0##_type p0;\\\n      p1##_type p1;\\\n      p2##_type p2;\\\n      p3##_type p3;\\\n      p4##_type p4;\\\n      p5##_type p5;\\\n      p6##_type p6;\\\n      p7##_type p7;\\\n      p8##_type p8;\\\n      p9##_type p9;\\\n     private:\\\n      GTEST_DISALLOW_ASSIGN_(gmock_Impl);\\\n    };\\\n    template <typename F> operator ::testing::Action<F>() const {\\\n      return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3, p4, p5, \\\n          p6, p7, p8, p9));\\\n    }\\\n    p0##_type p0;\\\n    p1##_type p1;\\\n    p2##_type p2;\\\n    p3##_type p3;\\\n    p4##_type p4;\\\n    p5##_type p5;\\\n    p6##_type p6;\\\n    p7##_type p7;\\\n    p8##_type p8;\\\n    p9##_type p9;\\\n   private:\\\n    GTEST_DISALLOW_ASSIGN_(name##ActionP10);\\\n  };\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type, typename p4##_type, typename p5##_type, \\\n      typename p6##_type, typename p7##_type, typename p8##_type, \\\n      typename p9##_type>\\\n  inline name##ActionP10<p0##_type, p1##_type, p2##_type, p3##_type, \\\n      p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, \\\n      p9##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \\\n      p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8, \\\n      p9##_type p9) {\\\n    return name##ActionP10<p0##_type, p1##_type, p2##_type, p3##_type, \\\n        p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, p9##_type>(p0, \\\n        p1, p2, p3, p4, p5, p6, p7, p8, p9);\\\n  }\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type, typename p4##_type, typename p5##_type, \\\n      typename p6##_type, typename p7##_type, typename p8##_type, \\\n      typename p9##_type>\\\n  template <typename F>\\\n  template <typename arg0_type, typename arg1_type, typename arg2_type, \\\n      typename arg3_type, typename arg4_type, typename arg5_type, \\\n      typename arg6_type, typename arg7_type, typename arg8_type, \\\n      typename arg9_type>\\\n  typename ::testing::internal::Function<F>::Result\\\n      name##ActionP10<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \\\n          p5##_type, p6##_type, p7##_type, p8##_type, \\\n          p9##_type>::gmock_Impl<F>::gmock_PerformImpl(\\\n          GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const\n\nnamespace testing {\n\n\n// The ACTION*() macros trigger warning C4100 (unreferenced formal\n// parameter) in MSVC with -W4.  Unfortunately they cannot be fixed in\n// the macro definition, as the warnings are generated when the macro\n// is expanded and macro expansion cannot contain #pragma.  Therefore\n// we suppress them here.\n#ifdef _MSC_VER\n# pragma warning(push)\n# pragma warning(disable:4100)\n#endif\n\n// Various overloads for InvokeArgument<N>().\n//\n// The InvokeArgument<N>(a1, a2, ..., a_k) action invokes the N-th\n// (0-based) argument, which must be a k-ary callable, of the mock\n// function, with arguments a1, a2, ..., a_k.\n//\n// Notes:\n//\n//   1. The arguments are passed by value by default.  If you need to\n//   pass an argument by reference, wrap it inside ByRef().  For\n//   example,\n//\n//     InvokeArgument<1>(5, string(\"Hello\"), ByRef(foo))\n//\n//   passes 5 and string(\"Hello\") by value, and passes foo by\n//   reference.\n//\n//   2. If the callable takes an argument by reference but ByRef() is\n//   not used, it will receive the reference to a copy of the value,\n//   instead of the original value.  For example, when the 0-th\n//   argument of the mock function takes a const string&, the action\n//\n//     InvokeArgument<0>(string(\"Hello\"))\n//\n//   makes a copy of the temporary string(\"Hello\") object and passes a\n//   reference of the copy, instead of the original temporary object,\n//   to the callable.  This makes it easy for a user to define an\n//   InvokeArgument action from temporary values and have it performed\n//   later.\n\nnamespace internal {\nnamespace invoke_argument {\n\n// Appears in InvokeArgumentAdl's argument list to help avoid\n// accidental calls to user functions of the same name.\nstruct AdlTag {};\n\n// InvokeArgumentAdl - a helper for InvokeArgument.\n// The basic overloads are provided here for generic functors.\n// Overloads for other custom-callables are provided in the\n// internal/custom/callback-actions.h header.\n\ntemplate <typename R, typename F>\nR InvokeArgumentAdl(AdlTag, F f) {\n  return f();\n}\ntemplate <typename R, typename F, typename A1>\nR InvokeArgumentAdl(AdlTag, F f, A1 a1) {\n  return f(a1);\n}\ntemplate <typename R, typename F, typename A1, typename A2>\nR InvokeArgumentAdl(AdlTag, F f, A1 a1, A2 a2) {\n  return f(a1, a2);\n}\ntemplate <typename R, typename F, typename A1, typename A2, typename A3>\nR InvokeArgumentAdl(AdlTag, F f, A1 a1, A2 a2, A3 a3) {\n  return f(a1, a2, a3);\n}\ntemplate <typename R, typename F, typename A1, typename A2, typename A3,\n    typename A4>\nR InvokeArgumentAdl(AdlTag, F f, A1 a1, A2 a2, A3 a3, A4 a4) {\n  return f(a1, a2, a3, a4);\n}\ntemplate <typename R, typename F, typename A1, typename A2, typename A3,\n    typename A4, typename A5>\nR InvokeArgumentAdl(AdlTag, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) {\n  return f(a1, a2, a3, a4, a5);\n}\ntemplate <typename R, typename F, typename A1, typename A2, typename A3,\n    typename A4, typename A5, typename A6>\nR InvokeArgumentAdl(AdlTag, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) {\n  return f(a1, a2, a3, a4, a5, a6);\n}\ntemplate <typename R, typename F, typename A1, typename A2, typename A3,\n    typename A4, typename A5, typename A6, typename A7>\nR InvokeArgumentAdl(AdlTag, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6,\n    A7 a7) {\n  return f(a1, a2, a3, a4, a5, a6, a7);\n}\ntemplate <typename R, typename F, typename A1, typename A2, typename A3,\n    typename A4, typename A5, typename A6, typename A7, typename A8>\nR InvokeArgumentAdl(AdlTag, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6,\n    A7 a7, A8 a8) {\n  return f(a1, a2, a3, a4, a5, a6, a7, a8);\n}\ntemplate <typename R, typename F, typename A1, typename A2, typename A3,\n    typename A4, typename A5, typename A6, typename A7, typename A8,\n    typename A9>\nR InvokeArgumentAdl(AdlTag, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6,\n    A7 a7, A8 a8, A9 a9) {\n  return f(a1, a2, a3, a4, a5, a6, a7, a8, a9);\n}\ntemplate <typename R, typename F, typename A1, typename A2, typename A3,\n    typename A4, typename A5, typename A6, typename A7, typename A8,\n    typename A9, typename A10>\nR InvokeArgumentAdl(AdlTag, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6,\n    A7 a7, A8 a8, A9 a9, A10 a10) {\n  return f(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);\n}\n}  // namespace invoke_argument\n}  // namespace internal\n\nACTION_TEMPLATE(InvokeArgument,\n                HAS_1_TEMPLATE_PARAMS(int, k),\n                AND_0_VALUE_PARAMS()) {\n  using internal::invoke_argument::InvokeArgumentAdl;\n  return InvokeArgumentAdl<return_type>(\n      internal::invoke_argument::AdlTag(),\n      ::std::get<k>(args));\n}\n\nACTION_TEMPLATE(InvokeArgument,\n                HAS_1_TEMPLATE_PARAMS(int, k),\n                AND_1_VALUE_PARAMS(p0)) {\n  using internal::invoke_argument::InvokeArgumentAdl;\n  return InvokeArgumentAdl<return_type>(\n      internal::invoke_argument::AdlTag(),\n      ::std::get<k>(args), p0);\n}\n\nACTION_TEMPLATE(InvokeArgument,\n                HAS_1_TEMPLATE_PARAMS(int, k),\n                AND_2_VALUE_PARAMS(p0, p1)) {\n  using internal::invoke_argument::InvokeArgumentAdl;\n  return InvokeArgumentAdl<return_type>(\n      internal::invoke_argument::AdlTag(),\n      ::std::get<k>(args), p0, p1);\n}\n\nACTION_TEMPLATE(InvokeArgument,\n                HAS_1_TEMPLATE_PARAMS(int, k),\n                AND_3_VALUE_PARAMS(p0, p1, p2)) {\n  using internal::invoke_argument::InvokeArgumentAdl;\n  return InvokeArgumentAdl<return_type>(\n      internal::invoke_argument::AdlTag(),\n      ::std::get<k>(args), p0, p1, p2);\n}\n\nACTION_TEMPLATE(InvokeArgument,\n                HAS_1_TEMPLATE_PARAMS(int, k),\n                AND_4_VALUE_PARAMS(p0, p1, p2, p3)) {\n  using internal::invoke_argument::InvokeArgumentAdl;\n  return InvokeArgumentAdl<return_type>(\n      internal::invoke_argument::AdlTag(),\n      ::std::get<k>(args), p0, p1, p2, p3);\n}\n\nACTION_TEMPLATE(InvokeArgument,\n                HAS_1_TEMPLATE_PARAMS(int, k),\n                AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)) {\n  using internal::invoke_argument::InvokeArgumentAdl;\n  return InvokeArgumentAdl<return_type>(\n      internal::invoke_argument::AdlTag(),\n      ::std::get<k>(args), p0, p1, p2, p3, p4);\n}\n\nACTION_TEMPLATE(InvokeArgument,\n                HAS_1_TEMPLATE_PARAMS(int, k),\n                AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)) {\n  using internal::invoke_argument::InvokeArgumentAdl;\n  return InvokeArgumentAdl<return_type>(\n      internal::invoke_argument::AdlTag(),\n      ::std::get<k>(args), p0, p1, p2, p3, p4, p5);\n}\n\nACTION_TEMPLATE(InvokeArgument,\n                HAS_1_TEMPLATE_PARAMS(int, k),\n                AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)) {\n  using internal::invoke_argument::InvokeArgumentAdl;\n  return InvokeArgumentAdl<return_type>(\n      internal::invoke_argument::AdlTag(),\n      ::std::get<k>(args), p0, p1, p2, p3, p4, p5, p6);\n}\n\nACTION_TEMPLATE(InvokeArgument,\n                HAS_1_TEMPLATE_PARAMS(int, k),\n                AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)) {\n  using internal::invoke_argument::InvokeArgumentAdl;\n  return InvokeArgumentAdl<return_type>(\n      internal::invoke_argument::AdlTag(),\n      ::std::get<k>(args), p0, p1, p2, p3, p4, p5, p6, p7);\n}\n\nACTION_TEMPLATE(InvokeArgument,\n                HAS_1_TEMPLATE_PARAMS(int, k),\n                AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8)) {\n  using internal::invoke_argument::InvokeArgumentAdl;\n  return InvokeArgumentAdl<return_type>(\n      internal::invoke_argument::AdlTag(),\n      ::std::get<k>(args), p0, p1, p2, p3, p4, p5, p6, p7, p8);\n}\n\nACTION_TEMPLATE(InvokeArgument,\n                HAS_1_TEMPLATE_PARAMS(int, k),\n                AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)) {\n  using internal::invoke_argument::InvokeArgumentAdl;\n  return InvokeArgumentAdl<return_type>(\n      internal::invoke_argument::AdlTag(),\n      ::std::get<k>(args), p0, p1, p2, p3, p4, p5, p6, p7, p8, p9);\n}\n\n// Various overloads for ReturnNew<T>().\n//\n// The ReturnNew<T>(a1, a2, ..., a_k) action returns a pointer to a new\n// instance of type T, constructed on the heap with constructor arguments\n// a1, a2, ..., and a_k. The caller assumes ownership of the returned value.\nACTION_TEMPLATE(ReturnNew,\n                HAS_1_TEMPLATE_PARAMS(typename, T),\n                AND_0_VALUE_PARAMS()) {\n  return new T();\n}\n\nACTION_TEMPLATE(ReturnNew,\n                HAS_1_TEMPLATE_PARAMS(typename, T),\n                AND_1_VALUE_PARAMS(p0)) {\n  return new T(p0);\n}\n\nACTION_TEMPLATE(ReturnNew,\n                HAS_1_TEMPLATE_PARAMS(typename, T),\n                AND_2_VALUE_PARAMS(p0, p1)) {\n  return new T(p0, p1);\n}\n\nACTION_TEMPLATE(ReturnNew,\n                HAS_1_TEMPLATE_PARAMS(typename, T),\n                AND_3_VALUE_PARAMS(p0, p1, p2)) {\n  return new T(p0, p1, p2);\n}\n\nACTION_TEMPLATE(ReturnNew,\n                HAS_1_TEMPLATE_PARAMS(typename, T),\n                AND_4_VALUE_PARAMS(p0, p1, p2, p3)) {\n  return new T(p0, p1, p2, p3);\n}\n\nACTION_TEMPLATE(ReturnNew,\n                HAS_1_TEMPLATE_PARAMS(typename, T),\n                AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)) {\n  return new T(p0, p1, p2, p3, p4);\n}\n\nACTION_TEMPLATE(ReturnNew,\n                HAS_1_TEMPLATE_PARAMS(typename, T),\n                AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)) {\n  return new T(p0, p1, p2, p3, p4, p5);\n}\n\nACTION_TEMPLATE(ReturnNew,\n                HAS_1_TEMPLATE_PARAMS(typename, T),\n                AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)) {\n  return new T(p0, p1, p2, p3, p4, p5, p6);\n}\n\nACTION_TEMPLATE(ReturnNew,\n                HAS_1_TEMPLATE_PARAMS(typename, T),\n                AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)) {\n  return new T(p0, p1, p2, p3, p4, p5, p6, p7);\n}\n\nACTION_TEMPLATE(ReturnNew,\n                HAS_1_TEMPLATE_PARAMS(typename, T),\n                AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8)) {\n  return new T(p0, p1, p2, p3, p4, p5, p6, p7, p8);\n}\n\nACTION_TEMPLATE(ReturnNew,\n                HAS_1_TEMPLATE_PARAMS(typename, T),\n                AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)) {\n  return new T(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9);\n}\n\n#ifdef _MSC_VER\n# pragma warning(pop)\n#endif\n\n}  // namespace testing\n\n// Include any custom callback actions added by the local installation.\n// We must include this header at the end to make sure it can use the\n// declarations from this file.\n// This file was GENERATED by command:\n//     pump.py gmock-generated-actions.h.pump\n// DO NOT EDIT BY HAND!!!\n\n// GOOGLETEST_CM0002 DO NOT DELETE\n\n#ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_GENERATED_ACTIONS_H_\n#define GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_GENERATED_ACTIONS_H_\n\n#endif  // GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_GENERATED_ACTIONS_H_\n\n#endif  // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_\n// This file was GENERATED by command:\n//     pump.py gmock-generated-matchers.h.pump\n// DO NOT EDIT BY HAND!!!\n\n// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n// Google Mock - a framework for writing C++ mock classes.\n//\n// This file implements some commonly used variadic matchers.\n\n// GOOGLETEST_CM0002 DO NOT DELETE\n\n#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_\n#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_\n\n#include <iterator>\n#include <sstream>\n#include <string>\n#include <utility>\n#include <vector>\n\n// The MATCHER* family of macros can be used in a namespace scope to\n// define custom matchers easily.\n//\n// Basic Usage\n// ===========\n//\n// The syntax\n//\n//   MATCHER(name, description_string) { statements; }\n//\n// defines a matcher with the given name that executes the statements,\n// which must return a bool to indicate if the match succeeds.  Inside\n// the statements, you can refer to the value being matched by 'arg',\n// and refer to its type by 'arg_type'.\n//\n// The description string documents what the matcher does, and is used\n// to generate the failure message when the match fails.  Since a\n// MATCHER() is usually defined in a header file shared by multiple\n// C++ source files, we require the description to be a C-string\n// literal to avoid possible side effects.  It can be empty, in which\n// case we'll use the sequence of words in the matcher name as the\n// description.\n//\n// For example:\n//\n//   MATCHER(IsEven, \"\") { return (arg % 2) == 0; }\n//\n// allows you to write\n//\n//   // Expects mock_foo.Bar(n) to be called where n is even.\n//   EXPECT_CALL(mock_foo, Bar(IsEven()));\n//\n// or,\n//\n//   // Verifies that the value of some_expression is even.\n//   EXPECT_THAT(some_expression, IsEven());\n//\n// If the above assertion fails, it will print something like:\n//\n//   Value of: some_expression\n//   Expected: is even\n//     Actual: 7\n//\n// where the description \"is even\" is automatically calculated from the\n// matcher name IsEven.\n//\n// Argument Type\n// =============\n//\n// Note that the type of the value being matched (arg_type) is\n// determined by the context in which you use the matcher and is\n// supplied to you by the compiler, so you don't need to worry about\n// declaring it (nor can you).  This allows the matcher to be\n// polymorphic.  For example, IsEven() can be used to match any type\n// where the value of \"(arg % 2) == 0\" can be implicitly converted to\n// a bool.  In the \"Bar(IsEven())\" example above, if method Bar()\n// takes an int, 'arg_type' will be int; if it takes an unsigned long,\n// 'arg_type' will be unsigned long; and so on.\n//\n// Parameterizing Matchers\n// =======================\n//\n// Sometimes you'll want to parameterize the matcher.  For that you\n// can use another macro:\n//\n//   MATCHER_P(name, param_name, description_string) { statements; }\n//\n// For example:\n//\n//   MATCHER_P(HasAbsoluteValue, value, \"\") { return abs(arg) == value; }\n//\n// will allow you to write:\n//\n//   EXPECT_THAT(Blah(\"a\"), HasAbsoluteValue(n));\n//\n// which may lead to this message (assuming n is 10):\n//\n//   Value of: Blah(\"a\")\n//   Expected: has absolute value 10\n//     Actual: -9\n//\n// Note that both the matcher description and its parameter are\n// printed, making the message human-friendly.\n//\n// In the matcher definition body, you can write 'foo_type' to\n// reference the type of a parameter named 'foo'.  For example, in the\n// body of MATCHER_P(HasAbsoluteValue, value) above, you can write\n// 'value_type' to refer to the type of 'value'.\n//\n// We also provide MATCHER_P2, MATCHER_P3, ..., up to MATCHER_P10 to\n// support multi-parameter matchers.\n//\n// Describing Parameterized Matchers\n// =================================\n//\n// The last argument to MATCHER*() is a string-typed expression.  The\n// expression can reference all of the matcher's parameters and a\n// special bool-typed variable named 'negation'.  When 'negation' is\n// false, the expression should evaluate to the matcher's description;\n// otherwise it should evaluate to the description of the negation of\n// the matcher.  For example,\n//\n//   using testing::PrintToString;\n//\n//   MATCHER_P2(InClosedRange, low, hi,\n//       std::string(negation ? \"is not\" : \"is\") + \" in range [\" +\n//       PrintToString(low) + \", \" + PrintToString(hi) + \"]\") {\n//     return low <= arg && arg <= hi;\n//   }\n//   ...\n//   EXPECT_THAT(3, InClosedRange(4, 6));\n//   EXPECT_THAT(3, Not(InClosedRange(2, 4)));\n//\n// would generate two failures that contain the text:\n//\n//   Expected: is in range [4, 6]\n//   ...\n//   Expected: is not in range [2, 4]\n//\n// If you specify \"\" as the description, the failure message will\n// contain the sequence of words in the matcher name followed by the\n// parameter values printed as a tuple.  For example,\n//\n//   MATCHER_P2(InClosedRange, low, hi, \"\") { ... }\n//   ...\n//   EXPECT_THAT(3, InClosedRange(4, 6));\n//   EXPECT_THAT(3, Not(InClosedRange(2, 4)));\n//\n// would generate two failures that contain the text:\n//\n//   Expected: in closed range (4, 6)\n//   ...\n//   Expected: not (in closed range (2, 4))\n//\n// Types of Matcher Parameters\n// ===========================\n//\n// For the purpose of typing, you can view\n//\n//   MATCHER_Pk(Foo, p1, ..., pk, description_string) { ... }\n//\n// as shorthand for\n//\n//   template <typename p1_type, ..., typename pk_type>\n//   FooMatcherPk<p1_type, ..., pk_type>\n//   Foo(p1_type p1, ..., pk_type pk) { ... }\n//\n// When you write Foo(v1, ..., vk), the compiler infers the types of\n// the parameters v1, ..., and vk for you.  If you are not happy with\n// the result of the type inference, you can specify the types by\n// explicitly instantiating the template, as in Foo<long, bool>(5,\n// false).  As said earlier, you don't get to (or need to) specify\n// 'arg_type' as that's determined by the context in which the matcher\n// is used.  You can assign the result of expression Foo(p1, ..., pk)\n// to a variable of type FooMatcherPk<p1_type, ..., pk_type>.  This\n// can be useful when composing matchers.\n//\n// While you can instantiate a matcher template with reference types,\n// passing the parameters by pointer usually makes your code more\n// readable.  If, however, you still want to pass a parameter by\n// reference, be aware that in the failure message generated by the\n// matcher you will see the value of the referenced object but not its\n// address.\n//\n// Explaining Match Results\n// ========================\n//\n// Sometimes the matcher description alone isn't enough to explain why\n// the match has failed or succeeded.  For example, when expecting a\n// long string, it can be very helpful to also print the diff between\n// the expected string and the actual one.  To achieve that, you can\n// optionally stream additional information to a special variable\n// named result_listener, whose type is a pointer to class\n// MatchResultListener:\n//\n//   MATCHER_P(EqualsLongString, str, \"\") {\n//     if (arg == str) return true;\n//\n//     *result_listener << \"the difference: \"\n///                     << DiffStrings(str, arg);\n//     return false;\n//   }\n//\n// Overloading Matchers\n// ====================\n//\n// You can overload matchers with different numbers of parameters:\n//\n//   MATCHER_P(Blah, a, description_string1) { ... }\n//   MATCHER_P2(Blah, a, b, description_string2) { ... }\n//\n// Caveats\n// =======\n//\n// When defining a new matcher, you should also consider implementing\n// MatcherInterface or using MakePolymorphicMatcher().  These\n// approaches require more work than the MATCHER* macros, but also\n// give you more control on the types of the value being matched and\n// the matcher parameters, which may leads to better compiler error\n// messages when the matcher is used wrong.  They also allow\n// overloading matchers based on parameter types (as opposed to just\n// based on the number of parameters).\n//\n// MATCHER*() can only be used in a namespace scope.  The reason is\n// that C++ doesn't yet allow function-local types to be used to\n// instantiate templates.  The up-coming C++0x standard will fix this.\n// Once that's done, we'll consider supporting using MATCHER*() inside\n// a function.\n//\n// More Information\n// ================\n//\n// To learn more about using these macros, please search for 'MATCHER'\n// on\n// https://github.com/google/googletest/blob/master/googlemock/docs/CookBook.md\n\n#define MATCHER(name, description)\\\n  class name##Matcher {\\\n   public:\\\n    template <typename arg_type>\\\n    class gmock_Impl : public ::testing::MatcherInterface<\\\n        GTEST_REFERENCE_TO_CONST_(arg_type)> {\\\n     public:\\\n      gmock_Impl()\\\n           {}\\\n      virtual bool MatchAndExplain(\\\n          GTEST_REFERENCE_TO_CONST_(arg_type) arg,\\\n          ::testing::MatchResultListener* result_listener) const;\\\n      virtual void DescribeTo(::std::ostream* gmock_os) const {\\\n        *gmock_os << FormatDescription(false);\\\n      }\\\n      virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\\\n        *gmock_os << FormatDescription(true);\\\n      }\\\n     private:\\\n      ::std::string FormatDescription(bool negation) const {\\\n        ::std::string gmock_description = (description);\\\n        if (!gmock_description.empty()) {\\\n          return gmock_description;\\\n        }\\\n        return ::testing::internal::FormatMatcherDescription(\\\n            negation, #name, \\\n            ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\\\n                ::std::tuple<>()));\\\n      }\\\n    };\\\n    template <typename arg_type>\\\n    operator ::testing::Matcher<arg_type>() const {\\\n      return ::testing::Matcher<arg_type>(\\\n          new gmock_Impl<arg_type>());\\\n    }\\\n    name##Matcher() {\\\n    }\\\n   private:\\\n  };\\\n  inline name##Matcher name() {\\\n    return name##Matcher();\\\n  }\\\n  template <typename arg_type>\\\n  bool name##Matcher::gmock_Impl<arg_type>::MatchAndExplain(\\\n      GTEST_REFERENCE_TO_CONST_(arg_type) arg,\\\n      ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\\\n          const\n\n#define MATCHER_P(name, p0, description)\\\n  template <typename p0##_type>\\\n  class name##MatcherP {\\\n   public:\\\n    template <typename arg_type>\\\n    class gmock_Impl : public ::testing::MatcherInterface<\\\n        GTEST_REFERENCE_TO_CONST_(arg_type)> {\\\n     public:\\\n      explicit gmock_Impl(p0##_type gmock_p0)\\\n           : p0(::std::move(gmock_p0)) {}\\\n      virtual bool MatchAndExplain(\\\n          GTEST_REFERENCE_TO_CONST_(arg_type) arg,\\\n          ::testing::MatchResultListener* result_listener) const;\\\n      virtual void DescribeTo(::std::ostream* gmock_os) const {\\\n        *gmock_os << FormatDescription(false);\\\n      }\\\n      virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\\\n        *gmock_os << FormatDescription(true);\\\n      }\\\n      p0##_type const p0;\\\n     private:\\\n      ::std::string FormatDescription(bool negation) const {\\\n        ::std::string gmock_description = (description);\\\n        if (!gmock_description.empty()) {\\\n          return gmock_description;\\\n        }\\\n        return ::testing::internal::FormatMatcherDescription(\\\n            negation, #name, \\\n            ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\\\n                ::std::tuple<p0##_type>(p0)));\\\n      }\\\n    };\\\n    template <typename arg_type>\\\n    operator ::testing::Matcher<arg_type>() const {\\\n      return ::testing::Matcher<arg_type>(\\\n          new gmock_Impl<arg_type>(p0));\\\n    }\\\n    explicit name##MatcherP(p0##_type gmock_p0) : p0(::std::move(gmock_p0)) {\\\n    }\\\n    p0##_type const p0;\\\n   private:\\\n  };\\\n  template <typename p0##_type>\\\n  inline name##MatcherP<p0##_type> name(p0##_type p0) {\\\n    return name##MatcherP<p0##_type>(p0);\\\n  }\\\n  template <typename p0##_type>\\\n  template <typename arg_type>\\\n  bool name##MatcherP<p0##_type>::gmock_Impl<arg_type>::MatchAndExplain(\\\n      GTEST_REFERENCE_TO_CONST_(arg_type) arg,\\\n      ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\\\n          const\n\n#define MATCHER_P2(name, p0, p1, description)\\\n  template <typename p0##_type, typename p1##_type>\\\n  class name##MatcherP2 {\\\n   public:\\\n    template <typename arg_type>\\\n    class gmock_Impl : public ::testing::MatcherInterface<\\\n        GTEST_REFERENCE_TO_CONST_(arg_type)> {\\\n     public:\\\n      gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1)\\\n           : p0(::std::move(gmock_p0)), p1(::std::move(gmock_p1)) {}\\\n      virtual bool MatchAndExplain(\\\n          GTEST_REFERENCE_TO_CONST_(arg_type) arg,\\\n          ::testing::MatchResultListener* result_listener) const;\\\n      virtual void DescribeTo(::std::ostream* gmock_os) const {\\\n        *gmock_os << FormatDescription(false);\\\n      }\\\n      virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\\\n        *gmock_os << FormatDescription(true);\\\n      }\\\n      p0##_type const p0;\\\n      p1##_type const p1;\\\n     private:\\\n      ::std::string FormatDescription(bool negation) const {\\\n        ::std::string gmock_description = (description);\\\n        if (!gmock_description.empty()) {\\\n          return gmock_description;\\\n        }\\\n        return ::testing::internal::FormatMatcherDescription(\\\n            negation, #name, \\\n            ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\\\n                ::std::tuple<p0##_type, p1##_type>(p0, p1)));\\\n      }\\\n    };\\\n    template <typename arg_type>\\\n    operator ::testing::Matcher<arg_type>() const {\\\n      return ::testing::Matcher<arg_type>(\\\n          new gmock_Impl<arg_type>(p0, p1));\\\n    }\\\n    name##MatcherP2(p0##_type gmock_p0, \\\n        p1##_type gmock_p1) : p0(::std::move(gmock_p0)), \\\n        p1(::std::move(gmock_p1)) {\\\n    }\\\n    p0##_type const p0;\\\n    p1##_type const p1;\\\n   private:\\\n  };\\\n  template <typename p0##_type, typename p1##_type>\\\n  inline name##MatcherP2<p0##_type, p1##_type> name(p0##_type p0, \\\n      p1##_type p1) {\\\n    return name##MatcherP2<p0##_type, p1##_type>(p0, p1);\\\n  }\\\n  template <typename p0##_type, typename p1##_type>\\\n  template <typename arg_type>\\\n  bool name##MatcherP2<p0##_type, \\\n      p1##_type>::gmock_Impl<arg_type>::MatchAndExplain(\\\n      GTEST_REFERENCE_TO_CONST_(arg_type) arg,\\\n      ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\\\n          const\n\n#define MATCHER_P3(name, p0, p1, p2, description)\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type>\\\n  class name##MatcherP3 {\\\n   public:\\\n    template <typename arg_type>\\\n    class gmock_Impl : public ::testing::MatcherInterface<\\\n        GTEST_REFERENCE_TO_CONST_(arg_type)> {\\\n     public:\\\n      gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2)\\\n           : p0(::std::move(gmock_p0)), p1(::std::move(gmock_p1)), \\\n               p2(::std::move(gmock_p2)) {}\\\n      virtual bool MatchAndExplain(\\\n          GTEST_REFERENCE_TO_CONST_(arg_type) arg,\\\n          ::testing::MatchResultListener* result_listener) const;\\\n      virtual void DescribeTo(::std::ostream* gmock_os) const {\\\n        *gmock_os << FormatDescription(false);\\\n      }\\\n      virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\\\n        *gmock_os << FormatDescription(true);\\\n      }\\\n      p0##_type const p0;\\\n      p1##_type const p1;\\\n      p2##_type const p2;\\\n     private:\\\n      ::std::string FormatDescription(bool negation) const {\\\n        ::std::string gmock_description = (description);\\\n        if (!gmock_description.empty()) {\\\n          return gmock_description;\\\n        }\\\n        return ::testing::internal::FormatMatcherDescription(\\\n            negation, #name, \\\n            ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\\\n                ::std::tuple<p0##_type, p1##_type, p2##_type>(p0, p1, p2)));\\\n      }\\\n    };\\\n    template <typename arg_type>\\\n    operator ::testing::Matcher<arg_type>() const {\\\n      return ::testing::Matcher<arg_type>(\\\n          new gmock_Impl<arg_type>(p0, p1, p2));\\\n    }\\\n    name##MatcherP3(p0##_type gmock_p0, p1##_type gmock_p1, \\\n        p2##_type gmock_p2) : p0(::std::move(gmock_p0)), \\\n        p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)) {\\\n    }\\\n    p0##_type const p0;\\\n    p1##_type const p1;\\\n    p2##_type const p2;\\\n   private:\\\n  };\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type>\\\n  inline name##MatcherP3<p0##_type, p1##_type, p2##_type> name(p0##_type p0, \\\n      p1##_type p1, p2##_type p2) {\\\n    return name##MatcherP3<p0##_type, p1##_type, p2##_type>(p0, p1, p2);\\\n  }\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type>\\\n  template <typename arg_type>\\\n  bool name##MatcherP3<p0##_type, p1##_type, \\\n      p2##_type>::gmock_Impl<arg_type>::MatchAndExplain(\\\n      GTEST_REFERENCE_TO_CONST_(arg_type) arg,\\\n      ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\\\n          const\n\n#define MATCHER_P4(name, p0, p1, p2, p3, description)\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type>\\\n  class name##MatcherP4 {\\\n   public:\\\n    template <typename arg_type>\\\n    class gmock_Impl : public ::testing::MatcherInterface<\\\n        GTEST_REFERENCE_TO_CONST_(arg_type)> {\\\n     public:\\\n      gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \\\n          p3##_type gmock_p3)\\\n           : p0(::std::move(gmock_p0)), p1(::std::move(gmock_p1)), \\\n               p2(::std::move(gmock_p2)), p3(::std::move(gmock_p3)) {}\\\n      virtual bool MatchAndExplain(\\\n          GTEST_REFERENCE_TO_CONST_(arg_type) arg,\\\n          ::testing::MatchResultListener* result_listener) const;\\\n      virtual void DescribeTo(::std::ostream* gmock_os) const {\\\n        *gmock_os << FormatDescription(false);\\\n      }\\\n      virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\\\n        *gmock_os << FormatDescription(true);\\\n      }\\\n      p0##_type const p0;\\\n      p1##_type const p1;\\\n      p2##_type const p2;\\\n      p3##_type const p3;\\\n     private:\\\n      ::std::string FormatDescription(bool negation) const {\\\n        ::std::string gmock_description = (description);\\\n        if (!gmock_description.empty()) {\\\n          return gmock_description;\\\n        }\\\n        return ::testing::internal::FormatMatcherDescription(\\\n            negation, #name, \\\n            ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\\\n                ::std::tuple<p0##_type, p1##_type, p2##_type, p3##_type>(p0, \\\n                    p1, p2, p3)));\\\n      }\\\n    };\\\n    template <typename arg_type>\\\n    operator ::testing::Matcher<arg_type>() const {\\\n      return ::testing::Matcher<arg_type>(\\\n          new gmock_Impl<arg_type>(p0, p1, p2, p3));\\\n    }\\\n    name##MatcherP4(p0##_type gmock_p0, p1##_type gmock_p1, \\\n        p2##_type gmock_p2, p3##_type gmock_p3) : p0(::std::move(gmock_p0)), \\\n        p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \\\n        p3(::std::move(gmock_p3)) {\\\n    }\\\n    p0##_type const p0;\\\n    p1##_type const p1;\\\n    p2##_type const p2;\\\n    p3##_type const p3;\\\n   private:\\\n  };\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type>\\\n  inline name##MatcherP4<p0##_type, p1##_type, p2##_type, \\\n      p3##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, \\\n      p3##_type p3) {\\\n    return name##MatcherP4<p0##_type, p1##_type, p2##_type, p3##_type>(p0, \\\n        p1, p2, p3);\\\n  }\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type>\\\n  template <typename arg_type>\\\n  bool name##MatcherP4<p0##_type, p1##_type, p2##_type, \\\n      p3##_type>::gmock_Impl<arg_type>::MatchAndExplain(\\\n      GTEST_REFERENCE_TO_CONST_(arg_type) arg,\\\n      ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\\\n          const\n\n#define MATCHER_P5(name, p0, p1, p2, p3, p4, description)\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type, typename p4##_type>\\\n  class name##MatcherP5 {\\\n   public:\\\n    template <typename arg_type>\\\n    class gmock_Impl : public ::testing::MatcherInterface<\\\n        GTEST_REFERENCE_TO_CONST_(arg_type)> {\\\n     public:\\\n      gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \\\n          p3##_type gmock_p3, p4##_type gmock_p4)\\\n           : p0(::std::move(gmock_p0)), p1(::std::move(gmock_p1)), \\\n               p2(::std::move(gmock_p2)), p3(::std::move(gmock_p3)), \\\n               p4(::std::move(gmock_p4)) {}\\\n      virtual bool MatchAndExplain(\\\n          GTEST_REFERENCE_TO_CONST_(arg_type) arg,\\\n          ::testing::MatchResultListener* result_listener) const;\\\n      virtual void DescribeTo(::std::ostream* gmock_os) const {\\\n        *gmock_os << FormatDescription(false);\\\n      }\\\n      virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\\\n        *gmock_os << FormatDescription(true);\\\n      }\\\n      p0##_type const p0;\\\n      p1##_type const p1;\\\n      p2##_type const p2;\\\n      p3##_type const p3;\\\n      p4##_type const p4;\\\n     private:\\\n      ::std::string FormatDescription(bool negation) const {\\\n        ::std::string gmock_description = (description);\\\n        if (!gmock_description.empty()) {\\\n          return gmock_description;\\\n        }\\\n        return ::testing::internal::FormatMatcherDescription(\\\n            negation, #name, \\\n            ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\\\n                ::std::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \\\n                    p4##_type>(p0, p1, p2, p3, p4)));\\\n      }\\\n    };\\\n    template <typename arg_type>\\\n    operator ::testing::Matcher<arg_type>() const {\\\n      return ::testing::Matcher<arg_type>(\\\n          new gmock_Impl<arg_type>(p0, p1, p2, p3, p4));\\\n    }\\\n    name##MatcherP5(p0##_type gmock_p0, p1##_type gmock_p1, \\\n        p2##_type gmock_p2, p3##_type gmock_p3, \\\n        p4##_type gmock_p4) : p0(::std::move(gmock_p0)), \\\n        p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \\\n        p3(::std::move(gmock_p3)), p4(::std::move(gmock_p4)) {\\\n    }\\\n    p0##_type const p0;\\\n    p1##_type const p1;\\\n    p2##_type const p2;\\\n    p3##_type const p3;\\\n    p4##_type const p4;\\\n   private:\\\n  };\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type, typename p4##_type>\\\n  inline name##MatcherP5<p0##_type, p1##_type, p2##_type, p3##_type, \\\n      p4##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \\\n      p4##_type p4) {\\\n    return name##MatcherP5<p0##_type, p1##_type, p2##_type, p3##_type, \\\n        p4##_type>(p0, p1, p2, p3, p4);\\\n  }\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type, typename p4##_type>\\\n  template <typename arg_type>\\\n  bool name##MatcherP5<p0##_type, p1##_type, p2##_type, p3##_type, \\\n      p4##_type>::gmock_Impl<arg_type>::MatchAndExplain(\\\n      GTEST_REFERENCE_TO_CONST_(arg_type) arg,\\\n      ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\\\n          const\n\n#define MATCHER_P6(name, p0, p1, p2, p3, p4, p5, description)\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type, typename p4##_type, typename p5##_type>\\\n  class name##MatcherP6 {\\\n   public:\\\n    template <typename arg_type>\\\n    class gmock_Impl : public ::testing::MatcherInterface<\\\n        GTEST_REFERENCE_TO_CONST_(arg_type)> {\\\n     public:\\\n      gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \\\n          p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5)\\\n           : p0(::std::move(gmock_p0)), p1(::std::move(gmock_p1)), \\\n               p2(::std::move(gmock_p2)), p3(::std::move(gmock_p3)), \\\n               p4(::std::move(gmock_p4)), p5(::std::move(gmock_p5)) {}\\\n      virtual bool MatchAndExplain(\\\n          GTEST_REFERENCE_TO_CONST_(arg_type) arg,\\\n          ::testing::MatchResultListener* result_listener) const;\\\n      virtual void DescribeTo(::std::ostream* gmock_os) const {\\\n        *gmock_os << FormatDescription(false);\\\n      }\\\n      virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\\\n        *gmock_os << FormatDescription(true);\\\n      }\\\n      p0##_type const p0;\\\n      p1##_type const p1;\\\n      p2##_type const p2;\\\n      p3##_type const p3;\\\n      p4##_type const p4;\\\n      p5##_type const p5;\\\n     private:\\\n      ::std::string FormatDescription(bool negation) const {\\\n        ::std::string gmock_description = (description);\\\n        if (!gmock_description.empty()) {\\\n          return gmock_description;\\\n        }\\\n        return ::testing::internal::FormatMatcherDescription(\\\n            negation, #name, \\\n            ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\\\n                ::std::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \\\n                    p4##_type, p5##_type>(p0, p1, p2, p3, p4, p5)));\\\n      }\\\n    };\\\n    template <typename arg_type>\\\n    operator ::testing::Matcher<arg_type>() const {\\\n      return ::testing::Matcher<arg_type>(\\\n          new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5));\\\n    }\\\n    name##MatcherP6(p0##_type gmock_p0, p1##_type gmock_p1, \\\n        p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \\\n        p5##_type gmock_p5) : p0(::std::move(gmock_p0)), \\\n        p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \\\n        p3(::std::move(gmock_p3)), p4(::std::move(gmock_p4)), \\\n        p5(::std::move(gmock_p5)) {\\\n    }\\\n    p0##_type const p0;\\\n    p1##_type const p1;\\\n    p2##_type const p2;\\\n    p3##_type const p3;\\\n    p4##_type const p4;\\\n    p5##_type const p5;\\\n   private:\\\n  };\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type, typename p4##_type, typename p5##_type>\\\n  inline name##MatcherP6<p0##_type, p1##_type, p2##_type, p3##_type, \\\n      p4##_type, p5##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, \\\n      p3##_type p3, p4##_type p4, p5##_type p5) {\\\n    return name##MatcherP6<p0##_type, p1##_type, p2##_type, p3##_type, \\\n        p4##_type, p5##_type>(p0, p1, p2, p3, p4, p5);\\\n  }\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type, typename p4##_type, typename p5##_type>\\\n  template <typename arg_type>\\\n  bool name##MatcherP6<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \\\n      p5##_type>::gmock_Impl<arg_type>::MatchAndExplain(\\\n      GTEST_REFERENCE_TO_CONST_(arg_type) arg,\\\n      ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\\\n          const\n\n#define MATCHER_P7(name, p0, p1, p2, p3, p4, p5, p6, description)\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type, typename p4##_type, typename p5##_type, \\\n      typename p6##_type>\\\n  class name##MatcherP7 {\\\n   public:\\\n    template <typename arg_type>\\\n    class gmock_Impl : public ::testing::MatcherInterface<\\\n        GTEST_REFERENCE_TO_CONST_(arg_type)> {\\\n     public:\\\n      gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \\\n          p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \\\n          p6##_type gmock_p6)\\\n           : p0(::std::move(gmock_p0)), p1(::std::move(gmock_p1)), \\\n               p2(::std::move(gmock_p2)), p3(::std::move(gmock_p3)), \\\n               p4(::std::move(gmock_p4)), p5(::std::move(gmock_p5)), \\\n               p6(::std::move(gmock_p6)) {}\\\n      virtual bool MatchAndExplain(\\\n          GTEST_REFERENCE_TO_CONST_(arg_type) arg,\\\n          ::testing::MatchResultListener* result_listener) const;\\\n      virtual void DescribeTo(::std::ostream* gmock_os) const {\\\n        *gmock_os << FormatDescription(false);\\\n      }\\\n      virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\\\n        *gmock_os << FormatDescription(true);\\\n      }\\\n      p0##_type const p0;\\\n      p1##_type const p1;\\\n      p2##_type const p2;\\\n      p3##_type const p3;\\\n      p4##_type const p4;\\\n      p5##_type const p5;\\\n      p6##_type const p6;\\\n     private:\\\n      ::std::string FormatDescription(bool negation) const {\\\n        ::std::string gmock_description = (description);\\\n        if (!gmock_description.empty()) {\\\n          return gmock_description;\\\n        }\\\n        return ::testing::internal::FormatMatcherDescription(\\\n            negation, #name, \\\n            ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\\\n                ::std::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \\\n                    p4##_type, p5##_type, p6##_type>(p0, p1, p2, p3, p4, p5, \\\n                    p6)));\\\n      }\\\n    };\\\n    template <typename arg_type>\\\n    operator ::testing::Matcher<arg_type>() const {\\\n      return ::testing::Matcher<arg_type>(\\\n          new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5, p6));\\\n    }\\\n    name##MatcherP7(p0##_type gmock_p0, p1##_type gmock_p1, \\\n        p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \\\n        p5##_type gmock_p5, p6##_type gmock_p6) : p0(::std::move(gmock_p0)), \\\n        p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \\\n        p3(::std::move(gmock_p3)), p4(::std::move(gmock_p4)), \\\n        p5(::std::move(gmock_p5)), p6(::std::move(gmock_p6)) {\\\n    }\\\n    p0##_type const p0;\\\n    p1##_type const p1;\\\n    p2##_type const p2;\\\n    p3##_type const p3;\\\n    p4##_type const p4;\\\n    p5##_type const p5;\\\n    p6##_type const p6;\\\n   private:\\\n  };\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type, typename p4##_type, typename p5##_type, \\\n      typename p6##_type>\\\n  inline name##MatcherP7<p0##_type, p1##_type, p2##_type, p3##_type, \\\n      p4##_type, p5##_type, p6##_type> name(p0##_type p0, p1##_type p1, \\\n      p2##_type p2, p3##_type p3, p4##_type p4, p5##_type p5, \\\n      p6##_type p6) {\\\n    return name##MatcherP7<p0##_type, p1##_type, p2##_type, p3##_type, \\\n        p4##_type, p5##_type, p6##_type>(p0, p1, p2, p3, p4, p5, p6);\\\n  }\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type, typename p4##_type, typename p5##_type, \\\n      typename p6##_type>\\\n  template <typename arg_type>\\\n  bool name##MatcherP7<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \\\n      p5##_type, p6##_type>::gmock_Impl<arg_type>::MatchAndExplain(\\\n      GTEST_REFERENCE_TO_CONST_(arg_type) arg,\\\n      ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\\\n          const\n\n#define MATCHER_P8(name, p0, p1, p2, p3, p4, p5, p6, p7, description)\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type, typename p4##_type, typename p5##_type, \\\n      typename p6##_type, typename p7##_type>\\\n  class name##MatcherP8 {\\\n   public:\\\n    template <typename arg_type>\\\n    class gmock_Impl : public ::testing::MatcherInterface<\\\n        GTEST_REFERENCE_TO_CONST_(arg_type)> {\\\n     public:\\\n      gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \\\n          p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \\\n          p6##_type gmock_p6, p7##_type gmock_p7)\\\n           : p0(::std::move(gmock_p0)), p1(::std::move(gmock_p1)), \\\n               p2(::std::move(gmock_p2)), p3(::std::move(gmock_p3)), \\\n               p4(::std::move(gmock_p4)), p5(::std::move(gmock_p5)), \\\n               p6(::std::move(gmock_p6)), p7(::std::move(gmock_p7)) {}\\\n      virtual bool MatchAndExplain(\\\n          GTEST_REFERENCE_TO_CONST_(arg_type) arg,\\\n          ::testing::MatchResultListener* result_listener) const;\\\n      virtual void DescribeTo(::std::ostream* gmock_os) const {\\\n        *gmock_os << FormatDescription(false);\\\n      }\\\n      virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\\\n        *gmock_os << FormatDescription(true);\\\n      }\\\n      p0##_type const p0;\\\n      p1##_type const p1;\\\n      p2##_type const p2;\\\n      p3##_type const p3;\\\n      p4##_type const p4;\\\n      p5##_type const p5;\\\n      p6##_type const p6;\\\n      p7##_type const p7;\\\n     private:\\\n      ::std::string FormatDescription(bool negation) const {\\\n        ::std::string gmock_description = (description);\\\n        if (!gmock_description.empty()) {\\\n          return gmock_description;\\\n        }\\\n        return ::testing::internal::FormatMatcherDescription(\\\n            negation, #name, \\\n            ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\\\n                ::std::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \\\n                    p4##_type, p5##_type, p6##_type, p7##_type>(p0, p1, p2, \\\n                    p3, p4, p5, p6, p7)));\\\n      }\\\n    };\\\n    template <typename arg_type>\\\n    operator ::testing::Matcher<arg_type>() const {\\\n      return ::testing::Matcher<arg_type>(\\\n          new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5, p6, p7));\\\n    }\\\n    name##MatcherP8(p0##_type gmock_p0, p1##_type gmock_p1, \\\n        p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \\\n        p5##_type gmock_p5, p6##_type gmock_p6, \\\n        p7##_type gmock_p7) : p0(::std::move(gmock_p0)), \\\n        p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \\\n        p3(::std::move(gmock_p3)), p4(::std::move(gmock_p4)), \\\n        p5(::std::move(gmock_p5)), p6(::std::move(gmock_p6)), \\\n        p7(::std::move(gmock_p7)) {\\\n    }\\\n    p0##_type const p0;\\\n    p1##_type const p1;\\\n    p2##_type const p2;\\\n    p3##_type const p3;\\\n    p4##_type const p4;\\\n    p5##_type const p5;\\\n    p6##_type const p6;\\\n    p7##_type const p7;\\\n   private:\\\n  };\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type, typename p4##_type, typename p5##_type, \\\n      typename p6##_type, typename p7##_type>\\\n  inline name##MatcherP8<p0##_type, p1##_type, p2##_type, p3##_type, \\\n      p4##_type, p5##_type, p6##_type, p7##_type> name(p0##_type p0, \\\n      p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, p5##_type p5, \\\n      p6##_type p6, p7##_type p7) {\\\n    return name##MatcherP8<p0##_type, p1##_type, p2##_type, p3##_type, \\\n        p4##_type, p5##_type, p6##_type, p7##_type>(p0, p1, p2, p3, p4, p5, \\\n        p6, p7);\\\n  }\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type, typename p4##_type, typename p5##_type, \\\n      typename p6##_type, typename p7##_type>\\\n  template <typename arg_type>\\\n  bool name##MatcherP8<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \\\n      p5##_type, p6##_type, \\\n      p7##_type>::gmock_Impl<arg_type>::MatchAndExplain(\\\n      GTEST_REFERENCE_TO_CONST_(arg_type) arg,\\\n      ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\\\n          const\n\n#define MATCHER_P9(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, description)\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type, typename p4##_type, typename p5##_type, \\\n      typename p6##_type, typename p7##_type, typename p8##_type>\\\n  class name##MatcherP9 {\\\n   public:\\\n    template <typename arg_type>\\\n    class gmock_Impl : public ::testing::MatcherInterface<\\\n        GTEST_REFERENCE_TO_CONST_(arg_type)> {\\\n     public:\\\n      gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \\\n          p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \\\n          p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8)\\\n           : p0(::std::move(gmock_p0)), p1(::std::move(gmock_p1)), \\\n               p2(::std::move(gmock_p2)), p3(::std::move(gmock_p3)), \\\n               p4(::std::move(gmock_p4)), p5(::std::move(gmock_p5)), \\\n               p6(::std::move(gmock_p6)), p7(::std::move(gmock_p7)), \\\n               p8(::std::move(gmock_p8)) {}\\\n      virtual bool MatchAndExplain(\\\n          GTEST_REFERENCE_TO_CONST_(arg_type) arg,\\\n          ::testing::MatchResultListener* result_listener) const;\\\n      virtual void DescribeTo(::std::ostream* gmock_os) const {\\\n        *gmock_os << FormatDescription(false);\\\n      }\\\n      virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\\\n        *gmock_os << FormatDescription(true);\\\n      }\\\n      p0##_type const p0;\\\n      p1##_type const p1;\\\n      p2##_type const p2;\\\n      p3##_type const p3;\\\n      p4##_type const p4;\\\n      p5##_type const p5;\\\n      p6##_type const p6;\\\n      p7##_type const p7;\\\n      p8##_type const p8;\\\n     private:\\\n      ::std::string FormatDescription(bool negation) const {\\\n        ::std::string gmock_description = (description);\\\n        if (!gmock_description.empty()) {\\\n          return gmock_description;\\\n        }\\\n        return ::testing::internal::FormatMatcherDescription(\\\n            negation, #name, \\\n            ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\\\n                ::std::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \\\n                    p4##_type, p5##_type, p6##_type, p7##_type, \\\n                    p8##_type>(p0, p1, p2, p3, p4, p5, p6, p7, p8)));\\\n      }\\\n    };\\\n    template <typename arg_type>\\\n    operator ::testing::Matcher<arg_type>() const {\\\n      return ::testing::Matcher<arg_type>(\\\n          new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5, p6, p7, p8));\\\n    }\\\n    name##MatcherP9(p0##_type gmock_p0, p1##_type gmock_p1, \\\n        p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \\\n        p5##_type gmock_p5, p6##_type gmock_p6, p7##_type gmock_p7, \\\n        p8##_type gmock_p8) : p0(::std::move(gmock_p0)), \\\n        p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \\\n        p3(::std::move(gmock_p3)), p4(::std::move(gmock_p4)), \\\n        p5(::std::move(gmock_p5)), p6(::std::move(gmock_p6)), \\\n        p7(::std::move(gmock_p7)), p8(::std::move(gmock_p8)) {\\\n    }\\\n    p0##_type const p0;\\\n    p1##_type const p1;\\\n    p2##_type const p2;\\\n    p3##_type const p3;\\\n    p4##_type const p4;\\\n    p5##_type const p5;\\\n    p6##_type const p6;\\\n    p7##_type const p7;\\\n    p8##_type const p8;\\\n   private:\\\n  };\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type, typename p4##_type, typename p5##_type, \\\n      typename p6##_type, typename p7##_type, typename p8##_type>\\\n  inline name##MatcherP9<p0##_type, p1##_type, p2##_type, p3##_type, \\\n      p4##_type, p5##_type, p6##_type, p7##_type, \\\n      p8##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \\\n      p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, \\\n      p8##_type p8) {\\\n    return name##MatcherP9<p0##_type, p1##_type, p2##_type, p3##_type, \\\n        p4##_type, p5##_type, p6##_type, p7##_type, p8##_type>(p0, p1, p2, \\\n        p3, p4, p5, p6, p7, p8);\\\n  }\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type, typename p4##_type, typename p5##_type, \\\n      typename p6##_type, typename p7##_type, typename p8##_type>\\\n  template <typename arg_type>\\\n  bool name##MatcherP9<p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \\\n      p5##_type, p6##_type, p7##_type, \\\n      p8##_type>::gmock_Impl<arg_type>::MatchAndExplain(\\\n      GTEST_REFERENCE_TO_CONST_(arg_type) arg,\\\n      ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\\\n          const\n\n#define MATCHER_P10(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, description)\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type, typename p4##_type, typename p5##_type, \\\n      typename p6##_type, typename p7##_type, typename p8##_type, \\\n      typename p9##_type>\\\n  class name##MatcherP10 {\\\n   public:\\\n    template <typename arg_type>\\\n    class gmock_Impl : public ::testing::MatcherInterface<\\\n        GTEST_REFERENCE_TO_CONST_(arg_type)> {\\\n     public:\\\n      gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \\\n          p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \\\n          p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8, \\\n          p9##_type gmock_p9)\\\n           : p0(::std::move(gmock_p0)), p1(::std::move(gmock_p1)), \\\n               p2(::std::move(gmock_p2)), p3(::std::move(gmock_p3)), \\\n               p4(::std::move(gmock_p4)), p5(::std::move(gmock_p5)), \\\n               p6(::std::move(gmock_p6)), p7(::std::move(gmock_p7)), \\\n               p8(::std::move(gmock_p8)), p9(::std::move(gmock_p9)) {}\\\n      virtual bool MatchAndExplain(\\\n          GTEST_REFERENCE_TO_CONST_(arg_type) arg,\\\n          ::testing::MatchResultListener* result_listener) const;\\\n      virtual void DescribeTo(::std::ostream* gmock_os) const {\\\n        *gmock_os << FormatDescription(false);\\\n      }\\\n      virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\\\n        *gmock_os << FormatDescription(true);\\\n      }\\\n      p0##_type const p0;\\\n      p1##_type const p1;\\\n      p2##_type const p2;\\\n      p3##_type const p3;\\\n      p4##_type const p4;\\\n      p5##_type const p5;\\\n      p6##_type const p6;\\\n      p7##_type const p7;\\\n      p8##_type const p8;\\\n      p9##_type const p9;\\\n     private:\\\n      ::std::string FormatDescription(bool negation) const {\\\n        ::std::string gmock_description = (description);\\\n        if (!gmock_description.empty()) {\\\n          return gmock_description;\\\n        }\\\n        return ::testing::internal::FormatMatcherDescription(\\\n            negation, #name, \\\n            ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\\\n                ::std::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \\\n                    p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, \\\n                    p9##_type>(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)));\\\n      }\\\n    };\\\n    template <typename arg_type>\\\n    operator ::testing::Matcher<arg_type>() const {\\\n      return ::testing::Matcher<arg_type>(\\\n          new gmock_Impl<arg_type>(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9));\\\n    }\\\n    name##MatcherP10(p0##_type gmock_p0, p1##_type gmock_p1, \\\n        p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \\\n        p5##_type gmock_p5, p6##_type gmock_p6, p7##_type gmock_p7, \\\n        p8##_type gmock_p8, p9##_type gmock_p9) : p0(::std::move(gmock_p0)), \\\n        p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \\\n        p3(::std::move(gmock_p3)), p4(::std::move(gmock_p4)), \\\n        p5(::std::move(gmock_p5)), p6(::std::move(gmock_p6)), \\\n        p7(::std::move(gmock_p7)), p8(::std::move(gmock_p8)), \\\n        p9(::std::move(gmock_p9)) {\\\n    }\\\n    p0##_type const p0;\\\n    p1##_type const p1;\\\n    p2##_type const p2;\\\n    p3##_type const p3;\\\n    p4##_type const p4;\\\n    p5##_type const p5;\\\n    p6##_type const p6;\\\n    p7##_type const p7;\\\n    p8##_type const p8;\\\n    p9##_type const p9;\\\n   private:\\\n  };\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type, typename p4##_type, typename p5##_type, \\\n      typename p6##_type, typename p7##_type, typename p8##_type, \\\n      typename p9##_type>\\\n  inline name##MatcherP10<p0##_type, p1##_type, p2##_type, p3##_type, \\\n      p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, \\\n      p9##_type> name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \\\n      p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8, \\\n      p9##_type p9) {\\\n    return name##MatcherP10<p0##_type, p1##_type, p2##_type, p3##_type, \\\n        p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, p9##_type>(p0, \\\n        p1, p2, p3, p4, p5, p6, p7, p8, p9);\\\n  }\\\n  template <typename p0##_type, typename p1##_type, typename p2##_type, \\\n      typename p3##_type, typename p4##_type, typename p5##_type, \\\n      typename p6##_type, typename p7##_type, typename p8##_type, \\\n      typename p9##_type>\\\n  template <typename arg_type>\\\n  bool name##MatcherP10<p0##_type, p1##_type, p2##_type, p3##_type, \\\n      p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, \\\n      p9##_type>::gmock_Impl<arg_type>::MatchAndExplain(\\\n      GTEST_REFERENCE_TO_CONST_(arg_type) arg,\\\n      ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\\\n          const\n\n#endif  // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_\n// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n// Google Mock - a framework for writing C++ mock classes.\n//\n// This file implements some actions that depend on gmock-generated-actions.h.\n\n// GOOGLETEST_CM0002 DO NOT DELETE\n\n#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_MORE_ACTIONS_H_\n#define GMOCK_INCLUDE_GMOCK_GMOCK_MORE_ACTIONS_H_\n\n#include <algorithm>\n#include <type_traits>\n\n\nnamespace testing {\nnamespace internal {\n\n// An internal replacement for std::copy which mimics its behavior. This is\n// necessary because Visual Studio deprecates ::std::copy, issuing warning 4996.\n// However Visual Studio 2010 and later do not honor #pragmas which disable that\n// warning.\ntemplate<typename InputIterator, typename OutputIterator>\ninline OutputIterator CopyElements(InputIterator first,\n                                   InputIterator last,\n                                   OutputIterator output) {\n  for (; first != last; ++first, ++output) {\n    *output = *first;\n  }\n  return output;\n}\n\n}  // namespace internal\n\n// Various overloads for Invoke().\n\n// The ACTION*() macros trigger warning C4100 (unreferenced formal\n// parameter) in MSVC with -W4.  Unfortunately they cannot be fixed in\n// the macro definition, as the warnings are generated when the macro\n// is expanded and macro expansion cannot contain #pragma.  Therefore\n// we suppress them here.\n#ifdef _MSC_VER\n# pragma warning(push)\n# pragma warning(disable:4100)\n#endif\n\n// Action ReturnArg<k>() returns the k-th argument of the mock function.\nACTION_TEMPLATE(ReturnArg,\n                HAS_1_TEMPLATE_PARAMS(int, k),\n                AND_0_VALUE_PARAMS()) {\n  return ::std::get<k>(args);\n}\n\n// Action SaveArg<k>(pointer) saves the k-th (0-based) argument of the\n// mock function to *pointer.\nACTION_TEMPLATE(SaveArg,\n                HAS_1_TEMPLATE_PARAMS(int, k),\n                AND_1_VALUE_PARAMS(pointer)) {\n  *pointer = ::std::get<k>(args);\n}\n\n// Action SaveArgPointee<k>(pointer) saves the value pointed to\n// by the k-th (0-based) argument of the mock function to *pointer.\nACTION_TEMPLATE(SaveArgPointee,\n                HAS_1_TEMPLATE_PARAMS(int, k),\n                AND_1_VALUE_PARAMS(pointer)) {\n  *pointer = *::std::get<k>(args);\n}\n\n// Action SetArgReferee<k>(value) assigns 'value' to the variable\n// referenced by the k-th (0-based) argument of the mock function.\nACTION_TEMPLATE(SetArgReferee,\n                HAS_1_TEMPLATE_PARAMS(int, k),\n                AND_1_VALUE_PARAMS(value)) {\n  typedef typename ::std::tuple_element<k, args_type>::type argk_type;\n  // Ensures that argument #k is a reference.  If you get a compiler\n  // error on the next line, you are using SetArgReferee<k>(value) in\n  // a mock function whose k-th (0-based) argument is not a reference.\n  GTEST_COMPILE_ASSERT_(internal::is_reference<argk_type>::value,\n                        SetArgReferee_must_be_used_with_a_reference_argument);\n  ::std::get<k>(args) = value;\n}\n\n// Action SetArrayArgument<k>(first, last) copies the elements in\n// source range [first, last) to the array pointed to by the k-th\n// (0-based) argument, which can be either a pointer or an\n// iterator. The action does not take ownership of the elements in the\n// source range.\nACTION_TEMPLATE(SetArrayArgument,\n                HAS_1_TEMPLATE_PARAMS(int, k),\n                AND_2_VALUE_PARAMS(first, last)) {\n  // Visual Studio deprecates ::std::copy, so we use our own copy in that case.\n#ifdef _MSC_VER\n  internal::CopyElements(first, last, ::std::get<k>(args));\n#else\n  ::std::copy(first, last, ::std::get<k>(args));\n#endif\n}\n\n// Action DeleteArg<k>() deletes the k-th (0-based) argument of the mock\n// function.\nACTION_TEMPLATE(DeleteArg,\n                HAS_1_TEMPLATE_PARAMS(int, k),\n                AND_0_VALUE_PARAMS()) {\n  delete ::std::get<k>(args);\n}\n\n// This action returns the value pointed to by 'pointer'.\nACTION_P(ReturnPointee, pointer) { return *pointer; }\n\n// Action Throw(exception) can be used in a mock function of any type\n// to throw the given exception.  Any copyable value can be thrown.\n#if GTEST_HAS_EXCEPTIONS\n\n// Suppresses the 'unreachable code' warning that VC generates in opt modes.\n# ifdef _MSC_VER\n#  pragma warning(push)          // Saves the current warning state.\n#  pragma warning(disable:4702)  // Temporarily disables warning 4702.\n# endif\nACTION_P(Throw, exception) { throw exception; }\n# ifdef _MSC_VER\n#  pragma warning(pop)           // Restores the warning state.\n# endif\n\n#endif  // GTEST_HAS_EXCEPTIONS\n\n#ifdef _MSC_VER\n# pragma warning(pop)\n#endif\n\n}  // namespace testing\n\n#endif  // GMOCK_INCLUDE_GMOCK_GMOCK_MORE_ACTIONS_H_\n// Copyright 2013, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n// Google Mock - a framework for writing C++ mock classes.\n//\n// This file implements some matchers that depend on gmock-generated-matchers.h.\n//\n// Note that tests are implemented in gmock-matchers_test.cc rather than\n// gmock-more-matchers-test.cc.\n\n// GOOGLETEST_CM0002 DO NOT DELETE\n\n#ifndef GMOCK_INCLUDE_GMOCK_MORE_MATCHERS_H_\n#define GMOCK_INCLUDE_GMOCK_MORE_MATCHERS_H_\n\n\nnamespace testing {\n\n// Silence C4100 (unreferenced formal\n// parameter) for MSVC\n#ifdef _MSC_VER\n# pragma warning(push)\n# pragma warning(disable:4100)\n#if (_MSC_VER == 1900)\n// and silence C4800 (C4800: 'int *const ': forcing value\n// to bool 'true' or 'false') for MSVC 14\n# pragma warning(disable:4800)\n  #endif\n#endif\n\n// Defines a matcher that matches an empty container. The container must\n// support both size() and empty(), which all STL-like containers provide.\nMATCHER(IsEmpty, negation ? \"isn't empty\" : \"is empty\") {\n  if (arg.empty()) {\n    return true;\n  }\n  *result_listener << \"whose size is \" << arg.size();\n  return false;\n}\n\n// Define a matcher that matches a value that evaluates in boolean\n// context to true.  Useful for types that define \"explicit operator\n// bool\" operators and so can't be compared for equality with true\n// and false.\nMATCHER(IsTrue, negation ? \"is false\" : \"is true\") {\n  return static_cast<bool>(arg);\n}\n\n// Define a matcher that matches a value that evaluates in boolean\n// context to false.  Useful for types that define \"explicit operator\n// bool\" operators and so can't be compared for equality with true\n// and false.\nMATCHER(IsFalse, negation ? \"is true\" : \"is false\") {\n  return !static_cast<bool>(arg);\n}\n\n#ifdef _MSC_VER\n# pragma warning(pop)\n#endif\n\n\n}  // namespace testing\n\n#endif  // GMOCK_INCLUDE_GMOCK_MORE_MATCHERS_H_\n// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n// Implements class templates NiceMock, NaggyMock, and StrictMock.\n//\n// Given a mock class MockFoo that is created using Google Mock,\n// NiceMock<MockFoo> is a subclass of MockFoo that allows\n// uninteresting calls (i.e. calls to mock methods that have no\n// EXPECT_CALL specs), NaggyMock<MockFoo> is a subclass of MockFoo\n// that prints a warning when an uninteresting call occurs, and\n// StrictMock<MockFoo> is a subclass of MockFoo that treats all\n// uninteresting calls as errors.\n//\n// Currently a mock is naggy by default, so MockFoo and\n// NaggyMock<MockFoo> behave like the same.  However, we will soon\n// switch the default behavior of mocks to be nice, as that in general\n// leads to more maintainable tests.  When that happens, MockFoo will\n// stop behaving like NaggyMock<MockFoo> and start behaving like\n// NiceMock<MockFoo>.\n//\n// NiceMock, NaggyMock, and StrictMock \"inherit\" the constructors of\n// their respective base class.  Therefore you can write\n// NiceMock<MockFoo>(5, \"a\") to construct a nice mock where MockFoo\n// has a constructor that accepts (int, const char*), for example.\n//\n// A known limitation is that NiceMock<MockFoo>, NaggyMock<MockFoo>,\n// and StrictMock<MockFoo> only works for mock methods defined using\n// the MOCK_METHOD* family of macros DIRECTLY in the MockFoo class.\n// If a mock method is defined in a base class of MockFoo, the \"nice\"\n// or \"strict\" modifier may not affect it, depending on the compiler.\n// In particular, nesting NiceMock, NaggyMock, and StrictMock is NOT\n// supported.\n\n// GOOGLETEST_CM0002 DO NOT DELETE\n\n#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_NICE_STRICT_H_\n#define GMOCK_INCLUDE_GMOCK_GMOCK_NICE_STRICT_H_\n\n\nnamespace testing {\n\ntemplate <class MockClass>\nclass NiceMock : public MockClass {\n public:\n  NiceMock() : MockClass() {\n    ::testing::Mock::AllowUninterestingCalls(\n        internal::ImplicitCast_<MockClass*>(this));\n  }\n\n  // Ideally, we would inherit base class's constructors through a using\n  // declaration, which would preserve their visibility. However, many existing\n  // tests rely on the fact that current implementation reexports protected\n  // constructors as public. These tests would need to be cleaned up first.\n\n  // Single argument constructor is special-cased so that it can be\n  // made explicit.\n  template <typename A>\n  explicit NiceMock(A&& arg) : MockClass(std::forward<A>(arg)) {\n    ::testing::Mock::AllowUninterestingCalls(\n        internal::ImplicitCast_<MockClass*>(this));\n  }\n\n  template <typename A1, typename A2, typename... An>\n  NiceMock(A1&& arg1, A2&& arg2, An&&... args)\n      : MockClass(std::forward<A1>(arg1), std::forward<A2>(arg2),\n                  std::forward<An>(args)...) {\n    ::testing::Mock::AllowUninterestingCalls(\n        internal::ImplicitCast_<MockClass*>(this));\n  }\n\n  ~NiceMock() {  // NOLINT\n    ::testing::Mock::UnregisterCallReaction(\n        internal::ImplicitCast_<MockClass*>(this));\n  }\n\n private:\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(NiceMock);\n};\n\ntemplate <class MockClass>\nclass NaggyMock : public MockClass {\n public:\n  NaggyMock() : MockClass() {\n    ::testing::Mock::WarnUninterestingCalls(\n        internal::ImplicitCast_<MockClass*>(this));\n  }\n\n  // Ideally, we would inherit base class's constructors through a using\n  // declaration, which would preserve their visibility. However, many existing\n  // tests rely on the fact that current implementation reexports protected\n  // constructors as public. These tests would need to be cleaned up first.\n\n  // Single argument constructor is special-cased so that it can be\n  // made explicit.\n  template <typename A>\n  explicit NaggyMock(A&& arg) : MockClass(std::forward<A>(arg)) {\n    ::testing::Mock::WarnUninterestingCalls(\n        internal::ImplicitCast_<MockClass*>(this));\n  }\n\n  template <typename A1, typename A2, typename... An>\n  NaggyMock(A1&& arg1, A2&& arg2, An&&... args)\n      : MockClass(std::forward<A1>(arg1), std::forward<A2>(arg2),\n                  std::forward<An>(args)...) {\n    ::testing::Mock::WarnUninterestingCalls(\n        internal::ImplicitCast_<MockClass*>(this));\n  }\n\n  ~NaggyMock() {  // NOLINT\n    ::testing::Mock::UnregisterCallReaction(\n        internal::ImplicitCast_<MockClass*>(this));\n  }\n\n private:\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(NaggyMock);\n};\n\ntemplate <class MockClass>\nclass StrictMock : public MockClass {\n public:\n  StrictMock() : MockClass() {\n    ::testing::Mock::FailUninterestingCalls(\n        internal::ImplicitCast_<MockClass*>(this));\n  }\n\n  // Ideally, we would inherit base class's constructors through a using\n  // declaration, which would preserve their visibility. However, many existing\n  // tests rely on the fact that current implementation reexports protected\n  // constructors as public. These tests would need to be cleaned up first.\n\n  // Single argument constructor is special-cased so that it can be\n  // made explicit.\n  template <typename A>\n  explicit StrictMock(A&& arg) : MockClass(std::forward<A>(arg)) {\n    ::testing::Mock::FailUninterestingCalls(\n        internal::ImplicitCast_<MockClass*>(this));\n  }\n\n  template <typename A1, typename A2, typename... An>\n  StrictMock(A1&& arg1, A2&& arg2, An&&... args)\n      : MockClass(std::forward<A1>(arg1), std::forward<A2>(arg2),\n                  std::forward<An>(args)...) {\n    ::testing::Mock::FailUninterestingCalls(\n        internal::ImplicitCast_<MockClass*>(this));\n  }\n\n  ~StrictMock() {  // NOLINT\n    ::testing::Mock::UnregisterCallReaction(\n        internal::ImplicitCast_<MockClass*>(this));\n  }\n\n private:\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(StrictMock);\n};\n\n// The following specializations catch some (relatively more common)\n// user errors of nesting nice and strict mocks.  They do NOT catch\n// all possible errors.\n\n// These specializations are declared but not defined, as NiceMock,\n// NaggyMock, and StrictMock cannot be nested.\n\ntemplate <typename MockClass>\nclass NiceMock<NiceMock<MockClass> >;\ntemplate <typename MockClass>\nclass NiceMock<NaggyMock<MockClass> >;\ntemplate <typename MockClass>\nclass NiceMock<StrictMock<MockClass> >;\n\ntemplate <typename MockClass>\nclass NaggyMock<NiceMock<MockClass> >;\ntemplate <typename MockClass>\nclass NaggyMock<NaggyMock<MockClass> >;\ntemplate <typename MockClass>\nclass NaggyMock<StrictMock<MockClass> >;\n\ntemplate <typename MockClass>\nclass StrictMock<NiceMock<MockClass> >;\ntemplate <typename MockClass>\nclass StrictMock<NaggyMock<MockClass> >;\ntemplate <typename MockClass>\nclass StrictMock<StrictMock<MockClass> >;\n\n}  // namespace testing\n\n#endif  // GMOCK_INCLUDE_GMOCK_GMOCK_NICE_STRICT_H_\n\nnamespace testing {\n\n// Declares Google Mock flags that we want a user to use programmatically.\nGMOCK_DECLARE_bool_(catch_leaked_mocks);\nGMOCK_DECLARE_string_(verbose);\nGMOCK_DECLARE_int32_(default_mock_behavior);\n\n// Initializes Google Mock.  This must be called before running the\n// tests.  In particular, it parses the command line for the flags\n// that Google Mock recognizes.  Whenever a Google Mock flag is seen,\n// it is removed from argv, and *argc is decremented.\n//\n// No value is returned.  Instead, the Google Mock flag variables are\n// updated.\n//\n// Since Google Test is needed for Google Mock to work, this function\n// also initializes Google Test and parses its flags, if that hasn't\n// been done.\nGTEST_API_ void InitGoogleMock(int* argc, char** argv);\n\n// This overloaded version can be used in Windows programs compiled in\n// UNICODE mode.\nGTEST_API_ void InitGoogleMock(int* argc, wchar_t** argv);\n\n// This overloaded version can be used on Arduino/embedded platforms where\n// there is no argc/argv.\nGTEST_API_ void InitGoogleMock();\n\n}  // namespace testing\n\n#endif  // GMOCK_INCLUDE_GMOCK_GMOCK_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/gmock/mock-log.h",
    "content": "// Copyright (c) 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: Zhanyong Wan\n//\n// Defines the ScopedMockLog class (using Google C++ Mocking\n// Framework), which is convenient for testing code that uses LOG().\n//\n// NOTE(keir): This is a fork until Google Log exports the scoped mock log\n// class; see: http://code.google.com/p/google-glog/issues/detail?id=88\n\n#ifndef GOOGLE_CERES_INTERNAL_MOCK_LOG_H_\n#define GOOGLE_CERES_INTERNAL_MOCK_LOG_H_\n\n#include <string>\n\n#include <gmock/gmock.h>\n\n#include \"glog/logging.h\"\n\nnamespace testing {\n\n// A ScopedMockLog object intercepts LOG() messages issued during its\n// lifespan.  Using this together with Google C++ Mocking Framework,\n// it's very easy to test how a piece of code calls LOG().  The\n// typical usage:\n//\n//   TEST(FooTest, LogsCorrectly) {\n//     ScopedMockLog log;\n//\n//     // We expect the WARNING \"Something bad!\" exactly twice.\n//     EXPECT_CALL(log, Log(WARNING, _, \"Something bad!\"))\n//         .Times(2);\n//\n//     // We allow foo.cc to call LOG(INFO) any number of times.\n//     EXPECT_CALL(log, Log(INFO, HasSubstr(\"/foo.cc\"), _))\n//         .Times(AnyNumber());\n//\n//     Foo();  // Exercises the code under test.\n//   }\nclass ScopedMockLog : public google::LogSink {\n public:\n  // When a ScopedMockLog object is constructed, it starts to\n  // intercept logs.\n  ScopedMockLog() { AddLogSink(this); }\n\n  // When the object is destructed, it stops intercepting logs.\n  virtual ~ScopedMockLog() { RemoveLogSink(this); }\n\n  // Implements the mock method:\n  //\n  //   void Log(LogSeverity severity, const string& file_path,\n  //            const string& message);\n  //\n  // The second argument to Send() is the full path of the source file\n  // in which the LOG() was issued.\n  //\n  // Note, that in a multi-threaded environment, all LOG() messages from a\n  // single thread will be handled in sequence, but that cannot be guaranteed\n  // for messages from different threads. In fact, if the same or multiple\n  // expectations are matched on two threads concurrently, their actions will\n  // be executed concurrently as well and may interleave.\n  MOCK_METHOD3(Log, void(google::LogSeverity severity,\n                         const std::string& file_path,\n                         const std::string& message));\n\n private:\n  // Implements the send() virtual function in class LogSink.\n  // Whenever a LOG() statement is executed, this function will be\n  // invoked with information presented in the LOG().\n  //\n  // The method argument list is long and carries much information a\n  // test usually doesn't care about, so we trim the list before\n  // forwarding the call to Log(), which is much easier to use in\n  // tests.\n  //\n  // We still cannot call Log() directly, as it may invoke other LOG()\n  // messages, either due to Invoke, or due to an error logged in\n  // Google C++ Mocking Framework code, which would trigger a deadlock\n  // since a lock is held during send().\n  //\n  // Hence, we save the message for WaitTillSent() which will be called after\n  // the lock on send() is released, and we'll call Log() inside\n  // WaitTillSent(). Since while a single send() call may be running at a\n  // time, multiple WaitTillSent() calls (along with the one send() call) may\n  // be running simultaneously, we ensure thread-safety of the exchange between\n  // send() and WaitTillSent(), and that for each message, LOG(), send(),\n  // WaitTillSent() and Log() are executed in the same thread.\n  virtual void send(google::LogSeverity severity,\n                    const char* full_filename,\n                    const char* base_filename, int line, const tm* tm_time,\n                    const char* message, size_t message_len) {\n    // We are only interested in the log severity, full file name, and\n    // log message.\n    message_info_.severity = severity;\n    message_info_.file_path = full_filename;\n    message_info_.message = std::string(message, message_len);\n  }\n\n  // Implements the WaitTillSent() virtual function in class LogSink.\n  // It will be executed after send() and after the global logging lock is\n  // released, so calls within it (or rather within the Log() method called\n  // within) may also issue LOG() statements.\n  //\n  // LOG(), send(), WaitTillSent() and Log() will occur in the same thread for\n  // a given log message.\n  virtual void WaitTillSent() {\n    // First, and very importantly, we save a copy of the message being\n    // processed before calling Log(), since Log() may indirectly call send()\n    // and WaitTillSent() in the same thread again.\n    MessageInfo message_info = message_info_;\n    Log(message_info.severity, message_info.file_path, message_info.message);\n  }\n\n  // All relevant information about a logged message that needs to be passed\n  // from send() to WaitTillSent().\n  struct MessageInfo {\n    google::LogSeverity severity;\n    std::string file_path;\n    std::string message;\n  };\n  MessageInfo message_info_;\n};\n\n}  // namespace testing\n\n#endif  // GOOGLE_CERES_INTERNAL_MOCK_LOG_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/gmock_gtest_all.cc",
    "content": "// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n//\n// Google C++ Testing and Mocking Framework (Google Test)\n//\n// Sometimes it's desirable to build Google Test by compiling a single file.\n// This file serves this purpose.\n\n// This line ensures that gtest.h can be compiled on its own, even\n// when it's fused.\n#include \"gtest/gtest.h\"\n\n// The following lines pull in the real gtest *.cc files.\n// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n//\n// The Google C++ Testing and Mocking Framework (Google Test)\n\n// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n//\n// Utilities for testing Google Test itself and code that uses Google Test\n// (e.g. frameworks built on top of Google Test).\n\n// GOOGLETEST_CM0004 DO NOT DELETE\n\n#ifndef GTEST_INCLUDE_GTEST_GTEST_SPI_H_\n#define GTEST_INCLUDE_GTEST_GTEST_SPI_H_\n\n\nGTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \\\n/* class A needs to have dll-interface to be used by clients of class B */)\n\nnamespace testing {\n\n// This helper class can be used to mock out Google Test failure reporting\n// so that we can test Google Test or code that builds on Google Test.\n//\n// An object of this class appends a TestPartResult object to the\n// TestPartResultArray object given in the constructor whenever a Google Test\n// failure is reported. It can either intercept only failures that are\n// generated in the same thread that created this object or it can intercept\n// all generated failures. The scope of this mock object can be controlled with\n// the second argument to the two arguments constructor.\nclass GTEST_API_ ScopedFakeTestPartResultReporter\n    : public TestPartResultReporterInterface {\n public:\n  // The two possible mocking modes of this object.\n  enum InterceptMode {\n    INTERCEPT_ONLY_CURRENT_THREAD,  // Intercepts only thread local failures.\n    INTERCEPT_ALL_THREADS           // Intercepts all failures.\n  };\n\n  // The c'tor sets this object as the test part result reporter used\n  // by Google Test.  The 'result' parameter specifies where to report the\n  // results. This reporter will only catch failures generated in the current\n  // thread. DEPRECATED\n  explicit ScopedFakeTestPartResultReporter(TestPartResultArray* result);\n\n  // Same as above, but you can choose the interception scope of this object.\n  ScopedFakeTestPartResultReporter(InterceptMode intercept_mode,\n                                   TestPartResultArray* result);\n\n  // The d'tor restores the previous test part result reporter.\n  ~ScopedFakeTestPartResultReporter() override;\n\n  // Appends the TestPartResult object to the TestPartResultArray\n  // received in the constructor.\n  //\n  // This method is from the TestPartResultReporterInterface\n  // interface.\n  void ReportTestPartResult(const TestPartResult& result) override;\n\n private:\n  void Init();\n\n  const InterceptMode intercept_mode_;\n  TestPartResultReporterInterface* old_reporter_;\n  TestPartResultArray* const result_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(ScopedFakeTestPartResultReporter);\n};\n\nnamespace internal {\n\n// A helper class for implementing EXPECT_FATAL_FAILURE() and\n// EXPECT_NONFATAL_FAILURE().  Its destructor verifies that the given\n// TestPartResultArray contains exactly one failure that has the given\n// type and contains the given substring.  If that's not the case, a\n// non-fatal failure will be generated.\nclass GTEST_API_ SingleFailureChecker {\n public:\n  // The constructor remembers the arguments.\n  SingleFailureChecker(const TestPartResultArray* results,\n                       TestPartResult::Type type, const std::string& substr);\n  ~SingleFailureChecker();\n private:\n  const TestPartResultArray* const results_;\n  const TestPartResult::Type type_;\n  const std::string substr_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(SingleFailureChecker);\n};\n\n}  // namespace internal\n\n}  // namespace testing\n\nGTEST_DISABLE_MSC_WARNINGS_POP_()  //  4251\n\n// A set of macros for testing Google Test assertions or code that's expected\n// to generate Google Test fatal failures.  It verifies that the given\n// statement will cause exactly one fatal Google Test failure with 'substr'\n// being part of the failure message.\n//\n// There are two different versions of this macro. EXPECT_FATAL_FAILURE only\n// affects and considers failures generated in the current thread and\n// EXPECT_FATAL_FAILURE_ON_ALL_THREADS does the same but for all threads.\n//\n// The verification of the assertion is done correctly even when the statement\n// throws an exception or aborts the current function.\n//\n// Known restrictions:\n//   - 'statement' cannot reference local non-static variables or\n//     non-static members of the current object.\n//   - 'statement' cannot return a value.\n//   - You cannot stream a failure message to this macro.\n//\n// Note that even though the implementations of the following two\n// macros are much alike, we cannot refactor them to use a common\n// helper macro, due to some peculiarity in how the preprocessor\n// works.  The AcceptsMacroThatExpandsToUnprotectedComma test in\n// gtest_unittest.cc will fail to compile if we do that.\n#define EXPECT_FATAL_FAILURE(statement, substr) \\\n  do { \\\n    class GTestExpectFatalFailureHelper {\\\n     public:\\\n      static void Execute() { statement; }\\\n    };\\\n    ::testing::TestPartResultArray gtest_failures;\\\n    ::testing::internal::SingleFailureChecker gtest_checker(\\\n        &gtest_failures, ::testing::TestPartResult::kFatalFailure, (substr));\\\n    {\\\n      ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\\\n          ::testing::ScopedFakeTestPartResultReporter:: \\\n          INTERCEPT_ONLY_CURRENT_THREAD, &gtest_failures);\\\n      GTestExpectFatalFailureHelper::Execute();\\\n    }\\\n  } while (::testing::internal::AlwaysFalse())\n\n#define EXPECT_FATAL_FAILURE_ON_ALL_THREADS(statement, substr) \\\n  do { \\\n    class GTestExpectFatalFailureHelper {\\\n     public:\\\n      static void Execute() { statement; }\\\n    };\\\n    ::testing::TestPartResultArray gtest_failures;\\\n    ::testing::internal::SingleFailureChecker gtest_checker(\\\n        &gtest_failures, ::testing::TestPartResult::kFatalFailure, (substr));\\\n    {\\\n      ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\\\n          ::testing::ScopedFakeTestPartResultReporter:: \\\n          INTERCEPT_ALL_THREADS, &gtest_failures);\\\n      GTestExpectFatalFailureHelper::Execute();\\\n    }\\\n  } while (::testing::internal::AlwaysFalse())\n\n// A macro for testing Google Test assertions or code that's expected to\n// generate Google Test non-fatal failures.  It asserts that the given\n// statement will cause exactly one non-fatal Google Test failure with 'substr'\n// being part of the failure message.\n//\n// There are two different versions of this macro. EXPECT_NONFATAL_FAILURE only\n// affects and considers failures generated in the current thread and\n// EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS does the same but for all threads.\n//\n// 'statement' is allowed to reference local variables and members of\n// the current object.\n//\n// The verification of the assertion is done correctly even when the statement\n// throws an exception or aborts the current function.\n//\n// Known restrictions:\n//   - You cannot stream a failure message to this macro.\n//\n// Note that even though the implementations of the following two\n// macros are much alike, we cannot refactor them to use a common\n// helper macro, due to some peculiarity in how the preprocessor\n// works.  If we do that, the code won't compile when the user gives\n// EXPECT_NONFATAL_FAILURE() a statement that contains a macro that\n// expands to code containing an unprotected comma.  The\n// AcceptsMacroThatExpandsToUnprotectedComma test in gtest_unittest.cc\n// catches that.\n//\n// For the same reason, we have to write\n//   if (::testing::internal::AlwaysTrue()) { statement; }\n// instead of\n//   GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement)\n// to avoid an MSVC warning on unreachable code.\n#define EXPECT_NONFATAL_FAILURE(statement, substr) \\\n  do {\\\n    ::testing::TestPartResultArray gtest_failures;\\\n    ::testing::internal::SingleFailureChecker gtest_checker(\\\n        &gtest_failures, ::testing::TestPartResult::kNonFatalFailure, \\\n        (substr));\\\n    {\\\n      ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\\\n          ::testing::ScopedFakeTestPartResultReporter:: \\\n          INTERCEPT_ONLY_CURRENT_THREAD, &gtest_failures);\\\n      if (::testing::internal::AlwaysTrue()) { statement; }\\\n    }\\\n  } while (::testing::internal::AlwaysFalse())\n\n#define EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS(statement, substr) \\\n  do {\\\n    ::testing::TestPartResultArray gtest_failures;\\\n    ::testing::internal::SingleFailureChecker gtest_checker(\\\n        &gtest_failures, ::testing::TestPartResult::kNonFatalFailure, \\\n        (substr));\\\n    {\\\n      ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\\\n          ::testing::ScopedFakeTestPartResultReporter::INTERCEPT_ALL_THREADS, \\\n          &gtest_failures);\\\n      if (::testing::internal::AlwaysTrue()) { statement; }\\\n    }\\\n  } while (::testing::internal::AlwaysFalse())\n\n#endif  // GTEST_INCLUDE_GTEST_GTEST_SPI_H_\n\n#include <ctype.h>\n#include <math.h>\n#include <stdarg.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <time.h>\n#include <wchar.h>\n#include <wctype.h>\n\n#include <algorithm>\n#include <iomanip>\n#include <limits>\n#include <list>\n#include <map>\n#include <ostream>  // NOLINT\n#include <sstream>\n#include <vector>\n\n#if GTEST_OS_LINUX\n\n# define GTEST_HAS_GETTIMEOFDAY_ 1\n\n# include <fcntl.h>  // NOLINT\n# include <limits.h>  // NOLINT\n# include <sched.h>  // NOLINT\n// Declares vsnprintf().  This header is not available on Windows.\n# include <strings.h>  // NOLINT\n# include <sys/mman.h>  // NOLINT\n# include <sys/time.h>  // NOLINT\n# include <unistd.h>  // NOLINT\n# include <string>\n\n#elif GTEST_OS_ZOS\n# define GTEST_HAS_GETTIMEOFDAY_ 1\n# include <sys/time.h>  // NOLINT\n\n// On z/OS we additionally need strings.h for strcasecmp.\n# include <strings.h>  // NOLINT\n\n#elif GTEST_OS_WINDOWS_MOBILE  // We are on Windows CE.\n\n# include <windows.h>  // NOLINT\n# undef min\n\n#elif GTEST_OS_WINDOWS  // We are on Windows proper.\n\n# include <io.h>  // NOLINT\n# include <sys/timeb.h>  // NOLINT\n# include <sys/types.h>  // NOLINT\n# include <sys/stat.h>  // NOLINT\n\n# if GTEST_OS_WINDOWS_MINGW\n// MinGW has gettimeofday() but not _ftime64().\n#  define GTEST_HAS_GETTIMEOFDAY_ 1\n#  include <sys/time.h>  // NOLINT\n# endif  // GTEST_OS_WINDOWS_MINGW\n\n// cpplint thinks that the header is already included, so we want to\n// silence it.\n# include <windows.h>  // NOLINT\n# undef min\n\n#else\n\n// Assume other platforms have gettimeofday().\n# define GTEST_HAS_GETTIMEOFDAY_ 1\n\n// cpplint thinks that the header is already included, so we want to\n// silence it.\n# include <sys/time.h>  // NOLINT\n# include <unistd.h>  // NOLINT\n\n#endif  // GTEST_OS_LINUX\n\n#if GTEST_HAS_EXCEPTIONS\n# include <stdexcept>\n#endif\n\n#if GTEST_CAN_STREAM_RESULTS_\n# include <arpa/inet.h>  // NOLINT\n# include <netdb.h>  // NOLINT\n# include <sys/socket.h>  // NOLINT\n# include <sys/types.h>  // NOLINT\n#endif\n\n// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n// Utility functions and classes used by the Google C++ testing framework.//\n// This file contains purely Google Test's internal implementation.  Please\n// DO NOT #INCLUDE IT IN A USER PROGRAM.\n\n#ifndef GTEST_SRC_GTEST_INTERNAL_INL_H_\n#define GTEST_SRC_GTEST_INTERNAL_INL_H_\n\n#ifndef _WIN32_WCE\n# include <errno.h>\n#endif  // !_WIN32_WCE\n#include <stddef.h>\n#include <stdlib.h>  // For strtoll/_strtoul64/malloc/free.\n#include <string.h>  // For memmove.\n\n#include <algorithm>\n#include <memory>\n#include <string>\n#include <vector>\n\n\n#if GTEST_CAN_STREAM_RESULTS_\n# include <arpa/inet.h>  // NOLINT\n# include <netdb.h>  // NOLINT\n#endif\n\n#if GTEST_OS_WINDOWS\n# include <windows.h>  // NOLINT\n#endif  // GTEST_OS_WINDOWS\n\n\nGTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \\\n/* class A needs to have dll-interface to be used by clients of class B */)\n\nnamespace testing {\n\n// Declares the flags.\n//\n// We don't want the users to modify this flag in the code, but want\n// Google Test's own unit tests to be able to access it. Therefore we\n// declare it here as opposed to in gtest.h.\nGTEST_DECLARE_bool_(death_test_use_fork);\n\nnamespace internal {\n\n// The value of GetTestTypeId() as seen from within the Google Test\n// library.  This is solely for testing GetTestTypeId().\nGTEST_API_ extern const TypeId kTestTypeIdInGoogleTest;\n\n// Names of the flags (needed for parsing Google Test flags).\nconst char kAlsoRunDisabledTestsFlag[] = \"also_run_disabled_tests\";\nconst char kBreakOnFailureFlag[] = \"break_on_failure\";\nconst char kCatchExceptionsFlag[] = \"catch_exceptions\";\nconst char kColorFlag[] = \"color\";\nconst char kFilterFlag[] = \"filter\";\nconst char kListTestsFlag[] = \"list_tests\";\nconst char kOutputFlag[] = \"output\";\nconst char kPrintTimeFlag[] = \"print_time\";\nconst char kPrintUTF8Flag[] = \"print_utf8\";\nconst char kRandomSeedFlag[] = \"random_seed\";\nconst char kRepeatFlag[] = \"repeat\";\nconst char kShuffleFlag[] = \"shuffle\";\nconst char kStackTraceDepthFlag[] = \"stack_trace_depth\";\nconst char kStreamResultToFlag[] = \"stream_result_to\";\nconst char kThrowOnFailureFlag[] = \"throw_on_failure\";\nconst char kFlagfileFlag[] = \"flagfile\";\n\n// A valid random seed must be in [1, kMaxRandomSeed].\nconst int kMaxRandomSeed = 99999;\n\n// g_help_flag is true iff the --help flag or an equivalent form is\n// specified on the command line.\nGTEST_API_ extern bool g_help_flag;\n\n// Returns the current time in milliseconds.\nGTEST_API_ TimeInMillis GetTimeInMillis();\n\n// Returns true iff Google Test should use colors in the output.\nGTEST_API_ bool ShouldUseColor(bool stdout_is_tty);\n\n// Formats the given time in milliseconds as seconds.\nGTEST_API_ std::string FormatTimeInMillisAsSeconds(TimeInMillis ms);\n\n// Converts the given time in milliseconds to a date string in the ISO 8601\n// format, without the timezone information.  N.B.: due to the use the\n// non-reentrant localtime() function, this function is not thread safe.  Do\n// not use it in any code that can be called from multiple threads.\nGTEST_API_ std::string FormatEpochTimeInMillisAsIso8601(TimeInMillis ms);\n\n// Parses a string for an Int32 flag, in the form of \"--flag=value\".\n//\n// On success, stores the value of the flag in *value, and returns\n// true.  On failure, returns false without changing *value.\nGTEST_API_ bool ParseInt32Flag(\n    const char* str, const char* flag, Int32* value);\n\n// Returns a random seed in range [1, kMaxRandomSeed] based on the\n// given --gtest_random_seed flag value.\ninline int GetRandomSeedFromFlag(Int32 random_seed_flag) {\n  const unsigned int raw_seed = (random_seed_flag == 0) ?\n      static_cast<unsigned int>(GetTimeInMillis()) :\n      static_cast<unsigned int>(random_seed_flag);\n\n  // Normalizes the actual seed to range [1, kMaxRandomSeed] such that\n  // it's easy to type.\n  const int normalized_seed =\n      static_cast<int>((raw_seed - 1U) %\n                       static_cast<unsigned int>(kMaxRandomSeed)) + 1;\n  return normalized_seed;\n}\n\n// Returns the first valid random seed after 'seed'.  The behavior is\n// undefined if 'seed' is invalid.  The seed after kMaxRandomSeed is\n// considered to be 1.\ninline int GetNextRandomSeed(int seed) {\n  GTEST_CHECK_(1 <= seed && seed <= kMaxRandomSeed)\n      << \"Invalid random seed \" << seed << \" - must be in [1, \"\n      << kMaxRandomSeed << \"].\";\n  const int next_seed = seed + 1;\n  return (next_seed > kMaxRandomSeed) ? 1 : next_seed;\n}\n\n// This class saves the values of all Google Test flags in its c'tor, and\n// restores them in its d'tor.\nclass GTestFlagSaver {\n public:\n  // The c'tor.\n  GTestFlagSaver() {\n    also_run_disabled_tests_ = GTEST_FLAG(also_run_disabled_tests);\n    break_on_failure_ = GTEST_FLAG(break_on_failure);\n    catch_exceptions_ = GTEST_FLAG(catch_exceptions);\n    color_ = GTEST_FLAG(color);\n    death_test_style_ = GTEST_FLAG(death_test_style);\n    death_test_use_fork_ = GTEST_FLAG(death_test_use_fork);\n    filter_ = GTEST_FLAG(filter);\n    internal_run_death_test_ = GTEST_FLAG(internal_run_death_test);\n    list_tests_ = GTEST_FLAG(list_tests);\n    output_ = GTEST_FLAG(output);\n    print_time_ = GTEST_FLAG(print_time);\n    print_utf8_ = GTEST_FLAG(print_utf8);\n    random_seed_ = GTEST_FLAG(random_seed);\n    repeat_ = GTEST_FLAG(repeat);\n    shuffle_ = GTEST_FLAG(shuffle);\n    stack_trace_depth_ = GTEST_FLAG(stack_trace_depth);\n    stream_result_to_ = GTEST_FLAG(stream_result_to);\n    throw_on_failure_ = GTEST_FLAG(throw_on_failure);\n  }\n\n  // The d'tor is not virtual.  DO NOT INHERIT FROM THIS CLASS.\n  ~GTestFlagSaver() {\n    GTEST_FLAG(also_run_disabled_tests) = also_run_disabled_tests_;\n    GTEST_FLAG(break_on_failure) = break_on_failure_;\n    GTEST_FLAG(catch_exceptions) = catch_exceptions_;\n    GTEST_FLAG(color) = color_;\n    GTEST_FLAG(death_test_style) = death_test_style_;\n    GTEST_FLAG(death_test_use_fork) = death_test_use_fork_;\n    GTEST_FLAG(filter) = filter_;\n    GTEST_FLAG(internal_run_death_test) = internal_run_death_test_;\n    GTEST_FLAG(list_tests) = list_tests_;\n    GTEST_FLAG(output) = output_;\n    GTEST_FLAG(print_time) = print_time_;\n    GTEST_FLAG(print_utf8) = print_utf8_;\n    GTEST_FLAG(random_seed) = random_seed_;\n    GTEST_FLAG(repeat) = repeat_;\n    GTEST_FLAG(shuffle) = shuffle_;\n    GTEST_FLAG(stack_trace_depth) = stack_trace_depth_;\n    GTEST_FLAG(stream_result_to) = stream_result_to_;\n    GTEST_FLAG(throw_on_failure) = throw_on_failure_;\n  }\n\n private:\n  // Fields for saving the original values of flags.\n  bool also_run_disabled_tests_;\n  bool break_on_failure_;\n  bool catch_exceptions_;\n  std::string color_;\n  std::string death_test_style_;\n  bool death_test_use_fork_;\n  std::string filter_;\n  std::string internal_run_death_test_;\n  bool list_tests_;\n  std::string output_;\n  bool print_time_;\n  bool print_utf8_;\n  internal::Int32 random_seed_;\n  internal::Int32 repeat_;\n  bool shuffle_;\n  internal::Int32 stack_trace_depth_;\n  std::string stream_result_to_;\n  bool throw_on_failure_;\n} GTEST_ATTRIBUTE_UNUSED_;\n\n// Converts a Unicode code point to a narrow string in UTF-8 encoding.\n// code_point parameter is of type UInt32 because wchar_t may not be\n// wide enough to contain a code point.\n// If the code_point is not a valid Unicode code point\n// (i.e. outside of Unicode range U+0 to U+10FFFF) it will be converted\n// to \"(Invalid Unicode 0xXXXXXXXX)\".\nGTEST_API_ std::string CodePointToUtf8(UInt32 code_point);\n\n// Converts a wide string to a narrow string in UTF-8 encoding.\n// The wide string is assumed to have the following encoding:\n//   UTF-16 if sizeof(wchar_t) == 2 (on Windows, Cygwin)\n//   UTF-32 if sizeof(wchar_t) == 4 (on Linux)\n// Parameter str points to a null-terminated wide string.\n// Parameter num_chars may additionally limit the number\n// of wchar_t characters processed. -1 is used when the entire string\n// should be processed.\n// If the string contains code points that are not valid Unicode code points\n// (i.e. outside of Unicode range U+0 to U+10FFFF) they will be output\n// as '(Invalid Unicode 0xXXXXXXXX)'. If the string is in UTF16 encoding\n// and contains invalid UTF-16 surrogate pairs, values in those pairs\n// will be encoded as individual Unicode characters from Basic Normal Plane.\nGTEST_API_ std::string WideStringToUtf8(const wchar_t* str, int num_chars);\n\n// Reads the GTEST_SHARD_STATUS_FILE environment variable, and creates the file\n// if the variable is present. If a file already exists at this location, this\n// function will write over it. If the variable is present, but the file cannot\n// be created, prints an error and exits.\nvoid WriteToShardStatusFileIfNeeded();\n\n// Checks whether sharding is enabled by examining the relevant\n// environment variable values. If the variables are present,\n// but inconsistent (e.g., shard_index >= total_shards), prints\n// an error and exits. If in_subprocess_for_death_test, sharding is\n// disabled because it must only be applied to the original test\n// process. Otherwise, we could filter out death tests we intended to execute.\nGTEST_API_ bool ShouldShard(const char* total_shards_str,\n                            const char* shard_index_str,\n                            bool in_subprocess_for_death_test);\n\n// Parses the environment variable var as an Int32. If it is unset,\n// returns default_val. If it is not an Int32, prints an error and\n// and aborts.\nGTEST_API_ Int32 Int32FromEnvOrDie(const char* env_var, Int32 default_val);\n\n// Given the total number of shards, the shard index, and the test id,\n// returns true iff the test should be run on this shard. The test id is\n// some arbitrary but unique non-negative integer assigned to each test\n// method. Assumes that 0 <= shard_index < total_shards.\nGTEST_API_ bool ShouldRunTestOnShard(\n    int total_shards, int shard_index, int test_id);\n\n// STL container utilities.\n\n// Returns the number of elements in the given container that satisfy\n// the given predicate.\ntemplate <class Container, typename Predicate>\ninline int CountIf(const Container& c, Predicate predicate) {\n  // Implemented as an explicit loop since std::count_if() in libCstd on\n  // Solaris has a non-standard signature.\n  int count = 0;\n  for (typename Container::const_iterator it = c.begin(); it != c.end(); ++it) {\n    if (predicate(*it))\n      ++count;\n  }\n  return count;\n}\n\n// Applies a function/functor to each element in the container.\ntemplate <class Container, typename Functor>\nvoid ForEach(const Container& c, Functor functor) {\n  std::for_each(c.begin(), c.end(), functor);\n}\n\n// Returns the i-th element of the vector, or default_value if i is not\n// in range [0, v.size()).\ntemplate <typename E>\ninline E GetElementOr(const std::vector<E>& v, int i, E default_value) {\n  return (i < 0 || i >= static_cast<int>(v.size())) ? default_value : v[i];\n}\n\n// Performs an in-place shuffle of a range of the vector's elements.\n// 'begin' and 'end' are element indices as an STL-style range;\n// i.e. [begin, end) are shuffled, where 'end' == size() means to\n// shuffle to the end of the vector.\ntemplate <typename E>\nvoid ShuffleRange(internal::Random* random, int begin, int end,\n                  std::vector<E>* v) {\n  const int size = static_cast<int>(v->size());\n  GTEST_CHECK_(0 <= begin && begin <= size)\n      << \"Invalid shuffle range start \" << begin << \": must be in range [0, \"\n      << size << \"].\";\n  GTEST_CHECK_(begin <= end && end <= size)\n      << \"Invalid shuffle range finish \" << end << \": must be in range [\"\n      << begin << \", \" << size << \"].\";\n\n  // Fisher-Yates shuffle, from\n  // http://en.wikipedia.org/wiki/Fisher-Yates_shuffle\n  for (int range_width = end - begin; range_width >= 2; range_width--) {\n    const int last_in_range = begin + range_width - 1;\n    const int selected = begin + random->Generate(range_width);\n    std::swap((*v)[selected], (*v)[last_in_range]);\n  }\n}\n\n// Performs an in-place shuffle of the vector's elements.\ntemplate <typename E>\ninline void Shuffle(internal::Random* random, std::vector<E>* v) {\n  ShuffleRange(random, 0, static_cast<int>(v->size()), v);\n}\n\n// A function for deleting an object.  Handy for being used as a\n// functor.\ntemplate <typename T>\nstatic void Delete(T* x) {\n  delete x;\n}\n\n// A predicate that checks the key of a TestProperty against a known key.\n//\n// TestPropertyKeyIs is copyable.\nclass TestPropertyKeyIs {\n public:\n  // Constructor.\n  //\n  // TestPropertyKeyIs has NO default constructor.\n  explicit TestPropertyKeyIs(const std::string& key) : key_(key) {}\n\n  // Returns true iff the test name of test property matches on key_.\n  bool operator()(const TestProperty& test_property) const {\n    return test_property.key() == key_;\n  }\n\n private:\n  std::string key_;\n};\n\n// Class UnitTestOptions.\n//\n// This class contains functions for processing options the user\n// specifies when running the tests.  It has only static members.\n//\n// In most cases, the user can specify an option using either an\n// environment variable or a command line flag.  E.g. you can set the\n// test filter using either GTEST_FILTER or --gtest_filter.  If both\n// the variable and the flag are present, the latter overrides the\n// former.\nclass GTEST_API_ UnitTestOptions {\n public:\n  // Functions for processing the gtest_output flag.\n\n  // Returns the output format, or \"\" for normal printed output.\n  static std::string GetOutputFormat();\n\n  // Returns the absolute path of the requested output file, or the\n  // default (test_detail.xml in the original working directory) if\n  // none was explicitly specified.\n  static std::string GetAbsolutePathToOutputFile();\n\n  // Functions for processing the gtest_filter flag.\n\n  // Returns true iff the wildcard pattern matches the string.  The\n  // first ':' or '\\0' character in pattern marks the end of it.\n  //\n  // This recursive algorithm isn't very efficient, but is clear and\n  // works well enough for matching test names, which are short.\n  static bool PatternMatchesString(const char *pattern, const char *str);\n\n  // Returns true iff the user-specified filter matches the test suite\n  // name and the test name.\n  static bool FilterMatchesTest(const std::string& test_suite_name,\n                                const std::string& test_name);\n\n#if GTEST_OS_WINDOWS\n  // Function for supporting the gtest_catch_exception flag.\n\n  // Returns EXCEPTION_EXECUTE_HANDLER if Google Test should handle the\n  // given SEH exception, or EXCEPTION_CONTINUE_SEARCH otherwise.\n  // This function is useful as an __except condition.\n  static int GTestShouldProcessSEH(DWORD exception_code);\n#endif  // GTEST_OS_WINDOWS\n\n  // Returns true if \"name\" matches the ':' separated list of glob-style\n  // filters in \"filter\".\n  static bool MatchesFilter(const std::string& name, const char* filter);\n};\n\n// Returns the current application's name, removing directory path if that\n// is present.  Used by UnitTestOptions::GetOutputFile.\nGTEST_API_ FilePath GetCurrentExecutableName();\n\n// The role interface for getting the OS stack trace as a string.\nclass OsStackTraceGetterInterface {\n public:\n  OsStackTraceGetterInterface() {}\n  virtual ~OsStackTraceGetterInterface() {}\n\n  // Returns the current OS stack trace as an std::string.  Parameters:\n  //\n  //   max_depth  - the maximum number of stack frames to be included\n  //                in the trace.\n  //   skip_count - the number of top frames to be skipped; doesn't count\n  //                against max_depth.\n  virtual std::string CurrentStackTrace(int max_depth, int skip_count) = 0;\n\n  // UponLeavingGTest() should be called immediately before Google Test calls\n  // user code. It saves some information about the current stack that\n  // CurrentStackTrace() will use to find and hide Google Test stack frames.\n  virtual void UponLeavingGTest() = 0;\n\n  // This string is inserted in place of stack frames that are part of\n  // Google Test's implementation.\n  static const char* const kElidedFramesMarker;\n\n private:\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(OsStackTraceGetterInterface);\n};\n\n// A working implementation of the OsStackTraceGetterInterface interface.\nclass OsStackTraceGetter : public OsStackTraceGetterInterface {\n public:\n  OsStackTraceGetter() {}\n\n  std::string CurrentStackTrace(int max_depth, int skip_count) override;\n  void UponLeavingGTest() override;\n\n private:\n#if GTEST_HAS_ABSL\n  Mutex mutex_;  // Protects all internal state.\n\n  // We save the stack frame below the frame that calls user code.\n  // We do this because the address of the frame immediately below\n  // the user code changes between the call to UponLeavingGTest()\n  // and any calls to the stack trace code from within the user code.\n  void* caller_frame_ = nullptr;\n#endif  // GTEST_HAS_ABSL\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(OsStackTraceGetter);\n};\n\n// Information about a Google Test trace point.\nstruct TraceInfo {\n  const char* file;\n  int line;\n  std::string message;\n};\n\n// This is the default global test part result reporter used in UnitTestImpl.\n// This class should only be used by UnitTestImpl.\nclass DefaultGlobalTestPartResultReporter\n  : public TestPartResultReporterInterface {\n public:\n  explicit DefaultGlobalTestPartResultReporter(UnitTestImpl* unit_test);\n  // Implements the TestPartResultReporterInterface. Reports the test part\n  // result in the current test.\n  void ReportTestPartResult(const TestPartResult& result) override;\n\n private:\n  UnitTestImpl* const unit_test_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(DefaultGlobalTestPartResultReporter);\n};\n\n// This is the default per thread test part result reporter used in\n// UnitTestImpl. This class should only be used by UnitTestImpl.\nclass DefaultPerThreadTestPartResultReporter\n    : public TestPartResultReporterInterface {\n public:\n  explicit DefaultPerThreadTestPartResultReporter(UnitTestImpl* unit_test);\n  // Implements the TestPartResultReporterInterface. The implementation just\n  // delegates to the current global test part result reporter of *unit_test_.\n  void ReportTestPartResult(const TestPartResult& result) override;\n\n private:\n  UnitTestImpl* const unit_test_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(DefaultPerThreadTestPartResultReporter);\n};\n\n// The private implementation of the UnitTest class.  We don't protect\n// the methods under a mutex, as this class is not accessible by a\n// user and the UnitTest class that delegates work to this class does\n// proper locking.\nclass GTEST_API_ UnitTestImpl {\n public:\n  explicit UnitTestImpl(UnitTest* parent);\n  virtual ~UnitTestImpl();\n\n  // There are two different ways to register your own TestPartResultReporter.\n  // You can register your own repoter to listen either only for test results\n  // from the current thread or for results from all threads.\n  // By default, each per-thread test result repoter just passes a new\n  // TestPartResult to the global test result reporter, which registers the\n  // test part result for the currently running test.\n\n  // Returns the global test part result reporter.\n  TestPartResultReporterInterface* GetGlobalTestPartResultReporter();\n\n  // Sets the global test part result reporter.\n  void SetGlobalTestPartResultReporter(\n      TestPartResultReporterInterface* reporter);\n\n  // Returns the test part result reporter for the current thread.\n  TestPartResultReporterInterface* GetTestPartResultReporterForCurrentThread();\n\n  // Sets the test part result reporter for the current thread.\n  void SetTestPartResultReporterForCurrentThread(\n      TestPartResultReporterInterface* reporter);\n\n  // Gets the number of successful test suites.\n  int successful_test_suite_count() const;\n\n  // Gets the number of failed test suites.\n  int failed_test_suite_count() const;\n\n  // Gets the number of all test suites.\n  int total_test_suite_count() const;\n\n  // Gets the number of all test suites that contain at least one test\n  // that should run.\n  int test_suite_to_run_count() const;\n\n  // Gets the number of successful tests.\n  int successful_test_count() const;\n\n  // Gets the number of skipped tests.\n  int skipped_test_count() const;\n\n  // Gets the number of failed tests.\n  int failed_test_count() const;\n\n  // Gets the number of disabled tests that will be reported in the XML report.\n  int reportable_disabled_test_count() const;\n\n  // Gets the number of disabled tests.\n  int disabled_test_count() const;\n\n  // Gets the number of tests to be printed in the XML report.\n  int reportable_test_count() const;\n\n  // Gets the number of all tests.\n  int total_test_count() const;\n\n  // Gets the number of tests that should run.\n  int test_to_run_count() const;\n\n  // Gets the time of the test program start, in ms from the start of the\n  // UNIX epoch.\n  TimeInMillis start_timestamp() const { return start_timestamp_; }\n\n  // Gets the elapsed time, in milliseconds.\n  TimeInMillis elapsed_time() const { return elapsed_time_; }\n\n  // Returns true iff the unit test passed (i.e. all test suites passed).\n  bool Passed() const { return !Failed(); }\n\n  // Returns true iff the unit test failed (i.e. some test suite failed\n  // or something outside of all tests failed).\n  bool Failed() const {\n    return failed_test_suite_count() > 0 || ad_hoc_test_result()->Failed();\n  }\n\n  // Gets the i-th test suite among all the test suites. i can range from 0 to\n  // total_test_suite_count() - 1. If i is not in that range, returns NULL.\n  const TestSuite* GetTestSuite(int i) const {\n    const int index = GetElementOr(test_suite_indices_, i, -1);\n    return index < 0 ? nullptr : test_suites_[i];\n  }\n\n  //  Legacy API is deprecated but still available\n#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_\n  const TestCase* GetTestCase(int i) const { return GetTestSuite(i); }\n#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI_\n\n  // Gets the i-th test suite among all the test suites. i can range from 0 to\n  // total_test_suite_count() - 1. If i is not in that range, returns NULL.\n  TestSuite* GetMutableSuiteCase(int i) {\n    const int index = GetElementOr(test_suite_indices_, i, -1);\n    return index < 0 ? nullptr : test_suites_[index];\n  }\n\n  // Provides access to the event listener list.\n  TestEventListeners* listeners() { return &listeners_; }\n\n  // Returns the TestResult for the test that's currently running, or\n  // the TestResult for the ad hoc test if no test is running.\n  TestResult* current_test_result();\n\n  // Returns the TestResult for the ad hoc test.\n  const TestResult* ad_hoc_test_result() const { return &ad_hoc_test_result_; }\n\n  // Sets the OS stack trace getter.\n  //\n  // Does nothing if the input and the current OS stack trace getter\n  // are the same; otherwise, deletes the old getter and makes the\n  // input the current getter.\n  void set_os_stack_trace_getter(OsStackTraceGetterInterface* getter);\n\n  // Returns the current OS stack trace getter if it is not NULL;\n  // otherwise, creates an OsStackTraceGetter, makes it the current\n  // getter, and returns it.\n  OsStackTraceGetterInterface* os_stack_trace_getter();\n\n  // Returns the current OS stack trace as an std::string.\n  //\n  // The maximum number of stack frames to be included is specified by\n  // the gtest_stack_trace_depth flag.  The skip_count parameter\n  // specifies the number of top frames to be skipped, which doesn't\n  // count against the number of frames to be included.\n  //\n  // For example, if Foo() calls Bar(), which in turn calls\n  // CurrentOsStackTraceExceptTop(1), Foo() will be included in the\n  // trace but Bar() and CurrentOsStackTraceExceptTop() won't.\n  std::string CurrentOsStackTraceExceptTop(int skip_count) GTEST_NO_INLINE_;\n\n  // Finds and returns a TestSuite with the given name.  If one doesn't\n  // exist, creates one and returns it.\n  //\n  // Arguments:\n  //\n  //   test_suite_name: name of the test suite\n  //   type_param:     the name of the test's type parameter, or NULL if\n  //                   this is not a typed or a type-parameterized test.\n  //   set_up_tc:      pointer to the function that sets up the test suite\n  //   tear_down_tc:   pointer to the function that tears down the test suite\n  TestSuite* GetTestSuite(const char* test_suite_name, const char* type_param,\n                          internal::SetUpTestSuiteFunc set_up_tc,\n                          internal::TearDownTestSuiteFunc tear_down_tc);\n\n//  Legacy API is deprecated but still available\n#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_\n  TestCase* GetTestCase(const char* test_case_name, const char* type_param,\n                        internal::SetUpTestSuiteFunc set_up_tc,\n                        internal::TearDownTestSuiteFunc tear_down_tc) {\n    return GetTestSuite(test_case_name, type_param, set_up_tc, tear_down_tc);\n  }\n#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI_\n\n  // Adds a TestInfo to the unit test.\n  //\n  // Arguments:\n  //\n  //   set_up_tc:    pointer to the function that sets up the test suite\n  //   tear_down_tc: pointer to the function that tears down the test suite\n  //   test_info:    the TestInfo object\n  void AddTestInfo(internal::SetUpTestSuiteFunc set_up_tc,\n                   internal::TearDownTestSuiteFunc tear_down_tc,\n                   TestInfo* test_info) {\n    // In order to support thread-safe death tests, we need to\n    // remember the original working directory when the test program\n    // was first invoked.  We cannot do this in RUN_ALL_TESTS(), as\n    // the user may have changed the current directory before calling\n    // RUN_ALL_TESTS().  Therefore we capture the current directory in\n    // AddTestInfo(), which is called to register a TEST or TEST_F\n    // before main() is reached.\n    if (original_working_dir_.IsEmpty()) {\n      original_working_dir_.Set(FilePath::GetCurrentDir());\n      GTEST_CHECK_(!original_working_dir_.IsEmpty())\n          << \"Failed to get the current working directory.\";\n    }\n\n    GetTestSuite(test_info->test_suite_name(), test_info->type_param(),\n                 set_up_tc, tear_down_tc)\n        ->AddTestInfo(test_info);\n  }\n\n  // Returns ParameterizedTestSuiteRegistry object used to keep track of\n  // value-parameterized tests and instantiate and register them.\n  internal::ParameterizedTestSuiteRegistry& parameterized_test_registry() {\n    return parameterized_test_registry_;\n  }\n\n  // Sets the TestSuite object for the test that's currently running.\n  void set_current_test_suite(TestSuite* a_current_test_suite) {\n    current_test_suite_ = a_current_test_suite;\n  }\n\n  // Sets the TestInfo object for the test that's currently running.  If\n  // current_test_info is NULL, the assertion results will be stored in\n  // ad_hoc_test_result_.\n  void set_current_test_info(TestInfo* a_current_test_info) {\n    current_test_info_ = a_current_test_info;\n  }\n\n  // Registers all parameterized tests defined using TEST_P and\n  // INSTANTIATE_TEST_SUITE_P, creating regular tests for each test/parameter\n  // combination. This method can be called more then once; it has guards\n  // protecting from registering the tests more then once.  If\n  // value-parameterized tests are disabled, RegisterParameterizedTests is\n  // present but does nothing.\n  void RegisterParameterizedTests();\n\n  // Runs all tests in this UnitTest object, prints the result, and\n  // returns true if all tests are successful.  If any exception is\n  // thrown during a test, this test is considered to be failed, but\n  // the rest of the tests will still be run.\n  bool RunAllTests();\n\n  // Clears the results of all tests, except the ad hoc tests.\n  void ClearNonAdHocTestResult() {\n    ForEach(test_suites_, TestSuite::ClearTestSuiteResult);\n  }\n\n  // Clears the results of ad-hoc test assertions.\n  void ClearAdHocTestResult() {\n    ad_hoc_test_result_.Clear();\n  }\n\n  // Adds a TestProperty to the current TestResult object when invoked in a\n  // context of a test or a test suite, or to the global property set. If the\n  // result already contains a property with the same key, the value will be\n  // updated.\n  void RecordProperty(const TestProperty& test_property);\n\n  enum ReactionToSharding {\n    HONOR_SHARDING_PROTOCOL,\n    IGNORE_SHARDING_PROTOCOL\n  };\n\n  // Matches the full name of each test against the user-specified\n  // filter to decide whether the test should run, then records the\n  // result in each TestSuite and TestInfo object.\n  // If shard_tests == HONOR_SHARDING_PROTOCOL, further filters tests\n  // based on sharding variables in the environment.\n  // Returns the number of tests that should run.\n  int FilterTests(ReactionToSharding shard_tests);\n\n  // Prints the names of the tests matching the user-specified filter flag.\n  void ListTestsMatchingFilter();\n\n  const TestSuite* current_test_suite() const { return current_test_suite_; }\n  TestInfo* current_test_info() { return current_test_info_; }\n  const TestInfo* current_test_info() const { return current_test_info_; }\n\n  // Returns the vector of environments that need to be set-up/torn-down\n  // before/after the tests are run.\n  std::vector<Environment*>& environments() { return environments_; }\n\n  // Getters for the per-thread Google Test trace stack.\n  std::vector<TraceInfo>& gtest_trace_stack() {\n    return *(gtest_trace_stack_.pointer());\n  }\n  const std::vector<TraceInfo>& gtest_trace_stack() const {\n    return gtest_trace_stack_.get();\n  }\n\n#if GTEST_HAS_DEATH_TEST\n  void InitDeathTestSubprocessControlInfo() {\n    internal_run_death_test_flag_.reset(ParseInternalRunDeathTestFlag());\n  }\n  // Returns a pointer to the parsed --gtest_internal_run_death_test\n  // flag, or NULL if that flag was not specified.\n  // This information is useful only in a death test child process.\n  // Must not be called before a call to InitGoogleTest.\n  const InternalRunDeathTestFlag* internal_run_death_test_flag() const {\n    return internal_run_death_test_flag_.get();\n  }\n\n  // Returns a pointer to the current death test factory.\n  internal::DeathTestFactory* death_test_factory() {\n    return death_test_factory_.get();\n  }\n\n  void SuppressTestEventsIfInSubprocess();\n\n  friend class ReplaceDeathTestFactory;\n#endif  // GTEST_HAS_DEATH_TEST\n\n  // Initializes the event listener performing XML output as specified by\n  // UnitTestOptions. Must not be called before InitGoogleTest.\n  void ConfigureXmlOutput();\n\n#if GTEST_CAN_STREAM_RESULTS_\n  // Initializes the event listener for streaming test results to a socket.\n  // Must not be called before InitGoogleTest.\n  void ConfigureStreamingOutput();\n#endif\n\n  // Performs initialization dependent upon flag values obtained in\n  // ParseGoogleTestFlagsOnly.  Is called from InitGoogleTest after the call to\n  // ParseGoogleTestFlagsOnly.  In case a user neglects to call InitGoogleTest\n  // this function is also called from RunAllTests.  Since this function can be\n  // called more than once, it has to be idempotent.\n  void PostFlagParsingInit();\n\n  // Gets the random seed used at the start of the current test iteration.\n  int random_seed() const { return random_seed_; }\n\n  // Gets the random number generator.\n  internal::Random* random() { return &random_; }\n\n  // Shuffles all test suites, and the tests within each test suite,\n  // making sure that death tests are still run first.\n  void ShuffleTests();\n\n  // Restores the test suites and tests to their order before the first shuffle.\n  void UnshuffleTests();\n\n  // Returns the value of GTEST_FLAG(catch_exceptions) at the moment\n  // UnitTest::Run() starts.\n  bool catch_exceptions() const { return catch_exceptions_; }\n\n private:\n  friend class ::testing::UnitTest;\n\n  // Used by UnitTest::Run() to capture the state of\n  // GTEST_FLAG(catch_exceptions) at the moment it starts.\n  void set_catch_exceptions(bool value) { catch_exceptions_ = value; }\n\n  // The UnitTest object that owns this implementation object.\n  UnitTest* const parent_;\n\n  // The working directory when the first TEST() or TEST_F() was\n  // executed.\n  internal::FilePath original_working_dir_;\n\n  // The default test part result reporters.\n  DefaultGlobalTestPartResultReporter default_global_test_part_result_reporter_;\n  DefaultPerThreadTestPartResultReporter\n      default_per_thread_test_part_result_reporter_;\n\n  // Points to (but doesn't own) the global test part result reporter.\n  TestPartResultReporterInterface* global_test_part_result_repoter_;\n\n  // Protects read and write access to global_test_part_result_reporter_.\n  internal::Mutex global_test_part_result_reporter_mutex_;\n\n  // Points to (but doesn't own) the per-thread test part result reporter.\n  internal::ThreadLocal<TestPartResultReporterInterface*>\n      per_thread_test_part_result_reporter_;\n\n  // The vector of environments that need to be set-up/torn-down\n  // before/after the tests are run.\n  std::vector<Environment*> environments_;\n\n  // The vector of TestSuites in their original order.  It owns the\n  // elements in the vector.\n  std::vector<TestSuite*> test_suites_;\n\n  // Provides a level of indirection for the test suite list to allow\n  // easy shuffling and restoring the test suite order.  The i-th\n  // element of this vector is the index of the i-th test suite in the\n  // shuffled order.\n  std::vector<int> test_suite_indices_;\n\n  // ParameterizedTestRegistry object used to register value-parameterized\n  // tests.\n  internal::ParameterizedTestSuiteRegistry parameterized_test_registry_;\n\n  // Indicates whether RegisterParameterizedTests() has been called already.\n  bool parameterized_tests_registered_;\n\n  // Index of the last death test suite registered.  Initially -1.\n  int last_death_test_suite_;\n\n  // This points to the TestSuite for the currently running test.  It\n  // changes as Google Test goes through one test suite after another.\n  // When no test is running, this is set to NULL and Google Test\n  // stores assertion results in ad_hoc_test_result_.  Initially NULL.\n  TestSuite* current_test_suite_;\n\n  // This points to the TestInfo for the currently running test.  It\n  // changes as Google Test goes through one test after another.  When\n  // no test is running, this is set to NULL and Google Test stores\n  // assertion results in ad_hoc_test_result_.  Initially NULL.\n  TestInfo* current_test_info_;\n\n  // Normally, a user only writes assertions inside a TEST or TEST_F,\n  // or inside a function called by a TEST or TEST_F.  Since Google\n  // Test keeps track of which test is current running, it can\n  // associate such an assertion with the test it belongs to.\n  //\n  // If an assertion is encountered when no TEST or TEST_F is running,\n  // Google Test attributes the assertion result to an imaginary \"ad hoc\"\n  // test, and records the result in ad_hoc_test_result_.\n  TestResult ad_hoc_test_result_;\n\n  // The list of event listeners that can be used to track events inside\n  // Google Test.\n  TestEventListeners listeners_;\n\n  // The OS stack trace getter.  Will be deleted when the UnitTest\n  // object is destructed.  By default, an OsStackTraceGetter is used,\n  // but the user can set this field to use a custom getter if that is\n  // desired.\n  OsStackTraceGetterInterface* os_stack_trace_getter_;\n\n  // True iff PostFlagParsingInit() has been called.\n  bool post_flag_parse_init_performed_;\n\n  // The random number seed used at the beginning of the test run.\n  int random_seed_;\n\n  // Our random number generator.\n  internal::Random random_;\n\n  // The time of the test program start, in ms from the start of the\n  // UNIX epoch.\n  TimeInMillis start_timestamp_;\n\n  // How long the test took to run, in milliseconds.\n  TimeInMillis elapsed_time_;\n\n#if GTEST_HAS_DEATH_TEST\n  // The decomposed components of the gtest_internal_run_death_test flag,\n  // parsed when RUN_ALL_TESTS is called.\n  std::unique_ptr<InternalRunDeathTestFlag> internal_run_death_test_flag_;\n  std::unique_ptr<internal::DeathTestFactory> death_test_factory_;\n#endif  // GTEST_HAS_DEATH_TEST\n\n  // A per-thread stack of traces created by the SCOPED_TRACE() macro.\n  internal::ThreadLocal<std::vector<TraceInfo> > gtest_trace_stack_;\n\n  // The value of GTEST_FLAG(catch_exceptions) at the moment RunAllTests()\n  // starts.\n  bool catch_exceptions_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(UnitTestImpl);\n};  // class UnitTestImpl\n\n// Convenience function for accessing the global UnitTest\n// implementation object.\ninline UnitTestImpl* GetUnitTestImpl() {\n  return UnitTest::GetInstance()->impl();\n}\n\n#if GTEST_USES_SIMPLE_RE\n\n// Internal helper functions for implementing the simple regular\n// expression matcher.\nGTEST_API_ bool IsInSet(char ch, const char* str);\nGTEST_API_ bool IsAsciiDigit(char ch);\nGTEST_API_ bool IsAsciiPunct(char ch);\nGTEST_API_ bool IsRepeat(char ch);\nGTEST_API_ bool IsAsciiWhiteSpace(char ch);\nGTEST_API_ bool IsAsciiWordChar(char ch);\nGTEST_API_ bool IsValidEscape(char ch);\nGTEST_API_ bool AtomMatchesChar(bool escaped, char pattern, char ch);\nGTEST_API_ bool ValidateRegex(const char* regex);\nGTEST_API_ bool MatchRegexAtHead(const char* regex, const char* str);\nGTEST_API_ bool MatchRepetitionAndRegexAtHead(\n    bool escaped, char ch, char repeat, const char* regex, const char* str);\nGTEST_API_ bool MatchRegexAnywhere(const char* regex, const char* str);\n\n#endif  // GTEST_USES_SIMPLE_RE\n\n// Parses the command line for Google Test flags, without initializing\n// other parts of Google Test.\nGTEST_API_ void ParseGoogleTestFlagsOnly(int* argc, char** argv);\nGTEST_API_ void ParseGoogleTestFlagsOnly(int* argc, wchar_t** argv);\n\n#if GTEST_HAS_DEATH_TEST\n\n// Returns the message describing the last system error, regardless of the\n// platform.\nGTEST_API_ std::string GetLastErrnoDescription();\n\n// Attempts to parse a string into a positive integer pointed to by the\n// number parameter.  Returns true if that is possible.\n// GTEST_HAS_DEATH_TEST implies that we have ::std::string, so we can use\n// it here.\ntemplate <typename Integer>\nbool ParseNaturalNumber(const ::std::string& str, Integer* number) {\n  // Fail fast if the given string does not begin with a digit;\n  // this bypasses strtoXXX's \"optional leading whitespace and plus\n  // or minus sign\" semantics, which are undesirable here.\n  if (str.empty() || !IsDigit(str[0])) {\n    return false;\n  }\n  errno = 0;\n\n  char* end;\n  // BiggestConvertible is the largest integer type that system-provided\n  // string-to-number conversion routines can return.\n\n# if GTEST_OS_WINDOWS && !defined(__GNUC__)\n\n  // MSVC and C++ Builder define __int64 instead of the standard long long.\n  typedef unsigned __int64 BiggestConvertible;\n  const BiggestConvertible parsed = _strtoui64(str.c_str(), &end, 10);\n\n# else\n\n  typedef unsigned long long BiggestConvertible;  // NOLINT\n  const BiggestConvertible parsed = strtoull(str.c_str(), &end, 10);\n\n# endif  // GTEST_OS_WINDOWS && !defined(__GNUC__)\n\n  const bool parse_success = *end == '\\0' && errno == 0;\n\n  GTEST_CHECK_(sizeof(Integer) <= sizeof(parsed));\n\n  const Integer result = static_cast<Integer>(parsed);\n  if (parse_success && static_cast<BiggestConvertible>(result) == parsed) {\n    *number = result;\n    return true;\n  }\n  return false;\n}\n#endif  // GTEST_HAS_DEATH_TEST\n\n// TestResult contains some private methods that should be hidden from\n// Google Test user but are required for testing. This class allow our tests\n// to access them.\n//\n// This class is supplied only for the purpose of testing Google Test's own\n// constructs. Do not use it in user tests, either directly or indirectly.\nclass TestResultAccessor {\n public:\n  static void RecordProperty(TestResult* test_result,\n                             const std::string& xml_element,\n                             const TestProperty& property) {\n    test_result->RecordProperty(xml_element, property);\n  }\n\n  static void ClearTestPartResults(TestResult* test_result) {\n    test_result->ClearTestPartResults();\n  }\n\n  static const std::vector<testing::TestPartResult>& test_part_results(\n      const TestResult& test_result) {\n    return test_result.test_part_results();\n  }\n};\n\n#if GTEST_CAN_STREAM_RESULTS_\n\n// Streams test results to the given port on the given host machine.\nclass StreamingListener : public EmptyTestEventListener {\n public:\n  // Abstract base class for writing strings to a socket.\n  class AbstractSocketWriter {\n   public:\n    virtual ~AbstractSocketWriter() {}\n\n    // Sends a string to the socket.\n    virtual void Send(const std::string& message) = 0;\n\n    // Closes the socket.\n    virtual void CloseConnection() {}\n\n    // Sends a string and a newline to the socket.\n    void SendLn(const std::string& message) { Send(message + \"\\n\"); }\n  };\n\n  // Concrete class for actually writing strings to a socket.\n  class SocketWriter : public AbstractSocketWriter {\n   public:\n    SocketWriter(const std::string& host, const std::string& port)\n        : sockfd_(-1), host_name_(host), port_num_(port) {\n      MakeConnection();\n    }\n\n    ~SocketWriter() override {\n      if (sockfd_ != -1)\n        CloseConnection();\n    }\n\n    // Sends a string to the socket.\n    void Send(const std::string& message) override {\n      GTEST_CHECK_(sockfd_ != -1)\n          << \"Send() can be called only when there is a connection.\";\n\n      const int len = static_cast<int>(message.length());\n      if (write(sockfd_, message.c_str(), len) != len) {\n        GTEST_LOG_(WARNING)\n            << \"stream_result_to: failed to stream to \"\n            << host_name_ << \":\" << port_num_;\n      }\n    }\n\n   private:\n    // Creates a client socket and connects to the server.\n    void MakeConnection();\n\n    // Closes the socket.\n    void CloseConnection() override {\n      GTEST_CHECK_(sockfd_ != -1)\n          << \"CloseConnection() can be called only when there is a connection.\";\n\n      close(sockfd_);\n      sockfd_ = -1;\n    }\n\n    int sockfd_;  // socket file descriptor\n    const std::string host_name_;\n    const std::string port_num_;\n\n    GTEST_DISALLOW_COPY_AND_ASSIGN_(SocketWriter);\n  };  // class SocketWriter\n\n  // Escapes '=', '&', '%', and '\\n' characters in str as \"%xx\".\n  static std::string UrlEncode(const char* str);\n\n  StreamingListener(const std::string& host, const std::string& port)\n      : socket_writer_(new SocketWriter(host, port)) {\n    Start();\n  }\n\n  explicit StreamingListener(AbstractSocketWriter* socket_writer)\n      : socket_writer_(socket_writer) { Start(); }\n\n  void OnTestProgramStart(const UnitTest& /* unit_test */) override {\n    SendLn(\"event=TestProgramStart\");\n  }\n\n  void OnTestProgramEnd(const UnitTest& unit_test) override {\n    // Note that Google Test current only report elapsed time for each\n    // test iteration, not for the entire test program.\n    SendLn(\"event=TestProgramEnd&passed=\" + FormatBool(unit_test.Passed()));\n\n    // Notify the streaming server to stop.\n    socket_writer_->CloseConnection();\n  }\n\n  void OnTestIterationStart(const UnitTest& /* unit_test */,\n                            int iteration) override {\n    SendLn(\"event=TestIterationStart&iteration=\" +\n           StreamableToString(iteration));\n  }\n\n  void OnTestIterationEnd(const UnitTest& unit_test,\n                          int /* iteration */) override {\n    SendLn(\"event=TestIterationEnd&passed=\" +\n           FormatBool(unit_test.Passed()) + \"&elapsed_time=\" +\n           StreamableToString(unit_test.elapsed_time()) + \"ms\");\n  }\n\n  // Note that \"event=TestCaseStart\" is a wire format and has to remain\n  // \"case\" for compatibilty\n  void OnTestCaseStart(const TestCase& test_case) override {\n    SendLn(std::string(\"event=TestCaseStart&name=\") + test_case.name());\n  }\n\n  // Note that \"event=TestCaseEnd\" is a wire format and has to remain\n  // \"case\" for compatibilty\n  void OnTestCaseEnd(const TestCase& test_case) override {\n    SendLn(\"event=TestCaseEnd&passed=\" + FormatBool(test_case.Passed()) +\n           \"&elapsed_time=\" + StreamableToString(test_case.elapsed_time()) +\n           \"ms\");\n  }\n\n  void OnTestStart(const TestInfo& test_info) override {\n    SendLn(std::string(\"event=TestStart&name=\") + test_info.name());\n  }\n\n  void OnTestEnd(const TestInfo& test_info) override {\n    SendLn(\"event=TestEnd&passed=\" +\n           FormatBool((test_info.result())->Passed()) +\n           \"&elapsed_time=\" +\n           StreamableToString((test_info.result())->elapsed_time()) + \"ms\");\n  }\n\n  void OnTestPartResult(const TestPartResult& test_part_result) override {\n    const char* file_name = test_part_result.file_name();\n    if (file_name == nullptr) file_name = \"\";\n    SendLn(\"event=TestPartResult&file=\" + UrlEncode(file_name) +\n           \"&line=\" + StreamableToString(test_part_result.line_number()) +\n           \"&message=\" + UrlEncode(test_part_result.message()));\n  }\n\n private:\n  // Sends the given message and a newline to the socket.\n  void SendLn(const std::string& message) { socket_writer_->SendLn(message); }\n\n  // Called at the start of streaming to notify the receiver what\n  // protocol we are using.\n  void Start() { SendLn(\"gtest_streaming_protocol_version=1.0\"); }\n\n  std::string FormatBool(bool value) { return value ? \"1\" : \"0\"; }\n\n  const std::unique_ptr<AbstractSocketWriter> socket_writer_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(StreamingListener);\n};  // class StreamingListener\n\n#endif  // GTEST_CAN_STREAM_RESULTS_\n\n}  // namespace internal\n}  // namespace testing\n\nGTEST_DISABLE_MSC_WARNINGS_POP_()  //  4251\n\n#endif  // GTEST_SRC_GTEST_INTERNAL_INL_H_\n\n#if GTEST_OS_WINDOWS\n# define vsnprintf _vsnprintf\n#endif  // GTEST_OS_WINDOWS\n\n#if GTEST_OS_MAC\n#ifndef GTEST_OS_IOS\n#include <crt_externs.h>\n#endif\n#endif\n\n#if GTEST_HAS_ABSL\n#include \"absl/debugging/failure_signal_handler.h\"\n#include \"absl/debugging/stacktrace.h\"\n#include \"absl/debugging/symbolize.h\"\n#include \"absl/strings/str_cat.h\"\n#endif  // GTEST_HAS_ABSL\n\nnamespace testing {\n\nusing internal::CountIf;\nusing internal::ForEach;\nusing internal::GetElementOr;\nusing internal::Shuffle;\n\n// Constants.\n\n// A test whose test suite name or test name matches this filter is\n// disabled and not run.\nstatic const char kDisableTestFilter[] = \"DISABLED_*:*/DISABLED_*\";\n\n// A test suite whose name matches this filter is considered a death\n// test suite and will be run before test suites whose name doesn't\n// match this filter.\nstatic const char kDeathTestSuiteFilter[] = \"*DeathTest:*DeathTest/*\";\n\n// A test filter that matches everything.\nstatic const char kUniversalFilter[] = \"*\";\n\n// The default output format.\nstatic const char kDefaultOutputFormat[] = \"xml\";\n// The default output file.\nstatic const char kDefaultOutputFile[] = \"test_detail\";\n\n// The environment variable name for the test shard index.\nstatic const char kTestShardIndex[] = \"GTEST_SHARD_INDEX\";\n// The environment variable name for the total number of test shards.\nstatic const char kTestTotalShards[] = \"GTEST_TOTAL_SHARDS\";\n// The environment variable name for the test shard status file.\nstatic const char kTestShardStatusFile[] = \"GTEST_SHARD_STATUS_FILE\";\n\nnamespace internal {\n\n// The text used in failure messages to indicate the start of the\n// stack trace.\nconst char kStackTraceMarker[] = \"\\nStack trace:\\n\";\n\n// g_help_flag is true iff the --help flag or an equivalent form is\n// specified on the command line.\nbool g_help_flag = false;\n\n// Utilty function to Open File for Writing\nstatic FILE* OpenFileForWriting(const std::string& output_file) {\n  FILE* fileout = nullptr;\n  FilePath output_file_path(output_file);\n  FilePath output_dir(output_file_path.RemoveFileName());\n\n  if (output_dir.CreateDirectoriesRecursively()) {\n    fileout = posix::FOpen(output_file.c_str(), \"w\");\n  }\n  if (fileout == nullptr) {\n    GTEST_LOG_(FATAL) << \"Unable to open file \\\"\" << output_file << \"\\\"\";\n  }\n  return fileout;\n}\n\n}  // namespace internal\n\n// Bazel passes in the argument to '--test_filter' via the TESTBRIDGE_TEST_ONLY\n// environment variable.\nstatic const char* GetDefaultFilter() {\n  const char* const testbridge_test_only =\n      internal::posix::GetEnv(\"TESTBRIDGE_TEST_ONLY\");\n  if (testbridge_test_only != nullptr) {\n    return testbridge_test_only;\n  }\n  return kUniversalFilter;\n}\n\nGTEST_DEFINE_bool_(\n    also_run_disabled_tests,\n    internal::BoolFromGTestEnv(\"also_run_disabled_tests\", false),\n    \"Run disabled tests too, in addition to the tests normally being run.\");\n\nGTEST_DEFINE_bool_(\n    break_on_failure,\n    internal::BoolFromGTestEnv(\"break_on_failure\", false),\n    \"True iff a failed assertion should be a debugger break-point.\");\n\nGTEST_DEFINE_bool_(\n    catch_exceptions,\n    internal::BoolFromGTestEnv(\"catch_exceptions\", true),\n    \"True iff \" GTEST_NAME_\n    \" should catch exceptions and treat them as test failures.\");\n\nGTEST_DEFINE_string_(\n    color,\n    internal::StringFromGTestEnv(\"color\", \"auto\"),\n    \"Whether to use colors in the output.  Valid values: yes, no, \"\n    \"and auto.  'auto' means to use colors if the output is \"\n    \"being sent to a terminal and the TERM environment variable \"\n    \"is set to a terminal type that supports colors.\");\n\nGTEST_DEFINE_string_(\n    filter,\n    internal::StringFromGTestEnv(\"filter\", GetDefaultFilter()),\n    \"A colon-separated list of glob (not regex) patterns \"\n    \"for filtering the tests to run, optionally followed by a \"\n    \"'-' and a : separated list of negative patterns (tests to \"\n    \"exclude).  A test is run if it matches one of the positive \"\n    \"patterns and does not match any of the negative patterns.\");\n\nGTEST_DEFINE_bool_(\n    install_failure_signal_handler,\n    internal::BoolFromGTestEnv(\"install_failure_signal_handler\", false),\n    \"If true and supported on the current platform, \" GTEST_NAME_ \" should \"\n    \"install a signal handler that dumps debugging information when fatal \"\n    \"signals are raised.\");\n\nGTEST_DEFINE_bool_(list_tests, false,\n                   \"List all tests without running them.\");\n\n// The net priority order after flag processing is thus:\n//   --gtest_output command line flag\n//   GTEST_OUTPUT environment variable\n//   XML_OUTPUT_FILE environment variable\n//   ''\nGTEST_DEFINE_string_(\n    output,\n    internal::StringFromGTestEnv(\"output\",\n      internal::OutputFlagAlsoCheckEnvVar().c_str()),\n    \"A format (defaults to \\\"xml\\\" but can be specified to be \\\"json\\\"), \"\n    \"optionally followed by a colon and an output file name or directory. \"\n    \"A directory is indicated by a trailing pathname separator. \"\n    \"Examples: \\\"xml:filename.xml\\\", \\\"xml::directoryname/\\\". \"\n    \"If a directory is specified, output files will be created \"\n    \"within that directory, with file-names based on the test \"\n    \"executable's name and, if necessary, made unique by adding \"\n    \"digits.\");\n\nGTEST_DEFINE_bool_(\n    print_time,\n    internal::BoolFromGTestEnv(\"print_time\", true),\n    \"True iff \" GTEST_NAME_\n    \" should display elapsed time in text output.\");\n\nGTEST_DEFINE_bool_(\n    print_utf8,\n    internal::BoolFromGTestEnv(\"print_utf8\", true),\n    \"True iff \" GTEST_NAME_\n    \" prints UTF8 characters as text.\");\n\nGTEST_DEFINE_int32_(\n    random_seed,\n    internal::Int32FromGTestEnv(\"random_seed\", 0),\n    \"Random number seed to use when shuffling test orders.  Must be in range \"\n    \"[1, 99999], or 0 to use a seed based on the current time.\");\n\nGTEST_DEFINE_int32_(\n    repeat,\n    internal::Int32FromGTestEnv(\"repeat\", 1),\n    \"How many times to repeat each test.  Specify a negative number \"\n    \"for repeating forever.  Useful for shaking out flaky tests.\");\n\nGTEST_DEFINE_bool_(\n    show_internal_stack_frames, false,\n    \"True iff \" GTEST_NAME_ \" should include internal stack frames when \"\n    \"printing test failure stack traces.\");\n\nGTEST_DEFINE_bool_(\n    shuffle,\n    internal::BoolFromGTestEnv(\"shuffle\", false),\n    \"True iff \" GTEST_NAME_\n    \" should randomize tests' order on every run.\");\n\nGTEST_DEFINE_int32_(\n    stack_trace_depth,\n    internal::Int32FromGTestEnv(\"stack_trace_depth\", kMaxStackTraceDepth),\n    \"The maximum number of stack frames to print when an \"\n    \"assertion fails.  The valid range is 0 through 100, inclusive.\");\n\nGTEST_DEFINE_string_(\n    stream_result_to,\n    internal::StringFromGTestEnv(\"stream_result_to\", \"\"),\n    \"This flag specifies the host name and the port number on which to stream \"\n    \"test results. Example: \\\"localhost:555\\\". The flag is effective only on \"\n    \"Linux.\");\n\nGTEST_DEFINE_bool_(\n    throw_on_failure,\n    internal::BoolFromGTestEnv(\"throw_on_failure\", false),\n    \"When this flag is specified, a failed assertion will throw an exception \"\n    \"if exceptions are enabled or exit the program with a non-zero code \"\n    \"otherwise. For use with an external test framework.\");\n\n#if GTEST_USE_OWN_FLAGFILE_FLAG_\nGTEST_DEFINE_string_(\n    flagfile,\n    internal::StringFromGTestEnv(\"flagfile\", \"\"),\n    \"This flag specifies the flagfile to read command-line flags from.\");\n#endif  // GTEST_USE_OWN_FLAGFILE_FLAG_\n\nnamespace internal {\n\n// Generates a random number from [0, range), using a Linear\n// Congruential Generator (LCG).  Crashes if 'range' is 0 or greater\n// than kMaxRange.\nUInt32 Random::Generate(UInt32 range) {\n  // These constants are the same as are used in glibc's rand(3).\n  // Use wider types than necessary to prevent unsigned overflow diagnostics.\n  state_ = static_cast<UInt32>(1103515245ULL*state_ + 12345U) % kMaxRange;\n\n  GTEST_CHECK_(range > 0)\n      << \"Cannot generate a number in the range [0, 0).\";\n  GTEST_CHECK_(range <= kMaxRange)\n      << \"Generation of a number in [0, \" << range << \") was requested, \"\n      << \"but this can only generate numbers in [0, \" << kMaxRange << \").\";\n\n  // Converting via modulus introduces a bit of downward bias, but\n  // it's simple, and a linear congruential generator isn't too good\n  // to begin with.\n  return state_ % range;\n}\n\n// GTestIsInitialized() returns true iff the user has initialized\n// Google Test.  Useful for catching the user mistake of not initializing\n// Google Test before calling RUN_ALL_TESTS().\nstatic bool GTestIsInitialized() { return GetArgvs().size() > 0; }\n\n// Iterates over a vector of TestSuites, keeping a running sum of the\n// results of calling a given int-returning method on each.\n// Returns the sum.\nstatic int SumOverTestSuiteList(const std::vector<TestSuite*>& case_list,\n                                int (TestSuite::*method)() const) {\n  int sum = 0;\n  for (size_t i = 0; i < case_list.size(); i++) {\n    sum += (case_list[i]->*method)();\n  }\n  return sum;\n}\n\n// Returns true iff the test suite passed.\nstatic bool TestSuitePassed(const TestSuite* test_suite) {\n  return test_suite->should_run() && test_suite->Passed();\n}\n\n// Returns true iff the test suite failed.\nstatic bool TestSuiteFailed(const TestSuite* test_suite) {\n  return test_suite->should_run() && test_suite->Failed();\n}\n\n// Returns true iff test_suite contains at least one test that should\n// run.\nstatic bool ShouldRunTestSuite(const TestSuite* test_suite) {\n  return test_suite->should_run();\n}\n\n// AssertHelper constructor.\nAssertHelper::AssertHelper(TestPartResult::Type type,\n                           const char* file,\n                           int line,\n                           const char* message)\n    : data_(new AssertHelperData(type, file, line, message)) {\n}\n\nAssertHelper::~AssertHelper() {\n  delete data_;\n}\n\n// Message assignment, for assertion streaming support.\nvoid AssertHelper::operator=(const Message& message) const {\n  UnitTest::GetInstance()->\n    AddTestPartResult(data_->type, data_->file, data_->line,\n                      AppendUserMessage(data_->message, message),\n                      UnitTest::GetInstance()->impl()\n                      ->CurrentOsStackTraceExceptTop(1)\n                      // Skips the stack frame for this function itself.\n                      );  // NOLINT\n}\n\n// A copy of all command line arguments.  Set by InitGoogleTest().\nstatic ::std::vector<std::string> g_argvs;\n\n::std::vector<std::string> GetArgvs() {\n#if defined(GTEST_CUSTOM_GET_ARGVS_)\n  // GTEST_CUSTOM_GET_ARGVS_() may return a container of std::string or\n  // ::string. This code converts it to the appropriate type.\n  const auto& custom = GTEST_CUSTOM_GET_ARGVS_();\n  return ::std::vector<std::string>(custom.begin(), custom.end());\n#else   // defined(GTEST_CUSTOM_GET_ARGVS_)\n  return g_argvs;\n#endif  // defined(GTEST_CUSTOM_GET_ARGVS_)\n}\n\n// Returns the current application's name, removing directory path if that\n// is present.\nFilePath GetCurrentExecutableName() {\n  FilePath result;\n\n#if GTEST_OS_WINDOWS || GTEST_OS_OS2\n  result.Set(FilePath(GetArgvs()[0]).RemoveExtension(\"exe\"));\n#else\n  result.Set(FilePath(GetArgvs()[0]));\n#endif  // GTEST_OS_WINDOWS\n\n  return result.RemoveDirectoryName();\n}\n\n// Functions for processing the gtest_output flag.\n\n// Returns the output format, or \"\" for normal printed output.\nstd::string UnitTestOptions::GetOutputFormat() {\n  const char* const gtest_output_flag = GTEST_FLAG(output).c_str();\n  const char* const colon = strchr(gtest_output_flag, ':');\n  return (colon == nullptr)\n             ? std::string(gtest_output_flag)\n             : std::string(gtest_output_flag, colon - gtest_output_flag);\n}\n\n// Returns the name of the requested output file, or the default if none\n// was explicitly specified.\nstd::string UnitTestOptions::GetAbsolutePathToOutputFile() {\n  const char* const gtest_output_flag = GTEST_FLAG(output).c_str();\n\n  std::string format = GetOutputFormat();\n  if (format.empty())\n    format = std::string(kDefaultOutputFormat);\n\n  const char* const colon = strchr(gtest_output_flag, ':');\n  if (colon == nullptr)\n    return internal::FilePath::MakeFileName(\n        internal::FilePath(\n            UnitTest::GetInstance()->original_working_dir()),\n        internal::FilePath(kDefaultOutputFile), 0,\n        format.c_str()).string();\n\n  internal::FilePath output_name(colon + 1);\n  if (!output_name.IsAbsolutePath())\n    output_name = internal::FilePath::ConcatPaths(\n        internal::FilePath(UnitTest::GetInstance()->original_working_dir()),\n        internal::FilePath(colon + 1));\n\n  if (!output_name.IsDirectory())\n    return output_name.string();\n\n  internal::FilePath result(internal::FilePath::GenerateUniqueFileName(\n      output_name, internal::GetCurrentExecutableName(),\n      GetOutputFormat().c_str()));\n  return result.string();\n}\n\n// Returns true iff the wildcard pattern matches the string.  The\n// first ':' or '\\0' character in pattern marks the end of it.\n//\n// This recursive algorithm isn't very efficient, but is clear and\n// works well enough for matching test names, which are short.\nbool UnitTestOptions::PatternMatchesString(const char *pattern,\n                                           const char *str) {\n  switch (*pattern) {\n    case '\\0':\n    case ':':  // Either ':' or '\\0' marks the end of the pattern.\n      return *str == '\\0';\n    case '?':  // Matches any single character.\n      return *str != '\\0' && PatternMatchesString(pattern + 1, str + 1);\n    case '*':  // Matches any string (possibly empty) of characters.\n      return (*str != '\\0' && PatternMatchesString(pattern, str + 1)) ||\n          PatternMatchesString(pattern + 1, str);\n    default:  // Non-special character.  Matches itself.\n      return *pattern == *str &&\n          PatternMatchesString(pattern + 1, str + 1);\n  }\n}\n\nbool UnitTestOptions::MatchesFilter(\n    const std::string& name, const char* filter) {\n  const char *cur_pattern = filter;\n  for (;;) {\n    if (PatternMatchesString(cur_pattern, name.c_str())) {\n      return true;\n    }\n\n    // Finds the next pattern in the filter.\n    cur_pattern = strchr(cur_pattern, ':');\n\n    // Returns if no more pattern can be found.\n    if (cur_pattern == nullptr) {\n      return false;\n    }\n\n    // Skips the pattern separater (the ':' character).\n    cur_pattern++;\n  }\n}\n\n// Returns true iff the user-specified filter matches the test suite\n// name and the test name.\nbool UnitTestOptions::FilterMatchesTest(const std::string& test_suite_name,\n                                        const std::string& test_name) {\n  const std::string& full_name = test_suite_name + \".\" + test_name.c_str();\n\n  // Split --gtest_filter at '-', if there is one, to separate into\n  // positive filter and negative filter portions\n  const char* const p = GTEST_FLAG(filter).c_str();\n  const char* const dash = strchr(p, '-');\n  std::string positive;\n  std::string negative;\n  if (dash == nullptr) {\n    positive = GTEST_FLAG(filter).c_str();  // Whole string is a positive filter\n    negative = \"\";\n  } else {\n    positive = std::string(p, dash);   // Everything up to the dash\n    negative = std::string(dash + 1);  // Everything after the dash\n    if (positive.empty()) {\n      // Treat '-test1' as the same as '*-test1'\n      positive = kUniversalFilter;\n    }\n  }\n\n  // A filter is a colon-separated list of patterns.  It matches a\n  // test if any pattern in it matches the test.\n  return (MatchesFilter(full_name, positive.c_str()) &&\n          !MatchesFilter(full_name, negative.c_str()));\n}\n\n#if GTEST_HAS_SEH\n// Returns EXCEPTION_EXECUTE_HANDLER if Google Test should handle the\n// given SEH exception, or EXCEPTION_CONTINUE_SEARCH otherwise.\n// This function is useful as an __except condition.\nint UnitTestOptions::GTestShouldProcessSEH(DWORD exception_code) {\n  // Google Test should handle a SEH exception if:\n  //   1. the user wants it to, AND\n  //   2. this is not a breakpoint exception, AND\n  //   3. this is not a C++ exception (VC++ implements them via SEH,\n  //      apparently).\n  //\n  // SEH exception code for C++ exceptions.\n  // (see http://support.microsoft.com/kb/185294 for more information).\n  const DWORD kCxxExceptionCode = 0xe06d7363;\n\n  bool should_handle = true;\n\n  if (!GTEST_FLAG(catch_exceptions))\n    should_handle = false;\n  else if (exception_code == EXCEPTION_BREAKPOINT)\n    should_handle = false;\n  else if (exception_code == kCxxExceptionCode)\n    should_handle = false;\n\n  return should_handle ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH;\n}\n#endif  // GTEST_HAS_SEH\n\n}  // namespace internal\n\n// The c'tor sets this object as the test part result reporter used by\n// Google Test.  The 'result' parameter specifies where to report the\n// results. Intercepts only failures from the current thread.\nScopedFakeTestPartResultReporter::ScopedFakeTestPartResultReporter(\n    TestPartResultArray* result)\n    : intercept_mode_(INTERCEPT_ONLY_CURRENT_THREAD),\n      result_(result) {\n  Init();\n}\n\n// The c'tor sets this object as the test part result reporter used by\n// Google Test.  The 'result' parameter specifies where to report the\n// results.\nScopedFakeTestPartResultReporter::ScopedFakeTestPartResultReporter(\n    InterceptMode intercept_mode, TestPartResultArray* result)\n    : intercept_mode_(intercept_mode),\n      result_(result) {\n  Init();\n}\n\nvoid ScopedFakeTestPartResultReporter::Init() {\n  internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();\n  if (intercept_mode_ == INTERCEPT_ALL_THREADS) {\n    old_reporter_ = impl->GetGlobalTestPartResultReporter();\n    impl->SetGlobalTestPartResultReporter(this);\n  } else {\n    old_reporter_ = impl->GetTestPartResultReporterForCurrentThread();\n    impl->SetTestPartResultReporterForCurrentThread(this);\n  }\n}\n\n// The d'tor restores the test part result reporter used by Google Test\n// before.\nScopedFakeTestPartResultReporter::~ScopedFakeTestPartResultReporter() {\n  internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();\n  if (intercept_mode_ == INTERCEPT_ALL_THREADS) {\n    impl->SetGlobalTestPartResultReporter(old_reporter_);\n  } else {\n    impl->SetTestPartResultReporterForCurrentThread(old_reporter_);\n  }\n}\n\n// Increments the test part result count and remembers the result.\n// This method is from the TestPartResultReporterInterface interface.\nvoid ScopedFakeTestPartResultReporter::ReportTestPartResult(\n    const TestPartResult& result) {\n  result_->Append(result);\n}\n\nnamespace internal {\n\n// Returns the type ID of ::testing::Test.  We should always call this\n// instead of GetTypeId< ::testing::Test>() to get the type ID of\n// testing::Test.  This is to work around a suspected linker bug when\n// using Google Test as a framework on Mac OS X.  The bug causes\n// GetTypeId< ::testing::Test>() to return different values depending\n// on whether the call is from the Google Test framework itself or\n// from user test code.  GetTestTypeId() is guaranteed to always\n// return the same value, as it always calls GetTypeId<>() from the\n// gtest.cc, which is within the Google Test framework.\nTypeId GetTestTypeId() {\n  return GetTypeId<Test>();\n}\n\n// The value of GetTestTypeId() as seen from within the Google Test\n// library.  This is solely for testing GetTestTypeId().\nextern const TypeId kTestTypeIdInGoogleTest = GetTestTypeId();\n\n// This predicate-formatter checks that 'results' contains a test part\n// failure of the given type and that the failure message contains the\n// given substring.\nstatic AssertionResult HasOneFailure(const char* /* results_expr */,\n                                     const char* /* type_expr */,\n                                     const char* /* substr_expr */,\n                                     const TestPartResultArray& results,\n                                     TestPartResult::Type type,\n                                     const std::string& substr) {\n  const std::string expected(type == TestPartResult::kFatalFailure ?\n                        \"1 fatal failure\" :\n                        \"1 non-fatal failure\");\n  Message msg;\n  if (results.size() != 1) {\n    msg << \"Expected: \" << expected << \"\\n\"\n        << \"  Actual: \" << results.size() << \" failures\";\n    for (int i = 0; i < results.size(); i++) {\n      msg << \"\\n\" << results.GetTestPartResult(i);\n    }\n    return AssertionFailure() << msg;\n  }\n\n  const TestPartResult& r = results.GetTestPartResult(0);\n  if (r.type() != type) {\n    return AssertionFailure() << \"Expected: \" << expected << \"\\n\"\n                              << \"  Actual:\\n\"\n                              << r;\n  }\n\n  if (strstr(r.message(), substr.c_str()) == nullptr) {\n    return AssertionFailure() << \"Expected: \" << expected << \" containing \\\"\"\n                              << substr << \"\\\"\\n\"\n                              << \"  Actual:\\n\"\n                              << r;\n  }\n\n  return AssertionSuccess();\n}\n\n// The constructor of SingleFailureChecker remembers where to look up\n// test part results, what type of failure we expect, and what\n// substring the failure message should contain.\nSingleFailureChecker::SingleFailureChecker(const TestPartResultArray* results,\n                                           TestPartResult::Type type,\n                                           const std::string& substr)\n    : results_(results), type_(type), substr_(substr) {}\n\n// The destructor of SingleFailureChecker verifies that the given\n// TestPartResultArray contains exactly one failure that has the given\n// type and contains the given substring.  If that's not the case, a\n// non-fatal failure will be generated.\nSingleFailureChecker::~SingleFailureChecker() {\n  EXPECT_PRED_FORMAT3(HasOneFailure, *results_, type_, substr_);\n}\n\nDefaultGlobalTestPartResultReporter::DefaultGlobalTestPartResultReporter(\n    UnitTestImpl* unit_test) : unit_test_(unit_test) {}\n\nvoid DefaultGlobalTestPartResultReporter::ReportTestPartResult(\n    const TestPartResult& result) {\n  unit_test_->current_test_result()->AddTestPartResult(result);\n  unit_test_->listeners()->repeater()->OnTestPartResult(result);\n}\n\nDefaultPerThreadTestPartResultReporter::DefaultPerThreadTestPartResultReporter(\n    UnitTestImpl* unit_test) : unit_test_(unit_test) {}\n\nvoid DefaultPerThreadTestPartResultReporter::ReportTestPartResult(\n    const TestPartResult& result) {\n  unit_test_->GetGlobalTestPartResultReporter()->ReportTestPartResult(result);\n}\n\n// Returns the global test part result reporter.\nTestPartResultReporterInterface*\nUnitTestImpl::GetGlobalTestPartResultReporter() {\n  internal::MutexLock lock(&global_test_part_result_reporter_mutex_);\n  return global_test_part_result_repoter_;\n}\n\n// Sets the global test part result reporter.\nvoid UnitTestImpl::SetGlobalTestPartResultReporter(\n    TestPartResultReporterInterface* reporter) {\n  internal::MutexLock lock(&global_test_part_result_reporter_mutex_);\n  global_test_part_result_repoter_ = reporter;\n}\n\n// Returns the test part result reporter for the current thread.\nTestPartResultReporterInterface*\nUnitTestImpl::GetTestPartResultReporterForCurrentThread() {\n  return per_thread_test_part_result_reporter_.get();\n}\n\n// Sets the test part result reporter for the current thread.\nvoid UnitTestImpl::SetTestPartResultReporterForCurrentThread(\n    TestPartResultReporterInterface* reporter) {\n  per_thread_test_part_result_reporter_.set(reporter);\n}\n\n// Gets the number of successful test suites.\nint UnitTestImpl::successful_test_suite_count() const {\n  return CountIf(test_suites_, TestSuitePassed);\n}\n\n// Gets the number of failed test suites.\nint UnitTestImpl::failed_test_suite_count() const {\n  return CountIf(test_suites_, TestSuiteFailed);\n}\n\n// Gets the number of all test suites.\nint UnitTestImpl::total_test_suite_count() const {\n  return static_cast<int>(test_suites_.size());\n}\n\n// Gets the number of all test suites that contain at least one test\n// that should run.\nint UnitTestImpl::test_suite_to_run_count() const {\n  return CountIf(test_suites_, ShouldRunTestSuite);\n}\n\n// Gets the number of successful tests.\nint UnitTestImpl::successful_test_count() const {\n  return SumOverTestSuiteList(test_suites_, &TestSuite::successful_test_count);\n}\n\n// Gets the number of skipped tests.\nint UnitTestImpl::skipped_test_count() const {\n  return SumOverTestSuiteList(test_suites_, &TestSuite::skipped_test_count);\n}\n\n// Gets the number of failed tests.\nint UnitTestImpl::failed_test_count() const {\n  return SumOverTestSuiteList(test_suites_, &TestSuite::failed_test_count);\n}\n\n// Gets the number of disabled tests that will be reported in the XML report.\nint UnitTestImpl::reportable_disabled_test_count() const {\n  return SumOverTestSuiteList(test_suites_,\n                              &TestSuite::reportable_disabled_test_count);\n}\n\n// Gets the number of disabled tests.\nint UnitTestImpl::disabled_test_count() const {\n  return SumOverTestSuiteList(test_suites_, &TestSuite::disabled_test_count);\n}\n\n// Gets the number of tests to be printed in the XML report.\nint UnitTestImpl::reportable_test_count() const {\n  return SumOverTestSuiteList(test_suites_, &TestSuite::reportable_test_count);\n}\n\n// Gets the number of all tests.\nint UnitTestImpl::total_test_count() const {\n  return SumOverTestSuiteList(test_suites_, &TestSuite::total_test_count);\n}\n\n// Gets the number of tests that should run.\nint UnitTestImpl::test_to_run_count() const {\n  return SumOverTestSuiteList(test_suites_, &TestSuite::test_to_run_count);\n}\n\n// Returns the current OS stack trace as an std::string.\n//\n// The maximum number of stack frames to be included is specified by\n// the gtest_stack_trace_depth flag.  The skip_count parameter\n// specifies the number of top frames to be skipped, which doesn't\n// count against the number of frames to be included.\n//\n// For example, if Foo() calls Bar(), which in turn calls\n// CurrentOsStackTraceExceptTop(1), Foo() will be included in the\n// trace but Bar() and CurrentOsStackTraceExceptTop() won't.\nstd::string UnitTestImpl::CurrentOsStackTraceExceptTop(int skip_count) {\n  return os_stack_trace_getter()->CurrentStackTrace(\n      static_cast<int>(GTEST_FLAG(stack_trace_depth)),\n      skip_count + 1\n      // Skips the user-specified number of frames plus this function\n      // itself.\n      );  // NOLINT\n}\n\n// Returns the current time in milliseconds.\nTimeInMillis GetTimeInMillis() {\n#if GTEST_OS_WINDOWS_MOBILE || defined(__BORLANDC__)\n  // Difference between 1970-01-01 and 1601-01-01 in milliseconds.\n  // http://analogous.blogspot.com/2005/04/epoch.html\n  const TimeInMillis kJavaEpochToWinFileTimeDelta =\n    static_cast<TimeInMillis>(116444736UL) * 100000UL;\n  const DWORD kTenthMicrosInMilliSecond = 10000;\n\n  SYSTEMTIME now_systime;\n  FILETIME now_filetime;\n  ULARGE_INTEGER now_int64;\n  GetSystemTime(&now_systime);\n  if (SystemTimeToFileTime(&now_systime, &now_filetime)) {\n    now_int64.LowPart = now_filetime.dwLowDateTime;\n    now_int64.HighPart = now_filetime.dwHighDateTime;\n    now_int64.QuadPart = (now_int64.QuadPart / kTenthMicrosInMilliSecond) -\n      kJavaEpochToWinFileTimeDelta;\n    return now_int64.QuadPart;\n  }\n  return 0;\n#elif GTEST_OS_WINDOWS && !GTEST_HAS_GETTIMEOFDAY_\n  __timeb64 now;\n\n  // MSVC 8 deprecates _ftime64(), so we want to suppress warning 4996\n  // (deprecated function) there.\n  GTEST_DISABLE_MSC_DEPRECATED_PUSH_()\n  _ftime64(&now);\n  GTEST_DISABLE_MSC_DEPRECATED_POP_()\n\n  return static_cast<TimeInMillis>(now.time) * 1000 + now.millitm;\n#elif GTEST_HAS_GETTIMEOFDAY_\n  struct timeval now;\n  gettimeofday(&now, nullptr);\n  return static_cast<TimeInMillis>(now.tv_sec) * 1000 + now.tv_usec / 1000;\n#else\n# error \"Don't know how to get the current time on your system.\"\n#endif\n}\n\n// Utilities\n\n// class String.\n\n#if GTEST_OS_WINDOWS_MOBILE\n// Creates a UTF-16 wide string from the given ANSI string, allocating\n// memory using new. The caller is responsible for deleting the return\n// value using delete[]. Returns the wide string, or NULL if the\n// input is NULL.\nLPCWSTR String::AnsiToUtf16(const char* ansi) {\n  if (!ansi) return nullptr;\n  const int length = strlen(ansi);\n  const int unicode_length =\n      MultiByteToWideChar(CP_ACP, 0, ansi, length, nullptr, 0);\n  WCHAR* unicode = new WCHAR[unicode_length + 1];\n  MultiByteToWideChar(CP_ACP, 0, ansi, length,\n                      unicode, unicode_length);\n  unicode[unicode_length] = 0;\n  return unicode;\n}\n\n// Creates an ANSI string from the given wide string, allocating\n// memory using new. The caller is responsible for deleting the return\n// value using delete[]. Returns the ANSI string, or NULL if the\n// input is NULL.\nconst char* String::Utf16ToAnsi(LPCWSTR utf16_str)  {\n  if (!utf16_str) return nullptr;\n  const int ansi_length = WideCharToMultiByte(CP_ACP, 0, utf16_str, -1, nullptr,\n                                              0, nullptr, nullptr);\n  char* ansi = new char[ansi_length + 1];\n  WideCharToMultiByte(CP_ACP, 0, utf16_str, -1, ansi, ansi_length, nullptr,\n                      nullptr);\n  ansi[ansi_length] = 0;\n  return ansi;\n}\n\n#endif  // GTEST_OS_WINDOWS_MOBILE\n\n// Compares two C strings.  Returns true iff they have the same content.\n//\n// Unlike strcmp(), this function can handle NULL argument(s).  A NULL\n// C string is considered different to any non-NULL C string,\n// including the empty string.\nbool String::CStringEquals(const char * lhs, const char * rhs) {\n  if (lhs == nullptr) return rhs == nullptr;\n\n  if (rhs == nullptr) return false;\n\n  return strcmp(lhs, rhs) == 0;\n}\n\n#if GTEST_HAS_STD_WSTRING || GTEST_HAS_GLOBAL_WSTRING\n\n// Converts an array of wide chars to a narrow string using the UTF-8\n// encoding, and streams the result to the given Message object.\nstatic void StreamWideCharsToMessage(const wchar_t* wstr, size_t length,\n                                     Message* msg) {\n  for (size_t i = 0; i != length; ) {  // NOLINT\n    if (wstr[i] != L'\\0') {\n      *msg << WideStringToUtf8(wstr + i, static_cast<int>(length - i));\n      while (i != length && wstr[i] != L'\\0')\n        i++;\n    } else {\n      *msg << '\\0';\n      i++;\n    }\n  }\n}\n\n#endif  // GTEST_HAS_STD_WSTRING || GTEST_HAS_GLOBAL_WSTRING\n\nvoid SplitString(const ::std::string& str, char delimiter,\n                 ::std::vector< ::std::string>* dest) {\n  ::std::vector< ::std::string> parsed;\n  ::std::string::size_type pos = 0;\n  while (::testing::internal::AlwaysTrue()) {\n    const ::std::string::size_type colon = str.find(delimiter, pos);\n    if (colon == ::std::string::npos) {\n      parsed.push_back(str.substr(pos));\n      break;\n    } else {\n      parsed.push_back(str.substr(pos, colon - pos));\n      pos = colon + 1;\n    }\n  }\n  dest->swap(parsed);\n}\n\n}  // namespace internal\n\n// Constructs an empty Message.\n// We allocate the stringstream separately because otherwise each use of\n// ASSERT/EXPECT in a procedure adds over 200 bytes to the procedure's\n// stack frame leading to huge stack frames in some cases; gcc does not reuse\n// the stack space.\nMessage::Message() : ss_(new ::std::stringstream) {\n  // By default, we want there to be enough precision when printing\n  // a double to a Message.\n  *ss_ << std::setprecision(std::numeric_limits<double>::digits10 + 2);\n}\n\n// These two overloads allow streaming a wide C string to a Message\n// using the UTF-8 encoding.\nMessage& Message::operator <<(const wchar_t* wide_c_str) {\n  return *this << internal::String::ShowWideCString(wide_c_str);\n}\nMessage& Message::operator <<(wchar_t* wide_c_str) {\n  return *this << internal::String::ShowWideCString(wide_c_str);\n}\n\n#if GTEST_HAS_STD_WSTRING\n// Converts the given wide string to a narrow string using the UTF-8\n// encoding, and streams the result to this Message object.\nMessage& Message::operator <<(const ::std::wstring& wstr) {\n  internal::StreamWideCharsToMessage(wstr.c_str(), wstr.length(), this);\n  return *this;\n}\n#endif  // GTEST_HAS_STD_WSTRING\n\n#if GTEST_HAS_GLOBAL_WSTRING\n// Converts the given wide string to a narrow string using the UTF-8\n// encoding, and streams the result to this Message object.\nMessage& Message::operator <<(const ::wstring& wstr) {\n  internal::StreamWideCharsToMessage(wstr.c_str(), wstr.length(), this);\n  return *this;\n}\n#endif  // GTEST_HAS_GLOBAL_WSTRING\n\n// Gets the text streamed to this object so far as an std::string.\n// Each '\\0' character in the buffer is replaced with \"\\\\0\".\nstd::string Message::GetString() const {\n  return internal::StringStreamToString(ss_.get());\n}\n\n// AssertionResult constructors.\n// Used in EXPECT_TRUE/FALSE(assertion_result).\nAssertionResult::AssertionResult(const AssertionResult& other)\n    : success_(other.success_),\n      message_(other.message_.get() != nullptr\n                   ? new ::std::string(*other.message_)\n                   : static_cast< ::std::string*>(nullptr)) {}\n\n// Swaps two AssertionResults.\nvoid AssertionResult::swap(AssertionResult& other) {\n  using std::swap;\n  swap(success_, other.success_);\n  swap(message_, other.message_);\n}\n\n// Returns the assertion's negation. Used with EXPECT/ASSERT_FALSE.\nAssertionResult AssertionResult::operator!() const {\n  AssertionResult negation(!success_);\n  if (message_.get() != nullptr) negation << *message_;\n  return negation;\n}\n\n// Makes a successful assertion result.\nAssertionResult AssertionSuccess() {\n  return AssertionResult(true);\n}\n\n// Makes a failed assertion result.\nAssertionResult AssertionFailure() {\n  return AssertionResult(false);\n}\n\n// Makes a failed assertion result with the given failure message.\n// Deprecated; use AssertionFailure() << message.\nAssertionResult AssertionFailure(const Message& message) {\n  return AssertionFailure() << message;\n}\n\nnamespace internal {\n\nnamespace edit_distance {\nstd::vector<EditType> CalculateOptimalEdits(const std::vector<size_t>& left,\n                                            const std::vector<size_t>& right) {\n  std::vector<std::vector<double> > costs(\n      left.size() + 1, std::vector<double>(right.size() + 1));\n  std::vector<std::vector<EditType> > best_move(\n      left.size() + 1, std::vector<EditType>(right.size() + 1));\n\n  // Populate for empty right.\n  for (size_t l_i = 0; l_i < costs.size(); ++l_i) {\n    costs[l_i][0] = static_cast<double>(l_i);\n    best_move[l_i][0] = kRemove;\n  }\n  // Populate for empty left.\n  for (size_t r_i = 1; r_i < costs[0].size(); ++r_i) {\n    costs[0][r_i] = static_cast<double>(r_i);\n    best_move[0][r_i] = kAdd;\n  }\n\n  for (size_t l_i = 0; l_i < left.size(); ++l_i) {\n    for (size_t r_i = 0; r_i < right.size(); ++r_i) {\n      if (left[l_i] == right[r_i]) {\n        // Found a match. Consume it.\n        costs[l_i + 1][r_i + 1] = costs[l_i][r_i];\n        best_move[l_i + 1][r_i + 1] = kMatch;\n        continue;\n      }\n\n      const double add = costs[l_i + 1][r_i];\n      const double remove = costs[l_i][r_i + 1];\n      const double replace = costs[l_i][r_i];\n      if (add < remove && add < replace) {\n        costs[l_i + 1][r_i + 1] = add + 1;\n        best_move[l_i + 1][r_i + 1] = kAdd;\n      } else if (remove < add && remove < replace) {\n        costs[l_i + 1][r_i + 1] = remove + 1;\n        best_move[l_i + 1][r_i + 1] = kRemove;\n      } else {\n        // We make replace a little more expensive than add/remove to lower\n        // their priority.\n        costs[l_i + 1][r_i + 1] = replace + 1.00001;\n        best_move[l_i + 1][r_i + 1] = kReplace;\n      }\n    }\n  }\n\n  // Reconstruct the best path. We do it in reverse order.\n  std::vector<EditType> best_path;\n  for (size_t l_i = left.size(), r_i = right.size(); l_i > 0 || r_i > 0;) {\n    EditType move = best_move[l_i][r_i];\n    best_path.push_back(move);\n    l_i -= move != kAdd;\n    r_i -= move != kRemove;\n  }\n  std::reverse(best_path.begin(), best_path.end());\n  return best_path;\n}\n\nnamespace {\n\n// Helper class to convert string into ids with deduplication.\nclass InternalStrings {\n public:\n  size_t GetId(const std::string& str) {\n    IdMap::iterator it = ids_.find(str);\n    if (it != ids_.end()) return it->second;\n    size_t id = ids_.size();\n    return ids_[str] = id;\n  }\n\n private:\n  typedef std::map<std::string, size_t> IdMap;\n  IdMap ids_;\n};\n\n}  // namespace\n\nstd::vector<EditType> CalculateOptimalEdits(\n    const std::vector<std::string>& left,\n    const std::vector<std::string>& right) {\n  std::vector<size_t> left_ids, right_ids;\n  {\n    InternalStrings intern_table;\n    for (size_t i = 0; i < left.size(); ++i) {\n      left_ids.push_back(intern_table.GetId(left[i]));\n    }\n    for (size_t i = 0; i < right.size(); ++i) {\n      right_ids.push_back(intern_table.GetId(right[i]));\n    }\n  }\n  return CalculateOptimalEdits(left_ids, right_ids);\n}\n\nnamespace {\n\n// Helper class that holds the state for one hunk and prints it out to the\n// stream.\n// It reorders adds/removes when possible to group all removes before all\n// adds. It also adds the hunk header before printint into the stream.\nclass Hunk {\n public:\n  Hunk(size_t left_start, size_t right_start)\n      : left_start_(left_start),\n        right_start_(right_start),\n        adds_(),\n        removes_(),\n        common_() {}\n\n  void PushLine(char edit, const char* line) {\n    switch (edit) {\n      case ' ':\n        ++common_;\n        FlushEdits();\n        hunk_.push_back(std::make_pair(' ', line));\n        break;\n      case '-':\n        ++removes_;\n        hunk_removes_.push_back(std::make_pair('-', line));\n        break;\n      case '+':\n        ++adds_;\n        hunk_adds_.push_back(std::make_pair('+', line));\n        break;\n    }\n  }\n\n  void PrintTo(std::ostream* os) {\n    PrintHeader(os);\n    FlushEdits();\n    for (std::list<std::pair<char, const char*> >::const_iterator it =\n             hunk_.begin();\n         it != hunk_.end(); ++it) {\n      *os << it->first << it->second << \"\\n\";\n    }\n  }\n\n  bool has_edits() const { return adds_ || removes_; }\n\n private:\n  void FlushEdits() {\n    hunk_.splice(hunk_.end(), hunk_removes_);\n    hunk_.splice(hunk_.end(), hunk_adds_);\n  }\n\n  // Print a unified diff header for one hunk.\n  // The format is\n  //   \"@@ -<left_start>,<left_length> +<right_start>,<right_length> @@\"\n  // where the left/right parts are omitted if unnecessary.\n  void PrintHeader(std::ostream* ss) const {\n    *ss << \"@@ \";\n    if (removes_) {\n      *ss << \"-\" << left_start_ << \",\" << (removes_ + common_);\n    }\n    if (removes_ && adds_) {\n      *ss << \" \";\n    }\n    if (adds_) {\n      *ss << \"+\" << right_start_ << \",\" << (adds_ + common_);\n    }\n    *ss << \" @@\\n\";\n  }\n\n  size_t left_start_, right_start_;\n  size_t adds_, removes_, common_;\n  std::list<std::pair<char, const char*> > hunk_, hunk_adds_, hunk_removes_;\n};\n\n}  // namespace\n\n// Create a list of diff hunks in Unified diff format.\n// Each hunk has a header generated by PrintHeader above plus a body with\n// lines prefixed with ' ' for no change, '-' for deletion and '+' for\n// addition.\n// 'context' represents the desired unchanged prefix/suffix around the diff.\n// If two hunks are close enough that their contexts overlap, then they are\n// joined into one hunk.\nstd::string CreateUnifiedDiff(const std::vector<std::string>& left,\n                              const std::vector<std::string>& right,\n                              size_t context) {\n  const std::vector<EditType> edits = CalculateOptimalEdits(left, right);\n\n  size_t l_i = 0, r_i = 0, edit_i = 0;\n  std::stringstream ss;\n  while (edit_i < edits.size()) {\n    // Find first edit.\n    while (edit_i < edits.size() && edits[edit_i] == kMatch) {\n      ++l_i;\n      ++r_i;\n      ++edit_i;\n    }\n\n    // Find the first line to include in the hunk.\n    const size_t prefix_context = std::min(l_i, context);\n    Hunk hunk(l_i - prefix_context + 1, r_i - prefix_context + 1);\n    for (size_t i = prefix_context; i > 0; --i) {\n      hunk.PushLine(' ', left[l_i - i].c_str());\n    }\n\n    // Iterate the edits until we found enough suffix for the hunk or the input\n    // is over.\n    size_t n_suffix = 0;\n    for (; edit_i < edits.size(); ++edit_i) {\n      if (n_suffix >= context) {\n        // Continue only if the next hunk is very close.\n        std::vector<EditType>::const_iterator it = edits.begin() + edit_i;\n        while (it != edits.end() && *it == kMatch) ++it;\n        if (it == edits.end() || (it - edits.begin()) - edit_i >= context) {\n          // There is no next edit or it is too far away.\n          break;\n        }\n      }\n\n      EditType edit = edits[edit_i];\n      // Reset count when a non match is found.\n      n_suffix = edit == kMatch ? n_suffix + 1 : 0;\n\n      if (edit == kMatch || edit == kRemove || edit == kReplace) {\n        hunk.PushLine(edit == kMatch ? ' ' : '-', left[l_i].c_str());\n      }\n      if (edit == kAdd || edit == kReplace) {\n        hunk.PushLine('+', right[r_i].c_str());\n      }\n\n      // Advance indices, depending on edit type.\n      l_i += edit != kAdd;\n      r_i += edit != kRemove;\n    }\n\n    if (!hunk.has_edits()) {\n      // We are done. We don't want this hunk.\n      break;\n    }\n\n    hunk.PrintTo(&ss);\n  }\n  return ss.str();\n}\n\n}  // namespace edit_distance\n\nnamespace {\n\n// The string representation of the values received in EqFailure() are already\n// escaped. Split them on escaped '\\n' boundaries. Leave all other escaped\n// characters the same.\nstd::vector<std::string> SplitEscapedString(const std::string& str) {\n  std::vector<std::string> lines;\n  size_t start = 0, end = str.size();\n  if (end > 2 && str[0] == '\"' && str[end - 1] == '\"') {\n    ++start;\n    --end;\n  }\n  bool escaped = false;\n  for (size_t i = start; i + 1 < end; ++i) {\n    if (escaped) {\n      escaped = false;\n      if (str[i] == 'n') {\n        lines.push_back(str.substr(start, i - start - 1));\n        start = i + 1;\n      }\n    } else {\n      escaped = str[i] == '\\\\';\n    }\n  }\n  lines.push_back(str.substr(start, end - start));\n  return lines;\n}\n\n}  // namespace\n\n// Constructs and returns the message for an equality assertion\n// (e.g. ASSERT_EQ, EXPECT_STREQ, etc) failure.\n//\n// The first four parameters are the expressions used in the assertion\n// and their values, as strings.  For example, for ASSERT_EQ(foo, bar)\n// where foo is 5 and bar is 6, we have:\n//\n//   lhs_expression: \"foo\"\n//   rhs_expression: \"bar\"\n//   lhs_value:      \"5\"\n//   rhs_value:      \"6\"\n//\n// The ignoring_case parameter is true iff the assertion is a\n// *_STRCASEEQ*.  When it's true, the string \"Ignoring case\" will\n// be inserted into the message.\nAssertionResult EqFailure(const char* lhs_expression,\n                          const char* rhs_expression,\n                          const std::string& lhs_value,\n                          const std::string& rhs_value,\n                          bool ignoring_case) {\n  Message msg;\n  msg << \"Expected equality of these values:\";\n  msg << \"\\n  \" << lhs_expression;\n  if (lhs_value != lhs_expression) {\n    msg << \"\\n    Which is: \" << lhs_value;\n  }\n  msg << \"\\n  \" << rhs_expression;\n  if (rhs_value != rhs_expression) {\n    msg << \"\\n    Which is: \" << rhs_value;\n  }\n\n  if (ignoring_case) {\n    msg << \"\\nIgnoring case\";\n  }\n\n  if (!lhs_value.empty() && !rhs_value.empty()) {\n    const std::vector<std::string> lhs_lines =\n        SplitEscapedString(lhs_value);\n    const std::vector<std::string> rhs_lines =\n        SplitEscapedString(rhs_value);\n    if (lhs_lines.size() > 1 || rhs_lines.size() > 1) {\n      msg << \"\\nWith diff:\\n\"\n          << edit_distance::CreateUnifiedDiff(lhs_lines, rhs_lines);\n    }\n  }\n\n  return AssertionFailure() << msg;\n}\n\n// Constructs a failure message for Boolean assertions such as EXPECT_TRUE.\nstd::string GetBoolAssertionFailureMessage(\n    const AssertionResult& assertion_result,\n    const char* expression_text,\n    const char* actual_predicate_value,\n    const char* expected_predicate_value) {\n  const char* actual_message = assertion_result.message();\n  Message msg;\n  msg << \"Value of: \" << expression_text\n      << \"\\n  Actual: \" << actual_predicate_value;\n  if (actual_message[0] != '\\0')\n    msg << \" (\" << actual_message << \")\";\n  msg << \"\\nExpected: \" << expected_predicate_value;\n  return msg.GetString();\n}\n\n// Helper function for implementing ASSERT_NEAR.\nAssertionResult DoubleNearPredFormat(const char* expr1,\n                                     const char* expr2,\n                                     const char* abs_error_expr,\n                                     double val1,\n                                     double val2,\n                                     double abs_error) {\n  const double diff = fabs(val1 - val2);\n  if (diff <= abs_error) return AssertionSuccess();\n\n  return AssertionFailure()\n      << \"The difference between \" << expr1 << \" and \" << expr2\n      << \" is \" << diff << \", which exceeds \" << abs_error_expr << \", where\\n\"\n      << expr1 << \" evaluates to \" << val1 << \",\\n\"\n      << expr2 << \" evaluates to \" << val2 << \", and\\n\"\n      << abs_error_expr << \" evaluates to \" << abs_error << \".\";\n}\n\n\n// Helper template for implementing FloatLE() and DoubleLE().\ntemplate <typename RawType>\nAssertionResult FloatingPointLE(const char* expr1,\n                                const char* expr2,\n                                RawType val1,\n                                RawType val2) {\n  // Returns success if val1 is less than val2,\n  if (val1 < val2) {\n    return AssertionSuccess();\n  }\n\n  // or if val1 is almost equal to val2.\n  const FloatingPoint<RawType> lhs(val1), rhs(val2);\n  if (lhs.AlmostEquals(rhs)) {\n    return AssertionSuccess();\n  }\n\n  // Note that the above two checks will both fail if either val1 or\n  // val2 is NaN, as the IEEE floating-point standard requires that\n  // any predicate involving a NaN must return false.\n\n  ::std::stringstream val1_ss;\n  val1_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2)\n          << val1;\n\n  ::std::stringstream val2_ss;\n  val2_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2)\n          << val2;\n\n  return AssertionFailure()\n      << \"Expected: (\" << expr1 << \") <= (\" << expr2 << \")\\n\"\n      << \"  Actual: \" << StringStreamToString(&val1_ss) << \" vs \"\n      << StringStreamToString(&val2_ss);\n}\n\n}  // namespace internal\n\n// Asserts that val1 is less than, or almost equal to, val2.  Fails\n// otherwise.  In particular, it fails if either val1 or val2 is NaN.\nAssertionResult FloatLE(const char* expr1, const char* expr2,\n                        float val1, float val2) {\n  return internal::FloatingPointLE<float>(expr1, expr2, val1, val2);\n}\n\n// Asserts that val1 is less than, or almost equal to, val2.  Fails\n// otherwise.  In particular, it fails if either val1 or val2 is NaN.\nAssertionResult DoubleLE(const char* expr1, const char* expr2,\n                         double val1, double val2) {\n  return internal::FloatingPointLE<double>(expr1, expr2, val1, val2);\n}\n\nnamespace internal {\n\n// The helper function for {ASSERT|EXPECT}_EQ with int or enum\n// arguments.\nAssertionResult CmpHelperEQ(const char* lhs_expression,\n                            const char* rhs_expression,\n                            BiggestInt lhs,\n                            BiggestInt rhs) {\n  if (lhs == rhs) {\n    return AssertionSuccess();\n  }\n\n  return EqFailure(lhs_expression,\n                   rhs_expression,\n                   FormatForComparisonFailureMessage(lhs, rhs),\n                   FormatForComparisonFailureMessage(rhs, lhs),\n                   false);\n}\n\n// A macro for implementing the helper functions needed to implement\n// ASSERT_?? and EXPECT_?? with integer or enum arguments.  It is here\n// just to avoid copy-and-paste of similar code.\n#define GTEST_IMPL_CMP_HELPER_(op_name, op)\\\nAssertionResult CmpHelper##op_name(const char* expr1, const char* expr2, \\\n                                   BiggestInt val1, BiggestInt val2) {\\\n  if (val1 op val2) {\\\n    return AssertionSuccess();\\\n  } else {\\\n    return AssertionFailure() \\\n        << \"Expected: (\" << expr1 << \") \" #op \" (\" << expr2\\\n        << \"), actual: \" << FormatForComparisonFailureMessage(val1, val2)\\\n        << \" vs \" << FormatForComparisonFailureMessage(val2, val1);\\\n  }\\\n}\n\n// Implements the helper function for {ASSERT|EXPECT}_NE with int or\n// enum arguments.\nGTEST_IMPL_CMP_HELPER_(NE, !=)\n// Implements the helper function for {ASSERT|EXPECT}_LE with int or\n// enum arguments.\nGTEST_IMPL_CMP_HELPER_(LE, <=)\n// Implements the helper function for {ASSERT|EXPECT}_LT with int or\n// enum arguments.\nGTEST_IMPL_CMP_HELPER_(LT, < )\n// Implements the helper function for {ASSERT|EXPECT}_GE with int or\n// enum arguments.\nGTEST_IMPL_CMP_HELPER_(GE, >=)\n// Implements the helper function for {ASSERT|EXPECT}_GT with int or\n// enum arguments.\nGTEST_IMPL_CMP_HELPER_(GT, > )\n\n#undef GTEST_IMPL_CMP_HELPER_\n\n// The helper function for {ASSERT|EXPECT}_STREQ.\nAssertionResult CmpHelperSTREQ(const char* lhs_expression,\n                               const char* rhs_expression,\n                               const char* lhs,\n                               const char* rhs) {\n  if (String::CStringEquals(lhs, rhs)) {\n    return AssertionSuccess();\n  }\n\n  return EqFailure(lhs_expression,\n                   rhs_expression,\n                   PrintToString(lhs),\n                   PrintToString(rhs),\n                   false);\n}\n\n// The helper function for {ASSERT|EXPECT}_STRCASEEQ.\nAssertionResult CmpHelperSTRCASEEQ(const char* lhs_expression,\n                                   const char* rhs_expression,\n                                   const char* lhs,\n                                   const char* rhs) {\n  if (String::CaseInsensitiveCStringEquals(lhs, rhs)) {\n    return AssertionSuccess();\n  }\n\n  return EqFailure(lhs_expression,\n                   rhs_expression,\n                   PrintToString(lhs),\n                   PrintToString(rhs),\n                   true);\n}\n\n// The helper function for {ASSERT|EXPECT}_STRNE.\nAssertionResult CmpHelperSTRNE(const char* s1_expression,\n                               const char* s2_expression,\n                               const char* s1,\n                               const char* s2) {\n  if (!String::CStringEquals(s1, s2)) {\n    return AssertionSuccess();\n  } else {\n    return AssertionFailure() << \"Expected: (\" << s1_expression << \") != (\"\n                              << s2_expression << \"), actual: \\\"\"\n                              << s1 << \"\\\" vs \\\"\" << s2 << \"\\\"\";\n  }\n}\n\n// The helper function for {ASSERT|EXPECT}_STRCASENE.\nAssertionResult CmpHelperSTRCASENE(const char* s1_expression,\n                                   const char* s2_expression,\n                                   const char* s1,\n                                   const char* s2) {\n  if (!String::CaseInsensitiveCStringEquals(s1, s2)) {\n    return AssertionSuccess();\n  } else {\n    return AssertionFailure()\n        << \"Expected: (\" << s1_expression << \") != (\"\n        << s2_expression << \") (ignoring case), actual: \\\"\"\n        << s1 << \"\\\" vs \\\"\" << s2 << \"\\\"\";\n  }\n}\n\n}  // namespace internal\n\nnamespace {\n\n// Helper functions for implementing IsSubString() and IsNotSubstring().\n\n// This group of overloaded functions return true iff needle is a\n// substring of haystack.  NULL is considered a substring of itself\n// only.\n\nbool IsSubstringPred(const char* needle, const char* haystack) {\n  if (needle == nullptr || haystack == nullptr) return needle == haystack;\n\n  return strstr(haystack, needle) != nullptr;\n}\n\nbool IsSubstringPred(const wchar_t* needle, const wchar_t* haystack) {\n  if (needle == nullptr || haystack == nullptr) return needle == haystack;\n\n  return wcsstr(haystack, needle) != nullptr;\n}\n\n// StringType here can be either ::std::string or ::std::wstring.\ntemplate <typename StringType>\nbool IsSubstringPred(const StringType& needle,\n                     const StringType& haystack) {\n  return haystack.find(needle) != StringType::npos;\n}\n\n// This function implements either IsSubstring() or IsNotSubstring(),\n// depending on the value of the expected_to_be_substring parameter.\n// StringType here can be const char*, const wchar_t*, ::std::string,\n// or ::std::wstring.\ntemplate <typename StringType>\nAssertionResult IsSubstringImpl(\n    bool expected_to_be_substring,\n    const char* needle_expr, const char* haystack_expr,\n    const StringType& needle, const StringType& haystack) {\n  if (IsSubstringPred(needle, haystack) == expected_to_be_substring)\n    return AssertionSuccess();\n\n  const bool is_wide_string = sizeof(needle[0]) > 1;\n  const char* const begin_string_quote = is_wide_string ? \"L\\\"\" : \"\\\"\";\n  return AssertionFailure()\n      << \"Value of: \" << needle_expr << \"\\n\"\n      << \"  Actual: \" << begin_string_quote << needle << \"\\\"\\n\"\n      << \"Expected: \" << (expected_to_be_substring ? \"\" : \"not \")\n      << \"a substring of \" << haystack_expr << \"\\n\"\n      << \"Which is: \" << begin_string_quote << haystack << \"\\\"\";\n}\n\n}  // namespace\n\n// IsSubstring() and IsNotSubstring() check whether needle is a\n// substring of haystack (NULL is considered a substring of itself\n// only), and return an appropriate error message when they fail.\n\nAssertionResult IsSubstring(\n    const char* needle_expr, const char* haystack_expr,\n    const char* needle, const char* haystack) {\n  return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack);\n}\n\nAssertionResult IsSubstring(\n    const char* needle_expr, const char* haystack_expr,\n    const wchar_t* needle, const wchar_t* haystack) {\n  return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack);\n}\n\nAssertionResult IsNotSubstring(\n    const char* needle_expr, const char* haystack_expr,\n    const char* needle, const char* haystack) {\n  return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack);\n}\n\nAssertionResult IsNotSubstring(\n    const char* needle_expr, const char* haystack_expr,\n    const wchar_t* needle, const wchar_t* haystack) {\n  return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack);\n}\n\nAssertionResult IsSubstring(\n    const char* needle_expr, const char* haystack_expr,\n    const ::std::string& needle, const ::std::string& haystack) {\n  return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack);\n}\n\nAssertionResult IsNotSubstring(\n    const char* needle_expr, const char* haystack_expr,\n    const ::std::string& needle, const ::std::string& haystack) {\n  return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack);\n}\n\n#if GTEST_HAS_STD_WSTRING\nAssertionResult IsSubstring(\n    const char* needle_expr, const char* haystack_expr,\n    const ::std::wstring& needle, const ::std::wstring& haystack) {\n  return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack);\n}\n\nAssertionResult IsNotSubstring(\n    const char* needle_expr, const char* haystack_expr,\n    const ::std::wstring& needle, const ::std::wstring& haystack) {\n  return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack);\n}\n#endif  // GTEST_HAS_STD_WSTRING\n\nnamespace internal {\n\n#if GTEST_OS_WINDOWS\n\nnamespace {\n\n// Helper function for IsHRESULT{SuccessFailure} predicates\nAssertionResult HRESULTFailureHelper(const char* expr,\n                                     const char* expected,\n                                     long hr) {  // NOLINT\n# if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_WINDOWS_TV_TITLE\n\n  // Windows CE doesn't support FormatMessage.\n  const char error_text[] = \"\";\n\n# else\n\n  // Looks up the human-readable system message for the HRESULT code\n  // and since we're not passing any params to FormatMessage, we don't\n  // want inserts expanded.\n  const DWORD kFlags = FORMAT_MESSAGE_FROM_SYSTEM |\n                       FORMAT_MESSAGE_IGNORE_INSERTS;\n  const DWORD kBufSize = 4096;\n  // Gets the system's human readable message string for this HRESULT.\n  char error_text[kBufSize] = { '\\0' };\n  DWORD message_length = ::FormatMessageA(kFlags,\n                                          0,   // no source, we're asking system\n                                          hr,  // the error\n                                          0,   // no line width restrictions\n                                          error_text,  // output buffer\n                                          kBufSize,    // buf size\n                                          nullptr);  // no arguments for inserts\n  // Trims tailing white space (FormatMessage leaves a trailing CR-LF)\n  for (; message_length && IsSpace(error_text[message_length - 1]);\n          --message_length) {\n    error_text[message_length - 1] = '\\0';\n  }\n\n# endif  // GTEST_OS_WINDOWS_MOBILE\n\n  const std::string error_hex(\"0x\" + String::FormatHexInt(hr));\n  return ::testing::AssertionFailure()\n      << \"Expected: \" << expr << \" \" << expected << \".\\n\"\n      << \"  Actual: \" << error_hex << \" \" << error_text << \"\\n\";\n}\n\n}  // namespace\n\nAssertionResult IsHRESULTSuccess(const char* expr, long hr) {  // NOLINT\n  if (SUCCEEDED(hr)) {\n    return AssertionSuccess();\n  }\n  return HRESULTFailureHelper(expr, \"succeeds\", hr);\n}\n\nAssertionResult IsHRESULTFailure(const char* expr, long hr) {  // NOLINT\n  if (FAILED(hr)) {\n    return AssertionSuccess();\n  }\n  return HRESULTFailureHelper(expr, \"fails\", hr);\n}\n\n#endif  // GTEST_OS_WINDOWS\n\n// Utility functions for encoding Unicode text (wide strings) in\n// UTF-8.\n\n// A Unicode code-point can have up to 21 bits, and is encoded in UTF-8\n// like this:\n//\n// Code-point length   Encoding\n//   0 -  7 bits       0xxxxxxx\n//   8 - 11 bits       110xxxxx 10xxxxxx\n//  12 - 16 bits       1110xxxx 10xxxxxx 10xxxxxx\n//  17 - 21 bits       11110xxx 10xxxxxx 10xxxxxx 10xxxxxx\n\n// The maximum code-point a one-byte UTF-8 sequence can represent.\nconst UInt32 kMaxCodePoint1 = (static_cast<UInt32>(1) <<  7) - 1;\n\n// The maximum code-point a two-byte UTF-8 sequence can represent.\nconst UInt32 kMaxCodePoint2 = (static_cast<UInt32>(1) << (5 + 6)) - 1;\n\n// The maximum code-point a three-byte UTF-8 sequence can represent.\nconst UInt32 kMaxCodePoint3 = (static_cast<UInt32>(1) << (4 + 2*6)) - 1;\n\n// The maximum code-point a four-byte UTF-8 sequence can represent.\nconst UInt32 kMaxCodePoint4 = (static_cast<UInt32>(1) << (3 + 3*6)) - 1;\n\n// Chops off the n lowest bits from a bit pattern.  Returns the n\n// lowest bits.  As a side effect, the original bit pattern will be\n// shifted to the right by n bits.\ninline UInt32 ChopLowBits(UInt32* bits, int n) {\n  const UInt32 low_bits = *bits & ((static_cast<UInt32>(1) << n) - 1);\n  *bits >>= n;\n  return low_bits;\n}\n\n// Converts a Unicode code point to a narrow string in UTF-8 encoding.\n// code_point parameter is of type UInt32 because wchar_t may not be\n// wide enough to contain a code point.\n// If the code_point is not a valid Unicode code point\n// (i.e. outside of Unicode range U+0 to U+10FFFF) it will be converted\n// to \"(Invalid Unicode 0xXXXXXXXX)\".\nstd::string CodePointToUtf8(UInt32 code_point) {\n  if (code_point > kMaxCodePoint4) {\n    return \"(Invalid Unicode 0x\" + String::FormatHexInt(code_point) + \")\";\n  }\n\n  char str[5];  // Big enough for the largest valid code point.\n  if (code_point <= kMaxCodePoint1) {\n    str[1] = '\\0';\n    str[0] = static_cast<char>(code_point);                          // 0xxxxxxx\n  } else if (code_point <= kMaxCodePoint2) {\n    str[2] = '\\0';\n    str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6));  // 10xxxxxx\n    str[0] = static_cast<char>(0xC0 | code_point);                   // 110xxxxx\n  } else if (code_point <= kMaxCodePoint3) {\n    str[3] = '\\0';\n    str[2] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6));  // 10xxxxxx\n    str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6));  // 10xxxxxx\n    str[0] = static_cast<char>(0xE0 | code_point);                   // 1110xxxx\n  } else {  // code_point <= kMaxCodePoint4\n    str[4] = '\\0';\n    str[3] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6));  // 10xxxxxx\n    str[2] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6));  // 10xxxxxx\n    str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6));  // 10xxxxxx\n    str[0] = static_cast<char>(0xF0 | code_point);                   // 11110xxx\n  }\n  return str;\n}\n\n// The following two functions only make sense if the system\n// uses UTF-16 for wide string encoding. All supported systems\n// with 16 bit wchar_t (Windows, Cygwin) do use UTF-16.\n\n// Determines if the arguments constitute UTF-16 surrogate pair\n// and thus should be combined into a single Unicode code point\n// using CreateCodePointFromUtf16SurrogatePair.\ninline bool IsUtf16SurrogatePair(wchar_t first, wchar_t second) {\n  return sizeof(wchar_t) == 2 &&\n      (first & 0xFC00) == 0xD800 && (second & 0xFC00) == 0xDC00;\n}\n\n// Creates a Unicode code point from UTF16 surrogate pair.\ninline UInt32 CreateCodePointFromUtf16SurrogatePair(wchar_t first,\n                                                    wchar_t second) {\n  const UInt32 mask = (1 << 10) - 1;\n  return (sizeof(wchar_t) == 2) ?\n      (((first & mask) << 10) | (second & mask)) + 0x10000 :\n      // This function should not be called when the condition is\n      // false, but we provide a sensible default in case it is.\n      static_cast<UInt32>(first);\n}\n\n// Converts a wide string to a narrow string in UTF-8 encoding.\n// The wide string is assumed to have the following encoding:\n//   UTF-16 if sizeof(wchar_t) == 2 (on Windows, Cygwin)\n//   UTF-32 if sizeof(wchar_t) == 4 (on Linux)\n// Parameter str points to a null-terminated wide string.\n// Parameter num_chars may additionally limit the number\n// of wchar_t characters processed. -1 is used when the entire string\n// should be processed.\n// If the string contains code points that are not valid Unicode code points\n// (i.e. outside of Unicode range U+0 to U+10FFFF) they will be output\n// as '(Invalid Unicode 0xXXXXXXXX)'. If the string is in UTF16 encoding\n// and contains invalid UTF-16 surrogate pairs, values in those pairs\n// will be encoded as individual Unicode characters from Basic Normal Plane.\nstd::string WideStringToUtf8(const wchar_t* str, int num_chars) {\n  if (num_chars == -1)\n    num_chars = static_cast<int>(wcslen(str));\n\n  ::std::stringstream stream;\n  for (int i = 0; i < num_chars; ++i) {\n    UInt32 unicode_code_point;\n\n    if (str[i] == L'\\0') {\n      break;\n    } else if (i + 1 < num_chars && IsUtf16SurrogatePair(str[i], str[i + 1])) {\n      unicode_code_point = CreateCodePointFromUtf16SurrogatePair(str[i],\n                                                                 str[i + 1]);\n      i++;\n    } else {\n      unicode_code_point = static_cast<UInt32>(str[i]);\n    }\n\n    stream << CodePointToUtf8(unicode_code_point);\n  }\n  return StringStreamToString(&stream);\n}\n\n// Converts a wide C string to an std::string using the UTF-8 encoding.\n// NULL will be converted to \"(null)\".\nstd::string String::ShowWideCString(const wchar_t * wide_c_str) {\n  if (wide_c_str == nullptr) return \"(null)\";\n\n  return internal::WideStringToUtf8(wide_c_str, -1);\n}\n\n// Compares two wide C strings.  Returns true iff they have the same\n// content.\n//\n// Unlike wcscmp(), this function can handle NULL argument(s).  A NULL\n// C string is considered different to any non-NULL C string,\n// including the empty string.\nbool String::WideCStringEquals(const wchar_t * lhs, const wchar_t * rhs) {\n  if (lhs == nullptr) return rhs == nullptr;\n\n  if (rhs == nullptr) return false;\n\n  return wcscmp(lhs, rhs) == 0;\n}\n\n// Helper function for *_STREQ on wide strings.\nAssertionResult CmpHelperSTREQ(const char* lhs_expression,\n                               const char* rhs_expression,\n                               const wchar_t* lhs,\n                               const wchar_t* rhs) {\n  if (String::WideCStringEquals(lhs, rhs)) {\n    return AssertionSuccess();\n  }\n\n  return EqFailure(lhs_expression,\n                   rhs_expression,\n                   PrintToString(lhs),\n                   PrintToString(rhs),\n                   false);\n}\n\n// Helper function for *_STRNE on wide strings.\nAssertionResult CmpHelperSTRNE(const char* s1_expression,\n                               const char* s2_expression,\n                               const wchar_t* s1,\n                               const wchar_t* s2) {\n  if (!String::WideCStringEquals(s1, s2)) {\n    return AssertionSuccess();\n  }\n\n  return AssertionFailure() << \"Expected: (\" << s1_expression << \") != (\"\n                            << s2_expression << \"), actual: \"\n                            << PrintToString(s1)\n                            << \" vs \" << PrintToString(s2);\n}\n\n// Compares two C strings, ignoring case.  Returns true iff they have\n// the same content.\n//\n// Unlike strcasecmp(), this function can handle NULL argument(s).  A\n// NULL C string is considered different to any non-NULL C string,\n// including the empty string.\nbool String::CaseInsensitiveCStringEquals(const char * lhs, const char * rhs) {\n  if (lhs == nullptr) return rhs == nullptr;\n  if (rhs == nullptr) return false;\n  return posix::StrCaseCmp(lhs, rhs) == 0;\n}\n\n  // Compares two wide C strings, ignoring case.  Returns true iff they\n  // have the same content.\n  //\n  // Unlike wcscasecmp(), this function can handle NULL argument(s).\n  // A NULL C string is considered different to any non-NULL wide C string,\n  // including the empty string.\n  // NB: The implementations on different platforms slightly differ.\n  // On windows, this method uses _wcsicmp which compares according to LC_CTYPE\n  // environment variable. On GNU platform this method uses wcscasecmp\n  // which compares according to LC_CTYPE category of the current locale.\n  // On MacOS X, it uses towlower, which also uses LC_CTYPE category of the\n  // current locale.\nbool String::CaseInsensitiveWideCStringEquals(const wchar_t* lhs,\n                                              const wchar_t* rhs) {\n  if (lhs == nullptr) return rhs == nullptr;\n\n  if (rhs == nullptr) return false;\n\n#if GTEST_OS_WINDOWS\n  return _wcsicmp(lhs, rhs) == 0;\n#elif GTEST_OS_LINUX && !GTEST_OS_LINUX_ANDROID\n  return wcscasecmp(lhs, rhs) == 0;\n#else\n  // Android, Mac OS X and Cygwin don't define wcscasecmp.\n  // Other unknown OSes may not define it either.\n  wint_t left, right;\n  do {\n    left = towlower(*lhs++);\n    right = towlower(*rhs++);\n  } while (left && left == right);\n  return left == right;\n#endif  // OS selector\n}\n\n// Returns true iff str ends with the given suffix, ignoring case.\n// Any string is considered to end with an empty suffix.\nbool String::EndsWithCaseInsensitive(\n    const std::string& str, const std::string& suffix) {\n  const size_t str_len = str.length();\n  const size_t suffix_len = suffix.length();\n  return (str_len >= suffix_len) &&\n         CaseInsensitiveCStringEquals(str.c_str() + str_len - suffix_len,\n                                      suffix.c_str());\n}\n\n// Formats an int value as \"%02d\".\nstd::string String::FormatIntWidth2(int value) {\n  std::stringstream ss;\n  ss << std::setfill('0') << std::setw(2) << value;\n  return ss.str();\n}\n\n// Formats an int value as \"%X\".\nstd::string String::FormatHexInt(int value) {\n  std::stringstream ss;\n  ss << std::hex << std::uppercase << value;\n  return ss.str();\n}\n\n// Formats a byte as \"%02X\".\nstd::string String::FormatByte(unsigned char value) {\n  std::stringstream ss;\n  ss << std::setfill('0') << std::setw(2) << std::hex << std::uppercase\n     << static_cast<unsigned int>(value);\n  return ss.str();\n}\n\n// Converts the buffer in a stringstream to an std::string, converting NUL\n// bytes to \"\\\\0\" along the way.\nstd::string StringStreamToString(::std::stringstream* ss) {\n  const ::std::string& str = ss->str();\n  const char* const start = str.c_str();\n  const char* const end = start + str.length();\n\n  std::string result;\n  result.reserve(2 * (end - start));\n  for (const char* ch = start; ch != end; ++ch) {\n    if (*ch == '\\0') {\n      result += \"\\\\0\";  // Replaces NUL with \"\\\\0\";\n    } else {\n      result += *ch;\n    }\n  }\n\n  return result;\n}\n\n// Appends the user-supplied message to the Google-Test-generated message.\nstd::string AppendUserMessage(const std::string& gtest_msg,\n                              const Message& user_msg) {\n  // Appends the user message if it's non-empty.\n  const std::string user_msg_string = user_msg.GetString();\n  if (user_msg_string.empty()) {\n    return gtest_msg;\n  }\n\n  return gtest_msg + \"\\n\" + user_msg_string;\n}\n\n}  // namespace internal\n\n// class TestResult\n\n// Creates an empty TestResult.\nTestResult::TestResult()\n    : death_test_count_(0),\n      elapsed_time_(0) {\n}\n\n// D'tor.\nTestResult::~TestResult() {\n}\n\n// Returns the i-th test part result among all the results. i can\n// range from 0 to total_part_count() - 1. If i is not in that range,\n// aborts the program.\nconst TestPartResult& TestResult::GetTestPartResult(int i) const {\n  if (i < 0 || i >= total_part_count())\n    internal::posix::Abort();\n  return test_part_results_.at(i);\n}\n\n// Returns the i-th test property. i can range from 0 to\n// test_property_count() - 1. If i is not in that range, aborts the\n// program.\nconst TestProperty& TestResult::GetTestProperty(int i) const {\n  if (i < 0 || i >= test_property_count())\n    internal::posix::Abort();\n  return test_properties_.at(i);\n}\n\n// Clears the test part results.\nvoid TestResult::ClearTestPartResults() {\n  test_part_results_.clear();\n}\n\n// Adds a test part result to the list.\nvoid TestResult::AddTestPartResult(const TestPartResult& test_part_result) {\n  test_part_results_.push_back(test_part_result);\n}\n\n// Adds a test property to the list. If a property with the same key as the\n// supplied property is already represented, the value of this test_property\n// replaces the old value for that key.\nvoid TestResult::RecordProperty(const std::string& xml_element,\n                                const TestProperty& test_property) {\n  if (!ValidateTestProperty(xml_element, test_property)) {\n    return;\n  }\n  internal::MutexLock lock(&test_properites_mutex_);\n  const std::vector<TestProperty>::iterator property_with_matching_key =\n      std::find_if(test_properties_.begin(), test_properties_.end(),\n                   internal::TestPropertyKeyIs(test_property.key()));\n  if (property_with_matching_key == test_properties_.end()) {\n    test_properties_.push_back(test_property);\n    return;\n  }\n  property_with_matching_key->SetValue(test_property.value());\n}\n\n// The list of reserved attributes used in the <testsuites> element of XML\n// output.\nstatic const char* const kReservedTestSuitesAttributes[] = {\n  \"disabled\",\n  \"errors\",\n  \"failures\",\n  \"name\",\n  \"random_seed\",\n  \"tests\",\n  \"time\",\n  \"timestamp\"\n};\n\n// The list of reserved attributes used in the <testsuite> element of XML\n// output.\nstatic const char* const kReservedTestSuiteAttributes[] = {\n  \"disabled\",\n  \"errors\",\n  \"failures\",\n  \"name\",\n  \"tests\",\n  \"time\"\n};\n\n// The list of reserved attributes used in the <testcase> element of XML output.\nstatic const char* const kReservedTestCaseAttributes[] = {\n    \"classname\",  \"name\",        \"status\", \"time\",\n    \"type_param\", \"value_param\", \"file\",   \"line\"};\n\ntemplate <int kSize>\nstd::vector<std::string> ArrayAsVector(const char* const (&array)[kSize]) {\n  return std::vector<std::string>(array, array + kSize);\n}\n\nstatic std::vector<std::string> GetReservedAttributesForElement(\n    const std::string& xml_element) {\n  if (xml_element == \"testsuites\") {\n    return ArrayAsVector(kReservedTestSuitesAttributes);\n  } else if (xml_element == \"testsuite\") {\n    return ArrayAsVector(kReservedTestSuiteAttributes);\n  } else if (xml_element == \"testcase\") {\n    return ArrayAsVector(kReservedTestCaseAttributes);\n  } else {\n    GTEST_CHECK_(false) << \"Unrecognized xml_element provided: \" << xml_element;\n  }\n  // This code is unreachable but some compilers may not realizes that.\n  return std::vector<std::string>();\n}\n\nstatic std::string FormatWordList(const std::vector<std::string>& words) {\n  Message word_list;\n  for (size_t i = 0; i < words.size(); ++i) {\n    if (i > 0 && words.size() > 2) {\n      word_list << \", \";\n    }\n    if (i == words.size() - 1) {\n      word_list << \"and \";\n    }\n    word_list << \"'\" << words[i] << \"'\";\n  }\n  return word_list.GetString();\n}\n\nstatic bool ValidateTestPropertyName(\n    const std::string& property_name,\n    const std::vector<std::string>& reserved_names) {\n  if (std::find(reserved_names.begin(), reserved_names.end(), property_name) !=\n          reserved_names.end()) {\n    ADD_FAILURE() << \"Reserved key used in RecordProperty(): \" << property_name\n                  << \" (\" << FormatWordList(reserved_names)\n                  << \" are reserved by \" << GTEST_NAME_ << \")\";\n    return false;\n  }\n  return true;\n}\n\n// Adds a failure if the key is a reserved attribute of the element named\n// xml_element.  Returns true if the property is valid.\nbool TestResult::ValidateTestProperty(const std::string& xml_element,\n                                      const TestProperty& test_property) {\n  return ValidateTestPropertyName(test_property.key(),\n                                  GetReservedAttributesForElement(xml_element));\n}\n\n// Clears the object.\nvoid TestResult::Clear() {\n  test_part_results_.clear();\n  test_properties_.clear();\n  death_test_count_ = 0;\n  elapsed_time_ = 0;\n}\n\n// Returns true off the test part was skipped.\nstatic bool TestPartSkipped(const TestPartResult& result) {\n  return result.skipped();\n}\n\n// Returns true iff the test was skipped.\nbool TestResult::Skipped() const {\n  return !Failed() && CountIf(test_part_results_, TestPartSkipped) > 0;\n}\n\n// Returns true iff the test failed.\nbool TestResult::Failed() const {\n  for (int i = 0; i < total_part_count(); ++i) {\n    if (GetTestPartResult(i).failed())\n      return true;\n  }\n  return false;\n}\n\n// Returns true iff the test part fatally failed.\nstatic bool TestPartFatallyFailed(const TestPartResult& result) {\n  return result.fatally_failed();\n}\n\n// Returns true iff the test fatally failed.\nbool TestResult::HasFatalFailure() const {\n  return CountIf(test_part_results_, TestPartFatallyFailed) > 0;\n}\n\n// Returns true iff the test part non-fatally failed.\nstatic bool TestPartNonfatallyFailed(const TestPartResult& result) {\n  return result.nonfatally_failed();\n}\n\n// Returns true iff the test has a non-fatal failure.\nbool TestResult::HasNonfatalFailure() const {\n  return CountIf(test_part_results_, TestPartNonfatallyFailed) > 0;\n}\n\n// Gets the number of all test parts.  This is the sum of the number\n// of successful test parts and the number of failed test parts.\nint TestResult::total_part_count() const {\n  return static_cast<int>(test_part_results_.size());\n}\n\n// Returns the number of the test properties.\nint TestResult::test_property_count() const {\n  return static_cast<int>(test_properties_.size());\n}\n\n// class Test\n\n// Creates a Test object.\n\n// The c'tor saves the states of all flags.\nTest::Test()\n    : gtest_flag_saver_(new GTEST_FLAG_SAVER_) {\n}\n\n// The d'tor restores the states of all flags.  The actual work is\n// done by the d'tor of the gtest_flag_saver_ field, and thus not\n// visible here.\nTest::~Test() {\n}\n\n// Sets up the test fixture.\n//\n// A sub-class may override this.\nvoid Test::SetUp() {\n}\n\n// Tears down the test fixture.\n//\n// A sub-class may override this.\nvoid Test::TearDown() {\n}\n\n// Allows user supplied key value pairs to be recorded for later output.\nvoid Test::RecordProperty(const std::string& key, const std::string& value) {\n  UnitTest::GetInstance()->RecordProperty(key, value);\n}\n\n// Allows user supplied key value pairs to be recorded for later output.\nvoid Test::RecordProperty(const std::string& key, int value) {\n  Message value_message;\n  value_message << value;\n  RecordProperty(key, value_message.GetString().c_str());\n}\n\nnamespace internal {\n\nvoid ReportFailureInUnknownLocation(TestPartResult::Type result_type,\n                                    const std::string& message) {\n  // This function is a friend of UnitTest and as such has access to\n  // AddTestPartResult.\n  UnitTest::GetInstance()->AddTestPartResult(\n      result_type,\n      nullptr,  // No info about the source file where the exception occurred.\n      -1,       // We have no info on which line caused the exception.\n      message,\n      \"\");  // No stack trace, either.\n}\n\n}  // namespace internal\n\n// Google Test requires all tests in the same test suite to use the same test\n// fixture class.  This function checks if the current test has the\n// same fixture class as the first test in the current test suite.  If\n// yes, it returns true; otherwise it generates a Google Test failure and\n// returns false.\nbool Test::HasSameFixtureClass() {\n  internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();\n  const TestSuite* const test_suite = impl->current_test_suite();\n\n  // Info about the first test in the current test suite.\n  const TestInfo* const first_test_info = test_suite->test_info_list()[0];\n  const internal::TypeId first_fixture_id = first_test_info->fixture_class_id_;\n  const char* const first_test_name = first_test_info->name();\n\n  // Info about the current test.\n  const TestInfo* const this_test_info = impl->current_test_info();\n  const internal::TypeId this_fixture_id = this_test_info->fixture_class_id_;\n  const char* const this_test_name = this_test_info->name();\n\n  if (this_fixture_id != first_fixture_id) {\n    // Is the first test defined using TEST?\n    const bool first_is_TEST = first_fixture_id == internal::GetTestTypeId();\n    // Is this test defined using TEST?\n    const bool this_is_TEST = this_fixture_id == internal::GetTestTypeId();\n\n    if (first_is_TEST || this_is_TEST) {\n      // Both TEST and TEST_F appear in same test suite, which is incorrect.\n      // Tell the user how to fix this.\n\n      // Gets the name of the TEST and the name of the TEST_F.  Note\n      // that first_is_TEST and this_is_TEST cannot both be true, as\n      // the fixture IDs are different for the two tests.\n      const char* const TEST_name =\n          first_is_TEST ? first_test_name : this_test_name;\n      const char* const TEST_F_name =\n          first_is_TEST ? this_test_name : first_test_name;\n\n      ADD_FAILURE()\n          << \"All tests in the same test suite must use the same test fixture\\n\"\n          << \"class, so mixing TEST_F and TEST in the same test suite is\\n\"\n          << \"illegal.  In test suite \" << this_test_info->test_suite_name()\n          << \",\\n\"\n          << \"test \" << TEST_F_name << \" is defined using TEST_F but\\n\"\n          << \"test \" << TEST_name << \" is defined using TEST.  You probably\\n\"\n          << \"want to change the TEST to TEST_F or move it to another test\\n\"\n          << \"case.\";\n    } else {\n      // Two fixture classes with the same name appear in two different\n      // namespaces, which is not allowed. Tell the user how to fix this.\n      ADD_FAILURE()\n          << \"All tests in the same test suite must use the same test fixture\\n\"\n          << \"class.  However, in test suite \"\n          << this_test_info->test_suite_name() << \",\\n\"\n          << \"you defined test \" << first_test_name << \" and test \"\n          << this_test_name << \"\\n\"\n          << \"using two different test fixture classes.  This can happen if\\n\"\n          << \"the two classes are from different namespaces or translation\\n\"\n          << \"units and have the same name.  You should probably rename one\\n\"\n          << \"of the classes to put the tests into different test suites.\";\n    }\n    return false;\n  }\n\n  return true;\n}\n\n#if GTEST_HAS_SEH\n\n// Adds an \"exception thrown\" fatal failure to the current test.  This\n// function returns its result via an output parameter pointer because VC++\n// prohibits creation of objects with destructors on stack in functions\n// using __try (see error C2712).\nstatic std::string* FormatSehExceptionMessage(DWORD exception_code,\n                                              const char* location) {\n  Message message;\n  message << \"SEH exception with code 0x\" << std::setbase(16) <<\n    exception_code << std::setbase(10) << \" thrown in \" << location << \".\";\n\n  return new std::string(message.GetString());\n}\n\n#endif  // GTEST_HAS_SEH\n\nnamespace internal {\n\n#if GTEST_HAS_EXCEPTIONS\n\n// Adds an \"exception thrown\" fatal failure to the current test.\nstatic std::string FormatCxxExceptionMessage(const char* description,\n                                             const char* location) {\n  Message message;\n  if (description != nullptr) {\n    message << \"C++ exception with description \\\"\" << description << \"\\\"\";\n  } else {\n    message << \"Unknown C++ exception\";\n  }\n  message << \" thrown in \" << location << \".\";\n\n  return message.GetString();\n}\n\nstatic std::string PrintTestPartResultToString(\n    const TestPartResult& test_part_result);\n\nGoogleTestFailureException::GoogleTestFailureException(\n    const TestPartResult& failure)\n    : ::std::runtime_error(PrintTestPartResultToString(failure).c_str()) {}\n\n#endif  // GTEST_HAS_EXCEPTIONS\n\n// We put these helper functions in the internal namespace as IBM's xlC\n// compiler rejects the code if they were declared static.\n\n// Runs the given method and handles SEH exceptions it throws, when\n// SEH is supported; returns the 0-value for type Result in case of an\n// SEH exception.  (Microsoft compilers cannot handle SEH and C++\n// exceptions in the same function.  Therefore, we provide a separate\n// wrapper function for handling SEH exceptions.)\ntemplate <class T, typename Result>\nResult HandleSehExceptionsInMethodIfSupported(\n    T* object, Result (T::*method)(), const char* location) {\n#if GTEST_HAS_SEH\n  __try {\n    return (object->*method)();\n  } __except (internal::UnitTestOptions::GTestShouldProcessSEH(  // NOLINT\n      GetExceptionCode())) {\n    // We create the exception message on the heap because VC++ prohibits\n    // creation of objects with destructors on stack in functions using __try\n    // (see error C2712).\n    std::string* exception_message = FormatSehExceptionMessage(\n        GetExceptionCode(), location);\n    internal::ReportFailureInUnknownLocation(TestPartResult::kFatalFailure,\n                                             *exception_message);\n    delete exception_message;\n    return static_cast<Result>(0);\n  }\n#else\n  (void)location;\n  return (object->*method)();\n#endif  // GTEST_HAS_SEH\n}\n\n// Runs the given method and catches and reports C++ and/or SEH-style\n// exceptions, if they are supported; returns the 0-value for type\n// Result in case of an SEH exception.\ntemplate <class T, typename Result>\nResult HandleExceptionsInMethodIfSupported(\n    T* object, Result (T::*method)(), const char* location) {\n  // NOTE: The user code can affect the way in which Google Test handles\n  // exceptions by setting GTEST_FLAG(catch_exceptions), but only before\n  // RUN_ALL_TESTS() starts. It is technically possible to check the flag\n  // after the exception is caught and either report or re-throw the\n  // exception based on the flag's value:\n  //\n  // try {\n  //   // Perform the test method.\n  // } catch (...) {\n  //   if (GTEST_FLAG(catch_exceptions))\n  //     // Report the exception as failure.\n  //   else\n  //     throw;  // Re-throws the original exception.\n  // }\n  //\n  // However, the purpose of this flag is to allow the program to drop into\n  // the debugger when the exception is thrown. On most platforms, once the\n  // control enters the catch block, the exception origin information is\n  // lost and the debugger will stop the program at the point of the\n  // re-throw in this function -- instead of at the point of the original\n  // throw statement in the code under test.  For this reason, we perform\n  // the check early, sacrificing the ability to affect Google Test's\n  // exception handling in the method where the exception is thrown.\n  if (internal::GetUnitTestImpl()->catch_exceptions()) {\n#if GTEST_HAS_EXCEPTIONS\n    try {\n      return HandleSehExceptionsInMethodIfSupported(object, method, location);\n    } catch (const AssertionException&) {  // NOLINT\n      // This failure was reported already.\n    } catch (const internal::GoogleTestFailureException&) {  // NOLINT\n      // This exception type can only be thrown by a failed Google\n      // Test assertion with the intention of letting another testing\n      // framework catch it.  Therefore we just re-throw it.\n      throw;\n    } catch (const std::exception& e) {  // NOLINT\n      internal::ReportFailureInUnknownLocation(\n          TestPartResult::kFatalFailure,\n          FormatCxxExceptionMessage(e.what(), location));\n    } catch (...) {  // NOLINT\n      internal::ReportFailureInUnknownLocation(\n          TestPartResult::kFatalFailure,\n          FormatCxxExceptionMessage(nullptr, location));\n    }\n    return static_cast<Result>(0);\n#else\n    return HandleSehExceptionsInMethodIfSupported(object, method, location);\n#endif  // GTEST_HAS_EXCEPTIONS\n  } else {\n    return (object->*method)();\n  }\n}\n\n}  // namespace internal\n\n// Runs the test and updates the test result.\nvoid Test::Run() {\n  if (!HasSameFixtureClass()) return;\n\n  internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();\n  impl->os_stack_trace_getter()->UponLeavingGTest();\n  internal::HandleExceptionsInMethodIfSupported(this, &Test::SetUp, \"SetUp()\");\n  // We will run the test only if SetUp() was successful and didn't call\n  // GTEST_SKIP().\n  if (!HasFatalFailure() && !IsSkipped()) {\n    impl->os_stack_trace_getter()->UponLeavingGTest();\n    internal::HandleExceptionsInMethodIfSupported(\n        this, &Test::TestBody, \"the test body\");\n  }\n\n  // However, we want to clean up as much as possible.  Hence we will\n  // always call TearDown(), even if SetUp() or the test body has\n  // failed.\n  impl->os_stack_trace_getter()->UponLeavingGTest();\n  internal::HandleExceptionsInMethodIfSupported(\n      this, &Test::TearDown, \"TearDown()\");\n}\n\n// Returns true iff the current test has a fatal failure.\nbool Test::HasFatalFailure() {\n  return internal::GetUnitTestImpl()->current_test_result()->HasFatalFailure();\n}\n\n// Returns true iff the current test has a non-fatal failure.\nbool Test::HasNonfatalFailure() {\n  return internal::GetUnitTestImpl()->current_test_result()->\n      HasNonfatalFailure();\n}\n\n// Returns true iff the current test was skipped.\nbool Test::IsSkipped() {\n  return internal::GetUnitTestImpl()->current_test_result()->Skipped();\n}\n\n// class TestInfo\n\n// Constructs a TestInfo object. It assumes ownership of the test factory\n// object.\nTestInfo::TestInfo(const std::string& a_test_suite_name,\n                   const std::string& a_name, const char* a_type_param,\n                   const char* a_value_param,\n                   internal::CodeLocation a_code_location,\n                   internal::TypeId fixture_class_id,\n                   internal::TestFactoryBase* factory)\n    : test_suite_name_(a_test_suite_name),\n      name_(a_name),\n      type_param_(a_type_param ? new std::string(a_type_param) : nullptr),\n      value_param_(a_value_param ? new std::string(a_value_param) : nullptr),\n      location_(a_code_location),\n      fixture_class_id_(fixture_class_id),\n      should_run_(false),\n      is_disabled_(false),\n      matches_filter_(false),\n      factory_(factory),\n      result_() {}\n\n// Destructs a TestInfo object.\nTestInfo::~TestInfo() { delete factory_; }\n\nnamespace internal {\n\n// Creates a new TestInfo object and registers it with Google Test;\n// returns the created object.\n//\n// Arguments:\n//\n//   test_suite_name:   name of the test suite\n//   name:             name of the test\n//   type_param:       the name of the test's type parameter, or NULL if\n//                     this is not a typed or a type-parameterized test.\n//   value_param:      text representation of the test's value parameter,\n//                     or NULL if this is not a value-parameterized test.\n//   code_location:    code location where the test is defined\n//   fixture_class_id: ID of the test fixture class\n//   set_up_tc:        pointer to the function that sets up the test suite\n//   tear_down_tc:     pointer to the function that tears down the test suite\n//   factory:          pointer to the factory that creates a test object.\n//                     The newly created TestInfo instance will assume\n//                     ownership of the factory object.\nTestInfo* MakeAndRegisterTestInfo(\n    const char* test_suite_name, const char* name, const char* type_param,\n    const char* value_param, CodeLocation code_location,\n    TypeId fixture_class_id, SetUpTestSuiteFunc set_up_tc,\n    TearDownTestSuiteFunc tear_down_tc, TestFactoryBase* factory) {\n  TestInfo* const test_info =\n      new TestInfo(test_suite_name, name, type_param, value_param,\n                   code_location, fixture_class_id, factory);\n  GetUnitTestImpl()->AddTestInfo(set_up_tc, tear_down_tc, test_info);\n  return test_info;\n}\n\nvoid ReportInvalidTestSuiteType(const char* test_suite_name,\n                                CodeLocation code_location) {\n  Message errors;\n  errors\n      << \"Attempted redefinition of test suite \" << test_suite_name << \".\\n\"\n      << \"All tests in the same test suite must use the same test fixture\\n\"\n      << \"class.  However, in test suite \" << test_suite_name << \", you tried\\n\"\n      << \"to define a test using a fixture class different from the one\\n\"\n      << \"used earlier. This can happen if the two fixture classes are\\n\"\n      << \"from different namespaces and have the same name. You should\\n\"\n      << \"probably rename one of the classes to put the tests into different\\n\"\n      << \"test suites.\";\n\n  GTEST_LOG_(ERROR) << FormatFileLocation(code_location.file.c_str(),\n                                          code_location.line)\n                    << \" \" << errors.GetString();\n}\n}  // namespace internal\n\nnamespace {\n\n// A predicate that checks the test name of a TestInfo against a known\n// value.\n//\n// This is used for implementation of the TestSuite class only.  We put\n// it in the anonymous namespace to prevent polluting the outer\n// namespace.\n//\n// TestNameIs is copyable.\nclass TestNameIs {\n public:\n  // Constructor.\n  //\n  // TestNameIs has NO default constructor.\n  explicit TestNameIs(const char* name)\n      : name_(name) {}\n\n  // Returns true iff the test name of test_info matches name_.\n  bool operator()(const TestInfo * test_info) const {\n    return test_info && test_info->name() == name_;\n  }\n\n private:\n  std::string name_;\n};\n\n}  // namespace\n\nnamespace internal {\n\n// This method expands all parameterized tests registered with macros TEST_P\n// and INSTANTIATE_TEST_SUITE_P into regular tests and registers those.\n// This will be done just once during the program runtime.\nvoid UnitTestImpl::RegisterParameterizedTests() {\n  if (!parameterized_tests_registered_) {\n    parameterized_test_registry_.RegisterTests();\n    parameterized_tests_registered_ = true;\n  }\n}\n\n}  // namespace internal\n\n// Creates the test object, runs it, records its result, and then\n// deletes it.\nvoid TestInfo::Run() {\n  if (!should_run_) return;\n\n  // Tells UnitTest where to store test result.\n  internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();\n  impl->set_current_test_info(this);\n\n  TestEventListener* repeater = UnitTest::GetInstance()->listeners().repeater();\n\n  // Notifies the unit test event listeners that a test is about to start.\n  repeater->OnTestStart(*this);\n\n  const TimeInMillis start = internal::GetTimeInMillis();\n\n  impl->os_stack_trace_getter()->UponLeavingGTest();\n\n  // Creates the test object.\n  Test* const test = internal::HandleExceptionsInMethodIfSupported(\n      factory_, &internal::TestFactoryBase::CreateTest,\n      \"the test fixture's constructor\");\n\n  // Runs the test if the constructor didn't generate a fatal failure or invoke\n  // GTEST_SKIP().\n  // Note that the object will not be null\n  if (!Test::HasFatalFailure() && !Test::IsSkipped()) {\n    // This doesn't throw as all user code that can throw are wrapped into\n    // exception handling code.\n    test->Run();\n  }\n\n  if (test != nullptr) {\n    // Deletes the test object.\n    impl->os_stack_trace_getter()->UponLeavingGTest();\n    internal::HandleExceptionsInMethodIfSupported(\n        test, &Test::DeleteSelf_, \"the test fixture's destructor\");\n  }\n\n  result_.set_elapsed_time(internal::GetTimeInMillis() - start);\n\n  // Notifies the unit test event listener that a test has just finished.\n  repeater->OnTestEnd(*this);\n\n  // Tells UnitTest to stop associating assertion results to this\n  // test.\n  impl->set_current_test_info(nullptr);\n}\n\n// class TestSuite\n\n// Gets the number of successful tests in this test suite.\nint TestSuite::successful_test_count() const {\n  return CountIf(test_info_list_, TestPassed);\n}\n\n// Gets the number of successful tests in this test suite.\nint TestSuite::skipped_test_count() const {\n  return CountIf(test_info_list_, TestSkipped);\n}\n\n// Gets the number of failed tests in this test suite.\nint TestSuite::failed_test_count() const {\n  return CountIf(test_info_list_, TestFailed);\n}\n\n// Gets the number of disabled tests that will be reported in the XML report.\nint TestSuite::reportable_disabled_test_count() const {\n  return CountIf(test_info_list_, TestReportableDisabled);\n}\n\n// Gets the number of disabled tests in this test suite.\nint TestSuite::disabled_test_count() const {\n  return CountIf(test_info_list_, TestDisabled);\n}\n\n// Gets the number of tests to be printed in the XML report.\nint TestSuite::reportable_test_count() const {\n  return CountIf(test_info_list_, TestReportable);\n}\n\n// Get the number of tests in this test suite that should run.\nint TestSuite::test_to_run_count() const {\n  return CountIf(test_info_list_, ShouldRunTest);\n}\n\n// Gets the number of all tests.\nint TestSuite::total_test_count() const {\n  return static_cast<int>(test_info_list_.size());\n}\n\n// Creates a TestSuite with the given name.\n//\n// Arguments:\n//\n//   name:         name of the test suite\n//   a_type_param: the name of the test suite's type parameter, or NULL if\n//                 this is not a typed or a type-parameterized test suite.\n//   set_up_tc:    pointer to the function that sets up the test suite\n//   tear_down_tc: pointer to the function that tears down the test suite\nTestSuite::TestSuite(const char* a_name, const char* a_type_param,\n                     internal::SetUpTestSuiteFunc set_up_tc,\n                     internal::TearDownTestSuiteFunc tear_down_tc)\n    : name_(a_name),\n      type_param_(a_type_param ? new std::string(a_type_param) : nullptr),\n      set_up_tc_(set_up_tc),\n      tear_down_tc_(tear_down_tc),\n      should_run_(false),\n      elapsed_time_(0) {}\n\n// Destructor of TestSuite.\nTestSuite::~TestSuite() {\n  // Deletes every Test in the collection.\n  ForEach(test_info_list_, internal::Delete<TestInfo>);\n}\n\n// Returns the i-th test among all the tests. i can range from 0 to\n// total_test_count() - 1. If i is not in that range, returns NULL.\nconst TestInfo* TestSuite::GetTestInfo(int i) const {\n  const int index = GetElementOr(test_indices_, i, -1);\n  return index < 0 ? nullptr : test_info_list_[index];\n}\n\n// Returns the i-th test among all the tests. i can range from 0 to\n// total_test_count() - 1. If i is not in that range, returns NULL.\nTestInfo* TestSuite::GetMutableTestInfo(int i) {\n  const int index = GetElementOr(test_indices_, i, -1);\n  return index < 0 ? nullptr : test_info_list_[index];\n}\n\n// Adds a test to this test suite.  Will delete the test upon\n// destruction of the TestSuite object.\nvoid TestSuite::AddTestInfo(TestInfo* test_info) {\n  test_info_list_.push_back(test_info);\n  test_indices_.push_back(static_cast<int>(test_indices_.size()));\n}\n\n// Runs every test in this TestSuite.\nvoid TestSuite::Run() {\n  if (!should_run_) return;\n\n  internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();\n  impl->set_current_test_suite(this);\n\n  TestEventListener* repeater = UnitTest::GetInstance()->listeners().repeater();\n\n  // Call both legacy and the new API\n  repeater->OnTestSuiteStart(*this);\n//  Legacy API is deprecated but still available\n#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI\n  repeater->OnTestCaseStart(*this);\n#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI\n\n  impl->os_stack_trace_getter()->UponLeavingGTest();\n  internal::HandleExceptionsInMethodIfSupported(\n      this, &TestSuite::RunSetUpTestSuite, \"SetUpTestSuite()\");\n\n  const internal::TimeInMillis start = internal::GetTimeInMillis();\n  for (int i = 0; i < total_test_count(); i++) {\n    GetMutableTestInfo(i)->Run();\n  }\n  elapsed_time_ = internal::GetTimeInMillis() - start;\n\n  impl->os_stack_trace_getter()->UponLeavingGTest();\n  internal::HandleExceptionsInMethodIfSupported(\n      this, &TestSuite::RunTearDownTestSuite, \"TearDownTestSuite()\");\n\n  // Call both legacy and the new API\n  repeater->OnTestSuiteEnd(*this);\n//  Legacy API is deprecated but still available\n#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI\n  repeater->OnTestCaseEnd(*this);\n#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI\n\n  impl->set_current_test_suite(nullptr);\n}\n\n// Clears the results of all tests in this test suite.\nvoid TestSuite::ClearResult() {\n  ad_hoc_test_result_.Clear();\n  ForEach(test_info_list_, TestInfo::ClearTestResult);\n}\n\n// Shuffles the tests in this test suite.\nvoid TestSuite::ShuffleTests(internal::Random* random) {\n  Shuffle(random, &test_indices_);\n}\n\n// Restores the test order to before the first shuffle.\nvoid TestSuite::UnshuffleTests() {\n  for (size_t i = 0; i < test_indices_.size(); i++) {\n    test_indices_[i] = static_cast<int>(i);\n  }\n}\n\n// Formats a countable noun.  Depending on its quantity, either the\n// singular form or the plural form is used. e.g.\n//\n// FormatCountableNoun(1, \"formula\", \"formuli\") returns \"1 formula\".\n// FormatCountableNoun(5, \"book\", \"books\") returns \"5 books\".\nstatic std::string FormatCountableNoun(int count,\n                                       const char * singular_form,\n                                       const char * plural_form) {\n  return internal::StreamableToString(count) + \" \" +\n      (count == 1 ? singular_form : plural_form);\n}\n\n// Formats the count of tests.\nstatic std::string FormatTestCount(int test_count) {\n  return FormatCountableNoun(test_count, \"test\", \"tests\");\n}\n\n// Formats the count of test suites.\nstatic std::string FormatTestSuiteCount(int test_suite_count) {\n  return FormatCountableNoun(test_suite_count, \"test suite\", \"test suites\");\n}\n\n// Converts a TestPartResult::Type enum to human-friendly string\n// representation.  Both kNonFatalFailure and kFatalFailure are translated\n// to \"Failure\", as the user usually doesn't care about the difference\n// between the two when viewing the test result.\nstatic const char * TestPartResultTypeToString(TestPartResult::Type type) {\n  switch (type) {\n    case TestPartResult::kSkip:\n      return \"Skipped\";\n    case TestPartResult::kSuccess:\n      return \"Success\";\n\n    case TestPartResult::kNonFatalFailure:\n    case TestPartResult::kFatalFailure:\n#ifdef _MSC_VER\n      return \"error: \";\n#else\n      return \"Failure\\n\";\n#endif\n    default:\n      return \"Unknown result type\";\n  }\n}\n\nnamespace internal {\n\n// Prints a TestPartResult to an std::string.\nstatic std::string PrintTestPartResultToString(\n    const TestPartResult& test_part_result) {\n  return (Message()\n          << internal::FormatFileLocation(test_part_result.file_name(),\n                                          test_part_result.line_number())\n          << \" \" << TestPartResultTypeToString(test_part_result.type())\n          << test_part_result.message()).GetString();\n}\n\n// Prints a TestPartResult.\nstatic void PrintTestPartResult(const TestPartResult& test_part_result) {\n  const std::string& result =\n      PrintTestPartResultToString(test_part_result);\n  printf(\"%s\\n\", result.c_str());\n  fflush(stdout);\n  // If the test program runs in Visual Studio or a debugger, the\n  // following statements add the test part result message to the Output\n  // window such that the user can double-click on it to jump to the\n  // corresponding source code location; otherwise they do nothing.\n#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE\n  // We don't call OutputDebugString*() on Windows Mobile, as printing\n  // to stdout is done by OutputDebugString() there already - we don't\n  // want the same message printed twice.\n  ::OutputDebugStringA(result.c_str());\n  ::OutputDebugStringA(\"\\n\");\n#endif\n}\n\n// class PrettyUnitTestResultPrinter\n#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE && \\\n    !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT && !GTEST_OS_WINDOWS_MINGW\n\n// Returns the character attribute for the given color.\nstatic WORD GetColorAttribute(GTestColor color) {\n  switch (color) {\n    case COLOR_RED:    return FOREGROUND_RED;\n    case COLOR_GREEN:  return FOREGROUND_GREEN;\n    case COLOR_YELLOW: return FOREGROUND_RED | FOREGROUND_GREEN;\n    default:           return 0;\n  }\n}\n\nstatic int GetBitOffset(WORD color_mask) {\n  if (color_mask == 0) return 0;\n\n  int bitOffset = 0;\n  while ((color_mask & 1) == 0) {\n    color_mask >>= 1;\n    ++bitOffset;\n  }\n  return bitOffset;\n}\n\nstatic WORD GetNewColor(GTestColor color, WORD old_color_attrs) {\n  // Let's reuse the BG\n  static const WORD background_mask = BACKGROUND_BLUE | BACKGROUND_GREEN |\n                                      BACKGROUND_RED | BACKGROUND_INTENSITY;\n  static const WORD foreground_mask = FOREGROUND_BLUE | FOREGROUND_GREEN |\n                                      FOREGROUND_RED | FOREGROUND_INTENSITY;\n  const WORD existing_bg = old_color_attrs & background_mask;\n\n  WORD new_color =\n      GetColorAttribute(color) | existing_bg | FOREGROUND_INTENSITY;\n  static const int bg_bitOffset = GetBitOffset(background_mask);\n  static const int fg_bitOffset = GetBitOffset(foreground_mask);\n\n  if (((new_color & background_mask) >> bg_bitOffset) ==\n      ((new_color & foreground_mask) >> fg_bitOffset)) {\n    new_color ^= FOREGROUND_INTENSITY;  // invert intensity\n  }\n  return new_color;\n}\n\n#else\n\n// Returns the ANSI color code for the given color.  COLOR_DEFAULT is\n// an invalid input.\nstatic const char* GetAnsiColorCode(GTestColor color) {\n  switch (color) {\n    case COLOR_RED:     return \"1\";\n    case COLOR_GREEN:   return \"2\";\n    case COLOR_YELLOW:  return \"3\";\n    default:\n      return nullptr;\n  };\n}\n\n#endif  // GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE\n\n// Returns true iff Google Test should use colors in the output.\nbool ShouldUseColor(bool stdout_is_tty) {\n  const char* const gtest_color = GTEST_FLAG(color).c_str();\n\n  if (String::CaseInsensitiveCStringEquals(gtest_color, \"auto\")) {\n#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MINGW\n    // On Windows the TERM variable is usually not set, but the\n    // console there does support colors.\n    return stdout_is_tty;\n#else\n    // On non-Windows platforms, we rely on the TERM variable.\n    const char* const term = posix::GetEnv(\"TERM\");\n    const bool term_supports_color =\n        String::CStringEquals(term, \"xterm\") ||\n        String::CStringEquals(term, \"xterm-color\") ||\n        String::CStringEquals(term, \"xterm-256color\") ||\n        String::CStringEquals(term, \"screen\") ||\n        String::CStringEquals(term, \"screen-256color\") ||\n        String::CStringEquals(term, \"tmux\") ||\n        String::CStringEquals(term, \"tmux-256color\") ||\n        String::CStringEquals(term, \"rxvt-unicode\") ||\n        String::CStringEquals(term, \"rxvt-unicode-256color\") ||\n        String::CStringEquals(term, \"linux\") ||\n        String::CStringEquals(term, \"cygwin\");\n    return stdout_is_tty && term_supports_color;\n#endif  // GTEST_OS_WINDOWS\n  }\n\n  return String::CaseInsensitiveCStringEquals(gtest_color, \"yes\") ||\n      String::CaseInsensitiveCStringEquals(gtest_color, \"true\") ||\n      String::CaseInsensitiveCStringEquals(gtest_color, \"t\") ||\n      String::CStringEquals(gtest_color, \"1\");\n  // We take \"yes\", \"true\", \"t\", and \"1\" as meaning \"yes\".  If the\n  // value is neither one of these nor \"auto\", we treat it as \"no\" to\n  // be conservative.\n}\n\n// Helpers for printing colored strings to stdout. Note that on Windows, we\n// cannot simply emit special characters and have the terminal change colors.\n// This routine must actually emit the characters rather than return a string\n// that would be colored when printed, as can be done on Linux.\nvoid ColoredPrintf(GTestColor color, const char* fmt, ...) {\n  va_list args;\n  va_start(args, fmt);\n\n#if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_ZOS || GTEST_OS_IOS || \\\n    GTEST_OS_WINDOWS_PHONE || GTEST_OS_WINDOWS_RT\n  const bool use_color = AlwaysFalse();\n#else\n  static const bool in_color_mode =\n      ShouldUseColor(posix::IsATTY(posix::FileNo(stdout)) != 0);\n  const bool use_color = in_color_mode && (color != COLOR_DEFAULT);\n#endif  // GTEST_OS_WINDOWS_MOBILE || GTEST_OS_ZOS\n\n  if (!use_color) {\n    vprintf(fmt, args);\n    va_end(args);\n    return;\n  }\n\n#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE && \\\n    !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT && !GTEST_OS_WINDOWS_MINGW\n  const HANDLE stdout_handle = GetStdHandle(STD_OUTPUT_HANDLE);\n\n  // Gets the current text color.\n  CONSOLE_SCREEN_BUFFER_INFO buffer_info;\n  GetConsoleScreenBufferInfo(stdout_handle, &buffer_info);\n  const WORD old_color_attrs = buffer_info.wAttributes;\n  const WORD new_color = GetNewColor(color, old_color_attrs);\n\n  // We need to flush the stream buffers into the console before each\n  // SetConsoleTextAttribute call lest it affect the text that is already\n  // printed but has not yet reached the console.\n  fflush(stdout);\n  SetConsoleTextAttribute(stdout_handle, new_color);\n\n  vprintf(fmt, args);\n\n  fflush(stdout);\n  // Restores the text color.\n  SetConsoleTextAttribute(stdout_handle, old_color_attrs);\n#else\n  printf(\"\\033[0;3%sm\", GetAnsiColorCode(color));\n  vprintf(fmt, args);\n  printf(\"\\033[m\");  // Resets the terminal to default.\n#endif  // GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE\n  va_end(args);\n}\n\n// Text printed in Google Test's text output and --gtest_list_tests\n// output to label the type parameter and value parameter for a test.\nstatic const char kTypeParamLabel[] = \"TypeParam\";\nstatic const char kValueParamLabel[] = \"GetParam()\";\n\nstatic void PrintFullTestCommentIfPresent(const TestInfo& test_info) {\n  const char* const type_param = test_info.type_param();\n  const char* const value_param = test_info.value_param();\n\n  if (type_param != nullptr || value_param != nullptr) {\n    printf(\", where \");\n    if (type_param != nullptr) {\n      printf(\"%s = %s\", kTypeParamLabel, type_param);\n      if (value_param != nullptr) printf(\" and \");\n    }\n    if (value_param != nullptr) {\n      printf(\"%s = %s\", kValueParamLabel, value_param);\n    }\n  }\n}\n\n// This class implements the TestEventListener interface.\n//\n// Class PrettyUnitTestResultPrinter is copyable.\nclass PrettyUnitTestResultPrinter : public TestEventListener {\n public:\n  PrettyUnitTestResultPrinter() {}\n  static void PrintTestName(const char* test_suite, const char* test) {\n    printf(\"%s.%s\", test_suite, test);\n  }\n\n  // The following methods override what's in the TestEventListener class.\n  void OnTestProgramStart(const UnitTest& /*unit_test*/) override {}\n  void OnTestIterationStart(const UnitTest& unit_test, int iteration) override;\n  void OnEnvironmentsSetUpStart(const UnitTest& unit_test) override;\n  void OnEnvironmentsSetUpEnd(const UnitTest& /*unit_test*/) override {}\n  void OnTestCaseStart(const TestSuite& test_suite) override;\n  void OnTestStart(const TestInfo& test_info) override;\n  void OnTestPartResult(const TestPartResult& result) override;\n  void OnTestEnd(const TestInfo& test_info) override;\n  void OnTestCaseEnd(const TestSuite& test_suite) override;\n  void OnEnvironmentsTearDownStart(const UnitTest& unit_test) override;\n  void OnEnvironmentsTearDownEnd(const UnitTest& /*unit_test*/) override {}\n  void OnTestIterationEnd(const UnitTest& unit_test, int iteration) override;\n  void OnTestProgramEnd(const UnitTest& /*unit_test*/) override {}\n\n private:\n  static void PrintFailedTests(const UnitTest& unit_test);\n  static void PrintSkippedTests(const UnitTest& unit_test);\n};\n\n  // Fired before each iteration of tests starts.\nvoid PrettyUnitTestResultPrinter::OnTestIterationStart(\n    const UnitTest& unit_test, int iteration) {\n  if (GTEST_FLAG(repeat) != 1)\n    printf(\"\\nRepeating all tests (iteration %d) . . .\\n\\n\", iteration + 1);\n\n  const char* const filter = GTEST_FLAG(filter).c_str();\n\n  // Prints the filter if it's not *.  This reminds the user that some\n  // tests may be skipped.\n  if (!String::CStringEquals(filter, kUniversalFilter)) {\n    ColoredPrintf(COLOR_YELLOW,\n                  \"Note: %s filter = %s\\n\", GTEST_NAME_, filter);\n  }\n\n  if (internal::ShouldShard(kTestTotalShards, kTestShardIndex, false)) {\n    const Int32 shard_index = Int32FromEnvOrDie(kTestShardIndex, -1);\n    ColoredPrintf(COLOR_YELLOW,\n                  \"Note: This is test shard %d of %s.\\n\",\n                  static_cast<int>(shard_index) + 1,\n                  internal::posix::GetEnv(kTestTotalShards));\n  }\n\n  if (GTEST_FLAG(shuffle)) {\n    ColoredPrintf(COLOR_YELLOW,\n                  \"Note: Randomizing tests' orders with a seed of %d .\\n\",\n                  unit_test.random_seed());\n  }\n\n  ColoredPrintf(COLOR_GREEN,  \"[==========] \");\n  printf(\"Running %s from %s.\\n\",\n         FormatTestCount(unit_test.test_to_run_count()).c_str(),\n         FormatTestSuiteCount(unit_test.test_suite_to_run_count()).c_str());\n  fflush(stdout);\n}\n\nvoid PrettyUnitTestResultPrinter::OnEnvironmentsSetUpStart(\n    const UnitTest& /*unit_test*/) {\n  ColoredPrintf(COLOR_GREEN,  \"[----------] \");\n  printf(\"Global test environment set-up.\\n\");\n  fflush(stdout);\n}\n\nvoid PrettyUnitTestResultPrinter::OnTestCaseStart(const TestSuite& test_suite) {\n  const std::string counts =\n      FormatCountableNoun(test_suite.test_to_run_count(), \"test\", \"tests\");\n  ColoredPrintf(COLOR_GREEN, \"[----------] \");\n  printf(\"%s from %s\", counts.c_str(), test_suite.name());\n  if (test_suite.type_param() == nullptr) {\n    printf(\"\\n\");\n  } else {\n    printf(\", where %s = %s\\n\", kTypeParamLabel, test_suite.type_param());\n  }\n  fflush(stdout);\n}\n\nvoid PrettyUnitTestResultPrinter::OnTestStart(const TestInfo& test_info) {\n  ColoredPrintf(COLOR_GREEN,  \"[ RUN      ] \");\n  PrintTestName(test_info.test_suite_name(), test_info.name());\n  printf(\"\\n\");\n  fflush(stdout);\n}\n\n// Called after an assertion failure.\nvoid PrettyUnitTestResultPrinter::OnTestPartResult(\n    const TestPartResult& result) {\n  switch (result.type()) {\n    // If the test part succeeded, or was skipped,\n    // we don't need to do anything.\n    case TestPartResult::kSkip:\n    case TestPartResult::kSuccess:\n      return;\n    default:\n      // Print failure message from the assertion\n      // (e.g. expected this and got that).\n      PrintTestPartResult(result);\n      fflush(stdout);\n  }\n}\n\nvoid PrettyUnitTestResultPrinter::OnTestEnd(const TestInfo& test_info) {\n  if (test_info.result()->Passed()) {\n    ColoredPrintf(COLOR_GREEN, \"[       OK ] \");\n  } else if (test_info.result()->Skipped()) {\n    ColoredPrintf(COLOR_GREEN, \"[  SKIPPED ] \");\n  } else {\n    ColoredPrintf(COLOR_RED, \"[  FAILED  ] \");\n  }\n  PrintTestName(test_info.test_suite_name(), test_info.name());\n  if (test_info.result()->Failed())\n    PrintFullTestCommentIfPresent(test_info);\n\n  if (GTEST_FLAG(print_time)) {\n    printf(\" (%s ms)\\n\", internal::StreamableToString(\n           test_info.result()->elapsed_time()).c_str());\n  } else {\n    printf(\"\\n\");\n  }\n  fflush(stdout);\n}\n\nvoid PrettyUnitTestResultPrinter::OnTestCaseEnd(const TestSuite& test_suite) {\n  if (!GTEST_FLAG(print_time)) return;\n\n  const std::string counts =\n      FormatCountableNoun(test_suite.test_to_run_count(), \"test\", \"tests\");\n  ColoredPrintf(COLOR_GREEN, \"[----------] \");\n  printf(\"%s from %s (%s ms total)\\n\\n\", counts.c_str(), test_suite.name(),\n         internal::StreamableToString(test_suite.elapsed_time()).c_str());\n  fflush(stdout);\n}\n\nvoid PrettyUnitTestResultPrinter::OnEnvironmentsTearDownStart(\n    const UnitTest& /*unit_test*/) {\n  ColoredPrintf(COLOR_GREEN,  \"[----------] \");\n  printf(\"Global test environment tear-down\\n\");\n  fflush(stdout);\n}\n\n// Internal helper for printing the list of failed tests.\nvoid PrettyUnitTestResultPrinter::PrintFailedTests(const UnitTest& unit_test) {\n  const int failed_test_count = unit_test.failed_test_count();\n  if (failed_test_count == 0) {\n    return;\n  }\n\n  for (int i = 0; i < unit_test.total_test_suite_count(); ++i) {\n    const TestSuite& test_suite = *unit_test.GetTestSuite(i);\n    if (!test_suite.should_run() || (test_suite.failed_test_count() == 0)) {\n      continue;\n    }\n    for (int j = 0; j < test_suite.total_test_count(); ++j) {\n      const TestInfo& test_info = *test_suite.GetTestInfo(j);\n      if (!test_info.should_run() || !test_info.result()->Failed()) {\n        continue;\n      }\n      ColoredPrintf(COLOR_RED, \"[  FAILED  ] \");\n      printf(\"%s.%s\", test_suite.name(), test_info.name());\n      PrintFullTestCommentIfPresent(test_info);\n      printf(\"\\n\");\n    }\n  }\n}\n\n// Internal helper for printing the list of skipped tests.\nvoid PrettyUnitTestResultPrinter::PrintSkippedTests(const UnitTest& unit_test) {\n  const int skipped_test_count = unit_test.skipped_test_count();\n  if (skipped_test_count == 0) {\n    return;\n  }\n\n  for (int i = 0; i < unit_test.total_test_suite_count(); ++i) {\n    const TestSuite& test_suite = *unit_test.GetTestSuite(i);\n    if (!test_suite.should_run() || (test_suite.skipped_test_count() == 0)) {\n      continue;\n    }\n    for (int j = 0; j < test_suite.total_test_count(); ++j) {\n      const TestInfo& test_info = *test_suite.GetTestInfo(j);\n      if (!test_info.should_run() || !test_info.result()->Skipped()) {\n        continue;\n      }\n      ColoredPrintf(COLOR_GREEN, \"[  SKIPPED ] \");\n      printf(\"%s.%s\", test_suite.name(), test_info.name());\n      printf(\"\\n\");\n    }\n  }\n}\n\nvoid PrettyUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test,\n                                                     int /*iteration*/) {\n  ColoredPrintf(COLOR_GREEN,  \"[==========] \");\n  printf(\"%s from %s ran.\",\n         FormatTestCount(unit_test.test_to_run_count()).c_str(),\n         FormatTestSuiteCount(unit_test.test_suite_to_run_count()).c_str());\n  if (GTEST_FLAG(print_time)) {\n    printf(\" (%s ms total)\",\n           internal::StreamableToString(unit_test.elapsed_time()).c_str());\n  }\n  printf(\"\\n\");\n  ColoredPrintf(COLOR_GREEN,  \"[  PASSED  ] \");\n  printf(\"%s.\\n\", FormatTestCount(unit_test.successful_test_count()).c_str());\n\n  const int skipped_test_count = unit_test.skipped_test_count();\n  if (skipped_test_count > 0) {\n    ColoredPrintf(COLOR_GREEN, \"[  SKIPPED ] \");\n    printf(\"%s, listed below:\\n\", FormatTestCount(skipped_test_count).c_str());\n    PrintSkippedTests(unit_test);\n  }\n\n  int num_failures = unit_test.failed_test_count();\n  if (!unit_test.Passed()) {\n    const int failed_test_count = unit_test.failed_test_count();\n    ColoredPrintf(COLOR_RED,  \"[  FAILED  ] \");\n    printf(\"%s, listed below:\\n\", FormatTestCount(failed_test_count).c_str());\n    PrintFailedTests(unit_test);\n    printf(\"\\n%2d FAILED %s\\n\", num_failures,\n                        num_failures == 1 ? \"TEST\" : \"TESTS\");\n  }\n\n  int num_disabled = unit_test.reportable_disabled_test_count();\n  if (num_disabled && !GTEST_FLAG(also_run_disabled_tests)) {\n    if (!num_failures) {\n      printf(\"\\n\");  // Add a spacer if no FAILURE banner is displayed.\n    }\n    ColoredPrintf(COLOR_YELLOW,\n                  \"  YOU HAVE %d DISABLED %s\\n\\n\",\n                  num_disabled,\n                  num_disabled == 1 ? \"TEST\" : \"TESTS\");\n  }\n  // Ensure that Google Test output is printed before, e.g., heapchecker output.\n  fflush(stdout);\n}\n\n// End PrettyUnitTestResultPrinter\n\n// class TestEventRepeater\n//\n// This class forwards events to other event listeners.\nclass TestEventRepeater : public TestEventListener {\n public:\n  TestEventRepeater() : forwarding_enabled_(true) {}\n  ~TestEventRepeater() override;\n  void Append(TestEventListener *listener);\n  TestEventListener* Release(TestEventListener* listener);\n\n  // Controls whether events will be forwarded to listeners_. Set to false\n  // in death test child processes.\n  bool forwarding_enabled() const { return forwarding_enabled_; }\n  void set_forwarding_enabled(bool enable) { forwarding_enabled_ = enable; }\n\n  void OnTestProgramStart(const UnitTest& unit_test) override;\n  void OnTestIterationStart(const UnitTest& unit_test, int iteration) override;\n  void OnEnvironmentsSetUpStart(const UnitTest& unit_test) override;\n  void OnEnvironmentsSetUpEnd(const UnitTest& unit_test) override;\n//  Legacy API is deprecated but still available\n#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI\n  void OnTestCaseStart(const TestSuite& parameter) override;\n#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI\n  void OnTestSuiteStart(const TestSuite& parameter) override;\n  void OnTestStart(const TestInfo& test_info) override;\n  void OnTestPartResult(const TestPartResult& result) override;\n  void OnTestEnd(const TestInfo& test_info) override;\n//  Legacy API is deprecated but still available\n#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI\n  void OnTestCaseEnd(const TestSuite& parameter) override;\n#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI\n  void OnTestSuiteEnd(const TestSuite& parameter) override;\n  void OnEnvironmentsTearDownStart(const UnitTest& unit_test) override;\n  void OnEnvironmentsTearDownEnd(const UnitTest& unit_test) override;\n  void OnTestIterationEnd(const UnitTest& unit_test, int iteration) override;\n  void OnTestProgramEnd(const UnitTest& unit_test) override;\n\n private:\n  // Controls whether events will be forwarded to listeners_. Set to false\n  // in death test child processes.\n  bool forwarding_enabled_;\n  // The list of listeners that receive events.\n  std::vector<TestEventListener*> listeners_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(TestEventRepeater);\n};\n\nTestEventRepeater::~TestEventRepeater() {\n  ForEach(listeners_, Delete<TestEventListener>);\n}\n\nvoid TestEventRepeater::Append(TestEventListener *listener) {\n  listeners_.push_back(listener);\n}\n\nTestEventListener* TestEventRepeater::Release(TestEventListener *listener) {\n  for (size_t i = 0; i < listeners_.size(); ++i) {\n    if (listeners_[i] == listener) {\n      listeners_.erase(listeners_.begin() + i);\n      return listener;\n    }\n  }\n\n  return nullptr;\n}\n\n// Since most methods are very similar, use macros to reduce boilerplate.\n// This defines a member that forwards the call to all listeners.\n#define GTEST_REPEATER_METHOD_(Name, Type) \\\nvoid TestEventRepeater::Name(const Type& parameter) { \\\n  if (forwarding_enabled_) { \\\n    for (size_t i = 0; i < listeners_.size(); i++) { \\\n      listeners_[i]->Name(parameter); \\\n    } \\\n  } \\\n}\n// This defines a member that forwards the call to all listeners in reverse\n// order.\n#define GTEST_REVERSE_REPEATER_METHOD_(Name, Type) \\\nvoid TestEventRepeater::Name(const Type& parameter) { \\\n  if (forwarding_enabled_) { \\\n    for (int i = static_cast<int>(listeners_.size()) - 1; i >= 0; i--) { \\\n      listeners_[i]->Name(parameter); \\\n    } \\\n  } \\\n}\n\nGTEST_REPEATER_METHOD_(OnTestProgramStart, UnitTest)\nGTEST_REPEATER_METHOD_(OnEnvironmentsSetUpStart, UnitTest)\n//  Legacy API is deprecated but still available\n#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_\nGTEST_REPEATER_METHOD_(OnTestCaseStart, TestSuite)\n#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI_\nGTEST_REPEATER_METHOD_(OnTestSuiteStart, TestSuite)\nGTEST_REPEATER_METHOD_(OnTestStart, TestInfo)\nGTEST_REPEATER_METHOD_(OnTestPartResult, TestPartResult)\nGTEST_REPEATER_METHOD_(OnEnvironmentsTearDownStart, UnitTest)\nGTEST_REVERSE_REPEATER_METHOD_(OnEnvironmentsSetUpEnd, UnitTest)\nGTEST_REVERSE_REPEATER_METHOD_(OnEnvironmentsTearDownEnd, UnitTest)\nGTEST_REVERSE_REPEATER_METHOD_(OnTestEnd, TestInfo)\n//  Legacy API is deprecated but still available\n#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_\nGTEST_REVERSE_REPEATER_METHOD_(OnTestCaseEnd, TestSuite)\n#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI_\nGTEST_REVERSE_REPEATER_METHOD_(OnTestSuiteEnd, TestSuite)\nGTEST_REVERSE_REPEATER_METHOD_(OnTestProgramEnd, UnitTest)\n\n#undef GTEST_REPEATER_METHOD_\n#undef GTEST_REVERSE_REPEATER_METHOD_\n\nvoid TestEventRepeater::OnTestIterationStart(const UnitTest& unit_test,\n                                             int iteration) {\n  if (forwarding_enabled_) {\n    for (size_t i = 0; i < listeners_.size(); i++) {\n      listeners_[i]->OnTestIterationStart(unit_test, iteration);\n    }\n  }\n}\n\nvoid TestEventRepeater::OnTestIterationEnd(const UnitTest& unit_test,\n                                           int iteration) {\n  if (forwarding_enabled_) {\n    for (int i = static_cast<int>(listeners_.size()) - 1; i >= 0; i--) {\n      listeners_[i]->OnTestIterationEnd(unit_test, iteration);\n    }\n  }\n}\n\n// End TestEventRepeater\n\n// This class generates an XML output file.\nclass XmlUnitTestResultPrinter : public EmptyTestEventListener {\n public:\n  explicit XmlUnitTestResultPrinter(const char* output_file);\n\n  void OnTestIterationEnd(const UnitTest& unit_test, int iteration) override;\n  void ListTestsMatchingFilter(const std::vector<TestSuite*>& test_suites);\n\n  // Prints an XML summary of all unit tests.\n  static void PrintXmlTestsList(std::ostream* stream,\n                                const std::vector<TestSuite*>& test_suites);\n\n private:\n  // Is c a whitespace character that is normalized to a space character\n  // when it appears in an XML attribute value?\n  static bool IsNormalizableWhitespace(char c) {\n    return c == 0x9 || c == 0xA || c == 0xD;\n  }\n\n  // May c appear in a well-formed XML document?\n  static bool IsValidXmlCharacter(char c) {\n    return IsNormalizableWhitespace(c) || c >= 0x20;\n  }\n\n  // Returns an XML-escaped copy of the input string str.  If\n  // is_attribute is true, the text is meant to appear as an attribute\n  // value, and normalizable whitespace is preserved by replacing it\n  // with character references.\n  static std::string EscapeXml(const std::string& str, bool is_attribute);\n\n  // Returns the given string with all characters invalid in XML removed.\n  static std::string RemoveInvalidXmlCharacters(const std::string& str);\n\n  // Convenience wrapper around EscapeXml when str is an attribute value.\n  static std::string EscapeXmlAttribute(const std::string& str) {\n    return EscapeXml(str, true);\n  }\n\n  // Convenience wrapper around EscapeXml when str is not an attribute value.\n  static std::string EscapeXmlText(const char* str) {\n    return EscapeXml(str, false);\n  }\n\n  // Verifies that the given attribute belongs to the given element and\n  // streams the attribute as XML.\n  static void OutputXmlAttribute(std::ostream* stream,\n                                 const std::string& element_name,\n                                 const std::string& name,\n                                 const std::string& value);\n\n  // Streams an XML CDATA section, escaping invalid CDATA sequences as needed.\n  static void OutputXmlCDataSection(::std::ostream* stream, const char* data);\n\n  // Streams an XML representation of a TestInfo object.\n  static void OutputXmlTestInfo(::std::ostream* stream,\n                                const char* test_suite_name,\n                                const TestInfo& test_info);\n\n  // Prints an XML representation of a TestSuite object\n  static void PrintXmlTestSuite(::std::ostream* stream,\n                                const TestSuite& test_suite);\n\n  // Prints an XML summary of unit_test to output stream out.\n  static void PrintXmlUnitTest(::std::ostream* stream,\n                               const UnitTest& unit_test);\n\n  // Produces a string representing the test properties in a result as space\n  // delimited XML attributes based on the property key=\"value\" pairs.\n  // When the std::string is not empty, it includes a space at the beginning,\n  // to delimit this attribute from prior attributes.\n  static std::string TestPropertiesAsXmlAttributes(const TestResult& result);\n\n  // Streams an XML representation of the test properties of a TestResult\n  // object.\n  static void OutputXmlTestProperties(std::ostream* stream,\n                                      const TestResult& result);\n\n  // The output file.\n  const std::string output_file_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(XmlUnitTestResultPrinter);\n};\n\n// Creates a new XmlUnitTestResultPrinter.\nXmlUnitTestResultPrinter::XmlUnitTestResultPrinter(const char* output_file)\n    : output_file_(output_file) {\n  if (output_file_.empty()) {\n    GTEST_LOG_(FATAL) << \"XML output file may not be null\";\n  }\n}\n\n// Called after the unit test ends.\nvoid XmlUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test,\n                                                  int /*iteration*/) {\n  FILE* xmlout = OpenFileForWriting(output_file_);\n  std::stringstream stream;\n  PrintXmlUnitTest(&stream, unit_test);\n  fprintf(xmlout, \"%s\", StringStreamToString(&stream).c_str());\n  fclose(xmlout);\n}\n\nvoid XmlUnitTestResultPrinter::ListTestsMatchingFilter(\n    const std::vector<TestSuite*>& test_suites) {\n  FILE* xmlout = OpenFileForWriting(output_file_);\n  std::stringstream stream;\n  PrintXmlTestsList(&stream, test_suites);\n  fprintf(xmlout, \"%s\", StringStreamToString(&stream).c_str());\n  fclose(xmlout);\n}\n\n// Returns an XML-escaped copy of the input string str.  If is_attribute\n// is true, the text is meant to appear as an attribute value, and\n// normalizable whitespace is preserved by replacing it with character\n// references.\n//\n// Invalid XML characters in str, if any, are stripped from the output.\n// It is expected that most, if not all, of the text processed by this\n// module will consist of ordinary English text.\n// If this module is ever modified to produce version 1.1 XML output,\n// most invalid characters can be retained using character references.\nstd::string XmlUnitTestResultPrinter::EscapeXml(\n    const std::string& str, bool is_attribute) {\n  Message m;\n\n  for (size_t i = 0; i < str.size(); ++i) {\n    const char ch = str[i];\n    switch (ch) {\n      case '<':\n        m << \"&lt;\";\n        break;\n      case '>':\n        m << \"&gt;\";\n        break;\n      case '&':\n        m << \"&amp;\";\n        break;\n      case '\\'':\n        if (is_attribute)\n          m << \"&apos;\";\n        else\n          m << '\\'';\n        break;\n      case '\"':\n        if (is_attribute)\n          m << \"&quot;\";\n        else\n          m << '\"';\n        break;\n      default:\n        if (IsValidXmlCharacter(ch)) {\n          if (is_attribute && IsNormalizableWhitespace(ch))\n            m << \"&#x\" << String::FormatByte(static_cast<unsigned char>(ch))\n              << \";\";\n          else\n            m << ch;\n        }\n        break;\n    }\n  }\n\n  return m.GetString();\n}\n\n// Returns the given string with all characters invalid in XML removed.\n// Currently invalid characters are dropped from the string. An\n// alternative is to replace them with certain characters such as . or ?.\nstd::string XmlUnitTestResultPrinter::RemoveInvalidXmlCharacters(\n    const std::string& str) {\n  std::string output;\n  output.reserve(str.size());\n  for (std::string::const_iterator it = str.begin(); it != str.end(); ++it)\n    if (IsValidXmlCharacter(*it))\n      output.push_back(*it);\n\n  return output;\n}\n\n// The following routines generate an XML representation of a UnitTest\n// object.\n// GOOGLETEST_CM0009 DO NOT DELETE\n//\n// This is how Google Test concepts map to the DTD:\n//\n// <testsuites name=\"AllTests\">        <-- corresponds to a UnitTest object\n//   <testsuite name=\"testcase-name\">  <-- corresponds to a TestSuite object\n//     <testcase name=\"test-name\">     <-- corresponds to a TestInfo object\n//       <failure message=\"...\">...</failure>\n//       <failure message=\"...\">...</failure>\n//       <failure message=\"...\">...</failure>\n//                                     <-- individual assertion failures\n//     </testcase>\n//   </testsuite>\n// </testsuites>\n\n// Formats the given time in milliseconds as seconds.\nstd::string FormatTimeInMillisAsSeconds(TimeInMillis ms) {\n  ::std::stringstream ss;\n  ss << (static_cast<double>(ms) * 1e-3);\n  return ss.str();\n}\n\nstatic bool PortableLocaltime(time_t seconds, struct tm* out) {\n#if defined(_MSC_VER)\n  return localtime_s(out, &seconds) == 0;\n#elif defined(__MINGW32__) || defined(__MINGW64__)\n  // MINGW <time.h> provides neither localtime_r nor localtime_s, but uses\n  // Windows' localtime(), which has a thread-local tm buffer.\n  struct tm* tm_ptr = localtime(&seconds);  // NOLINT\n  if (tm_ptr == nullptr) return false;\n  *out = *tm_ptr;\n  return true;\n#else\n  return localtime_r(&seconds, out) != nullptr;\n#endif\n}\n\n// Converts the given epoch time in milliseconds to a date string in the ISO\n// 8601 format, without the timezone information.\nstd::string FormatEpochTimeInMillisAsIso8601(TimeInMillis ms) {\n  struct tm time_struct;\n  if (!PortableLocaltime(static_cast<time_t>(ms / 1000), &time_struct))\n    return \"\";\n  // YYYY-MM-DDThh:mm:ss\n  return StreamableToString(time_struct.tm_year + 1900) + \"-\" +\n      String::FormatIntWidth2(time_struct.tm_mon + 1) + \"-\" +\n      String::FormatIntWidth2(time_struct.tm_mday) + \"T\" +\n      String::FormatIntWidth2(time_struct.tm_hour) + \":\" +\n      String::FormatIntWidth2(time_struct.tm_min) + \":\" +\n      String::FormatIntWidth2(time_struct.tm_sec);\n}\n\n// Streams an XML CDATA section, escaping invalid CDATA sequences as needed.\nvoid XmlUnitTestResultPrinter::OutputXmlCDataSection(::std::ostream* stream,\n                                                     const char* data) {\n  const char* segment = data;\n  *stream << \"<![CDATA[\";\n  for (;;) {\n    const char* const next_segment = strstr(segment, \"]]>\");\n    if (next_segment != nullptr) {\n      stream->write(\n          segment, static_cast<std::streamsize>(next_segment - segment));\n      *stream << \"]]>]]&gt;<![CDATA[\";\n      segment = next_segment + strlen(\"]]>\");\n    } else {\n      *stream << segment;\n      break;\n    }\n  }\n  *stream << \"]]>\";\n}\n\nvoid XmlUnitTestResultPrinter::OutputXmlAttribute(\n    std::ostream* stream,\n    const std::string& element_name,\n    const std::string& name,\n    const std::string& value) {\n  const std::vector<std::string>& allowed_names =\n      GetReservedAttributesForElement(element_name);\n\n  GTEST_CHECK_(std::find(allowed_names.begin(), allowed_names.end(), name) !=\n                   allowed_names.end())\n      << \"Attribute \" << name << \" is not allowed for element <\" << element_name\n      << \">.\";\n\n  *stream << \" \" << name << \"=\\\"\" << EscapeXmlAttribute(value) << \"\\\"\";\n}\n\n// Prints an XML representation of a TestInfo object.\nvoid XmlUnitTestResultPrinter::OutputXmlTestInfo(::std::ostream* stream,\n                                                 const char* test_suite_name,\n                                                 const TestInfo& test_info) {\n  const TestResult& result = *test_info.result();\n  const std::string kTestsuite = \"testcase\";\n\n  if (test_info.is_in_another_shard()) {\n    return;\n  }\n\n  *stream << \"    <testcase\";\n  OutputXmlAttribute(stream, kTestsuite, \"name\", test_info.name());\n\n  if (test_info.value_param() != nullptr) {\n    OutputXmlAttribute(stream, kTestsuite, \"value_param\",\n                       test_info.value_param());\n  }\n  if (test_info.type_param() != nullptr) {\n    OutputXmlAttribute(stream, kTestsuite, \"type_param\",\n                       test_info.type_param());\n  }\n  if (GTEST_FLAG(list_tests)) {\n    OutputXmlAttribute(stream, kTestsuite, \"file\", test_info.file());\n    OutputXmlAttribute(stream, kTestsuite, \"line\",\n                       StreamableToString(test_info.line()));\n    *stream << \" />\\n\";\n    return;\n  }\n\n  OutputXmlAttribute(\n      stream, kTestsuite, \"status\",\n      result.Skipped() ? \"skipped\" : test_info.should_run() ? \"run\" : \"notrun\");\n  OutputXmlAttribute(stream, kTestsuite, \"time\",\n                     FormatTimeInMillisAsSeconds(result.elapsed_time()));\n  OutputXmlAttribute(stream, kTestsuite, \"classname\", test_suite_name);\n\n  int failures = 0;\n  for (int i = 0; i < result.total_part_count(); ++i) {\n    const TestPartResult& part = result.GetTestPartResult(i);\n    if (part.failed()) {\n      if (++failures == 1) {\n        *stream << \">\\n\";\n      }\n      const std::string location =\n          internal::FormatCompilerIndependentFileLocation(part.file_name(),\n                                                          part.line_number());\n      const std::string summary = location + \"\\n\" + part.summary();\n      *stream << \"      <failure message=\\\"\"\n              << EscapeXmlAttribute(summary.c_str())\n              << \"\\\" type=\\\"\\\">\";\n      const std::string detail = location + \"\\n\" + part.message();\n      OutputXmlCDataSection(stream, RemoveInvalidXmlCharacters(detail).c_str());\n      *stream << \"</failure>\\n\";\n    }\n  }\n\n  if (failures == 0 && result.test_property_count() == 0) {\n    *stream << \" />\\n\";\n  } else {\n    if (failures == 0) {\n      *stream << \">\\n\";\n    }\n    OutputXmlTestProperties(stream, result);\n    *stream << \"    </testcase>\\n\";\n  }\n}\n\n// Prints an XML representation of a TestSuite object\nvoid XmlUnitTestResultPrinter::PrintXmlTestSuite(std::ostream* stream,\n                                                 const TestSuite& test_suite) {\n  const std::string kTestsuite = \"testsuite\";\n  *stream << \"  <\" << kTestsuite;\n  OutputXmlAttribute(stream, kTestsuite, \"name\", test_suite.name());\n  OutputXmlAttribute(stream, kTestsuite, \"tests\",\n                     StreamableToString(test_suite.reportable_test_count()));\n  if (!GTEST_FLAG(list_tests)) {\n    OutputXmlAttribute(stream, kTestsuite, \"failures\",\n                       StreamableToString(test_suite.failed_test_count()));\n    OutputXmlAttribute(\n        stream, kTestsuite, \"disabled\",\n        StreamableToString(test_suite.reportable_disabled_test_count()));\n    OutputXmlAttribute(stream, kTestsuite, \"errors\", \"0\");\n    OutputXmlAttribute(stream, kTestsuite, \"time\",\n                       FormatTimeInMillisAsSeconds(test_suite.elapsed_time()));\n    *stream << TestPropertiesAsXmlAttributes(test_suite.ad_hoc_test_result());\n  }\n  *stream << \">\\n\";\n  for (int i = 0; i < test_suite.total_test_count(); ++i) {\n    if (test_suite.GetTestInfo(i)->is_reportable())\n      OutputXmlTestInfo(stream, test_suite.name(), *test_suite.GetTestInfo(i));\n  }\n  *stream << \"  </\" << kTestsuite << \">\\n\";\n}\n\n// Prints an XML summary of unit_test to output stream out.\nvoid XmlUnitTestResultPrinter::PrintXmlUnitTest(std::ostream* stream,\n                                                const UnitTest& unit_test) {\n  const std::string kTestsuites = \"testsuites\";\n\n  *stream << \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\";\n  *stream << \"<\" << kTestsuites;\n\n  OutputXmlAttribute(stream, kTestsuites, \"tests\",\n                     StreamableToString(unit_test.reportable_test_count()));\n  OutputXmlAttribute(stream, kTestsuites, \"failures\",\n                     StreamableToString(unit_test.failed_test_count()));\n  OutputXmlAttribute(\n      stream, kTestsuites, \"disabled\",\n      StreamableToString(unit_test.reportable_disabled_test_count()));\n  OutputXmlAttribute(stream, kTestsuites, \"errors\", \"0\");\n  OutputXmlAttribute(\n      stream, kTestsuites, \"timestamp\",\n      FormatEpochTimeInMillisAsIso8601(unit_test.start_timestamp()));\n  OutputXmlAttribute(stream, kTestsuites, \"time\",\n                     FormatTimeInMillisAsSeconds(unit_test.elapsed_time()));\n\n  if (GTEST_FLAG(shuffle)) {\n    OutputXmlAttribute(stream, kTestsuites, \"random_seed\",\n                       StreamableToString(unit_test.random_seed()));\n  }\n  *stream << TestPropertiesAsXmlAttributes(unit_test.ad_hoc_test_result());\n\n  OutputXmlAttribute(stream, kTestsuites, \"name\", \"AllTests\");\n  *stream << \">\\n\";\n\n  for (int i = 0; i < unit_test.total_test_suite_count(); ++i) {\n    if (unit_test.GetTestSuite(i)->reportable_test_count() > 0)\n      PrintXmlTestSuite(stream, *unit_test.GetTestSuite(i));\n  }\n  *stream << \"</\" << kTestsuites << \">\\n\";\n}\n\nvoid XmlUnitTestResultPrinter::PrintXmlTestsList(\n    std::ostream* stream, const std::vector<TestSuite*>& test_suites) {\n  const std::string kTestsuites = \"testsuites\";\n\n  *stream << \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\";\n  *stream << \"<\" << kTestsuites;\n\n  int total_tests = 0;\n  for (auto test_suite : test_suites) {\n    total_tests += test_suite->total_test_count();\n  }\n  OutputXmlAttribute(stream, kTestsuites, \"tests\",\n                     StreamableToString(total_tests));\n  OutputXmlAttribute(stream, kTestsuites, \"name\", \"AllTests\");\n  *stream << \">\\n\";\n\n  for (auto test_suite : test_suites) {\n    PrintXmlTestSuite(stream, *test_suite);\n  }\n  *stream << \"</\" << kTestsuites << \">\\n\";\n}\n\n// Produces a string representing the test properties in a result as space\n// delimited XML attributes based on the property key=\"value\" pairs.\nstd::string XmlUnitTestResultPrinter::TestPropertiesAsXmlAttributes(\n    const TestResult& result) {\n  Message attributes;\n  for (int i = 0; i < result.test_property_count(); ++i) {\n    const TestProperty& property = result.GetTestProperty(i);\n    attributes << \" \" << property.key() << \"=\"\n        << \"\\\"\" << EscapeXmlAttribute(property.value()) << \"\\\"\";\n  }\n  return attributes.GetString();\n}\n\nvoid XmlUnitTestResultPrinter::OutputXmlTestProperties(\n    std::ostream* stream, const TestResult& result) {\n  const std::string kProperties = \"properties\";\n  const std::string kProperty = \"property\";\n\n  if (result.test_property_count() <= 0) {\n    return;\n  }\n\n  *stream << \"<\" << kProperties << \">\\n\";\n  for (int i = 0; i < result.test_property_count(); ++i) {\n    const TestProperty& property = result.GetTestProperty(i);\n    *stream << \"<\" << kProperty;\n    *stream << \" name=\\\"\" << EscapeXmlAttribute(property.key()) << \"\\\"\";\n    *stream << \" value=\\\"\" << EscapeXmlAttribute(property.value()) << \"\\\"\";\n    *stream << \"/>\\n\";\n  }\n  *stream << \"</\" << kProperties << \">\\n\";\n}\n\n// End XmlUnitTestResultPrinter\n\n// This class generates an JSON output file.\nclass JsonUnitTestResultPrinter : public EmptyTestEventListener {\n public:\n  explicit JsonUnitTestResultPrinter(const char* output_file);\n\n  void OnTestIterationEnd(const UnitTest& unit_test, int iteration) override;\n\n  // Prints an JSON summary of all unit tests.\n  static void PrintJsonTestList(::std::ostream* stream,\n                                const std::vector<TestSuite*>& test_suites);\n\n private:\n  // Returns an JSON-escaped copy of the input string str.\n  static std::string EscapeJson(const std::string& str);\n\n  //// Verifies that the given attribute belongs to the given element and\n  //// streams the attribute as JSON.\n  static void OutputJsonKey(std::ostream* stream,\n                            const std::string& element_name,\n                            const std::string& name,\n                            const std::string& value,\n                            const std::string& indent,\n                            bool comma = true);\n  static void OutputJsonKey(std::ostream* stream,\n                            const std::string& element_name,\n                            const std::string& name,\n                            int value,\n                            const std::string& indent,\n                            bool comma = true);\n\n  // Streams a JSON representation of a TestInfo object.\n  static void OutputJsonTestInfo(::std::ostream* stream,\n                                 const char* test_suite_name,\n                                 const TestInfo& test_info);\n\n  // Prints a JSON representation of a TestSuite object\n  static void PrintJsonTestSuite(::std::ostream* stream,\n                                 const TestSuite& test_suite);\n\n  // Prints a JSON summary of unit_test to output stream out.\n  static void PrintJsonUnitTest(::std::ostream* stream,\n                                const UnitTest& unit_test);\n\n  // Produces a string representing the test properties in a result as\n  // a JSON dictionary.\n  static std::string TestPropertiesAsJson(const TestResult& result,\n                                          const std::string& indent);\n\n  // The output file.\n  const std::string output_file_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(JsonUnitTestResultPrinter);\n};\n\n// Creates a new JsonUnitTestResultPrinter.\nJsonUnitTestResultPrinter::JsonUnitTestResultPrinter(const char* output_file)\n    : output_file_(output_file) {\n  if (output_file_.empty()) {\n    GTEST_LOG_(FATAL) << \"JSON output file may not be null\";\n  }\n}\n\nvoid JsonUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test,\n                                                  int /*iteration*/) {\n  FILE* jsonout = OpenFileForWriting(output_file_);\n  std::stringstream stream;\n  PrintJsonUnitTest(&stream, unit_test);\n  fprintf(jsonout, \"%s\", StringStreamToString(&stream).c_str());\n  fclose(jsonout);\n}\n\n// Returns an JSON-escaped copy of the input string str.\nstd::string JsonUnitTestResultPrinter::EscapeJson(const std::string& str) {\n  Message m;\n\n  for (size_t i = 0; i < str.size(); ++i) {\n    const char ch = str[i];\n    switch (ch) {\n      case '\\\\':\n      case '\"':\n      case '/':\n        m << '\\\\' << ch;\n        break;\n      case '\\b':\n        m << \"\\\\b\";\n        break;\n      case '\\t':\n        m << \"\\\\t\";\n        break;\n      case '\\n':\n        m << \"\\\\n\";\n        break;\n      case '\\f':\n        m << \"\\\\f\";\n        break;\n      case '\\r':\n        m << \"\\\\r\";\n        break;\n      default:\n        if (ch < ' ') {\n          m << \"\\\\u00\" << String::FormatByte(static_cast<unsigned char>(ch));\n        } else {\n          m << ch;\n        }\n        break;\n    }\n  }\n\n  return m.GetString();\n}\n\n// The following routines generate an JSON representation of a UnitTest\n// object.\n\n// Formats the given time in milliseconds as seconds.\nstatic std::string FormatTimeInMillisAsDuration(TimeInMillis ms) {\n  ::std::stringstream ss;\n  ss << (static_cast<double>(ms) * 1e-3) << \"s\";\n  return ss.str();\n}\n\n// Converts the given epoch time in milliseconds to a date string in the\n// RFC3339 format, without the timezone information.\nstatic std::string FormatEpochTimeInMillisAsRFC3339(TimeInMillis ms) {\n  struct tm time_struct;\n  if (!PortableLocaltime(static_cast<time_t>(ms / 1000), &time_struct))\n    return \"\";\n  // YYYY-MM-DDThh:mm:ss\n  return StreamableToString(time_struct.tm_year + 1900) + \"-\" +\n      String::FormatIntWidth2(time_struct.tm_mon + 1) + \"-\" +\n      String::FormatIntWidth2(time_struct.tm_mday) + \"T\" +\n      String::FormatIntWidth2(time_struct.tm_hour) + \":\" +\n      String::FormatIntWidth2(time_struct.tm_min) + \":\" +\n      String::FormatIntWidth2(time_struct.tm_sec) + \"Z\";\n}\n\nstatic inline std::string Indent(int width) {\n  return std::string(width, ' ');\n}\n\nvoid JsonUnitTestResultPrinter::OutputJsonKey(\n    std::ostream* stream,\n    const std::string& element_name,\n    const std::string& name,\n    const std::string& value,\n    const std::string& indent,\n    bool comma) {\n  const std::vector<std::string>& allowed_names =\n      GetReservedAttributesForElement(element_name);\n\n  GTEST_CHECK_(std::find(allowed_names.begin(), allowed_names.end(), name) !=\n                   allowed_names.end())\n      << \"Key \\\"\" << name << \"\\\" is not allowed for value \\\"\" << element_name\n      << \"\\\".\";\n\n  *stream << indent << \"\\\"\" << name << \"\\\": \\\"\" << EscapeJson(value) << \"\\\"\";\n  if (comma)\n    *stream << \",\\n\";\n}\n\nvoid JsonUnitTestResultPrinter::OutputJsonKey(\n    std::ostream* stream,\n    const std::string& element_name,\n    const std::string& name,\n    int value,\n    const std::string& indent,\n    bool comma) {\n  const std::vector<std::string>& allowed_names =\n      GetReservedAttributesForElement(element_name);\n\n  GTEST_CHECK_(std::find(allowed_names.begin(), allowed_names.end(), name) !=\n                   allowed_names.end())\n      << \"Key \\\"\" << name << \"\\\" is not allowed for value \\\"\" << element_name\n      << \"\\\".\";\n\n  *stream << indent << \"\\\"\" << name << \"\\\": \" << StreamableToString(value);\n  if (comma)\n    *stream << \",\\n\";\n}\n\n// Prints a JSON representation of a TestInfo object.\nvoid JsonUnitTestResultPrinter::OutputJsonTestInfo(::std::ostream* stream,\n                                                   const char* test_suite_name,\n                                                   const TestInfo& test_info) {\n  const TestResult& result = *test_info.result();\n  const std::string kTestsuite = \"testcase\";\n  const std::string kIndent = Indent(10);\n\n  *stream << Indent(8) << \"{\\n\";\n  OutputJsonKey(stream, kTestsuite, \"name\", test_info.name(), kIndent);\n\n  if (test_info.value_param() != nullptr) {\n    OutputJsonKey(stream, kTestsuite, \"value_param\", test_info.value_param(),\n                  kIndent);\n  }\n  if (test_info.type_param() != nullptr) {\n    OutputJsonKey(stream, kTestsuite, \"type_param\", test_info.type_param(),\n                  kIndent);\n  }\n  if (GTEST_FLAG(list_tests)) {\n    OutputJsonKey(stream, kTestsuite, \"file\", test_info.file(), kIndent);\n    OutputJsonKey(stream, kTestsuite, \"line\", test_info.line(), kIndent, false);\n    *stream << \"\\n\" << Indent(8) << \"}\";\n    return;\n  }\n\n  OutputJsonKey(\n      stream, kTestsuite, \"status\",\n      result.Skipped() ? \"SKIPPED\" : test_info.should_run() ? \"RUN\" : \"NOTRUN\",\n      kIndent);\n  OutputJsonKey(stream, kTestsuite, \"time\",\n                FormatTimeInMillisAsDuration(result.elapsed_time()), kIndent);\n  OutputJsonKey(stream, kTestsuite, \"classname\", test_suite_name, kIndent,\n                false);\n  *stream << TestPropertiesAsJson(result, kIndent);\n\n  int failures = 0;\n  for (int i = 0; i < result.total_part_count(); ++i) {\n    const TestPartResult& part = result.GetTestPartResult(i);\n    if (part.failed()) {\n      *stream << \",\\n\";\n      if (++failures == 1) {\n        *stream << kIndent << \"\\\"\" << \"failures\" << \"\\\": [\\n\";\n      }\n      const std::string location =\n          internal::FormatCompilerIndependentFileLocation(part.file_name(),\n                                                          part.line_number());\n      const std::string message = EscapeJson(location + \"\\n\" + part.message());\n      *stream << kIndent << \"  {\\n\"\n              << kIndent << \"    \\\"failure\\\": \\\"\" << message << \"\\\",\\n\"\n              << kIndent << \"    \\\"type\\\": \\\"\\\"\\n\"\n              << kIndent << \"  }\";\n    }\n  }\n\n  if (failures > 0)\n    *stream << \"\\n\" << kIndent << \"]\";\n  *stream << \"\\n\" << Indent(8) << \"}\";\n}\n\n// Prints an JSON representation of a TestSuite object\nvoid JsonUnitTestResultPrinter::PrintJsonTestSuite(\n    std::ostream* stream, const TestSuite& test_suite) {\n  const std::string kTestsuite = \"testsuite\";\n  const std::string kIndent = Indent(6);\n\n  *stream << Indent(4) << \"{\\n\";\n  OutputJsonKey(stream, kTestsuite, \"name\", test_suite.name(), kIndent);\n  OutputJsonKey(stream, kTestsuite, \"tests\", test_suite.reportable_test_count(),\n                kIndent);\n  if (!GTEST_FLAG(list_tests)) {\n    OutputJsonKey(stream, kTestsuite, \"failures\",\n                  test_suite.failed_test_count(), kIndent);\n    OutputJsonKey(stream, kTestsuite, \"disabled\",\n                  test_suite.reportable_disabled_test_count(), kIndent);\n    OutputJsonKey(stream, kTestsuite, \"errors\", 0, kIndent);\n    OutputJsonKey(stream, kTestsuite, \"time\",\n                  FormatTimeInMillisAsDuration(test_suite.elapsed_time()),\n                  kIndent, false);\n    *stream << TestPropertiesAsJson(test_suite.ad_hoc_test_result(), kIndent)\n            << \",\\n\";\n  }\n\n  *stream << kIndent << \"\\\"\" << kTestsuite << \"\\\": [\\n\";\n\n  bool comma = false;\n  for (int i = 0; i < test_suite.total_test_count(); ++i) {\n    if (test_suite.GetTestInfo(i)->is_reportable()) {\n      if (comma) {\n        *stream << \",\\n\";\n      } else {\n        comma = true;\n      }\n      OutputJsonTestInfo(stream, test_suite.name(), *test_suite.GetTestInfo(i));\n    }\n  }\n  *stream << \"\\n\" << kIndent << \"]\\n\" << Indent(4) << \"}\";\n}\n\n// Prints a JSON summary of unit_test to output stream out.\nvoid JsonUnitTestResultPrinter::PrintJsonUnitTest(std::ostream* stream,\n                                                  const UnitTest& unit_test) {\n  const std::string kTestsuites = \"testsuites\";\n  const std::string kIndent = Indent(2);\n  *stream << \"{\\n\";\n\n  OutputJsonKey(stream, kTestsuites, \"tests\", unit_test.reportable_test_count(),\n                kIndent);\n  OutputJsonKey(stream, kTestsuites, \"failures\", unit_test.failed_test_count(),\n                kIndent);\n  OutputJsonKey(stream, kTestsuites, \"disabled\",\n                unit_test.reportable_disabled_test_count(), kIndent);\n  OutputJsonKey(stream, kTestsuites, \"errors\", 0, kIndent);\n  if (GTEST_FLAG(shuffle)) {\n    OutputJsonKey(stream, kTestsuites, \"random_seed\", unit_test.random_seed(),\n                  kIndent);\n  }\n  OutputJsonKey(stream, kTestsuites, \"timestamp\",\n                FormatEpochTimeInMillisAsRFC3339(unit_test.start_timestamp()),\n                kIndent);\n  OutputJsonKey(stream, kTestsuites, \"time\",\n                FormatTimeInMillisAsDuration(unit_test.elapsed_time()), kIndent,\n                false);\n\n  *stream << TestPropertiesAsJson(unit_test.ad_hoc_test_result(), kIndent)\n          << \",\\n\";\n\n  OutputJsonKey(stream, kTestsuites, \"name\", \"AllTests\", kIndent);\n  *stream << kIndent << \"\\\"\" << kTestsuites << \"\\\": [\\n\";\n\n  bool comma = false;\n  for (int i = 0; i < unit_test.total_test_suite_count(); ++i) {\n    if (unit_test.GetTestSuite(i)->reportable_test_count() > 0) {\n      if (comma) {\n        *stream << \",\\n\";\n      } else {\n        comma = true;\n      }\n      PrintJsonTestSuite(stream, *unit_test.GetTestSuite(i));\n    }\n  }\n\n  *stream << \"\\n\" << kIndent << \"]\\n\" << \"}\\n\";\n}\n\nvoid JsonUnitTestResultPrinter::PrintJsonTestList(\n    std::ostream* stream, const std::vector<TestSuite*>& test_suites) {\n  const std::string kTestsuites = \"testsuites\";\n  const std::string kIndent = Indent(2);\n  *stream << \"{\\n\";\n  int total_tests = 0;\n  for (auto test_suite : test_suites) {\n    total_tests += test_suite->total_test_count();\n  }\n  OutputJsonKey(stream, kTestsuites, \"tests\", total_tests, kIndent);\n\n  OutputJsonKey(stream, kTestsuites, \"name\", \"AllTests\", kIndent);\n  *stream << kIndent << \"\\\"\" << kTestsuites << \"\\\": [\\n\";\n\n  for (size_t i = 0; i < test_suites.size(); ++i) {\n    if (i != 0) {\n      *stream << \",\\n\";\n    }\n    PrintJsonTestSuite(stream, *test_suites[i]);\n  }\n\n  *stream << \"\\n\"\n          << kIndent << \"]\\n\"\n          << \"}\\n\";\n}\n// Produces a string representing the test properties in a result as\n// a JSON dictionary.\nstd::string JsonUnitTestResultPrinter::TestPropertiesAsJson(\n    const TestResult& result, const std::string& indent) {\n  Message attributes;\n  for (int i = 0; i < result.test_property_count(); ++i) {\n    const TestProperty& property = result.GetTestProperty(i);\n    attributes << \",\\n\" << indent << \"\\\"\" << property.key() << \"\\\": \"\n               << \"\\\"\" << EscapeJson(property.value()) << \"\\\"\";\n  }\n  return attributes.GetString();\n}\n\n// End JsonUnitTestResultPrinter\n\n#if GTEST_CAN_STREAM_RESULTS_\n\n// Checks if str contains '=', '&', '%' or '\\n' characters. If yes,\n// replaces them by \"%xx\" where xx is their hexadecimal value. For\n// example, replaces \"=\" with \"%3D\".  This algorithm is O(strlen(str))\n// in both time and space -- important as the input str may contain an\n// arbitrarily long test failure message and stack trace.\nstd::string StreamingListener::UrlEncode(const char* str) {\n  std::string result;\n  result.reserve(strlen(str) + 1);\n  for (char ch = *str; ch != '\\0'; ch = *++str) {\n    switch (ch) {\n      case '%':\n      case '=':\n      case '&':\n      case '\\n':\n        result.append(\"%\" + String::FormatByte(static_cast<unsigned char>(ch)));\n        break;\n      default:\n        result.push_back(ch);\n        break;\n    }\n  }\n  return result;\n}\n\nvoid StreamingListener::SocketWriter::MakeConnection() {\n  GTEST_CHECK_(sockfd_ == -1)\n      << \"MakeConnection() can't be called when there is already a connection.\";\n\n  addrinfo hints;\n  memset(&hints, 0, sizeof(hints));\n  hints.ai_family = AF_UNSPEC;    // To allow both IPv4 and IPv6 addresses.\n  hints.ai_socktype = SOCK_STREAM;\n  addrinfo* servinfo = nullptr;\n\n  // Use the getaddrinfo() to get a linked list of IP addresses for\n  // the given host name.\n  const int error_num = getaddrinfo(\n      host_name_.c_str(), port_num_.c_str(), &hints, &servinfo);\n  if (error_num != 0) {\n    GTEST_LOG_(WARNING) << \"stream_result_to: getaddrinfo() failed: \"\n                        << gai_strerror(error_num);\n  }\n\n  // Loop through all the results and connect to the first we can.\n  for (addrinfo* cur_addr = servinfo; sockfd_ == -1 && cur_addr != nullptr;\n       cur_addr = cur_addr->ai_next) {\n    sockfd_ = socket(\n        cur_addr->ai_family, cur_addr->ai_socktype, cur_addr->ai_protocol);\n    if (sockfd_ != -1) {\n      // Connect the client socket to the server socket.\n      if (connect(sockfd_, cur_addr->ai_addr, cur_addr->ai_addrlen) == -1) {\n        close(sockfd_);\n        sockfd_ = -1;\n      }\n    }\n  }\n\n  freeaddrinfo(servinfo);  // all done with this structure\n\n  if (sockfd_ == -1) {\n    GTEST_LOG_(WARNING) << \"stream_result_to: failed to connect to \"\n                        << host_name_ << \":\" << port_num_;\n  }\n}\n\n// End of class Streaming Listener\n#endif  // GTEST_CAN_STREAM_RESULTS__\n\n// class OsStackTraceGetter\n\nconst char* const OsStackTraceGetterInterface::kElidedFramesMarker =\n    \"... \" GTEST_NAME_ \" internal frames ...\";\n\nstd::string OsStackTraceGetter::CurrentStackTrace(int max_depth, int skip_count)\n    GTEST_LOCK_EXCLUDED_(mutex_) {\n#if GTEST_HAS_ABSL\n  std::string result;\n\n  if (max_depth <= 0) {\n    return result;\n  }\n\n  max_depth = std::min(max_depth, kMaxStackTraceDepth);\n\n  std::vector<void*> raw_stack(max_depth);\n  // Skips the frames requested by the caller, plus this function.\n  const int raw_stack_size =\n      absl::GetStackTrace(&raw_stack[0], max_depth, skip_count + 1);\n\n  void* caller_frame = nullptr;\n  {\n    MutexLock lock(&mutex_);\n    caller_frame = caller_frame_;\n  }\n\n  for (int i = 0; i < raw_stack_size; ++i) {\n    if (raw_stack[i] == caller_frame &&\n        !GTEST_FLAG(show_internal_stack_frames)) {\n      // Add a marker to the trace and stop adding frames.\n      absl::StrAppend(&result, kElidedFramesMarker, \"\\n\");\n      break;\n    }\n\n    char tmp[1024];\n    const char* symbol = \"(unknown)\";\n    if (absl::Symbolize(raw_stack[i], tmp, sizeof(tmp))) {\n      symbol = tmp;\n    }\n\n    char line[1024];\n    snprintf(line, sizeof(line), \"  %p: %s\\n\", raw_stack[i], symbol);\n    result += line;\n  }\n\n  return result;\n\n#else  // !GTEST_HAS_ABSL\n  static_cast<void>(max_depth);\n  static_cast<void>(skip_count);\n  return \"\";\n#endif  // GTEST_HAS_ABSL\n}\n\nvoid OsStackTraceGetter::UponLeavingGTest() GTEST_LOCK_EXCLUDED_(mutex_) {\n#if GTEST_HAS_ABSL\n  void* caller_frame = nullptr;\n  if (absl::GetStackTrace(&caller_frame, 1, 3) <= 0) {\n    caller_frame = nullptr;\n  }\n\n  MutexLock lock(&mutex_);\n  caller_frame_ = caller_frame;\n#endif  // GTEST_HAS_ABSL\n}\n\n// A helper class that creates the premature-exit file in its\n// constructor and deletes the file in its destructor.\nclass ScopedPrematureExitFile {\n public:\n  explicit ScopedPrematureExitFile(const char* premature_exit_filepath)\n      : premature_exit_filepath_(premature_exit_filepath ?\n                                 premature_exit_filepath : \"\") {\n    // If a path to the premature-exit file is specified...\n    if (!premature_exit_filepath_.empty()) {\n      // create the file with a single \"0\" character in it.  I/O\n      // errors are ignored as there's nothing better we can do and we\n      // don't want to fail the test because of this.\n      FILE* pfile = posix::FOpen(premature_exit_filepath, \"w\");\n      fwrite(\"0\", 1, 1, pfile);\n      fclose(pfile);\n    }\n  }\n\n  ~ScopedPrematureExitFile() {\n    if (!premature_exit_filepath_.empty()) {\n      int retval = remove(premature_exit_filepath_.c_str());\n      if (retval) {\n        GTEST_LOG_(ERROR) << \"Failed to remove premature exit filepath \\\"\"\n                          << premature_exit_filepath_ << \"\\\" with error \"\n                          << retval;\n      }\n    }\n  }\n\n private:\n  const std::string premature_exit_filepath_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(ScopedPrematureExitFile);\n};\n\n}  // namespace internal\n\n// class TestEventListeners\n\nTestEventListeners::TestEventListeners()\n    : repeater_(new internal::TestEventRepeater()),\n      default_result_printer_(nullptr),\n      default_xml_generator_(nullptr) {}\n\nTestEventListeners::~TestEventListeners() { delete repeater_; }\n\n// Returns the standard listener responsible for the default console\n// output.  Can be removed from the listeners list to shut down default\n// console output.  Note that removing this object from the listener list\n// with Release transfers its ownership to the user.\nvoid TestEventListeners::Append(TestEventListener* listener) {\n  repeater_->Append(listener);\n}\n\n// Removes the given event listener from the list and returns it.  It then\n// becomes the caller's responsibility to delete the listener. Returns\n// NULL if the listener is not found in the list.\nTestEventListener* TestEventListeners::Release(TestEventListener* listener) {\n  if (listener == default_result_printer_)\n    default_result_printer_ = nullptr;\n  else if (listener == default_xml_generator_)\n    default_xml_generator_ = nullptr;\n  return repeater_->Release(listener);\n}\n\n// Returns repeater that broadcasts the TestEventListener events to all\n// subscribers.\nTestEventListener* TestEventListeners::repeater() { return repeater_; }\n\n// Sets the default_result_printer attribute to the provided listener.\n// The listener is also added to the listener list and previous\n// default_result_printer is removed from it and deleted. The listener can\n// also be NULL in which case it will not be added to the list. Does\n// nothing if the previous and the current listener objects are the same.\nvoid TestEventListeners::SetDefaultResultPrinter(TestEventListener* listener) {\n  if (default_result_printer_ != listener) {\n    // It is an error to pass this method a listener that is already in the\n    // list.\n    delete Release(default_result_printer_);\n    default_result_printer_ = listener;\n    if (listener != nullptr) Append(listener);\n  }\n}\n\n// Sets the default_xml_generator attribute to the provided listener.  The\n// listener is also added to the listener list and previous\n// default_xml_generator is removed from it and deleted. The listener can\n// also be NULL in which case it will not be added to the list. Does\n// nothing if the previous and the current listener objects are the same.\nvoid TestEventListeners::SetDefaultXmlGenerator(TestEventListener* listener) {\n  if (default_xml_generator_ != listener) {\n    // It is an error to pass this method a listener that is already in the\n    // list.\n    delete Release(default_xml_generator_);\n    default_xml_generator_ = listener;\n    if (listener != nullptr) Append(listener);\n  }\n}\n\n// Controls whether events will be forwarded by the repeater to the\n// listeners in the list.\nbool TestEventListeners::EventForwardingEnabled() const {\n  return repeater_->forwarding_enabled();\n}\n\nvoid TestEventListeners::SuppressEventForwarding() {\n  repeater_->set_forwarding_enabled(false);\n}\n\n// class UnitTest\n\n// Gets the singleton UnitTest object.  The first time this method is\n// called, a UnitTest object is constructed and returned.  Consecutive\n// calls will return the same object.\n//\n// We don't protect this under mutex_ as a user is not supposed to\n// call this before main() starts, from which point on the return\n// value will never change.\nUnitTest* UnitTest::GetInstance() {\n  // CodeGear C++Builder insists on a public destructor for the\n  // default implementation.  Use this implementation to keep good OO\n  // design with private destructor.\n\n#if defined(__BORLANDC__)\n  static UnitTest* const instance = new UnitTest;\n  return instance;\n#else\n  static UnitTest instance;\n  return &instance;\n#endif  // defined(__BORLANDC__)\n}\n\n// Gets the number of successful test suites.\nint UnitTest::successful_test_suite_count() const {\n  return impl()->successful_test_suite_count();\n}\n\n// Gets the number of failed test suites.\nint UnitTest::failed_test_suite_count() const {\n  return impl()->failed_test_suite_count();\n}\n\n// Gets the number of all test suites.\nint UnitTest::total_test_suite_count() const {\n  return impl()->total_test_suite_count();\n}\n\n// Gets the number of all test suites that contain at least one test\n// that should run.\nint UnitTest::test_suite_to_run_count() const {\n  return impl()->test_suite_to_run_count();\n}\n\n//  Legacy API is deprecated but still available\n#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_\nint UnitTest::successful_test_case_count() const {\n  return impl()->successful_test_suite_count();\n}\nint UnitTest::failed_test_case_count() const {\n  return impl()->failed_test_suite_count();\n}\nint UnitTest::total_test_case_count() const {\n  return impl()->total_test_suite_count();\n}\nint UnitTest::test_case_to_run_count() const {\n  return impl()->test_suite_to_run_count();\n}\n#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI_\n\n// Gets the number of successful tests.\nint UnitTest::successful_test_count() const {\n  return impl()->successful_test_count();\n}\n\n// Gets the number of skipped tests.\nint UnitTest::skipped_test_count() const {\n  return impl()->skipped_test_count();\n}\n\n// Gets the number of failed tests.\nint UnitTest::failed_test_count() const { return impl()->failed_test_count(); }\n\n// Gets the number of disabled tests that will be reported in the XML report.\nint UnitTest::reportable_disabled_test_count() const {\n  return impl()->reportable_disabled_test_count();\n}\n\n// Gets the number of disabled tests.\nint UnitTest::disabled_test_count() const {\n  return impl()->disabled_test_count();\n}\n\n// Gets the number of tests to be printed in the XML report.\nint UnitTest::reportable_test_count() const {\n  return impl()->reportable_test_count();\n}\n\n// Gets the number of all tests.\nint UnitTest::total_test_count() const { return impl()->total_test_count(); }\n\n// Gets the number of tests that should run.\nint UnitTest::test_to_run_count() const { return impl()->test_to_run_count(); }\n\n// Gets the time of the test program start, in ms from the start of the\n// UNIX epoch.\ninternal::TimeInMillis UnitTest::start_timestamp() const {\n    return impl()->start_timestamp();\n}\n\n// Gets the elapsed time, in milliseconds.\ninternal::TimeInMillis UnitTest::elapsed_time() const {\n  return impl()->elapsed_time();\n}\n\n// Returns true iff the unit test passed (i.e. all test suites passed).\nbool UnitTest::Passed() const { return impl()->Passed(); }\n\n// Returns true iff the unit test failed (i.e. some test suite failed\n// or something outside of all tests failed).\nbool UnitTest::Failed() const { return impl()->Failed(); }\n\n// Gets the i-th test suite among all the test suites. i can range from 0 to\n// total_test_suite_count() - 1. If i is not in that range, returns NULL.\nconst TestSuite* UnitTest::GetTestSuite(int i) const {\n  return impl()->GetTestSuite(i);\n}\n\n//  Legacy API is deprecated but still available\n#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_\nconst TestCase* UnitTest::GetTestCase(int i) const {\n  return impl()->GetTestCase(i);\n}\n#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI_\n\n// Returns the TestResult containing information on test failures and\n// properties logged outside of individual test suites.\nconst TestResult& UnitTest::ad_hoc_test_result() const {\n  return *impl()->ad_hoc_test_result();\n}\n\n// Gets the i-th test suite among all the test suites. i can range from 0 to\n// total_test_suite_count() - 1. If i is not in that range, returns NULL.\nTestSuite* UnitTest::GetMutableTestSuite(int i) {\n  return impl()->GetMutableSuiteCase(i);\n}\n\n// Returns the list of event listeners that can be used to track events\n// inside Google Test.\nTestEventListeners& UnitTest::listeners() {\n  return *impl()->listeners();\n}\n\n// Registers and returns a global test environment.  When a test\n// program is run, all global test environments will be set-up in the\n// order they were registered.  After all tests in the program have\n// finished, all global test environments will be torn-down in the\n// *reverse* order they were registered.\n//\n// The UnitTest object takes ownership of the given environment.\n//\n// We don't protect this under mutex_, as we only support calling it\n// from the main thread.\nEnvironment* UnitTest::AddEnvironment(Environment* env) {\n  if (env == nullptr) {\n    return nullptr;\n  }\n\n  impl_->environments().push_back(env);\n  return env;\n}\n\n// Adds a TestPartResult to the current TestResult object.  All Google Test\n// assertion macros (e.g. ASSERT_TRUE, EXPECT_EQ, etc) eventually call\n// this to report their results.  The user code should use the\n// assertion macros instead of calling this directly.\nvoid UnitTest::AddTestPartResult(\n    TestPartResult::Type result_type,\n    const char* file_name,\n    int line_number,\n    const std::string& message,\n    const std::string& os_stack_trace) GTEST_LOCK_EXCLUDED_(mutex_) {\n  Message msg;\n  msg << message;\n\n  internal::MutexLock lock(&mutex_);\n  if (impl_->gtest_trace_stack().size() > 0) {\n    msg << \"\\n\" << GTEST_NAME_ << \" trace:\";\n\n    for (int i = static_cast<int>(impl_->gtest_trace_stack().size());\n         i > 0; --i) {\n      const internal::TraceInfo& trace = impl_->gtest_trace_stack()[i - 1];\n      msg << \"\\n\" << internal::FormatFileLocation(trace.file, trace.line)\n          << \" \" << trace.message;\n    }\n  }\n\n  if (os_stack_trace.c_str() != nullptr && !os_stack_trace.empty()) {\n    msg << internal::kStackTraceMarker << os_stack_trace;\n  }\n\n  const TestPartResult result = TestPartResult(\n      result_type, file_name, line_number, msg.GetString().c_str());\n  impl_->GetTestPartResultReporterForCurrentThread()->\n      ReportTestPartResult(result);\n\n  if (result_type != TestPartResult::kSuccess &&\n      result_type != TestPartResult::kSkip) {\n    // gtest_break_on_failure takes precedence over\n    // gtest_throw_on_failure.  This allows a user to set the latter\n    // in the code (perhaps in order to use Google Test assertions\n    // with another testing framework) and specify the former on the\n    // command line for debugging.\n    if (GTEST_FLAG(break_on_failure)) {\n#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT\n      // Using DebugBreak on Windows allows gtest to still break into a debugger\n      // when a failure happens and both the --gtest_break_on_failure and\n      // the --gtest_catch_exceptions flags are specified.\n      DebugBreak();\n#elif (!defined(__native_client__)) &&            \\\n    ((defined(__clang__) || defined(__GNUC__)) && \\\n     (defined(__x86_64__) || defined(__i386__)))\n      // with clang/gcc we can achieve the same effect on x86 by invoking int3\n      asm(\"int3\");\n#else\n      // Dereference nullptr through a volatile pointer to prevent the compiler\n      // from removing. We use this rather than abort() or __builtin_trap() for\n      // portability: some debuggers don't correctly trap abort().\n      *static_cast<volatile int*>(nullptr) = 1;\n#endif  // GTEST_OS_WINDOWS\n    } else if (GTEST_FLAG(throw_on_failure)) {\n#if GTEST_HAS_EXCEPTIONS\n      throw internal::GoogleTestFailureException(result);\n#else\n      // We cannot call abort() as it generates a pop-up in debug mode\n      // that cannot be suppressed in VC 7.1 or below.\n      exit(1);\n#endif\n    }\n  }\n}\n\n// Adds a TestProperty to the current TestResult object when invoked from\n// inside a test, to current TestSuite's ad_hoc_test_result_ when invoked\n// from SetUpTestSuite or TearDownTestSuite, or to the global property set\n// when invoked elsewhere.  If the result already contains a property with\n// the same key, the value will be updated.\nvoid UnitTest::RecordProperty(const std::string& key,\n                              const std::string& value) {\n  impl_->RecordProperty(TestProperty(key, value));\n}\n\n// Runs all tests in this UnitTest object and prints the result.\n// Returns 0 if successful, or 1 otherwise.\n//\n// We don't protect this under mutex_, as we only support calling it\n// from the main thread.\nint UnitTest::Run() {\n  const bool in_death_test_child_process =\n      internal::GTEST_FLAG(internal_run_death_test).length() > 0;\n\n  // Google Test implements this protocol for catching that a test\n  // program exits before returning control to Google Test:\n  //\n  //   1. Upon start, Google Test creates a file whose absolute path\n  //      is specified by the environment variable\n  //      TEST_PREMATURE_EXIT_FILE.\n  //   2. When Google Test has finished its work, it deletes the file.\n  //\n  // This allows a test runner to set TEST_PREMATURE_EXIT_FILE before\n  // running a Google-Test-based test program and check the existence\n  // of the file at the end of the test execution to see if it has\n  // exited prematurely.\n\n  // If we are in the child process of a death test, don't\n  // create/delete the premature exit file, as doing so is unnecessary\n  // and will confuse the parent process.  Otherwise, create/delete\n  // the file upon entering/leaving this function.  If the program\n  // somehow exits before this function has a chance to return, the\n  // premature-exit file will be left undeleted, causing a test runner\n  // that understands the premature-exit-file protocol to report the\n  // test as having failed.\n  const internal::ScopedPrematureExitFile premature_exit_file(\n      in_death_test_child_process\n          ? nullptr\n          : internal::posix::GetEnv(\"TEST_PREMATURE_EXIT_FILE\"));\n\n  // Captures the value of GTEST_FLAG(catch_exceptions).  This value will be\n  // used for the duration of the program.\n  impl()->set_catch_exceptions(GTEST_FLAG(catch_exceptions));\n\n#if GTEST_OS_WINDOWS\n  // Either the user wants Google Test to catch exceptions thrown by the\n  // tests or this is executing in the context of death test child\n  // process. In either case the user does not want to see pop-up dialogs\n  // about crashes - they are expected.\n  if (impl()->catch_exceptions() || in_death_test_child_process) {\n# if !GTEST_OS_WINDOWS_MOBILE && !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT\n    // SetErrorMode doesn't exist on CE.\n    SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOALIGNMENTFAULTEXCEPT |\n                 SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX);\n# endif  // !GTEST_OS_WINDOWS_MOBILE\n\n# if (defined(_MSC_VER) || GTEST_OS_WINDOWS_MINGW) && !GTEST_OS_WINDOWS_MOBILE\n    // Death test children can be terminated with _abort().  On Windows,\n    // _abort() can show a dialog with a warning message.  This forces the\n    // abort message to go to stderr instead.\n    _set_error_mode(_OUT_TO_STDERR);\n# endif\n\n# if defined(_MSC_VER) && !GTEST_OS_WINDOWS_MOBILE\n    // In the debug version, Visual Studio pops up a separate dialog\n    // offering a choice to debug the aborted program. We need to suppress\n    // this dialog or it will pop up for every EXPECT/ASSERT_DEATH statement\n    // executed. Google Test will notify the user of any unexpected\n    // failure via stderr.\n    if (!GTEST_FLAG(break_on_failure))\n      _set_abort_behavior(\n          0x0,                                    // Clear the following flags:\n          _WRITE_ABORT_MSG | _CALL_REPORTFAULT);  // pop-up window, core dump.\n# endif\n  }\n#endif  // GTEST_OS_WINDOWS\n\n  return internal::HandleExceptionsInMethodIfSupported(\n      impl(),\n      &internal::UnitTestImpl::RunAllTests,\n      \"auxiliary test code (environments or event listeners)\") ? 0 : 1;\n}\n\n// Returns the working directory when the first TEST() or TEST_F() was\n// executed.\nconst char* UnitTest::original_working_dir() const {\n  return impl_->original_working_dir_.c_str();\n}\n\n// Returns the TestSuite object for the test that's currently running,\n// or NULL if no test is running.\nconst TestSuite* UnitTest::current_test_suite() const\n    GTEST_LOCK_EXCLUDED_(mutex_) {\n  internal::MutexLock lock(&mutex_);\n  return impl_->current_test_suite();\n}\n\n// Legacy API is still available but deprecated\n#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_\nconst TestCase* UnitTest::current_test_case() const\n    GTEST_LOCK_EXCLUDED_(mutex_) {\n  internal::MutexLock lock(&mutex_);\n  return impl_->current_test_suite();\n}\n#endif\n\n// Returns the TestInfo object for the test that's currently running,\n// or NULL if no test is running.\nconst TestInfo* UnitTest::current_test_info() const\n    GTEST_LOCK_EXCLUDED_(mutex_) {\n  internal::MutexLock lock(&mutex_);\n  return impl_->current_test_info();\n}\n\n// Returns the random seed used at the start of the current test run.\nint UnitTest::random_seed() const { return impl_->random_seed(); }\n\n// Returns ParameterizedTestSuiteRegistry object used to keep track of\n// value-parameterized tests and instantiate and register them.\ninternal::ParameterizedTestSuiteRegistry&\nUnitTest::parameterized_test_registry() GTEST_LOCK_EXCLUDED_(mutex_) {\n  return impl_->parameterized_test_registry();\n}\n\n// Creates an empty UnitTest.\nUnitTest::UnitTest() {\n  impl_ = new internal::UnitTestImpl(this);\n}\n\n// Destructor of UnitTest.\nUnitTest::~UnitTest() {\n  delete impl_;\n}\n\n// Pushes a trace defined by SCOPED_TRACE() on to the per-thread\n// Google Test trace stack.\nvoid UnitTest::PushGTestTrace(const internal::TraceInfo& trace)\n    GTEST_LOCK_EXCLUDED_(mutex_) {\n  internal::MutexLock lock(&mutex_);\n  impl_->gtest_trace_stack().push_back(trace);\n}\n\n// Pops a trace from the per-thread Google Test trace stack.\nvoid UnitTest::PopGTestTrace()\n    GTEST_LOCK_EXCLUDED_(mutex_) {\n  internal::MutexLock lock(&mutex_);\n  impl_->gtest_trace_stack().pop_back();\n}\n\nnamespace internal {\n\nUnitTestImpl::UnitTestImpl(UnitTest* parent)\n    : parent_(parent),\n      GTEST_DISABLE_MSC_WARNINGS_PUSH_(4355 /* using this in initializer */)\n          default_global_test_part_result_reporter_(this),\n      default_per_thread_test_part_result_reporter_(this),\n      GTEST_DISABLE_MSC_WARNINGS_POP_() global_test_part_result_repoter_(\n          &default_global_test_part_result_reporter_),\n      per_thread_test_part_result_reporter_(\n          &default_per_thread_test_part_result_reporter_),\n      parameterized_test_registry_(),\n      parameterized_tests_registered_(false),\n      last_death_test_suite_(-1),\n      current_test_suite_(nullptr),\n      current_test_info_(nullptr),\n      ad_hoc_test_result_(),\n      os_stack_trace_getter_(nullptr),\n      post_flag_parse_init_performed_(false),\n      random_seed_(0),  // Will be overridden by the flag before first use.\n      random_(0),       // Will be reseeded before first use.\n      start_timestamp_(0),\n      elapsed_time_(0),\n#if GTEST_HAS_DEATH_TEST\n      death_test_factory_(new DefaultDeathTestFactory),\n#endif\n      // Will be overridden by the flag before first use.\n      catch_exceptions_(false) {\n  listeners()->SetDefaultResultPrinter(new PrettyUnitTestResultPrinter);\n}\n\nUnitTestImpl::~UnitTestImpl() {\n  // Deletes every TestSuite.\n  ForEach(test_suites_, internal::Delete<TestSuite>);\n\n  // Deletes every Environment.\n  ForEach(environments_, internal::Delete<Environment>);\n\n  delete os_stack_trace_getter_;\n}\n\n// Adds a TestProperty to the current TestResult object when invoked in a\n// context of a test, to current test suite's ad_hoc_test_result when invoke\n// from SetUpTestSuite/TearDownTestSuite, or to the global property set\n// otherwise.  If the result already contains a property with the same key,\n// the value will be updated.\nvoid UnitTestImpl::RecordProperty(const TestProperty& test_property) {\n  std::string xml_element;\n  TestResult* test_result;  // TestResult appropriate for property recording.\n\n  if (current_test_info_ != nullptr) {\n    xml_element = \"testcase\";\n    test_result = &(current_test_info_->result_);\n  } else if (current_test_suite_ != nullptr) {\n    xml_element = \"testsuite\";\n    test_result = &(current_test_suite_->ad_hoc_test_result_);\n  } else {\n    xml_element = \"testsuites\";\n    test_result = &ad_hoc_test_result_;\n  }\n  test_result->RecordProperty(xml_element, test_property);\n}\n\n#if GTEST_HAS_DEATH_TEST\n// Disables event forwarding if the control is currently in a death test\n// subprocess. Must not be called before InitGoogleTest.\nvoid UnitTestImpl::SuppressTestEventsIfInSubprocess() {\n  if (internal_run_death_test_flag_.get() != nullptr)\n    listeners()->SuppressEventForwarding();\n}\n#endif  // GTEST_HAS_DEATH_TEST\n\n// Initializes event listeners performing XML output as specified by\n// UnitTestOptions. Must not be called before InitGoogleTest.\nvoid UnitTestImpl::ConfigureXmlOutput() {\n  const std::string& output_format = UnitTestOptions::GetOutputFormat();\n  if (output_format == \"xml\") {\n    listeners()->SetDefaultXmlGenerator(new XmlUnitTestResultPrinter(\n        UnitTestOptions::GetAbsolutePathToOutputFile().c_str()));\n  } else if (output_format == \"json\") {\n    listeners()->SetDefaultXmlGenerator(new JsonUnitTestResultPrinter(\n        UnitTestOptions::GetAbsolutePathToOutputFile().c_str()));\n  } else if (output_format != \"\") {\n    GTEST_LOG_(WARNING) << \"WARNING: unrecognized output format \\\"\"\n                        << output_format << \"\\\" ignored.\";\n  }\n}\n\n#if GTEST_CAN_STREAM_RESULTS_\n// Initializes event listeners for streaming test results in string form.\n// Must not be called before InitGoogleTest.\nvoid UnitTestImpl::ConfigureStreamingOutput() {\n  const std::string& target = GTEST_FLAG(stream_result_to);\n  if (!target.empty()) {\n    const size_t pos = target.find(':');\n    if (pos != std::string::npos) {\n      listeners()->Append(new StreamingListener(target.substr(0, pos),\n                                                target.substr(pos+1)));\n    } else {\n      GTEST_LOG_(WARNING) << \"unrecognized streaming target \\\"\" << target\n                          << \"\\\" ignored.\";\n    }\n  }\n}\n#endif  // GTEST_CAN_STREAM_RESULTS_\n\n// Performs initialization dependent upon flag values obtained in\n// ParseGoogleTestFlagsOnly.  Is called from InitGoogleTest after the call to\n// ParseGoogleTestFlagsOnly.  In case a user neglects to call InitGoogleTest\n// this function is also called from RunAllTests.  Since this function can be\n// called more than once, it has to be idempotent.\nvoid UnitTestImpl::PostFlagParsingInit() {\n  // Ensures that this function does not execute more than once.\n  if (!post_flag_parse_init_performed_) {\n    post_flag_parse_init_performed_ = true;\n\n#if defined(GTEST_CUSTOM_TEST_EVENT_LISTENER_)\n    // Register to send notifications about key process state changes.\n    listeners()->Append(new GTEST_CUSTOM_TEST_EVENT_LISTENER_());\n#endif  // defined(GTEST_CUSTOM_TEST_EVENT_LISTENER_)\n\n#if GTEST_HAS_DEATH_TEST\n    InitDeathTestSubprocessControlInfo();\n    SuppressTestEventsIfInSubprocess();\n#endif  // GTEST_HAS_DEATH_TEST\n\n    // Registers parameterized tests. This makes parameterized tests\n    // available to the UnitTest reflection API without running\n    // RUN_ALL_TESTS.\n    RegisterParameterizedTests();\n\n    // Configures listeners for XML output. This makes it possible for users\n    // to shut down the default XML output before invoking RUN_ALL_TESTS.\n    ConfigureXmlOutput();\n\n#if GTEST_CAN_STREAM_RESULTS_\n    // Configures listeners for streaming test results to the specified server.\n    ConfigureStreamingOutput();\n#endif  // GTEST_CAN_STREAM_RESULTS_\n\n#if GTEST_HAS_ABSL\n    if (GTEST_FLAG(install_failure_signal_handler)) {\n      absl::FailureSignalHandlerOptions options;\n      absl::InstallFailureSignalHandler(options);\n    }\n#endif  // GTEST_HAS_ABSL\n  }\n}\n\n// A predicate that checks the name of a TestSuite against a known\n// value.\n//\n// This is used for implementation of the UnitTest class only.  We put\n// it in the anonymous namespace to prevent polluting the outer\n// namespace.\n//\n// TestSuiteNameIs is copyable.\nclass TestSuiteNameIs {\n public:\n  // Constructor.\n  explicit TestSuiteNameIs(const std::string& name) : name_(name) {}\n\n  // Returns true iff the name of test_suite matches name_.\n  bool operator()(const TestSuite* test_suite) const {\n    return test_suite != nullptr &&\n           strcmp(test_suite->name(), name_.c_str()) == 0;\n  }\n\n private:\n  std::string name_;\n};\n\n// Finds and returns a TestSuite with the given name.  If one doesn't\n// exist, creates one and returns it.  It's the CALLER'S\n// RESPONSIBILITY to ensure that this function is only called WHEN THE\n// TESTS ARE NOT SHUFFLED.\n//\n// Arguments:\n//\n//   test_suite_name: name of the test suite\n//   type_param:     the name of the test suite's type parameter, or NULL if\n//                   this is not a typed or a type-parameterized test suite.\n//   set_up_tc:      pointer to the function that sets up the test suite\n//   tear_down_tc:   pointer to the function that tears down the test suite\nTestSuite* UnitTestImpl::GetTestSuite(\n    const char* test_suite_name, const char* type_param,\n    internal::SetUpTestSuiteFunc set_up_tc,\n    internal::TearDownTestSuiteFunc tear_down_tc) {\n  // Can we find a TestSuite with the given name?\n  const auto test_suite =\n      std::find_if(test_suites_.rbegin(), test_suites_.rend(),\n                   TestSuiteNameIs(test_suite_name));\n\n  if (test_suite != test_suites_.rend()) return *test_suite;\n\n  // No.  Let's create one.\n  auto* const new_test_suite =\n      new TestSuite(test_suite_name, type_param, set_up_tc, tear_down_tc);\n\n  // Is this a death test suite?\n  if (internal::UnitTestOptions::MatchesFilter(test_suite_name,\n                                               kDeathTestSuiteFilter)) {\n    // Yes.  Inserts the test suite after the last death test suite\n    // defined so far.  This only works when the test suites haven't\n    // been shuffled.  Otherwise we may end up running a death test\n    // after a non-death test.\n    ++last_death_test_suite_;\n    test_suites_.insert(test_suites_.begin() + last_death_test_suite_,\n                        new_test_suite);\n  } else {\n    // No.  Appends to the end of the list.\n    test_suites_.push_back(new_test_suite);\n  }\n\n  test_suite_indices_.push_back(static_cast<int>(test_suite_indices_.size()));\n  return new_test_suite;\n}\n\n// Helpers for setting up / tearing down the given environment.  They\n// are for use in the ForEach() function.\nstatic void SetUpEnvironment(Environment* env) { env->SetUp(); }\nstatic void TearDownEnvironment(Environment* env) { env->TearDown(); }\n\n// Runs all tests in this UnitTest object, prints the result, and\n// returns true if all tests are successful.  If any exception is\n// thrown during a test, the test is considered to be failed, but the\n// rest of the tests will still be run.\n//\n// When parameterized tests are enabled, it expands and registers\n// parameterized tests first in RegisterParameterizedTests().\n// All other functions called from RunAllTests() may safely assume that\n// parameterized tests are ready to be counted and run.\nbool UnitTestImpl::RunAllTests() {\n  // True iff Google Test is initialized before RUN_ALL_TESTS() is called.\n  const bool gtest_is_initialized_before_run_all_tests = GTestIsInitialized();\n\n  // Do not run any test if the --help flag was specified.\n  if (g_help_flag)\n    return true;\n\n  // Repeats the call to the post-flag parsing initialization in case the\n  // user didn't call InitGoogleTest.\n  PostFlagParsingInit();\n\n  // Even if sharding is not on, test runners may want to use the\n  // GTEST_SHARD_STATUS_FILE to query whether the test supports the sharding\n  // protocol.\n  internal::WriteToShardStatusFileIfNeeded();\n\n  // True iff we are in a subprocess for running a thread-safe-style\n  // death test.\n  bool in_subprocess_for_death_test = false;\n\n#if GTEST_HAS_DEATH_TEST\n  in_subprocess_for_death_test =\n      (internal_run_death_test_flag_.get() != nullptr);\n# if defined(GTEST_EXTRA_DEATH_TEST_CHILD_SETUP_)\n  if (in_subprocess_for_death_test) {\n    GTEST_EXTRA_DEATH_TEST_CHILD_SETUP_();\n  }\n# endif  // defined(GTEST_EXTRA_DEATH_TEST_CHILD_SETUP_)\n#endif  // GTEST_HAS_DEATH_TEST\n\n  const bool should_shard = ShouldShard(kTestTotalShards, kTestShardIndex,\n                                        in_subprocess_for_death_test);\n\n  // Compares the full test names with the filter to decide which\n  // tests to run.\n  const bool has_tests_to_run = FilterTests(should_shard\n                                              ? HONOR_SHARDING_PROTOCOL\n                                              : IGNORE_SHARDING_PROTOCOL) > 0;\n\n  // Lists the tests and exits if the --gtest_list_tests flag was specified.\n  if (GTEST_FLAG(list_tests)) {\n    // This must be called *after* FilterTests() has been called.\n    ListTestsMatchingFilter();\n    return true;\n  }\n\n  random_seed_ = GTEST_FLAG(shuffle) ?\n      GetRandomSeedFromFlag(GTEST_FLAG(random_seed)) : 0;\n\n  // True iff at least one test has failed.\n  bool failed = false;\n\n  TestEventListener* repeater = listeners()->repeater();\n\n  start_timestamp_ = GetTimeInMillis();\n  repeater->OnTestProgramStart(*parent_);\n\n  // How many times to repeat the tests?  We don't want to repeat them\n  // when we are inside the subprocess of a death test.\n  const int repeat = in_subprocess_for_death_test ? 1 : GTEST_FLAG(repeat);\n  // Repeats forever if the repeat count is negative.\n  const bool forever = repeat < 0;\n  for (int i = 0; forever || i != repeat; i++) {\n    // We want to preserve failures generated by ad-hoc test\n    // assertions executed before RUN_ALL_TESTS().\n    ClearNonAdHocTestResult();\n\n    const TimeInMillis start = GetTimeInMillis();\n\n    // Shuffles test suites and tests if requested.\n    if (has_tests_to_run && GTEST_FLAG(shuffle)) {\n      random()->Reseed(random_seed_);\n      // This should be done before calling OnTestIterationStart(),\n      // such that a test event listener can see the actual test order\n      // in the event.\n      ShuffleTests();\n    }\n\n    // Tells the unit test event listeners that the tests are about to start.\n    repeater->OnTestIterationStart(*parent_, i);\n\n    // Runs each test suite if there is at least one test to run.\n    if (has_tests_to_run) {\n      // Sets up all environments beforehand.\n      repeater->OnEnvironmentsSetUpStart(*parent_);\n      ForEach(environments_, SetUpEnvironment);\n      repeater->OnEnvironmentsSetUpEnd(*parent_);\n\n      // Runs the tests only if there was no fatal failure during global\n      // set-up.\n      if (!Test::HasFatalFailure()) {\n        for (int test_index = 0; test_index < total_test_suite_count();\n             test_index++) {\n          GetMutableSuiteCase(test_index)->Run();\n        }\n      }\n\n      // Tears down all environments in reverse order afterwards.\n      repeater->OnEnvironmentsTearDownStart(*parent_);\n      std::for_each(environments_.rbegin(), environments_.rend(),\n                    TearDownEnvironment);\n      repeater->OnEnvironmentsTearDownEnd(*parent_);\n    }\n\n    elapsed_time_ = GetTimeInMillis() - start;\n\n    // Tells the unit test event listener that the tests have just finished.\n    repeater->OnTestIterationEnd(*parent_, i);\n\n    // Gets the result and clears it.\n    if (!Passed()) {\n      failed = true;\n    }\n\n    // Restores the original test order after the iteration.  This\n    // allows the user to quickly repro a failure that happens in the\n    // N-th iteration without repeating the first (N - 1) iterations.\n    // This is not enclosed in \"if (GTEST_FLAG(shuffle)) { ... }\", in\n    // case the user somehow changes the value of the flag somewhere\n    // (it's always safe to unshuffle the tests).\n    UnshuffleTests();\n\n    if (GTEST_FLAG(shuffle)) {\n      // Picks a new random seed for each iteration.\n      random_seed_ = GetNextRandomSeed(random_seed_);\n    }\n  }\n\n  repeater->OnTestProgramEnd(*parent_);\n\n  if (!gtest_is_initialized_before_run_all_tests) {\n    ColoredPrintf(\n        COLOR_RED,\n        \"\\nIMPORTANT NOTICE - DO NOT IGNORE:\\n\"\n        \"This test program did NOT call \" GTEST_INIT_GOOGLE_TEST_NAME_\n        \"() before calling RUN_ALL_TESTS(). This is INVALID. Soon \" GTEST_NAME_\n        \" will start to enforce the valid usage. \"\n        \"Please fix it ASAP, or IT WILL START TO FAIL.\\n\");  // NOLINT\n#if GTEST_FOR_GOOGLE_\n    ColoredPrintf(COLOR_RED,\n                  \"For more details, see http://wiki/Main/ValidGUnitMain.\\n\");\n#endif  // GTEST_FOR_GOOGLE_\n  }\n\n  return !failed;\n}\n\n// Reads the GTEST_SHARD_STATUS_FILE environment variable, and creates the file\n// if the variable is present. If a file already exists at this location, this\n// function will write over it. If the variable is present, but the file cannot\n// be created, prints an error and exits.\nvoid WriteToShardStatusFileIfNeeded() {\n  const char* const test_shard_file = posix::GetEnv(kTestShardStatusFile);\n  if (test_shard_file != nullptr) {\n    FILE* const file = posix::FOpen(test_shard_file, \"w\");\n    if (file == nullptr) {\n      ColoredPrintf(COLOR_RED,\n                    \"Could not write to the test shard status file \\\"%s\\\" \"\n                    \"specified by the %s environment variable.\\n\",\n                    test_shard_file, kTestShardStatusFile);\n      fflush(stdout);\n      exit(EXIT_FAILURE);\n    }\n    fclose(file);\n  }\n}\n\n// Checks whether sharding is enabled by examining the relevant\n// environment variable values. If the variables are present,\n// but inconsistent (i.e., shard_index >= total_shards), prints\n// an error and exits. If in_subprocess_for_death_test, sharding is\n// disabled because it must only be applied to the original test\n// process. Otherwise, we could filter out death tests we intended to execute.\nbool ShouldShard(const char* total_shards_env,\n                 const char* shard_index_env,\n                 bool in_subprocess_for_death_test) {\n  if (in_subprocess_for_death_test) {\n    return false;\n  }\n\n  const Int32 total_shards = Int32FromEnvOrDie(total_shards_env, -1);\n  const Int32 shard_index = Int32FromEnvOrDie(shard_index_env, -1);\n\n  if (total_shards == -1 && shard_index == -1) {\n    return false;\n  } else if (total_shards == -1 && shard_index != -1) {\n    const Message msg = Message()\n      << \"Invalid environment variables: you have \"\n      << kTestShardIndex << \" = \" << shard_index\n      << \", but have left \" << kTestTotalShards << \" unset.\\n\";\n    ColoredPrintf(COLOR_RED, \"%s\", msg.GetString().c_str());\n    fflush(stdout);\n    exit(EXIT_FAILURE);\n  } else if (total_shards != -1 && shard_index == -1) {\n    const Message msg = Message()\n      << \"Invalid environment variables: you have \"\n      << kTestTotalShards << \" = \" << total_shards\n      << \", but have left \" << kTestShardIndex << \" unset.\\n\";\n    ColoredPrintf(COLOR_RED, \"%s\", msg.GetString().c_str());\n    fflush(stdout);\n    exit(EXIT_FAILURE);\n  } else if (shard_index < 0 || shard_index >= total_shards) {\n    const Message msg = Message()\n      << \"Invalid environment variables: we require 0 <= \"\n      << kTestShardIndex << \" < \" << kTestTotalShards\n      << \", but you have \" << kTestShardIndex << \"=\" << shard_index\n      << \", \" << kTestTotalShards << \"=\" << total_shards << \".\\n\";\n    ColoredPrintf(COLOR_RED, \"%s\", msg.GetString().c_str());\n    fflush(stdout);\n    exit(EXIT_FAILURE);\n  }\n\n  return total_shards > 1;\n}\n\n// Parses the environment variable var as an Int32. If it is unset,\n// returns default_val. If it is not an Int32, prints an error\n// and aborts.\nInt32 Int32FromEnvOrDie(const char* var, Int32 default_val) {\n  const char* str_val = posix::GetEnv(var);\n  if (str_val == nullptr) {\n    return default_val;\n  }\n\n  Int32 result;\n  if (!ParseInt32(Message() << \"The value of environment variable \" << var,\n                  str_val, &result)) {\n    exit(EXIT_FAILURE);\n  }\n  return result;\n}\n\n// Given the total number of shards, the shard index, and the test id,\n// returns true iff the test should be run on this shard. The test id is\n// some arbitrary but unique non-negative integer assigned to each test\n// method. Assumes that 0 <= shard_index < total_shards.\nbool ShouldRunTestOnShard(int total_shards, int shard_index, int test_id) {\n  return (test_id % total_shards) == shard_index;\n}\n\n// Compares the name of each test with the user-specified filter to\n// decide whether the test should be run, then records the result in\n// each TestSuite and TestInfo object.\n// If shard_tests == true, further filters tests based on sharding\n// variables in the environment - see\n// https://github.com/google/googletest/blob/master/googletest/docs/advanced.md\n// . Returns the number of tests that should run.\nint UnitTestImpl::FilterTests(ReactionToSharding shard_tests) {\n  const Int32 total_shards = shard_tests == HONOR_SHARDING_PROTOCOL ?\n      Int32FromEnvOrDie(kTestTotalShards, -1) : -1;\n  const Int32 shard_index = shard_tests == HONOR_SHARDING_PROTOCOL ?\n      Int32FromEnvOrDie(kTestShardIndex, -1) : -1;\n\n  // num_runnable_tests are the number of tests that will\n  // run across all shards (i.e., match filter and are not disabled).\n  // num_selected_tests are the number of tests to be run on\n  // this shard.\n  int num_runnable_tests = 0;\n  int num_selected_tests = 0;\n  for (auto* test_suite : test_suites_) {\n    const std::string& test_suite_name = test_suite->name();\n    test_suite->set_should_run(false);\n\n    for (size_t j = 0; j < test_suite->test_info_list().size(); j++) {\n      TestInfo* const test_info = test_suite->test_info_list()[j];\n      const std::string test_name(test_info->name());\n      // A test is disabled if test suite name or test name matches\n      // kDisableTestFilter.\n      const bool is_disabled = internal::UnitTestOptions::MatchesFilter(\n                                   test_suite_name, kDisableTestFilter) ||\n                               internal::UnitTestOptions::MatchesFilter(\n                                   test_name, kDisableTestFilter);\n      test_info->is_disabled_ = is_disabled;\n\n      const bool matches_filter = internal::UnitTestOptions::FilterMatchesTest(\n          test_suite_name, test_name);\n      test_info->matches_filter_ = matches_filter;\n\n      const bool is_runnable =\n          (GTEST_FLAG(also_run_disabled_tests) || !is_disabled) &&\n          matches_filter;\n\n      const bool is_in_another_shard =\n          shard_tests != IGNORE_SHARDING_PROTOCOL &&\n          !ShouldRunTestOnShard(total_shards, shard_index, num_runnable_tests);\n      test_info->is_in_another_shard_ = is_in_another_shard;\n      const bool is_selected = is_runnable && !is_in_another_shard;\n\n      num_runnable_tests += is_runnable;\n      num_selected_tests += is_selected;\n\n      test_info->should_run_ = is_selected;\n      test_suite->set_should_run(test_suite->should_run() || is_selected);\n    }\n  }\n  return num_selected_tests;\n}\n\n// Prints the given C-string on a single line by replacing all '\\n'\n// characters with string \"\\\\n\".  If the output takes more than\n// max_length characters, only prints the first max_length characters\n// and \"...\".\nstatic void PrintOnOneLine(const char* str, int max_length) {\n  if (str != nullptr) {\n    for (int i = 0; *str != '\\0'; ++str) {\n      if (i >= max_length) {\n        printf(\"...\");\n        break;\n      }\n      if (*str == '\\n') {\n        printf(\"\\\\n\");\n        i += 2;\n      } else {\n        printf(\"%c\", *str);\n        ++i;\n      }\n    }\n  }\n}\n\n// Prints the names of the tests matching the user-specified filter flag.\nvoid UnitTestImpl::ListTestsMatchingFilter() {\n  // Print at most this many characters for each type/value parameter.\n  const int kMaxParamLength = 250;\n\n  for (auto* test_suite : test_suites_) {\n    bool printed_test_suite_name = false;\n\n    for (size_t j = 0; j < test_suite->test_info_list().size(); j++) {\n      const TestInfo* const test_info = test_suite->test_info_list()[j];\n      if (test_info->matches_filter_) {\n        if (!printed_test_suite_name) {\n          printed_test_suite_name = true;\n          printf(\"%s.\", test_suite->name());\n          if (test_suite->type_param() != nullptr) {\n            printf(\"  # %s = \", kTypeParamLabel);\n            // We print the type parameter on a single line to make\n            // the output easy to parse by a program.\n            PrintOnOneLine(test_suite->type_param(), kMaxParamLength);\n          }\n          printf(\"\\n\");\n        }\n        printf(\"  %s\", test_info->name());\n        if (test_info->value_param() != nullptr) {\n          printf(\"  # %s = \", kValueParamLabel);\n          // We print the value parameter on a single line to make the\n          // output easy to parse by a program.\n          PrintOnOneLine(test_info->value_param(), kMaxParamLength);\n        }\n        printf(\"\\n\");\n      }\n    }\n  }\n  fflush(stdout);\n  const std::string& output_format = UnitTestOptions::GetOutputFormat();\n  if (output_format == \"xml\" || output_format == \"json\") {\n    FILE* fileout = OpenFileForWriting(\n        UnitTestOptions::GetAbsolutePathToOutputFile().c_str());\n    std::stringstream stream;\n    if (output_format == \"xml\") {\n      XmlUnitTestResultPrinter(\n          UnitTestOptions::GetAbsolutePathToOutputFile().c_str())\n          .PrintXmlTestsList(&stream, test_suites_);\n    } else if (output_format == \"json\") {\n      JsonUnitTestResultPrinter(\n          UnitTestOptions::GetAbsolutePathToOutputFile().c_str())\n          .PrintJsonTestList(&stream, test_suites_);\n    }\n    fprintf(fileout, \"%s\", StringStreamToString(&stream).c_str());\n    fclose(fileout);\n  }\n}\n\n// Sets the OS stack trace getter.\n//\n// Does nothing if the input and the current OS stack trace getter are\n// the same; otherwise, deletes the old getter and makes the input the\n// current getter.\nvoid UnitTestImpl::set_os_stack_trace_getter(\n    OsStackTraceGetterInterface* getter) {\n  if (os_stack_trace_getter_ != getter) {\n    delete os_stack_trace_getter_;\n    os_stack_trace_getter_ = getter;\n  }\n}\n\n// Returns the current OS stack trace getter if it is not NULL;\n// otherwise, creates an OsStackTraceGetter, makes it the current\n// getter, and returns it.\nOsStackTraceGetterInterface* UnitTestImpl::os_stack_trace_getter() {\n  if (os_stack_trace_getter_ == nullptr) {\n#ifdef GTEST_OS_STACK_TRACE_GETTER_\n    os_stack_trace_getter_ = new GTEST_OS_STACK_TRACE_GETTER_;\n#else\n    os_stack_trace_getter_ = new OsStackTraceGetter;\n#endif  // GTEST_OS_STACK_TRACE_GETTER_\n  }\n\n  return os_stack_trace_getter_;\n}\n\n// Returns the most specific TestResult currently running.\nTestResult* UnitTestImpl::current_test_result() {\n  if (current_test_info_ != nullptr) {\n    return &current_test_info_->result_;\n  }\n  if (current_test_suite_ != nullptr) {\n    return &current_test_suite_->ad_hoc_test_result_;\n  }\n  return &ad_hoc_test_result_;\n}\n\n// Shuffles all test suites, and the tests within each test suite,\n// making sure that death tests are still run first.\nvoid UnitTestImpl::ShuffleTests() {\n  // Shuffles the death test suites.\n  ShuffleRange(random(), 0, last_death_test_suite_ + 1, &test_suite_indices_);\n\n  // Shuffles the non-death test suites.\n  ShuffleRange(random(), last_death_test_suite_ + 1,\n               static_cast<int>(test_suites_.size()), &test_suite_indices_);\n\n  // Shuffles the tests inside each test suite.\n  for (auto& test_suite : test_suites_) {\n    test_suite->ShuffleTests(random());\n  }\n}\n\n// Restores the test suites and tests to their order before the first shuffle.\nvoid UnitTestImpl::UnshuffleTests() {\n  for (size_t i = 0; i < test_suites_.size(); i++) {\n    // Unshuffles the tests in each test suite.\n    test_suites_[i]->UnshuffleTests();\n    // Resets the index of each test suite.\n    test_suite_indices_[i] = static_cast<int>(i);\n  }\n}\n\n// Returns the current OS stack trace as an std::string.\n//\n// The maximum number of stack frames to be included is specified by\n// the gtest_stack_trace_depth flag.  The skip_count parameter\n// specifies the number of top frames to be skipped, which doesn't\n// count against the number of frames to be included.\n//\n// For example, if Foo() calls Bar(), which in turn calls\n// GetCurrentOsStackTraceExceptTop(..., 1), Foo() will be included in\n// the trace but Bar() and GetCurrentOsStackTraceExceptTop() won't.\nstd::string GetCurrentOsStackTraceExceptTop(UnitTest* /*unit_test*/,\n                                            int skip_count) {\n  // We pass skip_count + 1 to skip this wrapper function in addition\n  // to what the user really wants to skip.\n  return GetUnitTestImpl()->CurrentOsStackTraceExceptTop(skip_count + 1);\n}\n\n// Used by the GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_ macro to\n// suppress unreachable code warnings.\nnamespace {\nclass ClassUniqueToAlwaysTrue {};\n}\n\nbool IsTrue(bool condition) { return condition; }\n\nbool AlwaysTrue() {\n#if GTEST_HAS_EXCEPTIONS\n  // This condition is always false so AlwaysTrue() never actually throws,\n  // but it makes the compiler think that it may throw.\n  if (IsTrue(false))\n    throw ClassUniqueToAlwaysTrue();\n#endif  // GTEST_HAS_EXCEPTIONS\n  return true;\n}\n\n// If *pstr starts with the given prefix, modifies *pstr to be right\n// past the prefix and returns true; otherwise leaves *pstr unchanged\n// and returns false.  None of pstr, *pstr, and prefix can be NULL.\nbool SkipPrefix(const char* prefix, const char** pstr) {\n  const size_t prefix_len = strlen(prefix);\n  if (strncmp(*pstr, prefix, prefix_len) == 0) {\n    *pstr += prefix_len;\n    return true;\n  }\n  return false;\n}\n\n// Parses a string as a command line flag.  The string should have\n// the format \"--flag=value\".  When def_optional is true, the \"=value\"\n// part can be omitted.\n//\n// Returns the value of the flag, or NULL if the parsing failed.\nstatic const char* ParseFlagValue(const char* str, const char* flag,\n                                  bool def_optional) {\n  // str and flag must not be NULL.\n  if (str == nullptr || flag == nullptr) return nullptr;\n\n  // The flag must start with \"--\" followed by GTEST_FLAG_PREFIX_.\n  const std::string flag_str = std::string(\"--\") + GTEST_FLAG_PREFIX_ + flag;\n  const size_t flag_len = flag_str.length();\n  if (strncmp(str, flag_str.c_str(), flag_len) != 0) return nullptr;\n\n  // Skips the flag name.\n  const char* flag_end = str + flag_len;\n\n  // When def_optional is true, it's OK to not have a \"=value\" part.\n  if (def_optional && (flag_end[0] == '\\0')) {\n    return flag_end;\n  }\n\n  // If def_optional is true and there are more characters after the\n  // flag name, or if def_optional is false, there must be a '=' after\n  // the flag name.\n  if (flag_end[0] != '=') return nullptr;\n\n  // Returns the string after \"=\".\n  return flag_end + 1;\n}\n\n// Parses a string for a bool flag, in the form of either\n// \"--flag=value\" or \"--flag\".\n//\n// In the former case, the value is taken as true as long as it does\n// not start with '0', 'f', or 'F'.\n//\n// In the latter case, the value is taken as true.\n//\n// On success, stores the value of the flag in *value, and returns\n// true.  On failure, returns false without changing *value.\nstatic bool ParseBoolFlag(const char* str, const char* flag, bool* value) {\n  // Gets the value of the flag as a string.\n  const char* const value_str = ParseFlagValue(str, flag, true);\n\n  // Aborts if the parsing failed.\n  if (value_str == nullptr) return false;\n\n  // Converts the string value to a bool.\n  *value = !(*value_str == '0' || *value_str == 'f' || *value_str == 'F');\n  return true;\n}\n\n// Parses a string for an Int32 flag, in the form of\n// \"--flag=value\".\n//\n// On success, stores the value of the flag in *value, and returns\n// true.  On failure, returns false without changing *value.\nbool ParseInt32Flag(const char* str, const char* flag, Int32* value) {\n  // Gets the value of the flag as a string.\n  const char* const value_str = ParseFlagValue(str, flag, false);\n\n  // Aborts if the parsing failed.\n  if (value_str == nullptr) return false;\n\n  // Sets *value to the value of the flag.\n  return ParseInt32(Message() << \"The value of flag --\" << flag,\n                    value_str, value);\n}\n\n// Parses a string for a string flag, in the form of\n// \"--flag=value\".\n//\n// On success, stores the value of the flag in *value, and returns\n// true.  On failure, returns false without changing *value.\ntemplate <typename String>\nstatic bool ParseStringFlag(const char* str, const char* flag, String* value) {\n  // Gets the value of the flag as a string.\n  const char* const value_str = ParseFlagValue(str, flag, false);\n\n  // Aborts if the parsing failed.\n  if (value_str == nullptr) return false;\n\n  // Sets *value to the value of the flag.\n  *value = value_str;\n  return true;\n}\n\n// Determines whether a string has a prefix that Google Test uses for its\n// flags, i.e., starts with GTEST_FLAG_PREFIX_ or GTEST_FLAG_PREFIX_DASH_.\n// If Google Test detects that a command line flag has its prefix but is not\n// recognized, it will print its help message. Flags starting with\n// GTEST_INTERNAL_PREFIX_ followed by \"internal_\" are considered Google Test\n// internal flags and do not trigger the help message.\nstatic bool HasGoogleTestFlagPrefix(const char* str) {\n  return (SkipPrefix(\"--\", &str) ||\n          SkipPrefix(\"-\", &str) ||\n          SkipPrefix(\"/\", &str)) &&\n         !SkipPrefix(GTEST_FLAG_PREFIX_ \"internal_\", &str) &&\n         (SkipPrefix(GTEST_FLAG_PREFIX_, &str) ||\n          SkipPrefix(GTEST_FLAG_PREFIX_DASH_, &str));\n}\n\n// Prints a string containing code-encoded text.  The following escape\n// sequences can be used in the string to control the text color:\n//\n//   @@    prints a single '@' character.\n//   @R    changes the color to red.\n//   @G    changes the color to green.\n//   @Y    changes the color to yellow.\n//   @D    changes to the default terminal text color.\n//\nstatic void PrintColorEncoded(const char* str) {\n  GTestColor color = COLOR_DEFAULT;  // The current color.\n\n  // Conceptually, we split the string into segments divided by escape\n  // sequences.  Then we print one segment at a time.  At the end of\n  // each iteration, the str pointer advances to the beginning of the\n  // next segment.\n  for (;;) {\n    const char* p = strchr(str, '@');\n    if (p == nullptr) {\n      ColoredPrintf(color, \"%s\", str);\n      return;\n    }\n\n    ColoredPrintf(color, \"%s\", std::string(str, p).c_str());\n\n    const char ch = p[1];\n    str = p + 2;\n    if (ch == '@') {\n      ColoredPrintf(color, \"@\");\n    } else if (ch == 'D') {\n      color = COLOR_DEFAULT;\n    } else if (ch == 'R') {\n      color = COLOR_RED;\n    } else if (ch == 'G') {\n      color = COLOR_GREEN;\n    } else if (ch == 'Y') {\n      color = COLOR_YELLOW;\n    } else {\n      --str;\n    }\n  }\n}\n\nstatic const char kColorEncodedHelpMessage[] =\n\"This program contains tests written using \" GTEST_NAME_ \". You can use the\\n\"\n\"following command line flags to control its behavior:\\n\"\n\"\\n\"\n\"Test Selection:\\n\"\n\"  @G--\" GTEST_FLAG_PREFIX_ \"list_tests@D\\n\"\n\"      List the names of all tests instead of running them. The name of\\n\"\n\"      TEST(Foo, Bar) is \\\"Foo.Bar\\\".\\n\"\n\"  @G--\" GTEST_FLAG_PREFIX_ \"filter=@YPOSTIVE_PATTERNS\"\n    \"[@G-@YNEGATIVE_PATTERNS]@D\\n\"\n\"      Run only the tests whose name matches one of the positive patterns but\\n\"\n\"      none of the negative patterns. '?' matches any single character; '*'\\n\"\n\"      matches any substring; ':' separates two patterns.\\n\"\n\"  @G--\" GTEST_FLAG_PREFIX_ \"also_run_disabled_tests@D\\n\"\n\"      Run all disabled tests too.\\n\"\n\"\\n\"\n\"Test Execution:\\n\"\n\"  @G--\" GTEST_FLAG_PREFIX_ \"repeat=@Y[COUNT]@D\\n\"\n\"      Run the tests repeatedly; use a negative count to repeat forever.\\n\"\n\"  @G--\" GTEST_FLAG_PREFIX_ \"shuffle@D\\n\"\n\"      Randomize tests' orders on every iteration.\\n\"\n\"  @G--\" GTEST_FLAG_PREFIX_ \"random_seed=@Y[NUMBER]@D\\n\"\n\"      Random number seed to use for shuffling test orders (between 1 and\\n\"\n\"      99999, or 0 to use a seed based on the current time).\\n\"\n\"\\n\"\n\"Test Output:\\n\"\n\"  @G--\" GTEST_FLAG_PREFIX_ \"color=@Y(@Gyes@Y|@Gno@Y|@Gauto@Y)@D\\n\"\n\"      Enable/disable colored output. The default is @Gauto@D.\\n\"\n\"  -@G-\" GTEST_FLAG_PREFIX_ \"print_time=0@D\\n\"\n\"      Don't print the elapsed time of each test.\\n\"\n\"  @G--\" GTEST_FLAG_PREFIX_ \"output=@Y(@Gjson@Y|@Gxml@Y)[@G:@YDIRECTORY_PATH@G\"\n    GTEST_PATH_SEP_ \"@Y|@G:@YFILE_PATH]@D\\n\"\n\"      Generate a JSON or XML report in the given directory or with the given\\n\"\n\"      file name. @YFILE_PATH@D defaults to @Gtest_detail.xml@D.\\n\"\n# if GTEST_CAN_STREAM_RESULTS_\n\"  @G--\" GTEST_FLAG_PREFIX_ \"stream_result_to=@YHOST@G:@YPORT@D\\n\"\n\"      Stream test results to the given server.\\n\"\n# endif  // GTEST_CAN_STREAM_RESULTS_\n\"\\n\"\n\"Assertion Behavior:\\n\"\n# if GTEST_HAS_DEATH_TEST && !GTEST_OS_WINDOWS\n\"  @G--\" GTEST_FLAG_PREFIX_ \"death_test_style=@Y(@Gfast@Y|@Gthreadsafe@Y)@D\\n\"\n\"      Set the default death test style.\\n\"\n# endif  // GTEST_HAS_DEATH_TEST && !GTEST_OS_WINDOWS\n\"  @G--\" GTEST_FLAG_PREFIX_ \"break_on_failure@D\\n\"\n\"      Turn assertion failures into debugger break-points.\\n\"\n\"  @G--\" GTEST_FLAG_PREFIX_ \"throw_on_failure@D\\n\"\n\"      Turn assertion failures into C++ exceptions for use by an external\\n\"\n\"      test framework.\\n\"\n\"  @G--\" GTEST_FLAG_PREFIX_ \"catch_exceptions=0@D\\n\"\n\"      Do not report exceptions as test failures. Instead, allow them\\n\"\n\"      to crash the program or throw a pop-up (on Windows).\\n\"\n\"\\n\"\n\"Except for @G--\" GTEST_FLAG_PREFIX_ \"list_tests@D, you can alternatively set \"\n    \"the corresponding\\n\"\n\"environment variable of a flag (all letters in upper-case). For example, to\\n\"\n\"disable colored text output, you can either specify @G--\" GTEST_FLAG_PREFIX_\n    \"color=no@D or set\\n\"\n\"the @G\" GTEST_FLAG_PREFIX_UPPER_ \"COLOR@D environment variable to @Gno@D.\\n\"\n\"\\n\"\n\"For more information, please read the \" GTEST_NAME_ \" documentation at\\n\"\n\"@G\" GTEST_PROJECT_URL_ \"@D. If you find a bug in \" GTEST_NAME_ \"\\n\"\n\"(not one in your own code or tests), please report it to\\n\"\n\"@G<\" GTEST_DEV_EMAIL_ \">@D.\\n\";\n\nstatic bool ParseGoogleTestFlag(const char* const arg) {\n  return ParseBoolFlag(arg, kAlsoRunDisabledTestsFlag,\n                       &GTEST_FLAG(also_run_disabled_tests)) ||\n      ParseBoolFlag(arg, kBreakOnFailureFlag,\n                    &GTEST_FLAG(break_on_failure)) ||\n      ParseBoolFlag(arg, kCatchExceptionsFlag,\n                    &GTEST_FLAG(catch_exceptions)) ||\n      ParseStringFlag(arg, kColorFlag, &GTEST_FLAG(color)) ||\n      ParseStringFlag(arg, kDeathTestStyleFlag,\n                      &GTEST_FLAG(death_test_style)) ||\n      ParseBoolFlag(arg, kDeathTestUseFork,\n                    &GTEST_FLAG(death_test_use_fork)) ||\n      ParseStringFlag(arg, kFilterFlag, &GTEST_FLAG(filter)) ||\n      ParseStringFlag(arg, kInternalRunDeathTestFlag,\n                      &GTEST_FLAG(internal_run_death_test)) ||\n      ParseBoolFlag(arg, kListTestsFlag, &GTEST_FLAG(list_tests)) ||\n      ParseStringFlag(arg, kOutputFlag, &GTEST_FLAG(output)) ||\n      ParseBoolFlag(arg, kPrintTimeFlag, &GTEST_FLAG(print_time)) ||\n      ParseBoolFlag(arg, kPrintUTF8Flag, &GTEST_FLAG(print_utf8)) ||\n      ParseInt32Flag(arg, kRandomSeedFlag, &GTEST_FLAG(random_seed)) ||\n      ParseInt32Flag(arg, kRepeatFlag, &GTEST_FLAG(repeat)) ||\n      ParseBoolFlag(arg, kShuffleFlag, &GTEST_FLAG(shuffle)) ||\n      ParseInt32Flag(arg, kStackTraceDepthFlag,\n                     &GTEST_FLAG(stack_trace_depth)) ||\n      ParseStringFlag(arg, kStreamResultToFlag,\n                      &GTEST_FLAG(stream_result_to)) ||\n      ParseBoolFlag(arg, kThrowOnFailureFlag,\n                    &GTEST_FLAG(throw_on_failure));\n}\n\n#if GTEST_USE_OWN_FLAGFILE_FLAG_\nstatic void LoadFlagsFromFile(const std::string& path) {\n  FILE* flagfile = posix::FOpen(path.c_str(), \"r\");\n  if (!flagfile) {\n    GTEST_LOG_(FATAL) << \"Unable to open file \\\"\" << GTEST_FLAG(flagfile)\n                      << \"\\\"\";\n  }\n  std::string contents(ReadEntireFile(flagfile));\n  posix::FClose(flagfile);\n  std::vector<std::string> lines;\n  SplitString(contents, '\\n', &lines);\n  for (size_t i = 0; i < lines.size(); ++i) {\n    if (lines[i].empty())\n      continue;\n    if (!ParseGoogleTestFlag(lines[i].c_str()))\n      g_help_flag = true;\n  }\n}\n#endif  // GTEST_USE_OWN_FLAGFILE_FLAG_\n\n// Parses the command line for Google Test flags, without initializing\n// other parts of Google Test.  The type parameter CharType can be\n// instantiated to either char or wchar_t.\ntemplate <typename CharType>\nvoid ParseGoogleTestFlagsOnlyImpl(int* argc, CharType** argv) {\n  for (int i = 1; i < *argc; i++) {\n    const std::string arg_string = StreamableToString(argv[i]);\n    const char* const arg = arg_string.c_str();\n\n    using internal::ParseBoolFlag;\n    using internal::ParseInt32Flag;\n    using internal::ParseStringFlag;\n\n    bool remove_flag = false;\n    if (ParseGoogleTestFlag(arg)) {\n      remove_flag = true;\n#if GTEST_USE_OWN_FLAGFILE_FLAG_\n    } else if (ParseStringFlag(arg, kFlagfileFlag, &GTEST_FLAG(flagfile))) {\n      LoadFlagsFromFile(GTEST_FLAG(flagfile));\n      remove_flag = true;\n#endif  // GTEST_USE_OWN_FLAGFILE_FLAG_\n    } else if (arg_string == \"--help\" || arg_string == \"-h\" ||\n               arg_string == \"-?\" || arg_string == \"/?\" ||\n               HasGoogleTestFlagPrefix(arg)) {\n      // Both help flag and unrecognized Google Test flags (excluding\n      // internal ones) trigger help display.\n      g_help_flag = true;\n    }\n\n    if (remove_flag) {\n      // Shift the remainder of the argv list left by one.  Note\n      // that argv has (*argc + 1) elements, the last one always being\n      // NULL.  The following loop moves the trailing NULL element as\n      // well.\n      for (int j = i; j != *argc; j++) {\n        argv[j] = argv[j + 1];\n      }\n\n      // Decrements the argument count.\n      (*argc)--;\n\n      // We also need to decrement the iterator as we just removed\n      // an element.\n      i--;\n    }\n  }\n\n  if (g_help_flag) {\n    // We print the help here instead of in RUN_ALL_TESTS(), as the\n    // latter may not be called at all if the user is using Google\n    // Test with another testing framework.\n    PrintColorEncoded(kColorEncodedHelpMessage);\n  }\n}\n\n// Parses the command line for Google Test flags, without initializing\n// other parts of Google Test.\nvoid ParseGoogleTestFlagsOnly(int* argc, char** argv) {\n  ParseGoogleTestFlagsOnlyImpl(argc, argv);\n\n  // Fix the value of *_NSGetArgc() on macOS, but iff\n  // *_NSGetArgv() == argv\n  // Only applicable to char** version of argv\n#if GTEST_OS_MAC\n#ifndef GTEST_OS_IOS\n  if (*_NSGetArgv() == argv) {\n    *_NSGetArgc() = *argc;\n  }\n#endif\n#endif\n}\nvoid ParseGoogleTestFlagsOnly(int* argc, wchar_t** argv) {\n  ParseGoogleTestFlagsOnlyImpl(argc, argv);\n}\n\n// The internal implementation of InitGoogleTest().\n//\n// The type parameter CharType can be instantiated to either char or\n// wchar_t.\ntemplate <typename CharType>\nvoid InitGoogleTestImpl(int* argc, CharType** argv) {\n  // We don't want to run the initialization code twice.\n  if (GTestIsInitialized()) return;\n\n  if (*argc <= 0) return;\n\n  g_argvs.clear();\n  for (int i = 0; i != *argc; i++) {\n    g_argvs.push_back(StreamableToString(argv[i]));\n  }\n\n#if GTEST_HAS_ABSL\n  absl::InitializeSymbolizer(g_argvs[0].c_str());\n#endif  // GTEST_HAS_ABSL\n\n  ParseGoogleTestFlagsOnly(argc, argv);\n  GetUnitTestImpl()->PostFlagParsingInit();\n}\n\n}  // namespace internal\n\n// Initializes Google Test.  This must be called before calling\n// RUN_ALL_TESTS().  In particular, it parses a command line for the\n// flags that Google Test recognizes.  Whenever a Google Test flag is\n// seen, it is removed from argv, and *argc is decremented.\n//\n// No value is returned.  Instead, the Google Test flag variables are\n// updated.\n//\n// Calling the function for the second time has no user-visible effect.\nvoid InitGoogleTest(int* argc, char** argv) {\n#if defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)\n  GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_(argc, argv);\n#else  // defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)\n  internal::InitGoogleTestImpl(argc, argv);\n#endif  // defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)\n}\n\n// This overloaded version can be used in Windows programs compiled in\n// UNICODE mode.\nvoid InitGoogleTest(int* argc, wchar_t** argv) {\n#if defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)\n  GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_(argc, argv);\n#else  // defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)\n  internal::InitGoogleTestImpl(argc, argv);\n#endif  // defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)\n}\n\n// This overloaded version can be used on Arduino/embedded platforms where\n// there is no argc/argv.\nvoid InitGoogleTest() {\n  // Since Arduino doesn't have a command line, fake out the argc/argv arguments\n  int argc = 1;\n  const auto arg0 = \"dummy\";\n  char* argv0 = const_cast<char*>(arg0);\n  char** argv = &argv0;\n\n#if defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)\n  GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_(&argc, argv);\n#else  // defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)\n  internal::InitGoogleTestImpl(&argc, argv);\n#endif  // defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)\n}\n\nstd::string TempDir() {\n#if defined(GTEST_CUSTOM_TEMPDIR_FUNCTION_)\n  return GTEST_CUSTOM_TEMPDIR_FUNCTION_();\n#endif\n\n#if GTEST_OS_WINDOWS_MOBILE\n  return \"\\\\temp\\\\\";\n#elif GTEST_OS_WINDOWS\n  const char* temp_dir = internal::posix::GetEnv(\"TEMP\");\n  if (temp_dir == nullptr || temp_dir[0] == '\\0')\n    return \"\\\\temp\\\\\";\n  else if (temp_dir[strlen(temp_dir) - 1] == '\\\\')\n    return temp_dir;\n  else\n    return std::string(temp_dir) + \"\\\\\";\n#elif GTEST_OS_LINUX_ANDROID\n  return \"/sdcard/\";\n#else\n  return \"/tmp/\";\n#endif  // GTEST_OS_WINDOWS_MOBILE\n}\n\n// Class ScopedTrace\n\n// Pushes the given source file location and message onto a per-thread\n// trace stack maintained by Google Test.\nvoid ScopedTrace::PushTrace(const char* file, int line, std::string message) {\n  internal::TraceInfo trace;\n  trace.file = file;\n  trace.line = line;\n  trace.message.swap(message);\n\n  UnitTest::GetInstance()->PushGTestTrace(trace);\n}\n\n// Pops the info pushed by the c'tor.\nScopedTrace::~ScopedTrace()\n    GTEST_LOCK_EXCLUDED_(&UnitTest::mutex_) {\n  UnitTest::GetInstance()->PopGTestTrace();\n}\n\n}  // namespace testing\n// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n//\n// This file implements death tests.\n\n\n#include <utility>\n\n\n#if GTEST_HAS_DEATH_TEST\n\n# if GTEST_OS_MAC\n#  include <crt_externs.h>\n# endif  // GTEST_OS_MAC\n\n# include <errno.h>\n# include <fcntl.h>\n# include <limits.h>\n\n# if GTEST_OS_LINUX\n#  include <signal.h>\n# endif  // GTEST_OS_LINUX\n\n# include <stdarg.h>\n\n# if GTEST_OS_WINDOWS\n#  include <windows.h>\n# else\n#  include <sys/mman.h>\n#  include <sys/wait.h>\n# endif  // GTEST_OS_WINDOWS\n\n# if GTEST_OS_QNX\n#  include <spawn.h>\n# endif  // GTEST_OS_QNX\n\n# if GTEST_OS_FUCHSIA\n#  include <lib/fdio/fd.h>\n#  include <lib/fdio/io.h>\n#  include <lib/fdio/spawn.h>\n#  include <lib/zx/port.h>\n#  include <lib/zx/process.h>\n#  include <lib/zx/socket.h>\n#  include <zircon/processargs.h>\n#  include <zircon/syscalls.h>\n#  include <zircon/syscalls/policy.h>\n#  include <zircon/syscalls/port.h>\n# endif  // GTEST_OS_FUCHSIA\n\n#endif  // GTEST_HAS_DEATH_TEST\n\n\nnamespace testing {\n\n// Constants.\n\n// The default death test style.\n//\n// This is defined in internal/gtest-port.h as \"fast\", but can be overridden by\n// a definition in internal/custom/gtest-port.h. The recommended value, which is\n// used internally at Google, is \"threadsafe\".\nstatic const char kDefaultDeathTestStyle[] = GTEST_DEFAULT_DEATH_TEST_STYLE;\n\nGTEST_DEFINE_string_(\n    death_test_style,\n    internal::StringFromGTestEnv(\"death_test_style\", kDefaultDeathTestStyle),\n    \"Indicates how to run a death test in a forked child process: \"\n    \"\\\"threadsafe\\\" (child process re-executes the test binary \"\n    \"from the beginning, running only the specific death test) or \"\n    \"\\\"fast\\\" (child process runs the death test immediately \"\n    \"after forking).\");\n\nGTEST_DEFINE_bool_(\n    death_test_use_fork,\n    internal::BoolFromGTestEnv(\"death_test_use_fork\", false),\n    \"Instructs to use fork()/_exit() instead of clone() in death tests. \"\n    \"Ignored and always uses fork() on POSIX systems where clone() is not \"\n    \"implemented. Useful when running under valgrind or similar tools if \"\n    \"those do not support clone(). Valgrind 3.3.1 will just fail if \"\n    \"it sees an unsupported combination of clone() flags. \"\n    \"It is not recommended to use this flag w/o valgrind though it will \"\n    \"work in 99% of the cases. Once valgrind is fixed, this flag will \"\n    \"most likely be removed.\");\n\nnamespace internal {\nGTEST_DEFINE_string_(\n    internal_run_death_test, \"\",\n    \"Indicates the file, line number, temporal index of \"\n    \"the single death test to run, and a file descriptor to \"\n    \"which a success code may be sent, all separated by \"\n    \"the '|' characters.  This flag is specified if and only if the current \"\n    \"process is a sub-process launched for running a thread-safe \"\n    \"death test.  FOR INTERNAL USE ONLY.\");\n}  // namespace internal\n\n#if GTEST_HAS_DEATH_TEST\n\nnamespace internal {\n\n// Valid only for fast death tests. Indicates the code is running in the\n// child process of a fast style death test.\n# if !GTEST_OS_WINDOWS && !GTEST_OS_FUCHSIA\nstatic bool g_in_fast_death_test_child = false;\n# endif\n\n// Returns a Boolean value indicating whether the caller is currently\n// executing in the context of the death test child process.  Tools such as\n// Valgrind heap checkers may need this to modify their behavior in death\n// tests.  IMPORTANT: This is an internal utility.  Using it may break the\n// implementation of death tests.  User code MUST NOT use it.\nbool InDeathTestChild() {\n# if GTEST_OS_WINDOWS || GTEST_OS_FUCHSIA\n\n  // On Windows and Fuchsia, death tests are thread-safe regardless of the value\n  // of the death_test_style flag.\n  return !GTEST_FLAG(internal_run_death_test).empty();\n\n# else\n\n  if (GTEST_FLAG(death_test_style) == \"threadsafe\")\n    return !GTEST_FLAG(internal_run_death_test).empty();\n  else\n    return g_in_fast_death_test_child;\n#endif\n}\n\n}  // namespace internal\n\n// ExitedWithCode constructor.\nExitedWithCode::ExitedWithCode(int exit_code) : exit_code_(exit_code) {\n}\n\n// ExitedWithCode function-call operator.\nbool ExitedWithCode::operator()(int exit_status) const {\n# if GTEST_OS_WINDOWS || GTEST_OS_FUCHSIA\n\n  return exit_status == exit_code_;\n\n# else\n\n  return WIFEXITED(exit_status) && WEXITSTATUS(exit_status) == exit_code_;\n\n# endif  // GTEST_OS_WINDOWS || GTEST_OS_FUCHSIA\n}\n\n# if !GTEST_OS_WINDOWS && !GTEST_OS_FUCHSIA\n// KilledBySignal constructor.\nKilledBySignal::KilledBySignal(int signum) : signum_(signum) {\n}\n\n// KilledBySignal function-call operator.\nbool KilledBySignal::operator()(int exit_status) const {\n#  if defined(GTEST_KILLED_BY_SIGNAL_OVERRIDE_)\n  {\n    bool result;\n    if (GTEST_KILLED_BY_SIGNAL_OVERRIDE_(signum_, exit_status, &result)) {\n      return result;\n    }\n  }\n#  endif  // defined(GTEST_KILLED_BY_SIGNAL_OVERRIDE_)\n  return WIFSIGNALED(exit_status) && WTERMSIG(exit_status) == signum_;\n}\n# endif  // !GTEST_OS_WINDOWS && !GTEST_OS_FUCHSIA\n\nnamespace internal {\n\n// Utilities needed for death tests.\n\n// Generates a textual description of a given exit code, in the format\n// specified by wait(2).\nstatic std::string ExitSummary(int exit_code) {\n  Message m;\n\n# if GTEST_OS_WINDOWS || GTEST_OS_FUCHSIA\n\n  m << \"Exited with exit status \" << exit_code;\n\n# else\n\n  if (WIFEXITED(exit_code)) {\n    m << \"Exited with exit status \" << WEXITSTATUS(exit_code);\n  } else if (WIFSIGNALED(exit_code)) {\n    m << \"Terminated by signal \" << WTERMSIG(exit_code);\n  }\n#  ifdef WCOREDUMP\n  if (WCOREDUMP(exit_code)) {\n    m << \" (core dumped)\";\n  }\n#  endif\n# endif  // GTEST_OS_WINDOWS || GTEST_OS_FUCHSIA\n\n  return m.GetString();\n}\n\n// Returns true if exit_status describes a process that was terminated\n// by a signal, or exited normally with a nonzero exit code.\nbool ExitedUnsuccessfully(int exit_status) {\n  return !ExitedWithCode(0)(exit_status);\n}\n\n# if !GTEST_OS_WINDOWS && !GTEST_OS_FUCHSIA\n// Generates a textual failure message when a death test finds more than\n// one thread running, or cannot determine the number of threads, prior\n// to executing the given statement.  It is the responsibility of the\n// caller not to pass a thread_count of 1.\nstatic std::string DeathTestThreadWarning(size_t thread_count) {\n  Message msg;\n  msg << \"Death tests use fork(), which is unsafe particularly\"\n      << \" in a threaded context. For this test, \" << GTEST_NAME_ << \" \";\n  if (thread_count == 0) {\n    msg << \"couldn't detect the number of threads.\";\n  } else {\n    msg << \"detected \" << thread_count << \" threads.\";\n  }\n  msg << \" See \"\n         \"https://github.com/google/googletest/blob/master/googletest/docs/\"\n         \"advanced.md#death-tests-and-threads\"\n      << \" for more explanation and suggested solutions, especially if\"\n      << \" this is the last message you see before your test times out.\";\n  return msg.GetString();\n}\n# endif  // !GTEST_OS_WINDOWS && !GTEST_OS_FUCHSIA\n\n// Flag characters for reporting a death test that did not die.\nstatic const char kDeathTestLived = 'L';\nstatic const char kDeathTestReturned = 'R';\nstatic const char kDeathTestThrew = 'T';\nstatic const char kDeathTestInternalError = 'I';\n\n#if GTEST_OS_FUCHSIA\n\n// File descriptor used for the pipe in the child process.\nstatic const int kFuchsiaReadPipeFd = 3;\n\n#endif\n\n// An enumeration describing all of the possible ways that a death test can\n// conclude.  DIED means that the process died while executing the test\n// code; LIVED means that process lived beyond the end of the test code;\n// RETURNED means that the test statement attempted to execute a return\n// statement, which is not allowed; THREW means that the test statement\n// returned control by throwing an exception.  IN_PROGRESS means the test\n// has not yet concluded.\nenum DeathTestOutcome { IN_PROGRESS, DIED, LIVED, RETURNED, THREW };\n\n// Routine for aborting the program which is safe to call from an\n// exec-style death test child process, in which case the error\n// message is propagated back to the parent process.  Otherwise, the\n// message is simply printed to stderr.  In either case, the program\n// then exits with status 1.\nstatic void DeathTestAbort(const std::string& message) {\n  // On a POSIX system, this function may be called from a threadsafe-style\n  // death test child process, which operates on a very small stack.  Use\n  // the heap for any additional non-minuscule memory requirements.\n  const InternalRunDeathTestFlag* const flag =\n      GetUnitTestImpl()->internal_run_death_test_flag();\n  if (flag != nullptr) {\n    FILE* parent = posix::FDOpen(flag->write_fd(), \"w\");\n    fputc(kDeathTestInternalError, parent);\n    fprintf(parent, \"%s\", message.c_str());\n    fflush(parent);\n    _exit(1);\n  } else {\n    fprintf(stderr, \"%s\", message.c_str());\n    fflush(stderr);\n    posix::Abort();\n  }\n}\n\n// A replacement for CHECK that calls DeathTestAbort if the assertion\n// fails.\n# define GTEST_DEATH_TEST_CHECK_(expression) \\\n  do { \\\n    if (!::testing::internal::IsTrue(expression)) { \\\n      DeathTestAbort( \\\n          ::std::string(\"CHECK failed: File \") + __FILE__ +  \", line \" \\\n          + ::testing::internal::StreamableToString(__LINE__) + \": \" \\\n          + #expression); \\\n    } \\\n  } while (::testing::internal::AlwaysFalse())\n\n// This macro is similar to GTEST_DEATH_TEST_CHECK_, but it is meant for\n// evaluating any system call that fulfills two conditions: it must return\n// -1 on failure, and set errno to EINTR when it is interrupted and\n// should be tried again.  The macro expands to a loop that repeatedly\n// evaluates the expression as long as it evaluates to -1 and sets\n// errno to EINTR.  If the expression evaluates to -1 but errno is\n// something other than EINTR, DeathTestAbort is called.\n# define GTEST_DEATH_TEST_CHECK_SYSCALL_(expression) \\\n  do { \\\n    int gtest_retval; \\\n    do { \\\n      gtest_retval = (expression); \\\n    } while (gtest_retval == -1 && errno == EINTR); \\\n    if (gtest_retval == -1) { \\\n      DeathTestAbort( \\\n          ::std::string(\"CHECK failed: File \") + __FILE__ + \", line \" \\\n          + ::testing::internal::StreamableToString(__LINE__) + \": \" \\\n          + #expression + \" != -1\"); \\\n    } \\\n  } while (::testing::internal::AlwaysFalse())\n\n// Returns the message describing the last system error in errno.\nstd::string GetLastErrnoDescription() {\n    return errno == 0 ? \"\" : posix::StrError(errno);\n}\n\n// This is called from a death test parent process to read a failure\n// message from the death test child process and log it with the FATAL\n// severity. On Windows, the message is read from a pipe handle. On other\n// platforms, it is read from a file descriptor.\nstatic void FailFromInternalError(int fd) {\n  Message error;\n  char buffer[256];\n  int num_read;\n\n  do {\n    while ((num_read = posix::Read(fd, buffer, 255)) > 0) {\n      buffer[num_read] = '\\0';\n      error << buffer;\n    }\n  } while (num_read == -1 && errno == EINTR);\n\n  if (num_read == 0) {\n    GTEST_LOG_(FATAL) << error.GetString();\n  } else {\n    const int last_error = errno;\n    GTEST_LOG_(FATAL) << \"Error while reading death test internal: \"\n                      << GetLastErrnoDescription() << \" [\" << last_error << \"]\";\n  }\n}\n\n// Death test constructor.  Increments the running death test count\n// for the current test.\nDeathTest::DeathTest() {\n  TestInfo* const info = GetUnitTestImpl()->current_test_info();\n  if (info == nullptr) {\n    DeathTestAbort(\"Cannot run a death test outside of a TEST or \"\n                   \"TEST_F construct\");\n  }\n}\n\n// Creates and returns a death test by dispatching to the current\n// death test factory.\nbool DeathTest::Create(const char* statement,\n                       Matcher<const std::string&> matcher, const char* file,\n                       int line, DeathTest** test) {\n  return GetUnitTestImpl()->death_test_factory()->Create(\n      statement, std::move(matcher), file, line, test);\n}\n\nconst char* DeathTest::LastMessage() {\n  return last_death_test_message_.c_str();\n}\n\nvoid DeathTest::set_last_death_test_message(const std::string& message) {\n  last_death_test_message_ = message;\n}\n\nstd::string DeathTest::last_death_test_message_;\n\n// Provides cross platform implementation for some death functionality.\nclass DeathTestImpl : public DeathTest {\n protected:\n  DeathTestImpl(const char* a_statement, Matcher<const std::string&> matcher)\n      : statement_(a_statement),\n        matcher_(std::move(matcher)),\n        spawned_(false),\n        status_(-1),\n        outcome_(IN_PROGRESS),\n        read_fd_(-1),\n        write_fd_(-1) {}\n\n  // read_fd_ is expected to be closed and cleared by a derived class.\n  ~DeathTestImpl() override { GTEST_DEATH_TEST_CHECK_(read_fd_ == -1); }\n\n  void Abort(AbortReason reason) override;\n  bool Passed(bool status_ok) override;\n\n  const char* statement() const { return statement_; }\n  bool spawned() const { return spawned_; }\n  void set_spawned(bool is_spawned) { spawned_ = is_spawned; }\n  int status() const { return status_; }\n  void set_status(int a_status) { status_ = a_status; }\n  DeathTestOutcome outcome() const { return outcome_; }\n  void set_outcome(DeathTestOutcome an_outcome) { outcome_ = an_outcome; }\n  int read_fd() const { return read_fd_; }\n  void set_read_fd(int fd) { read_fd_ = fd; }\n  int write_fd() const { return write_fd_; }\n  void set_write_fd(int fd) { write_fd_ = fd; }\n\n  // Called in the parent process only. Reads the result code of the death\n  // test child process via a pipe, interprets it to set the outcome_\n  // member, and closes read_fd_.  Outputs diagnostics and terminates in\n  // case of unexpected codes.\n  void ReadAndInterpretStatusByte();\n\n  // Returns stderr output from the child process.\n  virtual std::string GetErrorLogs();\n\n private:\n  // The textual content of the code this object is testing.  This class\n  // doesn't own this string and should not attempt to delete it.\n  const char* const statement_;\n  // A matcher that's expected to match the stderr output by the child process.\n  Matcher<const std::string&> matcher_;\n  // True if the death test child process has been successfully spawned.\n  bool spawned_;\n  // The exit status of the child process.\n  int status_;\n  // How the death test concluded.\n  DeathTestOutcome outcome_;\n  // Descriptor to the read end of the pipe to the child process.  It is\n  // always -1 in the child process.  The child keeps its write end of the\n  // pipe in write_fd_.\n  int read_fd_;\n  // Descriptor to the child's write end of the pipe to the parent process.\n  // It is always -1 in the parent process.  The parent keeps its end of the\n  // pipe in read_fd_.\n  int write_fd_;\n};\n\n// Called in the parent process only. Reads the result code of the death\n// test child process via a pipe, interprets it to set the outcome_\n// member, and closes read_fd_.  Outputs diagnostics and terminates in\n// case of unexpected codes.\nvoid DeathTestImpl::ReadAndInterpretStatusByte() {\n  char flag;\n  int bytes_read;\n\n  // The read() here blocks until data is available (signifying the\n  // failure of the death test) or until the pipe is closed (signifying\n  // its success), so it's okay to call this in the parent before\n  // the child process has exited.\n  do {\n    bytes_read = posix::Read(read_fd(), &flag, 1);\n  } while (bytes_read == -1 && errno == EINTR);\n\n  if (bytes_read == 0) {\n    set_outcome(DIED);\n  } else if (bytes_read == 1) {\n    switch (flag) {\n      case kDeathTestReturned:\n        set_outcome(RETURNED);\n        break;\n      case kDeathTestThrew:\n        set_outcome(THREW);\n        break;\n      case kDeathTestLived:\n        set_outcome(LIVED);\n        break;\n      case kDeathTestInternalError:\n        FailFromInternalError(read_fd());  // Does not return.\n        break;\n      default:\n        GTEST_LOG_(FATAL) << \"Death test child process reported \"\n                          << \"unexpected status byte (\"\n                          << static_cast<unsigned int>(flag) << \")\";\n    }\n  } else {\n    GTEST_LOG_(FATAL) << \"Read from death test child process failed: \"\n                      << GetLastErrnoDescription();\n  }\n  GTEST_DEATH_TEST_CHECK_SYSCALL_(posix::Close(read_fd()));\n  set_read_fd(-1);\n}\n\nstd::string DeathTestImpl::GetErrorLogs() {\n  return GetCapturedStderr();\n}\n\n// Signals that the death test code which should have exited, didn't.\n// Should be called only in a death test child process.\n// Writes a status byte to the child's status file descriptor, then\n// calls _exit(1).\nvoid DeathTestImpl::Abort(AbortReason reason) {\n  // The parent process considers the death test to be a failure if\n  // it finds any data in our pipe.  So, here we write a single flag byte\n  // to the pipe, then exit.\n  const char status_ch =\n      reason == TEST_DID_NOT_DIE ? kDeathTestLived :\n      reason == TEST_THREW_EXCEPTION ? kDeathTestThrew : kDeathTestReturned;\n\n  GTEST_DEATH_TEST_CHECK_SYSCALL_(posix::Write(write_fd(), &status_ch, 1));\n  // We are leaking the descriptor here because on some platforms (i.e.,\n  // when built as Windows DLL), destructors of global objects will still\n  // run after calling _exit(). On such systems, write_fd_ will be\n  // indirectly closed from the destructor of UnitTestImpl, causing double\n  // close if it is also closed here. On debug configurations, double close\n  // may assert. As there are no in-process buffers to flush here, we are\n  // relying on the OS to close the descriptor after the process terminates\n  // when the destructors are not run.\n  _exit(1);  // Exits w/o any normal exit hooks (we were supposed to crash)\n}\n\n// Returns an indented copy of stderr output for a death test.\n// This makes distinguishing death test output lines from regular log lines\n// much easier.\nstatic ::std::string FormatDeathTestOutput(const ::std::string& output) {\n  ::std::string ret;\n  for (size_t at = 0; ; ) {\n    const size_t line_end = output.find('\\n', at);\n    ret += \"[  DEATH   ] \";\n    if (line_end == ::std::string::npos) {\n      ret += output.substr(at);\n      break;\n    }\n    ret += output.substr(at, line_end + 1 - at);\n    at = line_end + 1;\n  }\n  return ret;\n}\n\n// Assesses the success or failure of a death test, using both private\n// members which have previously been set, and one argument:\n//\n// Private data members:\n//   outcome:  An enumeration describing how the death test\n//             concluded: DIED, LIVED, THREW, or RETURNED.  The death test\n//             fails in the latter three cases.\n//   status:   The exit status of the child process. On *nix, it is in the\n//             in the format specified by wait(2). On Windows, this is the\n//             value supplied to the ExitProcess() API or a numeric code\n//             of the exception that terminated the program.\n//   matcher_: A matcher that's expected to match the stderr output by the child\n//             process.\n//\n// Argument:\n//   status_ok: true if exit_status is acceptable in the context of\n//              this particular death test, which fails if it is false\n//\n// Returns true iff all of the above conditions are met.  Otherwise, the\n// first failing condition, in the order given above, is the one that is\n// reported. Also sets the last death test message string.\nbool DeathTestImpl::Passed(bool status_ok) {\n  if (!spawned())\n    return false;\n\n  const std::string error_message = GetErrorLogs();\n\n  bool success = false;\n  Message buffer;\n\n  buffer << \"Death test: \" << statement() << \"\\n\";\n  switch (outcome()) {\n    case LIVED:\n      buffer << \"    Result: failed to die.\\n\"\n             << \" Error msg:\\n\" << FormatDeathTestOutput(error_message);\n      break;\n    case THREW:\n      buffer << \"    Result: threw an exception.\\n\"\n             << \" Error msg:\\n\" << FormatDeathTestOutput(error_message);\n      break;\n    case RETURNED:\n      buffer << \"    Result: illegal return in test statement.\\n\"\n             << \" Error msg:\\n\" << FormatDeathTestOutput(error_message);\n      break;\n    case DIED:\n      if (status_ok) {\n        if (matcher_.Matches(error_message)) {\n          success = true;\n        } else {\n          std::ostringstream stream;\n          matcher_.DescribeTo(&stream);\n          buffer << \"    Result: died but not with expected error.\\n\"\n                 << \"  Expected: \" << stream.str() << \"\\n\"\n                 << \"Actual msg:\\n\"\n                 << FormatDeathTestOutput(error_message);\n        }\n      } else {\n        buffer << \"    Result: died but not with expected exit code:\\n\"\n               << \"            \" << ExitSummary(status()) << \"\\n\"\n               << \"Actual msg:\\n\" << FormatDeathTestOutput(error_message);\n      }\n      break;\n    case IN_PROGRESS:\n    default:\n      GTEST_LOG_(FATAL)\n          << \"DeathTest::Passed somehow called before conclusion of test\";\n  }\n\n  DeathTest::set_last_death_test_message(buffer.GetString());\n  return success;\n}\n\n# if GTEST_OS_WINDOWS\n// WindowsDeathTest implements death tests on Windows. Due to the\n// specifics of starting new processes on Windows, death tests there are\n// always threadsafe, and Google Test considers the\n// --gtest_death_test_style=fast setting to be equivalent to\n// --gtest_death_test_style=threadsafe there.\n//\n// A few implementation notes:  Like the Linux version, the Windows\n// implementation uses pipes for child-to-parent communication. But due to\n// the specifics of pipes on Windows, some extra steps are required:\n//\n// 1. The parent creates a communication pipe and stores handles to both\n//    ends of it.\n// 2. The parent starts the child and provides it with the information\n//    necessary to acquire the handle to the write end of the pipe.\n// 3. The child acquires the write end of the pipe and signals the parent\n//    using a Windows event.\n// 4. Now the parent can release the write end of the pipe on its side. If\n//    this is done before step 3, the object's reference count goes down to\n//    0 and it is destroyed, preventing the child from acquiring it. The\n//    parent now has to release it, or read operations on the read end of\n//    the pipe will not return when the child terminates.\n// 5. The parent reads child's output through the pipe (outcome code and\n//    any possible error messages) from the pipe, and its stderr and then\n//    determines whether to fail the test.\n//\n// Note: to distinguish Win32 API calls from the local method and function\n// calls, the former are explicitly resolved in the global namespace.\n//\nclass WindowsDeathTest : public DeathTestImpl {\n public:\n  WindowsDeathTest(const char* a_statement, Matcher<const std::string&> matcher,\n                   const char* file, int line)\n      : DeathTestImpl(a_statement, std::move(matcher)),\n        file_(file),\n        line_(line) {}\n\n  // All of these virtual functions are inherited from DeathTest.\n  virtual int Wait();\n  virtual TestRole AssumeRole();\n\n private:\n  // The name of the file in which the death test is located.\n  const char* const file_;\n  // The line number on which the death test is located.\n  const int line_;\n  // Handle to the write end of the pipe to the child process.\n  AutoHandle write_handle_;\n  // Child process handle.\n  AutoHandle child_handle_;\n  // Event the child process uses to signal the parent that it has\n  // acquired the handle to the write end of the pipe. After seeing this\n  // event the parent can release its own handles to make sure its\n  // ReadFile() calls return when the child terminates.\n  AutoHandle event_handle_;\n};\n\n// Waits for the child in a death test to exit, returning its exit\n// status, or 0 if no child process exists.  As a side effect, sets the\n// outcome data member.\nint WindowsDeathTest::Wait() {\n  if (!spawned())\n    return 0;\n\n  // Wait until the child either signals that it has acquired the write end\n  // of the pipe or it dies.\n  const HANDLE wait_handles[2] = { child_handle_.Get(), event_handle_.Get() };\n  switch (::WaitForMultipleObjects(2,\n                                   wait_handles,\n                                   FALSE,  // Waits for any of the handles.\n                                   INFINITE)) {\n    case WAIT_OBJECT_0:\n    case WAIT_OBJECT_0 + 1:\n      break;\n    default:\n      GTEST_DEATH_TEST_CHECK_(false);  // Should not get here.\n  }\n\n  // The child has acquired the write end of the pipe or exited.\n  // We release the handle on our side and continue.\n  write_handle_.Reset();\n  event_handle_.Reset();\n\n  ReadAndInterpretStatusByte();\n\n  // Waits for the child process to exit if it haven't already. This\n  // returns immediately if the child has already exited, regardless of\n  // whether previous calls to WaitForMultipleObjects synchronized on this\n  // handle or not.\n  GTEST_DEATH_TEST_CHECK_(\n      WAIT_OBJECT_0 == ::WaitForSingleObject(child_handle_.Get(),\n                                             INFINITE));\n  DWORD status_code;\n  GTEST_DEATH_TEST_CHECK_(\n      ::GetExitCodeProcess(child_handle_.Get(), &status_code) != FALSE);\n  child_handle_.Reset();\n  set_status(static_cast<int>(status_code));\n  return status();\n}\n\n// The AssumeRole process for a Windows death test.  It creates a child\n// process with the same executable as the current process to run the\n// death test.  The child process is given the --gtest_filter and\n// --gtest_internal_run_death_test flags such that it knows to run the\n// current death test only.\nDeathTest::TestRole WindowsDeathTest::AssumeRole() {\n  const UnitTestImpl* const impl = GetUnitTestImpl();\n  const InternalRunDeathTestFlag* const flag =\n      impl->internal_run_death_test_flag();\n  const TestInfo* const info = impl->current_test_info();\n  const int death_test_index = info->result()->death_test_count();\n\n  if (flag != nullptr) {\n    // ParseInternalRunDeathTestFlag() has performed all the necessary\n    // processing.\n    set_write_fd(flag->write_fd());\n    return EXECUTE_TEST;\n  }\n\n  // WindowsDeathTest uses an anonymous pipe to communicate results of\n  // a death test.\n  SECURITY_ATTRIBUTES handles_are_inheritable = {sizeof(SECURITY_ATTRIBUTES),\n                                                 nullptr, TRUE};\n  HANDLE read_handle, write_handle;\n  GTEST_DEATH_TEST_CHECK_(\n      ::CreatePipe(&read_handle, &write_handle, &handles_are_inheritable,\n                   0)  // Default buffer size.\n      != FALSE);\n  set_read_fd(::_open_osfhandle(reinterpret_cast<intptr_t>(read_handle),\n                                O_RDONLY));\n  write_handle_.Reset(write_handle);\n  event_handle_.Reset(::CreateEvent(\n      &handles_are_inheritable,\n      TRUE,       // The event will automatically reset to non-signaled state.\n      FALSE,      // The initial state is non-signalled.\n      nullptr));  // The even is unnamed.\n  GTEST_DEATH_TEST_CHECK_(event_handle_.Get() != nullptr);\n  const std::string filter_flag = std::string(\"--\") + GTEST_FLAG_PREFIX_ +\n                                  kFilterFlag + \"=\" + info->test_suite_name() +\n                                  \".\" + info->name();\n  const std::string internal_flag =\n      std::string(\"--\") + GTEST_FLAG_PREFIX_ + kInternalRunDeathTestFlag +\n      \"=\" + file_ + \"|\" + StreamableToString(line_) + \"|\" +\n      StreamableToString(death_test_index) + \"|\" +\n      StreamableToString(static_cast<unsigned int>(::GetCurrentProcessId())) +\n      // size_t has the same width as pointers on both 32-bit and 64-bit\n      // Windows platforms.\n      // See http://msdn.microsoft.com/en-us/library/tcxf1dw6.aspx.\n      \"|\" + StreamableToString(reinterpret_cast<size_t>(write_handle)) +\n      \"|\" + StreamableToString(reinterpret_cast<size_t>(event_handle_.Get()));\n\n  char executable_path[_MAX_PATH + 1];  // NOLINT\n  GTEST_DEATH_TEST_CHECK_(_MAX_PATH + 1 != ::GetModuleFileNameA(nullptr,\n                                                                executable_path,\n                                                                _MAX_PATH));\n\n  std::string command_line =\n      std::string(::GetCommandLineA()) + \" \" + filter_flag + \" \\\"\" +\n      internal_flag + \"\\\"\";\n\n  DeathTest::set_last_death_test_message(\"\");\n\n  CaptureStderr();\n  // Flush the log buffers since the log streams are shared with the child.\n  FlushInfoLog();\n\n  // The child process will share the standard handles with the parent.\n  STARTUPINFOA startup_info;\n  memset(&startup_info, 0, sizeof(STARTUPINFO));\n  startup_info.dwFlags = STARTF_USESTDHANDLES;\n  startup_info.hStdInput = ::GetStdHandle(STD_INPUT_HANDLE);\n  startup_info.hStdOutput = ::GetStdHandle(STD_OUTPUT_HANDLE);\n  startup_info.hStdError = ::GetStdHandle(STD_ERROR_HANDLE);\n\n  PROCESS_INFORMATION process_info;\n  GTEST_DEATH_TEST_CHECK_(\n      ::CreateProcessA(\n          executable_path, const_cast<char*>(command_line.c_str()),\n          nullptr,  // Retuned process handle is not inheritable.\n          nullptr,  // Retuned thread handle is not inheritable.\n          TRUE,  // Child inherits all inheritable handles (for write_handle_).\n          0x0,   // Default creation flags.\n          nullptr,  // Inherit the parent's environment.\n          UnitTest::GetInstance()->original_working_dir(), &startup_info,\n          &process_info) != FALSE);\n  child_handle_.Reset(process_info.hProcess);\n  ::CloseHandle(process_info.hThread);\n  set_spawned(true);\n  return OVERSEE_TEST;\n}\n\n# elif GTEST_OS_FUCHSIA\n\nclass FuchsiaDeathTest : public DeathTestImpl {\n public:\n  FuchsiaDeathTest(const char* a_statement, Matcher<const std::string&> matcher,\n                   const char* file, int line)\n      : DeathTestImpl(a_statement, std::move(matcher)),\n        file_(file),\n        line_(line) {}\n\n  // All of these virtual functions are inherited from DeathTest.\n  int Wait() override;\n  TestRole AssumeRole() override;\n  std::string GetErrorLogs() override;\n\n private:\n  // The name of the file in which the death test is located.\n  const char* const file_;\n  // The line number on which the death test is located.\n  const int line_;\n  // The stderr data captured by the child process.\n  std::string captured_stderr_;\n\n  zx::process child_process_;\n  zx::port port_;\n  zx::socket stderr_socket_;\n};\n\n// Utility class for accumulating command-line arguments.\nclass Arguments {\n public:\n  Arguments() { args_.push_back(nullptr); }\n\n  ~Arguments() {\n    for (std::vector<char*>::iterator i = args_.begin(); i != args_.end();\n         ++i) {\n      free(*i);\n    }\n  }\n  void AddArgument(const char* argument) {\n    args_.insert(args_.end() - 1, posix::StrDup(argument));\n  }\n\n  template <typename Str>\n  void AddArguments(const ::std::vector<Str>& arguments) {\n    for (typename ::std::vector<Str>::const_iterator i = arguments.begin();\n         i != arguments.end();\n         ++i) {\n      args_.insert(args_.end() - 1, posix::StrDup(i->c_str()));\n    }\n  }\n  char* const* Argv() {\n    return &args_[0];\n  }\n\n  int size() {\n    return args_.size() - 1;\n  }\n\n private:\n  std::vector<char*> args_;\n};\n\n// Waits for the child in a death test to exit, returning its exit\n// status, or 0 if no child process exists.  As a side effect, sets the\n// outcome data member.\nint FuchsiaDeathTest::Wait() {\n  const int kProcessKey = 0;\n  const int kSocketKey = 1;\n\n  if (!spawned())\n    return 0;\n\n  // Register to wait for the child process to terminate.\n  zx_status_t status_zx;\n  status_zx = child_process_.wait_async(\n      port_, kProcessKey, ZX_PROCESS_TERMINATED, ZX_WAIT_ASYNC_ONCE);\n  GTEST_DEATH_TEST_CHECK_(status_zx == ZX_OK);\n  // Register to wait for the socket to be readable or closed.\n  status_zx = stderr_socket_.wait_async(\n      port_, kSocketKey, ZX_SOCKET_READABLE | ZX_SOCKET_PEER_CLOSED,\n      ZX_WAIT_ASYNC_REPEATING);\n  GTEST_DEATH_TEST_CHECK_(status_zx == ZX_OK);\n\n  bool process_terminated = false;\n  bool socket_closed = false;\n  do {\n    zx_port_packet_t packet = {};\n    status_zx = port_.wait(zx::time::infinite(), &packet);\n    GTEST_DEATH_TEST_CHECK_(status_zx == ZX_OK);\n\n    if (packet.key == kProcessKey) {\n      if (ZX_PKT_IS_EXCEPTION(packet.type)) {\n        // Process encountered an exception. Kill it directly rather than\n        // letting other handlers process the event. We will get a second\n        // kProcessKey event when the process actually terminates.\n        status_zx = child_process_.kill();\n        GTEST_DEATH_TEST_CHECK_(status_zx == ZX_OK);\n      } else {\n        // Process terminated.\n        GTEST_DEATH_TEST_CHECK_(ZX_PKT_IS_SIGNAL_ONE(packet.type));\n        GTEST_DEATH_TEST_CHECK_(packet.signal.observed & ZX_PROCESS_TERMINATED);\n        process_terminated = true;\n      }\n    } else if (packet.key == kSocketKey) {\n      GTEST_DEATH_TEST_CHECK_(ZX_PKT_IS_SIGNAL_REP(packet.type));\n      if (packet.signal.observed & ZX_SOCKET_READABLE) {\n        // Read data from the socket.\n        constexpr size_t kBufferSize = 1024;\n        do {\n          size_t old_length = captured_stderr_.length();\n          size_t bytes_read = 0;\n          captured_stderr_.resize(old_length + kBufferSize);\n          status_zx = stderr_socket_.read(\n              0, &captured_stderr_.front() + old_length, kBufferSize,\n              &bytes_read);\n          captured_stderr_.resize(old_length + bytes_read);\n        } while (status_zx == ZX_OK);\n        if (status_zx == ZX_ERR_PEER_CLOSED) {\n          socket_closed = true;\n        } else {\n          GTEST_DEATH_TEST_CHECK_(status_zx == ZX_ERR_SHOULD_WAIT);\n        }\n      } else {\n        GTEST_DEATH_TEST_CHECK_(packet.signal.observed & ZX_SOCKET_PEER_CLOSED);\n        socket_closed = true;\n      }\n    }\n  } while (!process_terminated && !socket_closed);\n\n  ReadAndInterpretStatusByte();\n\n  zx_info_process_t buffer;\n  status_zx = child_process_.get_info(\n      ZX_INFO_PROCESS, &buffer, sizeof(buffer), nullptr, nullptr);\n  GTEST_DEATH_TEST_CHECK_(status_zx == ZX_OK);\n\n  GTEST_DEATH_TEST_CHECK_(buffer.exited);\n  set_status(buffer.return_code);\n  return status();\n}\n\n// The AssumeRole process for a Fuchsia death test.  It creates a child\n// process with the same executable as the current process to run the\n// death test.  The child process is given the --gtest_filter and\n// --gtest_internal_run_death_test flags such that it knows to run the\n// current death test only.\nDeathTest::TestRole FuchsiaDeathTest::AssumeRole() {\n  const UnitTestImpl* const impl = GetUnitTestImpl();\n  const InternalRunDeathTestFlag* const flag =\n      impl->internal_run_death_test_flag();\n  const TestInfo* const info = impl->current_test_info();\n  const int death_test_index = info->result()->death_test_count();\n\n  if (flag != nullptr) {\n    // ParseInternalRunDeathTestFlag() has performed all the necessary\n    // processing.\n    set_write_fd(kFuchsiaReadPipeFd);\n    return EXECUTE_TEST;\n  }\n\n  // Flush the log buffers since the log streams are shared with the child.\n  FlushInfoLog();\n\n  // Build the child process command line.\n  const std::string filter_flag = std::string(\"--\") + GTEST_FLAG_PREFIX_ +\n                                  kFilterFlag + \"=\" + info->test_suite_name() +\n                                  \".\" + info->name();\n  const std::string internal_flag =\n      std::string(\"--\") + GTEST_FLAG_PREFIX_ + kInternalRunDeathTestFlag + \"=\"\n      + file_ + \"|\"\n      + StreamableToString(line_) + \"|\"\n      + StreamableToString(death_test_index);\n  Arguments args;\n  args.AddArguments(GetInjectableArgvs());\n  args.AddArgument(filter_flag.c_str());\n  args.AddArgument(internal_flag.c_str());\n\n  // Build the pipe for communication with the child.\n  zx_status_t status;\n  zx_handle_t child_pipe_handle;\n  uint32_t type;\n  status = fdio_pipe_half(&child_pipe_handle, &type);\n  GTEST_DEATH_TEST_CHECK_(status >= 0);\n  set_read_fd(status);\n\n  // Set the pipe handle for the child.\n  fdio_spawn_action_t spawn_actions[2] = {};\n  fdio_spawn_action_t* add_handle_action = &spawn_actions[0];\n  add_handle_action->action = FDIO_SPAWN_ACTION_ADD_HANDLE;\n  add_handle_action->h.id = PA_HND(type, kFuchsiaReadPipeFd);\n  add_handle_action->h.handle = child_pipe_handle;\n\n  // Create a socket pair will be used to receive the child process' stderr.\n  zx::socket stderr_producer_socket;\n  status =\n      zx::socket::create(0, &stderr_producer_socket, &stderr_socket_);\n  GTEST_DEATH_TEST_CHECK_(status >= 0);\n  int stderr_producer_fd = -1;\n  status =\n      fdio_fd_create(stderr_producer_socket.release(), &stderr_producer_fd);\n  GTEST_DEATH_TEST_CHECK_(status >= 0);\n\n  // Make the stderr socket nonblocking.\n  GTEST_DEATH_TEST_CHECK_(fcntl(stderr_producer_fd, F_SETFL, 0) == 0);\n\n  fdio_spawn_action_t* add_stderr_action = &spawn_actions[1];\n  add_stderr_action->action = FDIO_SPAWN_ACTION_CLONE_FD;\n  add_stderr_action->fd.local_fd = stderr_producer_fd;\n  add_stderr_action->fd.target_fd = STDERR_FILENO;\n\n  // Create a child job.\n  zx_handle_t child_job = ZX_HANDLE_INVALID;\n  status = zx_job_create(zx_job_default(), 0, & child_job);\n  GTEST_DEATH_TEST_CHECK_(status == ZX_OK);\n  zx_policy_basic_t policy;\n  policy.condition = ZX_POL_NEW_ANY;\n  policy.policy = ZX_POL_ACTION_ALLOW;\n  status = zx_job_set_policy(\n      child_job, ZX_JOB_POL_RELATIVE, ZX_JOB_POL_BASIC, &policy, 1);\n  GTEST_DEATH_TEST_CHECK_(status == ZX_OK);\n\n  // Create an exception port and attach it to the |child_job|, to allow\n  // us to suppress the system default exception handler from firing.\n  status = zx::port::create(0, &port_);\n  GTEST_DEATH_TEST_CHECK_(status == ZX_OK);\n  status = zx_task_bind_exception_port(\n      child_job, port_.get(), 0 /* key */, 0 /*options */);\n  GTEST_DEATH_TEST_CHECK_(status == ZX_OK);\n\n  // Spawn the child process.\n  status = fdio_spawn_etc(\n      child_job, FDIO_SPAWN_CLONE_ALL, args.Argv()[0], args.Argv(), nullptr,\n      2, spawn_actions, child_process_.reset_and_get_address(), nullptr);\n  GTEST_DEATH_TEST_CHECK_(status == ZX_OK);\n\n  set_spawned(true);\n  return OVERSEE_TEST;\n}\n\nstd::string FuchsiaDeathTest::GetErrorLogs() {\n  return captured_stderr_;\n}\n\n#else  // We are neither on Windows, nor on Fuchsia.\n\n// ForkingDeathTest provides implementations for most of the abstract\n// methods of the DeathTest interface.  Only the AssumeRole method is\n// left undefined.\nclass ForkingDeathTest : public DeathTestImpl {\n public:\n  ForkingDeathTest(const char* statement, Matcher<const std::string&> matcher);\n\n  // All of these virtual functions are inherited from DeathTest.\n  int Wait() override;\n\n protected:\n  void set_child_pid(pid_t child_pid) { child_pid_ = child_pid; }\n\n private:\n  // PID of child process during death test; 0 in the child process itself.\n  pid_t child_pid_;\n};\n\n// Constructs a ForkingDeathTest.\nForkingDeathTest::ForkingDeathTest(const char* a_statement,\n                                   Matcher<const std::string&> matcher)\n    : DeathTestImpl(a_statement, std::move(matcher)), child_pid_(-1) {}\n\n// Waits for the child in a death test to exit, returning its exit\n// status, or 0 if no child process exists.  As a side effect, sets the\n// outcome data member.\nint ForkingDeathTest::Wait() {\n  if (!spawned())\n    return 0;\n\n  ReadAndInterpretStatusByte();\n\n  int status_value;\n  GTEST_DEATH_TEST_CHECK_SYSCALL_(waitpid(child_pid_, &status_value, 0));\n  set_status(status_value);\n  return status_value;\n}\n\n// A concrete death test class that forks, then immediately runs the test\n// in the child process.\nclass NoExecDeathTest : public ForkingDeathTest {\n public:\n  NoExecDeathTest(const char* a_statement, Matcher<const std::string&> matcher)\n      : ForkingDeathTest(a_statement, std::move(matcher)) {}\n  TestRole AssumeRole() override;\n};\n\n// The AssumeRole process for a fork-and-run death test.  It implements a\n// straightforward fork, with a simple pipe to transmit the status byte.\nDeathTest::TestRole NoExecDeathTest::AssumeRole() {\n  const size_t thread_count = GetThreadCount();\n  if (thread_count != 1) {\n    GTEST_LOG_(WARNING) << DeathTestThreadWarning(thread_count);\n  }\n\n  int pipe_fd[2];\n  GTEST_DEATH_TEST_CHECK_(pipe(pipe_fd) != -1);\n\n  DeathTest::set_last_death_test_message(\"\");\n  CaptureStderr();\n  // When we fork the process below, the log file buffers are copied, but the\n  // file descriptors are shared.  We flush all log files here so that closing\n  // the file descriptors in the child process doesn't throw off the\n  // synchronization between descriptors and buffers in the parent process.\n  // This is as close to the fork as possible to avoid a race condition in case\n  // there are multiple threads running before the death test, and another\n  // thread writes to the log file.\n  FlushInfoLog();\n\n  const pid_t child_pid = fork();\n  GTEST_DEATH_TEST_CHECK_(child_pid != -1);\n  set_child_pid(child_pid);\n  if (child_pid == 0) {\n    GTEST_DEATH_TEST_CHECK_SYSCALL_(close(pipe_fd[0]));\n    set_write_fd(pipe_fd[1]);\n    // Redirects all logging to stderr in the child process to prevent\n    // concurrent writes to the log files.  We capture stderr in the parent\n    // process and append the child process' output to a log.\n    LogToStderr();\n    // Event forwarding to the listeners of event listener API mush be shut\n    // down in death test subprocesses.\n    GetUnitTestImpl()->listeners()->SuppressEventForwarding();\n    g_in_fast_death_test_child = true;\n    return EXECUTE_TEST;\n  } else {\n    GTEST_DEATH_TEST_CHECK_SYSCALL_(close(pipe_fd[1]));\n    set_read_fd(pipe_fd[0]);\n    set_spawned(true);\n    return OVERSEE_TEST;\n  }\n}\n\n// A concrete death test class that forks and re-executes the main\n// program from the beginning, with command-line flags set that cause\n// only this specific death test to be run.\nclass ExecDeathTest : public ForkingDeathTest {\n public:\n  ExecDeathTest(const char* a_statement, Matcher<const std::string&> matcher,\n                const char* file, int line)\n      : ForkingDeathTest(a_statement, std::move(matcher)),\n        file_(file),\n        line_(line) {}\n  TestRole AssumeRole() override;\n\n private:\n  static ::std::vector<std::string> GetArgvsForDeathTestChildProcess() {\n    ::std::vector<std::string> args = GetInjectableArgvs();\n#  if defined(GTEST_EXTRA_DEATH_TEST_COMMAND_LINE_ARGS_)\n    ::std::vector<std::string> extra_args =\n        GTEST_EXTRA_DEATH_TEST_COMMAND_LINE_ARGS_();\n    args.insert(args.end(), extra_args.begin(), extra_args.end());\n#  endif  // defined(GTEST_EXTRA_DEATH_TEST_COMMAND_LINE_ARGS_)\n    return args;\n  }\n  // The name of the file in which the death test is located.\n  const char* const file_;\n  // The line number on which the death test is located.\n  const int line_;\n};\n\n// Utility class for accumulating command-line arguments.\nclass Arguments {\n public:\n  Arguments() { args_.push_back(nullptr); }\n\n  ~Arguments() {\n    for (std::vector<char*>::iterator i = args_.begin(); i != args_.end();\n         ++i) {\n      free(*i);\n    }\n  }\n  void AddArgument(const char* argument) {\n    args_.insert(args_.end() - 1, posix::StrDup(argument));\n  }\n\n  template <typename Str>\n  void AddArguments(const ::std::vector<Str>& arguments) {\n    for (typename ::std::vector<Str>::const_iterator i = arguments.begin();\n         i != arguments.end();\n         ++i) {\n      args_.insert(args_.end() - 1, posix::StrDup(i->c_str()));\n    }\n  }\n  char* const* Argv() {\n    return &args_[0];\n  }\n\n private:\n  std::vector<char*> args_;\n};\n\n// A struct that encompasses the arguments to the child process of a\n// threadsafe-style death test process.\nstruct ExecDeathTestArgs {\n  char* const* argv;  // Command-line arguments for the child's call to exec\n  int close_fd;       // File descriptor to close; the read end of a pipe\n};\n\n#  if GTEST_OS_MAC\ninline char** GetEnviron() {\n  // When Google Test is built as a framework on MacOS X, the environ variable\n  // is unavailable. Apple's documentation (man environ) recommends using\n  // _NSGetEnviron() instead.\n  return *_NSGetEnviron();\n}\n#  else\n// Some POSIX platforms expect you to declare environ. extern \"C\" makes\n// it reside in the global namespace.\nextern \"C\" char** environ;\ninline char** GetEnviron() { return environ; }\n#  endif  // GTEST_OS_MAC\n\n#  if !GTEST_OS_QNX\n// The main function for a threadsafe-style death test child process.\n// This function is called in a clone()-ed process and thus must avoid\n// any potentially unsafe operations like malloc or libc functions.\nstatic int ExecDeathTestChildMain(void* child_arg) {\n  ExecDeathTestArgs* const args = static_cast<ExecDeathTestArgs*>(child_arg);\n  GTEST_DEATH_TEST_CHECK_SYSCALL_(close(args->close_fd));\n\n  // We need to execute the test program in the same environment where\n  // it was originally invoked.  Therefore we change to the original\n  // working directory first.\n  const char* const original_dir =\n      UnitTest::GetInstance()->original_working_dir();\n  // We can safely call chdir() as it's a direct system call.\n  if (chdir(original_dir) != 0) {\n    DeathTestAbort(std::string(\"chdir(\\\"\") + original_dir + \"\\\") failed: \" +\n                   GetLastErrnoDescription());\n    return EXIT_FAILURE;\n  }\n\n  // We can safely call execve() as it's a direct system call.  We\n  // cannot use execvp() as it's a libc function and thus potentially\n  // unsafe.  Since execve() doesn't search the PATH, the user must\n  // invoke the test program via a valid path that contains at least\n  // one path separator.\n  execve(args->argv[0], args->argv, GetEnviron());\n  DeathTestAbort(std::string(\"execve(\") + args->argv[0] + \", ...) in \" +\n                 original_dir + \" failed: \" +\n                 GetLastErrnoDescription());\n  return EXIT_FAILURE;\n}\n#  endif  // !GTEST_OS_QNX\n\n#  if GTEST_HAS_CLONE\n// Two utility routines that together determine the direction the stack\n// grows.\n// This could be accomplished more elegantly by a single recursive\n// function, but we want to guard against the unlikely possibility of\n// a smart compiler optimizing the recursion away.\n//\n// GTEST_NO_INLINE_ is required to prevent GCC 4.6 from inlining\n// StackLowerThanAddress into StackGrowsDown, which then doesn't give\n// correct answer.\nstatic void StackLowerThanAddress(const void* ptr,\n                                  bool* result) GTEST_NO_INLINE_;\nstatic void StackLowerThanAddress(const void* ptr, bool* result) {\n  int dummy;\n  *result = (&dummy < ptr);\n}\n\n// Make sure AddressSanitizer does not tamper with the stack here.\nGTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_\nstatic bool StackGrowsDown() {\n  int dummy;\n  bool result;\n  StackLowerThanAddress(&dummy, &result);\n  return result;\n}\n#  endif  // GTEST_HAS_CLONE\n\n// Spawns a child process with the same executable as the current process in\n// a thread-safe manner and instructs it to run the death test.  The\n// implementation uses fork(2) + exec.  On systems where clone(2) is\n// available, it is used instead, being slightly more thread-safe.  On QNX,\n// fork supports only single-threaded environments, so this function uses\n// spawn(2) there instead.  The function dies with an error message if\n// anything goes wrong.\nstatic pid_t ExecDeathTestSpawnChild(char* const* argv, int close_fd) {\n  ExecDeathTestArgs args = { argv, close_fd };\n  pid_t child_pid = -1;\n\n#  if GTEST_OS_QNX\n  // Obtains the current directory and sets it to be closed in the child\n  // process.\n  const int cwd_fd = open(\".\", O_RDONLY);\n  GTEST_DEATH_TEST_CHECK_(cwd_fd != -1);\n  GTEST_DEATH_TEST_CHECK_SYSCALL_(fcntl(cwd_fd, F_SETFD, FD_CLOEXEC));\n  // We need to execute the test program in the same environment where\n  // it was originally invoked.  Therefore we change to the original\n  // working directory first.\n  const char* const original_dir =\n      UnitTest::GetInstance()->original_working_dir();\n  // We can safely call chdir() as it's a direct system call.\n  if (chdir(original_dir) != 0) {\n    DeathTestAbort(std::string(\"chdir(\\\"\") + original_dir + \"\\\") failed: \" +\n                   GetLastErrnoDescription());\n    return EXIT_FAILURE;\n  }\n\n  int fd_flags;\n  // Set close_fd to be closed after spawn.\n  GTEST_DEATH_TEST_CHECK_SYSCALL_(fd_flags = fcntl(close_fd, F_GETFD));\n  GTEST_DEATH_TEST_CHECK_SYSCALL_(fcntl(close_fd, F_SETFD,\n                                        fd_flags | FD_CLOEXEC));\n  struct inheritance inherit = {0};\n  // spawn is a system call.\n  child_pid =\n      spawn(args.argv[0], 0, nullptr, &inherit, args.argv, GetEnviron());\n  // Restores the current working directory.\n  GTEST_DEATH_TEST_CHECK_(fchdir(cwd_fd) != -1);\n  GTEST_DEATH_TEST_CHECK_SYSCALL_(close(cwd_fd));\n\n#  else   // GTEST_OS_QNX\n#   if GTEST_OS_LINUX\n  // When a SIGPROF signal is received while fork() or clone() are executing,\n  // the process may hang. To avoid this, we ignore SIGPROF here and re-enable\n  // it after the call to fork()/clone() is complete.\n  struct sigaction saved_sigprof_action;\n  struct sigaction ignore_sigprof_action;\n  memset(&ignore_sigprof_action, 0, sizeof(ignore_sigprof_action));\n  sigemptyset(&ignore_sigprof_action.sa_mask);\n  ignore_sigprof_action.sa_handler = SIG_IGN;\n  GTEST_DEATH_TEST_CHECK_SYSCALL_(sigaction(\n      SIGPROF, &ignore_sigprof_action, &saved_sigprof_action));\n#   endif  // GTEST_OS_LINUX\n\n#   if GTEST_HAS_CLONE\n  const bool use_fork = GTEST_FLAG(death_test_use_fork);\n\n  if (!use_fork) {\n    static const bool stack_grows_down = StackGrowsDown();\n    const size_t stack_size = getpagesize();\n    // MMAP_ANONYMOUS is not defined on Mac, so we use MAP_ANON instead.\n    void* const stack = mmap(nullptr, stack_size, PROT_READ | PROT_WRITE,\n                             MAP_ANON | MAP_PRIVATE, -1, 0);\n    GTEST_DEATH_TEST_CHECK_(stack != MAP_FAILED);\n\n    // Maximum stack alignment in bytes:  For a downward-growing stack, this\n    // amount is subtracted from size of the stack space to get an address\n    // that is within the stack space and is aligned on all systems we care\n    // about.  As far as I know there is no ABI with stack alignment greater\n    // than 64.  We assume stack and stack_size already have alignment of\n    // kMaxStackAlignment.\n    const size_t kMaxStackAlignment = 64;\n    void* const stack_top =\n        static_cast<char*>(stack) +\n            (stack_grows_down ? stack_size - kMaxStackAlignment : 0);\n    GTEST_DEATH_TEST_CHECK_(stack_size > kMaxStackAlignment &&\n        reinterpret_cast<intptr_t>(stack_top) % kMaxStackAlignment == 0);\n\n    child_pid = clone(&ExecDeathTestChildMain, stack_top, SIGCHLD, &args);\n\n    GTEST_DEATH_TEST_CHECK_(munmap(stack, stack_size) != -1);\n  }\n#   else\n  const bool use_fork = true;\n#   endif  // GTEST_HAS_CLONE\n\n  if (use_fork && (child_pid = fork()) == 0) {\n      ExecDeathTestChildMain(&args);\n      _exit(0);\n  }\n#  endif  // GTEST_OS_QNX\n#  if GTEST_OS_LINUX\n  GTEST_DEATH_TEST_CHECK_SYSCALL_(\n      sigaction(SIGPROF, &saved_sigprof_action, nullptr));\n#  endif  // GTEST_OS_LINUX\n\n  GTEST_DEATH_TEST_CHECK_(child_pid != -1);\n  return child_pid;\n}\n\n// The AssumeRole process for a fork-and-exec death test.  It re-executes the\n// main program from the beginning, setting the --gtest_filter\n// and --gtest_internal_run_death_test flags to cause only the current\n// death test to be re-run.\nDeathTest::TestRole ExecDeathTest::AssumeRole() {\n  const UnitTestImpl* const impl = GetUnitTestImpl();\n  const InternalRunDeathTestFlag* const flag =\n      impl->internal_run_death_test_flag();\n  const TestInfo* const info = impl->current_test_info();\n  const int death_test_index = info->result()->death_test_count();\n\n  if (flag != nullptr) {\n    set_write_fd(flag->write_fd());\n    return EXECUTE_TEST;\n  }\n\n  int pipe_fd[2];\n  GTEST_DEATH_TEST_CHECK_(pipe(pipe_fd) != -1);\n  // Clear the close-on-exec flag on the write end of the pipe, lest\n  // it be closed when the child process does an exec:\n  GTEST_DEATH_TEST_CHECK_(fcntl(pipe_fd[1], F_SETFD, 0) != -1);\n\n  const std::string filter_flag = std::string(\"--\") + GTEST_FLAG_PREFIX_ +\n                                  kFilterFlag + \"=\" + info->test_suite_name() +\n                                  \".\" + info->name();\n  const std::string internal_flag =\n      std::string(\"--\") + GTEST_FLAG_PREFIX_ + kInternalRunDeathTestFlag + \"=\"\n      + file_ + \"|\" + StreamableToString(line_) + \"|\"\n      + StreamableToString(death_test_index) + \"|\"\n      + StreamableToString(pipe_fd[1]);\n  Arguments args;\n  args.AddArguments(GetArgvsForDeathTestChildProcess());\n  args.AddArgument(filter_flag.c_str());\n  args.AddArgument(internal_flag.c_str());\n\n  DeathTest::set_last_death_test_message(\"\");\n\n  CaptureStderr();\n  // See the comment in NoExecDeathTest::AssumeRole for why the next line\n  // is necessary.\n  FlushInfoLog();\n\n  const pid_t child_pid = ExecDeathTestSpawnChild(args.Argv(), pipe_fd[0]);\n  GTEST_DEATH_TEST_CHECK_SYSCALL_(close(pipe_fd[1]));\n  set_child_pid(child_pid);\n  set_read_fd(pipe_fd[0]);\n  set_spawned(true);\n  return OVERSEE_TEST;\n}\n\n# endif  // !GTEST_OS_WINDOWS\n\n// Creates a concrete DeathTest-derived class that depends on the\n// --gtest_death_test_style flag, and sets the pointer pointed to\n// by the \"test\" argument to its address.  If the test should be\n// skipped, sets that pointer to NULL.  Returns true, unless the\n// flag is set to an invalid value.\nbool DefaultDeathTestFactory::Create(const char* statement,\n                                     Matcher<const std::string&> matcher,\n                                     const char* file, int line,\n                                     DeathTest** test) {\n  UnitTestImpl* const impl = GetUnitTestImpl();\n  const InternalRunDeathTestFlag* const flag =\n      impl->internal_run_death_test_flag();\n  const int death_test_index = impl->current_test_info()\n      ->increment_death_test_count();\n\n  if (flag != nullptr) {\n    if (death_test_index > flag->index()) {\n      DeathTest::set_last_death_test_message(\n          \"Death test count (\" + StreamableToString(death_test_index)\n          + \") somehow exceeded expected maximum (\"\n          + StreamableToString(flag->index()) + \")\");\n      return false;\n    }\n\n    if (!(flag->file() == file && flag->line() == line &&\n          flag->index() == death_test_index)) {\n      *test = nullptr;\n      return true;\n    }\n  }\n\n# if GTEST_OS_WINDOWS\n\n  if (GTEST_FLAG(death_test_style) == \"threadsafe\" ||\n      GTEST_FLAG(death_test_style) == \"fast\") {\n    *test = new WindowsDeathTest(statement, std::move(matcher), file, line);\n  }\n\n# elif GTEST_OS_FUCHSIA\n\n  if (GTEST_FLAG(death_test_style) == \"threadsafe\" ||\n      GTEST_FLAG(death_test_style) == \"fast\") {\n    *test = new FuchsiaDeathTest(statement, std::move(matcher), file, line);\n  }\n\n# else\n\n  if (GTEST_FLAG(death_test_style) == \"threadsafe\") {\n    *test = new ExecDeathTest(statement, std::move(matcher), file, line);\n  } else if (GTEST_FLAG(death_test_style) == \"fast\") {\n    *test = new NoExecDeathTest(statement, std::move(matcher));\n  }\n\n# endif  // GTEST_OS_WINDOWS\n\n  else {  // NOLINT - this is more readable than unbalanced brackets inside #if.\n    DeathTest::set_last_death_test_message(\n        \"Unknown death test style \\\"\" + GTEST_FLAG(death_test_style)\n        + \"\\\" encountered\");\n    return false;\n  }\n\n  return true;\n}\n\n# if GTEST_OS_WINDOWS\n// Recreates the pipe and event handles from the provided parameters,\n// signals the event, and returns a file descriptor wrapped around the pipe\n// handle. This function is called in the child process only.\nstatic int GetStatusFileDescriptor(unsigned int parent_process_id,\n                            size_t write_handle_as_size_t,\n                            size_t event_handle_as_size_t) {\n  AutoHandle parent_process_handle(::OpenProcess(PROCESS_DUP_HANDLE,\n                                                   FALSE,  // Non-inheritable.\n                                                   parent_process_id));\n  if (parent_process_handle.Get() == INVALID_HANDLE_VALUE) {\n    DeathTestAbort(\"Unable to open parent process \" +\n                   StreamableToString(parent_process_id));\n  }\n\n  GTEST_CHECK_(sizeof(HANDLE) <= sizeof(size_t));\n\n  const HANDLE write_handle =\n      reinterpret_cast<HANDLE>(write_handle_as_size_t);\n  HANDLE dup_write_handle;\n\n  // The newly initialized handle is accessible only in the parent\n  // process. To obtain one accessible within the child, we need to use\n  // DuplicateHandle.\n  if (!::DuplicateHandle(parent_process_handle.Get(), write_handle,\n                         ::GetCurrentProcess(), &dup_write_handle,\n                         0x0,    // Requested privileges ignored since\n                                 // DUPLICATE_SAME_ACCESS is used.\n                         FALSE,  // Request non-inheritable handler.\n                         DUPLICATE_SAME_ACCESS)) {\n    DeathTestAbort(\"Unable to duplicate the pipe handle \" +\n                   StreamableToString(write_handle_as_size_t) +\n                   \" from the parent process \" +\n                   StreamableToString(parent_process_id));\n  }\n\n  const HANDLE event_handle = reinterpret_cast<HANDLE>(event_handle_as_size_t);\n  HANDLE dup_event_handle;\n\n  if (!::DuplicateHandle(parent_process_handle.Get(), event_handle,\n                         ::GetCurrentProcess(), &dup_event_handle,\n                         0x0,\n                         FALSE,\n                         DUPLICATE_SAME_ACCESS)) {\n    DeathTestAbort(\"Unable to duplicate the event handle \" +\n                   StreamableToString(event_handle_as_size_t) +\n                   \" from the parent process \" +\n                   StreamableToString(parent_process_id));\n  }\n\n  const int write_fd =\n      ::_open_osfhandle(reinterpret_cast<intptr_t>(dup_write_handle), O_APPEND);\n  if (write_fd == -1) {\n    DeathTestAbort(\"Unable to convert pipe handle \" +\n                   StreamableToString(write_handle_as_size_t) +\n                   \" to a file descriptor\");\n  }\n\n  // Signals the parent that the write end of the pipe has been acquired\n  // so the parent can release its own write end.\n  ::SetEvent(dup_event_handle);\n\n  return write_fd;\n}\n# endif  // GTEST_OS_WINDOWS\n\n// Returns a newly created InternalRunDeathTestFlag object with fields\n// initialized from the GTEST_FLAG(internal_run_death_test) flag if\n// the flag is specified; otherwise returns NULL.\nInternalRunDeathTestFlag* ParseInternalRunDeathTestFlag() {\n  if (GTEST_FLAG(internal_run_death_test) == \"\") return nullptr;\n\n  // GTEST_HAS_DEATH_TEST implies that we have ::std::string, so we\n  // can use it here.\n  int line = -1;\n  int index = -1;\n  ::std::vector< ::std::string> fields;\n  SplitString(GTEST_FLAG(internal_run_death_test).c_str(), '|', &fields);\n  int write_fd = -1;\n\n# if GTEST_OS_WINDOWS\n\n  unsigned int parent_process_id = 0;\n  size_t write_handle_as_size_t = 0;\n  size_t event_handle_as_size_t = 0;\n\n  if (fields.size() != 6\n      || !ParseNaturalNumber(fields[1], &line)\n      || !ParseNaturalNumber(fields[2], &index)\n      || !ParseNaturalNumber(fields[3], &parent_process_id)\n      || !ParseNaturalNumber(fields[4], &write_handle_as_size_t)\n      || !ParseNaturalNumber(fields[5], &event_handle_as_size_t)) {\n    DeathTestAbort(\"Bad --gtest_internal_run_death_test flag: \" +\n                   GTEST_FLAG(internal_run_death_test));\n  }\n  write_fd = GetStatusFileDescriptor(parent_process_id,\n                                     write_handle_as_size_t,\n                                     event_handle_as_size_t);\n\n# elif GTEST_OS_FUCHSIA\n\n  if (fields.size() != 3\n      || !ParseNaturalNumber(fields[1], &line)\n      || !ParseNaturalNumber(fields[2], &index)) {\n    DeathTestAbort(\"Bad --gtest_internal_run_death_test flag: \"\n        + GTEST_FLAG(internal_run_death_test));\n  }\n\n# else\n\n  if (fields.size() != 4\n      || !ParseNaturalNumber(fields[1], &line)\n      || !ParseNaturalNumber(fields[2], &index)\n      || !ParseNaturalNumber(fields[3], &write_fd)) {\n    DeathTestAbort(\"Bad --gtest_internal_run_death_test flag: \"\n        + GTEST_FLAG(internal_run_death_test));\n  }\n\n# endif  // GTEST_OS_WINDOWS\n\n  return new InternalRunDeathTestFlag(fields[0], line, index, write_fd);\n}\n\n}  // namespace internal\n\n#endif  // GTEST_HAS_DEATH_TEST\n\n}  // namespace testing\n// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n#include <stdlib.h>\n\n#if GTEST_OS_WINDOWS_MOBILE\n# include <windows.h>\n#elif GTEST_OS_WINDOWS\n# include <direct.h>\n# include <io.h>\n#else\n# include <limits.h>\n# include <climits>  // Some Linux distributions define PATH_MAX here.\n#endif  // GTEST_OS_WINDOWS_MOBILE\n\n\n#if GTEST_OS_WINDOWS\n# define GTEST_PATH_MAX_ _MAX_PATH\n#elif defined(PATH_MAX)\n# define GTEST_PATH_MAX_ PATH_MAX\n#elif defined(_XOPEN_PATH_MAX)\n# define GTEST_PATH_MAX_ _XOPEN_PATH_MAX\n#else\n# define GTEST_PATH_MAX_ _POSIX_PATH_MAX\n#endif  // GTEST_OS_WINDOWS\n\nnamespace testing {\nnamespace internal {\n\n#if GTEST_OS_WINDOWS\n// On Windows, '\\\\' is the standard path separator, but many tools and the\n// Windows API also accept '/' as an alternate path separator. Unless otherwise\n// noted, a file path can contain either kind of path separators, or a mixture\n// of them.\nconst char kPathSeparator = '\\\\';\nconst char kAlternatePathSeparator = '/';\nconst char kAlternatePathSeparatorString[] = \"/\";\n# if GTEST_OS_WINDOWS_MOBILE\n// Windows CE doesn't have a current directory. You should not use\n// the current directory in tests on Windows CE, but this at least\n// provides a reasonable fallback.\nconst char kCurrentDirectoryString[] = \"\\\\\";\n// Windows CE doesn't define INVALID_FILE_ATTRIBUTES\nconst DWORD kInvalidFileAttributes = 0xffffffff;\n# else\nconst char kCurrentDirectoryString[] = \".\\\\\";\n# endif  // GTEST_OS_WINDOWS_MOBILE\n#else\nconst char kPathSeparator = '/';\nconst char kCurrentDirectoryString[] = \"./\";\n#endif  // GTEST_OS_WINDOWS\n\n// Returns whether the given character is a valid path separator.\nstatic bool IsPathSeparator(char c) {\n#if GTEST_HAS_ALT_PATH_SEP_\n  return (c == kPathSeparator) || (c == kAlternatePathSeparator);\n#else\n  return c == kPathSeparator;\n#endif\n}\n\n// Returns the current working directory, or \"\" if unsuccessful.\nFilePath FilePath::GetCurrentDir() {\n#if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_WINDOWS_PHONE || \\\n    GTEST_OS_WINDOWS_RT || ARDUINO\n  // Windows CE and Arduino don't have a current directory, so we just return\n  // something reasonable.\n  return FilePath(kCurrentDirectoryString);\n#elif GTEST_OS_WINDOWS\n  char cwd[GTEST_PATH_MAX_ + 1] = { '\\0' };\n  return FilePath(_getcwd(cwd, sizeof(cwd)) == nullptr ? \"\" : cwd);\n#else\n  char cwd[GTEST_PATH_MAX_ + 1] = { '\\0' };\n  char* result = getcwd(cwd, sizeof(cwd));\n# if GTEST_OS_NACL\n  // getcwd will likely fail in NaCl due to the sandbox, so return something\n  // reasonable. The user may have provided a shim implementation for getcwd,\n  // however, so fallback only when failure is detected.\n  return FilePath(result == nullptr ? kCurrentDirectoryString : cwd);\n# endif  // GTEST_OS_NACL\n  return FilePath(result == nullptr ? \"\" : cwd);\n#endif  // GTEST_OS_WINDOWS_MOBILE\n}\n\n// Returns a copy of the FilePath with the case-insensitive extension removed.\n// Example: FilePath(\"dir/file.exe\").RemoveExtension(\"EXE\") returns\n// FilePath(\"dir/file\"). If a case-insensitive extension is not\n// found, returns a copy of the original FilePath.\nFilePath FilePath::RemoveExtension(const char* extension) const {\n  const std::string dot_extension = std::string(\".\") + extension;\n  if (String::EndsWithCaseInsensitive(pathname_, dot_extension)) {\n    return FilePath(pathname_.substr(\n        0, pathname_.length() - dot_extension.length()));\n  }\n  return *this;\n}\n\n// Returns a pointer to the last occurrence of a valid path separator in\n// the FilePath. On Windows, for example, both '/' and '\\' are valid path\n// separators. Returns NULL if no path separator was found.\nconst char* FilePath::FindLastPathSeparator() const {\n  const char* const last_sep = strrchr(c_str(), kPathSeparator);\n#if GTEST_HAS_ALT_PATH_SEP_\n  const char* const last_alt_sep = strrchr(c_str(), kAlternatePathSeparator);\n  // Comparing two pointers of which only one is NULL is undefined.\n  if (last_alt_sep != nullptr &&\n      (last_sep == nullptr || last_alt_sep > last_sep)) {\n    return last_alt_sep;\n  }\n#endif\n  return last_sep;\n}\n\n// Returns a copy of the FilePath with the directory part removed.\n// Example: FilePath(\"path/to/file\").RemoveDirectoryName() returns\n// FilePath(\"file\"). If there is no directory part (\"just_a_file\"), it returns\n// the FilePath unmodified. If there is no file part (\"just_a_dir/\") it\n// returns an empty FilePath (\"\").\n// On Windows platform, '\\' is the path separator, otherwise it is '/'.\nFilePath FilePath::RemoveDirectoryName() const {\n  const char* const last_sep = FindLastPathSeparator();\n  return last_sep ? FilePath(last_sep + 1) : *this;\n}\n\n// RemoveFileName returns the directory path with the filename removed.\n// Example: FilePath(\"path/to/file\").RemoveFileName() returns \"path/to/\".\n// If the FilePath is \"a_file\" or \"/a_file\", RemoveFileName returns\n// FilePath(\"./\") or, on Windows, FilePath(\".\\\\\"). If the filepath does\n// not have a file, like \"just/a/dir/\", it returns the FilePath unmodified.\n// On Windows platform, '\\' is the path separator, otherwise it is '/'.\nFilePath FilePath::RemoveFileName() const {\n  const char* const last_sep = FindLastPathSeparator();\n  std::string dir;\n  if (last_sep) {\n    dir = std::string(c_str(), last_sep + 1 - c_str());\n  } else {\n    dir = kCurrentDirectoryString;\n  }\n  return FilePath(dir);\n}\n\n// Helper functions for naming files in a directory for xml output.\n\n// Given directory = \"dir\", base_name = \"test\", number = 0,\n// extension = \"xml\", returns \"dir/test.xml\". If number is greater\n// than zero (e.g., 12), returns \"dir/test_12.xml\".\n// On Windows platform, uses \\ as the separator rather than /.\nFilePath FilePath::MakeFileName(const FilePath& directory,\n                                const FilePath& base_name,\n                                int number,\n                                const char* extension) {\n  std::string file;\n  if (number == 0) {\n    file = base_name.string() + \".\" + extension;\n  } else {\n    file = base_name.string() + \"_\" + StreamableToString(number)\n        + \".\" + extension;\n  }\n  return ConcatPaths(directory, FilePath(file));\n}\n\n// Given directory = \"dir\", relative_path = \"test.xml\", returns \"dir/test.xml\".\n// On Windows, uses \\ as the separator rather than /.\nFilePath FilePath::ConcatPaths(const FilePath& directory,\n                               const FilePath& relative_path) {\n  if (directory.IsEmpty())\n    return relative_path;\n  const FilePath dir(directory.RemoveTrailingPathSeparator());\n  return FilePath(dir.string() + kPathSeparator + relative_path.string());\n}\n\n// Returns true if pathname describes something findable in the file-system,\n// either a file, directory, or whatever.\nbool FilePath::FileOrDirectoryExists() const {\n#if GTEST_OS_WINDOWS_MOBILE\n  LPCWSTR unicode = String::AnsiToUtf16(pathname_.c_str());\n  const DWORD attributes = GetFileAttributes(unicode);\n  delete [] unicode;\n  return attributes != kInvalidFileAttributes;\n#else\n  posix::StatStruct file_stat;\n  return posix::Stat(pathname_.c_str(), &file_stat) == 0;\n#endif  // GTEST_OS_WINDOWS_MOBILE\n}\n\n// Returns true if pathname describes a directory in the file-system\n// that exists.\nbool FilePath::DirectoryExists() const {\n  bool result = false;\n#if GTEST_OS_WINDOWS\n  // Don't strip off trailing separator if path is a root directory on\n  // Windows (like \"C:\\\\\").\n  const FilePath& path(IsRootDirectory() ? *this :\n                                           RemoveTrailingPathSeparator());\n#else\n  const FilePath& path(*this);\n#endif\n\n#if GTEST_OS_WINDOWS_MOBILE\n  LPCWSTR unicode = String::AnsiToUtf16(path.c_str());\n  const DWORD attributes = GetFileAttributes(unicode);\n  delete [] unicode;\n  if ((attributes != kInvalidFileAttributes) &&\n      (attributes & FILE_ATTRIBUTE_DIRECTORY)) {\n    result = true;\n  }\n#else\n  posix::StatStruct file_stat;\n  result = posix::Stat(path.c_str(), &file_stat) == 0 &&\n      posix::IsDir(file_stat);\n#endif  // GTEST_OS_WINDOWS_MOBILE\n\n  return result;\n}\n\n// Returns true if pathname describes a root directory. (Windows has one\n// root directory per disk drive.)\nbool FilePath::IsRootDirectory() const {\n#if GTEST_OS_WINDOWS\n  return pathname_.length() == 3 && IsAbsolutePath();\n#else\n  return pathname_.length() == 1 && IsPathSeparator(pathname_.c_str()[0]);\n#endif\n}\n\n// Returns true if pathname describes an absolute path.\nbool FilePath::IsAbsolutePath() const {\n  const char* const name = pathname_.c_str();\n#if GTEST_OS_WINDOWS\n  return pathname_.length() >= 3 &&\n     ((name[0] >= 'a' && name[0] <= 'z') ||\n      (name[0] >= 'A' && name[0] <= 'Z')) &&\n     name[1] == ':' &&\n     IsPathSeparator(name[2]);\n#else\n  return IsPathSeparator(name[0]);\n#endif\n}\n\n// Returns a pathname for a file that does not currently exist. The pathname\n// will be directory/base_name.extension or\n// directory/base_name_<number>.extension if directory/base_name.extension\n// already exists. The number will be incremented until a pathname is found\n// that does not already exist.\n// Examples: 'dir/foo_test.xml' or 'dir/foo_test_1.xml'.\n// There could be a race condition if two or more processes are calling this\n// function at the same time -- they could both pick the same filename.\nFilePath FilePath::GenerateUniqueFileName(const FilePath& directory,\n                                          const FilePath& base_name,\n                                          const char* extension) {\n  FilePath full_pathname;\n  int number = 0;\n  do {\n    full_pathname.Set(MakeFileName(directory, base_name, number++, extension));\n  } while (full_pathname.FileOrDirectoryExists());\n  return full_pathname;\n}\n\n// Returns true if FilePath ends with a path separator, which indicates that\n// it is intended to represent a directory. Returns false otherwise.\n// This does NOT check that a directory (or file) actually exists.\nbool FilePath::IsDirectory() const {\n  return !pathname_.empty() &&\n         IsPathSeparator(pathname_.c_str()[pathname_.length() - 1]);\n}\n\n// Create directories so that path exists. Returns true if successful or if\n// the directories already exist; returns false if unable to create directories\n// for any reason.\nbool FilePath::CreateDirectoriesRecursively() const {\n  if (!this->IsDirectory()) {\n    return false;\n  }\n\n  if (pathname_.length() == 0 || this->DirectoryExists()) {\n    return true;\n  }\n\n  const FilePath parent(this->RemoveTrailingPathSeparator().RemoveFileName());\n  return parent.CreateDirectoriesRecursively() && this->CreateFolder();\n}\n\n// Create the directory so that path exists. Returns true if successful or\n// if the directory already exists; returns false if unable to create the\n// directory for any reason, including if the parent directory does not\n// exist. Not named \"CreateDirectory\" because that's a macro on Windows.\nbool FilePath::CreateFolder() const {\n#if GTEST_OS_WINDOWS_MOBILE\n  FilePath removed_sep(this->RemoveTrailingPathSeparator());\n  LPCWSTR unicode = String::AnsiToUtf16(removed_sep.c_str());\n  int result = CreateDirectory(unicode, nullptr) ? 0 : -1;\n  delete [] unicode;\n#elif GTEST_OS_WINDOWS\n  int result = _mkdir(pathname_.c_str());\n#else\n  int result = mkdir(pathname_.c_str(), 0777);\n#endif  // GTEST_OS_WINDOWS_MOBILE\n\n  if (result == -1) {\n    return this->DirectoryExists();  // An error is OK if the directory exists.\n  }\n  return true;  // No error.\n}\n\n// If input name has a trailing separator character, remove it and return the\n// name, otherwise return the name string unmodified.\n// On Windows platform, uses \\ as the separator, other platforms use /.\nFilePath FilePath::RemoveTrailingPathSeparator() const {\n  return IsDirectory()\n      ? FilePath(pathname_.substr(0, pathname_.length() - 1))\n      : *this;\n}\n\n// Removes any redundant separators that might be in the pathname.\n// For example, \"bar///foo\" becomes \"bar/foo\". Does not eliminate other\n// redundancies that might be in a pathname involving \".\" or \"..\".\nvoid FilePath::Normalize() {\n  if (pathname_.c_str() == nullptr) {\n    pathname_ = \"\";\n    return;\n  }\n  const char* src = pathname_.c_str();\n  char* const dest = new char[pathname_.length() + 1];\n  char* dest_ptr = dest;\n  memset(dest_ptr, 0, pathname_.length() + 1);\n\n  while (*src != '\\0') {\n    *dest_ptr = *src;\n    if (!IsPathSeparator(*src)) {\n      src++;\n    } else {\n#if GTEST_HAS_ALT_PATH_SEP_\n      if (*dest_ptr == kAlternatePathSeparator) {\n        *dest_ptr = kPathSeparator;\n      }\n#endif\n      while (IsPathSeparator(*src))\n        src++;\n    }\n    dest_ptr++;\n  }\n  *dest_ptr = '\\0';\n  pathname_ = dest;\n  delete[] dest;\n}\n\n}  // namespace internal\n}  // namespace testing\n// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n// The Google C++ Testing and Mocking Framework (Google Test)\n//\n// This file implements just enough of the matcher interface to allow\n// EXPECT_DEATH and friends to accept a matcher argument.\n\n\n#include <string>\n\nnamespace testing {\n\n// Constructs a matcher that matches a const std::string& whose value is\n// equal to s.\nMatcher<const std::string&>::Matcher(const std::string& s) { *this = Eq(s); }\n\n#if GTEST_HAS_GLOBAL_STRING\n// Constructs a matcher that matches a const std::string& whose value is\n// equal to s.\nMatcher<const std::string&>::Matcher(const ::string& s) {\n  *this = Eq(static_cast<std::string>(s));\n}\n#endif  // GTEST_HAS_GLOBAL_STRING\n\n// Constructs a matcher that matches a const std::string& whose value is\n// equal to s.\nMatcher<const std::string&>::Matcher(const char* s) {\n  *this = Eq(std::string(s));\n}\n\n// Constructs a matcher that matches a std::string whose value is equal to\n// s.\nMatcher<std::string>::Matcher(const std::string& s) { *this = Eq(s); }\n\n#if GTEST_HAS_GLOBAL_STRING\n// Constructs a matcher that matches a std::string whose value is equal to\n// s.\nMatcher<std::string>::Matcher(const ::string& s) {\n  *this = Eq(static_cast<std::string>(s));\n}\n#endif  // GTEST_HAS_GLOBAL_STRING\n\n// Constructs a matcher that matches a std::string whose value is equal to\n// s.\nMatcher<std::string>::Matcher(const char* s) { *this = Eq(std::string(s)); }\n\n#if GTEST_HAS_GLOBAL_STRING\n// Constructs a matcher that matches a const ::string& whose value is\n// equal to s.\nMatcher<const ::string&>::Matcher(const std::string& s) {\n  *this = Eq(static_cast<::string>(s));\n}\n\n// Constructs a matcher that matches a const ::string& whose value is\n// equal to s.\nMatcher<const ::string&>::Matcher(const ::string& s) { *this = Eq(s); }\n\n// Constructs a matcher that matches a const ::string& whose value is\n// equal to s.\nMatcher<const ::string&>::Matcher(const char* s) { *this = Eq(::string(s)); }\n\n// Constructs a matcher that matches a ::string whose value is equal to s.\nMatcher<::string>::Matcher(const std::string& s) {\n  *this = Eq(static_cast<::string>(s));\n}\n\n// Constructs a matcher that matches a ::string whose value is equal to s.\nMatcher<::string>::Matcher(const ::string& s) { *this = Eq(s); }\n\n// Constructs a matcher that matches a string whose value is equal to s.\nMatcher<::string>::Matcher(const char* s) { *this = Eq(::string(s)); }\n#endif  // GTEST_HAS_GLOBAL_STRING\n\n#if GTEST_HAS_ABSL\n// Constructs a matcher that matches a const absl::string_view& whose value is\n// equal to s.\nMatcher<const absl::string_view&>::Matcher(const std::string& s) {\n  *this = Eq(s);\n}\n\n#if GTEST_HAS_GLOBAL_STRING\n// Constructs a matcher that matches a const absl::string_view& whose value is\n// equal to s.\nMatcher<const absl::string_view&>::Matcher(const ::string& s) { *this = Eq(s); }\n#endif  // GTEST_HAS_GLOBAL_STRING\n\n// Constructs a matcher that matches a const absl::string_view& whose value is\n// equal to s.\nMatcher<const absl::string_view&>::Matcher(const char* s) {\n  *this = Eq(std::string(s));\n}\n\n// Constructs a matcher that matches a const absl::string_view& whose value is\n// equal to s.\nMatcher<const absl::string_view&>::Matcher(absl::string_view s) {\n  *this = Eq(std::string(s));\n}\n\n// Constructs a matcher that matches a absl::string_view whose value is equal to\n// s.\nMatcher<absl::string_view>::Matcher(const std::string& s) { *this = Eq(s); }\n\n#if GTEST_HAS_GLOBAL_STRING\n// Constructs a matcher that matches a absl::string_view whose value is equal to\n// s.\nMatcher<absl::string_view>::Matcher(const ::string& s) { *this = Eq(s); }\n#endif  // GTEST_HAS_GLOBAL_STRING\n\n// Constructs a matcher that matches a absl::string_view whose value is equal to\n// s.\nMatcher<absl::string_view>::Matcher(const char* s) {\n  *this = Eq(std::string(s));\n}\n\n// Constructs a matcher that matches a absl::string_view whose value is equal to\n// s.\nMatcher<absl::string_view>::Matcher(absl::string_view s) {\n  *this = Eq(std::string(s));\n}\n#endif  // GTEST_HAS_ABSL\n\n}  // namespace testing\n// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n\n#include <limits.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <fstream>\n#include <memory>\n\n#if GTEST_OS_WINDOWS\n# include <windows.h>\n# include <io.h>\n# include <sys/stat.h>\n# include <map>  // Used in ThreadLocal.\n# ifdef _MSC_VER\n#  include <crtdbg.h>\n# endif  // _MSC_VER\n#else\n# include <unistd.h>\n#endif  // GTEST_OS_WINDOWS\n\n#if GTEST_OS_MAC\n# include <mach/mach_init.h>\n# include <mach/task.h>\n# include <mach/vm_map.h>\n#endif  // GTEST_OS_MAC\n\n#if GTEST_OS_DRAGONFLY || GTEST_OS_FREEBSD || GTEST_OS_GNU_KFREEBSD || \\\n    GTEST_OS_NETBSD || GTEST_OS_OPENBSD\n# include <sys/sysctl.h>\n# if GTEST_OS_DRAGONFLY || GTEST_OS_FREEBSD || GTEST_OS_GNU_KFREEBSD\n#  include <sys/user.h>\n# endif\n#endif\n\n#if GTEST_OS_QNX\n# include <devctl.h>\n# include <fcntl.h>\n# include <sys/procfs.h>\n#endif  // GTEST_OS_QNX\n\n#if GTEST_OS_AIX\n# include <procinfo.h>\n# include <sys/types.h>\n#endif  // GTEST_OS_AIX\n\n#if GTEST_OS_FUCHSIA\n# include <zircon/process.h>\n# include <zircon/syscalls.h>\n#endif  // GTEST_OS_FUCHSIA\n\n\nnamespace testing {\nnamespace internal {\n\n#if defined(_MSC_VER) || defined(__BORLANDC__)\n// MSVC and C++Builder do not provide a definition of STDERR_FILENO.\nconst int kStdOutFileno = 1;\nconst int kStdErrFileno = 2;\n#else\nconst int kStdOutFileno = STDOUT_FILENO;\nconst int kStdErrFileno = STDERR_FILENO;\n#endif  // _MSC_VER\n\n#if GTEST_OS_LINUX\n\nnamespace {\ntemplate <typename T>\nT ReadProcFileField(const std::string& filename, int field) {\n  std::string dummy;\n  std::ifstream file(filename.c_str());\n  while (field-- > 0) {\n    file >> dummy;\n  }\n  T output = 0;\n  file >> output;\n  return output;\n}\n}  // namespace\n\n// Returns the number of active threads, or 0 when there is an error.\nsize_t GetThreadCount() {\n  const std::string filename =\n      (Message() << \"/proc/\" << getpid() << \"/stat\").GetString();\n  return ReadProcFileField<int>(filename, 19);\n}\n\n#elif GTEST_OS_MAC\n\nsize_t GetThreadCount() {\n  const task_t task = mach_task_self();\n  mach_msg_type_number_t thread_count;\n  thread_act_array_t thread_list;\n  const kern_return_t status = task_threads(task, &thread_list, &thread_count);\n  if (status == KERN_SUCCESS) {\n    // task_threads allocates resources in thread_list and we need to free them\n    // to avoid leaks.\n    vm_deallocate(task,\n                  reinterpret_cast<vm_address_t>(thread_list),\n                  sizeof(thread_t) * thread_count);\n    return static_cast<size_t>(thread_count);\n  } else {\n    return 0;\n  }\n}\n\n#elif GTEST_OS_DRAGONFLY || GTEST_OS_FREEBSD || GTEST_OS_GNU_KFREEBSD || \\\n      GTEST_OS_NETBSD\n\n#if GTEST_OS_NETBSD\n#undef KERN_PROC\n#define KERN_PROC KERN_PROC2\n#define kinfo_proc kinfo_proc2\n#endif\n\n#if GTEST_OS_DRAGONFLY\n#define KP_NLWP(kp) (kp.kp_nthreads)\n#elif GTEST_OS_FREEBSD || GTEST_OS_GNU_KFREEBSD\n#define KP_NLWP(kp) (kp.ki_numthreads)\n#elif GTEST_OS_NETBSD\n#define KP_NLWP(kp) (kp.p_nlwps)\n#endif\n\n// Returns the number of threads running in the process, or 0 to indicate that\n// we cannot detect it.\nsize_t GetThreadCount() {\n  int mib[] = {\n    CTL_KERN,\n    KERN_PROC,\n    KERN_PROC_PID,\n    getpid(),\n#if GTEST_OS_NETBSD\n    sizeof(struct kinfo_proc),\n    1,\n#endif\n  };\n  u_int miblen = sizeof(mib) / sizeof(mib[0]);\n  struct kinfo_proc info;\n  size_t size = sizeof(info);\n  if (sysctl(mib, miblen, &info, &size, NULL, 0)) {\n    return 0;\n  }\n  return KP_NLWP(info);\n}\n#elif GTEST_OS_OPENBSD\n\n// Returns the number of threads running in the process, or 0 to indicate that\n// we cannot detect it.\nsize_t GetThreadCount() {\n  int mib[] = {\n    CTL_KERN,\n    KERN_PROC,\n    KERN_PROC_PID | KERN_PROC_SHOW_THREADS,\n    getpid(),\n    sizeof(struct kinfo_proc),\n    0,\n  };\n  u_int miblen = sizeof(mib) / sizeof(mib[0]);\n\n  // get number of structs\n  size_t size;\n  if (sysctl(mib, miblen, NULL, &size, NULL, 0)) {\n    return 0;\n  }\n  mib[5] = size / mib[4];\n\n  // populate array of structs\n  struct kinfo_proc info[mib[5]];\n  if (sysctl(mib, miblen, &info, &size, NULL, 0)) {\n    return 0;\n  }\n\n  // exclude empty members\n  int nthreads = 0;\n  for (int i = 0; i < size / mib[4]; i++) {\n    if (info[i].p_tid != -1)\n      nthreads++;\n  }\n  return nthreads;\n}\n\n#elif GTEST_OS_QNX\n\n// Returns the number of threads running in the process, or 0 to indicate that\n// we cannot detect it.\nsize_t GetThreadCount() {\n  const int fd = open(\"/proc/self/as\", O_RDONLY);\n  if (fd < 0) {\n    return 0;\n  }\n  procfs_info process_info;\n  const int status =\n      devctl(fd, DCMD_PROC_INFO, &process_info, sizeof(process_info), nullptr);\n  close(fd);\n  if (status == EOK) {\n    return static_cast<size_t>(process_info.num_threads);\n  } else {\n    return 0;\n  }\n}\n\n#elif GTEST_OS_AIX\n\nsize_t GetThreadCount() {\n  struct procentry64 entry;\n  pid_t pid = getpid();\n  int status = getprocs64(&entry, sizeof(entry), nullptr, 0, &pid, 1);\n  if (status == 1) {\n    return entry.pi_thcount;\n  } else {\n    return 0;\n  }\n}\n\n#elif GTEST_OS_FUCHSIA\n\nsize_t GetThreadCount() {\n  int dummy_buffer;\n  size_t avail;\n  zx_status_t status = zx_object_get_info(\n      zx_process_self(),\n      ZX_INFO_PROCESS_THREADS,\n      &dummy_buffer,\n      0,\n      nullptr,\n      &avail);\n  if (status == ZX_OK) {\n    return avail;\n  } else {\n    return 0;\n  }\n}\n\n#else\n\nsize_t GetThreadCount() {\n  // There's no portable way to detect the number of threads, so we just\n  // return 0 to indicate that we cannot detect it.\n  return 0;\n}\n\n#endif  // GTEST_OS_LINUX\n\n#if GTEST_IS_THREADSAFE && GTEST_OS_WINDOWS\n\nvoid SleepMilliseconds(int n) {\n  ::Sleep(n);\n}\n\nAutoHandle::AutoHandle()\n    : handle_(INVALID_HANDLE_VALUE) {}\n\nAutoHandle::AutoHandle(Handle handle)\n    : handle_(handle) {}\n\nAutoHandle::~AutoHandle() {\n  Reset();\n}\n\nAutoHandle::Handle AutoHandle::Get() const {\n  return handle_;\n}\n\nvoid AutoHandle::Reset() {\n  Reset(INVALID_HANDLE_VALUE);\n}\n\nvoid AutoHandle::Reset(HANDLE handle) {\n  // Resetting with the same handle we already own is invalid.\n  if (handle_ != handle) {\n    if (IsCloseable()) {\n      ::CloseHandle(handle_);\n    }\n    handle_ = handle;\n  } else {\n    GTEST_CHECK_(!IsCloseable())\n        << \"Resetting a valid handle to itself is likely a programmer error \"\n            \"and thus not allowed.\";\n  }\n}\n\nbool AutoHandle::IsCloseable() const {\n  // Different Windows APIs may use either of these values to represent an\n  // invalid handle.\n  return handle_ != nullptr && handle_ != INVALID_HANDLE_VALUE;\n}\n\nNotification::Notification()\n    : event_(::CreateEvent(nullptr,     // Default security attributes.\n                           TRUE,        // Do not reset automatically.\n                           FALSE,       // Initially unset.\n                           nullptr)) {  // Anonymous event.\n  GTEST_CHECK_(event_.Get() != nullptr);\n}\n\nvoid Notification::Notify() {\n  GTEST_CHECK_(::SetEvent(event_.Get()) != FALSE);\n}\n\nvoid Notification::WaitForNotification() {\n  GTEST_CHECK_(\n      ::WaitForSingleObject(event_.Get(), INFINITE) == WAIT_OBJECT_0);\n}\n\nMutex::Mutex()\n    : owner_thread_id_(0),\n      type_(kDynamic),\n      critical_section_init_phase_(0),\n      critical_section_(new CRITICAL_SECTION) {\n  ::InitializeCriticalSection(critical_section_);\n}\n\nMutex::~Mutex() {\n  // Static mutexes are leaked intentionally. It is not thread-safe to try\n  // to clean them up.\n  if (type_ == kDynamic) {\n    ::DeleteCriticalSection(critical_section_);\n    delete critical_section_;\n    critical_section_ = nullptr;\n  }\n}\n\nvoid Mutex::Lock() {\n  ThreadSafeLazyInit();\n  ::EnterCriticalSection(critical_section_);\n  owner_thread_id_ = ::GetCurrentThreadId();\n}\n\nvoid Mutex::Unlock() {\n  ThreadSafeLazyInit();\n  // We don't protect writing to owner_thread_id_ here, as it's the\n  // caller's responsibility to ensure that the current thread holds the\n  // mutex when this is called.\n  owner_thread_id_ = 0;\n  ::LeaveCriticalSection(critical_section_);\n}\n\n// Does nothing if the current thread holds the mutex. Otherwise, crashes\n// with high probability.\nvoid Mutex::AssertHeld() {\n  ThreadSafeLazyInit();\n  GTEST_CHECK_(owner_thread_id_ == ::GetCurrentThreadId())\n      << \"The current thread is not holding the mutex @\" << this;\n}\n\nnamespace {\n\n// Use the RAII idiom to flag mem allocs that are intentionally never\n// deallocated. The motivation is to silence the false positive mem leaks\n// that are reported by the debug version of MS's CRT which can only detect\n// if an alloc is missing a matching deallocation.\n// Example:\n//    MemoryIsNotDeallocated memory_is_not_deallocated;\n//    critical_section_ = new CRITICAL_SECTION;\n//\nclass MemoryIsNotDeallocated\n{\n public:\n  MemoryIsNotDeallocated() : old_crtdbg_flag_(0) {\n#ifdef _MSC_VER\n    old_crtdbg_flag_ = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);\n    // Set heap allocation block type to _IGNORE_BLOCK so that MS debug CRT\n    // doesn't report mem leak if there's no matching deallocation.\n    _CrtSetDbgFlag(old_crtdbg_flag_ & ~_CRTDBG_ALLOC_MEM_DF);\n#endif  //  _MSC_VER\n  }\n\n  ~MemoryIsNotDeallocated() {\n#ifdef _MSC_VER\n    // Restore the original _CRTDBG_ALLOC_MEM_DF flag\n    _CrtSetDbgFlag(old_crtdbg_flag_);\n#endif  //  _MSC_VER\n  }\n\n private:\n  int old_crtdbg_flag_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(MemoryIsNotDeallocated);\n};\n\n}  // namespace\n\n// Initializes owner_thread_id_ and critical_section_ in static mutexes.\nvoid Mutex::ThreadSafeLazyInit() {\n  // Dynamic mutexes are initialized in the constructor.\n  if (type_ == kStatic) {\n    switch (\n        ::InterlockedCompareExchange(&critical_section_init_phase_, 1L, 0L)) {\n      case 0:\n        // If critical_section_init_phase_ was 0 before the exchange, we\n        // are the first to test it and need to perform the initialization.\n        owner_thread_id_ = 0;\n        {\n          // Use RAII to flag that following mem alloc is never deallocated.\n          MemoryIsNotDeallocated memory_is_not_deallocated;\n          critical_section_ = new CRITICAL_SECTION;\n        }\n        ::InitializeCriticalSection(critical_section_);\n        // Updates the critical_section_init_phase_ to 2 to signal\n        // initialization complete.\n        GTEST_CHECK_(::InterlockedCompareExchange(\n                          &critical_section_init_phase_, 2L, 1L) ==\n                      1L);\n        break;\n      case 1:\n        // Somebody else is already initializing the mutex; spin until they\n        // are done.\n        while (::InterlockedCompareExchange(&critical_section_init_phase_,\n                                            2L,\n                                            2L) != 2L) {\n          // Possibly yields the rest of the thread's time slice to other\n          // threads.\n          ::Sleep(0);\n        }\n        break;\n\n      case 2:\n        break;  // The mutex is already initialized and ready for use.\n\n      default:\n        GTEST_CHECK_(false)\n            << \"Unexpected value of critical_section_init_phase_ \"\n            << \"while initializing a static mutex.\";\n    }\n  }\n}\n\nnamespace {\n\nclass ThreadWithParamSupport : public ThreadWithParamBase {\n public:\n  static HANDLE CreateThread(Runnable* runnable,\n                             Notification* thread_can_start) {\n    ThreadMainParam* param = new ThreadMainParam(runnable, thread_can_start);\n    DWORD thread_id;\n    HANDLE thread_handle = ::CreateThread(\n        nullptr,  // Default security.\n        0,        // Default stack size.\n        &ThreadWithParamSupport::ThreadMain,\n        param,        // Parameter to ThreadMainStatic\n        0x0,          // Default creation flags.\n        &thread_id);  // Need a valid pointer for the call to work under Win98.\n    GTEST_CHECK_(thread_handle != nullptr)\n        << \"CreateThread failed with error \" << ::GetLastError() << \".\";\n    if (thread_handle == nullptr) {\n      delete param;\n    }\n    return thread_handle;\n  }\n\n private:\n  struct ThreadMainParam {\n    ThreadMainParam(Runnable* runnable, Notification* thread_can_start)\n        : runnable_(runnable),\n          thread_can_start_(thread_can_start) {\n    }\n    std::unique_ptr<Runnable> runnable_;\n    // Does not own.\n    Notification* thread_can_start_;\n  };\n\n  static DWORD WINAPI ThreadMain(void* ptr) {\n    // Transfers ownership.\n    std::unique_ptr<ThreadMainParam> param(static_cast<ThreadMainParam*>(ptr));\n    if (param->thread_can_start_ != nullptr)\n      param->thread_can_start_->WaitForNotification();\n    param->runnable_->Run();\n    return 0;\n  }\n\n  // Prohibit instantiation.\n  ThreadWithParamSupport();\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(ThreadWithParamSupport);\n};\n\n}  // namespace\n\nThreadWithParamBase::ThreadWithParamBase(Runnable *runnable,\n                                         Notification* thread_can_start)\n      : thread_(ThreadWithParamSupport::CreateThread(runnable,\n                                                     thread_can_start)) {\n}\n\nThreadWithParamBase::~ThreadWithParamBase() {\n  Join();\n}\n\nvoid ThreadWithParamBase::Join() {\n  GTEST_CHECK_(::WaitForSingleObject(thread_.Get(), INFINITE) == WAIT_OBJECT_0)\n      << \"Failed to join the thread with error \" << ::GetLastError() << \".\";\n}\n\n// Maps a thread to a set of ThreadIdToThreadLocals that have values\n// instantiated on that thread and notifies them when the thread exits.  A\n// ThreadLocal instance is expected to persist until all threads it has\n// values on have terminated.\nclass ThreadLocalRegistryImpl {\n public:\n  // Registers thread_local_instance as having value on the current thread.\n  // Returns a value that can be used to identify the thread from other threads.\n  static ThreadLocalValueHolderBase* GetValueOnCurrentThread(\n      const ThreadLocalBase* thread_local_instance) {\n    DWORD current_thread = ::GetCurrentThreadId();\n    MutexLock lock(&mutex_);\n    ThreadIdToThreadLocals* const thread_to_thread_locals =\n        GetThreadLocalsMapLocked();\n    ThreadIdToThreadLocals::iterator thread_local_pos =\n        thread_to_thread_locals->find(current_thread);\n    if (thread_local_pos == thread_to_thread_locals->end()) {\n      thread_local_pos = thread_to_thread_locals->insert(\n          std::make_pair(current_thread, ThreadLocalValues())).first;\n      StartWatcherThreadFor(current_thread);\n    }\n    ThreadLocalValues& thread_local_values = thread_local_pos->second;\n    ThreadLocalValues::iterator value_pos =\n        thread_local_values.find(thread_local_instance);\n    if (value_pos == thread_local_values.end()) {\n      value_pos =\n          thread_local_values\n              .insert(std::make_pair(\n                  thread_local_instance,\n                  std::shared_ptr<ThreadLocalValueHolderBase>(\n                      thread_local_instance->NewValueForCurrentThread())))\n              .first;\n    }\n    return value_pos->second.get();\n  }\n\n  static void OnThreadLocalDestroyed(\n      const ThreadLocalBase* thread_local_instance) {\n    std::vector<std::shared_ptr<ThreadLocalValueHolderBase> > value_holders;\n    // Clean up the ThreadLocalValues data structure while holding the lock, but\n    // defer the destruction of the ThreadLocalValueHolderBases.\n    {\n      MutexLock lock(&mutex_);\n      ThreadIdToThreadLocals* const thread_to_thread_locals =\n          GetThreadLocalsMapLocked();\n      for (ThreadIdToThreadLocals::iterator it =\n          thread_to_thread_locals->begin();\n          it != thread_to_thread_locals->end();\n          ++it) {\n        ThreadLocalValues& thread_local_values = it->second;\n        ThreadLocalValues::iterator value_pos =\n            thread_local_values.find(thread_local_instance);\n        if (value_pos != thread_local_values.end()) {\n          value_holders.push_back(value_pos->second);\n          thread_local_values.erase(value_pos);\n          // This 'if' can only be successful at most once, so theoretically we\n          // could break out of the loop here, but we don't bother doing so.\n        }\n      }\n    }\n    // Outside the lock, let the destructor for 'value_holders' deallocate the\n    // ThreadLocalValueHolderBases.\n  }\n\n  static void OnThreadExit(DWORD thread_id) {\n    GTEST_CHECK_(thread_id != 0) << ::GetLastError();\n    std::vector<std::shared_ptr<ThreadLocalValueHolderBase> > value_holders;\n    // Clean up the ThreadIdToThreadLocals data structure while holding the\n    // lock, but defer the destruction of the ThreadLocalValueHolderBases.\n    {\n      MutexLock lock(&mutex_);\n      ThreadIdToThreadLocals* const thread_to_thread_locals =\n          GetThreadLocalsMapLocked();\n      ThreadIdToThreadLocals::iterator thread_local_pos =\n          thread_to_thread_locals->find(thread_id);\n      if (thread_local_pos != thread_to_thread_locals->end()) {\n        ThreadLocalValues& thread_local_values = thread_local_pos->second;\n        for (ThreadLocalValues::iterator value_pos =\n            thread_local_values.begin();\n            value_pos != thread_local_values.end();\n            ++value_pos) {\n          value_holders.push_back(value_pos->second);\n        }\n        thread_to_thread_locals->erase(thread_local_pos);\n      }\n    }\n    // Outside the lock, let the destructor for 'value_holders' deallocate the\n    // ThreadLocalValueHolderBases.\n  }\n\n private:\n  // In a particular thread, maps a ThreadLocal object to its value.\n  typedef std::map<const ThreadLocalBase*,\n                   std::shared_ptr<ThreadLocalValueHolderBase> >\n      ThreadLocalValues;\n  // Stores all ThreadIdToThreadLocals having values in a thread, indexed by\n  // thread's ID.\n  typedef std::map<DWORD, ThreadLocalValues> ThreadIdToThreadLocals;\n\n  // Holds the thread id and thread handle that we pass from\n  // StartWatcherThreadFor to WatcherThreadFunc.\n  typedef std::pair<DWORD, HANDLE> ThreadIdAndHandle;\n\n  static void StartWatcherThreadFor(DWORD thread_id) {\n    // The returned handle will be kept in thread_map and closed by\n    // watcher_thread in WatcherThreadFunc.\n    HANDLE thread = ::OpenThread(SYNCHRONIZE | THREAD_QUERY_INFORMATION,\n                                 FALSE,\n                                 thread_id);\n    GTEST_CHECK_(thread != nullptr);\n    // We need to pass a valid thread ID pointer into CreateThread for it\n    // to work correctly under Win98.\n    DWORD watcher_thread_id;\n    HANDLE watcher_thread = ::CreateThread(\n        nullptr,  // Default security.\n        0,        // Default stack size\n        &ThreadLocalRegistryImpl::WatcherThreadFunc,\n        reinterpret_cast<LPVOID>(new ThreadIdAndHandle(thread_id, thread)),\n        CREATE_SUSPENDED, &watcher_thread_id);\n    GTEST_CHECK_(watcher_thread != nullptr);\n    // Give the watcher thread the same priority as ours to avoid being\n    // blocked by it.\n    ::SetThreadPriority(watcher_thread,\n                        ::GetThreadPriority(::GetCurrentThread()));\n    ::ResumeThread(watcher_thread);\n    ::CloseHandle(watcher_thread);\n  }\n\n  // Monitors exit from a given thread and notifies those\n  // ThreadIdToThreadLocals about thread termination.\n  static DWORD WINAPI WatcherThreadFunc(LPVOID param) {\n    const ThreadIdAndHandle* tah =\n        reinterpret_cast<const ThreadIdAndHandle*>(param);\n    GTEST_CHECK_(\n        ::WaitForSingleObject(tah->second, INFINITE) == WAIT_OBJECT_0);\n    OnThreadExit(tah->first);\n    ::CloseHandle(tah->second);\n    delete tah;\n    return 0;\n  }\n\n  // Returns map of thread local instances.\n  static ThreadIdToThreadLocals* GetThreadLocalsMapLocked() {\n    mutex_.AssertHeld();\n    MemoryIsNotDeallocated memory_is_not_deallocated;\n    static ThreadIdToThreadLocals* map = new ThreadIdToThreadLocals();\n    return map;\n  }\n\n  // Protects access to GetThreadLocalsMapLocked() and its return value.\n  static Mutex mutex_;\n  // Protects access to GetThreadMapLocked() and its return value.\n  static Mutex thread_map_mutex_;\n};\n\nMutex ThreadLocalRegistryImpl::mutex_(Mutex::kStaticMutex);\nMutex ThreadLocalRegistryImpl::thread_map_mutex_(Mutex::kStaticMutex);\n\nThreadLocalValueHolderBase* ThreadLocalRegistry::GetValueOnCurrentThread(\n      const ThreadLocalBase* thread_local_instance) {\n  return ThreadLocalRegistryImpl::GetValueOnCurrentThread(\n      thread_local_instance);\n}\n\nvoid ThreadLocalRegistry::OnThreadLocalDestroyed(\n      const ThreadLocalBase* thread_local_instance) {\n  ThreadLocalRegistryImpl::OnThreadLocalDestroyed(thread_local_instance);\n}\n\n#endif  // GTEST_IS_THREADSAFE && GTEST_OS_WINDOWS\n\n#if GTEST_USES_POSIX_RE\n\n// Implements RE.  Currently only needed for death tests.\n\nRE::~RE() {\n  if (is_valid_) {\n    // regfree'ing an invalid regex might crash because the content\n    // of the regex is undefined. Since the regex's are essentially\n    // the same, one cannot be valid (or invalid) without the other\n    // being so too.\n    regfree(&partial_regex_);\n    regfree(&full_regex_);\n  }\n  free(const_cast<char*>(pattern_));\n}\n\n// Returns true iff regular expression re matches the entire str.\nbool RE::FullMatch(const char* str, const RE& re) {\n  if (!re.is_valid_) return false;\n\n  regmatch_t match;\n  return regexec(&re.full_regex_, str, 1, &match, 0) == 0;\n}\n\n// Returns true iff regular expression re matches a substring of str\n// (including str itself).\nbool RE::PartialMatch(const char* str, const RE& re) {\n  if (!re.is_valid_) return false;\n\n  regmatch_t match;\n  return regexec(&re.partial_regex_, str, 1, &match, 0) == 0;\n}\n\n// Initializes an RE from its string representation.\nvoid RE::Init(const char* regex) {\n  pattern_ = posix::StrDup(regex);\n\n  // Reserves enough bytes to hold the regular expression used for a\n  // full match.\n  const size_t full_regex_len = strlen(regex) + 10;\n  char* const full_pattern = new char[full_regex_len];\n\n  snprintf(full_pattern, full_regex_len, \"^(%s)$\", regex);\n  is_valid_ = regcomp(&full_regex_, full_pattern, REG_EXTENDED) == 0;\n  // We want to call regcomp(&partial_regex_, ...) even if the\n  // previous expression returns false.  Otherwise partial_regex_ may\n  // not be properly initialized can may cause trouble when it's\n  // freed.\n  //\n  // Some implementation of POSIX regex (e.g. on at least some\n  // versions of Cygwin) doesn't accept the empty string as a valid\n  // regex.  We change it to an equivalent form \"()\" to be safe.\n  if (is_valid_) {\n    const char* const partial_regex = (*regex == '\\0') ? \"()\" : regex;\n    is_valid_ = regcomp(&partial_regex_, partial_regex, REG_EXTENDED) == 0;\n  }\n  EXPECT_TRUE(is_valid_)\n      << \"Regular expression \\\"\" << regex\n      << \"\\\" is not a valid POSIX Extended regular expression.\";\n\n  delete[] full_pattern;\n}\n\n#elif GTEST_USES_SIMPLE_RE\n\n// Returns true iff ch appears anywhere in str (excluding the\n// terminating '\\0' character).\nbool IsInSet(char ch, const char* str) {\n  return ch != '\\0' && strchr(str, ch) != nullptr;\n}\n\n// Returns true iff ch belongs to the given classification.  Unlike\n// similar functions in <ctype.h>, these aren't affected by the\n// current locale.\nbool IsAsciiDigit(char ch) { return '0' <= ch && ch <= '9'; }\nbool IsAsciiPunct(char ch) {\n  return IsInSet(ch, \"^-!\\\"#$%&'()*+,./:;<=>?@[\\\\]_`{|}~\");\n}\nbool IsRepeat(char ch) { return IsInSet(ch, \"?*+\"); }\nbool IsAsciiWhiteSpace(char ch) { return IsInSet(ch, \" \\f\\n\\r\\t\\v\"); }\nbool IsAsciiWordChar(char ch) {\n  return ('a' <= ch && ch <= 'z') || ('A' <= ch && ch <= 'Z') ||\n      ('0' <= ch && ch <= '9') || ch == '_';\n}\n\n// Returns true iff \"\\\\c\" is a supported escape sequence.\nbool IsValidEscape(char c) {\n  return (IsAsciiPunct(c) || IsInSet(c, \"dDfnrsStvwW\"));\n}\n\n// Returns true iff the given atom (specified by escaped and pattern)\n// matches ch.  The result is undefined if the atom is invalid.\nbool AtomMatchesChar(bool escaped, char pattern_char, char ch) {\n  if (escaped) {  // \"\\\\p\" where p is pattern_char.\n    switch (pattern_char) {\n      case 'd': return IsAsciiDigit(ch);\n      case 'D': return !IsAsciiDigit(ch);\n      case 'f': return ch == '\\f';\n      case 'n': return ch == '\\n';\n      case 'r': return ch == '\\r';\n      case 's': return IsAsciiWhiteSpace(ch);\n      case 'S': return !IsAsciiWhiteSpace(ch);\n      case 't': return ch == '\\t';\n      case 'v': return ch == '\\v';\n      case 'w': return IsAsciiWordChar(ch);\n      case 'W': return !IsAsciiWordChar(ch);\n    }\n    return IsAsciiPunct(pattern_char) && pattern_char == ch;\n  }\n\n  return (pattern_char == '.' && ch != '\\n') || pattern_char == ch;\n}\n\n// Helper function used by ValidateRegex() to format error messages.\nstatic std::string FormatRegexSyntaxError(const char* regex, int index) {\n  return (Message() << \"Syntax error at index \" << index\n          << \" in simple regular expression \\\"\" << regex << \"\\\": \").GetString();\n}\n\n// Generates non-fatal failures and returns false if regex is invalid;\n// otherwise returns true.\nbool ValidateRegex(const char* regex) {\n  if (regex == nullptr) {\n    ADD_FAILURE() << \"NULL is not a valid simple regular expression.\";\n    return false;\n  }\n\n  bool is_valid = true;\n\n  // True iff ?, *, or + can follow the previous atom.\n  bool prev_repeatable = false;\n  for (int i = 0; regex[i]; i++) {\n    if (regex[i] == '\\\\') {  // An escape sequence\n      i++;\n      if (regex[i] == '\\0') {\n        ADD_FAILURE() << FormatRegexSyntaxError(regex, i - 1)\n                      << \"'\\\\' cannot appear at the end.\";\n        return false;\n      }\n\n      if (!IsValidEscape(regex[i])) {\n        ADD_FAILURE() << FormatRegexSyntaxError(regex, i - 1)\n                      << \"invalid escape sequence \\\"\\\\\" << regex[i] << \"\\\".\";\n        is_valid = false;\n      }\n      prev_repeatable = true;\n    } else {  // Not an escape sequence.\n      const char ch = regex[i];\n\n      if (ch == '^' && i > 0) {\n        ADD_FAILURE() << FormatRegexSyntaxError(regex, i)\n                      << \"'^' can only appear at the beginning.\";\n        is_valid = false;\n      } else if (ch == '$' && regex[i + 1] != '\\0') {\n        ADD_FAILURE() << FormatRegexSyntaxError(regex, i)\n                      << \"'$' can only appear at the end.\";\n        is_valid = false;\n      } else if (IsInSet(ch, \"()[]{}|\")) {\n        ADD_FAILURE() << FormatRegexSyntaxError(regex, i)\n                      << \"'\" << ch << \"' is unsupported.\";\n        is_valid = false;\n      } else if (IsRepeat(ch) && !prev_repeatable) {\n        ADD_FAILURE() << FormatRegexSyntaxError(regex, i)\n                      << \"'\" << ch << \"' can only follow a repeatable token.\";\n        is_valid = false;\n      }\n\n      prev_repeatable = !IsInSet(ch, \"^$?*+\");\n    }\n  }\n\n  return is_valid;\n}\n\n// Matches a repeated regex atom followed by a valid simple regular\n// expression.  The regex atom is defined as c if escaped is false,\n// or \\c otherwise.  repeat is the repetition meta character (?, *,\n// or +).  The behavior is undefined if str contains too many\n// characters to be indexable by size_t, in which case the test will\n// probably time out anyway.  We are fine with this limitation as\n// std::string has it too.\nbool MatchRepetitionAndRegexAtHead(\n    bool escaped, char c, char repeat, const char* regex,\n    const char* str) {\n  const size_t min_count = (repeat == '+') ? 1 : 0;\n  const size_t max_count = (repeat == '?') ? 1 :\n      static_cast<size_t>(-1) - 1;\n  // We cannot call numeric_limits::max() as it conflicts with the\n  // max() macro on Windows.\n\n  for (size_t i = 0; i <= max_count; ++i) {\n    // We know that the atom matches each of the first i characters in str.\n    if (i >= min_count && MatchRegexAtHead(regex, str + i)) {\n      // We have enough matches at the head, and the tail matches too.\n      // Since we only care about *whether* the pattern matches str\n      // (as opposed to *how* it matches), there is no need to find a\n      // greedy match.\n      return true;\n    }\n    if (str[i] == '\\0' || !AtomMatchesChar(escaped, c, str[i]))\n      return false;\n  }\n  return false;\n}\n\n// Returns true iff regex matches a prefix of str.  regex must be a\n// valid simple regular expression and not start with \"^\", or the\n// result is undefined.\nbool MatchRegexAtHead(const char* regex, const char* str) {\n  if (*regex == '\\0')  // An empty regex matches a prefix of anything.\n    return true;\n\n  // \"$\" only matches the end of a string.  Note that regex being\n  // valid guarantees that there's nothing after \"$\" in it.\n  if (*regex == '$')\n    return *str == '\\0';\n\n  // Is the first thing in regex an escape sequence?\n  const bool escaped = *regex == '\\\\';\n  if (escaped)\n    ++regex;\n  if (IsRepeat(regex[1])) {\n    // MatchRepetitionAndRegexAtHead() calls MatchRegexAtHead(), so\n    // here's an indirect recursion.  It terminates as the regex gets\n    // shorter in each recursion.\n    return MatchRepetitionAndRegexAtHead(\n        escaped, regex[0], regex[1], regex + 2, str);\n  } else {\n    // regex isn't empty, isn't \"$\", and doesn't start with a\n    // repetition.  We match the first atom of regex with the first\n    // character of str and recurse.\n    return (*str != '\\0') && AtomMatchesChar(escaped, *regex, *str) &&\n        MatchRegexAtHead(regex + 1, str + 1);\n  }\n}\n\n// Returns true iff regex matches any substring of str.  regex must be\n// a valid simple regular expression, or the result is undefined.\n//\n// The algorithm is recursive, but the recursion depth doesn't exceed\n// the regex length, so we won't need to worry about running out of\n// stack space normally.  In rare cases the time complexity can be\n// exponential with respect to the regex length + the string length,\n// but usually it's must faster (often close to linear).\nbool MatchRegexAnywhere(const char* regex, const char* str) {\n  if (regex == nullptr || str == nullptr) return false;\n\n  if (*regex == '^')\n    return MatchRegexAtHead(regex + 1, str);\n\n  // A successful match can be anywhere in str.\n  do {\n    if (MatchRegexAtHead(regex, str))\n      return true;\n  } while (*str++ != '\\0');\n  return false;\n}\n\n// Implements the RE class.\n\nRE::~RE() {\n  free(const_cast<char*>(pattern_));\n  free(const_cast<char*>(full_pattern_));\n}\n\n// Returns true iff regular expression re matches the entire str.\nbool RE::FullMatch(const char* str, const RE& re) {\n  return re.is_valid_ && MatchRegexAnywhere(re.full_pattern_, str);\n}\n\n// Returns true iff regular expression re matches a substring of str\n// (including str itself).\nbool RE::PartialMatch(const char* str, const RE& re) {\n  return re.is_valid_ && MatchRegexAnywhere(re.pattern_, str);\n}\n\n// Initializes an RE from its string representation.\nvoid RE::Init(const char* regex) {\n  pattern_ = full_pattern_ = nullptr;\n  if (regex != nullptr) {\n    pattern_ = posix::StrDup(regex);\n  }\n\n  is_valid_ = ValidateRegex(regex);\n  if (!is_valid_) {\n    // No need to calculate the full pattern when the regex is invalid.\n    return;\n  }\n\n  const size_t len = strlen(regex);\n  // Reserves enough bytes to hold the regular expression used for a\n  // full match: we need space to prepend a '^', append a '$', and\n  // terminate the string with '\\0'.\n  char* buffer = static_cast<char*>(malloc(len + 3));\n  full_pattern_ = buffer;\n\n  if (*regex != '^')\n    *buffer++ = '^';  // Makes sure full_pattern_ starts with '^'.\n\n  // We don't use snprintf or strncpy, as they trigger a warning when\n  // compiled with VC++ 8.0.\n  memcpy(buffer, regex, len);\n  buffer += len;\n\n  if (len == 0 || regex[len - 1] != '$')\n    *buffer++ = '$';  // Makes sure full_pattern_ ends with '$'.\n\n  *buffer = '\\0';\n}\n\n#endif  // GTEST_USES_POSIX_RE\n\nconst char kUnknownFile[] = \"unknown file\";\n\n// Formats a source file path and a line number as they would appear\n// in an error message from the compiler used to compile this code.\nGTEST_API_ ::std::string FormatFileLocation(const char* file, int line) {\n  const std::string file_name(file == nullptr ? kUnknownFile : file);\n\n  if (line < 0) {\n    return file_name + \":\";\n  }\n#ifdef _MSC_VER\n  return file_name + \"(\" + StreamableToString(line) + \"):\";\n#else\n  return file_name + \":\" + StreamableToString(line) + \":\";\n#endif  // _MSC_VER\n}\n\n// Formats a file location for compiler-independent XML output.\n// Although this function is not platform dependent, we put it next to\n// FormatFileLocation in order to contrast the two functions.\n// Note that FormatCompilerIndependentFileLocation() does NOT append colon\n// to the file location it produces, unlike FormatFileLocation().\nGTEST_API_ ::std::string FormatCompilerIndependentFileLocation(\n    const char* file, int line) {\n  const std::string file_name(file == nullptr ? kUnknownFile : file);\n\n  if (line < 0)\n    return file_name;\n  else\n    return file_name + \":\" + StreamableToString(line);\n}\n\nGTestLog::GTestLog(GTestLogSeverity severity, const char* file, int line)\n    : severity_(severity) {\n  const char* const marker =\n      severity == GTEST_INFO ?    \"[  INFO ]\" :\n      severity == GTEST_WARNING ? \"[WARNING]\" :\n      severity == GTEST_ERROR ?   \"[ ERROR ]\" : \"[ FATAL ]\";\n  GetStream() << ::std::endl << marker << \" \"\n              << FormatFileLocation(file, line).c_str() << \": \";\n}\n\n// Flushes the buffers and, if severity is GTEST_FATAL, aborts the program.\nGTestLog::~GTestLog() {\n  GetStream() << ::std::endl;\n  if (severity_ == GTEST_FATAL) {\n    fflush(stderr);\n    posix::Abort();\n  }\n}\n\n// Disable Microsoft deprecation warnings for POSIX functions called from\n// this class (creat, dup, dup2, and close)\nGTEST_DISABLE_MSC_DEPRECATED_PUSH_()\n\n#if GTEST_HAS_STREAM_REDIRECTION\n\n// Object that captures an output stream (stdout/stderr).\nclass CapturedStream {\n public:\n  // The ctor redirects the stream to a temporary file.\n  explicit CapturedStream(int fd) : fd_(fd), uncaptured_fd_(dup(fd)) {\n# if GTEST_OS_WINDOWS\n    char temp_dir_path[MAX_PATH + 1] = { '\\0' };  // NOLINT\n    char temp_file_path[MAX_PATH + 1] = { '\\0' };  // NOLINT\n\n    ::GetTempPathA(sizeof(temp_dir_path), temp_dir_path);\n    const UINT success = ::GetTempFileNameA(temp_dir_path,\n                                            \"gtest_redir\",\n                                            0,  // Generate unique file name.\n                                            temp_file_path);\n    GTEST_CHECK_(success != 0)\n        << \"Unable to create a temporary file in \" << temp_dir_path;\n    const int captured_fd = creat(temp_file_path, _S_IREAD | _S_IWRITE);\n    GTEST_CHECK_(captured_fd != -1) << \"Unable to open temporary file \"\n                                    << temp_file_path;\n    filename_ = temp_file_path;\n# else\n    // There's no guarantee that a test has write access to the current\n    // directory, so we create the temporary file in the /tmp directory\n    // instead. We use /tmp on most systems, and /sdcard on Android.\n    // That's because Android doesn't have /tmp.\n#  if GTEST_OS_LINUX_ANDROID\n    // Note: Android applications are expected to call the framework's\n    // Context.getExternalStorageDirectory() method through JNI to get\n    // the location of the world-writable SD Card directory. However,\n    // this requires a Context handle, which cannot be retrieved\n    // globally from native code. Doing so also precludes running the\n    // code as part of a regular standalone executable, which doesn't\n    // run in a Dalvik process (e.g. when running it through 'adb shell').\n    //\n    // The location /sdcard is directly accessible from native code\n    // and is the only location (unofficially) supported by the Android\n    // team. It's generally a symlink to the real SD Card mount point\n    // which can be /mnt/sdcard, /mnt/sdcard0, /system/media/sdcard, or\n    // other OEM-customized locations. Never rely on these, and always\n    // use /sdcard.\n    char name_template[] = \"/sdcard/gtest_captured_stream.XXXXXX\";\n#  else\n    char name_template[] = \"/tmp/captured_stream.XXXXXX\";\n#  endif  // GTEST_OS_LINUX_ANDROID\n    const int captured_fd = mkstemp(name_template);\n    filename_ = name_template;\n# endif  // GTEST_OS_WINDOWS\n    fflush(nullptr);\n    dup2(captured_fd, fd_);\n    close(captured_fd);\n  }\n\n  ~CapturedStream() {\n    remove(filename_.c_str());\n  }\n\n  std::string GetCapturedString() {\n    if (uncaptured_fd_ != -1) {\n      // Restores the original stream.\n      fflush(nullptr);\n      dup2(uncaptured_fd_, fd_);\n      close(uncaptured_fd_);\n      uncaptured_fd_ = -1;\n    }\n\n    FILE* const file = posix::FOpen(filename_.c_str(), \"r\");\n    const std::string content = ReadEntireFile(file);\n    posix::FClose(file);\n    return content;\n  }\n\n private:\n  const int fd_;  // A stream to capture.\n  int uncaptured_fd_;\n  // Name of the temporary file holding the stderr output.\n  ::std::string filename_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(CapturedStream);\n};\n\nGTEST_DISABLE_MSC_DEPRECATED_POP_()\n\nstatic CapturedStream* g_captured_stderr = nullptr;\nstatic CapturedStream* g_captured_stdout = nullptr;\n\n// Starts capturing an output stream (stdout/stderr).\nstatic void CaptureStream(int fd, const char* stream_name,\n                          CapturedStream** stream) {\n  if (*stream != nullptr) {\n    GTEST_LOG_(FATAL) << \"Only one \" << stream_name\n                      << \" capturer can exist at a time.\";\n  }\n  *stream = new CapturedStream(fd);\n}\n\n// Stops capturing the output stream and returns the captured string.\nstatic std::string GetCapturedStream(CapturedStream** captured_stream) {\n  const std::string content = (*captured_stream)->GetCapturedString();\n\n  delete *captured_stream;\n  *captured_stream = nullptr;\n\n  return content;\n}\n\n// Starts capturing stdout.\nvoid CaptureStdout() {\n  CaptureStream(kStdOutFileno, \"stdout\", &g_captured_stdout);\n}\n\n// Starts capturing stderr.\nvoid CaptureStderr() {\n  CaptureStream(kStdErrFileno, \"stderr\", &g_captured_stderr);\n}\n\n// Stops capturing stdout and returns the captured string.\nstd::string GetCapturedStdout() {\n  return GetCapturedStream(&g_captured_stdout);\n}\n\n// Stops capturing stderr and returns the captured string.\nstd::string GetCapturedStderr() {\n  return GetCapturedStream(&g_captured_stderr);\n}\n\n#endif  // GTEST_HAS_STREAM_REDIRECTION\n\n\n\n\n\nsize_t GetFileSize(FILE* file) {\n  fseek(file, 0, SEEK_END);\n  return static_cast<size_t>(ftell(file));\n}\n\nstd::string ReadEntireFile(FILE* file) {\n  const size_t file_size = GetFileSize(file);\n  char* const buffer = new char[file_size];\n\n  size_t bytes_last_read = 0;  // # of bytes read in the last fread()\n  size_t bytes_read = 0;       // # of bytes read so far\n\n  fseek(file, 0, SEEK_SET);\n\n  // Keeps reading the file until we cannot read further or the\n  // pre-determined file size is reached.\n  do {\n    bytes_last_read = fread(buffer+bytes_read, 1, file_size-bytes_read, file);\n    bytes_read += bytes_last_read;\n  } while (bytes_last_read > 0 && bytes_read < file_size);\n\n  const std::string content(buffer, bytes_read);\n  delete[] buffer;\n\n  return content;\n}\n\n#if GTEST_HAS_DEATH_TEST\nstatic const std::vector<std::string>* g_injected_test_argvs =\n    nullptr;  // Owned.\n\nstd::vector<std::string> GetInjectableArgvs() {\n  if (g_injected_test_argvs != nullptr) {\n    return *g_injected_test_argvs;\n  }\n  return GetArgvs();\n}\n\nvoid SetInjectableArgvs(const std::vector<std::string>* new_argvs) {\n  if (g_injected_test_argvs != new_argvs) delete g_injected_test_argvs;\n  g_injected_test_argvs = new_argvs;\n}\n\nvoid SetInjectableArgvs(const std::vector<std::string>& new_argvs) {\n  SetInjectableArgvs(\n      new std::vector<std::string>(new_argvs.begin(), new_argvs.end()));\n}\n\n#if GTEST_HAS_GLOBAL_STRING\nvoid SetInjectableArgvs(const std::vector< ::string>& new_argvs) {\n  SetInjectableArgvs(\n      new std::vector<std::string>(new_argvs.begin(), new_argvs.end()));\n}\n#endif  // GTEST_HAS_GLOBAL_STRING\n\nvoid ClearInjectableArgvs() {\n  delete g_injected_test_argvs;\n  g_injected_test_argvs = nullptr;\n}\n#endif  // GTEST_HAS_DEATH_TEST\n\n#if GTEST_OS_WINDOWS_MOBILE\nnamespace posix {\nvoid Abort() {\n  DebugBreak();\n  TerminateProcess(GetCurrentProcess(), 1);\n}\n}  // namespace posix\n#endif  // GTEST_OS_WINDOWS_MOBILE\n\n// Returns the name of the environment variable corresponding to the\n// given flag.  For example, FlagToEnvVar(\"foo\") will return\n// \"GTEST_FOO\" in the open-source version.\nstatic std::string FlagToEnvVar(const char* flag) {\n  const std::string full_flag =\n      (Message() << GTEST_FLAG_PREFIX_ << flag).GetString();\n\n  Message env_var;\n  for (size_t i = 0; i != full_flag.length(); i++) {\n    env_var << ToUpper(full_flag.c_str()[i]);\n  }\n\n  return env_var.GetString();\n}\n\n// Parses 'str' for a 32-bit signed integer.  If successful, writes\n// the result to *value and returns true; otherwise leaves *value\n// unchanged and returns false.\nbool ParseInt32(const Message& src_text, const char* str, Int32* value) {\n  // Parses the environment variable as a decimal integer.\n  char* end = nullptr;\n  const long long_value = strtol(str, &end, 10);  // NOLINT\n\n  // Has strtol() consumed all characters in the string?\n  if (*end != '\\0') {\n    // No - an invalid character was encountered.\n    Message msg;\n    msg << \"WARNING: \" << src_text\n        << \" is expected to be a 32-bit integer, but actually\"\n        << \" has value \\\"\" << str << \"\\\".\\n\";\n    printf(\"%s\", msg.GetString().c_str());\n    fflush(stdout);\n    return false;\n  }\n\n  // Is the parsed value in the range of an Int32?\n  const Int32 result = static_cast<Int32>(long_value);\n  if (long_value == LONG_MAX || long_value == LONG_MIN ||\n      // The parsed value overflows as a long.  (strtol() returns\n      // LONG_MAX or LONG_MIN when the input overflows.)\n      result != long_value\n      // The parsed value overflows as an Int32.\n      ) {\n    Message msg;\n    msg << \"WARNING: \" << src_text\n        << \" is expected to be a 32-bit integer, but actually\"\n        << \" has value \" << str << \", which overflows.\\n\";\n    printf(\"%s\", msg.GetString().c_str());\n    fflush(stdout);\n    return false;\n  }\n\n  *value = result;\n  return true;\n}\n\n// Reads and returns the Boolean environment variable corresponding to\n// the given flag; if it's not set, returns default_value.\n//\n// The value is considered true iff it's not \"0\".\nbool BoolFromGTestEnv(const char* flag, bool default_value) {\n#if defined(GTEST_GET_BOOL_FROM_ENV_)\n  return GTEST_GET_BOOL_FROM_ENV_(flag, default_value);\n#else\n  const std::string env_var = FlagToEnvVar(flag);\n  const char* const string_value = posix::GetEnv(env_var.c_str());\n  return string_value == nullptr ? default_value\n                                 : strcmp(string_value, \"0\") != 0;\n#endif  // defined(GTEST_GET_BOOL_FROM_ENV_)\n}\n\n// Reads and returns a 32-bit integer stored in the environment\n// variable corresponding to the given flag; if it isn't set or\n// doesn't represent a valid 32-bit integer, returns default_value.\nInt32 Int32FromGTestEnv(const char* flag, Int32 default_value) {\n#if defined(GTEST_GET_INT32_FROM_ENV_)\n  return GTEST_GET_INT32_FROM_ENV_(flag, default_value);\n#else\n  const std::string env_var = FlagToEnvVar(flag);\n  const char* const string_value = posix::GetEnv(env_var.c_str());\n  if (string_value == nullptr) {\n    // The environment variable is not set.\n    return default_value;\n  }\n\n  Int32 result = default_value;\n  if (!ParseInt32(Message() << \"Environment variable \" << env_var,\n                  string_value, &result)) {\n    printf(\"The default value %s is used.\\n\",\n           (Message() << default_value).GetString().c_str());\n    fflush(stdout);\n    return default_value;\n  }\n\n  return result;\n#endif  // defined(GTEST_GET_INT32_FROM_ENV_)\n}\n\n// As a special case for the 'output' flag, if GTEST_OUTPUT is not\n// set, we look for XML_OUTPUT_FILE, which is set by the Bazel build\n// system.  The value of XML_OUTPUT_FILE is a filename without the\n// \"xml:\" prefix of GTEST_OUTPUT.\n// Note that this is meant to be called at the call site so it does\n// not check that the flag is 'output'\n// In essence this checks an env variable called XML_OUTPUT_FILE\n// and if it is set we prepend \"xml:\" to its value, if it not set we return \"\"\nstd::string OutputFlagAlsoCheckEnvVar(){\n  std::string default_value_for_output_flag = \"\";\n  const char* xml_output_file_env = posix::GetEnv(\"XML_OUTPUT_FILE\");\n  if (nullptr != xml_output_file_env) {\n    default_value_for_output_flag = std::string(\"xml:\") + xml_output_file_env;\n  }\n  return default_value_for_output_flag;\n}\n\n// Reads and returns the string environment variable corresponding to\n// the given flag; if it's not set, returns default_value.\nconst char* StringFromGTestEnv(const char* flag, const char* default_value) {\n#if defined(GTEST_GET_STRING_FROM_ENV_)\n  return GTEST_GET_STRING_FROM_ENV_(flag, default_value);\n#else\n  const std::string env_var = FlagToEnvVar(flag);\n  const char* const value = posix::GetEnv(env_var.c_str());\n  return value == nullptr ? default_value : value;\n#endif  // defined(GTEST_GET_STRING_FROM_ENV_)\n}\n\n}  // namespace internal\n}  // namespace testing\n// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n// Google Test - The Google C++ Testing and Mocking Framework\n//\n// This file implements a universal value printer that can print a\n// value of any type T:\n//\n//   void ::testing::internal::UniversalPrinter<T>::Print(value, ostream_ptr);\n//\n// It uses the << operator when possible, and prints the bytes in the\n// object otherwise.  A user can override its behavior for a class\n// type Foo by defining either operator<<(::std::ostream&, const Foo&)\n// or void PrintTo(const Foo&, ::std::ostream*) in the namespace that\n// defines Foo.\n\n#include <stdio.h>\n#include <cctype>\n#include <cwchar>\n#include <ostream>  // NOLINT\n#include <string>\n\nnamespace testing {\n\nnamespace {\n\nusing ::std::ostream;\n\n// Prints a segment of bytes in the given object.\nGTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_\nGTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_\nGTEST_ATTRIBUTE_NO_SANITIZE_THREAD_\nvoid PrintByteSegmentInObjectTo(const unsigned char* obj_bytes, size_t start,\n                                size_t count, ostream* os) {\n  char text[5] = \"\";\n  for (size_t i = 0; i != count; i++) {\n    const size_t j = start + i;\n    if (i != 0) {\n      // Organizes the bytes into groups of 2 for easy parsing by\n      // human.\n      if ((j % 2) == 0)\n        *os << ' ';\n      else\n        *os << '-';\n    }\n    GTEST_SNPRINTF_(text, sizeof(text), \"%02X\", obj_bytes[j]);\n    *os << text;\n  }\n}\n\n// Prints the bytes in the given value to the given ostream.\nvoid PrintBytesInObjectToImpl(const unsigned char* obj_bytes, size_t count,\n                              ostream* os) {\n  // Tells the user how big the object is.\n  *os << count << \"-byte object <\";\n\n  const size_t kThreshold = 132;\n  const size_t kChunkSize = 64;\n  // If the object size is bigger than kThreshold, we'll have to omit\n  // some details by printing only the first and the last kChunkSize\n  // bytes.\n  if (count < kThreshold) {\n    PrintByteSegmentInObjectTo(obj_bytes, 0, count, os);\n  } else {\n    PrintByteSegmentInObjectTo(obj_bytes, 0, kChunkSize, os);\n    *os << \" ... \";\n    // Rounds up to 2-byte boundary.\n    const size_t resume_pos = (count - kChunkSize + 1)/2*2;\n    PrintByteSegmentInObjectTo(obj_bytes, resume_pos, count - resume_pos, os);\n  }\n  *os << \">\";\n}\n\n}  // namespace\n\nnamespace internal2 {\n\n// Delegates to PrintBytesInObjectToImpl() to print the bytes in the\n// given object.  The delegation simplifies the implementation, which\n// uses the << operator and thus is easier done outside of the\n// ::testing::internal namespace, which contains a << operator that\n// sometimes conflicts with the one in STL.\nvoid PrintBytesInObjectTo(const unsigned char* obj_bytes, size_t count,\n                          ostream* os) {\n  PrintBytesInObjectToImpl(obj_bytes, count, os);\n}\n\n}  // namespace internal2\n\nnamespace internal {\n\n// Depending on the value of a char (or wchar_t), we print it in one\n// of three formats:\n//   - as is if it's a printable ASCII (e.g. 'a', '2', ' '),\n//   - as a hexadecimal escape sequence (e.g. '\\x7F'), or\n//   - as a special escape sequence (e.g. '\\r', '\\n').\nenum CharFormat {\n  kAsIs,\n  kHexEscape,\n  kSpecialEscape\n};\n\n// Returns true if c is a printable ASCII character.  We test the\n// value of c directly instead of calling isprint(), which is buggy on\n// Windows Mobile.\ninline bool IsPrintableAscii(wchar_t c) {\n  return 0x20 <= c && c <= 0x7E;\n}\n\n// Prints a wide or narrow char c as a character literal without the\n// quotes, escaping it when necessary; returns how c was formatted.\n// The template argument UnsignedChar is the unsigned version of Char,\n// which is the type of c.\ntemplate <typename UnsignedChar, typename Char>\nstatic CharFormat PrintAsCharLiteralTo(Char c, ostream* os) {\n  switch (static_cast<wchar_t>(c)) {\n    case L'\\0':\n      *os << \"\\\\0\";\n      break;\n    case L'\\'':\n      *os << \"\\\\'\";\n      break;\n    case L'\\\\':\n      *os << \"\\\\\\\\\";\n      break;\n    case L'\\a':\n      *os << \"\\\\a\";\n      break;\n    case L'\\b':\n      *os << \"\\\\b\";\n      break;\n    case L'\\f':\n      *os << \"\\\\f\";\n      break;\n    case L'\\n':\n      *os << \"\\\\n\";\n      break;\n    case L'\\r':\n      *os << \"\\\\r\";\n      break;\n    case L'\\t':\n      *os << \"\\\\t\";\n      break;\n    case L'\\v':\n      *os << \"\\\\v\";\n      break;\n    default:\n      if (IsPrintableAscii(c)) {\n        *os << static_cast<char>(c);\n        return kAsIs;\n      } else {\n        ostream::fmtflags flags = os->flags();\n        *os << \"\\\\x\" << std::hex << std::uppercase\n            << static_cast<int>(static_cast<UnsignedChar>(c));\n        os->flags(flags);\n        return kHexEscape;\n      }\n  }\n  return kSpecialEscape;\n}\n\n// Prints a wchar_t c as if it's part of a string literal, escaping it when\n// necessary; returns how c was formatted.\nstatic CharFormat PrintAsStringLiteralTo(wchar_t c, ostream* os) {\n  switch (c) {\n    case L'\\'':\n      *os << \"'\";\n      return kAsIs;\n    case L'\"':\n      *os << \"\\\\\\\"\";\n      return kSpecialEscape;\n    default:\n      return PrintAsCharLiteralTo<wchar_t>(c, os);\n  }\n}\n\n// Prints a char c as if it's part of a string literal, escaping it when\n// necessary; returns how c was formatted.\nstatic CharFormat PrintAsStringLiteralTo(char c, ostream* os) {\n  return PrintAsStringLiteralTo(\n      static_cast<wchar_t>(static_cast<unsigned char>(c)), os);\n}\n\n// Prints a wide or narrow character c and its code.  '\\0' is printed\n// as \"'\\\\0'\", other unprintable characters are also properly escaped\n// using the standard C++ escape sequence.  The template argument\n// UnsignedChar is the unsigned version of Char, which is the type of c.\ntemplate <typename UnsignedChar, typename Char>\nvoid PrintCharAndCodeTo(Char c, ostream* os) {\n  // First, print c as a literal in the most readable form we can find.\n  *os << ((sizeof(c) > 1) ? \"L'\" : \"'\");\n  const CharFormat format = PrintAsCharLiteralTo<UnsignedChar>(c, os);\n  *os << \"'\";\n\n  // To aid user debugging, we also print c's code in decimal, unless\n  // it's 0 (in which case c was printed as '\\\\0', making the code\n  // obvious).\n  if (c == 0)\n    return;\n  *os << \" (\" << static_cast<int>(c);\n\n  // For more convenience, we print c's code again in hexadecimal,\n  // unless c was already printed in the form '\\x##' or the code is in\n  // [1, 9].\n  if (format == kHexEscape || (1 <= c && c <= 9)) {\n    // Do nothing.\n  } else {\n    *os << \", 0x\" << String::FormatHexInt(static_cast<UnsignedChar>(c));\n  }\n  *os << \")\";\n}\n\nvoid PrintTo(unsigned char c, ::std::ostream* os) {\n  PrintCharAndCodeTo<unsigned char>(c, os);\n}\nvoid PrintTo(signed char c, ::std::ostream* os) {\n  PrintCharAndCodeTo<unsigned char>(c, os);\n}\n\n// Prints a wchar_t as a symbol if it is printable or as its internal\n// code otherwise and also as its code.  L'\\0' is printed as \"L'\\\\0'\".\nvoid PrintTo(wchar_t wc, ostream* os) {\n  PrintCharAndCodeTo<wchar_t>(wc, os);\n}\n\n// Prints the given array of characters to the ostream.  CharType must be either\n// char or wchar_t.\n// The array starts at begin, the length is len, it may include '\\0' characters\n// and may not be NUL-terminated.\ntemplate <typename CharType>\nGTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_\nGTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_\nGTEST_ATTRIBUTE_NO_SANITIZE_THREAD_\nstatic CharFormat PrintCharsAsStringTo(\n    const CharType* begin, size_t len, ostream* os) {\n  const char* const kQuoteBegin = sizeof(CharType) == 1 ? \"\\\"\" : \"L\\\"\";\n  *os << kQuoteBegin;\n  bool is_previous_hex = false;\n  CharFormat print_format = kAsIs;\n  for (size_t index = 0; index < len; ++index) {\n    const CharType cur = begin[index];\n    if (is_previous_hex && IsXDigit(cur)) {\n      // Previous character is of '\\x..' form and this character can be\n      // interpreted as another hexadecimal digit in its number. Break string to\n      // disambiguate.\n      *os << \"\\\" \" << kQuoteBegin;\n    }\n    is_previous_hex = PrintAsStringLiteralTo(cur, os) == kHexEscape;\n    // Remember if any characters required hex escaping.\n    if (is_previous_hex) {\n      print_format = kHexEscape;\n    }\n  }\n  *os << \"\\\"\";\n  return print_format;\n}\n\n// Prints a (const) char/wchar_t array of 'len' elements, starting at address\n// 'begin'.  CharType must be either char or wchar_t.\ntemplate <typename CharType>\nGTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_\nGTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_\nGTEST_ATTRIBUTE_NO_SANITIZE_THREAD_\nstatic void UniversalPrintCharArray(\n    const CharType* begin, size_t len, ostream* os) {\n  // The code\n  //   const char kFoo[] = \"foo\";\n  // generates an array of 4, not 3, elements, with the last one being '\\0'.\n  //\n  // Therefore when printing a char array, we don't print the last element if\n  // it's '\\0', such that the output matches the string literal as it's\n  // written in the source code.\n  if (len > 0 && begin[len - 1] == '\\0') {\n    PrintCharsAsStringTo(begin, len - 1, os);\n    return;\n  }\n\n  // If, however, the last element in the array is not '\\0', e.g.\n  //    const char kFoo[] = { 'f', 'o', 'o' };\n  // we must print the entire array.  We also print a message to indicate\n  // that the array is not NUL-terminated.\n  PrintCharsAsStringTo(begin, len, os);\n  *os << \" (no terminating NUL)\";\n}\n\n// Prints a (const) char array of 'len' elements, starting at address 'begin'.\nvoid UniversalPrintArray(const char* begin, size_t len, ostream* os) {\n  UniversalPrintCharArray(begin, len, os);\n}\n\n// Prints a (const) wchar_t array of 'len' elements, starting at address\n// 'begin'.\nvoid UniversalPrintArray(const wchar_t* begin, size_t len, ostream* os) {\n  UniversalPrintCharArray(begin, len, os);\n}\n\n// Prints the given C string to the ostream.\nvoid PrintTo(const char* s, ostream* os) {\n  if (s == nullptr) {\n    *os << \"NULL\";\n  } else {\n    *os << ImplicitCast_<const void*>(s) << \" pointing to \";\n    PrintCharsAsStringTo(s, strlen(s), os);\n  }\n}\n\n// MSVC compiler can be configured to define whar_t as a typedef\n// of unsigned short. Defining an overload for const wchar_t* in that case\n// would cause pointers to unsigned shorts be printed as wide strings,\n// possibly accessing more memory than intended and causing invalid\n// memory accesses. MSVC defines _NATIVE_WCHAR_T_DEFINED symbol when\n// wchar_t is implemented as a native type.\n#if !defined(_MSC_VER) || defined(_NATIVE_WCHAR_T_DEFINED)\n// Prints the given wide C string to the ostream.\nvoid PrintTo(const wchar_t* s, ostream* os) {\n  if (s == nullptr) {\n    *os << \"NULL\";\n  } else {\n    *os << ImplicitCast_<const void*>(s) << \" pointing to \";\n    PrintCharsAsStringTo(s, wcslen(s), os);\n  }\n}\n#endif  // wchar_t is native\n\nnamespace {\n\nbool ContainsUnprintableControlCodes(const char* str, size_t length) {\n  const unsigned char *s = reinterpret_cast<const unsigned char *>(str);\n\n  for (size_t i = 0; i < length; i++) {\n    unsigned char ch = *s++;\n    if (std::iscntrl(ch)) {\n        switch (ch) {\n        case '\\t':\n        case '\\n':\n        case '\\r':\n          break;\n        default:\n          return true;\n        }\n      }\n  }\n  return false;\n}\n\nbool IsUTF8TrailByte(unsigned char t) { return 0x80 <= t && t<= 0xbf; }\n\nbool IsValidUTF8(const char* str, size_t length) {\n  const unsigned char *s = reinterpret_cast<const unsigned char *>(str);\n\n  for (size_t i = 0; i < length;) {\n    unsigned char lead = s[i++];\n\n    if (lead <= 0x7f) {\n      continue;  // single-byte character (ASCII) 0..7F\n    }\n    if (lead < 0xc2) {\n      return false;  // trail byte or non-shortest form\n    } else if (lead <= 0xdf && (i + 1) <= length && IsUTF8TrailByte(s[i])) {\n      ++i;  // 2-byte character\n    } else if (0xe0 <= lead && lead <= 0xef && (i + 2) <= length &&\n               IsUTF8TrailByte(s[i]) &&\n               IsUTF8TrailByte(s[i + 1]) &&\n               // check for non-shortest form and surrogate\n               (lead != 0xe0 || s[i] >= 0xa0) &&\n               (lead != 0xed || s[i] < 0xa0)) {\n      i += 2;  // 3-byte character\n    } else if (0xf0 <= lead && lead <= 0xf4 && (i + 3) <= length &&\n               IsUTF8TrailByte(s[i]) &&\n               IsUTF8TrailByte(s[i + 1]) &&\n               IsUTF8TrailByte(s[i + 2]) &&\n               // check for non-shortest form\n               (lead != 0xf0 || s[i] >= 0x90) &&\n               (lead != 0xf4 || s[i] < 0x90)) {\n      i += 3;  // 4-byte character\n    } else {\n      return false;\n    }\n  }\n  return true;\n}\n\nvoid ConditionalPrintAsText(const char* str, size_t length, ostream* os) {\n  if (!ContainsUnprintableControlCodes(str, length) &&\n      IsValidUTF8(str, length)) {\n    *os << \"\\n    As Text: \\\"\" << str << \"\\\"\";\n  }\n}\n\n}  // anonymous namespace\n\n// Prints a ::string object.\n#if GTEST_HAS_GLOBAL_STRING\nvoid PrintStringTo(const ::string& s, ostream* os) {\n  if (PrintCharsAsStringTo(s.data(), s.size(), os) == kHexEscape) {\n    if (GTEST_FLAG(print_utf8)) {\n      ConditionalPrintAsText(s.data(), s.size(), os);\n    }\n  }\n}\n#endif  // GTEST_HAS_GLOBAL_STRING\n\nvoid PrintStringTo(const ::std::string& s, ostream* os) {\n  if (PrintCharsAsStringTo(s.data(), s.size(), os) == kHexEscape) {\n    if (GTEST_FLAG(print_utf8)) {\n      ConditionalPrintAsText(s.data(), s.size(), os);\n    }\n  }\n}\n\n// Prints a ::wstring object.\n#if GTEST_HAS_GLOBAL_WSTRING\nvoid PrintWideStringTo(const ::wstring& s, ostream* os) {\n  PrintCharsAsStringTo(s.data(), s.size(), os);\n}\n#endif  // GTEST_HAS_GLOBAL_WSTRING\n\n#if GTEST_HAS_STD_WSTRING\nvoid PrintWideStringTo(const ::std::wstring& s, ostream* os) {\n  PrintCharsAsStringTo(s.data(), s.size(), os);\n}\n#endif  // GTEST_HAS_STD_WSTRING\n\n}  // namespace internal\n\n}  // namespace testing\n// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n//\n// The Google C++ Testing and Mocking Framework (Google Test)\n\n\nnamespace testing {\n\nusing internal::GetUnitTestImpl;\n\n// Gets the summary of the failure message by omitting the stack trace\n// in it.\nstd::string TestPartResult::ExtractSummary(const char* message) {\n  const char* const stack_trace = strstr(message, internal::kStackTraceMarker);\n  return stack_trace == nullptr ? message : std::string(message, stack_trace);\n}\n\n// Prints a TestPartResult object.\nstd::ostream& operator<<(std::ostream& os, const TestPartResult& result) {\n  return os << result.file_name() << \":\" << result.line_number() << \": \"\n            << (result.type() == TestPartResult::kSuccess\n                    ? \"Success\"\n                    : result.type() == TestPartResult::kSkip\n                          ? \"Skipped\"\n                          : result.type() == TestPartResult::kFatalFailure\n                                ? \"Fatal failure\"\n                                : \"Non-fatal failure\")\n            << \":\\n\"\n            << result.message() << std::endl;\n}\n\n// Appends a TestPartResult to the array.\nvoid TestPartResultArray::Append(const TestPartResult& result) {\n  array_.push_back(result);\n}\n\n// Returns the TestPartResult at the given index (0-based).\nconst TestPartResult& TestPartResultArray::GetTestPartResult(int index) const {\n  if (index < 0 || index >= size()) {\n    printf(\"\\nInvalid index (%d) into TestPartResultArray.\\n\", index);\n    internal::posix::Abort();\n  }\n\n  return array_[index];\n}\n\n// Returns the number of TestPartResult objects in the array.\nint TestPartResultArray::size() const {\n  return static_cast<int>(array_.size());\n}\n\nnamespace internal {\n\nHasNewFatalFailureHelper::HasNewFatalFailureHelper()\n    : has_new_fatal_failure_(false),\n      original_reporter_(GetUnitTestImpl()->\n                         GetTestPartResultReporterForCurrentThread()) {\n  GetUnitTestImpl()->SetTestPartResultReporterForCurrentThread(this);\n}\n\nHasNewFatalFailureHelper::~HasNewFatalFailureHelper() {\n  GetUnitTestImpl()->SetTestPartResultReporterForCurrentThread(\n      original_reporter_);\n}\n\nvoid HasNewFatalFailureHelper::ReportTestPartResult(\n    const TestPartResult& result) {\n  if (result.fatally_failed())\n    has_new_fatal_failure_ = true;\n  original_reporter_->ReportTestPartResult(result);\n}\n\n}  // namespace internal\n\n}  // namespace testing\n// Copyright 2008 Google Inc.\n// All Rights Reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n\n\nnamespace testing {\nnamespace internal {\n\n#if GTEST_HAS_TYPED_TEST_P\n\n// Skips to the first non-space char in str. Returns an empty string if str\n// contains only whitespace characters.\nstatic const char* SkipSpaces(const char* str) {\n  while (IsSpace(*str))\n    str++;\n  return str;\n}\n\nstatic std::vector<std::string> SplitIntoTestNames(const char* src) {\n  std::vector<std::string> name_vec;\n  src = SkipSpaces(src);\n  for (; src != nullptr; src = SkipComma(src)) {\n    name_vec.push_back(StripTrailingSpaces(GetPrefixUntilComma(src)));\n  }\n  return name_vec;\n}\n\n// Verifies that registered_tests match the test names in\n// registered_tests_; returns registered_tests if successful, or\n// aborts the program otherwise.\nconst char* TypedTestSuitePState::VerifyRegisteredTestNames(\n    const char* file, int line, const char* registered_tests) {\n  typedef RegisteredTestsMap::const_iterator RegisteredTestIter;\n  registered_ = true;\n\n  std::vector<std::string> name_vec = SplitIntoTestNames(registered_tests);\n\n  Message errors;\n\n  std::set<std::string> tests;\n  for (std::vector<std::string>::const_iterator name_it = name_vec.begin();\n       name_it != name_vec.end(); ++name_it) {\n    const std::string& name = *name_it;\n    if (tests.count(name) != 0) {\n      errors << \"Test \" << name << \" is listed more than once.\\n\";\n      continue;\n    }\n\n    bool found = false;\n    for (RegisteredTestIter it = registered_tests_.begin();\n         it != registered_tests_.end();\n         ++it) {\n      if (name == it->first) {\n        found = true;\n        break;\n      }\n    }\n\n    if (found) {\n      tests.insert(name);\n    } else {\n      errors << \"No test named \" << name\n             << \" can be found in this test suite.\\n\";\n    }\n  }\n\n  for (RegisteredTestIter it = registered_tests_.begin();\n       it != registered_tests_.end();\n       ++it) {\n    if (tests.count(it->first) == 0) {\n      errors << \"You forgot to list test \" << it->first << \".\\n\";\n    }\n  }\n\n  const std::string& errors_str = errors.GetString();\n  if (errors_str != \"\") {\n    fprintf(stderr, \"%s %s\", FormatFileLocation(file, line).c_str(),\n            errors_str.c_str());\n    fflush(stderr);\n    posix::Abort();\n  }\n\n  return registered_tests;\n}\n\n#endif  // GTEST_HAS_TYPED_TEST_P\n\n}  // namespace internal\n}  // namespace testing\n// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n//\n// Google C++ Mocking Framework (Google Mock)\n//\n// This file #includes all Google Mock implementation .cc files.  The\n// purpose is to allow a user to build Google Mock by compiling this\n// file alone.\n\n// This line ensures that gmock.h can be compiled on its own, even\n// when it's fused.\n#include \"gmock/gmock.h\"\n\n// The following lines pull in the real gmock *.cc files.\n// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n// Google Mock - a framework for writing C++ mock classes.\n//\n// This file implements cardinalities.\n\n\n#include <limits.h>\n#include <ostream>  // NOLINT\n#include <sstream>\n#include <string>\n\nnamespace testing {\n\nnamespace {\n\n// Implements the Between(m, n) cardinality.\nclass BetweenCardinalityImpl : public CardinalityInterface {\n public:\n  BetweenCardinalityImpl(int min, int max)\n      : min_(min >= 0 ? min : 0),\n        max_(max >= min_ ? max : min_) {\n    std::stringstream ss;\n    if (min < 0) {\n      ss << \"The invocation lower bound must be >= 0, \"\n         << \"but is actually \" << min << \".\";\n      internal::Expect(false, __FILE__, __LINE__, ss.str());\n    } else if (max < 0) {\n      ss << \"The invocation upper bound must be >= 0, \"\n         << \"but is actually \" << max << \".\";\n      internal::Expect(false, __FILE__, __LINE__, ss.str());\n    } else if (min > max) {\n      ss << \"The invocation upper bound (\" << max\n         << \") must be >= the invocation lower bound (\" << min\n         << \").\";\n      internal::Expect(false, __FILE__, __LINE__, ss.str());\n    }\n  }\n\n  // Conservative estimate on the lower/upper bound of the number of\n  // calls allowed.\n  int ConservativeLowerBound() const override { return min_; }\n  int ConservativeUpperBound() const override { return max_; }\n\n  bool IsSatisfiedByCallCount(int call_count) const override {\n    return min_ <= call_count && call_count <= max_;\n  }\n\n  bool IsSaturatedByCallCount(int call_count) const override {\n    return call_count >= max_;\n  }\n\n  void DescribeTo(::std::ostream* os) const override;\n\n private:\n  const int min_;\n  const int max_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(BetweenCardinalityImpl);\n};\n\n// Formats \"n times\" in a human-friendly way.\ninline std::string FormatTimes(int n) {\n  if (n == 1) {\n    return \"once\";\n  } else if (n == 2) {\n    return \"twice\";\n  } else {\n    std::stringstream ss;\n    ss << n << \" times\";\n    return ss.str();\n  }\n}\n\n// Describes the Between(m, n) cardinality in human-friendly text.\nvoid BetweenCardinalityImpl::DescribeTo(::std::ostream* os) const {\n  if (min_ == 0) {\n    if (max_ == 0) {\n      *os << \"never called\";\n    } else if (max_ == INT_MAX) {\n      *os << \"called any number of times\";\n    } else {\n      *os << \"called at most \" << FormatTimes(max_);\n    }\n  } else if (min_ == max_) {\n    *os << \"called \" << FormatTimes(min_);\n  } else if (max_ == INT_MAX) {\n    *os << \"called at least \" << FormatTimes(min_);\n  } else {\n    // 0 < min_ < max_ < INT_MAX\n    *os << \"called between \" << min_ << \" and \" << max_ << \" times\";\n  }\n}\n\n}  // Unnamed namespace\n\n// Describes the given call count to an ostream.\nvoid Cardinality::DescribeActualCallCountTo(int actual_call_count,\n                                            ::std::ostream* os) {\n  if (actual_call_count > 0) {\n    *os << \"called \" << FormatTimes(actual_call_count);\n  } else {\n    *os << \"never called\";\n  }\n}\n\n// Creates a cardinality that allows at least n calls.\nGTEST_API_ Cardinality AtLeast(int n) { return Between(n, INT_MAX); }\n\n// Creates a cardinality that allows at most n calls.\nGTEST_API_ Cardinality AtMost(int n) { return Between(0, n); }\n\n// Creates a cardinality that allows any number of calls.\nGTEST_API_ Cardinality AnyNumber() { return AtLeast(0); }\n\n// Creates a cardinality that allows between min and max calls.\nGTEST_API_ Cardinality Between(int min, int max) {\n  return Cardinality(new BetweenCardinalityImpl(min, max));\n}\n\n// Creates a cardinality that allows exactly n calls.\nGTEST_API_ Cardinality Exactly(int n) { return Between(n, n); }\n\n}  // namespace testing\n// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n// Google Mock - a framework for writing C++ mock classes.\n//\n// This file defines some utilities useful for implementing Google\n// Mock.  They are subject to change without notice, so please DO NOT\n// USE THEM IN USER CODE.\n\n\n#include <ctype.h>\n#include <ostream>  // NOLINT\n#include <string>\n\nnamespace testing {\nnamespace internal {\n\n// Joins a vector of strings as if they are fields of a tuple; returns\n// the joined string.\nGTEST_API_ std::string JoinAsTuple(const Strings& fields) {\n  switch (fields.size()) {\n    case 0:\n      return \"\";\n    case 1:\n      return fields[0];\n    default:\n      std::string result = \"(\" + fields[0];\n      for (size_t i = 1; i < fields.size(); i++) {\n        result += \", \";\n        result += fields[i];\n      }\n      result += \")\";\n      return result;\n  }\n}\n\n// Converts an identifier name to a space-separated list of lower-case\n// words.  Each maximum substring of the form [A-Za-z][a-z]*|\\d+ is\n// treated as one word.  For example, both \"FooBar123\" and\n// \"foo_bar_123\" are converted to \"foo bar 123\".\nGTEST_API_ std::string ConvertIdentifierNameToWords(const char* id_name) {\n  std::string result;\n  char prev_char = '\\0';\n  for (const char* p = id_name; *p != '\\0'; prev_char = *(p++)) {\n    // We don't care about the current locale as the input is\n    // guaranteed to be a valid C++ identifier name.\n    const bool starts_new_word = IsUpper(*p) ||\n        (!IsAlpha(prev_char) && IsLower(*p)) ||\n        (!IsDigit(prev_char) && IsDigit(*p));\n\n    if (IsAlNum(*p)) {\n      if (starts_new_word && result != \"\")\n        result += ' ';\n      result += ToLower(*p);\n    }\n  }\n  return result;\n}\n\n// This class reports Google Mock failures as Google Test failures.  A\n// user can define another class in a similar fashion if they intend to\n// use Google Mock with a testing framework other than Google Test.\nclass GoogleTestFailureReporter : public FailureReporterInterface {\n public:\n  void ReportFailure(FailureType type, const char* file, int line,\n                     const std::string& message) override {\n    AssertHelper(type == kFatal ?\n                 TestPartResult::kFatalFailure :\n                 TestPartResult::kNonFatalFailure,\n                 file,\n                 line,\n                 message.c_str()) = Message();\n    if (type == kFatal) {\n      posix::Abort();\n    }\n  }\n};\n\n// Returns the global failure reporter.  Will create a\n// GoogleTestFailureReporter and return it the first time called.\nGTEST_API_ FailureReporterInterface* GetFailureReporter() {\n  // Points to the global failure reporter used by Google Mock.  gcc\n  // guarantees that the following use of failure_reporter is\n  // thread-safe.  We may need to add additional synchronization to\n  // protect failure_reporter if we port Google Mock to other\n  // compilers.\n  static FailureReporterInterface* const failure_reporter =\n      new GoogleTestFailureReporter();\n  return failure_reporter;\n}\n\n// Protects global resources (stdout in particular) used by Log().\nstatic GTEST_DEFINE_STATIC_MUTEX_(g_log_mutex);\n\n// Returns true iff a log with the given severity is visible according\n// to the --gmock_verbose flag.\nGTEST_API_ bool LogIsVisible(LogSeverity severity) {\n  if (GMOCK_FLAG(verbose) == kInfoVerbosity) {\n    // Always show the log if --gmock_verbose=info.\n    return true;\n  } else if (GMOCK_FLAG(verbose) == kErrorVerbosity) {\n    // Always hide it if --gmock_verbose=error.\n    return false;\n  } else {\n    // If --gmock_verbose is neither \"info\" nor \"error\", we treat it\n    // as \"warning\" (its default value).\n    return severity == kWarning;\n  }\n}\n\n// Prints the given message to stdout iff 'severity' >= the level\n// specified by the --gmock_verbose flag.  If stack_frames_to_skip >=\n// 0, also prints the stack trace excluding the top\n// stack_frames_to_skip frames.  In opt mode, any positive\n// stack_frames_to_skip is treated as 0, since we don't know which\n// function calls will be inlined by the compiler and need to be\n// conservative.\nGTEST_API_ void Log(LogSeverity severity, const std::string& message,\n                    int stack_frames_to_skip) {\n  if (!LogIsVisible(severity))\n    return;\n\n  // Ensures that logs from different threads don't interleave.\n  MutexLock l(&g_log_mutex);\n\n  if (severity == kWarning) {\n    // Prints a GMOCK WARNING marker to make the warnings easily searchable.\n    std::cout << \"\\nGMOCK WARNING:\";\n  }\n  // Pre-pends a new-line to message if it doesn't start with one.\n  if (message.empty() || message[0] != '\\n') {\n    std::cout << \"\\n\";\n  }\n  std::cout << message;\n  if (stack_frames_to_skip >= 0) {\n#ifdef NDEBUG\n    // In opt mode, we have to be conservative and skip no stack frame.\n    const int actual_to_skip = 0;\n#else\n    // In dbg mode, we can do what the caller tell us to do (plus one\n    // for skipping this function's stack frame).\n    const int actual_to_skip = stack_frames_to_skip + 1;\n#endif  // NDEBUG\n\n    // Appends a new-line to message if it doesn't end with one.\n    if (!message.empty() && *message.rbegin() != '\\n') {\n      std::cout << \"\\n\";\n    }\n    std::cout << \"Stack trace:\\n\"\n         << ::testing::internal::GetCurrentOsStackTraceExceptTop(\n             ::testing::UnitTest::GetInstance(), actual_to_skip);\n  }\n  std::cout << ::std::flush;\n}\n\nGTEST_API_ WithoutMatchers GetWithoutMatchers() { return WithoutMatchers(); }\n\nGTEST_API_ void IllegalDoDefault(const char* file, int line) {\n  internal::Assert(\n      false, file, line,\n      \"You are using DoDefault() inside a composite action like \"\n      \"DoAll() or WithArgs().  This is not supported for technical \"\n      \"reasons.  Please instead spell out the default action, or \"\n      \"assign the default action to an Action variable and use \"\n      \"the variable in various places.\");\n}\n\n}  // namespace internal\n}  // namespace testing\n// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n// Google Mock - a framework for writing C++ mock classes.\n//\n// This file implements Matcher<const string&>, Matcher<string>, and\n// utilities for defining matchers.\n\n\n#include <string.h>\n#include <iostream>\n#include <sstream>\n#include <string>\n\nnamespace testing {\nnamespace internal {\n\n// Returns the description for a matcher defined using the MATCHER*()\n// macro where the user-supplied description string is \"\", if\n// 'negation' is false; otherwise returns the description of the\n// negation of the matcher.  'param_values' contains a list of strings\n// that are the print-out of the matcher's parameters.\nGTEST_API_ std::string FormatMatcherDescription(bool negation,\n                                                const char* matcher_name,\n                                                const Strings& param_values) {\n  std::string result = ConvertIdentifierNameToWords(matcher_name);\n  if (param_values.size() >= 1) result += \" \" + JoinAsTuple(param_values);\n  return negation ? \"not (\" + result + \")\" : result;\n}\n\n// FindMaxBipartiteMatching and its helper class.\n//\n// Uses the well-known Ford-Fulkerson max flow method to find a maximum\n// bipartite matching. Flow is considered to be from left to right.\n// There is an implicit source node that is connected to all of the left\n// nodes, and an implicit sink node that is connected to all of the\n// right nodes. All edges have unit capacity.\n//\n// Neither the flow graph nor the residual flow graph are represented\n// explicitly. Instead, they are implied by the information in 'graph' and\n// a vector<int> called 'left_' whose elements are initialized to the\n// value kUnused. This represents the initial state of the algorithm,\n// where the flow graph is empty, and the residual flow graph has the\n// following edges:\n//   - An edge from source to each left_ node\n//   - An edge from each right_ node to sink\n//   - An edge from each left_ node to each right_ node, if the\n//     corresponding edge exists in 'graph'.\n//\n// When the TryAugment() method adds a flow, it sets left_[l] = r for some\n// nodes l and r. This induces the following changes:\n//   - The edges (source, l), (l, r), and (r, sink) are added to the\n//     flow graph.\n//   - The same three edges are removed from the residual flow graph.\n//   - The reverse edges (l, source), (r, l), and (sink, r) are added\n//     to the residual flow graph, which is a directional graph\n//     representing unused flow capacity.\n//\n// When the method augments a flow (moving left_[l] from some r1 to some\n// other r2), this can be thought of as \"undoing\" the above steps with\n// respect to r1 and \"redoing\" them with respect to r2.\n//\n// It bears repeating that the flow graph and residual flow graph are\n// never represented explicitly, but can be derived by looking at the\n// information in 'graph' and in left_.\n//\n// As an optimization, there is a second vector<int> called right_ which\n// does not provide any new information. Instead, it enables more\n// efficient queries about edges entering or leaving the right-side nodes\n// of the flow or residual flow graphs. The following invariants are\n// maintained:\n//\n// left[l] == kUnused or right[left[l]] == l\n// right[r] == kUnused or left[right[r]] == r\n//\n// . [ source ]                                        .\n// .   |||                                             .\n// .   |||                                             .\n// .   ||\\--> left[0]=1  ---\\    right[0]=-1 ----\\     .\n// .   ||                   |                    |     .\n// .   |\\---> left[1]=-1    \\--> right[1]=0  ---\\|     .\n// .   |                                        ||     .\n// .   \\----> left[2]=2  ------> right[2]=2  --\\||     .\n// .                                           |||     .\n// .         elements           matchers       vvv     .\n// .                                         [ sink ]  .\n//\n// See Also:\n//   [1] Cormen, et al (2001). \"Section 26.2: The Ford-Fulkerson method\".\n//       \"Introduction to Algorithms (Second ed.)\", pp. 651-664.\n//   [2] \"Ford-Fulkerson algorithm\", Wikipedia,\n//       'http://en.wikipedia.org/wiki/Ford%E2%80%93Fulkerson_algorithm'\nclass MaxBipartiteMatchState {\n public:\n  explicit MaxBipartiteMatchState(const MatchMatrix& graph)\n      : graph_(&graph),\n        left_(graph_->LhsSize(), kUnused),\n        right_(graph_->RhsSize(), kUnused) {}\n\n  // Returns the edges of a maximal match, each in the form {left, right}.\n  ElementMatcherPairs Compute() {\n    // 'seen' is used for path finding { 0: unseen, 1: seen }.\n    ::std::vector<char> seen;\n    // Searches the residual flow graph for a path from each left node to\n    // the sink in the residual flow graph, and if one is found, add flow\n    // to the graph. It's okay to search through the left nodes once. The\n    // edge from the implicit source node to each previously-visited left\n    // node will have flow if that left node has any path to the sink\n    // whatsoever. Subsequent augmentations can only add flow to the\n    // network, and cannot take away that previous flow unit from the source.\n    // Since the source-to-left edge can only carry one flow unit (or,\n    // each element can be matched to only one matcher), there is no need\n    // to visit the left nodes more than once looking for augmented paths.\n    // The flow is known to be possible or impossible by looking at the\n    // node once.\n    for (size_t ilhs = 0; ilhs < graph_->LhsSize(); ++ilhs) {\n      // Reset the path-marking vector and try to find a path from\n      // source to sink starting at the left_[ilhs] node.\n      GTEST_CHECK_(left_[ilhs] == kUnused)\n          << \"ilhs: \" << ilhs << \", left_[ilhs]: \" << left_[ilhs];\n      // 'seen' initialized to 'graph_->RhsSize()' copies of 0.\n      seen.assign(graph_->RhsSize(), 0);\n      TryAugment(ilhs, &seen);\n    }\n    ElementMatcherPairs result;\n    for (size_t ilhs = 0; ilhs < left_.size(); ++ilhs) {\n      size_t irhs = left_[ilhs];\n      if (irhs == kUnused) continue;\n      result.push_back(ElementMatcherPair(ilhs, irhs));\n    }\n    return result;\n  }\n\n private:\n  static const size_t kUnused = static_cast<size_t>(-1);\n\n  // Perform a depth-first search from left node ilhs to the sink.  If a\n  // path is found, flow is added to the network by linking the left and\n  // right vector elements corresponding each segment of the path.\n  // Returns true if a path to sink was found, which means that a unit of\n  // flow was added to the network. The 'seen' vector elements correspond\n  // to right nodes and are marked to eliminate cycles from the search.\n  //\n  // Left nodes will only be explored at most once because they\n  // are accessible from at most one right node in the residual flow\n  // graph.\n  //\n  // Note that left_[ilhs] is the only element of left_ that TryAugment will\n  // potentially transition from kUnused to another value. Any other\n  // left_ element holding kUnused before TryAugment will be holding it\n  // when TryAugment returns.\n  //\n  bool TryAugment(size_t ilhs, ::std::vector<char>* seen) {\n    for (size_t irhs = 0; irhs < graph_->RhsSize(); ++irhs) {\n      if ((*seen)[irhs]) continue;\n      if (!graph_->HasEdge(ilhs, irhs)) continue;\n      // There's an available edge from ilhs to irhs.\n      (*seen)[irhs] = 1;\n      // Next a search is performed to determine whether\n      // this edge is a dead end or leads to the sink.\n      //\n      // right_[irhs] == kUnused means that there is residual flow from\n      // right node irhs to the sink, so we can use that to finish this\n      // flow path and return success.\n      //\n      // Otherwise there is residual flow to some ilhs. We push flow\n      // along that path and call ourselves recursively to see if this\n      // ultimately leads to sink.\n      if (right_[irhs] == kUnused || TryAugment(right_[irhs], seen)) {\n        // Add flow from left_[ilhs] to right_[irhs].\n        left_[ilhs] = irhs;\n        right_[irhs] = ilhs;\n        return true;\n      }\n    }\n    return false;\n  }\n\n  const MatchMatrix* graph_;  // not owned\n  // Each element of the left_ vector represents a left hand side node\n  // (i.e. an element) and each element of right_ is a right hand side\n  // node (i.e. a matcher). The values in the left_ vector indicate\n  // outflow from that node to a node on the right_ side. The values\n  // in the right_ indicate inflow, and specify which left_ node is\n  // feeding that right_ node, if any. For example, left_[3] == 1 means\n  // there's a flow from element #3 to matcher #1. Such a flow would also\n  // be redundantly represented in the right_ vector as right_[1] == 3.\n  // Elements of left_ and right_ are either kUnused or mutually\n  // referent. Mutually referent means that left_[right_[i]] = i and\n  // right_[left_[i]] = i.\n  ::std::vector<size_t> left_;\n  ::std::vector<size_t> right_;\n\n  GTEST_DISALLOW_ASSIGN_(MaxBipartiteMatchState);\n};\n\nconst size_t MaxBipartiteMatchState::kUnused;\n\nGTEST_API_ ElementMatcherPairs FindMaxBipartiteMatching(const MatchMatrix& g) {\n  return MaxBipartiteMatchState(g).Compute();\n}\n\nstatic void LogElementMatcherPairVec(const ElementMatcherPairs& pairs,\n                                     ::std::ostream* stream) {\n  typedef ElementMatcherPairs::const_iterator Iter;\n  ::std::ostream& os = *stream;\n  os << \"{\";\n  const char* sep = \"\";\n  for (Iter it = pairs.begin(); it != pairs.end(); ++it) {\n    os << sep << \"\\n  (\"\n       << \"element #\" << it->first << \", \"\n       << \"matcher #\" << it->second << \")\";\n    sep = \",\";\n  }\n  os << \"\\n}\";\n}\n\nbool MatchMatrix::NextGraph() {\n  for (size_t ilhs = 0; ilhs < LhsSize(); ++ilhs) {\n    for (size_t irhs = 0; irhs < RhsSize(); ++irhs) {\n      char& b = matched_[SpaceIndex(ilhs, irhs)];\n      if (!b) {\n        b = 1;\n        return true;\n      }\n      b = 0;\n    }\n  }\n  return false;\n}\n\nvoid MatchMatrix::Randomize() {\n  for (size_t ilhs = 0; ilhs < LhsSize(); ++ilhs) {\n    for (size_t irhs = 0; irhs < RhsSize(); ++irhs) {\n      char& b = matched_[SpaceIndex(ilhs, irhs)];\n      b = static_cast<char>(rand() & 1);  // NOLINT\n    }\n  }\n}\n\nstd::string MatchMatrix::DebugString() const {\n  ::std::stringstream ss;\n  const char* sep = \"\";\n  for (size_t i = 0; i < LhsSize(); ++i) {\n    ss << sep;\n    for (size_t j = 0; j < RhsSize(); ++j) {\n      ss << HasEdge(i, j);\n    }\n    sep = \";\";\n  }\n  return ss.str();\n}\n\nvoid UnorderedElementsAreMatcherImplBase::DescribeToImpl(\n    ::std::ostream* os) const {\n  switch (match_flags()) {\n    case UnorderedMatcherRequire::ExactMatch:\n      if (matcher_describers_.empty()) {\n        *os << \"is empty\";\n        return;\n      }\n      if (matcher_describers_.size() == 1) {\n        *os << \"has \" << Elements(1) << \" and that element \";\n        matcher_describers_[0]->DescribeTo(os);\n        return;\n      }\n      *os << \"has \" << Elements(matcher_describers_.size())\n          << \" and there exists some permutation of elements such that:\\n\";\n      break;\n    case UnorderedMatcherRequire::Superset:\n      *os << \"a surjection from elements to requirements exists such that:\\n\";\n      break;\n    case UnorderedMatcherRequire::Subset:\n      *os << \"an injection from elements to requirements exists such that:\\n\";\n      break;\n  }\n\n  const char* sep = \"\";\n  for (size_t i = 0; i != matcher_describers_.size(); ++i) {\n    *os << sep;\n    if (match_flags() == UnorderedMatcherRequire::ExactMatch) {\n      *os << \" - element #\" << i << \" \";\n    } else {\n      *os << \" - an element \";\n    }\n    matcher_describers_[i]->DescribeTo(os);\n    if (match_flags() == UnorderedMatcherRequire::ExactMatch) {\n      sep = \", and\\n\";\n    } else {\n      sep = \"\\n\";\n    }\n  }\n}\n\nvoid UnorderedElementsAreMatcherImplBase::DescribeNegationToImpl(\n    ::std::ostream* os) const {\n  switch (match_flags()) {\n    case UnorderedMatcherRequire::ExactMatch:\n      if (matcher_describers_.empty()) {\n        *os << \"isn't empty\";\n        return;\n      }\n      if (matcher_describers_.size() == 1) {\n        *os << \"doesn't have \" << Elements(1) << \", or has \" << Elements(1)\n            << \" that \";\n        matcher_describers_[0]->DescribeNegationTo(os);\n        return;\n      }\n      *os << \"doesn't have \" << Elements(matcher_describers_.size())\n          << \", or there exists no permutation of elements such that:\\n\";\n      break;\n    case UnorderedMatcherRequire::Superset:\n      *os << \"no surjection from elements to requirements exists such that:\\n\";\n      break;\n    case UnorderedMatcherRequire::Subset:\n      *os << \"no injection from elements to requirements exists such that:\\n\";\n      break;\n  }\n  const char* sep = \"\";\n  for (size_t i = 0; i != matcher_describers_.size(); ++i) {\n    *os << sep;\n    if (match_flags() == UnorderedMatcherRequire::ExactMatch) {\n      *os << \" - element #\" << i << \" \";\n    } else {\n      *os << \" - an element \";\n    }\n    matcher_describers_[i]->DescribeTo(os);\n    if (match_flags() == UnorderedMatcherRequire::ExactMatch) {\n      sep = \", and\\n\";\n    } else {\n      sep = \"\\n\";\n    }\n  }\n}\n\n// Checks that all matchers match at least one element, and that all\n// elements match at least one matcher. This enables faster matching\n// and better error reporting.\n// Returns false, writing an explanation to 'listener', if and only\n// if the success criteria are not met.\nbool UnorderedElementsAreMatcherImplBase::VerifyMatchMatrix(\n    const ::std::vector<std::string>& element_printouts,\n    const MatchMatrix& matrix, MatchResultListener* listener) const {\n  bool result = true;\n  ::std::vector<char> element_matched(matrix.LhsSize(), 0);\n  ::std::vector<char> matcher_matched(matrix.RhsSize(), 0);\n\n  for (size_t ilhs = 0; ilhs < matrix.LhsSize(); ilhs++) {\n    for (size_t irhs = 0; irhs < matrix.RhsSize(); irhs++) {\n      char matched = matrix.HasEdge(ilhs, irhs);\n      element_matched[ilhs] |= matched;\n      matcher_matched[irhs] |= matched;\n    }\n  }\n\n  if (match_flags() & UnorderedMatcherRequire::Superset) {\n    const char* sep =\n        \"where the following matchers don't match any elements:\\n\";\n    for (size_t mi = 0; mi < matcher_matched.size(); ++mi) {\n      if (matcher_matched[mi]) continue;\n      result = false;\n      if (listener->IsInterested()) {\n        *listener << sep << \"matcher #\" << mi << \": \";\n        matcher_describers_[mi]->DescribeTo(listener->stream());\n        sep = \",\\n\";\n      }\n    }\n  }\n\n  if (match_flags() & UnorderedMatcherRequire::Subset) {\n    const char* sep =\n        \"where the following elements don't match any matchers:\\n\";\n    const char* outer_sep = \"\";\n    if (!result) {\n      outer_sep = \"\\nand \";\n    }\n    for (size_t ei = 0; ei < element_matched.size(); ++ei) {\n      if (element_matched[ei]) continue;\n      result = false;\n      if (listener->IsInterested()) {\n        *listener << outer_sep << sep << \"element #\" << ei << \": \"\n                  << element_printouts[ei];\n        sep = \",\\n\";\n        outer_sep = \"\";\n      }\n    }\n  }\n  return result;\n}\n\nbool UnorderedElementsAreMatcherImplBase::FindPairing(\n    const MatchMatrix& matrix, MatchResultListener* listener) const {\n  ElementMatcherPairs matches = FindMaxBipartiteMatching(matrix);\n\n  size_t max_flow = matches.size();\n  if ((match_flags() & UnorderedMatcherRequire::Superset) &&\n      max_flow < matrix.RhsSize()) {\n    if (listener->IsInterested()) {\n      *listener << \"where no permutation of the elements can satisfy all \"\n                   \"matchers, and the closest match is \"\n                << max_flow << \" of \" << matrix.RhsSize()\n                << \" matchers with the pairings:\\n\";\n      LogElementMatcherPairVec(matches, listener->stream());\n    }\n    return false;\n  }\n  if ((match_flags() & UnorderedMatcherRequire::Subset) &&\n      max_flow < matrix.LhsSize()) {\n    if (listener->IsInterested()) {\n      *listener\n          << \"where not all elements can be matched, and the closest match is \"\n          << max_flow << \" of \" << matrix.RhsSize()\n          << \" matchers with the pairings:\\n\";\n      LogElementMatcherPairVec(matches, listener->stream());\n    }\n    return false;\n  }\n\n  if (matches.size() > 1) {\n    if (listener->IsInterested()) {\n      const char* sep = \"where:\\n\";\n      for (size_t mi = 0; mi < matches.size(); ++mi) {\n        *listener << sep << \" - element #\" << matches[mi].first\n                  << \" is matched by matcher #\" << matches[mi].second;\n        sep = \",\\n\";\n      }\n    }\n  }\n  return true;\n}\n\n}  // namespace internal\n}  // namespace testing\n// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n// Google Mock - a framework for writing C++ mock classes.\n//\n// This file implements the spec builder syntax (ON_CALL and\n// EXPECT_CALL).\n\n\n#include <stdlib.h>\n#include <iostream>  // NOLINT\n#include <map>\n#include <memory>\n#include <set>\n#include <string>\n#include <vector>\n\n#if GTEST_OS_CYGWIN || GTEST_OS_LINUX || GTEST_OS_MAC\n# include <unistd.h>  // NOLINT\n#endif\n\n// Silence C4800 (C4800: 'int *const ': forcing value\n// to bool 'true' or 'false') for MSVC 15\n#ifdef _MSC_VER\n#if _MSC_VER == 1900\n#  pragma warning(push)\n#  pragma warning(disable:4800)\n#endif\n#endif\n\nnamespace testing {\nnamespace internal {\n\n// Protects the mock object registry (in class Mock), all function\n// mockers, and all expectations.\nGTEST_API_ GTEST_DEFINE_STATIC_MUTEX_(g_gmock_mutex);\n\n// Logs a message including file and line number information.\nGTEST_API_ void LogWithLocation(testing::internal::LogSeverity severity,\n                                const char* file, int line,\n                                const std::string& message) {\n  ::std::ostringstream s;\n  s << file << \":\" << line << \": \" << message << ::std::endl;\n  Log(severity, s.str(), 0);\n}\n\n// Constructs an ExpectationBase object.\nExpectationBase::ExpectationBase(const char* a_file, int a_line,\n                                 const std::string& a_source_text)\n    : file_(a_file),\n      line_(a_line),\n      source_text_(a_source_text),\n      cardinality_specified_(false),\n      cardinality_(Exactly(1)),\n      call_count_(0),\n      retired_(false),\n      extra_matcher_specified_(false),\n      repeated_action_specified_(false),\n      retires_on_saturation_(false),\n      last_clause_(kNone),\n      action_count_checked_(false) {}\n\n// Destructs an ExpectationBase object.\nExpectationBase::~ExpectationBase() {}\n\n// Explicitly specifies the cardinality of this expectation.  Used by\n// the subclasses to implement the .Times() clause.\nvoid ExpectationBase::SpecifyCardinality(const Cardinality& a_cardinality) {\n  cardinality_specified_ = true;\n  cardinality_ = a_cardinality;\n}\n\n// Retires all pre-requisites of this expectation.\nvoid ExpectationBase::RetireAllPreRequisites()\n    GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {\n  if (is_retired()) {\n    // We can take this short-cut as we never retire an expectation\n    // until we have retired all its pre-requisites.\n    return;\n  }\n\n  ::std::vector<ExpectationBase*> expectations(1, this);\n  while (!expectations.empty()) {\n    ExpectationBase* exp = expectations.back();\n    expectations.pop_back();\n\n    for (ExpectationSet::const_iterator it =\n             exp->immediate_prerequisites_.begin();\n         it != exp->immediate_prerequisites_.end(); ++it) {\n      ExpectationBase* next = it->expectation_base().get();\n      if (!next->is_retired()) {\n        next->Retire();\n        expectations.push_back(next);\n      }\n    }\n  }\n}\n\n// Returns true iff all pre-requisites of this expectation have been\n// satisfied.\nbool ExpectationBase::AllPrerequisitesAreSatisfied() const\n    GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {\n  g_gmock_mutex.AssertHeld();\n  ::std::vector<const ExpectationBase*> expectations(1, this);\n  while (!expectations.empty()) {\n    const ExpectationBase* exp = expectations.back();\n    expectations.pop_back();\n\n    for (ExpectationSet::const_iterator it =\n             exp->immediate_prerequisites_.begin();\n         it != exp->immediate_prerequisites_.end(); ++it) {\n      const ExpectationBase* next = it->expectation_base().get();\n      if (!next->IsSatisfied()) return false;\n      expectations.push_back(next);\n    }\n  }\n  return true;\n}\n\n// Adds unsatisfied pre-requisites of this expectation to 'result'.\nvoid ExpectationBase::FindUnsatisfiedPrerequisites(ExpectationSet* result) const\n    GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {\n  g_gmock_mutex.AssertHeld();\n  ::std::vector<const ExpectationBase*> expectations(1, this);\n  while (!expectations.empty()) {\n    const ExpectationBase* exp = expectations.back();\n    expectations.pop_back();\n\n    for (ExpectationSet::const_iterator it =\n             exp->immediate_prerequisites_.begin();\n         it != exp->immediate_prerequisites_.end(); ++it) {\n      const ExpectationBase* next = it->expectation_base().get();\n\n      if (next->IsSatisfied()) {\n        // If *it is satisfied and has a call count of 0, some of its\n        // pre-requisites may not be satisfied yet.\n        if (next->call_count_ == 0) {\n          expectations.push_back(next);\n        }\n      } else {\n        // Now that we know next is unsatisfied, we are not so interested\n        // in whether its pre-requisites are satisfied.  Therefore we\n        // don't iterate into it here.\n        *result += *it;\n      }\n    }\n  }\n}\n\n// Describes how many times a function call matching this\n// expectation has occurred.\nvoid ExpectationBase::DescribeCallCountTo(::std::ostream* os) const\n    GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {\n  g_gmock_mutex.AssertHeld();\n\n  // Describes how many times the function is expected to be called.\n  *os << \"         Expected: to be \";\n  cardinality().DescribeTo(os);\n  *os << \"\\n           Actual: \";\n  Cardinality::DescribeActualCallCountTo(call_count(), os);\n\n  // Describes the state of the expectation (e.g. is it satisfied?\n  // is it active?).\n  *os << \" - \" << (IsOverSaturated() ? \"over-saturated\" :\n                   IsSaturated() ? \"saturated\" :\n                   IsSatisfied() ? \"satisfied\" : \"unsatisfied\")\n      << \" and \"\n      << (is_retired() ? \"retired\" : \"active\");\n}\n\n// Checks the action count (i.e. the number of WillOnce() and\n// WillRepeatedly() clauses) against the cardinality if this hasn't\n// been done before.  Prints a warning if there are too many or too\n// few actions.\nvoid ExpectationBase::CheckActionCountIfNotDone() const\n    GTEST_LOCK_EXCLUDED_(mutex_) {\n  bool should_check = false;\n  {\n    MutexLock l(&mutex_);\n    if (!action_count_checked_) {\n      action_count_checked_ = true;\n      should_check = true;\n    }\n  }\n\n  if (should_check) {\n    if (!cardinality_specified_) {\n      // The cardinality was inferred - no need to check the action\n      // count against it.\n      return;\n    }\n\n    // The cardinality was explicitly specified.\n    const int action_count = static_cast<int>(untyped_actions_.size());\n    const int upper_bound = cardinality().ConservativeUpperBound();\n    const int lower_bound = cardinality().ConservativeLowerBound();\n    bool too_many;  // True if there are too many actions, or false\n    // if there are too few.\n    if (action_count > upper_bound ||\n        (action_count == upper_bound && repeated_action_specified_)) {\n      too_many = true;\n    } else if (0 < action_count && action_count < lower_bound &&\n               !repeated_action_specified_) {\n      too_many = false;\n    } else {\n      return;\n    }\n\n    ::std::stringstream ss;\n    DescribeLocationTo(&ss);\n    ss << \"Too \" << (too_many ? \"many\" : \"few\")\n       << \" actions specified in \" << source_text() << \"...\\n\"\n       << \"Expected to be \";\n    cardinality().DescribeTo(&ss);\n    ss << \", but has \" << (too_many ? \"\" : \"only \")\n       << action_count << \" WillOnce()\"\n       << (action_count == 1 ? \"\" : \"s\");\n    if (repeated_action_specified_) {\n      ss << \" and a WillRepeatedly()\";\n    }\n    ss << \".\";\n    Log(kWarning, ss.str(), -1);  // -1 means \"don't print stack trace\".\n  }\n}\n\n// Implements the .Times() clause.\nvoid ExpectationBase::UntypedTimes(const Cardinality& a_cardinality) {\n  if (last_clause_ == kTimes) {\n    ExpectSpecProperty(false,\n                       \".Times() cannot appear \"\n                       \"more than once in an EXPECT_CALL().\");\n  } else {\n    ExpectSpecProperty(last_clause_ < kTimes,\n                       \".Times() cannot appear after \"\n                       \".InSequence(), .WillOnce(), .WillRepeatedly(), \"\n                       \"or .RetiresOnSaturation().\");\n  }\n  last_clause_ = kTimes;\n\n  SpecifyCardinality(a_cardinality);\n}\n\n// Points to the implicit sequence introduced by a living InSequence\n// object (if any) in the current thread or NULL.\nGTEST_API_ ThreadLocal<Sequence*> g_gmock_implicit_sequence;\n\n// Reports an uninteresting call (whose description is in msg) in the\n// manner specified by 'reaction'.\nvoid ReportUninterestingCall(CallReaction reaction, const std::string& msg) {\n  // Include a stack trace only if --gmock_verbose=info is specified.\n  const int stack_frames_to_skip =\n      GMOCK_FLAG(verbose) == kInfoVerbosity ? 3 : -1;\n  switch (reaction) {\n    case kAllow:\n      Log(kInfo, msg, stack_frames_to_skip);\n      break;\n    case kWarn:\n      Log(kWarning,\n          msg +\n              \"\\nNOTE: You can safely ignore the above warning unless this \"\n              \"call should not happen.  Do not suppress it by blindly adding \"\n              \"an EXPECT_CALL() if you don't mean to enforce the call.  \"\n              \"See \"\n              \"https://github.com/google/googletest/blob/master/googlemock/\"\n              \"docs/CookBook.md#\"\n              \"knowing-when-to-expect for details.\\n\",\n          stack_frames_to_skip);\n      break;\n    default:  // FAIL\n      Expect(false, nullptr, -1, msg);\n  }\n}\n\nUntypedFunctionMockerBase::UntypedFunctionMockerBase()\n    : mock_obj_(nullptr), name_(\"\") {}\n\nUntypedFunctionMockerBase::~UntypedFunctionMockerBase() {}\n\n// Sets the mock object this mock method belongs to, and registers\n// this information in the global mock registry.  Will be called\n// whenever an EXPECT_CALL() or ON_CALL() is executed on this mock\n// method.\nvoid UntypedFunctionMockerBase::RegisterOwner(const void* mock_obj)\n    GTEST_LOCK_EXCLUDED_(g_gmock_mutex) {\n  {\n    MutexLock l(&g_gmock_mutex);\n    mock_obj_ = mock_obj;\n  }\n  Mock::Register(mock_obj, this);\n}\n\n// Sets the mock object this mock method belongs to, and sets the name\n// of the mock function.  Will be called upon each invocation of this\n// mock function.\nvoid UntypedFunctionMockerBase::SetOwnerAndName(const void* mock_obj,\n                                                const char* name)\n    GTEST_LOCK_EXCLUDED_(g_gmock_mutex) {\n  // We protect name_ under g_gmock_mutex in case this mock function\n  // is called from two threads concurrently.\n  MutexLock l(&g_gmock_mutex);\n  mock_obj_ = mock_obj;\n  name_ = name;\n}\n\n// Returns the name of the function being mocked.  Must be called\n// after RegisterOwner() or SetOwnerAndName() has been called.\nconst void* UntypedFunctionMockerBase::MockObject() const\n    GTEST_LOCK_EXCLUDED_(g_gmock_mutex) {\n  const void* mock_obj;\n  {\n    // We protect mock_obj_ under g_gmock_mutex in case this mock\n    // function is called from two threads concurrently.\n    MutexLock l(&g_gmock_mutex);\n    Assert(mock_obj_ != nullptr, __FILE__, __LINE__,\n           \"MockObject() must not be called before RegisterOwner() or \"\n           \"SetOwnerAndName() has been called.\");\n    mock_obj = mock_obj_;\n  }\n  return mock_obj;\n}\n\n// Returns the name of this mock method.  Must be called after\n// SetOwnerAndName() has been called.\nconst char* UntypedFunctionMockerBase::Name() const\n    GTEST_LOCK_EXCLUDED_(g_gmock_mutex) {\n  const char* name;\n  {\n    // We protect name_ under g_gmock_mutex in case this mock\n    // function is called from two threads concurrently.\n    MutexLock l(&g_gmock_mutex);\n    Assert(name_ != nullptr, __FILE__, __LINE__,\n           \"Name() must not be called before SetOwnerAndName() has \"\n           \"been called.\");\n    name = name_;\n  }\n  return name;\n}\n\n// Calculates the result of invoking this mock function with the given\n// arguments, prints it, and returns it.  The caller is responsible\n// for deleting the result.\nUntypedActionResultHolderBase* UntypedFunctionMockerBase::UntypedInvokeWith(\n    void* const untyped_args) GTEST_LOCK_EXCLUDED_(g_gmock_mutex) {\n  // See the definition of untyped_expectations_ for why access to it\n  // is unprotected here.\n  if (untyped_expectations_.size() == 0) {\n    // No expectation is set on this mock method - we have an\n    // uninteresting call.\n\n    // We must get Google Mock's reaction on uninteresting calls\n    // made on this mock object BEFORE performing the action,\n    // because the action may DELETE the mock object and make the\n    // following expression meaningless.\n    const CallReaction reaction =\n        Mock::GetReactionOnUninterestingCalls(MockObject());\n\n    // True iff we need to print this call's arguments and return\n    // value.  This definition must be kept in sync with\n    // the behavior of ReportUninterestingCall().\n    const bool need_to_report_uninteresting_call =\n        // If the user allows this uninteresting call, we print it\n        // only when they want informational messages.\n        reaction == kAllow ? LogIsVisible(kInfo) :\n                           // If the user wants this to be a warning, we print\n                           // it only when they want to see warnings.\n            reaction == kWarn\n                ? LogIsVisible(kWarning)\n                :\n                // Otherwise, the user wants this to be an error, and we\n                // should always print detailed information in the error.\n                true;\n\n    if (!need_to_report_uninteresting_call) {\n      // Perform the action without printing the call information.\n      return this->UntypedPerformDefaultAction(\n          untyped_args, \"Function call: \" + std::string(Name()));\n    }\n\n    // Warns about the uninteresting call.\n    ::std::stringstream ss;\n    this->UntypedDescribeUninterestingCall(untyped_args, &ss);\n\n    // Calculates the function result.\n    UntypedActionResultHolderBase* const result =\n        this->UntypedPerformDefaultAction(untyped_args, ss.str());\n\n    // Prints the function result.\n    if (result != nullptr) result->PrintAsActionResult(&ss);\n\n    ReportUninterestingCall(reaction, ss.str());\n    return result;\n  }\n\n  bool is_excessive = false;\n  ::std::stringstream ss;\n  ::std::stringstream why;\n  ::std::stringstream loc;\n  const void* untyped_action = nullptr;\n\n  // The UntypedFindMatchingExpectation() function acquires and\n  // releases g_gmock_mutex.\n  const ExpectationBase* const untyped_expectation =\n      this->UntypedFindMatchingExpectation(\n          untyped_args, &untyped_action, &is_excessive,\n          &ss, &why);\n  const bool found = untyped_expectation != nullptr;\n\n  // True iff we need to print the call's arguments and return value.\n  // This definition must be kept in sync with the uses of Expect()\n  // and Log() in this function.\n  const bool need_to_report_call =\n      !found || is_excessive || LogIsVisible(kInfo);\n  if (!need_to_report_call) {\n    // Perform the action without printing the call information.\n    return untyped_action == nullptr\n               ? this->UntypedPerformDefaultAction(untyped_args, \"\")\n               : this->UntypedPerformAction(untyped_action, untyped_args);\n  }\n\n  ss << \"    Function call: \" << Name();\n  this->UntypedPrintArgs(untyped_args, &ss);\n\n  // In case the action deletes a piece of the expectation, we\n  // generate the message beforehand.\n  if (found && !is_excessive) {\n    untyped_expectation->DescribeLocationTo(&loc);\n  }\n\n  UntypedActionResultHolderBase* const result =\n      untyped_action == nullptr\n          ? this->UntypedPerformDefaultAction(untyped_args, ss.str())\n          : this->UntypedPerformAction(untyped_action, untyped_args);\n  if (result != nullptr) result->PrintAsActionResult(&ss);\n  ss << \"\\n\" << why.str();\n\n  if (!found) {\n    // No expectation matches this call - reports a failure.\n    Expect(false, nullptr, -1, ss.str());\n  } else if (is_excessive) {\n    // We had an upper-bound violation and the failure message is in ss.\n    Expect(false, untyped_expectation->file(),\n           untyped_expectation->line(), ss.str());\n  } else {\n    // We had an expected call and the matching expectation is\n    // described in ss.\n    Log(kInfo, loc.str() + ss.str(), 2);\n  }\n\n  return result;\n}\n\n// Returns an Expectation object that references and co-owns exp,\n// which must be an expectation on this mock function.\nExpectation UntypedFunctionMockerBase::GetHandleOf(ExpectationBase* exp) {\n  // See the definition of untyped_expectations_ for why access to it\n  // is unprotected here.\n  for (UntypedExpectations::const_iterator it =\n           untyped_expectations_.begin();\n       it != untyped_expectations_.end(); ++it) {\n    if (it->get() == exp) {\n      return Expectation(*it);\n    }\n  }\n\n  Assert(false, __FILE__, __LINE__, \"Cannot find expectation.\");\n  return Expectation();\n  // The above statement is just to make the code compile, and will\n  // never be executed.\n}\n\n// Verifies that all expectations on this mock function have been\n// satisfied.  Reports one or more Google Test non-fatal failures\n// and returns false if not.\nbool UntypedFunctionMockerBase::VerifyAndClearExpectationsLocked()\n    GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {\n  g_gmock_mutex.AssertHeld();\n  bool expectations_met = true;\n  for (UntypedExpectations::const_iterator it =\n           untyped_expectations_.begin();\n       it != untyped_expectations_.end(); ++it) {\n    ExpectationBase* const untyped_expectation = it->get();\n    if (untyped_expectation->IsOverSaturated()) {\n      // There was an upper-bound violation.  Since the error was\n      // already reported when it occurred, there is no need to do\n      // anything here.\n      expectations_met = false;\n    } else if (!untyped_expectation->IsSatisfied()) {\n      expectations_met = false;\n      ::std::stringstream ss;\n      ss  << \"Actual function call count doesn't match \"\n          << untyped_expectation->source_text() << \"...\\n\";\n      // No need to show the source file location of the expectation\n      // in the description, as the Expect() call that follows already\n      // takes care of it.\n      untyped_expectation->MaybeDescribeExtraMatcherTo(&ss);\n      untyped_expectation->DescribeCallCountTo(&ss);\n      Expect(false, untyped_expectation->file(),\n             untyped_expectation->line(), ss.str());\n    }\n  }\n\n  // Deleting our expectations may trigger other mock objects to be deleted, for\n  // example if an action contains a reference counted smart pointer to that\n  // mock object, and that is the last reference. So if we delete our\n  // expectations within the context of the global mutex we may deadlock when\n  // this method is called again. Instead, make a copy of the set of\n  // expectations to delete, clear our set within the mutex, and then clear the\n  // copied set outside of it.\n  UntypedExpectations expectations_to_delete;\n  untyped_expectations_.swap(expectations_to_delete);\n\n  g_gmock_mutex.Unlock();\n  expectations_to_delete.clear();\n  g_gmock_mutex.Lock();\n\n  return expectations_met;\n}\n\nCallReaction intToCallReaction(int mock_behavior) {\n  if (mock_behavior >= kAllow && mock_behavior <= kFail) {\n    return static_cast<internal::CallReaction>(mock_behavior);\n  }\n  return kWarn;\n}\n\n}  // namespace internal\n\n// Class Mock.\n\nnamespace {\n\ntypedef std::set<internal::UntypedFunctionMockerBase*> FunctionMockers;\n\n// The current state of a mock object.  Such information is needed for\n// detecting leaked mock objects and explicitly verifying a mock's\n// expectations.\nstruct MockObjectState {\n  MockObjectState()\n      : first_used_file(nullptr), first_used_line(-1), leakable(false) {}\n\n  // Where in the source file an ON_CALL or EXPECT_CALL is first\n  // invoked on this mock object.\n  const char* first_used_file;\n  int first_used_line;\n  ::std::string first_used_test_suite;\n  ::std::string first_used_test;\n  bool leakable;  // true iff it's OK to leak the object.\n  FunctionMockers function_mockers;  // All registered methods of the object.\n};\n\n// A global registry holding the state of all mock objects that are\n// alive.  A mock object is added to this registry the first time\n// Mock::AllowLeak(), ON_CALL(), or EXPECT_CALL() is called on it.  It\n// is removed from the registry in the mock object's destructor.\nclass MockObjectRegistry {\n public:\n  // Maps a mock object (identified by its address) to its state.\n  typedef std::map<const void*, MockObjectState> StateMap;\n\n  // This destructor will be called when a program exits, after all\n  // tests in it have been run.  By then, there should be no mock\n  // object alive.  Therefore we report any living object as test\n  // failure, unless the user explicitly asked us to ignore it.\n  ~MockObjectRegistry() {\n    if (!GMOCK_FLAG(catch_leaked_mocks))\n      return;\n\n    int leaked_count = 0;\n    for (StateMap::const_iterator it = states_.begin(); it != states_.end();\n         ++it) {\n      if (it->second.leakable)  // The user said it's fine to leak this object.\n        continue;\n\n      // FIXME: Print the type of the leaked object.\n      // This can help the user identify the leaked object.\n      std::cout << \"\\n\";\n      const MockObjectState& state = it->second;\n      std::cout << internal::FormatFileLocation(state.first_used_file,\n                                                state.first_used_line);\n      std::cout << \" ERROR: this mock object\";\n      if (state.first_used_test != \"\") {\n        std::cout << \" (used in test \" << state.first_used_test_suite << \".\"\n                  << state.first_used_test << \")\";\n      }\n      std::cout << \" should be deleted but never is. Its address is @\"\n           << it->first << \".\";\n      leaked_count++;\n    }\n    if (leaked_count > 0) {\n      std::cout << \"\\nERROR: \" << leaked_count << \" leaked mock \"\n                << (leaked_count == 1 ? \"object\" : \"objects\")\n                << \" found at program exit. Expectations on a mock object is \"\n                   \"verified when the object is destructed. Leaking a mock \"\n                   \"means that its expectations aren't verified, which is \"\n                   \"usually a test bug. If you really intend to leak a mock, \"\n                   \"you can suppress this error using \"\n                   \"testing::Mock::AllowLeak(mock_object), or you may use a \"\n                   \"fake or stub instead of a mock.\\n\";\n      std::cout.flush();\n      ::std::cerr.flush();\n      // RUN_ALL_TESTS() has already returned when this destructor is\n      // called.  Therefore we cannot use the normal Google Test\n      // failure reporting mechanism.\n      _exit(1);  // We cannot call exit() as it is not reentrant and\n                 // may already have been called.\n    }\n  }\n\n  StateMap& states() { return states_; }\n\n private:\n  StateMap states_;\n};\n\n// Protected by g_gmock_mutex.\nMockObjectRegistry g_mock_object_registry;\n\n// Maps a mock object to the reaction Google Mock should have when an\n// uninteresting method is called.  Protected by g_gmock_mutex.\nstd::map<const void*, internal::CallReaction> g_uninteresting_call_reaction;\n\n// Sets the reaction Google Mock should have when an uninteresting\n// method of the given mock object is called.\nvoid SetReactionOnUninterestingCalls(const void* mock_obj,\n                                     internal::CallReaction reaction)\n    GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) {\n  internal::MutexLock l(&internal::g_gmock_mutex);\n  g_uninteresting_call_reaction[mock_obj] = reaction;\n}\n\n}  // namespace\n\n// Tells Google Mock to allow uninteresting calls on the given mock\n// object.\nvoid Mock::AllowUninterestingCalls(const void* mock_obj)\n    GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) {\n  SetReactionOnUninterestingCalls(mock_obj, internal::kAllow);\n}\n\n// Tells Google Mock to warn the user about uninteresting calls on the\n// given mock object.\nvoid Mock::WarnUninterestingCalls(const void* mock_obj)\n    GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) {\n  SetReactionOnUninterestingCalls(mock_obj, internal::kWarn);\n}\n\n// Tells Google Mock to fail uninteresting calls on the given mock\n// object.\nvoid Mock::FailUninterestingCalls(const void* mock_obj)\n    GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) {\n  SetReactionOnUninterestingCalls(mock_obj, internal::kFail);\n}\n\n// Tells Google Mock the given mock object is being destroyed and its\n// entry in the call-reaction table should be removed.\nvoid Mock::UnregisterCallReaction(const void* mock_obj)\n    GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) {\n  internal::MutexLock l(&internal::g_gmock_mutex);\n  g_uninteresting_call_reaction.erase(mock_obj);\n}\n\n// Returns the reaction Google Mock will have on uninteresting calls\n// made on the given mock object.\ninternal::CallReaction Mock::GetReactionOnUninterestingCalls(\n    const void* mock_obj)\n        GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) {\n  internal::MutexLock l(&internal::g_gmock_mutex);\n  return (g_uninteresting_call_reaction.count(mock_obj) == 0) ?\n      internal::intToCallReaction(GMOCK_FLAG(default_mock_behavior)) :\n      g_uninteresting_call_reaction[mock_obj];\n}\n\n// Tells Google Mock to ignore mock_obj when checking for leaked mock\n// objects.\nvoid Mock::AllowLeak(const void* mock_obj)\n    GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) {\n  internal::MutexLock l(&internal::g_gmock_mutex);\n  g_mock_object_registry.states()[mock_obj].leakable = true;\n}\n\n// Verifies and clears all expectations on the given mock object.  If\n// the expectations aren't satisfied, generates one or more Google\n// Test non-fatal failures and returns false.\nbool Mock::VerifyAndClearExpectations(void* mock_obj)\n    GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) {\n  internal::MutexLock l(&internal::g_gmock_mutex);\n  return VerifyAndClearExpectationsLocked(mock_obj);\n}\n\n// Verifies all expectations on the given mock object and clears its\n// default actions and expectations.  Returns true iff the\n// verification was successful.\nbool Mock::VerifyAndClear(void* mock_obj)\n    GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) {\n  internal::MutexLock l(&internal::g_gmock_mutex);\n  ClearDefaultActionsLocked(mock_obj);\n  return VerifyAndClearExpectationsLocked(mock_obj);\n}\n\n// Verifies and clears all expectations on the given mock object.  If\n// the expectations aren't satisfied, generates one or more Google\n// Test non-fatal failures and returns false.\nbool Mock::VerifyAndClearExpectationsLocked(void* mock_obj)\n    GTEST_EXCLUSIVE_LOCK_REQUIRED_(internal::g_gmock_mutex) {\n  internal::g_gmock_mutex.AssertHeld();\n  if (g_mock_object_registry.states().count(mock_obj) == 0) {\n    // No EXPECT_CALL() was set on the given mock object.\n    return true;\n  }\n\n  // Verifies and clears the expectations on each mock method in the\n  // given mock object.\n  bool expectations_met = true;\n  FunctionMockers& mockers =\n      g_mock_object_registry.states()[mock_obj].function_mockers;\n  for (FunctionMockers::const_iterator it = mockers.begin();\n       it != mockers.end(); ++it) {\n    if (!(*it)->VerifyAndClearExpectationsLocked()) {\n      expectations_met = false;\n    }\n  }\n\n  // We don't clear the content of mockers, as they may still be\n  // needed by ClearDefaultActionsLocked().\n  return expectations_met;\n}\n\nbool Mock::IsNaggy(void* mock_obj)\n    GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) {\n  return Mock::GetReactionOnUninterestingCalls(mock_obj) == internal::kWarn;\n}\nbool Mock::IsNice(void* mock_obj)\n    GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) {\n  return Mock::GetReactionOnUninterestingCalls(mock_obj) == internal::kAllow;\n}\nbool Mock::IsStrict(void* mock_obj)\n    GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) {\n  return Mock::GetReactionOnUninterestingCalls(mock_obj) == internal::kFail;\n}\n\n// Registers a mock object and a mock method it owns.\nvoid Mock::Register(const void* mock_obj,\n                    internal::UntypedFunctionMockerBase* mocker)\n    GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) {\n  internal::MutexLock l(&internal::g_gmock_mutex);\n  g_mock_object_registry.states()[mock_obj].function_mockers.insert(mocker);\n}\n\n// Tells Google Mock where in the source code mock_obj is used in an\n// ON_CALL or EXPECT_CALL.  In case mock_obj is leaked, this\n// information helps the user identify which object it is.\nvoid Mock::RegisterUseByOnCallOrExpectCall(const void* mock_obj,\n                                           const char* file, int line)\n    GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) {\n  internal::MutexLock l(&internal::g_gmock_mutex);\n  MockObjectState& state = g_mock_object_registry.states()[mock_obj];\n  if (state.first_used_file == nullptr) {\n    state.first_used_file = file;\n    state.first_used_line = line;\n    const TestInfo* const test_info =\n        UnitTest::GetInstance()->current_test_info();\n    if (test_info != nullptr) {\n      state.first_used_test_suite = test_info->test_suite_name();\n      state.first_used_test = test_info->name();\n    }\n  }\n}\n\n// Unregisters a mock method; removes the owning mock object from the\n// registry when the last mock method associated with it has been\n// unregistered.  This is called only in the destructor of\n// FunctionMockerBase.\nvoid Mock::UnregisterLocked(internal::UntypedFunctionMockerBase* mocker)\n    GTEST_EXCLUSIVE_LOCK_REQUIRED_(internal::g_gmock_mutex) {\n  internal::g_gmock_mutex.AssertHeld();\n  for (MockObjectRegistry::StateMap::iterator it =\n           g_mock_object_registry.states().begin();\n       it != g_mock_object_registry.states().end(); ++it) {\n    FunctionMockers& mockers = it->second.function_mockers;\n    if (mockers.erase(mocker) > 0) {\n      // mocker was in mockers and has been just removed.\n      if (mockers.empty()) {\n        g_mock_object_registry.states().erase(it);\n      }\n      return;\n    }\n  }\n}\n\n// Clears all ON_CALL()s set on the given mock object.\nvoid Mock::ClearDefaultActionsLocked(void* mock_obj)\n    GTEST_EXCLUSIVE_LOCK_REQUIRED_(internal::g_gmock_mutex) {\n  internal::g_gmock_mutex.AssertHeld();\n\n  if (g_mock_object_registry.states().count(mock_obj) == 0) {\n    // No ON_CALL() was set on the given mock object.\n    return;\n  }\n\n  // Clears the default actions for each mock method in the given mock\n  // object.\n  FunctionMockers& mockers =\n      g_mock_object_registry.states()[mock_obj].function_mockers;\n  for (FunctionMockers::const_iterator it = mockers.begin();\n       it != mockers.end(); ++it) {\n    (*it)->ClearDefaultActionsLocked();\n  }\n\n  // We don't clear the content of mockers, as they may still be\n  // needed by VerifyAndClearExpectationsLocked().\n}\n\nExpectation::Expectation() {}\n\nExpectation::Expectation(\n    const std::shared_ptr<internal::ExpectationBase>& an_expectation_base)\n    : expectation_base_(an_expectation_base) {}\n\nExpectation::~Expectation() {}\n\n// Adds an expectation to a sequence.\nvoid Sequence::AddExpectation(const Expectation& expectation) const {\n  if (*last_expectation_ != expectation) {\n    if (last_expectation_->expectation_base() != nullptr) {\n      expectation.expectation_base()->immediate_prerequisites_\n          += *last_expectation_;\n    }\n    *last_expectation_ = expectation;\n  }\n}\n\n// Creates the implicit sequence if there isn't one.\nInSequence::InSequence() {\n  if (internal::g_gmock_implicit_sequence.get() == nullptr) {\n    internal::g_gmock_implicit_sequence.set(new Sequence);\n    sequence_created_ = true;\n  } else {\n    sequence_created_ = false;\n  }\n}\n\n// Deletes the implicit sequence if it was created by the constructor\n// of this object.\nInSequence::~InSequence() {\n  if (sequence_created_) {\n    delete internal::g_gmock_implicit_sequence.get();\n    internal::g_gmock_implicit_sequence.set(nullptr);\n  }\n}\n\n}  // namespace testing\n\n#ifdef _MSC_VER\n#if _MSC_VER == 1900\n#  pragma warning(pop)\n#endif\n#endif\n// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n\nnamespace testing {\n\nGMOCK_DEFINE_bool_(catch_leaked_mocks, true,\n                   \"true iff Google Mock should report leaked mock objects \"\n                   \"as failures.\");\n\nGMOCK_DEFINE_string_(verbose, internal::kWarningVerbosity,\n                     \"Controls how verbose Google Mock's output is.\"\n                     \"  Valid values:\\n\"\n                     \"  info    - prints all messages.\\n\"\n                     \"  warning - prints warnings and errors.\\n\"\n                     \"  error   - prints errors only.\");\n\nGMOCK_DEFINE_int32_(default_mock_behavior, 1,\n                    \"Controls the default behavior of mocks.\"\n                    \"  Valid values:\\n\"\n                    \"  0 - by default, mocks act as NiceMocks.\\n\"\n                    \"  1 - by default, mocks act as NaggyMocks.\\n\"\n                    \"  2 - by default, mocks act as StrictMocks.\");\n\nnamespace internal {\n\n// Parses a string as a command line flag.  The string should have the\n// format \"--gmock_flag=value\".  When def_optional is true, the\n// \"=value\" part can be omitted.\n//\n// Returns the value of the flag, or NULL if the parsing failed.\nstatic const char* ParseGoogleMockFlagValue(const char* str,\n                                            const char* flag,\n                                            bool def_optional) {\n  // str and flag must not be NULL.\n  if (str == nullptr || flag == nullptr) return nullptr;\n\n  // The flag must start with \"--gmock_\".\n  const std::string flag_str = std::string(\"--gmock_\") + flag;\n  const size_t flag_len = flag_str.length();\n  if (strncmp(str, flag_str.c_str(), flag_len) != 0) return nullptr;\n\n  // Skips the flag name.\n  const char* flag_end = str + flag_len;\n\n  // When def_optional is true, it's OK to not have a \"=value\" part.\n  if (def_optional && (flag_end[0] == '\\0')) {\n    return flag_end;\n  }\n\n  // If def_optional is true and there are more characters after the\n  // flag name, or if def_optional is false, there must be a '=' after\n  // the flag name.\n  if (flag_end[0] != '=') return nullptr;\n\n  // Returns the string after \"=\".\n  return flag_end + 1;\n}\n\n// Parses a string for a Google Mock bool flag, in the form of\n// \"--gmock_flag=value\".\n//\n// On success, stores the value of the flag in *value, and returns\n// true.  On failure, returns false without changing *value.\nstatic bool ParseGoogleMockBoolFlag(const char* str, const char* flag,\n                                    bool* value) {\n  // Gets the value of the flag as a string.\n  const char* const value_str = ParseGoogleMockFlagValue(str, flag, true);\n\n  // Aborts if the parsing failed.\n  if (value_str == nullptr) return false;\n\n  // Converts the string value to a bool.\n  *value = !(*value_str == '0' || *value_str == 'f' || *value_str == 'F');\n  return true;\n}\n\n// Parses a string for a Google Mock string flag, in the form of\n// \"--gmock_flag=value\".\n//\n// On success, stores the value of the flag in *value, and returns\n// true.  On failure, returns false without changing *value.\ntemplate <typename String>\nstatic bool ParseGoogleMockStringFlag(const char* str, const char* flag,\n                                      String* value) {\n  // Gets the value of the flag as a string.\n  const char* const value_str = ParseGoogleMockFlagValue(str, flag, false);\n\n  // Aborts if the parsing failed.\n  if (value_str == nullptr) return false;\n\n  // Sets *value to the value of the flag.\n  *value = value_str;\n  return true;\n}\n\nstatic bool ParseGoogleMockIntFlag(const char* str, const char* flag,\n                                   int* value) {\n  // Gets the value of the flag as a string.\n  const char* const value_str = ParseGoogleMockFlagValue(str, flag, true);\n\n  // Aborts if the parsing failed.\n  if (value_str == nullptr) return false;\n\n  // Sets *value to the value of the flag.\n  return ParseInt32(Message() << \"The value of flag --\" << flag,\n                    value_str, value);\n}\n\n// The internal implementation of InitGoogleMock().\n//\n// The type parameter CharType can be instantiated to either char or\n// wchar_t.\ntemplate <typename CharType>\nvoid InitGoogleMockImpl(int* argc, CharType** argv) {\n  // Makes sure Google Test is initialized.  InitGoogleTest() is\n  // idempotent, so it's fine if the user has already called it.\n  InitGoogleTest(argc, argv);\n  if (*argc <= 0) return;\n\n  for (int i = 1; i != *argc; i++) {\n    const std::string arg_string = StreamableToString(argv[i]);\n    const char* const arg = arg_string.c_str();\n\n    // Do we see a Google Mock flag?\n    if (ParseGoogleMockBoolFlag(arg, \"catch_leaked_mocks\",\n                                &GMOCK_FLAG(catch_leaked_mocks)) ||\n        ParseGoogleMockStringFlag(arg, \"verbose\", &GMOCK_FLAG(verbose)) ||\n        ParseGoogleMockIntFlag(arg, \"default_mock_behavior\",\n                               &GMOCK_FLAG(default_mock_behavior))) {\n      // Yes.  Shift the remainder of the argv list left by one.  Note\n      // that argv has (*argc + 1) elements, the last one always being\n      // NULL.  The following loop moves the trailing NULL element as\n      // well.\n      for (int j = i; j != *argc; j++) {\n        argv[j] = argv[j + 1];\n      }\n\n      // Decrements the argument count.\n      (*argc)--;\n\n      // We also need to decrement the iterator as we just removed\n      // an element.\n      i--;\n    }\n  }\n}\n\n}  // namespace internal\n\n// Initializes Google Mock.  This must be called before running the\n// tests.  In particular, it parses a command line for the flags that\n// Google Mock recognizes.  Whenever a Google Mock flag is seen, it is\n// removed from argv, and *argc is decremented.\n//\n// No value is returned.  Instead, the Google Mock flag variables are\n// updated.\n//\n// Since Google Test is needed for Google Mock to work, this function\n// also initializes Google Test and parses its flags, if that hasn't\n// been done.\nGTEST_API_ void InitGoogleMock(int* argc, char** argv) {\n  internal::InitGoogleMockImpl(argc, argv);\n}\n\n// This overloaded version can be used in Windows programs compiled in\n// UNICODE mode.\nGTEST_API_ void InitGoogleMock(int* argc, wchar_t** argv) {\n  internal::InitGoogleMockImpl(argc, argv);\n}\n\n// This overloaded version can be used on Arduino/embedded platforms where\n// there is no argc/argv.\nGTEST_API_ void InitGoogleMock() {\n  // Since Arduino doesn't have a command line, fake out the argc/argv arguments\n  int argc = 1;\n  const auto arg0 = \"dummy\";\n  char* argv0 = const_cast<char*>(arg0);\n  char** argv = &argv0;\n\n  internal::InitGoogleMockImpl(&argc, argv);\n}\n\n}  // namespace testing\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/gmock_main.cc",
    "content": "// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: wan@google.com (Zhanyong Wan)\n\n#include <iostream>\n#include \"gflags/gflags.h\"\n#include \"glog/logging.h\"\n#include \"gmock/gmock.h\"\n#include \"gtest/gtest.h\"\n\n// NOTE(keir): This flag is normally part of gtest within Google but isn't in\n// the open source Google Test, since it is build-system dependent. However for\n// Ceres this is needed for our tests. Add the new flag here.\nDEFINE_string(test_srcdir, \"\", \"The location of the source code.\");\n\n// MS C++ compiler/linker has a bug on Windows (not on Windows CE), which\n// causes a link error when _tmain is defined in a static library and UNICODE\n// is enabled. For this reason instead of _tmain, main function is used on\n// Windows. See the following link to track the current status of this bug:\n// http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=394464  // NOLINT\n#if GTEST_OS_WINDOWS_MOBILE\n# include <tchar.h>  // NOLINT\n\nGTEST_API_ int _tmain(int argc, TCHAR** argv) {\n#else\nGTEST_API_ int main(int argc, char** argv) {\n#endif  // GTEST_OS_WINDOWS_MOBILE\n  std::cout << \"Running main() from gmock_main.cc\\n\";\n  google::InitGoogleLogging(argv[0]);\n  // Since Google Mock depends on Google Test, InitGoogleMock() is\n  // also responsible for initializing Google Test.  Therefore there's\n  // no need for calling testing::InitGoogleTest() separately.\n  testing::InitGoogleMock(&argc, argv);\n  // On Windows, gtest passes additional non-gflags command line flags to\n  // death-tests, specifically --gtest_filter & --gtest_internal_run_death_test\n  // in order that these unknown (to gflags) flags do not invoke an error in\n  // gflags, InitGoogleTest() (called by InitGoogleMock()) must be called\n  // before ParseCommandLineFlags() to handle & remove them before gflags\n  // parses the remaining flags.\n  GFLAGS_NAMESPACE::ParseCommandLineFlags(&argc, &argv, true);\n  return RUN_ALL_TESTS();\n}\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/gradient_checker.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2016 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Authors: wjr@google.com (William Rucklidge),\n//          keir@google.com (Keir Mierle),\n//          dgossow@google.com (David Gossow)\n\n#include \"ceres/gradient_checker.h\"\n\n#include <algorithm>\n#include <cmath>\n#include <cstdint>\n#include <numeric>\n#include <string>\n#include <vector>\n\n#include \"ceres/is_close.h\"\n#include \"ceres/stringprintf.h\"\n#include \"ceres/types.h\"\n\nnamespace ceres {\n\nusing internal::IsClose;\nusing internal::StringAppendF;\nusing internal::StringPrintf;\nusing std::string;\nusing std::vector;\n\nnamespace {\n// Evaluate the cost function and transform the returned Jacobians to\n// the local space of the respective local parameterizations.\nbool EvaluateCostFunction(\n    const ceres::CostFunction* function,\n    double const* const * parameters,\n    const std::vector<const ceres::LocalParameterization*>&\n        local_parameterizations,\n    Vector* residuals,\n    std::vector<Matrix>* jacobians,\n    std::vector<Matrix>* local_jacobians) {\n  CHECK(residuals != nullptr);\n  CHECK(jacobians != nullptr);\n  CHECK(local_jacobians != nullptr);\n\n  const vector<int32_t>& block_sizes = function->parameter_block_sizes();\n  const int num_parameter_blocks = block_sizes.size();\n\n  // Allocate Jacobian matrices in local space.\n  local_jacobians->resize(num_parameter_blocks);\n  vector<double*> local_jacobian_data(num_parameter_blocks);\n  for (int i = 0; i < num_parameter_blocks; ++i) {\n    int block_size = block_sizes.at(i);\n    if (local_parameterizations.at(i) != NULL) {\n      block_size = local_parameterizations.at(i)->LocalSize();\n    }\n    local_jacobians->at(i).resize(function->num_residuals(), block_size);\n    local_jacobians->at(i).setZero();\n    local_jacobian_data.at(i) = local_jacobians->at(i).data();\n  }\n\n  // Allocate Jacobian matrices in global space.\n  jacobians->resize(num_parameter_blocks);\n  vector<double*> jacobian_data(num_parameter_blocks);\n  for (int i = 0; i < num_parameter_blocks; ++i) {\n    jacobians->at(i).resize(function->num_residuals(), block_sizes.at(i));\n    jacobians->at(i).setZero();\n    jacobian_data.at(i) = jacobians->at(i).data();\n  }\n\n  // Compute residuals & jacobians.\n  CHECK_NE(0, function->num_residuals());\n  residuals->resize(function->num_residuals());\n  residuals->setZero();\n  if (!function->Evaluate(parameters, residuals->data(),\n                          jacobian_data.data())) {\n    return false;\n  }\n\n  // Convert Jacobians from global to local space.\n  for (size_t i = 0; i < local_jacobians->size(); ++i) {\n    if (local_parameterizations.at(i) == NULL) {\n      local_jacobians->at(i) = jacobians->at(i);\n    } else {\n      int global_size = local_parameterizations.at(i)->GlobalSize();\n      int local_size = local_parameterizations.at(i)->LocalSize();\n      CHECK_EQ(jacobians->at(i).cols(), global_size);\n      Matrix global_J_local(global_size, local_size);\n      local_parameterizations.at(i)->ComputeJacobian(\n          parameters[i], global_J_local.data());\n      local_jacobians->at(i).noalias() = jacobians->at(i) * global_J_local;\n    }\n  }\n  return true;\n}\n} // namespace\n\nGradientChecker::GradientChecker(\n      const CostFunction* function,\n      const vector<const LocalParameterization*>* local_parameterizations,\n      const NumericDiffOptions& options) :\n        function_(function) {\n  CHECK(function != nullptr);\n  if (local_parameterizations != NULL) {\n    local_parameterizations_ = *local_parameterizations;\n  } else {\n    local_parameterizations_.resize(function->parameter_block_sizes().size(),\n                                    NULL);\n  }\n  DynamicNumericDiffCostFunction<CostFunction, RIDDERS>*\n      finite_diff_cost_function =\n      new DynamicNumericDiffCostFunction<CostFunction, RIDDERS>(\n          function, DO_NOT_TAKE_OWNERSHIP, options);\n  finite_diff_cost_function_.reset(finite_diff_cost_function);\n\n  const vector<int32_t>& parameter_block_sizes =\n      function->parameter_block_sizes();\n  const int num_parameter_blocks = parameter_block_sizes.size();\n  for (int i = 0; i < num_parameter_blocks; ++i) {\n    finite_diff_cost_function->AddParameterBlock(parameter_block_sizes[i]);\n  }\n  finite_diff_cost_function->SetNumResiduals(function->num_residuals());\n}\n\nbool GradientChecker::Probe(double const* const * parameters,\n                            double relative_precision,\n                            ProbeResults* results_param) const {\n  int num_residuals = function_->num_residuals();\n\n  // Make sure that we have a place to store results, no matter if the user has\n  // provided an output argument.\n  ProbeResults* results;\n  ProbeResults results_local;\n  if (results_param != NULL) {\n    results = results_param;\n    results->residuals.resize(0);\n    results->jacobians.clear();\n    results->numeric_jacobians.clear();\n    results->local_jacobians.clear();\n    results->local_numeric_jacobians.clear();\n    results->error_log.clear();\n  } else {\n    results = &results_local;\n  }\n  results->maximum_relative_error = 0.0;\n  results->return_value = true;\n\n  // Evaluate the derivative using the user supplied code.\n  vector<Matrix>& jacobians = results->jacobians;\n  vector<Matrix>& local_jacobians = results->local_jacobians;\n  if (!EvaluateCostFunction(function_, parameters, local_parameterizations_,\n                       &results->residuals, &jacobians, &local_jacobians)) {\n    results->error_log = \"Function evaluation with Jacobians failed.\";\n    results->return_value = false;\n  }\n\n  // Evaluate the derivative using numeric derivatives.\n  vector<Matrix>& numeric_jacobians = results->numeric_jacobians;\n  vector<Matrix>& local_numeric_jacobians = results->local_numeric_jacobians;\n  Vector finite_diff_residuals;\n  if (!EvaluateCostFunction(finite_diff_cost_function_.get(), parameters,\n                            local_parameterizations_, &finite_diff_residuals,\n                            &numeric_jacobians, &local_numeric_jacobians)) {\n    results->error_log += \"\\nFunction evaluation with numerical \"\n        \"differentiation failed.\";\n    results->return_value = false;\n  }\n\n  if (!results->return_value) {\n    return false;\n  }\n\n  for (int i = 0; i < num_residuals; ++i) {\n    if (!IsClose(\n        results->residuals[i],\n        finite_diff_residuals[i],\n        relative_precision,\n        NULL,\n        NULL)) {\n      results->error_log = \"Function evaluation with and without Jacobians \"\n          \"resulted in different residuals.\";\n      LOG(INFO) << results->residuals.transpose();\n      LOG(INFO) << finite_diff_residuals.transpose();\n      return false;\n    }\n  }\n\n  // See if any elements have relative error larger than the threshold.\n  int num_bad_jacobian_components = 0;\n  double& worst_relative_error = results->maximum_relative_error;\n  worst_relative_error = 0;\n\n  // Accumulate the error message for all the jacobians, since it won't get\n  // output if there are no bad jacobian components.\n  string error_log;\n  for (int k = 0; k < function_->parameter_block_sizes().size(); k++) {\n    StringAppendF(&error_log,\n                  \"========== \"\n                  \"Jacobian for \" \"block %d: (%ld by %ld)) \"\n                  \"==========\\n\",\n                  k,\n                  static_cast<long>(local_jacobians[k].rows()),\n                  static_cast<long>(local_jacobians[k].cols()));\n    // The funny spacing creates appropriately aligned column headers.\n    error_log +=\n        \" block  row  col        user dx/dy    num diff dx/dy         \"\n        \"abs error    relative error         parameter          residual\\n\";\n\n    for (int i = 0; i < local_jacobians[k].rows(); i++) {\n      for (int j = 0; j < local_jacobians[k].cols(); j++) {\n        double term_jacobian = local_jacobians[k](i, j);\n        double finite_jacobian = local_numeric_jacobians[k](i, j);\n        double relative_error, absolute_error;\n        bool bad_jacobian_entry =\n            !IsClose(term_jacobian,\n                     finite_jacobian,\n                     relative_precision,\n                     &relative_error,\n                     &absolute_error);\n        worst_relative_error = std::max(worst_relative_error, relative_error);\n\n        StringAppendF(&error_log,\n                      \"%6d %4d %4d %17g %17g %17g %17g %17g %17g\",\n                      k, i, j,\n                      term_jacobian, finite_jacobian,\n                      absolute_error, relative_error,\n                      parameters[k][j],\n                      results->residuals[i]);\n\n        if (bad_jacobian_entry) {\n          num_bad_jacobian_components++;\n          StringAppendF(\n              &error_log,\n              \" ------ (%d,%d,%d) Relative error worse than %g\",\n              k, i, j, relative_precision);\n        }\n        error_log += \"\\n\";\n      }\n    }\n  }\n\n  // Since there were some bad errors, dump comprehensive debug info.\n  if (num_bad_jacobian_components) {\n    string header = StringPrintf(\"\\nDetected %d bad Jacobian component(s). \"\n        \"Worst relative error was %g.\\n\",\n        num_bad_jacobian_components,\n        worst_relative_error);\n     results->error_log = header + \"\\n\" + error_log;\n    return false;\n  }\n  return true;\n}\n\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/gradient_checker_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2016 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: wjr@google.com (William Rucklidge)\n//\n// This file contains tests for the GradientChecker class.\n\n#include \"ceres/gradient_checker.h\"\n\n#include <cmath>\n#include <cstdlib>\n#include <vector>\n\n#include \"ceres/cost_function.h\"\n#include \"ceres/problem.h\"\n#include \"ceres/random.h\"\n#include \"ceres/solver.h\"\n#include \"ceres/test_util.h\"\n#include \"glog/logging.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::vector;\nconst double kTolerance = 1e-12;\n\n// We pick a (non-quadratic) function whose derivative are easy:\n//\n//    f = exp(- a' x).\n//   df = - f a.\n//\n// where 'a' is a vector of the same size as 'x'. In the block\n// version, they are both block vectors, of course.\nclass GoodTestTerm : public CostFunction {\n public:\n  GoodTestTerm(int arity, int const* dim) : arity_(arity), return_value_(true) {\n    // Make 'arity' random vectors.\n    a_.resize(arity_);\n    for (int j = 0; j < arity_; ++j) {\n      a_[j].resize(dim[j]);\n      for (int u = 0; u < dim[j]; ++u) {\n        a_[j][u] = 2.0 * RandDouble() - 1.0;\n      }\n    }\n\n    for (int i = 0; i < arity_; i++) {\n      mutable_parameter_block_sizes()->push_back(dim[i]);\n    }\n    set_num_residuals(1);\n  }\n\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const {\n    if (!return_value_) {\n      return false;\n    }\n    // Compute a . x.\n    double ax = 0;\n    for (int j = 0; j < arity_; ++j) {\n      for (int u = 0; u < parameter_block_sizes()[j]; ++u) {\n        ax += a_[j][u] * parameters[j][u];\n      }\n    }\n\n    // This is the cost, but also appears as a factor\n    // in the derivatives.\n    double f = *residuals = exp(-ax);\n\n    // Accumulate 1st order derivatives.\n    if (jacobians) {\n      for (int j = 0; j < arity_; ++j) {\n        if (jacobians[j]) {\n          for (int u = 0; u < parameter_block_sizes()[j]; ++u) {\n            // See comments before class.\n            jacobians[j][u] = -f * a_[j][u];\n          }\n        }\n      }\n    }\n\n    return true;\n  }\n\n  void SetReturnValue(bool return_value) { return_value_ = return_value; }\n\n private:\n  int arity_;\n  bool return_value_;\n  vector<vector<double>> a_;  // our vectors.\n};\n\nclass BadTestTerm : public CostFunction {\n public:\n  BadTestTerm(int arity, int const* dim) : arity_(arity) {\n    // Make 'arity' random vectors.\n    a_.resize(arity_);\n    for (int j = 0; j < arity_; ++j) {\n      a_[j].resize(dim[j]);\n      for (int u = 0; u < dim[j]; ++u) {\n        a_[j][u] = 2.0 * RandDouble() - 1.0;\n      }\n    }\n\n    for (int i = 0; i < arity_; i++) {\n      mutable_parameter_block_sizes()->push_back(dim[i]);\n    }\n    set_num_residuals(1);\n  }\n\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const {\n    // Compute a . x.\n    double ax = 0;\n    for (int j = 0; j < arity_; ++j) {\n      for (int u = 0; u < parameter_block_sizes()[j]; ++u) {\n        ax += a_[j][u] * parameters[j][u];\n      }\n    }\n\n    // This is the cost, but also appears as a factor\n    // in the derivatives.\n    double f = *residuals = exp(-ax);\n\n    // Accumulate 1st order derivatives.\n    if (jacobians) {\n      for (int j = 0; j < arity_; ++j) {\n        if (jacobians[j]) {\n          for (int u = 0; u < parameter_block_sizes()[j]; ++u) {\n            // See comments before class.\n            jacobians[j][u] = -f * a_[j][u] + kTolerance;\n          }\n        }\n      }\n    }\n\n    return true;\n  }\n\n private:\n  int arity_;\n  vector<vector<double>> a_;  // our vectors.\n};\n\n\n\nstatic void CheckDimensions(const GradientChecker::ProbeResults& results,\n                            const std::vector<int>& parameter_sizes,\n                            const std::vector<int>& local_parameter_sizes,\n                            int residual_size) {\n  CHECK_EQ(parameter_sizes.size(), local_parameter_sizes.size());\n  int num_parameters = parameter_sizes.size();\n  ASSERT_EQ(residual_size, results.residuals.size());\n  ASSERT_EQ(num_parameters, results.local_jacobians.size());\n  ASSERT_EQ(num_parameters, results.local_numeric_jacobians.size());\n  ASSERT_EQ(num_parameters, results.jacobians.size());\n  ASSERT_EQ(num_parameters, results.numeric_jacobians.size());\n  for (int i = 0; i < num_parameters; ++i) {\n    EXPECT_EQ(residual_size, results.local_jacobians.at(i).rows());\n    EXPECT_EQ(local_parameter_sizes[i], results.local_jacobians.at(i).cols());\n    EXPECT_EQ(residual_size, results.local_numeric_jacobians.at(i).rows());\n    EXPECT_EQ(local_parameter_sizes[i],\n              results.local_numeric_jacobians.at(i).cols());\n    EXPECT_EQ(residual_size, results.jacobians.at(i).rows());\n    EXPECT_EQ(parameter_sizes[i], results.jacobians.at(i).cols());\n    EXPECT_EQ(residual_size, results.numeric_jacobians.at(i).rows());\n    EXPECT_EQ(parameter_sizes[i], results.numeric_jacobians.at(i).cols());\n  }\n}\n\nTEST(GradientChecker, SmokeTest) {\n  srand(5);\n\n  // Test with 3 blocks of size 2, 3 and 4.\n  int const num_parameters = 3;\n  std::vector<int> parameter_sizes(3);\n  parameter_sizes[0] = 2;\n  parameter_sizes[1] = 3;\n  parameter_sizes[2] = 4;\n\n  // Make a random set of blocks.\n  FixedArray<double*> parameters(num_parameters);\n  for (int j = 0; j < num_parameters; ++j) {\n    parameters[j] = new double[parameter_sizes[j]];\n    for (int u = 0; u < parameter_sizes[j]; ++u) {\n      parameters[j][u] = 2.0 * RandDouble() - 1.0;\n    }\n  }\n\n  NumericDiffOptions numeric_diff_options;\n  GradientChecker::ProbeResults results;\n\n  // Test that Probe returns true for correct Jacobians.\n  GoodTestTerm good_term(num_parameters, parameter_sizes.data());\n  GradientChecker good_gradient_checker(&good_term, NULL, numeric_diff_options);\n  EXPECT_TRUE(good_gradient_checker.Probe(parameters.data(), kTolerance, NULL));\n  EXPECT_TRUE(\n      good_gradient_checker.Probe(parameters.data(), kTolerance, &results))\n      << results.error_log;\n\n  // Check that results contain sensible data.\n  ASSERT_EQ(results.return_value, true);\n  ASSERT_EQ(results.residuals.size(), 1);\n  CheckDimensions(results, parameter_sizes, parameter_sizes, 1);\n  EXPECT_GE(results.maximum_relative_error, 0.0);\n  EXPECT_TRUE(results.error_log.empty());\n\n  // Test that if the cost function return false, Probe should return false.\n  good_term.SetReturnValue(false);\n  EXPECT_FALSE(\n      good_gradient_checker.Probe(parameters.data(), kTolerance, NULL));\n  EXPECT_FALSE(\n      good_gradient_checker.Probe(parameters.data(), kTolerance, &results))\n      << results.error_log;\n\n  // Check that results contain sensible data.\n  ASSERT_EQ(results.return_value, false);\n  ASSERT_EQ(results.residuals.size(), 1);\n  CheckDimensions(results, parameter_sizes, parameter_sizes, 1);\n  for (int i = 0; i < num_parameters; ++i) {\n    EXPECT_EQ(results.local_jacobians.at(i).norm(), 0);\n    EXPECT_EQ(results.local_numeric_jacobians.at(i).norm(), 0);\n  }\n  EXPECT_EQ(results.maximum_relative_error, 0.0);\n  EXPECT_FALSE(results.error_log.empty());\n\n  // Test that Probe returns false for incorrect Jacobians.\n  BadTestTerm bad_term(num_parameters, parameter_sizes.data());\n  GradientChecker bad_gradient_checker(&bad_term, NULL, numeric_diff_options);\n  EXPECT_FALSE(bad_gradient_checker.Probe(parameters.data(), kTolerance, NULL));\n  EXPECT_FALSE(\n      bad_gradient_checker.Probe(parameters.data(), kTolerance, &results));\n\n  // Check that results contain sensible data.\n  ASSERT_EQ(results.return_value, true);\n  ASSERT_EQ(results.residuals.size(), 1);\n  CheckDimensions(results, parameter_sizes, parameter_sizes, 1);\n  EXPECT_GT(results.maximum_relative_error, kTolerance);\n  EXPECT_FALSE(results.error_log.empty());\n\n  // Setting a high threshold should make the test pass.\n  EXPECT_TRUE(bad_gradient_checker.Probe(parameters.data(), 1.0, &results));\n\n  // Check that results contain sensible data.\n  ASSERT_EQ(results.return_value, true);\n  ASSERT_EQ(results.residuals.size(), 1);\n  CheckDimensions(results, parameter_sizes, parameter_sizes, 1);\n  EXPECT_GT(results.maximum_relative_error, 0.0);\n  EXPECT_TRUE(results.error_log.empty());\n\n  for (int j = 0; j < num_parameters; j++) {\n    delete[] parameters[j];\n  }\n}\n\n/**\n * Helper cost function that multiplies the parameters by the given jacobians\n * and adds a constant offset.\n */\nclass LinearCostFunction : public CostFunction {\n public:\n  explicit LinearCostFunction(const Vector& residuals_offset)\n      : residuals_offset_(residuals_offset) {\n    set_num_residuals(residuals_offset_.size());\n  }\n\n  bool Evaluate(double const* const* parameter_ptrs,\n                double* residuals_ptr,\n                double** residual_J_params) const final {\n    CHECK_GE(residual_J_params_.size(), 0.0);\n    VectorRef residuals(residuals_ptr, residual_J_params_[0].rows());\n    residuals = residuals_offset_;\n\n    for (size_t i = 0; i < residual_J_params_.size(); ++i) {\n      const Matrix& residual_J_param = residual_J_params_[i];\n      int parameter_size = residual_J_param.cols();\n      ConstVectorRef param(parameter_ptrs[i], parameter_size);\n\n      // Compute residual.\n      residuals += residual_J_param * param;\n\n      // Return Jacobian.\n      if (residual_J_params != NULL && residual_J_params[i] != NULL) {\n        Eigen::Map<Matrix> residual_J_param_out(residual_J_params[i],\n                                                residual_J_param.rows(),\n                                                residual_J_param.cols());\n        if (jacobian_offsets_.count(i) != 0) {\n          residual_J_param_out = residual_J_param + jacobian_offsets_.at(i);\n        } else {\n          residual_J_param_out = residual_J_param;\n        }\n      }\n    }\n    return true;\n  }\n\n  void AddParameter(const Matrix& residual_J_param) {\n    CHECK_EQ(num_residuals(), residual_J_param.rows());\n    residual_J_params_.push_back(residual_J_param);\n    mutable_parameter_block_sizes()->push_back(residual_J_param.cols());\n  }\n\n  /// Add offset to the given Jacobian before returning it from Evaluate(),\n  /// thus introducing an error in the comutation.\n  void SetJacobianOffset(size_t index, Matrix offset) {\n    CHECK_LT(index, residual_J_params_.size());\n    CHECK_EQ(residual_J_params_[index].rows(), offset.rows());\n    CHECK_EQ(residual_J_params_[index].cols(), offset.cols());\n    jacobian_offsets_[index] = offset;\n  }\n\n private:\n  std::vector<Matrix> residual_J_params_;\n  std::map<int, Matrix> jacobian_offsets_;\n  Vector residuals_offset_;\n};\n\n/**\n * Helper local parameterization that multiplies the delta vector by the given\n * jacobian and adds it to the parameter.\n */\nclass MatrixParameterization : public LocalParameterization {\n public:\n  bool Plus(const double* x,\n            const double* delta,\n            double* x_plus_delta) const final {\n    VectorRef(x_plus_delta, GlobalSize()) =\n        ConstVectorRef(x, GlobalSize()) +\n        (global_J_local * ConstVectorRef(delta, LocalSize()));\n    return true;\n  }\n\n  bool ComputeJacobian(const double* /*x*/, double* jacobian) const final {\n    MatrixRef(jacobian, GlobalSize(), LocalSize()) = global_J_local;\n    return true;\n  }\n\n  int GlobalSize() const final { return global_J_local.rows(); }\n  int LocalSize() const final { return global_J_local.cols(); }\n\n  Matrix global_J_local;\n};\n\n// Helper function to compare two Eigen matrices (used in the test below).\nstatic void ExpectMatricesClose(Matrix p, Matrix q, double tolerance) {\n  ASSERT_EQ(p.rows(), q.rows());\n  ASSERT_EQ(p.cols(), q.cols());\n  ExpectArraysClose(p.size(), p.data(), q.data(), tolerance);\n}\n\nTEST(GradientChecker, TestCorrectnessWithLocalParameterizations) {\n  // Create cost function.\n  Eigen::Vector3d residual_offset(100.0, 200.0, 300.0);\n  LinearCostFunction cost_function(residual_offset);\n  Eigen::Matrix<double, 3, 3, Eigen::RowMajor> j0;\n  j0.row(0) << 1.0, 2.0, 3.0;\n  j0.row(1) << 4.0, 5.0, 6.0;\n  j0.row(2) << 7.0, 8.0, 9.0;\n  Eigen::Matrix<double, 3, 2, Eigen::RowMajor> j1;\n  j1.row(0) << 10.0, 11.0;\n  j1.row(1) << 12.0, 13.0;\n  j1.row(2) << 14.0, 15.0;\n\n  Eigen::Vector3d param0(1.0, 2.0, 3.0);\n  Eigen::Vector2d param1(4.0, 5.0);\n\n  cost_function.AddParameter(j0);\n  cost_function.AddParameter(j1);\n\n  std::vector<int> parameter_sizes(2);\n  parameter_sizes[0] = 3;\n  parameter_sizes[1] = 2;\n  std::vector<int> local_parameter_sizes(2);\n  local_parameter_sizes[0] = 2;\n  local_parameter_sizes[1] = 2;\n\n  // Test cost function for correctness.\n  Eigen::Matrix<double, 3, 3, Eigen::RowMajor> j1_out;\n  Eigen::Matrix<double, 3, 2, Eigen::RowMajor> j2_out;\n  Eigen::Vector3d residual;\n  std::vector<const double*> parameters(2);\n  parameters[0] = param0.data();\n  parameters[1] = param1.data();\n  std::vector<double*> jacobians(2);\n  jacobians[0] = j1_out.data();\n  jacobians[1] = j2_out.data();\n  cost_function.Evaluate(parameters.data(), residual.data(), jacobians.data());\n\n  Matrix residual_expected = residual_offset + j0 * param0 + j1 * param1;\n\n  ExpectMatricesClose(j1_out, j0, std::numeric_limits<double>::epsilon());\n  ExpectMatricesClose(j2_out, j1, std::numeric_limits<double>::epsilon());\n  ExpectMatricesClose(residual, residual_expected, kTolerance);\n\n  // Create local parameterization.\n  Eigen::Matrix<double, 3, 2, Eigen::RowMajor> global_J_local;\n  global_J_local.row(0) << 1.5, 2.5;\n  global_J_local.row(1) << 3.5, 4.5;\n  global_J_local.row(2) << 5.5, 6.5;\n\n  MatrixParameterization parameterization;\n  parameterization.global_J_local = global_J_local;\n\n  // Test local parameterization for correctness.\n  Eigen::Vector3d x(7.0, 8.0, 9.0);\n  Eigen::Vector2d delta(10.0, 11.0);\n\n  Eigen::Matrix<double, 3, 2, Eigen::RowMajor> global_J_local_out;\n  parameterization.ComputeJacobian(x.data(), global_J_local_out.data());\n  ExpectMatricesClose(global_J_local_out,\n                      global_J_local,\n                      std::numeric_limits<double>::epsilon());\n\n  Eigen::Vector3d x_plus_delta;\n  parameterization.Plus(x.data(), delta.data(), x_plus_delta.data());\n  Eigen::Vector3d x_plus_delta_expected = x + (global_J_local * delta);\n  ExpectMatricesClose(x_plus_delta, x_plus_delta_expected, kTolerance);\n\n  // Now test GradientChecker.\n  std::vector<const LocalParameterization*> parameterizations(2);\n  parameterizations[0] = &parameterization;\n  parameterizations[1] = NULL;\n  NumericDiffOptions numeric_diff_options;\n  GradientChecker::ProbeResults results;\n  GradientChecker gradient_checker(\n      &cost_function, &parameterizations, numeric_diff_options);\n\n  Problem::Options problem_options;\n  problem_options.cost_function_ownership = DO_NOT_TAKE_OWNERSHIP;\n  problem_options.local_parameterization_ownership = DO_NOT_TAKE_OWNERSHIP;\n  Problem problem(problem_options);\n  Eigen::Vector3d param0_solver;\n  Eigen::Vector2d param1_solver;\n  problem.AddParameterBlock(param0_solver.data(), 3, &parameterization);\n  problem.AddParameterBlock(param1_solver.data(), 2);\n  problem.AddResidualBlock(\n      &cost_function, NULL, param0_solver.data(), param1_solver.data());\n  Solver::Options solver_options;\n  solver_options.check_gradients = true;\n  solver_options.initial_trust_region_radius = 1e10;\n  Solver solver;\n  Solver::Summary summary;\n\n  // First test case: everything is correct.\n  EXPECT_TRUE(gradient_checker.Probe(parameters.data(), kTolerance, NULL));\n  EXPECT_TRUE(gradient_checker.Probe(parameters.data(), kTolerance, &results))\n      << results.error_log;\n\n  // Check that results contain correct data.\n  ASSERT_EQ(results.return_value, true);\n  ExpectMatricesClose(\n      results.residuals, residual, std::numeric_limits<double>::epsilon());\n  CheckDimensions(results, parameter_sizes, local_parameter_sizes, 3);\n  ExpectMatricesClose(\n      results.local_jacobians.at(0), j0 * global_J_local, kTolerance);\n  ExpectMatricesClose(results.local_jacobians.at(1),\n                      j1,\n                      std::numeric_limits<double>::epsilon());\n  ExpectMatricesClose(\n      results.local_numeric_jacobians.at(0), j0 * global_J_local, kTolerance);\n  ExpectMatricesClose(results.local_numeric_jacobians.at(1), j1, kTolerance);\n  ExpectMatricesClose(\n      results.jacobians.at(0), j0, std::numeric_limits<double>::epsilon());\n  ExpectMatricesClose(\n      results.jacobians.at(1), j1, std::numeric_limits<double>::epsilon());\n  ExpectMatricesClose(results.numeric_jacobians.at(0), j0, kTolerance);\n  ExpectMatricesClose(results.numeric_jacobians.at(1), j1, kTolerance);\n  EXPECT_GE(results.maximum_relative_error, 0.0);\n  EXPECT_TRUE(results.error_log.empty());\n\n  // Test interaction with the 'check_gradients' option in Solver.\n  param0_solver = param0;\n  param1_solver = param1;\n  solver.Solve(solver_options, &problem, &summary);\n  EXPECT_EQ(CONVERGENCE, summary.termination_type);\n  EXPECT_LE(summary.final_cost, 1e-12);\n\n  // Second test case: Mess up reported derivatives with respect to 3rd\n  // component of 1st parameter. Check should fail.\n  Eigen::Matrix<double, 3, 3, Eigen::RowMajor> j0_offset;\n  j0_offset.setZero();\n  j0_offset.col(2).setConstant(0.001);\n  cost_function.SetJacobianOffset(0, j0_offset);\n  EXPECT_FALSE(gradient_checker.Probe(parameters.data(), kTolerance, NULL));\n  EXPECT_FALSE(gradient_checker.Probe(parameters.data(), kTolerance, &results))\n      << results.error_log;\n\n  // Check that results contain correct data.\n  ASSERT_EQ(results.return_value, true);\n  ExpectMatricesClose(\n      results.residuals, residual, std::numeric_limits<double>::epsilon());\n  CheckDimensions(results, parameter_sizes, local_parameter_sizes, 3);\n  ASSERT_EQ(results.local_jacobians.size(), 2);\n  ASSERT_EQ(results.local_numeric_jacobians.size(), 2);\n  ExpectMatricesClose(results.local_jacobians.at(0),\n                      (j0 + j0_offset) * global_J_local,\n                      kTolerance);\n  ExpectMatricesClose(results.local_jacobians.at(1),\n                      j1,\n                      std::numeric_limits<double>::epsilon());\n  ExpectMatricesClose(\n      results.local_numeric_jacobians.at(0), j0 * global_J_local, kTolerance);\n  ExpectMatricesClose(results.local_numeric_jacobians.at(1), j1, kTolerance);\n  ExpectMatricesClose(results.jacobians.at(0), j0 + j0_offset, kTolerance);\n  ExpectMatricesClose(\n      results.jacobians.at(1), j1, std::numeric_limits<double>::epsilon());\n  ExpectMatricesClose(results.numeric_jacobians.at(0), j0, kTolerance);\n  ExpectMatricesClose(results.numeric_jacobians.at(1), j1, kTolerance);\n  EXPECT_GT(results.maximum_relative_error, 0.0);\n  EXPECT_FALSE(results.error_log.empty());\n\n  // Test interaction with the 'check_gradients' option in Solver.\n  param0_solver = param0;\n  param1_solver = param1;\n  solver.Solve(solver_options, &problem, &summary);\n  EXPECT_EQ(FAILURE, summary.termination_type);\n\n  // Now, zero out the local parameterization Jacobian of the 1st parameter\n  // with respect to the 3rd component. This makes the combination of\n  // cost function and local parameterization return correct values again.\n  parameterization.global_J_local.row(2).setZero();\n\n  // Verify that the gradient checker does not treat this as an error.\n  EXPECT_TRUE(gradient_checker.Probe(parameters.data(), kTolerance, &results))\n      << results.error_log;\n\n  // Check that results contain correct data.\n  ASSERT_EQ(results.return_value, true);\n  ExpectMatricesClose(\n      results.residuals, residual, std::numeric_limits<double>::epsilon());\n  CheckDimensions(results, parameter_sizes, local_parameter_sizes, 3);\n  ASSERT_EQ(results.local_jacobians.size(), 2);\n  ASSERT_EQ(results.local_numeric_jacobians.size(), 2);\n  ExpectMatricesClose(results.local_jacobians.at(0),\n                      (j0 + j0_offset) * parameterization.global_J_local,\n                      kTolerance);\n  ExpectMatricesClose(results.local_jacobians.at(1),\n                      j1,\n                      std::numeric_limits<double>::epsilon());\n  ExpectMatricesClose(results.local_numeric_jacobians.at(0),\n                      j0 * parameterization.global_J_local,\n                      kTolerance);\n  ExpectMatricesClose(results.local_numeric_jacobians.at(1), j1, kTolerance);\n  ExpectMatricesClose(results.jacobians.at(0), j0 + j0_offset, kTolerance);\n  ExpectMatricesClose(\n      results.jacobians.at(1), j1, std::numeric_limits<double>::epsilon());\n  ExpectMatricesClose(results.numeric_jacobians.at(0), j0, kTolerance);\n  ExpectMatricesClose(results.numeric_jacobians.at(1), j1, kTolerance);\n  EXPECT_GE(results.maximum_relative_error, 0.0);\n  EXPECT_TRUE(results.error_log.empty());\n\n  // Test interaction with the 'check_gradients' option in Solver.\n  param0_solver = param0;\n  param1_solver = param1;\n  solver.Solve(solver_options, &problem, &summary);\n  EXPECT_EQ(CONVERGENCE, summary.termination_type);\n  EXPECT_LE(summary.final_cost, 1e-12);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/gradient_checking_cost_function.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Authors: keir@google.com (Keir Mierle),\n//          dgossow@google.com (David Gossow)\n\n#include \"ceres/gradient_checking_cost_function.h\"\n\n#include <algorithm>\n#include <cmath>\n#include <cstdint>\n#include <numeric>\n#include <string>\n#include <vector>\n\n#include \"ceres/gradient_checker.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/parameter_block.h\"\n#include \"ceres/problem.h\"\n#include \"ceres/problem_impl.h\"\n#include \"ceres/program.h\"\n#include \"ceres/residual_block.h\"\n#include \"ceres/dynamic_numeric_diff_cost_function.h\"\n#include \"ceres/stringprintf.h\"\n#include \"ceres/types.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::abs;\nusing std::max;\nusing std::string;\nusing std::vector;\n\nnamespace {\n\nclass GradientCheckingCostFunction : public CostFunction {\n public:\n  GradientCheckingCostFunction(\n      const CostFunction* function,\n      const std::vector<const LocalParameterization*>* local_parameterizations,\n      const NumericDiffOptions& options,\n      double relative_precision,\n      const string& extra_info,\n      GradientCheckingIterationCallback* callback)\n      : function_(function),\n        gradient_checker_(function, local_parameterizations, options),\n        relative_precision_(relative_precision),\n        extra_info_(extra_info),\n        callback_(callback) {\n    CHECK(callback_ != nullptr);\n    const vector<int32_t>& parameter_block_sizes =\n        function->parameter_block_sizes();\n    *mutable_parameter_block_sizes() = parameter_block_sizes;\n    set_num_residuals(function->num_residuals());\n  }\n\n  virtual ~GradientCheckingCostFunction() { }\n\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const final {\n    if (!jacobians) {\n      // Nothing to check in this case; just forward.\n      return function_->Evaluate(parameters, residuals, NULL);\n    }\n\n    GradientChecker::ProbeResults results;\n    bool okay = gradient_checker_.Probe(parameters,\n                                        relative_precision_,\n                                        &results);\n\n    // If the cost function returned false, there's nothing we can say about\n    // the gradients.\n    if (results.return_value == false) {\n      return false;\n    }\n\n    // Copy the residuals.\n    const int num_residuals = function_->num_residuals();\n    MatrixRef(residuals, num_residuals, 1) = results.residuals;\n\n    // Copy the original jacobian blocks into the jacobians array.\n    const vector<int32_t>& block_sizes = function_->parameter_block_sizes();\n    for (int k = 0; k < block_sizes.size(); k++) {\n      if (jacobians[k] != NULL) {\n        MatrixRef(jacobians[k],\n                  results.jacobians[k].rows(),\n                  results.jacobians[k].cols()) = results.jacobians[k];\n      }\n    }\n\n    if (!okay) {\n      std::string error_log = \"Gradient Error detected!\\nExtra info for \"\n          \"this residual: \" + extra_info_ + \"\\n\" + results.error_log;\n      callback_->SetGradientErrorDetected(error_log);\n    }\n    return true;\n  }\n\n private:\n  const CostFunction* function_;\n  GradientChecker gradient_checker_;\n  double relative_precision_;\n  string extra_info_;\n  GradientCheckingIterationCallback* callback_;\n};\n\n}  // namespace\n\nGradientCheckingIterationCallback::GradientCheckingIterationCallback()\n    : gradient_error_detected_(false) {\n}\n\nCallbackReturnType GradientCheckingIterationCallback::operator()(\n    const IterationSummary& summary) {\n  if (gradient_error_detected_) {\n    LOG(ERROR)<< \"Gradient error detected. Terminating solver.\";\n    return SOLVER_ABORT;\n  }\n  return SOLVER_CONTINUE;\n}\nvoid GradientCheckingIterationCallback::SetGradientErrorDetected(\n    std::string& error_log) {\n  std::lock_guard<std::mutex> l(mutex_);\n  gradient_error_detected_ = true;\n  error_log_ += \"\\n\" + error_log;\n}\n\nCostFunction* CreateGradientCheckingCostFunction(\n    const CostFunction* cost_function,\n    const std::vector<const LocalParameterization*>* local_parameterizations,\n    double relative_step_size,\n    double relative_precision,\n    const std::string& extra_info,\n    GradientCheckingIterationCallback* callback) {\n  NumericDiffOptions numeric_diff_options;\n  numeric_diff_options.relative_step_size = relative_step_size;\n\n  return new GradientCheckingCostFunction(cost_function,\n                                          local_parameterizations,\n                                          numeric_diff_options,\n                                          relative_precision, extra_info,\n                                          callback);\n}\n\nProblemImpl* CreateGradientCheckingProblemImpl(\n    ProblemImpl* problem_impl,\n    double relative_step_size,\n    double relative_precision,\n    GradientCheckingIterationCallback* callback) {\n  CHECK(callback != nullptr);\n  // We create new CostFunctions by wrapping the original CostFunction\n  // in a gradient checking CostFunction. So its okay for the\n  // ProblemImpl to take ownership of it and destroy it. The\n  // LossFunctions and LocalParameterizations are reused and since\n  // they are owned by problem_impl, gradient_checking_problem_impl\n  // should not take ownership of it.\n  Problem::Options gradient_checking_problem_options;\n  gradient_checking_problem_options.cost_function_ownership = TAKE_OWNERSHIP;\n  gradient_checking_problem_options.loss_function_ownership =\n      DO_NOT_TAKE_OWNERSHIP;\n  gradient_checking_problem_options.local_parameterization_ownership =\n      DO_NOT_TAKE_OWNERSHIP;\n  gradient_checking_problem_options.context = problem_impl->context();\n\n  NumericDiffOptions numeric_diff_options;\n  numeric_diff_options.relative_step_size = relative_step_size;\n\n  ProblemImpl* gradient_checking_problem_impl = new ProblemImpl(\n      gradient_checking_problem_options);\n\n  Program* program = problem_impl->mutable_program();\n\n  // For every ParameterBlock in problem_impl, create a new parameter\n  // block with the same local parameterization and constancy.\n  const vector<ParameterBlock*>& parameter_blocks = program->parameter_blocks();\n  for (int i = 0; i < parameter_blocks.size(); ++i) {\n    ParameterBlock* parameter_block = parameter_blocks[i];\n    gradient_checking_problem_impl->AddParameterBlock(\n        parameter_block->mutable_user_state(),\n        parameter_block->Size(),\n        parameter_block->mutable_local_parameterization());\n\n    if (parameter_block->IsConstant()) {\n      gradient_checking_problem_impl->SetParameterBlockConstant(\n          parameter_block->mutable_user_state());\n    }\n\n    for (int i = 0; i <  parameter_block->Size(); ++i) {\n      gradient_checking_problem_impl->SetParameterUpperBound(\n          parameter_block->mutable_user_state(),\n          i,\n          parameter_block->UpperBound(i));\n      gradient_checking_problem_impl->SetParameterLowerBound(\n          parameter_block->mutable_user_state(),\n          i,\n          parameter_block->LowerBound(i));\n    }\n  }\n\n  // For every ResidualBlock in problem_impl, create a new\n  // ResidualBlock by wrapping its CostFunction inside a\n  // GradientCheckingCostFunction.\n  const vector<ResidualBlock*>& residual_blocks = program->residual_blocks();\n  for (int i = 0; i < residual_blocks.size(); ++i) {\n    ResidualBlock* residual_block = residual_blocks[i];\n\n    // Build a human readable string which identifies the\n    // ResidualBlock. This is used by the GradientCheckingCostFunction\n    // when logging debugging information.\n    string extra_info = StringPrintf(\n        \"Residual block id %d; depends on parameters [\", i);\n    vector<double*> parameter_blocks;\n    vector<const LocalParameterization*> local_parameterizations;\n    parameter_blocks.reserve(residual_block->NumParameterBlocks());\n    local_parameterizations.reserve(residual_block->NumParameterBlocks());\n    for (int j = 0; j < residual_block->NumParameterBlocks(); ++j) {\n      ParameterBlock* parameter_block = residual_block->parameter_blocks()[j];\n      parameter_blocks.push_back(parameter_block->mutable_user_state());\n      StringAppendF(&extra_info, \"%p\", parameter_block->mutable_user_state());\n      extra_info += (j < residual_block->NumParameterBlocks() - 1) ? \", \" : \"]\";\n      local_parameterizations.push_back(problem_impl->GetParameterization(\n          parameter_block->mutable_user_state()));\n    }\n\n    // Wrap the original CostFunction in a GradientCheckingCostFunction.\n    CostFunction* gradient_checking_cost_function =\n        new GradientCheckingCostFunction(residual_block->cost_function(),\n                                         &local_parameterizations,\n                                         numeric_diff_options,\n                                         relative_precision,\n                                         extra_info,\n                                         callback);\n\n    // The const_cast is necessary because\n    // ProblemImpl::AddResidualBlock can potentially take ownership of\n    // the LossFunction, but in this case we are guaranteed that this\n    // will not be the case, so this const_cast is harmless.\n    gradient_checking_problem_impl->AddResidualBlock(\n        gradient_checking_cost_function,\n        const_cast<LossFunction*>(residual_block->loss_function()),\n        parameter_blocks.data(),\n        static_cast<int>(parameter_blocks.size()));\n  }\n\n  // Normally, when a problem is given to the solver, we guarantee\n  // that the state pointers for each parameter block point to the\n  // user provided data. Since we are creating this new problem from a\n  // problem given to us at an arbitrary stage of the solve, we cannot\n  // depend on this being the case, so we explicitly call\n  // SetParameterBlockStatePtrsToUserStatePtrs to ensure that this is\n  // the case.\n  gradient_checking_problem_impl\n      ->mutable_program()\n      ->SetParameterBlockStatePtrsToUserStatePtrs();\n\n  return gradient_checking_problem_impl;\n}\n\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/gradient_checking_cost_function.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Authors: keir@google.com (Keir Mierle),\n//          dgossow@google.com (David Gossow)\n\n#ifndef CERES_INTERNAL_GRADIENT_CHECKING_COST_FUNCTION_H_\n#define CERES_INTERNAL_GRADIENT_CHECKING_COST_FUNCTION_H_\n\n#include <mutex>\n#include <string>\n\n#include \"ceres/cost_function.h\"\n#include \"ceres/iteration_callback.h\"\n#include \"ceres/local_parameterization.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass ProblemImpl;\n\n// Callback that collects information about gradient checking errors, and\n// will abort the solve as soon as an error occurs.\nclass GradientCheckingIterationCallback : public IterationCallback {\n public:\n  GradientCheckingIterationCallback();\n\n  // Will return SOLVER_CONTINUE until a gradient error has been detected,\n  // then return SOLVER_ABORT.\n  CallbackReturnType operator()(const IterationSummary& summary) final;\n\n  // Notify this that a gradient error has occurred (thread safe).\n  void SetGradientErrorDetected(std::string& error_log);\n\n  // Retrieve error status (not thread safe).\n  bool gradient_error_detected() const { return gradient_error_detected_; }\n  const std::string& error_log() const { return error_log_; }\n private:\n  bool gradient_error_detected_;\n  std::string error_log_;\n  std::mutex mutex_;\n};\n\n// Creates a CostFunction that checks the Jacobians that cost_function computes\n// with finite differences. This API is only intended for unit tests that intend\n// to  check the functionality of the GradientCheckingCostFunction\n// implementation directly.\nCostFunction* CreateGradientCheckingCostFunction(\n    const CostFunction* cost_function,\n    const std::vector<const LocalParameterization*>* local_parameterizations,\n    double relative_step_size,\n    double relative_precision,\n    const std::string& extra_info,\n    GradientCheckingIterationCallback* callback);\n\n// Create a new ProblemImpl object from the input problem_impl, where all\n// cost functions are wrapped so that each time their Evaluate method is called,\n// an additional check is performed that compares the Jacobians computed by\n// the original cost function with alternative Jacobians computed using\n// numerical differentiation. If local parameterizations are given for any\n// parameters, the Jacobians will be compared in the local space instead of the\n// ambient space. For details on the gradient checking procedure, see the\n// documentation of the GradientChecker class. If an error is detected in any\n// iteration, the respective cost function will notify the\n// GradientCheckingIterationCallback.\n//\n// The caller owns the returned ProblemImpl object.\n//\n// Note: This is quite inefficient and is intended only for debugging.\n//\n// relative_step_size and relative_precision are parameters to control\n// the numeric differentiation and the relative tolerance between the\n// jacobian computed by the CostFunctions in problem_impl and\n// jacobians obtained by numerically differentiating them. See the\n// documentation of 'numeric_derivative_relative_step_size' in solver.h for a\n// better explanation.\nProblemImpl* CreateGradientCheckingProblemImpl(\n    ProblemImpl* problem_impl,\n    double relative_step_size,\n    double relative_precision,\n    GradientCheckingIterationCallback* callback);\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_GRADIENT_CHECKING_COST_FUNCTION_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/gradient_checking_cost_function_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n\n#include \"ceres/gradient_checking_cost_function.h\"\n\n#include <cmath>\n#include <cstdint>\n#include <memory>\n#include <vector>\n\n#include \"ceres/cost_function.h\"\n#include \"ceres/local_parameterization.h\"\n#include \"ceres/loss_function.h\"\n#include \"ceres/parameter_block.h\"\n#include \"ceres/problem_impl.h\"\n#include \"ceres/program.h\"\n#include \"ceres/random.h\"\n#include \"ceres/residual_block.h\"\n#include \"ceres/sized_cost_function.h\"\n#include \"ceres/types.h\"\n#include \"glog/logging.h\"\n#include \"gmock/gmock.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::vector;\nusing testing::AllOf;\nusing testing::AnyNumber;\nusing testing::HasSubstr;\nusing testing::_;\n\n// Pick a (non-quadratic) function whose derivative are easy:\n//\n//    f = exp(- a' x).\n//   df = - f a.\n//\n// where 'a' is a vector of the same size as 'x'. In the block\n// version, they are both block vectors, of course.\ntemplate<int bad_block = 1, int bad_variable = 2>\nclass TestTerm : public CostFunction {\n public:\n  // The constructor of this function needs to know the number\n  // of blocks desired, and the size of each block.\n  TestTerm(int arity, int const *dim) : arity_(arity) {\n    // Make 'arity' random vectors.\n    a_.resize(arity_);\n    for (int j = 0; j < arity_; ++j) {\n      a_[j].resize(dim[j]);\n      for (int u = 0; u < dim[j]; ++u) {\n        a_[j][u] = 2.0 * RandDouble() - 1.0;\n      }\n    }\n\n    for (int i = 0; i < arity_; i++) {\n      mutable_parameter_block_sizes()->push_back(dim[i]);\n    }\n    set_num_residuals(1);\n  }\n\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const {\n    // Compute a . x.\n    double ax = 0;\n    for (int j = 0; j < arity_; ++j) {\n      for (int u = 0; u < parameter_block_sizes()[j]; ++u) {\n        ax += a_[j][u] * parameters[j][u];\n      }\n    }\n\n    // This is the cost, but also appears as a factor\n    // in the derivatives.\n    double f = *residuals = exp(-ax);\n\n    // Accumulate 1st order derivatives.\n    if (jacobians) {\n      for (int j = 0; j < arity_; ++j) {\n        if (jacobians[j]) {\n          for (int u = 0; u < parameter_block_sizes()[j]; ++u) {\n            // See comments before class.\n            jacobians[j][u] = - f * a_[j][u];\n\n            if (bad_block == j && bad_variable == u) {\n              // Whoopsiedoopsie! Deliberately introduce a faulty jacobian entry\n              // like what happens when users make an error in their jacobian\n              // computations. This should get detected.\n              LOG(INFO) << \"Poisoning jacobian for parameter block \" << j\n                        << \", row 0, column \" << u;\n              jacobians[j][u] += 500;\n            }\n          }\n        }\n      }\n    }\n\n    return true;\n  }\n\n private:\n  int arity_;\n  vector<vector<double>> a_;\n};\n\nTEST(GradientCheckingCostFunction, ResidualsAndJacobiansArePreservedTest) {\n  srand(5);\n\n  // Test with 3 blocks of size 2, 3 and 4.\n  int const arity = 3;\n  int const dim[arity] = { 2, 3, 4 };\n\n  // Make a random set of blocks.\n  vector<double*> parameters(arity);\n  for (int j = 0; j < arity; ++j) {\n    parameters[j] = new double[dim[j]];\n    for (int u = 0; u < dim[j]; ++u) {\n      parameters[j][u] = 2.0 * RandDouble() - 1.0;\n    }\n  }\n\n  double original_residual;\n  double residual;\n  vector<double*> original_jacobians(arity);\n  vector<double*> jacobians(arity);\n\n  for (int j = 0; j < arity; ++j) {\n    // Since residual is one dimensional the jacobians have the same\n    // size as the parameter blocks.\n    jacobians[j] = new double[dim[j]];\n    original_jacobians[j] = new double[dim[j]];\n  }\n\n  const double kRelativeStepSize = 1e-6;\n  const double kRelativePrecision = 1e-4;\n\n  TestTerm<-1, -1> term(arity, dim);\n  GradientCheckingIterationCallback callback;\n  std::unique_ptr<CostFunction> gradient_checking_cost_function(\n      CreateGradientCheckingCostFunction(&term, NULL,\n                                         kRelativeStepSize,\n                                         kRelativePrecision,\n                                         \"Ignored.\", &callback));\n  term.Evaluate(&parameters[0],\n                &original_residual,\n                &original_jacobians[0]);\n\n  gradient_checking_cost_function->Evaluate(&parameters[0],\n                                            &residual,\n                                            &jacobians[0]);\n  EXPECT_EQ(original_residual, residual);\n\n  for (int j = 0; j < arity; j++) {\n    for (int k = 0; k < dim[j]; ++k) {\n      EXPECT_EQ(original_jacobians[j][k], jacobians[j][k]);\n    }\n\n    delete[] parameters[j];\n    delete[] jacobians[j];\n    delete[] original_jacobians[j];\n  }\n}\n\nTEST(GradientCheckingCostFunction, SmokeTest) {\n  srand(5);\n\n  // Test with 3 blocks of size 2, 3 and 4.\n  int const arity = 3;\n  int const dim[arity] = { 2, 3, 4 };\n\n  // Make a random set of blocks.\n  vector<double*> parameters(arity);\n  for (int j = 0; j < arity; ++j) {\n    parameters[j] = new double[dim[j]];\n    for (int u = 0; u < dim[j]; ++u) {\n      parameters[j][u] = 2.0 * RandDouble() - 1.0;\n    }\n  }\n\n  double residual;\n  vector<double*> jacobians(arity);\n  for (int j = 0; j < arity; ++j) {\n    // Since residual is one dimensional the jacobians have the same size as the\n    // parameter blocks.\n    jacobians[j] = new double[dim[j]];\n  }\n\n  const double kRelativeStepSize = 1e-6;\n  const double kRelativePrecision = 1e-4;\n\n  // Should have one term that's bad, causing everything to get dumped.\n  LOG(INFO) << \"Bad gradient\";\n  {\n    TestTerm<1, 2> term(arity, dim);\n    GradientCheckingIterationCallback callback;\n    std::unique_ptr<CostFunction> gradient_checking_cost_function(\n        CreateGradientCheckingCostFunction(&term, NULL,\n                                           kRelativeStepSize,\n                                           kRelativePrecision,\n                                           \"Fuzzy banana\", &callback));\n    EXPECT_TRUE(\n        gradient_checking_cost_function->Evaluate(&parameters[0], &residual,\n                                                  &jacobians[0]));\n    EXPECT_TRUE(callback.gradient_error_detected());\n    EXPECT_TRUE(callback.error_log().find(\"Fuzzy banana\") != std::string::npos);\n    EXPECT_TRUE(callback.error_log().find(\"(1,0,2) Relative error worse than\")\n                != std::string::npos);\n  }\n\n  // The gradient is correct, so no errors are reported.\n  LOG(INFO) << \"Good gradient\";\n  {\n    TestTerm<-1, -1> term(arity, dim);\n    GradientCheckingIterationCallback callback;\n    std::unique_ptr<CostFunction> gradient_checking_cost_function(\n        CreateGradientCheckingCostFunction(&term, NULL,\n                                           kRelativeStepSize,\n                                           kRelativePrecision,\n                                           \"Fuzzy banana\", &callback));\n    EXPECT_TRUE(\n        gradient_checking_cost_function->Evaluate(&parameters[0], &residual,\n                                                  &jacobians[0]));\n    EXPECT_FALSE(callback.gradient_error_detected());\n  }\n\n  for (int j = 0; j < arity; j++) {\n    delete[] parameters[j];\n    delete[] jacobians[j];\n  }\n}\n\n// The following three classes are for the purposes of defining\n// function signatures. They have dummy Evaluate functions.\n\n// Trivial cost function that accepts a single argument.\nclass UnaryCostFunction : public CostFunction {\n public:\n  UnaryCostFunction(int num_residuals, int32_t parameter_block_size) {\n    set_num_residuals(num_residuals);\n    mutable_parameter_block_sizes()->push_back(parameter_block_size);\n  }\n  virtual ~UnaryCostFunction() {}\n\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const final {\n    for (int i = 0; i < num_residuals(); ++i) {\n      residuals[i] = 1;\n    }\n    return true;\n  }\n};\n\n// Trivial cost function that accepts two arguments.\nclass BinaryCostFunction: public CostFunction {\n public:\n  BinaryCostFunction(int num_residuals,\n                     int32_t parameter_block1_size,\n                     int32_t parameter_block2_size) {\n    set_num_residuals(num_residuals);\n    mutable_parameter_block_sizes()->push_back(parameter_block1_size);\n    mutable_parameter_block_sizes()->push_back(parameter_block2_size);\n  }\n\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const final {\n    for (int i = 0; i < num_residuals(); ++i) {\n      residuals[i] = 2;\n    }\n    return true;\n  }\n};\n\n// Trivial cost function that accepts three arguments.\nclass TernaryCostFunction: public CostFunction {\n public:\n  TernaryCostFunction(int num_residuals,\n                      int32_t parameter_block1_size,\n                      int32_t parameter_block2_size,\n                      int32_t parameter_block3_size) {\n    set_num_residuals(num_residuals);\n    mutable_parameter_block_sizes()->push_back(parameter_block1_size);\n    mutable_parameter_block_sizes()->push_back(parameter_block2_size);\n    mutable_parameter_block_sizes()->push_back(parameter_block3_size);\n  }\n\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const final {\n    for (int i = 0; i < num_residuals(); ++i) {\n      residuals[i] = 3;\n    }\n    return true;\n  }\n};\n\n// Verify that the two ParameterBlocks are formed from the same user\n// array and have the same LocalParameterization object.\nstatic void ParameterBlocksAreEquivalent(const ParameterBlock*  left,\n                                         const ParameterBlock* right) {\n  CHECK(left != nullptr);\n  CHECK(right != nullptr);\n  EXPECT_EQ(left->user_state(), right->user_state());\n  EXPECT_EQ(left->Size(), right->Size());\n  EXPECT_EQ(left->Size(), right->Size());\n  EXPECT_EQ(left->LocalSize(), right->LocalSize());\n  EXPECT_EQ(left->local_parameterization(), right->local_parameterization());\n  EXPECT_EQ(left->IsConstant(), right->IsConstant());\n}\n\nTEST(GradientCheckingProblemImpl, ProblemDimensionsMatch) {\n  // Parameter blocks with arbitrarily chosen initial values.\n  double x[] = {1.0, 2.0, 3.0};\n  double y[] = {4.0, 5.0, 6.0, 7.0};\n  double z[] = {8.0, 9.0, 10.0, 11.0, 12.0};\n  double w[] = {13.0, 14.0, 15.0, 16.0};\n\n  ProblemImpl problem_impl;\n  problem_impl.AddParameterBlock(x, 3);\n  problem_impl.AddParameterBlock(y, 4);\n  problem_impl.SetParameterBlockConstant(y);\n  problem_impl.AddParameterBlock(z, 5);\n  problem_impl.AddParameterBlock(w, 4, new QuaternionParameterization);\n  problem_impl.AddResidualBlock(new UnaryCostFunction(2, 3), NULL, x);\n  problem_impl.AddResidualBlock(new BinaryCostFunction(6, 5, 4) ,\n                                NULL, z, y);\n  problem_impl.AddResidualBlock(new BinaryCostFunction(3, 3, 5),\n                                new TrivialLoss, x, z);\n  problem_impl.AddResidualBlock(new BinaryCostFunction(7, 5, 3),\n                                NULL, z, x);\n  problem_impl.AddResidualBlock(new TernaryCostFunction(1, 5, 3, 4),\n                                NULL, z, x, y);\n\n  GradientCheckingIterationCallback callback;\n  std::unique_ptr<ProblemImpl> gradient_checking_problem_impl(\n      CreateGradientCheckingProblemImpl(&problem_impl, 1.0, 1.0, &callback));\n\n  // The dimensions of the two problems match.\n  EXPECT_EQ(problem_impl.NumParameterBlocks(),\n            gradient_checking_problem_impl->NumParameterBlocks());\n  EXPECT_EQ(problem_impl.NumResidualBlocks(),\n            gradient_checking_problem_impl->NumResidualBlocks());\n\n  EXPECT_EQ(problem_impl.NumParameters(),\n            gradient_checking_problem_impl->NumParameters());\n  EXPECT_EQ(problem_impl.NumResiduals(),\n            gradient_checking_problem_impl->NumResiduals());\n\n  const Program& program = problem_impl.program();\n  const Program& gradient_checking_program =\n      gradient_checking_problem_impl->program();\n\n  // Since we added the ParameterBlocks and ResidualBlocks explicitly,\n  // they should be in the same order in the two programs. It is\n  // possible that may change due to implementation changes to\n  // Program. This is not expected to be the case and writing code to\n  // anticipate that possibility not worth the extra complexity in\n  // this test.\n  for (int i = 0; i < program.parameter_blocks().size(); ++i) {\n    ParameterBlocksAreEquivalent(\n        program.parameter_blocks()[i],\n        gradient_checking_program.parameter_blocks()[i]);\n  }\n\n  for (int i = 0; i < program.residual_blocks().size(); ++i) {\n    // Compare the sizes of the two ResidualBlocks.\n    const ResidualBlock* original_residual_block =\n        program.residual_blocks()[i];\n    const ResidualBlock* new_residual_block =\n        gradient_checking_program.residual_blocks()[i];\n    EXPECT_EQ(original_residual_block->NumParameterBlocks(),\n              new_residual_block->NumParameterBlocks());\n    EXPECT_EQ(original_residual_block->NumResiduals(),\n              new_residual_block->NumResiduals());\n    EXPECT_EQ(original_residual_block->NumScratchDoublesForEvaluate(),\n              new_residual_block->NumScratchDoublesForEvaluate());\n\n    // Verify that the ParameterBlocks for the two residuals are equivalent.\n    for (int j = 0; j < original_residual_block->NumParameterBlocks(); ++j) {\n      ParameterBlocksAreEquivalent(\n          original_residual_block->parameter_blocks()[j],\n          new_residual_block->parameter_blocks()[j]);\n    }\n  }\n}\n\n\nTEST(GradientCheckingProblemImpl, ConstrainedProblemBoundsArePropagated) {\n  // Parameter blocks with arbitrarily chosen initial values.\n  double x[] = {1.0, 2.0, 3.0};\n  ProblemImpl problem_impl;\n  problem_impl.AddParameterBlock(x, 3);\n  problem_impl.AddResidualBlock(new UnaryCostFunction(2, 3), NULL, x);\n  problem_impl.SetParameterLowerBound(x,0,0.9);\n  problem_impl.SetParameterUpperBound(x,1,2.5);\n\n  GradientCheckingIterationCallback callback;\n  std::unique_ptr<ProblemImpl> gradient_checking_problem_impl(\n      CreateGradientCheckingProblemImpl(&problem_impl, 1.0, 1.0, &callback));\n\n  // The dimensions of the two problems match.\n  EXPECT_EQ(problem_impl.NumParameterBlocks(),\n            gradient_checking_problem_impl->NumParameterBlocks());\n  EXPECT_EQ(problem_impl.NumResidualBlocks(),\n            gradient_checking_problem_impl->NumResidualBlocks());\n\n  EXPECT_EQ(problem_impl.NumParameters(),\n            gradient_checking_problem_impl->NumParameters());\n  EXPECT_EQ(problem_impl.NumResiduals(),\n            gradient_checking_problem_impl->NumResiduals());\n\n  for (int i = 0; i < 3; ++i) {\n    EXPECT_EQ(problem_impl.GetParameterLowerBound(x, i),\n              gradient_checking_problem_impl->GetParameterLowerBound(x, i));\n    EXPECT_EQ(problem_impl.GetParameterUpperBound(x, i),\n              gradient_checking_problem_impl->GetParameterUpperBound(x, i));\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/gradient_problem.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/gradient_problem.h\"\n#include \"ceres/local_parameterization.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\n\nGradientProblem::GradientProblem(FirstOrderFunction* function)\n    : function_(function),\n      parameterization_(\n          new IdentityParameterization(function_->NumParameters())),\n      scratch_(new double[function_->NumParameters()]) {\n}\n\nGradientProblem::GradientProblem(FirstOrderFunction* function,\n                                 LocalParameterization* parameterization)\n      : function_(function),\n        parameterization_(parameterization),\n        scratch_(new double[function_->NumParameters()]) {\n  CHECK_EQ(function_->NumParameters(), parameterization_->GlobalSize());\n}\n\nint GradientProblem::NumParameters() const {\n  return function_->NumParameters();\n}\n\nint GradientProblem::NumLocalParameters() const {\n  return parameterization_->LocalSize();\n}\n\n\nbool GradientProblem::Evaluate(const double* parameters,\n                               double* cost,\n                               double* gradient) const {\n  if (gradient == NULL) {\n    return function_->Evaluate(parameters, cost, NULL);\n  }\n\n  return (function_->Evaluate(parameters, cost, scratch_.get()) &&\n          parameterization_->MultiplyByJacobian(parameters,\n                                                1,\n                                                scratch_.get(),\n                                                gradient));\n}\n\nbool GradientProblem::Plus(const double* x,\n                           const double* delta,\n                           double* x_plus_delta) const {\n  return parameterization_->Plus(x, delta, x_plus_delta);\n}\n\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/gradient_problem_evaluator.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_GRADIENT_PROBLEM_EVALUATOR_H_\n#define CERES_INTERNAL_GRADIENT_PROBLEM_EVALUATOR_H_\n\n#include <map>\n#include <string>\n\n#include \"ceres/evaluator.h\"\n#include \"ceres/execution_summary.h\"\n#include \"ceres/gradient_problem.h\"\n#include \"ceres/internal/port.h\"\n#include \"ceres/wall_time.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass GradientProblemEvaluator : public Evaluator {\n public:\n  explicit GradientProblemEvaluator(const GradientProblem& problem)\n      : problem_(problem) {}\n  virtual ~GradientProblemEvaluator() {}\n  SparseMatrix* CreateJacobian() const final { return nullptr; }\n  bool Evaluate(const EvaluateOptions& evaluate_options,\n                const double* state,\n                double* cost,\n                double* residuals,\n                double* gradient,\n                SparseMatrix* jacobian) final {\n    CHECK(jacobian == NULL);\n    ScopedExecutionTimer total_timer(\"Evaluator::Total\", &execution_summary_);\n    // The reason we use Residual and Jacobian here even when we are\n    // only computing the cost and gradient has to do with the fact\n    // that the line search minimizer code is used by both the\n    // GradientProblemSolver and the main CeresSolver coder where the\n    // Evaluator evaluates the Jacobian, and these magic strings need\n    // to be consistent across the code base for the time accounting\n    // to work.\n    ScopedExecutionTimer call_type_timer(\n        gradient == NULL ? \"Evaluator::Residual\" : \"Evaluator::Jacobian\",\n        &execution_summary_);\n    return problem_.Evaluate(state, cost, gradient);\n  }\n\n  bool Plus(const double* state,\n            const double* delta,\n            double* state_plus_delta) const final {\n    return problem_.Plus(state, delta, state_plus_delta);\n  }\n\n  int NumParameters() const final {\n    return problem_.NumParameters();\n  }\n\n  int NumEffectiveParameters() const final {\n    return problem_.NumLocalParameters();\n  }\n\n  int NumResiduals() const final { return 1; }\n\n  std::map<std::string, internal::CallStatistics> Statistics() const final {\n    return execution_summary_.statistics();\n  }\n\n private:\n  const GradientProblem& problem_;\n  ::ceres::internal::ExecutionSummary execution_summary_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_GRADIENT_PROBLEM_EVALUATOR_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/gradient_problem_solver.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/gradient_problem_solver.h\"\n\n#include <memory>\n#include \"ceres/callbacks.h\"\n#include \"ceres/gradient_problem.h\"\n#include \"ceres/gradient_problem_evaluator.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/internal/port.h\"\n#include \"ceres/map_util.h\"\n#include \"ceres/minimizer.h\"\n#include \"ceres/solver.h\"\n#include \"ceres/solver_utils.h\"\n#include \"ceres/stringprintf.h\"\n#include \"ceres/types.h\"\n#include \"ceres/wall_time.h\"\n\nnamespace ceres {\nusing internal::StringPrintf;\nusing internal::StringAppendF;\nusing std::string;\n\nnamespace {\n\nSolver::Options GradientProblemSolverOptionsToSolverOptions(\n    const GradientProblemSolver::Options& options) {\n#define COPY_OPTION(x) solver_options.x = options.x\n\n  Solver::Options solver_options;\n  solver_options.minimizer_type = LINE_SEARCH;\n  COPY_OPTION(line_search_direction_type);\n  COPY_OPTION(line_search_type);\n  COPY_OPTION(nonlinear_conjugate_gradient_type);\n  COPY_OPTION(max_lbfgs_rank);\n  COPY_OPTION(use_approximate_eigenvalue_bfgs_scaling);\n  COPY_OPTION(line_search_interpolation_type);\n  COPY_OPTION(min_line_search_step_size);\n  COPY_OPTION(line_search_sufficient_function_decrease);\n  COPY_OPTION(max_line_search_step_contraction);\n  COPY_OPTION(min_line_search_step_contraction);\n  COPY_OPTION(max_num_line_search_step_size_iterations);\n  COPY_OPTION(max_num_line_search_direction_restarts);\n  COPY_OPTION(line_search_sufficient_curvature_decrease);\n  COPY_OPTION(max_line_search_step_expansion);\n  COPY_OPTION(max_num_iterations);\n  COPY_OPTION(max_solver_time_in_seconds);\n  COPY_OPTION(parameter_tolerance);\n  COPY_OPTION(function_tolerance);\n  COPY_OPTION(gradient_tolerance);\n  COPY_OPTION(logging_type);\n  COPY_OPTION(minimizer_progress_to_stdout);\n  COPY_OPTION(callbacks);\n  return solver_options;\n#undef COPY_OPTION\n}\n\n\n}  // namespace\n\nbool GradientProblemSolver::Options::IsValid(std::string* error) const {\n  const Solver::Options solver_options =\n      GradientProblemSolverOptionsToSolverOptions(*this);\n  return solver_options.IsValid(error);\n}\n\nGradientProblemSolver::~GradientProblemSolver() {\n}\n\nvoid GradientProblemSolver::Solve(const GradientProblemSolver::Options& options,\n                                  const GradientProblem& problem,\n                                  double* parameters_ptr,\n                                  GradientProblemSolver::Summary* summary) {\n  using internal::CallStatistics;\n  using internal::GradientProblemEvaluator;\n  using internal::GradientProblemSolverStateUpdatingCallback;\n  using internal::LoggingCallback;\n  using internal::Minimizer;\n  using internal::SetSummaryFinalCost;\n  using internal::WallTimeInSeconds;\n\n  double start_time = WallTimeInSeconds();\n\n  CHECK(summary != nullptr);\n  *summary = Summary();\n  summary->num_parameters                    = problem.NumParameters();\n  summary->num_local_parameters              = problem.NumLocalParameters();\n  summary->line_search_direction_type        = options.line_search_direction_type;         //  NOLINT\n  summary->line_search_interpolation_type    = options.line_search_interpolation_type;     //  NOLINT\n  summary->line_search_type                  = options.line_search_type;\n  summary->max_lbfgs_rank                    = options.max_lbfgs_rank;\n  summary->nonlinear_conjugate_gradient_type = options.nonlinear_conjugate_gradient_type;  //  NOLINT\n\n  // Check validity\n  if (!options.IsValid(&summary->message)) {\n    LOG(ERROR) << \"Terminating: \" << summary->message;\n    return;\n  }\n\n  VectorRef parameters(parameters_ptr, problem.NumParameters());\n  Vector solution(problem.NumParameters());\n  solution = parameters;\n\n  // TODO(sameeragarwal): This is a bit convoluted, we should be able\n  // to convert to minimizer options directly, but this will do for\n  // now.\n  Minimizer::Options minimizer_options =\n      Minimizer::Options(GradientProblemSolverOptionsToSolverOptions(options));\n  minimizer_options.evaluator.reset(new GradientProblemEvaluator(problem));\n\n  std::unique_ptr<IterationCallback> logging_callback;\n  if (options.logging_type != SILENT) {\n    logging_callback.reset(\n        new LoggingCallback(LINE_SEARCH, options.minimizer_progress_to_stdout));\n    minimizer_options.callbacks.insert(minimizer_options.callbacks.begin(),\n                                       logging_callback.get());\n  }\n\n  std::unique_ptr<IterationCallback> state_updating_callback;\n  if (options.update_state_every_iteration) {\n    state_updating_callback.reset(\n        new GradientProblemSolverStateUpdatingCallback(\n            problem.NumParameters(), solution.data(), parameters_ptr));\n    minimizer_options.callbacks.insert(minimizer_options.callbacks.begin(),\n                                       state_updating_callback.get());\n  }\n\n  std::unique_ptr<Minimizer> minimizer(Minimizer::Create(LINE_SEARCH));\n\n  Solver::Summary solver_summary;\n  solver_summary.fixed_cost = 0.0;\n  solver_summary.preprocessor_time_in_seconds = 0.0;\n  solver_summary.postprocessor_time_in_seconds = 0.0;\n  solver_summary.line_search_polynomial_minimization_time_in_seconds = 0.0;\n\n  minimizer->Minimize(minimizer_options, solution.data(), &solver_summary);\n\n  summary->termination_type = solver_summary.termination_type;\n  summary->message          = solver_summary.message;\n  summary->initial_cost     = solver_summary.initial_cost;\n  summary->final_cost       = solver_summary.final_cost;\n  summary->iterations       = solver_summary.iterations;\n  summary->line_search_polynomial_minimization_time_in_seconds =\n      solver_summary.line_search_polynomial_minimization_time_in_seconds;\n\n  if (summary->IsSolutionUsable()) {\n    parameters = solution;\n    SetSummaryFinalCost(summary);\n  }\n\n  const std::map<string, CallStatistics>& evaluator_statistics =\n      minimizer_options.evaluator->Statistics();\n  {\n    const CallStatistics& call_stats = FindWithDefault(\n        evaluator_statistics, \"Evaluator::Residual\", CallStatistics());\n    summary->cost_evaluation_time_in_seconds = call_stats.time;\n    summary->num_cost_evaluations = call_stats.calls;\n  }\n\n  {\n    const CallStatistics& call_stats = FindWithDefault(\n        evaluator_statistics, \"Evaluator::Jacobian\", CallStatistics());\n    summary->gradient_evaluation_time_in_seconds = call_stats.time;\n    summary->num_gradient_evaluations = call_stats.calls;\n  }\n\n  summary->total_time_in_seconds = WallTimeInSeconds() - start_time;\n}\n\nbool GradientProblemSolver::Summary::IsSolutionUsable() const {\n  return internal::IsSolutionUsable(*this);\n}\n\nstring GradientProblemSolver::Summary::BriefReport() const {\n  return StringPrintf(\"Ceres GradientProblemSolver Report: \"\n                      \"Iterations: %d, \"\n                      \"Initial cost: %e, \"\n                      \"Final cost: %e, \"\n                      \"Termination: %s\",\n                      static_cast<int>(iterations.size()),\n                      initial_cost,\n                      final_cost,\n                      TerminationTypeToString(termination_type));\n}\n\nstring GradientProblemSolver::Summary::FullReport() const {\n  using internal::VersionString;\n\n  string report = string(\"\\nSolver Summary (v \" + VersionString() + \")\\n\\n\");\n\n  StringAppendF(&report, \"Parameters          % 25d\\n\", num_parameters);\n  if (num_local_parameters != num_parameters) {\n    StringAppendF(&report, \"Local parameters    % 25d\\n\",\n                  num_local_parameters);\n  }\n\n  string line_search_direction_string;\n  if (line_search_direction_type == LBFGS) {\n    line_search_direction_string = StringPrintf(\"LBFGS (%d)\", max_lbfgs_rank);\n  } else if (line_search_direction_type == NONLINEAR_CONJUGATE_GRADIENT) {\n    line_search_direction_string =\n        NonlinearConjugateGradientTypeToString(\n            nonlinear_conjugate_gradient_type);\n  } else {\n    line_search_direction_string =\n        LineSearchDirectionTypeToString(line_search_direction_type);\n  }\n\n  StringAppendF(&report, \"Line search direction     %19s\\n\",\n                line_search_direction_string.c_str());\n\n  const string line_search_type_string =\n      StringPrintf(\"%s %s\",\n                   LineSearchInterpolationTypeToString(\n                       line_search_interpolation_type),\n                   LineSearchTypeToString(line_search_type));\n  StringAppendF(&report, \"Line search type          %19s\\n\",\n                line_search_type_string.c_str());\n  StringAppendF(&report, \"\\n\");\n\n  StringAppendF(&report, \"\\nCost:\\n\");\n  StringAppendF(&report, \"Initial        % 30e\\n\", initial_cost);\n  if (termination_type != FAILURE &&\n      termination_type != USER_FAILURE) {\n    StringAppendF(&report, \"Final          % 30e\\n\", final_cost);\n    StringAppendF(&report, \"Change         % 30e\\n\",\n                  initial_cost - final_cost);\n  }\n\n  StringAppendF(&report, \"\\nMinimizer iterations         % 16d\\n\",\n                static_cast<int>(iterations.size()));\n\n  StringAppendF(&report, \"\\nTime (in seconds):\\n\");\n  StringAppendF(&report, \"\\n  Cost evaluation     %23.6f (%d)\\n\",\n                cost_evaluation_time_in_seconds,\n                num_cost_evaluations);\n  StringAppendF(&report, \"  Gradient & cost evaluation %16.6f (%d)\\n\",\n                gradient_evaluation_time_in_seconds,\n                num_gradient_evaluations);\n  StringAppendF(&report, \"  Polynomial minimization   %17.6f\\n\",\n                line_search_polynomial_minimization_time_in_seconds);\n  StringAppendF(&report, \"Total               %25.6f\\n\\n\",\n                total_time_in_seconds);\n\n  StringAppendF(&report, \"Termination:        %25s (%s)\\n\",\n                TerminationTypeToString(termination_type), message.c_str());\n  return report;\n}\n\nvoid Solve(const GradientProblemSolver::Options& options,\n           const GradientProblem& problem,\n           double* parameters,\n           GradientProblemSolver::Summary* summary) {\n  GradientProblemSolver solver;\n  solver.Solve(options, problem, parameters, summary);\n}\n\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/gradient_problem_solver_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: strandmark@google.com (Petter Strandmark)\n\n#include \"ceres/gradient_problem.h\"\n#include \"ceres/gradient_problem_solver.h\"\n\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// Rosenbrock function; see http://en.wikipedia.org/wiki/Rosenbrock_function .\nclass Rosenbrock : public ceres::FirstOrderFunction {\n public:\n  virtual ~Rosenbrock() {}\n\n  bool Evaluate(const double* parameters,\n                double* cost,\n                double* gradient) const final {\n    const double x = parameters[0];\n    const double y = parameters[1];\n\n    cost[0] = (1.0 - x) * (1.0 - x) + 100.0 * (y - x * x) * (y - x * x);\n    if (gradient != NULL) {\n      gradient[0] = -2.0 * (1.0 - x) - 200.0 * (y - x * x) * 2.0 * x;\n      gradient[1] = 200.0 * (y - x * x);\n    }\n    return true;\n  }\n\n  int NumParameters() const final { return 2; }\n};\n\nTEST(GradientProblemSolver, SolvesRosenbrockWithDefaultOptions) {\n  const double expected_tolerance = 1e-9;\n  double parameters[2] = {-1.2, 0.0};\n\n  ceres::GradientProblemSolver::Options options;\n  ceres::GradientProblemSolver::Summary summary;\n  ceres::GradientProblem problem(new Rosenbrock());\n  ceres::Solve(options, problem, parameters, &summary);\n\n  EXPECT_EQ(CONVERGENCE, summary.termination_type);\n  EXPECT_NEAR(1.0, parameters[0], expected_tolerance);\n  EXPECT_NEAR(1.0, parameters[1], expected_tolerance);\n}\n\nclass QuadraticFunction : public ceres::FirstOrderFunction {\n  virtual ~QuadraticFunction() {}\n  bool Evaluate(const double* parameters,\n                double* cost,\n                double* gradient) const final {\n    const double x = parameters[0];\n    *cost = 0.5 * (5.0 - x) * (5.0 - x);\n    if (gradient != NULL) {\n      gradient[0] = x - 5.0;\n    }\n\n    return true;\n  }\n  int NumParameters() const final { return 1; }\n};\n\nstruct RememberingCallback : public IterationCallback {\n  explicit RememberingCallback(double *x) : calls(0), x(x) {}\n  virtual ~RememberingCallback() {}\n  CallbackReturnType operator()(const IterationSummary& summary) final {\n    x_values.push_back(*x);\n    return SOLVER_CONTINUE;\n  }\n  int calls;\n  double *x;\n  std::vector<double> x_values;\n};\n\n\nTEST(Solver, UpdateStateEveryIterationOption) {\n  double x = 50.0;\n  const double original_x = x;\n\n  ceres::GradientProblem problem(new QuadraticFunction);\n  ceres::GradientProblemSolver::Options options;\n  RememberingCallback callback(&x);\n  options.callbacks.push_back(&callback);\n  ceres::GradientProblemSolver::Summary summary;\n\n  int num_iterations;\n\n  // First try: no updating.\n  ceres::Solve(options, problem, &x, &summary);\n  num_iterations = summary.iterations.size() - 1;\n  EXPECT_GT(num_iterations, 1);\n  for (int i = 0; i < callback.x_values.size(); ++i) {\n    EXPECT_EQ(50.0, callback.x_values[i]);\n  }\n\n  // Second try: with updating\n  x = 50.0;\n  options.update_state_every_iteration = true;\n  callback.x_values.clear();\n  ceres::Solve(options, problem, &x, &summary);\n  num_iterations = summary.iterations.size() - 1;\n  EXPECT_GT(num_iterations, 1);\n  EXPECT_EQ(original_x, callback.x_values[0]);\n  EXPECT_NE(original_x, callback.x_values[1]);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/gradient_problem_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: strandmark@google.com (Petter Strandmark)\n\n#include \"ceres/gradient_problem.h\"\n\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass QuadraticTestFunction : public ceres::FirstOrderFunction {\n public:\n  explicit QuadraticTestFunction(bool* flag_to_set_on_destruction = NULL)\n      : flag_to_set_on_destruction_(flag_to_set_on_destruction) {}\n\n  virtual ~QuadraticTestFunction() {\n    if (flag_to_set_on_destruction_) {\n      *flag_to_set_on_destruction_ = true;\n    }\n  }\n\n  bool Evaluate(const double* parameters,\n                double* cost,\n                double* gradient) const final {\n    const double x = parameters[0];\n    cost[0] = x * x;\n    if (gradient != NULL) {\n      gradient[0] = 2.0 * x;\n    }\n    return true;\n  }\n\n  int NumParameters() const final { return 1; }\n\n private:\n  bool* flag_to_set_on_destruction_;\n};\n\nTEST(GradientProblem, TakesOwnershipOfFirstOrderFunction) {\n  bool is_destructed = false;\n  {\n    ceres::GradientProblem problem(new QuadraticTestFunction(&is_destructed));\n  }\n  EXPECT_TRUE(is_destructed);\n}\n\nTEST(GradientProblem, EvaluationWithoutParameterizationOrGradient) {\n  ceres::GradientProblem problem(new QuadraticTestFunction());\n  double x = 7.0;\n  double cost = 0;\n  problem.Evaluate(&x, &cost, NULL);\n  EXPECT_EQ(x * x, cost);\n}\n\nTEST(GradientProblem, EvalutaionWithParameterizationAndNoGradient) {\n  ceres::GradientProblem problem(new QuadraticTestFunction(),\n                                 new IdentityParameterization(1));\n  double x = 7.0;\n  double cost = 0;\n  problem.Evaluate(&x, &cost, NULL);\n  EXPECT_EQ(x * x, cost);\n}\n\nTEST(GradientProblem, EvaluationWithoutParameterizationAndWithGradient) {\n  ceres::GradientProblem problem(new QuadraticTestFunction());\n  double x = 7.0;\n  double cost = 0;\n  double gradient = 0;\n  problem.Evaluate(&x, &cost, &gradient);\n  EXPECT_EQ(2.0 * x, gradient);\n}\n\nTEST(GradientProblem, EvaluationWithParameterizationAndWithGradient) {\n  ceres::GradientProblem problem(new QuadraticTestFunction(),\n                                 new IdentityParameterization(1));\n  double x = 7.0;\n  double cost = 0;\n  double gradient = 0;\n  problem.Evaluate(&x, &cost, &gradient);\n  EXPECT_EQ(2.0 * x, gradient);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/graph.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_GRAPH_H_\n#define CERES_INTERNAL_GRAPH_H_\n\n#include <limits>\n#include <unordered_set>\n#include <unordered_map>\n#include <utility>\n#include \"ceres/map_util.h\"\n#include \"ceres/pair_hash.h\"\n#include \"ceres/types.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// A unweighted undirected graph templated over the vertex ids. Vertex\n// should be hashable.\ntemplate <typename Vertex>\nclass Graph {\n public:\n  Graph() {}\n\n  // Add a vertex.\n  void AddVertex(const Vertex& vertex) {\n    if (vertices_.insert(vertex).second) {\n      edges_[vertex] = std::unordered_set<Vertex>();\n    }\n  }\n\n  bool RemoveVertex(const Vertex& vertex) {\n    if (vertices_.find(vertex) == vertices_.end()) {\n      return false;\n    }\n\n    vertices_.erase(vertex);\n    const std::unordered_set<Vertex>& sinks = edges_[vertex];\n    for (const Vertex& s : sinks) {\n      edges_[s].erase(vertex);\n    }\n\n    edges_.erase(vertex);\n    return true;\n  }\n\n  // Add an edge between the vertex1 and vertex2. Calling AddEdge on a\n  // pair of vertices which do not exist in the graph yet will result\n  // in undefined behavior.\n  //\n  // It is legal to call this method repeatedly for the same set of\n  // vertices.\n  void AddEdge(const Vertex& vertex1, const Vertex& vertex2) {\n    DCHECK(vertices_.find(vertex1) != vertices_.end());\n    DCHECK(vertices_.find(vertex2) != vertices_.end());\n\n    if (edges_[vertex1].insert(vertex2).second) {\n      edges_[vertex2].insert(vertex1);\n    }\n  }\n\n  // Calling Neighbors on a vertex not in the graph will result in\n  // undefined behaviour.\n  const std::unordered_set<Vertex>& Neighbors(const Vertex& vertex) const {\n    return FindOrDie(edges_, vertex);\n  }\n\n  const std::unordered_set<Vertex>& vertices() const {\n    return vertices_;\n  }\n\n private:\n  std::unordered_set<Vertex> vertices_;\n  std::unordered_map<Vertex, std::unordered_set<Vertex>> edges_;\n};\n\n// A weighted undirected graph templated over the vertex ids. Vertex\n// should be hashable and comparable.\ntemplate <typename Vertex>\nclass WeightedGraph {\n public:\n  WeightedGraph() {}\n\n  // Add a weighted vertex. If the vertex already exists in the graph,\n  // its weight is set to the new weight.\n  void AddVertex(const Vertex& vertex, double weight) {\n    if (vertices_.find(vertex) == vertices_.end()) {\n      vertices_.insert(vertex);\n      edges_[vertex] = std::unordered_set<Vertex>();\n    }\n    vertex_weights_[vertex] = weight;\n  }\n\n  // Uses weight = 1.0. If vertex already exists, its weight is set to\n  // 1.0.\n  void AddVertex(const Vertex& vertex) {\n    AddVertex(vertex, 1.0);\n  }\n\n  bool RemoveVertex(const Vertex& vertex) {\n    if (vertices_.find(vertex) == vertices_.end()) {\n      return false;\n    }\n\n    vertices_.erase(vertex);\n    vertex_weights_.erase(vertex);\n    const std::unordered_set<Vertex>& sinks = edges_[vertex];\n    for (const Vertex& s : sinks) {\n      if (vertex < s) {\n        edge_weights_.erase(std::make_pair(vertex, s));\n      } else {\n        edge_weights_.erase(std::make_pair(s, vertex));\n      }\n      edges_[s].erase(vertex);\n    }\n\n    edges_.erase(vertex);\n    return true;\n  }\n\n  // Add a weighted edge between the vertex1 and vertex2. Calling\n  // AddEdge on a pair of vertices which do not exist in the graph yet\n  // will result in undefined behavior.\n  //\n  // It is legal to call this method repeatedly for the same set of\n  // vertices.\n  void AddEdge(const Vertex& vertex1, const Vertex& vertex2, double weight) {\n    DCHECK(vertices_.find(vertex1) != vertices_.end());\n    DCHECK(vertices_.find(vertex2) != vertices_.end());\n\n    if (edges_[vertex1].insert(vertex2).second) {\n      edges_[vertex2].insert(vertex1);\n    }\n\n    if (vertex1 < vertex2) {\n      edge_weights_[std::make_pair(vertex1, vertex2)] = weight;\n    } else {\n      edge_weights_[std::make_pair(vertex2, vertex1)] = weight;\n    }\n  }\n\n  // Uses weight = 1.0.\n  void AddEdge(const Vertex& vertex1, const Vertex& vertex2) {\n    AddEdge(vertex1, vertex2, 1.0);\n  }\n\n  // Calling VertexWeight on a vertex not in the graph will result in\n  // undefined behavior.\n  double VertexWeight(const Vertex& vertex) const {\n    return FindOrDie(vertex_weights_, vertex);\n  }\n\n  // Calling EdgeWeight on a pair of vertices where either one of the\n  // vertices is not present in the graph will result in undefined\n  // behaviour. If there is no edge connecting vertex1 and vertex2,\n  // the edge weight is zero.\n  double EdgeWeight(const Vertex& vertex1, const Vertex& vertex2) const {\n    if (vertex1 < vertex2) {\n      return FindWithDefault(edge_weights_,\n                             std::make_pair(vertex1, vertex2), 0.0);\n    } else {\n      return FindWithDefault(edge_weights_,\n                             std::make_pair(vertex2, vertex1), 0.0);\n    }\n  }\n\n  // Calling Neighbors on a vertex not in the graph will result in\n  // undefined behaviour.\n  const std::unordered_set<Vertex>& Neighbors(const Vertex& vertex) const {\n    return FindOrDie(edges_, vertex);\n  }\n\n  const std::unordered_set<Vertex>& vertices() const {\n    return vertices_;\n  }\n\n  static double InvalidWeight() {\n    return std::numeric_limits<double>::quiet_NaN();\n  }\n\n private:\n  std::unordered_set<Vertex> vertices_;\n  std::unordered_map<Vertex, double> vertex_weights_;\n  std::unordered_map<Vertex, std::unordered_set<Vertex>> edges_;\n  std::unordered_map<std::pair<Vertex, Vertex>, double, pair_hash>\n      edge_weights_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_GRAPH_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/graph_algorithms.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Various algorithms that operate on undirected graphs.\n\n#ifndef CERES_INTERNAL_GRAPH_ALGORITHMS_H_\n#define CERES_INTERNAL_GRAPH_ALGORITHMS_H_\n\n#include <algorithm>\n#include <unordered_map>\n#include <unordered_set>\n#include <vector>\n#include <utility>\n#include \"ceres/graph.h\"\n#include \"ceres/wall_time.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// Compare two vertices of a graph by their degrees, if the degrees\n// are equal then order them by their ids.\ntemplate <typename Vertex>\nclass VertexTotalOrdering {\n public:\n  explicit VertexTotalOrdering(const Graph<Vertex>& graph)\n      : graph_(graph) {}\n\n  bool operator()(const Vertex& lhs, const Vertex& rhs) const {\n    if (graph_.Neighbors(lhs).size() == graph_.Neighbors(rhs).size()) {\n      return lhs < rhs;\n    }\n    return graph_.Neighbors(lhs).size() < graph_.Neighbors(rhs).size();\n  }\n\n private:\n  const Graph<Vertex>& graph_;\n};\n\ntemplate <typename Vertex>\nclass VertexDegreeLessThan {\n public:\n  explicit VertexDegreeLessThan(const Graph<Vertex>& graph)\n      : graph_(graph) {}\n\n  bool operator()(const Vertex& lhs, const Vertex& rhs) const {\n    return graph_.Neighbors(lhs).size() < graph_.Neighbors(rhs).size();\n  }\n\n private:\n  const Graph<Vertex>& graph_;\n};\n\n// Order the vertices of a graph using its (approximately) largest\n// independent set, where an independent set of a graph is a set of\n// vertices that have no edges connecting them. The maximum\n// independent set problem is NP-Hard, but there are effective\n// approximation algorithms available. The implementation here uses a\n// breadth first search that explores the vertices in order of\n// increasing degree. The same idea is used by Saad & Li in \"MIQR: A\n// multilevel incomplete QR preconditioner for large sparse\n// least-squares problems\", SIMAX, 2007.\n//\n// Given a undirected graph G(V,E), the algorithm is a greedy BFS\n// search where the vertices are explored in increasing order of their\n// degree. The output vector ordering contains elements of S in\n// increasing order of their degree, followed by elements of V - S in\n// increasing order of degree. The return value of the function is the\n// cardinality of S.\ntemplate <typename Vertex>\nint IndependentSetOrdering(const Graph<Vertex>& graph,\n                           std::vector<Vertex>* ordering) {\n  const std::unordered_set<Vertex>& vertices = graph.vertices();\n  const int num_vertices = vertices.size();\n\n  CHECK(ordering != nullptr);\n  ordering->clear();\n  ordering->reserve(num_vertices);\n\n  // Colors for labeling the graph during the BFS.\n  const char kWhite = 0;\n  const char kGrey = 1;\n  const char kBlack = 2;\n\n  // Mark all vertices white.\n  std::unordered_map<Vertex, char> vertex_color;\n  std::vector<Vertex> vertex_queue;\n  for (const Vertex& vertex : vertices) {\n    vertex_color[vertex] = kWhite;\n    vertex_queue.push_back(vertex);\n  }\n\n  std::sort(vertex_queue.begin(),\n            vertex_queue.end(),\n            VertexTotalOrdering<Vertex>(graph));\n\n  // Iterate over vertex_queue. Pick the first white vertex, add it\n  // to the independent set. Mark it black and its neighbors grey.\n  for (const Vertex& vertex : vertex_queue) {\n    if (vertex_color[vertex] != kWhite) {\n      continue;\n    }\n\n    ordering->push_back(vertex);\n    vertex_color[vertex] = kBlack;\n    const std::unordered_set<Vertex>& neighbors = graph.Neighbors(vertex);\n    for (const Vertex& neighbor : neighbors) {\n      vertex_color[neighbor] = kGrey;\n    }\n  }\n\n  int independent_set_size = ordering->size();\n\n  // Iterate over the vertices and add all the grey vertices to the\n  // ordering. At this stage there should only be black or grey\n  // vertices in the graph.\n  for (const Vertex& vertex : vertex_queue) {\n    DCHECK(vertex_color[vertex] != kWhite);\n    if (vertex_color[vertex] != kBlack) {\n      ordering->push_back(vertex);\n    }\n  }\n\n  CHECK_EQ(ordering->size(), num_vertices);\n  return independent_set_size;\n}\n\n// Same as above with one important difference. The ordering parameter\n// is an input/output parameter which carries an initial ordering of\n// the vertices of the graph. The greedy independent set algorithm\n// starts by sorting the vertices in increasing order of their\n// degree. The input ordering is used to stabilize this sort, i.e., if\n// two vertices have the same degree then they are ordered in the same\n// order in which they occur in \"ordering\".\n//\n// This is useful in eliminating non-determinism from the Schur\n// ordering algorithm over all.\ntemplate <typename Vertex>\nint StableIndependentSetOrdering(const Graph<Vertex>& graph,\n                                 std::vector<Vertex>* ordering) {\n  CHECK(ordering != nullptr);\n  const std::unordered_set<Vertex>& vertices = graph.vertices();\n  const int num_vertices = vertices.size();\n  CHECK_EQ(vertices.size(), ordering->size());\n\n  // Colors for labeling the graph during the BFS.\n  const char kWhite = 0;\n  const char kGrey = 1;\n  const char kBlack = 2;\n\n  std::vector<Vertex> vertex_queue(*ordering);\n\n  std::stable_sort(vertex_queue.begin(), vertex_queue.end(),\n                  VertexDegreeLessThan<Vertex>(graph));\n\n  // Mark all vertices white.\n  std::unordered_map<Vertex, char> vertex_color;\n  for (const Vertex& vertex : vertices) {\n    vertex_color[vertex] = kWhite;\n  }\n\n  ordering->clear();\n  ordering->reserve(num_vertices);\n  // Iterate over vertex_queue. Pick the first white vertex, add it\n  // to the independent set. Mark it black and its neighbors grey.\n  for (int i = 0; i < vertex_queue.size(); ++i) {\n    const Vertex& vertex = vertex_queue[i];\n    if (vertex_color[vertex] != kWhite) {\n      continue;\n    }\n\n    ordering->push_back(vertex);\n    vertex_color[vertex] = kBlack;\n    const std::unordered_set<Vertex>& neighbors = graph.Neighbors(vertex);\n    for (const Vertex& neighbor : neighbors) {\n      vertex_color[neighbor] = kGrey;\n    }\n  }\n\n  int independent_set_size = ordering->size();\n\n  // Iterate over the vertices and add all the grey vertices to the\n  // ordering. At this stage there should only be black or grey\n  // vertices in the graph.\n  for (const Vertex& vertex : vertex_queue) {\n    DCHECK(vertex_color[vertex] != kWhite);\n    if (vertex_color[vertex] != kBlack) {\n      ordering->push_back(vertex);\n    }\n  }\n\n  CHECK_EQ(ordering->size(), num_vertices);\n  return independent_set_size;\n}\n\n// Find the connected component for a vertex implemented using the\n// find and update operation for disjoint-set. Recursively traverse\n// the disjoint set structure till you reach a vertex whose connected\n// component has the same id as the vertex itself. Along the way\n// update the connected components of all the vertices. This updating\n// is what gives this data structure its efficiency.\ntemplate <typename Vertex>\nVertex FindConnectedComponent(const Vertex& vertex,\n                              std::unordered_map<Vertex, Vertex>* union_find) {\n  auto it = union_find->find(vertex);\n  DCHECK(it != union_find->end());\n  if (it->second != vertex) {\n    it->second = FindConnectedComponent(it->second, union_find);\n  }\n\n  return it->second;\n}\n\n// Compute a degree two constrained Maximum Spanning Tree/forest of\n// the input graph. Caller owns the result.\n//\n// Finding degree 2 spanning tree of a graph is not always\n// possible. For example a star graph, i.e. a graph with n-nodes\n// where one node is connected to the other n-1 nodes does not have\n// a any spanning trees of degree less than n-1.Even if such a tree\n// exists, finding such a tree is NP-Hard.\n\n// We get around both of these problems by using a greedy, degree\n// constrained variant of Kruskal's algorithm. We start with a graph\n// G_T with the same vertex set V as the input graph G(V,E) but an\n// empty edge set. We then iterate over the edges of G in decreasing\n// order of weight, adding them to G_T if doing so does not create a\n// cycle in G_T} and the degree of all the vertices in G_T remains\n// bounded by two. This O(|E|) algorithm results in a degree-2\n// spanning forest, or a collection of linear paths that span the\n// graph G.\ntemplate <typename Vertex>\nWeightedGraph<Vertex>*\nDegree2MaximumSpanningForest(const WeightedGraph<Vertex>& graph) {\n  // Array of edges sorted in decreasing order of their weights.\n  std::vector<std::pair<double, std::pair<Vertex, Vertex>>> weighted_edges;\n  WeightedGraph<Vertex>* forest = new WeightedGraph<Vertex>();\n\n  // Disjoint-set to keep track of the connected components in the\n  // maximum spanning tree.\n  std::unordered_map<Vertex, Vertex> disjoint_set;\n\n  // Sort of the edges in the graph in decreasing order of their\n  // weight. Also add the vertices of the graph to the Maximum\n  // Spanning Tree graph and set each vertex to be its own connected\n  // component in the disjoint_set structure.\n  const std::unordered_set<Vertex>& vertices = graph.vertices();\n  for (const Vertex& vertex1 : vertices) {\n    forest->AddVertex(vertex1, graph.VertexWeight(vertex1));\n    disjoint_set[vertex1] = vertex1;\n\n    const std::unordered_set<Vertex>& neighbors = graph.Neighbors(vertex1);\n    for (const Vertex& vertex2 : neighbors) {\n      if (vertex1 >= vertex2) {\n        continue;\n      }\n      const double weight = graph.EdgeWeight(vertex1, vertex2);\n      weighted_edges.push_back(\n          std::make_pair(weight, std::make_pair(vertex1, vertex2)));\n    }\n  }\n\n  // The elements of this vector, are pairs<edge_weight,\n  // edge>. Sorting it using the reverse iterators gives us the edges\n  // in decreasing order of edges.\n  std::sort(weighted_edges.rbegin(), weighted_edges.rend());\n\n  // Greedily add edges to the spanning tree/forest as long as they do\n  // not violate the degree/cycle constraint.\n  for (int i =0; i < weighted_edges.size(); ++i) {\n    const std::pair<Vertex, Vertex>& edge = weighted_edges[i].second;\n    const Vertex vertex1 = edge.first;\n    const Vertex vertex2 = edge.second;\n\n    // Check if either of the vertices are of degree 2 already, in\n    // which case adding this edge will violate the degree 2\n    // constraint.\n    if ((forest->Neighbors(vertex1).size() == 2) ||\n        (forest->Neighbors(vertex2).size() == 2)) {\n      continue;\n    }\n\n    // Find the id of the connected component to which the two\n    // vertices belong to. If the id is the same, it means that the\n    // two of them are already connected to each other via some other\n    // vertex, and adding this edge will create a cycle.\n    Vertex root1 = FindConnectedComponent(vertex1, &disjoint_set);\n    Vertex root2 = FindConnectedComponent(vertex2, &disjoint_set);\n\n    if (root1 == root2) {\n      continue;\n    }\n\n    // This edge can be added, add an edge in either direction with\n    // the same weight as the original graph.\n    const double edge_weight = graph.EdgeWeight(vertex1, vertex2);\n    forest->AddEdge(vertex1, vertex2, edge_weight);\n    forest->AddEdge(vertex2, vertex1, edge_weight);\n\n    // Connected the two connected components by updating the\n    // disjoint_set structure. Always connect the connected component\n    // with the greater index with the connected component with the\n    // smaller index. This should ensure shallower trees, for quicker\n    // lookup.\n    if (root2 < root1) {\n      std::swap(root1, root2);\n    }\n\n    disjoint_set[root2] = root1;\n  }\n  return forest;\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_GRAPH_ALGORITHMS_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/graph_algorithms_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/graph_algorithms.h\"\n\n#include <algorithm>\n#include <memory>\n#include <unordered_set>\n\n#include \"ceres/graph.h\"\n#include \"ceres/internal/port.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::vector;\n\nTEST(IndependentSetOrdering, Chain) {\n  Graph<int> graph;\n  graph.AddVertex(0);\n  graph.AddVertex(1);\n  graph.AddVertex(2);\n  graph.AddVertex(3);\n  graph.AddVertex(4);\n\n  graph.AddEdge(0, 1);\n  graph.AddEdge(1, 2);\n  graph.AddEdge(2, 3);\n  graph.AddEdge(3, 4);\n\n  // 0-1-2-3-4\n  // 0, 2, 4 should be in the independent set.\n  vector<int> ordering;\n  int independent_set_size = IndependentSetOrdering(graph, &ordering);\n\n  sort(ordering.begin(), ordering.begin() + 3);\n  sort(ordering.begin() + 3, ordering.end());\n\n  EXPECT_EQ(independent_set_size, 3);\n  EXPECT_EQ(ordering.size(), 5);\n  EXPECT_EQ(ordering[0], 0);\n  EXPECT_EQ(ordering[1], 2);\n  EXPECT_EQ(ordering[2], 4);\n  EXPECT_EQ(ordering[3], 1);\n  EXPECT_EQ(ordering[4], 3);\n}\n\nTEST(IndependentSetOrdering, Star) {\n  Graph<int> graph;\n  graph.AddVertex(0);\n  graph.AddVertex(1);\n  graph.AddVertex(2);\n  graph.AddVertex(3);\n  graph.AddVertex(4);\n\n  graph.AddEdge(0, 1);\n  graph.AddEdge(0, 2);\n  graph.AddEdge(0, 3);\n  graph.AddEdge(0, 4);\n\n  //      1\n  //      |\n  //    4-0-2\n  //      |\n  //      3\n  // 1, 2, 3, 4 should be in the independent set.\n  vector<int> ordering;\n  int independent_set_size = IndependentSetOrdering(graph, &ordering);\n  EXPECT_EQ(independent_set_size, 4);\n  EXPECT_EQ(ordering.size(), 5);\n  EXPECT_EQ(ordering[4], 0);\n  sort(ordering.begin(), ordering.begin() + 4);\n  EXPECT_EQ(ordering[0], 1);\n  EXPECT_EQ(ordering[1], 2);\n  EXPECT_EQ(ordering[2], 3);\n  EXPECT_EQ(ordering[3], 4);\n}\n\nTEST(Degree2MaximumSpanningForest, PreserveWeights) {\n  WeightedGraph<int> graph;\n  graph.AddVertex(0, 1.0);\n  graph.AddVertex(1, 2.0);\n  graph.AddEdge(0, 1, 0.5);\n  graph.AddEdge(1, 0, 0.5);\n\n  std::unique_ptr<WeightedGraph<int> > forest(\n\t\t\t\t\t      Degree2MaximumSpanningForest(graph));\n\n  const std::unordered_set<int>& vertices = forest->vertices();\n  EXPECT_EQ(vertices.size(), 2);\n  EXPECT_EQ(forest->VertexWeight(0), 1.0);\n  EXPECT_EQ(forest->VertexWeight(1), 2.0);\n  EXPECT_EQ(forest->Neighbors(0).size(), 1.0);\n  EXPECT_EQ(forest->EdgeWeight(0, 1), 0.5);\n}\n\nTEST(Degree2MaximumSpanningForest, StarGraph) {\n  WeightedGraph<int> graph;\n  graph.AddVertex(0);\n  graph.AddVertex(1);\n  graph.AddVertex(2);\n  graph.AddVertex(3);\n  graph.AddVertex(4);\n\n  graph.AddEdge(0, 1, 1.0);\n  graph.AddEdge(0, 2, 2.0);\n  graph.AddEdge(0, 3, 3.0);\n  graph.AddEdge(0, 4, 4.0);\n\n  std::unique_ptr<WeightedGraph<int> > forest(Degree2MaximumSpanningForest(graph));\n  const std::unordered_set<int>& vertices = forest->vertices();\n  EXPECT_EQ(vertices.size(), 5);\n\n  {\n    const std::unordered_set<int>& neighbors = forest->Neighbors(0);\n    EXPECT_EQ(neighbors.size(), 2);\n    EXPECT_TRUE(neighbors.find(4) != neighbors.end());\n    EXPECT_TRUE(neighbors.find(3) != neighbors.end());\n  }\n\n  {\n    const std::unordered_set<int>& neighbors = forest->Neighbors(3);\n    EXPECT_EQ(neighbors.size(), 1);\n    EXPECT_TRUE(neighbors.find(0) != neighbors.end());\n  }\n\n  {\n    const std::unordered_set<int>& neighbors = forest->Neighbors(4);\n    EXPECT_EQ(neighbors.size(), 1);\n    EXPECT_TRUE(neighbors.find(0) != neighbors.end());\n  }\n\n  {\n    const std::unordered_set<int>& neighbors = forest->Neighbors(1);\n    EXPECT_EQ(neighbors.size(), 0);\n  }\n\n  {\n    const std::unordered_set<int>& neighbors = forest->Neighbors(2);\n    EXPECT_EQ(neighbors.size(), 0);\n  }\n}\n\nTEST(VertexTotalOrdering, TotalOrdering) {\n  Graph<int> graph;\n  graph.AddVertex(0);\n  graph.AddVertex(1);\n  graph.AddVertex(2);\n  graph.AddVertex(3);\n\n  // 0-1\n  //   |\n  // 2-3\n  // 0,1 and 2 have degree 1 and 3 has degree 2.\n  graph.AddEdge(0, 1);\n  graph.AddEdge(2, 3);\n  VertexTotalOrdering<int> less_than(graph);\n\n  for (int i = 0; i < 4; ++i) {\n    EXPECT_FALSE(less_than(i, i)) << \"Failing vertex: \" << i;\n    for (int j = 0; j < 4; ++j) {\n      if (i != j) {\n        EXPECT_TRUE(less_than(i, j) ^ less_than(j, i))\n            << \"Failing vertex pair: \" << i << \" \" << j;\n      }\n    }\n  }\n\n  for (int i = 0; i < 3; ++i) {\n    EXPECT_TRUE(less_than(i, 3));\n    EXPECT_FALSE(less_than(3, i));\n  }\n}\n\n\nTEST(StableIndependentSet, BreakTies) {\n  Graph<int> graph;\n  graph.AddVertex(0);\n  graph.AddVertex(1);\n  graph.AddVertex(2);\n  graph.AddVertex(3);\n\n  graph.AddEdge(0, 1);\n  graph.AddEdge(0, 2);\n  graph.AddEdge(0, 3);\n  graph.AddEdge(1, 2);\n  graph.AddEdge(1, 3);\n  graph.AddEdge(2, 3);\n\n  // Since this is a completely connected graph, the independent set\n  // contains exactly one vertex. StableIndependentSetOrdering\n  // guarantees that it will always be the first vertex in the\n  // ordering vector.\n  {\n    vector<int> ordering;\n    ordering.push_back(0);\n    ordering.push_back(1);\n    ordering.push_back(2);\n    ordering.push_back(3);\n    const int independent_set_size =\n        StableIndependentSetOrdering(graph, &ordering);\n    EXPECT_EQ(independent_set_size, 1);\n    EXPECT_EQ(ordering[0], 0);\n  }\n\n  {\n    vector<int> ordering;\n    ordering.push_back(1);\n    ordering.push_back(0);\n    ordering.push_back(2);\n    ordering.push_back(3);\n    const int independent_set_size =\n        StableIndependentSetOrdering(graph, &ordering);\n    EXPECT_EQ(independent_set_size, 1);\n    EXPECT_EQ(ordering[0], 1);\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/graph_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/graph.h\"\n\n#include <unordered_set>\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nTEST(Graph, EmptyGraph) {\n  Graph<int> graph;\n  EXPECT_EQ(graph.vertices().size(), 0);\n}\n\nTEST(Graph, AddVertexAndEdge) {\n  Graph<int> graph;\n  graph.AddVertex(0);\n  graph.AddVertex(1);\n  graph.AddEdge(0, 1);\n\n  const std::unordered_set<int>& vertices = graph.vertices();\n  EXPECT_EQ(vertices.size(), 2);\n  EXPECT_EQ(graph.Neighbors(0).size(), 1);\n  EXPECT_EQ(graph.Neighbors(1).size(), 1);\n}\n\nTEST(Graph, AddVertexIdempotence) {\n  Graph<int> graph;\n  graph.AddVertex(0);\n  graph.AddVertex(1);\n  graph.AddEdge(0, 1);\n\n  const std::unordered_set<int>& vertices = graph.vertices();\n\n  EXPECT_EQ(vertices.size(), 2);\n\n  // Try adding the vertex again with a new weight.\n  graph.AddVertex(0);\n  EXPECT_EQ(vertices.size(), 2);\n\n  // Rest of the graph remains the same.\n  EXPECT_EQ(graph.Neighbors(0).size(), 1);\n  EXPECT_EQ(graph.Neighbors(1).size(), 1);\n}\n\nTEST(Graph, DieOnNonExistentVertex) {\n  Graph<int> graph;\n  graph.AddVertex(0);\n  graph.AddVertex(1);\n  graph.AddEdge(0, 1);\n\n  EXPECT_DEATH_IF_SUPPORTED(graph.Neighbors(2), \"key not found\");\n}\n\nTEST(WeightedGraph, EmptyGraph) {\n  WeightedGraph<int> graph;\n  EXPECT_EQ(graph.vertices().size(), 0);\n}\n\nTEST(WeightedGraph, AddVertexAndEdge) {\n  WeightedGraph<int> graph;\n  graph.AddVertex(0, 1.0);\n  graph.AddVertex(1, 2.0);\n  graph.AddEdge(0, 1, 0.5);\n\n  const std::unordered_set<int>& vertices = graph.vertices();\n  EXPECT_EQ(vertices.size(), 2);\n  EXPECT_EQ(graph.VertexWeight(0), 1.0);\n  EXPECT_EQ(graph.VertexWeight(1), 2.0);\n  EXPECT_EQ(graph.Neighbors(0).size(), 1);\n  EXPECT_EQ(graph.Neighbors(1).size(), 1);\n  EXPECT_EQ(graph.EdgeWeight(0, 1), 0.5);\n  EXPECT_EQ(graph.EdgeWeight(1, 0), 0.5);\n}\n\nTEST(WeightedGraph, AddVertexIdempotence) {\n  WeightedGraph<int> graph;\n  graph.AddVertex(0, 1.0);\n  graph.AddVertex(1, 2.0);\n  graph.AddEdge(0, 1, 0.5);\n\n  const std::unordered_set<int>& vertices = graph.vertices();\n\n  EXPECT_EQ(vertices.size(), 2);\n\n  // Try adding the vertex again with a new weight.\n  graph.AddVertex(0, 3.0);\n  EXPECT_EQ(vertices.size(), 2);\n\n  // The vertex weight is reset.\n  EXPECT_EQ(graph.VertexWeight(0), 3.0);\n\n  // Rest of the graph remains the same.\n  EXPECT_EQ(graph.VertexWeight(1), 2.0);\n  EXPECT_EQ(graph.Neighbors(0).size(), 1);\n  EXPECT_EQ(graph.Neighbors(1).size(), 1);\n  EXPECT_EQ(graph.EdgeWeight(0, 1), 0.5);\n  EXPECT_EQ(graph.EdgeWeight(1, 0), 0.5);\n}\n\nTEST(WeightedGraph, DieOnNonExistentVertex) {\n  WeightedGraph<int> graph;\n  graph.AddVertex(0, 1.0);\n  graph.AddVertex(1, 2.0);\n  graph.AddEdge(0, 1, 0.5);\n\n  EXPECT_DEATH_IF_SUPPORTED(graph.VertexWeight(2), \"key not found\");\n  EXPECT_DEATH_IF_SUPPORTED(graph.Neighbors(2), \"key not found\");\n}\n\nTEST(WeightedGraph, NonExistentEdge) {\n  WeightedGraph<int> graph;\n  graph.AddVertex(0, 1.0);\n  graph.AddVertex(1, 2.0);\n  graph.AddEdge(0, 1, 0.5);\n\n  // Default value for non-existent edges is 0.\n  EXPECT_EQ(graph.EdgeWeight(2, 3), 0);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/gtest/gtest.h",
    "content": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n//\n// The Google C++ Testing and Mocking Framework (Google Test)\n//\n// This header file defines the public API for Google Test.  It should be\n// included by any test program that uses Google Test.\n//\n// IMPORTANT NOTE: Due to limitation of the C++ language, we have to\n// leave some internal implementation details in this header file.\n// They are clearly marked by comments like this:\n//\n//   // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.\n//\n// Such code is NOT meant to be used by a user directly, and is subject\n// to CHANGE WITHOUT NOTICE.  Therefore DO NOT DEPEND ON IT in a user\n// program!\n//\n// Acknowledgment: Google Test borrowed the idea of automatic test\n// registration from Barthelemy Dagenais' (barthelemy@prologique.com)\n// easyUnit framework.\n\n// GOOGLETEST_CM0001 DO NOT DELETE\n\n#ifndef GTEST_INCLUDE_GTEST_GTEST_H_\n#define GTEST_INCLUDE_GTEST_GTEST_H_\n\n#include <limits>\n#include <memory>\n#include <ostream>\n#include <vector>\n\n// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// The Google C++ Testing and Mocking Framework (Google Test)\n//\n// This header file declares functions and macros used internally by\n// Google Test.  They are subject to change without notice.\n\n// GOOGLETEST_CM0001 DO NOT DELETE\n\n#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_\n#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_\n\n// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Low-level types and utilities for porting Google Test to various\n// platforms.  All macros ending with _ and symbols defined in an\n// internal namespace are subject to change without notice.  Code\n// outside Google Test MUST NOT USE THEM DIRECTLY.  Macros that don't\n// end with _ are part of Google Test's public API and can be used by\n// code outside Google Test.\n//\n// This file is fundamental to Google Test.  All other Google Test source\n// files are expected to #include this.  Therefore, it cannot #include\n// any other Google Test header.\n\n// GOOGLETEST_CM0001 DO NOT DELETE\n\n#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_\n#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_\n\n// Environment-describing macros\n// -----------------------------\n//\n// Google Test can be used in many different environments.  Macros in\n// this section tell Google Test what kind of environment it is being\n// used in, such that Google Test can provide environment-specific\n// features and implementations.\n//\n// Google Test tries to automatically detect the properties of its\n// environment, so users usually don't need to worry about these\n// macros.  However, the automatic detection is not perfect.\n// Sometimes it's necessary for a user to define some of the following\n// macros in the build script to override Google Test's decisions.\n//\n// If the user doesn't define a macro in the list, Google Test will\n// provide a default definition.  After this header is #included, all\n// macros in this list will be defined to either 1 or 0.\n//\n// Notes to maintainers:\n//   - Each macro here is a user-tweakable knob; do not grow the list\n//     lightly.\n//   - Use #if to key off these macros.  Don't use #ifdef or \"#if\n//     defined(...)\", which will not work as these macros are ALWAYS\n//     defined.\n//\n//   GTEST_HAS_CLONE          - Define it to 1/0 to indicate that clone(2)\n//                              is/isn't available.\n//   GTEST_HAS_EXCEPTIONS     - Define it to 1/0 to indicate that exceptions\n//                              are enabled.\n//   GTEST_HAS_GLOBAL_STRING  - Define it to 1/0 to indicate that ::string\n//                              is/isn't available\n//   GTEST_HAS_GLOBAL_WSTRING - Define it to 1/0 to indicate that ::wstring\n//                              is/isn't available\n//   GTEST_HAS_POSIX_RE       - Define it to 1/0 to indicate that POSIX regular\n//                              expressions are/aren't available.\n//   GTEST_HAS_PTHREAD        - Define it to 1/0 to indicate that <pthread.h>\n//                              is/isn't available.\n//   GTEST_HAS_RTTI           - Define it to 1/0 to indicate that RTTI is/isn't\n//                              enabled.\n//   GTEST_HAS_STD_WSTRING    - Define it to 1/0 to indicate that\n//                              std::wstring does/doesn't work (Google Test can\n//                              be used where std::wstring is unavailable).\n//   GTEST_HAS_SEH            - Define it to 1/0 to indicate whether the\n//                              compiler supports Microsoft's \"Structured\n//                              Exception Handling\".\n//   GTEST_HAS_STREAM_REDIRECTION\n//                            - Define it to 1/0 to indicate whether the\n//                              platform supports I/O stream redirection using\n//                              dup() and dup2().\n//   GTEST_LINKED_AS_SHARED_LIBRARY\n//                            - Define to 1 when compiling tests that use\n//                              Google Test as a shared library (known as\n//                              DLL on Windows).\n//   GTEST_CREATE_SHARED_LIBRARY\n//                            - Define to 1 when compiling Google Test itself\n//                              as a shared library.\n//   GTEST_DEFAULT_DEATH_TEST_STYLE\n//                            - The default value of --gtest_death_test_style.\n//                              The legacy default has been \"fast\" in the open\n//                              source version since 2008. The recommended value\n//                              is \"threadsafe\", and can be set in\n//                              custom/gtest-port.h.\n\n// Platform-indicating macros\n// --------------------------\n//\n// Macros indicating the platform on which Google Test is being used\n// (a macro is defined to 1 if compiled on the given platform;\n// otherwise UNDEFINED -- it's never defined to 0.).  Google Test\n// defines these macros automatically.  Code outside Google Test MUST\n// NOT define them.\n//\n//   GTEST_OS_AIX      - IBM AIX\n//   GTEST_OS_CYGWIN   - Cygwin\n//   GTEST_OS_DRAGONFLY - DragonFlyBSD\n//   GTEST_OS_FREEBSD  - FreeBSD\n//   GTEST_OS_FUCHSIA  - Fuchsia\n//   GTEST_OS_GNU_KFREEBSD - GNU/kFreeBSD\n//   GTEST_OS_HPUX     - HP-UX\n//   GTEST_OS_LINUX    - Linux\n//     GTEST_OS_LINUX_ANDROID - Google Android\n//   GTEST_OS_MAC      - Mac OS X\n//     GTEST_OS_IOS    - iOS\n//   GTEST_OS_NACL     - Google Native Client (NaCl)\n//   GTEST_OS_NETBSD   - NetBSD\n//   GTEST_OS_OPENBSD  - OpenBSD\n//   GTEST_OS_OS2      - OS/2\n//   GTEST_OS_QNX      - QNX\n//   GTEST_OS_SOLARIS  - Sun Solaris\n//   GTEST_OS_WINDOWS  - Windows (Desktop, MinGW, or Mobile)\n//     GTEST_OS_WINDOWS_DESKTOP  - Windows Desktop\n//     GTEST_OS_WINDOWS_MINGW    - MinGW\n//     GTEST_OS_WINDOWS_MOBILE   - Windows Mobile\n//     GTEST_OS_WINDOWS_PHONE    - Windows Phone\n//     GTEST_OS_WINDOWS_RT       - Windows Store App/WinRT\n//   GTEST_OS_ZOS      - z/OS\n//\n// Among the platforms, Cygwin, Linux, Max OS X, and Windows have the\n// most stable support.  Since core members of the Google Test project\n// don't have access to other platforms, support for them may be less\n// stable.  If you notice any problems on your platform, please notify\n// googletestframework@googlegroups.com (patches for fixing them are\n// even more welcome!).\n//\n// It is possible that none of the GTEST_OS_* macros are defined.\n\n// Feature-indicating macros\n// -------------------------\n//\n// Macros indicating which Google Test features are available (a macro\n// is defined to 1 if the corresponding feature is supported;\n// otherwise UNDEFINED -- it's never defined to 0.).  Google Test\n// defines these macros automatically.  Code outside Google Test MUST\n// NOT define them.\n//\n// These macros are public so that portable tests can be written.\n// Such tests typically surround code using a feature with an #if\n// which controls that code.  For example:\n//\n// #if GTEST_HAS_DEATH_TEST\n//   EXPECT_DEATH(DoSomethingDeadly());\n// #endif\n//\n//   GTEST_HAS_DEATH_TEST   - death tests\n//   GTEST_HAS_TYPED_TEST   - typed tests\n//   GTEST_HAS_TYPED_TEST_P - type-parameterized tests\n//   GTEST_IS_THREADSAFE    - Google Test is thread-safe.\n//   GOOGLETEST_CM0007 DO NOT DELETE\n//   GTEST_USES_POSIX_RE    - enhanced POSIX regex is used. Do not confuse with\n//                            GTEST_HAS_POSIX_RE (see above) which users can\n//                            define themselves.\n//   GTEST_USES_SIMPLE_RE   - our own simple regex is used;\n//                            the above RE\\b(s) are mutually exclusive.\n\n// Misc public macros\n// ------------------\n//\n//   GTEST_FLAG(flag_name)  - references the variable corresponding to\n//                            the given Google Test flag.\n\n// Internal utilities\n// ------------------\n//\n// The following macros and utilities are for Google Test's INTERNAL\n// use only.  Code outside Google Test MUST NOT USE THEM DIRECTLY.\n//\n// Macros for basic C++ coding:\n//   GTEST_AMBIGUOUS_ELSE_BLOCKER_ - for disabling a gcc warning.\n//   GTEST_ATTRIBUTE_UNUSED_  - declares that a class' instances or a\n//                              variable don't have to be used.\n//   GTEST_DISALLOW_ASSIGN_   - disables operator=.\n//   GTEST_DISALLOW_COPY_AND_ASSIGN_ - disables copy ctor and operator=.\n//   GTEST_MUST_USE_RESULT_   - declares that a function's result must be used.\n//   GTEST_INTENTIONAL_CONST_COND_PUSH_ - start code section where MSVC C4127 is\n//                                        suppressed (constant conditional).\n//   GTEST_INTENTIONAL_CONST_COND_POP_  - finish code section where MSVC C4127\n//                                        is suppressed.\n//\n// Synchronization:\n//   Mutex, MutexLock, ThreadLocal, GetThreadCount()\n//                            - synchronization primitives.\n//\n// Template meta programming:\n//   IteratorTraits - partial implementation of std::iterator_traits, which\n//                    is not available in libCstd when compiled with Sun C++.\n//\n//\n// Regular expressions:\n//   RE             - a simple regular expression class using the POSIX\n//                    Extended Regular Expression syntax on UNIX-like platforms\n//                    GOOGLETEST_CM0008 DO NOT DELETE\n//                    or a reduced regular exception syntax on other\n//                    platforms, including Windows.\n// Logging:\n//   GTEST_LOG_()   - logs messages at the specified severity level.\n//   LogToStderr()  - directs all log messages to stderr.\n//   FlushInfoLog() - flushes informational log messages.\n//\n// Stdout and stderr capturing:\n//   CaptureStdout()     - starts capturing stdout.\n//   GetCapturedStdout() - stops capturing stdout and returns the captured\n//                         string.\n//   CaptureStderr()     - starts capturing stderr.\n//   GetCapturedStderr() - stops capturing stderr and returns the captured\n//                         string.\n//\n// Integer types:\n//   TypeWithSize   - maps an integer to a int type.\n//   Int32, UInt32, Int64, UInt64, TimeInMillis\n//                  - integers of known sizes.\n//   BiggestInt     - the biggest signed integer type.\n//\n// Command-line utilities:\n//   GTEST_DECLARE_*()  - declares a flag.\n//   GTEST_DEFINE_*()   - defines a flag.\n//   GetInjectableArgvs() - returns the command line as a vector of strings.\n//\n// Environment variable utilities:\n//   GetEnv()             - gets the value of an environment variable.\n//   BoolFromGTestEnv()   - parses a bool environment variable.\n//   Int32FromGTestEnv()  - parses an Int32 environment variable.\n//   StringFromGTestEnv() - parses a string environment variable.\n//\n// Deprecation warnings:\n//   GTEST_INTERNAL_DEPRECATED(message) - attribute marking a function as\n//                                        deprecated; calling a marked function\n//                                        should generate a compiler warning\n\n#include <ctype.h>   // for isspace, etc\n#include <stddef.h>  // for ptrdiff_t\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <memory>\n#include <type_traits>\n\n#ifndef _WIN32_WCE\n# include <sys/types.h>\n# include <sys/stat.h>\n#endif  // !_WIN32_WCE\n\n#if defined __APPLE__\n# include <AvailabilityMacros.h>\n# include <TargetConditionals.h>\n#endif\n\n// Brings in the definition of HAS_GLOBAL_STRING.  This must be done\n// BEFORE we test HAS_GLOBAL_STRING.\n#include <string>     // NOLINT\n#include <algorithm>  // NOLINT\n#include <iostream>   // NOLINT\n#include <sstream>    // NOLINT\n#include <tuple>\n#include <utility>\n#include <vector>  // NOLINT\n\n// Copyright 2015, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// The Google C++ Testing and Mocking Framework (Google Test)\n//\n// This header file defines the GTEST_OS_* macro.\n// It is separate from gtest-port.h so that custom/gtest-port.h can include it.\n\n#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_ARCH_H_\n#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_ARCH_H_\n\n// Determines the platform on which Google Test is compiled.\n#ifdef __CYGWIN__\n# define GTEST_OS_CYGWIN 1\n# elif defined(__MINGW__) || defined(__MINGW32__) || defined(__MINGW64__)\n#  define GTEST_OS_WINDOWS_MINGW 1\n#  define GTEST_OS_WINDOWS 1\n#elif defined _WIN32\n# define GTEST_OS_WINDOWS 1\n# ifdef _WIN32_WCE\n#  define GTEST_OS_WINDOWS_MOBILE 1\n# elif defined(WINAPI_FAMILY)\n#  include <winapifamily.h>\n#  if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)\n#   define GTEST_OS_WINDOWS_DESKTOP 1\n#  elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_PHONE_APP)\n#   define GTEST_OS_WINDOWS_PHONE 1\n#  elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)\n#   define GTEST_OS_WINDOWS_RT 1\n#  elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_TV_TITLE)\n#   define GTEST_OS_WINDOWS_PHONE 1\n#   define GTEST_OS_WINDOWS_TV_TITLE 1\n#  else\n    // WINAPI_FAMILY defined but no known partition matched.\n    // Default to desktop.\n#   define GTEST_OS_WINDOWS_DESKTOP 1\n#  endif\n# else\n#  define GTEST_OS_WINDOWS_DESKTOP 1\n# endif  // _WIN32_WCE\n#elif defined __OS2__\n# define GTEST_OS_OS2 1\n#elif defined __APPLE__\n# define GTEST_OS_MAC 1\n# if TARGET_OS_IPHONE\n#  define GTEST_OS_IOS 1\n# endif\n#elif defined __DragonFly__\n# define GTEST_OS_DRAGONFLY 1\n#elif defined __FreeBSD__\n# define GTEST_OS_FREEBSD 1\n#elif defined __Fuchsia__\n# define GTEST_OS_FUCHSIA 1\n#elif defined(__GLIBC__) && defined(__FreeBSD_kernel__)\n# define GTEST_OS_GNU_KFREEBSD 1\n#elif defined __linux__\n# define GTEST_OS_LINUX 1\n# if defined __ANDROID__\n#  define GTEST_OS_LINUX_ANDROID 1\n# endif\n#elif defined __MVS__\n# define GTEST_OS_ZOS 1\n#elif defined(__sun) && defined(__SVR4)\n# define GTEST_OS_SOLARIS 1\n#elif defined(_AIX)\n# define GTEST_OS_AIX 1\n#elif defined(__hpux)\n# define GTEST_OS_HPUX 1\n#elif defined __native_client__\n# define GTEST_OS_NACL 1\n#elif defined __NetBSD__\n# define GTEST_OS_NETBSD 1\n#elif defined __OpenBSD__\n# define GTEST_OS_OPENBSD 1\n#elif defined __QNX__\n# define GTEST_OS_QNX 1\n#endif  // __CYGWIN__\n\n#endif  // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_ARCH_H_\n// Copyright 2015, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Injection point for custom user configurations. See README for details\n//\n// ** Custom implementation starts here **\n\n#ifndef GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PORT_H_\n#define GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PORT_H_\n\n#endif  // GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PORT_H_\n\n#if !defined(GTEST_DEV_EMAIL_)\n# define GTEST_DEV_EMAIL_ \"googletestframework@@googlegroups.com\"\n# define GTEST_FLAG_PREFIX_ \"gtest_\"\n# define GTEST_FLAG_PREFIX_DASH_ \"gtest-\"\n# define GTEST_FLAG_PREFIX_UPPER_ \"GTEST_\"\n# define GTEST_NAME_ \"Google Test\"\n# define GTEST_PROJECT_URL_ \"https://github.com/google/googletest/\"\n#endif  // !defined(GTEST_DEV_EMAIL_)\n\n#if !defined(GTEST_INIT_GOOGLE_TEST_NAME_)\n# define GTEST_INIT_GOOGLE_TEST_NAME_ \"testing::InitGoogleTest\"\n#endif  // !defined(GTEST_INIT_GOOGLE_TEST_NAME_)\n\n// Determines the version of gcc that is used to compile this.\n#ifdef __GNUC__\n// 40302 means version 4.3.2.\n# define GTEST_GCC_VER_ \\\n    (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__)\n#endif  // __GNUC__\n\n// Macros for disabling Microsoft Visual C++ warnings.\n//\n//   GTEST_DISABLE_MSC_WARNINGS_PUSH_(4800 4385)\n//   /* code that triggers warnings C4800 and C4385 */\n//   GTEST_DISABLE_MSC_WARNINGS_POP_()\n#if defined(_MSC_VER)\n# define GTEST_DISABLE_MSC_WARNINGS_PUSH_(warnings) \\\n    __pragma(warning(push))                        \\\n    __pragma(warning(disable: warnings))\n# define GTEST_DISABLE_MSC_WARNINGS_POP_()          \\\n    __pragma(warning(pop))\n#else\n// Not all compilers are MSVC\n# define GTEST_DISABLE_MSC_WARNINGS_PUSH_(warnings)\n# define GTEST_DISABLE_MSC_WARNINGS_POP_()\n#endif\n\n// Clang on Windows does not understand MSVC's pragma warning.\n// We need clang-specific way to disable function deprecation warning.\n#ifdef __clang__\n# define GTEST_DISABLE_MSC_DEPRECATED_PUSH_()                         \\\n    _Pragma(\"clang diagnostic push\")                                  \\\n    _Pragma(\"clang diagnostic ignored \\\"-Wdeprecated-declarations\\\"\") \\\n    _Pragma(\"clang diagnostic ignored \\\"-Wdeprecated-implementations\\\"\")\n#define GTEST_DISABLE_MSC_DEPRECATED_POP_() \\\n    _Pragma(\"clang diagnostic pop\")\n#else\n# define GTEST_DISABLE_MSC_DEPRECATED_PUSH_() \\\n    GTEST_DISABLE_MSC_WARNINGS_PUSH_(4996)\n# define GTEST_DISABLE_MSC_DEPRECATED_POP_() \\\n    GTEST_DISABLE_MSC_WARNINGS_POP_()\n#endif\n\n// Brings in definitions for functions used in the testing::internal::posix\n// namespace (read, write, close, chdir, isatty, stat). We do not currently\n// use them on Windows Mobile.\n#if GTEST_OS_WINDOWS\n# if !GTEST_OS_WINDOWS_MOBILE\n#  include <direct.h>\n#  include <io.h>\n# endif\n// In order to avoid having to include <windows.h>, use forward declaration\n#if GTEST_OS_WINDOWS_MINGW && !defined(__MINGW64_VERSION_MAJOR)\n// MinGW defined _CRITICAL_SECTION and _RTL_CRITICAL_SECTION as two\n// separate (equivalent) structs, instead of using typedef\ntypedef struct _CRITICAL_SECTION GTEST_CRITICAL_SECTION;\n#else\n// Assume CRITICAL_SECTION is a typedef of _RTL_CRITICAL_SECTION.\n// This assumption is verified by\n// WindowsTypesTest.CRITICAL_SECTIONIs_RTL_CRITICAL_SECTION.\ntypedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;\n#endif\n#else\n// This assumes that non-Windows OSes provide unistd.h. For OSes where this\n// is not the case, we need to include headers that provide the functions\n// mentioned above.\n# include <unistd.h>\n# include <strings.h>\n#endif  // GTEST_OS_WINDOWS\n\n#if GTEST_OS_LINUX_ANDROID\n// Used to define __ANDROID_API__ matching the target NDK API level.\n#  include <android/api-level.h>  // NOLINT\n#endif\n\n// Defines this to true iff Google Test can use POSIX regular expressions.\n#ifndef GTEST_HAS_POSIX_RE\n# if GTEST_OS_LINUX_ANDROID\n// On Android, <regex.h> is only available starting with Gingerbread.\n#  define GTEST_HAS_POSIX_RE (__ANDROID_API__ >= 9)\n# else\n#  define GTEST_HAS_POSIX_RE (!GTEST_OS_WINDOWS)\n# endif\n#endif\n\n#if GTEST_USES_PCRE\n// The appropriate headers have already been included.\n\n#elif GTEST_HAS_POSIX_RE\n\n// On some platforms, <regex.h> needs someone to define size_t, and\n// won't compile otherwise.  We can #include it here as we already\n// included <stdlib.h>, which is guaranteed to define size_t through\n// <stddef.h>.\n# include <regex.h>  // NOLINT\n\n# define GTEST_USES_POSIX_RE 1\n\n#elif GTEST_OS_WINDOWS\n\n// <regex.h> is not available on Windows.  Use our own simple regex\n// implementation instead.\n# define GTEST_USES_SIMPLE_RE 1\n\n#else\n\n// <regex.h> may not be available on this platform.  Use our own\n// simple regex implementation instead.\n# define GTEST_USES_SIMPLE_RE 1\n\n#endif  // GTEST_USES_PCRE\n\n#ifndef GTEST_HAS_EXCEPTIONS\n// The user didn't tell us whether exceptions are enabled, so we need\n// to figure it out.\n# if defined(_MSC_VER) && defined(_CPPUNWIND)\n// MSVC defines _CPPUNWIND to 1 iff exceptions are enabled.\n#  define GTEST_HAS_EXCEPTIONS 1\n# elif defined(__BORLANDC__)\n// C++Builder's implementation of the STL uses the _HAS_EXCEPTIONS\n// macro to enable exceptions, so we'll do the same.\n// Assumes that exceptions are enabled by default.\n#  ifndef _HAS_EXCEPTIONS\n#   define _HAS_EXCEPTIONS 1\n#  endif  // _HAS_EXCEPTIONS\n#  define GTEST_HAS_EXCEPTIONS _HAS_EXCEPTIONS\n# elif defined(__clang__)\n// clang defines __EXCEPTIONS iff exceptions are enabled before clang 220714,\n// but iff cleanups are enabled after that. In Obj-C++ files, there can be\n// cleanups for ObjC exceptions which also need cleanups, even if C++ exceptions\n// are disabled. clang has __has_feature(cxx_exceptions) which checks for C++\n// exceptions starting at clang r206352, but which checked for cleanups prior to\n// that. To reliably check for C++ exception availability with clang, check for\n// __EXCEPTIONS && __has_feature(cxx_exceptions).\n#  define GTEST_HAS_EXCEPTIONS (__EXCEPTIONS && __has_feature(cxx_exceptions))\n# elif defined(__GNUC__) && __EXCEPTIONS\n// gcc defines __EXCEPTIONS to 1 iff exceptions are enabled.\n#  define GTEST_HAS_EXCEPTIONS 1\n# elif defined(__SUNPRO_CC)\n// Sun Pro CC supports exceptions.  However, there is no compile-time way of\n// detecting whether they are enabled or not.  Therefore, we assume that\n// they are enabled unless the user tells us otherwise.\n#  define GTEST_HAS_EXCEPTIONS 1\n# elif defined(__IBMCPP__) && __EXCEPTIONS\n// xlC defines __EXCEPTIONS to 1 iff exceptions are enabled.\n#  define GTEST_HAS_EXCEPTIONS 1\n# elif defined(__HP_aCC)\n// Exception handling is in effect by default in HP aCC compiler. It has to\n// be turned of by +noeh compiler option if desired.\n#  define GTEST_HAS_EXCEPTIONS 1\n# else\n// For other compilers, we assume exceptions are disabled to be\n// conservative.\n#  define GTEST_HAS_EXCEPTIONS 0\n# endif  // defined(_MSC_VER) || defined(__BORLANDC__)\n#endif  // GTEST_HAS_EXCEPTIONS\n\n#if !defined(GTEST_HAS_STD_STRING)\n// Even though we don't use this macro any longer, we keep it in case\n// some clients still depend on it.\n# define GTEST_HAS_STD_STRING 1\n#elif !GTEST_HAS_STD_STRING\n// The user told us that ::std::string isn't available.\n# error \"::std::string isn't available.\"\n#endif  // !defined(GTEST_HAS_STD_STRING)\n\n#ifndef GTEST_HAS_GLOBAL_STRING\n# define GTEST_HAS_GLOBAL_STRING 0\n#endif  // GTEST_HAS_GLOBAL_STRING\n\n#ifndef GTEST_HAS_STD_WSTRING\n// The user didn't tell us whether ::std::wstring is available, so we need\n// to figure it out.\n// Cygwin 1.7 and below doesn't support ::std::wstring.\n// Solaris' libc++ doesn't support it either.  Android has\n// no support for it at least as recent as Froyo (2.2).\n# define GTEST_HAS_STD_WSTRING \\\n    (!(GTEST_OS_LINUX_ANDROID || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS))\n\n#endif  // GTEST_HAS_STD_WSTRING\n\n#ifndef GTEST_HAS_GLOBAL_WSTRING\n// The user didn't tell us whether ::wstring is available, so we need\n// to figure it out.\n# define GTEST_HAS_GLOBAL_WSTRING \\\n    (GTEST_HAS_STD_WSTRING && GTEST_HAS_GLOBAL_STRING)\n#endif  // GTEST_HAS_GLOBAL_WSTRING\n\n// Determines whether RTTI is available.\n#ifndef GTEST_HAS_RTTI\n// The user didn't tell us whether RTTI is enabled, so we need to\n// figure it out.\n\n# ifdef _MSC_VER\n\n#  ifdef _CPPRTTI  // MSVC defines this macro iff RTTI is enabled.\n#   define GTEST_HAS_RTTI 1\n#  else\n#   define GTEST_HAS_RTTI 0\n#  endif\n\n// Starting with version 4.3.2, gcc defines __GXX_RTTI iff RTTI is enabled.\n# elif defined(__GNUC__)\n\n#  ifdef __GXX_RTTI\n// When building against STLport with the Android NDK and with\n// -frtti -fno-exceptions, the build fails at link time with undefined\n// references to __cxa_bad_typeid. Note sure if STL or toolchain bug,\n// so disable RTTI when detected.\n#   if GTEST_OS_LINUX_ANDROID && defined(_STLPORT_MAJOR) && \\\n       !defined(__EXCEPTIONS)\n#    define GTEST_HAS_RTTI 0\n#   else\n#    define GTEST_HAS_RTTI 1\n#   endif  // GTEST_OS_LINUX_ANDROID && __STLPORT_MAJOR && !__EXCEPTIONS\n#  else\n#   define GTEST_HAS_RTTI 0\n#  endif  // __GXX_RTTI\n\n// Clang defines __GXX_RTTI starting with version 3.0, but its manual recommends\n// using has_feature instead. has_feature(cxx_rtti) is supported since 2.7, the\n// first version with C++ support.\n# elif defined(__clang__)\n\n#  define GTEST_HAS_RTTI __has_feature(cxx_rtti)\n\n// Starting with version 9.0 IBM Visual Age defines __RTTI_ALL__ to 1 if\n// both the typeid and dynamic_cast features are present.\n# elif defined(__IBMCPP__) && (__IBMCPP__ >= 900)\n\n#  ifdef __RTTI_ALL__\n#   define GTEST_HAS_RTTI 1\n#  else\n#   define GTEST_HAS_RTTI 0\n#  endif\n\n# else\n\n// For all other compilers, we assume RTTI is enabled.\n#  define GTEST_HAS_RTTI 1\n\n# endif  // _MSC_VER\n\n#endif  // GTEST_HAS_RTTI\n\n// It's this header's responsibility to #include <typeinfo> when RTTI\n// is enabled.\n#if GTEST_HAS_RTTI\n# include <typeinfo>\n#endif\n\n// Determines whether Google Test can use the pthreads library.\n#ifndef GTEST_HAS_PTHREAD\n// The user didn't tell us explicitly, so we make reasonable assumptions about\n// which platforms have pthreads support.\n//\n// To disable threading support in Google Test, add -DGTEST_HAS_PTHREAD=0\n// to your compiler flags.\n#define GTEST_HAS_PTHREAD                                             \\\n  (GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_HPUX || GTEST_OS_QNX || \\\n   GTEST_OS_FREEBSD || GTEST_OS_NACL || GTEST_OS_NETBSD || GTEST_OS_FUCHSIA || \\\n   GTEST_OS_DRAGONFLY || GTEST_OS_GNU_KFREEBSD || GTEST_OS_OPENBSD)\n#endif  // GTEST_HAS_PTHREAD\n\n#if GTEST_HAS_PTHREAD\n// gtest-port.h guarantees to #include <pthread.h> when GTEST_HAS_PTHREAD is\n// true.\n# include <pthread.h>  // NOLINT\n\n// For timespec and nanosleep, used below.\n# include <time.h>  // NOLINT\n#endif\n\n// Determines whether clone(2) is supported.\n// Usually it will only be available on Linux, excluding\n// Linux on the Itanium architecture.\n// Also see http://linux.die.net/man/2/clone.\n#ifndef GTEST_HAS_CLONE\n// The user didn't tell us, so we need to figure it out.\n\n# if GTEST_OS_LINUX && !defined(__ia64__)\n#  if GTEST_OS_LINUX_ANDROID\n// On Android, clone() became available at different API levels for each 32-bit\n// architecture.\n#    if defined(__LP64__) || \\\n        (defined(__arm__) && __ANDROID_API__ >= 9) || \\\n        (defined(__mips__) && __ANDROID_API__ >= 12) || \\\n        (defined(__i386__) && __ANDROID_API__ >= 17)\n#     define GTEST_HAS_CLONE 1\n#    else\n#     define GTEST_HAS_CLONE 0\n#    endif\n#  else\n#   define GTEST_HAS_CLONE 1\n#  endif\n# else\n#  define GTEST_HAS_CLONE 0\n# endif  // GTEST_OS_LINUX && !defined(__ia64__)\n\n#endif  // GTEST_HAS_CLONE\n\n// Determines whether to support stream redirection. This is used to test\n// output correctness and to implement death tests.\n#ifndef GTEST_HAS_STREAM_REDIRECTION\n// By default, we assume that stream redirection is supported on all\n// platforms except known mobile ones.\n# if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_WINDOWS_PHONE || GTEST_OS_WINDOWS_RT\n#  define GTEST_HAS_STREAM_REDIRECTION 0\n# else\n#  define GTEST_HAS_STREAM_REDIRECTION 1\n# endif  // !GTEST_OS_WINDOWS_MOBILE\n#endif  // GTEST_HAS_STREAM_REDIRECTION\n\n// Determines whether to support death tests.\n// pops up a dialog window that cannot be suppressed programmatically.\n#if (GTEST_OS_LINUX || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS ||   \\\n     (GTEST_OS_MAC && !GTEST_OS_IOS) ||                         \\\n     (GTEST_OS_WINDOWS_DESKTOP && _MSC_VER) ||                  \\\n     GTEST_OS_WINDOWS_MINGW || GTEST_OS_AIX || GTEST_OS_HPUX || \\\n     GTEST_OS_OPENBSD || GTEST_OS_QNX || GTEST_OS_FREEBSD || \\\n     GTEST_OS_NETBSD || GTEST_OS_FUCHSIA || GTEST_OS_DRAGONFLY || \\\n     GTEST_OS_GNU_KFREEBSD)\n# define GTEST_HAS_DEATH_TEST 1\n#endif\n\n// Determines whether to support type-driven tests.\n\n// Typed tests need <typeinfo> and variadic macros, which GCC, VC++ 8.0,\n// Sun Pro CC, IBM Visual Age, and HP aCC support.\n#if defined(__GNUC__) || defined(_MSC_VER) || defined(__SUNPRO_CC) || \\\n    defined(__IBMCPP__) || defined(__HP_aCC)\n# define GTEST_HAS_TYPED_TEST 1\n# define GTEST_HAS_TYPED_TEST_P 1\n#endif\n\n// Determines whether the system compiler uses UTF-16 for encoding wide strings.\n#define GTEST_WIDE_STRING_USES_UTF16_ \\\n  (GTEST_OS_WINDOWS || GTEST_OS_CYGWIN || GTEST_OS_AIX || GTEST_OS_OS2)\n\n// Determines whether test results can be streamed to a socket.\n#if GTEST_OS_LINUX || GTEST_OS_GNU_KFREEBSD || GTEST_OS_DRAGONFLY || \\\n    GTEST_OS_FREEBSD || GTEST_OS_NETBSD || GTEST_OS_OPENBSD\n# define GTEST_CAN_STREAM_RESULTS_ 1\n#endif\n\n// Defines some utility macros.\n\n// The GNU compiler emits a warning if nested \"if\" statements are followed by\n// an \"else\" statement and braces are not used to explicitly disambiguate the\n// \"else\" binding.  This leads to problems with code like:\n//\n//   if (gate)\n//     ASSERT_*(condition) << \"Some message\";\n//\n// The \"switch (0) case 0:\" idiom is used to suppress this.\n#ifdef __INTEL_COMPILER\n# define GTEST_AMBIGUOUS_ELSE_BLOCKER_\n#else\n# define GTEST_AMBIGUOUS_ELSE_BLOCKER_ switch (0) case 0: default:  // NOLINT\n#endif\n\n// Use this annotation at the end of a struct/class definition to\n// prevent the compiler from optimizing away instances that are never\n// used.  This is useful when all interesting logic happens inside the\n// c'tor and / or d'tor.  Example:\n//\n//   struct Foo {\n//     Foo() { ... }\n//   } GTEST_ATTRIBUTE_UNUSED_;\n//\n// Also use it after a variable or parameter declaration to tell the\n// compiler the variable/parameter does not have to be used.\n#if defined(__GNUC__) && !defined(COMPILER_ICC)\n# define GTEST_ATTRIBUTE_UNUSED_ __attribute__ ((unused))\n#elif defined(__clang__)\n# if __has_attribute(unused)\n#  define GTEST_ATTRIBUTE_UNUSED_ __attribute__ ((unused))\n# endif\n#endif\n#ifndef GTEST_ATTRIBUTE_UNUSED_\n# define GTEST_ATTRIBUTE_UNUSED_\n#endif\n\n// Use this annotation before a function that takes a printf format string.\n#if (defined(__GNUC__) || defined(__clang__)) && !defined(COMPILER_ICC)\n# if defined(__MINGW_PRINTF_FORMAT)\n// MinGW has two different printf implementations. Ensure the format macro\n// matches the selected implementation. See\n// https://sourceforge.net/p/mingw-w64/wiki2/gnu%20printf/.\n#  define GTEST_ATTRIBUTE_PRINTF_(string_index, first_to_check) \\\n       __attribute__((__format__(__MINGW_PRINTF_FORMAT, string_index, \\\n                                 first_to_check)))\n# else\n#  define GTEST_ATTRIBUTE_PRINTF_(string_index, first_to_check) \\\n       __attribute__((__format__(__printf__, string_index, first_to_check)))\n# endif\n#else\n# define GTEST_ATTRIBUTE_PRINTF_(string_index, first_to_check)\n#endif\n\n\n// A macro to disallow operator=\n// This should be used in the private: declarations for a class.\n#define GTEST_DISALLOW_ASSIGN_(type) \\\n  void operator=(type const &) = delete\n\n// A macro to disallow copy constructor and operator=\n// This should be used in the private: declarations for a class.\n#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type) \\\n  type(type const &) = delete; \\\n  GTEST_DISALLOW_ASSIGN_(type)\n\n// Tell the compiler to warn about unused return values for functions declared\n// with this macro.  The macro should be used on function declarations\n// following the argument list:\n//\n//   Sprocket* AllocateSprocket() GTEST_MUST_USE_RESULT_;\n#if defined(__GNUC__) && !defined(COMPILER_ICC)\n# define GTEST_MUST_USE_RESULT_ __attribute__ ((warn_unused_result))\n#else\n# define GTEST_MUST_USE_RESULT_\n#endif  // __GNUC__ && !COMPILER_ICC\n\n// MS C++ compiler emits warning when a conditional expression is compile time\n// constant. In some contexts this warning is false positive and needs to be\n// suppressed. Use the following two macros in such cases:\n//\n// GTEST_INTENTIONAL_CONST_COND_PUSH_()\n// while (true) {\n// GTEST_INTENTIONAL_CONST_COND_POP_()\n// }\n# define GTEST_INTENTIONAL_CONST_COND_PUSH_() \\\n    GTEST_DISABLE_MSC_WARNINGS_PUSH_(4127)\n# define GTEST_INTENTIONAL_CONST_COND_POP_() \\\n    GTEST_DISABLE_MSC_WARNINGS_POP_()\n\n// Determine whether the compiler supports Microsoft's Structured Exception\n// Handling.  This is supported by several Windows compilers but generally\n// does not exist on any other system.\n#ifndef GTEST_HAS_SEH\n// The user didn't tell us, so we need to figure it out.\n\n# if defined(_MSC_VER) || defined(__BORLANDC__)\n// These two compilers are known to support SEH.\n#  define GTEST_HAS_SEH 1\n# else\n// Assume no SEH.\n#  define GTEST_HAS_SEH 0\n# endif\n\n#endif  // GTEST_HAS_SEH\n\n#ifndef GTEST_IS_THREADSAFE\n\n#define GTEST_IS_THREADSAFE                                                 \\\n  (GTEST_HAS_MUTEX_AND_THREAD_LOCAL_ ||                                     \\\n   (GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT) || \\\n   GTEST_HAS_PTHREAD)\n\n#endif  // GTEST_IS_THREADSAFE\n\n// GTEST_API_ qualifies all symbols that must be exported. The definitions below\n// are guarded by #ifndef to give embedders a chance to define GTEST_API_ in\n// gtest/internal/custom/gtest-port.h\n#ifndef GTEST_API_\n\n#ifdef _MSC_VER\n# if GTEST_LINKED_AS_SHARED_LIBRARY\n#  define GTEST_API_ __declspec(dllimport)\n# elif GTEST_CREATE_SHARED_LIBRARY\n#  define GTEST_API_ __declspec(dllexport)\n# endif\n#elif __GNUC__ >= 4 || defined(__clang__)\n# define GTEST_API_ __attribute__((visibility (\"default\")))\n#endif  // _MSC_VER\n\n#endif  // GTEST_API_\n\n#ifndef GTEST_API_\n# define GTEST_API_\n#endif  // GTEST_API_\n\n#ifndef GTEST_DEFAULT_DEATH_TEST_STYLE\n# define GTEST_DEFAULT_DEATH_TEST_STYLE  \"fast\"\n#endif  // GTEST_DEFAULT_DEATH_TEST_STYLE\n\n#ifdef __GNUC__\n// Ask the compiler to never inline a given function.\n# define GTEST_NO_INLINE_ __attribute__((noinline))\n#else\n# define GTEST_NO_INLINE_\n#endif\n\n// _LIBCPP_VERSION is defined by the libc++ library from the LLVM project.\n#if !defined(GTEST_HAS_CXXABI_H_)\n# if defined(__GLIBCXX__) || (defined(_LIBCPP_VERSION) && !defined(_MSC_VER))\n#  define GTEST_HAS_CXXABI_H_ 1\n# else\n#  define GTEST_HAS_CXXABI_H_ 0\n# endif\n#endif\n\n// A function level attribute to disable checking for use of uninitialized\n// memory when built with MemorySanitizer.\n#if defined(__clang__)\n# if __has_feature(memory_sanitizer)\n#  define GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_ \\\n       __attribute__((no_sanitize_memory))\n# else\n#  define GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_\n# endif  // __has_feature(memory_sanitizer)\n#else\n# define GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_\n#endif  // __clang__\n\n// A function level attribute to disable AddressSanitizer instrumentation.\n#if defined(__clang__)\n# if __has_feature(address_sanitizer)\n#  define GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_ \\\n       __attribute__((no_sanitize_address))\n# else\n#  define GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_\n# endif  // __has_feature(address_sanitizer)\n#else\n# define GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_\n#endif  // __clang__\n\n// A function level attribute to disable ThreadSanitizer instrumentation.\n#if defined(__clang__)\n# if __has_feature(thread_sanitizer)\n#  define GTEST_ATTRIBUTE_NO_SANITIZE_THREAD_ \\\n       __attribute__((no_sanitize_thread))\n# else\n#  define GTEST_ATTRIBUTE_NO_SANITIZE_THREAD_\n# endif  // __has_feature(thread_sanitizer)\n#else\n# define GTEST_ATTRIBUTE_NO_SANITIZE_THREAD_\n#endif  // __clang__\n\nnamespace testing {\n\nclass Message;\n\n// Legacy imports for backwards compatibility.\n// New code should use std:: names directly.\nusing std::get;\nusing std::make_tuple;\nusing std::tuple;\nusing std::tuple_element;\nusing std::tuple_size;\n\nnamespace internal {\n\n// A secret type that Google Test users don't know about.  It has no\n// definition on purpose.  Therefore it's impossible to create a\n// Secret object, which is what we want.\nclass Secret;\n\n// The GTEST_COMPILE_ASSERT_ is a legacy macro used to verify that a compile\n// time expression is true (in new code, use static_assert instead). For\n// example, you could use it to verify the size of a static array:\n//\n//   GTEST_COMPILE_ASSERT_(GTEST_ARRAY_SIZE_(names) == NUM_NAMES,\n//                         names_incorrect_size);\n//\n// The second argument to the macro must be a valid C++ identifier. If the\n// expression is false, compiler will issue an error containing this identifier.\n#define GTEST_COMPILE_ASSERT_(expr, msg) static_assert(expr, #msg)\n\n// StaticAssertTypeEqHelper is used by StaticAssertTypeEq defined in gtest.h.\n//\n// This template is declared, but intentionally undefined.\ntemplate <typename T1, typename T2>\nstruct StaticAssertTypeEqHelper;\n\ntemplate <typename T>\nstruct StaticAssertTypeEqHelper<T, T> {\n  enum { value = true };\n};\n\n// Same as std::is_same<>.\ntemplate <typename T, typename U>\nstruct IsSame {\n  enum { value = false };\n};\ntemplate <typename T>\nstruct IsSame<T, T> {\n  enum { value = true };\n};\n\n// Evaluates to the number of elements in 'array'.\n#define GTEST_ARRAY_SIZE_(array) (sizeof(array) / sizeof(array[0]))\n\n#if GTEST_HAS_GLOBAL_STRING\ntypedef ::string string;\n#else\ntypedef ::std::string string;\n#endif  // GTEST_HAS_GLOBAL_STRING\n\n#if GTEST_HAS_GLOBAL_WSTRING\ntypedef ::wstring wstring;\n#elif GTEST_HAS_STD_WSTRING\ntypedef ::std::wstring wstring;\n#endif  // GTEST_HAS_GLOBAL_WSTRING\n\n// A helper for suppressing warnings on constant condition.  It just\n// returns 'condition'.\nGTEST_API_ bool IsTrue(bool condition);\n\n// Defines RE.\n\n#if GTEST_USES_PCRE\n// if used, PCRE is injected by custom/gtest-port.h\n#elif GTEST_USES_POSIX_RE || GTEST_USES_SIMPLE_RE\n\n// A simple C++ wrapper for <regex.h>.  It uses the POSIX Extended\n// Regular Expression syntax.\nclass GTEST_API_ RE {\n public:\n  // A copy constructor is required by the Standard to initialize object\n  // references from r-values.\n  RE(const RE& other) { Init(other.pattern()); }\n\n  // Constructs an RE from a string.\n  RE(const ::std::string& regex) { Init(regex.c_str()); }  // NOLINT\n\n# if GTEST_HAS_GLOBAL_STRING\n\n  RE(const ::string& regex) { Init(regex.c_str()); }  // NOLINT\n\n# endif  // GTEST_HAS_GLOBAL_STRING\n\n  RE(const char* regex) { Init(regex); }  // NOLINT\n  ~RE();\n\n  // Returns the string representation of the regex.\n  const char* pattern() const { return pattern_; }\n\n  // FullMatch(str, re) returns true iff regular expression re matches\n  // the entire str.\n  // PartialMatch(str, re) returns true iff regular expression re\n  // matches a substring of str (including str itself).\n  static bool FullMatch(const ::std::string& str, const RE& re) {\n    return FullMatch(str.c_str(), re);\n  }\n  static bool PartialMatch(const ::std::string& str, const RE& re) {\n    return PartialMatch(str.c_str(), re);\n  }\n\n# if GTEST_HAS_GLOBAL_STRING\n\n  static bool FullMatch(const ::string& str, const RE& re) {\n    return FullMatch(str.c_str(), re);\n  }\n  static bool PartialMatch(const ::string& str, const RE& re) {\n    return PartialMatch(str.c_str(), re);\n  }\n\n# endif  // GTEST_HAS_GLOBAL_STRING\n\n  static bool FullMatch(const char* str, const RE& re);\n  static bool PartialMatch(const char* str, const RE& re);\n\n private:\n  void Init(const char* regex);\n  const char* pattern_;\n  bool is_valid_;\n\n# if GTEST_USES_POSIX_RE\n\n  regex_t full_regex_;     // For FullMatch().\n  regex_t partial_regex_;  // For PartialMatch().\n\n# else  // GTEST_USES_SIMPLE_RE\n\n  const char* full_pattern_;  // For FullMatch();\n\n# endif\n\n  GTEST_DISALLOW_ASSIGN_(RE);\n};\n\n#endif  // GTEST_USES_PCRE\n\n// Formats a source file path and a line number as they would appear\n// in an error message from the compiler used to compile this code.\nGTEST_API_ ::std::string FormatFileLocation(const char* file, int line);\n\n// Formats a file location for compiler-independent XML output.\n// Although this function is not platform dependent, we put it next to\n// FormatFileLocation in order to contrast the two functions.\nGTEST_API_ ::std::string FormatCompilerIndependentFileLocation(const char* file,\n                                                               int line);\n\n// Defines logging utilities:\n//   GTEST_LOG_(severity) - logs messages at the specified severity level. The\n//                          message itself is streamed into the macro.\n//   LogToStderr()  - directs all log messages to stderr.\n//   FlushInfoLog() - flushes informational log messages.\n\nenum GTestLogSeverity {\n  GTEST_INFO,\n  GTEST_WARNING,\n  GTEST_ERROR,\n  GTEST_FATAL\n};\n\n// Formats log entry severity, provides a stream object for streaming the\n// log message, and terminates the message with a newline when going out of\n// scope.\nclass GTEST_API_ GTestLog {\n public:\n  GTestLog(GTestLogSeverity severity, const char* file, int line);\n\n  // Flushes the buffers and, if severity is GTEST_FATAL, aborts the program.\n  ~GTestLog();\n\n  ::std::ostream& GetStream() { return ::std::cerr; }\n\n private:\n  const GTestLogSeverity severity_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(GTestLog);\n};\n\n#if !defined(GTEST_LOG_)\n\n# define GTEST_LOG_(severity) \\\n    ::testing::internal::GTestLog(::testing::internal::GTEST_##severity, \\\n                                  __FILE__, __LINE__).GetStream()\n\ninline void LogToStderr() {}\ninline void FlushInfoLog() { fflush(nullptr); }\n\n#endif  // !defined(GTEST_LOG_)\n\n#if !defined(GTEST_CHECK_)\n// INTERNAL IMPLEMENTATION - DO NOT USE.\n//\n// GTEST_CHECK_ is an all-mode assert. It aborts the program if the condition\n// is not satisfied.\n//  Synopsys:\n//    GTEST_CHECK_(boolean_condition);\n//     or\n//    GTEST_CHECK_(boolean_condition) << \"Additional message\";\n//\n//    This checks the condition and if the condition is not satisfied\n//    it prints message about the condition violation, including the\n//    condition itself, plus additional message streamed into it, if any,\n//    and then it aborts the program. It aborts the program irrespective of\n//    whether it is built in the debug mode or not.\n# define GTEST_CHECK_(condition) \\\n    GTEST_AMBIGUOUS_ELSE_BLOCKER_ \\\n    if (::testing::internal::IsTrue(condition)) \\\n      ; \\\n    else \\\n      GTEST_LOG_(FATAL) << \"Condition \" #condition \" failed. \"\n#endif  // !defined(GTEST_CHECK_)\n\n// An all-mode assert to verify that the given POSIX-style function\n// call returns 0 (indicating success).  Known limitation: this\n// doesn't expand to a balanced 'if' statement, so enclose the macro\n// in {} if you need to use it as the only statement in an 'if'\n// branch.\n#define GTEST_CHECK_POSIX_SUCCESS_(posix_call) \\\n  if (const int gtest_error = (posix_call)) \\\n    GTEST_LOG_(FATAL) << #posix_call << \"failed with error \" \\\n                      << gtest_error\n\n// Adds reference to a type if it is not a reference type,\n// otherwise leaves it unchanged.  This is the same as\n// tr1::add_reference, which is not widely available yet.\ntemplate <typename T>\nstruct AddReference { typedef T& type; };  // NOLINT\ntemplate <typename T>\nstruct AddReference<T&> { typedef T& type; };  // NOLINT\n\n// A handy wrapper around AddReference that works when the argument T\n// depends on template parameters.\n#define GTEST_ADD_REFERENCE_(T) \\\n    typename ::testing::internal::AddReference<T>::type\n\n// Transforms \"T\" into \"const T&\" according to standard reference collapsing\n// rules (this is only needed as a backport for C++98 compilers that do not\n// support reference collapsing). Specifically, it transforms:\n//\n//   char         ==> const char&\n//   const char   ==> const char&\n//   char&        ==> char&\n//   const char&  ==> const char&\n//\n// Note that the non-const reference will not have \"const\" added. This is\n// standard, and necessary so that \"T\" can always bind to \"const T&\".\ntemplate <typename T>\nstruct ConstRef { typedef const T& type; };\ntemplate <typename T>\nstruct ConstRef<T&> { typedef T& type; };\n\n// The argument T must depend on some template parameters.\n#define GTEST_REFERENCE_TO_CONST_(T) \\\n  typename ::testing::internal::ConstRef<T>::type\n\n// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.\n//\n// Use ImplicitCast_ as a safe version of static_cast for upcasting in\n// the type hierarchy (e.g. casting a Foo* to a SuperclassOfFoo* or a\n// const Foo*).  When you use ImplicitCast_, the compiler checks that\n// the cast is safe.  Such explicit ImplicitCast_s are necessary in\n// surprisingly many situations where C++ demands an exact type match\n// instead of an argument type convertable to a target type.\n//\n// The syntax for using ImplicitCast_ is the same as for static_cast:\n//\n//   ImplicitCast_<ToType>(expr)\n//\n// ImplicitCast_ would have been part of the C++ standard library,\n// but the proposal was submitted too late.  It will probably make\n// its way into the language in the future.\n//\n// This relatively ugly name is intentional. It prevents clashes with\n// similar functions users may have (e.g., implicit_cast). The internal\n// namespace alone is not enough because the function can be found by ADL.\ntemplate<typename To>\ninline To ImplicitCast_(To x) { return x; }\n\n// When you upcast (that is, cast a pointer from type Foo to type\n// SuperclassOfFoo), it's fine to use ImplicitCast_<>, since upcasts\n// always succeed.  When you downcast (that is, cast a pointer from\n// type Foo to type SubclassOfFoo), static_cast<> isn't safe, because\n// how do you know the pointer is really of type SubclassOfFoo?  It\n// could be a bare Foo, or of type DifferentSubclassOfFoo.  Thus,\n// when you downcast, you should use this macro.  In debug mode, we\n// use dynamic_cast<> to double-check the downcast is legal (we die\n// if it's not).  In normal mode, we do the efficient static_cast<>\n// instead.  Thus, it's important to test in debug mode to make sure\n// the cast is legal!\n//    This is the only place in the code we should use dynamic_cast<>.\n// In particular, you SHOULDN'T be using dynamic_cast<> in order to\n// do RTTI (eg code like this:\n//    if (dynamic_cast<Subclass1>(foo)) HandleASubclass1Object(foo);\n//    if (dynamic_cast<Subclass2>(foo)) HandleASubclass2Object(foo);\n// You should design the code some other way not to need this.\n//\n// This relatively ugly name is intentional. It prevents clashes with\n// similar functions users may have (e.g., down_cast). The internal\n// namespace alone is not enough because the function can be found by ADL.\ntemplate<typename To, typename From>  // use like this: DownCast_<T*>(foo);\ninline To DownCast_(From* f) {  // so we only accept pointers\n  // Ensures that To is a sub-type of From *.  This test is here only\n  // for compile-time type checking, and has no overhead in an\n  // optimized build at run-time, as it will be optimized away\n  // completely.\n  GTEST_INTENTIONAL_CONST_COND_PUSH_()\n  if (false) {\n  GTEST_INTENTIONAL_CONST_COND_POP_()\n  const To to = nullptr;\n  ::testing::internal::ImplicitCast_<From*>(to);\n  }\n\n#if GTEST_HAS_RTTI\n  // RTTI: debug mode only!\n  GTEST_CHECK_(f == nullptr || dynamic_cast<To>(f) != nullptr);\n#endif\n  return static_cast<To>(f);\n}\n\n// Downcasts the pointer of type Base to Derived.\n// Derived must be a subclass of Base. The parameter MUST\n// point to a class of type Derived, not any subclass of it.\n// When RTTI is available, the function performs a runtime\n// check to enforce this.\ntemplate <class Derived, class Base>\nDerived* CheckedDowncastToActualType(Base* base) {\n#if GTEST_HAS_RTTI\n  GTEST_CHECK_(typeid(*base) == typeid(Derived));\n#endif\n\n#if GTEST_HAS_DOWNCAST_\n  return ::down_cast<Derived*>(base);\n#elif GTEST_HAS_RTTI\n  return dynamic_cast<Derived*>(base);  // NOLINT\n#else\n  return static_cast<Derived*>(base);  // Poor man's downcast.\n#endif\n}\n\n#if GTEST_HAS_STREAM_REDIRECTION\n\n// Defines the stderr capturer:\n//   CaptureStdout     - starts capturing stdout.\n//   GetCapturedStdout - stops capturing stdout and returns the captured string.\n//   CaptureStderr     - starts capturing stderr.\n//   GetCapturedStderr - stops capturing stderr and returns the captured string.\n//\nGTEST_API_ void CaptureStdout();\nGTEST_API_ std::string GetCapturedStdout();\nGTEST_API_ void CaptureStderr();\nGTEST_API_ std::string GetCapturedStderr();\n\n#endif  // GTEST_HAS_STREAM_REDIRECTION\n// Returns the size (in bytes) of a file.\nGTEST_API_ size_t GetFileSize(FILE* file);\n\n// Reads the entire content of a file as a string.\nGTEST_API_ std::string ReadEntireFile(FILE* file);\n\n// All command line arguments.\nGTEST_API_ std::vector<std::string> GetArgvs();\n\n#if GTEST_HAS_DEATH_TEST\n\nstd::vector<std::string> GetInjectableArgvs();\n// Deprecated: pass the args vector by value instead.\nvoid SetInjectableArgvs(const std::vector<std::string>* new_argvs);\nvoid SetInjectableArgvs(const std::vector<std::string>& new_argvs);\n#if GTEST_HAS_GLOBAL_STRING\nvoid SetInjectableArgvs(const std::vector< ::string>& new_argvs);\n#endif  // GTEST_HAS_GLOBAL_STRING\nvoid ClearInjectableArgvs();\n\n#endif  // GTEST_HAS_DEATH_TEST\n\n// Defines synchronization primitives.\n#if GTEST_IS_THREADSAFE\n# if GTEST_HAS_PTHREAD\n// Sleeps for (roughly) n milliseconds.  This function is only for testing\n// Google Test's own constructs.  Don't use it in user tests, either\n// directly or indirectly.\ninline void SleepMilliseconds(int n) {\n  const timespec time = {\n    0,                  // 0 seconds.\n    n * 1000L * 1000L,  // And n ms.\n  };\n  nanosleep(&time, nullptr);\n}\n# endif  // GTEST_HAS_PTHREAD\n\n# if GTEST_HAS_NOTIFICATION_\n// Notification has already been imported into the namespace.\n// Nothing to do here.\n\n# elif GTEST_HAS_PTHREAD\n// Allows a controller thread to pause execution of newly created\n// threads until notified.  Instances of this class must be created\n// and destroyed in the controller thread.\n//\n// This class is only for testing Google Test's own constructs. Do not\n// use it in user tests, either directly or indirectly.\nclass Notification {\n public:\n  Notification() : notified_(false) {\n    GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_init(&mutex_, nullptr));\n  }\n  ~Notification() {\n    pthread_mutex_destroy(&mutex_);\n  }\n\n  // Notifies all threads created with this notification to start. Must\n  // be called from the controller thread.\n  void Notify() {\n    pthread_mutex_lock(&mutex_);\n    notified_ = true;\n    pthread_mutex_unlock(&mutex_);\n  }\n\n  // Blocks until the controller thread notifies. Must be called from a test\n  // thread.\n  void WaitForNotification() {\n    for (;;) {\n      pthread_mutex_lock(&mutex_);\n      const bool notified = notified_;\n      pthread_mutex_unlock(&mutex_);\n      if (notified)\n        break;\n      SleepMilliseconds(10);\n    }\n  }\n\n private:\n  pthread_mutex_t mutex_;\n  bool notified_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(Notification);\n};\n\n# elif GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT\n\nGTEST_API_ void SleepMilliseconds(int n);\n\n// Provides leak-safe Windows kernel handle ownership.\n// Used in death tests and in threading support.\nclass GTEST_API_ AutoHandle {\n public:\n  // Assume that Win32 HANDLE type is equivalent to void*. Doing so allows us to\n  // avoid including <windows.h> in this header file. Including <windows.h> is\n  // undesirable because it defines a lot of symbols and macros that tend to\n  // conflict with client code. This assumption is verified by\n  // WindowsTypesTest.HANDLEIsVoidStar.\n  typedef void* Handle;\n  AutoHandle();\n  explicit AutoHandle(Handle handle);\n\n  ~AutoHandle();\n\n  Handle Get() const;\n  void Reset();\n  void Reset(Handle handle);\n\n private:\n  // Returns true iff the handle is a valid handle object that can be closed.\n  bool IsCloseable() const;\n\n  Handle handle_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(AutoHandle);\n};\n\n// Allows a controller thread to pause execution of newly created\n// threads until notified.  Instances of this class must be created\n// and destroyed in the controller thread.\n//\n// This class is only for testing Google Test's own constructs. Do not\n// use it in user tests, either directly or indirectly.\nclass GTEST_API_ Notification {\n public:\n  Notification();\n  void Notify();\n  void WaitForNotification();\n\n private:\n  AutoHandle event_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(Notification);\n};\n# endif  // GTEST_HAS_NOTIFICATION_\n\n// On MinGW, we can have both GTEST_OS_WINDOWS and GTEST_HAS_PTHREAD\n// defined, but we don't want to use MinGW's pthreads implementation, which\n// has conformance problems with some versions of the POSIX standard.\n# if GTEST_HAS_PTHREAD && !GTEST_OS_WINDOWS_MINGW\n\n// As a C-function, ThreadFuncWithCLinkage cannot be templated itself.\n// Consequently, it cannot select a correct instantiation of ThreadWithParam\n// in order to call its Run(). Introducing ThreadWithParamBase as a\n// non-templated base class for ThreadWithParam allows us to bypass this\n// problem.\nclass ThreadWithParamBase {\n public:\n  virtual ~ThreadWithParamBase() {}\n  virtual void Run() = 0;\n};\n\n// pthread_create() accepts a pointer to a function type with the C linkage.\n// According to the Standard (7.5/1), function types with different linkages\n// are different even if they are otherwise identical.  Some compilers (for\n// example, SunStudio) treat them as different types.  Since class methods\n// cannot be defined with C-linkage we need to define a free C-function to\n// pass into pthread_create().\nextern \"C\" inline void* ThreadFuncWithCLinkage(void* thread) {\n  static_cast<ThreadWithParamBase*>(thread)->Run();\n  return nullptr;\n}\n\n// Helper class for testing Google Test's multi-threading constructs.\n// To use it, write:\n//\n//   void ThreadFunc(int param) { /* Do things with param */ }\n//   Notification thread_can_start;\n//   ...\n//   // The thread_can_start parameter is optional; you can supply NULL.\n//   ThreadWithParam<int> thread(&ThreadFunc, 5, &thread_can_start);\n//   thread_can_start.Notify();\n//\n// These classes are only for testing Google Test's own constructs. Do\n// not use them in user tests, either directly or indirectly.\ntemplate <typename T>\nclass ThreadWithParam : public ThreadWithParamBase {\n public:\n  typedef void UserThreadFunc(T);\n\n  ThreadWithParam(UserThreadFunc* func, T param, Notification* thread_can_start)\n      : func_(func),\n        param_(param),\n        thread_can_start_(thread_can_start),\n        finished_(false) {\n    ThreadWithParamBase* const base = this;\n    // The thread can be created only after all fields except thread_\n    // have been initialized.\n    GTEST_CHECK_POSIX_SUCCESS_(\n        pthread_create(&thread_, nullptr, &ThreadFuncWithCLinkage, base));\n  }\n  ~ThreadWithParam() override { Join(); }\n\n  void Join() {\n    if (!finished_) {\n      GTEST_CHECK_POSIX_SUCCESS_(pthread_join(thread_, nullptr));\n      finished_ = true;\n    }\n  }\n\n  void Run() override {\n    if (thread_can_start_ != nullptr) thread_can_start_->WaitForNotification();\n    func_(param_);\n  }\n\n private:\n  UserThreadFunc* const func_;  // User-supplied thread function.\n  const T param_;  // User-supplied parameter to the thread function.\n  // When non-NULL, used to block execution until the controller thread\n  // notifies.\n  Notification* const thread_can_start_;\n  bool finished_;  // true iff we know that the thread function has finished.\n  pthread_t thread_;  // The native thread object.\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(ThreadWithParam);\n};\n# endif  // !GTEST_OS_WINDOWS && GTEST_HAS_PTHREAD ||\n         // GTEST_HAS_MUTEX_AND_THREAD_LOCAL_\n\n# if GTEST_HAS_MUTEX_AND_THREAD_LOCAL_\n// Mutex and ThreadLocal have already been imported into the namespace.\n// Nothing to do here.\n\n# elif GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT\n\n// Mutex implements mutex on Windows platforms.  It is used in conjunction\n// with class MutexLock:\n//\n//   Mutex mutex;\n//   ...\n//   MutexLock lock(&mutex);  // Acquires the mutex and releases it at the\n//                            // end of the current scope.\n//\n// A static Mutex *must* be defined or declared using one of the following\n// macros:\n//   GTEST_DEFINE_STATIC_MUTEX_(g_some_mutex);\n//   GTEST_DECLARE_STATIC_MUTEX_(g_some_mutex);\n//\n// (A non-static Mutex is defined/declared in the usual way).\nclass GTEST_API_ Mutex {\n public:\n  enum MutexType { kStatic = 0, kDynamic = 1 };\n  // We rely on kStaticMutex being 0 as it is to what the linker initializes\n  // type_ in static mutexes.  critical_section_ will be initialized lazily\n  // in ThreadSafeLazyInit().\n  enum StaticConstructorSelector { kStaticMutex = 0 };\n\n  // This constructor intentionally does nothing.  It relies on type_ being\n  // statically initialized to 0 (effectively setting it to kStatic) and on\n  // ThreadSafeLazyInit() to lazily initialize the rest of the members.\n  explicit Mutex(StaticConstructorSelector /*dummy*/) {}\n\n  Mutex();\n  ~Mutex();\n\n  void Lock();\n\n  void Unlock();\n\n  // Does nothing if the current thread holds the mutex. Otherwise, crashes\n  // with high probability.\n  void AssertHeld();\n\n private:\n  // Initializes owner_thread_id_ and critical_section_ in static mutexes.\n  void ThreadSafeLazyInit();\n\n  // Per https://blogs.msdn.microsoft.com/oldnewthing/20040223-00/?p=40503,\n  // we assume that 0 is an invalid value for thread IDs.\n  unsigned int owner_thread_id_;\n\n  // For static mutexes, we rely on these members being initialized to zeros\n  // by the linker.\n  MutexType type_;\n  long critical_section_init_phase_;  // NOLINT\n  GTEST_CRITICAL_SECTION* critical_section_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(Mutex);\n};\n\n# define GTEST_DECLARE_STATIC_MUTEX_(mutex) \\\n    extern ::testing::internal::Mutex mutex\n\n# define GTEST_DEFINE_STATIC_MUTEX_(mutex) \\\n    ::testing::internal::Mutex mutex(::testing::internal::Mutex::kStaticMutex)\n\n// We cannot name this class MutexLock because the ctor declaration would\n// conflict with a macro named MutexLock, which is defined on some\n// platforms. That macro is used as a defensive measure to prevent against\n// inadvertent misuses of MutexLock like \"MutexLock(&mu)\" rather than\n// \"MutexLock l(&mu)\".  Hence the typedef trick below.\nclass GTestMutexLock {\n public:\n  explicit GTestMutexLock(Mutex* mutex)\n      : mutex_(mutex) { mutex_->Lock(); }\n\n  ~GTestMutexLock() { mutex_->Unlock(); }\n\n private:\n  Mutex* const mutex_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(GTestMutexLock);\n};\n\ntypedef GTestMutexLock MutexLock;\n\n// Base class for ValueHolder<T>.  Allows a caller to hold and delete a value\n// without knowing its type.\nclass ThreadLocalValueHolderBase {\n public:\n  virtual ~ThreadLocalValueHolderBase() {}\n};\n\n// Provides a way for a thread to send notifications to a ThreadLocal\n// regardless of its parameter type.\nclass ThreadLocalBase {\n public:\n  // Creates a new ValueHolder<T> object holding a default value passed to\n  // this ThreadLocal<T>'s constructor and returns it.  It is the caller's\n  // responsibility not to call this when the ThreadLocal<T> instance already\n  // has a value on the current thread.\n  virtual ThreadLocalValueHolderBase* NewValueForCurrentThread() const = 0;\n\n protected:\n  ThreadLocalBase() {}\n  virtual ~ThreadLocalBase() {}\n\n private:\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(ThreadLocalBase);\n};\n\n// Maps a thread to a set of ThreadLocals that have values instantiated on that\n// thread and notifies them when the thread exits.  A ThreadLocal instance is\n// expected to persist until all threads it has values on have terminated.\nclass GTEST_API_ ThreadLocalRegistry {\n public:\n  // Registers thread_local_instance as having value on the current thread.\n  // Returns a value that can be used to identify the thread from other threads.\n  static ThreadLocalValueHolderBase* GetValueOnCurrentThread(\n      const ThreadLocalBase* thread_local_instance);\n\n  // Invoked when a ThreadLocal instance is destroyed.\n  static void OnThreadLocalDestroyed(\n      const ThreadLocalBase* thread_local_instance);\n};\n\nclass GTEST_API_ ThreadWithParamBase {\n public:\n  void Join();\n\n protected:\n  class Runnable {\n   public:\n    virtual ~Runnable() {}\n    virtual void Run() = 0;\n  };\n\n  ThreadWithParamBase(Runnable *runnable, Notification* thread_can_start);\n  virtual ~ThreadWithParamBase();\n\n private:\n  AutoHandle thread_;\n};\n\n// Helper class for testing Google Test's multi-threading constructs.\ntemplate <typename T>\nclass ThreadWithParam : public ThreadWithParamBase {\n public:\n  typedef void UserThreadFunc(T);\n\n  ThreadWithParam(UserThreadFunc* func, T param, Notification* thread_can_start)\n      : ThreadWithParamBase(new RunnableImpl(func, param), thread_can_start) {\n  }\n  virtual ~ThreadWithParam() {}\n\n private:\n  class RunnableImpl : public Runnable {\n   public:\n    RunnableImpl(UserThreadFunc* func, T param)\n        : func_(func),\n          param_(param) {\n    }\n    virtual ~RunnableImpl() {}\n    virtual void Run() {\n      func_(param_);\n    }\n\n   private:\n    UserThreadFunc* const func_;\n    const T param_;\n\n    GTEST_DISALLOW_COPY_AND_ASSIGN_(RunnableImpl);\n  };\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(ThreadWithParam);\n};\n\n// Implements thread-local storage on Windows systems.\n//\n//   // Thread 1\n//   ThreadLocal<int> tl(100);  // 100 is the default value for each thread.\n//\n//   // Thread 2\n//   tl.set(150);  // Changes the value for thread 2 only.\n//   EXPECT_EQ(150, tl.get());\n//\n//   // Thread 1\n//   EXPECT_EQ(100, tl.get());  // In thread 1, tl has the original value.\n//   tl.set(200);\n//   EXPECT_EQ(200, tl.get());\n//\n// The template type argument T must have a public copy constructor.\n// In addition, the default ThreadLocal constructor requires T to have\n// a public default constructor.\n//\n// The users of a TheadLocal instance have to make sure that all but one\n// threads (including the main one) using that instance have exited before\n// destroying it. Otherwise, the per-thread objects managed for them by the\n// ThreadLocal instance are not guaranteed to be destroyed on all platforms.\n//\n// Google Test only uses global ThreadLocal objects.  That means they\n// will die after main() has returned.  Therefore, no per-thread\n// object managed by Google Test will be leaked as long as all threads\n// using Google Test have exited when main() returns.\ntemplate <typename T>\nclass ThreadLocal : public ThreadLocalBase {\n public:\n  ThreadLocal() : default_factory_(new DefaultValueHolderFactory()) {}\n  explicit ThreadLocal(const T& value)\n      : default_factory_(new InstanceValueHolderFactory(value)) {}\n\n  ~ThreadLocal() { ThreadLocalRegistry::OnThreadLocalDestroyed(this); }\n\n  T* pointer() { return GetOrCreateValue(); }\n  const T* pointer() const { return GetOrCreateValue(); }\n  const T& get() const { return *pointer(); }\n  void set(const T& value) { *pointer() = value; }\n\n private:\n  // Holds a value of T.  Can be deleted via its base class without the caller\n  // knowing the type of T.\n  class ValueHolder : public ThreadLocalValueHolderBase {\n   public:\n    ValueHolder() : value_() {}\n    explicit ValueHolder(const T& value) : value_(value) {}\n\n    T* pointer() { return &value_; }\n\n   private:\n    T value_;\n    GTEST_DISALLOW_COPY_AND_ASSIGN_(ValueHolder);\n  };\n\n\n  T* GetOrCreateValue() const {\n    return static_cast<ValueHolder*>(\n        ThreadLocalRegistry::GetValueOnCurrentThread(this))->pointer();\n  }\n\n  virtual ThreadLocalValueHolderBase* NewValueForCurrentThread() const {\n    return default_factory_->MakeNewHolder();\n  }\n\n  class ValueHolderFactory {\n   public:\n    ValueHolderFactory() {}\n    virtual ~ValueHolderFactory() {}\n    virtual ValueHolder* MakeNewHolder() const = 0;\n\n   private:\n    GTEST_DISALLOW_COPY_AND_ASSIGN_(ValueHolderFactory);\n  };\n\n  class DefaultValueHolderFactory : public ValueHolderFactory {\n   public:\n    DefaultValueHolderFactory() {}\n    virtual ValueHolder* MakeNewHolder() const { return new ValueHolder(); }\n\n   private:\n    GTEST_DISALLOW_COPY_AND_ASSIGN_(DefaultValueHolderFactory);\n  };\n\n  class InstanceValueHolderFactory : public ValueHolderFactory {\n   public:\n    explicit InstanceValueHolderFactory(const T& value) : value_(value) {}\n    virtual ValueHolder* MakeNewHolder() const {\n      return new ValueHolder(value_);\n    }\n\n   private:\n    const T value_;  // The value for each thread.\n\n    GTEST_DISALLOW_COPY_AND_ASSIGN_(InstanceValueHolderFactory);\n  };\n\n  std::unique_ptr<ValueHolderFactory> default_factory_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(ThreadLocal);\n};\n\n# elif GTEST_HAS_PTHREAD\n\n// MutexBase and Mutex implement mutex on pthreads-based platforms.\nclass MutexBase {\n public:\n  // Acquires this mutex.\n  void Lock() {\n    GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_lock(&mutex_));\n    owner_ = pthread_self();\n    has_owner_ = true;\n  }\n\n  // Releases this mutex.\n  void Unlock() {\n    // Since the lock is being released the owner_ field should no longer be\n    // considered valid. We don't protect writing to has_owner_ here, as it's\n    // the caller's responsibility to ensure that the current thread holds the\n    // mutex when this is called.\n    has_owner_ = false;\n    GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_unlock(&mutex_));\n  }\n\n  // Does nothing if the current thread holds the mutex. Otherwise, crashes\n  // with high probability.\n  void AssertHeld() const {\n    GTEST_CHECK_(has_owner_ && pthread_equal(owner_, pthread_self()))\n        << \"The current thread is not holding the mutex @\" << this;\n  }\n\n  // A static mutex may be used before main() is entered.  It may even\n  // be used before the dynamic initialization stage.  Therefore we\n  // must be able to initialize a static mutex object at link time.\n  // This means MutexBase has to be a POD and its member variables\n  // have to be public.\n public:\n  pthread_mutex_t mutex_;  // The underlying pthread mutex.\n  // has_owner_ indicates whether the owner_ field below contains a valid thread\n  // ID and is therefore safe to inspect (e.g., to use in pthread_equal()). All\n  // accesses to the owner_ field should be protected by a check of this field.\n  // An alternative might be to memset() owner_ to all zeros, but there's no\n  // guarantee that a zero'd pthread_t is necessarily invalid or even different\n  // from pthread_self().\n  bool has_owner_;\n  pthread_t owner_;  // The thread holding the mutex.\n};\n\n// Forward-declares a static mutex.\n#  define GTEST_DECLARE_STATIC_MUTEX_(mutex) \\\n     extern ::testing::internal::MutexBase mutex\n\n// Defines and statically (i.e. at link time) initializes a static mutex.\n// The initialization list here does not explicitly initialize each field,\n// instead relying on default initialization for the unspecified fields. In\n// particular, the owner_ field (a pthread_t) is not explicitly initialized.\n// This allows initialization to work whether pthread_t is a scalar or struct.\n// The flag -Wmissing-field-initializers must not be specified for this to work.\n#define GTEST_DEFINE_STATIC_MUTEX_(mutex) \\\n  ::testing::internal::MutexBase mutex = {PTHREAD_MUTEX_INITIALIZER, false, 0}\n\n// The Mutex class can only be used for mutexes created at runtime. It\n// shares its API with MutexBase otherwise.\nclass Mutex : public MutexBase {\n public:\n  Mutex() {\n    GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_init(&mutex_, nullptr));\n    has_owner_ = false;\n  }\n  ~Mutex() {\n    GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_destroy(&mutex_));\n  }\n\n private:\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(Mutex);\n};\n\n// We cannot name this class MutexLock because the ctor declaration would\n// conflict with a macro named MutexLock, which is defined on some\n// platforms. That macro is used as a defensive measure to prevent against\n// inadvertent misuses of MutexLock like \"MutexLock(&mu)\" rather than\n// \"MutexLock l(&mu)\".  Hence the typedef trick below.\nclass GTestMutexLock {\n public:\n  explicit GTestMutexLock(MutexBase* mutex)\n      : mutex_(mutex) { mutex_->Lock(); }\n\n  ~GTestMutexLock() { mutex_->Unlock(); }\n\n private:\n  MutexBase* const mutex_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(GTestMutexLock);\n};\n\ntypedef GTestMutexLock MutexLock;\n\n// Helpers for ThreadLocal.\n\n// pthread_key_create() requires DeleteThreadLocalValue() to have\n// C-linkage.  Therefore it cannot be templatized to access\n// ThreadLocal<T>.  Hence the need for class\n// ThreadLocalValueHolderBase.\nclass ThreadLocalValueHolderBase {\n public:\n  virtual ~ThreadLocalValueHolderBase() {}\n};\n\n// Called by pthread to delete thread-local data stored by\n// pthread_setspecific().\nextern \"C\" inline void DeleteThreadLocalValue(void* value_holder) {\n  delete static_cast<ThreadLocalValueHolderBase*>(value_holder);\n}\n\n// Implements thread-local storage on pthreads-based systems.\ntemplate <typename T>\nclass GTEST_API_ ThreadLocal {\n public:\n  ThreadLocal()\n      : key_(CreateKey()), default_factory_(new DefaultValueHolderFactory()) {}\n  explicit ThreadLocal(const T& value)\n      : key_(CreateKey()),\n        default_factory_(new InstanceValueHolderFactory(value)) {}\n\n  ~ThreadLocal() {\n    // Destroys the managed object for the current thread, if any.\n    DeleteThreadLocalValue(pthread_getspecific(key_));\n\n    // Releases resources associated with the key.  This will *not*\n    // delete managed objects for other threads.\n    GTEST_CHECK_POSIX_SUCCESS_(pthread_key_delete(key_));\n  }\n\n  T* pointer() { return GetOrCreateValue(); }\n  const T* pointer() const { return GetOrCreateValue(); }\n  const T& get() const { return *pointer(); }\n  void set(const T& value) { *pointer() = value; }\n\n private:\n  // Holds a value of type T.\n  class ValueHolder : public ThreadLocalValueHolderBase {\n   public:\n    ValueHolder() : value_() {}\n    explicit ValueHolder(const T& value) : value_(value) {}\n\n    T* pointer() { return &value_; }\n\n   private:\n    T value_;\n    GTEST_DISALLOW_COPY_AND_ASSIGN_(ValueHolder);\n  };\n\n  static pthread_key_t CreateKey() {\n    pthread_key_t key;\n    // When a thread exits, DeleteThreadLocalValue() will be called on\n    // the object managed for that thread.\n    GTEST_CHECK_POSIX_SUCCESS_(\n        pthread_key_create(&key, &DeleteThreadLocalValue));\n    return key;\n  }\n\n  T* GetOrCreateValue() const {\n    ThreadLocalValueHolderBase* const holder =\n        static_cast<ThreadLocalValueHolderBase*>(pthread_getspecific(key_));\n    if (holder != nullptr) {\n      return CheckedDowncastToActualType<ValueHolder>(holder)->pointer();\n    }\n\n    ValueHolder* const new_holder = default_factory_->MakeNewHolder();\n    ThreadLocalValueHolderBase* const holder_base = new_holder;\n    GTEST_CHECK_POSIX_SUCCESS_(pthread_setspecific(key_, holder_base));\n    return new_holder->pointer();\n  }\n\n  class ValueHolderFactory {\n   public:\n    ValueHolderFactory() {}\n    virtual ~ValueHolderFactory() {}\n    virtual ValueHolder* MakeNewHolder() const = 0;\n\n   private:\n    GTEST_DISALLOW_COPY_AND_ASSIGN_(ValueHolderFactory);\n  };\n\n  class DefaultValueHolderFactory : public ValueHolderFactory {\n   public:\n    DefaultValueHolderFactory() {}\n    virtual ValueHolder* MakeNewHolder() const { return new ValueHolder(); }\n\n   private:\n    GTEST_DISALLOW_COPY_AND_ASSIGN_(DefaultValueHolderFactory);\n  };\n\n  class InstanceValueHolderFactory : public ValueHolderFactory {\n   public:\n    explicit InstanceValueHolderFactory(const T& value) : value_(value) {}\n    virtual ValueHolder* MakeNewHolder() const {\n      return new ValueHolder(value_);\n    }\n\n   private:\n    const T value_;  // The value for each thread.\n\n    GTEST_DISALLOW_COPY_AND_ASSIGN_(InstanceValueHolderFactory);\n  };\n\n  // A key pthreads uses for looking up per-thread values.\n  const pthread_key_t key_;\n  std::unique_ptr<ValueHolderFactory> default_factory_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(ThreadLocal);\n};\n\n# endif  // GTEST_HAS_MUTEX_AND_THREAD_LOCAL_\n\n#else  // GTEST_IS_THREADSAFE\n\n// A dummy implementation of synchronization primitives (mutex, lock,\n// and thread-local variable).  Necessary for compiling Google Test where\n// mutex is not supported - using Google Test in multiple threads is not\n// supported on such platforms.\n\nclass Mutex {\n public:\n  Mutex() {}\n  void Lock() {}\n  void Unlock() {}\n  void AssertHeld() const {}\n};\n\n# define GTEST_DECLARE_STATIC_MUTEX_(mutex) \\\n  extern ::testing::internal::Mutex mutex\n\n# define GTEST_DEFINE_STATIC_MUTEX_(mutex) ::testing::internal::Mutex mutex\n\n// We cannot name this class MutexLock because the ctor declaration would\n// conflict with a macro named MutexLock, which is defined on some\n// platforms. That macro is used as a defensive measure to prevent against\n// inadvertent misuses of MutexLock like \"MutexLock(&mu)\" rather than\n// \"MutexLock l(&mu)\".  Hence the typedef trick below.\nclass GTestMutexLock {\n public:\n  explicit GTestMutexLock(Mutex*) {}  // NOLINT\n};\n\ntypedef GTestMutexLock MutexLock;\n\ntemplate <typename T>\nclass GTEST_API_ ThreadLocal {\n public:\n  ThreadLocal() : value_() {}\n  explicit ThreadLocal(const T& value) : value_(value) {}\n  T* pointer() { return &value_; }\n  const T* pointer() const { return &value_; }\n  const T& get() const { return value_; }\n  void set(const T& value) { value_ = value; }\n private:\n  T value_;\n};\n\n#endif  // GTEST_IS_THREADSAFE\n\n// Returns the number of threads running in the process, or 0 to indicate that\n// we cannot detect it.\nGTEST_API_ size_t GetThreadCount();\n\ntemplate <bool bool_value>\nstruct bool_constant {\n  typedef bool_constant<bool_value> type;\n  static const bool value = bool_value;\n};\ntemplate <bool bool_value> const bool bool_constant<bool_value>::value;\n\ntypedef bool_constant<false> false_type;\ntypedef bool_constant<true> true_type;\n\ntemplate <typename T, typename U>\nstruct is_same : public false_type {};\n\ntemplate <typename T>\nstruct is_same<T, T> : public true_type {};\n\ntemplate <typename Iterator>\nstruct IteratorTraits {\n  typedef typename Iterator::value_type value_type;\n};\n\n\ntemplate <typename T>\nstruct IteratorTraits<T*> {\n  typedef T value_type;\n};\n\ntemplate <typename T>\nstruct IteratorTraits<const T*> {\n  typedef T value_type;\n};\n\n#if GTEST_OS_WINDOWS\n# define GTEST_PATH_SEP_ \"\\\\\"\n# define GTEST_HAS_ALT_PATH_SEP_ 1\n// The biggest signed integer type the compiler supports.\ntypedef __int64 BiggestInt;\n#else\n# define GTEST_PATH_SEP_ \"/\"\n# define GTEST_HAS_ALT_PATH_SEP_ 0\ntypedef long long BiggestInt;  // NOLINT\n#endif  // GTEST_OS_WINDOWS\n\n// Utilities for char.\n\n// isspace(int ch) and friends accept an unsigned char or EOF.  char\n// may be signed, depending on the compiler (or compiler flags).\n// Therefore we need to cast a char to unsigned char before calling\n// isspace(), etc.\n\ninline bool IsAlpha(char ch) {\n  return isalpha(static_cast<unsigned char>(ch)) != 0;\n}\ninline bool IsAlNum(char ch) {\n  return isalnum(static_cast<unsigned char>(ch)) != 0;\n}\ninline bool IsDigit(char ch) {\n  return isdigit(static_cast<unsigned char>(ch)) != 0;\n}\ninline bool IsLower(char ch) {\n  return islower(static_cast<unsigned char>(ch)) != 0;\n}\ninline bool IsSpace(char ch) {\n  return isspace(static_cast<unsigned char>(ch)) != 0;\n}\ninline bool IsUpper(char ch) {\n  return isupper(static_cast<unsigned char>(ch)) != 0;\n}\ninline bool IsXDigit(char ch) {\n  return isxdigit(static_cast<unsigned char>(ch)) != 0;\n}\ninline bool IsXDigit(wchar_t ch) {\n  const unsigned char low_byte = static_cast<unsigned char>(ch);\n  return ch == low_byte && isxdigit(low_byte) != 0;\n}\n\ninline char ToLower(char ch) {\n  return static_cast<char>(tolower(static_cast<unsigned char>(ch)));\n}\ninline char ToUpper(char ch) {\n  return static_cast<char>(toupper(static_cast<unsigned char>(ch)));\n}\n\ninline std::string StripTrailingSpaces(std::string str) {\n  std::string::iterator it = str.end();\n  while (it != str.begin() && IsSpace(*--it))\n    it = str.erase(it);\n  return str;\n}\n\n// The testing::internal::posix namespace holds wrappers for common\n// POSIX functions.  These wrappers hide the differences between\n// Windows/MSVC and POSIX systems.  Since some compilers define these\n// standard functions as macros, the wrapper cannot have the same name\n// as the wrapped function.\n\nnamespace posix {\n\n// Functions with a different name on Windows.\n\n#if GTEST_OS_WINDOWS\n\ntypedef struct _stat StatStruct;\n\n# ifdef __BORLANDC__\ninline int IsATTY(int fd) { return isatty(fd); }\ninline int StrCaseCmp(const char* s1, const char* s2) {\n  return stricmp(s1, s2);\n}\ninline char* StrDup(const char* src) { return strdup(src); }\n# else  // !__BORLANDC__\n#  if GTEST_OS_WINDOWS_MOBILE\ninline int IsATTY(int /* fd */) { return 0; }\n#  else\ninline int IsATTY(int fd) { return _isatty(fd); }\n#  endif  // GTEST_OS_WINDOWS_MOBILE\ninline int StrCaseCmp(const char* s1, const char* s2) {\n  return _stricmp(s1, s2);\n}\ninline char* StrDup(const char* src) { return _strdup(src); }\n# endif  // __BORLANDC__\n\n# if GTEST_OS_WINDOWS_MOBILE\ninline int FileNo(FILE* file) { return reinterpret_cast<int>(_fileno(file)); }\n// Stat(), RmDir(), and IsDir() are not needed on Windows CE at this\n// time and thus not defined there.\n# else\ninline int FileNo(FILE* file) { return _fileno(file); }\ninline int Stat(const char* path, StatStruct* buf) { return _stat(path, buf); }\ninline int RmDir(const char* dir) { return _rmdir(dir); }\ninline bool IsDir(const StatStruct& st) {\n  return (_S_IFDIR & st.st_mode) != 0;\n}\n# endif  // GTEST_OS_WINDOWS_MOBILE\n\n#else\n\ntypedef struct stat StatStruct;\n\ninline int FileNo(FILE* file) { return fileno(file); }\ninline int IsATTY(int fd) { return isatty(fd); }\ninline int Stat(const char* path, StatStruct* buf) { return stat(path, buf); }\ninline int StrCaseCmp(const char* s1, const char* s2) {\n  return strcasecmp(s1, s2);\n}\ninline char* StrDup(const char* src) { return strdup(src); }\ninline int RmDir(const char* dir) { return rmdir(dir); }\ninline bool IsDir(const StatStruct& st) { return S_ISDIR(st.st_mode); }\n\n#endif  // GTEST_OS_WINDOWS\n\n// Functions deprecated by MSVC 8.0.\n\nGTEST_DISABLE_MSC_DEPRECATED_PUSH_()\n\ninline const char* StrNCpy(char* dest, const char* src, size_t n) {\n  return strncpy(dest, src, n);\n}\n\n// ChDir(), FReopen(), FDOpen(), Read(), Write(), Close(), and\n// StrError() aren't needed on Windows CE at this time and thus not\n// defined there.\n\n#if !GTEST_OS_WINDOWS_MOBILE && !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT\ninline int ChDir(const char* dir) { return chdir(dir); }\n#endif\ninline FILE* FOpen(const char* path, const char* mode) {\n  return fopen(path, mode);\n}\n#if !GTEST_OS_WINDOWS_MOBILE\ninline FILE *FReopen(const char* path, const char* mode, FILE* stream) {\n  return freopen(path, mode, stream);\n}\ninline FILE* FDOpen(int fd, const char* mode) { return fdopen(fd, mode); }\n#endif\ninline int FClose(FILE* fp) { return fclose(fp); }\n#if !GTEST_OS_WINDOWS_MOBILE\ninline int Read(int fd, void* buf, unsigned int count) {\n  return static_cast<int>(read(fd, buf, count));\n}\ninline int Write(int fd, const void* buf, unsigned int count) {\n  return static_cast<int>(write(fd, buf, count));\n}\ninline int Close(int fd) { return close(fd); }\ninline const char* StrError(int errnum) { return strerror(errnum); }\n#endif\ninline const char* GetEnv(const char* name) {\n#if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_WINDOWS_PHONE || GTEST_OS_WINDOWS_RT\n  // We are on Windows CE, which has no environment variables.\n  static_cast<void>(name);  // To prevent 'unused argument' warning.\n  return nullptr;\n#elif defined(__BORLANDC__) || defined(__SunOS_5_8) || defined(__SunOS_5_9)\n  // Environment variables which we programmatically clear will be set to the\n  // empty string rather than unset (NULL).  Handle that case.\n  const char* const env = getenv(name);\n  return (env != nullptr && env[0] != '\\0') ? env : nullptr;\n#else\n  return getenv(name);\n#endif\n}\n\nGTEST_DISABLE_MSC_DEPRECATED_POP_()\n\n#if GTEST_OS_WINDOWS_MOBILE\n// Windows CE has no C library. The abort() function is used in\n// several places in Google Test. This implementation provides a reasonable\n// imitation of standard behaviour.\n[[noreturn]] void Abort();\n#else\n[[noreturn]] inline void Abort() { abort(); }\n#endif  // GTEST_OS_WINDOWS_MOBILE\n\n}  // namespace posix\n\n// MSVC \"deprecates\" snprintf and issues warnings wherever it is used.  In\n// order to avoid these warnings, we need to use _snprintf or _snprintf_s on\n// MSVC-based platforms.  We map the GTEST_SNPRINTF_ macro to the appropriate\n// function in order to achieve that.  We use macro definition here because\n// snprintf is a variadic function.\n#if _MSC_VER && !GTEST_OS_WINDOWS_MOBILE\n// MSVC 2005 and above support variadic macros.\n# define GTEST_SNPRINTF_(buffer, size, format, ...) \\\n     _snprintf_s(buffer, size, size, format, __VA_ARGS__)\n#elif defined(_MSC_VER)\n// Windows CE does not define _snprintf_s\n# define GTEST_SNPRINTF_ _snprintf\n#else\n# define GTEST_SNPRINTF_ snprintf\n#endif\n\n// The maximum number a BiggestInt can represent.  This definition\n// works no matter BiggestInt is represented in one's complement or\n// two's complement.\n//\n// We cannot rely on numeric_limits in STL, as __int64 and long long\n// are not part of standard C++ and numeric_limits doesn't need to be\n// defined for them.\nconst BiggestInt kMaxBiggestInt =\n    ~(static_cast<BiggestInt>(1) << (8*sizeof(BiggestInt) - 1));\n\n// This template class serves as a compile-time function from size to\n// type.  It maps a size in bytes to a primitive type with that\n// size. e.g.\n//\n//   TypeWithSize<4>::UInt\n//\n// is typedef-ed to be unsigned int (unsigned integer made up of 4\n// bytes).\n//\n// Such functionality should belong to STL, but I cannot find it\n// there.\n//\n// Google Test uses this class in the implementation of floating-point\n// comparison.\n//\n// For now it only handles UInt (unsigned int) as that's all Google Test\n// needs.  Other types can be easily added in the future if need\n// arises.\ntemplate <size_t size>\nclass TypeWithSize {\n public:\n  // This prevents the user from using TypeWithSize<N> with incorrect\n  // values of N.\n  typedef void UInt;\n};\n\n// The specialization for size 4.\ntemplate <>\nclass TypeWithSize<4> {\n public:\n  // unsigned int has size 4 in both gcc and MSVC.\n  //\n  // As base/basictypes.h doesn't compile on Windows, we cannot use\n  // uint32, uint64, and etc here.\n  typedef int Int;\n  typedef unsigned int UInt;\n};\n\n// The specialization for size 8.\ntemplate <>\nclass TypeWithSize<8> {\n public:\n#if GTEST_OS_WINDOWS\n  typedef __int64 Int;\n  typedef unsigned __int64 UInt;\n#else\n  typedef long long Int;  // NOLINT\n  typedef unsigned long long UInt;  // NOLINT\n#endif  // GTEST_OS_WINDOWS\n};\n\n// Integer types of known sizes.\ntypedef TypeWithSize<4>::Int Int32;\ntypedef TypeWithSize<4>::UInt UInt32;\ntypedef TypeWithSize<8>::Int Int64;\ntypedef TypeWithSize<8>::UInt UInt64;\ntypedef TypeWithSize<8>::Int TimeInMillis;  // Represents time in milliseconds.\n\n// Utilities for command line flags and environment variables.\n\n// Macro for referencing flags.\n#if !defined(GTEST_FLAG)\n# define GTEST_FLAG(name) FLAGS_gtest_##name\n#endif  // !defined(GTEST_FLAG)\n\n#if !defined(GTEST_USE_OWN_FLAGFILE_FLAG_)\n# define GTEST_USE_OWN_FLAGFILE_FLAG_ 1\n#endif  // !defined(GTEST_USE_OWN_FLAGFILE_FLAG_)\n\n#if !defined(GTEST_DECLARE_bool_)\n# define GTEST_FLAG_SAVER_ ::testing::internal::GTestFlagSaver\n\n// Macros for declaring flags.\n# define GTEST_DECLARE_bool_(name) GTEST_API_ extern bool GTEST_FLAG(name)\n# define GTEST_DECLARE_int32_(name) \\\n    GTEST_API_ extern ::testing::internal::Int32 GTEST_FLAG(name)\n# define GTEST_DECLARE_string_(name) \\\n    GTEST_API_ extern ::std::string GTEST_FLAG(name)\n\n// Macros for defining flags.\n# define GTEST_DEFINE_bool_(name, default_val, doc) \\\n    GTEST_API_ bool GTEST_FLAG(name) = (default_val)\n# define GTEST_DEFINE_int32_(name, default_val, doc) \\\n    GTEST_API_ ::testing::internal::Int32 GTEST_FLAG(name) = (default_val)\n# define GTEST_DEFINE_string_(name, default_val, doc) \\\n    GTEST_API_ ::std::string GTEST_FLAG(name) = (default_val)\n\n#endif  // !defined(GTEST_DECLARE_bool_)\n\n// Thread annotations\n#if !defined(GTEST_EXCLUSIVE_LOCK_REQUIRED_)\n# define GTEST_EXCLUSIVE_LOCK_REQUIRED_(locks)\n# define GTEST_LOCK_EXCLUDED_(locks)\n#endif  // !defined(GTEST_EXCLUSIVE_LOCK_REQUIRED_)\n\n// Parses 'str' for a 32-bit signed integer.  If successful, writes the result\n// to *value and returns true; otherwise leaves *value unchanged and returns\n// false.\nbool ParseInt32(const Message& src_text, const char* str, Int32* value);\n\n// Parses a bool/Int32/string from the environment variable\n// corresponding to the given Google Test flag.\nbool BoolFromGTestEnv(const char* flag, bool default_val);\nGTEST_API_ Int32 Int32FromGTestEnv(const char* flag, Int32 default_val);\nstd::string OutputFlagAlsoCheckEnvVar();\nconst char* StringFromGTestEnv(const char* flag, const char* default_val);\n\n}  // namespace internal\n}  // namespace testing\n\n#if !defined(GTEST_INTERNAL_DEPRECATED)\n\n// Internal Macro to mark an API deprecated, for googletest usage only\n// Usage: class GTEST_INTERNAL_DEPRECATED(message) MyClass or\n// GTEST_INTERNAL_DEPRECATED(message) <return_type> myFunction(); Every usage of\n// a deprecated entity will trigger a warning when compiled with\n// `-Wdeprecated-declarations` option (clang, gcc, any __GNUC__ compiler).\n// For msvc /W3 option will need to be used\n// Note that for 'other' compilers this macro evaluates to nothing to prevent\n// compilations errors.\n#if defined(_MSC_VER)\n#define GTEST_INTERNAL_DEPRECATED(message) __declspec(deprecated(message))\n#elif defined(__GNUC__)\n#define GTEST_INTERNAL_DEPRECATED(message) __attribute__((deprecated(message)))\n#else\n#define GTEST_INTERNAL_DEPRECATED(message)\n#endif\n\n#endif  // !defined(GTEST_INTERNAL_DEPRECATED)\n\n#endif  // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_\n\n#if GTEST_OS_LINUX\n# include <stdlib.h>\n# include <sys/types.h>\n# include <sys/wait.h>\n# include <unistd.h>\n#endif  // GTEST_OS_LINUX\n\n#if GTEST_HAS_EXCEPTIONS\n# include <stdexcept>\n#endif\n\n#include <ctype.h>\n#include <float.h>\n#include <string.h>\n#include <iomanip>\n#include <limits>\n#include <map>\n#include <set>\n#include <string>\n#include <type_traits>\n#include <vector>\n\n// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n//\n// The Google C++ Testing and Mocking Framework (Google Test)\n//\n// This header file defines the Message class.\n//\n// IMPORTANT NOTE: Due to limitation of the C++ language, we have to\n// leave some internal implementation details in this header file.\n// They are clearly marked by comments like this:\n//\n//   // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.\n//\n// Such code is NOT meant to be used by a user directly, and is subject\n// to CHANGE WITHOUT NOTICE.  Therefore DO NOT DEPEND ON IT in a user\n// program!\n\n// GOOGLETEST_CM0001 DO NOT DELETE\n\n#ifndef GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_\n#define GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_\n\n#include <limits>\n#include <memory>\n\n\nGTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \\\n/* class A needs to have dll-interface to be used by clients of class B */)\n\n// Ensures that there is at least one operator<< in the global namespace.\n// See Message& operator<<(...) below for why.\nvoid operator<<(const testing::internal::Secret&, int);\n\nnamespace testing {\n\n// The Message class works like an ostream repeater.\n//\n// Typical usage:\n//\n//   1. You stream a bunch of values to a Message object.\n//      It will remember the text in a stringstream.\n//   2. Then you stream the Message object to an ostream.\n//      This causes the text in the Message to be streamed\n//      to the ostream.\n//\n// For example;\n//\n//   testing::Message foo;\n//   foo << 1 << \" != \" << 2;\n//   std::cout << foo;\n//\n// will print \"1 != 2\".\n//\n// Message is not intended to be inherited from.  In particular, its\n// destructor is not virtual.\n//\n// Note that stringstream behaves differently in gcc and in MSVC.  You\n// can stream a NULL char pointer to it in the former, but not in the\n// latter (it causes an access violation if you do).  The Message\n// class hides this difference by treating a NULL char pointer as\n// \"(null)\".\nclass GTEST_API_ Message {\n private:\n  // The type of basic IO manipulators (endl, ends, and flush) for\n  // narrow streams.\n  typedef std::ostream& (*BasicNarrowIoManip)(std::ostream&);\n\n public:\n  // Constructs an empty Message.\n  Message();\n\n  // Copy constructor.\n  Message(const Message& msg) : ss_(new ::std::stringstream) {  // NOLINT\n    *ss_ << msg.GetString();\n  }\n\n  // Constructs a Message from a C-string.\n  explicit Message(const char* str) : ss_(new ::std::stringstream) {\n    *ss_ << str;\n  }\n\n  // Streams a non-pointer value to this object.\n  template <typename T>\n  inline Message& operator <<(const T& val) {\n    // Some libraries overload << for STL containers.  These\n    // overloads are defined in the global namespace instead of ::std.\n    //\n    // C++'s symbol lookup rule (i.e. Koenig lookup) says that these\n    // overloads are visible in either the std namespace or the global\n    // namespace, but not other namespaces, including the testing\n    // namespace which Google Test's Message class is in.\n    //\n    // To allow STL containers (and other types that has a << operator\n    // defined in the global namespace) to be used in Google Test\n    // assertions, testing::Message must access the custom << operator\n    // from the global namespace.  With this using declaration,\n    // overloads of << defined in the global namespace and those\n    // visible via Koenig lookup are both exposed in this function.\n    using ::operator <<;\n    *ss_ << val;\n    return *this;\n  }\n\n  // Streams a pointer value to this object.\n  //\n  // This function is an overload of the previous one.  When you\n  // stream a pointer to a Message, this definition will be used as it\n  // is more specialized.  (The C++ Standard, section\n  // [temp.func.order].)  If you stream a non-pointer, then the\n  // previous definition will be used.\n  //\n  // The reason for this overload is that streaming a NULL pointer to\n  // ostream is undefined behavior.  Depending on the compiler, you\n  // may get \"0\", \"(nil)\", \"(null)\", or an access violation.  To\n  // ensure consistent result across compilers, we always treat NULL\n  // as \"(null)\".\n  template <typename T>\n  inline Message& operator <<(T* const& pointer) {  // NOLINT\n    if (pointer == nullptr) {\n      *ss_ << \"(null)\";\n    } else {\n      *ss_ << pointer;\n    }\n    return *this;\n  }\n\n  // Since the basic IO manipulators are overloaded for both narrow\n  // and wide streams, we have to provide this specialized definition\n  // of operator <<, even though its body is the same as the\n  // templatized version above.  Without this definition, streaming\n  // endl or other basic IO manipulators to Message will confuse the\n  // compiler.\n  Message& operator <<(BasicNarrowIoManip val) {\n    *ss_ << val;\n    return *this;\n  }\n\n  // Instead of 1/0, we want to see true/false for bool values.\n  Message& operator <<(bool b) {\n    return *this << (b ? \"true\" : \"false\");\n  }\n\n  // These two overloads allow streaming a wide C string to a Message\n  // using the UTF-8 encoding.\n  Message& operator <<(const wchar_t* wide_c_str);\n  Message& operator <<(wchar_t* wide_c_str);\n\n#if GTEST_HAS_STD_WSTRING\n  // Converts the given wide string to a narrow string using the UTF-8\n  // encoding, and streams the result to this Message object.\n  Message& operator <<(const ::std::wstring& wstr);\n#endif  // GTEST_HAS_STD_WSTRING\n\n#if GTEST_HAS_GLOBAL_WSTRING\n  // Converts the given wide string to a narrow string using the UTF-8\n  // encoding, and streams the result to this Message object.\n  Message& operator <<(const ::wstring& wstr);\n#endif  // GTEST_HAS_GLOBAL_WSTRING\n\n  // Gets the text streamed to this object so far as an std::string.\n  // Each '\\0' character in the buffer is replaced with \"\\\\0\".\n  //\n  // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.\n  std::string GetString() const;\n\n private:\n  // We'll hold the text streamed to this object here.\n  const std::unique_ptr< ::std::stringstream> ss_;\n\n  // We declare (but don't implement) this to prevent the compiler\n  // from implementing the assignment operator.\n  void operator=(const Message&);\n};\n\n// Streams a Message to an ostream.\ninline std::ostream& operator <<(std::ostream& os, const Message& sb) {\n  return os << sb.GetString();\n}\n\nnamespace internal {\n\n// Converts a streamable value to an std::string.  A NULL pointer is\n// converted to \"(null)\".  When the input value is a ::string,\n// ::std::string, ::wstring, or ::std::wstring object, each NUL\n// character in it is replaced with \"\\\\0\".\ntemplate <typename T>\nstd::string StreamableToString(const T& streamable) {\n  return (Message() << streamable).GetString();\n}\n\n}  // namespace internal\n}  // namespace testing\n\nGTEST_DISABLE_MSC_WARNINGS_POP_()  //  4251\n\n#endif  // GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_\n// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Google Test filepath utilities\n//\n// This header file declares classes and functions used internally by\n// Google Test.  They are subject to change without notice.\n//\n// This file is #included in gtest/internal/gtest-internal.h.\n// Do not include this header file separately!\n\n// GOOGLETEST_CM0001 DO NOT DELETE\n\n#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_\n#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_\n\n// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// The Google C++ Testing and Mocking Framework (Google Test)\n//\n// This header file declares the String class and functions used internally by\n// Google Test.  They are subject to change without notice. They should not used\n// by code external to Google Test.\n//\n// This header file is #included by gtest-internal.h.\n// It should not be #included by other files.\n\n// GOOGLETEST_CM0001 DO NOT DELETE\n\n#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_\n#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_\n\n#ifdef __BORLANDC__\n// string.h is not guaranteed to provide strcpy on C++ Builder.\n# include <mem.h>\n#endif\n\n#include <string.h>\n#include <string>\n\n\nnamespace testing {\nnamespace internal {\n\n// String - an abstract class holding static string utilities.\nclass GTEST_API_ String {\n public:\n  // Static utility methods\n\n  // Clones a 0-terminated C string, allocating memory using new.  The\n  // caller is responsible for deleting the return value using\n  // delete[].  Returns the cloned string, or NULL if the input is\n  // NULL.\n  //\n  // This is different from strdup() in string.h, which allocates\n  // memory using malloc().\n  static const char* CloneCString(const char* c_str);\n\n#if GTEST_OS_WINDOWS_MOBILE\n  // Windows CE does not have the 'ANSI' versions of Win32 APIs. To be\n  // able to pass strings to Win32 APIs on CE we need to convert them\n  // to 'Unicode', UTF-16.\n\n  // Creates a UTF-16 wide string from the given ANSI string, allocating\n  // memory using new. The caller is responsible for deleting the return\n  // value using delete[]. Returns the wide string, or NULL if the\n  // input is NULL.\n  //\n  // The wide string is created using the ANSI codepage (CP_ACP) to\n  // match the behaviour of the ANSI versions of Win32 calls and the\n  // C runtime.\n  static LPCWSTR AnsiToUtf16(const char* c_str);\n\n  // Creates an ANSI string from the given wide string, allocating\n  // memory using new. The caller is responsible for deleting the return\n  // value using delete[]. Returns the ANSI string, or NULL if the\n  // input is NULL.\n  //\n  // The returned string is created using the ANSI codepage (CP_ACP) to\n  // match the behaviour of the ANSI versions of Win32 calls and the\n  // C runtime.\n  static const char* Utf16ToAnsi(LPCWSTR utf16_str);\n#endif\n\n  // Compares two C strings.  Returns true iff they have the same content.\n  //\n  // Unlike strcmp(), this function can handle NULL argument(s).  A\n  // NULL C string is considered different to any non-NULL C string,\n  // including the empty string.\n  static bool CStringEquals(const char* lhs, const char* rhs);\n\n  // Converts a wide C string to a String using the UTF-8 encoding.\n  // NULL will be converted to \"(null)\".  If an error occurred during\n  // the conversion, \"(failed to convert from wide string)\" is\n  // returned.\n  static std::string ShowWideCString(const wchar_t* wide_c_str);\n\n  // Compares two wide C strings.  Returns true iff they have the same\n  // content.\n  //\n  // Unlike wcscmp(), this function can handle NULL argument(s).  A\n  // NULL C string is considered different to any non-NULL C string,\n  // including the empty string.\n  static bool WideCStringEquals(const wchar_t* lhs, const wchar_t* rhs);\n\n  // Compares two C strings, ignoring case.  Returns true iff they\n  // have the same content.\n  //\n  // Unlike strcasecmp(), this function can handle NULL argument(s).\n  // A NULL C string is considered different to any non-NULL C string,\n  // including the empty string.\n  static bool CaseInsensitiveCStringEquals(const char* lhs,\n                                           const char* rhs);\n\n  // Compares two wide C strings, ignoring case.  Returns true iff they\n  // have the same content.\n  //\n  // Unlike wcscasecmp(), this function can handle NULL argument(s).\n  // A NULL C string is considered different to any non-NULL wide C string,\n  // including the empty string.\n  // NB: The implementations on different platforms slightly differ.\n  // On windows, this method uses _wcsicmp which compares according to LC_CTYPE\n  // environment variable. On GNU platform this method uses wcscasecmp\n  // which compares according to LC_CTYPE category of the current locale.\n  // On MacOS X, it uses towlower, which also uses LC_CTYPE category of the\n  // current locale.\n  static bool CaseInsensitiveWideCStringEquals(const wchar_t* lhs,\n                                               const wchar_t* rhs);\n\n  // Returns true iff the given string ends with the given suffix, ignoring\n  // case. Any string is considered to end with an empty suffix.\n  static bool EndsWithCaseInsensitive(\n      const std::string& str, const std::string& suffix);\n\n  // Formats an int value as \"%02d\".\n  static std::string FormatIntWidth2(int value);  // \"%02d\" for width == 2\n\n  // Formats an int value as \"%X\".\n  static std::string FormatHexInt(int value);\n\n  // Formats a byte as \"%02X\".\n  static std::string FormatByte(unsigned char value);\n\n private:\n  String();  // Not meant to be instantiated.\n};  // class String\n\n// Gets the content of the stringstream's buffer as an std::string.  Each '\\0'\n// character in the buffer is replaced with \"\\\\0\".\nGTEST_API_ std::string StringStreamToString(::std::stringstream* stream);\n\n}  // namespace internal\n}  // namespace testing\n\n#endif  // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_\n\nGTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \\\n/* class A needs to have dll-interface to be used by clients of class B */)\n\nnamespace testing {\nnamespace internal {\n\n// FilePath - a class for file and directory pathname manipulation which\n// handles platform-specific conventions (like the pathname separator).\n// Used for helper functions for naming files in a directory for xml output.\n// Except for Set methods, all methods are const or static, which provides an\n// \"immutable value object\" -- useful for peace of mind.\n// A FilePath with a value ending in a path separator (\"like/this/\") represents\n// a directory, otherwise it is assumed to represent a file. In either case,\n// it may or may not represent an actual file or directory in the file system.\n// Names are NOT checked for syntax correctness -- no checking for illegal\n// characters, malformed paths, etc.\n\nclass GTEST_API_ FilePath {\n public:\n  FilePath() : pathname_(\"\") { }\n  FilePath(const FilePath& rhs) : pathname_(rhs.pathname_) { }\n\n  explicit FilePath(const std::string& pathname) : pathname_(pathname) {\n    Normalize();\n  }\n\n  FilePath& operator=(const FilePath& rhs) {\n    Set(rhs);\n    return *this;\n  }\n\n  void Set(const FilePath& rhs) {\n    pathname_ = rhs.pathname_;\n  }\n\n  const std::string& string() const { return pathname_; }\n  const char* c_str() const { return pathname_.c_str(); }\n\n  // Returns the current working directory, or \"\" if unsuccessful.\n  static FilePath GetCurrentDir();\n\n  // Given directory = \"dir\", base_name = \"test\", number = 0,\n  // extension = \"xml\", returns \"dir/test.xml\". If number is greater\n  // than zero (e.g., 12), returns \"dir/test_12.xml\".\n  // On Windows platform, uses \\ as the separator rather than /.\n  static FilePath MakeFileName(const FilePath& directory,\n                               const FilePath& base_name,\n                               int number,\n                               const char* extension);\n\n  // Given directory = \"dir\", relative_path = \"test.xml\",\n  // returns \"dir/test.xml\".\n  // On Windows, uses \\ as the separator rather than /.\n  static FilePath ConcatPaths(const FilePath& directory,\n                              const FilePath& relative_path);\n\n  // Returns a pathname for a file that does not currently exist. The pathname\n  // will be directory/base_name.extension or\n  // directory/base_name_<number>.extension if directory/base_name.extension\n  // already exists. The number will be incremented until a pathname is found\n  // that does not already exist.\n  // Examples: 'dir/foo_test.xml' or 'dir/foo_test_1.xml'.\n  // There could be a race condition if two or more processes are calling this\n  // function at the same time -- they could both pick the same filename.\n  static FilePath GenerateUniqueFileName(const FilePath& directory,\n                                         const FilePath& base_name,\n                                         const char* extension);\n\n  // Returns true iff the path is \"\".\n  bool IsEmpty() const { return pathname_.empty(); }\n\n  // If input name has a trailing separator character, removes it and returns\n  // the name, otherwise return the name string unmodified.\n  // On Windows platform, uses \\ as the separator, other platforms use /.\n  FilePath RemoveTrailingPathSeparator() const;\n\n  // Returns a copy of the FilePath with the directory part removed.\n  // Example: FilePath(\"path/to/file\").RemoveDirectoryName() returns\n  // FilePath(\"file\"). If there is no directory part (\"just_a_file\"), it returns\n  // the FilePath unmodified. If there is no file part (\"just_a_dir/\") it\n  // returns an empty FilePath (\"\").\n  // On Windows platform, '\\' is the path separator, otherwise it is '/'.\n  FilePath RemoveDirectoryName() const;\n\n  // RemoveFileName returns the directory path with the filename removed.\n  // Example: FilePath(\"path/to/file\").RemoveFileName() returns \"path/to/\".\n  // If the FilePath is \"a_file\" or \"/a_file\", RemoveFileName returns\n  // FilePath(\"./\") or, on Windows, FilePath(\".\\\\\"). If the filepath does\n  // not have a file, like \"just/a/dir/\", it returns the FilePath unmodified.\n  // On Windows platform, '\\' is the path separator, otherwise it is '/'.\n  FilePath RemoveFileName() const;\n\n  // Returns a copy of the FilePath with the case-insensitive extension removed.\n  // Example: FilePath(\"dir/file.exe\").RemoveExtension(\"EXE\") returns\n  // FilePath(\"dir/file\"). If a case-insensitive extension is not\n  // found, returns a copy of the original FilePath.\n  FilePath RemoveExtension(const char* extension) const;\n\n  // Creates directories so that path exists. Returns true if successful or if\n  // the directories already exist; returns false if unable to create\n  // directories for any reason. Will also return false if the FilePath does\n  // not represent a directory (that is, it doesn't end with a path separator).\n  bool CreateDirectoriesRecursively() const;\n\n  // Create the directory so that path exists. Returns true if successful or\n  // if the directory already exists; returns false if unable to create the\n  // directory for any reason, including if the parent directory does not\n  // exist. Not named \"CreateDirectory\" because that's a macro on Windows.\n  bool CreateFolder() const;\n\n  // Returns true if FilePath describes something in the file-system,\n  // either a file, directory, or whatever, and that something exists.\n  bool FileOrDirectoryExists() const;\n\n  // Returns true if pathname describes a directory in the file-system\n  // that exists.\n  bool DirectoryExists() const;\n\n  // Returns true if FilePath ends with a path separator, which indicates that\n  // it is intended to represent a directory. Returns false otherwise.\n  // This does NOT check that a directory (or file) actually exists.\n  bool IsDirectory() const;\n\n  // Returns true if pathname describes a root directory. (Windows has one\n  // root directory per disk drive.)\n  bool IsRootDirectory() const;\n\n  // Returns true if pathname describes an absolute path.\n  bool IsAbsolutePath() const;\n\n private:\n  // Replaces multiple consecutive separators with a single separator.\n  // For example, \"bar///foo\" becomes \"bar/foo\". Does not eliminate other\n  // redundancies that might be in a pathname involving \".\" or \"..\".\n  //\n  // A pathname with multiple consecutive separators may occur either through\n  // user error or as a result of some scripts or APIs that generate a pathname\n  // with a trailing separator. On other platforms the same API or script\n  // may NOT generate a pathname with a trailing \"/\". Then elsewhere that\n  // pathname may have another \"/\" and pathname components added to it,\n  // without checking for the separator already being there.\n  // The script language and operating system may allow paths like \"foo//bar\"\n  // but some of the functions in FilePath will not handle that correctly. In\n  // particular, RemoveTrailingPathSeparator() only removes one separator, and\n  // it is called in CreateDirectoriesRecursively() assuming that it will change\n  // a pathname from directory syntax (trailing separator) to filename syntax.\n  //\n  // On Windows this method also replaces the alternate path separator '/' with\n  // the primary path separator '\\\\', so that for example \"bar\\\\/\\\\foo\" becomes\n  // \"bar\\\\foo\".\n\n  void Normalize();\n\n  // Returns a pointer to the last occurence of a valid path separator in\n  // the FilePath. On Windows, for example, both '/' and '\\' are valid path\n  // separators. Returns NULL if no path separator was found.\n  const char* FindLastPathSeparator() const;\n\n  std::string pathname_;\n};  // class FilePath\n\n}  // namespace internal\n}  // namespace testing\n\nGTEST_DISABLE_MSC_WARNINGS_POP_()  //  4251\n\n#endif  // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_\n// This file was GENERATED by command:\n//     pump.py gtest-type-util.h.pump\n// DO NOT EDIT BY HAND!!!\n\n// Copyright 2008 Google Inc.\n// All Rights Reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n// Type utilities needed for implementing typed and type-parameterized\n// tests.  This file is generated by a SCRIPT.  DO NOT EDIT BY HAND!\n//\n// Currently we support at most 50 types in a list, and at most 50\n// type-parameterized tests in one type-parameterized test suite.\n// Please contact googletestframework@googlegroups.com if you need\n// more.\n\n// GOOGLETEST_CM0001 DO NOT DELETE\n\n#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_\n#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_\n\n\n// #ifdef __GNUC__ is too general here.  It is possible to use gcc without using\n// libstdc++ (which is where cxxabi.h comes from).\n# if GTEST_HAS_CXXABI_H_\n#  include <cxxabi.h>\n# elif defined(__HP_aCC)\n#  include <acxx_demangle.h>\n# endif  // GTEST_HASH_CXXABI_H_\n\nnamespace testing {\nnamespace internal {\n\n// Canonicalizes a given name with respect to the Standard C++ Library.\n// This handles removing the inline namespace within `std` that is\n// used by various standard libraries (e.g., `std::__1`).  Names outside\n// of namespace std are returned unmodified.\ninline std::string CanonicalizeForStdLibVersioning(std::string s) {\n  static const char prefix[] = \"std::__\";\n  if (s.compare(0, strlen(prefix), prefix) == 0) {\n    std::string::size_type end = s.find(\"::\", strlen(prefix));\n    if (end != s.npos) {\n      // Erase everything between the initial `std` and the second `::`.\n      s.erase(strlen(\"std\"), end - strlen(\"std\"));\n    }\n  }\n  return s;\n}\n\n// GetTypeName<T>() returns a human-readable name of type T.\n// NB: This function is also used in Google Mock, so don't move it inside of\n// the typed-test-only section below.\ntemplate <typename T>\nstd::string GetTypeName() {\n# if GTEST_HAS_RTTI\n\n  const char* const name = typeid(T).name();\n#  if GTEST_HAS_CXXABI_H_ || defined(__HP_aCC)\n  int status = 0;\n  // gcc's implementation of typeid(T).name() mangles the type name,\n  // so we have to demangle it.\n#   if GTEST_HAS_CXXABI_H_\n  using abi::__cxa_demangle;\n#   endif  // GTEST_HAS_CXXABI_H_\n  char* const readable_name = __cxa_demangle(name, nullptr, nullptr, &status);\n  const std::string name_str(status == 0 ? readable_name : name);\n  free(readable_name);\n  return CanonicalizeForStdLibVersioning(name_str);\n#  else\n  return name;\n#  endif  // GTEST_HAS_CXXABI_H_ || __HP_aCC\n\n# else\n\n  return \"<type>\";\n\n# endif  // GTEST_HAS_RTTI\n}\n\n#if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P\n\n// AssertyTypeEq<T1, T2>::type is defined iff T1 and T2 are the same\n// type.  This can be used as a compile-time assertion to ensure that\n// two types are equal.\n\ntemplate <typename T1, typename T2>\nstruct AssertTypeEq;\n\ntemplate <typename T>\nstruct AssertTypeEq<T, T> {\n  typedef bool type;\n};\n\n// A unique type used as the default value for the arguments of class\n// template Types.  This allows us to simulate variadic templates\n// (e.g. Types<int>, Type<int, double>, and etc), which C++ doesn't\n// support directly.\nstruct None {};\n\n// The following family of struct and struct templates are used to\n// represent type lists.  In particular, TypesN<T1, T2, ..., TN>\n// represents a type list with N types (T1, T2, ..., and TN) in it.\n// Except for Types0, every struct in the family has two member types:\n// Head for the first type in the list, and Tail for the rest of the\n// list.\n\n// The empty type list.\nstruct Types0 {};\n\n// Type lists of length 1, 2, 3, and so on.\n\ntemplate <typename T1>\nstruct Types1 {\n  typedef T1 Head;\n  typedef Types0 Tail;\n};\ntemplate <typename T1, typename T2>\nstruct Types2 {\n  typedef T1 Head;\n  typedef Types1<T2> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3>\nstruct Types3 {\n  typedef T1 Head;\n  typedef Types2<T2, T3> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4>\nstruct Types4 {\n  typedef T1 Head;\n  typedef Types3<T2, T3, T4> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5>\nstruct Types5 {\n  typedef T1 Head;\n  typedef Types4<T2, T3, T4, T5> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6>\nstruct Types6 {\n  typedef T1 Head;\n  typedef Types5<T2, T3, T4, T5, T6> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7>\nstruct Types7 {\n  typedef T1 Head;\n  typedef Types6<T2, T3, T4, T5, T6, T7> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8>\nstruct Types8 {\n  typedef T1 Head;\n  typedef Types7<T2, T3, T4, T5, T6, T7, T8> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9>\nstruct Types9 {\n  typedef T1 Head;\n  typedef Types8<T2, T3, T4, T5, T6, T7, T8, T9> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10>\nstruct Types10 {\n  typedef T1 Head;\n  typedef Types9<T2, T3, T4, T5, T6, T7, T8, T9, T10> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11>\nstruct Types11 {\n  typedef T1 Head;\n  typedef Types10<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12>\nstruct Types12 {\n  typedef T1 Head;\n  typedef Types11<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13>\nstruct Types13 {\n  typedef T1 Head;\n  typedef Types12<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14>\nstruct Types14 {\n  typedef T1 Head;\n  typedef Types13<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15>\nstruct Types15 {\n  typedef T1 Head;\n  typedef Types14<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16>\nstruct Types16 {\n  typedef T1 Head;\n  typedef Types15<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17>\nstruct Types17 {\n  typedef T1 Head;\n  typedef Types16<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18>\nstruct Types18 {\n  typedef T1 Head;\n  typedef Types17<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19>\nstruct Types19 {\n  typedef T1 Head;\n  typedef Types18<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20>\nstruct Types20 {\n  typedef T1 Head;\n  typedef Types19<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21>\nstruct Types21 {\n  typedef T1 Head;\n  typedef Types20<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22>\nstruct Types22 {\n  typedef T1 Head;\n  typedef Types21<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23>\nstruct Types23 {\n  typedef T1 Head;\n  typedef Types22<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24>\nstruct Types24 {\n  typedef T1 Head;\n  typedef Types23<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25>\nstruct Types25 {\n  typedef T1 Head;\n  typedef Types24<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26>\nstruct Types26 {\n  typedef T1 Head;\n  typedef Types25<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27>\nstruct Types27 {\n  typedef T1 Head;\n  typedef Types26<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28>\nstruct Types28 {\n  typedef T1 Head;\n  typedef Types27<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29>\nstruct Types29 {\n  typedef T1 Head;\n  typedef Types28<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30>\nstruct Types30 {\n  typedef T1 Head;\n  typedef Types29<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31>\nstruct Types31 {\n  typedef T1 Head;\n  typedef Types30<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32>\nstruct Types32 {\n  typedef T1 Head;\n  typedef Types31<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31, T32> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33>\nstruct Types33 {\n  typedef T1 Head;\n  typedef Types32<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31, T32, T33> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34>\nstruct Types34 {\n  typedef T1 Head;\n  typedef Types33<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31, T32, T33, T34> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35>\nstruct Types35 {\n  typedef T1 Head;\n  typedef Types34<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31, T32, T33, T34, T35> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36>\nstruct Types36 {\n  typedef T1 Head;\n  typedef Types35<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31, T32, T33, T34, T35, T36> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37>\nstruct Types37 {\n  typedef T1 Head;\n  typedef Types36<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31, T32, T33, T34, T35, T36, T37> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38>\nstruct Types38 {\n  typedef T1 Head;\n  typedef Types37<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31, T32, T33, T34, T35, T36, T37, T38> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39>\nstruct Types39 {\n  typedef T1 Head;\n  typedef Types38<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40>\nstruct Types40 {\n  typedef T1 Head;\n  typedef Types39<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41>\nstruct Types41 {\n  typedef T1 Head;\n  typedef Types40<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42>\nstruct Types42 {\n  typedef T1 Head;\n  typedef Types41<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43>\nstruct Types43 {\n  typedef T1 Head;\n  typedef Types42<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,\n      T43> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44>\nstruct Types44 {\n  typedef T1 Head;\n  typedef Types43<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,\n      T44> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44, typename T45>\nstruct Types45 {\n  typedef T1 Head;\n  typedef Types44<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,\n      T44, T45> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44, typename T45,\n    typename T46>\nstruct Types46 {\n  typedef T1 Head;\n  typedef Types45<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,\n      T44, T45, T46> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44, typename T45,\n    typename T46, typename T47>\nstruct Types47 {\n  typedef T1 Head;\n  typedef Types46<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,\n      T44, T45, T46, T47> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44, typename T45,\n    typename T46, typename T47, typename T48>\nstruct Types48 {\n  typedef T1 Head;\n  typedef Types47<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,\n      T44, T45, T46, T47, T48> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44, typename T45,\n    typename T46, typename T47, typename T48, typename T49>\nstruct Types49 {\n  typedef T1 Head;\n  typedef Types48<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,\n      T44, T45, T46, T47, T48, T49> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44, typename T45,\n    typename T46, typename T47, typename T48, typename T49, typename T50>\nstruct Types50 {\n  typedef T1 Head;\n  typedef Types49<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,\n      T44, T45, T46, T47, T48, T49, T50> Tail;\n};\n\n\n}  // namespace internal\n\n// We don't want to require the users to write TypesN<...> directly,\n// as that would require them to count the length.  Types<...> is much\n// easier to write, but generates horrible messages when there is a\n// compiler error, as gcc insists on printing out each template\n// argument, even if it has the default value (this means Types<int>\n// will appear as Types<int, None, None, ..., None> in the compiler\n// errors).\n//\n// Our solution is to combine the best part of the two approaches: a\n// user would write Types<T1, ..., TN>, and Google Test will translate\n// that to TypesN<T1, ..., TN> internally to make error messages\n// readable.  The translation is done by the 'type' member of the\n// Types template.\ntemplate <typename T1 = internal::None, typename T2 = internal::None,\n    typename T3 = internal::None, typename T4 = internal::None,\n    typename T5 = internal::None, typename T6 = internal::None,\n    typename T7 = internal::None, typename T8 = internal::None,\n    typename T9 = internal::None, typename T10 = internal::None,\n    typename T11 = internal::None, typename T12 = internal::None,\n    typename T13 = internal::None, typename T14 = internal::None,\n    typename T15 = internal::None, typename T16 = internal::None,\n    typename T17 = internal::None, typename T18 = internal::None,\n    typename T19 = internal::None, typename T20 = internal::None,\n    typename T21 = internal::None, typename T22 = internal::None,\n    typename T23 = internal::None, typename T24 = internal::None,\n    typename T25 = internal::None, typename T26 = internal::None,\n    typename T27 = internal::None, typename T28 = internal::None,\n    typename T29 = internal::None, typename T30 = internal::None,\n    typename T31 = internal::None, typename T32 = internal::None,\n    typename T33 = internal::None, typename T34 = internal::None,\n    typename T35 = internal::None, typename T36 = internal::None,\n    typename T37 = internal::None, typename T38 = internal::None,\n    typename T39 = internal::None, typename T40 = internal::None,\n    typename T41 = internal::None, typename T42 = internal::None,\n    typename T43 = internal::None, typename T44 = internal::None,\n    typename T45 = internal::None, typename T46 = internal::None,\n    typename T47 = internal::None, typename T48 = internal::None,\n    typename T49 = internal::None, typename T50 = internal::None>\nstruct Types {\n  typedef internal::Types50<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,\n      T41, T42, T43, T44, T45, T46, T47, T48, T49, T50> type;\n};\n\ntemplate <>\nstruct Types<internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None> {\n  typedef internal::Types0 type;\n};\ntemplate <typename T1>\nstruct Types<T1, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None> {\n  typedef internal::Types1<T1> type;\n};\ntemplate <typename T1, typename T2>\nstruct Types<T1, T2, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None> {\n  typedef internal::Types2<T1, T2> type;\n};\ntemplate <typename T1, typename T2, typename T3>\nstruct Types<T1, T2, T3, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None> {\n  typedef internal::Types3<T1, T2, T3> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4>\nstruct Types<T1, T2, T3, T4, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None> {\n  typedef internal::Types4<T1, T2, T3, T4> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5>\nstruct Types<T1, T2, T3, T4, T5, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None> {\n  typedef internal::Types5<T1, T2, T3, T4, T5> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6>\nstruct Types<T1, T2, T3, T4, T5, T6, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None> {\n  typedef internal::Types6<T1, T2, T3, T4, T5, T6> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None> {\n  typedef internal::Types7<T1, T2, T3, T4, T5, T6, T7> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None> {\n  typedef internal::Types8<T1, T2, T3, T4, T5, T6, T7, T8> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None> {\n  typedef internal::Types9<T1, T2, T3, T4, T5, T6, T7, T8, T9> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None> {\n  typedef internal::Types10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None> {\n  typedef internal::Types11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None> {\n  typedef internal::Types12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None> {\n  typedef internal::Types13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None> {\n  typedef internal::Types14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None> {\n  typedef internal::Types15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None> {\n  typedef internal::Types16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None> {\n  typedef internal::Types17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None> {\n  typedef internal::Types18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None> {\n  typedef internal::Types19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None> {\n  typedef internal::Types20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None> {\n  typedef internal::Types21<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None> {\n  typedef internal::Types22<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None> {\n  typedef internal::Types23<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None> {\n  typedef internal::Types24<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None> {\n  typedef internal::Types25<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None> {\n  typedef internal::Types26<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,\n      T26> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None> {\n  typedef internal::Types27<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None> {\n  typedef internal::Types28<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None> {\n  typedef internal::Types29<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None> {\n  typedef internal::Types30<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    T31, internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None> {\n  typedef internal::Types31<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    T31, T32, internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None> {\n  typedef internal::Types32<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    T31, T32, T33, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None> {\n  typedef internal::Types33<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32, T33> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    T31, T32, T33, T34, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None> {\n  typedef internal::Types34<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32, T33, T34> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    T31, T32, T33, T34, T35, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None> {\n  typedef internal::Types35<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32, T33, T34, T35> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    T31, T32, T33, T34, T35, T36, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None> {\n  typedef internal::Types36<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32, T33, T34, T35, T36> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    T31, T32, T33, T34, T35, T36, T37, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None> {\n  typedef internal::Types37<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    T31, T32, T33, T34, T35, T36, T37, T38, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None> {\n  typedef internal::Types38<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    T31, T32, T33, T34, T35, T36, T37, T38, T39, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None> {\n  typedef internal::Types39<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None> {\n  typedef internal::Types40<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,\n      T40> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None> {\n  typedef internal::Types41<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,\n      T41> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None> {\n  typedef internal::Types42<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,\n      T41, T42> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None> {\n  typedef internal::Types43<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,\n      T41, T42, T43> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None> {\n  typedef internal::Types44<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,\n      T41, T42, T43, T44> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44, typename T45>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None> {\n  typedef internal::Types45<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,\n      T41, T42, T43, T44, T45> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44, typename T45,\n    typename T46>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45,\n    T46, internal::None, internal::None, internal::None, internal::None> {\n  typedef internal::Types46<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,\n      T41, T42, T43, T44, T45, T46> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44, typename T45,\n    typename T46, typename T47>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45,\n    T46, T47, internal::None, internal::None, internal::None> {\n  typedef internal::Types47<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,\n      T41, T42, T43, T44, T45, T46, T47> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44, typename T45,\n    typename T46, typename T47, typename T48>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45,\n    T46, T47, T48, internal::None, internal::None> {\n  typedef internal::Types48<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,\n      T41, T42, T43, T44, T45, T46, T47, T48> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44, typename T45,\n    typename T46, typename T47, typename T48, typename T49>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45,\n    T46, T47, T48, T49, internal::None> {\n  typedef internal::Types49<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,\n      T41, T42, T43, T44, T45, T46, T47, T48, T49> type;\n};\n\nnamespace internal {\n\n# define GTEST_TEMPLATE_ template <typename T> class\n\n// The template \"selector\" struct TemplateSel<Tmpl> is used to\n// represent Tmpl, which must be a class template with one type\n// parameter, as a type.  TemplateSel<Tmpl>::Bind<T>::type is defined\n// as the type Tmpl<T>.  This allows us to actually instantiate the\n// template \"selected\" by TemplateSel<Tmpl>.\n//\n// This trick is necessary for simulating typedef for class templates,\n// which C++ doesn't support directly.\ntemplate <GTEST_TEMPLATE_ Tmpl>\nstruct TemplateSel {\n  template <typename T>\n  struct Bind {\n    typedef Tmpl<T> type;\n  };\n};\n\n# define GTEST_BIND_(TmplSel, T) \\\n  TmplSel::template Bind<T>::type\n\n// A unique struct template used as the default value for the\n// arguments of class template Templates.  This allows us to simulate\n// variadic templates (e.g. Templates<int>, Templates<int, double>,\n// and etc), which C++ doesn't support directly.\ntemplate <typename T>\nstruct NoneT {};\n\n// The following family of struct and struct templates are used to\n// represent template lists.  In particular, TemplatesN<T1, T2, ...,\n// TN> represents a list of N templates (T1, T2, ..., and TN).  Except\n// for Templates0, every struct in the family has two member types:\n// Head for the selector of the first template in the list, and Tail\n// for the rest of the list.\n\n// The empty template list.\nstruct Templates0 {};\n\n// Template lists of length 1, 2, 3, and so on.\n\ntemplate <GTEST_TEMPLATE_ T1>\nstruct Templates1 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates0 Tail;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2>\nstruct Templates2 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates1<T2> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3>\nstruct Templates3 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates2<T2, T3> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4>\nstruct Templates4 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates3<T2, T3, T4> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5>\nstruct Templates5 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates4<T2, T3, T4, T5> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6>\nstruct Templates6 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates5<T2, T3, T4, T5, T6> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7>\nstruct Templates7 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates6<T2, T3, T4, T5, T6, T7> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8>\nstruct Templates8 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates7<T2, T3, T4, T5, T6, T7, T8> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9>\nstruct Templates9 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates8<T2, T3, T4, T5, T6, T7, T8, T9> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10>\nstruct Templates10 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates9<T2, T3, T4, T5, T6, T7, T8, T9, T10> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11>\nstruct Templates11 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates10<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12>\nstruct Templates12 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates11<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13>\nstruct Templates13 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates12<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14>\nstruct Templates14 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates13<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15>\nstruct Templates15 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates14<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16>\nstruct Templates16 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates15<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17>\nstruct Templates17 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates16<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18>\nstruct Templates18 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates17<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19>\nstruct Templates19 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates18<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20>\nstruct Templates20 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates19<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21>\nstruct Templates21 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates20<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22>\nstruct Templates22 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates21<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23>\nstruct Templates23 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates22<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24>\nstruct Templates24 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates23<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25>\nstruct Templates25 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates24<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26>\nstruct Templates26 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates25<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27>\nstruct Templates27 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates26<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28>\nstruct Templates28 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates27<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29>\nstruct Templates29 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates28<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30>\nstruct Templates30 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates29<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31>\nstruct Templates31 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates30<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32>\nstruct Templates32 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates31<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31, T32> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33>\nstruct Templates33 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates32<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31, T32, T33> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34>\nstruct Templates34 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates33<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31, T32, T33, T34> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35>\nstruct Templates35 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates34<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31, T32, T33, T34, T35> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36>\nstruct Templates36 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates35<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31, T32, T33, T34, T35, T36> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37>\nstruct Templates37 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates36<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31, T32, T33, T34, T35, T36, T37> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38>\nstruct Templates38 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates37<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31, T32, T33, T34, T35, T36, T37, T38> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39>\nstruct Templates39 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates38<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40>\nstruct Templates40 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates39<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41>\nstruct Templates41 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates40<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42>\nstruct Templates42 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates41<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,\n      T42> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,\n    GTEST_TEMPLATE_ T43>\nstruct Templates43 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates42<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,\n      T43> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,\n    GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44>\nstruct Templates44 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates43<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,\n      T43, T44> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,\n    GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45>\nstruct Templates45 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates44<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,\n      T43, T44, T45> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,\n    GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,\n    GTEST_TEMPLATE_ T46>\nstruct Templates46 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates45<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,\n      T43, T44, T45, T46> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,\n    GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,\n    GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47>\nstruct Templates47 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates46<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,\n      T43, T44, T45, T46, T47> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,\n    GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,\n    GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48>\nstruct Templates48 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates47<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,\n      T43, T44, T45, T46, T47, T48> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,\n    GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,\n    GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48,\n    GTEST_TEMPLATE_ T49>\nstruct Templates49 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates48<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,\n      T43, T44, T45, T46, T47, T48, T49> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,\n    GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,\n    GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48,\n    GTEST_TEMPLATE_ T49, GTEST_TEMPLATE_ T50>\nstruct Templates50 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates49<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,\n      T43, T44, T45, T46, T47, T48, T49, T50> Tail;\n};\n\n\n// We don't want to require the users to write TemplatesN<...> directly,\n// as that would require them to count the length.  Templates<...> is much\n// easier to write, but generates horrible messages when there is a\n// compiler error, as gcc insists on printing out each template\n// argument, even if it has the default value (this means Templates<list>\n// will appear as Templates<list, NoneT, NoneT, ..., NoneT> in the compiler\n// errors).\n//\n// Our solution is to combine the best part of the two approaches: a\n// user would write Templates<T1, ..., TN>, and Google Test will translate\n// that to TemplatesN<T1, ..., TN> internally to make error messages\n// readable.  The translation is done by the 'type' member of the\n// Templates template.\ntemplate <GTEST_TEMPLATE_ T1 = NoneT, GTEST_TEMPLATE_ T2 = NoneT,\n    GTEST_TEMPLATE_ T3 = NoneT, GTEST_TEMPLATE_ T4 = NoneT,\n    GTEST_TEMPLATE_ T5 = NoneT, GTEST_TEMPLATE_ T6 = NoneT,\n    GTEST_TEMPLATE_ T7 = NoneT, GTEST_TEMPLATE_ T8 = NoneT,\n    GTEST_TEMPLATE_ T9 = NoneT, GTEST_TEMPLATE_ T10 = NoneT,\n    GTEST_TEMPLATE_ T11 = NoneT, GTEST_TEMPLATE_ T12 = NoneT,\n    GTEST_TEMPLATE_ T13 = NoneT, GTEST_TEMPLATE_ T14 = NoneT,\n    GTEST_TEMPLATE_ T15 = NoneT, GTEST_TEMPLATE_ T16 = NoneT,\n    GTEST_TEMPLATE_ T17 = NoneT, GTEST_TEMPLATE_ T18 = NoneT,\n    GTEST_TEMPLATE_ T19 = NoneT, GTEST_TEMPLATE_ T20 = NoneT,\n    GTEST_TEMPLATE_ T21 = NoneT, GTEST_TEMPLATE_ T22 = NoneT,\n    GTEST_TEMPLATE_ T23 = NoneT, GTEST_TEMPLATE_ T24 = NoneT,\n    GTEST_TEMPLATE_ T25 = NoneT, GTEST_TEMPLATE_ T26 = NoneT,\n    GTEST_TEMPLATE_ T27 = NoneT, GTEST_TEMPLATE_ T28 = NoneT,\n    GTEST_TEMPLATE_ T29 = NoneT, GTEST_TEMPLATE_ T30 = NoneT,\n    GTEST_TEMPLATE_ T31 = NoneT, GTEST_TEMPLATE_ T32 = NoneT,\n    GTEST_TEMPLATE_ T33 = NoneT, GTEST_TEMPLATE_ T34 = NoneT,\n    GTEST_TEMPLATE_ T35 = NoneT, GTEST_TEMPLATE_ T36 = NoneT,\n    GTEST_TEMPLATE_ T37 = NoneT, GTEST_TEMPLATE_ T38 = NoneT,\n    GTEST_TEMPLATE_ T39 = NoneT, GTEST_TEMPLATE_ T40 = NoneT,\n    GTEST_TEMPLATE_ T41 = NoneT, GTEST_TEMPLATE_ T42 = NoneT,\n    GTEST_TEMPLATE_ T43 = NoneT, GTEST_TEMPLATE_ T44 = NoneT,\n    GTEST_TEMPLATE_ T45 = NoneT, GTEST_TEMPLATE_ T46 = NoneT,\n    GTEST_TEMPLATE_ T47 = NoneT, GTEST_TEMPLATE_ T48 = NoneT,\n    GTEST_TEMPLATE_ T49 = NoneT, GTEST_TEMPLATE_ T50 = NoneT>\nstruct Templates {\n  typedef Templates50<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,\n      T42, T43, T44, T45, T46, T47, T48, T49, T50> type;\n};\n\ntemplate <>\nstruct Templates<NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT> {\n  typedef Templates0 type;\n};\ntemplate <GTEST_TEMPLATE_ T1>\nstruct Templates<T1, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT> {\n  typedef Templates1<T1> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2>\nstruct Templates<T1, T2, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT> {\n  typedef Templates2<T1, T2> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3>\nstruct Templates<T1, T2, T3, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates3<T1, T2, T3> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4>\nstruct Templates<T1, T2, T3, T4, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates4<T1, T2, T3, T4> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5>\nstruct Templates<T1, T2, T3, T4, T5, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates5<T1, T2, T3, T4, T5> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6>\nstruct Templates<T1, T2, T3, T4, T5, T6, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates6<T1, T2, T3, T4, T5, T6> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates7<T1, T2, T3, T4, T5, T6, T7> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates8<T1, T2, T3, T4, T5, T6, T7, T8> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates9<T1, T2, T3, T4, T5, T6, T7, T8, T9> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates21<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT> {\n  typedef Templates22<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT> {\n  typedef Templates23<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT> {\n  typedef Templates24<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT> {\n  typedef Templates25<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT> {\n  typedef Templates26<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT> {\n  typedef Templates27<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT> {\n  typedef Templates28<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT> {\n  typedef Templates29<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates30<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, T31, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates31<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, T31, T32, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates32<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31, T32> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, T31, T32, T33, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates33<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31, T32, T33> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, T31, T32, T33, T34, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates34<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31, T32, T33, T34> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, T31, T32, T33, T34, T35, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates35<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31, T32, T33, T34, T35> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, T31, T32, T33, T34, T35, T36, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates36<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31, T32, T33, T34, T35, T36> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, T31, T32, T33, T34, T35, T36, T37, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates37<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31, T32, T33, T34, T35, T36, T37> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, T31, T32, T33, T34, T35, T36, T37, T38, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates38<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates39<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates40<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates41<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,\n      T41> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates42<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,\n      T42> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,\n    GTEST_TEMPLATE_ T43>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates43<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,\n      T42, T43> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,\n    GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates44<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,\n      T42, T43, T44> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,\n    GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,\n    T45, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates45<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,\n      T42, T43, T44, T45> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,\n    GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,\n    GTEST_TEMPLATE_ T46>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,\n    T45, T46, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates46<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,\n      T42, T43, T44, T45, T46> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,\n    GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,\n    GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,\n    T45, T46, T47, NoneT, NoneT, NoneT> {\n  typedef Templates47<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,\n      T42, T43, T44, T45, T46, T47> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,\n    GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,\n    GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,\n    T45, T46, T47, T48, NoneT, NoneT> {\n  typedef Templates48<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,\n      T42, T43, T44, T45, T46, T47, T48> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,\n    GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,\n    GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48,\n    GTEST_TEMPLATE_ T49>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,\n    T45, T46, T47, T48, T49, NoneT> {\n  typedef Templates49<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,\n      T42, T43, T44, T45, T46, T47, T48, T49> type;\n};\n\n// The TypeList template makes it possible to use either a single type\n// or a Types<...> list in TYPED_TEST_SUITE() and\n// INSTANTIATE_TYPED_TEST_SUITE_P().\n\ntemplate <typename T>\nstruct TypeList {\n  typedef Types1<T> type;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44, typename T45,\n    typename T46, typename T47, typename T48, typename T49, typename T50>\nstruct TypeList<Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n    T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,\n    T44, T45, T46, T47, T48, T49, T50> > {\n  typedef typename Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,\n      T41, T42, T43, T44, T45, T46, T47, T48, T49, T50>::type type;\n};\n\n#endif  // GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P\n\n}  // namespace internal\n}  // namespace testing\n\n#endif  // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_\n\n// Due to C++ preprocessor weirdness, we need double indirection to\n// concatenate two tokens when one of them is __LINE__.  Writing\n//\n//   foo ## __LINE__\n//\n// will result in the token foo__LINE__, instead of foo followed by\n// the current line number.  For more details, see\n// http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.6\n#define GTEST_CONCAT_TOKEN_(foo, bar) GTEST_CONCAT_TOKEN_IMPL_(foo, bar)\n#define GTEST_CONCAT_TOKEN_IMPL_(foo, bar) foo ## bar\n\n// Stringifies its argument.\n#define GTEST_STRINGIFY_(name) #name\n\nclass ProtocolMessage;\nnamespace proto2 { class Message; }\n\nnamespace testing {\n\n// Forward declarations.\n\nclass AssertionResult;                 // Result of an assertion.\nclass Message;                         // Represents a failure message.\nclass Test;                            // Represents a test.\nclass TestInfo;                        // Information about a test.\nclass TestPartResult;                  // Result of a test part.\nclass UnitTest;                        // A collection of test suites.\n\ntemplate <typename T>\n::std::string PrintToString(const T& value);\n\nnamespace internal {\n\nstruct TraceInfo;                      // Information about a trace point.\nclass TestInfoImpl;                    // Opaque implementation of TestInfo\nclass UnitTestImpl;                    // Opaque implementation of UnitTest\n\n// The text used in failure messages to indicate the start of the\n// stack trace.\nGTEST_API_ extern const char kStackTraceMarker[];\n\n// An IgnoredValue object can be implicitly constructed from ANY value.\nclass IgnoredValue {\n  struct Sink {};\n public:\n  // This constructor template allows any value to be implicitly\n  // converted to IgnoredValue.  The object has no data member and\n  // doesn't try to remember anything about the argument.  We\n  // deliberately omit the 'explicit' keyword in order to allow the\n  // conversion to be implicit.\n  // Disable the conversion if T already has a magical conversion operator.\n  // Otherwise we get ambiguity.\n  template <typename T,\n            typename std::enable_if<!std::is_convertible<T, Sink>::value,\n                                    int>::type = 0>\n  IgnoredValue(const T& /* ignored */) {}  // NOLINT(runtime/explicit)\n};\n\n// The only type that should be convertible to Secret* is nullptr.\n// The other null pointer constants are not of a type that is convertible to\n// Secret*. Only the literal with the right value is.\ntemplate <typename T>\nusing TypeIsValidNullptrConstant = std::integral_constant<\n    bool, std::is_same<typename std::decay<T>::type, std::nullptr_t>::value ||\n              !std::is_convertible<T, Secret*>::value>;\n\n// Two overloaded helpers for checking at compile time whether an\n// expression is a null pointer literal (i.e. NULL or any 0-valued\n// compile-time integral constant).  These helpers have no\n// implementations, as we only need their signatures.\n//\n// Given IsNullLiteralHelper(x), the compiler will pick the first\n// version if x can be implicitly converted to Secret*, and pick the\n// second version otherwise.  Since Secret is a secret and incomplete\n// type, the only expression a user can write that has type Secret* is\n// a null pointer literal.  Therefore, we know that x is a null\n// pointer literal if and only if the first version is picked by the\n// compiler.\nstd::true_type IsNullLiteralHelper(Secret*, std::true_type);\nstd::false_type IsNullLiteralHelper(IgnoredValue, std::false_type);\nstd::false_type IsNullLiteralHelper(IgnoredValue, std::true_type);\n\n// A compile-time bool constant that is true if and only if x is a null pointer\n// literal (i.e. nullptr, NULL or any 0-valued compile-time integral constant).\n#define GTEST_IS_NULL_LITERAL_(x)                    \\\n  decltype(::testing::internal::IsNullLiteralHelper( \\\n      x,                                             \\\n      ::testing::internal::TypeIsValidNullptrConstant<decltype(x)>()))::value\n\n// Appends the user-supplied message to the Google-Test-generated message.\nGTEST_API_ std::string AppendUserMessage(\n    const std::string& gtest_msg, const Message& user_msg);\n\n#if GTEST_HAS_EXCEPTIONS\n\nGTEST_DISABLE_MSC_WARNINGS_PUSH_(4275 \\\n/* an exported class was derived from a class that was not exported */)\n\n// This exception is thrown by (and only by) a failed Google Test\n// assertion when GTEST_FLAG(throw_on_failure) is true (if exceptions\n// are enabled).  We derive it from std::runtime_error, which is for\n// errors presumably detectable only at run time.  Since\n// std::runtime_error inherits from std::exception, many testing\n// frameworks know how to extract and print the message inside it.\nclass GTEST_API_ GoogleTestFailureException : public ::std::runtime_error {\n public:\n  explicit GoogleTestFailureException(const TestPartResult& failure);\n};\n\nGTEST_DISABLE_MSC_WARNINGS_POP_()  //  4275\n\n#endif  // GTEST_HAS_EXCEPTIONS\n\nnamespace edit_distance {\n// Returns the optimal edits to go from 'left' to 'right'.\n// All edits cost the same, with replace having lower priority than\n// add/remove.\n// Simple implementation of the Wagner-Fischer algorithm.\n// See http://en.wikipedia.org/wiki/Wagner-Fischer_algorithm\nenum EditType { kMatch, kAdd, kRemove, kReplace };\nGTEST_API_ std::vector<EditType> CalculateOptimalEdits(\n    const std::vector<size_t>& left, const std::vector<size_t>& right);\n\n// Same as above, but the input is represented as strings.\nGTEST_API_ std::vector<EditType> CalculateOptimalEdits(\n    const std::vector<std::string>& left,\n    const std::vector<std::string>& right);\n\n// Create a diff of the input strings in Unified diff format.\nGTEST_API_ std::string CreateUnifiedDiff(const std::vector<std::string>& left,\n                                         const std::vector<std::string>& right,\n                                         size_t context = 2);\n\n}  // namespace edit_distance\n\n// Calculate the diff between 'left' and 'right' and return it in unified diff\n// format.\n// If not null, stores in 'total_line_count' the total number of lines found\n// in left + right.\nGTEST_API_ std::string DiffStrings(const std::string& left,\n                                   const std::string& right,\n                                   size_t* total_line_count);\n\n// Constructs and returns the message for an equality assertion\n// (e.g. ASSERT_EQ, EXPECT_STREQ, etc) failure.\n//\n// The first four parameters are the expressions used in the assertion\n// and their values, as strings.  For example, for ASSERT_EQ(foo, bar)\n// where foo is 5 and bar is 6, we have:\n//\n//   expected_expression: \"foo\"\n//   actual_expression:   \"bar\"\n//   expected_value:      \"5\"\n//   actual_value:        \"6\"\n//\n// The ignoring_case parameter is true iff the assertion is a\n// *_STRCASEEQ*.  When it's true, the string \" (ignoring case)\" will\n// be inserted into the message.\nGTEST_API_ AssertionResult EqFailure(const char* expected_expression,\n                                     const char* actual_expression,\n                                     const std::string& expected_value,\n                                     const std::string& actual_value,\n                                     bool ignoring_case);\n\n// Constructs a failure message for Boolean assertions such as EXPECT_TRUE.\nGTEST_API_ std::string GetBoolAssertionFailureMessage(\n    const AssertionResult& assertion_result,\n    const char* expression_text,\n    const char* actual_predicate_value,\n    const char* expected_predicate_value);\n\n// This template class represents an IEEE floating-point number\n// (either single-precision or double-precision, depending on the\n// template parameters).\n//\n// The purpose of this class is to do more sophisticated number\n// comparison.  (Due to round-off error, etc, it's very unlikely that\n// two floating-points will be equal exactly.  Hence a naive\n// comparison by the == operation often doesn't work.)\n//\n// Format of IEEE floating-point:\n//\n//   The most-significant bit being the leftmost, an IEEE\n//   floating-point looks like\n//\n//     sign_bit exponent_bits fraction_bits\n//\n//   Here, sign_bit is a single bit that designates the sign of the\n//   number.\n//\n//   For float, there are 8 exponent bits and 23 fraction bits.\n//\n//   For double, there are 11 exponent bits and 52 fraction bits.\n//\n//   More details can be found at\n//   http://en.wikipedia.org/wiki/IEEE_floating-point_standard.\n//\n// Template parameter:\n//\n//   RawType: the raw floating-point type (either float or double)\ntemplate <typename RawType>\nclass FloatingPoint {\n public:\n  // Defines the unsigned integer type that has the same size as the\n  // floating point number.\n  typedef typename TypeWithSize<sizeof(RawType)>::UInt Bits;\n\n  // Constants.\n\n  // # of bits in a number.\n  static const size_t kBitCount = 8*sizeof(RawType);\n\n  // # of fraction bits in a number.\n  static const size_t kFractionBitCount =\n    std::numeric_limits<RawType>::digits - 1;\n\n  // # of exponent bits in a number.\n  static const size_t kExponentBitCount = kBitCount - 1 - kFractionBitCount;\n\n  // The mask for the sign bit.\n  static const Bits kSignBitMask = static_cast<Bits>(1) << (kBitCount - 1);\n\n  // The mask for the fraction bits.\n  static const Bits kFractionBitMask =\n    ~static_cast<Bits>(0) >> (kExponentBitCount + 1);\n\n  // The mask for the exponent bits.\n  static const Bits kExponentBitMask = ~(kSignBitMask | kFractionBitMask);\n\n  // How many ULP's (Units in the Last Place) we want to tolerate when\n  // comparing two numbers.  The larger the value, the more error we\n  // allow.  A 0 value means that two numbers must be exactly the same\n  // to be considered equal.\n  //\n  // The maximum error of a single floating-point operation is 0.5\n  // units in the last place.  On Intel CPU's, all floating-point\n  // calculations are done with 80-bit precision, while double has 64\n  // bits.  Therefore, 4 should be enough for ordinary use.\n  //\n  // See the following article for more details on ULP:\n  // http://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/\n  static const size_t kMaxUlps = 4;\n\n  // Constructs a FloatingPoint from a raw floating-point number.\n  //\n  // On an Intel CPU, passing a non-normalized NAN (Not a Number)\n  // around may change its bits, although the new value is guaranteed\n  // to be also a NAN.  Therefore, don't expect this constructor to\n  // preserve the bits in x when x is a NAN.\n  explicit FloatingPoint(const RawType& x) { u_.value_ = x; }\n\n  // Static methods\n\n  // Reinterprets a bit pattern as a floating-point number.\n  //\n  // This function is needed to test the AlmostEquals() method.\n  static RawType ReinterpretBits(const Bits bits) {\n    FloatingPoint fp(0);\n    fp.u_.bits_ = bits;\n    return fp.u_.value_;\n  }\n\n  // Returns the floating-point number that represent positive infinity.\n  static RawType Infinity() {\n    return ReinterpretBits(kExponentBitMask);\n  }\n\n  // Returns the maximum representable finite floating-point number.\n  static RawType Max();\n\n  // Non-static methods\n\n  // Returns the bits that represents this number.\n  const Bits &bits() const { return u_.bits_; }\n\n  // Returns the exponent bits of this number.\n  Bits exponent_bits() const { return kExponentBitMask & u_.bits_; }\n\n  // Returns the fraction bits of this number.\n  Bits fraction_bits() const { return kFractionBitMask & u_.bits_; }\n\n  // Returns the sign bit of this number.\n  Bits sign_bit() const { return kSignBitMask & u_.bits_; }\n\n  // Returns true iff this is NAN (not a number).\n  bool is_nan() const {\n    // It's a NAN if the exponent bits are all ones and the fraction\n    // bits are not entirely zeros.\n    return (exponent_bits() == kExponentBitMask) && (fraction_bits() != 0);\n  }\n\n  // Returns true iff this number is at most kMaxUlps ULP's away from\n  // rhs.  In particular, this function:\n  //\n  //   - returns false if either number is (or both are) NAN.\n  //   - treats really large numbers as almost equal to infinity.\n  //   - thinks +0.0 and -0.0 are 0 DLP's apart.\n  bool AlmostEquals(const FloatingPoint& rhs) const {\n    // The IEEE standard says that any comparison operation involving\n    // a NAN must return false.\n    if (is_nan() || rhs.is_nan()) return false;\n\n    return DistanceBetweenSignAndMagnitudeNumbers(u_.bits_, rhs.u_.bits_)\n        <= kMaxUlps;\n  }\n\n private:\n  // The data type used to store the actual floating-point number.\n  union FloatingPointUnion {\n    RawType value_;  // The raw floating-point number.\n    Bits bits_;      // The bits that represent the number.\n  };\n\n  // Converts an integer from the sign-and-magnitude representation to\n  // the biased representation.  More precisely, let N be 2 to the\n  // power of (kBitCount - 1), an integer x is represented by the\n  // unsigned number x + N.\n  //\n  // For instance,\n  //\n  //   -N + 1 (the most negative number representable using\n  //          sign-and-magnitude) is represented by 1;\n  //   0      is represented by N; and\n  //   N - 1  (the biggest number representable using\n  //          sign-and-magnitude) is represented by 2N - 1.\n  //\n  // Read http://en.wikipedia.org/wiki/Signed_number_representations\n  // for more details on signed number representations.\n  static Bits SignAndMagnitudeToBiased(const Bits &sam) {\n    if (kSignBitMask & sam) {\n      // sam represents a negative number.\n      return ~sam + 1;\n    } else {\n      // sam represents a positive number.\n      return kSignBitMask | sam;\n    }\n  }\n\n  // Given two numbers in the sign-and-magnitude representation,\n  // returns the distance between them as an unsigned number.\n  static Bits DistanceBetweenSignAndMagnitudeNumbers(const Bits &sam1,\n                                                     const Bits &sam2) {\n    const Bits biased1 = SignAndMagnitudeToBiased(sam1);\n    const Bits biased2 = SignAndMagnitudeToBiased(sam2);\n    return (biased1 >= biased2) ? (biased1 - biased2) : (biased2 - biased1);\n  }\n\n  FloatingPointUnion u_;\n};\n\n// We cannot use std::numeric_limits<T>::max() as it clashes with the max()\n// macro defined by <windows.h>.\ntemplate <>\ninline float FloatingPoint<float>::Max() { return FLT_MAX; }\ntemplate <>\ninline double FloatingPoint<double>::Max() { return DBL_MAX; }\n\n// Typedefs the instances of the FloatingPoint template class that we\n// care to use.\ntypedef FloatingPoint<float> Float;\ntypedef FloatingPoint<double> Double;\n\n// In order to catch the mistake of putting tests that use different\n// test fixture classes in the same test suite, we need to assign\n// unique IDs to fixture classes and compare them.  The TypeId type is\n// used to hold such IDs.  The user should treat TypeId as an opaque\n// type: the only operation allowed on TypeId values is to compare\n// them for equality using the == operator.\ntypedef const void* TypeId;\n\ntemplate <typename T>\nclass TypeIdHelper {\n public:\n  // dummy_ must not have a const type.  Otherwise an overly eager\n  // compiler (e.g. MSVC 7.1 & 8.0) may try to merge\n  // TypeIdHelper<T>::dummy_ for different Ts as an \"optimization\".\n  static bool dummy_;\n};\n\ntemplate <typename T>\nbool TypeIdHelper<T>::dummy_ = false;\n\n// GetTypeId<T>() returns the ID of type T.  Different values will be\n// returned for different types.  Calling the function twice with the\n// same type argument is guaranteed to return the same ID.\ntemplate <typename T>\nTypeId GetTypeId() {\n  // The compiler is required to allocate a different\n  // TypeIdHelper<T>::dummy_ variable for each T used to instantiate\n  // the template.  Therefore, the address of dummy_ is guaranteed to\n  // be unique.\n  return &(TypeIdHelper<T>::dummy_);\n}\n\n// Returns the type ID of ::testing::Test.  Always call this instead\n// of GetTypeId< ::testing::Test>() to get the type ID of\n// ::testing::Test, as the latter may give the wrong result due to a\n// suspected linker bug when compiling Google Test as a Mac OS X\n// framework.\nGTEST_API_ TypeId GetTestTypeId();\n\n// Defines the abstract factory interface that creates instances\n// of a Test object.\nclass TestFactoryBase {\n public:\n  virtual ~TestFactoryBase() {}\n\n  // Creates a test instance to run. The instance is both created and destroyed\n  // within TestInfoImpl::Run()\n  virtual Test* CreateTest() = 0;\n\n protected:\n  TestFactoryBase() {}\n\n private:\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(TestFactoryBase);\n};\n\n// This class provides implementation of TeastFactoryBase interface.\n// It is used in TEST and TEST_F macros.\ntemplate <class TestClass>\nclass TestFactoryImpl : public TestFactoryBase {\n public:\n  Test* CreateTest() override { return new TestClass; }\n};\n\n#if GTEST_OS_WINDOWS\n\n// Predicate-formatters for implementing the HRESULT checking macros\n// {ASSERT|EXPECT}_HRESULT_{SUCCEEDED|FAILED}\n// We pass a long instead of HRESULT to avoid causing an\n// include dependency for the HRESULT type.\nGTEST_API_ AssertionResult IsHRESULTSuccess(const char* expr,\n                                            long hr);  // NOLINT\nGTEST_API_ AssertionResult IsHRESULTFailure(const char* expr,\n                                            long hr);  // NOLINT\n\n#endif  // GTEST_OS_WINDOWS\n\n// Types of SetUpTestSuite() and TearDownTestSuite() functions.\nusing SetUpTestSuiteFunc = void (*)();\nusing TearDownTestSuiteFunc = void (*)();\n\nstruct CodeLocation {\n  CodeLocation(const std::string& a_file, int a_line)\n      : file(a_file), line(a_line) {}\n\n  std::string file;\n  int line;\n};\n\n//  Helper to identify which setup function for TestCase / TestSuite to call.\n//  Only one function is allowed, either TestCase or TestSute but not both.\n\n// Utility functions to help SuiteApiResolver\nusing SetUpTearDownSuiteFuncType = void (*)();\n\ninline SetUpTearDownSuiteFuncType GetNotDefaultOrNull(\n    SetUpTearDownSuiteFuncType a, SetUpTearDownSuiteFuncType def) {\n  return a == def ? nullptr : a;\n}\n\ntemplate <typename T>\n//  Note that SuiteApiResolver inherits from T because\n//  SetUpTestSuite()/TearDownTestSuite() could be protected. Ths way\n//  SuiteApiResolver can access them.\nstruct SuiteApiResolver : T {\n  // testing::Test is only forward declared at this point. So we make it a\n  // dependend class for the compiler to be OK with it.\n  using Test =\n      typename std::conditional<sizeof(T) != 0, ::testing::Test, void>::type;\n\n  static SetUpTearDownSuiteFuncType GetSetUpCaseOrSuite() {\n    SetUpTearDownSuiteFuncType test_case_fp =\n        GetNotDefaultOrNull(&T::SetUpTestCase, &Test::SetUpTestCase);\n    SetUpTearDownSuiteFuncType test_suite_fp =\n        GetNotDefaultOrNull(&T::SetUpTestSuite, &Test::SetUpTestSuite);\n\n    GTEST_CHECK_(!test_case_fp || !test_suite_fp)\n        << \"Test can not provide both SetUpTestSuite and SetUpTestCase, please \"\n           \"make sure there is only one present \";\n\n    return test_case_fp != nullptr ? test_case_fp : test_suite_fp;\n  }\n\n  static SetUpTearDownSuiteFuncType GetTearDownCaseOrSuite() {\n    SetUpTearDownSuiteFuncType test_case_fp =\n        GetNotDefaultOrNull(&T::TearDownTestCase, &Test::TearDownTestCase);\n    SetUpTearDownSuiteFuncType test_suite_fp =\n        GetNotDefaultOrNull(&T::TearDownTestSuite, &Test::TearDownTestSuite);\n\n    GTEST_CHECK_(!test_case_fp || !test_suite_fp)\n        << \"Test can not provide both TearDownTestSuite and TearDownTestCase,\"\n           \" please make sure there is only one present \";\n\n    return test_case_fp != nullptr ? test_case_fp : test_suite_fp;\n  }\n};\n\n// Creates a new TestInfo object and registers it with Google Test;\n// returns the created object.\n//\n// Arguments:\n//\n//   test_suite_name:   name of the test suite\n//   name:             name of the test\n//   type_param        the name of the test's type parameter, or NULL if\n//                     this is not a typed or a type-parameterized test.\n//   value_param       text representation of the test's value parameter,\n//                     or NULL if this is not a type-parameterized test.\n//   code_location:    code location where the test is defined\n//   fixture_class_id: ID of the test fixture class\n//   set_up_tc:        pointer to the function that sets up the test suite\n//   tear_down_tc:     pointer to the function that tears down the test suite\n//   factory:          pointer to the factory that creates a test object.\n//                     The newly created TestInfo instance will assume\n//                     ownership of the factory object.\nGTEST_API_ TestInfo* MakeAndRegisterTestInfo(\n    const char* test_suite_name, const char* name, const char* type_param,\n    const char* value_param, CodeLocation code_location,\n    TypeId fixture_class_id, SetUpTestSuiteFunc set_up_tc,\n    TearDownTestSuiteFunc tear_down_tc, TestFactoryBase* factory);\n\n// If *pstr starts with the given prefix, modifies *pstr to be right\n// past the prefix and returns true; otherwise leaves *pstr unchanged\n// and returns false.  None of pstr, *pstr, and prefix can be NULL.\nGTEST_API_ bool SkipPrefix(const char* prefix, const char** pstr);\n\n#if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P\n\nGTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \\\n/* class A needs to have dll-interface to be used by clients of class B */)\n\n// State of the definition of a type-parameterized test suite.\nclass GTEST_API_ TypedTestSuitePState {\n public:\n  TypedTestSuitePState() : registered_(false) {}\n\n  // Adds the given test name to defined_test_names_ and return true\n  // if the test suite hasn't been registered; otherwise aborts the\n  // program.\n  bool AddTestName(const char* file, int line, const char* case_name,\n                   const char* test_name) {\n    if (registered_) {\n      fprintf(stderr,\n              \"%s Test %s must be defined before \"\n              \"REGISTER_TYPED_TEST_SUITE_P(%s, ...).\\n\",\n              FormatFileLocation(file, line).c_str(), test_name, case_name);\n      fflush(stderr);\n      posix::Abort();\n    }\n    registered_tests_.insert(\n        ::std::make_pair(test_name, CodeLocation(file, line)));\n    return true;\n  }\n\n  bool TestExists(const std::string& test_name) const {\n    return registered_tests_.count(test_name) > 0;\n  }\n\n  const CodeLocation& GetCodeLocation(const std::string& test_name) const {\n    RegisteredTestsMap::const_iterator it = registered_tests_.find(test_name);\n    GTEST_CHECK_(it != registered_tests_.end());\n    return it->second;\n  }\n\n  // Verifies that registered_tests match the test names in\n  // defined_test_names_; returns registered_tests if successful, or\n  // aborts the program otherwise.\n  const char* VerifyRegisteredTestNames(\n      const char* file, int line, const char* registered_tests);\n\n private:\n  typedef ::std::map<std::string, CodeLocation> RegisteredTestsMap;\n\n  bool registered_;\n  RegisteredTestsMap registered_tests_;\n};\n\n//  Legacy API is deprecated but still available\n#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_\nusing TypedTestCasePState = TypedTestSuitePState;\n#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI_\n\nGTEST_DISABLE_MSC_WARNINGS_POP_()  //  4251\n\n// Skips to the first non-space char after the first comma in 'str';\n// returns NULL if no comma is found in 'str'.\ninline const char* SkipComma(const char* str) {\n  const char* comma = strchr(str, ',');\n  if (comma == nullptr) {\n    return nullptr;\n  }\n  while (IsSpace(*(++comma))) {}\n  return comma;\n}\n\n// Returns the prefix of 'str' before the first comma in it; returns\n// the entire string if it contains no comma.\ninline std::string GetPrefixUntilComma(const char* str) {\n  const char* comma = strchr(str, ',');\n  return comma == nullptr ? str : std::string(str, comma);\n}\n\n// Splits a given string on a given delimiter, populating a given\n// vector with the fields.\nvoid SplitString(const ::std::string& str, char delimiter,\n                 ::std::vector< ::std::string>* dest);\n\n// The default argument to the template below for the case when the user does\n// not provide a name generator.\nstruct DefaultNameGenerator {\n  template <typename T>\n  static std::string GetName(int i) {\n    return StreamableToString(i);\n  }\n};\n\ntemplate <typename Provided = DefaultNameGenerator>\nstruct NameGeneratorSelector {\n  typedef Provided type;\n};\n\ntemplate <typename NameGenerator>\nvoid GenerateNamesRecursively(Types0, std::vector<std::string>*, int) {}\n\ntemplate <typename NameGenerator, typename Types>\nvoid GenerateNamesRecursively(Types, std::vector<std::string>* result, int i) {\n  result->push_back(NameGenerator::template GetName<typename Types::Head>(i));\n  GenerateNamesRecursively<NameGenerator>(typename Types::Tail(), result,\n                                          i + 1);\n}\n\ntemplate <typename NameGenerator, typename Types>\nstd::vector<std::string> GenerateNames() {\n  std::vector<std::string> result;\n  GenerateNamesRecursively<NameGenerator>(Types(), &result, 0);\n  return result;\n}\n\n// TypeParameterizedTest<Fixture, TestSel, Types>::Register()\n// registers a list of type-parameterized tests with Google Test.  The\n// return value is insignificant - we just need to return something\n// such that we can call this function in a namespace scope.\n//\n// Implementation note: The GTEST_TEMPLATE_ macro declares a template\n// template parameter.  It's defined in gtest-type-util.h.\ntemplate <GTEST_TEMPLATE_ Fixture, class TestSel, typename Types>\nclass TypeParameterizedTest {\n public:\n  // 'index' is the index of the test in the type list 'Types'\n  // specified in INSTANTIATE_TYPED_TEST_SUITE_P(Prefix, TestSuite,\n  // Types).  Valid values for 'index' are [0, N - 1] where N is the\n  // length of Types.\n  static bool Register(const char* prefix, const CodeLocation& code_location,\n                       const char* case_name, const char* test_names, int index,\n                       const std::vector<std::string>& type_names =\n                           GenerateNames<DefaultNameGenerator, Types>()) {\n    typedef typename Types::Head Type;\n    typedef Fixture<Type> FixtureClass;\n    typedef typename GTEST_BIND_(TestSel, Type) TestClass;\n\n    // First, registers the first type-parameterized test in the type\n    // list.\n    MakeAndRegisterTestInfo(\n        (std::string(prefix) + (prefix[0] == '\\0' ? \"\" : \"/\") + case_name +\n         \"/\" + type_names[index])\n            .c_str(),\n        StripTrailingSpaces(GetPrefixUntilComma(test_names)).c_str(),\n        GetTypeName<Type>().c_str(),\n        nullptr,  // No value parameter.\n        code_location, GetTypeId<FixtureClass>(),\n        SuiteApiResolver<TestClass>::GetSetUpCaseOrSuite(),\n        SuiteApiResolver<TestClass>::GetTearDownCaseOrSuite(),\n        new TestFactoryImpl<TestClass>);\n\n    // Next, recurses (at compile time) with the tail of the type list.\n    return TypeParameterizedTest<Fixture, TestSel,\n                                 typename Types::Tail>::Register(prefix,\n                                                                 code_location,\n                                                                 case_name,\n                                                                 test_names,\n                                                                 index + 1,\n                                                                 type_names);\n  }\n};\n\n// The base case for the compile time recursion.\ntemplate <GTEST_TEMPLATE_ Fixture, class TestSel>\nclass TypeParameterizedTest<Fixture, TestSel, Types0> {\n public:\n  static bool Register(const char* /*prefix*/, const CodeLocation&,\n                       const char* /*case_name*/, const char* /*test_names*/,\n                       int /*index*/,\n                       const std::vector<std::string>& =\n                           std::vector<std::string>() /*type_names*/) {\n    return true;\n  }\n};\n\n// TypeParameterizedTestSuite<Fixture, Tests, Types>::Register()\n// registers *all combinations* of 'Tests' and 'Types' with Google\n// Test.  The return value is insignificant - we just need to return\n// something such that we can call this function in a namespace scope.\ntemplate <GTEST_TEMPLATE_ Fixture, typename Tests, typename Types>\nclass TypeParameterizedTestSuite {\n public:\n  static bool Register(const char* prefix, CodeLocation code_location,\n                       const TypedTestSuitePState* state, const char* case_name,\n                       const char* test_names,\n                       const std::vector<std::string>& type_names =\n                           GenerateNames<DefaultNameGenerator, Types>()) {\n    std::string test_name = StripTrailingSpaces(\n        GetPrefixUntilComma(test_names));\n    if (!state->TestExists(test_name)) {\n      fprintf(stderr, \"Failed to get code location for test %s.%s at %s.\",\n              case_name, test_name.c_str(),\n              FormatFileLocation(code_location.file.c_str(),\n                                 code_location.line).c_str());\n      fflush(stderr);\n      posix::Abort();\n    }\n    const CodeLocation& test_location = state->GetCodeLocation(test_name);\n\n    typedef typename Tests::Head Head;\n\n    // First, register the first test in 'Test' for each type in 'Types'.\n    TypeParameterizedTest<Fixture, Head, Types>::Register(\n        prefix, test_location, case_name, test_names, 0, type_names);\n\n    // Next, recurses (at compile time) with the tail of the test list.\n    return TypeParameterizedTestSuite<Fixture, typename Tests::Tail,\n                                      Types>::Register(prefix, code_location,\n                                                       state, case_name,\n                                                       SkipComma(test_names),\n                                                       type_names);\n  }\n};\n\n// The base case for the compile time recursion.\ntemplate <GTEST_TEMPLATE_ Fixture, typename Types>\nclass TypeParameterizedTestSuite<Fixture, Templates0, Types> {\n public:\n  static bool Register(const char* /*prefix*/, const CodeLocation&,\n                       const TypedTestSuitePState* /*state*/,\n                       const char* /*case_name*/, const char* /*test_names*/,\n                       const std::vector<std::string>& =\n                           std::vector<std::string>() /*type_names*/) {\n    return true;\n  }\n};\n\n#endif  // GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P\n\n// Returns the current OS stack trace as an std::string.\n//\n// The maximum number of stack frames to be included is specified by\n// the gtest_stack_trace_depth flag.  The skip_count parameter\n// specifies the number of top frames to be skipped, which doesn't\n// count against the number of frames to be included.\n//\n// For example, if Foo() calls Bar(), which in turn calls\n// GetCurrentOsStackTraceExceptTop(..., 1), Foo() will be included in\n// the trace but Bar() and GetCurrentOsStackTraceExceptTop() won't.\nGTEST_API_ std::string GetCurrentOsStackTraceExceptTop(\n    UnitTest* unit_test, int skip_count);\n\n// Helpers for suppressing warnings on unreachable code or constant\n// condition.\n\n// Always returns true.\nGTEST_API_ bool AlwaysTrue();\n\n// Always returns false.\ninline bool AlwaysFalse() { return !AlwaysTrue(); }\n\n// Helper for suppressing false warning from Clang on a const char*\n// variable declared in a conditional expression always being NULL in\n// the else branch.\nstruct GTEST_API_ ConstCharPtr {\n  ConstCharPtr(const char* str) : value(str) {}\n  operator bool() const { return true; }\n  const char* value;\n};\n\n// A simple Linear Congruential Generator for generating random\n// numbers with a uniform distribution.  Unlike rand() and srand(), it\n// doesn't use global state (and therefore can't interfere with user\n// code).  Unlike rand_r(), it's portable.  An LCG isn't very random,\n// but it's good enough for our purposes.\nclass GTEST_API_ Random {\n public:\n  static const UInt32 kMaxRange = 1u << 31;\n\n  explicit Random(UInt32 seed) : state_(seed) {}\n\n  void Reseed(UInt32 seed) { state_ = seed; }\n\n  // Generates a random number from [0, range).  Crashes if 'range' is\n  // 0 or greater than kMaxRange.\n  UInt32 Generate(UInt32 range);\n\n private:\n  UInt32 state_;\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(Random);\n};\n\n// Defining a variable of type CompileAssertTypesEqual<T1, T2> will cause a\n// compiler error iff T1 and T2 are different types.\ntemplate <typename T1, typename T2>\nstruct CompileAssertTypesEqual;\n\ntemplate <typename T>\nstruct CompileAssertTypesEqual<T, T> {\n};\n\n// Removes the reference from a type if it is a reference type,\n// otherwise leaves it unchanged.  This is the same as\n// tr1::remove_reference, which is not widely available yet.\ntemplate <typename T>\nstruct RemoveReference { typedef T type; };  // NOLINT\ntemplate <typename T>\nstruct RemoveReference<T&> { typedef T type; };  // NOLINT\n\n// A handy wrapper around RemoveReference that works when the argument\n// T depends on template parameters.\n#define GTEST_REMOVE_REFERENCE_(T) \\\n    typename ::testing::internal::RemoveReference<T>::type\n\n// Removes const from a type if it is a const type, otherwise leaves\n// it unchanged.  This is the same as tr1::remove_const, which is not\n// widely available yet.\ntemplate <typename T>\nstruct RemoveConst { typedef T type; };  // NOLINT\ntemplate <typename T>\nstruct RemoveConst<const T> { typedef T type; };  // NOLINT\n\n// MSVC 8.0, Sun C++, and IBM XL C++ have a bug which causes the above\n// definition to fail to remove the const in 'const int[3]' and 'const\n// char[3][4]'.  The following specialization works around the bug.\ntemplate <typename T, size_t N>\nstruct RemoveConst<const T[N]> {\n  typedef typename RemoveConst<T>::type type[N];\n};\n\n// A handy wrapper around RemoveConst that works when the argument\n// T depends on template parameters.\n#define GTEST_REMOVE_CONST_(T) \\\n    typename ::testing::internal::RemoveConst<T>::type\n\n// Turns const U&, U&, const U, and U all into U.\n#define GTEST_REMOVE_REFERENCE_AND_CONST_(T) \\\n    GTEST_REMOVE_CONST_(GTEST_REMOVE_REFERENCE_(T))\n\n// IsAProtocolMessage<T>::value is a compile-time bool constant that's\n// true iff T is type ProtocolMessage, proto2::Message, or a subclass\n// of those.\ntemplate <typename T>\nstruct IsAProtocolMessage\n    : public bool_constant<\n  std::is_convertible<const T*, const ::ProtocolMessage*>::value ||\n  std::is_convertible<const T*, const ::proto2::Message*>::value> {\n};\n\n// When the compiler sees expression IsContainerTest<C>(0), if C is an\n// STL-style container class, the first overload of IsContainerTest\n// will be viable (since both C::iterator* and C::const_iterator* are\n// valid types and NULL can be implicitly converted to them).  It will\n// be picked over the second overload as 'int' is a perfect match for\n// the type of argument 0.  If C::iterator or C::const_iterator is not\n// a valid type, the first overload is not viable, and the second\n// overload will be picked.  Therefore, we can determine whether C is\n// a container class by checking the type of IsContainerTest<C>(0).\n// The value of the expression is insignificant.\n//\n// In C++11 mode we check the existence of a const_iterator and that an\n// iterator is properly implemented for the container.\n//\n// For pre-C++11 that we look for both C::iterator and C::const_iterator.\n// The reason is that C++ injects the name of a class as a member of the\n// class itself (e.g. you can refer to class iterator as either\n// 'iterator' or 'iterator::iterator').  If we look for C::iterator\n// only, for example, we would mistakenly think that a class named\n// iterator is an STL container.\n//\n// Also note that the simpler approach of overloading\n// IsContainerTest(typename C::const_iterator*) and\n// IsContainerTest(...) doesn't work with Visual Age C++ and Sun C++.\ntypedef int IsContainer;\ntemplate <class C,\n          class Iterator = decltype(::std::declval<const C&>().begin()),\n          class = decltype(::std::declval<const C&>().end()),\n          class = decltype(++::std::declval<Iterator&>()),\n          class = decltype(*::std::declval<Iterator>()),\n          class = typename C::const_iterator>\nIsContainer IsContainerTest(int /* dummy */) {\n  return 0;\n}\n\ntypedef char IsNotContainer;\ntemplate <class C>\nIsNotContainer IsContainerTest(long /* dummy */) { return '\\0'; }\n\n// Trait to detect whether a type T is a hash table.\n// The heuristic used is that the type contains an inner type `hasher` and does\n// not contain an inner type `reverse_iterator`.\n// If the container is iterable in reverse, then order might actually matter.\ntemplate <typename T>\nstruct IsHashTable {\n private:\n  template <typename U>\n  static char test(typename U::hasher*, typename U::reverse_iterator*);\n  template <typename U>\n  static int test(typename U::hasher*, ...);\n  template <typename U>\n  static char test(...);\n\n public:\n  static const bool value = sizeof(test<T>(nullptr, nullptr)) == sizeof(int);\n};\n\ntemplate <typename T>\nconst bool IsHashTable<T>::value;\n\ntemplate <typename C,\n          bool = sizeof(IsContainerTest<C>(0)) == sizeof(IsContainer)>\nstruct IsRecursiveContainerImpl;\n\ntemplate <typename C>\nstruct IsRecursiveContainerImpl<C, false> : public false_type {};\n\n// Since the IsRecursiveContainerImpl depends on the IsContainerTest we need to\n// obey the same inconsistencies as the IsContainerTest, namely check if\n// something is a container is relying on only const_iterator in C++11 and\n// is relying on both const_iterator and iterator otherwise\ntemplate <typename C>\nstruct IsRecursiveContainerImpl<C, true> {\n  using value_type = decltype(*std::declval<typename C::const_iterator>());\n  using type =\n      is_same<typename std::remove_const<\n                  typename std::remove_reference<value_type>::type>::type,\n              C>;\n};\n\n// IsRecursiveContainer<Type> is a unary compile-time predicate that\n// evaluates whether C is a recursive container type. A recursive container\n// type is a container type whose value_type is equal to the container type\n// itself. An example for a recursive container type is\n// boost::filesystem::path, whose iterator has a value_type that is equal to\n// boost::filesystem::path.\ntemplate <typename C>\nstruct IsRecursiveContainer : public IsRecursiveContainerImpl<C>::type {};\n\n// EnableIf<condition>::type is void when 'Cond' is true, and\n// undefined when 'Cond' is false.  To use SFINAE to make a function\n// overload only apply when a particular expression is true, add\n// \"typename EnableIf<expression>::type* = 0\" as the last parameter.\ntemplate<bool> struct EnableIf;\ntemplate<> struct EnableIf<true> { typedef void type; };  // NOLINT\n\n// Utilities for native arrays.\n\n// ArrayEq() compares two k-dimensional native arrays using the\n// elements' operator==, where k can be any integer >= 0.  When k is\n// 0, ArrayEq() degenerates into comparing a single pair of values.\n\ntemplate <typename T, typename U>\nbool ArrayEq(const T* lhs, size_t size, const U* rhs);\n\n// This generic version is used when k is 0.\ntemplate <typename T, typename U>\ninline bool ArrayEq(const T& lhs, const U& rhs) { return lhs == rhs; }\n\n// This overload is used when k >= 1.\ntemplate <typename T, typename U, size_t N>\ninline bool ArrayEq(const T(&lhs)[N], const U(&rhs)[N]) {\n  return internal::ArrayEq(lhs, N, rhs);\n}\n\n// This helper reduces code bloat.  If we instead put its logic inside\n// the previous ArrayEq() function, arrays with different sizes would\n// lead to different copies of the template code.\ntemplate <typename T, typename U>\nbool ArrayEq(const T* lhs, size_t size, const U* rhs) {\n  for (size_t i = 0; i != size; i++) {\n    if (!internal::ArrayEq(lhs[i], rhs[i]))\n      return false;\n  }\n  return true;\n}\n\n// Finds the first element in the iterator range [begin, end) that\n// equals elem.  Element may be a native array type itself.\ntemplate <typename Iter, typename Element>\nIter ArrayAwareFind(Iter begin, Iter end, const Element& elem) {\n  for (Iter it = begin; it != end; ++it) {\n    if (internal::ArrayEq(*it, elem))\n      return it;\n  }\n  return end;\n}\n\n// CopyArray() copies a k-dimensional native array using the elements'\n// operator=, where k can be any integer >= 0.  When k is 0,\n// CopyArray() degenerates into copying a single value.\n\ntemplate <typename T, typename U>\nvoid CopyArray(const T* from, size_t size, U* to);\n\n// This generic version is used when k is 0.\ntemplate <typename T, typename U>\ninline void CopyArray(const T& from, U* to) { *to = from; }\n\n// This overload is used when k >= 1.\ntemplate <typename T, typename U, size_t N>\ninline void CopyArray(const T(&from)[N], U(*to)[N]) {\n  internal::CopyArray(from, N, *to);\n}\n\n// This helper reduces code bloat.  If we instead put its logic inside\n// the previous CopyArray() function, arrays with different sizes\n// would lead to different copies of the template code.\ntemplate <typename T, typename U>\nvoid CopyArray(const T* from, size_t size, U* to) {\n  for (size_t i = 0; i != size; i++) {\n    internal::CopyArray(from[i], to + i);\n  }\n}\n\n// The relation between an NativeArray object (see below) and the\n// native array it represents.\n// We use 2 different structs to allow non-copyable types to be used, as long\n// as RelationToSourceReference() is passed.\nstruct RelationToSourceReference {};\nstruct RelationToSourceCopy {};\n\n// Adapts a native array to a read-only STL-style container.  Instead\n// of the complete STL container concept, this adaptor only implements\n// members useful for Google Mock's container matchers.  New members\n// should be added as needed.  To simplify the implementation, we only\n// support Element being a raw type (i.e. having no top-level const or\n// reference modifier).  It's the client's responsibility to satisfy\n// this requirement.  Element can be an array type itself (hence\n// multi-dimensional arrays are supported).\ntemplate <typename Element>\nclass NativeArray {\n public:\n  // STL-style container typedefs.\n  typedef Element value_type;\n  typedef Element* iterator;\n  typedef const Element* const_iterator;\n\n  // Constructs from a native array. References the source.\n  NativeArray(const Element* array, size_t count, RelationToSourceReference) {\n    InitRef(array, count);\n  }\n\n  // Constructs from a native array. Copies the source.\n  NativeArray(const Element* array, size_t count, RelationToSourceCopy) {\n    InitCopy(array, count);\n  }\n\n  // Copy constructor.\n  NativeArray(const NativeArray& rhs) {\n    (this->*rhs.clone_)(rhs.array_, rhs.size_);\n  }\n\n  ~NativeArray() {\n    if (clone_ != &NativeArray::InitRef)\n      delete[] array_;\n  }\n\n  // STL-style container methods.\n  size_t size() const { return size_; }\n  const_iterator begin() const { return array_; }\n  const_iterator end() const { return array_ + size_; }\n  bool operator==(const NativeArray& rhs) const {\n    return size() == rhs.size() &&\n        ArrayEq(begin(), size(), rhs.begin());\n  }\n\n private:\n  enum {\n    kCheckTypeIsNotConstOrAReference = StaticAssertTypeEqHelper<\n        Element, GTEST_REMOVE_REFERENCE_AND_CONST_(Element)>::value\n  };\n\n  // Initializes this object with a copy of the input.\n  void InitCopy(const Element* array, size_t a_size) {\n    Element* const copy = new Element[a_size];\n    CopyArray(array, a_size, copy);\n    array_ = copy;\n    size_ = a_size;\n    clone_ = &NativeArray::InitCopy;\n  }\n\n  // Initializes this object with a reference of the input.\n  void InitRef(const Element* array, size_t a_size) {\n    array_ = array;\n    size_ = a_size;\n    clone_ = &NativeArray::InitRef;\n  }\n\n  const Element* array_;\n  size_t size_;\n  void (NativeArray::*clone_)(const Element*, size_t);\n\n  GTEST_DISALLOW_ASSIGN_(NativeArray);\n};\n\n// Backport of std::index_sequence.\ntemplate <size_t... Is>\nstruct IndexSequence {\n  using type = IndexSequence;\n};\n\n// Double the IndexSequence, and one if plus_one is true.\ntemplate <bool plus_one, typename T, size_t sizeofT>\nstruct DoubleSequence;\ntemplate <size_t... I, size_t sizeofT>\nstruct DoubleSequence<true, IndexSequence<I...>, sizeofT> {\n  using type = IndexSequence<I..., (sizeofT + I)..., 2 * sizeofT>;\n};\ntemplate <size_t... I, size_t sizeofT>\nstruct DoubleSequence<false, IndexSequence<I...>, sizeofT> {\n  using type = IndexSequence<I..., (sizeofT + I)...>;\n};\n\n// Backport of std::make_index_sequence.\n// It uses O(ln(N)) instantiation depth.\ntemplate <size_t N>\nstruct MakeIndexSequence\n    : DoubleSequence<N % 2 == 1, typename MakeIndexSequence<N / 2>::type,\n                     N / 2>::type {};\n\ntemplate <>\nstruct MakeIndexSequence<0> : IndexSequence<> {};\n\n// FIXME: This implementation of ElemFromList is O(1) in instantiation depth,\n// but it is O(N^2) in total instantiations. Not sure if this is the best\n// tradeoff, as it will make it somewhat slow to compile.\ntemplate <typename T, size_t, size_t>\nstruct ElemFromListImpl {};\n\ntemplate <typename T, size_t I>\nstruct ElemFromListImpl<T, I, I> {\n  using type = T;\n};\n\n// Get the Nth element from T...\n// It uses O(1) instantiation depth.\ntemplate <size_t N, typename I, typename... T>\nstruct ElemFromList;\n\ntemplate <size_t N, size_t... I, typename... T>\nstruct ElemFromList<N, IndexSequence<I...>, T...>\n    : ElemFromListImpl<T, N, I>... {};\n\ntemplate <typename... T>\nclass FlatTuple;\n\ntemplate <typename Derived, size_t I>\nstruct FlatTupleElemBase;\n\ntemplate <typename... T, size_t I>\nstruct FlatTupleElemBase<FlatTuple<T...>, I> {\n  using value_type =\n      typename ElemFromList<I, typename MakeIndexSequence<sizeof...(T)>::type,\n                            T...>::type;\n  FlatTupleElemBase() = default;\n  explicit FlatTupleElemBase(value_type t) : value(std::move(t)) {}\n  value_type value;\n};\n\ntemplate <typename Derived, typename Idx>\nstruct FlatTupleBase;\n\ntemplate <size_t... Idx, typename... T>\nstruct FlatTupleBase<FlatTuple<T...>, IndexSequence<Idx...>>\n    : FlatTupleElemBase<FlatTuple<T...>, Idx>... {\n  using Indices = IndexSequence<Idx...>;\n  FlatTupleBase() = default;\n  explicit FlatTupleBase(T... t)\n      : FlatTupleElemBase<FlatTuple<T...>, Idx>(std::move(t))... {}\n};\n\n// Analog to std::tuple but with different tradeoffs.\n// This class minimizes the template instantiation depth, thus allowing more\n// elements that std::tuple would. std::tuple has been seen to require an\n// instantiation depth of more than 10x the number of elements in some\n// implementations.\n// FlatTuple and ElemFromList are not recursive and have a fixed depth\n// regardless of T...\n// MakeIndexSequence, on the other hand, it is recursive but with an\n// instantiation depth of O(ln(N)).\ntemplate <typename... T>\nclass FlatTuple\n    : private FlatTupleBase<FlatTuple<T...>,\n                            typename MakeIndexSequence<sizeof...(T)>::type> {\n  using Indices = typename FlatTuple::FlatTupleBase::Indices;\n\n public:\n  FlatTuple() = default;\n  explicit FlatTuple(T... t) : FlatTuple::FlatTupleBase(std::move(t)...) {}\n\n  template <size_t I>\n  const typename ElemFromList<I, Indices, T...>::type& Get() const {\n    return static_cast<const FlatTupleElemBase<FlatTuple, I>*>(this)->value;\n  }\n\n  template <size_t I>\n  typename ElemFromList<I, Indices, T...>::type& Get() {\n    return static_cast<FlatTupleElemBase<FlatTuple, I>*>(this)->value;\n  }\n};\n\n// Utility functions to be called with static_assert to induce deprecation\n// warnings.\nGTEST_INTERNAL_DEPRECATED(\n    \"INSTANTIATE_TEST_CASE_P is deprecated, please use \"\n    \"INSTANTIATE_TEST_SUITE_P\")\nconstexpr bool InstantiateTestCase_P_IsDeprecated() { return true; }\n\nGTEST_INTERNAL_DEPRECATED(\n    \"TYPED_TEST_CASE_P is deprecated, please use \"\n    \"TYPED_TEST_SUITE_P\")\nconstexpr bool TypedTestCase_P_IsDeprecated() { return true; }\n\nGTEST_INTERNAL_DEPRECATED(\n    \"TYPED_TEST_CASE is deprecated, please use \"\n    \"TYPED_TEST_SUITE\")\nconstexpr bool TypedTestCaseIsDeprecated() { return true; }\n\nGTEST_INTERNAL_DEPRECATED(\n    \"REGISTER_TYPED_TEST_CASE_P is deprecated, please use \"\n    \"REGISTER_TYPED_TEST_SUITE_P\")\nconstexpr bool RegisterTypedTestCase_P_IsDeprecated() { return true; }\n\nGTEST_INTERNAL_DEPRECATED(\n    \"INSTANTIATE_TYPED_TEST_CASE_P is deprecated, please use \"\n    \"INSTANTIATE_TYPED_TEST_SUITE_P\")\nconstexpr bool InstantiateTypedTestCase_P_IsDeprecated() { return true; }\n\n}  // namespace internal\n}  // namespace testing\n\n#define GTEST_MESSAGE_AT_(file, line, message, result_type) \\\n  ::testing::internal::AssertHelper(result_type, file, line, message) \\\n    = ::testing::Message()\n\n#define GTEST_MESSAGE_(message, result_type) \\\n  GTEST_MESSAGE_AT_(__FILE__, __LINE__, message, result_type)\n\n#define GTEST_FATAL_FAILURE_(message) \\\n  return GTEST_MESSAGE_(message, ::testing::TestPartResult::kFatalFailure)\n\n#define GTEST_NONFATAL_FAILURE_(message) \\\n  GTEST_MESSAGE_(message, ::testing::TestPartResult::kNonFatalFailure)\n\n#define GTEST_SUCCESS_(message) \\\n  GTEST_MESSAGE_(message, ::testing::TestPartResult::kSuccess)\n\n#define GTEST_SKIP_(message) \\\n  return GTEST_MESSAGE_(message, ::testing::TestPartResult::kSkip)\n\n// Suppress MSVC warning 4072 (unreachable code) for the code following\n// statement if it returns or throws (or doesn't return or throw in some\n// situations).\n#define GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement) \\\n  if (::testing::internal::AlwaysTrue()) { statement; }\n\n#define GTEST_TEST_THROW_(statement, expected_exception, fail) \\\n  GTEST_AMBIGUOUS_ELSE_BLOCKER_ \\\n  if (::testing::internal::ConstCharPtr gtest_msg = \"\") { \\\n    bool gtest_caught_expected = false; \\\n    try { \\\n      GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \\\n    } \\\n    catch (expected_exception const&) { \\\n      gtest_caught_expected = true; \\\n    } \\\n    catch (...) { \\\n      gtest_msg.value = \\\n          \"Expected: \" #statement \" throws an exception of type \" \\\n          #expected_exception \".\\n  Actual: it throws a different type.\"; \\\n      goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__); \\\n    } \\\n    if (!gtest_caught_expected) { \\\n      gtest_msg.value = \\\n          \"Expected: \" #statement \" throws an exception of type \" \\\n          #expected_exception \".\\n  Actual: it throws nothing.\"; \\\n      goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__); \\\n    } \\\n  } else \\\n    GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__): \\\n      fail(gtest_msg.value)\n\n#define GTEST_TEST_NO_THROW_(statement, fail) \\\n  GTEST_AMBIGUOUS_ELSE_BLOCKER_ \\\n  if (::testing::internal::AlwaysTrue()) { \\\n    try { \\\n      GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \\\n    } \\\n    catch (...) { \\\n      goto GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__); \\\n    } \\\n  } else \\\n    GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__): \\\n      fail(\"Expected: \" #statement \" doesn't throw an exception.\\n\" \\\n           \"  Actual: it throws.\")\n\n#define GTEST_TEST_ANY_THROW_(statement, fail) \\\n  GTEST_AMBIGUOUS_ELSE_BLOCKER_ \\\n  if (::testing::internal::AlwaysTrue()) { \\\n    bool gtest_caught_any = false; \\\n    try { \\\n      GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \\\n    } \\\n    catch (...) { \\\n      gtest_caught_any = true; \\\n    } \\\n    if (!gtest_caught_any) { \\\n      goto GTEST_CONCAT_TOKEN_(gtest_label_testanythrow_, __LINE__); \\\n    } \\\n  } else \\\n    GTEST_CONCAT_TOKEN_(gtest_label_testanythrow_, __LINE__): \\\n      fail(\"Expected: \" #statement \" throws an exception.\\n\" \\\n           \"  Actual: it doesn't.\")\n\n\n// Implements Boolean test assertions such as EXPECT_TRUE. expression can be\n// either a boolean expression or an AssertionResult. text is a textual\n// represenation of expression as it was passed into the EXPECT_TRUE.\n#define GTEST_TEST_BOOLEAN_(expression, text, actual, expected, fail) \\\n  GTEST_AMBIGUOUS_ELSE_BLOCKER_ \\\n  if (const ::testing::AssertionResult gtest_ar_ = \\\n      ::testing::AssertionResult(expression)) \\\n    ; \\\n  else \\\n    fail(::testing::internal::GetBoolAssertionFailureMessage(\\\n        gtest_ar_, text, #actual, #expected).c_str())\n\n#define GTEST_TEST_NO_FATAL_FAILURE_(statement, fail) \\\n  GTEST_AMBIGUOUS_ELSE_BLOCKER_ \\\n  if (::testing::internal::AlwaysTrue()) { \\\n    ::testing::internal::HasNewFatalFailureHelper gtest_fatal_failure_checker; \\\n    GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \\\n    if (gtest_fatal_failure_checker.has_new_fatal_failure()) { \\\n      goto GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__); \\\n    } \\\n  } else \\\n    GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__): \\\n      fail(\"Expected: \" #statement \" doesn't generate new fatal \" \\\n           \"failures in the current thread.\\n\" \\\n           \"  Actual: it does.\")\n\n// Expands to the name of the class that implements the given test.\n#define GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) \\\n  test_suite_name##_##test_name##_Test\n\n// Helper macro for defining tests.\n#define GTEST_TEST_(test_suite_name, test_name, parent_class, parent_id)      \\\n  class GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)                    \\\n      : public parent_class {                                                 \\\n   public:                                                                    \\\n    GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)() {}                   \\\n                                                                              \\\n   private:                                                                   \\\n    virtual void TestBody();                                                  \\\n    static ::testing::TestInfo* const test_info_ GTEST_ATTRIBUTE_UNUSED_;     \\\n    GTEST_DISALLOW_COPY_AND_ASSIGN_(GTEST_TEST_CLASS_NAME_(test_suite_name,   \\\n                                                           test_name));       \\\n  };                                                                          \\\n                                                                              \\\n  ::testing::TestInfo* const GTEST_TEST_CLASS_NAME_(test_suite_name,          \\\n                                                    test_name)::test_info_ =  \\\n      ::testing::internal::MakeAndRegisterTestInfo(                           \\\n          #test_suite_name, #test_name, nullptr, nullptr,                     \\\n          ::testing::internal::CodeLocation(__FILE__, __LINE__), (parent_id), \\\n          ::testing::internal::SuiteApiResolver<                              \\\n              parent_class>::GetSetUpCaseOrSuite(),                           \\\n          ::testing::internal::SuiteApiResolver<                              \\\n              parent_class>::GetTearDownCaseOrSuite(),                        \\\n          new ::testing::internal::TestFactoryImpl<GTEST_TEST_CLASS_NAME_(    \\\n              test_suite_name, test_name)>);                                  \\\n  void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::TestBody()\n\n#endif  // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_\n// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n//\n// The Google C++ Testing and Mocking Framework (Google Test)\n//\n// This header file defines the public API for death tests.  It is\n// #included by gtest.h so a user doesn't need to include this\n// directly.\n// GOOGLETEST_CM0001 DO NOT DELETE\n\n#ifndef GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_\n#define GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_\n\n// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// The Google C++ Testing and Mocking Framework (Google Test)\n//\n// This header file defines internal utilities needed for implementing\n// death tests.  They are subject to change without notice.\n// GOOGLETEST_CM0001 DO NOT DELETE\n\n#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_\n#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_\n\n// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n// The Google C++ Testing and Mocking Framework (Google Test)\n//\n// This file implements just enough of the matcher interface to allow\n// EXPECT_DEATH and friends to accept a matcher argument.\n\n// IWYU pragma: private, include \"testing/base/public/gunit.h\"\n// IWYU pragma: friend third_party/googletest/googlemock/.*\n// IWYU pragma: friend third_party/googletest/googletest/.*\n\n#ifndef GTEST_INCLUDE_GTEST_GTEST_MATCHERS_H_\n#define GTEST_INCLUDE_GTEST_GTEST_MATCHERS_H_\n\n#include <memory>\n#include <ostream>\n#include <string>\n\n// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n// Google Test - The Google C++ Testing and Mocking Framework\n//\n// This file implements a universal value printer that can print a\n// value of any type T:\n//\n//   void ::testing::internal::UniversalPrinter<T>::Print(value, ostream_ptr);\n//\n// A user can teach this function how to print a class type T by\n// defining either operator<<() or PrintTo() in the namespace that\n// defines T.  More specifically, the FIRST defined function in the\n// following list will be used (assuming T is defined in namespace\n// foo):\n//\n//   1. foo::PrintTo(const T&, ostream*)\n//   2. operator<<(ostream&, const T&) defined in either foo or the\n//      global namespace.\n//\n// However if T is an STL-style container then it is printed element-wise\n// unless foo::PrintTo(const T&, ostream*) is defined. Note that\n// operator<<() is ignored for container types.\n//\n// If none of the above is defined, it will print the debug string of\n// the value if it is a protocol buffer, or print the raw bytes in the\n// value otherwise.\n//\n// To aid debugging: when T is a reference type, the address of the\n// value is also printed; when T is a (const) char pointer, both the\n// pointer value and the NUL-terminated string it points to are\n// printed.\n//\n// We also provide some convenient wrappers:\n//\n//   // Prints a value to a string.  For a (const or not) char\n//   // pointer, the NUL-terminated string (but not the pointer) is\n//   // printed.\n//   std::string ::testing::PrintToString(const T& value);\n//\n//   // Prints a value tersely: for a reference type, the referenced\n//   // value (but not the address) is printed; for a (const or not) char\n//   // pointer, the NUL-terminated string (but not the pointer) is\n//   // printed.\n//   void ::testing::internal::UniversalTersePrint(const T& value, ostream*);\n//\n//   // Prints value using the type inferred by the compiler.  The difference\n//   // from UniversalTersePrint() is that this function prints both the\n//   // pointer and the NUL-terminated string for a (const or not) char pointer.\n//   void ::testing::internal::UniversalPrint(const T& value, ostream*);\n//\n//   // Prints the fields of a tuple tersely to a string vector, one\n//   // element for each field. Tuple support must be enabled in\n//   // gtest-port.h.\n//   std::vector<string> UniversalTersePrintTupleFieldsToStrings(\n//       const Tuple& value);\n//\n// Known limitation:\n//\n// The print primitives print the elements of an STL-style container\n// using the compiler-inferred type of *iter where iter is a\n// const_iterator of the container.  When const_iterator is an input\n// iterator but not a forward iterator, this inferred type may not\n// match value_type, and the print output may be incorrect.  In\n// practice, this is rarely a problem as for most containers\n// const_iterator is a forward iterator.  We'll fix this if there's an\n// actual need for it.  Note that this fix cannot rely on value_type\n// being defined as many user-defined container types don't have\n// value_type.\n\n// GOOGLETEST_CM0001 DO NOT DELETE\n\n#ifndef GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_\n#define GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_\n\n#include <functional>\n#include <ostream>  // NOLINT\n#include <sstream>\n#include <string>\n#include <tuple>\n#include <type_traits>\n#include <utility>\n#include <vector>\n\n#if GTEST_HAS_ABSL\n#include \"absl/strings/string_view.h\"\n#include \"absl/types/optional.h\"\n#include \"absl/types/variant.h\"\n#endif  // GTEST_HAS_ABSL\n\nnamespace testing {\n\n// Definitions in the 'internal' and 'internal2' name spaces are\n// subject to change without notice.  DO NOT USE THEM IN USER CODE!\nnamespace internal2 {\n\n// Prints the given number of bytes in the given object to the given\n// ostream.\nGTEST_API_ void PrintBytesInObjectTo(const unsigned char* obj_bytes,\n                                     size_t count,\n                                     ::std::ostream* os);\n\n// For selecting which printer to use when a given type has neither <<\n// nor PrintTo().\nenum TypeKind {\n  kProtobuf,              // a protobuf type\n  kConvertibleToInteger,  // a type implicitly convertible to BiggestInt\n                          // (e.g. a named or unnamed enum type)\n#if GTEST_HAS_ABSL\n  kConvertibleToStringView,  // a type implicitly convertible to\n                             // absl::string_view\n#endif\n  kOtherType  // anything else\n};\n\n// TypeWithoutFormatter<T, kTypeKind>::PrintValue(value, os) is called\n// by the universal printer to print a value of type T when neither\n// operator<< nor PrintTo() is defined for T, where kTypeKind is the\n// \"kind\" of T as defined by enum TypeKind.\ntemplate <typename T, TypeKind kTypeKind>\nclass TypeWithoutFormatter {\n public:\n  // This default version is called when kTypeKind is kOtherType.\n  static void PrintValue(const T& value, ::std::ostream* os) {\n    PrintBytesInObjectTo(static_cast<const unsigned char*>(\n                             reinterpret_cast<const void*>(&value)),\n                         sizeof(value), os);\n  }\n};\n\n// We print a protobuf using its ShortDebugString() when the string\n// doesn't exceed this many characters; otherwise we print it using\n// DebugString() for better readability.\nconst size_t kProtobufOneLinerMaxLength = 50;\n\ntemplate <typename T>\nclass TypeWithoutFormatter<T, kProtobuf> {\n public:\n  static void PrintValue(const T& value, ::std::ostream* os) {\n    std::string pretty_str = value.ShortDebugString();\n    if (pretty_str.length() > kProtobufOneLinerMaxLength) {\n      pretty_str = \"\\n\" + value.DebugString();\n    }\n    *os << (\"<\" + pretty_str + \">\");\n  }\n};\n\ntemplate <typename T>\nclass TypeWithoutFormatter<T, kConvertibleToInteger> {\n public:\n  // Since T has no << operator or PrintTo() but can be implicitly\n  // converted to BiggestInt, we print it as a BiggestInt.\n  //\n  // Most likely T is an enum type (either named or unnamed), in which\n  // case printing it as an integer is the desired behavior.  In case\n  // T is not an enum, printing it as an integer is the best we can do\n  // given that it has no user-defined printer.\n  static void PrintValue(const T& value, ::std::ostream* os) {\n    const internal::BiggestInt kBigInt = value;\n    *os << kBigInt;\n  }\n};\n\n#if GTEST_HAS_ABSL\ntemplate <typename T>\nclass TypeWithoutFormatter<T, kConvertibleToStringView> {\n public:\n  // Since T has neither operator<< nor PrintTo() but can be implicitly\n  // converted to absl::string_view, we print it as a absl::string_view.\n  //\n  // Note: the implementation is further below, as it depends on\n  // internal::PrintTo symbol which is defined later in the file.\n  static void PrintValue(const T& value, ::std::ostream* os);\n};\n#endif\n\n// Prints the given value to the given ostream.  If the value is a\n// protocol message, its debug string is printed; if it's an enum or\n// of a type implicitly convertible to BiggestInt, it's printed as an\n// integer; otherwise the bytes in the value are printed.  This is\n// what UniversalPrinter<T>::Print() does when it knows nothing about\n// type T and T has neither << operator nor PrintTo().\n//\n// A user can override this behavior for a class type Foo by defining\n// a << operator in the namespace where Foo is defined.\n//\n// We put this operator in namespace 'internal2' instead of 'internal'\n// to simplify the implementation, as much code in 'internal' needs to\n// use << in STL, which would conflict with our own << were it defined\n// in 'internal'.\n//\n// Note that this operator<< takes a generic std::basic_ostream<Char,\n// CharTraits> type instead of the more restricted std::ostream.  If\n// we define it to take an std::ostream instead, we'll get an\n// \"ambiguous overloads\" compiler error when trying to print a type\n// Foo that supports streaming to std::basic_ostream<Char,\n// CharTraits>, as the compiler cannot tell whether\n// operator<<(std::ostream&, const T&) or\n// operator<<(std::basic_stream<Char, CharTraits>, const Foo&) is more\n// specific.\ntemplate <typename Char, typename CharTraits, typename T>\n::std::basic_ostream<Char, CharTraits>& operator<<(\n    ::std::basic_ostream<Char, CharTraits>& os, const T& x) {\n  TypeWithoutFormatter<T, (internal::IsAProtocolMessage<T>::value\n                               ? kProtobuf\n                               : std::is_convertible<\n                                     const T&, internal::BiggestInt>::value\n                                     ? kConvertibleToInteger\n                                     :\n#if GTEST_HAS_ABSL\n                                     std::is_convertible<\n                                         const T&, absl::string_view>::value\n                                         ? kConvertibleToStringView\n                                         :\n#endif\n                                         kOtherType)>::PrintValue(x, &os);\n  return os;\n}\n\n}  // namespace internal2\n}  // namespace testing\n\n// This namespace MUST NOT BE NESTED IN ::testing, or the name look-up\n// magic needed for implementing UniversalPrinter won't work.\nnamespace testing_internal {\n\n// Used to print a value that is not an STL-style container when the\n// user doesn't define PrintTo() for it.\ntemplate <typename T>\nvoid DefaultPrintNonContainerTo(const T& value, ::std::ostream* os) {\n  // With the following statement, during unqualified name lookup,\n  // testing::internal2::operator<< appears as if it was declared in\n  // the nearest enclosing namespace that contains both\n  // ::testing_internal and ::testing::internal2, i.e. the global\n  // namespace.  For more details, refer to the C++ Standard section\n  // 7.3.4-1 [namespace.udir].  This allows us to fall back onto\n  // testing::internal2::operator<< in case T doesn't come with a <<\n  // operator.\n  //\n  // We cannot write 'using ::testing::internal2::operator<<;', which\n  // gcc 3.3 fails to compile due to a compiler bug.\n  using namespace ::testing::internal2;  // NOLINT\n\n  // Assuming T is defined in namespace foo, in the next statement,\n  // the compiler will consider all of:\n  //\n  //   1. foo::operator<< (thanks to Koenig look-up),\n  //   2. ::operator<< (as the current namespace is enclosed in ::),\n  //   3. testing::internal2::operator<< (thanks to the using statement above).\n  //\n  // The operator<< whose type matches T best will be picked.\n  //\n  // We deliberately allow #2 to be a candidate, as sometimes it's\n  // impossible to define #1 (e.g. when foo is ::std, defining\n  // anything in it is undefined behavior unless you are a compiler\n  // vendor.).\n  *os << value;\n}\n\n}  // namespace testing_internal\n\nnamespace testing {\nnamespace internal {\n\n// FormatForComparison<ToPrint, OtherOperand>::Format(value) formats a\n// value of type ToPrint that is an operand of a comparison assertion\n// (e.g. ASSERT_EQ).  OtherOperand is the type of the other operand in\n// the comparison, and is used to help determine the best way to\n// format the value.  In particular, when the value is a C string\n// (char pointer) and the other operand is an STL string object, we\n// want to format the C string as a string, since we know it is\n// compared by value with the string object.  If the value is a char\n// pointer but the other operand is not an STL string object, we don't\n// know whether the pointer is supposed to point to a NUL-terminated\n// string, and thus want to print it as a pointer to be safe.\n//\n// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.\n\n// The default case.\ntemplate <typename ToPrint, typename OtherOperand>\nclass FormatForComparison {\n public:\n  static ::std::string Format(const ToPrint& value) {\n    return ::testing::PrintToString(value);\n  }\n};\n\n// Array.\ntemplate <typename ToPrint, size_t N, typename OtherOperand>\nclass FormatForComparison<ToPrint[N], OtherOperand> {\n public:\n  static ::std::string Format(const ToPrint* value) {\n    return FormatForComparison<const ToPrint*, OtherOperand>::Format(value);\n  }\n};\n\n// By default, print C string as pointers to be safe, as we don't know\n// whether they actually point to a NUL-terminated string.\n\n#define GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(CharType)                \\\n  template <typename OtherOperand>                                      \\\n  class FormatForComparison<CharType*, OtherOperand> {                  \\\n   public:                                                              \\\n    static ::std::string Format(CharType* value) {                      \\\n      return ::testing::PrintToString(static_cast<const void*>(value)); \\\n    }                                                                   \\\n  }\n\nGTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(char);\nGTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(const char);\nGTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(wchar_t);\nGTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(const wchar_t);\n\n#undef GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_\n\n// If a C string is compared with an STL string object, we know it's meant\n// to point to a NUL-terminated string, and thus can print it as a string.\n\n#define GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(CharType, OtherStringType) \\\n  template <>                                                           \\\n  class FormatForComparison<CharType*, OtherStringType> {               \\\n   public:                                                              \\\n    static ::std::string Format(CharType* value) {                      \\\n      return ::testing::PrintToString(value);                           \\\n    }                                                                   \\\n  }\n\nGTEST_IMPL_FORMAT_C_STRING_AS_STRING_(char, ::std::string);\nGTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const char, ::std::string);\n\n#if GTEST_HAS_GLOBAL_STRING\nGTEST_IMPL_FORMAT_C_STRING_AS_STRING_(char, ::string);\nGTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const char, ::string);\n#endif\n\n#if GTEST_HAS_GLOBAL_WSTRING\nGTEST_IMPL_FORMAT_C_STRING_AS_STRING_(wchar_t, ::wstring);\nGTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const wchar_t, ::wstring);\n#endif\n\n#if GTEST_HAS_STD_WSTRING\nGTEST_IMPL_FORMAT_C_STRING_AS_STRING_(wchar_t, ::std::wstring);\nGTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const wchar_t, ::std::wstring);\n#endif\n\n#undef GTEST_IMPL_FORMAT_C_STRING_AS_STRING_\n\n// Formats a comparison assertion (e.g. ASSERT_EQ, EXPECT_LT, and etc)\n// operand to be used in a failure message.  The type (but not value)\n// of the other operand may affect the format.  This allows us to\n// print a char* as a raw pointer when it is compared against another\n// char* or void*, and print it as a C string when it is compared\n// against an std::string object, for example.\n//\n// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.\ntemplate <typename T1, typename T2>\nstd::string FormatForComparisonFailureMessage(\n    const T1& value, const T2& /* other_operand */) {\n  return FormatForComparison<T1, T2>::Format(value);\n}\n\n// UniversalPrinter<T>::Print(value, ostream_ptr) prints the given\n// value to the given ostream.  The caller must ensure that\n// 'ostream_ptr' is not NULL, or the behavior is undefined.\n//\n// We define UniversalPrinter as a class template (as opposed to a\n// function template), as we need to partially specialize it for\n// reference types, which cannot be done with function templates.\ntemplate <typename T>\nclass UniversalPrinter;\n\ntemplate <typename T>\nvoid UniversalPrint(const T& value, ::std::ostream* os);\n\nenum DefaultPrinterType {\n  kPrintContainer,\n  kPrintPointer,\n  kPrintFunctionPointer,\n  kPrintOther,\n};\ntemplate <DefaultPrinterType type> struct WrapPrinterType {};\n\n// Used to print an STL-style container when the user doesn't define\n// a PrintTo() for it.\ntemplate <typename C>\nvoid DefaultPrintTo(WrapPrinterType<kPrintContainer> /* dummy */,\n                    const C& container, ::std::ostream* os) {\n  const size_t kMaxCount = 32;  // The maximum number of elements to print.\n  *os << '{';\n  size_t count = 0;\n  for (typename C::const_iterator it = container.begin();\n       it != container.end(); ++it, ++count) {\n    if (count > 0) {\n      *os << ',';\n      if (count == kMaxCount) {  // Enough has been printed.\n        *os << \" ...\";\n        break;\n      }\n    }\n    *os << ' ';\n    // We cannot call PrintTo(*it, os) here as PrintTo() doesn't\n    // handle *it being a native array.\n    internal::UniversalPrint(*it, os);\n  }\n\n  if (count > 0) {\n    *os << ' ';\n  }\n  *os << '}';\n}\n\n// Used to print a pointer that is neither a char pointer nor a member\n// pointer, when the user doesn't define PrintTo() for it.  (A member\n// variable pointer or member function pointer doesn't really point to\n// a location in the address space.  Their representation is\n// implementation-defined.  Therefore they will be printed as raw\n// bytes.)\ntemplate <typename T>\nvoid DefaultPrintTo(WrapPrinterType<kPrintPointer> /* dummy */,\n                    T* p, ::std::ostream* os) {\n  if (p == nullptr) {\n    *os << \"NULL\";\n  } else {\n    // T is not a function type.  We just call << to print p,\n    // relying on ADL to pick up user-defined << for their pointer\n    // types, if any.\n    *os << p;\n  }\n}\ntemplate <typename T>\nvoid DefaultPrintTo(WrapPrinterType<kPrintFunctionPointer> /* dummy */,\n                    T* p, ::std::ostream* os) {\n  if (p == nullptr) {\n    *os << \"NULL\";\n  } else {\n    // T is a function type, so '*os << p' doesn't do what we want\n    // (it just prints p as bool).  We want to print p as a const\n    // void*.\n    *os << reinterpret_cast<const void*>(p);\n  }\n}\n\n// Used to print a non-container, non-pointer value when the user\n// doesn't define PrintTo() for it.\ntemplate <typename T>\nvoid DefaultPrintTo(WrapPrinterType<kPrintOther> /* dummy */,\n                    const T& value, ::std::ostream* os) {\n  ::testing_internal::DefaultPrintNonContainerTo(value, os);\n}\n\n// Prints the given value using the << operator if it has one;\n// otherwise prints the bytes in it.  This is what\n// UniversalPrinter<T>::Print() does when PrintTo() is not specialized\n// or overloaded for type T.\n//\n// A user can override this behavior for a class type Foo by defining\n// an overload of PrintTo() in the namespace where Foo is defined.  We\n// give the user this option as sometimes defining a << operator for\n// Foo is not desirable (e.g. the coding style may prevent doing it,\n// or there is already a << operator but it doesn't do what the user\n// wants).\ntemplate <typename T>\nvoid PrintTo(const T& value, ::std::ostream* os) {\n  // DefaultPrintTo() is overloaded.  The type of its first argument\n  // determines which version will be picked.\n  //\n  // Note that we check for container types here, prior to we check\n  // for protocol message types in our operator<<.  The rationale is:\n  //\n  // For protocol messages, we want to give people a chance to\n  // override Google Mock's format by defining a PrintTo() or\n  // operator<<.  For STL containers, other formats can be\n  // incompatible with Google Mock's format for the container\n  // elements; therefore we check for container types here to ensure\n  // that our format is used.\n  //\n  // Note that MSVC and clang-cl do allow an implicit conversion from\n  // pointer-to-function to pointer-to-object, but clang-cl warns on it.\n  // So don't use ImplicitlyConvertible if it can be helped since it will\n  // cause this warning, and use a separate overload of DefaultPrintTo for\n  // function pointers so that the `*os << p` in the object pointer overload\n  // doesn't cause that warning either.\n  DefaultPrintTo(\n      WrapPrinterType <\n                  (sizeof(IsContainerTest<T>(0)) == sizeof(IsContainer)) &&\n              !IsRecursiveContainer<T>::value\n          ? kPrintContainer\n          : !std::is_pointer<T>::value\n                ? kPrintOther\n                : std::is_function<typename std::remove_pointer<T>::type>::value\n                      ? kPrintFunctionPointer\n                      : kPrintPointer > (),\n      value, os);\n}\n\n// The following list of PrintTo() overloads tells\n// UniversalPrinter<T>::Print() how to print standard types (built-in\n// types, strings, plain arrays, and pointers).\n\n// Overloads for various char types.\nGTEST_API_ void PrintTo(unsigned char c, ::std::ostream* os);\nGTEST_API_ void PrintTo(signed char c, ::std::ostream* os);\ninline void PrintTo(char c, ::std::ostream* os) {\n  // When printing a plain char, we always treat it as unsigned.  This\n  // way, the output won't be affected by whether the compiler thinks\n  // char is signed or not.\n  PrintTo(static_cast<unsigned char>(c), os);\n}\n\n// Overloads for other simple built-in types.\ninline void PrintTo(bool x, ::std::ostream* os) {\n  *os << (x ? \"true\" : \"false\");\n}\n\n// Overload for wchar_t type.\n// Prints a wchar_t as a symbol if it is printable or as its internal\n// code otherwise and also as its decimal code (except for L'\\0').\n// The L'\\0' char is printed as \"L'\\\\0'\". The decimal code is printed\n// as signed integer when wchar_t is implemented by the compiler\n// as a signed type and is printed as an unsigned integer when wchar_t\n// is implemented as an unsigned type.\nGTEST_API_ void PrintTo(wchar_t wc, ::std::ostream* os);\n\n// Overloads for C strings.\nGTEST_API_ void PrintTo(const char* s, ::std::ostream* os);\ninline void PrintTo(char* s, ::std::ostream* os) {\n  PrintTo(ImplicitCast_<const char*>(s), os);\n}\n\n// signed/unsigned char is often used for representing binary data, so\n// we print pointers to it as void* to be safe.\ninline void PrintTo(const signed char* s, ::std::ostream* os) {\n  PrintTo(ImplicitCast_<const void*>(s), os);\n}\ninline void PrintTo(signed char* s, ::std::ostream* os) {\n  PrintTo(ImplicitCast_<const void*>(s), os);\n}\ninline void PrintTo(const unsigned char* s, ::std::ostream* os) {\n  PrintTo(ImplicitCast_<const void*>(s), os);\n}\ninline void PrintTo(unsigned char* s, ::std::ostream* os) {\n  PrintTo(ImplicitCast_<const void*>(s), os);\n}\n\n// MSVC can be configured to define wchar_t as a typedef of unsigned\n// short.  It defines _NATIVE_WCHAR_T_DEFINED when wchar_t is a native\n// type.  When wchar_t is a typedef, defining an overload for const\n// wchar_t* would cause unsigned short* be printed as a wide string,\n// possibly causing invalid memory accesses.\n#if !defined(_MSC_VER) || defined(_NATIVE_WCHAR_T_DEFINED)\n// Overloads for wide C strings\nGTEST_API_ void PrintTo(const wchar_t* s, ::std::ostream* os);\ninline void PrintTo(wchar_t* s, ::std::ostream* os) {\n  PrintTo(ImplicitCast_<const wchar_t*>(s), os);\n}\n#endif\n\n// Overload for C arrays.  Multi-dimensional arrays are printed\n// properly.\n\n// Prints the given number of elements in an array, without printing\n// the curly braces.\ntemplate <typename T>\nvoid PrintRawArrayTo(const T a[], size_t count, ::std::ostream* os) {\n  UniversalPrint(a[0], os);\n  for (size_t i = 1; i != count; i++) {\n    *os << \", \";\n    UniversalPrint(a[i], os);\n  }\n}\n\n// Overloads for ::string and ::std::string.\n#if GTEST_HAS_GLOBAL_STRING\nGTEST_API_ void PrintStringTo(const ::string&s, ::std::ostream* os);\ninline void PrintTo(const ::string& s, ::std::ostream* os) {\n  PrintStringTo(s, os);\n}\n#endif  // GTEST_HAS_GLOBAL_STRING\n\nGTEST_API_ void PrintStringTo(const ::std::string&s, ::std::ostream* os);\ninline void PrintTo(const ::std::string& s, ::std::ostream* os) {\n  PrintStringTo(s, os);\n}\n\n// Overloads for ::wstring and ::std::wstring.\n#if GTEST_HAS_GLOBAL_WSTRING\nGTEST_API_ void PrintWideStringTo(const ::wstring&s, ::std::ostream* os);\ninline void PrintTo(const ::wstring& s, ::std::ostream* os) {\n  PrintWideStringTo(s, os);\n}\n#endif  // GTEST_HAS_GLOBAL_WSTRING\n\n#if GTEST_HAS_STD_WSTRING\nGTEST_API_ void PrintWideStringTo(const ::std::wstring&s, ::std::ostream* os);\ninline void PrintTo(const ::std::wstring& s, ::std::ostream* os) {\n  PrintWideStringTo(s, os);\n}\n#endif  // GTEST_HAS_STD_WSTRING\n\n#if GTEST_HAS_ABSL\n// Overload for absl::string_view.\ninline void PrintTo(absl::string_view sp, ::std::ostream* os) {\n  PrintTo(::std::string(sp), os);\n}\n#endif  // GTEST_HAS_ABSL\n\ninline void PrintTo(std::nullptr_t, ::std::ostream* os) { *os << \"(nullptr)\"; }\n\ntemplate <typename T>\nvoid PrintTo(std::reference_wrapper<T> ref, ::std::ostream* os) {\n  UniversalPrinter<T&>::Print(ref.get(), os);\n}\n\n// Helper function for printing a tuple.  T must be instantiated with\n// a tuple type.\ntemplate <typename T>\nvoid PrintTupleTo(const T&, std::integral_constant<size_t, 0>,\n                  ::std::ostream*) {}\n\ntemplate <typename T, size_t I>\nvoid PrintTupleTo(const T& t, std::integral_constant<size_t, I>,\n                  ::std::ostream* os) {\n  PrintTupleTo(t, std::integral_constant<size_t, I - 1>(), os);\n  GTEST_INTENTIONAL_CONST_COND_PUSH_()\n  if (I > 1) {\n    GTEST_INTENTIONAL_CONST_COND_POP_()\n    *os << \", \";\n  }\n  UniversalPrinter<typename std::tuple_element<I - 1, T>::type>::Print(\n      std::get<I - 1>(t), os);\n}\n\ntemplate <typename... Types>\nvoid PrintTo(const ::std::tuple<Types...>& t, ::std::ostream* os) {\n  *os << \"(\";\n  PrintTupleTo(t, std::integral_constant<size_t, sizeof...(Types)>(), os);\n  *os << \")\";\n}\n\n// Overload for std::pair.\ntemplate <typename T1, typename T2>\nvoid PrintTo(const ::std::pair<T1, T2>& value, ::std::ostream* os) {\n  *os << '(';\n  // We cannot use UniversalPrint(value.first, os) here, as T1 may be\n  // a reference type.  The same for printing value.second.\n  UniversalPrinter<T1>::Print(value.first, os);\n  *os << \", \";\n  UniversalPrinter<T2>::Print(value.second, os);\n  *os << ')';\n}\n\n// Implements printing a non-reference type T by letting the compiler\n// pick the right overload of PrintTo() for T.\ntemplate <typename T>\nclass UniversalPrinter {\n public:\n  // MSVC warns about adding const to a function type, so we want to\n  // disable the warning.\n  GTEST_DISABLE_MSC_WARNINGS_PUSH_(4180)\n\n  // Note: we deliberately don't call this PrintTo(), as that name\n  // conflicts with ::testing::internal::PrintTo in the body of the\n  // function.\n  static void Print(const T& value, ::std::ostream* os) {\n    // By default, ::testing::internal::PrintTo() is used for printing\n    // the value.\n    //\n    // Thanks to Koenig look-up, if T is a class and has its own\n    // PrintTo() function defined in its namespace, that function will\n    // be visible here.  Since it is more specific than the generic ones\n    // in ::testing::internal, it will be picked by the compiler in the\n    // following statement - exactly what we want.\n    PrintTo(value, os);\n  }\n\n  GTEST_DISABLE_MSC_WARNINGS_POP_()\n};\n\n#if GTEST_HAS_ABSL\n\n// Printer for absl::optional\n\ntemplate <typename T>\nclass UniversalPrinter<::absl::optional<T>> {\n public:\n  static void Print(const ::absl::optional<T>& value, ::std::ostream* os) {\n    *os << '(';\n    if (!value) {\n      *os << \"nullopt\";\n    } else {\n      UniversalPrint(*value, os);\n    }\n    *os << ')';\n  }\n};\n\n// Printer for absl::variant\n\ntemplate <typename... T>\nclass UniversalPrinter<::absl::variant<T...>> {\n public:\n  static void Print(const ::absl::variant<T...>& value, ::std::ostream* os) {\n    *os << '(';\n    absl::visit(Visitor{os}, value);\n    *os << ')';\n  }\n\n private:\n  struct Visitor {\n    template <typename U>\n    void operator()(const U& u) const {\n      *os << \"'\" << GetTypeName<U>() << \"' with value \";\n      UniversalPrint(u, os);\n    }\n    ::std::ostream* os;\n  };\n};\n\n#endif  // GTEST_HAS_ABSL\n\n// UniversalPrintArray(begin, len, os) prints an array of 'len'\n// elements, starting at address 'begin'.\ntemplate <typename T>\nvoid UniversalPrintArray(const T* begin, size_t len, ::std::ostream* os) {\n  if (len == 0) {\n    *os << \"{}\";\n  } else {\n    *os << \"{ \";\n    const size_t kThreshold = 18;\n    const size_t kChunkSize = 8;\n    // If the array has more than kThreshold elements, we'll have to\n    // omit some details by printing only the first and the last\n    // kChunkSize elements.\n    if (len <= kThreshold) {\n      PrintRawArrayTo(begin, len, os);\n    } else {\n      PrintRawArrayTo(begin, kChunkSize, os);\n      *os << \", ..., \";\n      PrintRawArrayTo(begin + len - kChunkSize, kChunkSize, os);\n    }\n    *os << \" }\";\n  }\n}\n// This overload prints a (const) char array compactly.\nGTEST_API_ void UniversalPrintArray(\n    const char* begin, size_t len, ::std::ostream* os);\n\n// This overload prints a (const) wchar_t array compactly.\nGTEST_API_ void UniversalPrintArray(\n    const wchar_t* begin, size_t len, ::std::ostream* os);\n\n// Implements printing an array type T[N].\ntemplate <typename T, size_t N>\nclass UniversalPrinter<T[N]> {\n public:\n  // Prints the given array, omitting some elements when there are too\n  // many.\n  static void Print(const T (&a)[N], ::std::ostream* os) {\n    UniversalPrintArray(a, N, os);\n  }\n};\n\n// Implements printing a reference type T&.\ntemplate <typename T>\nclass UniversalPrinter<T&> {\n public:\n  // MSVC warns about adding const to a function type, so we want to\n  // disable the warning.\n  GTEST_DISABLE_MSC_WARNINGS_PUSH_(4180)\n\n  static void Print(const T& value, ::std::ostream* os) {\n    // Prints the address of the value.  We use reinterpret_cast here\n    // as static_cast doesn't compile when T is a function type.\n    *os << \"@\" << reinterpret_cast<const void*>(&value) << \" \";\n\n    // Then prints the value itself.\n    UniversalPrint(value, os);\n  }\n\n  GTEST_DISABLE_MSC_WARNINGS_POP_()\n};\n\n// Prints a value tersely: for a reference type, the referenced value\n// (but not the address) is printed; for a (const) char pointer, the\n// NUL-terminated string (but not the pointer) is printed.\n\ntemplate <typename T>\nclass UniversalTersePrinter {\n public:\n  static void Print(const T& value, ::std::ostream* os) {\n    UniversalPrint(value, os);\n  }\n};\ntemplate <typename T>\nclass UniversalTersePrinter<T&> {\n public:\n  static void Print(const T& value, ::std::ostream* os) {\n    UniversalPrint(value, os);\n  }\n};\ntemplate <typename T, size_t N>\nclass UniversalTersePrinter<T[N]> {\n public:\n  static void Print(const T (&value)[N], ::std::ostream* os) {\n    UniversalPrinter<T[N]>::Print(value, os);\n  }\n};\ntemplate <>\nclass UniversalTersePrinter<const char*> {\n public:\n  static void Print(const char* str, ::std::ostream* os) {\n    if (str == nullptr) {\n      *os << \"NULL\";\n    } else {\n      UniversalPrint(std::string(str), os);\n    }\n  }\n};\ntemplate <>\nclass UniversalTersePrinter<char*> {\n public:\n  static void Print(char* str, ::std::ostream* os) {\n    UniversalTersePrinter<const char*>::Print(str, os);\n  }\n};\n\n#if GTEST_HAS_STD_WSTRING\ntemplate <>\nclass UniversalTersePrinter<const wchar_t*> {\n public:\n  static void Print(const wchar_t* str, ::std::ostream* os) {\n    if (str == nullptr) {\n      *os << \"NULL\";\n    } else {\n      UniversalPrint(::std::wstring(str), os);\n    }\n  }\n};\n#endif\n\ntemplate <>\nclass UniversalTersePrinter<wchar_t*> {\n public:\n  static void Print(wchar_t* str, ::std::ostream* os) {\n    UniversalTersePrinter<const wchar_t*>::Print(str, os);\n  }\n};\n\ntemplate <typename T>\nvoid UniversalTersePrint(const T& value, ::std::ostream* os) {\n  UniversalTersePrinter<T>::Print(value, os);\n}\n\n// Prints a value using the type inferred by the compiler.  The\n// difference between this and UniversalTersePrint() is that for a\n// (const) char pointer, this prints both the pointer and the\n// NUL-terminated string.\ntemplate <typename T>\nvoid UniversalPrint(const T& value, ::std::ostream* os) {\n  // A workarond for the bug in VC++ 7.1 that prevents us from instantiating\n  // UniversalPrinter with T directly.\n  typedef T T1;\n  UniversalPrinter<T1>::Print(value, os);\n}\n\ntypedef ::std::vector< ::std::string> Strings;\n\n  // Tersely prints the first N fields of a tuple to a string vector,\n  // one element for each field.\ntemplate <typename Tuple>\nvoid TersePrintPrefixToStrings(const Tuple&, std::integral_constant<size_t, 0>,\n                               Strings*) {}\ntemplate <typename Tuple, size_t I>\nvoid TersePrintPrefixToStrings(const Tuple& t,\n                               std::integral_constant<size_t, I>,\n                               Strings* strings) {\n  TersePrintPrefixToStrings(t, std::integral_constant<size_t, I - 1>(),\n                            strings);\n  ::std::stringstream ss;\n  UniversalTersePrint(std::get<I - 1>(t), &ss);\n  strings->push_back(ss.str());\n}\n\n// Prints the fields of a tuple tersely to a string vector, one\n// element for each field.  See the comment before\n// UniversalTersePrint() for how we define \"tersely\".\ntemplate <typename Tuple>\nStrings UniversalTersePrintTupleFieldsToStrings(const Tuple& value) {\n  Strings result;\n  TersePrintPrefixToStrings(\n      value, std::integral_constant<size_t, std::tuple_size<Tuple>::value>(),\n      &result);\n  return result;\n}\n\n}  // namespace internal\n\n#if GTEST_HAS_ABSL\nnamespace internal2 {\ntemplate <typename T>\nvoid TypeWithoutFormatter<T, kConvertibleToStringView>::PrintValue(\n    const T& value, ::std::ostream* os) {\n  internal::PrintTo(absl::string_view(value), os);\n}\n}  // namespace internal2\n#endif\n\ntemplate <typename T>\n::std::string PrintToString(const T& value) {\n  ::std::stringstream ss;\n  internal::UniversalTersePrinter<T>::Print(value, &ss);\n  return ss.str();\n}\n\n}  // namespace testing\n\n// Include any custom printer added by the local installation.\n// We must include this header at the end to make sure it can use the\n// declarations from this file.\n// Copyright 2015, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// This file provides an injection point for custom printers in a local\n// installation of gTest.\n// It will be included from gtest-printers.h and the overrides in this file\n// will be visible to everyone.\n//\n// Injection point for custom user configurations. See README for details\n//\n// ** Custom implementation starts here **\n\n#ifndef GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PRINTERS_H_\n#define GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PRINTERS_H_\n\n#endif  // GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PRINTERS_H_\n\n#endif  // GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_\n\nGTEST_DISABLE_MSC_WARNINGS_PUSH_(\n    4251 5046 /* class A needs to have dll-interface to be used by clients of\n                 class B */\n    /* Symbol involving type with internal linkage not defined */)\n\nnamespace testing {\n\n// To implement a matcher Foo for type T, define:\n//   1. a class FooMatcherImpl that implements the\n//      MatcherInterface<T> interface, and\n//   2. a factory function that creates a Matcher<T> object from a\n//      FooMatcherImpl*.\n//\n// The two-level delegation design makes it possible to allow a user\n// to write \"v\" instead of \"Eq(v)\" where a Matcher is expected, which\n// is impossible if we pass matchers by pointers.  It also eases\n// ownership management as Matcher objects can now be copied like\n// plain values.\n\n// MatchResultListener is an abstract class.  Its << operator can be\n// used by a matcher to explain why a value matches or doesn't match.\n//\nclass MatchResultListener {\n public:\n  // Creates a listener object with the given underlying ostream.  The\n  // listener does not own the ostream, and does not dereference it\n  // in the constructor or destructor.\n  explicit MatchResultListener(::std::ostream* os) : stream_(os) {}\n  virtual ~MatchResultListener() = 0;  // Makes this class abstract.\n\n  // Streams x to the underlying ostream; does nothing if the ostream\n  // is NULL.\n  template <typename T>\n  MatchResultListener& operator<<(const T& x) {\n    if (stream_ != nullptr) *stream_ << x;\n    return *this;\n  }\n\n  // Returns the underlying ostream.\n  ::std::ostream* stream() { return stream_; }\n\n  // Returns true iff the listener is interested in an explanation of\n  // the match result.  A matcher's MatchAndExplain() method can use\n  // this information to avoid generating the explanation when no one\n  // intends to hear it.\n  bool IsInterested() const { return stream_ != nullptr; }\n\n private:\n  ::std::ostream* const stream_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(MatchResultListener);\n};\n\ninline MatchResultListener::~MatchResultListener() {\n}\n\n// An instance of a subclass of this knows how to describe itself as a\n// matcher.\nclass MatcherDescriberInterface {\n public:\n  virtual ~MatcherDescriberInterface() {}\n\n  // Describes this matcher to an ostream.  The function should print\n  // a verb phrase that describes the property a value matching this\n  // matcher should have.  The subject of the verb phrase is the value\n  // being matched.  For example, the DescribeTo() method of the Gt(7)\n  // matcher prints \"is greater than 7\".\n  virtual void DescribeTo(::std::ostream* os) const = 0;\n\n  // Describes the negation of this matcher to an ostream.  For\n  // example, if the description of this matcher is \"is greater than\n  // 7\", the negated description could be \"is not greater than 7\".\n  // You are not required to override this when implementing\n  // MatcherInterface, but it is highly advised so that your matcher\n  // can produce good error messages.\n  virtual void DescribeNegationTo(::std::ostream* os) const {\n    *os << \"not (\";\n    DescribeTo(os);\n    *os << \")\";\n  }\n};\n\n// The implementation of a matcher.\ntemplate <typename T>\nclass MatcherInterface : public MatcherDescriberInterface {\n public:\n  // Returns true iff the matcher matches x; also explains the match\n  // result to 'listener' if necessary (see the next paragraph), in\n  // the form of a non-restrictive relative clause (\"which ...\",\n  // \"whose ...\", etc) that describes x.  For example, the\n  // MatchAndExplain() method of the Pointee(...) matcher should\n  // generate an explanation like \"which points to ...\".\n  //\n  // Implementations of MatchAndExplain() should add an explanation of\n  // the match result *if and only if* they can provide additional\n  // information that's not already present (or not obvious) in the\n  // print-out of x and the matcher's description.  Whether the match\n  // succeeds is not a factor in deciding whether an explanation is\n  // needed, as sometimes the caller needs to print a failure message\n  // when the match succeeds (e.g. when the matcher is used inside\n  // Not()).\n  //\n  // For example, a \"has at least 10 elements\" matcher should explain\n  // what the actual element count is, regardless of the match result,\n  // as it is useful information to the reader; on the other hand, an\n  // \"is empty\" matcher probably only needs to explain what the actual\n  // size is when the match fails, as it's redundant to say that the\n  // size is 0 when the value is already known to be empty.\n  //\n  // You should override this method when defining a new matcher.\n  //\n  // It's the responsibility of the caller (Google Test) to guarantee\n  // that 'listener' is not NULL.  This helps to simplify a matcher's\n  // implementation when it doesn't care about the performance, as it\n  // can talk to 'listener' without checking its validity first.\n  // However, in order to implement dummy listeners efficiently,\n  // listener->stream() may be NULL.\n  virtual bool MatchAndExplain(T x, MatchResultListener* listener) const = 0;\n\n  // Inherits these methods from MatcherDescriberInterface:\n  //   virtual void DescribeTo(::std::ostream* os) const = 0;\n  //   virtual void DescribeNegationTo(::std::ostream* os) const;\n};\n\nnamespace internal {\n\n// Converts a MatcherInterface<T> to a MatcherInterface<const T&>.\ntemplate <typename T>\nclass MatcherInterfaceAdapter : public MatcherInterface<const T&> {\n public:\n  explicit MatcherInterfaceAdapter(const MatcherInterface<T>* impl)\n      : impl_(impl) {}\n  ~MatcherInterfaceAdapter() override { delete impl_; }\n\n  void DescribeTo(::std::ostream* os) const override { impl_->DescribeTo(os); }\n\n  void DescribeNegationTo(::std::ostream* os) const override {\n    impl_->DescribeNegationTo(os);\n  }\n\n  bool MatchAndExplain(const T& x,\n                       MatchResultListener* listener) const override {\n    return impl_->MatchAndExplain(x, listener);\n  }\n\n private:\n  const MatcherInterface<T>* const impl_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(MatcherInterfaceAdapter);\n};\n\nstruct AnyEq {\n  template <typename A, typename B>\n  bool operator()(const A& a, const B& b) const { return a == b; }\n};\nstruct AnyNe {\n  template <typename A, typename B>\n  bool operator()(const A& a, const B& b) const { return a != b; }\n};\nstruct AnyLt {\n  template <typename A, typename B>\n  bool operator()(const A& a, const B& b) const { return a < b; }\n};\nstruct AnyGt {\n  template <typename A, typename B>\n  bool operator()(const A& a, const B& b) const { return a > b; }\n};\nstruct AnyLe {\n  template <typename A, typename B>\n  bool operator()(const A& a, const B& b) const { return a <= b; }\n};\nstruct AnyGe {\n  template <typename A, typename B>\n  bool operator()(const A& a, const B& b) const { return a >= b; }\n};\n\n// A match result listener that ignores the explanation.\nclass DummyMatchResultListener : public MatchResultListener {\n public:\n  DummyMatchResultListener() : MatchResultListener(nullptr) {}\n\n private:\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(DummyMatchResultListener);\n};\n\n// A match result listener that forwards the explanation to a given\n// ostream.  The difference between this and MatchResultListener is\n// that the former is concrete.\nclass StreamMatchResultListener : public MatchResultListener {\n public:\n  explicit StreamMatchResultListener(::std::ostream* os)\n      : MatchResultListener(os) {}\n\n private:\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(StreamMatchResultListener);\n};\n\n// An internal class for implementing Matcher<T>, which will derive\n// from it.  We put functionalities common to all Matcher<T>\n// specializations here to avoid code duplication.\ntemplate <typename T>\nclass MatcherBase {\n public:\n  // Returns true iff the matcher matches x; also explains the match\n  // result to 'listener'.\n  bool MatchAndExplain(const T& x, MatchResultListener* listener) const {\n    return impl_->MatchAndExplain(x, listener);\n  }\n\n  // Returns true iff this matcher matches x.\n  bool Matches(const T& x) const {\n    DummyMatchResultListener dummy;\n    return MatchAndExplain(x, &dummy);\n  }\n\n  // Describes this matcher to an ostream.\n  void DescribeTo(::std::ostream* os) const { impl_->DescribeTo(os); }\n\n  // Describes the negation of this matcher to an ostream.\n  void DescribeNegationTo(::std::ostream* os) const {\n    impl_->DescribeNegationTo(os);\n  }\n\n  // Explains why x matches, or doesn't match, the matcher.\n  void ExplainMatchResultTo(const T& x, ::std::ostream* os) const {\n    StreamMatchResultListener listener(os);\n    MatchAndExplain(x, &listener);\n  }\n\n  // Returns the describer for this matcher object; retains ownership\n  // of the describer, which is only guaranteed to be alive when\n  // this matcher object is alive.\n  const MatcherDescriberInterface* GetDescriber() const {\n    return impl_.get();\n  }\n\n protected:\n  MatcherBase() {}\n\n  // Constructs a matcher from its implementation.\n  explicit MatcherBase(const MatcherInterface<const T&>* impl) : impl_(impl) {}\n\n  template <typename U>\n  explicit MatcherBase(\n      const MatcherInterface<U>* impl,\n      typename internal::EnableIf<\n          !internal::IsSame<U, const U&>::value>::type* = nullptr)\n      : impl_(new internal::MatcherInterfaceAdapter<U>(impl)) {}\n\n  MatcherBase(const MatcherBase&) = default;\n  MatcherBase& operator=(const MatcherBase&) = default;\n  MatcherBase(MatcherBase&&) = default;\n  MatcherBase& operator=(MatcherBase&&) = default;\n\n  virtual ~MatcherBase() {}\n\n private:\n  std::shared_ptr<const MatcherInterface<const T&>> impl_;\n};\n\n}  // namespace internal\n\n// A Matcher<T> is a copyable and IMMUTABLE (except by assignment)\n// object that can check whether a value of type T matches.  The\n// implementation of Matcher<T> is just a std::shared_ptr to const\n// MatcherInterface<T>.  Don't inherit from Matcher!\ntemplate <typename T>\nclass Matcher : public internal::MatcherBase<T> {\n public:\n  // Constructs a null matcher.  Needed for storing Matcher objects in STL\n  // containers.  A default-constructed matcher is not yet initialized.  You\n  // cannot use it until a valid value has been assigned to it.\n  explicit Matcher() {}  // NOLINT\n\n  // Constructs a matcher from its implementation.\n  explicit Matcher(const MatcherInterface<const T&>* impl)\n      : internal::MatcherBase<T>(impl) {}\n\n  template <typename U>\n  explicit Matcher(const MatcherInterface<U>* impl,\n                   typename internal::EnableIf<\n                       !internal::IsSame<U, const U&>::value>::type* = nullptr)\n      : internal::MatcherBase<T>(impl) {}\n\n  // Implicit constructor here allows people to write\n  // EXPECT_CALL(foo, Bar(5)) instead of EXPECT_CALL(foo, Bar(Eq(5))) sometimes\n  Matcher(T value);  // NOLINT\n};\n\n// The following two specializations allow the user to write str\n// instead of Eq(str) and \"foo\" instead of Eq(\"foo\") when a std::string\n// matcher is expected.\ntemplate <>\nclass GTEST_API_ Matcher<const std::string&>\n    : public internal::MatcherBase<const std::string&> {\n public:\n  Matcher() {}\n\n  explicit Matcher(const MatcherInterface<const std::string&>* impl)\n      : internal::MatcherBase<const std::string&>(impl) {}\n\n  // Allows the user to write str instead of Eq(str) sometimes, where\n  // str is a std::string object.\n  Matcher(const std::string& s);  // NOLINT\n\n#if GTEST_HAS_GLOBAL_STRING\n  // Allows the user to write str instead of Eq(str) sometimes, where\n  // str is a ::string object.\n  Matcher(const ::string& s);  // NOLINT\n#endif                         // GTEST_HAS_GLOBAL_STRING\n\n  // Allows the user to write \"foo\" instead of Eq(\"foo\") sometimes.\n  Matcher(const char* s);  // NOLINT\n};\n\ntemplate <>\nclass GTEST_API_ Matcher<std::string>\n    : public internal::MatcherBase<std::string> {\n public:\n  Matcher() {}\n\n  explicit Matcher(const MatcherInterface<const std::string&>* impl)\n      : internal::MatcherBase<std::string>(impl) {}\n  explicit Matcher(const MatcherInterface<std::string>* impl)\n      : internal::MatcherBase<std::string>(impl) {}\n\n  // Allows the user to write str instead of Eq(str) sometimes, where\n  // str is a string object.\n  Matcher(const std::string& s);  // NOLINT\n\n#if GTEST_HAS_GLOBAL_STRING\n  // Allows the user to write str instead of Eq(str) sometimes, where\n  // str is a ::string object.\n  Matcher(const ::string& s);  // NOLINT\n#endif                         // GTEST_HAS_GLOBAL_STRING\n\n  // Allows the user to write \"foo\" instead of Eq(\"foo\") sometimes.\n  Matcher(const char* s);  // NOLINT\n};\n\n#if GTEST_HAS_GLOBAL_STRING\n// The following two specializations allow the user to write str\n// instead of Eq(str) and \"foo\" instead of Eq(\"foo\") when a ::string\n// matcher is expected.\ntemplate <>\nclass GTEST_API_ Matcher<const ::string&>\n    : public internal::MatcherBase<const ::string&> {\n public:\n  Matcher() {}\n\n  explicit Matcher(const MatcherInterface<const ::string&>* impl)\n      : internal::MatcherBase<const ::string&>(impl) {}\n\n  // Allows the user to write str instead of Eq(str) sometimes, where\n  // str is a std::string object.\n  Matcher(const std::string& s);  // NOLINT\n\n  // Allows the user to write str instead of Eq(str) sometimes, where\n  // str is a ::string object.\n  Matcher(const ::string& s);  // NOLINT\n\n  // Allows the user to write \"foo\" instead of Eq(\"foo\") sometimes.\n  Matcher(const char* s);  // NOLINT\n};\n\ntemplate <>\nclass GTEST_API_ Matcher< ::string>\n    : public internal::MatcherBase< ::string> {\n public:\n  Matcher() {}\n\n  explicit Matcher(const MatcherInterface<const ::string&>* impl)\n      : internal::MatcherBase< ::string>(impl) {}\n  explicit Matcher(const MatcherInterface< ::string>* impl)\n      : internal::MatcherBase< ::string>(impl) {}\n\n  // Allows the user to write str instead of Eq(str) sometimes, where\n  // str is a std::string object.\n  Matcher(const std::string& s);  // NOLINT\n\n  // Allows the user to write str instead of Eq(str) sometimes, where\n  // str is a ::string object.\n  Matcher(const ::string& s);  // NOLINT\n\n  // Allows the user to write \"foo\" instead of Eq(\"foo\") sometimes.\n  Matcher(const char* s);  // NOLINT\n};\n#endif  // GTEST_HAS_GLOBAL_STRING\n\n#if GTEST_HAS_ABSL\n// The following two specializations allow the user to write str\n// instead of Eq(str) and \"foo\" instead of Eq(\"foo\") when a absl::string_view\n// matcher is expected.\ntemplate <>\nclass GTEST_API_ Matcher<const absl::string_view&>\n    : public internal::MatcherBase<const absl::string_view&> {\n public:\n  Matcher() {}\n\n  explicit Matcher(const MatcherInterface<const absl::string_view&>* impl)\n      : internal::MatcherBase<const absl::string_view&>(impl) {}\n\n  // Allows the user to write str instead of Eq(str) sometimes, where\n  // str is a std::string object.\n  Matcher(const std::string& s);  // NOLINT\n\n#if GTEST_HAS_GLOBAL_STRING\n  // Allows the user to write str instead of Eq(str) sometimes, where\n  // str is a ::string object.\n  Matcher(const ::string& s);  // NOLINT\n#endif                         // GTEST_HAS_GLOBAL_STRING\n\n  // Allows the user to write \"foo\" instead of Eq(\"foo\") sometimes.\n  Matcher(const char* s);  // NOLINT\n\n  // Allows the user to pass absl::string_views directly.\n  Matcher(absl::string_view s);  // NOLINT\n};\n\ntemplate <>\nclass GTEST_API_ Matcher<absl::string_view>\n    : public internal::MatcherBase<absl::string_view> {\n public:\n  Matcher() {}\n\n  explicit Matcher(const MatcherInterface<const absl::string_view&>* impl)\n      : internal::MatcherBase<absl::string_view>(impl) {}\n  explicit Matcher(const MatcherInterface<absl::string_view>* impl)\n      : internal::MatcherBase<absl::string_view>(impl) {}\n\n  // Allows the user to write str instead of Eq(str) sometimes, where\n  // str is a std::string object.\n  Matcher(const std::string& s);  // NOLINT\n\n#if GTEST_HAS_GLOBAL_STRING\n  // Allows the user to write str instead of Eq(str) sometimes, where\n  // str is a ::string object.\n  Matcher(const ::string& s);  // NOLINT\n#endif                         // GTEST_HAS_GLOBAL_STRING\n\n  // Allows the user to write \"foo\" instead of Eq(\"foo\") sometimes.\n  Matcher(const char* s);  // NOLINT\n\n  // Allows the user to pass absl::string_views directly.\n  Matcher(absl::string_view s);  // NOLINT\n};\n#endif  // GTEST_HAS_ABSL\n\n// Prints a matcher in a human-readable format.\ntemplate <typename T>\nstd::ostream& operator<<(std::ostream& os, const Matcher<T>& matcher) {\n  matcher.DescribeTo(&os);\n  return os;\n}\n\n// The PolymorphicMatcher class template makes it easy to implement a\n// polymorphic matcher (i.e. a matcher that can match values of more\n// than one type, e.g. Eq(n) and NotNull()).\n//\n// To define a polymorphic matcher, a user should provide an Impl\n// class that has a DescribeTo() method and a DescribeNegationTo()\n// method, and define a member function (or member function template)\n//\n//   bool MatchAndExplain(const Value& value,\n//                        MatchResultListener* listener) const;\n//\n// See the definition of NotNull() for a complete example.\ntemplate <class Impl>\nclass PolymorphicMatcher {\n public:\n  explicit PolymorphicMatcher(const Impl& an_impl) : impl_(an_impl) {}\n\n  // Returns a mutable reference to the underlying matcher\n  // implementation object.\n  Impl& mutable_impl() { return impl_; }\n\n  // Returns an immutable reference to the underlying matcher\n  // implementation object.\n  const Impl& impl() const { return impl_; }\n\n  template <typename T>\n  operator Matcher<T>() const {\n    return Matcher<T>(new MonomorphicImpl<const T&>(impl_));\n  }\n\n private:\n  template <typename T>\n  class MonomorphicImpl : public MatcherInterface<T> {\n   public:\n    explicit MonomorphicImpl(const Impl& impl) : impl_(impl) {}\n\n    virtual void DescribeTo(::std::ostream* os) const { impl_.DescribeTo(os); }\n\n    virtual void DescribeNegationTo(::std::ostream* os) const {\n      impl_.DescribeNegationTo(os);\n    }\n\n    virtual bool MatchAndExplain(T x, MatchResultListener* listener) const {\n      return impl_.MatchAndExplain(x, listener);\n    }\n\n   private:\n    const Impl impl_;\n  };\n\n  Impl impl_;\n};\n\n// Creates a matcher from its implementation.\n// DEPRECATED: Especially in the generic code, prefer:\n//   Matcher<T>(new MyMatcherImpl<const T&>(...));\n//\n// MakeMatcher may create a Matcher that accepts its argument by value, which\n// leads to unnecessary copies & lack of support for non-copyable types.\ntemplate <typename T>\ninline Matcher<T> MakeMatcher(const MatcherInterface<T>* impl) {\n  return Matcher<T>(impl);\n}\n\n// Creates a polymorphic matcher from its implementation.  This is\n// easier to use than the PolymorphicMatcher<Impl> constructor as it\n// doesn't require you to explicitly write the template argument, e.g.\n//\n//   MakePolymorphicMatcher(foo);\n// vs\n//   PolymorphicMatcher<TypeOfFoo>(foo);\ntemplate <class Impl>\ninline PolymorphicMatcher<Impl> MakePolymorphicMatcher(const Impl& impl) {\n  return PolymorphicMatcher<Impl>(impl);\n}\n\nnamespace internal {\n// Implements a matcher that compares a given value with a\n// pre-supplied value using one of the ==, <=, <, etc, operators.  The\n// two values being compared don't have to have the same type.\n//\n// The matcher defined here is polymorphic (for example, Eq(5) can be\n// used to match an int, a short, a double, etc).  Therefore we use\n// a template type conversion operator in the implementation.\n//\n// The following template definition assumes that the Rhs parameter is\n// a \"bare\" type (i.e. neither 'const T' nor 'T&').\ntemplate <typename D, typename Rhs, typename Op>\nclass ComparisonBase {\n public:\n  explicit ComparisonBase(const Rhs& rhs) : rhs_(rhs) {}\n  template <typename Lhs>\n  operator Matcher<Lhs>() const {\n    return Matcher<Lhs>(new Impl<const Lhs&>(rhs_));\n  }\n\n private:\n  template <typename T>\n  static const T& Unwrap(const T& v) { return v; }\n  template <typename T>\n  static const T& Unwrap(std::reference_wrapper<T> v) { return v; }\n\n  template <typename Lhs, typename = Rhs>\n  class Impl : public MatcherInterface<Lhs> {\n   public:\n    explicit Impl(const Rhs& rhs) : rhs_(rhs) {}\n    bool MatchAndExplain(Lhs lhs,\n                         MatchResultListener* /* listener */) const override {\n      return Op()(lhs, Unwrap(rhs_));\n    }\n    void DescribeTo(::std::ostream* os) const override {\n      *os << D::Desc() << \" \";\n      UniversalPrint(Unwrap(rhs_), os);\n    }\n    void DescribeNegationTo(::std::ostream* os) const override {\n      *os << D::NegatedDesc() <<  \" \";\n      UniversalPrint(Unwrap(rhs_), os);\n    }\n\n   private:\n    Rhs rhs_;\n  };\n  Rhs rhs_;\n};\n\ntemplate <typename Rhs>\nclass EqMatcher : public ComparisonBase<EqMatcher<Rhs>, Rhs, AnyEq> {\n public:\n  explicit EqMatcher(const Rhs& rhs)\n      : ComparisonBase<EqMatcher<Rhs>, Rhs, AnyEq>(rhs) { }\n  static const char* Desc() { return \"is equal to\"; }\n  static const char* NegatedDesc() { return \"isn't equal to\"; }\n};\ntemplate <typename Rhs>\nclass NeMatcher : public ComparisonBase<NeMatcher<Rhs>, Rhs, AnyNe> {\n public:\n  explicit NeMatcher(const Rhs& rhs)\n      : ComparisonBase<NeMatcher<Rhs>, Rhs, AnyNe>(rhs) { }\n  static const char* Desc() { return \"isn't equal to\"; }\n  static const char* NegatedDesc() { return \"is equal to\"; }\n};\ntemplate <typename Rhs>\nclass LtMatcher : public ComparisonBase<LtMatcher<Rhs>, Rhs, AnyLt> {\n public:\n  explicit LtMatcher(const Rhs& rhs)\n      : ComparisonBase<LtMatcher<Rhs>, Rhs, AnyLt>(rhs) { }\n  static const char* Desc() { return \"is <\"; }\n  static const char* NegatedDesc() { return \"isn't <\"; }\n};\ntemplate <typename Rhs>\nclass GtMatcher : public ComparisonBase<GtMatcher<Rhs>, Rhs, AnyGt> {\n public:\n  explicit GtMatcher(const Rhs& rhs)\n      : ComparisonBase<GtMatcher<Rhs>, Rhs, AnyGt>(rhs) { }\n  static const char* Desc() { return \"is >\"; }\n  static const char* NegatedDesc() { return \"isn't >\"; }\n};\ntemplate <typename Rhs>\nclass LeMatcher : public ComparisonBase<LeMatcher<Rhs>, Rhs, AnyLe> {\n public:\n  explicit LeMatcher(const Rhs& rhs)\n      : ComparisonBase<LeMatcher<Rhs>, Rhs, AnyLe>(rhs) { }\n  static const char* Desc() { return \"is <=\"; }\n  static const char* NegatedDesc() { return \"isn't <=\"; }\n};\ntemplate <typename Rhs>\nclass GeMatcher : public ComparisonBase<GeMatcher<Rhs>, Rhs, AnyGe> {\n public:\n  explicit GeMatcher(const Rhs& rhs)\n      : ComparisonBase<GeMatcher<Rhs>, Rhs, AnyGe>(rhs) { }\n  static const char* Desc() { return \"is >=\"; }\n  static const char* NegatedDesc() { return \"isn't >=\"; }\n};\n\n// Implements polymorphic matchers MatchesRegex(regex) and\n// ContainsRegex(regex), which can be used as a Matcher<T> as long as\n// T can be converted to a string.\nclass MatchesRegexMatcher {\n public:\n  MatchesRegexMatcher(const RE* regex, bool full_match)\n      : regex_(regex), full_match_(full_match) {}\n\n#if GTEST_HAS_ABSL\n  bool MatchAndExplain(const absl::string_view& s,\n                       MatchResultListener* listener) const {\n    return MatchAndExplain(string(s), listener);\n  }\n#endif  // GTEST_HAS_ABSL\n\n  // Accepts pointer types, particularly:\n  //   const char*\n  //   char*\n  //   const wchar_t*\n  //   wchar_t*\n  template <typename CharType>\n  bool MatchAndExplain(CharType* s, MatchResultListener* listener) const {\n    return s != nullptr && MatchAndExplain(std::string(s), listener);\n  }\n\n  // Matches anything that can convert to std::string.\n  //\n  // This is a template, not just a plain function with const std::string&,\n  // because absl::string_view has some interfering non-explicit constructors.\n  template <class MatcheeStringType>\n  bool MatchAndExplain(const MatcheeStringType& s,\n                       MatchResultListener* /* listener */) const {\n    const std::string& s2(s);\n    return full_match_ ? RE::FullMatch(s2, *regex_)\n                       : RE::PartialMatch(s2, *regex_);\n  }\n\n  void DescribeTo(::std::ostream* os) const {\n    *os << (full_match_ ? \"matches\" : \"contains\") << \" regular expression \";\n    UniversalPrinter<std::string>::Print(regex_->pattern(), os);\n  }\n\n  void DescribeNegationTo(::std::ostream* os) const {\n    *os << \"doesn't \" << (full_match_ ? \"match\" : \"contain\")\n        << \" regular expression \";\n    UniversalPrinter<std::string>::Print(regex_->pattern(), os);\n  }\n\n private:\n  const std::shared_ptr<const RE> regex_;\n  const bool full_match_;\n};\n}  // namespace internal\n\n// Matches a string that fully matches regular expression 'regex'.\n// The matcher takes ownership of 'regex'.\ninline PolymorphicMatcher<internal::MatchesRegexMatcher> MatchesRegex(\n    const internal::RE* regex) {\n  return MakePolymorphicMatcher(internal::MatchesRegexMatcher(regex, true));\n}\ninline PolymorphicMatcher<internal::MatchesRegexMatcher> MatchesRegex(\n    const std::string& regex) {\n  return MatchesRegex(new internal::RE(regex));\n}\n\n// Matches a string that contains regular expression 'regex'.\n// The matcher takes ownership of 'regex'.\ninline PolymorphicMatcher<internal::MatchesRegexMatcher> ContainsRegex(\n    const internal::RE* regex) {\n  return MakePolymorphicMatcher(internal::MatchesRegexMatcher(regex, false));\n}\ninline PolymorphicMatcher<internal::MatchesRegexMatcher> ContainsRegex(\n    const std::string& regex) {\n  return ContainsRegex(new internal::RE(regex));\n}\n\n// Creates a polymorphic matcher that matches anything equal to x.\n// Note: if the parameter of Eq() were declared as const T&, Eq(\"foo\")\n// wouldn't compile.\ntemplate <typename T>\ninline internal::EqMatcher<T> Eq(T x) { return internal::EqMatcher<T>(x); }\n\n// Constructs a Matcher<T> from a 'value' of type T.  The constructed\n// matcher matches any value that's equal to 'value'.\ntemplate <typename T>\nMatcher<T>::Matcher(T value) { *this = Eq(value); }\n\n// Creates a monomorphic matcher that matches anything with type Lhs\n// and equal to rhs.  A user may need to use this instead of Eq(...)\n// in order to resolve an overloading ambiguity.\n//\n// TypedEq<T>(x) is just a convenient short-hand for Matcher<T>(Eq(x))\n// or Matcher<T>(x), but more readable than the latter.\n//\n// We could define similar monomorphic matchers for other comparison\n// operations (e.g. TypedLt, TypedGe, and etc), but decided not to do\n// it yet as those are used much less than Eq() in practice.  A user\n// can always write Matcher<T>(Lt(5)) to be explicit about the type,\n// for example.\ntemplate <typename Lhs, typename Rhs>\ninline Matcher<Lhs> TypedEq(const Rhs& rhs) { return Eq(rhs); }\n\n// Creates a polymorphic matcher that matches anything >= x.\ntemplate <typename Rhs>\ninline internal::GeMatcher<Rhs> Ge(Rhs x) {\n  return internal::GeMatcher<Rhs>(x);\n}\n\n// Creates a polymorphic matcher that matches anything > x.\ntemplate <typename Rhs>\ninline internal::GtMatcher<Rhs> Gt(Rhs x) {\n  return internal::GtMatcher<Rhs>(x);\n}\n\n// Creates a polymorphic matcher that matches anything <= x.\ntemplate <typename Rhs>\ninline internal::LeMatcher<Rhs> Le(Rhs x) {\n  return internal::LeMatcher<Rhs>(x);\n}\n\n// Creates a polymorphic matcher that matches anything < x.\ntemplate <typename Rhs>\ninline internal::LtMatcher<Rhs> Lt(Rhs x) {\n  return internal::LtMatcher<Rhs>(x);\n}\n\n// Creates a polymorphic matcher that matches anything != x.\ntemplate <typename Rhs>\ninline internal::NeMatcher<Rhs> Ne(Rhs x) {\n  return internal::NeMatcher<Rhs>(x);\n}\n}  // namespace testing\n\nGTEST_DISABLE_MSC_WARNINGS_POP_()  //  4251 5046\n\n#endif  // GTEST_INCLUDE_GTEST_GTEST_MATCHERS_H_\n\n#include <stdio.h>\n#include <memory>\n\nnamespace testing {\nnamespace internal {\n\nGTEST_DECLARE_string_(internal_run_death_test);\n\n// Names of the flags (needed for parsing Google Test flags).\nconst char kDeathTestStyleFlag[] = \"death_test_style\";\nconst char kDeathTestUseFork[] = \"death_test_use_fork\";\nconst char kInternalRunDeathTestFlag[] = \"internal_run_death_test\";\n\n#if GTEST_HAS_DEATH_TEST\n\nGTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \\\n/* class A needs to have dll-interface to be used by clients of class B */)\n\n// DeathTest is a class that hides much of the complexity of the\n// GTEST_DEATH_TEST_ macro.  It is abstract; its static Create method\n// returns a concrete class that depends on the prevailing death test\n// style, as defined by the --gtest_death_test_style and/or\n// --gtest_internal_run_death_test flags.\n\n// In describing the results of death tests, these terms are used with\n// the corresponding definitions:\n//\n// exit status:  The integer exit information in the format specified\n//               by wait(2)\n// exit code:    The integer code passed to exit(3), _exit(2), or\n//               returned from main()\nclass GTEST_API_ DeathTest {\n public:\n  // Create returns false if there was an error determining the\n  // appropriate action to take for the current death test; for example,\n  // if the gtest_death_test_style flag is set to an invalid value.\n  // The LastMessage method will return a more detailed message in that\n  // case.  Otherwise, the DeathTest pointer pointed to by the \"test\"\n  // argument is set.  If the death test should be skipped, the pointer\n  // is set to NULL; otherwise, it is set to the address of a new concrete\n  // DeathTest object that controls the execution of the current test.\n  static bool Create(const char* statement, Matcher<const std::string&> matcher,\n                     const char* file, int line, DeathTest** test);\n  DeathTest();\n  virtual ~DeathTest() { }\n\n  // A helper class that aborts a death test when it's deleted.\n  class ReturnSentinel {\n   public:\n    explicit ReturnSentinel(DeathTest* test) : test_(test) { }\n    ~ReturnSentinel() { test_->Abort(TEST_ENCOUNTERED_RETURN_STATEMENT); }\n   private:\n    DeathTest* const test_;\n    GTEST_DISALLOW_COPY_AND_ASSIGN_(ReturnSentinel);\n  } GTEST_ATTRIBUTE_UNUSED_;\n\n  // An enumeration of possible roles that may be taken when a death\n  // test is encountered.  EXECUTE means that the death test logic should\n  // be executed immediately.  OVERSEE means that the program should prepare\n  // the appropriate environment for a child process to execute the death\n  // test, then wait for it to complete.\n  enum TestRole { OVERSEE_TEST, EXECUTE_TEST };\n\n  // An enumeration of the three reasons that a test might be aborted.\n  enum AbortReason {\n    TEST_ENCOUNTERED_RETURN_STATEMENT,\n    TEST_THREW_EXCEPTION,\n    TEST_DID_NOT_DIE\n  };\n\n  // Assumes one of the above roles.\n  virtual TestRole AssumeRole() = 0;\n\n  // Waits for the death test to finish and returns its status.\n  virtual int Wait() = 0;\n\n  // Returns true if the death test passed; that is, the test process\n  // exited during the test, its exit status matches a user-supplied\n  // predicate, and its stderr output matches a user-supplied regular\n  // expression.\n  // The user-supplied predicate may be a macro expression rather\n  // than a function pointer or functor, or else Wait and Passed could\n  // be combined.\n  virtual bool Passed(bool exit_status_ok) = 0;\n\n  // Signals that the death test did not die as expected.\n  virtual void Abort(AbortReason reason) = 0;\n\n  // Returns a human-readable outcome message regarding the outcome of\n  // the last death test.\n  static const char* LastMessage();\n\n  static void set_last_death_test_message(const std::string& message);\n\n private:\n  // A string containing a description of the outcome of the last death test.\n  static std::string last_death_test_message_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(DeathTest);\n};\n\nGTEST_DISABLE_MSC_WARNINGS_POP_()  //  4251\n\n// Factory interface for death tests.  May be mocked out for testing.\nclass DeathTestFactory {\n public:\n  virtual ~DeathTestFactory() { }\n  virtual bool Create(const char* statement,\n                      Matcher<const std::string&> matcher, const char* file,\n                      int line, DeathTest** test) = 0;\n};\n\n// A concrete DeathTestFactory implementation for normal use.\nclass DefaultDeathTestFactory : public DeathTestFactory {\n public:\n  bool Create(const char* statement, Matcher<const std::string&> matcher,\n              const char* file, int line, DeathTest** test) override;\n};\n\n// Returns true if exit_status describes a process that was terminated\n// by a signal, or exited normally with a nonzero exit code.\nGTEST_API_ bool ExitedUnsuccessfully(int exit_status);\n\n// A string passed to EXPECT_DEATH (etc.) is caught by one of these overloads\n// and interpreted as a regex (rather than an Eq matcher) for legacy\n// compatibility.\ninline Matcher<const ::std::string&> MakeDeathTestMatcher(\n    ::testing::internal::RE regex) {\n  return ContainsRegex(regex.pattern());\n}\ninline Matcher<const ::std::string&> MakeDeathTestMatcher(const char* regex) {\n  return ContainsRegex(regex);\n}\ninline Matcher<const ::std::string&> MakeDeathTestMatcher(\n    const ::std::string& regex) {\n  return ContainsRegex(regex);\n}\n#if GTEST_HAS_GLOBAL_STRING\ninline Matcher<const ::std::string&> MakeDeathTestMatcher(\n    const ::string& regex) {\n  return ContainsRegex(regex);\n}\n#endif\n\n// If a Matcher<const ::std::string&> is passed to EXPECT_DEATH (etc.), it's\n// used directly.\ninline Matcher<const ::std::string&> MakeDeathTestMatcher(\n    Matcher<const ::std::string&> matcher) {\n  return matcher;\n}\n\n// Traps C++ exceptions escaping statement and reports them as test\n// failures. Note that trapping SEH exceptions is not implemented here.\n# if GTEST_HAS_EXCEPTIONS\n#  define GTEST_EXECUTE_DEATH_TEST_STATEMENT_(statement, death_test) \\\n  try { \\\n    GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \\\n  } catch (const ::std::exception& gtest_exception) { \\\n    fprintf(\\\n        stderr, \\\n        \"\\n%s: Caught std::exception-derived exception escaping the \" \\\n        \"death test statement. Exception message: %s\\n\", \\\n        ::testing::internal::FormatFileLocation(__FILE__, __LINE__).c_str(), \\\n        gtest_exception.what()); \\\n    fflush(stderr); \\\n    death_test->Abort(::testing::internal::DeathTest::TEST_THREW_EXCEPTION); \\\n  } catch (...) { \\\n    death_test->Abort(::testing::internal::DeathTest::TEST_THREW_EXCEPTION); \\\n  }\n\n# else\n#  define GTEST_EXECUTE_DEATH_TEST_STATEMENT_(statement, death_test) \\\n  GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement)\n\n# endif\n\n// This macro is for implementing ASSERT_DEATH*, EXPECT_DEATH*,\n// ASSERT_EXIT*, and EXPECT_EXIT*.\n#define GTEST_DEATH_TEST_(statement, predicate, regex_or_matcher, fail)        \\\n  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                                \\\n  if (::testing::internal::AlwaysTrue()) {                                     \\\n    ::testing::internal::DeathTest* gtest_dt;                                  \\\n    if (!::testing::internal::DeathTest::Create(                               \\\n            #statement,                                                        \\\n            ::testing::internal::MakeDeathTestMatcher(regex_or_matcher),       \\\n            __FILE__, __LINE__, &gtest_dt)) {                                  \\\n      goto GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__);                        \\\n    }                                                                          \\\n    if (gtest_dt != nullptr) {                                                 \\\n      std::unique_ptr< ::testing::internal::DeathTest> gtest_dt_ptr(gtest_dt); \\\n      switch (gtest_dt->AssumeRole()) {                                        \\\n        case ::testing::internal::DeathTest::OVERSEE_TEST:                     \\\n          if (!gtest_dt->Passed(predicate(gtest_dt->Wait()))) {                \\\n            goto GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__);                  \\\n          }                                                                    \\\n          break;                                                               \\\n        case ::testing::internal::DeathTest::EXECUTE_TEST: {                   \\\n          ::testing::internal::DeathTest::ReturnSentinel gtest_sentinel(       \\\n              gtest_dt);                                                       \\\n          GTEST_EXECUTE_DEATH_TEST_STATEMENT_(statement, gtest_dt);            \\\n          gtest_dt->Abort(::testing::internal::DeathTest::TEST_DID_NOT_DIE);   \\\n          break;                                                               \\\n        }                                                                      \\\n        default:                                                               \\\n          break;                                                               \\\n      }                                                                        \\\n    }                                                                          \\\n  } else                                                                       \\\n    GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__)                                \\\n        : fail(::testing::internal::DeathTest::LastMessage())\n// The symbol \"fail\" here expands to something into which a message\n// can be streamed.\n\n// This macro is for implementing ASSERT/EXPECT_DEBUG_DEATH when compiled in\n// NDEBUG mode. In this case we need the statements to be executed and the macro\n// must accept a streamed message even though the message is never printed.\n// The regex object is not evaluated, but it is used to prevent \"unused\"\n// warnings and to avoid an expression that doesn't compile in debug mode.\n#define GTEST_EXECUTE_STATEMENT_(statement, regex_or_matcher)    \\\n  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                  \\\n  if (::testing::internal::AlwaysTrue()) {                       \\\n    GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement);   \\\n  } else if (!::testing::internal::AlwaysTrue()) {               \\\n    ::testing::internal::MakeDeathTestMatcher(regex_or_matcher); \\\n  } else                                                         \\\n    ::testing::Message()\n\n// A class representing the parsed contents of the\n// --gtest_internal_run_death_test flag, as it existed when\n// RUN_ALL_TESTS was called.\nclass InternalRunDeathTestFlag {\n public:\n  InternalRunDeathTestFlag(const std::string& a_file,\n                           int a_line,\n                           int an_index,\n                           int a_write_fd)\n      : file_(a_file), line_(a_line), index_(an_index),\n        write_fd_(a_write_fd) {}\n\n  ~InternalRunDeathTestFlag() {\n    if (write_fd_ >= 0)\n      posix::Close(write_fd_);\n  }\n\n  const std::string& file() const { return file_; }\n  int line() const { return line_; }\n  int index() const { return index_; }\n  int write_fd() const { return write_fd_; }\n\n private:\n  std::string file_;\n  int line_;\n  int index_;\n  int write_fd_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(InternalRunDeathTestFlag);\n};\n\n// Returns a newly created InternalRunDeathTestFlag object with fields\n// initialized from the GTEST_FLAG(internal_run_death_test) flag if\n// the flag is specified; otherwise returns NULL.\nInternalRunDeathTestFlag* ParseInternalRunDeathTestFlag();\n\n#endif  // GTEST_HAS_DEATH_TEST\n\n}  // namespace internal\n}  // namespace testing\n\n#endif  // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_\n\nnamespace testing {\n\n// This flag controls the style of death tests.  Valid values are \"threadsafe\",\n// meaning that the death test child process will re-execute the test binary\n// from the start, running only a single death test, or \"fast\",\n// meaning that the child process will execute the test logic immediately\n// after forking.\nGTEST_DECLARE_string_(death_test_style);\n\n#if GTEST_HAS_DEATH_TEST\n\nnamespace internal {\n\n// Returns a Boolean value indicating whether the caller is currently\n// executing in the context of the death test child process.  Tools such as\n// Valgrind heap checkers may need this to modify their behavior in death\n// tests.  IMPORTANT: This is an internal utility.  Using it may break the\n// implementation of death tests.  User code MUST NOT use it.\nGTEST_API_ bool InDeathTestChild();\n\n}  // namespace internal\n\n// The following macros are useful for writing death tests.\n\n// Here's what happens when an ASSERT_DEATH* or EXPECT_DEATH* is\n// executed:\n//\n//   1. It generates a warning if there is more than one active\n//   thread.  This is because it's safe to fork() or clone() only\n//   when there is a single thread.\n//\n//   2. The parent process clone()s a sub-process and runs the death\n//   test in it; the sub-process exits with code 0 at the end of the\n//   death test, if it hasn't exited already.\n//\n//   3. The parent process waits for the sub-process to terminate.\n//\n//   4. The parent process checks the exit code and error message of\n//   the sub-process.\n//\n// Examples:\n//\n//   ASSERT_DEATH(server.SendMessage(56, \"Hello\"), \"Invalid port number\");\n//   for (int i = 0; i < 5; i++) {\n//     EXPECT_DEATH(server.ProcessRequest(i),\n//                  \"Invalid request .* in ProcessRequest()\")\n//                  << \"Failed to die on request \" << i;\n//   }\n//\n//   ASSERT_EXIT(server.ExitNow(), ::testing::ExitedWithCode(0), \"Exiting\");\n//\n//   bool KilledBySIGHUP(int exit_code) {\n//     return WIFSIGNALED(exit_code) && WTERMSIG(exit_code) == SIGHUP;\n//   }\n//\n//   ASSERT_EXIT(client.HangUpServer(), KilledBySIGHUP, \"Hanging up!\");\n//\n// On the regular expressions used in death tests:\n//\n//   GOOGLETEST_CM0005 DO NOT DELETE\n//   On POSIX-compliant systems (*nix), we use the <regex.h> library,\n//   which uses the POSIX extended regex syntax.\n//\n//   On other platforms (e.g. Windows or Mac), we only support a simple regex\n//   syntax implemented as part of Google Test.  This limited\n//   implementation should be enough most of the time when writing\n//   death tests; though it lacks many features you can find in PCRE\n//   or POSIX extended regex syntax.  For example, we don't support\n//   union (\"x|y\"), grouping (\"(xy)\"), brackets (\"[xy]\"), and\n//   repetition count (\"x{5,7}\"), among others.\n//\n//   Below is the syntax that we do support.  We chose it to be a\n//   subset of both PCRE and POSIX extended regex, so it's easy to\n//   learn wherever you come from.  In the following: 'A' denotes a\n//   literal character, period (.), or a single \\\\ escape sequence;\n//   'x' and 'y' denote regular expressions; 'm' and 'n' are for\n//   natural numbers.\n//\n//     c     matches any literal character c\n//     \\\\d   matches any decimal digit\n//     \\\\D   matches any character that's not a decimal digit\n//     \\\\f   matches \\f\n//     \\\\n   matches \\n\n//     \\\\r   matches \\r\n//     \\\\s   matches any ASCII whitespace, including \\n\n//     \\\\S   matches any character that's not a whitespace\n//     \\\\t   matches \\t\n//     \\\\v   matches \\v\n//     \\\\w   matches any letter, _, or decimal digit\n//     \\\\W   matches any character that \\\\w doesn't match\n//     \\\\c   matches any literal character c, which must be a punctuation\n//     .     matches any single character except \\n\n//     A?    matches 0 or 1 occurrences of A\n//     A*    matches 0 or many occurrences of A\n//     A+    matches 1 or many occurrences of A\n//     ^     matches the beginning of a string (not that of each line)\n//     $     matches the end of a string (not that of each line)\n//     xy    matches x followed by y\n//\n//   If you accidentally use PCRE or POSIX extended regex features\n//   not implemented by us, you will get a run-time failure.  In that\n//   case, please try to rewrite your regular expression within the\n//   above syntax.\n//\n//   This implementation is *not* meant to be as highly tuned or robust\n//   as a compiled regex library, but should perform well enough for a\n//   death test, which already incurs significant overhead by launching\n//   a child process.\n//\n// Known caveats:\n//\n//   A \"threadsafe\" style death test obtains the path to the test\n//   program from argv[0] and re-executes it in the sub-process.  For\n//   simplicity, the current implementation doesn't search the PATH\n//   when launching the sub-process.  This means that the user must\n//   invoke the test program via a path that contains at least one\n//   path separator (e.g. path/to/foo_test and\n//   /absolute/path/to/bar_test are fine, but foo_test is not).  This\n//   is rarely a problem as people usually don't put the test binary\n//   directory in PATH.\n//\n\n// Asserts that a given statement causes the program to exit, with an\n// integer exit status that satisfies predicate, and emitting error output\n// that matches regex.\n# define ASSERT_EXIT(statement, predicate, regex) \\\n    GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_FATAL_FAILURE_)\n\n// Like ASSERT_EXIT, but continues on to successive tests in the\n// test suite, if any:\n# define EXPECT_EXIT(statement, predicate, regex) \\\n    GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_NONFATAL_FAILURE_)\n\n// Asserts that a given statement causes the program to exit, either by\n// explicitly exiting with a nonzero exit code or being killed by a\n// signal, and emitting error output that matches regex.\n# define ASSERT_DEATH(statement, regex) \\\n    ASSERT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, regex)\n\n// Like ASSERT_DEATH, but continues on to successive tests in the\n// test suite, if any:\n# define EXPECT_DEATH(statement, regex) \\\n    EXPECT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, regex)\n\n// Two predicate classes that can be used in {ASSERT,EXPECT}_EXIT*:\n\n// Tests that an exit code describes a normal exit with a given exit code.\nclass GTEST_API_ ExitedWithCode {\n public:\n  explicit ExitedWithCode(int exit_code);\n  bool operator()(int exit_status) const;\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ExitedWithCode& other);\n\n  const int exit_code_;\n};\n\n# if !GTEST_OS_WINDOWS && !GTEST_OS_FUCHSIA\n// Tests that an exit code describes an exit due to termination by a\n// given signal.\n// GOOGLETEST_CM0006 DO NOT DELETE\nclass GTEST_API_ KilledBySignal {\n public:\n  explicit KilledBySignal(int signum);\n  bool operator()(int exit_status) const;\n private:\n  const int signum_;\n};\n# endif  // !GTEST_OS_WINDOWS\n\n// EXPECT_DEBUG_DEATH asserts that the given statements die in debug mode.\n// The death testing framework causes this to have interesting semantics,\n// since the sideeffects of the call are only visible in opt mode, and not\n// in debug mode.\n//\n// In practice, this can be used to test functions that utilize the\n// LOG(DFATAL) macro using the following style:\n//\n// int DieInDebugOr12(int* sideeffect) {\n//   if (sideeffect) {\n//     *sideeffect = 12;\n//   }\n//   LOG(DFATAL) << \"death\";\n//   return 12;\n// }\n//\n// TEST(TestSuite, TestDieOr12WorksInDgbAndOpt) {\n//   int sideeffect = 0;\n//   // Only asserts in dbg.\n//   EXPECT_DEBUG_DEATH(DieInDebugOr12(&sideeffect), \"death\");\n//\n// #ifdef NDEBUG\n//   // opt-mode has sideeffect visible.\n//   EXPECT_EQ(12, sideeffect);\n// #else\n//   // dbg-mode no visible sideeffect.\n//   EXPECT_EQ(0, sideeffect);\n// #endif\n// }\n//\n// This will assert that DieInDebugReturn12InOpt() crashes in debug\n// mode, usually due to a DCHECK or LOG(DFATAL), but returns the\n// appropriate fallback value (12 in this case) in opt mode. If you\n// need to test that a function has appropriate side-effects in opt\n// mode, include assertions against the side-effects.  A general\n// pattern for this is:\n//\n// EXPECT_DEBUG_DEATH({\n//   // Side-effects here will have an effect after this statement in\n//   // opt mode, but none in debug mode.\n//   EXPECT_EQ(12, DieInDebugOr12(&sideeffect));\n// }, \"death\");\n//\n# ifdef NDEBUG\n\n#  define EXPECT_DEBUG_DEATH(statement, regex) \\\n  GTEST_EXECUTE_STATEMENT_(statement, regex)\n\n#  define ASSERT_DEBUG_DEATH(statement, regex) \\\n  GTEST_EXECUTE_STATEMENT_(statement, regex)\n\n# else\n\n#  define EXPECT_DEBUG_DEATH(statement, regex) \\\n  EXPECT_DEATH(statement, regex)\n\n#  define ASSERT_DEBUG_DEATH(statement, regex) \\\n  ASSERT_DEATH(statement, regex)\n\n# endif  // NDEBUG for EXPECT_DEBUG_DEATH\n#endif  // GTEST_HAS_DEATH_TEST\n\n// This macro is used for implementing macros such as\n// EXPECT_DEATH_IF_SUPPORTED and ASSERT_DEATH_IF_SUPPORTED on systems where\n// death tests are not supported. Those macros must compile on such systems\n// iff EXPECT_DEATH and ASSERT_DEATH compile with the same parameters on\n// systems that support death tests. This allows one to write such a macro\n// on a system that does not support death tests and be sure that it will\n// compile on a death-test supporting system. It is exposed publicly so that\n// systems that have death-tests with stricter requirements than\n// GTEST_HAS_DEATH_TEST can write their own equivalent of\n// EXPECT_DEATH_IF_SUPPORTED and ASSERT_DEATH_IF_SUPPORTED.\n//\n// Parameters:\n//   statement -  A statement that a macro such as EXPECT_DEATH would test\n//                for program termination. This macro has to make sure this\n//                statement is compiled but not executed, to ensure that\n//                EXPECT_DEATH_IF_SUPPORTED compiles with a certain\n//                parameter iff EXPECT_DEATH compiles with it.\n//   regex     -  A regex that a macro such as EXPECT_DEATH would use to test\n//                the output of statement.  This parameter has to be\n//                compiled but not evaluated by this macro, to ensure that\n//                this macro only accepts expressions that a macro such as\n//                EXPECT_DEATH would accept.\n//   terminator - Must be an empty statement for EXPECT_DEATH_IF_SUPPORTED\n//                and a return statement for ASSERT_DEATH_IF_SUPPORTED.\n//                This ensures that ASSERT_DEATH_IF_SUPPORTED will not\n//                compile inside functions where ASSERT_DEATH doesn't\n//                compile.\n//\n//  The branch that has an always false condition is used to ensure that\n//  statement and regex are compiled (and thus syntactically correct) but\n//  never executed. The unreachable code macro protects the terminator\n//  statement from generating an 'unreachable code' warning in case\n//  statement unconditionally returns or throws. The Message constructor at\n//  the end allows the syntax of streaming additional messages into the\n//  macro, for compilational compatibility with EXPECT_DEATH/ASSERT_DEATH.\n# define GTEST_UNSUPPORTED_DEATH_TEST(statement, regex, terminator) \\\n    GTEST_AMBIGUOUS_ELSE_BLOCKER_ \\\n    if (::testing::internal::AlwaysTrue()) { \\\n      GTEST_LOG_(WARNING) \\\n          << \"Death tests are not supported on this platform.\\n\" \\\n          << \"Statement '\" #statement \"' cannot be verified.\"; \\\n    } else if (::testing::internal::AlwaysFalse()) { \\\n      ::testing::internal::RE::PartialMatch(\".*\", (regex)); \\\n      GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \\\n      terminator; \\\n    } else \\\n      ::testing::Message()\n\n// EXPECT_DEATH_IF_SUPPORTED(statement, regex) and\n// ASSERT_DEATH_IF_SUPPORTED(statement, regex) expand to real death tests if\n// death tests are supported; otherwise they just issue a warning.  This is\n// useful when you are combining death test assertions with normal test\n// assertions in one test.\n#if GTEST_HAS_DEATH_TEST\n# define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \\\n    EXPECT_DEATH(statement, regex)\n# define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \\\n    ASSERT_DEATH(statement, regex)\n#else\n# define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \\\n    GTEST_UNSUPPORTED_DEATH_TEST(statement, regex, )\n# define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \\\n    GTEST_UNSUPPORTED_DEATH_TEST(statement, regex, return)\n#endif\n\n}  // namespace testing\n\n#endif  // GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_\n// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Macros and functions for implementing parameterized tests\n// in Google C++ Testing and Mocking Framework (Google Test)\n//\n// This file is generated by a SCRIPT.  DO NOT EDIT BY HAND!\n//\n// GOOGLETEST_CM0001 DO NOT DELETE\n#ifndef GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_\n#define GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_\n\n\n// Value-parameterized tests allow you to test your code with different\n// parameters without writing multiple copies of the same test.\n//\n// Here is how you use value-parameterized tests:\n\n#if 0\n\n// To write value-parameterized tests, first you should define a fixture\n// class. It is usually derived from testing::TestWithParam<T> (see below for\n// another inheritance scheme that's sometimes useful in more complicated\n// class hierarchies), where the type of your parameter values.\n// TestWithParam<T> is itself derived from testing::Test. T can be any\n// copyable type. If it's a raw pointer, you are responsible for managing the\n// lifespan of the pointed values.\n\nclass FooTest : public ::testing::TestWithParam<const char*> {\n  // You can implement all the usual class fixture members here.\n};\n\n// Then, use the TEST_P macro to define as many parameterized tests\n// for this fixture as you want. The _P suffix is for \"parameterized\"\n// or \"pattern\", whichever you prefer to think.\n\nTEST_P(FooTest, DoesBlah) {\n  // Inside a test, access the test parameter with the GetParam() method\n  // of the TestWithParam<T> class:\n  EXPECT_TRUE(foo.Blah(GetParam()));\n  ...\n}\n\nTEST_P(FooTest, HasBlahBlah) {\n  ...\n}\n\n// Finally, you can use INSTANTIATE_TEST_SUITE_P to instantiate the test\n// case with any set of parameters you want. Google Test defines a number\n// of functions for generating test parameters. They return what we call\n// (surprise!) parameter generators. Here is a summary of them, which\n// are all in the testing namespace:\n//\n//\n//  Range(begin, end [, step]) - Yields values {begin, begin+step,\n//                               begin+step+step, ...}. The values do not\n//                               include end. step defaults to 1.\n//  Values(v1, v2, ..., vN)    - Yields values {v1, v2, ..., vN}.\n//  ValuesIn(container)        - Yields values from a C-style array, an STL\n//  ValuesIn(begin,end)          container, or an iterator range [begin, end).\n//  Bool()                     - Yields sequence {false, true}.\n//  Combine(g1, g2, ..., gN)   - Yields all combinations (the Cartesian product\n//                               for the math savvy) of the values generated\n//                               by the N generators.\n//\n// For more details, see comments at the definitions of these functions below\n// in this file.\n//\n// The following statement will instantiate tests from the FooTest test suite\n// each with parameter values \"meeny\", \"miny\", and \"moe\".\n\nINSTANTIATE_TEST_SUITE_P(InstantiationName,\n                         FooTest,\n                         Values(\"meeny\", \"miny\", \"moe\"));\n\n// To distinguish different instances of the pattern, (yes, you\n// can instantiate it more then once) the first argument to the\n// INSTANTIATE_TEST_SUITE_P macro is a prefix that will be added to the\n// actual test suite name. Remember to pick unique prefixes for different\n// instantiations. The tests from the instantiation above will have\n// these names:\n//\n//    * InstantiationName/FooTest.DoesBlah/0 for \"meeny\"\n//    * InstantiationName/FooTest.DoesBlah/1 for \"miny\"\n//    * InstantiationName/FooTest.DoesBlah/2 for \"moe\"\n//    * InstantiationName/FooTest.HasBlahBlah/0 for \"meeny\"\n//    * InstantiationName/FooTest.HasBlahBlah/1 for \"miny\"\n//    * InstantiationName/FooTest.HasBlahBlah/2 for \"moe\"\n//\n// You can use these names in --gtest_filter.\n//\n// This statement will instantiate all tests from FooTest again, each\n// with parameter values \"cat\" and \"dog\":\n\nconst char* pets[] = {\"cat\", \"dog\"};\nINSTANTIATE_TEST_SUITE_P(AnotherInstantiationName, FooTest, ValuesIn(pets));\n\n// The tests from the instantiation above will have these names:\n//\n//    * AnotherInstantiationName/FooTest.DoesBlah/0 for \"cat\"\n//    * AnotherInstantiationName/FooTest.DoesBlah/1 for \"dog\"\n//    * AnotherInstantiationName/FooTest.HasBlahBlah/0 for \"cat\"\n//    * AnotherInstantiationName/FooTest.HasBlahBlah/1 for \"dog\"\n//\n// Please note that INSTANTIATE_TEST_SUITE_P will instantiate all tests\n// in the given test suite, whether their definitions come before or\n// AFTER the INSTANTIATE_TEST_SUITE_P statement.\n//\n// Please also note that generator expressions (including parameters to the\n// generators) are evaluated in InitGoogleTest(), after main() has started.\n// This allows the user on one hand, to adjust generator parameters in order\n// to dynamically determine a set of tests to run and on the other hand,\n// give the user a chance to inspect the generated tests with Google Test\n// reflection API before RUN_ALL_TESTS() is executed.\n//\n// You can see samples/sample7_unittest.cc and samples/sample8_unittest.cc\n// for more examples.\n//\n// In the future, we plan to publish the API for defining new parameter\n// generators. But for now this interface remains part of the internal\n// implementation and is subject to change.\n//\n//\n// A parameterized test fixture must be derived from testing::Test and from\n// testing::WithParamInterface<T>, where T is the type of the parameter\n// values. Inheriting from TestWithParam<T> satisfies that requirement because\n// TestWithParam<T> inherits from both Test and WithParamInterface. In more\n// complicated hierarchies, however, it is occasionally useful to inherit\n// separately from Test and WithParamInterface. For example:\n\nclass BaseTest : public ::testing::Test {\n  // You can inherit all the usual members for a non-parameterized test\n  // fixture here.\n};\n\nclass DerivedTest : public BaseTest, public ::testing::WithParamInterface<int> {\n  // The usual test fixture members go here too.\n};\n\nTEST_F(BaseTest, HasFoo) {\n  // This is an ordinary non-parameterized test.\n}\n\nTEST_P(DerivedTest, DoesBlah) {\n  // GetParam works just the same here as if you inherit from TestWithParam.\n  EXPECT_TRUE(foo.Blah(GetParam()));\n}\n\n#endif  // 0\n\n#include <utility>\n\n// Copyright 2008 Google Inc.\n// All Rights Reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n// Type and function utilities for implementing parameterized tests.\n\n// GOOGLETEST_CM0001 DO NOT DELETE\n\n#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_\n#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_\n\n#include <ctype.h>\n\n#include <cassert>\n#include <iterator>\n#include <memory>\n#include <set>\n#include <tuple>\n#include <utility>\n#include <vector>\n\n\nnamespace testing {\n// Input to a parameterized test name generator, describing a test parameter.\n// Consists of the parameter value and the integer parameter index.\ntemplate <class ParamType>\nstruct TestParamInfo {\n  TestParamInfo(const ParamType& a_param, size_t an_index) :\n    param(a_param),\n    index(an_index) {}\n  ParamType param;\n  size_t index;\n};\n\n// A builtin parameterized test name generator which returns the result of\n// testing::PrintToString.\nstruct PrintToStringParamName {\n  template <class ParamType>\n  std::string operator()(const TestParamInfo<ParamType>& info) const {\n    return PrintToString(info.param);\n  }\n};\n\nnamespace internal {\n\n// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.\n// Utility Functions\n\n// Outputs a message explaining invalid registration of different\n// fixture class for the same test suite. This may happen when\n// TEST_P macro is used to define two tests with the same name\n// but in different namespaces.\nGTEST_API_ void ReportInvalidTestSuiteType(const char* test_suite_name,\n                                           CodeLocation code_location);\n\ntemplate <typename> class ParamGeneratorInterface;\ntemplate <typename> class ParamGenerator;\n\n// Interface for iterating over elements provided by an implementation\n// of ParamGeneratorInterface<T>.\ntemplate <typename T>\nclass ParamIteratorInterface {\n public:\n  virtual ~ParamIteratorInterface() {}\n  // A pointer to the base generator instance.\n  // Used only for the purposes of iterator comparison\n  // to make sure that two iterators belong to the same generator.\n  virtual const ParamGeneratorInterface<T>* BaseGenerator() const = 0;\n  // Advances iterator to point to the next element\n  // provided by the generator. The caller is responsible\n  // for not calling Advance() on an iterator equal to\n  // BaseGenerator()->End().\n  virtual void Advance() = 0;\n  // Clones the iterator object. Used for implementing copy semantics\n  // of ParamIterator<T>.\n  virtual ParamIteratorInterface* Clone() const = 0;\n  // Dereferences the current iterator and provides (read-only) access\n  // to the pointed value. It is the caller's responsibility not to call\n  // Current() on an iterator equal to BaseGenerator()->End().\n  // Used for implementing ParamGenerator<T>::operator*().\n  virtual const T* Current() const = 0;\n  // Determines whether the given iterator and other point to the same\n  // element in the sequence generated by the generator.\n  // Used for implementing ParamGenerator<T>::operator==().\n  virtual bool Equals(const ParamIteratorInterface& other) const = 0;\n};\n\n// Class iterating over elements provided by an implementation of\n// ParamGeneratorInterface<T>. It wraps ParamIteratorInterface<T>\n// and implements the const forward iterator concept.\ntemplate <typename T>\nclass ParamIterator {\n public:\n  typedef T value_type;\n  typedef const T& reference;\n  typedef ptrdiff_t difference_type;\n\n  // ParamIterator assumes ownership of the impl_ pointer.\n  ParamIterator(const ParamIterator& other) : impl_(other.impl_->Clone()) {}\n  ParamIterator& operator=(const ParamIterator& other) {\n    if (this != &other)\n      impl_.reset(other.impl_->Clone());\n    return *this;\n  }\n\n  const T& operator*() const { return *impl_->Current(); }\n  const T* operator->() const { return impl_->Current(); }\n  // Prefix version of operator++.\n  ParamIterator& operator++() {\n    impl_->Advance();\n    return *this;\n  }\n  // Postfix version of operator++.\n  ParamIterator operator++(int /*unused*/) {\n    ParamIteratorInterface<T>* clone = impl_->Clone();\n    impl_->Advance();\n    return ParamIterator(clone);\n  }\n  bool operator==(const ParamIterator& other) const {\n    return impl_.get() == other.impl_.get() || impl_->Equals(*other.impl_);\n  }\n  bool operator!=(const ParamIterator& other) const {\n    return !(*this == other);\n  }\n\n private:\n  friend class ParamGenerator<T>;\n  explicit ParamIterator(ParamIteratorInterface<T>* impl) : impl_(impl) {}\n  std::unique_ptr<ParamIteratorInterface<T> > impl_;\n};\n\n// ParamGeneratorInterface<T> is the binary interface to access generators\n// defined in other translation units.\ntemplate <typename T>\nclass ParamGeneratorInterface {\n public:\n  typedef T ParamType;\n\n  virtual ~ParamGeneratorInterface() {}\n\n  // Generator interface definition\n  virtual ParamIteratorInterface<T>* Begin() const = 0;\n  virtual ParamIteratorInterface<T>* End() const = 0;\n};\n\n// Wraps ParamGeneratorInterface<T> and provides general generator syntax\n// compatible with the STL Container concept.\n// This class implements copy initialization semantics and the contained\n// ParamGeneratorInterface<T> instance is shared among all copies\n// of the original object. This is possible because that instance is immutable.\ntemplate<typename T>\nclass ParamGenerator {\n public:\n  typedef ParamIterator<T> iterator;\n\n  explicit ParamGenerator(ParamGeneratorInterface<T>* impl) : impl_(impl) {}\n  ParamGenerator(const ParamGenerator& other) : impl_(other.impl_) {}\n\n  ParamGenerator& operator=(const ParamGenerator& other) {\n    impl_ = other.impl_;\n    return *this;\n  }\n\n  iterator begin() const { return iterator(impl_->Begin()); }\n  iterator end() const { return iterator(impl_->End()); }\n\n private:\n  std::shared_ptr<const ParamGeneratorInterface<T> > impl_;\n};\n\n// Generates values from a range of two comparable values. Can be used to\n// generate sequences of user-defined types that implement operator+() and\n// operator<().\n// This class is used in the Range() function.\ntemplate <typename T, typename IncrementT>\nclass RangeGenerator : public ParamGeneratorInterface<T> {\n public:\n  RangeGenerator(T begin, T end, IncrementT step)\n      : begin_(begin), end_(end),\n        step_(step), end_index_(CalculateEndIndex(begin, end, step)) {}\n  ~RangeGenerator() override {}\n\n  ParamIteratorInterface<T>* Begin() const override {\n    return new Iterator(this, begin_, 0, step_);\n  }\n  ParamIteratorInterface<T>* End() const override {\n    return new Iterator(this, end_, end_index_, step_);\n  }\n\n private:\n  class Iterator : public ParamIteratorInterface<T> {\n   public:\n    Iterator(const ParamGeneratorInterface<T>* base, T value, int index,\n             IncrementT step)\n        : base_(base), value_(value), index_(index), step_(step) {}\n    ~Iterator() override {}\n\n    const ParamGeneratorInterface<T>* BaseGenerator() const override {\n      return base_;\n    }\n    void Advance() override {\n      value_ = static_cast<T>(value_ + step_);\n      index_++;\n    }\n    ParamIteratorInterface<T>* Clone() const override {\n      return new Iterator(*this);\n    }\n    const T* Current() const override { return &value_; }\n    bool Equals(const ParamIteratorInterface<T>& other) const override {\n      // Having the same base generator guarantees that the other\n      // iterator is of the same type and we can downcast.\n      GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())\n          << \"The program attempted to compare iterators \"\n          << \"from different generators.\" << std::endl;\n      const int other_index =\n          CheckedDowncastToActualType<const Iterator>(&other)->index_;\n      return index_ == other_index;\n    }\n\n   private:\n    Iterator(const Iterator& other)\n        : ParamIteratorInterface<T>(),\n          base_(other.base_), value_(other.value_), index_(other.index_),\n          step_(other.step_) {}\n\n    // No implementation - assignment is unsupported.\n    void operator=(const Iterator& other);\n\n    const ParamGeneratorInterface<T>* const base_;\n    T value_;\n    int index_;\n    const IncrementT step_;\n  };  // class RangeGenerator::Iterator\n\n  static int CalculateEndIndex(const T& begin,\n                               const T& end,\n                               const IncrementT& step) {\n    int end_index = 0;\n    for (T i = begin; i < end; i = static_cast<T>(i + step))\n      end_index++;\n    return end_index;\n  }\n\n  // No implementation - assignment is unsupported.\n  void operator=(const RangeGenerator& other);\n\n  const T begin_;\n  const T end_;\n  const IncrementT step_;\n  // The index for the end() iterator. All the elements in the generated\n  // sequence are indexed (0-based) to aid iterator comparison.\n  const int end_index_;\n};  // class RangeGenerator\n\n\n// Generates values from a pair of STL-style iterators. Used in the\n// ValuesIn() function. The elements are copied from the source range\n// since the source can be located on the stack, and the generator\n// is likely to persist beyond that stack frame.\ntemplate <typename T>\nclass ValuesInIteratorRangeGenerator : public ParamGeneratorInterface<T> {\n public:\n  template <typename ForwardIterator>\n  ValuesInIteratorRangeGenerator(ForwardIterator begin, ForwardIterator end)\n      : container_(begin, end) {}\n  ~ValuesInIteratorRangeGenerator() override {}\n\n  ParamIteratorInterface<T>* Begin() const override {\n    return new Iterator(this, container_.begin());\n  }\n  ParamIteratorInterface<T>* End() const override {\n    return new Iterator(this, container_.end());\n  }\n\n private:\n  typedef typename ::std::vector<T> ContainerType;\n\n  class Iterator : public ParamIteratorInterface<T> {\n   public:\n    Iterator(const ParamGeneratorInterface<T>* base,\n             typename ContainerType::const_iterator iterator)\n        : base_(base), iterator_(iterator) {}\n    ~Iterator() override {}\n\n    const ParamGeneratorInterface<T>* BaseGenerator() const override {\n      return base_;\n    }\n    void Advance() override {\n      ++iterator_;\n      value_.reset();\n    }\n    ParamIteratorInterface<T>* Clone() const override {\n      return new Iterator(*this);\n    }\n    // We need to use cached value referenced by iterator_ because *iterator_\n    // can return a temporary object (and of type other then T), so just\n    // having \"return &*iterator_;\" doesn't work.\n    // value_ is updated here and not in Advance() because Advance()\n    // can advance iterator_ beyond the end of the range, and we cannot\n    // detect that fact. The client code, on the other hand, is\n    // responsible for not calling Current() on an out-of-range iterator.\n    const T* Current() const override {\n      if (value_.get() == nullptr) value_.reset(new T(*iterator_));\n      return value_.get();\n    }\n    bool Equals(const ParamIteratorInterface<T>& other) const override {\n      // Having the same base generator guarantees that the other\n      // iterator is of the same type and we can downcast.\n      GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())\n          << \"The program attempted to compare iterators \"\n          << \"from different generators.\" << std::endl;\n      return iterator_ ==\n          CheckedDowncastToActualType<const Iterator>(&other)->iterator_;\n    }\n\n   private:\n    Iterator(const Iterator& other)\n          // The explicit constructor call suppresses a false warning\n          // emitted by gcc when supplied with the -Wextra option.\n        : ParamIteratorInterface<T>(),\n          base_(other.base_),\n          iterator_(other.iterator_) {}\n\n    const ParamGeneratorInterface<T>* const base_;\n    typename ContainerType::const_iterator iterator_;\n    // A cached value of *iterator_. We keep it here to allow access by\n    // pointer in the wrapping iterator's operator->().\n    // value_ needs to be mutable to be accessed in Current().\n    // Use of std::unique_ptr helps manage cached value's lifetime,\n    // which is bound by the lifespan of the iterator itself.\n    mutable std::unique_ptr<const T> value_;\n  };  // class ValuesInIteratorRangeGenerator::Iterator\n\n  // No implementation - assignment is unsupported.\n  void operator=(const ValuesInIteratorRangeGenerator& other);\n\n  const ContainerType container_;\n};  // class ValuesInIteratorRangeGenerator\n\n// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.\n//\n// Default parameterized test name generator, returns a string containing the\n// integer test parameter index.\ntemplate <class ParamType>\nstd::string DefaultParamName(const TestParamInfo<ParamType>& info) {\n  Message name_stream;\n  name_stream << info.index;\n  return name_stream.GetString();\n}\n\ntemplate <typename T = int>\nvoid TestNotEmpty() {\n  static_assert(sizeof(T) == 0, \"Empty arguments are not allowed.\");\n}\ntemplate <typename T = int>\nvoid TestNotEmpty(const T&) {}\n\n// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.\n//\n// Stores a parameter value and later creates tests parameterized with that\n// value.\ntemplate <class TestClass>\nclass ParameterizedTestFactory : public TestFactoryBase {\n public:\n  typedef typename TestClass::ParamType ParamType;\n  explicit ParameterizedTestFactory(ParamType parameter) :\n      parameter_(parameter) {}\n  Test* CreateTest() override {\n    TestClass::SetParam(&parameter_);\n    return new TestClass();\n  }\n\n private:\n  const ParamType parameter_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestFactory);\n};\n\n// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.\n//\n// TestMetaFactoryBase is a base class for meta-factories that create\n// test factories for passing into MakeAndRegisterTestInfo function.\ntemplate <class ParamType>\nclass TestMetaFactoryBase {\n public:\n  virtual ~TestMetaFactoryBase() {}\n\n  virtual TestFactoryBase* CreateTestFactory(ParamType parameter) = 0;\n};\n\n// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.\n//\n// TestMetaFactory creates test factories for passing into\n// MakeAndRegisterTestInfo function. Since MakeAndRegisterTestInfo receives\n// ownership of test factory pointer, same factory object cannot be passed\n// into that method twice. But ParameterizedTestSuiteInfo is going to call\n// it for each Test/Parameter value combination. Thus it needs meta factory\n// creator class.\ntemplate <class TestSuite>\nclass TestMetaFactory\n    : public TestMetaFactoryBase<typename TestSuite::ParamType> {\n public:\n  using ParamType = typename TestSuite::ParamType;\n\n  TestMetaFactory() {}\n\n  TestFactoryBase* CreateTestFactory(ParamType parameter) override {\n    return new ParameterizedTestFactory<TestSuite>(parameter);\n  }\n\n private:\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(TestMetaFactory);\n};\n\n// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.\n//\n// ParameterizedTestSuiteInfoBase is a generic interface\n// to ParameterizedTestSuiteInfo classes. ParameterizedTestSuiteInfoBase\n// accumulates test information provided by TEST_P macro invocations\n// and generators provided by INSTANTIATE_TEST_SUITE_P macro invocations\n// and uses that information to register all resulting test instances\n// in RegisterTests method. The ParameterizeTestSuiteRegistry class holds\n// a collection of pointers to the ParameterizedTestSuiteInfo objects\n// and calls RegisterTests() on each of them when asked.\nclass ParameterizedTestSuiteInfoBase {\n public:\n  virtual ~ParameterizedTestSuiteInfoBase() {}\n\n  // Base part of test suite name for display purposes.\n  virtual const std::string& GetTestSuiteName() const = 0;\n  // Test case id to verify identity.\n  virtual TypeId GetTestSuiteTypeId() const = 0;\n  // UnitTest class invokes this method to register tests in this\n  // test suite right before running them in RUN_ALL_TESTS macro.\n  // This method should not be called more then once on any single\n  // instance of a ParameterizedTestSuiteInfoBase derived class.\n  virtual void RegisterTests() = 0;\n\n protected:\n  ParameterizedTestSuiteInfoBase() {}\n\n private:\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestSuiteInfoBase);\n};\n\n// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.\n//\n// ParameterizedTestSuiteInfo accumulates tests obtained from TEST_P\n// macro invocations for a particular test suite and generators\n// obtained from INSTANTIATE_TEST_SUITE_P macro invocations for that\n// test suite. It registers tests with all values generated by all\n// generators when asked.\ntemplate <class TestSuite>\nclass ParameterizedTestSuiteInfo : public ParameterizedTestSuiteInfoBase {\n public:\n  // ParamType and GeneratorCreationFunc are private types but are required\n  // for declarations of public methods AddTestPattern() and\n  // AddTestSuiteInstantiation().\n  using ParamType = typename TestSuite::ParamType;\n  // A function that returns an instance of appropriate generator type.\n  typedef ParamGenerator<ParamType>(GeneratorCreationFunc)();\n  using ParamNameGeneratorFunc = std::string(const TestParamInfo<ParamType>&);\n\n  explicit ParameterizedTestSuiteInfo(const char* name,\n                                      CodeLocation code_location)\n      : test_suite_name_(name), code_location_(code_location) {}\n\n  // Test case base name for display purposes.\n  const std::string& GetTestSuiteName() const override {\n    return test_suite_name_;\n  }\n  // Test case id to verify identity.\n  TypeId GetTestSuiteTypeId() const override { return GetTypeId<TestSuite>(); }\n  // TEST_P macro uses AddTestPattern() to record information\n  // about a single test in a LocalTestInfo structure.\n  // test_suite_name is the base name of the test suite (without invocation\n  // prefix). test_base_name is the name of an individual test without\n  // parameter index. For the test SequenceA/FooTest.DoBar/1 FooTest is\n  // test suite base name and DoBar is test base name.\n  void AddTestPattern(const char* test_suite_name, const char* test_base_name,\n                      TestMetaFactoryBase<ParamType>* meta_factory) {\n    tests_.push_back(std::shared_ptr<TestInfo>(\n        new TestInfo(test_suite_name, test_base_name, meta_factory)));\n  }\n  // INSTANTIATE_TEST_SUITE_P macro uses AddGenerator() to record information\n  // about a generator.\n  int AddTestSuiteInstantiation(const std::string& instantiation_name,\n                                GeneratorCreationFunc* func,\n                                ParamNameGeneratorFunc* name_func,\n                                const char* file, int line) {\n    instantiations_.push_back(\n        InstantiationInfo(instantiation_name, func, name_func, file, line));\n    return 0;  // Return value used only to run this method in namespace scope.\n  }\n  // UnitTest class invokes this method to register tests in this test suite\n  // test suites right before running tests in RUN_ALL_TESTS macro.\n  // This method should not be called more then once on any single\n  // instance of a ParameterizedTestSuiteInfoBase derived class.\n  // UnitTest has a guard to prevent from calling this method more then once.\n  void RegisterTests() override {\n    for (typename TestInfoContainer::iterator test_it = tests_.begin();\n         test_it != tests_.end(); ++test_it) {\n      std::shared_ptr<TestInfo> test_info = *test_it;\n      for (typename InstantiationContainer::iterator gen_it =\n               instantiations_.begin(); gen_it != instantiations_.end();\n               ++gen_it) {\n        const std::string& instantiation_name = gen_it->name;\n        ParamGenerator<ParamType> generator((*gen_it->generator)());\n        ParamNameGeneratorFunc* name_func = gen_it->name_func;\n        const char* file = gen_it->file;\n        int line = gen_it->line;\n\n        std::string test_suite_name;\n        if ( !instantiation_name.empty() )\n          test_suite_name = instantiation_name + \"/\";\n        test_suite_name += test_info->test_suite_base_name;\n\n        size_t i = 0;\n        std::set<std::string> test_param_names;\n        for (typename ParamGenerator<ParamType>::iterator param_it =\n                 generator.begin();\n             param_it != generator.end(); ++param_it, ++i) {\n          Message test_name_stream;\n\n          std::string param_name = name_func(\n              TestParamInfo<ParamType>(*param_it, i));\n\n          GTEST_CHECK_(IsValidParamName(param_name))\n              << \"Parameterized test name '\" << param_name\n              << \"' is invalid, in \" << file\n              << \" line \" << line << std::endl;\n\n          GTEST_CHECK_(test_param_names.count(param_name) == 0)\n              << \"Duplicate parameterized test name '\" << param_name\n              << \"', in \" << file << \" line \" << line << std::endl;\n\n          test_param_names.insert(param_name);\n\n          test_name_stream << test_info->test_base_name << \"/\" << param_name;\n          MakeAndRegisterTestInfo(\n              test_suite_name.c_str(), test_name_stream.GetString().c_str(),\n              nullptr,  // No type parameter.\n              PrintToString(*param_it).c_str(), code_location_,\n              GetTestSuiteTypeId(),\n              SuiteApiResolver<TestSuite>::GetSetUpCaseOrSuite(),\n              SuiteApiResolver<TestSuite>::GetTearDownCaseOrSuite(),\n              test_info->test_meta_factory->CreateTestFactory(*param_it));\n        }  // for param_it\n      }  // for gen_it\n    }  // for test_it\n  }    // RegisterTests\n\n private:\n  // LocalTestInfo structure keeps information about a single test registered\n  // with TEST_P macro.\n  struct TestInfo {\n    TestInfo(const char* a_test_suite_base_name, const char* a_test_base_name,\n             TestMetaFactoryBase<ParamType>* a_test_meta_factory)\n        : test_suite_base_name(a_test_suite_base_name),\n          test_base_name(a_test_base_name),\n          test_meta_factory(a_test_meta_factory) {}\n\n    const std::string test_suite_base_name;\n    const std::string test_base_name;\n    const std::unique_ptr<TestMetaFactoryBase<ParamType> > test_meta_factory;\n  };\n  using TestInfoContainer = ::std::vector<std::shared_ptr<TestInfo> >;\n  // Records data received from INSTANTIATE_TEST_SUITE_P macros:\n  //  <Instantiation name, Sequence generator creation function,\n  //     Name generator function, Source file, Source line>\n  struct InstantiationInfo {\n      InstantiationInfo(const std::string &name_in,\n                        GeneratorCreationFunc* generator_in,\n                        ParamNameGeneratorFunc* name_func_in,\n                        const char* file_in,\n                        int line_in)\n          : name(name_in),\n            generator(generator_in),\n            name_func(name_func_in),\n            file(file_in),\n            line(line_in) {}\n\n      std::string name;\n      GeneratorCreationFunc* generator;\n      ParamNameGeneratorFunc* name_func;\n      const char* file;\n      int line;\n  };\n  typedef ::std::vector<InstantiationInfo> InstantiationContainer;\n\n  static bool IsValidParamName(const std::string& name) {\n    // Check for empty string\n    if (name.empty())\n      return false;\n\n    // Check for invalid characters\n    for (std::string::size_type index = 0; index < name.size(); ++index) {\n      if (!isalnum(name[index]) && name[index] != '_')\n        return false;\n    }\n\n    return true;\n  }\n\n  const std::string test_suite_name_;\n  CodeLocation code_location_;\n  TestInfoContainer tests_;\n  InstantiationContainer instantiations_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestSuiteInfo);\n};  // class ParameterizedTestSuiteInfo\n\n//  Legacy API is deprecated but still available\n#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_\ntemplate <class TestCase>\nusing ParameterizedTestCaseInfo = ParameterizedTestSuiteInfo<TestCase>;\n#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI_\n\n// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.\n//\n// ParameterizedTestSuiteRegistry contains a map of\n// ParameterizedTestSuiteInfoBase classes accessed by test suite names. TEST_P\n// and INSTANTIATE_TEST_SUITE_P macros use it to locate their corresponding\n// ParameterizedTestSuiteInfo descriptors.\nclass ParameterizedTestSuiteRegistry {\n public:\n  ParameterizedTestSuiteRegistry() {}\n  ~ParameterizedTestSuiteRegistry() {\n    for (auto& test_suite_info : test_suite_infos_) {\n      delete test_suite_info;\n    }\n  }\n\n  // Looks up or creates and returns a structure containing information about\n  // tests and instantiations of a particular test suite.\n  template <class TestSuite>\n  ParameterizedTestSuiteInfo<TestSuite>* GetTestSuitePatternHolder(\n      const char* test_suite_name, CodeLocation code_location) {\n    ParameterizedTestSuiteInfo<TestSuite>* typed_test_info = nullptr;\n    for (auto& test_suite_info : test_suite_infos_) {\n      if (test_suite_info->GetTestSuiteName() == test_suite_name) {\n        if (test_suite_info->GetTestSuiteTypeId() != GetTypeId<TestSuite>()) {\n          // Complain about incorrect usage of Google Test facilities\n          // and terminate the program since we cannot guaranty correct\n          // test suite setup and tear-down in this case.\n          ReportInvalidTestSuiteType(test_suite_name, code_location);\n          posix::Abort();\n        } else {\n          // At this point we are sure that the object we found is of the same\n          // type we are looking for, so we downcast it to that type\n          // without further checks.\n          typed_test_info = CheckedDowncastToActualType<\n              ParameterizedTestSuiteInfo<TestSuite> >(test_suite_info);\n        }\n        break;\n      }\n    }\n    if (typed_test_info == nullptr) {\n      typed_test_info = new ParameterizedTestSuiteInfo<TestSuite>(\n          test_suite_name, code_location);\n      test_suite_infos_.push_back(typed_test_info);\n    }\n    return typed_test_info;\n  }\n  void RegisterTests() {\n    for (auto& test_suite_info : test_suite_infos_) {\n      test_suite_info->RegisterTests();\n    }\n  }\n//  Legacy API is deprecated but still available\n#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_\n  template <class TestCase>\n  ParameterizedTestCaseInfo<TestCase>* GetTestCasePatternHolder(\n      const char* test_case_name, CodeLocation code_location) {\n    return GetTestSuitePatternHolder<TestCase>(test_case_name, code_location);\n  }\n\n#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI_\n\n private:\n  using TestSuiteInfoContainer = ::std::vector<ParameterizedTestSuiteInfoBase*>;\n\n  TestSuiteInfoContainer test_suite_infos_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestSuiteRegistry);\n};\n\n}  // namespace internal\n\n// Forward declarations of ValuesIn(), which is implemented in\n// include/gtest/gtest-param-test.h.\ntemplate <class Container>\ninternal::ParamGenerator<typename Container::value_type> ValuesIn(\n    const Container& container);\n\nnamespace internal {\n// Used in the Values() function to provide polymorphic capabilities.\n\ntemplate <typename... Ts>\nclass ValueArray {\n public:\n  ValueArray(Ts... v) : v_{std::move(v)...} {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {  // NOLINT\n    return ValuesIn(MakeVector<T>(MakeIndexSequence<sizeof...(Ts)>()));\n  }\n\n private:\n  template <typename T, size_t... I>\n  std::vector<T> MakeVector(IndexSequence<I...>) const {\n    return std::vector<T>{static_cast<T>(v_.template Get<I>())...};\n  }\n\n  FlatTuple<Ts...> v_;\n};\n\ntemplate <typename... T>\nclass CartesianProductGenerator\n    : public ParamGeneratorInterface<::std::tuple<T...>> {\n public:\n  typedef ::std::tuple<T...> ParamType;\n\n  CartesianProductGenerator(const std::tuple<ParamGenerator<T>...>& g)\n      : generators_(g) {}\n  ~CartesianProductGenerator() override {}\n\n  ParamIteratorInterface<ParamType>* Begin() const override {\n    return new Iterator(this, generators_, false);\n  }\n  ParamIteratorInterface<ParamType>* End() const override {\n    return new Iterator(this, generators_, true);\n  }\n\n private:\n  template <class I>\n  class IteratorImpl;\n  template <size_t... I>\n  class IteratorImpl<IndexSequence<I...>>\n      : public ParamIteratorInterface<ParamType> {\n   public:\n    IteratorImpl(const ParamGeneratorInterface<ParamType>* base,\n             const std::tuple<ParamGenerator<T>...>& generators, bool is_end)\n        : base_(base),\n          begin_(std::get<I>(generators).begin()...),\n          end_(std::get<I>(generators).end()...),\n          current_(is_end ? end_ : begin_) {\n      ComputeCurrentValue();\n    }\n    ~IteratorImpl() override {}\n\n    const ParamGeneratorInterface<ParamType>* BaseGenerator() const override {\n      return base_;\n    }\n    // Advance should not be called on beyond-of-range iterators\n    // so no component iterators must be beyond end of range, either.\n    void Advance() override {\n      assert(!AtEnd());\n      // Advance the last iterator.\n      ++std::get<sizeof...(T) - 1>(current_);\n      // if that reaches end, propagate that up.\n      AdvanceIfEnd<sizeof...(T) - 1>();\n      ComputeCurrentValue();\n    }\n    ParamIteratorInterface<ParamType>* Clone() const override {\n      return new IteratorImpl(*this);\n    }\n\n    const ParamType* Current() const override { return current_value_.get(); }\n\n    bool Equals(const ParamIteratorInterface<ParamType>& other) const override {\n      // Having the same base generator guarantees that the other\n      // iterator is of the same type and we can downcast.\n      GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())\n          << \"The program attempted to compare iterators \"\n          << \"from different generators.\" << std::endl;\n      const IteratorImpl* typed_other =\n          CheckedDowncastToActualType<const IteratorImpl>(&other);\n\n      // We must report iterators equal if they both point beyond their\n      // respective ranges. That can happen in a variety of fashions,\n      // so we have to consult AtEnd().\n      if (AtEnd() && typed_other->AtEnd()) return true;\n\n      bool same = true;\n      bool dummy[] = {\n          (same = same && std::get<I>(current_) ==\n                              std::get<I>(typed_other->current_))...};\n      (void)dummy;\n      return same;\n    }\n\n   private:\n    template <size_t ThisI>\n    void AdvanceIfEnd() {\n      if (std::get<ThisI>(current_) != std::get<ThisI>(end_)) return;\n\n      bool last = ThisI == 0;\n      if (last) {\n        // We are done. Nothing else to propagate.\n        return;\n      }\n\n      constexpr size_t NextI = ThisI - (ThisI != 0);\n      std::get<ThisI>(current_) = std::get<ThisI>(begin_);\n      ++std::get<NextI>(current_);\n      AdvanceIfEnd<NextI>();\n    }\n\n    void ComputeCurrentValue() {\n      if (!AtEnd())\n        current_value_ = std::make_shared<ParamType>(*std::get<I>(current_)...);\n    }\n    bool AtEnd() const {\n      bool at_end = false;\n      bool dummy[] = {\n          (at_end = at_end || std::get<I>(current_) == std::get<I>(end_))...};\n      (void)dummy;\n      return at_end;\n    }\n\n    const ParamGeneratorInterface<ParamType>* const base_;\n    std::tuple<typename ParamGenerator<T>::iterator...> begin_;\n    std::tuple<typename ParamGenerator<T>::iterator...> end_;\n    std::tuple<typename ParamGenerator<T>::iterator...> current_;\n    std::shared_ptr<ParamType> current_value_;\n  };\n\n  using Iterator = IteratorImpl<typename MakeIndexSequence<sizeof...(T)>::type>;\n\n  std::tuple<ParamGenerator<T>...> generators_;\n};\n\ntemplate <class... Gen>\nclass CartesianProductHolder {\n public:\n  CartesianProductHolder(const Gen&... g) : generators_(g...) {}\n  template <typename... T>\n  operator ParamGenerator<::std::tuple<T...>>() const {\n    return ParamGenerator<::std::tuple<T...>>(\n        new CartesianProductGenerator<T...>(generators_));\n  }\n\n private:\n  std::tuple<Gen...> generators_;\n};\n\n}  // namespace internal\n}  // namespace testing\n\n#endif  // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_\n\nnamespace testing {\n\n// Functions producing parameter generators.\n//\n// Google Test uses these generators to produce parameters for value-\n// parameterized tests. When a parameterized test suite is instantiated\n// with a particular generator, Google Test creates and runs tests\n// for each element in the sequence produced by the generator.\n//\n// In the following sample, tests from test suite FooTest are instantiated\n// each three times with parameter values 3, 5, and 8:\n//\n// class FooTest : public TestWithParam<int> { ... };\n//\n// TEST_P(FooTest, TestThis) {\n// }\n// TEST_P(FooTest, TestThat) {\n// }\n// INSTANTIATE_TEST_SUITE_P(TestSequence, FooTest, Values(3, 5, 8));\n//\n\n// Range() returns generators providing sequences of values in a range.\n//\n// Synopsis:\n// Range(start, end)\n//   - returns a generator producing a sequence of values {start, start+1,\n//     start+2, ..., }.\n// Range(start, end, step)\n//   - returns a generator producing a sequence of values {start, start+step,\n//     start+step+step, ..., }.\n// Notes:\n//   * The generated sequences never include end. For example, Range(1, 5)\n//     returns a generator producing a sequence {1, 2, 3, 4}. Range(1, 9, 2)\n//     returns a generator producing {1, 3, 5, 7}.\n//   * start and end must have the same type. That type may be any integral or\n//     floating-point type or a user defined type satisfying these conditions:\n//     * It must be assignable (have operator=() defined).\n//     * It must have operator+() (operator+(int-compatible type) for\n//       two-operand version).\n//     * It must have operator<() defined.\n//     Elements in the resulting sequences will also have that type.\n//   * Condition start < end must be satisfied in order for resulting sequences\n//     to contain any elements.\n//\ntemplate <typename T, typename IncrementT>\ninternal::ParamGenerator<T> Range(T start, T end, IncrementT step) {\n  return internal::ParamGenerator<T>(\n      new internal::RangeGenerator<T, IncrementT>(start, end, step));\n}\n\ntemplate <typename T>\ninternal::ParamGenerator<T> Range(T start, T end) {\n  return Range(start, end, 1);\n}\n\n// ValuesIn() function allows generation of tests with parameters coming from\n// a container.\n//\n// Synopsis:\n// ValuesIn(const T (&array)[N])\n//   - returns a generator producing sequences with elements from\n//     a C-style array.\n// ValuesIn(const Container& container)\n//   - returns a generator producing sequences with elements from\n//     an STL-style container.\n// ValuesIn(Iterator begin, Iterator end)\n//   - returns a generator producing sequences with elements from\n//     a range [begin, end) defined by a pair of STL-style iterators. These\n//     iterators can also be plain C pointers.\n//\n// Please note that ValuesIn copies the values from the containers\n// passed in and keeps them to generate tests in RUN_ALL_TESTS().\n//\n// Examples:\n//\n// This instantiates tests from test suite StringTest\n// each with C-string values of \"foo\", \"bar\", and \"baz\":\n//\n// const char* strings[] = {\"foo\", \"bar\", \"baz\"};\n// INSTANTIATE_TEST_SUITE_P(StringSequence, StringTest, ValuesIn(strings));\n//\n// This instantiates tests from test suite StlStringTest\n// each with STL strings with values \"a\" and \"b\":\n//\n// ::std::vector< ::std::string> GetParameterStrings() {\n//   ::std::vector< ::std::string> v;\n//   v.push_back(\"a\");\n//   v.push_back(\"b\");\n//   return v;\n// }\n//\n// INSTANTIATE_TEST_SUITE_P(CharSequence,\n//                          StlStringTest,\n//                          ValuesIn(GetParameterStrings()));\n//\n//\n// This will also instantiate tests from CharTest\n// each with parameter values 'a' and 'b':\n//\n// ::std::list<char> GetParameterChars() {\n//   ::std::list<char> list;\n//   list.push_back('a');\n//   list.push_back('b');\n//   return list;\n// }\n// ::std::list<char> l = GetParameterChars();\n// INSTANTIATE_TEST_SUITE_P(CharSequence2,\n//                          CharTest,\n//                          ValuesIn(l.begin(), l.end()));\n//\ntemplate <typename ForwardIterator>\ninternal::ParamGenerator<\n  typename ::testing::internal::IteratorTraits<ForwardIterator>::value_type>\nValuesIn(ForwardIterator begin, ForwardIterator end) {\n  typedef typename ::testing::internal::IteratorTraits<ForwardIterator>\n      ::value_type ParamType;\n  return internal::ParamGenerator<ParamType>(\n      new internal::ValuesInIteratorRangeGenerator<ParamType>(begin, end));\n}\n\ntemplate <typename T, size_t N>\ninternal::ParamGenerator<T> ValuesIn(const T (&array)[N]) {\n  return ValuesIn(array, array + N);\n}\n\ntemplate <class Container>\ninternal::ParamGenerator<typename Container::value_type> ValuesIn(\n    const Container& container) {\n  return ValuesIn(container.begin(), container.end());\n}\n\n// Values() allows generating tests from explicitly specified list of\n// parameters.\n//\n// Synopsis:\n// Values(T v1, T v2, ..., T vN)\n//   - returns a generator producing sequences with elements v1, v2, ..., vN.\n//\n// For example, this instantiates tests from test suite BarTest each\n// with values \"one\", \"two\", and \"three\":\n//\n// INSTANTIATE_TEST_SUITE_P(NumSequence,\n//                          BarTest,\n//                          Values(\"one\", \"two\", \"three\"));\n//\n// This instantiates tests from test suite BazTest each with values 1, 2, 3.5.\n// The exact type of values will depend on the type of parameter in BazTest.\n//\n// INSTANTIATE_TEST_SUITE_P(FloatingNumbers, BazTest, Values(1, 2, 3.5));\n//\n//\ntemplate <typename... T>\ninternal::ValueArray<T...> Values(T... v) {\n  return internal::ValueArray<T...>(std::move(v)...);\n}\n\n// Bool() allows generating tests with parameters in a set of (false, true).\n//\n// Synopsis:\n// Bool()\n//   - returns a generator producing sequences with elements {false, true}.\n//\n// It is useful when testing code that depends on Boolean flags. Combinations\n// of multiple flags can be tested when several Bool()'s are combined using\n// Combine() function.\n//\n// In the following example all tests in the test suite FlagDependentTest\n// will be instantiated twice with parameters false and true.\n//\n// class FlagDependentTest : public testing::TestWithParam<bool> {\n//   virtual void SetUp() {\n//     external_flag = GetParam();\n//   }\n// }\n// INSTANTIATE_TEST_SUITE_P(BoolSequence, FlagDependentTest, Bool());\n//\ninline internal::ParamGenerator<bool> Bool() {\n  return Values(false, true);\n}\n\n// Combine() allows the user to combine two or more sequences to produce\n// values of a Cartesian product of those sequences' elements.\n//\n// Synopsis:\n// Combine(gen1, gen2, ..., genN)\n//   - returns a generator producing sequences with elements coming from\n//     the Cartesian product of elements from the sequences generated by\n//     gen1, gen2, ..., genN. The sequence elements will have a type of\n//     std::tuple<T1, T2, ..., TN> where T1, T2, ..., TN are the types\n//     of elements from sequences produces by gen1, gen2, ..., genN.\n//\n// Combine can have up to 10 arguments.\n//\n// Example:\n//\n// This will instantiate tests in test suite AnimalTest each one with\n// the parameter values tuple(\"cat\", BLACK), tuple(\"cat\", WHITE),\n// tuple(\"dog\", BLACK), and tuple(\"dog\", WHITE):\n//\n// enum Color { BLACK, GRAY, WHITE };\n// class AnimalTest\n//     : public testing::TestWithParam<std::tuple<const char*, Color> > {...};\n//\n// TEST_P(AnimalTest, AnimalLooksNice) {...}\n//\n// INSTANTIATE_TEST_SUITE_P(AnimalVariations, AnimalTest,\n//                          Combine(Values(\"cat\", \"dog\"),\n//                                  Values(BLACK, WHITE)));\n//\n// This will instantiate tests in FlagDependentTest with all variations of two\n// Boolean flags:\n//\n// class FlagDependentTest\n//     : public testing::TestWithParam<std::tuple<bool, bool> > {\n//   virtual void SetUp() {\n//     // Assigns external_flag_1 and external_flag_2 values from the tuple.\n//     std::tie(external_flag_1, external_flag_2) = GetParam();\n//   }\n// };\n//\n// TEST_P(FlagDependentTest, TestFeature1) {\n//   // Test your code using external_flag_1 and external_flag_2 here.\n// }\n// INSTANTIATE_TEST_SUITE_P(TwoBoolSequence, FlagDependentTest,\n//                          Combine(Bool(), Bool()));\n//\ntemplate <typename... Generator>\ninternal::CartesianProductHolder<Generator...> Combine(const Generator&... g) {\n  return internal::CartesianProductHolder<Generator...>(g...);\n}\n\n#define TEST_P(test_suite_name, test_name)                                     \\\n  class GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)                     \\\n      : public test_suite_name {                                               \\\n   public:                                                                     \\\n    GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)() {}                    \\\n    virtual void TestBody();                                                   \\\n                                                                               \\\n   private:                                                                    \\\n    static int AddToRegistry() {                                               \\\n      ::testing::UnitTest::GetInstance()                                       \\\n          ->parameterized_test_registry()                                      \\\n          .GetTestSuitePatternHolder<test_suite_name>(                         \\\n              #test_suite_name,                                                \\\n              ::testing::internal::CodeLocation(__FILE__, __LINE__))           \\\n          ->AddTestPattern(                                                    \\\n              GTEST_STRINGIFY_(test_suite_name), GTEST_STRINGIFY_(test_name),  \\\n              new ::testing::internal::TestMetaFactory<GTEST_TEST_CLASS_NAME_( \\\n                  test_suite_name, test_name)>());                             \\\n      return 0;                                                                \\\n    }                                                                          \\\n    static int gtest_registering_dummy_ GTEST_ATTRIBUTE_UNUSED_;               \\\n    GTEST_DISALLOW_COPY_AND_ASSIGN_(GTEST_TEST_CLASS_NAME_(test_suite_name,    \\\n                                                           test_name));        \\\n  };                                                                           \\\n  int GTEST_TEST_CLASS_NAME_(test_suite_name,                                  \\\n                             test_name)::gtest_registering_dummy_ =            \\\n      GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::AddToRegistry();     \\\n  void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::TestBody()\n\n// The last argument to INSTANTIATE_TEST_SUITE_P allows the user to specify\n// generator and an optional function or functor that generates custom test name\n// suffixes based on the test parameters. Such a function or functor should\n// accept one argument of type testing::TestParamInfo<class ParamType>, and\n// return std::string.\n//\n// testing::PrintToStringParamName is a builtin test suffix generator that\n// returns the value of testing::PrintToString(GetParam()).\n//\n// Note: test names must be non-empty, unique, and may only contain ASCII\n// alphanumeric characters or underscore. Because PrintToString adds quotes\n// to std::string and C strings, it won't work for these types.\n\n#define GTEST_EXPAND_(arg) arg\n#define GTEST_GET_FIRST_(first, ...) first\n#define GTEST_GET_SECOND_(first, second, ...) second\n\n#define INSTANTIATE_TEST_SUITE_P(prefix, test_suite_name, ...)                \\\n  static ::testing::internal::ParamGenerator<test_suite_name::ParamType>      \\\n      gtest_##prefix##test_suite_name##_EvalGenerator_() {                    \\\n    return GTEST_EXPAND_(GTEST_GET_FIRST_(__VA_ARGS__, DUMMY_PARAM_));        \\\n  }                                                                           \\\n  static ::std::string gtest_##prefix##test_suite_name##_EvalGenerateName_(   \\\n      const ::testing::TestParamInfo<test_suite_name::ParamType>& info) {     \\\n    if (::testing::internal::AlwaysFalse()) {                                 \\\n      ::testing::internal::TestNotEmpty(GTEST_EXPAND_(GTEST_GET_SECOND_(      \\\n          __VA_ARGS__,                                                        \\\n          ::testing::internal::DefaultParamName<test_suite_name::ParamType>,  \\\n          DUMMY_PARAM_)));                                                    \\\n      auto t = std::make_tuple(__VA_ARGS__);                                  \\\n      static_assert(std::tuple_size<decltype(t)>::value <= 2,                 \\\n                    \"Too Many Args!\");                                        \\\n    }                                                                         \\\n    return ((GTEST_EXPAND_(GTEST_GET_SECOND_(                                 \\\n        __VA_ARGS__,                                                          \\\n        ::testing::internal::DefaultParamName<test_suite_name::ParamType>,    \\\n        DUMMY_PARAM_))))(info);                                               \\\n  }                                                                           \\\n  static int gtest_##prefix##test_suite_name##_dummy_                         \\\n      GTEST_ATTRIBUTE_UNUSED_ =                                               \\\n          ::testing::UnitTest::GetInstance()                                  \\\n              ->parameterized_test_registry()                                 \\\n              .GetTestSuitePatternHolder<test_suite_name>(                    \\\n                  #test_suite_name,                                           \\\n                  ::testing::internal::CodeLocation(__FILE__, __LINE__))      \\\n              ->AddTestSuiteInstantiation(                                    \\\n                  #prefix, &gtest_##prefix##test_suite_name##_EvalGenerator_, \\\n                  &gtest_##prefix##test_suite_name##_EvalGenerateName_,       \\\n                  __FILE__, __LINE__)\n\n// Legacy API is deprecated but still available\n#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_\n#define INSTANTIATE_TEST_CASE_P                                            \\\n  static_assert(::testing::internal::InstantiateTestCase_P_IsDeprecated(), \\\n                \"\");                                                       \\\n  INSTANTIATE_TEST_SUITE_P\n#endif  // GTEST_REMOVE_LEGACY_TEST_CASEAPI_\n\n}  // namespace testing\n\n#endif  // GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_\n// Copyright 2006, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n//\n// Google C++ Testing and Mocking Framework definitions useful in production code.\n// GOOGLETEST_CM0003 DO NOT DELETE\n\n#ifndef GTEST_INCLUDE_GTEST_GTEST_PROD_H_\n#define GTEST_INCLUDE_GTEST_GTEST_PROD_H_\n\n// When you need to test the private or protected members of a class,\n// use the FRIEND_TEST macro to declare your tests as friends of the\n// class.  For example:\n//\n// class MyClass {\n//  private:\n//   void PrivateMethod();\n//   FRIEND_TEST(MyClassTest, PrivateMethodWorks);\n// };\n//\n// class MyClassTest : public testing::Test {\n//   // ...\n// };\n//\n// TEST_F(MyClassTest, PrivateMethodWorks) {\n//   // Can call MyClass::PrivateMethod() here.\n// }\n//\n// Note: The test class must be in the same namespace as the class being tested.\n// For example, putting MyClassTest in an anonymous namespace will not work.\n\n#define FRIEND_TEST(test_case_name, test_name)\\\nfriend class test_case_name##_##test_name##_Test\n\n#endif  // GTEST_INCLUDE_GTEST_GTEST_PROD_H_\n// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// GOOGLETEST_CM0001 DO NOT DELETE\n\n#ifndef GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_\n#define GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_\n\n#include <iosfwd>\n#include <vector>\n\nGTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \\\n/* class A needs to have dll-interface to be used by clients of class B */)\n\nnamespace testing {\n\n// A copyable object representing the result of a test part (i.e. an\n// assertion or an explicit FAIL(), ADD_FAILURE(), or SUCCESS()).\n//\n// Don't inherit from TestPartResult as its destructor is not virtual.\nclass GTEST_API_ TestPartResult {\n public:\n  // The possible outcomes of a test part (i.e. an assertion or an\n  // explicit SUCCEED(), FAIL(), or ADD_FAILURE()).\n  enum Type {\n    kSuccess,          // Succeeded.\n    kNonFatalFailure,  // Failed but the test can continue.\n    kFatalFailure,     // Failed and the test should be terminated.\n    kSkip              // Skipped.\n  };\n\n  // C'tor.  TestPartResult does NOT have a default constructor.\n  // Always use this constructor (with parameters) to create a\n  // TestPartResult object.\n  TestPartResult(Type a_type, const char* a_file_name, int a_line_number,\n                 const char* a_message)\n      : type_(a_type),\n        file_name_(a_file_name == nullptr ? \"\" : a_file_name),\n        line_number_(a_line_number),\n        summary_(ExtractSummary(a_message)),\n        message_(a_message) {}\n\n  // Gets the outcome of the test part.\n  Type type() const { return type_; }\n\n  // Gets the name of the source file where the test part took place, or\n  // NULL if it's unknown.\n  const char* file_name() const {\n    return file_name_.empty() ? nullptr : file_name_.c_str();\n  }\n\n  // Gets the line in the source file where the test part took place,\n  // or -1 if it's unknown.\n  int line_number() const { return line_number_; }\n\n  // Gets the summary of the failure message.\n  const char* summary() const { return summary_.c_str(); }\n\n  // Gets the message associated with the test part.\n  const char* message() const { return message_.c_str(); }\n\n  // Returns true iff the test part was skipped.\n  bool skipped() const { return type_ == kSkip; }\n\n  // Returns true iff the test part passed.\n  bool passed() const { return type_ == kSuccess; }\n\n  // Returns true iff the test part non-fatally failed.\n  bool nonfatally_failed() const { return type_ == kNonFatalFailure; }\n\n  // Returns true iff the test part fatally failed.\n  bool fatally_failed() const { return type_ == kFatalFailure; }\n\n  // Returns true iff the test part failed.\n  bool failed() const { return fatally_failed() || nonfatally_failed(); }\n\n private:\n  Type type_;\n\n  // Gets the summary of the failure message by omitting the stack\n  // trace in it.\n  static std::string ExtractSummary(const char* message);\n\n  // The name of the source file where the test part took place, or\n  // \"\" if the source file is unknown.\n  std::string file_name_;\n  // The line in the source file where the test part took place, or -1\n  // if the line number is unknown.\n  int line_number_;\n  std::string summary_;  // The test failure summary.\n  std::string message_;  // The test failure message.\n};\n\n// Prints a TestPartResult object.\nstd::ostream& operator<<(std::ostream& os, const TestPartResult& result);\n\n// An array of TestPartResult objects.\n//\n// Don't inherit from TestPartResultArray as its destructor is not\n// virtual.\nclass GTEST_API_ TestPartResultArray {\n public:\n  TestPartResultArray() {}\n\n  // Appends the given TestPartResult to the array.\n  void Append(const TestPartResult& result);\n\n  // Returns the TestPartResult at the given index (0-based).\n  const TestPartResult& GetTestPartResult(int index) const;\n\n  // Returns the number of TestPartResult objects in the array.\n  int size() const;\n\n private:\n  std::vector<TestPartResult> array_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(TestPartResultArray);\n};\n\n// This interface knows how to report a test part result.\nclass GTEST_API_ TestPartResultReporterInterface {\n public:\n  virtual ~TestPartResultReporterInterface() {}\n\n  virtual void ReportTestPartResult(const TestPartResult& result) = 0;\n};\n\nnamespace internal {\n\n// This helper class is used by {ASSERT|EXPECT}_NO_FATAL_FAILURE to check if a\n// statement generates new fatal failures. To do so it registers itself as the\n// current test part result reporter. Besides checking if fatal failures were\n// reported, it only delegates the reporting to the former result reporter.\n// The original result reporter is restored in the destructor.\n// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.\nclass GTEST_API_ HasNewFatalFailureHelper\n    : public TestPartResultReporterInterface {\n public:\n  HasNewFatalFailureHelper();\n  ~HasNewFatalFailureHelper() override;\n  void ReportTestPartResult(const TestPartResult& result) override;\n  bool has_new_fatal_failure() const { return has_new_fatal_failure_; }\n private:\n  bool has_new_fatal_failure_;\n  TestPartResultReporterInterface* original_reporter_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(HasNewFatalFailureHelper);\n};\n\n}  // namespace internal\n\n}  // namespace testing\n\nGTEST_DISABLE_MSC_WARNINGS_POP_()  //  4251\n\n#endif  // GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_\n// Copyright 2008 Google Inc.\n// All Rights Reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n// GOOGLETEST_CM0001 DO NOT DELETE\n\n#ifndef GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_\n#define GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_\n\n// This header implements typed tests and type-parameterized tests.\n\n// Typed (aka type-driven) tests repeat the same test for types in a\n// list.  You must know which types you want to test with when writing\n// typed tests. Here's how you do it:\n\n#if 0\n\n// First, define a fixture class template.  It should be parameterized\n// by a type.  Remember to derive it from testing::Test.\ntemplate <typename T>\nclass FooTest : public testing::Test {\n public:\n  ...\n  typedef std::list<T> List;\n  static T shared_;\n  T value_;\n};\n\n// Next, associate a list of types with the test suite, which will be\n// repeated for each type in the list.  The typedef is necessary for\n// the macro to parse correctly.\ntypedef testing::Types<char, int, unsigned int> MyTypes;\nTYPED_TEST_SUITE(FooTest, MyTypes);\n\n// If the type list contains only one type, you can write that type\n// directly without Types<...>:\n//   TYPED_TEST_SUITE(FooTest, int);\n\n// Then, use TYPED_TEST() instead of TEST_F() to define as many typed\n// tests for this test suite as you want.\nTYPED_TEST(FooTest, DoesBlah) {\n  // Inside a test, refer to TypeParam to get the type parameter.\n  // Since we are inside a derived class template, C++ requires use to\n  // visit the members of FooTest via 'this'.\n  TypeParam n = this->value_;\n\n  // To visit static members of the fixture, add the TestFixture::\n  // prefix.\n  n += TestFixture::shared_;\n\n  // To refer to typedefs in the fixture, add the \"typename\n  // TestFixture::\" prefix.\n  typename TestFixture::List values;\n  values.push_back(n);\n  ...\n}\n\nTYPED_TEST(FooTest, HasPropertyA) { ... }\n\n// TYPED_TEST_SUITE takes an optional third argument which allows to specify a\n// class that generates custom test name suffixes based on the type. This should\n// be a class which has a static template function GetName(int index) returning\n// a string for each type. The provided integer index equals the index of the\n// type in the provided type list. In many cases the index can be ignored.\n//\n// For example:\n//   class MyTypeNames {\n//    public:\n//     template <typename T>\n//     static std::string GetName(int) {\n//       if (std::is_same<T, char>()) return \"char\";\n//       if (std::is_same<T, int>()) return \"int\";\n//       if (std::is_same<T, unsigned int>()) return \"unsignedInt\";\n//     }\n//   };\n//   TYPED_TEST_SUITE(FooTest, MyTypes, MyTypeNames);\n\n#endif  // 0\n\n// Type-parameterized tests are abstract test patterns parameterized\n// by a type.  Compared with typed tests, type-parameterized tests\n// allow you to define the test pattern without knowing what the type\n// parameters are.  The defined pattern can be instantiated with\n// different types any number of times, in any number of translation\n// units.\n//\n// If you are designing an interface or concept, you can define a\n// suite of type-parameterized tests to verify properties that any\n// valid implementation of the interface/concept should have.  Then,\n// each implementation can easily instantiate the test suite to verify\n// that it conforms to the requirements, without having to write\n// similar tests repeatedly.  Here's an example:\n\n#if 0\n\n// First, define a fixture class template.  It should be parameterized\n// by a type.  Remember to derive it from testing::Test.\ntemplate <typename T>\nclass FooTest : public testing::Test {\n  ...\n};\n\n// Next, declare that you will define a type-parameterized test suite\n// (the _P suffix is for \"parameterized\" or \"pattern\", whichever you\n// prefer):\nTYPED_TEST_SUITE_P(FooTest);\n\n// Then, use TYPED_TEST_P() to define as many type-parameterized tests\n// for this type-parameterized test suite as you want.\nTYPED_TEST_P(FooTest, DoesBlah) {\n  // Inside a test, refer to TypeParam to get the type parameter.\n  TypeParam n = 0;\n  ...\n}\n\nTYPED_TEST_P(FooTest, HasPropertyA) { ... }\n\n// Now the tricky part: you need to register all test patterns before\n// you can instantiate them.  The first argument of the macro is the\n// test suite name; the rest are the names of the tests in this test\n// case.\nREGISTER_TYPED_TEST_SUITE_P(FooTest,\n                            DoesBlah, HasPropertyA);\n\n// Finally, you are free to instantiate the pattern with the types you\n// want.  If you put the above code in a header file, you can #include\n// it in multiple C++ source files and instantiate it multiple times.\n//\n// To distinguish different instances of the pattern, the first\n// argument to the INSTANTIATE_* macro is a prefix that will be added\n// to the actual test suite name.  Remember to pick unique prefixes for\n// different instances.\ntypedef testing::Types<char, int, unsigned int> MyTypes;\nINSTANTIATE_TYPED_TEST_SUITE_P(My, FooTest, MyTypes);\n\n// If the type list contains only one type, you can write that type\n// directly without Types<...>:\n//   INSTANTIATE_TYPED_TEST_SUITE_P(My, FooTest, int);\n//\n// Similar to the optional argument of TYPED_TEST_SUITE above,\n// INSTANTIATE_TEST_SUITE_P takes an optional fourth argument which allows to\n// generate custom names.\n//   INSTANTIATE_TYPED_TEST_SUITE_P(My, FooTest, MyTypes, MyTypeNames);\n\n#endif  // 0\n\n\n// Implements typed tests.\n\n#if GTEST_HAS_TYPED_TEST\n\n// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.\n//\n// Expands to the name of the typedef for the type parameters of the\n// given test suite.\n#define GTEST_TYPE_PARAMS_(TestSuiteName) gtest_type_params_##TestSuiteName##_\n\n// Expands to the name of the typedef for the NameGenerator, responsible for\n// creating the suffixes of the name.\n#define GTEST_NAME_GENERATOR_(TestSuiteName) \\\n  gtest_type_params_##TestSuiteName##_NameGenerator\n\n// The 'Types' template argument below must have spaces around it\n// since some compilers may choke on '>>' when passing a template\n// instance (e.g. Types<int>)\n#define TYPED_TEST_SUITE(CaseName, Types, ...)                           \\\n  typedef ::testing::internal::TypeList<Types>::type GTEST_TYPE_PARAMS_( \\\n      CaseName);                                                         \\\n  typedef ::testing::internal::NameGeneratorSelector<__VA_ARGS__>::type  \\\n      GTEST_NAME_GENERATOR_(CaseName)\n\n# define TYPED_TEST(CaseName, TestName)                                       \\\n  template <typename gtest_TypeParam_>                                        \\\n  class GTEST_TEST_CLASS_NAME_(CaseName, TestName)                            \\\n      : public CaseName<gtest_TypeParam_> {                                   \\\n   private:                                                                   \\\n    typedef CaseName<gtest_TypeParam_> TestFixture;                           \\\n    typedef gtest_TypeParam_ TypeParam;                                       \\\n    virtual void TestBody();                                                  \\\n  };                                                                          \\\n  static bool gtest_##CaseName##_##TestName##_registered_                     \\\n        GTEST_ATTRIBUTE_UNUSED_ =                                             \\\n      ::testing::internal::TypeParameterizedTest<                             \\\n          CaseName,                                                           \\\n          ::testing::internal::TemplateSel<GTEST_TEST_CLASS_NAME_(CaseName,   \\\n                                                                  TestName)>, \\\n          GTEST_TYPE_PARAMS_(                                                 \\\n              CaseName)>::Register(\"\",                                        \\\n                                   ::testing::internal::CodeLocation(         \\\n                                       __FILE__, __LINE__),                   \\\n                                   #CaseName, #TestName, 0,                   \\\n                                   ::testing::internal::GenerateNames<        \\\n                                       GTEST_NAME_GENERATOR_(CaseName),       \\\n                                       GTEST_TYPE_PARAMS_(CaseName)>());      \\\n  template <typename gtest_TypeParam_>                                        \\\n  void GTEST_TEST_CLASS_NAME_(CaseName,                                       \\\n                              TestName)<gtest_TypeParam_>::TestBody()\n\n// Legacy API is deprecated but still available\n#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_\n#define TYPED_TEST_CASE                                                \\\n  static_assert(::testing::internal::TypedTestCaseIsDeprecated(), \"\"); \\\n  TYPED_TEST_SUITE\n#endif  // GTEST_REMOVE_LEGACY_TEST_CASEAPI_\n\n#endif  // GTEST_HAS_TYPED_TEST\n\n// Implements type-parameterized tests.\n\n#if GTEST_HAS_TYPED_TEST_P\n\n// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.\n//\n// Expands to the namespace name that the type-parameterized tests for\n// the given type-parameterized test suite are defined in.  The exact\n// name of the namespace is subject to change without notice.\n#define GTEST_SUITE_NAMESPACE_(TestSuiteName) gtest_suite_##TestSuiteName##_\n\n// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.\n//\n// Expands to the name of the variable used to remember the names of\n// the defined tests in the given test suite.\n#define GTEST_TYPED_TEST_SUITE_P_STATE_(TestSuiteName) \\\n  gtest_typed_test_suite_p_state_##TestSuiteName##_\n\n// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE DIRECTLY.\n//\n// Expands to the name of the variable used to remember the names of\n// the registered tests in the given test suite.\n#define GTEST_REGISTERED_TEST_NAMES_(TestSuiteName) \\\n  gtest_registered_test_names_##TestSuiteName##_\n\n// The variables defined in the type-parameterized test macros are\n// static as typically these macros are used in a .h file that can be\n// #included in multiple translation units linked together.\n#define TYPED_TEST_SUITE_P(SuiteName)              \\\n  static ::testing::internal::TypedTestSuitePState \\\n      GTEST_TYPED_TEST_SUITE_P_STATE_(SuiteName)\n\n// Legacy API is deprecated but still available\n#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_\n#define TYPED_TEST_CASE_P                                                 \\\n  static_assert(::testing::internal::TypedTestCase_P_IsDeprecated(), \"\"); \\\n  TYPED_TEST_SUITE_P\n#endif  // GTEST_REMOVE_LEGACY_TEST_CASEAPI_\n\n#define TYPED_TEST_P(SuiteName, TestName)                             \\\n  namespace GTEST_SUITE_NAMESPACE_(SuiteName) {                       \\\n    template <typename gtest_TypeParam_>                              \\\n    class TestName : public SuiteName<gtest_TypeParam_> {             \\\n     private:                                                         \\\n      typedef SuiteName<gtest_TypeParam_> TestFixture;                \\\n      typedef gtest_TypeParam_ TypeParam;                             \\\n      virtual void TestBody();                                        \\\n    };                                                                \\\n    static bool gtest_##TestName##_defined_ GTEST_ATTRIBUTE_UNUSED_ = \\\n        GTEST_TYPED_TEST_SUITE_P_STATE_(SuiteName).AddTestName(       \\\n            __FILE__, __LINE__, #SuiteName, #TestName);               \\\n  }                                                                   \\\n  template <typename gtest_TypeParam_>                                \\\n  void GTEST_SUITE_NAMESPACE_(                                        \\\n      SuiteName)::TestName<gtest_TypeParam_>::TestBody()\n\n#define REGISTER_TYPED_TEST_SUITE_P(SuiteName, ...)                            \\\n  namespace GTEST_SUITE_NAMESPACE_(SuiteName) {                                \\\n    typedef ::testing::internal::Templates<__VA_ARGS__>::type gtest_AllTests_; \\\n  }                                                                            \\\n  static const char* const GTEST_REGISTERED_TEST_NAMES_(                       \\\n      SuiteName) GTEST_ATTRIBUTE_UNUSED_ =                                     \\\n      GTEST_TYPED_TEST_SUITE_P_STATE_(SuiteName).VerifyRegisteredTestNames(    \\\n          __FILE__, __LINE__, #__VA_ARGS__)\n\n// Legacy API is deprecated but still available\n#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_\n#define REGISTER_TYPED_TEST_CASE_P                                           \\\n  static_assert(::testing::internal::RegisterTypedTestCase_P_IsDeprecated(), \\\n                \"\");                                                         \\\n  REGISTER_TYPED_TEST_SUITE_P\n#endif  // GTEST_REMOVE_LEGACY_TEST_CASEAPI_\n\n// The 'Types' template argument below must have spaces around it\n// since some compilers may choke on '>>' when passing a template\n// instance (e.g. Types<int>)\n#define INSTANTIATE_TYPED_TEST_SUITE_P(Prefix, SuiteName, Types, ...)       \\\n  static bool gtest_##Prefix##_##SuiteName GTEST_ATTRIBUTE_UNUSED_ =        \\\n      ::testing::internal::TypeParameterizedTestSuite<                      \\\n          SuiteName, GTEST_SUITE_NAMESPACE_(SuiteName)::gtest_AllTests_,    \\\n          ::testing::internal::TypeList<Types>::type>::                     \\\n          Register(#Prefix,                                                 \\\n                   ::testing::internal::CodeLocation(__FILE__, __LINE__),   \\\n                   &GTEST_TYPED_TEST_SUITE_P_STATE_(SuiteName), #SuiteName, \\\n                   GTEST_REGISTERED_TEST_NAMES_(SuiteName),                 \\\n                   ::testing::internal::GenerateNames<                      \\\n                       ::testing::internal::NameGeneratorSelector<          \\\n                           __VA_ARGS__>::type,                              \\\n                       ::testing::internal::TypeList<Types>::type>())\n\n// Legacy API is deprecated but still available\n#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_\n#define INSTANTIATE_TYPED_TEST_CASE_P                                      \\\n  static_assert(                                                           \\\n      ::testing::internal::InstantiateTypedTestCase_P_IsDeprecated(), \"\"); \\\n  INSTANTIATE_TYPED_TEST_SUITE_P\n#endif  // GTEST_REMOVE_LEGACY_TEST_CASEAPI_\n\n#endif  // GTEST_HAS_TYPED_TEST_P\n\n#endif  // GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_\n\nGTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \\\n/* class A needs to have dll-interface to be used by clients of class B */)\n\n// Depending on the platform, different string classes are available.\n// On Linux, in addition to ::std::string, Google also makes use of\n// class ::string, which has the same interface as ::std::string, but\n// has a different implementation.\n//\n// You can define GTEST_HAS_GLOBAL_STRING to 1 to indicate that\n// ::string is available AND is a distinct type to ::std::string, or\n// define it to 0 to indicate otherwise.\n//\n// If ::std::string and ::string are the same class on your platform\n// due to aliasing, you should define GTEST_HAS_GLOBAL_STRING to 0.\n//\n// If you do not define GTEST_HAS_GLOBAL_STRING, it is defined\n// heuristically.\n\nnamespace testing {\n\n// Silence C4100 (unreferenced formal parameter) and 4805\n// unsafe mix of type 'const int' and type 'const bool'\n#ifdef _MSC_VER\n# pragma warning(push)\n# pragma warning(disable:4805)\n# pragma warning(disable:4100)\n#endif\n\n\n// Declares the flags.\n\n// This flag temporary enables the disabled tests.\nGTEST_DECLARE_bool_(also_run_disabled_tests);\n\n// This flag brings the debugger on an assertion failure.\nGTEST_DECLARE_bool_(break_on_failure);\n\n// This flag controls whether Google Test catches all test-thrown exceptions\n// and logs them as failures.\nGTEST_DECLARE_bool_(catch_exceptions);\n\n// This flag enables using colors in terminal output. Available values are\n// \"yes\" to enable colors, \"no\" (disable colors), or \"auto\" (the default)\n// to let Google Test decide.\nGTEST_DECLARE_string_(color);\n\n// This flag sets up the filter to select by name using a glob pattern\n// the tests to run. If the filter is not given all tests are executed.\nGTEST_DECLARE_string_(filter);\n\n// This flag controls whether Google Test installs a signal handler that dumps\n// debugging information when fatal signals are raised.\nGTEST_DECLARE_bool_(install_failure_signal_handler);\n\n// This flag causes the Google Test to list tests. None of the tests listed\n// are actually run if the flag is provided.\nGTEST_DECLARE_bool_(list_tests);\n\n// This flag controls whether Google Test emits a detailed XML report to a file\n// in addition to its normal textual output.\nGTEST_DECLARE_string_(output);\n\n// This flags control whether Google Test prints the elapsed time for each\n// test.\nGTEST_DECLARE_bool_(print_time);\n\n// This flags control whether Google Test prints UTF8 characters as text.\nGTEST_DECLARE_bool_(print_utf8);\n\n// This flag specifies the random number seed.\nGTEST_DECLARE_int32_(random_seed);\n\n// This flag sets how many times the tests are repeated. The default value\n// is 1. If the value is -1 the tests are repeating forever.\nGTEST_DECLARE_int32_(repeat);\n\n// This flag controls whether Google Test includes Google Test internal\n// stack frames in failure stack traces.\nGTEST_DECLARE_bool_(show_internal_stack_frames);\n\n// When this flag is specified, tests' order is randomized on every iteration.\nGTEST_DECLARE_bool_(shuffle);\n\n// This flag specifies the maximum number of stack frames to be\n// printed in a failure message.\nGTEST_DECLARE_int32_(stack_trace_depth);\n\n// When this flag is specified, a failed assertion will throw an\n// exception if exceptions are enabled, or exit the program with a\n// non-zero code otherwise. For use with an external test framework.\nGTEST_DECLARE_bool_(throw_on_failure);\n\n// When this flag is set with a \"host:port\" string, on supported\n// platforms test results are streamed to the specified port on\n// the specified host machine.\nGTEST_DECLARE_string_(stream_result_to);\n\n#if GTEST_USE_OWN_FLAGFILE_FLAG_\nGTEST_DECLARE_string_(flagfile);\n#endif  // GTEST_USE_OWN_FLAGFILE_FLAG_\n\n// The upper limit for valid stack trace depths.\nconst int kMaxStackTraceDepth = 100;\n\nnamespace internal {\n\nclass AssertHelper;\nclass DefaultGlobalTestPartResultReporter;\nclass ExecDeathTest;\nclass NoExecDeathTest;\nclass FinalSuccessChecker;\nclass GTestFlagSaver;\nclass StreamingListenerTest;\nclass TestResultAccessor;\nclass TestEventListenersAccessor;\nclass TestEventRepeater;\nclass UnitTestRecordPropertyTestHelper;\nclass WindowsDeathTest;\nclass FuchsiaDeathTest;\nclass UnitTestImpl* GetUnitTestImpl();\nvoid ReportFailureInUnknownLocation(TestPartResult::Type result_type,\n                                    const std::string& message);\n\n}  // namespace internal\n\n// The friend relationship of some of these classes is cyclic.\n// If we don't forward declare them the compiler might confuse the classes\n// in friendship clauses with same named classes on the scope.\nclass Test;\nclass TestSuite;\n\n// Old API is still available but deprecated\n#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_\nusing TestCase = TestSuite;\n#endif\nclass TestInfo;\nclass UnitTest;\n\n// A class for indicating whether an assertion was successful.  When\n// the assertion wasn't successful, the AssertionResult object\n// remembers a non-empty message that describes how it failed.\n//\n// To create an instance of this class, use one of the factory functions\n// (AssertionSuccess() and AssertionFailure()).\n//\n// This class is useful for two purposes:\n//   1. Defining predicate functions to be used with Boolean test assertions\n//      EXPECT_TRUE/EXPECT_FALSE and their ASSERT_ counterparts\n//   2. Defining predicate-format functions to be\n//      used with predicate assertions (ASSERT_PRED_FORMAT*, etc).\n//\n// For example, if you define IsEven predicate:\n//\n//   testing::AssertionResult IsEven(int n) {\n//     if ((n % 2) == 0)\n//       return testing::AssertionSuccess();\n//     else\n//       return testing::AssertionFailure() << n << \" is odd\";\n//   }\n//\n// Then the failed expectation EXPECT_TRUE(IsEven(Fib(5)))\n// will print the message\n//\n//   Value of: IsEven(Fib(5))\n//     Actual: false (5 is odd)\n//   Expected: true\n//\n// instead of a more opaque\n//\n//   Value of: IsEven(Fib(5))\n//     Actual: false\n//   Expected: true\n//\n// in case IsEven is a simple Boolean predicate.\n//\n// If you expect your predicate to be reused and want to support informative\n// messages in EXPECT_FALSE and ASSERT_FALSE (negative assertions show up\n// about half as often as positive ones in our tests), supply messages for\n// both success and failure cases:\n//\n//   testing::AssertionResult IsEven(int n) {\n//     if ((n % 2) == 0)\n//       return testing::AssertionSuccess() << n << \" is even\";\n//     else\n//       return testing::AssertionFailure() << n << \" is odd\";\n//   }\n//\n// Then a statement EXPECT_FALSE(IsEven(Fib(6))) will print\n//\n//   Value of: IsEven(Fib(6))\n//     Actual: true (8 is even)\n//   Expected: false\n//\n// NB: Predicates that support negative Boolean assertions have reduced\n// performance in positive ones so be careful not to use them in tests\n// that have lots (tens of thousands) of positive Boolean assertions.\n//\n// To use this class with EXPECT_PRED_FORMAT assertions such as:\n//\n//   // Verifies that Foo() returns an even number.\n//   EXPECT_PRED_FORMAT1(IsEven, Foo());\n//\n// you need to define:\n//\n//   testing::AssertionResult IsEven(const char* expr, int n) {\n//     if ((n % 2) == 0)\n//       return testing::AssertionSuccess();\n//     else\n//       return testing::AssertionFailure()\n//         << \"Expected: \" << expr << \" is even\\n  Actual: it's \" << n;\n//   }\n//\n// If Foo() returns 5, you will see the following message:\n//\n//   Expected: Foo() is even\n//     Actual: it's 5\n//\nclass GTEST_API_ AssertionResult {\n public:\n  // Copy constructor.\n  // Used in EXPECT_TRUE/FALSE(assertion_result).\n  AssertionResult(const AssertionResult& other);\n\n#if defined(_MSC_VER) && _MSC_VER < 1910\n  GTEST_DISABLE_MSC_WARNINGS_PUSH_(4800 /* forcing value to bool */)\n#endif\n\n  // Used in the EXPECT_TRUE/FALSE(bool_expression).\n  //\n  // T must be contextually convertible to bool.\n  //\n  // The second parameter prevents this overload from being considered if\n  // the argument is implicitly convertible to AssertionResult. In that case\n  // we want AssertionResult's copy constructor to be used.\n  template <typename T>\n  explicit AssertionResult(\n      const T& success,\n      typename internal::EnableIf<\n          !std::is_convertible<T, AssertionResult>::value>::type*\n      /*enabler*/\n      = nullptr)\n      : success_(success) {}\n\n#if defined(_MSC_VER) && _MSC_VER < 1910\n  GTEST_DISABLE_MSC_WARNINGS_POP_()\n#endif\n\n  // Assignment operator.\n  AssertionResult& operator=(AssertionResult other) {\n    swap(other);\n    return *this;\n  }\n\n  // Returns true iff the assertion succeeded.\n  operator bool() const { return success_; }  // NOLINT\n\n  // Returns the assertion's negation. Used with EXPECT/ASSERT_FALSE.\n  AssertionResult operator!() const;\n\n  // Returns the text streamed into this AssertionResult. Test assertions\n  // use it when they fail (i.e., the predicate's outcome doesn't match the\n  // assertion's expectation). When nothing has been streamed into the\n  // object, returns an empty string.\n  const char* message() const {\n    return message_.get() != nullptr ? message_->c_str() : \"\";\n  }\n  // Deprecated; please use message() instead.\n  const char* failure_message() const { return message(); }\n\n  // Streams a custom failure message into this object.\n  template <typename T> AssertionResult& operator<<(const T& value) {\n    AppendMessage(Message() << value);\n    return *this;\n  }\n\n  // Allows streaming basic output manipulators such as endl or flush into\n  // this object.\n  AssertionResult& operator<<(\n      ::std::ostream& (*basic_manipulator)(::std::ostream& stream)) {\n    AppendMessage(Message() << basic_manipulator);\n    return *this;\n  }\n\n private:\n  // Appends the contents of message to message_.\n  void AppendMessage(const Message& a_message) {\n    if (message_.get() == nullptr) message_.reset(new ::std::string);\n    message_->append(a_message.GetString().c_str());\n  }\n\n  // Swap the contents of this AssertionResult with other.\n  void swap(AssertionResult& other);\n\n  // Stores result of the assertion predicate.\n  bool success_;\n  // Stores the message describing the condition in case the expectation\n  // construct is not satisfied with the predicate's outcome.\n  // Referenced via a pointer to avoid taking too much stack frame space\n  // with test assertions.\n  std::unique_ptr< ::std::string> message_;\n};\n\n// Makes a successful assertion result.\nGTEST_API_ AssertionResult AssertionSuccess();\n\n// Makes a failed assertion result.\nGTEST_API_ AssertionResult AssertionFailure();\n\n// Makes a failed assertion result with the given failure message.\n// Deprecated; use AssertionFailure() << msg.\nGTEST_API_ AssertionResult AssertionFailure(const Message& msg);\n\n}  // namespace testing\n\n// Includes the auto-generated header that implements a family of generic\n// predicate assertion macros. This include comes late because it relies on\n// APIs declared above.\n// Copyright 2006, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n// This file is AUTOMATICALLY GENERATED on 01/02/2019 by command\n// 'gen_gtest_pred_impl.py 5'.  DO NOT EDIT BY HAND!\n//\n// Implements a family of generic predicate assertion macros.\n// GOOGLETEST_CM0001 DO NOT DELETE\n\n#ifndef GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_\n#define GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_\n\n\nnamespace testing {\n\n// This header implements a family of generic predicate assertion\n// macros:\n//\n//   ASSERT_PRED_FORMAT1(pred_format, v1)\n//   ASSERT_PRED_FORMAT2(pred_format, v1, v2)\n//   ...\n//\n// where pred_format is a function or functor that takes n (in the\n// case of ASSERT_PRED_FORMATn) values and their source expression\n// text, and returns a testing::AssertionResult.  See the definition\n// of ASSERT_EQ in gtest.h for an example.\n//\n// If you don't care about formatting, you can use the more\n// restrictive version:\n//\n//   ASSERT_PRED1(pred, v1)\n//   ASSERT_PRED2(pred, v1, v2)\n//   ...\n//\n// where pred is an n-ary function or functor that returns bool,\n// and the values v1, v2, ..., must support the << operator for\n// streaming to std::ostream.\n//\n// We also define the EXPECT_* variations.\n//\n// For now we only support predicates whose arity is at most 5.\n// Please email googletestframework@googlegroups.com if you need\n// support for higher arities.\n\n// GTEST_ASSERT_ is the basic statement to which all of the assertions\n// in this file reduce.  Don't use this in your code.\n\n#define GTEST_ASSERT_(expression, on_failure) \\\n  GTEST_AMBIGUOUS_ELSE_BLOCKER_ \\\n  if (const ::testing::AssertionResult gtest_ar = (expression)) \\\n    ; \\\n  else \\\n    on_failure(gtest_ar.failure_message())\n\n\n// Helper function for implementing {EXPECT|ASSERT}_PRED1.  Don't use\n// this in your code.\ntemplate <typename Pred,\n          typename T1>\nAssertionResult AssertPred1Helper(const char* pred_text,\n                                  const char* e1,\n                                  Pred pred,\n                                  const T1& v1) {\n  if (pred(v1)) return AssertionSuccess();\n\n  return AssertionFailure()\n         << pred_text << \"(\" << e1 << \") evaluates to false, where\"\n         << \"\\n\"\n         << e1 << \" evaluates to \" << ::testing::PrintToString(v1);\n}\n\n// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT1.\n// Don't use this in your code.\n#define GTEST_PRED_FORMAT1_(pred_format, v1, on_failure)\\\n  GTEST_ASSERT_(pred_format(#v1, v1), \\\n                on_failure)\n\n// Internal macro for implementing {EXPECT|ASSERT}_PRED1.  Don't use\n// this in your code.\n#define GTEST_PRED1_(pred, v1, on_failure)\\\n  GTEST_ASSERT_(::testing::AssertPred1Helper(#pred, \\\n                                             #v1, \\\n                                             pred, \\\n                                             v1), on_failure)\n\n// Unary predicate assertion macros.\n#define EXPECT_PRED_FORMAT1(pred_format, v1) \\\n  GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_NONFATAL_FAILURE_)\n#define EXPECT_PRED1(pred, v1) \\\n  GTEST_PRED1_(pred, v1, GTEST_NONFATAL_FAILURE_)\n#define ASSERT_PRED_FORMAT1(pred_format, v1) \\\n  GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_FATAL_FAILURE_)\n#define ASSERT_PRED1(pred, v1) \\\n  GTEST_PRED1_(pred, v1, GTEST_FATAL_FAILURE_)\n\n\n\n// Helper function for implementing {EXPECT|ASSERT}_PRED2.  Don't use\n// this in your code.\ntemplate <typename Pred,\n          typename T1,\n          typename T2>\nAssertionResult AssertPred2Helper(const char* pred_text,\n                                  const char* e1,\n                                  const char* e2,\n                                  Pred pred,\n                                  const T1& v1,\n                                  const T2& v2) {\n  if (pred(v1, v2)) return AssertionSuccess();\n\n  return AssertionFailure()\n         << pred_text << \"(\" << e1 << \", \" << e2\n         << \") evaluates to false, where\"\n         << \"\\n\"\n         << e1 << \" evaluates to \" << ::testing::PrintToString(v1) << \"\\n\"\n         << e2 << \" evaluates to \" << ::testing::PrintToString(v2);\n}\n\n// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT2.\n// Don't use this in your code.\n#define GTEST_PRED_FORMAT2_(pred_format, v1, v2, on_failure)\\\n  GTEST_ASSERT_(pred_format(#v1, #v2, v1, v2), \\\n                on_failure)\n\n// Internal macro for implementing {EXPECT|ASSERT}_PRED2.  Don't use\n// this in your code.\n#define GTEST_PRED2_(pred, v1, v2, on_failure)\\\n  GTEST_ASSERT_(::testing::AssertPred2Helper(#pred, \\\n                                             #v1, \\\n                                             #v2, \\\n                                             pred, \\\n                                             v1, \\\n                                             v2), on_failure)\n\n// Binary predicate assertion macros.\n#define EXPECT_PRED_FORMAT2(pred_format, v1, v2) \\\n  GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_NONFATAL_FAILURE_)\n#define EXPECT_PRED2(pred, v1, v2) \\\n  GTEST_PRED2_(pred, v1, v2, GTEST_NONFATAL_FAILURE_)\n#define ASSERT_PRED_FORMAT2(pred_format, v1, v2) \\\n  GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_FATAL_FAILURE_)\n#define ASSERT_PRED2(pred, v1, v2) \\\n  GTEST_PRED2_(pred, v1, v2, GTEST_FATAL_FAILURE_)\n\n\n\n// Helper function for implementing {EXPECT|ASSERT}_PRED3.  Don't use\n// this in your code.\ntemplate <typename Pred,\n          typename T1,\n          typename T2,\n          typename T3>\nAssertionResult AssertPred3Helper(const char* pred_text,\n                                  const char* e1,\n                                  const char* e2,\n                                  const char* e3,\n                                  Pred pred,\n                                  const T1& v1,\n                                  const T2& v2,\n                                  const T3& v3) {\n  if (pred(v1, v2, v3)) return AssertionSuccess();\n\n  return AssertionFailure()\n         << pred_text << \"(\" << e1 << \", \" << e2 << \", \" << e3\n         << \") evaluates to false, where\"\n         << \"\\n\"\n         << e1 << \" evaluates to \" << ::testing::PrintToString(v1) << \"\\n\"\n         << e2 << \" evaluates to \" << ::testing::PrintToString(v2) << \"\\n\"\n         << e3 << \" evaluates to \" << ::testing::PrintToString(v3);\n}\n\n// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT3.\n// Don't use this in your code.\n#define GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, on_failure)\\\n  GTEST_ASSERT_(pred_format(#v1, #v2, #v3, v1, v2, v3), \\\n                on_failure)\n\n// Internal macro for implementing {EXPECT|ASSERT}_PRED3.  Don't use\n// this in your code.\n#define GTEST_PRED3_(pred, v1, v2, v3, on_failure)\\\n  GTEST_ASSERT_(::testing::AssertPred3Helper(#pred, \\\n                                             #v1, \\\n                                             #v2, \\\n                                             #v3, \\\n                                             pred, \\\n                                             v1, \\\n                                             v2, \\\n                                             v3), on_failure)\n\n// Ternary predicate assertion macros.\n#define EXPECT_PRED_FORMAT3(pred_format, v1, v2, v3) \\\n  GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, GTEST_NONFATAL_FAILURE_)\n#define EXPECT_PRED3(pred, v1, v2, v3) \\\n  GTEST_PRED3_(pred, v1, v2, v3, GTEST_NONFATAL_FAILURE_)\n#define ASSERT_PRED_FORMAT3(pred_format, v1, v2, v3) \\\n  GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, GTEST_FATAL_FAILURE_)\n#define ASSERT_PRED3(pred, v1, v2, v3) \\\n  GTEST_PRED3_(pred, v1, v2, v3, GTEST_FATAL_FAILURE_)\n\n\n\n// Helper function for implementing {EXPECT|ASSERT}_PRED4.  Don't use\n// this in your code.\ntemplate <typename Pred,\n          typename T1,\n          typename T2,\n          typename T3,\n          typename T4>\nAssertionResult AssertPred4Helper(const char* pred_text,\n                                  const char* e1,\n                                  const char* e2,\n                                  const char* e3,\n                                  const char* e4,\n                                  Pred pred,\n                                  const T1& v1,\n                                  const T2& v2,\n                                  const T3& v3,\n                                  const T4& v4) {\n  if (pred(v1, v2, v3, v4)) return AssertionSuccess();\n\n  return AssertionFailure()\n         << pred_text << \"(\" << e1 << \", \" << e2 << \", \" << e3 << \", \" << e4\n         << \") evaluates to false, where\"\n         << \"\\n\"\n         << e1 << \" evaluates to \" << ::testing::PrintToString(v1) << \"\\n\"\n         << e2 << \" evaluates to \" << ::testing::PrintToString(v2) << \"\\n\"\n         << e3 << \" evaluates to \" << ::testing::PrintToString(v3) << \"\\n\"\n         << e4 << \" evaluates to \" << ::testing::PrintToString(v4);\n}\n\n// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT4.\n// Don't use this in your code.\n#define GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, on_failure)\\\n  GTEST_ASSERT_(pred_format(#v1, #v2, #v3, #v4, v1, v2, v3, v4), \\\n                on_failure)\n\n// Internal macro for implementing {EXPECT|ASSERT}_PRED4.  Don't use\n// this in your code.\n#define GTEST_PRED4_(pred, v1, v2, v3, v4, on_failure)\\\n  GTEST_ASSERT_(::testing::AssertPred4Helper(#pred, \\\n                                             #v1, \\\n                                             #v2, \\\n                                             #v3, \\\n                                             #v4, \\\n                                             pred, \\\n                                             v1, \\\n                                             v2, \\\n                                             v3, \\\n                                             v4), on_failure)\n\n// 4-ary predicate assertion macros.\n#define EXPECT_PRED_FORMAT4(pred_format, v1, v2, v3, v4) \\\n  GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, GTEST_NONFATAL_FAILURE_)\n#define EXPECT_PRED4(pred, v1, v2, v3, v4) \\\n  GTEST_PRED4_(pred, v1, v2, v3, v4, GTEST_NONFATAL_FAILURE_)\n#define ASSERT_PRED_FORMAT4(pred_format, v1, v2, v3, v4) \\\n  GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, GTEST_FATAL_FAILURE_)\n#define ASSERT_PRED4(pred, v1, v2, v3, v4) \\\n  GTEST_PRED4_(pred, v1, v2, v3, v4, GTEST_FATAL_FAILURE_)\n\n\n\n// Helper function for implementing {EXPECT|ASSERT}_PRED5.  Don't use\n// this in your code.\ntemplate <typename Pred,\n          typename T1,\n          typename T2,\n          typename T3,\n          typename T4,\n          typename T5>\nAssertionResult AssertPred5Helper(const char* pred_text,\n                                  const char* e1,\n                                  const char* e2,\n                                  const char* e3,\n                                  const char* e4,\n                                  const char* e5,\n                                  Pred pred,\n                                  const T1& v1,\n                                  const T2& v2,\n                                  const T3& v3,\n                                  const T4& v4,\n                                  const T5& v5) {\n  if (pred(v1, v2, v3, v4, v5)) return AssertionSuccess();\n\n  return AssertionFailure()\n         << pred_text << \"(\" << e1 << \", \" << e2 << \", \" << e3 << \", \" << e4\n         << \", \" << e5 << \") evaluates to false, where\"\n         << \"\\n\"\n         << e1 << \" evaluates to \" << ::testing::PrintToString(v1) << \"\\n\"\n         << e2 << \" evaluates to \" << ::testing::PrintToString(v2) << \"\\n\"\n         << e3 << \" evaluates to \" << ::testing::PrintToString(v3) << \"\\n\"\n         << e4 << \" evaluates to \" << ::testing::PrintToString(v4) << \"\\n\"\n         << e5 << \" evaluates to \" << ::testing::PrintToString(v5);\n}\n\n// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT5.\n// Don't use this in your code.\n#define GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, on_failure)\\\n  GTEST_ASSERT_(pred_format(#v1, #v2, #v3, #v4, #v5, v1, v2, v3, v4, v5), \\\n                on_failure)\n\n// Internal macro for implementing {EXPECT|ASSERT}_PRED5.  Don't use\n// this in your code.\n#define GTEST_PRED5_(pred, v1, v2, v3, v4, v5, on_failure)\\\n  GTEST_ASSERT_(::testing::AssertPred5Helper(#pred, \\\n                                             #v1, \\\n                                             #v2, \\\n                                             #v3, \\\n                                             #v4, \\\n                                             #v5, \\\n                                             pred, \\\n                                             v1, \\\n                                             v2, \\\n                                             v3, \\\n                                             v4, \\\n                                             v5), on_failure)\n\n// 5-ary predicate assertion macros.\n#define EXPECT_PRED_FORMAT5(pred_format, v1, v2, v3, v4, v5) \\\n  GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, GTEST_NONFATAL_FAILURE_)\n#define EXPECT_PRED5(pred, v1, v2, v3, v4, v5) \\\n  GTEST_PRED5_(pred, v1, v2, v3, v4, v5, GTEST_NONFATAL_FAILURE_)\n#define ASSERT_PRED_FORMAT5(pred_format, v1, v2, v3, v4, v5) \\\n  GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, GTEST_FATAL_FAILURE_)\n#define ASSERT_PRED5(pred, v1, v2, v3, v4, v5) \\\n  GTEST_PRED5_(pred, v1, v2, v3, v4, v5, GTEST_FATAL_FAILURE_)\n\n\n\n}  // namespace testing\n\n#endif  // GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_\n\nnamespace testing {\n\n// The abstract class that all tests inherit from.\n//\n// In Google Test, a unit test program contains one or many TestSuites, and\n// each TestSuite contains one or many Tests.\n//\n// When you define a test using the TEST macro, you don't need to\n// explicitly derive from Test - the TEST macro automatically does\n// this for you.\n//\n// The only time you derive from Test is when defining a test fixture\n// to be used in a TEST_F.  For example:\n//\n//   class FooTest : public testing::Test {\n//    protected:\n//     void SetUp() override { ... }\n//     void TearDown() override { ... }\n//     ...\n//   };\n//\n//   TEST_F(FooTest, Bar) { ... }\n//   TEST_F(FooTest, Baz) { ... }\n//\n// Test is not copyable.\nclass GTEST_API_ Test {\n public:\n  friend class TestInfo;\n\n  // The d'tor is virtual as we intend to inherit from Test.\n  virtual ~Test();\n\n  // Sets up the stuff shared by all tests in this test case.\n  //\n  // Google Test will call Foo::SetUpTestSuite() before running the first\n  // test in test case Foo.  Hence a sub-class can define its own\n  // SetUpTestSuite() method to shadow the one defined in the super\n  // class.\n  static void SetUpTestSuite() {}\n\n  // Tears down the stuff shared by all tests in this test case.\n  //\n  // Google Test will call Foo::TearDownTestSuite() after running the last\n  // test in test case Foo.  Hence a sub-class can define its own\n  // TearDownTestSuite() method to shadow the one defined in the super\n  // class.\n  static void TearDownTestSuite() {}\n\n  // Legacy API is deprecated but still available\n#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_\n  static void TearDownTestCase() {}\n  static void SetUpTestCase() {}\n#endif  // GTEST_REMOVE_LEGACY_TEST_CASEAPI_\n\n  // Returns true iff the current test has a fatal failure.\n  static bool HasFatalFailure();\n\n  // Returns true iff the current test has a non-fatal failure.\n  static bool HasNonfatalFailure();\n\n  // Returns true iff the current test was skipped.\n  static bool IsSkipped();\n\n  // Returns true iff the current test has a (either fatal or\n  // non-fatal) failure.\n  static bool HasFailure() { return HasFatalFailure() || HasNonfatalFailure(); }\n\n  // Logs a property for the current test, test suite, or for the entire\n  // invocation of the test program when used outside of the context of a\n  // test suite.  Only the last value for a given key is remembered.  These\n  // are public static so they can be called from utility functions that are\n  // not members of the test fixture.  Calls to RecordProperty made during\n  // lifespan of the test (from the moment its constructor starts to the\n  // moment its destructor finishes) will be output in XML as attributes of\n  // the <testcase> element.  Properties recorded from fixture's\n  // SetUpTestSuite or TearDownTestSuite are logged as attributes of the\n  // corresponding <testsuite> element.  Calls to RecordProperty made in the\n  // global context (before or after invocation of RUN_ALL_TESTS and from\n  // SetUp/TearDown method of Environment objects registered with Google\n  // Test) will be output as attributes of the <testsuites> element.\n  static void RecordProperty(const std::string& key, const std::string& value);\n  static void RecordProperty(const std::string& key, int value);\n\n protected:\n  // Creates a Test object.\n  Test();\n\n  // Sets up the test fixture.\n  virtual void SetUp();\n\n  // Tears down the test fixture.\n  virtual void TearDown();\n\n private:\n  // Returns true iff the current test has the same fixture class as\n  // the first test in the current test suite.\n  static bool HasSameFixtureClass();\n\n  // Runs the test after the test fixture has been set up.\n  //\n  // A sub-class must implement this to define the test logic.\n  //\n  // DO NOT OVERRIDE THIS FUNCTION DIRECTLY IN A USER PROGRAM.\n  // Instead, use the TEST or TEST_F macro.\n  virtual void TestBody() = 0;\n\n  // Sets up, executes, and tears down the test.\n  void Run();\n\n  // Deletes self.  We deliberately pick an unusual name for this\n  // internal method to avoid clashing with names used in user TESTs.\n  void DeleteSelf_() { delete this; }\n\n  const std::unique_ptr<GTEST_FLAG_SAVER_> gtest_flag_saver_;\n\n  // Often a user misspells SetUp() as Setup() and spends a long time\n  // wondering why it is never called by Google Test.  The declaration of\n  // the following method is solely for catching such an error at\n  // compile time:\n  //\n  //   - The return type is deliberately chosen to be not void, so it\n  //   will be a conflict if void Setup() is declared in the user's\n  //   test fixture.\n  //\n  //   - This method is private, so it will be another compiler error\n  //   if the method is called from the user's test fixture.\n  //\n  // DO NOT OVERRIDE THIS FUNCTION.\n  //\n  // If you see an error about overriding the following function or\n  // about it being private, you have mis-spelled SetUp() as Setup().\n  struct Setup_should_be_spelled_SetUp {};\n  virtual Setup_should_be_spelled_SetUp* Setup() { return nullptr; }\n\n  // We disallow copying Tests.\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(Test);\n};\n\ntypedef internal::TimeInMillis TimeInMillis;\n\n// A copyable object representing a user specified test property which can be\n// output as a key/value string pair.\n//\n// Don't inherit from TestProperty as its destructor is not virtual.\nclass TestProperty {\n public:\n  // C'tor.  TestProperty does NOT have a default constructor.\n  // Always use this constructor (with parameters) to create a\n  // TestProperty object.\n  TestProperty(const std::string& a_key, const std::string& a_value) :\n    key_(a_key), value_(a_value) {\n  }\n\n  // Gets the user supplied key.\n  const char* key() const {\n    return key_.c_str();\n  }\n\n  // Gets the user supplied value.\n  const char* value() const {\n    return value_.c_str();\n  }\n\n  // Sets a new value, overriding the one supplied in the constructor.\n  void SetValue(const std::string& new_value) {\n    value_ = new_value;\n  }\n\n private:\n  // The key supplied by the user.\n  std::string key_;\n  // The value supplied by the user.\n  std::string value_;\n};\n\n// The result of a single Test.  This includes a list of\n// TestPartResults, a list of TestProperties, a count of how many\n// death tests there are in the Test, and how much time it took to run\n// the Test.\n//\n// TestResult is not copyable.\nclass GTEST_API_ TestResult {\n public:\n  // Creates an empty TestResult.\n  TestResult();\n\n  // D'tor.  Do not inherit from TestResult.\n  ~TestResult();\n\n  // Gets the number of all test parts.  This is the sum of the number\n  // of successful test parts and the number of failed test parts.\n  int total_part_count() const;\n\n  // Returns the number of the test properties.\n  int test_property_count() const;\n\n  // Returns true iff the test passed (i.e. no test part failed).\n  bool Passed() const { return !Skipped() && !Failed(); }\n\n  // Returns true iff the test was skipped.\n  bool Skipped() const;\n\n  // Returns true iff the test failed.\n  bool Failed() const;\n\n  // Returns true iff the test fatally failed.\n  bool HasFatalFailure() const;\n\n  // Returns true iff the test has a non-fatal failure.\n  bool HasNonfatalFailure() const;\n\n  // Returns the elapsed time, in milliseconds.\n  TimeInMillis elapsed_time() const { return elapsed_time_; }\n\n  // Returns the i-th test part result among all the results. i can range from 0\n  // to total_part_count() - 1. If i is not in that range, aborts the program.\n  const TestPartResult& GetTestPartResult(int i) const;\n\n  // Returns the i-th test property. i can range from 0 to\n  // test_property_count() - 1. If i is not in that range, aborts the\n  // program.\n  const TestProperty& GetTestProperty(int i) const;\n\n private:\n  friend class TestInfo;\n  friend class TestSuite;\n  friend class UnitTest;\n  friend class internal::DefaultGlobalTestPartResultReporter;\n  friend class internal::ExecDeathTest;\n  friend class internal::TestResultAccessor;\n  friend class internal::UnitTestImpl;\n  friend class internal::WindowsDeathTest;\n  friend class internal::FuchsiaDeathTest;\n\n  // Gets the vector of TestPartResults.\n  const std::vector<TestPartResult>& test_part_results() const {\n    return test_part_results_;\n  }\n\n  // Gets the vector of TestProperties.\n  const std::vector<TestProperty>& test_properties() const {\n    return test_properties_;\n  }\n\n  // Sets the elapsed time.\n  void set_elapsed_time(TimeInMillis elapsed) { elapsed_time_ = elapsed; }\n\n  // Adds a test property to the list. The property is validated and may add\n  // a non-fatal failure if invalid (e.g., if it conflicts with reserved\n  // key names). If a property is already recorded for the same key, the\n  // value will be updated, rather than storing multiple values for the same\n  // key.  xml_element specifies the element for which the property is being\n  // recorded and is used for validation.\n  void RecordProperty(const std::string& xml_element,\n                      const TestProperty& test_property);\n\n  // Adds a failure if the key is a reserved attribute of Google Test\n  // testsuite tags.  Returns true if the property is valid.\n  // FIXME: Validate attribute names are legal and human readable.\n  static bool ValidateTestProperty(const std::string& xml_element,\n                                   const TestProperty& test_property);\n\n  // Adds a test part result to the list.\n  void AddTestPartResult(const TestPartResult& test_part_result);\n\n  // Returns the death test count.\n  int death_test_count() const { return death_test_count_; }\n\n  // Increments the death test count, returning the new count.\n  int increment_death_test_count() { return ++death_test_count_; }\n\n  // Clears the test part results.\n  void ClearTestPartResults();\n\n  // Clears the object.\n  void Clear();\n\n  // Protects mutable state of the property vector and of owned\n  // properties, whose values may be updated.\n  internal::Mutex test_properites_mutex_;\n\n  // The vector of TestPartResults\n  std::vector<TestPartResult> test_part_results_;\n  // The vector of TestProperties\n  std::vector<TestProperty> test_properties_;\n  // Running count of death tests.\n  int death_test_count_;\n  // The elapsed time, in milliseconds.\n  TimeInMillis elapsed_time_;\n\n  // We disallow copying TestResult.\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(TestResult);\n};  // class TestResult\n\n// A TestInfo object stores the following information about a test:\n//\n//   Test suite name\n//   Test name\n//   Whether the test should be run\n//   A function pointer that creates the test object when invoked\n//   Test result\n//\n// The constructor of TestInfo registers itself with the UnitTest\n// singleton such that the RUN_ALL_TESTS() macro knows which tests to\n// run.\nclass GTEST_API_ TestInfo {\n public:\n  // Destructs a TestInfo object.  This function is not virtual, so\n  // don't inherit from TestInfo.\n  ~TestInfo();\n\n  // Returns the test suite name.\n  const char* test_suite_name() const { return test_suite_name_.c_str(); }\n\n// Legacy API is deprecated but still available\n#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_\n  const char* test_case_name() const { return test_suite_name(); }\n#endif  // GTEST_REMOVE_LEGACY_TEST_CASEAPI_\n\n  // Returns the test name.\n  const char* name() const { return name_.c_str(); }\n\n  // Returns the name of the parameter type, or NULL if this is not a typed\n  // or a type-parameterized test.\n  const char* type_param() const {\n    if (type_param_.get() != nullptr) return type_param_->c_str();\n    return nullptr;\n  }\n\n  // Returns the text representation of the value parameter, or NULL if this\n  // is not a value-parameterized test.\n  const char* value_param() const {\n    if (value_param_.get() != nullptr) return value_param_->c_str();\n    return nullptr;\n  }\n\n  // Returns the file name where this test is defined.\n  const char* file() const { return location_.file.c_str(); }\n\n  // Returns the line where this test is defined.\n  int line() const { return location_.line; }\n\n  // Return true if this test should not be run because it's in another shard.\n  bool is_in_another_shard() const { return is_in_another_shard_; }\n\n  // Returns true if this test should run, that is if the test is not\n  // disabled (or it is disabled but the also_run_disabled_tests flag has\n  // been specified) and its full name matches the user-specified filter.\n  //\n  // Google Test allows the user to filter the tests by their full names.\n  // The full name of a test Bar in test suite Foo is defined as\n  // \"Foo.Bar\".  Only the tests that match the filter will run.\n  //\n  // A filter is a colon-separated list of glob (not regex) patterns,\n  // optionally followed by a '-' and a colon-separated list of\n  // negative patterns (tests to exclude).  A test is run if it\n  // matches one of the positive patterns and does not match any of\n  // the negative patterns.\n  //\n  // For example, *A*:Foo.* is a filter that matches any string that\n  // contains the character 'A' or starts with \"Foo.\".\n  bool should_run() const { return should_run_; }\n\n  // Returns true iff this test will appear in the XML report.\n  bool is_reportable() const {\n    // The XML report includes tests matching the filter, excluding those\n    // run in other shards.\n    return matches_filter_ && !is_in_another_shard_;\n  }\n\n  // Returns the result of the test.\n  const TestResult* result() const { return &result_; }\n\n private:\n#if GTEST_HAS_DEATH_TEST\n  friend class internal::DefaultDeathTestFactory;\n#endif  // GTEST_HAS_DEATH_TEST\n  friend class Test;\n  friend class TestSuite;\n  friend class internal::UnitTestImpl;\n  friend class internal::StreamingListenerTest;\n  friend TestInfo* internal::MakeAndRegisterTestInfo(\n      const char* test_suite_name, const char* name, const char* type_param,\n      const char* value_param, internal::CodeLocation code_location,\n      internal::TypeId fixture_class_id, internal::SetUpTestSuiteFunc set_up_tc,\n      internal::TearDownTestSuiteFunc tear_down_tc,\n      internal::TestFactoryBase* factory);\n\n  // Constructs a TestInfo object. The newly constructed instance assumes\n  // ownership of the factory object.\n  TestInfo(const std::string& test_suite_name, const std::string& name,\n           const char* a_type_param,   // NULL if not a type-parameterized test\n           const char* a_value_param,  // NULL if not a value-parameterized test\n           internal::CodeLocation a_code_location,\n           internal::TypeId fixture_class_id,\n           internal::TestFactoryBase* factory);\n\n  // Increments the number of death tests encountered in this test so\n  // far.\n  int increment_death_test_count() {\n    return result_.increment_death_test_count();\n  }\n\n  // Creates the test object, runs it, records its result, and then\n  // deletes it.\n  void Run();\n\n  static void ClearTestResult(TestInfo* test_info) {\n    test_info->result_.Clear();\n  }\n\n  // These fields are immutable properties of the test.\n  const std::string test_suite_name_;    // test suite name\n  const std::string name_;               // Test name\n  // Name of the parameter type, or NULL if this is not a typed or a\n  // type-parameterized test.\n  const std::unique_ptr<const ::std::string> type_param_;\n  // Text representation of the value parameter, or NULL if this is not a\n  // value-parameterized test.\n  const std::unique_ptr<const ::std::string> value_param_;\n  internal::CodeLocation location_;\n  const internal::TypeId fixture_class_id_;   // ID of the test fixture class\n  bool should_run_;                 // True iff this test should run\n  bool is_disabled_;                // True iff this test is disabled\n  bool matches_filter_;             // True if this test matches the\n                                    // user-specified filter.\n  bool is_in_another_shard_;        // Will be run in another shard.\n  internal::TestFactoryBase* const factory_;  // The factory that creates\n                                              // the test object\n\n  // This field is mutable and needs to be reset before running the\n  // test for the second time.\n  TestResult result_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(TestInfo);\n};\n\n// A test suite, which consists of a vector of TestInfos.\n//\n// TestSuite is not copyable.\nclass GTEST_API_ TestSuite {\n public:\n  // Creates a TestSuite with the given name.\n  //\n  // TestSuite does NOT have a default constructor.  Always use this\n  // constructor to create a TestSuite object.\n  //\n  // Arguments:\n  //\n  //   name:         name of the test suite\n  //   a_type_param: the name of the test's type parameter, or NULL if\n  //                 this is not a type-parameterized test.\n  //   set_up_tc:    pointer to the function that sets up the test suite\n  //   tear_down_tc: pointer to the function that tears down the test suite\n  TestSuite(const char* name, const char* a_type_param,\n            internal::SetUpTestSuiteFunc set_up_tc,\n            internal::TearDownTestSuiteFunc tear_down_tc);\n\n  // Destructor of TestSuite.\n  virtual ~TestSuite();\n\n  // Gets the name of the TestSuite.\n  const char* name() const { return name_.c_str(); }\n\n  // Returns the name of the parameter type, or NULL if this is not a\n  // type-parameterized test suite.\n  const char* type_param() const {\n    if (type_param_.get() != nullptr) return type_param_->c_str();\n    return nullptr;\n  }\n\n  // Returns true if any test in this test suite should run.\n  bool should_run() const { return should_run_; }\n\n  // Gets the number of successful tests in this test suite.\n  int successful_test_count() const;\n\n  // Gets the number of skipped tests in this test suite.\n  int skipped_test_count() const;\n\n  // Gets the number of failed tests in this test suite.\n  int failed_test_count() const;\n\n  // Gets the number of disabled tests that will be reported in the XML report.\n  int reportable_disabled_test_count() const;\n\n  // Gets the number of disabled tests in this test suite.\n  int disabled_test_count() const;\n\n  // Gets the number of tests to be printed in the XML report.\n  int reportable_test_count() const;\n\n  // Get the number of tests in this test suite that should run.\n  int test_to_run_count() const;\n\n  // Gets the number of all tests in this test suite.\n  int total_test_count() const;\n\n  // Returns true iff the test suite passed.\n  bool Passed() const { return !Failed(); }\n\n  // Returns true iff the test suite failed.\n  bool Failed() const { return failed_test_count() > 0; }\n\n  // Returns the elapsed time, in milliseconds.\n  TimeInMillis elapsed_time() const { return elapsed_time_; }\n\n  // Returns the i-th test among all the tests. i can range from 0 to\n  // total_test_count() - 1. If i is not in that range, returns NULL.\n  const TestInfo* GetTestInfo(int i) const;\n\n  // Returns the TestResult that holds test properties recorded during\n  // execution of SetUpTestSuite and TearDownTestSuite.\n  const TestResult& ad_hoc_test_result() const { return ad_hoc_test_result_; }\n\n private:\n  friend class Test;\n  friend class internal::UnitTestImpl;\n\n  // Gets the (mutable) vector of TestInfos in this TestSuite.\n  std::vector<TestInfo*>& test_info_list() { return test_info_list_; }\n\n  // Gets the (immutable) vector of TestInfos in this TestSuite.\n  const std::vector<TestInfo*>& test_info_list() const {\n    return test_info_list_;\n  }\n\n  // Returns the i-th test among all the tests. i can range from 0 to\n  // total_test_count() - 1. If i is not in that range, returns NULL.\n  TestInfo* GetMutableTestInfo(int i);\n\n  // Sets the should_run member.\n  void set_should_run(bool should) { should_run_ = should; }\n\n  // Adds a TestInfo to this test suite.  Will delete the TestInfo upon\n  // destruction of the TestSuite object.\n  void AddTestInfo(TestInfo * test_info);\n\n  // Clears the results of all tests in this test suite.\n  void ClearResult();\n\n  // Clears the results of all tests in the given test suite.\n  static void ClearTestSuiteResult(TestSuite* test_suite) {\n    test_suite->ClearResult();\n  }\n\n  // Runs every test in this TestSuite.\n  void Run();\n\n  // Runs SetUpTestSuite() for this TestSuite.  This wrapper is needed\n  // for catching exceptions thrown from SetUpTestSuite().\n  void RunSetUpTestSuite() {\n    if (set_up_tc_ != nullptr) {\n      (*set_up_tc_)();\n    }\n  }\n\n  // Runs TearDownTestSuite() for this TestSuite.  This wrapper is\n  // needed for catching exceptions thrown from TearDownTestSuite().\n  void RunTearDownTestSuite() {\n    if (tear_down_tc_ != nullptr) {\n      (*tear_down_tc_)();\n    }\n  }\n\n  // Returns true iff test passed.\n  static bool TestPassed(const TestInfo* test_info) {\n    return test_info->should_run() && test_info->result()->Passed();\n  }\n\n  // Returns true iff test skipped.\n  static bool TestSkipped(const TestInfo* test_info) {\n    return test_info->should_run() && test_info->result()->Skipped();\n  }\n\n  // Returns true iff test failed.\n  static bool TestFailed(const TestInfo* test_info) {\n    return test_info->should_run() && test_info->result()->Failed();\n  }\n\n  // Returns true iff the test is disabled and will be reported in the XML\n  // report.\n  static bool TestReportableDisabled(const TestInfo* test_info) {\n    return test_info->is_reportable() && test_info->is_disabled_;\n  }\n\n  // Returns true iff test is disabled.\n  static bool TestDisabled(const TestInfo* test_info) {\n    return test_info->is_disabled_;\n  }\n\n  // Returns true iff this test will appear in the XML report.\n  static bool TestReportable(const TestInfo* test_info) {\n    return test_info->is_reportable();\n  }\n\n  // Returns true if the given test should run.\n  static bool ShouldRunTest(const TestInfo* test_info) {\n    return test_info->should_run();\n  }\n\n  // Shuffles the tests in this test suite.\n  void ShuffleTests(internal::Random* random);\n\n  // Restores the test order to before the first shuffle.\n  void UnshuffleTests();\n\n  // Name of the test suite.\n  std::string name_;\n  // Name of the parameter type, or NULL if this is not a typed or a\n  // type-parameterized test.\n  const std::unique_ptr<const ::std::string> type_param_;\n  // The vector of TestInfos in their original order.  It owns the\n  // elements in the vector.\n  std::vector<TestInfo*> test_info_list_;\n  // Provides a level of indirection for the test list to allow easy\n  // shuffling and restoring the test order.  The i-th element in this\n  // vector is the index of the i-th test in the shuffled test list.\n  std::vector<int> test_indices_;\n  // Pointer to the function that sets up the test suite.\n  internal::SetUpTestSuiteFunc set_up_tc_;\n  // Pointer to the function that tears down the test suite.\n  internal::TearDownTestSuiteFunc tear_down_tc_;\n  // True iff any test in this test suite should run.\n  bool should_run_;\n  // Elapsed time, in milliseconds.\n  TimeInMillis elapsed_time_;\n  // Holds test properties recorded during execution of SetUpTestSuite and\n  // TearDownTestSuite.\n  TestResult ad_hoc_test_result_;\n\n  // We disallow copying TestSuites.\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(TestSuite);\n};\n\n// An Environment object is capable of setting up and tearing down an\n// environment.  You should subclass this to define your own\n// environment(s).\n//\n// An Environment object does the set-up and tear-down in virtual\n// methods SetUp() and TearDown() instead of the constructor and the\n// destructor, as:\n//\n//   1. You cannot safely throw from a destructor.  This is a problem\n//      as in some cases Google Test is used where exceptions are enabled, and\n//      we may want to implement ASSERT_* using exceptions where they are\n//      available.\n//   2. You cannot use ASSERT_* directly in a constructor or\n//      destructor.\nclass Environment {\n public:\n  // The d'tor is virtual as we need to subclass Environment.\n  virtual ~Environment() {}\n\n  // Override this to define how to set up the environment.\n  virtual void SetUp() {}\n\n  // Override this to define how to tear down the environment.\n  virtual void TearDown() {}\n private:\n  // If you see an error about overriding the following function or\n  // about it being private, you have mis-spelled SetUp() as Setup().\n  struct Setup_should_be_spelled_SetUp {};\n  virtual Setup_should_be_spelled_SetUp* Setup() { return nullptr; }\n};\n\n#if GTEST_HAS_EXCEPTIONS\n\n// Exception which can be thrown from TestEventListener::OnTestPartResult.\nclass GTEST_API_ AssertionException\n    : public internal::GoogleTestFailureException {\n public:\n  explicit AssertionException(const TestPartResult& result)\n      : GoogleTestFailureException(result) {}\n};\n\n#endif  // GTEST_HAS_EXCEPTIONS\n\n// The interface for tracing execution of tests. The methods are organized in\n// the order the corresponding events are fired.\nclass TestEventListener {\n public:\n  virtual ~TestEventListener() {}\n\n  // Fired before any test activity starts.\n  virtual void OnTestProgramStart(const UnitTest& unit_test) = 0;\n\n  // Fired before each iteration of tests starts.  There may be more than\n  // one iteration if GTEST_FLAG(repeat) is set. iteration is the iteration\n  // index, starting from 0.\n  virtual void OnTestIterationStart(const UnitTest& unit_test,\n                                    int iteration) = 0;\n\n  // Fired before environment set-up for each iteration of tests starts.\n  virtual void OnEnvironmentsSetUpStart(const UnitTest& unit_test) = 0;\n\n  // Fired after environment set-up for each iteration of tests ends.\n  virtual void OnEnvironmentsSetUpEnd(const UnitTest& unit_test) = 0;\n\n  // Fired before the test suite starts.\n  virtual void OnTestSuiteStart(const TestSuite& /*test_suite*/) {}\n\n  //  Legacy API is deprecated but still available\n#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_\n  virtual void OnTestCaseStart(const TestCase& /*test_case*/) {}\n#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI_\n\n  // Fired before the test starts.\n  virtual void OnTestStart(const TestInfo& test_info) = 0;\n\n  // Fired after a failed assertion or a SUCCEED() invocation.\n  // If you want to throw an exception from this function to skip to the next\n  // TEST, it must be AssertionException defined above, or inherited from it.\n  virtual void OnTestPartResult(const TestPartResult& test_part_result) = 0;\n\n  // Fired after the test ends.\n  virtual void OnTestEnd(const TestInfo& test_info) = 0;\n\n  // Fired after the test suite ends.\n  virtual void OnTestSuiteEnd(const TestSuite& /*test_suite*/) {}\n\n//  Legacy API is deprecated but still available\n#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_\n  virtual void OnTestCaseEnd(const TestCase& /*test_case*/) {}\n#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI_\n\n  // Fired before environment tear-down for each iteration of tests starts.\n  virtual void OnEnvironmentsTearDownStart(const UnitTest& unit_test) = 0;\n\n  // Fired after environment tear-down for each iteration of tests ends.\n  virtual void OnEnvironmentsTearDownEnd(const UnitTest& unit_test) = 0;\n\n  // Fired after each iteration of tests finishes.\n  virtual void OnTestIterationEnd(const UnitTest& unit_test,\n                                  int iteration) = 0;\n\n  // Fired after all test activities have ended.\n  virtual void OnTestProgramEnd(const UnitTest& unit_test) = 0;\n};\n\n// The convenience class for users who need to override just one or two\n// methods and are not concerned that a possible change to a signature of\n// the methods they override will not be caught during the build.  For\n// comments about each method please see the definition of TestEventListener\n// above.\nclass EmptyTestEventListener : public TestEventListener {\n public:\n  void OnTestProgramStart(const UnitTest& /*unit_test*/) override {}\n  void OnTestIterationStart(const UnitTest& /*unit_test*/,\n                            int /*iteration*/) override {}\n  void OnEnvironmentsSetUpStart(const UnitTest& /*unit_test*/) override {}\n  void OnEnvironmentsSetUpEnd(const UnitTest& /*unit_test*/) override {}\n  void OnTestSuiteStart(const TestSuite& /*test_suite*/) override {}\n//  Legacy API is deprecated but still available\n#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_\n  void OnTestCaseStart(const TestCase& /*test_case*/) override {}\n#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI_\n\n  void OnTestStart(const TestInfo& /*test_info*/) override {}\n  void OnTestPartResult(const TestPartResult& /*test_part_result*/) override {}\n  void OnTestEnd(const TestInfo& /*test_info*/) override {}\n  void OnTestSuiteEnd(const TestSuite& /*test_suite*/) override {}\n#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_\n  void OnTestCaseEnd(const TestCase& /*test_case*/) override {}\n#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI_\n\n  void OnEnvironmentsTearDownStart(const UnitTest& /*unit_test*/) override {}\n  void OnEnvironmentsTearDownEnd(const UnitTest& /*unit_test*/) override {}\n  void OnTestIterationEnd(const UnitTest& /*unit_test*/,\n                          int /*iteration*/) override {}\n  void OnTestProgramEnd(const UnitTest& /*unit_test*/) override {}\n};\n\n// TestEventListeners lets users add listeners to track events in Google Test.\nclass GTEST_API_ TestEventListeners {\n public:\n  TestEventListeners();\n  ~TestEventListeners();\n\n  // Appends an event listener to the end of the list. Google Test assumes\n  // the ownership of the listener (i.e. it will delete the listener when\n  // the test program finishes).\n  void Append(TestEventListener* listener);\n\n  // Removes the given event listener from the list and returns it.  It then\n  // becomes the caller's responsibility to delete the listener. Returns\n  // NULL if the listener is not found in the list.\n  TestEventListener* Release(TestEventListener* listener);\n\n  // Returns the standard listener responsible for the default console\n  // output.  Can be removed from the listeners list to shut down default\n  // console output.  Note that removing this object from the listener list\n  // with Release transfers its ownership to the caller and makes this\n  // function return NULL the next time.\n  TestEventListener* default_result_printer() const {\n    return default_result_printer_;\n  }\n\n  // Returns the standard listener responsible for the default XML output\n  // controlled by the --gtest_output=xml flag.  Can be removed from the\n  // listeners list by users who want to shut down the default XML output\n  // controlled by this flag and substitute it with custom one.  Note that\n  // removing this object from the listener list with Release transfers its\n  // ownership to the caller and makes this function return NULL the next\n  // time.\n  TestEventListener* default_xml_generator() const {\n    return default_xml_generator_;\n  }\n\n private:\n  friend class TestSuite;\n  friend class TestInfo;\n  friend class internal::DefaultGlobalTestPartResultReporter;\n  friend class internal::NoExecDeathTest;\n  friend class internal::TestEventListenersAccessor;\n  friend class internal::UnitTestImpl;\n\n  // Returns repeater that broadcasts the TestEventListener events to all\n  // subscribers.\n  TestEventListener* repeater();\n\n  // Sets the default_result_printer attribute to the provided listener.\n  // The listener is also added to the listener list and previous\n  // default_result_printer is removed from it and deleted. The listener can\n  // also be NULL in which case it will not be added to the list. Does\n  // nothing if the previous and the current listener objects are the same.\n  void SetDefaultResultPrinter(TestEventListener* listener);\n\n  // Sets the default_xml_generator attribute to the provided listener.  The\n  // listener is also added to the listener list and previous\n  // default_xml_generator is removed from it and deleted. The listener can\n  // also be NULL in which case it will not be added to the list. Does\n  // nothing if the previous and the current listener objects are the same.\n  void SetDefaultXmlGenerator(TestEventListener* listener);\n\n  // Controls whether events will be forwarded by the repeater to the\n  // listeners in the list.\n  bool EventForwardingEnabled() const;\n  void SuppressEventForwarding();\n\n  // The actual list of listeners.\n  internal::TestEventRepeater* repeater_;\n  // Listener responsible for the standard result output.\n  TestEventListener* default_result_printer_;\n  // Listener responsible for the creation of the XML output file.\n  TestEventListener* default_xml_generator_;\n\n  // We disallow copying TestEventListeners.\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(TestEventListeners);\n};\n\n// A UnitTest consists of a vector of TestSuites.\n//\n// This is a singleton class.  The only instance of UnitTest is\n// created when UnitTest::GetInstance() is first called.  This\n// instance is never deleted.\n//\n// UnitTest is not copyable.\n//\n// This class is thread-safe as long as the methods are called\n// according to their specification.\nclass GTEST_API_ UnitTest {\n public:\n  // Gets the singleton UnitTest object.  The first time this method\n  // is called, a UnitTest object is constructed and returned.\n  // Consecutive calls will return the same object.\n  static UnitTest* GetInstance();\n\n  // Runs all tests in this UnitTest object and prints the result.\n  // Returns 0 if successful, or 1 otherwise.\n  //\n  // This method can only be called from the main thread.\n  //\n  // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.\n  int Run() GTEST_MUST_USE_RESULT_;\n\n  // Returns the working directory when the first TEST() or TEST_F()\n  // was executed.  The UnitTest object owns the string.\n  const char* original_working_dir() const;\n\n  // Returns the TestSuite object for the test that's currently running,\n  // or NULL if no test is running.\n  const TestSuite* current_test_suite() const GTEST_LOCK_EXCLUDED_(mutex_);\n\n// Legacy API is still available but deprecated\n#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_\n  const TestCase* current_test_case() const GTEST_LOCK_EXCLUDED_(mutex_);\n#endif\n\n  // Returns the TestInfo object for the test that's currently running,\n  // or NULL if no test is running.\n  const TestInfo* current_test_info() const\n      GTEST_LOCK_EXCLUDED_(mutex_);\n\n  // Returns the random seed used at the start of the current test run.\n  int random_seed() const;\n\n  // Returns the ParameterizedTestSuiteRegistry object used to keep track of\n  // value-parameterized tests and instantiate and register them.\n  //\n  // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.\n  internal::ParameterizedTestSuiteRegistry& parameterized_test_registry()\n      GTEST_LOCK_EXCLUDED_(mutex_);\n\n  // Gets the number of successful test suites.\n  int successful_test_suite_count() const;\n\n  // Gets the number of failed test suites.\n  int failed_test_suite_count() const;\n\n  // Gets the number of all test suites.\n  int total_test_suite_count() const;\n\n  // Gets the number of all test suites that contain at least one test\n  // that should run.\n  int test_suite_to_run_count() const;\n\n  //  Legacy API is deprecated but still available\n#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_\n  int successful_test_case_count() const;\n  int failed_test_case_count() const;\n  int total_test_case_count() const;\n  int test_case_to_run_count() const;\n#endif  //  EMOVE_LEGACY_TEST_CASEAPI\n\n  // Gets the number of successful tests.\n  int successful_test_count() const;\n\n  // Gets the number of skipped tests.\n  int skipped_test_count() const;\n\n  // Gets the number of failed tests.\n  int failed_test_count() const;\n\n  // Gets the number of disabled tests that will be reported in the XML report.\n  int reportable_disabled_test_count() const;\n\n  // Gets the number of disabled tests.\n  int disabled_test_count() const;\n\n  // Gets the number of tests to be printed in the XML report.\n  int reportable_test_count() const;\n\n  // Gets the number of all tests.\n  int total_test_count() const;\n\n  // Gets the number of tests that should run.\n  int test_to_run_count() const;\n\n  // Gets the time of the test program start, in ms from the start of the\n  // UNIX epoch.\n  TimeInMillis start_timestamp() const;\n\n  // Gets the elapsed time, in milliseconds.\n  TimeInMillis elapsed_time() const;\n\n  // Returns true iff the unit test passed (i.e. all test suites passed).\n  bool Passed() const;\n\n  // Returns true iff the unit test failed (i.e. some test suite failed\n  // or something outside of all tests failed).\n  bool Failed() const;\n\n  // Gets the i-th test suite among all the test suites. i can range from 0 to\n  // total_test_suite_count() - 1. If i is not in that range, returns NULL.\n  const TestSuite* GetTestSuite(int i) const;\n\n//  Legacy API is deprecated but still available\n#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_\n  const TestCase* GetTestCase(int i) const;\n#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI_\n\n  // Returns the TestResult containing information on test failures and\n  // properties logged outside of individual test suites.\n  const TestResult& ad_hoc_test_result() const;\n\n  // Returns the list of event listeners that can be used to track events\n  // inside Google Test.\n  TestEventListeners& listeners();\n\n private:\n  // Registers and returns a global test environment.  When a test\n  // program is run, all global test environments will be set-up in\n  // the order they were registered.  After all tests in the program\n  // have finished, all global test environments will be torn-down in\n  // the *reverse* order they were registered.\n  //\n  // The UnitTest object takes ownership of the given environment.\n  //\n  // This method can only be called from the main thread.\n  Environment* AddEnvironment(Environment* env);\n\n  // Adds a TestPartResult to the current TestResult object.  All\n  // Google Test assertion macros (e.g. ASSERT_TRUE, EXPECT_EQ, etc)\n  // eventually call this to report their results.  The user code\n  // should use the assertion macros instead of calling this directly.\n  void AddTestPartResult(TestPartResult::Type result_type,\n                         const char* file_name,\n                         int line_number,\n                         const std::string& message,\n                         const std::string& os_stack_trace)\n      GTEST_LOCK_EXCLUDED_(mutex_);\n\n  // Adds a TestProperty to the current TestResult object when invoked from\n  // inside a test, to current TestSuite's ad_hoc_test_result_ when invoked\n  // from SetUpTestSuite or TearDownTestSuite, or to the global property set\n  // when invoked elsewhere.  If the result already contains a property with\n  // the same key, the value will be updated.\n  void RecordProperty(const std::string& key, const std::string& value);\n\n  // Gets the i-th test suite among all the test suites. i can range from 0 to\n  // total_test_suite_count() - 1. If i is not in that range, returns NULL.\n  TestSuite* GetMutableTestSuite(int i);\n\n  // Accessors for the implementation object.\n  internal::UnitTestImpl* impl() { return impl_; }\n  const internal::UnitTestImpl* impl() const { return impl_; }\n\n  // These classes and functions are friends as they need to access private\n  // members of UnitTest.\n  friend class ScopedTrace;\n  friend class Test;\n  friend class internal::AssertHelper;\n  friend class internal::StreamingListenerTest;\n  friend class internal::UnitTestRecordPropertyTestHelper;\n  friend Environment* AddGlobalTestEnvironment(Environment* env);\n  friend internal::UnitTestImpl* internal::GetUnitTestImpl();\n  friend void internal::ReportFailureInUnknownLocation(\n      TestPartResult::Type result_type,\n      const std::string& message);\n\n  // Creates an empty UnitTest.\n  UnitTest();\n\n  // D'tor\n  virtual ~UnitTest();\n\n  // Pushes a trace defined by SCOPED_TRACE() on to the per-thread\n  // Google Test trace stack.\n  void PushGTestTrace(const internal::TraceInfo& trace)\n      GTEST_LOCK_EXCLUDED_(mutex_);\n\n  // Pops a trace from the per-thread Google Test trace stack.\n  void PopGTestTrace()\n      GTEST_LOCK_EXCLUDED_(mutex_);\n\n  // Protects mutable state in *impl_.  This is mutable as some const\n  // methods need to lock it too.\n  mutable internal::Mutex mutex_;\n\n  // Opaque implementation object.  This field is never changed once\n  // the object is constructed.  We don't mark it as const here, as\n  // doing so will cause a warning in the constructor of UnitTest.\n  // Mutable state in *impl_ is protected by mutex_.\n  internal::UnitTestImpl* impl_;\n\n  // We disallow copying UnitTest.\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(UnitTest);\n};\n\n// A convenient wrapper for adding an environment for the test\n// program.\n//\n// You should call this before RUN_ALL_TESTS() is called, probably in\n// main().  If you use gtest_main, you need to call this before main()\n// starts for it to take effect.  For example, you can define a global\n// variable like this:\n//\n//   testing::Environment* const foo_env =\n//       testing::AddGlobalTestEnvironment(new FooEnvironment);\n//\n// However, we strongly recommend you to write your own main() and\n// call AddGlobalTestEnvironment() there, as relying on initialization\n// of global variables makes the code harder to read and may cause\n// problems when you register multiple environments from different\n// translation units and the environments have dependencies among them\n// (remember that the compiler doesn't guarantee the order in which\n// global variables from different translation units are initialized).\ninline Environment* AddGlobalTestEnvironment(Environment* env) {\n  return UnitTest::GetInstance()->AddEnvironment(env);\n}\n\n// Initializes Google Test.  This must be called before calling\n// RUN_ALL_TESTS().  In particular, it parses a command line for the\n// flags that Google Test recognizes.  Whenever a Google Test flag is\n// seen, it is removed from argv, and *argc is decremented.\n//\n// No value is returned.  Instead, the Google Test flag variables are\n// updated.\n//\n// Calling the function for the second time has no user-visible effect.\nGTEST_API_ void InitGoogleTest(int* argc, char** argv);\n\n// This overloaded version can be used in Windows programs compiled in\n// UNICODE mode.\nGTEST_API_ void InitGoogleTest(int* argc, wchar_t** argv);\n\n// This overloaded version can be used on Arduino/embedded platforms where\n// there is no argc/argv.\nGTEST_API_ void InitGoogleTest();\n\nnamespace internal {\n\n// Separate the error generating code from the code path to reduce the stack\n// frame size of CmpHelperEQ. This helps reduce the overhead of some sanitizers\n// when calling EXPECT_* in a tight loop.\ntemplate <typename T1, typename T2>\nAssertionResult CmpHelperEQFailure(const char* lhs_expression,\n                                   const char* rhs_expression,\n                                   const T1& lhs, const T2& rhs) {\n  return EqFailure(lhs_expression,\n                   rhs_expression,\n                   FormatForComparisonFailureMessage(lhs, rhs),\n                   FormatForComparisonFailureMessage(rhs, lhs),\n                   false);\n}\n\n// This block of code defines operator==/!=\n// to block lexical scope lookup.\n// It prevents using invalid operator==/!= defined at namespace scope.\nstruct faketype {};\ninline bool operator==(faketype, faketype) { return true; }\ninline bool operator!=(faketype, faketype) { return false; }\n\n// The helper function for {ASSERT|EXPECT}_EQ.\ntemplate <typename T1, typename T2>\nAssertionResult CmpHelperEQ(const char* lhs_expression,\n                            const char* rhs_expression,\n                            const T1& lhs,\n                            const T2& rhs) {\n  if (lhs == rhs) {\n    return AssertionSuccess();\n  }\n\n  return CmpHelperEQFailure(lhs_expression, rhs_expression, lhs, rhs);\n}\n\n// With this overloaded version, we allow anonymous enums to be used\n// in {ASSERT|EXPECT}_EQ when compiled with gcc 4, as anonymous enums\n// can be implicitly cast to BiggestInt.\nGTEST_API_ AssertionResult CmpHelperEQ(const char* lhs_expression,\n                                       const char* rhs_expression,\n                                       BiggestInt lhs,\n                                       BiggestInt rhs);\n\n// The helper class for {ASSERT|EXPECT}_EQ.  The template argument\n// lhs_is_null_literal is true iff the first argument to ASSERT_EQ()\n// is a null pointer literal.  The following default implementation is\n// for lhs_is_null_literal being false.\ntemplate <bool lhs_is_null_literal>\nclass EqHelper {\n public:\n  // This templatized version is for the general case.\n  template <typename T1, typename T2>\n  static AssertionResult Compare(const char* lhs_expression,\n                                 const char* rhs_expression,\n                                 const T1& lhs,\n                                 const T2& rhs) {\n    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);\n  }\n\n  // With this overloaded version, we allow anonymous enums to be used\n  // in {ASSERT|EXPECT}_EQ when compiled with gcc 4, as anonymous\n  // enums can be implicitly cast to BiggestInt.\n  //\n  // Even though its body looks the same as the above version, we\n  // cannot merge the two, as it will make anonymous enums unhappy.\n  static AssertionResult Compare(const char* lhs_expression,\n                                 const char* rhs_expression,\n                                 BiggestInt lhs,\n                                 BiggestInt rhs) {\n    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);\n  }\n};\n\n// This specialization is used when the first argument to ASSERT_EQ()\n// is a null pointer literal, like NULL, false, or 0.\ntemplate <>\nclass EqHelper<true> {\n public:\n  // We define two overloaded versions of Compare().  The first\n  // version will be picked when the second argument to ASSERT_EQ() is\n  // NOT a pointer, e.g. ASSERT_EQ(0, AnIntFunction()) or\n  // EXPECT_EQ(false, a_bool).\n  template <typename T1, typename T2>\n  static AssertionResult Compare(\n      const char* lhs_expression, const char* rhs_expression, const T1& lhs,\n      const T2& rhs,\n      // The following line prevents this overload from being considered if T2\n      // is not a pointer type.  We need this because ASSERT_EQ(NULL, my_ptr)\n      // expands to Compare(\"\", \"\", NULL, my_ptr), which requires a conversion\n      // to match the Secret* in the other overload, which would otherwise make\n      // this template match better.\n      typename EnableIf<!std::is_pointer<T2>::value>::type* = nullptr) {\n    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);\n  }\n\n  // This version will be picked when the second argument to ASSERT_EQ() is a\n  // pointer, e.g. ASSERT_EQ(NULL, a_pointer).\n  template <typename T>\n  static AssertionResult Compare(\n      const char* lhs_expression,\n      const char* rhs_expression,\n      // We used to have a second template parameter instead of Secret*.  That\n      // template parameter would deduce to 'long', making this a better match\n      // than the first overload even without the first overload's EnableIf.\n      // Unfortunately, gcc with -Wconversion-null warns when \"passing NULL to\n      // non-pointer argument\" (even a deduced integral argument), so the old\n      // implementation caused warnings in user code.\n      Secret* /* lhs (NULL) */,\n      T* rhs) {\n    // We already know that 'lhs' is a null pointer.\n    return CmpHelperEQ(lhs_expression, rhs_expression, static_cast<T*>(nullptr),\n                       rhs);\n  }\n};\n\n// Separate the error generating code from the code path to reduce the stack\n// frame size of CmpHelperOP. This helps reduce the overhead of some sanitizers\n// when calling EXPECT_OP in a tight loop.\ntemplate <typename T1, typename T2>\nAssertionResult CmpHelperOpFailure(const char* expr1, const char* expr2,\n                                   const T1& val1, const T2& val2,\n                                   const char* op) {\n  return AssertionFailure()\n         << \"Expected: (\" << expr1 << \") \" << op << \" (\" << expr2\n         << \"), actual: \" << FormatForComparisonFailureMessage(val1, val2)\n         << \" vs \" << FormatForComparisonFailureMessage(val2, val1);\n}\n\n// A macro for implementing the helper functions needed to implement\n// ASSERT_?? and EXPECT_??.  It is here just to avoid copy-and-paste\n// of similar code.\n//\n// For each templatized helper function, we also define an overloaded\n// version for BiggestInt in order to reduce code bloat and allow\n// anonymous enums to be used with {ASSERT|EXPECT}_?? when compiled\n// with gcc 4.\n//\n// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.\n\n#define GTEST_IMPL_CMP_HELPER_(op_name, op)\\\ntemplate <typename T1, typename T2>\\\nAssertionResult CmpHelper##op_name(const char* expr1, const char* expr2, \\\n                                   const T1& val1, const T2& val2) {\\\n  if (val1 op val2) {\\\n    return AssertionSuccess();\\\n  } else {\\\n    return CmpHelperOpFailure(expr1, expr2, val1, val2, #op);\\\n  }\\\n}\\\nGTEST_API_ AssertionResult CmpHelper##op_name(\\\n    const char* expr1, const char* expr2, BiggestInt val1, BiggestInt val2)\n\n// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.\n\n// Implements the helper function for {ASSERT|EXPECT}_NE\nGTEST_IMPL_CMP_HELPER_(NE, !=);\n// Implements the helper function for {ASSERT|EXPECT}_LE\nGTEST_IMPL_CMP_HELPER_(LE, <=);\n// Implements the helper function for {ASSERT|EXPECT}_LT\nGTEST_IMPL_CMP_HELPER_(LT, <);\n// Implements the helper function for {ASSERT|EXPECT}_GE\nGTEST_IMPL_CMP_HELPER_(GE, >=);\n// Implements the helper function for {ASSERT|EXPECT}_GT\nGTEST_IMPL_CMP_HELPER_(GT, >);\n\n#undef GTEST_IMPL_CMP_HELPER_\n\n// The helper function for {ASSERT|EXPECT}_STREQ.\n//\n// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.\nGTEST_API_ AssertionResult CmpHelperSTREQ(const char* s1_expression,\n                                          const char* s2_expression,\n                                          const char* s1,\n                                          const char* s2);\n\n// The helper function for {ASSERT|EXPECT}_STRCASEEQ.\n//\n// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.\nGTEST_API_ AssertionResult CmpHelperSTRCASEEQ(const char* s1_expression,\n                                              const char* s2_expression,\n                                              const char* s1,\n                                              const char* s2);\n\n// The helper function for {ASSERT|EXPECT}_STRNE.\n//\n// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.\nGTEST_API_ AssertionResult CmpHelperSTRNE(const char* s1_expression,\n                                          const char* s2_expression,\n                                          const char* s1,\n                                          const char* s2);\n\n// The helper function for {ASSERT|EXPECT}_STRCASENE.\n//\n// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.\nGTEST_API_ AssertionResult CmpHelperSTRCASENE(const char* s1_expression,\n                                              const char* s2_expression,\n                                              const char* s1,\n                                              const char* s2);\n\n\n// Helper function for *_STREQ on wide strings.\n//\n// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.\nGTEST_API_ AssertionResult CmpHelperSTREQ(const char* s1_expression,\n                                          const char* s2_expression,\n                                          const wchar_t* s1,\n                                          const wchar_t* s2);\n\n// Helper function for *_STRNE on wide strings.\n//\n// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.\nGTEST_API_ AssertionResult CmpHelperSTRNE(const char* s1_expression,\n                                          const char* s2_expression,\n                                          const wchar_t* s1,\n                                          const wchar_t* s2);\n\n}  // namespace internal\n\n// IsSubstring() and IsNotSubstring() are intended to be used as the\n// first argument to {EXPECT,ASSERT}_PRED_FORMAT2(), not by\n// themselves.  They check whether needle is a substring of haystack\n// (NULL is considered a substring of itself only), and return an\n// appropriate error message when they fail.\n//\n// The {needle,haystack}_expr arguments are the stringified\n// expressions that generated the two real arguments.\nGTEST_API_ AssertionResult IsSubstring(\n    const char* needle_expr, const char* haystack_expr,\n    const char* needle, const char* haystack);\nGTEST_API_ AssertionResult IsSubstring(\n    const char* needle_expr, const char* haystack_expr,\n    const wchar_t* needle, const wchar_t* haystack);\nGTEST_API_ AssertionResult IsNotSubstring(\n    const char* needle_expr, const char* haystack_expr,\n    const char* needle, const char* haystack);\nGTEST_API_ AssertionResult IsNotSubstring(\n    const char* needle_expr, const char* haystack_expr,\n    const wchar_t* needle, const wchar_t* haystack);\nGTEST_API_ AssertionResult IsSubstring(\n    const char* needle_expr, const char* haystack_expr,\n    const ::std::string& needle, const ::std::string& haystack);\nGTEST_API_ AssertionResult IsNotSubstring(\n    const char* needle_expr, const char* haystack_expr,\n    const ::std::string& needle, const ::std::string& haystack);\n\n#if GTEST_HAS_STD_WSTRING\nGTEST_API_ AssertionResult IsSubstring(\n    const char* needle_expr, const char* haystack_expr,\n    const ::std::wstring& needle, const ::std::wstring& haystack);\nGTEST_API_ AssertionResult IsNotSubstring(\n    const char* needle_expr, const char* haystack_expr,\n    const ::std::wstring& needle, const ::std::wstring& haystack);\n#endif  // GTEST_HAS_STD_WSTRING\n\nnamespace internal {\n\n// Helper template function for comparing floating-points.\n//\n// Template parameter:\n//\n//   RawType: the raw floating-point type (either float or double)\n//\n// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.\ntemplate <typename RawType>\nAssertionResult CmpHelperFloatingPointEQ(const char* lhs_expression,\n                                         const char* rhs_expression,\n                                         RawType lhs_value,\n                                         RawType rhs_value) {\n  const FloatingPoint<RawType> lhs(lhs_value), rhs(rhs_value);\n\n  if (lhs.AlmostEquals(rhs)) {\n    return AssertionSuccess();\n  }\n\n  ::std::stringstream lhs_ss;\n  lhs_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2)\n         << lhs_value;\n\n  ::std::stringstream rhs_ss;\n  rhs_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2)\n         << rhs_value;\n\n  return EqFailure(lhs_expression,\n                   rhs_expression,\n                   StringStreamToString(&lhs_ss),\n                   StringStreamToString(&rhs_ss),\n                   false);\n}\n\n// Helper function for implementing ASSERT_NEAR.\n//\n// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.\nGTEST_API_ AssertionResult DoubleNearPredFormat(const char* expr1,\n                                                const char* expr2,\n                                                const char* abs_error_expr,\n                                                double val1,\n                                                double val2,\n                                                double abs_error);\n\n// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.\n// A class that enables one to stream messages to assertion macros\nclass GTEST_API_ AssertHelper {\n public:\n  // Constructor.\n  AssertHelper(TestPartResult::Type type,\n               const char* file,\n               int line,\n               const char* message);\n  ~AssertHelper();\n\n  // Message assignment is a semantic trick to enable assertion\n  // streaming; see the GTEST_MESSAGE_ macro below.\n  void operator=(const Message& message) const;\n\n private:\n  // We put our data in a struct so that the size of the AssertHelper class can\n  // be as small as possible.  This is important because gcc is incapable of\n  // re-using stack space even for temporary variables, so every EXPECT_EQ\n  // reserves stack space for another AssertHelper.\n  struct AssertHelperData {\n    AssertHelperData(TestPartResult::Type t,\n                     const char* srcfile,\n                     int line_num,\n                     const char* msg)\n        : type(t), file(srcfile), line(line_num), message(msg) { }\n\n    TestPartResult::Type const type;\n    const char* const file;\n    int const line;\n    std::string const message;\n\n   private:\n    GTEST_DISALLOW_COPY_AND_ASSIGN_(AssertHelperData);\n  };\n\n  AssertHelperData* const data_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(AssertHelper);\n};\n\nenum GTestColor { COLOR_DEFAULT, COLOR_RED, COLOR_GREEN, COLOR_YELLOW };\n\nGTEST_API_ GTEST_ATTRIBUTE_PRINTF_(2, 3) void ColoredPrintf(GTestColor color,\n                                                            const char* fmt,\n                                                            ...);\n\n}  // namespace internal\n\n// The pure interface class that all value-parameterized tests inherit from.\n// A value-parameterized class must inherit from both ::testing::Test and\n// ::testing::WithParamInterface. In most cases that just means inheriting\n// from ::testing::TestWithParam, but more complicated test hierarchies\n// may need to inherit from Test and WithParamInterface at different levels.\n//\n// This interface has support for accessing the test parameter value via\n// the GetParam() method.\n//\n// Use it with one of the parameter generator defining functions, like Range(),\n// Values(), ValuesIn(), Bool(), and Combine().\n//\n// class FooTest : public ::testing::TestWithParam<int> {\n//  protected:\n//   FooTest() {\n//     // Can use GetParam() here.\n//   }\n//   ~FooTest() override {\n//     // Can use GetParam() here.\n//   }\n//   void SetUp() override {\n//     // Can use GetParam() here.\n//   }\n//   void TearDown override {\n//     // Can use GetParam() here.\n//   }\n// };\n// TEST_P(FooTest, DoesBar) {\n//   // Can use GetParam() method here.\n//   Foo foo;\n//   ASSERT_TRUE(foo.DoesBar(GetParam()));\n// }\n// INSTANTIATE_TEST_SUITE_P(OneToTenRange, FooTest, ::testing::Range(1, 10));\n\ntemplate <typename T>\nclass WithParamInterface {\n public:\n  typedef T ParamType;\n  virtual ~WithParamInterface() {}\n\n  // The current parameter value. Is also available in the test fixture's\n  // constructor.\n  static const ParamType& GetParam() {\n    GTEST_CHECK_(parameter_ != nullptr)\n        << \"GetParam() can only be called inside a value-parameterized test \"\n        << \"-- did you intend to write TEST_P instead of TEST_F?\";\n    return *parameter_;\n  }\n\n private:\n  // Sets parameter value. The caller is responsible for making sure the value\n  // remains alive and unchanged throughout the current test.\n  static void SetParam(const ParamType* parameter) {\n    parameter_ = parameter;\n  }\n\n  // Static value used for accessing parameter during a test lifetime.\n  static const ParamType* parameter_;\n\n  // TestClass must be a subclass of WithParamInterface<T> and Test.\n  template <class TestClass> friend class internal::ParameterizedTestFactory;\n};\n\ntemplate <typename T>\nconst T* WithParamInterface<T>::parameter_ = nullptr;\n\n// Most value-parameterized classes can ignore the existence of\n// WithParamInterface, and can just inherit from ::testing::TestWithParam.\n\ntemplate <typename T>\nclass TestWithParam : public Test, public WithParamInterface<T> {\n};\n\n// Macros for indicating success/failure in test code.\n\n// Skips test in runtime.\n// Skipping test aborts current function.\n// Skipped tests are neither successful nor failed.\n#define GTEST_SKIP() GTEST_SKIP_(\"Skipped\")\n\n// ADD_FAILURE unconditionally adds a failure to the current test.\n// SUCCEED generates a success - it doesn't automatically make the\n// current test successful, as a test is only successful when it has\n// no failure.\n//\n// EXPECT_* verifies that a certain condition is satisfied.  If not,\n// it behaves like ADD_FAILURE.  In particular:\n//\n//   EXPECT_TRUE  verifies that a Boolean condition is true.\n//   EXPECT_FALSE verifies that a Boolean condition is false.\n//\n// FAIL and ASSERT_* are similar to ADD_FAILURE and EXPECT_*, except\n// that they will also abort the current function on failure.  People\n// usually want the fail-fast behavior of FAIL and ASSERT_*, but those\n// writing data-driven tests often find themselves using ADD_FAILURE\n// and EXPECT_* more.\n\n// Generates a nonfatal failure with a generic message.\n#define ADD_FAILURE() GTEST_NONFATAL_FAILURE_(\"Failed\")\n\n// Generates a nonfatal failure at the given source file location with\n// a generic message.\n#define ADD_FAILURE_AT(file, line) \\\n  GTEST_MESSAGE_AT_(file, line, \"Failed\", \\\n                    ::testing::TestPartResult::kNonFatalFailure)\n\n// Generates a fatal failure with a generic message.\n#define GTEST_FAIL() GTEST_FATAL_FAILURE_(\"Failed\")\n\n// Define this macro to 1 to omit the definition of FAIL(), which is a\n// generic name and clashes with some other libraries.\n#if !GTEST_DONT_DEFINE_FAIL\n# define FAIL() GTEST_FAIL()\n#endif\n\n// Generates a success with a generic message.\n#define GTEST_SUCCEED() GTEST_SUCCESS_(\"Succeeded\")\n\n// Define this macro to 1 to omit the definition of SUCCEED(), which\n// is a generic name and clashes with some other libraries.\n#if !GTEST_DONT_DEFINE_SUCCEED\n# define SUCCEED() GTEST_SUCCEED()\n#endif\n\n// Macros for testing exceptions.\n//\n//    * {ASSERT|EXPECT}_THROW(statement, expected_exception):\n//         Tests that the statement throws the expected exception.\n//    * {ASSERT|EXPECT}_NO_THROW(statement):\n//         Tests that the statement doesn't throw any exception.\n//    * {ASSERT|EXPECT}_ANY_THROW(statement):\n//         Tests that the statement throws an exception.\n\n#define EXPECT_THROW(statement, expected_exception) \\\n  GTEST_TEST_THROW_(statement, expected_exception, GTEST_NONFATAL_FAILURE_)\n#define EXPECT_NO_THROW(statement) \\\n  GTEST_TEST_NO_THROW_(statement, GTEST_NONFATAL_FAILURE_)\n#define EXPECT_ANY_THROW(statement) \\\n  GTEST_TEST_ANY_THROW_(statement, GTEST_NONFATAL_FAILURE_)\n#define ASSERT_THROW(statement, expected_exception) \\\n  GTEST_TEST_THROW_(statement, expected_exception, GTEST_FATAL_FAILURE_)\n#define ASSERT_NO_THROW(statement) \\\n  GTEST_TEST_NO_THROW_(statement, GTEST_FATAL_FAILURE_)\n#define ASSERT_ANY_THROW(statement) \\\n  GTEST_TEST_ANY_THROW_(statement, GTEST_FATAL_FAILURE_)\n\n// Boolean assertions. Condition can be either a Boolean expression or an\n// AssertionResult. For more information on how to use AssertionResult with\n// these macros see comments on that class.\n#define EXPECT_TRUE(condition) \\\n  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \\\n                      GTEST_NONFATAL_FAILURE_)\n#define EXPECT_FALSE(condition) \\\n  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \\\n                      GTEST_NONFATAL_FAILURE_)\n#define ASSERT_TRUE(condition) \\\n  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \\\n                      GTEST_FATAL_FAILURE_)\n#define ASSERT_FALSE(condition) \\\n  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \\\n                      GTEST_FATAL_FAILURE_)\n\n// Macros for testing equalities and inequalities.\n//\n//    * {ASSERT|EXPECT}_EQ(v1, v2): Tests that v1 == v2\n//    * {ASSERT|EXPECT}_NE(v1, v2): Tests that v1 != v2\n//    * {ASSERT|EXPECT}_LT(v1, v2): Tests that v1 < v2\n//    * {ASSERT|EXPECT}_LE(v1, v2): Tests that v1 <= v2\n//    * {ASSERT|EXPECT}_GT(v1, v2): Tests that v1 > v2\n//    * {ASSERT|EXPECT}_GE(v1, v2): Tests that v1 >= v2\n//\n// When they are not, Google Test prints both the tested expressions and\n// their actual values.  The values must be compatible built-in types,\n// or you will get a compiler error.  By \"compatible\" we mean that the\n// values can be compared by the respective operator.\n//\n// Note:\n//\n//   1. It is possible to make a user-defined type work with\n//   {ASSERT|EXPECT}_??(), but that requires overloading the\n//   comparison operators and is thus discouraged by the Google C++\n//   Usage Guide.  Therefore, you are advised to use the\n//   {ASSERT|EXPECT}_TRUE() macro to assert that two objects are\n//   equal.\n//\n//   2. The {ASSERT|EXPECT}_??() macros do pointer comparisons on\n//   pointers (in particular, C strings).  Therefore, if you use it\n//   with two C strings, you are testing how their locations in memory\n//   are related, not how their content is related.  To compare two C\n//   strings by content, use {ASSERT|EXPECT}_STR*().\n//\n//   3. {ASSERT|EXPECT}_EQ(v1, v2) is preferred to\n//   {ASSERT|EXPECT}_TRUE(v1 == v2), as the former tells you\n//   what the actual value is when it fails, and similarly for the\n//   other comparisons.\n//\n//   4. Do not depend on the order in which {ASSERT|EXPECT}_??()\n//   evaluate their arguments, which is undefined.\n//\n//   5. These macros evaluate their arguments exactly once.\n//\n// Examples:\n//\n//   EXPECT_NE(Foo(), 5);\n//   EXPECT_EQ(a_pointer, NULL);\n//   ASSERT_LT(i, array_size);\n//   ASSERT_GT(records.size(), 0) << \"There is no record left.\";\n\n#define EXPECT_EQ(val1, val2) \\\n  EXPECT_PRED_FORMAT2(::testing::internal:: \\\n                      EqHelper<GTEST_IS_NULL_LITERAL_(val1)>::Compare, \\\n                      val1, val2)\n#define EXPECT_NE(val1, val2) \\\n  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperNE, val1, val2)\n#define EXPECT_LE(val1, val2) \\\n  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperLE, val1, val2)\n#define EXPECT_LT(val1, val2) \\\n  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperLT, val1, val2)\n#define EXPECT_GE(val1, val2) \\\n  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperGE, val1, val2)\n#define EXPECT_GT(val1, val2) \\\n  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperGT, val1, val2)\n\n#define GTEST_ASSERT_EQ(val1, val2) \\\n  ASSERT_PRED_FORMAT2(::testing::internal:: \\\n                      EqHelper<GTEST_IS_NULL_LITERAL_(val1)>::Compare, \\\n                      val1, val2)\n#define GTEST_ASSERT_NE(val1, val2) \\\n  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperNE, val1, val2)\n#define GTEST_ASSERT_LE(val1, val2) \\\n  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperLE, val1, val2)\n#define GTEST_ASSERT_LT(val1, val2) \\\n  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperLT, val1, val2)\n#define GTEST_ASSERT_GE(val1, val2) \\\n  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperGE, val1, val2)\n#define GTEST_ASSERT_GT(val1, val2) \\\n  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperGT, val1, val2)\n\n// Define macro GTEST_DONT_DEFINE_ASSERT_XY to 1 to omit the definition of\n// ASSERT_XY(), which clashes with some users' own code.\n\n#if !GTEST_DONT_DEFINE_ASSERT_EQ\n# define ASSERT_EQ(val1, val2) GTEST_ASSERT_EQ(val1, val2)\n#endif\n\n#if !GTEST_DONT_DEFINE_ASSERT_NE\n# define ASSERT_NE(val1, val2) GTEST_ASSERT_NE(val1, val2)\n#endif\n\n#if !GTEST_DONT_DEFINE_ASSERT_LE\n# define ASSERT_LE(val1, val2) GTEST_ASSERT_LE(val1, val2)\n#endif\n\n#if !GTEST_DONT_DEFINE_ASSERT_LT\n# define ASSERT_LT(val1, val2) GTEST_ASSERT_LT(val1, val2)\n#endif\n\n#if !GTEST_DONT_DEFINE_ASSERT_GE\n# define ASSERT_GE(val1, val2) GTEST_ASSERT_GE(val1, val2)\n#endif\n\n#if !GTEST_DONT_DEFINE_ASSERT_GT\n# define ASSERT_GT(val1, val2) GTEST_ASSERT_GT(val1, val2)\n#endif\n\n// C-string Comparisons.  All tests treat NULL and any non-NULL string\n// as different.  Two NULLs are equal.\n//\n//    * {ASSERT|EXPECT}_STREQ(s1, s2):     Tests that s1 == s2\n//    * {ASSERT|EXPECT}_STRNE(s1, s2):     Tests that s1 != s2\n//    * {ASSERT|EXPECT}_STRCASEEQ(s1, s2): Tests that s1 == s2, ignoring case\n//    * {ASSERT|EXPECT}_STRCASENE(s1, s2): Tests that s1 != s2, ignoring case\n//\n// For wide or narrow string objects, you can use the\n// {ASSERT|EXPECT}_??() macros.\n//\n// Don't depend on the order in which the arguments are evaluated,\n// which is undefined.\n//\n// These macros evaluate their arguments exactly once.\n\n#define EXPECT_STREQ(s1, s2) \\\n  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTREQ, s1, s2)\n#define EXPECT_STRNE(s1, s2) \\\n  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRNE, s1, s2)\n#define EXPECT_STRCASEEQ(s1, s2) \\\n  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASEEQ, s1, s2)\n#define EXPECT_STRCASENE(s1, s2)\\\n  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASENE, s1, s2)\n\n#define ASSERT_STREQ(s1, s2) \\\n  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTREQ, s1, s2)\n#define ASSERT_STRNE(s1, s2) \\\n  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRNE, s1, s2)\n#define ASSERT_STRCASEEQ(s1, s2) \\\n  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASEEQ, s1, s2)\n#define ASSERT_STRCASENE(s1, s2)\\\n  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASENE, s1, s2)\n\n// Macros for comparing floating-point numbers.\n//\n//    * {ASSERT|EXPECT}_FLOAT_EQ(val1, val2):\n//         Tests that two float values are almost equal.\n//    * {ASSERT|EXPECT}_DOUBLE_EQ(val1, val2):\n//         Tests that two double values are almost equal.\n//    * {ASSERT|EXPECT}_NEAR(v1, v2, abs_error):\n//         Tests that v1 and v2 are within the given distance to each other.\n//\n// Google Test uses ULP-based comparison to automatically pick a default\n// error bound that is appropriate for the operands.  See the\n// FloatingPoint template class in gtest-internal.h if you are\n// interested in the implementation details.\n\n#define EXPECT_FLOAT_EQ(val1, val2)\\\n  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<float>, \\\n                      val1, val2)\n\n#define EXPECT_DOUBLE_EQ(val1, val2)\\\n  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<double>, \\\n                      val1, val2)\n\n#define ASSERT_FLOAT_EQ(val1, val2)\\\n  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<float>, \\\n                      val1, val2)\n\n#define ASSERT_DOUBLE_EQ(val1, val2)\\\n  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<double>, \\\n                      val1, val2)\n\n#define EXPECT_NEAR(val1, val2, abs_error)\\\n  EXPECT_PRED_FORMAT3(::testing::internal::DoubleNearPredFormat, \\\n                      val1, val2, abs_error)\n\n#define ASSERT_NEAR(val1, val2, abs_error)\\\n  ASSERT_PRED_FORMAT3(::testing::internal::DoubleNearPredFormat, \\\n                      val1, val2, abs_error)\n\n// These predicate format functions work on floating-point values, and\n// can be used in {ASSERT|EXPECT}_PRED_FORMAT2*(), e.g.\n//\n//   EXPECT_PRED_FORMAT2(testing::DoubleLE, Foo(), 5.0);\n\n// Asserts that val1 is less than, or almost equal to, val2.  Fails\n// otherwise.  In particular, it fails if either val1 or val2 is NaN.\nGTEST_API_ AssertionResult FloatLE(const char* expr1, const char* expr2,\n                                   float val1, float val2);\nGTEST_API_ AssertionResult DoubleLE(const char* expr1, const char* expr2,\n                                    double val1, double val2);\n\n\n#if GTEST_OS_WINDOWS\n\n// Macros that test for HRESULT failure and success, these are only useful\n// on Windows, and rely on Windows SDK macros and APIs to compile.\n//\n//    * {ASSERT|EXPECT}_HRESULT_{SUCCEEDED|FAILED}(expr)\n//\n// When expr unexpectedly fails or succeeds, Google Test prints the\n// expected result and the actual result with both a human-readable\n// string representation of the error, if available, as well as the\n// hex result code.\n# define EXPECT_HRESULT_SUCCEEDED(expr) \\\n    EXPECT_PRED_FORMAT1(::testing::internal::IsHRESULTSuccess, (expr))\n\n# define ASSERT_HRESULT_SUCCEEDED(expr) \\\n    ASSERT_PRED_FORMAT1(::testing::internal::IsHRESULTSuccess, (expr))\n\n# define EXPECT_HRESULT_FAILED(expr) \\\n    EXPECT_PRED_FORMAT1(::testing::internal::IsHRESULTFailure, (expr))\n\n# define ASSERT_HRESULT_FAILED(expr) \\\n    ASSERT_PRED_FORMAT1(::testing::internal::IsHRESULTFailure, (expr))\n\n#endif  // GTEST_OS_WINDOWS\n\n// Macros that execute statement and check that it doesn't generate new fatal\n// failures in the current thread.\n//\n//   * {ASSERT|EXPECT}_NO_FATAL_FAILURE(statement);\n//\n// Examples:\n//\n//   EXPECT_NO_FATAL_FAILURE(Process());\n//   ASSERT_NO_FATAL_FAILURE(Process()) << \"Process() failed\";\n//\n#define ASSERT_NO_FATAL_FAILURE(statement) \\\n    GTEST_TEST_NO_FATAL_FAILURE_(statement, GTEST_FATAL_FAILURE_)\n#define EXPECT_NO_FATAL_FAILURE(statement) \\\n    GTEST_TEST_NO_FATAL_FAILURE_(statement, GTEST_NONFATAL_FAILURE_)\n\n// Causes a trace (including the given source file path and line number,\n// and the given message) to be included in every test failure message generated\n// by code in the scope of the lifetime of an instance of this class. The effect\n// is undone with the destruction of the instance.\n//\n// The message argument can be anything streamable to std::ostream.\n//\n// Example:\n//   testing::ScopedTrace trace(\"file.cc\", 123, \"message\");\n//\nclass GTEST_API_ ScopedTrace {\n public:\n  // The c'tor pushes the given source file location and message onto\n  // a trace stack maintained by Google Test.\n\n  // Template version. Uses Message() to convert the values into strings.\n  // Slow, but flexible.\n  template <typename T>\n  ScopedTrace(const char* file, int line, const T& message) {\n    PushTrace(file, line, (Message() << message).GetString());\n  }\n\n  // Optimize for some known types.\n  ScopedTrace(const char* file, int line, const char* message) {\n    PushTrace(file, line, message ? message : \"(null)\");\n  }\n\n#if GTEST_HAS_GLOBAL_STRING\n  ScopedTrace(const char* file, int line, const ::string& message) {\n    PushTrace(file, line, message);\n  }\n#endif\n\n  ScopedTrace(const char* file, int line, const std::string& message) {\n    PushTrace(file, line, message);\n  }\n\n  // The d'tor pops the info pushed by the c'tor.\n  //\n  // Note that the d'tor is not virtual in order to be efficient.\n  // Don't inherit from ScopedTrace!\n  ~ScopedTrace();\n\n private:\n  void PushTrace(const char* file, int line, std::string message);\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(ScopedTrace);\n} GTEST_ATTRIBUTE_UNUSED_;  // A ScopedTrace object does its job in its\n                            // c'tor and d'tor.  Therefore it doesn't\n                            // need to be used otherwise.\n\n// Causes a trace (including the source file path, the current line\n// number, and the given message) to be included in every test failure\n// message generated by code in the current scope.  The effect is\n// undone when the control leaves the current scope.\n//\n// The message argument can be anything streamable to std::ostream.\n//\n// In the implementation, we include the current line number as part\n// of the dummy variable name, thus allowing multiple SCOPED_TRACE()s\n// to appear in the same block - as long as they are on different\n// lines.\n//\n// Assuming that each thread maintains its own stack of traces.\n// Therefore, a SCOPED_TRACE() would (correctly) only affect the\n// assertions in its own thread.\n#define SCOPED_TRACE(message) \\\n  ::testing::ScopedTrace GTEST_CONCAT_TOKEN_(gtest_trace_, __LINE__)(\\\n    __FILE__, __LINE__, (message))\n\n\n// Compile-time assertion for type equality.\n// StaticAssertTypeEq<type1, type2>() compiles iff type1 and type2 are\n// the same type.  The value it returns is not interesting.\n//\n// Instead of making StaticAssertTypeEq a class template, we make it a\n// function template that invokes a helper class template.  This\n// prevents a user from misusing StaticAssertTypeEq<T1, T2> by\n// defining objects of that type.\n//\n// CAVEAT:\n//\n// When used inside a method of a class template,\n// StaticAssertTypeEq<T1, T2>() is effective ONLY IF the method is\n// instantiated.  For example, given:\n//\n//   template <typename T> class Foo {\n//    public:\n//     void Bar() { testing::StaticAssertTypeEq<int, T>(); }\n//   };\n//\n// the code:\n//\n//   void Test1() { Foo<bool> foo; }\n//\n// will NOT generate a compiler error, as Foo<bool>::Bar() is never\n// actually instantiated.  Instead, you need:\n//\n//   void Test2() { Foo<bool> foo; foo.Bar(); }\n//\n// to cause a compiler error.\ntemplate <typename T1, typename T2>\nbool StaticAssertTypeEq() {\n  (void)internal::StaticAssertTypeEqHelper<T1, T2>();\n  return true;\n}\n\n// Defines a test.\n//\n// The first parameter is the name of the test suite, and the second\n// parameter is the name of the test within the test suite.\n//\n// The convention is to end the test suite name with \"Test\".  For\n// example, a test suite for the Foo class can be named FooTest.\n//\n// Test code should appear between braces after an invocation of\n// this macro.  Example:\n//\n//   TEST(FooTest, InitializesCorrectly) {\n//     Foo foo;\n//     EXPECT_TRUE(foo.StatusIsOK());\n//   }\n\n// Note that we call GetTestTypeId() instead of GetTypeId<\n// ::testing::Test>() here to get the type ID of testing::Test.  This\n// is to work around a suspected linker bug when using Google Test as\n// a framework on Mac OS X.  The bug causes GetTypeId<\n// ::testing::Test>() to return different values depending on whether\n// the call is from the Google Test framework itself or from user test\n// code.  GetTestTypeId() is guaranteed to always return the same\n// value, as it always calls GetTypeId<>() from the Google Test\n// framework.\n#define GTEST_TEST(test_suite_name, test_name)             \\\n  GTEST_TEST_(test_suite_name, test_name, ::testing::Test, \\\n              ::testing::internal::GetTestTypeId())\n\n// Define this macro to 1 to omit the definition of TEST(), which\n// is a generic name and clashes with some other libraries.\n#if !GTEST_DONT_DEFINE_TEST\n#define TEST(test_suite_name, test_name) GTEST_TEST(test_suite_name, test_name)\n#endif\n\n// Defines a test that uses a test fixture.\n//\n// The first parameter is the name of the test fixture class, which\n// also doubles as the test suite name.  The second parameter is the\n// name of the test within the test suite.\n//\n// A test fixture class must be declared earlier.  The user should put\n// the test code between braces after using this macro.  Example:\n//\n//   class FooTest : public testing::Test {\n//    protected:\n//     void SetUp() override { b_.AddElement(3); }\n//\n//     Foo a_;\n//     Foo b_;\n//   };\n//\n//   TEST_F(FooTest, InitializesCorrectly) {\n//     EXPECT_TRUE(a_.StatusIsOK());\n//   }\n//\n//   TEST_F(FooTest, ReturnsElementCountCorrectly) {\n//     EXPECT_EQ(a_.size(), 0);\n//     EXPECT_EQ(b_.size(), 1);\n//   }\n//\n// GOOGLETEST_CM0011 DO NOT DELETE\n#define TEST_F(test_fixture, test_name)\\\n  GTEST_TEST_(test_fixture, test_name, test_fixture, \\\n              ::testing::internal::GetTypeId<test_fixture>())\n\n// Returns a path to temporary directory.\n// Tries to determine an appropriate directory for the platform.\nGTEST_API_ std::string TempDir();\n\n#ifdef _MSC_VER\n#  pragma warning(pop)\n#endif\n\n// Dynamically registers a test with the framework.\n//\n// This is an advanced API only to be used when the `TEST` macros are\n// insufficient. The macros should be preferred when possible, as they avoid\n// most of the complexity of calling this function.\n//\n// The `factory` argument is a factory callable (move-constructible) object or\n// function pointer that creates a new instance of the Test object. It\n// handles ownership to the caller. The signature of the callable is\n// `Fixture*()`, where `Fixture` is the test fixture class for the test. All\n// tests registered with the same `test_suite_name` must return the same\n// fixture type. This is checked at runtime.\n//\n// The framework will infer the fixture class from the factory and will call\n// the `SetUpTestSuite` and `TearDownTestSuite` for it.\n//\n// Must be called before `RUN_ALL_TESTS()` is invoked, otherwise behavior is\n// undefined.\n//\n// Use case example:\n//\n// class MyFixture : public ::testing::Test {\n//  public:\n//   // All of these optional, just like in regular macro usage.\n//   static void SetUpTestSuite() { ... }\n//   static void TearDownTestSuite() { ... }\n//   void SetUp() override { ... }\n//   void TearDown() override { ... }\n// };\n//\n// class MyTest : public MyFixture {\n//  public:\n//   explicit MyTest(int data) : data_(data) {}\n//   void TestBody() override { ... }\n//\n//  private:\n//   int data_;\n// };\n//\n// void RegisterMyTests(const std::vector<int>& values) {\n//   for (int v : values) {\n//     ::testing::RegisterTest(\n//         \"MyFixture\", (\"Test\" + std::to_string(v)).c_str(), nullptr,\n//         std::to_string(v).c_str(),\n//         __FILE__, __LINE__,\n//         // Important to use the fixture type as the return type here.\n//         [=]() -> MyFixture* { return new MyTest(v); });\n//   }\n// }\n// ...\n// int main(int argc, char** argv) {\n//   std::vector<int> values_to_test = LoadValuesFromConfig();\n//   RegisterMyTests(values_to_test);\n//   ...\n//   return RUN_ALL_TESTS();\n// }\n//\ntemplate <int&... ExplicitParameterBarrier, typename Factory>\nTestInfo* RegisterTest(const char* test_suite_name, const char* test_name,\n                       const char* type_param, const char* value_param,\n                       const char* file, int line, Factory factory) {\n  using TestT = typename std::remove_pointer<decltype(factory())>::type;\n\n  class FactoryImpl : public internal::TestFactoryBase {\n   public:\n    explicit FactoryImpl(Factory f) : factory_(std::move(f)) {}\n    Test* CreateTest() override { return factory_(); }\n\n   private:\n    Factory factory_;\n  };\n\n  return internal::MakeAndRegisterTestInfo(\n      test_suite_name, test_name, type_param, value_param,\n      internal::CodeLocation(file, line), internal::GetTypeId<TestT>(),\n      internal::SuiteApiResolver<TestT>::GetSetUpCaseOrSuite(),\n      internal::SuiteApiResolver<TestT>::GetTearDownCaseOrSuite(),\n      new FactoryImpl{std::move(factory)});\n}\n\n}  // namespace testing\n\n// Use this function in main() to run all tests.  It returns 0 if all\n// tests are successful, or 1 otherwise.\n//\n// RUN_ALL_TESTS() should be invoked after the command line has been\n// parsed by InitGoogleTest().\n//\n// This function was formerly a macro; thus, it is in the global\n// namespace and has an all-caps name.\nint RUN_ALL_TESTS() GTEST_MUST_USE_RESULT_;\n\ninline int RUN_ALL_TESTS() {\n  return ::testing::UnitTest::GetInstance()->Run();\n}\n\nGTEST_DISABLE_MSC_WARNINGS_POP_()  //  4251\n\n#endif  // GTEST_INCLUDE_GTEST_GTEST_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/householder_vector_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://code.google.com/p/ceres-solver/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: vitus@google.com (Michael Vitus)\n\n#include \"ceres/internal/householder_vector.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"glog/logging.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nstatic void HouseholderTestHelper(const Vector& x) {\n  const double kTolerance = 1e-14;\n\n  // Check to ensure that H * x = ||x|| * [0 ... 0 1]'.\n  Vector v(x.rows());\n  double beta;\n\n  // NOTE: The explicit template arguments are needed here because\n  // ComputeHouseholderVector is templated and some versions of MSVC\n  // have trouble deducing the type of v automatically.\n  ComputeHouseholderVector<Vector, double, Eigen::Dynamic>(x, &v, &beta);\n  Vector result = x - beta * v * (v.transpose() * x);\n\n  Vector expected_result(x.rows());\n  expected_result.setZero();\n  expected_result(x.rows() - 1) = 1;\n  expected_result *= x.norm();\n\n  for (int i = 0; i < x.rows(); ++i) {\n    EXPECT_NEAR(expected_result[i], result[i], kTolerance);\n  }\n}\n\nTEST(HouseholderVector, ZeroPositive) {\n  Vector x(3);\n  x << 0.0, 0.0, 0.25;\n\n  HouseholderTestHelper(x);\n}\n\nTEST(HouseholderVector, ZeroNegative) {\n  Vector x(3);\n  x << 0.0, 0.0, -0.25;\n\n  HouseholderTestHelper(x);\n}\n\nTEST(HouseholderVector, NearZeroPositive) {\n  Vector x(3);\n  x << 1e-18, 1e-18, 0.25;\n\n  HouseholderTestHelper(x);\n}\n\nTEST(HouseholderVector, NearZeroNegative) {\n  Vector x(3);\n  x << 1e-18, 1e-18, -0.25;\n\n  HouseholderTestHelper(x);\n}\n\nTEST(HouseholderVector, NonZeroNegative) {\n  Vector x(3);\n  x << 1.0, 0.0, -3.0;\n\n  HouseholderTestHelper(x);\n}\n\nTEST(HouseholderVector, NonZeroPositive) {\n  Vector x(3);\n  x << 1.0, 1.0, 1.0;\n\n  HouseholderTestHelper(x);\n}\n\nTEST(HouseholderVector, NonZeroPositive_Size4) {\n  Vector x(4);\n  x << 1.0, 1.0, 0.0, 2.0;\n\n  HouseholderTestHelper(x);\n}\n\nTEST(HouseholderVector, LastElementZero) {\n  Vector x(4);\n  x << 1.0, 1.0, 0.0, 0.0;\n\n  HouseholderTestHelper(x);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/implicit_schur_complement.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/implicit_schur_complement.h\"\n\n#include \"Eigen/Dense\"\n#include \"ceres/block_sparse_matrix.h\"\n#include \"ceres/block_structure.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/linear_solver.h\"\n#include \"ceres/types.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nImplicitSchurComplement::ImplicitSchurComplement(\n    const LinearSolver::Options& options)\n    : options_(options),\n      D_(NULL),\n      b_(NULL) {\n}\n\nImplicitSchurComplement::~ImplicitSchurComplement() {\n}\n\nvoid ImplicitSchurComplement::Init(const BlockSparseMatrix& A,\n                                   const double* D,\n                                   const double* b) {\n  // Since initialization is reasonably heavy, perhaps we can save on\n  // constructing a new object everytime.\n  if (A_ == NULL) {\n    A_.reset(PartitionedMatrixViewBase::Create(options_, A));\n  }\n\n  D_ = D;\n  b_ = b;\n\n  // Initialize temporary storage and compute the block diagonals of\n  // E'E and F'E.\n  if (block_diagonal_EtE_inverse_ == NULL) {\n    block_diagonal_EtE_inverse_.reset(A_->CreateBlockDiagonalEtE());\n    if (options_.preconditioner_type == JACOBI) {\n      block_diagonal_FtF_inverse_.reset(A_->CreateBlockDiagonalFtF());\n    }\n    rhs_.resize(A_->num_cols_f());\n    rhs_.setZero();\n    tmp_rows_.resize(A_->num_rows());\n    tmp_e_cols_.resize(A_->num_cols_e());\n    tmp_e_cols_2_.resize(A_->num_cols_e());\n    tmp_f_cols_.resize(A_->num_cols_f());\n  } else {\n    A_->UpdateBlockDiagonalEtE(block_diagonal_EtE_inverse_.get());\n    if (options_.preconditioner_type == JACOBI) {\n      A_->UpdateBlockDiagonalFtF(block_diagonal_FtF_inverse_.get());\n    }\n  }\n\n  // The block diagonals of the augmented linear system contain\n  // contributions from the diagonal D if it is non-null. Add that to\n  // the block diagonals and invert them.\n  AddDiagonalAndInvert(D_, block_diagonal_EtE_inverse_.get());\n  if (options_.preconditioner_type == JACOBI) {\n    AddDiagonalAndInvert((D_ ==  NULL) ? NULL : D_ + A_->num_cols_e(),\n                         block_diagonal_FtF_inverse_.get());\n  }\n\n  // Compute the RHS of the Schur complement system.\n  UpdateRhs();\n}\n\n// Evaluate the product\n//\n//   Sx = [F'F - F'E (E'E)^-1 E'F]x\n//\n// By breaking it down into individual matrix vector products\n// involving the matrices E and F. This is implemented using a\n// PartitionedMatrixView of the input matrix A.\nvoid ImplicitSchurComplement::RightMultiply(const double* x, double* y) const {\n  // y1 = F x\n  tmp_rows_.setZero();\n  A_->RightMultiplyF(x, tmp_rows_.data());\n\n  // y2 = E' y1\n  tmp_e_cols_.setZero();\n  A_->LeftMultiplyE(tmp_rows_.data(), tmp_e_cols_.data());\n\n  // y3 = -(E'E)^-1 y2\n  tmp_e_cols_2_.setZero();\n  block_diagonal_EtE_inverse_->RightMultiply(tmp_e_cols_.data(),\n                                             tmp_e_cols_2_.data());\n  tmp_e_cols_2_ *= -1.0;\n\n  // y1 = y1 + E y3\n  A_->RightMultiplyE(tmp_e_cols_2_.data(), tmp_rows_.data());\n\n  // y5 = D * x\n  if (D_ != NULL) {\n    ConstVectorRef Dref(D_ + A_->num_cols_e(), num_cols());\n    VectorRef(y, num_cols()) =\n        (Dref.array().square() *\n         ConstVectorRef(x, num_cols()).array()).matrix();\n  } else {\n    VectorRef(y, num_cols()).setZero();\n  }\n\n  // y = y5 + F' y1\n  A_->LeftMultiplyF(tmp_rows_.data(), y);\n}\n\n// Given a block diagonal matrix and an optional array of diagonal\n// entries D, add them to the diagonal of the matrix and compute the\n// inverse of each diagonal block.\nvoid ImplicitSchurComplement::AddDiagonalAndInvert(\n    const double* D,\n    BlockSparseMatrix* block_diagonal) {\n  const CompressedRowBlockStructure* block_diagonal_structure =\n      block_diagonal->block_structure();\n  for (int r = 0; r < block_diagonal_structure->rows.size(); ++r) {\n    const int row_block_pos = block_diagonal_structure->rows[r].block.position;\n    const int row_block_size = block_diagonal_structure->rows[r].block.size;\n    const Cell& cell = block_diagonal_structure->rows[r].cells[0];\n    MatrixRef m(block_diagonal->mutable_values() + cell.position,\n                row_block_size, row_block_size);\n\n    if (D != NULL) {\n      ConstVectorRef d(D + row_block_pos, row_block_size);\n      m += d.array().square().matrix().asDiagonal();\n    }\n\n    m = m\n        .selfadjointView<Eigen::Upper>()\n        .llt()\n        .solve(Matrix::Identity(row_block_size, row_block_size));\n  }\n}\n\n// Similar to RightMultiply, use the block structure of the matrix A\n// to compute y = (E'E)^-1 (E'b - E'F x).\nvoid ImplicitSchurComplement::BackSubstitute(const double* x, double* y) {\n  const int num_cols_e = A_->num_cols_e();\n  const int num_cols_f = A_->num_cols_f();\n  const int num_cols =  A_->num_cols();\n  const int num_rows = A_->num_rows();\n\n  // y1 = F x\n  tmp_rows_.setZero();\n  A_->RightMultiplyF(x, tmp_rows_.data());\n\n  // y2 = b - y1\n  tmp_rows_ = ConstVectorRef(b_, num_rows) - tmp_rows_;\n\n  // y3 = E' y2\n  tmp_e_cols_.setZero();\n  A_->LeftMultiplyE(tmp_rows_.data(), tmp_e_cols_.data());\n\n  // y = (E'E)^-1 y3\n  VectorRef(y, num_cols).setZero();\n  block_diagonal_EtE_inverse_->RightMultiply(tmp_e_cols_.data(), y);\n\n  // The full solution vector y has two blocks. The first block of\n  // variables corresponds to the eliminated variables, which we just\n  // computed via back substitution. The second block of variables\n  // corresponds to the Schur complement system, so we just copy those\n  // values from the solution to the Schur complement.\n  VectorRef(y + num_cols_e, num_cols_f) =  ConstVectorRef(x, num_cols_f);\n}\n\n// Compute the RHS of the Schur complement system.\n//\n// rhs = F'b - F'E (E'E)^-1 E'b\n//\n// Like BackSubstitute, we use the block structure of A to implement\n// this using a series of matrix vector products.\nvoid ImplicitSchurComplement::UpdateRhs() {\n  // y1 = E'b\n  tmp_e_cols_.setZero();\n  A_->LeftMultiplyE(b_, tmp_e_cols_.data());\n\n  // y2 = (E'E)^-1 y1\n  Vector y2 = Vector::Zero(A_->num_cols_e());\n  block_diagonal_EtE_inverse_->RightMultiply(tmp_e_cols_.data(), y2.data());\n\n  // y3 = E y2\n  tmp_rows_.setZero();\n  A_->RightMultiplyE(y2.data(), tmp_rows_.data());\n\n  // y3 = b - y3\n  tmp_rows_ = ConstVectorRef(b_, A_->num_rows()) - tmp_rows_;\n\n  // rhs = F' y3\n  rhs_.setZero();\n  A_->LeftMultiplyF(tmp_rows_.data(), rhs_.data());\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/implicit_schur_complement.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// An iterative solver for solving the Schur complement/reduced camera\n// linear system that arise in SfM problems.\n\n#ifndef CERES_INTERNAL_IMPLICIT_SCHUR_COMPLEMENT_H_\n#define CERES_INTERNAL_IMPLICIT_SCHUR_COMPLEMENT_H_\n\n#include <memory>\n#include \"ceres/linear_operator.h\"\n#include \"ceres/linear_solver.h\"\n#include \"ceres/partitioned_matrix_view.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/types.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass BlockSparseMatrix;\n\n// This class implements various linear algebraic operations related\n// to the Schur complement without explicitly forming it.\n//\n//\n// Given a reactangular linear system Ax = b, where\n//\n//   A = [E F]\n//\n// The normal equations are given by\n//\n//   A'Ax = A'b\n//\n//  |E'E E'F||y| = |E'b|\n//  |F'E F'F||z|   |F'b|\n//\n// and the Schur complement system is given by\n//\n//  [F'F - F'E (E'E)^-1 E'F] z = F'b - F'E (E'E)^-1 E'b\n//\n// Now if we wish to solve Ax = b in the least squares sense, one way\n// is to form this Schur complement system and solve it using\n// Preconditioned Conjugate Gradients.\n//\n// The key operation in a conjugate gradient solver is the evaluation of the\n// matrix vector product with the Schur complement\n//\n//   S = F'F - F'E (E'E)^-1 E'F\n//\n// It is straightforward to see that matrix vector products with S can\n// be evaluated without storing S in memory. Instead, given (E'E)^-1\n// (which for our purposes is an easily inverted block diagonal\n// matrix), it can be done in terms of matrix vector products with E,\n// F and (E'E)^-1. This class implements this functionality and other\n// auxilliary bits needed to implement a CG solver on the Schur\n// complement using the PartitionedMatrixView object.\n//\n// THREAD SAFETY: This class is nqot thread safe. In particular, the\n// RightMultiply (and the LeftMultiply) methods are not thread safe as\n// they depend on mutable arrays used for the temporaries needed to\n// compute the product y += Sx;\nclass ImplicitSchurComplement : public LinearOperator {\n public:\n  // num_eliminate_blocks is the number of E blocks in the matrix\n  // A.\n  //\n  // preconditioner indicates whether the inverse of the matrix F'F\n  // should be computed or not as a preconditioner for the Schur\n  // Complement.\n  //\n  // TODO(sameeragarwal): Get rid of the two bools below and replace\n  // them with enums.\n  explicit ImplicitSchurComplement(const LinearSolver::Options& options);\n  virtual ~ImplicitSchurComplement();\n\n  // Initialize the Schur complement for a linear least squares\n  // problem of the form\n  //\n  //   |A      | x = |b|\n  //   |diag(D)|     |0|\n  //\n  // If D is null, then it is treated as a zero dimensional matrix. It\n  // is important that the matrix A have a BlockStructure object\n  // associated with it and has a block structure that is compatible\n  // with the SchurComplement solver.\n  void Init(const BlockSparseMatrix& A, const double* D, const double* b);\n\n  // y += Sx, where S is the Schur complement.\n  void RightMultiply(const double* x, double* y) const final;\n\n  // The Schur complement is a symmetric positive definite matrix,\n  // thus the left and right multiply operators are the same.\n  void LeftMultiply(const double* x, double* y) const final {\n    RightMultiply(x, y);\n  }\n\n  // y = (E'E)^-1 (E'b - E'F x). Given an estimate of the solution to\n  // the Schur complement system, this method computes the value of\n  // the e_block variables that were eliminated to form the Schur\n  // complement.\n  void BackSubstitute(const double* x, double* y);\n\n  int num_rows() const final { return A_->num_cols_f(); }\n  int num_cols() const final { return A_->num_cols_f(); }\n  const Vector& rhs()    const { return rhs_;             }\n\n  const BlockSparseMatrix* block_diagonal_EtE_inverse() const {\n    return block_diagonal_EtE_inverse_.get();\n  }\n\n  const BlockSparseMatrix* block_diagonal_FtF_inverse() const {\n    return block_diagonal_FtF_inverse_.get();\n  }\n\n private:\n  void AddDiagonalAndInvert(const double* D, BlockSparseMatrix* matrix);\n  void UpdateRhs();\n\n  const LinearSolver::Options& options_;\n\n  std::unique_ptr<PartitionedMatrixViewBase> A_;\n  const double* D_;\n  const double* b_;\n\n  std::unique_ptr<BlockSparseMatrix> block_diagonal_EtE_inverse_;\n  std::unique_ptr<BlockSparseMatrix> block_diagonal_FtF_inverse_;\n\n  Vector rhs_;\n\n  // Temporary storage vectors used to implement RightMultiply.\n  mutable Vector tmp_rows_;\n  mutable Vector tmp_e_cols_;\n  mutable Vector tmp_e_cols_2_;\n  mutable Vector tmp_f_cols_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_IMPLICIT_SCHUR_COMPLEMENT_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/implicit_schur_complement_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/implicit_schur_complement.h\"\n\n#include <cstddef>\n#include <memory>\n#include \"Eigen/Dense\"\n#include \"ceres/block_random_access_dense_matrix.h\"\n#include \"ceres/block_sparse_matrix.h\"\n#include \"ceres/casts.h\"\n#include \"ceres/context_impl.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/linear_least_squares_problems.h\"\n#include \"ceres/linear_solver.h\"\n#include \"ceres/schur_eliminator.h\"\n#include \"ceres/triplet_sparse_matrix.h\"\n#include \"ceres/types.h\"\n#include \"glog/logging.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing testing::AssertionResult;\n\nconst double kEpsilon = 1e-14;\n\nclass ImplicitSchurComplementTest : public ::testing::Test {\n protected :\n  void SetUp() final {\n    std::unique_ptr<LinearLeastSquaresProblem> problem(\n        CreateLinearLeastSquaresProblemFromId(2));\n\n    CHECK(problem != nullptr);\n    A_.reset(down_cast<BlockSparseMatrix*>(problem->A.release()));\n    b_.reset(problem->b.release());\n    D_.reset(problem->D.release());\n\n    num_cols_ = A_->num_cols();\n    num_rows_ = A_->num_rows();\n    num_eliminate_blocks_ = problem->num_eliminate_blocks;\n  }\n\n  void ReducedLinearSystemAndSolution(double* D,\n                                      Matrix* lhs,\n                                      Vector* rhs,\n                                      Vector* solution) {\n    const CompressedRowBlockStructure* bs = A_->block_structure();\n    const int num_col_blocks = bs->cols.size();\n    std::vector<int> blocks(num_col_blocks - num_eliminate_blocks_, 0);\n    for (int i = num_eliminate_blocks_; i < num_col_blocks; ++i) {\n      blocks[i - num_eliminate_blocks_] = bs->cols[i].size;\n    }\n\n    BlockRandomAccessDenseMatrix blhs(blocks);\n    const int num_schur_rows = blhs.num_rows();\n\n    LinearSolver::Options options;\n    options.elimination_groups.push_back(num_eliminate_blocks_);\n    options.type = DENSE_SCHUR;\n    ContextImpl context;\n    options.context = &context;\n\n    std::unique_ptr<SchurEliminatorBase> eliminator(\n        SchurEliminatorBase::Create(options));\n    CHECK(eliminator != nullptr);\n    const bool kFullRankETE = true;\n    eliminator->Init(num_eliminate_blocks_, kFullRankETE, bs);\n\n    lhs->resize(num_schur_rows, num_schur_rows);\n    rhs->resize(num_schur_rows);\n\n    eliminator->Eliminate(\n        BlockSparseMatrixData(*A_), b_.get(), D, &blhs, rhs->data());\n\n    MatrixRef lhs_ref(blhs.mutable_values(), num_schur_rows, num_schur_rows);\n\n    // lhs_ref is an upper triangular matrix. Construct a full version\n    // of lhs_ref in lhs by transposing lhs_ref, choosing the strictly\n    // lower triangular part of the matrix and adding it to lhs_ref.\n    *lhs = lhs_ref;\n    lhs->triangularView<Eigen::StrictlyLower>() =\n        lhs_ref.triangularView<Eigen::StrictlyUpper>().transpose();\n\n    solution->resize(num_cols_);\n    solution->setZero();\n    VectorRef schur_solution(solution->data() + num_cols_ - num_schur_rows,\n                             num_schur_rows);\n    schur_solution = lhs->selfadjointView<Eigen::Upper>().llt().solve(*rhs);\n    eliminator->BackSubstitute(BlockSparseMatrixData(*A_), b_.get(), D,\n                               schur_solution.data(), solution->data());\n  }\n\n  AssertionResult TestImplicitSchurComplement(double* D) {\n    Matrix lhs;\n    Vector rhs;\n    Vector reference_solution;\n    ReducedLinearSystemAndSolution(D, &lhs, &rhs, &reference_solution);\n\n    LinearSolver::Options options;\n    options.elimination_groups.push_back(num_eliminate_blocks_);\n    options.preconditioner_type = JACOBI;\n    ContextImpl context;\n    options.context = &context;\n    ImplicitSchurComplement isc(options);\n    isc.Init(*A_, D, b_.get());\n\n    int num_sc_cols = lhs.cols();\n\n    for (int i = 0; i < num_sc_cols; ++i) {\n      Vector x(num_sc_cols);\n      x.setZero();\n      x(i) = 1.0;\n\n      Vector y(num_sc_cols);\n      y = lhs * x;\n\n      Vector z(num_sc_cols);\n      isc.RightMultiply(x.data(), z.data());\n\n      // The i^th column of the implicit schur complement is the same as\n      // the explicit schur complement.\n      if ((y - z).norm() > kEpsilon) {\n        return testing::AssertionFailure()\n            << \"Explicit and Implicit SchurComplements differ in \"\n            << \"column \" << i << \". explicit: \" << y.transpose()\n            << \" implicit: \" << z.transpose();\n      }\n    }\n\n    // Compare the rhs of the reduced linear system\n    if ((isc.rhs() - rhs).norm() > kEpsilon) {\n      return testing::AssertionFailure()\n            << \"Explicit and Implicit SchurComplements differ in \"\n            << \"rhs. explicit: \" << rhs.transpose()\n            << \" implicit: \" << isc.rhs().transpose();\n    }\n\n    // Reference solution to the f_block.\n    const Vector reference_f_sol =\n        lhs.selfadjointView<Eigen::Upper>().llt().solve(rhs);\n\n    // Backsubstituted solution from the implicit schur solver using the\n    // reference solution to the f_block.\n    Vector sol(num_cols_);\n    isc.BackSubstitute(reference_f_sol.data(), sol.data());\n    if ((sol - reference_solution).norm() > kEpsilon) {\n      return testing::AssertionFailure()\n          << \"Explicit and Implicit SchurComplements solutions differ. \"\n          << \"explicit: \" << reference_solution.transpose()\n          << \" implicit: \" << sol.transpose();\n    }\n\n    return testing::AssertionSuccess();\n  }\n\n  int num_rows_;\n  int num_cols_;\n  int num_eliminate_blocks_;\n\n  std::unique_ptr<BlockSparseMatrix> A_;\n  std::unique_ptr<double[]> b_;\n  std::unique_ptr<double[]> D_;\n};\n\n// Verify that the Schur Complement matrix implied by the\n// ImplicitSchurComplement class matches the one explicitly computed\n// by the SchurComplement solver.\n//\n// We do this with and without regularization to check that the\n// support for the LM diagonal is correct.\nTEST_F(ImplicitSchurComplementTest, SchurMatrixValuesTest) {\n  EXPECT_TRUE(TestImplicitSchurComplement(NULL));\n  EXPECT_TRUE(TestImplicitSchurComplement(D_.get()));\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/inner_product_computer.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/inner_product_computer.h\"\n\n#include <algorithm>\n#include \"ceres/small_blas.h\"\n\nnamespace ceres {\nnamespace internal {\n\n\n// Create the CompressedRowSparseMatrix matrix that will contain the\n// inner product.\n//\n// storage_type controls whether the result matrix contains the upper\n// or the lower triangular part of the product.\n//\n// num_nonzeros is the number of non-zeros in the result matrix.\nCompressedRowSparseMatrix* InnerProductComputer::CreateResultMatrix(\n    const CompressedRowSparseMatrix::StorageType storage_type,\n    const int num_nonzeros) {\n  CompressedRowSparseMatrix* matrix =\n      new CompressedRowSparseMatrix(m_.num_cols(), m_.num_cols(), num_nonzeros);\n  matrix->set_storage_type(storage_type);\n\n  const CompressedRowBlockStructure* bs = m_.block_structure();\n  const std::vector<Block>& blocks = bs->cols;\n  matrix->mutable_row_blocks()->resize(blocks.size());\n  matrix->mutable_col_blocks()->resize(blocks.size());\n  for (int i = 0; i < blocks.size(); ++i) {\n    (*(matrix->mutable_row_blocks()))[i] = blocks[i].size;\n    (*(matrix->mutable_col_blocks()))[i] = blocks[i].size;\n  }\n\n  return matrix;\n}\n\n// Given the set of product terms in the inner product, return the\n// total number of non-zeros in the result and for each row block of\n// the result matrix, compute the number of non-zeros in any one row\n// of the row block.\nint InnerProductComputer::ComputeNonzeros(\n    const std::vector<InnerProductComputer::ProductTerm>& product_terms,\n    std::vector<int>* row_nnz) {\n  const CompressedRowBlockStructure* bs = m_.block_structure();\n  const std::vector<Block>& blocks = bs->cols;\n\n  row_nnz->resize(blocks.size());\n  std::fill(row_nnz->begin(), row_nnz->end(), 0);\n\n  // First product term.\n  (*row_nnz)[product_terms[0].row] = blocks[product_terms[0].col].size;\n  int num_nonzeros =\n      blocks[product_terms[0].row].size * blocks[product_terms[0].col].size;\n\n  // Remaining product terms.\n  for (int i = 1; i < product_terms.size(); ++i) {\n    const ProductTerm& previous = product_terms[i - 1];\n    const ProductTerm& current = product_terms[i];\n\n    // Each (row, col) block counts only once.\n    // This check depends on product sorted on (row, col).\n    if (current.row != previous.row || current.col != previous.col) {\n      (*row_nnz)[current.row] += blocks[current.col].size;\n      num_nonzeros += blocks[current.row].size * blocks[current.col].size;\n    }\n  }\n\n  return num_nonzeros;\n}\n\nInnerProductComputer::InnerProductComputer(const BlockSparseMatrix& m,\n                                           const int start_row_block,\n                                           const int end_row_block)\n    : m_(m), start_row_block_(start_row_block), end_row_block_(end_row_block) {}\n\n// Compute the sparsity structure of the product m.transpose() * m\n// and create a CompressedRowSparseMatrix corresponding to it.\n//\n// Also compute the \"program\" vector, which for every term in the\n// block outer product provides the information for the entry in the\n// values array of the result matrix where it should be accumulated.\n//\n// Since the entries of the program are the same for rows with the\n// same sparsity structure, the program only stores the result for one\n// row per row block. The Compute function reuses this information for\n// each row in the row block.\n//\n// product_storage_type controls the form of the output matrix. It\n// can be LOWER_TRIANGULAR or UPPER_TRIANGULAR.\nInnerProductComputer* InnerProductComputer::Create(\n    const BlockSparseMatrix& m,\n    CompressedRowSparseMatrix::StorageType product_storage_type) {\n  return InnerProductComputer::Create(\n      m, 0, m.block_structure()->rows.size(), product_storage_type);\n}\n\nInnerProductComputer* InnerProductComputer::Create(\n    const BlockSparseMatrix& m,\n    const int start_row_block,\n    const int end_row_block,\n    CompressedRowSparseMatrix::StorageType product_storage_type) {\n  CHECK(product_storage_type == CompressedRowSparseMatrix::LOWER_TRIANGULAR ||\n        product_storage_type == CompressedRowSparseMatrix::UPPER_TRIANGULAR);\n  CHECK_GT(m.num_nonzeros(), 0)\n      << \"Congratulations, you found a bug in Ceres. Please report it.\";\n  InnerProductComputer* inner_product_computer =\n      new InnerProductComputer(m, start_row_block, end_row_block);\n  inner_product_computer->Init(product_storage_type);\n  return inner_product_computer;\n}\n\nvoid InnerProductComputer::Init(\n    const CompressedRowSparseMatrix::StorageType product_storage_type) {\n  std::vector<InnerProductComputer::ProductTerm> product_terms;\n  const CompressedRowBlockStructure* bs = m_.block_structure();\n\n  // Give input matrix m in Block Sparse format\n  //     (row_block, col_block)\n  // represent each block multiplication\n  //     (row_block, col_block1)' X (row_block, col_block2)\n  // by its product term:\n  //     (col_block1, col_block2, index)\n  for (int row_block = start_row_block_; row_block < end_row_block_;\n       ++row_block) {\n    const CompressedRow& row = bs->rows[row_block];\n    for (int c1 = 0; c1 < row.cells.size(); ++c1) {\n      const Cell& cell1 = row.cells[c1];\n      int c2_begin, c2_end;\n      if (product_storage_type == CompressedRowSparseMatrix::LOWER_TRIANGULAR) {\n        c2_begin = 0;\n        c2_end = c1 + 1;\n      } else {\n        c2_begin = c1;\n        c2_end = row.cells.size();\n      }\n\n      for (int c2 = c2_begin; c2 < c2_end; ++c2) {\n        const Cell& cell2 = row.cells[c2];\n        product_terms.push_back(InnerProductComputer::ProductTerm(\n            cell1.block_id, cell2.block_id, product_terms.size()));\n      }\n    }\n  }\n\n  std::sort(product_terms.begin(), product_terms.end());\n  ComputeOffsetsAndCreateResultMatrix(product_storage_type, product_terms);\n}\n\nvoid InnerProductComputer::ComputeOffsetsAndCreateResultMatrix(\n    const CompressedRowSparseMatrix::StorageType product_storage_type,\n    const std::vector<InnerProductComputer::ProductTerm>& product_terms) {\n  const std::vector<Block>& col_blocks = m_.block_structure()->cols;\n\n  std::vector<int> row_block_nnz;\n  const int num_nonzeros = ComputeNonzeros(product_terms, &row_block_nnz);\n\n  result_.reset(CreateResultMatrix(product_storage_type, num_nonzeros));\n\n  // Populate the row non-zero counts in the result matrix.\n  int* crsm_rows = result_->mutable_rows();\n  crsm_rows[0] = 0;\n  for (int i = 0; i < col_blocks.size(); ++i) {\n    for (int j = 0; j < col_blocks[i].size; ++j, ++crsm_rows) {\n      *(crsm_rows + 1) = *crsm_rows + row_block_nnz[i];\n    }\n  }\n\n  // The following macro FILL_CRSM_COL_BLOCK is key to understanding\n  // how this class works.\n  //\n  // It does two things.\n  //\n  // Sets the value for the current term in the result_offsets_ array\n  // and populates the cols array of the result matrix.\n  //\n  // row_block and col_block as the names imply, refer to the row and\n  // column blocks of the current term.\n  //\n  // row_nnz is the number of nonzeros in the result_matrix at the\n  // beginning of the first row of row_block.\n  //\n  // col_nnz is the number of nonzeros in the first row of the row\n  // block that occur before the current column block, i.e. this is\n  // sum of the sizes of all the column blocks in this row block that\n  // came before this column block.\n  //\n  // Given these two numbers and the total number of nonzeros in this\n  // row (nnz_in_row), we can now populate the cols array as follows:\n  //\n  // nnz + j * nnz_in_row is the beginning of the j^th row.\n  //\n  // nnz + j * nnz_in_row + col_nnz is the beginning of the column\n  // block in the j^th row.\n  //\n  // nnz + j * nnz_in_row + col_nnz + k is then the j^th row and the\n  // k^th column of the product block, whose value is\n  //\n  // col_blocks[col_block].position + k, which is the column number of\n  // the k^th column of the current column block.\n#define FILL_CRSM_COL_BLOCK                                \\\n  const int row_block = current->row;                      \\\n  const int col_block = current->col;                      \\\n  const int nnz_in_row = row_block_nnz[row_block];         \\\n  int* crsm_cols = result_->mutable_cols();                \\\n  result_offsets_[current->index] = nnz + col_nnz;         \\\n  for (int j = 0; j < col_blocks[row_block].size; ++j) {   \\\n    for (int k = 0; k < col_blocks[col_block].size; ++k) { \\\n      crsm_cols[nnz + j * nnz_in_row + col_nnz + k] =      \\\n          col_blocks[col_block].position + k;              \\\n    }                                                      \\\n  }\n\n  result_offsets_.resize(product_terms.size());\n  int col_nnz = 0;\n  int nnz = 0;\n\n  // Process the first term.\n  const InnerProductComputer::ProductTerm* current = &product_terms[0];\n  FILL_CRSM_COL_BLOCK;\n\n  // Process the rest of the terms.\n  for (int i = 1; i < product_terms.size(); ++i) {\n    current = &product_terms[i];\n    const InnerProductComputer::ProductTerm* previous = &product_terms[i - 1];\n\n    // If the current term is the same as the previous term, then it\n    // stores its product at the same location as the previous term.\n    if (previous->row == current->row && previous->col == current->col) {\n      result_offsets_[current->index] = result_offsets_[previous->index];\n      continue;\n    }\n\n    if (previous->row == current->row) {\n      // if the current and previous terms are in the same row block,\n      // then they differ in the column block, in which case advance\n      // col_nnz by the column size of the prevous term.\n      col_nnz += col_blocks[previous->col].size;\n    } else {\n      // If we have moved to a new row-block , then col_nnz is zero,\n      // and nnz is set to the beginning of the row block.\n      col_nnz = 0;\n      nnz += row_block_nnz[previous->row] * col_blocks[previous->row].size;\n    }\n\n    FILL_CRSM_COL_BLOCK;\n  }\n}\n\n// Use the results_offsets_ array to numerically compute the product\n// m' * m and store it in result_.\n//\n// TODO(sameeragarwal): Multithreading support.\nvoid InnerProductComputer::Compute() {\n  const double* m_values = m_.values();\n  const CompressedRowBlockStructure* bs = m_.block_structure();\n\n  const CompressedRowSparseMatrix::StorageType storage_type =\n      result_->storage_type();\n  result_->SetZero();\n  double* values = result_->mutable_values();\n  const int* rows = result_->rows();\n  int cursor = 0;\n\n  // Iterate row blocks.\n  for (int r = start_row_block_; r < end_row_block_; ++r) {\n    const CompressedRow& m_row = bs->rows[r];\n    for (int c1 = 0; c1 < m_row.cells.size(); ++c1) {\n      const Cell& cell1 = m_row.cells[c1];\n      const int c1_size = bs->cols[cell1.block_id].size;\n      const int row_nnz = rows[bs->cols[cell1.block_id].position + 1] -\n          rows[bs->cols[cell1.block_id].position];\n\n      int c2_begin, c2_end;\n      if (storage_type == CompressedRowSparseMatrix::LOWER_TRIANGULAR) {\n        c2_begin = 0;\n        c2_end = c1 + 1;\n      } else {\n        c2_begin = c1;\n        c2_end = m_row.cells.size();\n      }\n\n      for (int c2 = c2_begin; c2 < c2_end; ++c2, ++cursor) {\n        const Cell& cell2 = m_row.cells[c2];\n        const int c2_size = bs->cols[cell2.block_id].size;\n        MatrixTransposeMatrixMultiply<Eigen::Dynamic, Eigen::Dynamic,\n                                      Eigen::Dynamic, Eigen::Dynamic, 1>(\n                                          m_values + cell1.position,\n                                          m_row.block.size, c1_size,\n                                          m_values + cell2.position,\n                                          m_row.block.size, c2_size,\n                                          values + result_offsets_[cursor],\n                                          0, 0, c1_size, row_nnz);\n      }\n    }\n  }\n\n  CHECK_EQ(cursor, result_offsets_.size());\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/inner_product_computer.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_INNER_PRODUCT_COMPUTER_H_\n#define CERES_INTERNAL_INNER_PRODUCT_COMPUTER_H_\n\n#include <memory>\n#include <vector>\n\n#include \"ceres/block_sparse_matrix.h\"\n#include \"ceres/compressed_row_sparse_matrix.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// This class is used to repeatedly compute the inner product\n//\n//   result = m' * m\n//\n// where the sparsity structure of m remains constant across calls.\n//\n// Upon creation, the class computes and caches information needed to\n// compute v, and then uses it to efficiently compute the product\n// every time InnerProductComputer::Compute is called.\n//\n// See sparse_normal_cholesky_solver.cc for example usage.\n//\n// Note that the result matrix is a block upper or lower-triangular\n// matrix, i.e., it will contain entries in the upper or lower\n// triangular part of the matrix corresponding to the block that occur\n// along its diagonal.\n//\n// This is not a problem as sparse linear algebra libraries can ignore\n// these entries with ease and the space used is minimal/linear in the\n// size of the matrices.\nclass InnerProductComputer {\n public:\n  // Factory\n  //\n  // m is the input matrix\n  //\n  // Since m' * m is a symmetric matrix, we only compute half of the\n  // matrix and the value of storage_type which must be\n  // UPPER_TRIANGULAR or LOWER_TRIANGULAR determines which half is\n  // computed.\n  //\n  // The user must ensure that the matrix m is valid for the life time\n  // of this object.\n  static InnerProductComputer* Create(\n      const BlockSparseMatrix& m,\n      CompressedRowSparseMatrix::StorageType storage_type);\n\n  // This factory method allows the user control over range of row\n  // blocks of m that should be used to compute the inner product.\n  //\n  // a = m(start_row_block : end_row_block, :);\n  // result = a' * a;\n  static InnerProductComputer* Create(\n      const BlockSparseMatrix& m,\n      int start_row_block,\n      int end_row_block,\n      CompressedRowSparseMatrix::StorageType storage_type);\n\n  // Update result_ to be numerically equal to m' * m.\n  void Compute();\n\n  // Accessors for the result containing the inner product.\n  //\n  // Compute must be called before accessing this result for\n  // the first time.\n  const CompressedRowSparseMatrix& result() const { return *result_; }\n  CompressedRowSparseMatrix* mutable_result() const { return result_.get(); }\n\n private:\n  // A ProductTerm is a term in the block inner product of a matrix\n  // with itself.\n  struct ProductTerm {\n    ProductTerm(const int row, const int col, const int index)\n        : row(row), col(col), index(index) {}\n\n    bool operator<(const ProductTerm& right) const {\n      if (row == right.row) {\n        if (col == right.col) {\n          return index < right.index;\n        }\n        return col < right.col;\n      }\n      return row < right.row;\n    }\n\n    int row;\n    int col;\n    int index;\n  };\n\n  InnerProductComputer(const BlockSparseMatrix& m,\n                       int start_row_block,\n                       int end_row_block);\n\n  void Init(CompressedRowSparseMatrix::StorageType storage_type);\n\n  CompressedRowSparseMatrix* CreateResultMatrix(\n      const CompressedRowSparseMatrix::StorageType storage_type,\n      int num_nonzeros);\n\n  int ComputeNonzeros(const std::vector<ProductTerm>& product_terms,\n                      std::vector<int>* row_block_nnz);\n\n  void ComputeOffsetsAndCreateResultMatrix(\n      const CompressedRowSparseMatrix::StorageType storage_type,\n      const std::vector<ProductTerm>& product_terms);\n\n  const BlockSparseMatrix& m_;\n  const int start_row_block_;\n  const int end_row_block_;\n  std::unique_ptr<CompressedRowSparseMatrix> result_;\n\n  // For each term in the inner product, result_offsets_ contains the\n  // location in the values array of the result_ matrix where it\n  // should be stored.\n  //\n  // This is the principal look up table that allows this class to\n  // compute the inner product fast.\n  std::vector<int> result_offsets_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_INNER_PRODUCT_COMPUTER_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/inner_product_computer_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/inner_product_computer.h\"\n\n#include <memory>\n#include <numeric>\n#include \"ceres/block_sparse_matrix.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/random.h\"\n#include \"ceres/triplet_sparse_matrix.h\"\n#include \"glog/logging.h\"\n#include \"gtest/gtest.h\"\n\n#include \"Eigen/SparseCore\"\n\nnamespace ceres {\nnamespace internal {\n\n#define COMPUTE_AND_COMPARE                                                  \\\n  {                                                                          \\\n    inner_product_computer->Compute();                                       \\\n    CompressedRowSparseMatrix* actual_product_crsm =                         \\\n        inner_product_computer->mutable_result();                            \\\n    Matrix actual_inner_product =                                            \\\n        Eigen::MappedSparseMatrix<double, Eigen::ColMajor>(                  \\\n            actual_product_crsm->num_rows(),                                 \\\n            actual_product_crsm->num_rows(),                                 \\\n            actual_product_crsm->num_nonzeros(),                             \\\n            actual_product_crsm->mutable_rows(),                             \\\n            actual_product_crsm->mutable_cols(),                             \\\n            actual_product_crsm->mutable_values());                          \\\n    EXPECT_EQ(actual_inner_product.rows(), actual_inner_product.cols());     \\\n    EXPECT_EQ(expected_inner_product.rows(), expected_inner_product.cols()); \\\n    EXPECT_EQ(actual_inner_product.rows(), expected_inner_product.rows());   \\\n    Matrix expected_t, actual_t;                                             \\\n    if (actual_product_crsm->storage_type() ==                               \\\n        CompressedRowSparseMatrix::LOWER_TRIANGULAR) {                       \\\n      expected_t = expected_inner_product.triangularView<Eigen::Upper>();    \\\n      actual_t = actual_inner_product.triangularView<Eigen::Upper>();        \\\n    } else {                                                                 \\\n      expected_t = expected_inner_product.triangularView<Eigen::Lower>();    \\\n      actual_t = actual_inner_product.triangularView<Eigen::Lower>();        \\\n    }                                                                        \\\n    EXPECT_LE((expected_t - actual_t).norm() / actual_t.norm(),              \\\n              100 * std::numeric_limits<double>::epsilon())                  \\\n        << \"expected: \\n\"                                                    \\\n        << expected_t << \"\\nactual: \\n\"                                      \\\n        << actual_t;                                                         \\\n  }\n\nTEST(InnerProductComputer, NormalOperation) {\n  // \"Randomly generated seed.\"\n  SetRandomState(29823);\n  const int kMaxNumRowBlocks = 10;\n  const int kMaxNumColBlocks = 10;\n  const int kNumTrials = 10;\n\n  // Create a random matrix, compute its outer product using Eigen and\n  // ComputeOuterProduct. Convert both matrices to dense matrices and\n  // compare their upper triangular parts.\n  for (int num_row_blocks = 1; num_row_blocks < kMaxNumRowBlocks;\n       ++num_row_blocks) {\n    for (int num_col_blocks = 1; num_col_blocks < kMaxNumColBlocks;\n         ++num_col_blocks) {\n      for (int trial = 0; trial < kNumTrials; ++trial) {\n        BlockSparseMatrix::RandomMatrixOptions options;\n        options.num_row_blocks = num_row_blocks;\n        options.num_col_blocks = num_col_blocks;\n        options.min_row_block_size = 1;\n        options.max_row_block_size = 5;\n        options.min_col_block_size = 1;\n        options.max_col_block_size = 10;\n        options.block_density = std::max(0.1, RandDouble());\n\n        VLOG(2) << \"num row blocks: \" << options.num_row_blocks;\n        VLOG(2) << \"num col blocks: \" << options.num_col_blocks;\n        VLOG(2) << \"min row block size: \" << options.min_row_block_size;\n        VLOG(2) << \"max row block size: \" << options.max_row_block_size;\n        VLOG(2) << \"min col block size: \" << options.min_col_block_size;\n        VLOG(2) << \"max col block size: \" << options.max_col_block_size;\n        VLOG(2) << \"block density: \" << options.block_density;\n\n        std::unique_ptr<BlockSparseMatrix> random_matrix(\n            BlockSparseMatrix::CreateRandomMatrix(options));\n\n        TripletSparseMatrix tsm(random_matrix->num_rows(),\n                                random_matrix->num_cols(),\n                                random_matrix->num_nonzeros());\n        random_matrix->ToTripletSparseMatrix(&tsm);\n        std::vector<Eigen::Triplet<double>> triplets;\n        for (int i = 0; i < tsm.num_nonzeros(); ++i) {\n          triplets.push_back(Eigen::Triplet<double>(\n              tsm.rows()[i], tsm.cols()[i], tsm.values()[i]));\n        }\n        Eigen::SparseMatrix<double> eigen_random_matrix(\n            random_matrix->num_rows(), random_matrix->num_cols());\n        eigen_random_matrix.setFromTriplets(triplets.begin(), triplets.end());\n        Matrix expected_inner_product =\n            eigen_random_matrix.transpose() * eigen_random_matrix;\n\n        std::unique_ptr<InnerProductComputer> inner_product_computer;\n\n        inner_product_computer.reset(InnerProductComputer::Create(\n            *random_matrix, CompressedRowSparseMatrix::LOWER_TRIANGULAR));\n        COMPUTE_AND_COMPARE;\n        inner_product_computer.reset(InnerProductComputer::Create(\n            *random_matrix, CompressedRowSparseMatrix::UPPER_TRIANGULAR));\n        COMPUTE_AND_COMPARE;\n\n      }\n    }\n  }\n}\n\nTEST(InnerProductComputer, SubMatrix) {\n  // \"Randomly generated seed.\"\n  SetRandomState(29823);\n  const int kNumRowBlocks = 10;\n  const int kNumColBlocks = 20;\n  const int kNumTrials = 5;\n\n  // Create a random matrix, compute its outer product using Eigen and\n  // ComputeInnerProductComputer. Convert both matrices to dense matrices and\n  // compare their upper triangular parts.\n  for (int trial = 0; trial < kNumTrials; ++trial) {\n    BlockSparseMatrix::RandomMatrixOptions options;\n    options.num_row_blocks = kNumRowBlocks;\n    options.num_col_blocks = kNumColBlocks;\n    options.min_row_block_size = 1;\n    options.max_row_block_size = 5;\n    options.min_col_block_size = 1;\n    options.max_col_block_size = 10;\n    options.block_density = std::max(0.1, RandDouble());\n\n    VLOG(2) << \"num row blocks: \" << options.num_row_blocks;\n    VLOG(2) << \"num col blocks: \" << options.num_col_blocks;\n    VLOG(2) << \"min row block size: \" << options.min_row_block_size;\n    VLOG(2) << \"max row block size: \" << options.max_row_block_size;\n    VLOG(2) << \"min col block size: \" << options.min_col_block_size;\n    VLOG(2) << \"max col block size: \" << options.max_col_block_size;\n    VLOG(2) << \"block density: \" << options.block_density;\n\n    std::unique_ptr<BlockSparseMatrix> random_matrix(\n        BlockSparseMatrix::CreateRandomMatrix(options));\n\n    const std::vector<CompressedRow>& row_blocks =\n        random_matrix->block_structure()->rows;\n    const int num_row_blocks = row_blocks.size();\n\n    for (int start_row_block = 0; start_row_block < num_row_blocks - 1;\n         ++start_row_block) {\n      for (int end_row_block = start_row_block + 1;\n           end_row_block < num_row_blocks;\n           ++end_row_block) {\n        const int start_row = row_blocks[start_row_block].block.position;\n        const int end_row = row_blocks[end_row_block].block.position;\n\n        TripletSparseMatrix tsm(random_matrix->num_rows(),\n                                random_matrix->num_cols(),\n                                random_matrix->num_nonzeros());\n        random_matrix->ToTripletSparseMatrix(&tsm);\n        std::vector<Eigen::Triplet<double>> triplets;\n        for (int i = 0; i < tsm.num_nonzeros(); ++i) {\n          if (tsm.rows()[i] >= start_row && tsm.rows()[i] < end_row) {\n            triplets.push_back(Eigen::Triplet<double>(\n                tsm.rows()[i], tsm.cols()[i], tsm.values()[i]));\n          }\n        }\n\n        Eigen::SparseMatrix<double> eigen_random_matrix(\n            random_matrix->num_rows(), random_matrix->num_cols());\n        eigen_random_matrix.setFromTriplets(triplets.begin(), triplets.end());\n\n        Matrix expected_inner_product =\n            eigen_random_matrix.transpose() * eigen_random_matrix;\n\n        std::unique_ptr<InnerProductComputer> inner_product_computer;\n        inner_product_computer.reset(InnerProductComputer::Create(\n            *random_matrix,\n            start_row_block,\n            end_row_block,\n            CompressedRowSparseMatrix::LOWER_TRIANGULAR));\n        COMPUTE_AND_COMPARE;\n        inner_product_computer.reset(InnerProductComputer::Create(\n            *random_matrix,\n            start_row_block,\n            end_row_block,\n            CompressedRowSparseMatrix::UPPER_TRIANGULAR));\n        COMPUTE_AND_COMPARE;\n\n      }\n    }\n  }\n}\n\n#undef COMPUTE_AND_COMPARE\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/integer_sequence_algorithm_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: jodebo_beck@gmx.de (Johannes Beck)\n\n#include \"ceres/internal/integer_sequence_algorithm.h\"\n\n#include <type_traits>\n\nnamespace ceres {\nnamespace internal {\n\n// Unit tests for summation of integer sequence.\nstatic_assert(Sum<integer_sequence<int>>::Value == 0,\n              \"Unit test of summing up an integer sequence failed.\");\nstatic_assert(Sum<integer_sequence<int, 2>>::Value == 2,\n              \"Unit test of summing up an integer sequence failed.\");\nstatic_assert(Sum<integer_sequence<int, 2, 3>>::Value == 5,\n              \"Unit test of summing up an integer sequence failed.\");\nstatic_assert(Sum<integer_sequence<int, 2, 3, 10>>::Value == 15,\n              \"Unit test of summing up an integer sequence failed.\");\nstatic_assert(Sum<integer_sequence<int, 2, 3, 10, 4>>::Value == 19,\n              \"Unit test of summing up an integer sequence failed.\");\nstatic_assert(Sum<integer_sequence<int, 2, 3, 10, 4, 1>>::Value == 20,\n              \"Unit test of summing up an integer sequence failed.\");\n\n// Unit tests for exclusive scan of integer sequence.\nstatic_assert(std::is_same<ExclusiveScan<integer_sequence<int>>,\n                           integer_sequence<int>>::value,\n              \"Unit test of calculating the exclusive scan of an integer \"\n              \"sequence failed.\");\nstatic_assert(std::is_same<ExclusiveScan<integer_sequence<int, 2>>,\n                           integer_sequence<int, 0>>::value,\n              \"Unit test of calculating the exclusive scan of an integer \"\n              \"sequence failed.\");\nstatic_assert(std::is_same<ExclusiveScan<integer_sequence<int, 2, 1>>,\n                           integer_sequence<int, 0, 2>>::value,\n              \"Unit test of calculating the exclusive scan of an integer \"\n              \"sequence failed.\");\nstatic_assert(std::is_same<ExclusiveScan<integer_sequence<int, 2, 1, 10>>,\n                           integer_sequence<int, 0, 2, 3>>::value,\n              \"Unit test of calculating the exclusive scan of an integer \"\n              \"sequence failed.\");\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/integer_sequence_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: jodebo_beck@gmx.de (Johannes Beck)\n\n#include \"ceres/internal/integer_sequence.h\"\n\n#include <type_traits>\n\nnamespace ceres {\nnamespace internal {\n\n// Unit test for integer_sequence<...>::value_type\nstatic_assert(std::is_same<integer_sequence<unsigned int, 0>::value_type,\n                           unsigned int>::value,\n              \"Unit test of integer sequence value type failed.\");\n\n// Unit tests for make_integer_sequence\nstatic_assert(\n    std::is_same<make_integer_sequence<int, 0>, integer_sequence<int>>::value,\n    \"Unit test of make integer sequence failed.\");\nstatic_assert(std::is_same<make_integer_sequence<int, 1>,\n                           integer_sequence<int, 0>>::value,\n              \"Unit test of make integer sequence failed.\");\nstatic_assert(std::is_same<make_integer_sequence<int, 2>,\n                           integer_sequence<int, 0, 1>>::value,\n              \"Unit test of make integer sequence failed.\");\nstatic_assert(std::is_same<make_integer_sequence<int, 3>,\n                           integer_sequence<int, 0, 1, 2>>::value,\n              \"Unit test of make integer sequence failed.\");\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/invert_psd_matrix.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_INVERT_PSD_MATRIX_H_\n#define CERES_INTERNAL_INVERT_PSD_MATRIX_H_\n\n#include \"ceres/internal/eigen.h\"\n#include \"glog/logging.h\"\n#include \"Eigen/Dense\"\n\nnamespace ceres {\nnamespace internal {\n\n// Helper routine to compute the inverse or pseudo-inverse of a\n// symmetric positive semi-definite matrix.\n//\n// assume_full_rank controls whether a Cholesky factorization or an\n// Singular Value Decomposition is used to compute the inverse and the\n// pseudo-inverse respectively.\n//\n// The template parameter kSize can either be Eigen::Dynamic or a\n// positive integer equal to the number of rows of m.\ntemplate <int kSize>\ntypename EigenTypes<kSize, kSize>::Matrix InvertPSDMatrix(\n    const bool assume_full_rank,\n    const typename EigenTypes<kSize, kSize>::Matrix& m) {\n  using MType = typename EigenTypes<kSize, kSize>::Matrix;\n  const int size = m.rows();\n\n  // If the matrix can be assumed to be full rank, then if it is small\n  // (< 5) and fixed size, use Eigen's optimized inverse()\n  // implementation.\n  //\n  // https://eigen.tuxfamily.org/dox/group__TutorialLinearAlgebra.html#title3\n  if (assume_full_rank) {\n    if (kSize > 0 && kSize < 5) {\n      return m.inverse();\n    }\n    return m.template selfadjointView<Eigen::Upper>().llt().solve(\n        MType::Identity(size, size));\n  }\n\n  // For a thin SVD the number of columns of the matrix need to be dynamic.\n  using SVDMType = typename EigenTypes<kSize, Eigen::Dynamic>::Matrix;\n  Eigen::JacobiSVD<SVDMType> svd(m, Eigen::ComputeThinU | Eigen::ComputeThinV);\n  return svd.solve(MType::Identity(size, size));\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif // CERES_INTERNAL_INVERT_PSD_MATRIX_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/invert_psd_matrix_benchmark.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materils provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Authors: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"Eigen/Dense\"\n#include \"benchmark/benchmark.h\"\n#include \"ceres/invert_psd_matrix.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate <int kSize>\nvoid BenchmarkFixedSizedInvertPSDMatrix(benchmark::State& state) {\n  using MatrixType = typename EigenTypes<kSize, kSize>::Matrix;\n  MatrixType input = MatrixType::Random();\n  input += input.transpose() + MatrixType::Identity();\n\n  MatrixType output;\n  constexpr bool kAssumeFullRank = true;\n  for (auto _ : state) {\n    benchmark::DoNotOptimize(\n        output = InvertPSDMatrix<kSize>(kAssumeFullRank, input));\n  }\n}\n\nBENCHMARK_TEMPLATE(BenchmarkFixedSizedInvertPSDMatrix, 1);\nBENCHMARK_TEMPLATE(BenchmarkFixedSizedInvertPSDMatrix, 2);\nBENCHMARK_TEMPLATE(BenchmarkFixedSizedInvertPSDMatrix, 3);\nBENCHMARK_TEMPLATE(BenchmarkFixedSizedInvertPSDMatrix, 4);\nBENCHMARK_TEMPLATE(BenchmarkFixedSizedInvertPSDMatrix, 5);\nBENCHMARK_TEMPLATE(BenchmarkFixedSizedInvertPSDMatrix, 6);\nBENCHMARK_TEMPLATE(BenchmarkFixedSizedInvertPSDMatrix, 7);\nBENCHMARK_TEMPLATE(BenchmarkFixedSizedInvertPSDMatrix, 8);\nBENCHMARK_TEMPLATE(BenchmarkFixedSizedInvertPSDMatrix, 9);\nBENCHMARK_TEMPLATE(BenchmarkFixedSizedInvertPSDMatrix, 10);\nBENCHMARK_TEMPLATE(BenchmarkFixedSizedInvertPSDMatrix, 11);\nBENCHMARK_TEMPLATE(BenchmarkFixedSizedInvertPSDMatrix, 12);\n\nvoid BenchmarkDynamicallyInvertPSDMatrix(benchmark::State& state) {\n  using MatrixType =\n      typename EigenTypes<Eigen::Dynamic, Eigen::Dynamic>::Matrix;\n  const int size = state.range(0);\n  MatrixType input = MatrixType::Random(size, size);\n  input += input.transpose() + MatrixType::Identity(size, size);\n\n  MatrixType output;\n  constexpr bool kAssumeFullRank = true;\n  for (auto _ : state) {\n    benchmark::DoNotOptimize(\n        output = InvertPSDMatrix<Eigen::Dynamic>(kAssumeFullRank, input));\n  }\n}\n\nBENCHMARK(BenchmarkDynamicallyInvertPSDMatrix)\n    ->Apply([](benchmark::internal::Benchmark* benchmark) {\n      for (int i = 1; i < 13; ++i) {\n        benchmark->Args({i});\n      }\n    });\n\n}  // namespace internal\n}  // namespace ceres\n\nBENCHMARK_MAIN();\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/invert_psd_matrix_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/invert_psd_matrix.h\"\n\n#include \"ceres/internal/eigen.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nstatic constexpr bool kFullRank = true;\nstatic constexpr bool kRankDeficient = false;\n\ntemplate <int kSize>\ntypename EigenTypes<kSize, kSize>::Matrix RandomPSDMatrixWithEigenValues(\n    const typename EigenTypes<kSize>::Vector& eigenvalues) {\n  typename EigenTypes<kSize, kSize>::Matrix m(eigenvalues.rows(),\n                                              eigenvalues.rows());\n  m.setRandom();\n  Eigen::SelfAdjointEigenSolver<typename EigenTypes<kSize, kSize>::Matrix> es(\n      m);\n  return es.eigenvectors() * eigenvalues.asDiagonal() *\n         es.eigenvectors().transpose();\n}\n\nTEST(InvertPSDMatrix, Identity3x3) {\n  const Matrix m = Matrix::Identity(3, 3);\n  const Matrix inverse_m = InvertPSDMatrix<3>(kFullRank, m);\n  EXPECT_NEAR((inverse_m - m).norm() / m.norm(),\n              0.0,\n              std::numeric_limits<double>::epsilon());\n}\n\nTEST(InvertPSDMatrix, FullRank5x5) {\n  EigenTypes<5>::Vector eigenvalues;\n  eigenvalues.setRandom();\n  eigenvalues = eigenvalues.array().abs().matrix();\n  const Matrix m = RandomPSDMatrixWithEigenValues<5>(eigenvalues);\n  const Matrix inverse_m = InvertPSDMatrix<5>(kFullRank, m);\n  EXPECT_NEAR((m * inverse_m - Matrix::Identity(5, 5)).norm() / 5.0,\n              0.0,\n              10 * std::numeric_limits<double>::epsilon());\n}\n\nTEST(InvertPSDMatrix, RankDeficient5x5) {\n  EigenTypes<5>::Vector eigenvalues;\n  eigenvalues.setRandom();\n  eigenvalues = eigenvalues.array().abs().matrix();\n  eigenvalues(3) = 0.0;\n  const Matrix m = RandomPSDMatrixWithEigenValues<5>(eigenvalues);\n  const Matrix inverse_m = InvertPSDMatrix<5>(kRankDeficient, m);\n  Matrix pseudo_identity = Matrix::Identity(5, 5);\n  pseudo_identity(3, 3) = 0.0;\n  EXPECT_NEAR((m * inverse_m * m - m).norm() / m.norm(),\n              0.0,\n              10 * std::numeric_limits<double>::epsilon());\n}\n\nTEST(InvertPSDMatrix, DynamicFullRank5x5) {\n  EigenTypes<Eigen::Dynamic>::Vector eigenvalues(5);\n  eigenvalues.setRandom();\n  eigenvalues = eigenvalues.array().abs().matrix();\n  const Matrix m = RandomPSDMatrixWithEigenValues<Eigen::Dynamic>(eigenvalues);\n  const Matrix inverse_m = InvertPSDMatrix<Eigen::Dynamic>(kFullRank, m);\n  EXPECT_NEAR((m * inverse_m - Matrix::Identity(5, 5)).norm() / 5.0,\n              0.0,\n              10 * std::numeric_limits<double>::epsilon());\n}\n\nTEST(InvertPSDMatrix, DynamicRankDeficient5x5) {\n  EigenTypes<Eigen::Dynamic>::Vector eigenvalues(5);\n  eigenvalues.setRandom();\n  eigenvalues = eigenvalues.array().abs().matrix();\n  eigenvalues(3) = 0.0;\n  const Matrix m = RandomPSDMatrixWithEigenValues<Eigen::Dynamic>(eigenvalues);\n  const Matrix inverse_m = InvertPSDMatrix<Eigen::Dynamic>(kRankDeficient, m);\n  Matrix pseudo_identity = Matrix::Identity(5, 5);\n  pseudo_identity(3, 3) = 0.0;\n  EXPECT_NEAR((m * inverse_m * m - m).norm() / m.norm(),\n              0.0,\n              10 * std::numeric_limits<double>::epsilon());\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/is_close.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2016 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Authors: keir@google.com (Keir Mierle), dgossow@google.com (David Gossow)\n\n#include \"ceres/is_close.h\"\n\n#include <algorithm>\n#include <cmath>\n\nnamespace ceres {\nnamespace internal {\nbool IsClose(double x, double y, double relative_precision,\n             double *relative_error,\n             double *absolute_error) {\n  double local_absolute_error;\n  double local_relative_error;\n  if (!absolute_error) {\n    absolute_error = &local_absolute_error;\n  }\n  if (!relative_error) {\n    relative_error = &local_relative_error;\n  }\n  *absolute_error = std::fabs(x - y);\n  *relative_error = *absolute_error / std::max(std::fabs(x), std::fabs(y));\n  if (x == 0 || y == 0) {\n    // If x or y is exactly zero, then relative difference doesn't have any\n    // meaning. Take the absolute difference instead.\n    *relative_error = *absolute_error;\n  }\n  return *relative_error < std::fabs(relative_precision);\n}\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/is_close.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2016 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Authors: keir@google.com (Keir Mierle), dgossow@google.com (David Gossow)\n//\n// Utility routine for comparing two values.\n\n#ifndef CERES_INTERNAL_IS_CLOSE_H_\n#define CERES_INTERNAL_IS_CLOSE_H_\n\nnamespace ceres {\nnamespace internal {\n// Returns true if x and y have a relative (unsigned) difference less than\n// relative_precision and false otherwise. Stores the relative and absolute\n// difference in relative/absolute_error if non-NULL. If one of the two values\n// is exactly zero, the absolute difference will be compared, and relative_error\n// will be set to the absolute difference.\nbool IsClose(double x,\n             double y,\n             double relative_precision,\n             double *relative_error,\n             double *absolute_error);\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_IS_CLOSE_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/is_close_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: dgossow@google.com (David Gossow)\n//\n// This file contains tests for the IsClose function.\n\n#include \"ceres/is_close.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nconst double kTolerance = 1e-9;\n\nTEST(IsClose, BothParametersPositive) {\n  double relative_error = -1;\n  double absolute_error = -1;\n\n  // Test cases where both values are positive.\n  EXPECT_TRUE(IsClose(9.9, 10.0, 0.011, &relative_error, &absolute_error));\n  EXPECT_NEAR(relative_error, 0.01, kTolerance);\n  EXPECT_NEAR(absolute_error, 0.1, kTolerance);\n  relative_error = -1;\n  absolute_error = -1;\n  EXPECT_TRUE(IsClose(10.0, 9.9, 0.011, &relative_error, &absolute_error));\n  EXPECT_NEAR(relative_error, 0.01, kTolerance);\n  EXPECT_NEAR(absolute_error, 0.1, kTolerance);\n  relative_error = -1;\n  absolute_error = -1;\n\n  EXPECT_FALSE(IsClose(9.9, 10.0, 0.009, &relative_error, &absolute_error));\n  EXPECT_NEAR(relative_error, 0.01, kTolerance);\n  EXPECT_NEAR(absolute_error, 0.1, kTolerance);\n  relative_error = -1;\n  absolute_error = -1;\n  EXPECT_FALSE(IsClose(10.0, 9.9, 0.009, &relative_error, &absolute_error));\n  EXPECT_NEAR(relative_error, 0.01, kTolerance);\n  EXPECT_NEAR(absolute_error, 0.1, kTolerance);\n}\n\nTEST(IsClose, BothParametersNegative) {\n  double relative_error = -1;\n  double absolute_error = -1;\n\n  // Test cases where both values are negative.\n  EXPECT_TRUE(IsClose(-9.9, -10.0, 0.011, &relative_error, &absolute_error));\n  EXPECT_NEAR(relative_error, 0.01, kTolerance);\n  EXPECT_NEAR(absolute_error, 0.1, kTolerance);\n  relative_error = -1;\n  absolute_error = -1;\n  EXPECT_TRUE(IsClose(-10.0, -9.9, 0.011, &relative_error, &absolute_error));\n  EXPECT_NEAR(relative_error, 0.01, kTolerance);\n  EXPECT_NEAR(absolute_error, 0.1, kTolerance);\n  relative_error = -1;\n  absolute_error = -1;\n\n  EXPECT_FALSE(IsClose(-9.9, -10.0, 0.009, &relative_error, &absolute_error));\n  EXPECT_NEAR(relative_error, 0.01, kTolerance);\n  EXPECT_NEAR(absolute_error, 0.1, kTolerance);\n  relative_error = -1;\n  absolute_error = -1;\n  EXPECT_FALSE(IsClose(-10.0, -9.9, 0.009, &relative_error, &absolute_error));\n  EXPECT_NEAR(relative_error, 0.01, kTolerance);\n  EXPECT_NEAR(absolute_error, 0.1, kTolerance);\n}\n\nTEST(IsClose, ParametersHaveMixedSigns) {\n  double relative_error = -1;\n  double absolute_error = -1;\n\n  // Test cases with mixed signs.\n  EXPECT_FALSE(IsClose(-0.1, 0.1, 1.99, &relative_error, &absolute_error));\n  EXPECT_NEAR(relative_error, 2.0, kTolerance);\n  EXPECT_NEAR(absolute_error, 0.2, kTolerance);\n  relative_error = -1;\n  absolute_error = -1;\n  EXPECT_TRUE(IsClose(-0.1, 0.1, 2.01, &relative_error, &absolute_error));\n  EXPECT_NEAR(relative_error, 2.0, kTolerance);\n  EXPECT_NEAR(absolute_error, 0.2, kTolerance);\n  relative_error = -1;\n  absolute_error = -1;\n  EXPECT_FALSE(IsClose(0.1, -0.1, 1.99, &relative_error, &absolute_error));\n  EXPECT_NEAR(relative_error, 2.0, kTolerance);\n  EXPECT_NEAR(absolute_error, 0.2, kTolerance);\n  relative_error = -1;\n  absolute_error = -1;\n  EXPECT_TRUE(IsClose(0.1, -0.1, 2.01, &relative_error, &absolute_error));\n  EXPECT_NEAR(relative_error, 2.0, kTolerance);\n  EXPECT_NEAR(absolute_error, 0.2, kTolerance);\n}\n\nTEST(IsClose, OneParameterZero) {\n  double relative_error = -1;\n  double absolute_error = -1;\n\n  // Test cases where one of the values is zero.\n  EXPECT_TRUE(IsClose(0.0, 10.0, 10.1, &relative_error, &absolute_error));\n  EXPECT_NEAR(relative_error, 10.0, kTolerance);\n  EXPECT_NEAR(absolute_error, 10.0, kTolerance);\n  relative_error = -1;\n  absolute_error = -1;\n  EXPECT_TRUE(IsClose(10.0, 0.0, 10.1, &relative_error, &absolute_error));\n  EXPECT_NEAR(relative_error, 10.0, kTolerance);\n  EXPECT_NEAR(absolute_error, 10.0, kTolerance);\n  relative_error = -1;\n  absolute_error = -1;\n  EXPECT_TRUE(IsClose(0.0, -10.0, 10.1, &relative_error, &absolute_error));\n  EXPECT_NEAR(relative_error, 10.0, kTolerance);\n  EXPECT_NEAR(absolute_error, 10.0, kTolerance);\n  relative_error = -1;\n  absolute_error = -1;\n  EXPECT_TRUE(IsClose(-10.0, 0.0, 10.1, &relative_error, &absolute_error));\n  EXPECT_NEAR(relative_error, 10.0, kTolerance);\n  EXPECT_NEAR(absolute_error, 10.0, kTolerance);\n  relative_error = -1;\n  absolute_error = -1;\n\n  EXPECT_FALSE(IsClose(0, 10.0, 9.9, &relative_error, &absolute_error));\n  EXPECT_NEAR(relative_error, 10.0, kTolerance);\n  EXPECT_NEAR(absolute_error, 10.0, kTolerance);\n  relative_error = -1;\n  absolute_error = -1;\n  EXPECT_FALSE(IsClose(10.0, 0.0, 9.9, &relative_error, &absolute_error));\n  EXPECT_NEAR(relative_error, 10.0, kTolerance);\n  EXPECT_NEAR(absolute_error, 10.0, kTolerance);\n  relative_error = -1;\n  absolute_error = -1;\n  EXPECT_FALSE(IsClose(0, -10.0, 9.9, &relative_error, &absolute_error));\n  EXPECT_NEAR(relative_error, 10.0, kTolerance);\n  EXPECT_NEAR(absolute_error, 10.0, kTolerance);\n  relative_error = -1;\n  absolute_error = -1;\n  EXPECT_FALSE(IsClose(-10.0, 0.0, 9.9, &relative_error, &absolute_error));\n  EXPECT_NEAR(relative_error, 10.0, kTolerance);\n  EXPECT_NEAR(absolute_error, 10.0, kTolerance);\n}\n\nTEST(IsClose, BothParametersZero) {\n  double relative_error = -1;\n  double absolute_error = -1;\n  EXPECT_TRUE(IsClose(0.0, 0.0, 0.1, &relative_error, &absolute_error));\n  EXPECT_NEAR(relative_error, 0.0, kTolerance);\n  EXPECT_NEAR(absolute_error, 0.0, kTolerance);\n  relative_error = -1;\n  absolute_error = -1;\n  EXPECT_FALSE(IsClose(0.0, 0.0, 0.0, &relative_error, &absolute_error));\n  EXPECT_NEAR(relative_error, 0.0, kTolerance);\n  EXPECT_NEAR(absolute_error, 0.0, kTolerance);\n}\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/iterative_refiner.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include <string>\n#include \"ceres/iterative_refiner.h\"\n\n#include \"Eigen/Core\"\n#include \"ceres/sparse_cholesky.h\"\n#include \"ceres/sparse_matrix.h\"\n\nnamespace ceres {\nnamespace internal {\n\nIterativeRefiner::IterativeRefiner(const int max_num_iterations)\n    : max_num_iterations_(max_num_iterations) {}\n\nIterativeRefiner::~IterativeRefiner() {}\n\nvoid IterativeRefiner::Allocate(int num_cols) {\n  residual_.resize(num_cols);\n  correction_.resize(num_cols);\n  lhs_x_solution_.resize(num_cols);\n}\n\nvoid IterativeRefiner::Refine(const SparseMatrix& lhs,\n                              const double* rhs_ptr,\n                              SparseCholesky* sparse_cholesky,\n                              double* solution_ptr) {\n  const int num_cols = lhs.num_cols();\n  Allocate(num_cols);\n  ConstVectorRef rhs(rhs_ptr, num_cols);\n  VectorRef solution(solution_ptr, num_cols);\n  for (int i = 0; i < max_num_iterations_; ++i) {\n    // residual = rhs - lhs * solution\n    lhs_x_solution_.setZero();\n    lhs.RightMultiply(solution_ptr, lhs_x_solution_.data());\n    residual_ = rhs - lhs_x_solution_;\n    // solution += lhs^-1 residual\n    std::string ignored_message;\n    sparse_cholesky->Solve(\n        residual_.data(), correction_.data(), &ignored_message);\n    solution += correction_;\n  }\n};\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/iterative_refiner.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_ITERATIVE_REFINER_H_\n#define CERES_INTERNAL_ITERATIVE_REFINER_H_\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass SparseCholesky;\nclass SparseMatrix;\n\n// Iterative refinement\n// (https://en.wikipedia.org/wiki/Iterative_refinement) is the process\n// of improving the solution to a linear system, by using the\n// following iteration.\n//\n// r_i = b - Ax_i\n// Ad_i = r_i\n// x_{i+1} = x_i + d_i\n//\n// IterativeRefiner implements this process for Symmetric Positive\n// Definite linear systems.\n//\n// The above iterative loop is run until max_num_iterations is reached.\nclass IterativeRefiner {\n public:\n  // max_num_iterations is the number of refinement iterations to\n  // perform.\n  IterativeRefiner(int max_num_iterations);\n\n  // Needed for mocking.\n  virtual ~IterativeRefiner();\n\n  // Given an initial estimate of the solution of lhs * x = rhs, use\n  // max_num_iterations rounds of iterative refinement to improve it.\n  //\n  // sparse_cholesky is assumed to contain an already computed\n  // factorization (or approximation thereof) of lhs.\n  //\n  // solution is expected to contain a approximation to the solution\n  // to lhs * x = rhs. It can be zero.\n  //\n  // This method is virtual to facilitate mocking.\n  virtual void Refine(const SparseMatrix& lhs,\n                      const double* rhs,\n                      SparseCholesky* sparse_cholesky,\n                      double* solution);\n\n private:\n  void Allocate(int num_cols);\n\n  int max_num_iterations_;\n  Vector residual_;\n  Vector correction_;\n  Vector lhs_x_solution_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_ITERATIVE_REFINER_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/iterative_refiner_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/iterative_refiner.h\"\n\n#include \"Eigen/Dense\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/sparse_cholesky.h\"\n#include \"ceres/sparse_matrix.h\"\n#include \"glog/logging.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// Macros to help us define virtual methods which we do not expect to\n// use/call in this test.\n#define DO_NOT_CALL \\\n  { LOG(FATAL) << \"DO NOT CALL\"; }\n#define DO_NOT_CALL_WITH_RETURN(x) \\\n  {                                \\\n    LOG(FATAL) << \"DO NOT CALL\";   \\\n    return x;                      \\\n  }\n\n// A fake SparseMatrix, which uses an Eigen matrix to do the real work.\nclass FakeSparseMatrix : public SparseMatrix {\n public:\n  FakeSparseMatrix(const Matrix& m) : m_(m) {}\n  virtual ~FakeSparseMatrix() {}\n\n  // y += Ax\n  void RightMultiply(const double* x, double* y) const final {\n    VectorRef(y, m_.cols()) += m_ * ConstVectorRef(x, m_.cols());\n  }\n  // y += A'x\n  void LeftMultiply(const double* x, double* y) const final {\n    // We will assume that this is a symmetric matrix.\n    RightMultiply(x, y);\n  }\n\n  double* mutable_values() final { return m_.data(); }\n  const double* values() const final { return m_.data(); }\n  int num_rows() const final { return m_.cols(); }\n  int num_cols() const final { return m_.cols(); }\n  int num_nonzeros() const final { return m_.cols() * m_.cols(); }\n\n  // The following methods are not needed for tests in this file.\n  void SquaredColumnNorm(double* x) const final DO_NOT_CALL;\n  void ScaleColumns(const double* scale) final DO_NOT_CALL;\n  void SetZero() final DO_NOT_CALL;\n  void ToDenseMatrix(Matrix* dense_matrix) const final DO_NOT_CALL;\n  void ToTextFile(FILE* file) const final DO_NOT_CALL;\n\n private:\n  Matrix m_;\n};\n\n// A fake SparseCholesky which uses Eigen's Cholesky factorization to\n// do the real work. The template parameter allows us to work in\n// doubles or floats, even though the source matrix is double.\ntemplate <typename Scalar>\nclass FakeSparseCholesky : public SparseCholesky {\n public:\n  FakeSparseCholesky(const Matrix& lhs) { lhs_ = lhs.cast<Scalar>(); }\n  virtual ~FakeSparseCholesky() {}\n\n  LinearSolverTerminationType Solve(const double* rhs_ptr,\n                                            double* solution_ptr,\n                                            std::string* message) final {\n    const int num_cols = lhs_.cols();\n    VectorRef solution(solution_ptr, num_cols);\n    ConstVectorRef rhs(rhs_ptr, num_cols);\n    solution = lhs_.llt().solve(rhs.cast<Scalar>()).template cast<double>();\n    return LINEAR_SOLVER_SUCCESS;\n  }\n\n  // The following methods are not needed for tests in this file.\n  CompressedRowSparseMatrix::StorageType StorageType() const final\n      DO_NOT_CALL_WITH_RETURN(CompressedRowSparseMatrix::UPPER_TRIANGULAR);\n  LinearSolverTerminationType Factorize(CompressedRowSparseMatrix* lhs,\n                                                std::string* message) final\n      DO_NOT_CALL_WITH_RETURN(LINEAR_SOLVER_FAILURE);\n\n  LinearSolverTerminationType FactorAndSolve(\n      CompressedRowSparseMatrix* lhs,\n      const double* rhs,\n      double* solution,\n      std::string* message) final DO_NOT_CALL_WITH_RETURN(LINEAR_SOLVER_FAILURE);\n\n private:\n  Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic> lhs_;\n};\n\n#undef DO_NOT_CALL\n#undef DO_NOT_CALL_WITH_RETURN\n\nclass IterativeRefinerTest : public ::testing::Test {\n public:\n  void SetUp() {\n    num_cols_ = 5;\n    max_num_iterations_ = 30;\n    Matrix m(num_cols_, num_cols_);\n    m.setRandom();\n    lhs_ = m * m.transpose();\n    solution_.resize(num_cols_);\n    solution_.setRandom();\n    rhs_ = lhs_ * solution_;\n  };\n\n protected:\n  int num_cols_;\n  int max_num_iterations_;\n  Matrix lhs_;\n  Vector rhs_, solution_;\n};\n\nTEST_F(IterativeRefinerTest, RandomSolutionWithExactFactorizationConverges) {\n  FakeSparseMatrix lhs(lhs_);\n  FakeSparseCholesky<double> sparse_cholesky(lhs_);\n  IterativeRefiner refiner(max_num_iterations_);\n  Vector refined_solution(num_cols_);\n  refined_solution.setRandom();\n  refiner.Refine(lhs, rhs_.data(), &sparse_cholesky, refined_solution.data());\n  EXPECT_NEAR((lhs_ * refined_solution - rhs_).norm(),\n              0.0,\n              std::numeric_limits<double>::epsilon() * 10);\n}\n\nTEST_F(IterativeRefinerTest,\n       RandomSolutionWithApproximationFactorizationConverges) {\n  FakeSparseMatrix lhs(lhs_);\n  // Use a single precision Cholesky factorization of the double\n  // precision matrix. This will give us an approximate factorization.\n  FakeSparseCholesky<float> sparse_cholesky(lhs_);\n  IterativeRefiner refiner(max_num_iterations_);\n  Vector refined_solution(num_cols_);\n  refined_solution.setRandom();\n  refiner.Refine(lhs, rhs_.data(), &sparse_cholesky, refined_solution.data());\n  EXPECT_NEAR((lhs_ * refined_solution - rhs_).norm(),\n              0.0,\n              std::numeric_limits<double>::epsilon() * 10);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/iterative_schur_complement_solver.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/iterative_schur_complement_solver.h\"\n\n#include <algorithm>\n#include <cstring>\n#include <vector>\n\n#include \"Eigen/Dense\"\n#include \"ceres/block_sparse_matrix.h\"\n#include \"ceres/block_structure.h\"\n#include \"ceres/conjugate_gradients_solver.h\"\n#include \"ceres/detect_structure.h\"\n#include \"ceres/implicit_schur_complement.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/linear_solver.h\"\n#include \"ceres/preconditioner.h\"\n#include \"ceres/schur_jacobi_preconditioner.h\"\n#include \"ceres/triplet_sparse_matrix.h\"\n#include \"ceres/types.h\"\n#include \"ceres/visibility_based_preconditioner.h\"\n#include \"ceres/wall_time.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nIterativeSchurComplementSolver::IterativeSchurComplementSolver(\n    const LinearSolver::Options& options)\n    : options_(options) {\n}\n\nIterativeSchurComplementSolver::~IterativeSchurComplementSolver() {}\n\nLinearSolver::Summary IterativeSchurComplementSolver::SolveImpl(\n    BlockSparseMatrix* A,\n    const double* b,\n    const LinearSolver::PerSolveOptions& per_solve_options,\n    double* x) {\n  EventLogger event_logger(\"IterativeSchurComplementSolver::Solve\");\n\n  CHECK(A->block_structure() != nullptr);\n  const int num_eliminate_blocks = options_.elimination_groups[0];\n  // Initialize a ImplicitSchurComplement object.\n  if (schur_complement_ == NULL) {\n    DetectStructure(*(A->block_structure()),\n                    num_eliminate_blocks,\n                    &options_.row_block_size,\n                    &options_.e_block_size,\n                    &options_.f_block_size);\n    schur_complement_.reset(new ImplicitSchurComplement(options_));\n  }\n  schur_complement_->Init(*A, per_solve_options.D, b);\n\n  const int num_schur_complement_blocks =\n      A->block_structure()->cols.size() - num_eliminate_blocks;\n  if (num_schur_complement_blocks == 0) {\n    VLOG(2) << \"No parameter blocks left in the schur complement.\";\n    LinearSolver::Summary summary;\n    summary.num_iterations = 0;\n    summary.termination_type = LINEAR_SOLVER_SUCCESS;\n    schur_complement_->BackSubstitute(NULL, x);\n    return summary;\n  }\n\n  // Initialize the solution to the Schur complement system to zero.\n  reduced_linear_system_solution_.resize(schur_complement_->num_rows());\n  reduced_linear_system_solution_.setZero();\n\n  LinearSolver::Options cg_options;\n  cg_options.min_num_iterations = options_.min_num_iterations;\n  cg_options.max_num_iterations = options_.max_num_iterations;\n  ConjugateGradientsSolver cg_solver(cg_options);\n\n  LinearSolver::PerSolveOptions cg_per_solve_options;\n  cg_per_solve_options.r_tolerance = per_solve_options.r_tolerance;\n  cg_per_solve_options.q_tolerance = per_solve_options.q_tolerance;\n\n  CreatePreconditioner(A);\n  if (preconditioner_.get() != NULL) {\n    if (!preconditioner_->Update(*A, per_solve_options.D)) {\n      LinearSolver::Summary summary;\n      summary.num_iterations = 0;\n      summary.termination_type = LINEAR_SOLVER_FAILURE;\n      summary.message = \"Preconditioner update failed.\";\n      return summary;\n    }\n\n    cg_per_solve_options.preconditioner = preconditioner_.get();\n  }\n\n  event_logger.AddEvent(\"Setup\");\n  LinearSolver::Summary summary =\n      cg_solver.Solve(schur_complement_.get(),\n                      schur_complement_->rhs().data(),\n                      cg_per_solve_options,\n                      reduced_linear_system_solution_.data());\n  if (summary.termination_type != LINEAR_SOLVER_FAILURE &&\n      summary.termination_type != LINEAR_SOLVER_FATAL_ERROR) {\n    schur_complement_->BackSubstitute(reduced_linear_system_solution_.data(),\n                                      x);\n  }\n  event_logger.AddEvent(\"Solve\");\n  return summary;\n}\n\nvoid IterativeSchurComplementSolver::CreatePreconditioner(\n    BlockSparseMatrix* A) {\n  if (options_.preconditioner_type == IDENTITY ||\n      preconditioner_.get() != NULL) {\n    return;\n  }\n\n  Preconditioner::Options preconditioner_options;\n  preconditioner_options.type = options_.preconditioner_type;\n  preconditioner_options.visibility_clustering_type =\n      options_.visibility_clustering_type;\n  preconditioner_options.sparse_linear_algebra_library_type =\n      options_.sparse_linear_algebra_library_type;\n  preconditioner_options.num_threads = options_.num_threads;\n  preconditioner_options.row_block_size = options_.row_block_size;\n  preconditioner_options.e_block_size = options_.e_block_size;\n  preconditioner_options.f_block_size = options_.f_block_size;\n  preconditioner_options.elimination_groups = options_.elimination_groups;\n  CHECK(options_.context != NULL);\n  preconditioner_options.context = options_.context;\n\n  switch (options_.preconditioner_type) {\n    case JACOBI:\n      preconditioner_.reset(new SparseMatrixPreconditionerWrapper(\n          schur_complement_->block_diagonal_FtF_inverse()));\n      break;\n    case SCHUR_JACOBI:\n      preconditioner_.reset(new SchurJacobiPreconditioner(\n          *A->block_structure(), preconditioner_options));\n      break;\n    case CLUSTER_JACOBI:\n    case CLUSTER_TRIDIAGONAL:\n      preconditioner_.reset(new VisibilityBasedPreconditioner(\n          *A->block_structure(), preconditioner_options));\n      break;\n    default:\n      LOG(FATAL) << \"Unknown Preconditioner Type\";\n  }\n};\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/iterative_schur_complement_solver.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_ITERATIVE_SCHUR_COMPLEMENT_SOLVER_H_\n#define CERES_INTERNAL_ITERATIVE_SCHUR_COMPLEMENT_SOLVER_H_\n\n#include <memory>\n#include \"ceres/linear_solver.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/types.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass BlockSparseMatrix;\nclass ImplicitSchurComplement;\nclass Preconditioner;\n\n// This class implements an iterative solver for the linear least\n// squares problems that have a bi-partite sparsity structure common\n// to Structure from Motion problems.\n//\n// The algorithm used by this solver was developed in a series of\n// papers - \"Agarwal et al, Bundle Adjustment in the Large, ECCV 2010\"\n// and \"Wu et al, Multicore Bundle Adjustment, submitted to CVPR\n// 2011\" at the Univeristy of Washington.\n//\n// The key idea is that one can run Conjugate Gradients on the Schur\n// Complement system without explicitly forming the Schur Complement\n// in memory. The heavy lifting for this is done by the\n// ImplicitSchurComplement class. Not forming the Schur complement in\n// memory and factoring it results in substantial savings in time and\n// memory. Further, iterative solvers like this open up the\n// possibility of solving the Newton equations in a non-linear solver\n// only approximately and terminating early, thereby saving even more\n// time.\n//\n// For the curious, running CG on the Schur complement is the same as\n// running CG on the Normal Equations with an SSOR preconditioner. For\n// a proof of this fact and others related to this solver please see\n// the section on Domain Decomposition Methods in Saad's book\n// \"Iterative Methods for Sparse Linear Systems\".\nclass IterativeSchurComplementSolver : public BlockSparseMatrixSolver {\n public:\n  explicit IterativeSchurComplementSolver(const LinearSolver::Options& options);\n  IterativeSchurComplementSolver(const IterativeSchurComplementSolver&) = delete;\n  void operator=(const IterativeSchurComplementSolver&) = delete;\n\n  virtual ~IterativeSchurComplementSolver();\n\n private:\n  LinearSolver::Summary SolveImpl(\n      BlockSparseMatrix* A,\n      const double* b,\n      const LinearSolver::PerSolveOptions& options,\n      double* x) final;\n\n  void CreatePreconditioner(BlockSparseMatrix* A);\n\n  LinearSolver::Options options_;\n  std::unique_ptr<internal::ImplicitSchurComplement> schur_complement_;\n  std::unique_ptr<Preconditioner> preconditioner_;\n  Vector reduced_linear_system_solution_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_ITERATIVE_SCHUR_COMPLEMENT_SOLVER_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/iterative_schur_complement_solver_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// TODO(sameeragarwal): Add support for larger, more complicated and\n// poorly conditioned problems both for correctness testing as well as\n// benchmarking.\n\n#include \"ceres/iterative_schur_complement_solver.h\"\n\n#include <cstddef>\n#include <memory>\n#include \"Eigen/Dense\"\n#include \"ceres/block_random_access_dense_matrix.h\"\n#include \"ceres/block_sparse_matrix.h\"\n#include \"ceres/casts.h\"\n#include \"ceres/context_impl.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/linear_least_squares_problems.h\"\n#include \"ceres/linear_solver.h\"\n#include \"ceres/schur_eliminator.h\"\n#include \"ceres/triplet_sparse_matrix.h\"\n#include \"ceres/types.h\"\n#include \"glog/logging.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing testing::AssertionResult;\n\nconst double kEpsilon = 1e-14;\n\nclass IterativeSchurComplementSolverTest : public ::testing::Test {\n protected :\n  void SetUpProblem(int problem_id) {\n    std::unique_ptr<LinearLeastSquaresProblem> problem(\n        CreateLinearLeastSquaresProblemFromId(problem_id));\n\n    CHECK(problem != nullptr);\n    A_.reset(down_cast<BlockSparseMatrix*>(problem->A.release()));\n    b_.reset(problem->b.release());\n    D_.reset(problem->D.release());\n\n    num_cols_ = A_->num_cols();\n    num_rows_ = A_->num_rows();\n    num_eliminate_blocks_ = problem->num_eliminate_blocks;\n  }\n\n  AssertionResult TestSolver(double* D) {\n    TripletSparseMatrix triplet_A(A_->num_rows(),\n                                  A_->num_cols(),\n                                  A_->num_nonzeros());\n    A_->ToTripletSparseMatrix(&triplet_A);\n\n    DenseSparseMatrix dense_A(triplet_A);\n\n    LinearSolver::Options options;\n    options.type = DENSE_QR;\n    ContextImpl context;\n    options.context = &context;\n    std::unique_ptr<LinearSolver> qr(LinearSolver::Create(options));\n\n    LinearSolver::PerSolveOptions per_solve_options;\n    per_solve_options.D = D;\n    Vector reference_solution(num_cols_);\n    qr->Solve(&dense_A, b_.get(), per_solve_options, reference_solution.data());\n\n    options.elimination_groups.push_back(num_eliminate_blocks_);\n    options.elimination_groups.push_back(0);\n    options.max_num_iterations = num_cols_;\n    options.preconditioner_type = SCHUR_JACOBI;\n    IterativeSchurComplementSolver isc(options);\n\n    Vector isc_sol(num_cols_);\n    per_solve_options.r_tolerance  = 1e-12;\n    isc.Solve(A_.get(), b_.get(), per_solve_options, isc_sol.data());\n    double diff = (isc_sol - reference_solution).norm();\n    if (diff < kEpsilon) {\n      return testing::AssertionSuccess();\n    } else {\n      return testing::AssertionFailure()\n          << \"The reference solution differs from the ITERATIVE_SCHUR\"\n          << \" solution by \" << diff << \" which is more than \" << kEpsilon;\n    }\n  }\n\n  int num_rows_;\n  int num_cols_;\n  int num_eliminate_blocks_;\n  std::unique_ptr<BlockSparseMatrix> A_;\n  std::unique_ptr<double[]> b_;\n  std::unique_ptr<double[]> D_;\n};\n\nTEST_F(IterativeSchurComplementSolverTest, NormalProblem) {\n  SetUpProblem(2);\n  EXPECT_TRUE(TestSolver(NULL));\n  EXPECT_TRUE(TestSolver(D_.get()));\n}\n\nTEST_F(IterativeSchurComplementSolverTest, ProblemWithNoFBlocks) {\n  SetUpProblem(3);\n  EXPECT_TRUE(TestSolver(NULL));\n  EXPECT_TRUE(TestSolver(D_.get()));\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/jet_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n\n#include \"ceres/jet.h\"\n\n#include <Eigen/Dense>\n#include <algorithm>\n#include <cmath>\n\n#include \"ceres/stringprintf.h\"\n#include \"ceres/test_util.h\"\n#include \"glog/logging.h\"\n#include \"gtest/gtest.h\"\n\n#define VL VLOG(1)\n\nnamespace ceres {\nnamespace internal {\n\nnamespace {\n\nconst double kE = 2.71828182845904523536;\n\ntypedef Jet<double, 2> J;\n\n// Convenient shorthand for making a jet.\nJ MakeJet(double a, double v0, double v1) {\n  J z;\n  z.a = a;\n  z.v[0] = v0;\n  z.v[1] = v1;\n  return z;\n}\n\n// On a 32-bit optimized build, the mismatch is about 1.4e-14.\ndouble const kTolerance = 1e-13;\n\nvoid ExpectJetsClose(const J &x, const J &y) {\n  ExpectClose(x.a, y.a, kTolerance);\n  ExpectClose(x.v[0], y.v[0], kTolerance);\n  ExpectClose(x.v[1], y.v[1], kTolerance);\n}\n\nconst double kStep = 1e-8;\nconst double kNumericalTolerance = 1e-6; // Numeric derivation is quite inexact\n\n// Differentiate using Jet and confirm results with numerical derivation.\ntemplate<typename Function>\nvoid NumericalTest(const char* name, const Function& f, const double x) {\n  const double exact_dx = f(MakeJet(x, 1.0, 0.0)).v[0];\n  const double estimated_dx =\n    (f(J(x + kStep)).a - f(J(x - kStep)).a) / (2.0 * kStep);\n  VL << name << \"(\" << x << \"), exact dx: \"\n     << exact_dx << \", estimated dx: \" << estimated_dx;\n  ExpectClose(exact_dx, estimated_dx, kNumericalTolerance);\n}\n\n// Same as NumericalTest, but given a function taking two arguments.\ntemplate<typename Function>\nvoid NumericalTest2(const char* name, const Function& f,\n                    const double x, const double y) {\n  const J exact_delta = f(MakeJet(x, 1.0, 0.0), MakeJet(y, 0.0, 1.0));\n  const double exact_dx = exact_delta.v[0];\n  const double exact_dy = exact_delta.v[1];\n\n  // Sanity check - these should be equivalent:\n  EXPECT_EQ(exact_dx, f(MakeJet(x, 1.0, 0.0), MakeJet(y, 0.0, 0.0)).v[0]);\n  EXPECT_EQ(exact_dx, f(MakeJet(x, 0.0, 1.0), MakeJet(y, 0.0, 0.0)).v[1]);\n  EXPECT_EQ(exact_dy, f(MakeJet(x, 0.0, 0.0), MakeJet(y, 1.0, 0.0)).v[0]);\n  EXPECT_EQ(exact_dy, f(MakeJet(x, 0.0, 0.0), MakeJet(y, 0.0, 1.0)).v[1]);\n\n  const double estimated_dx =\n    (f(J(x + kStep), J(y)).a - f(J(x - kStep), J(y)).a) / (2.0 * kStep);\n  const double estimated_dy =\n    (f(J(x), J(y + kStep)).a - f(J(x), J(y - kStep)).a) / (2.0 * kStep);\n  VL << name << \"(\" << x << \", \" << y << \"), exact dx: \"\n     << exact_dx << \", estimated dx: \" << estimated_dx;\n  ExpectClose(exact_dx, estimated_dx, kNumericalTolerance);\n  VL << name << \"(\" << x << \", \" << y << \"), exact dy: \"\n     << exact_dy << \", estimated dy: \" << estimated_dy;\n  ExpectClose(exact_dy, estimated_dy, kNumericalTolerance);\n}\n\n}  // namespace\n\nTEST(Jet, Jet) {\n  // Pick arbitrary values for x and y.\n  J x = MakeJet(2.3, -2.7, 1e-3);\n  J y = MakeJet(1.7,  0.5, 1e+2);\n\n  VL << \"x = \" << x;\n  VL << \"y = \" << y;\n\n  { // Check that log(exp(x)) == x.\n    J z = exp(x);\n    J w = log(z);\n    VL << \"z = \" << z;\n    VL << \"w = \" << w;\n    ExpectJetsClose(w, x);\n  }\n\n  { // Check that (x * y) / x == y.\n    J z = x * y;\n    J w = z / x;\n    VL << \"z = \" << z;\n    VL << \"w = \" << w;\n    ExpectJetsClose(w, y);\n  }\n\n  { // Check that sqrt(x * x) == x.\n    J z = x * x;\n    J w = sqrt(z);\n    VL << \"z = \" << z;\n    VL << \"w = \" << w;\n    ExpectJetsClose(w, x);\n  }\n\n  { // Check that sqrt(y) * sqrt(y) == y.\n    J z = sqrt(y);\n    J w = z * z;\n    VL << \"z = \" << z;\n    VL << \"w = \" << w;\n    ExpectJetsClose(w, y);\n  }\n\n  NumericalTest(\"sqrt\", sqrt<double, 2>, 0.00001);\n  NumericalTest(\"sqrt\", sqrt<double, 2>, 1.0);\n\n  { // Check that cos(2*x) = cos(x)^2 - sin(x)^2\n    J z = cos(J(2.0) * x);\n    J w = cos(x)*cos(x) - sin(x)*sin(x);\n    VL << \"z = \" << z;\n    VL << \"w = \" << w;\n    ExpectJetsClose(w, z);\n  }\n\n  { // Check that sin(2*x) = 2*cos(x)*sin(x)\n    J z = sin(J(2.0) * x);\n    J w = J(2.0)*cos(x)*sin(x);\n    VL << \"z = \" << z;\n    VL << \"w = \" << w;\n    ExpectJetsClose(w, z);\n  }\n\n  { // Check that cos(x)*cos(x) + sin(x)*sin(x) = 1\n    J z = cos(x) * cos(x);\n    J w = sin(x) * sin(x);\n    VL << \"z = \" << z;\n    VL << \"w = \" << w;\n    ExpectJetsClose(z + w, J(1.0));\n  }\n\n  { // Check that atan2(r*sin(t), r*cos(t)) = t.\n    J t = MakeJet(0.7, -0.3, +1.5);\n    J r = MakeJet(2.3, 0.13, -2.4);\n    VL << \"t = \" << t;\n    VL << \"r = \" << r;\n\n    J u = atan2(r * sin(t), r * cos(t));\n    VL << \"u = \" << u;\n\n    ExpectJetsClose(u, t);\n  }\n\n  { // Check that tan(x) = sin(x) / cos(x).\n    J z = tan(x);\n    J w = sin(x) / cos(x);\n    VL << \"z = \" << z;\n    VL << \"w = \" << w;\n    ExpectJetsClose(z, w);\n  }\n\n  { // Check that tan(atan(x)) = x.\n    J z = tan(atan(x));\n    J w = x;\n    VL << \"z = \" << z;\n    VL << \"w = \" << w;\n    ExpectJetsClose(z, w);\n  }\n\n  { // Check that cosh(x)*cosh(x) - sinh(x)*sinh(x) = 1\n    J z = cosh(x) * cosh(x);\n    J w = sinh(x) * sinh(x);\n    VL << \"z = \" << z;\n    VL << \"w = \" << w;\n    ExpectJetsClose(z - w, J(1.0));\n  }\n\n  { // Check that tanh(x + y) = (tanh(x) + tanh(y)) / (1 + tanh(x) tanh(y))\n    J z = tanh(x + y);\n    J w = (tanh(x) + tanh(y)) / (J(1.0) + tanh(x) * tanh(y));\n    VL << \"z = \" << z;\n    VL << \"w = \" << w;\n    ExpectJetsClose(z, w);\n  }\n\n  { // Check that pow(x, 1) == x.\n    VL << \"x = \" << x;\n\n    J u = pow(x, 1.);\n    VL << \"u = \" << u;\n\n    ExpectJetsClose(x, u);\n  }\n\n  { // Check that pow(x, 1) == x.\n    J y = MakeJet(1, 0.0, 0.0);\n    VL << \"x = \" << x;\n    VL << \"y = \" << y;\n\n    J u = pow(x, y);\n    VL << \"u = \" << u;\n\n    ExpectJetsClose(x, u);\n  }\n\n  { // Check that pow(e, log(x)) == x.\n    J logx = log(x);\n\n    VL << \"x = \" << x;\n    VL << \"y = \" << y;\n\n    J u = pow(kE, logx);\n    VL << \"u = \" << u;\n\n    ExpectJetsClose(x, u);\n  }\n\n  { // Check that pow(e, log(x)) == x.\n    J logx = log(x);\n    J e = MakeJet(kE, 0., 0.);\n    VL << \"x = \" << x;\n    VL << \"log(x) = \" << logx;\n\n    J u = pow(e, logx);\n    VL << \"u = \" << u;\n\n    ExpectJetsClose(x, u);\n  }\n\n  { // Check that pow(e, log(x)) == x.\n    J logx = log(x);\n    J e = MakeJet(kE, 0., 0.);\n    VL << \"x = \" << x;\n    VL << \"logx = \" << logx;\n\n    J u = pow(e, logx);\n    VL << \"u = \" << u;\n\n    ExpectJetsClose(x, u);\n  }\n\n  { // Check that pow(x,y) = exp(y*log(x)).\n    J logx = log(x);\n    J e = MakeJet(kE, 0., 0.);\n    VL << \"x = \" << x;\n    VL << \"logx = \" << logx;\n\n    J u = pow(e, y*logx);\n    J v = pow(x, y);\n    VL << \"u = \" << u;\n    VL << \"v = \" << v;\n\n    ExpectJetsClose(v, u);\n  }\n\n  { // Check that pow(0, y) == 0 for y > 1, with both arguments Jets.\n    // This tests special case handling inside pow().\n    J a = MakeJet(0, 1, 2);\n    J b = MakeJet(2, 3, 4);\n    VL << \"a = \" << a;\n    VL << \"b = \" << b;\n\n    J c = pow(a, b);\n    VL << \"a^b = \" << c;\n    ExpectJetsClose(c, MakeJet(0, 0, 0));\n  }\n\n  { // Check that pow(0, y) == 0 for y == 1, with both arguments Jets.\n    // This tests special case handling inside pow().\n    J a = MakeJet(0, 1, 2);\n    J b = MakeJet(1, 3, 4);\n    VL << \"a = \" << a;\n    VL << \"b = \" << b;\n\n    J c = pow(a, b);\n    VL << \"a^b = \" << c;\n    ExpectJetsClose(c, MakeJet(0, 1, 2));\n  }\n\n  { // Check that pow(0, <1) is not finite, with both arguments Jets.\n    for (int i = 1; i < 10; i++) {\n      J a = MakeJet(0, 1, 2);\n      J b = MakeJet(i*0.1, 3, 4);       // b = 0.1 ... 0.9\n      VL << \"a = \" << a;\n      VL << \"b = \" << b;\n\n      J c = pow(a, b);\n      VL << \"a^b = \" << c;\n      EXPECT_EQ(c.a, 0.0);\n      EXPECT_FALSE(IsFinite(c.v[0]));\n      EXPECT_FALSE(IsFinite(c.v[1]));\n    }\n    for (int i = -10; i < 0; i++) {\n      J a = MakeJet(0, 1, 2);\n      J b = MakeJet(i*0.1, 3, 4);       // b = -1,-0.9 ... -0.1\n      VL << \"a = \" << a;\n      VL << \"b = \" << b;\n\n      J c = pow(a, b);\n      VL << \"a^b = \" << c;\n      EXPECT_FALSE(IsFinite(c.a));\n      EXPECT_FALSE(IsFinite(c.v[0]));\n      EXPECT_FALSE(IsFinite(c.v[1]));\n    }\n\n    {\n      // The special case of 0^0 = 1 defined by the C standard.\n      J a = MakeJet(0, 1, 2);\n      J b = MakeJet(0, 3, 4);\n      VL << \"a = \" << a;\n      VL << \"b = \" << b;\n\n      J c = pow(a, b);\n      VL << \"a^b = \" << c;\n      EXPECT_EQ(c.a, 1.0);\n      EXPECT_FALSE(IsFinite(c.v[0]));\n      EXPECT_FALSE(IsFinite(c.v[1]));\n    }\n  }\n\n  { // Check that pow(<0, b) is correct for integer b.\n    // This tests special case handling inside pow().\n    J a = MakeJet(-1.5, 3, 4);\n\n    // b integer:\n    for (int i = -10; i <= 10; i++) {\n      J b = MakeJet(i, 0, 5);\n      VL << \"a = \" << a;\n      VL << \"b = \" << b;\n\n      J c = pow(a, b);\n      VL << \"a^b = \" << c;\n      ExpectClose(c.a, pow(-1.5, i), kTolerance);\n      EXPECT_TRUE(IsFinite(c.v[0]));\n      EXPECT_FALSE(IsFinite(c.v[1]));\n      ExpectClose(c.v[0], i * pow(-1.5, i - 1) * 3.0, kTolerance);\n    }\n  }\n\n  { // Check that pow(<0, b) is correct for noninteger b.\n    // This tests special case handling inside pow().\n    J a = MakeJet(-1.5, 3, 4);\n    J b = MakeJet(-2.5, 0, 5);\n    VL << \"a = \" << a;\n    VL << \"b = \" << b;\n\n    J c = pow(a, b);\n    VL << \"a^b = \" << c;\n    EXPECT_FALSE(IsFinite(c.a));\n    EXPECT_FALSE(IsFinite(c.v[0]));\n    EXPECT_FALSE(IsFinite(c.v[1]));\n  }\n\n  {\n    // Check that pow(0,y) == 0 for y == 2, with the second argument a\n    // Jet.  This tests special case handling inside pow().\n    double a = 0;\n    J b = MakeJet(2, 3, 4);\n    VL << \"a = \" << a;\n    VL << \"b = \" << b;\n\n    J c = pow(a, b);\n    VL << \"a^b = \" << c;\n    ExpectJetsClose(c, MakeJet(0, 0, 0));\n  }\n\n  {\n    // Check that pow(<0,y) is correct for integer y. This tests special case\n    // handling inside pow().\n    double a = -1.5;\n    for (int i = -10; i <= 10; i++) {\n      J b = MakeJet(i, 3, 0);\n      VL << \"a = \" << a;\n      VL << \"b = \" << b;\n\n      J c = pow(a, b);\n      VL << \"a^b = \" << c;\n      ExpectClose(c.a, pow(-1.5, i), kTolerance);\n      EXPECT_FALSE(IsFinite(c.v[0]));\n      EXPECT_TRUE(IsFinite(c.v[1]));\n      ExpectClose(c.v[1], 0, kTolerance);\n    }\n  }\n\n  {\n    // Check that pow(<0,y) is correct for noninteger y. This tests special\n    // case handling inside pow().\n    double a = -1.5;\n    J b = MakeJet(-3.14, 3, 0);\n    VL << \"a = \" << a;\n    VL << \"b = \" << b;\n\n    J c = pow(a, b);\n    VL << \"a^b = \" << c;\n    EXPECT_FALSE(IsFinite(c.a));\n    EXPECT_FALSE(IsFinite(c.v[0]));\n    EXPECT_FALSE(IsFinite(c.v[1]));\n  }\n\n  { // Check that 1 + x == x + 1.\n    J a = x + 1.0;\n    J b = 1.0 + x;\n    J c = x;\n    c += 1.0;\n\n    ExpectJetsClose(a, b);\n    ExpectJetsClose(a, c);\n  }\n\n  { // Check that 1 - x == -(x - 1).\n    J a = 1.0 - x;\n    J b = -(x - 1.0);\n    J c = x;\n    c -= 1.0;\n\n    ExpectJetsClose(a, b);\n    ExpectJetsClose(a, -c);\n  }\n\n  { // Check that (x/s)*s == (x*s)/s.\n    J a = x / 5.0;\n    J b = x * 5.0;\n    J c = x;\n    c /= 5.0;\n    J d = x;\n    d *= 5.0;\n\n    ExpectJetsClose(5.0 * a, b / 5.0);\n    ExpectJetsClose(a, c);\n    ExpectJetsClose(b, d);\n  }\n\n  { // Check that x / y == 1 / (y / x).\n    J a = x / y;\n    J b = 1.0 / (y / x);\n    VL << \"a = \" << a;\n    VL << \"b = \" << b;\n\n    ExpectJetsClose(a, b);\n  }\n\n  { // Check that abs(-x * x) == sqrt(x * x).\n    ExpectJetsClose(abs(-x), sqrt(x * x));\n  }\n\n  { // Check that cos(acos(x)) == x.\n    J a = MakeJet(0.1, -2.7, 1e-3);\n    ExpectJetsClose(cos(acos(a)), a);\n    ExpectJetsClose(acos(cos(a)), a);\n\n    J b = MakeJet(0.6,  0.5, 1e+2);\n    ExpectJetsClose(cos(acos(b)), b);\n    ExpectJetsClose(acos(cos(b)), b);\n  }\n\n  { // Check that sin(asin(x)) == x.\n    J a = MakeJet(0.1, -2.7, 1e-3);\n    ExpectJetsClose(sin(asin(a)), a);\n    ExpectJetsClose(asin(sin(a)), a);\n\n    J b = MakeJet(0.4,  0.5, 1e+2);\n    ExpectJetsClose(sin(asin(b)), b);\n    ExpectJetsClose(asin(sin(b)), b);\n  }\n\n  {\n    J zero = J(0.0);\n\n    // Check that J0(0) == 1.\n    ExpectJetsClose(BesselJ0(zero), J(1.0));\n\n    // Check that J1(0) == 0.\n    ExpectJetsClose(BesselJ1(zero), zero);\n\n    // Check that J2(0) == 0.\n    ExpectJetsClose(BesselJn(2, zero), zero);\n\n    // Check that J3(0) == 0.\n    ExpectJetsClose(BesselJn(3, zero), zero);\n\n    J z = MakeJet(0.1, -2.7, 1e-3);\n\n    // Check that J0(z) == Jn(0,z).\n    ExpectJetsClose(BesselJ0(z), BesselJn(0, z));\n\n    // Check that J1(z) == Jn(1,z).\n    ExpectJetsClose(BesselJ1(z), BesselJn(1, z));\n\n    // Check that J0(z)+J2(z) == (2/z)*J1(z).\n    // See formula http://dlmf.nist.gov/10.6.E1\n    ExpectJetsClose(BesselJ0(z) + BesselJn(2, z), (2.0 / z) * BesselJ1(z));\n  }\n\n  { // Check that floor of a positive number works.\n    J a = MakeJet(0.1, -2.7, 1e-3);\n    J b = floor(a);\n    J expected = MakeJet(floor(a.a), 0.0, 0.0);\n    EXPECT_EQ(expected, b);\n  }\n\n  { // Check that floor of a negative number works.\n    J a = MakeJet(-1.1, -2.7, 1e-3);\n    J b = floor(a);\n    J expected = MakeJet(floor(a.a), 0.0, 0.0);\n    EXPECT_EQ(expected, b);\n  }\n\n  { // Check that floor of a positive number works.\n    J a = MakeJet(10.123, -2.7, 1e-3);\n    J b = floor(a);\n    J expected = MakeJet(floor(a.a), 0.0, 0.0);\n    EXPECT_EQ(expected, b);\n  }\n\n  { // Check that ceil of a positive number works.\n    J a = MakeJet(0.1, -2.7, 1e-3);\n    J b = ceil(a);\n    J expected = MakeJet(ceil(a.a), 0.0, 0.0);\n    EXPECT_EQ(expected, b);\n  }\n\n  { // Check that ceil of a negative number works.\n    J a = MakeJet(-1.1, -2.7, 1e-3);\n    J b = ceil(a);\n    J expected = MakeJet(ceil(a.a), 0.0, 0.0);\n    EXPECT_EQ(expected, b);\n  }\n\n  { // Check that ceil of a positive number works.\n    J a = MakeJet(10.123, -2.7, 1e-3);\n    J b = ceil(a);\n    J expected = MakeJet(ceil(a.a), 0.0, 0.0);\n    EXPECT_EQ(expected, b);\n  }\n\n  { // Check that cbrt(x * x * x) == x.\n    J z = x * x * x;\n    J w = cbrt(z);\n    VL << \"z = \" << z;\n    VL << \"w = \" << w;\n    ExpectJetsClose(w, x);\n  }\n\n#if EIGEN_VERSION_AT_LEAST(3, 3, 0)\n  { // Check that cbrt(y) * cbrt(y) * cbrt(y) == y.\n    J z = cbrt(y);\n    J w = z * z * z;\n    VL << \"z = \" << z;\n    VL << \"w = \" << w;\n    ExpectJetsClose(w, y);\n  }\n\n  { // Check that cbrt(x) == pow(x, 1/3).\n    J z = cbrt(x);\n    J w = pow(x, 1.0 / 3.0);\n    VL << \"z = \" << z;\n    VL << \"w = \" << w;\n    ExpectJetsClose(z, w);\n  }\n  NumericalTest(\"cbrt\", cbrt<double, 2>, -1.0);\n  NumericalTest(\"cbrt\", cbrt<double, 2>, -1e-5);\n  NumericalTest(\"cbrt\", cbrt<double, 2>, 1e-5);\n  NumericalTest(\"cbrt\", cbrt<double, 2>, 1.0);\n\n  { // Check that exp2(x) == exp(x * log(2))\n    J z = exp2(x);\n    J w = exp(x * log(2.0));\n    VL << \"z = \" << z;\n    VL << \"w = \" << w;\n    ExpectJetsClose(z, w);\n  }\n  NumericalTest(\"exp2\", exp2<double, 2>, -1.0);\n  NumericalTest(\"exp2\", exp2<double, 2>, -1e-5);\n  NumericalTest(\"exp2\", exp2<double, 2>, -1e-200);\n  NumericalTest(\"exp2\", exp2<double, 2>, 0.0);\n  NumericalTest(\"exp2\", exp2<double, 2>, 1e-200);\n  NumericalTest(\"exp2\", exp2<double, 2>, 1e-5);\n  NumericalTest(\"exp2\", exp2<double, 2>, 1.0);\n\n  { // Check that log2(x) == log(x) / log(2)\n    J z = log2(x);\n    J w = log(x) / log(2.0);\n    VL << \"z = \" << z;\n    VL << \"w = \" << w;\n    ExpectJetsClose(z, w);\n  }\n  NumericalTest(\"log2\", log2<double, 2>, 1e-5);\n  NumericalTest(\"log2\", log2<double, 2>, 1.0);\n  NumericalTest(\"log2\", log2<double, 2>, 100.0);\n\n  { // Check that hypot(x, y) == sqrt(x^2 + y^2)\n    J h = hypot(x, y);\n    J s = sqrt(x*x + y*y);\n    VL << \"h = \" << h;\n    VL << \"s = \" << s;\n    ExpectJetsClose(h, s);\n  }\n\n  { // Check that hypot(x, x) == sqrt(2) * abs(x)\n    J h = hypot(x, x);\n    J s = sqrt(2.0) * abs(x);\n    VL << \"h = \" << h;\n    VL << \"s = \" << s;\n    ExpectJetsClose(h, s);\n  }\n\n  { // Check that the derivative is zero tangentially to the circle:\n    J h = hypot(MakeJet(2.0, 1.0, 1.0), MakeJet(2.0, 1.0, -1.0));\n    VL << \"h = \" << h;\n    ExpectJetsClose(h, MakeJet(sqrt(8.0), std::sqrt(2.0), 0.0));\n  }\n\n  { // Check that hypot(x, 0) == x\n    J zero = MakeJet(0.0, 2.0, 3.14);\n    J h = hypot(x, zero);\n    VL << \"h = \" << h;\n    ExpectJetsClose(x, h);\n  }\n\n  { // Check that hypot(0, y) == y\n    J zero = MakeJet(0.0, 2.0, 3.14);\n    J h = hypot(zero, y);\n    VL << \"h = \" << h;\n    ExpectJetsClose(y, h);\n  }\n\n  { // Check that hypot(x, 0) == sqrt(x * x) == x, even when x * x underflows:\n    EXPECT_EQ(DBL_MIN * DBL_MIN, 0.0); // Make sure it underflows\n    J huge = MakeJet(DBL_MIN, 2.0, 3.14);\n    J h = hypot(huge, J(0.0));\n    VL << \"h = \" << h;\n    ExpectJetsClose(h, huge);\n  }\n\n  { // Check that hypot(x, 0) == sqrt(x * x) == x, even when x * x overflows:\n    EXPECT_EQ(DBL_MAX * DBL_MAX, std::numeric_limits<double>::infinity());\n    J huge = MakeJet(DBL_MAX, 2.0, 3.14);\n    J h = hypot(huge, J(0.0));\n    VL << \"h = \" << h;\n    ExpectJetsClose(h, huge);\n  }\n\n  NumericalTest2(\"hypot\", hypot<double, 2>,  0.0,   1e-5);\n  NumericalTest2(\"hypot\", hypot<double, 2>, -1e-5,  0.0);\n  NumericalTest2(\"hypot\", hypot<double, 2>,  1e-5,  1e-5);\n  NumericalTest2(\"hypot\", hypot<double, 2>,  0.0,   1.0);\n  NumericalTest2(\"hypot\", hypot<double, 2>,  1e-3,  1.0);\n  NumericalTest2(\"hypot\", hypot<double, 2>,  1e-3, -1.0);\n  NumericalTest2(\"hypot\", hypot<double, 2>, -1e-3,  1.0);\n  NumericalTest2(\"hypot\", hypot<double, 2>, -1e-3, -1.0);\n  NumericalTest2(\"hypot\", hypot<double, 2>,  1.0,   2.0);\n\n  {\n    J z = fmax(x, y);\n    VL << \"z = \" << z;\n    ExpectJetsClose(x, z);\n  }\n\n  {\n    J z = fmin(x, y);\n    VL << \"z = \" << z;\n    ExpectJetsClose(y, z);\n  }\n\n}\n\nTEST(Jet, JetsInEigenMatrices) {\n  J x = MakeJet(2.3, -2.7, 1e-3);\n  J y = MakeJet(1.7,  0.5, 1e+2);\n  J z = MakeJet(5.3, -4.7, 1e-3);\n  J w = MakeJet(9.7,  1.5, 10.1);\n\n  Eigen::Matrix<J, 2, 2> M;\n  Eigen::Matrix<J, 2, 1> v, r1, r2;\n\n  M << x, y, z, w;\n  v << x, z;\n\n  // Check that M * v == (v^T * M^T)^T\n  r1 = M * v;\n  r2 = (v.transpose() * M.transpose()).transpose();\n\n  ExpectJetsClose(r1(0), r2(0));\n  ExpectJetsClose(r1(1), r2(1));\n}\n\nTEST(JetTraitsTest, ClassificationMixed) {\n  Jet<double, 3> a(5.5, 0);\n  a.v[0] = std::numeric_limits<double>::quiet_NaN();\n  a.v[1] = std::numeric_limits<double>::infinity();\n  a.v[2] = -std::numeric_limits<double>::infinity();\n  EXPECT_FALSE(IsFinite(a));\n  EXPECT_FALSE(IsNormal(a));\n  EXPECT_TRUE(IsInfinite(a));\n  EXPECT_TRUE(IsNaN(a));\n}\n\nTEST(JetTraitsTest, ClassificationNaN) {\n  Jet<double, 3> a(5.5, 0);\n  a.v[0] = std::numeric_limits<double>::quiet_NaN();\n  a.v[1] = 0.0;\n  a.v[2] = 0.0;\n  EXPECT_FALSE(IsFinite(a));\n  EXPECT_FALSE(IsNormal(a));\n  EXPECT_FALSE(IsInfinite(a));\n  EXPECT_TRUE(IsNaN(a));\n}\n\nTEST(JetTraitsTest, ClassificationInf) {\n  Jet<double, 3> a(5.5, 0);\n  a.v[0] = std::numeric_limits<double>::infinity();\n  a.v[1] = 0.0;\n  a.v[2] = 0.0;\n  EXPECT_FALSE(IsFinite(a));\n  EXPECT_FALSE(IsNormal(a));\n  EXPECT_TRUE(IsInfinite(a));\n  EXPECT_FALSE(IsNaN(a));\n}\n\nTEST(JetTraitsTest, ClassificationFinite) {\n  Jet<double, 3> a(5.5, 0);\n  a.v[0] = 100.0;\n  a.v[1] = 1.0;\n  a.v[2] = 3.14159;\n  EXPECT_TRUE(IsFinite(a));\n  EXPECT_TRUE(IsNormal(a));\n  EXPECT_FALSE(IsInfinite(a));\n  EXPECT_FALSE(IsNaN(a));\n}\n\n// The following test ensures that Jets have all the appropriate Eigen\n// related traits so that they can be used as part of matrix\n// decompositions.\nTEST(Jet, FullRankEigenLLTSolve) {\n  Eigen::Matrix<J, 3, 3> A;\n  Eigen::Matrix<J, 3, 1> b, x;\n  for (int i = 0; i < 3; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      A(i,j) = MakeJet(0.0, i, j * j);\n    }\n    b(i) = MakeJet(i, i, i);\n    x(i) = MakeJet(0.0, 0.0, 0.0);\n    A(i,i) = MakeJet(1.0, i, i * i);\n  }\n  x = A.llt().solve(b);\n  for (int i = 0; i < 3; ++i) {\n    EXPECT_EQ(x(i).a, b(i).a);\n  }\n}\n\nTEST(Jet, FullRankEigenLDLTSolve) {\n  Eigen::Matrix<J, 3, 3> A;\n  Eigen::Matrix<J, 3, 1> b, x;\n  for (int i = 0; i < 3; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      A(i,j) = MakeJet(0.0, i, j * j);\n    }\n    b(i) = MakeJet(i, i, i);\n    x(i) = MakeJet(0.0, 0.0, 0.0);\n    A(i,i) = MakeJet(1.0, i, i * i);\n  }\n  x = A.ldlt().solve(b);\n  for (int i = 0; i < 3; ++i) {\n    EXPECT_EQ(x(i).a, b(i).a);\n  }\n}\n\nTEST(Jet, FullRankEigenLUSolve) {\n  Eigen::Matrix<J, 3, 3> A;\n  Eigen::Matrix<J, 3, 1> b, x;\n  for (int i = 0; i < 3; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      A(i,j) = MakeJet(0.0, i, j * j);\n    }\n    b(i) = MakeJet(i, i, i);\n    x(i) = MakeJet(0.0, 0.0, 0.0);\n    A(i,i) = MakeJet(1.0, i, i * i);\n  }\n\n  x = A.lu().solve(b);\n  for (int i = 0; i < 3; ++i) {\n    EXPECT_EQ(x(i).a, b(i).a);\n  }\n}\n\n// ScalarBinaryOpTraits is only supported on Eigen versions >= 3.3\nTEST(JetTraitsTest, MatrixScalarUnaryOps) {\n  const J x = MakeJet(2.3, -2.7, 1e-3);\n  const J y = MakeJet(1.7,  0.5, 1e+2);\n  Eigen::Matrix<J, 2, 1> a;\n  a << x, y;\n\n  const J sum = a.sum();\n  const J sum2 = a(0) + a(1);\n  ExpectJetsClose(sum, sum2);\n}\n\nTEST(JetTraitsTest, MatrixScalarBinaryOps) {\n  const J x = MakeJet(2.3, -2.7, 1e-3);\n  const J y = MakeJet(1.7,  0.5, 1e+2);\n  const J z = MakeJet(5.3, -4.7, 1e-3);\n  const J w = MakeJet(9.7,  1.5, 10.1);\n\n  Eigen::Matrix<J, 2, 2> M;\n  Eigen::Vector2d v;\n\n  M << x, y, z, w;\n  v << 0.6, -2.1;\n\n  // Check that M * v == M * v.cast<J>().\n  const Eigen::Matrix<J, 2, 1> r1 = M * v;\n  const Eigen::Matrix<J, 2, 1> r2 = M * v.cast<J>();\n\n  ExpectJetsClose(r1(0), r2(0));\n  ExpectJetsClose(r1(1), r2(1));\n\n  // Check that M * a == M * T(a).\n  const double a = 3.1;\n  const Eigen::Matrix<J, 2, 2> r3 = M * a;\n  const Eigen::Matrix<J, 2, 2> r4 = M * J(a);\n\n  ExpectJetsClose(r3(0, 0), r4(0, 0));\n  ExpectJetsClose(r3(1, 0), r4(1, 0));\n  ExpectJetsClose(r3(0, 1), r4(0, 1));\n  ExpectJetsClose(r3(1, 1), r4(1, 1));\n}\n\nTEST(JetTraitsTest, ArrayScalarUnaryOps) {\n  const J x = MakeJet(2.3, -2.7, 1e-3);\n  const J y = MakeJet(1.7,  0.5, 1e+2);\n  Eigen::Array<J, 2, 1> a;\n  a << x, y;\n\n  const J sum = a.sum();\n  const J sum2 = a(0) + a(1);\n  ExpectJetsClose(sum, sum2);\n}\n\nTEST(JetTraitsTest, ArrayScalarBinaryOps) {\n  const J x = MakeJet(2.3, -2.7, 1e-3);\n  const J y = MakeJet(1.7,  0.5, 1e+2);\n\n  Eigen::Array<J, 2, 1> a;\n  Eigen::Array2d b;\n\n  a << x, y;\n  b << 0.6, -2.1;\n\n  // Check that a * b == a * b.cast<T>()\n  const Eigen::Array<J, 2, 1> r1 = a * b;\n  const Eigen::Array<J, 2, 1> r2 = a * b.cast<J>();\n\n  ExpectJetsClose(r1(0), r2(0));\n  ExpectJetsClose(r1(1), r2(1));\n\n  // Check that a * c == a * T(c).\n  const double c = 3.1;\n  const Eigen::Array<J, 2, 1> r3 = a * c;\n  const Eigen::Array<J, 2, 1> r4 = a * J(c);\n\n  ExpectJetsClose(r3(0), r3(0));\n  ExpectJetsClose(r4(1), r4(1));\n}\n\nTEST(Jet, nested3x) {\n  typedef Jet<J,2> JJ;\n  typedef Jet<JJ,2> JJJ;\n\n  JJJ x;\n  x.a = JJ(J(1, 0), 0);\n  x.v[0] = JJ(J(1));\n\n  JJJ y = x * x * x;\n\n  ExpectClose(y.a.a.a, 1, kTolerance);\n  ExpectClose(y.v[0].a.a, 3., kTolerance);\n  ExpectClose(y.v[0].v[0].a, 6., kTolerance);\n  ExpectClose(y.v[0].v[0].v[0], 6., kTolerance);\n\n  JJJ e = exp(x);\n\n  ExpectClose(e.a.a.a, kE, kTolerance);\n  ExpectClose(e.v[0].a.a, kE, kTolerance);\n  ExpectClose(e.v[0].v[0].a, kE, kTolerance);\n  ExpectClose(e.v[0].v[0].v[0], kE, kTolerance);\n}\n\n#endif\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/lapack.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/lapack.h\"\n\n#include \"ceres/internal/port.h\"\n#include \"ceres/linear_solver.h\"\n#include \"glog/logging.h\"\n\n#ifndef CERES_NO_LAPACK\n// C interface to the LAPACK Cholesky factorization and triangular solve.\nextern \"C\" void dpotrf_(char* uplo,\n                       int* n,\n                       double* a,\n                       int* lda,\n                       int* info);\n\nextern \"C\" void dpotrs_(char* uplo,\n                        int* n,\n                        int* nrhs,\n                        double* a,\n                        int* lda,\n                        double* b,\n                        int* ldb,\n                        int* info);\n\nextern \"C\" void dgels_(char* uplo,\n                       int* m,\n                       int* n,\n                       int* nrhs,\n                       double* a,\n                       int* lda,\n                       double* b,\n                       int* ldb,\n                       double* work,\n                       int* lwork,\n                       int* info);\n#endif\n\nnamespace ceres {\nnamespace internal {\n\nLinearSolverTerminationType LAPACK::SolveInPlaceUsingCholesky(\n    int num_rows,\n    const double* in_lhs,\n    double* rhs_and_solution,\n    std::string* message) {\n#ifdef CERES_NO_LAPACK\n  LOG(FATAL) << \"Ceres was built without a BLAS library.\";\n  return LINEAR_SOLVER_FATAL_ERROR;\n#else\n  char uplo = 'L';\n  int n = num_rows;\n  int info = 0;\n  int nrhs = 1;\n  double* lhs = const_cast<double*>(in_lhs);\n\n  dpotrf_(&uplo, &n, lhs, &n, &info);\n  if (info < 0) {\n    LOG(FATAL) << \"Congratulations, you found a bug in Ceres.\"\n               << \"Please report it.\"\n               << \"LAPACK::dpotrf fatal error.\"\n               << \"Argument: \" << -info << \" is invalid.\";\n    return LINEAR_SOLVER_FATAL_ERROR;\n  }\n\n  if (info > 0) {\n    *message =\n        StringPrintf(\n            \"LAPACK::dpotrf numerical failure. \"\n             \"The leading minor of order %d is not positive definite.\", info);\n    return LINEAR_SOLVER_FAILURE;\n  }\n\n  dpotrs_(&uplo, &n, &nrhs, lhs, &n, rhs_and_solution, &n, &info);\n  if (info < 0) {\n    LOG(FATAL) << \"Congratulations, you found a bug in Ceres.\"\n               << \"Please report it.\"\n               << \"LAPACK::dpotrs fatal error.\"\n               << \"Argument: \" << -info << \" is invalid.\";\n    return LINEAR_SOLVER_FATAL_ERROR;\n  }\n\n  *message = \"Success\";\n  return LINEAR_SOLVER_SUCCESS;\n#endif\n}\n\nint LAPACK::EstimateWorkSizeForQR(int num_rows, int num_cols) {\n#ifdef CERES_NO_LAPACK\n  LOG(FATAL) << \"Ceres was built without a LAPACK library.\";\n  return -1;\n#else\n  char trans = 'N';\n  int nrhs = 1;\n  int lwork = -1;\n  double work;\n  int info = 0;\n  dgels_(&trans,\n         &num_rows,\n         &num_cols,\n         &nrhs,\n         NULL,\n         &num_rows,\n         NULL,\n         &num_rows,\n         &work,\n         &lwork,\n         &info);\n\n  if (info < 0) {\n    LOG(FATAL) << \"Congratulations, you found a bug in Ceres.\"\n               << \"Please report it.\"\n               << \"LAPACK::dgels fatal error.\"\n               << \"Argument: \" << -info << \" is invalid.\";\n  }\n  return static_cast<int>(work);\n#endif\n}\n\nLinearSolverTerminationType LAPACK::SolveInPlaceUsingQR(\n    int num_rows,\n    int num_cols,\n    const double* in_lhs,\n    int work_size,\n    double* work,\n    double* rhs_and_solution,\n    std::string* message) {\n#ifdef CERES_NO_LAPACK\n  LOG(FATAL) << \"Ceres was built without a LAPACK library.\";\n  return LINEAR_SOLVER_FATAL_ERROR;\n#else\n  char trans = 'N';\n  int m = num_rows;\n  int n = num_cols;\n  int nrhs = 1;\n  int lda = num_rows;\n  int ldb = num_rows;\n  int info = 0;\n  double* lhs = const_cast<double*>(in_lhs);\n\n  dgels_(&trans,\n         &m,\n         &n,\n         &nrhs,\n         lhs,\n         &lda,\n         rhs_and_solution,\n         &ldb,\n         work,\n         &work_size,\n         &info);\n\n  if (info < 0) {\n    LOG(FATAL) << \"Congratulations, you found a bug in Ceres.\"\n               << \"Please report it.\"\n               << \"LAPACK::dgels fatal error.\"\n               << \"Argument: \" << -info << \" is invalid.\";\n  }\n\n  *message = \"Success.\";\n  return LINEAR_SOLVER_SUCCESS;\n#endif\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/lapack.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_LAPACK_H_\n#define CERES_INTERNAL_LAPACK_H_\n\n#include <string>\n#include \"ceres/internal/port.h\"\n#include \"ceres/linear_solver.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass LAPACK {\n public:\n  // Solve\n  //\n  //  lhs * solution = rhs\n  //\n  // using a Cholesky factorization. Here\n  // lhs is a symmetric positive definite matrix. It is assumed to be\n  // column major and only the lower triangular part of the matrix is\n  // referenced.\n  //\n  // This function uses the LAPACK dpotrf and dpotrs routines.\n  //\n  // The return value and the message string together describe whether\n  // the solver terminated successfully or not and if so, what was the\n  // reason for failure.\n  static LinearSolverTerminationType SolveInPlaceUsingCholesky(\n      int num_rows,\n      const double* lhs,\n      double* rhs_and_solution,\n      std::string* message);\n\n  // The SolveUsingQR function requires a buffer for its temporary\n  // computation. This function given the size of the lhs matrix will\n  // return the size of the buffer needed.\n  static int EstimateWorkSizeForQR(int num_rows, int num_cols);\n\n  // Solve\n  //\n  //  lhs * solution = rhs\n  //\n  // using a dense QR factorization. lhs is an arbitrary (possibly\n  // rectangular) matrix with full column rank.\n  //\n  // work is an array of size work_size that this routine uses for its\n  // temporary storage. The optimal size of this array can be obtained\n  // by calling EstimateWorkSizeForQR.\n  //\n  // When calling, rhs_and_solution contains the rhs, and upon return\n  // the first num_col entries are the solution.\n  //\n  // This function uses the LAPACK dgels routine.\n  //\n  // The return value and the message string together describe whether\n  // the solver terminated successfully or not and if so, what was the\n  // reason for failure.\n  static LinearSolverTerminationType SolveInPlaceUsingQR(\n      int num_rows,\n      int num_cols,\n      const double* lhs,\n      int work_size,\n      double* work,\n      double* rhs_and_solution,\n      std::string* message);\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_LAPACK_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/levenberg_marquardt_strategy.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/levenberg_marquardt_strategy.h\"\n\n#include <algorithm>\n#include <cmath>\n\n#include \"Eigen/Core\"\n#include \"ceres/array_utils.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/linear_least_squares_problems.h\"\n#include \"ceres/linear_solver.h\"\n#include \"ceres/sparse_matrix.h\"\n#include \"ceres/trust_region_strategy.h\"\n#include \"ceres/types.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nLevenbergMarquardtStrategy::LevenbergMarquardtStrategy(\n    const TrustRegionStrategy::Options& options)\n    : linear_solver_(options.linear_solver),\n      radius_(options.initial_radius),\n      max_radius_(options.max_radius),\n      min_diagonal_(options.min_lm_diagonal),\n      max_diagonal_(options.max_lm_diagonal),\n      decrease_factor_(2.0),\n      reuse_diagonal_(false) {\n  CHECK(linear_solver_ != nullptr);\n  CHECK_GT(min_diagonal_, 0.0);\n  CHECK_LE(min_diagonal_, max_diagonal_);\n  CHECK_GT(max_radius_, 0.0);\n}\n\nLevenbergMarquardtStrategy::~LevenbergMarquardtStrategy() {\n}\n\nTrustRegionStrategy::Summary LevenbergMarquardtStrategy::ComputeStep(\n    const TrustRegionStrategy::PerSolveOptions& per_solve_options,\n    SparseMatrix* jacobian,\n    const double* residuals,\n    double* step) {\n  CHECK(jacobian != nullptr);\n  CHECK(residuals != nullptr);\n  CHECK(step != nullptr);\n\n  const int num_parameters = jacobian->num_cols();\n  if (!reuse_diagonal_) {\n    if (diagonal_.rows() != num_parameters) {\n      diagonal_.resize(num_parameters, 1);\n    }\n\n    jacobian->SquaredColumnNorm(diagonal_.data());\n    for (int i = 0; i < num_parameters; ++i) {\n      diagonal_[i] = std::min(std::max(diagonal_[i], min_diagonal_),\n                              max_diagonal_);\n    }\n  }\n\n  lm_diagonal_ = (diagonal_ / radius_).array().sqrt();\n\n  LinearSolver::PerSolveOptions solve_options;\n  solve_options.D = lm_diagonal_.data();\n  solve_options.q_tolerance = per_solve_options.eta;\n  // Disable r_tolerance checking. Since we only care about\n  // termination via the q_tolerance. As Nash and Sofer show,\n  // r_tolerance based termination is essentially useless in\n  // Truncated Newton methods.\n  solve_options.r_tolerance = -1.0;\n\n  // Invalidate the output array lm_step, so that we can detect if\n  // the linear solver generated numerical garbage.  This is known\n  // to happen for the DENSE_QR and then DENSE_SCHUR solver when\n  // the Jacobin is severely rank deficient and mu is too small.\n  InvalidateArray(num_parameters, step);\n\n  // Instead of solving Jx = -r, solve Jy = r.\n  // Then x can be found as x = -y, but the inputs jacobian and residuals\n  // do not need to be modified.\n  LinearSolver::Summary linear_solver_summary =\n      linear_solver_->Solve(jacobian, residuals, solve_options, step);\n\n  if (linear_solver_summary.termination_type == LINEAR_SOLVER_FATAL_ERROR) {\n    LOG(WARNING) << \"Linear solver fatal error: \"\n                 << linear_solver_summary.message;\n  } else if (linear_solver_summary.termination_type == LINEAR_SOLVER_FAILURE)  {\n    LOG(WARNING) << \"Linear solver failure. Failed to compute a step: \"\n                 << linear_solver_summary.message;\n  } else if (!IsArrayValid(num_parameters, step)) {\n    LOG(WARNING) << \"Linear solver failure. Failed to compute a finite step.\";\n    linear_solver_summary.termination_type = LINEAR_SOLVER_FAILURE;\n  } else {\n    VectorRef(step, num_parameters) *= -1.0;\n  }\n  reuse_diagonal_ = true;\n\n  if (per_solve_options.dump_format_type == CONSOLE ||\n      (per_solve_options.dump_format_type != CONSOLE &&\n       !per_solve_options.dump_filename_base.empty())) {\n    if (!DumpLinearLeastSquaresProblem(per_solve_options.dump_filename_base,\n                                       per_solve_options.dump_format_type,\n                                       jacobian,\n                                       solve_options.D,\n                                       residuals,\n                                       step,\n                                       0)) {\n      LOG(ERROR) << \"Unable to dump trust region problem.\"\n                 << \" Filename base: \" << per_solve_options.dump_filename_base;\n    }\n  }\n\n\n  TrustRegionStrategy::Summary summary;\n  summary.residual_norm = linear_solver_summary.residual_norm;\n  summary.num_iterations = linear_solver_summary.num_iterations;\n  summary.termination_type = linear_solver_summary.termination_type;\n  return summary;\n}\n\nvoid LevenbergMarquardtStrategy::StepAccepted(double step_quality) {\n  CHECK_GT(step_quality, 0.0);\n  radius_ = radius_ / std::max(1.0 / 3.0,\n                               1.0 - pow(2.0 * step_quality - 1.0, 3));\n  radius_ = std::min(max_radius_, radius_);\n  decrease_factor_ = 2.0;\n  reuse_diagonal_ = false;\n}\n\nvoid LevenbergMarquardtStrategy::StepRejected(double step_quality) {\n  radius_ = radius_ / decrease_factor_;\n  decrease_factor_ *= 2.0;\n  reuse_diagonal_ = true;\n}\n\ndouble LevenbergMarquardtStrategy::Radius() const {\n  return radius_;\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/levenberg_marquardt_strategy.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_LEVENBERG_MARQUARDT_STRATEGY_H_\n#define CERES_INTERNAL_LEVENBERG_MARQUARDT_STRATEGY_H_\n\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/trust_region_strategy.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// Levenberg-Marquardt step computation and trust region sizing\n// strategy based on on \"Methods for Nonlinear Least Squares\" by\n// K. Madsen, H.B. Nielsen and O. Tingleff. Available to download from\n//\n// http://www2.imm.dtu.dk/pubdb/views/edoc_download.php/3215/pdf/imm3215.pdf\nclass LevenbergMarquardtStrategy : public TrustRegionStrategy {\n public:\n  explicit LevenbergMarquardtStrategy(\n      const TrustRegionStrategy::Options& options);\n  virtual ~LevenbergMarquardtStrategy();\n\n  // TrustRegionStrategy interface\n  TrustRegionStrategy::Summary ComputeStep(\n      const TrustRegionStrategy::PerSolveOptions& per_solve_options,\n      SparseMatrix* jacobian,\n      const double* residuals,\n      double* step) final;\n  void StepAccepted(double step_quality) final;\n  void StepRejected(double step_quality) final;\n  void StepIsInvalid() final {\n    // Treat the current step as a rejected step with no increase in\n    // solution quality. Since rejected steps lead to decrease in the\n    // size of the trust region, the next time ComputeStep is called,\n    // this will lead to a better conditioned system.\n    StepRejected(0.0);\n  }\n\n  double Radius() const final;\n\n private:\n  LinearSolver* linear_solver_;\n  double radius_;\n  double max_radius_;\n  const double min_diagonal_;\n  const double max_diagonal_;\n  double decrease_factor_;\n  bool reuse_diagonal_;\n  Vector diagonal_;   // diagonal_ =  diag(J'J)\n  // Scaled copy of diagonal_. Stored here as optimization to prevent\n  // allocations in every iteration and reuse when a step fails and\n  // ComputeStep is called again.\n  Vector lm_diagonal_;  // lm_diagonal_ = diagonal_ / radius_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_LEVENBERG_MARQUARDT_STRATEGY_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/levenberg_marquardt_strategy_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include <memory>\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/levenberg_marquardt_strategy.h\"\n#include \"ceres/linear_solver.h\"\n#include \"ceres/trust_region_strategy.h\"\n#include \"glog/logging.h\"\n#include \"gmock/gmock.h\"\n#include \"gmock/mock-log.h\"\n#include \"gtest/gtest.h\"\n\nusing testing::AllOf;\nusing testing::AnyNumber;\nusing testing::HasSubstr;\nusing testing::ScopedMockLog;\nusing testing::_;\n\nnamespace ceres {\nnamespace internal {\n\nconst double kTolerance = 1e-16;\n\n// Linear solver that takes as input a vector and checks that the\n// caller passes the same vector as LinearSolver::PerSolveOptions.D.\nclass RegularizationCheckingLinearSolver : public DenseSparseMatrixSolver {\n public:\n  RegularizationCheckingLinearSolver(const int num_cols, const double* diagonal)\n      : num_cols_(num_cols),\n        diagonal_(diagonal) {\n  }\n\n  virtual ~RegularizationCheckingLinearSolver() {}\n\n private:\n  LinearSolver::Summary SolveImpl(\n      DenseSparseMatrix* A,\n      const double* b,\n      const LinearSolver::PerSolveOptions& per_solve_options,\n      double* x) final {\n    CHECK(per_solve_options.D != nullptr);\n    for (int i = 0; i < num_cols_; ++i) {\n      EXPECT_NEAR(per_solve_options.D[i], diagonal_[i], kTolerance)\n          << i << \" \" << per_solve_options.D[i] << \" \" << diagonal_[i];\n    }\n    return LinearSolver::Summary();\n  }\n\n  const int num_cols_;\n  const double* diagonal_;\n};\n\nTEST(LevenbergMarquardtStrategy, AcceptRejectStepRadiusScaling) {\n  TrustRegionStrategy::Options options;\n  options.initial_radius = 2.0;\n  options.max_radius = 20.0;\n  options.min_lm_diagonal = 1e-8;\n  options.max_lm_diagonal = 1e8;\n\n  // We need a non-null pointer here, so anything should do.\n  std::unique_ptr<LinearSolver> linear_solver(\n      new RegularizationCheckingLinearSolver(0, NULL));\n  options.linear_solver = linear_solver.get();\n\n  LevenbergMarquardtStrategy lms(options);\n  EXPECT_EQ(lms.Radius(), options.initial_radius);\n  lms.StepRejected(0.0);\n  EXPECT_EQ(lms.Radius(), 1.0);\n  lms.StepRejected(-1.0);\n  EXPECT_EQ(lms.Radius(), 0.25);\n  lms.StepAccepted(1.0);\n  EXPECT_EQ(lms.Radius(), 0.25 * 3.0);\n  lms.StepAccepted(1.0);\n  EXPECT_EQ(lms.Radius(), 0.25 * 3.0 * 3.0);\n  lms.StepAccepted(0.25);\n  EXPECT_EQ(lms.Radius(), 0.25 * 3.0 * 3.0 / 1.125);\n  lms.StepAccepted(1.0);\n  EXPECT_EQ(lms.Radius(), 0.25 * 3.0 * 3.0 / 1.125 * 3.0);\n  lms.StepAccepted(1.0);\n  EXPECT_EQ(lms.Radius(), 0.25 * 3.0 * 3.0 / 1.125 * 3.0 * 3.0);\n  lms.StepAccepted(1.0);\n  EXPECT_EQ(lms.Radius(), options.max_radius);\n}\n\nTEST(LevenbergMarquardtStrategy, CorrectDiagonalToLinearSolver) {\n  Matrix jacobian(2, 3);\n  jacobian.setZero();\n  jacobian(0, 0) = 0.0;\n  jacobian(0, 1) = 1.0;\n  jacobian(1, 1) = 1.0;\n  jacobian(0, 2) = 100.0;\n\n  double residual = 1.0;\n  double x[3];\n  DenseSparseMatrix dsm(jacobian);\n\n  TrustRegionStrategy::Options options;\n  options.initial_radius = 2.0;\n  options.max_radius = 20.0;\n  options.min_lm_diagonal = 1e-2;\n  options.max_lm_diagonal = 1e2;\n\n  double diagonal[3];\n  diagonal[0] = options.min_lm_diagonal;\n  diagonal[1] = 2.0;\n  diagonal[2] = options.max_lm_diagonal;\n  for (int i = 0; i < 3; ++i) {\n    diagonal[i] = sqrt(diagonal[i] / options.initial_radius);\n  }\n\n  RegularizationCheckingLinearSolver linear_solver(3, diagonal);\n  options.linear_solver = &linear_solver;\n\n  LevenbergMarquardtStrategy lms(options);\n  TrustRegionStrategy::PerSolveOptions pso;\n\n  {\n    ScopedMockLog log;\n    EXPECT_CALL(log, Log(_, _, _)).Times(AnyNumber());\n    // This using directive is needed get around the fact that there\n    // are versions of glog which are not in the google namespace.\n    using namespace google;\n\n#if defined(_MSC_VER)\n    // Use GLOG_WARNING to support MSVC if GLOG_NO_ABBREVIATED_SEVERITIES\n    // is defined.\n    EXPECT_CALL(log, Log(GLOG_WARNING, _,\n                         HasSubstr(\"Failed to compute a step\")));\n#else\n    EXPECT_CALL(log, Log(google::WARNING, _,\n                         HasSubstr(\"Failed to compute a step\")));\n#endif\n\n    TrustRegionStrategy::Summary summary =\n        lms.ComputeStep(pso, &dsm, &residual, x);\n    EXPECT_EQ(summary.termination_type, LINEAR_SOLVER_FAILURE);\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/line_search.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/line_search.h\"\n\n#include <algorithm>\n#include <cmath>\n#include <iomanip>\n#include <iostream>  // NOLINT\n\n#include \"ceres/evaluator.h\"\n#include \"ceres/function_sample.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/map_util.h\"\n#include \"ceres/polynomial.h\"\n#include \"ceres/stringprintf.h\"\n#include \"ceres/wall_time.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::map;\nusing std::ostream;\nusing std::string;\nusing std::vector;\n\nnamespace {\n// Precision used for floating point values in error message output.\nconst int kErrorMessageNumericPrecision = 8;\n}  // namespace\n\nostream& operator<<(ostream &os, const FunctionSample& sample);\n\n// Convenience stream operator for pushing FunctionSamples into log messages.\nostream& operator<<(ostream &os, const FunctionSample& sample) {\n  os << sample.ToDebugString();\n  return os;\n}\n\nLineSearch::LineSearch(const LineSearch::Options& options)\n    : options_(options) {}\n\nLineSearch* LineSearch::Create(const LineSearchType line_search_type,\n                               const LineSearch::Options& options,\n                               string* error) {\n  LineSearch* line_search = NULL;\n  switch (line_search_type) {\n  case ceres::ARMIJO:\n    line_search = new ArmijoLineSearch(options);\n    break;\n  case ceres::WOLFE:\n    line_search = new WolfeLineSearch(options);\n    break;\n  default:\n    *error = string(\"Invalid line search algorithm type: \") +\n        LineSearchTypeToString(line_search_type) +\n        string(\", unable to create line search.\");\n    return NULL;\n  }\n  return line_search;\n}\n\nLineSearchFunction::LineSearchFunction(Evaluator* evaluator)\n    : evaluator_(evaluator),\n      position_(evaluator->NumParameters()),\n      direction_(evaluator->NumEffectiveParameters()),\n      scaled_direction_(evaluator->NumEffectiveParameters()),\n      initial_evaluator_residual_time_in_seconds(0.0),\n      initial_evaluator_jacobian_time_in_seconds(0.0) {}\n\nvoid LineSearchFunction::Init(const Vector& position,\n                              const Vector& direction) {\n  position_ = position;\n  direction_ = direction;\n}\n\nvoid LineSearchFunction::Evaluate(const double x,\n                                  const bool evaluate_gradient,\n                                  FunctionSample* output) {\n  output->x = x;\n  output->vector_x_is_valid = false;\n  output->value_is_valid = false;\n  output->gradient_is_valid = false;\n  output->vector_gradient_is_valid = false;\n\n  scaled_direction_ = output->x * direction_;\n  output->vector_x.resize(position_.rows(), 1);\n  if (!evaluator_->Plus(position_.data(),\n                        scaled_direction_.data(),\n                        output->vector_x.data())) {\n    return;\n  }\n  output->vector_x_is_valid = true;\n\n  double* gradient = NULL;\n  if (evaluate_gradient) {\n    output->vector_gradient.resize(direction_.rows(), 1);\n    gradient = output->vector_gradient.data();\n  }\n  const bool eval_status = evaluator_->Evaluate(\n      output->vector_x.data(), &(output->value), NULL, gradient, NULL);\n\n  if (!eval_status || !std::isfinite(output->value)) {\n    return;\n  }\n\n  output->value_is_valid = true;\n  if (!evaluate_gradient) {\n    return;\n  }\n\n  output->gradient = direction_.dot(output->vector_gradient);\n  if (!std::isfinite(output->gradient)) {\n    return;\n  }\n\n  output->gradient_is_valid = true;\n  output->vector_gradient_is_valid = true;\n}\n\ndouble LineSearchFunction::DirectionInfinityNorm() const {\n  return direction_.lpNorm<Eigen::Infinity>();\n}\n\nvoid LineSearchFunction::ResetTimeStatistics() {\n  const map<string, CallStatistics> evaluator_statistics =\n      evaluator_->Statistics();\n\n  initial_evaluator_residual_time_in_seconds =\n      FindWithDefault(\n          evaluator_statistics, \"Evaluator::Residual\", CallStatistics())\n          .time;\n  initial_evaluator_jacobian_time_in_seconds =\n      FindWithDefault(\n          evaluator_statistics, \"Evaluator::Jacobian\", CallStatistics())\n          .time;\n}\n\nvoid LineSearchFunction::TimeStatistics(\n    double* cost_evaluation_time_in_seconds,\n    double* gradient_evaluation_time_in_seconds) const {\n  const map<string, CallStatistics> evaluator_time_statistics =\n      evaluator_->Statistics();\n  *cost_evaluation_time_in_seconds =\n      FindWithDefault(\n          evaluator_time_statistics, \"Evaluator::Residual\", CallStatistics())\n          .time -\n      initial_evaluator_residual_time_in_seconds;\n  // Strictly speaking this will slightly underestimate the time spent\n  // evaluating the gradient of the line search univariate cost function as it\n  // does not count the time spent performing the dot product with the direction\n  // vector.  However, this will typically be small by comparison, and also\n  // allows direct subtraction of the timing information from the totals for\n  // the evaluator returned in the solver summary.\n  *gradient_evaluation_time_in_seconds =\n      FindWithDefault(\n          evaluator_time_statistics, \"Evaluator::Jacobian\", CallStatistics())\n          .time -\n      initial_evaluator_jacobian_time_in_seconds;\n}\n\nvoid LineSearch::Search(double step_size_estimate,\n                        double initial_cost,\n                        double initial_gradient,\n                        Summary* summary) const {\n  const double start_time = WallTimeInSeconds();\n  CHECK(summary != nullptr);\n  *summary = LineSearch::Summary();\n\n  summary->cost_evaluation_time_in_seconds = 0.0;\n  summary->gradient_evaluation_time_in_seconds = 0.0;\n  summary->polynomial_minimization_time_in_seconds = 0.0;\n  options().function->ResetTimeStatistics();\n  this->DoSearch(step_size_estimate, initial_cost, initial_gradient, summary);\n  options().function->\n      TimeStatistics(&summary->cost_evaluation_time_in_seconds,\n                     &summary->gradient_evaluation_time_in_seconds);\n\n  summary->total_time_in_seconds = WallTimeInSeconds() - start_time;\n}\n\n// Returns step_size \\in [min_step_size, max_step_size] which minimizes the\n// polynomial of degree defined by interpolation_type which interpolates all\n// of the provided samples with valid values.\ndouble LineSearch::InterpolatingPolynomialMinimizingStepSize(\n    const LineSearchInterpolationType& interpolation_type,\n    const FunctionSample& lowerbound,\n    const FunctionSample& previous,\n    const FunctionSample& current,\n    const double min_step_size,\n    const double max_step_size) const {\n  if (!current.value_is_valid ||\n      (interpolation_type == BISECTION &&\n       max_step_size <= current.x)) {\n    // Either: sample is invalid; or we are using BISECTION and contracting\n    // the step size.\n    return std::min(std::max(current.x * 0.5, min_step_size), max_step_size);\n  } else if (interpolation_type == BISECTION) {\n    CHECK_GT(max_step_size, current.x);\n    // We are expanding the search (during a Wolfe bracketing phase) using\n    // BISECTION interpolation.  Using BISECTION when trying to expand is\n    // strictly speaking an oxymoron, but we define this to mean always taking\n    // the maximum step size so that the Armijo & Wolfe implementations are\n    // agnostic to the interpolation type.\n    return max_step_size;\n  }\n  // Only check if lower-bound is valid here, where it is required\n  // to avoid replicating current.value_is_valid == false\n  // behaviour in WolfeLineSearch.\n  CHECK(lowerbound.value_is_valid)\n      << std::scientific << std::setprecision(kErrorMessageNumericPrecision)\n      << \"Ceres bug: lower-bound sample for interpolation is invalid, \"\n      << \"please contact the developers!, interpolation_type: \"\n      << LineSearchInterpolationTypeToString(interpolation_type)\n      << \", lowerbound: \" << lowerbound << \", previous: \" << previous\n      << \", current: \" << current;\n\n  // Select step size by interpolating the function and gradient values\n  // and minimizing the corresponding polynomial.\n  vector<FunctionSample> samples;\n  samples.push_back(lowerbound);\n\n  if (interpolation_type == QUADRATIC) {\n    // Two point interpolation using function values and the\n    // gradient at the lower bound.\n    samples.push_back(FunctionSample(current.x, current.value));\n\n    if (previous.value_is_valid) {\n      // Three point interpolation, using function values and the\n      // gradient at the lower bound.\n      samples.push_back(FunctionSample(previous.x, previous.value));\n    }\n  } else if (interpolation_type == CUBIC) {\n    // Two point interpolation using the function values and the gradients.\n    samples.push_back(current);\n\n    if (previous.value_is_valid) {\n      // Three point interpolation using the function values and\n      // the gradients.\n      samples.push_back(previous);\n    }\n  } else {\n    LOG(FATAL) << \"Ceres bug: No handler for interpolation_type: \"\n               << LineSearchInterpolationTypeToString(interpolation_type)\n               << \", please contact the developers!\";\n  }\n\n  double step_size = 0.0, unused_min_value = 0.0;\n  MinimizeInterpolatingPolynomial(samples, min_step_size, max_step_size,\n                                  &step_size, &unused_min_value);\n  return step_size;\n}\n\nArmijoLineSearch::ArmijoLineSearch(const LineSearch::Options& options)\n    : LineSearch(options) {}\n\nvoid ArmijoLineSearch::DoSearch(const double step_size_estimate,\n                                const double initial_cost,\n                                const double initial_gradient,\n                                Summary* summary) const {\n  CHECK_GE(step_size_estimate, 0.0);\n  CHECK_GT(options().sufficient_decrease, 0.0);\n  CHECK_LT(options().sufficient_decrease, 1.0);\n  CHECK_GT(options().max_num_iterations, 0);\n  LineSearchFunction* function = options().function;\n\n  // Note initial_cost & initial_gradient are evaluated at step_size = 0,\n  // not step_size_estimate, which is our starting guess.\n  FunctionSample initial_position(0.0, initial_cost, initial_gradient);\n  initial_position.vector_x = function->position();\n  initial_position.vector_x_is_valid = true;\n\n  const double descent_direction_max_norm = function->DirectionInfinityNorm();\n  FunctionSample previous;\n  FunctionSample current;\n\n  // As the Armijo line search algorithm always uses the initial point, for\n  // which both the function value and derivative are known, when fitting a\n  // minimizing polynomial, we can fit up to a quadratic without requiring the\n  // gradient at the current query point.\n  const bool kEvaluateGradient = options().interpolation_type == CUBIC;\n\n  ++summary->num_function_evaluations;\n  if (kEvaluateGradient) {\n    ++summary->num_gradient_evaluations;\n  }\n\n  function->Evaluate(step_size_estimate, kEvaluateGradient, &current);\n  while (!current.value_is_valid ||\n         current.value > (initial_cost\n                          + options().sufficient_decrease\n                          * initial_gradient\n                          * current.x)) {\n    // If current.value_is_valid is false, we treat it as if the cost at that\n    // point is not large enough to satisfy the sufficient decrease condition.\n    ++summary->num_iterations;\n    if (summary->num_iterations >= options().max_num_iterations) {\n      summary->error =\n          StringPrintf(\"Line search failed: Armijo failed to find a point \"\n                       \"satisfying the sufficient decrease condition within \"\n                       \"specified max_num_iterations: %d.\",\n                       options().max_num_iterations);\n      LOG_IF(WARNING, !options().is_silent) << summary->error;\n      return;\n    }\n\n    const double polynomial_minimization_start_time = WallTimeInSeconds();\n    const double step_size =\n        this->InterpolatingPolynomialMinimizingStepSize(\n            options().interpolation_type,\n            initial_position,\n            previous,\n            current,\n            (options().max_step_contraction * current.x),\n            (options().min_step_contraction * current.x));\n    summary->polynomial_minimization_time_in_seconds +=\n        (WallTimeInSeconds() - polynomial_minimization_start_time);\n\n    if (step_size * descent_direction_max_norm < options().min_step_size) {\n      summary->error =\n          StringPrintf(\"Line search failed: step_size too small: %.5e \"\n                       \"with descent_direction_max_norm: %.5e.\", step_size,\n                       descent_direction_max_norm);\n      LOG_IF(WARNING, !options().is_silent) << summary->error;\n      return;\n    }\n\n    previous = current;\n\n    ++summary->num_function_evaluations;\n    if (kEvaluateGradient) {\n      ++summary->num_gradient_evaluations;\n    }\n\n    function->Evaluate(step_size, kEvaluateGradient, &current);\n  }\n\n  summary->optimal_point = current;\n  summary->success = true;\n}\n\nWolfeLineSearch::WolfeLineSearch(const LineSearch::Options& options)\n    : LineSearch(options) {}\n\nvoid WolfeLineSearch::DoSearch(const double step_size_estimate,\n                               const double initial_cost,\n                               const double initial_gradient,\n                               Summary* summary) const {\n  // All parameters should have been validated by the Solver, but as\n  // invalid values would produce crazy nonsense, hard check them here.\n  CHECK_GE(step_size_estimate, 0.0);\n  CHECK_GT(options().sufficient_decrease, 0.0);\n  CHECK_GT(options().sufficient_curvature_decrease,\n           options().sufficient_decrease);\n  CHECK_LT(options().sufficient_curvature_decrease, 1.0);\n  CHECK_GT(options().max_step_expansion, 1.0);\n\n  // Note initial_cost & initial_gradient are evaluated at step_size = 0,\n  // not step_size_estimate, which is our starting guess.\n  FunctionSample initial_position(0.0, initial_cost, initial_gradient);\n  initial_position.vector_x = options().function->position();\n  initial_position.vector_x_is_valid = true;\n  bool do_zoom_search = false;\n  // Important: The high/low in bracket_high & bracket_low refer to their\n  // _function_ values, not their step sizes i.e. it is _not_ required that\n  // bracket_low.x < bracket_high.x.\n  FunctionSample solution, bracket_low, bracket_high;\n\n  // Wolfe bracketing phase: Increases step_size until either it finds a point\n  // that satisfies the (strong) Wolfe conditions, or an interval that brackets\n  // step sizes which satisfy the conditions.  From Nocedal & Wright [1] p61 the\n  // interval: (step_size_{k-1}, step_size_{k}) contains step lengths satisfying\n  // the strong Wolfe conditions if one of the following conditions are met:\n  //\n  //   1. step_size_{k} violates the sufficient decrease (Armijo) condition.\n  //   2. f(step_size_{k}) >= f(step_size_{k-1}).\n  //   3. f'(step_size_{k}) >= 0.\n  //\n  // Caveat: If f(step_size_{k}) is invalid, then step_size is reduced, ignoring\n  // this special case, step_size monotonically increases during bracketing.\n  if (!this->BracketingPhase(initial_position,\n                             step_size_estimate,\n                             &bracket_low,\n                             &bracket_high,\n                             &do_zoom_search,\n                             summary)) {\n    // Failed to find either a valid point, a valid bracket satisfying the Wolfe\n    // conditions, or even a step size > minimum tolerance satisfying the Armijo\n    // condition.\n    return;\n  }\n\n  if (!do_zoom_search) {\n    // Either: Bracketing phase already found a point satisfying the strong\n    // Wolfe conditions, thus no Zoom required.\n    //\n    // Or: Bracketing failed to find a valid bracket or a point satisfying the\n    // strong Wolfe conditions within max_num_iterations, or whilst searching\n    // shrank the bracket width until it was below our minimum tolerance.\n    // As these are 'artificial' constraints, and we would otherwise fail to\n    // produce a valid point when ArmijoLineSearch would succeed, we return the\n    // point with the lowest cost found thus far which satsifies the Armijo\n    // condition (but not the Wolfe conditions).\n    summary->optimal_point = bracket_low;\n    summary->success = true;\n    return;\n  }\n\n  VLOG(3) << std::scientific << std::setprecision(kErrorMessageNumericPrecision)\n          << \"Starting line search zoom phase with bracket_low: \"\n          << bracket_low << \", bracket_high: \" << bracket_high\n          << \", bracket width: \" << fabs(bracket_low.x - bracket_high.x)\n          << \", bracket abs delta cost: \"\n          << fabs(bracket_low.value - bracket_high.value);\n\n  // Wolfe Zoom phase: Called when the Bracketing phase finds an interval of\n  // non-zero, finite width that should bracket step sizes which satisfy the\n  // (strong) Wolfe conditions (before finding a step size that satisfies the\n  // conditions).  Zoom successively decreases the size of the interval until a\n  // step size which satisfies the Wolfe conditions is found.  The interval is\n  // defined by bracket_low & bracket_high, which satisfy:\n  //\n  //   1. The interval bounded by step sizes: bracket_low.x & bracket_high.x\n  //      contains step sizes that satsify the strong Wolfe conditions.\n  //   2. bracket_low.x is of all the step sizes evaluated *which satisifed the\n  //      Armijo sufficient decrease condition*, the one which generated the\n  //      smallest function value, i.e. bracket_low.value <\n  //      f(all other steps satisfying Armijo).\n  //        - Note that this does _not_ (necessarily) mean that initially\n  //          bracket_low.value < bracket_high.value (although this is typical)\n  //          e.g. when bracket_low = initial_position, and bracket_high is the\n  //          first sample, and which does not satisfy the Armijo condition,\n  //          but still has bracket_high.value < initial_position.value.\n  //   3. bracket_high is chosen after bracket_low, s.t.\n  //      bracket_low.gradient * (bracket_high.x - bracket_low.x) < 0.\n  if (!this->ZoomPhase(initial_position,\n                       bracket_low,\n                       bracket_high,\n                       &solution,\n                       summary) && !solution.value_is_valid) {\n    // Failed to find a valid point (given the specified decrease parameters)\n    // within the specified bracket.\n    return;\n  }\n  // Ensure that if we ran out of iterations whilst zooming the bracket, or\n  // shrank the bracket width to < tolerance and failed to find a point which\n  // satisfies the strong Wolfe curvature condition, that we return the point\n  // amongst those found thus far, which minimizes f() and satisfies the Armijo\n  // condition.\n\n  if (!solution.value_is_valid || solution.value > bracket_low.value) {\n    summary->optimal_point = bracket_low;\n  } else {\n    summary->optimal_point = solution;\n  }\n\n  summary->success = true;\n}\n\n// Returns true if either:\n//\n// A termination condition satisfying the (strong) Wolfe bracketing conditions\n// is found:\n//\n// - A valid point, defined as a bracket of zero width [zoom not required].\n// - A valid bracket (of width > tolerance), [zoom required].\n//\n// Or, searching was stopped due to an 'artificial' constraint, i.e. not\n// a condition imposed / required by the underlying algorithm, but instead an\n// engineering / implementation consideration. But a step which exceeds the\n// minimum step size, and satsifies the Armijo condition was still found,\n// and should thus be used [zoom not required].\n//\n// Returns false if no step size > minimum step size was found which\n// satisfies at least the Armijo condition.\nbool WolfeLineSearch::BracketingPhase(\n    const FunctionSample& initial_position,\n    const double step_size_estimate,\n    FunctionSample* bracket_low,\n    FunctionSample* bracket_high,\n    bool* do_zoom_search,\n    Summary* summary) const {\n  LineSearchFunction* function = options().function;\n\n  FunctionSample previous = initial_position;\n  FunctionSample current;\n\n  const double descent_direction_max_norm =\n      function->DirectionInfinityNorm();\n\n  *do_zoom_search = false;\n  *bracket_low = initial_position;\n\n  // As we require the gradient to evaluate the Wolfe condition, we always\n  // calculate it together with the value, irrespective of the interpolation\n  // type.  As opposed to only calculating the gradient after the Armijo\n  // condition is satisifed, as the computational saving from this approach\n  // would be slight (perhaps even negative due to the extra call).  Also,\n  // always calculating the value & gradient together protects against us\n  // reporting invalid solutions if the cost function returns slightly different\n  // function values when evaluated with / without gradients (due to numerical\n  // issues).\n  ++summary->num_function_evaluations;\n  ++summary->num_gradient_evaluations;\n  const bool kEvaluateGradient = true;\n  function->Evaluate(step_size_estimate, kEvaluateGradient, &current);\n  while (true) {\n    ++summary->num_iterations;\n\n    if (current.value_is_valid &&\n        (current.value > (initial_position.value\n                          + options().sufficient_decrease\n                          * initial_position.gradient\n                          * current.x) ||\n         (previous.value_is_valid && current.value > previous.value))) {\n      // Bracket found: current step size violates Armijo sufficient decrease\n      // condition, or has stepped past an inflection point of f() relative to\n      // previous step size.\n      *do_zoom_search = true;\n      *bracket_low = previous;\n      *bracket_high = current;\n      VLOG(3) << std::scientific\n              << std::setprecision(kErrorMessageNumericPrecision)\n              << \"Bracket found: current step (\" << current.x\n              << \") violates Armijo sufficient condition, or has passed an \"\n              << \"inflection point of f() based on value.\";\n      break;\n    }\n\n    if (current.value_is_valid &&\n        fabs(current.gradient) <=\n        -options().sufficient_curvature_decrease * initial_position.gradient) {\n      // Current step size satisfies the strong Wolfe conditions, and is thus a\n      // valid termination point, therefore a Zoom not required.\n      *bracket_low = current;\n      *bracket_high = current;\n      VLOG(3) << std::scientific\n              << std::setprecision(kErrorMessageNumericPrecision)\n              << \"Bracketing phase found step size: \" << current.x\n              << \", satisfying strong Wolfe conditions, initial_position: \"\n              << initial_position << \", current: \" << current;\n      break;\n\n    } else if (current.value_is_valid && current.gradient >= 0) {\n      // Bracket found: current step size has stepped past an inflection point\n      // of f(), but Armijo sufficient decrease is still satisfied and\n      // f(current) is our best minimum thus far.  Remember step size\n      // monotonically increases, thus previous_step_size < current_step_size\n      // even though f(previous) > f(current).\n      *do_zoom_search = true;\n      // Note inverse ordering from first bracket case.\n      *bracket_low = current;\n      *bracket_high = previous;\n      VLOG(3) << \"Bracket found: current step (\" << current.x\n              << \") satisfies Armijo, but has gradient >= 0, thus have passed \"\n              << \"an inflection point of f().\";\n      break;\n\n    } else if (current.value_is_valid &&\n               fabs(current.x - previous.x) * descent_direction_max_norm\n               < options().min_step_size) {\n      // We have shrunk the search bracket to a width less than our tolerance,\n      // and still not found either a point satisfying the strong Wolfe\n      // conditions, or a valid bracket containing such a point. Stop searching\n      // and set bracket_low to the size size amongst all those tested which\n      // minimizes f() and satisfies the Armijo condition.\n      LOG_IF(WARNING, !options().is_silent)\n          << \"Line search failed: Wolfe bracketing phase shrank \"\n          << \"bracket width: \" << fabs(current.x - previous.x)\n          <<  \", to < tolerance: \" << options().min_step_size\n          << \", with descent_direction_max_norm: \"\n          << descent_direction_max_norm << \", and failed to find \"\n          << \"a point satisfying the strong Wolfe conditions or a \"\n          << \"bracketing containing such a point. Accepting \"\n          << \"point found satisfying Armijo condition only, to \"\n          << \"allow continuation.\";\n      *bracket_low = current;\n      break;\n\n    } else if (summary->num_iterations >= options().max_num_iterations) {\n      // Check num iterations bound here so that we always evaluate the\n      // max_num_iterations-th iteration against all conditions, and\n      // then perform no additional (unused) evaluations.\n      summary->error =\n          StringPrintf(\"Line search failed: Wolfe bracketing phase failed to \"\n                       \"find a point satisfying strong Wolfe conditions, or a \"\n                       \"bracket containing such a point within specified \"\n                       \"max_num_iterations: %d\", options().max_num_iterations);\n      LOG_IF(WARNING, !options().is_silent) << summary->error;\n      // Ensure that bracket_low is always set to the step size amongst all\n      // those tested which minimizes f() and satisfies the Armijo condition\n      // when we terminate due to the 'artificial' max_num_iterations condition.\n      *bracket_low =\n          current.value_is_valid && current.value < bracket_low->value\n          ? current : *bracket_low;\n      break;\n    }\n    // Either: f(current) is invalid; or, f(current) is valid, but does not\n    // satisfy the strong Wolfe conditions itself, or the conditions for\n    // being a boundary of a bracket.\n\n    // If f(current) is valid, (but meets no criteria) expand the search by\n    // increasing the step size.  If f(current) is invalid, contract the step\n    // size.\n    //\n    // In Nocedal & Wright [1] (p60), the step-size can only increase in the\n    // bracketing phase: step_size_{k+1} \\in [step_size_k, step_size_k * factor].\n    // However this does not account for the function returning invalid values\n    // which we support, in which case we need to contract the step size whilst\n    // ensuring that we do not invert the bracket, i.e, we require that:\n    // step_size_{k-1} <= step_size_{k+1} < step_size_k.\n    const double min_step_size =\n        current.value_is_valid\n        ? current.x : previous.x;\n    const double max_step_size =\n        current.value_is_valid\n        ? (current.x * options().max_step_expansion) : current.x;\n\n    // We are performing 2-point interpolation only here, but the API of\n    // InterpolatingPolynomialMinimizingStepSize() allows for up to\n    // 3-point interpolation, so pad call with a sample with an invalid\n    // value that will therefore be ignored.\n    const FunctionSample unused_previous;\n    DCHECK(!unused_previous.value_is_valid);\n    // Contracts step size if f(current) is not valid.\n    const double polynomial_minimization_start_time = WallTimeInSeconds();\n    const double step_size =\n        this->InterpolatingPolynomialMinimizingStepSize(\n            options().interpolation_type,\n            previous,\n            unused_previous,\n            current,\n            min_step_size,\n            max_step_size);\n    summary->polynomial_minimization_time_in_seconds +=\n        (WallTimeInSeconds() - polynomial_minimization_start_time);\n    if (step_size * descent_direction_max_norm < options().min_step_size) {\n      summary->error =\n          StringPrintf(\"Line search failed: step_size too small: %.5e \"\n                       \"with descent_direction_max_norm: %.5e\", step_size,\n                       descent_direction_max_norm);\n      LOG_IF(WARNING, !options().is_silent) << summary->error;\n      return false;\n    }\n\n    // Only advance the lower boundary (in x) of the bracket if f(current)\n    // is valid such that we can support contracting the step size when\n    // f(current) is invalid without risking inverting the bracket in x, i.e.\n    // prevent previous.x > current.x.\n    previous = current.value_is_valid ? current : previous;\n    ++summary->num_function_evaluations;\n    ++summary->num_gradient_evaluations;\n    function->Evaluate(step_size, kEvaluateGradient, &current);\n  }\n\n  // Ensure that even if a valid bracket was found, we will only mark a zoom\n  // as required if the bracket's width is greater than our minimum tolerance.\n  if (*do_zoom_search &&\n      fabs(bracket_high->x - bracket_low->x) * descent_direction_max_norm\n      < options().min_step_size) {\n    *do_zoom_search = false;\n  }\n\n  return true;\n}\n\n// Returns true iff solution satisfies the strong Wolfe conditions. Otherwise,\n// on return false, if we stopped searching due to the 'artificial' condition of\n// reaching max_num_iterations, solution is the step size amongst all those\n// tested, which satisfied the Armijo decrease condition and minimized f().\nbool WolfeLineSearch::ZoomPhase(const FunctionSample& initial_position,\n                                FunctionSample bracket_low,\n                                FunctionSample bracket_high,\n                                FunctionSample* solution,\n                                Summary* summary) const {\n  LineSearchFunction* function = options().function;\n\n  CHECK(bracket_low.value_is_valid && bracket_low.gradient_is_valid)\n      << std::scientific << std::setprecision(kErrorMessageNumericPrecision)\n      << \"Ceres bug: f_low input to Wolfe Zoom invalid, please contact \"\n      << \"the developers!, initial_position: \" << initial_position\n      << \", bracket_low: \" << bracket_low\n      << \", bracket_high: \"<< bracket_high;\n  // We do not require bracket_high.gradient_is_valid as the gradient condition\n  // for a valid bracket is only dependent upon bracket_low.gradient, and\n  // in order to minimize jacobian evaluations, bracket_high.gradient may\n  // not have been calculated (if bracket_high.value does not satisfy the\n  // Armijo sufficient decrease condition and interpolation method does not\n  // require it).\n  //\n  // We also do not require that: bracket_low.value < bracket_high.value,\n  // although this is typical. This is to deal with the case when\n  // bracket_low = initial_position, bracket_high is the first sample,\n  // and bracket_high does not satisfy the Armijo condition, but still has\n  // bracket_high.value < initial_position.value.\n  CHECK(bracket_high.value_is_valid)\n      << std::scientific << std::setprecision(kErrorMessageNumericPrecision)\n      << \"Ceres bug: f_high input to Wolfe Zoom invalid, please \"\n      << \"contact the developers!, initial_position: \" << initial_position\n      << \", bracket_low: \" << bracket_low\n      << \", bracket_high: \"<< bracket_high;\n\n  if (bracket_low.gradient * (bracket_high.x - bracket_low.x) >= 0) {\n    // The third condition for a valid initial bracket:\n    //\n    //   3. bracket_high is chosen after bracket_low, s.t.\n    //      bracket_low.gradient * (bracket_high.x - bracket_low.x) < 0.\n    //\n    // is not satisfied.  As this can happen when the users' cost function\n    // returns inconsistent gradient values relative to the function values,\n    // we do not CHECK_LT(), but we do stop processing and return an invalid\n    // value.\n    summary->error =\n        StringPrintf(\"Line search failed: Wolfe zoom phase passed a bracket \"\n                     \"which does not satisfy: bracket_low.gradient * \"\n                     \"(bracket_high.x - bracket_low.x) < 0 [%.8e !< 0] \"\n                     \"with initial_position: %s, bracket_low: %s, bracket_high:\"\n                     \" %s, the most likely cause of which is the cost function \"\n                     \"returning inconsistent gradient & function values.\",\n                     bracket_low.gradient * (bracket_high.x - bracket_low.x),\n                     initial_position.ToDebugString().c_str(),\n                     bracket_low.ToDebugString().c_str(),\n                     bracket_high.ToDebugString().c_str());\n    LOG_IF(WARNING, !options().is_silent) << summary->error;\n    solution->value_is_valid = false;\n    return false;\n  }\n\n  const int num_bracketing_iterations = summary->num_iterations;\n  const double descent_direction_max_norm = function->DirectionInfinityNorm();\n\n  while (true) {\n    // Set solution to bracket_low, as it is our best step size (smallest f())\n    // found thus far and satisfies the Armijo condition, even though it does\n    // not satisfy the Wolfe condition.\n    *solution = bracket_low;\n    if (summary->num_iterations >= options().max_num_iterations) {\n      summary->error =\n          StringPrintf(\"Line search failed: Wolfe zoom phase failed to \"\n                       \"find a point satisfying strong Wolfe conditions \"\n                       \"within specified max_num_iterations: %d, \"\n                       \"(num iterations taken for bracketing: %d).\",\n                       options().max_num_iterations, num_bracketing_iterations);\n      LOG_IF(WARNING, !options().is_silent) << summary->error;\n      return false;\n    }\n    if (fabs(bracket_high.x - bracket_low.x) * descent_direction_max_norm\n        < options().min_step_size) {\n      // Bracket width has been reduced below tolerance, and no point satisfying\n      // the strong Wolfe conditions has been found.\n      summary->error =\n          StringPrintf(\"Line search failed: Wolfe zoom bracket width: %.5e \"\n                       \"too small with descent_direction_max_norm: %.5e.\",\n                       fabs(bracket_high.x - bracket_low.x),\n                       descent_direction_max_norm);\n      LOG_IF(WARNING, !options().is_silent) << summary->error;\n      return false;\n    }\n\n    ++summary->num_iterations;\n    // Polynomial interpolation requires inputs ordered according to step size,\n    // not f(step size).\n    const FunctionSample& lower_bound_step =\n        bracket_low.x < bracket_high.x ? bracket_low : bracket_high;\n    const FunctionSample& upper_bound_step =\n        bracket_low.x < bracket_high.x ? bracket_high : bracket_low;\n    // We are performing 2-point interpolation only here, but the API of\n    // InterpolatingPolynomialMinimizingStepSize() allows for up to\n    // 3-point interpolation, so pad call with a sample with an invalid\n    // value that will therefore be ignored.\n    const FunctionSample unused_previous;\n    DCHECK(!unused_previous.value_is_valid);\n    const double polynomial_minimization_start_time = WallTimeInSeconds();\n    const double step_size =\n        this->InterpolatingPolynomialMinimizingStepSize(\n            options().interpolation_type,\n            lower_bound_step,\n            unused_previous,\n            upper_bound_step,\n            lower_bound_step.x,\n            upper_bound_step.x);\n    summary->polynomial_minimization_time_in_seconds +=\n        (WallTimeInSeconds() - polynomial_minimization_start_time);\n    // No check on magnitude of step size being too small here as it is\n    // lower-bounded by the initial bracket start point, which was valid.\n    //\n    // As we require the gradient to evaluate the Wolfe condition, we always\n    // calculate it together with the value, irrespective of the interpolation\n    // type.  As opposed to only calculating the gradient after the Armijo\n    // condition is satisifed, as the computational saving from this approach\n    // would be slight (perhaps even negative due to the extra call).  Also,\n    // always calculating the value & gradient together protects against us\n    // reporting invalid solutions if the cost function returns slightly\n    // different function values when evaluated with / without gradients (due\n    // to numerical issues).\n    ++summary->num_function_evaluations;\n    ++summary->num_gradient_evaluations;\n    const bool kEvaluateGradient = true;\n    function->Evaluate(step_size, kEvaluateGradient, solution);\n    if (!solution->value_is_valid || !solution->gradient_is_valid) {\n      summary->error =\n          StringPrintf(\"Line search failed: Wolfe Zoom phase found \"\n                       \"step_size: %.5e, for which function is invalid, \"\n                       \"between low_step: %.5e and high_step: %.5e \"\n                       \"at which function is valid.\",\n                       solution->x, bracket_low.x, bracket_high.x);\n      LOG_IF(WARNING, !options().is_silent) << summary->error;\n      return false;\n    }\n\n    VLOG(3) << \"Zoom iteration: \"\n            << summary->num_iterations - num_bracketing_iterations\n            << \", bracket_low: \" << bracket_low\n            << \", bracket_high: \" << bracket_high\n            << \", minimizing solution: \" << *solution;\n\n    if ((solution->value > (initial_position.value\n                            + options().sufficient_decrease\n                            * initial_position.gradient\n                            * solution->x)) ||\n        (solution->value >= bracket_low.value)) {\n      // Armijo sufficient decrease not satisfied, or not better\n      // than current lowest sample, use as new upper bound.\n      bracket_high = *solution;\n      continue;\n    }\n\n    // Armijo sufficient decrease satisfied, check strong Wolfe condition.\n    if (fabs(solution->gradient) <=\n        -options().sufficient_curvature_decrease * initial_position.gradient) {\n      // Found a valid termination point satisfying strong Wolfe conditions.\n      VLOG(3) << std::scientific\n              << std::setprecision(kErrorMessageNumericPrecision)\n              << \"Zoom phase found step size: \" << solution->x\n              << \", satisfying strong Wolfe conditions.\";\n      break;\n\n    } else if (solution->gradient * (bracket_high.x - bracket_low.x) >= 0) {\n      bracket_high = bracket_low;\n    }\n\n    bracket_low = *solution;\n  }\n  // Solution contains a valid point which satisfies the strong Wolfe\n  // conditions.\n  return true;\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/line_search.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Interface for and implementation of various Line search algorithms.\n\n#ifndef CERES_INTERNAL_LINE_SEARCH_H_\n#define CERES_INTERNAL_LINE_SEARCH_H_\n\n#include <string>\n#include <vector>\n#include \"ceres/function_sample.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/internal/port.h\"\n#include \"ceres/types.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass Evaluator;\nclass LineSearchFunction;\n\n// Line search is another name for a one dimensional optimization\n// algorithm. The name \"line search\" comes from the fact one\n// dimensional optimization problems that arise as subproblems of\n// general multidimensional optimization problems.\n//\n// While finding the exact minimum of a one dimensional function is\n// hard, instances of LineSearch find a point that satisfies a\n// sufficient decrease condition. Depending on the particular\n// condition used, we get a variety of different line search\n// algorithms, e.g., Armijo, Wolfe etc.\nclass LineSearch {\n public:\n  struct Summary;\n\n  struct Options {\n    // Degree of the polynomial used to approximate the objective\n    // function.\n    LineSearchInterpolationType interpolation_type = CUBIC;\n\n    // Armijo and Wolfe line search parameters.\n\n    // Solving the line search problem exactly is computationally\n    // prohibitive. Fortunately, line search based optimization\n    // algorithms can still guarantee convergence if instead of an\n    // exact solution, the line search algorithm returns a solution\n    // which decreases the value of the objective function\n    // sufficiently. More precisely, we are looking for a step_size\n    // s.t.\n    //\n    //  f(step_size) <= f(0) + sufficient_decrease * f'(0) * step_size\n    double sufficient_decrease = 1e-4;\n\n    // In each iteration of the Armijo / Wolfe line search,\n    //\n    // new_step_size >= max_step_contraction * step_size\n    //\n    // Note that by definition, for contraction:\n    //\n    //  0 < max_step_contraction < min_step_contraction < 1\n    //\n    double max_step_contraction = 1e-3;\n\n    // In each iteration of the Armijo / Wolfe line search,\n    //\n    // new_step_size <= min_step_contraction * step_size\n    // Note that by definition, for contraction:\n    //\n    //  0 < max_step_contraction < min_step_contraction < 1\n    //\n    double min_step_contraction = 0.9;\n\n    // If during the line search, the step_size falls below this\n    // value, it is truncated to zero.\n    double min_step_size = 1e-9;\n\n    // Maximum number of trial step size iterations during each line search,\n    // if a step size satisfying the search conditions cannot be found within\n    // this number of trials, the line search will terminate.\n    int max_num_iterations = 20;\n\n    // Wolfe-specific line search parameters.\n\n    // The strong Wolfe conditions consist of the Armijo sufficient\n    // decrease condition, and an additional requirement that the\n    // step-size be chosen s.t. the _magnitude_ ('strong' Wolfe\n    // conditions) of the gradient along the search direction\n    // decreases sufficiently. Precisely, this second condition\n    // is that we seek a step_size s.t.\n    //\n    //   |f'(step_size)| <= sufficient_curvature_decrease * |f'(0)|\n    //\n    // Where f() is the line search objective and f'() is the derivative\n    // of f w.r.t step_size (d f / d step_size).\n    double sufficient_curvature_decrease = 0.9;\n\n    // During the bracketing phase of the Wolfe search, the step size is\n    // increased until either a point satisfying the Wolfe conditions is\n    // found, or an upper bound for a bracket containing a point satisfying\n    // the conditions is found.  Precisely, at each iteration of the\n    // expansion:\n    //\n    //   new_step_size <= max_step_expansion * step_size.\n    //\n    // By definition for expansion, max_step_expansion > 1.0.\n    double max_step_expansion = 10;\n\n    bool is_silent = false;\n\n    // The one dimensional function that the line search algorithm\n    // minimizes.\n    LineSearchFunction* function = nullptr;\n  };\n\n  // Result of the line search.\n  struct Summary {\n    bool success = false;\n    FunctionSample optimal_point;\n    int num_function_evaluations = 0;\n    int num_gradient_evaluations = 0;\n    int num_iterations = 0;\n    // Cumulative time spent evaluating the value of the cost function across\n    // all iterations.\n    double cost_evaluation_time_in_seconds = 0.0;\n    // Cumulative time spent evaluating the gradient of the cost function across\n    // all iterations.\n    double gradient_evaluation_time_in_seconds = 0.0;\n    // Cumulative time spent minimizing the interpolating polynomial to compute\n    // the next candidate step size across all iterations.\n    double polynomial_minimization_time_in_seconds = 0.0;\n    double total_time_in_seconds = 0.0;\n    std::string error;\n  };\n\n  explicit LineSearch(const LineSearch::Options& options);\n  virtual ~LineSearch() {}\n\n  static LineSearch* Create(const LineSearchType line_search_type,\n                            const LineSearch::Options& options,\n                            std::string* error);\n\n  // Perform the line search.\n  //\n  // step_size_estimate must be a positive number.\n  //\n  // initial_cost and initial_gradient are the values and gradient of\n  // the function at zero.\n  // summary must not be null and will contain the result of the line\n  // search.\n  //\n  // Summary::success is true if a non-zero step size is found.\n  void Search(double step_size_estimate,\n              double initial_cost,\n              double initial_gradient,\n              Summary* summary) const;\n  double InterpolatingPolynomialMinimizingStepSize(\n      const LineSearchInterpolationType& interpolation_type,\n      const FunctionSample& lowerbound_sample,\n      const FunctionSample& previous_sample,\n      const FunctionSample& current_sample,\n      const double min_step_size,\n      const double max_step_size) const;\n\n protected:\n  const LineSearch::Options& options() const { return options_; }\n\n private:\n  virtual void DoSearch(double step_size_estimate,\n                        double initial_cost,\n                        double initial_gradient,\n                        Summary* summary) const = 0;\n\n private:\n  LineSearch::Options options_;\n};\n\n// An object used by the line search to access the function values\n// and gradient of the one dimensional function being optimized.\n//\n// In practice, this object provides access to the objective\n// function value and the directional derivative of the underlying\n// optimization problem along a specific search direction.\nclass LineSearchFunction {\n public:\n  explicit LineSearchFunction(Evaluator* evaluator);\n  void Init(const Vector& position, const Vector& direction);\n\n  // Evaluate the line search objective\n  //\n  //   f(x) = p(position + x * direction)\n  //\n  // Where, p is the objective function of the general optimization\n  // problem.\n  //\n  // evaluate_gradient controls whether the gradient will be evaluated\n  // or not.\n  //\n  // On return output->*_is_valid indicate indicate whether the\n  // corresponding fields have numerically valid values or not.\n  void Evaluate(double x, bool evaluate_gradient, FunctionSample* output);\n\n  double DirectionInfinityNorm() const;\n\n  // Resets to now, the start point for the results from TimeStatistics().\n  void ResetTimeStatistics();\n  void TimeStatistics(double* cost_evaluation_time_in_seconds,\n                      double* gradient_evaluation_time_in_seconds) const;\n  const Vector& position() const { return position_; }\n  const Vector& direction() const { return direction_; }\n\n private:\n  Evaluator* evaluator_;\n  Vector position_;\n  Vector direction_;\n\n  // scaled_direction = x * direction_;\n  Vector scaled_direction_;\n\n  // We may not exclusively own the evaluator (e.g. in the Trust Region\n  // minimizer), hence we need to save the initial evaluation durations for the\n  // value & gradient to accurately determine the duration of the evaluations\n  // we invoked.  These are reset by a call to ResetTimeStatistics().\n  double initial_evaluator_residual_time_in_seconds;\n  double initial_evaluator_jacobian_time_in_seconds;\n};\n\n// Backtracking and interpolation based Armijo line search. This\n// implementation is based on the Armijo line search that ships in the\n// minFunc package by Mark Schmidt.\n//\n// For more details: http://www.di.ens.fr/~mschmidt/Software/minFunc.html\nclass ArmijoLineSearch : public LineSearch {\n public:\n  explicit ArmijoLineSearch(const LineSearch::Options& options);\n  virtual ~ArmijoLineSearch() {}\n\n private:\n  void DoSearch(double step_size_estimate,\n                double initial_cost,\n                double initial_gradient,\n                Summary* summary) const final;\n};\n\n// Bracketing / Zoom Strong Wolfe condition line search.  This implementation\n// is based on the pseudo-code algorithm presented in Nocedal & Wright [1]\n// (p60-61) with inspiration from the WolfeLineSearch which ships with the\n// minFunc package by Mark Schmidt [2].\n//\n// [1] Nocedal J., Wright S., Numerical Optimization, 2nd Ed., Springer, 1999.\n// [2] http://www.di.ens.fr/~mschmidt/Software/minFunc.html.\nclass WolfeLineSearch : public LineSearch {\n public:\n  explicit WolfeLineSearch(const LineSearch::Options& options);\n  virtual ~WolfeLineSearch() {}\n\n  // Returns true iff either a valid point, or valid bracket are found.\n  bool BracketingPhase(const FunctionSample& initial_position,\n                       const double step_size_estimate,\n                       FunctionSample* bracket_low,\n                       FunctionSample* bracket_high,\n                       bool* perform_zoom_search,\n                       Summary* summary) const;\n  // Returns true iff final_line_sample satisfies strong Wolfe conditions.\n  bool ZoomPhase(const FunctionSample& initial_position,\n                 FunctionSample bracket_low,\n                 FunctionSample bracket_high,\n                 FunctionSample* solution,\n                 Summary* summary) const;\n\n private:\n  void DoSearch(double step_size_estimate,\n                double initial_cost,\n                double initial_gradient,\n                Summary* summary) const final;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_LINE_SEARCH_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/line_search_direction.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/line_search_direction.h\"\n#include \"ceres/line_search_minimizer.h\"\n#include \"ceres/low_rank_inverse_hessian.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass SteepestDescent : public LineSearchDirection {\n public:\n  virtual ~SteepestDescent() {}\n  bool NextDirection(const LineSearchMinimizer::State& previous,\n                     const LineSearchMinimizer::State& current,\n                     Vector* search_direction) {\n    *search_direction = -current.gradient;\n    return true;\n  }\n};\n\nclass NonlinearConjugateGradient : public LineSearchDirection {\n public:\n  NonlinearConjugateGradient(const NonlinearConjugateGradientType type,\n                             const double function_tolerance)\n      : type_(type),\n        function_tolerance_(function_tolerance) {\n  }\n\n  bool NextDirection(const LineSearchMinimizer::State& previous,\n                     const LineSearchMinimizer::State& current,\n                     Vector* search_direction) {\n    double beta = 0.0;\n    Vector gradient_change;\n    switch (type_) {\n      case FLETCHER_REEVES:\n        beta = current.gradient_squared_norm / previous.gradient_squared_norm;\n        break;\n      case POLAK_RIBIERE:\n        gradient_change = current.gradient - previous.gradient;\n        beta = (current.gradient.dot(gradient_change) /\n                previous.gradient_squared_norm);\n        break;\n      case HESTENES_STIEFEL:\n        gradient_change = current.gradient - previous.gradient;\n        beta =  (current.gradient.dot(gradient_change) /\n                 previous.search_direction.dot(gradient_change));\n        break;\n      default:\n        LOG(FATAL) << \"Unknown nonlinear conjugate gradient type: \" << type_;\n    }\n\n    *search_direction =  -current.gradient + beta * previous.search_direction;\n    const double directional_derivative =\n        current.gradient.dot(*search_direction);\n    if (directional_derivative > -function_tolerance_) {\n      LOG(WARNING) << \"Restarting non-linear conjugate gradients: \"\n                   << directional_derivative;\n      *search_direction = -current.gradient;\n    }\n\n    return true;\n  }\n\n private:\n  const NonlinearConjugateGradientType type_;\n  const double function_tolerance_;\n};\n\nclass LBFGS : public LineSearchDirection {\n public:\n  LBFGS(const int num_parameters,\n        const int max_lbfgs_rank,\n        const bool use_approximate_eigenvalue_bfgs_scaling)\n      : low_rank_inverse_hessian_(num_parameters,\n                                  max_lbfgs_rank,\n                                  use_approximate_eigenvalue_bfgs_scaling),\n        is_positive_definite_(true) {}\n\n  virtual ~LBFGS() {}\n\n  bool NextDirection(const LineSearchMinimizer::State& previous,\n                     const LineSearchMinimizer::State& current,\n                     Vector* search_direction) {\n    CHECK(is_positive_definite_)\n        << \"Ceres bug: NextDirection() called on L-BFGS after inverse Hessian \"\n        << \"approximation has become indefinite, please contact the \"\n        << \"developers!\";\n\n    low_rank_inverse_hessian_.Update(\n        previous.search_direction * previous.step_size,\n        current.gradient - previous.gradient);\n\n    search_direction->setZero();\n    low_rank_inverse_hessian_.RightMultiply(current.gradient.data(),\n                                            search_direction->data());\n    *search_direction *= -1.0;\n\n    if (search_direction->dot(current.gradient) >= 0.0) {\n      LOG(WARNING) << \"Numerical failure in L-BFGS update: inverse Hessian \"\n                   << \"approximation is not positive definite, and thus \"\n                   << \"initial gradient for search direction is positive: \"\n                   << search_direction->dot(current.gradient);\n      is_positive_definite_ = false;\n      return false;\n    }\n\n    return true;\n  }\n\n private:\n  LowRankInverseHessian low_rank_inverse_hessian_;\n  bool is_positive_definite_;\n};\n\nclass BFGS : public LineSearchDirection {\n public:\n  BFGS(const int num_parameters,\n       const bool use_approximate_eigenvalue_scaling)\n      : num_parameters_(num_parameters),\n        use_approximate_eigenvalue_scaling_(use_approximate_eigenvalue_scaling),\n        initialized_(false),\n        is_positive_definite_(true) {\n    LOG_IF(WARNING, num_parameters_ >= 1e3)\n        << \"BFGS line search being created with: \" << num_parameters_\n        << \" parameters, this will allocate a dense approximate inverse Hessian\"\n        << \" of size: \" << num_parameters_ << \" x \" << num_parameters_\n        << \", consider using the L-BFGS memory-efficient line search direction \"\n        << \"instead.\";\n    // Construct inverse_hessian_ after logging warning about size s.t. if the\n    // allocation crashes us, the log will highlight what the issue likely was.\n    inverse_hessian_ = Matrix::Identity(num_parameters, num_parameters);\n  }\n\n  virtual ~BFGS() {}\n\n  bool NextDirection(const LineSearchMinimizer::State& previous,\n                     const LineSearchMinimizer::State& current,\n                     Vector* search_direction) {\n    CHECK(is_positive_definite_)\n        << \"Ceres bug: NextDirection() called on BFGS after inverse Hessian \"\n        << \"approximation has become indefinite, please contact the \"\n        << \"developers!\";\n\n    const Vector delta_x = previous.search_direction * previous.step_size;\n    const Vector delta_gradient = current.gradient - previous.gradient;\n    const double delta_x_dot_delta_gradient = delta_x.dot(delta_gradient);\n\n    // The (L)BFGS algorithm explicitly requires that the secant equation:\n    //\n    //   B_{k+1} * s_k = y_k\n    //\n    // Is satisfied at each iteration, where B_{k+1} is the approximated\n    // Hessian at the k+1-th iteration, s_k = (x_{k+1} - x_{k}) and\n    // y_k = (grad_{k+1} - grad_{k}). As the approximated Hessian must be\n    // positive definite, this is equivalent to the condition:\n    //\n    //   s_k^T * y_k > 0     [s_k^T * B_{k+1} * s_k = s_k^T * y_k > 0]\n    //\n    // This condition would always be satisfied if the function was strictly\n    // convex, alternatively, it is always satisfied provided that a Wolfe line\n    // search is used (even if the function is not strictly convex).  See [1]\n    // (p138) for a proof.\n    //\n    // Although Ceres will always use a Wolfe line search when using (L)BFGS,\n    // practical implementation considerations mean that the line search\n    // may return a point that satisfies only the Armijo condition, and thus\n    // could violate the Secant equation.  As such, we will only use a step\n    // to update the Hessian approximation if:\n    //\n    //   s_k^T * y_k > tolerance\n    //\n    // It is important that tolerance is very small (and >=0), as otherwise we\n    // might skip the update too often and fail to capture important curvature\n    // information in the Hessian.  For example going from 1e-10 -> 1e-14\n    // improves the NIST benchmark score from 43/54 to 53/54.\n    //\n    // [1] Nocedal J, Wright S, Numerical Optimization, 2nd Ed. Springer, 1999.\n    //\n    // TODO(alexs.mac): Consider using Damped BFGS update instead of\n    // skipping update.\n    const double kBFGSSecantConditionHessianUpdateTolerance = 1e-14;\n    if (delta_x_dot_delta_gradient <=\n        kBFGSSecantConditionHessianUpdateTolerance) {\n      VLOG(2) << \"Skipping BFGS Update, delta_x_dot_delta_gradient too \"\n              << \"small: \" << delta_x_dot_delta_gradient << \", tolerance: \"\n              << kBFGSSecantConditionHessianUpdateTolerance\n              << \" (Secant condition).\";\n    } else {\n      // Update dense inverse Hessian approximation.\n\n      if (!initialized_ && use_approximate_eigenvalue_scaling_) {\n        // Rescale the initial inverse Hessian approximation (H_0) to be\n        // iteratively updated so that it is of similar 'size' to the true\n        // inverse Hessian at the start point.  As shown in [1]:\n        //\n        //   \\gamma = (delta_gradient_{0}' * delta_x_{0}) /\n        //            (delta_gradient_{0}' * delta_gradient_{0})\n        //\n        // Satisfies:\n        //\n        //   (1 / \\lambda_m) <= \\gamma <= (1 / \\lambda_1)\n        //\n        // Where \\lambda_1 & \\lambda_m are the smallest and largest eigenvalues\n        // of the true initial Hessian (not the inverse) respectively. Thus,\n        // \\gamma is an approximate eigenvalue of the true inverse Hessian, and\n        // choosing: H_0 = I * \\gamma will yield a starting point that has a\n        // similar scale to the true inverse Hessian.  This technique is widely\n        // reported to often improve convergence, however this is not\n        // universally true, particularly if there are errors in the initial\n        // gradients, or if there are significant differences in the sensitivity\n        // of the problem to the parameters (i.e. the range of the magnitudes of\n        // the components of the gradient is large).\n        //\n        // The original origin of this rescaling trick is somewhat unclear, the\n        // earliest reference appears to be Oren [1], however it is widely\n        // discussed without specific attributation in various texts including\n        // [2] (p143).\n        //\n        // [1] Oren S.S., Self-scaling variable metric (SSVM) algorithms\n        //     Part II: Implementation and experiments, Management Science,\n        //     20(5), 863-874, 1974.\n        // [2] Nocedal J., Wright S., Numerical Optimization, Springer, 1999.\n        const double approximate_eigenvalue_scale =\n            delta_x_dot_delta_gradient / delta_gradient.dot(delta_gradient);\n        inverse_hessian_ *= approximate_eigenvalue_scale;\n\n        VLOG(4) << \"Applying approximate_eigenvalue_scale: \"\n                << approximate_eigenvalue_scale << \" to initial inverse \"\n                << \"Hessian approximation.\";\n      }\n      initialized_ = true;\n\n      // Efficient O(num_parameters^2) BFGS update [2].\n      //\n      // Starting from dense BFGS update detailed in Nocedal [2] p140/177 and\n      // using: y_k = delta_gradient, s_k = delta_x:\n      //\n      //   \\rho_k = 1.0 / (s_k' * y_k)\n      //   V_k = I - \\rho_k * y_k * s_k'\n      //   H_k = (V_k' * H_{k-1} * V_k) + (\\rho_k * s_k * s_k')\n      //\n      // This update involves matrix, matrix products which naively O(N^3),\n      // however we can exploit our knowledge that H_k is positive definite\n      // and thus by defn. symmetric to reduce the cost of the update:\n      //\n      // Expanding the update above yields:\n      //\n      //   H_k = H_{k-1} +\n      //         \\rho_k * ( (1.0 + \\rho_k * y_k' * H_k * y_k) * s_k * s_k' -\n      //                    (s_k * y_k' * H_k + H_k * y_k * s_k') )\n      //\n      // Using: A = (s_k * y_k' * H_k), and the knowledge that H_k = H_k', the\n      // last term simplifies to (A + A'). Note that although A is not symmetric\n      // (A + A') is symmetric. For ease of construction we also define\n      // B = (1 + \\rho_k * y_k' * H_k * y_k) * s_k * s_k', which is by defn\n      // symmetric due to construction from: s_k * s_k'.\n      //\n      // Now we can write the BFGS update as:\n      //\n      //   H_k = H_{k-1} + \\rho_k * (B - (A + A'))\n\n      // For efficiency, as H_k is by defn. symmetric, we will only maintain the\n      // *lower* triangle of H_k (and all intermediary terms).\n\n      const double rho_k = 1.0 / delta_x_dot_delta_gradient;\n\n      // Calculate: A = s_k * y_k' * H_k\n      Matrix A = delta_x * (delta_gradient.transpose() *\n                            inverse_hessian_.selfadjointView<Eigen::Lower>());\n\n      // Calculate scalar: (1 + \\rho_k * y_k' * H_k * y_k)\n      const double delta_x_times_delta_x_transpose_scale_factor =\n          (1.0 + (rho_k * delta_gradient.transpose() *\n                  inverse_hessian_.selfadjointView<Eigen::Lower>() *\n                  delta_gradient));\n      // Calculate: B = (1 + \\rho_k * y_k' * H_k * y_k) * s_k * s_k'\n      Matrix B = Matrix::Zero(num_parameters_, num_parameters_);\n      B.selfadjointView<Eigen::Lower>().\n          rankUpdate(delta_x, delta_x_times_delta_x_transpose_scale_factor);\n\n      // Finally, update inverse Hessian approximation according to:\n      // H_k = H_{k-1} + \\rho_k * (B - (A + A')).  Note that (A + A') is\n      // symmetric, even though A is not.\n      inverse_hessian_.triangularView<Eigen::Lower>() +=\n          rho_k * (B - A - A.transpose());\n    }\n\n    *search_direction =\n        inverse_hessian_.selfadjointView<Eigen::Lower>() *\n        (-1.0 * current.gradient);\n\n    if (search_direction->dot(current.gradient) >= 0.0) {\n      LOG(WARNING) << \"Numerical failure in BFGS update: inverse Hessian \"\n                   << \"approximation is not positive definite, and thus \"\n                   << \"initial gradient for search direction is positive: \"\n                   << search_direction->dot(current.gradient);\n      is_positive_definite_ = false;\n      return false;\n    }\n\n    return true;\n  }\n\n private:\n  const int num_parameters_;\n  const bool use_approximate_eigenvalue_scaling_;\n  Matrix inverse_hessian_;\n  bool initialized_;\n  bool is_positive_definite_;\n};\n\nLineSearchDirection*\nLineSearchDirection::Create(const LineSearchDirection::Options& options) {\n  if (options.type == STEEPEST_DESCENT) {\n    return new SteepestDescent;\n  }\n\n  if (options.type == NONLINEAR_CONJUGATE_GRADIENT) {\n    return new NonlinearConjugateGradient(\n        options.nonlinear_conjugate_gradient_type,\n        options.function_tolerance);\n  }\n\n  if (options.type == ceres::LBFGS) {\n    return new ceres::internal::LBFGS(\n        options.num_parameters,\n        options.max_lbfgs_rank,\n        options.use_approximate_eigenvalue_bfgs_scaling);\n  }\n\n  if (options.type == ceres::BFGS) {\n    return new ceres::internal::BFGS(\n        options.num_parameters,\n        options.use_approximate_eigenvalue_bfgs_scaling);\n  }\n\n  LOG(ERROR) << \"Unknown line search direction type: \" << options.type;\n  return NULL;\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/line_search_direction.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_LINE_SEARCH_DIRECTION_H_\n#define CERES_INTERNAL_LINE_SEARCH_DIRECTION_H_\n\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/line_search_minimizer.h\"\n#include \"ceres/types.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass LineSearchDirection {\n public:\n  struct Options {\n    Options()\n        : num_parameters(0),\n          type(LBFGS),\n          nonlinear_conjugate_gradient_type(FLETCHER_REEVES),\n          function_tolerance(1e-12),\n          max_lbfgs_rank(20),\n          use_approximate_eigenvalue_bfgs_scaling(true) {\n    }\n\n    int num_parameters;\n    LineSearchDirectionType type;\n    NonlinearConjugateGradientType nonlinear_conjugate_gradient_type;\n    double function_tolerance;\n    int max_lbfgs_rank;\n    bool use_approximate_eigenvalue_bfgs_scaling;\n  };\n\n  static LineSearchDirection* Create(const Options& options);\n\n  virtual ~LineSearchDirection() {}\n  virtual bool NextDirection(const LineSearchMinimizer::State& previous,\n                             const LineSearchMinimizer::State& current,\n                             Vector* search_direction) = 0;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_LINE_SEARCH_DIRECTION_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/line_search_minimizer.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Generic loop for line search based optimization algorithms.\n//\n// This is primarily inpsired by the minFunc packaged written by Mark\n// Schmidt.\n//\n// http://www.di.ens.fr/~mschmidt/Software/minFunc.html\n//\n// For details on the theory and implementation see \"Numerical\n// Optimization\" by Nocedal & Wright.\n\n#include \"ceres/line_search_minimizer.h\"\n\n#include <algorithm>\n#include <cstdlib>\n#include <cmath>\n#include <memory>\n#include <string>\n#include <vector>\n\n#include \"Eigen/Dense\"\n#include \"ceres/array_utils.h\"\n#include \"ceres/evaluator.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/internal/port.h\"\n#include \"ceres/line_search.h\"\n#include \"ceres/line_search_direction.h\"\n#include \"ceres/stringprintf.h\"\n#include \"ceres/types.h\"\n#include \"ceres/wall_time.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\nnamespace {\n\nbool EvaluateGradientNorms(Evaluator* evaluator,\n                           const Vector& x,\n                           LineSearchMinimizer::State* state,\n                           std::string* message) {\n  Vector negative_gradient = -state->gradient;\n  Vector projected_gradient_step(x.size());\n  if (!evaluator->Plus(\n          x.data(), negative_gradient.data(), projected_gradient_step.data())) {\n    *message = \"projected_gradient_step = Plus(x, -gradient) failed.\";\n    return false;\n  }\n\n  state->gradient_squared_norm = (x - projected_gradient_step).squaredNorm();\n  state->gradient_max_norm =\n      (x - projected_gradient_step).lpNorm<Eigen::Infinity>();\n  return true;\n}\n\n}  // namespace\n\nvoid LineSearchMinimizer::Minimize(const Minimizer::Options& options,\n                                   double* parameters,\n                                   Solver::Summary* summary) {\n  const bool is_not_silent = !options.is_silent;\n  double start_time = WallTimeInSeconds();\n  double iteration_start_time =  start_time;\n\n  CHECK(options.evaluator != nullptr);\n  Evaluator* evaluator = options.evaluator.get();\n  const int num_parameters = evaluator->NumParameters();\n  const int num_effective_parameters = evaluator->NumEffectiveParameters();\n\n  summary->termination_type = NO_CONVERGENCE;\n  summary->num_successful_steps = 0;\n  summary->num_unsuccessful_steps = 0;\n\n  VectorRef x(parameters, num_parameters);\n\n  State current_state(num_parameters, num_effective_parameters);\n  State previous_state(num_parameters, num_effective_parameters);\n\n  IterationSummary iteration_summary;\n  iteration_summary.iteration = 0;\n  iteration_summary.step_is_valid = false;\n  iteration_summary.step_is_successful = false;\n  iteration_summary.cost_change = 0.0;\n  iteration_summary.gradient_max_norm = 0.0;\n  iteration_summary.gradient_norm = 0.0;\n  iteration_summary.step_norm = 0.0;\n  iteration_summary.linear_solver_iterations = 0;\n  iteration_summary.step_solver_time_in_seconds = 0;\n\n  // Do initial cost and gradient evaluation.\n  if (!evaluator->Evaluate(x.data(),\n                           &(current_state.cost),\n                           NULL,\n                           current_state.gradient.data(),\n                           NULL)) {\n    summary->termination_type = FAILURE;\n    summary->message = \"Initial cost and jacobian evaluation failed.\";\n    LOG_IF(WARNING, is_not_silent) << \"Terminating: \" << summary->message;\n    return;\n  }\n\n  if (!EvaluateGradientNorms(evaluator, x, &current_state, &summary->message)) {\n    summary->termination_type = FAILURE;\n    summary->message = \"Initial cost and jacobian evaluation failed. \"\n        \"More details: \" + summary->message;\n    LOG_IF(WARNING, is_not_silent) << \"Terminating: \" << summary->message;\n    return;\n  }\n\n  summary->initial_cost = current_state.cost + summary->fixed_cost;\n  iteration_summary.cost = current_state.cost + summary->fixed_cost;\n\n  iteration_summary.gradient_norm = sqrt(current_state.gradient_squared_norm);\n  iteration_summary.gradient_max_norm = current_state.gradient_max_norm;\n  if (iteration_summary.gradient_max_norm <= options.gradient_tolerance) {\n    summary->message = StringPrintf(\"Gradient tolerance reached. \"\n                                    \"Gradient max norm: %e <= %e\",\n                                    iteration_summary.gradient_max_norm,\n                                    options.gradient_tolerance);\n    summary->termination_type = CONVERGENCE;\n    VLOG_IF(1, is_not_silent) << \"Terminating: \" << summary->message;\n    return;\n  }\n\n  iteration_summary.iteration_time_in_seconds =\n      WallTimeInSeconds() - iteration_start_time;\n  iteration_summary.cumulative_time_in_seconds =\n      WallTimeInSeconds() - start_time\n      + summary->preprocessor_time_in_seconds;\n  summary->iterations.push_back(iteration_summary);\n\n  LineSearchDirection::Options line_search_direction_options;\n  line_search_direction_options.num_parameters = num_effective_parameters;\n  line_search_direction_options.type = options.line_search_direction_type;\n  line_search_direction_options.nonlinear_conjugate_gradient_type =\n      options.nonlinear_conjugate_gradient_type;\n  line_search_direction_options.max_lbfgs_rank = options.max_lbfgs_rank;\n  line_search_direction_options.use_approximate_eigenvalue_bfgs_scaling =\n      options.use_approximate_eigenvalue_bfgs_scaling;\n  std::unique_ptr<LineSearchDirection> line_search_direction(\n      LineSearchDirection::Create(line_search_direction_options));\n\n  LineSearchFunction line_search_function(evaluator);\n\n  LineSearch::Options line_search_options;\n  line_search_options.interpolation_type =\n      options.line_search_interpolation_type;\n  line_search_options.min_step_size = options.min_line_search_step_size;\n  line_search_options.sufficient_decrease =\n      options.line_search_sufficient_function_decrease;\n  line_search_options.max_step_contraction =\n      options.max_line_search_step_contraction;\n  line_search_options.min_step_contraction =\n      options.min_line_search_step_contraction;\n  line_search_options.max_num_iterations =\n      options.max_num_line_search_step_size_iterations;\n  line_search_options.sufficient_curvature_decrease =\n      options.line_search_sufficient_curvature_decrease;\n  line_search_options.max_step_expansion =\n      options.max_line_search_step_expansion;\n  line_search_options.is_silent = options.is_silent;\n  line_search_options.function = &line_search_function;\n\n  std::unique_ptr<LineSearch>\n      line_search(LineSearch::Create(options.line_search_type,\n                                     line_search_options,\n                                     &summary->message));\n  if (line_search.get() == NULL) {\n    summary->termination_type = FAILURE;\n    LOG_IF(ERROR, is_not_silent) << \"Terminating: \" << summary->message;\n    return;\n  }\n\n  LineSearch::Summary line_search_summary;\n  int num_line_search_direction_restarts = 0;\n\n  while (true) {\n    if (!RunCallbacks(options, iteration_summary, summary)) {\n      break;\n    }\n\n    iteration_start_time = WallTimeInSeconds();\n    if (iteration_summary.iteration >= options.max_num_iterations) {\n      summary->message = \"Maximum number of iterations reached.\";\n      summary->termination_type = NO_CONVERGENCE;\n      VLOG_IF(1, is_not_silent) << \"Terminating: \" << summary->message;\n      break;\n    }\n\n    const double total_solver_time = iteration_start_time - start_time +\n        summary->preprocessor_time_in_seconds;\n    if (total_solver_time >= options.max_solver_time_in_seconds) {\n      summary->message = \"Maximum solver time reached.\";\n      summary->termination_type = NO_CONVERGENCE;\n      VLOG_IF(1, is_not_silent) << \"Terminating: \" << summary->message;\n      break;\n    }\n\n    iteration_summary = IterationSummary();\n    iteration_summary.iteration = summary->iterations.back().iteration + 1;\n    iteration_summary.step_is_valid = false;\n    iteration_summary.step_is_successful = false;\n\n    bool line_search_status = true;\n    if (iteration_summary.iteration == 1) {\n      current_state.search_direction = -current_state.gradient;\n    } else {\n      line_search_status = line_search_direction->NextDirection(\n          previous_state,\n          current_state,\n          &current_state.search_direction);\n    }\n\n    if (!line_search_status &&\n        num_line_search_direction_restarts >=\n        options.max_num_line_search_direction_restarts) {\n      // Line search direction failed to generate a new direction, and we\n      // have already reached our specified maximum number of restarts,\n      // terminate optimization.\n      summary->message =\n          StringPrintf(\"Line search direction failure: specified \"\n                       \"max_num_line_search_direction_restarts: %d reached.\",\n                       options.max_num_line_search_direction_restarts);\n      summary->termination_type = FAILURE;\n      LOG_IF(WARNING, is_not_silent) << \"Terminating: \" << summary->message;\n      break;\n    } else if (!line_search_status) {\n      // Restart line search direction with gradient descent on first iteration\n      // as we have not yet reached our maximum number of restarts.\n      CHECK_LT(num_line_search_direction_restarts,\n               options.max_num_line_search_direction_restarts);\n\n      ++num_line_search_direction_restarts;\n      LOG_IF(WARNING, is_not_silent)\n          << \"Line search direction algorithm: \"\n          << LineSearchDirectionTypeToString(\n              options.line_search_direction_type)\n          << \", failed to produce a valid new direction at \"\n          << \"iteration: \" << iteration_summary.iteration\n          << \". Restarting, number of restarts: \"\n          << num_line_search_direction_restarts << \" / \"\n          << options.max_num_line_search_direction_restarts\n          << \" [max].\";\n      line_search_direction.reset(\n          LineSearchDirection::Create(line_search_direction_options));\n      current_state.search_direction = -current_state.gradient;\n    }\n\n    line_search_function.Init(x, current_state.search_direction);\n    current_state.directional_derivative =\n        current_state.gradient.dot(current_state.search_direction);\n\n    // TODO(sameeragarwal): Refactor this into its own object and add\n    // explanations for the various choices.\n    //\n    // Note that we use !line_search_status to ensure that we treat cases when\n    // we restarted the line search direction equivalently to the first\n    // iteration.\n    const double initial_step_size =\n        (iteration_summary.iteration == 1 || !line_search_status)\n        ? std::min(1.0, 1.0 / current_state.gradient_max_norm)\n        : std::min(1.0, 2.0 * (current_state.cost - previous_state.cost) /\n                   current_state.directional_derivative);\n    // By definition, we should only ever go forwards along the specified search\n    // direction in a line search, most likely cause for this being violated\n    // would be a numerical failure in the line search direction calculation.\n    if (initial_step_size < 0.0) {\n      summary->message =\n          StringPrintf(\"Numerical failure in line search, initial_step_size is \"\n                       \"negative: %.5e, directional_derivative: %.5e, \"\n                       \"(current_cost - previous_cost): %.5e\",\n                       initial_step_size, current_state.directional_derivative,\n                       (current_state.cost - previous_state.cost));\n      summary->termination_type = FAILURE;\n      LOG_IF(WARNING, is_not_silent) << \"Terminating: \" << summary->message;\n      break;\n    }\n\n    line_search->Search(initial_step_size,\n                        current_state.cost,\n                        current_state.directional_derivative,\n                        &line_search_summary);\n    if (!line_search_summary.success) {\n      summary->message =\n          StringPrintf(\"Numerical failure in line search, failed to find \"\n                       \"a valid step size, (did not run out of iterations) \"\n                       \"using initial_step_size: %.5e, initial_cost: %.5e, \"\n                       \"initial_gradient: %.5e.\",\n                       initial_step_size, current_state.cost,\n                       current_state.directional_derivative);\n      LOG_IF(WARNING, is_not_silent) << \"Terminating: \" << summary->message;\n      summary->termination_type = FAILURE;\n      break;\n    }\n\n    const FunctionSample& optimal_point = line_search_summary.optimal_point;\n    CHECK(optimal_point.vector_x_is_valid)\n        << \"Congratulations, you found a bug in Ceres. Please report it.\";\n    current_state.step_size = optimal_point.x;\n    previous_state = current_state;\n    iteration_summary.step_solver_time_in_seconds =\n        WallTimeInSeconds() - iteration_start_time;\n\n    if (optimal_point.vector_gradient_is_valid) {\n      current_state.cost = optimal_point.value;\n      current_state.gradient = optimal_point.vector_gradient;\n    } else {\n      Evaluator::EvaluateOptions evaluate_options;\n      evaluate_options.new_evaluation_point = false;\n      if (!evaluator->Evaluate(evaluate_options,\n                               optimal_point.vector_x.data(),\n                               &(current_state.cost),\n                               NULL,\n                               current_state.gradient.data(),\n                               NULL)) {\n        summary->termination_type = FAILURE;\n        summary->message = \"Cost and jacobian evaluation failed.\";\n        LOG_IF(WARNING, is_not_silent) << \"Terminating: \" << summary->message;\n        return;\n      }\n    }\n\n    if (!EvaluateGradientNorms(evaluator,\n                               optimal_point.vector_x,\n                               &current_state,\n                               &summary->message)) {\n      summary->termination_type = FAILURE;\n      summary->message =\n          \"Step failed to evaluate. This should not happen as the step was \"\n          \"valid when it was selected by the line search. More details: \" +\n          summary->message;\n      LOG_IF(WARNING, is_not_silent) << \"Terminating: \" << summary->message;\n      break;\n    }\n\n    // Compute the norm of the step in the ambient space.\n    iteration_summary.step_norm = (optimal_point.vector_x - x).norm();\n    const double x_norm = x.norm();\n    x = optimal_point.vector_x;\n\n    iteration_summary.gradient_max_norm = current_state.gradient_max_norm;\n    iteration_summary.gradient_norm = sqrt(current_state.gradient_squared_norm);\n    iteration_summary.cost_change = previous_state.cost - current_state.cost;\n    iteration_summary.cost = current_state.cost + summary->fixed_cost;\n\n    iteration_summary.step_is_valid = true;\n    iteration_summary.step_is_successful = true;\n    iteration_summary.step_size =  current_state.step_size;\n    iteration_summary.line_search_function_evaluations =\n        line_search_summary.num_function_evaluations;\n    iteration_summary.line_search_gradient_evaluations =\n        line_search_summary.num_gradient_evaluations;\n    iteration_summary.line_search_iterations =\n        line_search_summary.num_iterations;\n    iteration_summary.iteration_time_in_seconds =\n        WallTimeInSeconds() - iteration_start_time;\n    iteration_summary.cumulative_time_in_seconds =\n        WallTimeInSeconds() - start_time\n        + summary->preprocessor_time_in_seconds;\n    summary->iterations.push_back(iteration_summary);\n\n    // Iterations inside the line search algorithm are considered\n    // 'steps' in the broader context, to distinguish these inner\n    // iterations from from the outer iterations of the line search\n    // minimizer. The number of line search steps is the total number\n    // of inner line search iterations (or steps) across the entire\n    // minimization.\n    summary->num_line_search_steps +=  line_search_summary.num_iterations;\n    summary->line_search_cost_evaluation_time_in_seconds +=\n        line_search_summary.cost_evaluation_time_in_seconds;\n    summary->line_search_gradient_evaluation_time_in_seconds +=\n        line_search_summary.gradient_evaluation_time_in_seconds;\n    summary->line_search_polynomial_minimization_time_in_seconds +=\n        line_search_summary.polynomial_minimization_time_in_seconds;\n    summary->line_search_total_time_in_seconds +=\n        line_search_summary.total_time_in_seconds;\n    ++summary->num_successful_steps;\n\n    const double step_size_tolerance = options.parameter_tolerance *\n                                       (x_norm + options.parameter_tolerance);\n    if (iteration_summary.step_norm <= step_size_tolerance) {\n      summary->message =\n          StringPrintf(\"Parameter tolerance reached. \"\n                       \"Relative step_norm: %e <= %e.\",\n                       (iteration_summary.step_norm /\n                        (x_norm + options.parameter_tolerance)),\n                       options.parameter_tolerance);\n      summary->termination_type = CONVERGENCE;\n      VLOG_IF(1, is_not_silent) << \"Terminating: \" << summary->message;\n      return;\n    }\n\n    if (iteration_summary.gradient_max_norm <= options.gradient_tolerance) {\n      summary->message = StringPrintf(\"Gradient tolerance reached. \"\n                                      \"Gradient max norm: %e <= %e\",\n                                      iteration_summary.gradient_max_norm,\n                                      options.gradient_tolerance);\n      summary->termination_type = CONVERGENCE;\n      VLOG_IF(1, is_not_silent) << \"Terminating: \" << summary->message;\n      break;\n    }\n\n    const double absolute_function_tolerance =\n        options.function_tolerance * std::abs(previous_state.cost);\n    if (std::abs(iteration_summary.cost_change) <=\n        absolute_function_tolerance) {\n      summary->message = StringPrintf(\n          \"Function tolerance reached. \"\n          \"|cost_change|/cost: %e <= %e\",\n          std::abs(iteration_summary.cost_change) / previous_state.cost,\n          options.function_tolerance);\n      summary->termination_type = CONVERGENCE;\n      VLOG_IF(1, is_not_silent) << \"Terminating: \" << summary->message;\n      break;\n    }\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/line_search_minimizer.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_LINE_SEARCH_MINIMIZER_H_\n#define CERES_INTERNAL_LINE_SEARCH_MINIMIZER_H_\n\n#include \"ceres/minimizer.h\"\n#include \"ceres/solver.h\"\n#include \"ceres/types.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// Generic line search minimization algorithm.\n//\n// For example usage, see SolverImpl::Minimize.\nclass LineSearchMinimizer : public Minimizer {\n public:\n  struct State {\n    State(int num_parameters,\n          int num_effective_parameters)\n        : cost(0.0),\n          gradient(num_effective_parameters),\n          gradient_squared_norm(0.0),\n          search_direction(num_effective_parameters),\n          directional_derivative(0.0),\n          step_size(0.0) {\n    }\n\n    double cost;\n    Vector gradient;\n    double gradient_squared_norm;\n    double gradient_max_norm;\n    Vector search_direction;\n    double directional_derivative;\n    double step_size;\n  };\n\n  ~LineSearchMinimizer() {}\n  void Minimize(const Minimizer::Options& options,\n                double* parameters,\n                Solver::Summary* summary) final;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_LINE_SEARCH_MINIMIZER_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/line_search_minimizer_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include <cmath>\n#include <cstdlib>\n\n#include \"ceres/ceres.h\"\n#include \"glog/logging.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass QuadraticFirstOrderFunction : public ceres::FirstOrderFunction {\n public:\n  bool Evaluate(const double* parameters,\n                double* cost,\n                double* gradient) const final {\n\n    cost[0] = parameters[0] * parameters[0];\n    if (gradient != NULL) {\n      gradient[0] = 2.0 * parameters[0];\n    }\n    return true;\n  }\n\n  int NumParameters() const final { return 1; }\n};\n\nTEST(LineSearchMinimizerTest, FinalCostIsZero) {\n  double parameters[1] = {2.0};\n  ceres::GradientProblem problem(new QuadraticFirstOrderFunction);\n  ceres::GradientProblemSolver::Options options;\n  ceres::GradientProblemSolver::Summary summary;\n  ceres::Solve(options, problem, parameters, &summary);\n  EXPECT_NEAR(summary.final_cost, 0.0, std::numeric_limits<double>::epsilon());\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/line_search_preprocessor.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/line_search_preprocessor.h\"\n\n#include <numeric>\n#include <string>\n#include \"ceres/casts.h\"\n#include \"ceres/context_impl.h\"\n#include \"ceres/evaluator.h\"\n#include \"ceres/minimizer.h\"\n#include \"ceres/problem_impl.h\"\n#include \"ceres/program.h\"\n#include \"ceres/wall_time.h\"\n\nnamespace ceres {\nnamespace internal {\nnamespace {\n\nbool IsProgramValid(const Program& program, std::string* error) {\n  if (program.IsBoundsConstrained()) {\n    *error = \"LINE_SEARCH Minimizer does not support bounds.\";\n    return false;\n  }\n  return program.ParameterBlocksAreFinite(error);\n}\n\nbool SetupEvaluator(PreprocessedProblem* pp) {\n  pp->evaluator_options = Evaluator::Options();\n  // This ensures that we get a Block Jacobian Evaluator without any\n  // requirement on orderings.\n  pp->evaluator_options.linear_solver_type = CGNR;\n  pp->evaluator_options.num_eliminate_blocks = 0;\n  pp->evaluator_options.num_threads = pp->options.num_threads;\n  pp->evaluator_options.context = pp->problem->context();\n  pp->evaluator_options.evaluation_callback =\n      pp->reduced_program->mutable_evaluation_callback();\n  pp->evaluator.reset(Evaluator::Create(pp->evaluator_options,\n                                        pp->reduced_program.get(),\n                                        &pp->error));\n  return (pp->evaluator.get() != NULL);\n}\n\n}  // namespace\n\nLineSearchPreprocessor::~LineSearchPreprocessor() {\n}\n\nbool LineSearchPreprocessor::Preprocess(const Solver::Options& options,\n                                        ProblemImpl* problem,\n                                        PreprocessedProblem* pp) {\n  CHECK(pp != nullptr);\n  pp->options = options;\n  ChangeNumThreadsIfNeeded(&pp->options);\n\n  pp->problem = problem;\n  Program* program = problem->mutable_program();\n  if (!IsProgramValid(*program, &pp->error)) {\n    return false;\n  }\n\n  pp->reduced_program.reset(\n      program->CreateReducedProgram(&pp->removed_parameter_blocks,\n                                    &pp->fixed_cost,\n                                    &pp->error));\n\n  if (pp->reduced_program.get() == NULL) {\n    return false;\n  }\n\n  if (pp->reduced_program->NumParameterBlocks() == 0) {\n    return true;\n  }\n\n  if (!SetupEvaluator(pp)) {\n    return false;\n  }\n\n  SetupCommonMinimizerOptions(pp);\n  return true;\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/line_search_preprocessor.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_LINE_SEARCH_PREPROCESSOR_H_\n#define CERES_INTERNAL_LINE_SEARCH_PREPROCESSOR_H_\n\n#include \"ceres/preprocessor.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass LineSearchPreprocessor : public Preprocessor {\n public:\n  virtual ~LineSearchPreprocessor();\n  bool Preprocess(const Solver::Options& options,\n                  ProblemImpl* problem,\n                  PreprocessedProblem* preprocessed_problem) final;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_LINE_SEARCH_PREPROCESSOR_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/line_search_preprocessor_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include <map>\n\n#include \"ceres/line_search_preprocessor.h\"\n#include \"ceres/problem_impl.h\"\n#include \"ceres/sized_cost_function.h\"\n#include \"ceres/solver.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nTEST(LineSearchPreprocessor, ZeroProblem) {\n  ProblemImpl problem;\n  Solver::Options options;\n  options.minimizer_type = LINE_SEARCH;\n  LineSearchPreprocessor preprocessor;\n  PreprocessedProblem pp;\n  EXPECT_TRUE(preprocessor.Preprocess(options, &problem, &pp));\n}\n\nTEST(LineSearchPreprocessor, ProblemWithInvalidParameterBlock) {\n  ProblemImpl problem;\n  double x = std::numeric_limits<double>::quiet_NaN();\n  problem.AddParameterBlock(&x, 1);\n  Solver::Options options;\n  options.minimizer_type = LINE_SEARCH;\n  LineSearchPreprocessor preprocessor;\n  PreprocessedProblem pp;\n  EXPECT_FALSE(preprocessor.Preprocess(options, &problem, &pp));\n}\n\nTEST(LineSearchPreprocessor, ParameterBlockHasBounds) {\n  ProblemImpl problem;\n  double x = 1.0;\n  problem.AddParameterBlock(&x, 1);\n  problem.SetParameterUpperBound(&x, 0, 1.0);\n  problem.SetParameterLowerBound(&x, 0, 2.0);\n  Solver::Options options;\n  options.minimizer_type = LINE_SEARCH;\n  LineSearchPreprocessor preprocessor;\n  PreprocessedProblem pp;\n  EXPECT_FALSE(preprocessor.Preprocess(options, &problem, &pp));\n}\n\nclass FailingCostFunction : public SizedCostFunction<1, 1> {\n public:\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const {\n    return false;\n  }\n};\n\nTEST(LineSearchPreprocessor, RemoveParameterBlocksFailed) {\n  ProblemImpl problem;\n  double x = 3.0;\n  problem.AddResidualBlock(new FailingCostFunction, NULL, &x);\n  problem.SetParameterBlockConstant(&x);\n  Solver::Options options;\n  options.minimizer_type = LINE_SEARCH;\n  LineSearchPreprocessor preprocessor;\n  PreprocessedProblem pp;\n  EXPECT_FALSE(preprocessor.Preprocess(options, &problem, &pp));\n}\n\nTEST(LineSearchPreprocessor, RemoveParameterBlocksSucceeds) {\n  ProblemImpl problem;\n  double x = 3.0;\n  problem.AddParameterBlock(&x, 1);\n  Solver::Options options;\n  options.minimizer_type = LINE_SEARCH;\n\n  LineSearchPreprocessor preprocessor;\n  PreprocessedProblem pp;\n  EXPECT_TRUE(preprocessor.Preprocess(options, &problem, &pp));\n}\n\ntemplate <int kNumResiduals, int... Ns>\nclass DummyCostFunction : public SizedCostFunction<kNumResiduals, Ns...> {\n public:\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const {\n    return true;\n  }\n};\n\nTEST(LineSearchPreprocessor, NormalOperation) {\n  ProblemImpl problem;\n  double x = 1.0;\n  double y = 1.0;\n  double z = 1.0;\n  problem.AddResidualBlock(new DummyCostFunction<1, 1, 1>, NULL, &x, &y);\n  problem.AddResidualBlock(new DummyCostFunction<1, 1, 1>, NULL, &y, &z);\n\n  Solver::Options options;\n  options.minimizer_type = LINE_SEARCH;\n\n  LineSearchPreprocessor preprocessor;\n  PreprocessedProblem pp;\n  EXPECT_TRUE(preprocessor.Preprocess(options, &problem, &pp));\n  EXPECT_EQ(pp.evaluator_options.linear_solver_type, CGNR);\n  EXPECT_TRUE(pp.evaluator.get() != NULL);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/linear_least_squares_problems.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/linear_least_squares_problems.h\"\n\n#include <cstdio>\n#include <memory>\n#include <string>\n#include <vector>\n\n#include \"ceres/block_sparse_matrix.h\"\n#include \"ceres/block_structure.h\"\n#include \"ceres/casts.h\"\n#include \"ceres/file.h\"\n#include \"ceres/stringprintf.h\"\n#include \"ceres/triplet_sparse_matrix.h\"\n#include \"ceres/types.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::string;\n\nLinearLeastSquaresProblem* CreateLinearLeastSquaresProblemFromId(int id) {\n  switch (id) {\n    case 0:\n      return LinearLeastSquaresProblem0();\n    case 1:\n      return LinearLeastSquaresProblem1();\n    case 2:\n      return LinearLeastSquaresProblem2();\n    case 3:\n      return LinearLeastSquaresProblem3();\n    case 4:\n      return LinearLeastSquaresProblem4();\n    default:\n      LOG(FATAL) << \"Unknown problem id requested \" << id;\n  }\n  return NULL;\n}\n\n/*\nA = [1   2]\n    [3   4]\n    [6 -10]\n\nb = [  8\n      18\n     -18]\n\nx = [2\n     3]\n\nD = [1\n     2]\n\nx_D = [1.78448275;\n       2.82327586;]\n */\nLinearLeastSquaresProblem* LinearLeastSquaresProblem0() {\n  LinearLeastSquaresProblem* problem = new LinearLeastSquaresProblem;\n\n  TripletSparseMatrix* A = new TripletSparseMatrix(3, 2, 6);\n  problem->b.reset(new double[3]);\n  problem->D.reset(new double[2]);\n\n  problem->x.reset(new double[2]);\n  problem->x_D.reset(new double[2]);\n\n  int* Ai = A->mutable_rows();\n  int* Aj = A->mutable_cols();\n  double* Ax = A->mutable_values();\n\n  int counter = 0;\n  for (int i = 0; i < 3; ++i) {\n    for (int j = 0; j< 2; ++j) {\n      Ai[counter] = i;\n      Aj[counter] = j;\n      ++counter;\n    }\n  }\n\n  Ax[0] = 1.;\n  Ax[1] = 2.;\n  Ax[2] = 3.;\n  Ax[3] = 4.;\n  Ax[4] = 6;\n  Ax[5] = -10;\n  A->set_num_nonzeros(6);\n  problem->A.reset(A);\n\n  problem->b[0] = 8;\n  problem->b[1] = 18;\n  problem->b[2] = -18;\n\n  problem->x[0] = 2.0;\n  problem->x[1] = 3.0;\n\n  problem->D[0] = 1;\n  problem->D[1] = 2;\n\n  problem->x_D[0] = 1.78448275;\n  problem->x_D[1] = 2.82327586;\n  return problem;\n}\n\n\n/*\n      A = [1 0  | 2 0 0\n           3 0  | 0 4 0\n           0 5  | 0 0 6\n           0 7  | 8 0 0\n           0 9  | 1 0 0\n           0 0  | 1 1 1]\n\n      b = [0\n           1\n           2\n           3\n           4\n           5]\n\n      c = A'* b = [ 3\n                   67\n                   33\n                    9\n                   17]\n\n      A'A = [10    0    2   12   0\n              0  155   65    0  30\n              2   65   70    1   1\n             12    0    1   17   1\n              0   30    1    1  37]\n\n      S = [ 42.3419  -1.4000  -11.5806\n            -1.4000   2.6000    1.0000\n            11.5806   1.0000   31.1935]\n\n      r = [ 4.3032\n            5.4000\n            5.0323]\n\n      S\\r = [ 0.2102\n              2.1367\n              0.1388]\n\n      A\\b = [-2.3061\n              0.3172\n              0.2102\n              2.1367\n              0.1388]\n*/\n// The following two functions create a TripletSparseMatrix and a\n// BlockSparseMatrix version of this problem.\n\n// TripletSparseMatrix version.\nLinearLeastSquaresProblem* LinearLeastSquaresProblem1() {\n  int num_rows = 6;\n  int num_cols = 5;\n\n  LinearLeastSquaresProblem* problem = new LinearLeastSquaresProblem;\n  TripletSparseMatrix* A = new TripletSparseMatrix(num_rows,\n                                                   num_cols,\n                                                   num_rows * num_cols);\n  problem->b.reset(new double[num_rows]);\n  problem->D.reset(new double[num_cols]);\n  problem->num_eliminate_blocks = 2;\n\n  int* rows = A->mutable_rows();\n  int* cols = A->mutable_cols();\n  double* values = A->mutable_values();\n\n  int nnz = 0;\n\n  // Row 1\n  {\n    rows[nnz] = 0;\n    cols[nnz] = 0;\n    values[nnz++] = 1;\n\n    rows[nnz] = 0;\n    cols[nnz] = 2;\n    values[nnz++] = 2;\n  }\n\n  // Row 2\n  {\n    rows[nnz] = 1;\n    cols[nnz] = 0;\n    values[nnz++] = 3;\n\n    rows[nnz] = 1;\n    cols[nnz] = 3;\n    values[nnz++] = 4;\n  }\n\n  // Row 3\n  {\n    rows[nnz] = 2;\n    cols[nnz] = 1;\n    values[nnz++] = 5;\n\n    rows[nnz] = 2;\n    cols[nnz] = 4;\n    values[nnz++] = 6;\n  }\n\n  // Row 4\n  {\n    rows[nnz] = 3;\n    cols[nnz] = 1;\n    values[nnz++] = 7;\n\n    rows[nnz] = 3;\n    cols[nnz] = 2;\n    values[nnz++] = 8;\n  }\n\n  // Row 5\n  {\n    rows[nnz] = 4;\n    cols[nnz] = 1;\n    values[nnz++] = 9;\n\n    rows[nnz] = 4;\n    cols[nnz] = 2;\n    values[nnz++] = 1;\n  }\n\n  // Row 6\n  {\n    rows[nnz] = 5;\n    cols[nnz] = 2;\n    values[nnz++] = 1;\n\n    rows[nnz] = 5;\n    cols[nnz] = 3;\n    values[nnz++] = 1;\n\n    rows[nnz] = 5;\n    cols[nnz] = 4;\n    values[nnz++] = 1;\n  }\n\n  A->set_num_nonzeros(nnz);\n  CHECK(A->IsValid());\n\n  problem->A.reset(A);\n\n  for (int i = 0; i < num_cols; ++i) {\n    problem->D.get()[i] = 1;\n  }\n\n  for (int i = 0; i < num_rows; ++i) {\n    problem->b.get()[i] = i;\n  }\n\n  return problem;\n}\n\n// BlockSparseMatrix version\nLinearLeastSquaresProblem* LinearLeastSquaresProblem2() {\n  int num_rows = 6;\n  int num_cols = 5;\n\n  LinearLeastSquaresProblem* problem = new LinearLeastSquaresProblem;\n\n  problem->b.reset(new double[num_rows]);\n  problem->D.reset(new double[num_cols]);\n  problem->num_eliminate_blocks = 2;\n\n  CompressedRowBlockStructure* bs = new CompressedRowBlockStructure;\n  std::unique_ptr<double[]> values(new double[num_rows * num_cols]);\n\n  for (int c = 0; c < num_cols; ++c) {\n    bs->cols.push_back(Block());\n    bs->cols.back().size = 1;\n    bs->cols.back().position = c;\n  }\n\n  int nnz = 0;\n\n  // Row 1\n  {\n    values[nnz++] = 1;\n    values[nnz++] = 2;\n\n    bs->rows.push_back(CompressedRow());\n    CompressedRow& row = bs->rows.back();\n    row.block.size = 1;\n    row.block.position = 0;\n    row.cells.push_back(Cell(0, 0));\n    row.cells.push_back(Cell(2, 1));\n  }\n\n  // Row 2\n  {\n    values[nnz++] = 3;\n    values[nnz++] = 4;\n\n    bs->rows.push_back(CompressedRow());\n    CompressedRow& row = bs->rows.back();\n    row.block.size = 1;\n    row.block.position = 1;\n    row.cells.push_back(Cell(0, 2));\n    row.cells.push_back(Cell(3, 3));\n  }\n\n  // Row 3\n  {\n    values[nnz++] = 5;\n    values[nnz++] = 6;\n\n    bs->rows.push_back(CompressedRow());\n    CompressedRow& row = bs->rows.back();\n    row.block.size = 1;\n    row.block.position = 2;\n    row.cells.push_back(Cell(1, 4));\n    row.cells.push_back(Cell(4, 5));\n  }\n\n  // Row 4\n  {\n    values[nnz++] = 7;\n    values[nnz++] = 8;\n\n    bs->rows.push_back(CompressedRow());\n    CompressedRow& row = bs->rows.back();\n    row.block.size = 1;\n    row.block.position = 3;\n    row.cells.push_back(Cell(1, 6));\n    row.cells.push_back(Cell(2, 7));\n  }\n\n  // Row 5\n  {\n    values[nnz++] = 9;\n    values[nnz++] = 1;\n\n    bs->rows.push_back(CompressedRow());\n    CompressedRow& row = bs->rows.back();\n    row.block.size = 1;\n    row.block.position = 4;\n    row.cells.push_back(Cell(1, 8));\n    row.cells.push_back(Cell(2, 9));\n  }\n\n  // Row 6\n  {\n    values[nnz++] = 1;\n    values[nnz++] = 1;\n    values[nnz++] = 1;\n\n    bs->rows.push_back(CompressedRow());\n    CompressedRow& row = bs->rows.back();\n    row.block.size = 1;\n    row.block.position = 5;\n    row.cells.push_back(Cell(2, 10));\n    row.cells.push_back(Cell(3, 11));\n    row.cells.push_back(Cell(4, 12));\n  }\n\n  BlockSparseMatrix* A = new BlockSparseMatrix(bs);\n  memcpy(A->mutable_values(), values.get(), nnz * sizeof(*A->values()));\n\n  for (int i = 0; i < num_cols; ++i) {\n    problem->D.get()[i] = 1;\n  }\n\n  for (int i = 0; i < num_rows; ++i) {\n    problem->b.get()[i] = i;\n  }\n\n  problem->A.reset(A);\n\n  return problem;\n}\n\n\n/*\n      A = [1 0\n           3 0\n           0 5\n           0 7\n           0 9\n           0 0]\n\n      b = [0\n           1\n           2\n           3\n           4\n           5]\n*/\n// BlockSparseMatrix version\nLinearLeastSquaresProblem* LinearLeastSquaresProblem3() {\n  int num_rows = 5;\n  int num_cols = 2;\n\n  LinearLeastSquaresProblem* problem = new LinearLeastSquaresProblem;\n\n  problem->b.reset(new double[num_rows]);\n  problem->D.reset(new double[num_cols]);\n  problem->num_eliminate_blocks = 2;\n\n  CompressedRowBlockStructure* bs = new CompressedRowBlockStructure;\n  std::unique_ptr<double[]> values(new double[num_rows * num_cols]);\n\n  for (int c = 0; c < num_cols; ++c) {\n    bs->cols.push_back(Block());\n    bs->cols.back().size = 1;\n    bs->cols.back().position = c;\n  }\n\n  int nnz = 0;\n\n  // Row 1\n  {\n    values[nnz++] = 1;\n    bs->rows.push_back(CompressedRow());\n    CompressedRow& row = bs->rows.back();\n    row.block.size = 1;\n    row.block.position = 0;\n    row.cells.push_back(Cell(0, 0));\n  }\n\n  // Row 2\n  {\n    values[nnz++] = 3;\n    bs->rows.push_back(CompressedRow());\n    CompressedRow& row = bs->rows.back();\n    row.block.size = 1;\n    row.block.position = 1;\n    row.cells.push_back(Cell(0, 1));\n  }\n\n  // Row 3\n  {\n    values[nnz++] = 5;\n    bs->rows.push_back(CompressedRow());\n    CompressedRow& row = bs->rows.back();\n    row.block.size = 1;\n    row.block.position = 2;\n    row.cells.push_back(Cell(1, 2));\n  }\n\n  // Row 4\n  {\n    values[nnz++] = 7;\n    bs->rows.push_back(CompressedRow());\n    CompressedRow& row = bs->rows.back();\n    row.block.size = 1;\n    row.block.position = 3;\n    row.cells.push_back(Cell(1, 3));\n  }\n\n  // Row 5\n  {\n    values[nnz++] = 9;\n    bs->rows.push_back(CompressedRow());\n    CompressedRow& row = bs->rows.back();\n    row.block.size = 1;\n    row.block.position = 4;\n    row.cells.push_back(Cell(1, 4));\n  }\n\n  BlockSparseMatrix* A = new BlockSparseMatrix(bs);\n  memcpy(A->mutable_values(), values.get(), nnz * sizeof(*A->values()));\n\n  for (int i = 0; i < num_cols; ++i) {\n    problem->D.get()[i] = 1;\n  }\n\n  for (int i = 0; i < num_rows; ++i) {\n    problem->b.get()[i] = i;\n  }\n\n  problem->A.reset(A);\n\n  return problem;\n}\n\n/*\n      A = [1 2 0 0 0 1 1\n           1 4 0 0 0 5 6\n           0 0 9 0 0 3 1]\n\n      b = [0\n           1\n           2]\n*/\n// BlockSparseMatrix version\n//\n// This problem has the unique property that it has two different\n// sized f-blocks, but only one of them occurs in the rows involving\n// the one e-block. So performing Schur elimination on this problem\n// tests the Schur Eliminator's ability to handle non-e-block rows\n// correctly when their structure does not conform to the static\n// structure determined by DetectStructure.\n//\n// NOTE: This problem is too small and rank deficient to be solved without\n// the diagonal regularization.\nLinearLeastSquaresProblem* LinearLeastSquaresProblem4() {\n  int num_rows = 3;\n  int num_cols = 7;\n\n  LinearLeastSquaresProblem* problem = new LinearLeastSquaresProblem;\n\n  problem->b.reset(new double[num_rows]);\n  problem->D.reset(new double[num_cols]);\n  problem->num_eliminate_blocks = 1;\n\n  CompressedRowBlockStructure* bs = new CompressedRowBlockStructure;\n  std::unique_ptr<double[]> values(new double[num_rows * num_cols]);\n\n  // Column block structure\n  bs->cols.push_back(Block());\n  bs->cols.back().size = 2;\n  bs->cols.back().position = 0;\n\n  bs->cols.push_back(Block());\n  bs->cols.back().size = 3;\n  bs->cols.back().position = 2;\n\n  bs->cols.push_back(Block());\n  bs->cols.back().size = 2;\n  bs->cols.back().position = 5;\n\n  int nnz = 0;\n\n  // Row 1 & 2\n  {\n    bs->rows.push_back(CompressedRow());\n    CompressedRow& row = bs->rows.back();\n    row.block.size = 2;\n    row.block.position = 0;\n\n    row.cells.push_back(Cell(0, nnz));\n    values[nnz++] = 1;\n    values[nnz++] = 2;\n    values[nnz++] = 1;\n    values[nnz++] = 4;\n\n    row.cells.push_back(Cell(2, nnz));\n    values[nnz++] = 1;\n    values[nnz++] = 1;\n    values[nnz++] = 5;\n    values[nnz++] = 6;\n  }\n\n  // Row 3\n  {\n    bs->rows.push_back(CompressedRow());\n    CompressedRow& row = bs->rows.back();\n    row.block.size = 1;\n    row.block.position = 2;\n\n    row.cells.push_back(Cell(1, nnz));\n    values[nnz++] = 9;\n    values[nnz++] = 0;\n    values[nnz++] = 0;\n\n    row.cells.push_back(Cell(2, nnz));\n    values[nnz++] = 3;\n    values[nnz++] = 1;\n  }\n\n  BlockSparseMatrix* A = new BlockSparseMatrix(bs);\n  memcpy(A->mutable_values(), values.get(), nnz * sizeof(*A->values()));\n\n  for (int i = 0; i < num_cols; ++i) {\n    problem->D.get()[i] = (i + 1) * 100;\n  }\n\n  for (int i = 0; i < num_rows; ++i) {\n    problem->b.get()[i] = i;\n  }\n\n  problem->A.reset(A);\n  return problem;\n}\n\nnamespace {\nbool DumpLinearLeastSquaresProblemToConsole(const SparseMatrix* A,\n                                            const double* D,\n                                            const double* b,\n                                            const double* x,\n                                            int num_eliminate_blocks) {\n  CHECK(A != nullptr);\n  Matrix AA;\n  A->ToDenseMatrix(&AA);\n  LOG(INFO) << \"A^T: \\n\" << AA.transpose();\n\n  if (D != NULL) {\n    LOG(INFO) << \"A's appended diagonal:\\n\"\n              << ConstVectorRef(D, A->num_cols());\n  }\n\n  if (b != NULL) {\n    LOG(INFO) << \"b: \\n\" << ConstVectorRef(b, A->num_rows());\n  }\n\n  if (x != NULL) {\n    LOG(INFO) << \"x: \\n\" << ConstVectorRef(x, A->num_cols());\n  }\n  return true;\n}\n\nvoid WriteArrayToFileOrDie(const string& filename,\n                           const double* x,\n                           const int size) {\n  CHECK(x != nullptr);\n  VLOG(2) << \"Writing array to: \" << filename;\n  FILE* fptr = fopen(filename.c_str(), \"w\");\n  CHECK(fptr != nullptr);\n  for (int i = 0; i < size; ++i) {\n    fprintf(fptr, \"%17f\\n\", x[i]);\n  }\n  fclose(fptr);\n}\n\nbool DumpLinearLeastSquaresProblemToTextFile(const string& filename_base,\n                                             const SparseMatrix* A,\n                                             const double* D,\n                                             const double* b,\n                                             const double* x,\n                                             int num_eliminate_blocks) {\n  CHECK(A != nullptr);\n  LOG(INFO) << \"writing to: \" << filename_base << \"*\";\n\n  string matlab_script;\n  StringAppendF(&matlab_script,\n                \"function lsqp = load_trust_region_problem()\\n\");\n  StringAppendF(&matlab_script,\n                \"lsqp.num_rows = %d;\\n\", A->num_rows());\n  StringAppendF(&matlab_script,\n                \"lsqp.num_cols = %d;\\n\", A->num_cols());\n\n  {\n    string filename = filename_base + \"_A.txt\";\n    FILE* fptr = fopen(filename.c_str(), \"w\");\n    CHECK(fptr != nullptr);\n    A->ToTextFile(fptr);\n    fclose(fptr);\n    StringAppendF(&matlab_script,\n                  \"tmp = load('%s', '-ascii');\\n\", filename.c_str());\n    StringAppendF(\n        &matlab_script,\n        \"lsqp.A = sparse(tmp(:, 1) + 1, tmp(:, 2) + 1, tmp(:, 3), %d, %d);\\n\",\n        A->num_rows(),\n        A->num_cols());\n  }\n\n\n  if (D != NULL) {\n    string filename = filename_base + \"_D.txt\";\n    WriteArrayToFileOrDie(filename, D, A->num_cols());\n    StringAppendF(&matlab_script,\n                  \"lsqp.D = load('%s', '-ascii');\\n\", filename.c_str());\n  }\n\n  if (b != NULL) {\n    string filename = filename_base + \"_b.txt\";\n    WriteArrayToFileOrDie(filename, b, A->num_rows());\n    StringAppendF(&matlab_script,\n                  \"lsqp.b = load('%s', '-ascii');\\n\", filename.c_str());\n  }\n\n  if (x != NULL) {\n    string filename = filename_base + \"_x.txt\";\n    WriteArrayToFileOrDie(filename, x, A->num_cols());\n    StringAppendF(&matlab_script,\n                  \"lsqp.x = load('%s', '-ascii');\\n\", filename.c_str());\n  }\n\n  string matlab_filename = filename_base + \".m\";\n  WriteStringToFileOrDie(matlab_script, matlab_filename);\n  return true;\n}\n}  // namespace\n\nbool DumpLinearLeastSquaresProblem(const string& filename_base,\n                                   DumpFormatType dump_format_type,\n                                   const SparseMatrix* A,\n                                   const double* D,\n                                   const double* b,\n                                   const double* x,\n                                   int num_eliminate_blocks) {\n  switch (dump_format_type) {\n    case CONSOLE:\n      return DumpLinearLeastSquaresProblemToConsole(A, D, b, x,\n                                                    num_eliminate_blocks);\n    case TEXTFILE:\n      return DumpLinearLeastSquaresProblemToTextFile(filename_base,\n                                                     A, D, b, x,\n                                                     num_eliminate_blocks);\n    default:\n      LOG(FATAL) << \"Unknown DumpFormatType \" << dump_format_type;\n  }\n\n  return true;\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/linear_least_squares_problems.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_LINEAR_LEAST_SQUARES_PROBLEMS_H_\n#define CERES_INTERNAL_LINEAR_LEAST_SQUARES_PROBLEMS_H_\n\n#include <memory>\n#include <string>\n#include <vector>\n#include \"ceres/sparse_matrix.h\"\n#include \"ceres/internal/port.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// Structure defining a linear least squares problem and if possible\n// ground truth solutions. To be used by various LinearSolver tests.\nstruct LinearLeastSquaresProblem {\n  LinearLeastSquaresProblem()\n      : num_eliminate_blocks(0) {\n  }\n\n  std::unique_ptr<SparseMatrix> A;\n  std::unique_ptr<double[]> b;\n  std::unique_ptr<double[]> D;\n  // If using the schur eliminator then how many of the variable\n  // blocks are e_type blocks.\n  int num_eliminate_blocks;\n\n  // Solution to min_x |Ax - b|^2\n  std::unique_ptr<double[]> x;\n  // Solution to min_x |Ax - b|^2 + |Dx|^2\n  std::unique_ptr<double[]> x_D;\n};\n\n// Factories for linear least squares problem.\nLinearLeastSquaresProblem* CreateLinearLeastSquaresProblemFromId(int id);\n\nLinearLeastSquaresProblem* LinearLeastSquaresProblem0();\nLinearLeastSquaresProblem* LinearLeastSquaresProblem1();\nLinearLeastSquaresProblem* LinearLeastSquaresProblem2();\nLinearLeastSquaresProblem* LinearLeastSquaresProblem3();\nLinearLeastSquaresProblem* LinearLeastSquaresProblem4();\n\n// Write the linear least squares problem to disk. The exact format\n// depends on dump_format_type.\nbool DumpLinearLeastSquaresProblem(const std::string& filename_base,\n                                   DumpFormatType dump_format_type,\n                                   const SparseMatrix* A,\n                                   const double* D,\n                                   const double* b,\n                                   const double* x,\n                                   int num_eliminate_blocks);\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_LINEAR_LEAST_SQUARES_PROBLEMS_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/linear_operator.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/linear_operator.h\"\n\nnamespace ceres {\nnamespace internal {\n\nLinearOperator::~LinearOperator() {\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/linear_operator.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Base classes for access to an linear operator.\n\n#ifndef CERES_INTERNAL_LINEAR_OPERATOR_H_\n#define CERES_INTERNAL_LINEAR_OPERATOR_H_\n\n#include \"ceres/types.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// This is an abstract base class for linear operators. It supports\n// access to size information and left and right multiply operators.\nclass LinearOperator {\n public:\n  virtual ~LinearOperator();\n\n  // y = y + Ax;\n  virtual void RightMultiply(const double* x, double* y) const = 0;\n  // y = y + A'x;\n  virtual void LeftMultiply(const double* x, double* y) const = 0;\n\n  virtual int num_rows() const = 0;\n  virtual int num_cols() const = 0;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_LINEAR_OPERATOR_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/linear_solver.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/linear_solver.h\"\n\n#include \"ceres/cgnr_solver.h\"\n#include \"ceres/dense_normal_cholesky_solver.h\"\n#include \"ceres/dense_qr_solver.h\"\n#include \"ceres/iterative_schur_complement_solver.h\"\n#include \"ceres/schur_complement_solver.h\"\n#include \"ceres/dynamic_sparse_normal_cholesky_solver.h\"\n#include \"ceres/sparse_normal_cholesky_solver.h\"\n#include \"ceres/types.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nLinearSolver::~LinearSolver() {\n}\n\nLinearSolverType LinearSolver::LinearSolverForZeroEBlocks(\n    LinearSolverType linear_solver_type) {\n  if (!IsSchurType(linear_solver_type)) {\n    return linear_solver_type;\n  }\n\n  if (linear_solver_type == SPARSE_SCHUR) {\n    return SPARSE_NORMAL_CHOLESKY;\n  }\n\n  if (linear_solver_type == DENSE_SCHUR) {\n    // TODO(sameeragarwal): This is probably not a great choice.\n    // Ideally, we should have a DENSE_NORMAL_CHOLESKY, that can take\n    // a BlockSparseMatrix as input.\n    return DENSE_QR;\n  }\n\n  if (linear_solver_type == ITERATIVE_SCHUR) {\n    return CGNR;\n  }\n\n  return linear_solver_type;\n}\n\nLinearSolver* LinearSolver::Create(const LinearSolver::Options& options) {\n  CHECK(options.context != NULL);\n\n  switch (options.type) {\n    case CGNR:\n      return new CgnrSolver(options);\n\n    case SPARSE_NORMAL_CHOLESKY:\n#if defined(CERES_NO_SPARSE)\n      return NULL;\n#else\n      if (options.dynamic_sparsity) {\n        return new DynamicSparseNormalCholeskySolver(options);\n      }\n\n      return new SparseNormalCholeskySolver(options);\n#endif\n\n    case SPARSE_SCHUR:\n#if defined(CERES_NO_SPARSE)\n      return NULL;\n#else\n      return new SparseSchurComplementSolver(options);\n#endif\n\n    case DENSE_SCHUR:\n      return new DenseSchurComplementSolver(options);\n\n    case ITERATIVE_SCHUR:\n      if (options.use_explicit_schur_complement) {\n        return new SparseSchurComplementSolver(options);\n      } else {\n        return new IterativeSchurComplementSolver(options);\n      }\n\n    case DENSE_QR:\n      return new DenseQRSolver(options);\n\n    case DENSE_NORMAL_CHOLESKY:\n      return new DenseNormalCholeskySolver(options);\n\n    default:\n      LOG(FATAL) << \"Unknown linear solver type :\"\n                 << options.type;\n      return NULL;  // MSVC doesn't understand that LOG(FATAL) never returns.\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/linear_solver.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Abstract interface for objects solving linear systems of various\n// kinds.\n\n#ifndef CERES_INTERNAL_LINEAR_SOLVER_H_\n#define CERES_INTERNAL_LINEAR_SOLVER_H_\n\n#include <cstddef>\n#include <map>\n#include <string>\n#include <vector>\n#include \"ceres/block_sparse_matrix.h\"\n#include \"ceres/casts.h\"\n#include \"ceres/compressed_row_sparse_matrix.h\"\n#include \"ceres/context_impl.h\"\n#include \"ceres/dense_sparse_matrix.h\"\n#include \"ceres/execution_summary.h\"\n#include \"ceres/triplet_sparse_matrix.h\"\n#include \"ceres/types.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nenum LinearSolverTerminationType {\n  // Termination criterion was met.\n  LINEAR_SOLVER_SUCCESS,\n\n  // Solver ran for max_num_iterations and terminated before the\n  // termination tolerance could be satisfied.\n  LINEAR_SOLVER_NO_CONVERGENCE,\n\n  // Solver was terminated due to numerical problems, generally due to\n  // the linear system being poorly conditioned.\n  LINEAR_SOLVER_FAILURE,\n\n  // Solver failed with a fatal error that cannot be recovered from,\n  // e.g. CHOLMOD ran out of memory when computing the symbolic or\n  // numeric factorization or an underlying library was called with\n  // the wrong arguments.\n  LINEAR_SOLVER_FATAL_ERROR\n};\n\n// This enum controls the fill-reducing ordering a sparse linear\n// algebra library should use before computing a sparse factorization\n// (usually Cholesky).\nenum OrderingType {\n  NATURAL, // Do not re-order the matrix. This is useful when the\n           // matrix has been ordered using a fill-reducing ordering\n           // already.\n  AMD      // Use the Approximate Minimum Degree algorithm to re-order\n           // the matrix.\n};\n\nclass LinearOperator;\n\n// Abstract base class for objects that implement algorithms for\n// solving linear systems\n//\n//   Ax = b\n//\n// It is expected that a single instance of a LinearSolver object\n// maybe used multiple times for solving multiple linear systems with\n// the same sparsity structure. This allows them to cache and reuse\n// information across solves. This means that calling Solve on the\n// same LinearSolver instance with two different linear systems will\n// result in undefined behaviour.\n//\n// Subclasses of LinearSolver use two structs to configure themselves.\n// The Options struct configures the LinearSolver object for its\n// lifetime. The PerSolveOptions struct is used to specify options for\n// a particular Solve call.\nclass LinearSolver {\n public:\n  struct Options {\n    LinearSolverType type = SPARSE_NORMAL_CHOLESKY;\n    PreconditionerType preconditioner_type = JACOBI;\n    VisibilityClusteringType visibility_clustering_type = CANONICAL_VIEWS;\n    DenseLinearAlgebraLibraryType dense_linear_algebra_library_type = EIGEN;\n    SparseLinearAlgebraLibraryType sparse_linear_algebra_library_type =\n        SUITE_SPARSE;\n\n    // See solver.h for information about these flags.\n    bool use_postordering = false;\n    bool dynamic_sparsity = false;\n    bool use_explicit_schur_complement = false;\n\n    // Number of internal iterations that the solver uses. This\n    // parameter only makes sense for iterative solvers like CG.\n    int min_num_iterations = 1;\n    int max_num_iterations = 1;\n\n    // If possible, how many threads can the solver use.\n    int num_threads = 1;\n\n    // Hints about the order in which the parameter blocks should be\n    // eliminated by the linear solver.\n    //\n    // For example if elimination_groups is a vector of size k, then\n    // the linear solver is informed that it should eliminate the\n    // parameter blocks 0 ... elimination_groups[0] - 1 first, and\n    // then elimination_groups[0] ... elimination_groups[1] - 1 and so\n    // on. Within each elimination group, the linear solver is free to\n    // choose how the parameter blocks are ordered. Different linear\n    // solvers have differing requirements on elimination_groups.\n    //\n    // The most common use is for Schur type solvers, where there\n    // should be at least two elimination groups and the first\n    // elimination group must form an independent set in the normal\n    // equations. The first elimination group corresponds to the\n    // num_eliminate_blocks in the Schur type solvers.\n    std::vector<int> elimination_groups;\n\n    // Iterative solvers, e.g. Preconditioned Conjugate Gradients\n    // maintain a cheap estimate of the residual which may become\n    // inaccurate over time. Thus for non-zero values of this\n    // parameter, the solver can be told to recalculate the value of\n    // the residual using a |b - Ax| evaluation.\n    int residual_reset_period = 10;\n\n    // If the block sizes in a BlockSparseMatrix are fixed, then in\n    // some cases the Schur complement based solvers can detect and\n    // specialize on them.\n    //\n    // It is expected that these parameters are set programmatically\n    // rather than manually.\n    //\n    // Please see schur_complement_solver.h and schur_eliminator.h for\n    // more details.\n    int row_block_size = Eigen::Dynamic;\n    int e_block_size = Eigen::Dynamic;\n    int f_block_size = Eigen::Dynamic;\n\n    bool use_mixed_precision_solves = false;\n    int max_num_refinement_iterations = 0;\n    int subset_preconditioner_start_row_block = -1;\n    ContextImpl* context = nullptr;\n  };\n\n  // Options for the Solve method.\n  struct PerSolveOptions {\n    // This option only makes sense for unsymmetric linear solvers\n    // that can solve rectangular linear systems.\n    //\n    // Given a matrix A, an optional diagonal matrix D as a vector,\n    // and a vector b, the linear solver will solve for\n    //\n    //   | A | x = | b |\n    //   | D |     | 0 |\n    //\n    // If D is null, then it is treated as zero, and the solver returns\n    // the solution to\n    //\n    //   A x = b\n    //\n    // In either case, x is the vector that solves the following\n    // optimization problem.\n    //\n    //   arg min_x ||Ax - b||^2 + ||Dx||^2\n    //\n    // Here A is a matrix of size m x n, with full column rank. If A\n    // does not have full column rank, the results returned by the\n    // solver cannot be relied on. D, if it is not null is an array of\n    // size n.  b is an array of size m and x is an array of size n.\n    double* D = nullptr;\n\n    // This option only makes sense for iterative solvers.\n    //\n    // In general the performance of an iterative linear solver\n    // depends on the condition number of the matrix A. For example\n    // the convergence rate of the conjugate gradients algorithm\n    // is proportional to the square root of the condition number.\n    //\n    // One particularly useful technique for improving the\n    // conditioning of a linear system is to precondition it. In its\n    // simplest form a preconditioner is a matrix M such that instead\n    // of solving Ax = b, we solve the linear system AM^{-1} y = b\n    // instead, where M is such that the condition number k(AM^{-1})\n    // is smaller than the conditioner k(A). Given the solution to\n    // this system, x = M^{-1} y. The iterative solver takes care of\n    // the mechanics of solving the preconditioned system and\n    // returning the corrected solution x. The user only needs to\n    // supply a linear operator.\n    //\n    // A null preconditioner is equivalent to an identity matrix being\n    // used a preconditioner.\n    LinearOperator* preconditioner = nullptr;\n\n\n    // The following tolerance related options only makes sense for\n    // iterative solvers. Direct solvers ignore them.\n\n    // Solver terminates when\n    //\n    //   |Ax - b| <= r_tolerance * |b|.\n    //\n    // This is the most commonly used termination criterion for\n    // iterative solvers.\n    double r_tolerance = 0.0;\n\n    // For PSD matrices A, let\n    //\n    //   Q(x) = x'Ax - 2b'x\n    //\n    // be the cost of the quadratic function defined by A and b. Then,\n    // the solver terminates at iteration i if\n    //\n    //   i * (Q(x_i) - Q(x_i-1)) / Q(x_i) < q_tolerance.\n    //\n    // This termination criterion is more useful when using CG to\n    // solve the Newton step. This particular convergence test comes\n    // from Stephen Nash's work on truncated Newton\n    // methods. References:\n    //\n    //   1. Stephen G. Nash & Ariela Sofer, Assessing A Search\n    //      Direction Within A Truncated Newton Method, Operation\n    //      Research Letters 9(1990) 219-221.\n    //\n    //   2. Stephen G. Nash, A Survey of Truncated Newton Methods,\n    //      Journal of Computational and Applied Mathematics,\n    //      124(1-2), 45-59, 2000.\n    //\n    double q_tolerance = 0.0;\n  };\n\n  // Summary of a call to the Solve method. We should move away from\n  // the true/false method for determining solver success. We should\n  // let the summary object do the talking.\n  struct Summary {\n    double residual_norm = -1.0;\n    int num_iterations = -1;\n    LinearSolverTerminationType termination_type = LINEAR_SOLVER_FAILURE;\n    std::string message;\n  };\n\n  // If the optimization problem is such that there are no remaining\n  // e-blocks, a Schur type linear solver cannot be used. If the\n  // linear solver is of Schur type, this function implements a policy\n  // to select an alternate nearest linear solver to the one selected\n  // by the user. The input linear_solver_type is returned otherwise.\n  static LinearSolverType LinearSolverForZeroEBlocks(\n      LinearSolverType linear_solver_type);\n\n  virtual ~LinearSolver();\n\n  // Solve Ax = b.\n  virtual Summary Solve(LinearOperator* A,\n                        const double* b,\n                        const PerSolveOptions& per_solve_options,\n                        double* x) = 0;\n\n  // This method returns copies instead of references so that the base\n  // class implementation does not have to worry about life time\n  // issues. Further, this calls are not expected to be frequent or\n  // performance sensitive.\n  virtual std::map<std::string, CallStatistics> Statistics() const {\n    return std::map<std::string, CallStatistics>();\n  }\n\n  // Factory\n  static LinearSolver* Create(const Options& options);\n};\n\n// This templated subclass of LinearSolver serves as a base class for\n// other linear solvers that depend on the particular matrix layout of\n// the underlying linear operator. For example some linear solvers\n// need low level access to the TripletSparseMatrix implementing the\n// LinearOperator interface. This class hides those implementation\n// details behind a private virtual method, and has the Solve method\n// perform the necessary upcasting.\ntemplate <typename MatrixType>\nclass TypedLinearSolver : public LinearSolver {\n public:\n  virtual ~TypedLinearSolver() {}\n  virtual LinearSolver::Summary Solve(\n      LinearOperator* A,\n      const double* b,\n      const LinearSolver::PerSolveOptions& per_solve_options,\n      double* x) {\n    ScopedExecutionTimer total_time(\"LinearSolver::Solve\", &execution_summary_);\n    CHECK(A != nullptr);\n    CHECK(b != nullptr);\n    CHECK(x != nullptr);\n    return SolveImpl(down_cast<MatrixType*>(A), b, per_solve_options, x);\n  }\n\n  virtual std::map<std::string, CallStatistics> Statistics() const {\n    return execution_summary_.statistics();\n  }\n\n private:\n  virtual LinearSolver::Summary SolveImpl(\n      MatrixType* A,\n      const double* b,\n      const LinearSolver::PerSolveOptions& per_solve_options,\n      double* x) = 0;\n\n  ExecutionSummary execution_summary_;\n};\n\n// Linear solvers that depend on acccess to the low level structure of\n// a SparseMatrix.\ntypedef TypedLinearSolver<BlockSparseMatrix>         BlockSparseMatrixSolver;          // NOLINT\ntypedef TypedLinearSolver<CompressedRowSparseMatrix> CompressedRowSparseMatrixSolver;  // NOLINT\ntypedef TypedLinearSolver<DenseSparseMatrix>         DenseSparseMatrixSolver;          // NOLINT\ntypedef TypedLinearSolver<TripletSparseMatrix>       TripletSparseMatrixSolver;        // NOLINT\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_LINEAR_SOLVER_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/local_parameterization.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/local_parameterization.h\"\n\n#include <algorithm>\n\n#include \"Eigen/Geometry\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/internal/fixed_array.h\"\n#include \"ceres/internal/householder_vector.h\"\n#include \"ceres/rotation.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\n\nusing std::vector;\n\nLocalParameterization::~LocalParameterization() {}\n\nbool LocalParameterization::MultiplyByJacobian(const double* x,\n                                               const int num_rows,\n                                               const double* global_matrix,\n                                               double* local_matrix) const {\n  if (LocalSize() == 0) {\n    return true;\n  }\n\n  Matrix jacobian(GlobalSize(), LocalSize());\n  if (!ComputeJacobian(x, jacobian.data())) {\n    return false;\n  }\n\n  MatrixRef(local_matrix, num_rows, LocalSize()) =\n      ConstMatrixRef(global_matrix, num_rows, GlobalSize()) * jacobian;\n  return true;\n}\n\nIdentityParameterization::IdentityParameterization(const int size)\n    : size_(size) {\n  CHECK_GT(size, 0);\n}\n\nbool IdentityParameterization::Plus(const double* x,\n                                    const double* delta,\n                                    double* x_plus_delta) const {\n  VectorRef(x_plus_delta, size_) =\n      ConstVectorRef(x, size_) + ConstVectorRef(delta, size_);\n  return true;\n}\n\nbool IdentityParameterization::ComputeJacobian(const double* x,\n                                               double* jacobian) const {\n  MatrixRef(jacobian, size_, size_).setIdentity();\n  return true;\n}\n\nbool IdentityParameterization::MultiplyByJacobian(const double* x,\n                                                  const int num_cols,\n                                                  const double* global_matrix,\n                                                  double* local_matrix) const {\n  std::copy(\n      global_matrix, global_matrix + num_cols * GlobalSize(), local_matrix);\n  return true;\n}\n\nSubsetParameterization::SubsetParameterization(\n    int size, const vector<int>& constant_parameters)\n    : local_size_(size - constant_parameters.size()), constancy_mask_(size, 0) {\n  vector<int> constant = constant_parameters;\n  std::sort(constant.begin(), constant.end());\n  CHECK_GE(constant.front(), 0) << \"Indices indicating constant parameter must \"\n                                   \"be greater than equal to zero.\";\n  CHECK_LT(constant.back(), size)\n      << \"Indices indicating constant parameter must be less than the size \"\n      << \"of the parameter block.\";\n  CHECK(std::adjacent_find(constant.begin(), constant.end()) == constant.end())\n      << \"The set of constant parameters cannot contain duplicates\";\n  for (int i = 0; i < constant_parameters.size(); ++i) {\n    constancy_mask_[constant_parameters[i]] = 1;\n  }\n}\n\nbool SubsetParameterization::Plus(const double* x,\n                                  const double* delta,\n                                  double* x_plus_delta) const {\n  const int global_size = GlobalSize();\n  for (int i = 0, j = 0; i < global_size; ++i) {\n    if (constancy_mask_[i]) {\n      x_plus_delta[i] = x[i];\n    } else {\n      x_plus_delta[i] = x[i] + delta[j++];\n    }\n  }\n  return true;\n}\n\nbool SubsetParameterization::ComputeJacobian(const double* x,\n                                             double* jacobian) const {\n  if (local_size_ == 0) {\n    return true;\n  }\n\n  const int global_size = GlobalSize();\n  MatrixRef m(jacobian, global_size, local_size_);\n  m.setZero();\n  for (int i = 0, j = 0; i < global_size; ++i) {\n    if (!constancy_mask_[i]) {\n      m(i, j++) = 1.0;\n    }\n  }\n  return true;\n}\n\nbool SubsetParameterization::MultiplyByJacobian(const double* x,\n                                                const int num_cols,\n                                                const double* global_matrix,\n                                                double* local_matrix) const {\n  if (local_size_ == 0) {\n    return true;\n  }\n\n  const int global_size = GlobalSize();\n  for (int col = 0; col < num_cols; ++col) {\n    for (int i = 0, j = 0; i < global_size; ++i) {\n      if (!constancy_mask_[i]) {\n        local_matrix[col * local_size_ + j++] =\n            global_matrix[col * global_size + i];\n      }\n    }\n  }\n  return true;\n}\n\nbool QuaternionParameterization::Plus(const double* x,\n                                      const double* delta,\n                                      double* x_plus_delta) const {\n  const double norm_delta =\n      sqrt(delta[0] * delta[0] + delta[1] * delta[1] + delta[2] * delta[2]);\n  if (norm_delta > 0.0) {\n    const double sin_delta_by_delta = (sin(norm_delta) / norm_delta);\n    double q_delta[4];\n    q_delta[0] = cos(norm_delta);\n    q_delta[1] = sin_delta_by_delta * delta[0];\n    q_delta[2] = sin_delta_by_delta * delta[1];\n    q_delta[3] = sin_delta_by_delta * delta[2];\n    QuaternionProduct(q_delta, x, x_plus_delta);\n  } else {\n    for (int i = 0; i < 4; ++i) {\n      x_plus_delta[i] = x[i];\n    }\n  }\n  return true;\n}\n\nbool QuaternionParameterization::ComputeJacobian(const double* x,\n                                                 double* jacobian) const {\n  // clang-format off\n  jacobian[0] = -x[1];  jacobian[1]  = -x[2];   jacobian[2]  = -x[3];\n  jacobian[3] =  x[0];  jacobian[4]  =  x[3];   jacobian[5]  = -x[2];\n  jacobian[6] = -x[3];  jacobian[7]  =  x[0];   jacobian[8]  =  x[1];\n  jacobian[9] =  x[2];  jacobian[10] = -x[1];   jacobian[11] =  x[0];\n  // clang-format on\n  return true;\n}\n\nbool EigenQuaternionParameterization::Plus(const double* x_ptr,\n                                           const double* delta,\n                                           double* x_plus_delta_ptr) const {\n  Eigen::Map<Eigen::Quaterniond> x_plus_delta(x_plus_delta_ptr);\n  Eigen::Map<const Eigen::Quaterniond> x(x_ptr);\n\n  const double norm_delta =\n      sqrt(delta[0] * delta[0] + delta[1] * delta[1] + delta[2] * delta[2]);\n  if (norm_delta > 0.0) {\n    const double sin_delta_by_delta = sin(norm_delta) / norm_delta;\n\n    // Note, in the constructor w is first.\n    Eigen::Quaterniond delta_q(cos(norm_delta),\n                               sin_delta_by_delta * delta[0],\n                               sin_delta_by_delta * delta[1],\n                               sin_delta_by_delta * delta[2]);\n    x_plus_delta = delta_q * x;\n  } else {\n    x_plus_delta = x;\n  }\n\n  return true;\n}\n\nbool EigenQuaternionParameterization::ComputeJacobian(const double* x,\n                                                      double* jacobian) const {\n  // clang-format off\n  jacobian[0] =  x[3];  jacobian[1]  =  x[2];  jacobian[2]  = -x[1];\n  jacobian[3] = -x[2];  jacobian[4]  =  x[3];  jacobian[5]  =  x[0];\n  jacobian[6] =  x[1];  jacobian[7]  = -x[0];  jacobian[8]  =  x[3];\n  jacobian[9] = -x[0];  jacobian[10] = -x[1];  jacobian[11] = -x[2];\n  // clang-format on\n  return true;\n}\n\nHomogeneousVectorParameterization::HomogeneousVectorParameterization(int size)\n    : size_(size) {\n  CHECK_GT(size_, 1) << \"The size of the homogeneous vector needs to be \"\n                     << \"greater than 1.\";\n}\n\nbool HomogeneousVectorParameterization::Plus(const double* x_ptr,\n                                             const double* delta_ptr,\n                                             double* x_plus_delta_ptr) const {\n  ConstVectorRef x(x_ptr, size_);\n  ConstVectorRef delta(delta_ptr, size_ - 1);\n  VectorRef x_plus_delta(x_plus_delta_ptr, size_);\n\n  const double norm_delta = delta.norm();\n\n  if (norm_delta == 0.0) {\n    x_plus_delta = x;\n    return true;\n  }\n\n  // Map the delta from the minimum representation to the over parameterized\n  // homogeneous vector. See section A6.9.2 on page 624 of Hartley & Zisserman\n  // (2nd Edition) for a detailed description.  Note there is a typo on Page\n  // 625, line 4 so check the book errata.\n  const double norm_delta_div_2 = 0.5 * norm_delta;\n  const double sin_delta_by_delta =\n      std::sin(norm_delta_div_2) / norm_delta_div_2;\n\n  Vector y(size_);\n  y.head(size_ - 1) = 0.5 * sin_delta_by_delta * delta;\n  y(size_ - 1) = std::cos(norm_delta_div_2);\n\n  Vector v(size_);\n  double beta;\n\n  // NOTE: The explicit template arguments are needed here because\n  // ComputeHouseholderVector is templated and some versions of MSVC\n  // have trouble deducing the type of v automatically.\n  internal::ComputeHouseholderVector<ConstVectorRef, double, Eigen::Dynamic>(\n      x, &v, &beta);\n\n  // Apply the delta update to remain on the unit sphere. See section A6.9.3\n  // on page 625 of Hartley & Zisserman (2nd Edition) for a detailed\n  // description.\n  x_plus_delta = x.norm() * (y - v * (beta * (v.transpose() * y)));\n\n  return true;\n}\n\nbool HomogeneousVectorParameterization::ComputeJacobian(\n    const double* x_ptr, double* jacobian_ptr) const {\n  ConstVectorRef x(x_ptr, size_);\n  MatrixRef jacobian(jacobian_ptr, size_, size_ - 1);\n\n  Vector v(size_);\n  double beta;\n\n  // NOTE: The explicit template arguments are needed here because\n  // ComputeHouseholderVector is templated and some versions of MSVC\n  // have trouble deducing the type of v automatically.\n  internal::ComputeHouseholderVector<ConstVectorRef, double, Eigen::Dynamic>(\n      x, &v, &beta);\n\n  // The Jacobian is equal to J = 0.5 * H.leftCols(size_ - 1) where H is the\n  // Householder matrix (H = I - beta * v * v').\n  for (int i = 0; i < size_ - 1; ++i) {\n    jacobian.col(i) = -0.5 * beta * v(i) * v;\n    jacobian.col(i)(i) += 0.5;\n  }\n  jacobian *= x.norm();\n\n  return true;\n}\n\nbool ProductParameterization::Plus(const double* x,\n                                   const double* delta,\n                                   double* x_plus_delta) const {\n  int x_cursor = 0;\n  int delta_cursor = 0;\n  for (const auto& param : local_params_) {\n    if (!param->Plus(\n            x + x_cursor, delta + delta_cursor, x_plus_delta + x_cursor)) {\n      return false;\n    }\n    delta_cursor += param->LocalSize();\n    x_cursor += param->GlobalSize();\n  }\n\n  return true;\n}\n\nbool ProductParameterization::ComputeJacobian(const double* x,\n                                              double* jacobian_ptr) const {\n  MatrixRef jacobian(jacobian_ptr, GlobalSize(), LocalSize());\n  jacobian.setZero();\n  internal::FixedArray<double> buffer(buffer_size_);\n\n  int x_cursor = 0;\n  int delta_cursor = 0;\n  for (const auto& param : local_params_) {\n    const int local_size = param->LocalSize();\n    const int global_size = param->GlobalSize();\n\n    if (!param->ComputeJacobian(x + x_cursor, buffer.data())) {\n      return false;\n    }\n    jacobian.block(x_cursor, delta_cursor, global_size, local_size) =\n        MatrixRef(buffer.data(), global_size, local_size);\n\n    delta_cursor += local_size;\n    x_cursor += global_size;\n  }\n\n  return true;\n}\n\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/local_parameterization_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/local_parameterization.h\"\n\n#include <cmath>\n#include <limits>\n#include <memory>\n\n#include \"Eigen/Geometry\"\n#include \"ceres/autodiff_local_parameterization.h\"\n#include \"ceres/internal/autodiff.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/internal/householder_vector.h\"\n#include \"ceres/random.h\"\n#include \"ceres/rotation.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nTEST(IdentityParameterization, EverythingTest) {\n  IdentityParameterization parameterization(3);\n  EXPECT_EQ(parameterization.GlobalSize(), 3);\n  EXPECT_EQ(parameterization.LocalSize(), 3);\n\n  double x[3] = {1.0, 2.0, 3.0};\n  double delta[3] = {0.0, 1.0, 2.0};\n  double x_plus_delta[3] = {0.0, 0.0, 0.0};\n  parameterization.Plus(x, delta, x_plus_delta);\n  EXPECT_EQ(x_plus_delta[0], 1.0);\n  EXPECT_EQ(x_plus_delta[1], 3.0);\n  EXPECT_EQ(x_plus_delta[2], 5.0);\n\n  double jacobian[9];\n  parameterization.ComputeJacobian(x, jacobian);\n  int k = 0;\n  for (int i = 0; i < 3; ++i) {\n    for (int j = 0; j < 3; ++j, ++k) {\n      EXPECT_EQ(jacobian[k], (i == j) ? 1.0 : 0.0);\n    }\n  }\n\n  Matrix global_matrix = Matrix::Ones(10, 3);\n  Matrix local_matrix = Matrix::Zero(10, 3);\n  parameterization.MultiplyByJacobian(\n      x, 10, global_matrix.data(), local_matrix.data());\n  EXPECT_EQ((local_matrix - global_matrix).norm(), 0.0);\n}\n\nTEST(SubsetParameterization, NegativeParameterIndexDeathTest) {\n  std::vector<int> constant_parameters;\n  constant_parameters.push_back(-1);\n  EXPECT_DEATH_IF_SUPPORTED(\n      SubsetParameterization parameterization(2, constant_parameters),\n      \"greater than equal to zero\");\n}\n\nTEST(SubsetParameterization, GreaterThanSizeParameterIndexDeathTest) {\n  std::vector<int> constant_parameters;\n  constant_parameters.push_back(2);\n  EXPECT_DEATH_IF_SUPPORTED(\n      SubsetParameterization parameterization(2, constant_parameters),\n      \"less than the size\");\n}\n\nTEST(SubsetParameterization, DuplicateParametersDeathTest) {\n  std::vector<int> constant_parameters;\n  constant_parameters.push_back(1);\n  constant_parameters.push_back(1);\n  EXPECT_DEATH_IF_SUPPORTED(\n      SubsetParameterization parameterization(2, constant_parameters),\n      \"duplicates\");\n}\n\nTEST(SubsetParameterization,\n     ProductParameterizationWithZeroLocalSizeSubsetParameterization1) {\n  std::vector<int> constant_parameters;\n  constant_parameters.push_back(0);\n  LocalParameterization* subset_param =\n      new SubsetParameterization(1, constant_parameters);\n  LocalParameterization* identity_param = new IdentityParameterization(2);\n  ProductParameterization product_param(subset_param, identity_param);\n  EXPECT_EQ(product_param.GlobalSize(), 3);\n  EXPECT_EQ(product_param.LocalSize(), 2);\n  double x[] = {1.0, 1.0, 1.0};\n  double delta[] = {2.0, 3.0};\n  double x_plus_delta[] = {0.0, 0.0, 0.0};\n  EXPECT_TRUE(product_param.Plus(x, delta, x_plus_delta));\n  EXPECT_EQ(x_plus_delta[0], x[0]);\n  EXPECT_EQ(x_plus_delta[1], x[1] + delta[0]);\n  EXPECT_EQ(x_plus_delta[2], x[2] + delta[1]);\n\n  Matrix actual_jacobian(3, 2);\n  EXPECT_TRUE(product_param.ComputeJacobian(x, actual_jacobian.data()));\n}\n\nTEST(SubsetParameterization,\n     ProductParameterizationWithZeroLocalSizeSubsetParameterization2) {\n  std::vector<int> constant_parameters;\n  constant_parameters.push_back(0);\n  LocalParameterization* subset_param =\n      new SubsetParameterization(1, constant_parameters);\n  LocalParameterization* identity_param = new IdentityParameterization(2);\n  ProductParameterization product_param(identity_param, subset_param);\n  EXPECT_EQ(product_param.GlobalSize(), 3);\n  EXPECT_EQ(product_param.LocalSize(), 2);\n  double x[] = {1.0, 1.0, 1.0};\n  double delta[] = {2.0, 3.0};\n  double x_plus_delta[] = {0.0, 0.0, 0.0};\n  EXPECT_TRUE(product_param.Plus(x, delta, x_plus_delta));\n  EXPECT_EQ(x_plus_delta[0], x[0] + delta[0]);\n  EXPECT_EQ(x_plus_delta[1], x[1] + delta[1]);\n  EXPECT_EQ(x_plus_delta[2], x[2]);\n\n  Matrix actual_jacobian(3, 2);\n  EXPECT_TRUE(product_param.ComputeJacobian(x, actual_jacobian.data()));\n}\n\nTEST(SubsetParameterization, NormalFunctionTest) {\n  const int kGlobalSize = 4;\n  const int kLocalSize = 3;\n\n  double x[kGlobalSize] = {1.0, 2.0, 3.0, 4.0};\n  for (int i = 0; i < kGlobalSize; ++i) {\n    std::vector<int> constant_parameters;\n    constant_parameters.push_back(i);\n    SubsetParameterization parameterization(kGlobalSize, constant_parameters);\n    double delta[kLocalSize] = {1.0, 2.0, 3.0};\n    double x_plus_delta[kGlobalSize] = {0.0, 0.0, 0.0};\n\n    parameterization.Plus(x, delta, x_plus_delta);\n    int k = 0;\n    for (int j = 0; j < kGlobalSize; ++j) {\n      if (j == i) {\n        EXPECT_EQ(x_plus_delta[j], x[j]);\n      } else {\n        EXPECT_EQ(x_plus_delta[j], x[j] + delta[k++]);\n      }\n    }\n\n    double jacobian[kGlobalSize * kLocalSize];\n    parameterization.ComputeJacobian(x, jacobian);\n    int delta_cursor = 0;\n    int jacobian_cursor = 0;\n    for (int j = 0; j < kGlobalSize; ++j) {\n      if (j != i) {\n        for (int k = 0; k < kLocalSize; ++k, jacobian_cursor++) {\n          EXPECT_EQ(jacobian[jacobian_cursor], delta_cursor == k ? 1.0 : 0.0);\n        }\n        ++delta_cursor;\n      } else {\n        for (int k = 0; k < kLocalSize; ++k, jacobian_cursor++) {\n          EXPECT_EQ(jacobian[jacobian_cursor], 0.0);\n        }\n      }\n    }\n\n    Matrix global_matrix = Matrix::Ones(10, kGlobalSize);\n    for (int row = 0; row < kGlobalSize; ++row) {\n      for (int col = 0; col < kGlobalSize; ++col) {\n        global_matrix(row, col) = col;\n      }\n    }\n\n    Matrix local_matrix = Matrix::Zero(10, kLocalSize);\n    parameterization.MultiplyByJacobian(\n        x, 10, global_matrix.data(), local_matrix.data());\n    Matrix expected_local_matrix =\n        global_matrix * MatrixRef(jacobian, kGlobalSize, kLocalSize);\n    EXPECT_EQ((local_matrix - expected_local_matrix).norm(), 0.0);\n  }\n}\n\n// Functor needed to implement automatically differentiated Plus for\n// quaternions.\nstruct QuaternionPlus {\n  template <typename T>\n  bool operator()(const T* x, const T* delta, T* x_plus_delta) const {\n    const T squared_norm_delta =\n        delta[0] * delta[0] + delta[1] * delta[1] + delta[2] * delta[2];\n\n    T q_delta[4];\n    if (squared_norm_delta > T(0.0)) {\n      T norm_delta = sqrt(squared_norm_delta);\n      const T sin_delta_by_delta = sin(norm_delta) / norm_delta;\n      q_delta[0] = cos(norm_delta);\n      q_delta[1] = sin_delta_by_delta * delta[0];\n      q_delta[2] = sin_delta_by_delta * delta[1];\n      q_delta[3] = sin_delta_by_delta * delta[2];\n    } else {\n      // We do not just use q_delta = [1,0,0,0] here because that is a\n      // constant and when used for automatic differentiation will\n      // lead to a zero derivative. Instead we take a first order\n      // approximation and evaluate it at zero.\n      q_delta[0] = T(1.0);\n      q_delta[1] = delta[0];\n      q_delta[2] = delta[1];\n      q_delta[3] = delta[2];\n    }\n\n    QuaternionProduct(q_delta, x, x_plus_delta);\n    return true;\n  }\n};\n\ntemplate <typename Parameterization, typename Plus>\nvoid QuaternionParameterizationTestHelper(const double* x,\n                                          const double* delta,\n                                          const double* x_plus_delta_ref) {\n  const int kGlobalSize = 4;\n  const int kLocalSize = 3;\n\n  const double kTolerance = 1e-14;\n\n  double x_plus_delta[kGlobalSize] = {0.0, 0.0, 0.0, 0.0};\n  Parameterization parameterization;\n  parameterization.Plus(x, delta, x_plus_delta);\n  for (int i = 0; i < kGlobalSize; ++i) {\n    EXPECT_NEAR(x_plus_delta[i], x_plus_delta[i], kTolerance);\n  }\n\n  const double x_plus_delta_norm = sqrt(\n      x_plus_delta[0] * x_plus_delta[0] + x_plus_delta[1] * x_plus_delta[1] +\n      x_plus_delta[2] * x_plus_delta[2] + x_plus_delta[3] * x_plus_delta[3]);\n\n  EXPECT_NEAR(x_plus_delta_norm, 1.0, kTolerance);\n\n  double jacobian_ref[12];\n  double zero_delta[kLocalSize] = {0.0, 0.0, 0.0};\n  const double* parameters[2] = {x, zero_delta};\n  double* jacobian_array[2] = {NULL, jacobian_ref};\n\n  // Autodiff jacobian at delta_x = 0.\n  internal::AutoDifferentiate<kGlobalSize,\n                              StaticParameterDims<kGlobalSize, kLocalSize>>(\n      Plus(), parameters, kGlobalSize, x_plus_delta, jacobian_array);\n\n  double jacobian[12];\n  parameterization.ComputeJacobian(x, jacobian);\n  for (int i = 0; i < 12; ++i) {\n    EXPECT_TRUE(IsFinite(jacobian[i]));\n    EXPECT_NEAR(jacobian[i], jacobian_ref[i], kTolerance)\n        << \"Jacobian mismatch: i = \" << i << \"\\n Expected \\n\"\n        << ConstMatrixRef(jacobian_ref, kGlobalSize, kLocalSize)\n        << \"\\n Actual \\n\"\n        << ConstMatrixRef(jacobian, kGlobalSize, kLocalSize);\n  }\n\n  Matrix global_matrix = Matrix::Random(10, kGlobalSize);\n  Matrix local_matrix = Matrix::Zero(10, kLocalSize);\n  parameterization.MultiplyByJacobian(\n      x, 10, global_matrix.data(), local_matrix.data());\n  Matrix expected_local_matrix =\n      global_matrix * MatrixRef(jacobian, kGlobalSize, kLocalSize);\n  EXPECT_NEAR((local_matrix - expected_local_matrix).norm(),\n              0.0,\n              10.0 * std::numeric_limits<double>::epsilon());\n}\n\ntemplate <int N>\nvoid Normalize(double* x) {\n  VectorRef(x, N).normalize();\n}\n\nTEST(QuaternionParameterization, ZeroTest) {\n  double x[4] = {0.5, 0.5, 0.5, 0.5};\n  double delta[3] = {0.0, 0.0, 0.0};\n  double q_delta[4] = {1.0, 0.0, 0.0, 0.0};\n  double x_plus_delta[4] = {0.0, 0.0, 0.0, 0.0};\n  QuaternionProduct(q_delta, x, x_plus_delta);\n  QuaternionParameterizationTestHelper<QuaternionParameterization,\n                                       QuaternionPlus>(x, delta, x_plus_delta);\n}\n\nTEST(QuaternionParameterization, NearZeroTest) {\n  double x[4] = {0.52, 0.25, 0.15, 0.45};\n  Normalize<4>(x);\n\n  double delta[3] = {0.24, 0.15, 0.10};\n  for (int i = 0; i < 3; ++i) {\n    delta[i] = delta[i] * 1e-14;\n  }\n\n  double q_delta[4];\n  q_delta[0] = 1.0;\n  q_delta[1] = delta[0];\n  q_delta[2] = delta[1];\n  q_delta[3] = delta[2];\n\n  double x_plus_delta[4] = {0.0, 0.0, 0.0, 0.0};\n  QuaternionProduct(q_delta, x, x_plus_delta);\n  QuaternionParameterizationTestHelper<QuaternionParameterization,\n                                       QuaternionPlus>(x, delta, x_plus_delta);\n}\n\nTEST(QuaternionParameterization, AwayFromZeroTest) {\n  double x[4] = {0.52, 0.25, 0.15, 0.45};\n  Normalize<4>(x);\n\n  double delta[3] = {0.24, 0.15, 0.10};\n  const double delta_norm =\n      sqrt(delta[0] * delta[0] + delta[1] * delta[1] + delta[2] * delta[2]);\n  double q_delta[4];\n  q_delta[0] = cos(delta_norm);\n  q_delta[1] = sin(delta_norm) / delta_norm * delta[0];\n  q_delta[2] = sin(delta_norm) / delta_norm * delta[1];\n  q_delta[3] = sin(delta_norm) / delta_norm * delta[2];\n\n  double x_plus_delta[4] = {0.0, 0.0, 0.0, 0.0};\n  QuaternionProduct(q_delta, x, x_plus_delta);\n  QuaternionParameterizationTestHelper<QuaternionParameterization,\n                                       QuaternionPlus>(x, delta, x_plus_delta);\n}\n\n// Functor needed to implement automatically differentiated Plus for\n// Eigen's quaternion.\nstruct EigenQuaternionPlus {\n  template <typename T>\n  bool operator()(const T* x, const T* delta, T* x_plus_delta) const {\n    const T norm_delta =\n        sqrt(delta[0] * delta[0] + delta[1] * delta[1] + delta[2] * delta[2]);\n\n    Eigen::Quaternion<T> q_delta;\n    if (norm_delta > T(0.0)) {\n      const T sin_delta_by_delta = sin(norm_delta) / norm_delta;\n      q_delta.coeffs() << sin_delta_by_delta * delta[0],\n          sin_delta_by_delta * delta[1], sin_delta_by_delta * delta[2],\n          cos(norm_delta);\n    } else {\n      // We do not just use q_delta = [0,0,0,1] here because that is a\n      // constant and when used for automatic differentiation will\n      // lead to a zero derivative. Instead we take a first order\n      // approximation and evaluate it at zero.\n      q_delta.coeffs() << delta[0], delta[1], delta[2], T(1.0);\n    }\n\n    Eigen::Map<Eigen::Quaternion<T>> x_plus_delta_ref(x_plus_delta);\n    Eigen::Map<const Eigen::Quaternion<T>> x_ref(x);\n    x_plus_delta_ref = q_delta * x_ref;\n    return true;\n  }\n};\n\nTEST(EigenQuaternionParameterization, ZeroTest) {\n  Eigen::Quaterniond x(0.5, 0.5, 0.5, 0.5);\n  double delta[3] = {0.0, 0.0, 0.0};\n  Eigen::Quaterniond q_delta(1.0, 0.0, 0.0, 0.0);\n  Eigen::Quaterniond x_plus_delta = q_delta * x;\n  QuaternionParameterizationTestHelper<EigenQuaternionParameterization,\n                                       EigenQuaternionPlus>(\n      x.coeffs().data(), delta, x_plus_delta.coeffs().data());\n}\n\nTEST(EigenQuaternionParameterization, NearZeroTest) {\n  Eigen::Quaterniond x(0.52, 0.25, 0.15, 0.45);\n  x.normalize();\n\n  double delta[3] = {0.24, 0.15, 0.10};\n  for (int i = 0; i < 3; ++i) {\n    delta[i] = delta[i] * 1e-14;\n  }\n\n  // Note: w is first in the constructor.\n  Eigen::Quaterniond q_delta(1.0, delta[0], delta[1], delta[2]);\n\n  Eigen::Quaterniond x_plus_delta = q_delta * x;\n  QuaternionParameterizationTestHelper<EigenQuaternionParameterization,\n                                       EigenQuaternionPlus>(\n      x.coeffs().data(), delta, x_plus_delta.coeffs().data());\n}\n\nTEST(EigenQuaternionParameterization, AwayFromZeroTest) {\n  Eigen::Quaterniond x(0.52, 0.25, 0.15, 0.45);\n  x.normalize();\n\n  double delta[3] = {0.24, 0.15, 0.10};\n  const double delta_norm =\n      sqrt(delta[0] * delta[0] + delta[1] * delta[1] + delta[2] * delta[2]);\n\n  // Note: w is first in the constructor.\n  Eigen::Quaterniond q_delta(cos(delta_norm),\n                             sin(delta_norm) / delta_norm * delta[0],\n                             sin(delta_norm) / delta_norm * delta[1],\n                             sin(delta_norm) / delta_norm * delta[2]);\n\n  Eigen::Quaterniond x_plus_delta = q_delta * x;\n  QuaternionParameterizationTestHelper<EigenQuaternionParameterization,\n                                       EigenQuaternionPlus>(\n      x.coeffs().data(), delta, x_plus_delta.coeffs().data());\n}\n\n// Functor needed to implement automatically differentiated Plus for\n// homogeneous vectors.\ntemplate <int Dim>\nstruct HomogeneousVectorParameterizationPlus {\n  template <typename Scalar>\n  bool operator()(const Scalar* p_x,\n                  const Scalar* p_delta,\n                  Scalar* p_x_plus_delta) const {\n    Eigen::Map<const Eigen::Matrix<Scalar, Dim, 1>> x(p_x);\n    Eigen::Map<const Eigen::Matrix<Scalar, Dim - 1, 1>> delta(p_delta);\n    Eigen::Map<Eigen::Matrix<Scalar, Dim, 1>> x_plus_delta(p_x_plus_delta);\n\n    const Scalar squared_norm_delta = delta.squaredNorm();\n\n    Eigen::Matrix<Scalar, Dim, 1> y;\n    Scalar one_half(0.5);\n    if (squared_norm_delta > Scalar(0.0)) {\n      Scalar norm_delta = sqrt(squared_norm_delta);\n      Scalar norm_delta_div_2 = 0.5 * norm_delta;\n      const Scalar sin_delta_by_delta =\n          sin(norm_delta_div_2) / norm_delta_div_2;\n      y.template head<Dim - 1>() = sin_delta_by_delta * one_half * delta;\n      y[Dim - 1] = cos(norm_delta_div_2);\n\n    } else {\n      // We do not just use y = [0,0,0,1] here because that is a\n      // constant and when used for automatic differentiation will\n      // lead to a zero derivative. Instead we take a first order\n      // approximation and evaluate it at zero.\n      y.template head<Dim - 1>() = delta * one_half;\n      y[Dim - 1] = Scalar(1.0);\n    }\n\n    Eigen::Matrix<Scalar, Dim, 1> v;\n    Scalar beta;\n\n    // NOTE: The explicit template arguments are needed here because\n    // ComputeHouseholderVector is templated and some versions of MSVC\n    // have trouble deducing the type of v automatically.\n    internal::ComputeHouseholderVector<\n        Eigen::Map<const Eigen::Matrix<Scalar, Dim, 1>>,\n        Scalar,\n        Dim>(x, &v, &beta);\n\n    x_plus_delta = x.norm() * (y - v * (beta * v.dot(y)));\n\n    return true;\n  }\n};\n\nstatic void HomogeneousVectorParameterizationHelper(const double* x,\n                                                    const double* delta) {\n  const double kTolerance = 1e-14;\n\n  HomogeneousVectorParameterization homogeneous_vector_parameterization(4);\n\n  // Ensure the update maintains the norm.\n  double x_plus_delta[4] = {0.0, 0.0, 0.0, 0.0};\n  homogeneous_vector_parameterization.Plus(x, delta, x_plus_delta);\n\n  const double x_plus_delta_norm = sqrt(\n      x_plus_delta[0] * x_plus_delta[0] + x_plus_delta[1] * x_plus_delta[1] +\n      x_plus_delta[2] * x_plus_delta[2] + x_plus_delta[3] * x_plus_delta[3]);\n\n  const double x_norm =\n      sqrt(x[0] * x[0] + x[1] * x[1] + x[2] * x[2] + x[3] * x[3]);\n\n  EXPECT_NEAR(x_plus_delta_norm, x_norm, kTolerance);\n\n  // Autodiff jacobian at delta_x = 0.\n  AutoDiffLocalParameterization<HomogeneousVectorParameterizationPlus<4>, 4, 3>\n      autodiff_jacobian;\n\n  double jacobian_autodiff[12];\n  double jacobian_analytic[12];\n\n  homogeneous_vector_parameterization.ComputeJacobian(x, jacobian_analytic);\n  autodiff_jacobian.ComputeJacobian(x, jacobian_autodiff);\n\n  for (int i = 0; i < 12; ++i) {\n    EXPECT_TRUE(ceres::IsFinite(jacobian_analytic[i]));\n    EXPECT_NEAR(jacobian_analytic[i], jacobian_autodiff[i], kTolerance)\n        << \"Jacobian mismatch: i = \" << i << \", \" << jacobian_analytic[i] << \" \"\n        << jacobian_autodiff[i];\n  }\n}\n\nTEST(HomogeneousVectorParameterization, ZeroTest) {\n  double x[4] = {0.0, 0.0, 0.0, 1.0};\n  Normalize<4>(x);\n  double delta[3] = {0.0, 0.0, 0.0};\n\n  HomogeneousVectorParameterizationHelper(x, delta);\n}\n\nTEST(HomogeneousVectorParameterization, NearZeroTest1) {\n  double x[4] = {1e-5, 1e-5, 1e-5, 1.0};\n  Normalize<4>(x);\n  double delta[3] = {0.0, 1.0, 0.0};\n\n  HomogeneousVectorParameterizationHelper(x, delta);\n}\n\nTEST(HomogeneousVectorParameterization, NearZeroTest2) {\n  double x[4] = {0.001, 0.0, 0.0, 0.0};\n  double delta[3] = {0.0, 1.0, 0.0};\n\n  HomogeneousVectorParameterizationHelper(x, delta);\n}\n\nTEST(HomogeneousVectorParameterization, AwayFromZeroTest1) {\n  double x[4] = {0.52, 0.25, 0.15, 0.45};\n  Normalize<4>(x);\n  double delta[3] = {0.0, 1.0, -0.5};\n\n  HomogeneousVectorParameterizationHelper(x, delta);\n}\n\nTEST(HomogeneousVectorParameterization, AwayFromZeroTest2) {\n  double x[4] = {0.87, -0.25, -0.34, 0.45};\n  Normalize<4>(x);\n  double delta[3] = {0.0, 0.0, -0.5};\n\n  HomogeneousVectorParameterizationHelper(x, delta);\n}\n\nTEST(HomogeneousVectorParameterization, AwayFromZeroTest3) {\n  double x[4] = {0.0, 0.0, 0.0, 2.0};\n  double delta[3] = {0.0, 0.0, 0};\n\n  HomogeneousVectorParameterizationHelper(x, delta);\n}\n\nTEST(HomogeneousVectorParameterization, AwayFromZeroTest4) {\n  double x[4] = {0.2, -1.0, 0.0, 2.0};\n  double delta[3] = {1.4, 0.0, -0.5};\n\n  HomogeneousVectorParameterizationHelper(x, delta);\n}\n\nTEST(HomogeneousVectorParameterization, AwayFromZeroTest5) {\n  double x[4] = {2.0, 0.0, 0.0, 0.0};\n  double delta[3] = {1.4, 0.0, -0.5};\n\n  HomogeneousVectorParameterizationHelper(x, delta);\n}\n\nTEST(HomogeneousVectorParameterization, DeathTests) {\n  EXPECT_DEATH_IF_SUPPORTED(HomogeneousVectorParameterization x(1), \"size\");\n}\n\n// Functor needed to implement automatically differentiated Plus for\n// line parameterization.\ntemplate <int AmbientSpaceDim>\nstruct LineParameterizationPlus {\n  template <typename Scalar>\n  bool operator()(const Scalar* p_x,\n                  const Scalar* p_delta,\n                  Scalar* p_x_plus_delta) const {\n    static constexpr int kTangetSpaceDim = AmbientSpaceDim - 1;\n    Eigen::Map<const Eigen::Matrix<Scalar, AmbientSpaceDim, 1>> origin_point(\n        p_x);\n    Eigen::Map<const Eigen::Matrix<Scalar, AmbientSpaceDim, 1>> dir(\n        p_x + AmbientSpaceDim);\n    Eigen::Map<const Eigen::Matrix<Scalar, kTangetSpaceDim, 1>>\n        delta_origin_point(p_delta);\n    Eigen::Map<Eigen::Matrix<Scalar, AmbientSpaceDim, 1>>\n        origin_point_plus_delta(p_x_plus_delta);\n\n    HomogeneousVectorParameterizationPlus<AmbientSpaceDim> dir_plus;\n    dir_plus(dir.data(),\n             p_delta + kTangetSpaceDim,\n             p_x_plus_delta + AmbientSpaceDim);\n\n    Eigen::Matrix<Scalar, AmbientSpaceDim, 1> v;\n    Scalar beta;\n\n    // NOTE: The explicit template arguments are needed here because\n    // ComputeHouseholderVector is templated and some versions of MSVC\n    // have trouble deducing the type of v automatically.\n    internal::ComputeHouseholderVector<\n        Eigen::Map<const Eigen::Matrix<Scalar, AmbientSpaceDim, 1>>,\n        Scalar,\n        AmbientSpaceDim>(dir, &v, &beta);\n\n    Eigen::Matrix<Scalar, AmbientSpaceDim, 1> y;\n    y << 0.5 * delta_origin_point, Scalar(0.0);\n    origin_point_plus_delta = origin_point + y - v * (beta * v.dot(y));\n\n    return true;\n  }\n};\n\ntemplate <int AmbientSpaceDim>\nstatic void LineParameterizationHelper(const double* x_ptr,\n                                       const double* delta) {\n  const double kTolerance = 1e-14;\n\n  static constexpr int ParameterDim = 2 * AmbientSpaceDim;\n  static constexpr int TangientParameterDim = 2 * (AmbientSpaceDim - 1);\n\n  LineParameterization<AmbientSpaceDim> line_parameterization;\n\n  using ParameterVector = Eigen::Matrix<double, ParameterDim, 1>;\n  ParameterVector x_plus_delta = ParameterVector::Zero();\n  line_parameterization.Plus(x_ptr, delta, x_plus_delta.data());\n\n  // Ensure the update maintains the norm for the line direction.\n  Eigen::Map<const ParameterVector> x(x_ptr);\n  const double dir_plus_delta_norm =\n      x_plus_delta.template tail<AmbientSpaceDim>().norm();\n  const double dir_norm = x.template tail<AmbientSpaceDim>().norm();\n  EXPECT_NEAR(dir_plus_delta_norm, dir_norm, kTolerance);\n\n  // Ensure the update of the origin point is perpendicular to the line\n  // direction.\n  const double dot_prod_val = x.template tail<AmbientSpaceDim>().dot(\n      x_plus_delta.template head<AmbientSpaceDim>() -\n      x.template head<AmbientSpaceDim>());\n  EXPECT_NEAR(dot_prod_val, 0.0, kTolerance);\n\n  // Autodiff jacobian at delta_x = 0.\n  AutoDiffLocalParameterization<LineParameterizationPlus<AmbientSpaceDim>,\n                                ParameterDim,\n                                TangientParameterDim>\n      autodiff_jacobian;\n\n  using JacobianMatrix = Eigen::\n      Matrix<double, ParameterDim, TangientParameterDim, Eigen::RowMajor>;\n  constexpr double kNaN = std::numeric_limits<double>::quiet_NaN();\n  JacobianMatrix jacobian_autodiff = JacobianMatrix::Constant(kNaN);\n  JacobianMatrix jacobian_analytic = JacobianMatrix::Constant(kNaN);\n\n  autodiff_jacobian.ComputeJacobian(x_ptr, jacobian_autodiff.data());\n  line_parameterization.ComputeJacobian(x_ptr, jacobian_analytic.data());\n\n  EXPECT_FALSE(jacobian_autodiff.hasNaN());\n  EXPECT_FALSE(jacobian_analytic.hasNaN());\n  EXPECT_TRUE(jacobian_autodiff.isApprox(jacobian_analytic))\n      << \"auto diff:\\n\"\n      << jacobian_autodiff << \"\\n\"\n      << \"analytic diff:\\n\"\n      << jacobian_analytic;\n}\n\nTEST(LineParameterization, ZeroTest3D) {\n  double x[6] = {0.0, 0.0, 0.0, 0.0, 0.0, 1.0};\n  double delta[4] = {0.0, 0.0, 0.0, 0.0};\n\n  LineParameterizationHelper<3>(x, delta);\n}\n\nTEST(LineParameterization, ZeroTest4D) {\n  double x[8] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0};\n  double delta[6] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0};\n\n  LineParameterizationHelper<4>(x, delta);\n}\n\nTEST(LineParameterization, ZeroOriginPointTest3D) {\n  double x[6] = {0.0, 0.0, 0.0, 0.0, 0.0, 1.0};\n  double delta[4] = {0.0, 0.0, 1.0, 2.0};\n\n  LineParameterizationHelper<3>(x, delta);\n}\n\nTEST(LineParameterization, ZeroOriginPointTest4D) {\n  double x[8] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0};\n  double delta[6] = {0.0, 0.0, 0.0, 1.0, 2.0, 3.0};\n\n  LineParameterizationHelper<4>(x, delta);\n}\n\nTEST(LineParameterization, ZeroDirTest3D) {\n  double x[6] = {0.0, 0.0, 0.0, 0.0, 0.0, 1.0};\n  double delta[4] = {3.0, 2.0, 0.0, 0.0};\n\n  LineParameterizationHelper<3>(x, delta);\n}\n\nTEST(LineParameterization, ZeroDirTest4D) {\n  double x[8] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0};\n  double delta[6] = {3.0, 2.0, 1.0, 0.0, 0.0, 0.0};\n\n  LineParameterizationHelper<4>(x, delta);\n}\n\nTEST(LineParameterization, AwayFromZeroTest3D1) {\n  Eigen::Matrix<double, 6, 1> x;\n  x.head<3>() << 1.54, 2.32, 1.34;\n  x.tail<3>() << 0.52, 0.25, 0.15;\n  x.tail<3>().normalize();\n\n  double delta[4] = {4.0, 7.0, 1.0, -0.5};\n\n  LineParameterizationHelper<3>(x.data(), delta);\n}\n\nTEST(LineParameterization, AwayFromZeroTest4D1) {\n  Eigen::Matrix<double, 8, 1> x;\n  x.head<4>() << 1.54, 2.32, 1.34, 3.23;\n  x.tail<4>() << 0.52, 0.25, 0.15, 0.45;\n  x.tail<4>().normalize();\n\n  double delta[6] = {4.0, 7.0, -3.0, 0.0, 1.0, -0.5};\n\n  LineParameterizationHelper<4>(x.data(), delta);\n}\n\nTEST(LineParameterization, AwayFromZeroTest3D2) {\n  Eigen::Matrix<double, 6, 1> x;\n  x.head<3>() << 7.54, -2.81, 8.63;\n  x.tail<3>() << 2.52, 5.25, 4.15;\n\n  double delta[4] = {4.0, 7.0, 1.0, -0.5};\n\n  LineParameterizationHelper<3>(x.data(), delta);\n}\n\nTEST(LineParameterization, AwayFromZeroTest4D2) {\n  Eigen::Matrix<double, 8, 1> x;\n  x.head<4>() << 7.54, -2.81, 8.63, 6.93;\n  x.tail<4>() << 2.52, 5.25, 4.15, 1.45;\n\n  double delta[6] = {4.0, 7.0, -3.0, 2.0, 1.0, -0.5};\n\n  LineParameterizationHelper<4>(x.data(), delta);\n}\n\nclass ProductParameterizationTest : public ::testing::Test {\n protected:\n  void SetUp() final {\n    const int global_size1 = 5;\n    std::vector<int> constant_parameters1;\n    constant_parameters1.push_back(2);\n    param1_.reset(\n        new SubsetParameterization(global_size1, constant_parameters1));\n\n    const int global_size2 = 3;\n    std::vector<int> constant_parameters2;\n    constant_parameters2.push_back(0);\n    constant_parameters2.push_back(1);\n    param2_.reset(\n        new SubsetParameterization(global_size2, constant_parameters2));\n\n    const int global_size3 = 4;\n    std::vector<int> constant_parameters3;\n    constant_parameters3.push_back(1);\n    param3_.reset(\n        new SubsetParameterization(global_size3, constant_parameters3));\n\n    const int global_size4 = 2;\n    std::vector<int> constant_parameters4;\n    constant_parameters4.push_back(1);\n    param4_.reset(\n        new SubsetParameterization(global_size4, constant_parameters4));\n  }\n\n  std::unique_ptr<LocalParameterization> param1_;\n  std::unique_ptr<LocalParameterization> param2_;\n  std::unique_ptr<LocalParameterization> param3_;\n  std::unique_ptr<LocalParameterization> param4_;\n};\n\nTEST_F(ProductParameterizationTest, LocalAndGlobalSize2) {\n  LocalParameterization* param1 = param1_.release();\n  LocalParameterization* param2 = param2_.release();\n\n  ProductParameterization product_param(param1, param2);\n  EXPECT_EQ(product_param.LocalSize(),\n            param1->LocalSize() + param2->LocalSize());\n  EXPECT_EQ(product_param.GlobalSize(),\n            param1->GlobalSize() + param2->GlobalSize());\n}\n\nTEST_F(ProductParameterizationTest, LocalAndGlobalSize3) {\n  LocalParameterization* param1 = param1_.release();\n  LocalParameterization* param2 = param2_.release();\n  LocalParameterization* param3 = param3_.release();\n\n  ProductParameterization product_param(param1, param2, param3);\n  EXPECT_EQ(product_param.LocalSize(),\n            param1->LocalSize() + param2->LocalSize() + param3->LocalSize());\n  EXPECT_EQ(product_param.GlobalSize(),\n            param1->GlobalSize() + param2->GlobalSize() + param3->GlobalSize());\n}\n\nTEST_F(ProductParameterizationTest, LocalAndGlobalSize4) {\n  LocalParameterization* param1 = param1_.release();\n  LocalParameterization* param2 = param2_.release();\n  LocalParameterization* param3 = param3_.release();\n  LocalParameterization* param4 = param4_.release();\n\n  ProductParameterization product_param(param1, param2, param3, param4);\n  EXPECT_EQ(product_param.LocalSize(),\n            param1->LocalSize() + param2->LocalSize() + param3->LocalSize() +\n                param4->LocalSize());\n  EXPECT_EQ(product_param.GlobalSize(),\n            param1->GlobalSize() + param2->GlobalSize() + param3->GlobalSize() +\n                param4->GlobalSize());\n}\n\nTEST_F(ProductParameterizationTest, Plus) {\n  LocalParameterization* param1 = param1_.release();\n  LocalParameterization* param2 = param2_.release();\n  LocalParameterization* param3 = param3_.release();\n  LocalParameterization* param4 = param4_.release();\n\n  ProductParameterization product_param(param1, param2, param3, param4);\n  std::vector<double> x(product_param.GlobalSize(), 0.0);\n  std::vector<double> delta(product_param.LocalSize(), 0.0);\n  std::vector<double> x_plus_delta_expected(product_param.GlobalSize(), 0.0);\n  std::vector<double> x_plus_delta(product_param.GlobalSize(), 0.0);\n\n  for (int i = 0; i < product_param.GlobalSize(); ++i) {\n    x[i] = RandNormal();\n  }\n\n  for (int i = 0; i < product_param.LocalSize(); ++i) {\n    delta[i] = RandNormal();\n  }\n\n  EXPECT_TRUE(product_param.Plus(&x[0], &delta[0], &x_plus_delta_expected[0]));\n  int x_cursor = 0;\n  int delta_cursor = 0;\n\n  EXPECT_TRUE(param1->Plus(\n      &x[x_cursor], &delta[delta_cursor], &x_plus_delta[x_cursor]));\n  x_cursor += param1->GlobalSize();\n  delta_cursor += param1->LocalSize();\n\n  EXPECT_TRUE(param2->Plus(\n      &x[x_cursor], &delta[delta_cursor], &x_plus_delta[x_cursor]));\n  x_cursor += param2->GlobalSize();\n  delta_cursor += param2->LocalSize();\n\n  EXPECT_TRUE(param3->Plus(\n      &x[x_cursor], &delta[delta_cursor], &x_plus_delta[x_cursor]));\n  x_cursor += param3->GlobalSize();\n  delta_cursor += param3->LocalSize();\n\n  EXPECT_TRUE(param4->Plus(\n      &x[x_cursor], &delta[delta_cursor], &x_plus_delta[x_cursor]));\n  x_cursor += param4->GlobalSize();\n  delta_cursor += param4->LocalSize();\n\n  for (int i = 0; i < x.size(); ++i) {\n    EXPECT_EQ(x_plus_delta[i], x_plus_delta_expected[i]);\n  }\n}\n\nTEST_F(ProductParameterizationTest, ComputeJacobian) {\n  LocalParameterization* param1 = param1_.release();\n  LocalParameterization* param2 = param2_.release();\n  LocalParameterization* param3 = param3_.release();\n  LocalParameterization* param4 = param4_.release();\n\n  ProductParameterization product_param(param1, param2, param3, param4);\n  std::vector<double> x(product_param.GlobalSize(), 0.0);\n\n  for (int i = 0; i < product_param.GlobalSize(); ++i) {\n    x[i] = RandNormal();\n  }\n\n  Matrix jacobian =\n      Matrix::Random(product_param.GlobalSize(), product_param.LocalSize());\n  EXPECT_TRUE(product_param.ComputeJacobian(&x[0], jacobian.data()));\n  int x_cursor = 0;\n  int delta_cursor = 0;\n\n  Matrix jacobian1(param1->GlobalSize(), param1->LocalSize());\n  EXPECT_TRUE(param1->ComputeJacobian(&x[x_cursor], jacobian1.data()));\n  jacobian.block(\n      x_cursor, delta_cursor, param1->GlobalSize(), param1->LocalSize()) -=\n      jacobian1;\n  x_cursor += param1->GlobalSize();\n  delta_cursor += param1->LocalSize();\n\n  Matrix jacobian2(param2->GlobalSize(), param2->LocalSize());\n  EXPECT_TRUE(param2->ComputeJacobian(&x[x_cursor], jacobian2.data()));\n  jacobian.block(\n      x_cursor, delta_cursor, param2->GlobalSize(), param2->LocalSize()) -=\n      jacobian2;\n  x_cursor += param2->GlobalSize();\n  delta_cursor += param2->LocalSize();\n\n  Matrix jacobian3(param3->GlobalSize(), param3->LocalSize());\n  EXPECT_TRUE(param3->ComputeJacobian(&x[x_cursor], jacobian3.data()));\n  jacobian.block(\n      x_cursor, delta_cursor, param3->GlobalSize(), param3->LocalSize()) -=\n      jacobian3;\n  x_cursor += param3->GlobalSize();\n  delta_cursor += param3->LocalSize();\n\n  Matrix jacobian4(param4->GlobalSize(), param4->LocalSize());\n  EXPECT_TRUE(param4->ComputeJacobian(&x[x_cursor], jacobian4.data()));\n  jacobian.block(\n      x_cursor, delta_cursor, param4->GlobalSize(), param4->LocalSize()) -=\n      jacobian4;\n  x_cursor += param4->GlobalSize();\n  delta_cursor += param4->LocalSize();\n\n  EXPECT_NEAR(jacobian.norm(), 0.0, std::numeric_limits<double>::epsilon());\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/loss_function.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Purpose: See .h file.\n\n#include \"ceres/loss_function.h\"\n\n#include <algorithm>\n#include <cmath>\n#include <cstddef>\n#include <limits>\n\nnamespace ceres {\n\nvoid TrivialLoss::Evaluate(double s, double rho[3]) const {\n  rho[0] = s;\n  rho[1] = 1.0;\n  rho[2] = 0.0;\n}\n\nvoid HuberLoss::Evaluate(double s, double rho[3]) const {\n  if (s > b_) {\n    // Outlier region.\n    // 'r' is always positive.\n    const double r = sqrt(s);\n    rho[0] = 2.0 * a_ * r - b_;\n    rho[1] = std::max(std::numeric_limits<double>::min(), a_ / r);\n    rho[2] = - rho[1] / (2.0 * s);\n  } else {\n    // Inlier region.\n    rho[0] = s;\n    rho[1] = 1.0;\n    rho[2] = 0.0;\n  }\n}\n\nvoid SoftLOneLoss::Evaluate(double s, double rho[3]) const {\n  const double sum = 1.0 + s * c_;\n  const double tmp = sqrt(sum);\n  // 'sum' and 'tmp' are always positive, assuming that 's' is.\n  rho[0] = 2.0 * b_ * (tmp - 1.0);\n  rho[1] = std::max(std::numeric_limits<double>::min(), 1.0 / tmp);\n  rho[2] = - (c_ * rho[1]) / (2.0 * sum);\n}\n\nvoid CauchyLoss::Evaluate(double s, double rho[3]) const {\n  const double sum = 1.0 + s * c_;\n  const double inv = 1.0 / sum;\n  // 'sum' and 'inv' are always positive, assuming that 's' is.\n  rho[0] = b_ * log(sum);\n  rho[1] = std::max(std::numeric_limits<double>::min(), inv);\n  rho[2] = - c_ * (inv * inv);\n}\n\nvoid ArctanLoss::Evaluate(double s, double rho[3]) const {\n  const double sum = 1 + s * s * b_;\n  const double inv = 1 / sum;\n  // 'sum' and 'inv' are always positive.\n  rho[0] = a_ * atan2(s, a_);\n  rho[1] = std::max(std::numeric_limits<double>::min(), inv);\n  rho[2] = -2.0 * s * b_ * (inv * inv);\n}\n\nTolerantLoss::TolerantLoss(double a, double b)\n    : a_(a),\n      b_(b),\n      c_(b * log(1.0 + exp(-a / b))) {\n  CHECK_GE(a, 0.0);\n  CHECK_GT(b, 0.0);\n}\n\nvoid TolerantLoss::Evaluate(double s, double rho[3]) const {\n  const double x = (s - a_) / b_;\n  // The basic equation is rho[0] = b ln(1 + e^x).  However, if e^x is too\n  // large, it will overflow.  Since numerically 1 + e^x == e^x when the\n  // x is greater than about ln(2^53) for doubles, beyond this threshold\n  // we substitute x for ln(1 + e^x) as a numerically equivalent approximation.\n\n  // ln(MathLimits<double>::kEpsilon).\n  static constexpr double kLog2Pow53 = 36.7;\n  if (x > kLog2Pow53) {\n    rho[0] = s - a_ - c_;\n    rho[1] = 1.0;\n    rho[2] = 0.0;\n  } else {\n    const double e_x = exp(x);\n    rho[0] = b_ * log(1.0 + e_x) - c_;\n    rho[1] = std::max(std::numeric_limits<double>::min(), e_x / (1.0 + e_x));\n    rho[2] = 0.5 / (b_ * (1.0 + cosh(x)));\n  }\n}\n\nvoid TukeyLoss::Evaluate(double s, double* rho) const {\n  if (s <= a_squared_) {\n    // Inlier region.\n    const double value = 1.0 - s / a_squared_;\n    const double value_sq = value * value;\n    rho[0] = a_squared_ / 3.0 * (1.0 - value_sq * value);\n    rho[1] = value_sq;\n    rho[2] = -2.0 / a_squared_ * value;\n  } else {\n    // Outlier region.\n    rho[0] = a_squared_ / 3.0;\n    rho[1] = 0.0;\n    rho[2] = 0.0;\n  }\n}\n\nComposedLoss::ComposedLoss(const LossFunction* f, Ownership ownership_f,\n                           const LossFunction* g, Ownership ownership_g)\n    : f_(f),\n      g_(g),\n      ownership_f_(ownership_f),\n      ownership_g_(ownership_g) {\n  CHECK(f_ != nullptr);\n  CHECK(g_ != nullptr);\n}\n\nComposedLoss::~ComposedLoss() {\n  if (ownership_f_ == DO_NOT_TAKE_OWNERSHIP) {\n    f_.release();\n  }\n  if (ownership_g_ == DO_NOT_TAKE_OWNERSHIP) {\n    g_.release();\n  }\n}\n\nvoid ComposedLoss::Evaluate(double s, double rho[3]) const {\n  double rho_f[3], rho_g[3];\n  g_->Evaluate(s, rho_g);\n  f_->Evaluate(rho_g[0], rho_f);\n  rho[0] = rho_f[0];\n  // f'(g(s)) * g'(s).\n  rho[1] = rho_f[1] * rho_g[1];\n  // f''(g(s)) * g'(s) * g'(s) + f'(g(s)) * g''(s).\n  rho[2] = rho_f[2] * rho_g[1] * rho_g[1] + rho_f[1] * rho_g[2];\n}\n\nvoid ScaledLoss::Evaluate(double s, double rho[3]) const {\n  if (rho_.get() == NULL) {\n    rho[0] = a_ * s;\n    rho[1] = a_;\n    rho[2] = 0.0;\n  } else {\n    rho_->Evaluate(s, rho);\n    rho[0] *= a_;\n    rho[1] *= a_;\n    rho[2] *= a_;\n  }\n}\n\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/loss_function_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/loss_function.h\"\n\n#include <cstddef>\n\n#include \"glog/logging.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\nnamespace {\n\n// Helper function for testing a LossFunction callback.\n//\n// Compares the values of rho'(s) and rho''(s) computed by the\n// callback with estimates obtained by symmetric finite differencing\n// of rho(s).\nvoid AssertLossFunctionIsValid(const LossFunction& loss, double s) {\n  CHECK_GT(s, 0);\n\n  // Evaluate rho(s), rho'(s) and rho''(s).\n  double rho[3];\n  loss.Evaluate(s, rho);\n\n  // Use symmetric finite differencing to estimate rho'(s) and\n  // rho''(s).\n  const double kH = 1e-4;\n  // Values at s + kH.\n  double fwd[3];\n  // Values at s - kH.\n  double bwd[3];\n  loss.Evaluate(s + kH, fwd);\n  loss.Evaluate(s - kH, bwd);\n\n  // First derivative.\n  const double fd_1 = (fwd[0] - bwd[0]) / (2 * kH);\n  ASSERT_NEAR(fd_1, rho[1], 1e-6);\n\n  // Second derivative.\n  const double fd_2 = (fwd[0] - 2*rho[0] + bwd[0]) / (kH * kH);\n  ASSERT_NEAR(fd_2, rho[2], 1e-6);\n}\n}  // namespace\n\n// Try two values of the scaling a = 0.7 and 1.3\n// (where scaling makes sense) and of the squared norm\n// s = 0.357 and 1.792\n//\n// Note that for the Huber loss the test exercises both code paths\n//  (i.e. both small and large values of s).\n\nTEST(LossFunction, TrivialLoss) {\n  AssertLossFunctionIsValid(TrivialLoss(), 0.357);\n  AssertLossFunctionIsValid(TrivialLoss(), 1.792);\n  // Check that at s = 0: rho = [0, 1, 0].\n  double rho[3];\n  TrivialLoss().Evaluate(0.0, rho);\n  ASSERT_NEAR(rho[0], 0.0, 1e-6);\n  ASSERT_NEAR(rho[1], 1.0, 1e-6);\n  ASSERT_NEAR(rho[2], 0.0, 1e-6);\n}\n\nTEST(LossFunction, HuberLoss) {\n  AssertLossFunctionIsValid(HuberLoss(0.7), 0.357);\n  AssertLossFunctionIsValid(HuberLoss(0.7), 1.792);\n  AssertLossFunctionIsValid(HuberLoss(1.3), 0.357);\n  AssertLossFunctionIsValid(HuberLoss(1.3), 1.792);\n  // Check that at s = 0: rho = [0, 1, 0].\n  double rho[3];\n  HuberLoss(0.7).Evaluate(0.0, rho);\n  ASSERT_NEAR(rho[0], 0.0, 1e-6);\n  ASSERT_NEAR(rho[1], 1.0, 1e-6);\n  ASSERT_NEAR(rho[2], 0.0, 1e-6);\n}\n\nTEST(LossFunction, SoftLOneLoss) {\n  AssertLossFunctionIsValid(SoftLOneLoss(0.7), 0.357);\n  AssertLossFunctionIsValid(SoftLOneLoss(0.7), 1.792);\n  AssertLossFunctionIsValid(SoftLOneLoss(1.3), 0.357);\n  AssertLossFunctionIsValid(SoftLOneLoss(1.3), 1.792);\n  // Check that at s = 0: rho = [0, 1, -1 / (2 * a^2)].\n  double rho[3];\n  SoftLOneLoss(0.7).Evaluate(0.0, rho);\n  ASSERT_NEAR(rho[0], 0.0, 1e-6);\n  ASSERT_NEAR(rho[1], 1.0, 1e-6);\n  ASSERT_NEAR(rho[2], -0.5 / (0.7 * 0.7), 1e-6);\n}\n\nTEST(LossFunction, CauchyLoss) {\n  AssertLossFunctionIsValid(CauchyLoss(0.7), 0.357);\n  AssertLossFunctionIsValid(CauchyLoss(0.7), 1.792);\n  AssertLossFunctionIsValid(CauchyLoss(1.3), 0.357);\n  AssertLossFunctionIsValid(CauchyLoss(1.3), 1.792);\n  // Check that at s = 0: rho = [0, 1, -1 / a^2].\n  double rho[3];\n  CauchyLoss(0.7).Evaluate(0.0, rho);\n  ASSERT_NEAR(rho[0], 0.0, 1e-6);\n  ASSERT_NEAR(rho[1], 1.0, 1e-6);\n  ASSERT_NEAR(rho[2], -1.0 / (0.7 * 0.7), 1e-6);\n}\n\nTEST(LossFunction, ArctanLoss) {\n  AssertLossFunctionIsValid(ArctanLoss(0.7), 0.357);\n  AssertLossFunctionIsValid(ArctanLoss(0.7), 1.792);\n  AssertLossFunctionIsValid(ArctanLoss(1.3), 0.357);\n  AssertLossFunctionIsValid(ArctanLoss(1.3), 1.792);\n  // Check that at s = 0: rho = [0, 1, 0].\n  double rho[3];\n  ArctanLoss(0.7).Evaluate(0.0, rho);\n  ASSERT_NEAR(rho[0], 0.0, 1e-6);\n  ASSERT_NEAR(rho[1], 1.0, 1e-6);\n  ASSERT_NEAR(rho[2], 0.0, 1e-6);\n}\n\nTEST(LossFunction, TolerantLoss) {\n  AssertLossFunctionIsValid(TolerantLoss(0.7, 0.4), 0.357);\n  AssertLossFunctionIsValid(TolerantLoss(0.7, 0.4), 1.792);\n  AssertLossFunctionIsValid(TolerantLoss(0.7, 0.4), 55.5);\n  AssertLossFunctionIsValid(TolerantLoss(1.3, 0.1), 0.357);\n  AssertLossFunctionIsValid(TolerantLoss(1.3, 0.1), 1.792);\n  AssertLossFunctionIsValid(TolerantLoss(1.3, 0.1), 55.5);\n  // Check the value at zero is actually zero.\n  double rho[3];\n  TolerantLoss(0.7, 0.4).Evaluate(0.0, rho);\n  ASSERT_NEAR(rho[0], 0.0, 1e-6);\n  // Check that loss before and after the approximation threshold are good.\n  // A threshold of 36.7 is used by the implementation.\n  AssertLossFunctionIsValid(TolerantLoss(20.0, 1.0), 20.0 + 36.6);\n  AssertLossFunctionIsValid(TolerantLoss(20.0, 1.0), 20.0 + 36.7);\n  AssertLossFunctionIsValid(TolerantLoss(20.0, 1.0), 20.0 + 36.8);\n  AssertLossFunctionIsValid(TolerantLoss(20.0, 1.0), 20.0 + 1000.0);\n}\n\nTEST(LossFunction, TukeyLoss) {\n  AssertLossFunctionIsValid(TukeyLoss(0.7), 0.357);\n  AssertLossFunctionIsValid(TukeyLoss(0.7), 1.792);\n  AssertLossFunctionIsValid(TukeyLoss(1.3), 0.357);\n  AssertLossFunctionIsValid(TukeyLoss(1.3), 1.792);\n  // Check that at s = 0: rho = [0, 1, -2 / a^2].\n  double rho[3];\n  TukeyLoss(0.7).Evaluate(0.0, rho);\n  ASSERT_NEAR(rho[0], 0.0, 1e-6);\n  ASSERT_NEAR(rho[1], 1.0, 1e-6);\n  ASSERT_NEAR(rho[2], -2.0 / (0.7 * 0.7), 1e-6);\n}\n\nTEST(LossFunction, ComposedLoss) {\n  {\n    HuberLoss f(0.7);\n    CauchyLoss g(1.3);\n    ComposedLoss c(&f, DO_NOT_TAKE_OWNERSHIP, &g, DO_NOT_TAKE_OWNERSHIP);\n    AssertLossFunctionIsValid(c, 0.357);\n    AssertLossFunctionIsValid(c, 1.792);\n  }\n  {\n    CauchyLoss f(0.7);\n    HuberLoss g(1.3);\n    ComposedLoss c(&f, DO_NOT_TAKE_OWNERSHIP, &g, DO_NOT_TAKE_OWNERSHIP);\n    AssertLossFunctionIsValid(c, 0.357);\n    AssertLossFunctionIsValid(c, 1.792);\n  }\n}\n\nTEST(LossFunction, ScaledLoss) {\n  // Wrap a few loss functions, and a few scale factors. This can't combine\n  // construction with the call to AssertLossFunctionIsValid() because Apple's\n  // GCC is unable to eliminate the copy of ScaledLoss, which is not copyable.\n  {\n    ScaledLoss scaled_loss(NULL, 6, TAKE_OWNERSHIP);\n    AssertLossFunctionIsValid(scaled_loss, 0.323);\n  }\n  {\n    ScaledLoss scaled_loss(new TrivialLoss(), 10, TAKE_OWNERSHIP);\n    AssertLossFunctionIsValid(scaled_loss, 0.357);\n  }\n  {\n    ScaledLoss scaled_loss(new HuberLoss(0.7), 0.1, TAKE_OWNERSHIP);\n    AssertLossFunctionIsValid(scaled_loss, 1.792);\n  }\n  {\n    ScaledLoss scaled_loss(new SoftLOneLoss(1.3), 0.1, TAKE_OWNERSHIP);\n    AssertLossFunctionIsValid(scaled_loss, 1.792);\n  }\n  {\n    ScaledLoss scaled_loss(new CauchyLoss(1.3), 10, TAKE_OWNERSHIP);\n    AssertLossFunctionIsValid(scaled_loss, 1.792);\n  }\n  {\n    ScaledLoss scaled_loss(new ArctanLoss(1.3), 10, TAKE_OWNERSHIP);\n    AssertLossFunctionIsValid(scaled_loss, 1.792);\n  }\n  {\n    ScaledLoss scaled_loss(\n        new TolerantLoss(1.3, 0.1), 10, TAKE_OWNERSHIP);\n    AssertLossFunctionIsValid(scaled_loss, 1.792);\n  }\n  {\n    ScaledLoss scaled_loss(\n        new ComposedLoss(\n            new HuberLoss(0.8), TAKE_OWNERSHIP,\n            new TolerantLoss(1.3, 0.5), TAKE_OWNERSHIP), 10, TAKE_OWNERSHIP);\n    AssertLossFunctionIsValid(scaled_loss, 1.792);\n  }\n}\n\nTEST(LossFunction, LossFunctionWrapper) {\n  // Initialization\n  HuberLoss loss_function1(1.0);\n  LossFunctionWrapper loss_function_wrapper(new HuberLoss(1.0),\n                                            TAKE_OWNERSHIP);\n\n  double s = 0.862;\n  double rho_gold[3];\n  double rho[3];\n  loss_function1.Evaluate(s, rho_gold);\n  loss_function_wrapper.Evaluate(s, rho);\n  for (int i = 0; i < 3; ++i) {\n    EXPECT_NEAR(rho[i], rho_gold[i], 1e-12);\n  }\n\n  // Resetting\n  HuberLoss loss_function2(0.5);\n  loss_function_wrapper.Reset(new HuberLoss(0.5), TAKE_OWNERSHIP);\n  loss_function_wrapper.Evaluate(s, rho);\n  loss_function2.Evaluate(s, rho_gold);\n  for (int i = 0; i < 3; ++i) {\n    EXPECT_NEAR(rho[i], rho_gold[i], 1e-12);\n  }\n\n  // Not taking ownership.\n  HuberLoss loss_function3(0.3);\n  loss_function_wrapper.Reset(&loss_function3, DO_NOT_TAKE_OWNERSHIP);\n  loss_function_wrapper.Evaluate(s, rho);\n  loss_function3.Evaluate(s, rho_gold);\n  for (int i = 0; i < 3; ++i) {\n    EXPECT_NEAR(rho[i], rho_gold[i], 1e-12);\n  }\n\n  // Set to NULL\n  TrivialLoss loss_function4;\n  loss_function_wrapper.Reset(NULL, TAKE_OWNERSHIP);\n  loss_function_wrapper.Evaluate(s, rho);\n  loss_function4.Evaluate(s, rho_gold);\n  for (int i = 0; i < 3; ++i) {\n    EXPECT_NEAR(rho[i], rho_gold[i], 1e-12);\n  }\n\n  // Set to NULL, not taking ownership\n  loss_function_wrapper.Reset(NULL, DO_NOT_TAKE_OWNERSHIP);\n  loss_function_wrapper.Evaluate(s, rho);\n  loss_function4.Evaluate(s, rho_gold);\n  for (int i = 0; i < 3; ++i) {\n    EXPECT_NEAR(rho[i], rho_gold[i], 1e-12);\n  }\n\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/low_rank_inverse_hessian.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include <list>\n\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/low_rank_inverse_hessian.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::list;\n\n// The (L)BFGS algorithm explicitly requires that the secant equation:\n//\n//   B_{k+1} * s_k = y_k\n//\n// Is satisfied at each iteration, where B_{k+1} is the approximated\n// Hessian at the k+1-th iteration, s_k = (x_{k+1} - x_{k}) and\n// y_k = (grad_{k+1} - grad_{k}). As the approximated Hessian must be\n// positive definite, this is equivalent to the condition:\n//\n//   s_k^T * y_k > 0     [s_k^T * B_{k+1} * s_k = s_k^T * y_k > 0]\n//\n// This condition would always be satisfied if the function was strictly\n// convex, alternatively, it is always satisfied provided that a Wolfe line\n// search is used (even if the function is not strictly convex).  See [1]\n// (p138) for a proof.\n//\n// Although Ceres will always use a Wolfe line search when using (L)BFGS,\n// practical implementation considerations mean that the line search\n// may return a point that satisfies only the Armijo condition, and thus\n// could violate the Secant equation.  As such, we will only use a step\n// to update the Hessian approximation if:\n//\n//   s_k^T * y_k > tolerance\n//\n// It is important that tolerance is very small (and >=0), as otherwise we\n// might skip the update too often and fail to capture important curvature\n// information in the Hessian.  For example going from 1e-10 -> 1e-14 improves\n// the NIST benchmark score from 43/54 to 53/54.\n//\n// [1] Nocedal J., Wright S., Numerical Optimization, 2nd Ed. Springer, 1999.\n//\n// TODO(alexs.mac): Consider using Damped BFGS update instead of\n// skipping update.\nconst double kLBFGSSecantConditionHessianUpdateTolerance = 1e-14;\n\nLowRankInverseHessian::LowRankInverseHessian(\n    int num_parameters,\n    int max_num_corrections,\n    bool use_approximate_eigenvalue_scaling)\n    : num_parameters_(num_parameters),\n      max_num_corrections_(max_num_corrections),\n      use_approximate_eigenvalue_scaling_(use_approximate_eigenvalue_scaling),\n      approximate_eigenvalue_scale_(1.0),\n      delta_x_history_(num_parameters, max_num_corrections),\n      delta_gradient_history_(num_parameters, max_num_corrections),\n      delta_x_dot_delta_gradient_(max_num_corrections) {\n}\n\nbool LowRankInverseHessian::Update(const Vector& delta_x,\n                                   const Vector& delta_gradient) {\n  const double delta_x_dot_delta_gradient = delta_x.dot(delta_gradient);\n  if (delta_x_dot_delta_gradient <=\n      kLBFGSSecantConditionHessianUpdateTolerance) {\n    VLOG(2) << \"Skipping L-BFGS Update, delta_x_dot_delta_gradient too \"\n            << \"small: \" << delta_x_dot_delta_gradient << \", tolerance: \"\n            << kLBFGSSecantConditionHessianUpdateTolerance\n            << \" (Secant condition).\";\n    return false;\n  }\n\n\n  int next = indices_.size();\n  // Once the size of the list reaches max_num_corrections_, simulate\n  // a circular buffer by removing the first element of the list and\n  // making it the next position where the LBFGS history is stored.\n  if (next == max_num_corrections_) {\n    next = indices_.front();\n    indices_.pop_front();\n  }\n\n  indices_.push_back(next);\n  delta_x_history_.col(next) = delta_x;\n  delta_gradient_history_.col(next) = delta_gradient;\n  delta_x_dot_delta_gradient_(next) = delta_x_dot_delta_gradient;\n  approximate_eigenvalue_scale_ =\n      delta_x_dot_delta_gradient / delta_gradient.squaredNorm();\n  return true;\n}\n\nvoid LowRankInverseHessian::RightMultiply(const double* x_ptr,\n                                          double* y_ptr) const {\n  ConstVectorRef gradient(x_ptr, num_parameters_);\n  VectorRef search_direction(y_ptr, num_parameters_);\n\n  search_direction = gradient;\n\n  const int num_corrections = indices_.size();\n  Vector alpha(num_corrections);\n\n  for (list<int>::const_reverse_iterator it = indices_.rbegin();\n       it != indices_.rend();\n       ++it) {\n    const double alpha_i = delta_x_history_.col(*it).dot(search_direction) /\n        delta_x_dot_delta_gradient_(*it);\n    search_direction -= alpha_i * delta_gradient_history_.col(*it);\n    alpha(*it) = alpha_i;\n  }\n\n  if (use_approximate_eigenvalue_scaling_) {\n    // Rescale the initial inverse Hessian approximation (H_0) to be iteratively\n    // updated so that it is of similar 'size' to the true inverse Hessian along\n    // the most recent search direction.  As shown in [1]:\n    //\n    //   \\gamma_k = (delta_gradient_{k-1}' * delta_x_{k-1}) /\n    //              (delta_gradient_{k-1}' * delta_gradient_{k-1})\n    //\n    // Satisfies:\n    //\n    //   (1 / \\lambda_m) <= \\gamma_k <= (1 / \\lambda_1)\n    //\n    // Where \\lambda_1 & \\lambda_m are the smallest and largest eigenvalues of\n    // the true Hessian (not the inverse) along the most recent search direction\n    // respectively.  Thus \\gamma is an approximate eigenvalue of the true\n    // inverse Hessian, and choosing: H_0 = I * \\gamma will yield a starting\n    // point that has a similar scale to the true inverse Hessian.  This\n    // technique is widely reported to often improve convergence, however this\n    // is not universally true, particularly if there are errors in the initial\n    // jacobians, or if there are significant differences in the sensitivity\n    // of the problem to the parameters (i.e. the range of the magnitudes of\n    // the components of the gradient is large).\n    //\n    // The original origin of this rescaling trick is somewhat unclear, the\n    // earliest reference appears to be Oren [1], however it is widely discussed\n    // without specific attributation in various texts including [2] (p143/178).\n    //\n    // [1] Oren S.S., Self-scaling variable metric (SSVM) algorithms Part II:\n    //     Implementation and experiments, Management Science,\n    //     20(5), 863-874, 1974.\n    // [2] Nocedal J., Wright S., Numerical Optimization, Springer, 1999.\n    search_direction *= approximate_eigenvalue_scale_;\n\n    VLOG(4) << \"Applying approximate_eigenvalue_scale: \"\n            << approximate_eigenvalue_scale_ << \" to initial inverse Hessian \"\n            << \"approximation.\";\n  }\n\n  for (const int i : indices_) {\n    const double beta = delta_gradient_history_.col(i).dot(search_direction) /\n        delta_x_dot_delta_gradient_(i);\n    search_direction += delta_x_history_.col(i) * (alpha(i) - beta);\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/low_rank_inverse_hessian.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Limited memory positive definite approximation to the inverse\n// Hessian, using the LBFGS algorithm\n\n#ifndef CERES_INTERNAL_LOW_RANK_INVERSE_HESSIAN_H_\n#define CERES_INTERNAL_LOW_RANK_INVERSE_HESSIAN_H_\n\n#include <list>\n\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/linear_operator.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// LowRankInverseHessian is a positive definite approximation to the\n// Hessian using the limited memory variant of the\n// Broyden-Fletcher-Goldfarb-Shanno (BFGS)secant formula for\n// approximating the Hessian.\n//\n// Other update rules like the Davidon-Fletcher-Powell (DFP) are\n// possible, but the BFGS rule is considered the best performing one.\n//\n// The limited memory variant was developed by Nocedal and further\n// enhanced with scaling rule by Byrd, Nocedal and Schanbel.\n//\n// Nocedal, J. (1980). \"Updating Quasi-Newton Matrices with Limited\n// Storage\". Mathematics of Computation 35 (151): 773-782.\n//\n// Byrd, R. H.; Nocedal, J.; Schnabel, R. B. (1994).\n// \"Representations of Quasi-Newton Matrices and their use in\n// Limited Memory Methods\". Mathematical Programming 63 (4):\nclass LowRankInverseHessian : public LinearOperator {\n public:\n  // num_parameters is the row/column size of the Hessian.\n  // max_num_corrections is the rank of the Hessian approximation.\n  // use_approximate_eigenvalue_scaling controls whether the initial\n  // inverse Hessian used during Right/LeftMultiply() is scaled by\n  // the approximate eigenvalue of the true inverse Hessian at the\n  // current operating point.\n  // The approximation uses:\n  // 2 * max_num_corrections * num_parameters + max_num_corrections\n  // doubles.\n  LowRankInverseHessian(int num_parameters,\n                        int max_num_corrections,\n                        bool use_approximate_eigenvalue_scaling);\n  virtual ~LowRankInverseHessian() {}\n\n  // Update the low rank approximation. delta_x is the change in the\n  // domain of Hessian, and delta_gradient is the change in the\n  // gradient.  The update copies the delta_x and delta_gradient\n  // vectors, and gets rid of the oldest delta_x and delta_gradient\n  // vectors if the number of corrections is already equal to\n  // max_num_corrections.\n  bool Update(const Vector& delta_x, const Vector& delta_gradient);\n\n  // LinearOperator interface\n  void RightMultiply(const double* x, double* y) const final;\n  void LeftMultiply(const double* x, double* y) const final {\n    RightMultiply(x, y);\n  }\n  int num_rows() const final { return num_parameters_; }\n  int num_cols() const final { return num_parameters_; }\n\n private:\n  const int num_parameters_;\n  const int max_num_corrections_;\n  const bool use_approximate_eigenvalue_scaling_;\n  double approximate_eigenvalue_scale_;\n  ColMajorMatrix delta_x_history_;\n  ColMajorMatrix delta_gradient_history_;\n  Vector delta_x_dot_delta_gradient_;\n  std::list<int> indices_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_LOW_RANK_INVERSE_HESSIAN_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/map_util.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n//\n// Originally by Anton Carver\n\n#ifndef CERES_INTERNAL_MAP_UTIL_H_\n#define CERES_INTERNAL_MAP_UTIL_H_\n\n#include <utility>\n#include \"ceres/internal/port.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\n\n// Perform a lookup in a map or hash_map, assuming that the key exists.\n// Crash if it does not.\n//\n// This is intended as a replacement for operator[] as an rvalue (for reading)\n// when the key is guaranteed to exist.\n//\n// operator[] is discouraged for several reasons:\n//  * It has a side-effect of inserting missing keys\n//  * It is not thread-safe (even when it is not inserting, it can still\n//      choose to resize the underlying storage)\n//  * It invalidates iterators (when it chooses to resize)\n//  * It default constructs a value object even if it doesn't need to\n//\n// This version assumes the key is printable, and includes it in the fatal log\n// message.\ntemplate <class Collection>\nconst typename Collection::value_type::second_type&\nFindOrDie(const Collection& collection,\n          const typename Collection::value_type::first_type& key) {\n  typename Collection::const_iterator it = collection.find(key);\n  CHECK(it != collection.end()) << \"Map key not found: \" << key;\n  return it->second;\n}\n\n// Perform a lookup in a map or hash_map.\n// If the key is present in the map then the value associated with that\n// key is returned, otherwise the value passed as a default is returned.\ntemplate <class Collection>\nconst typename Collection::value_type::second_type\nFindWithDefault(const Collection& collection,\n                const typename Collection::value_type::first_type& key,\n                const typename Collection::value_type::second_type& value) {\n  typename Collection::const_iterator it = collection.find(key);\n  if (it == collection.end()) {\n    return value;\n  }\n  return it->second;\n}\n\n// Insert a new key and value into a map or hash_map.\n// If the key is not present in the map the key and value are\n// inserted, otherwise nothing happens. True indicates that an insert\n// took place, false indicates the key was already present.\ntemplate <class Collection>\nbool InsertIfNotPresent(\n    Collection * const collection,\n    const typename Collection::value_type::first_type& key,\n    const typename Collection::value_type::second_type& value) {\n  std::pair<typename Collection::iterator, bool> ret =\n      collection->insert(typename Collection::value_type(key, value));\n  return ret.second;\n}\n\n// Perform a lookup in a map or hash_map.\n// Same as above but the returned pointer is not const and can be used to change\n// the stored value.\ntemplate <class Collection>\ntypename Collection::value_type::second_type*\nFindOrNull(Collection& collection,  // NOLINT\n           const typename Collection::value_type::first_type& key) {\n  typename Collection::iterator it = collection.find(key);\n  if (it == collection.end()) {\n    return 0;\n  }\n  return &it->second;\n}\n\n// Test to see if a set, map, hash_set or hash_map contains a particular key.\n// Returns true if the key is in the collection.\ntemplate <class Collection, class Key>\nbool ContainsKey(const Collection& collection, const Key& key) {\n  typename Collection::const_iterator it = collection.find(key);\n  return it != collection.end();\n}\n\n// Inserts a new key/value into a map or hash_map.\n// Dies if the key is already present.\ntemplate<class Collection>\nvoid InsertOrDie(Collection* const collection,\n                 const typename Collection::value_type::first_type& key,\n                 const typename Collection::value_type::second_type& data) {\n  typedef typename Collection::value_type value_type;\n  CHECK(collection->insert(value_type(key, data)).second)\n    << \"duplicate key: \" << key;\n}\n\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_MAP_UTIL_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/miniglog/glog/logging.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n\n#include \"glog/logging.h\"\n\nnamespace google {\n\n// This is the set of log sinks. This must be in a separate library to ensure\n// that there is only one instance of this across the entire program.\nstd::set<google::LogSink *> log_sinks_global;\n\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/miniglog/glog/logging.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: settinger@google.com (Scott Ettinger)\n//         mierle@gmail.com (Keir Mierle)\n//\n// Simplified Glog style logging with Android support. Supported macros in\n// decreasing severity level per line:\n//\n//   VLOG(2), VLOG(N)\n//   VLOG(1),\n//   LOG(INFO), VLOG(0), LG\n//   LOG(WARNING),\n//   LOG(ERROR),\n//   LOG(FATAL),\n//\n// With VLOG(n), the output is directed to one of the 5 Android log levels:\n//\n//   2 - Verbose\n//   1 - Debug\n//   0 - Info\n//  -1 - Warning\n//  -2 - Error\n//  -3 - Fatal\n//\n// Any logging of level 2 and above is directed to the Verbose level. All\n// Android log output is tagged with the string \"native\".\n//\n// If the symbol ANDROID is not defined, all output goes to std::cerr.\n// This allows code to be built on a different system for debug.\n//\n// Portions of this code are taken from the GLOG package.  This code is only a\n// small subset of the GLOG functionality. Notable differences from GLOG\n// behavior include lack of support for displaying unprintable characters and\n// lack of stack trace information upon failure of the CHECK macros.  On\n// non-Android systems, log output goes to std::cerr and is not written to a\n// file.\n//\n// CHECK macros are defined to test for conditions within code.  Any CHECK that\n// fails will log the failure and terminate the application.\n// e.g. CHECK_GE(3, 2) will pass while CHECK_GE(3, 4) will fail after logging\n//      \"Check failed 3 >= 4\".\n//\n// The following CHECK macros are defined:\n//\n//   CHECK(condition)        - fails if condition is false and logs condition.\n//   CHECK_NOTNULL(variable) - fails if the variable is NULL.\n//\n// The following binary check macros are also defined :\n//\n//   Macro                     Operator equivalent\n//   --------------------      -------------------\n//   CHECK_EQ(val1, val2)      val1 == val2\n//   CHECK_NE(val1, val2)      val1 != val2\n//   CHECK_GT(val1, val2)      val1 > val2\n//   CHECK_GE(val1, val2)      val1 >= val2\n//   CHECK_LT(val1, val2)      val1 < val2\n//   CHECK_LE(val1, val2)      val1 <= val2\n//\n// Debug only versions of all of the check macros are also defined.  These\n// macros generate no code in a release build, but avoid unused variable\n// warnings / errors.\n//\n// To use the debug only versions, prepend a D to the normal check macros, e.g.\n// DCHECK_EQ(a, b).\n\n#ifndef CERCES_INTERNAL_MINIGLOG_GLOG_LOGGING_H_\n#define CERCES_INTERNAL_MINIGLOG_GLOG_LOGGING_H_\n\n#ifdef ANDROID\n#  include <android/log.h>\n#endif  // ANDROID\n\n#include <algorithm>\n#include <ctime>\n#include <fstream>\n#include <iostream>\n#include <set>\n#include <sstream>\n#include <string>\n#include <vector>\n\n// For appropriate definition of CERES_EXPORT macro.\n#include \"ceres/internal/port.h\"\n#include \"ceres/internal/disable_warnings.h\"\n\n// Log severity level constants.\nconst int FATAL   = -3;\nconst int ERROR   = -2;\nconst int WARNING = -1;\nconst int INFO    =  0;\n\n// ------------------------- Glog compatibility ------------------------------\n\nnamespace google {\n\ntypedef int LogSeverity;\nconst int INFO    = ::INFO;\nconst int WARNING = ::WARNING;\nconst int ERROR   = ::ERROR;\nconst int FATAL   = ::FATAL;\n\n// Sink class used for integration with mock and test functions. If sinks are\n// added, all log output is also sent to each sink through the send function.\n// In this implementation, WaitTillSent() is called immediately after the send.\n// This implementation is not thread safe.\nclass CERES_EXPORT LogSink {\n public:\n  virtual ~LogSink() {}\n  virtual void send(LogSeverity severity,\n                    const char* full_filename,\n                    const char* base_filename,\n                    int line,\n                    const struct tm* tm_time,\n                    const char* message,\n                    size_t message_len) = 0;\n  virtual void WaitTillSent() = 0;\n};\n\n// Global set of log sinks. The actual object is defined in logging.cc.\nextern CERES_EXPORT std::set<LogSink *> log_sinks_global;\n\ninline void InitGoogleLogging(char *argv) {\n  // Do nothing; this is ignored.\n}\n\n// Note: the Log sink functions are not thread safe.\ninline void AddLogSink(LogSink *sink) {\n  // TODO(settinger): Add locks for thread safety.\n  log_sinks_global.insert(sink);\n}\ninline void RemoveLogSink(LogSink *sink) {\n  log_sinks_global.erase(sink);\n}\n\n}  // namespace google\n\n// ---------------------------- Logger Class --------------------------------\n\n// Class created for each use of the logging macros.\n// The logger acts as a stream and routes the final stream contents to the\n// Android logcat output at the proper filter level.  If ANDROID is not\n// defined, output is directed to std::cerr.  This class should not\n// be directly instantiated in code, rather it should be invoked through the\n// use of the log macros LG, LOG, or VLOG.\nclass CERES_EXPORT MessageLogger {\n public:\n  MessageLogger(const char *file, int line, const char *tag, int severity)\n    : file_(file), line_(line), tag_(tag), severity_(severity) {\n    // Pre-pend the stream with the file and line number.\n    StripBasename(std::string(file), &filename_only_);\n    stream_ << filename_only_ << \":\" << line << \" \";\n  }\n\n  // Output the contents of the stream to the proper channel on destruction.\n  ~MessageLogger() {\n    stream_ << \"\\n\";\n\n#ifdef ANDROID\n    static const int android_log_levels[] = {\n        ANDROID_LOG_FATAL,    // LOG(FATAL)\n        ANDROID_LOG_ERROR,    // LOG(ERROR)\n        ANDROID_LOG_WARN,     // LOG(WARNING)\n        ANDROID_LOG_INFO,     // LOG(INFO), LG, VLOG(0)\n        ANDROID_LOG_DEBUG,    // VLOG(1)\n        ANDROID_LOG_VERBOSE,  // VLOG(2) .. VLOG(N)\n    };\n\n    // Bound the logging level.\n    const int kMaxVerboseLevel = 2;\n    int android_level_index = std::min(std::max(FATAL, severity_),\n                                       kMaxVerboseLevel) - FATAL;\n    int android_log_level = android_log_levels[android_level_index];\n\n    // Output the log string the Android log at the appropriate level.\n    __android_log_write(android_log_level, tag_.c_str(), stream_.str().c_str());\n\n    // Indicate termination if needed.\n    if (severity_ == FATAL) {\n      __android_log_write(ANDROID_LOG_FATAL,\n                          tag_.c_str(),\n                          \"terminating.\\n\");\n    }\n#else\n    // If not building on Android, log all output to std::cerr.\n    std::cerr << stream_.str();\n#endif  // ANDROID\n\n    LogToSinks(severity_);\n    WaitForSinks();\n\n    // Android logging at level FATAL does not terminate execution, so abort()\n    // is still required to stop the program.\n    if (severity_ == FATAL) {\n      abort();\n    }\n  }\n\n  // Return the stream associated with the logger object.\n  std::stringstream &stream() { return stream_; }\n\n private:\n  void LogToSinks(int severity) {\n    time_t rawtime;\n    time (&rawtime);\n\n    struct tm timeinfo;\n#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__)\n    // On Windows, use secure localtime_s not localtime.\n    localtime_s(&timeinfo, &rawtime);\n#else\n    // On non-Windows systems, use threadsafe localtime_r not localtime.\n    localtime_r(&rawtime, &timeinfo);\n#endif\n\n    std::set<google::LogSink*>::iterator iter;\n    // Send the log message to all sinks.\n    for (iter = google::log_sinks_global.begin();\n         iter != google::log_sinks_global.end(); ++iter) {\n      (*iter)->send(severity, file_.c_str(), filename_only_.c_str(), line_,\n                    &timeinfo, stream_.str().c_str(), stream_.str().size());\n    }\n  }\n\n  void WaitForSinks() {\n    // TODO(settinger): Add locks for thread safety.\n    std::set<google::LogSink *>::iterator iter;\n\n    // Call WaitTillSent() for all sinks.\n    for (iter = google::log_sinks_global.begin();\n         iter != google::log_sinks_global.end(); ++iter) {\n      (*iter)->WaitTillSent();\n    }\n  }\n\n  void StripBasename(const std::string &full_path, std::string *filename) {\n    // TODO(settinger): Add support for OSs with different path separators.\n    const char kSeparator = '/';\n    size_t pos = full_path.rfind(kSeparator);\n    if (pos != std::string::npos) {\n      *filename = full_path.substr(pos + 1, std::string::npos);\n    } else {\n      *filename = full_path;\n    }\n  }\n\n  std::string file_;\n  std::string filename_only_;\n  int line_;\n  std::string tag_;\n  std::stringstream stream_;\n  int severity_;\n};\n\n// ---------------------- Logging Macro definitions --------------------------\n\n// This class is used to explicitly ignore values in the conditional\n// logging macros.  This avoids compiler warnings like \"value computed\n// is not used\" and \"statement has no effect\".\nclass CERES_EXPORT LoggerVoidify {\n public:\n  LoggerVoidify() { }\n  // This has to be an operator with a precedence lower than << but\n  // higher than ?:\n  void operator&(const std::ostream &s) { }\n};\n\n// Log only if condition is met.  Otherwise evaluates to void.\n#define LOG_IF(severity, condition) \\\n    !(condition) ? (void) 0 : LoggerVoidify() & \\\n      MessageLogger((char *)__FILE__, __LINE__, \"native\", severity).stream()\n\n// Log only if condition is NOT met.  Otherwise evaluates to void.\n#define LOG_IF_FALSE(severity, condition) LOG_IF(severity, !(condition))\n\n// LG is a convenient shortcut for LOG(INFO). Its use is in new\n// google3 code is discouraged and the following shortcut exists for\n// backward compatibility with existing code.\n#ifdef MAX_LOG_LEVEL\n#  define LOG(n)  LOG_IF(n, n <= MAX_LOG_LEVEL)\n#  define VLOG(n) LOG_IF(n, n <= MAX_LOG_LEVEL)\n#  define LG      LOG_IF(INFO, INFO <= MAX_LOG_LEVEL)\n#  define VLOG_IF(n, condition) LOG_IF(n, (n <= MAX_LOG_LEVEL) && condition)\n#else\n#  define LOG(n)  MessageLogger((char *)__FILE__, __LINE__, \"native\", n).stream()    // NOLINT\n#  define VLOG(n) MessageLogger((char *)__FILE__, __LINE__, \"native\", n).stream()    // NOLINT\n#  define LG      MessageLogger((char *)__FILE__, __LINE__, \"native\", INFO).stream() // NOLINT\n#  define VLOG_IF(n, condition) LOG_IF(n, condition)\n#endif\n\n// Currently, VLOG is always on for levels below MAX_LOG_LEVEL.\n#ifndef MAX_LOG_LEVEL\n#  define VLOG_IS_ON(x) (1)\n#else\n#  define VLOG_IS_ON(x) (x <= MAX_LOG_LEVEL)\n#endif\n\n#ifndef NDEBUG\n#  define DLOG LOG\n#else\n#  define DLOG(severity) true ? (void) 0 : LoggerVoidify() & \\\n      MessageLogger((char *)__FILE__, __LINE__, \"native\", severity).stream()\n#endif\n\n\n// Log a message and terminate.\ntemplate<class T>\nvoid LogMessageFatal(const char *file, int line, const T &message) {\n  MessageLogger((char *)__FILE__, __LINE__, \"native\", FATAL).stream()\n      << message;\n}\n\n// ---------------------------- CHECK macros ---------------------------------\n\n// Check for a given boolean condition.\n#define CHECK(condition) LOG_IF_FALSE(FATAL, condition) \\\n        << \"Check failed: \" #condition \" \"\n\n#ifndef NDEBUG\n// Debug only version of CHECK\n#  define DCHECK(condition) LOG_IF_FALSE(FATAL, condition) \\\n          << \"Check failed: \" #condition \" \"\n#else\n// Optimized version - generates no code.\n#  define DCHECK(condition) if (false) LOG_IF_FALSE(FATAL, condition) \\\n          << \"Check failed: \" #condition \" \"\n#endif  // NDEBUG\n\n// ------------------------- CHECK_OP macros ---------------------------------\n\n// Generic binary operator check macro. This should not be directly invoked,\n// instead use the binary comparison macros defined below.\n#define CHECK_OP(val1, val2, op) LOG_IF_FALSE(FATAL, ((val1) op (val2))) \\\n  << \"Check failed: \" #val1 \" \" #op \" \" #val2 \" \"\n\n// Check_op macro definitions\n#define CHECK_EQ(val1, val2) CHECK_OP(val1, val2, ==)\n#define CHECK_NE(val1, val2) CHECK_OP(val1, val2, !=)\n#define CHECK_LE(val1, val2) CHECK_OP(val1, val2, <=)\n#define CHECK_LT(val1, val2) CHECK_OP(val1, val2, <)\n#define CHECK_GE(val1, val2) CHECK_OP(val1, val2, >=)\n#define CHECK_GT(val1, val2) CHECK_OP(val1, val2, >)\n\n#ifndef NDEBUG\n// Debug only versions of CHECK_OP macros.\n#  define DCHECK_EQ(val1, val2) CHECK_OP(val1, val2, ==)\n#  define DCHECK_NE(val1, val2) CHECK_OP(val1, val2, !=)\n#  define DCHECK_LE(val1, val2) CHECK_OP(val1, val2, <=)\n#  define DCHECK_LT(val1, val2) CHECK_OP(val1, val2, <)\n#  define DCHECK_GE(val1, val2) CHECK_OP(val1, val2, >=)\n#  define DCHECK_GT(val1, val2) CHECK_OP(val1, val2, >)\n#else\n// These versions generate no code in optimized mode.\n#  define DCHECK_EQ(val1, val2) if (false) CHECK_OP(val1, val2, ==)\n#  define DCHECK_NE(val1, val2) if (false) CHECK_OP(val1, val2, !=)\n#  define DCHECK_LE(val1, val2) if (false) CHECK_OP(val1, val2, <=)\n#  define DCHECK_LT(val1, val2) if (false) CHECK_OP(val1, val2, <)\n#  define DCHECK_GE(val1, val2) if (false) CHECK_OP(val1, val2, >=)\n#  define DCHECK_GT(val1, val2) if (false) CHECK_OP(val1, val2, >)\n#endif  // NDEBUG\n\n// ---------------------------CHECK_NOTNULL macros ---------------------------\n\n// Helpers for CHECK_NOTNULL(). Two are necessary to support both raw pointers\n// and smart pointers.\ntemplate <typename T>\nT& CheckNotNullCommon(const char *file, int line, const char *names, T& t) {\n  if (t == NULL) {\n    LogMessageFatal(file, line, std::string(names));\n  }\n  return t;\n}\n\ntemplate <typename T>\nT* CheckNotNull(const char *file, int line, const char *names, T* t) {\n  return CheckNotNullCommon(file, line, names, t);\n}\n\ntemplate <typename T>\nT& CheckNotNull(const char *file, int line, const char *names, T& t) {\n  return CheckNotNullCommon(file, line, names, t);\n}\n\n// Check that a pointer is not null.\n#define CHECK_NOTNULL(val) \\\n  CheckNotNull(__FILE__, __LINE__, \"'\" #val \"' Must be non NULL\", (val))\n\n#ifndef NDEBUG\n// Debug only version of CHECK_NOTNULL\n#define DCHECK_NOTNULL(val) \\\n  CheckNotNull(__FILE__, __LINE__, \"'\" #val \"' Must be non NULL\", (val))\n#else\n// Optimized version - generates no code.\n#define DCHECK_NOTNULL(val) if (false)\\\n  CheckNotNull(__FILE__, __LINE__, \"'\" #val \"' Must be non NULL\", (val))\n#endif  // NDEBUG\n\n#include \"ceres/internal/reenable_warnings.h\"\n\n#endif  // CERCES_INTERNAL_MINIGLOG_GLOG_LOGGING_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/minimizer.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/line_search_minimizer.h\"\n#include \"ceres/minimizer.h\"\n#include \"ceres/trust_region_minimizer.h\"\n#include \"ceres/types.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nMinimizer* Minimizer::Create(MinimizerType minimizer_type) {\n  if (minimizer_type == TRUST_REGION) {\n    return new TrustRegionMinimizer;\n  }\n\n  if (minimizer_type == LINE_SEARCH) {\n    return new LineSearchMinimizer;\n  }\n\n  LOG(FATAL) << \"Unknown minimizer_type: \" << minimizer_type;\n  return NULL;\n}\n\n\nMinimizer::~Minimizer() {}\n\nbool Minimizer::RunCallbacks(const Minimizer::Options& options,\n                             const IterationSummary& iteration_summary,\n                             Solver::Summary* summary) {\n  const bool is_not_silent = !options.is_silent;\n  CallbackReturnType status = SOLVER_CONTINUE;\n  int i = 0;\n  while (status == SOLVER_CONTINUE && i < options.callbacks.size()) {\n    status = (*options.callbacks[i])(iteration_summary);\n    ++i;\n  }\n  switch (status) {\n    case SOLVER_CONTINUE:\n      return true;\n    case SOLVER_TERMINATE_SUCCESSFULLY:\n      summary->termination_type = USER_SUCCESS;\n      summary->message =\n          \"User callback returned SOLVER_TERMINATE_SUCCESSFULLY.\";\n      VLOG_IF(1, is_not_silent) << \"Terminating: \" << summary->message;\n      return false;\n    case SOLVER_ABORT:\n      summary->termination_type = USER_FAILURE;\n      summary->message = \"User callback returned SOLVER_ABORT.\";\n      VLOG_IF(1, is_not_silent) << \"Terminating: \" << summary->message;\n      return false;\n    default:\n      LOG(FATAL) << \"Unknown type of user callback status\";\n  }\n  return false;\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/minimizer.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_MINIMIZER_H_\n#define CERES_INTERNAL_MINIMIZER_H_\n\n#include <memory>\n#include <string>\n#include <vector>\n#include \"ceres/internal/port.h\"\n#include \"ceres/iteration_callback.h\"\n#include \"ceres/solver.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass Evaluator;\nclass SparseMatrix;\nclass TrustRegionStrategy;\nclass CoordinateDescentMinimizer;\nclass LinearSolver;\n\n// Interface for non-linear least squares solvers.\nclass Minimizer {\n public:\n  // Options struct to control the behaviour of the Minimizer. Please\n  // see solver.h for detailed information about the meaning and\n  // default values of each of these parameters.\n  struct Options {\n    Options() {\n      Init(Solver::Options());\n    }\n\n    explicit Options(const Solver::Options& options) {\n      Init(options);\n    }\n\n    void Init(const Solver::Options& options) {\n      num_threads = options.num_threads;\n      max_num_iterations = options.max_num_iterations;\n      max_solver_time_in_seconds = options.max_solver_time_in_seconds;\n      max_step_solver_retries = 5;\n      gradient_tolerance = options.gradient_tolerance;\n      parameter_tolerance = options.parameter_tolerance;\n      function_tolerance = options.function_tolerance;\n      min_relative_decrease = options.min_relative_decrease;\n      eta = options.eta;\n      jacobi_scaling = options.jacobi_scaling;\n      use_nonmonotonic_steps = options.use_nonmonotonic_steps;\n      max_consecutive_nonmonotonic_steps =\n          options.max_consecutive_nonmonotonic_steps;\n      trust_region_problem_dump_directory =\n          options.trust_region_problem_dump_directory;\n      trust_region_minimizer_iterations_to_dump =\n          options.trust_region_minimizer_iterations_to_dump;\n      trust_region_problem_dump_format_type =\n          options.trust_region_problem_dump_format_type;\n      max_num_consecutive_invalid_steps =\n          options.max_num_consecutive_invalid_steps;\n      min_trust_region_radius = options.min_trust_region_radius;\n      line_search_direction_type = options.line_search_direction_type;\n      line_search_type = options.line_search_type;\n      nonlinear_conjugate_gradient_type =\n          options.nonlinear_conjugate_gradient_type;\n      max_lbfgs_rank = options.max_lbfgs_rank;\n      use_approximate_eigenvalue_bfgs_scaling =\n          options.use_approximate_eigenvalue_bfgs_scaling;\n      line_search_interpolation_type =\n          options.line_search_interpolation_type;\n      min_line_search_step_size = options.min_line_search_step_size;\n      line_search_sufficient_function_decrease =\n          options.line_search_sufficient_function_decrease;\n      max_line_search_step_contraction =\n          options.max_line_search_step_contraction;\n      min_line_search_step_contraction =\n          options.min_line_search_step_contraction;\n      max_num_line_search_step_size_iterations =\n          options.max_num_line_search_step_size_iterations;\n      max_num_line_search_direction_restarts =\n          options.max_num_line_search_direction_restarts;\n      line_search_sufficient_curvature_decrease =\n          options.line_search_sufficient_curvature_decrease;\n      max_line_search_step_expansion =\n          options.max_line_search_step_expansion;\n      inner_iteration_tolerance = options.inner_iteration_tolerance;\n      is_silent = (options.logging_type == SILENT);\n      is_constrained = false;\n      callbacks = options.callbacks;\n    }\n\n    int max_num_iterations;\n    double max_solver_time_in_seconds;\n    int num_threads;\n\n    // Number of times the linear solver should be retried in case of\n    // numerical failure. The retries are done by exponentially scaling up\n    // mu at each retry. This leads to stronger and stronger\n    // regularization making the linear least squares problem better\n    // conditioned at each retry.\n    int max_step_solver_retries;\n    double gradient_tolerance;\n    double parameter_tolerance;\n    double function_tolerance;\n    double min_relative_decrease;\n    double eta;\n    bool jacobi_scaling;\n    bool use_nonmonotonic_steps;\n    int max_consecutive_nonmonotonic_steps;\n    std::vector<int> trust_region_minimizer_iterations_to_dump;\n    DumpFormatType trust_region_problem_dump_format_type;\n    std::string trust_region_problem_dump_directory;\n    int max_num_consecutive_invalid_steps;\n    double min_trust_region_radius;\n    LineSearchDirectionType line_search_direction_type;\n    LineSearchType line_search_type;\n    NonlinearConjugateGradientType nonlinear_conjugate_gradient_type;\n    int max_lbfgs_rank;\n    bool use_approximate_eigenvalue_bfgs_scaling;\n    LineSearchInterpolationType line_search_interpolation_type;\n    double min_line_search_step_size;\n    double line_search_sufficient_function_decrease;\n    double max_line_search_step_contraction;\n    double min_line_search_step_contraction;\n    int max_num_line_search_step_size_iterations;\n    int max_num_line_search_direction_restarts;\n    double line_search_sufficient_curvature_decrease;\n    double max_line_search_step_expansion;\n    double inner_iteration_tolerance;\n\n    // If true, then all logging is disabled.\n    bool is_silent;\n\n    // Use a bounds constrained optimization algorithm.\n    bool is_constrained;\n\n    // List of callbacks that are executed by the Minimizer at the end\n    // of each iteration.\n    //\n    // The Options struct does not own these pointers.\n    std::vector<IterationCallback*> callbacks;\n\n    // Object responsible for evaluating the cost, residuals and\n    // Jacobian matrix.\n    std::shared_ptr<Evaluator> evaluator;\n\n    // Object responsible for actually computing the trust region\n    // step, and sizing the trust region radius.\n    std::shared_ptr<TrustRegionStrategy> trust_region_strategy;\n\n    // Object holding the Jacobian matrix. It is assumed that the\n    // sparsity structure of the matrix has already been initialized\n    // and will remain constant for the life time of the\n    // optimization.\n    std::shared_ptr<SparseMatrix> jacobian;\n\n    std::shared_ptr<CoordinateDescentMinimizer> inner_iteration_minimizer;\n  };\n\n  static Minimizer* Create(MinimizerType minimizer_type);\n  static bool RunCallbacks(const Options& options,\n                           const IterationSummary& iteration_summary,\n                           Solver::Summary* summary);\n\n  virtual ~Minimizer();\n  // Note: The minimizer is expected to update the state of the\n  // parameters array every iteration. This is required for the\n  // StateUpdatingCallback to work.\n  virtual void Minimize(const Options& options,\n                        double* parameters,\n                        Solver::Summary* summary) = 0;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_MINIMIZER_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/minimizer_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n\n#include \"gtest/gtest.h\"\n#include \"ceres/iteration_callback.h\"\n#include \"ceres/minimizer.h\"\n#include \"ceres/solver.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass FakeIterationCallback : public IterationCallback {\n public:\n  virtual ~FakeIterationCallback() {}\n  CallbackReturnType operator()(const IterationSummary& summary) final {\n    return SOLVER_CONTINUE;\n  }\n};\n\nTEST(Minimizer, InitializationCopiesCallbacks) {\n  FakeIterationCallback callback0;\n  FakeIterationCallback callback1;\n\n  Solver::Options solver_options;\n  solver_options.callbacks.push_back(&callback0);\n  solver_options.callbacks.push_back(&callback1);\n\n  Minimizer::Options minimizer_options(solver_options);\n  ASSERT_EQ(2, minimizer_options.callbacks.size());\n\n  EXPECT_EQ(minimizer_options.callbacks[0], &callback0);\n  EXPECT_EQ(minimizer_options.callbacks[1], &callback1);\n}\n\nclass AbortingIterationCallback : public IterationCallback {\n public:\n  virtual ~AbortingIterationCallback() {}\n  CallbackReturnType operator()(const IterationSummary& summary) final {\n    return SOLVER_ABORT;\n  }\n};\n\nTEST(Minimizer, UserAbortUpdatesSummaryMessage) {\n  AbortingIterationCallback callback;\n  Solver::Options solver_options;\n  solver_options.callbacks.push_back(&callback);\n  Minimizer::Options minimizer_options(solver_options);\n  Solver::Summary summary;\n  Minimizer::RunCallbacks(minimizer_options, IterationSummary(), &summary);\n  EXPECT_EQ(summary.message, \"User callback returned SOLVER_ABORT.\");\n}\n\nclass SucceedingIterationCallback : public IterationCallback {\n public:\n  virtual ~SucceedingIterationCallback() {}\n  CallbackReturnType operator()(const IterationSummary& summary) final {\n    return SOLVER_TERMINATE_SUCCESSFULLY;\n  }\n};\n\nTEST(Minimizer, UserSuccessUpdatesSummaryMessage) {\n  SucceedingIterationCallback callback;\n  Solver::Options solver_options;\n  solver_options.callbacks.push_back(&callback);\n  Minimizer::Options minimizer_options(solver_options);\n  Solver::Summary summary;\n  Minimizer::RunCallbacks(minimizer_options, IterationSummary(), &summary);\n  EXPECT_EQ(summary.message,\n            \"User callback returned SOLVER_TERMINATE_SUCCESSFULLY.\");\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/normal_prior.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/normal_prior.h\"\n\n#include <cstddef>\n#include <vector>\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/types.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\n\nNormalPrior::NormalPrior(const Matrix& A, const Vector& b)\n    : A_(A), b_(b) {\n  CHECK_GT(b_.rows(), 0);\n  CHECK_GT(A_.rows(), 0);\n  CHECK_EQ(b_.rows(), A.cols());\n  set_num_residuals(A_.rows());\n  mutable_parameter_block_sizes()->push_back(b_.rows());\n}\n\nbool NormalPrior::Evaluate(double const* const* parameters,\n                           double* residuals,\n                           double** jacobians) const {\n  ConstVectorRef p(parameters[0], parameter_block_sizes()[0]);\n  VectorRef r(residuals, num_residuals());\n  // The following line should read\n  // r = A_ * (p - b_);\n  // The extra eval is to get around a bug in the eigen library.\n  r = A_ * (p - b_).eval();\n  if ((jacobians != NULL) && (jacobians[0] != NULL)) {\n    MatrixRef(jacobians[0], num_residuals(), parameter_block_sizes()[0]) = A_;\n  }\n  return true;\n}\n\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/normal_prior_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/normal_prior.h\"\n\n#include <cstddef>\n\n#include \"gtest/gtest.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/random.h\"\n\nnamespace ceres {\nnamespace internal {\n\nnamespace {\n\nvoid RandomVector(Vector* v) {\n  for (int r = 0; r < v->rows(); ++r)\n    (*v)[r] = 2 * RandDouble() - 1;\n}\n\nvoid RandomMatrix(Matrix* m) {\n  for (int r = 0; r < m->rows(); ++r) {\n    for (int c = 0; c < m->cols(); ++c) {\n      (*m)(r, c) = 2 * RandDouble() - 1;\n    }\n  }\n}\n\n}  // namespace\n\nTEST(NormalPriorTest, ResidualAtRandomPosition) {\n  srand(5);\n\n  for (int num_rows = 1; num_rows < 5; ++num_rows) {\n    for (int num_cols = 1; num_cols < 5; ++num_cols) {\n      Vector b(num_cols);\n      RandomVector(&b);\n\n      Matrix A(num_rows, num_cols);\n      RandomMatrix(&A);\n\n      double * x = new double[num_cols];\n      for (int i = 0; i < num_cols; ++i)\n        x[i] = 2 * RandDouble() - 1;\n\n      double * jacobian = new double[num_rows * num_cols];\n      Vector residuals(num_rows);\n\n      NormalPrior prior(A, b);\n      prior.Evaluate(&x, residuals.data(), &jacobian);\n\n      // Compare the norm of the residual\n      double residual_diff_norm =\n          (residuals - A * (VectorRef(x, num_cols) - b)).squaredNorm();\n      EXPECT_NEAR(residual_diff_norm, 0, 1e-10);\n\n      // Compare the jacobians\n      MatrixRef J(jacobian, num_rows, num_cols);\n      double jacobian_diff_norm = (J - A).norm();\n      EXPECT_NEAR(jacobian_diff_norm, 0.0, 1e-10);\n\n      delete []x;\n      delete []jacobian;\n    }\n  }\n}\n\nTEST(NormalPriorTest, ResidualAtRandomPositionNullJacobians) {\n  srand(5);\n\n  for (int num_rows = 1; num_rows < 5; ++num_rows) {\n    for (int num_cols = 1; num_cols < 5; ++num_cols) {\n      Vector b(num_cols);\n      RandomVector(&b);\n\n      Matrix A(num_rows, num_cols);\n      RandomMatrix(&A);\n\n      double * x = new double[num_cols];\n      for (int i = 0; i < num_cols; ++i)\n        x[i] = 2 * RandDouble() - 1;\n\n      double* jacobians[1];\n      jacobians[0] = NULL;\n\n      Vector residuals(num_rows);\n\n      NormalPrior prior(A, b);\n      prior.Evaluate(&x, residuals.data(), jacobians);\n\n      // Compare the norm of the residual\n      double residual_diff_norm =\n          (residuals - A * (VectorRef(x, num_cols) - b)).squaredNorm();\n      EXPECT_NEAR(residual_diff_norm, 0, 1e-10);\n\n      prior.Evaluate(&x, residuals.data(), NULL);\n      // Compare the norm of the residual\n      residual_diff_norm =\n          (residuals - A * (VectorRef(x, num_cols) - b)).squaredNorm();\n      EXPECT_NEAR(residual_diff_norm, 0, 1e-10);\n\n\n      delete []x;\n    }\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/numeric_diff_cost_function_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n//         tbennun@gmail.com (Tal Ben-Nun)\n\n#include \"ceres/numeric_diff_cost_function.h\"\n\n#include <algorithm>\n#include <array>\n#include <cmath>\n#include <memory>\n#include <string>\n#include <vector>\n\n#include \"ceres/array_utils.h\"\n#include \"ceres/numeric_diff_test_utils.h\"\n#include \"ceres/test_util.h\"\n#include \"ceres/types.h\"\n#include \"glog/logging.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nTEST(NumericDiffCostFunction, EasyCaseFunctorCentralDifferences) {\n  std::unique_ptr<CostFunction> cost_function;\n  cost_function.reset(\n      new NumericDiffCostFunction<EasyFunctor,\n                                  CENTRAL,\n                                  3,  /* number of residuals */\n                                  5,  /* size of x1 */\n                                  5   /* size of x2 */>(\n          new EasyFunctor));\n  EasyFunctor functor;\n  functor.ExpectCostFunctionEvaluationIsNearlyCorrect(*cost_function, CENTRAL);\n}\n\nTEST(NumericDiffCostFunction, EasyCaseFunctorForwardDifferences) {\n  std::unique_ptr<CostFunction> cost_function;\n  cost_function.reset(\n      new NumericDiffCostFunction<EasyFunctor,\n                                  FORWARD,\n                                  3,  /* number of residuals */\n                                  5,  /* size of x1 */\n                                  5   /* size of x2 */>(\n          new EasyFunctor));\n  EasyFunctor functor;\n  functor.ExpectCostFunctionEvaluationIsNearlyCorrect(*cost_function, FORWARD);\n}\n\nTEST(NumericDiffCostFunction, EasyCaseFunctorRidders) {\n  std::unique_ptr<CostFunction> cost_function;\n  cost_function.reset(\n      new NumericDiffCostFunction<EasyFunctor,\n                                  RIDDERS,\n                                  3,  /* number of residuals */\n                                  5,  /* size of x1 */\n                                  5   /* size of x2 */>(\n          new EasyFunctor));\n  EasyFunctor functor;\n  functor.ExpectCostFunctionEvaluationIsNearlyCorrect(*cost_function, RIDDERS);\n}\n\nTEST(NumericDiffCostFunction, EasyCaseCostFunctionCentralDifferences) {\n  std::unique_ptr<CostFunction> cost_function;\n  cost_function.reset(\n      new NumericDiffCostFunction<EasyCostFunction,\n                                  CENTRAL,\n                                  3,  /* number of residuals */\n                                  5,  /* size of x1 */\n                                  5   /* size of x2 */>(\n          new EasyCostFunction, TAKE_OWNERSHIP));\n  EasyFunctor functor;\n  functor.ExpectCostFunctionEvaluationIsNearlyCorrect(*cost_function, CENTRAL);\n}\n\nTEST(NumericDiffCostFunction, EasyCaseCostFunctionForwardDifferences) {\n  std::unique_ptr<CostFunction> cost_function;\n  cost_function.reset(\n      new NumericDiffCostFunction<EasyCostFunction,\n                                  FORWARD,\n                                  3,  /* number of residuals */\n                                  5,  /* size of x1 */\n                                  5   /* size of x2 */>(\n          new EasyCostFunction, TAKE_OWNERSHIP));\n  EasyFunctor functor;\n  functor.ExpectCostFunctionEvaluationIsNearlyCorrect(*cost_function, FORWARD);\n}\n\nTEST(NumericDiffCostFunction, EasyCaseCostFunctionRidders) {\n  std::unique_ptr<CostFunction> cost_function;\n  cost_function.reset(\n      new NumericDiffCostFunction<EasyCostFunction,\n                                  RIDDERS,\n                                  3,  /* number of residuals */\n                                  5,  /* size of x1 */\n                                  5   /* size of x2 */>(\n          new EasyCostFunction, TAKE_OWNERSHIP));\n  EasyFunctor functor;\n  functor.ExpectCostFunctionEvaluationIsNearlyCorrect(*cost_function, RIDDERS);\n}\n\nTEST(NumericDiffCostFunction,\n     TranscendentalCaseFunctorCentralDifferences) {\n  std::unique_ptr<CostFunction> cost_function;\n  cost_function.reset(\n      new NumericDiffCostFunction<TranscendentalFunctor,\n                                  CENTRAL,\n                                  2,  /* number of residuals */\n                                  5,  /* size of x1 */\n                                  5   /* size of x2 */>(\n          new TranscendentalFunctor));\n  TranscendentalFunctor functor;\n  functor.ExpectCostFunctionEvaluationIsNearlyCorrect(*cost_function, CENTRAL);\n}\n\nTEST(NumericDiffCostFunction,\n     TranscendentalCaseFunctorForwardDifferences) {\n  std::unique_ptr<CostFunction> cost_function;\n  cost_function.reset(\n      new NumericDiffCostFunction<TranscendentalFunctor,\n                                  FORWARD,\n                                  2,  /* number of residuals */\n                                  5,  /* size of x1 */\n                                  5   /* size of x2 */>(\n          new TranscendentalFunctor));\n  TranscendentalFunctor functor;\n  functor.ExpectCostFunctionEvaluationIsNearlyCorrect(*cost_function, FORWARD);\n}\n\nTEST(NumericDiffCostFunction,\n     TranscendentalCaseFunctorRidders) {\n  NumericDiffOptions options;\n\n  // Using a smaller initial step size to overcome oscillatory function\n  // behavior.\n  options.ridders_relative_initial_step_size = 1e-3;\n\n  std::unique_ptr<CostFunction> cost_function;\n  cost_function.reset(\n      new NumericDiffCostFunction<TranscendentalFunctor,\n                                  RIDDERS,\n                                  2,  /* number of residuals */\n                                  5,  /* size of x1 */\n                                  5   /* size of x2 */>(\n          new TranscendentalFunctor, TAKE_OWNERSHIP, 2, options));\n  TranscendentalFunctor functor;\n  functor.ExpectCostFunctionEvaluationIsNearlyCorrect(*cost_function, RIDDERS);\n}\n\nTEST(NumericDiffCostFunction,\n     TranscendentalCaseCostFunctionCentralDifferences) {\n  std::unique_ptr<CostFunction> cost_function;\n  cost_function.reset(\n      new NumericDiffCostFunction<TranscendentalCostFunction,\n                                  CENTRAL,\n                                  2,  /* number of residuals */\n                                  5,  /* size of x1 */\n                                  5   /* size of x2 */>(\n          new TranscendentalCostFunction, TAKE_OWNERSHIP));\n  TranscendentalFunctor functor;\n  functor.ExpectCostFunctionEvaluationIsNearlyCorrect(*cost_function, CENTRAL);\n}\n\nTEST(NumericDiffCostFunction,\n     TranscendentalCaseCostFunctionForwardDifferences) {\n  std::unique_ptr<CostFunction> cost_function;\n  cost_function.reset(\n      new NumericDiffCostFunction<TranscendentalCostFunction,\n                                  FORWARD,\n                                  2,  /* number of residuals */\n                                  5,  /* size of x1 */\n                                  5   /* size of x2 */>(\n          new TranscendentalCostFunction, TAKE_OWNERSHIP));\n  TranscendentalFunctor functor;\n  functor.ExpectCostFunctionEvaluationIsNearlyCorrect(*cost_function, FORWARD);\n}\n\nTEST(NumericDiffCostFunction,\n     TranscendentalCaseCostFunctionRidders) {\n  NumericDiffOptions options;\n\n  // Using a smaller initial step size to overcome oscillatory function\n  // behavior.\n  options.ridders_relative_initial_step_size = 1e-3;\n\n  std::unique_ptr<CostFunction> cost_function;\n  cost_function.reset(\n      new NumericDiffCostFunction<TranscendentalCostFunction,\n                                  RIDDERS,\n                                  2,  /* number of residuals */\n                                  5,  /* size of x1 */\n                                  5   /* size of x2 */>(\n          new TranscendentalCostFunction, TAKE_OWNERSHIP, 2, options));\n  TranscendentalFunctor functor;\n  functor.ExpectCostFunctionEvaluationIsNearlyCorrect(*cost_function, RIDDERS);\n}\n\ntemplate<int num_rows, int num_cols>\nclass SizeTestingCostFunction : public SizedCostFunction<num_rows, num_cols> {\n public:\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const final {\n    return true;\n  }\n};\n\n// As described in\n// http://forum.kde.org/viewtopic.php?f=74&t=98536#p210774\n// Eigen3 has restrictions on the Row/Column major storage of vectors,\n// depending on their dimensions. This test ensures that the correct\n// templates are instantiated for various shapes of the Jacobian\n// matrix.\nTEST(NumericDiffCostFunction, EigenRowMajorColMajorTest) {\n  std::unique_ptr<CostFunction> cost_function;\n  cost_function.reset(\n      new NumericDiffCostFunction<SizeTestingCostFunction<1,1>,  CENTRAL, 1, 1>(\n          new SizeTestingCostFunction<1,1>, ceres::TAKE_OWNERSHIP));\n\n  cost_function.reset(\n      new NumericDiffCostFunction<SizeTestingCostFunction<2,1>,  CENTRAL, 2, 1>(\n          new SizeTestingCostFunction<2,1>, ceres::TAKE_OWNERSHIP));\n\n  cost_function.reset(\n      new NumericDiffCostFunction<SizeTestingCostFunction<1,2>,  CENTRAL, 1, 2>(\n          new SizeTestingCostFunction<1,2>, ceres::TAKE_OWNERSHIP));\n\n  cost_function.reset(\n      new NumericDiffCostFunction<SizeTestingCostFunction<2,2>,  CENTRAL, 2, 2>(\n          new SizeTestingCostFunction<2,2>, ceres::TAKE_OWNERSHIP));\n\n  cost_function.reset(\n      new NumericDiffCostFunction<EasyFunctor, CENTRAL, ceres::DYNAMIC, 1, 1>(\n          new EasyFunctor, TAKE_OWNERSHIP, 1));\n\n  cost_function.reset(\n      new NumericDiffCostFunction<EasyFunctor, CENTRAL, ceres::DYNAMIC, 1, 1>(\n          new EasyFunctor, TAKE_OWNERSHIP, 2));\n\n  cost_function.reset(\n      new NumericDiffCostFunction<EasyFunctor, CENTRAL, ceres::DYNAMIC, 1, 2>(\n          new EasyFunctor, TAKE_OWNERSHIP, 1));\n\n  cost_function.reset(\n      new NumericDiffCostFunction<EasyFunctor, CENTRAL, ceres::DYNAMIC, 1, 2>(\n          new EasyFunctor, TAKE_OWNERSHIP, 2));\n\n  cost_function.reset(\n      new NumericDiffCostFunction<EasyFunctor, CENTRAL, ceres::DYNAMIC, 2, 1>(\n          new EasyFunctor, TAKE_OWNERSHIP, 1));\n\n  cost_function.reset(\n      new NumericDiffCostFunction<EasyFunctor, CENTRAL, ceres::DYNAMIC, 2, 1>(\n          new EasyFunctor, TAKE_OWNERSHIP, 2));\n}\n\nTEST(NumericDiffCostFunction,\n     EasyCaseFunctorCentralDifferencesAndDynamicNumResiduals) {\n  std::unique_ptr<CostFunction> cost_function;\n  cost_function.reset(\n      new NumericDiffCostFunction<EasyFunctor,\n                                  CENTRAL,\n                                  ceres::DYNAMIC,\n                                  5,  /* size of x1 */\n                                  5   /* size of x2 */>(\n                                      new EasyFunctor, TAKE_OWNERSHIP, 3));\n  EasyFunctor functor;\n  functor.ExpectCostFunctionEvaluationIsNearlyCorrect(*cost_function, CENTRAL);\n}\n\nTEST(NumericDiffCostFunction, ExponentialFunctorRidders) {\n  std::unique_ptr<CostFunction> cost_function;\n  cost_function.reset(\n      new NumericDiffCostFunction<ExponentialFunctor,\n                                  RIDDERS,\n                                  1,  /* number of residuals */\n                                  1   /* size of x1 */>(\n             new ExponentialFunctor));\n  ExponentialFunctor functor;\n  functor.ExpectCostFunctionEvaluationIsNearlyCorrect(*cost_function);\n}\n\nTEST(NumericDiffCostFunction, ExponentialCostFunctionRidders) {\n  std::unique_ptr<CostFunction> cost_function;\n  cost_function.reset(\n      new NumericDiffCostFunction<ExponentialCostFunction,\n                                  RIDDERS,\n                                  1,  /* number of residuals */\n                                  1   /* size of x1 */>(\n             new ExponentialCostFunction));\n  ExponentialFunctor functor;\n  functor.ExpectCostFunctionEvaluationIsNearlyCorrect(*cost_function);\n}\n\nTEST(NumericDiffCostFunction, RandomizedFunctorRidders) {\n  std::unique_ptr<CostFunction> cost_function;\n  NumericDiffOptions options;\n  // Larger initial step size is chosen to produce robust results in the\n  // presence of random noise.\n  options.ridders_relative_initial_step_size = 10.0;\n\n  cost_function.reset(\n      new NumericDiffCostFunction<RandomizedFunctor,\n                                  RIDDERS,\n                                  1,  /* number of residuals */\n                                  1   /* size of x1 */>(\n             new RandomizedFunctor(kNoiseFactor, kRandomSeed), TAKE_OWNERSHIP,\n             1, options));\n  RandomizedFunctor functor (kNoiseFactor, kRandomSeed);\n  functor.ExpectCostFunctionEvaluationIsNearlyCorrect(*cost_function);\n}\n\nTEST(NumericDiffCostFunction, RandomizedCostFunctionRidders) {\n  std::unique_ptr<CostFunction> cost_function;\n  NumericDiffOptions options;\n  // Larger initial step size is chosen to produce robust results in the\n  // presence of random noise.\n  options.ridders_relative_initial_step_size = 10.0;\n\n  cost_function.reset(\n      new NumericDiffCostFunction<RandomizedCostFunction,\n                                  RIDDERS,\n                                  1,  /* number of residuals */\n                                  1   /* size of x1 */>(\n             new RandomizedCostFunction(kNoiseFactor, kRandomSeed),\n             TAKE_OWNERSHIP, 1, options));\n  RandomizedFunctor functor (kNoiseFactor, kRandomSeed);\n  functor.ExpectCostFunctionEvaluationIsNearlyCorrect(*cost_function);\n}\n\nstruct OnlyFillsOneOutputFunctor {\n  bool operator()(const double* x, double* output) const {\n    output[0] = x[0];\n    return true;\n  }\n};\n\nTEST(NumericDiffCostFunction, PartiallyFilledResidualShouldFailEvaluation) {\n  double parameter = 1.0;\n  double jacobian[2];\n  double residuals[2];\n  double* parameters[] = {&parameter};\n  double* jacobians[] = {jacobian};\n\n  std::unique_ptr<CostFunction> cost_function(\n      new NumericDiffCostFunction<OnlyFillsOneOutputFunctor, CENTRAL, 2, 1>(\n          new OnlyFillsOneOutputFunctor));\n  InvalidateArray(2, jacobian);\n  InvalidateArray(2, residuals);\n  EXPECT_TRUE(cost_function->Evaluate(parameters, residuals, jacobians));\n  EXPECT_FALSE(IsArrayValid(2, residuals));\n  InvalidateArray(2, residuals);\n  EXPECT_TRUE(cost_function->Evaluate(parameters, residuals, NULL));\n  // We are only testing residuals here, because the Jacobians are\n  // computed using finite differencing from the residuals, so unless\n  // we introduce a validation step after every evaluation of\n  // residuals inside NumericDiffCostFunction, there is no way of\n  // ensuring that the Jacobian array is invalid.\n  EXPECT_FALSE(IsArrayValid(2, residuals));\n}\n\nTEST(NumericDiffCostFunction, ParameterBlockConstant) {\n  constexpr int kNumResiduals = 3;\n  constexpr int kX1 = 5;\n  constexpr int kX2 = 5;\n\n  std::unique_ptr<CostFunction> cost_function;\n  cost_function.reset(new NumericDiffCostFunction<EasyFunctor,\n                                                  CENTRAL,\n                                                  kNumResiduals,\n                                                  kX1,\n                                                  kX2>(new EasyFunctor));\n\n  // Prepare the parameters and residuals.\n  std::array<double, kX1> x1{1e-64, 2.0, 3.0, 4.0, 5.0};\n  std::array<double, kX2> x2{9.0, 9.0, 5.0, 5.0, 1.0};\n  std::array<double*, 2> parameter_blocks{x1.data(), x2.data()};\n\n  std::vector<double> residuals(kNumResiduals, -100000);\n\n  // Evaluate the full jacobian.\n  std::vector<std::vector<double>> jacobian_full_vect(2);\n  jacobian_full_vect[0].resize(kNumResiduals * kX1, -100000);\n  jacobian_full_vect[1].resize(kNumResiduals * kX2, -100000);\n  {\n    std::array<double*, 2> jacobian{jacobian_full_vect[0].data(),\n                                    jacobian_full_vect[1].data()};\n    ASSERT_TRUE(cost_function->Evaluate(\n        parameter_blocks.data(), residuals.data(), jacobian.data()));\n  }\n\n  // Evaluate and check jacobian when first parameter block is constant.\n  {\n    std::vector<double> jacobian_vect(kNumResiduals * kX2, -100000);\n    std::array<double*, 2> jacobian{nullptr, jacobian_vect.data()};\n\n    ASSERT_TRUE(cost_function->Evaluate(\n        parameter_blocks.data(), residuals.data(), jacobian.data()));\n\n    for (int i = 0; i < kNumResiduals * kX2; ++i) {\n      EXPECT_DOUBLE_EQ(jacobian_full_vect[1][i], jacobian_vect[i]);\n    }\n  }\n\n  // Evaluate and check jacobian when second parameter block is constant.\n  {\n    std::vector<double> jacobian_vect(kNumResiduals * kX1, -100000);\n    std::array<double*, 2> jacobian{jacobian_vect.data(), nullptr};\n\n    ASSERT_TRUE(cost_function->Evaluate(\n        parameter_blocks.data(), residuals.data(), jacobian.data()));\n\n    for (int i = 0; i < kNumResiduals * kX1; ++i) {\n      EXPECT_DOUBLE_EQ(jacobian_full_vect[0][i], jacobian_vect[i]);\n    }\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/numeric_diff_test_utils.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//         tbennun@gmail.com (Tal Ben-Nun)\n\n#include \"ceres/numeric_diff_test_utils.h\"\n\n#include <algorithm>\n#include <cmath>\n#include \"ceres/cost_function.h\"\n#include \"ceres/test_util.h\"\n#include \"ceres/types.h\"\n#include \"gtest/gtest.h\"\n\n\nnamespace ceres {\nnamespace internal {\n\nbool EasyFunctor::operator()(const double* x1,\n                             const double* x2,\n                             double* residuals) const {\n  residuals[0] = residuals[1] = residuals[2] = 0;\n  for (int i = 0; i < 5; ++i) {\n    residuals[0] += x1[i] * x2[i];\n    residuals[2] += x2[i] * x2[i];\n  }\n  residuals[1] = residuals[0] * residuals[0];\n  return true;\n}\n\nvoid EasyFunctor::ExpectCostFunctionEvaluationIsNearlyCorrect(\n    const CostFunction& cost_function,\n    NumericDiffMethodType method) const {\n  // The x1[0] is made deliberately small to test the performance near\n  // zero.\n  double x1[] = { 1e-64, 2.0, 3.0, 4.0, 5.0 };\n  double x2[] = { 9.0, 9.0, 5.0, 5.0, 1.0 };\n  double *parameters[] = { &x1[0], &x2[0] };\n\n  double dydx1[15];  // 3 x 5, row major.\n  double dydx2[15];  // 3 x 5, row major.\n  double *jacobians[2] = { &dydx1[0], &dydx2[0] };\n\n  double residuals[3] = {-1e-100, -2e-100, -3e-100 };\n\n  ASSERT_TRUE(cost_function.Evaluate(&parameters[0],\n                                     &residuals[0],\n                                     &jacobians[0]));\n\n  double expected_residuals[3];\n  EasyFunctor functor;\n  functor(x1, x2, expected_residuals);\n  EXPECT_EQ(expected_residuals[0], residuals[0]);\n  EXPECT_EQ(expected_residuals[1], residuals[1]);\n  EXPECT_EQ(expected_residuals[2], residuals[2]);\n\n  double tolerance = 0.0;\n  switch (method) {\n    default:\n    case CENTRAL:\n      tolerance = 3e-9;\n      break;\n\n    case FORWARD:\n      tolerance = 2e-5;\n      break;\n\n    case RIDDERS:\n      tolerance = 1e-13;\n      break;\n  }\n\n  for (int i = 0; i < 5; ++i) {\n    ExpectClose(x2[i],                    dydx1[5 * 0 + i], tolerance);  // y1\n    ExpectClose(x1[i],                    dydx2[5 * 0 + i], tolerance);\n    ExpectClose(2 * x2[i] * residuals[0], dydx1[5 * 1 + i], tolerance);  // y2\n    ExpectClose(2 * x1[i] * residuals[0], dydx2[5 * 1 + i], tolerance);\n    ExpectClose(0.0,                      dydx1[5 * 2 + i], tolerance);  // y3\n    ExpectClose(2 * x2[i],                dydx2[5 * 2 + i], tolerance);\n  }\n}\n\nbool TranscendentalFunctor::operator()(const double* x1,\n                                       const double* x2,\n                                       double* residuals) const {\n  double x1x2 = 0;\n  for (int i = 0; i < 5; ++i) {\n    x1x2 += x1[i] * x2[i];\n  }\n  residuals[0] = sin(x1x2);\n  residuals[1] = exp(-x1x2 / 10);\n  return true;\n}\n\nvoid TranscendentalFunctor::ExpectCostFunctionEvaluationIsNearlyCorrect(\n    const CostFunction& cost_function,\n    NumericDiffMethodType method) const {\n\n  struct TestParameterBlocks {\n    double x1[5];\n    double x2[5];\n  };\n\n  std::vector<TestParameterBlocks> kTests =  {\n    { { 1.0, 2.0, 3.0, 4.0, 5.0 },  // No zeros.\n      { 9.0, 9.0, 5.0, 5.0, 1.0 },\n    },\n    { { 0.0, 2.0, 3.0, 0.0, 5.0 },  // Some zeros x1.\n      { 9.0, 9.0, 5.0, 5.0, 1.0 },\n    },\n    { { 1.0, 2.0, 3.0, 1.0, 5.0 },  // Some zeros x2.\n      { 0.0, 9.0, 0.0, 5.0, 0.0 },\n    },\n    { { 0.0, 0.0, 0.0, 0.0, 0.0 },  // All zeros x1.\n      { 9.0, 9.0, 5.0, 5.0, 1.0 },\n    },\n    { { 1.0, 2.0, 3.0, 4.0, 5.0 },  // All zeros x2.\n      { 0.0, 0.0, 0.0, 0.0, 0.0 },\n    },\n    { { 0.0, 0.0, 0.0, 0.0, 0.0 },  // All zeros.\n      { 0.0, 0.0, 0.0, 0.0, 0.0 },\n    },\n  };\n\n  for (int k = 0; k < kTests.size(); ++k) {\n    double *x1 = &(kTests[k].x1[0]);\n    double *x2 = &(kTests[k].x2[0]);\n    double *parameters[] = { x1, x2 };\n\n    double dydx1[10];\n    double dydx2[10];\n    double *jacobians[2] = { &dydx1[0], &dydx2[0] };\n\n    double residuals[2];\n\n    ASSERT_TRUE(cost_function.Evaluate(&parameters[0],\n                                       &residuals[0],\n                                       &jacobians[0]));\n    double x1x2 = 0;\n    for (int i = 0; i < 5; ++i) {\n      x1x2 += x1[i] * x2[i];\n    }\n\n    double tolerance = 0.0;\n    switch (method) {\n      default:\n      case CENTRAL:\n        tolerance = 2e-7;\n        break;\n\n      case FORWARD:\n        tolerance = 2e-5;\n        break;\n\n      case RIDDERS:\n        tolerance = 3e-12;\n        break;\n    }\n\n    for (int i = 0; i < 5; ++i) {\n      ExpectClose( x2[i] * cos(x1x2),              dydx1[5 * 0 + i], tolerance);\n      ExpectClose( x1[i] * cos(x1x2),              dydx2[5 * 0 + i], tolerance);\n      ExpectClose(-x2[i] * exp(-x1x2 / 10.) / 10., dydx1[5 * 1 + i], tolerance);\n      ExpectClose(-x1[i] * exp(-x1x2 / 10.) / 10., dydx2[5 * 1 + i], tolerance);\n    }\n  }\n}\n\nbool ExponentialFunctor::operator()(const double* x1,\n                                    double* residuals) const {\n  residuals[0] = exp(x1[0]);\n  return true;\n}\n\n\nvoid ExponentialFunctor::ExpectCostFunctionEvaluationIsNearlyCorrect(\n    const CostFunction& cost_function) const {\n  // Evaluating the functor at specific points for testing.\n  std::vector<double> kTests = { 1.0, 2.0, 3.0, 4.0, 5.0 };\n\n  // Minimal tolerance w.r.t. the cost function and the tests.\n  const double kTolerance = 2e-14;\n\n  for (int k = 0; k < kTests.size(); ++k) {\n    double *parameters[] = { &kTests[k] };\n    double dydx;\n    double *jacobians[1] = { &dydx };\n    double residual;\n\n    ASSERT_TRUE(cost_function.Evaluate(&parameters[0],\n                                       &residual,\n                                       &jacobians[0]));\n\n\n    double expected_result = exp(kTests[k]);\n\n    // Expect residual to be close to exp(x).\n    ExpectClose(residual, expected_result, kTolerance);\n\n    // Check evaluated differences. dydx should also be close to exp(x).\n    ExpectClose(dydx, expected_result, kTolerance);\n  }\n}\n\nbool RandomizedFunctor::operator()(const double* x1,\n                                   double* residuals) const {\n  double random_value = static_cast<double>(rand()) /\n      static_cast<double>(RAND_MAX);\n\n  // Normalize noise to [-factor, factor].\n  random_value *= 2.0;\n  random_value -= 1.0;\n  random_value *= noise_factor_;\n\n  residuals[0] = x1[0] * x1[0] + random_value;\n  return true;\n}\n\nvoid RandomizedFunctor::ExpectCostFunctionEvaluationIsNearlyCorrect(\n    const CostFunction& cost_function) const {\n  std::vector<double> kTests = { 0.0, 1.0, 3.0, 4.0, 50.0 };\n\n  const double kTolerance = 2e-4;\n\n  // Initialize random number generator with given seed.\n  srand(random_seed_);\n\n  for (int k = 0; k < kTests.size(); ++k) {\n    double *parameters[] = { &kTests[k] };\n    double dydx;\n    double *jacobians[1] = { &dydx };\n    double residual;\n\n    ASSERT_TRUE(cost_function.Evaluate(&parameters[0],\n                                       &residual,\n                                       &jacobians[0]));\n\n    // Expect residual to be close to x^2 w.r.t. noise factor.\n    ExpectClose(residual, kTests[k] * kTests[k], noise_factor_);\n\n    // Check evaluated differences. (dy/dx = ~2x)\n    ExpectClose(dydx, 2 * kTests[k], kTolerance);\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/numeric_diff_test_utils.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_NUMERIC_DIFF_TEST_UTILS_H_\n#define CERES_INTERNAL_NUMERIC_DIFF_TEST_UTILS_H_\n\n#include \"ceres/cost_function.h\"\n#include \"ceres/sized_cost_function.h\"\n#include \"ceres/types.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// Noise factor for randomized cost function.\nstatic constexpr double kNoiseFactor = 0.01;\n\n// Default random seed for randomized cost function.\nstatic constexpr unsigned int kRandomSeed = 1234;\n\n// y1 = x1'x2      -> dy1/dx1 = x2,               dy1/dx2 = x1\n// y2 = (x1'x2)^2  -> dy2/dx1 = 2 * x2 * (x1'x2), dy2/dx2 = 2 * x1 * (x1'x2)\n// y3 = x2'x2      -> dy3/dx1 = 0,                dy3/dx2 = 2 * x2\nclass EasyFunctor {\n public:\n  bool operator()(const double* x1, const double* x2, double* residuals) const;\n  void ExpectCostFunctionEvaluationIsNearlyCorrect(\n      const CostFunction& cost_function,\n      NumericDiffMethodType method) const;\n};\n\nclass EasyCostFunction : public SizedCostFunction<3, 5, 5> {\n public:\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** /* not used */) const final {\n    return functor_(parameters[0], parameters[1], residuals);\n  }\n\n private:\n  EasyFunctor functor_;\n};\n\n// y1 = sin(x1'x2)\n// y2 = exp(-x1'x2 / 10)\n//\n// dy1/dx1 =  x2 * cos(x1'x2),            dy1/dx2 =  x1 * cos(x1'x2)\n// dy2/dx1 = -x2 * exp(-x1'x2 / 10) / 10, dy2/dx2 = -x2 * exp(-x1'x2 / 10) / 10\nclass TranscendentalFunctor {\n public:\n  bool operator()(const double* x1, const double* x2, double* residuals) const;\n  void ExpectCostFunctionEvaluationIsNearlyCorrect(\n      const CostFunction& cost_function,\n      NumericDiffMethodType method) const;\n};\n\nclass TranscendentalCostFunction : public SizedCostFunction<2, 5, 5> {\n public:\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** /* not used */) const final {\n    return functor_(parameters[0], parameters[1], residuals);\n  }\n private:\n  TranscendentalFunctor functor_;\n};\n\n// y = exp(x), dy/dx = exp(x)\nclass ExponentialFunctor {\n public:\n  bool operator()(const double* x1, double* residuals) const;\n  void ExpectCostFunctionEvaluationIsNearlyCorrect(\n      const CostFunction& cost_function) const;\n};\n\nclass ExponentialCostFunction : public SizedCostFunction<1, 1> {\n public:\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** /* not used */) const final {\n    return functor_(parameters[0], residuals);\n  }\n\n private:\n  ExponentialFunctor functor_;\n};\n\n// Test adaptive numeric differentiation by synthetically adding random noise\n// to a functor.\n// y = x^2 + [random noise], dy/dx ~ 2x\nclass RandomizedFunctor {\n public:\n  RandomizedFunctor(double noise_factor, unsigned int random_seed)\n      : noise_factor_(noise_factor), random_seed_(random_seed) {\n  }\n\n  bool operator()(const double* x1, double* residuals) const;\n  void ExpectCostFunctionEvaluationIsNearlyCorrect(\n      const CostFunction& cost_function) const;\n\n private:\n  double noise_factor_;\n  unsigned int random_seed_;\n};\n\nclass RandomizedCostFunction : public SizedCostFunction<1, 1> {\n public:\n  RandomizedCostFunction(double noise_factor, unsigned int random_seed)\n      : functor_(noise_factor, random_seed) {\n  }\n\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** /* not used */) const final {\n    return functor_(parameters[0], residuals);\n  }\n\n private:\n  RandomizedFunctor functor_;\n};\n\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_NUMERIC_DIFF_TEST_UTILS_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/ordered_groups_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/ordered_groups.h\"\n\n#include <cstddef>\n#include <vector>\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nTEST(OrderedGroups, EmptyOrderedGroupBehavesCorrectly) {\n  ParameterBlockOrdering ordering;\n  EXPECT_EQ(ordering.NumGroups(), 0);\n  EXPECT_EQ(ordering.NumElements(), 0);\n  EXPECT_EQ(ordering.GroupSize(1), 0);\n  double x;\n  EXPECT_EQ(ordering.GroupId(&x), -1);\n  EXPECT_FALSE(ordering.Remove(&x));\n}\n\nTEST(OrderedGroups, EverythingInOneGroup) {\n  ParameterBlockOrdering ordering;\n  double x[3];\n  ordering.AddElementToGroup(x, 1);\n  ordering.AddElementToGroup(x + 1, 1);\n  ordering.AddElementToGroup(x + 2, 1);\n  ordering.AddElementToGroup(x, 1);\n\n  EXPECT_EQ(ordering.NumGroups(), 1);\n  EXPECT_EQ(ordering.NumElements(), 3);\n  EXPECT_EQ(ordering.GroupSize(1), 3);\n  EXPECT_EQ(ordering.GroupSize(0), 0);\n  EXPECT_EQ(ordering.GroupId(x), 1);\n  EXPECT_EQ(ordering.GroupId(x + 1), 1);\n  EXPECT_EQ(ordering.GroupId(x + 2), 1);\n\n  ordering.Remove(x);\n  EXPECT_EQ(ordering.NumGroups(), 1);\n  EXPECT_EQ(ordering.NumElements(), 2);\n  EXPECT_EQ(ordering.GroupSize(1), 2);\n  EXPECT_EQ(ordering.GroupSize(0), 0);\n\n  EXPECT_EQ(ordering.GroupId(x), -1);\n  EXPECT_EQ(ordering.GroupId(x + 1), 1);\n  EXPECT_EQ(ordering.GroupId(x + 2), 1);\n}\n\nTEST(OrderedGroups, StartInOneGroupAndThenSplit) {\n  ParameterBlockOrdering ordering;\n  double x[3];\n  ordering.AddElementToGroup(x, 1);\n  ordering.AddElementToGroup(x + 1, 1);\n  ordering.AddElementToGroup(x + 2, 1);\n  ordering.AddElementToGroup(x, 1);\n\n  EXPECT_EQ(ordering.NumGroups(), 1);\n  EXPECT_EQ(ordering.NumElements(), 3);\n  EXPECT_EQ(ordering.GroupSize(1), 3);\n  EXPECT_EQ(ordering.GroupSize(0), 0);\n  EXPECT_EQ(ordering.GroupId(x), 1);\n  EXPECT_EQ(ordering.GroupId(x + 1), 1);\n  EXPECT_EQ(ordering.GroupId(x + 2), 1);\n\n  ordering.AddElementToGroup(x, 5);\n  EXPECT_EQ(ordering.NumGroups(), 2);\n  EXPECT_EQ(ordering.NumElements(), 3);\n  EXPECT_EQ(ordering.GroupSize(1), 2);\n  EXPECT_EQ(ordering.GroupSize(5), 1);\n  EXPECT_EQ(ordering.GroupSize(0), 0);\n\n  EXPECT_EQ(ordering.GroupId(x), 5);\n  EXPECT_EQ(ordering.GroupId(x + 1), 1);\n  EXPECT_EQ(ordering.GroupId(x + 2), 1);\n}\n\nTEST(OrderedGroups, AddAndRemoveEveryThingFromOneGroup) {\n  ParameterBlockOrdering ordering;\n  double x[3];\n  ordering.AddElementToGroup(x, 1);\n  ordering.AddElementToGroup(x + 1, 1);\n  ordering.AddElementToGroup(x + 2, 1);\n  ordering.AddElementToGroup(x, 1);\n\n  EXPECT_EQ(ordering.NumGroups(), 1);\n  EXPECT_EQ(ordering.NumElements(), 3);\n  EXPECT_EQ(ordering.GroupSize(1), 3);\n  EXPECT_EQ(ordering.GroupSize(0), 0);\n  EXPECT_EQ(ordering.GroupId(x), 1);\n  EXPECT_EQ(ordering.GroupId(x + 1), 1);\n  EXPECT_EQ(ordering.GroupId(x + 2), 1);\n\n  ordering.AddElementToGroup(x, 5);\n  ordering.AddElementToGroup(x + 1, 5);\n  ordering.AddElementToGroup(x + 2, 5);\n  EXPECT_EQ(ordering.NumGroups(), 1);\n  EXPECT_EQ(ordering.NumElements(), 3);\n  EXPECT_EQ(ordering.GroupSize(1), 0);\n  EXPECT_EQ(ordering.GroupSize(5), 3);\n  EXPECT_EQ(ordering.GroupSize(0), 0);\n\n  EXPECT_EQ(ordering.GroupId(x), 5);\n  EXPECT_EQ(ordering.GroupId(x + 1), 5);\n  EXPECT_EQ(ordering.GroupId(x + 2), 5);\n}\n\nTEST(OrderedGroups, ReverseOrdering) {\n  ParameterBlockOrdering ordering;\n  double x[3];\n  ordering.AddElementToGroup(x, 1);\n  ordering.AddElementToGroup(x + 1, 2);\n  ordering.AddElementToGroup(x + 2, 2);\n\n  EXPECT_EQ(ordering.NumGroups(), 2);\n  EXPECT_EQ(ordering.NumElements(), 3);\n  EXPECT_EQ(ordering.GroupSize(1), 1);\n  EXPECT_EQ(ordering.GroupSize(2), 2);\n  EXPECT_EQ(ordering.GroupId(x), 1);\n  EXPECT_EQ(ordering.GroupId(x + 1), 2);\n  EXPECT_EQ(ordering.GroupId(x + 2), 2);\n\n  ordering.Reverse();\n\n  EXPECT_EQ(ordering.NumGroups(), 2);\n  EXPECT_EQ(ordering.NumElements(), 3);\n  EXPECT_EQ(ordering.GroupSize(3), 1);\n  EXPECT_EQ(ordering.GroupSize(2), 2);\n  EXPECT_EQ(ordering.GroupId(x), 3);\n  EXPECT_EQ(ordering.GroupId(x + 1), 2);\n  EXPECT_EQ(ordering.GroupId(x + 2), 2);\n}\n\nTEST(OrderedGroups, ReverseOrderingWithEmptyOrderedGroups) {\n  ParameterBlockOrdering ordering;\n  // This should be a no-op.\n  ordering.Reverse();\n\n  // Ensure the properties of an empty OrderedGroups still hold after Reverse().\n  EXPECT_EQ(ordering.NumGroups(), 0);\n  EXPECT_EQ(ordering.NumElements(), 0);\n  EXPECT_EQ(ordering.GroupSize(1), 0);\n  double x;\n  EXPECT_EQ(ordering.GroupId(&x), -1);\n  EXPECT_FALSE(ordering.Remove(&x));\n}\n\nTEST(OrderedGroups, BulkRemove) {\n  ParameterBlockOrdering ordering;\n  double x[3];\n  ordering.AddElementToGroup(x, 1);\n  ordering.AddElementToGroup(x + 1, 2);\n  ordering.AddElementToGroup(x + 2, 2);\n\n  std::vector<double*> elements_to_remove;\n  elements_to_remove.push_back(x);\n  elements_to_remove.push_back(x + 2);\n\n  EXPECT_EQ(ordering.Remove(elements_to_remove), 2);\n  EXPECT_EQ(ordering.NumElements(), 1);\n  EXPECT_EQ(ordering.GroupId(x), -1);\n  EXPECT_EQ(ordering.GroupId(x + 1), 2);\n  EXPECT_EQ(ordering.GroupId(x + 2), -1);\n}\n\nTEST(OrderedGroups, BulkRemoveWithNoElements) {\n  ParameterBlockOrdering ordering;\n\n  double x[3];\n  std::vector<double*> elements_to_remove;\n  elements_to_remove.push_back(x);\n  elements_to_remove.push_back(x + 2);\n\n  EXPECT_EQ(ordering.Remove(elements_to_remove), 0);\n\n  ordering.AddElementToGroup(x, 1);\n  ordering.AddElementToGroup(x + 1, 2);\n  ordering.AddElementToGroup(x + 2, 2);\n\n  elements_to_remove.clear();\n  EXPECT_EQ(ordering.Remove(elements_to_remove), 0);\n}\n\nTEST(OrderedGroups, MinNonZeroGroup) {\n  ParameterBlockOrdering ordering;\n  double x[3];\n\n  ordering.AddElementToGroup(x, 1);\n  ordering.AddElementToGroup(x + 1, 1);\n  ordering.AddElementToGroup(x + 2, 2);\n\n  EXPECT_EQ(ordering.MinNonZeroGroup(), 1);\n  ordering.Remove(x);\n\n  EXPECT_EQ(ordering.MinNonZeroGroup(), 1);\n  ordering.Remove(x + 1);\n\n  EXPECT_EQ(ordering.MinNonZeroGroup(), 2);\n  ordering.Remove(x + 2);\n\n  // No non-zero groups left.\n  EXPECT_DEATH_IF_SUPPORTED(ordering.MinNonZeroGroup(), \"NumGroups\");\n}\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/pair_hash.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n//\n// A hasher for std::pair<T, T>.\n\n#ifndef CERES_INTERNAL_PAIR_HASH_H_\n#define CERES_INTERNAL_PAIR_HASH_H_\n\n#include \"ceres/internal/port.h\"\n#include <cstdint>\n#include <utility>\n\nnamespace ceres {\nnamespace internal {\n\n#if defined(_WIN32) && !defined(__MINGW64__) && !defined(__MINGW32__)\n#define GG_LONGLONG(x) x##I64\n#define GG_ULONGLONG(x) x##UI64\n#else\n#define GG_LONGLONG(x) x##LL\n#define GG_ULONGLONG(x) x##ULL\n#endif\n\n// The hash function is due to Bob Jenkins (see\n// http://burtleburtle.net/bob/hash/index.html). Each mix takes 36 instructions,\n// in 18 cycles if you're lucky. On x86 architectures, this requires 45\n// instructions in 27 cycles, if you're lucky.\n//\n// 32bit version\ninline void hash_mix(uint32_t& a, uint32_t& b, uint32_t& c) {\n  a -= b; a -= c; a ^= (c>>13);\n  b -= c; b -= a; b ^= (a<<8);\n  c -= a; c -= b; c ^= (b>>13);\n  a -= b; a -= c; a ^= (c>>12);\n  b -= c; b -= a; b ^= (a<<16);\n  c -= a; c -= b; c ^= (b>>5);\n  a -= b; a -= c; a ^= (c>>3);\n  b -= c; b -= a; b ^= (a<<10);\n  c -= a; c -= b; c ^= (b>>15);\n}\n\n// 64bit version\ninline void hash_mix(uint64_t& a, uint64_t& b, uint64_t& c) {\n  a -= b; a -= c; a ^= (c>>43);\n  b -= c; b -= a; b ^= (a<<9);\n  c -= a; c -= b; c ^= (b>>8);\n  a -= b; a -= c; a ^= (c>>38);\n  b -= c; b -= a; b ^= (a<<23);\n  c -= a; c -= b; c ^= (b>>5);\n  a -= b; a -= c; a ^= (c>>35);\n  b -= c; b -= a; b ^= (a<<49);\n  c -= a; c -= b; c ^= (b>>11);\n}\n\ninline uint32_t Hash32NumWithSeed(uint32_t num, uint32_t c) {\n  // The golden ratio; an arbitrary value.\n  uint32_t b = 0x9e3779b9UL;\n  hash_mix(num, b, c);\n  return c;\n}\n\ninline uint64_t Hash64NumWithSeed(uint64_t num, uint64_t c) {\n  // More of the golden ratio.\n  uint64_t b = GG_ULONGLONG(0xe08c1d668b756f82);\n  hash_mix(num, b, c);\n  return c;\n}\n\n// Hasher for STL pairs. Requires hashers for both members to be defined.\nstruct pair_hash {\n public:\n  template <typename T>\n  std::size_t operator()(const std::pair<T, T>& p) const {\n    const std::size_t h1 = std::hash<T>()(p.first);\n    const std::size_t h2 = std::hash<T>()(p.second);\n    // The decision below is at compile time\n    return (sizeof(h1) <= sizeof(uint32_t)) ? Hash32NumWithSeed(h1, h2)\n                                            : Hash64NumWithSeed(h1, h2);\n  }\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_PAIR_HASH_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/parallel_for.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: vitus@google.com (Michael Vitus)\n\n#ifndef CERES_INTERNAL_PARALLEL_FOR_\n#define CERES_INTERNAL_PARALLEL_FOR_\n\n#include <functional>\n\n#include \"ceres/context_impl.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// Returns the maximum number of threads supported by the threading backend\n// Ceres was compiled with.\nint MaxNumThreadsAvailable();\n\n// Execute the function for every element in the range [start, end) with at most\n// num_threads. It will execute all the work on the calling thread if\n// num_threads is 1.\nvoid ParallelFor(ContextImpl* context,\n                 int start,\n                 int end,\n                 int num_threads,\n                 const std::function<void(int)>& function);\n\n// Execute the function for every element in the range [start, end) with at most\n// num_threads. It will execute all the work on the calling thread if\n// num_threads is 1.  Each invocation of function() will be passed a thread_id\n// in [0, num_threads) that is guaranteed to be distinct from the value passed\n// to any concurrent execution of function().\nvoid ParallelFor(ContextImpl* context,\n                 int start,\n                 int end,\n                 int num_threads,\n                 const std::function<void(int thread_id, int i)>& function);\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_PARALLEL_FOR_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/parallel_for_cxx.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: vitus@google.com (Michael Vitus)\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifdef CERES_USE_CXX11_THREADS\n\n#include \"ceres/parallel_for.h\"\n\n#include <cmath>\n#include <condition_variable>\n#include <memory>\n#include <mutex>\n\n#include \"ceres/concurrent_queue.h\"\n#include \"ceres/scoped_thread_token.h\"\n#include \"ceres/thread_token_provider.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\nnamespace {\n// This class creates a thread safe barrier which will block until a\n// pre-specified number of threads call Finished.  This allows us to block the\n// main thread until all the parallel threads are finished processing all the\n// work.\nclass BlockUntilFinished {\n public:\n  explicit BlockUntilFinished(int num_total)\n      : num_finished_(0), num_total_(num_total) {}\n\n  // Increment the number of jobs that have finished and signal the blocking\n  // thread if all jobs have finished.\n  void Finished() {\n    std::lock_guard<std::mutex> lock(mutex_);\n    ++num_finished_;\n    CHECK_LE(num_finished_, num_total_);\n    if (num_finished_ == num_total_) {\n      condition_.notify_one();\n    }\n  }\n\n  // Block until all threads have signaled they are finished.\n  void Block() {\n    std::unique_lock<std::mutex> lock(mutex_);\n    condition_.wait(lock, [&]() { return num_finished_ == num_total_; });\n  }\n\n private:\n  std::mutex mutex_;\n  std::condition_variable condition_;\n  // The current number of jobs finished.\n  int num_finished_;\n  // The total number of jobs.\n  int num_total_;\n};\n\n// Shared state between the parallel tasks. Each thread will use this\n// information to get the next block of work to be performed.\nstruct SharedState {\n  SharedState(int start, int end, int num_work_items)\n      : start(start),\n        end(end),\n        num_work_items(num_work_items),\n        i(0),\n        thread_token_provider(num_work_items),\n        block_until_finished(num_work_items) {}\n\n  // The start and end index of the for loop.\n  const int start;\n  const int end;\n  // The number of blocks that need to be processed.\n  const int num_work_items;\n\n  // The next block of work to be assigned to a worker.  The parallel for loop\n  // range is split into num_work_items blocks of work, i.e. a single block of\n  // work is:\n  //  for (int j = start + i; j < end; j += num_work_items) { ... }.\n  int i;\n  std::mutex mutex_i;\n\n  // Provides a unique thread ID among all active threads working on the same\n  // group of tasks.  Thread-safe.\n  ThreadTokenProvider thread_token_provider;\n\n  // Used to signal when all the work has been completed.  Thread safe.\n  BlockUntilFinished block_until_finished;\n};\n\n}  // namespace\n\nint MaxNumThreadsAvailable() {\n  return ThreadPool::MaxNumThreadsAvailable();\n}\n\n// See ParallelFor (below) for more details.\nvoid ParallelFor(ContextImpl* context,\n                 int start,\n                 int end,\n                 int num_threads,\n                 const std::function<void(int)>& function) {\n  CHECK_GT(num_threads, 0);\n  CHECK(context != NULL);\n  if (end <= start) {\n    return;\n  }\n\n  // Fast path for when it is single threaded.\n  if (num_threads == 1) {\n    for (int i = start; i < end; ++i) {\n      function(i);\n    }\n    return;\n  }\n\n  ParallelFor(context, start, end, num_threads,\n              [&function](int /*thread_id*/, int i) { function(i); });\n}\n\n// This implementation uses a fixed size max worker pool with a shared task\n// queue. The problem of executing the function for the interval of [start, end)\n// is broken up into at most num_threads blocks and added to the thread pool. To\n// avoid deadlocks, the calling thread is allowed to steal work from the worker\n// pool. This is implemented via a shared state between the tasks. In order for\n// the calling thread or thread pool to get a block of work, it will query the\n// shared state for the next block of work to be done. If there is nothing left,\n// it will return. We will exit the ParallelFor call when all of the work has\n// been done, not when all of the tasks have been popped off the task queue.\n//\n// A unique thread ID among all active tasks will be acquired once for each\n// block of work.  This avoids the significant performance penalty for acquiring\n// it on every iteration of the for loop. The thread ID is guaranteed to be in\n// [0, num_threads).\n//\n// A performance analysis has shown this implementation is onpar with OpenMP and\n// TBB.\nvoid ParallelFor(ContextImpl* context,\n                 int start,\n                 int end,\n                 int num_threads,\n                 const std::function<void(int thread_id, int i)>& function) {\n  CHECK_GT(num_threads, 0);\n  CHECK(context != NULL);\n  if (end <= start) {\n    return;\n  }\n\n  // Fast path for when it is single threaded.\n  if (num_threads == 1) {\n    // Even though we only have one thread, use the thread token provider to\n    // guarantee the exact same behavior when running with multiple threads.\n    ThreadTokenProvider thread_token_provider(num_threads);\n    const ScopedThreadToken scoped_thread_token(&thread_token_provider);\n    const int thread_id = scoped_thread_token.token();\n    for (int i = start; i < end; ++i) {\n      function(thread_id, i);\n    }\n    return;\n  }\n\n  // We use a std::shared_ptr because the main thread can finish all\n  // the work before the tasks have been popped off the queue.  So the\n  // shared state needs to exist for the duration of all the tasks.\n  const int num_work_items = std::min((end - start), num_threads);\n  std::shared_ptr<SharedState> shared_state(\n      new SharedState(start, end, num_work_items));\n\n  // A function which tries to perform a chunk of work. This returns false if\n  // there is no work to be done.\n  auto task_function = [shared_state, &function]() {\n    int i = 0;\n    {\n      // Get the next available chunk of work to be performed. If there is no\n      // work, return false.\n      std::lock_guard<std::mutex> lock(shared_state->mutex_i);\n      if (shared_state->i >= shared_state->num_work_items) {\n        return false;\n      }\n      i = shared_state->i;\n      ++shared_state->i;\n    }\n\n    const ScopedThreadToken scoped_thread_token(\n        &shared_state->thread_token_provider);\n    const int thread_id = scoped_thread_token.token();\n\n    // Perform each task.\n    for (int j = shared_state->start + i;\n         j < shared_state->end;\n         j += shared_state->num_work_items) {\n      function(thread_id, j);\n    }\n    shared_state->block_until_finished.Finished();\n    return true;\n  };\n\n  // Add all the tasks to the thread pool.\n  for (int i = 0; i < num_work_items; ++i) {\n    // Note we are taking the task_function as value so the shared_state\n    // shared pointer is copied and the ref count is increased. This is to\n    // prevent it from being deleted when the main thread finishes all the\n    // work and exits before the threads finish.\n    context->thread_pool.AddTask([task_function]() { task_function(); });\n  }\n\n  // Try to do any available work on the main thread. This may steal work from\n  // the thread pool, but when there is no work left the thread pool tasks\n  // will be no-ops.\n  while (task_function()) {\n  }\n\n  // Wait until all tasks have finished.\n  shared_state->block_until_finished.Block();\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif // CERES_USE_CXX11_THREADS\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/parallel_for_nothreads.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: alexs.mac@gmail.com (Alex Stewart)\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifdef CERES_NO_THREADS\n\n#include \"ceres/parallel_for.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nint MaxNumThreadsAvailable() { return 1; }\n\nvoid ParallelFor(ContextImpl* context,\n                 int start,\n                 int end,\n                 int num_threads,\n                 const std::function<void(int)>& function) {\n  CHECK_GT(num_threads, 0);\n  CHECK(context != NULL);\n  if (end <= start) {\n    return;\n  }\n  for (int i = start; i < end; ++i) {\n    function(i);\n  }\n}\n\nvoid ParallelFor(ContextImpl* context,\n                 int start,\n                 int end,\n                 int num_threads,\n                 const std::function<void(int thread_id, int i)>& function) {\n  CHECK_GT(num_threads, 0);\n  CHECK(context != NULL);\n  if (end <= start) {\n    return;\n  }\n  const int thread_id = 0;\n  for (int i = start; i < end; ++i) {\n    function(thread_id, i);\n  }\n}\n\n}\n}\n\n#endif  // CERES_NO_THREADS\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/parallel_for_openmp.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: vitus@google.com (Michael Vitus)\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#if defined(CERES_USE_OPENMP)\n\n#include \"ceres/parallel_for.h\"\n\n#include \"ceres/scoped_thread_token.h\"\n#include \"ceres/thread_token_provider.h\"\n#include \"glog/logging.h\"\n#include \"omp.h\"\n\nnamespace ceres {\nnamespace internal {\n\nint MaxNumThreadsAvailable() {\n  return omp_get_max_threads();\n}\n\nvoid ParallelFor(ContextImpl* context,\n                 int start,\n                 int end,\n                 int num_threads,\n                 const std::function<void(int)>& function) {\n  CHECK_GT(num_threads, 0);\n  CHECK(context != NULL);\n  if (end <= start) {\n    return;\n  }\n\n#ifdef CERES_USE_OPENMP\n#pragma omp parallel for num_threads(num_threads) \\\n    schedule(dynamic) if (num_threads > 1)\n#endif  // CERES_USE_OPENMP\n  for (int i = start; i < end; ++i) {\n    function(i);\n  }\n}\n\nvoid ParallelFor(ContextImpl* context,\n                 int start,\n                 int end,\n                 int num_threads,\n                 const std::function<void(int thread_id, int i)>& function) {\n  CHECK(context != NULL);\n\n  ThreadTokenProvider thread_token_provider(num_threads);\n  ParallelFor(context, start, end, num_threads, [&](int i) {\n    const ScopedThreadToken scoped_thread_token(&thread_token_provider);\n    const int thread_id = scoped_thread_token.token();\n    function(thread_id, i);\n  });\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // defined(CERES_USE_OPENMP)\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/parallel_for_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: vitus@google.com (Michael Vitus)\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#include \"ceres/parallel_for.h\"\n\n#include <cmath>\n#include <condition_variable>\n#include <mutex>\n#include <thread>\n#include <vector>\n\n#include \"ceres/context_impl.h\"\n#include \"glog/logging.h\"\n#include \"gmock/gmock.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing testing::ElementsAreArray;\nusing testing::UnorderedElementsAreArray;\n\n// Tests the parallel for loop computes the correct result for various number of\n// threads.\nTEST(ParallelFor, NumThreads) {\n  ContextImpl context;\n  context.EnsureMinimumThreads(/*num_threads=*/2);\n\n  const int size = 16;\n  std::vector<int> expected_results(size, 0);\n  for (int i = 0; i < size; ++i) {\n    expected_results[i] = std::sqrt(i);\n  }\n\n  for (int num_threads = 1; num_threads <= 8; ++num_threads) {\n    std::vector<int> values(size, 0);\n    ParallelFor(&context, 0, size, num_threads,\n                [&values](int i) { values[i] = std::sqrt(i); });\n    EXPECT_THAT(values, ElementsAreArray(expected_results));\n  }\n}\n\n// Tests the parallel for loop with the thread ID interface computes the correct\n// result for various number of threads.\nTEST(ParallelForWithThreadId, NumThreads) {\n  ContextImpl context;\n  context.EnsureMinimumThreads(/*num_threads=*/2);\n\n  const int size = 16;\n  std::vector<int> expected_results(size, 0);\n  for (int i = 0; i < size; ++i) {\n    expected_results[i] = std::sqrt(i);\n  }\n\n  for (int num_threads = 1; num_threads <= 8; ++num_threads) {\n    std::vector<int> values(size, 0);\n    ParallelFor(&context, 0, size, num_threads,\n                [&values](int thread_id, int i) { values[i] = std::sqrt(i); });\n    EXPECT_THAT(values, ElementsAreArray(expected_results));\n  }\n}\n\n// Tests nested for loops do not result in a deadlock.\nTEST(ParallelFor, NestedParallelForDeadlock) {\n  ContextImpl context;\n  context.EnsureMinimumThreads(/*num_threads=*/2);\n\n  // Increment each element in the 2D matrix.\n  std::vector<std::vector<int>> x(3, {1, 2, 3});\n  ParallelFor(&context, 0, 3, 2, [&x, &context](int i) {\n    std::vector<int>& y = x.at(i);\n    ParallelFor(&context, 0, 3, 2, [&y](int j) { ++y.at(j); });\n  });\n\n  const std::vector<int> results = {2, 3, 4};\n  for (const std::vector<int>& value : x) {\n    EXPECT_THAT(value, ElementsAreArray(results));\n  }\n}\n\n// Tests nested for loops do not result in a deadlock for the parallel for with\n// thread ID interface.\nTEST(ParallelForWithThreadId, NestedParallelForDeadlock) {\n  ContextImpl context;\n  context.EnsureMinimumThreads(/*num_threads=*/2);\n\n  // Increment each element in the 2D matrix.\n  std::vector<std::vector<int>> x(3, {1, 2, 3});\n  ParallelFor(&context, 0, 3, 2, [&x, &context](int thread_id, int i) {\n    std::vector<int>& y = x.at(i);\n    ParallelFor(&context, 0, 3, 2, [&y](int thread_id, int j) { ++y.at(j); });\n  });\n\n  const std::vector<int> results = {2, 3, 4};\n  for (const std::vector<int>& value : x) {\n    EXPECT_THAT(value, ElementsAreArray(results));\n  }\n}\n\n// This test is only valid when multithreading support is enabled.\n#ifndef CERES_NO_THREADS\nTEST(ParallelForWithThreadId, UniqueThreadIds) {\n  // Ensure the hardware supports more than 1 thread to ensure the test will\n  // pass.\n  const int num_hardware_threads = std::thread::hardware_concurrency();\n  if (num_hardware_threads <= 1) {\n    LOG(ERROR)\n        << \"Test not supported, the hardware does not support threading.\";\n    return;\n  }\n\n  ContextImpl context;\n  context.EnsureMinimumThreads(/*num_threads=*/2);\n  // Increment each element in the 2D matrix.\n  std::vector<int> x(2, -1);\n  std::mutex mutex;\n  std::condition_variable condition;\n  int count = 0;\n  ParallelFor(&context, 0, 2, 2,\n              [&x, &mutex, &condition, &count](int thread_id, int i) {\n                std::unique_lock<std::mutex> lock(mutex);\n                x[i] = thread_id;\n                ++count;\n                condition.notify_all();\n                condition.wait(lock, [&]() { return count == 2; });\n              });\n\n  EXPECT_THAT(x, UnorderedElementsAreArray({0,1}));\n}\n#endif  // CERES_NO_THREADS\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/parallel_utils.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: wjr@google.com (William Rucklidge)\n\n#include \"ceres/parallel_utils.h\"\n\nnamespace ceres {\nnamespace internal {\n\nvoid LinearIndexToUpperTriangularIndex(int k, int n, int* i, int* j) {\n  // This works by unfolding a rectangle into a triangle.\n  // Say n is even. 4 is a nice even number. The 10 i,j pairs that we\n  // want to produce are:\n  // 0,0 0,1 0,2 0,3\n  //     1,1 1,2 1,3\n  //         2,2 2,3\n  //             3,3\n  // This triangle can be folded into a 5x2 rectangle:\n  // 3,3 0,0 0,1 0,2 0,3\n  // 2,2 2,3 1,1 1,2 1,3\n\n  // If N is odd, say 5, then the 15 i,j pairs are:\n  // 0,0 0,1 0,2 0,3 0,4\n  //     1,1 1,2 1,3 1,4\n  //         2,2 2,3 2,3\n  //             3,3 3,4\n  //                 4,4\n  // which folds to a 5x3 rectangle:\n  // 0,0 0,1 0,2 0,3 0,4\n  // 4,4 1,1 1,2 1,3 1,4\n  // 3,3 3,4 2,2 2,3 2,4\n\n  // All this function does is map the linear iteration position to a\n  // location in the rectangle and work out the appropriate (i, j) for that\n  // location.\n  if (n & 1) {\n    // Odd n. The tip of the triangle is on row 1.\n    int w = n;  // Width of the rectangle to unfold\n    int i0 = k / w;\n    int j0 = k % w;\n    if (j0 >= i0) {\n      *i = i0;\n      *j = j0;\n    } else {\n      *i = n - i0;\n      *j = *i + j0;\n    }\n  } else {\n    // Even n. The tip of the triangle is on row 0, making it one wider.\n    int w = n + 1;\n    int i0 = k / w;\n    int j0 = k % w;\n    if (j0 > i0) {\n      *i = i0;\n      *j = j0 - 1;\n    } else {\n      *i = n - 1 - i0;\n      *j = *i + j0;\n    }\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/parallel_utils.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: wjr@google.com (William Rucklidge)\n\n#ifndef CERES_INTERNAL_PARALLEL_UTILS_H_\n#define CERES_INTERNAL_PARALLEL_UTILS_H_\n\nnamespace ceres {\nnamespace internal {\n\n// Converts a linear iteration order into a triangular iteration order.\n// Suppose you have nested loops that look like\n// for (int i = 0; i < n; i++) {\n//   for (int j = i; j < n; j++) {\n//     ... use i and j\n//   }\n// }\n// Naively using ParallelFor to parallelise those loops might look like\n// ParallelFor(..., 0, n * n, num_threads,\n//   [](int thread_id, int k) {\n//     int i = k / n, j = k % n;\n//     if (j < i) return;\n//     ...\n//    });\n// but these empty work items can lead to very unbalanced threading. Instead,\n// do this:\n// int actual_work_items = (n * (n + 1)) / 2;\n// ParallelFor(..., 0, actual_work_items, num_threads,\n//   [](int thread_id, int k) {\n//     int i, j;\n//     UnfoldIteration(k, n, &i, &j);\n//     ...\n//    });\n// which in each iteration will produce i and j satisfying\n// 0 <= i <= j < n\nvoid LinearIndexToUpperTriangularIndex(int k, int n, int* i, int* j);\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_PARALLEL_UTILS_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/parallel_utils_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: wjr@google.com (William Rucklidge)\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n#include \"ceres/parallel_utils.h\"\n\n#include \"glog/logging.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// Tests that unfolding linear iterations to triangular iterations produces\n// indices that are in-range and unique.\nTEST(LinearIndexToUpperTriangularIndexTest, UniqueAndValid) {\n  for (int n = 0; n < 100; n++) {\n    std::set<std::pair<int, int>> seen_pairs;\n    int actual_work_items = (n * (n + 1)) / 2;\n    for (int k = 0; k < actual_work_items; k++) {\n      int i, j;\n      LinearIndexToUpperTriangularIndex(k, n, &i, &j);\n      EXPECT_GE(i, 0);\n      EXPECT_LT(i, n);\n      EXPECT_GE(j, i);\n      EXPECT_LT(j, n);\n      seen_pairs.insert(std::make_pair(i, j));\n    }\n    EXPECT_EQ(actual_work_items, seen_pairs.size());\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/parameter_block.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n\n#ifndef CERES_INTERNAL_PARAMETER_BLOCK_H_\n#define CERES_INTERNAL_PARAMETER_BLOCK_H_\n\n#include <algorithm>\n#include <cstdint>\n#include <cstdlib>\n#include <limits>\n#include <memory>\n#include <string>\n#include <unordered_set>\n\n#include \"ceres/array_utils.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/internal/port.h\"\n#include \"ceres/local_parameterization.h\"\n#include \"ceres/stringprintf.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass ProblemImpl;\nclass ResidualBlock;\n\n// The parameter block encodes the location of the user's original value, and\n// also the \"current state\" of the parameter. The evaluator uses whatever is in\n// the current state of the parameter when evaluating. This is inlined since the\n// methods are performance sensitive.\n//\n// The class is not thread-safe, unless only const methods are called. The\n// parameter block may also hold a pointer to a local parameterization; the\n// parameter block does not take ownership of this pointer, so the user is\n// responsible for the proper disposal of the local parameterization.\nclass ParameterBlock {\n public:\n  typedef std::unordered_set<ResidualBlock*> ResidualBlockSet;\n\n  // Create a parameter block with the user state, size, and index specified.\n  // The size is the size of the parameter block and the index is the position\n  // of the parameter block inside a Program (if any).\n  ParameterBlock(double* user_state, int size, int index)\n      : user_state_(user_state),\n        size_(size),\n        state_(user_state),\n        index_(index) {}\n\n  ParameterBlock(double* user_state,\n                 int size,\n                 int index,\n                 LocalParameterization* local_parameterization)\n      : user_state_(user_state),\n        size_(size),\n        state_(user_state),\n        index_(index) {\n    if (local_parameterization != nullptr) {\n      SetParameterization(local_parameterization);\n    }\n  }\n\n  // The size of the parameter block.\n  int Size() const { return size_; }\n\n  // Manipulate the parameter state.\n  bool SetState(const double* x) {\n    CHECK(x != nullptr) << \"Tried to set the state of constant parameter \"\n                        << \"with user location \" << user_state_;\n    CHECK(!IsConstant()) << \"Tried to set the state of constant parameter \"\n                         << \"with user location \" << user_state_;\n\n    state_ = x;\n    return UpdateLocalParameterizationJacobian();\n  }\n\n  // Copy the current parameter state out to x. This is \"GetState()\" rather than\n  // simply \"state()\" since it is actively copying the data into the passed\n  // pointer.\n  void GetState(double* x) const {\n    if (x != state_) {\n      std::copy(state_, state_ + size_, x);\n    }\n  }\n\n  // Direct pointers to the current state.\n  const double* state() const { return state_; }\n  const double* user_state() const { return user_state_; }\n  double* mutable_user_state() { return user_state_; }\n  const LocalParameterization* local_parameterization() const {\n    return local_parameterization_;\n  }\n  LocalParameterization* mutable_local_parameterization() {\n    return local_parameterization_;\n  }\n\n  // Set this parameter block to vary or not.\n  void SetConstant() { is_set_constant_ = true; }\n  void SetVarying() { is_set_constant_ = false; }\n  bool IsConstant() const { return (is_set_constant_ || LocalSize() == 0); }\n\n  double UpperBound(int index) const {\n    return (upper_bounds_ ? upper_bounds_[index]\n                          : std::numeric_limits<double>::max());\n  }\n\n  double LowerBound(int index) const {\n    return (lower_bounds_ ? lower_bounds_[index]\n                          : -std::numeric_limits<double>::max());\n  }\n\n  bool IsUpperBounded() const { return (upper_bounds_ == nullptr); }\n  bool IsLowerBounded() const { return (lower_bounds_ == nullptr); }\n\n  // This parameter block's index in an array.\n  int index() const { return index_; }\n  void set_index(int index) { index_ = index; }\n\n  // This parameter offset inside a larger state vector.\n  int state_offset() const { return state_offset_; }\n  void set_state_offset(int state_offset) { state_offset_ = state_offset; }\n\n  // This parameter offset inside a larger delta vector.\n  int delta_offset() const { return delta_offset_; }\n  void set_delta_offset(int delta_offset) { delta_offset_ = delta_offset; }\n\n  // Methods relating to the parameter block's parameterization.\n\n  // The local to global jacobian. Returns nullptr if there is no local\n  // parameterization for this parameter block. The returned matrix is row-major\n  // and has Size() rows and  LocalSize() columns.\n  const double* LocalParameterizationJacobian() const {\n    return local_parameterization_jacobian_.get();\n  }\n\n  int LocalSize() const {\n    return (local_parameterization_ == nullptr)\n               ? size_\n               : local_parameterization_->LocalSize();\n  }\n\n  // Set the parameterization. The parameter block does not take\n  // ownership of the parameterization.\n  void SetParameterization(LocalParameterization* new_parameterization) {\n    // Nothing to do if the new parameterization is the same as the\n    // old parameterization.\n    if (new_parameterization == local_parameterization_) {\n      return;\n    }\n\n    if (new_parameterization == nullptr) {\n      local_parameterization_ = nullptr;\n      return;\n    }\n\n    CHECK(new_parameterization->GlobalSize() == size_)\n        << \"Invalid parameterization for parameter block. The parameter block \"\n        << \"has size \" << size_ << \" while the parameterization has a global \"\n        << \"size of \" << new_parameterization->GlobalSize() << \". Did you \"\n        << \"accidentally use the wrong parameter block or parameterization?\";\n\n    CHECK_GE(new_parameterization->LocalSize(), 0)\n        << \"Invalid parameterization. Parameterizations must have a \"\n        << \"non-negative dimensional tangent space.\";\n\n    local_parameterization_ = new_parameterization;\n    local_parameterization_jacobian_.reset(\n        new double[local_parameterization_->GlobalSize() *\n                   local_parameterization_->LocalSize()]);\n    CHECK(UpdateLocalParameterizationJacobian())\n        << \"Local parameterization Jacobian computation failed for x: \"\n        << ConstVectorRef(state_, Size()).transpose();\n  }\n\n  void SetUpperBound(int index, double upper_bound) {\n    CHECK_LT(index, size_);\n\n    if (upper_bound >= std::numeric_limits<double>::max() && !upper_bounds_) {\n      return;\n    }\n\n    if (!upper_bounds_) {\n      upper_bounds_.reset(new double[size_]);\n      std::fill(upper_bounds_.get(),\n                upper_bounds_.get() + size_,\n                std::numeric_limits<double>::max());\n    }\n\n    upper_bounds_[index] = upper_bound;\n  }\n\n  void SetLowerBound(int index, double lower_bound) {\n    CHECK_LT(index, size_);\n\n    if (lower_bound <= -std::numeric_limits<double>::max() && !lower_bounds_) {\n      return;\n    }\n\n    if (!lower_bounds_) {\n      lower_bounds_.reset(new double[size_]);\n      std::fill(lower_bounds_.get(),\n                lower_bounds_.get() + size_,\n                -std::numeric_limits<double>::max());\n    }\n\n    lower_bounds_[index] = lower_bound;\n  }\n\n  // Generalization of the addition operation. This is the same as\n  // LocalParameterization::Plus() followed by projection onto the\n  // hyper cube implied by the bounds constraints.\n  bool Plus(const double* x, const double* delta, double* x_plus_delta) {\n    if (local_parameterization_ != nullptr) {\n      if (!local_parameterization_->Plus(x, delta, x_plus_delta)) {\n        return false;\n      }\n    } else {\n      VectorRef(x_plus_delta, size_) =\n          ConstVectorRef(x, size_) + ConstVectorRef(delta, size_);\n    }\n\n    // Project onto the box constraints.\n    if (lower_bounds_.get() != nullptr) {\n      for (int i = 0; i < size_; ++i) {\n        x_plus_delta[i] = std::max(x_plus_delta[i], lower_bounds_[i]);\n      }\n    }\n\n    if (upper_bounds_.get() != nullptr) {\n      for (int i = 0; i < size_; ++i) {\n        x_plus_delta[i] = std::min(x_plus_delta[i], upper_bounds_[i]);\n      }\n    }\n\n    return true;\n  }\n\n  std::string ToString() const {\n    return StringPrintf(\n        \"{ this=%p, user_state=%p, state=%p, size=%d, \"\n        \"constant=%d, index=%d, state_offset=%d, \"\n        \"delta_offset=%d }\",\n        this,\n        user_state_,\n        state_,\n        size_,\n        is_set_constant_,\n        index_,\n        state_offset_,\n        delta_offset_);\n  }\n\n  void EnableResidualBlockDependencies() {\n    CHECK(residual_blocks_.get() == nullptr)\n        << \"Ceres bug: There is already a residual block collection \"\n        << \"for parameter block: \" << ToString();\n    residual_blocks_.reset(new ResidualBlockSet);\n  }\n\n  void AddResidualBlock(ResidualBlock* residual_block) {\n    CHECK(residual_blocks_.get() != nullptr)\n        << \"Ceres bug: The residual block collection is null for parameter \"\n        << \"block: \" << ToString();\n    residual_blocks_->insert(residual_block);\n  }\n\n  void RemoveResidualBlock(ResidualBlock* residual_block) {\n    CHECK(residual_blocks_.get() != nullptr)\n        << \"Ceres bug: The residual block collection is null for parameter \"\n        << \"block: \" << ToString();\n    CHECK(residual_blocks_->find(residual_block) != residual_blocks_->end())\n        << \"Ceres bug: Missing residual for parameter block: \" << ToString();\n    residual_blocks_->erase(residual_block);\n  }\n\n  // This is only intended for iterating; perhaps this should only expose\n  // .begin() and .end().\n  ResidualBlockSet* mutable_residual_blocks() { return residual_blocks_.get(); }\n\n  double LowerBoundForParameter(int index) const {\n    if (lower_bounds_.get() == nullptr) {\n      return -std::numeric_limits<double>::max();\n    } else {\n      return lower_bounds_[index];\n    }\n  }\n\n  double UpperBoundForParameter(int index) const {\n    if (upper_bounds_.get() == nullptr) {\n      return std::numeric_limits<double>::max();\n    } else {\n      return upper_bounds_[index];\n    }\n  }\n\n private:\n  bool UpdateLocalParameterizationJacobian() {\n    if (local_parameterization_ == nullptr) {\n      return true;\n    }\n\n    // Update the local to global Jacobian. In some cases this is\n    // wasted effort; if this is a bottleneck, we will find a solution\n    // at that time.\n\n    const int jacobian_size = Size() * LocalSize();\n    InvalidateArray(jacobian_size, local_parameterization_jacobian_.get());\n    if (!local_parameterization_->ComputeJacobian(\n            state_, local_parameterization_jacobian_.get())) {\n      LOG(WARNING) << \"Local parameterization Jacobian computation failed\"\n                      \"for x: \"\n                   << ConstVectorRef(state_, Size()).transpose();\n      return false;\n    }\n\n    if (!IsArrayValid(jacobian_size, local_parameterization_jacobian_.get())) {\n      LOG(WARNING) << \"Local parameterization Jacobian computation returned\"\n                   << \"an invalid matrix for x: \"\n                   << ConstVectorRef(state_, Size()).transpose()\n                   << \"\\n Jacobian matrix : \"\n                   << ConstMatrixRef(local_parameterization_jacobian_.get(),\n                                     Size(),\n                                     LocalSize());\n      return false;\n    }\n    return true;\n  }\n\n  double* user_state_ = nullptr;\n  int size_ = -1;\n  bool is_set_constant_ = false;\n  LocalParameterization* local_parameterization_ = nullptr;\n\n  // The \"state\" of the parameter. These fields are only needed while the\n  // solver is running. While at first glance using mutable is a bad idea, this\n  // ends up simplifying the internals of Ceres enough to justify the potential\n  // pitfalls of using \"mutable.\"\n  mutable const double* state_ = nullptr;\n  mutable std::unique_ptr<double[]> local_parameterization_jacobian_;\n\n  // The index of the parameter. This is used by various other parts of Ceres to\n  // permit switching from a ParameterBlock* to an index in another array.\n  int32_t index_ = -1;\n\n  // The offset of this parameter block inside a larger state vector.\n  int32_t state_offset_ = -1;\n\n  // The offset of this parameter block inside a larger delta vector.\n  int32_t delta_offset_ = -1;\n\n  // If non-null, contains the residual blocks this parameter block is in.\n  std::unique_ptr<ResidualBlockSet> residual_blocks_;\n\n  // Upper and lower bounds for the parameter block.  SetUpperBound\n  // and SetLowerBound lazily initialize the upper_bounds_ and\n  // lower_bounds_ arrays. If they are never called, then memory for\n  // these arrays is never allocated. Thus for problems where there\n  // are no bounds, or only one sided bounds we do not pay the cost of\n  // allocating memory for the inactive bounds constraints.\n  //\n  // Upon initialization these arrays are initialized to\n  // std::numeric_limits<double>::max() and\n  // -std::numeric_limits<double>::max() respectively which correspond\n  // to the parameter block being unconstrained.\n  std::unique_ptr<double[]> upper_bounds_;\n  std::unique_ptr<double[]> lower_bounds_;\n\n  // Necessary so ProblemImpl can clean up the parameterizations.\n  friend class ProblemImpl;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_PARAMETER_BLOCK_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/parameter_block_ordering.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/parameter_block_ordering.h\"\n\n#include <memory>\n#include <unordered_set>\n\n#include \"ceres/graph.h\"\n#include \"ceres/graph_algorithms.h\"\n#include \"ceres/map_util.h\"\n#include \"ceres/parameter_block.h\"\n#include \"ceres/program.h\"\n#include \"ceres/residual_block.h\"\n#include \"ceres/wall_time.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::map;\nusing std::set;\nusing std::vector;\n\nint ComputeStableSchurOrdering(const Program& program,\n                         vector<ParameterBlock*>* ordering) {\n  CHECK(ordering != nullptr);\n  ordering->clear();\n  EventLogger event_logger(\"ComputeStableSchurOrdering\");\n  std::unique_ptr<Graph< ParameterBlock*> > graph(CreateHessianGraph(program));\n  event_logger.AddEvent(\"CreateHessianGraph\");\n\n  const vector<ParameterBlock*>& parameter_blocks = program.parameter_blocks();\n  const std::unordered_set<ParameterBlock*>& vertices = graph->vertices();\n  for (int i = 0; i < parameter_blocks.size(); ++i) {\n    if (vertices.count(parameter_blocks[i]) > 0) {\n      ordering->push_back(parameter_blocks[i]);\n    }\n  }\n  event_logger.AddEvent(\"Preordering\");\n\n  int independent_set_size = StableIndependentSetOrdering(*graph, ordering);\n  event_logger.AddEvent(\"StableIndependentSet\");\n\n  // Add the excluded blocks to back of the ordering vector.\n  for (int i = 0; i < parameter_blocks.size(); ++i) {\n    ParameterBlock* parameter_block = parameter_blocks[i];\n    if (parameter_block->IsConstant()) {\n      ordering->push_back(parameter_block);\n    }\n  }\n  event_logger.AddEvent(\"ConstantParameterBlocks\");\n\n  return independent_set_size;\n}\n\nint ComputeSchurOrdering(const Program& program,\n                         vector<ParameterBlock*>* ordering) {\n  CHECK(ordering != nullptr);\n  ordering->clear();\n\n  std::unique_ptr<Graph< ParameterBlock*> > graph(CreateHessianGraph(program));\n  int independent_set_size = IndependentSetOrdering(*graph, ordering);\n  const vector<ParameterBlock*>& parameter_blocks = program.parameter_blocks();\n\n  // Add the excluded blocks to back of the ordering vector.\n  for (int i = 0; i < parameter_blocks.size(); ++i) {\n    ParameterBlock* parameter_block = parameter_blocks[i];\n    if (parameter_block->IsConstant()) {\n      ordering->push_back(parameter_block);\n    }\n  }\n\n  return independent_set_size;\n}\n\nvoid ComputeRecursiveIndependentSetOrdering(const Program& program,\n                                            ParameterBlockOrdering* ordering) {\n  CHECK(ordering != nullptr);\n  ordering->Clear();\n  const vector<ParameterBlock*> parameter_blocks = program.parameter_blocks();\n  std::unique_ptr<Graph< ParameterBlock*> > graph(CreateHessianGraph(program));\n\n  int num_covered = 0;\n  int round = 0;\n  while (num_covered < parameter_blocks.size()) {\n    vector<ParameterBlock*> independent_set_ordering;\n    const int independent_set_size =\n        IndependentSetOrdering(*graph, &independent_set_ordering);\n    for (int i = 0; i < independent_set_size; ++i) {\n      ParameterBlock* parameter_block = independent_set_ordering[i];\n      ordering->AddElementToGroup(parameter_block->mutable_user_state(), round);\n      graph->RemoveVertex(parameter_block);\n    }\n    num_covered += independent_set_size;\n    ++round;\n  }\n}\n\nGraph<ParameterBlock*>* CreateHessianGraph(const Program& program) {\n  Graph<ParameterBlock*>* graph = new Graph<ParameterBlock*>;\n  CHECK(graph != nullptr);\n  const vector<ParameterBlock*>& parameter_blocks = program.parameter_blocks();\n  for (int i = 0; i < parameter_blocks.size(); ++i) {\n    ParameterBlock* parameter_block = parameter_blocks[i];\n    if (!parameter_block->IsConstant()) {\n      graph->AddVertex(parameter_block);\n    }\n  }\n\n  const vector<ResidualBlock*>& residual_blocks = program.residual_blocks();\n  for (int i = 0; i < residual_blocks.size(); ++i) {\n    const ResidualBlock* residual_block = residual_blocks[i];\n    const int num_parameter_blocks = residual_block->NumParameterBlocks();\n    ParameterBlock* const* parameter_blocks =\n        residual_block->parameter_blocks();\n    for (int j = 0; j < num_parameter_blocks; ++j) {\n      if (parameter_blocks[j]->IsConstant()) {\n        continue;\n      }\n\n      for (int k = j + 1; k < num_parameter_blocks; ++k) {\n        if (parameter_blocks[k]->IsConstant()) {\n          continue;\n        }\n\n        graph->AddEdge(parameter_blocks[j], parameter_blocks[k]);\n      }\n    }\n  }\n\n  return graph;\n}\n\nvoid OrderingToGroupSizes(const ParameterBlockOrdering* ordering,\n                          vector<int>* group_sizes) {\n  CHECK(group_sizes != nullptr);\n  group_sizes->clear();\n  if (ordering == NULL) {\n    return;\n  }\n\n  const map<int, set<double*>>& group_to_elements =\n      ordering->group_to_elements();\n  for (const auto& g_t_e : group_to_elements) {\n    group_sizes->push_back(g_t_e.second.size());\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/parameter_block_ordering.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_PARAMETER_BLOCK_ORDERING_H_\n#define CERES_INTERNAL_PARAMETER_BLOCK_ORDERING_H_\n\n#include <vector>\n#include \"ceres/ordered_groups.h\"\n#include \"ceres/graph.h\"\n#include \"ceres/types.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass Program;\nclass ParameterBlock;\n\n// Uses an approximate independent set ordering to order the parameter\n// blocks of a problem so that it is suitable for use with Schur\n// complement based solvers. The output variable ordering contains an\n// ordering of the parameter blocks and the return value is size of\n// the independent set or the number of e_blocks (see\n// schur_complement_solver.h for an explanation). Constant parameters\n// are added to the end.\n//\n// The ordering vector has the structure\n//\n// ordering = [independent set,\n//             complement of the independent set,\n//             fixed blocks]\nint ComputeSchurOrdering(const Program& program,\n                         std::vector<ParameterBlock* >* ordering);\n\n// Same as above, except that ties while computing the independent set\n// ordering are resolved in favour of the order in which the parameter\n// blocks occur in the program.\nint ComputeStableSchurOrdering(const Program& program,\n                               std::vector<ParameterBlock* >* ordering);\n\n// Use an approximate independent set ordering to decompose the\n// parameter blocks of a problem in a sequence of independent\n// sets. The ordering covers all the non-constant parameter blocks in\n// the program.\nvoid ComputeRecursiveIndependentSetOrdering(const Program& program,\n                                            ParameterBlockOrdering* ordering);\n\n// Builds a graph on the parameter blocks of a Problem, whose\n// structure reflects the sparsity structure of the Hessian. Each\n// vertex corresponds to a parameter block in the Problem except for\n// parameter blocks that are marked constant. An edge connects two\n// parameter blocks, if they co-occur in a residual block.\nGraph<ParameterBlock*>* CreateHessianGraph(const Program& program);\n\n// Iterate over each of the groups in order of their priority and fill\n// summary with their sizes.\nvoid OrderingToGroupSizes(const ParameterBlockOrdering* ordering,\n                          std::vector<int>* group_sizes);\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_PARAMETER_BLOCK_ORDERING_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/parameter_block_ordering_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/parameter_block_ordering.h\"\n\n#include <cstddef>\n#include <memory>\n#include <unordered_set>\n#include <vector>\n\n#include \"ceres/cost_function.h\"\n#include \"ceres/graph.h\"\n#include \"ceres/problem_impl.h\"\n#include \"ceres/program.h\"\n#include \"ceres/sized_cost_function.h\"\n#include \"ceres/stl_util.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::vector;\n\ntypedef Graph<ParameterBlock*> HessianGraph;\ntypedef std::unordered_set<ParameterBlock*> VertexSet;\n\ntemplate <int M, int... Ns>\nclass DummyCostFunction : public SizedCostFunction<M, Ns...> {\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const final {\n    return true;\n  }\n};\n\nclass SchurOrderingTest : public ::testing::Test {\n protected :\n  void SetUp() final {\n    // The explicit calls to AddParameterBlock are necessary because\n    // the below tests depend on the specific numbering of the\n    // parameter blocks.\n    problem_.AddParameterBlock(x_, 3);\n    problem_.AddParameterBlock(y_, 4);\n    problem_.AddParameterBlock(z_, 5);\n    problem_.AddParameterBlock(w_, 6);\n\n    problem_.AddResidualBlock(new DummyCostFunction<2, 3>, NULL, x_);\n    problem_.AddResidualBlock(new DummyCostFunction<6, 5, 4>, NULL, z_, y_);\n    problem_.AddResidualBlock(new DummyCostFunction<3, 3, 5>, NULL, x_, z_);\n    problem_.AddResidualBlock(new DummyCostFunction<7, 5, 3>, NULL, z_, x_);\n    problem_.AddResidualBlock(new DummyCostFunction<1, 5, 3, 6>, NULL,\n                              z_, x_, w_);\n  }\n\n  ProblemImpl problem_;\n  double x_[3], y_[4], z_[5], w_[6];\n};\n\nTEST_F(SchurOrderingTest, NoFixed) {\n  const Program& program = problem_.program();\n  const vector<ParameterBlock*>& parameter_blocks = program.parameter_blocks();\n  std::unique_ptr<HessianGraph> graph(CreateHessianGraph(program));\n\n  const VertexSet& vertices = graph->vertices();\n  EXPECT_EQ(vertices.size(), 4);\n\n  for (int i = 0; i < 4; ++i) {\n    EXPECT_TRUE(vertices.find(parameter_blocks[i]) != vertices.end());\n  }\n\n  {\n    const VertexSet& neighbors = graph->Neighbors(parameter_blocks[0]);\n    EXPECT_EQ(neighbors.size(), 2);\n    EXPECT_TRUE(neighbors.find(parameter_blocks[2]) != neighbors.end());\n    EXPECT_TRUE(neighbors.find(parameter_blocks[3]) != neighbors.end());\n  }\n\n  {\n    const VertexSet& neighbors = graph->Neighbors(parameter_blocks[1]);\n    EXPECT_EQ(neighbors.size(), 1);\n    EXPECT_TRUE(neighbors.find(parameter_blocks[2]) != neighbors.end());\n  }\n\n  {\n    const VertexSet& neighbors = graph->Neighbors(parameter_blocks[2]);\n    EXPECT_EQ(neighbors.size(), 3);\n    EXPECT_TRUE(neighbors.find(parameter_blocks[0]) != neighbors.end());\n    EXPECT_TRUE(neighbors.find(parameter_blocks[1]) != neighbors.end());\n    EXPECT_TRUE(neighbors.find(parameter_blocks[3]) != neighbors.end());\n  }\n\n  {\n    const VertexSet& neighbors = graph->Neighbors(parameter_blocks[3]);\n    EXPECT_EQ(neighbors.size(), 2);\n    EXPECT_TRUE(neighbors.find(parameter_blocks[0]) != neighbors.end());\n    EXPECT_TRUE(neighbors.find(parameter_blocks[2]) != neighbors.end());\n  }\n}\n\nTEST_F(SchurOrderingTest, AllFixed) {\n  problem_.SetParameterBlockConstant(x_);\n  problem_.SetParameterBlockConstant(y_);\n  problem_.SetParameterBlockConstant(z_);\n  problem_.SetParameterBlockConstant(w_);\n\n  const Program& program = problem_.program();\n  std::unique_ptr<HessianGraph> graph(CreateHessianGraph(program));\n  EXPECT_EQ(graph->vertices().size(), 0);\n}\n\nTEST_F(SchurOrderingTest, OneFixed) {\n  problem_.SetParameterBlockConstant(x_);\n\n  const Program& program = problem_.program();\n  const vector<ParameterBlock*>& parameter_blocks = program.parameter_blocks();\n  std::unique_ptr<HessianGraph> graph(CreateHessianGraph(program));\n\n  const VertexSet& vertices = graph->vertices();\n\n  EXPECT_EQ(vertices.size(), 3);\n  EXPECT_TRUE(vertices.find(parameter_blocks[0]) == vertices.end());\n\n  for (int i = 1; i < 3; ++i) {\n    EXPECT_TRUE(vertices.find(parameter_blocks[i]) != vertices.end());\n  }\n\n  {\n    const VertexSet& neighbors = graph->Neighbors(parameter_blocks[1]);\n    EXPECT_EQ(neighbors.size(), 1);\n    EXPECT_TRUE(neighbors.find(parameter_blocks[2]) != neighbors.end());\n  }\n\n  {\n    const VertexSet& neighbors = graph->Neighbors(parameter_blocks[2]);\n    EXPECT_EQ(neighbors.size(), 2);\n    EXPECT_TRUE(neighbors.find(parameter_blocks[1]) != neighbors.end());\n    EXPECT_TRUE(neighbors.find(parameter_blocks[3]) != neighbors.end());\n  }\n\n  {\n    const VertexSet& neighbors = graph->Neighbors(parameter_blocks[3]);\n    EXPECT_EQ(neighbors.size(), 1);\n    EXPECT_TRUE(neighbors.find(parameter_blocks[2]) != neighbors.end());\n  }\n\n  // The constant parameter block is at the end.\n  vector<ParameterBlock*> ordering;\n  ComputeSchurOrdering(program, &ordering);\n  EXPECT_EQ(ordering.back(), parameter_blocks[0]);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/parameter_block_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n\n#include \"ceres/parameter_block.h\"\n\n#include \"ceres/internal/eigen.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nTEST(ParameterBlock, SetParameterizationDiesOnSizeMismatch) {\n  double x[3] = {1.0, 2.0, 3.0};\n  ParameterBlock parameter_block(x, 3, -1);\n  std::vector<int> indices;\n  indices.push_back(1);\n  SubsetParameterization subset_wrong_size(4, indices);\n  EXPECT_DEATH_IF_SUPPORTED(\n      parameter_block.SetParameterization(&subset_wrong_size), \"global\");\n}\n\nTEST(ParameterBlock, SetParameterizationWithSameExistingParameterization) {\n  double x[3] = {1.0, 2.0, 3.0};\n  ParameterBlock parameter_block(x, 3, -1);\n  std::vector<int> indices;\n  indices.push_back(1);\n  SubsetParameterization subset(3, indices);\n  parameter_block.SetParameterization(&subset);\n  parameter_block.SetParameterization(&subset);\n}\n\nTEST(ParameterBlock, SetParameterizationAllowsResettingToNull) {\n  double x[3] = {1.0, 2.0, 3.0};\n  ParameterBlock parameter_block(x, 3, -1);\n  std::vector<int> indices;\n  indices.push_back(1);\n  SubsetParameterization subset(3, indices);\n  parameter_block.SetParameterization(&subset);\n  EXPECT_EQ(parameter_block.local_parameterization(), &subset);\n  parameter_block.SetParameterization(nullptr);\n  EXPECT_EQ(parameter_block.local_parameterization(), nullptr);\n}\n\nTEST(ParameterBlock,\n     SetParameterizationAllowsResettingToDifferentParameterization) {\n  double x[3] = {1.0, 2.0, 3.0};\n  ParameterBlock parameter_block(x, 3, -1);\n  std::vector<int> indices;\n  indices.push_back(1);\n  SubsetParameterization subset(3, indices);\n  parameter_block.SetParameterization(&subset);\n  EXPECT_EQ(parameter_block.local_parameterization(), &subset);\n\n  SubsetParameterization subset_different(3, indices);\n  parameter_block.SetParameterization(&subset_different);\n  EXPECT_EQ(parameter_block.local_parameterization(), &subset_different);\n}\n\nTEST(ParameterBlock, SetParameterizationAndNormalOperation) {\n  double x[3] = {1.0, 2.0, 3.0};\n  ParameterBlock parameter_block(x, 3, -1);\n  std::vector<int> indices;\n  indices.push_back(1);\n  SubsetParameterization subset(3, indices);\n  parameter_block.SetParameterization(&subset);\n\n  // Ensure the local parameterization jacobian result is correctly computed.\n  ConstMatrixRef local_parameterization_jacobian(\n      parameter_block.LocalParameterizationJacobian(), 3, 2);\n  ASSERT_EQ(1.0, local_parameterization_jacobian(0, 0));\n  ASSERT_EQ(0.0, local_parameterization_jacobian(0, 1));\n  ASSERT_EQ(0.0, local_parameterization_jacobian(1, 0));\n  ASSERT_EQ(0.0, local_parameterization_jacobian(1, 1));\n  ASSERT_EQ(0.0, local_parameterization_jacobian(2, 0));\n  ASSERT_EQ(1.0, local_parameterization_jacobian(2, 1));\n\n  // Check that updating works as expected.\n  double x_plus_delta[3];\n  double delta[2] = {0.5, 0.3};\n  parameter_block.Plus(x, delta, x_plus_delta);\n  ASSERT_EQ(1.5, x_plus_delta[0]);\n  ASSERT_EQ(2.0, x_plus_delta[1]);\n  ASSERT_EQ(3.3, x_plus_delta[2]);\n}\n\nstruct TestParameterization : public LocalParameterization {\n public:\n  virtual ~TestParameterization() {}\n  bool Plus(const double* x,\n            const double* delta,\n            double* x_plus_delta) const final {\n    LOG(FATAL) << \"Shouldn't get called.\";\n    return true;\n  }\n  bool ComputeJacobian(const double* x, double* jacobian) const final {\n    jacobian[0] = *x * 2;\n    return true;\n  }\n\n  int GlobalSize() const final { return 1; }\n  int LocalSize() const final { return 1; }\n};\n\nTEST(ParameterBlock, SetStateUpdatesLocalParameterizationJacobian) {\n  TestParameterization test_parameterization;\n  double x[1] = {1.0};\n  ParameterBlock parameter_block(x, 1, -1, &test_parameterization);\n\n  EXPECT_EQ(2.0, *parameter_block.LocalParameterizationJacobian());\n\n  x[0] = 5.5;\n  parameter_block.SetState(x);\n  EXPECT_EQ(11.0, *parameter_block.LocalParameterizationJacobian());\n}\n\nTEST(ParameterBlock, PlusWithNoLocalParameterization) {\n  double x[2] = {1.0, 2.0};\n  ParameterBlock parameter_block(x, 2, -1);\n\n  double delta[2] = {0.2, 0.3};\n  double x_plus_delta[2];\n  parameter_block.Plus(x, delta, x_plus_delta);\n  EXPECT_EQ(1.2, x_plus_delta[0]);\n  EXPECT_EQ(2.3, x_plus_delta[1]);\n}\n\n// Stops computing the jacobian after the first time.\nclass BadLocalParameterization : public LocalParameterization {\n public:\n  BadLocalParameterization() : calls_(0) {}\n\n  virtual ~BadLocalParameterization() {}\n  bool Plus(const double* x,\n            const double* delta,\n            double* x_plus_delta) const final {\n    *x_plus_delta = *x + *delta;\n    return true;\n  }\n\n  bool ComputeJacobian(const double* x, double* jacobian) const final {\n    if (calls_ == 0) {\n      jacobian[0] = 0;\n    }\n    ++calls_;\n    return true;\n  }\n\n  int GlobalSize() const final { return 1; }\n  int LocalSize() const final { return 1; }\n\n private:\n  mutable int calls_;\n};\n\nTEST(ParameterBlock, DetectBadLocalParameterization) {\n  double x = 1;\n  BadLocalParameterization bad_parameterization;\n  ParameterBlock parameter_block(&x, 1, -1, &bad_parameterization);\n  double y = 2;\n  EXPECT_FALSE(parameter_block.SetState(&y));\n}\n\nTEST(ParameterBlock, DefaultBounds) {\n  double x[2];\n  ParameterBlock parameter_block(x, 2, -1, nullptr);\n  EXPECT_EQ(parameter_block.UpperBoundForParameter(0),\n            std::numeric_limits<double>::max());\n  EXPECT_EQ(parameter_block.UpperBoundForParameter(1),\n            std::numeric_limits<double>::max());\n  EXPECT_EQ(parameter_block.LowerBoundForParameter(0),\n            -std::numeric_limits<double>::max());\n  EXPECT_EQ(parameter_block.LowerBoundForParameter(1),\n            -std::numeric_limits<double>::max());\n}\n\nTEST(ParameterBlock, SetBounds) {\n  double x[2];\n  ParameterBlock parameter_block(x, 2, -1, nullptr);\n  parameter_block.SetLowerBound(0, 1);\n  parameter_block.SetUpperBound(1, 1);\n\n  EXPECT_EQ(parameter_block.LowerBoundForParameter(0), 1.0);\n  EXPECT_EQ(parameter_block.LowerBoundForParameter(1),\n            -std::numeric_limits<double>::max());\n\n  EXPECT_EQ(parameter_block.UpperBoundForParameter(0),\n            std::numeric_limits<double>::max());\n  EXPECT_EQ(parameter_block.UpperBoundForParameter(1), 1.0);\n}\n\nTEST(ParameterBlock, PlusWithBoundsConstraints) {\n  double x[] = {1.0, 0.0};\n  double delta[] = {2.0, -10.0};\n  ParameterBlock parameter_block(x, 2, -1, nullptr);\n  parameter_block.SetUpperBound(0, 2.0);\n  parameter_block.SetLowerBound(1, -1.0);\n  double x_plus_delta[2];\n  parameter_block.Plus(x, delta, x_plus_delta);\n  EXPECT_EQ(x_plus_delta[0], 2.0);\n  EXPECT_EQ(x_plus_delta[1], -1.0);\n}\n\nTEST(ParameterBlock, ResetLocalParameterizationToNull) {\n  double x[3] = {1.0, 2.0, 3.0};\n  ParameterBlock parameter_block(x, 3, -1);\n  std::vector<int> indices;\n  indices.push_back(1);\n  SubsetParameterization subset(3, indices);\n  parameter_block.SetParameterization(&subset);\n  EXPECT_EQ(parameter_block.local_parameterization(), &subset);\n  parameter_block.SetParameterization(nullptr);\n  EXPECT_EQ(parameter_block.local_parameterization(), nullptr);\n}\n\nTEST(ParameterBlock, ResetLocalParameterizationToNotNull) {\n  double x[3] = {1.0, 2.0, 3.0};\n  ParameterBlock parameter_block(x, 3, -1);\n  std::vector<int> indices;\n  indices.push_back(1);\n  SubsetParameterization subset(3, indices);\n  parameter_block.SetParameterization(&subset);\n  EXPECT_EQ(parameter_block.local_parameterization(), &subset);\n\n  SubsetParameterization subset_different(3, indices);\n  parameter_block.SetParameterization(&subset_different);\n  EXPECT_EQ(parameter_block.local_parameterization(), &subset_different);\n}\n\nTEST(ParameterBlock, SetNullLocalParameterization) {\n  double x[3] = {1.0, 2.0, 3.0};\n  ParameterBlock parameter_block(x, 3, -1);\n  EXPECT_EQ(parameter_block.local_parameterization(), nullptr);\n\n  parameter_block.SetParameterization(nullptr);\n  EXPECT_EQ(parameter_block.local_parameterization(), nullptr);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/parameter_dims_test.cc",
    "content": "//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: jodebo_beck@gmx.de (Johannes Beck)\n\n#include \"ceres/internal/parameter_dims.h\"\n\n#include <gtest/gtest.h>\n#include <type_traits>\n\nnamespace ceres {\nnamespace internal {\n\n// Is valid parameter dims unit test\nstatic_assert(IsValidParameterDimensionSequence(integer_sequence<int>()) ==\n                  true,\n              \"Unit test of is valid parameter dimension sequence failed.\");\nstatic_assert(\n    IsValidParameterDimensionSequence(integer_sequence<int, 2, 1>()) == true,\n    \"Unit test of is valid parameter dimension sequence failed.\");\nstatic_assert(\n    IsValidParameterDimensionSequence(integer_sequence<int, 0, 1>()) == false,\n    \"Unit test of is valid parameter dimension sequence failed.\");\nstatic_assert(\n    IsValidParameterDimensionSequence(integer_sequence<int, 3, 0>()) == false,\n    \"Unit test of is valid parameter dimension sequence failed.\");\n\n// Static parameter dims unit test\nstatic_assert(\n    std::is_same<StaticParameterDims<4, 2, 1>::Parameters,\n                 integer_sequence<int, 4, 2, 1>>::value == true,\n    \"Unit test of type 'parameters' for static parameter dims failed.\");\n\nstatic_assert(StaticParameterDims<4, 2, 1>::kIsValid == true,\n              \"Unit test of is valid for static parameter dims failed.\");\nstatic_assert(StaticParameterDims<4, 2, 1>::kIsDynamic == false,\n              \"Unit test of is dynamic for static parameter dims failed.\");\nstatic_assert(StaticParameterDims<4, 2, 1>::kNumParameterBlocks == 3,\n              \"Unit test of number of parameter blocks for static parameter \"\n              \"dims failed.\");\nstatic_assert(\n    StaticParameterDims<4, 2, 1>::kNumParameters == 7,\n    \"Unit test of number of parameters for static parameter dims failed.\");\n\n// Dynamic parameter dims unit test\nstatic_assert(DynamicParameterDims::kIsValid == true,\n              \"Unit test of is valid for dynamic parameter dims failed.\");\nstatic_assert(DynamicParameterDims::kIsDynamic == true,\n              \"Unit test of is dynamic for dynamic parameter dims failed.\");\nstatic_assert(DynamicParameterDims::kNumParameterBlocks == 0,\n              \"Unit test of number if parameter blocks for dynamic parameter \"\n              \"dims failed.\");\nstatic_assert(\n    DynamicParameterDims::kNumParameters == 0,\n    \"Unit test of number of parameters for dynamic parameter dims failed.\");\n\nTEST(ParameterDims, GetDims) {\n  constexpr int N0 = 3;\n  constexpr int N1 = 4;\n  constexpr int N2 = 2;\n\n  StaticParameterDims<N0, N1, N2> params;\n  EXPECT_EQ(N0, params.GetDim(0));\n  EXPECT_EQ(N1, params.GetDim(1));\n  EXPECT_EQ(N2, params.GetDim(2));\n}\n\nTEST(ParameterDims, GetUnpackedParameters) {\n  constexpr int N0 = 3;\n  constexpr int N1 = 4;\n  constexpr int N2 = 2;\n\n  using ParameterDims = StaticParameterDims<N0, N1, N2>;\n\n  std::array<double, ParameterDims::kNumParameters> packed_parameters{};\n  std::array<double*, 3> unpacked_parameters =\n      ParameterDims::GetUnpackedParameters(packed_parameters.data());\n\n  EXPECT_EQ(packed_parameters.data(), unpacked_parameters[0]);\n  EXPECT_EQ(packed_parameters.data() + N0, unpacked_parameters[1]);\n  EXPECT_EQ(packed_parameters.data() + N0 + N1, unpacked_parameters[2]);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/partitioned_matrix_view.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of PartitionedMatrixView.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n#include \"ceres/linear_solver.h\"\n#include \"ceres/partitioned_matrix_view.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\nPartitionedMatrixViewBase*\nPartitionedMatrixViewBase::Create(const LinearSolver::Options& options,\n                                  const BlockSparseMatrix& matrix) {\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 2) &&\n     (options.f_block_size == 2)) {\n   return new PartitionedMatrixView<2, 2, 2>(matrix, options.elimination_groups[0]);\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 2) &&\n     (options.f_block_size == 3)) {\n   return new PartitionedMatrixView<2, 2, 3>(matrix, options.elimination_groups[0]);\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 2) &&\n     (options.f_block_size == 4)) {\n   return new PartitionedMatrixView<2, 2, 4>(matrix, options.elimination_groups[0]);\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 2)) {\n   return new PartitionedMatrixView<2, 2, Eigen::Dynamic>(matrix, options.elimination_groups[0]);\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 3) &&\n     (options.f_block_size == 3)) {\n   return new PartitionedMatrixView<2, 3, 3>(matrix, options.elimination_groups[0]);\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 3) &&\n     (options.f_block_size == 4)) {\n   return new PartitionedMatrixView<2, 3, 4>(matrix, options.elimination_groups[0]);\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 3) &&\n     (options.f_block_size == 6)) {\n   return new PartitionedMatrixView<2, 3, 6>(matrix, options.elimination_groups[0]);\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 3) &&\n     (options.f_block_size == 9)) {\n   return new PartitionedMatrixView<2, 3, 9>(matrix, options.elimination_groups[0]);\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 3)) {\n   return new PartitionedMatrixView<2, 3, Eigen::Dynamic>(matrix, options.elimination_groups[0]);\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 4) &&\n     (options.f_block_size == 3)) {\n   return new PartitionedMatrixView<2, 4, 3>(matrix, options.elimination_groups[0]);\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 4) &&\n     (options.f_block_size == 4)) {\n   return new PartitionedMatrixView<2, 4, 4>(matrix, options.elimination_groups[0]);\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 4) &&\n     (options.f_block_size == 6)) {\n   return new PartitionedMatrixView<2, 4, 6>(matrix, options.elimination_groups[0]);\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 4) &&\n     (options.f_block_size == 8)) {\n   return new PartitionedMatrixView<2, 4, 8>(matrix, options.elimination_groups[0]);\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 4) &&\n     (options.f_block_size == 9)) {\n   return new PartitionedMatrixView<2, 4, 9>(matrix, options.elimination_groups[0]);\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 4)) {\n   return new PartitionedMatrixView<2, 4, Eigen::Dynamic>(matrix, options.elimination_groups[0]);\n }\n if (options.row_block_size == 2){\n   return new PartitionedMatrixView<2, Eigen::Dynamic, Eigen::Dynamic>(matrix, options.elimination_groups[0]);\n }\n if ((options.row_block_size == 3) &&\n     (options.e_block_size == 3) &&\n     (options.f_block_size == 3)) {\n   return new PartitionedMatrixView<3, 3, 3>(matrix, options.elimination_groups[0]);\n }\n if ((options.row_block_size == 4) &&\n     (options.e_block_size == 4) &&\n     (options.f_block_size == 2)) {\n   return new PartitionedMatrixView<4, 4, 2>(matrix, options.elimination_groups[0]);\n }\n if ((options.row_block_size == 4) &&\n     (options.e_block_size == 4) &&\n     (options.f_block_size == 3)) {\n   return new PartitionedMatrixView<4, 4, 3>(matrix, options.elimination_groups[0]);\n }\n if ((options.row_block_size == 4) &&\n     (options.e_block_size == 4) &&\n     (options.f_block_size == 4)) {\n   return new PartitionedMatrixView<4, 4, 4>(matrix, options.elimination_groups[0]);\n }\n if ((options.row_block_size == 4) &&\n     (options.e_block_size == 4)) {\n   return new PartitionedMatrixView<4, 4, Eigen::Dynamic>(matrix, options.elimination_groups[0]);\n }\n\n#endif\n  VLOG(1) << \"Template specializations not found for <\"\n          << options.row_block_size << \",\"\n          << options.e_block_size << \",\"\n          << options.f_block_size << \">\";\n  return new PartitionedMatrixView<Eigen::Dynamic, Eigen::Dynamic, Eigen::Dynamic>(\n               matrix, options.elimination_groups[0]);\n};\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/partitioned_matrix_view.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// For generalized bi-partite Jacobian matrices that arise in\n// Structure from Motion related problems, it is sometimes useful to\n// have access to the two parts of the matrix as linear operators\n// themselves. This class provides that functionality.\n\n#ifndef CERES_INTERNAL_PARTITIONED_MATRIX_VIEW_H_\n#define CERES_INTERNAL_PARTITIONED_MATRIX_VIEW_H_\n\n#include <algorithm>\n#include <cstring>\n#include <vector>\n\n#include \"ceres/block_structure.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/linear_solver.h\"\n#include \"ceres/small_blas.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// Given generalized bi-partite matrix A = [E F], with the same block\n// structure as required by the Schur complement based solver, found\n// in explicit_schur_complement_solver.h, provide access to the\n// matrices E and F and their outer products E'E and F'F with\n// themselves.\n//\n// Lack of BlockStructure object will result in a crash and if the\n// block structure of the matrix does not satisfy the requirements of\n// the Schur complement solver it will result in unpredictable and\n// wrong output.\nclass PartitionedMatrixViewBase {\n public:\n  virtual ~PartitionedMatrixViewBase() {}\n\n  // y += E'x\n  virtual void LeftMultiplyE(const double* x, double* y) const = 0;\n\n  // y += F'x\n  virtual void LeftMultiplyF(const double* x, double* y) const = 0;\n\n  // y += Ex\n  virtual void RightMultiplyE(const double* x, double* y) const = 0;\n\n  // y += Fx\n  virtual void RightMultiplyF(const double* x, double* y) const = 0;\n\n  // Create and return the block diagonal of the matrix E'E.\n  virtual BlockSparseMatrix* CreateBlockDiagonalEtE() const = 0;\n\n  // Create and return the block diagonal of the matrix F'F. Caller\n  // owns the result.\n  virtual BlockSparseMatrix* CreateBlockDiagonalFtF() const = 0;\n\n  // Compute the block diagonal of the matrix E'E and store it in\n  // block_diagonal. The matrix block_diagonal is expected to have a\n  // BlockStructure (preferably created using\n  // CreateBlockDiagonalMatrixEtE) which is has the same structure as\n  // the block diagonal of E'E.\n  virtual void UpdateBlockDiagonalEtE(\n      BlockSparseMatrix* block_diagonal) const = 0;\n\n  // Compute the block diagonal of the matrix F'F and store it in\n  // block_diagonal. The matrix block_diagonal is expected to have a\n  // BlockStructure (preferably created using\n  // CreateBlockDiagonalMatrixFtF) which is has the same structure as\n  // the block diagonal of F'F.\n  virtual void UpdateBlockDiagonalFtF(\n      BlockSparseMatrix* block_diagonal) const = 0;\n\n  virtual int num_col_blocks_e() const = 0;\n  virtual int num_col_blocks_f() const = 0;\n  virtual int num_cols_e()       const = 0;\n  virtual int num_cols_f()       const = 0;\n  virtual int num_rows()         const = 0;\n  virtual int num_cols()         const = 0;\n\n  static PartitionedMatrixViewBase* Create(const LinearSolver::Options& options,\n                                           const BlockSparseMatrix& matrix);\n};\n\ntemplate <int kRowBlockSize = Eigen::Dynamic,\n          int kEBlockSize = Eigen::Dynamic,\n          int kFBlockSize = Eigen::Dynamic >\nclass PartitionedMatrixView : public PartitionedMatrixViewBase {\n public:\n  // matrix = [E F], where the matrix E contains the first\n  // num_col_blocks_a column blocks.\n  PartitionedMatrixView(const BlockSparseMatrix& matrix, int num_col_blocks_e);\n\n  virtual ~PartitionedMatrixView();\n  void LeftMultiplyE(const double* x, double* y) const final;\n  void LeftMultiplyF(const double* x, double* y) const final;\n  void RightMultiplyE(const double* x, double* y) const final;\n  void RightMultiplyF(const double* x, double* y) const final;\n  BlockSparseMatrix* CreateBlockDiagonalEtE() const final;\n  BlockSparseMatrix* CreateBlockDiagonalFtF() const final;\n  void UpdateBlockDiagonalEtE(BlockSparseMatrix* block_diagonal) const final;\n  void UpdateBlockDiagonalFtF(BlockSparseMatrix* block_diagonal) const final;\n  int num_col_blocks_e() const final { return num_col_blocks_e_;  }\n  int num_col_blocks_f() const final { return num_col_blocks_f_;  }\n  int num_cols_e()       const final { return num_cols_e_;        }\n  int num_cols_f()       const final { return num_cols_f_;        }\n  int num_rows()         const final { return matrix_.num_rows(); }\n  int num_cols()         const final { return matrix_.num_cols(); }\n\n private:\n  BlockSparseMatrix* CreateBlockDiagonalMatrixLayout(int start_col_block,\n                                                     int end_col_block) const;\n\n  const BlockSparseMatrix& matrix_;\n  int num_row_blocks_e_;\n  int num_col_blocks_e_;\n  int num_col_blocks_f_;\n  int num_cols_e_;\n  int num_cols_f_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_PARTITIONED_MATRIX_VIEW_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/partitioned_matrix_view_impl.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/partitioned_matrix_view.h\"\n\n#include <algorithm>\n#include <cstring>\n#include <vector>\n#include \"ceres/block_sparse_matrix.h\"\n#include \"ceres/block_structure.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/small_blas.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate <int kRowBlockSize, int kEBlockSize, int kFBlockSize>\nPartitionedMatrixView<kRowBlockSize, kEBlockSize, kFBlockSize>::\nPartitionedMatrixView(\n    const BlockSparseMatrix& matrix,\n    int num_col_blocks_e)\n    : matrix_(matrix),\n      num_col_blocks_e_(num_col_blocks_e) {\n  const CompressedRowBlockStructure* bs = matrix_.block_structure();\n  CHECK(bs != nullptr);\n\n  num_col_blocks_f_ = bs->cols.size() - num_col_blocks_e_;\n\n  // Compute the number of row blocks in E. The number of row blocks\n  // in E maybe less than the number of row blocks in the input matrix\n  // as some of the row blocks at the bottom may not have any\n  // e_blocks. For a definition of what an e_block is, please see\n  // explicit_schur_complement_solver.h\n  num_row_blocks_e_ = 0;\n  for (int r = 0; r < bs->rows.size(); ++r) {\n    const std::vector<Cell>& cells = bs->rows[r].cells;\n    if (cells[0].block_id < num_col_blocks_e_) {\n      ++num_row_blocks_e_;\n    }\n  }\n\n  // Compute the number of columns in E and F.\n  num_cols_e_ = 0;\n  num_cols_f_ = 0;\n\n  for (int c = 0; c < bs->cols.size(); ++c) {\n    const Block& block = bs->cols[c];\n    if (c < num_col_blocks_e_) {\n      num_cols_e_ += block.size;\n    } else {\n      num_cols_f_ += block.size;\n    }\n  }\n\n  CHECK_EQ(num_cols_e_ + num_cols_f_, matrix_.num_cols());\n}\n\ntemplate <int kRowBlockSize, int kEBlockSize, int kFBlockSize>\nPartitionedMatrixView<kRowBlockSize, kEBlockSize, kFBlockSize>::\n~PartitionedMatrixView() {\n}\n\n// The next four methods don't seem to be particularly cache\n// friendly. This is an artifact of how the BlockStructure of the\n// input matrix is constructed. These methods will benefit from\n// multithreading as well as improved data layout.\n\ntemplate <int kRowBlockSize, int kEBlockSize, int kFBlockSize>\nvoid\nPartitionedMatrixView<kRowBlockSize, kEBlockSize, kFBlockSize>::\nRightMultiplyE(const double* x, double* y) const {\n  const CompressedRowBlockStructure* bs = matrix_.block_structure();\n\n  // Iterate over the first num_row_blocks_e_ row blocks, and multiply\n  // by the first cell in each row block.\n  const double* values = matrix_.values();\n  for (int r = 0; r < num_row_blocks_e_; ++r) {\n    const Cell& cell = bs->rows[r].cells[0];\n    const int row_block_pos = bs->rows[r].block.position;\n    const int row_block_size = bs->rows[r].block.size;\n    const int col_block_id = cell.block_id;\n    const int col_block_pos = bs->cols[col_block_id].position;\n    const int col_block_size = bs->cols[col_block_id].size;\n    MatrixVectorMultiply<kRowBlockSize, kEBlockSize, 1>(\n        values + cell.position, row_block_size, col_block_size,\n        x + col_block_pos,\n        y + row_block_pos);\n  }\n}\n\ntemplate <int kRowBlockSize, int kEBlockSize, int kFBlockSize>\nvoid\nPartitionedMatrixView<kRowBlockSize, kEBlockSize, kFBlockSize>::\nRightMultiplyF(const double* x, double* y) const {\n  const CompressedRowBlockStructure* bs = matrix_.block_structure();\n\n  // Iterate over row blocks, and if the row block is in E, then\n  // multiply by all the cells except the first one which is of type\n  // E. If the row block is not in E (i.e its in the bottom\n  // num_row_blocks - num_row_blocks_e row blocks), then all the cells\n  // are of type F and multiply by them all.\n  const double* values = matrix_.values();\n  for (int r = 0; r < num_row_blocks_e_; ++r) {\n    const int row_block_pos = bs->rows[r].block.position;\n    const int row_block_size = bs->rows[r].block.size;\n    const std::vector<Cell>& cells = bs->rows[r].cells;\n    for (int c = 1; c < cells.size(); ++c) {\n      const int col_block_id = cells[c].block_id;\n      const int col_block_pos = bs->cols[col_block_id].position;\n      const int col_block_size = bs->cols[col_block_id].size;\n      MatrixVectorMultiply<kRowBlockSize, kFBlockSize, 1>(\n          values + cells[c].position, row_block_size, col_block_size,\n          x + col_block_pos - num_cols_e_,\n          y + row_block_pos);\n    }\n  }\n\n  for (int r = num_row_blocks_e_; r < bs->rows.size(); ++r) {\n    const int row_block_pos = bs->rows[r].block.position;\n    const int row_block_size = bs->rows[r].block.size;\n    const std::vector<Cell>& cells = bs->rows[r].cells;\n    for (int c = 0; c < cells.size(); ++c) {\n      const int col_block_id = cells[c].block_id;\n      const int col_block_pos = bs->cols[col_block_id].position;\n      const int col_block_size = bs->cols[col_block_id].size;\n      MatrixVectorMultiply<Eigen::Dynamic, Eigen::Dynamic, 1>(\n          values + cells[c].position, row_block_size, col_block_size,\n          x + col_block_pos - num_cols_e_,\n          y + row_block_pos);\n    }\n  }\n}\n\ntemplate <int kRowBlockSize, int kEBlockSize, int kFBlockSize>\nvoid\nPartitionedMatrixView<kRowBlockSize, kEBlockSize, kFBlockSize>::\nLeftMultiplyE(const double* x, double* y) const {\n  const CompressedRowBlockStructure* bs = matrix_.block_structure();\n\n  // Iterate over the first num_row_blocks_e_ row blocks, and multiply\n  // by the first cell in each row block.\n  const double* values = matrix_.values();\n  for (int r = 0; r < num_row_blocks_e_; ++r) {\n    const Cell& cell = bs->rows[r].cells[0];\n    const int row_block_pos = bs->rows[r].block.position;\n    const int row_block_size = bs->rows[r].block.size;\n    const int col_block_id = cell.block_id;\n    const int col_block_pos = bs->cols[col_block_id].position;\n    const int col_block_size = bs->cols[col_block_id].size;\n    MatrixTransposeVectorMultiply<kRowBlockSize, kEBlockSize, 1>(\n        values + cell.position, row_block_size, col_block_size,\n        x + row_block_pos,\n        y + col_block_pos);\n  }\n}\n\ntemplate <int kRowBlockSize, int kEBlockSize, int kFBlockSize>\nvoid\nPartitionedMatrixView<kRowBlockSize, kEBlockSize, kFBlockSize>::\nLeftMultiplyF(const double* x, double* y) const {\n  const CompressedRowBlockStructure* bs = matrix_.block_structure();\n\n  // Iterate over row blocks, and if the row block is in E, then\n  // multiply by all the cells except the first one which is of type\n  // E. If the row block is not in E (i.e its in the bottom\n  // num_row_blocks - num_row_blocks_e row blocks), then all the cells\n  // are of type F and multiply by them all.\n  const double* values = matrix_.values();\n  for (int r = 0; r < num_row_blocks_e_; ++r) {\n    const int row_block_pos = bs->rows[r].block.position;\n    const int row_block_size = bs->rows[r].block.size;\n    const std::vector<Cell>& cells = bs->rows[r].cells;\n    for (int c = 1; c < cells.size(); ++c) {\n      const int col_block_id = cells[c].block_id;\n      const int col_block_pos = bs->cols[col_block_id].position;\n      const int col_block_size = bs->cols[col_block_id].size;\n      MatrixTransposeVectorMultiply<kRowBlockSize, kFBlockSize, 1>(\n        values + cells[c].position, row_block_size, col_block_size,\n        x + row_block_pos,\n        y + col_block_pos - num_cols_e_);\n    }\n  }\n\n  for (int r = num_row_blocks_e_; r < bs->rows.size(); ++r) {\n    const int row_block_pos = bs->rows[r].block.position;\n    const int row_block_size = bs->rows[r].block.size;\n    const std::vector<Cell>& cells = bs->rows[r].cells;\n    for (int c = 0; c < cells.size(); ++c) {\n      const int col_block_id = cells[c].block_id;\n      const int col_block_pos = bs->cols[col_block_id].position;\n      const int col_block_size = bs->cols[col_block_id].size;\n      MatrixTransposeVectorMultiply<Eigen::Dynamic, Eigen::Dynamic, 1>(\n        values + cells[c].position, row_block_size, col_block_size,\n        x + row_block_pos,\n        y + col_block_pos - num_cols_e_);\n    }\n  }\n}\n\n// Given a range of columns blocks of a matrix m, compute the block\n// structure of the block diagonal of the matrix m(:,\n// start_col_block:end_col_block)'m(:, start_col_block:end_col_block)\n// and return a BlockSparseMatrix with the this block structure. The\n// caller owns the result.\ntemplate <int kRowBlockSize, int kEBlockSize, int kFBlockSize>\nBlockSparseMatrix*\nPartitionedMatrixView<kRowBlockSize, kEBlockSize, kFBlockSize>::\nCreateBlockDiagonalMatrixLayout(int start_col_block, int end_col_block) const {\n  const CompressedRowBlockStructure* bs = matrix_.block_structure();\n  CompressedRowBlockStructure* block_diagonal_structure =\n      new CompressedRowBlockStructure;\n\n  int block_position = 0;\n  int diagonal_cell_position = 0;\n\n  // Iterate over the column blocks, creating a new diagonal block for\n  // each column block.\n  for (int c = start_col_block; c < end_col_block; ++c) {\n    const Block& block = bs->cols[c];\n    block_diagonal_structure->cols.push_back(Block());\n    Block& diagonal_block = block_diagonal_structure->cols.back();\n    diagonal_block.size = block.size;\n    diagonal_block.position = block_position;\n\n    block_diagonal_structure->rows.push_back(CompressedRow());\n    CompressedRow& row = block_diagonal_structure->rows.back();\n    row.block = diagonal_block;\n\n    row.cells.push_back(Cell());\n    Cell& cell = row.cells.back();\n    cell.block_id = c - start_col_block;\n    cell.position = diagonal_cell_position;\n\n    block_position += block.size;\n    diagonal_cell_position += block.size * block.size;\n  }\n\n  // Build a BlockSparseMatrix with the just computed block\n  // structure.\n  return new BlockSparseMatrix(block_diagonal_structure);\n}\n\ntemplate <int kRowBlockSize, int kEBlockSize, int kFBlockSize>\nBlockSparseMatrix*\nPartitionedMatrixView<kRowBlockSize, kEBlockSize, kFBlockSize>::\nCreateBlockDiagonalEtE() const {\n  BlockSparseMatrix* block_diagonal =\n      CreateBlockDiagonalMatrixLayout(0, num_col_blocks_e_);\n  UpdateBlockDiagonalEtE(block_diagonal);\n  return block_diagonal;\n}\n\ntemplate <int kRowBlockSize, int kEBlockSize, int kFBlockSize>\nBlockSparseMatrix*\nPartitionedMatrixView<kRowBlockSize, kEBlockSize, kFBlockSize>::\nCreateBlockDiagonalFtF() const {\n  BlockSparseMatrix* block_diagonal =\n      CreateBlockDiagonalMatrixLayout(\n          num_col_blocks_e_, num_col_blocks_e_ + num_col_blocks_f_);\n  UpdateBlockDiagonalFtF(block_diagonal);\n  return block_diagonal;\n}\n\n// Similar to the code in RightMultiplyE, except instead of the matrix\n// vector multiply its an outer product.\n//\n//    block_diagonal = block_diagonal(E'E)\n//\ntemplate <int kRowBlockSize, int kEBlockSize, int kFBlockSize>\nvoid\nPartitionedMatrixView<kRowBlockSize, kEBlockSize, kFBlockSize>::\nUpdateBlockDiagonalEtE(\n    BlockSparseMatrix* block_diagonal) const {\n  const CompressedRowBlockStructure* bs = matrix_.block_structure();\n  const CompressedRowBlockStructure* block_diagonal_structure =\n      block_diagonal->block_structure();\n\n  block_diagonal->SetZero();\n  const double* values = matrix_.values();\n  for (int r = 0; r < num_row_blocks_e_ ; ++r) {\n    const Cell& cell = bs->rows[r].cells[0];\n    const int row_block_size = bs->rows[r].block.size;\n    const int block_id = cell.block_id;\n    const int col_block_size = bs->cols[block_id].size;\n    const int cell_position =\n        block_diagonal_structure->rows[block_id].cells[0].position;\n\n    MatrixTransposeMatrixMultiply\n        <kRowBlockSize, kEBlockSize, kRowBlockSize, kEBlockSize, 1>(\n            values + cell.position, row_block_size, col_block_size,\n            values + cell.position, row_block_size, col_block_size,\n            block_diagonal->mutable_values() + cell_position,\n            0, 0, col_block_size, col_block_size);\n  }\n}\n\n// Similar to the code in RightMultiplyF, except instead of the matrix\n// vector multiply its an outer product.\n//\n//   block_diagonal = block_diagonal(F'F)\n//\ntemplate <int kRowBlockSize, int kEBlockSize, int kFBlockSize>\nvoid\nPartitionedMatrixView<kRowBlockSize, kEBlockSize, kFBlockSize>::\nUpdateBlockDiagonalFtF(BlockSparseMatrix* block_diagonal) const {\n  const CompressedRowBlockStructure* bs = matrix_.block_structure();\n  const CompressedRowBlockStructure* block_diagonal_structure =\n      block_diagonal->block_structure();\n\n  block_diagonal->SetZero();\n  const double* values = matrix_.values();\n  for (int r = 0; r < num_row_blocks_e_; ++r) {\n    const int row_block_size = bs->rows[r].block.size;\n    const std::vector<Cell>& cells = bs->rows[r].cells;\n    for (int c = 1; c < cells.size(); ++c) {\n      const int col_block_id = cells[c].block_id;\n      const int col_block_size = bs->cols[col_block_id].size;\n      const int diagonal_block_id = col_block_id - num_col_blocks_e_;\n      const int cell_position =\n          block_diagonal_structure->rows[diagonal_block_id].cells[0].position;\n\n      MatrixTransposeMatrixMultiply\n          <kRowBlockSize, kFBlockSize, kRowBlockSize, kFBlockSize, 1>(\n              values + cells[c].position, row_block_size, col_block_size,\n              values + cells[c].position, row_block_size, col_block_size,\n              block_diagonal->mutable_values() + cell_position,\n              0, 0, col_block_size, col_block_size);\n    }\n  }\n\n  for (int r = num_row_blocks_e_; r < bs->rows.size(); ++r) {\n    const int row_block_size = bs->rows[r].block.size;\n    const std::vector<Cell>& cells = bs->rows[r].cells;\n    for (int c = 0; c < cells.size(); ++c) {\n      const int col_block_id = cells[c].block_id;\n      const int col_block_size = bs->cols[col_block_id].size;\n      const int diagonal_block_id = col_block_id - num_col_blocks_e_;\n      const int cell_position =\n          block_diagonal_structure->rows[diagonal_block_id].cells[0].position;\n\n      MatrixTransposeMatrixMultiply\n          <Eigen::Dynamic, Eigen::Dynamic, Eigen::Dynamic, Eigen::Dynamic, 1>(\n              values + cells[c].position, row_block_size, col_block_size,\n              values + cells[c].position, row_block_size, col_block_size,\n              block_diagonal->mutable_values() + cell_position,\n              0, 0, col_block_size, col_block_size);\n    }\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/partitioned_matrix_view_template.py",
    "content": "# Ceres Solver - A fast non-linear least squares minimizer\n# Copyright 2015 Google Inc. All rights reserved.\n# http://ceres-solver.org/\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice,\n#   this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright notice,\n#   this list of conditions and the following disclaimer in the documentation\n#   and/or other materials provided with the distribution.\n# * Neither the name of Google Inc. nor the names of its contributors may be\n#   used to endorse or promote products derived from this software without\n#   specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n#\n# Author: sameeragarwal@google.com (Sameer Agarwal)\n#\n# Script for explicitly generating template specialization of the\n# PartitionedMatrixView class. Explicitly generating these\n# instantiations in separate .cc files breaks the compilation into\n# separate compilation unit rather than one large cc file.\n#\n# This script creates two sets of files.\n#\n# 1. partitioned_matrix_view_x_x_x.cc\n# where the x indicates the template parameters and\n#\n# 2. partitioned_matrix_view.cc\n#\n# that contains a factory function for instantiating these classes\n# based on runtime parameters.\n#\n# The list of tuples, specializations indicates the set of\n# specializations that is generated.\n\nHEADER = \"\"\"// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of PartitionedMatrixView.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\"\"\"\n\nDYNAMIC_FILE = \"\"\"\n\n#include \"ceres/partitioned_matrix_view_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class PartitionedMatrixView<%s, %s, %s>;\n\n}  // namespace internal\n}  // namespace ceres\n\"\"\"\n\nSPECIALIZATION_FILE = \"\"\"\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/partitioned_matrix_view_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class PartitionedMatrixView<%s, %s, %s>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n\"\"\"\n\nFACTORY_FILE_HEADER = \"\"\"\n#include \"ceres/linear_solver.h\"\n#include \"ceres/partitioned_matrix_view.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\nPartitionedMatrixViewBase*\nPartitionedMatrixViewBase::Create(const LinearSolver::Options& options,\n                                  const BlockSparseMatrix& matrix) {\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\"\"\"\nFACTORY = \"\"\" return new PartitionedMatrixView<%s, %s, %s>(matrix, options.elimination_groups[0]);\"\"\"\n\nFACTORY_FOOTER = \"\"\"\n#endif\n  VLOG(1) << \"Template specializations not found for <\"\n          << options.row_block_size << \",\"\n          << options.e_block_size << \",\"\n          << options.f_block_size << \">\";\n  return new PartitionedMatrixView<Eigen::Dynamic, Eigen::Dynamic, Eigen::Dynamic>(\n               matrix, options.elimination_groups[0]);\n};\n\n}  // namespace internal\n}  // namespace ceres\n\"\"\"\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/partitioned_matrix_view_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/partitioned_matrix_view.h\"\n\n#include <memory>\n#include <vector>\n#include \"ceres/block_structure.h\"\n#include \"ceres/casts.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/linear_least_squares_problems.h\"\n#include \"ceres/random.h\"\n#include \"ceres/sparse_matrix.h\"\n#include \"glog/logging.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nconst double kEpsilon = 1e-14;\n\nclass PartitionedMatrixViewTest : public ::testing::Test {\n protected :\n  void SetUp() final {\n    srand(5);\n    std::unique_ptr<LinearLeastSquaresProblem> problem(\n        CreateLinearLeastSquaresProblemFromId(2));\n    CHECK(problem != nullptr);\n    A_.reset(problem->A.release());\n\n    num_cols_ = A_->num_cols();\n    num_rows_ = A_->num_rows();\n    num_eliminate_blocks_ = problem->num_eliminate_blocks;\n    LinearSolver::Options options;\n    options.elimination_groups.push_back(num_eliminate_blocks_);\n    pmv_.reset(PartitionedMatrixViewBase::Create(\n                   options,\n                   *down_cast<BlockSparseMatrix*>(A_.get())));\n  }\n\n  int num_rows_;\n  int num_cols_;\n  int num_eliminate_blocks_;\n  std::unique_ptr<SparseMatrix> A_;\n  std::unique_ptr<PartitionedMatrixViewBase> pmv_;\n};\n\nTEST_F(PartitionedMatrixViewTest, DimensionsTest) {\n  EXPECT_EQ(pmv_->num_col_blocks_e(), num_eliminate_blocks_);\n  EXPECT_EQ(pmv_->num_col_blocks_f(), num_cols_ - num_eliminate_blocks_);\n  EXPECT_EQ(pmv_->num_cols_e(), num_eliminate_blocks_);\n  EXPECT_EQ(pmv_->num_cols_f(), num_cols_ - num_eliminate_blocks_);\n  EXPECT_EQ(pmv_->num_cols(), A_->num_cols());\n  EXPECT_EQ(pmv_->num_rows(), A_->num_rows());\n}\n\nTEST_F(PartitionedMatrixViewTest, RightMultiplyE) {\n  Vector x1(pmv_->num_cols_e());\n  Vector x2(pmv_->num_cols());\n  x2.setZero();\n\n  for (int i = 0; i < pmv_->num_cols_e(); ++i) {\n    x1(i) = x2(i) = RandDouble();\n  }\n\n  Vector y1 = Vector::Zero(pmv_->num_rows());\n  pmv_->RightMultiplyE(x1.data(), y1.data());\n\n  Vector y2 = Vector::Zero(pmv_->num_rows());\n  A_->RightMultiply(x2.data(), y2.data());\n\n  for (int i = 0; i < pmv_->num_rows(); ++i) {\n    EXPECT_NEAR(y1(i), y2(i), kEpsilon);\n  }\n}\n\nTEST_F(PartitionedMatrixViewTest, RightMultiplyF) {\n  Vector x1(pmv_->num_cols_f());\n  Vector x2 = Vector::Zero(pmv_->num_cols());\n\n  for (int i = 0; i < pmv_->num_cols_f(); ++i) {\n    x1(i) = RandDouble();\n    x2(i + pmv_->num_cols_e()) = x1(i);\n  }\n\n  Vector y1 = Vector::Zero(pmv_->num_rows());\n  pmv_->RightMultiplyF(x1.data(), y1.data());\n\n  Vector y2 = Vector::Zero(pmv_->num_rows());\n  A_->RightMultiply(x2.data(), y2.data());\n\n  for (int i = 0; i < pmv_->num_rows(); ++i) {\n    EXPECT_NEAR(y1(i), y2(i), kEpsilon);\n  }\n}\n\nTEST_F(PartitionedMatrixViewTest, LeftMultiply) {\n  Vector x = Vector::Zero(pmv_->num_rows());\n  for (int i = 0; i < pmv_->num_rows(); ++i) {\n    x(i) = RandDouble();\n  }\n\n  Vector y = Vector::Zero(pmv_->num_cols());\n  Vector y1 = Vector::Zero(pmv_->num_cols_e());\n  Vector y2 = Vector::Zero(pmv_->num_cols_f());\n\n  A_->LeftMultiply(x.data(), y.data());\n  pmv_->LeftMultiplyE(x.data(), y1.data());\n  pmv_->LeftMultiplyF(x.data(), y2.data());\n\n  for (int i = 0; i < pmv_->num_cols(); ++i) {\n    EXPECT_NEAR(y(i),\n                (i < pmv_->num_cols_e()) ? y1(i) : y2(i - pmv_->num_cols_e()),\n                kEpsilon);\n  }\n}\n\nTEST_F(PartitionedMatrixViewTest, BlockDiagonalEtE) {\n  std::unique_ptr<BlockSparseMatrix>\n      block_diagonal_ee(pmv_->CreateBlockDiagonalEtE());\n  const CompressedRowBlockStructure* bs  = block_diagonal_ee->block_structure();\n\n  EXPECT_EQ(block_diagonal_ee->num_rows(), 2);\n  EXPECT_EQ(block_diagonal_ee->num_cols(), 2);\n  EXPECT_EQ(bs->cols.size(), 2);\n  EXPECT_EQ(bs->rows.size(), 2);\n\n  EXPECT_NEAR(block_diagonal_ee->values()[0], 10.0, kEpsilon);\n  EXPECT_NEAR(block_diagonal_ee->values()[1], 155.0, kEpsilon);\n}\n\nTEST_F(PartitionedMatrixViewTest, BlockDiagonalFtF) {\n  std::unique_ptr<BlockSparseMatrix>\n      block_diagonal_ff(pmv_->CreateBlockDiagonalFtF());\n  const CompressedRowBlockStructure* bs  = block_diagonal_ff->block_structure();\n\n  EXPECT_EQ(block_diagonal_ff->num_rows(), 3);\n  EXPECT_EQ(block_diagonal_ff->num_cols(), 3);\n  EXPECT_EQ(bs->cols.size(), 3);\n  EXPECT_EQ(bs->rows.size(), 3);\n  EXPECT_NEAR(block_diagonal_ff->values()[0], 70.0, kEpsilon);\n  EXPECT_NEAR(block_diagonal_ff->values()[1], 17.0, kEpsilon);\n  EXPECT_NEAR(block_diagonal_ff->values()[2], 37.0, kEpsilon);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/polynomial.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: moll.markus@arcor.de (Markus Moll)\n//         sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/polynomial.h\"\n\n#include <cmath>\n#include <cstddef>\n#include <vector>\n\n#include \"Eigen/Dense\"\n#include \"ceres/function_sample.h\"\n#include \"ceres/internal/port.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::vector;\n\nnamespace {\n\n// Balancing function as described by B. N. Parlett and C. Reinsch,\n// \"Balancing a Matrix for Calculation of Eigenvalues and Eigenvectors\".\n// In: Numerische Mathematik, Volume 13, Number 4 (1969), 293-304,\n// Springer Berlin / Heidelberg. DOI: 10.1007/BF02165404\nvoid BalanceCompanionMatrix(Matrix* companion_matrix_ptr) {\n  CHECK(companion_matrix_ptr != nullptr);\n  Matrix& companion_matrix = *companion_matrix_ptr;\n  Matrix companion_matrix_offdiagonal = companion_matrix;\n  companion_matrix_offdiagonal.diagonal().setZero();\n\n  const int degree = companion_matrix.rows();\n\n  // gamma <= 1 controls how much a change in the scaling has to\n  // lower the 1-norm of the companion matrix to be accepted.\n  //\n  // gamma = 1 seems to lead to cycles (numerical issues?), so\n  // we set it slightly lower.\n  const double gamma = 0.9;\n\n  // Greedily scale row/column pairs until there is no change.\n  bool scaling_has_changed;\n  do {\n    scaling_has_changed = false;\n\n    for (int i = 0; i < degree; ++i) {\n      const double row_norm = companion_matrix_offdiagonal.row(i).lpNorm<1>();\n      const double col_norm = companion_matrix_offdiagonal.col(i).lpNorm<1>();\n\n      // Decompose row_norm/col_norm into mantissa * 2^exponent,\n      // where 0.5 <= mantissa < 1. Discard mantissa (return value\n      // of frexp), as only the exponent is needed.\n      int exponent = 0;\n      std::frexp(row_norm / col_norm, &exponent);\n      exponent /= 2;\n\n      if (exponent != 0) {\n        const double scaled_col_norm = std::ldexp(col_norm, exponent);\n        const double scaled_row_norm = std::ldexp(row_norm, -exponent);\n        if (scaled_col_norm + scaled_row_norm < gamma * (col_norm + row_norm)) {\n          // Accept the new scaling. (Multiplication by powers of 2 should not\n          // introduce rounding errors (ignoring non-normalized numbers and\n          // over- or underflow))\n          scaling_has_changed = true;\n          companion_matrix_offdiagonal.row(i) *= std::ldexp(1.0, -exponent);\n          companion_matrix_offdiagonal.col(i) *= std::ldexp(1.0, exponent);\n        }\n      }\n    }\n  } while (scaling_has_changed);\n\n  companion_matrix_offdiagonal.diagonal() = companion_matrix.diagonal();\n  companion_matrix = companion_matrix_offdiagonal;\n  VLOG(3) << \"Balanced companion matrix is\\n\" << companion_matrix;\n}\n\nvoid BuildCompanionMatrix(const Vector& polynomial,\n                          Matrix* companion_matrix_ptr) {\n  CHECK(companion_matrix_ptr != nullptr);\n  Matrix& companion_matrix = *companion_matrix_ptr;\n\n  const int degree = polynomial.size() - 1;\n\n  companion_matrix.resize(degree, degree);\n  companion_matrix.setZero();\n  companion_matrix.diagonal(-1).setOnes();\n  companion_matrix.col(degree - 1) = -polynomial.reverse().head(degree);\n}\n\n// Remove leading terms with zero coefficients.\nVector RemoveLeadingZeros(const Vector& polynomial_in) {\n  int i = 0;\n  while (i < (polynomial_in.size() - 1) && polynomial_in(i) == 0.0) {\n    ++i;\n  }\n  return polynomial_in.tail(polynomial_in.size() - i);\n}\n\nvoid FindLinearPolynomialRoots(const Vector& polynomial,\n                               Vector* real,\n                               Vector* imaginary) {\n  CHECK_EQ(polynomial.size(), 2);\n  if (real != NULL) {\n    real->resize(1);\n    (*real)(0) = -polynomial(1) / polynomial(0);\n  }\n\n  if (imaginary != NULL) {\n    imaginary->setZero(1);\n  }\n}\n\nvoid FindQuadraticPolynomialRoots(const Vector& polynomial,\n                                  Vector* real,\n                                  Vector* imaginary) {\n  CHECK_EQ(polynomial.size(), 3);\n  const double a = polynomial(0);\n  const double b = polynomial(1);\n  const double c = polynomial(2);\n  const double D = b * b - 4 * a * c;\n  const double sqrt_D = sqrt(fabs(D));\n  if (real != NULL) {\n    real->setZero(2);\n  }\n  if (imaginary != NULL) {\n    imaginary->setZero(2);\n  }\n\n  // Real roots.\n  if (D >= 0) {\n    if (real != NULL) {\n      // Stable quadratic roots according to BKP Horn.\n      // http://people.csail.mit.edu/bkph/articles/Quadratics.pdf\n      if (b >= 0) {\n        (*real)(0) = (-b - sqrt_D) / (2.0 * a);\n        (*real)(1) = (2.0 * c) / (-b - sqrt_D);\n      } else {\n        (*real)(0) = (2.0 * c) / (-b + sqrt_D);\n        (*real)(1) = (-b + sqrt_D) / (2.0 * a);\n      }\n    }\n    return;\n  }\n\n  // Use the normal quadratic formula for the complex case.\n  if (real != NULL) {\n    (*real)(0) = -b / (2.0 * a);\n    (*real)(1) = -b / (2.0 * a);\n  }\n  if (imaginary != NULL) {\n    (*imaginary)(0) = sqrt_D / (2.0 * a);\n    (*imaginary)(1) = -sqrt_D / (2.0 * a);\n  }\n}\n}  // namespace\n\nbool FindPolynomialRoots(const Vector& polynomial_in,\n                         Vector* real,\n                         Vector* imaginary) {\n  if (polynomial_in.size() == 0) {\n    LOG(ERROR) << \"Invalid polynomial of size 0 passed to FindPolynomialRoots\";\n    return false;\n  }\n\n  Vector polynomial = RemoveLeadingZeros(polynomial_in);\n  const int degree = polynomial.size() - 1;\n\n  VLOG(3) << \"Input polynomial: \" << polynomial_in.transpose();\n  if (polynomial.size() != polynomial_in.size()) {\n    VLOG(3) << \"Trimmed polynomial: \" << polynomial.transpose();\n  }\n\n  // Is the polynomial constant?\n  if (degree == 0) {\n    LOG(WARNING) << \"Trying to extract roots from a constant \"\n                 << \"polynomial in FindPolynomialRoots\";\n    // We return true with no roots, not false, as if the polynomial is constant\n    // it is correct that there are no roots. It is not the case that they were\n    // there, but that we have failed to extract them.\n    return true;\n  }\n\n  // Linear\n  if (degree == 1) {\n    FindLinearPolynomialRoots(polynomial, real, imaginary);\n    return true;\n  }\n\n  // Quadratic\n  if (degree == 2) {\n    FindQuadraticPolynomialRoots(polynomial, real, imaginary);\n    return true;\n  }\n\n  // The degree is now known to be at least 3. For cubic or higher\n  // roots we use the method of companion matrices.\n\n  // Divide by leading term\n  const double leading_term = polynomial(0);\n  polynomial /= leading_term;\n\n  // Build and balance the companion matrix to the polynomial.\n  Matrix companion_matrix(degree, degree);\n  BuildCompanionMatrix(polynomial, &companion_matrix);\n  BalanceCompanionMatrix(&companion_matrix);\n\n  // Find its (complex) eigenvalues.\n  Eigen::EigenSolver<Matrix> solver(companion_matrix, false);\n  if (solver.info() != Eigen::Success) {\n    LOG(ERROR) << \"Failed to extract eigenvalues from companion matrix.\";\n    return false;\n  }\n\n  // Output roots\n  if (real != NULL) {\n    *real = solver.eigenvalues().real();\n  } else {\n    LOG(WARNING) << \"NULL pointer passed as real argument to \"\n                 << \"FindPolynomialRoots. Real parts of the roots will not \"\n                 << \"be returned.\";\n  }\n  if (imaginary != NULL) {\n    *imaginary = solver.eigenvalues().imag();\n  }\n  return true;\n}\n\nVector DifferentiatePolynomial(const Vector& polynomial) {\n  const int degree = polynomial.rows() - 1;\n  CHECK_GE(degree, 0);\n\n  // Degree zero polynomials are constants, and their derivative does\n  // not result in a smaller degree polynomial, just a degree zero\n  // polynomial with value zero.\n  if (degree == 0) {\n    return Eigen::VectorXd::Zero(1);\n  }\n\n  Vector derivative(degree);\n  for (int i = 0; i < degree; ++i) {\n    derivative(i) = (degree - i) * polynomial(i);\n  }\n\n  return derivative;\n}\n\nvoid MinimizePolynomial(const Vector& polynomial,\n                        const double x_min,\n                        const double x_max,\n                        double* optimal_x,\n                        double* optimal_value) {\n  // Find the minimum of the polynomial at the two ends.\n  //\n  // We start by inspecting the middle of the interval. Technically\n  // this is not needed, but we do this to make this code as close to\n  // the minFunc package as possible.\n  *optimal_x = (x_min + x_max) / 2.0;\n  *optimal_value = EvaluatePolynomial(polynomial, *optimal_x);\n\n  const double x_min_value = EvaluatePolynomial(polynomial, x_min);\n  if (x_min_value < *optimal_value) {\n    *optimal_value = x_min_value;\n    *optimal_x = x_min;\n  }\n\n  const double x_max_value = EvaluatePolynomial(polynomial, x_max);\n  if (x_max_value < *optimal_value) {\n    *optimal_value = x_max_value;\n    *optimal_x = x_max;\n  }\n\n  // If the polynomial is linear or constant, we are done.\n  if (polynomial.rows() <= 2) {\n    return;\n  }\n\n  const Vector derivative = DifferentiatePolynomial(polynomial);\n  Vector roots_real;\n  if (!FindPolynomialRoots(derivative, &roots_real, NULL)) {\n    LOG(WARNING) << \"Unable to find the critical points of \"\n                 << \"the interpolating polynomial.\";\n    return;\n  }\n\n  // This is a bit of an overkill, as some of the roots may actually\n  // have a complex part, but its simpler to just check these values.\n  for (int i = 0; i < roots_real.rows(); ++i) {\n    const double root = roots_real(i);\n    if ((root < x_min) || (root > x_max)) {\n      continue;\n    }\n\n    const double value = EvaluatePolynomial(polynomial, root);\n    if (value < *optimal_value) {\n      *optimal_value = value;\n      *optimal_x = root;\n    }\n  }\n}\n\nVector FindInterpolatingPolynomial(const vector<FunctionSample>& samples) {\n  const int num_samples = samples.size();\n  int num_constraints = 0;\n  for (int i = 0; i < num_samples; ++i) {\n    if (samples[i].value_is_valid) {\n      ++num_constraints;\n    }\n    if (samples[i].gradient_is_valid) {\n      ++num_constraints;\n    }\n  }\n\n  const int degree = num_constraints - 1;\n\n  Matrix lhs = Matrix::Zero(num_constraints, num_constraints);\n  Vector rhs = Vector::Zero(num_constraints);\n\n  int row = 0;\n  for (int i = 0; i < num_samples; ++i) {\n    const FunctionSample& sample = samples[i];\n    if (sample.value_is_valid) {\n      for (int j = 0; j <= degree; ++j) {\n        lhs(row, j) = pow(sample.x, degree - j);\n      }\n      rhs(row) = sample.value;\n      ++row;\n    }\n\n    if (sample.gradient_is_valid) {\n      for (int j = 0; j < degree; ++j) {\n        lhs(row, j) = (degree - j) * pow(sample.x, degree - j - 1);\n      }\n      rhs(row) = sample.gradient;\n      ++row;\n    }\n  }\n\n  // TODO(sameeragarwal): This is a hack.\n  // https://github.com/ceres-solver/ceres-solver/issues/248\n  Eigen::FullPivLU<Matrix> lu(lhs);\n  return lu.setThreshold(0.0).solve(rhs);\n}\n\nvoid MinimizeInterpolatingPolynomial(const vector<FunctionSample>& samples,\n                                     double x_min,\n                                     double x_max,\n                                     double* optimal_x,\n                                     double* optimal_value) {\n  const Vector polynomial = FindInterpolatingPolynomial(samples);\n  MinimizePolynomial(polynomial, x_min, x_max, optimal_x, optimal_value);\n  for (int i = 0; i < samples.size(); ++i) {\n    const FunctionSample& sample = samples[i];\n    if ((sample.x < x_min) || (sample.x > x_max)) {\n      continue;\n    }\n\n    const double value = EvaluatePolynomial(polynomial, sample.x);\n    if (value < *optimal_value) {\n      *optimal_x = sample.x;\n      *optimal_value = value;\n    }\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/polynomial.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: moll.markus@arcor.de (Markus Moll)\n//         sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_POLYNOMIAL_SOLVER_H_\n#define CERES_INTERNAL_POLYNOMIAL_SOLVER_H_\n\n#include <vector>\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/internal/port.h\"\n\nnamespace ceres {\nnamespace internal {\n\nstruct FunctionSample;\n\n// All polynomials are assumed to be the form\n//\n//   sum_{i=0}^N polynomial(i) x^{N-i}.\n//\n// and are given by a vector of coefficients of size N + 1.\n\n// Evaluate the polynomial at x using the Horner scheme.\ninline double EvaluatePolynomial(const Vector& polynomial, double x) {\n  double v = 0.0;\n  for (int i = 0; i < polynomial.size(); ++i) {\n    v = v * x + polynomial(i);\n  }\n  return v;\n}\n\n// Use the companion matrix eigenvalues to determine the roots of the\n// polynomial.\n//\n// This function returns true on success, false otherwise.\n// Failure indicates that the polynomial is invalid (of size 0) or\n// that the eigenvalues of the companion matrix could not be computed.\n// On failure, a more detailed message will be written to LOG(ERROR).\n// If real is not NULL, the real parts of the roots will be returned in it.\n// Likewise, if imaginary is not NULL, imaginary parts will be returned in it.\nbool FindPolynomialRoots(const Vector& polynomial,\n                         Vector* real,\n                         Vector* imaginary);\n\n// Return the derivative of the given polynomial. It is assumed that\n// the input polynomial is at least of degree zero.\nVector DifferentiatePolynomial(const Vector& polynomial);\n\n// Find the minimum value of the polynomial in the interval [x_min,\n// x_max]. The minimum is obtained by computing all the roots of the\n// derivative of the input polynomial. All real roots within the\n// interval [x_min, x_max] are considered as well as the end points\n// x_min and x_max. Since polynomials are differentiable functions,\n// this ensures that the true minimum is found.\nvoid MinimizePolynomial(const Vector& polynomial,\n                        double x_min,\n                        double x_max,\n                        double* optimal_x,\n                        double* optimal_value);\n\n// Given a set of function value and/or gradient samples, find a\n// polynomial whose value and gradients are exactly equal to the ones\n// in samples.\n//\n// Generally speaking,\n//\n// degree = # values + # gradients - 1\n//\n// Of course its possible to sample a polynomial any number of times,\n// in which case, generally speaking the spurious higher order\n// coefficients will be zero.\nVector FindInterpolatingPolynomial(const std::vector<FunctionSample>& samples);\n\n// Interpolate the function described by samples with a polynomial,\n// and minimize it on the interval [x_min, x_max]. Depending on the\n// input samples, it is possible that the interpolation or the root\n// finding algorithms may fail due to numerical difficulties. But the\n// function is guaranteed to return its best guess of an answer, by\n// considering the samples and the end points as possible solutions.\nvoid MinimizeInterpolatingPolynomial(const std::vector<FunctionSample>& samples,\n                                     double x_min,\n                                     double x_max,\n                                     double* optimal_x,\n                                     double* optimal_value);\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_POLYNOMIAL_SOLVER_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/polynomial_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: moll.markus@arcor.de (Markus Moll)\n//         sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/polynomial.h\"\n\n#include <limits>\n#include <cmath>\n#include <cstddef>\n#include <algorithm>\n#include \"gtest/gtest.h\"\n#include \"ceres/function_sample.h\"\n#include \"ceres/test_util.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::vector;\n\nnamespace {\n\n// For IEEE-754 doubles, machine precision is about 2e-16.\nconst double kEpsilon = 1e-13;\nconst double kEpsilonLoose = 1e-9;\n\n// Return the constant polynomial p(x) = 1.23.\nVector ConstantPolynomial(double value) {\n  Vector poly(1);\n  poly(0) = value;\n  return poly;\n}\n\n// Return the polynomial p(x) = poly(x) * (x - root).\nVector AddRealRoot(const Vector& poly, double root) {\n  Vector poly2(poly.size() + 1);\n  poly2.setZero();\n  poly2.head(poly.size()) += poly;\n  poly2.tail(poly.size()) -= root * poly;\n  return poly2;\n}\n\n// Return the polynomial\n// p(x) = poly(x) * (x - real - imag*i) * (x - real + imag*i).\nVector AddComplexRootPair(const Vector& poly, double real, double imag) {\n  Vector poly2(poly.size() + 2);\n  poly2.setZero();\n  // Multiply poly by x^2 - 2real + abs(real,imag)^2\n  poly2.head(poly.size()) += poly;\n  poly2.segment(1, poly.size()) -= 2 * real * poly;\n  poly2.tail(poly.size()) += (real*real + imag*imag) * poly;\n  return poly2;\n}\n\n// Sort the entries in a vector.\n// Needed because the roots are not returned in sorted order.\nVector SortVector(const Vector& in) {\n  Vector out(in);\n  std::sort(out.data(), out.data() + out.size());\n  return out;\n}\n\n// Run a test with the polynomial defined by the N real roots in roots_real.\n// If use_real is false, NULL is passed as the real argument to\n// FindPolynomialRoots. If use_imaginary is false, NULL is passed as the\n// imaginary argument to FindPolynomialRoots.\ntemplate<int N>\nvoid RunPolynomialTestRealRoots(const double (&real_roots)[N],\n                                bool use_real,\n                                bool use_imaginary,\n                                double epsilon) {\n  Vector real;\n  Vector imaginary;\n  Vector poly = ConstantPolynomial(1.23);\n  for (int i = 0; i < N; ++i) {\n    poly = AddRealRoot(poly, real_roots[i]);\n  }\n  Vector* const real_ptr = use_real ? &real : NULL;\n  Vector* const imaginary_ptr = use_imaginary ? &imaginary : NULL;\n  bool success = FindPolynomialRoots(poly, real_ptr, imaginary_ptr);\n\n  EXPECT_EQ(success, true);\n  if (use_real) {\n    EXPECT_EQ(real.size(), N);\n    real = SortVector(real);\n    ExpectArraysClose(N, real.data(), real_roots, epsilon);\n  }\n  if (use_imaginary) {\n    EXPECT_EQ(imaginary.size(), N);\n    const Vector zeros = Vector::Zero(N);\n    ExpectArraysClose(N, imaginary.data(), zeros.data(), epsilon);\n  }\n}\n}  // namespace\n\nTEST(Polynomial, InvalidPolynomialOfZeroLengthIsRejected) {\n  // Vector poly(0) is an ambiguous constructor call, so\n  // use the constructor with explicit column count.\n  Vector poly(0, 1);\n  Vector real;\n  Vector imag;\n  bool success = FindPolynomialRoots(poly, &real, &imag);\n\n  EXPECT_EQ(success, false);\n}\n\nTEST(Polynomial, ConstantPolynomialReturnsNoRoots) {\n  Vector poly = ConstantPolynomial(1.23);\n  Vector real;\n  Vector imag;\n  bool success = FindPolynomialRoots(poly, &real, &imag);\n\n  EXPECT_EQ(success, true);\n  EXPECT_EQ(real.size(), 0);\n  EXPECT_EQ(imag.size(), 0);\n}\n\nTEST(Polynomial, LinearPolynomialWithPositiveRootWorks) {\n  const double roots[1] = { 42.42 };\n  RunPolynomialTestRealRoots(roots, true, true, kEpsilon);\n}\n\nTEST(Polynomial, LinearPolynomialWithNegativeRootWorks) {\n  const double roots[1] = { -42.42 };\n  RunPolynomialTestRealRoots(roots, true, true, kEpsilon);\n}\n\nTEST(Polynomial, QuadraticPolynomialWithPositiveRootsWorks) {\n  const double roots[2] = { 1.0, 42.42 };\n  RunPolynomialTestRealRoots(roots, true, true, kEpsilon);\n}\n\nTEST(Polynomial, QuadraticPolynomialWithOneNegativeRootWorks) {\n  const double roots[2] = { -42.42, 1.0 };\n  RunPolynomialTestRealRoots(roots, true, true, kEpsilon);\n}\n\nTEST(Polynomial, QuadraticPolynomialWithTwoNegativeRootsWorks) {\n  const double roots[2] = { -42.42, -1.0 };\n  RunPolynomialTestRealRoots(roots, true, true, kEpsilon);\n}\n\nTEST(Polynomial, QuadraticPolynomialWithCloseRootsWorks) {\n  const double roots[2] = { 42.42, 42.43 };\n  RunPolynomialTestRealRoots(roots, true, false, kEpsilonLoose);\n}\n\nTEST(Polynomial, QuadraticPolynomialWithComplexRootsWorks) {\n  Vector real;\n  Vector imag;\n\n  Vector poly = ConstantPolynomial(1.23);\n  poly = AddComplexRootPair(poly, 42.42, 4.2);\n  bool success = FindPolynomialRoots(poly, &real, &imag);\n\n  EXPECT_EQ(success, true);\n  EXPECT_EQ(real.size(), 2);\n  EXPECT_EQ(imag.size(), 2);\n  ExpectClose(real(0), 42.42, kEpsilon);\n  ExpectClose(real(1), 42.42, kEpsilon);\n  ExpectClose(std::abs(imag(0)), 4.2, kEpsilon);\n  ExpectClose(std::abs(imag(1)), 4.2, kEpsilon);\n  ExpectClose(std::abs(imag(0) + imag(1)), 0.0, kEpsilon);\n}\n\nTEST(Polynomial, QuarticPolynomialWorks) {\n  const double roots[4] = { 1.23e-4, 1.23e-1, 1.23e+2, 1.23e+5 };\n  RunPolynomialTestRealRoots(roots, true, true, kEpsilon);\n}\n\nTEST(Polynomial, QuarticPolynomialWithTwoClustersOfCloseRootsWorks) {\n  const double roots[4] = { 1.23e-1, 2.46e-1, 1.23e+5, 2.46e+5 };\n  RunPolynomialTestRealRoots(roots, true, true, kEpsilonLoose);\n}\n\nTEST(Polynomial, QuarticPolynomialWithTwoZeroRootsWorks) {\n  const double roots[4] = { -42.42, 0.0, 0.0, 42.42 };\n  RunPolynomialTestRealRoots(roots, true, true, 2 * kEpsilonLoose);\n}\n\nTEST(Polynomial, QuarticMonomialWorks) {\n  const double roots[4] = { 0.0, 0.0, 0.0, 0.0 };\n  RunPolynomialTestRealRoots(roots, true, true, kEpsilon);\n}\n\nTEST(Polynomial, NullPointerAsImaginaryPartWorks) {\n  const double roots[4] = { 1.23e-4, 1.23e-1, 1.23e+2, 1.23e+5 };\n  RunPolynomialTestRealRoots(roots, true, false, kEpsilon);\n}\n\nTEST(Polynomial, NullPointerAsRealPartWorks) {\n  const double roots[4] = { 1.23e-4, 1.23e-1, 1.23e+2, 1.23e+5 };\n  RunPolynomialTestRealRoots(roots, false, true, kEpsilon);\n}\n\nTEST(Polynomial, BothOutputArgumentsNullWorks) {\n  const double roots[4] = { 1.23e-4, 1.23e-1, 1.23e+2, 1.23e+5 };\n  RunPolynomialTestRealRoots(roots, false, false, kEpsilon);\n}\n\nTEST(Polynomial, DifferentiateConstantPolynomial) {\n  // p(x) = 1;\n  Vector polynomial(1);\n  polynomial(0) = 1.0;\n  const Vector derivative = DifferentiatePolynomial(polynomial);\n  EXPECT_EQ(derivative.rows(), 1);\n  EXPECT_EQ(derivative(0), 0);\n}\n\nTEST(Polynomial, DifferentiateQuadraticPolynomial) {\n  // p(x) = x^2 + 2x + 3;\n  Vector polynomial(3);\n  polynomial(0) = 1.0;\n  polynomial(1) = 2.0;\n  polynomial(2) = 3.0;\n\n  const Vector derivative = DifferentiatePolynomial(polynomial);\n  EXPECT_EQ(derivative.rows(), 2);\n  EXPECT_EQ(derivative(0), 2.0);\n  EXPECT_EQ(derivative(1), 2.0);\n}\n\nTEST(Polynomial, MinimizeConstantPolynomial) {\n  // p(x) = 1;\n  Vector polynomial(1);\n  polynomial(0) = 1.0;\n\n  double optimal_x = 0.0;\n  double optimal_value = 0.0;\n  double min_x = 0.0;\n  double max_x = 1.0;\n  MinimizePolynomial(polynomial, min_x, max_x, &optimal_x, &optimal_value);\n\n  EXPECT_EQ(optimal_value, 1.0);\n  EXPECT_LE(optimal_x, max_x);\n  EXPECT_GE(optimal_x, min_x);\n}\n\nTEST(Polynomial, MinimizeLinearPolynomial) {\n  // p(x) = x - 2\n  Vector polynomial(2);\n\n  polynomial(0) = 1.0;\n  polynomial(1) = 2.0;\n\n  double optimal_x = 0.0;\n  double optimal_value = 0.0;\n  double min_x = 0.0;\n  double max_x = 1.0;\n  MinimizePolynomial(polynomial, min_x, max_x, &optimal_x, &optimal_value);\n\n  EXPECT_EQ(optimal_x, 0.0);\n  EXPECT_EQ(optimal_value, 2.0);\n}\n\n\nTEST(Polynomial, MinimizeQuadraticPolynomial) {\n  // p(x) = x^2 - 3 x + 2\n  // min_x = 3/2\n  // min_value = -1/4;\n  Vector polynomial(3);\n  polynomial(0) = 1.0;\n  polynomial(1) = -3.0;\n  polynomial(2) = 2.0;\n\n  double optimal_x = 0.0;\n  double optimal_value = 0.0;\n  double min_x = -2.0;\n  double max_x = 2.0;\n  MinimizePolynomial(polynomial, min_x, max_x, &optimal_x, &optimal_value);\n  EXPECT_EQ(optimal_x, 3.0/2.0);\n  EXPECT_EQ(optimal_value, -1.0/4.0);\n\n  min_x = -2.0;\n  max_x = 1.0;\n  MinimizePolynomial(polynomial, min_x, max_x, &optimal_x, &optimal_value);\n  EXPECT_EQ(optimal_x, 1.0);\n  EXPECT_EQ(optimal_value, 0.0);\n\n  min_x = 2.0;\n  max_x = 3.0;\n  MinimizePolynomial(polynomial, min_x, max_x, &optimal_x, &optimal_value);\n  EXPECT_EQ(optimal_x, 2.0);\n  EXPECT_EQ(optimal_value, 0.0);\n}\n\nTEST(Polymomial, ConstantInterpolatingPolynomial) {\n  // p(x) = 1.0\n  Vector true_polynomial(1);\n  true_polynomial << 1.0;\n\n  vector<FunctionSample> samples;\n  FunctionSample sample;\n  sample.x = 1.0;\n  sample.value = 1.0;\n  sample.value_is_valid = true;\n  samples.push_back(sample);\n\n  const Vector polynomial = FindInterpolatingPolynomial(samples);\n  EXPECT_NEAR((true_polynomial - polynomial).norm(), 0.0, 1e-15);\n}\n\nTEST(Polynomial, LinearInterpolatingPolynomial) {\n  // p(x) = 2x - 1\n  Vector true_polynomial(2);\n  true_polynomial << 2.0, -1.0;\n\n  vector<FunctionSample> samples;\n  FunctionSample sample;\n  sample.x = 1.0;\n  sample.value = 1.0;\n  sample.value_is_valid = true;\n  sample.gradient = 2.0;\n  sample.gradient_is_valid = true;\n  samples.push_back(sample);\n\n  const Vector polynomial = FindInterpolatingPolynomial(samples);\n  EXPECT_NEAR((true_polynomial - polynomial).norm(), 0.0, 1e-15);\n}\n\nTEST(Polynomial, QuadraticInterpolatingPolynomial) {\n  // p(x) = 2x^2 + 3x + 2\n  Vector true_polynomial(3);\n  true_polynomial << 2.0, 3.0, 2.0;\n\n  vector<FunctionSample> samples;\n  {\n    FunctionSample sample;\n    sample.x = 1.0;\n    sample.value = 7.0;\n    sample.value_is_valid = true;\n    sample.gradient = 7.0;\n    sample.gradient_is_valid = true;\n    samples.push_back(sample);\n  }\n\n  {\n    FunctionSample sample;\n    sample.x = -3.0;\n    sample.value = 11.0;\n    sample.value_is_valid = true;\n    samples.push_back(sample);\n  }\n\n  Vector polynomial = FindInterpolatingPolynomial(samples);\n  EXPECT_NEAR((true_polynomial - polynomial).norm(), 0.0, 1e-15);\n}\n\nTEST(Polynomial, DeficientCubicInterpolatingPolynomial) {\n  // p(x) = 2x^2 + 3x + 2\n  Vector true_polynomial(4);\n  true_polynomial << 0.0, 2.0, 3.0, 2.0;\n\n  vector<FunctionSample> samples;\n  {\n    FunctionSample sample;\n    sample.x = 1.0;\n    sample.value = 7.0;\n    sample.value_is_valid = true;\n    sample.gradient = 7.0;\n    sample.gradient_is_valid = true;\n    samples.push_back(sample);\n  }\n\n  {\n    FunctionSample sample;\n    sample.x = -3.0;\n    sample.value = 11.0;\n    sample.value_is_valid = true;\n    sample.gradient = -9;\n    sample.gradient_is_valid = true;\n    samples.push_back(sample);\n  }\n\n  const Vector polynomial = FindInterpolatingPolynomial(samples);\n  EXPECT_NEAR((true_polynomial - polynomial).norm(), 0.0, 1e-14);\n}\n\n\nTEST(Polynomial, CubicInterpolatingPolynomialFromValues) {\n  // p(x) = x^3 + 2x^2 + 3x + 2\n  Vector true_polynomial(4);\n  true_polynomial << 1.0, 2.0, 3.0, 2.0;\n\n  vector<FunctionSample> samples;\n  {\n    FunctionSample sample;\n    sample.x = 1.0;\n    sample.value = EvaluatePolynomial(true_polynomial, sample.x);\n    sample.value_is_valid = true;\n    samples.push_back(sample);\n  }\n\n  {\n    FunctionSample sample;\n    sample.x = -3.0;\n    sample.value = EvaluatePolynomial(true_polynomial, sample.x);\n    sample.value_is_valid = true;\n    samples.push_back(sample);\n  }\n\n  {\n    FunctionSample sample;\n    sample.x = 2.0;\n    sample.value = EvaluatePolynomial(true_polynomial, sample.x);\n    sample.value_is_valid = true;\n    samples.push_back(sample);\n  }\n\n  {\n    FunctionSample sample;\n    sample.x = 0.0;\n    sample.value = EvaluatePolynomial(true_polynomial, sample.x);\n    sample.value_is_valid = true;\n    samples.push_back(sample);\n  }\n\n  const Vector polynomial = FindInterpolatingPolynomial(samples);\n  EXPECT_NEAR((true_polynomial - polynomial).norm(), 0.0, 1e-14);\n}\n\nTEST(Polynomial, CubicInterpolatingPolynomialFromValuesAndOneGradient) {\n  // p(x) = x^3 + 2x^2 + 3x + 2\n  Vector true_polynomial(4);\n  true_polynomial << 1.0, 2.0, 3.0, 2.0;\n  Vector true_gradient_polynomial = DifferentiatePolynomial(true_polynomial);\n\n  vector<FunctionSample> samples;\n  {\n    FunctionSample sample;\n    sample.x = 1.0;\n    sample.value = EvaluatePolynomial(true_polynomial, sample.x);\n    sample.value_is_valid = true;\n    samples.push_back(sample);\n  }\n\n  {\n    FunctionSample sample;\n    sample.x = -3.0;\n    sample.value = EvaluatePolynomial(true_polynomial, sample.x);\n    sample.value_is_valid = true;\n    samples.push_back(sample);\n  }\n\n  {\n    FunctionSample sample;\n    sample.x = 2.0;\n    sample.value = EvaluatePolynomial(true_polynomial, sample.x);\n    sample.value_is_valid = true;\n    sample.gradient = EvaluatePolynomial(true_gradient_polynomial, sample.x);\n    sample.gradient_is_valid = true;\n    samples.push_back(sample);\n  }\n\n  const Vector polynomial = FindInterpolatingPolynomial(samples);\n  EXPECT_NEAR((true_polynomial - polynomial).norm(), 0.0, 1e-14);\n}\n\nTEST(Polynomial, CubicInterpolatingPolynomialFromValuesAndGradients) {\n  // p(x) = x^3 + 2x^2 + 3x + 2\n  Vector true_polynomial(4);\n  true_polynomial << 1.0, 2.0, 3.0, 2.0;\n  Vector true_gradient_polynomial = DifferentiatePolynomial(true_polynomial);\n\n  vector<FunctionSample> samples;\n  {\n    FunctionSample sample;\n    sample.x = -3.0;\n    sample.value = EvaluatePolynomial(true_polynomial, sample.x);\n    sample.value_is_valid = true;\n    sample.gradient = EvaluatePolynomial(true_gradient_polynomial, sample.x);\n    sample.gradient_is_valid = true;\n    samples.push_back(sample);\n  }\n\n  {\n    FunctionSample sample;\n    sample.x = 2.0;\n    sample.value = EvaluatePolynomial(true_polynomial, sample.x);\n    sample.value_is_valid = true;\n    sample.gradient = EvaluatePolynomial(true_gradient_polynomial, sample.x);\n    sample.gradient_is_valid = true;\n    samples.push_back(sample);\n  }\n\n  const Vector polynomial = FindInterpolatingPolynomial(samples);\n  EXPECT_NEAR((true_polynomial - polynomial).norm(), 0.0, 1e-14);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/preconditioner.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/preconditioner.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nPreconditioner::~Preconditioner() {\n}\n\nPreconditionerType Preconditioner::PreconditionerForZeroEBlocks(\n    PreconditionerType preconditioner_type) {\n  if (preconditioner_type == SCHUR_JACOBI ||\n      preconditioner_type == CLUSTER_JACOBI ||\n      preconditioner_type == CLUSTER_TRIDIAGONAL) {\n    return JACOBI;\n  }\n  return preconditioner_type;\n}\n\nSparseMatrixPreconditionerWrapper::SparseMatrixPreconditionerWrapper(\n    const SparseMatrix* matrix)\n    : matrix_(matrix) {\n  CHECK(matrix != nullptr);\n}\n\nSparseMatrixPreconditionerWrapper::~SparseMatrixPreconditionerWrapper() {\n}\n\nbool SparseMatrixPreconditionerWrapper::UpdateImpl(const SparseMatrix& A,\n                                                   const double* D) {\n  return true;\n}\n\nvoid SparseMatrixPreconditionerWrapper::RightMultiply(const double* x,\n                                                      double* y) const {\n  matrix_->RightMultiply(x, y);\n}\n\nint  SparseMatrixPreconditionerWrapper::num_rows() const {\n  return matrix_->num_rows();\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/preconditioner.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_PRECONDITIONER_H_\n#define CERES_INTERNAL_PRECONDITIONER_H_\n\n#include <vector>\n#include \"ceres/casts.h\"\n#include \"ceres/compressed_row_sparse_matrix.h\"\n#include \"ceres/context_impl.h\"\n#include \"ceres/linear_operator.h\"\n#include \"ceres/sparse_matrix.h\"\n#include \"ceres/types.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass BlockSparseMatrix;\nclass SparseMatrix;\n\nclass Preconditioner : public LinearOperator {\n public:\n  struct Options {\n    PreconditionerType type = JACOBI;\n    VisibilityClusteringType visibility_clustering_type = CANONICAL_VIEWS;\n    SparseLinearAlgebraLibraryType sparse_linear_algebra_library_type = SUITE_SPARSE;\n\n    // When using the subset preconditioner, all row blocks starting\n    // from this row block are used to construct the preconditioner.\n    //\n    // i.e., the Jacobian matrix A is horizontally partitioned as\n    //\n    // A = [P]\n    //     [Q]\n    //\n    // where P has subset_preconditioner_start_row_block row blocks,\n    // and the preconditioner is the inverse of the matrix Q'Q.\n    int subset_preconditioner_start_row_block = -1;\n\n    // See solver.h for information about these flags.\n    bool use_postordering = false;\n\n    // If possible, how many threads the preconditioner can use.\n    int num_threads = 1;\n\n    // Hints about the order in which the parameter blocks should be\n    // eliminated by the linear solver.\n    //\n    // For example if elimination_groups is a vector of size k, then\n    // the linear solver is informed that it should eliminate the\n    // parameter blocks 0 ... elimination_groups[0] - 1 first, and\n    // then elimination_groups[0] ... elimination_groups[1] - 1 and so\n    // on. Within each elimination group, the linear solver is free to\n    // choose how the parameter blocks are ordered. Different linear\n    // solvers have differing requirements on elimination_groups.\n    //\n    // The most common use is for Schur type solvers, where there\n    // should be at least two elimination groups and the first\n    // elimination group must form an independent set in the normal\n    // equations. The first elimination group corresponds to the\n    // num_eliminate_blocks in the Schur type solvers.\n    std::vector<int> elimination_groups;\n\n    // If the block sizes in a BlockSparseMatrix are fixed, then in\n    // some cases the Schur complement based solvers can detect and\n    // specialize on them.\n    //\n    // It is expected that these parameters are set programmatically\n    // rather than manually.\n    //\n    // Please see schur_complement_solver.h and schur_eliminator.h for\n    // more details.\n    int row_block_size = Eigen::Dynamic;\n    int e_block_size = Eigen::Dynamic;\n    int f_block_size = Eigen::Dynamic;\n\n    ContextImpl* context = nullptr;\n  };\n\n  // If the optimization problem is such that there are no remaining\n  // e-blocks, ITERATIVE_SCHUR with a Schur type preconditioner cannot\n  // be used. This function returns JACOBI if a preconditioner for\n  // ITERATIVE_SCHUR is used. The input preconditioner_type is\n  // returned otherwise.\n  static PreconditionerType PreconditionerForZeroEBlocks(\n      PreconditionerType preconditioner_type);\n\n  virtual ~Preconditioner();\n\n  // Update the numerical value of the preconditioner for the linear\n  // system:\n  //\n  //  |   A   | x = |b|\n  //  |diag(D)|     |0|\n  //\n  // for some vector b. It is important that the matrix A have the\n  // same block structure as the one used to construct this object.\n  //\n  // D can be NULL, in which case its interpreted as a diagonal matrix\n  // of size zero.\n  virtual bool Update(const LinearOperator& A, const double* D) = 0;\n\n  // LinearOperator interface. Since the operator is symmetric,\n  // LeftMultiply and num_cols are just calls to RightMultiply and\n  // num_rows respectively. Update() must be called before\n  // RightMultiply can be called.\n  void RightMultiply(const double* x, double* y) const override = 0;\n  void LeftMultiply(const double* x, double* y) const override {\n    return RightMultiply(x, y);\n  }\n\n  int num_rows() const override = 0;\n  int num_cols() const override {\n    return num_rows();\n  }\n};\n\n// This templated subclass of Preconditioner serves as a base class for\n// other preconditioners that depend on the particular matrix layout of\n// the underlying linear operator.\ntemplate <typename MatrixType>\nclass TypedPreconditioner : public Preconditioner {\n public:\n  virtual ~TypedPreconditioner() {}\n  bool Update(const LinearOperator& A, const double* D) final {\n    return UpdateImpl(*down_cast<const MatrixType*>(&A), D);\n  }\n\n private:\n  virtual bool UpdateImpl(const MatrixType& A, const double* D) = 0;\n};\n\n// Preconditioners that depend on access to the low level structure\n// of a SparseMatrix.\ntypedef TypedPreconditioner<SparseMatrix>              SparseMatrixPreconditioner;               // NOLINT\ntypedef TypedPreconditioner<BlockSparseMatrix>         BlockSparseMatrixPreconditioner;          // NOLINT\ntypedef TypedPreconditioner<CompressedRowSparseMatrix> CompressedRowSparseMatrixPreconditioner;  // NOLINT\n\n// Wrap a SparseMatrix object as a preconditioner.\nclass SparseMatrixPreconditionerWrapper : public SparseMatrixPreconditioner {\n public:\n  // Wrapper does NOT take ownership of the matrix pointer.\n  explicit SparseMatrixPreconditionerWrapper(const SparseMatrix* matrix);\n  virtual ~SparseMatrixPreconditionerWrapper();\n\n  // Preconditioner interface\n  virtual void RightMultiply(const double* x, double* y) const;\n  virtual int num_rows() const;\n\n private:\n  virtual bool UpdateImpl(const SparseMatrix& A, const double* D);\n  const SparseMatrix* matrix_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_PRECONDITIONER_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/preprocessor.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/callbacks.h\"\n#include \"ceres/gradient_checking_cost_function.h\"\n#include \"ceres/line_search_preprocessor.h\"\n#include \"ceres/parallel_for.h\"\n#include \"ceres/preprocessor.h\"\n#include \"ceres/problem_impl.h\"\n#include \"ceres/solver.h\"\n#include \"ceres/trust_region_preprocessor.h\"\n\nnamespace ceres {\nnamespace internal {\n\nPreprocessor* Preprocessor::Create(MinimizerType minimizer_type) {\n  if (minimizer_type == TRUST_REGION) {\n    return new TrustRegionPreprocessor;\n  }\n\n  if (minimizer_type == LINE_SEARCH) {\n    return new LineSearchPreprocessor;\n  }\n\n  LOG(FATAL) << \"Unknown minimizer_type: \" << minimizer_type;\n  return NULL;\n}\n\nPreprocessor::~Preprocessor() {\n}\n\nvoid ChangeNumThreadsIfNeeded(Solver::Options* options) {\n  const int num_threads_available = MaxNumThreadsAvailable();\n  if (options->num_threads > num_threads_available) {\n    LOG(WARNING)\n        << \"Specified options.num_threads: \" << options->num_threads\n        << \" exceeds maximum available from the threading model Ceres \"\n        << \"was compiled with: \" << num_threads_available\n        << \".  Bounding to maximum number available.\";\n    options->num_threads = num_threads_available;\n  }\n}\n\nvoid SetupCommonMinimizerOptions(PreprocessedProblem* pp) {\n  const Solver::Options& options = pp->options;\n  Program* program = pp->reduced_program.get();\n\n  // Assuming that the parameter blocks in the program have been\n  // reordered as needed, extract them into a contiguous vector.\n  pp->reduced_parameters.resize(program->NumParameters());\n  double* reduced_parameters = pp->reduced_parameters.data();\n  program->ParameterBlocksToStateVector(reduced_parameters);\n\n  Minimizer::Options& minimizer_options = pp->minimizer_options;\n  minimizer_options = Minimizer::Options(options);\n  minimizer_options.evaluator = pp->evaluator;\n\n  if (options.logging_type != SILENT) {\n    pp->logging_callback.reset(\n        new LoggingCallback(options.minimizer_type,\n                            options.minimizer_progress_to_stdout));\n    minimizer_options.callbacks.insert(minimizer_options.callbacks.begin(),\n                                       pp->logging_callback.get());\n  }\n\n  if (options.update_state_every_iteration) {\n    pp->state_updating_callback.reset(\n      new StateUpdatingCallback(program, reduced_parameters));\n    // This must get pushed to the front of the callbacks so that it\n    // is run before any of the user callbacks.\n    minimizer_options.callbacks.insert(minimizer_options.callbacks.begin(),\n                                       pp->state_updating_callback.get());\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/preprocessor.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_PREPROCESSOR_H_\n#define CERES_INTERNAL_PREPROCESSOR_H_\n\n#include <memory>\n#include <string>\n#include <vector>\n\n#include \"ceres/coordinate_descent_minimizer.h\"\n#include \"ceres/evaluator.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/internal/port.h\"\n#include \"ceres/iteration_callback.h\"\n#include \"ceres/linear_solver.h\"\n#include \"ceres/minimizer.h\"\n#include \"ceres/problem_impl.h\"\n#include \"ceres/program.h\"\n#include \"ceres/solver.h\"\n\nnamespace ceres {\nnamespace internal {\n\nstruct PreprocessedProblem;\n\n// Given a Problem object and a Solver::Options object indicating the\n// configuration of the solver, the job of the Preprocessor is to\n// analyze the Problem and perform the setup needed to solve it using\n// the desired Minimization algorithm. The setup involves removing\n// redundancies in the input problem (inactive parameter and residual\n// blocks), finding fill reducing orderings as needed, configuring and\n// creating various objects needed by the Minimizer to solve the\n// problem such as an evaluator, a linear solver etc.\n//\n// Each Minimizer (LineSearchMinimizer and TrustRegionMinimizer) comes\n// with a corresponding Preprocessor (LineSearchPreprocessor and\n// TrustRegionPreprocessor) that knows about its needs and performs\n// the preprocessing needed.\n//\n// The output of the Preprocessor is stored in a PreprocessedProblem\n// object.\nclass Preprocessor {\n public:\n  // Factory.\n  static Preprocessor* Create(MinimizerType minimizer_type);\n  virtual ~Preprocessor();\n  virtual bool Preprocess(const Solver::Options& options,\n                          ProblemImpl* problem,\n                          PreprocessedProblem* pp) = 0;\n};\n\n// A PreprocessedProblem is the result of running the Preprocessor on\n// a Problem and Solver::Options object.\nstruct PreprocessedProblem {\n  PreprocessedProblem()\n      : fixed_cost(0.0) {\n  }\n\n  std::string error;\n  Solver::Options options;\n  LinearSolver::Options linear_solver_options;\n  Evaluator::Options evaluator_options;\n  Minimizer::Options minimizer_options;\n\n  ProblemImpl* problem;\n  std::unique_ptr<ProblemImpl> gradient_checking_problem;\n  std::unique_ptr<Program> reduced_program;\n  std::unique_ptr<LinearSolver> linear_solver;\n  std::unique_ptr<IterationCallback> logging_callback;\n  std::unique_ptr<IterationCallback> state_updating_callback;\n\n  std::shared_ptr<Evaluator> evaluator;\n  std::shared_ptr<CoordinateDescentMinimizer> inner_iteration_minimizer;\n\n  std::vector<double*> removed_parameter_blocks;\n  Vector reduced_parameters;\n  double fixed_cost;\n};\n\n// Common functions used by various preprocessors.\n\n// If the user has specified a num_threads > the maximum number of threads\n// available from the compiled threading model, bound the number of threads\n// to the maximum.\nvoid ChangeNumThreadsIfNeeded(Solver::Options* options);\n\n// Extract the effective parameter vector from the preprocessed\n// problem and setup bits of the Minimizer::Options object that are\n// common to all Preprocessors.\nvoid SetupCommonMinimizerOptions(PreprocessedProblem* pp);\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_PREPROCESSOR_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/problem.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//         keir@google.com (Keir Mierle)\n\n#include \"ceres/problem.h\"\n\n#include <vector>\n\n#include \"ceres/crs_matrix.h\"\n#include \"ceres/problem_impl.h\"\n\nnamespace ceres {\n\nusing std::vector;\n\nProblem::Problem() : impl_(new internal::ProblemImpl) {}\nProblem::Problem(const Problem::Options& options)\n    : impl_(new internal::ProblemImpl(options)) {}\n// Not inline defaulted in declaration due to use of std::unique_ptr.\nProblem::Problem(Problem&&) = default;\nProblem& Problem::operator=(Problem&&) = default;\nProblem::~Problem() {}\n\nResidualBlockId Problem::AddResidualBlock(\n    CostFunction* cost_function,\n    LossFunction* loss_function,\n    const vector<double*>& parameter_blocks) {\n  return impl_->AddResidualBlock(cost_function,\n                                 loss_function,\n                                 parameter_blocks.data(),\n                                 static_cast<int>(parameter_blocks.size()));\n}\n\nResidualBlockId Problem::AddResidualBlock(CostFunction* cost_function,\n                                          LossFunction* loss_function,\n                                          double* const* const parameter_blocks,\n                                          int num_parameter_blocks) {\n  return impl_->AddResidualBlock(\n      cost_function, loss_function, parameter_blocks, num_parameter_blocks);\n}\n\nvoid Problem::AddParameterBlock(double* values, int size) {\n  impl_->AddParameterBlock(values, size);\n}\n\nvoid Problem::AddParameterBlock(double* values,\n                                int size,\n                                LocalParameterization* local_parameterization) {\n  impl_->AddParameterBlock(values, size, local_parameterization);\n}\n\nvoid Problem::RemoveResidualBlock(ResidualBlockId residual_block) {\n  impl_->RemoveResidualBlock(residual_block);\n}\n\nvoid Problem::RemoveParameterBlock(const double* values) {\n  impl_->RemoveParameterBlock(values);\n}\n\nvoid Problem::SetParameterBlockConstant(const double* values) {\n  impl_->SetParameterBlockConstant(values);\n}\n\nvoid Problem::SetParameterBlockVariable(double* values) {\n  impl_->SetParameterBlockVariable(values);\n}\n\nbool Problem::IsParameterBlockConstant(const double* values) const {\n  return impl_->IsParameterBlockConstant(values);\n}\n\nvoid Problem::SetParameterization(\n    double* values, LocalParameterization* local_parameterization) {\n  impl_->SetParameterization(values, local_parameterization);\n}\n\nconst LocalParameterization* Problem::GetParameterization(\n    const double* values) const {\n  return impl_->GetParameterization(values);\n}\n\nvoid Problem::SetParameterLowerBound(double* values,\n                                     int index,\n                                     double lower_bound) {\n  impl_->SetParameterLowerBound(values, index, lower_bound);\n}\n\nvoid Problem::SetParameterUpperBound(double* values,\n                                     int index,\n                                     double upper_bound) {\n  impl_->SetParameterUpperBound(values, index, upper_bound);\n}\n\ndouble Problem::GetParameterUpperBound(const double* values, int index) const {\n  return impl_->GetParameterUpperBound(values, index);\n}\n\ndouble Problem::GetParameterLowerBound(const double* values, int index) const {\n  return impl_->GetParameterLowerBound(values, index);\n}\n\nbool Problem::Evaluate(const EvaluateOptions& evaluate_options,\n                       double* cost,\n                       vector<double>* residuals,\n                       vector<double>* gradient,\n                       CRSMatrix* jacobian) {\n  return impl_->Evaluate(evaluate_options, cost, residuals, gradient, jacobian);\n}\n\nbool Problem::EvaluateResidualBlock(ResidualBlockId residual_block_id,\n                                    bool apply_loss_function,\n                                    double* cost,\n                                    double* residuals,\n                                    double** jacobians) const {\n  return impl_->EvaluateResidualBlock(\n      residual_block_id, apply_loss_function, cost, residuals, jacobians);\n}\n\nint Problem::NumParameterBlocks() const { return impl_->NumParameterBlocks(); }\n\nint Problem::NumParameters() const { return impl_->NumParameters(); }\n\nint Problem::NumResidualBlocks() const { return impl_->NumResidualBlocks(); }\n\nint Problem::NumResiduals() const { return impl_->NumResiduals(); }\n\nint Problem::ParameterBlockSize(const double* parameter_block) const {\n  return impl_->ParameterBlockSize(parameter_block);\n}\n\nint Problem::ParameterBlockLocalSize(const double* parameter_block) const {\n  return impl_->ParameterBlockLocalSize(parameter_block);\n}\n\nbool Problem::HasParameterBlock(const double* values) const {\n  return impl_->HasParameterBlock(values);\n}\n\nvoid Problem::GetParameterBlocks(vector<double*>* parameter_blocks) const {\n  impl_->GetParameterBlocks(parameter_blocks);\n}\n\nvoid Problem::GetResidualBlocks(\n    vector<ResidualBlockId>* residual_blocks) const {\n  impl_->GetResidualBlocks(residual_blocks);\n}\n\nvoid Problem::GetParameterBlocksForResidualBlock(\n    const ResidualBlockId residual_block,\n    vector<double*>* parameter_blocks) const {\n  impl_->GetParameterBlocksForResidualBlock(residual_block, parameter_blocks);\n}\n\nconst CostFunction* Problem::GetCostFunctionForResidualBlock(\n    const ResidualBlockId residual_block) const {\n  return impl_->GetCostFunctionForResidualBlock(residual_block);\n}\n\nconst LossFunction* Problem::GetLossFunctionForResidualBlock(\n    const ResidualBlockId residual_block) const {\n  return impl_->GetLossFunctionForResidualBlock(residual_block);\n}\n\nvoid Problem::GetResidualBlocksForParameterBlock(\n    const double* values, vector<ResidualBlockId>* residual_blocks) const {\n  impl_->GetResidualBlocksForParameterBlock(values, residual_blocks);\n}\n\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/problem_impl.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//         mierle@gmail.com (Keir Mierle)\n\n#include \"ceres/problem_impl.h\"\n\n#include <algorithm>\n#include <cstddef>\n#include <cstdint>\n#include <iterator>\n#include <memory>\n#include <set>\n#include <string>\n#include <utility>\n#include <vector>\n\n#include \"ceres/casts.h\"\n#include \"ceres/compressed_row_jacobian_writer.h\"\n#include \"ceres/compressed_row_sparse_matrix.h\"\n#include \"ceres/context_impl.h\"\n#include \"ceres/cost_function.h\"\n#include \"ceres/crs_matrix.h\"\n#include \"ceres/evaluation_callback.h\"\n#include \"ceres/evaluator.h\"\n#include \"ceres/internal/fixed_array.h\"\n#include \"ceres/internal/port.h\"\n#include \"ceres/loss_function.h\"\n#include \"ceres/map_util.h\"\n#include \"ceres/parameter_block.h\"\n#include \"ceres/program.h\"\n#include \"ceres/program_evaluator.h\"\n#include \"ceres/residual_block.h\"\n#include \"ceres/scratch_evaluate_preparer.h\"\n#include \"ceres/stl_util.h\"\n#include \"ceres/stringprintf.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::map;\nusing std::string;\nusing std::vector;\n\nnamespace {\n// Returns true if two regions of memory, a and b, with sizes size_a and size_b\n// respectively, overlap.\nbool RegionsAlias(const double* a, int size_a, const double* b, int size_b) {\n  return (a < b) ? b < (a + size_a) : a < (b + size_b);\n}\n\nvoid CheckForNoAliasing(double* existing_block,\n                        int existing_block_size,\n                        double* new_block,\n                        int new_block_size) {\n  CHECK(!RegionsAlias(\n      existing_block, existing_block_size, new_block, new_block_size))\n      << \"Aliasing detected between existing parameter block at memory \"\n      << \"location \" << existing_block << \" and has size \"\n      << existing_block_size << \" with new parameter \"\n      << \"block that has memory address \" << new_block << \" and would have \"\n      << \"size \" << new_block_size << \".\";\n}\n\ntemplate <typename KeyType>\nvoid DecrementValueOrDeleteKey(const KeyType key,\n                               std::map<KeyType, int>* container) {\n  auto it = container->find(key);\n  if (it->second == 1) {\n    delete key;\n    container->erase(it);\n  } else {\n    --it->second;\n  }\n}\n\ntemplate <typename ForwardIterator>\nvoid STLDeleteContainerPairFirstPointers(ForwardIterator begin,\n                                         ForwardIterator end) {\n  while (begin != end) {\n    delete begin->first;\n    ++begin;\n  }\n}\n\nvoid InitializeContext(Context* context,\n                       ContextImpl** context_impl,\n                       bool* context_impl_owned) {\n  if (context == nullptr) {\n    *context_impl_owned = true;\n    *context_impl = new ContextImpl;\n  } else {\n    *context_impl_owned = false;\n    *context_impl = down_cast<ContextImpl*>(context);\n  }\n}\n\n}  // namespace\n\nParameterBlock* ProblemImpl::InternalAddParameterBlock(double* values,\n                                                       int size) {\n  CHECK(values != nullptr) << \"Null pointer passed to AddParameterBlock \"\n                           << \"for a parameter with size \" << size;\n\n  // Ignore the request if there is a block for the given pointer already.\n  ParameterMap::iterator it = parameter_block_map_.find(values);\n  if (it != parameter_block_map_.end()) {\n    if (!options_.disable_all_safety_checks) {\n      int existing_size = it->second->Size();\n      CHECK(size == existing_size)\n          << \"Tried adding a parameter block with the same double pointer, \"\n          << values << \", twice, but with different block sizes. Original \"\n          << \"size was \" << existing_size << \" but new size is \" << size;\n    }\n    return it->second;\n  }\n\n  if (!options_.disable_all_safety_checks) {\n    // Before adding the parameter block, also check that it doesn't alias any\n    // other parameter blocks.\n    if (!parameter_block_map_.empty()) {\n      ParameterMap::iterator lb = parameter_block_map_.lower_bound(values);\n\n      // If lb is not the first block, check the previous block for aliasing.\n      if (lb != parameter_block_map_.begin()) {\n        ParameterMap::iterator previous = lb;\n        --previous;\n        CheckForNoAliasing(\n            previous->first, previous->second->Size(), values, size);\n      }\n\n      // If lb is not off the end, check lb for aliasing.\n      if (lb != parameter_block_map_.end()) {\n        CheckForNoAliasing(lb->first, lb->second->Size(), values, size);\n      }\n    }\n  }\n\n  // Pass the index of the new parameter block as well to keep the index in\n  // sync with the position of the parameter in the program's parameter vector.\n  ParameterBlock* new_parameter_block =\n      new ParameterBlock(values, size, program_->parameter_blocks_.size());\n\n  // For dynamic problems, add the list of dependent residual blocks, which is\n  // empty to start.\n  if (options_.enable_fast_removal) {\n    new_parameter_block->EnableResidualBlockDependencies();\n  }\n  parameter_block_map_[values] = new_parameter_block;\n  program_->parameter_blocks_.push_back(new_parameter_block);\n  return new_parameter_block;\n}\n\nvoid ProblemImpl::InternalRemoveResidualBlock(ResidualBlock* residual_block) {\n  CHECK(residual_block != nullptr);\n  // Perform no check on the validity of residual_block, that is handled in\n  // the public method: RemoveResidualBlock().\n\n  // If needed, remove the parameter dependencies on this residual block.\n  if (options_.enable_fast_removal) {\n    const int num_parameter_blocks_for_residual =\n        residual_block->NumParameterBlocks();\n    for (int i = 0; i < num_parameter_blocks_for_residual; ++i) {\n      residual_block->parameter_blocks()[i]->RemoveResidualBlock(\n          residual_block);\n    }\n\n    ResidualBlockSet::iterator it = residual_block_set_.find(residual_block);\n    residual_block_set_.erase(it);\n  }\n  DeleteBlockInVector(program_->mutable_residual_blocks(), residual_block);\n}\n\n// Deletes the residual block in question, assuming there are no other\n// references to it inside the problem (e.g. by another parameter). Referenced\n// cost and loss functions are tucked away for future deletion, since it is not\n// possible to know whether other parts of the problem depend on them without\n// doing a full scan.\nvoid ProblemImpl::DeleteBlock(ResidualBlock* residual_block) {\n  // The const casts here are legit, since ResidualBlock holds these\n  // pointers as const pointers but we have ownership of them and\n  // have the right to destroy them when the destructor is called.\n  CostFunction* cost_function =\n      const_cast<CostFunction*>(residual_block->cost_function());\n  if (options_.cost_function_ownership == TAKE_OWNERSHIP) {\n    DecrementValueOrDeleteKey(cost_function, &cost_function_ref_count_);\n  }\n\n  LossFunction* loss_function =\n      const_cast<LossFunction*>(residual_block->loss_function());\n  if (options_.loss_function_ownership == TAKE_OWNERSHIP &&\n      loss_function != nullptr) {\n    DecrementValueOrDeleteKey(loss_function, &loss_function_ref_count_);\n  }\n\n  delete residual_block;\n}\n\n// Deletes the parameter block in question, assuming there are no other\n// references to it inside the problem (e.g. by any residual blocks).\n// Referenced parameterizations are tucked away for future deletion, since it\n// is not possible to know whether other parts of the problem depend on them\n// without doing a full scan.\nvoid ProblemImpl::DeleteBlock(ParameterBlock* parameter_block) {\n  if (options_.local_parameterization_ownership == TAKE_OWNERSHIP &&\n      parameter_block->local_parameterization() != nullptr) {\n    local_parameterizations_to_delete_.push_back(\n        parameter_block->mutable_local_parameterization());\n  }\n  parameter_block_map_.erase(parameter_block->mutable_user_state());\n  delete parameter_block;\n}\n\nProblemImpl::ProblemImpl()\n    : options_(Problem::Options()), program_(new internal::Program) {\n  InitializeContext(options_.context, &context_impl_, &context_impl_owned_);\n}\n\nProblemImpl::ProblemImpl(const Problem::Options& options)\n    : options_(options), program_(new internal::Program) {\n  program_->evaluation_callback_ = options.evaluation_callback;\n  InitializeContext(options_.context, &context_impl_, &context_impl_owned_);\n}\n\nProblemImpl::~ProblemImpl() {\n  STLDeleteContainerPointers(program_->residual_blocks_.begin(),\n                             program_->residual_blocks_.end());\n\n  if (options_.cost_function_ownership == TAKE_OWNERSHIP) {\n    STLDeleteContainerPairFirstPointers(cost_function_ref_count_.begin(),\n                                        cost_function_ref_count_.end());\n  }\n\n  if (options_.loss_function_ownership == TAKE_OWNERSHIP) {\n    STLDeleteContainerPairFirstPointers(loss_function_ref_count_.begin(),\n                                        loss_function_ref_count_.end());\n  }\n\n  // Collect the unique parameterizations and delete the parameters.\n  for (int i = 0; i < program_->parameter_blocks_.size(); ++i) {\n    DeleteBlock(program_->parameter_blocks_[i]);\n  }\n\n  // Delete the owned parameterizations.\n  STLDeleteUniqueContainerPointers(local_parameterizations_to_delete_.begin(),\n                                   local_parameterizations_to_delete_.end());\n\n  if (context_impl_owned_) {\n    delete context_impl_;\n  }\n}\n\nResidualBlockId ProblemImpl::AddResidualBlock(\n    CostFunction* cost_function,\n    LossFunction* loss_function,\n    double* const* const parameter_blocks,\n    int num_parameter_blocks) {\n  CHECK(cost_function != nullptr);\n  CHECK_EQ(num_parameter_blocks, cost_function->parameter_block_sizes().size());\n\n  // Check the sizes match.\n  const vector<int32_t>& parameter_block_sizes =\n      cost_function->parameter_block_sizes();\n\n  if (!options_.disable_all_safety_checks) {\n    CHECK_EQ(parameter_block_sizes.size(), num_parameter_blocks)\n        << \"Number of blocks input is different than the number of blocks \"\n        << \"that the cost function expects.\";\n\n    // Check for duplicate parameter blocks.\n    vector<double*> sorted_parameter_blocks(\n        parameter_blocks, parameter_blocks + num_parameter_blocks);\n    sort(sorted_parameter_blocks.begin(), sorted_parameter_blocks.end());\n    const bool has_duplicate_items =\n        (std::adjacent_find(sorted_parameter_blocks.begin(),\n                            sorted_parameter_blocks.end()) !=\n         sorted_parameter_blocks.end());\n    if (has_duplicate_items) {\n      string blocks;\n      for (int i = 0; i < num_parameter_blocks; ++i) {\n        blocks += StringPrintf(\" %p \", parameter_blocks[i]);\n      }\n\n      LOG(FATAL) << \"Duplicate parameter blocks in a residual parameter \"\n                 << \"are not allowed. Parameter block pointers: [\" << blocks\n                 << \"]\";\n    }\n  }\n\n  // Add parameter blocks and convert the double*'s to parameter blocks.\n  vector<ParameterBlock*> parameter_block_ptrs(num_parameter_blocks);\n  for (int i = 0; i < num_parameter_blocks; ++i) {\n    parameter_block_ptrs[i] = InternalAddParameterBlock(\n        parameter_blocks[i], parameter_block_sizes[i]);\n  }\n\n  if (!options_.disable_all_safety_checks) {\n    // Check that the block sizes match the block sizes expected by the\n    // cost_function.\n    for (int i = 0; i < parameter_block_ptrs.size(); ++i) {\n      CHECK_EQ(cost_function->parameter_block_sizes()[i],\n               parameter_block_ptrs[i]->Size())\n          << \"The cost function expects parameter block \" << i << \" of size \"\n          << cost_function->parameter_block_sizes()[i]\n          << \" but was given a block of size \"\n          << parameter_block_ptrs[i]->Size();\n    }\n  }\n\n  ResidualBlock* new_residual_block =\n      new ResidualBlock(cost_function,\n                        loss_function,\n                        parameter_block_ptrs,\n                        program_->residual_blocks_.size());\n\n  // Add dependencies on the residual to the parameter blocks.\n  if (options_.enable_fast_removal) {\n    for (int i = 0; i < num_parameter_blocks; ++i) {\n      parameter_block_ptrs[i]->AddResidualBlock(new_residual_block);\n    }\n  }\n\n  program_->residual_blocks_.push_back(new_residual_block);\n\n  if (options_.enable_fast_removal) {\n    residual_block_set_.insert(new_residual_block);\n  }\n\n  if (options_.cost_function_ownership == TAKE_OWNERSHIP) {\n    // Increment the reference count, creating an entry in the table if\n    // needed. Note: C++ maps guarantee that new entries have default\n    // constructed values; this implies integers are zero initialized.\n    ++cost_function_ref_count_[cost_function];\n  }\n\n  if (options_.loss_function_ownership == TAKE_OWNERSHIP &&\n      loss_function != nullptr) {\n    ++loss_function_ref_count_[loss_function];\n  }\n\n  return new_residual_block;\n}\n\nvoid ProblemImpl::AddParameterBlock(double* values, int size) {\n  InternalAddParameterBlock(values, size);\n}\n\nvoid ProblemImpl::AddParameterBlock(\n    double* values, int size, LocalParameterization* local_parameterization) {\n  ParameterBlock* parameter_block = InternalAddParameterBlock(values, size);\n  if (local_parameterization != nullptr) {\n    parameter_block->SetParameterization(local_parameterization);\n  }\n}\n\n// Delete a block from a vector of blocks, maintaining the indexing invariant.\n// This is done in constant time by moving an element from the end of the\n// vector over the element to remove, then popping the last element. It\n// destroys the ordering in the interest of speed.\ntemplate <typename Block>\nvoid ProblemImpl::DeleteBlockInVector(vector<Block*>* mutable_blocks,\n                                      Block* block_to_remove) {\n  CHECK_EQ((*mutable_blocks)[block_to_remove->index()], block_to_remove)\n      << \"You found a Ceres bug! \\n\"\n      << \"Block requested: \" << block_to_remove->ToString() << \"\\n\"\n      << \"Block present: \"\n      << (*mutable_blocks)[block_to_remove->index()]->ToString();\n\n  // Prepare the to-be-moved block for the new, lower-in-index position by\n  // setting the index to the blocks final location.\n  Block* tmp = mutable_blocks->back();\n  tmp->set_index(block_to_remove->index());\n\n  // Overwrite the to-be-deleted residual block with the one at the end.\n  (*mutable_blocks)[block_to_remove->index()] = tmp;\n\n  DeleteBlock(block_to_remove);\n\n  // The block is gone so shrink the vector of blocks accordingly.\n  mutable_blocks->pop_back();\n}\n\nvoid ProblemImpl::RemoveResidualBlock(ResidualBlock* residual_block) {\n  CHECK(residual_block != nullptr);\n\n  // Verify that residual_block identifies a residual in the current problem.\n  const string residual_not_found_message = StringPrintf(\n      \"Residual block to remove: %p not found. This usually means \"\n      \"one of three things have happened:\\n\"\n      \" 1) residual_block is uninitialised and points to a random \"\n      \"area in memory.\\n\"\n      \" 2) residual_block represented a residual that was added to\"\n      \" the problem, but referred to a parameter block which has \"\n      \"since been removed, which removes all residuals which \"\n      \"depend on that parameter block, and was thus removed.\\n\"\n      \" 3) residual_block referred to a residual that has already \"\n      \"been removed from the problem (by the user).\",\n      residual_block);\n  if (options_.enable_fast_removal) {\n    CHECK(residual_block_set_.find(residual_block) != residual_block_set_.end())\n        << residual_not_found_message;\n  } else {\n    // Perform a full search over all current residuals.\n    CHECK(std::find(program_->residual_blocks().begin(),\n                    program_->residual_blocks().end(),\n                    residual_block) != program_->residual_blocks().end())\n        << residual_not_found_message;\n  }\n\n  InternalRemoveResidualBlock(residual_block);\n}\n\nvoid ProblemImpl::RemoveParameterBlock(const double* values) {\n  ParameterBlock* parameter_block = FindWithDefault(\n      parameter_block_map_, const_cast<double*>(values), nullptr);\n  if (parameter_block == nullptr) {\n    LOG(FATAL) << \"Parameter block not found: \" << values\n               << \". You must add the parameter block to the problem before \"\n               << \"it can be removed.\";\n  }\n\n  if (options_.enable_fast_removal) {\n    // Copy the dependent residuals from the parameter block because the set of\n    // dependents will change after each call to RemoveResidualBlock().\n    vector<ResidualBlock*> residual_blocks_to_remove(\n        parameter_block->mutable_residual_blocks()->begin(),\n        parameter_block->mutable_residual_blocks()->end());\n    for (int i = 0; i < residual_blocks_to_remove.size(); ++i) {\n      InternalRemoveResidualBlock(residual_blocks_to_remove[i]);\n    }\n  } else {\n    // Scan all the residual blocks to remove ones that depend on the parameter\n    // block. Do the scan backwards since the vector changes while iterating.\n    const int num_residual_blocks = NumResidualBlocks();\n    for (int i = num_residual_blocks - 1; i >= 0; --i) {\n      ResidualBlock* residual_block =\n          (*(program_->mutable_residual_blocks()))[i];\n      const int num_parameter_blocks = residual_block->NumParameterBlocks();\n      for (int j = 0; j < num_parameter_blocks; ++j) {\n        if (residual_block->parameter_blocks()[j] == parameter_block) {\n          InternalRemoveResidualBlock(residual_block);\n          // The parameter blocks are guaranteed unique.\n          break;\n        }\n      }\n    }\n  }\n  DeleteBlockInVector(program_->mutable_parameter_blocks(), parameter_block);\n}\n\nvoid ProblemImpl::SetParameterBlockConstant(const double* values) {\n  ParameterBlock* parameter_block = FindWithDefault(\n      parameter_block_map_, const_cast<double*>(values), nullptr);\n  if (parameter_block == nullptr) {\n    LOG(FATAL) << \"Parameter block not found: \" << values\n               << \". You must add the parameter block to the problem before \"\n               << \"it can be set constant.\";\n  }\n\n  parameter_block->SetConstant();\n}\n\nbool ProblemImpl::IsParameterBlockConstant(const double* values) const {\n  const ParameterBlock* parameter_block = FindWithDefault(\n      parameter_block_map_, const_cast<double*>(values), nullptr);\n  CHECK(parameter_block != nullptr)\n      << \"Parameter block not found: \" << values << \". You must add the \"\n      << \"parameter block to the problem before it can be queried.\";\n  return parameter_block->IsConstant();\n}\n\nvoid ProblemImpl::SetParameterBlockVariable(double* values) {\n  ParameterBlock* parameter_block =\n      FindWithDefault(parameter_block_map_, values, nullptr);\n  if (parameter_block == nullptr) {\n    LOG(FATAL) << \"Parameter block not found: \" << values\n               << \". You must add the parameter block to the problem before \"\n               << \"it can be set varying.\";\n  }\n\n  parameter_block->SetVarying();\n}\n\nvoid ProblemImpl::SetParameterization(\n    double* values, LocalParameterization* local_parameterization) {\n  ParameterBlock* parameter_block =\n      FindWithDefault(parameter_block_map_, values, nullptr);\n  if (parameter_block == nullptr) {\n    LOG(FATAL) << \"Parameter block not found: \" << values\n               << \". You must add the parameter block to the problem before \"\n               << \"you can set its local parameterization.\";\n  }\n\n  // If the parameter block already has a local parameterization and\n  // we are to take ownership of local parameterizations, then add it\n  // to local_parameterizations_to_delete_ for eventual deletion.\n  if (parameter_block->local_parameterization_ &&\n      options_.local_parameterization_ownership == TAKE_OWNERSHIP) {\n    local_parameterizations_to_delete_.push_back(\n        parameter_block->local_parameterization_);\n  }\n\n  parameter_block->SetParameterization(local_parameterization);\n}\n\nconst LocalParameterization* ProblemImpl::GetParameterization(\n    const double* values) const {\n  ParameterBlock* parameter_block = FindWithDefault(\n      parameter_block_map_, const_cast<double*>(values), nullptr);\n  if (parameter_block == nullptr) {\n    LOG(FATAL) << \"Parameter block not found: \" << values\n               << \". You must add the parameter block to the problem before \"\n               << \"you can get its local parameterization.\";\n  }\n\n  return parameter_block->local_parameterization();\n}\n\nvoid ProblemImpl::SetParameterLowerBound(double* values,\n                                         int index,\n                                         double lower_bound) {\n  ParameterBlock* parameter_block =\n      FindWithDefault(parameter_block_map_, values, nullptr);\n  if (parameter_block == nullptr) {\n    LOG(FATAL) << \"Parameter block not found: \" << values\n               << \". You must add the parameter block to the problem before \"\n               << \"you can set a lower bound on one of its components.\";\n  }\n\n  parameter_block->SetLowerBound(index, lower_bound);\n}\n\nvoid ProblemImpl::SetParameterUpperBound(double* values,\n                                         int index,\n                                         double upper_bound) {\n  ParameterBlock* parameter_block =\n      FindWithDefault(parameter_block_map_, values, nullptr);\n  if (parameter_block == nullptr) {\n    LOG(FATAL) << \"Parameter block not found: \" << values\n               << \". You must add the parameter block to the problem before \"\n               << \"you can set an upper bound on one of its components.\";\n  }\n  parameter_block->SetUpperBound(index, upper_bound);\n}\n\ndouble ProblemImpl::GetParameterLowerBound(const double* values,\n                                           int index) const {\n  ParameterBlock* parameter_block = FindWithDefault(\n      parameter_block_map_, const_cast<double*>(values), nullptr);\n  if (parameter_block == nullptr) {\n    LOG(FATAL) << \"Parameter block not found: \" << values\n               << \". You must add the parameter block to the problem before \"\n               << \"you can get the lower bound on one of its components.\";\n  }\n  return parameter_block->LowerBound(index);\n}\n\ndouble ProblemImpl::GetParameterUpperBound(const double* values,\n                                           int index) const {\n  ParameterBlock* parameter_block = FindWithDefault(\n      parameter_block_map_, const_cast<double*>(values), nullptr);\n  if (parameter_block == nullptr) {\n    LOG(FATAL) << \"Parameter block not found: \" << values\n               << \". You must add the parameter block to the problem before \"\n               << \"you can set an upper bound on one of its components.\";\n  }\n  return parameter_block->UpperBound(index);\n}\n\nbool ProblemImpl::Evaluate(const Problem::EvaluateOptions& evaluate_options,\n                           double* cost,\n                           vector<double>* residuals,\n                           vector<double>* gradient,\n                           CRSMatrix* jacobian) {\n  if (cost == nullptr && residuals == nullptr && gradient == nullptr &&\n      jacobian == nullptr) {\n    LOG(INFO) << \"Nothing to do.\";\n    return true;\n  }\n\n  // If the user supplied residual blocks, then use them, otherwise\n  // take the residual blocks from the underlying program.\n  Program program;\n  *program.mutable_residual_blocks() =\n      ((evaluate_options.residual_blocks.size() > 0)\n           ? evaluate_options.residual_blocks\n           : program_->residual_blocks());\n\n  const vector<double*>& parameter_block_ptrs =\n      evaluate_options.parameter_blocks;\n\n  vector<ParameterBlock*> variable_parameter_blocks;\n  vector<ParameterBlock*>& parameter_blocks =\n      *program.mutable_parameter_blocks();\n\n  if (parameter_block_ptrs.size() == 0) {\n    // The user did not provide any parameter blocks, so default to\n    // using all the parameter blocks in the order that they are in\n    // the underlying program object.\n    parameter_blocks = program_->parameter_blocks();\n  } else {\n    // The user supplied a vector of parameter blocks. Using this list\n    // requires a number of steps.\n\n    // 1. Convert double* into ParameterBlock*\n    parameter_blocks.resize(parameter_block_ptrs.size());\n    for (int i = 0; i < parameter_block_ptrs.size(); ++i) {\n      parameter_blocks[i] = FindWithDefault(\n          parameter_block_map_, parameter_block_ptrs[i], nullptr);\n      if (parameter_blocks[i] == nullptr) {\n        LOG(FATAL) << \"No known parameter block for \"\n                   << \"Problem::Evaluate::Options.parameter_blocks[\" << i << \"]\"\n                   << \" = \" << parameter_block_ptrs[i];\n      }\n    }\n\n    // 2. The user may have only supplied a subset of parameter\n    // blocks, so identify the ones that are not supplied by the user\n    // and are NOT constant. These parameter blocks are stored in\n    // variable_parameter_blocks.\n    //\n    // To ensure that the parameter blocks are not included in the\n    // columns of the jacobian, we need to make sure that they are\n    // constant during evaluation and then make them variable again\n    // after we are done.\n    vector<ParameterBlock*> all_parameter_blocks(program_->parameter_blocks());\n    vector<ParameterBlock*> included_parameter_blocks(\n        program.parameter_blocks());\n\n    vector<ParameterBlock*> excluded_parameter_blocks;\n    sort(all_parameter_blocks.begin(), all_parameter_blocks.end());\n    sort(included_parameter_blocks.begin(), included_parameter_blocks.end());\n    set_difference(all_parameter_blocks.begin(),\n                   all_parameter_blocks.end(),\n                   included_parameter_blocks.begin(),\n                   included_parameter_blocks.end(),\n                   back_inserter(excluded_parameter_blocks));\n\n    variable_parameter_blocks.reserve(excluded_parameter_blocks.size());\n    for (int i = 0; i < excluded_parameter_blocks.size(); ++i) {\n      ParameterBlock* parameter_block = excluded_parameter_blocks[i];\n      if (!parameter_block->IsConstant()) {\n        variable_parameter_blocks.push_back(parameter_block);\n        parameter_block->SetConstant();\n      }\n    }\n  }\n\n  // Setup the Parameter indices and offsets before an evaluator can\n  // be constructed and used.\n  program.SetParameterOffsetsAndIndex();\n\n  Evaluator::Options evaluator_options;\n\n  // Even though using SPARSE_NORMAL_CHOLESKY requires SuiteSparse or\n  // CXSparse, here it just being used for telling the evaluator to\n  // use a SparseRowCompressedMatrix for the jacobian. This is because\n  // the Evaluator decides the storage for the Jacobian based on the\n  // type of linear solver being used.\n  evaluator_options.linear_solver_type = SPARSE_NORMAL_CHOLESKY;\n#ifdef CERES_NO_THREADS\n  LOG_IF(WARNING, evaluate_options.num_threads > 1)\n      << \"No threading support is compiled into this binary; \"\n      << \"only evaluate_options.num_threads = 1 is supported. Switching \"\n      << \"to single threaded mode.\";\n  evaluator_options.num_threads = 1;\n#else\n  evaluator_options.num_threads = evaluate_options.num_threads;\n#endif  // CERES_NO_THREADS\n\n  // The main thread also does work so we only need to launch num_threads - 1.\n  context_impl_->EnsureMinimumThreads(evaluator_options.num_threads - 1);\n  evaluator_options.context = context_impl_;\n  evaluator_options.evaluation_callback =\n      program_->mutable_evaluation_callback();\n  std::unique_ptr<Evaluator> evaluator(\n      new ProgramEvaluator<ScratchEvaluatePreparer,\n                           CompressedRowJacobianWriter>(evaluator_options,\n                                                        &program));\n\n  if (residuals != nullptr) {\n    residuals->resize(evaluator->NumResiduals());\n  }\n\n  if (gradient != nullptr) {\n    gradient->resize(evaluator->NumEffectiveParameters());\n  }\n\n  std::unique_ptr<CompressedRowSparseMatrix> tmp_jacobian;\n  if (jacobian != nullptr) {\n    tmp_jacobian.reset(\n        down_cast<CompressedRowSparseMatrix*>(evaluator->CreateJacobian()));\n  }\n\n  // Point the state pointers to the user state pointers. This is\n  // needed so that we can extract a parameter vector which is then\n  // passed to Evaluator::Evaluate.\n  program.SetParameterBlockStatePtrsToUserStatePtrs();\n\n  // Copy the value of the parameter blocks into a vector, since the\n  // Evaluate::Evaluate method needs its input as such. The previous\n  // call to SetParameterBlockStatePtrsToUserStatePtrs ensures that\n  // these values are the ones corresponding to the actual state of\n  // the parameter blocks, rather than the temporary state pointer\n  // used for evaluation.\n  Vector parameters(program.NumParameters());\n  program.ParameterBlocksToStateVector(parameters.data());\n\n  double tmp_cost = 0;\n\n  Evaluator::EvaluateOptions evaluator_evaluate_options;\n  evaluator_evaluate_options.apply_loss_function =\n      evaluate_options.apply_loss_function;\n  bool status =\n      evaluator->Evaluate(evaluator_evaluate_options,\n                          parameters.data(),\n                          &tmp_cost,\n                          residuals != nullptr ? &(*residuals)[0] : nullptr,\n                          gradient != nullptr ? &(*gradient)[0] : nullptr,\n                          tmp_jacobian.get());\n\n  // Make the parameter blocks that were temporarily marked constant,\n  // variable again.\n  for (int i = 0; i < variable_parameter_blocks.size(); ++i) {\n    variable_parameter_blocks[i]->SetVarying();\n  }\n\n  if (status) {\n    if (cost != nullptr) {\n      *cost = tmp_cost;\n    }\n    if (jacobian != nullptr) {\n      tmp_jacobian->ToCRSMatrix(jacobian);\n    }\n  }\n\n  program_->SetParameterBlockStatePtrsToUserStatePtrs();\n  program_->SetParameterOffsetsAndIndex();\n  return status;\n}\n\nbool ProblemImpl::EvaluateResidualBlock(ResidualBlock* residual_block,\n                                        bool apply_loss_function,\n                                        double* cost,\n                                        double* residuals,\n                                        double** jacobians) const {\n  ParameterBlock* const* parameter_blocks = residual_block->parameter_blocks();\n  const int num_parameter_blocks = residual_block->NumParameterBlocks();\n  for (int i = 0; i < num_parameter_blocks; ++i) {\n    ParameterBlock* parameter_block = parameter_blocks[i];\n    if (parameter_block->IsConstant()) {\n      if (jacobians != nullptr && jacobians[i] != nullptr) {\n        LOG(ERROR) << \"Jacobian requested for parameter block : \" << i\n                   << \". But the parameter block is marked constant.\";\n        return false;\n      }\n    } else {\n      CHECK(parameter_block->SetState(parameter_block->user_state()))\n          << \"Congratulations, you found a Ceres bug! Please report this error \"\n          << \"to the developers.\";\n    }\n  }\n\n  double dummy_cost = 0.0;\n  FixedArray<double> scratch(residual_block->NumScratchDoublesForEvaluate());\n  return residual_block->Evaluate(apply_loss_function,\n                                  cost ? cost : &dummy_cost,\n                                  residuals,\n                                  jacobians,\n                                  scratch.data());\n}\n\nint ProblemImpl::NumParameterBlocks() const {\n  return program_->NumParameterBlocks();\n}\n\nint ProblemImpl::NumParameters() const { return program_->NumParameters(); }\n\nint ProblemImpl::NumResidualBlocks() const {\n  return program_->NumResidualBlocks();\n}\n\nint ProblemImpl::NumResiduals() const { return program_->NumResiduals(); }\n\nint ProblemImpl::ParameterBlockSize(const double* values) const {\n  ParameterBlock* parameter_block = FindWithDefault(\n      parameter_block_map_, const_cast<double*>(values), nullptr);\n  if (parameter_block == nullptr) {\n    LOG(FATAL) << \"Parameter block not found: \" << values\n               << \". You must add the parameter block to the problem before \"\n               << \"you can get its size.\";\n  }\n\n  return parameter_block->Size();\n}\n\nint ProblemImpl::ParameterBlockLocalSize(const double* values) const {\n  ParameterBlock* parameter_block = FindWithDefault(\n      parameter_block_map_, const_cast<double*>(values), nullptr);\n  if (parameter_block == nullptr) {\n    LOG(FATAL) << \"Parameter block not found: \" << values\n               << \". You must add the parameter block to the problem before \"\n               << \"you can get its local size.\";\n  }\n\n  return parameter_block->LocalSize();\n}\n\nbool ProblemImpl::HasParameterBlock(const double* parameter_block) const {\n  return (parameter_block_map_.find(const_cast<double*>(parameter_block)) !=\n          parameter_block_map_.end());\n}\n\nvoid ProblemImpl::GetParameterBlocks(vector<double*>* parameter_blocks) const {\n  CHECK(parameter_blocks != nullptr);\n  parameter_blocks->resize(0);\n  parameter_blocks->reserve(parameter_block_map_.size());\n  for (const auto& entry : parameter_block_map_) {\n    parameter_blocks->push_back(entry.first);\n  }\n}\n\nvoid ProblemImpl::GetResidualBlocks(\n    vector<ResidualBlockId>* residual_blocks) const {\n  CHECK(residual_blocks != nullptr);\n  *residual_blocks = program().residual_blocks();\n}\n\nvoid ProblemImpl::GetParameterBlocksForResidualBlock(\n    const ResidualBlockId residual_block,\n    vector<double*>* parameter_blocks) const {\n  int num_parameter_blocks = residual_block->NumParameterBlocks();\n  CHECK(parameter_blocks != nullptr);\n  parameter_blocks->resize(num_parameter_blocks);\n  for (int i = 0; i < num_parameter_blocks; ++i) {\n    (*parameter_blocks)[i] =\n        residual_block->parameter_blocks()[i]->mutable_user_state();\n  }\n}\n\nconst CostFunction* ProblemImpl::GetCostFunctionForResidualBlock(\n    const ResidualBlockId residual_block) const {\n  return residual_block->cost_function();\n}\n\nconst LossFunction* ProblemImpl::GetLossFunctionForResidualBlock(\n    const ResidualBlockId residual_block) const {\n  return residual_block->loss_function();\n}\n\nvoid ProblemImpl::GetResidualBlocksForParameterBlock(\n    const double* values, vector<ResidualBlockId>* residual_blocks) const {\n  ParameterBlock* parameter_block = FindWithDefault(\n      parameter_block_map_, const_cast<double*>(values), nullptr);\n  if (parameter_block == nullptr) {\n    LOG(FATAL) << \"Parameter block not found: \" << values\n               << \". You must add the parameter block to the problem before \"\n               << \"you can get the residual blocks that depend on it.\";\n  }\n\n  if (options_.enable_fast_removal) {\n    // In this case the residual blocks that depend on the parameter block are\n    // stored in the parameter block already, so just copy them out.\n    CHECK(residual_blocks != nullptr);\n    residual_blocks->resize(parameter_block->mutable_residual_blocks()->size());\n    std::copy(parameter_block->mutable_residual_blocks()->begin(),\n              parameter_block->mutable_residual_blocks()->end(),\n              residual_blocks->begin());\n    return;\n  }\n\n  // Find residual blocks that depend on the parameter block.\n  CHECK(residual_blocks != nullptr);\n  residual_blocks->clear();\n  const int num_residual_blocks = NumResidualBlocks();\n  for (int i = 0; i < num_residual_blocks; ++i) {\n    ResidualBlock* residual_block = (*(program_->mutable_residual_blocks()))[i];\n    const int num_parameter_blocks = residual_block->NumParameterBlocks();\n    for (int j = 0; j < num_parameter_blocks; ++j) {\n      if (residual_block->parameter_blocks()[j] == parameter_block) {\n        residual_blocks->push_back(residual_block);\n        // The parameter blocks are guaranteed unique.\n        break;\n      }\n    }\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/problem_impl.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n//\n// This is the implementation of the public Problem API. The pointer to\n// implementation (PIMPL) idiom makes it possible for Ceres internal code to\n// refer to the private data members without needing to exposing it to the\n// world. An alternative to PIMPL is to have a factory which returns instances\n// of a virtual base class; while that approach would work, it requires clients\n// to always put a Problem object into a scoped pointer; this needlessly muddies\n// client code for little benefit. Therefore, the PIMPL comprise was chosen.\n\n#ifndef CERES_PUBLIC_PROBLEM_IMPL_H_\n#define CERES_PUBLIC_PROBLEM_IMPL_H_\n\n#include <array>\n#include <map>\n#include <memory>\n#include <unordered_set>\n#include <vector>\n\n#include \"ceres/context_impl.h\"\n#include \"ceres/internal/port.h\"\n#include \"ceres/problem.h\"\n#include \"ceres/types.h\"\n\nnamespace ceres {\n\nclass CostFunction;\nclass EvaluationCallback;\nclass LossFunction;\nclass LocalParameterization;\nstruct CRSMatrix;\n\nnamespace internal {\n\nclass Program;\nclass ResidualBlock;\n\nclass ProblemImpl {\n public:\n  typedef std::map<double*, ParameterBlock*> ParameterMap;\n  typedef std::unordered_set<ResidualBlock*> ResidualBlockSet;\n  typedef std::map<CostFunction*, int> CostFunctionRefCount;\n  typedef std::map<LossFunction*, int> LossFunctionRefCount;\n\n  ProblemImpl();\n  explicit ProblemImpl(const Problem::Options& options);\n  ProblemImpl(const ProblemImpl&) = delete;\n  void operator=(const ProblemImpl&) = delete;\n\n  ~ProblemImpl();\n\n  // See the public problem.h file for description of these methods.\n  ResidualBlockId AddResidualBlock(CostFunction* cost_function,\n                                   LossFunction* loss_function,\n                                   double* const* const parameter_blocks,\n                                   int num_parameter_blocks);\n\n  template <typename... Ts>\n  ResidualBlockId AddResidualBlock(CostFunction* cost_function,\n                                   LossFunction* loss_function,\n                                   double* x0,\n                                   Ts*... xs) {\n    const std::array<double*, sizeof...(Ts) + 1> parameter_blocks{{x0, xs...}};\n    return AddResidualBlock(cost_function,\n                            loss_function,\n                            parameter_blocks.data(),\n                            static_cast<int>(parameter_blocks.size()));\n  }\n\n  void AddParameterBlock(double* values, int size);\n  void AddParameterBlock(double* values,\n                         int size,\n                         LocalParameterization* local_parameterization);\n\n  void RemoveResidualBlock(ResidualBlock* residual_block);\n  void RemoveParameterBlock(const double* values);\n\n  void SetParameterBlockConstant(const double* values);\n  void SetParameterBlockVariable(double* values);\n  bool IsParameterBlockConstant(const double* values) const;\n\n  void SetParameterization(double* values,\n                           LocalParameterization* local_parameterization);\n  const LocalParameterization* GetParameterization(const double* values) const;\n\n  void SetParameterLowerBound(double* values, int index, double lower_bound);\n  void SetParameterUpperBound(double* values, int index, double upper_bound);\n  double GetParameterLowerBound(const double* values, int index) const;\n  double GetParameterUpperBound(const double* values, int index) const;\n\n  bool Evaluate(const Problem::EvaluateOptions& options,\n                double* cost,\n                std::vector<double>* residuals,\n                std::vector<double>* gradient,\n                CRSMatrix* jacobian);\n\n  bool EvaluateResidualBlock(ResidualBlock* residual_block,\n                             bool apply_loss_function,\n                             double* cost,\n                             double* residuals,\n                             double** jacobians) const;\n\n  int NumParameterBlocks() const;\n  int NumParameters() const;\n  int NumResidualBlocks() const;\n  int NumResiduals() const;\n\n  int ParameterBlockSize(const double* parameter_block) const;\n  int ParameterBlockLocalSize(const double* parameter_block) const;\n\n  bool HasParameterBlock(const double* parameter_block) const;\n\n  void GetParameterBlocks(std::vector<double*>* parameter_blocks) const;\n  void GetResidualBlocks(std::vector<ResidualBlockId>* residual_blocks) const;\n\n  void GetParameterBlocksForResidualBlock(\n      const ResidualBlockId residual_block,\n      std::vector<double*>* parameter_blocks) const;\n\n  const CostFunction* GetCostFunctionForResidualBlock(\n      const ResidualBlockId residual_block) const;\n  const LossFunction* GetLossFunctionForResidualBlock(\n      const ResidualBlockId residual_block) const;\n\n  void GetResidualBlocksForParameterBlock(\n      const double* values,\n      std::vector<ResidualBlockId>* residual_blocks) const;\n\n  const Program& program() const { return *program_; }\n  Program* mutable_program() { return program_.get(); }\n\n  const ParameterMap& parameter_map() const { return parameter_block_map_; }\n  const ResidualBlockSet& residual_block_set() const {\n    CHECK(options_.enable_fast_removal)\n        << \"Fast removal not enabled, residual_block_set is not maintained.\";\n    return residual_block_set_;\n  }\n\n  ContextImpl* context() { return context_impl_; }\n\n private:\n  ParameterBlock* InternalAddParameterBlock(double* values, int size);\n  void InternalRemoveResidualBlock(ResidualBlock* residual_block);\n\n  // Delete the arguments in question. These differ from the Remove* functions\n  // in that they do not clean up references to the block to delete; they\n  // merely delete them.\n  template <typename Block>\n  void DeleteBlockInVector(std::vector<Block*>* mutable_blocks,\n                           Block* block_to_remove);\n  void DeleteBlock(ResidualBlock* residual_block);\n  void DeleteBlock(ParameterBlock* parameter_block);\n\n  const Problem::Options options_;\n\n  bool context_impl_owned_;\n  ContextImpl* context_impl_;\n\n  // The mapping from user pointers to parameter blocks.\n  ParameterMap parameter_block_map_;\n\n  // Iff enable_fast_removal is enabled, contains the current residual blocks.\n  ResidualBlockSet residual_block_set_;\n\n  // The actual parameter and residual blocks.\n  std::unique_ptr<internal::Program> program_;\n\n  // When removing parameter blocks, parameterizations have ambiguous\n  // ownership. Instead of scanning the entire problem to see if the\n  // parameterization is shared with other parameter blocks, buffer\n  // them until destruction.\n  //\n  // TODO(keir): See if it makes sense to use sets instead.\n  std::vector<LocalParameterization*> local_parameterizations_to_delete_;\n\n  // For each cost function and loss function in the problem, a count\n  // of the number of residual blocks that refer to them. When the\n  // count goes to zero and the problem owns these objects, they are\n  // destroyed.\n  CostFunctionRefCount cost_function_ref_count_;\n  LossFunctionRefCount loss_function_ref_count_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_PUBLIC_PROBLEM_IMPL_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/problem_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//         keir@google.com (Keir Mierle)\n\n#include \"ceres/problem.h\"\n\n#include <memory>\n\n#include \"ceres/autodiff_cost_function.h\"\n#include \"ceres/casts.h\"\n#include \"ceres/cost_function.h\"\n#include \"ceres/crs_matrix.h\"\n#include \"ceres/evaluator_test_utils.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/local_parameterization.h\"\n#include \"ceres/loss_function.h\"\n#include \"ceres/map_util.h\"\n#include \"ceres/parameter_block.h\"\n#include \"ceres/problem_impl.h\"\n#include \"ceres/program.h\"\n#include \"ceres/sized_cost_function.h\"\n#include \"ceres/sparse_matrix.h\"\n#include \"ceres/types.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::vector;\n\n// The following three classes are for the purposes of defining\n// function signatures. They have dummy Evaluate functions.\n\n// Trivial cost function that accepts a single argument.\nclass UnaryCostFunction : public CostFunction {\n public:\n  UnaryCostFunction(int num_residuals, int32_t parameter_block_size) {\n    set_num_residuals(num_residuals);\n    mutable_parameter_block_sizes()->push_back(parameter_block_size);\n  }\n\n  virtual ~UnaryCostFunction() {}\n\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const final {\n    for (int i = 0; i < num_residuals(); ++i) {\n      residuals[i] = 1;\n    }\n    return true;\n  }\n};\n\n// Trivial cost function that accepts two arguments.\nclass BinaryCostFunction: public CostFunction {\n public:\n  BinaryCostFunction(int num_residuals,\n                     int32_t parameter_block1_size,\n                     int32_t parameter_block2_size) {\n    set_num_residuals(num_residuals);\n    mutable_parameter_block_sizes()->push_back(parameter_block1_size);\n    mutable_parameter_block_sizes()->push_back(parameter_block2_size);\n  }\n\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const final {\n    for (int i = 0; i < num_residuals(); ++i) {\n      residuals[i] = 2;\n    }\n    return true;\n  }\n};\n\n// Trivial cost function that accepts three arguments.\nclass TernaryCostFunction: public CostFunction {\n public:\n  TernaryCostFunction(int num_residuals,\n                      int32_t parameter_block1_size,\n                      int32_t parameter_block2_size,\n                      int32_t parameter_block3_size) {\n    set_num_residuals(num_residuals);\n    mutable_parameter_block_sizes()->push_back(parameter_block1_size);\n    mutable_parameter_block_sizes()->push_back(parameter_block2_size);\n    mutable_parameter_block_sizes()->push_back(parameter_block3_size);\n  }\n\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const final {\n    for (int i = 0; i < num_residuals(); ++i) {\n      residuals[i] = 3;\n    }\n    return true;\n  }\n};\n\n\nTEST(Problem, MoveConstructor) {\n  Problem src;\n  double x;\n  src.AddParameterBlock(&x, 1);\n  Problem dst(std::move(src));\n  EXPECT_TRUE(dst.HasParameterBlock(&x));\n}\n\nTEST(Problem, MoveAssignment) {\n  Problem src;\n  double x;\n  src.AddParameterBlock(&x, 1);\n  Problem dst;\n  dst = std::move(src);\n  EXPECT_TRUE(dst.HasParameterBlock(&x));\n}\n\nTEST(Problem, AddResidualWithNullCostFunctionDies) {\n  double x[3], y[4], z[5];\n\n  Problem problem;\n  problem.AddParameterBlock(x, 3);\n  problem.AddParameterBlock(y, 4);\n  problem.AddParameterBlock(z, 5);\n\n  EXPECT_DEATH_IF_SUPPORTED(problem.AddResidualBlock(NULL, NULL, x),\n                            \"cost_function != nullptr\");\n}\n\nTEST(Problem, AddResidualWithIncorrectNumberOfParameterBlocksDies) {\n  double x[3], y[4], z[5];\n\n  Problem problem;\n  problem.AddParameterBlock(x, 3);\n  problem.AddParameterBlock(y, 4);\n  problem.AddParameterBlock(z, 5);\n\n  // UnaryCostFunction takes only one parameter, but two are passed.\n  EXPECT_DEATH_IF_SUPPORTED(\n      problem.AddResidualBlock(new UnaryCostFunction(2, 3), NULL, x, y),\n      \"num_parameter_blocks\");\n}\n\nTEST(Problem, AddResidualWithDifferentSizesOnTheSameVariableDies) {\n  double x[3];\n\n  Problem problem;\n  problem.AddResidualBlock(new UnaryCostFunction(2, 3), NULL, x);\n  EXPECT_DEATH_IF_SUPPORTED(problem.AddResidualBlock(\n                                new UnaryCostFunction(\n                                    2, 4 /* 4 != 3 */), NULL, x),\n                            \"different block sizes\");\n}\n\nTEST(Problem, AddResidualWithDuplicateParametersDies) {\n  double x[3], z[5];\n\n  Problem problem;\n  EXPECT_DEATH_IF_SUPPORTED(problem.AddResidualBlock(\n                                new BinaryCostFunction(2, 3, 3), NULL, x, x),\n                            \"Duplicate parameter blocks\");\n  EXPECT_DEATH_IF_SUPPORTED(problem.AddResidualBlock(\n                                new TernaryCostFunction(1, 5, 3, 5),\n                                NULL, z, x, z),\n                            \"Duplicate parameter blocks\");\n}\n\nTEST(Problem, AddResidualWithIncorrectSizesOfParameterBlockDies) {\n  double x[3], y[4], z[5];\n\n  Problem problem;\n  problem.AddParameterBlock(x, 3);\n  problem.AddParameterBlock(y, 4);\n  problem.AddParameterBlock(z, 5);\n\n  // The cost function expects the size of the second parameter, z, to be 4\n  // instead of 5 as declared above. This is fatal.\n  EXPECT_DEATH_IF_SUPPORTED(problem.AddResidualBlock(\n      new BinaryCostFunction(2, 3, 4), NULL, x, z),\n               \"different block sizes\");\n}\n\nTEST(Problem, AddResidualAddsDuplicatedParametersOnlyOnce) {\n  double x[3], y[4], z[5];\n\n  Problem problem;\n  problem.AddResidualBlock(new UnaryCostFunction(2, 3), NULL, x);\n  problem.AddResidualBlock(new UnaryCostFunction(2, 3), NULL, x);\n  problem.AddResidualBlock(new UnaryCostFunction(2, 4), NULL, y);\n  problem.AddResidualBlock(new UnaryCostFunction(2, 5), NULL, z);\n\n  EXPECT_EQ(3, problem.NumParameterBlocks());\n  EXPECT_EQ(12, problem.NumParameters());\n}\n\nTEST(Problem, AddParameterWithDifferentSizesOnTheSameVariableDies) {\n  double x[3], y[4];\n\n  Problem problem;\n  problem.AddParameterBlock(x, 3);\n  problem.AddParameterBlock(y, 4);\n\n  EXPECT_DEATH_IF_SUPPORTED(problem.AddParameterBlock(x, 4),\n                            \"different block sizes\");\n}\n\nstatic double *IntToPtr(int i) {\n  return reinterpret_cast<double*>(sizeof(double) * i);  // NOLINT\n}\n\nTEST(Problem, AddParameterWithAliasedParametersDies) {\n  // Layout is\n  //\n  //   0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17\n  //                 [x] x  x  x  x          [y] y  y\n  //         o==o==o                 o==o==o           o==o\n  //               o--o--o     o--o--o     o--o  o--o--o\n  //\n  // Parameter block additions are tested as listed above; expected successful\n  // ones marked with o==o and aliasing ones marked with o--o.\n\n  Problem problem;\n  problem.AddParameterBlock(IntToPtr(5),  5);  // x\n  problem.AddParameterBlock(IntToPtr(13), 3);  // y\n\n  EXPECT_DEATH_IF_SUPPORTED(problem.AddParameterBlock(IntToPtr( 4), 2),\n                            \"Aliasing detected\");\n  EXPECT_DEATH_IF_SUPPORTED(problem.AddParameterBlock(IntToPtr( 4), 3),\n                            \"Aliasing detected\");\n  EXPECT_DEATH_IF_SUPPORTED(problem.AddParameterBlock(IntToPtr( 4), 9),\n                            \"Aliasing detected\");\n  EXPECT_DEATH_IF_SUPPORTED(problem.AddParameterBlock(IntToPtr( 8), 3),\n                            \"Aliasing detected\");\n  EXPECT_DEATH_IF_SUPPORTED(problem.AddParameterBlock(IntToPtr(12), 2),\n                            \"Aliasing detected\");\n  EXPECT_DEATH_IF_SUPPORTED(problem.AddParameterBlock(IntToPtr(14), 3),\n                            \"Aliasing detected\");\n\n  // These ones should work.\n  problem.AddParameterBlock(IntToPtr( 2), 3);\n  problem.AddParameterBlock(IntToPtr(10), 3);\n  problem.AddParameterBlock(IntToPtr(16), 2);\n\n  ASSERT_EQ(5, problem.NumParameterBlocks());\n}\n\nTEST(Problem, AddParameterIgnoresDuplicateCalls) {\n  double x[3], y[4];\n\n  Problem problem;\n  problem.AddParameterBlock(x, 3);\n  problem.AddParameterBlock(y, 4);\n\n  // Creating parameter blocks multiple times is ignored.\n  problem.AddParameterBlock(x, 3);\n  problem.AddResidualBlock(new UnaryCostFunction(2, 3), NULL, x);\n\n  // ... even repeatedly.\n  problem.AddParameterBlock(x, 3);\n  problem.AddResidualBlock(new UnaryCostFunction(2, 3), NULL, x);\n\n  // More parameters are fine.\n  problem.AddParameterBlock(y, 4);\n  problem.AddResidualBlock(new UnaryCostFunction(2, 4), NULL, y);\n\n  EXPECT_EQ(2, problem.NumParameterBlocks());\n  EXPECT_EQ(7, problem.NumParameters());\n}\n\nTEST(Problem, AddingParametersAndResidualsResultsInExpectedProblem) {\n  double x[3], y[4], z[5], w[4];\n\n  Problem problem;\n  problem.AddParameterBlock(x, 3);\n  EXPECT_EQ(1, problem.NumParameterBlocks());\n  EXPECT_EQ(3, problem.NumParameters());\n\n  problem.AddParameterBlock(y, 4);\n  EXPECT_EQ(2, problem.NumParameterBlocks());\n  EXPECT_EQ(7, problem.NumParameters());\n\n  problem.AddParameterBlock(z, 5);\n  EXPECT_EQ(3,  problem.NumParameterBlocks());\n  EXPECT_EQ(12, problem.NumParameters());\n\n  // Add a parameter that has a local parameterization.\n  w[0] = 1.0; w[1] = 0.0; w[2] = 0.0; w[3] = 0.0;\n  problem.AddParameterBlock(w, 4, new QuaternionParameterization);\n  EXPECT_EQ(4,  problem.NumParameterBlocks());\n  EXPECT_EQ(16, problem.NumParameters());\n\n  problem.AddResidualBlock(new UnaryCostFunction(2, 3), NULL, x);\n  problem.AddResidualBlock(new BinaryCostFunction(6, 5, 4) , NULL, z, y);\n  problem.AddResidualBlock(new BinaryCostFunction(3, 3, 5), NULL, x, z);\n  problem.AddResidualBlock(new BinaryCostFunction(7, 5, 3), NULL, z, x);\n  problem.AddResidualBlock(new TernaryCostFunction(1, 5, 3, 4), NULL, z, x, y);\n\n  const int total_residuals = 2 + 6 + 3 + 7 + 1;\n  EXPECT_EQ(problem.NumResidualBlocks(), 5);\n  EXPECT_EQ(problem.NumResiduals(), total_residuals);\n}\n\nclass DestructorCountingCostFunction : public SizedCostFunction<3, 4, 5> {\n public:\n  explicit DestructorCountingCostFunction(int *num_destructions)\n      : num_destructions_(num_destructions) {}\n\n  virtual ~DestructorCountingCostFunction() {\n    *num_destructions_ += 1;\n  }\n\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const final {\n    return true;\n  }\n\n private:\n  int* num_destructions_;\n};\n\nTEST(Problem, ReusedCostFunctionsAreOnlyDeletedOnce) {\n  double y[4], z[5];\n  int num_destructions = 0;\n\n  // Add a cost function multiple times and check to make sure that\n  // the destructor on the cost function is only called once.\n  {\n    Problem problem;\n    problem.AddParameterBlock(y, 4);\n    problem.AddParameterBlock(z, 5);\n\n    CostFunction* cost = new DestructorCountingCostFunction(&num_destructions);\n    problem.AddResidualBlock(cost, NULL, y, z);\n    problem.AddResidualBlock(cost, NULL, y, z);\n    problem.AddResidualBlock(cost, NULL, y, z);\n    EXPECT_EQ(3, problem.NumResidualBlocks());\n  }\n\n  // Check that the destructor was called only once.\n  CHECK_EQ(num_destructions, 1);\n}\n\nTEST(Problem, GetCostFunctionForResidualBlock) {\n  double x[3];\n  Problem problem;\n  CostFunction* cost_function = new UnaryCostFunction(2, 3);\n  const ResidualBlockId residual_block =\n      problem.AddResidualBlock(cost_function, NULL, x);\n  EXPECT_EQ(problem.GetCostFunctionForResidualBlock(residual_block),\n            cost_function);\n  EXPECT_TRUE(problem.GetLossFunctionForResidualBlock(residual_block) == NULL);\n}\n\nTEST(Problem, GetLossFunctionForResidualBlock) {\n  double x[3];\n  Problem problem;\n  CostFunction* cost_function = new UnaryCostFunction(2, 3);\n  LossFunction* loss_function = new TrivialLoss();\n  const ResidualBlockId residual_block =\n      problem.AddResidualBlock(cost_function, loss_function, x);\n  EXPECT_EQ(problem.GetCostFunctionForResidualBlock(residual_block),\n            cost_function);\n  EXPECT_EQ(problem.GetLossFunctionForResidualBlock(residual_block),\n            loss_function);\n}\n\nTEST(Problem, CostFunctionsAreDeletedEvenWithRemovals) {\n  double y[4], z[5], w[4];\n  int num_destructions = 0;\n  {\n    Problem problem;\n    problem.AddParameterBlock(y, 4);\n    problem.AddParameterBlock(z, 5);\n\n    CostFunction* cost_yz =\n        new DestructorCountingCostFunction(&num_destructions);\n    CostFunction* cost_wz =\n        new DestructorCountingCostFunction(&num_destructions);\n    ResidualBlock* r_yz = problem.AddResidualBlock(cost_yz, NULL, y, z);\n    ResidualBlock* r_wz = problem.AddResidualBlock(cost_wz, NULL, w, z);\n    EXPECT_EQ(2, problem.NumResidualBlocks());\n\n    problem.RemoveResidualBlock(r_yz);\n    CHECK_EQ(num_destructions, 1);\n    problem.RemoveResidualBlock(r_wz);\n    CHECK_EQ(num_destructions, 2);\n\n    EXPECT_EQ(0, problem.NumResidualBlocks());\n  }\n  CHECK_EQ(num_destructions, 2);\n}\n\n// Make the dynamic problem tests (e.g. for removing residual blocks)\n// parameterized on whether the low-latency mode is enabled or not.\n//\n// This tests against ProblemImpl instead of Problem in order to inspect the\n// state of the resulting Program; this is difficult with only the thin Problem\n// interface.\nstruct DynamicProblem : public ::testing::TestWithParam<bool> {\n  DynamicProblem() {\n    Problem::Options options;\n    options.enable_fast_removal = GetParam();\n    problem.reset(new ProblemImpl(options));\n  }\n\n  ParameterBlock* GetParameterBlock(int block) {\n    return problem->program().parameter_blocks()[block];\n  }\n  ResidualBlock* GetResidualBlock(int block) {\n    return problem->program().residual_blocks()[block];\n  }\n\n  bool HasResidualBlock(ResidualBlock* residual_block) {\n    bool have_residual_block = true;\n    if (GetParam()) {\n      have_residual_block &=\n          (problem->residual_block_set().find(residual_block) !=\n           problem->residual_block_set().end());\n    }\n    have_residual_block &=\n        find(problem->program().residual_blocks().begin(),\n             problem->program().residual_blocks().end(),\n             residual_block) != problem->program().residual_blocks().end();\n    return have_residual_block;\n  }\n\n  int NumResidualBlocks() {\n    // Verify that the hash set of residuals is maintained consistently.\n    if (GetParam()) {\n      EXPECT_EQ(problem->residual_block_set().size(),\n                problem->NumResidualBlocks());\n    }\n    return problem->NumResidualBlocks();\n  }\n\n  // The next block of functions until the end are only for testing the\n  // residual block removals.\n  void ExpectParameterBlockContainsResidualBlock(\n      double* values,\n      ResidualBlock* residual_block) {\n    ParameterBlock* parameter_block =\n        FindOrDie(problem->parameter_map(), values);\n    EXPECT_TRUE(ContainsKey(*(parameter_block->mutable_residual_blocks()),\n                            residual_block));\n  }\n\n  void ExpectSize(double* values, int size) {\n    ParameterBlock* parameter_block =\n        FindOrDie(problem->parameter_map(), values);\n    EXPECT_EQ(size, parameter_block->mutable_residual_blocks()->size());\n  }\n\n  // Degenerate case.\n  void ExpectParameterBlockContains(double* values) {\n    ExpectSize(values, 0);\n  }\n\n  void ExpectParameterBlockContains(double* values,\n                                    ResidualBlock* r1) {\n    ExpectSize(values, 1);\n    ExpectParameterBlockContainsResidualBlock(values, r1);\n  }\n\n  void ExpectParameterBlockContains(double* values,\n                                    ResidualBlock* r1,\n                                    ResidualBlock* r2) {\n    ExpectSize(values, 2);\n    ExpectParameterBlockContainsResidualBlock(values, r1);\n    ExpectParameterBlockContainsResidualBlock(values, r2);\n  }\n\n  void ExpectParameterBlockContains(double* values,\n                                    ResidualBlock* r1,\n                                    ResidualBlock* r2,\n                                    ResidualBlock* r3) {\n    ExpectSize(values, 3);\n    ExpectParameterBlockContainsResidualBlock(values, r1);\n    ExpectParameterBlockContainsResidualBlock(values, r2);\n    ExpectParameterBlockContainsResidualBlock(values, r3);\n  }\n\n  void ExpectParameterBlockContains(double* values,\n                                    ResidualBlock* r1,\n                                    ResidualBlock* r2,\n                                    ResidualBlock* r3,\n                                    ResidualBlock* r4) {\n    ExpectSize(values, 4);\n    ExpectParameterBlockContainsResidualBlock(values, r1);\n    ExpectParameterBlockContainsResidualBlock(values, r2);\n    ExpectParameterBlockContainsResidualBlock(values, r3);\n    ExpectParameterBlockContainsResidualBlock(values, r4);\n  }\n\n  std::unique_ptr<ProblemImpl> problem;\n  double y[4], z[5], w[3];\n};\n\nTEST(Problem, SetParameterBlockConstantWithUnknownPtrDies) {\n  double x[3];\n  double y[2];\n\n  Problem problem;\n  problem.AddParameterBlock(x, 3);\n\n  EXPECT_DEATH_IF_SUPPORTED(problem.SetParameterBlockConstant(y),\n                            \"Parameter block not found:\");\n}\n\nTEST(Problem, SetParameterBlockVariableWithUnknownPtrDies) {\n  double x[3];\n  double y[2];\n\n  Problem problem;\n  problem.AddParameterBlock(x, 3);\n\n  EXPECT_DEATH_IF_SUPPORTED(problem.SetParameterBlockVariable(y),\n                            \"Parameter block not found:\");\n}\n\nTEST(Problem, IsParameterBlockConstant) {\n  double x1[3];\n  double x2[3];\n\n  Problem problem;\n  problem.AddParameterBlock(x1, 3);\n  problem.AddParameterBlock(x2, 3);\n\n  EXPECT_FALSE(problem.IsParameterBlockConstant(x1));\n  EXPECT_FALSE(problem.IsParameterBlockConstant(x2));\n\n  problem.SetParameterBlockConstant(x1);\n  EXPECT_TRUE(problem.IsParameterBlockConstant(x1));\n  EXPECT_FALSE(problem.IsParameterBlockConstant(x2));\n\n  problem.SetParameterBlockConstant(x2);\n  EXPECT_TRUE(problem.IsParameterBlockConstant(x1));\n  EXPECT_TRUE(problem.IsParameterBlockConstant(x2));\n\n  problem.SetParameterBlockVariable(x1);\n  EXPECT_FALSE(problem.IsParameterBlockConstant(x1));\n  EXPECT_TRUE(problem.IsParameterBlockConstant(x2));\n}\n\nTEST(Problem, IsParameterBlockConstantWithUnknownPtrDies) {\n  double x[3];\n  double y[2];\n\n  Problem problem;\n  problem.AddParameterBlock(x, 3);\n\n  EXPECT_DEATH_IF_SUPPORTED(problem.IsParameterBlockConstant(y),\n                            \"Parameter block not found:\");\n}\n\nTEST(Problem, SetLocalParameterizationWithUnknownPtrDies) {\n  double x[3];\n  double y[2];\n\n  Problem problem;\n  problem.AddParameterBlock(x, 3);\n\n  EXPECT_DEATH_IF_SUPPORTED(\n      problem.SetParameterization(y, new IdentityParameterization(3)),\n      \"Parameter block not found:\");\n}\n\nTEST(Problem, RemoveParameterBlockWithUnknownPtrDies) {\n  double x[3];\n  double y[2];\n\n  Problem problem;\n  problem.AddParameterBlock(x, 3);\n\n  EXPECT_DEATH_IF_SUPPORTED(\n      problem.RemoveParameterBlock(y), \"Parameter block not found:\");\n}\n\nTEST(Problem, GetParameterization) {\n  double x[3];\n  double y[2];\n\n  Problem problem;\n  problem.AddParameterBlock(x, 3);\n  problem.AddParameterBlock(y, 2);\n\n  LocalParameterization* parameterization =  new IdentityParameterization(3);\n  problem.SetParameterization(x, parameterization);\n  EXPECT_EQ(problem.GetParameterization(x), parameterization);\n  EXPECT_TRUE(problem.GetParameterization(y) == NULL);\n}\n\nTEST(Problem, ParameterBlockQueryTest) {\n  double x[3];\n  double y[4];\n  Problem problem;\n  problem.AddParameterBlock(x, 3);\n  problem.AddParameterBlock(y, 4);\n\n  vector<int> constant_parameters;\n  constant_parameters.push_back(0);\n  problem.SetParameterization(\n      x,\n      new SubsetParameterization(3, constant_parameters));\n  EXPECT_EQ(problem.ParameterBlockSize(x), 3);\n  EXPECT_EQ(problem.ParameterBlockLocalSize(x), 2);\n  EXPECT_EQ(problem.ParameterBlockLocalSize(y), 4);\n\n  vector<double*> parameter_blocks;\n  problem.GetParameterBlocks(&parameter_blocks);\n  EXPECT_EQ(parameter_blocks.size(), 2);\n  EXPECT_NE(parameter_blocks[0], parameter_blocks[1]);\n  EXPECT_TRUE(parameter_blocks[0] == x || parameter_blocks[0] == y);\n  EXPECT_TRUE(parameter_blocks[1] == x || parameter_blocks[1] == y);\n\n  EXPECT_TRUE(problem.HasParameterBlock(x));\n  problem.RemoveParameterBlock(x);\n  EXPECT_FALSE(problem.HasParameterBlock(x));\n  problem.GetParameterBlocks(&parameter_blocks);\n  EXPECT_EQ(parameter_blocks.size(), 1);\n  EXPECT_TRUE(parameter_blocks[0] == y);\n}\n\nTEST_P(DynamicProblem, RemoveParameterBlockWithNoResiduals) {\n  problem->AddParameterBlock(y, 4);\n  problem->AddParameterBlock(z, 5);\n  problem->AddParameterBlock(w, 3);\n  ASSERT_EQ(3, problem->NumParameterBlocks());\n  ASSERT_EQ(0, NumResidualBlocks());\n  EXPECT_EQ(y, GetParameterBlock(0)->user_state());\n  EXPECT_EQ(z, GetParameterBlock(1)->user_state());\n  EXPECT_EQ(w, GetParameterBlock(2)->user_state());\n\n  // w is at the end, which might break the swapping logic so try adding and\n  // removing it.\n  problem->RemoveParameterBlock(w);\n  ASSERT_EQ(2, problem->NumParameterBlocks());\n  ASSERT_EQ(0, NumResidualBlocks());\n  EXPECT_EQ(y, GetParameterBlock(0)->user_state());\n  EXPECT_EQ(z, GetParameterBlock(1)->user_state());\n  problem->AddParameterBlock(w, 3);\n  ASSERT_EQ(3, problem->NumParameterBlocks());\n  ASSERT_EQ(0, NumResidualBlocks());\n  EXPECT_EQ(y, GetParameterBlock(0)->user_state());\n  EXPECT_EQ(z, GetParameterBlock(1)->user_state());\n  EXPECT_EQ(w, GetParameterBlock(2)->user_state());\n\n  // Now remove z, which is in the middle, and add it back.\n  problem->RemoveParameterBlock(z);\n  ASSERT_EQ(2, problem->NumParameterBlocks());\n  ASSERT_EQ(0, NumResidualBlocks());\n  EXPECT_EQ(y, GetParameterBlock(0)->user_state());\n  EXPECT_EQ(w, GetParameterBlock(1)->user_state());\n  problem->AddParameterBlock(z, 5);\n  ASSERT_EQ(3, problem->NumParameterBlocks());\n  ASSERT_EQ(0, NumResidualBlocks());\n  EXPECT_EQ(y, GetParameterBlock(0)->user_state());\n  EXPECT_EQ(w, GetParameterBlock(1)->user_state());\n  EXPECT_EQ(z, GetParameterBlock(2)->user_state());\n\n  // Now remove everything.\n  // y\n  problem->RemoveParameterBlock(y);\n  ASSERT_EQ(2, problem->NumParameterBlocks());\n  ASSERT_EQ(0, NumResidualBlocks());\n  EXPECT_EQ(z, GetParameterBlock(0)->user_state());\n  EXPECT_EQ(w, GetParameterBlock(1)->user_state());\n\n  // z\n  problem->RemoveParameterBlock(z);\n  ASSERT_EQ(1, problem->NumParameterBlocks());\n  ASSERT_EQ(0, NumResidualBlocks());\n  EXPECT_EQ(w, GetParameterBlock(0)->user_state());\n\n  // w\n  problem->RemoveParameterBlock(w);\n  EXPECT_EQ(0, problem->NumParameterBlocks());\n  EXPECT_EQ(0, NumResidualBlocks());\n}\n\nTEST_P(DynamicProblem, RemoveParameterBlockWithResiduals) {\n  problem->AddParameterBlock(y, 4);\n  problem->AddParameterBlock(z, 5);\n  problem->AddParameterBlock(w, 3);\n  ASSERT_EQ(3, problem->NumParameterBlocks());\n  ASSERT_EQ(0, NumResidualBlocks());\n  EXPECT_EQ(y, GetParameterBlock(0)->user_state());\n  EXPECT_EQ(z, GetParameterBlock(1)->user_state());\n  EXPECT_EQ(w, GetParameterBlock(2)->user_state());\n\n  // Add all combinations of cost functions.\n  CostFunction* cost_yzw = new TernaryCostFunction(1, 4, 5, 3);\n  CostFunction* cost_yz  = new BinaryCostFunction (1, 4, 5);\n  CostFunction* cost_yw  = new BinaryCostFunction (1, 4, 3);\n  CostFunction* cost_zw  = new BinaryCostFunction (1, 5, 3);\n  CostFunction* cost_y   = new UnaryCostFunction  (1, 4);\n  CostFunction* cost_z   = new UnaryCostFunction  (1, 5);\n  CostFunction* cost_w   = new UnaryCostFunction  (1, 3);\n\n  ResidualBlock* r_yzw = problem->AddResidualBlock(cost_yzw, NULL, y, z, w);\n  ResidualBlock* r_yz  = problem->AddResidualBlock(cost_yz,  NULL, y, z);\n  ResidualBlock* r_yw  = problem->AddResidualBlock(cost_yw,  NULL, y, w);\n  ResidualBlock* r_zw  = problem->AddResidualBlock(cost_zw,  NULL, z, w);\n  ResidualBlock* r_y   = problem->AddResidualBlock(cost_y,   NULL, y);\n  ResidualBlock* r_z   = problem->AddResidualBlock(cost_z,   NULL, z);\n  ResidualBlock* r_w   = problem->AddResidualBlock(cost_w,   NULL, w);\n\n  EXPECT_EQ(3, problem->NumParameterBlocks());\n  EXPECT_EQ(7, NumResidualBlocks());\n\n  // Remove w, which should remove r_yzw, r_yw, r_zw, r_w.\n  problem->RemoveParameterBlock(w);\n  ASSERT_EQ(2, problem->NumParameterBlocks());\n  ASSERT_EQ(3, NumResidualBlocks());\n\n  ASSERT_FALSE(HasResidualBlock(r_yzw));\n  ASSERT_TRUE (HasResidualBlock(r_yz ));\n  ASSERT_FALSE(HasResidualBlock(r_yw ));\n  ASSERT_FALSE(HasResidualBlock(r_zw ));\n  ASSERT_TRUE (HasResidualBlock(r_y  ));\n  ASSERT_TRUE (HasResidualBlock(r_z  ));\n  ASSERT_FALSE(HasResidualBlock(r_w  ));\n\n  // Remove z, which will remove almost everything else.\n  problem->RemoveParameterBlock(z);\n  ASSERT_EQ(1, problem->NumParameterBlocks());\n  ASSERT_EQ(1, NumResidualBlocks());\n\n  ASSERT_FALSE(HasResidualBlock(r_yzw));\n  ASSERT_FALSE(HasResidualBlock(r_yz ));\n  ASSERT_FALSE(HasResidualBlock(r_yw ));\n  ASSERT_FALSE(HasResidualBlock(r_zw ));\n  ASSERT_TRUE (HasResidualBlock(r_y  ));\n  ASSERT_FALSE(HasResidualBlock(r_z  ));\n  ASSERT_FALSE(HasResidualBlock(r_w  ));\n\n  // Remove y; all gone.\n  problem->RemoveParameterBlock(y);\n  EXPECT_EQ(0, problem->NumParameterBlocks());\n  EXPECT_EQ(0, NumResidualBlocks());\n}\n\nTEST_P(DynamicProblem, RemoveResidualBlock) {\n  problem->AddParameterBlock(y, 4);\n  problem->AddParameterBlock(z, 5);\n  problem->AddParameterBlock(w, 3);\n\n  // Add all combinations of cost functions.\n  CostFunction* cost_yzw = new TernaryCostFunction(1, 4, 5, 3);\n  CostFunction* cost_yz  = new BinaryCostFunction (1, 4, 5);\n  CostFunction* cost_yw  = new BinaryCostFunction (1, 4, 3);\n  CostFunction* cost_zw  = new BinaryCostFunction (1, 5, 3);\n  CostFunction* cost_y   = new UnaryCostFunction  (1, 4);\n  CostFunction* cost_z   = new UnaryCostFunction  (1, 5);\n  CostFunction* cost_w   = new UnaryCostFunction  (1, 3);\n\n  ResidualBlock* r_yzw = problem->AddResidualBlock(cost_yzw, NULL, y, z, w);\n  ResidualBlock* r_yz  = problem->AddResidualBlock(cost_yz,  NULL, y, z);\n  ResidualBlock* r_yw  = problem->AddResidualBlock(cost_yw,  NULL, y, w);\n  ResidualBlock* r_zw  = problem->AddResidualBlock(cost_zw,  NULL, z, w);\n  ResidualBlock* r_y   = problem->AddResidualBlock(cost_y,   NULL, y);\n  ResidualBlock* r_z   = problem->AddResidualBlock(cost_z,   NULL, z);\n  ResidualBlock* r_w   = problem->AddResidualBlock(cost_w,   NULL, w);\n\n  if (GetParam()) {\n    // In this test parameterization, there should be back-pointers from the\n    // parameter blocks to the residual blocks.\n    ExpectParameterBlockContains(y, r_yzw, r_yz, r_yw, r_y);\n    ExpectParameterBlockContains(z, r_yzw, r_yz, r_zw, r_z);\n    ExpectParameterBlockContains(w, r_yzw, r_yw, r_zw, r_w);\n  } else {\n    // Otherwise, nothing.\n    EXPECT_TRUE(GetParameterBlock(0)->mutable_residual_blocks() == NULL);\n    EXPECT_TRUE(GetParameterBlock(1)->mutable_residual_blocks() == NULL);\n    EXPECT_TRUE(GetParameterBlock(2)->mutable_residual_blocks() == NULL);\n  }\n  EXPECT_EQ(3, problem->NumParameterBlocks());\n  EXPECT_EQ(7, NumResidualBlocks());\n\n  // Remove each residual and check the state after each removal.\n\n  // Remove r_yzw.\n  problem->RemoveResidualBlock(r_yzw);\n  ASSERT_EQ(3, problem->NumParameterBlocks());\n  ASSERT_EQ(6, NumResidualBlocks());\n  if (GetParam()) {\n    ExpectParameterBlockContains(y, r_yz, r_yw, r_y);\n    ExpectParameterBlockContains(z, r_yz, r_zw, r_z);\n    ExpectParameterBlockContains(w, r_yw, r_zw, r_w);\n  }\n  ASSERT_TRUE (HasResidualBlock(r_yz ));\n  ASSERT_TRUE (HasResidualBlock(r_yw ));\n  ASSERT_TRUE (HasResidualBlock(r_zw ));\n  ASSERT_TRUE (HasResidualBlock(r_y  ));\n  ASSERT_TRUE (HasResidualBlock(r_z  ));\n  ASSERT_TRUE (HasResidualBlock(r_w  ));\n\n  // Remove r_yw.\n  problem->RemoveResidualBlock(r_yw);\n  ASSERT_EQ(3, problem->NumParameterBlocks());\n  ASSERT_EQ(5, NumResidualBlocks());\n  if (GetParam()) {\n    ExpectParameterBlockContains(y, r_yz, r_y);\n    ExpectParameterBlockContains(z, r_yz, r_zw, r_z);\n    ExpectParameterBlockContains(w, r_zw, r_w);\n  }\n  ASSERT_TRUE (HasResidualBlock(r_yz ));\n  ASSERT_TRUE (HasResidualBlock(r_zw ));\n  ASSERT_TRUE (HasResidualBlock(r_y  ));\n  ASSERT_TRUE (HasResidualBlock(r_z  ));\n  ASSERT_TRUE (HasResidualBlock(r_w  ));\n\n  // Remove r_zw.\n  problem->RemoveResidualBlock(r_zw);\n  ASSERT_EQ(3, problem->NumParameterBlocks());\n  ASSERT_EQ(4, NumResidualBlocks());\n  if (GetParam()) {\n    ExpectParameterBlockContains(y, r_yz, r_y);\n    ExpectParameterBlockContains(z, r_yz, r_z);\n    ExpectParameterBlockContains(w, r_w);\n  }\n  ASSERT_TRUE (HasResidualBlock(r_yz ));\n  ASSERT_TRUE (HasResidualBlock(r_y  ));\n  ASSERT_TRUE (HasResidualBlock(r_z  ));\n  ASSERT_TRUE (HasResidualBlock(r_w  ));\n\n  // Remove r_w.\n  problem->RemoveResidualBlock(r_w);\n  ASSERT_EQ(3, problem->NumParameterBlocks());\n  ASSERT_EQ(3, NumResidualBlocks());\n  if (GetParam()) {\n    ExpectParameterBlockContains(y, r_yz, r_y);\n    ExpectParameterBlockContains(z, r_yz, r_z);\n    ExpectParameterBlockContains(w);\n  }\n  ASSERT_TRUE (HasResidualBlock(r_yz ));\n  ASSERT_TRUE (HasResidualBlock(r_y  ));\n  ASSERT_TRUE (HasResidualBlock(r_z  ));\n\n  // Remove r_yz.\n  problem->RemoveResidualBlock(r_yz);\n  ASSERT_EQ(3, problem->NumParameterBlocks());\n  ASSERT_EQ(2, NumResidualBlocks());\n  if (GetParam()) {\n    ExpectParameterBlockContains(y, r_y);\n    ExpectParameterBlockContains(z, r_z);\n    ExpectParameterBlockContains(w);\n  }\n  ASSERT_TRUE (HasResidualBlock(r_y  ));\n  ASSERT_TRUE (HasResidualBlock(r_z  ));\n\n  // Remove the last two.\n  problem->RemoveResidualBlock(r_z);\n  problem->RemoveResidualBlock(r_y);\n  ASSERT_EQ(3, problem->NumParameterBlocks());\n  ASSERT_EQ(0, NumResidualBlocks());\n  if (GetParam()) {\n    ExpectParameterBlockContains(y);\n    ExpectParameterBlockContains(z);\n    ExpectParameterBlockContains(w);\n  }\n}\n\nTEST_P(DynamicProblem, RemoveInvalidResidualBlockDies) {\n  problem->AddParameterBlock(y, 4);\n  problem->AddParameterBlock(z, 5);\n  problem->AddParameterBlock(w, 3);\n\n  // Add all combinations of cost functions.\n  CostFunction* cost_yzw = new TernaryCostFunction(1, 4, 5, 3);\n  CostFunction* cost_yz  = new BinaryCostFunction (1, 4, 5);\n  CostFunction* cost_yw  = new BinaryCostFunction (1, 4, 3);\n  CostFunction* cost_zw  = new BinaryCostFunction (1, 5, 3);\n  CostFunction* cost_y   = new UnaryCostFunction  (1, 4);\n  CostFunction* cost_z   = new UnaryCostFunction  (1, 5);\n  CostFunction* cost_w   = new UnaryCostFunction  (1, 3);\n\n  ResidualBlock* r_yzw = problem->AddResidualBlock(cost_yzw, NULL, y, z, w);\n  ResidualBlock* r_yz  = problem->AddResidualBlock(cost_yz,  NULL, y, z);\n  ResidualBlock* r_yw  = problem->AddResidualBlock(cost_yw,  NULL, y, w);\n  ResidualBlock* r_zw  = problem->AddResidualBlock(cost_zw,  NULL, z, w);\n  ResidualBlock* r_y   = problem->AddResidualBlock(cost_y,   NULL, y);\n  ResidualBlock* r_z   = problem->AddResidualBlock(cost_z,   NULL, z);\n  ResidualBlock* r_w   = problem->AddResidualBlock(cost_w,   NULL, w);\n\n  // Remove r_yzw.\n  problem->RemoveResidualBlock(r_yzw);\n  ASSERT_EQ(3, problem->NumParameterBlocks());\n  ASSERT_EQ(6, NumResidualBlocks());\n  // Attempt to remove r_yzw again.\n  EXPECT_DEATH_IF_SUPPORTED(problem->RemoveResidualBlock(r_yzw), \"not found\");\n\n  // Attempt to remove a cast pointer never added as a residual.\n  int trash_memory = 1234;\n  ResidualBlock* invalid_residual =\n      reinterpret_cast<ResidualBlock*>(&trash_memory);\n  EXPECT_DEATH_IF_SUPPORTED(problem->RemoveResidualBlock(invalid_residual),\n                            \"not found\");\n\n  // Remove a parameter block, which in turn removes the dependent residuals\n  // then attempt to remove them directly.\n  problem->RemoveParameterBlock(z);\n  ASSERT_EQ(2, problem->NumParameterBlocks());\n  ASSERT_EQ(3, NumResidualBlocks());\n  EXPECT_DEATH_IF_SUPPORTED(problem->RemoveResidualBlock(r_yz), \"not found\");\n  EXPECT_DEATH_IF_SUPPORTED(problem->RemoveResidualBlock(r_zw), \"not found\");\n  EXPECT_DEATH_IF_SUPPORTED(problem->RemoveResidualBlock(r_z), \"not found\");\n\n  problem->RemoveResidualBlock(r_yw);\n  problem->RemoveResidualBlock(r_w);\n  problem->RemoveResidualBlock(r_y);\n}\n\n// Check that a null-terminated array, a, has the same elements as b.\ntemplate<typename T>\nvoid ExpectVectorContainsUnordered(const T* a, const vector<T>& b) {\n  // Compute the size of a.\n  int size = 0;\n  while (a[size]) {\n    ++size;\n  }\n  ASSERT_EQ(size, b.size());\n\n  // Sort a.\n  vector<T> a_sorted(size);\n  copy(a, a + size, a_sorted.begin());\n  sort(a_sorted.begin(), a_sorted.end());\n\n  // Sort b.\n  vector<T> b_sorted(b);\n  sort(b_sorted.begin(), b_sorted.end());\n\n  // Compare.\n  for (int i = 0; i < size; ++i) {\n    EXPECT_EQ(a_sorted[i], b_sorted[i]);\n  }\n}\n\nstatic void ExpectProblemHasResidualBlocks(\n    const ProblemImpl &problem,\n    const ResidualBlockId *expected_residual_blocks) {\n  vector<ResidualBlockId> residual_blocks;\n  problem.GetResidualBlocks(&residual_blocks);\n  ExpectVectorContainsUnordered(expected_residual_blocks, residual_blocks);\n}\n\nTEST_P(DynamicProblem, GetXXXBlocksForYYYBlock) {\n  problem->AddParameterBlock(y, 4);\n  problem->AddParameterBlock(z, 5);\n  problem->AddParameterBlock(w, 3);\n\n  // Add all combinations of cost functions.\n  CostFunction* cost_yzw = new TernaryCostFunction(1, 4, 5, 3);\n  CostFunction* cost_yz  = new BinaryCostFunction (1, 4, 5);\n  CostFunction* cost_yw  = new BinaryCostFunction (1, 4, 3);\n  CostFunction* cost_zw  = new BinaryCostFunction (1, 5, 3);\n  CostFunction* cost_y   = new UnaryCostFunction  (1, 4);\n  CostFunction* cost_z   = new UnaryCostFunction  (1, 5);\n  CostFunction* cost_w   = new UnaryCostFunction  (1, 3);\n\n  ResidualBlock* r_yzw = problem->AddResidualBlock(cost_yzw, NULL, y, z, w);\n  {\n    ResidualBlockId expected_residuals[] = {r_yzw, 0};\n    ExpectProblemHasResidualBlocks(*problem, expected_residuals);\n  }\n  ResidualBlock* r_yz  = problem->AddResidualBlock(cost_yz,  NULL, y, z);\n  {\n    ResidualBlockId expected_residuals[] = {r_yzw, r_yz, 0};\n    ExpectProblemHasResidualBlocks(*problem, expected_residuals);\n  }\n  ResidualBlock* r_yw  = problem->AddResidualBlock(cost_yw,  NULL, y, w);\n  {\n    ResidualBlock *expected_residuals[] = {r_yzw, r_yz, r_yw, 0};\n    ExpectProblemHasResidualBlocks(*problem, expected_residuals);\n  }\n  ResidualBlock* r_zw  = problem->AddResidualBlock(cost_zw,  NULL, z, w);\n  {\n    ResidualBlock *expected_residuals[] = {r_yzw, r_yz, r_yw, r_zw, 0};\n    ExpectProblemHasResidualBlocks(*problem, expected_residuals);\n  }\n  ResidualBlock* r_y   = problem->AddResidualBlock(cost_y,   NULL, y);\n  {\n    ResidualBlock *expected_residuals[] = {r_yzw, r_yz, r_yw, r_zw, r_y, 0};\n    ExpectProblemHasResidualBlocks(*problem, expected_residuals);\n  }\n  ResidualBlock* r_z   = problem->AddResidualBlock(cost_z,   NULL, z);\n  {\n    ResidualBlock *expected_residuals[] = {\n      r_yzw, r_yz, r_yw, r_zw, r_y, r_z, 0\n    };\n    ExpectProblemHasResidualBlocks(*problem, expected_residuals);\n  }\n  ResidualBlock* r_w   = problem->AddResidualBlock(cost_w,   NULL, w);\n  {\n    ResidualBlock *expected_residuals[] = {\n      r_yzw, r_yz, r_yw, r_zw, r_y, r_z, r_w, 0\n    };\n    ExpectProblemHasResidualBlocks(*problem, expected_residuals);\n  }\n\n  vector<double*> parameter_blocks;\n  vector<ResidualBlockId> residual_blocks;\n\n  // Check GetResidualBlocksForParameterBlock() for all parameter blocks.\n  struct GetResidualBlocksForParameterBlockTestCase {\n    double* parameter_block;\n    ResidualBlockId expected_residual_blocks[10];\n  };\n  GetResidualBlocksForParameterBlockTestCase get_residual_blocks_cases[] = {\n    { y, { r_yzw, r_yz, r_yw, r_y, NULL} },\n    { z, { r_yzw, r_yz, r_zw, r_z, NULL} },\n    { w, { r_yzw, r_yw, r_zw, r_w, NULL} },\n    { NULL }\n  };\n  for (int i = 0; get_residual_blocks_cases[i].parameter_block; ++i) {\n    problem->GetResidualBlocksForParameterBlock(\n        get_residual_blocks_cases[i].parameter_block,\n        &residual_blocks);\n    ExpectVectorContainsUnordered(\n        get_residual_blocks_cases[i].expected_residual_blocks,\n        residual_blocks);\n  }\n\n  // Check GetParameterBlocksForResidualBlock() for all residual blocks.\n  struct GetParameterBlocksForResidualBlockTestCase {\n    ResidualBlockId residual_block;\n    double* expected_parameter_blocks[10];\n  };\n  GetParameterBlocksForResidualBlockTestCase get_parameter_blocks_cases[] = {\n    { r_yzw, { y, z, w, NULL } },\n    { r_yz , { y, z, NULL } },\n    { r_yw , { y, w, NULL } },\n    { r_zw , { z, w, NULL } },\n    { r_y  , { y, NULL } },\n    { r_z  , { z, NULL } },\n    { r_w  , { w, NULL } },\n    { NULL }\n  };\n  for (int i = 0; get_parameter_blocks_cases[i].residual_block; ++i) {\n    problem->GetParameterBlocksForResidualBlock(\n        get_parameter_blocks_cases[i].residual_block,\n        &parameter_blocks);\n    ExpectVectorContainsUnordered(\n        get_parameter_blocks_cases[i].expected_parameter_blocks,\n        parameter_blocks);\n  }\n}\n\nINSTANTIATE_TEST_SUITE_P(OptionsInstantiation,\n                         DynamicProblem,\n                         ::testing::Values(true, false));\n\n// Test for Problem::Evaluate\n\n// r_i = i - (j + 1) * x_ij^2\ntemplate <int kNumResiduals, int kNumParameterBlocks>\nclass QuadraticCostFunction : public CostFunction {\n public:\n  QuadraticCostFunction() {\n    CHECK_GT(kNumResiduals, 0);\n    CHECK_GT(kNumParameterBlocks, 0);\n    set_num_residuals(kNumResiduals);\n    for (int i = 0; i < kNumParameterBlocks; ++i) {\n      mutable_parameter_block_sizes()->push_back(kNumResiduals);\n    }\n  }\n\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const final {\n    for (int i = 0; i < kNumResiduals; ++i) {\n      residuals[i] = i;\n      for (int j = 0; j < kNumParameterBlocks; ++j) {\n        residuals[i] -= (j + 1.0) * parameters[j][i] * parameters[j][i];\n      }\n    }\n\n    if (jacobians == NULL) {\n      return true;\n    }\n\n    for (int j = 0; j < kNumParameterBlocks; ++j) {\n      if (jacobians[j] != NULL) {\n        MatrixRef(jacobians[j], kNumResiduals, kNumResiduals) =\n            (-2.0 * (j + 1.0) *\n             ConstVectorRef(parameters[j], kNumResiduals)).asDiagonal();\n      }\n    }\n\n    return true;\n  }\n};\n\n// Convert a CRSMatrix to a dense Eigen matrix.\nstatic void CRSToDenseMatrix(const CRSMatrix& input, Matrix* output) {\n  CHECK(output != nullptr);\n  Matrix& m = *output;\n  m.resize(input.num_rows, input.num_cols);\n  m.setZero();\n  for (int row = 0; row < input.num_rows; ++row) {\n    for (int j = input.rows[row]; j < input.rows[row + 1]; ++j) {\n      const int col = input.cols[j];\n      m(row, col) = input.values[j];\n    }\n  }\n}\n\nclass ProblemEvaluateTest : public ::testing::Test {\n protected:\n  void SetUp() {\n    for (int i = 0; i < 6; ++i) {\n      parameters_[i] = static_cast<double>(i + 1);\n    }\n\n    parameter_blocks_.push_back(parameters_);\n    parameter_blocks_.push_back(parameters_ + 2);\n    parameter_blocks_.push_back(parameters_ + 4);\n\n\n    CostFunction* cost_function = new QuadraticCostFunction<2, 2>;\n\n    // f(x, y)\n    residual_blocks_.push_back(\n        problem_.AddResidualBlock(cost_function,\n                                  NULL,\n                                  parameters_,\n                                  parameters_ + 2));\n    // g(y, z)\n    residual_blocks_.push_back(\n        problem_.AddResidualBlock(cost_function,\n                                  NULL, parameters_ + 2,\n                                  parameters_ + 4));\n    // h(z, x)\n    residual_blocks_.push_back(\n        problem_.AddResidualBlock(cost_function,\n                                  NULL,\n                                  parameters_ + 4,\n                                  parameters_));\n  }\n\n  void TearDown() {\n    EXPECT_TRUE(problem_.program().IsValid());\n  }\n\n  void EvaluateAndCompare(const Problem::EvaluateOptions& options,\n                          const int expected_num_rows,\n                          const int expected_num_cols,\n                          const double expected_cost,\n                          const double* expected_residuals,\n                          const double* expected_gradient,\n                          const double* expected_jacobian) {\n    double cost;\n    vector<double> residuals;\n    vector<double> gradient;\n    CRSMatrix jacobian;\n\n    EXPECT_TRUE(\n        problem_.Evaluate(options,\n                          &cost,\n                          expected_residuals != NULL ? &residuals : NULL,\n                          expected_gradient != NULL ? &gradient : NULL,\n                          expected_jacobian != NULL ? &jacobian : NULL));\n\n    if (expected_residuals != NULL) {\n      EXPECT_EQ(residuals.size(), expected_num_rows);\n    }\n\n    if (expected_gradient != NULL) {\n      EXPECT_EQ(gradient.size(), expected_num_cols);\n    }\n\n    if (expected_jacobian != NULL) {\n      EXPECT_EQ(jacobian.num_rows, expected_num_rows);\n      EXPECT_EQ(jacobian.num_cols, expected_num_cols);\n    }\n\n    Matrix dense_jacobian;\n    if (expected_jacobian != NULL) {\n      CRSToDenseMatrix(jacobian, &dense_jacobian);\n    }\n\n    CompareEvaluations(expected_num_rows,\n                       expected_num_cols,\n                       expected_cost,\n                       expected_residuals,\n                       expected_gradient,\n                       expected_jacobian,\n                       cost,\n                       residuals.size() > 0 ? &residuals[0] : NULL,\n                       gradient.size() > 0 ? &gradient[0] : NULL,\n                       dense_jacobian.data());\n  }\n\n  void CheckAllEvaluationCombinations(const Problem::EvaluateOptions& options,\n                                      const ExpectedEvaluation& expected) {\n    for (int i = 0; i < 8; ++i) {\n      EvaluateAndCompare(options,\n                         expected.num_rows,\n                         expected.num_cols,\n                         expected.cost,\n                         (i & 1) ? expected.residuals : NULL,\n                         (i & 2) ? expected.gradient  : NULL,\n                         (i & 4) ? expected.jacobian  : NULL);\n    }\n  }\n\n  ProblemImpl problem_;\n  double parameters_[6];\n  vector<double*> parameter_blocks_;\n  vector<ResidualBlockId> residual_blocks_;\n};\n\n\nTEST_F(ProblemEvaluateTest, MultipleParameterAndResidualBlocks) {\n  ExpectedEvaluation expected = {\n    // Rows/columns\n    6, 6,\n    // Cost\n    7607.0,\n    // Residuals\n    { -19.0, -35.0,  // f\n      -59.0, -87.0,  // g\n      -27.0, -43.0   // h\n    },\n    // Gradient\n    {  146.0,  484.0,   // x\n       582.0, 1256.0,   // y\n      1450.0, 2604.0,   // z\n    },\n    // Jacobian\n    //                       x             y             z\n    { /* f(x, y) */ -2.0,  0.0, -12.0,   0.0,   0.0,   0.0,\n                     0.0, -4.0,   0.0, -16.0,   0.0,   0.0,\n      /* g(y, z) */  0.0,  0.0,  -6.0,   0.0, -20.0,   0.0,\n                     0.0,  0.0,   0.0,  -8.0,   0.0, -24.0,\n      /* h(z, x) */ -4.0,  0.0,   0.0,   0.0, -10.0,   0.0,\n                     0.0, -8.0,   0.0,   0.0,   0.0, -12.0\n    }\n  };\n\n  CheckAllEvaluationCombinations(Problem::EvaluateOptions(), expected);\n}\n\nTEST_F(ProblemEvaluateTest, ParameterAndResidualBlocksPassedInOptions) {\n  ExpectedEvaluation expected = {\n    // Rows/columns\n    6, 6,\n    // Cost\n    7607.0,\n    // Residuals\n    { -19.0, -35.0,  // f\n      -59.0, -87.0,  // g\n      -27.0, -43.0   // h\n    },\n    // Gradient\n    {  146.0,  484.0,   // x\n       582.0, 1256.0,   // y\n      1450.0, 2604.0,   // z\n    },\n    // Jacobian\n    //                       x             y             z\n    { /* f(x, y) */ -2.0,  0.0, -12.0,   0.0,   0.0,   0.0,\n                     0.0, -4.0,   0.0, -16.0,   0.0,   0.0,\n      /* g(y, z) */  0.0,  0.0,  -6.0,   0.0, -20.0,   0.0,\n                     0.0,  0.0,   0.0,  -8.0,   0.0, -24.0,\n      /* h(z, x) */ -4.0,  0.0,   0.0,   0.0, -10.0,   0.0,\n                     0.0, -8.0,   0.0,   0.0,   0.0, -12.0\n    }\n  };\n\n  Problem::EvaluateOptions evaluate_options;\n  evaluate_options.parameter_blocks = parameter_blocks_;\n  evaluate_options.residual_blocks = residual_blocks_;\n  CheckAllEvaluationCombinations(evaluate_options, expected);\n}\n\nTEST_F(ProblemEvaluateTest, ReorderedResidualBlocks) {\n  ExpectedEvaluation expected = {\n    // Rows/columns\n    6, 6,\n    // Cost\n    7607.0,\n    // Residuals\n    { -19.0, -35.0,  // f\n      -27.0, -43.0,  // h\n      -59.0, -87.0   // g\n    },\n    // Gradient\n    {  146.0,  484.0,   // x\n       582.0, 1256.0,   // y\n      1450.0, 2604.0,   // z\n    },\n    // Jacobian\n    //                       x             y             z\n    { /* f(x, y) */ -2.0,  0.0, -12.0,   0.0,   0.0,   0.0,\n                     0.0, -4.0,   0.0, -16.0,   0.0,   0.0,\n      /* h(z, x) */ -4.0,  0.0,   0.0,   0.0, -10.0,   0.0,\n                     0.0, -8.0,   0.0,   0.0,   0.0, -12.0,\n      /* g(y, z) */  0.0,  0.0,  -6.0,   0.0, -20.0,   0.0,\n                     0.0,  0.0,   0.0,  -8.0,   0.0, -24.0\n    }\n  };\n\n  Problem::EvaluateOptions evaluate_options;\n  evaluate_options.parameter_blocks = parameter_blocks_;\n\n  // f, h, g\n  evaluate_options.residual_blocks.push_back(residual_blocks_[0]);\n  evaluate_options.residual_blocks.push_back(residual_blocks_[2]);\n  evaluate_options.residual_blocks.push_back(residual_blocks_[1]);\n\n  CheckAllEvaluationCombinations(evaluate_options, expected);\n}\n\nTEST_F(ProblemEvaluateTest, ReorderedResidualBlocksAndReorderedParameterBlocks) {\n  ExpectedEvaluation expected = {\n    // Rows/columns\n    6, 6,\n    // Cost\n    7607.0,\n    // Residuals\n    { -19.0, -35.0,  // f\n      -27.0, -43.0,  // h\n      -59.0, -87.0   // g\n    },\n    // Gradient\n    {  1450.0, 2604.0,   // z\n        582.0, 1256.0,   // y\n        146.0,  484.0,   // x\n    },\n     // Jacobian\n    //                       z             y             x\n    { /* f(x, y) */   0.0,   0.0, -12.0,   0.0,  -2.0,   0.0,\n                      0.0,   0.0,   0.0, -16.0,   0.0,  -4.0,\n      /* h(z, x) */ -10.0,   0.0,   0.0,   0.0,  -4.0,   0.0,\n                      0.0, -12.0,   0.0,   0.0,   0.0,  -8.0,\n      /* g(y, z) */ -20.0,   0.0,  -6.0,   0.0,   0.0,   0.0,\n                      0.0, -24.0,   0.0,  -8.0,   0.0,   0.0\n    }\n  };\n\n  Problem::EvaluateOptions evaluate_options;\n  // z, y, x\n  evaluate_options.parameter_blocks.push_back(parameter_blocks_[2]);\n  evaluate_options.parameter_blocks.push_back(parameter_blocks_[1]);\n  evaluate_options.parameter_blocks.push_back(parameter_blocks_[0]);\n\n  // f, h, g\n  evaluate_options.residual_blocks.push_back(residual_blocks_[0]);\n  evaluate_options.residual_blocks.push_back(residual_blocks_[2]);\n  evaluate_options.residual_blocks.push_back(residual_blocks_[1]);\n\n  CheckAllEvaluationCombinations(evaluate_options, expected);\n}\n\nTEST_F(ProblemEvaluateTest, ConstantParameterBlock) {\n  ExpectedEvaluation expected = {\n    // Rows/columns\n    6, 6,\n    // Cost\n    7607.0,\n    // Residuals\n    { -19.0, -35.0,  // f\n      -59.0, -87.0,  // g\n      -27.0, -43.0   // h\n    },\n\n    // Gradient\n    {  146.0,  484.0,  // x\n         0.0,    0.0,  // y\n      1450.0, 2604.0,  // z\n    },\n\n    // Jacobian\n    //                       x             y             z\n    { /* f(x, y) */ -2.0,  0.0,   0.0,   0.0,   0.0,   0.0,\n                     0.0, -4.0,   0.0,   0.0,   0.0,   0.0,\n      /* g(y, z) */  0.0,  0.0,   0.0,   0.0, -20.0,   0.0,\n                     0.0,  0.0,   0.0,   0.0,   0.0, -24.0,\n      /* h(z, x) */ -4.0,  0.0,   0.0,   0.0, -10.0,   0.0,\n                     0.0, -8.0,   0.0,   0.0,   0.0, -12.0\n    }\n  };\n\n  problem_.SetParameterBlockConstant(parameters_ + 2);\n  CheckAllEvaluationCombinations(Problem::EvaluateOptions(), expected);\n}\n\nTEST_F(ProblemEvaluateTest, ExcludedAResidualBlock) {\n  ExpectedEvaluation expected = {\n    // Rows/columns\n    4, 6,\n    // Cost\n    2082.0,\n    // Residuals\n    { -19.0, -35.0,  // f\n      -27.0, -43.0   // h\n    },\n    // Gradient\n    {  146.0,  484.0,   // x\n       228.0,  560.0,   // y\n       270.0,  516.0,   // z\n    },\n    // Jacobian\n    //                       x             y             z\n    { /* f(x, y) */ -2.0,  0.0, -12.0,   0.0,   0.0,   0.0,\n                     0.0, -4.0,   0.0, -16.0,   0.0,   0.0,\n      /* h(z, x) */ -4.0,  0.0,   0.0,   0.0, -10.0,   0.0,\n                     0.0, -8.0,   0.0,   0.0,   0.0, -12.0\n    }\n  };\n\n  Problem::EvaluateOptions evaluate_options;\n  evaluate_options.residual_blocks.push_back(residual_blocks_[0]);\n  evaluate_options.residual_blocks.push_back(residual_blocks_[2]);\n\n  CheckAllEvaluationCombinations(evaluate_options, expected);\n}\n\nTEST_F(ProblemEvaluateTest, ExcludedParameterBlock) {\n  ExpectedEvaluation expected = {\n    // Rows/columns\n    6, 4,\n    // Cost\n    7607.0,\n    // Residuals\n    { -19.0, -35.0,  // f\n      -59.0, -87.0,  // g\n      -27.0, -43.0   // h\n    },\n\n    // Gradient\n    {  146.0,  484.0,  // x\n      1450.0, 2604.0,  // z\n    },\n\n    // Jacobian\n    //                       x             z\n    { /* f(x, y) */ -2.0,  0.0,   0.0,   0.0,\n                     0.0, -4.0,   0.0,   0.0,\n      /* g(y, z) */  0.0,  0.0, -20.0,   0.0,\n                     0.0,  0.0,   0.0, -24.0,\n      /* h(z, x) */ -4.0,  0.0, -10.0,   0.0,\n                     0.0, -8.0,   0.0, -12.0\n    }\n  };\n\n  Problem::EvaluateOptions evaluate_options;\n  // x, z\n  evaluate_options.parameter_blocks.push_back(parameter_blocks_[0]);\n  evaluate_options.parameter_blocks.push_back(parameter_blocks_[2]);\n  evaluate_options.residual_blocks = residual_blocks_;\n  CheckAllEvaluationCombinations(evaluate_options, expected);\n}\n\nTEST_F(ProblemEvaluateTest, ExcludedParameterBlockAndExcludedResidualBlock) {\n  ExpectedEvaluation expected = {\n    // Rows/columns\n    4, 4,\n    // Cost\n    6318.0,\n    // Residuals\n    { -19.0, -35.0,  // f\n      -59.0, -87.0,  // g\n    },\n\n    // Gradient\n    {   38.0,  140.0,  // x\n      1180.0, 2088.0,  // z\n    },\n\n    // Jacobian\n    //                       x             z\n    { /* f(x, y) */ -2.0,  0.0,   0.0,   0.0,\n                     0.0, -4.0,   0.0,   0.0,\n      /* g(y, z) */  0.0,  0.0, -20.0,   0.0,\n                     0.0,  0.0,   0.0, -24.0,\n    }\n  };\n\n  Problem::EvaluateOptions evaluate_options;\n  // x, z\n  evaluate_options.parameter_blocks.push_back(parameter_blocks_[0]);\n  evaluate_options.parameter_blocks.push_back(parameter_blocks_[2]);\n  evaluate_options.residual_blocks.push_back(residual_blocks_[0]);\n  evaluate_options.residual_blocks.push_back(residual_blocks_[1]);\n\n  CheckAllEvaluationCombinations(evaluate_options, expected);\n}\n\nTEST_F(ProblemEvaluateTest, LocalParameterization) {\n  ExpectedEvaluation expected = {\n    // Rows/columns\n    6, 5,\n    // Cost\n    7607.0,\n    // Residuals\n    { -19.0, -35.0,  // f\n      -59.0, -87.0,  // g\n      -27.0, -43.0   // h\n    },\n    // Gradient\n    {  146.0,  484.0,  // x\n      1256.0,          // y with SubsetParameterization\n      1450.0, 2604.0,  // z\n    },\n    // Jacobian\n    //                       x      y             z\n    { /* f(x, y) */ -2.0,  0.0,   0.0,   0.0,   0.0,\n                     0.0, -4.0, -16.0,   0.0,   0.0,\n      /* g(y, z) */  0.0,  0.0,   0.0, -20.0,   0.0,\n                     0.0,  0.0,  -8.0,   0.0, -24.0,\n      /* h(z, x) */ -4.0,  0.0,   0.0, -10.0,   0.0,\n                     0.0, -8.0,   0.0,   0.0, -12.0\n    }\n  };\n\n  vector<int> constant_parameters;\n  constant_parameters.push_back(0);\n  problem_.SetParameterization(parameters_ + 2,\n                               new SubsetParameterization(2,\n                                                          constant_parameters));\n\n  CheckAllEvaluationCombinations(Problem::EvaluateOptions(), expected);\n}\n\nstruct IdentityFunctor {\n  template <typename T>\n  bool operator()(const T* x, const T* y, T* residuals) const {\n    residuals[0] = x[0];\n    residuals[1] = x[1];\n    residuals[2] = y[0];\n    residuals[3] = y[1];\n    residuals[4] = y[2];\n    return true;\n  }\n\n  static CostFunction* Create() {\n    return new AutoDiffCostFunction<IdentityFunctor, 5, 2, 3>(\n        new IdentityFunctor);\n  }\n};\n\nclass ProblemEvaluateResidualBlockTest : public ::testing::Test {\n public:\n  static constexpr bool kApplyLossFunction = true;\n  static constexpr bool kDoNotApplyLossFunction = false;\n  static double loss_function_scale_;\n\n protected:\n  ProblemImpl problem_;\n  double x_[2] = {1, 2};\n  double y_[3] = {1, 2, 3};\n};\n\ndouble ProblemEvaluateResidualBlockTest::loss_function_scale_ = 2.0;\n\nTEST_F(ProblemEvaluateResidualBlockTest,\n       OneResidualBlockNoLossFunctionFullEval) {\n  ResidualBlockId residual_block_id =\n      problem_.AddResidualBlock(IdentityFunctor::Create(), nullptr, x_, y_);\n  Vector expected_f(5);\n  expected_f << 1, 2, 1, 2, 3;\n  Matrix expected_dfdx = Matrix::Zero(5, 2);\n  expected_dfdx.block(0, 0, 2, 2) = Matrix::Identity(2, 2);\n  Matrix expected_dfdy = Matrix::Zero(5, 3);\n  expected_dfdy.block(2, 0, 3, 3) = Matrix::Identity(3, 3);\n  double expected_cost = expected_f.squaredNorm() / 2.0;\n\n  double actual_cost;\n  Vector actual_f(5);\n  Matrix actual_dfdx(5, 2);\n  Matrix actual_dfdy(5, 3);\n  double* jacobians[2] = {actual_dfdx.data(), actual_dfdy.data()};\n  EXPECT_TRUE(problem_.EvaluateResidualBlock(residual_block_id,\n                                             kApplyLossFunction,\n                                             &actual_cost,\n                                             actual_f.data(),\n                                             jacobians));\n\n  EXPECT_NEAR(std::abs(expected_cost - actual_cost) / actual_cost,\n              0,\n              std::numeric_limits<double>::epsilon())\n      << actual_cost;\n  EXPECT_NEAR((expected_f - actual_f).norm() / actual_f.norm(),\n              0,\n              std::numeric_limits<double>::epsilon())\n      << actual_f;\n  EXPECT_NEAR((expected_dfdx - actual_dfdx).norm() / actual_dfdx.norm(),\n              0,\n              std::numeric_limits<double>::epsilon())\n      << actual_dfdx;\n  EXPECT_NEAR((expected_dfdy - actual_dfdy).norm() / actual_dfdy.norm(),\n              0,\n              std::numeric_limits<double>::epsilon())\n      << actual_dfdy;\n}\n\nTEST_F(ProblemEvaluateResidualBlockTest,\n       OneResidualBlockNoLossFunctionNullEval) {\n  ResidualBlockId residual_block_id =\n      problem_.AddResidualBlock(IdentityFunctor::Create(), nullptr, x_, y_);\n  EXPECT_TRUE(problem_.EvaluateResidualBlock(\n      residual_block_id, kApplyLossFunction, nullptr, nullptr, nullptr));\n}\n\nTEST_F(ProblemEvaluateResidualBlockTest, OneResidualBlockNoLossFunctionCost) {\n  ResidualBlockId residual_block_id =\n      problem_.AddResidualBlock(IdentityFunctor::Create(), nullptr, x_, y_);\n  Vector expected_f(5);\n  expected_f << 1, 2, 1, 2, 3;\n  double expected_cost = expected_f.squaredNorm() / 2.0;\n\n  double actual_cost;\n  EXPECT_TRUE(problem_.EvaluateResidualBlock(\n      residual_block_id, kApplyLossFunction, &actual_cost, nullptr, nullptr));\n\n  EXPECT_NEAR(std::abs(expected_cost - actual_cost) / actual_cost,\n              0,\n              std::numeric_limits<double>::epsilon())\n      << actual_cost;\n}\n\nTEST_F(ProblemEvaluateResidualBlockTest,\n       OneResidualBlockNoLossFunctionCostAndResidual) {\n  ResidualBlockId residual_block_id =\n      problem_.AddResidualBlock(IdentityFunctor::Create(), nullptr, x_, y_);\n  Vector expected_f(5);\n  expected_f << 1, 2, 1, 2, 3;\n  double expected_cost = expected_f.squaredNorm() / 2.0;\n\n  double actual_cost;\n  Vector actual_f(5);\n  EXPECT_TRUE(problem_.EvaluateResidualBlock(residual_block_id,\n                                             kApplyLossFunction,\n                                             &actual_cost,\n                                             actual_f.data(),\n                                             nullptr));\n\n  EXPECT_NEAR(std::abs(expected_cost - actual_cost) / actual_cost,\n              0,\n              std::numeric_limits<double>::epsilon())\n      << actual_cost;\n  EXPECT_NEAR((expected_f - actual_f).norm() / actual_f.norm(),\n              0,\n              std::numeric_limits<double>::epsilon())\n      << actual_f;\n}\n\nTEST_F(ProblemEvaluateResidualBlockTest,\n       OneResidualBlockNoLossFunctionCostResidualAndOneJacobian) {\n  ResidualBlockId residual_block_id =\n      problem_.AddResidualBlock(IdentityFunctor::Create(), nullptr, x_, y_);\n  Vector expected_f(5);\n  expected_f << 1, 2, 1, 2, 3;\n  Matrix expected_dfdx = Matrix::Zero(5, 2);\n  expected_dfdx.block(0, 0, 2, 2) = Matrix::Identity(2, 2);\n  double expected_cost = expected_f.squaredNorm() / 2.0;\n\n  double actual_cost;\n  Vector actual_f(5);\n  Matrix actual_dfdx(5, 2);\n  double* jacobians[2] = {actual_dfdx.data(), nullptr};\n  EXPECT_TRUE(problem_.EvaluateResidualBlock(residual_block_id,\n                                             kApplyLossFunction,\n                                             &actual_cost,\n                                             actual_f.data(),\n                                             jacobians));\n\n  EXPECT_NEAR(std::abs(expected_cost - actual_cost) / actual_cost,\n              0,\n              std::numeric_limits<double>::epsilon())\n      << actual_cost;\n  EXPECT_NEAR((expected_f - actual_f).norm() / actual_f.norm(),\n              0,\n              std::numeric_limits<double>::epsilon())\n      << actual_f;\n  EXPECT_NEAR((expected_dfdx - actual_dfdx).norm() / actual_dfdx.norm(),\n              0,\n              std::numeric_limits<double>::epsilon())\n      << actual_dfdx;\n}\n\nTEST_F(ProblemEvaluateResidualBlockTest,\n       OneResidualBlockNoLossFunctionResidual) {\n  ResidualBlockId residual_block_id =\n      problem_.AddResidualBlock(IdentityFunctor::Create(), nullptr, x_, y_);\n  Vector expected_f(5);\n  expected_f << 1, 2, 1, 2, 3;\n  Vector actual_f(5);\n  EXPECT_TRUE(problem_.EvaluateResidualBlock(residual_block_id,\n                                             kApplyLossFunction,\n                                             nullptr,\n                                             actual_f.data(),\n                                             nullptr));\n\n  EXPECT_NEAR((expected_f - actual_f).norm() / actual_f.norm(),\n              0,\n              std::numeric_limits<double>::epsilon())\n      << actual_f;\n}\n\nTEST_F(ProblemEvaluateResidualBlockTest, OneResidualBlockWithLossFunction) {\n  ResidualBlockId residual_block_id =\n      problem_.AddResidualBlock(IdentityFunctor::Create(),\n                                new ScaledLoss(nullptr, 2.0, TAKE_OWNERSHIP),\n                                x_,\n                                y_);\n  Vector expected_f(5);\n  expected_f << 1, 2, 1, 2, 3;\n  expected_f *= std::sqrt(loss_function_scale_);\n  Matrix expected_dfdx = Matrix::Zero(5, 2);\n  expected_dfdx.block(0, 0, 2, 2) = Matrix::Identity(2, 2);\n  expected_dfdx *= std::sqrt(loss_function_scale_);\n  Matrix expected_dfdy = Matrix::Zero(5, 3);\n  expected_dfdy.block(2, 0, 3, 3) = Matrix::Identity(3, 3);\n  expected_dfdy *= std::sqrt(loss_function_scale_);\n  double expected_cost = expected_f.squaredNorm() / 2.0;\n\n  double actual_cost;\n  Vector actual_f(5);\n  Matrix actual_dfdx(5, 2);\n  Matrix actual_dfdy(5, 3);\n  double* jacobians[2] = {actual_dfdx.data(), actual_dfdy.data()};\n  EXPECT_TRUE(problem_.EvaluateResidualBlock(residual_block_id,\n                                             kApplyLossFunction,\n                                             &actual_cost,\n                                             actual_f.data(),\n                                             jacobians));\n\n  EXPECT_NEAR(std::abs(expected_cost - actual_cost) / actual_cost,\n              0,\n              std::numeric_limits<double>::epsilon())\n      << actual_cost;\n  EXPECT_NEAR((expected_f - actual_f).norm() / actual_f.norm(),\n              0,\n              std::numeric_limits<double>::epsilon())\n      << actual_f;\n  EXPECT_NEAR((expected_dfdx - actual_dfdx).norm() / actual_dfdx.norm(),\n              0,\n              std::numeric_limits<double>::epsilon())\n      << actual_dfdx;\n  EXPECT_NEAR((expected_dfdy - actual_dfdy).norm() / actual_dfdy.norm(),\n              0,\n              std::numeric_limits<double>::epsilon())\n      << actual_dfdy;\n}\n\nTEST_F(ProblemEvaluateResidualBlockTest,\n       OneResidualBlockWithLossFunctionDisabled) {\n  ResidualBlockId residual_block_id =\n      problem_.AddResidualBlock(IdentityFunctor::Create(),\n                                new ScaledLoss(nullptr, 2.0, TAKE_OWNERSHIP),\n                                x_,\n                                y_);\n  Vector expected_f(5);\n  expected_f << 1, 2, 1, 2, 3;\n  Matrix expected_dfdx = Matrix::Zero(5, 2);\n  expected_dfdx.block(0, 0, 2, 2) = Matrix::Identity(2, 2);\n  Matrix expected_dfdy = Matrix::Zero(5, 3);\n  expected_dfdy.block(2, 0, 3, 3) = Matrix::Identity(3, 3);\n  double expected_cost = expected_f.squaredNorm() / 2.0;\n\n  double actual_cost;\n  Vector actual_f(5);\n  Matrix actual_dfdx(5, 2);\n  Matrix actual_dfdy(5, 3);\n  double* jacobians[2] = {actual_dfdx.data(), actual_dfdy.data()};\n  EXPECT_TRUE(problem_.EvaluateResidualBlock(residual_block_id,\n                                             kDoNotApplyLossFunction,\n                                             &actual_cost,\n                                             actual_f.data(),\n                                             jacobians));\n\n  EXPECT_NEAR(std::abs(expected_cost - actual_cost) / actual_cost,\n              0,\n              std::numeric_limits<double>::epsilon())\n      << actual_cost;\n  EXPECT_NEAR((expected_f - actual_f).norm() / actual_f.norm(),\n              0,\n              std::numeric_limits<double>::epsilon())\n      << actual_f;\n  EXPECT_NEAR((expected_dfdx - actual_dfdx).norm() / actual_dfdx.norm(),\n              0,\n              std::numeric_limits<double>::epsilon())\n      << actual_dfdx;\n  EXPECT_NEAR((expected_dfdy - actual_dfdy).norm() / actual_dfdy.norm(),\n              0,\n              std::numeric_limits<double>::epsilon())\n      << actual_dfdy;\n}\n\nTEST_F(ProblemEvaluateResidualBlockTest,\n       OneResidualBlockWithOneLocalParameterization) {\n  ResidualBlockId residual_block_id =\n      problem_.AddResidualBlock(IdentityFunctor::Create(), nullptr, x_, y_);\n  problem_.SetParameterization(x_, new SubsetParameterization(2, {1}));\n\n  Vector expected_f(5);\n  expected_f << 1, 2, 1, 2, 3;\n  Matrix expected_dfdx = Matrix::Zero(5, 1);\n  expected_dfdx.block(0, 0, 1, 1) = Matrix::Identity(1, 1);\n  Matrix expected_dfdy = Matrix::Zero(5, 3);\n  expected_dfdy.block(2, 0, 3, 3) = Matrix::Identity(3, 3);\n  double expected_cost = expected_f.squaredNorm() / 2.0;\n\n  double actual_cost;\n  Vector actual_f(5);\n  Matrix actual_dfdx(5, 1);\n  Matrix actual_dfdy(5, 3);\n  double* jacobians[2] = {actual_dfdx.data(), actual_dfdy.data()};\n  EXPECT_TRUE(problem_.EvaluateResidualBlock(residual_block_id,\n                                             kApplyLossFunction,\n                                             &actual_cost,\n                                             actual_f.data(),\n                                             jacobians));\n\n  EXPECT_NEAR(std::abs(expected_cost - actual_cost) / actual_cost,\n              0,\n              std::numeric_limits<double>::epsilon())\n      << actual_cost;\n  EXPECT_NEAR((expected_f - actual_f).norm() / actual_f.norm(),\n              0,\n              std::numeric_limits<double>::epsilon())\n      << actual_f;\n  EXPECT_NEAR((expected_dfdx - actual_dfdx).norm() / actual_dfdx.norm(),\n              0,\n              std::numeric_limits<double>::epsilon())\n      << actual_dfdx;\n  EXPECT_NEAR((expected_dfdy - actual_dfdy).norm() / actual_dfdy.norm(),\n              0,\n              std::numeric_limits<double>::epsilon())\n      << actual_dfdy;\n}\n\nTEST_F(ProblemEvaluateResidualBlockTest,\n       OneResidualBlockWithTwoLocalParameterizations) {\n  ResidualBlockId residual_block_id =\n      problem_.AddResidualBlock(IdentityFunctor::Create(), nullptr, x_, y_);\n  problem_.SetParameterization(x_, new SubsetParameterization(2, {1}));\n  problem_.SetParameterization(y_, new SubsetParameterization(3, {2}));\n\n  Vector expected_f(5);\n  expected_f << 1, 2, 1, 2, 3;\n  Matrix expected_dfdx = Matrix::Zero(5, 1);\n  expected_dfdx.block(0, 0, 1, 1) = Matrix::Identity(1, 1);\n  Matrix expected_dfdy = Matrix::Zero(5, 2);\n  expected_dfdy.block(2, 0, 2, 2) = Matrix::Identity(2, 2);\n  double expected_cost = expected_f.squaredNorm() / 2.0;\n\n  double actual_cost;\n  Vector actual_f(5);\n  Matrix actual_dfdx(5, 1);\n  Matrix actual_dfdy(5, 2);\n  double* jacobians[2] = {actual_dfdx.data(), actual_dfdy.data()};\n  EXPECT_TRUE(problem_.EvaluateResidualBlock(residual_block_id,\n                                             kApplyLossFunction,\n                                             &actual_cost,\n                                             actual_f.data(),\n                                             jacobians));\n\n  EXPECT_NEAR(std::abs(expected_cost - actual_cost) / actual_cost,\n              0,\n              std::numeric_limits<double>::epsilon())\n      << actual_cost;\n  EXPECT_NEAR((expected_f - actual_f).norm() / actual_f.norm(),\n              0,\n              std::numeric_limits<double>::epsilon())\n      << actual_f;\n  EXPECT_NEAR((expected_dfdx - actual_dfdx).norm() / actual_dfdx.norm(),\n              0,\n              std::numeric_limits<double>::epsilon())\n      << actual_dfdx;\n  EXPECT_NEAR((expected_dfdy - actual_dfdy).norm() / actual_dfdy.norm(),\n              0,\n              std::numeric_limits<double>::epsilon())\n      << actual_dfdy;\n}\n\nTEST_F(ProblemEvaluateResidualBlockTest,\n       OneResidualBlockWithOneConstantParameterBlock) {\n  ResidualBlockId residual_block_id =\n      problem_.AddResidualBlock(IdentityFunctor::Create(), nullptr, x_, y_);\n  problem_.SetParameterBlockConstant(x_);\n\n  Vector expected_f(5);\n  expected_f << 1, 2, 1, 2, 3;\n  Matrix expected_dfdy = Matrix::Zero(5, 3);\n  expected_dfdy.block(2, 0, 3, 3) = Matrix::Identity(3, 3);\n  double expected_cost = expected_f.squaredNorm() / 2.0;\n\n  double actual_cost;\n  Vector actual_f(5);\n  Matrix actual_dfdx(5, 2);\n  Matrix actual_dfdy(5, 3);\n\n  // Try evaluating both Jacobians, this should fail.\n  double* jacobians[2] = {actual_dfdx.data(), actual_dfdy.data()};\n  EXPECT_FALSE(problem_.EvaluateResidualBlock(residual_block_id,\n                                              kApplyLossFunction,\n                                              &actual_cost,\n                                              actual_f.data(),\n                                              jacobians));\n\n  jacobians[0] = nullptr;\n  EXPECT_TRUE(problem_.EvaluateResidualBlock(residual_block_id,\n                                             kApplyLossFunction,\n                                             &actual_cost,\n                                             actual_f.data(),\n                                             jacobians));\n\n  EXPECT_NEAR(std::abs(expected_cost - actual_cost) / actual_cost,\n              0,\n              std::numeric_limits<double>::epsilon())\n      << actual_cost;\n  EXPECT_NEAR((expected_f - actual_f).norm() / actual_f.norm(),\n              0,\n              std::numeric_limits<double>::epsilon())\n      << actual_f;\n  EXPECT_NEAR((expected_dfdy - actual_dfdy).norm() / actual_dfdy.norm(),\n              0,\n              std::numeric_limits<double>::epsilon())\n      << actual_dfdy;\n}\n\nTEST_F(ProblemEvaluateResidualBlockTest,\n       OneResidualBlockWithAllConstantParameterBlocks) {\n  ResidualBlockId residual_block_id =\n      problem_.AddResidualBlock(IdentityFunctor::Create(), nullptr, x_, y_);\n  problem_.SetParameterBlockConstant(x_);\n  problem_.SetParameterBlockConstant(y_);\n\n  Vector expected_f(5);\n  expected_f << 1, 2, 1, 2, 3;\n  double expected_cost = expected_f.squaredNorm() / 2.0;\n\n  double actual_cost;\n  Vector actual_f(5);\n  Matrix actual_dfdx(5, 2);\n  Matrix actual_dfdy(5, 3);\n\n  // Try evaluating with one or more Jacobians, this should fail.\n  double* jacobians[2] = {actual_dfdx.data(), actual_dfdy.data()};\n  EXPECT_FALSE(problem_.EvaluateResidualBlock(residual_block_id,\n                                              kApplyLossFunction,\n                                              &actual_cost,\n                                              actual_f.data(),\n                                              jacobians));\n\n  jacobians[0] = nullptr;\n  EXPECT_FALSE(problem_.EvaluateResidualBlock(residual_block_id,\n                                              kApplyLossFunction,\n                                              &actual_cost,\n                                              actual_f.data(),\n                                              jacobians));\n  jacobians[1] = nullptr;\n  EXPECT_TRUE(problem_.EvaluateResidualBlock(residual_block_id,\n                                             kApplyLossFunction,\n                                             &actual_cost,\n                                             actual_f.data(),\n                                             jacobians));\n\n  EXPECT_NEAR(std::abs(expected_cost - actual_cost) / actual_cost,\n              0,\n              std::numeric_limits<double>::epsilon())\n      << actual_cost;\n  EXPECT_NEAR((expected_f - actual_f).norm() / actual_f.norm(),\n              0,\n              std::numeric_limits<double>::epsilon())\n      << actual_f;\n}\n\nTEST_F(ProblemEvaluateResidualBlockTest,\n       OneResidualBlockWithOneParameterBlockConstantAndParameterBlockChanged) {\n  ResidualBlockId residual_block_id =\n      problem_.AddResidualBlock(IdentityFunctor::Create(), nullptr, x_, y_);\n  problem_.SetParameterBlockConstant(x_);\n\n  x_[0] = 2;\n  y_[2] = 1;\n  Vector expected_f(5);\n  expected_f << 2, 2, 1, 2, 1;\n  Matrix expected_dfdy = Matrix::Zero(5, 3);\n  expected_dfdy.block(2, 0, 3, 3) = Matrix::Identity(3, 3);\n  double expected_cost = expected_f.squaredNorm() / 2.0;\n\n  double actual_cost;\n  Vector actual_f(5);\n  Matrix actual_dfdx(5, 2);\n  Matrix actual_dfdy(5, 3);\n\n  // Try evaluating with one or more Jacobians, this should fail.\n  double* jacobians[2] = {actual_dfdx.data(), actual_dfdy.data()};\n  EXPECT_FALSE(problem_.EvaluateResidualBlock(residual_block_id,\n                                              kApplyLossFunction,\n                                              &actual_cost,\n                                              actual_f.data(),\n                                              jacobians));\n\n  jacobians[0] = nullptr;\n  EXPECT_TRUE(problem_.EvaluateResidualBlock(residual_block_id,\n                                             kApplyLossFunction,\n                                             &actual_cost,\n                                             actual_f.data(),\n                                             jacobians));\n  EXPECT_NEAR(std::abs(expected_cost - actual_cost) / actual_cost,\n              0,\n              std::numeric_limits<double>::epsilon())\n      << actual_cost;\n  EXPECT_NEAR((expected_f - actual_f).norm() / actual_f.norm(),\n              0,\n              std::numeric_limits<double>::epsilon())\n      << actual_f;\n  EXPECT_NEAR((expected_dfdy - actual_dfdy).norm() / actual_dfdy.norm(),\n              0,\n              std::numeric_limits<double>::epsilon())\n      << actual_dfdy;\n}\n\nTEST(Problem, SetAndGetParameterLowerBound) {\n  Problem problem;\n  double x[] = {1.0, 2.0};\n  problem.AddParameterBlock(x, 2);\n\n  EXPECT_EQ(problem.GetParameterLowerBound(x, 0),\n            -std::numeric_limits<double>::max());\n  EXPECT_EQ(problem.GetParameterLowerBound(x, 1),\n            -std::numeric_limits<double>::max());\n\n  problem.SetParameterLowerBound(x, 0, -1.0);\n  EXPECT_EQ(problem.GetParameterLowerBound(x, 0), -1.0);\n  EXPECT_EQ(problem.GetParameterLowerBound(x, 1),\n            -std::numeric_limits<double>::max());\n\n  problem.SetParameterLowerBound(x, 0, -2.0);\n  EXPECT_EQ(problem.GetParameterLowerBound(x, 0), -2.0);\n  EXPECT_EQ(problem.GetParameterLowerBound(x, 1),\n            -std::numeric_limits<double>::max());\n\n  problem.SetParameterLowerBound(x, 0, -std::numeric_limits<double>::max());\n  EXPECT_EQ(problem.GetParameterLowerBound(x, 0),\n            -std::numeric_limits<double>::max());\n  EXPECT_EQ(problem.GetParameterLowerBound(x, 1),\n            -std::numeric_limits<double>::max());\n}\n\nTEST(Problem, SetAndGetParameterUpperBound) {\n  Problem problem;\n  double x[] = {1.0, 2.0};\n  problem.AddParameterBlock(x, 2);\n\n  EXPECT_EQ(problem.GetParameterUpperBound(x, 0),\n            std::numeric_limits<double>::max());\n  EXPECT_EQ(problem.GetParameterUpperBound(x, 1),\n            std::numeric_limits<double>::max());\n\n  problem.SetParameterUpperBound(x, 0, -1.0);\n  EXPECT_EQ(problem.GetParameterUpperBound(x, 0), -1.0);\n  EXPECT_EQ(problem.GetParameterUpperBound(x, 1),\n            std::numeric_limits<double>::max());\n\n  problem.SetParameterUpperBound(x, 0, -2.0);\n  EXPECT_EQ(problem.GetParameterUpperBound(x, 0), -2.0);\n  EXPECT_EQ(problem.GetParameterUpperBound(x, 1),\n            std::numeric_limits<double>::max());\n\n  problem.SetParameterUpperBound(x, 0, std::numeric_limits<double>::max());\n  EXPECT_EQ(problem.GetParameterUpperBound(x, 0),\n            std::numeric_limits<double>::max());\n  EXPECT_EQ(problem.GetParameterUpperBound(x, 1),\n            std::numeric_limits<double>::max());\n}\n\nTEST(Problem, SetParameterizationTwice) {\n  Problem problem;\n  double x[] = {1.0, 2.0, 3.0};\n  problem.AddParameterBlock(x, 3);\n  problem.SetParameterization(x, new SubsetParameterization(3, {1}));\n  EXPECT_EQ(problem.GetParameterization(x)->GlobalSize(), 3);\n  EXPECT_EQ(problem.GetParameterization(x)->LocalSize(), 2);\n\n  problem.SetParameterization(x, new SubsetParameterization(3, {0, 1}));\n  EXPECT_EQ(problem.GetParameterization(x)->GlobalSize(), 3);\n  EXPECT_EQ(problem.GetParameterization(x)->LocalSize(), 1);\n}\n\nTEST(Problem, SetParameterizationAndThenClearItWithNull) {\n  Problem problem;\n  double x[] = {1.0, 2.0, 3.0};\n  problem.AddParameterBlock(x, 3);\n  problem.SetParameterization(x, new SubsetParameterization(3, {1}));\n  EXPECT_EQ(problem.GetParameterization(x)->GlobalSize(), 3);\n  EXPECT_EQ(problem.GetParameterization(x)->LocalSize(), 2);\n\n  problem.SetParameterization(x, nullptr);\n  EXPECT_EQ(problem.GetParameterization(x), nullptr);\n  EXPECT_EQ(problem.ParameterBlockLocalSize(x), 3);\n  EXPECT_EQ(problem.ParameterBlockSize(x), 3);\n}\n\nTEST(Solver, ZeroSizedLocalParameterizationMeansParameterBlockIsConstant) {\n  double x = 0.0;\n  double y = 1.0;\n  Problem problem;\n  problem.AddResidualBlock(new BinaryCostFunction(1, 1, 1), nullptr, &x, &y);\n  problem.SetParameterization(&y, new SubsetParameterization(1, {0}));\n  EXPECT_TRUE(problem.IsParameterBlockConstant(&y));\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/program.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n\n#include \"ceres/program.h\"\n\n#include <algorithm>\n#include <map>\n#include <memory>\n#include <vector>\n\n#include \"ceres/array_utils.h\"\n#include \"ceres/casts.h\"\n#include \"ceres/compressed_row_sparse_matrix.h\"\n#include \"ceres/cost_function.h\"\n#include \"ceres/evaluator.h\"\n#include \"ceres/internal/port.h\"\n#include \"ceres/local_parameterization.h\"\n#include \"ceres/loss_function.h\"\n#include \"ceres/map_util.h\"\n#include \"ceres/parameter_block.h\"\n#include \"ceres/problem.h\"\n#include \"ceres/residual_block.h\"\n#include \"ceres/stl_util.h\"\n#include \"ceres/triplet_sparse_matrix.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::max;\nusing std::set;\nusing std::string;\nusing std::vector;\n\nProgram::Program() {}\n\nProgram::Program(const Program& program)\n    : parameter_blocks_(program.parameter_blocks_),\n      residual_blocks_(program.residual_blocks_),\n      evaluation_callback_(program.evaluation_callback_){\n}\n\nconst vector<ParameterBlock*>& Program::parameter_blocks() const {\n  return parameter_blocks_;\n}\n\nconst vector<ResidualBlock*>& Program::residual_blocks() const {\n  return residual_blocks_;\n}\n\nvector<ParameterBlock*>* Program::mutable_parameter_blocks() {\n  return &parameter_blocks_;\n}\n\nvector<ResidualBlock*>* Program::mutable_residual_blocks() {\n  return &residual_blocks_;\n}\n\nEvaluationCallback* Program::mutable_evaluation_callback() {\n  return evaluation_callback_;\n}\n\nbool Program::StateVectorToParameterBlocks(const double *state) {\n  for (int i = 0; i < parameter_blocks_.size(); ++i) {\n    if (!parameter_blocks_[i]->IsConstant() &&\n        !parameter_blocks_[i]->SetState(state)) {\n      return false;\n    }\n    state += parameter_blocks_[i]->Size();\n  }\n  return true;\n}\n\nvoid Program::ParameterBlocksToStateVector(double *state) const {\n  for (int i = 0; i < parameter_blocks_.size(); ++i) {\n    parameter_blocks_[i]->GetState(state);\n    state += parameter_blocks_[i]->Size();\n  }\n}\n\nvoid Program::CopyParameterBlockStateToUserState() {\n  for (int i = 0; i < parameter_blocks_.size(); ++i) {\n    parameter_blocks_[i]->GetState(parameter_blocks_[i]->mutable_user_state());\n  }\n}\n\nbool Program::SetParameterBlockStatePtrsToUserStatePtrs() {\n  for (int i = 0; i < parameter_blocks_.size(); ++i) {\n    if (!parameter_blocks_[i]->IsConstant() &&\n        !parameter_blocks_[i]->SetState(parameter_blocks_[i]->user_state())) {\n      return false;\n    }\n  }\n  return true;\n}\n\nbool Program::Plus(const double* state,\n                   const double* delta,\n                   double* state_plus_delta) const {\n  for (int i = 0; i < parameter_blocks_.size(); ++i) {\n    if (!parameter_blocks_[i]->Plus(state, delta, state_plus_delta)) {\n      return false;\n    }\n    state += parameter_blocks_[i]->Size();\n    delta += parameter_blocks_[i]->LocalSize();\n    state_plus_delta += parameter_blocks_[i]->Size();\n  }\n  return true;\n}\n\nvoid Program::SetParameterOffsetsAndIndex() {\n  // Set positions for all parameters appearing as arguments to residuals to one\n  // past the end of the parameter block array.\n  for (int i = 0; i < residual_blocks_.size(); ++i) {\n    ResidualBlock* residual_block = residual_blocks_[i];\n    for (int j = 0; j < residual_block->NumParameterBlocks(); ++j) {\n      residual_block->parameter_blocks()[j]->set_index(-1);\n    }\n  }\n  // For parameters that appear in the program, set their position and offset.\n  int state_offset = 0;\n  int delta_offset = 0;\n  for (int i = 0; i < parameter_blocks_.size(); ++i) {\n    parameter_blocks_[i]->set_index(i);\n    parameter_blocks_[i]->set_state_offset(state_offset);\n    parameter_blocks_[i]->set_delta_offset(delta_offset);\n    state_offset += parameter_blocks_[i]->Size();\n    delta_offset += parameter_blocks_[i]->LocalSize();\n  }\n}\n\nbool Program::IsValid() const {\n  for (int i = 0; i < residual_blocks_.size(); ++i) {\n    const ResidualBlock* residual_block = residual_blocks_[i];\n    if (residual_block->index() != i) {\n      LOG(WARNING) << \"Residual block: \" << i\n                   << \" has incorrect index: \" << residual_block->index();\n      return false;\n    }\n  }\n\n  int state_offset = 0;\n  int delta_offset = 0;\n  for (int i = 0; i < parameter_blocks_.size(); ++i) {\n    const ParameterBlock* parameter_block = parameter_blocks_[i];\n    if (parameter_block->index() != i ||\n        parameter_block->state_offset() != state_offset ||\n        parameter_block->delta_offset() != delta_offset) {\n      LOG(WARNING) << \"Parameter block: \" << i\n                   << \"has incorrect indexing information: \"\n                   << parameter_block->ToString();\n      return false;\n    }\n\n    state_offset += parameter_blocks_[i]->Size();\n    delta_offset += parameter_blocks_[i]->LocalSize();\n  }\n\n  return true;\n}\n\nbool Program::ParameterBlocksAreFinite(string* message) const {\n  CHECK(message != nullptr);\n  for (int i = 0; i < parameter_blocks_.size(); ++i) {\n    const ParameterBlock* parameter_block = parameter_blocks_[i];\n    const double* array = parameter_block->user_state();\n    const int size = parameter_block->Size();\n    const int invalid_index = FindInvalidValue(size, array);\n    if (invalid_index != size) {\n      *message = StringPrintf(\n          \"ParameterBlock: %p with size %d has at least one invalid value.\\n\"\n          \"First invalid value is at index: %d.\\n\"\n          \"Parameter block values: \",\n          array, size, invalid_index);\n      AppendArrayToString(size, array, message);\n      return false;\n    }\n  }\n  return true;\n}\n\nbool Program::IsBoundsConstrained() const {\n  for (int i = 0; i < parameter_blocks_.size(); ++i) {\n    const ParameterBlock* parameter_block = parameter_blocks_[i];\n    if (parameter_block->IsConstant()) {\n      continue;\n    }\n    const int size = parameter_block->Size();\n    for (int j = 0; j < size; ++j) {\n      const double lower_bound = parameter_block->LowerBoundForParameter(j);\n      const double upper_bound = parameter_block->UpperBoundForParameter(j);\n      if (lower_bound > -std::numeric_limits<double>::max() ||\n          upper_bound < std::numeric_limits<double>::max()) {\n        return true;\n      }\n    }\n  }\n  return false;\n}\n\nbool Program::IsFeasible(string* message) const {\n  CHECK(message != nullptr);\n  for (int i = 0; i < parameter_blocks_.size(); ++i) {\n    const ParameterBlock* parameter_block = parameter_blocks_[i];\n    const double* parameters = parameter_block->user_state();\n    const int size = parameter_block->Size();\n    if (parameter_block->IsConstant()) {\n      // Constant parameter blocks must start in the feasible region\n      // to ultimately produce a feasible solution, since Ceres cannot\n      // change them.\n      for (int j = 0; j < size; ++j) {\n        const double lower_bound = parameter_block->LowerBoundForParameter(j);\n        const double upper_bound = parameter_block->UpperBoundForParameter(j);\n        if (parameters[j] < lower_bound || parameters[j] > upper_bound) {\n          *message = StringPrintf(\n              \"ParameterBlock: %p with size %d has at least one infeasible \"\n              \"value.\"\n              \"\\nFirst infeasible value is at index: %d.\"\n              \"\\nLower bound: %e, value: %e, upper bound: %e\"\n              \"\\nParameter block values: \",\n              parameters, size, j, lower_bound, parameters[j], upper_bound);\n          AppendArrayToString(size, parameters, message);\n          return false;\n        }\n      }\n    } else {\n      // Variable parameter blocks must have non-empty feasible\n      // regions, otherwise there is no way to produce a feasible\n      // solution.\n      for (int j = 0; j < size; ++j) {\n        const double lower_bound = parameter_block->LowerBoundForParameter(j);\n        const double upper_bound = parameter_block->UpperBoundForParameter(j);\n        if (lower_bound >= upper_bound) {\n          *message = StringPrintf(\n              \"ParameterBlock: %p with size %d has at least one infeasible \"\n              \"bound.\"\n              \"\\nFirst infeasible bound is at index: %d.\"\n              \"\\nLower bound: %e, upper bound: %e\"\n              \"\\nParameter block values: \",\n              parameters, size, j, lower_bound, upper_bound);\n          AppendArrayToString(size, parameters, message);\n          return false;\n        }\n      }\n    }\n  }\n\n  return true;\n}\n\nProgram* Program::CreateReducedProgram(\n    vector<double*>* removed_parameter_blocks,\n    double* fixed_cost,\n    string* error) const {\n  CHECK(removed_parameter_blocks != nullptr);\n  CHECK(fixed_cost != nullptr);\n  CHECK(error != nullptr);\n\n  std::unique_ptr<Program> reduced_program(new Program(*this));\n  if (!reduced_program->RemoveFixedBlocks(removed_parameter_blocks,\n                                          fixed_cost,\n                                          error)) {\n    return NULL;\n  }\n\n  reduced_program->SetParameterOffsetsAndIndex();\n  return reduced_program.release();\n}\n\nbool Program::RemoveFixedBlocks(vector<double*>* removed_parameter_blocks,\n                                double* fixed_cost,\n                                string* error) {\n  CHECK(removed_parameter_blocks != nullptr);\n  CHECK(fixed_cost != nullptr);\n  CHECK(error != nullptr);\n\n  std::unique_ptr<double[]> residual_block_evaluate_scratch;\n  residual_block_evaluate_scratch.reset(\n      new double[MaxScratchDoublesNeededForEvaluate()]);\n  *fixed_cost = 0.0;\n\n  // Mark all the parameters as unused. Abuse the index member of the\n  // parameter blocks for the marking.\n  for (int i = 0; i < parameter_blocks_.size(); ++i) {\n    parameter_blocks_[i]->set_index(-1);\n  }\n\n  // Filter out residual that have all-constant parameters, and mark\n  // all the parameter blocks that appear in residuals.\n  int num_active_residual_blocks = 0;\n  for (int i = 0; i < residual_blocks_.size(); ++i) {\n    ResidualBlock* residual_block = residual_blocks_[i];\n    int num_parameter_blocks = residual_block->NumParameterBlocks();\n\n    // Determine if the residual block is fixed, and also mark varying\n    // parameters that appear in the residual block.\n    bool all_constant = true;\n    for (int k = 0; k < num_parameter_blocks; k++) {\n      ParameterBlock* parameter_block = residual_block->parameter_blocks()[k];\n      if (!parameter_block->IsConstant()) {\n        all_constant = false;\n        parameter_block->set_index(1);\n      }\n    }\n\n    if (!all_constant) {\n      residual_blocks_[num_active_residual_blocks++] = residual_block;\n      continue;\n    }\n\n    // The residual is constant and will be removed, so its cost is\n    // added to the variable fixed_cost.\n    double cost = 0.0;\n    if (!residual_block->Evaluate(true,\n                                  &cost,\n                                  NULL,\n                                  NULL,\n                                  residual_block_evaluate_scratch.get())) {\n      *error = StringPrintf(\"Evaluation of the residual %d failed during \"\n                            \"removal of fixed residual blocks.\", i);\n      return false;\n    }\n    *fixed_cost += cost;\n  }\n  residual_blocks_.resize(num_active_residual_blocks);\n\n  // Filter out unused or fixed parameter blocks.\n  int num_active_parameter_blocks = 0;\n  removed_parameter_blocks->clear();\n  for (int i = 0; i < parameter_blocks_.size(); ++i) {\n    ParameterBlock* parameter_block = parameter_blocks_[i];\n    if (parameter_block->index() == -1) {\n      removed_parameter_blocks->push_back(\n          parameter_block->mutable_user_state());\n    } else {\n      parameter_blocks_[num_active_parameter_blocks++] = parameter_block;\n    }\n  }\n  parameter_blocks_.resize(num_active_parameter_blocks);\n\n  if (!(((NumResidualBlocks() == 0) &&\n         (NumParameterBlocks() == 0)) ||\n        ((NumResidualBlocks() != 0) &&\n         (NumParameterBlocks() != 0)))) {\n    *error =  \"Congratulations, you found a bug in Ceres. Please report it.\";\n    return false;\n  }\n\n  return true;\n}\n\nbool Program::IsParameterBlockSetIndependent(\n    const set<double*>& independent_set) const {\n  // Loop over each residual block and ensure that no two parameter\n  // blocks in the same residual block are part of\n  // parameter_block_ptrs as that would violate the assumption that it\n  // is an independent set in the Hessian matrix.\n  for (const ResidualBlock* residual_block : residual_blocks_) {\n    ParameterBlock* const* parameter_blocks =\n        residual_block->parameter_blocks();\n    const int num_parameter_blocks = residual_block->NumParameterBlocks();\n    int count = 0;\n    for (int i = 0; i < num_parameter_blocks; ++i) {\n      count += independent_set.count(\n          parameter_blocks[i]->mutable_user_state());\n    }\n    if (count > 1) {\n      return false;\n    }\n  }\n  return true;\n}\n\nstd::unique_ptr<TripletSparseMatrix>\nProgram::CreateJacobianBlockSparsityTranspose(int start_residual_block) const {\n  // Matrix to store the block sparsity structure of the Jacobian.\n  const int num_rows = NumParameterBlocks();\n  const int num_cols = NumResidualBlocks() - start_residual_block;\n\n  std::unique_ptr<TripletSparseMatrix> tsm(\n      new TripletSparseMatrix(num_rows, num_cols, 10 * num_cols));\n  int num_nonzeros = 0;\n  int* rows = tsm->mutable_rows();\n  int* cols = tsm->mutable_cols();\n  double* values = tsm->mutable_values();\n\n  for (int c = start_residual_block; c < residual_blocks_.size(); ++c) {\n    const ResidualBlock* residual_block = residual_blocks_[c];\n    const int num_parameter_blocks = residual_block->NumParameterBlocks();\n    ParameterBlock* const* parameter_blocks =\n        residual_block->parameter_blocks();\n\n    for (int j = 0; j < num_parameter_blocks; ++j) {\n      if (parameter_blocks[j]->IsConstant()) {\n        continue;\n      }\n\n      // Re-size the matrix if needed.\n      if (num_nonzeros >= tsm->max_num_nonzeros()) {\n        tsm->set_num_nonzeros(num_nonzeros);\n        tsm->Reserve(2 * num_nonzeros);\n        rows = tsm->mutable_rows();\n        cols = tsm->mutable_cols();\n        values = tsm->mutable_values();\n      }\n\n      const int r = parameter_blocks[j]->index();\n      rows[num_nonzeros] = r;\n      cols[num_nonzeros] = c - start_residual_block;\n      values[num_nonzeros] = 1.0;\n      ++num_nonzeros;\n    }\n  }\n\n  tsm->set_num_nonzeros(num_nonzeros);\n  return tsm;\n}\n\nint Program::NumResidualBlocks() const {\n  return residual_blocks_.size();\n}\n\nint Program::NumParameterBlocks() const {\n  return parameter_blocks_.size();\n}\n\nint Program::NumResiduals() const {\n  int num_residuals = 0;\n  for (int i = 0; i < residual_blocks_.size(); ++i) {\n    num_residuals += residual_blocks_[i]->NumResiduals();\n  }\n  return num_residuals;\n}\n\nint Program::NumParameters() const {\n  int num_parameters = 0;\n  for (int i = 0; i < parameter_blocks_.size(); ++i) {\n    num_parameters += parameter_blocks_[i]->Size();\n  }\n  return num_parameters;\n}\n\nint Program::NumEffectiveParameters() const {\n  int num_parameters = 0;\n  for (int i = 0; i < parameter_blocks_.size(); ++i) {\n    num_parameters += parameter_blocks_[i]->LocalSize();\n  }\n  return num_parameters;\n}\n\nint Program::MaxScratchDoublesNeededForEvaluate() const {\n  // Compute the scratch space needed for evaluate.\n  int max_scratch_bytes_for_evaluate = 0;\n  for (int i = 0; i < residual_blocks_.size(); ++i) {\n    max_scratch_bytes_for_evaluate =\n        max(max_scratch_bytes_for_evaluate,\n            residual_blocks_[i]->NumScratchDoublesForEvaluate());\n  }\n  return max_scratch_bytes_for_evaluate;\n}\n\nint Program::MaxDerivativesPerResidualBlock() const {\n  int max_derivatives = 0;\n  for (int i = 0; i < residual_blocks_.size(); ++i) {\n    int derivatives = 0;\n    ResidualBlock* residual_block = residual_blocks_[i];\n    int num_parameters = residual_block->NumParameterBlocks();\n    for (int j = 0; j < num_parameters; ++j) {\n      derivatives += residual_block->NumResiduals() *\n                     residual_block->parameter_blocks()[j]->LocalSize();\n    }\n    max_derivatives = max(max_derivatives, derivatives);\n  }\n  return max_derivatives;\n}\n\nint Program::MaxParametersPerResidualBlock() const {\n  int max_parameters = 0;\n  for (int i = 0; i < residual_blocks_.size(); ++i) {\n    max_parameters = max(max_parameters,\n                         residual_blocks_[i]->NumParameterBlocks());\n  }\n  return max_parameters;\n}\n\nint Program::MaxResidualsPerResidualBlock() const {\n  int max_residuals = 0;\n  for (int i = 0; i < residual_blocks_.size(); ++i) {\n    max_residuals = max(max_residuals, residual_blocks_[i]->NumResiduals());\n  }\n  return max_residuals;\n}\n\nstring Program::ToString() const {\n  string ret = \"Program dump\\n\";\n  ret += StringPrintf(\"Number of parameter blocks: %d\\n\", NumParameterBlocks());\n  ret += StringPrintf(\"Number of parameters: %d\\n\", NumParameters());\n  ret += \"Parameters:\\n\";\n  for (int i = 0; i < parameter_blocks_.size(); ++i) {\n    ret += StringPrintf(\"%d: %s\\n\",\n                        i, parameter_blocks_[i]->ToString().c_str());\n  }\n  return ret;\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/program.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n\n#ifndef CERES_INTERNAL_PROGRAM_H_\n#define CERES_INTERNAL_PROGRAM_H_\n\n#include <memory>\n#include <set>\n#include <string>\n#include <vector>\n#include \"ceres/internal/port.h\"\n\nnamespace ceres {\n\nclass EvaluationCallback;\n\nnamespace internal {\n\nclass ParameterBlock;\nclass ProblemImpl;\nclass ResidualBlock;\nclass TripletSparseMatrix;\n\n// A nonlinear least squares optimization problem. This is different from the\n// similarly-named \"Problem\" object, which offers a mutation interface for\n// adding and modifying parameters and residuals. The Program contains the core\n// part of the Problem, which is the parameters and the residuals, stored in a\n// particular ordering. The ordering is critical, since it defines the mapping\n// between (residual, parameter) pairs and a position in the jacobian of the\n// objective function. Various parts of Ceres transform one Program into\n// another; for example, the first stage of solving involves stripping all\n// constant parameters and residuals. This is in contrast with Problem, which is\n// not built for transformation.\nclass Program {\n public:\n  Program();\n  explicit Program(const Program& program);\n\n  // The ordered parameter and residual blocks for the program.\n  const std::vector<ParameterBlock*>& parameter_blocks() const;\n  const std::vector<ResidualBlock*>& residual_blocks() const;\n  std::vector<ParameterBlock*>* mutable_parameter_blocks();\n  std::vector<ResidualBlock*>* mutable_residual_blocks();\n  EvaluationCallback* mutable_evaluation_callback();\n\n  // Serialize to/from the program and update states.\n  //\n  // NOTE: Setting the state of a parameter block can trigger the\n  // computation of the Jacobian of its local parameterization. If\n  // this computation fails for some reason, then this method returns\n  // false and the state of the parameter blocks cannot be trusted.\n  bool StateVectorToParameterBlocks(const double *state);\n  void ParameterBlocksToStateVector(double *state) const;\n\n  // Copy internal state to the user's parameters.\n  void CopyParameterBlockStateToUserState();\n\n  // Set the parameter block pointers to the user pointers. Since this\n  // runs parameter block set state internally, which may call local\n  // parameterizations, this can fail. False is returned on failure.\n  bool SetParameterBlockStatePtrsToUserStatePtrs();\n\n  // Update a state vector for the program given a delta.\n  bool Plus(const double* state,\n            const double* delta,\n            double* state_plus_delta) const;\n\n  // Set the parameter indices and offsets. This permits mapping backward\n  // from a ParameterBlock* to an index in the parameter_blocks() vector. For\n  // any parameter block p, after calling SetParameterOffsetsAndIndex(), it\n  // is true that\n  //\n  //   parameter_blocks()[p->index()] == p\n  //\n  // If a parameter appears in a residual but not in the parameter block, then\n  // it will have an index of -1.\n  //\n  // This also updates p->state_offset() and p->delta_offset(), which are the\n  // position of the parameter in the state and delta vector respectively.\n  void SetParameterOffsetsAndIndex();\n\n  // Check if the internal state of the program (the indexing and the\n  // offsets) are correct.\n  bool IsValid() const;\n\n  bool ParameterBlocksAreFinite(std::string* message) const;\n\n  // Returns true if the program has any non-constant parameter blocks\n  // which have non-trivial bounds constraints.\n  bool IsBoundsConstrained() const;\n\n  // Returns false, if the program has any constant parameter blocks\n  // which are not feasible, or any variable parameter blocks which\n  // have a lower bound greater than or equal to the upper bound.\n  bool IsFeasible(std::string* message) const;\n\n  // Loop over each residual block and ensure that no two parameter\n  // blocks in the same residual block are part of\n  // parameter_blocks as that would violate the assumption that it\n  // is an independent set in the Hessian matrix.\n  bool IsParameterBlockSetIndependent(\n      const std::set<double*>& independent_set) const;\n\n  // Create a TripletSparseMatrix which contains the zero-one\n  // structure corresponding to the block sparsity of the transpose of\n  // the Jacobian matrix.\n  //\n  // start_residual_block which allows the user to ignore the first\n  // start_residual_block residuals.\n  std::unique_ptr<TripletSparseMatrix> CreateJacobianBlockSparsityTranspose(\n      int start_residual_block = 0) const;\n\n  // Create a copy of this program and removes constant parameter\n  // blocks and residual blocks with no varying parameter blocks while\n  // preserving their relative order.\n  //\n  // removed_parameter_blocks on exit will contain the list of\n  // parameter blocks that were removed.\n  //\n  // fixed_cost will be equal to the sum of the costs of the residual\n  // blocks that were removed.\n  //\n  // If there was a problem, then the function will return a NULL\n  // pointer and error will contain a human readable description of\n  // the problem.\n  Program* CreateReducedProgram(std::vector<double*>* removed_parameter_blocks,\n                                double* fixed_cost,\n                                std::string* error) const;\n\n  // See problem.h for what these do.\n  int NumParameterBlocks() const;\n  int NumParameters() const;\n  int NumEffectiveParameters() const;\n  int NumResidualBlocks() const;\n  int NumResiduals() const;\n\n  int MaxScratchDoublesNeededForEvaluate() const;\n  int MaxDerivativesPerResidualBlock() const;\n  int MaxParametersPerResidualBlock() const;\n  int MaxResidualsPerResidualBlock() const;\n\n  // A human-readable dump of the parameter blocks for debugging.\n  // TODO(keir): If necessary, also dump the residual blocks.\n  std::string ToString() const;\n\n private:\n  // Remove constant parameter blocks and residual blocks with no\n  // varying parameter blocks while preserving their relative order.\n  //\n  // removed_parameter_blocks on exit will contain the list of\n  // parameter blocks that were removed.\n  //\n  // fixed_cost will be equal to the sum of the costs of the residual\n  // blocks that were removed.\n  //\n  // If there was a problem, then the function will return false and\n  // error will contain a human readable description of the problem.\n  bool RemoveFixedBlocks(std::vector<double*>* removed_parameter_blocks,\n                         double* fixed_cost,\n                         std::string* message);\n\n  // The Program does not own the ParameterBlock or ResidualBlock objects.\n  std::vector<ParameterBlock*> parameter_blocks_;\n  std::vector<ResidualBlock*> residual_blocks_;\n  EvaluationCallback* evaluation_callback_ = nullptr;\n\n  friend class ProblemImpl;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_PROGRAM_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/program_evaluator.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n//\n// The ProgramEvaluator runs the cost functions contained in each residual block\n// and stores the result into a jacobian. The particular type of jacobian is\n// abstracted out using two template parameters:\n//\n//   - An \"EvaluatePreparer\" that is responsible for creating the array with\n//     pointers to the jacobian blocks where the cost function evaluates to.\n//   - A \"JacobianWriter\" that is responsible for storing the resulting\n//     jacobian blocks in the passed sparse matrix.\n//\n// This abstraction affords an efficient evaluator implementation while still\n// supporting writing to multiple sparse matrix formats. For example, when the\n// ProgramEvaluator is parameterized for writing to block sparse matrices, the\n// residual jacobians are written directly into their final position in the\n// block sparse matrix by the user's CostFunction; there is no copying.\n//\n// The evaluation is threaded with OpenMP or C++11 threads.\n//\n// The EvaluatePreparer and JacobianWriter interfaces are as follows:\n//\n//   class EvaluatePreparer {\n//     // Prepare the jacobians array for use as the destination of a call to\n//     // a cost function's evaluate method.\n//     void Prepare(const ResidualBlock* residual_block,\n//                  int residual_block_index,\n//                  SparseMatrix* jacobian,\n//                  double** jacobians);\n//   }\n//\n//   class JacobianWriter {\n//     // Create a jacobian that this writer can write. Same as\n//     // Evaluator::CreateJacobian.\n//     SparseMatrix* CreateJacobian() const;\n//\n//     // Create num_threads evaluate preparers. Caller owns result which must\n//     // be freed with delete[]. Resulting preparers are valid while *this is.\n//     EvaluatePreparer* CreateEvaluatePreparers(int num_threads);\n//\n//     // Write the block jacobians from a residual block evaluation to the\n//     // larger sparse jacobian.\n//     void Write(int residual_id,\n//                int residual_offset,\n//                double** jacobians,\n//                SparseMatrix* jacobian);\n//   }\n//\n// Note: The ProgramEvaluator is not thread safe, since internally it maintains\n// some per-thread scratch space.\n\n#ifndef CERES_INTERNAL_PROGRAM_EVALUATOR_H_\n#define CERES_INTERNAL_PROGRAM_EVALUATOR_H_\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#include <atomic>\n#include <map>\n#include <memory>\n#include <string>\n#include <vector>\n\n#include \"ceres/evaluation_callback.h\"\n#include \"ceres/execution_summary.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/parallel_for.h\"\n#include \"ceres/parameter_block.h\"\n#include \"ceres/program.h\"\n#include \"ceres/residual_block.h\"\n#include \"ceres/small_blas.h\"\n\nnamespace ceres {\nnamespace internal {\n\nstruct NullJacobianFinalizer {\n  void operator()(SparseMatrix* jacobian, int num_parameters) {}\n};\n\ntemplate<typename EvaluatePreparer,\n         typename JacobianWriter,\n         typename JacobianFinalizer = NullJacobianFinalizer>\nclass ProgramEvaluator : public Evaluator {\n public:\n  ProgramEvaluator(const Evaluator::Options &options, Program* program)\n      : options_(options),\n        program_(program),\n        jacobian_writer_(options, program),\n        evaluate_preparers_(\n            jacobian_writer_.CreateEvaluatePreparers(options.num_threads)) {\n#ifdef CERES_NO_THREADS\n    if (options_.num_threads > 1) {\n      LOG(WARNING)\n          << \"No threading support is compiled into this binary; \"\n          << \"only options.num_threads = 1 is supported. Switching \"\n          << \"to single threaded mode.\";\n      options_.num_threads = 1;\n    }\n#endif // CERES_NO_THREADS\n\n    BuildResidualLayout(*program, &residual_layout_);\n    evaluate_scratch_.reset(CreateEvaluatorScratch(*program,\n                                                   options.num_threads));\n  }\n\n  // Implementation of Evaluator interface.\n  SparseMatrix* CreateJacobian() const final {\n    return jacobian_writer_.CreateJacobian();\n  }\n\n  bool Evaluate(const Evaluator::EvaluateOptions& evaluate_options,\n                const double* state,\n                double* cost,\n                double* residuals,\n                double* gradient,\n                SparseMatrix* jacobian) final {\n    ScopedExecutionTimer total_timer(\"Evaluator::Total\", &execution_summary_);\n    ScopedExecutionTimer call_type_timer(gradient == NULL && jacobian == NULL\n                                         ? \"Evaluator::Residual\"\n                                         : \"Evaluator::Jacobian\",\n                                         &execution_summary_);\n\n    // The parameters are stateful, so set the state before evaluating.\n    if (!program_->StateVectorToParameterBlocks(state)) {\n      return false;\n    }\n\n    // Notify the user about a new evaluation point if they are interested.\n    if (options_.evaluation_callback != NULL) {\n      program_->CopyParameterBlockStateToUserState();\n      options_.evaluation_callback->PrepareForEvaluation(\n          /*jacobians=*/(gradient != NULL || jacobian != NULL),\n          evaluate_options.new_evaluation_point);\n    }\n\n    if (residuals != NULL) {\n      VectorRef(residuals, program_->NumResiduals()).setZero();\n    }\n\n    if (jacobian != NULL) {\n      jacobian->SetZero();\n    }\n\n    // Each thread gets it's own cost and evaluate scratch space.\n    for (int i = 0; i < options_.num_threads; ++i) {\n      evaluate_scratch_[i].cost = 0.0;\n      if (gradient != NULL) {\n        VectorRef(evaluate_scratch_[i].gradient.get(),\n                  program_->NumEffectiveParameters()).setZero();\n      }\n    }\n\n    const int num_residual_blocks = program_->NumResidualBlocks();\n    // This bool is used to disable the loop if an error is encountered without\n    // breaking out of it. The remaining loop iterations are still run, but with\n    // an empty body, and so will finish quickly.\n    std::atomic_bool abort(false);\n    ParallelFor(\n        options_.context,\n        0,\n        num_residual_blocks,\n        options_.num_threads,\n        [&](int thread_id, int i) {\n          if (abort) {\n            return;\n          }\n\n          EvaluatePreparer* preparer = &evaluate_preparers_[thread_id];\n          EvaluateScratch* scratch = &evaluate_scratch_[thread_id];\n\n          // Prepare block residuals if requested.\n          const ResidualBlock* residual_block = program_->residual_blocks()[i];\n          double* block_residuals = NULL;\n          if (residuals != NULL) {\n            block_residuals = residuals + residual_layout_[i];\n          } else if (gradient != NULL) {\n            block_residuals = scratch->residual_block_residuals.get();\n          }\n\n          // Prepare block jacobians if requested.\n          double** block_jacobians = NULL;\n          if (jacobian != NULL || gradient != NULL) {\n            preparer->Prepare(residual_block,\n                              i,\n                              jacobian,\n                              scratch->jacobian_block_ptrs.get());\n            block_jacobians = scratch->jacobian_block_ptrs.get();\n          }\n\n          // Evaluate the cost, residuals, and jacobians.\n          double block_cost;\n          if (!residual_block->Evaluate(\n                  evaluate_options.apply_loss_function,\n                  &block_cost,\n                  block_residuals,\n                  block_jacobians,\n                  scratch->residual_block_evaluate_scratch.get())) {\n            abort = true;\n            return;\n          }\n\n          scratch->cost += block_cost;\n\n          // Store the jacobians, if they were requested.\n          if (jacobian != NULL) {\n            jacobian_writer_.Write(i,\n                                   residual_layout_[i],\n                                   block_jacobians,\n                                   jacobian);\n          }\n\n          // Compute and store the gradient, if it was requested.\n          if (gradient != NULL) {\n            int num_residuals = residual_block->NumResiduals();\n            int num_parameter_blocks = residual_block->NumParameterBlocks();\n            for (int j = 0; j < num_parameter_blocks; ++j) {\n              const ParameterBlock* parameter_block =\n                  residual_block->parameter_blocks()[j];\n              if (parameter_block->IsConstant()) {\n                continue;\n              }\n\n              MatrixTransposeVectorMultiply<Eigen::Dynamic, Eigen::Dynamic, 1>(\n                  block_jacobians[j],\n                  num_residuals,\n                  parameter_block->LocalSize(),\n                  block_residuals,\n                  scratch->gradient.get() + parameter_block->delta_offset());\n            }\n          }\n        });\n\n    if (!abort) {\n      const int num_parameters = program_->NumEffectiveParameters();\n\n      // Sum the cost and gradient (if requested) from each thread.\n      (*cost) = 0.0;\n      if (gradient != NULL) {\n        VectorRef(gradient, num_parameters).setZero();\n      }\n      for (int i = 0; i < options_.num_threads; ++i) {\n        (*cost) += evaluate_scratch_[i].cost;\n        if (gradient != NULL) {\n          VectorRef(gradient, num_parameters) +=\n              VectorRef(evaluate_scratch_[i].gradient.get(), num_parameters);\n        }\n      }\n\n      // Finalize the Jacobian if it is available.\n      // `num_parameters` is passed to the finalizer so that additional\n      // storage can be reserved for additional diagonal elements if\n      // necessary.\n      if (jacobian != NULL) {\n        JacobianFinalizer f;\n        f(jacobian, num_parameters);\n      }\n    }\n    return !abort;\n  }\n\n  bool Plus(const double* state,\n            const double* delta,\n            double* state_plus_delta) const final {\n    return program_->Plus(state, delta, state_plus_delta);\n  }\n\n  int NumParameters() const final {\n    return program_->NumParameters();\n  }\n  int NumEffectiveParameters() const final {\n    return program_->NumEffectiveParameters();\n  }\n\n  int NumResiduals() const final {\n    return program_->NumResiduals();\n  }\n\n  std::map<std::string, CallStatistics> Statistics() const final {\n    return execution_summary_.statistics();\n  }\n\n private:\n  // Per-thread scratch space needed to evaluate and store each residual block.\n  struct EvaluateScratch {\n    void Init(int max_parameters_per_residual_block,\n              int max_scratch_doubles_needed_for_evaluate,\n              int max_residuals_per_residual_block,\n              int num_parameters) {\n      residual_block_evaluate_scratch.reset(\n          new double[max_scratch_doubles_needed_for_evaluate]);\n      gradient.reset(new double[num_parameters]);\n      VectorRef(gradient.get(), num_parameters).setZero();\n      residual_block_residuals.reset(\n          new double[max_residuals_per_residual_block]);\n      jacobian_block_ptrs.reset(\n          new double*[max_parameters_per_residual_block]);\n    }\n\n    double cost;\n    std::unique_ptr<double[]> residual_block_evaluate_scratch;\n    // The gradient in the local parameterization.\n    std::unique_ptr<double[]> gradient;\n    // Enough space to store the residual for the largest residual block.\n    std::unique_ptr<double[]> residual_block_residuals;\n    std::unique_ptr<double*[]> jacobian_block_ptrs;\n  };\n\n  static void BuildResidualLayout(const Program& program,\n                                  std::vector<int>* residual_layout) {\n    const std::vector<ResidualBlock*>& residual_blocks =\n        program.residual_blocks();\n    residual_layout->resize(program.NumResidualBlocks());\n    int residual_pos = 0;\n    for (int i = 0; i < residual_blocks.size(); ++i) {\n      const int num_residuals = residual_blocks[i]->NumResiduals();\n      (*residual_layout)[i] = residual_pos;\n      residual_pos += num_residuals;\n    }\n  }\n\n  // Create scratch space for each thread evaluating the program.\n  static EvaluateScratch* CreateEvaluatorScratch(const Program& program,\n                                                 int num_threads) {\n    int max_parameters_per_residual_block =\n        program.MaxParametersPerResidualBlock();\n    int max_scratch_doubles_needed_for_evaluate =\n        program.MaxScratchDoublesNeededForEvaluate();\n    int max_residuals_per_residual_block =\n        program.MaxResidualsPerResidualBlock();\n    int num_parameters = program.NumEffectiveParameters();\n\n    EvaluateScratch* evaluate_scratch = new EvaluateScratch[num_threads];\n    for (int i = 0; i < num_threads; i++) {\n      evaluate_scratch[i].Init(max_parameters_per_residual_block,\n                               max_scratch_doubles_needed_for_evaluate,\n                               max_residuals_per_residual_block,\n                               num_parameters);\n    }\n    return evaluate_scratch;\n  }\n\n  Evaluator::Options options_;\n  Program* program_;\n  JacobianWriter jacobian_writer_;\n  std::unique_ptr<EvaluatePreparer[]> evaluate_preparers_;\n  std::unique_ptr<EvaluateScratch[]> evaluate_scratch_;\n  std::vector<int> residual_layout_;\n  ::ceres::internal::ExecutionSummary execution_summary_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_PROGRAM_EVALUATOR_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/program_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/program.h\"\n\n#include <cmath>\n#include <limits>\n#include <memory>\n#include <vector>\n\n#include \"ceres/internal/integer_sequence_algorithm.h\"\n#include \"ceres/problem_impl.h\"\n#include \"ceres/residual_block.h\"\n#include \"ceres/sized_cost_function.h\"\n#include \"ceres/triplet_sparse_matrix.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::string;\nusing std::vector;\n\n// A cost function that simply returns its argument.\nclass UnaryIdentityCostFunction : public SizedCostFunction<1, 1> {\n public:\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const final {\n    residuals[0] = parameters[0][0];\n    if (jacobians != nullptr && jacobians[0] != nullptr) {\n      jacobians[0][0] = 1.0;\n    }\n    return true;\n  }\n};\n\n// Templated base class for the CostFunction signatures.\ntemplate <int kNumResiduals, int... Ns>\nclass MockCostFunctionBase : public SizedCostFunction<kNumResiduals, Ns...> {\n public:\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const final {\n    const int kNumParameters = Sum<integer_sequence<int, Ns...>>::Value;\n\n    for (int i = 0; i < kNumResiduals; ++i) {\n      residuals[i] = kNumResiduals + kNumParameters;\n    }\n    return true;\n  }\n};\n\nclass UnaryCostFunction : public MockCostFunctionBase<2, 1> {};\nclass BinaryCostFunction : public MockCostFunctionBase<2, 1, 1> {};\nclass TernaryCostFunction : public MockCostFunctionBase<2, 1, 1, 1> {};\n\nTEST(Program, RemoveFixedBlocksNothingConstant) {\n  ProblemImpl problem;\n  double x;\n  double y;\n  double z;\n\n  problem.AddParameterBlock(&x, 1);\n  problem.AddParameterBlock(&y, 1);\n  problem.AddParameterBlock(&z, 1);\n  problem.AddResidualBlock(new UnaryCostFunction(), nullptr, &x);\n  problem.AddResidualBlock(new BinaryCostFunction(), nullptr, &x, &y);\n  problem.AddResidualBlock(new TernaryCostFunction(), nullptr, &x, &y, &z);\n\n  vector<double*> removed_parameter_blocks;\n  double fixed_cost = 0.0;\n  string message;\n  std::unique_ptr<Program> reduced_program(problem.program().CreateReducedProgram(\n          &removed_parameter_blocks, &fixed_cost, &message));\n\n  EXPECT_EQ(reduced_program->NumParameterBlocks(), 3);\n  EXPECT_EQ(reduced_program->NumResidualBlocks(), 3);\n  EXPECT_EQ(removed_parameter_blocks.size(), 0);\n  EXPECT_EQ(fixed_cost, 0.0);\n}\n\nTEST(Program, RemoveFixedBlocksAllParameterBlocksConstant) {\n  ProblemImpl problem;\n  double x = 1.0;\n\n  problem.AddParameterBlock(&x, 1);\n  problem.AddResidualBlock(new UnaryCostFunction(), nullptr, &x);\n  problem.SetParameterBlockConstant(&x);\n\n  vector<double*> removed_parameter_blocks;\n  double fixed_cost = 0.0;\n  string message;\n  std::unique_ptr<Program> reduced_program(\n      problem.program().CreateReducedProgram(\n          &removed_parameter_blocks, &fixed_cost, &message));\n\n  EXPECT_EQ(reduced_program->NumParameterBlocks(), 0);\n  EXPECT_EQ(reduced_program->NumResidualBlocks(), 0);\n  EXPECT_EQ(removed_parameter_blocks.size(), 1);\n  EXPECT_EQ(removed_parameter_blocks[0], &x);\n  EXPECT_EQ(fixed_cost, 9.0);\n}\n\n\nTEST(Program, RemoveFixedBlocksNoResidualBlocks) {\n  ProblemImpl problem;\n  double x;\n  double y;\n  double z;\n\n  problem.AddParameterBlock(&x, 1);\n  problem.AddParameterBlock(&y, 1);\n  problem.AddParameterBlock(&z, 1);\n\n  vector<double*> removed_parameter_blocks;\n  double fixed_cost = 0.0;\n  string message;\n  std::unique_ptr<Program> reduced_program(\n      problem.program().CreateReducedProgram(\n          &removed_parameter_blocks, &fixed_cost, &message));\n  EXPECT_EQ(reduced_program->NumParameterBlocks(), 0);\n  EXPECT_EQ(reduced_program->NumResidualBlocks(), 0);\n  EXPECT_EQ(removed_parameter_blocks.size(), 3);\n  EXPECT_EQ(fixed_cost, 0.0);\n}\n\nTEST(Program, RemoveFixedBlocksOneParameterBlockConstant) {\n  ProblemImpl problem;\n  double x;\n  double y;\n  double z;\n\n  problem.AddParameterBlock(&x, 1);\n  problem.AddParameterBlock(&y, 1);\n  problem.AddParameterBlock(&z, 1);\n\n  problem.AddResidualBlock(new UnaryCostFunction(), nullptr, &x);\n  problem.AddResidualBlock(new BinaryCostFunction(), nullptr, &x, &y);\n  problem.SetParameterBlockConstant(&x);\n\n  vector<double*> removed_parameter_blocks;\n  double fixed_cost = 0.0;\n  string message;\n  std::unique_ptr<Program> reduced_program(\n      problem.program().CreateReducedProgram(\n          &removed_parameter_blocks, &fixed_cost, &message));\n  EXPECT_EQ(reduced_program->NumParameterBlocks(), 1);\n  EXPECT_EQ(reduced_program->NumResidualBlocks(), 1);\n}\n\nTEST(Program, RemoveFixedBlocksNumEliminateBlocks) {\n  ProblemImpl problem;\n  double x;\n  double y;\n  double z;\n\n  problem.AddParameterBlock(&x, 1);\n  problem.AddParameterBlock(&y, 1);\n  problem.AddParameterBlock(&z, 1);\n  problem.AddResidualBlock(new UnaryCostFunction(), nullptr, &x);\n  problem.AddResidualBlock(new TernaryCostFunction(), nullptr, &x, &y, &z);\n  problem.AddResidualBlock(new BinaryCostFunction(), nullptr, &x, &y);\n  problem.SetParameterBlockConstant(&x);\n\n  vector<double*> removed_parameter_blocks;\n  double fixed_cost = 0.0;\n  string message;\n  std::unique_ptr<Program> reduced_program(\n      problem.program().CreateReducedProgram(\n          &removed_parameter_blocks, &fixed_cost, &message));\n  EXPECT_EQ(reduced_program->NumParameterBlocks(), 2);\n  EXPECT_EQ(reduced_program->NumResidualBlocks(), 2);\n}\n\nTEST(Program, RemoveFixedBlocksFixedCost) {\n  ProblemImpl problem;\n  double x = 1.23;\n  double y = 4.56;\n  double z = 7.89;\n\n  problem.AddParameterBlock(&x, 1);\n  problem.AddParameterBlock(&y, 1);\n  problem.AddParameterBlock(&z, 1);\n  problem.AddResidualBlock(new UnaryIdentityCostFunction(), nullptr, &x);\n  problem.AddResidualBlock(new TernaryCostFunction(), nullptr, &x, &y, &z);\n  problem.AddResidualBlock(new BinaryCostFunction(), nullptr, &x, &y);\n  problem.SetParameterBlockConstant(&x);\n\n  ResidualBlock *expected_removed_block =\n      problem.program().residual_blocks()[0];\n  std::unique_ptr<double[]> scratch(\n      new double[expected_removed_block->NumScratchDoublesForEvaluate()]);\n  double expected_fixed_cost;\n  expected_removed_block->Evaluate(true,\n                                   &expected_fixed_cost,\n                                   nullptr,\n                                   nullptr,\n                                   scratch.get());\n\n\n  vector<double*> removed_parameter_blocks;\n  double fixed_cost = 0.0;\n  string message;\n  std::unique_ptr<Program> reduced_program(\n      problem.program().CreateReducedProgram(\n          &removed_parameter_blocks, &fixed_cost, &message));\n\n  EXPECT_EQ(reduced_program->NumParameterBlocks(), 2);\n  EXPECT_EQ(reduced_program->NumResidualBlocks(), 2);\n  EXPECT_DOUBLE_EQ(fixed_cost, expected_fixed_cost);\n}\n\nclass BlockJacobianTest : public ::testing::TestWithParam<int> {};\n\nTEST_P(BlockJacobianTest, CreateJacobianBlockSparsityTranspose) {\n  ProblemImpl problem;\n  double x[2];\n  double y[3];\n  double z;\n\n  problem.AddParameterBlock(x, 2);\n  problem.AddParameterBlock(y, 3);\n  problem.AddParameterBlock(&z, 1);\n\n  problem.AddResidualBlock(new MockCostFunctionBase<2, 2>(), nullptr, x);\n  problem.AddResidualBlock(new MockCostFunctionBase<3, 1, 2>(), nullptr, &z, x);\n  problem.AddResidualBlock(new MockCostFunctionBase<4, 1, 3>(), nullptr, &z, y);\n  problem.AddResidualBlock(new MockCostFunctionBase<5, 1, 3>(), nullptr, &z, y);\n  problem.AddResidualBlock(new MockCostFunctionBase<1, 2, 1>(), nullptr, x, &z);\n  problem.AddResidualBlock(new MockCostFunctionBase<2, 1, 3>(), nullptr, &z, y);\n  problem.AddResidualBlock(new MockCostFunctionBase<2, 2, 1>(), nullptr, x, &z);\n  problem.AddResidualBlock(new MockCostFunctionBase<1, 3>(), nullptr, y);\n\n  TripletSparseMatrix expected_block_sparse_jacobian(3, 8, 14);\n  {\n    int* rows = expected_block_sparse_jacobian.mutable_rows();\n    int* cols = expected_block_sparse_jacobian.mutable_cols();\n    double* values = expected_block_sparse_jacobian.mutable_values();\n    rows[0] = 0;\n    cols[0] = 0;\n\n    rows[1] = 2;\n    cols[1] = 1;\n    rows[2] = 0;\n    cols[2] = 1;\n\n    rows[3] = 2;\n    cols[3] = 2;\n    rows[4] = 1;\n    cols[4] = 2;\n\n    rows[5] = 2;\n    cols[5] = 3;\n    rows[6] = 1;\n    cols[6] = 3;\n\n    rows[7] = 0;\n    cols[7] = 4;\n    rows[8] = 2;\n    cols[8] = 4;\n\n    rows[9] = 2;\n    cols[9] = 5;\n    rows[10] = 1;\n    cols[10] = 5;\n\n    rows[11] = 0;\n    cols[11] = 6;\n    rows[12] = 2;\n    cols[12] = 6;\n\n    rows[13] = 1;\n    cols[13] = 7;\n    std::fill(values, values + 14, 1.0);\n    expected_block_sparse_jacobian.set_num_nonzeros(14);\n  }\n\n  Program* program = problem.mutable_program();\n  program->SetParameterOffsetsAndIndex();\n\n  const int start_row_block = GetParam();\n  std::unique_ptr<TripletSparseMatrix> actual_block_sparse_jacobian(\n      program->CreateJacobianBlockSparsityTranspose(start_row_block));\n\n  Matrix expected_full_dense_jacobian;\n  expected_block_sparse_jacobian.ToDenseMatrix(&expected_full_dense_jacobian);\n  Matrix expected_dense_jacobian =\n      expected_full_dense_jacobian.rightCols(8 - start_row_block);\n\n  Matrix actual_dense_jacobian;\n  actual_block_sparse_jacobian->ToDenseMatrix(&actual_dense_jacobian);\n  EXPECT_EQ(expected_dense_jacobian.rows(), actual_dense_jacobian.rows());\n  EXPECT_EQ(expected_dense_jacobian.cols(), actual_dense_jacobian.cols());\n  EXPECT_EQ((expected_dense_jacobian - actual_dense_jacobian).norm(), 0.0);\n}\n\nINSTANTIATE_TEST_SUITE_P(AllColumns,\n                         BlockJacobianTest,\n                         ::testing::Range(0, 7));\n\ntemplate <int kNumResiduals, int kNumParameterBlocks>\nclass NumParameterBlocksCostFunction : public CostFunction {\n public:\n  NumParameterBlocksCostFunction() {\n    set_num_residuals(kNumResiduals);\n    for (int i = 0; i < kNumParameterBlocks; ++i) {\n      mutable_parameter_block_sizes()->push_back(1);\n    }\n  }\n\n  virtual ~NumParameterBlocksCostFunction() {\n  }\n\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const final {\n    return true;\n  }\n};\n\nTEST(Program, ReallocationInCreateJacobianBlockSparsityTranspose) {\n  // CreateJacobianBlockSparsityTranspose starts with a conservative\n  // estimate of the size of the sparsity pattern. This test ensures\n  // that when those estimates are violated, the reallocation/resizing\n  // logic works correctly.\n\n  ProblemImpl problem;\n  double x[20];\n\n  vector<double*> parameter_blocks;\n  for (int i = 0; i < 20; ++i) {\n    problem.AddParameterBlock(x + i, 1);\n    parameter_blocks.push_back(x + i);\n  }\n\n  problem.AddResidualBlock(new NumParameterBlocksCostFunction<1, 20>(),\n                           nullptr,\n                           parameter_blocks.data(),\n                           static_cast<int>(parameter_blocks.size()));\n\n  TripletSparseMatrix expected_block_sparse_jacobian(20, 1, 20);\n  {\n    int* rows = expected_block_sparse_jacobian.mutable_rows();\n    int* cols = expected_block_sparse_jacobian.mutable_cols();\n    for (int i = 0; i < 20; ++i) {\n      rows[i] = i;\n      cols[i] = 0;\n    }\n\n    double* values = expected_block_sparse_jacobian.mutable_values();\n    std::fill(values, values + 20, 1.0);\n    expected_block_sparse_jacobian.set_num_nonzeros(20);\n  }\n\n  Program* program = problem.mutable_program();\n  program->SetParameterOffsetsAndIndex();\n\n  std::unique_ptr<TripletSparseMatrix> actual_block_sparse_jacobian(\n      program->CreateJacobianBlockSparsityTranspose());\n\n  Matrix expected_dense_jacobian;\n  expected_block_sparse_jacobian.ToDenseMatrix(&expected_dense_jacobian);\n\n  Matrix actual_dense_jacobian;\n  actual_block_sparse_jacobian->ToDenseMatrix(&actual_dense_jacobian);\n  EXPECT_EQ((expected_dense_jacobian - actual_dense_jacobian).norm(), 0.0);\n}\n\nTEST(Program, ProblemHasNanParameterBlocks) {\n  ProblemImpl problem;\n  double x[2];\n  x[0] = 1.0;\n  x[1] = std::numeric_limits<double>::quiet_NaN();\n  problem.AddResidualBlock(new MockCostFunctionBase<1, 2>(), nullptr, x);\n  string error;\n  EXPECT_FALSE(problem.program().ParameterBlocksAreFinite(&error));\n  EXPECT_NE(error.find(\"has at least one invalid value\"),\n            string::npos) << error;\n}\n\nTEST(Program, InfeasibleParameterBlock) {\n  ProblemImpl problem;\n  double x[] = {0.0, 0.0};\n  problem.AddResidualBlock(new MockCostFunctionBase<1, 2>(), nullptr, x);\n  problem.SetParameterLowerBound(x, 0, 2.0);\n  problem.SetParameterUpperBound(x, 0, 1.0);\n  string error;\n  EXPECT_FALSE(problem.program().IsFeasible(&error));\n  EXPECT_NE(error.find(\"infeasible bound\"), string::npos) << error;\n}\n\nTEST(Program, InfeasibleConstantParameterBlock) {\n  ProblemImpl problem;\n  double x[] = {0.0, 0.0};\n  problem.AddResidualBlock(new MockCostFunctionBase<1, 2>(), nullptr, x);\n  problem.SetParameterLowerBound(x, 0, 1.0);\n  problem.SetParameterUpperBound(x, 0, 2.0);\n  problem.SetParameterBlockConstant(x);\n  string error;\n  EXPECT_FALSE(problem.program().IsFeasible(&error));\n  EXPECT_NE(error.find(\"infeasible value\"), string::npos) << error;\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/random.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n//         sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_RANDOM_H_\n#define CERES_INTERNAL_RANDOM_H_\n\n#include <cmath>\n#include <cstdlib>\n#include \"ceres/internal/port.h\"\n\nnamespace ceres {\n\ninline void SetRandomState(int state) {\n  srand(state);\n}\n\ninline int Uniform(int n) {\n  if (n) {\n    return rand() % n;\n  } else {\n    return 0;\n  }\n}\n\ninline double RandDouble() {\n  double r = static_cast<double>(rand());\n  return r / RAND_MAX;\n}\n\n// Box-Muller algorithm for normal random number generation.\n// http://en.wikipedia.org/wiki/Box-Muller_transform\ninline double RandNormal() {\n  double x1, x2, w;\n  do {\n    x1 = 2.0 * RandDouble() - 1.0;\n    x2 = 2.0 * RandDouble() - 1.0;\n    w = x1 * x1 + x2 * x2;\n  } while ( w >= 1.0 || w == 0.0 );\n\n  w = sqrt((-2.0 * log(w)) / w);\n  return x1 * w;\n}\n\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_RANDOM_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/reorder_program.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/reorder_program.h\"\n\n#include <algorithm>\n#include <memory>\n#include <numeric>\n#include <vector>\n\n#include \"ceres/cxsparse.h\"\n#include \"ceres/internal/port.h\"\n#include \"ceres/ordered_groups.h\"\n#include \"ceres/parameter_block.h\"\n#include \"ceres/parameter_block_ordering.h\"\n#include \"ceres/problem_impl.h\"\n#include \"ceres/program.h\"\n#include \"ceres/residual_block.h\"\n#include \"ceres/solver.h\"\n#include \"ceres/suitesparse.h\"\n#include \"ceres/triplet_sparse_matrix.h\"\n#include \"ceres/types.h\"\n#include \"Eigen/SparseCore\"\n\n#ifdef CERES_USE_EIGEN_SPARSE\n#include \"Eigen/OrderingMethods\"\n#endif\n\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::map;\nusing std::set;\nusing std::string;\nusing std::vector;\n\nnamespace {\n\n// Find the minimum index of any parameter block to the given\n// residual.  Parameter blocks that have indices greater than\n// size_of_first_elimination_group are considered to have an index\n// equal to size_of_first_elimination_group.\nstatic int MinParameterBlock(const ResidualBlock* residual_block,\n                             int size_of_first_elimination_group) {\n  int min_parameter_block_position = size_of_first_elimination_group;\n  for (int i = 0; i < residual_block->NumParameterBlocks(); ++i) {\n    ParameterBlock* parameter_block = residual_block->parameter_blocks()[i];\n    if (!parameter_block->IsConstant()) {\n      CHECK_NE(parameter_block->index(), -1)\n          << \"Did you forget to call Program::SetParameterOffsetsAndIndex()? \"\n          << \"This is a Ceres bug; please contact the developers!\";\n      min_parameter_block_position = std::min(parameter_block->index(),\n                                              min_parameter_block_position);\n    }\n  }\n  return min_parameter_block_position;\n}\n\n#if defined(CERES_USE_EIGEN_SPARSE)\nEigen::SparseMatrix<int> CreateBlockJacobian(\n    const TripletSparseMatrix& block_jacobian_transpose) {\n  typedef Eigen::SparseMatrix<int> SparseMatrix;\n  typedef Eigen::Triplet<int> Triplet;\n\n  const int* rows = block_jacobian_transpose.rows();\n  const int* cols = block_jacobian_transpose.cols();\n  int num_nonzeros = block_jacobian_transpose.num_nonzeros();\n  vector<Triplet> triplets;\n  triplets.reserve(num_nonzeros);\n  for (int i = 0; i < num_nonzeros; ++i) {\n    triplets.push_back(Triplet(cols[i], rows[i], 1));\n  }\n\n  SparseMatrix block_jacobian(block_jacobian_transpose.num_cols(),\n                              block_jacobian_transpose.num_rows());\n  block_jacobian.setFromTriplets(triplets.begin(), triplets.end());\n  return block_jacobian;\n}\n#endif\n\nvoid OrderingForSparseNormalCholeskyUsingSuiteSparse(\n    const TripletSparseMatrix& tsm_block_jacobian_transpose,\n    const vector<ParameterBlock*>& parameter_blocks,\n    const ParameterBlockOrdering& parameter_block_ordering,\n    int* ordering) {\n#ifdef CERES_NO_SUITESPARSE\n  LOG(FATAL) << \"Congratulations, you found a Ceres bug! \"\n             << \"Please report this error to the developers.\";\n#else\n  SuiteSparse ss;\n  cholmod_sparse* block_jacobian_transpose =\n      ss.CreateSparseMatrix(\n          const_cast<TripletSparseMatrix*>(&tsm_block_jacobian_transpose));\n\n  // No CAMD or the user did not supply a useful ordering, then just\n  // use regular AMD.\n  if (parameter_block_ordering.NumGroups() <= 1 ||\n      !SuiteSparse::IsConstrainedApproximateMinimumDegreeOrderingAvailable()) {\n    ss.ApproximateMinimumDegreeOrdering(block_jacobian_transpose, &ordering[0]);\n  } else {\n    vector<int> constraints;\n    for (int i = 0; i < parameter_blocks.size(); ++i) {\n      constraints.push_back(\n          parameter_block_ordering.GroupId(\n              parameter_blocks[i]->mutable_user_state()));\n    }\n\n    // Renumber the entries of constraints to be contiguous integers\n    // as CAMD requires that the group ids be in the range [0,\n    // parameter_blocks.size() - 1].\n    MapValuesToContiguousRange(constraints.size(), &constraints[0]);\n    ss.ConstrainedApproximateMinimumDegreeOrdering(block_jacobian_transpose,\n                                                   &constraints[0],\n                                                   ordering);\n  }\n\n  VLOG(2) << \"Block ordering stats: \"\n          << \" flops: \" << ss.mutable_cc()->fl\n          << \" lnz  : \" << ss.mutable_cc()->lnz\n          << \" anz  : \" << ss.mutable_cc()->anz;\n\n  ss.Free(block_jacobian_transpose);\n#endif  // CERES_NO_SUITESPARSE\n}\n\nvoid OrderingForSparseNormalCholeskyUsingCXSparse(\n    const TripletSparseMatrix& tsm_block_jacobian_transpose,\n    int* ordering) {\n#ifdef CERES_NO_CXSPARSE\n  LOG(FATAL) << \"Congratulations, you found a Ceres bug! \"\n             << \"Please report this error to the developers.\";\n#else  // CERES_NO_CXSPARSE\n  // CXSparse works with J'J instead of J'. So compute the block\n  // sparsity for J'J and compute an approximate minimum degree\n  // ordering.\n  CXSparse cxsparse;\n  cs_di* block_jacobian_transpose;\n  block_jacobian_transpose =\n      cxsparse.CreateSparseMatrix(\n            const_cast<TripletSparseMatrix*>(&tsm_block_jacobian_transpose));\n  cs_di* block_jacobian = cxsparse.TransposeMatrix(block_jacobian_transpose);\n  cs_di* block_hessian =\n      cxsparse.MatrixMatrixMultiply(block_jacobian_transpose, block_jacobian);\n  cxsparse.Free(block_jacobian);\n  cxsparse.Free(block_jacobian_transpose);\n\n  cxsparse.ApproximateMinimumDegreeOrdering(block_hessian, ordering);\n  cxsparse.Free(block_hessian);\n#endif  // CERES_NO_CXSPARSE\n}\n\n\nvoid OrderingForSparseNormalCholeskyUsingEigenSparse(\n    const TripletSparseMatrix& tsm_block_jacobian_transpose,\n    int* ordering) {\n#ifndef CERES_USE_EIGEN_SPARSE\n  LOG(FATAL) <<\n      \"SPARSE_NORMAL_CHOLESKY cannot be used with EIGEN_SPARSE \"\n      \"because Ceres was not built with support for \"\n      \"Eigen's SimplicialLDLT decomposition. \"\n      \"This requires enabling building with -DEIGENSPARSE=ON.\";\n#else\n\n  // This conversion from a TripletSparseMatrix to a Eigen::Triplet\n  // matrix is unfortunate, but unavoidable for now. It is not a\n  // significant performance penalty in the grand scheme of\n  // things. The right thing to do here would be to get a compressed\n  // row sparse matrix representation of the jacobian and go from\n  // there. But that is a project for another day.\n  typedef Eigen::SparseMatrix<int> SparseMatrix;\n\n  const SparseMatrix block_jacobian =\n      CreateBlockJacobian(tsm_block_jacobian_transpose);\n  const SparseMatrix block_hessian =\n      block_jacobian.transpose() * block_jacobian;\n\n  Eigen::AMDOrdering<int> amd_ordering;\n  Eigen::PermutationMatrix<Eigen::Dynamic, Eigen::Dynamic, int> perm;\n  amd_ordering(block_hessian, perm);\n  for (int i = 0; i < block_hessian.rows(); ++i) {\n    ordering[i] = perm.indices()[i];\n  }\n#endif  // CERES_USE_EIGEN_SPARSE\n}\n\n}  // namespace\n\nbool ApplyOrdering(const ProblemImpl::ParameterMap& parameter_map,\n                   const ParameterBlockOrdering& ordering,\n                   Program* program,\n                   string* error) {\n  const int num_parameter_blocks =  program->NumParameterBlocks();\n  if (ordering.NumElements() != num_parameter_blocks) {\n    *error = StringPrintf(\"User specified ordering does not have the same \"\n                          \"number of parameters as the problem. The problem\"\n                          \"has %d blocks while the ordering has %d blocks.\",\n                          num_parameter_blocks,\n                          ordering.NumElements());\n    return false;\n  }\n\n  vector<ParameterBlock*>* parameter_blocks =\n      program->mutable_parameter_blocks();\n  parameter_blocks->clear();\n\n  const map<int, set<double*>>& groups = ordering.group_to_elements();\n  for (const auto& p : groups) {\n    const set<double*>& group = p.second;\n    for (double* parameter_block_ptr : group) {\n      auto it = parameter_map.find(parameter_block_ptr);\n      if (it == parameter_map.end()) {\n        *error = StringPrintf(\"User specified ordering contains a pointer \"\n                              \"to a double that is not a parameter block in \"\n                              \"the problem. The invalid double is in group: %d\",\n                              p.first);\n        return false;\n      }\n      parameter_blocks->push_back(it->second);\n    }\n  }\n  return true;\n}\n\nbool LexicographicallyOrderResidualBlocks(\n    const int size_of_first_elimination_group,\n    Program* program,\n    string* error) {\n  CHECK_GE(size_of_first_elimination_group, 1)\n      << \"Congratulations, you found a Ceres bug! Please report this error \"\n      << \"to the developers.\";\n\n  // Create a histogram of the number of residuals for each E block. There is an\n  // extra bucket at the end to catch all non-eliminated F blocks.\n  vector<int> residual_blocks_per_e_block(size_of_first_elimination_group + 1);\n  vector<ResidualBlock*>* residual_blocks = program->mutable_residual_blocks();\n  vector<int> min_position_per_residual(residual_blocks->size());\n  for (int i = 0; i < residual_blocks->size(); ++i) {\n    ResidualBlock* residual_block = (*residual_blocks)[i];\n    int position = MinParameterBlock(residual_block,\n                                     size_of_first_elimination_group);\n    min_position_per_residual[i] = position;\n    DCHECK_LE(position, size_of_first_elimination_group);\n    residual_blocks_per_e_block[position]++;\n  }\n\n  // Run a cumulative sum on the histogram, to obtain offsets to the start of\n  // each histogram bucket (where each bucket is for the residuals for that\n  // E-block).\n  vector<int> offsets(size_of_first_elimination_group + 1);\n  std::partial_sum(residual_blocks_per_e_block.begin(),\n                   residual_blocks_per_e_block.end(),\n                   offsets.begin());\n  CHECK_EQ(offsets.back(), residual_blocks->size())\n      << \"Congratulations, you found a Ceres bug! Please report this error \"\n      << \"to the developers.\";\n\n  CHECK(find(residual_blocks_per_e_block.begin(),\n             residual_blocks_per_e_block.end() - 1, 0) !=\n        residual_blocks_per_e_block.end())\n      << \"Congratulations, you found a Ceres bug! Please report this error \"\n      << \"to the developers.\";\n\n  // Fill in each bucket with the residual blocks for its corresponding E block.\n  // Each bucket is individually filled from the back of the bucket to the front\n  // of the bucket. The filling order among the buckets is dictated by the\n  // residual blocks. This loop uses the offsets as counters; subtracting one\n  // from each offset as a residual block is placed in the bucket. When the\n  // filling is finished, the offset pointerts should have shifted down one\n  // entry (this is verified below).\n  vector<ResidualBlock*> reordered_residual_blocks(\n      (*residual_blocks).size(), static_cast<ResidualBlock*>(NULL));\n  for (int i = 0; i < residual_blocks->size(); ++i) {\n    int bucket = min_position_per_residual[i];\n\n    // Decrement the cursor, which should now point at the next empty position.\n    offsets[bucket]--;\n\n    // Sanity.\n    CHECK(reordered_residual_blocks[offsets[bucket]] == NULL)\n        << \"Congratulations, you found a Ceres bug! Please report this error \"\n        << \"to the developers.\";\n\n    reordered_residual_blocks[offsets[bucket]] = (*residual_blocks)[i];\n  }\n\n  // Sanity check #1: The difference in bucket offsets should match the\n  // histogram sizes.\n  for (int i = 0; i < size_of_first_elimination_group; ++i) {\n    CHECK_EQ(residual_blocks_per_e_block[i], offsets[i + 1] - offsets[i])\n        << \"Congratulations, you found a Ceres bug! Please report this error \"\n        << \"to the developers.\";\n  }\n  // Sanity check #2: No NULL's left behind.\n  for (int i = 0; i < reordered_residual_blocks.size(); ++i) {\n    CHECK(reordered_residual_blocks[i] != NULL)\n        << \"Congratulations, you found a Ceres bug! Please report this error \"\n        << \"to the developers.\";\n  }\n\n  // Now that the residuals are collected by E block, swap them in place.\n  swap(*program->mutable_residual_blocks(), reordered_residual_blocks);\n  return true;\n}\n\n// Pre-order the columns corresponding to the schur complement if\n// possible.\nstatic void MaybeReorderSchurComplementColumnsUsingSuiteSparse(\n    const ParameterBlockOrdering& parameter_block_ordering,\n    Program* program) {\n#ifndef CERES_NO_SUITESPARSE\n  SuiteSparse ss;\n  if (!SuiteSparse::IsConstrainedApproximateMinimumDegreeOrderingAvailable()) {\n    return;\n  }\n\n  vector<int> constraints;\n  vector<ParameterBlock*>& parameter_blocks =\n      *(program->mutable_parameter_blocks());\n\n  for (int i = 0; i < parameter_blocks.size(); ++i) {\n    constraints.push_back(\n        parameter_block_ordering.GroupId(\n            parameter_blocks[i]->mutable_user_state()));\n  }\n\n  // Renumber the entries of constraints to be contiguous integers as\n  // CAMD requires that the group ids be in the range [0,\n  // parameter_blocks.size() - 1].\n  MapValuesToContiguousRange(constraints.size(), &constraints[0]);\n\n  // Compute a block sparse presentation of J'.\n  std::unique_ptr<TripletSparseMatrix> tsm_block_jacobian_transpose(\n      program->CreateJacobianBlockSparsityTranspose());\n\n  cholmod_sparse* block_jacobian_transpose =\n      ss.CreateSparseMatrix(tsm_block_jacobian_transpose.get());\n\n  vector<int> ordering(parameter_blocks.size(), 0);\n  ss.ConstrainedApproximateMinimumDegreeOrdering(block_jacobian_transpose,\n                                                 &constraints[0],\n                                                 &ordering[0]);\n  ss.Free(block_jacobian_transpose);\n\n  const vector<ParameterBlock*> parameter_blocks_copy(parameter_blocks);\n  for (int i = 0; i < program->NumParameterBlocks(); ++i) {\n    parameter_blocks[i] = parameter_blocks_copy[ordering[i]];\n  }\n\n  program->SetParameterOffsetsAndIndex();\n#endif\n}\n\nstatic void MaybeReorderSchurComplementColumnsUsingEigen(\n    const int size_of_first_elimination_group,\n    const ProblemImpl::ParameterMap& parameter_map,\n    Program* program) {\n#if defined(CERES_USE_EIGEN_SPARSE)\n  std::unique_ptr<TripletSparseMatrix> tsm_block_jacobian_transpose(\n      program->CreateJacobianBlockSparsityTranspose());\n\n  typedef Eigen::SparseMatrix<int> SparseMatrix;\n  const SparseMatrix block_jacobian =\n      CreateBlockJacobian(*tsm_block_jacobian_transpose);\n  const int num_rows = block_jacobian.rows();\n  const int num_cols = block_jacobian.cols();\n\n  // Vertically partition the jacobian in parameter blocks of type E\n  // and F.\n  const SparseMatrix E =\n      block_jacobian.block(0,\n                           0,\n                           num_rows,\n                           size_of_first_elimination_group);\n  const SparseMatrix F =\n      block_jacobian.block(0,\n                           size_of_first_elimination_group,\n                           num_rows,\n                           num_cols - size_of_first_elimination_group);\n\n  // Block sparsity pattern of the schur complement.\n  const SparseMatrix block_schur_complement =\n      F.transpose() * F - F.transpose() * E * E.transpose() * F;\n\n  Eigen::AMDOrdering<int> amd_ordering;\n  Eigen::PermutationMatrix<Eigen::Dynamic, Eigen::Dynamic, int> perm;\n  amd_ordering(block_schur_complement, perm);\n\n  const vector<ParameterBlock*>& parameter_blocks = program->parameter_blocks();\n  vector<ParameterBlock*> ordering(num_cols);\n\n  // The ordering of the first size_of_first_elimination_group does\n  // not matter, so we preserve the existing ordering.\n  for (int i = 0; i < size_of_first_elimination_group; ++i) {\n    ordering[i] = parameter_blocks[i];\n  }\n\n  // For the rest of the blocks, use the ordering computed using AMD.\n  for (int i = 0; i < block_schur_complement.cols(); ++i) {\n    ordering[size_of_first_elimination_group + i] =\n        parameter_blocks[size_of_first_elimination_group + perm.indices()[i]];\n  }\n\n  swap(*program->mutable_parameter_blocks(), ordering);\n  program->SetParameterOffsetsAndIndex();\n#endif\n}\n\nbool ReorderProgramForSchurTypeLinearSolver(\n    const LinearSolverType linear_solver_type,\n    const SparseLinearAlgebraLibraryType sparse_linear_algebra_library_type,\n    const ProblemImpl::ParameterMap& parameter_map,\n    ParameterBlockOrdering* parameter_block_ordering,\n    Program* program,\n    string* error) {\n  if (parameter_block_ordering->NumElements() !=\n      program->NumParameterBlocks()) {\n    *error = StringPrintf(\n        \"The program has %d parameter blocks, but the parameter block \"\n        \"ordering has %d parameter blocks.\",\n        program->NumParameterBlocks(),\n        parameter_block_ordering->NumElements());\n    return false;\n  }\n\n  if (parameter_block_ordering->NumGroups() == 1) {\n    // If the user supplied an parameter_block_ordering with just one\n    // group, it is equivalent to the user supplying NULL as an\n    // parameter_block_ordering. Ceres is completely free to choose the\n    // parameter block ordering as it sees fit. For Schur type solvers,\n    // this means that the user wishes for Ceres to identify the\n    // e_blocks, which we do by computing a maximal independent set.\n    vector<ParameterBlock*> schur_ordering;\n    const int size_of_first_elimination_group =\n        ComputeStableSchurOrdering(*program, &schur_ordering);\n\n    CHECK_EQ(schur_ordering.size(), program->NumParameterBlocks())\n        << \"Congratulations, you found a Ceres bug! Please report this error \"\n        << \"to the developers.\";\n\n    // Update the parameter_block_ordering object.\n    for (int i = 0; i < schur_ordering.size(); ++i) {\n      double* parameter_block = schur_ordering[i]->mutable_user_state();\n      const int group_id = (i < size_of_first_elimination_group) ? 0 : 1;\n      parameter_block_ordering->AddElementToGroup(parameter_block, group_id);\n    }\n\n    // We could call ApplyOrdering but this is cheaper and\n    // simpler.\n    swap(*program->mutable_parameter_blocks(), schur_ordering);\n  } else {\n    // The user provided an ordering with more than one elimination\n    // group.\n\n    // Verify that the first elimination group is an independent set.\n    const set<double*>& first_elimination_group =\n        parameter_block_ordering\n        ->group_to_elements()\n        .begin()\n        ->second;\n    if (!program->IsParameterBlockSetIndependent(first_elimination_group)) {\n      *error =\n          StringPrintf(\"The first elimination group in the parameter block \"\n                       \"ordering of size %zd is not an independent set\",\n                       first_elimination_group.size());\n      return false;\n    }\n\n    if (!ApplyOrdering(parameter_map,\n                       *parameter_block_ordering,\n                       program,\n                       error)) {\n      return false;\n    }\n  }\n\n  program->SetParameterOffsetsAndIndex();\n\n  const int size_of_first_elimination_group =\n      parameter_block_ordering->group_to_elements().begin()->second.size();\n\n  if (linear_solver_type == SPARSE_SCHUR) {\n    if (sparse_linear_algebra_library_type == SUITE_SPARSE) {\n      MaybeReorderSchurComplementColumnsUsingSuiteSparse(\n          *parameter_block_ordering,\n          program);\n    } else if (sparse_linear_algebra_library_type == EIGEN_SPARSE) {\n      MaybeReorderSchurComplementColumnsUsingEigen(\n          size_of_first_elimination_group,\n          parameter_map,\n          program);\n    }\n  }\n\n  // Schur type solvers also require that their residual blocks be\n  // lexicographically ordered.\n  return LexicographicallyOrderResidualBlocks(\n      size_of_first_elimination_group, program, error);\n}\n\nbool ReorderProgramForSparseCholesky(\n    const SparseLinearAlgebraLibraryType sparse_linear_algebra_library_type,\n    const ParameterBlockOrdering& parameter_block_ordering,\n    int start_row_block,\n    Program* program,\n    string* error) {\n  if (parameter_block_ordering.NumElements() != program->NumParameterBlocks()) {\n    *error = StringPrintf(\n        \"The program has %d parameter blocks, but the parameter block \"\n        \"ordering has %d parameter blocks.\",\n        program->NumParameterBlocks(),\n        parameter_block_ordering.NumElements());\n    return false;\n  }\n\n  // Compute a block sparse presentation of J'.\n  std::unique_ptr<TripletSparseMatrix> tsm_block_jacobian_transpose(\n      program->CreateJacobianBlockSparsityTranspose(start_row_block));\n\n  vector<int> ordering(program->NumParameterBlocks(), 0);\n  vector<ParameterBlock*>& parameter_blocks =\n      *(program->mutable_parameter_blocks());\n\n  if (sparse_linear_algebra_library_type == SUITE_SPARSE) {\n    OrderingForSparseNormalCholeskyUsingSuiteSparse(\n        *tsm_block_jacobian_transpose,\n        parameter_blocks,\n        parameter_block_ordering,\n        &ordering[0]);\n  } else if (sparse_linear_algebra_library_type == CX_SPARSE) {\n    OrderingForSparseNormalCholeskyUsingCXSparse(\n        *tsm_block_jacobian_transpose,\n        &ordering[0]);\n  } else if (sparse_linear_algebra_library_type == ACCELERATE_SPARSE) {\n    // Accelerate does not provide a function to perform reordering without\n    // performing a full symbolic factorisation.  As such, we have nothing\n    // to gain from trying to reorder the problem here, as it will happen\n    // in AppleAccelerateCholesky::Factorize() (once) and reordering here\n    // would involve performing two symbolic factorisations instead of one\n    // which would have a negative overall impact on performance.\n    return true;\n\n  } else if (sparse_linear_algebra_library_type == EIGEN_SPARSE) {\n    OrderingForSparseNormalCholeskyUsingEigenSparse(\n        *tsm_block_jacobian_transpose,\n        &ordering[0]);\n  }\n\n  // Apply ordering.\n  const vector<ParameterBlock*> parameter_blocks_copy(parameter_blocks);\n  for (int i = 0; i < program->NumParameterBlocks(); ++i) {\n    parameter_blocks[i] = parameter_blocks_copy[ordering[i]];\n  }\n\n  program->SetParameterOffsetsAndIndex();\n  return true;\n}\n\nint ReorderResidualBlocksByPartition(\n    const std::unordered_set<ResidualBlockId>& bottom_residual_blocks,\n    Program* program) {\n  auto residual_blocks = program->mutable_residual_blocks();\n  auto it = std::partition(\n      residual_blocks->begin(), residual_blocks->end(),\n      [&bottom_residual_blocks](ResidualBlock* r) {\n        return bottom_residual_blocks.count(r) == 0;\n      });\n  return it - residual_blocks->begin();\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/reorder_program.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_REORDER_PROGRAM_H_\n#define CERES_INTERNAL_REORDER_PROGRAM_H_\n\n#include <string>\n#include \"ceres/internal/port.h\"\n#include \"ceres/parameter_block_ordering.h\"\n#include \"ceres/problem_impl.h\"\n#include \"ceres/types.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass Program;\n\n// Reorder the parameter blocks in program using the ordering\nbool ApplyOrdering(const ProblemImpl::ParameterMap& parameter_map,\n                   const ParameterBlockOrdering& ordering,\n                   Program* program,\n                   std::string* error);\n\n// Reorder the residuals for program, if necessary, so that the residuals\n// involving each E block occur together. This is a necessary condition for the\n// Schur eliminator, which works on these \"row blocks\" in the jacobian.\nbool LexicographicallyOrderResidualBlocks(int size_of_first_elimination_group,\n                                          Program* program,\n                                          std::string* error);\n\n// Schur type solvers require that all parameter blocks eliminated\n// by the Schur eliminator occur before others and the residuals be\n// sorted in lexicographic order of their parameter blocks.\n//\n// If the parameter_block_ordering only contains one elimination\n// group then a maximal independent set is computed and used as the\n// first elimination group, otherwise the user's ordering is used.\n//\n// If the linear solver type is SPARSE_SCHUR and support for\n// constrained fill-reducing ordering is available in the sparse\n// linear algebra library (SuiteSparse version >= 4.2.0) then\n// columns of the schur complement matrix are ordered to reduce the\n// fill-in the Cholesky factorization.\n//\n// Upon return, ordering contains the parameter block ordering that\n// was used to order the program.\nbool ReorderProgramForSchurTypeLinearSolver(\n    LinearSolverType linear_solver_type,\n    SparseLinearAlgebraLibraryType sparse_linear_algebra_library_type,\n    const ProblemImpl::ParameterMap& parameter_map,\n    ParameterBlockOrdering* parameter_block_ordering,\n    Program* program,\n    std::string* error);\n\n// Sparse cholesky factorization routines when doing the sparse\n// cholesky factorization of the Jacobian matrix, reorders its\n// columns to reduce the fill-in. Compute this permutation and\n// re-order the parameter blocks.\n//\n// When using SuiteSparse, if the parameter_block_ordering contains\n// more than one elimination group and support for constrained\n// fill-reducing ordering is available in the sparse linear algebra\n// library (SuiteSparse version >= 4.2.0) then the fill reducing\n// ordering will take it into account, otherwise it will be ignored.\nbool ReorderProgramForSparseCholesky(\n    SparseLinearAlgebraLibraryType sparse_linear_algebra_library_type,\n    const ParameterBlockOrdering& parameter_block_ordering,\n    int start_row_block,\n    Program* program,\n    std::string* error);\n\n// Reorder the residual blocks in the program so that all the residual\n// blocks in bottom_residual_blocks are at the bottom. The return\n// value is the number of residual blocks in the program in \"top\" part\n// of the Program, i.e., the ones not included in\n// bottom_residual_blocks.\n//\n// This number can be different from program->NumResidualBlocks() -\n// bottom_residual_blocks.size() because we allow\n// bottom_residual_blocks to contain residual blocks not present in\n// the Program.\nint ReorderResidualBlocksByPartition(\n    const std::unordered_set<ResidualBlockId>& bottom_residual_blocks,\n    Program* program);\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_REORDER_PROGRAM_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/reorder_program_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/reorder_program.h\"\n\n#include <random>\n#include \"ceres/parameter_block.h\"\n#include \"ceres/problem_impl.h\"\n#include \"ceres/program.h\"\n#include \"ceres/sized_cost_function.h\"\n#include \"ceres/solver.h\"\n#include \"gmock/gmock.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::vector;\n\n// Templated base class for the CostFunction signatures.\ntemplate <int kNumResiduals, int... Ns>\nclass MockCostFunctionBase : public SizedCostFunction<kNumResiduals, Ns...> {\n public:\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const final {\n    // Do nothing. This is never called.\n    return true;\n  }\n};\n\nclass UnaryCostFunction : public MockCostFunctionBase<2, 1> {};\nclass BinaryCostFunction : public MockCostFunctionBase<2, 1, 1> {};\nclass TernaryCostFunction : public MockCostFunctionBase<2, 1, 1, 1> {};\n\nTEST(_, ReorderResidualBlockNormalFunction) {\n  ProblemImpl problem;\n  double x;\n  double y;\n  double z;\n\n  problem.AddParameterBlock(&x, 1);\n  problem.AddParameterBlock(&y, 1);\n  problem.AddParameterBlock(&z, 1);\n\n  problem.AddResidualBlock(new UnaryCostFunction(), nullptr, &x);\n  problem.AddResidualBlock(new BinaryCostFunction(), nullptr, &z, &x);\n  problem.AddResidualBlock(new BinaryCostFunction(), nullptr, &z, &y);\n  problem.AddResidualBlock(new UnaryCostFunction(), nullptr, &z);\n  problem.AddResidualBlock(new BinaryCostFunction(), nullptr, &x, &y);\n  problem.AddResidualBlock(new UnaryCostFunction(), nullptr, &y);\n\n  ParameterBlockOrdering* linear_solver_ordering = new ParameterBlockOrdering;\n  linear_solver_ordering->AddElementToGroup(&x, 0);\n  linear_solver_ordering->AddElementToGroup(&y, 0);\n  linear_solver_ordering->AddElementToGroup(&z, 1);\n\n  Solver::Options options;\n  options.linear_solver_type = DENSE_SCHUR;\n  options.linear_solver_ordering.reset(linear_solver_ordering);\n\n  const vector<ResidualBlock*>& residual_blocks =\n      problem.program().residual_blocks();\n\n  vector<ResidualBlock*> expected_residual_blocks;\n\n  // This is a bit fragile, but it serves the purpose. We know the\n  // bucketing algorithm that the reordering function uses, so we\n  // expect the order for residual blocks for each e_block to be\n  // filled in reverse.\n  expected_residual_blocks.push_back(residual_blocks[4]);\n  expected_residual_blocks.push_back(residual_blocks[1]);\n  expected_residual_blocks.push_back(residual_blocks[0]);\n  expected_residual_blocks.push_back(residual_blocks[5]);\n  expected_residual_blocks.push_back(residual_blocks[2]);\n  expected_residual_blocks.push_back(residual_blocks[3]);\n\n  Program* program = problem.mutable_program();\n  program->SetParameterOffsetsAndIndex();\n\n  std::string message;\n  EXPECT_TRUE(LexicographicallyOrderResidualBlocks(\n                  2,\n                  problem.mutable_program(),\n                  &message));\n  EXPECT_EQ(residual_blocks.size(), expected_residual_blocks.size());\n  for (int i = 0; i < expected_residual_blocks.size(); ++i) {\n    EXPECT_EQ(residual_blocks[i], expected_residual_blocks[i]);\n  }\n}\n\nTEST(_, ApplyOrderingOrderingTooSmall) {\n  ProblemImpl problem;\n  double x;\n  double y;\n  double z;\n\n  problem.AddParameterBlock(&x, 1);\n  problem.AddParameterBlock(&y, 1);\n  problem.AddParameterBlock(&z, 1);\n\n  ParameterBlockOrdering linear_solver_ordering;\n  linear_solver_ordering.AddElementToGroup(&x, 0);\n  linear_solver_ordering.AddElementToGroup(&y, 1);\n\n  Program program(problem.program());\n  std::string message;\n  EXPECT_FALSE(ApplyOrdering(problem.parameter_map(),\n                             linear_solver_ordering,\n                             &program,\n                             &message));\n}\n\nTEST(_, ApplyOrderingNormal) {\n  ProblemImpl problem;\n  double x;\n  double y;\n  double z;\n\n  problem.AddParameterBlock(&x, 1);\n  problem.AddParameterBlock(&y, 1);\n  problem.AddParameterBlock(&z, 1);\n\n  ParameterBlockOrdering linear_solver_ordering;\n  linear_solver_ordering.AddElementToGroup(&x, 0);\n  linear_solver_ordering.AddElementToGroup(&y, 2);\n  linear_solver_ordering.AddElementToGroup(&z, 1);\n\n  Program* program = problem.mutable_program();\n  std::string message;\n\n  EXPECT_TRUE(ApplyOrdering(problem.parameter_map(),\n                            linear_solver_ordering,\n                            program,\n                            &message));\n  const vector<ParameterBlock*>& parameter_blocks = program->parameter_blocks();\n\n  EXPECT_EQ(parameter_blocks.size(), 3);\n  EXPECT_EQ(parameter_blocks[0]->user_state(), &x);\n  EXPECT_EQ(parameter_blocks[1]->user_state(), &z);\n  EXPECT_EQ(parameter_blocks[2]->user_state(), &y);\n}\n\n#ifndef CERES_NO_SUITESPARSE\nclass ReorderProgramFoSparseCholeskyUsingSuiteSparseTest :\n      public ::testing::Test {\n protected:\n  void SetUp() {\n    problem_.AddResidualBlock(new UnaryCostFunction(), nullptr, &x_);\n    problem_.AddResidualBlock(new BinaryCostFunction(), nullptr, &z_, &x_);\n    problem_.AddResidualBlock(new BinaryCostFunction(), nullptr, &z_, &y_);\n    problem_.AddResidualBlock(new UnaryCostFunction(), nullptr, &z_);\n    problem_.AddResidualBlock(new BinaryCostFunction(), nullptr, &x_, &y_);\n    problem_.AddResidualBlock(new UnaryCostFunction(), nullptr, &y_);\n  }\n\n  void ComputeAndValidateOrdering(\n      const ParameterBlockOrdering& linear_solver_ordering) {\n    Program* program = problem_.mutable_program();\n    vector<ParameterBlock*> unordered_parameter_blocks =\n        program->parameter_blocks();\n\n    std::string error;\n    EXPECT_TRUE(ReorderProgramForSparseCholesky(\n                    ceres::SUITE_SPARSE,\n                    linear_solver_ordering,\n                    0, /* use all rows */\n                    program,\n                    &error));\n    const vector<ParameterBlock*>& ordered_parameter_blocks =\n        program->parameter_blocks();\n    EXPECT_EQ(ordered_parameter_blocks.size(),\n              unordered_parameter_blocks.size());\n\n    EXPECT_THAT(unordered_parameter_blocks,\n                ::testing::UnorderedElementsAreArray(ordered_parameter_blocks));\n  }\n\n  ProblemImpl problem_;\n  double x_;\n  double y_;\n  double z_;\n};\n\nTEST_F(ReorderProgramFoSparseCholeskyUsingSuiteSparseTest,\n       EverythingInGroupZero) {\n  ParameterBlockOrdering linear_solver_ordering;\n  linear_solver_ordering.AddElementToGroup(&x_, 0);\n  linear_solver_ordering.AddElementToGroup(&y_, 0);\n  linear_solver_ordering.AddElementToGroup(&z_, 0);\n\n  ComputeAndValidateOrdering(linear_solver_ordering);\n}\n\nTEST_F(ReorderProgramFoSparseCholeskyUsingSuiteSparseTest,\n       ContiguousGroups) {\n  ParameterBlockOrdering linear_solver_ordering;\n  linear_solver_ordering.AddElementToGroup(&x_, 0);\n  linear_solver_ordering.AddElementToGroup(&y_, 1);\n  linear_solver_ordering.AddElementToGroup(&z_, 2);\n\n  ComputeAndValidateOrdering(linear_solver_ordering);\n}\n\nTEST_F(ReorderProgramFoSparseCholeskyUsingSuiteSparseTest,\n       GroupsWithGaps) {\n  ParameterBlockOrdering linear_solver_ordering;\n  linear_solver_ordering.AddElementToGroup(&x_, 0);\n  linear_solver_ordering.AddElementToGroup(&y_, 2);\n  linear_solver_ordering.AddElementToGroup(&z_, 2);\n\n  ComputeAndValidateOrdering(linear_solver_ordering);\n}\n\nTEST_F(ReorderProgramFoSparseCholeskyUsingSuiteSparseTest,\n       NonContiguousStartingAtTwo) {\n  ParameterBlockOrdering linear_solver_ordering;\n  linear_solver_ordering.AddElementToGroup(&x_, 2);\n  linear_solver_ordering.AddElementToGroup(&y_, 4);\n  linear_solver_ordering.AddElementToGroup(&z_, 4);\n\n  ComputeAndValidateOrdering(linear_solver_ordering);\n}\n#endif  // CERES_NO_SUITESPARSE\n\nTEST(_, ReorderResidualBlocksbyPartition) {\n  ProblemImpl problem;\n  double x;\n  double y;\n  double z;\n\n  problem.AddParameterBlock(&x, 1);\n  problem.AddParameterBlock(&y, 1);\n  problem.AddParameterBlock(&z, 1);\n\n  problem.AddResidualBlock(new UnaryCostFunction(), nullptr, &x);\n  problem.AddResidualBlock(new BinaryCostFunction(), nullptr, &z, &x);\n  problem.AddResidualBlock(new BinaryCostFunction(), nullptr, &z, &y);\n  problem.AddResidualBlock(new UnaryCostFunction(), nullptr, &z);\n  problem.AddResidualBlock(new BinaryCostFunction(), nullptr, &x, &y);\n  problem.AddResidualBlock(new UnaryCostFunction(), nullptr, &y);\n\n  std::vector<ResidualBlockId> residual_block_ids;\n  problem.GetResidualBlocks(&residual_block_ids);\n  std::vector<ResidualBlock*> residual_blocks =\n      problem.program().residual_blocks();\n  auto rng = std::default_random_engine{};\n  for (int i = 1; i < 6; ++i) {\n    std::shuffle(\n        std::begin(residual_block_ids), std::end(residual_block_ids), rng);\n    std::unordered_set<ResidualBlockId> bottom(residual_block_ids.begin(),\n                                               residual_block_ids.begin() + i);\n    const int start_bottom =\n        ReorderResidualBlocksByPartition(bottom, problem.mutable_program());\n    std::vector<ResidualBlock*> actual_residual_blocks =\n        problem.program().residual_blocks();\n    EXPECT_THAT(actual_residual_blocks,\n                testing::UnorderedElementsAreArray(residual_blocks));\n    EXPECT_EQ(start_bottom, residual_blocks.size() - i);\n    for (int j = start_bottom; j < residual_blocks.size(); ++j) {\n      EXPECT_THAT(bottom, ::testing::Contains(actual_residual_blocks[j]));\n    }\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/residual_block.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n//         sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/residual_block.h\"\n\n#include <algorithm>\n#include <cstddef>\n#include <vector>\n#include \"ceres/corrector.h\"\n#include \"ceres/cost_function.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/internal/fixed_array.h\"\n#include \"ceres/local_parameterization.h\"\n#include \"ceres/loss_function.h\"\n#include \"ceres/parameter_block.h\"\n#include \"ceres/residual_block_utils.h\"\n#include \"ceres/small_blas.h\"\n\nusing Eigen::Dynamic;\n\nnamespace ceres {\nnamespace internal {\n\nResidualBlock::ResidualBlock(\n    const CostFunction* cost_function, const LossFunction* loss_function,\n    const std::vector<ParameterBlock*>& parameter_blocks, int index)\n    : cost_function_(cost_function),\n      loss_function_(loss_function),\n      parameter_blocks_(\n          new ParameterBlock*[cost_function->parameter_block_sizes().size()]),\n      index_(index) {\n  CHECK(cost_function_ != nullptr);\n  std::copy(parameter_blocks.begin(),\n            parameter_blocks.end(),\n            parameter_blocks_.get());\n}\n\nbool ResidualBlock::Evaluate(const bool apply_loss_function,\n                             double* cost,\n                             double* residuals,\n                             double** jacobians,\n                             double* scratch) const {\n  const int num_parameter_blocks = NumParameterBlocks();\n  const int num_residuals = cost_function_->num_residuals();\n\n  // Collect the parameters from their blocks. This will rarely allocate, since\n  // residuals taking more than 8 parameter block arguments are rare.\n  FixedArray<const double*, 8> parameters(num_parameter_blocks);\n  for (int i = 0; i < num_parameter_blocks; ++i) {\n    parameters[i] = parameter_blocks_[i]->state();\n  }\n\n  // Put pointers into the scratch space into global_jacobians as appropriate.\n  FixedArray<double*, 8> global_jacobians(num_parameter_blocks);\n  if (jacobians != nullptr) {\n    for (int i = 0; i < num_parameter_blocks; ++i) {\n      const ParameterBlock* parameter_block = parameter_blocks_[i];\n      if (jacobians[i] != nullptr &&\n          parameter_block->LocalParameterizationJacobian() != nullptr) {\n        global_jacobians[i] = scratch;\n        scratch += num_residuals * parameter_block->Size();\n      } else {\n        global_jacobians[i] = jacobians[i];\n      }\n    }\n  }\n\n  // If the caller didn't request residuals, use the scratch space for them.\n  bool outputting_residuals = (residuals != nullptr);\n  if (!outputting_residuals) {\n    residuals = scratch;\n  }\n\n  // Invalidate the evaluation buffers so that we can check them after\n  // the CostFunction::Evaluate call, to see if all the return values\n  // that were required were written to and that they are finite.\n  double** eval_jacobians =\n      (jacobians != nullptr) ? global_jacobians.data() : nullptr;\n\n  InvalidateEvaluation(*this, cost, residuals, eval_jacobians);\n\n  if (!cost_function_->Evaluate(parameters.data(), residuals, eval_jacobians)) {\n    return false;\n  }\n\n  if (!IsEvaluationValid(*this,\n                         parameters.data(),\n                         cost,\n                         residuals,\n                         eval_jacobians)) {\n    std::string message =\n        \"\\n\\n\"\n        \"Error in evaluating the ResidualBlock.\\n\\n\"\n        \"There are two possible reasons. Either the CostFunction did not evaluate and fill all    \\n\"  // NOLINT\n        \"residual and jacobians that were requested or there was a non-finite value (nan/infinite)\\n\"  // NOLINT\n        \"generated during the or jacobian computation. \\n\\n\" +\n        EvaluationToString(*this,\n                           parameters.data(),\n                           cost,\n                           residuals,\n                           eval_jacobians);\n    LOG(WARNING) << message;\n    return false;\n  }\n\n  double squared_norm = VectorRef(residuals, num_residuals).squaredNorm();\n\n  // Update the jacobians with the local parameterizations.\n  if (jacobians != nullptr) {\n    for (int i = 0; i < num_parameter_blocks; ++i) {\n      if (jacobians[i] != nullptr) {\n        const ParameterBlock* parameter_block = parameter_blocks_[i];\n\n        // Apply local reparameterization to the jacobians.\n        if (parameter_block->LocalParameterizationJacobian() != nullptr) {\n          // jacobians[i] = global_jacobians[i] * global_to_local_jacobian.\n          MatrixMatrixMultiply<Dynamic, Dynamic, Dynamic, Dynamic, 0>(\n              global_jacobians[i],\n              num_residuals,\n              parameter_block->Size(),\n              parameter_block->LocalParameterizationJacobian(),\n              parameter_block->Size(),\n              parameter_block->LocalSize(),\n              jacobians[i], 0, 0,  num_residuals, parameter_block->LocalSize());\n        }\n      }\n    }\n  }\n\n  if (loss_function_ == nullptr || !apply_loss_function) {\n    *cost = 0.5 * squared_norm;\n    return true;\n  }\n\n  double rho[3];\n  loss_function_->Evaluate(squared_norm, rho);\n  *cost = 0.5 * rho[0];\n\n  // No jacobians and not outputting residuals? All done. Doing an early exit\n  // here avoids constructing the \"Corrector\" object below in a common case.\n  if (jacobians == nullptr && !outputting_residuals) {\n    return true;\n  }\n\n  // Correct for the effects of the loss function. The jacobians need to be\n  // corrected before the residuals, since they use the uncorrected residuals.\n  Corrector correct(squared_norm, rho);\n  if (jacobians != nullptr) {\n    for (int i = 0; i < num_parameter_blocks; ++i) {\n      if (jacobians[i] != nullptr) {\n        const ParameterBlock* parameter_block = parameter_blocks_[i];\n\n        // Correct the jacobians for the loss function.\n        correct.CorrectJacobian(num_residuals,\n                                parameter_block->LocalSize(),\n                                residuals,\n                                jacobians[i]);\n      }\n    }\n  }\n\n  // Correct the residuals with the loss function.\n  if (outputting_residuals) {\n    correct.CorrectResiduals(num_residuals, residuals);\n  }\n  return true;\n}\n\nint ResidualBlock::NumScratchDoublesForEvaluate() const {\n  // Compute the amount of scratch space needed to store the full-sized\n  // jacobians. For parameters that have no local parameterization  no storage\n  // is needed and the passed-in jacobian array is used directly. Also include\n  // space to store the residuals, which is needed for cost-only evaluations.\n  // This is slightly pessimistic, since both won't be needed all the time, but\n  // the amount of excess should not cause problems for the caller.\n  int num_parameters = NumParameterBlocks();\n  int scratch_doubles = 1;\n  for (int i = 0; i < num_parameters; ++i) {\n    const ParameterBlock* parameter_block = parameter_blocks_[i];\n    if (parameter_block->LocalParameterizationJacobian() != nullptr) {\n      scratch_doubles += parameter_block->Size();\n    }\n  }\n  scratch_doubles *= NumResiduals();\n  return scratch_doubles;\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/residual_block.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//         keir@google.com (Keir Mierle)\n//\n// Purpose : Class and struct definitions for parameter and residual blocks.\n\n#ifndef CERES_INTERNAL_RESIDUAL_BLOCK_H_\n#define CERES_INTERNAL_RESIDUAL_BLOCK_H_\n\n#include <cstdint>\n#include <memory>\n#include <string>\n#include <vector>\n\n#include \"ceres/cost_function.h\"\n#include \"ceres/internal/port.h\"\n#include \"ceres/stringprintf.h\"\n#include \"ceres/types.h\"\n\nnamespace ceres {\n\nclass LossFunction;\n\nnamespace internal {\n\nclass ParameterBlock;\n\n// A term in the least squares problem. The mathematical form of each term in\n// the overall least-squares cost function is:\n//\n//    1\n//   --- loss_function( || cost_function(block1, block2, ...) ||^2  ),\n//    2\n//\n// Storing the cost function and the loss function separately permits optimizing\n// the problem with standard non-linear least techniques, without requiring a\n// more general non-linear solver.\n//\n// The residual block stores pointers to but does not own the cost functions,\n// loss functions, and parameter blocks.\nclass ResidualBlock {\n public:\n  // Construct the residual block with the given cost/loss functions. Loss may\n  // be null. The index is the index of the residual block in the Program's\n  // residual_blocks array.\n  ResidualBlock(const CostFunction* cost_function,\n                const LossFunction* loss_function,\n                const std::vector<ParameterBlock*>& parameter_blocks,\n                int index);\n\n  // Evaluates the residual term, storing the scalar cost in *cost, the residual\n  // components in *residuals, and the jacobians between the parameters and\n  // residuals in jacobians[i], in row-major order. If residuals is NULL, the\n  // residuals are not computed. If jacobians is NULL, no jacobians are\n  // computed. If jacobians[i] is NULL, then the jacobian for that parameter is\n  // not computed.\n  //\n  // cost must not be null.\n  //\n  // Evaluate needs scratch space which must be supplied by the caller via\n  // scratch. The array should have at least NumScratchDoublesForEvaluate()\n  // space available.\n  //\n  // The return value indicates the success or failure. If the function returns\n  // false, the caller should expect the output memory locations to have\n  // been modified.\n  //\n  // The returned cost and jacobians have had robustification and local\n  // parameterizations applied already; for example, the jacobian for a\n  // 4-dimensional quaternion parameter using the \"QuaternionParameterization\"\n  // is num_residuals by 3 instead of num_residuals by 4.\n  //\n  // apply_loss_function as the name implies allows the user to switch\n  // the application of the loss function on and off.\n  bool Evaluate(bool apply_loss_function,\n                double* cost,\n                double* residuals,\n                double** jacobians,\n                double* scratch) const;\n\n\n  const CostFunction* cost_function() const { return cost_function_; }\n  const LossFunction* loss_function() const { return loss_function_; }\n\n  // Access the parameter blocks for this residual. The array has size\n  // NumParameterBlocks().\n  ParameterBlock* const* parameter_blocks() const {\n    return parameter_blocks_.get();\n  }\n\n  // Number of variable blocks that this residual term depends on.\n  int NumParameterBlocks() const {\n    return cost_function_->parameter_block_sizes().size();\n  }\n\n  // The size of the residual vector returned by this residual function.\n  int NumResiduals() const { return cost_function_->num_residuals(); }\n\n  // The minimum amount of scratch space needed to pass to Evaluate().\n  int NumScratchDoublesForEvaluate() const;\n\n  // This residual block's index in an array.\n  int index() const { return index_; }\n  void set_index(int index) { index_ = index; }\n\n  std::string ToString() const {\n    return StringPrintf(\"{residual block; index=%d}\", index_);\n  }\n\n private:\n  const CostFunction* cost_function_;\n  const LossFunction* loss_function_;\n  std::unique_ptr<ParameterBlock*[]> parameter_blocks_;\n\n  // The index of the residual, typically in a Program. This is only to permit\n  // switching from a ResidualBlock* to an index in the Program's array, needed\n  // to do efficient removals.\n  int32_t index_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_RESIDUAL_BLOCK_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/residual_block_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n\n#include \"ceres/residual_block.h\"\n\n#include <cstdint>\n#include \"gtest/gtest.h\"\n#include \"ceres/parameter_block.h\"\n#include \"ceres/sized_cost_function.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/local_parameterization.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::vector;\n\n// Trivial cost function that accepts three arguments.\nclass TernaryCostFunction: public CostFunction {\n public:\n  TernaryCostFunction(int num_residuals,\n                      int32_t parameter_block1_size,\n                      int32_t parameter_block2_size,\n                      int32_t parameter_block3_size) {\n    set_num_residuals(num_residuals);\n    mutable_parameter_block_sizes()->push_back(parameter_block1_size);\n    mutable_parameter_block_sizes()->push_back(parameter_block2_size);\n    mutable_parameter_block_sizes()->push_back(parameter_block3_size);\n  }\n\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const final {\n    for (int i = 0; i < num_residuals(); ++i) {\n      residuals[i] = i;\n    }\n    if (jacobians) {\n      for (int k = 0; k < 3; ++k) {\n        if (jacobians[k] != NULL) {\n          MatrixRef jacobian(jacobians[k],\n                             num_residuals(),\n                             parameter_block_sizes()[k]);\n          jacobian.setConstant(k);\n        }\n      }\n    }\n    return true;\n  }\n};\n\nTEST(ResidualBlock, EvaluteWithNoLossFunctionOrLocalParameterizations) {\n  double scratch[64];\n\n  // Prepare the parameter blocks.\n  double values_x[2];\n  ParameterBlock x(values_x, 2, -1);\n\n  double values_y[3];\n  ParameterBlock y(values_y, 3, -1);\n\n  double values_z[4];\n  ParameterBlock z(values_z, 4, -1);\n\n  vector<ParameterBlock*> parameters;\n  parameters.push_back(&x);\n  parameters.push_back(&y);\n  parameters.push_back(&z);\n\n  TernaryCostFunction cost_function(3, 2, 3, 4);\n\n  // Create the object under tests.\n  ResidualBlock residual_block(&cost_function, NULL, parameters, -1);\n\n  // Verify getters.\n  EXPECT_EQ(&cost_function, residual_block.cost_function());\n  EXPECT_EQ(NULL, residual_block.loss_function());\n  EXPECT_EQ(parameters[0], residual_block.parameter_blocks()[0]);\n  EXPECT_EQ(parameters[1], residual_block.parameter_blocks()[1]);\n  EXPECT_EQ(parameters[2], residual_block.parameter_blocks()[2]);\n  EXPECT_EQ(3, residual_block.NumScratchDoublesForEvaluate());\n\n  // Verify cost-only evaluation.\n  double cost;\n  residual_block.Evaluate(true, &cost, NULL, NULL, scratch);\n  EXPECT_EQ(0.5 * (0*0 + 1*1 + 2*2), cost);\n\n  // Verify cost and residual evaluation.\n  double residuals[3];\n  residual_block.Evaluate(true, &cost, residuals, NULL, scratch);\n  EXPECT_EQ(0.5 * (0*0 + 1*1 + 2*2), cost);\n  EXPECT_EQ(0.0, residuals[0]);\n  EXPECT_EQ(1.0, residuals[1]);\n  EXPECT_EQ(2.0, residuals[2]);\n\n  // Verify cost, residual, and jacobian evaluation.\n  cost = 0.0;\n  VectorRef(residuals, 3).setConstant(0.0);\n\n  Matrix jacobian_rx(3, 2);\n  Matrix jacobian_ry(3, 3);\n  Matrix jacobian_rz(3, 4);\n\n  jacobian_rx.setConstant(-1.0);\n  jacobian_ry.setConstant(-1.0);\n  jacobian_rz.setConstant(-1.0);\n\n  double *jacobian_ptrs[3] = {\n    jacobian_rx.data(),\n    jacobian_ry.data(),\n    jacobian_rz.data()\n  };\n\n  residual_block.Evaluate(true, &cost, residuals, jacobian_ptrs, scratch);\n  EXPECT_EQ(0.5 * (0*0 + 1*1 + 2*2), cost);\n  EXPECT_EQ(0.0, residuals[0]);\n  EXPECT_EQ(1.0, residuals[1]);\n  EXPECT_EQ(2.0, residuals[2]);\n\n  EXPECT_TRUE((jacobian_rx.array() == 0.0).all()) << \"\\n\" << jacobian_rx;\n  EXPECT_TRUE((jacobian_ry.array() == 1.0).all()) << \"\\n\" << jacobian_ry;\n  EXPECT_TRUE((jacobian_rz.array() == 2.0).all()) << \"\\n\" << jacobian_rz;\n\n  // Verify cost, residual, and partial jacobian evaluation.\n  cost = 0.0;\n  VectorRef(residuals, 3).setConstant(0.0);\n  jacobian_rx.setConstant(-1.0);\n  jacobian_ry.setConstant(-1.0);\n  jacobian_rz.setConstant(-1.0);\n\n  jacobian_ptrs[1] = NULL;  // Don't compute the jacobian for y.\n\n  residual_block.Evaluate(true, &cost, residuals, jacobian_ptrs, scratch);\n  EXPECT_EQ(0.5 * (0*0 + 1*1 + 2*2), cost);\n  EXPECT_EQ(0.0, residuals[0]);\n  EXPECT_EQ(1.0, residuals[1]);\n  EXPECT_EQ(2.0, residuals[2]);\n\n  EXPECT_TRUE((jacobian_rx.array() ==  0.0).all()) << \"\\n\" << jacobian_rx;\n  EXPECT_TRUE((jacobian_ry.array() == -1.0).all()) << \"\\n\" << jacobian_ry;\n  EXPECT_TRUE((jacobian_rz.array() ==  2.0).all()) << \"\\n\" << jacobian_rz;\n}\n\n// Trivial cost function that accepts three arguments.\nclass LocallyParameterizedCostFunction: public SizedCostFunction<3, 2, 3, 4> {\n public:\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const final {\n    for (int i = 0; i < num_residuals(); ++i) {\n      residuals[i] = i;\n    }\n    if (jacobians) {\n      for (int k = 0; k < 3; ++k) {\n        // The jacobians here are full sized, but they are transformed in the\n        // evaluator into the \"local\" jacobian. In the tests, the \"subset\n        // constant\" parameterization is used, which should pick out columns\n        // from these jacobians. Put values in the jacobian that make this\n        // obvious; in particular, make the jacobians like this:\n        //\n        //   0 1 2 3 4 ...\n        //   0 1 2 3 4 ...\n        //   0 1 2 3 4 ...\n        //\n        if (jacobians[k] != NULL) {\n          MatrixRef jacobian(jacobians[k],\n                             num_residuals(),\n                             parameter_block_sizes()[k]);\n          for (int j = 0; j < k + 2; ++j) {\n            jacobian.col(j).setConstant(j);\n          }\n        }\n      }\n    }\n    return true;\n  }\n};\n\nTEST(ResidualBlock, EvaluteWithLocalParameterizations) {\n  double scratch[64];\n\n  // Prepare the parameter blocks.\n  double values_x[2];\n  ParameterBlock x(values_x, 2, -1);\n\n  double values_y[3];\n  ParameterBlock y(values_y, 3, -1);\n\n  double values_z[4];\n  ParameterBlock z(values_z, 4, -1);\n\n  vector<ParameterBlock*> parameters;\n  parameters.push_back(&x);\n  parameters.push_back(&y);\n  parameters.push_back(&z);\n\n  // Make x have the first component fixed.\n  vector<int> x_fixed;\n  x_fixed.push_back(0);\n  SubsetParameterization x_parameterization(2, x_fixed);\n  x.SetParameterization(&x_parameterization);\n\n  // Make z have the last and last component fixed.\n  vector<int> z_fixed;\n  z_fixed.push_back(2);\n  SubsetParameterization z_parameterization(4, z_fixed);\n  z.SetParameterization(&z_parameterization);\n\n  LocallyParameterizedCostFunction cost_function;\n\n  // Create the object under tests.\n  ResidualBlock residual_block(&cost_function, NULL, parameters, -1);\n\n  // Verify getters.\n  EXPECT_EQ(&cost_function, residual_block.cost_function());\n  EXPECT_EQ(NULL, residual_block.loss_function());\n  EXPECT_EQ(parameters[0], residual_block.parameter_blocks()[0]);\n  EXPECT_EQ(parameters[1], residual_block.parameter_blocks()[1]);\n  EXPECT_EQ(parameters[2], residual_block.parameter_blocks()[2]);\n  EXPECT_EQ(3*(2 + 4) + 3, residual_block.NumScratchDoublesForEvaluate());\n\n  // Verify cost-only evaluation.\n  double cost;\n  residual_block.Evaluate(true, &cost, NULL, NULL, scratch);\n  EXPECT_EQ(0.5 * (0*0 + 1*1 + 2*2), cost);\n\n  // Verify cost and residual evaluation.\n  double residuals[3];\n  residual_block.Evaluate(true, &cost, residuals, NULL, scratch);\n  EXPECT_EQ(0.5 * (0*0 + 1*1 + 2*2), cost);\n  EXPECT_EQ(0.0, residuals[0]);\n  EXPECT_EQ(1.0, residuals[1]);\n  EXPECT_EQ(2.0, residuals[2]);\n\n  // Verify cost, residual, and jacobian evaluation.\n  cost = 0.0;\n  VectorRef(residuals, 3).setConstant(0.0);\n\n  Matrix jacobian_rx(3, 1);  // Since the first element is fixed.\n  Matrix jacobian_ry(3, 3);\n  Matrix jacobian_rz(3, 3);  // Since the third element is fixed.\n\n  jacobian_rx.setConstant(-1.0);\n  jacobian_ry.setConstant(-1.0);\n  jacobian_rz.setConstant(-1.0);\n\n  double *jacobian_ptrs[3] = {\n    jacobian_rx.data(),\n    jacobian_ry.data(),\n    jacobian_rz.data()\n  };\n\n  residual_block.Evaluate(true, &cost, residuals, jacobian_ptrs, scratch);\n  EXPECT_EQ(0.5 * (0*0 + 1*1 + 2*2), cost);\n  EXPECT_EQ(0.0, residuals[0]);\n  EXPECT_EQ(1.0, residuals[1]);\n  EXPECT_EQ(2.0, residuals[2]);\n\n  Matrix expected_jacobian_rx(3, 1);\n  expected_jacobian_rx << 1.0, 1.0, 1.0;\n\n  Matrix expected_jacobian_ry(3, 3);\n  expected_jacobian_ry << 0.0, 1.0, 2.0,\n                          0.0, 1.0, 2.0,\n                          0.0, 1.0, 2.0;\n\n  Matrix expected_jacobian_rz(3, 3);\n  expected_jacobian_rz << 0.0, 1.0, /* 2.0, */ 3.0,  // 3rd parameter constant.\n                          0.0, 1.0, /* 2.0, */ 3.0,\n                          0.0, 1.0, /* 2.0, */ 3.0;\n\n  EXPECT_EQ(expected_jacobian_rx, jacobian_rx)\n      << \"\\nExpected:\\n\" << expected_jacobian_rx\n      << \"\\nActual:\\n\"   << jacobian_rx;\n  EXPECT_EQ(expected_jacobian_ry, jacobian_ry)\n      << \"\\nExpected:\\n\" << expected_jacobian_ry\n      << \"\\nActual:\\n\"   << jacobian_ry;\n  EXPECT_EQ(expected_jacobian_rz, jacobian_rz)\n      << \"\\nExpected:\\n \" << expected_jacobian_rz\n      << \"\\nActual:\\n\"   << jacobian_rz;\n\n  // Verify cost, residual, and partial jacobian evaluation.\n  cost = 0.0;\n  VectorRef(residuals, 3).setConstant(0.0);\n  jacobian_rx.setConstant(-1.0);\n  jacobian_ry.setConstant(-1.0);\n  jacobian_rz.setConstant(-1.0);\n\n  jacobian_ptrs[1] = NULL;  // Don't compute the jacobian for y.\n\n  residual_block.Evaluate(true, &cost, residuals, jacobian_ptrs, scratch);\n  EXPECT_EQ(0.5 * (0*0 + 1*1 + 2*2), cost);\n  EXPECT_EQ(0.0, residuals[0]);\n  EXPECT_EQ(1.0, residuals[1]);\n  EXPECT_EQ(2.0, residuals[2]);\n\n  EXPECT_EQ(expected_jacobian_rx, jacobian_rx);\n  EXPECT_TRUE((jacobian_ry.array() == -1.0).all()) << \"\\n\" << jacobian_ry;\n  EXPECT_EQ(expected_jacobian_rz, jacobian_rz);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/residual_block_utils.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/residual_block_utils.h\"\n\n#include <cmath>\n#include <cstddef>\n#include <limits>\n#include \"ceres/array_utils.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/internal/port.h\"\n#include \"ceres/parameter_block.h\"\n#include \"ceres/residual_block.h\"\n#include \"ceres/stringprintf.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::string;\n\nvoid InvalidateEvaluation(const ResidualBlock& block,\n                          double* cost,\n                          double* residuals,\n                          double** jacobians) {\n  const int num_parameter_blocks = block.NumParameterBlocks();\n  const int num_residuals = block.NumResiduals();\n\n  InvalidateArray(1, cost);\n  InvalidateArray(num_residuals, residuals);\n  if (jacobians != NULL) {\n    for (int i = 0; i < num_parameter_blocks; ++i) {\n      const int parameter_block_size = block.parameter_blocks()[i]->Size();\n      InvalidateArray(num_residuals * parameter_block_size, jacobians[i]);\n    }\n  }\n}\n\nstring EvaluationToString(const ResidualBlock& block,\n                          double const* const* parameters,\n                          double* cost,\n                          double* residuals,\n                          double** jacobians) {\n  CHECK(cost != nullptr);\n  CHECK(residuals != nullptr);\n\n  const int num_parameter_blocks = block.NumParameterBlocks();\n  const int num_residuals = block.NumResiduals();\n  string result = \"\";\n\n  StringAppendF(&result,\n                \"Residual Block size: %d parameter blocks x %d residuals\\n\\n\",\n                num_parameter_blocks, num_residuals);\n  result +=\n      \"For each parameter block, the value of the parameters are printed in the first column   \\n\"  // NOLINT\n      \"and the value of the jacobian under the corresponding residual. If a ParameterBlock was \\n\"  // NOLINT\n      \"held constant then the corresponding jacobian is printed as 'Not Computed'. If an entry \\n\"  // NOLINT\n      \"of the Jacobian/residual array was requested but was not written to by user code, it is \\n\"  // NOLINT\n      \"indicated by 'Uninitialized'. This is an error. Residuals or Jacobian values evaluating \\n\"  // NOLINT\n      \"to Inf or NaN is also an error.  \\n\\n\"; // NOLINT\n\n  string space = \"Residuals:     \";\n  result += space;\n  AppendArrayToString(num_residuals, residuals, &result);\n  StringAppendF(&result, \"\\n\\n\");\n\n  for (int i = 0; i < num_parameter_blocks; ++i) {\n    const int parameter_block_size = block.parameter_blocks()[i]->Size();\n    StringAppendF(\n        &result, \"Parameter Block %d, size: %d\\n\", i, parameter_block_size);\n    StringAppendF(&result, \"\\n\");\n    for (int j = 0; j < parameter_block_size; ++j) {\n      AppendArrayToString(1, parameters[i] + j, &result);\n      StringAppendF(&result, \"| \");\n      for (int k = 0; k < num_residuals; ++k) {\n        AppendArrayToString(1,\n                            (jacobians != NULL && jacobians[i] != NULL)\n                            ? jacobians[i] + k * parameter_block_size + j\n                            : NULL,\n                            &result);\n      }\n      StringAppendF(&result, \"\\n\");\n    }\n    StringAppendF(&result, \"\\n\");\n  }\n  StringAppendF(&result, \"\\n\");\n  return result;\n}\n\nbool IsEvaluationValid(const ResidualBlock& block,\n                       double const* const* parameters,\n                       double* cost,\n                       double* residuals,\n                       double** jacobians) {\n  const int num_parameter_blocks = block.NumParameterBlocks();\n  const int num_residuals = block.NumResiduals();\n\n  if (!IsArrayValid(num_residuals, residuals)) {\n    return false;\n  }\n\n  if (jacobians != NULL) {\n    for (int i = 0; i < num_parameter_blocks; ++i) {\n      const int parameter_block_size = block.parameter_blocks()[i]->Size();\n      if (!IsArrayValid(num_residuals * parameter_block_size, jacobians[i])) {\n        return false;\n      }\n    }\n  }\n\n  return true;\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/residual_block_utils.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Utility routines for ResidualBlock evaluation.\n//\n// These are useful for detecting two common class of errors.\n//\n// 1. Uninitialized memory - where the user for some reason did not\n// compute part of a cost/residual/jacobian.\n//\n// 2. Numerical failure while computing the cost/residual/jacobian,\n// e.g. NaN, infinities etc. This is particularly useful since the\n// automatic differentiation code does computations that are not\n// evident to the user and can silently generate hard to debug errors.\n\n#ifndef CERES_INTERNAL_RESIDUAL_BLOCK_UTILS_H_\n#define CERES_INTERNAL_RESIDUAL_BLOCK_UTILS_H_\n\n#include <string>\n#include \"ceres/internal/port.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass ResidualBlock;\n\n// Invalidate cost, resdual and jacobian arrays (if not NULL).\nvoid InvalidateEvaluation(const ResidualBlock& block,\n                          double* cost,\n                          double* residuals,\n                          double** jacobians);\n\n// Check if any of the arrays cost, residuals or jacobians contains an\n// NaN, return true if it does.\nbool IsEvaluationValid(const ResidualBlock& block,\n                       double const* const* parameters,\n                       double* cost,\n                       double* residuals,\n                       double** jacobians);\n\n// Create a string representation of the Residual block containing the\n// value of the parameters, residuals and jacobians if present.\n// Useful for debugging output.\nstd::string EvaluationToString(const ResidualBlock& block,\n                               double const* const* parameters,\n                               double* cost,\n                               double* residuals,\n                               double** jacobians);\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_RESIDUAL_BLOCK_UTILS_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/residual_block_utils_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include <cmath>\n#include <limits>\n#include <memory>\n#include \"gtest/gtest.h\"\n#include \"ceres/parameter_block.h\"\n#include \"ceres/residual_block.h\"\n#include \"ceres/residual_block_utils.h\"\n#include \"ceres/cost_function.h\"\n#include \"ceres/sized_cost_function.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// Routine to check if ResidualBlock::Evaluate for unary CostFunction\n// with one residual succeeds with true or dies.\nstatic void CheckEvaluation(const CostFunction& cost_function, bool is_good) {\n  double x = 1.0;\n  ParameterBlock parameter_block(&x, 1, -1);\n  std::vector<ParameterBlock*> parameter_blocks;\n  parameter_blocks.push_back(&parameter_block);\n\n  ResidualBlock residual_block(&cost_function,\n                               NULL,\n                               parameter_blocks,\n                               -1);\n\n  std::unique_ptr<double[]> scratch(\n      new double[residual_block.NumScratchDoublesForEvaluate()]);\n\n  double cost;\n  double residuals;\n  double jacobian;\n  double* jacobians[] = { &jacobian };\n\n  EXPECT_EQ(residual_block.Evaluate(true,\n                                    &cost,\n                                    &residuals,\n                                    jacobians,\n                                    scratch.get()), is_good);\n}\n\n// A CostFunction that behaves normaly, i.e., it computes numerically\n// valid residuals and jacobians.\nclass GoodCostFunction: public SizedCostFunction<1, 1> {\n public:\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const final {\n    residuals[0] = 1;\n    if (jacobians != NULL && jacobians[0] != NULL) {\n      jacobians[0][0] = 0.0;\n    }\n    return true;\n  }\n};\n\n// The following four CostFunctions simulate the different ways in\n// which user code can cause ResidualBlock::Evaluate to fail.\nclass NoResidualUpdateCostFunction: public SizedCostFunction<1, 1> {\n public:\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const final {\n    // Forget to update the residuals.\n    // residuals[0] = 1;\n    if (jacobians != NULL && jacobians[0] != NULL) {\n      jacobians[0][0] = 0.0;\n    }\n    return true;\n  }\n};\n\nclass NoJacobianUpdateCostFunction: public SizedCostFunction<1, 1> {\n public:\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const final {\n    residuals[0] = 1;\n    if (jacobians != NULL && jacobians[0] != NULL) {\n      // Forget to update the jacobians.\n      // jacobians[0][0] = 0.0;\n    }\n    return true;\n  }\n};\n\nclass BadResidualCostFunction: public SizedCostFunction<1, 1> {\n public:\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const final {\n    residuals[0] = std::numeric_limits<double>::infinity();\n    if (jacobians != NULL && jacobians[0] != NULL) {\n      jacobians[0][0] = 0.0;\n    }\n    return true;\n  }\n};\n\nclass BadJacobianCostFunction: public SizedCostFunction<1, 1> {\n public:\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const final {\n    residuals[0] = 1.0;\n    if (jacobians != NULL && jacobians[0] != NULL) {\n      jacobians[0][0] = std::numeric_limits<double>::quiet_NaN();\n    }\n    return true;\n  }\n};\n\n// Note: It is preferable to write the below test as:\n//\n//  CheckEvaluation(GoodCostFunction(), true);\n//  CheckEvaluation(NoResidualUpdateCostFunction(), false);\n//  CheckEvaluation(NoJacobianUpdateCostFunction(), false);\n//  ...\n//\n// however, there is a bug in the version of GCC on Mac OS X we tested, which\n// requires the objects get put into local variables instead of getting\n// instantiated on the stack.\nTEST(ResidualBlockUtils, CheckAllCombinationsOfBadness) {\n  GoodCostFunction good_fun;\n  CheckEvaluation(good_fun, true);\n  NoResidualUpdateCostFunction no_residual;\n  CheckEvaluation(no_residual, false);\n  NoJacobianUpdateCostFunction no_jacobian;\n  CheckEvaluation(no_jacobian, false);\n  BadResidualCostFunction bad_residual;\n  CheckEvaluation(bad_residual, false);\n  BadJacobianCostFunction bad_jacobian;\n  CheckEvaluation(bad_jacobian, false);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/rotation_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include <cmath>\n#include <limits>\n#include <string>\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/is_close.h\"\n#include \"ceres/internal/port.h\"\n#include \"ceres/jet.h\"\n#include \"ceres/rotation.h\"\n#include \"ceres/stringprintf.h\"\n#include \"ceres/test_util.h\"\n#include \"glog/logging.h\"\n#include \"gmock/gmock.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::min;\nusing std::max;\nusing std::numeric_limits;\nusing std::string;\nusing std::swap;\n\nconst double kPi = 3.14159265358979323846;\nconst double kHalfSqrt2 = 0.707106781186547524401;\n\nstatic double RandDouble() {\n  double r = rand();\n  return r / RAND_MAX;\n}\n\n// A tolerance value for floating-point comparisons.\nstatic double const kTolerance = numeric_limits<double>::epsilon() * 10;\n\n// Looser tolerance used for numerically unstable conversions.\nstatic double const kLooseTolerance = 1e-9;\n\n// Use as:\n// double quaternion[4];\n// EXPECT_THAT(quaternion, IsNormalizedQuaternion());\nMATCHER(IsNormalizedQuaternion, \"\") {\n  if (arg == NULL) {\n    *result_listener << \"Null quaternion\";\n    return false;\n  }\n\n  double norm2 = arg[0] * arg[0] + arg[1] * arg[1] +\n      arg[2] * arg[2] + arg[3] * arg[3];\n  if (fabs(norm2 - 1.0) > kTolerance) {\n    *result_listener << \"squared norm is \" << norm2;\n    return false;\n  }\n\n  return true;\n}\n\n// Use as:\n// double expected_quaternion[4];\n// double actual_quaternion[4];\n// EXPECT_THAT(actual_quaternion, IsNearQuaternion(expected_quaternion));\nMATCHER_P(IsNearQuaternion, expected, \"\") {\n  if (arg == NULL) {\n    *result_listener << \"Null quaternion\";\n    return false;\n  }\n\n  // Quaternions are equivalent upto a sign change. So we will compare\n  // both signs before declaring failure.\n  bool near = true;\n  for (int i = 0; i < 4; i++) {\n    if (fabs(arg[i] - expected[i]) > kTolerance) {\n      near = false;\n      break;\n    }\n  }\n\n  if (near) {\n    return true;\n  }\n\n  near = true;\n  for (int i = 0; i < 4; i++) {\n    if (fabs(arg[i] + expected[i]) > kTolerance) {\n      near = false;\n      break;\n    }\n  }\n\n  if (near) {\n    return true;\n  }\n\n  *result_listener << \"expected : \"\n                   << expected[0] << \" \"\n                   << expected[1] << \" \"\n                   << expected[2] << \" \"\n                   << expected[3] << \" \"\n                   << \"actual : \"\n                   << arg[0] << \" \"\n                   << arg[1] << \" \"\n                   << arg[2] << \" \"\n                   << arg[3];\n  return false;\n}\n\n// Use as:\n// double expected_axis_angle[3];\n// double actual_axis_angle[3];\n// EXPECT_THAT(actual_axis_angle, IsNearAngleAxis(expected_axis_angle));\nMATCHER_P(IsNearAngleAxis, expected, \"\") {\n  if (arg == NULL) {\n    *result_listener << \"Null axis/angle\";\n    return false;\n  }\n\n  Eigen::Vector3d a(arg[0], arg[1], arg[2]);\n  Eigen::Vector3d e(expected[0], expected[1], expected[2]);\n  const double e_norm = e.norm();\n\n  double delta_norm = numeric_limits<double>::max();\n  if (e_norm > 0) {\n    // Deal with the sign ambiguity near PI. Since the sign can flip,\n    // we take the smaller of the two differences.\n    if (fabs(e_norm - kPi) < kLooseTolerance) {\n      delta_norm = min((a - e).norm(), (a + e).norm()) / e_norm;\n    } else {\n      delta_norm = (a - e).norm() / e_norm;\n    }\n  } else {\n    delta_norm = a.norm();\n  }\n\n  if (delta_norm <= kLooseTolerance) {\n    return true;\n  }\n\n  *result_listener << \" arg:\"\n                   << \" \" << arg[0]\n                   << \" \" << arg[1]\n                   << \" \" << arg[2]\n                   << \" was expected to be:\"\n                   << \" \" << expected[0]\n                   << \" \" << expected[1]\n                   << \" \" << expected[2];\n  return false;\n}\n\n// Use as:\n// double matrix[9];\n// EXPECT_THAT(matrix, IsOrthonormal());\nMATCHER(IsOrthonormal, \"\") {\n  if (arg == NULL) {\n    *result_listener << \"Null matrix\";\n    return false;\n  }\n\n  for (int c1 = 0; c1 < 3; c1++) {\n    for (int c2 = 0; c2 < 3; c2++) {\n      double v = 0;\n      for (int i = 0; i < 3; i++) {\n        v += arg[i + 3 * c1] * arg[i + 3 * c2];\n      }\n      double expected = (c1 == c2) ? 1 : 0;\n      if (fabs(expected - v) > kTolerance) {\n        *result_listener << \"Columns \" << c1 << \" and \" << c2\n                         << \" should have dot product \" << expected\n                         << \" but have \" << v;\n        return false;\n      }\n    }\n  }\n\n  return true;\n}\n\n// Use as:\n// double matrix1[9];\n// double matrix2[9];\n// EXPECT_THAT(matrix1, IsNear3x3Matrix(matrix2));\nMATCHER_P(IsNear3x3Matrix, expected, \"\") {\n  if (arg == NULL) {\n    *result_listener << \"Null matrix\";\n    return false;\n  }\n\n  for (int i = 0; i < 9; i++) {\n    if (fabs(arg[i] - expected[i]) > kTolerance) {\n      *result_listener << \"component \" << i << \" should be \" << expected[i];\n      return false;\n    }\n  }\n\n  return true;\n}\n\n// Transforms a zero axis/angle to a quaternion.\nTEST(Rotation, ZeroAngleAxisToQuaternion) {\n  double axis_angle[3] = { 0, 0, 0 };\n  double quaternion[4];\n  double expected[4] = { 1, 0, 0, 0 };\n  AngleAxisToQuaternion(axis_angle, quaternion);\n  EXPECT_THAT(quaternion, IsNormalizedQuaternion());\n  EXPECT_THAT(quaternion, IsNearQuaternion(expected));\n}\n\n// Test that exact conversion works for small angles.\nTEST(Rotation, SmallAngleAxisToQuaternion) {\n  // Small, finite value to test.\n  double theta = 1.0e-2;\n  double axis_angle[3] = { theta, 0, 0 };\n  double quaternion[4];\n  double expected[4] = { cos(theta/2), sin(theta/2.0), 0, 0 };\n  AngleAxisToQuaternion(axis_angle, quaternion);\n  EXPECT_THAT(quaternion, IsNormalizedQuaternion());\n  EXPECT_THAT(quaternion, IsNearQuaternion(expected));\n}\n\n// Test that approximate conversion works for very small angles.\nTEST(Rotation, TinyAngleAxisToQuaternion) {\n  // Very small value that could potentially cause underflow.\n  double theta = pow(numeric_limits<double>::min(), 0.75);\n  double axis_angle[3] = { theta, 0, 0 };\n  double quaternion[4];\n  double expected[4] = { cos(theta/2), sin(theta/2.0), 0, 0 };\n  AngleAxisToQuaternion(axis_angle, quaternion);\n  EXPECT_THAT(quaternion, IsNormalizedQuaternion());\n  EXPECT_THAT(quaternion, IsNearQuaternion(expected));\n}\n\n// Transforms a rotation by pi/2 around X to a quaternion.\nTEST(Rotation, XRotationToQuaternion) {\n  double axis_angle[3] = { kPi / 2, 0, 0 };\n  double quaternion[4];\n  double expected[4] = { kHalfSqrt2, kHalfSqrt2, 0, 0 };\n  AngleAxisToQuaternion(axis_angle, quaternion);\n  EXPECT_THAT(quaternion, IsNormalizedQuaternion());\n  EXPECT_THAT(quaternion, IsNearQuaternion(expected));\n}\n\n// Transforms a unit quaternion to an axis angle.\nTEST(Rotation, UnitQuaternionToAngleAxis) {\n  double quaternion[4] = { 1, 0, 0, 0 };\n  double axis_angle[3];\n  double expected[3] = { 0, 0, 0 };\n  QuaternionToAngleAxis(quaternion, axis_angle);\n  EXPECT_THAT(axis_angle, IsNearAngleAxis(expected));\n}\n\n// Transforms a quaternion that rotates by pi about the Y axis to an axis angle.\nTEST(Rotation, YRotationQuaternionToAngleAxis) {\n  double quaternion[4] = { 0, 0, 1, 0 };\n  double axis_angle[3];\n  double expected[3] = { 0, kPi, 0 };\n  QuaternionToAngleAxis(quaternion, axis_angle);\n  EXPECT_THAT(axis_angle, IsNearAngleAxis(expected));\n}\n\n// Transforms a quaternion that rotates by pi/3 about the Z axis to an axis\n// angle.\nTEST(Rotation, ZRotationQuaternionToAngleAxis) {\n  double quaternion[4] = { sqrt(3) / 2, 0, 0, 0.5 };\n  double axis_angle[3];\n  double expected[3] = { 0, 0, kPi / 3 };\n  QuaternionToAngleAxis(quaternion, axis_angle);\n  EXPECT_THAT(axis_angle, IsNearAngleAxis(expected));\n}\n\n// Test that exact conversion works for small angles.\nTEST(Rotation, SmallQuaternionToAngleAxis) {\n  // Small, finite value to test.\n  double theta = 1.0e-2;\n  double quaternion[4] = { cos(theta/2), sin(theta/2.0), 0, 0 };\n  double axis_angle[3];\n  double expected[3] = { theta, 0, 0 };\n  QuaternionToAngleAxis(quaternion, axis_angle);\n  EXPECT_THAT(axis_angle, IsNearAngleAxis(expected));\n}\n\n// Test that approximate conversion works for very small angles.\nTEST(Rotation, TinyQuaternionToAngleAxis) {\n  // Very small value that could potentially cause underflow.\n  double theta = pow(numeric_limits<double>::min(), 0.75);\n  double quaternion[4] = { cos(theta/2), sin(theta/2.0), 0, 0 };\n  double axis_angle[3];\n  double expected[3] = { theta, 0, 0 };\n  QuaternionToAngleAxis(quaternion, axis_angle);\n  EXPECT_THAT(axis_angle, IsNearAngleAxis(expected));\n}\n\nTEST(Rotation, QuaternionToAngleAxisAngleIsLessThanPi) {\n  double quaternion[4];\n  double angle_axis[3];\n\n  const double half_theta = 0.75 * kPi;\n\n  quaternion[0] = cos(half_theta);\n  quaternion[1] = 1.0 * sin(half_theta);\n  quaternion[2] = 0.0;\n  quaternion[3] = 0.0;\n  QuaternionToAngleAxis(quaternion, angle_axis);\n  const double angle = sqrt(angle_axis[0] * angle_axis[0] +\n                            angle_axis[1] * angle_axis[1] +\n                            angle_axis[2] * angle_axis[2]);\n  EXPECT_LE(angle, kPi);\n}\n\nstatic constexpr int kNumTrials = 10000;\n\n// Takes a bunch of random axis/angle values, converts them to quaternions,\n// and back again.\nTEST(Rotation, AngleAxisToQuaterionAndBack) {\n  srand(5);\n  for (int i = 0; i < kNumTrials; i++) {\n    double axis_angle[3];\n    // Make an axis by choosing three random numbers in [-1, 1) and\n    // normalizing.\n    double norm = 0;\n    for (int i = 0; i < 3; i++) {\n      axis_angle[i] = RandDouble() * 2 - 1;\n      norm += axis_angle[i] * axis_angle[i];\n    }\n    norm = sqrt(norm);\n\n    // Angle in [-pi, pi).\n    double theta = kPi * 2 * RandDouble() - kPi;\n    for (int i = 0; i < 3; i++) {\n      axis_angle[i] = axis_angle[i] * theta / norm;\n    }\n\n    double quaternion[4];\n    double round_trip[3];\n    // We use ASSERTs here because if there's one failure, there are\n    // probably many and spewing a million failures doesn't make anyone's\n    // day.\n    AngleAxisToQuaternion(axis_angle, quaternion);\n    ASSERT_THAT(quaternion, IsNormalizedQuaternion());\n    QuaternionToAngleAxis(quaternion, round_trip);\n    ASSERT_THAT(round_trip, IsNearAngleAxis(axis_angle));\n  }\n}\n\n// Takes a bunch of random quaternions, converts them to axis/angle,\n// and back again.\nTEST(Rotation, QuaterionToAngleAxisAndBack) {\n  srand(5);\n  for (int i = 0; i < kNumTrials; i++) {\n    double quaternion[4];\n    // Choose four random numbers in [-1, 1) and normalize.\n    double norm = 0;\n    for (int i = 0; i < 4; i++) {\n      quaternion[i] = RandDouble() * 2 - 1;\n      norm += quaternion[i] * quaternion[i];\n    }\n    norm = sqrt(norm);\n\n    for (int i = 0; i < 4; i++) {\n      quaternion[i] = quaternion[i] / norm;\n    }\n\n    double axis_angle[3];\n    double round_trip[4];\n    QuaternionToAngleAxis(quaternion, axis_angle);\n    AngleAxisToQuaternion(axis_angle, round_trip);\n    ASSERT_THAT(round_trip, IsNormalizedQuaternion());\n    ASSERT_THAT(round_trip, IsNearQuaternion(quaternion));\n  }\n}\n\n// Transforms a zero axis/angle to a rotation matrix.\nTEST(Rotation, ZeroAngleAxisToRotationMatrix) {\n  double axis_angle[3] = { 0, 0, 0 };\n  double matrix[9];\n  double expected[9] = { 1, 0, 0, 0, 1, 0, 0, 0, 1 };\n  AngleAxisToRotationMatrix(axis_angle, matrix);\n  EXPECT_THAT(matrix, IsOrthonormal());\n  EXPECT_THAT(matrix, IsNear3x3Matrix(expected));\n}\n\nTEST(Rotation, NearZeroAngleAxisToRotationMatrix) {\n  double axis_angle[3] = { 1e-24, 2e-24, 3e-24 };\n  double matrix[9];\n  double expected[9] = { 1, 0, 0, 0, 1, 0, 0, 0, 1 };\n  AngleAxisToRotationMatrix(axis_angle, matrix);\n  EXPECT_THAT(matrix, IsOrthonormal());\n  EXPECT_THAT(matrix, IsNear3x3Matrix(expected));\n}\n\n// Transforms a rotation by pi/2 around X to a rotation matrix and back.\nTEST(Rotation, XRotationToRotationMatrix) {\n  double axis_angle[3] = { kPi / 2, 0, 0 };\n  double matrix[9];\n  // The rotation matrices are stored column-major.\n  double expected[9] = { 1, 0, 0, 0, 0, 1, 0, -1, 0 };\n  AngleAxisToRotationMatrix(axis_angle, matrix);\n  EXPECT_THAT(matrix, IsOrthonormal());\n  EXPECT_THAT(matrix, IsNear3x3Matrix(expected));\n  double round_trip[3];\n  RotationMatrixToAngleAxis(matrix, round_trip);\n  EXPECT_THAT(round_trip, IsNearAngleAxis(axis_angle));\n}\n\n// Transforms an axis angle that rotates by pi about the Y axis to a\n// rotation matrix and back.\nTEST(Rotation, YRotationToRotationMatrix) {\n  double axis_angle[3] = { 0, kPi, 0 };\n  double matrix[9];\n  double expected[9] = { -1, 0, 0, 0, 1, 0, 0, 0, -1 };\n  AngleAxisToRotationMatrix(axis_angle, matrix);\n  EXPECT_THAT(matrix, IsOrthonormal());\n  EXPECT_THAT(matrix, IsNear3x3Matrix(expected));\n\n  double round_trip[3];\n  RotationMatrixToAngleAxis(matrix, round_trip);\n  EXPECT_THAT(round_trip, IsNearAngleAxis(axis_angle));\n}\n\nTEST(Rotation, NearPiAngleAxisRoundTrip) {\n  double in_axis_angle[3];\n  double matrix[9];\n  double out_axis_angle[3];\n\n  srand(5);\n  for (int i = 0; i < kNumTrials; i++) {\n    // Make an axis by choosing three random numbers in [-1, 1) and\n    // normalizing.\n    double norm = 0;\n    for (int i = 0; i < 3; i++) {\n      in_axis_angle[i] = RandDouble() * 2 - 1;\n      norm += in_axis_angle[i] * in_axis_angle[i];\n    }\n    norm = sqrt(norm);\n\n    // Angle in [pi - kMaxSmallAngle, pi).\n    const double kMaxSmallAngle = 1e-8;\n    double theta = kPi - kMaxSmallAngle * RandDouble();\n\n    for (int i = 0; i < 3; i++) {\n      in_axis_angle[i] *= (theta / norm);\n    }\n    AngleAxisToRotationMatrix(in_axis_angle, matrix);\n    RotationMatrixToAngleAxis(matrix, out_axis_angle);\n    EXPECT_THAT(in_axis_angle, IsNearAngleAxis(out_axis_angle));\n  }\n}\n\nTEST(Rotation, AtPiAngleAxisRoundTrip) {\n  // A rotation of kPi about the X axis;\n  static constexpr double kMatrix[3][3] = {\n    {1.0,  0.0,  0.0},\n    {0.0,  -1.0,  0.0},\n    {0.0,  0.0,  -1.0}\n  };\n\n  double in_matrix[9];\n  // Fill it from kMatrix in col-major order.\n  for (int j = 0, k = 0; j < 3; ++j) {\n     for (int i = 0; i < 3; ++i, ++k) {\n       in_matrix[k] = kMatrix[i][j];\n     }\n  }\n\n  const double expected_axis_angle[3] = { kPi, 0, 0 };\n\n  double out_matrix[9];\n  double axis_angle[3];\n  RotationMatrixToAngleAxis(in_matrix, axis_angle);\n  AngleAxisToRotationMatrix(axis_angle, out_matrix);\n\n  LOG(INFO) << \"AngleAxis = \" << axis_angle[0] << \" \" << axis_angle[1]\n            << \" \" << axis_angle[2];\n  LOG(INFO) << \"Expected AngleAxis = \" << kPi << \" 0 0\";\n  double out_rowmajor[3][3];\n  for (int j = 0, k = 0; j < 3; ++j) {\n    for (int i = 0; i < 3; ++i, ++k) {\n      out_rowmajor[i][j] = out_matrix[k];\n    }\n  }\n  LOG(INFO) << \"Rotation:\";\n  LOG(INFO) << \"EXPECTED        |        ACTUAL\";\n  for (int i = 0; i < 3; ++i) {\n    string line;\n    for (int j = 0; j < 3; ++j) {\n      StringAppendF(&line, \"%g \", kMatrix[i][j]);\n    }\n    line += \"         |        \";\n    for (int j = 0; j < 3; ++j) {\n      StringAppendF(&line, \"%g \", out_rowmajor[i][j]);\n    }\n    LOG(INFO) << line;\n  }\n\n  EXPECT_THAT(axis_angle, IsNearAngleAxis(expected_axis_angle));\n  EXPECT_THAT(out_matrix, IsNear3x3Matrix(in_matrix));\n}\n\n// Transforms an axis angle that rotates by pi/3 about the Z axis to a\n// rotation matrix.\nTEST(Rotation, ZRotationToRotationMatrix) {\n  double axis_angle[3] =  { 0, 0, kPi / 3 };\n  double matrix[9];\n  // This is laid-out row-major on the screen but is actually stored\n  // column-major.\n  double expected[9] = { 0.5, sqrt(3) / 2, 0,   // Column 1\n                         -sqrt(3) / 2, 0.5, 0,  // Column 2\n                         0, 0, 1 };             // Column 3\n  AngleAxisToRotationMatrix(axis_angle, matrix);\n  EXPECT_THAT(matrix, IsOrthonormal());\n  EXPECT_THAT(matrix, IsNear3x3Matrix(expected));\n  double round_trip[3];\n  RotationMatrixToAngleAxis(matrix, round_trip);\n  EXPECT_THAT(round_trip, IsNearAngleAxis(axis_angle));\n}\n\n// Takes a bunch of random axis/angle values, converts them to rotation\n// matrices, and back again.\nTEST(Rotation, AngleAxisToRotationMatrixAndBack) {\n  srand(5);\n  for (int i = 0; i < kNumTrials; i++) {\n    double axis_angle[3];\n    // Make an axis by choosing three random numbers in [-1, 1) and\n    // normalizing.\n    double norm = 0;\n    for (int i = 0; i < 3; i++) {\n      axis_angle[i] = RandDouble() * 2 - 1;\n      norm += axis_angle[i] * axis_angle[i];\n    }\n    norm = sqrt(norm);\n\n    // Angle in [-pi, pi).\n    double theta = kPi * 2 * RandDouble() - kPi;\n    for (int i = 0; i < 3; i++) {\n      axis_angle[i] = axis_angle[i] * theta / norm;\n    }\n\n    double matrix[9];\n    double round_trip[3];\n    AngleAxisToRotationMatrix(axis_angle, matrix);\n    ASSERT_THAT(matrix, IsOrthonormal());\n    RotationMatrixToAngleAxis(matrix, round_trip);\n\n    for (int i = 0; i < 3; ++i) {\n      EXPECT_NEAR(round_trip[i], axis_angle[i], kLooseTolerance);\n    }\n  }\n}\n\n// Takes a bunch of random axis/angle values near zero, converts them\n// to rotation matrices, and back again.\nTEST(Rotation, AngleAxisToRotationMatrixAndBackNearZero) {\n  srand(5);\n  for (int i = 0; i < kNumTrials; i++) {\n    double axis_angle[3];\n    // Make an axis by choosing three random numbers in [-1, 1) and\n    // normalizing.\n    double norm = 0;\n    for (int i = 0; i < 3; i++) {\n      axis_angle[i] = RandDouble() * 2 - 1;\n      norm += axis_angle[i] * axis_angle[i];\n    }\n    norm = sqrt(norm);\n\n    // Tiny theta.\n    double theta = 1e-16 * (kPi * 2 * RandDouble() - kPi);\n    for (int i = 0; i < 3; i++) {\n      axis_angle[i] = axis_angle[i] * theta / norm;\n    }\n\n    double matrix[9];\n    double round_trip[3];\n    AngleAxisToRotationMatrix(axis_angle, matrix);\n    ASSERT_THAT(matrix, IsOrthonormal());\n    RotationMatrixToAngleAxis(matrix, round_trip);\n\n    for (int i = 0; i < 3; ++i) {\n      EXPECT_NEAR(round_trip[i], axis_angle[i],\n                  numeric_limits<double>::epsilon());\n    }\n  }\n}\n\n\n// Transposes a 3x3 matrix.\nstatic void Transpose3x3(double m[9]) {\n  swap(m[1], m[3]);\n  swap(m[2], m[6]);\n  swap(m[5], m[7]);\n}\n\n// Convert Euler angles from radians to degrees.\nstatic void ToDegrees(double euler_angles[3]) {\n  for (int i = 0; i < 3; ++i) {\n    euler_angles[i] *= 180.0 / kPi;\n  }\n}\n\n// Compare the 3x3 rotation matrices produced by the axis-angle\n// rotation 'aa' and the Euler angle rotation 'ea' (in radians).\nstatic void CompareEulerToAngleAxis(double aa[3], double ea[3]) {\n  double aa_matrix[9];\n  AngleAxisToRotationMatrix(aa, aa_matrix);\n  Transpose3x3(aa_matrix);  // Column to row major order.\n\n  double ea_matrix[9];\n  ToDegrees(ea);  // Radians to degrees.\n  const int kRowStride = 3;\n  EulerAnglesToRotationMatrix(ea, kRowStride, ea_matrix);\n\n  EXPECT_THAT(aa_matrix, IsOrthonormal());\n  EXPECT_THAT(ea_matrix, IsOrthonormal());\n  EXPECT_THAT(ea_matrix, IsNear3x3Matrix(aa_matrix));\n}\n\n// Test with rotation axis along the x/y/z axes.\n// Also test zero rotation.\nTEST(EulerAnglesToRotationMatrix, OnAxis) {\n  int n_tests = 0;\n  for (double x = -1.0; x <= 1.0; x += 1.0) {\n    for (double y = -1.0; y <= 1.0; y += 1.0) {\n      for (double z = -1.0; z <= 1.0; z += 1.0) {\n        if ((x != 0) + (y != 0) + (z != 0) > 1)\n          continue;\n        double axis_angle[3] = {x, y, z};\n        double euler_angles[3] = {x, y, z};\n        CompareEulerToAngleAxis(axis_angle, euler_angles);\n        ++n_tests;\n      }\n    }\n  }\n  CHECK_EQ(7, n_tests);\n}\n\n// Test that a random rotation produces an orthonormal rotation\n// matrix.\nTEST(EulerAnglesToRotationMatrix, IsOrthonormal) {\n  srand(5);\n  for (int trial = 0; trial < kNumTrials; ++trial) {\n    double euler_angles_degrees[3];\n    for (int i = 0; i < 3; ++i) {\n      euler_angles_degrees[i] = RandDouble() * 360.0 - 180.0;\n    }\n    double rotation_matrix[9];\n    EulerAnglesToRotationMatrix(euler_angles_degrees, 3, rotation_matrix);\n    EXPECT_THAT(rotation_matrix, IsOrthonormal());\n  }\n}\n\n// Tests using Jets for specific behavior involving auto differentiation\n// near singularity points.\n\ntypedef Jet<double, 3> J3;\ntypedef Jet<double, 4> J4;\n\nnamespace {\n\nJ3 MakeJ3(double a, double v0, double v1, double v2) {\n  J3 j;\n  j.a = a;\n  j.v[0] = v0;\n  j.v[1] = v1;\n  j.v[2] = v2;\n  return j;\n}\n\nJ4 MakeJ4(double a, double v0, double v1, double v2, double v3) {\n  J4 j;\n  j.a = a;\n  j.v[0] = v0;\n  j.v[1] = v1;\n  j.v[2] = v2;\n  j.v[3] = v3;\n  return j;\n}\n\nbool IsClose(double x, double y) {\n  EXPECT_FALSE(IsNaN(x));\n  EXPECT_FALSE(IsNaN(y));\n  return internal::IsClose(x, y, kTolerance, NULL, NULL);\n}\n\n}  // namespace\n\ntemplate <int N>\nbool IsClose(const Jet<double, N> &x, const Jet<double, N> &y) {\n  if (!IsClose(x.a, y.a)) {\n    return false;\n  }\n  for (int i = 0; i < N; i++) {\n    if (!IsClose(x.v[i], y.v[i])) {\n      return false;\n    }\n  }\n  return true;\n}\n\ntemplate <int M, int N>\nvoid ExpectJetArraysClose(const Jet<double, N> *x, const Jet<double, N> *y) {\n  for (int i = 0; i < M; i++) {\n    if (!IsClose(x[i], y[i])) {\n      LOG(ERROR) << \"Jet \" << i << \"/\" << M << \" not equal\";\n      LOG(ERROR) << \"x[\" << i << \"]: \" << x[i];\n      LOG(ERROR) << \"y[\" << i << \"]: \" << y[i];\n      Jet<double, N> d, zero;\n      d.a = y[i].a - x[i].a;\n      for (int j = 0; j < N; j++) {\n        d.v[j] = y[i].v[j] - x[i].v[j];\n      }\n      LOG(ERROR) << \"diff: \" << d;\n      EXPECT_TRUE(IsClose(x[i], y[i]));\n    }\n  }\n}\n\n// Log-10 of a value well below machine precision.\nstatic const int kSmallTinyCutoff =\n    static_cast<int>(2 * log(numeric_limits<double>::epsilon())/log(10.0));\n\n// Log-10 of a value just below values representable by double.\nstatic const int kTinyZeroLimit   =\n    static_cast<int>(1 + log(numeric_limits<double>::min())/log(10.0));\n\n// Test that exact conversion works for small angles when jets are used.\nTEST(Rotation, SmallAngleAxisToQuaternionForJets) {\n  // Examine small x rotations that are still large enough\n  // to be well within the range represented by doubles.\n  for (int i = -2; i >= kSmallTinyCutoff; i--) {\n    double theta = pow(10.0, i);\n    J3 axis_angle[3] = { J3(theta, 0), J3(0, 1), J3(0, 2) };\n    J3 quaternion[4];\n    J3 expected[4] = {\n        MakeJ3(cos(theta/2), -sin(theta/2)/2, 0, 0),\n        MakeJ3(sin(theta/2), cos(theta/2)/2, 0, 0),\n        MakeJ3(0, 0, sin(theta/2)/theta, 0),\n        MakeJ3(0, 0, 0, sin(theta/2)/theta),\n    };\n    AngleAxisToQuaternion(axis_angle, quaternion);\n    ExpectJetArraysClose<4, 3>(quaternion, expected);\n  }\n}\n\n\n// Test that conversion works for very small angles when jets are used.\nTEST(Rotation, TinyAngleAxisToQuaternionForJets) {\n  // Examine tiny x rotations that extend all the way to where\n  // underflow occurs.\n  for (int i = kSmallTinyCutoff; i >= kTinyZeroLimit; i--) {\n    double theta = pow(10.0, i);\n    J3 axis_angle[3] = { J3(theta, 0), J3(0, 1), J3(0, 2) };\n    J3 quaternion[4];\n    // To avoid loss of precision in the test itself,\n    // a finite expansion is used here, which will\n    // be exact up to machine precision for the test values used.\n    J3 expected[4] = {\n        MakeJ3(1.0, 0, 0, 0),\n        MakeJ3(0, 0.5, 0, 0),\n        MakeJ3(0, 0, 0.5, 0),\n        MakeJ3(0, 0, 0, 0.5),\n    };\n    AngleAxisToQuaternion(axis_angle, quaternion);\n    ExpectJetArraysClose<4, 3>(quaternion, expected);\n  }\n}\n\n// Test that derivatives are correct for zero rotation.\nTEST(Rotation, ZeroAngleAxisToQuaternionForJets) {\n  J3 axis_angle[3] = { J3(0, 0), J3(0, 1), J3(0, 2) };\n  J3 quaternion[4];\n  J3 expected[4] = {\n      MakeJ3(1.0, 0, 0, 0),\n      MakeJ3(0, 0.5, 0, 0),\n      MakeJ3(0, 0, 0.5, 0),\n      MakeJ3(0, 0, 0, 0.5),\n  };\n  AngleAxisToQuaternion(axis_angle, quaternion);\n  ExpectJetArraysClose<4, 3>(quaternion, expected);\n}\n\n// Test that exact conversion works for small angles.\nTEST(Rotation, SmallQuaternionToAngleAxisForJets) {\n  // Examine small x rotations that are still large enough\n  // to be well within the range represented by doubles.\n  for (int i = -2; i >= kSmallTinyCutoff; i--) {\n    double theta = pow(10.0, i);\n    double s = sin(theta);\n    double c = cos(theta);\n    J4 quaternion[4] = { J4(c, 0), J4(s, 1), J4(0, 2), J4(0, 3) };\n    J4 axis_angle[3];\n    J4 expected[3] = {\n        MakeJ4(2*theta, -2*s, 2*c,  0,         0),\n        MakeJ4(0,        0,   0,    2*theta/s, 0),\n        MakeJ4(0,        0,   0,    0,         2*theta/s),\n    };\n    QuaternionToAngleAxis(quaternion, axis_angle);\n    ExpectJetArraysClose<3, 4>(axis_angle, expected);\n  }\n}\n\n// Test that conversion works for very small angles.\nTEST(Rotation, TinyQuaternionToAngleAxisForJets) {\n  // Examine tiny x rotations that extend all the way to where\n  // underflow occurs.\n  for (int i = kSmallTinyCutoff; i >= kTinyZeroLimit; i--) {\n    double theta = pow(10.0, i);\n    double s = sin(theta);\n    double c = cos(theta);\n    J4 quaternion[4] = { J4(c, 0), J4(s, 1), J4(0, 2), J4(0, 3) };\n    J4 axis_angle[3];\n    // To avoid loss of precision in the test itself,\n    // a finite expansion is used here, which will\n    // be exact up to machine precision for the test values used.\n    J4 expected[3] = {\n        MakeJ4(2*theta, -2*s, 2.0, 0,   0),\n        MakeJ4(0,        0,   0,   2.0, 0),\n        MakeJ4(0,        0,   0,   0,   2.0),\n    };\n    QuaternionToAngleAxis(quaternion, axis_angle);\n    ExpectJetArraysClose<3, 4>(axis_angle, expected);\n  }\n}\n\n// Test that conversion works for no rotation.\nTEST(Rotation, ZeroQuaternionToAngleAxisForJets) {\n  J4 quaternion[4] = { J4(1, 0), J4(0, 1), J4(0, 2), J4(0, 3) };\n  J4 axis_angle[3];\n  J4 expected[3] = {\n      MakeJ4(0, 0, 2.0, 0, 0),\n      MakeJ4(0, 0, 0, 2.0, 0),\n      MakeJ4(0, 0, 0, 0, 2.0),\n  };\n  QuaternionToAngleAxis(quaternion, axis_angle);\n  ExpectJetArraysClose<3, 4>(axis_angle, expected);\n}\n\nTEST(Quaternion, RotatePointGivesSameAnswerAsRotationByMatrixCanned) {\n  // Canned data generated in octave.\n  double const q[4] = {\n    +0.1956830471754074,\n    -0.0150618562474847,\n    +0.7634572982788086,\n    -0.3019454777240753,\n  };\n  double const Q[3][3] = {  // Scaled rotation matrix.\n    { -0.6355194033477252,  0.0951730541682254,  0.3078870197911186 },\n    { -0.1411693904792992,  0.5297609702153905, -0.4551502574482019 },\n    { -0.2896955822708862, -0.4669396571547050, -0.4536309793389248 },\n  };\n  double const R[3][3] = {  // With unit rows and columns.\n    { -0.8918859164053080,  0.1335655625725649,  0.4320876677394745 },\n    { -0.1981166751680096,  0.7434648665444399, -0.6387564287225856 },\n    { -0.4065578619806013, -0.6553016349046693, -0.6366242786393164 },\n  };\n\n  // Compute R from q and compare to known answer.\n  double Rq[3][3];\n  QuaternionToScaledRotation<double>(q, Rq[0]);\n  ExpectArraysClose(9, Q[0], Rq[0], kTolerance);\n\n  // Now do the same but compute R with normalization.\n  QuaternionToRotation<double>(q, Rq[0]);\n  ExpectArraysClose(9, R[0], Rq[0], kTolerance);\n}\n\n\nTEST(Quaternion, RotatePointGivesSameAnswerAsRotationByMatrix) {\n  // Rotation defined by a unit quaternion.\n  double const q[4] = {\n    0.2318160216097109,\n    -0.0178430356832060,\n    0.9044300776717159,\n    -0.3576998641394597,\n  };\n  double const p[3] = {\n    +0.11,\n    -13.15,\n    1.17,\n  };\n\n  double R[3 * 3];\n  QuaternionToRotation(q, R);\n\n  double result1[3];\n  UnitQuaternionRotatePoint(q, p, result1);\n\n  double result2[3];\n  VectorRef(result2, 3) = ConstMatrixRef(R, 3, 3)* ConstVectorRef(p, 3);\n  ExpectArraysClose(3, result1, result2, kTolerance);\n}\n\n\n// Verify that (a * b) * c == a * (b * c).\nTEST(Quaternion, MultiplicationIsAssociative) {\n  double a[4];\n  double b[4];\n  double c[4];\n  for (int i = 0; i < 4; ++i) {\n    a[i] = 2 * RandDouble() - 1;\n    b[i] = 2 * RandDouble() - 1;\n    c[i] = 2 * RandDouble() - 1;\n  }\n\n  double ab[4];\n  double ab_c[4];\n  QuaternionProduct(a, b, ab);\n  QuaternionProduct(ab, c, ab_c);\n\n  double bc[4];\n  double a_bc[4];\n  QuaternionProduct(b, c, bc);\n  QuaternionProduct(a, bc, a_bc);\n\n  ASSERT_NEAR(ab_c[0], a_bc[0], kTolerance);\n  ASSERT_NEAR(ab_c[1], a_bc[1], kTolerance);\n  ASSERT_NEAR(ab_c[2], a_bc[2], kTolerance);\n  ASSERT_NEAR(ab_c[3], a_bc[3], kTolerance);\n}\n\n\nTEST(AngleAxis, RotatePointGivesSameAnswerAsRotationMatrix) {\n  double angle_axis[3];\n  double R[9];\n  double p[3];\n  double angle_axis_rotated_p[3];\n  double rotation_matrix_rotated_p[3];\n\n  for (int i = 0; i < 10000; ++i) {\n    double theta = (2.0 * i * 0.0011 - 1.0) * kPi;\n    for (int j = 0; j < 50; ++j) {\n      double norm2 = 0.0;\n      for (int k = 0; k < 3; ++k) {\n        angle_axis[k] = 2.0 * RandDouble() - 1.0;\n        p[k] = 2.0 * RandDouble() - 1.0;\n        norm2 = angle_axis[k] * angle_axis[k];\n      }\n\n      const double inv_norm = theta / sqrt(norm2);\n      for (int k = 0; k < 3; ++k) {\n        angle_axis[k] *= inv_norm;\n      }\n\n      AngleAxisToRotationMatrix(angle_axis, R);\n      rotation_matrix_rotated_p[0] = R[0] * p[0] + R[3] * p[1] + R[6] * p[2];\n      rotation_matrix_rotated_p[1] = R[1] * p[0] + R[4] * p[1] + R[7] * p[2];\n      rotation_matrix_rotated_p[2] = R[2] * p[0] + R[5] * p[1] + R[8] * p[2];\n\n      AngleAxisRotatePoint(angle_axis, p, angle_axis_rotated_p);\n      for (int k = 0; k < 3; ++k) {\n        EXPECT_NEAR(rotation_matrix_rotated_p[k],\n                    angle_axis_rotated_p[k],\n                    kTolerance) << \"p: \" << p[0]\n                                << \" \" << p[1]\n                                << \" \" << p[2]\n                                << \" angle_axis: \" << angle_axis[0]\n                                << \" \" << angle_axis[1]\n                                << \" \" << angle_axis[2];\n      }\n    }\n  }\n}\n\nTEST(AngleAxis, NearZeroRotatePointGivesSameAnswerAsRotationMatrix) {\n  double angle_axis[3];\n  double R[9];\n  double p[3];\n  double angle_axis_rotated_p[3];\n  double rotation_matrix_rotated_p[3];\n\n  for (int i = 0; i < 10000; ++i) {\n    double norm2 = 0.0;\n    for (int k = 0; k < 3; ++k) {\n      angle_axis[k] = 2.0 * RandDouble() - 1.0;\n      p[k] = 2.0 * RandDouble() - 1.0;\n      norm2 = angle_axis[k] * angle_axis[k];\n    }\n\n    double theta = (2.0 * i * 0.0001  - 1.0) * 1e-16;\n    const double inv_norm = theta / sqrt(norm2);\n    for (int k = 0; k < 3; ++k) {\n      angle_axis[k] *= inv_norm;\n    }\n\n    AngleAxisToRotationMatrix(angle_axis, R);\n    rotation_matrix_rotated_p[0] = R[0] * p[0] + R[3] * p[1] + R[6] * p[2];\n    rotation_matrix_rotated_p[1] = R[1] * p[0] + R[4] * p[1] + R[7] * p[2];\n    rotation_matrix_rotated_p[2] = R[2] * p[0] + R[5] * p[1] + R[8] * p[2];\n\n    AngleAxisRotatePoint(angle_axis, p, angle_axis_rotated_p);\n    for (int k = 0; k < 3; ++k) {\n      EXPECT_NEAR(rotation_matrix_rotated_p[k],\n                  angle_axis_rotated_p[k],\n                  kTolerance) << \"p: \" << p[0]\n                              << \" \" << p[1]\n                              << \" \" << p[2]\n                              << \" angle_axis: \" << angle_axis[0]\n                              << \" \" << angle_axis[1]\n                              << \" \" << angle_axis[2];\n    }\n  }\n}\n\nTEST(MatrixAdapter, RowMajor3x3ReturnTypeAndAccessIsCorrect) {\n  double array[9] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0 };\n  const float const_array[9] =\n      { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f };\n  MatrixAdapter<double, 3, 1> A = RowMajorAdapter3x3(array);\n  MatrixAdapter<const float, 3, 1> B = RowMajorAdapter3x3(const_array);\n\n  for (int i = 0; i < 3; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      // The values are integers from 1 to 9, so equality tests are appropriate\n      // even for float and double values.\n      EXPECT_EQ(A(i, j), array[3*i+j]);\n      EXPECT_EQ(B(i, j), const_array[3*i+j]);\n    }\n  }\n}\n\nTEST(MatrixAdapter, ColumnMajor3x3ReturnTypeAndAccessIsCorrect) {\n  double array[9] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0 };\n  const float const_array[9] =\n      { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f };\n  MatrixAdapter<double, 1, 3> A = ColumnMajorAdapter3x3(array);\n  MatrixAdapter<const float, 1, 3> B = ColumnMajorAdapter3x3(const_array);\n\n  for (int i = 0; i < 3; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      // The values are integers from 1 to 9, so equality tests are\n      // appropriate even for float and double values.\n      EXPECT_EQ(A(i, j), array[3*j+i]);\n      EXPECT_EQ(B(i, j), const_array[3*j+i]);\n    }\n  }\n}\n\nTEST(MatrixAdapter, RowMajor2x4IsCorrect) {\n  const int expected[8] = { 1, 2, 3, 4, 5, 6, 7, 8 };\n  int array[8];\n  MatrixAdapter<int, 4, 1> M(array);\n  M(0, 0) = 1; M(0, 1) = 2; M(0, 2) = 3; M(0, 3) = 4;\n  M(1, 0) = 5; M(1, 1) = 6; M(1, 2) = 7; M(1, 3) = 8;\n  for (int k = 0; k < 8; ++k) {\n    EXPECT_EQ(array[k], expected[k]);\n  }\n}\n\nTEST(MatrixAdapter, ColumnMajor2x4IsCorrect) {\n  const int expected[8] = { 1, 5, 2, 6, 3, 7, 4, 8 };\n  int array[8];\n  MatrixAdapter<int, 1, 2> M(array);\n  M(0, 0) = 1; M(0, 1) = 2; M(0, 2) = 3; M(0, 3) = 4;\n  M(1, 0) = 5; M(1, 1) = 6; M(1, 2) = 7; M(1, 3) = 8;\n  for (int k = 0; k < 8; ++k) {\n    EXPECT_EQ(array[k], expected[k]);\n  }\n}\n\nTEST(RotationMatrixToAngleAxis, NearPiExampleOneFromTobiasStrauss) {\n  // Example from Tobias Strauss\n  const double rotation_matrix[] = {\n    -0.999807135425239,    -0.0128154391194470,   -0.0148814136745799,\n    -0.0128154391194470,   -0.148441438622958,     0.988838158557669,\n    -0.0148814136745799,    0.988838158557669,     0.148248574048196\n  };\n\n  double angle_axis[3];\n  RotationMatrixToAngleAxis(RowMajorAdapter3x3(rotation_matrix), angle_axis);\n  double round_trip[9];\n  AngleAxisToRotationMatrix(angle_axis, RowMajorAdapter3x3(round_trip));\n  EXPECT_THAT(rotation_matrix, IsNear3x3Matrix(round_trip));\n}\n\nstatic void CheckRotationMatrixToAngleAxisRoundTrip(const double theta,\n                                                    const double phi,\n                                                    const double angle) {\n  double angle_axis[3];\n  angle_axis[0] = angle * sin(phi) * cos(theta);\n  angle_axis[1] = angle * sin(phi) * sin(theta);\n  angle_axis[2] = angle * cos(phi);\n\n  double rotation_matrix[9];\n  AngleAxisToRotationMatrix(angle_axis, rotation_matrix);\n\n  double angle_axis_round_trip[3];\n  RotationMatrixToAngleAxis(rotation_matrix, angle_axis_round_trip);\n  EXPECT_THAT(angle_axis_round_trip, IsNearAngleAxis(angle_axis));\n}\n\nTEST(RotationMatrixToAngleAxis, ExhaustiveRoundTrip) {\n  const double kMaxSmallAngle = 1e-8;\n  const int kNumSteps = 1000;\n  for (int i = 0; i < kNumSteps; ++i) {\n    const double theta = static_cast<double>(i) / kNumSteps * 2.0 * kPi;\n    for (int j = 0; j < kNumSteps; ++j) {\n      const double phi = static_cast<double>(j) / kNumSteps * kPi;\n      // Rotations of angle Pi.\n      CheckRotationMatrixToAngleAxisRoundTrip(theta, phi, kPi);\n      // Rotation of angle approximately Pi.\n      CheckRotationMatrixToAngleAxisRoundTrip(\n          theta, phi, kPi - kMaxSmallAngle * RandDouble());\n      // Rotations of angle approximately zero.\n      CheckRotationMatrixToAngleAxisRoundTrip(\n          theta, phi, kMaxSmallAngle * 2.0 * RandDouble() - 1.0);\n    }\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/schur_complement_solver.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/schur_complement_solver.h\"\n\n#include <algorithm>\n#include <ctime>\n#include <memory>\n#include <set>\n#include <vector>\n\n#include \"Eigen/Dense\"\n#include \"Eigen/SparseCore\"\n#include \"ceres/block_random_access_dense_matrix.h\"\n#include \"ceres/block_random_access_matrix.h\"\n#include \"ceres/block_random_access_sparse_matrix.h\"\n#include \"ceres/block_sparse_matrix.h\"\n#include \"ceres/block_structure.h\"\n#include \"ceres/conjugate_gradients_solver.h\"\n#include \"ceres/detect_structure.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/lapack.h\"\n#include \"ceres/linear_solver.h\"\n#include \"ceres/sparse_cholesky.h\"\n#include \"ceres/triplet_sparse_matrix.h\"\n#include \"ceres/types.h\"\n#include \"ceres/wall_time.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::make_pair;\nusing std::pair;\nusing std::set;\nusing std::vector;\n\nnamespace {\n\nclass BlockRandomAccessSparseMatrixAdapter : public LinearOperator {\n public:\n  explicit BlockRandomAccessSparseMatrixAdapter(\n      const BlockRandomAccessSparseMatrix& m)\n      : m_(m) {}\n\n  virtual ~BlockRandomAccessSparseMatrixAdapter() {}\n\n  // y = y + Ax;\n  void RightMultiply(const double* x, double* y) const final {\n    m_.SymmetricRightMultiply(x, y);\n  }\n\n  // y = y + A'x;\n  void LeftMultiply(const double* x, double* y) const final {\n    m_.SymmetricRightMultiply(x, y);\n  }\n\n  int num_rows() const final { return m_.num_rows(); }\n  int num_cols() const final { return m_.num_rows(); }\n\n private:\n  const BlockRandomAccessSparseMatrix& m_;\n};\n\nclass BlockRandomAccessDiagonalMatrixAdapter : public LinearOperator {\n public:\n  explicit BlockRandomAccessDiagonalMatrixAdapter(\n      const BlockRandomAccessDiagonalMatrix& m)\n      : m_(m) {}\n\n  virtual ~BlockRandomAccessDiagonalMatrixAdapter() {}\n\n  // y = y + Ax;\n  void RightMultiply(const double* x, double* y) const final {\n    m_.RightMultiply(x, y);\n  }\n\n  // y = y + A'x;\n  void LeftMultiply(const double* x, double* y) const final {\n    m_.RightMultiply(x, y);\n  }\n\n  int num_rows() const final { return m_.num_rows(); }\n  int num_cols() const final { return m_.num_rows(); }\n\n private:\n  const BlockRandomAccessDiagonalMatrix& m_;\n};\n\n}  // namespace\n\nLinearSolver::Summary SchurComplementSolver::SolveImpl(\n    BlockSparseMatrix* A,\n    const double* b,\n    const LinearSolver::PerSolveOptions& per_solve_options,\n    double* x) {\n  EventLogger event_logger(\"SchurComplementSolver::Solve\");\n\n  const CompressedRowBlockStructure* bs = A->block_structure();\n  if (eliminator_.get() == NULL) {\n    const int num_eliminate_blocks = options_.elimination_groups[0];\n    const int num_f_blocks = bs->cols.size() - num_eliminate_blocks;\n\n    InitStorage(bs);\n    DetectStructure(*bs,\n                    num_eliminate_blocks,\n                    &options_.row_block_size,\n                    &options_.e_block_size,\n                    &options_.f_block_size);\n\n    // For the special case of the static structure <2,3,6> with\n    // exactly one f block use the SchurEliminatorForOneFBlock.\n    //\n    // TODO(sameeragarwal): A more scalable template specialization\n    // mechanism that does not cause binary bloat.\n    if (options_.row_block_size == 2 &&\n        options_.e_block_size == 3 &&\n        options_.f_block_size == 6 &&\n        num_f_blocks == 1) {\n      eliminator_.reset(new SchurEliminatorForOneFBlock<2, 3, 6>);\n    } else {\n      eliminator_.reset(SchurEliminatorBase::Create(options_));\n    }\n\n    CHECK(eliminator_);\n    const bool kFullRankETE = true;\n    eliminator_->Init(num_eliminate_blocks, kFullRankETE, bs);\n  }\n\n  std::fill(x, x + A->num_cols(), 0.0);\n  event_logger.AddEvent(\"Setup\");\n\n  eliminator_->Eliminate(BlockSparseMatrixData(*A),\n                         b,\n                         per_solve_options.D,\n                         lhs_.get(),\n                         rhs_.get());\n  event_logger.AddEvent(\"Eliminate\");\n\n  double* reduced_solution = x + A->num_cols() - lhs_->num_cols();\n  const LinearSolver::Summary summary =\n      SolveReducedLinearSystem(per_solve_options, reduced_solution);\n  event_logger.AddEvent(\"ReducedSolve\");\n\n  if (summary.termination_type == LINEAR_SOLVER_SUCCESS) {\n    eliminator_->BackSubstitute(\n        BlockSparseMatrixData(*A), b, per_solve_options.D, reduced_solution, x);\n    event_logger.AddEvent(\"BackSubstitute\");\n  }\n\n  return summary;\n}\n\n// Initialize a BlockRandomAccessDenseMatrix to store the Schur\n// complement.\nvoid DenseSchurComplementSolver::InitStorage(\n    const CompressedRowBlockStructure* bs) {\n  const int num_eliminate_blocks = options().elimination_groups[0];\n  const int num_col_blocks = bs->cols.size();\n\n  vector<int> blocks(num_col_blocks - num_eliminate_blocks, 0);\n  for (int i = num_eliminate_blocks, j = 0; i < num_col_blocks; ++i, ++j) {\n    blocks[j] = bs->cols[i].size;\n  }\n\n  set_lhs(new BlockRandomAccessDenseMatrix(blocks));\n  set_rhs(new double[lhs()->num_rows()]);\n}\n\n// Solve the system Sx = r, assuming that the matrix S is stored in a\n// BlockRandomAccessDenseMatrix. The linear system is solved using\n// Eigen's Cholesky factorization.\nLinearSolver::Summary DenseSchurComplementSolver::SolveReducedLinearSystem(\n    const LinearSolver::PerSolveOptions& per_solve_options, double* solution) {\n  LinearSolver::Summary summary;\n  summary.num_iterations = 0;\n  summary.termination_type = LINEAR_SOLVER_SUCCESS;\n  summary.message = \"Success.\";\n\n  const BlockRandomAccessDenseMatrix* m =\n      down_cast<const BlockRandomAccessDenseMatrix*>(lhs());\n  const int num_rows = m->num_rows();\n\n  // The case where there are no f blocks, and the system is block\n  // diagonal.\n  if (num_rows == 0) {\n    return summary;\n  }\n\n  summary.num_iterations = 1;\n\n  if (options().dense_linear_algebra_library_type == EIGEN) {\n    Eigen::LLT<Matrix, Eigen::Upper> llt =\n        ConstMatrixRef(m->values(), num_rows, num_rows)\n            .selfadjointView<Eigen::Upper>()\n            .llt();\n    if (llt.info() != Eigen::Success) {\n      summary.termination_type = LINEAR_SOLVER_FAILURE;\n      summary.message =\n          \"Eigen failure. Unable to perform dense Cholesky factorization.\";\n      return summary;\n    }\n\n    VectorRef(solution, num_rows) = llt.solve(ConstVectorRef(rhs(), num_rows));\n  } else {\n    VectorRef(solution, num_rows) = ConstVectorRef(rhs(), num_rows);\n    summary.termination_type = LAPACK::SolveInPlaceUsingCholesky(\n        num_rows, m->values(), solution, &summary.message);\n  }\n\n  return summary;\n}\n\nSparseSchurComplementSolver::SparseSchurComplementSolver(\n    const LinearSolver::Options& options)\n    : SchurComplementSolver(options) {\n  if (options.type != ITERATIVE_SCHUR) {\n    sparse_cholesky_ = SparseCholesky::Create(options);\n  }\n}\n\nSparseSchurComplementSolver::~SparseSchurComplementSolver() {}\n\n// Determine the non-zero blocks in the Schur Complement matrix, and\n// initialize a BlockRandomAccessSparseMatrix object.\nvoid SparseSchurComplementSolver::InitStorage(\n    const CompressedRowBlockStructure* bs) {\n  const int num_eliminate_blocks = options().elimination_groups[0];\n  const int num_col_blocks = bs->cols.size();\n  const int num_row_blocks = bs->rows.size();\n\n  blocks_.resize(num_col_blocks - num_eliminate_blocks, 0);\n  for (int i = num_eliminate_blocks; i < num_col_blocks; ++i) {\n    blocks_[i - num_eliminate_blocks] = bs->cols[i].size;\n  }\n\n  set<pair<int, int>> block_pairs;\n  for (int i = 0; i < blocks_.size(); ++i) {\n    block_pairs.insert(make_pair(i, i));\n  }\n\n  int r = 0;\n  while (r < num_row_blocks) {\n    int e_block_id = bs->rows[r].cells.front().block_id;\n    if (e_block_id >= num_eliminate_blocks) {\n      break;\n    }\n    vector<int> f_blocks;\n\n    // Add to the chunk until the first block in the row is\n    // different than the one in the first row for the chunk.\n    for (; r < num_row_blocks; ++r) {\n      const CompressedRow& row = bs->rows[r];\n      if (row.cells.front().block_id != e_block_id) {\n        break;\n      }\n\n      // Iterate over the blocks in the row, ignoring the first\n      // block since it is the one to be eliminated.\n      for (int c = 1; c < row.cells.size(); ++c) {\n        const Cell& cell = row.cells[c];\n        f_blocks.push_back(cell.block_id - num_eliminate_blocks);\n      }\n    }\n\n    sort(f_blocks.begin(), f_blocks.end());\n    f_blocks.erase(unique(f_blocks.begin(), f_blocks.end()), f_blocks.end());\n    for (int i = 0; i < f_blocks.size(); ++i) {\n      for (int j = i + 1; j < f_blocks.size(); ++j) {\n        block_pairs.insert(make_pair(f_blocks[i], f_blocks[j]));\n      }\n    }\n  }\n\n  // Remaining rows do not contribute to the chunks and directly go\n  // into the schur complement via an outer product.\n  for (; r < num_row_blocks; ++r) {\n    const CompressedRow& row = bs->rows[r];\n    CHECK_GE(row.cells.front().block_id, num_eliminate_blocks);\n    for (int i = 0; i < row.cells.size(); ++i) {\n      int r_block1_id = row.cells[i].block_id - num_eliminate_blocks;\n      for (int j = 0; j < row.cells.size(); ++j) {\n        int r_block2_id = row.cells[j].block_id - num_eliminate_blocks;\n        if (r_block1_id <= r_block2_id) {\n          block_pairs.insert(make_pair(r_block1_id, r_block2_id));\n        }\n      }\n    }\n  }\n\n  set_lhs(new BlockRandomAccessSparseMatrix(blocks_, block_pairs));\n  set_rhs(new double[lhs()->num_rows()]);\n}\n\nLinearSolver::Summary SparseSchurComplementSolver::SolveReducedLinearSystem(\n    const LinearSolver::PerSolveOptions& per_solve_options, double* solution) {\n  if (options().type == ITERATIVE_SCHUR) {\n    return SolveReducedLinearSystemUsingConjugateGradients(per_solve_options,\n                                                           solution);\n  }\n\n  LinearSolver::Summary summary;\n  summary.num_iterations = 0;\n  summary.termination_type = LINEAR_SOLVER_SUCCESS;\n  summary.message = \"Success.\";\n\n  const TripletSparseMatrix* tsm =\n      down_cast<const BlockRandomAccessSparseMatrix*>(lhs())->matrix();\n  if (tsm->num_rows() == 0) {\n    return summary;\n  }\n\n  std::unique_ptr<CompressedRowSparseMatrix> lhs;\n  const CompressedRowSparseMatrix::StorageType storage_type =\n      sparse_cholesky_->StorageType();\n  if (storage_type == CompressedRowSparseMatrix::UPPER_TRIANGULAR) {\n    lhs.reset(CompressedRowSparseMatrix::FromTripletSparseMatrix(*tsm));\n    lhs->set_storage_type(CompressedRowSparseMatrix::UPPER_TRIANGULAR);\n  } else {\n    lhs.reset(\n        CompressedRowSparseMatrix::FromTripletSparseMatrixTransposed(*tsm));\n    lhs->set_storage_type(CompressedRowSparseMatrix::LOWER_TRIANGULAR);\n  }\n\n  *lhs->mutable_col_blocks() = blocks_;\n  *lhs->mutable_row_blocks() = blocks_;\n\n  summary.num_iterations = 1;\n  summary.termination_type = sparse_cholesky_->FactorAndSolve(\n      lhs.get(), rhs(), solution, &summary.message);\n  return summary;\n}\n\nLinearSolver::Summary\nSparseSchurComplementSolver::SolveReducedLinearSystemUsingConjugateGradients(\n    const LinearSolver::PerSolveOptions& per_solve_options, double* solution) {\n  CHECK(options().use_explicit_schur_complement);\n  const int num_rows = lhs()->num_rows();\n  // The case where there are no f blocks, and the system is block\n  // diagonal.\n  if (num_rows == 0) {\n    LinearSolver::Summary summary;\n    summary.num_iterations = 0;\n    summary.termination_type = LINEAR_SOLVER_SUCCESS;\n    summary.message = \"Success.\";\n    return summary;\n  }\n\n  // Only SCHUR_JACOBI is supported over here right now.\n  CHECK_EQ(options().preconditioner_type, SCHUR_JACOBI);\n\n  if (preconditioner_.get() == NULL) {\n    preconditioner_.reset(new BlockRandomAccessDiagonalMatrix(blocks_));\n  }\n\n  BlockRandomAccessSparseMatrix* sc = down_cast<BlockRandomAccessSparseMatrix*>(\n      const_cast<BlockRandomAccessMatrix*>(lhs()));\n\n  // Extract block diagonal from the Schur complement to construct the\n  // schur_jacobi preconditioner.\n  for (int i = 0; i < blocks_.size(); ++i) {\n    const int block_size = blocks_[i];\n\n    int sc_r, sc_c, sc_row_stride, sc_col_stride;\n    CellInfo* sc_cell_info =\n        sc->GetCell(i, i, &sc_r, &sc_c, &sc_row_stride, &sc_col_stride);\n    CHECK(sc_cell_info != nullptr);\n    MatrixRef sc_m(sc_cell_info->values, sc_row_stride, sc_col_stride);\n\n    int pre_r, pre_c, pre_row_stride, pre_col_stride;\n    CellInfo* pre_cell_info = preconditioner_->GetCell(\n        i, i, &pre_r, &pre_c, &pre_row_stride, &pre_col_stride);\n    CHECK(pre_cell_info != nullptr);\n    MatrixRef pre_m(pre_cell_info->values, pre_row_stride, pre_col_stride);\n\n    pre_m.block(pre_r, pre_c, block_size, block_size) =\n        sc_m.block(sc_r, sc_c, block_size, block_size);\n  }\n  preconditioner_->Invert();\n\n  VectorRef(solution, num_rows).setZero();\n\n  std::unique_ptr<LinearOperator> lhs_adapter(\n      new BlockRandomAccessSparseMatrixAdapter(*sc));\n  std::unique_ptr<LinearOperator> preconditioner_adapter(\n      new BlockRandomAccessDiagonalMatrixAdapter(*preconditioner_));\n\n  LinearSolver::Options cg_options;\n  cg_options.min_num_iterations = options().min_num_iterations;\n  cg_options.max_num_iterations = options().max_num_iterations;\n  ConjugateGradientsSolver cg_solver(cg_options);\n\n  LinearSolver::PerSolveOptions cg_per_solve_options;\n  cg_per_solve_options.r_tolerance = per_solve_options.r_tolerance;\n  cg_per_solve_options.q_tolerance = per_solve_options.q_tolerance;\n  cg_per_solve_options.preconditioner = preconditioner_adapter.get();\n\n  return cg_solver.Solve(\n      lhs_adapter.get(), rhs(), cg_per_solve_options, solution);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/schur_complement_solver.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_SCHUR_COMPLEMENT_SOLVER_H_\n#define CERES_INTERNAL_SCHUR_COMPLEMENT_SOLVER_H_\n\n#include <memory>\n#include <set>\n#include <utility>\n#include <vector>\n\n#include \"ceres/block_random_access_diagonal_matrix.h\"\n#include \"ceres/block_random_access_matrix.h\"\n#include \"ceres/block_sparse_matrix.h\"\n#include \"ceres/block_structure.h\"\n#include \"ceres/internal/port.h\"\n#include \"ceres/linear_solver.h\"\n#include \"ceres/schur_eliminator.h\"\n#include \"ceres/types.h\"\n\n#ifdef CERES_USE_EIGEN_SPARSE\n#include \"Eigen/SparseCholesky\"\n#include \"Eigen/OrderingMethods\"\n#endif\n\nnamespace ceres {\nnamespace internal {\n\nclass BlockSparseMatrix;\nclass SparseCholesky;\n\n// Base class for Schur complement based linear least squares\n// solvers. It assumes that the input linear system Ax = b can be\n// partitioned into\n//\n//  E y + F z = b\n//\n// Where x = [y;z] is a partition of the variables.  The paritioning\n// of the variables is such that, E'E is a block diagonal\n// matrix. Further, the rows of A are ordered so that for every\n// variable block in y, all the rows containing that variable block\n// occur as a vertically contiguous block. i.e the matrix A looks like\n//\n//              E                 F\n//  A = [ y1   0   0   0 |  z1    0    0   0    z5]\n//      [ y1   0   0   0 |  z1   z2    0   0     0]\n//      [  0  y2   0   0 |   0    0   z3   0     0]\n//      [  0   0  y3   0 |  z1   z2   z3  z4    z5]\n//      [  0   0  y3   0 |  z1    0    0   0    z5]\n//      [  0   0   0  y4 |   0    0    0   0    z5]\n//      [  0   0   0  y4 |   0   z2    0   0     0]\n//      [  0   0   0  y4 |   0    0    0   0     0]\n//      [  0   0   0   0 |  z1    0    0   0     0]\n//      [  0   0   0   0 |   0    0   z3  z4    z5]\n//\n// This structure should be reflected in the corresponding\n// CompressedRowBlockStructure object associated with A. The linear\n// system Ax = b should either be well posed or the array D below\n// should be non-null and the diagonal matrix corresponding to it\n// should be non-singular.\n//\n// SchurComplementSolver has two sub-classes.\n//\n// DenseSchurComplementSolver: For problems where the Schur complement\n// matrix is small and dense, or if CHOLMOD/SuiteSparse is not\n// installed. For structure from motion problems, this is solver can\n// be used for problems with upto a few hundred cameras.\n//\n// SparseSchurComplementSolver: For problems where the Schur\n// complement matrix is large and sparse. It requires that Ceres be\n// build with at least one sparse linear algebra library, as it\n// computes a sparse Cholesky factorization of the Schur complement.\n//\n// This solver can be used for solving structure from motion problems\n// with tens of thousands of cameras, though depending on the exact\n// sparsity structure, it maybe better to use an iterative solver.\n//\n// The two solvers can be instantiated by calling\n// LinearSolver::CreateLinearSolver with LinearSolver::Options::type\n// set to DENSE_SCHUR and SPARSE_SCHUR\n// respectively. LinearSolver::Options::elimination_groups[0] should\n// be at least 1.\nclass SchurComplementSolver : public BlockSparseMatrixSolver {\n public:\n  explicit SchurComplementSolver(const LinearSolver::Options& options)\n      : options_(options) {\n    CHECK_GT(options.elimination_groups.size(), 1);\n    CHECK_GT(options.elimination_groups[0], 0);\n    CHECK(options.context != NULL);\n  }\n  SchurComplementSolver(const SchurComplementSolver&) = delete;\n  void operator=(const SchurComplementSolver&) = delete;\n\n  // LinearSolver methods\n  virtual ~SchurComplementSolver() {}\n  LinearSolver::Summary SolveImpl(\n      BlockSparseMatrix* A,\n      const double* b,\n      const LinearSolver::PerSolveOptions& per_solve_options,\n      double* x) override;\n\n protected:\n  const LinearSolver::Options& options() const { return options_; }\n\n  const BlockRandomAccessMatrix* lhs() const { return lhs_.get(); }\n  void set_lhs(BlockRandomAccessMatrix* lhs) { lhs_.reset(lhs); }\n  const double* rhs() const { return rhs_.get(); }\n  void set_rhs(double* rhs) { rhs_.reset(rhs); }\n\n private:\n  virtual void InitStorage(const CompressedRowBlockStructure* bs) = 0;\n  virtual LinearSolver::Summary SolveReducedLinearSystem(\n      const LinearSolver::PerSolveOptions& per_solve_options,\n      double* solution) = 0;\n\n  LinearSolver::Options options_;\n\n  std::unique_ptr<SchurEliminatorBase> eliminator_;\n  std::unique_ptr<BlockRandomAccessMatrix> lhs_;\n  std::unique_ptr<double[]> rhs_;\n};\n\n// Dense Cholesky factorization based solver.\nclass DenseSchurComplementSolver : public SchurComplementSolver {\n public:\n  explicit DenseSchurComplementSolver(const LinearSolver::Options& options)\n      : SchurComplementSolver(options) {}\n  DenseSchurComplementSolver(const DenseSchurComplementSolver&) = delete;\n  void operator=(const DenseSchurComplementSolver&) = delete;\n\n  virtual ~DenseSchurComplementSolver() {}\n\n private:\n  void InitStorage(const CompressedRowBlockStructure* bs) final;\n  LinearSolver::Summary SolveReducedLinearSystem(\n      const LinearSolver::PerSolveOptions& per_solve_options,\n      double* solution) final;\n};\n\n// Sparse Cholesky factorization based solver.\nclass SparseSchurComplementSolver : public SchurComplementSolver {\n public:\n  explicit SparseSchurComplementSolver(const LinearSolver::Options& options);\n  SparseSchurComplementSolver(const SparseSchurComplementSolver&) = delete;\n  void operator=(const SparseSchurComplementSolver&) = delete;\n\n  virtual ~SparseSchurComplementSolver();\n\n private:\n  void InitStorage(const CompressedRowBlockStructure* bs) final;\n  LinearSolver::Summary SolveReducedLinearSystem(\n      const LinearSolver::PerSolveOptions& per_solve_options,\n      double* solution) final;\n  LinearSolver::Summary SolveReducedLinearSystemUsingConjugateGradients(\n      const LinearSolver::PerSolveOptions& per_solve_options,\n      double* solution);\n\n  // Size of the blocks in the Schur complement.\n  std::vector<int> blocks_;\n  std::unique_ptr<SparseCholesky> sparse_cholesky_;\n  std::unique_ptr<BlockRandomAccessDiagonalMatrix> preconditioner_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_SCHUR_COMPLEMENT_SOLVER_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/schur_complement_solver_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/schur_complement_solver.h\"\n\n#include <cstddef>\n#include <memory>\n\n#include \"ceres/block_sparse_matrix.h\"\n#include \"ceres/block_structure.h\"\n#include \"ceres/casts.h\"\n#include \"ceres/context_impl.h\"\n#include \"ceres/detect_structure.h\"\n#include \"ceres/linear_least_squares_problems.h\"\n#include \"ceres/linear_solver.h\"\n#include \"ceres/triplet_sparse_matrix.h\"\n#include \"ceres/types.h\"\n#include \"glog/logging.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass SchurComplementSolverTest : public ::testing::Test {\n protected:\n  void SetUpFromProblemId(int problem_id) {\n    std::unique_ptr<LinearLeastSquaresProblem> problem(\n        CreateLinearLeastSquaresProblemFromId(problem_id));\n\n    CHECK(problem != nullptr);\n    A.reset(down_cast<BlockSparseMatrix*>(problem->A.release()));\n    b.reset(problem->b.release());\n    D.reset(problem->D.release());\n\n    num_cols = A->num_cols();\n    num_rows = A->num_rows();\n    num_eliminate_blocks = problem->num_eliminate_blocks;\n\n    x.resize(num_cols);\n    sol.resize(num_cols);\n    sol_d.resize(num_cols);\n\n    LinearSolver::Options options;\n    options.type = DENSE_QR;\n    ContextImpl context;\n    options.context = &context;\n\n    std::unique_ptr<LinearSolver> qr(LinearSolver::Create(options));\n\n    TripletSparseMatrix triplet_A(A->num_rows(),\n                                  A->num_cols(),\n                                  A->num_nonzeros());\n    A->ToTripletSparseMatrix(&triplet_A);\n\n    // Gold standard solutions using dense QR factorization.\n    DenseSparseMatrix dense_A(triplet_A);\n    qr->Solve(&dense_A, b.get(), LinearSolver::PerSolveOptions(), sol.data());\n\n    // Gold standard solution with appended diagonal.\n    LinearSolver::PerSolveOptions per_solve_options;\n    per_solve_options.D = D.get();\n    qr->Solve(&dense_A, b.get(), per_solve_options, sol_d.data());\n  }\n\n  void ComputeAndCompareSolutions(\n      int problem_id,\n      bool regularization,\n      ceres::LinearSolverType linear_solver_type,\n      ceres::DenseLinearAlgebraLibraryType dense_linear_algebra_library_type,\n      ceres::SparseLinearAlgebraLibraryType sparse_linear_algebra_library_type,\n      bool use_postordering) {\n    SetUpFromProblemId(problem_id);\n    LinearSolver::Options options;\n    options.elimination_groups.push_back(num_eliminate_blocks);\n    options.elimination_groups.push_back(\n        A->block_structure()->cols.size() - num_eliminate_blocks);\n    options.type = linear_solver_type;\n    options.dense_linear_algebra_library_type =\n        dense_linear_algebra_library_type;\n    options.sparse_linear_algebra_library_type =\n        sparse_linear_algebra_library_type;\n    options.use_postordering = use_postordering;\n    ContextImpl context;\n    options.context = &context;\n    DetectStructure(*A->block_structure(),\n                    num_eliminate_blocks,\n                    &options.row_block_size,\n                    &options.e_block_size,\n                    &options.f_block_size);\n\n    std::unique_ptr<LinearSolver> solver(LinearSolver::Create(options));\n\n    LinearSolver::PerSolveOptions per_solve_options;\n    LinearSolver::Summary summary;\n    if (regularization) {\n      per_solve_options.D = D.get();\n    }\n\n    summary = solver->Solve(A.get(), b.get(), per_solve_options, x.data());\n    EXPECT_EQ(summary.termination_type, LINEAR_SOLVER_SUCCESS);\n\n    if (regularization) {\n\n      ASSERT_NEAR((sol_d - x).norm() / num_cols, 0, 1e-10)\n          << \"Regularized Expected solution: \" << sol_d.transpose()\n          << \" Actual solution: \" << x.transpose();\n    } else {\n      ASSERT_NEAR((sol - x).norm() / num_cols, 0, 1e-10)\n          << \"Unregularized Expected solution: \" << sol.transpose()\n          << \" Actual solution: \" << x.transpose();\n    }\n  }\n\n  int num_rows;\n  int num_cols;\n  int num_eliminate_blocks;\n\n  std::unique_ptr<BlockSparseMatrix> A;\n  std::unique_ptr<double[]> b;\n  std::unique_ptr<double[]> D;\n  Vector x;\n  Vector sol;\n  Vector sol_d;\n};\n\n// TODO(sameeragarwal): Refactor these using value parameterized tests.\n// TODO(sameeragarwal): More extensive tests using random matrices.\nTEST_F(SchurComplementSolverTest, DenseSchurWithEigenSmallProblem) {\n  ComputeAndCompareSolutions(2, false, DENSE_SCHUR, EIGEN, SUITE_SPARSE, true);\n  ComputeAndCompareSolutions(2, true, DENSE_SCHUR, EIGEN, SUITE_SPARSE, true);\n}\n\nTEST_F(SchurComplementSolverTest, DenseSchurWithEigenLargeProblem) {\n  ComputeAndCompareSolutions(3, false, DENSE_SCHUR, EIGEN, SUITE_SPARSE, true);\n  ComputeAndCompareSolutions(3, true, DENSE_SCHUR, EIGEN, SUITE_SPARSE, true);\n}\n\nTEST_F(SchurComplementSolverTest, DenseSchurWithEigenVaryingFBlockSize) {\n  ComputeAndCompareSolutions(4, true, DENSE_SCHUR, EIGEN, SUITE_SPARSE, true);\n}\n\n#ifndef CERES_NO_LAPACK\nTEST_F(SchurComplementSolverTest, DenseSchurWithLAPACKSmallProblem) {\n  ComputeAndCompareSolutions(2, false, DENSE_SCHUR, LAPACK, SUITE_SPARSE, true);\n  ComputeAndCompareSolutions(2, true, DENSE_SCHUR, LAPACK, SUITE_SPARSE, true);\n}\n\nTEST_F(SchurComplementSolverTest, DenseSchurWithLAPACKLargeProblem) {\n  ComputeAndCompareSolutions(3, false, DENSE_SCHUR, LAPACK, SUITE_SPARSE, true);\n  ComputeAndCompareSolutions(3, true, DENSE_SCHUR, LAPACK, SUITE_SPARSE, true);\n}\n#endif\n\n#ifndef CERES_NO_SUITESPARSE\nTEST_F(SchurComplementSolverTest,\n       SparseSchurWithSuiteSparseSmallProblemNoPostOrdering) {\n  ComputeAndCompareSolutions(\n      2, false, SPARSE_SCHUR, EIGEN, SUITE_SPARSE, false);\n  ComputeAndCompareSolutions(2, true, SPARSE_SCHUR, EIGEN, SUITE_SPARSE, false);\n}\n\nTEST_F(SchurComplementSolverTest,\n       SparseSchurWithSuiteSparseSmallProblemPostOrdering) {\n  ComputeAndCompareSolutions(2, false, SPARSE_SCHUR, EIGEN, SUITE_SPARSE, true);\n  ComputeAndCompareSolutions(2, true, SPARSE_SCHUR, EIGEN, SUITE_SPARSE, true);\n}\n\nTEST_F(SchurComplementSolverTest,\n       SparseSchurWithSuiteSparseLargeProblemNoPostOrdering) {\n  ComputeAndCompareSolutions(\n      3, false, SPARSE_SCHUR, EIGEN, SUITE_SPARSE, false);\n  ComputeAndCompareSolutions(3, true, SPARSE_SCHUR, EIGEN, SUITE_SPARSE, false);\n}\n\nTEST_F(SchurComplementSolverTest,\n       SparseSchurWithSuiteSparseLargeProblemPostOrdering) {\n  ComputeAndCompareSolutions(3, false, SPARSE_SCHUR, EIGEN, SUITE_SPARSE, true);\n  ComputeAndCompareSolutions(3, true, SPARSE_SCHUR, EIGEN, SUITE_SPARSE, true);\n}\n#endif  // CERES_NO_SUITESPARSE\n\n#ifndef CERES_NO_CXSPARSE\nTEST_F(SchurComplementSolverTest,\n       SparseSchurWithCXSparseSmallProblem) {\n  ComputeAndCompareSolutions(2, false, SPARSE_SCHUR, EIGEN, CX_SPARSE, true);\n  ComputeAndCompareSolutions(2, true, SPARSE_SCHUR, EIGEN, CX_SPARSE, true);\n}\n\nTEST_F(SchurComplementSolverTest,\n       SparseSchurWithCXSparseLargeProblem) {\n  ComputeAndCompareSolutions(3, false, SPARSE_SCHUR, EIGEN, CX_SPARSE, true);\n  ComputeAndCompareSolutions(3, true, SPARSE_SCHUR, EIGEN, CX_SPARSE, true);\n}\n#endif  // CERES_NO_CXSPARSE\n\n#ifndef CERES_NO_ACCELERATE_SPARSE\nTEST_F(SchurComplementSolverTest,\n       SparseSchurWithAccelerateSparseSmallProblem) {\n  ComputeAndCompareSolutions(2, false, SPARSE_SCHUR, EIGEN, ACCELERATE_SPARSE, true);\n  ComputeAndCompareSolutions(2, true, SPARSE_SCHUR, EIGEN, ACCELERATE_SPARSE, true);\n}\n\nTEST_F(SchurComplementSolverTest,\n       SparseSchurWithAccelerateSparseLargeProblem) {\n  ComputeAndCompareSolutions(3, false, SPARSE_SCHUR, EIGEN, ACCELERATE_SPARSE, true);\n  ComputeAndCompareSolutions(3, true, SPARSE_SCHUR, EIGEN, ACCELERATE_SPARSE, true);\n}\n#endif  // CERES_NO_ACCELERATE_SPARSE\n\n#ifdef CERES_USE_EIGEN_SPARSE\nTEST_F(SchurComplementSolverTest,\n       SparseSchurWithEigenSparseSmallProblem) {\n  ComputeAndCompareSolutions(2, false, SPARSE_SCHUR, EIGEN, EIGEN_SPARSE, true);\n  ComputeAndCompareSolutions(2, true, SPARSE_SCHUR, EIGEN, EIGEN_SPARSE, true);\n}\n\nTEST_F(SchurComplementSolverTest,\n       SparseSchurWithEigenSparseLargeProblem) {\n  ComputeAndCompareSolutions(3, false, SPARSE_SCHUR, EIGEN, EIGEN_SPARSE, true);\n  ComputeAndCompareSolutions(3, true, SPARSE_SCHUR, EIGEN, EIGEN_SPARSE, true);\n}\n#endif  // CERES_USE_EIGEN_SPARSE\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/schur_eliminator.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of SchurEliminator.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n#include \"ceres/linear_solver.h\"\n#include \"ceres/schur_eliminator.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\nSchurEliminatorBase*\nSchurEliminatorBase::Create(const LinearSolver::Options& options) {\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 2) &&\n     (options.f_block_size == 2)) {\n   return new SchurEliminator<2, 2, 2>(options);\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 2) &&\n     (options.f_block_size == 3)) {\n   return new SchurEliminator<2, 2, 3>(options);\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 2) &&\n     (options.f_block_size == 4)) {\n   return new SchurEliminator<2, 2, 4>(options);\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 2)) {\n   return new SchurEliminator<2, 2, Eigen::Dynamic>(options);\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 3) &&\n     (options.f_block_size == 3)) {\n   return new SchurEliminator<2, 3, 3>(options);\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 3) &&\n     (options.f_block_size == 4)) {\n   return new SchurEliminator<2, 3, 4>(options);\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 3) &&\n     (options.f_block_size == 6)) {\n   return new SchurEliminator<2, 3, 6>(options);\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 3) &&\n     (options.f_block_size == 9)) {\n   return new SchurEliminator<2, 3, 9>(options);\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 3)) {\n   return new SchurEliminator<2, 3, Eigen::Dynamic>(options);\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 4) &&\n     (options.f_block_size == 3)) {\n   return new SchurEliminator<2, 4, 3>(options);\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 4) &&\n     (options.f_block_size == 4)) {\n   return new SchurEliminator<2, 4, 4>(options);\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 4) &&\n     (options.f_block_size == 6)) {\n   return new SchurEliminator<2, 4, 6>(options);\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 4) &&\n     (options.f_block_size == 8)) {\n   return new SchurEliminator<2, 4, 8>(options);\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 4) &&\n     (options.f_block_size == 9)) {\n   return new SchurEliminator<2, 4, 9>(options);\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 4)) {\n   return new SchurEliminator<2, 4, Eigen::Dynamic>(options);\n }\n if (options.row_block_size == 2){\n   return new SchurEliminator<2, Eigen::Dynamic, Eigen::Dynamic>(options);\n }\n if ((options.row_block_size == 3) &&\n     (options.e_block_size == 3) &&\n     (options.f_block_size == 3)) {\n   return new SchurEliminator<3, 3, 3>(options);\n }\n if ((options.row_block_size == 4) &&\n     (options.e_block_size == 4) &&\n     (options.f_block_size == 2)) {\n   return new SchurEliminator<4, 4, 2>(options);\n }\n if ((options.row_block_size == 4) &&\n     (options.e_block_size == 4) &&\n     (options.f_block_size == 3)) {\n   return new SchurEliminator<4, 4, 3>(options);\n }\n if ((options.row_block_size == 4) &&\n     (options.e_block_size == 4) &&\n     (options.f_block_size == 4)) {\n   return new SchurEliminator<4, 4, 4>(options);\n }\n if ((options.row_block_size == 4) &&\n     (options.e_block_size == 4)) {\n   return new SchurEliminator<4, 4, Eigen::Dynamic>(options);\n }\n\n#endif\n  VLOG(1) << \"Template specializations not found for <\"\n          << options.row_block_size << \",\"\n          << options.e_block_size << \",\"\n          << options.f_block_size << \">\";\n  return new SchurEliminator<Eigen::Dynamic, Eigen::Dynamic, Eigen::Dynamic>(options);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/schur_eliminator.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_SCHUR_ELIMINATOR_H_\n#define CERES_INTERNAL_SCHUR_ELIMINATOR_H_\n\n#include <map>\n#include <memory>\n#include <mutex>\n#include <vector>\n\n#include \"Eigen/Dense\"\n#include \"ceres/block_random_access_matrix.h\"\n#include \"ceres/block_sparse_matrix.h\"\n#include \"ceres/block_structure.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/internal/port.h\"\n#include \"ceres/linear_solver.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// Classes implementing the SchurEliminatorBase interface implement\n// variable elimination for linear least squares problems. Assuming\n// that the input linear system Ax = b can be partitioned into\n//\n//  E y + F z = b\n//\n// Where x = [y;z] is a partition of the variables.  The partitioning\n// of the variables is such that, E'E is a block diagonal matrix. Or\n// in other words, the parameter blocks in E form an independent set\n// of the of the graph implied by the block matrix A'A. Then, this\n// class provides the functionality to compute the Schur complement\n// system\n//\n//   S z = r\n//\n// where\n//\n//   S = F'F - F'E (E'E)^{-1} E'F and r = F'b - F'E(E'E)^(-1) E'b\n//\n// This is the Eliminate operation, i.e., construct the linear system\n// obtained by eliminating the variables in E.\n//\n// The eliminator also provides the reverse functionality, i.e. given\n// values for z it can back substitute for the values of y, by solving the\n// linear system\n//\n//  Ey = b - F z\n//\n// which is done by observing that\n//\n//  y = (E'E)^(-1) [E'b - E'F z]\n//\n// The eliminator has a number of requirements.\n//\n// The rows of A are ordered so that for every variable block in y,\n// all the rows containing that variable block occur as a vertically\n// contiguous block. i.e the matrix A looks like\n//\n//              E                 F                   chunk\n//  A = [ y1   0   0   0 |  z1    0    0   0    z5]     1\n//      [ y1   0   0   0 |  z1   z2    0   0     0]     1\n//      [  0  y2   0   0 |   0    0   z3   0     0]     2\n//      [  0   0  y3   0 |  z1   z2   z3  z4    z5]     3\n//      [  0   0  y3   0 |  z1    0    0   0    z5]     3\n//      [  0   0   0  y4 |   0    0    0   0    z5]     4\n//      [  0   0   0  y4 |   0   z2    0   0     0]     4\n//      [  0   0   0  y4 |   0    0    0   0     0]     4\n//      [  0   0   0   0 |  z1    0    0   0     0] non chunk blocks\n//      [  0   0   0   0 |   0    0   z3  z4    z5] non chunk blocks\n//\n// This structure should be reflected in the corresponding\n// CompressedRowBlockStructure object associated with A. The linear\n// system Ax = b should either be well posed or the array D below\n// should be non-null and the diagonal matrix corresponding to it\n// should be non-singular. For simplicity of exposition only the case\n// with a null D is described.\n//\n// The usual way to do the elimination is as follows. Starting with\n//\n//  E y + F z = b\n//\n// we can form the normal equations,\n//\n//  E'E y + E'F z = E'b\n//  F'E y + F'F z = F'b\n//\n// multiplying both sides of the first equation by (E'E)^(-1) and then\n// by F'E we get\n//\n//  F'E y + F'E (E'E)^(-1) E'F z =  F'E (E'E)^(-1) E'b\n//  F'E y +                F'F z =  F'b\n//\n// now subtracting the two equations we get\n//\n// [FF' - F'E (E'E)^(-1) E'F] z = F'b - F'E(E'E)^(-1) E'b\n//\n// Instead of forming the normal equations and operating on them as\n// general sparse matrices, the algorithm here deals with one\n// parameter block in y at a time. The rows corresponding to a single\n// parameter block yi are known as a chunk, and the algorithm operates\n// on one chunk at a time. The mathematics remains the same since the\n// reduced linear system can be shown to be the sum of the reduced\n// linear systems for each chunk. This can be seen by observing two\n// things.\n//\n//  1. E'E is a block diagonal matrix.\n//\n//  2. When E'F is computed, only the terms within a single chunk\n//  interact, i.e for y1 column blocks when transposed and multiplied\n//  with F, the only non-zero contribution comes from the blocks in\n//  chunk1.\n//\n// Thus, the reduced linear system\n//\n//  FF' - F'E (E'E)^(-1) E'F\n//\n// can be re-written as\n//\n//  sum_k F_k F_k' - F_k'E_k (E_k'E_k)^(-1) E_k' F_k\n//\n// Where the sum is over chunks and E_k'E_k is dense matrix of size y1\n// x y1.\n//\n// Advanced usage. Until now it has been assumed that the user would\n// be interested in all of the Schur Complement S. However, it is also\n// possible to use this eliminator to obtain an arbitrary submatrix of\n// the full Schur complement. When the eliminator is generating the\n// blocks of S, it asks the RandomAccessBlockMatrix instance passed to\n// it if it has storage for that block. If it does, the eliminator\n// computes/updates it, if not it is skipped. This is useful when one\n// is interested in constructing a preconditioner based on the Schur\n// Complement, e.g., computing the block diagonal of S so that it can\n// be used as a preconditioner for an Iterative Substructuring based\n// solver [See Agarwal et al, Bundle Adjustment in the Large, ECCV\n// 2008 for an example of such use].\n//\n// Example usage: Please see schur_complement_solver.cc\nclass SchurEliminatorBase {\n public:\n  virtual ~SchurEliminatorBase() {}\n\n  // Initialize the eliminator. It is the user's responsibilty to call\n  // this function before calling Eliminate or BackSubstitute. It is\n  // also the caller's responsibilty to ensure that the\n  // CompressedRowBlockStructure object passed to this method is the\n  // same one (or is equivalent to) the one associated with the\n  // BlockSparseMatrix objects below.\n  //\n  // assume_full_rank_ete controls how the eliminator inverts with the\n  // diagonal blocks corresponding to e blocks in A'A. If\n  // assume_full_rank_ete is true, then a Cholesky factorization is\n  // used to compute the inverse, otherwise a singular value\n  // decomposition is used to compute the pseudo inverse.\n  virtual void Init(int num_eliminate_blocks,\n                    bool assume_full_rank_ete,\n                    const CompressedRowBlockStructure* bs) = 0;\n\n  // Compute the Schur complement system from the augmented linear\n  // least squares problem [A;D] x = [b;0]. The left hand side and the\n  // right hand side of the reduced linear system are returned in lhs\n  // and rhs respectively.\n  //\n  // It is the caller's responsibility to construct and initialize\n  // lhs. Depending upon the structure of the lhs object passed here,\n  // the full or a submatrix of the Schur complement will be computed.\n  //\n  // Since the Schur complement is a symmetric matrix, only the upper\n  // triangular part of the Schur complement is computed.\n  virtual void Eliminate(const BlockSparseMatrixData& A,\n                         const double* b,\n                         const double* D,\n                         BlockRandomAccessMatrix* lhs,\n                         double* rhs) = 0;\n\n  // Given values for the variables z in the F block of A, solve for\n  // the optimal values of the variables y corresponding to the E\n  // block in A.\n  virtual void BackSubstitute(const BlockSparseMatrixData& A,\n                              const double* b,\n                              const double* D,\n                              const double* z,\n                              double* y) = 0;\n  // Factory\n  static SchurEliminatorBase* Create(const LinearSolver::Options& options);\n};\n\n// Templated implementation of the SchurEliminatorBase interface. The\n// templating is on the sizes of the row, e and f blocks sizes in the\n// input matrix. In many problems, the sizes of one or more of these\n// blocks are constant, in that case, its worth passing these\n// parameters as template arguments so that they are visible to the\n// compiler and can be used for compile time optimization of the low\n// level linear algebra routines.\ntemplate <int kRowBlockSize = Eigen::Dynamic,\n          int kEBlockSize = Eigen::Dynamic,\n          int kFBlockSize = Eigen::Dynamic>\nclass SchurEliminator : public SchurEliminatorBase {\n public:\n  explicit SchurEliminator(const LinearSolver::Options& options)\n      : num_threads_(options.num_threads), context_(options.context) {\n    CHECK(context_ != nullptr);\n  }\n\n  // SchurEliminatorBase Interface\n  virtual ~SchurEliminator();\n  void Init(int num_eliminate_blocks,\n            bool assume_full_rank_ete,\n            const CompressedRowBlockStructure* bs) final;\n  void Eliminate(const BlockSparseMatrixData& A,\n                 const double* b,\n                 const double* D,\n                 BlockRandomAccessMatrix* lhs,\n                 double* rhs) final;\n  void BackSubstitute(const BlockSparseMatrixData& A,\n                      const double* b,\n                      const double* D,\n                      const double* z,\n                      double* y) final;\n\n private:\n  // Chunk objects store combinatorial information needed to\n  // efficiently eliminate a whole chunk out of the least squares\n  // problem. Consider the first chunk in the example matrix above.\n  //\n  //      [ y1   0   0   0 |  z1    0    0   0    z5]\n  //      [ y1   0   0   0 |  z1   z2    0   0     0]\n  //\n  // One of the intermediate quantities that needs to be calculated is\n  // for each row the product of the y block transposed with the\n  // non-zero z block, and the sum of these blocks across rows. A\n  // temporary array \"buffer_\" is used for computing and storing them\n  // and the buffer_layout maps the indices of the z-blocks to\n  // position in the buffer_ array.  The size of the chunk is the\n  // number of row blocks/residual blocks for the particular y block\n  // being considered.\n  //\n  // For the example chunk shown above,\n  //\n  // size = 2\n  //\n  // The entries of buffer_layout will be filled in the following order.\n  //\n  // buffer_layout[z1] = 0\n  // buffer_layout[z5] = y1 * z1\n  // buffer_layout[z2] = y1 * z1 + y1 * z5\n  typedef std::map<int, int> BufferLayoutType;\n  struct Chunk {\n    Chunk() : size(0) {}\n    int size;\n    int start;\n    BufferLayoutType buffer_layout;\n  };\n\n  void ChunkDiagonalBlockAndGradient(\n      const Chunk& chunk,\n      const BlockSparseMatrixData& A,\n      const double* b,\n      int row_block_counter,\n      typename EigenTypes<kEBlockSize, kEBlockSize>::Matrix* eet,\n      double* g,\n      double* buffer,\n      BlockRandomAccessMatrix* lhs);\n\n  void UpdateRhs(const Chunk& chunk,\n                 const BlockSparseMatrixData& A,\n                 const double* b,\n                 int row_block_counter,\n                 const double* inverse_ete_g,\n                 double* rhs);\n\n  void ChunkOuterProduct(int thread_id,\n                         const CompressedRowBlockStructure* bs,\n                         const Matrix& inverse_eet,\n                         const double* buffer,\n                         const BufferLayoutType& buffer_layout,\n                         BlockRandomAccessMatrix* lhs);\n  void EBlockRowOuterProduct(const BlockSparseMatrixData& A,\n                             int row_block_index,\n                             BlockRandomAccessMatrix* lhs);\n\n  void NoEBlockRowsUpdate(const BlockSparseMatrixData& A,\n                          const double* b,\n                          int row_block_counter,\n                          BlockRandomAccessMatrix* lhs,\n                          double* rhs);\n\n  void NoEBlockRowOuterProduct(const BlockSparseMatrixData& A,\n                               int row_block_index,\n                               BlockRandomAccessMatrix* lhs);\n\n  int num_threads_;\n  ContextImpl* context_;\n  int num_eliminate_blocks_;\n  bool assume_full_rank_ete_;\n\n  // Block layout of the columns of the reduced linear system. Since\n  // the f blocks can be of varying size, this vector stores the\n  // position of each f block in the row/col of the reduced linear\n  // system. Thus lhs_row_layout_[i] is the row/col position of the\n  // i^th f block.\n  std::vector<int> lhs_row_layout_;\n\n  // Combinatorial structure of the chunks in A. For more information\n  // see the documentation of the Chunk object above.\n  std::vector<Chunk> chunks_;\n\n  // TODO(sameeragarwal): The following two arrays contain per-thread\n  // storage. They should be refactored into a per thread struct.\n\n  // Buffer to store the products of the y and z blocks generated\n  // during the elimination phase. buffer_ is of size num_threads *\n  // buffer_size_. Each thread accesses the chunk\n  //\n  //   [thread_id * buffer_size_ , (thread_id + 1) * buffer_size_]\n  //\n  std::unique_ptr<double[]> buffer_;\n\n  // Buffer to store per thread matrix matrix products used by\n  // ChunkOuterProduct. Like buffer_ it is of size num_threads *\n  // buffer_size_. Each thread accesses the chunk\n  //\n  //   [thread_id * buffer_size_ , (thread_id + 1) * buffer_size_ -1]\n  //\n  std::unique_ptr<double[]> chunk_outer_product_buffer_;\n\n  int buffer_size_;\n  int uneliminated_row_begins_;\n\n  // Locks for the blocks in the right hand side of the reduced linear\n  // system.\n  std::vector<std::mutex*> rhs_locks_;\n};\n\n// SchurEliminatorForOneFBlock specializes the SchurEliminatorBase interface for\n// the case where there is exactly one f-block and all three parameters\n// kRowBlockSize, kEBlockSize and KFBlockSize are known at compile time. This is\n// the case for some two view bundle adjustment problems which have very\n// stringent latency requirements.\n//\n// Under these assumptions, we can simplify the more general algorithm\n// implemented by SchurEliminatorImpl significantly. Two of the major\n// contributors to the increased performance are:\n//\n// 1. Simpler loop structure and less use of dynamic memory. Almost everything\n//    is on the stack and benefits from aligned memory as well as fixed sized\n//    vectorization. We are also able to reason about temporaries and control\n//    their lifetimes better.\n// 2. Use of inverse() over llt().solve(Identity).\ntemplate <int kRowBlockSize = Eigen::Dynamic,\n          int kEBlockSize = Eigen::Dynamic,\n          int kFBlockSize = Eigen::Dynamic>\nclass SchurEliminatorForOneFBlock : public SchurEliminatorBase {\n public:\n  virtual ~SchurEliminatorForOneFBlock() {}\n  void Init(int num_eliminate_blocks,\n            bool assume_full_rank_ete,\n            const CompressedRowBlockStructure* bs) override {\n    CHECK_GT(num_eliminate_blocks, 0)\n        << \"SchurComplementSolver cannot be initialized with \"\n        << \"num_eliminate_blocks = 0.\";\n    CHECK_EQ(bs->cols.size() - num_eliminate_blocks, 1);\n\n    num_eliminate_blocks_ = num_eliminate_blocks;\n    const int num_row_blocks = bs->rows.size();\n    chunks_.clear();\n    int r = 0;\n    // Iterate over the row blocks of A, and detect the chunks. The\n    // matrix should already have been ordered so that all rows\n    // containing the same y block are vertically contiguous.\n    while (r < num_row_blocks) {\n      const int e_block_id = bs->rows[r].cells.front().block_id;\n      if (e_block_id >= num_eliminate_blocks_) {\n        break;\n      }\n\n      chunks_.push_back(Chunk());\n      Chunk& chunk = chunks_.back();\n      chunk.num_rows = 0;\n      chunk.start = r;\n      // Add to the chunk until the first block in the row is\n      // different than the one in the first row for the chunk.\n      while (r + chunk.num_rows < num_row_blocks) {\n        const CompressedRow& row = bs->rows[r + chunk.num_rows];\n        if (row.cells.front().block_id != e_block_id) {\n          break;\n        }\n        ++chunk.num_rows;\n      }\n      r += chunk.num_rows;\n    }\n\n    const Chunk& last_chunk = chunks_.back();\n    uneliminated_row_begins_ = last_chunk.start + last_chunk.num_rows;\n    e_t_e_inverse_matrices_.resize(kEBlockSize * kEBlockSize * chunks_.size());\n    std::fill(\n        e_t_e_inverse_matrices_.begin(), e_t_e_inverse_matrices_.end(), 0.0);\n  }\n\n  void Eliminate(const BlockSparseMatrixData& A,\n                 const double* b,\n                 const double* D,\n                 BlockRandomAccessMatrix* lhs_bram,\n                 double* rhs_ptr) override {\n    // Since there is only one f-block, we can call GetCell once, and cache its\n    // output.\n    int r, c, row_stride, col_stride;\n    CellInfo* cell_info =\n        lhs_bram->GetCell(0, 0, &r, &c, &row_stride, &col_stride);\n    typename EigenTypes<kFBlockSize, kFBlockSize>::MatrixRef lhs(\n        cell_info->values, kFBlockSize, kFBlockSize);\n    typename EigenTypes<kFBlockSize>::VectorRef rhs(rhs_ptr, kFBlockSize);\n\n    lhs.setZero();\n    rhs.setZero();\n\n    const CompressedRowBlockStructure* bs = A.block_structure();\n    const double* values = A.values();\n\n    // Add the diagonal to the schur complement.\n    if (D != nullptr) {\n      typename EigenTypes<kFBlockSize>::ConstVectorRef diag(\n          D + bs->cols[num_eliminate_blocks_].position, kFBlockSize);\n      lhs.diagonal() = diag.array().square().matrix();\n    }\n\n    Eigen::Matrix<double, kEBlockSize, kFBlockSize> tmp;\n    Eigen::Matrix<double, kEBlockSize, 1> tmp2;\n\n    // The following loop works on a block matrix which looks as follows\n    // (number of rows can be anything):\n    //\n    // [e_1 | f_1] = [b1]\n    // [e_2 | f_2] = [b2]\n    // [e_3 | f_3] = [b3]\n    // [e_4 | f_4] = [b4]\n    //\n    // and computes the following\n    //\n    // e_t_e = sum_i e_i^T * e_i\n    // e_t_e_inverse = inverse(e_t_e)\n    // e_t_f = sum_i e_i^T f_i\n    // e_t_b = sum_i e_i^T b_i\n    // f_t_b = sum_i f_i^T b_i\n    //\n    // lhs += sum_i f_i^T * f_i - e_t_f^T * e_t_e_inverse * e_t_f\n    // rhs += f_t_b - e_t_f^T * e_t_e_inverse * e_t_b\n    for (int i = 0; i < chunks_.size(); ++i) {\n      const Chunk& chunk = chunks_[i];\n      const int e_block_id = bs->rows[chunk.start].cells.front().block_id;\n\n      // Naming covention, e_t_e = e_block.transpose() * e_block;\n      Eigen::Matrix<double, kEBlockSize, kEBlockSize> e_t_e;\n      Eigen::Matrix<double, kEBlockSize, kFBlockSize> e_t_f;\n      Eigen::Matrix<double, kEBlockSize, 1> e_t_b;\n      Eigen::Matrix<double, kFBlockSize, 1> f_t_b;\n\n      // Add the square of the diagonal to e_t_e.\n      if (D != NULL) {\n        const typename EigenTypes<kEBlockSize>::ConstVectorRef diag(\n            D + bs->cols[e_block_id].position, kEBlockSize);\n        e_t_e = diag.array().square().matrix().asDiagonal();\n      } else {\n        e_t_e.setZero();\n      }\n      e_t_f.setZero();\n      e_t_b.setZero();\n      f_t_b.setZero();\n\n      for (int j = 0; j < chunk.num_rows; ++j) {\n        const int row_id = chunk.start + j;\n        const auto& row = bs->rows[row_id];\n        const typename EigenTypes<kRowBlockSize, kEBlockSize>::ConstMatrixRef\n            e_block(values + row.cells[0].position, kRowBlockSize, kEBlockSize);\n        const typename EigenTypes<kRowBlockSize>::ConstVectorRef b_block(\n            b + row.block.position, kRowBlockSize);\n\n        e_t_e.noalias() += e_block.transpose() * e_block;\n        e_t_b.noalias() += e_block.transpose() * b_block;\n\n        if (row.cells.size() == 1) {\n          // There is no f block, so there is nothing more to do.\n          continue;\n        }\n\n        const typename EigenTypes<kRowBlockSize, kFBlockSize>::ConstMatrixRef\n            f_block(values + row.cells[1].position, kRowBlockSize, kFBlockSize);\n        e_t_f.noalias() += e_block.transpose() * f_block;\n        lhs.noalias() += f_block.transpose() * f_block;\n        f_t_b.noalias() += f_block.transpose() * b_block;\n      }\n\n      // BackSubstitute computes the same inverse, and this is the key workload\n      // there, so caching these inverses makes BackSubstitute essentially free.\n      typename EigenTypes<kEBlockSize, kEBlockSize>::MatrixRef e_t_e_inverse(\n          &e_t_e_inverse_matrices_[kEBlockSize * kEBlockSize * i],\n          kEBlockSize,\n          kEBlockSize);\n\n      // e_t_e is a symmetric positive definite matrix, so the standard way to\n      // compute its inverse is via the Cholesky factorization by calling\n      // e_t_e.llt().solve(Identity()). However, the inverse() method even\n      // though it is not optimized for symmetric matrices is significantly\n      // faster for small fixed size (up to 4x4) matrices.\n      //\n      // https://eigen.tuxfamily.org/dox/group__TutorialLinearAlgebra.html#title3\n      e_t_e_inverse.noalias() = e_t_e.inverse();\n\n      // The use of these two pre-allocated tmp vectors saves temporaries in the\n      // expressions for lhs and rhs updates below and has a significant impact\n      // on the performance of this method.\n      tmp.noalias() = e_t_e_inverse * e_t_f;\n      tmp2.noalias() = e_t_e_inverse * e_t_b;\n\n      lhs.noalias() -= e_t_f.transpose() * tmp;\n      rhs.noalias() += f_t_b - e_t_f.transpose() * tmp2;\n    }\n\n    // The rows without any e-blocks can have arbitrary size but only contain\n    // the f-block.\n    //\n    // lhs += f_i^T f_i\n    // rhs += f_i^T b_i\n    for (int row_id = uneliminated_row_begins_; row_id < bs->rows.size();\n         ++row_id) {\n      const auto& row = bs->rows[row_id];\n      const auto& cell = row.cells[0];\n      const typename EigenTypes<Eigen::Dynamic, kFBlockSize>::ConstMatrixRef\n          f_block(values + cell.position, row.block.size, kFBlockSize);\n      const typename EigenTypes<Eigen::Dynamic>::ConstVectorRef b_block(\n          b + row.block.position, row.block.size);\n      lhs.noalias() += f_block.transpose() * f_block;\n      rhs.noalias() += f_block.transpose() * b_block;\n    }\n  }\n\n  // This implementation of BackSubstitute depends on Eliminate being called\n  // before this. SchurComplementSolver always does this.\n  //\n  // y_i = e_t_e_inverse * sum_i e_i^T * (b_i - f_i * z);\n  void BackSubstitute(const BlockSparseMatrixData& A,\n                      const double* b,\n                      const double* D,\n                      const double* z_ptr,\n                      double* y) override {\n    typename EigenTypes<kFBlockSize>::ConstVectorRef z(z_ptr, kFBlockSize);\n    const CompressedRowBlockStructure* bs = A.block_structure();\n    const double* values = A.values();\n    Eigen::Matrix<double, kEBlockSize, 1> tmp;\n    for (int i = 0; i < chunks_.size(); ++i) {\n      const Chunk& chunk = chunks_[i];\n      const int e_block_id = bs->rows[chunk.start].cells.front().block_id;\n      tmp.setZero();\n      for (int j = 0; j < chunk.num_rows; ++j) {\n        const int row_id = chunk.start + j;\n        const auto& row = bs->rows[row_id];\n        const typename EigenTypes<kRowBlockSize, kEBlockSize>::ConstMatrixRef\n            e_block(values + row.cells[0].position, kRowBlockSize, kEBlockSize);\n        const typename EigenTypes<kRowBlockSize>::ConstVectorRef b_block(\n            b + row.block.position, kRowBlockSize);\n\n        if (row.cells.size() == 1) {\n          // There is no f block.\n          tmp += e_block.transpose() * b_block;\n        } else {\n          typename EigenTypes<kRowBlockSize, kFBlockSize>::ConstMatrixRef\n              f_block(\n                  values + row.cells[1].position, kRowBlockSize, kFBlockSize);\n          tmp += e_block.transpose() * (b_block - f_block * z);\n        }\n      }\n\n      typename EigenTypes<kEBlockSize, kEBlockSize>::MatrixRef e_t_e_inverse(\n          &e_t_e_inverse_matrices_[kEBlockSize * kEBlockSize * i],\n          kEBlockSize,\n          kEBlockSize);\n\n      typename EigenTypes<kEBlockSize>::VectorRef y_block(\n          y + bs->cols[e_block_id].position, kEBlockSize);\n      y_block.noalias() = e_t_e_inverse * tmp;\n    }\n  }\n\n private:\n  struct Chunk {\n    int start = 0;\n    int num_rows = 0;\n  };\n\n  std::vector<Chunk> chunks_;\n  int num_eliminate_blocks_;\n  int uneliminated_row_begins_;\n  std::vector<double> e_t_e_inverse_matrices_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_SCHUR_ELIMINATOR_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/schur_eliminator_benchmark.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Authors: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"Eigen/Dense\"\n#include \"benchmark/benchmark.h\"\n#include \"ceres/block_random_access_dense_matrix.h\"\n#include \"ceres/block_sparse_matrix.h\"\n#include \"ceres/block_structure.h\"\n#include \"ceres/random.h\"\n#include \"ceres/schur_eliminator.h\"\n\nnamespace ceres {\nnamespace internal {\n\nconstexpr int kRowBlockSize = 2;\nconstexpr int kEBlockSize = 3;\nconstexpr int kFBlockSize = 6;\n\nclass BenchmarkData {\n public:\n  explicit BenchmarkData(const int num_e_blocks) {\n    CompressedRowBlockStructure* bs = new CompressedRowBlockStructure;\n    bs->cols.resize(num_e_blocks + 1);\n    int col_pos = 0;\n    for (int i = 0; i < num_e_blocks; ++i) {\n      bs->cols[i].position = col_pos;\n      bs->cols[i].size = kEBlockSize;\n      col_pos += kEBlockSize;\n    }\n    bs->cols.back().position = col_pos;\n    bs->cols.back().size = kFBlockSize;\n\n    bs->rows.resize(2 * num_e_blocks);\n    int row_pos = 0;\n    int cell_pos = 0;\n    for (int i = 0; i < num_e_blocks; ++i) {\n      {\n        auto& row = bs->rows[2 * i];\n        row.block.position = row_pos;\n        row.block.size = kRowBlockSize;\n        row_pos += kRowBlockSize;\n        auto& cells = row.cells;\n        cells.resize(2);\n        cells[0].block_id = i;\n        cells[0].position = cell_pos;\n        cell_pos += kRowBlockSize * kEBlockSize;\n        cells[1].block_id = num_e_blocks;\n        cells[1].position = cell_pos;\n        cell_pos += kRowBlockSize * kFBlockSize;\n      }\n      {\n        auto& row = bs->rows[2 * i + 1];\n        row.block.position = row_pos;\n        row.block.size = kRowBlockSize;\n        row_pos += kRowBlockSize;\n        auto& cells = row.cells;\n        cells.resize(1);\n        cells[0].block_id = i;\n        cells[0].position = cell_pos;\n        cell_pos += kRowBlockSize * kEBlockSize;\n      }\n    }\n\n    matrix_.reset(new BlockSparseMatrix(bs));\n    double* values = matrix_->mutable_values();\n    for (int i = 0; i < matrix_->num_nonzeros(); ++i) {\n      values[i] = RandNormal();\n    }\n\n    b_.resize(matrix_->num_rows());\n    b_.setRandom();\n\n    std::vector<int> blocks(1, kFBlockSize);\n    lhs_.reset(new BlockRandomAccessDenseMatrix(blocks));\n    diagonal_.resize(matrix_->num_cols());\n    diagonal_.setOnes();\n    rhs_.resize(kFBlockSize);\n\n    y_.resize(num_e_blocks * kEBlockSize);\n    y_.setZero();\n    z_.resize(kFBlockSize);\n    z_.setOnes();\n  }\n\n  const BlockSparseMatrix& matrix() const { return *matrix_; }\n  const Vector& b() const { return b_; }\n  const Vector& diagonal() const { return diagonal_; }\n  BlockRandomAccessDenseMatrix* mutable_lhs() { return lhs_.get(); }\n  Vector* mutable_rhs() { return &rhs_; }\n  Vector* mutable_y() { return &y_; }\n  Vector* mutable_z() { return &z_; }\n\n private:\n  std::unique_ptr<BlockSparseMatrix> matrix_;\n  Vector b_;\n  std::unique_ptr<BlockRandomAccessDenseMatrix> lhs_;\n  Vector rhs_;\n  Vector diagonal_;\n  Vector z_;\n  Vector y_;\n};\n\nvoid BM_SchurEliminatorEliminate(benchmark::State& state) {\n  const int num_e_blocks = state.range(0);\n  BenchmarkData data(num_e_blocks);\n\n  ContextImpl context;\n  LinearSolver::Options linear_solver_options;\n  linear_solver_options.e_block_size = kEBlockSize;\n  linear_solver_options.row_block_size = kRowBlockSize;\n  linear_solver_options.f_block_size = kFBlockSize;\n  linear_solver_options.context = &context;\n  std::unique_ptr<SchurEliminatorBase> eliminator(\n      SchurEliminatorBase::Create(linear_solver_options));\n\n  eliminator->Init(num_e_blocks, true, data.matrix().block_structure());\n  for (auto _ : state) {\n    eliminator->Eliminate(BlockSparseMatrixData(data.matrix()),\n                          data.b().data(),\n                          data.diagonal().data(),\n                          data.mutable_lhs(),\n                          data.mutable_rhs()->data());\n  }\n}\n\nvoid BM_SchurEliminatorBackSubstitute(benchmark::State& state) {\n  const int num_e_blocks = state.range(0);\n  BenchmarkData data(num_e_blocks);\n\n  ContextImpl context;\n  LinearSolver::Options linear_solver_options;\n  linear_solver_options.e_block_size = kEBlockSize;\n  linear_solver_options.row_block_size = kRowBlockSize;\n  linear_solver_options.f_block_size = kFBlockSize;\n  linear_solver_options.context = &context;\n  std::unique_ptr<SchurEliminatorBase> eliminator(\n      SchurEliminatorBase::Create(linear_solver_options));\n\n  eliminator->Init(num_e_blocks, true, data.matrix().block_structure());\n  eliminator->Eliminate(BlockSparseMatrixData(data.matrix()),\n                        data.b().data(),\n                        data.diagonal().data(),\n                        data.mutable_lhs(),\n                        data.mutable_rhs()->data());\n  for (auto _ : state) {\n    eliminator->BackSubstitute(BlockSparseMatrixData(data.matrix()),\n                               data.b().data(),\n                               data.diagonal().data(),\n                               data.mutable_z()->data(),\n                               data.mutable_y()->data());\n  }\n}\n\nvoid BM_SchurEliminatorForOneFBlockEliminate(benchmark::State& state) {\n  const int num_e_blocks = state.range(0);\n  BenchmarkData data(num_e_blocks);\n  SchurEliminatorForOneFBlock<2, 3, 6> eliminator;\n  eliminator.Init(num_e_blocks, true, data.matrix().block_structure());\n  for (auto _ : state) {\n    eliminator.Eliminate(BlockSparseMatrixData(data.matrix()),\n                         data.b().data(),\n                         data.diagonal().data(),\n                         data.mutable_lhs(),\n                         data.mutable_rhs()->data());\n  }\n}\n\nvoid BM_SchurEliminatorForOneFBlockBackSubstitute(benchmark::State& state) {\n  const int num_e_blocks = state.range(0);\n  BenchmarkData data(num_e_blocks);\n  SchurEliminatorForOneFBlock<2, 3, 6> eliminator;\n  eliminator.Init(num_e_blocks, true, data.matrix().block_structure());\n  eliminator.Eliminate(BlockSparseMatrixData(data.matrix()),\n                       data.b().data(),\n                       data.diagonal().data(),\n                       data.mutable_lhs(),\n                       data.mutable_rhs()->data());\n  for (auto _ : state) {\n    eliminator.BackSubstitute(BlockSparseMatrixData(data.matrix()),\n                              data.b().data(),\n                              data.diagonal().data(),\n                              data.mutable_z()->data(),\n                              data.mutable_y()->data());\n  }\n}\n\nBENCHMARK(BM_SchurEliminatorEliminate)->Range(10, 10000);\nBENCHMARK(BM_SchurEliminatorForOneFBlockEliminate)->Range(10, 10000);\nBENCHMARK(BM_SchurEliminatorBackSubstitute)->Range(10, 10000);\nBENCHMARK(BM_SchurEliminatorForOneFBlockBackSubstitute)->Range(10, 10000);\n\n}  // namespace internal\n}  // namespace ceres\n\nBENCHMARK_MAIN();\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/schur_eliminator_impl.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// TODO(sameeragarwal): row_block_counter can perhaps be replaced by\n// Chunk::start ?\n\n#ifndef CERES_INTERNAL_SCHUR_ELIMINATOR_IMPL_H_\n#define CERES_INTERNAL_SCHUR_ELIMINATOR_IMPL_H_\n\n// Eigen has an internal threshold switching between different matrix\n// multiplication algorithms. In particular for matrices larger than\n// EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD it uses a cache friendly\n// matrix matrix product algorithm that has a higher setup cost. For\n// matrix sizes close to this threshold, especially when the matrices\n// are thin and long, the default choice may not be optimal. This is\n// the case for us, as the default choice causes a 30% performance\n// regression when we moved from Eigen2 to Eigen3.\n\n#define EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 10\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#include <algorithm>\n#include <map>\n\n#include \"Eigen/Dense\"\n#include \"ceres/block_random_access_matrix.h\"\n#include \"ceres/block_sparse_matrix.h\"\n#include \"ceres/block_structure.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/internal/fixed_array.h\"\n#include \"ceres/invert_psd_matrix.h\"\n#include \"ceres/map_util.h\"\n#include \"ceres/parallel_for.h\"\n#include \"ceres/schur_eliminator.h\"\n#include \"ceres/scoped_thread_token.h\"\n#include \"ceres/small_blas.h\"\n#include \"ceres/stl_util.h\"\n#include \"ceres/thread_token_provider.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate <int kRowBlockSize, int kEBlockSize, int kFBlockSize>\nSchurEliminator<kRowBlockSize, kEBlockSize, kFBlockSize>::~SchurEliminator() {\n  STLDeleteElements(&rhs_locks_);\n}\n\ntemplate <int kRowBlockSize, int kEBlockSize, int kFBlockSize>\nvoid SchurEliminator<kRowBlockSize, kEBlockSize, kFBlockSize>::Init(\n    int num_eliminate_blocks,\n    bool assume_full_rank_ete,\n    const CompressedRowBlockStructure* bs) {\n  CHECK_GT(num_eliminate_blocks, 0)\n      << \"SchurComplementSolver cannot be initialized with \"\n      << \"num_eliminate_blocks = 0.\";\n\n  num_eliminate_blocks_ = num_eliminate_blocks;\n  assume_full_rank_ete_ = assume_full_rank_ete;\n\n  const int num_col_blocks = bs->cols.size();\n  const int num_row_blocks = bs->rows.size();\n\n  buffer_size_ = 1;\n  chunks_.clear();\n  lhs_row_layout_.clear();\n\n  int lhs_num_rows = 0;\n  // Add a map object for each block in the reduced linear system\n  // and build the row/column block structure of the reduced linear\n  // system.\n  lhs_row_layout_.resize(num_col_blocks - num_eliminate_blocks_);\n  for (int i = num_eliminate_blocks_; i < num_col_blocks; ++i) {\n    lhs_row_layout_[i - num_eliminate_blocks_] = lhs_num_rows;\n    lhs_num_rows += bs->cols[i].size;\n  }\n\n  // TODO(sameeragarwal): Now that we may have subset block structure,\n  // we need to make sure that we account for the fact that somep\n  // point blocks only have a \"diagonal\" row and nothing more.\n  //\n  // This likely requires a slightly different algorithm, which works\n  // off of the number of elimination blocks.\n\n  int r = 0;\n  // Iterate over the row blocks of A, and detect the chunks. The\n  // matrix should already have been ordered so that all rows\n  // containing the same y block are vertically contiguous. Along\n  // the way also compute the amount of space each chunk will need\n  // to perform the elimination.\n  while (r < num_row_blocks) {\n    const int chunk_block_id = bs->rows[r].cells.front().block_id;\n    if (chunk_block_id >= num_eliminate_blocks_) {\n      break;\n    }\n\n    chunks_.push_back(Chunk());\n    Chunk& chunk = chunks_.back();\n    chunk.size = 0;\n    chunk.start = r;\n    int buffer_size = 0;\n    const int e_block_size = bs->cols[chunk_block_id].size;\n\n    // Add to the chunk until the first block in the row is\n    // different than the one in the first row for the chunk.\n    while (r + chunk.size < num_row_blocks) {\n      const CompressedRow& row = bs->rows[r + chunk.size];\n      if (row.cells.front().block_id != chunk_block_id) {\n        break;\n      }\n\n      // Iterate over the blocks in the row, ignoring the first\n      // block since it is the one to be eliminated.\n      for (int c = 1; c < row.cells.size(); ++c) {\n        const Cell& cell = row.cells[c];\n        if (InsertIfNotPresent(\n                &(chunk.buffer_layout), cell.block_id, buffer_size)) {\n          buffer_size += e_block_size * bs->cols[cell.block_id].size;\n        }\n      }\n\n      buffer_size_ = std::max(buffer_size, buffer_size_);\n      ++chunk.size;\n    }\n\n    CHECK_GT(chunk.size, 0); // This check will need to be resolved.\n    r += chunk.size;\n  }\n  const Chunk& chunk = chunks_.back();\n\n  uneliminated_row_begins_ = chunk.start + chunk.size;\n\n  buffer_.reset(new double[buffer_size_ * num_threads_]);\n\n  // chunk_outer_product_buffer_ only needs to store e_block_size *\n  // f_block_size, which is always less than buffer_size_, so we just\n  // allocate buffer_size_ per thread.\n  chunk_outer_product_buffer_.reset(new double[buffer_size_ * num_threads_]);\n\n  STLDeleteElements(&rhs_locks_);\n  rhs_locks_.resize(num_col_blocks - num_eliminate_blocks_);\n  for (int i = 0; i < num_col_blocks - num_eliminate_blocks_; ++i) {\n    rhs_locks_[i] = new std::mutex;\n  }\n}\n\ntemplate <int kRowBlockSize, int kEBlockSize, int kFBlockSize>\nvoid\nSchurEliminator<kRowBlockSize, kEBlockSize, kFBlockSize>::\nEliminate(const BlockSparseMatrixData& A,\n          const double* b,\n          const double* D,\n          BlockRandomAccessMatrix* lhs,\n          double* rhs) {\n  if (lhs->num_rows() > 0) {\n    lhs->SetZero();\n    if (rhs) {\n      VectorRef(rhs, lhs->num_rows()).setZero();\n    }\n  }\n\n  const CompressedRowBlockStructure* bs = A.block_structure();\n  const int num_col_blocks = bs->cols.size();\n\n  // Add the diagonal to the schur complement.\n  if (D != NULL) {\n    ParallelFor(\n        context_,\n        num_eliminate_blocks_,\n        num_col_blocks,\n        num_threads_,\n        [&](int i) {\n          const int block_id = i - num_eliminate_blocks_;\n          int r, c, row_stride, col_stride;\n          CellInfo* cell_info = lhs->GetCell(block_id, block_id, &r, &c,\n                                             &row_stride, &col_stride);\n          if (cell_info != NULL) {\n            const int block_size = bs->cols[i].size;\n            typename EigenTypes<Eigen::Dynamic>::ConstVectorRef diag(\n                D + bs->cols[i].position, block_size);\n\n            std::lock_guard<std::mutex> l(cell_info->m);\n            MatrixRef m(cell_info->values, row_stride, col_stride);\n            m.block(r, c, block_size, block_size).diagonal() +=\n                diag.array().square().matrix();\n          }\n        });\n  }\n\n  // Eliminate y blocks one chunk at a time.  For each chunk, compute\n  // the entries of the normal equations and the gradient vector block\n  // corresponding to the y block and then apply Gaussian elimination\n  // to them. The matrix ete stores the normal matrix corresponding to\n  // the block being eliminated and array buffer_ contains the\n  // non-zero blocks in the row corresponding to this y block in the\n  // normal equations. This computation is done in\n  // ChunkDiagonalBlockAndGradient. UpdateRhs then applies gaussian\n  // elimination to the rhs of the normal equations, updating the rhs\n  // of the reduced linear system by modifying rhs blocks for all the\n  // z blocks that share a row block/residual term with the y\n  // block. EliminateRowOuterProduct does the corresponding operation\n  // for the lhs of the reduced linear system.\n  ParallelFor(\n      context_,\n      0,\n      int(chunks_.size()),\n      num_threads_,\n      [&](int thread_id, int i) {\n        double* buffer = buffer_.get() + thread_id * buffer_size_;\n        const Chunk& chunk = chunks_[i];\n        const int e_block_id = bs->rows[chunk.start].cells.front().block_id;\n        const int e_block_size = bs->cols[e_block_id].size;\n\n        VectorRef(buffer, buffer_size_).setZero();\n\n        typename EigenTypes<kEBlockSize, kEBlockSize>::Matrix\n            ete(e_block_size, e_block_size);\n\n        if (D != NULL) {\n          const typename EigenTypes<kEBlockSize>::ConstVectorRef\n              diag(D + bs->cols[e_block_id].position, e_block_size);\n          ete = diag.array().square().matrix().asDiagonal();\n        } else {\n          ete.setZero();\n        }\n\n        FixedArray<double, 8> g(e_block_size);\n        typename EigenTypes<kEBlockSize>::VectorRef gref(g.data(),\n                                                         e_block_size);\n        gref.setZero();\n\n        // We are going to be computing\n        //\n        //   S += F'F - F'E(E'E)^{-1}E'F\n        //\n        // for each Chunk. The computation is broken down into a number of\n        // function calls as below.\n\n        // Compute the outer product of the e_blocks with themselves (ete\n        // = E'E). Compute the product of the e_blocks with the\n        // corresponding f_blocks (buffer = E'F), the gradient of the terms\n        // in this chunk (g) and add the outer product of the f_blocks to\n        // Schur complement (S += F'F).\n        ChunkDiagonalBlockAndGradient(\n            chunk, A, b, chunk.start, &ete, g.data(), buffer, lhs);\n\n        // Normally one wouldn't compute the inverse explicitly, but\n        // e_block_size will typically be a small number like 3, in\n        // which case its much faster to compute the inverse once and\n        // use it to multiply other matrices/vectors instead of doing a\n        // Solve call over and over again.\n        typename EigenTypes<kEBlockSize, kEBlockSize>::Matrix inverse_ete =\n            InvertPSDMatrix<kEBlockSize>(assume_full_rank_ete_, ete);\n\n        // For the current chunk compute and update the rhs of the reduced\n        // linear system.\n        //\n        //   rhs = F'b - F'E(E'E)^(-1) E'b\n\n        if (rhs) {\n          FixedArray<double, 8> inverse_ete_g(e_block_size);\n          MatrixVectorMultiply<kEBlockSize, kEBlockSize, 0>(\n              inverse_ete.data(),\n              e_block_size,\n              e_block_size,\n              g.data(),\n              inverse_ete_g.data());\n          UpdateRhs(chunk, A, b, chunk.start, inverse_ete_g.data(), rhs);\n        }\n\n        // S -= F'E(E'E)^{-1}E'F\n        ChunkOuterProduct(\n        thread_id, bs, inverse_ete, buffer, chunk.buffer_layout, lhs);\n      });\n\n  // For rows with no e_blocks, the schur complement update reduces to\n  // S += F'F.\n  NoEBlockRowsUpdate(A, b,  uneliminated_row_begins_, lhs, rhs);\n}\n\ntemplate <int kRowBlockSize, int kEBlockSize, int kFBlockSize>\nvoid\nSchurEliminator<kRowBlockSize, kEBlockSize, kFBlockSize>::\nBackSubstitute(const BlockSparseMatrixData& A,\n               const double* b,\n               const double* D,\n               const double* z,\n               double* y) {\n  const CompressedRowBlockStructure* bs = A.block_structure();\n  const double* values = A.values();\n\n  ParallelFor(\n      context_,\n      0,\n      int(chunks_.size()),\n      num_threads_,\n      [&](int i) {\n    const Chunk& chunk = chunks_[i];\n    const int e_block_id = bs->rows[chunk.start].cells.front().block_id;\n    const int e_block_size = bs->cols[e_block_id].size;\n\n    double* y_ptr = y + bs->cols[e_block_id].position;\n    typename EigenTypes<kEBlockSize>::VectorRef y_block(y_ptr, e_block_size);\n\n    typename EigenTypes<kEBlockSize, kEBlockSize>::Matrix\n        ete(e_block_size, e_block_size);\n    if (D != NULL) {\n      const typename EigenTypes<kEBlockSize>::ConstVectorRef\n          diag(D + bs->cols[e_block_id].position, e_block_size);\n      ete = diag.array().square().matrix().asDiagonal();\n    } else {\n      ete.setZero();\n    }\n\n    for (int j = 0; j < chunk.size; ++j) {\n      const CompressedRow& row = bs->rows[chunk.start + j];\n      const Cell& e_cell = row.cells.front();\n      DCHECK_EQ(e_block_id, e_cell.block_id);\n\n      FixedArray<double, 8> sj(row.block.size);\n\n      typename EigenTypes<kRowBlockSize>::VectorRef(sj.data(), row.block.size) =\n          typename EigenTypes<kRowBlockSize>::ConstVectorRef(\n              b + bs->rows[chunk.start + j].block.position, row.block.size);\n\n      for (int c = 1; c < row.cells.size(); ++c) {\n        const int f_block_id = row.cells[c].block_id;\n        const int f_block_size = bs->cols[f_block_id].size;\n        const int r_block = f_block_id - num_eliminate_blocks_;\n\n        MatrixVectorMultiply<kRowBlockSize, kFBlockSize, -1>(\n            values + row.cells[c].position, row.block.size, f_block_size,\n            z + lhs_row_layout_[r_block],\n            sj.data());\n      }\n\n      MatrixTransposeVectorMultiply<kRowBlockSize, kEBlockSize, 1>(\n          values + e_cell.position, row.block.size, e_block_size,\n          sj.data(),\n          y_ptr);\n\n      MatrixTransposeMatrixMultiply\n          <kRowBlockSize, kEBlockSize, kRowBlockSize, kEBlockSize, 1>(\n          values + e_cell.position, row.block.size, e_block_size,\n          values + e_cell.position, row.block.size, e_block_size,\n          ete.data(), 0, 0, e_block_size, e_block_size);\n    }\n\n    y_block =\n        InvertPSDMatrix<kEBlockSize>(assume_full_rank_ete_, ete) * y_block;\n  });\n}\n\n// Update the rhs of the reduced linear system. Compute\n//\n//   F'b - F'E(E'E)^(-1) E'b\ntemplate <int kRowBlockSize, int kEBlockSize, int kFBlockSize>\nvoid\nSchurEliminator<kRowBlockSize, kEBlockSize, kFBlockSize>::\nUpdateRhs(const Chunk& chunk,\n          const BlockSparseMatrixData& A,\n          const double* b,\n          int row_block_counter,\n          const double* inverse_ete_g,\n          double* rhs) {\n  const CompressedRowBlockStructure* bs = A.block_structure();\n  const double* values = A.values();\n\n  const int e_block_id = bs->rows[chunk.start].cells.front().block_id;\n  const int e_block_size = bs->cols[e_block_id].size;\n  int b_pos = bs->rows[row_block_counter].block.position;\n  for (int j = 0; j < chunk.size; ++j) {\n    const CompressedRow& row = bs->rows[row_block_counter + j];\n    const Cell& e_cell = row.cells.front();\n\n    typename EigenTypes<kRowBlockSize>::Vector sj =\n        typename EigenTypes<kRowBlockSize>::ConstVectorRef\n        (b + b_pos, row.block.size);\n\n    MatrixVectorMultiply<kRowBlockSize, kEBlockSize, -1>(\n        values + e_cell.position, row.block.size, e_block_size,\n        inverse_ete_g, sj.data());\n\n    for (int c = 1; c < row.cells.size(); ++c) {\n      const int block_id = row.cells[c].block_id;\n      const int block_size = bs->cols[block_id].size;\n      const int block = block_id - num_eliminate_blocks_;\n      std::lock_guard<std::mutex> l(*rhs_locks_[block]);\n      MatrixTransposeVectorMultiply<kRowBlockSize, kFBlockSize, 1>(\n          values + row.cells[c].position,\n          row.block.size, block_size,\n          sj.data(), rhs + lhs_row_layout_[block]);\n    }\n    b_pos += row.block.size;\n  }\n}\n\n// Given a Chunk - set of rows with the same e_block, e.g. in the\n// following Chunk with two rows.\n//\n//                E                   F\n//      [ y11   0   0   0 |  z11     0    0   0    z51]\n//      [ y12   0   0   0 |  z12   z22    0   0      0]\n//\n// this function computes twp matrices. The diagonal block matrix\n//\n//   ete = y11 * y11' + y12 * y12'\n//\n// and the off diagonal blocks in the Guass Newton Hessian.\n//\n//   buffer = [y11'(z11 + z12), y12' * z22, y11' * z51]\n//\n// which are zero compressed versions of the block sparse matrices E'E\n// and E'F.\n//\n// and the gradient of the e_block, E'b.\ntemplate <int kRowBlockSize, int kEBlockSize, int kFBlockSize>\nvoid\nSchurEliminator<kRowBlockSize, kEBlockSize, kFBlockSize>::\nChunkDiagonalBlockAndGradient(\n    const Chunk& chunk,\n    const BlockSparseMatrixData& A,\n    const double* b,\n    int row_block_counter,\n    typename EigenTypes<kEBlockSize, kEBlockSize>::Matrix* ete,\n    double* g,\n    double* buffer,\n    BlockRandomAccessMatrix* lhs) {\n  const CompressedRowBlockStructure* bs = A.block_structure();\n  const double* values = A.values();\n\n  int b_pos = bs->rows[row_block_counter].block.position;\n  const int e_block_size = ete->rows();\n\n  // Iterate over the rows in this chunk, for each row, compute the\n  // contribution of its F blocks to the Schur complement, the\n  // contribution of its E block to the matrix EE' (ete), and the\n  // corresponding block in the gradient vector.\n  for (int j = 0; j < chunk.size; ++j) {\n    const CompressedRow& row = bs->rows[row_block_counter + j];\n\n    if (row.cells.size() > 1) {\n      EBlockRowOuterProduct(A, row_block_counter + j, lhs);\n    }\n\n    // Extract the e_block, ETE += E_i' E_i\n    const Cell& e_cell = row.cells.front();\n    MatrixTransposeMatrixMultiply\n        <kRowBlockSize, kEBlockSize, kRowBlockSize, kEBlockSize, 1>(\n            values + e_cell.position, row.block.size, e_block_size,\n            values + e_cell.position, row.block.size, e_block_size,\n            ete->data(), 0, 0, e_block_size, e_block_size);\n\n    if (b) {\n      // g += E_i' b_i\n      MatrixTransposeVectorMultiply<kRowBlockSize, kEBlockSize, 1>(\n          values + e_cell.position, row.block.size, e_block_size,\n          b + b_pos,\n          g);\n    }\n\n    // buffer = E'F. This computation is done by iterating over the\n    // f_blocks for each row in the chunk.\n    for (int c = 1; c < row.cells.size(); ++c) {\n      const int f_block_id = row.cells[c].block_id;\n      const int f_block_size = bs->cols[f_block_id].size;\n      double* buffer_ptr =\n          buffer +  FindOrDie(chunk.buffer_layout, f_block_id);\n      MatrixTransposeMatrixMultiply\n          <kRowBlockSize, kEBlockSize, kRowBlockSize, kFBlockSize, 1>(\n          values + e_cell.position, row.block.size, e_block_size,\n          values + row.cells[c].position, row.block.size, f_block_size,\n          buffer_ptr, 0, 0, e_block_size, f_block_size);\n    }\n    b_pos += row.block.size;\n  }\n}\n\n// Compute the outer product F'E(E'E)^{-1}E'F and subtract it from the\n// Schur complement matrix, i.e\n//\n//  S -= F'E(E'E)^{-1}E'F.\ntemplate <int kRowBlockSize, int kEBlockSize, int kFBlockSize>\nvoid\nSchurEliminator<kRowBlockSize, kEBlockSize, kFBlockSize>::\nChunkOuterProduct(int thread_id,\n                  const CompressedRowBlockStructure* bs,\n                  const Matrix& inverse_ete,\n                  const double* buffer,\n                  const BufferLayoutType& buffer_layout,\n                  BlockRandomAccessMatrix* lhs) {\n  // This is the most computationally expensive part of this\n  // code. Profiling experiments reveal that the bottleneck is not the\n  // computation of the right-hand matrix product, but memory\n  // references to the left hand side.\n  const int e_block_size = inverse_ete.rows();\n  BufferLayoutType::const_iterator it1 = buffer_layout.begin();\n\n  double* b1_transpose_inverse_ete =\n      chunk_outer_product_buffer_.get() + thread_id * buffer_size_;\n\n  // S(i,j) -= bi' * ete^{-1} b_j\n  for (; it1 != buffer_layout.end(); ++it1) {\n    const int block1 = it1->first - num_eliminate_blocks_;\n    const int block1_size = bs->cols[it1->first].size;\n    MatrixTransposeMatrixMultiply\n        <kEBlockSize, kFBlockSize, kEBlockSize, kEBlockSize, 0>(\n        buffer + it1->second, e_block_size, block1_size,\n        inverse_ete.data(), e_block_size, e_block_size,\n        b1_transpose_inverse_ete, 0, 0, block1_size, e_block_size);\n\n    BufferLayoutType::const_iterator it2 = it1;\n    for (; it2 != buffer_layout.end(); ++it2) {\n      const int block2 = it2->first - num_eliminate_blocks_;\n\n      int r, c, row_stride, col_stride;\n      CellInfo* cell_info = lhs->GetCell(block1, block2,\n                                         &r, &c,\n                                         &row_stride, &col_stride);\n      if (cell_info != NULL) {\n        const int block2_size = bs->cols[it2->first].size;\n        std::lock_guard<std::mutex> l(cell_info->m);\n        MatrixMatrixMultiply\n            <kFBlockSize, kEBlockSize, kEBlockSize, kFBlockSize, -1>(\n                b1_transpose_inverse_ete, block1_size, e_block_size,\n                buffer  + it2->second, e_block_size, block2_size,\n                cell_info->values, r, c, row_stride, col_stride);\n      }\n    }\n  }\n}\n\n// For rows with no e_blocks, the schur complement update reduces to S\n// += F'F. This function iterates over the rows of A with no e_block,\n// and calls NoEBlockRowOuterProduct on each row.\ntemplate <int kRowBlockSize, int kEBlockSize, int kFBlockSize>\nvoid\nSchurEliminator<kRowBlockSize, kEBlockSize, kFBlockSize>::\nNoEBlockRowsUpdate(const BlockSparseMatrixData& A,\n                   const double* b,\n                   int row_block_counter,\n                   BlockRandomAccessMatrix* lhs,\n                   double* rhs) {\n  const CompressedRowBlockStructure* bs = A.block_structure();\n  const double* values = A.values();\n  for (; row_block_counter < bs->rows.size(); ++row_block_counter) {\n    NoEBlockRowOuterProduct(A, row_block_counter, lhs);\n    if (!rhs) {\n      continue;\n    }\n    const CompressedRow& row = bs->rows[row_block_counter];\n    for (int c = 0; c < row.cells.size(); ++c) {\n      const int block_id = row.cells[c].block_id;\n      const int block_size = bs->cols[block_id].size;\n      const int block = block_id - num_eliminate_blocks_;\n      MatrixTransposeVectorMultiply<Eigen::Dynamic, Eigen::Dynamic, 1>(\n          values + row.cells[c].position, row.block.size, block_size,\n          b + row.block.position,\n          rhs + lhs_row_layout_[block]);\n    }\n  }\n}\n\n\n// A row r of A, which has no e_blocks gets added to the Schur\n// Complement as S += r r'. This function is responsible for computing\n// the contribution of a single row r to the Schur complement. It is\n// very similar in structure to EBlockRowOuterProduct except for\n// one difference. It does not use any of the template\n// parameters. This is because the algorithm used for detecting the\n// static structure of the matrix A only pays attention to rows with\n// e_blocks. This is because rows without e_blocks are rare and\n// typically arise from regularization terms in the original\n// optimization problem, and have a very different structure than the\n// rows with e_blocks. Including them in the static structure\n// detection will lead to most template parameters being set to\n// dynamic. Since the number of rows without e_blocks is small, the\n// lack of templating is not an issue.\ntemplate <int kRowBlockSize, int kEBlockSize, int kFBlockSize>\nvoid\nSchurEliminator<kRowBlockSize, kEBlockSize, kFBlockSize>::\nNoEBlockRowOuterProduct(const BlockSparseMatrixData& A,\n                        int row_block_index,\n                        BlockRandomAccessMatrix* lhs) {\n  const CompressedRowBlockStructure* bs = A.block_structure();\n  const double* values = A.values();\n\n  const CompressedRow& row = bs->rows[row_block_index];\n  for (int i = 0; i < row.cells.size(); ++i) {\n    const int block1 = row.cells[i].block_id - num_eliminate_blocks_;\n    DCHECK_GE(block1, 0);\n\n    const int block1_size = bs->cols[row.cells[i].block_id].size;\n    int r, c, row_stride, col_stride;\n    CellInfo* cell_info = lhs->GetCell(block1, block1,\n                                       &r, &c,\n                                       &row_stride, &col_stride);\n    if (cell_info != NULL) {\n      std::lock_guard<std::mutex> l(cell_info->m);\n      // This multiply currently ignores the fact that this is a\n      // symmetric outer product.\n      MatrixTransposeMatrixMultiply\n          <Eigen::Dynamic, Eigen::Dynamic, Eigen::Dynamic, Eigen::Dynamic, 1>(\n              values + row.cells[i].position, row.block.size, block1_size,\n              values + row.cells[i].position, row.block.size, block1_size,\n              cell_info->values, r, c, row_stride, col_stride);\n    }\n\n    for (int j = i + 1; j < row.cells.size(); ++j) {\n      const int block2 = row.cells[j].block_id - num_eliminate_blocks_;\n      DCHECK_GE(block2, 0);\n      DCHECK_LT(block1, block2);\n      int r, c, row_stride, col_stride;\n      CellInfo* cell_info = lhs->GetCell(block1, block2,\n                                         &r, &c,\n                                         &row_stride, &col_stride);\n      if (cell_info != NULL) {\n        const int block2_size = bs->cols[row.cells[j].block_id].size;\n        std::lock_guard<std::mutex> l(cell_info->m);\n        MatrixTransposeMatrixMultiply\n            <Eigen::Dynamic, Eigen::Dynamic, Eigen::Dynamic, Eigen::Dynamic, 1>(\n                values + row.cells[i].position, row.block.size, block1_size,\n                values + row.cells[j].position, row.block.size, block2_size,\n                cell_info->values, r, c, row_stride, col_stride);\n      }\n    }\n  }\n}\n\n// For a row with an e_block, compute the contribution S += F'F. This\n// function has the same structure as NoEBlockRowOuterProduct, except\n// that this function uses the template parameters.\ntemplate <int kRowBlockSize, int kEBlockSize, int kFBlockSize>\nvoid\nSchurEliminator<kRowBlockSize, kEBlockSize, kFBlockSize>::\nEBlockRowOuterProduct(const BlockSparseMatrixData& A,\n                      int row_block_index,\n                      BlockRandomAccessMatrix* lhs) {\n  const CompressedRowBlockStructure* bs = A.block_structure();\n  const double* values = A.values();\n\n  const CompressedRow& row = bs->rows[row_block_index];\n  for (int i = 1; i < row.cells.size(); ++i) {\n    const int block1 = row.cells[i].block_id - num_eliminate_blocks_;\n    DCHECK_GE(block1, 0);\n\n    const int block1_size = bs->cols[row.cells[i].block_id].size;\n    int r, c, row_stride, col_stride;\n    CellInfo* cell_info = lhs->GetCell(block1, block1,\n                                       &r, &c,\n                                       &row_stride, &col_stride);\n    if (cell_info != NULL) {\n      std::lock_guard<std::mutex> l(cell_info->m);\n      // block += b1.transpose() * b1;\n      MatrixTransposeMatrixMultiply\n          <kRowBlockSize, kFBlockSize, kRowBlockSize, kFBlockSize, 1>(\n          values + row.cells[i].position, row.block.size, block1_size,\n          values + row.cells[i].position, row.block.size, block1_size,\n          cell_info->values, r, c, row_stride, col_stride);\n    }\n\n    for (int j = i + 1; j < row.cells.size(); ++j) {\n      const int block2 = row.cells[j].block_id - num_eliminate_blocks_;\n      DCHECK_GE(block2, 0);\n      DCHECK_LT(block1, block2);\n      const int block2_size = bs->cols[row.cells[j].block_id].size;\n      int r, c, row_stride, col_stride;\n      CellInfo* cell_info = lhs->GetCell(block1, block2,\n                                         &r, &c,\n                                         &row_stride, &col_stride);\n      if (cell_info != NULL) {\n        // block += b1.transpose() * b2;\n        std::lock_guard<std::mutex> l(cell_info->m);\n        MatrixTransposeMatrixMultiply\n            <kRowBlockSize, kFBlockSize, kRowBlockSize, kFBlockSize, 1>(\n                values + row.cells[i].position, row.block.size, block1_size,\n                values + row.cells[j].position, row.block.size, block2_size,\n                cell_info->values, r, c, row_stride, col_stride);\n      }\n    }\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_SCHUR_ELIMINATOR_IMPL_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/schur_eliminator_template.py",
    "content": "# Ceres Solver - A fast non-linear least squares minimizer\n# Copyright 2017 Google Inc. All rights reserved.\n# http://ceres-solver.org/\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice,\n#   this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright notice,\n#   this list of conditions and the following disclaimer in the documentation\n#   and/or other materials provided with the distribution.\n# * Neither the name of Google Inc. nor the names of its contributors may be\n#   used to endorse or promote products derived from this software without\n#   specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n#\n# Author: sameeragarwal@google.com (Sameer Agarwal)\n#\n# Script for explicitly generating template specialization of the\n# SchurEliminator class. It is a rather large class\n# and the number of explicit instantiations is also large. Explicitly\n# generating these instantiations in separate .cc files breaks the\n# compilation into separate compilation unit rather than one large cc\n# file which takes 2+GB of RAM to compile.\n#\n# This script creates two sets of files.\n#\n# 1. schur_eliminator_x_x_x.cc\n# where, the x indicates the template parameters and\n#\n# 2. schur_eliminator.cc\n#\n# that contains a factory function for instantiating these classes\n# based on runtime parameters.\n#\n# The list of tuples, specializations indicates the set of\n# specializations that is generated.\n\n# Set of template specializations to generate\n\nHEADER = \"\"\"// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Template specialization of SchurEliminator.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\"\"\"\n\nDYNAMIC_FILE = \"\"\"\n\n#include \"ceres/schur_eliminator_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class SchurEliminator<%s, %s, %s>;\n\n}  // namespace internal\n}  // namespace ceres\n\"\"\"\n\nSPECIALIZATION_FILE = \"\"\"\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\n#include \"ceres/schur_eliminator_impl.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate class SchurEliminator<%s, %s, %s>;\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_RESTRICT_SCHUR_SPECIALIZATION\n\"\"\"\n\nFACTORY_FILE_HEADER = \"\"\"\n#include \"ceres/linear_solver.h\"\n#include \"ceres/schur_eliminator.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\nSchurEliminatorBase*\nSchurEliminatorBase::Create(const LinearSolver::Options& options) {\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n\"\"\"\n\nFACTORY = \"\"\" return new SchurEliminator<%s, %s, %s>(options);\"\"\"\n\nFACTORY_FOOTER = \"\"\"\n#endif\n  VLOG(1) << \"Template specializations not found for <\"\n          << options.row_block_size << \",\"\n          << options.e_block_size << \",\"\n          << options.f_block_size << \">\";\n  return new SchurEliminator<Eigen::Dynamic, Eigen::Dynamic, Eigen::Dynamic>(options);\n}\n\n}  // namespace internal\n}  // namespace ceres\n\"\"\"\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/schur_eliminator_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/schur_eliminator.h\"\n\n#include <memory>\n\n#include \"Eigen/Dense\"\n#include \"ceres/block_random_access_dense_matrix.h\"\n#include \"ceres/block_sparse_matrix.h\"\n#include \"ceres/block_structure.h\"\n#include \"ceres/casts.h\"\n#include \"ceres/context_impl.h\"\n#include \"ceres/detect_structure.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/linear_least_squares_problems.h\"\n#include \"ceres/random.h\"\n#include \"ceres/test_util.h\"\n#include \"ceres/triplet_sparse_matrix.h\"\n#include \"ceres/types.h\"\n#include \"glog/logging.h\"\n#include \"gtest/gtest.h\"\n\n// TODO(sameeragarwal): Reduce the size of these tests and redo the\n// parameterization to be more efficient.\n\nnamespace ceres {\nnamespace internal {\n\nclass SchurEliminatorTest : public ::testing::Test {\n protected:\n  void SetUpFromId(int id) {\n    std::unique_ptr<LinearLeastSquaresProblem> problem(\n        CreateLinearLeastSquaresProblemFromId(id));\n    CHECK(problem != nullptr);\n    SetupHelper(problem.get());\n  }\n\n  void SetupHelper(LinearLeastSquaresProblem* problem) {\n    A.reset(down_cast<BlockSparseMatrix*>(problem->A.release()));\n    b.reset(problem->b.release());\n    D.reset(problem->D.release());\n\n    num_eliminate_blocks = problem->num_eliminate_blocks;\n    num_eliminate_cols = 0;\n    const CompressedRowBlockStructure* bs = A->block_structure();\n\n    for (int i = 0; i < num_eliminate_blocks; ++i) {\n      num_eliminate_cols += bs->cols[i].size;\n    }\n  }\n\n  // Compute the golden values for the reduced linear system and the\n  // solution to the linear least squares problem using dense linear\n  // algebra.\n  void ComputeReferenceSolution(const Vector& D) {\n    Matrix J;\n    A->ToDenseMatrix(&J);\n    VectorRef f(b.get(), J.rows());\n\n    Matrix H = (D.cwiseProduct(D)).asDiagonal();\n    H.noalias() += J.transpose() * J;\n\n    const Vector g = J.transpose() * f;\n    const int schur_size = J.cols() - num_eliminate_cols;\n\n    lhs_expected.resize(schur_size, schur_size);\n    lhs_expected.setZero();\n\n    rhs_expected.resize(schur_size);\n    rhs_expected.setZero();\n\n    sol_expected.resize(J.cols());\n    sol_expected.setZero();\n\n    Matrix P = H.block(0, 0, num_eliminate_cols, num_eliminate_cols);\n    Matrix Q = H.block(0, num_eliminate_cols, num_eliminate_cols, schur_size);\n    Matrix R =\n        H.block(num_eliminate_cols, num_eliminate_cols, schur_size, schur_size);\n    int row = 0;\n    const CompressedRowBlockStructure* bs = A->block_structure();\n    for (int i = 0; i < num_eliminate_blocks; ++i) {\n      const int block_size = bs->cols[i].size;\n      P.block(row, row, block_size, block_size) =\n          P.block(row, row, block_size, block_size)\n              .llt()\n              .solve(Matrix::Identity(block_size, block_size));\n      row += block_size;\n    }\n\n    lhs_expected.triangularView<Eigen::Upper>() = R - Q.transpose() * P * Q;\n    rhs_expected =\n        g.tail(schur_size) - Q.transpose() * P * g.head(num_eliminate_cols);\n    sol_expected = H.llt().solve(g);\n  }\n\n  void EliminateSolveAndCompare(const VectorRef& diagonal,\n                                bool use_static_structure,\n                                const double relative_tolerance) {\n    const CompressedRowBlockStructure* bs = A->block_structure();\n    const int num_col_blocks = bs->cols.size();\n    std::vector<int> blocks(num_col_blocks - num_eliminate_blocks, 0);\n    for (int i = num_eliminate_blocks; i < num_col_blocks; ++i) {\n      blocks[i - num_eliminate_blocks] = bs->cols[i].size;\n    }\n\n    BlockRandomAccessDenseMatrix lhs(blocks);\n\n    const int num_cols = A->num_cols();\n    const int schur_size = lhs.num_rows();\n\n    Vector rhs(schur_size);\n\n    LinearSolver::Options options;\n    ContextImpl context;\n    options.context = &context;\n    options.elimination_groups.push_back(num_eliminate_blocks);\n    if (use_static_structure) {\n      DetectStructure(*bs,\n                      num_eliminate_blocks,\n                      &options.row_block_size,\n                      &options.e_block_size,\n                      &options.f_block_size);\n    }\n\n    std::unique_ptr<SchurEliminatorBase> eliminator;\n    eliminator.reset(SchurEliminatorBase::Create(options));\n    const bool kFullRankETE = true;\n    eliminator->Init(num_eliminate_blocks, kFullRankETE, A->block_structure());\n    eliminator->Eliminate(\n        BlockSparseMatrixData(*A), b.get(), diagonal.data(), &lhs, rhs.data());\n\n    MatrixRef lhs_ref(lhs.mutable_values(), lhs.num_rows(), lhs.num_cols());\n    Vector reduced_sol =\n        lhs_ref.selfadjointView<Eigen::Upper>().llt().solve(rhs);\n\n    // Solution to the linear least squares problem.\n    Vector sol(num_cols);\n    sol.setZero();\n    sol.tail(schur_size) = reduced_sol;\n    eliminator->BackSubstitute(BlockSparseMatrixData(*A),\n                               b.get(),\n                               diagonal.data(),\n                               reduced_sol.data(),\n                               sol.data());\n\n    Matrix delta = (lhs_ref - lhs_expected).selfadjointView<Eigen::Upper>();\n    double diff = delta.norm();\n    EXPECT_NEAR(diff / lhs_expected.norm(), 0.0, relative_tolerance);\n    EXPECT_NEAR((rhs - rhs_expected).norm() / rhs_expected.norm(),\n                0.0,\n                relative_tolerance);\n    EXPECT_NEAR((sol - sol_expected).norm() / sol_expected.norm(),\n                0.0,\n                relative_tolerance);\n  }\n\n  std::unique_ptr<BlockSparseMatrix> A;\n  std::unique_ptr<double[]> b;\n  std::unique_ptr<double[]> D;\n  int num_eliminate_blocks;\n  int num_eliminate_cols;\n\n  Matrix lhs_expected;\n  Vector rhs_expected;\n  Vector sol_expected;\n};\n\nTEST_F(SchurEliminatorTest, ScalarProblemNoRegularization) {\n  SetUpFromId(2);\n  Vector zero(A->num_cols());\n  zero.setZero();\n\n  ComputeReferenceSolution(VectorRef(zero.data(), A->num_cols()));\n  EliminateSolveAndCompare(VectorRef(zero.data(), A->num_cols()), true, 1e-14);\n  EliminateSolveAndCompare(VectorRef(zero.data(), A->num_cols()), false, 1e-14);\n}\n\nTEST_F(SchurEliminatorTest, ScalarProblemWithRegularization) {\n  SetUpFromId(2);\n  ComputeReferenceSolution(VectorRef(D.get(), A->num_cols()));\n  EliminateSolveAndCompare(VectorRef(D.get(), A->num_cols()), true, 1e-14);\n  EliminateSolveAndCompare(VectorRef(D.get(), A->num_cols()), false, 1e-14);\n}\n\nTEST_F(SchurEliminatorTest, VaryingFBlockSizeWithStaticStructure) {\n  SetUpFromId(4);\n  ComputeReferenceSolution(VectorRef(D.get(), A->num_cols()));\n  EliminateSolveAndCompare(VectorRef(D.get(), A->num_cols()), true, 1e-14);\n}\n\nTEST_F(SchurEliminatorTest, VaryingFBlockSizeWithoutStaticStructure) {\n  SetUpFromId(4);\n  ComputeReferenceSolution(VectorRef(D.get(), A->num_cols()));\n  EliminateSolveAndCompare(VectorRef(D.get(), A->num_cols()), false, 1e-14);\n}\n\nTEST(SchurEliminatorForOneFBlock, MatchesSchurEliminator) {\n  constexpr int kRowBlockSize = 2;\n  constexpr int kEBlockSize = 3;\n  constexpr int kFBlockSize = 6;\n  constexpr int num_e_blocks = 5;\n\n  CompressedRowBlockStructure* bs = new CompressedRowBlockStructure;\n  bs->cols.resize(num_e_blocks + 1);\n  int col_pos = 0;\n  for (int i = 0; i < num_e_blocks; ++i) {\n    bs->cols[i].position = col_pos;\n    bs->cols[i].size = kEBlockSize;\n    col_pos += kEBlockSize;\n  }\n  bs->cols.back().position = col_pos;\n  bs->cols.back().size = kFBlockSize;\n\n  bs->rows.resize(2 * num_e_blocks + 1);\n  int row_pos = 0;\n  int cell_pos = 0;\n  for (int i = 0; i < num_e_blocks; ++i) {\n    {\n      auto& row = bs->rows[2 * i];\n      row.block.position = row_pos;\n      row.block.size = kRowBlockSize;\n      row_pos += kRowBlockSize;\n      auto& cells = row.cells;\n      cells.resize(2);\n      cells[0].block_id = i;\n      cells[0].position = cell_pos;\n      cell_pos += kRowBlockSize * kEBlockSize;\n      cells[1].block_id = num_e_blocks;\n      cells[1].position = cell_pos;\n      cell_pos += kRowBlockSize * kFBlockSize;\n    }\n    {\n      auto& row = bs->rows[2 * i + 1];\n      row.block.position = row_pos;\n      row.block.size = kRowBlockSize;\n      row_pos += kRowBlockSize;\n      auto& cells = row.cells;\n      cells.resize(1);\n      cells[0].block_id = i;\n      cells[0].position = cell_pos;\n      cell_pos += kRowBlockSize * kEBlockSize;\n    }\n  }\n\n  {\n    auto& row = bs->rows.back();\n    row.block.position = row_pos;\n    row.block.size = kEBlockSize;\n    row_pos += kRowBlockSize;\n    auto& cells = row.cells;\n    cells.resize(1);\n    cells[0].block_id = num_e_blocks;\n    cells[0].position = cell_pos;\n    cell_pos += kEBlockSize * kEBlockSize;\n  }\n\n  BlockSparseMatrix matrix(bs);\n  double* values = matrix.mutable_values();\n  for (int i = 0; i < matrix.num_nonzeros(); ++i) {\n    values[i] = RandNormal();\n  }\n\n  Vector b(matrix.num_rows());\n  b.setRandom();\n\n  Vector diagonal(matrix.num_cols());\n  diagonal.setOnes();\n\n  std::vector<int> blocks(1, kFBlockSize);\n  BlockRandomAccessDenseMatrix actual_lhs(blocks);\n  BlockRandomAccessDenseMatrix expected_lhs(blocks);\n  Vector actual_rhs(kFBlockSize);\n  Vector expected_rhs(kFBlockSize);\n\n  Vector f_sol(kFBlockSize);\n  f_sol.setRandom();\n  Vector actual_e_sol(num_e_blocks * kEBlockSize);\n  actual_e_sol.setZero();\n  Vector expected_e_sol(num_e_blocks * kEBlockSize);\n  expected_e_sol.setZero();\n\n  {\n    ContextImpl context;\n    LinearSolver::Options linear_solver_options;\n    linear_solver_options.e_block_size = kEBlockSize;\n    linear_solver_options.row_block_size = kRowBlockSize;\n    linear_solver_options.f_block_size = kFBlockSize;\n    linear_solver_options.context = &context;\n    std::unique_ptr<SchurEliminatorBase> eliminator(\n        SchurEliminatorBase::Create(linear_solver_options));\n    eliminator->Init(num_e_blocks, true, matrix.block_structure());\n    eliminator->Eliminate(BlockSparseMatrixData(matrix),\n                          b.data(),\n                          diagonal.data(),\n                          &expected_lhs,\n                          expected_rhs.data());\n    eliminator->BackSubstitute(BlockSparseMatrixData(matrix),\n                               b.data(),\n                               diagonal.data(),\n                               f_sol.data(),\n                               actual_e_sol.data());\n  }\n\n  {\n    SchurEliminatorForOneFBlock<2, 3, 6> eliminator;\n    eliminator.Init(num_e_blocks, true, matrix.block_structure());\n    eliminator.Eliminate(BlockSparseMatrixData(matrix),\n                         b.data(),\n                         diagonal.data(),\n                         &actual_lhs,\n                         actual_rhs.data());\n    eliminator.BackSubstitute(BlockSparseMatrixData(matrix),\n                              b.data(),\n                              diagonal.data(),\n                              f_sol.data(),\n                              expected_e_sol.data());\n  }\n  ConstMatrixRef actual_lhsref(\n      actual_lhs.values(), actual_lhs.num_cols(), actual_lhs.num_cols());\n  ConstMatrixRef expected_lhsref(\n      expected_lhs.values(), actual_lhs.num_cols(), actual_lhs.num_cols());\n\n  EXPECT_NEAR((actual_lhsref - expected_lhsref).norm() / expected_lhsref.norm(),\n              0.0,\n              1e-12)\n      << \"expected: \\n\"\n      << expected_lhsref << \"\\nactual: \\n\"\n      << actual_lhsref;\n\n  EXPECT_NEAR(\n      (actual_rhs - expected_rhs).norm() / expected_rhs.norm(), 0.0, 1e-12)\n      << \"expected: \\n\"\n      << expected_rhs << \"\\nactual: \\n\"\n      << actual_rhs;\n\n  EXPECT_NEAR((actual_e_sol - expected_e_sol).norm() / expected_e_sol.norm(),\n              0.0,\n              1e-12)\n      << \"expected: \\n\"\n      << expected_e_sol << \"\\nactual: \\n\"\n      << actual_e_sol;\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/schur_jacobi_preconditioner.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/schur_jacobi_preconditioner.h\"\n\n#include <utility>\n#include <vector>\n\n#include \"ceres/block_random_access_diagonal_matrix.h\"\n#include \"ceres/block_sparse_matrix.h\"\n#include \"ceres/linear_solver.h\"\n#include \"ceres/schur_eliminator.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nSchurJacobiPreconditioner::SchurJacobiPreconditioner(\n    const CompressedRowBlockStructure& bs,\n    const Preconditioner::Options& options)\n    : options_(options) {\n  CHECK_GT(options_.elimination_groups.size(), 1);\n  CHECK_GT(options_.elimination_groups[0], 0);\n  const int num_blocks = bs.cols.size() - options_.elimination_groups[0];\n  CHECK_GT(num_blocks, 0) << \"Jacobian should have at least 1 f_block for \"\n                          << \"SCHUR_JACOBI preconditioner.\";\n  CHECK(options_.context != NULL);\n\n  std::vector<int> blocks(num_blocks);\n  for (int i = 0; i < num_blocks; ++i) {\n    blocks[i] = bs.cols[i + options_.elimination_groups[0]].size;\n  }\n\n  m_.reset(new BlockRandomAccessDiagonalMatrix(blocks));\n  InitEliminator(bs);\n}\n\nSchurJacobiPreconditioner::~SchurJacobiPreconditioner() {}\n\n// Initialize the SchurEliminator.\nvoid SchurJacobiPreconditioner::InitEliminator(\n    const CompressedRowBlockStructure& bs) {\n  LinearSolver::Options eliminator_options;\n  eliminator_options.elimination_groups = options_.elimination_groups;\n  eliminator_options.num_threads = options_.num_threads;\n  eliminator_options.e_block_size = options_.e_block_size;\n  eliminator_options.f_block_size = options_.f_block_size;\n  eliminator_options.row_block_size = options_.row_block_size;\n  eliminator_options.context = options_.context;\n  eliminator_.reset(SchurEliminatorBase::Create(eliminator_options));\n  const bool kFullRankETE = true;\n  eliminator_->Init(\n      eliminator_options.elimination_groups[0], kFullRankETE, &bs);\n}\n\n// Update the values of the preconditioner matrix and factorize it.\nbool SchurJacobiPreconditioner::UpdateImpl(const BlockSparseMatrix& A,\n                                           const double* D) {\n  const int num_rows = m_->num_rows();\n  CHECK_GT(num_rows, 0);\n\n  // Compute a subset of the entries of the Schur complement.\n  eliminator_->Eliminate(\n      BlockSparseMatrixData(A), nullptr, D, m_.get(), nullptr);\n  m_->Invert();\n  return true;\n}\n\nvoid SchurJacobiPreconditioner::RightMultiply(const double* x,\n                                              double* y) const {\n  m_->RightMultiply(x, y);\n}\n\nint SchurJacobiPreconditioner::num_rows() const { return m_->num_rows(); }\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/schur_jacobi_preconditioner.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Detailed descriptions of these preconditions beyond what is\n// documented here can be found in\n//\n// Bundle Adjustment in the Large\n// S. Agarwal, N. Snavely, S. Seitz & R. Szeliski, ECCV 2010\n// http://www.cs.washington.edu/homes/sagarwal/bal.pdf\n\n#ifndef CERES_INTERNAL_SCHUR_JACOBI_PRECONDITIONER_H_\n#define CERES_INTERNAL_SCHUR_JACOBI_PRECONDITIONER_H_\n\n#include <memory>\n#include <set>\n#include <utility>\n#include <vector>\n\n#include \"ceres/preconditioner.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass BlockRandomAccessDiagonalMatrix;\nclass BlockSparseMatrix;\nstruct CompressedRowBlockStructure;\nclass SchurEliminatorBase;\n\n// This class implements the SCHUR_JACOBI preconditioner for Structure\n// from Motion/Bundle Adjustment problems. Full mathematical details\n// can be found in\n//\n// Bundle Adjustment in the Large\n// S. Agarwal, N. Snavely, S. Seitz & R. Szeliski, ECCV 2010\n// http://www.cs.washington.edu/homes/sagarwal/bal.pdf\n//\n// Example usage:\n//\n//   Preconditioner::Options options;\n//   options.preconditioner_type = SCHUR_JACOBI;\n//   options.elimination_groups.push_back(num_points);\n//   options.elimination_groups.push_back(num_cameras);\n//   SchurJacobiPreconditioner preconditioner(\n//      *A.block_structure(), options);\n//   preconditioner.Update(A, NULL);\n//   preconditioner.RightMultiply(x, y);\n//\nclass SchurJacobiPreconditioner : public BlockSparseMatrixPreconditioner {\n public:\n  // Initialize the symbolic structure of the preconditioner. bs is\n  // the block structure of the linear system to be solved. It is used\n  // to determine the sparsity structure of the preconditioner matrix.\n  //\n  // It has the same structural requirement as other Schur complement\n  // based solvers. Please see schur_eliminator.h for more details.\n  SchurJacobiPreconditioner(const CompressedRowBlockStructure& bs,\n                            const Preconditioner::Options& options);\n  SchurJacobiPreconditioner(const SchurJacobiPreconditioner&) = delete;\n  void operator=(const SchurJacobiPreconditioner&) = delete;\n\n  virtual ~SchurJacobiPreconditioner();\n\n  // Preconditioner interface.\n  void RightMultiply(const double* x, double* y) const final;\n  int num_rows() const final;\n\n private:\n  void InitEliminator(const CompressedRowBlockStructure& bs);\n  bool UpdateImpl(const BlockSparseMatrix& A, const double* D) final;\n\n  Preconditioner::Options options_;\n  std::unique_ptr<SchurEliminatorBase> eliminator_;\n  // Preconditioner matrix.\n  std::unique_ptr<BlockRandomAccessDiagonalMatrix> m_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_SCHUR_JACOBI_PRECONDITIONER_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/schur_templates.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// What template specializations are available.\n//\n// ========================================\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n// THIS FILE IS AUTOGENERATED. DO NOT EDIT.\n//=========================================\n//\n// This file is generated using generate_template_specializations.py.\n\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/schur_templates.h\"\n\nnamespace ceres {\nnamespace internal {\n\nvoid GetBestSchurTemplateSpecialization(int* row_block_size,\n                                        int* e_block_size,\n                                        int* f_block_size) {\n  LinearSolver::Options options;\n  options.row_block_size = *row_block_size;\n  options.e_block_size = *e_block_size;\n  options.f_block_size = *f_block_size;\n  *row_block_size = Eigen::Dynamic;\n  *e_block_size = Eigen::Dynamic;\n  *f_block_size = Eigen::Dynamic;\n#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 2) &&\n     (options.f_block_size == 2)) {\n   *row_block_size = 2;\n   *e_block_size = 2;\n   *f_block_size = 2;\n  return;\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 2) &&\n     (options.f_block_size == 3)) {\n   *row_block_size = 2;\n   *e_block_size = 2;\n   *f_block_size = 3;\n  return;\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 2) &&\n     (options.f_block_size == 4)) {\n   *row_block_size = 2;\n   *e_block_size = 2;\n   *f_block_size = 4;\n  return;\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 2)) {\n   *row_block_size = 2;\n   *e_block_size = 2;\n   *f_block_size = Eigen::Dynamic;\n  return;\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 3) &&\n     (options.f_block_size == 3)) {\n   *row_block_size = 2;\n   *e_block_size = 3;\n   *f_block_size = 3;\n  return;\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 3) &&\n     (options.f_block_size == 4)) {\n   *row_block_size = 2;\n   *e_block_size = 3;\n   *f_block_size = 4;\n  return;\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 3) &&\n     (options.f_block_size == 6)) {\n   *row_block_size = 2;\n   *e_block_size = 3;\n   *f_block_size = 6;\n  return;\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 3) &&\n     (options.f_block_size == 9)) {\n   *row_block_size = 2;\n   *e_block_size = 3;\n   *f_block_size = 9;\n  return;\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 3)) {\n   *row_block_size = 2;\n   *e_block_size = 3;\n   *f_block_size = Eigen::Dynamic;\n  return;\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 4) &&\n     (options.f_block_size == 3)) {\n   *row_block_size = 2;\n   *e_block_size = 4;\n   *f_block_size = 3;\n  return;\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 4) &&\n     (options.f_block_size == 4)) {\n   *row_block_size = 2;\n   *e_block_size = 4;\n   *f_block_size = 4;\n  return;\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 4) &&\n     (options.f_block_size == 6)) {\n   *row_block_size = 2;\n   *e_block_size = 4;\n   *f_block_size = 6;\n  return;\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 4) &&\n     (options.f_block_size == 8)) {\n   *row_block_size = 2;\n   *e_block_size = 4;\n   *f_block_size = 8;\n  return;\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 4) &&\n     (options.f_block_size == 9)) {\n   *row_block_size = 2;\n   *e_block_size = 4;\n   *f_block_size = 9;\n  return;\n }\n if ((options.row_block_size == 2) &&\n     (options.e_block_size == 4)) {\n   *row_block_size = 2;\n   *e_block_size = 4;\n   *f_block_size = Eigen::Dynamic;\n  return;\n }\n if (options.row_block_size == 2){\n   *row_block_size = 2;\n   *e_block_size = Eigen::Dynamic;\n   *f_block_size = Eigen::Dynamic;\n  return;\n }\n if ((options.row_block_size == 3) &&\n     (options.e_block_size == 3) &&\n     (options.f_block_size == 3)) {\n   *row_block_size = 3;\n   *e_block_size = 3;\n   *f_block_size = 3;\n  return;\n }\n if ((options.row_block_size == 4) &&\n     (options.e_block_size == 4) &&\n     (options.f_block_size == 2)) {\n   *row_block_size = 4;\n   *e_block_size = 4;\n   *f_block_size = 2;\n  return;\n }\n if ((options.row_block_size == 4) &&\n     (options.e_block_size == 4) &&\n     (options.f_block_size == 3)) {\n   *row_block_size = 4;\n   *e_block_size = 4;\n   *f_block_size = 3;\n  return;\n }\n if ((options.row_block_size == 4) &&\n     (options.e_block_size == 4) &&\n     (options.f_block_size == 4)) {\n   *row_block_size = 4;\n   *e_block_size = 4;\n   *f_block_size = 4;\n  return;\n }\n if ((options.row_block_size == 4) &&\n     (options.e_block_size == 4)) {\n   *row_block_size = 4;\n   *e_block_size = 4;\n   *f_block_size = Eigen::Dynamic;\n  return;\n }\n\n#endif\n  return;\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/schur_templates.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n\n#ifndef CERES_INTERNAL_SCHUR_TEMPLATES_H_\n#define CERES_INTERNAL_SCHUR_TEMPLATES_H_\n\n#include \"ceres/linear_solver.h\"\n\nnamespace ceres {\nnamespace internal {\n\nvoid GetBestSchurTemplateSpecialization(int* row_block_size,\n                                        int* e_block_size,\n                                        int* f_block_size);\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_SCHUR_TEMPLATES_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/scoped_thread_token.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: yp@photonscore.de (Yury Prokazov)\n\n#ifndef CERES_INTERNAL_SCOPED_THREAD_TOKEN_H_\n#define CERES_INTERNAL_SCOPED_THREAD_TOKEN_H_\n\n#include \"ceres/thread_token_provider.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// Helper class for ThreadTokenProvider. This object acquires a token in its\n// constructor and puts that token back with destruction.\nclass ScopedThreadToken {\n public:\n  ScopedThreadToken(ThreadTokenProvider* provider)\n      : provider_(provider), token_(provider->Acquire()) {}\n\n  ~ScopedThreadToken() { provider_->Release(token_); }\n\n  int token() const { return token_; }\n\n private:\n  ThreadTokenProvider* provider_;\n  int token_;\n\n  ScopedThreadToken(ScopedThreadToken&);\n  ScopedThreadToken& operator=(ScopedThreadToken&);\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_SCOPED_THREAD_TOKEN_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/scratch_evaluate_preparer.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n\n#include \"ceres/scratch_evaluate_preparer.h\"\n\n#include \"ceres/parameter_block.h\"\n#include \"ceres/program.h\"\n#include \"ceres/residual_block.h\"\n\nnamespace ceres {\nnamespace internal {\n\nScratchEvaluatePreparer* ScratchEvaluatePreparer::Create(\n    const Program &program,\n    int num_threads) {\n  ScratchEvaluatePreparer* preparers = new ScratchEvaluatePreparer[num_threads];\n  int max_derivatives_per_residual_block =\n      program.MaxDerivativesPerResidualBlock();\n  for (int i = 0; i < num_threads; i++) {\n    preparers[i].Init(max_derivatives_per_residual_block);\n  }\n  return preparers;\n}\n\nvoid ScratchEvaluatePreparer::Init(int max_derivatives_per_residual_block) {\n  jacobian_scratch_.reset(\n      new double[max_derivatives_per_residual_block]);\n}\n\n// Point the jacobian blocks into the scratch area of this evaluate preparer.\nvoid ScratchEvaluatePreparer::Prepare(const ResidualBlock* residual_block,\n                                      int /* residual_block_index */,\n                                      SparseMatrix* /* jacobian */,\n                                      double** jacobians) {\n  double* jacobian_block_cursor = jacobian_scratch_.get();\n  int num_residuals = residual_block->NumResiduals();\n  int num_parameter_blocks = residual_block->NumParameterBlocks();\n  for (int j = 0; j < num_parameter_blocks; ++j) {\n    const ParameterBlock* parameter_block =\n        residual_block->parameter_blocks()[j];\n    if (parameter_block->IsConstant()) {\n      jacobians[j] = NULL;\n    } else {\n      jacobians[j] = jacobian_block_cursor;\n      jacobian_block_cursor += num_residuals * parameter_block->LocalSize();\n    }\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/scratch_evaluate_preparer.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n//\n// A scratch evaluate preparer provides temporary storage for the jacobians that\n// are created when running user-provided cost functions. The evaluator takes\n// care to avoid evaluating the jacobian for fixed parameters.\n\n#ifndef CERES_INTERNAL_SCRATCH_EVALUATE_PREPARER_H_\n#define CERES_INTERNAL_SCRATCH_EVALUATE_PREPARER_H_\n\n#include <memory>\n\nnamespace ceres {\nnamespace internal {\n\nclass Program;\nclass ResidualBlock;\nclass SparseMatrix;\n\nclass ScratchEvaluatePreparer {\n public:\n  // Create num_threads ScratchEvaluatePreparers.\n  static ScratchEvaluatePreparer* Create(const Program &program,\n                                         int num_threads);\n\n  // EvaluatePreparer interface\n  void Init(int max_derivatives_per_residual_block);\n  void Prepare(const ResidualBlock* residual_block,\n               int residual_block_index,\n               SparseMatrix* jacobian,\n               double** jacobians);\n\n private:\n  // Scratch space for the jacobians; each jacobian is packed one after another.\n  // There is enough scratch to hold all the jacobians for the largest residual.\n  std::unique_ptr<double[]> jacobian_scratch_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_SCRATCH_EVALUATE_PREPARER_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/single_linkage_clustering.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/single_linkage_clustering.h\"\n\n#include <unordered_set>\n#include <unordered_map>\n#include \"ceres/graph.h\"\n#include \"ceres/graph_algorithms.h\"\n\nnamespace ceres {\nnamespace internal {\n\nint ComputeSingleLinkageClustering(\n    const SingleLinkageClusteringOptions& options,\n    const WeightedGraph<int>& graph,\n    std::unordered_map<int, int>* membership) {\n  CHECK(membership != nullptr);\n  membership->clear();\n\n  // Initially each vertex is in its own cluster.\n  const std::unordered_set<int>& vertices = graph.vertices();\n  for (const int v : vertices) {\n    (*membership)[v] = v;\n  }\n\n  for (const int vertex1 : vertices) {\n    const std::unordered_set<int>& neighbors = graph.Neighbors(vertex1);\n    for (const int vertex2 : neighbors) {\n      // Since the graph is undirected, only pay attention to one side\n      // of the edge and ignore weak edges.\n      if ((vertex1 > vertex2) ||\n          (graph.EdgeWeight(vertex1, vertex2) < options.min_similarity)) {\n        continue;\n      }\n\n      // Use a union-find algorithm to keep track of the clusters.\n      const int c1 = FindConnectedComponent(vertex1, membership);\n      const int c2 = FindConnectedComponent(vertex2, membership);\n\n      if (c1 == c2) {\n        continue;\n      }\n\n      if (c1 < c2) {\n        (*membership)[c2] = c1;\n      } else {\n        (*membership)[c1] = c2;\n      }\n    }\n  }\n\n  // Make sure that every vertex is connected directly to the vertex\n  // identifying the cluster.\n  int num_clusters = 0;\n  for (auto& m : *membership) {\n    m.second = FindConnectedComponent(m.first, membership);\n    if (m.first == m.second) {\n      ++num_clusters;\n    }\n  }\n\n  return num_clusters;\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/single_linkage_clustering.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_SINGLE_LINKAGE_CLUSTERING_H_\n#define CERES_INTERNAL_SINGLE_LINKAGE_CLUSTERING_H_\n\n#include <unordered_map>\n#include \"ceres/graph.h\"\n\nnamespace ceres {\nnamespace internal {\n\nstruct SingleLinkageClusteringOptions {\n  // Graph edges with edge weight less than min_similarity are ignored\n  // during the clustering process.\n  double min_similarity = 0.99;\n};\n\n// Compute a partitioning of the vertices of the graph using the\n// single linkage clustering algorithm. Edges with weight less than\n// SingleLinkageClusteringOptions::min_similarity will be ignored.\n//\n// membership upon return will contain a mapping from the vertices of\n// the graph to an integer indicating the identity of the cluster that\n// it belongs to.\n//\n// The return value of this function is the number of clusters\n// identified by the algorithm.\nint ComputeSingleLinkageClustering(\n    const SingleLinkageClusteringOptions& options,\n    const WeightedGraph<int>& graph,\n    std::unordered_map<int, int>* membership);\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_SINGLE_LINKAGE_CLUSTERING_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/single_linkage_clustering_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: Sameer Agarwal (sameeragarwal@google.com)\n\n#include \"ceres/single_linkage_clustering.h\"\n\n#include <unordered_map>\n#include \"ceres/graph.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nTEST(SingleLinkageClustering, GraphHasTwoComponents) {\n  WeightedGraph<int> graph;\n  const int kNumVertices = 6;\n  for (int i = 0; i < kNumVertices; ++i) {\n    graph.AddVertex(i);\n  }\n  // Graph structure:\n  //\n  //  0-1-2-3 4-5\n  graph.AddEdge(0, 1, 1.0);\n  graph.AddEdge(1, 2, 1.0);\n  graph.AddEdge(2, 3, 1.0);\n  graph.AddEdge(4, 5, 1.0);\n\n  SingleLinkageClusteringOptions options;\n  std::unordered_map<int, int> membership;\n  ComputeSingleLinkageClustering(options, graph, &membership);\n  EXPECT_EQ(membership.size(), kNumVertices);\n\n  EXPECT_EQ(membership[1], membership[0]);\n  EXPECT_EQ(membership[2], membership[0]);\n  EXPECT_EQ(membership[3], membership[0]);\n  EXPECT_NE(membership[4], membership[0]);\n  EXPECT_NE(membership[5], membership[0]);\n  EXPECT_EQ(membership[4], membership[5]);\n}\n\nTEST(SingleLinkageClustering, ComponentWithWeakLink) {\n  WeightedGraph<int> graph;\n  const int kNumVertices = 6;\n  for (int i = 0; i < kNumVertices; ++i) {\n    graph.AddVertex(i);\n  }\n  // Graph structure:\n  //\n  //  0-1-2-3 4-5\n  graph.AddEdge(0, 1, 1.0);\n  graph.AddEdge(1, 2, 1.0);\n  graph.AddEdge(2, 3, 1.0);\n\n  // This component should break up into two.\n  graph.AddEdge(4, 5, 0.5);\n\n  SingleLinkageClusteringOptions options;\n  std::unordered_map<int, int> membership;\n  ComputeSingleLinkageClustering(options, graph, &membership);\n  EXPECT_EQ(membership.size(), kNumVertices);\n\n  EXPECT_EQ(membership[1], membership[0]);\n  EXPECT_EQ(membership[2], membership[0]);\n  EXPECT_EQ(membership[3], membership[0]);\n  EXPECT_NE(membership[4], membership[0]);\n  EXPECT_NE(membership[5], membership[0]);\n  EXPECT_NE(membership[4], membership[5]);\n}\n\nTEST(SingleLinkageClustering, ComponentWithWeakLinkAndStrongLink) {\n  WeightedGraph<int> graph;\n  const int kNumVertices = 6;\n  for (int i = 0; i < kNumVertices; ++i) {\n    graph.AddVertex(i);\n  }\n  // Graph structure:\n  //\n  //  0-1-2-3 4-5\n  graph.AddEdge(0, 1, 1.0);\n  graph.AddEdge(1, 2, 1.0);\n  graph.AddEdge(2, 3, 0.5);  // Weak link\n  graph.AddEdge(0, 3, 1.0);\n\n  // This component should break up into two.\n  graph.AddEdge(4, 5, 1.0);\n\n  SingleLinkageClusteringOptions options;\n  std::unordered_map<int, int> membership;\n  ComputeSingleLinkageClustering(options, graph, &membership);\n  EXPECT_EQ(membership.size(), kNumVertices);\n\n  EXPECT_EQ(membership[1], membership[0]);\n  EXPECT_EQ(membership[2], membership[0]);\n  EXPECT_EQ(membership[3], membership[0]);\n  EXPECT_EQ(membership[4], membership[5]);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/small_blas.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Simple blas functions for use in the Schur Eliminator. These are\n// fairly basic implementations which already yield a significant\n// speedup in the eliminator performance.\n\n#ifndef CERES_INTERNAL_SMALL_BLAS_H_\n#define CERES_INTERNAL_SMALL_BLAS_H_\n\n#include \"ceres/internal/port.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"glog/logging.h\"\n#include \"small_blas_generic.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// The following three macros are used to share code and reduce\n// template junk across the various GEMM variants.\n#define CERES_GEMM_BEGIN(name)                                          \\\n  template<int kRowA, int kColA, int kRowB, int kColB, int kOperation>  \\\n  inline void name(const double* A,                                     \\\n                   const int num_row_a,                                 \\\n                   const int num_col_a,                                 \\\n                   const double* B,                                     \\\n                   const int num_row_b,                                 \\\n                   const int num_col_b,                                 \\\n                   double* C,                                           \\\n                   const int start_row_c,                               \\\n                   const int start_col_c,                               \\\n                   const int row_stride_c,                              \\\n                   const int col_stride_c)\n\n#define CERES_GEMM_NAIVE_HEADER                                         \\\n  DCHECK_GT(num_row_a, 0);                                              \\\n  DCHECK_GT(num_col_a, 0);                                              \\\n  DCHECK_GT(num_row_b, 0);                                              \\\n  DCHECK_GT(num_col_b, 0);                                              \\\n  DCHECK_GE(start_row_c, 0);                                            \\\n  DCHECK_GE(start_col_c, 0);                                            \\\n  DCHECK_GT(row_stride_c, 0);                                           \\\n  DCHECK_GT(col_stride_c, 0);                                           \\\n  DCHECK((kRowA == Eigen::Dynamic) || (kRowA == num_row_a));            \\\n  DCHECK((kColA == Eigen::Dynamic) || (kColA == num_col_a));            \\\n  DCHECK((kRowB == Eigen::Dynamic) || (kRowB == num_row_b));            \\\n  DCHECK((kColB == Eigen::Dynamic) || (kColB == num_col_b));            \\\n  const int NUM_ROW_A = (kRowA != Eigen::Dynamic ? kRowA : num_row_a);  \\\n  const int NUM_COL_A = (kColA != Eigen::Dynamic ? kColA : num_col_a);  \\\n  const int NUM_ROW_B = (kRowB != Eigen::Dynamic ? kRowB : num_row_b);  \\\n  const int NUM_COL_B = (kColB != Eigen::Dynamic ? kColB : num_col_b);\n\n#define CERES_GEMM_EIGEN_HEADER                                         \\\n  const typename EigenTypes<kRowA, kColA>::ConstMatrixRef               \\\n  Aref(A, num_row_a, num_col_a);                                        \\\n  const typename EigenTypes<kRowB, kColB>::ConstMatrixRef               \\\n  Bref(B, num_row_b, num_col_b);                                        \\\n  MatrixRef Cref(C, row_stride_c, col_stride_c);                        \\\n\n#define CERES_CALL_GEMM(name)                                           \\\n  name<kRowA, kColA, kRowB, kColB, kOperation>(                         \\\n      A, num_row_a, num_col_a,                                          \\\n      B, num_row_b, num_col_b,                                          \\\n      C, start_row_c, start_col_c, row_stride_c, col_stride_c);\n\n#define CERES_GEMM_STORE_SINGLE(p, index, value)                        \\\n  if (kOperation > 0) {                                                 \\\n    p[index] += value;                                                  \\\n  } else if (kOperation < 0) {                                          \\\n    p[index] -= value;                                                  \\\n  } else {                                                              \\\n    p[index] = value;                                                   \\\n  }\n\n#define CERES_GEMM_STORE_PAIR(p, index, v1, v2)                         \\\n  if (kOperation > 0) {                                                 \\\n    p[index] += v1;                                                     \\\n    p[index + 1] += v2;                                                 \\\n  } else if (kOperation < 0) {                                          \\\n    p[index] -= v1;                                                     \\\n    p[index + 1] -= v2;                                                 \\\n  } else {                                                              \\\n    p[index] = v1;                                                      \\\n    p[index + 1] = v2;                                                  \\\n  }\n\n// For the matrix-matrix functions below, there are three variants for\n// each functionality. Foo, FooNaive and FooEigen. Foo is the one to\n// be called by the user. FooNaive is a basic loop based\n// implementation and FooEigen uses Eigen's implementation. Foo\n// chooses between FooNaive and FooEigen depending on how many of the\n// template arguments are fixed at compile time. Currently, FooEigen\n// is called if all matrix dimensions are compile time\n// constants. FooNaive is called otherwise. This leads to the best\n// performance currently.\n//\n// The MatrixMatrixMultiply variants compute:\n//\n//   C op A * B;\n//\n// The MatrixTransposeMatrixMultiply variants compute:\n//\n//   C op A' * B\n//\n// where op can be +=, -=, or =.\n//\n// The template parameters (kRowA, kColA, kRowB, kColB) allow\n// specialization of the loop at compile time. If this information is\n// not available, then Eigen::Dynamic should be used as the template\n// argument.\n//\n//   kOperation =  1  -> C += A * B\n//   kOperation = -1  -> C -= A * B\n//   kOperation =  0  -> C  = A * B\n//\n// The functions can write into matrices C which are larger than the\n// matrix A * B. This is done by specifying the true size of C via\n// row_stride_c and col_stride_c, and then indicating where A * B\n// should be written into by start_row_c and start_col_c.\n//\n// Graphically if row_stride_c = 10, col_stride_c = 12, start_row_c =\n// 4 and start_col_c = 5, then if A = 3x2 and B = 2x4, we get\n//\n//   ------------\n//   ------------\n//   ------------\n//   ------------\n//   -----xxxx---\n//   -----xxxx---\n//   -----xxxx---\n//   ------------\n//   ------------\n//   ------------\n//\nCERES_GEMM_BEGIN(MatrixMatrixMultiplyEigen) {\n  CERES_GEMM_EIGEN_HEADER\n  Eigen::Block<MatrixRef, kRowA, kColB>\n    block(Cref, start_row_c, start_col_c, num_row_a, num_col_b);\n\n  if (kOperation > 0) {\n    block.noalias() += Aref * Bref;\n  } else if (kOperation < 0) {\n    block.noalias() -= Aref * Bref;\n  } else {\n    block.noalias() = Aref * Bref;\n  }\n}\n\nCERES_GEMM_BEGIN(MatrixMatrixMultiplyNaive) {\n  CERES_GEMM_NAIVE_HEADER\n  DCHECK_EQ(NUM_COL_A, NUM_ROW_B);\n\n  const int NUM_ROW_C = NUM_ROW_A;\n  const int NUM_COL_C = NUM_COL_B;\n  DCHECK_LE(start_row_c + NUM_ROW_C, row_stride_c);\n  DCHECK_LE(start_col_c + NUM_COL_C, col_stride_c);\n  const int span = 4;\n\n  // Calculate the remainder part first.\n\n  // Process the last odd column if present.\n  if (NUM_COL_C & 1) {\n    int col = NUM_COL_C - 1;\n    const double* pa = &A[0];\n    for (int row = 0; row < NUM_ROW_C; ++row, pa += NUM_COL_A) {\n      const double* pb = &B[col];\n      double tmp = 0.0;\n      for (int k = 0; k < NUM_COL_A; ++k, pb += NUM_COL_B) {\n        tmp += pa[k] * pb[0];\n      }\n\n      const int index = (row + start_row_c) * col_stride_c + start_col_c + col;\n      CERES_GEMM_STORE_SINGLE(C, index, tmp);\n    }\n\n    // Return directly for efficiency of extremely small matrix multiply.\n    if (NUM_COL_C == 1) {\n      return;\n    }\n  }\n\n  // Process the couple columns in remainder if present.\n  if (NUM_COL_C & 2) {\n    int col = NUM_COL_C & (int)(~(span - 1)) ;\n    const double* pa = &A[0];\n    for (int row = 0; row < NUM_ROW_C; ++row, pa += NUM_COL_A) {\n      const double* pb = &B[col];\n      double tmp1 = 0.0, tmp2 = 0.0;\n      for (int k = 0; k < NUM_COL_A; ++k, pb += NUM_COL_B) {\n        double av = pa[k];\n        tmp1 += av * pb[0];\n        tmp2 += av * pb[1];\n      }\n\n      const int index = (row + start_row_c) * col_stride_c + start_col_c + col;\n      CERES_GEMM_STORE_PAIR(C, index, tmp1, tmp2);\n    }\n\n    // Return directly for efficiency of extremely small matrix multiply.\n    if (NUM_COL_C < span) {\n      return;\n    }\n  }\n\n  // Calculate the main part with multiples of 4.\n  int col_m = NUM_COL_C & (int)(~(span - 1));\n  for (int col = 0; col < col_m; col += span) {\n    for (int row = 0; row < NUM_ROW_C; ++row) {\n      const int index = (row + start_row_c) * col_stride_c + start_col_c + col;\n      MMM_mat1x4(NUM_COL_A, &A[row * NUM_COL_A],\n                 &B[col], NUM_COL_B, &C[index], kOperation);\n    }\n  }\n\n}\n\nCERES_GEMM_BEGIN(MatrixMatrixMultiply) {\n#ifdef CERES_NO_CUSTOM_BLAS\n\n  CERES_CALL_GEMM(MatrixMatrixMultiplyEigen)\n  return;\n\n#else\n\n  if (kRowA != Eigen::Dynamic && kColA != Eigen::Dynamic &&\n      kRowB != Eigen::Dynamic && kColB != Eigen::Dynamic) {\n    CERES_CALL_GEMM(MatrixMatrixMultiplyEigen)\n  } else {\n    CERES_CALL_GEMM(MatrixMatrixMultiplyNaive)\n  }\n\n#endif\n}\n\nCERES_GEMM_BEGIN(MatrixTransposeMatrixMultiplyEigen) {\n  CERES_GEMM_EIGEN_HEADER\n  Eigen::Block<MatrixRef, kColA, kColB> block(Cref,\n                                              start_row_c, start_col_c,\n                                              num_col_a, num_col_b);\n  if (kOperation > 0) {\n    block.noalias() += Aref.transpose() * Bref;\n  } else if (kOperation < 0) {\n    block.noalias() -= Aref.transpose() * Bref;\n  } else {\n    block.noalias() = Aref.transpose() * Bref;\n  }\n}\n\nCERES_GEMM_BEGIN(MatrixTransposeMatrixMultiplyNaive) {\n  CERES_GEMM_NAIVE_HEADER\n  DCHECK_EQ(NUM_ROW_A, NUM_ROW_B);\n\n  const int NUM_ROW_C = NUM_COL_A;\n  const int NUM_COL_C = NUM_COL_B;\n  DCHECK_LE(start_row_c + NUM_ROW_C, row_stride_c);\n  DCHECK_LE(start_col_c + NUM_COL_C, col_stride_c);\n  const int span = 4;\n\n  // Process the remainder part first.\n\n  // Process the last odd column if present.\n  if (NUM_COL_C & 1) {\n    int col = NUM_COL_C - 1;\n    for (int row = 0; row < NUM_ROW_C; ++row) {\n      const double* pa = &A[row];\n      const double* pb = &B[col];\n      double tmp = 0.0;\n      for (int k = 0; k < NUM_ROW_A; ++k) {\n        tmp += pa[0] * pb[0];\n        pa += NUM_COL_A;\n        pb += NUM_COL_B;\n      }\n\n      const int index = (row + start_row_c) * col_stride_c + start_col_c + col;\n      CERES_GEMM_STORE_SINGLE(C, index, tmp);\n    }\n\n    // Return directly for efficiency of extremely small matrix multiply.\n    if (NUM_COL_C == 1) {\n      return;\n    }\n  }\n\n  // Process the couple columns in remainder if present.\n  if (NUM_COL_C & 2) {\n    int col = NUM_COL_C & (int)(~(span - 1)) ;\n    for (int row = 0; row < NUM_ROW_C; ++row) {\n      const double* pa = &A[row];\n      const double* pb = &B[col];\n      double tmp1 = 0.0, tmp2 = 0.0;\n      for (int k = 0; k < NUM_ROW_A; ++k) {\n        double av = *pa;\n        tmp1 += av * pb[0];\n        tmp2 += av * pb[1];\n        pa += NUM_COL_A;\n        pb += NUM_COL_B;\n      }\n\n      const int index = (row + start_row_c) * col_stride_c + start_col_c + col;\n      CERES_GEMM_STORE_PAIR(C, index, tmp1, tmp2);\n    }\n\n    // Return directly for efficiency of extremely small matrix multiply.\n    if (NUM_COL_C < span) {\n      return;\n    }\n  }\n\n  // Process the main part with multiples of 4.\n  int col_m = NUM_COL_C & (int)(~(span - 1));\n  for (int col = 0; col < col_m; col += span) {\n    for (int row = 0; row < NUM_ROW_C; ++row) {\n      const int index = (row + start_row_c) * col_stride_c + start_col_c + col;\n      MTM_mat1x4(NUM_ROW_A, &A[row], NUM_COL_A,\n                 &B[col], NUM_COL_B, &C[index], kOperation);\n    }\n  }\n\n}\n\nCERES_GEMM_BEGIN(MatrixTransposeMatrixMultiply) {\n#ifdef CERES_NO_CUSTOM_BLAS\n\n  CERES_CALL_GEMM(MatrixTransposeMatrixMultiplyEigen)\n  return;\n\n#else\n\n  if (kRowA != Eigen::Dynamic && kColA != Eigen::Dynamic &&\n      kRowB != Eigen::Dynamic && kColB != Eigen::Dynamic) {\n    CERES_CALL_GEMM(MatrixTransposeMatrixMultiplyEigen)\n  } else {\n    CERES_CALL_GEMM(MatrixTransposeMatrixMultiplyNaive)\n  }\n\n#endif\n}\n\n// Matrix-Vector multiplication\n//\n// c op A * b;\n//\n// where op can be +=, -=, or =.\n//\n// The template parameters (kRowA, kColA) allow specialization of the\n// loop at compile time. If this information is not available, then\n// Eigen::Dynamic should be used as the template argument.\n//\n// kOperation =  1  -> c += A' * b\n// kOperation = -1  -> c -= A' * b\n// kOperation =  0  -> c  = A' * b\ntemplate<int kRowA, int kColA, int kOperation>\ninline void MatrixVectorMultiply(const double* A,\n                                 const int num_row_a,\n                                 const int num_col_a,\n                                 const double* b,\n                                 double* c) {\n#ifdef CERES_NO_CUSTOM_BLAS\n  const typename EigenTypes<kRowA, kColA>::ConstMatrixRef\n      Aref(A, num_row_a, num_col_a);\n  const typename EigenTypes<kColA>::ConstVectorRef bref(b, num_col_a);\n  typename EigenTypes<kRowA>::VectorRef cref(c, num_row_a);\n\n  // lazyProduct works better than .noalias() for matrix-vector\n  // products.\n  if (kOperation > 0) {\n    cref += Aref.lazyProduct(bref);\n  } else if (kOperation < 0) {\n    cref -= Aref.lazyProduct(bref);\n  } else {\n    cref = Aref.lazyProduct(bref);\n  }\n#else\n\n  DCHECK_GT(num_row_a, 0);\n  DCHECK_GT(num_col_a, 0);\n  DCHECK((kRowA == Eigen::Dynamic) || (kRowA == num_row_a));\n  DCHECK((kColA == Eigen::Dynamic) || (kColA == num_col_a));\n\n  const int NUM_ROW_A = (kRowA != Eigen::Dynamic ? kRowA : num_row_a);\n  const int NUM_COL_A = (kColA != Eigen::Dynamic ? kColA : num_col_a);\n  const int span = 4;\n\n  // Calculate the remainder part first.\n\n  // Process the last odd row if present.\n  if (NUM_ROW_A & 1) {\n    int row  = NUM_ROW_A - 1;\n    const double* pa = &A[row * NUM_COL_A];\n    const double* pb = &b[0];\n    double tmp = 0.0;\n    for (int col = 0; col < NUM_COL_A; ++col) {\n      tmp += (*pa++) * (*pb++);\n    }\n    CERES_GEMM_STORE_SINGLE(c, row, tmp);\n\n    // Return directly for efficiency of extremely small matrix multiply.\n    if (NUM_ROW_A == 1) {\n      return;\n    }\n  }\n\n  // Process the couple rows in remainder if present.\n  if (NUM_ROW_A & 2) {\n    int row = NUM_ROW_A & (int)(~(span - 1));\n    const double* pa1 = &A[row * NUM_COL_A];\n    const double* pa2 = pa1 + NUM_COL_A;\n    const double* pb = &b[0];\n    double tmp1 = 0.0, tmp2 = 0.0;\n    for (int col = 0; col < NUM_COL_A; ++col) {\n      double bv = *pb++;\n      tmp1 += *(pa1++) * bv;\n      tmp2 += *(pa2++) * bv;\n    }\n    CERES_GEMM_STORE_PAIR(c, row, tmp1, tmp2);\n\n    // Return directly for efficiency of extremely small matrix multiply.\n    if (NUM_ROW_A < span) {\n      return;\n    }\n  }\n\n  // Calculate the main part with multiples of 4.\n  int row_m = NUM_ROW_A & (int)(~(span - 1));\n  for (int row = 0; row < row_m; row += span) {\n    MVM_mat4x1(NUM_COL_A, &A[row * NUM_COL_A], NUM_COL_A,\n               &b[0], &c[row], kOperation);\n  }\n\n#endif  // CERES_NO_CUSTOM_BLAS\n}\n\n// Similar to MatrixVectorMultiply, except that A is transposed, i.e.,\n//\n// c op A' * b;\ntemplate<int kRowA, int kColA, int kOperation>\ninline void MatrixTransposeVectorMultiply(const double* A,\n                                          const int num_row_a,\n                                          const int num_col_a,\n                                          const double* b,\n                                          double* c) {\n#ifdef CERES_NO_CUSTOM_BLAS\n  const typename EigenTypes<kRowA, kColA>::ConstMatrixRef\n      Aref(A, num_row_a, num_col_a);\n  const typename EigenTypes<kRowA>::ConstVectorRef bref(b, num_row_a);\n  typename EigenTypes<kColA>::VectorRef cref(c, num_col_a);\n\n  // lazyProduct works better than .noalias() for matrix-vector\n  // products.\n  if (kOperation > 0) {\n    cref += Aref.transpose().lazyProduct(bref);\n  } else if (kOperation < 0) {\n    cref -= Aref.transpose().lazyProduct(bref);\n  } else {\n    cref = Aref.transpose().lazyProduct(bref);\n  }\n#else\n\n  DCHECK_GT(num_row_a, 0);\n  DCHECK_GT(num_col_a, 0);\n  DCHECK((kRowA == Eigen::Dynamic) || (kRowA == num_row_a));\n  DCHECK((kColA == Eigen::Dynamic) || (kColA == num_col_a));\n\n  const int NUM_ROW_A = (kRowA != Eigen::Dynamic ? kRowA : num_row_a);\n  const int NUM_COL_A = (kColA != Eigen::Dynamic ? kColA : num_col_a);\n  const int span = 4;\n\n  // Calculate the remainder part first.\n\n  // Process the last odd column if present.\n  if (NUM_COL_A & 1) {\n    int row  = NUM_COL_A - 1;\n    const double* pa = &A[row];\n    const double* pb = &b[0];\n    double tmp = 0.0;\n    for (int col = 0; col < NUM_ROW_A; ++col) {\n      tmp += *pa * (*pb++);\n      pa += NUM_COL_A;\n    }\n    CERES_GEMM_STORE_SINGLE(c, row, tmp);\n\n    // Return directly for efficiency of extremely small matrix multiply.\n    if (NUM_COL_A == 1) {\n      return;\n    }\n  }\n\n  // Process the couple columns in remainder if present.\n  if (NUM_COL_A & 2) {\n    int row = NUM_COL_A & (int)(~(span - 1));\n    const double* pa = &A[row];\n    const double* pb = &b[0];\n    double tmp1 = 0.0, tmp2 = 0.0;\n    for (int col = 0; col < NUM_ROW_A; ++col) {\n      double bv = *pb++;\n      tmp1 += *(pa    ) * bv;\n      tmp2 += *(pa + 1) * bv;\n      pa += NUM_COL_A;\n    }\n    CERES_GEMM_STORE_PAIR(c, row, tmp1, tmp2);\n\n    // Return directly for efficiency of extremely small matrix multiply.\n    if (NUM_COL_A < span) {\n      return;\n    }\n  }\n\n  // Calculate the main part with multiples of 4.\n  int row_m = NUM_COL_A & (int)(~(span - 1));\n  for (int row = 0; row < row_m; row += span) {\n    MTV_mat4x1(NUM_ROW_A, &A[row], NUM_COL_A,\n               &b[0], &c[row], kOperation);\n  }\n\n#endif  // CERES_NO_CUSTOM_BLAS\n}\n\n#undef CERES_GEMM_BEGIN\n#undef CERES_GEMM_EIGEN_HEADER\n#undef CERES_GEMM_NAIVE_HEADER\n#undef CERES_CALL_GEMM\n#undef CERES_GEMM_STORE_SINGLE\n#undef CERES_GEMM_STORE_PAIR\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_SMALL_BLAS_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/small_blas_gemm_benchmark.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Authors: sameeragarwal@google.com (Sameer Agarwal)\n\n#include <iostream>\n#include \"Eigen/Dense\"\n#include \"benchmark/benchmark.h\"\n#include \"ceres/small_blas.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// Benchmarking matrix-matrix multiply routines and optimizing memory\n// access requires that we make sure that they are not just sitting in\n// the cache. So, as the benchmarking routine iterates, we need to\n// multiply new/different matrice. Allocating/creating these objects\n// in the benchmarking loop is too heavy duty, so we create them\n// before hand and cycle through them in the benchmark. This class,\n// given the size of the matrices creates such objects for use in the\n// benchmark.\nclass MatrixMatrixMultiplyData {\n public:\n  MatrixMatrixMultiplyData(\n      int a_rows, int a_cols, int b_rows, int b_cols, int c_rows, int c_cols)\n      : num_elements_(1000),\n        a_size_(a_rows * a_cols),\n        b_size_(b_rows * b_cols),\n        c_size_(c_rows * c_cols),\n        a_(num_elements_ * a_size_, 1.00001),\n        b_(num_elements_ * b_size_, 0.5),\n        c_(num_elements_ * c_size_, -1.1) {}\n\n  int num_elements() const { return num_elements_; }\n  double* GetA(int i) { return &a_[i * a_size_]; }\n  double* GetB(int i) { return &b_[i * b_size_]; }\n  double* GetC(int i) { return &c_[i * c_size_]; }\n\n private:\n  int num_elements_;\n  int a_size_;\n  int b_size_;\n  int c_size_;\n  std::vector<double> a_;\n  std::vector<double> b_;\n  std::vector<double> c_;\n};\n\nstatic void MatrixMatrixMultiplySizeArguments(\n    benchmark::internal::Benchmark* benchmark) {\n  const std::vector<int> b_rows = {1, 2, 3, 4, 6, 8};\n  const std::vector<int> b_cols = {1, 2, 3, 4, 8, 12, 15};\n  const std::vector<int> c_cols = b_cols;\n  for (int i : b_rows) {\n    for (int j : b_cols) {\n      for (int k : c_cols) {\n        benchmark->Args({i, j, k});\n      }\n    }\n  }\n}\n\nvoid BM_MatrixMatrixMultiplyDynamic(benchmark::State& state) {\n  const int i = state.range(0);\n  const int j = state.range(1);\n  const int k = state.range(2);\n\n  const int b_rows = i;\n  const int b_cols = j;\n  const int c_rows = b_cols;\n  const int c_cols = k;\n  const int a_rows = b_rows;\n  const int a_cols = c_cols;\n\n  MatrixMatrixMultiplyData data(a_rows, a_cols, b_rows, b_cols, c_rows, c_cols);\n  const int num_elements = data.num_elements();\n\n  int iter = 0;\n  for (auto _ : state) {\n    // a += b * c\n    MatrixMatrixMultiply\n        <Eigen::Dynamic, Eigen::Dynamic,Eigen::Dynamic,Eigen::Dynamic, 1>\n        (data.GetB(iter), b_rows, b_cols,\n         data.GetC(iter), c_rows, c_cols,\n         data.GetA(iter), 0, 0, a_rows, a_cols);\n    iter = (iter + 1) % num_elements;\n  }\n}\n\nBENCHMARK(BM_MatrixMatrixMultiplyDynamic)\n    ->Apply(MatrixMatrixMultiplySizeArguments);\n\nstatic void MatrixTransposeMatrixMultiplySizeArguments(\n    benchmark::internal::Benchmark* benchmark) {\n  std::vector<int> b_rows = {1, 2, 3, 4, 6, 8};\n  std::vector<int> b_cols = {1, 2, 3, 4, 8, 12, 15};\n  std::vector<int> c_cols = b_rows;\n  for (int i : b_rows) {\n    for (int j : b_cols) {\n      for (int k : c_cols) {\n        benchmark->Args({i, j, k});\n      }\n    }\n  }\n}\n\nvoid BM_MatrixTransposeMatrixMultiplyDynamic(benchmark::State& state) {\n  const int i = state.range(0);\n  const int j = state.range(1);\n  const int k = state.range(2);\n\n  const int b_rows = i;\n  const int b_cols = j;\n  const int c_rows = b_rows;\n  const int c_cols = k;\n  const int a_rows = b_cols;\n  const int a_cols = c_cols;\n\n  MatrixMatrixMultiplyData data(a_rows, a_cols, b_rows, b_cols, c_rows, c_cols);\n  const int num_elements = data.num_elements();\n\n  int iter = 0;\n  for (auto _ : state) {\n    // a += b' * c\n    MatrixTransposeMatrixMultiply\n        <Eigen::Dynamic,Eigen::Dynamic,Eigen::Dynamic,Eigen::Dynamic, 1>\n        (data.GetB(iter), b_rows, b_cols,\n         data.GetC(iter), c_rows, c_cols,\n         data.GetA(iter), 0, 0, a_rows, a_cols);\n    iter = (iter + 1) % num_elements;\n  }\n}\n\nBENCHMARK(BM_MatrixTransposeMatrixMultiplyDynamic)\n    ->Apply(MatrixTransposeMatrixMultiplySizeArguments);\n\n}  // internal\n}  // namespace ceres\n\nBENCHMARK_MAIN();\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/small_blas_gemv_benchmark.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Authors: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"Eigen/Dense\"\n#include \"benchmark/benchmark.h\"\n#include \"ceres/small_blas.h\"\n\nnamespace ceres {\n\n// Benchmarking matrix-vector multiply routines and optimizing memory\n// access requires that we make sure that they are not just sitting in\n// the cache. So, as the benchmarking routine iterates, we need to\n// multiply new/different matrice and vectors. Allocating/creating\n// these objects in the benchmarking loop is too heavy duty, so we\n// create them before hand and cycle through them in the\n// benchmark. This class, given the size of the matrix creates such\n// matrix and vector objects for use in the benchmark.\nclass MatrixVectorMultiplyData {\n public:\n  MatrixVectorMultiplyData(int rows, int cols)\n      : num_elements_(1000),\n        rows_(rows),\n        cols_(cols),\n        a_(num_elements_ * rows, 1.001),\n        b_(num_elements_ * rows * cols, 1.5),\n        c_(num_elements_ * cols, 1.00003) {}\n\n  int num_elements() const { return num_elements_; }\n  double* GetA(int i) { return &a_[i * rows_]; }\n  double* GetB(int i) { return &b_[i * rows_ * cols_]; }\n  double* GetC(int i) { return &c_[i * cols_]; }\n\n private:\n  const int num_elements_;\n  const int rows_;\n  const int cols_;\n  std::vector<double> a_;\n  std::vector<double> b_;\n  std::vector<double> c_;\n};\n\n// Helper function to generate the various matrix sizes for which we\n// run the benchmark.\nstatic void MatrixSizeArguments(benchmark::internal::Benchmark* benchmark) {\n  std::vector<int> rows = {1, 2, 3, 4, 6, 8};\n  std::vector<int> cols = {1, 2, 3, 4, 8, 12, 15};\n  for (int r : rows) {\n    for (int c : cols) {\n      benchmark->Args({r, c});\n    }\n  }\n}\n\nvoid BM_MatrixVectorMultiply(benchmark::State& state) {\n  const int rows = state.range(0);\n  const int cols = state.range(1);\n  MatrixVectorMultiplyData data(rows, cols);\n  const int num_elements = data.num_elements();\n  int iter = 0;\n  for (auto _ : state) {\n    // A += B * C;\n    internal::MatrixVectorMultiply<Eigen::Dynamic, Eigen::Dynamic, 1>(\n        data.GetB(iter), rows, cols, data.GetC(iter), data.GetA(iter));\n    iter = (iter + 1) % num_elements;\n  }\n}\n\nBENCHMARK(BM_MatrixVectorMultiply)->Apply(MatrixSizeArguments);\n\nvoid BM_MatrixTransposeVectorMultiply(benchmark::State& state) {\n  const int rows = state.range(0);\n  const int cols = state.range(1);\n  MatrixVectorMultiplyData data(cols, rows);\n  const int num_elements = data.num_elements();\n  int iter = 0;\n  for (auto _ : state) {\n    internal::MatrixTransposeVectorMultiply<Eigen::Dynamic, Eigen::Dynamic, 1>(\n        data.GetB(iter), rows, cols, data.GetC(iter), data.GetA(iter));\n    iter = (iter + 1) % num_elements;\n  }\n}\n\nBENCHMARK(BM_MatrixTransposeVectorMultiply)->Apply(MatrixSizeArguments);\n\n}  // namespace ceres\n\nBENCHMARK_MAIN();\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/small_blas_generic.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: yangfan34@lenovo.com (Lenovo Research Device+ Lab - Shanghai)\n//\n// Optimization for simple blas functions used in the Schur Eliminator.\n// These are fairly basic implementations which already yield a significant\n// speedup in the eliminator performance.\n\n#ifndef CERES_INTERNAL_SMALL_BLAS_GENERIC_H_\n#define CERES_INTERNAL_SMALL_BLAS_GENERIC_H_\n\nnamespace ceres {\nnamespace internal {\n\n// The following macros are used to share code\n#define CERES_GEMM_OPT_NAIVE_HEADER              \\\n  double c0 = 0.0;                               \\\n  double c1 = 0.0;                               \\\n  double c2 = 0.0;                               \\\n  double c3 = 0.0;                               \\\n  const double* pa = a;                          \\\n  const double* pb = b;                          \\\n  const int span = 4;                            \\\n  int col_r = col_a & (span - 1);                \\\n  int col_m = col_a - col_r;\n\n#define CERES_GEMM_OPT_STORE_MAT1X4              \\\n  if (kOperation > 0) {                          \\\n    *c++ += c0;                                  \\\n    *c++ += c1;                                  \\\n    *c++ += c2;                                  \\\n    *c++ += c3;                                  \\\n  } else if (kOperation < 0) {                   \\\n    *c++ -= c0;                                  \\\n    *c++ -= c1;                                  \\\n    *c++ -= c2;                                  \\\n    *c++ -= c3;                                  \\\n  } else {                                       \\\n    *c++ = c0;                                   \\\n    *c++ = c1;                                   \\\n    *c++ = c2;                                   \\\n    *c++ = c3;                                   \\\n  }\n\n// Matrix-Matrix Multiplication\n// Figure out 1x4 of Matrix C in one batch\n//\n// c op a * B;\n// where op can be +=, -=, or =, indicated by kOperation.\n//\n//  Matrix C              Matrix A                   Matrix B\n//\n//  C0, C1, C2, C3   op   A0, A1, A2, A3, ...    *   B0, B1, B2, B3\n//                                                   B4, B5, B6, B7\n//                                                   B8, B9, Ba, Bb\n//                                                   Bc, Bd, Be, Bf\n//                                                   . , . , . , .\n//                                                   . , . , . , .\n//                                                   . , . , . , .\n//\n// unroll for loops\n// utilize the data resided in cache\n// NOTE: col_a means the columns of A\nstatic inline void MMM_mat1x4(const int col_a,\n                              const double* a,\n                              const double* b,\n                              const int col_stride_b,\n                              double* c,\n                              const int kOperation) {\n  CERES_GEMM_OPT_NAIVE_HEADER\n  double av = 0.0;\n  int bi = 0;\n\n#define CERES_GEMM_OPT_MMM_MAT1X4_MUL  \\\n  av = pa[k];                          \\\n  pb = b + bi;                         \\\n  c0 += av * *pb++;                    \\\n  c1 += av * *pb++;                    \\\n  c2 += av * *pb++;                    \\\n  c3 += av * *pb++;                    \\\n  bi += col_stride_b;                  \\\n  k++;\n\n  for (int k = 0; k < col_m;) {\n    CERES_GEMM_OPT_MMM_MAT1X4_MUL\n    CERES_GEMM_OPT_MMM_MAT1X4_MUL\n    CERES_GEMM_OPT_MMM_MAT1X4_MUL\n    CERES_GEMM_OPT_MMM_MAT1X4_MUL\n  }\n\n  for (int k = col_m; k < col_a;) {\n    CERES_GEMM_OPT_MMM_MAT1X4_MUL\n  }\n\n  CERES_GEMM_OPT_STORE_MAT1X4\n\n#undef CERES_GEMM_OPT_MMM_MAT1X4_MUL\n}\n\n// Matrix Transpose-Matrix multiplication\n// Figure out 1x4 of Matrix C in one batch\n//\n// c op a' * B;\n// where op can be +=, -=, or = indicated by kOperation.\n//\n//                        Matrix A\n//\n//                        A0\n//                        A1\n//                        A2\n//                        A3\n//                        .\n//                        .\n//                        .\n//\n//  Matrix C              Matrix A'                  Matrix B\n//\n//  C0, C1, C2, C3   op   A0, A1, A2, A3, ...    *   B0, B1, B2, B3\n//                                                   B4, B5, B6, B7\n//                                                   B8, B9, Ba, Bb\n//                                                   Bc, Bd, Be, Bf\n//                                                   . , . , . , .\n//                                                   . , . , . , .\n//                                                   . , . , . , .\n//\n// unroll for loops\n// utilize the data resided in cache\n// NOTE: col_a means the columns of A'\nstatic inline void MTM_mat1x4(const int col_a,\n                              const double* a,\n                              const int col_stride_a,\n                              const double* b,\n                              const int col_stride_b,\n                              double* c,\n                              const int kOperation) {\n  CERES_GEMM_OPT_NAIVE_HEADER\n  double av = 0.0;\n  int ai = 0;\n  int bi = 0;\n\n#define CERES_GEMM_OPT_MTM_MAT1X4_MUL  \\\n  av = pa[ai];                         \\\n  pb = b + bi;                         \\\n  c0 += av * *pb++;                    \\\n  c1 += av * *pb++;                    \\\n  c2 += av * *pb++;                    \\\n  c3 += av * *pb++;                    \\\n  ai += col_stride_a;                  \\\n  bi += col_stride_b;\n\n  for (int k = 0; k < col_m; k += span) {\n    CERES_GEMM_OPT_MTM_MAT1X4_MUL\n    CERES_GEMM_OPT_MTM_MAT1X4_MUL\n    CERES_GEMM_OPT_MTM_MAT1X4_MUL\n    CERES_GEMM_OPT_MTM_MAT1X4_MUL\n  }\n\n  for (int k = col_m; k < col_a; k++) {\n    CERES_GEMM_OPT_MTM_MAT1X4_MUL\n  }\n\n  CERES_GEMM_OPT_STORE_MAT1X4\n\n#undef CERES_GEMM_OPT_MTM_MAT1X4_MUL\n}\n\n// Matrix-Vector Multiplication\n// Figure out 4x1 of vector c in one batch\n//\n// c op A * b;\n// where op can be +=, -=, or =, indicated by kOperation.\n//\n//  Vector c              Matrix A                   Vector b\n//\n//  C0               op   A0, A1, A2, A3, ...    *   B0\n//  C1                    A4, A5, A6, A7, ...        B1\n//  C2                    A8, A9, Aa, Ab, ...        B2\n//  C3                    Ac, Ad, Ae, Af, ...        B3\n//                                                   .\n//                                                   .\n//                                                   .\n//\n// unroll for loops\n// utilize the data resided in cache\n// NOTE: col_a means the columns of A\nstatic inline void MVM_mat4x1(const int col_a,\n                              const double* a,\n                              const int col_stride_a,\n                              const double* b,\n                              double* c,\n                              const int kOperation) {\n  CERES_GEMM_OPT_NAIVE_HEADER\n  double bv = 0.0;\n\n#define CERES_GEMM_OPT_MVM_MAT4X1_MUL              \\\n  bv = *pb;                                        \\\n  c0 += *(pa                   ) * bv;             \\\n  c1 += *(pa + col_stride_a    ) * bv;             \\\n  c2 += *(pa + col_stride_a * 2) * bv;             \\\n  c3 += *(pa + col_stride_a * 3) * bv;             \\\n  pa++;                                            \\\n  pb++;\n\n  for (int k = 0; k < col_m; k += span) {\n    CERES_GEMM_OPT_MVM_MAT4X1_MUL\n    CERES_GEMM_OPT_MVM_MAT4X1_MUL\n    CERES_GEMM_OPT_MVM_MAT4X1_MUL\n    CERES_GEMM_OPT_MVM_MAT4X1_MUL\n  }\n\n  for (int k = col_m; k < col_a; k++) {\n    CERES_GEMM_OPT_MVM_MAT4X1_MUL\n  }\n\n  CERES_GEMM_OPT_STORE_MAT1X4\n\n#undef CERES_GEMM_OPT_MVM_MAT4X1_MUL\n}\n\n// Matrix Transpose-Vector multiplication\n// Figure out 4x1 of vector c in one batch\n//\n// c op A' * b;\n// where op can be +=, -=, or =, indicated by kOperation.\n//\n//                        Matrix A\n//\n//                        A0, A4, A8, Ac\n//                        A1, A5, A9, Ad\n//                        A2, A6, Aa, Ae\n//                        A3, A7, Ab, Af\n//                        . , . , . , .\n//                        . , . , . , .\n//                        . , . , . , .\n//\n//  Vector c              Matrix A'                  Vector b\n//\n//  C0               op   A0, A1, A2, A3, ...    *   B0\n//  C1                    A4, A5, A6, A7, ...        B1\n//  C2                    A8, A9, Aa, Ab, ...        B2\n//  C3                    Ac, Ad, Ae, Af, ...        B3\n//                                                   .\n//                                                   .\n//                                                   .\n//\n// unroll for loops\n// utilize the data resided in cache\n// NOTE: col_a means the columns of A'\nstatic inline void MTV_mat4x1(const int col_a,\n                              const double* a,\n                              const int col_stride_a,\n                              const double* b,\n                              double* c,\n                              const int kOperation) {\n  CERES_GEMM_OPT_NAIVE_HEADER\n  double bv = 0.0;\n\n#define CERES_GEMM_OPT_MTV_MAT4X1_MUL  \\\n  bv = *pb;                            \\\n  c0 += *(pa    ) * bv;                \\\n  c1 += *(pa + 1) * bv;                \\\n  c2 += *(pa + 2) * bv;                \\\n  c3 += *(pa + 3) * bv;                \\\n  pa += col_stride_a;                  \\\n  pb++;\n\n  for (int k = 0; k < col_m; k += span) {\n    CERES_GEMM_OPT_MTV_MAT4X1_MUL\n    CERES_GEMM_OPT_MTV_MAT4X1_MUL\n    CERES_GEMM_OPT_MTV_MAT4X1_MUL\n    CERES_GEMM_OPT_MTV_MAT4X1_MUL\n  }\n\n  for (int k = col_m; k < col_a; k++) {\n    CERES_GEMM_OPT_MTV_MAT4X1_MUL\n  }\n\n  CERES_GEMM_OPT_STORE_MAT1X4\n\n#undef CERES_GEMM_OPT_MTV_MAT4X1_MUL\n}\n\n#undef CERES_GEMM_OPT_NAIVE_HEADER\n#undef CERES_GEMM_OPT_STORE_MAT1X4\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_SMALL_BLAS_GENERIC_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/small_blas_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n\n#include \"ceres/small_blas.h\"\n\n#include <limits>\n#include \"gtest/gtest.h\"\n#include \"ceres/internal/eigen.h\"\n\nnamespace ceres {\nnamespace internal {\n\nconst double kTolerance = 3.0 * std::numeric_limits<double>::epsilon();\n\nTEST(BLAS, MatrixMatrixMultiply) {\n  const int kRowA = 3;\n  const int kColA = 5;\n  Matrix A(kRowA, kColA);\n  A.setOnes();\n\n  const int kRowB = 5;\n  const int kColB = 7;\n  Matrix B(kRowB, kColB);\n  B.setOnes();\n\n  for (int row_stride_c = kRowA; row_stride_c < 3 * kRowA; ++row_stride_c) {\n    for (int col_stride_c = kColB; col_stride_c < 3 * kColB; ++col_stride_c) {\n      Matrix C(row_stride_c, col_stride_c);\n      C.setOnes();\n\n      Matrix C_plus = C;\n      Matrix C_minus = C;\n      Matrix C_assign = C;\n\n      Matrix C_plus_ref = C;\n      Matrix C_minus_ref = C;\n      Matrix C_assign_ref = C;\n      for (int start_row_c = 0; start_row_c + kRowA < row_stride_c; ++start_row_c) {\n        for (int start_col_c = 0; start_col_c + kColB < col_stride_c; ++start_col_c) {\n          C_plus_ref.block(start_row_c, start_col_c, kRowA, kColB) +=\n              A * B;\n\n          MatrixMatrixMultiply<kRowA, kColA, kRowB, kColB, 1>(\n              A.data(), kRowA, kColA,\n              B.data(), kRowB, kColB,\n              C_plus.data(), start_row_c, start_col_c, row_stride_c, col_stride_c);\n\n          EXPECT_NEAR((C_plus_ref - C_plus).norm(), 0.0, kTolerance)\n              << \"C += A * B \\n\"\n              << \"row_stride_c : \" << row_stride_c << \"\\n\"\n              << \"col_stride_c : \" << col_stride_c << \"\\n\"\n              << \"start_row_c  : \" << start_row_c << \"\\n\"\n              << \"start_col_c  : \" << start_col_c << \"\\n\"\n              << \"Cref : \\n\" << C_plus_ref << \"\\n\"\n              << \"C: \\n\" << C_plus;\n\n\n          C_minus_ref.block(start_row_c, start_col_c, kRowA, kColB) -=\n              A * B;\n\n          MatrixMatrixMultiply<kRowA, kColA, kRowB, kColB, -1>(\n              A.data(), kRowA, kColA,\n              B.data(), kRowB, kColB,\n              C_minus.data(), start_row_c, start_col_c, row_stride_c, col_stride_c);\n\n           EXPECT_NEAR((C_minus_ref - C_minus).norm(), 0.0, kTolerance)\n              << \"C -= A * B \\n\"\n              << \"row_stride_c : \" << row_stride_c << \"\\n\"\n              << \"col_stride_c : \" << col_stride_c << \"\\n\"\n              << \"start_row_c  : \" << start_row_c << \"\\n\"\n              << \"start_col_c  : \" << start_col_c << \"\\n\"\n              << \"Cref : \\n\" << C_minus_ref << \"\\n\"\n              << \"C: \\n\" << C_minus;\n\n          C_assign_ref.block(start_row_c, start_col_c, kRowA, kColB) =\n              A * B;\n\n          MatrixMatrixMultiply<kRowA, kColA, kRowB, kColB, 0>(\n              A.data(), kRowA, kColA,\n              B.data(), kRowB, kColB,\n              C_assign.data(), start_row_c, start_col_c, row_stride_c, col_stride_c);\n\n          EXPECT_NEAR((C_assign_ref - C_assign).norm(), 0.0, kTolerance)\n              << \"C = A * B \\n\"\n              << \"row_stride_c : \" << row_stride_c << \"\\n\"\n              << \"col_stride_c : \" << col_stride_c << \"\\n\"\n              << \"start_row_c  : \" << start_row_c << \"\\n\"\n              << \"start_col_c  : \" << start_col_c << \"\\n\"\n              << \"Cref : \\n\" << C_assign_ref << \"\\n\"\n              << \"C: \\n\" << C_assign;\n        }\n      }\n    }\n  }\n}\n\nTEST(BLAS, MatrixTransposeMatrixMultiply) {\n  const int kRowA = 5;\n  const int kColA = 3;\n  Matrix A(kRowA, kColA);\n  A.setOnes();\n\n  const int kRowB = 5;\n  const int kColB = 7;\n  Matrix B(kRowB, kColB);\n  B.setOnes();\n\n  for (int row_stride_c = kColA; row_stride_c < 3 * kColA; ++row_stride_c) {\n    for (int col_stride_c = kColB; col_stride_c <  3 * kColB; ++col_stride_c) {\n      Matrix C(row_stride_c, col_stride_c);\n      C.setOnes();\n\n      Matrix C_plus = C;\n      Matrix C_minus = C;\n      Matrix C_assign = C;\n\n      Matrix C_plus_ref = C;\n      Matrix C_minus_ref = C;\n      Matrix C_assign_ref = C;\n      for (int start_row_c = 0; start_row_c + kColA < row_stride_c; ++start_row_c) {\n        for (int start_col_c = 0; start_col_c + kColB < col_stride_c; ++start_col_c) {\n          C_plus_ref.block(start_row_c, start_col_c, kColA, kColB) +=\n              A.transpose() * B;\n\n          MatrixTransposeMatrixMultiply<kRowA, kColA, kRowB, kColB, 1>(\n              A.data(), kRowA, kColA,\n              B.data(), kRowB, kColB,\n              C_plus.data(), start_row_c, start_col_c, row_stride_c, col_stride_c);\n\n          EXPECT_NEAR((C_plus_ref - C_plus).norm(), 0.0, kTolerance)\n              << \"C += A' * B \\n\"\n              << \"row_stride_c : \" << row_stride_c << \"\\n\"\n              << \"col_stride_c : \" << col_stride_c << \"\\n\"\n              << \"start_row_c  : \" << start_row_c << \"\\n\"\n              << \"start_col_c  : \" << start_col_c << \"\\n\"\n              << \"Cref : \\n\" << C_plus_ref << \"\\n\"\n              << \"C: \\n\" << C_plus;\n\n          C_minus_ref.block(start_row_c, start_col_c, kColA, kColB) -=\n              A.transpose() * B;\n\n          MatrixTransposeMatrixMultiply<kRowA, kColA, kRowB, kColB, -1>(\n              A.data(), kRowA, kColA,\n              B.data(), kRowB, kColB,\n              C_minus.data(), start_row_c, start_col_c, row_stride_c, col_stride_c);\n\n          EXPECT_NEAR((C_minus_ref - C_minus).norm(), 0.0, kTolerance)\n              << \"C -= A' * B \\n\"\n              << \"row_stride_c : \" << row_stride_c << \"\\n\"\n              << \"col_stride_c : \" << col_stride_c << \"\\n\"\n              << \"start_row_c  : \" << start_row_c << \"\\n\"\n              << \"start_col_c  : \" << start_col_c << \"\\n\"\n              << \"Cref : \\n\" << C_minus_ref << \"\\n\"\n              << \"C: \\n\" << C_minus;\n\n          C_assign_ref.block(start_row_c, start_col_c, kColA, kColB) =\n              A.transpose() * B;\n\n          MatrixTransposeMatrixMultiply<kRowA, kColA, kRowB, kColB, 0>(\n              A.data(), kRowA, kColA,\n              B.data(), kRowB, kColB,\n              C_assign.data(), start_row_c, start_col_c, row_stride_c, col_stride_c);\n\n          EXPECT_NEAR((C_assign_ref - C_assign).norm(), 0.0, kTolerance)\n              << \"C = A' * B \\n\"\n              << \"row_stride_c : \" << row_stride_c << \"\\n\"\n              << \"col_stride_c : \" << col_stride_c << \"\\n\"\n              << \"start_row_c  : \" << start_row_c << \"\\n\"\n              << \"start_col_c  : \" << start_col_c << \"\\n\"\n              << \"Cref : \\n\" << C_assign_ref << \"\\n\"\n              << \"C: \\n\" << C_assign;\n        }\n      }\n    }\n  }\n}\n\n// TODO(sameeragarwal): Dedup and reduce the amount of duplication of\n// test code in this file.\n\nTEST(BLAS, MatrixMatrixMultiplyNaive) {\n  const int kRowA = 3;\n  const int kColA = 5;\n  Matrix A(kRowA, kColA);\n  A.setOnes();\n\n  const int kRowB = 5;\n  const int kColB = 7;\n  Matrix B(kRowB, kColB);\n  B.setOnes();\n\n  for (int row_stride_c = kRowA; row_stride_c < 3 * kRowA; ++row_stride_c) {\n    for (int col_stride_c = kColB; col_stride_c < 3 * kColB; ++col_stride_c) {\n      Matrix C(row_stride_c, col_stride_c);\n      C.setOnes();\n\n      Matrix C_plus = C;\n      Matrix C_minus = C;\n      Matrix C_assign = C;\n\n      Matrix C_plus_ref = C;\n      Matrix C_minus_ref = C;\n      Matrix C_assign_ref = C;\n      for (int start_row_c = 0; start_row_c + kRowA < row_stride_c; ++start_row_c) {\n        for (int start_col_c = 0; start_col_c + kColB < col_stride_c; ++start_col_c) {\n          C_plus_ref.block(start_row_c, start_col_c, kRowA, kColB) +=\n              A * B;\n\n          MatrixMatrixMultiplyNaive<kRowA, kColA, kRowB, kColB, 1>(\n              A.data(), kRowA, kColA,\n              B.data(), kRowB, kColB,\n              C_plus.data(), start_row_c, start_col_c, row_stride_c, col_stride_c);\n\n          EXPECT_NEAR((C_plus_ref - C_plus).norm(), 0.0, kTolerance)\n              << \"C += A * B \\n\"\n              << \"row_stride_c : \" << row_stride_c << \"\\n\"\n              << \"col_stride_c : \" << col_stride_c << \"\\n\"\n              << \"start_row_c  : \" << start_row_c << \"\\n\"\n              << \"start_col_c  : \" << start_col_c << \"\\n\"\n              << \"Cref : \\n\" << C_plus_ref << \"\\n\"\n              << \"C: \\n\" << C_plus;\n\n\n          C_minus_ref.block(start_row_c, start_col_c, kRowA, kColB) -=\n              A * B;\n\n          MatrixMatrixMultiplyNaive<kRowA, kColA, kRowB, kColB, -1>(\n              A.data(), kRowA, kColA,\n              B.data(), kRowB, kColB,\n              C_minus.data(), start_row_c, start_col_c, row_stride_c, col_stride_c);\n\n           EXPECT_NEAR((C_minus_ref - C_minus).norm(), 0.0, kTolerance)\n              << \"C -= A * B \\n\"\n              << \"row_stride_c : \" << row_stride_c << \"\\n\"\n              << \"col_stride_c : \" << col_stride_c << \"\\n\"\n              << \"start_row_c  : \" << start_row_c << \"\\n\"\n              << \"start_col_c  : \" << start_col_c << \"\\n\"\n              << \"Cref : \\n\" << C_minus_ref << \"\\n\"\n              << \"C: \\n\" << C_minus;\n\n          C_assign_ref.block(start_row_c, start_col_c, kRowA, kColB) =\n              A * B;\n\n          MatrixMatrixMultiplyNaive<kRowA, kColA, kRowB, kColB, 0>(\n              A.data(), kRowA, kColA,\n              B.data(), kRowB, kColB,\n              C_assign.data(), start_row_c, start_col_c, row_stride_c, col_stride_c);\n\n          EXPECT_NEAR((C_assign_ref - C_assign).norm(), 0.0, kTolerance)\n              << \"C = A * B \\n\"\n              << \"row_stride_c : \" << row_stride_c << \"\\n\"\n              << \"col_stride_c : \" << col_stride_c << \"\\n\"\n              << \"start_row_c  : \" << start_row_c << \"\\n\"\n              << \"start_col_c  : \" << start_col_c << \"\\n\"\n              << \"Cref : \\n\" << C_assign_ref << \"\\n\"\n              << \"C: \\n\" << C_assign;\n        }\n      }\n    }\n  }\n}\n\nTEST(BLAS, MatrixTransposeMatrixMultiplyNaive) {\n  const int kRowA = 5;\n  const int kColA = 3;\n  Matrix A(kRowA, kColA);\n  A.setOnes();\n\n  const int kRowB = 5;\n  const int kColB = 7;\n  Matrix B(kRowB, kColB);\n  B.setOnes();\n\n  for (int row_stride_c = kColA; row_stride_c < 3 * kColA; ++row_stride_c) {\n    for (int col_stride_c = kColB; col_stride_c <  3 * kColB; ++col_stride_c) {\n      Matrix C(row_stride_c, col_stride_c);\n      C.setOnes();\n\n      Matrix C_plus = C;\n      Matrix C_minus = C;\n      Matrix C_assign = C;\n\n      Matrix C_plus_ref = C;\n      Matrix C_minus_ref = C;\n      Matrix C_assign_ref = C;\n      for (int start_row_c = 0; start_row_c + kColA < row_stride_c; ++start_row_c) {\n        for (int start_col_c = 0; start_col_c + kColB < col_stride_c; ++start_col_c) {\n          C_plus_ref.block(start_row_c, start_col_c, kColA, kColB) +=\n              A.transpose() * B;\n\n          MatrixTransposeMatrixMultiplyNaive<kRowA, kColA, kRowB, kColB, 1>(\n              A.data(), kRowA, kColA,\n              B.data(), kRowB, kColB,\n              C_plus.data(), start_row_c, start_col_c, row_stride_c, col_stride_c);\n\n          EXPECT_NEAR((C_plus_ref - C_plus).norm(), 0.0, kTolerance)\n              << \"C += A' * B \\n\"\n              << \"row_stride_c : \" << row_stride_c << \"\\n\"\n              << \"col_stride_c : \" << col_stride_c << \"\\n\"\n              << \"start_row_c  : \" << start_row_c << \"\\n\"\n              << \"start_col_c  : \" << start_col_c << \"\\n\"\n              << \"Cref : \\n\" << C_plus_ref << \"\\n\"\n              << \"C: \\n\" << C_plus;\n\n          C_minus_ref.block(start_row_c, start_col_c, kColA, kColB) -=\n              A.transpose() * B;\n\n          MatrixTransposeMatrixMultiplyNaive<kRowA, kColA, kRowB, kColB, -1>(\n              A.data(), kRowA, kColA,\n              B.data(), kRowB, kColB,\n              C_minus.data(), start_row_c, start_col_c, row_stride_c, col_stride_c);\n\n          EXPECT_NEAR((C_minus_ref - C_minus).norm(), 0.0, kTolerance)\n              << \"C -= A' * B \\n\"\n              << \"row_stride_c : \" << row_stride_c << \"\\n\"\n              << \"col_stride_c : \" << col_stride_c << \"\\n\"\n              << \"start_row_c  : \" << start_row_c << \"\\n\"\n              << \"start_col_c  : \" << start_col_c << \"\\n\"\n              << \"Cref : \\n\" << C_minus_ref << \"\\n\"\n              << \"C: \\n\" << C_minus;\n\n          C_assign_ref.block(start_row_c, start_col_c, kColA, kColB) =\n              A.transpose() * B;\n\n          MatrixTransposeMatrixMultiplyNaive<kRowA, kColA, kRowB, kColB, 0>(\n              A.data(), kRowA, kColA,\n              B.data(), kRowB, kColB,\n              C_assign.data(), start_row_c, start_col_c, row_stride_c, col_stride_c);\n\n          EXPECT_NEAR((C_assign_ref - C_assign).norm(), 0.0, kTolerance)\n              << \"C = A' * B \\n\"\n              << \"row_stride_c : \" << row_stride_c << \"\\n\"\n              << \"col_stride_c : \" << col_stride_c << \"\\n\"\n              << \"start_row_c  : \" << start_row_c << \"\\n\"\n              << \"start_col_c  : \" << start_col_c << \"\\n\"\n              << \"Cref : \\n\" << C_assign_ref << \"\\n\"\n              << \"C: \\n\" << C_assign;\n        }\n      }\n    }\n  }\n}\n\nTEST(BLAS, MatrixVectorMultiply) {\n  for (int num_rows_a = 1; num_rows_a < 10; ++num_rows_a) {\n    for (int num_cols_a = 1; num_cols_a < 10; ++num_cols_a) {\n      Matrix A(num_rows_a, num_cols_a);\n      A.setOnes();\n\n      Vector b(num_cols_a);\n      b.setOnes();\n\n      Vector c(num_rows_a);\n      c.setOnes();\n\n      Vector c_plus = c;\n      Vector c_minus = c;\n      Vector c_assign = c;\n\n      Vector c_plus_ref = c;\n      Vector c_minus_ref = c;\n      Vector c_assign_ref = c;\n\n      c_plus_ref += A * b;\n      MatrixVectorMultiply<Eigen::Dynamic, Eigen::Dynamic, 1>(\n          A.data(), num_rows_a, num_cols_a,\n          b.data(),\n          c_plus.data());\n      EXPECT_NEAR((c_plus_ref - c_plus).norm(), 0.0, kTolerance)\n          << \"c += A * b \\n\"\n          << \"c_ref : \\n\" << c_plus_ref << \"\\n\"\n          << \"c: \\n\" << c_plus;\n\n      c_minus_ref -= A * b;\n      MatrixVectorMultiply<Eigen::Dynamic, Eigen::Dynamic, -1>(\n          A.data(), num_rows_a, num_cols_a,\n          b.data(),\n          c_minus.data());\n      EXPECT_NEAR((c_minus_ref - c_minus).norm(), 0.0, kTolerance)\n          << \"c += A * b \\n\"\n          << \"c_ref : \\n\" << c_minus_ref << \"\\n\"\n          << \"c: \\n\" << c_minus;\n\n      c_assign_ref = A * b;\n      MatrixVectorMultiply<Eigen::Dynamic, Eigen::Dynamic, 0>(\n          A.data(), num_rows_a, num_cols_a,\n          b.data(),\n          c_assign.data());\n      EXPECT_NEAR((c_assign_ref - c_assign).norm(), 0.0, kTolerance)\n          << \"c += A * b \\n\"\n          << \"c_ref : \\n\" << c_assign_ref << \"\\n\"\n          << \"c: \\n\" << c_assign;\n    }\n  }\n}\n\nTEST(BLAS, MatrixTransposeVectorMultiply) {\n  for (int num_rows_a = 1; num_rows_a < 10; ++num_rows_a) {\n    for (int num_cols_a = 1; num_cols_a < 10; ++num_cols_a) {\n      Matrix A(num_rows_a, num_cols_a);\n      A.setRandom();\n\n      Vector b(num_rows_a);\n      b.setRandom();\n\n      Vector c(num_cols_a);\n      c.setOnes();\n\n      Vector c_plus = c;\n      Vector c_minus = c;\n      Vector c_assign = c;\n\n      Vector c_plus_ref = c;\n      Vector c_minus_ref = c;\n      Vector c_assign_ref = c;\n\n      c_plus_ref += A.transpose() * b;\n      MatrixTransposeVectorMultiply<Eigen::Dynamic, Eigen::Dynamic, 1>(\n          A.data(), num_rows_a, num_cols_a,\n          b.data(),\n          c_plus.data());\n      EXPECT_NEAR((c_plus_ref - c_plus).norm(), 0.0, kTolerance)\n          << \"c += A' * b \\n\"\n          << \"c_ref : \\n\" << c_plus_ref << \"\\n\"\n          << \"c: \\n\" << c_plus;\n\n      c_minus_ref -= A.transpose() * b;\n      MatrixTransposeVectorMultiply<Eigen::Dynamic, Eigen::Dynamic, -1>(\n          A.data(), num_rows_a, num_cols_a,\n          b.data(),\n          c_minus.data());\n      EXPECT_NEAR((c_minus_ref - c_minus).norm(), 0.0, kTolerance)\n          << \"c += A' * b \\n\"\n          << \"c_ref : \\n\" << c_minus_ref << \"\\n\"\n          << \"c: \\n\" << c_minus;\n\n      c_assign_ref = A.transpose() * b;\n      MatrixTransposeVectorMultiply<Eigen::Dynamic, Eigen::Dynamic, 0>(\n          A.data(), num_rows_a, num_cols_a,\n          b.data(),\n          c_assign.data());\n      EXPECT_NEAR((c_assign_ref - c_assign).norm(), 0.0, kTolerance)\n          << \"c += A' * b \\n\"\n          << \"c_ref : \\n\" << c_assign_ref << \"\\n\"\n          << \"c: \\n\" << c_assign;\n    }\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/solver.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n//         sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/solver.h\"\n\n#include <algorithm>\n#include <memory>\n#include <sstream>  // NOLINT\n#include <vector>\n\n#include \"ceres/casts.h\"\n#include \"ceres/context.h\"\n#include \"ceres/context_impl.h\"\n#include \"ceres/detect_structure.h\"\n#include \"ceres/gradient_checking_cost_function.h\"\n#include \"ceres/internal/port.h\"\n#include \"ceres/parameter_block_ordering.h\"\n#include \"ceres/preprocessor.h\"\n#include \"ceres/problem.h\"\n#include \"ceres/problem_impl.h\"\n#include \"ceres/program.h\"\n#include \"ceres/schur_templates.h\"\n#include \"ceres/solver_utils.h\"\n#include \"ceres/stringprintf.h\"\n#include \"ceres/types.h\"\n#include \"ceres/wall_time.h\"\n\nnamespace ceres {\nnamespace {\n\nusing std::map;\nusing std::string;\nusing std::vector;\nusing internal::StringAppendF;\nusing internal::StringPrintf;\n\n#define OPTION_OP(x, y, OP)                                             \\\n  if (!(options.x OP y)) {                                              \\\n    std::stringstream ss;                                               \\\n    ss << \"Invalid configuration. \";                                    \\\n    ss << string(\"Solver::Options::\" #x \" = \") << options.x << \". \";    \\\n    ss << \"Violated constraint: \";                                      \\\n    ss << string(\"Solver::Options::\" #x \" \" #OP \" \"#y);                 \\\n    *error = ss.str();                                                  \\\n    return false;                                                       \\\n  }\n\n#define OPTION_OP_OPTION(x, y, OP)                                      \\\n  if (!(options.x OP options.y)) {                                      \\\n    std::stringstream ss;                                               \\\n    ss << \"Invalid configuration. \";                                    \\\n    ss << string(\"Solver::Options::\" #x \" = \") << options.x << \". \";    \\\n    ss << string(\"Solver::Options::\" #y \" = \") << options.y << \". \";    \\\n    ss << \"Violated constraint: \";                                      \\\n    ss << string(\"Solver::Options::\" #x);                               \\\n    ss << string(#OP \" Solver::Options::\" #y \".\");                      \\\n    *error = ss.str();                                                  \\\n    return false;                                                       \\\n  }\n\n#define OPTION_GE(x, y) OPTION_OP(x, y, >=);\n#define OPTION_GT(x, y) OPTION_OP(x, y, >);\n#define OPTION_LE(x, y) OPTION_OP(x, y, <=);\n#define OPTION_LT(x, y) OPTION_OP(x, y, <);\n#define OPTION_LE_OPTION(x, y) OPTION_OP_OPTION(x, y, <=)\n#define OPTION_LT_OPTION(x, y) OPTION_OP_OPTION(x, y, <)\n\nbool CommonOptionsAreValid(const Solver::Options& options, string* error) {\n  OPTION_GE(max_num_iterations, 0);\n  OPTION_GE(max_solver_time_in_seconds, 0.0);\n  OPTION_GE(function_tolerance, 0.0);\n  OPTION_GE(gradient_tolerance, 0.0);\n  OPTION_GE(parameter_tolerance, 0.0);\n  OPTION_GT(num_threads, 0);\n  if (options.check_gradients) {\n    OPTION_GT(gradient_check_relative_precision, 0.0);\n    OPTION_GT(gradient_check_numeric_derivative_relative_step_size, 0.0);\n  }\n  return true;\n}\n\nbool TrustRegionOptionsAreValid(const Solver::Options& options, string* error) {\n  OPTION_GT(initial_trust_region_radius, 0.0);\n  OPTION_GT(min_trust_region_radius, 0.0);\n  OPTION_GT(max_trust_region_radius, 0.0);\n  OPTION_LE_OPTION(min_trust_region_radius, max_trust_region_radius);\n  OPTION_LE_OPTION(min_trust_region_radius, initial_trust_region_radius);\n  OPTION_LE_OPTION(initial_trust_region_radius, max_trust_region_radius);\n  OPTION_GE(min_relative_decrease, 0.0);\n  OPTION_GE(min_lm_diagonal, 0.0);\n  OPTION_GE(max_lm_diagonal, 0.0);\n  OPTION_LE_OPTION(min_lm_diagonal, max_lm_diagonal);\n  OPTION_GE(max_num_consecutive_invalid_steps, 0);\n  OPTION_GT(eta, 0.0);\n  OPTION_GE(min_linear_solver_iterations, 0);\n  OPTION_GE(max_linear_solver_iterations, 1);\n  OPTION_LE_OPTION(min_linear_solver_iterations, max_linear_solver_iterations);\n\n  if (options.use_inner_iterations) {\n    OPTION_GE(inner_iteration_tolerance, 0.0);\n  }\n\n  if (options.use_nonmonotonic_steps) {\n    OPTION_GT(max_consecutive_nonmonotonic_steps, 0);\n  }\n\n  if (options.linear_solver_type == ITERATIVE_SCHUR &&\n      options.use_explicit_schur_complement &&\n      options.preconditioner_type != SCHUR_JACOBI) {\n    *error =  \"use_explicit_schur_complement only supports \"\n        \"SCHUR_JACOBI as the preconditioner.\";\n    return false;\n  }\n\n  if (options.dense_linear_algebra_library_type == LAPACK &&\n      !IsDenseLinearAlgebraLibraryTypeAvailable(LAPACK) &&\n      (options.linear_solver_type == DENSE_NORMAL_CHOLESKY ||\n       options.linear_solver_type == DENSE_QR ||\n       options.linear_solver_type == DENSE_SCHUR)) {\n    *error = StringPrintf(\n        \"Can't use %s with \"\n        \"Solver::Options::dense_linear_algebra_library_type = LAPACK \"\n        \"because LAPACK was not enabled when Ceres was built.\",\n        LinearSolverTypeToString(options.linear_solver_type));\n    return false;\n  }\n\n  {\n    const char* sparse_linear_algebra_library_name =\n        SparseLinearAlgebraLibraryTypeToString(\n            options.sparse_linear_algebra_library_type);\n    const char* name = nullptr;\n    if (options.linear_solver_type == SPARSE_NORMAL_CHOLESKY ||\n        options.linear_solver_type == SPARSE_SCHUR) {\n      name = LinearSolverTypeToString(options.linear_solver_type);\n    } else if ((options.linear_solver_type == ITERATIVE_SCHUR &&\n                (options.preconditioner_type == CLUSTER_JACOBI ||\n                 options.preconditioner_type == CLUSTER_TRIDIAGONAL)) ||\n               (options.linear_solver_type == CGNR &&\n                options.preconditioner_type == SUBSET)) {\n      name = PreconditionerTypeToString(options.preconditioner_type);\n    }\n\n    if (name) {\n      if (options.sparse_linear_algebra_library_type == NO_SPARSE) {\n        *error = StringPrintf(\n            \"Can't use %s with \"\n            \"Solver::Options::sparse_linear_algebra_library_type = %s.\",\n            name, sparse_linear_algebra_library_name);\n        return false;\n      } else if (!IsSparseLinearAlgebraLibraryTypeAvailable(\n                     options.sparse_linear_algebra_library_type)) {\n        *error = StringPrintf(\n            \"Can't use %s with \"\n            \"Solver::Options::sparse_linear_algebra_library_type = %s, \"\n            \"because support was not enabled when Ceres Solver was built.\",\n            name, sparse_linear_algebra_library_name);\n        return false;\n      }\n    }\n  }\n\n  if (options.trust_region_strategy_type == DOGLEG) {\n    if (options.linear_solver_type == ITERATIVE_SCHUR ||\n        options.linear_solver_type == CGNR) {\n      *error = \"DOGLEG only supports exact factorization based linear \"\n          \"solvers. If you want to use an iterative solver please \"\n          \"use LEVENBERG_MARQUARDT as the trust_region_strategy_type\";\n      return false;\n    }\n  }\n\n  if (!options.trust_region_minimizer_iterations_to_dump.empty() &&\n      options.trust_region_problem_dump_format_type != CONSOLE &&\n      options.trust_region_problem_dump_directory.empty()) {\n    *error = \"Solver::Options::trust_region_problem_dump_directory is empty.\";\n    return false;\n  }\n\n  if (options.dynamic_sparsity) {\n    if (options.linear_solver_type != SPARSE_NORMAL_CHOLESKY) {\n      *error = \"Dynamic sparsity is only supported with SPARSE_NORMAL_CHOLESKY.\";\n      return false;\n    }\n    if (options.sparse_linear_algebra_library_type == ACCELERATE_SPARSE) {\n      *error = \"ACCELERATE_SPARSE is not currently supported with dynamic \"\n          \"sparsity.\";\n      return false;\n    }\n  }\n\n  if (options.linear_solver_type == CGNR &&\n      options.preconditioner_type == SUBSET &&\n      options.residual_blocks_for_subset_preconditioner.empty()) {\n    *error =\n        \"When using SUBSET preconditioner, \"\n        \"Solver::Options::residual_blocks_for_subset_preconditioner cannot be \"\n        \"empty\";\n    return false;\n  }\n\n  return true;\n}\n\nbool LineSearchOptionsAreValid(const Solver::Options& options, string* error) {\n  OPTION_GT(max_lbfgs_rank, 0);\n  OPTION_GT(min_line_search_step_size, 0.0);\n  OPTION_GT(max_line_search_step_contraction, 0.0);\n  OPTION_LT(max_line_search_step_contraction, 1.0);\n  OPTION_LT_OPTION(max_line_search_step_contraction,\n                   min_line_search_step_contraction);\n  OPTION_LE(min_line_search_step_contraction, 1.0);\n  OPTION_GE(max_num_line_search_step_size_iterations,\n            (options.minimizer_type == ceres::TRUST_REGION ? 0 : 1));\n  OPTION_GT(line_search_sufficient_function_decrease, 0.0);\n  OPTION_LT_OPTION(line_search_sufficient_function_decrease,\n                   line_search_sufficient_curvature_decrease);\n  OPTION_LT(line_search_sufficient_curvature_decrease, 1.0);\n  OPTION_GT(max_line_search_step_expansion, 1.0);\n\n  if ((options.line_search_direction_type == ceres::BFGS ||\n       options.line_search_direction_type == ceres::LBFGS) &&\n      options.line_search_type != ceres::WOLFE) {\n    *error =\n        string(\"Invalid configuration: Solver::Options::line_search_type = \")\n        + string(LineSearchTypeToString(options.line_search_type))\n        + string(\". When using (L)BFGS, \"\n                 \"Solver::Options::line_search_type must be set to WOLFE.\");\n    return false;\n  }\n\n  // Warn user if they have requested BISECTION interpolation, but constraints\n  // on max/min step size change during line search prevent bisection scaling\n  // from occurring. Warn only, as this is likely a user mistake, but one which\n  // does not prevent us from continuing.\n  LOG_IF(WARNING,\n         (options.line_search_interpolation_type == ceres::BISECTION &&\n          (options.max_line_search_step_contraction > 0.5 ||\n           options.min_line_search_step_contraction < 0.5)))\n      << \"Line search interpolation type is BISECTION, but specified \"\n      << \"max_line_search_step_contraction: \"\n      << options.max_line_search_step_contraction << \", and \"\n      << \"min_line_search_step_contraction: \"\n      << options.min_line_search_step_contraction\n      << \", prevent bisection (0.5) scaling, continuing with solve regardless.\";\n\n  return true;\n}\n\n#undef OPTION_OP\n#undef OPTION_OP_OPTION\n#undef OPTION_GT\n#undef OPTION_GE\n#undef OPTION_LE\n#undef OPTION_LT\n#undef OPTION_LE_OPTION\n#undef OPTION_LT_OPTION\n\nvoid StringifyOrdering(const vector<int>& ordering, string* report) {\n  if (ordering.empty()) {\n    internal::StringAppendF(report, \"AUTOMATIC\");\n    return;\n  }\n\n  for (int i = 0; i < ordering.size() - 1; ++i) {\n    internal::StringAppendF(report, \"%d,\", ordering[i]);\n  }\n  internal::StringAppendF(report, \"%d\", ordering.back());\n}\n\nvoid SummarizeGivenProgram(const internal::Program& program,\n                           Solver::Summary* summary) {\n  summary->num_parameter_blocks     = program.NumParameterBlocks();\n  summary->num_parameters           = program.NumParameters();\n  summary->num_effective_parameters = program.NumEffectiveParameters();\n  summary->num_residual_blocks      = program.NumResidualBlocks();\n  summary->num_residuals            = program.NumResiduals();\n}\n\nvoid SummarizeReducedProgram(const internal::Program& program,\n                             Solver::Summary* summary) {\n  summary->num_parameter_blocks_reduced     = program.NumParameterBlocks();\n  summary->num_parameters_reduced           = program.NumParameters();\n  summary->num_effective_parameters_reduced = program.NumEffectiveParameters();\n  summary->num_residual_blocks_reduced      = program.NumResidualBlocks();\n  summary->num_residuals_reduced            = program.NumResiduals();\n}\n\nvoid PreSolveSummarize(const Solver::Options& options,\n                       const internal::ProblemImpl* problem,\n                       Solver::Summary* summary) {\n  SummarizeGivenProgram(problem->program(), summary);\n  internal::OrderingToGroupSizes(options.linear_solver_ordering.get(),\n                                 &(summary->linear_solver_ordering_given));\n  internal::OrderingToGroupSizes(options.inner_iteration_ordering.get(),\n                                 &(summary->inner_iteration_ordering_given));\n\n  summary->dense_linear_algebra_library_type  = options.dense_linear_algebra_library_type;  //  NOLINT\n  summary->dogleg_type                        = options.dogleg_type;\n  summary->inner_iteration_time_in_seconds    = 0.0;\n  summary->num_line_search_steps              = 0;\n  summary->line_search_cost_evaluation_time_in_seconds = 0.0;\n  summary->line_search_gradient_evaluation_time_in_seconds = 0.0;\n  summary->line_search_polynomial_minimization_time_in_seconds = 0.0;\n  summary->line_search_total_time_in_seconds  = 0.0;\n  summary->inner_iterations_given             = options.use_inner_iterations;\n  summary->line_search_direction_type         = options.line_search_direction_type;         //  NOLINT\n  summary->line_search_interpolation_type     = options.line_search_interpolation_type;     //  NOLINT\n  summary->line_search_type                   = options.line_search_type;\n  summary->linear_solver_type_given           = options.linear_solver_type;\n  summary->max_lbfgs_rank                     = options.max_lbfgs_rank;\n  summary->minimizer_type                     = options.minimizer_type;\n  summary->nonlinear_conjugate_gradient_type  = options.nonlinear_conjugate_gradient_type;  //  NOLINT\n  summary->num_threads_given                  = options.num_threads;\n  summary->preconditioner_type_given          = options.preconditioner_type;\n  summary->sparse_linear_algebra_library_type = options.sparse_linear_algebra_library_type; //  NOLINT\n  summary->trust_region_strategy_type         = options.trust_region_strategy_type;         //  NOLINT\n  summary->visibility_clustering_type         = options.visibility_clustering_type;         //  NOLINT\n}\n\nvoid PostSolveSummarize(const internal::PreprocessedProblem& pp,\n                        Solver::Summary* summary) {\n  internal::OrderingToGroupSizes(pp.options.linear_solver_ordering.get(),\n                                 &(summary->linear_solver_ordering_used));\n  internal::OrderingToGroupSizes(pp.options.inner_iteration_ordering.get(),\n                                 &(summary->inner_iteration_ordering_used));\n\n  summary->inner_iterations_used          = pp.inner_iteration_minimizer.get() != NULL;     // NOLINT\n  summary->linear_solver_type_used        = pp.linear_solver_options.type;\n  summary->num_threads_used               = pp.options.num_threads;\n  summary->preconditioner_type_used       = pp.options.preconditioner_type;\n\n  internal::SetSummaryFinalCost(summary);\n\n  if (pp.reduced_program.get() != NULL) {\n    SummarizeReducedProgram(*pp.reduced_program, summary);\n  }\n\n  using internal::CallStatistics;\n\n  // It is possible that no evaluator was created. This would be the\n  // case if the preprocessor failed, or if the reduced problem did\n  // not contain any parameter blocks. Thus, only extract the\n  // evaluator statistics if one exists.\n  if (pp.evaluator.get() != NULL) {\n    const map<string, CallStatistics>& evaluator_statistics =\n        pp.evaluator->Statistics();\n    {\n      const CallStatistics& call_stats = FindWithDefault(\n          evaluator_statistics, \"Evaluator::Residual\", CallStatistics());\n\n      summary->residual_evaluation_time_in_seconds = call_stats.time;\n      summary->num_residual_evaluations = call_stats.calls;\n    }\n    {\n      const CallStatistics& call_stats = FindWithDefault(\n          evaluator_statistics, \"Evaluator::Jacobian\", CallStatistics());\n\n      summary->jacobian_evaluation_time_in_seconds = call_stats.time;\n      summary->num_jacobian_evaluations = call_stats.calls;\n    }\n  }\n\n  // Again, like the evaluator, there may or may not be a linear\n  // solver from which we can extract run time statistics. In\n  // particular the line search solver does not use a linear solver.\n  if (pp.linear_solver.get() != NULL) {\n    const map<string, CallStatistics>& linear_solver_statistics =\n        pp.linear_solver->Statistics();\n    const CallStatistics& call_stats = FindWithDefault(\n        linear_solver_statistics, \"LinearSolver::Solve\", CallStatistics());\n    summary->num_linear_solves = call_stats.calls;\n    summary->linear_solver_time_in_seconds = call_stats.time;\n  }\n}\n\nvoid Minimize(internal::PreprocessedProblem* pp,\n              Solver::Summary* summary) {\n  using internal::Program;\n  using internal::Minimizer;\n\n  Program* program = pp->reduced_program.get();\n  if (pp->reduced_program->NumParameterBlocks() == 0) {\n    summary->message = \"Function tolerance reached. \"\n        \"No non-constant parameter blocks found.\";\n    summary->termination_type = CONVERGENCE;\n    VLOG_IF(1, pp->options.logging_type != SILENT) << summary->message;\n    summary->initial_cost = summary->fixed_cost;\n    summary->final_cost = summary->fixed_cost;\n    return;\n  }\n\n  const Vector original_reduced_parameters = pp->reduced_parameters;\n  std::unique_ptr<Minimizer> minimizer(\n      Minimizer::Create(pp->options.minimizer_type));\n  minimizer->Minimize(pp->minimizer_options,\n                      pp->reduced_parameters.data(),\n                      summary);\n\n  program->StateVectorToParameterBlocks(\n      summary->IsSolutionUsable()\n      ? pp->reduced_parameters.data()\n      : original_reduced_parameters.data());\n  program->CopyParameterBlockStateToUserState();\n}\n\nstd::string SchurStructureToString(const int row_block_size,\n                                   const int e_block_size,\n                                   const int f_block_size) {\n  const std::string row =\n      (row_block_size == Eigen::Dynamic)\n      ? \"d\" : internal::StringPrintf(\"%d\", row_block_size);\n\n  const std::string e =\n      (e_block_size == Eigen::Dynamic)\n      ? \"d\" : internal::StringPrintf(\"%d\", e_block_size);\n\n  const std::string f =\n      (f_block_size == Eigen::Dynamic)\n      ? \"d\" : internal::StringPrintf(\"%d\", f_block_size);\n\n  return internal::StringPrintf(\"%s,%s,%s\", row.c_str(), e.c_str(), f.c_str());\n}\n\n}  // namespace\n\nbool Solver::Options::IsValid(string* error) const {\n  if (!CommonOptionsAreValid(*this, error)) {\n    return false;\n  }\n\n  if (minimizer_type == TRUST_REGION &&\n      !TrustRegionOptionsAreValid(*this, error)) {\n    return false;\n  }\n\n  // We do not know if the problem is bounds constrained or not, if it\n  // is then the trust region solver will also use the line search\n  // solver to do a projection onto the box constraints, so make sure\n  // that the line search options are checked independent of what\n  // minimizer algorithm is being used.\n  return LineSearchOptionsAreValid(*this, error);\n}\n\nSolver::~Solver() {}\n\nvoid Solver::Solve(const Solver::Options& options,\n                   Problem* problem,\n                   Solver::Summary* summary) {\n  using internal::PreprocessedProblem;\n  using internal::Preprocessor;\n  using internal::ProblemImpl;\n  using internal::Program;\n  using internal::WallTimeInSeconds;\n\n  CHECK(problem != nullptr);\n  CHECK(summary != nullptr);\n\n  double start_time = WallTimeInSeconds();\n  *summary = Summary();\n  if (!options.IsValid(&summary->message)) {\n    LOG(ERROR) << \"Terminating: \" << summary->message;\n    return;\n  }\n\n  ProblemImpl* problem_impl = problem->impl_.get();\n  Program* program = problem_impl->mutable_program();\n  PreSolveSummarize(options, problem_impl, summary);\n\n  // If gradient_checking is enabled, wrap all cost functions in a\n  // gradient checker and install a callback that terminates if any gradient\n  // error is detected.\n  std::unique_ptr<internal::ProblemImpl> gradient_checking_problem;\n  internal::GradientCheckingIterationCallback gradient_checking_callback;\n  Solver::Options modified_options = options;\n  if (options.check_gradients) {\n    modified_options.callbacks.push_back(&gradient_checking_callback);\n    gradient_checking_problem.reset(\n        CreateGradientCheckingProblemImpl(\n            problem_impl,\n            options.gradient_check_numeric_derivative_relative_step_size,\n            options.gradient_check_relative_precision,\n            &gradient_checking_callback));\n    problem_impl = gradient_checking_problem.get();\n    program = problem_impl->mutable_program();\n  }\n\n  // Make sure that all the parameter blocks states are set to the\n  // values provided by the user.\n  program->SetParameterBlockStatePtrsToUserStatePtrs();\n\n  // The main thread also does work so we only need to launch num_threads - 1.\n  problem_impl->context()->EnsureMinimumThreads(options.num_threads - 1);\n\n  std::unique_ptr<Preprocessor> preprocessor(\n      Preprocessor::Create(modified_options.minimizer_type));\n  PreprocessedProblem pp;\n\n  const bool status = preprocessor->Preprocess(modified_options, problem_impl, &pp);\n\n  // We check the linear_solver_options.type rather than\n  // modified_options.linear_solver_type because, depending on the\n  // lack of a Schur structure, the preprocessor may change the linear\n  // solver type.\n  if (IsSchurType(pp.linear_solver_options.type)) {\n    // TODO(sameeragarwal): We can likely eliminate the duplicate call\n    // to DetectStructure here and inside the linear solver, by\n    // calling this in the preprocessor.\n    int row_block_size;\n    int e_block_size;\n    int f_block_size;\n    DetectStructure(*static_cast<internal::BlockSparseMatrix*>(\n                        pp.minimizer_options.jacobian.get())\n                    ->block_structure(),\n                    pp.linear_solver_options.elimination_groups[0],\n                    &row_block_size,\n                    &e_block_size,\n                    &f_block_size);\n    summary->schur_structure_given =\n        SchurStructureToString(row_block_size, e_block_size, f_block_size);\n    internal::GetBestSchurTemplateSpecialization(&row_block_size,\n                                                 &e_block_size,\n                                                 &f_block_size);\n    summary->schur_structure_used =\n        SchurStructureToString(row_block_size, e_block_size, f_block_size);\n  }\n\n  summary->fixed_cost = pp.fixed_cost;\n  summary->preprocessor_time_in_seconds = WallTimeInSeconds() - start_time;\n\n  if (status) {\n    const double minimizer_start_time = WallTimeInSeconds();\n    Minimize(&pp, summary);\n    summary->minimizer_time_in_seconds =\n        WallTimeInSeconds() - minimizer_start_time;\n  } else {\n    summary->message = pp.error;\n  }\n\n  const double postprocessor_start_time = WallTimeInSeconds();\n  problem_impl = problem->impl_.get();\n  program = problem_impl->mutable_program();\n  // On exit, ensure that the parameter blocks again point at the user\n  // provided values and the parameter blocks are numbered according\n  // to their position in the original user provided program.\n  program->SetParameterBlockStatePtrsToUserStatePtrs();\n  program->SetParameterOffsetsAndIndex();\n  PostSolveSummarize(pp, summary);\n  summary->postprocessor_time_in_seconds =\n      WallTimeInSeconds() - postprocessor_start_time;\n\n  // If the gradient checker reported an error, we want to report FAILURE\n  // instead of USER_FAILURE and provide the error log.\n  if (gradient_checking_callback.gradient_error_detected()) {\n    summary->termination_type = FAILURE;\n    summary->message = gradient_checking_callback.error_log();\n  }\n\n  summary->total_time_in_seconds = WallTimeInSeconds() - start_time;\n}\n\nvoid Solve(const Solver::Options& options,\n           Problem* problem,\n           Solver::Summary* summary) {\n  Solver solver;\n  solver.Solve(options, problem, summary);\n}\n\nstring Solver::Summary::BriefReport() const {\n  return StringPrintf(\"Ceres Solver Report: \"\n                      \"Iterations: %d, \"\n                      \"Initial cost: %e, \"\n                      \"Final cost: %e, \"\n                      \"Termination: %s\",\n                      num_successful_steps + num_unsuccessful_steps,\n                      initial_cost,\n                      final_cost,\n                      TerminationTypeToString(termination_type));\n}\n\nstring Solver::Summary::FullReport() const {\n  using internal::VersionString;\n\n  string report = string(\"\\nSolver Summary (v \" + VersionString() + \")\\n\\n\");\n\n  StringAppendF(&report, \"%45s    %21s\\n\", \"Original\", \"Reduced\");\n  StringAppendF(&report, \"Parameter blocks    % 25d% 25d\\n\",\n                num_parameter_blocks, num_parameter_blocks_reduced);\n  StringAppendF(&report, \"Parameters          % 25d% 25d\\n\",\n                num_parameters, num_parameters_reduced);\n  if (num_effective_parameters_reduced != num_parameters_reduced) {\n    StringAppendF(&report, \"Effective parameters% 25d% 25d\\n\",\n                  num_effective_parameters, num_effective_parameters_reduced);\n  }\n  StringAppendF(&report, \"Residual blocks     % 25d% 25d\\n\",\n                num_residual_blocks, num_residual_blocks_reduced);\n  StringAppendF(&report, \"Residuals           % 25d% 25d\\n\",\n                num_residuals, num_residuals_reduced);\n\n  if (minimizer_type == TRUST_REGION) {\n    // TRUST_SEARCH HEADER\n    StringAppendF(&report, \"\\nMinimizer                 %19s\\n\",\n                  \"TRUST_REGION\");\n\n    if (linear_solver_type_used == DENSE_NORMAL_CHOLESKY ||\n        linear_solver_type_used == DENSE_SCHUR ||\n        linear_solver_type_used == DENSE_QR) {\n      StringAppendF(&report, \"\\nDense linear algebra library  %15s\\n\",\n                    DenseLinearAlgebraLibraryTypeToString(\n                        dense_linear_algebra_library_type));\n    }\n\n    if (linear_solver_type_used == SPARSE_NORMAL_CHOLESKY ||\n        linear_solver_type_used == SPARSE_SCHUR ||\n        (linear_solver_type_used == ITERATIVE_SCHUR &&\n         (preconditioner_type_used == CLUSTER_JACOBI ||\n          preconditioner_type_used == CLUSTER_TRIDIAGONAL))) {\n      StringAppendF(&report, \"\\nSparse linear algebra library %15s\\n\",\n                    SparseLinearAlgebraLibraryTypeToString(\n                        sparse_linear_algebra_library_type));\n    }\n\n    StringAppendF(&report, \"Trust region strategy     %19s\",\n                  TrustRegionStrategyTypeToString(\n                      trust_region_strategy_type));\n    if (trust_region_strategy_type == DOGLEG) {\n      if (dogleg_type == TRADITIONAL_DOGLEG) {\n        StringAppendF(&report, \" (TRADITIONAL)\");\n      } else {\n        StringAppendF(&report, \" (SUBSPACE)\");\n      }\n    }\n    StringAppendF(&report, \"\\n\");\n    StringAppendF(&report, \"\\n\");\n\n    StringAppendF(&report, \"%45s    %21s\\n\", \"Given\",  \"Used\");\n    StringAppendF(&report, \"Linear solver       %25s%25s\\n\",\n                  LinearSolverTypeToString(linear_solver_type_given),\n                  LinearSolverTypeToString(linear_solver_type_used));\n\n    if (linear_solver_type_given == CGNR ||\n        linear_solver_type_given == ITERATIVE_SCHUR) {\n      StringAppendF(&report, \"Preconditioner      %25s%25s\\n\",\n                    PreconditionerTypeToString(preconditioner_type_given),\n                    PreconditionerTypeToString(preconditioner_type_used));\n    }\n\n    if (preconditioner_type_used == CLUSTER_JACOBI ||\n        preconditioner_type_used == CLUSTER_TRIDIAGONAL) {\n      StringAppendF(&report, \"Visibility clustering%24s%25s\\n\",\n                    VisibilityClusteringTypeToString(\n                        visibility_clustering_type),\n                    VisibilityClusteringTypeToString(\n                        visibility_clustering_type));\n    }\n    StringAppendF(&report, \"Threads             % 25d% 25d\\n\",\n                  num_threads_given, num_threads_used);\n\n    string given;\n    StringifyOrdering(linear_solver_ordering_given, &given);\n    string used;\n    StringifyOrdering(linear_solver_ordering_used, &used);\n    StringAppendF(&report,\n                  \"Linear solver ordering %22s %24s\\n\",\n                  given.c_str(),\n                  used.c_str());\n    if (IsSchurType(linear_solver_type_used)) {\n      StringAppendF(&report,\n                    \"Schur structure        %22s %24s\\n\",\n                    schur_structure_given.c_str(),\n                    schur_structure_used.c_str());\n    }\n\n    if (inner_iterations_given) {\n      StringAppendF(&report,\n                    \"Use inner iterations     %20s     %20s\\n\",\n                    inner_iterations_given ? \"True\" : \"False\",\n                    inner_iterations_used ? \"True\" : \"False\");\n    }\n\n    if (inner_iterations_used) {\n      string given;\n      StringifyOrdering(inner_iteration_ordering_given, &given);\n      string used;\n      StringifyOrdering(inner_iteration_ordering_used, &used);\n    StringAppendF(&report,\n                  \"Inner iteration ordering %20s %24s\\n\",\n                  given.c_str(),\n                  used.c_str());\n    }\n  } else {\n    // LINE_SEARCH HEADER\n    StringAppendF(&report, \"\\nMinimizer                 %19s\\n\", \"LINE_SEARCH\");\n\n\n    string line_search_direction_string;\n    if (line_search_direction_type == LBFGS) {\n      line_search_direction_string = StringPrintf(\"LBFGS (%d)\", max_lbfgs_rank);\n    } else if (line_search_direction_type == NONLINEAR_CONJUGATE_GRADIENT) {\n      line_search_direction_string =\n          NonlinearConjugateGradientTypeToString(\n              nonlinear_conjugate_gradient_type);\n    } else {\n      line_search_direction_string =\n          LineSearchDirectionTypeToString(line_search_direction_type);\n    }\n\n    StringAppendF(&report, \"Line search direction     %19s\\n\",\n                  line_search_direction_string.c_str());\n\n    const string line_search_type_string =\n        StringPrintf(\"%s %s\",\n                     LineSearchInterpolationTypeToString(\n                         line_search_interpolation_type),\n                     LineSearchTypeToString(line_search_type));\n    StringAppendF(&report, \"Line search type          %19s\\n\",\n                  line_search_type_string.c_str());\n    StringAppendF(&report, \"\\n\");\n\n    StringAppendF(&report, \"%45s    %21s\\n\", \"Given\",  \"Used\");\n    StringAppendF(&report, \"Threads             % 25d% 25d\\n\",\n                  num_threads_given, num_threads_used);\n  }\n\n  StringAppendF(&report, \"\\nCost:\\n\");\n  StringAppendF(&report, \"Initial        % 30e\\n\", initial_cost);\n  if (termination_type != FAILURE &&\n      termination_type != USER_FAILURE) {\n    StringAppendF(&report, \"Final          % 30e\\n\", final_cost);\n    StringAppendF(&report, \"Change         % 30e\\n\",\n                  initial_cost - final_cost);\n  }\n\n  StringAppendF(&report, \"\\nMinimizer iterations         % 16d\\n\",\n                num_successful_steps + num_unsuccessful_steps);\n\n  // Successful/Unsuccessful steps only matter in the case of the\n  // trust region solver. Line search terminates when it encounters\n  // the first unsuccessful step.\n  if (minimizer_type == TRUST_REGION) {\n    StringAppendF(&report, \"Successful steps               % 14d\\n\",\n                  num_successful_steps);\n    StringAppendF(&report, \"Unsuccessful steps             % 14d\\n\",\n                  num_unsuccessful_steps);\n  }\n  if (inner_iterations_used) {\n    StringAppendF(&report, \"Steps with inner iterations    % 14d\\n\",\n                  num_inner_iteration_steps);\n  }\n\n  const bool line_search_used =\n      (minimizer_type == LINE_SEARCH ||\n       (minimizer_type == TRUST_REGION && is_constrained));\n\n  if (line_search_used) {\n    StringAppendF(&report, \"Line search steps              % 14d\\n\",\n                  num_line_search_steps);\n  }\n\n  StringAppendF(&report, \"\\nTime (in seconds):\\n\");\n  StringAppendF(&report, \"Preprocessor        %25.6f\\n\",\n                preprocessor_time_in_seconds);\n\n  StringAppendF(&report, \"\\n  Residual only evaluation %18.6f (%d)\\n\",\n                residual_evaluation_time_in_seconds, num_residual_evaluations);\n  if (line_search_used) {\n    StringAppendF(&report, \"    Line search cost evaluation    %10.6f\\n\",\n                  line_search_cost_evaluation_time_in_seconds);\n  }\n  StringAppendF(&report, \"  Jacobian & residual evaluation %12.6f (%d)\\n\",\n                jacobian_evaluation_time_in_seconds, num_jacobian_evaluations);\n  if (line_search_used) {\n    StringAppendF(&report, \"    Line search gradient evaluation   %6.6f\\n\",\n                  line_search_gradient_evaluation_time_in_seconds);\n  }\n\n  if (minimizer_type == TRUST_REGION) {\n    StringAppendF(&report, \"  Linear solver       %23.6f (%d)\\n\",\n                  linear_solver_time_in_seconds, num_linear_solves);\n  }\n\n  if (inner_iterations_used) {\n    StringAppendF(&report, \"  Inner iterations    %23.6f\\n\",\n                  inner_iteration_time_in_seconds);\n  }\n\n  if (line_search_used) {\n    StringAppendF(&report, \"  Line search polynomial minimization  %.6f\\n\",\n                  line_search_polynomial_minimization_time_in_seconds);\n  }\n\n  StringAppendF(&report, \"Minimizer           %25.6f\\n\\n\",\n                minimizer_time_in_seconds);\n\n  StringAppendF(&report, \"Postprocessor        %24.6f\\n\",\n                postprocessor_time_in_seconds);\n\n  StringAppendF(&report, \"Total               %25.6f\\n\\n\",\n                total_time_in_seconds);\n\n  StringAppendF(&report, \"Termination:        %25s (%s)\\n\",\n                TerminationTypeToString(termination_type), message.c_str());\n  return report;\n}\n\nbool Solver::Summary::IsSolutionUsable() const {\n  return internal::IsSolutionUsable(*this);\n}\n\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/solver_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2019 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/solver.h\"\n\n#include <cmath>\n#include <limits>\n#include <memory>\n#include <vector>\n\n#include \"ceres/autodiff_cost_function.h\"\n#include \"ceres/evaluation_callback.h\"\n#include \"ceres/local_parameterization.h\"\n#include \"ceres/problem.h\"\n#include \"ceres/problem_impl.h\"\n#include \"ceres/sized_cost_function.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::string;\n\nTEST(SolverOptions, DefaultTrustRegionOptionsAreValid) {\n  Solver::Options options;\n  options.minimizer_type = TRUST_REGION;\n  string error;\n  EXPECT_TRUE(options.IsValid(&error)) << error;\n}\n\nTEST(SolverOptions, DefaultLineSearchOptionsAreValid) {\n  Solver::Options options;\n  options.minimizer_type = LINE_SEARCH;\n  string error;\n  EXPECT_TRUE(options.IsValid(&error)) << error;\n}\n\nstruct QuadraticCostFunctor {\n  template <typename T>\n  bool operator()(const T* const x, T* residual) const {\n    residual[0] = T(5.0) - *x;\n    return true;\n  }\n\n  static CostFunction* Create() {\n    return new AutoDiffCostFunction<QuadraticCostFunctor, 1, 1>(\n        new QuadraticCostFunctor);\n  }\n};\n\nstruct RememberingCallback : public IterationCallback {\n  explicit RememberingCallback(double* x) : calls(0), x(x) {}\n  virtual ~RememberingCallback() {}\n  CallbackReturnType operator()(const IterationSummary& summary) final {\n    x_values.push_back(*x);\n    return SOLVER_CONTINUE;\n  }\n  int calls;\n  double* x;\n  std::vector<double> x_values;\n};\n\nstruct NoOpEvaluationCallback : EvaluationCallback {\n  virtual ~NoOpEvaluationCallback() {}\n  void PrepareForEvaluation(bool evaluate_jacobians,\n                            bool new_evaluation_point) final {\n    (void)evaluate_jacobians;\n    (void)new_evaluation_point;\n  }\n};\n\nTEST(Solver, UpdateStateEveryIterationOptionNoEvaluationCallback) {\n  double x = 50.0;\n  const double original_x = x;\n\n  Problem::Options problem_options;\n  Problem problem(problem_options);\n  problem.AddResidualBlock(QuadraticCostFunctor::Create(), nullptr, &x);\n\n  Solver::Options options;\n  options.linear_solver_type = DENSE_QR;\n\n  RememberingCallback callback(&x);\n  options.callbacks.push_back(&callback);\n\n  Solver::Summary summary;\n\n  int num_iterations;\n\n  // First: update_state_every_iteration=false, evaluation_callback=nullptr.\n  Solve(options, &problem, &summary);\n  num_iterations =\n      summary.num_successful_steps + summary.num_unsuccessful_steps;\n  EXPECT_GT(num_iterations, 1);\n  for (int i = 0; i < callback.x_values.size(); ++i) {\n    EXPECT_EQ(50.0, callback.x_values[i]);\n  }\n\n  // Second: update_state_every_iteration=true, evaluation_callback=nullptr.\n  x = 50.0;\n  options.update_state_every_iteration = true;\n  callback.x_values.clear();\n  Solve(options, &problem, &summary);\n  num_iterations =\n      summary.num_successful_steps + summary.num_unsuccessful_steps;\n  EXPECT_GT(num_iterations, 1);\n  EXPECT_EQ(original_x, callback.x_values[0]);\n  EXPECT_NE(original_x, callback.x_values[1]);\n}\n\nTEST(Solver, UpdateStateEveryIterationOptionWithEvaluationCallback) {\n  double x = 50.0;\n  const double original_x = x;\n\n  Problem::Options problem_options;\n  NoOpEvaluationCallback evaluation_callback;\n  problem_options.evaluation_callback = &evaluation_callback;\n\n  Problem problem(problem_options);\n  problem.AddResidualBlock(QuadraticCostFunctor::Create(), nullptr, &x);\n\n  Solver::Options options;\n  options.linear_solver_type = DENSE_QR;\n  RememberingCallback callback(&x);\n  options.callbacks.push_back(&callback);\n\n  Solver::Summary summary;\n\n  int num_iterations;\n\n  // First: update_state_every_iteration=true, evaluation_callback=!nullptr.\n  x = 50.0;\n  options.update_state_every_iteration = true;\n  callback.x_values.clear();\n  Solve(options, &problem, &summary);\n  num_iterations =\n      summary.num_successful_steps + summary.num_unsuccessful_steps;\n  EXPECT_GT(num_iterations, 1);\n  EXPECT_EQ(original_x, callback.x_values[0]);\n  EXPECT_NE(original_x, callback.x_values[1]);\n\n  // Second: update_state_every_iteration=false, evaluation_callback=!nullptr.\n  x = 50.0;\n  options.update_state_every_iteration = false;\n  callback.x_values.clear();\n  Solve(options, &problem, &summary);\n  num_iterations =\n      summary.num_successful_steps + summary.num_unsuccessful_steps;\n  EXPECT_GT(num_iterations, 1);\n  EXPECT_EQ(original_x, callback.x_values[0]);\n  EXPECT_NE(original_x, callback.x_values[1]);\n}\n\nTEST(Solver, CantMixEvaluationCallbackWithInnerIterations) {\n  double x = 50.0;\n  double y = 60.0;\n\n  Problem::Options problem_options;\n  NoOpEvaluationCallback evaluation_callback;\n  problem_options.evaluation_callback = &evaluation_callback;\n\n  Problem problem(problem_options);\n  problem.AddResidualBlock(QuadraticCostFunctor::Create(), nullptr, &x);\n  problem.AddResidualBlock(QuadraticCostFunctor::Create(), nullptr, &y);\n\n  Solver::Options options;\n  options.use_inner_iterations = true;\n  Solver::Summary summary;\n  Solve(options, &problem, &summary);\n  EXPECT_EQ(summary.termination_type, FAILURE);\n\n  options.use_inner_iterations = false;\n  Solve(options, &problem, &summary);\n  EXPECT_EQ(summary.termination_type, CONVERGENCE);\n}\n\n// The parameters must be in separate blocks so that they can be individually\n// set constant or not.\nstruct Quadratic4DCostFunction {\n  template <typename T>\n  bool operator()(const T* const x,\n                  const T* const y,\n                  const T* const z,\n                  const T* const w,\n                  T* residual) const {\n    // A 4-dimension axis-aligned quadratic.\n    residual[0] = T(10.0) - *x + T(20.0) - *y + T(30.0) - *z + T(40.0) - *w;\n    return true;\n  }\n\n  static CostFunction* Create() {\n    return new AutoDiffCostFunction<Quadratic4DCostFunction, 1, 1, 1, 1, 1>(\n        new Quadratic4DCostFunction);\n  }\n};\n\n// A cost function that simply returns its argument.\nclass UnaryIdentityCostFunction : public SizedCostFunction<1, 1> {\n public:\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const final {\n    residuals[0] = parameters[0][0];\n    if (jacobians != nullptr && jacobians[0] != nullptr) {\n      jacobians[0][0] = 1.0;\n    }\n    return true;\n  }\n};\n\nTEST(Solver, TrustRegionProblemHasNoParameterBlocks) {\n  Problem problem;\n  Solver::Options options;\n  options.minimizer_type = TRUST_REGION;\n  Solver::Summary summary;\n  Solve(options, &problem, &summary);\n  EXPECT_EQ(summary.termination_type, CONVERGENCE);\n  EXPECT_EQ(summary.message,\n            \"Function tolerance reached. \"\n            \"No non-constant parameter blocks found.\");\n}\n\nTEST(Solver, LineSearchProblemHasNoParameterBlocks) {\n  Problem problem;\n  Solver::Options options;\n  options.minimizer_type = LINE_SEARCH;\n  Solver::Summary summary;\n  Solve(options, &problem, &summary);\n  EXPECT_EQ(summary.termination_type, CONVERGENCE);\n  EXPECT_EQ(summary.message,\n            \"Function tolerance reached. \"\n            \"No non-constant parameter blocks found.\");\n}\n\nTEST(Solver, TrustRegionProblemHasZeroResiduals) {\n  Problem problem;\n  double x = 1;\n  problem.AddParameterBlock(&x, 1);\n  Solver::Options options;\n  options.minimizer_type = TRUST_REGION;\n  Solver::Summary summary;\n  Solve(options, &problem, &summary);\n  EXPECT_EQ(summary.termination_type, CONVERGENCE);\n  EXPECT_EQ(summary.message,\n            \"Function tolerance reached. \"\n            \"No non-constant parameter blocks found.\");\n}\n\nTEST(Solver, LineSearchProblemHasZeroResiduals) {\n  Problem problem;\n  double x = 1;\n  problem.AddParameterBlock(&x, 1);\n  Solver::Options options;\n  options.minimizer_type = LINE_SEARCH;\n  Solver::Summary summary;\n  Solve(options, &problem, &summary);\n  EXPECT_EQ(summary.termination_type, CONVERGENCE);\n  EXPECT_EQ(summary.message,\n            \"Function tolerance reached. \"\n            \"No non-constant parameter blocks found.\");\n}\n\nTEST(Solver, TrustRegionProblemIsConstant) {\n  Problem problem;\n  double x = 1;\n  problem.AddResidualBlock(new UnaryIdentityCostFunction, nullptr, &x);\n  problem.SetParameterBlockConstant(&x);\n  Solver::Options options;\n  options.minimizer_type = TRUST_REGION;\n  Solver::Summary summary;\n  Solve(options, &problem, &summary);\n  EXPECT_EQ(summary.termination_type, CONVERGENCE);\n  EXPECT_EQ(summary.initial_cost, 1.0 / 2.0);\n  EXPECT_EQ(summary.final_cost, 1.0 / 2.0);\n}\n\nTEST(Solver, LineSearchProblemIsConstant) {\n  Problem problem;\n  double x = 1;\n  problem.AddResidualBlock(new UnaryIdentityCostFunction, nullptr, &x);\n  problem.SetParameterBlockConstant(&x);\n  Solver::Options options;\n  options.minimizer_type = LINE_SEARCH;\n  Solver::Summary summary;\n  Solve(options, &problem, &summary);\n  EXPECT_EQ(summary.termination_type, CONVERGENCE);\n  EXPECT_EQ(summary.initial_cost, 1.0 / 2.0);\n  EXPECT_EQ(summary.final_cost, 1.0 / 2.0);\n}\n\n#if defined(CERES_NO_SUITESPARSE)\nTEST(Solver, SparseNormalCholeskyNoSuiteSparse) {\n  Solver::Options options;\n  options.sparse_linear_algebra_library_type = SUITE_SPARSE;\n  options.linear_solver_type = SPARSE_NORMAL_CHOLESKY;\n  string message;\n  EXPECT_FALSE(options.IsValid(&message));\n}\n\nTEST(Solver, SparseSchurNoSuiteSparse) {\n  Solver::Options options;\n  options.sparse_linear_algebra_library_type = SUITE_SPARSE;\n  options.linear_solver_type = SPARSE_SCHUR;\n  string message;\n  EXPECT_FALSE(options.IsValid(&message));\n}\n#endif\n\n#if defined(CERES_NO_CXSPARSE)\nTEST(Solver, SparseNormalCholeskyNoCXSparse) {\n  Solver::Options options;\n  options.sparse_linear_algebra_library_type = CX_SPARSE;\n  options.linear_solver_type = SPARSE_NORMAL_CHOLESKY;\n  string message;\n  EXPECT_FALSE(options.IsValid(&message));\n}\n\nTEST(Solver, SparseSchurNoCXSparse) {\n  Solver::Options options;\n  options.sparse_linear_algebra_library_type = CX_SPARSE;\n  options.linear_solver_type = SPARSE_SCHUR;\n  string message;\n  EXPECT_FALSE(options.IsValid(&message));\n}\n#endif\n\n#if defined(CERES_NO_ACCELERATE_SPARSE)\nTEST(Solver, SparseNormalCholeskyNoAccelerateSparse) {\n  Solver::Options options;\n  options.sparse_linear_algebra_library_type = ACCELERATE_SPARSE;\n  options.linear_solver_type = SPARSE_NORMAL_CHOLESKY;\n  string message;\n  EXPECT_FALSE(options.IsValid(&message));\n}\n\nTEST(Solver, SparseSchurNoAccelerateSparse) {\n  Solver::Options options;\n  options.sparse_linear_algebra_library_type = ACCELERATE_SPARSE;\n  options.linear_solver_type = SPARSE_SCHUR;\n  string message;\n  EXPECT_FALSE(options.IsValid(&message));\n}\n#else\nTEST(Solver, DynamicSparseNormalCholeskyUnsupportedWithAccelerateSparse) {\n  Solver::Options options;\n  options.sparse_linear_algebra_library_type = ACCELERATE_SPARSE;\n  options.linear_solver_type = SPARSE_NORMAL_CHOLESKY;\n  options.dynamic_sparsity = true;\n  string message;\n  EXPECT_FALSE(options.IsValid(&message));\n}\n#endif\n\n#if !defined(CERES_USE_EIGEN_SPARSE)\nTEST(Solver, SparseNormalCholeskyNoEigenSparse) {\n  Solver::Options options;\n  options.sparse_linear_algebra_library_type = EIGEN_SPARSE;\n  options.linear_solver_type = SPARSE_NORMAL_CHOLESKY;\n  string message;\n  EXPECT_FALSE(options.IsValid(&message));\n}\n\nTEST(Solver, SparseSchurNoEigenSparse) {\n  Solver::Options options;\n  options.sparse_linear_algebra_library_type = EIGEN_SPARSE;\n  options.linear_solver_type = SPARSE_SCHUR;\n  string message;\n  EXPECT_FALSE(options.IsValid(&message));\n}\n#endif\n\nTEST(Solver, SparseNormalCholeskyNoSparseLibrary) {\n  Solver::Options options;\n  options.sparse_linear_algebra_library_type = NO_SPARSE;\n  options.linear_solver_type = SPARSE_NORMAL_CHOLESKY;\n  string message;\n  EXPECT_FALSE(options.IsValid(&message));\n}\n\nTEST(Solver, SparseSchurNoSparseLibrary) {\n  Solver::Options options;\n  options.sparse_linear_algebra_library_type = NO_SPARSE;\n  options.linear_solver_type = SPARSE_SCHUR;\n  string message;\n  EXPECT_FALSE(options.IsValid(&message));\n}\n\nTEST(Solver, IterativeSchurWithClusterJacobiPerconditionerNoSparseLibrary) {\n  Solver::Options options;\n  options.sparse_linear_algebra_library_type = NO_SPARSE;\n  options.linear_solver_type = ITERATIVE_SCHUR;\n  // Requires SuiteSparse.\n  options.preconditioner_type = CLUSTER_JACOBI;\n  string message;\n  EXPECT_FALSE(options.IsValid(&message));\n}\n\nTEST(Solver,\n     IterativeSchurWithClusterTridiagonalPerconditionerNoSparseLibrary) {\n  Solver::Options options;\n  options.sparse_linear_algebra_library_type = NO_SPARSE;\n  options.linear_solver_type = ITERATIVE_SCHUR;\n  // Requires SuiteSparse.\n  options.preconditioner_type = CLUSTER_TRIDIAGONAL;\n  string message;\n  EXPECT_FALSE(options.IsValid(&message));\n}\n\nTEST(Solver, IterativeLinearSolverForDogleg) {\n  Solver::Options options;\n  options.trust_region_strategy_type = DOGLEG;\n  string message;\n  options.linear_solver_type = ITERATIVE_SCHUR;\n  EXPECT_FALSE(options.IsValid(&message));\n\n  options.linear_solver_type = CGNR;\n  EXPECT_FALSE(options.IsValid(&message));\n}\n\nTEST(Solver, LinearSolverTypeNormalOperation) {\n  Solver::Options options;\n  options.linear_solver_type = DENSE_QR;\n\n  string message;\n  EXPECT_TRUE(options.IsValid(&message));\n\n  options.linear_solver_type = DENSE_NORMAL_CHOLESKY;\n  EXPECT_TRUE(options.IsValid(&message));\n\n  options.linear_solver_type = DENSE_SCHUR;\n  EXPECT_TRUE(options.IsValid(&message));\n\n  options.linear_solver_type = SPARSE_SCHUR;\n#if defined(CERES_NO_SUITESPARSE) && defined(CERES_NO_CXSPARSE) && \\\n    !defined(CERES_USE_EIGEN_SPARSE)\n  EXPECT_FALSE(options.IsValid(&message));\n#else\n  EXPECT_TRUE(options.IsValid(&message));\n#endif\n\n  options.linear_solver_type = ITERATIVE_SCHUR;\n  EXPECT_TRUE(options.IsValid(&message));\n}\n\ntemplate <int kNumResiduals, int... Ns>\nclass DummyCostFunction : public SizedCostFunction<kNumResiduals, Ns...> {\n public:\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const {\n    for (int i = 0; i < kNumResiduals; ++i) {\n      residuals[i] = kNumResiduals * kNumResiduals + i;\n    }\n\n    return true;\n  }\n};\n\nTEST(Solver, FixedCostForConstantProblem) {\n  double x = 1.0;\n  Problem problem;\n  problem.AddResidualBlock(new DummyCostFunction<2, 1>(), nullptr, &x);\n  problem.SetParameterBlockConstant(&x);\n  const double expected_cost = 41.0 / 2.0;  // 1/2 * ((4 + 0)^2 + (4 + 1)^2)\n  Solver::Options options;\n  Solver::Summary summary;\n  Solve(options, &problem, &summary);\n  EXPECT_TRUE(summary.IsSolutionUsable());\n  EXPECT_EQ(summary.fixed_cost, expected_cost);\n  EXPECT_EQ(summary.initial_cost, expected_cost);\n  EXPECT_EQ(summary.final_cost, expected_cost);\n  EXPECT_EQ(summary.iterations.size(), 0);\n}\n\nstruct LinearCostFunction {\n  template <typename T>\n  bool operator()(const T* x, const T* y, T* residual) const {\n    residual[0] = T(10.0) - *x;\n    residual[1] = T(5.0) - *y;\n    return true;\n  }\n  static CostFunction* Create() {\n    return new AutoDiffCostFunction<LinearCostFunction, 2, 1, 1>(\n        new LinearCostFunction);\n  }\n};\n\nTEST(Solver, ZeroSizedLocalParameterizationHoldsParameterBlockConstant) {\n  double x = 0.0;\n  double y = 1.0;\n  Problem problem;\n  problem.AddResidualBlock(LinearCostFunction::Create(), nullptr, &x, &y);\n  problem.SetParameterization(&y, new SubsetParameterization(1, {0}));\n  EXPECT_TRUE(problem.IsParameterBlockConstant(&y));\n\n  Solver::Options options;\n  options.function_tolerance = 0.0;\n  options.gradient_tolerance = 0.0;\n  options.parameter_tolerance = 0.0;\n  Solver::Summary summary;\n  Solve(options, &problem, &summary);\n\n  EXPECT_EQ(summary.termination_type, CONVERGENCE);\n  EXPECT_NEAR(x, 10.0, 1e-7);\n  EXPECT_EQ(y, 1.0);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/solver_utils.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include <string>\n\n#include \"ceres/internal/config.h\"\n\n#include \"Eigen/Core\"\n#include \"ceres/internal/port.h\"\n#include \"ceres/solver_utils.h\"\n#include \"ceres/version.h\"\n\nnamespace ceres {\nnamespace internal {\n\n#define CERES_EIGEN_VERSION                                          \\\n  CERES_TO_STRING(EIGEN_WORLD_VERSION) \".\"                           \\\n  CERES_TO_STRING(EIGEN_MAJOR_VERSION) \".\"                           \\\n  CERES_TO_STRING(EIGEN_MINOR_VERSION)\n\nstd::string VersionString() {\n  std::string value = std::string(CERES_VERSION_STRING);\n  value += \"-eigen-(\" + std::string(CERES_EIGEN_VERSION) + \")\";\n\n#ifdef CERES_NO_LAPACK\n  value += \"-no_lapack\";\n#else\n  value += \"-lapack\";\n#endif\n\n#ifndef CERES_NO_SUITESPARSE\n  value += \"-suitesparse-(\" + std::string(CERES_SUITESPARSE_VERSION) + \")\";\n#endif\n\n#ifndef CERES_NO_CXSPARSE\n  value += \"-cxsparse-(\" + std::string(CERES_CXSPARSE_VERSION) + \")\";\n#endif\n\n#ifndef CERES_NO_ACCELERATE_SPARSE\n  value += \"-acceleratesparse\";\n#endif\n\n#ifdef CERES_USE_EIGEN_SPARSE\n  value += \"-eigensparse\";\n#endif\n\n#ifdef CERES_RESTRUCT_SCHUR_SPECIALIZATIONS\n  value += \"-no_schur_specializations\";\n#endif\n\n#ifdef CERES_USE_OPENMP\n  value += \"-openmp\";\n#else\n  value += \"-no_openmp\";\n#endif\n\n#ifdef CERES_NO_CUSTOM_BLAS\n  value += \"-no_custom_blas\";\n#endif\n\n  return value;\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/solver_utils.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include <algorithm>\n#include <string>\n\n#include \"ceres/iteration_callback.h\"\n#include \"ceres/types.h\"\n\nnamespace ceres {\nnamespace internal {\n\ntemplate <typename SummaryType>\nbool IsSolutionUsable(const SummaryType& summary) {\n  return (summary.termination_type == CONVERGENCE ||\n          summary.termination_type == NO_CONVERGENCE ||\n          summary.termination_type == USER_SUCCESS);\n}\n\ntemplate <typename SummaryType>\nvoid SetSummaryFinalCost(SummaryType* summary) {\n  summary->final_cost = summary->initial_cost;\n  // We need the loop here, instead of just looking at the last\n  // iteration because the minimizer maybe making non-monotonic steps.\n  for (int i = 0; i < summary->iterations.size(); ++i) {\n    const IterationSummary& iteration_summary = summary->iterations[i];\n    summary->final_cost = std::min(iteration_summary.cost, summary->final_cost);\n  }\n}\n\nstd::string VersionString();\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/sparse_cholesky.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/sparse_cholesky.h\"\n\n#include \"ceres/accelerate_sparse.h\"\n#include \"ceres/cxsparse.h\"\n#include \"ceres/eigensparse.h\"\n#include \"ceres/float_cxsparse.h\"\n#include \"ceres/float_suitesparse.h\"\n#include \"ceres/iterative_refiner.h\"\n#include \"ceres/suitesparse.h\"\n\nnamespace ceres {\nnamespace internal {\n\nstd::unique_ptr<SparseCholesky> SparseCholesky::Create(\n    const LinearSolver::Options& options) {\n  const OrderingType ordering_type = options.use_postordering ? AMD : NATURAL;\n  std::unique_ptr<SparseCholesky> sparse_cholesky;\n\n  switch (options.sparse_linear_algebra_library_type) {\n    case SUITE_SPARSE:\n#ifndef CERES_NO_SUITESPARSE\n      if (options.use_mixed_precision_solves) {\n        sparse_cholesky = FloatSuiteSparseCholesky::Create(ordering_type);\n      } else {\n        sparse_cholesky = SuiteSparseCholesky::Create(ordering_type);\n      }\n      break;\n#else\n      LOG(FATAL) << \"Ceres was compiled without support for SuiteSparse.\";\n#endif\n\n    case EIGEN_SPARSE:\n#ifdef CERES_USE_EIGEN_SPARSE\n      if (options.use_mixed_precision_solves) {\n        sparse_cholesky = FloatEigenSparseCholesky::Create(ordering_type);\n      } else {\n        sparse_cholesky = EigenSparseCholesky::Create(ordering_type);\n      }\n      break;\n#else\n      LOG(FATAL) << \"Ceres was compiled without support for \"\n                 << \"Eigen's sparse Cholesky factorization routines.\";\n#endif\n\n    case CX_SPARSE:\n#ifndef CERES_NO_CXSPARSE\n      if (options.use_mixed_precision_solves) {\n        sparse_cholesky = FloatCXSparseCholesky::Create(ordering_type);\n      } else {\n        sparse_cholesky = CXSparseCholesky::Create(ordering_type);\n      }\n      break;\n#else\n      LOG(FATAL) << \"Ceres was compiled without support for CXSparse.\";\n#endif\n\n    case ACCELERATE_SPARSE:\n#ifndef CERES_NO_ACCELERATE_SPARSE\n      if (options.use_mixed_precision_solves) {\n        sparse_cholesky = AppleAccelerateCholesky<float>::Create(ordering_type);\n      } else {\n        sparse_cholesky = AppleAccelerateCholesky<double>::Create(ordering_type);\n      }\n      break;\n#else\n      LOG(FATAL) << \"Ceres was compiled without support for Apple's Accelerate \"\n                 << \"framework solvers.\";\n#endif\n\n    default:\n      LOG(FATAL) << \"Unknown sparse linear algebra library type : \"\n                 << SparseLinearAlgebraLibraryTypeToString(\n                        options.sparse_linear_algebra_library_type);\n  }\n\n  if (options.max_num_refinement_iterations > 0) {\n    std::unique_ptr<IterativeRefiner> refiner(\n        new IterativeRefiner(options.max_num_refinement_iterations));\n    sparse_cholesky = std::unique_ptr<SparseCholesky>(new RefinedSparseCholesky(\n        std::move(sparse_cholesky), std::move(refiner)));\n  }\n  return sparse_cholesky;\n}\n\nSparseCholesky::~SparseCholesky() {}\n\nLinearSolverTerminationType SparseCholesky::FactorAndSolve(\n    CompressedRowSparseMatrix* lhs,\n    const double* rhs,\n    double* solution,\n    std::string* message) {\n  LinearSolverTerminationType termination_type = Factorize(lhs, message);\n  if (termination_type == LINEAR_SOLVER_SUCCESS) {\n    termination_type = Solve(rhs, solution, message);\n  }\n  return termination_type;\n}\n\nRefinedSparseCholesky::RefinedSparseCholesky(\n    std::unique_ptr<SparseCholesky> sparse_cholesky,\n    std::unique_ptr<IterativeRefiner> iterative_refiner)\n    : sparse_cholesky_(std::move(sparse_cholesky)),\n      iterative_refiner_(std::move(iterative_refiner)) {}\n\nRefinedSparseCholesky::~RefinedSparseCholesky() {}\n\nCompressedRowSparseMatrix::StorageType RefinedSparseCholesky::StorageType()\n    const {\n  return sparse_cholesky_->StorageType();\n}\n\nLinearSolverTerminationType RefinedSparseCholesky::Factorize(\n    CompressedRowSparseMatrix* lhs, std::string* message) {\n  lhs_ = lhs;\n  return sparse_cholesky_->Factorize(lhs, message);\n}\n\nLinearSolverTerminationType RefinedSparseCholesky::Solve(const double* rhs,\n                                                         double* solution,\n                                                         std::string* message) {\n  CHECK(lhs_ != nullptr);\n  auto termination_type = sparse_cholesky_->Solve(rhs, solution, message);\n  if (termination_type != LINEAR_SOLVER_SUCCESS) {\n    return termination_type;\n  }\n\n  iterative_refiner_->Refine(*lhs_, rhs, sparse_cholesky_.get(), solution);\n  return LINEAR_SOLVER_SUCCESS;\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/sparse_cholesky.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_SPARSE_CHOLESKY_H_\n#define CERES_INTERNAL_SPARSE_CHOLESKY_H_\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#include <memory>\n#include \"ceres/linear_solver.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// An interface that abstracts away the internal details of various\n// sparse linear algebra libraries and offers a simple API for solving\n// symmetric positive definite linear systems using a sparse Cholesky\n// factorization.\n//\n// Instances of SparseCholesky are expected to cache the symbolic\n// factorization of the linear system. They do this on the first call\n// to Factorize or FactorAndSolve. Subsequent calls to Factorize and\n// FactorAndSolve are expected to have the same sparsity structure.\n//\n// Example usage:\n//\n//  std::unique_ptr<SparseCholesky>\n//  sparse_cholesky(SparseCholesky::Create(SUITE_SPARSE, AMD));\n//\n//  CompressedRowSparseMatrix lhs = ...;\n//  std::string message;\n//  CHECK_EQ(sparse_cholesky->Factorize(&lhs, &message), LINEAR_SOLVER_SUCCESS);\n//  Vector rhs = ...;\n//  Vector solution = ...;\n//  CHECK_EQ(sparse_cholesky->Solve(rhs.data(), solution.data(), &message),\n//           LINEAR_SOLVER_SUCCESS);\n\nclass SparseCholesky {\n public:\n  static std::unique_ptr<SparseCholesky> Create(\n      const LinearSolver::Options& options);\n\n  virtual ~SparseCholesky();\n\n  // Due to the symmetry of the linear system, sparse linear algebra\n  // libraries only use one half of the input matrix. Whether it is\n  // the upper or the lower triangular part of the matrix depends on\n  // the library and the re-ordering strategy being used. This\n  // function tells the user the storage type expected of the input\n  // matrix for the sparse linear algebra library and reordering\n  // strategy used.\n  virtual CompressedRowSparseMatrix::StorageType StorageType() const = 0;\n\n  // Computes the numeric factorization of the given matrix.  If this\n  // is the first call to Factorize, first the symbolic factorization\n  // will be computed and cached and the numeric factorization will be\n  // computed based on that.\n  //\n  // Subsequent calls to Factorize will use that symbolic\n  // factorization assuming that the sparsity of the matrix has\n  // remained constant.\n  virtual LinearSolverTerminationType Factorize(\n      CompressedRowSparseMatrix* lhs, std::string* message) = 0;\n\n  // Computes the solution to the equation\n  //\n  // lhs * solution = rhs\n  virtual LinearSolverTerminationType Solve(const double* rhs,\n                                            double* solution,\n                                            std::string* message) = 0;\n\n  // Convenience method which combines a call to Factorize and\n  // Solve. Solve is only called if Factorize returns\n  // LINEAR_SOLVER_SUCCESS.\n  virtual LinearSolverTerminationType FactorAndSolve(\n      CompressedRowSparseMatrix* lhs,\n      const double* rhs,\n      double* solution,\n      std::string* message);\n\n};\n\nclass IterativeRefiner;\n\n// Computes an initial solution using the given instance of\n// SparseCholesky, and then refines it using the IterativeRefiner.\nclass RefinedSparseCholesky : public SparseCholesky {\n public:\n  RefinedSparseCholesky(std::unique_ptr<SparseCholesky> sparse_cholesky,\n                        std::unique_ptr<IterativeRefiner> iterative_refiner);\n  virtual ~RefinedSparseCholesky();\n\n  virtual CompressedRowSparseMatrix::StorageType StorageType() const;\n  virtual LinearSolverTerminationType Factorize(\n      CompressedRowSparseMatrix* lhs, std::string* message);\n  virtual LinearSolverTerminationType Solve(const double* rhs,\n                                            double* solution,\n                                            std::string* message);\n\n private:\n  std::unique_ptr<SparseCholesky> sparse_cholesky_;\n  std::unique_ptr<IterativeRefiner> iterative_refiner_;\n  CompressedRowSparseMatrix* lhs_ = nullptr;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_SPARSE_CHOLESKY_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/sparse_cholesky_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/sparse_cholesky.h\"\n\n#include <memory>\n#include <numeric>\n#include <vector>\n\n#include \"Eigen/Dense\"\n#include \"Eigen/SparseCore\"\n#include \"ceres/block_sparse_matrix.h\"\n#include \"ceres/compressed_row_sparse_matrix.h\"\n#include \"ceres/inner_product_computer.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/iterative_refiner.h\"\n#include \"ceres/random.h\"\n#include \"glog/logging.h\"\n#include \"gmock/gmock.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nnamespace {\n\nBlockSparseMatrix* CreateRandomFullRankMatrix(const int num_col_blocks,\n                                              const int min_col_block_size,\n                                              const int max_col_block_size,\n                                              const double block_density) {\n  // Create a random matrix\n  BlockSparseMatrix::RandomMatrixOptions options;\n  options.num_col_blocks = num_col_blocks;\n  options.min_col_block_size = min_col_block_size;\n  options.max_col_block_size = max_col_block_size;\n\n  options.num_row_blocks = 2 * num_col_blocks;\n  options.min_row_block_size = 1;\n  options.max_row_block_size = max_col_block_size;\n  options.block_density = block_density;\n  std::unique_ptr<BlockSparseMatrix> random_matrix(\n      BlockSparseMatrix::CreateRandomMatrix(options));\n\n  // Add a diagonal block sparse matrix to make it full rank.\n  Vector diagonal = Vector::Ones(random_matrix->num_cols());\n  std::unique_ptr<BlockSparseMatrix> block_diagonal(\n      BlockSparseMatrix::CreateDiagonalMatrix(\n          diagonal.data(), random_matrix->block_structure()->cols));\n  random_matrix->AppendRows(*block_diagonal);\n  return random_matrix.release();\n}\n\nstatic bool ComputeExpectedSolution(const CompressedRowSparseMatrix& lhs,\n                                    const Vector& rhs,\n                                    Vector* solution) {\n  Matrix eigen_lhs;\n  lhs.ToDenseMatrix(&eigen_lhs);\n  if (lhs.storage_type() == CompressedRowSparseMatrix::UPPER_TRIANGULAR) {\n    Matrix full_lhs = eigen_lhs.selfadjointView<Eigen::Upper>();\n    Eigen::LLT<Matrix, Eigen::Upper> llt =\n        eigen_lhs.selfadjointView<Eigen::Upper>().llt();\n    if (llt.info() != Eigen::Success) {\n      return false;\n    }\n    *solution = llt.solve(rhs);\n    return (llt.info() == Eigen::Success);\n  }\n\n  Matrix full_lhs = eigen_lhs.selfadjointView<Eigen::Lower>();\n  Eigen::LLT<Matrix, Eigen::Lower> llt =\n      eigen_lhs.selfadjointView<Eigen::Lower>().llt();\n  if (llt.info() != Eigen::Success) {\n    return false;\n  }\n  *solution = llt.solve(rhs);\n  return (llt.info() == Eigen::Success);\n}\n\nvoid SparseCholeskySolverUnitTest(\n    const SparseLinearAlgebraLibraryType sparse_linear_algebra_library_type,\n    const OrderingType ordering_type,\n    const bool use_block_structure,\n    const int num_blocks,\n    const int min_block_size,\n    const int max_block_size,\n    const double block_density) {\n  LinearSolver::Options sparse_cholesky_options;\n  sparse_cholesky_options.sparse_linear_algebra_library_type =\n      sparse_linear_algebra_library_type;\n  sparse_cholesky_options.use_postordering = (ordering_type == AMD);\n  std::unique_ptr<SparseCholesky> sparse_cholesky =\n      SparseCholesky::Create(sparse_cholesky_options);\n  const CompressedRowSparseMatrix::StorageType storage_type =\n      sparse_cholesky->StorageType();\n\n  std::unique_ptr<BlockSparseMatrix> m(CreateRandomFullRankMatrix(\n      num_blocks, min_block_size, max_block_size, block_density));\n  std::unique_ptr<InnerProductComputer> inner_product_computer(\n      InnerProductComputer::Create(*m, storage_type));\n  inner_product_computer->Compute();\n  CompressedRowSparseMatrix* lhs = inner_product_computer->mutable_result();\n\n  if (!use_block_structure) {\n    lhs->mutable_row_blocks()->clear();\n    lhs->mutable_col_blocks()->clear();\n  }\n\n  Vector rhs = Vector::Random(lhs->num_rows());\n  Vector expected(lhs->num_rows());\n  Vector actual(lhs->num_rows());\n\n  EXPECT_TRUE(ComputeExpectedSolution(*lhs, rhs, &expected));\n  std::string message;\n  EXPECT_EQ(\n      sparse_cholesky->FactorAndSolve(lhs, rhs.data(), actual.data(), &message),\n      LINEAR_SOLVER_SUCCESS);\n  Matrix eigen_lhs;\n  lhs->ToDenseMatrix(&eigen_lhs);\n  EXPECT_NEAR((actual - expected).norm() / actual.norm(),\n              0.0,\n              std::numeric_limits<double>::epsilon() * 20)\n      << \"\\n\"\n      << eigen_lhs;\n}\n\ntypedef ::testing::tuple<SparseLinearAlgebraLibraryType, OrderingType, bool>\n    Param;\n\nstd::string ParamInfoToString(testing::TestParamInfo<Param> info) {\n  Param param = info.param;\n  std::stringstream ss;\n  ss << SparseLinearAlgebraLibraryTypeToString(::testing::get<0>(param)) << \"_\"\n     << (::testing::get<1>(param) == AMD ? \"AMD\" : \"NATURAL\") << \"_\"\n     << (::testing::get<2>(param) ? \"UseBlockStructure\" : \"NoBlockStructure\");\n  return ss.str();\n}\n\n}  // namespace\n\nclass SparseCholeskyTest : public ::testing::TestWithParam<Param> {};\n\nTEST_P(SparseCholeskyTest, FactorAndSolve) {\n  SetRandomState(2982);\n  const int kMinNumBlocks = 1;\n  const int kMaxNumBlocks = 10;\n  const int kNumTrials = 10;\n  const int kMinBlockSize = 1;\n  const int kMaxBlockSize = 5;\n\n  for (int num_blocks = kMinNumBlocks; num_blocks < kMaxNumBlocks;\n       ++num_blocks) {\n    for (int trial = 0; trial < kNumTrials; ++trial) {\n      const double block_density = std::max(0.1, RandDouble());\n      Param param = GetParam();\n      SparseCholeskySolverUnitTest(::testing::get<0>(param),\n                                   ::testing::get<1>(param),\n                                   ::testing::get<2>(param),\n                                   num_blocks,\n                                   kMinBlockSize,\n                                   kMaxBlockSize,\n                                   block_density);\n    }\n  }\n}\n\nnamespace {\n\n#ifndef CERES_NO_SUITESPARSE\nINSTANTIATE_TEST_SUITE_P(SuiteSparseCholesky,\n                         SparseCholeskyTest,\n                         ::testing::Combine(::testing::Values(SUITE_SPARSE),\n                                            ::testing::Values(AMD, NATURAL),\n                                            ::testing::Values(true, false)),\n                         ParamInfoToString);\n#endif\n\n#ifndef CERES_NO_CXSPARSE\nINSTANTIATE_TEST_SUITE_P(CXSparseCholesky,\n                         SparseCholeskyTest,\n                         ::testing::Combine(::testing::Values(CX_SPARSE),\n                                            ::testing::Values(AMD, NATURAL),\n                                            ::testing::Values(true, false)),\n                         ParamInfoToString);\n#endif\n\n#ifndef CERES_NO_ACCELERATE_SPARSE\nINSTANTIATE_TEST_SUITE_P(\n    AccelerateSparseCholesky,\n    SparseCholeskyTest,\n    ::testing::Combine(::testing::Values(ACCELERATE_SPARSE),\n                       ::testing::Values(AMD, NATURAL),\n                       ::testing::Values(true, false)),\n    ParamInfoToString);\n\nINSTANTIATE_TEST_SUITE_P(\n    AccelerateSparseCholeskySingle,\n    SparseCholeskyTest,\n    ::testing::Combine(::testing::Values(ACCELERATE_SPARSE),\n                       ::testing::Values(AMD, NATURAL),\n                       ::testing::Values(true, false)),\n    ParamInfoToString);\n#endif\n\n#ifdef CERES_USE_EIGEN_SPARSE\nINSTANTIATE_TEST_SUITE_P(EigenSparseCholesky,\n                         SparseCholeskyTest,\n                         ::testing::Combine(::testing::Values(EIGEN_SPARSE),\n                                            ::testing::Values(AMD, NATURAL),\n                                            ::testing::Values(true, false)),\n                         ParamInfoToString);\n\nINSTANTIATE_TEST_SUITE_P(EigenSparseCholeskySingle,\n                         SparseCholeskyTest,\n                         ::testing::Combine(::testing::Values(EIGEN_SPARSE),\n                                            ::testing::Values(AMD, NATURAL),\n                                            ::testing::Values(true, false)),\n                         ParamInfoToString);\n#endif\n\nclass MockSparseCholesky : public SparseCholesky {\n public:\n  MOCK_CONST_METHOD0(StorageType, CompressedRowSparseMatrix::StorageType());\n  MOCK_METHOD2(Factorize,\n               LinearSolverTerminationType(CompressedRowSparseMatrix* lhs,\n                                           std::string* message));\n  MOCK_METHOD3(Solve,\n               LinearSolverTerminationType(const double* rhs,\n                                           double* solution,\n                                           std::string* message));\n};\n\nclass MockIterativeRefiner : public IterativeRefiner {\n public:\n  MockIterativeRefiner() : IterativeRefiner(1) {}\n  MOCK_METHOD4(Refine,\n               void(const SparseMatrix& lhs,\n                    const double* rhs,\n                    SparseCholesky* sparse_cholesky,\n                    double* solution));\n};\n\nusing testing::_;\nusing testing::Return;\n\nTEST(RefinedSparseCholesky, StorageType) {\n  MockSparseCholesky* mock_sparse_cholesky = new MockSparseCholesky;\n  MockIterativeRefiner* mock_iterative_refiner = new MockIterativeRefiner;\n  EXPECT_CALL(*mock_sparse_cholesky, StorageType())\n      .Times(1)\n      .WillRepeatedly(Return(CompressedRowSparseMatrix::UPPER_TRIANGULAR));\n  EXPECT_CALL(*mock_iterative_refiner, Refine(_, _, _, _)).Times(0);\n  std::unique_ptr<SparseCholesky> sparse_cholesky(mock_sparse_cholesky);\n  std::unique_ptr<IterativeRefiner> iterative_refiner(mock_iterative_refiner);\n  RefinedSparseCholesky refined_sparse_cholesky(std::move(sparse_cholesky),\n                                                std::move(iterative_refiner));\n  EXPECT_EQ(refined_sparse_cholesky.StorageType(),\n            CompressedRowSparseMatrix::UPPER_TRIANGULAR);\n};\n\nTEST(RefinedSparseCholesky, Factorize) {\n  MockSparseCholesky* mock_sparse_cholesky = new MockSparseCholesky;\n  MockIterativeRefiner* mock_iterative_refiner = new MockIterativeRefiner;\n  EXPECT_CALL(*mock_sparse_cholesky, Factorize(_, _))\n      .Times(1)\n      .WillRepeatedly(Return(LINEAR_SOLVER_SUCCESS));\n  EXPECT_CALL(*mock_iterative_refiner, Refine(_, _, _, _)).Times(0);\n  std::unique_ptr<SparseCholesky> sparse_cholesky(mock_sparse_cholesky);\n  std::unique_ptr<IterativeRefiner> iterative_refiner(mock_iterative_refiner);\n  RefinedSparseCholesky refined_sparse_cholesky(std::move(sparse_cholesky),\n                                                std::move(iterative_refiner));\n  CompressedRowSparseMatrix m(1, 1, 1);\n  std::string message;\n  EXPECT_EQ(refined_sparse_cholesky.Factorize(&m, &message),\n            LINEAR_SOLVER_SUCCESS);\n};\n\nTEST(RefinedSparseCholesky, FactorAndSolveWithUnsuccessfulFactorization) {\n  MockSparseCholesky* mock_sparse_cholesky = new MockSparseCholesky;\n  MockIterativeRefiner* mock_iterative_refiner = new MockIterativeRefiner;\n  EXPECT_CALL(*mock_sparse_cholesky, Factorize(_, _))\n      .Times(1)\n      .WillRepeatedly(Return(LINEAR_SOLVER_FAILURE));\n  EXPECT_CALL(*mock_sparse_cholesky, Solve(_, _, _)).Times(0);\n  EXPECT_CALL(*mock_iterative_refiner, Refine(_, _, _, _)).Times(0);\n  std::unique_ptr<SparseCholesky> sparse_cholesky(mock_sparse_cholesky);\n  std::unique_ptr<IterativeRefiner> iterative_refiner(mock_iterative_refiner);\n  RefinedSparseCholesky refined_sparse_cholesky(std::move(sparse_cholesky),\n                                                std::move(iterative_refiner));\n  CompressedRowSparseMatrix m(1, 1, 1);\n  std::string message;\n  double rhs;\n  double solution;\n  EXPECT_EQ(\n      refined_sparse_cholesky.FactorAndSolve(&m, &rhs, &solution, &message),\n      LINEAR_SOLVER_FAILURE);\n};\n\nTEST(RefinedSparseCholesky, FactorAndSolveWithSuccess) {\n  MockSparseCholesky* mock_sparse_cholesky = new MockSparseCholesky;\n  std::unique_ptr<MockIterativeRefiner> mock_iterative_refiner(\n      new MockIterativeRefiner);\n  EXPECT_CALL(*mock_sparse_cholesky, Factorize(_, _))\n      .Times(1)\n      .WillRepeatedly(Return(LINEAR_SOLVER_SUCCESS));\n  EXPECT_CALL(*mock_sparse_cholesky, Solve(_, _, _))\n      .Times(1)\n      .WillRepeatedly(Return(LINEAR_SOLVER_SUCCESS));\n  EXPECT_CALL(*mock_iterative_refiner, Refine(_, _, _, _)).Times(1);\n\n  std::unique_ptr<SparseCholesky> sparse_cholesky(mock_sparse_cholesky);\n  std::unique_ptr<IterativeRefiner> iterative_refiner(\n      std::move(mock_iterative_refiner));\n  RefinedSparseCholesky refined_sparse_cholesky(std::move(sparse_cholesky),\n                                                std::move(iterative_refiner));\n  CompressedRowSparseMatrix m(1, 1, 1);\n  std::string message;\n  double rhs;\n  double solution;\n  EXPECT_EQ(\n      refined_sparse_cholesky.FactorAndSolve(&m, &rhs, &solution, &message),\n      LINEAR_SOLVER_SUCCESS);\n};\n\n}  // namespace\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/sparse_matrix.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/sparse_matrix.h\"\n\nnamespace ceres {\nnamespace internal {\n\nSparseMatrix::~SparseMatrix() {\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/sparse_matrix.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Interface definition for sparse matrices.\n\n#ifndef CERES_INTERNAL_SPARSE_MATRIX_H_\n#define CERES_INTERNAL_SPARSE_MATRIX_H_\n\n#include <cstdio>\n#include \"ceres/linear_operator.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/types.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// This class defines the interface for storing and manipulating\n// sparse matrices. The key property that differentiates different\n// sparse matrices is how they are organized in memory and how the\n// information about the sparsity structure of the matrix is\n// stored. This has significant implications for linear solvers\n// operating on these matrices.\n//\n// To deal with the different kinds of layouts, we will assume that a\n// sparse matrix will have a two part representation. A values array\n// that will be used to store the entries of the sparse matrix and\n// some sort of a layout object that tells the user the sparsity\n// structure and layout of the values array. For example in case of\n// the TripletSparseMatrix, this information is carried in the rows\n// and cols arrays and for the BlockSparseMatrix, this information is\n// carried in the CompressedRowBlockStructure object.\n//\n// This interface deliberately does not contain any information about\n// the structure of the sparse matrix as that seems to be highly\n// matrix type dependent and we are at this stage unable to come up\n// with an efficient high level interface that spans multiple sparse\n// matrix types.\nclass SparseMatrix : public LinearOperator {\n public:\n  virtual ~SparseMatrix();\n\n  // y += Ax;\n  virtual void RightMultiply(const double* x, double* y) const = 0;\n  // y += A'x;\n  virtual void LeftMultiply(const double* x, double* y) const = 0;\n\n  // In MATLAB notation sum(A.*A, 1)\n  virtual void SquaredColumnNorm(double* x) const = 0;\n  // A = A * diag(scale)\n  virtual void ScaleColumns(const double* scale) = 0;\n\n  // A = 0. A->num_nonzeros() == 0 is true after this call. The\n  // sparsity pattern is preserved.\n  virtual void SetZero() = 0;\n\n  // Resize and populate dense_matrix with a dense version of the\n  // sparse matrix.\n  virtual void ToDenseMatrix(Matrix* dense_matrix) const = 0;\n\n  // Write out the matrix as a sequence of (i,j,s) triplets. This\n  // format is useful for loading the matrix into MATLAB/octave as a\n  // sparse matrix.\n  virtual void ToTextFile(FILE* file) const = 0;\n\n  // Accessors for the values array that stores the entries of the\n  // sparse matrix. The exact interpretation of the values of this\n  // array depends on the particular kind of SparseMatrix being\n  // accessed.\n  virtual double* mutable_values() = 0;\n  virtual const double* values() const = 0;\n\n  virtual int num_rows() const = 0;\n  virtual int num_cols() const = 0;\n  virtual int num_nonzeros() const = 0;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_SPARSE_MATRIX_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/sparse_normal_cholesky_solver.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/sparse_normal_cholesky_solver.h\"\n\n#include <algorithm>\n#include <cstring>\n#include <ctime>\n#include <memory>\n\n#include \"ceres/block_sparse_matrix.h\"\n#include \"ceres/inner_product_computer.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/iterative_refiner.h\"\n#include \"ceres/linear_solver.h\"\n#include \"ceres/sparse_cholesky.h\"\n#include \"ceres/triplet_sparse_matrix.h\"\n#include \"ceres/types.h\"\n#include \"ceres/wall_time.h\"\n\nnamespace ceres {\nnamespace internal {\n\nSparseNormalCholeskySolver::SparseNormalCholeskySolver(\n    const LinearSolver::Options& options)\n    : options_(options) {\n  sparse_cholesky_ = SparseCholesky::Create(options);\n}\n\nSparseNormalCholeskySolver::~SparseNormalCholeskySolver() {}\n\nLinearSolver::Summary SparseNormalCholeskySolver::SolveImpl(\n    BlockSparseMatrix* A,\n    const double* b,\n    const LinearSolver::PerSolveOptions& per_solve_options,\n    double* x) {\n  EventLogger event_logger(\"SparseNormalCholeskySolver::Solve\");\n  LinearSolver::Summary summary;\n  summary.num_iterations = 1;\n  summary.termination_type = LINEAR_SOLVER_SUCCESS;\n  summary.message = \"Success.\";\n\n  const int num_cols = A->num_cols();\n  VectorRef xref(x, num_cols);\n  xref.setZero();\n  rhs_.resize(num_cols);\n  rhs_.setZero();\n  A->LeftMultiply(b, rhs_.data());\n  event_logger.AddEvent(\"Compute RHS\");\n\n  if (per_solve_options.D != NULL) {\n    // Temporarily append a diagonal block to the A matrix, but undo\n    // it before returning the matrix to the user.\n    std::unique_ptr<BlockSparseMatrix> regularizer;\n    regularizer.reset(BlockSparseMatrix::CreateDiagonalMatrix(\n        per_solve_options.D, A->block_structure()->cols));\n    event_logger.AddEvent(\"Diagonal\");\n    A->AppendRows(*regularizer);\n    event_logger.AddEvent(\"Append\");\n  }\n  event_logger.AddEvent(\"Append Rows\");\n\n  if (inner_product_computer_.get() == NULL) {\n    inner_product_computer_.reset(\n        InnerProductComputer::Create(*A, sparse_cholesky_->StorageType()));\n\n    event_logger.AddEvent(\"InnerProductComputer::Create\");\n  }\n\n  inner_product_computer_->Compute();\n  event_logger.AddEvent(\"InnerProductComputer::Compute\");\n\n  if (per_solve_options.D != NULL) {\n    A->DeleteRowBlocks(A->block_structure()->cols.size());\n  }\n\n  summary.termination_type = sparse_cholesky_->FactorAndSolve(\n      inner_product_computer_->mutable_result(),\n      rhs_.data(),\n      x,\n      &summary.message);\n  event_logger.AddEvent(\"SparseCholesky::FactorAndSolve\");\n  return summary;\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/sparse_normal_cholesky_solver.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// A solver for sparse linear least squares problem based on solving\n// the normal equations via a sparse cholesky factorization.\n\n#ifndef CERES_INTERNAL_SPARSE_NORMAL_CHOLESKY_SOLVER_H_\n#define CERES_INTERNAL_SPARSE_NORMAL_CHOLESKY_SOLVER_H_\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#include <vector>\n#include \"ceres/linear_solver.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass CompressedRowSparseMatrix;\nclass InnerProductComputer;\nclass SparseCholesky;\n\n// Solves the normal equations (A'A + D'D) x = A'b, using the sparse\n// linear algebra library of the user's choice.\nclass SparseNormalCholeskySolver : public BlockSparseMatrixSolver {\n public:\n  explicit SparseNormalCholeskySolver(const LinearSolver::Options& options);\n  SparseNormalCholeskySolver(const SparseNormalCholeskySolver&) = delete;\n  void operator=(const SparseNormalCholeskySolver&) = delete;\n\n  virtual ~SparseNormalCholeskySolver();\n\n private:\n  LinearSolver::Summary SolveImpl(\n      BlockSparseMatrix* A,\n      const double* b,\n      const LinearSolver::PerSolveOptions& options,\n      double* x) final;\n\n  const LinearSolver::Options options_;\n  Vector rhs_;\n  std::unique_ptr<SparseCholesky> sparse_cholesky_;\n  std::unique_ptr<InnerProductComputer> inner_product_computer_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_SPARSE_NORMAL_CHOLESKY_SOLVER_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/sparse_normal_cholesky_solver_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include <memory>\n#include \"ceres/block_sparse_matrix.h\"\n#include \"ceres/casts.h\"\n#include \"ceres/context_impl.h\"\n#include \"ceres/linear_least_squares_problems.h\"\n#include \"ceres/linear_solver.h\"\n#include \"ceres/triplet_sparse_matrix.h\"\n#include \"ceres/types.h\"\n#include \"glog/logging.h\"\n#include \"gtest/gtest.h\"\n\n#include \"Eigen/Cholesky\"\n\nnamespace ceres {\nnamespace internal {\n\n// TODO(sameeragarwal): These tests needs to be re-written, since\n// SparseNormalCholeskySolver is a composition of two classes now,\n// InnerProductComputer and SparseCholesky.\n//\n// So the test should exercise the composition, rather than the\n// numerics of the solver, which are well covered by tests for those\n// classes.\nclass SparseNormalCholeskySolverTest : public ::testing::Test {\n protected:\n  void SetUp() final {\n    std::unique_ptr<LinearLeastSquaresProblem> problem(\n        CreateLinearLeastSquaresProblemFromId(2));\n\n    CHECK(problem != nullptr);\n    A_.reset(down_cast<BlockSparseMatrix*>(problem->A.release()));\n    b_.reset(problem->b.release());\n    D_.reset(problem->D.release());\n  }\n\n  void TestSolver(const LinearSolver::Options& options, double* D) {\n    Matrix dense_A;\n    A_->ToDenseMatrix(&dense_A);\n    Matrix lhs = dense_A.transpose() * dense_A;\n    if (D != NULL) {\n      lhs += (ConstVectorRef(D, A_->num_cols()).array() *\n              ConstVectorRef(D, A_->num_cols()).array())\n                 .matrix()\n                 .asDiagonal();\n    }\n\n    Vector rhs(A_->num_cols());\n    rhs.setZero();\n    A_->LeftMultiply(b_.get(), rhs.data());\n    Vector expected_solution = lhs.llt().solve(rhs);\n\n    std::unique_ptr<LinearSolver> solver(LinearSolver::Create(options));\n    LinearSolver::PerSolveOptions per_solve_options;\n    per_solve_options.D = D;\n    Vector actual_solution(A_->num_cols());\n    LinearSolver::Summary summary;\n    summary = solver->Solve(\n        A_.get(), b_.get(), per_solve_options, actual_solution.data());\n\n    EXPECT_EQ(summary.termination_type, LINEAR_SOLVER_SUCCESS);\n\n    for (int i = 0; i < A_->num_cols(); ++i) {\n      EXPECT_NEAR(expected_solution(i), actual_solution(i), 1e-8)\n          << \"\\nExpected: \" << expected_solution.transpose()\n          << \"\\nActual: \" << actual_solution.transpose();\n    }\n  }\n\n  void TestSolver(const LinearSolver::Options& options) {\n    TestSolver(options, NULL);\n    TestSolver(options, D_.get());\n  }\n\n  std::unique_ptr<BlockSparseMatrix> A_;\n  std::unique_ptr<double[]> b_;\n  std::unique_ptr<double[]> D_;\n};\n\n#ifndef CERES_NO_SUITESPARSE\nTEST_F(SparseNormalCholeskySolverTest,\n       SparseNormalCholeskyUsingSuiteSparsePreOrdering) {\n  LinearSolver::Options options;\n  options.sparse_linear_algebra_library_type = SUITE_SPARSE;\n  options.type = SPARSE_NORMAL_CHOLESKY;\n  options.use_postordering = false;\n  ContextImpl context;\n  options.context = &context;\n  TestSolver(options);\n}\n\nTEST_F(SparseNormalCholeskySolverTest,\n       SparseNormalCholeskyUsingSuiteSparsePostOrdering) {\n  LinearSolver::Options options;\n  options.sparse_linear_algebra_library_type = SUITE_SPARSE;\n  options.type = SPARSE_NORMAL_CHOLESKY;\n  options.use_postordering = true;\n  ContextImpl context;\n  options.context = &context;\n  TestSolver(options);\n}\n#endif\n\n#ifndef CERES_NO_CXSPARSE\nTEST_F(SparseNormalCholeskySolverTest,\n       SparseNormalCholeskyUsingCXSparsePreOrdering) {\n  LinearSolver::Options options;\n  options.sparse_linear_algebra_library_type = CX_SPARSE;\n  options.type = SPARSE_NORMAL_CHOLESKY;\n  options.use_postordering = false;\n  ContextImpl context;\n  options.context = &context;\n  TestSolver(options);\n}\n\nTEST_F(SparseNormalCholeskySolverTest,\n       SparseNormalCholeskyUsingCXSparsePostOrdering) {\n  LinearSolver::Options options;\n  options.sparse_linear_algebra_library_type = CX_SPARSE;\n  options.type = SPARSE_NORMAL_CHOLESKY;\n  options.use_postordering = true;\n  ContextImpl context;\n  options.context = &context;\n  TestSolver(options);\n}\n#endif\n\n#ifndef CERES_NO_ACCELERATE_SPARSE\nTEST_F(SparseNormalCholeskySolverTest,\n       SparseNormalCholeskyUsingAccelerateSparsePreOrdering) {\n  LinearSolver::Options options;\n  options.sparse_linear_algebra_library_type = ACCELERATE_SPARSE;\n  options.type = SPARSE_NORMAL_CHOLESKY;\n  options.use_postordering = false;\n  ContextImpl context;\n  options.context = &context;\n  TestSolver(options);\n}\n\nTEST_F(SparseNormalCholeskySolverTest,\n       SparseNormalCholeskyUsingAcceleratePostOrdering) {\n  LinearSolver::Options options;\n  options.sparse_linear_algebra_library_type = ACCELERATE_SPARSE;\n  options.type = SPARSE_NORMAL_CHOLESKY;\n  options.use_postordering = true;\n  ContextImpl context;\n  options.context = &context;\n  TestSolver(options);\n}\n#endif\n\n#ifdef CERES_USE_EIGEN_SPARSE\nTEST_F(SparseNormalCholeskySolverTest,\n       SparseNormalCholeskyUsingEigenPreOrdering) {\n  LinearSolver::Options options;\n  options.sparse_linear_algebra_library_type = EIGEN_SPARSE;\n  options.type = SPARSE_NORMAL_CHOLESKY;\n  options.use_postordering = false;\n  ContextImpl context;\n  options.context = &context;\n  TestSolver(options);\n}\n\nTEST_F(SparseNormalCholeskySolverTest,\n       SparseNormalCholeskyUsingEigenPostOrdering) {\n  LinearSolver::Options options;\n  options.sparse_linear_algebra_library_type = EIGEN_SPARSE;\n  options.type = SPARSE_NORMAL_CHOLESKY;\n  options.use_postordering = true;\n  ContextImpl context;\n  options.context = &context;\n  TestSolver(options);\n}\n#endif  // CERES_USE_EIGEN_SPARSE\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/split.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n\n#include \"ceres/split.h\"\n\n#include <iterator>\n#include <string>\n#include <vector>\n\n#include \"ceres/internal/port.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::string;\nusing std::vector;\n\n// If we know how much to allocate for a vector of strings, we can allocate the\n// vector<string> only once and directly to the right size. This saves in\n// between 33-66 % of memory space needed for the result, and runs faster in the\n// microbenchmarks.\n//\n// The reserve is only implemented for the single character delim.\n//\n// The implementation for counting is cut-and-pasted from\n// SplitStringToIteratorUsing. I could have written my own counting iterator,\n// and use the existing template function, but probably this is more clear and\n// more sure to get optimized to reasonable code.\nstatic int CalculateReserveForVector(const string& full, const char* delim) {\n  int count = 0;\n  if (delim[0] != '\\0' && delim[1] == '\\0') {\n    // Optimize the common case where delim is a single character.\n    char c = delim[0];\n    const char* p = full.data();\n    const char* end = p + full.size();\n    while (p != end) {\n      if (*p == c) {  // This could be optimized with hasless(v,1) trick.\n        ++p;\n      } else {\n        while (++p != end && *p != c) {\n          // Skip to the next occurence of the delimiter.\n        }\n        ++count;\n      }\n    }\n  }\n  return count;\n}\n\ntemplate <typename StringType, typename ITR>\nstatic inline\nvoid SplitStringToIteratorUsing(const StringType& full,\n                                const char* delim,\n                                ITR& result) {\n  // Optimize the common case where delim is a single character.\n  if (delim[0] != '\\0' && delim[1] == '\\0') {\n    char c = delim[0];\n    const char* p = full.data();\n    const char* end = p + full.size();\n    while (p != end) {\n      if (*p == c) {\n        ++p;\n      } else {\n        const char* start = p;\n        while (++p != end && *p != c) {\n          // Skip to the next occurence of the delimiter.\n        }\n        *result++ = StringType(start, p - start);\n      }\n    }\n    return;\n  }\n\n  string::size_type begin_index, end_index;\n  begin_index = full.find_first_not_of(delim);\n  while (begin_index != string::npos) {\n    end_index = full.find_first_of(delim, begin_index);\n    if (end_index == string::npos) {\n      *result++ = full.substr(begin_index);\n      return;\n    }\n    *result++ = full.substr(begin_index, (end_index - begin_index));\n    begin_index = full.find_first_not_of(delim, end_index);\n  }\n}\n\nvoid SplitStringUsing(const string& full,\n                      const char* delim,\n                      vector<string>* result) {\n  result->reserve(result->size() + CalculateReserveForVector(full, delim));\n  std::back_insert_iterator<vector<string>> it(*result);\n  SplitStringToIteratorUsing(full, delim, it);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/split.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n\n#ifndef CERES_INTERNAL_SPLIT_H_\n#define CERES_INTERNAL_SPLIT_H_\n\n#include <string>\n#include <vector>\n#include \"ceres/internal/port.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// Split a string using one or more character delimiters, presented as a\n// nul-terminated c string. Append the components to 'result'. If there are\n// consecutive delimiters, this function skips over all of them.\nvoid SplitStringUsing(const std::string& full, const char* delim,\n                      std::vector<std::string>* res);\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_SPLIT_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/stl_util.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n\n#ifndef CERES_INTERNAL_STL_UTIL_H_\n#define CERES_INTERNAL_STL_UTIL_H_\n\n#include <algorithm>\n\nnamespace ceres {\n\n// STLDeleteContainerPointers()\n//  For a range within a container of pointers, calls delete\n//  (non-array version) on these pointers.\n// NOTE: for these three functions, we could just implement a DeleteObject\n// functor and then call for_each() on the range and functor, but this\n// requires us to pull in all of algorithm.h, which seems expensive.\n// For hash_[multi]set, it is important that this deletes behind the iterator\n// because the hash_set may call the hash function on the iterator when it is\n// advanced, which could result in the hash function trying to deference a\n// stale pointer.\ntemplate <class ForwardIterator>\nvoid STLDeleteContainerPointers(ForwardIterator begin,\n                                ForwardIterator end) {\n  while (begin != end) {\n    ForwardIterator temp = begin;\n    ++begin;\n    delete *temp;\n  }\n}\n\n// Variant of STLDeleteContainerPointers which allows the container to\n// contain duplicates.\ntemplate <class ForwardIterator>\nvoid STLDeleteUniqueContainerPointers(ForwardIterator begin,\n                                      ForwardIterator end) {\n  sort(begin, end);\n  ForwardIterator new_end = unique(begin, end);\n  while (begin != new_end) {\n    ForwardIterator temp = begin;\n    ++begin;\n    delete *temp;\n  }\n}\n\n// STLDeleteElements() deletes all the elements in an STL container and clears\n// the container.  This function is suitable for use with a vector, set,\n// hash_set, or any other STL container which defines sensible begin(), end(),\n// and clear() methods.\n//\n// If container is NULL, this function is a no-op.\n//\n// As an alternative to calling STLDeleteElements() directly, consider\n// ElementDeleter (defined below), which ensures that your container's elements\n// are deleted when the ElementDeleter goes out of scope.\ntemplate <class T>\nvoid STLDeleteElements(T *container) {\n  if (!container) return;\n  STLDeleteContainerPointers(container->begin(), container->end());\n  container->clear();\n}\n\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_STL_UTIL_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/stringprintf.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: Sanjay Ghemawat\n\n#include \"ceres/stringprintf.h\"\n\n#include <cerrno>\n#include <cstdarg>  // For va_list and related operations\n#include <cstdio>   // MSVC requires this for _vsnprintf\n#include <string>\n#include <vector>\n\n#include \"ceres/internal/port.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::string;\n\n// va_copy() was defined in the C99 standard.  However, it did not appear in the\n// C++ standard until C++11.  This means that if Ceres is being compiled with a\n// strict pre-C++11 standard (e.g. -std=c++03), va_copy() will NOT be defined,\n// as we are using the C++ compiler (it would however be defined if we were\n// using the C compiler).  Note however that both GCC & Clang will in fact\n// define va_copy() when compiling for C++ if the C++ standard is not explicitly\n// specified (i.e. no -std=c++<XX> arg), even though it should not strictly be\n// defined unless -std=c++11 (or greater) was passed.\n#if !defined(va_copy)\n#if defined (__GNUC__)\n// On GCC/Clang, if va_copy() is not defined (C++ standard < C++11 explicitly\n// specified), use the internal __va_copy() version, which should be present\n// in even very old GCC versions.\n#define va_copy(d, s) __va_copy(d, s)\n#else\n// Some older versions of MSVC do not have va_copy(), in which case define it.\n// Although this is required for older MSVC versions, it should also work for\n// other non-GCC/Clang compilers which also do not defined va_copy().\n#define va_copy(d, s) ((d) = (s))\n#endif  // defined (__GNUC__)\n#endif  // !defined(va_copy)\n\nvoid StringAppendV(string* dst, const char* format, va_list ap) {\n  // First try with a small fixed size buffer\n  char space[1024];\n\n  // It's possible for methods that use a va_list to invalidate\n  // the data in it upon use.  The fix is to make a copy\n  // of the structure before using it and use that copy instead.\n  va_list backup_ap;\n  va_copy(backup_ap, ap);\n  int result = vsnprintf(space, sizeof(space), format, backup_ap);\n  va_end(backup_ap);\n\n  if (result < sizeof(space)) {\n    if (result >= 0) {\n      // Normal case -- everything fit.\n      dst->append(space, result);\n      return;\n    }\n\n#if defined (_MSC_VER)\n    // Error or MSVC running out of space.  MSVC 8.0 and higher\n    // can be asked about space needed with the special idiom below:\n    va_copy(backup_ap, ap);\n    result = vsnprintf(NULL, 0, format, backup_ap);\n    va_end(backup_ap);\n#endif\n\n    if (result < 0) {\n      // Just an error.\n      return;\n    }\n  }\n\n  // Increase the buffer size to the size requested by vsnprintf,\n  // plus one for the closing \\0.\n  int length = result+1;\n  char* buf = new char[length];\n\n  // Restore the va_list before we use it again\n  va_copy(backup_ap, ap);\n  result = vsnprintf(buf, length, format, backup_ap);\n  va_end(backup_ap);\n\n  if (result >= 0 && result < length) {\n    // It fit\n    dst->append(buf, result);\n  }\n  delete[] buf;\n}\n\n\nstring StringPrintf(const char* format, ...) {\n  va_list ap;\n  va_start(ap, format);\n  string result;\n  StringAppendV(&result, format, ap);\n  va_end(ap);\n  return result;\n}\n\nconst string& SStringPrintf(string* dst, const char* format, ...) {\n  va_list ap;\n  va_start(ap, format);\n  dst->clear();\n  StringAppendV(dst, format, ap);\n  va_end(ap);\n  return *dst;\n}\n\nvoid StringAppendF(string* dst, const char* format, ...) {\n  va_list ap;\n  va_start(ap, format);\n  StringAppendV(dst, format, ap);\n  va_end(ap);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/stringprintf.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: Sanjay Ghemawat\n//\n// Printf variants that place their output in a C++ string.\n//\n// Usage:\n//      string result = StringPrintf(\"%d %s\\n\", 10, \"hello\");\n//      SStringPrintf(&result, \"%d %s\\n\", 10, \"hello\");\n//      StringAppendF(&result, \"%d %s\\n\", 20, \"there\");\n\n#ifndef CERES_INTERNAL_STRINGPRINTF_H_\n#define CERES_INTERNAL_STRINGPRINTF_H_\n\n#include <cstdarg>\n#include <string>\n\n#include \"ceres/internal/port.h\"\n\nnamespace ceres {\nnamespace internal {\n\n#if (defined(__GNUC__) || defined(__clang__))\n// Tell the compiler to do printf format string checking if the compiler\n// supports it; see the 'format' attribute in\n// <http://gcc.gnu.org/onlinedocs/gcc-4.3.0/gcc/Function-Attributes.html>.\n//\n// N.B.: As the GCC manual states, \"[s]ince non-static C++ methods\n// have an implicit 'this' argument, the arguments of such methods\n// should be counted from two, not one.\"\n#define CERES_PRINTF_ATTRIBUTE(string_index, first_to_check) \\\n    __attribute__((__format__ (__printf__, string_index, first_to_check)))\n#define CERES_SCANF_ATTRIBUTE(string_index, first_to_check) \\\n    __attribute__((__format__ (__scanf__, string_index, first_to_check)))\n#else\n#define CERES_PRINTF_ATTRIBUTE(string_index, first_to_check)\n#endif\n\n// Return a C++ string.\nextern std::string StringPrintf(const char* format, ...)\n    // Tell the compiler to do printf format string checking.\n    CERES_PRINTF_ATTRIBUTE(1, 2);\n\n// Store result into a supplied string and return it.\nextern const std::string& SStringPrintf(std::string* dst, const char* format, ...)\n    // Tell the compiler to do printf format string checking.\n    CERES_PRINTF_ATTRIBUTE(2, 3);\n\n// Append result to a supplied string.\nextern void StringAppendF(std::string* dst, const char* format, ...)\n    // Tell the compiler to do printf format string checking.\n    CERES_PRINTF_ATTRIBUTE(2, 3);\n\n// Lower-level routine that takes a va_list and appends to a specified string.\n// All other routines are just convenience wrappers around it.\nextern void StringAppendV(std::string* dst, const char* format, va_list ap);\n\n#undef CERES_PRINTF_ATTRIBUTE\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_STRINGPRINTF_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/subset_preconditioner.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/subset_preconditioner.h\"\n\n#include <memory>\n#include <string>\n#include \"ceres/compressed_row_sparse_matrix.h\"\n#include \"ceres/inner_product_computer.h\"\n#include \"ceres/linear_solver.h\"\n#include \"ceres/sparse_cholesky.h\"\n#include \"ceres/types.h\"\n\nnamespace ceres {\nnamespace internal {\n\nSubsetPreconditioner::SubsetPreconditioner(\n    const Preconditioner::Options& options, const BlockSparseMatrix& A)\n    : options_(options), num_cols_(A.num_cols()) {\n  CHECK_GE(options_.subset_preconditioner_start_row_block, 0)\n      << \"Congratulations, you found a bug in Ceres. Please report it.\";\n\n  LinearSolver::Options sparse_cholesky_options;\n  sparse_cholesky_options.sparse_linear_algebra_library_type =\n      options_.sparse_linear_algebra_library_type;\n  sparse_cholesky_options.use_postordering =\n      options_.use_postordering;\n  sparse_cholesky_ = SparseCholesky::Create(sparse_cholesky_options);\n}\n\nSubsetPreconditioner::~SubsetPreconditioner() {}\n\nvoid SubsetPreconditioner::RightMultiply(const double* x, double* y) const {\n  CHECK(x != nullptr);\n  CHECK(y != nullptr);\n  std::string message;\n  sparse_cholesky_->Solve(x, y, &message);\n}\n\nbool SubsetPreconditioner::UpdateImpl(const BlockSparseMatrix& A,\n                                      const double* D) {\n  BlockSparseMatrix* m = const_cast<BlockSparseMatrix*>(&A);\n  const CompressedRowBlockStructure* bs = m->block_structure();\n\n  // A = [P]\n  //     [Q]\n\n  // Now add D to A if needed.\n  if (D != NULL) {\n    // A = [P]\n    //     [Q]\n    //     [D]\n    std::unique_ptr<BlockSparseMatrix> regularizer(\n        BlockSparseMatrix::CreateDiagonalMatrix(D, bs->cols));\n    m->AppendRows(*regularizer);\n  }\n\n  if (inner_product_computer_.get() == NULL) {\n    inner_product_computer_.reset(InnerProductComputer::Create(\n        *m,\n        options_.subset_preconditioner_start_row_block,\n        bs->rows.size(),\n        sparse_cholesky_->StorageType()));\n  }\n\n  // Compute inner_product = [Q'*Q + D'*D]\n  inner_product_computer_->Compute();\n\n  // Unappend D if needed.\n  if (D != NULL) {\n    // A = [P]\n    //     [Q]\n    m->DeleteRowBlocks(bs->cols.size());\n  }\n\n  std::string message;\n  // Compute L. s.t., LL' = Q'*Q + D'*D\n  const LinearSolverTerminationType termination_type =\n      sparse_cholesky_->Factorize(inner_product_computer_->mutable_result(),\n                                  &message);\n  if (termination_type != LINEAR_SOLVER_SUCCESS) {\n    LOG(ERROR) << \"Preconditioner factorization failed: \" << message;\n    return false;\n  }\n\n  return true;\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/subset_preconditioner.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_SUBSET_PRECONDITIONER_H_\n#define CERES_INTERNAL_SUBSET_PRECONDITIONER_H_\n\n#include <memory>\n#include \"ceres/preconditioner.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass BlockSparseMatrix;\nclass SparseCholesky;\nclass InnerProductComputer;\n\n// Subset preconditioning, uses a subset of the rows of the Jacobian\n// to construct a preconditioner for the normal equations.\n//\n// To keep the interface simple, we assume that the matrix A has\n// already been re-ordered that the user wishes to some subset of the\n// bottom row blocks of the matrix as the preconditioner. This is\n// controlled by\n// Preconditioner::Options::subset_preconditioner_start_row_block.\n//\n// When using the subset preconditioner, all row blocks starting\n// from this row block are used to construct the preconditioner.\n//\n// More precisely the matrix A is horizontally partitioned as\n//\n// A = [P]\n//     [Q]\n//\n// where P has subset_preconditioner_start_row_block row blocks,\n// and the preconditioner is the inverse of the matrix Q'Q.\n//\n// Obviously, the smaller this number, the more accurate and\n// computationally expensive this preconditioner will be.\n//\n// See the tests for example usage.\nclass SubsetPreconditioner : public BlockSparseMatrixPreconditioner {\n public:\n  SubsetPreconditioner(const Preconditioner::Options& options,\n                       const BlockSparseMatrix& A);\n  virtual ~SubsetPreconditioner();\n\n  // Preconditioner interface\n  void RightMultiply(const double* x, double* y) const final;\n  int num_rows() const final { return num_cols_; }\n  int num_cols() const final { return num_cols_; }\n\n private:\n  bool UpdateImpl(const BlockSparseMatrix& A, const double* D) final;\n\n  const Preconditioner::Options options_;\n  const int num_cols_;\n  std::unique_ptr<SparseCholesky> sparse_cholesky_;\n  std::unique_ptr<InnerProductComputer> inner_product_computer_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_SUBSET_PRECONDITIONER_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/subset_preconditioner_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/subset_preconditioner.h\"\n\n#include <memory>\n#include \"Eigen/Dense\"\n#include \"Eigen/SparseCore\"\n#include \"ceres/block_sparse_matrix.h\"\n#include \"ceres/compressed_row_sparse_matrix.h\"\n#include \"ceres/inner_product_computer.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"glog/logging.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nnamespace {\n\n// TODO(sameeragarwal): Refactor the following two functions out of\n// here and sparse_cholesky_test.cc into a more suitable place.\ntemplate <int UpLoType>\nbool SolveLinearSystemUsingEigen(const Matrix& lhs,\n                                 const Vector rhs,\n                                 Vector* solution) {\n  Eigen::LLT<Matrix, UpLoType> llt = lhs.selfadjointView<UpLoType>().llt();\n  if (llt.info() != Eigen::Success) {\n    return false;\n  }\n  *solution = llt.solve(rhs);\n  return (llt.info() == Eigen::Success);\n}\n\n// Use Eigen's Dense Cholesky solver to compute the solution to a\n// sparse linear system.\nbool ComputeExpectedSolution(const CompressedRowSparseMatrix& lhs,\n                             const Vector& rhs,\n                             Vector* solution) {\n  Matrix dense_triangular_lhs;\n  lhs.ToDenseMatrix(&dense_triangular_lhs);\n  if (lhs.storage_type() == CompressedRowSparseMatrix::UPPER_TRIANGULAR) {\n    Matrix full_lhs = dense_triangular_lhs.selfadjointView<Eigen::Upper>();\n    return SolveLinearSystemUsingEigen<Eigen::Upper>(full_lhs, rhs, solution);\n  }\n  return SolveLinearSystemUsingEigen<Eigen::Lower>(\n      dense_triangular_lhs, rhs, solution);\n}\n\ntypedef ::testing::tuple<SparseLinearAlgebraLibraryType, bool> Param;\n\nstd::string ParamInfoToString(testing::TestParamInfo<Param> info) {\n  Param param = info.param;\n  std::stringstream ss;\n  ss << SparseLinearAlgebraLibraryTypeToString(::testing::get<0>(param)) << \"_\"\n     << (::testing::get<1>(param) ? \"Diagonal\" : \"NoDiagonal\");\n  return ss.str();\n}\n\n}  // namespace\n\nclass SubsetPreconditionerTest : public ::testing::TestWithParam<Param> {\n protected:\n  void SetUp() final {\n    BlockSparseMatrix::RandomMatrixOptions options;\n    options.num_col_blocks = 4;\n    options.min_col_block_size = 1;\n    options.max_col_block_size = 4;\n    options.num_row_blocks = 8;\n    options.min_row_block_size = 1;\n    options.max_row_block_size = 4;\n    options.block_density = 0.9;\n\n    m_.reset(BlockSparseMatrix::CreateRandomMatrix(options));\n    start_row_block_ = m_->block_structure()->rows.size();\n\n    // Ensure that the bottom part of the matrix has the same column\n    // block structure.\n    options.col_blocks = m_->block_structure()->cols;\n    b_.reset(BlockSparseMatrix::CreateRandomMatrix(options));\n    m_->AppendRows(*b_);\n\n    // Create a Identity block diagonal matrix with the same column\n    // block structure.\n    diagonal_ = Vector::Ones(m_->num_cols());\n    block_diagonal_.reset(BlockSparseMatrix::CreateDiagonalMatrix(\n        diagonal_.data(), b_->block_structure()->cols));\n\n    // Unconditionally add the block diagonal to the matrix b_,\n    // because either it is either part of b_ to make it full rank, or\n    // we pass the same diagonal matrix later as the parameter D. In\n    // either case the preconditioner matrix is b_' b + D'D.\n    b_->AppendRows(*block_diagonal_);\n    inner_product_computer_.reset(InnerProductComputer::Create(\n        *b_, CompressedRowSparseMatrix::UPPER_TRIANGULAR));\n    inner_product_computer_->Compute();\n  }\n\n  std::unique_ptr<BlockSparseMatrix> m_;\n  std::unique_ptr<BlockSparseMatrix> b_;\n  std::unique_ptr<BlockSparseMatrix> block_diagonal_;\n  std::unique_ptr<InnerProductComputer> inner_product_computer_;\n  std::unique_ptr<Preconditioner> preconditioner_;\n  Vector diagonal_;\n  int start_row_block_;\n};\n\nTEST_P(SubsetPreconditionerTest, foo) {\n  Param param = GetParam();\n  Preconditioner::Options options;\n  options.subset_preconditioner_start_row_block = start_row_block_;\n  options.sparse_linear_algebra_library_type = ::testing::get<0>(param);\n  preconditioner_.reset(new SubsetPreconditioner(options, *m_));\n\n  const bool with_diagonal = ::testing::get<1>(param);\n  if (!with_diagonal) {\n    m_->AppendRows(*block_diagonal_);\n  }\n\n  EXPECT_TRUE(\n      preconditioner_->Update(*m_, with_diagonal ? diagonal_.data() : NULL));\n\n  // Repeatedly apply the preconditioner to random vectors and check\n  // that the preconditioned value is the same as one obtained by\n  // solving the linear system directly.\n  for (int i = 0; i < 5; ++i) {\n    CompressedRowSparseMatrix* lhs = inner_product_computer_->mutable_result();\n    Vector rhs = Vector::Random(lhs->num_rows());\n    Vector expected(lhs->num_rows());\n    EXPECT_TRUE(ComputeExpectedSolution(*lhs, rhs, &expected));\n\n    Vector actual(lhs->num_rows());\n    preconditioner_->RightMultiply(rhs.data(), actual.data());\n\n    Matrix eigen_lhs;\n    lhs->ToDenseMatrix(&eigen_lhs);\n    EXPECT_NEAR((actual - expected).norm() / actual.norm(),\n                0.0,\n                std::numeric_limits<double>::epsilon() * 10)\n        << \"\\n\"\n        << eigen_lhs << \"\\n\"\n        << expected.transpose() << \"\\n\"\n        << actual.transpose();\n  }\n}\n\n#ifndef CERES_NO_SUITESPARSE\nINSTANTIATE_TEST_SUITE_P(SubsetPreconditionerWithSuiteSparse,\n                         SubsetPreconditionerTest,\n                         ::testing::Combine(::testing::Values(SUITE_SPARSE),\n                                            ::testing::Values(true, false)),\n                         ParamInfoToString);\n#endif\n\n#ifndef CERES_NO_CXSPARSE\nINSTANTIATE_TEST_SUITE_P(SubsetPreconditionerWithCXSparse,\n                         SubsetPreconditionerTest,\n                         ::testing::Combine(::testing::Values(CX_SPARSE),\n                                            ::testing::Values(true, false)),\n                         ParamInfoToString);\n#endif\n\n#ifndef CERES_NO_ACCELERATE_SPARSE\nINSTANTIATE_TEST_SUITE_P(\n    SubsetPreconditionerWithAccelerateSparse,\n    SubsetPreconditionerTest,\n    ::testing::Combine(::testing::Values(ACCELERATE_SPARSE),\n                       ::testing::Values(true, false)),\n    ParamInfoToString);\n#endif\n\n#ifdef CERES_USE_EIGEN_SPARSE\nINSTANTIATE_TEST_SUITE_P(SubsetPreconditionerWithEigenSparse,\n                         SubsetPreconditionerTest,\n                         ::testing::Combine(::testing::Values(EIGEN_SPARSE),\n                                            ::testing::Values(true, false)),\n                         ParamInfoToString);\n#endif\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/suitesparse.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_NO_SUITESPARSE\n#include \"ceres/suitesparse.h\"\n\n#include <vector>\n\n#include \"ceres/compressed_col_sparse_matrix_utils.h\"\n#include \"ceres/compressed_row_sparse_matrix.h\"\n#include \"ceres/linear_solver.h\"\n#include \"ceres/triplet_sparse_matrix.h\"\n#include \"cholmod.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::string;\nusing std::vector;\n\nSuiteSparse::SuiteSparse() { cholmod_start(&cc_); }\n\nSuiteSparse::~SuiteSparse() { cholmod_finish(&cc_); }\n\ncholmod_sparse* SuiteSparse::CreateSparseMatrix(TripletSparseMatrix* A) {\n  cholmod_triplet triplet;\n\n  triplet.nrow = A->num_rows();\n  triplet.ncol = A->num_cols();\n  triplet.nzmax = A->max_num_nonzeros();\n  triplet.nnz = A->num_nonzeros();\n  triplet.i = reinterpret_cast<void*>(A->mutable_rows());\n  triplet.j = reinterpret_cast<void*>(A->mutable_cols());\n  triplet.x = reinterpret_cast<void*>(A->mutable_values());\n  triplet.stype = 0;  // Matrix is not symmetric.\n  triplet.itype = CHOLMOD_INT;\n  triplet.xtype = CHOLMOD_REAL;\n  triplet.dtype = CHOLMOD_DOUBLE;\n\n  return cholmod_triplet_to_sparse(&triplet, triplet.nnz, &cc_);\n}\n\ncholmod_sparse* SuiteSparse::CreateSparseMatrixTranspose(\n    TripletSparseMatrix* A) {\n  cholmod_triplet triplet;\n\n  triplet.ncol = A->num_rows();  // swap row and columns\n  triplet.nrow = A->num_cols();\n  triplet.nzmax = A->max_num_nonzeros();\n  triplet.nnz = A->num_nonzeros();\n\n  // swap rows and columns\n  triplet.j = reinterpret_cast<void*>(A->mutable_rows());\n  triplet.i = reinterpret_cast<void*>(A->mutable_cols());\n  triplet.x = reinterpret_cast<void*>(A->mutable_values());\n  triplet.stype = 0;  // Matrix is not symmetric.\n  triplet.itype = CHOLMOD_INT;\n  triplet.xtype = CHOLMOD_REAL;\n  triplet.dtype = CHOLMOD_DOUBLE;\n\n  return cholmod_triplet_to_sparse(&triplet, triplet.nnz, &cc_);\n}\n\ncholmod_sparse SuiteSparse::CreateSparseMatrixTransposeView(\n    CompressedRowSparseMatrix* A) {\n  cholmod_sparse m;\n  m.nrow = A->num_cols();\n  m.ncol = A->num_rows();\n  m.nzmax = A->num_nonzeros();\n  m.nz = nullptr;\n  m.p = reinterpret_cast<void*>(A->mutable_rows());\n  m.i = reinterpret_cast<void*>(A->mutable_cols());\n  m.x = reinterpret_cast<void*>(A->mutable_values());\n  m.z = nullptr;\n\n  if (A->storage_type() == CompressedRowSparseMatrix::LOWER_TRIANGULAR) {\n    m.stype = 1;\n  } else if (A->storage_type() == CompressedRowSparseMatrix::UPPER_TRIANGULAR) {\n    m.stype = -1;\n  } else {\n    m.stype = 0;\n  }\n\n  m.itype = CHOLMOD_INT;\n  m.xtype = CHOLMOD_REAL;\n  m.dtype = CHOLMOD_DOUBLE;\n  m.sorted = 1;\n  m.packed = 1;\n\n  return m;\n}\n\ncholmod_dense SuiteSparse::CreateDenseVectorView(const double* x, int size) {\n  cholmod_dense v;\n  v.nrow = size;\n  v.ncol = 1;\n  v.nzmax = size;\n  v.d = size;\n  v.x = const_cast<void*>(reinterpret_cast<const void*>(x));\n  v.xtype = CHOLMOD_REAL;\n  v.dtype = CHOLMOD_DOUBLE;\n  return v;\n}\n\ncholmod_dense* SuiteSparse::CreateDenseVector(const double* x,\n                                              int in_size,\n                                              int out_size) {\n  CHECK_LE(in_size, out_size);\n  cholmod_dense* v = cholmod_zeros(out_size, 1, CHOLMOD_REAL, &cc_);\n  if (x != nullptr) {\n    memcpy(v->x, x, in_size * sizeof(*x));\n  }\n  return v;\n}\n\ncholmod_factor* SuiteSparse::AnalyzeCholesky(cholmod_sparse* A,\n                                             string* message) {\n  // Cholmod can try multiple re-ordering strategies to find a fill\n  // reducing ordering. Here we just tell it use AMD with automatic\n  // matrix dependence choice of supernodal versus simplicial\n  // factorization.\n  cc_.nmethods = 1;\n  cc_.method[0].ordering = CHOLMOD_AMD;\n  cc_.supernodal = CHOLMOD_AUTO;\n\n  cholmod_factor* factor = cholmod_analyze(A, &cc_);\n  if (VLOG_IS_ON(2)) {\n    cholmod_print_common(const_cast<char*>(\"Symbolic Analysis\"), &cc_);\n  }\n\n  if (cc_.status != CHOLMOD_OK) {\n    *message =\n        StringPrintf(\"cholmod_analyze failed. error code: %d\", cc_.status);\n    return nullptr;\n  }\n\n  CHECK(factor != nullptr);\n  return factor;\n}\n\ncholmod_factor* SuiteSparse::BlockAnalyzeCholesky(cholmod_sparse* A,\n                                                  const vector<int>& row_blocks,\n                                                  const vector<int>& col_blocks,\n                                                  string* message) {\n  vector<int> ordering;\n  if (!BlockAMDOrdering(A, row_blocks, col_blocks, &ordering)) {\n    return nullptr;\n  }\n  return AnalyzeCholeskyWithUserOrdering(A, ordering, message);\n}\n\ncholmod_factor* SuiteSparse::AnalyzeCholeskyWithUserOrdering(\n    cholmod_sparse* A, const vector<int>& ordering, string* message) {\n  CHECK_EQ(ordering.size(), A->nrow);\n\n  cc_.nmethods = 1;\n  cc_.method[0].ordering = CHOLMOD_GIVEN;\n\n  cholmod_factor* factor =\n      cholmod_analyze_p(A, const_cast<int*>(&ordering[0]), nullptr, 0, &cc_);\n  if (VLOG_IS_ON(2)) {\n    cholmod_print_common(const_cast<char*>(\"Symbolic Analysis\"), &cc_);\n  }\n  if (cc_.status != CHOLMOD_OK) {\n    *message =\n        StringPrintf(\"cholmod_analyze failed. error code: %d\", cc_.status);\n    return nullptr;\n  }\n\n  CHECK(factor != nullptr);\n  return factor;\n}\n\ncholmod_factor* SuiteSparse::AnalyzeCholeskyWithNaturalOrdering(\n    cholmod_sparse* A, string* message) {\n  cc_.nmethods = 1;\n  cc_.method[0].ordering = CHOLMOD_NATURAL;\n  cc_.postorder = 0;\n\n  cholmod_factor* factor = cholmod_analyze(A, &cc_);\n  if (VLOG_IS_ON(2)) {\n    cholmod_print_common(const_cast<char*>(\"Symbolic Analysis\"), &cc_);\n  }\n  if (cc_.status != CHOLMOD_OK) {\n    *message =\n        StringPrintf(\"cholmod_analyze failed. error code: %d\", cc_.status);\n    return nullptr;\n  }\n\n  CHECK(factor != nullptr);\n  return factor;\n}\n\nbool SuiteSparse::BlockAMDOrdering(const cholmod_sparse* A,\n                                   const vector<int>& row_blocks,\n                                   const vector<int>& col_blocks,\n                                   vector<int>* ordering) {\n  const int num_row_blocks = row_blocks.size();\n  const int num_col_blocks = col_blocks.size();\n\n  // Arrays storing the compressed column structure of the matrix\n  // incoding the block sparsity of A.\n  vector<int> block_cols;\n  vector<int> block_rows;\n\n  CompressedColumnScalarMatrixToBlockMatrix(reinterpret_cast<const int*>(A->i),\n                                            reinterpret_cast<const int*>(A->p),\n                                            row_blocks,\n                                            col_blocks,\n                                            &block_rows,\n                                            &block_cols);\n  cholmod_sparse_struct block_matrix;\n  block_matrix.nrow = num_row_blocks;\n  block_matrix.ncol = num_col_blocks;\n  block_matrix.nzmax = block_rows.size();\n  block_matrix.p = reinterpret_cast<void*>(&block_cols[0]);\n  block_matrix.i = reinterpret_cast<void*>(&block_rows[0]);\n  block_matrix.x = nullptr;\n  block_matrix.stype = A->stype;\n  block_matrix.itype = CHOLMOD_INT;\n  block_matrix.xtype = CHOLMOD_PATTERN;\n  block_matrix.dtype = CHOLMOD_DOUBLE;\n  block_matrix.sorted = 1;\n  block_matrix.packed = 1;\n\n  vector<int> block_ordering(num_row_blocks);\n  if (!cholmod_amd(&block_matrix, nullptr, 0, &block_ordering[0], &cc_)) {\n    return false;\n  }\n\n  BlockOrderingToScalarOrdering(row_blocks, block_ordering, ordering);\n  return true;\n}\n\nLinearSolverTerminationType SuiteSparse::Cholesky(cholmod_sparse* A,\n                                                  cholmod_factor* L,\n                                                  string* message) {\n  CHECK(A != nullptr);\n  CHECK(L != nullptr);\n\n  // Save the current print level and silence CHOLMOD, otherwise\n  // CHOLMOD is prone to dumping stuff to stderr, which can be\n  // distracting when the error (matrix is indefinite) is not a fatal\n  // failure.\n  const int old_print_level = cc_.print;\n  cc_.print = 0;\n\n  cc_.quick_return_if_not_posdef = 1;\n  int cholmod_status = cholmod_factorize(A, L, &cc_);\n  cc_.print = old_print_level;\n\n  switch (cc_.status) {\n    case CHOLMOD_NOT_INSTALLED:\n      *message = \"CHOLMOD failure: Method not installed.\";\n      return LINEAR_SOLVER_FATAL_ERROR;\n    case CHOLMOD_OUT_OF_MEMORY:\n      *message = \"CHOLMOD failure: Out of memory.\";\n      return LINEAR_SOLVER_FATAL_ERROR;\n    case CHOLMOD_TOO_LARGE:\n      *message = \"CHOLMOD failure: Integer overflow occurred.\";\n      return LINEAR_SOLVER_FATAL_ERROR;\n    case CHOLMOD_INVALID:\n      *message = \"CHOLMOD failure: Invalid input.\";\n      return LINEAR_SOLVER_FATAL_ERROR;\n    case CHOLMOD_NOT_POSDEF:\n      *message = \"CHOLMOD warning: Matrix not positive definite.\";\n      return LINEAR_SOLVER_FAILURE;\n    case CHOLMOD_DSMALL:\n      *message =\n          \"CHOLMOD warning: D for LDL' or diag(L) or \"\n          \"LL' has tiny absolute value.\";\n      return LINEAR_SOLVER_FAILURE;\n    case CHOLMOD_OK:\n      if (cholmod_status != 0) {\n        return LINEAR_SOLVER_SUCCESS;\n      }\n\n      *message =\n          \"CHOLMOD failure: cholmod_factorize returned false \"\n          \"but cholmod_common::status is CHOLMOD_OK.\"\n          \"Please report this to ceres-solver@googlegroups.com.\";\n      return LINEAR_SOLVER_FATAL_ERROR;\n    default:\n      *message = StringPrintf(\n          \"Unknown cholmod return code: %d. \"\n          \"Please report this to ceres-solver@googlegroups.com.\",\n          cc_.status);\n      return LINEAR_SOLVER_FATAL_ERROR;\n  }\n\n  return LINEAR_SOLVER_FATAL_ERROR;\n}\n\ncholmod_dense* SuiteSparse::Solve(cholmod_factor* L,\n                                  cholmod_dense* b,\n                                  string* message) {\n  if (cc_.status != CHOLMOD_OK) {\n    *message = \"cholmod_solve failed. CHOLMOD status is not CHOLMOD_OK\";\n    return nullptr;\n  }\n\n  return cholmod_solve(CHOLMOD_A, L, b, &cc_);\n}\n\nbool SuiteSparse::ApproximateMinimumDegreeOrdering(cholmod_sparse* matrix,\n                                                   int* ordering) {\n  return cholmod_amd(matrix, nullptr, 0, ordering, &cc_);\n}\n\nbool SuiteSparse::ConstrainedApproximateMinimumDegreeOrdering(\n    cholmod_sparse* matrix, int* constraints, int* ordering) {\n#ifndef CERES_NO_CAMD\n  return cholmod_camd(matrix, nullptr, 0, constraints, ordering, &cc_);\n#else\n  LOG(FATAL) << \"Congratulations you have found a bug in Ceres.\"\n             << \"Ceres Solver was compiled with SuiteSparse \"\n             << \"version 4.1.0 or less. Calling this function \"\n             << \"in that case is a bug. Please contact the\"\n             << \"the Ceres Solver developers.\";\n  return false;\n#endif\n}\n\nstd::unique_ptr<SparseCholesky> SuiteSparseCholesky::Create(\n    const OrderingType ordering_type) {\n  return std::unique_ptr<SparseCholesky>(new SuiteSparseCholesky(ordering_type));\n}\n\nSuiteSparseCholesky::SuiteSparseCholesky(const OrderingType ordering_type)\n    : ordering_type_(ordering_type), factor_(nullptr) {}\n\nSuiteSparseCholesky::~SuiteSparseCholesky() {\n  if (factor_ != nullptr) {\n    ss_.Free(factor_);\n  }\n}\n\nLinearSolverTerminationType SuiteSparseCholesky::Factorize(\n    CompressedRowSparseMatrix* lhs, string* message) {\n  if (lhs == nullptr) {\n    *message = \"Failure: Input lhs is NULL.\";\n    return LINEAR_SOLVER_FATAL_ERROR;\n  }\n\n  cholmod_sparse cholmod_lhs = ss_.CreateSparseMatrixTransposeView(lhs);\n\n  if (factor_ == nullptr) {\n    if (ordering_type_ == NATURAL) {\n      factor_ = ss_.AnalyzeCholeskyWithNaturalOrdering(&cholmod_lhs, message);\n    } else {\n      if (!lhs->col_blocks().empty() && !(lhs->row_blocks().empty())) {\n        factor_ = ss_.BlockAnalyzeCholesky(\n            &cholmod_lhs, lhs->col_blocks(), lhs->row_blocks(), message);\n      } else {\n        factor_ = ss_.AnalyzeCholesky(&cholmod_lhs, message);\n      }\n    }\n\n    if (factor_ == nullptr) {\n      return LINEAR_SOLVER_FATAL_ERROR;\n    }\n  }\n\n  return ss_.Cholesky(&cholmod_lhs, factor_, message);\n}\n\nCompressedRowSparseMatrix::StorageType SuiteSparseCholesky::StorageType()\n    const {\n  return ((ordering_type_ == NATURAL)\n              ? CompressedRowSparseMatrix::UPPER_TRIANGULAR\n              : CompressedRowSparseMatrix::LOWER_TRIANGULAR);\n}\n\nLinearSolverTerminationType SuiteSparseCholesky::Solve(const double* rhs,\n                                                       double* solution,\n                                                       string* message) {\n  // Error checking\n  if (factor_ == nullptr) {\n    *message = \"Solve called without a call to Factorize first.\";\n    return LINEAR_SOLVER_FATAL_ERROR;\n  }\n\n  const int num_cols = factor_->n;\n  cholmod_dense cholmod_rhs = ss_.CreateDenseVectorView(rhs, num_cols);\n  cholmod_dense* cholmod_dense_solution =\n      ss_.Solve(factor_, &cholmod_rhs, message);\n\n  if (cholmod_dense_solution == nullptr) {\n    return LINEAR_SOLVER_FAILURE;\n  }\n\n  memcpy(solution, cholmod_dense_solution->x, num_cols * sizeof(*solution));\n  ss_.Free(cholmod_dense_solution);\n  return LINEAR_SOLVER_SUCCESS;\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_SUITESPARSE\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/suitesparse.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// A simple C++ interface to the SuiteSparse and CHOLMOD libraries.\n\n#ifndef CERES_INTERNAL_SUITESPARSE_H_\n#define CERES_INTERNAL_SUITESPARSE_H_\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifndef CERES_NO_SUITESPARSE\n\n#include <cstring>\n#include <string>\n#include <vector>\n#include \"SuiteSparseQR.hpp\"\n#include \"ceres/linear_solver.h\"\n#include \"ceres/sparse_cholesky.h\"\n#include \"cholmod.h\"\n#include \"glog/logging.h\"\n\n// Before SuiteSparse version 4.2.0, cholmod_camd was only enabled\n// if SuiteSparse was compiled with Metis support. This makes\n// calling and linking into cholmod_camd problematic even though it\n// has nothing to do with Metis. This has been fixed reliably in\n// 4.2.0.\n//\n// The fix was actually committed in 4.1.0, but there is\n// some confusion about a silent update to the tar ball, so we are\n// being conservative and choosing the next minor version where\n// things are stable.\n#if (SUITESPARSE_VERSION < 4002)\n#define CERES_NO_CAMD\n#endif\n\n// UF_long is deprecated but SuiteSparse_long is only available in\n// newer versions of SuiteSparse. So for older versions of\n// SuiteSparse, we define SuiteSparse_long to be the same as UF_long,\n// which is what recent versions of SuiteSparse do anyways.\n#ifndef SuiteSparse_long\n#define SuiteSparse_long UF_long\n#endif\n\nnamespace ceres {\nnamespace internal {\n\nclass CompressedRowSparseMatrix;\nclass TripletSparseMatrix;\n\n// The raw CHOLMOD and SuiteSparseQR libraries have a slightly\n// cumbersome c like calling format. This object abstracts it away and\n// provides the user with a simpler interface. The methods here cannot\n// be static as a cholmod_common object serves as a global variable\n// for all cholmod function calls.\nclass SuiteSparse {\n public:\n  SuiteSparse();\n  ~SuiteSparse();\n\n  // Functions for building cholmod_sparse objects from sparse\n  // matrices stored in triplet form. The matrix A is not\n  // modifed. Called owns the result.\n  cholmod_sparse* CreateSparseMatrix(TripletSparseMatrix* A);\n\n  // This function works like CreateSparseMatrix, except that the\n  // return value corresponds to A' rather than A.\n  cholmod_sparse* CreateSparseMatrixTranspose(TripletSparseMatrix* A);\n\n  // Create a cholmod_sparse wrapper around the contents of A. This is\n  // a shallow object, which refers to the contents of A and does not\n  // use the SuiteSparse machinery to allocate memory.\n  cholmod_sparse CreateSparseMatrixTransposeView(CompressedRowSparseMatrix* A);\n\n  // Create a cholmod_dense vector around the contents of the array x.\n  // This is a shallow object, which refers to the contents of x and\n  // does not use the SuiteSparse machinery to allocate memory.\n  cholmod_dense CreateDenseVectorView(const double* x, int size);\n\n  // Given a vector x, build a cholmod_dense vector of size out_size\n  // with the first in_size entries copied from x. If x is NULL, then\n  // an all zeros vector is returned. Caller owns the result.\n  cholmod_dense* CreateDenseVector(const double* x, int in_size, int out_size);\n\n  // The matrix A is scaled using the matrix whose diagonal is the\n  // vector scale. mode describes how scaling is applied. Possible\n  // values are CHOLMOD_ROW for row scaling - diag(scale) * A,\n  // CHOLMOD_COL for column scaling - A * diag(scale) and CHOLMOD_SYM\n  // for symmetric scaling which scales both the rows and the columns\n  // - diag(scale) * A * diag(scale).\n  void Scale(cholmod_dense* scale, int mode, cholmod_sparse* A) {\n     cholmod_scale(scale, mode, A, &cc_);\n  }\n\n  // Create and return a matrix m = A * A'. Caller owns the\n  // result. The matrix A is not modified.\n  cholmod_sparse* AATranspose(cholmod_sparse* A) {\n    cholmod_sparse*m =  cholmod_aat(A, NULL, A->nrow, 1, &cc_);\n    m->stype = 1;  // Pay attention to the upper triangular part.\n    return m;\n  }\n\n  // y = alpha * A * x + beta * y. Only y is modified.\n  void SparseDenseMultiply(cholmod_sparse* A, double alpha, double beta,\n                           cholmod_dense* x, cholmod_dense* y) {\n    double alpha_[2] = {alpha, 0};\n    double beta_[2] = {beta, 0};\n    cholmod_sdmult(A, 0, alpha_, beta_, x, y, &cc_);\n  }\n\n  // Find an ordering of A or AA' (if A is unsymmetric) that minimizes\n  // the fill-in in the Cholesky factorization of the corresponding\n  // matrix. This is done by using the AMD algorithm.\n  //\n  // Using this ordering, the symbolic Cholesky factorization of A (or\n  // AA') is computed and returned.\n  //\n  // A is not modified, only the pattern of non-zeros of A is used,\n  // the actual numerical values in A are of no consequence.\n  //\n  // message contains an explanation of the failures if any.\n  //\n  // Caller owns the result.\n  cholmod_factor* AnalyzeCholesky(cholmod_sparse* A, std::string* message);\n\n  cholmod_factor* BlockAnalyzeCholesky(cholmod_sparse* A,\n                                       const std::vector<int>& row_blocks,\n                                       const std::vector<int>& col_blocks,\n                                       std::string* message);\n\n  // If A is symmetric, then compute the symbolic Cholesky\n  // factorization of A(ordering, ordering). If A is unsymmetric, then\n  // compute the symbolic factorization of\n  // A(ordering,:) A(ordering,:)'.\n  //\n  // A is not modified, only the pattern of non-zeros of A is used,\n  // the actual numerical values in A are of no consequence.\n  //\n  // message contains an explanation of the failures if any.\n  //\n  // Caller owns the result.\n  cholmod_factor* AnalyzeCholeskyWithUserOrdering(\n      cholmod_sparse* A,\n      const std::vector<int>& ordering,\n      std::string* message);\n\n  // Perform a symbolic factorization of A without re-ordering A. No\n  // postordering of the elimination tree is performed. This ensures\n  // that the symbolic factor does not introduce an extra permutation\n  // on the matrix. See the documentation for CHOLMOD for more details.\n  //\n  // message contains an explanation of the failures if any.\n  cholmod_factor* AnalyzeCholeskyWithNaturalOrdering(cholmod_sparse* A,\n                                                     std::string* message);\n\n  // Use the symbolic factorization in L, to find the numerical\n  // factorization for the matrix A or AA^T. Return true if\n  // successful, false otherwise. L contains the numeric factorization\n  // on return.\n  //\n  // message contains an explanation of the failures if any.\n  LinearSolverTerminationType Cholesky(cholmod_sparse* A,\n                                       cholmod_factor* L,\n                                       std::string* message);\n\n  // Given a Cholesky factorization of a matrix A = LL^T, solve the\n  // linear system Ax = b, and return the result. If the Solve fails\n  // NULL is returned. Caller owns the result.\n  //\n  // message contains an explanation of the failures if any.\n  cholmod_dense* Solve(cholmod_factor* L, cholmod_dense* b, std::string* message);\n\n  // By virtue of the modeling layer in Ceres being block oriented,\n  // all the matrices used by Ceres are also block oriented. When\n  // doing sparse direct factorization of these matrices the\n  // fill-reducing ordering algorithms (in particular AMD) can either\n  // be run on the block or the scalar form of these matrices. The two\n  // SuiteSparse::AnalyzeCholesky methods allows the client to\n  // compute the symbolic factorization of a matrix by either using\n  // AMD on the matrix or a user provided ordering of the rows.\n  //\n  // But since the underlying matrices are block oriented, it is worth\n  // running AMD on just the block structure of these matrices and then\n  // lifting these block orderings to a full scalar ordering. This\n  // preserves the block structure of the permuted matrix, and exposes\n  // more of the super-nodal structure of the matrix to the numerical\n  // factorization routines.\n  //\n  // Find the block oriented AMD ordering of a matrix A, whose row and\n  // column blocks are given by row_blocks, and col_blocks\n  // respectively. The matrix may or may not be symmetric. The entries\n  // of col_blocks do not need to sum to the number of columns in\n  // A. If this is the case, only the first sum(col_blocks) are used\n  // to compute the ordering.\n  bool BlockAMDOrdering(const cholmod_sparse* A,\n                        const std::vector<int>& row_blocks,\n                        const std::vector<int>& col_blocks,\n                        std::vector<int>* ordering);\n\n  // Find a fill reducing approximate minimum degree\n  // ordering. ordering is expected to be large enough to hold the\n  // ordering.\n  bool ApproximateMinimumDegreeOrdering(cholmod_sparse* matrix, int* ordering);\n\n\n  // Before SuiteSparse version 4.2.0, cholmod_camd was only enabled\n  // if SuiteSparse was compiled with Metis support. This makes\n  // calling and linking into cholmod_camd problematic even though it\n  // has nothing to do with Metis. This has been fixed reliably in\n  // 4.2.0.\n  //\n  // The fix was actually committed in 4.1.0, but there is\n  // some confusion about a silent update to the tar ball, so we are\n  // being conservative and choosing the next minor version where\n  // things are stable.\n  static bool IsConstrainedApproximateMinimumDegreeOrderingAvailable() {\n    return (SUITESPARSE_VERSION > 4001);\n  }\n\n  // Find a fill reducing approximate minimum degree\n  // ordering. constraints is an array which associates with each\n  // column of the matrix an elimination group. i.e., all columns in\n  // group 0 are eliminated first, all columns in group 1 are\n  // eliminated next etc. This function finds a fill reducing ordering\n  // that obeys these constraints.\n  //\n  // Calling ApproximateMinimumDegreeOrdering is equivalent to calling\n  // ConstrainedApproximateMinimumDegreeOrdering with a constraint\n  // array that puts all columns in the same elimination group.\n  //\n  // If CERES_NO_CAMD is defined then calling this function will\n  // result in a crash.\n  bool ConstrainedApproximateMinimumDegreeOrdering(cholmod_sparse* matrix,\n                                                   int* constraints,\n                                                   int* ordering);\n\n  void Free(cholmod_sparse* m) { cholmod_free_sparse(&m, &cc_); }\n  void Free(cholmod_dense* m)  { cholmod_free_dense(&m, &cc_);  }\n  void Free(cholmod_factor* m) { cholmod_free_factor(&m, &cc_); }\n\n  void Print(cholmod_sparse* m, const std::string& name) {\n    cholmod_print_sparse(m, const_cast<char*>(name.c_str()), &cc_);\n  }\n\n  void Print(cholmod_dense* m, const std::string& name) {\n    cholmod_print_dense(m, const_cast<char*>(name.c_str()), &cc_);\n  }\n\n  void Print(cholmod_triplet* m, const std::string& name) {\n    cholmod_print_triplet(m, const_cast<char*>(name.c_str()), &cc_);\n  }\n\n  cholmod_common* mutable_cc() { return &cc_; }\n\n private:\n  cholmod_common cc_;\n};\n\nclass SuiteSparseCholesky : public SparseCholesky {\n public:\n  static std::unique_ptr<SparseCholesky> Create(\n      OrderingType ordering_type);\n\n  // SparseCholesky interface.\n  virtual ~SuiteSparseCholesky();\n  CompressedRowSparseMatrix::StorageType StorageType() const final;\n  LinearSolverTerminationType Factorize(\n      CompressedRowSparseMatrix* lhs, std::string* message) final;\n  LinearSolverTerminationType Solve(const double* rhs,\n                                    double* solution,\n                                    std::string* message) final;\n private:\n  SuiteSparseCholesky(const OrderingType ordering_type);\n\n  const OrderingType ordering_type_;\n  SuiteSparse ss_;\n  cholmod_factor* factor_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#else  // CERES_NO_SUITESPARSE\n\ntypedef void cholmod_factor;\n\nnamespace ceres {\nnamespace internal {\n\nclass SuiteSparse {\n public:\n  // Defining this static function even when SuiteSparse is not\n  // available, allows client code to check for the presence of CAMD\n  // without checking for the absence of the CERES_NO_CAMD symbol.\n  //\n  // This is safer because the symbol maybe missing due to a user\n  // accidentally not including suitesparse.h in their code when\n  // checking for the symbol.\n  static bool IsConstrainedApproximateMinimumDegreeOrderingAvailable() {\n    return false;\n  }\n\n  void Free(void* arg) {}\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_NO_SUITESPARSE\n\n#endif  // CERES_INTERNAL_SUITESPARSE_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/system_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n//         sameeragarwal@google.com (Sameer Agarwal)\n//\n// End-to-end tests for Ceres using Powell's function.\n\n#include <cmath>\n#include <cstdlib>\n\n#include \"ceres/autodiff_cost_function.h\"\n#include \"ceres/problem.h\"\n#include \"ceres/solver.h\"\n#include \"ceres/test_util.h\"\n#include \"ceres/types.h\"\n#include \"glog/logging.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// This class implements the SystemTestProblem interface and provides\n// access to an implementation of Powell's singular function.\n//\n//   F = 1/2 (f1^2 + f2^2 + f3^2 + f4^2)\n//\n//   f1 = x1 + 10*x2;\n//   f2 = sqrt(5) * (x3 - x4)\n//   f3 = (x2 - 2*x3)^2\n//   f4 = sqrt(10) * (x1 - x4)^2\n//\n// The starting values are x1 = 3, x2 = -1, x3 = 0, x4 = 1.\n// The minimum is 0 at (x1, x2, x3, x4) = 0.\n//\n// From: Testing Unconstrained Optimization Software by Jorge J. More, Burton S.\n// Garbow and Kenneth E. Hillstrom in ACM Transactions on Mathematical Software,\n// Vol 7(1), March 1981.\nclass PowellsFunction {\n public:\n  PowellsFunction() {\n    x_[0] =  3.0;\n    x_[1] = -1.0;\n    x_[2] =  0.0;\n    x_[3] =  1.0;\n\n    problem_.AddResidualBlock(\n        new AutoDiffCostFunction<F1, 1, 1, 1>(new F1), NULL, &x_[0], &x_[1]);\n    problem_.AddResidualBlock(\n        new AutoDiffCostFunction<F2, 1, 1, 1>(new F2), NULL, &x_[2], &x_[3]);\n    problem_.AddResidualBlock(\n        new AutoDiffCostFunction<F3, 1, 1, 1>(new F3), NULL, &x_[1], &x_[2]);\n    problem_.AddResidualBlock(\n        new AutoDiffCostFunction<F4, 1, 1, 1>(new F4), NULL, &x_[0], &x_[3]);\n\n    // Settings for the reference solution.\n    options_.linear_solver_type = ceres::DENSE_QR;\n    options_.max_num_iterations = 10;\n    options_.num_threads = 1;\n  }\n\n  Problem* mutable_problem() { return &problem_; }\n  Solver::Options* mutable_solver_options() { return &options_; }\n\n  static double kResidualTolerance;\n\n private:\n  // Templated functions used for automatically differentiated cost\n  // functions.\n  class F1 {\n   public:\n    template <typename T> bool operator()(const T* const x1,\n                                          const T* const x2,\n                                          T* residual) const {\n      // f1 = x1 + 10 * x2;\n      *residual = *x1 + 10.0 * *x2;\n      return true;\n    }\n  };\n\n  class F2 {\n   public:\n    template <typename T> bool operator()(const T* const x3,\n                                          const T* const x4,\n                                          T* residual) const {\n      // f2 = sqrt(5) (x3 - x4)\n      *residual = sqrt(5.0) * (*x3 - *x4);\n      return true;\n    }\n  };\n\n  class F3 {\n   public:\n    template <typename T> bool operator()(const T* const x2,\n                                          const T* const x4,\n                                          T* residual) const {\n      // f3 = (x2 - 2 x3)^2\n      residual[0] = (x2[0] - 2.0 * x4[0]) * (x2[0] - 2.0 * x4[0]);\n      return true;\n    }\n  };\n\n  class F4 {\n   public:\n    template <typename T> bool operator()(const T* const x1,\n                                          const T* const x4,\n                                          T* residual) const {\n      // f4 = sqrt(10) (x1 - x4)^2\n      residual[0] = sqrt(10.0) * (x1[0] - x4[0]) * (x1[0] - x4[0]);\n      return true;\n    }\n  };\n\n  double x_[4];\n  Problem problem_;\n  Solver::Options options_;\n};\n\ndouble PowellsFunction::kResidualTolerance = 1e-8;\n\ntypedef SystemTest<PowellsFunction> PowellTest;\n\nTEST_F(PowellTest, DenseQR) {\n  PowellsFunction powells_function;\n  Solver::Options* options = powells_function.mutable_solver_options();\n  options->linear_solver_type = DENSE_QR;\n  RunSolverForConfigAndExpectResidualsMatch(*options,\n                                            powells_function.mutable_problem());\n}\n\nTEST_F(PowellTest, DenseNormalCholesky) {\n  PowellsFunction powells_function;\n  Solver::Options* options = powells_function.mutable_solver_options();\n  options->linear_solver_type = DENSE_NORMAL_CHOLESKY;\n  RunSolverForConfigAndExpectResidualsMatch(*options,\n                                            powells_function.mutable_problem());\n}\n\nTEST_F(PowellTest, DenseSchur) {\n  PowellsFunction powells_function;\n  Solver::Options* options = powells_function.mutable_solver_options();\n  options->linear_solver_type = DENSE_SCHUR;\n  RunSolverForConfigAndExpectResidualsMatch(*options,\n                                            powells_function.mutable_problem());\n}\n\nTEST_F(PowellTest, IterativeSchurWithJacobi) {\n  PowellsFunction powells_function;\n  Solver::Options* options = powells_function.mutable_solver_options();\n  options->linear_solver_type = ITERATIVE_SCHUR;\n  options->sparse_linear_algebra_library_type = NO_SPARSE;\n  options->preconditioner_type = JACOBI;\n  RunSolverForConfigAndExpectResidualsMatch(*options,\n                                            powells_function.mutable_problem());\n}\n\n#ifndef CERES_NO_SUITESPARSE\nTEST_F(PowellTest, SparseNormalCholeskyUsingSuiteSparse) {\n  PowellsFunction powells_function;\n  Solver::Options* options = powells_function.mutable_solver_options();\n  options->linear_solver_type = SPARSE_NORMAL_CHOLESKY;\n  options->sparse_linear_algebra_library_type = SUITE_SPARSE;\n  RunSolverForConfigAndExpectResidualsMatch(*options,\n                                            powells_function.mutable_problem());\n}\n#endif  // CERES_NO_SUITESPARSE\n\n#ifndef CERES_NO_CXSPARSE\nTEST_F(PowellTest, SparseNormalCholeskyUsingCXSparse) {\n  PowellsFunction powells_function;\n  Solver::Options* options = powells_function.mutable_solver_options();\n  options->linear_solver_type = SPARSE_NORMAL_CHOLESKY;\n  options->sparse_linear_algebra_library_type = CX_SPARSE;\n  RunSolverForConfigAndExpectResidualsMatch(*options,\n                                            powells_function.mutable_problem());\n}\n#endif  // CERES_NO_CXSPARSE\n\n#ifndef CERES_NO_ACCELERATE_SPARSE\nTEST_F(PowellTest, SparseNormalCholeskyUsingAccelerateSparse) {\n  PowellsFunction powells_function;\n  Solver::Options* options = powells_function.mutable_solver_options();\n  options->linear_solver_type = SPARSE_NORMAL_CHOLESKY;\n  options->sparse_linear_algebra_library_type = ACCELERATE_SPARSE;\n  RunSolverForConfigAndExpectResidualsMatch(*options,\n                                            powells_function.mutable_problem());\n}\n#endif  // CERES_NO_ACCELERATE_SPARSE\n\n#ifdef CERES_USE_EIGEN_SPARSE\nTEST_F(PowellTest, SparseNormalCholeskyUsingEigenSparse) {\n  PowellsFunction powells_function;\n  Solver::Options* options = powells_function.mutable_solver_options();\n  options->linear_solver_type = SPARSE_NORMAL_CHOLESKY;\n  options->sparse_linear_algebra_library_type = EIGEN_SPARSE;\n  RunSolverForConfigAndExpectResidualsMatch(*options,\n                                            powells_function.mutable_problem());\n}\n#endif  // CERES_USE_EIGEN_SPARSE\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/test_util.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n//\n// Utility functions useful for testing.\n\n#include \"ceres/test_util.h\"\n\n#include <algorithm>\n#include <cmath>\n\n#include \"ceres/file.h\"\n#include \"ceres/stringprintf.h\"\n#include \"ceres/types.h\"\n#include \"gflags/gflags.h\"\n#include \"glog/logging.h\"\n#include \"gtest/gtest.h\"\n\nDECLARE_string(test_srcdir);\n\n// This macro is used to inject additional path information specific\n// to the build system.\n\n#ifndef CERES_TEST_SRCDIR_SUFFIX\n#define CERES_TEST_SRCDIR_SUFFIX \"\"\n#endif\n\nnamespace ceres {\nnamespace internal {\n\nbool ExpectClose(double x, double y, double max_abs_relative_difference) {\n  if (std::isinf(x) && std::isinf(y)) {\n    EXPECT_EQ(std::signbit(x), std::signbit(y));\n    return true;\n  }\n\n  if (std::isnan(x) && std::isnan(y)) {\n    return true;\n  }\n\n  double absolute_difference = fabs(x - y);\n  double relative_difference = absolute_difference / std::max(fabs(x), fabs(y));\n  if (x == 0 || y == 0) {\n    // If x or y is exactly zero, then relative difference doesn't have any\n    // meaning. Take the absolute difference instead.\n    relative_difference = absolute_difference;\n  }\n  if (relative_difference > max_abs_relative_difference) {\n    VLOG(1) << StringPrintf(\"x=%17g y=%17g abs=%17g rel=%17g\",\n                            x,\n                            y,\n                            absolute_difference,\n                            relative_difference);\n  }\n\n  EXPECT_NEAR(relative_difference, 0.0, max_abs_relative_difference);\n  return relative_difference <= max_abs_relative_difference;\n}\n\nvoid ExpectArraysCloseUptoScale(int n,\n                                const double* p,\n                                const double* q,\n                                double tol) {\n  CHECK_GT(n, 0);\n  CHECK(p);\n  CHECK(q);\n\n  double p_max = 0;\n  double q_max = 0;\n  int p_i = 0;\n  int q_i = 0;\n\n  for (int i = 0; i < n; ++i) {\n    if (std::abs(p[i]) > p_max) {\n      p_max = std::abs(p[i]);\n      p_i = i;\n    }\n    if (std::abs(q[i]) > q_max) {\n      q_max = std::abs(q[i]);\n      q_i = i;\n    }\n  }\n\n  // If both arrays are all zeros, they are equal up to scale, but\n  // for testing purposes, that's more likely to be an error than\n  // a desired result.\n  CHECK_NE(p_max, 0.0);\n  CHECK_NE(q_max, 0.0);\n\n  for (int i = 0; i < n; ++i) {\n    double p_norm = p[i] / p[p_i];\n    double q_norm = q[i] / q[q_i];\n\n    EXPECT_NEAR(p_norm, q_norm, tol) << \"i=\" << i;\n  }\n}\n\nvoid ExpectArraysClose(int n, const double* p, const double* q, double tol) {\n  CHECK_GT(n, 0);\n  CHECK(p);\n  CHECK(q);\n\n  for (int i = 0; i < n; ++i) {\n    EXPECT_TRUE(ExpectClose(p[i], q[i], tol)) << \"p[\" << i << \"]\" << p[i] << \" \"\n                                              << \"q[\" << i << \"]\" << q[i] << \" \"\n                                              << \"tol: \" << tol;\n  }\n}\n\nstd::string TestFileAbsolutePath(const std::string& filename) {\n  return JoinPath(FLAGS_test_srcdir + CERES_TEST_SRCDIR_SUFFIX, filename);\n}\n\nstd::string ToString(const Solver::Options& options) {\n  return StringPrintf(\"(%s, %s, %s, %s, %d)\",\n                      LinearSolverTypeToString(options.linear_solver_type),\n                      SparseLinearAlgebraLibraryTypeToString(\n                          options.sparse_linear_algebra_library_type),\n                      options.linear_solver_ordering ? \"USER\" : \"AUTOMATIC\",\n                      PreconditionerTypeToString(options.preconditioner_type),\n                      options.num_threads);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/test_util.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n\n#ifndef CERES_INTERNAL_TEST_UTIL_H_\n#define CERES_INTERNAL_TEST_UTIL_H_\n\n#include <string>\n\n#include \"ceres/internal/port.h\"\n#include \"ceres/problem.h\"\n#include \"ceres/solver.h\"\n#include \"ceres/stringprintf.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// Expects that x and y have a relative difference of no more than\n// max_abs_relative_difference. If either x or y is zero, then the relative\n// difference is interpreted as an absolute difference.\n//\n// If x and y have the same non-finite value (inf or nan) we treat them as being\n// close. In such a case no error is thrown and true is returned.\nbool ExpectClose(double x, double y, double max_abs_relative_difference);\n\n// Expects that for all i = 1,.., n - 1\n//\n//   |p[i] - q[i]| / max(|p[i]|, |q[i]|) < tolerance\nvoid ExpectArraysClose(int n,\n                       const double* p,\n                       const double* q,\n                       double tolerance);\n\n// Expects that for all i = 1,.., n - 1\n//\n//   |p[i] / max_norm_p - q[i] / max_norm_q| < tolerance\n//\n// where max_norm_p and max_norm_q are the max norms of the arrays p\n// and q respectively.\nvoid ExpectArraysCloseUptoScale(int n,\n                                const double* p,\n                                const double* q,\n                                double tolerance);\n\n// Construct a fully qualified path for the test file depending on the\n// local build/testing environment.\nstd::string TestFileAbsolutePath(const std::string& filename);\n\nstd::string ToString(const Solver::Options& options);\n\n// A templated test fixture, that is used for testing Ceres end to end\n// by computing a solution to the problem for a given solver\n// configuration and comparing it to a reference solver configuration.\n//\n// It is assumed that the SystemTestProblem has an Solver::Options\n// struct that contains the reference Solver configuration.\ntemplate <typename SystemTestProblem>\nclass SystemTest : public ::testing::Test {\n protected:\n  void SetUp() final {\n    SystemTestProblem system_test_problem;\n    SolveAndEvaluateFinalResiduals(\n        *system_test_problem.mutable_solver_options(),\n        system_test_problem.mutable_problem(),\n        &expected_final_residuals_);\n  }\n\n  void RunSolverForConfigAndExpectResidualsMatch(const Solver::Options& options,\n                                                 Problem* problem) {\n    std::vector<double> final_residuals;\n    SolveAndEvaluateFinalResiduals(options, problem, &final_residuals);\n\n    // We compare solutions by comparing their residual vectors. We do\n    // not compare parameter vectors because it is much more brittle\n    // and error prone to do so, since the same problem can have\n    // nearly the same residuals at two completely different positions\n    // in parameter space.\n    CHECK_EQ(expected_final_residuals_.size(), final_residuals.size());\n    for (int i = 0; i < final_residuals.size(); ++i) {\n      EXPECT_NEAR(final_residuals[i],\n                  expected_final_residuals_[i],\n                  SystemTestProblem::kResidualTolerance)\n          << \"Not close enough residual:\" << i;\n    }\n  }\n\n  void SolveAndEvaluateFinalResiduals(const Solver::Options& options,\n                                      Problem* problem,\n                                      std::vector<double>* final_residuals) {\n    Solver::Summary summary;\n    Solve(options, problem, &summary);\n    CHECK_NE(summary.termination_type, ceres::FAILURE);\n    problem->Evaluate(\n        Problem::EvaluateOptions(), nullptr, final_residuals, nullptr, nullptr);\n  }\n\n  std::vector<double> expected_final_residuals_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_TEST_UTIL_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/thread_pool.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: vitus@google.com (Michael Vitus)\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifdef CERES_USE_CXX11_THREADS\n\n#include \"ceres/thread_pool.h\"\n\n#include <cmath>\n#include <limits>\n\nnamespace ceres {\nnamespace internal {\nnamespace {\n\n// Constrain the total number of threads to the amount the hardware can support.\nint GetNumAllowedThreads(int requested_num_threads) {\n  return std::min(requested_num_threads, ThreadPool::MaxNumThreadsAvailable());\n}\n\n}  // namespace\n\nint ThreadPool::MaxNumThreadsAvailable() {\n  const int num_hardware_threads = std::thread::hardware_concurrency();\n  // hardware_concurrency() can return 0 if the value is not well defined or not\n  // computable.\n  return num_hardware_threads == 0\n      ? std::numeric_limits<int>::max()\n      : num_hardware_threads;\n}\n\nThreadPool::ThreadPool() { }\n\nThreadPool::ThreadPool(int num_threads) {\n  Resize(num_threads);\n}\n\nThreadPool::~ThreadPool() {\n  std::lock_guard<std::mutex> lock(thread_pool_mutex_);\n  // Signal the thread workers to stop and wait for them to finish all scheduled\n  // tasks.\n  Stop();\n  for (std::thread& thread : thread_pool_) {\n    thread.join();\n  }\n}\n\nvoid ThreadPool::Resize(int num_threads) {\n  std::lock_guard<std::mutex> lock(thread_pool_mutex_);\n\n  const int num_current_threads = thread_pool_.size();\n  if (num_current_threads >= num_threads) {\n    return;\n  }\n\n  const int create_num_threads =\n      GetNumAllowedThreads(num_threads) - num_current_threads;\n\n  for (int i = 0; i < create_num_threads; ++i) {\n    thread_pool_.push_back(std::thread(&ThreadPool::ThreadMainLoop, this));\n  }\n}\n\nvoid ThreadPool::AddTask(const std::function<void()>& func) {\n  task_queue_.Push(func);\n}\n\nint ThreadPool::Size() {\n  std::lock_guard<std::mutex> lock(thread_pool_mutex_);\n  return thread_pool_.size();\n}\n\nvoid ThreadPool::ThreadMainLoop() {\n  std::function<void()> task;\n  while (task_queue_.Wait(&task)) {\n    task();\n  }\n}\n\nvoid ThreadPool::Stop() {\n  task_queue_.StopWaiters();\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif // CERES_USE_CXX11_THREADS\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/thread_pool.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: vitus@google.com (Michael Vitus)\n\n#ifndef CERES_INTERNAL_THREAD_POOL_H_\n#define CERES_INTERNAL_THREAD_POOL_H_\n\n#include <functional>\n#include <mutex>\n#include <thread>\n#include <vector>\n\n#include \"ceres/concurrent_queue.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// A thread-safe thread pool with an unbounded task queue and a resizable number\n// of workers.  The size of the thread pool can be increased but never decreased\n// in order to support the largest number of threads requested.  The ThreadPool\n// has three states:\n//\n//  (1) The thread pool size is zero.  Tasks may be added to the thread pool via\n//  AddTask but they will not be executed until the thread pool is resized.\n//\n//  (2) The thread pool size is greater than zero.  Tasks may be added to the\n//  thread pool and will be executed as soon as a worker is available.  The\n//  thread pool may be resized while the thread pool is running.\n//\n//  (3) The thread pool is destructing.  The thread pool will signal all the\n//  workers to stop.  The workers will finish all of the tasks that have already\n//  been added to the thread pool.\n//\nclass ThreadPool {\n public:\n  // Returns the maximum number of hardware threads.\n  static int MaxNumThreadsAvailable();\n\n  // Default constructor with no active threads.  We allow instantiating a\n  // thread pool with no threads to support the use case of single threaded\n  // Ceres where everything will be executed on the main thread. For single\n  // threaded execution this has two benefits: avoid any overhead as threads\n  // are expensive to create, and no unused threads shown in the debugger.\n  ThreadPool();\n\n  // Instantiates a thread pool with min(MaxNumThreadsAvailable, num_threads)\n  // number of threads.\n  explicit ThreadPool(int num_threads);\n\n  // Signals the workers to stop and waits for them to finish any tasks that\n  // have been scheduled.\n  ~ThreadPool();\n\n  // Resizes the thread pool if it is currently less than the requested number\n  // of threads.  The thread pool will be resized to min(MaxNumThreadsAvailable,\n  // num_threads) number of threads.  Resize does not support reducing the\n  // thread pool size.  If a smaller number of threads is requested, the thread\n  // pool remains the same size.  The thread pool is reused within Ceres with\n  // different number of threads, and we need to ensure we can support the\n  // largest number of threads requested.  It is safe to resize the thread pool\n  // while the workers are executing tasks, and the resizing is guaranteed to\n  // complete upon return.\n  void Resize(int num_threads);\n\n  // Adds a task to the queue and wakes up a blocked thread.  If the thread pool\n  // size is greater than zero, then the task will be executed by a currently\n  // idle thread or when a thread becomes available.  If the thread pool has no\n  // threads, then the task will never be executed and the user should use\n  // Resize() to create a non-empty thread pool.\n  void AddTask(const std::function<void()>& func);\n\n  // Returns the current size of the thread pool.\n  int Size();\n\n private:\n  // Main loop for the threads which blocks on the task queue until work becomes\n  // available.  It will return if and only if Stop has been called.\n  void ThreadMainLoop();\n\n  // Signal all the threads to stop.  It does not block until the threads are\n  // finished.\n  void Stop();\n\n  // The queue that stores the units of work available for the thread pool.  The\n  // task queue maintains its own thread safety.\n  ConcurrentQueue<std::function<void()>> task_queue_;\n  std::vector<std::thread> thread_pool_;\n  std::mutex thread_pool_mutex_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_THREAD_POOL_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/thread_pool_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2018 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: vitus@google.com (Michael Vitus)\n\n// This include must come before any #ifndef check on Ceres compile options.\n#include \"ceres/internal/port.h\"\n\n#ifdef CERES_USE_CXX11_THREADS\n\n#include \"ceres/thread_pool.h\"\n\n#include <chrono>\n#include <condition_variable>\n#include <mutex>\n#include <thread>\n\n#include \"gmock/gmock.h\"\n#include \"gtest/gtest.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// Adds a number of tasks to the thread pool and ensures they all run.\nTEST(ThreadPool, AddTask) {\n  int value = 0;\n  const int num_tasks = 100;\n  {\n    ThreadPool thread_pool(2);\n\n    std::condition_variable condition;\n    std::mutex mutex;\n\n    for (int i = 0; i < num_tasks; ++i) {\n      thread_pool.AddTask([&]() {\n          std::lock_guard<std::mutex> lock(mutex);\n          ++value;\n          condition.notify_all();\n        });\n    }\n\n    std::unique_lock<std::mutex> lock(mutex);\n    condition.wait(lock, [&](){return value == num_tasks;});\n  }\n\n  EXPECT_EQ(num_tasks, value);\n}\n\n// Adds a number of tasks to the queue and resizes the thread pool while the\n// threads are executing their work.\nTEST(ThreadPool, ResizingDuringExecution) {\n  int value = 0;\n\n  const int num_tasks = 100;\n\n  // Run this test in a scope to delete the thread pool and all of the threads\n  // are stopped.\n  {\n    ThreadPool thread_pool(/*num_threads=*/2);\n\n    std::condition_variable condition;\n    std::mutex mutex;\n\n    // Acquire a lock on the mutex to prevent the threads from finishing their\n    // execution so we can test resizing the thread pool while the workers are\n    // executing a task.\n    std::unique_lock<std::mutex> lock(mutex);\n\n    // The same task for all of the workers to execute.\n    auto task = [&]() {\n      // This will block until the mutex is released inside the condition\n      // variable.\n      std::lock_guard<std::mutex> lock(mutex);\n      ++value;\n      condition.notify_all();\n    };\n\n    // Add the initial set of tasks to run.\n    for (int i = 0; i < num_tasks / 2; ++i) {\n      thread_pool.AddTask(task);\n    }\n\n    // Resize the thread pool while tasks are executing.\n    thread_pool.Resize(/*num_threads=*/3);\n\n    // Add more tasks to the thread pool to guarantee these are also completed.\n    for (int i = 0; i < num_tasks / 2; ++i) {\n      thread_pool.AddTask(task);\n    }\n\n    // Unlock the mutex to unblock all of the threads and wait until all of the\n    // tasks are completed.\n    condition.wait(lock, [&](){return value == num_tasks;});\n  }\n\n  EXPECT_EQ(num_tasks, value);\n}\n\n// Tests the destructor will wait until all running tasks are finished before\n// destructing the thread pool.\nTEST(ThreadPool, Destructor) {\n  // Ensure the hardware supports more than 1 thread to ensure the test will\n  // pass.\n  const int num_hardware_threads = std::thread::hardware_concurrency();\n  if (num_hardware_threads <= 1) {\n    LOG(ERROR)\n        << \"Test not supported, the hardware does not support threading.\";\n    return;\n  }\n\n  std::condition_variable condition;\n  std::mutex mutex;\n  // Lock the mutex to ensure the tasks are blocked.\n  std::unique_lock<std::mutex> master_lock(mutex);\n  int value = 0;\n\n  // Create a thread that will instantiate and delete the thread pool.  This is\n  // required because we need to block on the thread pool being deleted and\n  // signal the tasks to finish.\n  std::thread thread([&]() {\n    ThreadPool thread_pool(/*num_threads=*/2);\n\n    for (int i = 0; i < 100; ++i) {\n      thread_pool.AddTask([&]() {\n        // This will block until the mutex is released inside the condition\n        // variable.\n        std::lock_guard<std::mutex> lock(mutex);\n        ++value;\n        condition.notify_all();\n      });\n    }\n    // The thread pool should be deleted.\n  });\n\n  // Give the thread pool time to start, add all the tasks, and then delete\n  // itself.\n  std::this_thread::sleep_for(std::chrono::milliseconds(500));\n\n  // Unlock the tasks.\n  master_lock.unlock();\n\n  // Wait for the thread to complete.\n  thread.join();\n\n  EXPECT_EQ(100, value);\n}\n\nTEST(ThreadPool, Resize) {\n  // Ensure the hardware supports more than 1 thread to ensure the test will\n  // pass.\n  const int num_hardware_threads = std::thread::hardware_concurrency();\n  if (num_hardware_threads <= 1) {\n    LOG(ERROR)\n        << \"Test not supported, the hardware does not support threading.\";\n    return;\n  }\n\n  ThreadPool thread_pool(1);\n\n  EXPECT_EQ(1, thread_pool.Size());\n\n  thread_pool.Resize(2);\n\n  EXPECT_EQ(2, thread_pool.Size());\n\n  // Try reducing the thread pool size and verify it stays the same size.\n  thread_pool.Resize(1);\n  EXPECT_EQ(2, thread_pool.Size());\n}\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif // CERES_USE_CXX11_THREADS\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/thread_token_provider.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: yp@photonscore.de (Yury Prokazov)\n\n#include \"ceres/thread_token_provider.h\"\n\n#ifdef CERES_USE_OPENMP\n#include <omp.h>\n#endif\n\nnamespace ceres {\nnamespace internal {\n\nThreadTokenProvider::ThreadTokenProvider(int num_threads) {\n  (void)num_threads;\n#ifdef CERES_USE_CXX11_THREADS\n  for (int i = 0; i < num_threads; i++) {\n    pool_.Push(i);\n  }\n#endif\n\n}\n\nint ThreadTokenProvider::Acquire() {\n#ifdef CERES_USE_OPENMP\n  return omp_get_thread_num();\n#endif\n\n#ifdef CERES_NO_THREADS\n  return 0;\n#endif\n\n#ifdef CERES_USE_CXX11_THREADS\n  int thread_id;\n  CHECK(pool_.Wait(&thread_id));\n  return thread_id;\n#endif\n\n}\n\nvoid ThreadTokenProvider::Release(int thread_id) {\n  (void)thread_id;\n#ifdef CERES_USE_CXX11_THREADS\n  pool_.Push(thread_id);\n#endif\n\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/thread_token_provider.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: yp@photonscore.de (Yury Prokazov)\n\n#ifndef CERES_INTERNAL_THREAD_TOKEN_PROVIDER_H_\n#define CERES_INTERNAL_THREAD_TOKEN_PROVIDER_H_\n\n#include \"ceres/internal/config.h\"\n#include \"ceres/internal/port.h\"\n\n#ifdef CERES_USE_CXX11_THREADS\n#include \"ceres/concurrent_queue.h\"\n#endif\n\nnamespace ceres {\nnamespace internal {\n\n// Helper for C++11 thread number identification that is similar to\n// omp_get_thread_num() behaviour. This is necessary to support C++11\n// threading with a sequential thread id. This is used to access preallocated\n// resources in the parallelized code parts.  The sequence of tokens varies from\n// 0 to num_threads - 1 that can be acquired to identify the thread in a thread\n// pool.\n//\n// If CERES_NO_THREADS is defined, Acquire() always returns 0 and Release()\n// takes no action.\n//\n// If CERES_USE_OPENMP, omp_get_thread_num() is used to Acquire() with no action\n// in Release()\n//\n//\n// Example usage pseudocode:\n//\n// ThreadTokenProvider ttp(N); // allocate N tokens\n// Spawn N threads {\n//    int token = ttp.Acquire(); // get unique token\n//    ...\n//    ... use token to access resources bound to the thread\n//    ...\n//    ttp.Release(token); // return token to the pool\n//  }\n//\nclass ThreadTokenProvider {\n public:\n  ThreadTokenProvider(int num_threads);\n\n  // Returns the first token from the queue. The acquired value must be\n  // given back by Release().\n  int Acquire();\n\n  // Makes previously acquired token available for other threads.\n  void Release(int thread_id);\n\n private:\n#ifdef CERES_USE_CXX11_THREADS\n  // This queue initially holds a sequence from 0..num_threads-1. Every\n  // Acquire() call the first number is removed from here. When the token is not\n  // needed anymore it shall be given back with corresponding Release()\n  // call. This concurrent queue is more expensive than TBB's version, so you\n  // should not acquire the thread ID on every for loop iteration.\n  ConcurrentQueue<int> pool_;\n#endif\n\n  ThreadTokenProvider(ThreadTokenProvider&);\n  ThreadTokenProvider& operator=(ThreadTokenProvider&);\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_THREAD_TOKEN_PROVIDER_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/tiny_solver_autodiff_function_test.cc",
    "content": "\n// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: mierle@gmail.com (Keir Mierle)\n\n#include \"ceres/tiny_solver_autodiff_function.h\"\n#include \"ceres/tiny_solver.h\"\n#include \"ceres/tiny_solver_test_util.h\"\n\n#include <algorithm>\n#include <cmath>\n#include <limits>\n\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\n\nstruct AutoDiffTestFunctor {\n  template<typename T>\n  bool operator()(const T* const parameters, T* residuals) const {\n    // Shift the parameters so the solution is not at the origin, to prevent\n    // accidentally showing \"PASS\".\n    const T& a = parameters[0] - T(1.0);\n    const T& b = parameters[1] - T(2.0);\n    const T& c = parameters[2] - T(3.0);\n    residuals[0] = 2.*a + 0.*b + 1.*c;\n    residuals[1] = 0.*a + 4.*b + 6.*c;\n    return true;\n  }\n};\n\n// Leave a factor of 10 slop since these tests tend to mysteriously break on\n// other compilers or architectures if the tolerance is too tight.\nstatic double const kTolerance = std::numeric_limits<double>::epsilon() * 10;\n\nTEST(TinySolverAutoDiffFunction, SimpleFunction) {\n  typedef TinySolverAutoDiffFunction<AutoDiffTestFunctor, 2, 3>\n      AutoDiffTestFunction;\n  AutoDiffTestFunctor autodiff_test_functor;\n  AutoDiffTestFunction f(autodiff_test_functor);\n\n  Eigen::Vector3d x(2.0, 1.0, 4.0);\n  Eigen::Vector2d residuals;\n\n  // Check the case with cost-only evaluation.\n  residuals.setConstant(555);  // Arbitrary.\n  EXPECT_TRUE(f(&x(0), &residuals(0), nullptr));\n  EXPECT_NEAR(3.0, residuals(0), kTolerance);\n  EXPECT_NEAR(2.0, residuals(1), kTolerance);\n\n  // Check the case with cost and Jacobian evaluation.\n  Eigen::Matrix<double, 2, 3> jacobian;\n  residuals.setConstant(555);  // Arbitrary.\n  jacobian.setConstant(555);\n  EXPECT_TRUE(f(&x(0), &residuals(0), &jacobian(0, 0)));\n\n  // Verify cost.\n  EXPECT_NEAR(3.0, residuals(0), kTolerance);\n  EXPECT_NEAR(2.0, residuals(1), kTolerance);\n\n  // Verify Jacobian Row 1.\n  EXPECT_NEAR(2.0, jacobian(0, 0), kTolerance);\n  EXPECT_NEAR(0.0, jacobian(0, 1), kTolerance);\n  EXPECT_NEAR(1.0, jacobian(0, 2), kTolerance);\n\n  // Verify Jacobian row 2.\n  EXPECT_NEAR(0.0, jacobian(1, 0), kTolerance);\n  EXPECT_NEAR(4.0, jacobian(1, 1), kTolerance);\n  EXPECT_NEAR(6.0, jacobian(1, 2), kTolerance);\n}\n\nclass DynamicResidualsFunctor {\n public:\n  typedef double Scalar;\n  enum {\n    NUM_RESIDUALS = Eigen::Dynamic,\n    NUM_PARAMETERS = 3,\n  };\n\n  int NumResiduals() const {\n    return 2;\n  }\n\n  template<typename T>\n  bool operator()(const T* parameters, T* residuals) const {\n    // Jacobian is not evaluated by cost function, but by autodiff.\n    T* jacobian = nullptr;\n    return EvaluateResidualsAndJacobians(parameters, residuals, jacobian);\n  }\n};\n\ntemplate<typename Function, typename Vector>\nvoid TestHelper(const Function& f, const Vector& x0) {\n  Vector x = x0;\n  Eigen::Vector2d residuals;\n  f(x.data(), residuals.data(), nullptr);\n  EXPECT_GT(residuals.squaredNorm() / 2.0, 1e-10);\n\n  TinySolver<Function> solver;\n  solver.Solve(f, &x);\n  EXPECT_NEAR(0.0, solver.summary.final_cost, 1e-10);\n}\n\n// A test case for when the number of residuals is\n// dynamically sized and we use autodiff\nTEST(TinySolverAutoDiffFunction, ResidualsDynamicAutoDiff) {\n  Eigen::Vector3d x0(0.76026643, -30.01799744, 0.55192142);\n\n  DynamicResidualsFunctor f;\n  using AutoDiffCostFunctor =\n      ceres::TinySolverAutoDiffFunction<DynamicResidualsFunctor,\n                                        Eigen::Dynamic,\n                                        3>;\n  AutoDiffCostFunctor f_autodiff(f);\n\n  Eigen::Vector2d residuals;\n  f_autodiff(x0.data(), residuals.data(), nullptr);\n  EXPECT_GT(residuals.squaredNorm() / 2.0, 1e-10);\n\n  TinySolver<AutoDiffCostFunctor> solver;\n  solver.Solve(f, &x0);\n  EXPECT_NEAR(0.0, solver.summary.final_cost, 1e-10);\n}\n\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/tiny_solver_cost_function_adapter_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/tiny_solver_cost_function_adapter.h\"\n\n#include <algorithm>\n#include <cmath>\n#include <memory>\n\n#include \"ceres/cost_function.h\"\n#include \"ceres/sized_cost_function.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\n\nclass CostFunction2x3 : public SizedCostFunction<2,3> {\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const final {\n    double x = parameters[0][0];\n    double y = parameters[0][1];\n    double z = parameters[0][2];\n\n    residuals[0] = x + 2*y + 4*z;\n    residuals[1] = y * z;\n\n    if (jacobians && jacobians[0]) {\n      jacobians[0][0] = 1;\n      jacobians[0][1] = 2;\n      jacobians[0][2] = 4;\n\n      jacobians[0][3 + 0] = 0;\n      jacobians[0][3 + 1] = z;\n      jacobians[0][3 + 2] = y;\n    }\n\n    return true;\n  }\n};\n\ntemplate<int kNumResiduals, int kNumParameters>\nvoid TestHelper() {\n  std::unique_ptr<CostFunction> cost_function(new CostFunction2x3);\n  typedef  TinySolverCostFunctionAdapter<kNumResiduals, kNumParameters> CostFunctionAdapter;\n  CostFunctionAdapter cfa(*cost_function);\n  EXPECT_EQ(CostFunctionAdapter::NUM_RESIDUALS, kNumResiduals);\n  EXPECT_EQ(CostFunctionAdapter::NUM_PARAMETERS, kNumParameters);\n\n  EXPECT_EQ(cfa.NumResiduals(), 2);\n  EXPECT_EQ(cfa.NumParameters(), 3);\n\n  Eigen::Matrix<double, 2, 1> actual_residuals, expected_residuals;\n  Eigen::Matrix<double, 2, 3, Eigen::ColMajor> actual_jacobian;\n  Eigen::Matrix<double, 2, 3, Eigen::RowMajor> expected_jacobian;\n\n  double xyz[3] = { 1.0, -1.0, 2.0};\n  double* parameters[1] = {xyz};\n\n  // Check that residual only evaluation works.\n  cost_function->Evaluate(parameters, expected_residuals.data(), NULL);\n  cfa(xyz, actual_residuals.data(), NULL);\n  EXPECT_NEAR(\n      (expected_residuals - actual_residuals).norm() / actual_residuals.norm(),\n      0.0,\n      std::numeric_limits<double>::epsilon())\n      << \"\\nExpected residuals: \" << expected_residuals.transpose()\n      << \"\\nActual residuals: \" << actual_residuals.transpose();\n\n  // Check that residual and jacobian evaluation works.\n  double* jacobians[1] = {expected_jacobian.data()};\n  cost_function->Evaluate(parameters, expected_residuals.data(), jacobians);\n  cfa(xyz, actual_residuals.data(), actual_jacobian.data());\n\n  EXPECT_NEAR(\n      (expected_residuals - actual_residuals).norm() / actual_residuals.norm(),\n      0.0,\n      std::numeric_limits<double>::epsilon())\n      << \"\\nExpected residuals: \" << expected_residuals.transpose()\n      << \"\\nActual residuals: \" << actual_residuals.transpose();\n\n  EXPECT_NEAR(\n      (expected_jacobian - actual_jacobian).norm() / actual_jacobian.norm(),\n      0.0,\n      std::numeric_limits<double>::epsilon())\n      << \"\\nExpected jacobian: \" << expected_jacobian.transpose()\n      << \"\\nActual jacobian: \" << actual_jacobian.transpose();\n}\n\nTEST(TinySolverCostFunctionAdapter, StaticResidualsStaticParameterBlock) {\n  TestHelper<2, 3>();\n}\n\nTEST(TinySolverCostFunctionAdapter, DynamicResidualsStaticParameterBlock) {\n  TestHelper<Eigen::Dynamic, 3>();\n}\n\nTEST(TinySolverCostFunctionAdapter, StaticResidualsDynamicParameterBlock) {\n  TestHelper<2, Eigen::Dynamic>();\n}\n\nTEST(TinySolverCostFunctionAdapter, DynamicResidualsDynamicParameterBlock) {\n  TestHelper<Eigen::Dynamic, Eigen::Dynamic>();\n}\n\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/tiny_solver_test.cc",
    "content": "\n// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: mierle@gmail.com (Keir Mierle)\n\n#include \"ceres/tiny_solver.h\"\n#include \"ceres/tiny_solver_test_util.h\"\n\n#include <algorithm>\n#include <cmath>\n\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\n\ntypedef Eigen::Matrix<double, 2, 1> Vec2;\ntypedef Eigen::Matrix<double, 3, 1> Vec3;\ntypedef Eigen::VectorXd VecX;\n\nclass ExampleStatic {\n public:\n  typedef double Scalar;\n  enum {\n    // Can also be Eigen::Dynamic.\n    NUM_RESIDUALS = 2,\n    NUM_PARAMETERS = 3,\n  };\n  bool operator()(const double* parameters,\n                  double* residuals,\n                  double* jacobian) const {\n    return EvaluateResidualsAndJacobians(parameters, residuals, jacobian);\n  }\n};\n\nclass ExampleParametersDynamic {\n public:\n  typedef double Scalar;\n  enum {\n    NUM_RESIDUALS = 2,\n    NUM_PARAMETERS = Eigen::Dynamic,\n  };\n\n  int NumParameters() const {\n    return 3;\n  }\n\n  bool operator()(const double* parameters,\n                  double* residuals,\n                  double* jacobian) const {\n    return EvaluateResidualsAndJacobians(parameters, residuals, jacobian);\n  }\n};\n\nclass ExampleResidualsDynamic {\n public:\n  typedef double Scalar;\n  enum {\n    NUM_RESIDUALS = Eigen::Dynamic,\n    NUM_PARAMETERS = 3,\n  };\n\n  int NumResiduals() const {\n    return 2;\n  }\n\n  bool operator()(const double* parameters,\n                  double* residuals,\n                  double* jacobian) const {\n    return EvaluateResidualsAndJacobians(parameters, residuals, jacobian);\n  }\n};\n\nclass ExampleAllDynamic {\n public:\n  typedef double Scalar;\n  enum {\n    NUM_RESIDUALS = Eigen::Dynamic,\n    NUM_PARAMETERS = Eigen::Dynamic,\n  };\n\n  int NumResiduals() const {\n    return 2;\n  }\n\n  int NumParameters() const {\n    return 3;\n  }\n\n  bool operator()(const double* parameters,\n                  double* residuals,\n                  double* jacobian) const {\n    return EvaluateResidualsAndJacobians(parameters, residuals, jacobian);\n  }\n};\n\ntemplate<typename Function, typename Vector>\nvoid TestHelper(const Function& f, const Vector& x0) {\n  Vector x = x0;\n  Vec2 residuals;\n  f(x.data(), residuals.data(), NULL);\n  EXPECT_GT(residuals.squaredNorm() / 2.0, 1e-10);\n\n  TinySolver<Function> solver;\n  solver.Solve(f, &x);\n  EXPECT_NEAR(0.0, solver.summary.final_cost, 1e-10);\n}\n\n// A test case for when the cost function is statically sized.\nTEST(TinySolver, SimpleExample) {\n  Vec3 x0(0.76026643, -30.01799744, 0.55192142);\n  ExampleStatic f;\n\n  TestHelper(f, x0);\n}\n\n// A test case for when the number of parameters is dynamically sized.\nTEST(TinySolver, ParametersDynamic) {\n  VecX x0(3);\n  x0 << 0.76026643, -30.01799744, 0.55192142;\n\n  ExampleParametersDynamic f;\n\n  TestHelper(f, x0);\n}\n\n// A test case for when the number of residuals is dynamically sized.\nTEST(TinySolver, ResidualsDynamic) {\n  Vec3 x0(0.76026643, -30.01799744, 0.55192142);\n\n  ExampleResidualsDynamic f;\n\n  TestHelper(f, x0);\n}\n\n// A test case for when the number of parameters and residuals is\n// dynamically sized.\nTEST(TinySolver, ParametersAndResidualsDynamic) {\n  VecX x0(3);\n  x0 << 0.76026643, -30.01799744, 0.55192142;\n\n  ExampleAllDynamic f;\n\n  TestHelper(f, x0);\n}\n\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/tiny_solver_test_util.h",
    "content": "\n// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: mierle@gmail.com (Keir Mierle)\n\n#ifndef CERES_INTERNAL_TINY_SOLVER_TEST_UTIL_H_\n#define CERES_INTERNAL_TINY_SOLVER_TEST_UTIL_H_\n\nnamespace ceres {\n\ntemplate<typename T>\nbool EvaluateResidualsAndJacobians(const T* parameters,\n                                   T* residuals,\n                                   T* jacobian) {\n  T x = parameters[0];\n  T y = parameters[1];\n  T z = parameters[2];\n\n  residuals[0] = x + static_cast<T>(2) * y + static_cast<T>(4) * z;\n  residuals[1] = y * z;\n\n  if (jacobian) {\n    jacobian[0 * 2 + 0] = static_cast<T>(1);\n    jacobian[0 * 2 + 1] = static_cast<T>(0);\n\n    jacobian[1 * 2 + 0] = static_cast<T>(2);\n    jacobian[1 * 2 + 1] = z;\n\n    jacobian[2 * 2 + 0] = static_cast<T>(4);\n    jacobian[2 * 2 + 1] = y;\n  }\n  return true;\n}\n\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_TINY_SOLVER_TEST_UTIL_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/triplet_sparse_matrix.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/triplet_sparse_matrix.h\"\n\n#include <algorithm>\n#include <cstddef>\n\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/internal/port.h\"\n#include \"ceres/random.h\"\n#include \"ceres/types.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nTripletSparseMatrix::TripletSparseMatrix()\n    : num_rows_(0),\n      num_cols_(0),\n      max_num_nonzeros_(0),\n      num_nonzeros_(0) {}\n\n\nTripletSparseMatrix::~TripletSparseMatrix() {}\n\nTripletSparseMatrix::TripletSparseMatrix(int num_rows,\n                                         int num_cols,\n                                         int max_num_nonzeros)\n    : num_rows_(num_rows),\n      num_cols_(num_cols),\n      max_num_nonzeros_(max_num_nonzeros),\n      num_nonzeros_(0) {\n  // All the sizes should at least be zero\n  CHECK_GE(num_rows, 0);\n  CHECK_GE(num_cols, 0);\n  CHECK_GE(max_num_nonzeros, 0);\n  AllocateMemory();\n}\n\nTripletSparseMatrix::TripletSparseMatrix(const int num_rows,\n                                         const int num_cols,\n                                         const std::vector<int>& rows,\n                                         const std::vector<int>& cols,\n                                         const std::vector<double>& values)\n    : num_rows_(num_rows),\n      num_cols_(num_cols),\n      max_num_nonzeros_(values.size()),\n      num_nonzeros_(values.size()) {\n  // All the sizes should at least be zero\n  CHECK_GE(num_rows, 0);\n  CHECK_GE(num_cols, 0);\n  CHECK_EQ(rows.size(), cols.size());\n  CHECK_EQ(rows.size(), values.size());\n  AllocateMemory();\n  std::copy(rows.begin(), rows.end(), rows_.get());\n  std::copy(cols.begin(), cols.end(), cols_.get());\n  std::copy(values.begin(), values.end(), values_.get());\n}\n\nTripletSparseMatrix::TripletSparseMatrix(const TripletSparseMatrix& orig)\n    : SparseMatrix(),\n      num_rows_(orig.num_rows_),\n      num_cols_(orig.num_cols_),\n      max_num_nonzeros_(orig.max_num_nonzeros_),\n      num_nonzeros_(orig.num_nonzeros_) {\n  AllocateMemory();\n  CopyData(orig);\n}\n\nTripletSparseMatrix& TripletSparseMatrix::operator=(\n    const TripletSparseMatrix& rhs) {\n  if (this == &rhs) {\n    return *this;\n  }\n  num_rows_ = rhs.num_rows_;\n  num_cols_ = rhs.num_cols_;\n  num_nonzeros_ = rhs.num_nonzeros_;\n  max_num_nonzeros_ = rhs.max_num_nonzeros_;\n  AllocateMemory();\n  CopyData(rhs);\n  return *this;\n}\n\nbool TripletSparseMatrix::AllTripletsWithinBounds() const {\n  for (int i = 0; i < num_nonzeros_; ++i) {\n    if ((rows_[i] < 0) || (rows_[i] >= num_rows_) ||\n        (cols_[i] < 0) || (cols_[i] >= num_cols_))\n      return false;\n  }\n  return true;\n}\n\nvoid TripletSparseMatrix::Reserve(int new_max_num_nonzeros) {\n  CHECK_LE(num_nonzeros_, new_max_num_nonzeros)\n      << \"Reallocation will cause data loss\";\n\n  // Nothing to do if we have enough space already.\n  if (new_max_num_nonzeros <= max_num_nonzeros_)\n    return;\n\n  int* new_rows = new int[new_max_num_nonzeros];\n  int* new_cols = new int[new_max_num_nonzeros];\n  double* new_values = new double[new_max_num_nonzeros];\n\n  for (int i = 0; i < num_nonzeros_; ++i) {\n    new_rows[i] = rows_[i];\n    new_cols[i] = cols_[i];\n    new_values[i] = values_[i];\n  }\n\n  rows_.reset(new_rows);\n  cols_.reset(new_cols);\n  values_.reset(new_values);\n\n  max_num_nonzeros_ = new_max_num_nonzeros;\n}\n\nvoid TripletSparseMatrix::SetZero() {\n  std::fill(values_.get(), values_.get() + max_num_nonzeros_, 0.0);\n  num_nonzeros_ = 0;\n}\n\nvoid TripletSparseMatrix::set_num_nonzeros(int num_nonzeros) {\n  CHECK_GE(num_nonzeros, 0);\n  CHECK_LE(num_nonzeros, max_num_nonzeros_);\n  num_nonzeros_ = num_nonzeros;\n}\n\nvoid TripletSparseMatrix::AllocateMemory() {\n  rows_.reset(new int[max_num_nonzeros_]);\n  cols_.reset(new int[max_num_nonzeros_]);\n  values_.reset(new double[max_num_nonzeros_]);\n}\n\nvoid TripletSparseMatrix::CopyData(const TripletSparseMatrix& orig) {\n  for (int i = 0; i < num_nonzeros_; ++i) {\n    rows_[i] = orig.rows_[i];\n    cols_[i] = orig.cols_[i];\n    values_[i] = orig.values_[i];\n  }\n}\n\nvoid TripletSparseMatrix::RightMultiply(const double* x,  double* y) const {\n  for (int i = 0; i < num_nonzeros_; ++i) {\n    y[rows_[i]] += values_[i]*x[cols_[i]];\n  }\n}\n\nvoid TripletSparseMatrix::LeftMultiply(const double* x, double* y) const {\n  for (int i = 0; i < num_nonzeros_; ++i) {\n    y[cols_[i]] += values_[i]*x[rows_[i]];\n  }\n}\n\nvoid TripletSparseMatrix::SquaredColumnNorm(double* x) const {\n  CHECK(x != nullptr);\n  VectorRef(x, num_cols_).setZero();\n  for (int i = 0; i < num_nonzeros_; ++i) {\n    x[cols_[i]] += values_[i] * values_[i];\n  }\n}\n\nvoid TripletSparseMatrix::ScaleColumns(const double* scale) {\n  CHECK(scale != nullptr);\n  for (int i = 0; i < num_nonzeros_; ++i) {\n    values_[i] = values_[i] * scale[cols_[i]];\n  }\n}\n\nvoid TripletSparseMatrix::ToDenseMatrix(Matrix* dense_matrix) const {\n  dense_matrix->resize(num_rows_, num_cols_);\n  dense_matrix->setZero();\n  Matrix& m = *dense_matrix;\n  for (int i = 0; i < num_nonzeros_; ++i) {\n    m(rows_[i], cols_[i]) += values_[i];\n  }\n}\n\nvoid TripletSparseMatrix::AppendRows(const TripletSparseMatrix& B) {\n  CHECK_EQ(B.num_cols(), num_cols_);\n  Reserve(num_nonzeros_ + B.num_nonzeros_);\n  for (int i = 0; i < B.num_nonzeros_; ++i) {\n    rows_.get()[num_nonzeros_] = B.rows()[i] + num_rows_;\n    cols_.get()[num_nonzeros_] = B.cols()[i];\n    values_.get()[num_nonzeros_++] = B.values()[i];\n  }\n  num_rows_ = num_rows_ + B.num_rows();\n}\n\nvoid TripletSparseMatrix::AppendCols(const TripletSparseMatrix& B) {\n  CHECK_EQ(B.num_rows(), num_rows_);\n  Reserve(num_nonzeros_ + B.num_nonzeros_);\n  for (int i = 0; i < B.num_nonzeros_; ++i, ++num_nonzeros_) {\n    rows_.get()[num_nonzeros_] = B.rows()[i];\n    cols_.get()[num_nonzeros_] = B.cols()[i] + num_cols_;\n    values_.get()[num_nonzeros_] = B.values()[i];\n  }\n  num_cols_ = num_cols_ + B.num_cols();\n}\n\n\nvoid TripletSparseMatrix::Resize(int new_num_rows, int new_num_cols) {\n  if ((new_num_rows >= num_rows_) && (new_num_cols >= num_cols_)) {\n    num_rows_  = new_num_rows;\n    num_cols_ = new_num_cols;\n    return;\n  }\n\n  num_rows_ = new_num_rows;\n  num_cols_ = new_num_cols;\n\n  int* r_ptr = rows_.get();\n  int* c_ptr = cols_.get();\n  double* v_ptr = values_.get();\n\n  int dropped_terms = 0;\n  for (int i = 0; i < num_nonzeros_; ++i) {\n    if ((r_ptr[i] < num_rows_) && (c_ptr[i] < num_cols_)) {\n      if (dropped_terms) {\n        r_ptr[i-dropped_terms] = r_ptr[i];\n        c_ptr[i-dropped_terms] = c_ptr[i];\n        v_ptr[i-dropped_terms] = v_ptr[i];\n      }\n    } else {\n      ++dropped_terms;\n    }\n  }\n  num_nonzeros_ -= dropped_terms;\n}\n\nTripletSparseMatrix* TripletSparseMatrix::CreateSparseDiagonalMatrix(\n    const double* values, int num_rows) {\n  TripletSparseMatrix* m =\n      new TripletSparseMatrix(num_rows, num_rows, num_rows);\n  for (int i = 0; i < num_rows; ++i) {\n    m->mutable_rows()[i] = i;\n    m->mutable_cols()[i] = i;\n    m->mutable_values()[i] = values[i];\n  }\n  m->set_num_nonzeros(num_rows);\n  return m;\n}\n\nvoid TripletSparseMatrix::ToTextFile(FILE* file) const {\n  CHECK(file != nullptr);\n  for (int i = 0; i < num_nonzeros_; ++i) {\n    fprintf(file, \"% 10d % 10d %17f\\n\", rows_[i], cols_[i], values_[i]);\n  }\n}\n\nTripletSparseMatrix* TripletSparseMatrix::CreateRandomMatrix(\n    const TripletSparseMatrix::RandomMatrixOptions& options) {\n  CHECK_GT(options.num_rows, 0);\n  CHECK_GT(options.num_cols, 0);\n  CHECK_GT(options.density, 0.0);\n  CHECK_LE(options.density, 1.0);\n\n  std::vector<int> rows;\n  std::vector<int> cols;\n  std::vector<double> values;\n  while (rows.empty()) {\n    rows.clear();\n    cols.clear();\n    values.clear();\n    for (int r = 0; r < options.num_rows; ++r) {\n      for (int c = 0; c < options.num_cols; ++c) {\n        if (RandDouble() <= options.density) {\n          rows.push_back(r);\n          cols.push_back(c);\n          values.push_back(RandNormal());\n        }\n      }\n    }\n  }\n\n  return new TripletSparseMatrix(\n      options.num_rows, options.num_cols, rows, cols, values);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/triplet_sparse_matrix.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_TRIPLET_SPARSE_MATRIX_H_\n#define CERES_INTERNAL_TRIPLET_SPARSE_MATRIX_H_\n\n#include <memory>\n#include <vector>\n#include \"ceres/sparse_matrix.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/types.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// An implementation of the SparseMatrix interface to store and\n// manipulate sparse matrices in triplet (i,j,s) form.  This object is\n// inspired by the design of the cholmod_triplet struct used in the\n// SuiteSparse package and is memory layout compatible with it.\nclass TripletSparseMatrix : public SparseMatrix {\n public:\n  TripletSparseMatrix();\n  TripletSparseMatrix(int num_rows, int num_cols, int max_num_nonzeros);\n  TripletSparseMatrix(int num_rows,\n                      int num_cols,\n                      const std::vector<int>& rows,\n                      const std::vector<int>& cols,\n                      const std::vector<double>& values);\n\n  explicit TripletSparseMatrix(const TripletSparseMatrix& orig);\n\n  TripletSparseMatrix& operator=(const TripletSparseMatrix& rhs);\n\n  virtual ~TripletSparseMatrix();\n\n  // Implementation of the SparseMatrix interface.\n  void SetZero() final;\n  void RightMultiply(const double* x, double* y) const final;\n  void LeftMultiply(const double* x, double* y) const final;\n  void SquaredColumnNorm(double* x) const final;\n  void ScaleColumns(const double* scale) final;\n  void ToDenseMatrix(Matrix* dense_matrix) const final;\n  void ToTextFile(FILE* file) const final;\n  int num_rows()        const final   { return num_rows_;     }\n  int num_cols()        const final   { return num_cols_;     }\n  int num_nonzeros()    const final   { return num_nonzeros_; }\n  const double* values()  const final { return values_.get(); }\n  double* mutable_values() final      { return values_.get(); }\n  void set_num_nonzeros(int num_nonzeros);\n\n  // Increase max_num_nonzeros and correspondingly increase the size\n  // of rows_, cols_ and values_. If new_max_num_nonzeros is smaller\n  // than max_num_nonzeros_, then num_non_zeros should be less than or\n  // equal to new_max_num_nonzeros, otherwise data loss is possible\n  // and the method crashes.\n  void Reserve(int new_max_num_nonzeros);\n\n  // Append the matrix B at the bottom of this matrix. B should have\n  // the same number of columns as num_cols_.\n  void AppendRows(const TripletSparseMatrix& B);\n\n  // Append the matrix B at the right of this matrix. B should have\n  // the same number of rows as num_rows_;\n  void AppendCols(const TripletSparseMatrix& B);\n\n  // Resize the matrix. Entries which fall outside the new matrix\n  // bounds are dropped and the num_non_zeros changed accordingly.\n  void Resize(int new_num_rows, int new_num_cols);\n\n  int max_num_nonzeros() const { return max_num_nonzeros_; }\n  const int* rows()      const { return rows_.get();       }\n  const int* cols()      const { return cols_.get();       }\n  int* mutable_rows()          { return rows_.get();       }\n  int* mutable_cols()          { return cols_.get();       }\n\n  // Returns true if the entries of the matrix obey the row, column,\n  // and column size bounds and false otherwise.\n  bool AllTripletsWithinBounds() const;\n\n  bool IsValid() const { return AllTripletsWithinBounds(); }\n\n  // Build a sparse diagonal matrix of size num_rows x num_rows from\n  // the array values. Entries of the values array are copied into the\n  // sparse matrix.\n  static TripletSparseMatrix* CreateSparseDiagonalMatrix(const double* values,\n                                                         int num_rows);\n\n  // Options struct to control the generation of random\n  // TripletSparseMatrix objects.\n  struct RandomMatrixOptions {\n    int num_rows;\n    int num_cols;\n    // 0 < density <= 1 is the probability of an entry being\n    // structurally non-zero. A given random matrix will not have\n    // precisely this density.\n    double density;\n  };\n\n  // Create a random CompressedRowSparseMatrix whose entries are\n  // normally distributed and whose structure is determined by\n  // RandomMatrixOptions.\n  //\n  // Caller owns the result.\n  static TripletSparseMatrix* CreateRandomMatrix(\n      const TripletSparseMatrix::RandomMatrixOptions& options);\n\n private:\n  void AllocateMemory();\n  void CopyData(const TripletSparseMatrix& orig);\n\n  int num_rows_;\n  int num_cols_;\n  int max_num_nonzeros_;\n  int num_nonzeros_;\n\n  // The data is stored as three arrays. For each i, values_[i] is\n  // stored at the location (rows_[i], cols_[i]). If the there are\n  // multiple entries with the same (rows_[i], cols_[i]), the values_\n  // entries corresponding to them are summed up.\n  std::unique_ptr<int[]> rows_;\n  std::unique_ptr<int[]> cols_;\n  std::unique_ptr<double[]> values_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_TRIPLET_SPARSE_MATRIX_H__\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/triplet_sparse_matrix_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/triplet_sparse_matrix.h\"\n\n#include <memory>\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nTEST(TripletSparseMatrix, DefaultConstructorReturnsEmptyObject) {\n  TripletSparseMatrix m;\n  EXPECT_EQ(m.num_rows(), 0);\n  EXPECT_EQ(m.num_cols(), 0);\n  EXPECT_EQ(m.num_nonzeros(), 0);\n  EXPECT_EQ(m.max_num_nonzeros(), 0);\n}\n\nTEST(TripletSparseMatrix, SimpleConstructorAndBasicOperations) {\n  // Build a matrix\n  TripletSparseMatrix m(2, 5, 4);\n  EXPECT_EQ(m.num_rows(), 2);\n  EXPECT_EQ(m.num_cols(), 5);\n  EXPECT_EQ(m.num_nonzeros(), 0);\n  EXPECT_EQ(m.max_num_nonzeros(), 4);\n\n  m.mutable_rows()[0] = 0;\n  m.mutable_cols()[0] = 1;\n  m.mutable_values()[0] = 2.5;\n\n  m.mutable_rows()[1] = 1;\n  m.mutable_cols()[1] = 4;\n  m.mutable_values()[1] = 5.2;\n  m.set_num_nonzeros(2);\n\n  EXPECT_EQ(m.num_nonzeros(), 2);\n\n  ASSERT_TRUE(m.AllTripletsWithinBounds());\n\n  // We should never be able resize and lose data\n  EXPECT_DEATH_IF_SUPPORTED(m.Reserve(1), \"Reallocation will cause data loss\");\n\n  // We should be able to resize while preserving data\n  m.Reserve(50);\n  EXPECT_EQ(m.max_num_nonzeros(), 50);\n\n  m.Reserve(3);\n  EXPECT_EQ(m.max_num_nonzeros(), 50);  // The space is already reserved.\n\n  EXPECT_EQ(m.rows()[0], 0);\n  EXPECT_EQ(m.rows()[1], 1);\n\n  EXPECT_EQ(m.cols()[0], 1);\n  EXPECT_EQ(m.cols()[1], 4);\n\n  EXPECT_DOUBLE_EQ(m.values()[0], 2.5);\n  EXPECT_DOUBLE_EQ(m.values()[1], 5.2);\n\n  // Bounds check should fail\n  m.mutable_rows()[0] = 10;\n  EXPECT_FALSE(m.AllTripletsWithinBounds());\n\n  m.mutable_rows()[0] = 1;\n  m.mutable_cols()[0] = 100;\n  EXPECT_FALSE(m.AllTripletsWithinBounds());\n\n  // Remove all data and then resize the data store\n  m.SetZero();\n  EXPECT_EQ(m.num_nonzeros(), 0);\n  m.Reserve(1);\n}\n\nTEST(TripletSparseMatrix, CopyConstructor) {\n  TripletSparseMatrix orig(2, 5, 4);\n  orig.mutable_rows()[0] = 0;\n  orig.mutable_cols()[0] = 1;\n  orig.mutable_values()[0] = 2.5;\n\n  orig.mutable_rows()[1] = 1;\n  orig.mutable_cols()[1] = 4;\n  orig.mutable_values()[1] = 5.2;\n  orig.set_num_nonzeros(2);\n\n  TripletSparseMatrix cpy(orig);\n\n  EXPECT_EQ(cpy.num_rows(), 2);\n  EXPECT_EQ(cpy.num_cols(), 5);\n  ASSERT_EQ(cpy.num_nonzeros(), 2);\n  EXPECT_EQ(cpy.max_num_nonzeros(), 4);\n\n  EXPECT_EQ(cpy.rows()[0], 0);\n  EXPECT_EQ(cpy.rows()[1], 1);\n\n  EXPECT_EQ(cpy.cols()[0], 1);\n  EXPECT_EQ(cpy.cols()[1], 4);\n\n  EXPECT_DOUBLE_EQ(cpy.values()[0], 2.5);\n  EXPECT_DOUBLE_EQ(cpy.values()[1], 5.2);\n}\n\nTEST(TripletSparseMatrix, AssignmentOperator) {\n  TripletSparseMatrix orig(2, 5, 4);\n  orig.mutable_rows()[0] = 0;\n  orig.mutable_cols()[0] = 1;\n  orig.mutable_values()[0] = 2.5;\n\n  orig.mutable_rows()[1] = 1;\n  orig.mutable_cols()[1] = 4;\n  orig.mutable_values()[1] = 5.2;\n  orig.set_num_nonzeros(2);\n\n  TripletSparseMatrix cpy(3, 50, 40);\n  cpy.mutable_rows()[0] = 0;\n  cpy.mutable_cols()[0] = 10;\n  cpy.mutable_values()[0] = 10.22;\n\n  cpy.mutable_rows()[1] = 2;\n  cpy.mutable_cols()[1] = 23;\n  cpy.mutable_values()[1] = 34.45;\n\n  cpy.mutable_rows()[0] = 0;\n  cpy.mutable_cols()[0] = 10;\n  cpy.mutable_values()[0] = 10.22;\n\n  cpy.mutable_rows()[1] = 0;\n  cpy.mutable_cols()[1] = 3;\n  cpy.mutable_values()[1] = 4.4;\n  cpy.set_num_nonzeros(3);\n\n  cpy = orig;\n\n  EXPECT_EQ(cpy.num_rows(), 2);\n  EXPECT_EQ(cpy.num_cols(), 5);\n  ASSERT_EQ(cpy.num_nonzeros(), 2);\n  EXPECT_EQ(cpy.max_num_nonzeros(), 4);\n\n  EXPECT_EQ(cpy.rows()[0], 0);\n  EXPECT_EQ(cpy.rows()[1], 1);\n\n  EXPECT_EQ(cpy.cols()[0], 1);\n  EXPECT_EQ(cpy.cols()[1], 4);\n\n  EXPECT_DOUBLE_EQ(cpy.values()[0], 2.5);\n  EXPECT_DOUBLE_EQ(cpy.values()[1], 5.2);\n}\n\nTEST(TripletSparseMatrix, AssignmentOperatorSelfAssignment) {\n  TripletSparseMatrix orig(2, 5, 4);\n  orig.mutable_rows()[0] = 0;\n  orig.mutable_cols()[0] = 1;\n  orig.mutable_values()[0] = 2.5;\n\n  orig.mutable_rows()[1] = 1;\n  orig.mutable_cols()[1] = 4;\n  orig.mutable_values()[1] = 5.2;\n  orig.set_num_nonzeros(2);\n\n  // Who's on earth gonna do this?\n  orig = orig;\n\n  EXPECT_EQ(orig.num_rows(), 2);\n  EXPECT_EQ(orig.num_cols(), 5);\n  ASSERT_EQ(orig.num_nonzeros(), 2);\n  EXPECT_EQ(orig.max_num_nonzeros(), 4);\n\n  EXPECT_EQ(orig.rows()[0], 0);\n  EXPECT_EQ(orig.rows()[1], 1);\n\n  EXPECT_EQ(orig.cols()[0], 1);\n  EXPECT_EQ(orig.cols()[1], 4);\n\n  EXPECT_DOUBLE_EQ(orig.values()[0], 2.5);\n  EXPECT_DOUBLE_EQ(orig.values()[1], 5.2);\n}\n\nTEST(TripletSparseMatrix, AppendRows) {\n  // Build one matrix.\n  TripletSparseMatrix m(2, 5, 4);\n  m.mutable_rows()[0] = 0;\n  m.mutable_cols()[0] = 1;\n  m.mutable_values()[0] = 2.5;\n\n  m.mutable_rows()[1] = 1;\n  m.mutable_cols()[1] = 4;\n  m.mutable_values()[1] = 5.2;\n  m.set_num_nonzeros(2);\n\n  // Build another matrix.\n  TripletSparseMatrix a(10, 5, 4);\n  a.mutable_rows()[0] = 0;\n  a.mutable_cols()[0] = 1;\n  a.mutable_values()[0] = 3.5;\n\n  a.mutable_rows()[1] = 1;\n  a.mutable_cols()[1] = 4;\n  a.mutable_values()[1] = 6.2;\n\n  a.mutable_rows()[2] = 9;\n  a.mutable_cols()[2] = 5;\n  a.mutable_values()[2] = 1;\n  a.set_num_nonzeros(3);\n\n  // Glue the second matrix to the bottom of the first.\n  m.AppendRows(a);\n\n  EXPECT_EQ(m.num_rows(), 12);\n  EXPECT_EQ(m.num_cols(), 5);\n  ASSERT_EQ(m.num_nonzeros(), 5);\n\n  EXPECT_EQ(m.values()[0], 2.5);\n  EXPECT_EQ(m.values()[1], 5.2);\n  EXPECT_EQ(m.values()[2], 3.5);\n  EXPECT_EQ(m.values()[3], 6.2);\n  EXPECT_EQ(m.values()[4], 1);\n\n  EXPECT_EQ(m.rows()[0], 0);\n  EXPECT_EQ(m.rows()[1], 1);\n  EXPECT_EQ(m.rows()[2], 2);\n  EXPECT_EQ(m.rows()[3], 3);\n  EXPECT_EQ(m.rows()[4], 11);\n\n  EXPECT_EQ(m.cols()[0], 1);\n  EXPECT_EQ(m.cols()[1], 4);\n  EXPECT_EQ(m.cols()[2], 1);\n  EXPECT_EQ(m.cols()[3], 4);\n  EXPECT_EQ(m.cols()[4], 5);\n}\n\nTEST(TripletSparseMatrix, AppendCols) {\n  // Build one matrix.\n  TripletSparseMatrix m(2, 5, 4);\n  m.mutable_rows()[0] = 0;\n  m.mutable_cols()[0] = 1;\n  m.mutable_values()[0] = 2.5;\n\n  m.mutable_rows()[1] = 1;\n  m.mutable_cols()[1] = 4;\n  m.mutable_values()[1] = 5.2;\n  m.set_num_nonzeros(2);\n\n  // Build another matrix.\n  TripletSparseMatrix a(2, 15, 4);\n  a.mutable_rows()[0] = 0;\n  a.mutable_cols()[0] = 1;\n  a.mutable_values()[0] = 3.5;\n\n  a.mutable_rows()[1] = 1;\n  a.mutable_cols()[1] = 4;\n  a.mutable_values()[1] = 6.2;\n\n  a.mutable_rows()[2] = 0;\n  a.mutable_cols()[2] = 10;\n  a.mutable_values()[2] = 1;\n  a.set_num_nonzeros(3);\n\n  // Glue the second matrix to the left of the first.\n  m.AppendCols(a);\n\n  EXPECT_EQ(m.num_rows(), 2);\n  EXPECT_EQ(m.num_cols(), 20);\n  ASSERT_EQ(m.num_nonzeros(), 5);\n\n  EXPECT_EQ(m.values()[0], 2.5);\n  EXPECT_EQ(m.values()[1], 5.2);\n  EXPECT_EQ(m.values()[2], 3.5);\n  EXPECT_EQ(m.values()[3], 6.2);\n  EXPECT_EQ(m.values()[4], 1);\n\n  EXPECT_EQ(m.rows()[0], 0);\n  EXPECT_EQ(m.rows()[1], 1);\n  EXPECT_EQ(m.rows()[2], 0);\n  EXPECT_EQ(m.rows()[3], 1);\n  EXPECT_EQ(m.rows()[4], 0);\n\n  EXPECT_EQ(m.cols()[0], 1);\n  EXPECT_EQ(m.cols()[1], 4);\n  EXPECT_EQ(m.cols()[2], 6);\n  EXPECT_EQ(m.cols()[3], 9);\n  EXPECT_EQ(m.cols()[4], 15);\n}\n\nTEST(TripletSparseMatrix, CreateDiagonalMatrix) {\n  std::unique_ptr<double[]> values(new double[10]);\n  for (int i = 0; i < 10; ++i)\n    values[i] = i;\n\n  std::unique_ptr<TripletSparseMatrix> m(\n      TripletSparseMatrix::CreateSparseDiagonalMatrix(values.get(), 10));\n  EXPECT_EQ(m->num_rows(), 10);\n  EXPECT_EQ(m->num_cols(), 10);\n  ASSERT_EQ(m->num_nonzeros(), 10);\n  for (int i = 0; i < 10 ; ++i) {\n    EXPECT_EQ(m->rows()[i], i);\n    EXPECT_EQ(m->cols()[i], i);\n    EXPECT_EQ(m->values()[i], i);\n  }\n}\n\nTEST(TripletSparseMatrix, Resize) {\n  TripletSparseMatrix m(10, 20, 200);\n  int nnz = 0;\n  for (int i = 0; i < 10; ++i) {\n    for (int j = 0; j < 20; ++j) {\n      m.mutable_rows()[nnz] = i;\n      m.mutable_cols()[nnz] = j;\n      m.mutable_values()[nnz++] = i+j;\n    }\n  }\n  m.set_num_nonzeros(nnz);\n  m.Resize(5, 6);\n  EXPECT_EQ(m.num_rows(), 5);\n  EXPECT_EQ(m.num_cols(), 6);\n  ASSERT_EQ(m.num_nonzeros(), 30);\n  for (int i = 0; i < 30; ++i) {\n    EXPECT_EQ(m.values()[i], m.rows()[i] + m.cols()[i]);\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/trust_region_minimizer.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2016 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/trust_region_minimizer.h\"\n\n#include <algorithm>\n#include <cmath>\n#include <cstdlib>\n#include <cstring>\n#include <memory>\n#include <limits>\n#include <string>\n#include <vector>\n\n#include \"Eigen/Core\"\n#include \"ceres/array_utils.h\"\n#include \"ceres/coordinate_descent_minimizer.h\"\n#include \"ceres/evaluator.h\"\n#include \"ceres/file.h\"\n#include \"ceres/line_search.h\"\n#include \"ceres/stringprintf.h\"\n#include \"ceres/types.h\"\n#include \"ceres/wall_time.h\"\n#include \"glog/logging.h\"\n\n// Helper macro to simplify some of the control flow.\n#define RETURN_IF_ERROR_AND_LOG(expr)                            \\\n  do {                                                           \\\n    if (!(expr)) {                                               \\\n      LOG(ERROR) << \"Terminating: \" << solver_summary_->message; \\\n      return;                                                    \\\n    }                                                            \\\n  } while (0)\n\nnamespace ceres {\nnamespace internal {\n\nTrustRegionMinimizer::~TrustRegionMinimizer() {}\n\nvoid TrustRegionMinimizer::Minimize(const Minimizer::Options& options,\n                                    double* parameters,\n                                    Solver::Summary* solver_summary) {\n  start_time_in_secs_ = WallTimeInSeconds();\n  iteration_start_time_in_secs_ = start_time_in_secs_;\n  Init(options, parameters, solver_summary);\n  RETURN_IF_ERROR_AND_LOG(IterationZero());\n\n  // Create the TrustRegionStepEvaluator. The construction needs to be\n  // delayed to this point because we need the cost for the starting\n  // point to initialize the step evaluator.\n  step_evaluator_.reset(new TrustRegionStepEvaluator(\n      x_cost_,\n      options_.use_nonmonotonic_steps\n          ? options_.max_consecutive_nonmonotonic_steps\n          : 0));\n\n  while (FinalizeIterationAndCheckIfMinimizerCanContinue()) {\n    iteration_start_time_in_secs_ = WallTimeInSeconds();\n    iteration_summary_ = IterationSummary();\n    iteration_summary_.iteration =\n        solver_summary->iterations.back().iteration + 1;\n\n    RETURN_IF_ERROR_AND_LOG(ComputeTrustRegionStep());\n    if (!iteration_summary_.step_is_valid) {\n      RETURN_IF_ERROR_AND_LOG(HandleInvalidStep());\n      continue;\n    }\n\n    if (options_.is_constrained &&\n        options_.max_num_line_search_step_size_iterations > 0) {\n      // Use a projected line search to enforce the bounds constraints\n      // and improve the quality of the step.\n      DoLineSearch(x_, gradient_, x_cost_, &delta_);\n    }\n\n    ComputeCandidatePointAndEvaluateCost();\n    DoInnerIterationsIfNeeded();\n\n    if (ParameterToleranceReached()) {\n      return;\n    }\n\n    if (FunctionToleranceReached()) {\n      return;\n    }\n\n    if (IsStepSuccessful()) {\n      RETURN_IF_ERROR_AND_LOG(HandleSuccessfulStep());\n      continue;\n    }\n\n    HandleUnsuccessfulStep();\n  }\n}\n\n// Initialize the minimizer, allocate working space and set some of\n// the fields in the solver_summary.\nvoid TrustRegionMinimizer::Init(const Minimizer::Options& options,\n                                double* parameters,\n                                Solver::Summary* solver_summary) {\n  options_ = options;\n  sort(options_.trust_region_minimizer_iterations_to_dump.begin(),\n       options_.trust_region_minimizer_iterations_to_dump.end());\n\n  parameters_ = parameters;\n\n  solver_summary_ = solver_summary;\n  solver_summary_->termination_type = NO_CONVERGENCE;\n  solver_summary_->num_successful_steps = 0;\n  solver_summary_->num_unsuccessful_steps = 0;\n  solver_summary_->is_constrained = options.is_constrained;\n\n  CHECK(options_.evaluator != nullptr);\n  CHECK(options_.jacobian != nullptr);\n  CHECK(options_.trust_region_strategy != nullptr);\n  evaluator_ = options_.evaluator.get();\n  jacobian_ = options_.jacobian.get();\n  strategy_ = options_.trust_region_strategy.get();\n\n  is_not_silent_ = !options.is_silent;\n  inner_iterations_are_enabled_ =\n      options.inner_iteration_minimizer.get() != NULL;\n  inner_iterations_were_useful_ = false;\n\n  num_parameters_ = evaluator_->NumParameters();\n  num_effective_parameters_ = evaluator_->NumEffectiveParameters();\n  num_residuals_ = evaluator_->NumResiduals();\n  num_consecutive_invalid_steps_ = 0;\n\n  x_ = ConstVectorRef(parameters_, num_parameters_);\n  x_norm_ = x_.norm();\n  residuals_.resize(num_residuals_);\n  trust_region_step_.resize(num_effective_parameters_);\n  delta_.resize(num_effective_parameters_);\n  candidate_x_.resize(num_parameters_);\n  gradient_.resize(num_effective_parameters_);\n  model_residuals_.resize(num_residuals_);\n  negative_gradient_.resize(num_effective_parameters_);\n  projected_gradient_step_.resize(num_parameters_);\n\n  // By default scaling is one, if the user requests Jacobi scaling of\n  // the Jacobian, we will compute and overwrite this vector.\n  jacobian_scaling_ = Vector::Ones(num_effective_parameters_);\n\n  x_norm_ = -1;  // Invalid value\n  x_cost_ = std::numeric_limits<double>::max();\n  minimum_cost_ = x_cost_;\n  model_cost_change_ = 0.0;\n}\n\n// 1. Project the initial solution onto the feasible set if needed.\n// 2. Compute the initial cost, jacobian & gradient.\n//\n// Return true if all computations can be performed successfully.\nbool TrustRegionMinimizer::IterationZero() {\n  iteration_summary_ = IterationSummary();\n  iteration_summary_.iteration = 0;\n  iteration_summary_.step_is_valid = false;\n  iteration_summary_.step_is_successful = false;\n  iteration_summary_.cost_change = 0.0;\n  iteration_summary_.gradient_max_norm = 0.0;\n  iteration_summary_.gradient_norm = 0.0;\n  iteration_summary_.step_norm = 0.0;\n  iteration_summary_.relative_decrease = 0.0;\n  iteration_summary_.eta = options_.eta;\n  iteration_summary_.linear_solver_iterations = 0;\n  iteration_summary_.step_solver_time_in_seconds = 0;\n\n  if (options_.is_constrained) {\n    delta_.setZero();\n    if (!evaluator_->Plus(x_.data(), delta_.data(), candidate_x_.data())) {\n      solver_summary_->message =\n          \"Unable to project initial point onto the feasible set.\";\n      solver_summary_->termination_type = FAILURE;\n      return false;\n    }\n\n    x_ = candidate_x_;\n    x_norm_ = x_.norm();\n  }\n\n  if (!EvaluateGradientAndJacobian(/*new_evaluation_point=*/true)) {\n    return false;\n  }\n\n  solver_summary_->initial_cost = x_cost_ + solver_summary_->fixed_cost;\n  iteration_summary_.step_is_valid = true;\n  iteration_summary_.step_is_successful = true;\n  return true;\n}\n\n// For the current x_, compute\n//\n//  1. Cost\n//  2. Jacobian\n//  3. Gradient\n//  4. Scale the Jacobian if needed (and compute the scaling if we are\n//     in iteration zero).\n//  5. Compute the 2 and max norm of the gradient.\n//\n// Returns true if all computations could be performed\n// successfully. Any failures are considered fatal and the\n// Solver::Summary is updated to indicate this.\nbool TrustRegionMinimizer::EvaluateGradientAndJacobian(\n    bool new_evaluation_point) {\n  Evaluator::EvaluateOptions evaluate_options;\n  evaluate_options.new_evaluation_point = new_evaluation_point;\n  if (!evaluator_->Evaluate(evaluate_options,\n                            x_.data(),\n                            &x_cost_,\n                            residuals_.data(),\n                            gradient_.data(),\n                            jacobian_)) {\n    solver_summary_->message = \"Residual and Jacobian evaluation failed.\";\n    solver_summary_->termination_type = FAILURE;\n    return false;\n  }\n\n  iteration_summary_.cost = x_cost_ + solver_summary_->fixed_cost;\n\n  if (options_.jacobi_scaling) {\n    if (iteration_summary_.iteration == 0) {\n      // Compute a scaling vector that is used to improve the\n      // conditioning of the Jacobian.\n      //\n      // jacobian_scaling_ = diag(J'J)^{-1}\n      jacobian_->SquaredColumnNorm(jacobian_scaling_.data());\n      for (int i = 0; i < jacobian_->num_cols(); ++i) {\n        // Add one to the denominator to prevent division by zero.\n        jacobian_scaling_[i] = 1.0 / (1.0 + sqrt(jacobian_scaling_[i]));\n      }\n    }\n\n    // jacobian = jacobian * diag(J'J) ^{-1}\n    jacobian_->ScaleColumns(jacobian_scaling_.data());\n  }\n\n  // The gradient exists in the local tangent space. To account for\n  // the bounds constraints correctly, instead of just computing the\n  // norm of the gradient vector, we compute\n  //\n  // |Plus(x, -gradient) - x|\n  //\n  // Where the Plus operator lifts the negative gradient to the\n  // ambient space, adds it to x and projects it on the hypercube\n  // defined by the bounds.\n  negative_gradient_ = -gradient_;\n  if (!evaluator_->Plus(x_.data(),\n                        negative_gradient_.data(),\n                        projected_gradient_step_.data())) {\n    solver_summary_->message =\n        \"projected_gradient_step = Plus(x, -gradient) failed.\";\n    solver_summary_->termination_type = FAILURE;\n    return false;\n  }\n\n  iteration_summary_.gradient_max_norm =\n      (x_ - projected_gradient_step_).lpNorm<Eigen::Infinity>();\n  iteration_summary_.gradient_norm = (x_ - projected_gradient_step_).norm();\n  return true;\n}\n\n// 1. Add the final timing information to the iteration summary.\n// 2. Run the callbacks\n// 3. Check for termination based on\n//    a. Run time\n//    b. Iteration count\n//    c. Max norm of the gradient\n//    d. Size of the trust region radius.\n//\n// Returns true if user did not terminate the solver and none of these\n// termination criterion are met.\nbool TrustRegionMinimizer::FinalizeIterationAndCheckIfMinimizerCanContinue() {\n  if (iteration_summary_.step_is_successful) {\n    ++solver_summary_->num_successful_steps;\n    if (x_cost_ < minimum_cost_) {\n      minimum_cost_ = x_cost_;\n      VectorRef(parameters_, num_parameters_) = x_;\n      iteration_summary_.step_is_nonmonotonic = false;\n    } else {\n      iteration_summary_.step_is_nonmonotonic = true;\n    }\n  } else {\n    ++solver_summary_->num_unsuccessful_steps;\n  }\n\n  iteration_summary_.trust_region_radius = strategy_->Radius();\n  iteration_summary_.iteration_time_in_seconds =\n      WallTimeInSeconds() - iteration_start_time_in_secs_;\n  iteration_summary_.cumulative_time_in_seconds =\n      WallTimeInSeconds() - start_time_in_secs_ +\n      solver_summary_->preprocessor_time_in_seconds;\n\n  solver_summary_->iterations.push_back(iteration_summary_);\n\n  if (!RunCallbacks(options_, iteration_summary_, solver_summary_)) {\n    return false;\n  }\n\n  if (MaxSolverTimeReached()) {\n    return false;\n  }\n\n  if (MaxSolverIterationsReached()) {\n    return false;\n  }\n\n  if (GradientToleranceReached()) {\n    return false;\n  }\n\n  if (MinTrustRegionRadiusReached()) {\n    return false;\n  }\n\n  return true;\n}\n\n// Compute the trust region step using the TrustRegionStrategy chosen\n// by the user.\n//\n// If the strategy returns with LINEAR_SOLVER_FATAL_ERROR, which\n// indicates an unrecoverable error, return false. This is the only\n// condition that returns false.\n//\n// If the strategy returns with LINEAR_SOLVER_FAILURE, which indicates\n// a numerical failure that could be recovered from by retrying\n// (e.g. by increasing the strength of the regularization), we set\n// iteration_summary_.step_is_valid to false and return true.\n//\n// In all other cases, we compute the decrease in the trust region\n// model problem. In exact arithmetic, this should always be\n// positive, but due to numerical problems in the TrustRegionStrategy\n// or round off error when computing the decrease it may be\n// negative. In which case again, we set\n// iteration_summary_.step_is_valid to false.\nbool TrustRegionMinimizer::ComputeTrustRegionStep() {\n  const double strategy_start_time = WallTimeInSeconds();\n  iteration_summary_.step_is_valid = false;\n  TrustRegionStrategy::PerSolveOptions per_solve_options;\n  per_solve_options.eta = options_.eta;\n  if (find(options_.trust_region_minimizer_iterations_to_dump.begin(),\n           options_.trust_region_minimizer_iterations_to_dump.end(),\n           iteration_summary_.iteration) !=\n      options_.trust_region_minimizer_iterations_to_dump.end()) {\n    per_solve_options.dump_format_type =\n        options_.trust_region_problem_dump_format_type;\n    per_solve_options.dump_filename_base =\n        JoinPath(options_.trust_region_problem_dump_directory,\n                 StringPrintf(\"ceres_solver_iteration_%03d\",\n                              iteration_summary_.iteration));\n  }\n\n  TrustRegionStrategy::Summary strategy_summary =\n      strategy_->ComputeStep(per_solve_options,\n                             jacobian_,\n                             residuals_.data(),\n                             trust_region_step_.data());\n\n  if (strategy_summary.termination_type == LINEAR_SOLVER_FATAL_ERROR) {\n    solver_summary_->message =\n        \"Linear solver failed due to unrecoverable \"\n        \"non-numeric causes. Please see the error log for clues. \";\n    solver_summary_->termination_type = FAILURE;\n    return false;\n  }\n\n  iteration_summary_.step_solver_time_in_seconds =\n      WallTimeInSeconds() - strategy_start_time;\n  iteration_summary_.linear_solver_iterations = strategy_summary.num_iterations;\n\n  if (strategy_summary.termination_type == LINEAR_SOLVER_FAILURE) {\n    return true;\n  }\n\n  // new_model_cost\n  //  = 1/2 [f + J * step]^2\n  //  = 1/2 [ f'f + 2f'J * step + step' * J' * J * step ]\n  // model_cost_change\n  //  = cost - new_model_cost\n  //  = f'f/2  - 1/2 [ f'f + 2f'J * step + step' * J' * J * step]\n  //  = -f'J * step - step' * J' * J * step / 2\n  //  = -(J * step)'(f + J * step / 2)\n  model_residuals_.setZero();\n  jacobian_->RightMultiply(trust_region_step_.data(), model_residuals_.data());\n  model_cost_change_ =\n      -model_residuals_.dot(residuals_ + model_residuals_ / 2.0);\n\n  // TODO(sameeragarwal)\n  //\n  //  1. What happens if model_cost_change_ = 0\n  //  2. What happens if -epsilon <= model_cost_change_ < 0 for some\n  //     small epsilon due to round off error.\n  iteration_summary_.step_is_valid = (model_cost_change_ > 0.0);\n  if (iteration_summary_.step_is_valid) {\n    // Undo the Jacobian column scaling.\n    delta_ = (trust_region_step_.array() * jacobian_scaling_.array()).matrix();\n    num_consecutive_invalid_steps_ = 0;\n  }\n\n  VLOG_IF(1, is_not_silent_ && !iteration_summary_.step_is_valid)\n      << \"Invalid step: current_cost: \" << x_cost_\n      << \" absolute model cost change: \" << model_cost_change_\n      << \" relative model cost change: \" << (model_cost_change_ / x_cost_);\n  return true;\n}\n\n// Invalid steps can happen due to a number of reasons, and we allow a\n// limited number of consecutive failures, and return false if this\n// limit is exceeded.\nbool TrustRegionMinimizer::HandleInvalidStep() {\n  // TODO(sameeragarwal): Should we be returning FAILURE or\n  // NO_CONVERGENCE? The solution value is still usable in many cases,\n  // it is not clear if we should declare the solver a failure\n  // entirely. For example the case where model_cost_change ~ 0.0, but\n  // just slightly negative.\n  if (++num_consecutive_invalid_steps_ >=\n      options_.max_num_consecutive_invalid_steps) {\n    solver_summary_->message = StringPrintf(\n        \"Number of consecutive invalid steps more \"\n        \"than Solver::Options::max_num_consecutive_invalid_steps: %d\",\n        options_.max_num_consecutive_invalid_steps);\n    solver_summary_->termination_type = FAILURE;\n    return false;\n  }\n\n  strategy_->StepIsInvalid();\n\n  // We are going to try and reduce the trust region radius and\n  // solve again. To do this, we are going to treat this iteration\n  // as an unsuccessful iteration. Since the various callbacks are\n  // still executed, we are going to fill the iteration summary\n  // with data that assumes a step of length zero and no progress.\n  iteration_summary_.cost = x_cost_ + solver_summary_->fixed_cost;\n  iteration_summary_.cost_change = 0.0;\n  iteration_summary_.gradient_max_norm =\n      solver_summary_->iterations.back().gradient_max_norm;\n  iteration_summary_.gradient_norm =\n      solver_summary_->iterations.back().gradient_norm;\n  iteration_summary_.step_norm = 0.0;\n  iteration_summary_.relative_decrease = 0.0;\n  iteration_summary_.eta = options_.eta;\n  return true;\n}\n\n// Use the supplied coordinate descent minimizer to perform inner\n// iterations and compute the improvement due to it. Returns the cost\n// after performing the inner iterations.\n//\n// The optimization is performed with candidate_x_ as the starting\n// point, and if the optimization is successful, candidate_x_ will be\n// updated with the optimized parameters.\nvoid TrustRegionMinimizer::DoInnerIterationsIfNeeded() {\n  inner_iterations_were_useful_ = false;\n  if (!inner_iterations_are_enabled_ ||\n      candidate_cost_ >= std::numeric_limits<double>::max()) {\n    return;\n  }\n\n  double inner_iteration_start_time = WallTimeInSeconds();\n  ++solver_summary_->num_inner_iteration_steps;\n  inner_iteration_x_ = candidate_x_;\n  Solver::Summary inner_iteration_summary;\n  options_.inner_iteration_minimizer->Minimize(\n      options_, inner_iteration_x_.data(), &inner_iteration_summary);\n  double inner_iteration_cost;\n  if (!evaluator_->Evaluate(\n          inner_iteration_x_.data(), &inner_iteration_cost, NULL, NULL, NULL)) {\n    VLOG_IF(2, is_not_silent_) << \"Inner iteration failed.\";\n    return;\n  }\n\n  VLOG_IF(2, is_not_silent_)\n      << \"Inner iteration succeeded; Current cost: \" << x_cost_\n      << \" Trust region step cost: \" << candidate_cost_\n      << \" Inner iteration cost: \" << inner_iteration_cost;\n\n  candidate_x_ = inner_iteration_x_;\n\n  // Normally, the quality of a trust region step is measured by\n  // the ratio\n  //\n  //              cost_change\n  //    r =    -----------------\n  //           model_cost_change\n  //\n  // All the change in the nonlinear objective is due to the trust\n  // region step so this ratio is a good measure of the quality of\n  // the trust region radius. However, when inner iterations are\n  // being used, cost_change includes the contribution of the\n  // inner iterations and its not fair to credit it all to the\n  // trust region algorithm. So we change the ratio to be\n  //\n  //                              cost_change\n  //    r =    ------------------------------------------------\n  //           (model_cost_change + inner_iteration_cost_change)\n  //\n  // Practically we do this by increasing model_cost_change by\n  // inner_iteration_cost_change.\n\n  const double inner_iteration_cost_change =\n      candidate_cost_ - inner_iteration_cost;\n  model_cost_change_ += inner_iteration_cost_change;\n  inner_iterations_were_useful_ = inner_iteration_cost < x_cost_;\n  const double inner_iteration_relative_progress =\n      1.0 - inner_iteration_cost / candidate_cost_;\n\n  // Disable inner iterations once the relative improvement\n  // drops below tolerance.\n  inner_iterations_are_enabled_ =\n      (inner_iteration_relative_progress > options_.inner_iteration_tolerance);\n  VLOG_IF(2, is_not_silent_ && !inner_iterations_are_enabled_)\n      << \"Disabling inner iterations. Progress : \"\n      << inner_iteration_relative_progress;\n  candidate_cost_ = inner_iteration_cost;\n\n  solver_summary_->inner_iteration_time_in_seconds +=\n      WallTimeInSeconds() - inner_iteration_start_time;\n}\n\n// Perform a projected line search to improve the objective function\n// value along delta.\n//\n// TODO(sameeragarwal): The current implementation does not do\n// anything illegal but is incorrect and not terribly effective.\n//\n// https://github.com/ceres-solver/ceres-solver/issues/187\nvoid TrustRegionMinimizer::DoLineSearch(const Vector& x,\n                                        const Vector& gradient,\n                                        const double cost,\n                                        Vector* delta) {\n  LineSearchFunction line_search_function(evaluator_);\n\n  LineSearch::Options line_search_options;\n  line_search_options.is_silent = true;\n  line_search_options.interpolation_type =\n      options_.line_search_interpolation_type;\n  line_search_options.min_step_size = options_.min_line_search_step_size;\n  line_search_options.sufficient_decrease =\n      options_.line_search_sufficient_function_decrease;\n  line_search_options.max_step_contraction =\n      options_.max_line_search_step_contraction;\n  line_search_options.min_step_contraction =\n      options_.min_line_search_step_contraction;\n  line_search_options.max_num_iterations =\n      options_.max_num_line_search_step_size_iterations;\n  line_search_options.sufficient_curvature_decrease =\n      options_.line_search_sufficient_curvature_decrease;\n  line_search_options.max_step_expansion =\n      options_.max_line_search_step_expansion;\n  line_search_options.function = &line_search_function;\n\n  std::string message;\n  std::unique_ptr<LineSearch> line_search(\n      LineSearch::Create(ceres::ARMIJO, line_search_options, &message));\n  LineSearch::Summary line_search_summary;\n  line_search_function.Init(x, *delta);\n  line_search->Search(1.0, cost, gradient.dot(*delta), &line_search_summary);\n\n  solver_summary_->num_line_search_steps += line_search_summary.num_iterations;\n  solver_summary_->line_search_cost_evaluation_time_in_seconds +=\n      line_search_summary.cost_evaluation_time_in_seconds;\n  solver_summary_->line_search_gradient_evaluation_time_in_seconds +=\n      line_search_summary.gradient_evaluation_time_in_seconds;\n  solver_summary_->line_search_polynomial_minimization_time_in_seconds +=\n      line_search_summary.polynomial_minimization_time_in_seconds;\n  solver_summary_->line_search_total_time_in_seconds +=\n      line_search_summary.total_time_in_seconds;\n\n  if (line_search_summary.success) {\n    *delta *= line_search_summary.optimal_point.x;\n  }\n}\n\n// Check if the maximum amount of time allowed by the user for the\n// solver has been exceeded, and if so return false after updating\n// Solver::Summary::message.\nbool TrustRegionMinimizer::MaxSolverTimeReached() {\n  const double total_solver_time =\n      WallTimeInSeconds() - start_time_in_secs_ +\n      solver_summary_->preprocessor_time_in_seconds;\n  if (total_solver_time < options_.max_solver_time_in_seconds) {\n    return false;\n  }\n\n  solver_summary_->message = StringPrintf(\"Maximum solver time reached. \"\n                                          \"Total solver time: %e >= %e.\",\n                                          total_solver_time,\n                                          options_.max_solver_time_in_seconds);\n  solver_summary_->termination_type = NO_CONVERGENCE;\n  VLOG_IF(1, is_not_silent_) << \"Terminating: \" << solver_summary_->message;\n  return true;\n}\n\n// Check if the maximum number of iterations allowed by the user for\n// the solver has been exceeded, and if so return false after updating\n// Solver::Summary::message.\nbool TrustRegionMinimizer::MaxSolverIterationsReached() {\n  if (iteration_summary_.iteration < options_.max_num_iterations) {\n    return false;\n  }\n\n  solver_summary_->message =\n      StringPrintf(\"Maximum number of iterations reached. \"\n                   \"Number of iterations: %d.\",\n                   iteration_summary_.iteration);\n\n  solver_summary_->termination_type = NO_CONVERGENCE;\n  VLOG_IF(1, is_not_silent_) << \"Terminating: \" << solver_summary_->message;\n  return true;\n}\n\n// Check convergence based on the max norm of the gradient (only for\n// iterations where the step was declared successful).\nbool TrustRegionMinimizer::GradientToleranceReached() {\n  if (!iteration_summary_.step_is_successful ||\n      iteration_summary_.gradient_max_norm > options_.gradient_tolerance) {\n    return false;\n  }\n\n  solver_summary_->message = StringPrintf(\n      \"Gradient tolerance reached. \"\n      \"Gradient max norm: %e <= %e\",\n      iteration_summary_.gradient_max_norm,\n      options_.gradient_tolerance);\n  solver_summary_->termination_type = CONVERGENCE;\n  VLOG_IF(1, is_not_silent_) << \"Terminating: \" << solver_summary_->message;\n  return true;\n}\n\n// Check convergence based the size of the trust region radius.\nbool TrustRegionMinimizer::MinTrustRegionRadiusReached() {\n  if (iteration_summary_.trust_region_radius >\n      options_.min_trust_region_radius) {\n    return false;\n  }\n\n  solver_summary_->message =\n      StringPrintf(\"Minimum trust region radius reached. \"\n                   \"Trust region radius: %e <= %e\",\n                   iteration_summary_.trust_region_radius,\n                   options_.min_trust_region_radius);\n  solver_summary_->termination_type = CONVERGENCE;\n  VLOG_IF(1, is_not_silent_) << \"Terminating: \" << solver_summary_->message;\n  return true;\n}\n\n// Solver::Options::parameter_tolerance based convergence check.\nbool TrustRegionMinimizer::ParameterToleranceReached() {\n  // Compute the norm of the step in the ambient space.\n  iteration_summary_.step_norm = (x_ - candidate_x_).norm();\n  const double step_size_tolerance =\n      options_.parameter_tolerance * (x_norm_ + options_.parameter_tolerance);\n\n  if (iteration_summary_.step_norm > step_size_tolerance) {\n    return false;\n  }\n\n  solver_summary_->message = StringPrintf(\n      \"Parameter tolerance reached. \"\n      \"Relative step_norm: %e <= %e.\",\n      (iteration_summary_.step_norm / (x_norm_ + options_.parameter_tolerance)),\n      options_.parameter_tolerance);\n  solver_summary_->termination_type = CONVERGENCE;\n  VLOG_IF(1, is_not_silent_) << \"Terminating: \" << solver_summary_->message;\n  return true;\n}\n\n// Solver::Options::function_tolerance based convergence check.\nbool TrustRegionMinimizer::FunctionToleranceReached() {\n  iteration_summary_.cost_change = x_cost_ - candidate_cost_;\n  const double absolute_function_tolerance =\n      options_.function_tolerance * x_cost_;\n\n  if (fabs(iteration_summary_.cost_change) > absolute_function_tolerance) {\n    return false;\n  }\n\n  solver_summary_->message = StringPrintf(\n      \"Function tolerance reached. \"\n      \"|cost_change|/cost: %e <= %e\",\n      fabs(iteration_summary_.cost_change) / x_cost_,\n      options_.function_tolerance);\n  solver_summary_->termination_type = CONVERGENCE;\n  VLOG_IF(1, is_not_silent_) << \"Terminating: \" << solver_summary_->message;\n  return true;\n}\n\n// Compute candidate_x_ = Plus(x_, delta_)\n// Evaluate the cost of candidate_x_ as candidate_cost_.\n//\n// Failure to compute the step or the cost mean that candidate_cost_\n// is set to std::numeric_limits<double>::max(). Unlike\n// EvaluateGradientAndJacobian, failure in this function is not fatal\n// as we are only computing and evaluating a candidate point, and if\n// for some reason we are unable to evaluate it, we consider it to be\n// a point with very high cost. This allows the user to deal with edge\n// cases/constraints as part of the LocalParameterization and\n// CostFunction objects.\nvoid TrustRegionMinimizer::ComputeCandidatePointAndEvaluateCost() {\n  if (!evaluator_->Plus(x_.data(), delta_.data(), candidate_x_.data())) {\n    LOG_IF(WARNING, is_not_silent_)\n        << \"x_plus_delta = Plus(x, delta) failed. \"\n        << \"Treating it as a step with infinite cost\";\n    candidate_cost_ = std::numeric_limits<double>::max();\n    return;\n  }\n\n  if (!evaluator_->Evaluate(\n          candidate_x_.data(), &candidate_cost_, NULL, NULL, NULL)) {\n    LOG_IF(WARNING, is_not_silent_)\n        << \"Step failed to evaluate. \"\n        << \"Treating it as a step with infinite cost\";\n    candidate_cost_ = std::numeric_limits<double>::max();\n  }\n}\n\nbool TrustRegionMinimizer::IsStepSuccessful() {\n  iteration_summary_.relative_decrease =\n      step_evaluator_->StepQuality(candidate_cost_, model_cost_change_);\n\n  // In most cases, boosting the model_cost_change by the\n  // improvement caused by the inner iterations is fine, but it can\n  // be the case that the original trust region step was so bad that\n  // the resulting improvement in the cost was negative, and the\n  // change caused by the inner iterations was large enough to\n  // improve the step, but also to make relative decrease quite\n  // small.\n  //\n  // This can cause the trust region loop to reject this step. To\n  // get around this, we explicitly check if the inner iterations\n  // led to a net decrease in the objective function value. If\n  // they did, we accept the step even if the trust region ratio\n  // is small.\n  //\n  // Notice that we do not just check that cost_change is positive\n  // which is a weaker condition and would render the\n  // min_relative_decrease threshold useless. Instead, we keep\n  // track of inner_iterations_were_useful, which is true only\n  // when inner iterations lead to a net decrease in the cost.\n  return (inner_iterations_were_useful_ ||\n          iteration_summary_.relative_decrease >\n              options_.min_relative_decrease);\n}\n\n// Declare the step successful, move to candidate_x, update the\n// derivatives and let the trust region strategy and the step\n// evaluator know that the step has been accepted.\nbool TrustRegionMinimizer::HandleSuccessfulStep() {\n  x_ = candidate_x_;\n  x_norm_ = x_.norm();\n\n  // Since the step was successful, this point has already had the residual\n  // evaluated (but not the jacobian). So indicate that to the evaluator.\n  if (!EvaluateGradientAndJacobian(/*new_evaluation_point=*/false)) {\n    return false;\n  }\n\n  iteration_summary_.step_is_successful = true;\n  strategy_->StepAccepted(iteration_summary_.relative_decrease);\n  step_evaluator_->StepAccepted(candidate_cost_, model_cost_change_);\n  return true;\n}\n\n// Declare the step unsuccessful and inform the trust region strategy.\nvoid TrustRegionMinimizer::HandleUnsuccessfulStep() {\n  iteration_summary_.step_is_successful = false;\n  strategy_->StepRejected(iteration_summary_.relative_decrease);\n  iteration_summary_.cost = candidate_cost_ + solver_summary_->fixed_cost;\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/trust_region_minimizer.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2016 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_TRUST_REGION_MINIMIZER_H_\n#define CERES_INTERNAL_TRUST_REGION_MINIMIZER_H_\n\n#include <memory>\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/minimizer.h\"\n#include \"ceres/solver.h\"\n#include \"ceres/sparse_matrix.h\"\n#include \"ceres/trust_region_step_evaluator.h\"\n#include \"ceres/trust_region_strategy.h\"\n#include \"ceres/types.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// Generic trust region minimization algorithm.\n//\n// For example usage, see SolverImpl::Minimize.\nclass TrustRegionMinimizer : public Minimizer {\n public:\n  ~TrustRegionMinimizer();\n\n  // This method is not thread safe.\n  void Minimize(const Minimizer::Options& options,\n                double* parameters,\n                Solver::Summary* solver_summary) override;\n\n private:\n  void Init(const Minimizer::Options& options,\n            double* parameters,\n            Solver::Summary* solver_summary);\n  bool IterationZero();\n  bool FinalizeIterationAndCheckIfMinimizerCanContinue();\n  bool ComputeTrustRegionStep();\n\n  bool EvaluateGradientAndJacobian(bool new_evaluation_point);\n  void ComputeCandidatePointAndEvaluateCost();\n\n  void DoLineSearch(const Vector& x,\n                    const Vector& gradient,\n                    const double cost,\n                    Vector* delta);\n  void DoInnerIterationsIfNeeded();\n\n  bool ParameterToleranceReached();\n  bool FunctionToleranceReached();\n  bool GradientToleranceReached();\n  bool MaxSolverTimeReached();\n  bool MaxSolverIterationsReached();\n  bool MinTrustRegionRadiusReached();\n\n  bool IsStepSuccessful();\n  void HandleUnsuccessfulStep();\n  bool HandleSuccessfulStep();\n  bool HandleInvalidStep();\n\n  Minimizer::Options options_;\n\n  // These pointers are shortcuts to objects passed to the\n  // TrustRegionMinimizer. The TrustRegionMinimizer does not own them.\n  double* parameters_;\n  Solver::Summary* solver_summary_;\n  Evaluator* evaluator_;\n  SparseMatrix* jacobian_;\n  TrustRegionStrategy* strategy_;\n\n  std::unique_ptr<TrustRegionStepEvaluator> step_evaluator_;\n\n  bool is_not_silent_;\n  bool inner_iterations_are_enabled_;\n  bool inner_iterations_were_useful_;\n\n  // Summary of the current iteration.\n  IterationSummary iteration_summary_;\n\n  // Dimensionality of the problem in the ambient space.\n  int num_parameters_;\n  // Dimensionality of the problem in the tangent space. This is the\n  // number of columns in the Jacobian.\n  int num_effective_parameters_;\n  // Length of the residual vector, also the number of rows in the Jacobian.\n  int num_residuals_;\n\n  // Current point.\n  Vector x_;\n  // Residuals at x_;\n  Vector residuals_;\n  // Gradient at x_.\n  Vector gradient_;\n  // Solution computed by the inner iterations.\n  Vector inner_iteration_x_;\n  // model_residuals = J * trust_region_step\n  Vector model_residuals_;\n  Vector negative_gradient_;\n  // projected_gradient_step = Plus(x, -gradient), an intermediate\n  // quantity used to compute the projected gradient norm.\n  Vector projected_gradient_step_;\n  // The step computed by the trust region strategy. If Jacobi scaling\n  // is enabled, this is a vector in the scaled space.\n  Vector trust_region_step_;\n  // The current proposal for how far the trust region algorithm\n  // thinks we should move. In the most basic case, it is just the\n  // trust_region_step_ with the Jacobi scaling undone. If bounds\n  // constraints are present, then it is the result of the projected\n  // line search.\n  Vector delta_;\n  // candidate_x  = Plus(x, delta)\n  Vector candidate_x_;\n  // Scaling vector to scale the columns of the Jacobian.\n  Vector jacobian_scaling_;\n\n  // Euclidean norm of x_.\n  double x_norm_;\n  // Cost at x_.\n  double x_cost_;\n  // Minimum cost encountered up till now.\n  double minimum_cost_;\n  // How much did the trust region strategy reduce the cost of the\n  // linearized Gauss-Newton model.\n  double model_cost_change_;\n  // Cost at candidate_x_.\n  double candidate_cost_;\n\n  // Time at which the minimizer was started.\n  double start_time_in_secs_;\n  // Time at which the current iteration was started.\n  double iteration_start_time_in_secs_;\n  // Number of consecutive steps where the minimizer loop computed a\n  // numerically invalid step.\n  int num_consecutive_invalid_steps_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_TRUST_REGION_MINIMIZER_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/trust_region_minimizer_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keir@google.com (Keir Mierle)\n//         sameeragarwal@google.com (Sameer Agarwal)\n//\n// This tests the TrustRegionMinimizer loop using a direct Evaluator\n// implementation, rather than having a test that goes through all the\n// Program and Problem machinery.\n\n#include <cmath>\n#include \"ceres/autodiff_cost_function.h\"\n#include \"ceres/cost_function.h\"\n#include \"ceres/dense_qr_solver.h\"\n#include \"ceres/dense_sparse_matrix.h\"\n#include \"ceres/evaluator.h\"\n#include \"ceres/internal/port.h\"\n#include \"ceres/linear_solver.h\"\n#include \"ceres/minimizer.h\"\n#include \"ceres/problem.h\"\n#include \"ceres/trust_region_minimizer.h\"\n#include \"ceres/trust_region_strategy.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// Templated Evaluator for Powell's function. The template parameters\n// indicate which of the four variables/columns of the jacobian are\n// active. This is equivalent to constructing a problem and using the\n// SubsetLocalParameterization. This allows us to test the support for\n// the Evaluator::Plus operation besides checking for the basic\n// performance of the trust region algorithm.\ntemplate <bool col1, bool col2, bool col3, bool col4>\nclass PowellEvaluator2 : public Evaluator {\n public:\n  PowellEvaluator2()\n      : num_active_cols_(\n          (col1 ? 1 : 0) +\n          (col2 ? 1 : 0) +\n          (col3 ? 1 : 0) +\n          (col4 ? 1 : 0)) {\n    VLOG(1) << \"Columns: \"\n            << col1 << \" \"\n            << col2 << \" \"\n            << col3 << \" \"\n            << col4;\n  }\n\n  virtual ~PowellEvaluator2() {}\n\n  // Implementation of Evaluator interface.\n  SparseMatrix* CreateJacobian() const final {\n    CHECK(col1 || col2 || col3 || col4);\n    DenseSparseMatrix* dense_jacobian =\n        new DenseSparseMatrix(NumResiduals(), NumEffectiveParameters());\n    dense_jacobian->SetZero();\n    return dense_jacobian;\n  }\n\n  bool Evaluate(const Evaluator::EvaluateOptions& evaluate_options,\n                const double* state,\n                double* cost,\n                double* residuals,\n                double* gradient,\n                SparseMatrix* jacobian) final {\n    const double x1 = state[0];\n    const double x2 = state[1];\n    const double x3 = state[2];\n    const double x4 = state[3];\n\n    VLOG(1) << \"State: \"\n            << \"x1=\" << x1 << \", \"\n            << \"x2=\" << x2 << \", \"\n            << \"x3=\" << x3 << \", \"\n            << \"x4=\" << x4 << \".\";\n\n    const double f1 = x1 + 10.0 * x2;\n    const double f2 = sqrt(5.0) * (x3 - x4);\n    const double f3 = pow(x2 - 2.0 * x3, 2.0);\n    const double f4 = sqrt(10.0) * pow(x1 - x4, 2.0);\n\n    VLOG(1) << \"Function: \"\n            << \"f1=\" << f1 << \", \"\n            << \"f2=\" << f2 << \", \"\n            << \"f3=\" << f3 << \", \"\n            << \"f4=\" << f4 << \".\";\n\n    *cost = (f1*f1 + f2*f2 + f3*f3 + f4*f4) / 2.0;\n\n    VLOG(1) << \"Cost: \" << *cost;\n\n    if (residuals != NULL) {\n      residuals[0] = f1;\n      residuals[1] = f2;\n      residuals[2] = f3;\n      residuals[3] = f4;\n    }\n\n    if (jacobian != NULL) {\n      DenseSparseMatrix* dense_jacobian;\n      dense_jacobian = down_cast<DenseSparseMatrix*>(jacobian);\n      dense_jacobian->SetZero();\n\n      ColMajorMatrixRef jacobian_matrix = dense_jacobian->mutable_matrix();\n      CHECK_EQ(jacobian_matrix.cols(), num_active_cols_);\n\n      int column_index = 0;\n      if (col1) {\n        jacobian_matrix.col(column_index++) <<\n            1.0,\n            0.0,\n            0.0,\n            sqrt(10.0) * 2.0 * (x1 - x4) * (1.0 - x4);\n      }\n      if (col2) {\n        jacobian_matrix.col(column_index++) <<\n            10.0,\n            0.0,\n            2.0*(x2 - 2.0*x3)*(1.0 - 2.0*x3),\n            0.0;\n      }\n\n      if (col3) {\n        jacobian_matrix.col(column_index++) <<\n            0.0,\n            sqrt(5.0),\n            2.0*(x2 - 2.0*x3)*(x2 - 2.0),\n            0.0;\n      }\n\n      if (col4) {\n        jacobian_matrix.col(column_index++) <<\n            0.0,\n            -sqrt(5.0),\n            0.0,\n            sqrt(10.0) * 2.0 * (x1 - x4) * (x1 - 1.0);\n      }\n      VLOG(1) << \"\\n\" << jacobian_matrix;\n    }\n\n    if (gradient != NULL) {\n      int column_index = 0;\n      if (col1) {\n        gradient[column_index++] = f1  + f4 * sqrt(10.0) * 2.0 * (x1 - x4);\n      }\n\n      if (col2) {\n        gradient[column_index++] = f1 * 10.0 + f3 * 2.0 * (x2 - 2.0 * x3);\n      }\n\n      if (col3) {\n        gradient[column_index++] =\n            f2 * sqrt(5.0) + f3 * (2.0 * 2.0 * (2.0 * x3 - x2));\n      }\n\n      if (col4) {\n        gradient[column_index++] =\n            -f2 * sqrt(5.0) + f4 * sqrt(10.0) * 2.0 * (x4 - x1);\n      }\n    }\n\n    return true;\n  }\n\n  bool Plus(const double* state,\n            const double* delta,\n            double* state_plus_delta) const final {\n    int delta_index = 0;\n    state_plus_delta[0] = (col1  ? state[0] + delta[delta_index++] : state[0]);\n    state_plus_delta[1] = (col2  ? state[1] + delta[delta_index++] : state[1]);\n    state_plus_delta[2] = (col3  ? state[2] + delta[delta_index++] : state[2]);\n    state_plus_delta[3] = (col4  ? state[3] + delta[delta_index++] : state[3]);\n    return true;\n  }\n\n  int NumEffectiveParameters() const final { return num_active_cols_; }\n  int NumParameters()          const final { return 4; }\n  int NumResiduals()           const final { return 4; }\n\n private:\n  const int num_active_cols_;\n};\n\n// Templated function to hold a subset of the columns fixed and check\n// if the solver converges to the optimal values or not.\ntemplate<bool col1, bool col2, bool col3, bool col4>\nvoid IsTrustRegionSolveSuccessful(TrustRegionStrategyType strategy_type) {\n  Solver::Options solver_options;\n  LinearSolver::Options linear_solver_options;\n  DenseQRSolver linear_solver(linear_solver_options);\n\n  double parameters[4] = { 3, -1, 0, 1.0 };\n\n  // If the column is inactive, then set its value to the optimal\n  // value.\n  parameters[0] = (col1 ? parameters[0] : 0.0);\n  parameters[1] = (col2 ? parameters[1] : 0.0);\n  parameters[2] = (col3 ? parameters[2] : 0.0);\n  parameters[3] = (col4 ? parameters[3] : 0.0);\n\n  Minimizer::Options minimizer_options(solver_options);\n  minimizer_options.gradient_tolerance = 1e-26;\n  minimizer_options.function_tolerance = 1e-26;\n  minimizer_options.parameter_tolerance = 1e-26;\n  minimizer_options.evaluator.reset(\n      new PowellEvaluator2<col1, col2, col3, col4>);\n  minimizer_options.jacobian.reset(\n      minimizer_options.evaluator->CreateJacobian());\n\n  TrustRegionStrategy::Options trust_region_strategy_options;\n  trust_region_strategy_options.trust_region_strategy_type = strategy_type;\n  trust_region_strategy_options.linear_solver = &linear_solver;\n  trust_region_strategy_options.initial_radius = 1e4;\n  trust_region_strategy_options.max_radius = 1e20;\n  trust_region_strategy_options.min_lm_diagonal = 1e-6;\n  trust_region_strategy_options.max_lm_diagonal = 1e32;\n  minimizer_options.trust_region_strategy.reset(\n      TrustRegionStrategy::Create(trust_region_strategy_options));\n\n  TrustRegionMinimizer minimizer;\n  Solver::Summary summary;\n  minimizer.Minimize(minimizer_options, parameters, &summary);\n\n  // The minimum is at x1 = x2 = x3 = x4 = 0.\n  EXPECT_NEAR(0.0, parameters[0], 0.001);\n  EXPECT_NEAR(0.0, parameters[1], 0.001);\n  EXPECT_NEAR(0.0, parameters[2], 0.001);\n  EXPECT_NEAR(0.0, parameters[3], 0.001);\n}\n\nTEST(TrustRegionMinimizer, PowellsSingularFunctionUsingLevenbergMarquardt) {\n  // This case is excluded because this has a local minimum and does\n  // not find the optimum. This should not affect the correctness of\n  // this test since we are testing all the other 14 combinations of\n  // column activations.\n  //\n  //   IsSolveSuccessful<true, true, false, true>();\n\n  const TrustRegionStrategyType kStrategy = LEVENBERG_MARQUARDT;\n  IsTrustRegionSolveSuccessful<true,  true,  true,  true >(kStrategy);\n  IsTrustRegionSolveSuccessful<true,  true,  true,  false>(kStrategy);\n  IsTrustRegionSolveSuccessful<true,  false, true,  true >(kStrategy);\n  IsTrustRegionSolveSuccessful<false, true,  true,  true >(kStrategy);\n  IsTrustRegionSolveSuccessful<true,  true,  false, false>(kStrategy);\n  IsTrustRegionSolveSuccessful<true,  false, true,  false>(kStrategy);\n  IsTrustRegionSolveSuccessful<false, true,  true,  false>(kStrategy);\n  IsTrustRegionSolveSuccessful<true,  false, false, true >(kStrategy);\n  IsTrustRegionSolveSuccessful<false, true,  false, true >(kStrategy);\n  IsTrustRegionSolveSuccessful<false, false, true,  true >(kStrategy);\n  IsTrustRegionSolveSuccessful<true,  false, false, false>(kStrategy);\n  IsTrustRegionSolveSuccessful<false, true,  false, false>(kStrategy);\n  IsTrustRegionSolveSuccessful<false, false, true,  false>(kStrategy);\n  IsTrustRegionSolveSuccessful<false, false, false, true >(kStrategy);\n}\n\nTEST(TrustRegionMinimizer, PowellsSingularFunctionUsingDogleg) {\n  // The following two cases are excluded because they encounter a\n  // local minimum.\n  //\n  //  IsTrustRegionSolveSuccessful<true, true, false, true >(kStrategy);\n  //  IsTrustRegionSolveSuccessful<true,  true,  true,  true >(kStrategy);\n\n  const TrustRegionStrategyType kStrategy = DOGLEG;\n  IsTrustRegionSolveSuccessful<true,  true,  true,  false>(kStrategy);\n  IsTrustRegionSolveSuccessful<true,  false, true,  true >(kStrategy);\n  IsTrustRegionSolveSuccessful<false, true,  true,  true >(kStrategy);\n  IsTrustRegionSolveSuccessful<true,  true,  false, false>(kStrategy);\n  IsTrustRegionSolveSuccessful<true,  false, true,  false>(kStrategy);\n  IsTrustRegionSolveSuccessful<false, true,  true,  false>(kStrategy);\n  IsTrustRegionSolveSuccessful<true,  false, false, true >(kStrategy);\n  IsTrustRegionSolveSuccessful<false, true,  false, true >(kStrategy);\n  IsTrustRegionSolveSuccessful<false, false, true,  true >(kStrategy);\n  IsTrustRegionSolveSuccessful<true,  false, false, false>(kStrategy);\n  IsTrustRegionSolveSuccessful<false, true,  false, false>(kStrategy);\n  IsTrustRegionSolveSuccessful<false, false, true,  false>(kStrategy);\n  IsTrustRegionSolveSuccessful<false, false, false, true >(kStrategy);\n}\n\n\nclass CurveCostFunction : public CostFunction {\n public:\n  CurveCostFunction(int num_vertices, double target_length)\n      : num_vertices_(num_vertices), target_length_(target_length) {\n    set_num_residuals(1);\n    for (int i = 0; i < num_vertices_; ++i) {\n      mutable_parameter_block_sizes()->push_back(2);\n    }\n  }\n\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const {\n    residuals[0] = target_length_;\n\n    for (int i = 0; i < num_vertices_; ++i) {\n      int prev = (num_vertices_ + i - 1) % num_vertices_;\n      double length = 0.0;\n      for (int dim = 0; dim < 2; dim++) {\n        const double diff = parameters[prev][dim] - parameters[i][dim];\n        length += diff * diff;\n      }\n      residuals[0] -= sqrt(length);\n    }\n\n    if (jacobians == NULL) {\n      return true;\n    }\n\n    for (int i = 0; i < num_vertices_; ++i) {\n      if (jacobians[i] != NULL) {\n        int prev = (num_vertices_ + i - 1) % num_vertices_;\n        int next = (i + 1) % num_vertices_;\n\n        double u[2], v[2];\n        double norm_u = 0., norm_v = 0.;\n        for (int dim = 0; dim < 2; dim++) {\n          u[dim] = parameters[i][dim] - parameters[prev][dim];\n          norm_u += u[dim] * u[dim];\n          v[dim] = parameters[next][dim] - parameters[i][dim];\n          norm_v += v[dim] * v[dim];\n        }\n\n        norm_u = sqrt(norm_u);\n        norm_v = sqrt(norm_v);\n\n        for (int dim = 0; dim < 2; dim++) {\n          jacobians[i][dim] = 0.;\n\n          if (norm_u > std::numeric_limits< double >::min()) {\n            jacobians[i][dim] -= u[dim] / norm_u;\n          }\n\n          if (norm_v > std::numeric_limits< double >::min()) {\n            jacobians[i][dim] += v[dim] / norm_v;\n          }\n        }\n      }\n    }\n\n    return true;\n  }\n\n private:\n  int     num_vertices_;\n  double  target_length_;\n};\n\nTEST(TrustRegionMinimizer, JacobiScalingTest) {\n  int N = 6;\n  std::vector<double*> y(N);\n  const double pi = 3.1415926535897932384626433;\n  for (int i = 0; i < N; i++) {\n    double theta = i * 2. * pi/ static_cast< double >(N);\n    y[i] = new double[2];\n    y[i][0] = cos(theta);\n    y[i][1] = sin(theta);\n  }\n\n  Problem problem;\n  problem.AddResidualBlock(new CurveCostFunction(N, 10.), NULL, y);\n  Solver::Options options;\n  options.linear_solver_type = ceres::DENSE_QR;\n  Solver::Summary summary;\n  Solve(options, &problem, &summary);\n  EXPECT_LE(summary.final_cost, 1e-10);\n\n  for (int i = 0; i < N; i++) {\n    delete []y[i];\n  }\n}\n\nstruct ExpCostFunctor {\n  template <typename T>\n  bool operator()(const T* const x, T* residual) const {\n    residual[0] = T(10.0) - exp(x[0]);\n    return true;\n  }\n\n  static CostFunction* Create() {\n    return new AutoDiffCostFunction<ExpCostFunctor, 1, 1>(\n        new ExpCostFunctor);\n  }\n};\n\nTEST(TrustRegionMinimizer, GradientToleranceConvergenceUpdatesStep) {\n  double x = 5;\n  Problem problem;\n  problem.AddResidualBlock(ExpCostFunctor::Create(), NULL, &x);\n  problem.SetParameterLowerBound(&x, 0, 3.0);\n  Solver::Options options;\n  Solver::Summary summary;\n  Solve(options, &problem, &summary);\n  EXPECT_NEAR(3.0, x, 1e-12);\n  const double expected_final_cost = 0.5 * pow(10.0 - exp(3.0), 2);\n  EXPECT_NEAR(expected_final_cost, summary.final_cost, 1e-12);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/trust_region_preprocessor.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/trust_region_preprocessor.h\"\n\n#include <numeric>\n#include <string>\n#include \"ceres/callbacks.h\"\n#include \"ceres/context_impl.h\"\n#include \"ceres/evaluator.h\"\n#include \"ceres/linear_solver.h\"\n#include \"ceres/minimizer.h\"\n#include \"ceres/parameter_block.h\"\n#include \"ceres/preconditioner.h\"\n#include \"ceres/preprocessor.h\"\n#include \"ceres/problem_impl.h\"\n#include \"ceres/program.h\"\n#include \"ceres/reorder_program.h\"\n#include \"ceres/suitesparse.h\"\n#include \"ceres/trust_region_strategy.h\"\n#include \"ceres/wall_time.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::vector;\n\nnamespace {\n\nParameterBlockOrdering* CreateDefaultLinearSolverOrdering(\n    const Program& program) {\n  ParameterBlockOrdering* ordering = new ParameterBlockOrdering;\n  const vector<ParameterBlock*>& parameter_blocks =\n      program.parameter_blocks();\n  for (int i = 0; i < parameter_blocks.size(); ++i) {\n    ordering->AddElementToGroup(\n        const_cast<double*>(parameter_blocks[i]->user_state()), 0);\n  }\n  return ordering;\n}\n\n// Check if all the user supplied values in the parameter blocks are\n// sane or not, and if the program is feasible or not.\nbool IsProgramValid(const Program& program, std::string* error) {\n  return (program.ParameterBlocksAreFinite(error) &&\n          program.IsFeasible(error));\n}\n\nvoid AlternateLinearSolverAndPreconditionerForSchurTypeLinearSolver(\n    Solver::Options* options) {\n  if (!IsSchurType(options->linear_solver_type)) {\n    return;\n  }\n\n  const LinearSolverType linear_solver_type_given = options->linear_solver_type;\n  const PreconditionerType preconditioner_type_given =\n      options->preconditioner_type;\n  options->linear_solver_type = LinearSolver::LinearSolverForZeroEBlocks(\n      linear_solver_type_given);\n\n  std::string message;\n  if (linear_solver_type_given == ITERATIVE_SCHUR) {\n    options->preconditioner_type = Preconditioner::PreconditionerForZeroEBlocks(\n        preconditioner_type_given);\n\n    message =\n        StringPrintf(\n            \"No E blocks. Switching from %s(%s) to %s(%s).\",\n            LinearSolverTypeToString(linear_solver_type_given),\n            PreconditionerTypeToString(preconditioner_type_given),\n            LinearSolverTypeToString(options->linear_solver_type),\n            PreconditionerTypeToString(options->preconditioner_type));\n  } else {\n    message =\n        StringPrintf(\n            \"No E blocks. Switching from %s to %s.\",\n            LinearSolverTypeToString(linear_solver_type_given),\n            LinearSolverTypeToString(options->linear_solver_type));\n  }\n\n  VLOG_IF(1, options->logging_type != SILENT) << message;\n}\n\n// Reorder the program to reduce fill-in and increase cache coherency.\nbool ReorderProgram(PreprocessedProblem* pp) {\n  const Solver::Options& options = pp->options;\n  if (IsSchurType(options.linear_solver_type)) {\n    return ReorderProgramForSchurTypeLinearSolver(\n        options.linear_solver_type,\n        options.sparse_linear_algebra_library_type,\n        pp->problem->parameter_map(),\n        options.linear_solver_ordering.get(),\n        pp->reduced_program.get(),\n        &pp->error);\n  }\n\n  if (options.linear_solver_type == SPARSE_NORMAL_CHOLESKY &&\n      !options.dynamic_sparsity) {\n    return ReorderProgramForSparseCholesky(\n        options.sparse_linear_algebra_library_type,\n        *options.linear_solver_ordering,\n        0, /* use all the rows of the jacobian */\n        pp->reduced_program.get(),\n        &pp->error);\n  }\n\n  if (options.linear_solver_type == CGNR &&\n      options.preconditioner_type == SUBSET) {\n    pp->linear_solver_options.subset_preconditioner_start_row_block =\n        ReorderResidualBlocksByPartition(\n            options.residual_blocks_for_subset_preconditioner,\n            pp->reduced_program.get());\n\n    return ReorderProgramForSparseCholesky(\n        options.sparse_linear_algebra_library_type,\n        *options.linear_solver_ordering,\n        pp->linear_solver_options.subset_preconditioner_start_row_block,\n        pp->reduced_program.get(),\n        &pp->error);\n  }\n\n  return true;\n}\n\n// Configure and create a linear solver object. In doing so, if a\n// sparse direct factorization based linear solver is being used, then\n// find a fill reducing ordering and reorder the program as needed\n// too.\nbool SetupLinearSolver(PreprocessedProblem* pp) {\n  Solver::Options& options = pp->options;\n  pp->linear_solver_options = LinearSolver::Options();\n\n  if (!options.linear_solver_ordering) {\n    // If the user has not supplied a linear solver ordering, then we\n    // assume that they are giving all the freedom to us in choosing\n    // the best possible ordering. This intent can be indicated by\n    // putting all the parameter blocks in the same elimination group.\n    options.linear_solver_ordering.reset(\n        CreateDefaultLinearSolverOrdering(*pp->reduced_program));\n  } else {\n    // If the user supplied an ordering, then check if the first\n    // elimination group is still non-empty after the reduced problem\n    // has been constructed.\n    //\n    // This is important for Schur type linear solvers, where the\n    // first elimination group is special -- it needs to be an\n    // independent set.\n    //\n    // If the first elimination group is empty, then we cannot use the\n    // user's requested linear solver (and a preconditioner as the\n    // case may be) so we must use a different one.\n    ParameterBlockOrdering* ordering = options.linear_solver_ordering.get();\n    const int min_group_id = ordering->MinNonZeroGroup();\n    ordering->Remove(pp->removed_parameter_blocks);\n    if (IsSchurType(options.linear_solver_type) &&\n        min_group_id != ordering->MinNonZeroGroup()) {\n      AlternateLinearSolverAndPreconditionerForSchurTypeLinearSolver(\n          &options);\n    }\n  }\n\n  // Reorder the program to reduce fill in and improve cache coherency\n  // of the Jacobian.\n  if (!ReorderProgram(pp)) {\n    return false;\n  }\n\n  // Configure the linear solver.\n  pp->linear_solver_options.min_num_iterations =\n      options.min_linear_solver_iterations;\n  pp->linear_solver_options.max_num_iterations =\n      options.max_linear_solver_iterations;\n  pp->linear_solver_options.type = options.linear_solver_type;\n  pp->linear_solver_options.preconditioner_type = options.preconditioner_type;\n  pp->linear_solver_options.visibility_clustering_type =\n      options.visibility_clustering_type;\n  pp->linear_solver_options.sparse_linear_algebra_library_type =\n      options.sparse_linear_algebra_library_type;\n  pp->linear_solver_options.dense_linear_algebra_library_type =\n      options.dense_linear_algebra_library_type;\n  pp->linear_solver_options.use_explicit_schur_complement =\n      options.use_explicit_schur_complement;\n  pp->linear_solver_options.dynamic_sparsity = options.dynamic_sparsity;\n  pp->linear_solver_options.use_mixed_precision_solves =\n      options.use_mixed_precision_solves;\n  pp->linear_solver_options.max_num_refinement_iterations =\n      options.max_num_refinement_iterations;\n  pp->linear_solver_options.num_threads = options.num_threads;\n  pp->linear_solver_options.use_postordering = options.use_postordering;\n  pp->linear_solver_options.context = pp->problem->context();\n\n  if (IsSchurType(pp->linear_solver_options.type)) {\n    OrderingToGroupSizes(options.linear_solver_ordering.get(),\n                         &pp->linear_solver_options.elimination_groups);\n\n    // Schur type solvers expect at least two elimination groups. If\n    // there is only one elimination group, then it is guaranteed that\n    // this group only contains e_blocks. Thus we add a dummy\n    // elimination group with zero blocks in it.\n    if (pp->linear_solver_options.elimination_groups.size() == 1) {\n      pp->linear_solver_options.elimination_groups.push_back(0);\n    }\n\n    if (options.linear_solver_type == SPARSE_SCHUR) {\n      // When using SPARSE_SCHUR, we ignore the user's postordering\n      // preferences in certain cases.\n      //\n      // 1. SUITE_SPARSE is the sparse linear algebra library requested\n      //    but cholmod_camd is not available.\n      // 2. CX_SPARSE is the sparse linear algebra library requested.\n      //\n      // This ensures that the linear solver does not assume that a\n      // fill-reducing pre-ordering has been done.\n      //\n      // TODO(sameeragarwal): Implement the reordering of parameter\n      // blocks for CX_SPARSE.\n      if ((options.sparse_linear_algebra_library_type == SUITE_SPARSE &&\n           !SuiteSparse::\n           IsConstrainedApproximateMinimumDegreeOrderingAvailable()) ||\n          (options.sparse_linear_algebra_library_type == CX_SPARSE)) {\n        pp->linear_solver_options.use_postordering = true;\n      }\n    }\n  }\n\n  pp->linear_solver.reset(LinearSolver::Create(pp->linear_solver_options));\n  return (pp->linear_solver != nullptr);\n}\n\n// Configure and create the evaluator.\nbool SetupEvaluator(PreprocessedProblem* pp) {\n  const Solver::Options& options = pp->options;\n  pp->evaluator_options = Evaluator::Options();\n  pp->evaluator_options.linear_solver_type = options.linear_solver_type;\n  pp->evaluator_options.num_eliminate_blocks = 0;\n  if (IsSchurType(options.linear_solver_type)) {\n    pp->evaluator_options.num_eliminate_blocks =\n        options\n        .linear_solver_ordering\n        ->group_to_elements().begin()\n        ->second.size();\n  }\n\n  pp->evaluator_options.num_threads = options.num_threads;\n  pp->evaluator_options.dynamic_sparsity = options.dynamic_sparsity;\n  pp->evaluator_options.context = pp->problem->context();\n  pp->evaluator_options.evaluation_callback =\n      pp->reduced_program->mutable_evaluation_callback();\n  pp->evaluator.reset(Evaluator::Create(pp->evaluator_options,\n                                        pp->reduced_program.get(),\n                                        &pp->error));\n\n  return (pp->evaluator != nullptr);\n}\n\n// If the user requested inner iterations, then find an inner\n// iteration ordering as needed and configure and create a\n// CoordinateDescentMinimizer object to perform the inner iterations.\nbool SetupInnerIterationMinimizer(PreprocessedProblem* pp) {\n  Solver::Options& options = pp->options;\n  if (!options.use_inner_iterations) {\n    return true;\n  }\n\n  if (pp->reduced_program->mutable_evaluation_callback()) {\n    pp->error = \"Inner iterations cannot be used with EvaluationCallbacks\";\n    return false;\n  }\n\n  // With just one parameter block, the outer iteration of the trust\n  // region method and inner iterations are doing exactly the same\n  // thing, and thus inner iterations are not needed.\n  if (pp->reduced_program->NumParameterBlocks() == 1) {\n    LOG(WARNING) << \"Reduced problem only contains one parameter block.\"\n                 << \"Disabling inner iterations.\";\n    return true;\n  }\n\n  if (options.inner_iteration_ordering != nullptr) {\n    // If the user supplied an ordering, then remove the set of\n    // inactive parameter blocks from it\n    options.inner_iteration_ordering->Remove(pp->removed_parameter_blocks);\n    if (options.inner_iteration_ordering->NumElements() == 0) {\n      LOG(WARNING) << \"No remaining elements in the inner iteration ordering.\";\n      return true;\n    }\n\n    // Validate the reduced ordering.\n    if (!CoordinateDescentMinimizer::IsOrderingValid(\n            *pp->reduced_program,\n            *options.inner_iteration_ordering,\n            &pp->error)) {\n      return false;\n    }\n  } else {\n    // The user did not supply an ordering, so create one.\n    options.inner_iteration_ordering.reset(\n        CoordinateDescentMinimizer::CreateOrdering(*pp->reduced_program));\n  }\n\n  pp->inner_iteration_minimizer.reset(\n      new CoordinateDescentMinimizer(pp->problem->context()));\n  return pp->inner_iteration_minimizer->Init(*pp->reduced_program,\n                                             pp->problem->parameter_map(),\n                                             *options.inner_iteration_ordering,\n                                             &pp->error);\n}\n\n// Configure and create a TrustRegionMinimizer object.\nvoid SetupMinimizerOptions(PreprocessedProblem* pp) {\n  const Solver::Options& options = pp->options;\n\n  SetupCommonMinimizerOptions(pp);\n  pp->minimizer_options.is_constrained =\n      pp->reduced_program->IsBoundsConstrained();\n  pp->minimizer_options.jacobian.reset(pp->evaluator->CreateJacobian());\n  pp->minimizer_options.inner_iteration_minimizer =\n      pp->inner_iteration_minimizer;\n\n  TrustRegionStrategy::Options strategy_options;\n  strategy_options.linear_solver = pp->linear_solver.get();\n  strategy_options.initial_radius =\n      options.initial_trust_region_radius;\n  strategy_options.max_radius = options.max_trust_region_radius;\n  strategy_options.min_lm_diagonal = options.min_lm_diagonal;\n  strategy_options.max_lm_diagonal = options.max_lm_diagonal;\n  strategy_options.trust_region_strategy_type =\n      options.trust_region_strategy_type;\n  strategy_options.dogleg_type = options.dogleg_type;\n  pp->minimizer_options.trust_region_strategy.reset(\n      TrustRegionStrategy::Create(strategy_options));\n  CHECK(pp->minimizer_options.trust_region_strategy != nullptr);\n}\n\n}  // namespace\n\nTrustRegionPreprocessor::~TrustRegionPreprocessor() {\n}\n\nbool TrustRegionPreprocessor::Preprocess(const Solver::Options& options,\n                                         ProblemImpl* problem,\n                                         PreprocessedProblem* pp) {\n  CHECK(pp != nullptr);\n  pp->options = options;\n  ChangeNumThreadsIfNeeded(&pp->options);\n\n  pp->problem = problem;\n  Program* program = problem->mutable_program();\n  if (!IsProgramValid(*program, &pp->error)) {\n    return false;\n  }\n\n  pp->reduced_program.reset(\n      program->CreateReducedProgram(&pp->removed_parameter_blocks,\n                                    &pp->fixed_cost,\n                                    &pp->error));\n\n  if (pp->reduced_program.get() == NULL) {\n    return false;\n  }\n\n  if (pp->reduced_program->NumParameterBlocks() == 0) {\n    // The reduced problem has no parameter or residual blocks. There\n    // is nothing more to do.\n    return true;\n  }\n\n  if (!SetupLinearSolver(pp) ||\n      !SetupEvaluator(pp) ||\n      !SetupInnerIterationMinimizer(pp)) {\n    return false;\n  }\n\n  SetupMinimizerOptions(pp);\n  return true;\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/trust_region_preprocessor.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_TRUST_REGION_PREPROCESSOR_H_\n#define CERES_INTERNAL_TRUST_REGION_PREPROCESSOR_H_\n\n#include \"ceres/preprocessor.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass TrustRegionPreprocessor : public Preprocessor {\n public:\n  virtual ~TrustRegionPreprocessor();\n  bool Preprocess(const Solver::Options& options,\n                  ProblemImpl* problem,\n                  PreprocessedProblem* preprocessed_problem) override;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_TRUST_REGION_PREPROCESSOR_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/trust_region_preprocessor_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include <array>\n#include <map>\n\n#include \"ceres/ordered_groups.h\"\n#include \"ceres/problem_impl.h\"\n#include \"ceres/sized_cost_function.h\"\n#include \"ceres/solver.h\"\n#include \"ceres/trust_region_preprocessor.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nTEST(TrustRegionPreprocessor, ZeroProblem) {\n  ProblemImpl problem;\n  Solver::Options options;\n  TrustRegionPreprocessor preprocessor;\n  PreprocessedProblem pp;\n  EXPECT_TRUE(preprocessor.Preprocess(options, &problem, &pp));\n}\n\nTEST(TrustRegionPreprocessor, ProblemWithInvalidParameterBlock) {\n  ProblemImpl problem;\n  double x = std::numeric_limits<double>::quiet_NaN();\n  problem.AddParameterBlock(&x, 1);\n  Solver::Options options;\n  TrustRegionPreprocessor preprocessor;\n  PreprocessedProblem pp;\n  EXPECT_FALSE(preprocessor.Preprocess(options, &problem, &pp));\n}\n\nTEST(TrustRegionPreprocessor, ParameterBlockBoundsAreInvalid) {\n  ProblemImpl problem;\n  double x = 1.0;\n  problem.AddParameterBlock(&x, 1);\n  problem.SetParameterUpperBound(&x, 0, 1.0);\n  problem.SetParameterLowerBound(&x, 0, 2.0);\n  Solver::Options options;\n  TrustRegionPreprocessor preprocessor;\n  PreprocessedProblem pp;\n  EXPECT_FALSE(preprocessor.Preprocess(options, &problem, &pp));\n}\n\nTEST(TrustRegionPreprocessor, ParamterBlockIsInfeasible) {\n  ProblemImpl problem;\n  double x = 3.0;\n  problem.AddParameterBlock(&x, 1);\n  problem.SetParameterUpperBound(&x, 0, 1.0);\n  problem.SetParameterLowerBound(&x, 0, 2.0);\n  problem.SetParameterBlockConstant(&x);\n  Solver::Options options;\n  TrustRegionPreprocessor preprocessor;\n  PreprocessedProblem pp;\n  EXPECT_FALSE(preprocessor.Preprocess(options, &problem, &pp));\n}\n\nclass FailingCostFunction : public SizedCostFunction<1, 1> {\n public:\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const {\n    return false;\n  }\n};\n\nTEST(TrustRegionPreprocessor, RemoveParameterBlocksFailed) {\n  ProblemImpl problem;\n  double x = 3.0;\n  problem.AddResidualBlock(new FailingCostFunction, nullptr, &x);\n  problem.SetParameterBlockConstant(&x);\n  Solver::Options options;\n  TrustRegionPreprocessor preprocessor;\n  PreprocessedProblem pp;\n  EXPECT_FALSE(preprocessor.Preprocess(options, &problem, &pp));\n}\n\nTEST(TrustRegionPreprocessor, RemoveParameterBlocksSucceeds) {\n  ProblemImpl problem;\n  double x = 3.0;\n  problem.AddParameterBlock(&x, 1);\n  Solver::Options options;\n  TrustRegionPreprocessor preprocessor;\n  PreprocessedProblem pp;\n  EXPECT_TRUE(preprocessor.Preprocess(options, &problem, &pp));\n}\n\ntemplate <int kNumResiduals, int... Ns>\nclass DummyCostFunction : public SizedCostFunction<kNumResiduals, Ns...> {\n public:\n  bool Evaluate(double const* const* parameters,\n                double* residuals,\n                double** jacobians) const {\n    for (int i = 0; i < kNumResiduals; ++i) {\n      residuals[i] = kNumResiduals * kNumResiduals + i;\n    }\n\n    if (jacobians == nullptr) {\n      return true;\n    }\n\n    std::array<int, sizeof...(Ns)> N{Ns...};\n    for (size_t i = 0; i < N.size(); ++i) {\n      if (jacobians[i] != nullptr) {\n        MatrixRef j(jacobians[i], kNumResiduals, N[i]);\n        j.setOnes();\n        j *= kNumResiduals * N[i];\n      }\n    }\n\n    return true;\n  }\n};\n\nclass LinearSolverAndEvaluatorCreationTest : public ::testing::Test {\n public:\n  void SetUp() final {\n    x_ = 1.0;\n    y_ = 1.0;\n    z_ = 1.0;\n    problem_.AddResidualBlock(new DummyCostFunction<1, 1, 1>, nullptr, &x_, &y_);\n    problem_.AddResidualBlock(new DummyCostFunction<1, 1, 1>, nullptr, &y_, &z_);\n  }\n\n  void PreprocessForGivenLinearSolverAndVerify(\n      const LinearSolverType linear_solver_type) {\n    Solver::Options options;\n    options.linear_solver_type = linear_solver_type;\n    TrustRegionPreprocessor preprocessor;\n    PreprocessedProblem pp;\n    EXPECT_TRUE(preprocessor.Preprocess(options, &problem_, &pp));\n    EXPECT_EQ(pp.options.linear_solver_type, linear_solver_type);\n    EXPECT_EQ(pp.linear_solver_options.type, linear_solver_type);\n    EXPECT_EQ(pp.evaluator_options.linear_solver_type, linear_solver_type);\n    EXPECT_TRUE(pp.linear_solver.get() != nullptr);\n    EXPECT_TRUE(pp.evaluator.get() != nullptr);\n  }\n\n protected:\n  ProblemImpl problem_;\n  double x_;\n  double y_;\n  double z_;\n};\n\nTEST_F(LinearSolverAndEvaluatorCreationTest, DenseQR) {\n  PreprocessForGivenLinearSolverAndVerify(DENSE_QR);\n}\n\nTEST_F(LinearSolverAndEvaluatorCreationTest, DenseNormalCholesky) {\n  PreprocessForGivenLinearSolverAndVerify(DENSE_NORMAL_CHOLESKY);\n}\n\nTEST_F(LinearSolverAndEvaluatorCreationTest, DenseSchur) {\n  PreprocessForGivenLinearSolverAndVerify(DENSE_SCHUR);\n}\n\n#if !defined(CERES_NO_SPARSE)\nTEST_F(LinearSolverAndEvaluatorCreationTest, SparseNormalCholesky) {\n  PreprocessForGivenLinearSolverAndVerify(SPARSE_NORMAL_CHOLESKY);\n}\n#endif\n\n#if !defined(CERES_NO_SPARSE)\nTEST_F(LinearSolverAndEvaluatorCreationTest, SparseSchur) {\n  PreprocessForGivenLinearSolverAndVerify(SPARSE_SCHUR);\n}\n#endif\n\nTEST_F(LinearSolverAndEvaluatorCreationTest, CGNR) {\n  PreprocessForGivenLinearSolverAndVerify(CGNR);\n}\n\nTEST_F(LinearSolverAndEvaluatorCreationTest, IterativeSchur) {\n  PreprocessForGivenLinearSolverAndVerify(ITERATIVE_SCHUR);\n}\n\nTEST_F(LinearSolverAndEvaluatorCreationTest, MinimizerIsAwareOfBounds) {\n  problem_.SetParameterLowerBound(&x_, 0, 0.0);\n  Solver::Options options;\n  TrustRegionPreprocessor preprocessor;\n  PreprocessedProblem pp;\n  EXPECT_TRUE(preprocessor.Preprocess(options, &problem_, &pp));\n  EXPECT_EQ(pp.options.linear_solver_type, options.linear_solver_type);\n  EXPECT_EQ(pp.linear_solver_options.type, options.linear_solver_type);\n  EXPECT_EQ(pp.evaluator_options.linear_solver_type,\n            options.linear_solver_type);\n  EXPECT_TRUE(pp.linear_solver.get() != nullptr);\n  EXPECT_TRUE(pp.evaluator.get() != nullptr);\n  EXPECT_TRUE(pp.minimizer_options.is_constrained);\n}\n\nTEST_F(LinearSolverAndEvaluatorCreationTest, SchurTypeSolverWithBadOrdering) {\n  Solver::Options options;\n  options.linear_solver_type = DENSE_SCHUR;\n  options.linear_solver_ordering.reset(new ParameterBlockOrdering);\n  options.linear_solver_ordering->AddElementToGroup(&x_, 0);\n  options.linear_solver_ordering->AddElementToGroup(&y_, 0);\n  options.linear_solver_ordering->AddElementToGroup(&z_, 1);\n\n  TrustRegionPreprocessor preprocessor;\n  PreprocessedProblem pp;\n  EXPECT_FALSE(preprocessor.Preprocess(options, &problem_, &pp));\n}\n\nTEST_F(LinearSolverAndEvaluatorCreationTest, SchurTypeSolverWithGoodOrdering) {\n  Solver::Options options;\n  options.linear_solver_type = DENSE_SCHUR;\n  options.linear_solver_ordering.reset(new ParameterBlockOrdering);\n  options.linear_solver_ordering->AddElementToGroup(&x_, 0);\n  options.linear_solver_ordering->AddElementToGroup(&z_, 0);\n  options.linear_solver_ordering->AddElementToGroup(&y_, 1);\n\n  TrustRegionPreprocessor preprocessor;\n  PreprocessedProblem pp;\n  EXPECT_TRUE(preprocessor.Preprocess(options, &problem_, &pp));\n  EXPECT_EQ(pp.options.linear_solver_type, DENSE_SCHUR);\n  EXPECT_EQ(pp.linear_solver_options.type, DENSE_SCHUR);\n  EXPECT_EQ(pp.evaluator_options.linear_solver_type, DENSE_SCHUR);\n  EXPECT_TRUE(pp.linear_solver.get() != nullptr);\n  EXPECT_TRUE(pp.evaluator.get() != nullptr);\n}\n\nTEST_F(LinearSolverAndEvaluatorCreationTest,\n       SchurTypeSolverWithEmptyFirstEliminationGroup) {\n  problem_.SetParameterBlockConstant(&x_);\n  problem_.SetParameterBlockConstant(&z_);\n\n  Solver::Options options;\n  options.linear_solver_type = DENSE_SCHUR;\n  options.linear_solver_ordering.reset(new ParameterBlockOrdering);\n  options.linear_solver_ordering->AddElementToGroup(&x_, 0);\n  options.linear_solver_ordering->AddElementToGroup(&z_, 0);\n  options.linear_solver_ordering->AddElementToGroup(&y_, 1);\n\n  TrustRegionPreprocessor preprocessor;\n  PreprocessedProblem pp;\n  EXPECT_TRUE(preprocessor.Preprocess(options, &problem_, &pp));\n  EXPECT_EQ(pp.options.linear_solver_type, DENSE_QR);\n  EXPECT_EQ(pp.linear_solver_options.type, DENSE_QR);\n  EXPECT_EQ(pp.evaluator_options.linear_solver_type, DENSE_QR);\n  EXPECT_TRUE(pp.linear_solver.get() != nullptr);\n  EXPECT_TRUE(pp.evaluator.get() != nullptr);\n}\n\nTEST_F(LinearSolverAndEvaluatorCreationTest,\n       SchurTypeSolverWithEmptySecondEliminationGroup) {\n  problem_.SetParameterBlockConstant(&y_);\n\n  Solver::Options options;\n  options.linear_solver_type = DENSE_SCHUR;\n  options.linear_solver_ordering.reset(new ParameterBlockOrdering);\n  options.linear_solver_ordering->AddElementToGroup(&x_, 0);\n  options.linear_solver_ordering->AddElementToGroup(&z_, 0);\n  options.linear_solver_ordering->AddElementToGroup(&y_, 1);\n\n  TrustRegionPreprocessor preprocessor;\n  PreprocessedProblem pp;\n  EXPECT_TRUE(preprocessor.Preprocess(options, &problem_, &pp));\n  EXPECT_EQ(pp.options.linear_solver_type, DENSE_SCHUR);\n  EXPECT_EQ(pp.linear_solver_options.type, DENSE_SCHUR);\n  EXPECT_EQ(pp.evaluator_options.linear_solver_type, DENSE_SCHUR);\n  EXPECT_TRUE(pp.linear_solver.get() != nullptr);\n  EXPECT_TRUE(pp.evaluator.get() != nullptr);\n}\n\nTEST(TrustRegionPreprocessorTest, InnerIterationsWithOneParameterBlock) {\n  ProblemImpl problem;\n  double x = 1.0;\n  problem.AddResidualBlock(new DummyCostFunction<1, 1>, nullptr, &x);\n\n  Solver::Options options;\n  options.use_inner_iterations = true;\n\n  TrustRegionPreprocessor preprocessor;\n  PreprocessedProblem pp;\n  EXPECT_TRUE(preprocessor.Preprocess(options, &problem, &pp));\n  EXPECT_TRUE(pp.linear_solver.get() != nullptr);\n  EXPECT_TRUE(pp.evaluator.get() != nullptr);\n  EXPECT_TRUE(pp.inner_iteration_minimizer.get() == nullptr);\n}\n\nTEST_F(LinearSolverAndEvaluatorCreationTest,\n       InnerIterationsWithTwoParameterBlocks) {\n  Solver::Options options;\n  options.use_inner_iterations = true;\n\n  TrustRegionPreprocessor preprocessor;\n  PreprocessedProblem pp;\n  EXPECT_TRUE(preprocessor.Preprocess(options, &problem_, &pp));\n  EXPECT_TRUE(pp.linear_solver.get() != nullptr);\n  EXPECT_TRUE(pp.evaluator.get() != nullptr);\n  EXPECT_TRUE(pp.inner_iteration_minimizer.get() != nullptr);\n}\n\nTEST_F(LinearSolverAndEvaluatorCreationTest,\n       InvalidInnerIterationsOrdering) {\n  Solver::Options options;\n  options.use_inner_iterations = true;\n  options.inner_iteration_ordering.reset(new ParameterBlockOrdering);\n  options.inner_iteration_ordering->AddElementToGroup(&x_, 0);\n  options.inner_iteration_ordering->AddElementToGroup(&z_, 0);\n  options.inner_iteration_ordering->AddElementToGroup(&y_, 0);\n\n  TrustRegionPreprocessor preprocessor;\n  PreprocessedProblem pp;\n  EXPECT_FALSE(preprocessor.Preprocess(options, &problem_, &pp));\n}\n\nTEST_F(LinearSolverAndEvaluatorCreationTest, ValidInnerIterationsOrdering) {\n  Solver::Options options;\n  options.use_inner_iterations = true;\n  options.inner_iteration_ordering.reset(new ParameterBlockOrdering);\n  options.inner_iteration_ordering->AddElementToGroup(&x_, 0);\n  options.inner_iteration_ordering->AddElementToGroup(&z_, 0);\n  options.inner_iteration_ordering->AddElementToGroup(&y_, 1);\n\n  TrustRegionPreprocessor preprocessor;\n  PreprocessedProblem pp;\n  EXPECT_TRUE(preprocessor.Preprocess(options, &problem_, &pp));\n  EXPECT_TRUE(pp.linear_solver.get() != nullptr);\n  EXPECT_TRUE(pp.evaluator.get() != nullptr);\n  EXPECT_TRUE(pp.inner_iteration_minimizer.get() != nullptr);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/trust_region_step_evaluator.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2016 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include <algorithm>\n#include <limits>\n#include \"ceres/trust_region_step_evaluator.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nTrustRegionStepEvaluator::TrustRegionStepEvaluator(\n    const double initial_cost,\n    const int max_consecutive_nonmonotonic_steps)\n    : max_consecutive_nonmonotonic_steps_(max_consecutive_nonmonotonic_steps),\n      minimum_cost_(initial_cost),\n      current_cost_(initial_cost),\n      reference_cost_(initial_cost),\n      candidate_cost_(initial_cost),\n      accumulated_reference_model_cost_change_(0.0),\n      accumulated_candidate_model_cost_change_(0.0),\n      num_consecutive_nonmonotonic_steps_(0){\n}\n\ndouble TrustRegionStepEvaluator::StepQuality(\n    const double cost,\n    const double model_cost_change) const {\n  // If the function evaluation for this step was a failure, in which\n  // case the TrustRegionMinimizer would have set the cost to\n  // std::numeric_limits<double>::max(). In this case, the division by\n  // model_cost_change can result in an overflow. To prevent that from\n  // happening, we will deal with this case explicitly.\n  if (cost >= std::numeric_limits<double>::max()) {\n    return std::numeric_limits<double>::lowest();\n  }\n\n  const double relative_decrease = (current_cost_ - cost) / model_cost_change;\n  const double historical_relative_decrease =\n      (reference_cost_ - cost) /\n      (accumulated_reference_model_cost_change_ + model_cost_change);\n  return std::max(relative_decrease, historical_relative_decrease);\n}\n\nvoid TrustRegionStepEvaluator::StepAccepted(\n    const double cost,\n    const double model_cost_change) {\n  // Algorithm 10.1.2 from Trust Region Methods by Conn, Gould &\n  // Toint.\n  //\n  // Step 3a\n  current_cost_ = cost;\n  accumulated_candidate_model_cost_change_ += model_cost_change;\n  accumulated_reference_model_cost_change_ += model_cost_change;\n\n  // Step 3b.\n  if (current_cost_ < minimum_cost_) {\n    minimum_cost_ = current_cost_;\n    num_consecutive_nonmonotonic_steps_ = 0;\n    candidate_cost_ = current_cost_;\n    accumulated_candidate_model_cost_change_ = 0.0;\n  } else {\n    // Step 3c.\n    ++num_consecutive_nonmonotonic_steps_;\n    if (current_cost_ > candidate_cost_) {\n      candidate_cost_ = current_cost_;\n      accumulated_candidate_model_cost_change_ = 0.0;\n    }\n  }\n\n  // Step 3d.\n  //\n  // At this point we have made too many non-monotonic steps and\n  // we are going to reset the value of the reference iterate so\n  // as to force the algorithm to descend.\n  //\n  // Note: In the original algorithm by Toint, this step was only\n  // executed if the step was non-monotonic, but that would not handle\n  // the case of max_consecutive_nonmonotonic_steps = 0. The small\n  // modification of doing this always handles that corner case\n  // correctly.\n  if (num_consecutive_nonmonotonic_steps_ ==\n      max_consecutive_nonmonotonic_steps_) {\n    reference_cost_ = candidate_cost_;\n    accumulated_reference_model_cost_change_ =\n        accumulated_candidate_model_cost_change_;\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/trust_region_step_evaluator.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2016 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_TRUST_REGION_STEP_EVALUATOR_H_\n#define CERES_INTERNAL_TRUST_REGION_STEP_EVALUATOR_H_\n\nnamespace ceres {\nnamespace internal {\n\n// The job of the TrustRegionStepEvaluator is to evaluate the quality\n// of a step, i.e., how the cost of a step compares with the reduction\n// in the objective of the trust region problem.\n//\n// Classic trust region methods are descent methods, in that they only\n// accept a point if it strictly reduces the value of the objective\n// function. They do this by measuring the quality of a step as\n//\n//   cost_change / model_cost_change.\n//\n// Relaxing the monotonic descent requirement allows the algorithm to\n// be more efficient in the long term at the cost of some local\n// increase in the value of the objective function.\n//\n// This is because allowing for non-decreasing objective function\n// values in a principled manner allows the algorithm to \"jump over\n// boulders\" as the method is not restricted to move into narrow\n// valleys while preserving its convergence properties.\n//\n// The parameter max_consecutive_nonmonotonic_steps controls the\n// window size used by the step selection algorithm to accept\n// non-monotonic steps. Setting this parameter to zero, recovers the\n// classic monotonic descent algorithm.\n//\n// Based on algorithm 10.1.2 (page 357) of \"Trust Region\n// Methods\" by Conn Gould & Toint, or equations 33-40 of\n// \"Non-monotone trust-region algorithms for nonlinear\n// optimization subject to convex constraints\" by Phil Toint,\n// Mathematical Programming, 77, 1997.\n//\n// Example usage:\n//\n// TrustRegionStepEvaluator* step_evaluator = ...\n//\n// cost = ... // Compute the non-linear objective function value.\n// model_cost_change = ... // Change in the value of the trust region objective.\n// if (step_evaluator->StepQuality(cost, model_cost_change) > threshold) {\n//   x = x + delta;\n//   step_evaluator->StepAccepted(cost, model_cost_change);\n// }\nclass TrustRegionStepEvaluator {\n public:\n  // initial_cost is as the name implies the cost of the starting\n  // state of the trust region minimizer.\n  //\n  // max_consecutive_nonmonotonic_steps controls the window size used\n  // by the step selection algorithm to accept non-monotonic\n  // steps. Setting this parameter to zero, recovers the classic\n  // monotonic descent algorithm.\n  TrustRegionStepEvaluator(double initial_cost,\n                           int max_consecutive_nonmonotonic_steps);\n\n  // Return the quality of the step given its cost and the decrease in\n  // the cost of the model. model_cost_change has to be positive.\n  double StepQuality(double cost, double model_cost_change) const;\n\n  // Inform the step evaluator that a step with the given cost and\n  // model_cost_change has been accepted by the trust region\n  // minimizer.\n  void StepAccepted(double cost, double model_cost_change);\n\n private:\n  const int max_consecutive_nonmonotonic_steps_;\n  // The minimum cost encountered up till now.\n  double minimum_cost_;\n  // The current cost of the trust region minimizer as informed by the\n  // last call to StepAccepted.\n  double current_cost_;\n  double reference_cost_;\n  double candidate_cost_;\n  // Accumulated model cost since the last time the reference model\n  // cost was updated, i.e., when a step with cost less than the\n  // current known minimum cost is accepted.\n  double accumulated_reference_model_cost_change_;\n  // Accumulated model cost since the last time the candidate model\n  // cost was updated, i.e., a non-monotonic step was taken with a\n  // cost that was greater than the current candidate cost.\n  double accumulated_candidate_model_cost_change_;\n  // Number of steps taken since the last time minimum_cost was updated.\n  int num_consecutive_nonmonotonic_steps_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_TRUST_REGION_STEP_EVALUATOR_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/trust_region_strategy.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//         keir@google.com (Keir Mierle)\n\n#include \"ceres/trust_region_strategy.h\"\n#include \"ceres/dogleg_strategy.h\"\n#include \"ceres/levenberg_marquardt_strategy.h\"\n\nnamespace ceres {\nnamespace internal {\n\nTrustRegionStrategy::~TrustRegionStrategy() {}\n\nTrustRegionStrategy* TrustRegionStrategy::Create(const Options& options) {\n  switch (options.trust_region_strategy_type) {\n    case LEVENBERG_MARQUARDT:\n      return new LevenbergMarquardtStrategy(options);\n    case DOGLEG:\n      return new DoglegStrategy(options);\n    default:\n      LOG(FATAL) << \"Unknown trust region strategy: \"\n                 << options.trust_region_strategy_type;\n  }\n\n  LOG(FATAL) << \"Unknown trust region strategy: \"\n             << options.trust_region_strategy_type;\n  return NULL;\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/trust_region_strategy.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#ifndef CERES_INTERNAL_TRUST_REGION_STRATEGY_H_\n#define CERES_INTERNAL_TRUST_REGION_STRATEGY_H_\n\n#include <string>\n#include \"ceres/internal/port.h\"\n#include \"ceres/linear_solver.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass LinearSolver;\nclass SparseMatrix;\n\n// Interface for classes implementing various trust region strategies\n// for nonlinear least squares problems.\n//\n// The object is expected to maintain and update a trust region\n// radius, which it then uses to solve for the trust region step using\n// the jacobian matrix and residual vector.\n//\n// Here the term trust region radius is used loosely, as the strategy\n// is free to treat it as guidance and violate it as need be. e.g.,\n// the LevenbergMarquardtStrategy uses the inverse of the trust region\n// radius to scale the damping term, which controls the step size, but\n// does not set a hard limit on its size.\nclass TrustRegionStrategy {\n public:\n  struct Options {\n    TrustRegionStrategyType trust_region_strategy_type = LEVENBERG_MARQUARDT;\n    // Linear solver used for actually solving the trust region step.\n    LinearSolver* linear_solver = nullptr;\n    double initial_radius = 1e4;\n    double max_radius = 1e32;\n\n    // Minimum and maximum values of the diagonal damping matrix used\n    // by LevenbergMarquardtStrategy. The DoglegStrategy also uses\n    // these bounds to construct a regularizing diagonal to ensure\n    // that the Gauss-Newton step computation is of full rank.\n    double min_lm_diagonal = 1e-6;\n    double max_lm_diagonal = 1e32;\n\n    // Further specify which dogleg method to use\n    DoglegType dogleg_type = TRADITIONAL_DOGLEG;\n  };\n\n  // Factory.\n  static TrustRegionStrategy* Create(const Options& options);\n\n  virtual ~TrustRegionStrategy();\n\n  // Per solve options.\n  struct PerSolveOptions {\n    // Forcing sequence for inexact solves.\n    double eta = 1e-1;\n\n    DumpFormatType dump_format_type = TEXTFILE;\n\n    // If non-empty and dump_format_type is not CONSOLE, the trust\n    // regions strategy will write the linear system to file(s) with\n    // name starting with dump_filename_base.  If dump_format_type is\n    // CONSOLE then dump_filename_base will be ignored and the linear\n    // system will be written to the standard error.\n    std::string dump_filename_base;\n  };\n\n  struct Summary {\n    // If the trust region problem is,\n    //\n    //   1/2 x'Ax + b'x + c,\n    //\n    // then\n    //\n    //   residual_norm = |Ax -b|\n    double residual_norm = -1;\n\n    // Number of iterations used by the linear solver. If a linear\n    // solver was not called (e.g., DogLegStrategy after an\n    // unsuccessful step), then this would be zero.\n    int num_iterations = -1;\n\n    // Status of the linear solver used to solve the Newton system.\n    LinearSolverTerminationType termination_type = LINEAR_SOLVER_FAILURE;\n  };\n\n  // Use the current radius to solve for the trust region step.\n  virtual Summary ComputeStep(const PerSolveOptions& per_solve_options,\n                              SparseMatrix* jacobian,\n                              const double* residuals,\n                              double* step) = 0;\n\n  // Inform the strategy that the current step has been accepted, and\n  // that the ratio of the decrease in the non-linear objective to the\n  // decrease in the trust region model is step_quality.\n  virtual void StepAccepted(double step_quality) = 0;\n\n  // Inform the strategy that the current step has been rejected, and\n  // that the ratio of the decrease in the non-linear objective to the\n  // decrease in the trust region model is step_quality.\n  virtual void StepRejected(double step_quality) = 0;\n\n  // Inform the strategy that the current step has been rejected\n  // because it was found to be numerically invalid.\n  // StepRejected/StepAccepted will not be called for this step, and\n  // the strategy is free to do what it wants with this information.\n  virtual void StepIsInvalid() = 0;\n\n  // Current trust region radius.\n  virtual double Radius() const = 0;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_TRUST_REGION_STRATEGY_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/types.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include <algorithm>\n#include <cctype>\n#include <string>\n#include \"ceres/types.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\n\nusing std::string;\n\n#define CASESTR(x) case x: return #x\n#define STRENUM(x) if (value == #x) { *type = x; return true;}\n\nstatic void UpperCase(string* input) {\n  std::transform(input->begin(), input->end(), input->begin(), ::toupper);\n}\n\nconst char* LinearSolverTypeToString(LinearSolverType type) {\n  switch (type) {\n    CASESTR(DENSE_NORMAL_CHOLESKY);\n    CASESTR(DENSE_QR);\n    CASESTR(SPARSE_NORMAL_CHOLESKY);\n    CASESTR(DENSE_SCHUR);\n    CASESTR(SPARSE_SCHUR);\n    CASESTR(ITERATIVE_SCHUR);\n    CASESTR(CGNR);\n    default:\n      return \"UNKNOWN\";\n  }\n}\n\nbool StringToLinearSolverType(string value, LinearSolverType* type) {\n  UpperCase(&value);\n  STRENUM(DENSE_NORMAL_CHOLESKY);\n  STRENUM(DENSE_QR);\n  STRENUM(SPARSE_NORMAL_CHOLESKY);\n  STRENUM(DENSE_SCHUR);\n  STRENUM(SPARSE_SCHUR);\n  STRENUM(ITERATIVE_SCHUR);\n  STRENUM(CGNR);\n  return false;\n}\n\nconst char* PreconditionerTypeToString(PreconditionerType type) {\n  switch (type) {\n    CASESTR(IDENTITY);\n    CASESTR(JACOBI);\n    CASESTR(SCHUR_JACOBI);\n    CASESTR(CLUSTER_JACOBI);\n    CASESTR(CLUSTER_TRIDIAGONAL);\n    CASESTR(SUBSET);\n    default:\n      return \"UNKNOWN\";\n  }\n}\n\nbool StringToPreconditionerType(string value, PreconditionerType* type) {\n  UpperCase(&value);\n  STRENUM(IDENTITY);\n  STRENUM(JACOBI);\n  STRENUM(SCHUR_JACOBI);\n  STRENUM(CLUSTER_JACOBI);\n  STRENUM(CLUSTER_TRIDIAGONAL);\n  STRENUM(SUBSET);\n  return false;\n}\n\nconst char* SparseLinearAlgebraLibraryTypeToString(\n    SparseLinearAlgebraLibraryType type) {\n  switch (type) {\n    CASESTR(SUITE_SPARSE);\n    CASESTR(CX_SPARSE);\n    CASESTR(EIGEN_SPARSE);\n    CASESTR(ACCELERATE_SPARSE);\n    CASESTR(NO_SPARSE);\n    default:\n      return \"UNKNOWN\";\n  }\n}\n\nbool StringToSparseLinearAlgebraLibraryType(\n    string value,\n    SparseLinearAlgebraLibraryType* type) {\n  UpperCase(&value);\n  STRENUM(SUITE_SPARSE);\n  STRENUM(CX_SPARSE);\n  STRENUM(EIGEN_SPARSE);\n  STRENUM(ACCELERATE_SPARSE);\n  STRENUM(NO_SPARSE);\n  return false;\n}\n\nconst char* DenseLinearAlgebraLibraryTypeToString(\n    DenseLinearAlgebraLibraryType type) {\n  switch (type) {\n    CASESTR(EIGEN);\n    CASESTR(LAPACK);\n    default:\n      return \"UNKNOWN\";\n  }\n}\n\nbool StringToDenseLinearAlgebraLibraryType(\n    string value,\n    DenseLinearAlgebraLibraryType* type) {\n  UpperCase(&value);\n  STRENUM(EIGEN);\n  STRENUM(LAPACK);\n  return false;\n}\n\nconst char* TrustRegionStrategyTypeToString(TrustRegionStrategyType type) {\n  switch (type) {\n    CASESTR(LEVENBERG_MARQUARDT);\n    CASESTR(DOGLEG);\n    default:\n      return \"UNKNOWN\";\n  }\n}\n\nbool StringToTrustRegionStrategyType(string value,\n                                     TrustRegionStrategyType* type) {\n  UpperCase(&value);\n  STRENUM(LEVENBERG_MARQUARDT);\n  STRENUM(DOGLEG);\n  return false;\n}\n\nconst char* DoglegTypeToString(DoglegType type) {\n  switch (type) {\n    CASESTR(TRADITIONAL_DOGLEG);\n    CASESTR(SUBSPACE_DOGLEG);\n    default:\n      return \"UNKNOWN\";\n  }\n}\n\nbool StringToDoglegType(string value, DoglegType* type) {\n  UpperCase(&value);\n  STRENUM(TRADITIONAL_DOGLEG);\n  STRENUM(SUBSPACE_DOGLEG);\n  return false;\n}\n\nconst char* MinimizerTypeToString(MinimizerType type) {\n  switch (type) {\n    CASESTR(TRUST_REGION);\n    CASESTR(LINE_SEARCH);\n    default:\n      return \"UNKNOWN\";\n  }\n}\n\nbool StringToMinimizerType(string value, MinimizerType* type) {\n  UpperCase(&value);\n  STRENUM(TRUST_REGION);\n  STRENUM(LINE_SEARCH);\n  return false;\n}\n\nconst char* LineSearchDirectionTypeToString(LineSearchDirectionType type) {\n  switch (type) {\n    CASESTR(STEEPEST_DESCENT);\n    CASESTR(NONLINEAR_CONJUGATE_GRADIENT);\n    CASESTR(LBFGS);\n    CASESTR(BFGS);\n    default:\n      return \"UNKNOWN\";\n  }\n}\n\nbool StringToLineSearchDirectionType(string value,\n                                     LineSearchDirectionType* type) {\n  UpperCase(&value);\n  STRENUM(STEEPEST_DESCENT);\n  STRENUM(NONLINEAR_CONJUGATE_GRADIENT);\n  STRENUM(LBFGS);\n  STRENUM(BFGS);\n  return false;\n}\n\nconst char* LineSearchTypeToString(LineSearchType type) {\n  switch (type) {\n    CASESTR(ARMIJO);\n    CASESTR(WOLFE);\n    default:\n      return \"UNKNOWN\";\n  }\n}\n\nbool StringToLineSearchType(string value, LineSearchType* type) {\n  UpperCase(&value);\n  STRENUM(ARMIJO);\n  STRENUM(WOLFE);\n  return false;\n}\n\nconst char* LineSearchInterpolationTypeToString(\n    LineSearchInterpolationType type) {\n  switch (type) {\n    CASESTR(BISECTION);\n    CASESTR(QUADRATIC);\n    CASESTR(CUBIC);\n    default:\n      return \"UNKNOWN\";\n  }\n}\n\nbool StringToLineSearchInterpolationType(\n    string value,\n    LineSearchInterpolationType* type) {\n  UpperCase(&value);\n  STRENUM(BISECTION);\n  STRENUM(QUADRATIC);\n  STRENUM(CUBIC);\n  return false;\n}\n\nconst char* NonlinearConjugateGradientTypeToString(\n    NonlinearConjugateGradientType type) {\n  switch (type) {\n    CASESTR(FLETCHER_REEVES);\n    CASESTR(POLAK_RIBIERE);\n    CASESTR(HESTENES_STIEFEL);\n    default:\n      return \"UNKNOWN\";\n  }\n}\n\nbool StringToNonlinearConjugateGradientType(\n    string value,\n    NonlinearConjugateGradientType* type) {\n  UpperCase(&value);\n  STRENUM(FLETCHER_REEVES);\n  STRENUM(POLAK_RIBIERE);\n  STRENUM(HESTENES_STIEFEL);\n  return false;\n}\n\nconst char* CovarianceAlgorithmTypeToString(\n    CovarianceAlgorithmType type) {\n  switch (type) {\n    CASESTR(DENSE_SVD);\n    CASESTR(SPARSE_QR);\n    default:\n      return \"UNKNOWN\";\n  }\n}\n\nbool StringToCovarianceAlgorithmType(\n    string value,\n    CovarianceAlgorithmType* type) {\n  UpperCase(&value);\n  STRENUM(DENSE_SVD);\n  STRENUM(SPARSE_QR);\n  return false;\n}\n\nconst char* NumericDiffMethodTypeToString(\n    NumericDiffMethodType type) {\n  switch (type) {\n    CASESTR(CENTRAL);\n    CASESTR(FORWARD);\n    CASESTR(RIDDERS);\n    default:\n      return \"UNKNOWN\";\n  }\n}\n\nbool StringToNumericDiffMethodType(\n    string value,\n    NumericDiffMethodType* type) {\n  UpperCase(&value);\n  STRENUM(CENTRAL);\n  STRENUM(FORWARD);\n  STRENUM(RIDDERS);\n  return false;\n}\n\nconst char* VisibilityClusteringTypeToString(\n    VisibilityClusteringType type) {\n  switch (type) {\n    CASESTR(CANONICAL_VIEWS);\n    CASESTR(SINGLE_LINKAGE);\n    default:\n      return \"UNKNOWN\";\n  }\n}\n\nbool StringToVisibilityClusteringType(\n    string value,\n    VisibilityClusteringType* type) {\n  UpperCase(&value);\n  STRENUM(CANONICAL_VIEWS);\n  STRENUM(SINGLE_LINKAGE);\n  return false;\n}\n\nconst char* TerminationTypeToString(TerminationType type) {\n  switch (type) {\n    CASESTR(CONVERGENCE);\n    CASESTR(NO_CONVERGENCE);\n    CASESTR(FAILURE);\n    CASESTR(USER_SUCCESS);\n    CASESTR(USER_FAILURE);\n    default:\n      return \"UNKNOWN\";\n  }\n}\n\nconst char* LoggingTypeToString(LoggingType type) {\n  switch (type) {\n    CASESTR(SILENT);\n    CASESTR(PER_MINIMIZER_ITERATION);\n    default:\n      return \"UNKNOWN\";\n  }\n}\n\nbool StringtoLoggingType(std::string value, LoggingType* type) {\n  UpperCase(&value);\n  STRENUM(SILENT);\n  STRENUM(PER_MINIMIZER_ITERATION);\n  return false;\n}\n\n\nconst char* DumpFormatTypeToString(DumpFormatType type) {\n   switch (type) {\n    CASESTR(CONSOLE);\n    CASESTR(TEXTFILE);\n    default:\n      return \"UNKNOWN\";\n  }\n}\n\nbool StringtoDumpFormatType(std::string value, DumpFormatType* type) {\n  UpperCase(&value);\n  STRENUM(CONSOLE);\n  STRENUM(TEXTFILE);\n  return false;\n}\n\n#undef CASESTR\n#undef STRENUM\n\nbool IsSchurType(LinearSolverType type) {\n  return ((type == SPARSE_SCHUR) ||\n          (type == DENSE_SCHUR)  ||\n          (type == ITERATIVE_SCHUR));\n}\n\nbool IsSparseLinearAlgebraLibraryTypeAvailable(\n    SparseLinearAlgebraLibraryType type) {\n  if (type == SUITE_SPARSE) {\n#ifdef CERES_NO_SUITESPARSE\n    return false;\n#else\n    return true;\n#endif\n  }\n\n  if (type == CX_SPARSE) {\n#ifdef CERES_NO_CXSPARSE\n    return false;\n#else\n    return true;\n#endif\n  }\n\n  if (type == ACCELERATE_SPARSE) {\n#ifdef CERES_NO_ACCELERATE_SPARSE\n    return false;\n#else\n    return true;\n#endif\n  }\n\n  if (type == EIGEN_SPARSE) {\n#ifdef CERES_USE_EIGEN_SPARSE\n    return true;\n#else\n    return false;\n#endif\n  }\n\n  LOG(WARNING) << \"Unknown sparse linear algebra library \" << type;\n  return false;\n}\n\nbool IsDenseLinearAlgebraLibraryTypeAvailable(\n    DenseLinearAlgebraLibraryType type) {\n  if (type == EIGEN) {\n    return true;\n  }\n  if (type == LAPACK) {\n#ifdef CERES_NO_LAPACK\n    return false;\n#else\n    return true;\n#endif\n  }\n\n  LOG(WARNING) << \"Unknown dense linear algebra library \" << type;\n  return false;\n}\n\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/visibility.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: kushalav@google.com (Avanish Kushal)\n\n#include \"ceres/visibility.h\"\n\n#include <cmath>\n#include <ctime>\n#include <algorithm>\n#include <set>\n#include <vector>\n#include <unordered_map>\n#include <utility>\n#include \"ceres/block_structure.h\"\n#include \"ceres/graph.h\"\n#include \"ceres/pair_hash.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::make_pair;\nusing std::max;\nusing std::pair;\nusing std::set;\nusing std::vector;\n\nvoid ComputeVisibility(const CompressedRowBlockStructure& block_structure,\n                       const int num_eliminate_blocks,\n                       vector<set<int>>* visibility) {\n  CHECK(visibility != nullptr);\n\n  // Clear the visibility vector and resize it to hold a\n  // vector for each camera.\n  visibility->resize(0);\n  visibility->resize(block_structure.cols.size() - num_eliminate_blocks);\n\n  for (int i = 0; i < block_structure.rows.size(); ++i) {\n    const vector<Cell>& cells = block_structure.rows[i].cells;\n    int block_id = cells[0].block_id;\n    // If the first block is not an e_block, then skip this row block.\n    if (block_id >= num_eliminate_blocks) {\n      continue;\n    }\n\n    for (int j = 1; j < cells.size(); ++j) {\n      int camera_block_id = cells[j].block_id - num_eliminate_blocks;\n      DCHECK_GE(camera_block_id, 0);\n      DCHECK_LT(camera_block_id, visibility->size());\n      (*visibility)[camera_block_id].insert(block_id);\n    }\n  }\n}\n\nWeightedGraph<int>* CreateSchurComplementGraph(\n    const vector<set<int>>& visibility) {\n  const time_t start_time = time(NULL);\n  // Compute the number of e_blocks/point blocks. Since the visibility\n  // set for each e_block/camera contains the set of e_blocks/points\n  // visible to it, we find the maximum across all visibility sets.\n  int num_points = 0;\n  for (int i = 0; i < visibility.size(); i++) {\n    if (visibility[i].size() > 0) {\n      num_points = max(num_points, (*visibility[i].rbegin()) + 1);\n    }\n  }\n\n  // Invert the visibility. The input is a camera->point mapping,\n  // which tells us which points are visible in which\n  // cameras. However, to compute the sparsity structure of the Schur\n  // Complement efficiently, its better to have the point->camera\n  // mapping.\n  vector<set<int>> inverse_visibility(num_points);\n  for (int i = 0; i < visibility.size(); i++) {\n    const set<int>& visibility_set = visibility[i];\n    for (const int v : visibility_set) {\n      inverse_visibility[v].insert(i);\n    }\n  }\n\n  // Map from camera pairs to number of points visible to both cameras\n  // in the pair.\n  std::unordered_map<pair<int, int>, int, pair_hash> camera_pairs;\n\n  // Count the number of points visible to each camera/f_block pair.\n  for (const auto& inverse_visibility_set : inverse_visibility) {\n    for (set<int>::const_iterator camera1 = inverse_visibility_set.begin();\n         camera1 != inverse_visibility_set.end();\n         ++camera1) {\n      set<int>::const_iterator camera2 = camera1;\n      for (++camera2; camera2 != inverse_visibility_set.end(); ++camera2) {\n        ++(camera_pairs[make_pair(*camera1, *camera2)]);\n      }\n    }\n  }\n\n  WeightedGraph<int>* graph = new WeightedGraph<int>;\n\n  // Add vertices and initialize the pairs for self edges so that self\n  // edges are guaranteed. This is needed for the Canonical views\n  // algorithm to work correctly.\n  static constexpr double kSelfEdgeWeight = 1.0;\n  for (int i = 0; i < visibility.size(); ++i) {\n    graph->AddVertex(i);\n    graph->AddEdge(i, i, kSelfEdgeWeight);\n  }\n\n  // Add an edge for each camera pair.\n  for (const auto& camera_pair_count : camera_pairs) {\n    const int camera1 = camera_pair_count.first.first;\n    const int camera2 = camera_pair_count.first.second;\n    const int count = camera_pair_count.second;\n    DCHECK_NE(camera1, camera2);\n    // Static cast necessary for Windows.\n    const double weight = static_cast<double>(count) /\n        (sqrt(static_cast<double>(\n                  visibility[camera1].size() * visibility[camera2].size())));\n    graph->AddEdge(camera1, camera2, weight);\n  }\n\n  VLOG(2) << \"Schur complement graph time: \" << (time(NULL) - start_time);\n  return graph;\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/visibility.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: kushalav@google.com (Avanish Kushal)\n//         sameeragarwal@google.com (Sameer Agarwal)\n//\n// Functions to manipulate visibility information from the block\n// structure of sparse matrices.\n\n#ifndef CERES_INTERNAL_VISIBILITY_H_\n#define CERES_INTERNAL_VISIBILITY_H_\n\n#include <set>\n#include <vector>\n#include \"ceres/graph.h\"\n\nnamespace ceres {\nnamespace internal {\n\nstruct CompressedRowBlockStructure;\n\n// Given a compressed row block structure, computes the set of\n// e_blocks \"visible\" to each f_block. If an e_block co-occurs with an\n// f_block in a residual block, it is visible to the f_block. The\n// first num_eliminate_blocks columns blocks are e_blocks and the rest\n// f_blocks.\n//\n// In a structure from motion problem, e_blocks correspond to 3D\n// points and f_blocks correspond to cameras.\nvoid ComputeVisibility(const CompressedRowBlockStructure& block_structure,\n                       int num_eliminate_blocks,\n                       std::vector<std::set<int>>* visibility);\n\n// Given f_block visibility as computed by the ComputeVisibility\n// function above, construct and return a graph whose vertices are\n// f_blocks and an edge connects two vertices if they have at least one\n// e_block in common. The weight of this edge is normalized dot\n// product between the visibility vectors of the two\n// vertices/f_blocks.\n//\n// This graph reflects the sparsity structure of reduced camera\n// matrix/Schur complement matrix obtained by eliminating the e_blocks\n// from the normal equations.\n//\n// Caller acquires ownership of the returned WeightedGraph pointer\n// (heap-allocated).\nWeightedGraph<int>* CreateSchurComplementGraph(\n    const std::vector<std::set<int>>& visibility);\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_VISIBILITY_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/visibility_based_preconditioner.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/visibility_based_preconditioner.h\"\n\n#include <algorithm>\n#include <functional>\n#include <iterator>\n#include <memory>\n#include <set>\n#include <utility>\n#include <vector>\n\n#include \"Eigen/Dense\"\n#include \"ceres/block_random_access_sparse_matrix.h\"\n#include \"ceres/block_sparse_matrix.h\"\n#include \"ceres/canonical_views_clustering.h\"\n#include \"ceres/graph.h\"\n#include \"ceres/graph_algorithms.h\"\n#include \"ceres/linear_solver.h\"\n#include \"ceres/schur_eliminator.h\"\n#include \"ceres/single_linkage_clustering.h\"\n#include \"ceres/visibility.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::make_pair;\nusing std::pair;\nusing std::set;\nusing std::swap;\nusing std::vector;\n\n// TODO(sameeragarwal): Currently these are magic weights for the\n// preconditioner construction. Move these higher up into the Options\n// struct and provide some guidelines for choosing them.\n//\n// This will require some more work on the clustering algorithm and\n// possibly some more refactoring of the code.\nstatic constexpr double kCanonicalViewsSizePenaltyWeight = 3.0;\nstatic constexpr double kCanonicalViewsSimilarityPenaltyWeight = 0.0;\nstatic constexpr double kSingleLinkageMinSimilarity = 0.9;\n\nVisibilityBasedPreconditioner::VisibilityBasedPreconditioner(\n    const CompressedRowBlockStructure& bs,\n    const Preconditioner::Options& options)\n    : options_(options), num_blocks_(0), num_clusters_(0) {\n  CHECK_GT(options_.elimination_groups.size(), 1);\n  CHECK_GT(options_.elimination_groups[0], 0);\n  CHECK(options_.type == CLUSTER_JACOBI || options_.type == CLUSTER_TRIDIAGONAL)\n      << \"Unknown preconditioner type: \" << options_.type;\n  num_blocks_ = bs.cols.size() - options_.elimination_groups[0];\n  CHECK_GT(num_blocks_, 0) << \"Jacobian should have at least 1 f_block for \"\n                           << \"visibility based preconditioning.\";\n  CHECK(options_.context != NULL);\n\n  // Vector of camera block sizes\n  block_size_.resize(num_blocks_);\n  for (int i = 0; i < num_blocks_; ++i) {\n    block_size_[i] = bs.cols[i + options_.elimination_groups[0]].size;\n  }\n\n  const time_t start_time = time(NULL);\n  switch (options_.type) {\n    case CLUSTER_JACOBI:\n      ComputeClusterJacobiSparsity(bs);\n      break;\n    case CLUSTER_TRIDIAGONAL:\n      ComputeClusterTridiagonalSparsity(bs);\n      break;\n    default:\n      LOG(FATAL) << \"Unknown preconditioner type\";\n  }\n  const time_t structure_time = time(NULL);\n  InitStorage(bs);\n  const time_t storage_time = time(NULL);\n  InitEliminator(bs);\n  const time_t eliminator_time = time(NULL);\n\n  LinearSolver::Options sparse_cholesky_options;\n  sparse_cholesky_options.sparse_linear_algebra_library_type =\n      options_.sparse_linear_algebra_library_type;\n\n  // The preconditioner's sparsity is not available in the\n  // preprocessor, so the columns of the Jacobian have not been\n  // reordered to minimize fill in when computing its sparse Cholesky\n  // factorization. So we must tell the SparseCholesky object to\n  // perform approximate minimum-degree reordering, which is done by\n  // setting use_postordering to true.\n  sparse_cholesky_options.use_postordering = true;\n  sparse_cholesky_ = SparseCholesky::Create(sparse_cholesky_options);\n\n  const time_t init_time = time(NULL);\n  VLOG(2) << \"init time: \" << init_time - start_time\n          << \" structure time: \" << structure_time - start_time\n          << \" storage time:\" << storage_time - structure_time\n          << \" eliminator time: \" << eliminator_time - storage_time;\n}\n\nVisibilityBasedPreconditioner::~VisibilityBasedPreconditioner() {}\n\n// Determine the sparsity structure of the CLUSTER_JACOBI\n// preconditioner. It clusters cameras using their scene\n// visibility. The clusters form the diagonal blocks of the\n// preconditioner matrix.\nvoid VisibilityBasedPreconditioner::ComputeClusterJacobiSparsity(\n    const CompressedRowBlockStructure& bs) {\n  vector<set<int>> visibility;\n  ComputeVisibility(bs, options_.elimination_groups[0], &visibility);\n  CHECK_EQ(num_blocks_, visibility.size());\n  ClusterCameras(visibility);\n  cluster_pairs_.clear();\n  for (int i = 0; i < num_clusters_; ++i) {\n    cluster_pairs_.insert(make_pair(i, i));\n  }\n}\n\n// Determine the sparsity structure of the CLUSTER_TRIDIAGONAL\n// preconditioner. It clusters cameras using using the scene\n// visibility and then finds the strongly interacting pairs of\n// clusters by constructing another graph with the clusters as\n// vertices and approximating it with a degree-2 maximum spanning\n// forest. The set of edges in this forest are the cluster pairs.\nvoid VisibilityBasedPreconditioner::ComputeClusterTridiagonalSparsity(\n    const CompressedRowBlockStructure& bs) {\n  vector<set<int>> visibility;\n  ComputeVisibility(bs, options_.elimination_groups[0], &visibility);\n  CHECK_EQ(num_blocks_, visibility.size());\n  ClusterCameras(visibility);\n\n  // Construct a weighted graph on the set of clusters, where the\n  // edges are the number of 3D points/e_blocks visible in both the\n  // clusters at the ends of the edge. Return an approximate degree-2\n  // maximum spanning forest of this graph.\n  vector<set<int>> cluster_visibility;\n  ComputeClusterVisibility(visibility, &cluster_visibility);\n  std::unique_ptr<WeightedGraph<int>> cluster_graph(\n      CreateClusterGraph(cluster_visibility));\n  CHECK(cluster_graph != nullptr);\n  std::unique_ptr<WeightedGraph<int>> forest(\n      Degree2MaximumSpanningForest(*cluster_graph));\n  CHECK(forest != nullptr);\n  ForestToClusterPairs(*forest, &cluster_pairs_);\n}\n\n// Allocate storage for the preconditioner matrix.\nvoid VisibilityBasedPreconditioner::InitStorage(\n    const CompressedRowBlockStructure& bs) {\n  ComputeBlockPairsInPreconditioner(bs);\n  m_.reset(new BlockRandomAccessSparseMatrix(block_size_, block_pairs_));\n}\n\n// Call the canonical views algorithm and cluster the cameras based on\n// their visibility sets. The visibility set of a camera is the set of\n// e_blocks/3D points in the scene that are seen by it.\n//\n// The cluster_membership_ vector is updated to indicate cluster\n// memberships for each camera block.\nvoid VisibilityBasedPreconditioner::ClusterCameras(\n    const vector<set<int>>& visibility) {\n  std::unique_ptr<WeightedGraph<int>> schur_complement_graph(\n      CreateSchurComplementGraph(visibility));\n  CHECK(schur_complement_graph != nullptr);\n\n  std::unordered_map<int, int> membership;\n\n  if (options_.visibility_clustering_type == CANONICAL_VIEWS) {\n    vector<int> centers;\n    CanonicalViewsClusteringOptions clustering_options;\n    clustering_options.size_penalty_weight = kCanonicalViewsSizePenaltyWeight;\n    clustering_options.similarity_penalty_weight =\n        kCanonicalViewsSimilarityPenaltyWeight;\n    ComputeCanonicalViewsClustering(\n        clustering_options, *schur_complement_graph, &centers, &membership);\n    num_clusters_ = centers.size();\n  } else if (options_.visibility_clustering_type == SINGLE_LINKAGE) {\n    SingleLinkageClusteringOptions clustering_options;\n    clustering_options.min_similarity = kSingleLinkageMinSimilarity;\n    num_clusters_ = ComputeSingleLinkageClustering(\n        clustering_options, *schur_complement_graph, &membership);\n  } else {\n    LOG(FATAL) << \"Unknown visibility clustering algorithm.\";\n  }\n\n  CHECK_GT(num_clusters_, 0);\n  VLOG(2) << \"num_clusters: \" << num_clusters_;\n  FlattenMembershipMap(membership, &cluster_membership_);\n}\n\n// Compute the block sparsity structure of the Schur complement\n// matrix. For each pair of cameras contributing a non-zero cell to\n// the schur complement, determine if that cell is present in the\n// preconditioner or not.\n//\n// A pair of cameras contribute a cell to the preconditioner if they\n// are part of the same cluster or if the two clusters that they\n// belong have an edge connecting them in the degree-2 maximum\n// spanning forest.\n//\n// For example, a camera pair (i,j) where i belongs to cluster1 and\n// j belongs to cluster2 (assume that cluster1 < cluster2).\n//\n// The cell corresponding to (i,j) is present in the preconditioner\n// if cluster1 == cluster2 or the pair (cluster1, cluster2) were\n// connected by an edge in the degree-2 maximum spanning forest.\n//\n// Since we have already expanded the forest into a set of camera\n// pairs/edges, including self edges, the check can be reduced to\n// checking membership of (cluster1, cluster2) in cluster_pairs_.\nvoid VisibilityBasedPreconditioner::ComputeBlockPairsInPreconditioner(\n    const CompressedRowBlockStructure& bs) {\n  block_pairs_.clear();\n  for (int i = 0; i < num_blocks_; ++i) {\n    block_pairs_.insert(make_pair(i, i));\n  }\n\n  int r = 0;\n  const int num_row_blocks = bs.rows.size();\n  const int num_eliminate_blocks = options_.elimination_groups[0];\n\n  // Iterate over each row of the matrix. The block structure of the\n  // matrix is assumed to be sorted in order of the e_blocks/point\n  // blocks. Thus all row blocks containing an e_block/point occur\n  // contiguously. Further, if present, an e_block is always the first\n  // parameter block in each row block.  These structural assumptions\n  // are common to all Schur complement based solvers in Ceres.\n  //\n  // For each e_block/point block we identify the set of cameras\n  // seeing it. The cross product of this set with itself is the set\n  // of non-zero cells contributed by this e_block.\n  //\n  // The time complexity of this is O(nm^2) where, n is the number of\n  // 3d points and m is the maximum number of cameras seeing any\n  // point, which for most scenes is a fairly small number.\n  while (r < num_row_blocks) {\n    int e_block_id = bs.rows[r].cells.front().block_id;\n    if (e_block_id >= num_eliminate_blocks) {\n      // Skip the rows whose first block is an f_block.\n      break;\n    }\n\n    set<int> f_blocks;\n    for (; r < num_row_blocks; ++r) {\n      const CompressedRow& row = bs.rows[r];\n      if (row.cells.front().block_id != e_block_id) {\n        break;\n      }\n\n      // Iterate over the blocks in the row, ignoring the first block\n      // since it is the one to be eliminated and adding the rest to\n      // the list of f_blocks associated with this e_block.\n      for (int c = 1; c < row.cells.size(); ++c) {\n        const Cell& cell = row.cells[c];\n        const int f_block_id = cell.block_id - num_eliminate_blocks;\n        CHECK_GE(f_block_id, 0);\n        f_blocks.insert(f_block_id);\n      }\n    }\n\n    for (set<int>::const_iterator block1 = f_blocks.begin();\n         block1 != f_blocks.end();\n         ++block1) {\n      set<int>::const_iterator block2 = block1;\n      ++block2;\n      for (; block2 != f_blocks.end(); ++block2) {\n        if (IsBlockPairInPreconditioner(*block1, *block2)) {\n          block_pairs_.insert(make_pair(*block1, *block2));\n        }\n      }\n    }\n  }\n\n  // The remaining rows which do not contain any e_blocks.\n  for (; r < num_row_blocks; ++r) {\n    const CompressedRow& row = bs.rows[r];\n    CHECK_GE(row.cells.front().block_id, num_eliminate_blocks);\n    for (int i = 0; i < row.cells.size(); ++i) {\n      const int block1 = row.cells[i].block_id - num_eliminate_blocks;\n      for (int j = 0; j < row.cells.size(); ++j) {\n        const int block2 = row.cells[j].block_id - num_eliminate_blocks;\n        if (block1 <= block2) {\n          if (IsBlockPairInPreconditioner(block1, block2)) {\n            block_pairs_.insert(make_pair(block1, block2));\n          }\n        }\n      }\n    }\n  }\n\n  VLOG(1) << \"Block pair stats: \" << block_pairs_.size();\n}\n\n// Initialize the SchurEliminator.\nvoid VisibilityBasedPreconditioner::InitEliminator(\n    const CompressedRowBlockStructure& bs) {\n  LinearSolver::Options eliminator_options;\n  eliminator_options.elimination_groups = options_.elimination_groups;\n  eliminator_options.num_threads = options_.num_threads;\n  eliminator_options.e_block_size = options_.e_block_size;\n  eliminator_options.f_block_size = options_.f_block_size;\n  eliminator_options.row_block_size = options_.row_block_size;\n  eliminator_options.context = options_.context;\n  eliminator_.reset(SchurEliminatorBase::Create(eliminator_options));\n  const bool kFullRankETE = true;\n  eliminator_->Init(\n      eliminator_options.elimination_groups[0], kFullRankETE, &bs);\n}\n\n// Update the values of the preconditioner matrix and factorize it.\nbool VisibilityBasedPreconditioner::UpdateImpl(const BlockSparseMatrix& A,\n                                               const double* D) {\n  const time_t start_time = time(NULL);\n  const int num_rows = m_->num_rows();\n  CHECK_GT(num_rows, 0);\n\n  // Compute a subset of the entries of the Schur complement.\n  eliminator_->Eliminate(\n      BlockSparseMatrixData(A), nullptr, D, m_.get(), nullptr);\n\n  // Try factorizing the matrix. For CLUSTER_JACOBI, this should\n  // always succeed modulo some numerical/conditioning problems. For\n  // CLUSTER_TRIDIAGONAL, in general the preconditioner matrix as\n  // constructed is not positive definite. However, we will go ahead\n  // and try factorizing it. If it works, great, otherwise we scale\n  // all the cells in the preconditioner corresponding to the edges in\n  // the degree-2 forest and that guarantees positive\n  // definiteness. The proof of this fact can be found in Lemma 1 in\n  // \"Visibility Based Preconditioning for Bundle Adjustment\".\n  //\n  // Doing the factorization like this saves us matrix mass when\n  // scaling is not needed, which is quite often in our experience.\n  LinearSolverTerminationType status = Factorize();\n\n  if (status == LINEAR_SOLVER_FATAL_ERROR) {\n    return false;\n  }\n\n  // The scaling only affects the tri-diagonal case, since\n  // ScaleOffDiagonalBlocks only pays attention to the cells that\n  // belong to the edges of the degree-2 forest. In the CLUSTER_JACOBI\n  // case, the preconditioner is guaranteed to be positive\n  // semidefinite.\n  if (status == LINEAR_SOLVER_FAILURE && options_.type == CLUSTER_TRIDIAGONAL) {\n    VLOG(1) << \"Unscaled factorization failed. Retrying with off-diagonal \"\n            << \"scaling\";\n    ScaleOffDiagonalCells();\n    status = Factorize();\n  }\n\n  VLOG(2) << \"Compute time: \" << time(NULL) - start_time;\n  return (status == LINEAR_SOLVER_SUCCESS);\n}\n\n// Consider the preconditioner matrix as meta-block matrix, whose\n// blocks correspond to the clusters. Then cluster pairs corresponding\n// to edges in the degree-2 forest are off diagonal entries of this\n// matrix. Scaling these off-diagonal entries by 1/2 forces this\n// matrix to be positive definite.\nvoid VisibilityBasedPreconditioner::ScaleOffDiagonalCells() {\n  for (const auto& block_pair : block_pairs_) {\n    const int block1 = block_pair.first;\n    const int block2 = block_pair.second;\n    if (!IsBlockPairOffDiagonal(block1, block2)) {\n      continue;\n    }\n\n    int r, c, row_stride, col_stride;\n    CellInfo* cell_info =\n        m_->GetCell(block1, block2, &r, &c, &row_stride, &col_stride);\n    CHECK(cell_info != NULL)\n        << \"Cell missing for block pair (\" << block1 << \",\" << block2 << \")\"\n        << \" cluster pair (\" << cluster_membership_[block1] << \" \"\n        << cluster_membership_[block2] << \")\";\n\n    // Ah the magic of tri-diagonal matrices and diagonal\n    // dominance. See Lemma 1 in \"Visibility Based Preconditioning\n    // For Bundle Adjustment\".\n    MatrixRef m(cell_info->values, row_stride, col_stride);\n    m.block(r, c, block_size_[block1], block_size_[block2]) *= 0.5;\n  }\n}\n\n// Compute the sparse Cholesky factorization of the preconditioner\n// matrix.\nLinearSolverTerminationType VisibilityBasedPreconditioner::Factorize() {\n  // Extract the TripletSparseMatrix that is used for actually storing\n  // S and convert it into a CompressedRowSparseMatrix.\n  const TripletSparseMatrix* tsm =\n      down_cast<BlockRandomAccessSparseMatrix*>(m_.get())->mutable_matrix();\n\n  std::unique_ptr<CompressedRowSparseMatrix> lhs;\n  const CompressedRowSparseMatrix::StorageType storage_type =\n      sparse_cholesky_->StorageType();\n  if (storage_type == CompressedRowSparseMatrix::UPPER_TRIANGULAR) {\n    lhs.reset(CompressedRowSparseMatrix::FromTripletSparseMatrix(*tsm));\n    lhs->set_storage_type(CompressedRowSparseMatrix::UPPER_TRIANGULAR);\n  } else {\n    lhs.reset(\n        CompressedRowSparseMatrix::FromTripletSparseMatrixTransposed(*tsm));\n    lhs->set_storage_type(CompressedRowSparseMatrix::LOWER_TRIANGULAR);\n  }\n\n  std::string message;\n  return sparse_cholesky_->Factorize(lhs.get(), &message);\n}\n\nvoid VisibilityBasedPreconditioner::RightMultiply(const double* x,\n                                                  double* y) const {\n  CHECK(x != nullptr);\n  CHECK(y != nullptr);\n  CHECK(sparse_cholesky_ != nullptr);\n  std::string message;\n  sparse_cholesky_->Solve(x, y, &message);\n}\n\nint VisibilityBasedPreconditioner::num_rows() const { return m_->num_rows(); }\n\n// Classify camera/f_block pairs as in and out of the preconditioner,\n// based on whether the cluster pair that they belong to is in the\n// preconditioner or not.\nbool VisibilityBasedPreconditioner::IsBlockPairInPreconditioner(\n    const int block1, const int block2) const {\n  int cluster1 = cluster_membership_[block1];\n  int cluster2 = cluster_membership_[block2];\n  if (cluster1 > cluster2) {\n    swap(cluster1, cluster2);\n  }\n  return (cluster_pairs_.count(make_pair(cluster1, cluster2)) > 0);\n}\n\nbool VisibilityBasedPreconditioner::IsBlockPairOffDiagonal(\n    const int block1, const int block2) const {\n  return (cluster_membership_[block1] != cluster_membership_[block2]);\n}\n\n// Convert a graph into a list of edges that includes self edges for\n// each vertex.\nvoid VisibilityBasedPreconditioner::ForestToClusterPairs(\n    const WeightedGraph<int>& forest,\n    std::unordered_set<pair<int, int>, pair_hash>* cluster_pairs) const {\n  CHECK(cluster_pairs != nullptr);\n  cluster_pairs->clear();\n  const std::unordered_set<int>& vertices = forest.vertices();\n  CHECK_EQ(vertices.size(), num_clusters_);\n\n  // Add all the cluster pairs corresponding to the edges in the\n  // forest.\n  for (const int cluster1 : vertices) {\n    cluster_pairs->insert(make_pair(cluster1, cluster1));\n    const std::unordered_set<int>& neighbors = forest.Neighbors(cluster1);\n    for (const int cluster2 : neighbors) {\n      if (cluster1 < cluster2) {\n        cluster_pairs->insert(make_pair(cluster1, cluster2));\n      }\n    }\n  }\n}\n\n// The visibility set of a cluster is the union of the visibility sets\n// of all its cameras. In other words, the set of points visible to\n// any camera in the cluster.\nvoid VisibilityBasedPreconditioner::ComputeClusterVisibility(\n    const vector<set<int>>& visibility,\n    vector<set<int>>* cluster_visibility) const {\n  CHECK(cluster_visibility != nullptr);\n  cluster_visibility->resize(0);\n  cluster_visibility->resize(num_clusters_);\n  for (int i = 0; i < num_blocks_; ++i) {\n    const int cluster_id = cluster_membership_[i];\n    (*cluster_visibility)[cluster_id].insert(visibility[i].begin(),\n                                             visibility[i].end());\n  }\n}\n\n// Construct a graph whose vertices are the clusters, and the edge\n// weights are the number of 3D points visible to cameras in both the\n// vertices.\nWeightedGraph<int>* VisibilityBasedPreconditioner::CreateClusterGraph(\n    const vector<set<int>>& cluster_visibility) const {\n  WeightedGraph<int>* cluster_graph = new WeightedGraph<int>;\n\n  for (int i = 0; i < num_clusters_; ++i) {\n    cluster_graph->AddVertex(i);\n  }\n\n  for (int i = 0; i < num_clusters_; ++i) {\n    const set<int>& cluster_i = cluster_visibility[i];\n    for (int j = i + 1; j < num_clusters_; ++j) {\n      vector<int> intersection;\n      const set<int>& cluster_j = cluster_visibility[j];\n      set_intersection(cluster_i.begin(),\n                       cluster_i.end(),\n                       cluster_j.begin(),\n                       cluster_j.end(),\n                       back_inserter(intersection));\n\n      if (intersection.size() > 0) {\n        // Clusters interact strongly when they share a large number\n        // of 3D points. The degree-2 maximum spanning forest\n        // algorithm, iterates on the edges in decreasing order of\n        // their weight, which is the number of points shared by the\n        // two cameras that it connects.\n        cluster_graph->AddEdge(i, j, intersection.size());\n      }\n    }\n  }\n  return cluster_graph;\n}\n\n// Canonical views clustering returns a std::unordered_map from vertices to\n// cluster ids. Convert this into a flat array for quick lookup. It is\n// possible that some of the vertices may not be associated with any\n// cluster. In that case, randomly assign them to one of the clusters.\n//\n// The cluster ids can be non-contiguous integers. So as we flatten\n// the membership_map, we also map the cluster ids to a contiguous set\n// of integers so that the cluster ids are in [0, num_clusters_).\nvoid VisibilityBasedPreconditioner::FlattenMembershipMap(\n    const std::unordered_map<int, int>& membership_map,\n    vector<int>* membership_vector) const {\n  CHECK(membership_vector != nullptr);\n  membership_vector->resize(0);\n  membership_vector->resize(num_blocks_, -1);\n\n  std::unordered_map<int, int> cluster_id_to_index;\n  // Iterate over the cluster membership map and update the\n  // cluster_membership_ vector assigning arbitrary cluster ids to\n  // the few cameras that have not been clustered.\n  for (const auto& m : membership_map) {\n    const int camera_id = m.first;\n    int cluster_id = m.second;\n\n    // If the view was not clustered, randomly assign it to one of the\n    // clusters. This preserves the mathematical correctness of the\n    // preconditioner. If there are too many views which are not\n    // clustered, it may lead to some quality degradation though.\n    //\n    // TODO(sameeragarwal): Check if a large number of views have not\n    // been clustered and deal with it?\n    if (cluster_id == -1) {\n      cluster_id = camera_id % num_clusters_;\n    }\n\n    const int index = FindWithDefault(\n        cluster_id_to_index, cluster_id, cluster_id_to_index.size());\n\n    if (index == cluster_id_to_index.size()) {\n      cluster_id_to_index[cluster_id] = index;\n    }\n\n    CHECK_LT(index, num_clusters_);\n    membership_vector->at(camera_id) = index;\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/visibility_based_preconditioner.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2017 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n//\n// Preconditioners for linear systems that arise in Structure from\n// Motion problems. VisibilityBasedPreconditioner implements:\n//\n//  CLUSTER_JACOBI\n//  CLUSTER_TRIDIAGONAL\n//\n// Detailed descriptions of these preconditions beyond what is\n// documented here can be found in\n//\n// Visibility Based Preconditioning for Bundle Adjustment\n// A. Kushal & S. Agarwal, CVPR 2012.\n//\n// http://www.cs.washington.edu/homes/sagarwal/vbp.pdf\n//\n// The two preconditioners share enough code that its most efficient\n// to implement them as part of the same code base.\n\n#ifndef CERES_INTERNAL_VISIBILITY_BASED_PRECONDITIONER_H_\n#define CERES_INTERNAL_VISIBILITY_BASED_PRECONDITIONER_H_\n\n#include <memory>\n#include <set>\n#include <unordered_map>\n#include <unordered_set>\n#include <utility>\n#include <vector>\n\n#include \"ceres/graph.h\"\n#include \"ceres/linear_solver.h\"\n#include \"ceres/pair_hash.h\"\n#include \"ceres/preconditioner.h\"\n#include \"ceres/sparse_cholesky.h\"\n\nnamespace ceres {\nnamespace internal {\n\nclass BlockRandomAccessSparseMatrix;\nclass BlockSparseMatrix;\nstruct CompressedRowBlockStructure;\nclass SchurEliminatorBase;\n\n// This class implements visibility based preconditioners for\n// Structure from Motion/Bundle Adjustment problems. The name\n// VisibilityBasedPreconditioner comes from the fact that the sparsity\n// structure of the preconditioner matrix is determined by analyzing\n// the visibility structure of the scene, i.e. which cameras see which\n// points.\n//\n// The key idea of visibility based preconditioning is to identify\n// cameras that we expect have strong interactions, and then using the\n// entries in the Schur complement matrix corresponding to these\n// camera pairs as an approximation to the full Schur complement.\n//\n// CLUSTER_JACOBI identifies these camera pairs by clustering cameras,\n// and considering all non-zero camera pairs within each cluster. The\n// clustering in the current implementation is done using the\n// Canonical Views algorithm of Simon et al. (see\n// canonical_views_clustering.h). For the purposes of clustering, the\n// similarity or the degree of interaction between a pair of cameras\n// is measured by counting the number of points visible in both the\n// cameras. Thus the name VisibilityBasedPreconditioner. Further, if we\n// were to permute the parameter blocks such that all the cameras in\n// the same cluster occur contiguously, the preconditioner matrix will\n// be a block diagonal matrix with blocks corresponding to the\n// clusters. Thus in analogy with the Jacobi preconditioner we refer\n// to this as the CLUSTER_JACOBI preconditioner.\n//\n// CLUSTER_TRIDIAGONAL adds more mass to the CLUSTER_JACOBI\n// preconditioner by considering the interaction between clusters and\n// identifying strong interactions between cluster pairs. This is done\n// by constructing a weighted graph on the clusters, with the weight\n// on the edges connecting two clusters proportional to the number of\n// 3D points visible to cameras in both the clusters. A degree-2\n// maximum spanning forest is identified in this graph and the camera\n// pairs contained in the edges of this forest are added to the\n// preconditioner. The detailed reasoning for this construction is\n// explained in the paper mentioned above.\n//\n// Degree-2 spanning trees and forests have the property that they\n// correspond to tri-diagonal matrices. Thus there exist a permutation\n// of the camera blocks under which the CLUSTER_TRIDIAGONAL\n// preconditioner matrix is a block tridiagonal matrix, and thus the\n// name for the preconditioner.\n//\n// Thread Safety: This class is NOT thread safe.\n//\n// Example usage:\n//\n//   LinearSolver::Options options;\n//   options.preconditioner_type = CLUSTER_JACOBI;\n//   options.elimination_groups.push_back(num_points);\n//   options.elimination_groups.push_back(num_cameras);\n//   VisibilityBasedPreconditioner preconditioner(\n//      *A.block_structure(), options);\n//   preconditioner.Update(A, NULL);\n//   preconditioner.RightMultiply(x, y);\nclass VisibilityBasedPreconditioner : public BlockSparseMatrixPreconditioner {\n public:\n  // Initialize the symbolic structure of the preconditioner. bs is\n  // the block structure of the linear system to be solved. It is used\n  // to determine the sparsity structure of the preconditioner matrix.\n  //\n  // It has the same structural requirement as other Schur complement\n  // based solvers. Please see schur_eliminator.h for more details.\n  VisibilityBasedPreconditioner(const CompressedRowBlockStructure& bs,\n                                const Preconditioner::Options& options);\n  VisibilityBasedPreconditioner(const VisibilityBasedPreconditioner&) = delete;\n  void operator=(const VisibilityBasedPreconditioner&) = delete;\n\n  virtual ~VisibilityBasedPreconditioner();\n\n  // Preconditioner interface\n  void RightMultiply(const double* x, double* y) const final;\n  int num_rows() const final;\n\n  friend class VisibilityBasedPreconditionerTest;\n\n private:\n  bool UpdateImpl(const BlockSparseMatrix& A, const double* D) final;\n  void ComputeClusterJacobiSparsity(const CompressedRowBlockStructure& bs);\n  void ComputeClusterTridiagonalSparsity(const CompressedRowBlockStructure& bs);\n  void InitStorage(const CompressedRowBlockStructure& bs);\n  void InitEliminator(const CompressedRowBlockStructure& bs);\n  LinearSolverTerminationType Factorize();\n  void ScaleOffDiagonalCells();\n\n  void ClusterCameras(const std::vector<std::set<int>>& visibility);\n  void FlattenMembershipMap(const std::unordered_map<int, int>& membership_map,\n                            std::vector<int>* membership_vector) const;\n  void ComputeClusterVisibility(\n      const std::vector<std::set<int>>& visibility,\n      std::vector<std::set<int>>* cluster_visibility) const;\n  WeightedGraph<int>* CreateClusterGraph(\n      const std::vector<std::set<int>>& visibility) const;\n  void ForestToClusterPairs(const WeightedGraph<int>& forest,\n                            std::unordered_set<std::pair<int, int>, pair_hash>* cluster_pairs) const;\n  void ComputeBlockPairsInPreconditioner(const CompressedRowBlockStructure& bs);\n  bool IsBlockPairInPreconditioner(int block1, int block2) const;\n  bool IsBlockPairOffDiagonal(int block1, int block2) const;\n\n  Preconditioner::Options options_;\n\n  // Number of parameter blocks in the schur complement.\n  int num_blocks_;\n  int num_clusters_;\n\n  // Sizes of the blocks in the schur complement.\n  std::vector<int> block_size_;\n\n  // Mapping from cameras to clusters.\n  std::vector<int> cluster_membership_;\n\n  // Non-zero camera pairs from the schur complement matrix that are\n  // present in the preconditioner, sorted by row (first element of\n  // each pair), then column (second).\n  std::set<std::pair<int, int>> block_pairs_;\n\n  // Set of cluster pairs (including self pairs (i,i)) in the\n  // preconditioner.\n  std::unordered_set<std::pair<int, int>, pair_hash> cluster_pairs_;\n  std::unique_ptr<SchurEliminatorBase> eliminator_;\n\n  // Preconditioner matrix.\n  std::unique_ptr<BlockRandomAccessSparseMatrix> m_;\n  std::unique_ptr<SparseCholesky> sparse_cholesky_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_VISIBILITY_BASED_PRECONDITIONER_H_\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/visibility_based_preconditioner_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/visibility_based_preconditioner.h\"\n\n#include <memory>\n#include \"Eigen/Dense\"\n#include \"ceres/block_random_access_dense_matrix.h\"\n#include \"ceres/block_random_access_sparse_matrix.h\"\n#include \"ceres/block_sparse_matrix.h\"\n#include \"ceres/casts.h\"\n#include \"ceres/file.h\"\n#include \"ceres/internal/eigen.h\"\n#include \"ceres/linear_least_squares_problems.h\"\n#include \"ceres/schur_eliminator.h\"\n#include \"ceres/stringprintf.h\"\n#include \"ceres/test_util.h\"\n#include \"ceres/types.h\"\n#include \"glog/logging.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// TODO(sameeragarwal): Re-enable this test once serialization is\n// working again.\n\n// using testing::AssertionResult;\n// using testing::AssertionSuccess;\n// using testing::AssertionFailure;\n\n// static const double kTolerance = 1e-12;\n\n// class VisibilityBasedPreconditionerTest : public ::testing::Test {\n//  public:\n//   static const int kCameraSize = 9;\n\n//  protected:\n//   void SetUp() {\n//     string input_file = TestFileAbsolutePath(\"problem-6-1384-000.lsqp\");\n\n//     std::unique_ptr<LinearLeastSquaresProblem> problem(\n//         CHECK_NOTNULL(CreateLinearLeastSquaresProblemFromFile(input_file)));\n//     A_.reset(down_cast<BlockSparseMatrix*>(problem->A.release()));\n//     b_.reset(problem->b.release());\n//     D_.reset(problem->D.release());\n\n//     const CompressedRowBlockStructure* bs =\n//         CHECK_NOTNULL(A_->block_structure());\n//     const int num_col_blocks = bs->cols.size();\n\n//     num_cols_ = A_->num_cols();\n//     num_rows_ = A_->num_rows();\n//     num_eliminate_blocks_ = problem->num_eliminate_blocks;\n//     num_camera_blocks_ = num_col_blocks - num_eliminate_blocks_;\n//     options_.elimination_groups.push_back(num_eliminate_blocks_);\n//     options_.elimination_groups.push_back(\n//         A_->block_structure()->cols.size() - num_eliminate_blocks_);\n\n//     vector<int> blocks(num_col_blocks - num_eliminate_blocks_, 0);\n//     for (int i = num_eliminate_blocks_; i < num_col_blocks; ++i) {\n//       blocks[i - num_eliminate_blocks_] = bs->cols[i].size;\n//     }\n\n//     // The input matrix is a real jacobian and fairly poorly\n//     // conditioned. Setting D to a large constant makes the normal\n//     // equations better conditioned and makes the tests below better\n//     // conditioned.\n//     VectorRef(D_.get(), num_cols_).setConstant(10.0);\n\n//     schur_complement_.reset(new BlockRandomAccessDenseMatrix(blocks));\n//     Vector rhs(schur_complement_->num_rows());\n\n//     std::unique_ptr<SchurEliminatorBase> eliminator;\n//     LinearSolver::Options eliminator_options;\n//     eliminator_options.elimination_groups = options_.elimination_groups;\n//     eliminator_options.num_threads = options_.num_threads;\n\n//     eliminator.reset(SchurEliminatorBase::Create(eliminator_options));\n//     eliminator->Init(num_eliminate_blocks_, bs);\n//     eliminator->Eliminate(A_.get(), b_.get(), D_.get(),\n//                           schur_complement_.get(), rhs.data());\n//   }\n\n//   AssertionResult IsSparsityStructureValid() {\n//     preconditioner_->InitStorage(*A_->block_structure());\n//     const std::unordered_set<pair<int, int>, pair_hash>& cluster_pairs =\n//     get_cluster_pairs(); const vector<int>& cluster_membership =\n//     get_cluster_membership();\n\n//     for (int i = 0; i < num_camera_blocks_; ++i) {\n//       for (int j = i; j < num_camera_blocks_; ++j) {\n//         if (cluster_pairs.count(make_pair(cluster_membership[i],\n//                                           cluster_membership[j]))) {\n//           if (!IsBlockPairInPreconditioner(i, j)) {\n//             return AssertionFailure()\n//                 << \"block pair (\" << i << \",\" << j << \"missing\";\n//           }\n//         } else {\n//           if (IsBlockPairInPreconditioner(i, j)) {\n//             return AssertionFailure()\n//                << \"block pair (\" << i << \",\" << j << \"should not be present\";\n//           }\n//         }\n//       }\n//     }\n//     return AssertionSuccess();\n//   }\n\n//   AssertionResult PreconditionerValuesMatch() {\n//     preconditioner_->Update(*A_, D_.get());\n//     const std::unordered_set<pair<int, int>, pair_hash>& cluster_pairs =\n//     get_cluster_pairs(); const BlockRandomAccessSparseMatrix* m = get_m();\n//     Matrix preconditioner_matrix;\n//     m->matrix()->ToDenseMatrix(&preconditioner_matrix);\n//     ConstMatrixRef full_schur_complement(schur_complement_->values(),\n//                                          m->num_rows(),\n//                                          m->num_rows());\n//     const int num_clusters = get_num_clusters();\n//     const int kDiagonalBlockSize =\n//         kCameraSize * num_camera_blocks_ / num_clusters;\n\n//     for (int i = 0; i < num_clusters; ++i) {\n//       for (int j = i; j < num_clusters; ++j) {\n//         double diff = 0.0;\n//         if (cluster_pairs.count(make_pair(i, j))) {\n//           diff =\n//               (preconditioner_matrix.block(kDiagonalBlockSize * i,\n//                                            kDiagonalBlockSize * j,\n//                                            kDiagonalBlockSize,\n//                                            kDiagonalBlockSize) -\n//                full_schur_complement.block(kDiagonalBlockSize * i,\n//                                            kDiagonalBlockSize * j,\n//                                            kDiagonalBlockSize,\n//                                            kDiagonalBlockSize)).norm();\n//         } else {\n//           diff = preconditioner_matrix.block(kDiagonalBlockSize * i,\n//                                              kDiagonalBlockSize * j,\n//                                              kDiagonalBlockSize,\n//                                              kDiagonalBlockSize).norm();\n//         }\n//         if (diff > kTolerance) {\n//           return AssertionFailure()\n//               << \"Preconditioner block \" << i << \" \" << j << \" differs \"\n//               << \"from expected value by \" << diff;\n//         }\n//       }\n//     }\n//     return AssertionSuccess();\n//   }\n\n//   // Accessors\n//   int get_num_blocks() { return preconditioner_->num_blocks_; }\n\n//   int get_num_clusters() { return preconditioner_->num_clusters_; }\n//   int* get_mutable_num_clusters() { return &preconditioner_->num_clusters_; }\n\n//   const vector<int>& get_block_size() {\n//     return preconditioner_->block_size_; }\n\n//   vector<int>* get_mutable_block_size() {\n//     return &preconditioner_->block_size_; }\n\n//   const vector<int>& get_cluster_membership() {\n//     return preconditioner_->cluster_membership_;\n//   }\n\n//   vector<int>* get_mutable_cluster_membership() {\n//     return &preconditioner_->cluster_membership_;\n//   }\n\n//   const set<pair<int, int>>& get_block_pairs() {\n//     return preconditioner_->block_pairs_;\n//   }\n\n//   set<pair<int, int>>* get_mutable_block_pairs() {\n//     return &preconditioner_->block_pairs_;\n//   }\n\n//   const std::unordered_set<pair<int, int>, pair_hash>& get_cluster_pairs() {\n//     return preconditioner_->cluster_pairs_;\n//   }\n\n//   std::unordered_set<pair<int, int>, pair_hash>* get_mutable_cluster_pairs()\n//   {\n//     return &preconditioner_->cluster_pairs_;\n//   }\n\n//   bool IsBlockPairInPreconditioner(const int block1, const int block2) {\n//     return preconditioner_->IsBlockPairInPreconditioner(block1, block2);\n//   }\n\n//   bool IsBlockPairOffDiagonal(const int block1, const int block2) {\n//     return preconditioner_->IsBlockPairOffDiagonal(block1, block2);\n//   }\n\n//   const BlockRandomAccessSparseMatrix* get_m() {\n//     return preconditioner_->m_.get();\n//   }\n\n//   int num_rows_;\n//   int num_cols_;\n//   int num_eliminate_blocks_;\n//   int num_camera_blocks_;\n\n//   std::unique_ptr<BlockSparseMatrix> A_;\n//   std::unique_ptr<double[]> b_;\n//   std::unique_ptr<double[]> D_;\n\n//   Preconditioner::Options options_;\n//   std::unique_ptr<VisibilityBasedPreconditioner> preconditioner_;\n//   std::unique_ptr<BlockRandomAccessDenseMatrix> schur_complement_;\n// };\n\n// TEST_F(VisibilityBasedPreconditionerTest, OneClusterClusterJacobi) {\n//   options_.type = CLUSTER_JACOBI;\n//   preconditioner_.reset(\n//       new VisibilityBasedPreconditioner(*A_->block_structure(), options_));\n\n//   // Override the clustering to be a single clustering containing all\n//   // the cameras.\n//   vector<int>& cluster_membership = *get_mutable_cluster_membership();\n//   for (int i = 0; i < num_camera_blocks_; ++i) {\n//     cluster_membership[i] = 0;\n//   }\n\n//   *get_mutable_num_clusters() = 1;\n\n//   std::unordered_set<pair<int, int>, pair_hash>& cluster_pairs =\n//   *get_mutable_cluster_pairs(); cluster_pairs.clear();\n//   cluster_pairs.insert(make_pair(0, 0));\n\n//   EXPECT_TRUE(IsSparsityStructureValid());\n//   EXPECT_TRUE(PreconditionerValuesMatch());\n\n//   // Multiplication by the inverse of the preconditioner.\n//   const int num_rows = schur_complement_->num_rows();\n//   ConstMatrixRef full_schur_complement(schur_complement_->values(),\n//                                        num_rows,\n//                                        num_rows);\n//   Vector x(num_rows);\n//   Vector y(num_rows);\n//   Vector z(num_rows);\n\n//   for (int i = 0; i < num_rows; ++i) {\n//     x.setZero();\n//     y.setZero();\n//     z.setZero();\n//     x[i] = 1.0;\n//     preconditioner_->RightMultiply(x.data(), y.data());\n//     z = full_schur_complement\n//         .selfadjointView<Eigen::Upper>()\n//         .llt().solve(x);\n//     double max_relative_difference =\n//         ((y - z).array() / z.array()).matrix().lpNorm<Eigen::Infinity>();\n//     EXPECT_NEAR(max_relative_difference, 0.0, kTolerance);\n//   }\n// }\n\n// TEST_F(VisibilityBasedPreconditionerTest, ClusterJacobi) {\n//   options_.type = CLUSTER_JACOBI;\n//   preconditioner_.reset(\n//       new VisibilityBasedPreconditioner(*A_->block_structure(), options_));\n\n//   // Override the clustering to be equal number of cameras.\n//   vector<int>& cluster_membership = *get_mutable_cluster_membership();\n//   cluster_membership.resize(num_camera_blocks_);\n//   static const int kNumClusters = 3;\n\n//   for (int i = 0; i < num_camera_blocks_; ++i) {\n//     cluster_membership[i] = (i * kNumClusters) / num_camera_blocks_;\n//   }\n//   *get_mutable_num_clusters() = kNumClusters;\n\n//   std::unordered_set<pair<int, int>, pair_hash>& cluster_pairs =\n//   *get_mutable_cluster_pairs(); cluster_pairs.clear(); for (int i = 0; i <\n//   kNumClusters; ++i) {\n//     cluster_pairs.insert(make_pair(i, i));\n//   }\n\n//   EXPECT_TRUE(IsSparsityStructureValid());\n//   EXPECT_TRUE(PreconditionerValuesMatch());\n// }\n\n// TEST_F(VisibilityBasedPreconditionerTest, ClusterTridiagonal) {\n//   options_.type = CLUSTER_TRIDIAGONAL;\n//   preconditioner_.reset(\n//       new VisibilityBasedPreconditioner(*A_->block_structure(), options_));\n//   static const int kNumClusters = 3;\n\n//   // Override the clustering to be 3 clusters.\n//   vector<int>& cluster_membership = *get_mutable_cluster_membership();\n//   cluster_membership.resize(num_camera_blocks_);\n//   for (int i = 0; i < num_camera_blocks_; ++i) {\n//     cluster_membership[i] = (i * kNumClusters) / num_camera_blocks_;\n//   }\n//   *get_mutable_num_clusters() = kNumClusters;\n\n//   // Spanning forest has structure 0-1 2\n//   std::unordered_set<pair<int, int>, pair_hash>& cluster_pairs =\n//   *get_mutable_cluster_pairs(); cluster_pairs.clear(); for (int i = 0; i <\n//   kNumClusters; ++i) {\n//     cluster_pairs.insert(make_pair(i, i));\n//   }\n//   cluster_pairs.insert(make_pair(0, 1));\n\n//   EXPECT_TRUE(IsSparsityStructureValid());\n//   EXPECT_TRUE(PreconditionerValuesMatch());\n// }\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/visibility_test.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: kushalav@google.com (Avanish Kushal)\n//         sameeragarwal@google.com (Sameer Agarwal)\n\n#include \"ceres/visibility.h\"\n\n#include <memory>\n#include <set>\n#include <vector>\n\n#include \"ceres/block_structure.h\"\n#include \"ceres/graph.h\"\n#include \"glog/logging.h\"\n#include \"gtest/gtest.h\"\n\nnamespace ceres {\nnamespace internal {\n\nusing std::set;\nusing std::vector;\n\nclass VisibilityTest : public ::testing::Test {\n};\n\nTEST(VisibilityTest, SimpleMatrix) {\n  //   A = [1 0 0 0 0 1\n  //        1 0 0 1 0 0\n  //        0 1 1 0 0 0\n  //        0 1 0 0 1 0]\n\n  int num_cols = 6;\n  int num_eliminate_blocks = 2;\n  CompressedRowBlockStructure bs;\n\n  // Row 1\n  {\n    bs.rows.push_back(CompressedRow());\n    CompressedRow& row = bs.rows.back();\n    row.block.size = 2;\n    row.block.position = 0;\n    row.cells.push_back(Cell(0, 0));\n    row.cells.push_back(Cell(5, 0));\n  }\n\n  // Row 2\n  {\n    bs.rows.push_back(CompressedRow());\n    CompressedRow& row = bs.rows.back();\n    row.block.size = 2;\n    row.block.position = 2;\n    row.cells.push_back(Cell(0, 1));\n    row.cells.push_back(Cell(3, 1));\n  }\n\n  // Row 3\n  {\n    bs.rows.push_back(CompressedRow());\n    CompressedRow& row = bs.rows.back();\n    row.block.size = 2;\n    row.block.position = 4;\n    row.cells.push_back(Cell(1, 2));\n    row.cells.push_back(Cell(2, 2));\n  }\n\n  // Row 4\n  {\n    bs.rows.push_back(CompressedRow());\n    CompressedRow& row = bs.rows.back();\n    row.block.size = 2;\n    row.block.position = 6;\n    row.cells.push_back(Cell(1, 3));\n    row.cells.push_back(Cell(4, 3));\n  }\n  bs.cols.resize(num_cols);\n\n  vector< set<int>> visibility;\n  ComputeVisibility(bs, num_eliminate_blocks, &visibility);\n  ASSERT_EQ(visibility.size(), num_cols - num_eliminate_blocks);\n  for (int i = 0; i < visibility.size(); ++i) {\n    ASSERT_EQ(visibility[i].size(), 1);\n  }\n\n  std::unique_ptr<WeightedGraph<int> > graph(CreateSchurComplementGraph(visibility));\n  EXPECT_EQ(graph->vertices().size(), visibility.size());\n  for (int i = 0; i < visibility.size(); ++i) {\n    EXPECT_EQ(graph->VertexWeight(i), 1.0);\n  }\n\n  for (int i = 0; i < visibility.size(); ++i) {\n    for (int j = i; j < visibility.size(); ++j) {\n      double edge_weight = 0.0;\n      if ((i == 1 && j == 3) || (i == 0 && j == 2) || (i == j)) {\n        edge_weight = 1.0;\n      }\n\n      EXPECT_EQ(graph->EdgeWeight(i, j), edge_weight)\n          << \"Edge: \" << i << \" \" << j\n          << \" weight: \" << graph->EdgeWeight(i, j)\n          << \" expected weight: \" << edge_weight;\n    }\n  }\n}\n\n\nTEST(VisibilityTest, NoEBlocks) {\n  //   A = [1 0 0 0 0 0\n  //        1 0 0 0 0 0\n  //        0 1 0 0 0 0\n  //        0 1 0 0 0 0]\n\n  int num_cols = 6;\n  int num_eliminate_blocks = 2;\n  CompressedRowBlockStructure bs;\n\n  // Row 1\n  {\n    bs.rows.push_back(CompressedRow());\n    CompressedRow& row = bs.rows.back();\n    row.block.size = 2;\n    row.block.position = 0;\n    row.cells.push_back(Cell(0, 0));\n  }\n\n  // Row 2\n  {\n    bs.rows.push_back(CompressedRow());\n    CompressedRow& row = bs.rows.back();\n    row.block.size = 2;\n    row.block.position = 2;\n    row.cells.push_back(Cell(0, 1));\n  }\n\n  // Row 3\n  {\n    bs.rows.push_back(CompressedRow());\n    CompressedRow& row = bs.rows.back();\n    row.block.size = 2;\n    row.block.position = 4;\n    row.cells.push_back(Cell(1, 2));\n  }\n\n  // Row 4\n  {\n    bs.rows.push_back(CompressedRow());\n    CompressedRow& row = bs.rows.back();\n    row.block.size = 2;\n    row.block.position = 6;\n    row.cells.push_back(Cell(1, 3));\n  }\n  bs.cols.resize(num_cols);\n\n  vector<set<int>> visibility;\n  ComputeVisibility(bs, num_eliminate_blocks, &visibility);\n  ASSERT_EQ(visibility.size(), num_cols - num_eliminate_blocks);\n  for (int i = 0; i < visibility.size(); ++i) {\n    ASSERT_EQ(visibility[i].size(), 0);\n  }\n\n  std::unique_ptr<WeightedGraph<int> > graph(\n\t\t\t\t\t     CreateSchurComplementGraph(visibility));\n  EXPECT_EQ(graph->vertices().size(), visibility.size());\n  for (int i = 0; i < visibility.size(); ++i) {\n    EXPECT_EQ(graph->VertexWeight(i), 1.0);\n  }\n\n  for (int i = 0; i < visibility.size(); ++i) {\n    for (int j = i; j < visibility.size(); ++j) {\n      double edge_weight = 0.0;\n      if (i == j) {\n        edge_weight = 1.0;\n      }\n      EXPECT_EQ(graph->EdgeWeight(i, j), edge_weight)\n          << \"Edge: \" << i << \" \" << j\n          << \" weight: \" << graph->EdgeWeight(i, j)\n          << \" expected weight: \" << edge_weight;\n    }\n  }\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/wall_time.cc",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: strandmark@google.com (Petter Strandmark)\n\n#include \"ceres/wall_time.h\"\n\n#ifdef CERES_USE_OPENMP\n#include <omp.h>\n#else\n#include <ctime>\n#endif\n\n#ifdef _WIN32\n#include <windows.h>\n#else\n#include <sys/time.h>\n#endif\n\nnamespace ceres {\nnamespace internal {\n\ndouble WallTimeInSeconds() {\n#ifdef CERES_USE_OPENMP\n  return omp_get_wtime();\n#else\n#ifdef _WIN32\n  LARGE_INTEGER count;\n  LARGE_INTEGER frequency;\n  QueryPerformanceCounter(&count);\n  QueryPerformanceFrequency(&frequency);\n  return static_cast<double>(count.QuadPart) /\n         static_cast<double>(frequency.QuadPart);\n#else\n  timeval time_val;\n  gettimeofday(&time_val, NULL);\n  return (time_val.tv_sec + time_val.tv_usec * 1e-6);\n#endif\n#endif\n}\n\nEventLogger::EventLogger(const std::string& logger_name) {\n  if (!VLOG_IS_ON(3)) {\n    return;\n  }\n\n  start_time_ = WallTimeInSeconds();\n  last_event_time_ = start_time_;\n  events_ = StringPrintf(\n      \"\\n%s\\n                                   Delta   Cumulative\\n\",\n      logger_name.c_str());\n}\n\nEventLogger::~EventLogger() {\n  if (!VLOG_IS_ON(3)) {\n    return;\n  }\n  AddEvent(\"Total\");\n  VLOG(3) << \"\\n\" << events_ << \"\\n\";\n}\n\nvoid EventLogger::AddEvent(const std::string& event_name) {\n  if (!VLOG_IS_ON(3)) {\n    return;\n  }\n\n  const double current_time = WallTimeInSeconds();\n  const double relative_time_delta = current_time - last_event_time_;\n  const double absolute_time_delta = current_time - start_time_;\n  last_event_time_ = current_time;\n\n  StringAppendF(&events_,\n                \"  %30s : %10.5f   %10.5f\\n\",\n                event_name.c_str(),\n                relative_time_delta,\n                absolute_time_delta);\n}\n\n}  // namespace internal\n}  // namespace ceres\n"
  },
  {
    "path": "3rdparty/ceres/internal/ceres/wall_time.h",
    "content": "// Ceres Solver - A fast non-linear least squares minimizer\n// Copyright 2015 Google Inc. All rights reserved.\n// http://ceres-solver.org/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n//   this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright notice,\n//   this list of conditions and the following disclaimer in the documentation\n//   and/or other materials provided with the distribution.\n// * Neither the name of Google Inc. nor the names of its contributors may be\n//   used to endorse or promote products derived from this software without\n//   specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: strandmark@google.com (Petter Strandmark)\n\n#ifndef CERES_INTERNAL_WALL_TIME_H_\n#define CERES_INTERNAL_WALL_TIME_H_\n\n#include <map>\n#include <string>\n#include \"ceres/internal/port.h\"\n#include \"ceres/stringprintf.h\"\n#include \"glog/logging.h\"\n\nnamespace ceres {\nnamespace internal {\n\n// Returns time, in seconds, from some arbitrary starting point. If\n// OpenMP is available then the high precision openmp_get_wtime()\n// function is used. Otherwise on unixes, gettimeofday is used. The\n// granularity is in seconds on windows systems.\ndouble WallTimeInSeconds();\n\n// Log a series of events, recording for each event the time elapsed\n// since the last event and since the creation of the object.\n//\n// The information is output to VLOG(3) upon destruction. A\n// name::Total event is added as the final event right before\n// destruction.\n//\n// Example usage:\n//\n//  void Foo() {\n//    EventLogger event_logger(\"Foo\");\n//    Bar1();\n//    event_logger.AddEvent(\"Bar1\")\n//    Bar2();\n//    event_logger.AddEvent(\"Bar2\")\n//    Bar3();\n//  }\n//\n// Will produce output that looks like\n//\n//  Foo\n//      Bar1:  time1  time1\n//      Bar2:  time2  time1 + time2;\n//     Total:  time3  time1 + time2 + time3;\nclass EventLogger {\n public:\n  explicit EventLogger(const std::string& logger_name);\n  ~EventLogger();\n  void AddEvent(const std::string& event_name);\n\n private:\n  double start_time_;\n  double last_event_time_;\n  std::string events_;\n};\n\n}  // namespace internal\n}  // namespace ceres\n\n#endif  // CERES_INTERNAL_WALL_TIME_H_\n"
  },
  {
    "path": "3rdparty/ceres/package.xml",
    "content": "<?xml version=\"1.0\"?>\n<!--\n  Copyright 2017 Google Inc. All rights reserved.\n  http://ceres-solver.org/\n\n  Redistribution and use in source and binary forms, with or without\n  modification, are permitted provided that the following conditions are met:\n\n  * Redistributions of source code must retain the above copyright notice,\n    this list of conditions and the following disclaimer.\n  * Redistributions in binary form must reproduce the above copyright notice,\n    this list of conditions and the following disclaimer in the documentation\n    and/or other materials provided with the distribution.\n  * Neither the name of Google Inc. nor the names of its contributors may be\n    used to endorse or promote products derived from this software without\n    specific prior written permission.\n\n  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n  POSSIBILITY OF SUCH DAMAGE.\n-->\n\n<package format=\"2\">\n  <name>ceres-solver</name>\n  <version>1.14.0</version>\n  <description>A large scale non-linear optimization library.</description>\n  <maintainer email=\"ceres-solver@googlegroups.com\">\n    The Ceres Solver Authors\n  </maintainer>\n  <license>New BSD</license>\n  <url type=\"website\">http://ceres-solver.org/</url>\n\n  <buildtool_depend>cmake</buildtool_depend>\n\n  <depend>atlas</depend>\n  <depend>eigen</depend>\n  <depend>gfortran</depend>\n  <depend>libgflags-dev</depend>\n  <depend>libgoogle-glog-dev</depend>\n  <depend>suitesparse</depend>\n\n  <export>\n    <build_type>cmake</build_type>\n  </export>\n</package>\n"
  },
  {
    "path": "3rdparty/ceres/scripts/make_docs.py",
    "content": "#!/usr/bin/python\n# encoding: utf-8\n#\n# Ceres Solver - A fast non-linear least squares minimizer\n# Copyright 2015 Google Inc. All rights reserved.\n# http://ceres-solver.org/\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice,\n#   this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright notice,\n#   this list of conditions and the following disclaimer in the documentation\n#   and/or other materials provided with the distribution.\n# * Neither the name of Google Inc. nor the names of its contributors may be\n#   used to endorse or promote products derived from this software without\n#   specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n#\n# Author: sameeragarwal@google.com (Sameer Agarwal)\n#\n# Note: You will need Sphinx and Pygments installed for this to work.\n\nfrom __future__ import print_function\nimport glob\nimport io\nimport os\nimport sys\n\n# Number of arguments\nN = len(sys.argv)\n\nif N < 3:\n  print('make_docs.py src_root destination_root')\n  sys.exit(1)\n\nsrc_dir    = sys.argv[1] + '/docs/source'\nbuild_root = sys.argv[2]\ncache_dir  = build_root + '/doctrees'\nhtml_dir   = build_root + '/html'\n\n# Called from Command Line\nif N == 3:\n  sphinx_exe = 'sphinx-build'\n\n# Called from CMake (using the SPHINX_EXECUTABLE found)\nelif N == 4:\n  sphinx_exe = sys.argv[3]\n\n# Run Sphinx to build the documentation.\nos.system('%s -b html -d %s %s %s' %(sphinx_exe, cache_dir, src_dir, html_dir))\n\nreplacements = [\n  # By default MathJax uses does not use TeX fonts. This simple search\n  # and replace fixes that.\n  ('''config=TeX-AMS-MML_HTMLorMML\"></script>''',\n   '''config=TeX-AMS_HTML\">\n      MathJax.Hub.Config({\n          \"HTML-CSS\": {\n            availableFonts: [\"TeX\"]\n          }\n        });\n      </script>'''),\n\n  # The title for the homepage is not ideal, so change it.\n  ('<title>Ceres Solver &mdash; Ceres Solver</title>',\n   '<title>Ceres Solver &mdash; A Large Scale Non-linear Optimization Library</title>')\n]\n\n# This is a nasty hack to strip the breadcrumb navigation. A better strategy is\n# to fork the upstream template, but that is no fun either. Whitespace matters!\n# This doesn't use regular expressions since the escaping makes it untenable.\nbreadcrumb_start_other = \\\n'''<div role=\"navigation\" aria-label=\"breadcrumbs navigation\">\n  <ul class=\"wy-breadcrumbs\">\n    <li><a href=\"index.html\">Docs</a> &raquo;</li>\n\n    <li>'''\n\n# The index page has a slightly different breadcrumb.\nbreadcrumb_start_index = breadcrumb_start_other.replace('index.html', '#')\n\nbreadcrumb_end = \\\n'''</li>\n      <li class=\"wy-breadcrumbs-aside\">\n\n      </li>\n  </ul>\n  <hr/>\n</div>'''\n\nfor name in glob.glob('%s/*.html' % html_dir):\n  print('Postprocessing: ', name)\n  with io.open(name, encoding=\"utf-8\") as fptr:\n    out = fptr.read()\n\n  for input_pattern, output_pattern in replacements:\n    out = out.replace(input_pattern, output_pattern)\n\n  try:\n    breadcrumb_start = breadcrumb_start_index \\\n                       if name.endswith('index.html') \\\n                       else breadcrumb_start_other\n    pre_breadcrumb_start, post_breadcrumb_start = out.split(breadcrumb_start)\n    title, post_breadcrumb_end = post_breadcrumb_start.split(breadcrumb_end)\n    print('Stripping breadcrumb for -', title)\n    out = pre_breadcrumb_start + post_breadcrumb_end\n  except ValueError:\n    print('Skipping breadcrumb strip for', name)\n\n  with io.open(name, 'w', encoding=\"utf-8\") as fptr:\n    fptr.write(out)\n"
  },
  {
    "path": "3rdparty/ceres/scripts/make_release",
    "content": "#!/bin/bash\n#\n# Ceres Solver - A fast non-linear least squares minimizer\n# Copyright 2015 Google Inc. All rights reserved.\n# http://ceres-solver.org/\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice,\n#   this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright notice,\n#   this list of conditions and the following disclaimer in the documentation\n#   and/or other materials provided with the distribution.\n# * Neither the name of Google Inc. nor the names of its contributors may be\n#   used to endorse or promote products derived from this software without\n#   specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n#\n# Author: mierle@gmail.com (Keir Mierle)\n#\n# Note: You will need Sphinx and Pygments installed for this to work.\n\nif [ -z $1 ] ; then\n  echo 'usage: scripts/make_release <version>'\n  echo '       must be run from toplevel Ceres source directory'\n  exit 1\nfi\n\nTMP=\"/tmp/ceres-solver-$1\"\nDOCS_TMP=\"/tmp/ceres-solver-docs-$1\"\nVERSION=$(grep '#define CERES_VERSION_' include/ceres/version.h | \\\n          sed -e 's/#define CERES_VERSION_STRING.*$//' | \\\n          sed -e 's/\\(^#define CERES_VERSION_[MR^S].[A-Z]*\\) \\([0-9]\\)/\\2/' | \\\n          tr '\\n' '.' | \\\n          sed -e 's/..$//')\nGIT_COMMIT=$(git log -1 HEAD |grep commit)\n\nif [[ $1 != $VERSION ]] ; then\n  echo \"ERROR: Version from the command line $1 does not match CERES_VERSION\"\n  echo \"       in include/ceres/version.h, which is $VERSION. You may not be in the \"\n  echo \"       toplevel source dir.\"\n  exit 1\nfi\n\n# Export repository.\ngit checkout-index -f -a --prefix=$TMP/\n\n# Build the VERSION file.\nVERSIONFILE=$TMP/VERSION\necho \"version $VERSION\" >> $VERSIONFILE\necho \"$GIT_COMMIT\" >> $VERSIONFILE\n\n# Build the documentation.\npython $TMP/scripts/make_docs.py $TMP $DOCS_TMP\ncp -pr $DOCS_TMP/html $TMP/docs\n\n# Build the tarball.\ncd /tmp\ntar -cvzf \"ceres-solver-$1.tar.gz\" \"ceres-solver-$1\"\n\n# Don't leave a mess behind.\nrm -rf $TMP\nrm -rf $DOCS_TMP\n\n# Reminder to upload.\ncat <<EOF\n\nTODO:\n  - Upload /tmp/ceres-solver-$1.tar.gz\nEOF\n"
  },
  {
    "path": "3rdparty/ceres/travis/install_travis_linux_deps.sh",
    "content": "#!/bin/bash\n\n# Stop processing on any error.\nset -e\n\n# Install default versions of standard dependencies that are new enough in 18.04\nsudo apt-get install -y cmake\nsudo apt-get install -y libatlas-base-dev libsuitesparse-dev\nsudo apt-get install -y libgoogle-glog-dev libgflags-dev\nsudo apt-get install -y libeigen3-dev\n"
  },
  {
    "path": "3rdparty/ceres/travis/install_travis_osx_deps.sh",
    "content": "#!/bin/bash\n\n# Stop processing on any error.\nset -e\n\nfunction install_if_not_installed() {\n  declare -r formula=\"$1\"\n  if [[ $(brew list ${formula} &>/dev/null; echo $?) -ne 0 ]]; then\n    brew install ${formula}\n  else\n    echo \"$0 - ${formula} is already installed.\"\n  fi\n}\n\n# Manually trigger an update prior to installing packages to avoid Ruby\n# version related errors as per [1].\n#\n# [1]: https://github.com/travis-ci/travis-ci/issues/8552\nbrew update\n\ninstall_if_not_installed cmake\ninstall_if_not_installed glog\ninstall_if_not_installed gflags\ninstall_if_not_installed eigen\ninstall_if_not_installed suite-sparse\n"
  },
  {
    "path": "3rdparty/eigen3/.hgeol",
    "content": "[patterns]\n*.sh = LF\n*.MINPACK = CRLF\nscripts/*.in = LF\ndebug/msvc/*.dat = CRLF\ndebug/msvc/*.natvis = CRLF\nunsupported/test/mpreal/*.* = CRLF\n** = native\n\n[repository]\nnative = LF\n"
  },
  {
    "path": "3rdparty/eigen3/CMakeLists.txt",
    "content": "## Modified by WANG JIADONG <wangjiadong@sensetime.com> for adas sdk\nmessage(STATUS \"${BoldGreen}[3RDPARTY : Eigen3]${ColourReset}\")\n\nproject(Eigen3)\n\ncmake_minimum_required(VERSION 2.8.11)\n\n# guard against in-source builds\n\nif(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})\n  message(FATAL_ERROR \"In-source builds not allowed. Please make a new directory (called a build directory) and run CMake from there. You may need to remove CMakeCache.txt. \")\nendif()\n\n\n# Alias Eigen_*_DIR to Eigen3_*_DIR:\n\nset(Eigen_SOURCE_DIR ${Eigen3_SOURCE_DIR})\nset(Eigen_BINARY_DIR ${Eigen3_BINARY_DIR})\n\n# guard against bad build-type strings\n\nif (NOT CMAKE_BUILD_TYPE)\n  set(CMAKE_BUILD_TYPE \"Release\")\nendif()\n\n\n#############################################################################\n# retrieve version information                                              #\n#############################################################################\n\n# automatically parse the version number\nfile(READ \"${PROJECT_SOURCE_DIR}/Eigen/src/Core/util/Macros.h\" _eigen_version_header)\nstring(REGEX MATCH \"define[ \\t]+EIGEN_WORLD_VERSION[ \\t]+([0-9]+)\" _eigen_world_version_match \"${_eigen_version_header}\")\nset(EIGEN_WORLD_VERSION \"${CMAKE_MATCH_1}\")\nstring(REGEX MATCH \"define[ \\t]+EIGEN_MAJOR_VERSION[ \\t]+([0-9]+)\" _eigen_major_version_match \"${_eigen_version_header}\")\nset(EIGEN_MAJOR_VERSION \"${CMAKE_MATCH_1}\")\nstring(REGEX MATCH \"define[ \\t]+EIGEN_MINOR_VERSION[ \\t]+([0-9]+)\" _eigen_minor_version_match \"${_eigen_version_header}\")\nset(EIGEN_MINOR_VERSION \"${CMAKE_MATCH_1}\")\nset(EIGEN_VERSION_NUMBER ${EIGEN_WORLD_VERSION}.${EIGEN_MAJOR_VERSION}.${EIGEN_MINOR_VERSION})\n\n# if we are not in a git clone\nif(IS_DIRECTORY ${CMAKE_SOURCE_DIR}/.git)\n  # if the git program is absent or this will leave the EIGEN_GIT_REVNUM string empty,\n  # but won't stop CMake.\n  execute_process(COMMAND git ls-remote --refs -q ${CMAKE_SOURCE_DIR} HEAD OUTPUT_VARIABLE EIGEN_GIT_OUTPUT)\nendif()\n\n# extract the git rev number from the git output...\nif(EIGEN_GIT_OUTPUT)\nstring(REGEX MATCH \"^([0-9;a-f]+).*\" EIGEN_GIT_CHANGESET_MATCH \"${EIGEN_GIT_OUTPUT}\")\nset(EIGEN_GIT_REVNUM \"${CMAKE_MATCH_1}\")\nendif()\n#...and show it next to the version number\nif(EIGEN_GIT_REVNUM)\n  set(EIGEN_VERSION \"${EIGEN_VERSION_NUMBER} (git rev ${EIGEN_GIT_REVNUM})\")\nelse()\n  set(EIGEN_VERSION \"${EIGEN_VERSION_NUMBER}\")\nendif()\n\ninclude(CheckCXXCompilerFlag)\ninclude(GNUInstallDirs)\n\nset(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)\n\n\noption(EIGEN_TEST_CXX11 \"Enable testing with C++11 and C++11 features (e.g. Tensor module).\" OFF)\n\n\nmacro(ei_add_cxx_compiler_flag FLAG)\n  string(REGEX REPLACE \"-\" \"\" SFLAG1 ${FLAG})\n  string(REGEX REPLACE \"\\\\+\" \"p\" SFLAG ${SFLAG1})\n  check_cxx_compiler_flag(${FLAG} COMPILER_SUPPORT_${SFLAG})\n  if(COMPILER_SUPPORT_${SFLAG})\n    set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} ${FLAG}\")\n  endif()\nendmacro()\n\ncheck_cxx_compiler_flag(\"-std=c++11\" EIGEN_COMPILER_SUPPORT_CPP11)\n\nif(EIGEN_TEST_CXX11)\n  set(CMAKE_CXX_STANDARD 11)\n  set(CMAKE_CXX_EXTENSIONS OFF)\n  if(EIGEN_COMPILER_SUPPORT_CPP11)\n    set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -std=c++11\")\n  endif()\nelse()\n  #set(CMAKE_CXX_STANDARD 03)\n  #set(CMAKE_CXX_EXTENSIONS OFF)\n  ei_add_cxx_compiler_flag(\"-std=c++03\")\nendif()\n\n#############################################################################\n# find how to link to the standard libraries                                #\n#############################################################################\n\nfind_package(StandardMathLibrary)\n\n\nset(EIGEN_TEST_CUSTOM_LINKER_FLAGS  \"\" CACHE STRING \"Additional linker flags when linking unit tests.\")\nset(EIGEN_TEST_CUSTOM_CXX_FLAGS     \"\" CACHE STRING \"Additional compiler flags when compiling unit tests.\")\n\nset(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO \"\")\n\nif(NOT STANDARD_MATH_LIBRARY_FOUND)\n\n  message(FATAL_ERROR\n    \"Can't link to the standard math library. Please report to the Eigen developers, telling them about your platform.\")\n\nelse()\n\n  if(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO)\n    set(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO \"${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO} ${STANDARD_MATH_LIBRARY}\")\n  else()\n    set(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO \"${STANDARD_MATH_LIBRARY}\")\n  endif()\n\nendif()\n\nif(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO)\n  message(STATUS \"Standard libraries to link to explicitly: ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO}\")\nelse()\n  message(STATUS \"Standard libraries to link to explicitly: none\")\nendif()\n\noption(EIGEN_BUILD_BTL \"Build benchmark suite\" OFF)\n\n# Disable pkgconfig only for native Windows builds\nif(NOT WIN32 OR NOT CMAKE_HOST_SYSTEM_NAME MATCHES Windows)\n  option(EIGEN_BUILD_PKGCONFIG \"Build pkg-config .pc file for Eigen\" ON)\nendif()\n\nset(CMAKE_INCLUDE_CURRENT_DIR OFF)\n\noption(EIGEN_SPLIT_LARGE_TESTS \"Split large tests into smaller executables\" ON)\n\noption(EIGEN_DEFAULT_TO_ROW_MAJOR \"Use row-major as default matrix storage order\" OFF)\nif(EIGEN_DEFAULT_TO_ROW_MAJOR)\n  add_definitions(\"-DEIGEN_DEFAULT_TO_ROW_MAJOR\")\nendif()\n\nset(EIGEN_TEST_MAX_SIZE \"320\" CACHE STRING \"Maximal matrix/vector size, default is 320\")\n\nif(NOT MSVC)\n  # We assume that other compilers are partly compatible with GNUCC\n\n  # clang outputs some warnings for unknown flags that are not caught by check_cxx_compiler_flag\n  # adding -Werror turns such warnings into errors\n  check_cxx_compiler_flag(\"-Werror\" COMPILER_SUPPORT_WERROR)\n  if(COMPILER_SUPPORT_WERROR)\n    set(CMAKE_REQUIRED_FLAGS \"-Werror\")\n  endif()\n  ei_add_cxx_compiler_flag(\"-pedantic\")\n  ei_add_cxx_compiler_flag(\"-Wall\")\n  ei_add_cxx_compiler_flag(\"-Wextra\")\n  #ei_add_cxx_compiler_flag(\"-Weverything\")              # clang\n\n  ei_add_cxx_compiler_flag(\"-Wundef\")\n  ei_add_cxx_compiler_flag(\"-Wcast-align\")\n  ei_add_cxx_compiler_flag(\"-Wchar-subscripts\")\n  ei_add_cxx_compiler_flag(\"-Wnon-virtual-dtor\")\n  ei_add_cxx_compiler_flag(\"-Wunused-local-typedefs\")\n  ei_add_cxx_compiler_flag(\"-Wpointer-arith\")\n  ei_add_cxx_compiler_flag(\"-Wwrite-strings\")\n  ei_add_cxx_compiler_flag(\"-Wformat-security\")\n  ei_add_cxx_compiler_flag(\"-Wshorten-64-to-32\")\n  ei_add_cxx_compiler_flag(\"-Wlogical-op\")\n  ei_add_cxx_compiler_flag(\"-Wenum-conversion\")\n  ei_add_cxx_compiler_flag(\"-Wc++11-extensions\")\n  ei_add_cxx_compiler_flag(\"-Wdouble-promotion\")\n#  ei_add_cxx_compiler_flag(\"-Wconversion\")\n\n  ei_add_cxx_compiler_flag(\"-Wshadow\")\n\n  ei_add_cxx_compiler_flag(\"-Wno-psabi\")\n  ei_add_cxx_compiler_flag(\"-Wno-variadic-macros\")\n  ei_add_cxx_compiler_flag(\"-Wno-long-long\")\n\n  ei_add_cxx_compiler_flag(\"-fno-check-new\")\n  ei_add_cxx_compiler_flag(\"-fno-common\")\n  ei_add_cxx_compiler_flag(\"-fstrict-aliasing\")\n  ei_add_cxx_compiler_flag(\"-wd981\")                    # disable ICC's \"operands are evaluated in unspecified order\" remark\n  ei_add_cxx_compiler_flag(\"-wd2304\")                   # disable ICC's \"warning #2304: non-explicit constructor with single argument may cause implicit type conversion\" produced by -Wnon-virtual-dtor\n\n\n  # The -ansi flag must be added last, otherwise it is also used as a linker flag by check_cxx_compiler_flag making it fails\n  # Moreover we should not set both -strict-ansi and -ansi\n  check_cxx_compiler_flag(\"-strict-ansi\" COMPILER_SUPPORT_STRICTANSI)\n  ei_add_cxx_compiler_flag(\"-Qunused-arguments\")        # disable clang warning: argument unused during compilation: '-ansi'\n\n  if(COMPILER_SUPPORT_STRICTANSI)\n    set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -strict-ansi\")\n  else()\n    ei_add_cxx_compiler_flag(\"-ansi\")\n  endif()\n\n  if(ANDROID_NDK)\n    ei_add_cxx_compiler_flag(\"-pie\")\n    ei_add_cxx_compiler_flag(\"-fPIE\")\n  endif()\n\n  set(CMAKE_REQUIRED_FLAGS \"\")\n\n  option(EIGEN_TEST_SSE2 \"Enable/Disable SSE2 in tests/examples\" OFF)\n  if(EIGEN_TEST_SSE2)\n    set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -msse2\")\n    message(STATUS \"Enabling SSE2 in tests/examples\")\n  endif()\n\n  option(EIGEN_TEST_SSE3 \"Enable/Disable SSE3 in tests/examples\" OFF)\n  if(EIGEN_TEST_SSE3)\n    set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -msse3\")\n    message(STATUS \"Enabling SSE3 in tests/examples\")\n  endif()\n\n  option(EIGEN_TEST_SSSE3 \"Enable/Disable SSSE3 in tests/examples\" OFF)\n  if(EIGEN_TEST_SSSE3)\n    set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -mssse3\")\n    message(STATUS \"Enabling SSSE3 in tests/examples\")\n  endif()\n\n  option(EIGEN_TEST_SSE4_1 \"Enable/Disable SSE4.1 in tests/examples\" OFF)\n  if(EIGEN_TEST_SSE4_1)\n    set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -msse4.1\")\n    message(STATUS \"Enabling SSE4.1 in tests/examples\")\n  endif()\n\n  option(EIGEN_TEST_SSE4_2 \"Enable/Disable SSE4.2 in tests/examples\" OFF)\n  if(EIGEN_TEST_SSE4_2)\n    set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -msse4.2\")\n    message(STATUS \"Enabling SSE4.2 in tests/examples\")\n  endif()\n\n  option(EIGEN_TEST_AVX \"Enable/Disable AVX in tests/examples\" OFF)\n  if(EIGEN_TEST_AVX)\n    set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -mavx\")\n    message(STATUS \"Enabling AVX in tests/examples\")\n  endif()\n\n  option(EIGEN_TEST_FMA \"Enable/Disable FMA in tests/examples\" OFF)\n  if(EIGEN_TEST_FMA AND NOT EIGEN_TEST_NEON)\n    set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -mfma\")\n    message(STATUS \"Enabling FMA in tests/examples\")\n  endif()\n\n  option(EIGEN_TEST_AVX512 \"Enable/Disable AVX512 in tests/examples\" OFF)\n  if(EIGEN_TEST_AVX512)\n    set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -mavx512f -mfma -DEIGEN_ENABLE_AVX512\")\n    if (NOT \"${CMAKE_CXX_COMPILER_ID}\" STREQUAL \"Clang\")\n      set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -fabi-version=6\")\n    endif()\n    message(STATUS \"Enabling AVX512 in tests/examples\")\n  endif()\n\n  option(EIGEN_TEST_F16C \"Enable/Disable F16C in tests/examples\" OFF)\n  if(EIGEN_TEST_F16C)\n    set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -mf16c\")\n    message(STATUS \"Enabling F16C in tests/examples\")\n  endif()\n\n  option(EIGEN_TEST_ALTIVEC \"Enable/Disable AltiVec in tests/examples\" OFF)\n  if(EIGEN_TEST_ALTIVEC)\n    set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -maltivec -mabi=altivec\")\n    message(STATUS \"Enabling AltiVec in tests/examples\")\n  endif()\n\n  option(EIGEN_TEST_VSX \"Enable/Disable VSX in tests/examples\" OFF)\n  if(EIGEN_TEST_VSX)\n    set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -m64 -mvsx\")\n    message(STATUS \"Enabling VSX in tests/examples\")\n  endif()\n\n  option(EIGEN_TEST_MSA \"Enable/Disable MSA in tests/examples\" OFF)\n  if(EIGEN_TEST_MSA)\n    set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -mmsa\")\n    message(STATUS \"Enabling MSA in tests/examples\")\n  endif()\n\n  option(EIGEN_TEST_NEON \"Enable/Disable Neon in tests/examples\" OFF)\n  if(EIGEN_TEST_NEON)\n    if(EIGEN_TEST_FMA)\n      set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -mfpu=neon-vfpv4\")\n    else()\n      set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -mfpu=neon\")\n    endif()\n    set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -mfloat-abi=hard\")\n    message(STATUS \"Enabling NEON in tests/examples\")\n  endif()\n\n  option(EIGEN_TEST_NEON64 \"Enable/Disable Neon in tests/examples\" OFF)\n  if(EIGEN_TEST_NEON64)\n    set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS}\")\n    message(STATUS \"Enabling NEON in tests/examples\")\n  endif()\n\n  option(EIGEN_TEST_Z13 \"Enable/Disable S390X(zEC13) ZVECTOR in tests/examples\" OFF)\n  if(EIGEN_TEST_Z13)\n    set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -march=z13 -mzvector\")\n    message(STATUS \"Enabling S390X(zEC13) ZVECTOR in tests/examples\")\n  endif()\n\n  option(EIGEN_TEST_Z14 \"Enable/Disable S390X(zEC14) ZVECTOR in tests/examples\" OFF)\n  if(EIGEN_TEST_Z14)\n    set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -march=z14 -mzvector\")\n    message(STATUS \"Enabling S390X(zEC13) ZVECTOR in tests/examples\")\n  endif()\n\n  check_cxx_compiler_flag(\"-fopenmp\" COMPILER_SUPPORT_OPENMP)\n  if(COMPILER_SUPPORT_OPENMP)\n    option(EIGEN_TEST_OPENMP \"Enable/Disable OpenMP in tests/examples\" OFF)\n    if(EIGEN_TEST_OPENMP)\n      set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -fopenmp\")\n      message(STATUS \"Enabling OpenMP in tests/examples\")\n    endif()\n  endif()\n\nelse()\n\n  # C4127 - conditional expression is constant\n  # C4714 - marked as __forceinline not inlined (I failed to deactivate it selectively)\n  #         We can disable this warning in the unit tests since it is clear that it occurs\n  #         because we are oftentimes returning objects that have a destructor or may\n  #         throw exceptions - in particular in the unit tests we are throwing extra many\n  #         exceptions to cover indexing errors.\n  # C4505 - unreferenced local function has been removed (impossible to deactivate selectively)\n  set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} /EHsc /wd4127 /wd4505 /wd4714\")\n\n  # replace all /Wx by /W4\n  string(REGEX REPLACE \"/W[0-9]\" \"/W4\" CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS}\")\n\n  check_cxx_compiler_flag(\"/openmp\" COMPILER_SUPPORT_OPENMP)\n  if(COMPILER_SUPPORT_OPENMP)\n    option(EIGEN_TEST_OPENMP \"Enable/Disable OpenMP in tests/examples\" OFF)\n    if(EIGEN_TEST_OPENMP)\n      set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} /openmp\")\n      message(STATUS \"Enabling OpenMP in tests/examples\")\n    endif()\n  endif()\n\n  option(EIGEN_TEST_SSE2 \"Enable/Disable SSE2 in tests/examples\" OFF)\n  if(EIGEN_TEST_SSE2)\n    if(NOT CMAKE_CL_64)\n      # arch is not supported on 64 bit systems, SSE is enabled automatically.\n      set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} /arch:SSE2\")\n    endif()\n    message(STATUS \"Enabling SSE2 in tests/examples\")\n  endif()\n\n  option(EIGEN_TEST_AVX \"Enable/Disable AVX in tests/examples\" OFF)\n  if(EIGEN_TEST_AVX)\n    set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} /arch:AVX\")\n    message(STATUS \"Enabling AVX in tests/examples\")\n  endif()\n\n  option(EIGEN_TEST_FMA \"Enable/Disable FMA/AVX2 in tests/examples\" OFF)\n  if(EIGEN_TEST_FMA AND NOT EIGEN_TEST_NEON)\n    set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} /arch:AVX2\")\n    message(STATUS \"Enabling FMA/AVX2 in tests/examples\")\n  endif()\n\nendif()\n\noption(EIGEN_TEST_NO_EXPLICIT_VECTORIZATION \"Disable explicit vectorization in tests/examples\" OFF)\noption(EIGEN_TEST_X87 \"Force using X87 instructions. Implies no vectorization.\" OFF)\noption(EIGEN_TEST_32BIT \"Force generating 32bit code.\" OFF)\n\nif(EIGEN_TEST_X87)\n  set(EIGEN_TEST_NO_EXPLICIT_VECTORIZATION ON)\n  if(CMAKE_COMPILER_IS_GNUCXX)\n    set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -mfpmath=387\")\n    message(STATUS \"Forcing use of x87 instructions in tests/examples\")\n  else()\n    message(STATUS \"EIGEN_TEST_X87 ignored on your compiler\")\n  endif()\nendif()\n\nif(EIGEN_TEST_32BIT)\n  if(CMAKE_COMPILER_IS_GNUCXX)\n    set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -m32\")\n    message(STATUS \"Forcing generation of 32-bit code in tests/examples\")\n  else()\n    message(STATUS \"EIGEN_TEST_32BIT ignored on your compiler\")\n  endif()\nendif()\n\nif(EIGEN_TEST_NO_EXPLICIT_VECTORIZATION)\n  add_definitions(-DEIGEN_DONT_VECTORIZE=1)\n  message(STATUS \"Disabling vectorization in tests/examples\")\nendif()\n\noption(EIGEN_TEST_NO_EXPLICIT_ALIGNMENT \"Disable explicit alignment (hence vectorization) in tests/examples\" OFF)\nif(EIGEN_TEST_NO_EXPLICIT_ALIGNMENT)\n  add_definitions(-DEIGEN_DONT_ALIGN=1)\n  message(STATUS \"Disabling alignment in tests/examples\")\nendif()\n\noption(EIGEN_TEST_NO_EXCEPTIONS \"Disables C++ exceptions\" OFF)\nif(EIGEN_TEST_NO_EXCEPTIONS)\n  ei_add_cxx_compiler_flag(\"-fno-exceptions\")\n  message(STATUS \"Disabling exceptions in tests/examples\")\nendif()\n\nset(EIGEN_CUDA_COMPUTE_ARCH 30 CACHE STRING \"The CUDA compute architecture level to target when compiling CUDA code\")\n\ninclude_directories(${CMAKE_CURRENT_SOURCE_DIR})\n\n# Backward compatibility support for EIGEN_INCLUDE_INSTALL_DIR\nif(EIGEN_INCLUDE_INSTALL_DIR)\n  message(WARNING \"EIGEN_INCLUDE_INSTALL_DIR is deprecated. Use INCLUDE_INSTALL_DIR instead.\")\nendif()\n\nif(EIGEN_INCLUDE_INSTALL_DIR AND NOT INCLUDE_INSTALL_DIR)\n  set(INCLUDE_INSTALL_DIR ${EIGEN_INCLUDE_INSTALL_DIR}\n      CACHE PATH \"The directory relative to CMAKE_PREFIX_PATH where Eigen header files are installed\")\nelse()\n  set(INCLUDE_INSTALL_DIR\n      \"${CMAKE_INSTALL_INCLUDEDIR}/eigen3\"\n      CACHE PATH \"The directory relative to CMAKE_PREFIX_PATH where Eigen header files are installed\"\n      )\nendif()\nset(CMAKEPACKAGE_INSTALL_DIR\n    \"${CMAKE_INSTALL_DATADIR}/eigen3/cmake\"\n    CACHE PATH \"The directory relative to CMAKE_PREFIX_PATH where Eigen3Config.cmake is installed\"\n    )\nset(PKGCONFIG_INSTALL_DIR\n    \"${CMAKE_INSTALL_DATADIR}/pkgconfig\"\n    CACHE PATH \"The directory relative to CMAKE_PREFIX_PATH where eigen3.pc is installed\"\n    )\n\n\n# similar to set_target_properties but append the property instead of overwriting it\nmacro(ei_add_target_property target prop value)\n\n  get_target_property(previous ${target} ${prop})\n  # if the property wasn't previously set, ${previous} is now \"previous-NOTFOUND\" which cmake allows catching with plain if()\n  if(NOT previous)\n    set(previous \"\")\n  endif()\n  set_target_properties(${target} PROPERTIES ${prop} \"${previous} ${value}\")\nendmacro()\n\n# install(FILES\n#   signature_of_eigen3_matrix_library\n#   DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel\n#   )\n\n# if(EIGEN_BUILD_PKGCONFIG)\n#     configure_file(eigen3.pc.in eigen3.pc @ONLY)\n#     install(FILES ${CMAKE_CURRENT_BINARY_DIR}/eigen3.pc\n#         DESTINATION ${PKGCONFIG_INSTALL_DIR}\n#         )\n# endif()\n\n# install(DIRECTORY Eigen DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel)\n\nadd_subdirectory(doc EXCLUDE_FROM_ALL)\n\n# option(BUILD_TESTING \"Enable creation of Eigen tests.\" OFF)\n# if(BUILD_TESTING)\n#   include(EigenConfigureTesting)\n\n#   if(EIGEN_LEAVE_TEST_IN_ALL_TARGET)\n#     add_subdirectory(test) # can't do EXCLUDE_FROM_ALL here, breaks CTest\n#   else()\n#     add_subdirectory(test EXCLUDE_FROM_ALL)\n#   endif()\n\n#   add_subdirectory(failtest)\n# endif()\n\nif(EIGEN_LEAVE_TEST_IN_ALL_TARGET)\n  add_subdirectory(blas)\n  add_subdirectory(lapack)\nelse()\n  add_subdirectory(blas EXCLUDE_FROM_ALL)\n  add_subdirectory(lapack EXCLUDE_FROM_ALL)\nendif()\n\n# add SYCL\noption(EIGEN_TEST_SYCL \"Add Sycl support.\" OFF)\noption(EIGEN_SYCL_TRISYCL \"Use the triSYCL Sycl implementation (ComputeCPP by default).\" OFF)\nif(EIGEN_TEST_SYCL)\n  set (CMAKE_MODULE_PATH \"${CMAKE_ROOT}/Modules\" \"cmake/Modules/\" \"${CMAKE_MODULE_PATH}\")\n  if(EIGEN_SYCL_TRISYCL)\n    message(STATUS \"Using triSYCL\")\n    include(FindTriSYCL)\n  else()\n    message(STATUS \"Using ComputeCPP SYCL\")\n    include(FindComputeCpp)\n    set(COMPUTECPP_DRIVER_DEFAULT_VALUE OFF)\n    if (NOT MSVC)\n      set(COMPUTECPP_DRIVER_DEFAULT_VALUE ON)\n    endif()\n    option(COMPUTECPP_USE_COMPILER_DRIVER\n      \"Use ComputeCpp driver instead of a 2 steps compilation\"\n      ${COMPUTECPP_DRIVER_DEFAULT_VALUE}\n    )\n  endif(EIGEN_SYCL_TRISYCL)\n  option(EIGEN_DONT_VECTORIZE_SYCL \"Don't use vectorisation in the SYCL tests.\" OFF)\n  if(EIGEN_DONT_VECTORIZE_SYCL)\n    message(STATUS \"Disabling SYCL vectorization in tests/examples\")\n    # When disabling SYCL vectorization, also disable Eigen default vectorization\n    add_definitions(-DEIGEN_DONT_VECTORIZE=1)\n    add_definitions(-DEIGEN_DONT_VECTORIZE_SYCL=1)\n  endif()\nendif()\n\nadd_subdirectory(unsupported)\n\nadd_subdirectory(demos EXCLUDE_FROM_ALL)\n\n# must be after test and unsupported, for configuring buildtests.in\nadd_subdirectory(scripts EXCLUDE_FROM_ALL)\n\n# TODO: consider also replacing EIGEN_BUILD_BTL by a custom target \"make btl\"?\nif(EIGEN_BUILD_BTL)\n  add_subdirectory(bench/btl EXCLUDE_FROM_ALL)\nendif()\n\nif(NOT WIN32)\n  add_subdirectory(bench/spbench EXCLUDE_FROM_ALL)\nendif()\n\nconfigure_file(scripts/cdashtesting.cmake.in cdashtesting.cmake @ONLY)\n\n# if(BUILD_TESTING)\n#   ei_testing_print_summary()\n# endif()\n\nset ( EIGEN_VERSION_STRING ${EIGEN_VERSION_NUMBER} )\nset ( EIGEN_VERSION_MAJOR  ${EIGEN_WORLD_VERSION} )\nset ( EIGEN_VERSION_MINOR  ${EIGEN_MAJOR_VERSION} )\nset ( EIGEN_VERSION_PATCH  ${EIGEN_MINOR_VERSION} )\nset ( EIGEN_DEFINITIONS \"\")\nset ( EIGEN_INCLUDE_DIR \"${CMAKE_INSTALL_PREFIX}/${INCLUDE_INSTALL_DIR}\" )\nset ( EIGEN_ROOT_DIR ${CMAKE_INSTALL_PREFIX} )\n\n# Interface libraries require at least CMake 3.0\nif (NOT CMAKE_VERSION VERSION_LESS 3.0)\n  include (CMakePackageConfigHelpers)\n\n  # Imported target support\n  add_library (eigen INTERFACE)\n  add_library (Eigen3::Eigen ALIAS eigen)\n  target_compile_definitions (eigen INTERFACE ${EIGEN_DEFINITIONS})\n  target_include_directories (eigen INTERFACE\n    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>\n    $<INSTALL_INTERFACE:${INCLUDE_INSTALL_DIR}>\n  )\n\n  # Export as title case Eigen\n  set_target_properties (eigen PROPERTIES EXPORT_NAME Eigen)\n\n  # install (TARGETS eigen EXPORT Eigen3Targets)\n\n  configure_package_config_file (\n    ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Eigen3Config.cmake.in\n    ${CMAKE_CURRENT_BINARY_DIR}/Eigen3Config.cmake\n    PATH_VARS EIGEN_INCLUDE_DIR EIGEN_ROOT_DIR\n    INSTALL_DESTINATION ${CMAKEPACKAGE_INSTALL_DIR}\n    NO_CHECK_REQUIRED_COMPONENTS_MACRO # Eigen does not provide components\n  )\n  # Remove CMAKE_SIZEOF_VOID_P from Eigen3ConfigVersion.cmake since Eigen does\n  # not depend on architecture specific settings or libraries. More\n  # specifically, an Eigen3Config.cmake generated from a 64 bit target can be\n  # used for 32 bit targets as well (and vice versa).\n  set (_Eigen3_CMAKE_SIZEOF_VOID_P ${CMAKE_SIZEOF_VOID_P})\n  unset (CMAKE_SIZEOF_VOID_P)\n  write_basic_package_version_file (Eigen3ConfigVersion.cmake\n                                    VERSION ${EIGEN_VERSION_NUMBER}\n                                    COMPATIBILITY SameMajorVersion)\n  set (CMAKE_SIZEOF_VOID_P ${_Eigen3_CMAKE_SIZEOF_VOID_P})\n\n  # The Eigen target will be located in the Eigen3 namespace. Other CMake\n  # targets can refer to it using Eigen3::Eigen.\n  export (TARGETS eigen NAMESPACE Eigen3:: FILE Eigen3Targets.cmake)\n  # Export Eigen3 package to CMake registry such that it can be easily found by\n  # CMake even if it has not been installed to a standard directory.\n  export (PACKAGE Eigen3)\n\n  # install (EXPORT Eigen3Targets NAMESPACE Eigen3:: DESTINATION ${CMAKEPACKAGE_INSTALL_DIR})\n\nelse ()\n  # Fallback to legacy Eigen3Config.cmake without the imported target\n\n  # If CMakePackageConfigHelpers module is available (CMake >= 2.8.8)\n  # create a relocatable Config file, otherwise leave the hardcoded paths\n  # include(CMakePackageConfigHelpers OPTIONAL RESULT_VARIABLE CPCH_PATH)\n\n  if(CPCH_PATH)\n    configure_package_config_file (\n      ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Eigen3ConfigLegacy.cmake.in\n      ${CMAKE_CURRENT_BINARY_DIR}/Eigen3Config.cmake\n      PATH_VARS EIGEN_INCLUDE_DIR EIGEN_ROOT_DIR\n      INSTALL_DESTINATION ${CMAKEPACKAGE_INSTALL_DIR}\n      NO_CHECK_REQUIRED_COMPONENTS_MACRO # Eigen does not provide components\n    )\n  else()\n    # The PACKAGE_* variables are defined by the configure_package_config_file\n    # but without it we define them manually to the hardcoded paths\n    set(PACKAGE_INIT \"\")\n    set(PACKAGE_EIGEN_INCLUDE_DIR ${EIGEN_INCLUDE_DIR})\n    set(PACKAGE_EIGEN_ROOT_DIR ${EIGEN_ROOT_DIR})\n    configure_file ( ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Eigen3ConfigLegacy.cmake.in\n                     ${CMAKE_CURRENT_BINARY_DIR}/Eigen3Config.cmake\n                     @ONLY ESCAPE_QUOTES )\n  endif()\n\n  write_basic_package_version_file( Eigen3ConfigVersion.cmake\n                                    VERSION ${EIGEN_VERSION_NUMBER}\n                                    COMPATIBILITY SameMajorVersion )\n\nendif ()\n\n# install ( FILES ${CMAKE_CURRENT_SOURCE_DIR}/cmake/UseEigen3.cmake\n#                 ${CMAKE_CURRENT_BINARY_DIR}/Eigen3Config.cmake\n#                 ${CMAKE_CURRENT_BINARY_DIR}/Eigen3ConfigVersion.cmake\n#           DESTINATION ${CMAKEPACKAGE_INSTALL_DIR} )\n\n"
  },
  {
    "path": "3rdparty/eigen3/COPYING.BSD",
    "content": "/*\n Copyright (c) 2011, Intel Corporation. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without modification,\n are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n   list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n * Neither the name of Intel Corporation nor the names of its contributors may\n   be used to endorse or promote products derived from this software without\n   specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\n ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n"
  },
  {
    "path": "3rdparty/eigen3/COPYING.GPL",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n    <program>  Copyright (C) <year>  <name of author>\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n<http://www.gnu.org/licenses/>.\n\n  The GNU General Public License does not permit incorporating your program\ninto proprietary programs.  If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.  But first, please read\n<http://www.gnu.org/philosophy/why-not-lgpl.html>.\n"
  },
  {
    "path": "3rdparty/eigen3/COPYING.LGPL",
    "content": "                  GNU LESSER GENERAL PUBLIC LICENSE\n                       Version 2.1, February 1999\n\n Copyright (C) 1991, 1999 Free Software Foundation, Inc.\n 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n[This is the first released version of the Lesser GPL.  It also counts\n as the successor of the GNU Library Public License, version 2, hence\n the version number 2.1.]\n\n                            Preamble\n\n  The licenses for most software are designed to take away your\nfreedom to share and change it.  By contrast, the GNU General Public\nLicenses are intended to guarantee your freedom to share and change\nfree software--to make sure the software is free for all its users.\n\n  This license, the Lesser General Public License, applies to some\nspecially designated software packages--typically libraries--of the\nFree Software Foundation and other authors who decide to use it.  You\ncan use it too, but we suggest you first think carefully about whether\nthis license or the ordinary General Public License is the better\nstrategy to use in any particular case, based on the explanations below.\n\n  When we speak of free software, we are referring to freedom of use,\nnot price.  Our General Public Licenses are designed to make sure that\nyou have the freedom to distribute copies of free software (and charge\nfor this service if you wish); that you receive source code or can get\nit if you want it; that you can change the software and use pieces of\nit in new free programs; and that you are informed that you can do\nthese things.\n\n  To protect your rights, we need to make restrictions that forbid\ndistributors to deny you these rights or to ask you to surrender these\nrights.  These restrictions translate to certain responsibilities for\nyou if you distribute copies of the library or if you modify it.\n\n  For example, if you distribute copies of the library, whether gratis\nor for a fee, you must give the recipients all the rights that we gave\nyou.  You must make sure that they, too, receive or can get the source\ncode.  If you link other code with the library, you must provide\ncomplete object files to the recipients, so that they can relink them\nwith the library after making changes to the library and recompiling\nit.  And you must show them these terms so they know their rights.\n\n  We protect your rights with a two-step method: (1) we copyright the\nlibrary, and (2) we offer you this license, which gives you legal\npermission to copy, distribute and/or modify the library.\n\n  To protect each distributor, we want to make it very clear that\nthere is no warranty for the free library.  Also, if the library is\nmodified by someone else and passed on, the recipients should know\nthat what they have is not the original version, so that the original\nauthor's reputation will not be affected by problems that might be\nintroduced by others.\n\f\n  Finally, software patents pose a constant threat to the existence of\nany free program.  We wish to make sure that a company cannot\neffectively restrict the users of a free program by obtaining a\nrestrictive license from a patent holder.  Therefore, we insist that\nany patent license obtained for a version of the library must be\nconsistent with the full freedom of use specified in this license.\n\n  Most GNU software, including some libraries, is covered by the\nordinary GNU General Public License.  This license, the GNU Lesser\nGeneral Public License, applies to certain designated libraries, and\nis quite different from the ordinary General Public License.  We use\nthis license for certain libraries in order to permit linking those\nlibraries into non-free programs.\n\n  When a program is linked with a library, whether statically or using\na shared library, the combination of the two is legally speaking a\ncombined work, a derivative of the original library.  The ordinary\nGeneral Public License therefore permits such linking only if the\nentire combination fits its criteria of freedom.  The Lesser General\nPublic License permits more lax criteria for linking other code with\nthe library.\n\n  We call this license the \"Lesser\" General Public License because it\ndoes Less to protect the user's freedom than the ordinary General\nPublic License.  It also provides other free software developers Less\nof an advantage over competing non-free programs.  These disadvantages\nare the reason we use the ordinary General Public License for many\nlibraries.  However, the Lesser license provides advantages in certain\nspecial circumstances.\n\n  For example, on rare occasions, there may be a special need to\nencourage the widest possible use of a certain library, so that it becomes\na de-facto standard.  To achieve this, non-free programs must be\nallowed to use the library.  A more frequent case is that a free\nlibrary does the same job as widely used non-free libraries.  In this\ncase, there is little to gain by limiting the free library to free\nsoftware only, so we use the Lesser General Public License.\n\n  In other cases, permission to use a particular library in non-free\nprograms enables a greater number of people to use a large body of\nfree software.  For example, permission to use the GNU C Library in\nnon-free programs enables many more people to use the whole GNU\noperating system, as well as its variant, the GNU/Linux operating\nsystem.\n\n  Although the Lesser General Public License is Less protective of the\nusers' freedom, it does ensure that the user of a program that is\nlinked with the Library has the freedom and the wherewithal to run\nthat program using a modified version of the Library.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.  Pay close attention to the difference between a\n\"work based on the library\" and a \"work that uses the library\".  The\nformer contains code derived from the library, whereas the latter must\nbe combined with the library in order to run.\n\f\n                  GNU LESSER GENERAL PUBLIC LICENSE\n   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n  0. This License Agreement applies to any software library or other\nprogram which contains a notice placed by the copyright holder or\nother authorized party saying it may be distributed under the terms of\nthis Lesser General Public License (also called \"this License\").\nEach licensee is addressed as \"you\".\n\n  A \"library\" means a collection of software functions and/or data\nprepared so as to be conveniently linked with application programs\n(which use some of those functions and data) to form executables.\n\n  The \"Library\", below, refers to any such software library or work\nwhich has been distributed under these terms.  A \"work based on the\nLibrary\" means either the Library or any derivative work under\ncopyright law: that is to say, a work containing the Library or a\nportion of it, either verbatim or with modifications and/or translated\nstraightforwardly into another language.  (Hereinafter, translation is\nincluded without limitation in the term \"modification\".)\n\n  \"Source code\" for a work means the preferred form of the work for\nmaking modifications to it.  For a library, complete source code means\nall the source code for all modules it contains, plus any associated\ninterface definition files, plus the scripts used to control compilation\nand installation of the library.\n\n  Activities other than copying, distribution and modification are not\ncovered by this License; they are outside its scope.  The act of\nrunning a program using the Library is not restricted, and output from\nsuch a program is covered only if its contents constitute a work based\non the Library (independent of the use of the Library in a tool for\nwriting it).  Whether that is true depends on what the Library does\nand what the program that uses the Library does.\n\n  1. You may copy and distribute verbatim copies of the Library's\ncomplete source code as you receive it, in any medium, provided that\nyou conspicuously and appropriately publish on each copy an\nappropriate copyright notice and disclaimer of warranty; keep intact\nall the notices that refer to this License and to the absence of any\nwarranty; and distribute a copy of this License along with the\nLibrary.\n\n  You may charge a fee for the physical act of transferring a copy,\nand you may at your option offer warranty protection in exchange for a\nfee.\n\f\n  2. You may modify your copy or copies of the Library or any portion\nof it, thus forming a work based on the Library, and copy and\ndistribute such modifications or work under the terms of Section 1\nabove, provided that you also meet all of these conditions:\n\n    a) The modified work must itself be a software library.\n\n    b) You must cause the files modified to carry prominent notices\n    stating that you changed the files and the date of any change.\n\n    c) You must cause the whole of the work to be licensed at no\n    charge to all third parties under the terms of this License.\n\n    d) If a facility in the modified Library refers to a function or a\n    table of data to be supplied by an application program that uses\n    the facility, other than as an argument passed when the facility\n    is invoked, then you must make a good faith effort to ensure that,\n    in the event an application does not supply such function or\n    table, the facility still operates, and performs whatever part of\n    its purpose remains meaningful.\n\n    (For example, a function in a library to compute square roots has\n    a purpose that is entirely well-defined independent of the\n    application.  Therefore, Subsection 2d requires that any\n    application-supplied function or table used by this function must\n    be optional: if the application does not supply it, the square\n    root function must still compute square roots.)\n\nThese requirements apply to the modified work as a whole.  If\nidentifiable sections of that work are not derived from the Library,\nand can be reasonably considered independent and separate works in\nthemselves, then this License, and its terms, do not apply to those\nsections when you distribute them as separate works.  But when you\ndistribute the same sections as part of a whole which is a work based\non the Library, the distribution of the whole must be on the terms of\nthis License, whose permissions for other licensees extend to the\nentire whole, and thus to each and every part regardless of who wrote\nit.\n\nThus, it is not the intent of this section to claim rights or contest\nyour rights to work written entirely by you; rather, the intent is to\nexercise the right to control the distribution of derivative or\ncollective works based on the Library.\n\nIn addition, mere aggregation of another work not based on the Library\nwith the Library (or with a work based on the Library) on a volume of\na storage or distribution medium does not bring the other work under\nthe scope of this License.\n\n  3. You may opt to apply the terms of the ordinary GNU General Public\nLicense instead of this License to a given copy of the Library.  To do\nthis, you must alter all the notices that refer to this License, so\nthat they refer to the ordinary GNU General Public License, version 2,\ninstead of to this License.  (If a newer version than version 2 of the\nordinary GNU General Public License has appeared, then you can specify\nthat version instead if you wish.)  Do not make any other change in\nthese notices.\n\f\n  Once this change is made in a given copy, it is irreversible for\nthat copy, so the ordinary GNU General Public License applies to all\nsubsequent copies and derivative works made from that copy.\n\n  This option is useful when you wish to copy part of the code of\nthe Library into a program that is not a library.\n\n  4. You may copy and distribute the Library (or a portion or\nderivative of it, under Section 2) in object code or executable form\nunder the terms of Sections 1 and 2 above provided that you accompany\nit with the complete corresponding machine-readable source code, which\nmust be distributed under the terms of Sections 1 and 2 above on a\nmedium customarily used for software interchange.\n\n  If distribution of object code is made by offering access to copy\nfrom a designated place, then offering equivalent access to copy the\nsource code from the same place satisfies the requirement to\ndistribute the source code, even though third parties are not\ncompelled to copy the source along with the object code.\n\n  5. A program that contains no derivative of any portion of the\nLibrary, but is designed to work with the Library by being compiled or\nlinked with it, is called a \"work that uses the Library\".  Such a\nwork, in isolation, is not a derivative work of the Library, and\ntherefore falls outside the scope of this License.\n\n  However, linking a \"work that uses the Library\" with the Library\ncreates an executable that is a derivative of the Library (because it\ncontains portions of the Library), rather than a \"work that uses the\nlibrary\".  The executable is therefore covered by this License.\nSection 6 states terms for distribution of such executables.\n\n  When a \"work that uses the Library\" uses material from a header file\nthat is part of the Library, the object code for the work may be a\nderivative work of the Library even though the source code is not.\nWhether this is true is especially significant if the work can be\nlinked without the Library, or if the work is itself a library.  The\nthreshold for this to be true is not precisely defined by law.\n\n  If such an object file uses only numerical parameters, data\nstructure layouts and accessors, and small macros and small inline\nfunctions (ten lines or less in length), then the use of the object\nfile is unrestricted, regardless of whether it is legally a derivative\nwork.  (Executables containing this object code plus portions of the\nLibrary will still fall under Section 6.)\n\n  Otherwise, if the work is a derivative of the Library, you may\ndistribute the object code for the work under the terms of Section 6.\nAny executables containing that work also fall under Section 6,\nwhether or not they are linked directly with the Library itself.\n\f\n  6. As an exception to the Sections above, you may also combine or\nlink a \"work that uses the Library\" with the Library to produce a\nwork containing portions of the Library, and distribute that work\nunder terms of your choice, provided that the terms permit\nmodification of the work for the customer's own use and reverse\nengineering for debugging such modifications.\n\n  You must give prominent notice with each copy of the work that the\nLibrary is used in it and that the Library and its use are covered by\nthis License.  You must supply a copy of this License.  If the work\nduring execution displays copyright notices, you must include the\ncopyright notice for the Library among them, as well as a reference\ndirecting the user to the copy of this License.  Also, you must do one\nof these things:\n\n    a) Accompany the work with the complete corresponding\n    machine-readable source code for the Library including whatever\n    changes were used in the work (which must be distributed under\n    Sections 1 and 2 above); and, if the work is an executable linked\n    with the Library, with the complete machine-readable \"work that\n    uses the Library\", as object code and/or source code, so that the\n    user can modify the Library and then relink to produce a modified\n    executable containing the modified Library.  (It is understood\n    that the user who changes the contents of definitions files in the\n    Library will not necessarily be able to recompile the application\n    to use the modified definitions.)\n\n    b) Use a suitable shared library mechanism for linking with the\n    Library.  A suitable mechanism is one that (1) uses at run time a\n    copy of the library already present on the user's computer system,\n    rather than copying library functions into the executable, and (2)\n    will operate properly with a modified version of the library, if\n    the user installs one, as long as the modified version is\n    interface-compatible with the version that the work was made with.\n\n    c) Accompany the work with a written offer, valid for at\n    least three years, to give the same user the materials\n    specified in Subsection 6a, above, for a charge no more\n    than the cost of performing this distribution.\n\n    d) If distribution of the work is made by offering access to copy\n    from a designated place, offer equivalent access to copy the above\n    specified materials from the same place.\n\n    e) Verify that the user has already received a copy of these\n    materials or that you have already sent this user a copy.\n\n  For an executable, the required form of the \"work that uses the\nLibrary\" must include any data and utility programs needed for\nreproducing the executable from it.  However, as a special exception,\nthe materials to be distributed need not include anything that is\nnormally distributed (in either source or binary form) with the major\ncomponents (compiler, kernel, and so on) of the operating system on\nwhich the executable runs, unless that component itself accompanies\nthe executable.\n\n  It may happen that this requirement contradicts the license\nrestrictions of other proprietary libraries that do not normally\naccompany the operating system.  Such a contradiction means you cannot\nuse both them and the Library together in an executable that you\ndistribute.\n\f\n  7. You may place library facilities that are a work based on the\nLibrary side-by-side in a single library together with other library\nfacilities not covered by this License, and distribute such a combined\nlibrary, provided that the separate distribution of the work based on\nthe Library and of the other library facilities is otherwise\npermitted, and provided that you do these two things:\n\n    a) Accompany the combined library with a copy of the same work\n    based on the Library, uncombined with any other library\n    facilities.  This must be distributed under the terms of the\n    Sections above.\n\n    b) Give prominent notice with the combined library of the fact\n    that part of it is a work based on the Library, and explaining\n    where to find the accompanying uncombined form of the same work.\n\n  8. You may not copy, modify, sublicense, link with, or distribute\nthe Library except as expressly provided under this License.  Any\nattempt otherwise to copy, modify, sublicense, link with, or\ndistribute the Library is void, and will automatically terminate your\nrights under this License.  However, parties who have received copies,\nor rights, from you under this License will not have their licenses\nterminated so long as such parties remain in full compliance.\n\n  9. You are not required to accept this License, since you have not\nsigned it.  However, nothing else grants you permission to modify or\ndistribute the Library or its derivative works.  These actions are\nprohibited by law if you do not accept this License.  Therefore, by\nmodifying or distributing the Library (or any work based on the\nLibrary), you indicate your acceptance of this License to do so, and\nall its terms and conditions for copying, distributing or modifying\nthe Library or works based on it.\n\n  10. Each time you redistribute the Library (or any work based on the\nLibrary), the recipient automatically receives a license from the\noriginal licensor to copy, distribute, link with or modify the Library\nsubject to these terms and conditions.  You may not impose any further\nrestrictions on the recipients' exercise of the rights granted herein.\nYou are not responsible for enforcing compliance by third parties with\nthis License.\n\f\n  11. If, as a consequence of a court judgment or allegation of patent\ninfringement or for any other reason (not limited to patent issues),\nconditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot\ndistribute so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you\nmay not distribute the Library at all.  For example, if a patent\nlicense would not permit royalty-free redistribution of the Library by\nall those who receive copies directly or indirectly through you, then\nthe only way you could satisfy both it and this License would be to\nrefrain entirely from distribution of the Library.\n\nIf any portion of this section is held invalid or unenforceable under any\nparticular circumstance, the balance of the section is intended to apply,\nand the section as a whole is intended to apply in other circumstances.\n\nIt is not the purpose of this section to induce you to infringe any\npatents or other property right claims or to contest validity of any\nsuch claims; this section has the sole purpose of protecting the\nintegrity of the free software distribution system which is\nimplemented by public license practices.  Many people have made\ngenerous contributions to the wide range of software distributed\nthrough that system in reliance on consistent application of that\nsystem; it is up to the author/donor to decide if he or she is willing\nto distribute software through any other system and a licensee cannot\nimpose that choice.\n\nThis section is intended to make thoroughly clear what is believed to\nbe a consequence of the rest of this License.\n\n  12. If the distribution and/or use of the Library is restricted in\ncertain countries either by patents or by copyrighted interfaces, the\noriginal copyright holder who places the Library under this License may add\nan explicit geographical distribution limitation excluding those countries,\nso that distribution is permitted only in or among countries not thus\nexcluded.  In such case, this License incorporates the limitation as if\nwritten in the body of this License.\n\n  13. The Free Software Foundation may publish revised and/or new\nversions of the Lesser General Public License from time to time.\nSuch new versions will be similar in spirit to the present version,\nbut may differ in detail to address new problems or concerns.\n\nEach version is given a distinguishing version number.  If the Library\nspecifies a version number of this License which applies to it and\n\"any later version\", you have the option of following the terms and\nconditions either of that version or of any later version published by\nthe Free Software Foundation.  If the Library does not specify a\nlicense version number, you may choose any version ever published by\nthe Free Software Foundation.\n\f\n  14. If you wish to incorporate parts of the Library into other free\nprograms whose distribution conditions are incompatible with these,\nwrite to the author to ask for permission.  For software which is\ncopyrighted by the Free Software Foundation, write to the Free\nSoftware Foundation; we sometimes make exceptions for this.  Our\ndecision will be guided by the two goals of preserving the free status\nof all derivatives of our free software and of promoting the sharing\nand reuse of software generally.\n\n                            NO WARRANTY\n\n  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO\nWARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.\nEXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR\nOTHER PARTIES PROVIDE THE LIBRARY \"AS IS\" WITHOUT WARRANTY OF ANY\nKIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE\nLIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME\nTHE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN\nWRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY\nAND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU\nFOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR\nCONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE\nLIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING\nRENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A\nFAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF\nSUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH\nDAMAGES.\n\n                     END OF TERMS AND CONDITIONS\n\f\n           How to Apply These Terms to Your New Libraries\n\n  If you develop a new library, and you want it to be of the greatest\npossible use to the public, we recommend making it free software that\neveryone can redistribute and change.  You can do so by permitting\nredistribution under these terms (or, alternatively, under the terms of the\nordinary General Public License).\n\n  To apply these terms, attach the following notices to the library.  It is\nsafest to attach them to the start of each source file to most effectively\nconvey the exclusion of warranty; and each file should have at least the\n\"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the library's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\nAlso add information on how to contact you by electronic and paper mail.\n\nYou should also get your employer (if you work as a programmer) or your\nschool, if any, to sign a \"copyright disclaimer\" for the library, if\nnecessary.  Here is a sample; alter the names:\n\n  Yoyodyne, Inc., hereby disclaims all copyright interest in the\n  library `Frob' (a library for tweaking knobs) written by James Random Hacker.\n\n  <signature of Ty Coon>, 1 April 1990\n  Ty Coon, President of Vice\n\nThat's all there is to it!\n"
  },
  {
    "path": "3rdparty/eigen3/COPYING.MINPACK",
    "content": "Minpack Copyright Notice (1999) University of Chicago.  All rights reserved\n\nRedistribution and use in source and binary forms, with or\nwithout modification, are permitted provided that the\nfollowing conditions are met:\n\n1. Redistributions of source code must retain the above\ncopyright notice, this list of conditions and the following\ndisclaimer.\n\n2. Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following\ndisclaimer in the documentation and/or other materials\nprovided with the distribution.\n\n3. The end-user documentation included with the\nredistribution, if any, must include the following\nacknowledgment:\n\n   \"This product includes software developed by the\n   University of Chicago, as Operator of Argonne National\n   Laboratory.\n\nAlternately, this acknowledgment may appear in the software\nitself, if and wherever such third-party acknowledgments\nnormally appear.\n\n4. WARRANTY DISCLAIMER. THE SOFTWARE IS SUPPLIED \"AS IS\"\nWITHOUT WARRANTY OF ANY KIND. THE COPYRIGHT HOLDER, THE\nUNITED STATES, THE UNITED STATES DEPARTMENT OF ENERGY, AND\nTHEIR EMPLOYEES: (1) DISCLAIM ANY WARRANTIES, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE\nOR NON-INFRINGEMENT, (2) DO NOT ASSUME ANY LEGAL LIABILITY\nOR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR\nUSEFULNESS OF THE SOFTWARE, (3) DO NOT REPRESENT THAT USE OF\nTHE SOFTWARE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS, (4)\nDO NOT WARRANT THAT THE SOFTWARE WILL FUNCTION\nUNINTERRUPTED, THAT IT IS ERROR-FREE OR THAT ANY ERRORS WILL\nBE CORRECTED.\n\n5. LIMITATION OF LIABILITY. IN NO EVENT WILL THE COPYRIGHT\nHOLDER, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF\nENERGY, OR THEIR EMPLOYEES: BE LIABLE FOR ANY INDIRECT,\nINCIDENTAL, CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES OF\nANY KIND OR NATURE, INCLUDING BUT NOT LIMITED TO LOSS OF\nPROFITS OR LOSS OF DATA, FOR ANY REASON WHATSOEVER, WHETHER\nSUCH LIABILITY IS ASSERTED ON THE BASIS OF CONTRACT, TORT\n(INCLUDING NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE,\nEVEN IF ANY OF SAID PARTIES HAS BEEN WARNED OF THE\nPOSSIBILITY OF SUCH LOSS OR DAMAGES.\n"
  },
  {
    "path": "3rdparty/eigen3/COPYING.MPL2",
    "content": "Mozilla Public License Version 2.0\n==================================\n\n1. Definitions\n--------------\n\n1.1. \"Contributor\"\n    means each individual or legal entity that creates, contributes to\n    the creation of, or owns Covered Software.\n\n1.2. \"Contributor Version\"\n    means the combination of the Contributions of others (if any) used\n    by a Contributor and that particular Contributor's Contribution.\n\n1.3. \"Contribution\"\n    means Covered Software of a particular Contributor.\n\n1.4. \"Covered Software\"\n    means Source Code Form to which the initial Contributor has attached\n    the notice in Exhibit A, the Executable Form of such Source Code\n    Form, and Modifications of such Source Code Form, in each case\n    including portions thereof.\n\n1.5. \"Incompatible With Secondary Licenses\"\n    means\n\n    (a) that the initial Contributor has attached the notice described\n        in Exhibit B to the Covered Software; or\n\n    (b) that the Covered Software was made available under the terms of\n        version 1.1 or earlier of the License, but not also under the\n        terms of a Secondary License.\n\n1.6. \"Executable Form\"\n    means any form of the work other than Source Code Form.\n\n1.7. \"Larger Work\"\n    means a work that combines Covered Software with other material, in \n    a separate file or files, that is not Covered Software.\n\n1.8. \"License\"\n    means this document.\n\n1.9. \"Licensable\"\n    means having the right to grant, to the maximum extent possible,\n    whether at the time of the initial grant or subsequently, any and\n    all of the rights conveyed by this License.\n\n1.10. \"Modifications\"\n    means any of the following:\n\n    (a) any file in Source Code Form that results from an addition to,\n        deletion from, or modification of the contents of Covered\n        Software; or\n\n    (b) any new file in Source Code Form that contains any Covered\n        Software.\n\n1.11. \"Patent Claims\" of a Contributor\n    means any patent claim(s), including without limitation, method,\n    process, and apparatus claims, in any patent Licensable by such\n    Contributor that would be infringed, but for the grant of the\n    License, by the making, using, selling, offering for sale, having\n    made, import, or transfer of either its Contributions or its\n    Contributor Version.\n\n1.12. \"Secondary License\"\n    means either the GNU General Public License, Version 2.0, the GNU\n    Lesser General Public License, Version 2.1, the GNU Affero General\n    Public License, Version 3.0, or any later versions of those\n    licenses.\n\n1.13. \"Source Code Form\"\n    means the form of the work preferred for making modifications.\n\n1.14. \"You\" (or \"Your\")\n    means an individual or a legal entity exercising rights under this\n    License. For legal entities, \"You\" includes any entity that\n    controls, is controlled by, or is under common control with You. For\n    purposes of this definition, \"control\" means (a) the power, direct\n    or indirect, to cause the direction or management of such entity,\n    whether by contract or otherwise, or (b) ownership of more than\n    fifty percent (50%) of the outstanding shares or beneficial\n    ownership of such entity.\n\n2. License Grants and Conditions\n--------------------------------\n\n2.1. Grants\n\nEach Contributor hereby grants You a world-wide, royalty-free,\nnon-exclusive license:\n\n(a) under intellectual property rights (other than patent or trademark)\n    Licensable by such Contributor to use, reproduce, make available,\n    modify, display, perform, distribute, and otherwise exploit its\n    Contributions, either on an unmodified basis, with Modifications, or\n    as part of a Larger Work; and\n\n(b) under Patent Claims of such Contributor to make, use, sell, offer\n    for sale, have made, import, and otherwise transfer either its\n    Contributions or its Contributor Version.\n\n2.2. Effective Date\n\nThe licenses granted in Section 2.1 with respect to any Contribution\nbecome effective for each Contribution on the date the Contributor first\ndistributes such Contribution.\n\n2.3. Limitations on Grant Scope\n\nThe licenses granted in this Section 2 are the only rights granted under\nthis License. No additional rights or licenses will be implied from the\ndistribution or licensing of Covered Software under this License.\nNotwithstanding Section 2.1(b) above, no patent license is granted by a\nContributor:\n\n(a) for any code that a Contributor has removed from Covered Software;\n    or\n\n(b) for infringements caused by: (i) Your and any other third party's\n    modifications of Covered Software, or (ii) the combination of its\n    Contributions with other software (except as part of its Contributor\n    Version); or\n\n(c) under Patent Claims infringed by Covered Software in the absence of\n    its Contributions.\n\nThis License does not grant any rights in the trademarks, service marks,\nor logos of any Contributor (except as may be necessary to comply with\nthe notice requirements in Section 3.4).\n\n2.4. Subsequent Licenses\n\nNo Contributor makes additional grants as a result of Your choice to\ndistribute the Covered Software under a subsequent version of this\nLicense (see Section 10.2) or under the terms of a Secondary License (if\npermitted under the terms of Section 3.3).\n\n2.5. Representation\n\nEach Contributor represents that the Contributor believes its\nContributions are its original creation(s) or it has sufficient rights\nto grant the rights to its Contributions conveyed by this License.\n\n2.6. Fair Use\n\nThis License is not intended to limit any rights You have under\napplicable copyright doctrines of fair use, fair dealing, or other\nequivalents.\n\n2.7. Conditions\n\nSections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted\nin Section 2.1.\n\n3. Responsibilities\n-------------------\n\n3.1. Distribution of Source Form\n\nAll distribution of Covered Software in Source Code Form, including any\nModifications that You create or to which You contribute, must be under\nthe terms of this License. You must inform recipients that the Source\nCode Form of the Covered Software is governed by the terms of this\nLicense, and how they can obtain a copy of this License. You may not\nattempt to alter or restrict the recipients' rights in the Source Code\nForm.\n\n3.2. Distribution of Executable Form\n\nIf You distribute Covered Software in Executable Form then:\n\n(a) such Covered Software must also be made available in Source Code\n    Form, as described in Section 3.1, and You must inform recipients of\n    the Executable Form how they can obtain a copy of such Source Code\n    Form by reasonable means in a timely manner, at a charge no more\n    than the cost of distribution to the recipient; and\n\n(b) You may distribute such Executable Form under the terms of this\n    License, or sublicense it under different terms, provided that the\n    license for the Executable Form does not attempt to limit or alter\n    the recipients' rights in the Source Code Form under this License.\n\n3.3. Distribution of a Larger Work\n\nYou may create and distribute a Larger Work under terms of Your choice,\nprovided that You also comply with the requirements of this License for\nthe Covered Software. If the Larger Work is a combination of Covered\nSoftware with a work governed by one or more Secondary Licenses, and the\nCovered Software is not Incompatible With Secondary Licenses, this\nLicense permits You to additionally distribute such Covered Software\nunder the terms of such Secondary License(s), so that the recipient of\nthe Larger Work may, at their option, further distribute the Covered\nSoftware under the terms of either this License or such Secondary\nLicense(s).\n\n3.4. Notices\n\nYou may not remove or alter the substance of any license notices\n(including copyright notices, patent notices, disclaimers of warranty,\nor limitations of liability) contained within the Source Code Form of\nthe Covered Software, except that You may alter any license notices to\nthe extent required to remedy known factual inaccuracies.\n\n3.5. Application of Additional Terms\n\nYou may choose to offer, and to charge a fee for, warranty, support,\nindemnity or liability obligations to one or more recipients of Covered\nSoftware. However, You may do so only on Your own behalf, and not on\nbehalf of any Contributor. You must make it absolutely clear that any\nsuch warranty, support, indemnity, or liability obligation is offered by\nYou alone, and You hereby agree to indemnify every Contributor for any\nliability incurred by such Contributor as a result of warranty, support,\nindemnity or liability terms You offer. You may include additional\ndisclaimers of warranty and limitations of liability specific to any\njurisdiction.\n\n4. Inability to Comply Due to Statute or Regulation\n---------------------------------------------------\n\nIf it is impossible for You to comply with any of the terms of this\nLicense with respect to some or all of the Covered Software due to\nstatute, judicial order, or regulation then You must: (a) comply with\nthe terms of this License to the maximum extent possible; and (b)\ndescribe the limitations and the code they affect. Such description must\nbe placed in a text file included with all distributions of the Covered\nSoftware under this License. Except to the extent prohibited by statute\nor regulation, such description must be sufficiently detailed for a\nrecipient of ordinary skill to be able to understand it.\n\n5. Termination\n--------------\n\n5.1. The rights granted under this License will terminate automatically\nif You fail to comply with any of its terms. However, if You become\ncompliant, then the rights granted under this License from a particular\nContributor are reinstated (a) provisionally, unless and until such\nContributor explicitly and finally terminates Your grants, and (b) on an\nongoing basis, if such Contributor fails to notify You of the\nnon-compliance by some reasonable means prior to 60 days after You have\ncome back into compliance. Moreover, Your grants from a particular\nContributor are reinstated on an ongoing basis if such Contributor\nnotifies You of the non-compliance by some reasonable means, this is the\nfirst time You have received notice of non-compliance with this License\nfrom such Contributor, and You become compliant prior to 30 days after\nYour receipt of the notice.\n\n5.2. If You initiate litigation against any entity by asserting a patent\ninfringement claim (excluding declaratory judgment actions,\ncounter-claims, and cross-claims) alleging that a Contributor Version\ndirectly or indirectly infringes any patent, then the rights granted to\nYou by any and all Contributors for the Covered Software under Section\n2.1 of this License shall terminate.\n\n5.3. In the event of termination under Sections 5.1 or 5.2 above, all\nend user license agreements (excluding distributors and resellers) which\nhave been validly granted by You or Your distributors under this License\nprior to termination shall survive termination.\n\n************************************************************************\n*                                                                      *\n*  6. Disclaimer of Warranty                                           *\n*  -------------------------                                           *\n*                                                                      *\n*  Covered Software is provided under this License on an \"as is\"       *\n*  basis, without warranty of any kind, either expressed, implied, or  *\n*  statutory, including, without limitation, warranties that the       *\n*  Covered Software is free of defects, merchantable, fit for a        *\n*  particular purpose or non-infringing. The entire risk as to the     *\n*  quality and performance of the Covered Software is with You.        *\n*  Should any Covered Software prove defective in any respect, You     *\n*  (not any Contributor) assume the cost of any necessary servicing,   *\n*  repair, or correction. This disclaimer of warranty constitutes an   *\n*  essential part of this License. No use of any Covered Software is   *\n*  authorized under this License except under this disclaimer.         *\n*                                                                      *\n************************************************************************\n\n************************************************************************\n*                                                                      *\n*  7. Limitation of Liability                                          *\n*  --------------------------                                          *\n*                                                                      *\n*  Under no circumstances and under no legal theory, whether tort      *\n*  (including negligence), contract, or otherwise, shall any           *\n*  Contributor, or anyone who distributes Covered Software as          *\n*  permitted above, be liable to You for any direct, indirect,         *\n*  special, incidental, or consequential damages of any character      *\n*  including, without limitation, damages for lost profits, loss of    *\n*  goodwill, work stoppage, computer failure or malfunction, or any    *\n*  and all other commercial damages or losses, even if such party      *\n*  shall have been informed of the possibility of such damages. This   *\n*  limitation of liability shall not apply to liability for death or   *\n*  personal injury resulting from such party's negligence to the       *\n*  extent applicable law prohibits such limitation. Some               *\n*  jurisdictions do not allow the exclusion or limitation of           *\n*  incidental or consequential damages, so this exclusion and          *\n*  limitation may not apply to You.                                    *\n*                                                                      *\n************************************************************************\n\n8. Litigation\n-------------\n\nAny litigation relating to this License may be brought only in the\ncourts of a jurisdiction where the defendant maintains its principal\nplace of business and such litigation shall be governed by laws of that\njurisdiction, without reference to its conflict-of-law provisions.\nNothing in this Section shall prevent a party's ability to bring\ncross-claims or counter-claims.\n\n9. Miscellaneous\n----------------\n\nThis License represents the complete agreement concerning the subject\nmatter hereof. If any provision of this License is held to be\nunenforceable, such provision shall be reformed only to the extent\nnecessary to make it enforceable. Any law or regulation which provides\nthat the language of a contract shall be construed against the drafter\nshall not be used to construe this License against a Contributor.\n\n10. Versions of the License\n---------------------------\n\n10.1. New Versions\n\nMozilla Foundation is the license steward. Except as provided in Section\n10.3, no one other than the license steward has the right to modify or\npublish new versions of this License. Each version will be given a\ndistinguishing version number.\n\n10.2. Effect of New Versions\n\nYou may distribute the Covered Software under the terms of the version\nof the License under which You originally received the Covered Software,\nor under the terms of any subsequent version published by the license\nsteward.\n\n10.3. Modified Versions\n\nIf you create software not governed by this License, and you want to\ncreate a new license for such software, you may create and use a\nmodified version of this License if you rename the license and remove\nany references to the name of the license steward (except to note that\nsuch modified license differs from this License).\n\n10.4. Distributing Source Code Form that is Incompatible With Secondary\nLicenses\n\nIf You choose to distribute Source Code Form that is Incompatible With\nSecondary Licenses under the terms of this version of the License, the\nnotice described in Exhibit B of this License must be attached.\n\nExhibit A - Source Code Form License Notice\n-------------------------------------------\n\n  This Source Code Form is subject to the terms of the Mozilla Public\n  License, v. 2.0. If a copy of the MPL was not distributed with this\n  file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\nIf it is not possible or desirable to put the notice in a particular\nfile, then You may include the notice in a location (such as a LICENSE\nfile in a relevant directory) where a recipient would be likely to look\nfor such a notice.\n\nYou may add additional accurate notices of copyright ownership.\n\nExhibit B - \"Incompatible With Secondary Licenses\" Notice\n---------------------------------------------------------\n\n  This Source Code Form is \"Incompatible With Secondary Licenses\", as\n  defined by the Mozilla Public License, v. 2.0.\n"
  },
  {
    "path": "3rdparty/eigen3/COPYING.README",
    "content": "Eigen is primarily MPL2 licensed. See COPYING.MPL2 and these links:\n  http://www.mozilla.org/MPL/2.0/\n  http://www.mozilla.org/MPL/2.0/FAQ.html\n\nSome files contain third-party code under BSD or LGPL licenses, whence the other\nCOPYING.* files here.\n\nAll the LGPL code is either LGPL 2.1-only, or LGPL 2.1-or-later.\nFor this reason, the COPYING.LGPL file contains the LGPL 2.1 text.\n\nIf you want to guarantee that the Eigen code that you are #including is licensed\nunder the MPL2 and possibly more permissive licenses (like BSD), #define this\npreprocessor symbol:\n  EIGEN_MPL2_ONLY\nFor example, with most compilers, you could add this to your project CXXFLAGS:\n  -DEIGEN_MPL2_ONLY\nThis will cause a compilation error to be generated if you #include any code that is\nLGPL licensed.\n"
  },
  {
    "path": "3rdparty/eigen3/CTestConfig.cmake",
    "content": "## This file should be placed in the root directory of your project.\n## Then modify the CMakeLists.txt file in the root directory of your\n## project to incorporate the testing dashboard.\n## # The following are required to uses Dart and the Cdash dashboard\n##   enable_testing()\n##   include(CTest)\nset(CTEST_PROJECT_NAME \"Eigen\")\nset(CTEST_NIGHTLY_START_TIME \"00:00:00 UTC\")\n\nset(CTEST_DROP_METHOD \"http\")\nset(CTEST_DROP_SITE \"my.cdash.org\")\nset(CTEST_DROP_LOCATION \"/submit.php?project=Eigen\")\nset(CTEST_DROP_SITE_CDASH TRUE)\n#set(CTEST_PROJECT_SUBPROJECTS\n#Official\n#Unsupported\n#)\n"
  },
  {
    "path": "3rdparty/eigen3/CTestCustom.cmake.in",
    "content": "\nset(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS \"2000\")\nset(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS   \"2000\")\nlist(APPEND CTEST_CUSTOM_ERROR_EXCEPTION    @EIGEN_CTEST_ERROR_EXCEPTION@)\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/Cholesky",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CHOLESKY_MODULE_H\n#define EIGEN_CHOLESKY_MODULE_H\n\n#include \"Core\"\n#include \"Jacobi\"\n\n#include \"src/Core/util/DisableStupidWarnings.h\"\n\n/** \\defgroup Cholesky_Module Cholesky module\n  *\n  *\n  *\n  * This module provides two variants of the Cholesky decomposition for selfadjoint (hermitian) matrices.\n  * Those decompositions are also accessible via the following methods:\n  *  - MatrixBase::llt()\n  *  - MatrixBase::ldlt()\n  *  - SelfAdjointView::llt()\n  *  - SelfAdjointView::ldlt()\n  *\n  * \\code\n  * #include <Eigen/Cholesky>\n  * \\endcode\n  */\n\n#include \"src/Cholesky/LLT.h\"\n#include \"src/Cholesky/LDLT.h\"\n#ifdef EIGEN_USE_LAPACKE\n#ifdef EIGEN_USE_MKL\n#include \"mkl_lapacke.h\"\n#else\n#include \"src/misc/lapacke.h\"\n#endif\n#include \"src/Cholesky/LLT_LAPACKE.h\"\n#endif\n\n#include \"src/Core/util/ReenableStupidWarnings.h\"\n\n#endif // EIGEN_CHOLESKY_MODULE_H\n/* vim: set filetype=cpp et sw=2 ts=2 ai: */\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/CholmodSupport",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CHOLMODSUPPORT_MODULE_H\n#define EIGEN_CHOLMODSUPPORT_MODULE_H\n\n#include \"SparseCore\"\n\n#include \"src/Core/util/DisableStupidWarnings.h\"\n\nextern \"C\" {\n  #include <cholmod.h>\n}\n\n/** \\ingroup Support_modules\n  * \\defgroup CholmodSupport_Module CholmodSupport module\n  *\n  * This module provides an interface to the Cholmod library which is part of the <a href=\"http://www.suitesparse.com\">suitesparse</a> package.\n  * It provides the two following main factorization classes:\n  * - class CholmodSupernodalLLT: a supernodal LLT Cholesky factorization.\n  * - class CholmodDecomposiiton: a general L(D)LT Cholesky factorization with automatic or explicit runtime selection of the underlying factorization method (supernodal or simplicial).\n  *\n  * For the sake of completeness, this module also propose the two following classes:\n  * - class CholmodSimplicialLLT\n  * - class CholmodSimplicialLDLT\n  * Note that these classes does not bring any particular advantage compared to the built-in\n  * SimplicialLLT and SimplicialLDLT factorization classes.\n  *\n  * \\code\n  * #include <Eigen/CholmodSupport>\n  * \\endcode\n  *\n  * In order to use this module, the cholmod headers must be accessible from the include paths, and your binary must be linked to the cholmod library and its dependencies.\n  * The dependencies depend on how cholmod has been compiled.\n  * For a cmake based project, you can use our FindCholmod.cmake module to help you in this task.\n  *\n  */\n\n#include \"src/CholmodSupport/CholmodSupport.h\"\n\n#include \"src/Core/util/ReenableStupidWarnings.h\"\n\n#endif // EIGEN_CHOLMODSUPPORT_MODULE_H\n\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/Core",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2007-2011 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CORE_H\n#define EIGEN_CORE_H\n\n// first thing Eigen does: stop the compiler from committing suicide\n#include \"src/Core/util/DisableStupidWarnings.h\"\n\n// then include this file where all our macros are defined. It's really important to do it first because\n// it's where we do all the compiler/OS/arch detections and define most defaults.\n#include \"src/Core/util/Macros.h\"\n\n// This detects SSE/AVX/NEON/etc. and configure alignment settings\n#include \"src/Core/util/ConfigureVectorization.h\"\n\n// We need cuda_runtime.h/hip_runtime.h to ensure that\n// the EIGEN_USING_STD_MATH macro works properly on the device side\n#if defined(EIGEN_CUDACC)\n  #include <cuda_runtime.h>\n#elif defined(EIGEN_HIPCC)\n  #include <hip/hip_runtime.h>\n#endif\n\n\n#ifdef EIGEN_EXCEPTIONS\n  #include <new>\n#endif\n\n// Disable the ipa-cp-clone optimization flag with MinGW 6.x or newer (enabled by default with -O3)\n// See http://eigen.tuxfamily.org/bz/show_bug.cgi?id=556 for details.\n#if EIGEN_COMP_MINGW && EIGEN_GNUC_AT_LEAST(4,6)\n  #pragma GCC optimize (\"-fno-ipa-cp-clone\")\n#endif\n\n#include <complex>\n\n// this include file manages BLAS and MKL related macros\n// and inclusion of their respective header files\n#include \"src/Core/util/MKL_support.h\"\n\n\n#if defined(EIGEN_HAS_CUDA_FP16) || defined(EIGEN_HAS_HIP_FP16)\n  #define EIGEN_HAS_GPU_FP16\n#endif\n\n#if (defined _OPENMP) && (!defined EIGEN_DONT_PARALLELIZE)\n  #define EIGEN_HAS_OPENMP\n#endif\n\n#ifdef EIGEN_HAS_OPENMP\n#include <omp.h>\n#endif\n\n// MSVC for windows mobile does not have the errno.h file\n#if !(EIGEN_COMP_MSVC && EIGEN_OS_WINCE) && !EIGEN_COMP_ARM\n#define EIGEN_HAS_ERRNO\n#endif\n\n#ifdef EIGEN_HAS_ERRNO\n#include <cerrno>\n#endif\n#include <cstddef>\n#include <cstdlib>\n#include <cmath>\n#include <cassert>\n#include <functional>\n#include <sstream>\n#ifndef EIGEN_NO_IO\n  #include <iosfwd>\n#endif\n#include <cstring>\n#include <string>\n#include <limits>\n#include <climits> // for CHAR_BIT\n// for min/max:\n#include <algorithm>\n\n#if EIGEN_HAS_CXX11\n#include <array>\n#endif\n\n// for std::is_nothrow_move_assignable\n#ifdef EIGEN_INCLUDE_TYPE_TRAITS\n#include <type_traits>\n#endif\n\n// for outputting debug info\n#ifdef EIGEN_DEBUG_ASSIGN\n#include <iostream>\n#endif\n\n// required for __cpuid, needs to be included after cmath\n#if EIGEN_COMP_MSVC && EIGEN_ARCH_i386_OR_x86_64 && !EIGEN_OS_WINCE\n  #include <intrin.h>\n#endif\n\n#if defined(EIGEN_USE_SYCL)\n  #undef min\n  #undef max\n  #undef isnan\n  #undef isinf\n  #undef isfinite\n  #include <SYCL/sycl.hpp>\n  #include <map>\n  #include <memory>\n  #include <utility>\n  #include <thread>\n  #ifndef EIGEN_SYCL_LOCAL_THREAD_DIM0\n  #define EIGEN_SYCL_LOCAL_THREAD_DIM0 16\n  #endif\n  #ifndef EIGEN_SYCL_LOCAL_THREAD_DIM1\n  #define EIGEN_SYCL_LOCAL_THREAD_DIM1 16\n  #endif\n#endif\n\n\n#if defined EIGEN2_SUPPORT_STAGE40_FULL_EIGEN3_STRICTNESS || defined EIGEN2_SUPPORT_STAGE30_FULL_EIGEN3_API || defined EIGEN2_SUPPORT_STAGE20_RESOLVE_API_CONFLICTS || defined EIGEN2_SUPPORT_STAGE10_FULL_EIGEN2_API || defined EIGEN2_SUPPORT\n// This will generate an error message:\n#error Eigen2-support is only available up to version 3.2. Please go to \"http://eigen.tuxfamily.org/index.php?title=Eigen2\" for further information\n#endif\n\nnamespace Eigen {\n\n// we use size_t frequently and we'll never remember to prepend it with std:: every time just to\n// ensure QNX/QCC support\nusing std::size_t;\n// gcc 4.6.0 wants std:: for ptrdiff_t\nusing std::ptrdiff_t;\n\n}\n\n/** \\defgroup Core_Module Core module\n  * This is the main module of Eigen providing dense matrix and vector support\n  * (both fixed and dynamic size) with all the features corresponding to a BLAS library\n  * and much more...\n  *\n  * \\code\n  * #include <Eigen/Core>\n  * \\endcode\n  */\n\n#include \"src/Core/util/Constants.h\"\n#include \"src/Core/util/Meta.h\"\n#include \"src/Core/util/ForwardDeclarations.h\"\n#include \"src/Core/util/StaticAssert.h\"\n#include \"src/Core/util/XprHelper.h\"\n#include \"src/Core/util/Memory.h\"\n#include \"src/Core/util/IntegralConstant.h\"\n#include \"src/Core/util/SymbolicIndex.h\"\n\n#include \"src/Core/NumTraits.h\"\n#include \"src/Core/MathFunctions.h\"\n#include \"src/Core/GenericPacketMath.h\"\n#include \"src/Core/MathFunctionsImpl.h\"\n#include \"src/Core/arch/Default/ConjHelper.h\"\n// Generic half float support\n#include \"src/Core/arch/Default/Half.h\"\n#include \"src/Core/arch/Default/TypeCasting.h\"\n#include \"src/Core/arch/Default/GenericPacketMathFunctionsFwd.h\"\n\n#if defined EIGEN_VECTORIZE_AVX512\n  #include \"src/Core/arch/SSE/PacketMath.h\"\n  #include \"src/Core/arch/SSE/TypeCasting.h\"\n  #include \"src/Core/arch/SSE/Complex.h\"\n  #include \"src/Core/arch/AVX/PacketMath.h\"\n  #include \"src/Core/arch/AVX/TypeCasting.h\"\n  #include \"src/Core/arch/AVX/Complex.h\"\n  #include \"src/Core/arch/AVX512/PacketMath.h\"\n  #include \"src/Core/arch/AVX512/TypeCasting.h\"\n  #include \"src/Core/arch/AVX512/Complex.h\"\n  #include \"src/Core/arch/SSE/MathFunctions.h\"\n  #include \"src/Core/arch/AVX/MathFunctions.h\"\n  #include \"src/Core/arch/AVX512/MathFunctions.h\"\n#elif defined EIGEN_VECTORIZE_AVX\n  // Use AVX for floats and doubles, SSE for integers\n  #include \"src/Core/arch/SSE/PacketMath.h\"\n  #include \"src/Core/arch/SSE/TypeCasting.h\"\n  #include \"src/Core/arch/SSE/Complex.h\"\n  #include \"src/Core/arch/AVX/PacketMath.h\"\n  #include \"src/Core/arch/AVX/TypeCasting.h\"\n  #include \"src/Core/arch/AVX/Complex.h\"\n  #include \"src/Core/arch/SSE/MathFunctions.h\"\n  #include \"src/Core/arch/AVX/MathFunctions.h\"\n#elif defined EIGEN_VECTORIZE_SSE\n  #include \"src/Core/arch/SSE/PacketMath.h\"\n  #include \"src/Core/arch/SSE/TypeCasting.h\"\n  #include \"src/Core/arch/SSE/MathFunctions.h\"\n  #include \"src/Core/arch/SSE/Complex.h\"\n#elif defined(EIGEN_VECTORIZE_ALTIVEC) || defined(EIGEN_VECTORIZE_VSX)\n  #include \"src/Core/arch/AltiVec/PacketMath.h\"\n  #include \"src/Core/arch/AltiVec/MathFunctions.h\"\n  #include \"src/Core/arch/AltiVec/Complex.h\"\n#elif defined EIGEN_VECTORIZE_NEON\n  #include \"src/Core/arch/NEON/PacketMath.h\"\n  #include \"src/Core/arch/NEON/TypeCasting.h\"\n  #include \"src/Core/arch/NEON/MathFunctions.h\"\n  #include \"src/Core/arch/NEON/Complex.h\"\n#elif defined EIGEN_VECTORIZE_ZVECTOR\n  #include \"src/Core/arch/ZVector/PacketMath.h\"\n  #include \"src/Core/arch/ZVector/MathFunctions.h\"\n  #include \"src/Core/arch/ZVector/Complex.h\"\n#elif defined EIGEN_VECTORIZE_MSA\n  #include \"src/Core/arch/MSA/PacketMath.h\"\n  #include \"src/Core/arch/MSA/MathFunctions.h\"\n  #include \"src/Core/arch/MSA/Complex.h\"\n#endif\n\n#if defined EIGEN_VECTORIZE_GPU\n  #include \"src/Core/arch/GPU/PacketMath.h\"\n  #include \"src/Core/arch/GPU/MathFunctions.h\"\n  #include \"src/Core/arch/GPU/TypeCasting.h\"\n#endif\n\n#if defined(EIGEN_USE_SYCL)\n  #include \"src/Core/arch/SYCL/SyclMemoryModel.h\"\n  #include \"src/Core/arch/SYCL/InteropHeaders.h\"\n#if !defined(EIGEN_DONT_VECTORIZE_SYCL)\n  #include \"src/Core/arch/SYCL/PacketMath.h\"\n  #include \"src/Core/arch/SYCL/MathFunctions.h\"\n  #include \"src/Core/arch/SYCL/TypeCasting.h\"\n#endif\n#endif\n\n#include \"src/Core/arch/Default/Settings.h\"\n// This file provides generic implementations valid for scalar as well\n#include \"src/Core/arch/Default/GenericPacketMathFunctions.h\"\n\n#include \"src/Core/functors/TernaryFunctors.h\"\n#include \"src/Core/functors/BinaryFunctors.h\"\n#include \"src/Core/functors/UnaryFunctors.h\"\n#include \"src/Core/functors/NullaryFunctors.h\"\n#include \"src/Core/functors/StlFunctors.h\"\n#include \"src/Core/functors/AssignmentFunctors.h\"\n\n// Specialized functors to enable the processing of complex numbers\n// on CUDA devices\n#ifdef EIGEN_CUDACC\n#include \"src/Core/arch/CUDA/Complex.h\"\n#endif\n\n#include \"src/Core/util/IndexedViewHelper.h\"\n#include \"src/Core/util/ReshapedHelper.h\"\n#include \"src/Core/ArithmeticSequence.h\"\n#ifndef EIGEN_NO_IO\n  #include \"src/Core/IO.h\"\n#endif\n#include \"src/Core/DenseCoeffsBase.h\"\n#include \"src/Core/DenseBase.h\"\n#include \"src/Core/MatrixBase.h\"\n#include \"src/Core/EigenBase.h\"\n\n#include \"src/Core/Product.h\"\n#include \"src/Core/CoreEvaluators.h\"\n#include \"src/Core/AssignEvaluator.h\"\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN // work around Doxygen bug triggered by Assign.h r814874\n                                // at least confirmed with Doxygen 1.5.5 and 1.5.6\n  #include \"src/Core/Assign.h\"\n#endif\n\n#include \"src/Core/ArrayBase.h\"\n#include \"src/Core/util/BlasUtil.h\"\n#include \"src/Core/DenseStorage.h\"\n#include \"src/Core/NestByValue.h\"\n\n// #include \"src/Core/ForceAlignedAccess.h\"\n\n#include \"src/Core/ReturnByValue.h\"\n#include \"src/Core/NoAlias.h\"\n#include \"src/Core/PlainObjectBase.h\"\n#include \"src/Core/Matrix.h\"\n#include \"src/Core/Array.h\"\n#include \"src/Core/CwiseTernaryOp.h\"\n#include \"src/Core/CwiseBinaryOp.h\"\n#include \"src/Core/CwiseUnaryOp.h\"\n#include \"src/Core/CwiseNullaryOp.h\"\n#include \"src/Core/CwiseUnaryView.h\"\n#include \"src/Core/SelfCwiseBinaryOp.h\"\n#include \"src/Core/Dot.h\"\n#include \"src/Core/StableNorm.h\"\n#include \"src/Core/Stride.h\"\n#include \"src/Core/MapBase.h\"\n#include \"src/Core/Map.h\"\n#include \"src/Core/Ref.h\"\n#include \"src/Core/Block.h\"\n#include \"src/Core/VectorBlock.h\"\n#include \"src/Core/IndexedView.h\"\n#include \"src/Core/Reshaped.h\"\n#include \"src/Core/Transpose.h\"\n#include \"src/Core/DiagonalMatrix.h\"\n#include \"src/Core/Diagonal.h\"\n#include \"src/Core/DiagonalProduct.h\"\n#include \"src/Core/Redux.h\"\n#include \"src/Core/Visitor.h\"\n#include \"src/Core/Fuzzy.h\"\n#include \"src/Core/Swap.h\"\n#include \"src/Core/CommaInitializer.h\"\n#include \"src/Core/GeneralProduct.h\"\n#include \"src/Core/Solve.h\"\n#include \"src/Core/Inverse.h\"\n#include \"src/Core/SolverBase.h\"\n#include \"src/Core/PermutationMatrix.h\"\n#include \"src/Core/Transpositions.h\"\n#include \"src/Core/TriangularMatrix.h\"\n#include \"src/Core/SelfAdjointView.h\"\n#include \"src/Core/products/GeneralBlockPanelKernel.h\"\n#include \"src/Core/products/Parallelizer.h\"\n#include \"src/Core/ProductEvaluators.h\"\n#include \"src/Core/products/GeneralMatrixVector.h\"\n#include \"src/Core/products/GeneralMatrixMatrix.h\"\n#include \"src/Core/SolveTriangular.h\"\n#include \"src/Core/products/GeneralMatrixMatrixTriangular.h\"\n#include \"src/Core/products/SelfadjointMatrixVector.h\"\n#include \"src/Core/products/SelfadjointMatrixMatrix.h\"\n#include \"src/Core/products/SelfadjointProduct.h\"\n#include \"src/Core/products/SelfadjointRank2Update.h\"\n#include \"src/Core/products/TriangularMatrixVector.h\"\n#include \"src/Core/products/TriangularMatrixMatrix.h\"\n#include \"src/Core/products/TriangularSolverMatrix.h\"\n#include \"src/Core/products/TriangularSolverVector.h\"\n#include \"src/Core/BandMatrix.h\"\n#include \"src/Core/CoreIterators.h\"\n#include \"src/Core/ConditionEstimator.h\"\n\n#include \"src/Core/BooleanRedux.h\"\n#include \"src/Core/Select.h\"\n#include \"src/Core/VectorwiseOp.h\"\n#include \"src/Core/PartialReduxEvaluator.h\"\n#include \"src/Core/Random.h\"\n#include \"src/Core/Replicate.h\"\n#include \"src/Core/Reverse.h\"\n#include \"src/Core/ArrayWrapper.h\"\n#include \"src/Core/StlIterators.h\"\n\n#ifdef EIGEN_USE_BLAS\n#include \"src/Core/products/GeneralMatrixMatrix_BLAS.h\"\n#include \"src/Core/products/GeneralMatrixVector_BLAS.h\"\n#include \"src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h\"\n#include \"src/Core/products/SelfadjointMatrixMatrix_BLAS.h\"\n#include \"src/Core/products/SelfadjointMatrixVector_BLAS.h\"\n#include \"src/Core/products/TriangularMatrixMatrix_BLAS.h\"\n#include \"src/Core/products/TriangularMatrixVector_BLAS.h\"\n#include \"src/Core/products/TriangularSolverMatrix_BLAS.h\"\n#endif // EIGEN_USE_BLAS\n\n#ifdef EIGEN_USE_MKL_VML\n#include \"src/Core/Assign_MKL.h\"\n#endif\n\n#include \"src/Core/GlobalFunctions.h\"\n\n#include \"src/Core/util/ReenableStupidWarnings.h\"\n\n#endif // EIGEN_CORE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/Dense",
    "content": "#include \"Core\"\n#include \"LU\"\n#include \"Cholesky\"\n#include \"QR\"\n#include \"SVD\"\n#include \"Geometry\"\n#include \"Eigenvalues\"\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/Eigen",
    "content": "#include \"Dense\"\n#include \"Sparse\"\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/Eigenvalues",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_EIGENVALUES_MODULE_H\n#define EIGEN_EIGENVALUES_MODULE_H\n\n#include \"Core\"\n\n#include \"Cholesky\"\n#include \"Jacobi\"\n#include \"Householder\"\n#include \"LU\"\n#include \"Geometry\"\n\n#include \"src/Core/util/DisableStupidWarnings.h\"\n\n/** \\defgroup Eigenvalues_Module Eigenvalues module\n  *\n  *\n  *\n  * This module mainly provides various eigenvalue solvers.\n  * This module also provides some MatrixBase methods, including:\n  *  - MatrixBase::eigenvalues(),\n  *  - MatrixBase::operatorNorm()\n  *\n  * \\code\n  * #include <Eigen/Eigenvalues>\n  * \\endcode\n  */\n\n#include \"src/misc/RealSvd2x2.h\"\n#include \"src/Eigenvalues/Tridiagonalization.h\"\n#include \"src/Eigenvalues/RealSchur.h\"\n#include \"src/Eigenvalues/EigenSolver.h\"\n#include \"src/Eigenvalues/SelfAdjointEigenSolver.h\"\n#include \"src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h\"\n#include \"src/Eigenvalues/HessenbergDecomposition.h\"\n#include \"src/Eigenvalues/ComplexSchur.h\"\n#include \"src/Eigenvalues/ComplexEigenSolver.h\"\n#include \"src/Eigenvalues/RealQZ.h\"\n#include \"src/Eigenvalues/GeneralizedEigenSolver.h\"\n#include \"src/Eigenvalues/MatrixBaseEigenvalues.h\"\n#ifdef EIGEN_USE_LAPACKE\n#ifdef EIGEN_USE_MKL\n#include \"mkl_lapacke.h\"\n#else\n#include \"src/misc/lapacke.h\"\n#endif\n#include \"src/Eigenvalues/RealSchur_LAPACKE.h\"\n#include \"src/Eigenvalues/ComplexSchur_LAPACKE.h\"\n#include \"src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h\"\n#endif\n\n#include \"src/Core/util/ReenableStupidWarnings.h\"\n\n#endif // EIGEN_EIGENVALUES_MODULE_H\n/* vim: set filetype=cpp et sw=2 ts=2 ai: */\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/Geometry",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_GEOMETRY_MODULE_H\n#define EIGEN_GEOMETRY_MODULE_H\n\n#include \"Core\"\n\n#include \"SVD\"\n#include \"LU\"\n#include <limits>\n\n#include \"src/Core/util/DisableStupidWarnings.h\"\n\n/** \\defgroup Geometry_Module Geometry module\n  *\n  * This module provides support for:\n  *  - fixed-size homogeneous transformations\n  *  - translation, scaling, 2D and 3D rotations\n  *  - \\link Quaternion quaternions \\endlink\n  *  - cross products (\\ref MatrixBase::cross, \\ref MatrixBase::cross3)\n  *  - orthognal vector generation (\\ref MatrixBase::unitOrthogonal)\n  *  - some linear components: \\link ParametrizedLine parametrized-lines \\endlink and \\link Hyperplane hyperplanes \\endlink\n  *  - \\link AlignedBox axis aligned bounding boxes \\endlink\n  *  - \\link umeyama least-square transformation fitting \\endlink\n  *\n  * \\code\n  * #include <Eigen/Geometry>\n  * \\endcode\n  */\n\n#include \"src/Geometry/OrthoMethods.h\"\n#include \"src/Geometry/EulerAngles.h\"\n\n#include \"src/Geometry/Homogeneous.h\"\n#include \"src/Geometry/RotationBase.h\"\n#include \"src/Geometry/Rotation2D.h\"\n#include \"src/Geometry/Quaternion.h\"\n#include \"src/Geometry/AngleAxis.h\"\n#include \"src/Geometry/Transform.h\"\n#include \"src/Geometry/Translation.h\"\n#include \"src/Geometry/Scaling.h\"\n#include \"src/Geometry/Hyperplane.h\"\n#include \"src/Geometry/ParametrizedLine.h\"\n#include \"src/Geometry/AlignedBox.h\"\n#include \"src/Geometry/Umeyama.h\"\n\n// Use the SSE optimized version whenever possible.\n#if defined EIGEN_VECTORIZE_SSE\n#include \"src/Geometry/arch/Geometry_SSE.h\"\n#endif\n\n#include \"src/Core/util/ReenableStupidWarnings.h\"\n\n#endif // EIGEN_GEOMETRY_MODULE_H\n/* vim: set filetype=cpp et sw=2 ts=2 ai: */\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/Householder",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_HOUSEHOLDER_MODULE_H\n#define EIGEN_HOUSEHOLDER_MODULE_H\n\n#include \"Core\"\n\n#include \"src/Core/util/DisableStupidWarnings.h\"\n\n/** \\defgroup Householder_Module Householder module\n  * This module provides Householder transformations.\n  *\n  * \\code\n  * #include <Eigen/Householder>\n  * \\endcode\n  */\n\n#include \"src/Householder/Householder.h\"\n#include \"src/Householder/HouseholderSequence.h\"\n#include \"src/Householder/BlockHouseholder.h\"\n\n#include \"src/Core/util/ReenableStupidWarnings.h\"\n\n#endif // EIGEN_HOUSEHOLDER_MODULE_H\n/* vim: set filetype=cpp et sw=2 ts=2 ai: */\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/IterativeLinearSolvers",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_ITERATIVELINEARSOLVERS_MODULE_H\n#define EIGEN_ITERATIVELINEARSOLVERS_MODULE_H\n\n#include \"SparseCore\"\n#include \"OrderingMethods\"\n\n#include \"src/Core/util/DisableStupidWarnings.h\"\n\n/** \n  * \\defgroup IterativeLinearSolvers_Module IterativeLinearSolvers module\n  *\n  * This module currently provides iterative methods to solve problems of the form \\c A \\c x = \\c b, where \\c A is a squared matrix, usually very large and sparse.\n  * Those solvers are accessible via the following classes:\n  *  - ConjugateGradient for selfadjoint (hermitian) matrices,\n  *  - LeastSquaresConjugateGradient for rectangular least-square problems,\n  *  - BiCGSTAB for general square matrices.\n  *\n  * These iterative solvers are associated with some preconditioners:\n  *  - IdentityPreconditioner - not really useful\n  *  - DiagonalPreconditioner - also called Jacobi preconditioner, work very well on diagonal dominant matrices.\n  *  - IncompleteLUT - incomplete LU factorization with dual thresholding\n  *\n  * Such problems can also be solved using the direct sparse decomposition modules: SparseCholesky, CholmodSupport, UmfPackSupport, SuperLUSupport.\n  *\n    \\code\n    #include <Eigen/IterativeLinearSolvers>\n    \\endcode\n  */\n\n#include \"src/IterativeLinearSolvers/SolveWithGuess.h\"\n#include \"src/IterativeLinearSolvers/IterativeSolverBase.h\"\n#include \"src/IterativeLinearSolvers/BasicPreconditioners.h\"\n#include \"src/IterativeLinearSolvers/ConjugateGradient.h\"\n#include \"src/IterativeLinearSolvers/LeastSquareConjugateGradient.h\"\n#include \"src/IterativeLinearSolvers/BiCGSTAB.h\"\n#include \"src/IterativeLinearSolvers/IncompleteLUT.h\"\n#include \"src/IterativeLinearSolvers/IncompleteCholesky.h\"\n\n#include \"src/Core/util/ReenableStupidWarnings.h\"\n\n#endif // EIGEN_ITERATIVELINEARSOLVERS_MODULE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/Jacobi",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_JACOBI_MODULE_H\n#define EIGEN_JACOBI_MODULE_H\n\n#include \"Core\"\n\n#include \"src/Core/util/DisableStupidWarnings.h\"\n\n/** \\defgroup Jacobi_Module Jacobi module\n  * This module provides Jacobi and Givens rotations.\n  *\n  * \\code\n  * #include <Eigen/Jacobi>\n  * \\endcode\n  *\n  * In addition to listed classes, it defines the two following MatrixBase methods to apply a Jacobi or Givens rotation:\n  *  - MatrixBase::applyOnTheLeft()\n  *  - MatrixBase::applyOnTheRight().\n  */\n\n#include \"src/Jacobi/Jacobi.h\"\n\n#include \"src/Core/util/ReenableStupidWarnings.h\"\n\n#endif // EIGEN_JACOBI_MODULE_H\n/* vim: set filetype=cpp et sw=2 ts=2 ai: */\n\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/KLUSupport",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_KLUSUPPORT_MODULE_H\n#define EIGEN_KLUSUPPORT_MODULE_H\n\n#include <Eigen/SparseCore>\n\n#include <Eigen/src/Core/util/DisableStupidWarnings.h>\n\nextern \"C\" {\n#include <btf.h>\n#include <klu.h>\n   }\n\n/** \\ingroup Support_modules\n  * \\defgroup KLUSupport_Module KLUSupport module\n  *\n  * This module provides an interface to the KLU library which is part of the <a href=\"http://www.suitesparse.com\">suitesparse</a> package.\n  * It provides the following factorization class:\n  * - class KLU: a sparse LU factorization, well-suited for circuit simulation.\n  *\n  * \\code\n  * #include <Eigen/KLUSupport>\n  * \\endcode\n  *\n  * In order to use this module, the klu and btf headers must be accessible from the include paths, and your binary must be linked to the klu library and its dependencies.\n  * The dependencies depend on how umfpack has been compiled.\n  * For a cmake based project, you can use our FindKLU.cmake module to help you in this task.\n  *\n  */\n\n#include \"src/KLUSupport/KLUSupport.h\"\n\n#include <Eigen/src/Core/util/ReenableStupidWarnings.h>\n\n#endif // EIGEN_KLUSUPPORT_MODULE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/LU",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_LU_MODULE_H\n#define EIGEN_LU_MODULE_H\n\n#include \"Core\"\n\n#include \"src/Core/util/DisableStupidWarnings.h\"\n\n/** \\defgroup LU_Module LU module\n  * This module includes %LU decomposition and related notions such as matrix inversion and determinant.\n  * This module defines the following MatrixBase methods:\n  *  - MatrixBase::inverse()\n  *  - MatrixBase::determinant()\n  *\n  * \\code\n  * #include <Eigen/LU>\n  * \\endcode\n  */\n\n#include \"src/misc/Kernel.h\"\n#include \"src/misc/Image.h\"\n#include \"src/LU/FullPivLU.h\"\n#include \"src/LU/PartialPivLU.h\"\n#ifdef EIGEN_USE_LAPACKE\n#ifdef EIGEN_USE_MKL\n#include \"mkl_lapacke.h\"\n#else\n#include \"src/misc/lapacke.h\"\n#endif\n#include \"src/LU/PartialPivLU_LAPACKE.h\"\n#endif\n#include \"src/LU/Determinant.h\"\n#include \"src/LU/InverseImpl.h\"\n\n// Use the SSE optimized version whenever possible. At the moment the\n// SSE version doesn't compile when AVX is enabled\n#if defined EIGEN_VECTORIZE_SSE && !defined EIGEN_VECTORIZE_AVX\n  #include \"src/LU/arch/Inverse_SSE.h\"\n#endif\n\n#include \"src/Core/util/ReenableStupidWarnings.h\"\n\n#endif // EIGEN_LU_MODULE_H\n/* vim: set filetype=cpp et sw=2 ts=2 ai: */\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/MetisSupport",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_METISSUPPORT_MODULE_H\n#define EIGEN_METISSUPPORT_MODULE_H\n\n#include \"SparseCore\"\n\n#include \"src/Core/util/DisableStupidWarnings.h\"\n\nextern \"C\" {\n#include <metis.h>\n}\n\n\n/** \\ingroup Support_modules\n  * \\defgroup MetisSupport_Module MetisSupport module\n  *\n  * \\code\n  * #include <Eigen/MetisSupport>\n  * \\endcode\n  * This module defines an interface to the METIS reordering package (http://glaros.dtc.umn.edu/gkhome/views/metis). \n  * It can be used just as any other built-in method as explained in \\link OrderingMethods_Module here. \\endlink\n  */\n\n\n#include \"src/MetisSupport/MetisSupport.h\"\n\n#include \"src/Core/util/ReenableStupidWarnings.h\"\n\n#endif // EIGEN_METISSUPPORT_MODULE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/OrderingMethods",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_ORDERINGMETHODS_MODULE_H\n#define EIGEN_ORDERINGMETHODS_MODULE_H\n\n#include \"SparseCore\"\n\n#include \"src/Core/util/DisableStupidWarnings.h\"\n\n/** \n  * \\defgroup OrderingMethods_Module OrderingMethods module\n  *\n  * This module is currently for internal use only\n  * \n  * It defines various built-in and external ordering methods for sparse matrices. \n  * They are typically used to reduce the number of elements during \n  * the sparse matrix decomposition (LLT, LU, QR).\n  * Precisely, in a preprocessing step, a permutation matrix P is computed using \n  * those ordering methods and applied to the columns of the matrix. \n  * Using for instance the sparse Cholesky decomposition, it is expected that \n  * the nonzeros elements in LLT(A*P) will be much smaller than that in LLT(A).\n  * \n  * \n  * Usage : \n  * \\code\n  * #include <Eigen/OrderingMethods>\n  * \\endcode\n  * \n  * A simple usage is as a template parameter in the sparse decomposition classes : \n  * \n  * \\code \n  * SparseLU<MatrixType, COLAMDOrdering<int> > solver;\n  * \\endcode \n  * \n  * \\code \n  * SparseQR<MatrixType, COLAMDOrdering<int> > solver;\n  * \\endcode\n  * \n  * It is possible as well to call directly a particular ordering method for your own purpose, \n  * \\code \n  * AMDOrdering<int> ordering;\n  * PermutationMatrix<Dynamic, Dynamic, int> perm;\n  * SparseMatrix<double> A; \n  * //Fill the matrix ...\n  * \n  * ordering(A, perm); // Call AMD\n  * \\endcode\n  * \n  * \\note Some of these methods (like AMD or METIS), need the sparsity pattern \n  * of the input matrix to be symmetric. When the matrix is structurally unsymmetric, \n  * Eigen computes internally the pattern of \\f$A^T*A\\f$ before calling the method.\n  * If your matrix is already symmetric (at leat in structure), you can avoid that\n  * by calling the method with a SelfAdjointView type.\n  * \n  * \\code\n  *  // Call the ordering on the pattern of the lower triangular matrix A\n  * ordering(A.selfadjointView<Lower>(), perm);\n  * \\endcode\n  */\n\n#include \"src/OrderingMethods/Amd.h\"\n#include \"src/OrderingMethods/Ordering.h\"\n#include \"src/Core/util/ReenableStupidWarnings.h\"\n\n#endif // EIGEN_ORDERINGMETHODS_MODULE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/PaStiXSupport",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_PASTIXSUPPORT_MODULE_H\n#define EIGEN_PASTIXSUPPORT_MODULE_H\n\n#include \"SparseCore\"\n\n#include \"src/Core/util/DisableStupidWarnings.h\"\n\nextern \"C\" {\n#include <pastix_nompi.h>\n#include <pastix.h>\n}\n\n#ifdef complex\n#undef complex\n#endif\n\n/** \\ingroup Support_modules\n  * \\defgroup PaStiXSupport_Module PaStiXSupport module\n  * \n  * This module provides an interface to the <a href=\"http://pastix.gforge.inria.fr/\">PaSTiX</a> library.\n  * PaSTiX is a general \\b supernodal, \\b parallel and \\b opensource sparse solver.\n  * It provides the two following main factorization classes:\n  * - class PastixLLT : a supernodal, parallel LLt Cholesky factorization.\n  * - class PastixLDLT: a supernodal, parallel LDLt Cholesky factorization.\n  * - class PastixLU : a supernodal, parallel LU factorization (optimized for a symmetric pattern).\n  * \n  * \\code\n  * #include <Eigen/PaStiXSupport>\n  * \\endcode\n  *\n  * In order to use this module, the PaSTiX headers must be accessible from the include paths, and your binary must be linked to the PaSTiX library and its dependencies.\n  * This wrapper resuires PaStiX version 5.x compiled without MPI support.\n  * The dependencies depend on how PaSTiX has been compiled.\n  * For a cmake based project, you can use our FindPaSTiX.cmake module to help you in this task.\n  *\n  */\n\n#include \"src/PaStiXSupport/PaStiXSupport.h\"\n\n#include \"src/Core/util/ReenableStupidWarnings.h\"\n\n#endif // EIGEN_PASTIXSUPPORT_MODULE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/PardisoSupport",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_PARDISOSUPPORT_MODULE_H\n#define EIGEN_PARDISOSUPPORT_MODULE_H\n\n#include \"SparseCore\"\n\n#include \"src/Core/util/DisableStupidWarnings.h\"\n\n#include <mkl_pardiso.h>\n\n/** \\ingroup Support_modules\n  * \\defgroup PardisoSupport_Module PardisoSupport module\n  *\n  * This module brings support for the Intel(R) MKL PARDISO direct sparse solvers.\n  *\n  * \\code\n  * #include <Eigen/PardisoSupport>\n  * \\endcode\n  *\n  * In order to use this module, the MKL headers must be accessible from the include paths, and your binary must be linked to the MKL library and its dependencies.\n  * See this \\ref TopicUsingIntelMKL \"page\" for more information on MKL-Eigen integration.\n  * \n  */\n\n#include \"src/PardisoSupport/PardisoSupport.h\"\n\n#include \"src/Core/util/ReenableStupidWarnings.h\"\n\n#endif // EIGEN_PARDISOSUPPORT_MODULE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/QR",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_QR_MODULE_H\n#define EIGEN_QR_MODULE_H\n\n#include \"Core\"\n\n#include \"Cholesky\"\n#include \"Jacobi\"\n#include \"Householder\"\n\n#include \"src/Core/util/DisableStupidWarnings.h\"\n\n/** \\defgroup QR_Module QR module\n  *\n  *\n  *\n  * This module provides various QR decompositions\n  * This module also provides some MatrixBase methods, including:\n  *  - MatrixBase::householderQr()\n  *  - MatrixBase::colPivHouseholderQr()\n  *  - MatrixBase::fullPivHouseholderQr()\n  *\n  * \\code\n  * #include <Eigen/QR>\n  * \\endcode\n  */\n\n#include \"src/QR/HouseholderQR.h\"\n#include \"src/QR/FullPivHouseholderQR.h\"\n#include \"src/QR/ColPivHouseholderQR.h\"\n#include \"src/QR/CompleteOrthogonalDecomposition.h\"\n#ifdef EIGEN_USE_LAPACKE\n#ifdef EIGEN_USE_MKL\n#include \"mkl_lapacke.h\"\n#else\n#include \"src/misc/lapacke.h\"\n#endif\n#include \"src/QR/HouseholderQR_LAPACKE.h\"\n#include \"src/QR/ColPivHouseholderQR_LAPACKE.h\"\n#endif\n\n#include \"src/Core/util/ReenableStupidWarnings.h\"\n\n#endif // EIGEN_QR_MODULE_H\n/* vim: set filetype=cpp et sw=2 ts=2 ai: */\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/QtAlignedMalloc",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_QTMALLOC_MODULE_H\n#define EIGEN_QTMALLOC_MODULE_H\n\n#include \"Core\"\n\n#if (!EIGEN_MALLOC_ALREADY_ALIGNED)\n\n#include \"src/Core/util/DisableStupidWarnings.h\"\n\nvoid *qMalloc(std::size_t size)\n{\n  return Eigen::internal::aligned_malloc(size);\n}\n\nvoid qFree(void *ptr)\n{\n  Eigen::internal::aligned_free(ptr);\n}\n\nvoid *qRealloc(void *ptr, std::size_t size)\n{\n  void* newPtr = Eigen::internal::aligned_malloc(size);\n  std::memcpy(newPtr, ptr, size);\n  Eigen::internal::aligned_free(ptr);\n  return newPtr;\n}\n\n#include \"src/Core/util/ReenableStupidWarnings.h\"\n\n#endif\n\n#endif // EIGEN_QTMALLOC_MODULE_H\n/* vim: set filetype=cpp et sw=2 ts=2 ai: */\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/SPQRSupport",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPQRSUPPORT_MODULE_H\n#define EIGEN_SPQRSUPPORT_MODULE_H\n\n#include \"SparseCore\"\n\n#include \"src/Core/util/DisableStupidWarnings.h\"\n\n#include \"SuiteSparseQR.hpp\"\n\n/** \\ingroup Support_modules\n  * \\defgroup SPQRSupport_Module SuiteSparseQR module\n  * \n  * This module provides an interface to the SPQR library, which is part of the <a href=\"http://www.suitesparse.com\">suitesparse</a> package.\n  *\n  * \\code\n  * #include <Eigen/SPQRSupport>\n  * \\endcode\n  *\n  * In order to use this module, the SPQR headers must be accessible from the include paths, and your binary must be linked to the SPQR library and its dependencies (Cholmod, AMD, COLAMD,...).\n  * For a cmake based project, you can use our FindSPQR.cmake and FindCholmod.Cmake modules\n  *\n  */\n\n#include \"src/CholmodSupport/CholmodSupport.h\"\n#include \"src/SPQRSupport/SuiteSparseQRSupport.h\"\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/SVD",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SVD_MODULE_H\n#define EIGEN_SVD_MODULE_H\n\n#include \"QR\"\n#include \"Householder\"\n#include \"Jacobi\"\n\n#include \"src/Core/util/DisableStupidWarnings.h\"\n\n/** \\defgroup SVD_Module SVD module\n  *\n  *\n  *\n  * This module provides SVD decomposition for matrices (both real and complex).\n  * Two decomposition algorithms are provided:\n  *  - JacobiSVD implementing two-sided Jacobi iterations is numerically very accurate, fast for small matrices, but very slow for larger ones.\n  *  - BDCSVD implementing a recursive divide & conquer strategy on top of an upper-bidiagonalization which remains fast for large problems.\n  * These decompositions are accessible via the respective classes and following MatrixBase methods:\n  *  - MatrixBase::jacobiSvd()\n  *  - MatrixBase::bdcSvd()\n  *\n  * \\code\n  * #include <Eigen/SVD>\n  * \\endcode\n  */\n\n#include \"src/misc/RealSvd2x2.h\"\n#include \"src/SVD/UpperBidiagonalization.h\"\n#include \"src/SVD/SVDBase.h\"\n#include \"src/SVD/JacobiSVD.h\"\n#include \"src/SVD/BDCSVD.h\"\n#if defined(EIGEN_USE_LAPACKE) && !defined(EIGEN_USE_LAPACKE_STRICT)\n#ifdef EIGEN_USE_MKL\n#include \"mkl_lapacke.h\"\n#else\n#include \"src/misc/lapacke.h\"\n#endif\n#include \"src/SVD/JacobiSVD_LAPACKE.h\"\n#endif\n\n#include \"src/Core/util/ReenableStupidWarnings.h\"\n\n#endif // EIGEN_SVD_MODULE_H\n/* vim: set filetype=cpp et sw=2 ts=2 ai: */\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/Sparse",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPARSE_MODULE_H\n#define EIGEN_SPARSE_MODULE_H\n\n/** \\defgroup Sparse_Module Sparse meta-module\n  *\n  * Meta-module including all related modules:\n  * - \\ref SparseCore_Module\n  * - \\ref OrderingMethods_Module\n  * - \\ref SparseCholesky_Module\n  * - \\ref SparseLU_Module\n  * - \\ref SparseQR_Module\n  * - \\ref IterativeLinearSolvers_Module\n  *\n    \\code\n    #include <Eigen/Sparse>\n    \\endcode\n  */\n\n#include \"SparseCore\"\n#include \"OrderingMethods\"\n#include \"SparseCholesky\"\n#include \"SparseLU\"\n#include \"SparseQR\"\n#include \"IterativeLinearSolvers\"\n\n#endif // EIGEN_SPARSE_MODULE_H\n\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/SparseCholesky",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2013 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPARSECHOLESKY_MODULE_H\n#define EIGEN_SPARSECHOLESKY_MODULE_H\n\n#include \"SparseCore\"\n#include \"OrderingMethods\"\n\n#include \"src/Core/util/DisableStupidWarnings.h\"\n\n/** \n  * \\defgroup SparseCholesky_Module SparseCholesky module\n  *\n  * This module currently provides two variants of the direct sparse Cholesky decomposition for selfadjoint (hermitian) matrices.\n  * Those decompositions are accessible via the following classes:\n  *  - SimplicialLLt,\n  *  - SimplicialLDLt\n  *\n  * Such problems can also be solved using the ConjugateGradient solver from the IterativeLinearSolvers module.\n  *\n  * \\code\n  * #include <Eigen/SparseCholesky>\n  * \\endcode\n  */\n\n#include \"src/SparseCholesky/SimplicialCholesky.h\"\n#include \"src/SparseCholesky/SimplicialCholesky_impl.h\"\n#include \"src/Core/util/ReenableStupidWarnings.h\"\n\n#endif // EIGEN_SPARSECHOLESKY_MODULE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/SparseCore",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPARSECORE_MODULE_H\n#define EIGEN_SPARSECORE_MODULE_H\n\n#include \"Core\"\n\n#include \"src/Core/util/DisableStupidWarnings.h\"\n\n#include <vector>\n#include <map>\n#include <cstdlib>\n#include <cstring>\n#include <algorithm>\n\n/** \n  * \\defgroup SparseCore_Module SparseCore module\n  *\n  * This module provides a sparse matrix representation, and basic associated matrix manipulations\n  * and operations.\n  *\n  * See the \\ref TutorialSparse \"Sparse tutorial\"\n  *\n  * \\code\n  * #include <Eigen/SparseCore>\n  * \\endcode\n  *\n  * This module depends on: Core.\n  */\n\n#include \"src/SparseCore/SparseUtil.h\"\n#include \"src/SparseCore/SparseMatrixBase.h\"\n#include \"src/SparseCore/SparseAssign.h\"\n#include \"src/SparseCore/CompressedStorage.h\"\n#include \"src/SparseCore/AmbiVector.h\"\n#include \"src/SparseCore/SparseCompressedBase.h\"\n#include \"src/SparseCore/SparseMatrix.h\"\n#include \"src/SparseCore/SparseMap.h\"\n#include \"src/SparseCore/MappedSparseMatrix.h\"\n#include \"src/SparseCore/SparseVector.h\"\n#include \"src/SparseCore/SparseRef.h\"\n#include \"src/SparseCore/SparseCwiseUnaryOp.h\"\n#include \"src/SparseCore/SparseCwiseBinaryOp.h\"\n#include \"src/SparseCore/SparseTranspose.h\"\n#include \"src/SparseCore/SparseBlock.h\"\n#include \"src/SparseCore/SparseDot.h\"\n#include \"src/SparseCore/SparseRedux.h\"\n#include \"src/SparseCore/SparseView.h\"\n#include \"src/SparseCore/SparseDiagonalProduct.h\"\n#include \"src/SparseCore/ConservativeSparseSparseProduct.h\"\n#include \"src/SparseCore/SparseSparseProductWithPruning.h\"\n#include \"src/SparseCore/SparseProduct.h\"\n#include \"src/SparseCore/SparseDenseProduct.h\"\n#include \"src/SparseCore/SparseSelfAdjointView.h\"\n#include \"src/SparseCore/SparseTriangularView.h\"\n#include \"src/SparseCore/TriangularSolver.h\"\n#include \"src/SparseCore/SparsePermutation.h\"\n#include \"src/SparseCore/SparseFuzzy.h\"\n#include \"src/SparseCore/SparseSolverBase.h\"\n\n#include \"src/Core/util/ReenableStupidWarnings.h\"\n\n#endif // EIGEN_SPARSECORE_MODULE_H\n\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/SparseLU",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>\n// Copyright (C) 2012 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPARSELU_MODULE_H\n#define EIGEN_SPARSELU_MODULE_H\n\n#include \"SparseCore\"\n\n/** \n  * \\defgroup SparseLU_Module SparseLU module\n  * This module defines a supernodal factorization of general sparse matrices.\n  * The code is fully optimized for supernode-panel updates with specialized kernels.\n  * Please, see the documentation of the SparseLU class for more details.\n  */\n\n// Ordering interface\n#include \"OrderingMethods\"\n\n#include \"src/Core/util/DisableStupidWarnings.h\"\n\n#include \"src/SparseLU/SparseLU_gemm_kernel.h\"\n\n#include \"src/SparseLU/SparseLU_Structs.h\"\n#include \"src/SparseLU/SparseLU_SupernodalMatrix.h\"\n#include \"src/SparseLU/SparseLUImpl.h\"\n#include \"src/SparseCore/SparseColEtree.h\"\n#include \"src/SparseLU/SparseLU_Memory.h\"\n#include \"src/SparseLU/SparseLU_heap_relax_snode.h\"\n#include \"src/SparseLU/SparseLU_relax_snode.h\"\n#include \"src/SparseLU/SparseLU_pivotL.h\"\n#include \"src/SparseLU/SparseLU_panel_dfs.h\"\n#include \"src/SparseLU/SparseLU_kernel_bmod.h\"\n#include \"src/SparseLU/SparseLU_panel_bmod.h\"\n#include \"src/SparseLU/SparseLU_column_dfs.h\"\n#include \"src/SparseLU/SparseLU_column_bmod.h\"\n#include \"src/SparseLU/SparseLU_copy_to_ucol.h\"\n#include \"src/SparseLU/SparseLU_pruneL.h\"\n#include \"src/SparseLU/SparseLU_Utils.h\"\n#include \"src/SparseLU/SparseLU.h\"\n\n#include \"src/Core/util/ReenableStupidWarnings.h\"\n\n#endif // EIGEN_SPARSELU_MODULE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/SparseQR",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPARSEQR_MODULE_H\n#define EIGEN_SPARSEQR_MODULE_H\n\n#include \"SparseCore\"\n#include \"OrderingMethods\"\n#include \"src/Core/util/DisableStupidWarnings.h\"\n\n/** \\defgroup SparseQR_Module SparseQR module\n  * \\brief Provides QR decomposition for sparse matrices\n  * \n  * This module provides a simplicial version of the left-looking Sparse QR decomposition. \n  * The columns of the input matrix should be reordered to limit the fill-in during the \n  * decomposition. Built-in methods (COLAMD, AMD) or external  methods (METIS) can be used to this end.\n  * See the \\link OrderingMethods_Module OrderingMethods\\endlink module for the list \n  * of built-in and external ordering methods.\n  * \n  * \\code\n  * #include <Eigen/SparseQR>\n  * \\endcode\n  * \n  * \n  */\n\n#include \"src/SparseCore/SparseColEtree.h\"\n#include \"src/SparseQR/SparseQR.h\"\n\n#include \"src/Core/util/ReenableStupidWarnings.h\"\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/StdDeque",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2009 Hauke Heibel <hauke.heibel@googlemail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_STDDEQUE_MODULE_H\n#define EIGEN_STDDEQUE_MODULE_H\n\n#include \"Core\"\n#include <deque>\n\n#if EIGEN_COMP_MSVC && EIGEN_OS_WIN64 && (EIGEN_MAX_STATIC_ALIGN_BYTES<=16) /* MSVC auto aligns up to 16 bytes in 64 bit builds */\n\n#define EIGEN_DEFINE_STL_DEQUE_SPECIALIZATION(...)\n\n#else\n\n#include \"src/StlSupport/StdDeque.h\"\n\n#endif\n\n#endif // EIGEN_STDDEQUE_MODULE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/StdList",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Hauke Heibel <hauke.heibel@googlemail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_STDLIST_MODULE_H\n#define EIGEN_STDLIST_MODULE_H\n\n#include \"Core\"\n#include <list>\n\n#if EIGEN_COMP_MSVC && EIGEN_OS_WIN64 && (EIGEN_MAX_STATIC_ALIGN_BYTES<=16) /* MSVC auto aligns up to 16 bytes in 64 bit builds */\n\n#define EIGEN_DEFINE_STL_LIST_SPECIALIZATION(...)\n\n#else\n\n#include \"src/StlSupport/StdList.h\"\n\n#endif\n\n#endif // EIGEN_STDLIST_MODULE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/StdVector",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2009 Hauke Heibel <hauke.heibel@googlemail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_STDVECTOR_MODULE_H\n#define EIGEN_STDVECTOR_MODULE_H\n\n#include \"Core\"\n#include <vector>\n\n#if EIGEN_COMP_MSVC && EIGEN_OS_WIN64 && (EIGEN_MAX_STATIC_ALIGN_BYTES<=16) /* MSVC auto aligns up to 16 bytes in 64 bit builds */\n\n#define EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(...)\n\n#else\n\n#include \"src/StlSupport/StdVector.h\"\n\n#endif\n\n#endif // EIGEN_STDVECTOR_MODULE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/SuperLUSupport",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SUPERLUSUPPORT_MODULE_H\n#define EIGEN_SUPERLUSUPPORT_MODULE_H\n\n#include \"SparseCore\"\n\n#include \"src/Core/util/DisableStupidWarnings.h\"\n\n#ifdef EMPTY\n#define EIGEN_EMPTY_WAS_ALREADY_DEFINED\n#endif\n\ntypedef int int_t;\n#include <slu_Cnames.h>\n#include <supermatrix.h>\n#include <slu_util.h>\n\n// slu_util.h defines a preprocessor token named EMPTY which is really polluting,\n// so we remove it in favor of a SUPERLU_EMPTY token.\n// If EMPTY was already defined then we don't undef it.\n\n#if defined(EIGEN_EMPTY_WAS_ALREADY_DEFINED)\n# undef EIGEN_EMPTY_WAS_ALREADY_DEFINED\n#elif defined(EMPTY)\n# undef EMPTY\n#endif\n\n#define SUPERLU_EMPTY (-1)\n\nnamespace Eigen { struct SluMatrix; }\n\n/** \\ingroup Support_modules\n  * \\defgroup SuperLUSupport_Module SuperLUSupport module\n  *\n  * This module provides an interface to the <a href=\"http://crd-legacy.lbl.gov/~xiaoye/SuperLU/\">SuperLU</a> library.\n  * It provides the following factorization class:\n  * - class SuperLU: a supernodal sequential LU factorization.\n  * - class SuperILU: a supernodal sequential incomplete LU factorization (to be used as a preconditioner for iterative methods).\n  *\n  * \\warning This wrapper requires at least versions 4.0 of SuperLU. The 3.x versions are not supported.\n  *\n  * \\warning When including this module, you have to use SUPERLU_EMPTY instead of EMPTY which is no longer defined because it is too polluting.\n  *\n  * \\code\n  * #include <Eigen/SuperLUSupport>\n  * \\endcode\n  *\n  * In order to use this module, the superlu headers must be accessible from the include paths, and your binary must be linked to the superlu library and its dependencies.\n  * The dependencies depend on how superlu has been compiled.\n  * For a cmake based project, you can use our FindSuperLU.cmake module to help you in this task.\n  *\n  */\n\n#include \"src/SuperLUSupport/SuperLUSupport.h\"\n\n#include \"src/Core/util/ReenableStupidWarnings.h\"\n\n#endif // EIGEN_SUPERLUSUPPORT_MODULE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/UmfPackSupport",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_UMFPACKSUPPORT_MODULE_H\n#define EIGEN_UMFPACKSUPPORT_MODULE_H\n\n#include \"SparseCore\"\n\n#include \"src/Core/util/DisableStupidWarnings.h\"\n\nextern \"C\" {\n#include <umfpack.h>\n}\n\n/** \\ingroup Support_modules\n  * \\defgroup UmfPackSupport_Module UmfPackSupport module\n  *\n  * This module provides an interface to the UmfPack library which is part of the <a href=\"http://www.suitesparse.com\">suitesparse</a> package.\n  * It provides the following factorization class:\n  * - class UmfPackLU: a multifrontal sequential LU factorization.\n  *\n  * \\code\n  * #include <Eigen/UmfPackSupport>\n  * \\endcode\n  *\n  * In order to use this module, the umfpack headers must be accessible from the include paths, and your binary must be linked to the umfpack library and its dependencies.\n  * The dependencies depend on how umfpack has been compiled.\n  * For a cmake based project, you can use our FindUmfPack.cmake module to help you in this task.\n  *\n  */\n\n#include \"src/UmfPackSupport/UmfPackSupport.h\"\n\n#include \"src/Core/util/ReenableStupidWarnings.h\"\n\n#endif // EIGEN_UMFPACKSUPPORT_MODULE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Cholesky/LDLT.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2011 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2009 Keir Mierle <mierle@gmail.com>\n// Copyright (C) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2011 Timothy E. Holy <tim.holy@gmail.com >\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_LDLT_H\n#define EIGEN_LDLT_H\n\nnamespace Eigen {\n\nnamespace internal {\n  template<typename _MatrixType, int _UpLo> struct traits<LDLT<_MatrixType, _UpLo> >\n   : traits<_MatrixType>\n  {\n    typedef MatrixXpr XprKind;\n    typedef SolverStorage StorageKind;\n    typedef int StorageIndex;\n    enum { Flags = 0 };\n  };\n\n  template<typename MatrixType, int UpLo> struct LDLT_Traits;\n\n  // PositiveSemiDef means positive semi-definite and non-zero; same for NegativeSemiDef\n  enum SignMatrix { PositiveSemiDef, NegativeSemiDef, ZeroSign, Indefinite };\n}\n\n/** \\ingroup Cholesky_Module\n  *\n  * \\class LDLT\n  *\n  * \\brief Robust Cholesky decomposition of a matrix with pivoting\n  *\n  * \\tparam _MatrixType the type of the matrix of which to compute the LDL^T Cholesky decomposition\n  * \\tparam _UpLo the triangular part that will be used for the decompositon: Lower (default) or Upper.\n  *             The other triangular part won't be read.\n  *\n  * Perform a robust Cholesky decomposition of a positive semidefinite or negative semidefinite\n  * matrix \\f$ A \\f$ such that \\f$ A =  P^TLDL^*P \\f$, where P is a permutation matrix, L\n  * is lower triangular with a unit diagonal and D is a diagonal matrix.\n  *\n  * The decomposition uses pivoting to ensure stability, so that L will have\n  * zeros in the bottom right rank(A) - n submatrix. Avoiding the square root\n  * on D also stabilizes the computation.\n  *\n  * Remember that Cholesky decompositions are not rank-revealing. Also, do not use a Cholesky\n  * decomposition to determine whether a system of equations has a solution.\n  *\n  * This class supports the \\link InplaceDecomposition inplace decomposition \\endlink mechanism.\n  * \n  * \\sa MatrixBase::ldlt(), SelfAdjointView::ldlt(), class LLT\n  */\ntemplate<typename _MatrixType, int _UpLo> class LDLT\n        : public SolverBase<LDLT<_MatrixType, _UpLo> >\n{\n  public:\n    typedef _MatrixType MatrixType;\n    typedef SolverBase<LDLT> Base;\n    friend class SolverBase<LDLT>;\n\n    EIGEN_GENERIC_PUBLIC_INTERFACE(LDLT)\n    enum {\n      MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime,\n      MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime,\n      UpLo = _UpLo\n    };\n    typedef Matrix<Scalar, RowsAtCompileTime, 1, 0, MaxRowsAtCompileTime, 1> TmpMatrixType;\n\n    typedef Transpositions<RowsAtCompileTime, MaxRowsAtCompileTime> TranspositionType;\n    typedef PermutationMatrix<RowsAtCompileTime, MaxRowsAtCompileTime> PermutationType;\n\n    typedef internal::LDLT_Traits<MatrixType,UpLo> Traits;\n\n    /** \\brief Default Constructor.\n      *\n      * The default constructor is useful in cases in which the user intends to\n      * perform decompositions via LDLT::compute(const MatrixType&).\n      */\n    LDLT()\n      : m_matrix(),\n        m_transpositions(),\n        m_sign(internal::ZeroSign),\n        m_isInitialized(false)\n    {}\n\n    /** \\brief Default Constructor with memory preallocation\n      *\n      * Like the default constructor but with preallocation of the internal data\n      * according to the specified problem \\a size.\n      * \\sa LDLT()\n      */\n    explicit LDLT(Index size)\n      : m_matrix(size, size),\n        m_transpositions(size),\n        m_temporary(size),\n        m_sign(internal::ZeroSign),\n        m_isInitialized(false)\n    {}\n\n    /** \\brief Constructor with decomposition\n      *\n      * This calculates the decomposition for the input \\a matrix.\n      *\n      * \\sa LDLT(Index size)\n      */\n    template<typename InputType>\n    explicit LDLT(const EigenBase<InputType>& matrix)\n      : m_matrix(matrix.rows(), matrix.cols()),\n        m_transpositions(matrix.rows()),\n        m_temporary(matrix.rows()),\n        m_sign(internal::ZeroSign),\n        m_isInitialized(false)\n    {\n      compute(matrix.derived());\n    }\n\n    /** \\brief Constructs a LDLT factorization from a given matrix\n      *\n      * This overloaded constructor is provided for \\link InplaceDecomposition inplace decomposition \\endlink when \\c MatrixType is a Eigen::Ref.\n      *\n      * \\sa LDLT(const EigenBase&)\n      */\n    template<typename InputType>\n    explicit LDLT(EigenBase<InputType>& matrix)\n      : m_matrix(matrix.derived()),\n        m_transpositions(matrix.rows()),\n        m_temporary(matrix.rows()),\n        m_sign(internal::ZeroSign),\n        m_isInitialized(false)\n    {\n      compute(matrix.derived());\n    }\n\n    /** Clear any existing decomposition\n     * \\sa rankUpdate(w,sigma)\n     */\n    void setZero()\n    {\n      m_isInitialized = false;\n    }\n\n    /** \\returns a view of the upper triangular matrix U */\n    inline typename Traits::MatrixU matrixU() const\n    {\n      eigen_assert(m_isInitialized && \"LDLT is not initialized.\");\n      return Traits::getU(m_matrix);\n    }\n\n    /** \\returns a view of the lower triangular matrix L */\n    inline typename Traits::MatrixL matrixL() const\n    {\n      eigen_assert(m_isInitialized && \"LDLT is not initialized.\");\n      return Traits::getL(m_matrix);\n    }\n\n    /** \\returns the permutation matrix P as a transposition sequence.\n      */\n    inline const TranspositionType& transpositionsP() const\n    {\n      eigen_assert(m_isInitialized && \"LDLT is not initialized.\");\n      return m_transpositions;\n    }\n\n    /** \\returns the coefficients of the diagonal matrix D */\n    inline Diagonal<const MatrixType> vectorD() const\n    {\n      eigen_assert(m_isInitialized && \"LDLT is not initialized.\");\n      return m_matrix.diagonal();\n    }\n\n    /** \\returns true if the matrix is positive (semidefinite) */\n    inline bool isPositive() const\n    {\n      eigen_assert(m_isInitialized && \"LDLT is not initialized.\");\n      return m_sign == internal::PositiveSemiDef || m_sign == internal::ZeroSign;\n    }\n\n    /** \\returns true if the matrix is negative (semidefinite) */\n    inline bool isNegative(void) const\n    {\n      eigen_assert(m_isInitialized && \"LDLT is not initialized.\");\n      return m_sign == internal::NegativeSemiDef || m_sign == internal::ZeroSign;\n    }\n\n    #ifdef EIGEN_PARSED_BY_DOXYGEN\n    /** \\returns a solution x of \\f$ A x = b \\f$ using the current decomposition of A.\n      *\n      * This function also supports in-place solves using the syntax <tt>x = decompositionObject.solve(x)</tt> .\n      *\n      * \\note_about_checking_solutions\n      *\n      * More precisely, this method solves \\f$ A x = b \\f$ using the decomposition \\f$ A = P^T L D L^* P \\f$\n      * by solving the systems \\f$ P^T y_1 = b \\f$, \\f$ L y_2 = y_1 \\f$, \\f$ D y_3 = y_2 \\f$,\n      * \\f$ L^* y_4 = y_3 \\f$ and \\f$ P x = y_4 \\f$ in succession. If the matrix \\f$ A \\f$ is singular, then\n      * \\f$ D \\f$ will also be singular (all the other matrices are invertible). In that case, the\n      * least-square solution of \\f$ D y_3 = y_2 \\f$ is computed. This does not mean that this function\n      * computes the least-square solution of \\f$ A x = b \\f$ is \\f$ A \\f$ is singular.\n      *\n      * \\sa MatrixBase::ldlt(), SelfAdjointView::ldlt()\n      */\n    template<typename Rhs>\n    inline const Solve<LDLT, Rhs>\n    solve(const MatrixBase<Rhs>& b) const;\n    #endif\n\n    template<typename Derived>\n    bool solveInPlace(MatrixBase<Derived> &bAndX) const;\n\n    template<typename InputType>\n    LDLT& compute(const EigenBase<InputType>& matrix);\n\n    /** \\returns an estimate of the reciprocal condition number of the matrix of\n     *  which \\c *this is the LDLT decomposition.\n     */\n    RealScalar rcond() const\n    {\n      eigen_assert(m_isInitialized && \"LDLT is not initialized.\");\n      return internal::rcond_estimate_helper(m_l1_norm, *this);\n    }\n\n    template <typename Derived>\n    LDLT& rankUpdate(const MatrixBase<Derived>& w, const RealScalar& alpha=1);\n\n    /** \\returns the internal LDLT decomposition matrix\n      *\n      * TODO: document the storage layout\n      */\n    inline const MatrixType& matrixLDLT() const\n    {\n      eigen_assert(m_isInitialized && \"LDLT is not initialized.\");\n      return m_matrix;\n    }\n\n    MatrixType reconstructedMatrix() const;\n\n    /** \\returns the adjoint of \\c *this, that is, a const reference to the decomposition itself as the underlying matrix is self-adjoint.\n      *\n      * This method is provided for compatibility with other matrix decompositions, thus enabling generic code such as:\n      * \\code x = decomposition.adjoint().solve(b) \\endcode\n      */\n    const LDLT& adjoint() const { return *this; };\n\n    inline Index rows() const { return m_matrix.rows(); }\n    inline Index cols() const { return m_matrix.cols(); }\n\n    /** \\brief Reports whether previous computation was successful.\n      *\n      * \\returns \\c Success if computation was successful,\n      *          \\c NumericalIssue if the factorization failed because of a zero pivot.\n      */\n    ComputationInfo info() const\n    {\n      eigen_assert(m_isInitialized && \"LDLT is not initialized.\");\n      return m_info;\n    }\n\n    #ifndef EIGEN_PARSED_BY_DOXYGEN\n    template<typename RhsType, typename DstType>\n    void _solve_impl(const RhsType &rhs, DstType &dst) const;\n\n    template<bool Conjugate, typename RhsType, typename DstType>\n    void _solve_impl_transposed(const RhsType &rhs, DstType &dst) const;\n    #endif\n\n  protected:\n\n    static void check_template_parameters()\n    {\n      EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar);\n    }\n\n    /** \\internal\n      * Used to compute and store the Cholesky decomposition A = L D L^* = U^* D U.\n      * The strict upper part is used during the decomposition, the strict lower\n      * part correspond to the coefficients of L (its diagonal is equal to 1 and\n      * is not stored), and the diagonal entries correspond to D.\n      */\n    MatrixType m_matrix;\n    RealScalar m_l1_norm;\n    TranspositionType m_transpositions;\n    TmpMatrixType m_temporary;\n    internal::SignMatrix m_sign;\n    bool m_isInitialized;\n    ComputationInfo m_info;\n};\n\nnamespace internal {\n\ntemplate<int UpLo> struct ldlt_inplace;\n\ntemplate<> struct ldlt_inplace<Lower>\n{\n  template<typename MatrixType, typename TranspositionType, typename Workspace>\n  static bool unblocked(MatrixType& mat, TranspositionType& transpositions, Workspace& temp, SignMatrix& sign)\n  {\n    using std::abs;\n    typedef typename MatrixType::Scalar Scalar;\n    typedef typename MatrixType::RealScalar RealScalar;\n    typedef typename TranspositionType::StorageIndex IndexType;\n    eigen_assert(mat.rows()==mat.cols());\n    const Index size = mat.rows();\n    bool found_zero_pivot = false;\n    bool ret = true;\n\n    if (size <= 1)\n    {\n      transpositions.setIdentity();\n      if(size==0) sign = ZeroSign;\n      else if (numext::real(mat.coeff(0,0)) > static_cast<RealScalar>(0) ) sign = PositiveSemiDef;\n      else if (numext::real(mat.coeff(0,0)) < static_cast<RealScalar>(0)) sign = NegativeSemiDef;\n      else sign = ZeroSign;\n      return true;\n    }\n\n    for (Index k = 0; k < size; ++k)\n    {\n      // Find largest diagonal element\n      Index index_of_biggest_in_corner;\n      mat.diagonal().tail(size-k).cwiseAbs().maxCoeff(&index_of_biggest_in_corner);\n      index_of_biggest_in_corner += k;\n\n      transpositions.coeffRef(k) = IndexType(index_of_biggest_in_corner);\n      if(k != index_of_biggest_in_corner)\n      {\n        // apply the transposition while taking care to consider only\n        // the lower triangular part\n        Index s = size-index_of_biggest_in_corner-1; // trailing size after the biggest element\n        mat.row(k).head(k).swap(mat.row(index_of_biggest_in_corner).head(k));\n        mat.col(k).tail(s).swap(mat.col(index_of_biggest_in_corner).tail(s));\n        std::swap(mat.coeffRef(k,k),mat.coeffRef(index_of_biggest_in_corner,index_of_biggest_in_corner));\n        for(Index i=k+1;i<index_of_biggest_in_corner;++i)\n        {\n          Scalar tmp = mat.coeffRef(i,k);\n          mat.coeffRef(i,k) = numext::conj(mat.coeffRef(index_of_biggest_in_corner,i));\n          mat.coeffRef(index_of_biggest_in_corner,i) = numext::conj(tmp);\n        }\n        if(NumTraits<Scalar>::IsComplex)\n          mat.coeffRef(index_of_biggest_in_corner,k) = numext::conj(mat.coeff(index_of_biggest_in_corner,k));\n      }\n\n      // partition the matrix:\n      //       A00 |  -  |  -\n      // lu  = A10 | A11 |  -\n      //       A20 | A21 | A22\n      Index rs = size - k - 1;\n      Block<MatrixType,Dynamic,1> A21(mat,k+1,k,rs,1);\n      Block<MatrixType,1,Dynamic> A10(mat,k,0,1,k);\n      Block<MatrixType,Dynamic,Dynamic> A20(mat,k+1,0,rs,k);\n\n      if(k>0)\n      {\n        temp.head(k) = mat.diagonal().real().head(k).asDiagonal() * A10.adjoint();\n        mat.coeffRef(k,k) -= (A10 * temp.head(k)).value();\n        if(rs>0)\n          A21.noalias() -= A20 * temp.head(k);\n      }\n\n      // In some previous versions of Eigen (e.g., 3.2.1), the scaling was omitted if the pivot\n      // was smaller than the cutoff value. However, since LDLT is not rank-revealing\n      // we should only make sure that we do not introduce INF or NaN values.\n      // Remark that LAPACK also uses 0 as the cutoff value.\n      RealScalar realAkk = numext::real(mat.coeffRef(k,k));\n      bool pivot_is_valid = (abs(realAkk) > RealScalar(0));\n\n      if(k==0 && !pivot_is_valid)\n      {\n        // The entire diagonal is zero, there is nothing more to do\n        // except filling the transpositions, and checking whether the matrix is zero.\n        sign = ZeroSign;\n        for(Index j = 0; j<size; ++j)\n        {\n          transpositions.coeffRef(j) = IndexType(j);\n          ret = ret && (mat.col(j).tail(size-j-1).array()==Scalar(0)).all();\n        }\n        return ret;\n      }\n\n      if((rs>0) && pivot_is_valid)\n        A21 /= realAkk;\n      else if(rs>0)\n        ret = ret && (A21.array()==Scalar(0)).all();\n\n      if(found_zero_pivot && pivot_is_valid) ret = false; // factorization failed\n      else if(!pivot_is_valid) found_zero_pivot = true;\n\n      if (sign == PositiveSemiDef) {\n        if (realAkk < static_cast<RealScalar>(0)) sign = Indefinite;\n      } else if (sign == NegativeSemiDef) {\n        if (realAkk > static_cast<RealScalar>(0)) sign = Indefinite;\n      } else if (sign == ZeroSign) {\n        if (realAkk > static_cast<RealScalar>(0)) sign = PositiveSemiDef;\n        else if (realAkk < static_cast<RealScalar>(0)) sign = NegativeSemiDef;\n      }\n    }\n\n    return ret;\n  }\n\n  // Reference for the algorithm: Davis and Hager, \"Multiple Rank\n  // Modifications of a Sparse Cholesky Factorization\" (Algorithm 1)\n  // Trivial rearrangements of their computations (Timothy E. Holy)\n  // allow their algorithm to work for rank-1 updates even if the\n  // original matrix is not of full rank.\n  // Here only rank-1 updates are implemented, to reduce the\n  // requirement for intermediate storage and improve accuracy\n  template<typename MatrixType, typename WDerived>\n  static bool updateInPlace(MatrixType& mat, MatrixBase<WDerived>& w, const typename MatrixType::RealScalar& sigma=1)\n  {\n    using numext::isfinite;\n    typedef typename MatrixType::Scalar Scalar;\n    typedef typename MatrixType::RealScalar RealScalar;\n\n    const Index size = mat.rows();\n    eigen_assert(mat.cols() == size && w.size()==size);\n\n    RealScalar alpha = 1;\n\n    // Apply the update\n    for (Index j = 0; j < size; j++)\n    {\n      // Check for termination due to an original decomposition of low-rank\n      if (!(isfinite)(alpha))\n        break;\n\n      // Update the diagonal terms\n      RealScalar dj = numext::real(mat.coeff(j,j));\n      Scalar wj = w.coeff(j);\n      RealScalar swj2 = sigma*numext::abs2(wj);\n      RealScalar gamma = dj*alpha + swj2;\n\n      mat.coeffRef(j,j) += swj2/alpha;\n      alpha += swj2/dj;\n\n\n      // Update the terms of L\n      Index rs = size-j-1;\n      w.tail(rs) -= wj * mat.col(j).tail(rs);\n      if(gamma != 0)\n        mat.col(j).tail(rs) += (sigma*numext::conj(wj)/gamma)*w.tail(rs);\n    }\n    return true;\n  }\n\n  template<typename MatrixType, typename TranspositionType, typename Workspace, typename WType>\n  static bool update(MatrixType& mat, const TranspositionType& transpositions, Workspace& tmp, const WType& w, const typename MatrixType::RealScalar& sigma=1)\n  {\n    // Apply the permutation to the input w\n    tmp = transpositions * w;\n\n    return ldlt_inplace<Lower>::updateInPlace(mat,tmp,sigma);\n  }\n};\n\ntemplate<> struct ldlt_inplace<Upper>\n{\n  template<typename MatrixType, typename TranspositionType, typename Workspace>\n  static EIGEN_STRONG_INLINE bool unblocked(MatrixType& mat, TranspositionType& transpositions, Workspace& temp, SignMatrix& sign)\n  {\n    Transpose<MatrixType> matt(mat);\n    return ldlt_inplace<Lower>::unblocked(matt, transpositions, temp, sign);\n  }\n\n  template<typename MatrixType, typename TranspositionType, typename Workspace, typename WType>\n  static EIGEN_STRONG_INLINE bool update(MatrixType& mat, TranspositionType& transpositions, Workspace& tmp, WType& w, const typename MatrixType::RealScalar& sigma=1)\n  {\n    Transpose<MatrixType> matt(mat);\n    return ldlt_inplace<Lower>::update(matt, transpositions, tmp, w.conjugate(), sigma);\n  }\n};\n\ntemplate<typename MatrixType> struct LDLT_Traits<MatrixType,Lower>\n{\n  typedef const TriangularView<const MatrixType, UnitLower> MatrixL;\n  typedef const TriangularView<const typename MatrixType::AdjointReturnType, UnitUpper> MatrixU;\n  static inline MatrixL getL(const MatrixType& m) { return MatrixL(m); }\n  static inline MatrixU getU(const MatrixType& m) { return MatrixU(m.adjoint()); }\n};\n\ntemplate<typename MatrixType> struct LDLT_Traits<MatrixType,Upper>\n{\n  typedef const TriangularView<const typename MatrixType::AdjointReturnType, UnitLower> MatrixL;\n  typedef const TriangularView<const MatrixType, UnitUpper> MatrixU;\n  static inline MatrixL getL(const MatrixType& m) { return MatrixL(m.adjoint()); }\n  static inline MatrixU getU(const MatrixType& m) { return MatrixU(m); }\n};\n\n} // end namespace internal\n\n/** Compute / recompute the LDLT decomposition A = L D L^* = U^* D U of \\a matrix\n  */\ntemplate<typename MatrixType, int _UpLo>\ntemplate<typename InputType>\nLDLT<MatrixType,_UpLo>& LDLT<MatrixType,_UpLo>::compute(const EigenBase<InputType>& a)\n{\n  check_template_parameters();\n\n  eigen_assert(a.rows()==a.cols());\n  const Index size = a.rows();\n\n  m_matrix = a.derived();\n\n  // Compute matrix L1 norm = max abs column sum.\n  m_l1_norm = RealScalar(0);\n  // TODO move this code to SelfAdjointView\n  for (Index col = 0; col < size; ++col) {\n    RealScalar abs_col_sum;\n    if (_UpLo == Lower)\n      abs_col_sum = m_matrix.col(col).tail(size - col).template lpNorm<1>() + m_matrix.row(col).head(col).template lpNorm<1>();\n    else\n      abs_col_sum = m_matrix.col(col).head(col).template lpNorm<1>() + m_matrix.row(col).tail(size - col).template lpNorm<1>();\n    if (abs_col_sum > m_l1_norm)\n      m_l1_norm = abs_col_sum;\n  }\n\n  m_transpositions.resize(size);\n  m_isInitialized = false;\n  m_temporary.resize(size);\n  m_sign = internal::ZeroSign;\n\n  m_info = internal::ldlt_inplace<UpLo>::unblocked(m_matrix, m_transpositions, m_temporary, m_sign) ? Success : NumericalIssue;\n\n  m_isInitialized = true;\n  return *this;\n}\n\n/** Update the LDLT decomposition:  given A = L D L^T, efficiently compute the decomposition of A + sigma w w^T.\n * \\param w a vector to be incorporated into the decomposition.\n * \\param sigma a scalar, +1 for updates and -1 for \"downdates,\" which correspond to removing previously-added column vectors. Optional; default value is +1.\n * \\sa setZero()\n  */\ntemplate<typename MatrixType, int _UpLo>\ntemplate<typename Derived>\nLDLT<MatrixType,_UpLo>& LDLT<MatrixType,_UpLo>::rankUpdate(const MatrixBase<Derived>& w, const typename LDLT<MatrixType,_UpLo>::RealScalar& sigma)\n{\n  typedef typename TranspositionType::StorageIndex IndexType;\n  const Index size = w.rows();\n  if (m_isInitialized)\n  {\n    eigen_assert(m_matrix.rows()==size);\n  }\n  else\n  {\n    m_matrix.resize(size,size);\n    m_matrix.setZero();\n    m_transpositions.resize(size);\n    for (Index i = 0; i < size; i++)\n      m_transpositions.coeffRef(i) = IndexType(i);\n    m_temporary.resize(size);\n    m_sign = sigma>=0 ? internal::PositiveSemiDef : internal::NegativeSemiDef;\n    m_isInitialized = true;\n  }\n\n  internal::ldlt_inplace<UpLo>::update(m_matrix, m_transpositions, m_temporary, w, sigma);\n\n  return *this;\n}\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\ntemplate<typename _MatrixType, int _UpLo>\ntemplate<typename RhsType, typename DstType>\nvoid LDLT<_MatrixType,_UpLo>::_solve_impl(const RhsType &rhs, DstType &dst) const\n{\n  _solve_impl_transposed<true>(rhs, dst);\n}\n\ntemplate<typename _MatrixType,int _UpLo>\ntemplate<bool Conjugate, typename RhsType, typename DstType>\nvoid LDLT<_MatrixType,_UpLo>::_solve_impl_transposed(const RhsType &rhs, DstType &dst) const\n{\n  // dst = P b\n  dst = m_transpositions * rhs;\n\n  // dst = L^-1 (P b)\n  // dst = L^-*T (P b)\n  matrixL().template conjugateIf<!Conjugate>().solveInPlace(dst);\n\n  // dst = D^-* (L^-1 P b)\n  // dst = D^-1 (L^-*T P b)\n  // more precisely, use pseudo-inverse of D (see bug 241)\n  using std::abs;\n  const typename Diagonal<const MatrixType>::RealReturnType vecD(vectorD());\n  // In some previous versions, tolerance was set to the max of 1/highest (or rather numeric_limits::min())\n  // and the maximal diagonal entry * epsilon as motivated by LAPACK's xGELSS:\n  // RealScalar tolerance = numext::maxi(vecD.array().abs().maxCoeff() * NumTraits<RealScalar>::epsilon(),RealScalar(1) / NumTraits<RealScalar>::highest());\n  // However, LDLT is not rank revealing, and so adjusting the tolerance wrt to the highest\n  // diagonal element is not well justified and leads to numerical issues in some cases.\n  // Moreover, Lapack's xSYTRS routines use 0 for the tolerance.\n  // Using numeric_limits::min() gives us more robustness to denormals.\n  RealScalar tolerance = (std::numeric_limits<RealScalar>::min)();\n  for (Index i = 0; i < vecD.size(); ++i)\n  {\n    if(abs(vecD(i)) > tolerance)\n      dst.row(i) /= vecD(i);\n    else\n      dst.row(i).setZero();\n  }\n\n  // dst = L^-* (D^-* L^-1 P b)\n  // dst = L^-T (D^-1 L^-*T P b)\n  matrixL().transpose().template conjugateIf<Conjugate>().solveInPlace(dst);\n\n  // dst = P^T (L^-* D^-* L^-1 P b) = A^-1 b\n  // dst = P^-T (L^-T D^-1 L^-*T P b) = A^-1 b\n  dst = m_transpositions.transpose() * dst;\n}\n#endif\n\n/** \\internal use x = ldlt_object.solve(x);\n  *\n  * This is the \\em in-place version of solve().\n  *\n  * \\param bAndX represents both the right-hand side matrix b and result x.\n  *\n  * \\returns true always! If you need to check for existence of solutions, use another decomposition like LU, QR, or SVD.\n  *\n  * This version avoids a copy when the right hand side matrix b is not\n  * needed anymore.\n  *\n  * \\sa LDLT::solve(), MatrixBase::ldlt()\n  */\ntemplate<typename MatrixType,int _UpLo>\ntemplate<typename Derived>\nbool LDLT<MatrixType,_UpLo>::solveInPlace(MatrixBase<Derived> &bAndX) const\n{\n  eigen_assert(m_isInitialized && \"LDLT is not initialized.\");\n  eigen_assert(m_matrix.rows() == bAndX.rows());\n\n  bAndX = this->solve(bAndX);\n\n  return true;\n}\n\n/** \\returns the matrix represented by the decomposition,\n * i.e., it returns the product: P^T L D L^* P.\n * This function is provided for debug purpose. */\ntemplate<typename MatrixType, int _UpLo>\nMatrixType LDLT<MatrixType,_UpLo>::reconstructedMatrix() const\n{\n  eigen_assert(m_isInitialized && \"LDLT is not initialized.\");\n  const Index size = m_matrix.rows();\n  MatrixType res(size,size);\n\n  // P\n  res.setIdentity();\n  res = transpositionsP() * res;\n  // L^* P\n  res = matrixU() * res;\n  // D(L^*P)\n  res = vectorD().real().asDiagonal() * res;\n  // L(DL^*P)\n  res = matrixL() * res;\n  // P^T (LDL^*P)\n  res = transpositionsP().transpose() * res;\n\n  return res;\n}\n\n/** \\cholesky_module\n  * \\returns the Cholesky decomposition with full pivoting without square root of \\c *this\n  * \\sa MatrixBase::ldlt()\n  */\ntemplate<typename MatrixType, unsigned int UpLo>\ninline const LDLT<typename SelfAdjointView<MatrixType, UpLo>::PlainObject, UpLo>\nSelfAdjointView<MatrixType, UpLo>::ldlt() const\n{\n  return LDLT<PlainObject,UpLo>(m_matrix);\n}\n\n/** \\cholesky_module\n  * \\returns the Cholesky decomposition with full pivoting without square root of \\c *this\n  * \\sa SelfAdjointView::ldlt()\n  */\ntemplate<typename Derived>\ninline const LDLT<typename MatrixBase<Derived>::PlainObject>\nMatrixBase<Derived>::ldlt() const\n{\n  return LDLT<PlainObject>(derived());\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_LDLT_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Cholesky/LLT.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_LLT_H\n#define EIGEN_LLT_H\n\nnamespace Eigen {\n\nnamespace internal{\n\ntemplate<typename _MatrixType, int _UpLo> struct traits<LLT<_MatrixType, _UpLo> >\n : traits<_MatrixType>\n{\n  typedef MatrixXpr XprKind;\n  typedef SolverStorage StorageKind;\n  typedef int StorageIndex;\n  enum { Flags = 0 };\n};\n\ntemplate<typename MatrixType, int UpLo> struct LLT_Traits;\n}\n\n/** \\ingroup Cholesky_Module\n  *\n  * \\class LLT\n  *\n  * \\brief Standard Cholesky decomposition (LL^T) of a matrix and associated features\n  *\n  * \\tparam _MatrixType the type of the matrix of which we are computing the LL^T Cholesky decomposition\n  * \\tparam _UpLo the triangular part that will be used for the decompositon: Lower (default) or Upper.\n  *               The other triangular part won't be read.\n  *\n  * This class performs a LL^T Cholesky decomposition of a symmetric, positive definite\n  * matrix A such that A = LL^* = U^*U, where L is lower triangular.\n  *\n  * While the Cholesky decomposition is particularly useful to solve selfadjoint problems like  D^*D x = b,\n  * for that purpose, we recommend the Cholesky decomposition without square root which is more stable\n  * and even faster. Nevertheless, this standard Cholesky decomposition remains useful in many other\n  * situations like generalised eigen problems with hermitian matrices.\n  *\n  * Remember that Cholesky decompositions are not rank-revealing. This LLT decomposition is only stable on positive definite matrices,\n  * use LDLT instead for the semidefinite case. Also, do not use a Cholesky decomposition to determine whether a system of equations\n  * has a solution.\n  *\n  * Example: \\include LLT_example.cpp\n  * Output: \\verbinclude LLT_example.out\n  *\n  * \\b Performance: for best performance, it is recommended to use a column-major storage format\n  * with the Lower triangular part (the default), or, equivalently, a row-major storage format\n  * with the Upper triangular part. Otherwise, you might get a 20% slowdown for the full factorization\n  * step, and rank-updates can be up to 3 times slower.\n  *\n  * This class supports the \\link InplaceDecomposition inplace decomposition \\endlink mechanism.\n  *\n  * Note that during the decomposition, only the lower (or upper, as defined by _UpLo) triangular part of A is considered.\n  * Therefore, the strict lower part does not have to store correct values.\n  *\n  * \\sa MatrixBase::llt(), SelfAdjointView::llt(), class LDLT\n  */\ntemplate<typename _MatrixType, int _UpLo> class LLT\n        : public SolverBase<LLT<_MatrixType, _UpLo> >\n{\n  public:\n    typedef _MatrixType MatrixType;\n    typedef SolverBase<LLT> Base;\n    friend class SolverBase<LLT>;\n\n    EIGEN_GENERIC_PUBLIC_INTERFACE(LLT)\n    enum {\n      MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime\n    };\n\n    enum {\n      PacketSize = internal::packet_traits<Scalar>::size,\n      AlignmentMask = int(PacketSize)-1,\n      UpLo = _UpLo\n    };\n\n    typedef internal::LLT_Traits<MatrixType,UpLo> Traits;\n\n    /**\n      * \\brief Default Constructor.\n      *\n      * The default constructor is useful in cases in which the user intends to\n      * perform decompositions via LLT::compute(const MatrixType&).\n      */\n    LLT() : m_matrix(), m_isInitialized(false) {}\n\n    /** \\brief Default Constructor with memory preallocation\n      *\n      * Like the default constructor but with preallocation of the internal data\n      * according to the specified problem \\a size.\n      * \\sa LLT()\n      */\n    explicit LLT(Index size) : m_matrix(size, size),\n                    m_isInitialized(false) {}\n\n    template<typename InputType>\n    explicit LLT(const EigenBase<InputType>& matrix)\n      : m_matrix(matrix.rows(), matrix.cols()),\n        m_isInitialized(false)\n    {\n      compute(matrix.derived());\n    }\n\n    /** \\brief Constructs a LLT factorization from a given matrix\n      *\n      * This overloaded constructor is provided for \\link InplaceDecomposition inplace decomposition \\endlink when\n      * \\c MatrixType is a Eigen::Ref.\n      *\n      * \\sa LLT(const EigenBase&)\n      */\n    template<typename InputType>\n    explicit LLT(EigenBase<InputType>& matrix)\n      : m_matrix(matrix.derived()),\n        m_isInitialized(false)\n    {\n      compute(matrix.derived());\n    }\n\n    /** \\returns a view of the upper triangular matrix U */\n    inline typename Traits::MatrixU matrixU() const\n    {\n      eigen_assert(m_isInitialized && \"LLT is not initialized.\");\n      return Traits::getU(m_matrix);\n    }\n\n    /** \\returns a view of the lower triangular matrix L */\n    inline typename Traits::MatrixL matrixL() const\n    {\n      eigen_assert(m_isInitialized && \"LLT is not initialized.\");\n      return Traits::getL(m_matrix);\n    }\n\n    #ifdef EIGEN_PARSED_BY_DOXYGEN\n    /** \\returns the solution x of \\f$ A x = b \\f$ using the current decomposition of A.\n      *\n      * Since this LLT class assumes anyway that the matrix A is invertible, the solution\n      * theoretically exists and is unique regardless of b.\n      *\n      * Example: \\include LLT_solve.cpp\n      * Output: \\verbinclude LLT_solve.out\n      *\n      * \\sa solveInPlace(), MatrixBase::llt(), SelfAdjointView::llt()\n      */\n    template<typename Rhs>\n    inline const Solve<LLT, Rhs>\n    solve(const MatrixBase<Rhs>& b) const;\n    #endif\n\n    template<typename Derived>\n    void solveInPlace(const MatrixBase<Derived> &bAndX) const;\n\n    template<typename InputType>\n    LLT& compute(const EigenBase<InputType>& matrix);\n\n    /** \\returns an estimate of the reciprocal condition number of the matrix of\n      *  which \\c *this is the Cholesky decomposition.\n      */\n    RealScalar rcond() const\n    {\n      eigen_assert(m_isInitialized && \"LLT is not initialized.\");\n      eigen_assert(m_info == Success && \"LLT failed because matrix appears to be negative\");\n      return internal::rcond_estimate_helper(m_l1_norm, *this);\n    }\n\n    /** \\returns the LLT decomposition matrix\n      *\n      * TODO: document the storage layout\n      */\n    inline const MatrixType& matrixLLT() const\n    {\n      eigen_assert(m_isInitialized && \"LLT is not initialized.\");\n      return m_matrix;\n    }\n\n    MatrixType reconstructedMatrix() const;\n\n\n    /** \\brief Reports whether previous computation was successful.\n      *\n      * \\returns \\c Success if computation was successful,\n      *          \\c NumericalIssue if the matrix.appears not to be positive definite.\n      */\n    ComputationInfo info() const\n    {\n      eigen_assert(m_isInitialized && \"LLT is not initialized.\");\n      return m_info;\n    }\n\n    /** \\returns the adjoint of \\c *this, that is, a const reference to the decomposition itself as the underlying matrix is self-adjoint.\n      *\n      * This method is provided for compatibility with other matrix decompositions, thus enabling generic code such as:\n      * \\code x = decomposition.adjoint().solve(b) \\endcode\n      */\n    const LLT& adjoint() const { return *this; };\n\n    inline Index rows() const { return m_matrix.rows(); }\n    inline Index cols() const { return m_matrix.cols(); }\n\n    template<typename VectorType>\n    LLT & rankUpdate(const VectorType& vec, const RealScalar& sigma = 1);\n\n    #ifndef EIGEN_PARSED_BY_DOXYGEN\n    template<typename RhsType, typename DstType>\n    void _solve_impl(const RhsType &rhs, DstType &dst) const;\n\n    template<bool Conjugate, typename RhsType, typename DstType>\n    void _solve_impl_transposed(const RhsType &rhs, DstType &dst) const;\n    #endif\n\n  protected:\n\n    static void check_template_parameters()\n    {\n      EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar);\n    }\n\n    /** \\internal\n      * Used to compute and store L\n      * The strict upper part is not used and even not initialized.\n      */\n    MatrixType m_matrix;\n    RealScalar m_l1_norm;\n    bool m_isInitialized;\n    ComputationInfo m_info;\n};\n\nnamespace internal {\n\ntemplate<typename Scalar, int UpLo> struct llt_inplace;\n\ntemplate<typename MatrixType, typename VectorType>\nstatic Index llt_rank_update_lower(MatrixType& mat, const VectorType& vec, const typename MatrixType::RealScalar& sigma)\n{\n  using std::sqrt;\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename MatrixType::RealScalar RealScalar;\n  typedef typename MatrixType::ColXpr ColXpr;\n  typedef typename internal::remove_all<ColXpr>::type ColXprCleaned;\n  typedef typename ColXprCleaned::SegmentReturnType ColXprSegment;\n  typedef Matrix<Scalar,Dynamic,1> TempVectorType;\n  typedef typename TempVectorType::SegmentReturnType TempVecSegment;\n\n  Index n = mat.cols();\n  eigen_assert(mat.rows()==n && vec.size()==n);\n\n  TempVectorType temp;\n\n  if(sigma>0)\n  {\n    // This version is based on Givens rotations.\n    // It is faster than the other one below, but only works for updates,\n    // i.e., for sigma > 0\n    temp = sqrt(sigma) * vec;\n\n    for(Index i=0; i<n; ++i)\n    {\n      JacobiRotation<Scalar> g;\n      g.makeGivens(mat(i,i), -temp(i), &mat(i,i));\n\n      Index rs = n-i-1;\n      if(rs>0)\n      {\n        ColXprSegment x(mat.col(i).tail(rs));\n        TempVecSegment y(temp.tail(rs));\n        apply_rotation_in_the_plane(x, y, g);\n      }\n    }\n  }\n  else\n  {\n    temp = vec;\n    RealScalar beta = 1;\n    for(Index j=0; j<n; ++j)\n    {\n      RealScalar Ljj = numext::real(mat.coeff(j,j));\n      RealScalar dj = numext::abs2(Ljj);\n      Scalar wj = temp.coeff(j);\n      RealScalar swj2 = sigma*numext::abs2(wj);\n      RealScalar gamma = dj*beta + swj2;\n\n      RealScalar x = dj + swj2/beta;\n      if (x<=RealScalar(0))\n        return j;\n      RealScalar nLjj = sqrt(x);\n      mat.coeffRef(j,j) = nLjj;\n      beta += swj2/dj;\n\n      // Update the terms of L\n      Index rs = n-j-1;\n      if(rs)\n      {\n        temp.tail(rs) -= (wj/Ljj) * mat.col(j).tail(rs);\n        if(gamma != 0)\n          mat.col(j).tail(rs) = (nLjj/Ljj) * mat.col(j).tail(rs) + (nLjj * sigma*numext::conj(wj)/gamma)*temp.tail(rs);\n      }\n    }\n  }\n  return -1;\n}\n\ntemplate<typename Scalar> struct llt_inplace<Scalar, Lower>\n{\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  template<typename MatrixType>\n  static Index unblocked(MatrixType& mat)\n  {\n    using std::sqrt;\n\n    eigen_assert(mat.rows()==mat.cols());\n    const Index size = mat.rows();\n    for(Index k = 0; k < size; ++k)\n    {\n      Index rs = size-k-1; // remaining size\n\n      Block<MatrixType,Dynamic,1> A21(mat,k+1,k,rs,1);\n      Block<MatrixType,1,Dynamic> A10(mat,k,0,1,k);\n      Block<MatrixType,Dynamic,Dynamic> A20(mat,k+1,0,rs,k);\n\n      RealScalar x = numext::real(mat.coeff(k,k));\n      if (k>0) x -= A10.squaredNorm();\n      if (x<=RealScalar(0))\n        return k;\n      mat.coeffRef(k,k) = x = sqrt(x);\n      if (k>0 && rs>0) A21.noalias() -= A20 * A10.adjoint();\n      if (rs>0) A21 /= x;\n    }\n    return -1;\n  }\n\n  template<typename MatrixType>\n  static Index blocked(MatrixType& m)\n  {\n    eigen_assert(m.rows()==m.cols());\n    Index size = m.rows();\n    if(size<32)\n      return unblocked(m);\n\n    Index blockSize = size/8;\n    blockSize = (blockSize/16)*16;\n    blockSize = (std::min)((std::max)(blockSize,Index(8)), Index(128));\n\n    for (Index k=0; k<size; k+=blockSize)\n    {\n      // partition the matrix:\n      //       A00 |  -  |  -\n      // lu  = A10 | A11 |  -\n      //       A20 | A21 | A22\n      Index bs = (std::min)(blockSize, size-k);\n      Index rs = size - k - bs;\n      Block<MatrixType,Dynamic,Dynamic> A11(m,k,   k,   bs,bs);\n      Block<MatrixType,Dynamic,Dynamic> A21(m,k+bs,k,   rs,bs);\n      Block<MatrixType,Dynamic,Dynamic> A22(m,k+bs,k+bs,rs,rs);\n\n      Index ret;\n      if((ret=unblocked(A11))>=0) return k+ret;\n      if(rs>0) A11.adjoint().template triangularView<Upper>().template solveInPlace<OnTheRight>(A21);\n      if(rs>0) A22.template selfadjointView<Lower>().rankUpdate(A21,typename NumTraits<RealScalar>::Literal(-1)); // bottleneck\n    }\n    return -1;\n  }\n\n  template<typename MatrixType, typename VectorType>\n  static Index rankUpdate(MatrixType& mat, const VectorType& vec, const RealScalar& sigma)\n  {\n    return Eigen::internal::llt_rank_update_lower(mat, vec, sigma);\n  }\n};\n\ntemplate<typename Scalar> struct llt_inplace<Scalar, Upper>\n{\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n\n  template<typename MatrixType>\n  static EIGEN_STRONG_INLINE Index unblocked(MatrixType& mat)\n  {\n    Transpose<MatrixType> matt(mat);\n    return llt_inplace<Scalar, Lower>::unblocked(matt);\n  }\n  template<typename MatrixType>\n  static EIGEN_STRONG_INLINE Index blocked(MatrixType& mat)\n  {\n    Transpose<MatrixType> matt(mat);\n    return llt_inplace<Scalar, Lower>::blocked(matt);\n  }\n  template<typename MatrixType, typename VectorType>\n  static Index rankUpdate(MatrixType& mat, const VectorType& vec, const RealScalar& sigma)\n  {\n    Transpose<MatrixType> matt(mat);\n    return llt_inplace<Scalar, Lower>::rankUpdate(matt, vec.conjugate(), sigma);\n  }\n};\n\ntemplate<typename MatrixType> struct LLT_Traits<MatrixType,Lower>\n{\n  typedef const TriangularView<const MatrixType, Lower> MatrixL;\n  typedef const TriangularView<const typename MatrixType::AdjointReturnType, Upper> MatrixU;\n  static inline MatrixL getL(const MatrixType& m) { return MatrixL(m); }\n  static inline MatrixU getU(const MatrixType& m) { return MatrixU(m.adjoint()); }\n  static bool inplace_decomposition(MatrixType& m)\n  { return llt_inplace<typename MatrixType::Scalar, Lower>::blocked(m)==-1; }\n};\n\ntemplate<typename MatrixType> struct LLT_Traits<MatrixType,Upper>\n{\n  typedef const TriangularView<const typename MatrixType::AdjointReturnType, Lower> MatrixL;\n  typedef const TriangularView<const MatrixType, Upper> MatrixU;\n  static inline MatrixL getL(const MatrixType& m) { return MatrixL(m.adjoint()); }\n  static inline MatrixU getU(const MatrixType& m) { return MatrixU(m); }\n  static bool inplace_decomposition(MatrixType& m)\n  { return llt_inplace<typename MatrixType::Scalar, Upper>::blocked(m)==-1; }\n};\n\n} // end namespace internal\n\n/** Computes / recomputes the Cholesky decomposition A = LL^* = U^*U of \\a matrix\n  *\n  * \\returns a reference to *this\n  *\n  * Example: \\include TutorialLinAlgComputeTwice.cpp\n  * Output: \\verbinclude TutorialLinAlgComputeTwice.out\n  */\ntemplate<typename MatrixType, int _UpLo>\ntemplate<typename InputType>\nLLT<MatrixType,_UpLo>& LLT<MatrixType,_UpLo>::compute(const EigenBase<InputType>& a)\n{\n  check_template_parameters();\n\n  eigen_assert(a.rows()==a.cols());\n  const Index size = a.rows();\n  m_matrix.resize(size, size);\n  if (!internal::is_same_dense(m_matrix, a.derived()))\n    m_matrix = a.derived();\n\n  // Compute matrix L1 norm = max abs column sum.\n  m_l1_norm = RealScalar(0);\n  // TODO move this code to SelfAdjointView\n  for (Index col = 0; col < size; ++col) {\n    RealScalar abs_col_sum;\n    if (_UpLo == Lower)\n      abs_col_sum = m_matrix.col(col).tail(size - col).template lpNorm<1>() + m_matrix.row(col).head(col).template lpNorm<1>();\n    else\n      abs_col_sum = m_matrix.col(col).head(col).template lpNorm<1>() + m_matrix.row(col).tail(size - col).template lpNorm<1>();\n    if (abs_col_sum > m_l1_norm)\n      m_l1_norm = abs_col_sum;\n  }\n\n  m_isInitialized = true;\n  bool ok = Traits::inplace_decomposition(m_matrix);\n  m_info = ok ? Success : NumericalIssue;\n\n  return *this;\n}\n\n/** Performs a rank one update (or dowdate) of the current decomposition.\n  * If A = LL^* before the rank one update,\n  * then after it we have LL^* = A + sigma * v v^* where \\a v must be a vector\n  * of same dimension.\n  */\ntemplate<typename _MatrixType, int _UpLo>\ntemplate<typename VectorType>\nLLT<_MatrixType,_UpLo> & LLT<_MatrixType,_UpLo>::rankUpdate(const VectorType& v, const RealScalar& sigma)\n{\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(VectorType);\n  eigen_assert(v.size()==m_matrix.cols());\n  eigen_assert(m_isInitialized);\n  if(internal::llt_inplace<typename MatrixType::Scalar, UpLo>::rankUpdate(m_matrix,v,sigma)>=0)\n    m_info = NumericalIssue;\n  else\n    m_info = Success;\n\n  return *this;\n}\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\ntemplate<typename _MatrixType,int _UpLo>\ntemplate<typename RhsType, typename DstType>\nvoid LLT<_MatrixType,_UpLo>::_solve_impl(const RhsType &rhs, DstType &dst) const\n{\n  _solve_impl_transposed<true>(rhs, dst);\n}\n\ntemplate<typename _MatrixType,int _UpLo>\ntemplate<bool Conjugate, typename RhsType, typename DstType>\nvoid LLT<_MatrixType,_UpLo>::_solve_impl_transposed(const RhsType &rhs, DstType &dst) const\n{\n    dst = rhs;\n\n    matrixL().template conjugateIf<!Conjugate>().solveInPlace(dst);\n    matrixU().template conjugateIf<!Conjugate>().solveInPlace(dst);\n}\n#endif\n\n/** \\internal use x = llt_object.solve(x);\n  *\n  * This is the \\em in-place version of solve().\n  *\n  * \\param bAndX represents both the right-hand side matrix b and result x.\n  *\n  * This version avoids a copy when the right hand side matrix b is not needed anymore.\n  *\n  * \\warning The parameter is only marked 'const' to make the C++ compiler accept a temporary expression here.\n  * This function will const_cast it, so constness isn't honored here.\n  *\n  * \\sa LLT::solve(), MatrixBase::llt()\n  */\ntemplate<typename MatrixType, int _UpLo>\ntemplate<typename Derived>\nvoid LLT<MatrixType,_UpLo>::solveInPlace(const MatrixBase<Derived> &bAndX) const\n{\n  eigen_assert(m_isInitialized && \"LLT is not initialized.\");\n  eigen_assert(m_matrix.rows()==bAndX.rows());\n  matrixL().solveInPlace(bAndX);\n  matrixU().solveInPlace(bAndX);\n}\n\n/** \\returns the matrix represented by the decomposition,\n * i.e., it returns the product: L L^*.\n * This function is provided for debug purpose. */\ntemplate<typename MatrixType, int _UpLo>\nMatrixType LLT<MatrixType,_UpLo>::reconstructedMatrix() const\n{\n  eigen_assert(m_isInitialized && \"LLT is not initialized.\");\n  return matrixL() * matrixL().adjoint().toDenseMatrix();\n}\n\n/** \\cholesky_module\n  * \\returns the LLT decomposition of \\c *this\n  * \\sa SelfAdjointView::llt()\n  */\ntemplate<typename Derived>\ninline const LLT<typename MatrixBase<Derived>::PlainObject>\nMatrixBase<Derived>::llt() const\n{\n  return LLT<PlainObject>(derived());\n}\n\n/** \\cholesky_module\n  * \\returns the LLT decomposition of \\c *this\n  * \\sa SelfAdjointView::llt()\n  */\ntemplate<typename MatrixType, unsigned int UpLo>\ninline const LLT<typename SelfAdjointView<MatrixType, UpLo>::PlainObject, UpLo>\nSelfAdjointView<MatrixType, UpLo>::llt() const\n{\n  return LLT<PlainObject,UpLo>(m_matrix);\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_LLT_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Cholesky/LLT_LAPACKE.h",
    "content": "/*\n Copyright (c) 2011, Intel Corporation. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without modification,\n are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n   list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n * Neither the name of Intel Corporation nor the names of its contributors may\n   be used to endorse or promote products derived from this software without\n   specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\n ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n ********************************************************************************\n *   Content : Eigen bindings to LAPACKe\n *     LLt decomposition based on LAPACKE_?potrf function.\n ********************************************************************************\n*/\n\n#ifndef EIGEN_LLT_LAPACKE_H\n#define EIGEN_LLT_LAPACKE_H\n\nnamespace Eigen { \n\nnamespace internal {\n\ntemplate<typename Scalar> struct lapacke_llt;\n\n#define EIGEN_LAPACKE_LLT(EIGTYPE, BLASTYPE, LAPACKE_PREFIX) \\\ntemplate<> struct lapacke_llt<EIGTYPE> \\\n{ \\\n  template<typename MatrixType> \\\n  static inline Index potrf(MatrixType& m, char uplo) \\\n  { \\\n    lapack_int matrix_order; \\\n    lapack_int size, lda, info, StorageOrder; \\\n    EIGTYPE* a; \\\n    eigen_assert(m.rows()==m.cols()); \\\n    /* Set up parameters for ?potrf */ \\\n    size = convert_index<lapack_int>(m.rows()); \\\n    StorageOrder = MatrixType::Flags&RowMajorBit?RowMajor:ColMajor; \\\n    matrix_order = StorageOrder==RowMajor ? LAPACK_ROW_MAJOR : LAPACK_COL_MAJOR; \\\n    a = &(m.coeffRef(0,0)); \\\n    lda = convert_index<lapack_int>(m.outerStride()); \\\n\\\n    info = LAPACKE_##LAPACKE_PREFIX##potrf( matrix_order, uplo, size, (BLASTYPE*)a, lda ); \\\n    info = (info==0) ? -1 : info>0 ? info-1 : size; \\\n    return info; \\\n  } \\\n}; \\\ntemplate<> struct llt_inplace<EIGTYPE, Lower> \\\n{ \\\n  template<typename MatrixType> \\\n  static Index blocked(MatrixType& m) \\\n  { \\\n    return lapacke_llt<EIGTYPE>::potrf(m, 'L'); \\\n  } \\\n  template<typename MatrixType, typename VectorType> \\\n  static Index rankUpdate(MatrixType& mat, const VectorType& vec, const typename MatrixType::RealScalar& sigma) \\\n  { return Eigen::internal::llt_rank_update_lower(mat, vec, sigma); } \\\n}; \\\ntemplate<> struct llt_inplace<EIGTYPE, Upper> \\\n{ \\\n  template<typename MatrixType> \\\n  static Index blocked(MatrixType& m) \\\n  { \\\n    return lapacke_llt<EIGTYPE>::potrf(m, 'U'); \\\n  } \\\n  template<typename MatrixType, typename VectorType> \\\n  static Index rankUpdate(MatrixType& mat, const VectorType& vec, const typename MatrixType::RealScalar& sigma) \\\n  { \\\n    Transpose<MatrixType> matt(mat); \\\n    return llt_inplace<EIGTYPE, Lower>::rankUpdate(matt, vec.conjugate(), sigma); \\\n  } \\\n};\n\nEIGEN_LAPACKE_LLT(double, double, d)\nEIGEN_LAPACKE_LLT(float, float, s)\nEIGEN_LAPACKE_LLT(dcomplex, lapack_complex_double, z)\nEIGEN_LAPACKE_LLT(scomplex, lapack_complex_float, c)\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_LLT_LAPACKE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/CholmodSupport/CholmodSupport.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CHOLMODSUPPORT_H\n#define EIGEN_CHOLMODSUPPORT_H\n\nnamespace Eigen {\n\nnamespace internal {\n\ntemplate<typename Scalar> struct cholmod_configure_matrix;\n\ntemplate<> struct cholmod_configure_matrix<double> {\n  template<typename CholmodType>\n  static void run(CholmodType& mat) {\n    mat.xtype = CHOLMOD_REAL;\n    mat.dtype = CHOLMOD_DOUBLE;\n  }\n};\n\ntemplate<> struct cholmod_configure_matrix<std::complex<double> > {\n  template<typename CholmodType>\n  static void run(CholmodType& mat) {\n    mat.xtype = CHOLMOD_COMPLEX;\n    mat.dtype = CHOLMOD_DOUBLE;\n  }\n};\n\n// Other scalar types are not yet supported by Cholmod\n// template<> struct cholmod_configure_matrix<float> {\n//   template<typename CholmodType>\n//   static void run(CholmodType& mat) {\n//     mat.xtype = CHOLMOD_REAL;\n//     mat.dtype = CHOLMOD_SINGLE;\n//   }\n// };\n//\n// template<> struct cholmod_configure_matrix<std::complex<float> > {\n//   template<typename CholmodType>\n//   static void run(CholmodType& mat) {\n//     mat.xtype = CHOLMOD_COMPLEX;\n//     mat.dtype = CHOLMOD_SINGLE;\n//   }\n// };\n\n} // namespace internal\n\n/** Wraps the Eigen sparse matrix \\a mat into a Cholmod sparse matrix object.\n  * Note that the data are shared.\n  */\ntemplate<typename _Scalar, int _Options, typename _StorageIndex>\ncholmod_sparse viewAsCholmod(Ref<SparseMatrix<_Scalar,_Options,_StorageIndex> > mat)\n{\n  cholmod_sparse res;\n  res.nzmax   = mat.nonZeros();\n  res.nrow    = mat.rows();\n  res.ncol    = mat.cols();\n  res.p       = mat.outerIndexPtr();\n  res.i       = mat.innerIndexPtr();\n  res.x       = mat.valuePtr();\n  res.z       = 0;\n  res.sorted  = 1;\n  if(mat.isCompressed())\n  {\n    res.packed  = 1;\n    res.nz = 0;\n  }\n  else\n  {\n    res.packed  = 0;\n    res.nz = mat.innerNonZeroPtr();\n  }\n\n  res.dtype   = 0;\n  res.stype   = -1;\n\n  if (internal::is_same<_StorageIndex,int>::value)\n  {\n    res.itype = CHOLMOD_INT;\n  }\n  else if (internal::is_same<_StorageIndex,SuiteSparse_long>::value)\n  {\n    res.itype = CHOLMOD_LONG;\n  }\n  else\n  {\n    eigen_assert(false && \"Index type not supported yet\");\n  }\n\n  // setup res.xtype\n  internal::cholmod_configure_matrix<_Scalar>::run(res);\n\n  res.stype = 0;\n\n  return res;\n}\n\ntemplate<typename _Scalar, int _Options, typename _Index>\nconst cholmod_sparse viewAsCholmod(const SparseMatrix<_Scalar,_Options,_Index>& mat)\n{\n  cholmod_sparse res = viewAsCholmod(Ref<SparseMatrix<_Scalar,_Options,_Index> >(mat.const_cast_derived()));\n  return res;\n}\n\ntemplate<typename _Scalar, int _Options, typename _Index>\nconst cholmod_sparse viewAsCholmod(const SparseVector<_Scalar,_Options,_Index>& mat)\n{\n  cholmod_sparse res = viewAsCholmod(Ref<SparseMatrix<_Scalar,_Options,_Index> >(mat.const_cast_derived()));\n  return res;\n}\n\n/** Returns a view of the Eigen sparse matrix \\a mat as Cholmod sparse matrix.\n  * The data are not copied but shared. */\ntemplate<typename _Scalar, int _Options, typename _Index, unsigned int UpLo>\ncholmod_sparse viewAsCholmod(const SparseSelfAdjointView<const SparseMatrix<_Scalar,_Options,_Index>, UpLo>& mat)\n{\n  cholmod_sparse res = viewAsCholmod(Ref<SparseMatrix<_Scalar,_Options,_Index> >(mat.matrix().const_cast_derived()));\n\n  if(UpLo==Upper) res.stype =  1;\n  if(UpLo==Lower) res.stype = -1;\n  // swap stype for rowmajor matrices (only works for real matrices)\n  EIGEN_STATIC_ASSERT((_Options & RowMajorBit) == 0 || NumTraits<_Scalar>::IsComplex == 0, THIS_METHOD_IS_ONLY_FOR_COLUMN_MAJOR_MATRICES);\n  if(_Options & RowMajorBit) res.stype *=-1;\n\n  return res;\n}\n\n/** Returns a view of the Eigen \\b dense matrix \\a mat as Cholmod dense matrix.\n  * The data are not copied but shared. */\ntemplate<typename Derived>\ncholmod_dense viewAsCholmod(MatrixBase<Derived>& mat)\n{\n  EIGEN_STATIC_ASSERT((internal::traits<Derived>::Flags&RowMajorBit)==0,THIS_METHOD_IS_ONLY_FOR_COLUMN_MAJOR_MATRICES);\n  typedef typename Derived::Scalar Scalar;\n\n  cholmod_dense res;\n  res.nrow   = mat.rows();\n  res.ncol   = mat.cols();\n  res.nzmax  = res.nrow * res.ncol;\n  res.d      = Derived::IsVectorAtCompileTime ? mat.derived().size() : mat.derived().outerStride();\n  res.x      = (void*)(mat.derived().data());\n  res.z      = 0;\n\n  internal::cholmod_configure_matrix<Scalar>::run(res);\n\n  return res;\n}\n\n/** Returns a view of the Cholmod sparse matrix \\a cm as an Eigen sparse matrix.\n  * The data are not copied but shared. */\ntemplate<typename Scalar, int Flags, typename StorageIndex>\nMappedSparseMatrix<Scalar,Flags,StorageIndex> viewAsEigen(cholmod_sparse& cm)\n{\n  return MappedSparseMatrix<Scalar,Flags,StorageIndex>\n         (cm.nrow, cm.ncol, static_cast<StorageIndex*>(cm.p)[cm.ncol],\n          static_cast<StorageIndex*>(cm.p), static_cast<StorageIndex*>(cm.i),static_cast<Scalar*>(cm.x) );\n}\n\nnamespace internal {\n\n// template specializations for int and long that call the correct cholmod method\n\n#define EIGEN_CHOLMOD_SPECIALIZE0(ret, name) \\\n    template<typename _StorageIndex> inline ret cm_ ## name       (cholmod_common &Common) { return cholmod_ ## name   (&Common); } \\\n    template<>                       inline ret cm_ ## name<SuiteSparse_long> (cholmod_common &Common) { return cholmod_l_ ## name (&Common); }\n\n#define EIGEN_CHOLMOD_SPECIALIZE1(ret, name, t1, a1) \\\n    template<typename _StorageIndex> inline ret cm_ ## name       (t1& a1, cholmod_common &Common) { return cholmod_ ## name   (&a1, &Common); } \\\n    template<>                       inline ret cm_ ## name<SuiteSparse_long> (t1& a1, cholmod_common &Common) { return cholmod_l_ ## name (&a1, &Common); }\n\nEIGEN_CHOLMOD_SPECIALIZE0(int, start)\nEIGEN_CHOLMOD_SPECIALIZE0(int, finish)\n\nEIGEN_CHOLMOD_SPECIALIZE1(int, free_factor, cholmod_factor*, L)\nEIGEN_CHOLMOD_SPECIALIZE1(int, free_dense,  cholmod_dense*,  X)\nEIGEN_CHOLMOD_SPECIALIZE1(int, free_sparse, cholmod_sparse*, A)\n\nEIGEN_CHOLMOD_SPECIALIZE1(cholmod_factor*, analyze, cholmod_sparse, A)\n\ntemplate<typename _StorageIndex> inline cholmod_dense*  cm_solve         (int sys, cholmod_factor& L, cholmod_dense&  B, cholmod_common &Common) { return cholmod_solve     (sys, &L, &B, &Common); }\ntemplate<>                       inline cholmod_dense*  cm_solve<SuiteSparse_long>   (int sys, cholmod_factor& L, cholmod_dense&  B, cholmod_common &Common) { return cholmod_l_solve   (sys, &L, &B, &Common); }\n\ntemplate<typename _StorageIndex> inline cholmod_sparse* cm_spsolve       (int sys, cholmod_factor& L, cholmod_sparse& B, cholmod_common &Common) { return cholmod_spsolve   (sys, &L, &B, &Common); }\ntemplate<>                       inline cholmod_sparse* cm_spsolve<SuiteSparse_long> (int sys, cholmod_factor& L, cholmod_sparse& B, cholmod_common &Common) { return cholmod_l_spsolve (sys, &L, &B, &Common); }\n\ntemplate<typename _StorageIndex>\ninline int  cm_factorize_p       (cholmod_sparse*  A, double beta[2], _StorageIndex* fset, std::size_t fsize, cholmod_factor* L, cholmod_common &Common) { return cholmod_factorize_p   (A, beta, fset, fsize, L, &Common); }\ntemplate<>\ninline int  cm_factorize_p<SuiteSparse_long> (cholmod_sparse*  A, double beta[2], SuiteSparse_long* fset,          std::size_t fsize, cholmod_factor* L, cholmod_common &Common) { return cholmod_l_factorize_p (A, beta, fset, fsize, L, &Common); }\n\n#undef EIGEN_CHOLMOD_SPECIALIZE0\n#undef EIGEN_CHOLMOD_SPECIALIZE1\n\n}  // namespace internal\n\n\nenum CholmodMode {\n  CholmodAuto, CholmodSimplicialLLt, CholmodSupernodalLLt, CholmodLDLt\n};\n\n\n/** \\ingroup CholmodSupport_Module\n  * \\class CholmodBase\n  * \\brief The base class for the direct Cholesky factorization of Cholmod\n  * \\sa class CholmodSupernodalLLT, class CholmodSimplicialLDLT, class CholmodSimplicialLLT\n  */\ntemplate<typename _MatrixType, int _UpLo, typename Derived>\nclass CholmodBase : public SparseSolverBase<Derived>\n{\n  protected:\n    typedef SparseSolverBase<Derived> Base;\n    using Base::derived;\n    using Base::m_isInitialized;\n  public:\n    typedef _MatrixType MatrixType;\n    enum { UpLo = _UpLo };\n    typedef typename MatrixType::Scalar Scalar;\n    typedef typename MatrixType::RealScalar RealScalar;\n    typedef MatrixType CholMatrixType;\n    typedef typename MatrixType::StorageIndex StorageIndex;\n    enum {\n      ColsAtCompileTime = MatrixType::ColsAtCompileTime,\n      MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime\n    };\n\n  public:\n\n    CholmodBase()\n      : m_cholmodFactor(0), m_info(Success), m_factorizationIsOk(false), m_analysisIsOk(false)\n    {\n      EIGEN_STATIC_ASSERT((internal::is_same<double,RealScalar>::value), CHOLMOD_SUPPORTS_DOUBLE_PRECISION_ONLY);\n      m_shiftOffset[0] = m_shiftOffset[1] = 0.0;\n      internal::cm_start<StorageIndex>(m_cholmod);\n    }\n\n    explicit CholmodBase(const MatrixType& matrix)\n      : m_cholmodFactor(0), m_info(Success), m_factorizationIsOk(false), m_analysisIsOk(false)\n    {\n      EIGEN_STATIC_ASSERT((internal::is_same<double,RealScalar>::value), CHOLMOD_SUPPORTS_DOUBLE_PRECISION_ONLY);\n      m_shiftOffset[0] = m_shiftOffset[1] = 0.0;\n      internal::cm_start<StorageIndex>(m_cholmod);\n      compute(matrix);\n    }\n\n    ~CholmodBase()\n    {\n      if(m_cholmodFactor)\n        internal::cm_free_factor<StorageIndex>(m_cholmodFactor, m_cholmod);\n      internal::cm_finish<StorageIndex>(m_cholmod);\n    }\n\n    inline StorageIndex cols() const { return internal::convert_index<StorageIndex, Index>(m_cholmodFactor->n); }\n    inline StorageIndex rows() const { return internal::convert_index<StorageIndex, Index>(m_cholmodFactor->n); }\n\n    /** \\brief Reports whether previous computation was successful.\n      *\n      * \\returns \\c Success if computation was successful,\n      *          \\c NumericalIssue if the matrix.appears to be negative.\n      */\n    ComputationInfo info() const\n    {\n      eigen_assert(m_isInitialized && \"Decomposition is not initialized.\");\n      return m_info;\n    }\n\n    /** Computes the sparse Cholesky decomposition of \\a matrix */\n    Derived& compute(const MatrixType& matrix)\n    {\n      analyzePattern(matrix);\n      factorize(matrix);\n      return derived();\n    }\n\n    /** Performs a symbolic decomposition on the sparsity pattern of \\a matrix.\n      *\n      * This function is particularly useful when solving for several problems having the same structure.\n      *\n      * \\sa factorize()\n      */\n    void analyzePattern(const MatrixType& matrix)\n    {\n      if(m_cholmodFactor)\n      {\n        internal::cm_free_factor<StorageIndex>(m_cholmodFactor, m_cholmod);\n        m_cholmodFactor = 0;\n      }\n      cholmod_sparse A = viewAsCholmod(matrix.template selfadjointView<UpLo>());\n      m_cholmodFactor = internal::cm_analyze<StorageIndex>(A, m_cholmod);\n\n      this->m_isInitialized = true;\n      this->m_info = Success;\n      m_analysisIsOk = true;\n      m_factorizationIsOk = false;\n    }\n\n    /** Performs a numeric decomposition of \\a matrix\n      *\n      * The given matrix must have the same sparsity pattern as the matrix on which the symbolic decomposition has been performed.\n      *\n      * \\sa analyzePattern()\n      */\n    void factorize(const MatrixType& matrix)\n    {\n      eigen_assert(m_analysisIsOk && \"You must first call analyzePattern()\");\n      cholmod_sparse A = viewAsCholmod(matrix.template selfadjointView<UpLo>());\n      internal::cm_factorize_p<StorageIndex>(&A, m_shiftOffset, 0, 0, m_cholmodFactor, m_cholmod);\n\n      // If the factorization failed, minor is the column at which it did. On success minor == n.\n      this->m_info = (m_cholmodFactor->minor == m_cholmodFactor->n ? Success : NumericalIssue);\n      m_factorizationIsOk = true;\n    }\n\n    /** Returns a reference to the Cholmod's configuration structure to get a full control over the performed operations.\n     *  See the Cholmod user guide for details. */\n    cholmod_common& cholmod() { return m_cholmod; }\n\n    #ifndef EIGEN_PARSED_BY_DOXYGEN\n    /** \\internal */\n    template<typename Rhs,typename Dest>\n    void _solve_impl(const MatrixBase<Rhs> &b, MatrixBase<Dest> &dest) const\n    {\n      eigen_assert(m_factorizationIsOk && \"The decomposition is not in a valid state for solving, you must first call either compute() or symbolic()/numeric()\");\n      const Index size = m_cholmodFactor->n;\n      EIGEN_UNUSED_VARIABLE(size);\n      eigen_assert(size==b.rows());\n\n      // Cholmod needs column-major storage without inner-stride, which corresponds to the default behavior of Ref.\n      Ref<const Matrix<typename Rhs::Scalar,Dynamic,Dynamic,ColMajor> > b_ref(b.derived());\n\n      cholmod_dense b_cd = viewAsCholmod(b_ref);\n      cholmod_dense* x_cd = internal::cm_solve<StorageIndex>(CHOLMOD_A, *m_cholmodFactor, b_cd, m_cholmod);\n      if(!x_cd)\n      {\n        this->m_info = NumericalIssue;\n        return;\n      }\n      // TODO optimize this copy by swapping when possible (be careful with alignment, etc.)\n      // NOTE Actually, the copy can be avoided by calling cholmod_solve2 instead of cholmod_solve\n      dest = Matrix<Scalar,Dest::RowsAtCompileTime,Dest::ColsAtCompileTime>::Map(reinterpret_cast<Scalar*>(x_cd->x),b.rows(),b.cols());\n      internal::cm_free_dense<StorageIndex>(x_cd, m_cholmod);\n    }\n\n    /** \\internal */\n    template<typename RhsDerived, typename DestDerived>\n    void _solve_impl(const SparseMatrixBase<RhsDerived> &b, SparseMatrixBase<DestDerived> &dest) const\n    {\n      eigen_assert(m_factorizationIsOk && \"The decomposition is not in a valid state for solving, you must first call either compute() or symbolic()/numeric()\");\n      const Index size = m_cholmodFactor->n;\n      EIGEN_UNUSED_VARIABLE(size);\n      eigen_assert(size==b.rows());\n\n      // note: cs stands for Cholmod Sparse\n      Ref<SparseMatrix<typename RhsDerived::Scalar,ColMajor,typename RhsDerived::StorageIndex> > b_ref(b.const_cast_derived());\n      cholmod_sparse b_cs = viewAsCholmod(b_ref);\n      cholmod_sparse* x_cs = internal::cm_spsolve<StorageIndex>(CHOLMOD_A, *m_cholmodFactor, b_cs, m_cholmod);\n      if(!x_cs)\n      {\n        this->m_info = NumericalIssue;\n        return;\n      }\n      // TODO optimize this copy by swapping when possible (be careful with alignment, etc.)\n      // NOTE cholmod_spsolve in fact just calls the dense solver for blocks of 4 columns at a time (similar to Eigen's sparse solver)\n      dest.derived() = viewAsEigen<typename DestDerived::Scalar,ColMajor,typename DestDerived::StorageIndex>(*x_cs);\n      internal::cm_free_sparse<StorageIndex>(x_cs, m_cholmod);\n    }\n    #endif // EIGEN_PARSED_BY_DOXYGEN\n\n\n    /** Sets the shift parameter that will be used to adjust the diagonal coefficients during the numerical factorization.\n      *\n      * During the numerical factorization, an offset term is added to the diagonal coefficients:\\n\n      * \\c d_ii = \\a offset + \\c d_ii\n      *\n      * The default is \\a offset=0.\n      *\n      * \\returns a reference to \\c *this.\n      */\n    Derived& setShift(const RealScalar& offset)\n    {\n      m_shiftOffset[0] = double(offset);\n      return derived();\n    }\n\n    /** \\returns the determinant of the underlying matrix from the current factorization */\n    Scalar determinant() const\n    {\n      using std::exp;\n      return exp(logDeterminant());\n    }\n\n    /** \\returns the log determinant of the underlying matrix from the current factorization */\n    Scalar logDeterminant() const\n    {\n      using std::log;\n      using numext::real;\n      eigen_assert(m_factorizationIsOk && \"The decomposition is not in a valid state for solving, you must first call either compute() or symbolic()/numeric()\");\n\n      RealScalar logDet = 0;\n      Scalar *x = static_cast<Scalar*>(m_cholmodFactor->x);\n      if (m_cholmodFactor->is_super)\n      {\n        // Supernodal factorization stored as a packed list of dense column-major blocs,\n        // as described by the following structure:\n\n        // super[k] == index of the first column of the j-th super node\n        StorageIndex *super = static_cast<StorageIndex*>(m_cholmodFactor->super);\n        // pi[k] == offset to the description of row indices\n        StorageIndex *pi = static_cast<StorageIndex*>(m_cholmodFactor->pi);\n        // px[k] == offset to the respective dense block\n        StorageIndex *px = static_cast<StorageIndex*>(m_cholmodFactor->px);\n\n        Index nb_super_nodes = m_cholmodFactor->nsuper;\n        for (Index k=0; k < nb_super_nodes; ++k)\n        {\n          StorageIndex ncols = super[k + 1] - super[k];\n          StorageIndex nrows = pi[k + 1] - pi[k];\n\n          Map<const Array<Scalar,1,Dynamic>, 0, InnerStride<> > sk(x + px[k], ncols, InnerStride<>(nrows+1));\n          logDet += sk.real().log().sum();\n        }\n      }\n      else\n      {\n        // Simplicial factorization stored as standard CSC matrix.\n        StorageIndex *p = static_cast<StorageIndex*>(m_cholmodFactor->p);\n        Index size = m_cholmodFactor->n;\n        for (Index k=0; k<size; ++k)\n          logDet += log(real( x[p[k]] ));\n      }\n      if (m_cholmodFactor->is_ll)\n        logDet *= 2.0;\n      return logDet;\n    };\n\n    template<typename Stream>\n    void dumpMemory(Stream& /*s*/)\n    {}\n\n  protected:\n    mutable cholmod_common m_cholmod;\n    cholmod_factor* m_cholmodFactor;\n    double m_shiftOffset[2];\n    mutable ComputationInfo m_info;\n    int m_factorizationIsOk;\n    int m_analysisIsOk;\n};\n\n/** \\ingroup CholmodSupport_Module\n  * \\class CholmodSimplicialLLT\n  * \\brief A simplicial direct Cholesky (LLT) factorization and solver based on Cholmod\n  *\n  * This class allows to solve for A.X = B sparse linear problems via a simplicial LL^T Cholesky factorization\n  * using the Cholmod library.\n  * This simplicial variant is equivalent to Eigen's built-in SimplicialLLT class. Therefore, it has little practical interest.\n  * The sparse matrix A must be selfadjoint and positive definite. The vectors or matrices\n  * X and B can be either dense or sparse.\n  *\n  * \\tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<>\n  * \\tparam _UpLo the triangular part that will be used for the computations. It can be Lower\n  *               or Upper. Default is Lower.\n  *\n  * \\implsparsesolverconcept\n  *\n  * This class supports all kind of SparseMatrix<>: row or column major; upper, lower, or both; compressed or non compressed.\n  *\n  * \\warning Only double precision real and complex scalar types are supported by Cholmod.\n  *\n  * \\sa \\ref TutorialSparseSolverConcept, class CholmodSupernodalLLT, class SimplicialLLT\n  */\ntemplate<typename _MatrixType, int _UpLo = Lower>\nclass CholmodSimplicialLLT : public CholmodBase<_MatrixType, _UpLo, CholmodSimplicialLLT<_MatrixType, _UpLo> >\n{\n    typedef CholmodBase<_MatrixType, _UpLo, CholmodSimplicialLLT> Base;\n    using Base::m_cholmod;\n\n  public:\n\n    typedef _MatrixType MatrixType;\n\n    CholmodSimplicialLLT() : Base() { init(); }\n\n    CholmodSimplicialLLT(const MatrixType& matrix) : Base()\n    {\n      init();\n      this->compute(matrix);\n    }\n\n    ~CholmodSimplicialLLT() {}\n  protected:\n    void init()\n    {\n      m_cholmod.final_asis = 0;\n      m_cholmod.supernodal = CHOLMOD_SIMPLICIAL;\n      m_cholmod.final_ll = 1;\n    }\n};\n\n\n/** \\ingroup CholmodSupport_Module\n  * \\class CholmodSimplicialLDLT\n  * \\brief A simplicial direct Cholesky (LDLT) factorization and solver based on Cholmod\n  *\n  * This class allows to solve for A.X = B sparse linear problems via a simplicial LDL^T Cholesky factorization\n  * using the Cholmod library.\n  * This simplicial variant is equivalent to Eigen's built-in SimplicialLDLT class. Therefore, it has little practical interest.\n  * The sparse matrix A must be selfadjoint and positive definite. The vectors or matrices\n  * X and B can be either dense or sparse.\n  *\n  * \\tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<>\n  * \\tparam _UpLo the triangular part that will be used for the computations. It can be Lower\n  *               or Upper. Default is Lower.\n  *\n  * \\implsparsesolverconcept\n  *\n  * This class supports all kind of SparseMatrix<>: row or column major; upper, lower, or both; compressed or non compressed.\n  *\n  * \\warning Only double precision real and complex scalar types are supported by Cholmod.\n  *\n  * \\sa \\ref TutorialSparseSolverConcept, class CholmodSupernodalLLT, class SimplicialLDLT\n  */\ntemplate<typename _MatrixType, int _UpLo = Lower>\nclass CholmodSimplicialLDLT : public CholmodBase<_MatrixType, _UpLo, CholmodSimplicialLDLT<_MatrixType, _UpLo> >\n{\n    typedef CholmodBase<_MatrixType, _UpLo, CholmodSimplicialLDLT> Base;\n    using Base::m_cholmod;\n\n  public:\n\n    typedef _MatrixType MatrixType;\n\n    CholmodSimplicialLDLT() : Base() { init(); }\n\n    CholmodSimplicialLDLT(const MatrixType& matrix) : Base()\n    {\n      init();\n      this->compute(matrix);\n    }\n\n    ~CholmodSimplicialLDLT() {}\n  protected:\n    void init()\n    {\n      m_cholmod.final_asis = 1;\n      m_cholmod.supernodal = CHOLMOD_SIMPLICIAL;\n    }\n};\n\n/** \\ingroup CholmodSupport_Module\n  * \\class CholmodSupernodalLLT\n  * \\brief A supernodal Cholesky (LLT) factorization and solver based on Cholmod\n  *\n  * This class allows to solve for A.X = B sparse linear problems via a supernodal LL^T Cholesky factorization\n  * using the Cholmod library.\n  * This supernodal variant performs best on dense enough problems, e.g., 3D FEM, or very high order 2D FEM.\n  * The sparse matrix A must be selfadjoint and positive definite. The vectors or matrices\n  * X and B can be either dense or sparse.\n  *\n  * \\tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<>\n  * \\tparam _UpLo the triangular part that will be used for the computations. It can be Lower\n  *               or Upper. Default is Lower.\n  *\n  * \\implsparsesolverconcept\n  *\n  * This class supports all kind of SparseMatrix<>: row or column major; upper, lower, or both; compressed or non compressed.\n  *\n  * \\warning Only double precision real and complex scalar types are supported by Cholmod.\n  *\n  * \\sa \\ref TutorialSparseSolverConcept\n  */\ntemplate<typename _MatrixType, int _UpLo = Lower>\nclass CholmodSupernodalLLT : public CholmodBase<_MatrixType, _UpLo, CholmodSupernodalLLT<_MatrixType, _UpLo> >\n{\n    typedef CholmodBase<_MatrixType, _UpLo, CholmodSupernodalLLT> Base;\n    using Base::m_cholmod;\n\n  public:\n\n    typedef _MatrixType MatrixType;\n\n    CholmodSupernodalLLT() : Base() { init(); }\n\n    CholmodSupernodalLLT(const MatrixType& matrix) : Base()\n    {\n      init();\n      this->compute(matrix);\n    }\n\n    ~CholmodSupernodalLLT() {}\n  protected:\n    void init()\n    {\n      m_cholmod.final_asis = 1;\n      m_cholmod.supernodal = CHOLMOD_SUPERNODAL;\n    }\n};\n\n/** \\ingroup CholmodSupport_Module\n  * \\class CholmodDecomposition\n  * \\brief A general Cholesky factorization and solver based on Cholmod\n  *\n  * This class allows to solve for A.X = B sparse linear problems via a LL^T or LDL^T Cholesky factorization\n  * using the Cholmod library. The sparse matrix A must be selfadjoint and positive definite. The vectors or matrices\n  * X and B can be either dense or sparse.\n  *\n  * This variant permits to change the underlying Cholesky method at runtime.\n  * On the other hand, it does not provide access to the result of the factorization.\n  * The default is to let Cholmod automatically choose between a simplicial and supernodal factorization.\n  *\n  * \\tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<>\n  * \\tparam _UpLo the triangular part that will be used for the computations. It can be Lower\n  *               or Upper. Default is Lower.\n  *\n  * \\implsparsesolverconcept\n  *\n  * This class supports all kind of SparseMatrix<>: row or column major; upper, lower, or both; compressed or non compressed.\n  *\n  * \\warning Only double precision real and complex scalar types are supported by Cholmod.\n  *\n  * \\sa \\ref TutorialSparseSolverConcept\n  */\ntemplate<typename _MatrixType, int _UpLo = Lower>\nclass CholmodDecomposition : public CholmodBase<_MatrixType, _UpLo, CholmodDecomposition<_MatrixType, _UpLo> >\n{\n    typedef CholmodBase<_MatrixType, _UpLo, CholmodDecomposition> Base;\n    using Base::m_cholmod;\n\n  public:\n\n    typedef _MatrixType MatrixType;\n\n    CholmodDecomposition() : Base() { init(); }\n\n    CholmodDecomposition(const MatrixType& matrix) : Base()\n    {\n      init();\n      this->compute(matrix);\n    }\n\n    ~CholmodDecomposition() {}\n\n    void setMode(CholmodMode mode)\n    {\n      switch(mode)\n      {\n        case CholmodAuto:\n          m_cholmod.final_asis = 1;\n          m_cholmod.supernodal = CHOLMOD_AUTO;\n          break;\n        case CholmodSimplicialLLt:\n          m_cholmod.final_asis = 0;\n          m_cholmod.supernodal = CHOLMOD_SIMPLICIAL;\n          m_cholmod.final_ll = 1;\n          break;\n        case CholmodSupernodalLLt:\n          m_cholmod.final_asis = 1;\n          m_cholmod.supernodal = CHOLMOD_SUPERNODAL;\n          break;\n        case CholmodLDLt:\n          m_cholmod.final_asis = 1;\n          m_cholmod.supernodal = CHOLMOD_SIMPLICIAL;\n          break;\n        default:\n          break;\n      }\n    }\n  protected:\n    void init()\n    {\n      m_cholmod.final_asis = 1;\n      m_cholmod.supernodal = CHOLMOD_AUTO;\n    }\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_CHOLMODSUPPORT_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/ArithmeticSequence.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2017 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_ARITHMETIC_SEQUENCE_H\n#define EIGEN_ARITHMETIC_SEQUENCE_H\n\nnamespace Eigen {\n\nnamespace internal {\n\n#if (!EIGEN_HAS_CXX11) || !((!EIGEN_COMP_GNUC) || EIGEN_COMP_GNUC>=48)\ntemplate<typename T> struct aseq_negate {};\n\ntemplate<> struct aseq_negate<Index> {\n  typedef Index type;\n};\n\ntemplate<int N> struct aseq_negate<FixedInt<N> > {\n  typedef FixedInt<-N> type;\n};\n\n// Compilation error in the following case:\ntemplate<> struct aseq_negate<FixedInt<DynamicIndex> > {};\n\ntemplate<typename FirstType,typename SizeType,typename IncrType,\n         bool FirstIsSymbolic=symbolic::is_symbolic<FirstType>::value,\n         bool SizeIsSymbolic =symbolic::is_symbolic<SizeType>::value>\nstruct aseq_reverse_first_type {\n  typedef Index type;\n};\n\ntemplate<typename FirstType,typename SizeType,typename IncrType>\nstruct aseq_reverse_first_type<FirstType,SizeType,IncrType,true,true> {\n  typedef symbolic::AddExpr<FirstType,\n                            symbolic::ProductExpr<symbolic::AddExpr<SizeType,symbolic::ValueExpr<FixedInt<-1> > >,\n                                                  symbolic::ValueExpr<IncrType> >\n                           > type;\n};\n\ntemplate<typename SizeType,typename IncrType,typename EnableIf = void>\nstruct aseq_reverse_first_type_aux {\n  typedef Index type;\n};\n\ntemplate<typename SizeType,typename IncrType>\nstruct aseq_reverse_first_type_aux<SizeType,IncrType,typename internal::enable_if<bool((SizeType::value+IncrType::value)|0x1)>::type> {\n  typedef FixedInt<(SizeType::value-1)*IncrType::value> type;\n};\n\ntemplate<typename FirstType,typename SizeType,typename IncrType>\nstruct aseq_reverse_first_type<FirstType,SizeType,IncrType,true,false> {\n  typedef typename aseq_reverse_first_type_aux<SizeType,IncrType>::type Aux;\n  typedef symbolic::AddExpr<FirstType,symbolic::ValueExpr<Aux> > type;\n};\n\ntemplate<typename FirstType,typename SizeType,typename IncrType>\nstruct aseq_reverse_first_type<FirstType,SizeType,IncrType,false,true> {\n  typedef symbolic::AddExpr<symbolic::ProductExpr<symbolic::AddExpr<SizeType,symbolic::ValueExpr<FixedInt<-1> > >,\n                                                  symbolic::ValueExpr<IncrType> >,\n                            symbolic::ValueExpr<> > type;\n};\n#endif\n\n// Helper to cleanup the type of the increment:\ntemplate<typename T> struct cleanup_seq_incr {\n  typedef typename cleanup_index_type<T,DynamicIndex>::type type;\n};\n\n}\n\n//--------------------------------------------------------------------------------\n// seq(first,last,incr) and seqN(first,size,incr)\n//--------------------------------------------------------------------------------\n\ntemplate<typename FirstType=Index,typename SizeType=Index,typename IncrType=internal::FixedInt<1> >\nclass ArithmeticSequence;\n\ntemplate<typename FirstType,typename SizeType,typename IncrType>\nArithmeticSequence<typename internal::cleanup_index_type<FirstType>::type,\n                   typename internal::cleanup_index_type<SizeType>::type,\n                   typename internal::cleanup_seq_incr<IncrType>::type >\nseqN(FirstType first, SizeType size, IncrType incr);\n\n/** \\class ArithmeticSequence\n  * \\ingroup Core_Module\n  *\n  * This class represents an arithmetic progression \\f$ a_0, a_1, a_2, ..., a_{n-1}\\f$ defined by\n  * its \\em first value \\f$ a_0 \\f$, its \\em size (aka length) \\em n, and the \\em increment (aka stride)\n  * that is equal to \\f$ a_{i+1}-a_{i}\\f$ for any \\em i.\n  *\n  * It is internally used as the return type of the Eigen::seq and Eigen::seqN functions, and as the input arguments\n  * of DenseBase::operator()(const RowIndices&, const ColIndices&), and most of the time this is the\n  * only way it is used.\n  *\n  * \\tparam FirstType type of the first element, usually an Index,\n  *                   but internally it can be a symbolic expression\n  * \\tparam SizeType type representing the size of the sequence, usually an Index\n  *                  or a compile time integral constant. Internally, it can also be a symbolic expression\n  * \\tparam IncrType type of the increment, can be a runtime Index, or a compile time integral constant (default is compile-time 1)\n  *\n  * \\sa Eigen::seq, Eigen::seqN, DenseBase::operator()(const RowIndices&, const ColIndices&), class IndexedView\n  */\ntemplate<typename FirstType,typename SizeType,typename IncrType>\nclass ArithmeticSequence\n{\npublic:\n  ArithmeticSequence(FirstType first, SizeType size) : m_first(first), m_size(size) {}\n  ArithmeticSequence(FirstType first, SizeType size, IncrType incr) : m_first(first), m_size(size), m_incr(incr) {}\n\n  enum {\n    SizeAtCompileTime = internal::get_fixed_value<SizeType>::value,\n    IncrAtCompileTime = internal::get_fixed_value<IncrType,DynamicIndex>::value\n  };\n\n  /** \\returns the size, i.e., number of elements, of the sequence */\n  Index size()  const { return m_size; }\n\n  /** \\returns the first element \\f$ a_0 \\f$ in the sequence */\n  Index first()  const { return m_first; }\n\n  /** \\returns the value \\f$ a_i \\f$ at index \\a i in the sequence. */\n  Index operator[](Index i) const { return m_first + i * m_incr; }\n\n  const FirstType& firstObject() const { return m_first; }\n  const SizeType&  sizeObject()  const { return m_size; }\n  const IncrType&  incrObject()  const { return m_incr; }\n\nprotected:\n  FirstType m_first;\n  SizeType  m_size;\n  IncrType  m_incr;\n\npublic:\n\n#if EIGEN_HAS_CXX11 && ((!EIGEN_COMP_GNUC) || EIGEN_COMP_GNUC>=48)\n  auto reverse() const -> decltype(Eigen::seqN(m_first+(m_size+fix<-1>())*m_incr,m_size,-m_incr)) {\n    return seqN(m_first+(m_size+fix<-1>())*m_incr,m_size,-m_incr);\n  }\n#else\nprotected:\n  typedef typename internal::aseq_negate<IncrType>::type ReverseIncrType;\n  typedef typename internal::aseq_reverse_first_type<FirstType,SizeType,IncrType>::type ReverseFirstType;\npublic:\n  ArithmeticSequence<ReverseFirstType,SizeType,ReverseIncrType>\n  reverse() const {\n    return seqN(m_first+(m_size+fix<-1>())*m_incr,m_size,-m_incr);\n  }\n#endif\n};\n\n/** \\returns an ArithmeticSequence starting at \\a first, of length \\a size, and increment \\a incr\n  *\n  * \\sa seqN(FirstType,SizeType), seq(FirstType,LastType,IncrType) */\ntemplate<typename FirstType,typename SizeType,typename IncrType>\nArithmeticSequence<typename internal::cleanup_index_type<FirstType>::type,typename internal::cleanup_index_type<SizeType>::type,typename internal::cleanup_seq_incr<IncrType>::type >\nseqN(FirstType first, SizeType size, IncrType incr)  {\n  return ArithmeticSequence<typename internal::cleanup_index_type<FirstType>::type,typename internal::cleanup_index_type<SizeType>::type,typename internal::cleanup_seq_incr<IncrType>::type>(first,size,incr);\n}\n\n/** \\returns an ArithmeticSequence starting at \\a first, of length \\a size, and unit increment\n  *\n  * \\sa seqN(FirstType,SizeType,IncrType), seq(FirstType,LastType) */\ntemplate<typename FirstType,typename SizeType>\nArithmeticSequence<typename internal::cleanup_index_type<FirstType>::type,typename internal::cleanup_index_type<SizeType>::type >\nseqN(FirstType first, SizeType size)  {\n  return ArithmeticSequence<typename internal::cleanup_index_type<FirstType>::type,typename internal::cleanup_index_type<SizeType>::type>(first,size);\n}\n\n#ifdef EIGEN_PARSED_BY_DOXYGEN\n\n/** \\returns an ArithmeticSequence starting at \\a f, up (or down) to \\a l, and with positive (or negative) increment \\a incr\n  *\n  * It is essentially an alias to:\n  * \\code\n  * seqN(f, (l-f+incr)/incr, incr);\n  * \\endcode\n  *\n  * \\sa seqN(FirstType,SizeType,IncrType), seq(FirstType,LastType)\n  */\ntemplate<typename FirstType,typename LastType, typename IncrType>\nauto seq(FirstType f, LastType l, IncrType incr);\n\n/** \\returns an ArithmeticSequence starting at \\a f, up (or down) to \\a l, and unit increment\n  *\n  * It is essentially an alias to:\n  * \\code\n  * seqN(f,l-f+1);\n  * \\endcode\n  *\n  * \\sa seqN(FirstType,SizeType), seq(FirstType,LastType,IncrType)\n  */\ntemplate<typename FirstType,typename LastType>\nauto seq(FirstType f, LastType l);\n\n#else // EIGEN_PARSED_BY_DOXYGEN\n\n#if EIGEN_HAS_CXX11\ntemplate<typename FirstType,typename LastType>\nauto seq(FirstType f, LastType l) -> decltype(seqN(typename internal::cleanup_index_type<FirstType>::type(f),\n                                                   (  typename internal::cleanup_index_type<LastType>::type(l)\n                                                    - typename internal::cleanup_index_type<FirstType>::type(f)+fix<1>())))\n{\n  return seqN(typename internal::cleanup_index_type<FirstType>::type(f),\n              (typename internal::cleanup_index_type<LastType>::type(l)\n               -typename internal::cleanup_index_type<FirstType>::type(f)+fix<1>()));\n}\n\ntemplate<typename FirstType,typename LastType, typename IncrType>\nauto seq(FirstType f, LastType l, IncrType incr)\n  -> decltype(seqN(typename internal::cleanup_index_type<FirstType>::type(f),\n                   (   typename internal::cleanup_index_type<LastType>::type(l)\n                     - typename internal::cleanup_index_type<FirstType>::type(f)+typename internal::cleanup_seq_incr<IncrType>::type(incr)\n                   ) / typename internal::cleanup_seq_incr<IncrType>::type(incr),\n                   typename internal::cleanup_seq_incr<IncrType>::type(incr)))\n{\n  typedef typename internal::cleanup_seq_incr<IncrType>::type CleanedIncrType;\n  return seqN(typename internal::cleanup_index_type<FirstType>::type(f),\n              ( typename internal::cleanup_index_type<LastType>::type(l)\n               -typename internal::cleanup_index_type<FirstType>::type(f)+CleanedIncrType(incr)) / CleanedIncrType(incr),\n              CleanedIncrType(incr));\n}\n\n#else // EIGEN_HAS_CXX11\n\ntemplate<typename FirstType,typename LastType>\ntypename internal::enable_if<!(symbolic::is_symbolic<FirstType>::value || symbolic::is_symbolic<LastType>::value),\n                             ArithmeticSequence<typename internal::cleanup_index_type<FirstType>::type,Index> >::type\nseq(FirstType f, LastType l)\n{\n  return seqN(typename internal::cleanup_index_type<FirstType>::type(f),\n              Index((typename internal::cleanup_index_type<LastType>::type(l)-typename internal::cleanup_index_type<FirstType>::type(f)+fix<1>())));\n}\n\ntemplate<typename FirstTypeDerived,typename LastType>\ntypename internal::enable_if<!symbolic::is_symbolic<LastType>::value,\n    ArithmeticSequence<FirstTypeDerived, symbolic::AddExpr<symbolic::AddExpr<symbolic::NegateExpr<FirstTypeDerived>,symbolic::ValueExpr<> >,\n                                                            symbolic::ValueExpr<internal::FixedInt<1> > > > >::type\nseq(const symbolic::BaseExpr<FirstTypeDerived> &f, LastType l)\n{\n  return seqN(f.derived(),(typename internal::cleanup_index_type<LastType>::type(l)-f.derived()+fix<1>()));\n}\n\ntemplate<typename FirstType,typename LastTypeDerived>\ntypename internal::enable_if<!symbolic::is_symbolic<FirstType>::value,\n    ArithmeticSequence<typename internal::cleanup_index_type<FirstType>::type,\n                        symbolic::AddExpr<symbolic::AddExpr<LastTypeDerived,symbolic::ValueExpr<> >,\n                                          symbolic::ValueExpr<internal::FixedInt<1> > > > >::type\nseq(FirstType f, const symbolic::BaseExpr<LastTypeDerived> &l)\n{\n  return seqN(typename internal::cleanup_index_type<FirstType>::type(f),(l.derived()-typename internal::cleanup_index_type<FirstType>::type(f)+fix<1>()));\n}\n\ntemplate<typename FirstTypeDerived,typename LastTypeDerived>\nArithmeticSequence<FirstTypeDerived,\n                    symbolic::AddExpr<symbolic::AddExpr<LastTypeDerived,symbolic::NegateExpr<FirstTypeDerived> >,symbolic::ValueExpr<internal::FixedInt<1> > > >\nseq(const symbolic::BaseExpr<FirstTypeDerived> &f, const symbolic::BaseExpr<LastTypeDerived> &l)\n{\n  return seqN(f.derived(),(l.derived()-f.derived()+fix<1>()));\n}\n\n\ntemplate<typename FirstType,typename LastType, typename IncrType>\ntypename internal::enable_if<!(symbolic::is_symbolic<FirstType>::value || symbolic::is_symbolic<LastType>::value),\n    ArithmeticSequence<typename internal::cleanup_index_type<FirstType>::type,Index,typename internal::cleanup_seq_incr<IncrType>::type> >::type\nseq(FirstType f, LastType l, IncrType incr)\n{\n  typedef typename internal::cleanup_seq_incr<IncrType>::type CleanedIncrType;\n  return seqN(typename internal::cleanup_index_type<FirstType>::type(f),\n              Index((typename internal::cleanup_index_type<LastType>::type(l)-typename internal::cleanup_index_type<FirstType>::type(f)+CleanedIncrType(incr))/CleanedIncrType(incr)), incr);\n}\n\ntemplate<typename FirstTypeDerived,typename LastType, typename IncrType>\ntypename internal::enable_if<!symbolic::is_symbolic<LastType>::value,\n    ArithmeticSequence<FirstTypeDerived,\n                        symbolic::QuotientExpr<symbolic::AddExpr<symbolic::AddExpr<symbolic::NegateExpr<FirstTypeDerived>,\n                                                                                   symbolic::ValueExpr<> >,\n                                                                 symbolic::ValueExpr<typename internal::cleanup_seq_incr<IncrType>::type> >,\n                                              symbolic::ValueExpr<typename internal::cleanup_seq_incr<IncrType>::type> >,\n                        typename internal::cleanup_seq_incr<IncrType>::type> >::type\nseq(const symbolic::BaseExpr<FirstTypeDerived> &f, LastType l, IncrType incr)\n{\n  typedef typename internal::cleanup_seq_incr<IncrType>::type CleanedIncrType;\n  return seqN(f.derived(),(typename internal::cleanup_index_type<LastType>::type(l)-f.derived()+CleanedIncrType(incr))/CleanedIncrType(incr), incr);\n}\n\ntemplate<typename FirstType,typename LastTypeDerived, typename IncrType>\ntypename internal::enable_if<!symbolic::is_symbolic<FirstType>::value,\n    ArithmeticSequence<typename internal::cleanup_index_type<FirstType>::type,\n                        symbolic::QuotientExpr<symbolic::AddExpr<symbolic::AddExpr<LastTypeDerived,symbolic::ValueExpr<> >,\n                                                                 symbolic::ValueExpr<typename internal::cleanup_seq_incr<IncrType>::type> >,\n                                               symbolic::ValueExpr<typename internal::cleanup_seq_incr<IncrType>::type> >,\n                        typename internal::cleanup_seq_incr<IncrType>::type> >::type\nseq(FirstType f, const symbolic::BaseExpr<LastTypeDerived> &l, IncrType incr)\n{\n  typedef typename internal::cleanup_seq_incr<IncrType>::type CleanedIncrType;\n  return seqN(typename internal::cleanup_index_type<FirstType>::type(f),\n              (l.derived()-typename internal::cleanup_index_type<FirstType>::type(f)+CleanedIncrType(incr))/CleanedIncrType(incr), incr);\n}\n\ntemplate<typename FirstTypeDerived,typename LastTypeDerived, typename IncrType>\nArithmeticSequence<FirstTypeDerived,\n                    symbolic::QuotientExpr<symbolic::AddExpr<symbolic::AddExpr<LastTypeDerived,\n                                                                               symbolic::NegateExpr<FirstTypeDerived> >,\n                                                             symbolic::ValueExpr<typename internal::cleanup_seq_incr<IncrType>::type> >,\n                                          symbolic::ValueExpr<typename internal::cleanup_seq_incr<IncrType>::type> >,\n                    typename internal::cleanup_seq_incr<IncrType>::type>\nseq(const symbolic::BaseExpr<FirstTypeDerived> &f, const symbolic::BaseExpr<LastTypeDerived> &l, IncrType incr)\n{\n  typedef typename internal::cleanup_seq_incr<IncrType>::type CleanedIncrType;\n  return seqN(f.derived(),(l.derived()-f.derived()+CleanedIncrType(incr))/CleanedIncrType(incr), incr);\n}\n#endif // EIGEN_HAS_CXX11\n\n#endif // EIGEN_PARSED_BY_DOXYGEN\n\n\n#if EIGEN_HAS_CXX11 || defined(EIGEN_PARSED_BY_DOXYGEN)\n/** \\cpp11\n  * \\returns a symbolic ArithmeticSequence representing the last \\a size elements with increment \\a incr.\n  *\n  * It is a shortcut for: \\code seqN(last-(size-fix<1>)*incr, size, incr) \\endcode\n  * \n  * \\sa lastN(SizeType), seqN(FirstType,SizeType), seq(FirstType,LastType,IncrType) */\ntemplate<typename SizeType,typename IncrType>\nauto lastN(SizeType size, IncrType incr)\n-> decltype(seqN(Eigen::last-(size-fix<1>())*incr, size, incr))\n{\n  return seqN(Eigen::last-(size-fix<1>())*incr, size, incr);\n}\n\n/** \\cpp11\n  * \\returns a symbolic ArithmeticSequence representing the last \\a size elements with a unit increment.\n  *\n  *  It is a shortcut for: \\code seq(last+fix<1>-size, last) \\endcode\n  * \n  * \\sa lastN(SizeType,IncrType, seqN(FirstType,SizeType), seq(FirstType,LastType) */\ntemplate<typename SizeType>\nauto lastN(SizeType size)\n-> decltype(seqN(Eigen::last+fix<1>()-size, size))\n{\n  return seqN(Eigen::last+fix<1>()-size, size);\n}\n#endif\n\nnamespace internal {\n\n// Convert a symbolic span into a usable one (i.e., remove last/end \"keywords\")\ntemplate<typename T>\nstruct make_size_type {\n  typedef typename internal::conditional<symbolic::is_symbolic<T>::value, Index, T>::type type;\n};\n\ntemplate<typename FirstType,typename SizeType,typename IncrType,int XprSize>\nstruct IndexedViewCompatibleType<ArithmeticSequence<FirstType,SizeType,IncrType>, XprSize> {\n  typedef ArithmeticSequence<Index,typename make_size_type<SizeType>::type,IncrType> type;\n};\n\ntemplate<typename FirstType,typename SizeType,typename IncrType>\nArithmeticSequence<Index,typename make_size_type<SizeType>::type,IncrType>\nmakeIndexedViewCompatible(const ArithmeticSequence<FirstType,SizeType,IncrType>& ids, Index size,SpecializedType) {\n  return ArithmeticSequence<Index,typename make_size_type<SizeType>::type,IncrType>(\n            eval_expr_given_size(ids.firstObject(),size),eval_expr_given_size(ids.sizeObject(),size),ids.incrObject());\n}\n\ntemplate<typename FirstType,typename SizeType,typename IncrType>\nstruct get_compile_time_incr<ArithmeticSequence<FirstType,SizeType,IncrType> > {\n  enum { value = get_fixed_value<IncrType,DynamicIndex>::value };\n};\n\n} // end namespace internal\n\n/** \\namespace Eigen::indexing\n  * \\ingroup Core_Module\n  * \n  * The sole purpose of this namespace is to be able to import all functions\n  * and symbols that are expected to be used within operator() for indexing\n  * and slicing. If you already imported the whole Eigen namespace:\n  * \\code using namespace Eigen; \\endcode\n  * then you are already all set. Otherwise, if you don't want/cannot import\n  * the whole Eigen namespace, the following line:\n  * \\code using namespace Eigen::indexing; \\endcode\n  * is equivalent to:\n  * \\code\n  using Eigen::all;\n  using Eigen::seq;\n  using Eigen::seqN;\n  using Eigen::lastN; // c++11 only\n  using Eigen::last;\n  using Eigen::lastp1;\n  using Eigen::fix;\n  \\endcode\n  */\nnamespace indexing {\n  using Eigen::all;\n  using Eigen::seq;\n  using Eigen::seqN;\n  #if EIGEN_HAS_CXX11\n  using Eigen::lastN;\n  #endif\n  using Eigen::last;\n  using Eigen::lastp1;\n  using Eigen::fix;\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_ARITHMETIC_SEQUENCE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/Array.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_ARRAY_H\n#define EIGEN_ARRAY_H\n\nnamespace Eigen {\n\nnamespace internal {\ntemplate<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>\nstruct traits<Array<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> > : traits<Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> >\n{\n  typedef ArrayXpr XprKind;\n  typedef ArrayBase<Array<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> > XprBase;\n};\n}\n\n/** \\class Array\n  * \\ingroup Core_Module\n  *\n  * \\brief General-purpose arrays with easy API for coefficient-wise operations\n  *\n  * The %Array class is very similar to the Matrix class. It provides\n  * general-purpose one- and two-dimensional arrays. The difference between the\n  * %Array and the %Matrix class is primarily in the API: the API for the\n  * %Array class provides easy access to coefficient-wise operations, while the\n  * API for the %Matrix class provides easy access to linear-algebra\n  * operations.\n  *\n  * See documentation of class Matrix for detailed information on the template parameters\n  * storage layout.\n  *\n  * This class can be extended with the help of the plugin mechanism described on the page\n  * \\ref TopicCustomizing_Plugins by defining the preprocessor symbol \\c EIGEN_ARRAY_PLUGIN.\n  *\n  * \\sa \\blank \\ref TutorialArrayClass, \\ref TopicClassHierarchy\n  */\ntemplate<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>\nclass Array\n  : public PlainObjectBase<Array<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> >\n{\n  public:\n\n    typedef PlainObjectBase<Array> Base;\n    EIGEN_DENSE_PUBLIC_INTERFACE(Array)\n\n    enum { Options = _Options };\n    typedef typename Base::PlainObject PlainObject;\n\n  protected:\n    template <typename Derived, typename OtherDerived, bool IsVector>\n    friend struct internal::conservative_resize_like_impl;\n\n    using Base::m_storage;\n\n  public:\n\n    using Base::base;\n    using Base::coeff;\n    using Base::coeffRef;\n\n    /**\n      * The usage of\n      *   using Base::operator=;\n      * fails on MSVC. Since the code below is working with GCC and MSVC, we skipped\n      * the usage of 'using'. This should be done only for operator=.\n      */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Array& operator=(const EigenBase<OtherDerived> &other)\n    {\n      return Base::operator=(other);\n    }\n\n    /** Set all the entries to \\a value.\n      * \\sa DenseBase::setConstant(), DenseBase::fill()\n      */\n    /* This overload is needed because the usage of\n      *   using Base::operator=;\n      * fails on MSVC. Since the code below is working with GCC and MSVC, we skipped\n      * the usage of 'using'. This should be done only for operator=.\n      */\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Array& operator=(const Scalar &value)\n    {\n      Base::setConstant(value);\n      return *this;\n    }\n\n    /** Copies the value of the expression \\a other into \\c *this with automatic resizing.\n      *\n      * *this might be resized to match the dimensions of \\a other. If *this was a null matrix (not already initialized),\n      * it will be initialized.\n      *\n      * Note that copying a row-vector into a vector (and conversely) is allowed.\n      * The resizing, if any, is then done in the appropriate way so that row-vectors\n      * remain row-vectors and vectors remain vectors.\n      */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Array& operator=(const DenseBase<OtherDerived>& other)\n    {\n      return Base::_set(other);\n    }\n\n    /** This is a special case of the templated operator=. Its purpose is to\n      * prevent a default operator= from hiding the templated operator=.\n      */\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Array& operator=(const Array& other)\n    {\n      return Base::_set(other);\n    }\n    \n    /** Default constructor.\n      *\n      * For fixed-size matrices, does nothing.\n      *\n      * For dynamic-size matrices, creates an empty matrix of size 0. Does not allocate any array. Such a matrix\n      * is called a null matrix. This constructor is the unique way to create null matrices: resizing\n      * a matrix to 0 is not supported.\n      *\n      * \\sa resize(Index,Index)\n      */\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Array() : Base()\n    {\n      Base::_check_template_params();\n      EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED\n    }\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\n    // FIXME is it still needed ??\n    /** \\internal */\n    EIGEN_DEVICE_FUNC\n    Array(internal::constructor_without_unaligned_array_assert)\n      : Base(internal::constructor_without_unaligned_array_assert())\n    {\n      Base::_check_template_params();\n      EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED\n    }\n#endif\n\n#if EIGEN_HAS_RVALUE_REFERENCES\n    EIGEN_DEVICE_FUNC\n    Array(Array&& other) EIGEN_NOEXCEPT_IF(std::is_nothrow_move_constructible<Scalar>::value)\n      : Base(std::move(other))\n    {\n      Base::_check_template_params();\n    }\n    EIGEN_DEVICE_FUNC\n    Array& operator=(Array&& other) EIGEN_NOEXCEPT_IF(std::is_nothrow_move_assignable<Scalar>::value)\n    {\n      other.swap(*this);\n      return *this;\n    }\n#endif\n\n    #if EIGEN_HAS_CXX11\n    /** \\copydoc PlainObjectBase(const Scalar& a0, const Scalar& a1, const Scalar& a2, const Scalar& a3, const ArgTypes&... args)\n     *\n     * Example: \\include Array_variadic_ctor_cxx11.cpp\n     * Output: \\verbinclude Array_variadic_ctor_cxx11.out\n     *\n     * \\sa Array(const std::initializer_list<std::initializer_list<Scalar>>&)\n     * \\sa Array(const Scalar&), Array(const Scalar&,const Scalar&)\n     */\n    template <typename... ArgTypes>\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Array(const Scalar& a0, const Scalar& a1, const Scalar& a2, const Scalar& a3, const ArgTypes&... args)\n      : Base(a0, a1, a2, a3, args...) {}\n\n    /** \\brief Constructs an array and initializes it from the coefficients given as initializer-lists grouped by row. \\cpp11\n      * \n      * In the general case, the constructor takes a list of rows, each row being represented as a list of coefficients:\n      * \n      * Example: \\include Array_initializer_list_23_cxx11.cpp\n      * Output: \\verbinclude Array_initializer_list_23_cxx11.out\n      * \n      * Each of the inner initializer lists must contain the exact same number of elements, otherwise an assertion is triggered.\n      * \n      * In the case of a compile-time column 1D array, implicit transposition from a single row is allowed.\n      * Therefore <code> Array<int,Dynamic,1>{{1,2,3,4,5}}</code> is legal and the more verbose syntax\n      * <code>Array<int,Dynamic,1>{{1},{2},{3},{4},{5}}</code> can be avoided:\n      * \n      * Example: \\include Array_initializer_list_vector_cxx11.cpp\n      * Output: \\verbinclude Array_initializer_list_vector_cxx11.out\n      * \n      * In the case of fixed-sized arrays, the initializer list sizes must exactly match the array sizes,\n      * and implicit transposition is allowed for compile-time 1D arrays only.\n      * \n      * \\sa  Array(const Scalar& a0, const Scalar& a1, const Scalar& a2, const Scalar& a3, const ArgTypes&... args)\n      */\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Array(const std::initializer_list<std::initializer_list<Scalar>>& list) : Base(list) {}\n    #endif // end EIGEN_HAS_CXX11\n\n    #ifndef EIGEN_PARSED_BY_DOXYGEN\n    template<typename T>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE explicit Array(const T& x)\n    {\n      Base::_check_template_params();\n      Base::template _init1<T>(x);\n    }\n\n    template<typename T0, typename T1>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Array(const T0& val0, const T1& val1)\n    {\n      Base::_check_template_params();\n      this->template _init2<T0,T1>(val0, val1);\n    }\n\n    #else\n    /** \\brief Constructs a fixed-sized array initialized with coefficients starting at \\a data */\n    EIGEN_DEVICE_FUNC explicit Array(const Scalar *data);\n    /** Constructs a vector or row-vector with given dimension. \\only_for_vectors\n      *\n      * Note that this is only useful for dynamic-size vectors. For fixed-size vectors,\n      * it is redundant to pass the dimension here, so it makes more sense to use the default\n      * constructor Array() instead.\n      */\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE explicit Array(Index dim);\n    /** constructs an initialized 1x1 Array with the given coefficient\n      * \\sa const Scalar& a0, const Scalar& a1, const Scalar& a2, const Scalar& a3, const ArgTypes&... args */\n    Array(const Scalar& value);\n    /** constructs an uninitialized array with \\a rows rows and \\a cols columns.\n      *\n      * This is useful for dynamic-size arrays. For fixed-size arrays,\n      * it is redundant to pass these parameters, so one should use the default constructor\n      * Array() instead. */\n    Array(Index rows, Index cols);\n    /** constructs an initialized 2D vector with given coefficients\n      * \\sa Array(const Scalar& a0, const Scalar& a1, const Scalar& a2, const Scalar& a3, const ArgTypes&... args) */\n    Array(const Scalar& val0, const Scalar& val1);\n    #endif  // end EIGEN_PARSED_BY_DOXYGEN \n\n    /** constructs an initialized 3D vector with given coefficients\n      * \\sa Array(const Scalar& a0, const Scalar& a1, const Scalar& a2, const Scalar& a3, const ArgTypes&... args)\n      */\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Array(const Scalar& val0, const Scalar& val1, const Scalar& val2)\n    {\n      Base::_check_template_params();\n      EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Array, 3)\n      m_storage.data()[0] = val0;\n      m_storage.data()[1] = val1;\n      m_storage.data()[2] = val2;\n    }\n    /** constructs an initialized 4D vector with given coefficients\n      * \\sa Array(const Scalar& a0, const Scalar& a1, const Scalar& a2, const Scalar& a3, const ArgTypes&... args)\n      */\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Array(const Scalar& val0, const Scalar& val1, const Scalar& val2, const Scalar& val3)\n    {\n      Base::_check_template_params();\n      EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Array, 4)\n      m_storage.data()[0] = val0;\n      m_storage.data()[1] = val1;\n      m_storage.data()[2] = val2;\n      m_storage.data()[3] = val3;\n    }\n\n    /** Copy constructor */\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Array(const Array& other)\n            : Base(other)\n    { }\n\n  private:\n    struct PrivateType {};\n  public:\n\n    /** \\sa MatrixBase::operator=(const EigenBase<OtherDerived>&) */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Array(const EigenBase<OtherDerived> &other,\n                              typename internal::enable_if<internal::is_convertible<typename OtherDerived::Scalar,Scalar>::value,\n                                                           PrivateType>::type = PrivateType())\n      : Base(other.derived())\n    { }\n\n    EIGEN_DEVICE_FUNC inline Index innerStride() const { return 1; }\n    EIGEN_DEVICE_FUNC inline Index outerStride() const { return this->innerSize(); }\n\n    #ifdef EIGEN_ARRAY_PLUGIN\n    #include EIGEN_ARRAY_PLUGIN\n    #endif\n\n  private:\n\n    template<typename MatrixType, typename OtherDerived, bool SwapPointers>\n    friend struct internal::matrix_swap_impl;\n};\n\n/** \\defgroup arraytypedefs Global array typedefs\n  * \\ingroup Core_Module\n  *\n  * %Eigen defines several typedef shortcuts for most common 1D and 2D array types.\n  *\n  * The general patterns are the following:\n  *\n  * \\c ArrayRowsColsType where \\c Rows and \\c Cols can be \\c 2,\\c 3,\\c 4 for fixed size square matrices or \\c X for dynamic size,\n  * and where \\c Type can be \\c i for integer, \\c f for float, \\c d for double, \\c cf for complex float, \\c cd\n  * for complex double.\n  *\n  * For example, \\c Array33d is a fixed-size 3x3 array type of doubles, and \\c ArrayXXf is a dynamic-size matrix of floats.\n  *\n  * There are also \\c ArraySizeType which are self-explanatory. For example, \\c Array4cf is\n  * a fixed-size 1D array of 4 complex floats.\n  *\n  * With \\cpp11, template alias are also defined for common sizes.\n  * They follow the same pattern as above except that the scalar type suffix is replaced by a\n  * template parameter, i.e.:\n  *   - `ArrayRowsCols<Type>` where `Rows` and `Cols` can be \\c 2,\\c 3,\\c 4, or \\c X for fixed or dynamic size.\n  *   - `ArraySize<Type>` where `Size` can be \\c 2,\\c 3,\\c 4 or \\c X for fixed or dynamic size 1D arrays.\n  * \n  * \\sa class Array\n  */\n\n#define EIGEN_MAKE_ARRAY_TYPEDEFS(Type, TypeSuffix, Size, SizeSuffix)   \\\n/** \\ingroup arraytypedefs */                                    \\\ntypedef Array<Type, Size, Size> Array##SizeSuffix##SizeSuffix##TypeSuffix;  \\\n/** \\ingroup arraytypedefs */                                    \\\ntypedef Array<Type, Size, 1>    Array##SizeSuffix##TypeSuffix;\n\n#define EIGEN_MAKE_ARRAY_FIXED_TYPEDEFS(Type, TypeSuffix, Size)         \\\n/** \\ingroup arraytypedefs */                                    \\\ntypedef Array<Type, Size, Dynamic> Array##Size##X##TypeSuffix;  \\\n/** \\ingroup arraytypedefs */                                    \\\ntypedef Array<Type, Dynamic, Size> Array##X##Size##TypeSuffix;\n\n#define EIGEN_MAKE_ARRAY_TYPEDEFS_ALL_SIZES(Type, TypeSuffix) \\\nEIGEN_MAKE_ARRAY_TYPEDEFS(Type, TypeSuffix, 2, 2) \\\nEIGEN_MAKE_ARRAY_TYPEDEFS(Type, TypeSuffix, 3, 3) \\\nEIGEN_MAKE_ARRAY_TYPEDEFS(Type, TypeSuffix, 4, 4) \\\nEIGEN_MAKE_ARRAY_TYPEDEFS(Type, TypeSuffix, Dynamic, X) \\\nEIGEN_MAKE_ARRAY_FIXED_TYPEDEFS(Type, TypeSuffix, 2) \\\nEIGEN_MAKE_ARRAY_FIXED_TYPEDEFS(Type, TypeSuffix, 3) \\\nEIGEN_MAKE_ARRAY_FIXED_TYPEDEFS(Type, TypeSuffix, 4)\n\nEIGEN_MAKE_ARRAY_TYPEDEFS_ALL_SIZES(int,                  i)\nEIGEN_MAKE_ARRAY_TYPEDEFS_ALL_SIZES(float,                f)\nEIGEN_MAKE_ARRAY_TYPEDEFS_ALL_SIZES(double,               d)\nEIGEN_MAKE_ARRAY_TYPEDEFS_ALL_SIZES(std::complex<float>,  cf)\nEIGEN_MAKE_ARRAY_TYPEDEFS_ALL_SIZES(std::complex<double>, cd)\n\n#undef EIGEN_MAKE_ARRAY_TYPEDEFS_ALL_SIZES\n#undef EIGEN_MAKE_ARRAY_TYPEDEFS\n#undef EIGEN_MAKE_ARRAY_FIXED_TYPEDEFS\n\n#if EIGEN_HAS_CXX11\n\n#define EIGEN_MAKE_ARRAY_TYPEDEFS(Size, SizeSuffix)               \\\n/** \\ingroup arraytypedefs */                                     \\\n/** \\brief \\cpp11 */                                              \\\ntemplate <typename Type>                                          \\\nusing Array##SizeSuffix##SizeSuffix = Array<Type, Size, Size>;    \\\n/** \\ingroup arraytypedefs */                                     \\\n/** \\brief \\cpp11 */                                              \\\ntemplate <typename Type>                                          \\\nusing Array##SizeSuffix = Array<Type, Size, 1>; \n\n#define EIGEN_MAKE_ARRAY_FIXED_TYPEDEFS(Size)                     \\\n/** \\ingroup arraytypedefs */                                     \\\n/** \\brief \\cpp11 */                                              \\\ntemplate <typename Type>                                          \\\nusing Array##Size##X = Array<Type, Size, Dynamic>;                \\\n/** \\ingroup arraytypedefs */                                     \\\n/** \\brief \\cpp11 */                                              \\\ntemplate <typename Type>                                          \\\nusing Array##X##Size = Array<Type, Dynamic, Size>;\n\nEIGEN_MAKE_ARRAY_TYPEDEFS(2, 2)\nEIGEN_MAKE_ARRAY_TYPEDEFS(3, 3)\nEIGEN_MAKE_ARRAY_TYPEDEFS(4, 4)\nEIGEN_MAKE_ARRAY_TYPEDEFS(Dynamic, X)\nEIGEN_MAKE_ARRAY_FIXED_TYPEDEFS(2)\nEIGEN_MAKE_ARRAY_FIXED_TYPEDEFS(3)\nEIGEN_MAKE_ARRAY_FIXED_TYPEDEFS(4)\n\n#undef EIGEN_MAKE_ARRAY_TYPEDEFS\n#undef EIGEN_MAKE_ARRAY_FIXED_TYPEDEFS\n\n#endif // EIGEN_HAS_CXX11\n  \n#define EIGEN_USING_ARRAY_TYPEDEFS_FOR_TYPE_AND_SIZE(TypeSuffix, SizeSuffix) \\\nusing Eigen::Matrix##SizeSuffix##TypeSuffix; \\\nusing Eigen::Vector##SizeSuffix##TypeSuffix; \\\nusing Eigen::RowVector##SizeSuffix##TypeSuffix;\n\n#define EIGEN_USING_ARRAY_TYPEDEFS_FOR_TYPE(TypeSuffix) \\\nEIGEN_USING_ARRAY_TYPEDEFS_FOR_TYPE_AND_SIZE(TypeSuffix, 2) \\\nEIGEN_USING_ARRAY_TYPEDEFS_FOR_TYPE_AND_SIZE(TypeSuffix, 3) \\\nEIGEN_USING_ARRAY_TYPEDEFS_FOR_TYPE_AND_SIZE(TypeSuffix, 4) \\\nEIGEN_USING_ARRAY_TYPEDEFS_FOR_TYPE_AND_SIZE(TypeSuffix, X) \\\n\n#define EIGEN_USING_ARRAY_TYPEDEFS \\\nEIGEN_USING_ARRAY_TYPEDEFS_FOR_TYPE(i) \\\nEIGEN_USING_ARRAY_TYPEDEFS_FOR_TYPE(f) \\\nEIGEN_USING_ARRAY_TYPEDEFS_FOR_TYPE(d) \\\nEIGEN_USING_ARRAY_TYPEDEFS_FOR_TYPE(cf) \\\nEIGEN_USING_ARRAY_TYPEDEFS_FOR_TYPE(cd)\n\n} // end namespace Eigen\n\n#endif // EIGEN_ARRAY_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/ArrayBase.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_ARRAYBASE_H\n#define EIGEN_ARRAYBASE_H\n\nnamespace Eigen { \n\ntemplate<typename ExpressionType> class MatrixWrapper;\n\n/** \\class ArrayBase\n  * \\ingroup Core_Module\n  *\n  * \\brief Base class for all 1D and 2D array, and related expressions\n  *\n  * An array is similar to a dense vector or matrix. While matrices are mathematical\n  * objects with well defined linear algebra operators, an array is just a collection\n  * of scalar values arranged in a one or two dimensionnal fashion. As the main consequence,\n  * all operations applied to an array are performed coefficient wise. Furthermore,\n  * arrays support scalar math functions of the c++ standard library (e.g., std::sin(x)), and convenient\n  * constructors allowing to easily write generic code working for both scalar values\n  * and arrays.\n  *\n  * This class is the base that is inherited by all array expression types.\n  *\n  * \\tparam Derived is the derived type, e.g., an array or an expression type.\n  *\n  * This class can be extended with the help of the plugin mechanism described on the page\n  * \\ref TopicCustomizing_Plugins by defining the preprocessor symbol \\c EIGEN_ARRAYBASE_PLUGIN.\n  *\n  * \\sa class MatrixBase, \\ref TopicClassHierarchy\n  */\ntemplate<typename Derived> class ArrayBase\n  : public DenseBase<Derived>\n{\n  public:\n#ifndef EIGEN_PARSED_BY_DOXYGEN\n    /** The base class for a given storage type. */\n    typedef ArrayBase StorageBaseType;\n\n    typedef ArrayBase Eigen_BaseClassForSpecializationOfGlobalMathFuncImpl;\n\n    typedef typename internal::traits<Derived>::StorageKind StorageKind;\n    typedef typename internal::traits<Derived>::Scalar Scalar;\n    typedef typename internal::packet_traits<Scalar>::type PacketScalar;\n    typedef typename NumTraits<Scalar>::Real RealScalar;\n\n    typedef DenseBase<Derived> Base;\n    using Base::RowsAtCompileTime;\n    using Base::ColsAtCompileTime;\n    using Base::SizeAtCompileTime;\n    using Base::MaxRowsAtCompileTime;\n    using Base::MaxColsAtCompileTime;\n    using Base::MaxSizeAtCompileTime;\n    using Base::IsVectorAtCompileTime;\n    using Base::Flags;\n    \n    using Base::derived;\n    using Base::const_cast_derived;\n    using Base::rows;\n    using Base::cols;\n    using Base::size;\n    using Base::coeff;\n    using Base::coeffRef;\n    using Base::lazyAssign;\n    using Base::operator-;\n    using Base::operator=;\n    using Base::operator+=;\n    using Base::operator-=;\n    using Base::operator*=;\n    using Base::operator/=;\n\n    typedef typename Base::CoeffReturnType CoeffReturnType;\n\n#endif // not EIGEN_PARSED_BY_DOXYGEN\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\n    typedef typename Base::PlainObject PlainObject;\n\n    /** \\internal Represents a matrix with all coefficients equal to one another*/\n    typedef CwiseNullaryOp<internal::scalar_constant_op<Scalar>,PlainObject> ConstantReturnType;\n#endif // not EIGEN_PARSED_BY_DOXYGEN\n\n#define EIGEN_CURRENT_STORAGE_BASE_CLASS Eigen::ArrayBase\n#define EIGEN_DOC_UNARY_ADDONS(X,Y)\n#   include \"../plugins/MatrixCwiseUnaryOps.h\"\n#   include \"../plugins/ArrayCwiseUnaryOps.h\"\n#   include \"../plugins/CommonCwiseBinaryOps.h\"\n#   include \"../plugins/MatrixCwiseBinaryOps.h\"\n#   include \"../plugins/ArrayCwiseBinaryOps.h\"\n#   ifdef EIGEN_ARRAYBASE_PLUGIN\n#     include EIGEN_ARRAYBASE_PLUGIN\n#   endif\n#undef EIGEN_CURRENT_STORAGE_BASE_CLASS\n#undef EIGEN_DOC_UNARY_ADDONS\n\n    /** Special case of the template operator=, in order to prevent the compiler\n      * from generating a default operator= (issue hit with g++ 4.1)\n      */\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Derived& operator=(const ArrayBase& other)\n    {\n      internal::call_assignment(derived(), other.derived());\n      return derived();\n    }\n    \n    /** Set all the entries to \\a value.\n      * \\sa DenseBase::setConstant(), DenseBase::fill() */\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Derived& operator=(const Scalar &value)\n    { Base::setConstant(value); return derived(); }\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Derived& operator+=(const Scalar& scalar);\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Derived& operator-=(const Scalar& scalar);\n\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Derived& operator+=(const ArrayBase<OtherDerived>& other);\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Derived& operator-=(const ArrayBase<OtherDerived>& other);\n\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Derived& operator*=(const ArrayBase<OtherDerived>& other);\n\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Derived& operator/=(const ArrayBase<OtherDerived>& other);\n\n  public:\n    EIGEN_DEVICE_FUNC\n    ArrayBase<Derived>& array() { return *this; }\n    EIGEN_DEVICE_FUNC\n    const ArrayBase<Derived>& array() const { return *this; }\n\n    /** \\returns an \\link Eigen::MatrixBase Matrix \\endlink expression of this array\n      * \\sa MatrixBase::array() */\n    EIGEN_DEVICE_FUNC\n    MatrixWrapper<Derived> matrix() { return MatrixWrapper<Derived>(derived()); }\n    EIGEN_DEVICE_FUNC\n    const MatrixWrapper<const Derived> matrix() const { return MatrixWrapper<const Derived>(derived()); }\n\n//     template<typename Dest>\n//     inline void evalTo(Dest& dst) const { dst = matrix(); }\n\n  protected:\n    EIGEN_DEFAULT_COPY_CONSTRUCTOR(ArrayBase)\n    EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(ArrayBase)\n\n  private:\n    explicit ArrayBase(Index);\n    ArrayBase(Index,Index);\n    template<typename OtherDerived> explicit ArrayBase(const ArrayBase<OtherDerived>&);\n  protected:\n    // mixing arrays and matrices is not legal\n    template<typename OtherDerived> Derived& operator+=(const MatrixBase<OtherDerived>& )\n    {EIGEN_STATIC_ASSERT(std::ptrdiff_t(sizeof(typename OtherDerived::Scalar))==-1,YOU_CANNOT_MIX_ARRAYS_AND_MATRICES); return *this;}\n    // mixing arrays and matrices is not legal\n    template<typename OtherDerived> Derived& operator-=(const MatrixBase<OtherDerived>& )\n    {EIGEN_STATIC_ASSERT(std::ptrdiff_t(sizeof(typename OtherDerived::Scalar))==-1,YOU_CANNOT_MIX_ARRAYS_AND_MATRICES); return *this;}\n};\n\n/** replaces \\c *this by \\c *this - \\a other.\n  *\n  * \\returns a reference to \\c *this\n  */\ntemplate<typename Derived>\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived &\nArrayBase<Derived>::operator-=(const ArrayBase<OtherDerived> &other)\n{\n  call_assignment(derived(), other.derived(), internal::sub_assign_op<Scalar,typename OtherDerived::Scalar>());\n  return derived();\n}\n\n/** replaces \\c *this by \\c *this + \\a other.\n  *\n  * \\returns a reference to \\c *this\n  */\ntemplate<typename Derived>\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived &\nArrayBase<Derived>::operator+=(const ArrayBase<OtherDerived>& other)\n{\n  call_assignment(derived(), other.derived(), internal::add_assign_op<Scalar,typename OtherDerived::Scalar>());\n  return derived();\n}\n\n/** replaces \\c *this by \\c *this * \\a other coefficient wise.\n  *\n  * \\returns a reference to \\c *this\n  */\ntemplate<typename Derived>\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived &\nArrayBase<Derived>::operator*=(const ArrayBase<OtherDerived>& other)\n{\n  call_assignment(derived(), other.derived(), internal::mul_assign_op<Scalar,typename OtherDerived::Scalar>());\n  return derived();\n}\n\n/** replaces \\c *this by \\c *this / \\a other coefficient wise.\n  *\n  * \\returns a reference to \\c *this\n  */\ntemplate<typename Derived>\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived &\nArrayBase<Derived>::operator/=(const ArrayBase<OtherDerived>& other)\n{\n  call_assignment(derived(), other.derived(), internal::div_assign_op<Scalar,typename OtherDerived::Scalar>());\n  return derived();\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_ARRAYBASE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/ArrayWrapper.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009-2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_ARRAYWRAPPER_H\n#define EIGEN_ARRAYWRAPPER_H\n\nnamespace Eigen { \n\n/** \\class ArrayWrapper\n  * \\ingroup Core_Module\n  *\n  * \\brief Expression of a mathematical vector or matrix as an array object\n  *\n  * This class is the return type of MatrixBase::array(), and most of the time\n  * this is the only way it is use.\n  *\n  * \\sa MatrixBase::array(), class MatrixWrapper\n  */\n\nnamespace internal {\ntemplate<typename ExpressionType>\nstruct traits<ArrayWrapper<ExpressionType> >\n  : public traits<typename remove_all<typename ExpressionType::Nested>::type >\n{\n  typedef ArrayXpr XprKind;\n  // Let's remove NestByRefBit\n  enum {\n    Flags0 = traits<typename remove_all<typename ExpressionType::Nested>::type >::Flags,\n    LvalueBitFlag = is_lvalue<ExpressionType>::value ? LvalueBit : 0,\n    Flags = (Flags0 & ~(NestByRefBit | LvalueBit)) | LvalueBitFlag\n  };\n};\n}\n\ntemplate<typename ExpressionType>\nclass ArrayWrapper : public ArrayBase<ArrayWrapper<ExpressionType> >\n{\n  public:\n    typedef ArrayBase<ArrayWrapper> Base;\n    EIGEN_DENSE_PUBLIC_INTERFACE(ArrayWrapper)\n    EIGEN_INHERIT_ASSIGNMENT_OPERATORS(ArrayWrapper)\n    typedef typename internal::remove_all<ExpressionType>::type NestedExpression;\n\n    typedef typename internal::conditional<\n                       internal::is_lvalue<ExpressionType>::value,\n                       Scalar,\n                       const Scalar\n                     >::type ScalarWithConstIfNotLvalue;\n\n    typedef typename internal::ref_selector<ExpressionType>::non_const_type NestedExpressionType;\n\n    using Base::coeffRef;\n\n    EIGEN_DEVICE_FUNC\n    explicit EIGEN_STRONG_INLINE ArrayWrapper(ExpressionType& matrix) : m_expression(matrix) {}\n\n    EIGEN_DEVICE_FUNC\n    inline Index rows() const { return m_expression.rows(); }\n    EIGEN_DEVICE_FUNC\n    inline Index cols() const { return m_expression.cols(); }\n    EIGEN_DEVICE_FUNC\n    inline Index outerStride() const { return m_expression.outerStride(); }\n    EIGEN_DEVICE_FUNC\n    inline Index innerStride() const { return m_expression.innerStride(); }\n\n    EIGEN_DEVICE_FUNC\n    inline ScalarWithConstIfNotLvalue* data() { return m_expression.data(); }\n    EIGEN_DEVICE_FUNC\n    inline const Scalar* data() const { return m_expression.data(); }\n\n    EIGEN_DEVICE_FUNC\n    inline const Scalar& coeffRef(Index rowId, Index colId) const\n    {\n      return m_expression.coeffRef(rowId, colId);\n    }\n\n    EIGEN_DEVICE_FUNC\n    inline const Scalar& coeffRef(Index index) const\n    {\n      return m_expression.coeffRef(index);\n    }\n\n    template<typename Dest>\n    EIGEN_DEVICE_FUNC\n    inline void evalTo(Dest& dst) const { dst = m_expression; }\n\n    EIGEN_DEVICE_FUNC\n    const typename internal::remove_all<NestedExpressionType>::type& \n    nestedExpression() const \n    {\n      return m_expression;\n    }\n\n    /** Forwards the resizing request to the nested expression\n      * \\sa DenseBase::resize(Index)  */\n    EIGEN_DEVICE_FUNC\n    void resize(Index newSize) { m_expression.resize(newSize); }\n    /** Forwards the resizing request to the nested expression\n      * \\sa DenseBase::resize(Index,Index)*/\n    EIGEN_DEVICE_FUNC\n    void resize(Index rows, Index cols) { m_expression.resize(rows,cols); }\n\n  protected:\n    NestedExpressionType m_expression;\n};\n\n/** \\class MatrixWrapper\n  * \\ingroup Core_Module\n  *\n  * \\brief Expression of an array as a mathematical vector or matrix\n  *\n  * This class is the return type of ArrayBase::matrix(), and most of the time\n  * this is the only way it is use.\n  *\n  * \\sa MatrixBase::matrix(), class ArrayWrapper\n  */\n\nnamespace internal {\ntemplate<typename ExpressionType>\nstruct traits<MatrixWrapper<ExpressionType> >\n : public traits<typename remove_all<typename ExpressionType::Nested>::type >\n{\n  typedef MatrixXpr XprKind;\n  // Let's remove NestByRefBit\n  enum {\n    Flags0 = traits<typename remove_all<typename ExpressionType::Nested>::type >::Flags,\n    LvalueBitFlag = is_lvalue<ExpressionType>::value ? LvalueBit : 0,\n    Flags = (Flags0 & ~(NestByRefBit | LvalueBit)) | LvalueBitFlag\n  };\n};\n}\n\ntemplate<typename ExpressionType>\nclass MatrixWrapper : public MatrixBase<MatrixWrapper<ExpressionType> >\n{\n  public:\n    typedef MatrixBase<MatrixWrapper<ExpressionType> > Base;\n    EIGEN_DENSE_PUBLIC_INTERFACE(MatrixWrapper)\n    EIGEN_INHERIT_ASSIGNMENT_OPERATORS(MatrixWrapper)\n    typedef typename internal::remove_all<ExpressionType>::type NestedExpression;\n\n    typedef typename internal::conditional<\n                       internal::is_lvalue<ExpressionType>::value,\n                       Scalar,\n                       const Scalar\n                     >::type ScalarWithConstIfNotLvalue;\n\n    typedef typename internal::ref_selector<ExpressionType>::non_const_type NestedExpressionType;\n\n    using Base::coeffRef;\n\n    EIGEN_DEVICE_FUNC\n    explicit inline MatrixWrapper(ExpressionType& matrix) : m_expression(matrix) {}\n\n    EIGEN_DEVICE_FUNC\n    inline Index rows() const { return m_expression.rows(); }\n    EIGEN_DEVICE_FUNC\n    inline Index cols() const { return m_expression.cols(); }\n    EIGEN_DEVICE_FUNC\n    inline Index outerStride() const { return m_expression.outerStride(); }\n    EIGEN_DEVICE_FUNC\n    inline Index innerStride() const { return m_expression.innerStride(); }\n\n    EIGEN_DEVICE_FUNC\n    inline ScalarWithConstIfNotLvalue* data() { return m_expression.data(); }\n    EIGEN_DEVICE_FUNC\n    inline const Scalar* data() const { return m_expression.data(); }\n\n    EIGEN_DEVICE_FUNC\n    inline const Scalar& coeffRef(Index rowId, Index colId) const\n    {\n      return m_expression.derived().coeffRef(rowId, colId);\n    }\n\n    EIGEN_DEVICE_FUNC\n    inline const Scalar& coeffRef(Index index) const\n    {\n      return m_expression.coeffRef(index);\n    }\n\n    EIGEN_DEVICE_FUNC\n    const typename internal::remove_all<NestedExpressionType>::type& \n    nestedExpression() const \n    {\n      return m_expression;\n    }\n\n    /** Forwards the resizing request to the nested expression\n      * \\sa DenseBase::resize(Index)  */\n    EIGEN_DEVICE_FUNC\n    void resize(Index newSize) { m_expression.resize(newSize); }\n    /** Forwards the resizing request to the nested expression\n      * \\sa DenseBase::resize(Index,Index)*/\n    EIGEN_DEVICE_FUNC\n    void resize(Index rows, Index cols) { m_expression.resize(rows,cols); }\n\n  protected:\n    NestedExpressionType m_expression;\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_ARRAYWRAPPER_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/Assign.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2007 Michael Olbrich <michael.olbrich@gmx.net>\n// Copyright (C) 2006-2010 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_ASSIGN_H\n#define EIGEN_ASSIGN_H\n\nnamespace Eigen {\n\ntemplate<typename Derived>\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& DenseBase<Derived>\n  ::lazyAssign(const DenseBase<OtherDerived>& other)\n{\n  enum{\n    SameType = internal::is_same<typename Derived::Scalar,typename OtherDerived::Scalar>::value\n  };\n\n  EIGEN_STATIC_ASSERT_LVALUE(Derived)\n  EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(Derived,OtherDerived)\n  EIGEN_STATIC_ASSERT(SameType,YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)\n\n  eigen_assert(rows() == other.rows() && cols() == other.cols());\n  internal::call_assignment_no_alias(derived(),other.derived());\n  \n  return derived();\n}\n\ntemplate<typename Derived>\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC\nEIGEN_STRONG_INLINE Derived& DenseBase<Derived>::operator=(const DenseBase<OtherDerived>& other)\n{\n  internal::call_assignment(derived(), other.derived());\n  return derived();\n}\n\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC\nEIGEN_STRONG_INLINE Derived& DenseBase<Derived>::operator=(const DenseBase& other)\n{\n  internal::call_assignment(derived(), other.derived());\n  return derived();\n}\n\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC\nEIGEN_STRONG_INLINE Derived& MatrixBase<Derived>::operator=(const MatrixBase& other)\n{\n  internal::call_assignment(derived(), other.derived());\n  return derived();\n}\n\ntemplate<typename Derived>\ntemplate <typename OtherDerived>\nEIGEN_DEVICE_FUNC\nEIGEN_STRONG_INLINE Derived& MatrixBase<Derived>::operator=(const DenseBase<OtherDerived>& other)\n{\n  internal::call_assignment(derived(), other.derived());\n  return derived();\n}\n\ntemplate<typename Derived>\ntemplate <typename OtherDerived>\nEIGEN_DEVICE_FUNC\nEIGEN_STRONG_INLINE Derived& MatrixBase<Derived>::operator=(const EigenBase<OtherDerived>& other)\n{\n  internal::call_assignment(derived(), other.derived());\n  return derived();\n}\n\ntemplate<typename Derived>\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC\nEIGEN_STRONG_INLINE Derived& MatrixBase<Derived>::operator=(const ReturnByValue<OtherDerived>& other)\n{\n  other.derived().evalTo(derived());\n  return derived();\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_ASSIGN_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/AssignEvaluator.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2011 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2011-2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2011-2012 Jitse Niesen <jitse@maths.leeds.ac.uk>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_ASSIGN_EVALUATOR_H\n#define EIGEN_ASSIGN_EVALUATOR_H\n\nnamespace Eigen {\n\n// This implementation is based on Assign.h\n\nnamespace internal {\n  \n/***************************************************************************\n* Part 1 : the logic deciding a strategy for traversal and unrolling       *\n***************************************************************************/\n\n// copy_using_evaluator_traits is based on assign_traits\n\ntemplate <typename DstEvaluator, typename SrcEvaluator, typename AssignFunc, int MaxPacketSize = -1>\nstruct copy_using_evaluator_traits\n{\n  typedef typename DstEvaluator::XprType Dst;\n  typedef typename Dst::Scalar DstScalar;\n  \n  enum {\n    DstFlags = DstEvaluator::Flags,\n    SrcFlags = SrcEvaluator::Flags\n  };\n  \npublic:\n  enum {\n    DstAlignment = DstEvaluator::Alignment,\n    SrcAlignment = SrcEvaluator::Alignment,\n    DstHasDirectAccess = (DstFlags & DirectAccessBit) == DirectAccessBit,\n    JointAlignment = EIGEN_PLAIN_ENUM_MIN(DstAlignment,SrcAlignment)\n  };\n\nprivate:\n  enum {\n    InnerSize = int(Dst::IsVectorAtCompileTime) ? int(Dst::SizeAtCompileTime)\n              : int(DstFlags)&RowMajorBit ? int(Dst::ColsAtCompileTime)\n              : int(Dst::RowsAtCompileTime),\n    InnerMaxSize = int(Dst::IsVectorAtCompileTime) ? int(Dst::MaxSizeAtCompileTime)\n              : int(DstFlags)&RowMajorBit ? int(Dst::MaxColsAtCompileTime)\n              : int(Dst::MaxRowsAtCompileTime),\n    RestrictedInnerSize = EIGEN_SIZE_MIN_PREFER_FIXED(InnerSize,MaxPacketSize),\n    RestrictedLinearSize = EIGEN_SIZE_MIN_PREFER_FIXED(Dst::SizeAtCompileTime,MaxPacketSize),\n    OuterStride = int(outer_stride_at_compile_time<Dst>::ret),\n    MaxSizeAtCompileTime = Dst::SizeAtCompileTime\n  };\n\n  // TODO distinguish between linear traversal and inner-traversals\n  typedef typename find_best_packet<DstScalar,RestrictedLinearSize>::type LinearPacketType;\n  typedef typename find_best_packet<DstScalar,RestrictedInnerSize>::type InnerPacketType;\n\n  enum {\n    LinearPacketSize = unpacket_traits<LinearPacketType>::size,\n    InnerPacketSize = unpacket_traits<InnerPacketType>::size\n  };\n\npublic:\n  enum {\n    LinearRequiredAlignment = unpacket_traits<LinearPacketType>::alignment,\n    InnerRequiredAlignment = unpacket_traits<InnerPacketType>::alignment\n  };\n\nprivate:\n  enum {\n    DstIsRowMajor = DstFlags&RowMajorBit,\n    SrcIsRowMajor = SrcFlags&RowMajorBit,\n    StorageOrdersAgree = (int(DstIsRowMajor) == int(SrcIsRowMajor)),\n    MightVectorize = bool(StorageOrdersAgree)\n                  && (int(DstFlags) & int(SrcFlags) & ActualPacketAccessBit)\n                  && bool(functor_traits<AssignFunc>::PacketAccess),\n    MayInnerVectorize  = MightVectorize\n                       && int(InnerSize)!=Dynamic && int(InnerSize)%int(InnerPacketSize)==0\n                       && int(OuterStride)!=Dynamic && int(OuterStride)%int(InnerPacketSize)==0\n                       && (EIGEN_UNALIGNED_VECTORIZE  || int(JointAlignment)>=int(InnerRequiredAlignment)),\n    MayLinearize = bool(StorageOrdersAgree) && (int(DstFlags) & int(SrcFlags) & LinearAccessBit),\n    MayLinearVectorize = bool(MightVectorize) && bool(MayLinearize) && bool(DstHasDirectAccess)\n                       && (EIGEN_UNALIGNED_VECTORIZE || (int(DstAlignment)>=int(LinearRequiredAlignment)) || MaxSizeAtCompileTime == Dynamic),\n      /* If the destination isn't aligned, we have to do runtime checks and we don't unroll,\n         so it's only good for large enough sizes. */\n    MaySliceVectorize  = bool(MightVectorize) && bool(DstHasDirectAccess)\n                       && (int(InnerMaxSize)==Dynamic || int(InnerMaxSize)>=(EIGEN_UNALIGNED_VECTORIZE?InnerPacketSize:(3*InnerPacketSize)))\n      /* slice vectorization can be slow, so we only want it if the slices are big, which is\n         indicated by InnerMaxSize rather than InnerSize, think of the case of a dynamic block\n         in a fixed-size matrix\n         However, with EIGEN_UNALIGNED_VECTORIZE and unrolling, slice vectorization is still worth it */\n  };\n\npublic:\n  enum {\n    Traversal = (int(MayLinearVectorize) && (LinearPacketSize>InnerPacketSize)) ? int(LinearVectorizedTraversal)\n              : int(MayInnerVectorize)   ? int(InnerVectorizedTraversal)\n              : int(MayLinearVectorize)  ? int(LinearVectorizedTraversal)\n              : int(MaySliceVectorize)   ? int(SliceVectorizedTraversal)\n              : int(MayLinearize)        ? int(LinearTraversal)\n                                         : int(DefaultTraversal),\n    Vectorized = int(Traversal) == InnerVectorizedTraversal\n              || int(Traversal) == LinearVectorizedTraversal\n              || int(Traversal) == SliceVectorizedTraversal\n  };\n\n  typedef typename conditional<int(Traversal)==LinearVectorizedTraversal, LinearPacketType, InnerPacketType>::type PacketType;\n\nprivate:\n  enum {\n    ActualPacketSize    = int(Traversal)==LinearVectorizedTraversal ? LinearPacketSize\n                        : Vectorized ? InnerPacketSize\n                        : 1,\n    UnrollingLimit      = EIGEN_UNROLLING_LIMIT * ActualPacketSize,\n    MayUnrollCompletely = int(Dst::SizeAtCompileTime) != Dynamic\n                       && int(Dst::SizeAtCompileTime) * (int(DstEvaluator::CoeffReadCost)+int(SrcEvaluator::CoeffReadCost)) <= int(UnrollingLimit),\n    MayUnrollInner      = int(InnerSize) != Dynamic\n                       && int(InnerSize) * (int(DstEvaluator::CoeffReadCost)+int(SrcEvaluator::CoeffReadCost)) <= int(UnrollingLimit)\n  };\n\npublic:\n  enum {\n    Unrolling = (int(Traversal) == int(InnerVectorizedTraversal) || int(Traversal) == int(DefaultTraversal))\n                ? (\n                    int(MayUnrollCompletely) ? int(CompleteUnrolling)\n                  : int(MayUnrollInner)      ? int(InnerUnrolling)\n                                             : int(NoUnrolling)\n                  )\n              : int(Traversal) == int(LinearVectorizedTraversal)\n                ? ( bool(MayUnrollCompletely) && ( EIGEN_UNALIGNED_VECTORIZE || (int(DstAlignment)>=int(LinearRequiredAlignment)))\n                          ? int(CompleteUnrolling)\n                          : int(NoUnrolling) )\n              : int(Traversal) == int(LinearTraversal)\n                ? ( bool(MayUnrollCompletely) ? int(CompleteUnrolling) \n                                              : int(NoUnrolling) )\n#if EIGEN_UNALIGNED_VECTORIZE\n              : int(Traversal) == int(SliceVectorizedTraversal)\n                ? ( bool(MayUnrollInner) ? int(InnerUnrolling)\n                                         : int(NoUnrolling) )\n#endif\n              : int(NoUnrolling)\n  };\n\n#ifdef EIGEN_DEBUG_ASSIGN\n  static void debug()\n  {\n    std::cerr << \"DstXpr: \" << typeid(typename DstEvaluator::XprType).name() << std::endl;\n    std::cerr << \"SrcXpr: \" << typeid(typename SrcEvaluator::XprType).name() << std::endl;\n    std::cerr.setf(std::ios::hex, std::ios::basefield);\n    std::cerr << \"DstFlags\" << \" = \" << DstFlags << \" (\" << demangle_flags(DstFlags) << \" )\" << std::endl;\n    std::cerr << \"SrcFlags\" << \" = \" << SrcFlags << \" (\" << demangle_flags(SrcFlags) << \" )\" << std::endl;\n    std::cerr.unsetf(std::ios::hex);\n    EIGEN_DEBUG_VAR(DstAlignment)\n    EIGEN_DEBUG_VAR(SrcAlignment)\n    EIGEN_DEBUG_VAR(LinearRequiredAlignment)\n    EIGEN_DEBUG_VAR(InnerRequiredAlignment)\n    EIGEN_DEBUG_VAR(JointAlignment)\n    EIGEN_DEBUG_VAR(InnerSize)\n    EIGEN_DEBUG_VAR(InnerMaxSize)\n    EIGEN_DEBUG_VAR(LinearPacketSize)\n    EIGEN_DEBUG_VAR(InnerPacketSize)\n    EIGEN_DEBUG_VAR(ActualPacketSize)\n    EIGEN_DEBUG_VAR(StorageOrdersAgree)\n    EIGEN_DEBUG_VAR(MightVectorize)\n    EIGEN_DEBUG_VAR(MayLinearize)\n    EIGEN_DEBUG_VAR(MayInnerVectorize)\n    EIGEN_DEBUG_VAR(MayLinearVectorize)\n    EIGEN_DEBUG_VAR(MaySliceVectorize)\n    std::cerr << \"Traversal\" << \" = \" << Traversal << \" (\" << demangle_traversal(Traversal) << \")\" << std::endl;\n    EIGEN_DEBUG_VAR(SrcEvaluator::CoeffReadCost)\n    EIGEN_DEBUG_VAR(DstEvaluator::CoeffReadCost)\n    EIGEN_DEBUG_VAR(Dst::SizeAtCompileTime)\n    EIGEN_DEBUG_VAR(UnrollingLimit)\n    EIGEN_DEBUG_VAR(MayUnrollCompletely)\n    EIGEN_DEBUG_VAR(MayUnrollInner)\n    std::cerr << \"Unrolling\" << \" = \" << Unrolling << \" (\" << demangle_unrolling(Unrolling) << \")\" << std::endl;\n    std::cerr << std::endl;\n  }\n#endif\n};\n\n/***************************************************************************\n* Part 2 : meta-unrollers\n***************************************************************************/\n\n/************************\n*** Default traversal ***\n************************/\n\ntemplate<typename Kernel, int Index, int Stop>\nstruct copy_using_evaluator_DefaultTraversal_CompleteUnrolling\n{\n  // FIXME: this is not very clean, perhaps this information should be provided by the kernel?\n  typedef typename Kernel::DstEvaluatorType DstEvaluatorType;\n  typedef typename DstEvaluatorType::XprType DstXprType;\n  \n  enum {\n    outer = Index / DstXprType::InnerSizeAtCompileTime,\n    inner = Index % DstXprType::InnerSizeAtCompileTime\n  };\n\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void run(Kernel &kernel)\n  {\n    kernel.assignCoeffByOuterInner(outer, inner);\n    copy_using_evaluator_DefaultTraversal_CompleteUnrolling<Kernel, Index+1, Stop>::run(kernel);\n  }\n};\n\ntemplate<typename Kernel, int Stop>\nstruct copy_using_evaluator_DefaultTraversal_CompleteUnrolling<Kernel, Stop, Stop>\n{\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void run(Kernel&) { }\n};\n\ntemplate<typename Kernel, int Index_, int Stop>\nstruct copy_using_evaluator_DefaultTraversal_InnerUnrolling\n{\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void run(Kernel &kernel, Index outer)\n  {\n    kernel.assignCoeffByOuterInner(outer, Index_);\n    copy_using_evaluator_DefaultTraversal_InnerUnrolling<Kernel, Index_+1, Stop>::run(kernel, outer);\n  }\n};\n\ntemplate<typename Kernel, int Stop>\nstruct copy_using_evaluator_DefaultTraversal_InnerUnrolling<Kernel, Stop, Stop>\n{\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void run(Kernel&, Index) { }\n};\n\n/***********************\n*** Linear traversal ***\n***********************/\n\ntemplate<typename Kernel, int Index, int Stop>\nstruct copy_using_evaluator_LinearTraversal_CompleteUnrolling\n{\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void run(Kernel& kernel)\n  {\n    kernel.assignCoeff(Index);\n    copy_using_evaluator_LinearTraversal_CompleteUnrolling<Kernel, Index+1, Stop>::run(kernel);\n  }\n};\n\ntemplate<typename Kernel, int Stop>\nstruct copy_using_evaluator_LinearTraversal_CompleteUnrolling<Kernel, Stop, Stop>\n{\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void run(Kernel&) { }\n};\n\n/**************************\n*** Inner vectorization ***\n**************************/\n\ntemplate<typename Kernel, int Index, int Stop>\nstruct copy_using_evaluator_innervec_CompleteUnrolling\n{\n  // FIXME: this is not very clean, perhaps this information should be provided by the kernel?\n  typedef typename Kernel::DstEvaluatorType DstEvaluatorType;\n  typedef typename DstEvaluatorType::XprType DstXprType;\n  typedef typename Kernel::PacketType PacketType;\n  \n  enum {\n    outer = Index / DstXprType::InnerSizeAtCompileTime,\n    inner = Index % DstXprType::InnerSizeAtCompileTime,\n    SrcAlignment = Kernel::AssignmentTraits::SrcAlignment,\n    DstAlignment = Kernel::AssignmentTraits::DstAlignment\n  };\n\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void run(Kernel &kernel)\n  {\n    kernel.template assignPacketByOuterInner<DstAlignment, SrcAlignment, PacketType>(outer, inner);\n    enum { NextIndex = Index + unpacket_traits<PacketType>::size };\n    copy_using_evaluator_innervec_CompleteUnrolling<Kernel, NextIndex, Stop>::run(kernel);\n  }\n};\n\ntemplate<typename Kernel, int Stop>\nstruct copy_using_evaluator_innervec_CompleteUnrolling<Kernel, Stop, Stop>\n{\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void run(Kernel&) { }\n};\n\ntemplate<typename Kernel, int Index_, int Stop, int SrcAlignment, int DstAlignment>\nstruct copy_using_evaluator_innervec_InnerUnrolling\n{\n  typedef typename Kernel::PacketType PacketType;\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void run(Kernel &kernel, Index outer)\n  {\n    kernel.template assignPacketByOuterInner<DstAlignment, SrcAlignment, PacketType>(outer, Index_);\n    enum { NextIndex = Index_ + unpacket_traits<PacketType>::size };\n    copy_using_evaluator_innervec_InnerUnrolling<Kernel, NextIndex, Stop, SrcAlignment, DstAlignment>::run(kernel, outer);\n  }\n};\n\ntemplate<typename Kernel, int Stop, int SrcAlignment, int DstAlignment>\nstruct copy_using_evaluator_innervec_InnerUnrolling<Kernel, Stop, Stop, SrcAlignment, DstAlignment>\n{\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void run(Kernel &, Index) { }\n};\n\n/***************************************************************************\n* Part 3 : implementation of all cases\n***************************************************************************/\n\n// dense_assignment_loop is based on assign_impl\n\ntemplate<typename Kernel,\n         int Traversal = Kernel::AssignmentTraits::Traversal,\n         int Unrolling = Kernel::AssignmentTraits::Unrolling>\nstruct dense_assignment_loop;\n\n/************************\n*** Default traversal ***\n************************/\n\ntemplate<typename Kernel>\nstruct dense_assignment_loop<Kernel, DefaultTraversal, NoUnrolling>\n{\n  EIGEN_DEVICE_FUNC static void EIGEN_STRONG_INLINE run(Kernel &kernel)\n  {\n    for(Index outer = 0; outer < kernel.outerSize(); ++outer) {\n      for(Index inner = 0; inner < kernel.innerSize(); ++inner) {\n        kernel.assignCoeffByOuterInner(outer, inner);\n      }\n    }\n  }\n};\n\ntemplate<typename Kernel>\nstruct dense_assignment_loop<Kernel, DefaultTraversal, CompleteUnrolling>\n{\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void run(Kernel &kernel)\n  {\n    typedef typename Kernel::DstEvaluatorType::XprType DstXprType;\n    copy_using_evaluator_DefaultTraversal_CompleteUnrolling<Kernel, 0, DstXprType::SizeAtCompileTime>::run(kernel);\n  }\n};\n\ntemplate<typename Kernel>\nstruct dense_assignment_loop<Kernel, DefaultTraversal, InnerUnrolling>\n{\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void run(Kernel &kernel)\n  {\n    typedef typename Kernel::DstEvaluatorType::XprType DstXprType;\n\n    const Index outerSize = kernel.outerSize();\n    for(Index outer = 0; outer < outerSize; ++outer)\n      copy_using_evaluator_DefaultTraversal_InnerUnrolling<Kernel, 0, DstXprType::InnerSizeAtCompileTime>::run(kernel, outer);\n  }\n};\n\n/***************************\n*** Linear vectorization ***\n***************************/\n\n\n// The goal of unaligned_dense_assignment_loop is simply to factorize the handling\n// of the non vectorizable beginning and ending parts\n\ntemplate <bool IsAligned = false>\nstruct unaligned_dense_assignment_loop\n{\n  // if IsAligned = true, then do nothing\n  template <typename Kernel>\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void run(Kernel&, Index, Index) {}\n};\n\ntemplate <>\nstruct unaligned_dense_assignment_loop<false>\n{\n  // MSVC must not inline this functions. If it does, it fails to optimize the\n  // packet access path.\n  // FIXME check which version exhibits this issue\n#if EIGEN_COMP_MSVC\n  template <typename Kernel>\n  static EIGEN_DONT_INLINE void run(Kernel &kernel,\n                                    Index start,\n                                    Index end)\n#else\n  template <typename Kernel>\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void run(Kernel &kernel,\n                                      Index start,\n                                      Index end)\n#endif\n  {\n    for (Index index = start; index < end; ++index)\n      kernel.assignCoeff(index);\n  }\n};\n\ntemplate<typename Kernel>\nstruct dense_assignment_loop<Kernel, LinearVectorizedTraversal, NoUnrolling>\n{\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void run(Kernel &kernel)\n  {\n    const Index size = kernel.size();\n    typedef typename Kernel::Scalar Scalar;\n    typedef typename Kernel::PacketType PacketType;\n    enum {\n      requestedAlignment = Kernel::AssignmentTraits::LinearRequiredAlignment,\n      packetSize = unpacket_traits<PacketType>::size,\n      dstIsAligned = int(Kernel::AssignmentTraits::DstAlignment)>=int(requestedAlignment),\n      dstAlignment = packet_traits<Scalar>::AlignedOnScalar ? int(requestedAlignment)\n                                                            : int(Kernel::AssignmentTraits::DstAlignment),\n      srcAlignment = Kernel::AssignmentTraits::JointAlignment\n    };\n    const Index alignedStart = dstIsAligned ? 0 : internal::first_aligned<requestedAlignment>(kernel.dstDataPtr(), size);\n    const Index alignedEnd = alignedStart + ((size-alignedStart)/packetSize)*packetSize;\n\n    unaligned_dense_assignment_loop<dstIsAligned!=0>::run(kernel, 0, alignedStart);\n\n    for(Index index = alignedStart; index < alignedEnd; index += packetSize)\n      kernel.template assignPacket<dstAlignment, srcAlignment, PacketType>(index);\n\n    unaligned_dense_assignment_loop<>::run(kernel, alignedEnd, size);\n  }\n};\n\ntemplate<typename Kernel>\nstruct dense_assignment_loop<Kernel, LinearVectorizedTraversal, CompleteUnrolling>\n{\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void run(Kernel &kernel)\n  {\n    typedef typename Kernel::DstEvaluatorType::XprType DstXprType;\n    typedef typename Kernel::PacketType PacketType;\n    \n    enum { size = DstXprType::SizeAtCompileTime,\n           packetSize =unpacket_traits<PacketType>::size,\n           alignedSize = (size/packetSize)*packetSize };\n\n    copy_using_evaluator_innervec_CompleteUnrolling<Kernel, 0, alignedSize>::run(kernel);\n    copy_using_evaluator_DefaultTraversal_CompleteUnrolling<Kernel, alignedSize, size>::run(kernel);\n  }\n};\n\n/**************************\n*** Inner vectorization ***\n**************************/\n\ntemplate<typename Kernel>\nstruct dense_assignment_loop<Kernel, InnerVectorizedTraversal, NoUnrolling>\n{\n  typedef typename Kernel::PacketType PacketType;\n  enum {\n    SrcAlignment = Kernel::AssignmentTraits::SrcAlignment,\n    DstAlignment = Kernel::AssignmentTraits::DstAlignment\n  };\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void run(Kernel &kernel)\n  {\n    const Index innerSize = kernel.innerSize();\n    const Index outerSize = kernel.outerSize();\n    const Index packetSize = unpacket_traits<PacketType>::size;\n    for(Index outer = 0; outer < outerSize; ++outer)\n      for(Index inner = 0; inner < innerSize; inner+=packetSize)\n        kernel.template assignPacketByOuterInner<DstAlignment, SrcAlignment, PacketType>(outer, inner);\n  }\n};\n\ntemplate<typename Kernel>\nstruct dense_assignment_loop<Kernel, InnerVectorizedTraversal, CompleteUnrolling>\n{\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void run(Kernel &kernel)\n  {\n    typedef typename Kernel::DstEvaluatorType::XprType DstXprType;\n    copy_using_evaluator_innervec_CompleteUnrolling<Kernel, 0, DstXprType::SizeAtCompileTime>::run(kernel);\n  }\n};\n\ntemplate<typename Kernel>\nstruct dense_assignment_loop<Kernel, InnerVectorizedTraversal, InnerUnrolling>\n{\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void run(Kernel &kernel)\n  {\n    typedef typename Kernel::DstEvaluatorType::XprType DstXprType;\n    typedef typename Kernel::AssignmentTraits Traits;\n    const Index outerSize = kernel.outerSize();\n    for(Index outer = 0; outer < outerSize; ++outer)\n      copy_using_evaluator_innervec_InnerUnrolling<Kernel, 0, DstXprType::InnerSizeAtCompileTime,\n                                                   Traits::SrcAlignment, Traits::DstAlignment>::run(kernel, outer);\n  }\n};\n\n/***********************\n*** Linear traversal ***\n***********************/\n\ntemplate<typename Kernel>\nstruct dense_assignment_loop<Kernel, LinearTraversal, NoUnrolling>\n{\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void run(Kernel &kernel)\n  {\n    const Index size = kernel.size();\n    for(Index i = 0; i < size; ++i)\n      kernel.assignCoeff(i);\n  }\n};\n\ntemplate<typename Kernel>\nstruct dense_assignment_loop<Kernel, LinearTraversal, CompleteUnrolling>\n{\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void run(Kernel &kernel)\n  {\n    typedef typename Kernel::DstEvaluatorType::XprType DstXprType;\n    copy_using_evaluator_LinearTraversal_CompleteUnrolling<Kernel, 0, DstXprType::SizeAtCompileTime>::run(kernel);\n  }\n};\n\n/**************************\n*** Slice vectorization ***\n***************************/\n\ntemplate<typename Kernel>\nstruct dense_assignment_loop<Kernel, SliceVectorizedTraversal, NoUnrolling>\n{\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void run(Kernel &kernel)\n  {\n    typedef typename Kernel::Scalar Scalar;\n    typedef typename Kernel::PacketType PacketType;\n    enum {\n      packetSize = unpacket_traits<PacketType>::size,\n      requestedAlignment = int(Kernel::AssignmentTraits::InnerRequiredAlignment),\n      alignable = packet_traits<Scalar>::AlignedOnScalar || int(Kernel::AssignmentTraits::DstAlignment)>=sizeof(Scalar),\n      dstIsAligned = int(Kernel::AssignmentTraits::DstAlignment)>=int(requestedAlignment),\n      dstAlignment = alignable ? int(requestedAlignment)\n                               : int(Kernel::AssignmentTraits::DstAlignment)\n    };\n    const Scalar *dst_ptr = kernel.dstDataPtr();\n    if((!bool(dstIsAligned)) && (UIntPtr(dst_ptr) % sizeof(Scalar))>0)\n    {\n      // the pointer is not aligned-on scalar, so alignment is not possible\n      return dense_assignment_loop<Kernel,DefaultTraversal,NoUnrolling>::run(kernel);\n    }\n    const Index packetAlignedMask = packetSize - 1;\n    const Index innerSize = kernel.innerSize();\n    const Index outerSize = kernel.outerSize();\n    const Index alignedStep = alignable ? (packetSize - kernel.outerStride() % packetSize) & packetAlignedMask : 0;\n    Index alignedStart = ((!alignable) || bool(dstIsAligned)) ? 0 : internal::first_aligned<requestedAlignment>(dst_ptr, innerSize);\n\n    for(Index outer = 0; outer < outerSize; ++outer)\n    {\n      const Index alignedEnd = alignedStart + ((innerSize-alignedStart) & ~packetAlignedMask);\n      // do the non-vectorizable part of the assignment\n      for(Index inner = 0; inner<alignedStart ; ++inner)\n        kernel.assignCoeffByOuterInner(outer, inner);\n\n      // do the vectorizable part of the assignment\n      for(Index inner = alignedStart; inner<alignedEnd; inner+=packetSize)\n        kernel.template assignPacketByOuterInner<dstAlignment, Unaligned, PacketType>(outer, inner);\n\n      // do the non-vectorizable part of the assignment\n      for(Index inner = alignedEnd; inner<innerSize ; ++inner)\n        kernel.assignCoeffByOuterInner(outer, inner);\n\n      alignedStart = numext::mini((alignedStart+alignedStep)%packetSize, innerSize);\n    }\n  }\n};\n\n#if EIGEN_UNALIGNED_VECTORIZE\ntemplate<typename Kernel>\nstruct dense_assignment_loop<Kernel, SliceVectorizedTraversal, InnerUnrolling>\n{\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void run(Kernel &kernel)\n  {\n    typedef typename Kernel::DstEvaluatorType::XprType DstXprType;\n    typedef typename Kernel::PacketType PacketType;\n\n    enum { size = DstXprType::InnerSizeAtCompileTime,\n           packetSize =unpacket_traits<PacketType>::size,\n           vectorizableSize = (size/packetSize)*packetSize };\n\n    for(Index outer = 0; outer < kernel.outerSize(); ++outer)\n    {\n      copy_using_evaluator_innervec_InnerUnrolling<Kernel, 0, vectorizableSize, 0, 0>::run(kernel, outer);\n      copy_using_evaluator_DefaultTraversal_InnerUnrolling<Kernel, vectorizableSize, size>::run(kernel, outer);\n    }\n  }\n};\n#endif\n\n\n/***************************************************************************\n* Part 4 : Generic dense assignment kernel\n***************************************************************************/\n\n// This class generalize the assignment of a coefficient (or packet) from one dense evaluator\n// to another dense writable evaluator.\n// It is parametrized by the two evaluators, and the actual assignment functor.\n// This abstraction level permits to keep the evaluation loops as simple and as generic as possible.\n// One can customize the assignment using this generic dense_assignment_kernel with different\n// functors, or by completely overloading it, by-passing a functor.\ntemplate<typename DstEvaluatorTypeT, typename SrcEvaluatorTypeT, typename Functor, int Version = Specialized>\nclass generic_dense_assignment_kernel\n{\nprotected:\n  typedef typename DstEvaluatorTypeT::XprType DstXprType;\n  typedef typename SrcEvaluatorTypeT::XprType SrcXprType;\npublic:\n  \n  typedef DstEvaluatorTypeT DstEvaluatorType;\n  typedef SrcEvaluatorTypeT SrcEvaluatorType;\n  typedef typename DstEvaluatorType::Scalar Scalar;\n  typedef copy_using_evaluator_traits<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor> AssignmentTraits;\n  typedef typename AssignmentTraits::PacketType PacketType;\n  \n  \n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  generic_dense_assignment_kernel(DstEvaluatorType &dst, const SrcEvaluatorType &src, const Functor &func, DstXprType& dstExpr)\n    : m_dst(dst), m_src(src), m_functor(func), m_dstExpr(dstExpr)\n  {\n    #ifdef EIGEN_DEBUG_ASSIGN\n    AssignmentTraits::debug();\n    #endif\n  }\n  \n  EIGEN_DEVICE_FUNC Index size() const        { return m_dstExpr.size(); }\n  EIGEN_DEVICE_FUNC Index innerSize() const   { return m_dstExpr.innerSize(); }\n  EIGEN_DEVICE_FUNC Index outerSize() const   { return m_dstExpr.outerSize(); }\n  EIGEN_DEVICE_FUNC Index rows() const        { return m_dstExpr.rows(); }\n  EIGEN_DEVICE_FUNC Index cols() const        { return m_dstExpr.cols(); }\n  EIGEN_DEVICE_FUNC Index outerStride() const { return m_dstExpr.outerStride(); }\n  \n  EIGEN_DEVICE_FUNC DstEvaluatorType& dstEvaluator() { return m_dst; }\n  EIGEN_DEVICE_FUNC const SrcEvaluatorType& srcEvaluator() const { return m_src; }\n  \n  /// Assign src(row,col) to dst(row,col) through the assignment functor.\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void assignCoeff(Index row, Index col)\n  {\n    m_functor.assignCoeff(m_dst.coeffRef(row,col), m_src.coeff(row,col));\n  }\n  \n  /// \\sa assignCoeff(Index,Index)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void assignCoeff(Index index)\n  {\n    m_functor.assignCoeff(m_dst.coeffRef(index), m_src.coeff(index));\n  }\n  \n  /// \\sa assignCoeff(Index,Index)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void assignCoeffByOuterInner(Index outer, Index inner)\n  {\n    Index row = rowIndexByOuterInner(outer, inner); \n    Index col = colIndexByOuterInner(outer, inner); \n    assignCoeff(row, col);\n  }\n  \n  \n  template<int StoreMode, int LoadMode, typename PacketType>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void assignPacket(Index row, Index col)\n  {\n    m_functor.template assignPacket<StoreMode>(&m_dst.coeffRef(row,col), m_src.template packet<LoadMode,PacketType>(row,col));\n  }\n  \n  template<int StoreMode, int LoadMode, typename PacketType>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void assignPacket(Index index)\n  {\n    m_functor.template assignPacket<StoreMode>(&m_dst.coeffRef(index), m_src.template packet<LoadMode,PacketType>(index));\n  }\n  \n  template<int StoreMode, int LoadMode, typename PacketType>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void assignPacketByOuterInner(Index outer, Index inner)\n  {\n    Index row = rowIndexByOuterInner(outer, inner); \n    Index col = colIndexByOuterInner(outer, inner);\n    assignPacket<StoreMode,LoadMode,PacketType>(row, col);\n  }\n  \n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Index rowIndexByOuterInner(Index outer, Index inner)\n  {\n    typedef typename DstEvaluatorType::ExpressionTraits Traits;\n    return int(Traits::RowsAtCompileTime) == 1 ? 0\n      : int(Traits::ColsAtCompileTime) == 1 ? inner\n      : int(DstEvaluatorType::Flags)&RowMajorBit ? outer\n      : inner;\n  }\n\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Index colIndexByOuterInner(Index outer, Index inner)\n  {\n    typedef typename DstEvaluatorType::ExpressionTraits Traits;\n    return int(Traits::ColsAtCompileTime) == 1 ? 0\n      : int(Traits::RowsAtCompileTime) == 1 ? inner\n      : int(DstEvaluatorType::Flags)&RowMajorBit ? inner\n      : outer;\n  }\n\n  EIGEN_DEVICE_FUNC const Scalar* dstDataPtr() const\n  {\n    return m_dstExpr.data();\n  }\n  \nprotected:\n  DstEvaluatorType& m_dst;\n  const SrcEvaluatorType& m_src;\n  const Functor &m_functor;\n  // TODO find a way to avoid the needs of the original expression\n  DstXprType& m_dstExpr;\n};\n\n// Special kernel used when computing small products whose operands have dynamic dimensions.  It ensures that the\n// PacketSize used is no larger than 4, thereby increasing the chance that vectorized instructions will be used\n// when computing the product.\n\ntemplate<typename DstEvaluatorTypeT, typename SrcEvaluatorTypeT, typename Functor>\nclass restricted_packet_dense_assignment_kernel : public generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, BuiltIn>\n{\nprotected:\n  typedef generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, BuiltIn> Base;\n public:\n    typedef typename Base::Scalar Scalar;\n    typedef typename Base::DstXprType DstXprType;\n    typedef copy_using_evaluator_traits<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, 4> AssignmentTraits;\n    typedef typename AssignmentTraits::PacketType PacketType;\n    \n    EIGEN_DEVICE_FUNC restricted_packet_dense_assignment_kernel(DstEvaluatorTypeT &dst, const SrcEvaluatorTypeT &src, const Functor &func, DstXprType& dstExpr)\n    : Base(dst, src, func, dstExpr)\n  {\n  }\n };\n \n/***************************************************************************\n* Part 5 : Entry point for dense rectangular assignment\n***************************************************************************/\n\ntemplate<typename DstXprType,typename SrcXprType, typename Functor>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nvoid resize_if_allowed(DstXprType &dst, const SrcXprType& src, const Functor &/*func*/)\n{\n  EIGEN_ONLY_USED_FOR_DEBUG(dst);\n  EIGEN_ONLY_USED_FOR_DEBUG(src);\n  eigen_assert(dst.rows() == src.rows() && dst.cols() == src.cols());\n}\n\ntemplate<typename DstXprType,typename SrcXprType, typename T1, typename T2>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nvoid resize_if_allowed(DstXprType &dst, const SrcXprType& src, const internal::assign_op<T1,T2> &/*func*/)\n{\n  Index dstRows = src.rows();\n  Index dstCols = src.cols();\n  if(((dst.rows()!=dstRows) || (dst.cols()!=dstCols)))\n    dst.resize(dstRows, dstCols);\n  eigen_assert(dst.rows() == dstRows && dst.cols() == dstCols);\n}\n\ntemplate<typename DstXprType, typename SrcXprType, typename Functor>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void call_dense_assignment_loop(DstXprType& dst, const SrcXprType& src, const Functor &func)\n{\n  typedef evaluator<DstXprType> DstEvaluatorType;\n  typedef evaluator<SrcXprType> SrcEvaluatorType;\n\n  SrcEvaluatorType srcEvaluator(src);\n\n  // NOTE To properly handle A = (A*A.transpose())/s with A rectangular,\n  // we need to resize the destination after the source evaluator has been created.\n  resize_if_allowed(dst, src, func);\n\n  DstEvaluatorType dstEvaluator(dst);\n    \n  typedef generic_dense_assignment_kernel<DstEvaluatorType,SrcEvaluatorType,Functor> Kernel;\n  Kernel kernel(dstEvaluator, srcEvaluator, func, dst.const_cast_derived());\n\n  dense_assignment_loop<Kernel>::run(kernel);\n}\n\ntemplate<typename DstXprType, typename SrcXprType>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void call_dense_assignment_loop(DstXprType& dst, const SrcXprType& src)\n{\n  call_dense_assignment_loop(dst, src, internal::assign_op<typename DstXprType::Scalar,typename SrcXprType::Scalar>());\n}\n\n/***************************************************************************\n* Part 6 : Generic assignment\n***************************************************************************/\n\n// Based on the respective shapes of the destination and source,\n// the class AssignmentKind determine the kind of assignment mechanism.\n// AssignmentKind must define a Kind typedef.\ntemplate<typename DstShape, typename SrcShape> struct AssignmentKind;\n\n// Assignment kind defined in this file:\nstruct Dense2Dense {};\nstruct EigenBase2EigenBase {};\n\ntemplate<typename,typename> struct AssignmentKind { typedef EigenBase2EigenBase Kind; };\ntemplate<> struct AssignmentKind<DenseShape,DenseShape> { typedef Dense2Dense Kind; };\n    \n// This is the main assignment class\ntemplate< typename DstXprType, typename SrcXprType, typename Functor,\n          typename Kind = typename AssignmentKind< typename evaluator_traits<DstXprType>::Shape , typename evaluator_traits<SrcXprType>::Shape >::Kind,\n          typename EnableIf = void>\nstruct Assignment;\n\n\n// The only purpose of this call_assignment() function is to deal with noalias() / \"assume-aliasing\" and automatic transposition.\n// Indeed, I (Gael) think that this concept of \"assume-aliasing\" was a mistake, and it makes thing quite complicated.\n// So this intermediate function removes everything related to \"assume-aliasing\" such that Assignment\n// does not has to bother about these annoying details.\n\ntemplate<typename Dst, typename Src>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nvoid call_assignment(Dst& dst, const Src& src)\n{\n  call_assignment(dst, src, internal::assign_op<typename Dst::Scalar,typename Src::Scalar>());\n}\ntemplate<typename Dst, typename Src>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nvoid call_assignment(const Dst& dst, const Src& src)\n{\n  call_assignment(dst, src, internal::assign_op<typename Dst::Scalar,typename Src::Scalar>());\n}\n                     \n// Deal with \"assume-aliasing\"\ntemplate<typename Dst, typename Src, typename Func>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nvoid call_assignment(Dst& dst, const Src& src, const Func& func, typename enable_if< evaluator_assume_aliasing<Src>::value, void*>::type = 0)\n{\n  typename plain_matrix_type<Src>::type tmp(src);\n  call_assignment_no_alias(dst, tmp, func);\n}\n\ntemplate<typename Dst, typename Src, typename Func>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nvoid call_assignment(Dst& dst, const Src& src, const Func& func, typename enable_if<!evaluator_assume_aliasing<Src>::value, void*>::type = 0)\n{\n  call_assignment_no_alias(dst, src, func);\n}\n\n// by-pass \"assume-aliasing\"\n// When there is no aliasing, we require that 'dst' has been properly resized\ntemplate<typename Dst, template <typename> class StorageBase, typename Src, typename Func>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nvoid call_assignment(NoAlias<Dst,StorageBase>& dst, const Src& src, const Func& func)\n{\n  call_assignment_no_alias(dst.expression(), src, func);\n}\n\n\ntemplate<typename Dst, typename Src, typename Func>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nvoid call_assignment_no_alias(Dst& dst, const Src& src, const Func& func)\n{\n  enum {\n    NeedToTranspose = (    (int(Dst::RowsAtCompileTime) == 1 && int(Src::ColsAtCompileTime) == 1)\n                        || (int(Dst::ColsAtCompileTime) == 1 && int(Src::RowsAtCompileTime) == 1)\n                      ) && int(Dst::SizeAtCompileTime) != 1\n  };\n\n  typedef typename internal::conditional<NeedToTranspose, Transpose<Dst>, Dst>::type ActualDstTypeCleaned;\n  typedef typename internal::conditional<NeedToTranspose, Transpose<Dst>, Dst&>::type ActualDstType;\n  ActualDstType actualDst(dst);\n  \n  // TODO check whether this is the right place to perform these checks:\n  EIGEN_STATIC_ASSERT_LVALUE(Dst)\n  EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(ActualDstTypeCleaned,Src)\n  EIGEN_CHECK_BINARY_COMPATIBILIY(Func,typename ActualDstTypeCleaned::Scalar,typename Src::Scalar);\n  \n  Assignment<ActualDstTypeCleaned,Src,Func>::run(actualDst, src, func);\n}\n\ntemplate<typename Dst, typename Src, typename Func>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nvoid call_restricted_packet_assignment_no_alias(Dst& dst, const Src& src, const Func& func)\n{\n    typedef evaluator<Dst> DstEvaluatorType;\n    typedef evaluator<Src> SrcEvaluatorType;\n    typedef restricted_packet_dense_assignment_kernel<DstEvaluatorType,SrcEvaluatorType,Func> Kernel;\n\n    EIGEN_STATIC_ASSERT_LVALUE(Dst)\n    EIGEN_CHECK_BINARY_COMPATIBILIY(Func,typename Dst::Scalar,typename Src::Scalar);\n\n    SrcEvaluatorType srcEvaluator(src);\n    resize_if_allowed(dst, src, func);\n    \n    DstEvaluatorType dstEvaluator(dst);\n    Kernel kernel(dstEvaluator, srcEvaluator, func, dst.const_cast_derived());\n\n    dense_assignment_loop<Kernel>::run(kernel);\n}\n\ntemplate<typename Dst, typename Src>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nvoid call_assignment_no_alias(Dst& dst, const Src& src)\n{\n  call_assignment_no_alias(dst, src, internal::assign_op<typename Dst::Scalar,typename Src::Scalar>());\n}\n\ntemplate<typename Dst, typename Src, typename Func>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nvoid call_assignment_no_alias_no_transpose(Dst& dst, const Src& src, const Func& func)\n{\n  // TODO check whether this is the right place to perform these checks:\n  EIGEN_STATIC_ASSERT_LVALUE(Dst)\n  EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(Dst,Src)\n  EIGEN_CHECK_BINARY_COMPATIBILIY(Func,typename Dst::Scalar,typename Src::Scalar);\n\n  Assignment<Dst,Src,Func>::run(dst, src, func);\n}\ntemplate<typename Dst, typename Src>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nvoid call_assignment_no_alias_no_transpose(Dst& dst, const Src& src)\n{\n  call_assignment_no_alias_no_transpose(dst, src, internal::assign_op<typename Dst::Scalar,typename Src::Scalar>());\n}\n\n// forward declaration\ntemplate<typename Dst, typename Src> void check_for_aliasing(const Dst &dst, const Src &src);\n\n// Generic Dense to Dense assignment\n// Note that the last template argument \"Weak\" is needed to make it possible to perform\n// both partial specialization+SFINAE without ambiguous specialization\ntemplate< typename DstXprType, typename SrcXprType, typename Functor, typename Weak>\nstruct Assignment<DstXprType, SrcXprType, Functor, Dense2Dense, Weak>\n{\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE void run(DstXprType &dst, const SrcXprType &src, const Functor &func)\n  {\n#ifndef EIGEN_NO_DEBUG\n    internal::check_for_aliasing(dst, src);\n#endif\n    \n    call_dense_assignment_loop(dst, src, func);\n  }\n};\n\n// Generic assignment through evalTo.\n// TODO: not sure we have to keep that one, but it helps porting current code to new evaluator mechanism.\n// Note that the last template argument \"Weak\" is needed to make it possible to perform\n// both partial specialization+SFINAE without ambiguous specialization\ntemplate< typename DstXprType, typename SrcXprType, typename Functor, typename Weak>\nstruct Assignment<DstXprType, SrcXprType, Functor, EigenBase2EigenBase, Weak>\n{\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op<typename DstXprType::Scalar,typename SrcXprType::Scalar> &/*func*/)\n  {\n    Index dstRows = src.rows();\n    Index dstCols = src.cols();\n    if((dst.rows()!=dstRows) || (dst.cols()!=dstCols))\n      dst.resize(dstRows, dstCols);\n\n    eigen_assert(dst.rows() == src.rows() && dst.cols() == src.cols());\n    src.evalTo(dst);\n  }\n\n  // NOTE The following two functions are templated to avoid their instantiation if not needed\n  //      This is needed because some expressions supports evalTo only and/or have 'void' as scalar type.\n  template<typename SrcScalarType>\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE void run(DstXprType &dst, const SrcXprType &src, const internal::add_assign_op<typename DstXprType::Scalar,SrcScalarType> &/*func*/)\n  {\n    Index dstRows = src.rows();\n    Index dstCols = src.cols();\n    if((dst.rows()!=dstRows) || (dst.cols()!=dstCols))\n      dst.resize(dstRows, dstCols);\n\n    eigen_assert(dst.rows() == src.rows() && dst.cols() == src.cols());\n    src.addTo(dst);\n  }\n\n  template<typename SrcScalarType>\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE void run(DstXprType &dst, const SrcXprType &src, const internal::sub_assign_op<typename DstXprType::Scalar,SrcScalarType> &/*func*/)\n  {\n    Index dstRows = src.rows();\n    Index dstCols = src.cols();\n    if((dst.rows()!=dstRows) || (dst.cols()!=dstCols))\n      dst.resize(dstRows, dstCols);\n\n    eigen_assert(dst.rows() == src.rows() && dst.cols() == src.cols());\n    src.subTo(dst);\n  }\n};\n\n} // namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_ASSIGN_EVALUATOR_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/Assign_MKL.h",
    "content": "/*\n Copyright (c) 2011, Intel Corporation. All rights reserved.\n Copyright (C) 2015 Gael Guennebaud <gael.guennebaud@inria.fr>\n \n Redistribution and use in source and binary forms, with or without modification,\n are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n   list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n * Neither the name of Intel Corporation nor the names of its contributors may\n   be used to endorse or promote products derived from this software without\n   specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\n ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n ********************************************************************************\n *   Content : Eigen bindings to Intel(R) MKL\n *   MKL VML support for coefficient-wise unary Eigen expressions like a=b.sin()\n ********************************************************************************\n*/\n\n#ifndef EIGEN_ASSIGN_VML_H\n#define EIGEN_ASSIGN_VML_H\n\nnamespace Eigen { \n\nnamespace internal {\n\ntemplate<typename Dst, typename Src>\nclass vml_assign_traits\n{\n  private:\n    enum {\n      DstHasDirectAccess = Dst::Flags & DirectAccessBit,\n      SrcHasDirectAccess = Src::Flags & DirectAccessBit,\n      StorageOrdersAgree = (int(Dst::IsRowMajor) == int(Src::IsRowMajor)),\n      InnerSize = int(Dst::IsVectorAtCompileTime) ? int(Dst::SizeAtCompileTime)\n                : int(Dst::Flags)&RowMajorBit ? int(Dst::ColsAtCompileTime)\n                : int(Dst::RowsAtCompileTime),\n      InnerMaxSize  = int(Dst::IsVectorAtCompileTime) ? int(Dst::MaxSizeAtCompileTime)\n                    : int(Dst::Flags)&RowMajorBit ? int(Dst::MaxColsAtCompileTime)\n                    : int(Dst::MaxRowsAtCompileTime),\n      MaxSizeAtCompileTime = Dst::SizeAtCompileTime,\n\n      MightEnableVml = StorageOrdersAgree && DstHasDirectAccess && SrcHasDirectAccess && Src::InnerStrideAtCompileTime==1 && Dst::InnerStrideAtCompileTime==1,\n      MightLinearize = MightEnableVml && (int(Dst::Flags) & int(Src::Flags) & LinearAccessBit),\n      VmlSize = MightLinearize ? MaxSizeAtCompileTime : InnerMaxSize,\n      LargeEnough = VmlSize==Dynamic || VmlSize>=EIGEN_MKL_VML_THRESHOLD\n    };\n  public:\n    enum {\n      EnableVml = MightEnableVml && LargeEnough,\n      Traversal = MightLinearize ? LinearTraversal : DefaultTraversal\n    };\n};\n\n#define EIGEN_PP_EXPAND(ARG) ARG\n#if !defined (EIGEN_FAST_MATH) || (EIGEN_FAST_MATH != 1)\n#define EIGEN_VMLMODE_EXPAND_xLA , VML_HA\n#else\n#define EIGEN_VMLMODE_EXPAND_xLA , VML_LA\n#endif\n\n#define EIGEN_VMLMODE_EXPAND_x_\n\n#define EIGEN_VMLMODE_PREFIX_xLA vm\n#define EIGEN_VMLMODE_PREFIX_x_  v\n#define EIGEN_VMLMODE_PREFIX(VMLMODE) EIGEN_CAT(EIGEN_VMLMODE_PREFIX_x,VMLMODE)\n\n#define EIGEN_MKL_VML_DECLARE_UNARY_CALL(EIGENOP, VMLOP, EIGENTYPE, VMLTYPE, VMLMODE)                                           \\\n  template< typename DstXprType, typename SrcXprNested>                                                                         \\\n  struct Assignment<DstXprType, CwiseUnaryOp<scalar_##EIGENOP##_op<EIGENTYPE>, SrcXprNested>, assign_op<EIGENTYPE,EIGENTYPE>,   \\\n                   Dense2Dense, typename enable_if<vml_assign_traits<DstXprType,SrcXprNested>::EnableVml>::type> {              \\\n    typedef CwiseUnaryOp<scalar_##EIGENOP##_op<EIGENTYPE>, SrcXprNested> SrcXprType;                                            \\\n    static void run(DstXprType &dst, const SrcXprType &src, const assign_op<EIGENTYPE,EIGENTYPE> &func) {                       \\\n      resize_if_allowed(dst, src, func);                                                                                        \\\n      eigen_assert(dst.rows() == src.rows() && dst.cols() == src.cols());                                                       \\\n      if(vml_assign_traits<DstXprType,SrcXprNested>::Traversal==LinearTraversal) {                                              \\\n        VMLOP(dst.size(), (const VMLTYPE*)src.nestedExpression().data(),                                                        \\\n              (VMLTYPE*)dst.data() EIGEN_PP_EXPAND(EIGEN_VMLMODE_EXPAND_x##VMLMODE) );                                           \\\n      } else {                                                                                                                  \\\n        const Index outerSize = dst.outerSize();                                                                                \\\n        for(Index outer = 0; outer < outerSize; ++outer) {                                                                      \\\n          const EIGENTYPE *src_ptr = src.IsRowMajor ? &(src.nestedExpression().coeffRef(outer,0)) :                             \\\n                                                      &(src.nestedExpression().coeffRef(0, outer));                             \\\n          EIGENTYPE *dst_ptr = dst.IsRowMajor ? &(dst.coeffRef(outer,0)) : &(dst.coeffRef(0, outer));                           \\\n          VMLOP( dst.innerSize(), (const VMLTYPE*)src_ptr,                                                                      \\\n                (VMLTYPE*)dst_ptr EIGEN_PP_EXPAND(EIGEN_VMLMODE_EXPAND_x##VMLMODE));                                             \\\n        }                                                                                                                       \\\n      }                                                                                                                         \\\n    }                                                                                                                           \\\n  };                                                                                                                            \\\n\n\n#define EIGEN_MKL_VML_DECLARE_UNARY_CALLS_REAL(EIGENOP, VMLOP, VMLMODE)                                                         \\\n  EIGEN_MKL_VML_DECLARE_UNARY_CALL(EIGENOP, EIGEN_CAT(EIGEN_VMLMODE_PREFIX(VMLMODE),s##VMLOP), float, float, VMLMODE)           \\\n  EIGEN_MKL_VML_DECLARE_UNARY_CALL(EIGENOP, EIGEN_CAT(EIGEN_VMLMODE_PREFIX(VMLMODE),d##VMLOP), double, double, VMLMODE)\n\n#define EIGEN_MKL_VML_DECLARE_UNARY_CALLS_CPLX(EIGENOP, VMLOP, VMLMODE)                                                         \\\n  EIGEN_MKL_VML_DECLARE_UNARY_CALL(EIGENOP, EIGEN_CAT(EIGEN_VMLMODE_PREFIX(VMLMODE),c##VMLOP), scomplex, MKL_Complex8, VMLMODE) \\\n  EIGEN_MKL_VML_DECLARE_UNARY_CALL(EIGENOP, EIGEN_CAT(EIGEN_VMLMODE_PREFIX(VMLMODE),z##VMLOP), dcomplex, MKL_Complex16, VMLMODE)\n  \n#define EIGEN_MKL_VML_DECLARE_UNARY_CALLS(EIGENOP, VMLOP, VMLMODE)                                                              \\\n  EIGEN_MKL_VML_DECLARE_UNARY_CALLS_REAL(EIGENOP, VMLOP, VMLMODE)                                                               \\\n  EIGEN_MKL_VML_DECLARE_UNARY_CALLS_CPLX(EIGENOP, VMLOP, VMLMODE)\n\n  \nEIGEN_MKL_VML_DECLARE_UNARY_CALLS(sin,   Sin,   LA)\nEIGEN_MKL_VML_DECLARE_UNARY_CALLS(asin,  Asin,  LA)\nEIGEN_MKL_VML_DECLARE_UNARY_CALLS(sinh,  Sinh,  LA)\nEIGEN_MKL_VML_DECLARE_UNARY_CALLS(cos,   Cos,   LA)\nEIGEN_MKL_VML_DECLARE_UNARY_CALLS(acos,  Acos,  LA)\nEIGEN_MKL_VML_DECLARE_UNARY_CALLS(cosh,  Cosh,  LA)\nEIGEN_MKL_VML_DECLARE_UNARY_CALLS(tan,   Tan,   LA)\nEIGEN_MKL_VML_DECLARE_UNARY_CALLS(atan,  Atan,  LA)\nEIGEN_MKL_VML_DECLARE_UNARY_CALLS(tanh,  Tanh,  LA)\n// EIGEN_MKL_VML_DECLARE_UNARY_CALLS(abs,   Abs,    _)\nEIGEN_MKL_VML_DECLARE_UNARY_CALLS(exp,   Exp,   LA)\nEIGEN_MKL_VML_DECLARE_UNARY_CALLS(log,   Ln,    LA)\nEIGEN_MKL_VML_DECLARE_UNARY_CALLS(log10, Log10, LA)\nEIGEN_MKL_VML_DECLARE_UNARY_CALLS(sqrt,  Sqrt,  _)\n\nEIGEN_MKL_VML_DECLARE_UNARY_CALLS_REAL(square, Sqr,   _)\nEIGEN_MKL_VML_DECLARE_UNARY_CALLS_CPLX(arg, Arg,      _)\nEIGEN_MKL_VML_DECLARE_UNARY_CALLS_REAL(round, Round,  _)\nEIGEN_MKL_VML_DECLARE_UNARY_CALLS_REAL(floor, Floor,  _)\nEIGEN_MKL_VML_DECLARE_UNARY_CALLS_REAL(ceil,  Ceil,   _)\n\n#define EIGEN_MKL_VML_DECLARE_POW_CALL(EIGENOP, VMLOP, EIGENTYPE, VMLTYPE, VMLMODE)                                           \\\n  template< typename DstXprType, typename SrcXprNested, typename Plain>                                                       \\\n  struct Assignment<DstXprType, CwiseBinaryOp<scalar_##EIGENOP##_op<EIGENTYPE,EIGENTYPE>, SrcXprNested,                       \\\n                    const CwiseNullaryOp<internal::scalar_constant_op<EIGENTYPE>,Plain> >, assign_op<EIGENTYPE,EIGENTYPE>,    \\\n                   Dense2Dense, typename enable_if<vml_assign_traits<DstXprType,SrcXprNested>::EnableVml>::type> {            \\\n    typedef CwiseBinaryOp<scalar_##EIGENOP##_op<EIGENTYPE,EIGENTYPE>, SrcXprNested,                                           \\\n                    const CwiseNullaryOp<internal::scalar_constant_op<EIGENTYPE>,Plain> > SrcXprType;                         \\\n    static void run(DstXprType &dst, const SrcXprType &src, const assign_op<EIGENTYPE,EIGENTYPE> &func) {                     \\\n      resize_if_allowed(dst, src, func);                                                                                      \\\n      eigen_assert(dst.rows() == src.rows() && dst.cols() == src.cols());                                                     \\\n      VMLTYPE exponent = reinterpret_cast<const VMLTYPE&>(src.rhs().functor().m_other);                                       \\\n      if(vml_assign_traits<DstXprType,SrcXprNested>::Traversal==LinearTraversal)                                              \\\n      {                                                                                                                       \\\n        VMLOP( dst.size(), (const VMLTYPE*)src.lhs().data(), exponent,                                                        \\\n              (VMLTYPE*)dst.data() EIGEN_PP_EXPAND(EIGEN_VMLMODE_EXPAND_x##VMLMODE) );                                         \\\n      } else {                                                                                                                \\\n        const Index outerSize = dst.outerSize();                                                                              \\\n        for(Index outer = 0; outer < outerSize; ++outer) {                                                                    \\\n          const EIGENTYPE *src_ptr = src.IsRowMajor ? &(src.lhs().coeffRef(outer,0)) :                                        \\\n                                                      &(src.lhs().coeffRef(0, outer));                                        \\\n          EIGENTYPE *dst_ptr = dst.IsRowMajor ? &(dst.coeffRef(outer,0)) : &(dst.coeffRef(0, outer));                         \\\n          VMLOP( dst.innerSize(), (const VMLTYPE*)src_ptr, exponent,                                                          \\\n                 (VMLTYPE*)dst_ptr EIGEN_PP_EXPAND(EIGEN_VMLMODE_EXPAND_x##VMLMODE));                                          \\\n        }                                                                                                                     \\\n      }                                                                                                                       \\\n    }                                                                                                                         \\\n  };\n  \nEIGEN_MKL_VML_DECLARE_POW_CALL(pow, vmsPowx, float,    float,         LA)\nEIGEN_MKL_VML_DECLARE_POW_CALL(pow, vmdPowx, double,   double,        LA)\nEIGEN_MKL_VML_DECLARE_POW_CALL(pow, vmcPowx, scomplex, MKL_Complex8,  LA)\nEIGEN_MKL_VML_DECLARE_POW_CALL(pow, vmzPowx, dcomplex, MKL_Complex16, LA)\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_ASSIGN_VML_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/BandMatrix.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_BANDMATRIX_H\n#define EIGEN_BANDMATRIX_H\n\nnamespace Eigen { \n\nnamespace internal {\n\ntemplate<typename Derived>\nclass BandMatrixBase : public EigenBase<Derived>\n{\n  public:\n\n    enum {\n      Flags = internal::traits<Derived>::Flags,\n      CoeffReadCost = internal::traits<Derived>::CoeffReadCost,\n      RowsAtCompileTime = internal::traits<Derived>::RowsAtCompileTime,\n      ColsAtCompileTime = internal::traits<Derived>::ColsAtCompileTime,\n      MaxRowsAtCompileTime = internal::traits<Derived>::MaxRowsAtCompileTime,\n      MaxColsAtCompileTime = internal::traits<Derived>::MaxColsAtCompileTime,\n      Supers = internal::traits<Derived>::Supers,\n      Subs   = internal::traits<Derived>::Subs,\n      Options = internal::traits<Derived>::Options\n    };\n    typedef typename internal::traits<Derived>::Scalar Scalar;\n    typedef Matrix<Scalar,RowsAtCompileTime,ColsAtCompileTime> DenseMatrixType;\n    typedef typename DenseMatrixType::StorageIndex StorageIndex;\n    typedef typename internal::traits<Derived>::CoefficientsType CoefficientsType;\n    typedef EigenBase<Derived> Base;\n\n  protected:\n    enum {\n      DataRowsAtCompileTime = ((Supers!=Dynamic) && (Subs!=Dynamic))\n                            ? 1 + Supers + Subs\n                            : Dynamic,\n      SizeAtCompileTime = EIGEN_SIZE_MIN_PREFER_DYNAMIC(RowsAtCompileTime,ColsAtCompileTime)\n    };\n\n  public:\n    \n    using Base::derived;\n    using Base::rows;\n    using Base::cols;\n\n    /** \\returns the number of super diagonals */\n    inline Index supers() const { return derived().supers(); }\n\n    /** \\returns the number of sub diagonals */\n    inline Index subs() const { return derived().subs(); }\n    \n    /** \\returns an expression of the underlying coefficient matrix */\n    inline const CoefficientsType& coeffs() const { return derived().coeffs(); }\n    \n    /** \\returns an expression of the underlying coefficient matrix */\n    inline CoefficientsType& coeffs() { return derived().coeffs(); }\n\n    /** \\returns a vector expression of the \\a i -th column,\n      * only the meaningful part is returned.\n      * \\warning the internal storage must be column major. */\n    inline Block<CoefficientsType,Dynamic,1> col(Index i)\n    {\n      EIGEN_STATIC_ASSERT((Options&RowMajor)==0,THIS_METHOD_IS_ONLY_FOR_COLUMN_MAJOR_MATRICES);\n      Index start = 0;\n      Index len = coeffs().rows();\n      if (i<=supers())\n      {\n        start = supers()-i;\n        len = (std::min)(rows(),std::max<Index>(0,coeffs().rows() - (supers()-i)));\n      }\n      else if (i>=rows()-subs())\n        len = std::max<Index>(0,coeffs().rows() - (i + 1 - rows() + subs()));\n      return Block<CoefficientsType,Dynamic,1>(coeffs(), start, i, len, 1);\n    }\n\n    /** \\returns a vector expression of the main diagonal */\n    inline Block<CoefficientsType,1,SizeAtCompileTime> diagonal()\n    { return Block<CoefficientsType,1,SizeAtCompileTime>(coeffs(),supers(),0,1,(std::min)(rows(),cols())); }\n\n    /** \\returns a vector expression of the main diagonal (const version) */\n    inline const Block<const CoefficientsType,1,SizeAtCompileTime> diagonal() const\n    { return Block<const CoefficientsType,1,SizeAtCompileTime>(coeffs(),supers(),0,1,(std::min)(rows(),cols())); }\n\n    template<int Index> struct DiagonalIntReturnType {\n      enum {\n        ReturnOpposite = (Options&SelfAdjoint) && (((Index)>0 && Supers==0) || ((Index)<0 && Subs==0)),\n        Conjugate = ReturnOpposite && NumTraits<Scalar>::IsComplex,\n        ActualIndex = ReturnOpposite ? -Index : Index,\n        DiagonalSize = (RowsAtCompileTime==Dynamic || ColsAtCompileTime==Dynamic)\n                     ? Dynamic\n                     : (ActualIndex<0\n                     ? EIGEN_SIZE_MIN_PREFER_DYNAMIC(ColsAtCompileTime, RowsAtCompileTime + ActualIndex)\n                     : EIGEN_SIZE_MIN_PREFER_DYNAMIC(RowsAtCompileTime, ColsAtCompileTime - ActualIndex))\n      };\n      typedef Block<CoefficientsType,1, DiagonalSize> BuildType;\n      typedef typename internal::conditional<Conjugate,\n                 CwiseUnaryOp<internal::scalar_conjugate_op<Scalar>,BuildType >,\n                 BuildType>::type Type;\n    };\n\n    /** \\returns a vector expression of the \\a N -th sub or super diagonal */\n    template<int N> inline typename DiagonalIntReturnType<N>::Type diagonal()\n    {\n      return typename DiagonalIntReturnType<N>::BuildType(coeffs(), supers()-N, (std::max)(0,N), 1, diagonalLength(N));\n    }\n\n    /** \\returns a vector expression of the \\a N -th sub or super diagonal */\n    template<int N> inline const typename DiagonalIntReturnType<N>::Type diagonal() const\n    {\n      return typename DiagonalIntReturnType<N>::BuildType(coeffs(), supers()-N, (std::max)(0,N), 1, diagonalLength(N));\n    }\n\n    /** \\returns a vector expression of the \\a i -th sub or super diagonal */\n    inline Block<CoefficientsType,1,Dynamic> diagonal(Index i)\n    {\n      eigen_assert((i<0 && -i<=subs()) || (i>=0 && i<=supers()));\n      return Block<CoefficientsType,1,Dynamic>(coeffs(), supers()-i, std::max<Index>(0,i), 1, diagonalLength(i));\n    }\n\n    /** \\returns a vector expression of the \\a i -th sub or super diagonal */\n    inline const Block<const CoefficientsType,1,Dynamic> diagonal(Index i) const\n    {\n      eigen_assert((i<0 && -i<=subs()) || (i>=0 && i<=supers()));\n      return Block<const CoefficientsType,1,Dynamic>(coeffs(), supers()-i, std::max<Index>(0,i), 1, diagonalLength(i));\n    }\n    \n    template<typename Dest> inline void evalTo(Dest& dst) const\n    {\n      dst.resize(rows(),cols());\n      dst.setZero();\n      dst.diagonal() = diagonal();\n      for (Index i=1; i<=supers();++i)\n        dst.diagonal(i) = diagonal(i);\n      for (Index i=1; i<=subs();++i)\n        dst.diagonal(-i) = diagonal(-i);\n    }\n\n    DenseMatrixType toDenseMatrix() const\n    {\n      DenseMatrixType res(rows(),cols());\n      evalTo(res);\n      return res;\n    }\n\n  protected:\n\n    inline Index diagonalLength(Index i) const\n    { return i<0 ? (std::min)(cols(),rows()+i) : (std::min)(rows(),cols()-i); }\n};\n\n/**\n  * \\class BandMatrix\n  * \\ingroup Core_Module\n  *\n  * \\brief Represents a rectangular matrix with a banded storage\n  *\n  * \\tparam _Scalar Numeric type, i.e. float, double, int\n  * \\tparam _Rows Number of rows, or \\b Dynamic\n  * \\tparam _Cols Number of columns, or \\b Dynamic\n  * \\tparam _Supers Number of super diagonal\n  * \\tparam _Subs Number of sub diagonal\n  * \\tparam _Options A combination of either \\b #RowMajor or \\b #ColMajor, and of \\b #SelfAdjoint\n  *                  The former controls \\ref TopicStorageOrders \"storage order\", and defaults to\n  *                  column-major. The latter controls whether the matrix represents a selfadjoint\n  *                  matrix in which case either Supers of Subs have to be null.\n  *\n  * \\sa class TridiagonalMatrix\n  */\n\ntemplate<typename _Scalar, int _Rows, int _Cols, int _Supers, int _Subs, int _Options>\nstruct traits<BandMatrix<_Scalar,_Rows,_Cols,_Supers,_Subs,_Options> >\n{\n  typedef _Scalar Scalar;\n  typedef Dense StorageKind;\n  typedef Eigen::Index StorageIndex;\n  enum {\n    CoeffReadCost = NumTraits<Scalar>::ReadCost,\n    RowsAtCompileTime = _Rows,\n    ColsAtCompileTime = _Cols,\n    MaxRowsAtCompileTime = _Rows,\n    MaxColsAtCompileTime = _Cols,\n    Flags = LvalueBit,\n    Supers = _Supers,\n    Subs = _Subs,\n    Options = _Options,\n    DataRowsAtCompileTime = ((Supers!=Dynamic) && (Subs!=Dynamic)) ? 1 + Supers + Subs : Dynamic\n  };\n  typedef Matrix<Scalar,DataRowsAtCompileTime,ColsAtCompileTime,Options&RowMajor?RowMajor:ColMajor> CoefficientsType;\n};\n\ntemplate<typename _Scalar, int Rows, int Cols, int Supers, int Subs, int Options>\nclass BandMatrix : public BandMatrixBase<BandMatrix<_Scalar,Rows,Cols,Supers,Subs,Options> >\n{\n  public:\n\n    typedef typename internal::traits<BandMatrix>::Scalar Scalar;\n    typedef typename internal::traits<BandMatrix>::StorageIndex StorageIndex;\n    typedef typename internal::traits<BandMatrix>::CoefficientsType CoefficientsType;\n\n    explicit inline BandMatrix(Index rows=Rows, Index cols=Cols, Index supers=Supers, Index subs=Subs)\n      : m_coeffs(1+supers+subs,cols),\n        m_rows(rows), m_supers(supers), m_subs(subs)\n    {\n    }\n\n    /** \\returns the number of columns */\n    inline Index rows() const { return m_rows.value(); }\n\n    /** \\returns the number of rows */\n    inline Index cols() const { return m_coeffs.cols(); }\n\n    /** \\returns the number of super diagonals */\n    inline Index supers() const { return m_supers.value(); }\n\n    /** \\returns the number of sub diagonals */\n    inline Index subs() const { return m_subs.value(); }\n\n    inline const CoefficientsType& coeffs() const { return m_coeffs; }\n    inline CoefficientsType& coeffs() { return m_coeffs; }\n\n  protected:\n\n    CoefficientsType m_coeffs;\n    internal::variable_if_dynamic<Index, Rows>   m_rows;\n    internal::variable_if_dynamic<Index, Supers> m_supers;\n    internal::variable_if_dynamic<Index, Subs>   m_subs;\n};\n\ntemplate<typename _CoefficientsType,int _Rows, int _Cols, int _Supers, int _Subs,int _Options>\nclass BandMatrixWrapper;\n\ntemplate<typename _CoefficientsType,int _Rows, int _Cols, int _Supers, int _Subs,int _Options>\nstruct traits<BandMatrixWrapper<_CoefficientsType,_Rows,_Cols,_Supers,_Subs,_Options> >\n{\n  typedef typename _CoefficientsType::Scalar Scalar;\n  typedef typename _CoefficientsType::StorageKind StorageKind;\n  typedef typename _CoefficientsType::StorageIndex StorageIndex;\n  enum {\n    CoeffReadCost = internal::traits<_CoefficientsType>::CoeffReadCost,\n    RowsAtCompileTime = _Rows,\n    ColsAtCompileTime = _Cols,\n    MaxRowsAtCompileTime = _Rows,\n    MaxColsAtCompileTime = _Cols,\n    Flags = LvalueBit,\n    Supers = _Supers,\n    Subs = _Subs,\n    Options = _Options,\n    DataRowsAtCompileTime = ((Supers!=Dynamic) && (Subs!=Dynamic)) ? 1 + Supers + Subs : Dynamic\n  };\n  typedef _CoefficientsType CoefficientsType;\n};\n\ntemplate<typename _CoefficientsType,int _Rows, int _Cols, int _Supers, int _Subs,int _Options>\nclass BandMatrixWrapper : public BandMatrixBase<BandMatrixWrapper<_CoefficientsType,_Rows,_Cols,_Supers,_Subs,_Options> >\n{\n  public:\n\n    typedef typename internal::traits<BandMatrixWrapper>::Scalar Scalar;\n    typedef typename internal::traits<BandMatrixWrapper>::CoefficientsType CoefficientsType;\n    typedef typename internal::traits<BandMatrixWrapper>::StorageIndex StorageIndex;\n\n    explicit inline BandMatrixWrapper(const CoefficientsType& coeffs, Index rows=_Rows, Index cols=_Cols, Index supers=_Supers, Index subs=_Subs)\n      : m_coeffs(coeffs),\n        m_rows(rows), m_supers(supers), m_subs(subs)\n    {\n      EIGEN_UNUSED_VARIABLE(cols);\n      //internal::assert(coeffs.cols()==cols() && (supers()+subs()+1)==coeffs.rows());\n    }\n\n    /** \\returns the number of columns */\n    inline Index rows() const { return m_rows.value(); }\n\n    /** \\returns the number of rows */\n    inline Index cols() const { return m_coeffs.cols(); }\n\n    /** \\returns the number of super diagonals */\n    inline Index supers() const { return m_supers.value(); }\n\n    /** \\returns the number of sub diagonals */\n    inline Index subs() const { return m_subs.value(); }\n\n    inline const CoefficientsType& coeffs() const { return m_coeffs; }\n\n  protected:\n\n    const CoefficientsType& m_coeffs;\n    internal::variable_if_dynamic<Index, _Rows>   m_rows;\n    internal::variable_if_dynamic<Index, _Supers> m_supers;\n    internal::variable_if_dynamic<Index, _Subs>   m_subs;\n};\n\n/**\n  * \\class TridiagonalMatrix\n  * \\ingroup Core_Module\n  *\n  * \\brief Represents a tridiagonal matrix with a compact banded storage\n  *\n  * \\tparam Scalar Numeric type, i.e. float, double, int\n  * \\tparam Size Number of rows and cols, or \\b Dynamic\n  * \\tparam Options Can be 0 or \\b SelfAdjoint\n  *\n  * \\sa class BandMatrix\n  */\ntemplate<typename Scalar, int Size, int Options>\nclass TridiagonalMatrix : public BandMatrix<Scalar,Size,Size,Options&SelfAdjoint?0:1,1,Options|RowMajor>\n{\n    typedef BandMatrix<Scalar,Size,Size,Options&SelfAdjoint?0:1,1,Options|RowMajor> Base;\n    typedef typename Base::StorageIndex StorageIndex;\n  public:\n    explicit TridiagonalMatrix(Index size = Size) : Base(size,size,Options&SelfAdjoint?0:1,1) {}\n\n    inline typename Base::template DiagonalIntReturnType<1>::Type super()\n    { return Base::template diagonal<1>(); }\n    inline const typename Base::template DiagonalIntReturnType<1>::Type super() const\n    { return Base::template diagonal<1>(); }\n    inline typename Base::template DiagonalIntReturnType<-1>::Type sub()\n    { return Base::template diagonal<-1>(); }\n    inline const typename Base::template DiagonalIntReturnType<-1>::Type sub() const\n    { return Base::template diagonal<-1>(); }\n  protected:\n};\n\n\nstruct BandShape {};\n\ntemplate<typename _Scalar, int _Rows, int _Cols, int _Supers, int _Subs, int _Options>\nstruct evaluator_traits<BandMatrix<_Scalar,_Rows,_Cols,_Supers,_Subs,_Options> >\n  : public evaluator_traits_base<BandMatrix<_Scalar,_Rows,_Cols,_Supers,_Subs,_Options> >\n{\n  typedef BandShape Shape;\n};\n\ntemplate<typename _CoefficientsType,int _Rows, int _Cols, int _Supers, int _Subs,int _Options>\nstruct evaluator_traits<BandMatrixWrapper<_CoefficientsType,_Rows,_Cols,_Supers,_Subs,_Options> >\n  : public evaluator_traits_base<BandMatrixWrapper<_CoefficientsType,_Rows,_Cols,_Supers,_Subs,_Options> >\n{\n  typedef BandShape Shape;\n};\n\ntemplate<> struct AssignmentKind<DenseShape,BandShape> { typedef EigenBase2EigenBase Kind; };\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_BANDMATRIX_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/Block.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2006-2010 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_BLOCK_H\n#define EIGEN_BLOCK_H\n\nnamespace Eigen { \n\nnamespace internal {\ntemplate<typename XprType, int BlockRows, int BlockCols, bool InnerPanel>\nstruct traits<Block<XprType, BlockRows, BlockCols, InnerPanel> > : traits<XprType>\n{\n  typedef typename traits<XprType>::Scalar Scalar;\n  typedef typename traits<XprType>::StorageKind StorageKind;\n  typedef typename traits<XprType>::XprKind XprKind;\n  typedef typename ref_selector<XprType>::type XprTypeNested;\n  typedef typename remove_reference<XprTypeNested>::type _XprTypeNested;\n  enum{\n    MatrixRows = traits<XprType>::RowsAtCompileTime,\n    MatrixCols = traits<XprType>::ColsAtCompileTime,\n    RowsAtCompileTime = MatrixRows == 0 ? 0 : BlockRows,\n    ColsAtCompileTime = MatrixCols == 0 ? 0 : BlockCols,\n    MaxRowsAtCompileTime = BlockRows==0 ? 0\n                         : RowsAtCompileTime != Dynamic ? int(RowsAtCompileTime)\n                         : int(traits<XprType>::MaxRowsAtCompileTime),\n    MaxColsAtCompileTime = BlockCols==0 ? 0\n                         : ColsAtCompileTime != Dynamic ? int(ColsAtCompileTime)\n                         : int(traits<XprType>::MaxColsAtCompileTime),\n\n    XprTypeIsRowMajor = (int(traits<XprType>::Flags)&RowMajorBit) != 0,\n    IsRowMajor = (MaxRowsAtCompileTime==1&&MaxColsAtCompileTime!=1) ? 1\n               : (MaxColsAtCompileTime==1&&MaxRowsAtCompileTime!=1) ? 0\n               : XprTypeIsRowMajor,\n    HasSameStorageOrderAsXprType = (IsRowMajor == XprTypeIsRowMajor),\n    InnerSize = IsRowMajor ? int(ColsAtCompileTime) : int(RowsAtCompileTime),\n    InnerStrideAtCompileTime = HasSameStorageOrderAsXprType\n                             ? int(inner_stride_at_compile_time<XprType>::ret)\n                             : int(outer_stride_at_compile_time<XprType>::ret),\n    OuterStrideAtCompileTime = HasSameStorageOrderAsXprType\n                             ? int(outer_stride_at_compile_time<XprType>::ret)\n                             : int(inner_stride_at_compile_time<XprType>::ret),\n\n    // FIXME, this traits is rather specialized for dense object and it needs to be cleaned further\n    FlagsLvalueBit = is_lvalue<XprType>::value ? LvalueBit : 0,\n    FlagsRowMajorBit = IsRowMajor ? RowMajorBit : 0,\n    Flags = (traits<XprType>::Flags & (DirectAccessBit | (InnerPanel?CompressedAccessBit:0))) | FlagsLvalueBit | FlagsRowMajorBit,\n    // FIXME DirectAccessBit should not be handled by expressions\n    // \n    // Alignment is needed by MapBase's assertions\n    // We can sefely set it to false here. Internal alignment errors will be detected by an eigen_internal_assert in the respective evaluator\n    Alignment = 0\n  };\n};\n\ntemplate<typename XprType, int BlockRows=Dynamic, int BlockCols=Dynamic, bool InnerPanel = false,\n         bool HasDirectAccess = internal::has_direct_access<XprType>::ret> class BlockImpl_dense;\n         \n} // end namespace internal\n\ntemplate<typename XprType, int BlockRows, int BlockCols, bool InnerPanel, typename StorageKind> class BlockImpl;\n\n/** \\class Block\n  * \\ingroup Core_Module\n  *\n  * \\brief Expression of a fixed-size or dynamic-size block\n  *\n  * \\tparam XprType the type of the expression in which we are taking a block\n  * \\tparam BlockRows the number of rows of the block we are taking at compile time (optional)\n  * \\tparam BlockCols the number of columns of the block we are taking at compile time (optional)\n  * \\tparam InnerPanel is true, if the block maps to a set of rows of a row major matrix or\n  *         to set of columns of a column major matrix (optional). The parameter allows to determine\n  *         at compile time whether aligned access is possible on the block expression.\n  *\n  * This class represents an expression of either a fixed-size or dynamic-size block. It is the return\n  * type of DenseBase::block(Index,Index,Index,Index) and DenseBase::block<int,int>(Index,Index) and\n  * most of the time this is the only way it is used.\n  *\n  * However, if you want to directly maniputate block expressions,\n  * for instance if you want to write a function returning such an expression, you\n  * will need to use this class.\n  *\n  * Here is an example illustrating the dynamic case:\n  * \\include class_Block.cpp\n  * Output: \\verbinclude class_Block.out\n  *\n  * \\note Even though this expression has dynamic size, in the case where \\a XprType\n  * has fixed size, this expression inherits a fixed maximal size which means that evaluating\n  * it does not cause a dynamic memory allocation.\n  *\n  * Here is an example illustrating the fixed-size case:\n  * \\include class_FixedBlock.cpp\n  * Output: \\verbinclude class_FixedBlock.out\n  *\n  * \\sa DenseBase::block(Index,Index,Index,Index), DenseBase::block(Index,Index), class VectorBlock\n  */\ntemplate<typename XprType, int BlockRows, int BlockCols, bool InnerPanel> class Block\n  : public BlockImpl<XprType, BlockRows, BlockCols, InnerPanel, typename internal::traits<XprType>::StorageKind>\n{\n    typedef BlockImpl<XprType, BlockRows, BlockCols, InnerPanel, typename internal::traits<XprType>::StorageKind> Impl;\n  public:\n    //typedef typename Impl::Base Base;\n    typedef Impl Base;\n    EIGEN_GENERIC_PUBLIC_INTERFACE(Block)\n    EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Block)\n    \n    typedef typename internal::remove_all<XprType>::type NestedExpression;\n  \n    /** Column or Row constructor\n      */\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Block(XprType& xpr, Index i) : Impl(xpr,i)\n    {\n      eigen_assert( (i>=0) && (\n          ((BlockRows==1) && (BlockCols==XprType::ColsAtCompileTime) && i<xpr.rows())\n        ||((BlockRows==XprType::RowsAtCompileTime) && (BlockCols==1) && i<xpr.cols())));\n    }\n\n    /** Fixed-size constructor\n      */\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Block(XprType& xpr, Index startRow, Index startCol)\n      : Impl(xpr, startRow, startCol)\n    {\n      EIGEN_STATIC_ASSERT(RowsAtCompileTime!=Dynamic && ColsAtCompileTime!=Dynamic,THIS_METHOD_IS_ONLY_FOR_FIXED_SIZE)\n      eigen_assert(startRow >= 0 && BlockRows >= 0 && startRow + BlockRows <= xpr.rows()\n             && startCol >= 0 && BlockCols >= 0 && startCol + BlockCols <= xpr.cols());\n    }\n\n    /** Dynamic-size constructor\n      */\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Block(XprType& xpr,\n          Index startRow, Index startCol,\n          Index blockRows, Index blockCols)\n      : Impl(xpr, startRow, startCol, blockRows, blockCols)\n    {\n      eigen_assert((RowsAtCompileTime==Dynamic || RowsAtCompileTime==blockRows)\n          && (ColsAtCompileTime==Dynamic || ColsAtCompileTime==blockCols));\n      eigen_assert(startRow >= 0 && blockRows >= 0 && startRow  <= xpr.rows() - blockRows\n          && startCol >= 0 && blockCols >= 0 && startCol <= xpr.cols() - blockCols);\n    }\n};\n         \n// The generic default implementation for dense block simplu forward to the internal::BlockImpl_dense\n// that must be specialized for direct and non-direct access...\ntemplate<typename XprType, int BlockRows, int BlockCols, bool InnerPanel>\nclass BlockImpl<XprType, BlockRows, BlockCols, InnerPanel, Dense>\n  : public internal::BlockImpl_dense<XprType, BlockRows, BlockCols, InnerPanel>\n{\n    typedef internal::BlockImpl_dense<XprType, BlockRows, BlockCols, InnerPanel> Impl;\n    typedef typename XprType::StorageIndex StorageIndex;\n  public:\n    typedef Impl Base;\n    EIGEN_INHERIT_ASSIGNMENT_OPERATORS(BlockImpl)\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE BlockImpl(XprType& xpr, Index i) : Impl(xpr,i) {}\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE BlockImpl(XprType& xpr, Index startRow, Index startCol) : Impl(xpr, startRow, startCol) {}\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE BlockImpl(XprType& xpr, Index startRow, Index startCol, Index blockRows, Index blockCols)\n      : Impl(xpr, startRow, startCol, blockRows, blockCols) {}\n};\n\nnamespace internal {\n\n/** \\internal Internal implementation of dense Blocks in the general case. */\ntemplate<typename XprType, int BlockRows, int BlockCols, bool InnerPanel, bool HasDirectAccess> class BlockImpl_dense\n  : public internal::dense_xpr_base<Block<XprType, BlockRows, BlockCols, InnerPanel> >::type\n{\n    typedef Block<XprType, BlockRows, BlockCols, InnerPanel> BlockType;\n    typedef typename internal::ref_selector<XprType>::non_const_type XprTypeNested;\n  public:\n\n    typedef typename internal::dense_xpr_base<BlockType>::type Base;\n    EIGEN_DENSE_PUBLIC_INTERFACE(BlockType)\n    EIGEN_INHERIT_ASSIGNMENT_OPERATORS(BlockImpl_dense)\n\n    // class InnerIterator; // FIXME apparently never used\n\n    /** Column or Row constructor\n      */\n    EIGEN_DEVICE_FUNC\n    inline BlockImpl_dense(XprType& xpr, Index i)\n      : m_xpr(xpr),\n        // It is a row if and only if BlockRows==1 and BlockCols==XprType::ColsAtCompileTime,\n        // and it is a column if and only if BlockRows==XprType::RowsAtCompileTime and BlockCols==1,\n        // all other cases are invalid.\n        // The case a 1x1 matrix seems ambiguous, but the result is the same anyway.\n        m_startRow( (BlockRows==1) && (BlockCols==XprType::ColsAtCompileTime) ? i : 0),\n        m_startCol( (BlockRows==XprType::RowsAtCompileTime) && (BlockCols==1) ? i : 0),\n        m_blockRows(BlockRows==1 ? 1 : xpr.rows()),\n        m_blockCols(BlockCols==1 ? 1 : xpr.cols())\n    {}\n\n    /** Fixed-size constructor\n      */\n    EIGEN_DEVICE_FUNC\n    inline BlockImpl_dense(XprType& xpr, Index startRow, Index startCol)\n      : m_xpr(xpr), m_startRow(startRow), m_startCol(startCol),\n                    m_blockRows(BlockRows), m_blockCols(BlockCols)\n    {}\n\n    /** Dynamic-size constructor\n      */\n    EIGEN_DEVICE_FUNC\n    inline BlockImpl_dense(XprType& xpr,\n          Index startRow, Index startCol,\n          Index blockRows, Index blockCols)\n      : m_xpr(xpr), m_startRow(startRow), m_startCol(startCol),\n                    m_blockRows(blockRows), m_blockCols(blockCols)\n    {}\n\n    EIGEN_DEVICE_FUNC inline Index rows() const { return m_blockRows.value(); }\n    EIGEN_DEVICE_FUNC inline Index cols() const { return m_blockCols.value(); }\n\n    EIGEN_DEVICE_FUNC\n    inline Scalar& coeffRef(Index rowId, Index colId)\n    {\n      EIGEN_STATIC_ASSERT_LVALUE(XprType)\n      return m_xpr.coeffRef(rowId + m_startRow.value(), colId + m_startCol.value());\n    }\n\n    EIGEN_DEVICE_FUNC\n    inline const Scalar& coeffRef(Index rowId, Index colId) const\n    {\n      return m_xpr.derived().coeffRef(rowId + m_startRow.value(), colId + m_startCol.value());\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const CoeffReturnType coeff(Index rowId, Index colId) const\n    {\n      return m_xpr.coeff(rowId + m_startRow.value(), colId + m_startCol.value());\n    }\n\n    EIGEN_DEVICE_FUNC\n    inline Scalar& coeffRef(Index index)\n    {\n      EIGEN_STATIC_ASSERT_LVALUE(XprType)\n      return m_xpr.coeffRef(m_startRow.value() + (RowsAtCompileTime == 1 ? 0 : index),\n                            m_startCol.value() + (RowsAtCompileTime == 1 ? index : 0));\n    }\n\n    EIGEN_DEVICE_FUNC\n    inline const Scalar& coeffRef(Index index) const\n    {\n      return m_xpr.coeffRef(m_startRow.value() + (RowsAtCompileTime == 1 ? 0 : index),\n                            m_startCol.value() + (RowsAtCompileTime == 1 ? index : 0));\n    }\n\n    EIGEN_DEVICE_FUNC\n    inline const CoeffReturnType coeff(Index index) const\n    {\n      return m_xpr.coeff(m_startRow.value() + (RowsAtCompileTime == 1 ? 0 : index),\n                         m_startCol.value() + (RowsAtCompileTime == 1 ? index : 0));\n    }\n\n    template<int LoadMode>\n    inline PacketScalar packet(Index rowId, Index colId) const\n    {\n      return m_xpr.template packet<Unaligned>(rowId + m_startRow.value(), colId + m_startCol.value());\n    }\n\n    template<int LoadMode>\n    inline void writePacket(Index rowId, Index colId, const PacketScalar& val)\n    {\n      m_xpr.template writePacket<Unaligned>(rowId + m_startRow.value(), colId + m_startCol.value(), val);\n    }\n\n    template<int LoadMode>\n    inline PacketScalar packet(Index index) const\n    {\n      return m_xpr.template packet<Unaligned>\n              (m_startRow.value() + (RowsAtCompileTime == 1 ? 0 : index),\n               m_startCol.value() + (RowsAtCompileTime == 1 ? index : 0));\n    }\n\n    template<int LoadMode>\n    inline void writePacket(Index index, const PacketScalar& val)\n    {\n      m_xpr.template writePacket<Unaligned>\n         (m_startRow.value() + (RowsAtCompileTime == 1 ? 0 : index),\n          m_startCol.value() + (RowsAtCompileTime == 1 ? index : 0), val);\n    }\n\n    #ifdef EIGEN_PARSED_BY_DOXYGEN\n    /** \\sa MapBase::data() */\n    EIGEN_DEVICE_FUNC inline const Scalar* data() const;\n    EIGEN_DEVICE_FUNC inline Index innerStride() const;\n    EIGEN_DEVICE_FUNC inline Index outerStride() const;\n    #endif\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const typename internal::remove_all<XprTypeNested>::type& nestedExpression() const\n    { \n      return m_xpr; \n    }\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    XprType& nestedExpression() { return m_xpr; }\n      \n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    StorageIndex startRow() const\n    { \n      return m_startRow.value(); \n    }\n      \n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    StorageIndex startCol() const\n    { \n      return m_startCol.value(); \n    }\n\n  protected:\n\n    XprTypeNested m_xpr;\n    const internal::variable_if_dynamic<StorageIndex, (XprType::RowsAtCompileTime == 1 && BlockRows==1) ? 0 : Dynamic> m_startRow;\n    const internal::variable_if_dynamic<StorageIndex, (XprType::ColsAtCompileTime == 1 && BlockCols==1) ? 0 : Dynamic> m_startCol;\n    const internal::variable_if_dynamic<StorageIndex, RowsAtCompileTime> m_blockRows;\n    const internal::variable_if_dynamic<StorageIndex, ColsAtCompileTime> m_blockCols;\n};\n\n/** \\internal Internal implementation of dense Blocks in the direct access case.*/\ntemplate<typename XprType, int BlockRows, int BlockCols, bool InnerPanel>\nclass BlockImpl_dense<XprType,BlockRows,BlockCols, InnerPanel,true>\n  : public MapBase<Block<XprType, BlockRows, BlockCols, InnerPanel> >\n{\n    typedef Block<XprType, BlockRows, BlockCols, InnerPanel> BlockType;\n    typedef typename internal::ref_selector<XprType>::non_const_type XprTypeNested;\n    enum {\n      XprTypeIsRowMajor = (int(traits<XprType>::Flags)&RowMajorBit) != 0\n    };\n  public:\n\n    typedef MapBase<BlockType> Base;\n    EIGEN_DENSE_PUBLIC_INTERFACE(BlockType)\n    EIGEN_INHERIT_ASSIGNMENT_OPERATORS(BlockImpl_dense)\n\n    /** Column or Row constructor\n      */\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    BlockImpl_dense(XprType& xpr, Index i)\n      : Base(xpr.data() + i * (    ((BlockRows==1) && (BlockCols==XprType::ColsAtCompileTime) && (!XprTypeIsRowMajor)) \n                                || ((BlockRows==XprType::RowsAtCompileTime) && (BlockCols==1) && ( XprTypeIsRowMajor)) ? xpr.innerStride() : xpr.outerStride()),\n             BlockRows==1 ? 1 : xpr.rows(),\n             BlockCols==1 ? 1 : xpr.cols()),\n        m_xpr(xpr),\n        m_startRow( (BlockRows==1) && (BlockCols==XprType::ColsAtCompileTime) ? i : 0),\n        m_startCol( (BlockRows==XprType::RowsAtCompileTime) && (BlockCols==1) ? i : 0)\n    {\n      init();\n    }\n\n    /** Fixed-size constructor\n      */\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    BlockImpl_dense(XprType& xpr, Index startRow, Index startCol)\n      : Base(xpr.data()+xpr.innerStride()*(XprTypeIsRowMajor?startCol:startRow) + xpr.outerStride()*(XprTypeIsRowMajor?startRow:startCol)),\n        m_xpr(xpr), m_startRow(startRow), m_startCol(startCol)\n    {\n      init();\n    }\n\n    /** Dynamic-size constructor\n      */\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    BlockImpl_dense(XprType& xpr,\n          Index startRow, Index startCol,\n          Index blockRows, Index blockCols)\n      : Base(xpr.data()+xpr.innerStride()*(XprTypeIsRowMajor?startCol:startRow) + xpr.outerStride()*(XprTypeIsRowMajor?startRow:startCol), blockRows, blockCols),\n        m_xpr(xpr), m_startRow(startRow), m_startCol(startCol)\n    {\n      init();\n    }\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const typename internal::remove_all<XprTypeNested>::type& nestedExpression() const\n    { \n      return m_xpr; \n    }\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    XprType& nestedExpression() { return m_xpr; }\n      \n    /** \\sa MapBase::innerStride() */\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Index innerStride() const\n    {\n      return internal::traits<BlockType>::HasSameStorageOrderAsXprType\n             ? m_xpr.innerStride()\n             : m_xpr.outerStride();\n    }\n\n    /** \\sa MapBase::outerStride() */\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Index outerStride() const\n    {\n      return m_outerStride;\n    }\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    StorageIndex startRow() const\n    {\n      return m_startRow.value();\n    }\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    StorageIndex startCol() const\n    {\n      return m_startCol.value();\n    }\n\n  #ifndef __SUNPRO_CC\n  // FIXME sunstudio is not friendly with the above friend...\n  // META-FIXME there is no 'friend' keyword around here. Is this obsolete?\n  protected:\n  #endif\n\n    #ifndef EIGEN_PARSED_BY_DOXYGEN\n    /** \\internal used by allowAligned() */\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    BlockImpl_dense(XprType& xpr, const Scalar* data, Index blockRows, Index blockCols)\n      : Base(data, blockRows, blockCols), m_xpr(xpr)\n    {\n      init();\n    }\n    #endif\n\n  protected:\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    void init()\n    {\n      m_outerStride = internal::traits<BlockType>::HasSameStorageOrderAsXprType\n                    ? m_xpr.outerStride()\n                    : m_xpr.innerStride();\n    }\n\n    XprTypeNested m_xpr;\n    const internal::variable_if_dynamic<StorageIndex, (XprType::RowsAtCompileTime == 1 && BlockRows==1) ? 0 : Dynamic> m_startRow;\n    const internal::variable_if_dynamic<StorageIndex, (XprType::ColsAtCompileTime == 1 && BlockCols==1) ? 0 : Dynamic> m_startCol;\n    Index m_outerStride;\n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_BLOCK_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/BooleanRedux.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_ALLANDANY_H\n#define EIGEN_ALLANDANY_H\n\nnamespace Eigen { \n\nnamespace internal {\n\ntemplate<typename Derived, int UnrollCount, int Rows>\nstruct all_unroller\n{\n  enum {\n    col = (UnrollCount-1) / Rows,\n    row = (UnrollCount-1) % Rows\n  };\n\n  static inline bool run(const Derived &mat)\n  {\n    return all_unroller<Derived, UnrollCount-1, Rows>::run(mat) && mat.coeff(row, col);\n  }\n};\n\ntemplate<typename Derived, int Rows>\nstruct all_unroller<Derived, 0, Rows>\n{\n  static inline bool run(const Derived &/*mat*/) { return true; }\n};\n\ntemplate<typename Derived, int Rows>\nstruct all_unroller<Derived, Dynamic, Rows>\n{\n  static inline bool run(const Derived &) { return false; }\n};\n\ntemplate<typename Derived, int UnrollCount, int Rows>\nstruct any_unroller\n{\n  enum {\n    col = (UnrollCount-1) / Rows,\n    row = (UnrollCount-1) % Rows\n  };\n  \n  static inline bool run(const Derived &mat)\n  {\n    return any_unroller<Derived, UnrollCount-1, Rows>::run(mat) || mat.coeff(row, col);\n  }\n};\n\ntemplate<typename Derived, int Rows>\nstruct any_unroller<Derived, 0, Rows>\n{\n  static inline bool run(const Derived & /*mat*/) { return false; }\n};\n\ntemplate<typename Derived, int Rows>\nstruct any_unroller<Derived, Dynamic, Rows>\n{\n  static inline bool run(const Derived &) { return false; }\n};\n\n} // end namespace internal\n\n/** \\returns true if all coefficients are true\n  *\n  * Example: \\include MatrixBase_all.cpp\n  * Output: \\verbinclude MatrixBase_all.out\n  *\n  * \\sa any(), Cwise::operator<()\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC inline bool DenseBase<Derived>::all() const\n{\n  typedef internal::evaluator<Derived> Evaluator;\n  enum {\n    unroll = SizeAtCompileTime != Dynamic\n          && SizeAtCompileTime * (Evaluator::CoeffReadCost + NumTraits<Scalar>::AddCost) <= EIGEN_UNROLLING_LIMIT\n  };\n  Evaluator evaluator(derived());\n  if(unroll)\n    return internal::all_unroller<Evaluator, unroll ? int(SizeAtCompileTime) : Dynamic, internal::traits<Derived>::RowsAtCompileTime>::run(evaluator);\n  else\n  {\n    for(Index j = 0; j < cols(); ++j)\n      for(Index i = 0; i < rows(); ++i)\n        if (!evaluator.coeff(i, j)) return false;\n    return true;\n  }\n}\n\n/** \\returns true if at least one coefficient is true\n  *\n  * \\sa all()\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC inline bool DenseBase<Derived>::any() const\n{\n  typedef internal::evaluator<Derived> Evaluator;\n  enum {\n    unroll = SizeAtCompileTime != Dynamic\n          && SizeAtCompileTime * (Evaluator::CoeffReadCost + NumTraits<Scalar>::AddCost) <= EIGEN_UNROLLING_LIMIT\n  };\n  Evaluator evaluator(derived());\n  if(unroll)\n    return internal::any_unroller<Evaluator, unroll ? int(SizeAtCompileTime) : Dynamic, internal::traits<Derived>::RowsAtCompileTime>::run(evaluator);\n  else\n  {\n    for(Index j = 0; j < cols(); ++j)\n      for(Index i = 0; i < rows(); ++i)\n        if (evaluator.coeff(i, j)) return true;\n    return false;\n  }\n}\n\n/** \\returns the number of coefficients which evaluate to true\n  *\n  * \\sa all(), any()\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC inline Eigen::Index DenseBase<Derived>::count() const\n{\n  return derived().template cast<bool>().template cast<Index>().sum();\n}\n\n/** \\returns true is \\c *this contains at least one Not A Number (NaN).\n  *\n  * \\sa allFinite()\n  */\ntemplate<typename Derived>\ninline bool DenseBase<Derived>::hasNaN() const\n{\n#if EIGEN_COMP_MSVC || (defined __FAST_MATH__)\n  return derived().array().isNaN().any();\n#else\n  return !((derived().array()==derived().array()).all());\n#endif\n}\n\n/** \\returns true if \\c *this contains only finite numbers, i.e., no NaN and no +/-INF values.\n  *\n  * \\sa hasNaN()\n  */\ntemplate<typename Derived>\ninline bool DenseBase<Derived>::allFinite() const\n{\n#if EIGEN_COMP_MSVC || (defined __FAST_MATH__)\n  return derived().array().isFinite().all();\n#else\n  return !((derived()-derived()).hasNaN());\n#endif\n}\n    \n} // end namespace Eigen\n\n#endif // EIGEN_ALLANDANY_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/CommaInitializer.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_COMMAINITIALIZER_H\n#define EIGEN_COMMAINITIALIZER_H\n\nnamespace Eigen { \n\n/** \\class CommaInitializer\n  * \\ingroup Core_Module\n  *\n  * \\brief Helper class used by the comma initializer operator\n  *\n  * This class is internally used to implement the comma initializer feature. It is\n  * the return type of MatrixBase::operator<<, and most of the time this is the only\n  * way it is used.\n  *\n  * \\sa \\blank \\ref MatrixBaseCommaInitRef \"MatrixBase::operator<<\", CommaInitializer::finished()\n  */\ntemplate<typename XprType>\nstruct CommaInitializer\n{\n  typedef typename XprType::Scalar Scalar;\n\n  EIGEN_DEVICE_FUNC\n  inline CommaInitializer(XprType& xpr, const Scalar& s)\n    : m_xpr(xpr), m_row(0), m_col(1), m_currentBlockRows(1)\n  {\n    eigen_assert(m_xpr.rows() > 0 && m_xpr.cols() > 0\n      && \"Cannot comma-initialize a 0x0 matrix (operator<<)\");\n    m_xpr.coeffRef(0,0) = s;\n  }\n\n  template<typename OtherDerived>\n  EIGEN_DEVICE_FUNC\n  inline CommaInitializer(XprType& xpr, const DenseBase<OtherDerived>& other)\n    : m_xpr(xpr), m_row(0), m_col(other.cols()), m_currentBlockRows(other.rows())\n  {\n    eigen_assert(m_xpr.rows() >= other.rows() && m_xpr.cols() >= other.cols()\n      && \"Cannot comma-initialize a 0x0 matrix (operator<<)\");\n    m_xpr.block(0, 0, other.rows(), other.cols()) = other;\n  }\n\n  /* Copy/Move constructor which transfers ownership. This is crucial in \n   * absence of return value optimization to avoid assertions during destruction. */\n  // FIXME in C++11 mode this could be replaced by a proper RValue constructor\n  EIGEN_DEVICE_FUNC\n  inline CommaInitializer(const CommaInitializer& o)\n  : m_xpr(o.m_xpr), m_row(o.m_row), m_col(o.m_col), m_currentBlockRows(o.m_currentBlockRows) {\n    // Mark original object as finished. In absence of R-value references we need to const_cast:\n    const_cast<CommaInitializer&>(o).m_row = m_xpr.rows();\n    const_cast<CommaInitializer&>(o).m_col = m_xpr.cols();\n    const_cast<CommaInitializer&>(o).m_currentBlockRows = 0;\n  }\n\n  /* inserts a scalar value in the target matrix */\n  EIGEN_DEVICE_FUNC\n  CommaInitializer& operator,(const Scalar& s)\n  {\n    if (m_col==m_xpr.cols())\n    {\n      m_row+=m_currentBlockRows;\n      m_col = 0;\n      m_currentBlockRows = 1;\n      eigen_assert(m_row<m_xpr.rows()\n        && \"Too many rows passed to comma initializer (operator<<)\");\n    }\n    eigen_assert(m_col<m_xpr.cols()\n      && \"Too many coefficients passed to comma initializer (operator<<)\");\n    eigen_assert(m_currentBlockRows==1);\n    m_xpr.coeffRef(m_row, m_col++) = s;\n    return *this;\n  }\n\n  /* inserts a matrix expression in the target matrix */\n  template<typename OtherDerived>\n  EIGEN_DEVICE_FUNC\n  CommaInitializer& operator,(const DenseBase<OtherDerived>& other)\n  {\n    if (m_col==m_xpr.cols() && (other.cols()!=0 || other.rows()!=m_currentBlockRows))\n    {\n      m_row+=m_currentBlockRows;\n      m_col = 0;\n      m_currentBlockRows = other.rows();\n      eigen_assert(m_row+m_currentBlockRows<=m_xpr.rows()\n        && \"Too many rows passed to comma initializer (operator<<)\");\n    }\n    eigen_assert((m_col + other.cols() <= m_xpr.cols())\n      && \"Too many coefficients passed to comma initializer (operator<<)\");\n    eigen_assert(m_currentBlockRows==other.rows());\n    m_xpr.template block<OtherDerived::RowsAtCompileTime, OtherDerived::ColsAtCompileTime>\n                    (m_row, m_col, other.rows(), other.cols()) = other;\n    m_col += other.cols();\n    return *this;\n  }\n\n  EIGEN_DEVICE_FUNC\n  inline ~CommaInitializer()\n#if defined VERIFY_RAISES_ASSERT && (!defined EIGEN_NO_ASSERTION_CHECKING) && defined EIGEN_EXCEPTIONS\n  EIGEN_EXCEPTION_SPEC(Eigen::eigen_assert_exception)\n#endif\n  {\n    finished();\n  }\n\n  /** \\returns the built matrix once all its coefficients have been set.\n    * Calling finished is 100% optional. Its purpose is to write expressions\n    * like this:\n    * \\code\n    * quaternion.fromRotationMatrix((Matrix3f() << axis0, axis1, axis2).finished());\n    * \\endcode\n    */\n  EIGEN_DEVICE_FUNC\n  inline XprType& finished() {\n      eigen_assert(((m_row+m_currentBlockRows) == m_xpr.rows() || m_xpr.cols() == 0)\n           && m_col == m_xpr.cols()\n           && \"Too few coefficients passed to comma initializer (operator<<)\");\n      return m_xpr;\n  }\n\n  XprType& m_xpr;           // target expression\n  Index m_row;              // current row id\n  Index m_col;              // current col id\n  Index m_currentBlockRows; // current block height\n};\n\n/** \\anchor MatrixBaseCommaInitRef\n  * Convenient operator to set the coefficients of a matrix.\n  *\n  * The coefficients must be provided in a row major order and exactly match\n  * the size of the matrix. Otherwise an assertion is raised.\n  *\n  * Example: \\include MatrixBase_set.cpp\n  * Output: \\verbinclude MatrixBase_set.out\n  * \n  * \\note According the c++ standard, the argument expressions of this comma initializer are evaluated in arbitrary order.\n  *\n  * \\sa CommaInitializer::finished(), class CommaInitializer\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC inline CommaInitializer<Derived> DenseBase<Derived>::operator<< (const Scalar& s)\n{\n  return CommaInitializer<Derived>(*static_cast<Derived*>(this), s);\n}\n\n/** \\sa operator<<(const Scalar&) */\ntemplate<typename Derived>\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC inline CommaInitializer<Derived>\nDenseBase<Derived>::operator<<(const DenseBase<OtherDerived>& other)\n{\n  return CommaInitializer<Derived>(*static_cast<Derived *>(this), other);\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_COMMAINITIALIZER_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/ConditionEstimator.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Rasmus Munk Larsen (rmlarsen@google.com)\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CONDITIONESTIMATOR_H\n#define EIGEN_CONDITIONESTIMATOR_H\n\nnamespace Eigen {\n\nnamespace internal {\n\ntemplate <typename Vector, typename RealVector, bool IsComplex>\nstruct rcond_compute_sign {\n  static inline Vector run(const Vector& v) {\n    const RealVector v_abs = v.cwiseAbs();\n    return (v_abs.array() == static_cast<typename Vector::RealScalar>(0))\n            .select(Vector::Ones(v.size()), v.cwiseQuotient(v_abs));\n  }\n};\n\n// Partial specialization to avoid elementwise division for real vectors.\ntemplate <typename Vector>\nstruct rcond_compute_sign<Vector, Vector, false> {\n  static inline Vector run(const Vector& v) {\n    return (v.array() < static_cast<typename Vector::RealScalar>(0))\n           .select(-Vector::Ones(v.size()), Vector::Ones(v.size()));\n  }\n};\n\n/**\n  * \\returns an estimate of ||inv(matrix)||_1 given a decomposition of\n  * \\a matrix that implements .solve() and .adjoint().solve() methods.\n  *\n  * This function implements Algorithms 4.1 and 5.1 from\n  *   http://www.maths.manchester.ac.uk/~higham/narep/narep135.pdf\n  * which also forms the basis for the condition number estimators in\n  * LAPACK. Since at most 10 calls to the solve method of dec are\n  * performed, the total cost is O(dims^2), as opposed to O(dims^3)\n  * needed to compute the inverse matrix explicitly.\n  *\n  * The most common usage is in estimating the condition number\n  * ||matrix||_1 * ||inv(matrix)||_1. The first term ||matrix||_1 can be\n  * computed directly in O(n^2) operations.\n  *\n  * Supports the following decompositions: FullPivLU, PartialPivLU, LDLT, and\n  * LLT.\n  *\n  * \\sa FullPivLU, PartialPivLU, LDLT, LLT.\n  */\ntemplate <typename Decomposition>\ntypename Decomposition::RealScalar rcond_invmatrix_L1_norm_estimate(const Decomposition& dec)\n{\n  typedef typename Decomposition::MatrixType MatrixType;\n  typedef typename Decomposition::Scalar Scalar;\n  typedef typename Decomposition::RealScalar RealScalar;\n  typedef typename internal::plain_col_type<MatrixType>::type Vector;\n  typedef typename internal::plain_col_type<MatrixType, RealScalar>::type RealVector;\n  const bool is_complex = (NumTraits<Scalar>::IsComplex != 0);\n\n  eigen_assert(dec.rows() == dec.cols());\n  const Index n = dec.rows();\n  if (n == 0)\n    return 0;\n\n  // Disable Index to float conversion warning\n#ifdef __INTEL_COMPILER\n  #pragma warning push\n  #pragma warning ( disable : 2259 )\n#endif\n  Vector v = dec.solve(Vector::Ones(n) / Scalar(n));\n#ifdef __INTEL_COMPILER\n  #pragma warning pop\n#endif\n\n  // lower_bound is a lower bound on\n  //   ||inv(matrix)||_1  = sup_v ||inv(matrix) v||_1 / ||v||_1\n  // and is the objective maximized by the (\"super-\") gradient ascent\n  // algorithm below.\n  RealScalar lower_bound = v.template lpNorm<1>();\n  if (n == 1)\n    return lower_bound;\n\n  // Gradient ascent algorithm follows: We know that the optimum is achieved at\n  // one of the simplices v = e_i, so in each iteration we follow a\n  // super-gradient to move towards the optimal one.\n  RealScalar old_lower_bound = lower_bound;\n  Vector sign_vector(n);\n  Vector old_sign_vector;\n  Index v_max_abs_index = -1;\n  Index old_v_max_abs_index = v_max_abs_index;\n  for (int k = 0; k < 4; ++k)\n  {\n    sign_vector = internal::rcond_compute_sign<Vector, RealVector, is_complex>::run(v);\n    if (k > 0 && !is_complex && sign_vector == old_sign_vector) {\n      // Break if the solution stagnated.\n      break;\n    }\n    // v_max_abs_index = argmax |real( inv(matrix)^T * sign_vector )|\n    v = dec.adjoint().solve(sign_vector);\n    v.real().cwiseAbs().maxCoeff(&v_max_abs_index);\n    if (v_max_abs_index == old_v_max_abs_index) {\n      // Break if the solution stagnated.\n      break;\n    }\n    // Move to the new simplex e_j, where j = v_max_abs_index.\n    v = dec.solve(Vector::Unit(n, v_max_abs_index));  // v = inv(matrix) * e_j.\n    lower_bound = v.template lpNorm<1>();\n    if (lower_bound <= old_lower_bound) {\n      // Break if the gradient step did not increase the lower_bound.\n      break;\n    }\n    if (!is_complex) {\n      old_sign_vector = sign_vector;\n    }\n    old_v_max_abs_index = v_max_abs_index;\n    old_lower_bound = lower_bound;\n  }\n  // The following calculates an independent estimate of ||matrix||_1 by\n  // multiplying matrix by a vector with entries of slowly increasing\n  // magnitude and alternating sign:\n  //   v_i = (-1)^{i} (1 + (i / (dim-1))), i = 0,...,dim-1.\n  // This improvement to Hager's algorithm above is due to Higham. It was\n  // added to make the algorithm more robust in certain corner cases where\n  // large elements in the matrix might otherwise escape detection due to\n  // exact cancellation (especially when op and op_adjoint correspond to a\n  // sequence of backsubstitutions and permutations), which could cause\n  // Hager's algorithm to vastly underestimate ||matrix||_1.\n  Scalar alternating_sign(RealScalar(1));\n  for (Index i = 0; i < n; ++i) {\n    // The static_cast is needed when Scalar is a complex and RealScalar implements expression templates\n    v[i] = alternating_sign * static_cast<RealScalar>(RealScalar(1) + (RealScalar(i) / (RealScalar(n - 1))));\n    alternating_sign = -alternating_sign;\n  }\n  v = dec.solve(v);\n  const RealScalar alternate_lower_bound = (2 * v.template lpNorm<1>()) / (3 * RealScalar(n));\n  return numext::maxi(lower_bound, alternate_lower_bound);\n}\n\n/** \\brief Reciprocal condition number estimator.\n  *\n  * Computing a decomposition of a dense matrix takes O(n^3) operations, while\n  * this method estimates the condition number quickly and reliably in O(n^2)\n  * operations.\n  *\n  * \\returns an estimate of the reciprocal condition number\n  * (1 / (||matrix||_1 * ||inv(matrix)||_1)) of matrix, given ||matrix||_1 and\n  * its decomposition. Supports the following decompositions: FullPivLU,\n  * PartialPivLU, LDLT, and LLT.\n  *\n  * \\sa FullPivLU, PartialPivLU, LDLT, LLT.\n  */\ntemplate <typename Decomposition>\ntypename Decomposition::RealScalar\nrcond_estimate_helper(typename Decomposition::RealScalar matrix_norm, const Decomposition& dec)\n{\n  typedef typename Decomposition::RealScalar RealScalar;\n  eigen_assert(dec.rows() == dec.cols());\n  if (dec.rows() == 0)              return NumTraits<RealScalar>::infinity();\n  if (matrix_norm == RealScalar(0)) return RealScalar(0);\n  if (dec.rows() == 1)              return RealScalar(1);\n  const RealScalar inverse_matrix_norm = rcond_invmatrix_L1_norm_estimate(dec);\n  return (inverse_matrix_norm == RealScalar(0) ? RealScalar(0)\n                                               : (RealScalar(1) / inverse_matrix_norm) / matrix_norm);\n}\n\n}  // namespace internal\n\n}  // namespace Eigen\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/CoreEvaluators.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2011 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2011-2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2011-2012 Jitse Niesen <jitse@maths.leeds.ac.uk>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n\n#ifndef EIGEN_COREEVALUATORS_H\n#define EIGEN_COREEVALUATORS_H\n\nnamespace Eigen {\n  \nnamespace internal {\n\n// This class returns the evaluator kind from the expression storage kind.\n// Default assumes index based accessors\ntemplate<typename StorageKind>\nstruct storage_kind_to_evaluator_kind {\n  typedef IndexBased Kind;\n};\n\n// This class returns the evaluator shape from the expression storage kind.\n// It can be Dense, Sparse, Triangular, Diagonal, SelfAdjoint, Band, etc.\ntemplate<typename StorageKind> struct storage_kind_to_shape;\n\ntemplate<> struct storage_kind_to_shape<Dense>                  { typedef DenseShape Shape;           };\ntemplate<> struct storage_kind_to_shape<SolverStorage>          { typedef SolverShape Shape;           };\ntemplate<> struct storage_kind_to_shape<PermutationStorage>     { typedef PermutationShape Shape;     };\ntemplate<> struct storage_kind_to_shape<TranspositionsStorage>  { typedef TranspositionsShape Shape;  };\n\n// Evaluators have to be specialized with respect to various criteria such as:\n//  - storage/structure/shape\n//  - scalar type\n//  - etc.\n// Therefore, we need specialization of evaluator providing additional template arguments for each kind of evaluators.\n// We currently distinguish the following kind of evaluators:\n// - unary_evaluator    for expressions taking only one arguments (CwiseUnaryOp, CwiseUnaryView, Transpose, MatrixWrapper, ArrayWrapper, Reverse, Replicate)\n// - binary_evaluator   for expression taking two arguments (CwiseBinaryOp)\n// - ternary_evaluator   for expression taking three arguments (CwiseTernaryOp)\n// - product_evaluator  for linear algebra products (Product); special case of binary_evaluator because it requires additional tags for dispatching.\n// - mapbase_evaluator  for Map, Block, Ref\n// - block_evaluator    for Block (special dispatching to a mapbase_evaluator or unary_evaluator)\n\ntemplate< typename T,\n          typename Arg1Kind   = typename evaluator_traits<typename T::Arg1>::Kind,\n          typename Arg2Kind   = typename evaluator_traits<typename T::Arg2>::Kind,\n          typename Arg3Kind   = typename evaluator_traits<typename T::Arg3>::Kind,\n          typename Arg1Scalar = typename traits<typename T::Arg1>::Scalar,\n          typename Arg2Scalar = typename traits<typename T::Arg2>::Scalar,\n          typename Arg3Scalar = typename traits<typename T::Arg3>::Scalar> struct ternary_evaluator;\n\ntemplate< typename T,\n          typename LhsKind   = typename evaluator_traits<typename T::Lhs>::Kind,\n          typename RhsKind   = typename evaluator_traits<typename T::Rhs>::Kind,\n          typename LhsScalar = typename traits<typename T::Lhs>::Scalar,\n          typename RhsScalar = typename traits<typename T::Rhs>::Scalar> struct binary_evaluator;\n\ntemplate< typename T,\n          typename Kind   = typename evaluator_traits<typename T::NestedExpression>::Kind,\n          typename Scalar = typename T::Scalar> struct unary_evaluator;\n          \n// evaluator_traits<T> contains traits for evaluator<T> \n\ntemplate<typename T>\nstruct evaluator_traits_base\n{\n  // by default, get evaluator kind and shape from storage\n  typedef typename storage_kind_to_evaluator_kind<typename traits<T>::StorageKind>::Kind Kind;\n  typedef typename storage_kind_to_shape<typename traits<T>::StorageKind>::Shape Shape;\n};\n\n// Default evaluator traits\ntemplate<typename T>\nstruct evaluator_traits : public evaluator_traits_base<T>\n{\n};\n\ntemplate<typename T, typename Shape = typename evaluator_traits<T>::Shape >\nstruct evaluator_assume_aliasing {\n  static const bool value = false;\n};\n\n// By default, we assume a unary expression:\ntemplate<typename T>\nstruct evaluator : public unary_evaluator<T>\n{\n  typedef unary_evaluator<T> Base;\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  explicit evaluator(const T& xpr) : Base(xpr) {}\n};\n\n\n// TODO: Think about const-correctness\ntemplate<typename T>\nstruct evaluator<const T>\n  : evaluator<T>\n{\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  explicit evaluator(const T& xpr) : evaluator<T>(xpr) {}\n};\n\n// ---------- base class for all evaluators ----------\n\ntemplate<typename ExpressionType>\nstruct evaluator_base\n{\n  // TODO that's not very nice to have to propagate all these traits. They are currently only needed to handle outer,inner indices.\n  typedef traits<ExpressionType> ExpressionTraits;\n  \n  enum {\n    Alignment = 0\n  };\n  // noncopyable:\n  // Don't make this class inherit noncopyable as this kills EBO (Empty Base Optimization)\n  // and make complex evaluator much larger than then should do.\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE evaluator_base() {}\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ~evaluator_base() {}\nprivate:\n  EIGEN_DEVICE_FUNC evaluator_base(const evaluator_base&);\n  EIGEN_DEVICE_FUNC const evaluator_base& operator=(const evaluator_base&);\n};\n\n// -------------------- Matrix and Array --------------------\n//\n// evaluator<PlainObjectBase> is a common base class for the\n// Matrix and Array evaluators.\n// Here we directly specialize evaluator. This is not really a unary expression, and it is, by definition, dense,\n// so no need for more sophisticated dispatching.\n\n// this helper permits to completely eliminate m_outerStride if it is known at compiletime.\ntemplate<typename Scalar,int OuterStride> class plainobjectbase_evaluator_data {\npublic:\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  plainobjectbase_evaluator_data(const Scalar* ptr, Index outerStride) : data(ptr)\n  {\n#ifndef EIGEN_INTERNAL_DEBUGGING\n    EIGEN_UNUSED_VARIABLE(outerStride);\n#endif\n    eigen_internal_assert(outerStride==OuterStride);\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  Index outerStride() const { return OuterStride; }\n  const Scalar *data;\n};\n\ntemplate<typename Scalar> class plainobjectbase_evaluator_data<Scalar,Dynamic> {\npublic:\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  plainobjectbase_evaluator_data(const Scalar* ptr, Index outerStride) : data(ptr), m_outerStride(outerStride) {}\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  Index outerStride() const { return m_outerStride; }\n  const Scalar *data;\nprotected:\n  Index m_outerStride;\n};\n\ntemplate<typename Derived>\nstruct evaluator<PlainObjectBase<Derived> >\n  : evaluator_base<Derived>\n{\n  typedef PlainObjectBase<Derived> PlainObjectType;\n  typedef typename PlainObjectType::Scalar Scalar;\n  typedef typename PlainObjectType::CoeffReturnType CoeffReturnType;\n\n  enum {\n    IsRowMajor = PlainObjectType::IsRowMajor,\n    IsVectorAtCompileTime = PlainObjectType::IsVectorAtCompileTime,\n    RowsAtCompileTime = PlainObjectType::RowsAtCompileTime,\n    ColsAtCompileTime = PlainObjectType::ColsAtCompileTime,\n    \n    CoeffReadCost = NumTraits<Scalar>::ReadCost,\n    Flags = traits<Derived>::EvaluatorFlags,\n    Alignment = traits<Derived>::Alignment\n  };\n  enum {\n    // We do not need to know the outer stride for vectors\n    OuterStrideAtCompileTime = IsVectorAtCompileTime  ? 0\n                                                      : int(IsRowMajor) ? ColsAtCompileTime\n                                                                        : RowsAtCompileTime\n  };\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  evaluator()\n    : m_d(0,OuterStrideAtCompileTime)\n  {\n    EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  explicit evaluator(const PlainObjectType& m)\n    : m_d(m.data(),IsVectorAtCompileTime ? 0 : m.outerStride())\n  {\n    EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  CoeffReturnType coeff(Index row, Index col) const\n  {\n    if (IsRowMajor)\n      return m_d.data[row * m_d.outerStride() + col];\n    else\n      return m_d.data[row + col * m_d.outerStride()];\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  CoeffReturnType coeff(Index index) const\n  {\n    return m_d.data[index];\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  Scalar& coeffRef(Index row, Index col)\n  {\n    if (IsRowMajor)\n      return const_cast<Scalar*>(m_d.data)[row * m_d.outerStride() + col];\n    else\n      return const_cast<Scalar*>(m_d.data)[row + col * m_d.outerStride()];\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  Scalar& coeffRef(Index index)\n  {\n    return const_cast<Scalar*>(m_d.data)[index];\n  }\n\n  template<int LoadMode, typename PacketType>\n  EIGEN_STRONG_INLINE\n  PacketType packet(Index row, Index col) const\n  {\n    if (IsRowMajor)\n      return ploadt<PacketType, LoadMode>(m_d.data + row * m_d.outerStride() + col);\n    else\n      return ploadt<PacketType, LoadMode>(m_d.data + row + col * m_d.outerStride());\n  }\n\n  template<int LoadMode, typename PacketType>\n  EIGEN_STRONG_INLINE\n  PacketType packet(Index index) const\n  {\n    return ploadt<PacketType, LoadMode>(m_d.data + index);\n  }\n\n  template<int StoreMode,typename PacketType>\n  EIGEN_STRONG_INLINE\n  void writePacket(Index row, Index col, const PacketType& x)\n  {\n    if (IsRowMajor)\n      return pstoret<Scalar, PacketType, StoreMode>\n\t            (const_cast<Scalar*>(m_d.data) + row * m_d.outerStride() + col, x);\n    else\n      return pstoret<Scalar, PacketType, StoreMode>\n                    (const_cast<Scalar*>(m_d.data) + row + col * m_d.outerStride(), x);\n  }\n\n  template<int StoreMode, typename PacketType>\n  EIGEN_STRONG_INLINE\n  void writePacket(Index index, const PacketType& x)\n  {\n    return pstoret<Scalar, PacketType, StoreMode>(const_cast<Scalar*>(m_d.data) + index, x);\n  }\n\nprotected:\n\n  plainobjectbase_evaluator_data<Scalar,OuterStrideAtCompileTime> m_d;\n};\n\ntemplate<typename Scalar, int Rows, int Cols, int Options, int MaxRows, int MaxCols>\nstruct evaluator<Matrix<Scalar, Rows, Cols, Options, MaxRows, MaxCols> >\n  : evaluator<PlainObjectBase<Matrix<Scalar, Rows, Cols, Options, MaxRows, MaxCols> > >\n{\n  typedef Matrix<Scalar, Rows, Cols, Options, MaxRows, MaxCols> XprType;\n  \n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  evaluator() {}\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  explicit evaluator(const XprType& m)\n    : evaluator<PlainObjectBase<XprType> >(m) \n  { }\n};\n\ntemplate<typename Scalar, int Rows, int Cols, int Options, int MaxRows, int MaxCols>\nstruct evaluator<Array<Scalar, Rows, Cols, Options, MaxRows, MaxCols> >\n  : evaluator<PlainObjectBase<Array<Scalar, Rows, Cols, Options, MaxRows, MaxCols> > >\n{\n  typedef Array<Scalar, Rows, Cols, Options, MaxRows, MaxCols> XprType;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  evaluator() {}\n  \n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  explicit evaluator(const XprType& m)\n    : evaluator<PlainObjectBase<XprType> >(m) \n  { }\n};\n\n// -------------------- Transpose --------------------\n\ntemplate<typename ArgType>\nstruct unary_evaluator<Transpose<ArgType>, IndexBased>\n  : evaluator_base<Transpose<ArgType> >\n{\n  typedef Transpose<ArgType> XprType;\n  \n  enum {\n    CoeffReadCost = evaluator<ArgType>::CoeffReadCost,    \n    Flags = evaluator<ArgType>::Flags ^ RowMajorBit,\n    Alignment = evaluator<ArgType>::Alignment\n  };\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  explicit unary_evaluator(const XprType& t) : m_argImpl(t.nestedExpression()) {}\n\n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  CoeffReturnType coeff(Index row, Index col) const\n  {\n    return m_argImpl.coeff(col, row);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  CoeffReturnType coeff(Index index) const\n  {\n    return m_argImpl.coeff(index);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  Scalar& coeffRef(Index row, Index col)\n  {\n    return m_argImpl.coeffRef(col, row);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  typename XprType::Scalar& coeffRef(Index index)\n  {\n    return m_argImpl.coeffRef(index);\n  }\n\n  template<int LoadMode, typename PacketType>\n  EIGEN_STRONG_INLINE\n  PacketType packet(Index row, Index col) const\n  {\n    return m_argImpl.template packet<LoadMode,PacketType>(col, row);\n  }\n\n  template<int LoadMode, typename PacketType>\n  EIGEN_STRONG_INLINE\n  PacketType packet(Index index) const\n  {\n    return m_argImpl.template packet<LoadMode,PacketType>(index);\n  }\n\n  template<int StoreMode, typename PacketType>\n  EIGEN_STRONG_INLINE\n  void writePacket(Index row, Index col, const PacketType& x)\n  {\n    m_argImpl.template writePacket<StoreMode,PacketType>(col, row, x);\n  }\n\n  template<int StoreMode, typename PacketType>\n  EIGEN_STRONG_INLINE\n  void writePacket(Index index, const PacketType& x)\n  {\n    m_argImpl.template writePacket<StoreMode,PacketType>(index, x);\n  }\n\nprotected:\n  evaluator<ArgType> m_argImpl;\n};\n\n// -------------------- CwiseNullaryOp --------------------\n// Like Matrix and Array, this is not really a unary expression, so we directly specialize evaluator.\n// Likewise, there is not need to more sophisticated dispatching here.\n\ntemplate<typename Scalar,typename NullaryOp,\n         bool has_nullary = has_nullary_operator<NullaryOp>::value,\n         bool has_unary   = has_unary_operator<NullaryOp>::value,\n         bool has_binary  = has_binary_operator<NullaryOp>::value>\nstruct nullary_wrapper\n{\n  template <typename IndexType>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar operator()(const NullaryOp& op, IndexType i, IndexType j) const { return op(i,j); }\n  template <typename IndexType>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar operator()(const NullaryOp& op, IndexType i) const { return op(i); }\n\n  template <typename T, typename IndexType> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T packetOp(const NullaryOp& op, IndexType i, IndexType j) const { return op.template packetOp<T>(i,j); }\n  template <typename T, typename IndexType> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T packetOp(const NullaryOp& op, IndexType i) const { return op.template packetOp<T>(i); }\n};\n\ntemplate<typename Scalar,typename NullaryOp>\nstruct nullary_wrapper<Scalar,NullaryOp,true,false,false>\n{\n  template <typename IndexType>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar operator()(const NullaryOp& op, IndexType=0, IndexType=0) const { return op(); }\n  template <typename T, typename IndexType> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T packetOp(const NullaryOp& op, IndexType=0, IndexType=0) const { return op.template packetOp<T>(); }\n};\n\ntemplate<typename Scalar,typename NullaryOp>\nstruct nullary_wrapper<Scalar,NullaryOp,false,false,true>\n{\n  template <typename IndexType>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar operator()(const NullaryOp& op, IndexType i, IndexType j=0) const { return op(i,j); }\n  template <typename T, typename IndexType> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T packetOp(const NullaryOp& op, IndexType i, IndexType j=0) const { return op.template packetOp<T>(i,j); }\n};\n\n// We need the following specialization for vector-only functors assigned to a runtime vector,\n// for instance, using linspace and assigning a RowVectorXd to a MatrixXd or even a row of a MatrixXd.\n// In this case, i==0 and j is used for the actual iteration.\ntemplate<typename Scalar,typename NullaryOp>\nstruct nullary_wrapper<Scalar,NullaryOp,false,true,false>\n{\n  template <typename IndexType>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar operator()(const NullaryOp& op, IndexType i, IndexType j) const {\n    eigen_assert(i==0 || j==0);\n    return op(i+j);\n  }\n  template <typename T, typename IndexType> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T packetOp(const NullaryOp& op, IndexType i, IndexType j) const {\n    eigen_assert(i==0 || j==0);\n    return op.template packetOp<T>(i+j);\n  }\n\n  template <typename IndexType>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar operator()(const NullaryOp& op, IndexType i) const { return op(i); }\n  template <typename T, typename IndexType>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T packetOp(const NullaryOp& op, IndexType i) const { return op.template packetOp<T>(i); }\n};\n\ntemplate<typename Scalar,typename NullaryOp>\nstruct nullary_wrapper<Scalar,NullaryOp,false,false,false> {};\n\n#if 0 && EIGEN_COMP_MSVC>0\n// Disable this ugly workaround. This is now handled in traits<Ref>::match,\n// but this piece of code might still become handly if some other weird compilation\n// erros pop up again.\n\n// MSVC exhibits a weird compilation error when\n// compiling:\n//    Eigen::MatrixXf A = MatrixXf::Random(3,3);\n//    Ref<const MatrixXf> R = 2.f*A;\n// and that has_*ary_operator<scalar_constant_op<float>> have not been instantiated yet.\n// The \"problem\" is that evaluator<2.f*A> is instantiated by traits<Ref>::match<2.f*A>\n// and at that time has_*ary_operator<T> returns true regardless of T.\n// Then nullary_wrapper is badly instantiated as nullary_wrapper<.,.,true,true,true>.\n// The trick is thus to defer the proper instantiation of nullary_wrapper when coeff(),\n// and packet() are really instantiated as implemented below:\n\n// This is a simple wrapper around Index to enforce the re-instantiation of\n// has_*ary_operator when needed.\ntemplate<typename T> struct nullary_wrapper_workaround_msvc {\n  nullary_wrapper_workaround_msvc(const T&);\n  operator T()const;\n};\n\ntemplate<typename Scalar,typename NullaryOp>\nstruct nullary_wrapper<Scalar,NullaryOp,true,true,true>\n{\n  template <typename IndexType>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar operator()(const NullaryOp& op, IndexType i, IndexType j) const {\n    return nullary_wrapper<Scalar,NullaryOp,\n    has_nullary_operator<NullaryOp,nullary_wrapper_workaround_msvc<IndexType> >::value,\n    has_unary_operator<NullaryOp,nullary_wrapper_workaround_msvc<IndexType> >::value,\n    has_binary_operator<NullaryOp,nullary_wrapper_workaround_msvc<IndexType> >::value>().operator()(op,i,j);\n  }\n  template <typename IndexType>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar operator()(const NullaryOp& op, IndexType i) const {\n    return nullary_wrapper<Scalar,NullaryOp,\n    has_nullary_operator<NullaryOp,nullary_wrapper_workaround_msvc<IndexType> >::value,\n    has_unary_operator<NullaryOp,nullary_wrapper_workaround_msvc<IndexType> >::value,\n    has_binary_operator<NullaryOp,nullary_wrapper_workaround_msvc<IndexType> >::value>().operator()(op,i);\n  }\n\n  template <typename T, typename IndexType>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T packetOp(const NullaryOp& op, IndexType i, IndexType j) const {\n    return nullary_wrapper<Scalar,NullaryOp,\n    has_nullary_operator<NullaryOp,nullary_wrapper_workaround_msvc<IndexType> >::value,\n    has_unary_operator<NullaryOp,nullary_wrapper_workaround_msvc<IndexType> >::value,\n    has_binary_operator<NullaryOp,nullary_wrapper_workaround_msvc<IndexType> >::value>().template packetOp<T>(op,i,j);\n  }\n  template <typename T, typename IndexType>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T packetOp(const NullaryOp& op, IndexType i) const {\n    return nullary_wrapper<Scalar,NullaryOp,\n    has_nullary_operator<NullaryOp,nullary_wrapper_workaround_msvc<IndexType> >::value,\n    has_unary_operator<NullaryOp,nullary_wrapper_workaround_msvc<IndexType> >::value,\n    has_binary_operator<NullaryOp,nullary_wrapper_workaround_msvc<IndexType> >::value>().template packetOp<T>(op,i);\n  }\n};\n#endif // MSVC workaround\n\ntemplate<typename NullaryOp, typename PlainObjectType>\nstruct evaluator<CwiseNullaryOp<NullaryOp,PlainObjectType> >\n  : evaluator_base<CwiseNullaryOp<NullaryOp,PlainObjectType> >\n{\n  typedef CwiseNullaryOp<NullaryOp,PlainObjectType> XprType;\n  typedef typename internal::remove_all<PlainObjectType>::type PlainObjectTypeCleaned;\n  \n  enum {\n    CoeffReadCost = internal::functor_traits<NullaryOp>::Cost,\n    \n    Flags = (evaluator<PlainObjectTypeCleaned>::Flags\n          &  (  HereditaryBits\n              | (functor_has_linear_access<NullaryOp>::ret  ? LinearAccessBit : 0)\n              | (functor_traits<NullaryOp>::PacketAccess    ? PacketAccessBit : 0)))\n          | (functor_traits<NullaryOp>::IsRepeatable ? 0 : EvalBeforeNestingBit),\n    Alignment = AlignedMax\n  };\n\n  EIGEN_DEVICE_FUNC explicit evaluator(const XprType& n)\n    : m_functor(n.functor()), m_wrapper()\n  {\n    EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);\n  }\n\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n\n  template <typename IndexType>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  CoeffReturnType coeff(IndexType row, IndexType col) const\n  {\n    return m_wrapper(m_functor, row, col);\n  }\n\n  template <typename IndexType>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  CoeffReturnType coeff(IndexType index) const\n  {\n    return m_wrapper(m_functor,index);\n  }\n\n  template<int LoadMode, typename PacketType, typename IndexType>\n  EIGEN_STRONG_INLINE\n  PacketType packet(IndexType row, IndexType col) const\n  {\n    return m_wrapper.template packetOp<PacketType>(m_functor, row, col);\n  }\n\n  template<int LoadMode, typename PacketType, typename IndexType>\n  EIGEN_STRONG_INLINE\n  PacketType packet(IndexType index) const\n  {\n    return m_wrapper.template packetOp<PacketType>(m_functor, index);\n  }\n\nprotected:\n  const NullaryOp m_functor;\n  const internal::nullary_wrapper<CoeffReturnType,NullaryOp> m_wrapper;\n};\n\n// -------------------- CwiseUnaryOp --------------------\n\ntemplate<typename UnaryOp, typename ArgType>\nstruct unary_evaluator<CwiseUnaryOp<UnaryOp, ArgType>, IndexBased >\n  : evaluator_base<CwiseUnaryOp<UnaryOp, ArgType> >\n{\n  typedef CwiseUnaryOp<UnaryOp, ArgType> XprType;\n  \n  enum {\n    CoeffReadCost = evaluator<ArgType>::CoeffReadCost + functor_traits<UnaryOp>::Cost,\n    \n    Flags = evaluator<ArgType>::Flags\n          & (HereditaryBits | LinearAccessBit | (functor_traits<UnaryOp>::PacketAccess ? PacketAccessBit : 0)),\n    Alignment = evaluator<ArgType>::Alignment\n  };\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  explicit unary_evaluator(const XprType& op) : m_d(op)\n  {\n    EIGEN_INTERNAL_CHECK_COST_VALUE(functor_traits<UnaryOp>::Cost);\n    EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);\n  }\n\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  CoeffReturnType coeff(Index row, Index col) const\n  {\n    return m_d.func()(m_d.argImpl.coeff(row, col));\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  CoeffReturnType coeff(Index index) const\n  {\n    return m_d.func()(m_d.argImpl.coeff(index));\n  }\n\n  template<int LoadMode, typename PacketType>\n  EIGEN_STRONG_INLINE\n  PacketType packet(Index row, Index col) const\n  {\n    return m_d.func().packetOp(m_d.argImpl.template packet<LoadMode, PacketType>(row, col));\n  }\n\n  template<int LoadMode, typename PacketType>\n  EIGEN_STRONG_INLINE\n  PacketType packet(Index index) const\n  {\n    return m_d.func().packetOp(m_d.argImpl.template packet<LoadMode, PacketType>(index));\n  }\n\nprotected:\n\n  // this helper permits to completely eliminate the functor if it is empty\n  class Data : private UnaryOp\n  {\n  public:\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Data(const XprType& xpr) : UnaryOp(xpr.functor()), argImpl(xpr.nestedExpression()) {}\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const UnaryOp& func() const { return static_cast<const UnaryOp&>(*this); }\n    evaluator<ArgType> argImpl;\n  };\n\n  Data m_d;\n};\n\n// -------------------- CwiseTernaryOp --------------------\n\n// this is a ternary expression\ntemplate<typename TernaryOp, typename Arg1, typename Arg2, typename Arg3>\nstruct evaluator<CwiseTernaryOp<TernaryOp, Arg1, Arg2, Arg3> >\n  : public ternary_evaluator<CwiseTernaryOp<TernaryOp, Arg1, Arg2, Arg3> >\n{\n  typedef CwiseTernaryOp<TernaryOp, Arg1, Arg2, Arg3> XprType;\n  typedef ternary_evaluator<CwiseTernaryOp<TernaryOp, Arg1, Arg2, Arg3> > Base;\n  \n  EIGEN_DEVICE_FUNC explicit evaluator(const XprType& xpr) : Base(xpr) {}\n};\n\ntemplate<typename TernaryOp, typename Arg1, typename Arg2, typename Arg3>\nstruct ternary_evaluator<CwiseTernaryOp<TernaryOp, Arg1, Arg2, Arg3>, IndexBased, IndexBased>\n  : evaluator_base<CwiseTernaryOp<TernaryOp, Arg1, Arg2, Arg3> >\n{\n  typedef CwiseTernaryOp<TernaryOp, Arg1, Arg2, Arg3> XprType;\n  \n  enum {\n    CoeffReadCost = evaluator<Arg1>::CoeffReadCost + evaluator<Arg2>::CoeffReadCost + evaluator<Arg3>::CoeffReadCost + functor_traits<TernaryOp>::Cost,\n    \n    Arg1Flags = evaluator<Arg1>::Flags,\n    Arg2Flags = evaluator<Arg2>::Flags,\n    Arg3Flags = evaluator<Arg3>::Flags,\n    SameType = is_same<typename Arg1::Scalar,typename Arg2::Scalar>::value && is_same<typename Arg1::Scalar,typename Arg3::Scalar>::value,\n    StorageOrdersAgree = (int(Arg1Flags)&RowMajorBit)==(int(Arg2Flags)&RowMajorBit) && (int(Arg1Flags)&RowMajorBit)==(int(Arg3Flags)&RowMajorBit),\n    Flags0 = (int(Arg1Flags) | int(Arg2Flags) | int(Arg3Flags)) & (\n        HereditaryBits\n        | (int(Arg1Flags) & int(Arg2Flags) & int(Arg3Flags) &\n           ( (StorageOrdersAgree ? LinearAccessBit : 0)\n           | (functor_traits<TernaryOp>::PacketAccess && StorageOrdersAgree && SameType ? PacketAccessBit : 0)\n           )\n        )\n     ),\n    Flags = (Flags0 & ~RowMajorBit) | (Arg1Flags & RowMajorBit),\n    Alignment = EIGEN_PLAIN_ENUM_MIN(\n        EIGEN_PLAIN_ENUM_MIN(evaluator<Arg1>::Alignment, evaluator<Arg2>::Alignment),\n        evaluator<Arg3>::Alignment)\n  };\n\n  EIGEN_DEVICE_FUNC explicit ternary_evaluator(const XprType& xpr) : m_d(xpr)\n  {\n    EIGEN_INTERNAL_CHECK_COST_VALUE(functor_traits<TernaryOp>::Cost);\n    EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);\n  }\n\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  CoeffReturnType coeff(Index row, Index col) const\n  {\n    return m_d.func()(m_d.arg1Impl.coeff(row, col), m_d.arg2Impl.coeff(row, col), m_d.arg3Impl.coeff(row, col));\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  CoeffReturnType coeff(Index index) const\n  {\n    return m_d.func()(m_d.arg1Impl.coeff(index), m_d.arg2Impl.coeff(index), m_d.arg3Impl.coeff(index));\n  }\n\n  template<int LoadMode, typename PacketType>\n  EIGEN_STRONG_INLINE\n  PacketType packet(Index row, Index col) const\n  {\n    return m_d.func().packetOp(m_d.arg1Impl.template packet<LoadMode,PacketType>(row, col),\n                               m_d.arg2Impl.template packet<LoadMode,PacketType>(row, col),\n                               m_d.arg3Impl.template packet<LoadMode,PacketType>(row, col));\n  }\n\n  template<int LoadMode, typename PacketType>\n  EIGEN_STRONG_INLINE\n  PacketType packet(Index index) const\n  {\n    return m_d.func().packetOp(m_d.arg1Impl.template packet<LoadMode,PacketType>(index),\n                               m_d.arg2Impl.template packet<LoadMode,PacketType>(index),\n                               m_d.arg3Impl.template packet<LoadMode,PacketType>(index));\n  }\n\nprotected:\n  // this helper permits to completely eliminate the functor if it is empty\n  struct Data : private TernaryOp\n  {\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Data(const XprType& xpr) : TernaryOp(xpr.functor()), arg1Impl(xpr.arg1()), arg2Impl(xpr.arg2()), arg3Impl(xpr.arg3()) {}\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TernaryOp& func() const { return static_cast<const TernaryOp&>(*this); }\n    evaluator<Arg1> arg1Impl;\n    evaluator<Arg2> arg2Impl;\n    evaluator<Arg3> arg3Impl;\n  };\n\n  Data m_d;\n};\n\n// -------------------- CwiseBinaryOp --------------------\n\n// this is a binary expression\ntemplate<typename BinaryOp, typename Lhs, typename Rhs>\nstruct evaluator<CwiseBinaryOp<BinaryOp, Lhs, Rhs> >\n  : public binary_evaluator<CwiseBinaryOp<BinaryOp, Lhs, Rhs> >\n{\n  typedef CwiseBinaryOp<BinaryOp, Lhs, Rhs> XprType;\n  typedef binary_evaluator<CwiseBinaryOp<BinaryOp, Lhs, Rhs> > Base;\n  \n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  explicit evaluator(const XprType& xpr) : Base(xpr) {}\n};\n\ntemplate<typename BinaryOp, typename Lhs, typename Rhs>\nstruct binary_evaluator<CwiseBinaryOp<BinaryOp, Lhs, Rhs>, IndexBased, IndexBased>\n  : evaluator_base<CwiseBinaryOp<BinaryOp, Lhs, Rhs> >\n{\n  typedef CwiseBinaryOp<BinaryOp, Lhs, Rhs> XprType;\n  \n  enum {\n    CoeffReadCost = evaluator<Lhs>::CoeffReadCost + evaluator<Rhs>::CoeffReadCost + functor_traits<BinaryOp>::Cost,\n    \n    LhsFlags = evaluator<Lhs>::Flags,\n    RhsFlags = evaluator<Rhs>::Flags,\n    SameType = is_same<typename Lhs::Scalar,typename Rhs::Scalar>::value,\n    StorageOrdersAgree = (int(LhsFlags)&RowMajorBit)==(int(RhsFlags)&RowMajorBit),\n    Flags0 = (int(LhsFlags) | int(RhsFlags)) & (\n        HereditaryBits\n      | (int(LhsFlags) & int(RhsFlags) &\n           ( (StorageOrdersAgree ? LinearAccessBit : 0)\n           | (functor_traits<BinaryOp>::PacketAccess && StorageOrdersAgree && SameType ? PacketAccessBit : 0)\n           )\n        )\n     ),\n    Flags = (Flags0 & ~RowMajorBit) | (LhsFlags & RowMajorBit),\n    Alignment = EIGEN_PLAIN_ENUM_MIN(evaluator<Lhs>::Alignment,evaluator<Rhs>::Alignment)\n  };\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  explicit binary_evaluator(const XprType& xpr) : m_d(xpr)\n  {\n    EIGEN_INTERNAL_CHECK_COST_VALUE(functor_traits<BinaryOp>::Cost);\n    EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);\n  }\n\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  CoeffReturnType coeff(Index row, Index col) const\n  {\n    return m_d.func()(m_d.lhsImpl.coeff(row, col), m_d.rhsImpl.coeff(row, col));\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  CoeffReturnType coeff(Index index) const\n  {\n    return m_d.func()(m_d.lhsImpl.coeff(index), m_d.rhsImpl.coeff(index));\n  }\n\n  template<int LoadMode, typename PacketType>\n  EIGEN_STRONG_INLINE\n  PacketType packet(Index row, Index col) const\n  {\n    return m_d.func().packetOp(m_d.lhsImpl.template packet<LoadMode,PacketType>(row, col),\n                               m_d.rhsImpl.template packet<LoadMode,PacketType>(row, col));\n  }\n\n  template<int LoadMode, typename PacketType>\n  EIGEN_STRONG_INLINE\n  PacketType packet(Index index) const\n  {\n    return m_d.func().packetOp(m_d.lhsImpl.template packet<LoadMode,PacketType>(index),\n                               m_d.rhsImpl.template packet<LoadMode,PacketType>(index));\n  }\n\nprotected:\n\n  // this helper permits to completely eliminate the functor if it is empty\n  struct Data : private BinaryOp\n  {\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Data(const XprType& xpr) : BinaryOp(xpr.functor()), lhsImpl(xpr.lhs()), rhsImpl(xpr.rhs()) {}\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const BinaryOp& func() const { return static_cast<const BinaryOp&>(*this); }\n    evaluator<Lhs> lhsImpl;\n    evaluator<Rhs> rhsImpl;\n  };\n\n  Data m_d;\n};\n\n// -------------------- CwiseUnaryView --------------------\n\ntemplate<typename UnaryOp, typename ArgType>\nstruct unary_evaluator<CwiseUnaryView<UnaryOp, ArgType>, IndexBased>\n  : evaluator_base<CwiseUnaryView<UnaryOp, ArgType> >\n{\n  typedef CwiseUnaryView<UnaryOp, ArgType> XprType;\n  \n  enum {\n    CoeffReadCost = evaluator<ArgType>::CoeffReadCost + functor_traits<UnaryOp>::Cost,\n    \n    Flags = (evaluator<ArgType>::Flags & (HereditaryBits | LinearAccessBit | DirectAccessBit)),\n    \n    Alignment = 0 // FIXME it is not very clear why alignment is necessarily lost...\n  };\n\n  EIGEN_DEVICE_FUNC explicit unary_evaluator(const XprType& op) : m_d(op)\n  {\n    EIGEN_INTERNAL_CHECK_COST_VALUE(functor_traits<UnaryOp>::Cost);\n    EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);\n  }\n\n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  CoeffReturnType coeff(Index row, Index col) const\n  {\n    return m_d.func()(m_d.argImpl.coeff(row, col));\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  CoeffReturnType coeff(Index index) const\n  {\n    return m_d.func()(m_d.argImpl.coeff(index));\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  Scalar& coeffRef(Index row, Index col)\n  {\n    return m_d.func()(m_d.argImpl.coeffRef(row, col));\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  Scalar& coeffRef(Index index)\n  {\n    return m_d.func()(m_d.argImpl.coeffRef(index));\n  }\n\nprotected:\n\n  // this helper permits to completely eliminate the functor if it is empty\n  struct Data : private UnaryOp\n  {\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Data(const XprType& xpr) : UnaryOp(xpr.functor()), argImpl(xpr.nestedExpression()) {}\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const UnaryOp& func() const { return static_cast<const UnaryOp&>(*this); }\n    evaluator<ArgType> argImpl;\n  };\n\n  Data m_d;\n};\n\n// -------------------- Map --------------------\n\n// FIXME perhaps the PlainObjectType could be provided by Derived::PlainObject ?\n// but that might complicate template specialization\ntemplate<typename Derived, typename PlainObjectType>\nstruct mapbase_evaluator;\n\ntemplate<typename Derived, typename PlainObjectType>\nstruct mapbase_evaluator : evaluator_base<Derived>\n{\n  typedef Derived  XprType;\n  typedef typename XprType::PointerType PointerType;\n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  \n  enum {\n    IsRowMajor = XprType::RowsAtCompileTime,\n    ColsAtCompileTime = XprType::ColsAtCompileTime,\n    CoeffReadCost = NumTraits<Scalar>::ReadCost\n  };\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  explicit mapbase_evaluator(const XprType& map)\n    : m_data(const_cast<PointerType>(map.data())),\n      m_innerStride(map.innerStride()),\n      m_outerStride(map.outerStride())\n  {\n    EIGEN_STATIC_ASSERT(EIGEN_IMPLIES(evaluator<Derived>::Flags&PacketAccessBit, internal::inner_stride_at_compile_time<Derived>::ret==1),\n                        PACKET_ACCESS_REQUIRES_TO_HAVE_INNER_STRIDE_FIXED_TO_1);\n    EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  CoeffReturnType coeff(Index row, Index col) const\n  {\n    return m_data[col * colStride() + row * rowStride()];\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  CoeffReturnType coeff(Index index) const\n  {\n    return m_data[index * m_innerStride.value()];\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  Scalar& coeffRef(Index row, Index col)\n  {\n    return m_data[col * colStride() + row * rowStride()];\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  Scalar& coeffRef(Index index)\n  {\n    return m_data[index * m_innerStride.value()];\n  }\n\n  template<int LoadMode, typename PacketType>\n  EIGEN_STRONG_INLINE\n  PacketType packet(Index row, Index col) const\n  {\n    PointerType ptr = m_data + row * rowStride() + col * colStride();\n    return internal::ploadt<PacketType, LoadMode>(ptr);\n  }\n\n  template<int LoadMode, typename PacketType>\n  EIGEN_STRONG_INLINE\n  PacketType packet(Index index) const\n  {\n    return internal::ploadt<PacketType, LoadMode>(m_data + index * m_innerStride.value());\n  }\n\n  template<int StoreMode, typename PacketType>\n  EIGEN_STRONG_INLINE\n  void writePacket(Index row, Index col, const PacketType& x)\n  {\n    PointerType ptr = m_data + row * rowStride() + col * colStride();\n    return internal::pstoret<Scalar, PacketType, StoreMode>(ptr, x);\n  }\n\n  template<int StoreMode, typename PacketType>\n  EIGEN_STRONG_INLINE\n  void writePacket(Index index, const PacketType& x)\n  {\n    internal::pstoret<Scalar, PacketType, StoreMode>(m_data + index * m_innerStride.value(), x);\n  }\nprotected:\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  Index rowStride() const { return XprType::IsRowMajor ? m_outerStride.value() : m_innerStride.value(); }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  Index colStride() const { return XprType::IsRowMajor ? m_innerStride.value() : m_outerStride.value(); }\n\n  PointerType m_data;\n  const internal::variable_if_dynamic<Index, XprType::InnerStrideAtCompileTime> m_innerStride;\n  const internal::variable_if_dynamic<Index, XprType::OuterStrideAtCompileTime> m_outerStride;\n};\n\ntemplate<typename PlainObjectType, int MapOptions, typename StrideType> \nstruct evaluator<Map<PlainObjectType, MapOptions, StrideType> >\n  : public mapbase_evaluator<Map<PlainObjectType, MapOptions, StrideType>, PlainObjectType>\n{\n  typedef Map<PlainObjectType, MapOptions, StrideType> XprType;\n  typedef typename XprType::Scalar Scalar;\n  // TODO: should check for smaller packet types once we can handle multi-sized packet types\n  typedef typename packet_traits<Scalar>::type PacketScalar;\n  \n  enum {\n    InnerStrideAtCompileTime = StrideType::InnerStrideAtCompileTime == 0\n                             ? int(PlainObjectType::InnerStrideAtCompileTime)\n                             : int(StrideType::InnerStrideAtCompileTime),\n    OuterStrideAtCompileTime = StrideType::OuterStrideAtCompileTime == 0\n                             ? int(PlainObjectType::OuterStrideAtCompileTime)\n                             : int(StrideType::OuterStrideAtCompileTime),\n    HasNoInnerStride = InnerStrideAtCompileTime == 1,\n    HasNoOuterStride = StrideType::OuterStrideAtCompileTime == 0,\n    HasNoStride = HasNoInnerStride && HasNoOuterStride,\n    IsDynamicSize = PlainObjectType::SizeAtCompileTime==Dynamic,\n    \n    PacketAccessMask = bool(HasNoInnerStride) ? ~int(0) : ~int(PacketAccessBit),\n    LinearAccessMask = bool(HasNoStride) || bool(PlainObjectType::IsVectorAtCompileTime) ? ~int(0) : ~int(LinearAccessBit),\n    Flags = int( evaluator<PlainObjectType>::Flags) & (LinearAccessMask&PacketAccessMask),\n    \n    Alignment = int(MapOptions)&int(AlignedMask)\n  };\n\n  EIGEN_DEVICE_FUNC explicit evaluator(const XprType& map)\n    : mapbase_evaluator<XprType, PlainObjectType>(map) \n  { }\n};\n\n// -------------------- Ref --------------------\n\ntemplate<typename PlainObjectType, int RefOptions, typename StrideType> \nstruct evaluator<Ref<PlainObjectType, RefOptions, StrideType> >\n  : public mapbase_evaluator<Ref<PlainObjectType, RefOptions, StrideType>, PlainObjectType>\n{\n  typedef Ref<PlainObjectType, RefOptions, StrideType> XprType;\n  \n  enum {\n    Flags = evaluator<Map<PlainObjectType, RefOptions, StrideType> >::Flags,\n    Alignment = evaluator<Map<PlainObjectType, RefOptions, StrideType> >::Alignment\n  };\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  explicit evaluator(const XprType& ref)\n    : mapbase_evaluator<XprType, PlainObjectType>(ref) \n  { }\n};\n\n// -------------------- Block --------------------\n\ntemplate<typename ArgType, int BlockRows, int BlockCols, bool InnerPanel,\n         bool HasDirectAccess = internal::has_direct_access<ArgType>::ret> struct block_evaluator;\n         \ntemplate<typename ArgType, int BlockRows, int BlockCols, bool InnerPanel> \nstruct evaluator<Block<ArgType, BlockRows, BlockCols, InnerPanel> >\n  : block_evaluator<ArgType, BlockRows, BlockCols, InnerPanel>\n{\n  typedef Block<ArgType, BlockRows, BlockCols, InnerPanel> XprType;\n  typedef typename XprType::Scalar Scalar;\n  // TODO: should check for smaller packet types once we can handle multi-sized packet types\n  typedef typename packet_traits<Scalar>::type PacketScalar;\n  \n  enum {\n    CoeffReadCost = evaluator<ArgType>::CoeffReadCost,\n    \n    RowsAtCompileTime = traits<XprType>::RowsAtCompileTime,\n    ColsAtCompileTime = traits<XprType>::ColsAtCompileTime,\n    MaxRowsAtCompileTime = traits<XprType>::MaxRowsAtCompileTime,\n    MaxColsAtCompileTime = traits<XprType>::MaxColsAtCompileTime,\n    \n    ArgTypeIsRowMajor = (int(evaluator<ArgType>::Flags)&RowMajorBit) != 0,\n    IsRowMajor = (MaxRowsAtCompileTime==1 && MaxColsAtCompileTime!=1) ? 1\n               : (MaxColsAtCompileTime==1 && MaxRowsAtCompileTime!=1) ? 0\n               : ArgTypeIsRowMajor,\n    HasSameStorageOrderAsArgType = (IsRowMajor == ArgTypeIsRowMajor),\n    InnerSize = IsRowMajor ? int(ColsAtCompileTime) : int(RowsAtCompileTime),\n    InnerStrideAtCompileTime = HasSameStorageOrderAsArgType\n                             ? int(inner_stride_at_compile_time<ArgType>::ret)\n                             : int(outer_stride_at_compile_time<ArgType>::ret),\n    OuterStrideAtCompileTime = HasSameStorageOrderAsArgType\n                             ? int(outer_stride_at_compile_time<ArgType>::ret)\n                             : int(inner_stride_at_compile_time<ArgType>::ret),\n    MaskPacketAccessBit = (InnerStrideAtCompileTime == 1 || HasSameStorageOrderAsArgType) ? PacketAccessBit : 0,\n    \n    FlagsLinearAccessBit = (RowsAtCompileTime == 1 || ColsAtCompileTime == 1 || (InnerPanel && (evaluator<ArgType>::Flags&LinearAccessBit))) ? LinearAccessBit : 0,    \n    FlagsRowMajorBit = XprType::Flags&RowMajorBit,\n    Flags0 = evaluator<ArgType>::Flags & ( (HereditaryBits & ~RowMajorBit) |\n                                           DirectAccessBit |\n                                           MaskPacketAccessBit),\n    Flags = Flags0 | FlagsLinearAccessBit | FlagsRowMajorBit,\n    \n    PacketAlignment = unpacket_traits<PacketScalar>::alignment,\n    Alignment0 = (InnerPanel && (OuterStrideAtCompileTime!=Dynamic)\n                             && (OuterStrideAtCompileTime!=0)\n                             && (((OuterStrideAtCompileTime * int(sizeof(Scalar))) % int(PacketAlignment)) == 0)) ? int(PacketAlignment) : 0,\n    Alignment = EIGEN_PLAIN_ENUM_MIN(evaluator<ArgType>::Alignment, Alignment0)\n  };\n  typedef block_evaluator<ArgType, BlockRows, BlockCols, InnerPanel> block_evaluator_type;\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  explicit evaluator(const XprType& block) : block_evaluator_type(block)\n  {\n    EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);\n  }\n};\n\n// no direct-access => dispatch to a unary evaluator\ntemplate<typename ArgType, int BlockRows, int BlockCols, bool InnerPanel>\nstruct block_evaluator<ArgType, BlockRows, BlockCols, InnerPanel, /*HasDirectAccess*/ false>\n  : unary_evaluator<Block<ArgType, BlockRows, BlockCols, InnerPanel> >\n{\n  typedef Block<ArgType, BlockRows, BlockCols, InnerPanel> XprType;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  explicit block_evaluator(const XprType& block)\n    : unary_evaluator<XprType>(block) \n  {}\n};\n\ntemplate<typename ArgType, int BlockRows, int BlockCols, bool InnerPanel>\nstruct unary_evaluator<Block<ArgType, BlockRows, BlockCols, InnerPanel>, IndexBased>\n  : evaluator_base<Block<ArgType, BlockRows, BlockCols, InnerPanel> >\n{\n  typedef Block<ArgType, BlockRows, BlockCols, InnerPanel> XprType;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  explicit unary_evaluator(const XprType& block)\n    : m_argImpl(block.nestedExpression()), \n      m_startRow(block.startRow()), \n      m_startCol(block.startCol()),\n      m_linear_offset(ForwardLinearAccess?(ArgType::IsRowMajor ? block.startRow()*block.nestedExpression().cols() + block.startCol() : block.startCol()*block.nestedExpression().rows() + block.startRow()):0)\n  { }\n \n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n\n  enum {\n    RowsAtCompileTime = XprType::RowsAtCompileTime,\n    ForwardLinearAccess = (InnerPanel || int(XprType::IsRowMajor)==int(ArgType::IsRowMajor)) && bool(evaluator<ArgType>::Flags&LinearAccessBit)\n  };\n \n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  CoeffReturnType coeff(Index row, Index col) const\n  { \n    return m_argImpl.coeff(m_startRow.value() + row, m_startCol.value() + col); \n  }\n  \n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  CoeffReturnType coeff(Index index) const\n  {\n    return linear_coeff_impl(index, bool_constant<ForwardLinearAccess>());\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  Scalar& coeffRef(Index row, Index col)\n  { \n    return m_argImpl.coeffRef(m_startRow.value() + row, m_startCol.value() + col); \n  }\n  \n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  Scalar& coeffRef(Index index)\n  {\n    return linear_coeffRef_impl(index, bool_constant<ForwardLinearAccess>());\n  }\n \n  template<int LoadMode, typename PacketType>\n  EIGEN_STRONG_INLINE\n  PacketType packet(Index row, Index col) const \n  { \n    return m_argImpl.template packet<LoadMode,PacketType>(m_startRow.value() + row, m_startCol.value() + col); \n  }\n\n  template<int LoadMode, typename PacketType>\n  EIGEN_STRONG_INLINE\n  PacketType packet(Index index) const \n  { \n    if (ForwardLinearAccess)\n      return m_argImpl.template packet<LoadMode,PacketType>(m_linear_offset.value() + index);\n    else\n      return packet<LoadMode,PacketType>(RowsAtCompileTime == 1 ? 0 : index,\n                                         RowsAtCompileTime == 1 ? index : 0);\n  }\n  \n  template<int StoreMode, typename PacketType>\n  EIGEN_STRONG_INLINE\n  void writePacket(Index row, Index col, const PacketType& x) \n  {\n    return m_argImpl.template writePacket<StoreMode,PacketType>(m_startRow.value() + row, m_startCol.value() + col, x); \n  }\n  \n  template<int StoreMode, typename PacketType>\n  EIGEN_STRONG_INLINE\n  void writePacket(Index index, const PacketType& x) \n  {\n    if (ForwardLinearAccess)\n      return m_argImpl.template writePacket<StoreMode,PacketType>(m_linear_offset.value() + index, x);\n    else\n      return writePacket<StoreMode,PacketType>(RowsAtCompileTime == 1 ? 0 : index,\n                                              RowsAtCompileTime == 1 ? index : 0,\n                                              x);\n  }\n \nprotected:\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  CoeffReturnType linear_coeff_impl(Index index, internal::true_type /* ForwardLinearAccess */) const\n  {\n    return m_argImpl.coeff(m_linear_offset.value() + index); \n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  CoeffReturnType linear_coeff_impl(Index index, internal::false_type /* not ForwardLinearAccess */) const\n  {\n    return coeff(RowsAtCompileTime == 1 ? 0 : index, RowsAtCompileTime == 1 ? index : 0);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  Scalar& linear_coeffRef_impl(Index index, internal::true_type /* ForwardLinearAccess */)\n  {\n    return m_argImpl.coeffRef(m_linear_offset.value() + index); \n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  Scalar& linear_coeffRef_impl(Index index, internal::false_type /* not ForwardLinearAccess */)\n  {\n    return coeffRef(RowsAtCompileTime == 1 ? 0 : index, RowsAtCompileTime == 1 ? index : 0);\n  }\n\n  evaluator<ArgType> m_argImpl;\n  const variable_if_dynamic<Index, (ArgType::RowsAtCompileTime == 1 && BlockRows==1) ? 0 : Dynamic> m_startRow;\n  const variable_if_dynamic<Index, (ArgType::ColsAtCompileTime == 1 && BlockCols==1) ? 0 : Dynamic> m_startCol;\n  const variable_if_dynamic<Index, ForwardLinearAccess ? Dynamic : 0> m_linear_offset;\n};\n\n// TODO: This evaluator does not actually use the child evaluator; \n// all action is via the data() as returned by the Block expression.\n\ntemplate<typename ArgType, int BlockRows, int BlockCols, bool InnerPanel> \nstruct block_evaluator<ArgType, BlockRows, BlockCols, InnerPanel, /* HasDirectAccess */ true>\n  : mapbase_evaluator<Block<ArgType, BlockRows, BlockCols, InnerPanel>,\n                      typename Block<ArgType, BlockRows, BlockCols, InnerPanel>::PlainObject>\n{\n  typedef Block<ArgType, BlockRows, BlockCols, InnerPanel> XprType;\n  typedef typename XprType::Scalar Scalar;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  explicit block_evaluator(const XprType& block)\n    : mapbase_evaluator<XprType, typename XprType::PlainObject>(block) \n  {\n    // TODO: for the 3.3 release, this should be turned to an internal assertion, but let's keep it as is for the beta lifetime\n    eigen_assert(((internal::UIntPtr(block.data()) % EIGEN_PLAIN_ENUM_MAX(1,evaluator<XprType>::Alignment)) == 0) && \"data is not aligned\");\n  }\n};\n\n\n// -------------------- Select --------------------\n// NOTE shall we introduce a ternary_evaluator?\n\n// TODO enable vectorization for Select\ntemplate<typename ConditionMatrixType, typename ThenMatrixType, typename ElseMatrixType>\nstruct evaluator<Select<ConditionMatrixType, ThenMatrixType, ElseMatrixType> >\n  : evaluator_base<Select<ConditionMatrixType, ThenMatrixType, ElseMatrixType> >\n{\n  typedef Select<ConditionMatrixType, ThenMatrixType, ElseMatrixType> XprType;\n  enum {\n    CoeffReadCost = evaluator<ConditionMatrixType>::CoeffReadCost\n                  + EIGEN_PLAIN_ENUM_MAX(evaluator<ThenMatrixType>::CoeffReadCost,\n                                         evaluator<ElseMatrixType>::CoeffReadCost),\n\n    Flags = (unsigned int)evaluator<ThenMatrixType>::Flags & evaluator<ElseMatrixType>::Flags & HereditaryBits,\n    \n    Alignment = EIGEN_PLAIN_ENUM_MIN(evaluator<ThenMatrixType>::Alignment, evaluator<ElseMatrixType>::Alignment)\n  };\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  explicit evaluator(const XprType& select)\n    : m_conditionImpl(select.conditionMatrix()),\n      m_thenImpl(select.thenMatrix()),\n      m_elseImpl(select.elseMatrix())\n  {\n    EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);\n  }\n \n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  CoeffReturnType coeff(Index row, Index col) const\n  {\n    if (m_conditionImpl.coeff(row, col))\n      return m_thenImpl.coeff(row, col);\n    else\n      return m_elseImpl.coeff(row, col);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  CoeffReturnType coeff(Index index) const\n  {\n    if (m_conditionImpl.coeff(index))\n      return m_thenImpl.coeff(index);\n    else\n      return m_elseImpl.coeff(index);\n  }\n \nprotected:\n  evaluator<ConditionMatrixType> m_conditionImpl;\n  evaluator<ThenMatrixType> m_thenImpl;\n  evaluator<ElseMatrixType> m_elseImpl;\n};\n\n\n// -------------------- Replicate --------------------\n\ntemplate<typename ArgType, int RowFactor, int ColFactor> \nstruct unary_evaluator<Replicate<ArgType, RowFactor, ColFactor> >\n  : evaluator_base<Replicate<ArgType, RowFactor, ColFactor> >\n{\n  typedef Replicate<ArgType, RowFactor, ColFactor> XprType;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  enum {\n    Factor = (RowFactor==Dynamic || ColFactor==Dynamic) ? Dynamic : RowFactor*ColFactor\n  };\n  typedef typename internal::nested_eval<ArgType,Factor>::type ArgTypeNested;\n  typedef typename internal::remove_all<ArgTypeNested>::type ArgTypeNestedCleaned;\n  \n  enum {\n    CoeffReadCost = evaluator<ArgTypeNestedCleaned>::CoeffReadCost,\n    LinearAccessMask = XprType::IsVectorAtCompileTime ? LinearAccessBit : 0,\n    Flags = (evaluator<ArgTypeNestedCleaned>::Flags & (HereditaryBits|LinearAccessMask) & ~RowMajorBit) | (traits<XprType>::Flags & RowMajorBit),\n    \n    Alignment = evaluator<ArgTypeNestedCleaned>::Alignment\n  };\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  explicit unary_evaluator(const XprType& replicate)\n    : m_arg(replicate.nestedExpression()),\n      m_argImpl(m_arg),\n      m_rows(replicate.nestedExpression().rows()),\n      m_cols(replicate.nestedExpression().cols())\n  {}\n \n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  CoeffReturnType coeff(Index row, Index col) const\n  {\n    // try to avoid using modulo; this is a pure optimization strategy\n    const Index actual_row = internal::traits<XprType>::RowsAtCompileTime==1 ? 0\n                           : RowFactor==1 ? row\n                           : row % m_rows.value();\n    const Index actual_col = internal::traits<XprType>::ColsAtCompileTime==1 ? 0\n                           : ColFactor==1 ? col\n                           : col % m_cols.value();\n    \n    return m_argImpl.coeff(actual_row, actual_col);\n  }\n  \n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  CoeffReturnType coeff(Index index) const\n  {\n    // try to avoid using modulo; this is a pure optimization strategy\n    const Index actual_index = internal::traits<XprType>::RowsAtCompileTime==1\n                                  ? (ColFactor==1 ?  index : index%m_cols.value())\n                                  : (RowFactor==1 ?  index : index%m_rows.value());\n    \n    return m_argImpl.coeff(actual_index);\n  }\n\n  template<int LoadMode, typename PacketType>\n  EIGEN_STRONG_INLINE\n  PacketType packet(Index row, Index col) const\n  {\n    const Index actual_row = internal::traits<XprType>::RowsAtCompileTime==1 ? 0\n                           : RowFactor==1 ? row\n                           : row % m_rows.value();\n    const Index actual_col = internal::traits<XprType>::ColsAtCompileTime==1 ? 0\n                           : ColFactor==1 ? col\n                           : col % m_cols.value();\n\n    return m_argImpl.template packet<LoadMode,PacketType>(actual_row, actual_col);\n  }\n  \n  template<int LoadMode, typename PacketType>\n  EIGEN_STRONG_INLINE\n  PacketType packet(Index index) const\n  {\n    const Index actual_index = internal::traits<XprType>::RowsAtCompileTime==1\n                                  ? (ColFactor==1 ?  index : index%m_cols.value())\n                                  : (RowFactor==1 ?  index : index%m_rows.value());\n\n    return m_argImpl.template packet<LoadMode,PacketType>(actual_index);\n  }\n \nprotected:\n  const ArgTypeNested m_arg;\n  evaluator<ArgTypeNestedCleaned> m_argImpl;\n  const variable_if_dynamic<Index, ArgType::RowsAtCompileTime> m_rows;\n  const variable_if_dynamic<Index, ArgType::ColsAtCompileTime> m_cols;\n};\n\n// -------------------- MatrixWrapper and ArrayWrapper --------------------\n//\n// evaluator_wrapper_base<T> is a common base class for the\n// MatrixWrapper and ArrayWrapper evaluators.\n\ntemplate<typename XprType>\nstruct evaluator_wrapper_base\n  : evaluator_base<XprType>\n{\n  typedef typename remove_all<typename XprType::NestedExpressionType>::type ArgType;\n  enum {\n    CoeffReadCost = evaluator<ArgType>::CoeffReadCost,\n    Flags = evaluator<ArgType>::Flags,\n    Alignment = evaluator<ArgType>::Alignment\n  };\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  explicit evaluator_wrapper_base(const ArgType& arg) : m_argImpl(arg) {}\n\n  typedef typename ArgType::Scalar Scalar;\n  typedef typename ArgType::CoeffReturnType CoeffReturnType;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  CoeffReturnType coeff(Index row, Index col) const\n  {\n    return m_argImpl.coeff(row, col);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  CoeffReturnType coeff(Index index) const\n  {\n    return m_argImpl.coeff(index);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  Scalar& coeffRef(Index row, Index col)\n  {\n    return m_argImpl.coeffRef(row, col);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  Scalar& coeffRef(Index index)\n  {\n    return m_argImpl.coeffRef(index);\n  }\n\n  template<int LoadMode, typename PacketType>\n  EIGEN_STRONG_INLINE\n  PacketType packet(Index row, Index col) const\n  {\n    return m_argImpl.template packet<LoadMode,PacketType>(row, col);\n  }\n\n  template<int LoadMode, typename PacketType>\n  EIGEN_STRONG_INLINE\n  PacketType packet(Index index) const\n  {\n    return m_argImpl.template packet<LoadMode,PacketType>(index);\n  }\n\n  template<int StoreMode, typename PacketType>\n  EIGEN_STRONG_INLINE\n  void writePacket(Index row, Index col, const PacketType& x)\n  {\n    m_argImpl.template writePacket<StoreMode>(row, col, x);\n  }\n\n  template<int StoreMode, typename PacketType>\n  EIGEN_STRONG_INLINE\n  void writePacket(Index index, const PacketType& x)\n  {\n    m_argImpl.template writePacket<StoreMode>(index, x);\n  }\n\nprotected:\n  evaluator<ArgType> m_argImpl;\n};\n\ntemplate<typename TArgType>\nstruct unary_evaluator<MatrixWrapper<TArgType> >\n  : evaluator_wrapper_base<MatrixWrapper<TArgType> >\n{\n  typedef MatrixWrapper<TArgType> XprType;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  explicit unary_evaluator(const XprType& wrapper)\n    : evaluator_wrapper_base<MatrixWrapper<TArgType> >(wrapper.nestedExpression())\n  { }\n};\n\ntemplate<typename TArgType>\nstruct unary_evaluator<ArrayWrapper<TArgType> >\n  : evaluator_wrapper_base<ArrayWrapper<TArgType> >\n{\n  typedef ArrayWrapper<TArgType> XprType;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  explicit unary_evaluator(const XprType& wrapper)\n    : evaluator_wrapper_base<ArrayWrapper<TArgType> >(wrapper.nestedExpression())\n  { }\n};\n\n\n// -------------------- Reverse --------------------\n\n// defined in Reverse.h:\ntemplate<typename PacketType, bool ReversePacket> struct reverse_packet_cond;\n\ntemplate<typename ArgType, int Direction>\nstruct unary_evaluator<Reverse<ArgType, Direction> >\n  : evaluator_base<Reverse<ArgType, Direction> >\n{\n  typedef Reverse<ArgType, Direction> XprType;\n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n\n  enum {\n    IsRowMajor = XprType::IsRowMajor,\n    IsColMajor = !IsRowMajor,\n    ReverseRow = (Direction == Vertical)   || (Direction == BothDirections),\n    ReverseCol = (Direction == Horizontal) || (Direction == BothDirections),\n    ReversePacket = (Direction == BothDirections)\n                    || ((Direction == Vertical)   && IsColMajor)\n                    || ((Direction == Horizontal) && IsRowMajor),\n                    \n    CoeffReadCost = evaluator<ArgType>::CoeffReadCost,\n    \n    // let's enable LinearAccess only with vectorization because of the product overhead\n    // FIXME enable DirectAccess with negative strides?\n    Flags0 = evaluator<ArgType>::Flags,\n    LinearAccess = ( (Direction==BothDirections) && (int(Flags0)&PacketAccessBit) )\n                  || ((ReverseRow && XprType::ColsAtCompileTime==1) || (ReverseCol && XprType::RowsAtCompileTime==1))\n                 ? LinearAccessBit : 0,\n\n    Flags = int(Flags0) & (HereditaryBits | PacketAccessBit | LinearAccess),\n    \n    Alignment = 0 // FIXME in some rare cases, Alignment could be preserved, like a Vector4f.\n  };\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  explicit unary_evaluator(const XprType& reverse)\n    : m_argImpl(reverse.nestedExpression()),\n      m_rows(ReverseRow ? reverse.nestedExpression().rows() : 1),\n      m_cols(ReverseCol ? reverse.nestedExpression().cols() : 1)\n  { }\n \n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  CoeffReturnType coeff(Index row, Index col) const\n  {\n    return m_argImpl.coeff(ReverseRow ? m_rows.value() - row - 1 : row,\n                           ReverseCol ? m_cols.value() - col - 1 : col);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  CoeffReturnType coeff(Index index) const\n  {\n    return m_argImpl.coeff(m_rows.value() * m_cols.value() - index - 1);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  Scalar& coeffRef(Index row, Index col)\n  {\n    return m_argImpl.coeffRef(ReverseRow ? m_rows.value() - row - 1 : row,\n                              ReverseCol ? m_cols.value() - col - 1 : col);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  Scalar& coeffRef(Index index)\n  {\n    return m_argImpl.coeffRef(m_rows.value() * m_cols.value() - index - 1);\n  }\n\n  template<int LoadMode, typename PacketType>\n  EIGEN_STRONG_INLINE\n  PacketType packet(Index row, Index col) const\n  {\n    enum {\n      PacketSize = unpacket_traits<PacketType>::size,\n      OffsetRow  = ReverseRow && IsColMajor ? PacketSize : 1,\n      OffsetCol  = ReverseCol && IsRowMajor ? PacketSize : 1\n    };\n    typedef internal::reverse_packet_cond<PacketType,ReversePacket> reverse_packet;\n    return reverse_packet::run(m_argImpl.template packet<LoadMode,PacketType>(\n                                  ReverseRow ? m_rows.value() - row - OffsetRow : row,\n                                  ReverseCol ? m_cols.value() - col - OffsetCol : col));\n  }\n\n  template<int LoadMode, typename PacketType>\n  EIGEN_STRONG_INLINE\n  PacketType packet(Index index) const\n  {\n    enum { PacketSize = unpacket_traits<PacketType>::size };\n    return preverse(m_argImpl.template packet<LoadMode,PacketType>(m_rows.value() * m_cols.value() - index - PacketSize));\n  }\n\n  template<int LoadMode, typename PacketType>\n  EIGEN_STRONG_INLINE\n  void writePacket(Index row, Index col, const PacketType& x)\n  {\n    // FIXME we could factorize some code with packet(i,j)\n    enum {\n      PacketSize = unpacket_traits<PacketType>::size,\n      OffsetRow  = ReverseRow && IsColMajor ? PacketSize : 1,\n      OffsetCol  = ReverseCol && IsRowMajor ? PacketSize : 1\n    };\n    typedef internal::reverse_packet_cond<PacketType,ReversePacket> reverse_packet;\n    m_argImpl.template writePacket<LoadMode>(\n                                  ReverseRow ? m_rows.value() - row - OffsetRow : row,\n                                  ReverseCol ? m_cols.value() - col - OffsetCol : col,\n                                  reverse_packet::run(x));\n  }\n\n  template<int LoadMode, typename PacketType>\n  EIGEN_STRONG_INLINE\n  void writePacket(Index index, const PacketType& x)\n  {\n    enum { PacketSize = unpacket_traits<PacketType>::size };\n    m_argImpl.template writePacket<LoadMode>\n      (m_rows.value() * m_cols.value() - index - PacketSize, preverse(x));\n  }\n \nprotected:\n  evaluator<ArgType> m_argImpl;\n\n  // If we do not reverse rows, then we do not need to know the number of rows; same for columns\n  // Nonetheless, in this case it is important to set to 1 such that the coeff(index) method works fine for vectors.\n  const variable_if_dynamic<Index, ReverseRow ? ArgType::RowsAtCompileTime : 1> m_rows;\n  const variable_if_dynamic<Index, ReverseCol ? ArgType::ColsAtCompileTime : 1> m_cols;\n};\n\n\n// -------------------- Diagonal --------------------\n\ntemplate<typename ArgType, int DiagIndex>\nstruct evaluator<Diagonal<ArgType, DiagIndex> >\n  : evaluator_base<Diagonal<ArgType, DiagIndex> >\n{\n  typedef Diagonal<ArgType, DiagIndex> XprType;\n  \n  enum {\n    CoeffReadCost = evaluator<ArgType>::CoeffReadCost,\n    \n    Flags = (unsigned int)(evaluator<ArgType>::Flags & (HereditaryBits | DirectAccessBit) & ~RowMajorBit) | LinearAccessBit,\n    \n    Alignment = 0\n  };\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  explicit evaluator(const XprType& diagonal)\n    : m_argImpl(diagonal.nestedExpression()),\n      m_index(diagonal.index())\n  { }\n \n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  CoeffReturnType coeff(Index row, Index) const\n  {\n    return m_argImpl.coeff(row + rowOffset(), row + colOffset());\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  CoeffReturnType coeff(Index index) const\n  {\n    return m_argImpl.coeff(index + rowOffset(), index + colOffset());\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  Scalar& coeffRef(Index row, Index)\n  {\n    return m_argImpl.coeffRef(row + rowOffset(), row + colOffset());\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  Scalar& coeffRef(Index index)\n  {\n    return m_argImpl.coeffRef(index + rowOffset(), index + colOffset());\n  }\n\nprotected:\n  evaluator<ArgType> m_argImpl;\n  const internal::variable_if_dynamicindex<Index, XprType::DiagIndex> m_index;\n\nprivate:\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index rowOffset() const { return m_index.value() > 0 ? 0 : -m_index.value(); }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index colOffset() const { return m_index.value() > 0 ? m_index.value() : 0; }\n};\n\n\n//----------------------------------------------------------------------\n// deprecated code\n//----------------------------------------------------------------------\n\n// -------------------- EvalToTemp --------------------\n\n// expression class for evaluating nested expression to a temporary\n\ntemplate<typename ArgType> class EvalToTemp;\n\ntemplate<typename ArgType>\nstruct traits<EvalToTemp<ArgType> >\n  : public traits<ArgType>\n{ };\n\ntemplate<typename ArgType>\nclass EvalToTemp\n  : public dense_xpr_base<EvalToTemp<ArgType> >::type\n{\n public:\n \n  typedef typename dense_xpr_base<EvalToTemp>::type Base;\n  EIGEN_GENERIC_PUBLIC_INTERFACE(EvalToTemp)\n \n  explicit EvalToTemp(const ArgType& arg)\n    : m_arg(arg)\n  { }\n \n  const ArgType& arg() const\n  {\n    return m_arg;\n  }\n\n  Index rows() const \n  {\n    return m_arg.rows();\n  }\n\n  Index cols() const \n  {\n    return m_arg.cols();\n  }\n\n private:\n  const ArgType& m_arg;\n};\n \ntemplate<typename ArgType>\nstruct evaluator<EvalToTemp<ArgType> >\n  : public evaluator<typename ArgType::PlainObject>\n{\n  typedef EvalToTemp<ArgType>                   XprType;\n  typedef typename ArgType::PlainObject         PlainObject;\n  typedef evaluator<PlainObject> Base;\n  \n  EIGEN_DEVICE_FUNC explicit evaluator(const XprType& xpr)\n    : m_result(xpr.arg())\n  {\n    ::new (static_cast<Base*>(this)) Base(m_result);\n  }\n\n  // This constructor is used when nesting an EvalTo evaluator in another evaluator\n  EIGEN_DEVICE_FUNC evaluator(const ArgType& arg)\n    : m_result(arg)\n  {\n    ::new (static_cast<Base*>(this)) Base(m_result);\n  }\n\nprotected:\n  PlainObject m_result;\n};\n\n} // namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_COREEVALUATORS_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/CoreIterators.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_COREITERATORS_H\n#define EIGEN_COREITERATORS_H\n\nnamespace Eigen { \n\n/* This file contains the respective InnerIterator definition of the expressions defined in Eigen/Core\n */\n\nnamespace internal {\n\ntemplate<typename XprType, typename EvaluatorKind>\nclass inner_iterator_selector;\n\n}\n\n/** \\class InnerIterator\n  * \\brief An InnerIterator allows to loop over the element of any matrix expression.\n  * \n  * \\warning To be used with care because an evaluator is constructed every time an InnerIterator iterator is constructed.\n  * \n  * TODO: add a usage example\n  */\ntemplate<typename XprType>\nclass InnerIterator\n{\nprotected:\n  typedef internal::inner_iterator_selector<XprType, typename internal::evaluator_traits<XprType>::Kind> IteratorType;\n  typedef internal::evaluator<XprType> EvaluatorType;\n  typedef typename internal::traits<XprType>::Scalar Scalar;\npublic:\n  /** Construct an iterator over the \\a outerId -th row or column of \\a xpr */\n  InnerIterator(const XprType &xpr, const Index &outerId)\n    : m_eval(xpr), m_iter(m_eval, outerId, xpr.innerSize())\n  {}\n  \n  /// \\returns the value of the current coefficient.\n  EIGEN_STRONG_INLINE Scalar value() const          { return m_iter.value(); }\n  /** Increment the iterator \\c *this to the next non-zero coefficient.\n    * Explicit zeros are not skipped over. To skip explicit zeros, see class SparseView\n    */\n  EIGEN_STRONG_INLINE InnerIterator& operator++()   { m_iter.operator++(); return *this; }\n  EIGEN_STRONG_INLINE InnerIterator& operator+=(Index i) { m_iter.operator+=(i); return *this; }\n  EIGEN_STRONG_INLINE InnerIterator operator+(Index i) \n  { InnerIterator result(*this); result+=i; return result; }\n    \n\n  /// \\returns the column or row index of the current coefficient.\n  EIGEN_STRONG_INLINE Index index() const           { return m_iter.index(); }\n  /// \\returns the row index of the current coefficient.\n  EIGEN_STRONG_INLINE Index row() const             { return m_iter.row(); }\n  /// \\returns the column index of the current coefficient.\n  EIGEN_STRONG_INLINE Index col() const             { return m_iter.col(); }\n  /// \\returns \\c true if the iterator \\c *this still references a valid coefficient.\n  EIGEN_STRONG_INLINE operator bool() const         { return m_iter; }\n  \nprotected:\n  EvaluatorType m_eval;\n  IteratorType m_iter;\nprivate:\n  // If you get here, then you're not using the right InnerIterator type, e.g.:\n  //   SparseMatrix<double,RowMajor> A;\n  //   SparseMatrix<double>::InnerIterator it(A,0);\n  template<typename T> InnerIterator(const EigenBase<T>&,Index outer);\n};\n\nnamespace internal {\n\n// Generic inner iterator implementation for dense objects\ntemplate<typename XprType>\nclass inner_iterator_selector<XprType, IndexBased>\n{\nprotected:\n  typedef evaluator<XprType> EvaluatorType;\n  typedef typename traits<XprType>::Scalar Scalar;\n  enum { IsRowMajor = (XprType::Flags&RowMajorBit)==RowMajorBit };\n  \npublic:\n  EIGEN_STRONG_INLINE inner_iterator_selector(const EvaluatorType &eval, const Index &outerId, const Index &innerSize)\n    : m_eval(eval), m_inner(0), m_outer(outerId), m_end(innerSize)\n  {}\n\n  EIGEN_STRONG_INLINE Scalar value() const\n  {\n    return (IsRowMajor) ? m_eval.coeff(m_outer, m_inner)\n                        : m_eval.coeff(m_inner, m_outer);\n  }\n\n  EIGEN_STRONG_INLINE inner_iterator_selector& operator++() { m_inner++; return *this; }\n\n  EIGEN_STRONG_INLINE Index index() const { return m_inner; }\n  inline Index row() const { return IsRowMajor ? m_outer : index(); }\n  inline Index col() const { return IsRowMajor ? index() : m_outer; }\n\n  EIGEN_STRONG_INLINE operator bool() const { return m_inner < m_end && m_inner>=0; }\n\nprotected:\n  const EvaluatorType& m_eval;\n  Index m_inner;\n  const Index m_outer;\n  const Index m_end;\n};\n\n// For iterator-based evaluator, inner-iterator is already implemented as\n// evaluator<>::InnerIterator\ntemplate<typename XprType>\nclass inner_iterator_selector<XprType, IteratorBased>\n : public evaluator<XprType>::InnerIterator\n{\nprotected:\n  typedef typename evaluator<XprType>::InnerIterator Base;\n  typedef evaluator<XprType> EvaluatorType;\n  \npublic:\n  EIGEN_STRONG_INLINE inner_iterator_selector(const EvaluatorType &eval, const Index &outerId, const Index &/*innerSize*/)\n    : Base(eval, outerId)\n  {}  \n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_COREITERATORS_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/CwiseBinaryOp.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CWISE_BINARY_OP_H\n#define EIGEN_CWISE_BINARY_OP_H\n\nnamespace Eigen {\n\nnamespace internal {\ntemplate<typename BinaryOp, typename Lhs, typename Rhs>\nstruct traits<CwiseBinaryOp<BinaryOp, Lhs, Rhs> >\n{\n  // we must not inherit from traits<Lhs> since it has\n  // the potential to cause problems with MSVC\n  typedef typename remove_all<Lhs>::type Ancestor;\n  typedef typename traits<Ancestor>::XprKind XprKind;\n  enum {\n    RowsAtCompileTime = traits<Ancestor>::RowsAtCompileTime,\n    ColsAtCompileTime = traits<Ancestor>::ColsAtCompileTime,\n    MaxRowsAtCompileTime = traits<Ancestor>::MaxRowsAtCompileTime,\n    MaxColsAtCompileTime = traits<Ancestor>::MaxColsAtCompileTime\n  };\n\n  // even though we require Lhs and Rhs to have the same scalar type (see CwiseBinaryOp constructor),\n  // we still want to handle the case when the result type is different.\n  typedef typename result_of<\n                     BinaryOp(\n                       const typename Lhs::Scalar&,\n                       const typename Rhs::Scalar&\n                     )\n                   >::type Scalar;\n  typedef typename cwise_promote_storage_type<typename traits<Lhs>::StorageKind,\n                                              typename traits<Rhs>::StorageKind,\n                                              BinaryOp>::ret StorageKind;\n  typedef typename promote_index_type<typename traits<Lhs>::StorageIndex,\n                                      typename traits<Rhs>::StorageIndex>::type StorageIndex;\n  typedef typename Lhs::Nested LhsNested;\n  typedef typename Rhs::Nested RhsNested;\n  typedef typename remove_reference<LhsNested>::type _LhsNested;\n  typedef typename remove_reference<RhsNested>::type _RhsNested;\n  enum {\n    Flags = cwise_promote_storage_order<typename traits<Lhs>::StorageKind,typename traits<Rhs>::StorageKind,_LhsNested::Flags & RowMajorBit,_RhsNested::Flags & RowMajorBit>::value\n  };\n};\n} // end namespace internal\n\ntemplate<typename BinaryOp, typename Lhs, typename Rhs, typename StorageKind>\nclass CwiseBinaryOpImpl;\n\n/** \\class CwiseBinaryOp\n  * \\ingroup Core_Module\n  *\n  * \\brief Generic expression where a coefficient-wise binary operator is applied to two expressions\n  *\n  * \\tparam BinaryOp template functor implementing the operator\n  * \\tparam LhsType the type of the left-hand side\n  * \\tparam RhsType the type of the right-hand side\n  *\n  * This class represents an expression  where a coefficient-wise binary operator is applied to two expressions.\n  * It is the return type of binary operators, by which we mean only those binary operators where\n  * both the left-hand side and the right-hand side are Eigen expressions.\n  * For example, the return type of matrix1+matrix2 is a CwiseBinaryOp.\n  *\n  * Most of the time, this is the only way that it is used, so you typically don't have to name\n  * CwiseBinaryOp types explicitly.\n  *\n  * \\sa MatrixBase::binaryExpr(const MatrixBase<OtherDerived> &,const CustomBinaryOp &) const, class CwiseUnaryOp, class CwiseNullaryOp\n  */\ntemplate<typename BinaryOp, typename LhsType, typename RhsType>\nclass CwiseBinaryOp : \n  public CwiseBinaryOpImpl<\n          BinaryOp, LhsType, RhsType,\n          typename internal::cwise_promote_storage_type<typename internal::traits<LhsType>::StorageKind,\n                                                        typename internal::traits<RhsType>::StorageKind,\n                                                        BinaryOp>::ret>,\n  internal::no_assignment_operator\n{\n  public:\n    \n    typedef typename internal::remove_all<BinaryOp>::type Functor;\n    typedef typename internal::remove_all<LhsType>::type Lhs;\n    typedef typename internal::remove_all<RhsType>::type Rhs;\n\n    typedef typename CwiseBinaryOpImpl<\n        BinaryOp, LhsType, RhsType,\n        typename internal::cwise_promote_storage_type<typename internal::traits<LhsType>::StorageKind,\n                                                      typename internal::traits<Rhs>::StorageKind,\n                                                      BinaryOp>::ret>::Base Base;\n    EIGEN_GENERIC_PUBLIC_INTERFACE(CwiseBinaryOp)\n\n    typedef typename internal::ref_selector<LhsType>::type LhsNested;\n    typedef typename internal::ref_selector<RhsType>::type RhsNested;\n    typedef typename internal::remove_reference<LhsNested>::type _LhsNested;\n    typedef typename internal::remove_reference<RhsNested>::type _RhsNested;\n\n#if EIGEN_COMP_MSVC && EIGEN_HAS_CXX11\n    //Required for Visual Studio or the Copy constructor will probably not get inlined!\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    CwiseBinaryOp(const CwiseBinaryOp<BinaryOp,LhsType,RhsType>&) = default;\n#endif\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    CwiseBinaryOp(const Lhs& aLhs, const Rhs& aRhs, const BinaryOp& func = BinaryOp())\n      : m_lhs(aLhs), m_rhs(aRhs), m_functor(func)\n    {\n      EIGEN_CHECK_BINARY_COMPATIBILIY(BinaryOp,typename Lhs::Scalar,typename Rhs::Scalar);\n      // require the sizes to match\n      EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(Lhs, Rhs)\n      eigen_assert(aLhs.rows() == aRhs.rows() && aLhs.cols() == aRhs.cols());\n    }\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Index rows() const {\n      // return the fixed size type if available to enable compile time optimizations\n      if (internal::traits<typename internal::remove_all<LhsNested>::type>::RowsAtCompileTime==Dynamic)\n        return m_rhs.rows();\n      else\n        return m_lhs.rows();\n    }\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Index cols() const {\n      // return the fixed size type if available to enable compile time optimizations\n      if (internal::traits<typename internal::remove_all<LhsNested>::type>::ColsAtCompileTime==Dynamic)\n        return m_rhs.cols();\n      else\n        return m_lhs.cols();\n    }\n\n    /** \\returns the left hand side nested expression */\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const _LhsNested& lhs() const { return m_lhs; }\n    /** \\returns the right hand side nested expression */\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const _RhsNested& rhs() const { return m_rhs; }\n    /** \\returns the functor representing the binary operation */\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const BinaryOp& functor() const { return m_functor; }\n\n  protected:\n    LhsNested m_lhs;\n    RhsNested m_rhs;\n    const BinaryOp m_functor;\n};\n\n// Generic API dispatcher\ntemplate<typename BinaryOp, typename Lhs, typename Rhs, typename StorageKind>\nclass CwiseBinaryOpImpl\n  : public internal::generic_xpr_base<CwiseBinaryOp<BinaryOp, Lhs, Rhs> >::type\n{\npublic:\n  typedef typename internal::generic_xpr_base<CwiseBinaryOp<BinaryOp, Lhs, Rhs> >::type Base;\n};\n\n/** replaces \\c *this by \\c *this - \\a other.\n  *\n  * \\returns a reference to \\c *this\n  */\ntemplate<typename Derived>\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived &\nMatrixBase<Derived>::operator-=(const MatrixBase<OtherDerived> &other)\n{\n  call_assignment(derived(), other.derived(), internal::sub_assign_op<Scalar,typename OtherDerived::Scalar>());\n  return derived();\n}\n\n/** replaces \\c *this by \\c *this + \\a other.\n  *\n  * \\returns a reference to \\c *this\n  */\ntemplate<typename Derived>\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived &\nMatrixBase<Derived>::operator+=(const MatrixBase<OtherDerived>& other)\n{\n  call_assignment(derived(), other.derived(), internal::add_assign_op<Scalar,typename OtherDerived::Scalar>());\n  return derived();\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_CWISE_BINARY_OP_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/CwiseNullaryOp.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CWISE_NULLARY_OP_H\n#define EIGEN_CWISE_NULLARY_OP_H\n\nnamespace Eigen {\n\nnamespace internal {\ntemplate<typename NullaryOp, typename PlainObjectType>\nstruct traits<CwiseNullaryOp<NullaryOp, PlainObjectType> > : traits<PlainObjectType>\n{\n  enum {\n    Flags = traits<PlainObjectType>::Flags & RowMajorBit\n  };\n};\n\n} // namespace internal\n\n/** \\class CwiseNullaryOp\n  * \\ingroup Core_Module\n  *\n  * \\brief Generic expression of a matrix where all coefficients are defined by a functor\n  *\n  * \\tparam NullaryOp template functor implementing the operator\n  * \\tparam PlainObjectType the underlying plain matrix/array type\n  *\n  * This class represents an expression of a generic nullary operator.\n  * It is the return type of the Ones(), Zero(), Constant(), Identity() and Random() methods,\n  * and most of the time this is the only way it is used.\n  *\n  * However, if you want to write a function returning such an expression, you\n  * will need to use this class.\n  *\n  * The functor NullaryOp must expose one of the following method:\n    <table class=\"manual\">\n    <tr            ><td>\\c operator()() </td><td>if the procedural generation does not depend on the coefficient entries (e.g., random numbers)</td></tr>\n    <tr class=\"alt\"><td>\\c operator()(Index i)</td><td>if the procedural generation makes sense for vectors only and that it depends on the coefficient index \\c i (e.g., linspace) </td></tr>\n    <tr            ><td>\\c operator()(Index i,Index j)</td><td>if the procedural generation depends on the matrix coordinates \\c i, \\c j (e.g., to generate a checkerboard with 0 and 1)</td></tr>\n    </table>\n  * It is also possible to expose the last two operators if the generation makes sense for matrices but can be optimized for vectors.\n  *\n  * See DenseBase::NullaryExpr(Index,const CustomNullaryOp&) for an example binding\n  * C++11 random number generators.\n  *\n  * A nullary expression can also be used to implement custom sophisticated matrix manipulations\n  * that cannot be covered by the existing set of natively supported matrix manipulations.\n  * See this \\ref TopicCustomizing_NullaryExpr \"page\" for some examples and additional explanations\n  * on the behavior of CwiseNullaryOp.\n  *\n  * \\sa class CwiseUnaryOp, class CwiseBinaryOp, DenseBase::NullaryExpr\n  */\ntemplate<typename NullaryOp, typename PlainObjectType>\nclass CwiseNullaryOp : public internal::dense_xpr_base< CwiseNullaryOp<NullaryOp, PlainObjectType> >::type, internal::no_assignment_operator\n{\n  public:\n\n    typedef typename internal::dense_xpr_base<CwiseNullaryOp>::type Base;\n    EIGEN_DENSE_PUBLIC_INTERFACE(CwiseNullaryOp)\n\n    EIGEN_DEVICE_FUNC\n    CwiseNullaryOp(Index rows, Index cols, const NullaryOp& func = NullaryOp())\n      : m_rows(rows), m_cols(cols), m_functor(func)\n    {\n      eigen_assert(rows >= 0\n            && (RowsAtCompileTime == Dynamic || RowsAtCompileTime == rows)\n            &&  cols >= 0\n            && (ColsAtCompileTime == Dynamic || ColsAtCompileTime == cols));\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Index rows() const { return m_rows.value(); }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Index cols() const { return m_cols.value(); }\n\n    /** \\returns the functor representing the nullary operation */\n    EIGEN_DEVICE_FUNC\n    const NullaryOp& functor() const { return m_functor; }\n\n  protected:\n    const internal::variable_if_dynamic<Index, RowsAtCompileTime> m_rows;\n    const internal::variable_if_dynamic<Index, ColsAtCompileTime> m_cols;\n    const NullaryOp m_functor;\n};\n\n\n/** \\returns an expression of a matrix defined by a custom functor \\a func\n  *\n  * The parameters \\a rows and \\a cols are the number of rows and of columns of\n  * the returned matrix. Must be compatible with this MatrixBase type.\n  *\n  * This variant is meant to be used for dynamic-size matrix types. For fixed-size types,\n  * it is redundant to pass \\a rows and \\a cols as arguments, so Zero() should be used\n  * instead.\n  *\n  * The template parameter \\a CustomNullaryOp is the type of the functor.\n  *\n  * \\sa class CwiseNullaryOp\n  */\ntemplate<typename Derived>\ntemplate<typename CustomNullaryOp>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n#ifndef EIGEN_PARSED_BY_DOXYGEN\nconst CwiseNullaryOp<CustomNullaryOp,typename DenseBase<Derived>::PlainObject>\n#else\nconst CwiseNullaryOp<CustomNullaryOp,PlainObject>\n#endif\nDenseBase<Derived>::NullaryExpr(Index rows, Index cols, const CustomNullaryOp& func)\n{\n  return CwiseNullaryOp<CustomNullaryOp, PlainObject>(rows, cols, func);\n}\n\n/** \\returns an expression of a matrix defined by a custom functor \\a func\n  *\n  * The parameter \\a size is the size of the returned vector.\n  * Must be compatible with this MatrixBase type.\n  *\n  * \\only_for_vectors\n  *\n  * This variant is meant to be used for dynamic-size vector types. For fixed-size types,\n  * it is redundant to pass \\a size as argument, so Zero() should be used\n  * instead.\n  *\n  * The template parameter \\a CustomNullaryOp is the type of the functor.\n  *\n  * Here is an example with C++11 random generators: \\include random_cpp11.cpp\n  * Output: \\verbinclude random_cpp11.out\n  * \n  * \\sa class CwiseNullaryOp\n  */\ntemplate<typename Derived>\ntemplate<typename CustomNullaryOp>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n#ifndef EIGEN_PARSED_BY_DOXYGEN\nconst CwiseNullaryOp<CustomNullaryOp, typename DenseBase<Derived>::PlainObject>\n#else\nconst CwiseNullaryOp<CustomNullaryOp, PlainObject>\n#endif\nDenseBase<Derived>::NullaryExpr(Index size, const CustomNullaryOp& func)\n{\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)\n  if(RowsAtCompileTime == 1) return CwiseNullaryOp<CustomNullaryOp, PlainObject>(1, size, func);\n  else return CwiseNullaryOp<CustomNullaryOp, PlainObject>(size, 1, func);\n}\n\n/** \\returns an expression of a matrix defined by a custom functor \\a func\n  *\n  * This variant is only for fixed-size DenseBase types. For dynamic-size types, you\n  * need to use the variants taking size arguments.\n  *\n  * The template parameter \\a CustomNullaryOp is the type of the functor.\n  *\n  * \\sa class CwiseNullaryOp\n  */\ntemplate<typename Derived>\ntemplate<typename CustomNullaryOp>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n#ifndef EIGEN_PARSED_BY_DOXYGEN\nconst CwiseNullaryOp<CustomNullaryOp, typename DenseBase<Derived>::PlainObject>\n#else\nconst CwiseNullaryOp<CustomNullaryOp, PlainObject>\n#endif\nDenseBase<Derived>::NullaryExpr(const CustomNullaryOp& func)\n{\n  return CwiseNullaryOp<CustomNullaryOp, PlainObject>(RowsAtCompileTime, ColsAtCompileTime, func);\n}\n\n/** \\returns an expression of a constant matrix of value \\a value\n  *\n  * The parameters \\a rows and \\a cols are the number of rows and of columns of\n  * the returned matrix. Must be compatible with this DenseBase type.\n  *\n  * This variant is meant to be used for dynamic-size matrix types. For fixed-size types,\n  * it is redundant to pass \\a rows and \\a cols as arguments, so Zero() should be used\n  * instead.\n  *\n  * The template parameter \\a CustomNullaryOp is the type of the functor.\n  *\n  * \\sa class CwiseNullaryOp\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename DenseBase<Derived>::ConstantReturnType\nDenseBase<Derived>::Constant(Index rows, Index cols, const Scalar& value)\n{\n  return DenseBase<Derived>::NullaryExpr(rows, cols, internal::scalar_constant_op<Scalar>(value));\n}\n\n/** \\returns an expression of a constant matrix of value \\a value\n  *\n  * The parameter \\a size is the size of the returned vector.\n  * Must be compatible with this DenseBase type.\n  *\n  * \\only_for_vectors\n  *\n  * This variant is meant to be used for dynamic-size vector types. For fixed-size types,\n  * it is redundant to pass \\a size as argument, so Zero() should be used\n  * instead.\n  *\n  * The template parameter \\a CustomNullaryOp is the type of the functor.\n  *\n  * \\sa class CwiseNullaryOp\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename DenseBase<Derived>::ConstantReturnType\nDenseBase<Derived>::Constant(Index size, const Scalar& value)\n{\n  return DenseBase<Derived>::NullaryExpr(size, internal::scalar_constant_op<Scalar>(value));\n}\n\n/** \\returns an expression of a constant matrix of value \\a value\n  *\n  * This variant is only for fixed-size DenseBase types. For dynamic-size types, you\n  * need to use the variants taking size arguments.\n  *\n  * The template parameter \\a CustomNullaryOp is the type of the functor.\n  *\n  * \\sa class CwiseNullaryOp\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename DenseBase<Derived>::ConstantReturnType\nDenseBase<Derived>::Constant(const Scalar& value)\n{\n  EIGEN_STATIC_ASSERT_FIXED_SIZE(Derived)\n  return DenseBase<Derived>::NullaryExpr(RowsAtCompileTime, ColsAtCompileTime, internal::scalar_constant_op<Scalar>(value));\n}\n\n/** \\deprecated because of accuracy loss. In Eigen 3.3, it is an alias for LinSpaced(Index,const Scalar&,const Scalar&)\n  *\n  * \\only_for_vectors\n  *\n  * Example: \\include DenseBase_LinSpaced_seq_deprecated.cpp\n  * Output: \\verbinclude DenseBase_LinSpaced_seq_deprecated.out\n  *\n  * \\sa LinSpaced(Index,const Scalar&, const Scalar&), setLinSpaced(Index,const Scalar&,const Scalar&)\n  */\ntemplate<typename Derived>\nEIGEN_DEPRECATED EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename DenseBase<Derived>::RandomAccessLinSpacedReturnType\nDenseBase<Derived>::LinSpaced(Sequential_t, Index size, const Scalar& low, const Scalar& high)\n{\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)\n  return DenseBase<Derived>::NullaryExpr(size, internal::linspaced_op<Scalar>(low,high,size));\n}\n\n/** \\deprecated because of accuracy loss. In Eigen 3.3, it is an alias for LinSpaced(const Scalar&,const Scalar&)\n  *\n  * \\sa LinSpaced(const Scalar&, const Scalar&)\n  */\ntemplate<typename Derived>\nEIGEN_DEPRECATED EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename DenseBase<Derived>::RandomAccessLinSpacedReturnType\nDenseBase<Derived>::LinSpaced(Sequential_t, const Scalar& low, const Scalar& high)\n{\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)\n  EIGEN_STATIC_ASSERT_FIXED_SIZE(Derived)\n  return DenseBase<Derived>::NullaryExpr(Derived::SizeAtCompileTime, internal::linspaced_op<Scalar>(low,high,Derived::SizeAtCompileTime));\n}\n\n/**\n  * \\brief Sets a linearly spaced vector.\n  *\n  * The function generates 'size' equally spaced values in the closed interval [low,high].\n  * When size is set to 1, a vector of length 1 containing 'high' is returned.\n  *\n  * \\only_for_vectors\n  *\n  * Example: \\include DenseBase_LinSpaced.cpp\n  * Output: \\verbinclude DenseBase_LinSpaced.out\n  *\n  * For integer scalar types, an even spacing is possible if and only if the length of the range,\n  * i.e., \\c high-low is a scalar multiple of \\c size-1, or if \\c size is a scalar multiple of the\n  * number of values \\c high-low+1 (meaning each value can be repeated the same number of time).\n  * If one of these two considions is not satisfied, then \\c high is lowered to the largest value\n  * satisfying one of this constraint.\n  * Here are some examples:\n  *\n  * Example: \\include DenseBase_LinSpacedInt.cpp\n  * Output: \\verbinclude DenseBase_LinSpacedInt.out\n  *\n  * \\sa setLinSpaced(Index,const Scalar&,const Scalar&), CwiseNullaryOp\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename DenseBase<Derived>::RandomAccessLinSpacedReturnType\nDenseBase<Derived>::LinSpaced(Index size, const Scalar& low, const Scalar& high)\n{\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)\n  return DenseBase<Derived>::NullaryExpr(size, internal::linspaced_op<Scalar>(low,high,size));\n}\n\n/**\n  * \\copydoc DenseBase::LinSpaced(Index, const Scalar&, const Scalar&)\n  * Special version for fixed size types which does not require the size parameter.\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename DenseBase<Derived>::RandomAccessLinSpacedReturnType\nDenseBase<Derived>::LinSpaced(const Scalar& low, const Scalar& high)\n{\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)\n  EIGEN_STATIC_ASSERT_FIXED_SIZE(Derived)\n  return DenseBase<Derived>::NullaryExpr(Derived::SizeAtCompileTime, internal::linspaced_op<Scalar>(low,high,Derived::SizeAtCompileTime));\n}\n\n/** \\returns true if all coefficients in this matrix are approximately equal to \\a val, to within precision \\a prec */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC bool DenseBase<Derived>::isApproxToConstant\n(const Scalar& val, const RealScalar& prec) const\n{\n  typename internal::nested_eval<Derived,1>::type self(derived());\n  for(Index j = 0; j < cols(); ++j)\n    for(Index i = 0; i < rows(); ++i)\n      if(!internal::isApprox(self.coeff(i, j), val, prec))\n        return false;\n  return true;\n}\n\n/** This is just an alias for isApproxToConstant().\n  *\n  * \\returns true if all coefficients in this matrix are approximately equal to \\a value, to within precision \\a prec */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC bool DenseBase<Derived>::isConstant\n(const Scalar& val, const RealScalar& prec) const\n{\n  return isApproxToConstant(val, prec);\n}\n\n/** Alias for setConstant(): sets all coefficients in this expression to \\a val.\n  *\n  * \\sa setConstant(), Constant(), class CwiseNullaryOp\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void DenseBase<Derived>::fill(const Scalar& val)\n{\n  setConstant(val);\n}\n\n/** Sets all coefficients in this expression to value \\a val.\n  *\n  * \\sa fill(), setConstant(Index,const Scalar&), setConstant(Index,Index,const Scalar&), setZero(), setOnes(), Constant(), class CwiseNullaryOp, setZero(), setOnes()\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& DenseBase<Derived>::setConstant(const Scalar& val)\n{\n  return derived() = Constant(rows(), cols(), val);\n}\n\n/** Resizes to the given \\a size, and sets all coefficients in this expression to the given value \\a val.\n  *\n  * \\only_for_vectors\n  *\n  * Example: \\include Matrix_setConstant_int.cpp\n  * Output: \\verbinclude Matrix_setConstant_int.out\n  *\n  * \\sa MatrixBase::setConstant(const Scalar&), setConstant(Index,Index,const Scalar&), class CwiseNullaryOp, MatrixBase::Constant(const Scalar&)\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived&\nPlainObjectBase<Derived>::setConstant(Index size, const Scalar& val)\n{\n  resize(size);\n  return setConstant(val);\n}\n\n/** Resizes to the given size, and sets all coefficients in this expression to the given value \\a val.\n  *\n  * \\param rows the new number of rows\n  * \\param cols the new number of columns\n  * \\param val the value to which all coefficients are set\n  *\n  * Example: \\include Matrix_setConstant_int_int.cpp\n  * Output: \\verbinclude Matrix_setConstant_int_int.out\n  *\n  * \\sa MatrixBase::setConstant(const Scalar&), setConstant(Index,const Scalar&), class CwiseNullaryOp, MatrixBase::Constant(const Scalar&)\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived&\nPlainObjectBase<Derived>::setConstant(Index rows, Index cols, const Scalar& val)\n{\n  resize(rows, cols);\n  return setConstant(val);\n}\n\n/**\n  * \\brief Sets a linearly spaced vector.\n  *\n  * The function generates 'size' equally spaced values in the closed interval [low,high].\n  * When size is set to 1, a vector of length 1 containing 'high' is returned.\n  *\n  * \\only_for_vectors\n  *\n  * Example: \\include DenseBase_setLinSpaced.cpp\n  * Output: \\verbinclude DenseBase_setLinSpaced.out\n  *\n  * For integer scalar types, do not miss the explanations on the definition\n  * of \\link LinSpaced(Index,const Scalar&,const Scalar&) even spacing \\endlink.\n  *\n  * \\sa LinSpaced(Index,const Scalar&,const Scalar&), CwiseNullaryOp\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& DenseBase<Derived>::setLinSpaced(Index newSize, const Scalar& low, const Scalar& high)\n{\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)\n  return derived() = Derived::NullaryExpr(newSize, internal::linspaced_op<Scalar>(low,high,newSize));\n}\n\n/**\n  * \\brief Sets a linearly spaced vector.\n  *\n  * The function fills \\c *this with equally spaced values in the closed interval [low,high].\n  * When size is set to 1, a vector of length 1 containing 'high' is returned.\n  *\n  * \\only_for_vectors\n  *\n  * For integer scalar types, do not miss the explanations on the definition\n  * of \\link LinSpaced(Index,const Scalar&,const Scalar&) even spacing \\endlink.\n  *\n  * \\sa LinSpaced(Index,const Scalar&,const Scalar&), setLinSpaced(Index, const Scalar&, const Scalar&), CwiseNullaryOp\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& DenseBase<Derived>::setLinSpaced(const Scalar& low, const Scalar& high)\n{\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)\n  return setLinSpaced(size(), low, high);\n}\n\n// zero:\n\n/** \\returns an expression of a zero matrix.\n  *\n  * The parameters \\a rows and \\a cols are the number of rows and of columns of\n  * the returned matrix. Must be compatible with this MatrixBase type.\n  *\n  * This variant is meant to be used for dynamic-size matrix types. For fixed-size types,\n  * it is redundant to pass \\a rows and \\a cols as arguments, so Zero() should be used\n  * instead.\n  *\n  * Example: \\include MatrixBase_zero_int_int.cpp\n  * Output: \\verbinclude MatrixBase_zero_int_int.out\n  *\n  * \\sa Zero(), Zero(Index)\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename DenseBase<Derived>::ConstantReturnType\nDenseBase<Derived>::Zero(Index rows, Index cols)\n{\n  return Constant(rows, cols, Scalar(0));\n}\n\n/** \\returns an expression of a zero vector.\n  *\n  * The parameter \\a size is the size of the returned vector.\n  * Must be compatible with this MatrixBase type.\n  *\n  * \\only_for_vectors\n  *\n  * This variant is meant to be used for dynamic-size vector types. For fixed-size types,\n  * it is redundant to pass \\a size as argument, so Zero() should be used\n  * instead.\n  *\n  * Example: \\include MatrixBase_zero_int.cpp\n  * Output: \\verbinclude MatrixBase_zero_int.out\n  *\n  * \\sa Zero(), Zero(Index,Index)\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename DenseBase<Derived>::ConstantReturnType\nDenseBase<Derived>::Zero(Index size)\n{\n  return Constant(size, Scalar(0));\n}\n\n/** \\returns an expression of a fixed-size zero matrix or vector.\n  *\n  * This variant is only for fixed-size MatrixBase types. For dynamic-size types, you\n  * need to use the variants taking size arguments.\n  *\n  * Example: \\include MatrixBase_zero.cpp\n  * Output: \\verbinclude MatrixBase_zero.out\n  *\n  * \\sa Zero(Index), Zero(Index,Index)\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename DenseBase<Derived>::ConstantReturnType\nDenseBase<Derived>::Zero()\n{\n  return Constant(Scalar(0));\n}\n\n/** \\returns true if *this is approximately equal to the zero matrix,\n  *          within the precision given by \\a prec.\n  *\n  * Example: \\include MatrixBase_isZero.cpp\n  * Output: \\verbinclude MatrixBase_isZero.out\n  *\n  * \\sa class CwiseNullaryOp, Zero()\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC bool DenseBase<Derived>::isZero(const RealScalar& prec) const\n{\n  typename internal::nested_eval<Derived,1>::type self(derived());\n  for(Index j = 0; j < cols(); ++j)\n    for(Index i = 0; i < rows(); ++i)\n      if(!internal::isMuchSmallerThan(self.coeff(i, j), static_cast<Scalar>(1), prec))\n        return false;\n  return true;\n}\n\n/** Sets all coefficients in this expression to zero.\n  *\n  * Example: \\include MatrixBase_setZero.cpp\n  * Output: \\verbinclude MatrixBase_setZero.out\n  *\n  * \\sa class CwiseNullaryOp, Zero()\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& DenseBase<Derived>::setZero()\n{\n  return setConstant(Scalar(0));\n}\n\n/** Resizes to the given \\a size, and sets all coefficients in this expression to zero.\n  *\n  * \\only_for_vectors\n  *\n  * Example: \\include Matrix_setZero_int.cpp\n  * Output: \\verbinclude Matrix_setZero_int.out\n  *\n  * \\sa DenseBase::setZero(), setZero(Index,Index), class CwiseNullaryOp, DenseBase::Zero()\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived&\nPlainObjectBase<Derived>::setZero(Index newSize)\n{\n  resize(newSize);\n  return setConstant(Scalar(0));\n}\n\n/** Resizes to the given size, and sets all coefficients in this expression to zero.\n  *\n  * \\param rows the new number of rows\n  * \\param cols the new number of columns\n  *\n  * Example: \\include Matrix_setZero_int_int.cpp\n  * Output: \\verbinclude Matrix_setZero_int_int.out\n  *\n  * \\sa DenseBase::setZero(), setZero(Index), class CwiseNullaryOp, DenseBase::Zero()\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived&\nPlainObjectBase<Derived>::setZero(Index rows, Index cols)\n{\n  resize(rows, cols);\n  return setConstant(Scalar(0));\n}\n\n// ones:\n\n/** \\returns an expression of a matrix where all coefficients equal one.\n  *\n  * The parameters \\a rows and \\a cols are the number of rows and of columns of\n  * the returned matrix. Must be compatible with this MatrixBase type.\n  *\n  * This variant is meant to be used for dynamic-size matrix types. For fixed-size types,\n  * it is redundant to pass \\a rows and \\a cols as arguments, so Ones() should be used\n  * instead.\n  *\n  * Example: \\include MatrixBase_ones_int_int.cpp\n  * Output: \\verbinclude MatrixBase_ones_int_int.out\n  *\n  * \\sa Ones(), Ones(Index), isOnes(), class Ones\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename DenseBase<Derived>::ConstantReturnType\nDenseBase<Derived>::Ones(Index rows, Index cols)\n{\n  return Constant(rows, cols, Scalar(1));\n}\n\n/** \\returns an expression of a vector where all coefficients equal one.\n  *\n  * The parameter \\a newSize is the size of the returned vector.\n  * Must be compatible with this MatrixBase type.\n  *\n  * \\only_for_vectors\n  *\n  * This variant is meant to be used for dynamic-size vector types. For fixed-size types,\n  * it is redundant to pass \\a size as argument, so Ones() should be used\n  * instead.\n  *\n  * Example: \\include MatrixBase_ones_int.cpp\n  * Output: \\verbinclude MatrixBase_ones_int.out\n  *\n  * \\sa Ones(), Ones(Index,Index), isOnes(), class Ones\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename DenseBase<Derived>::ConstantReturnType\nDenseBase<Derived>::Ones(Index newSize)\n{\n  return Constant(newSize, Scalar(1));\n}\n\n/** \\returns an expression of a fixed-size matrix or vector where all coefficients equal one.\n  *\n  * This variant is only for fixed-size MatrixBase types. For dynamic-size types, you\n  * need to use the variants taking size arguments.\n  *\n  * Example: \\include MatrixBase_ones.cpp\n  * Output: \\verbinclude MatrixBase_ones.out\n  *\n  * \\sa Ones(Index), Ones(Index,Index), isOnes(), class Ones\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename DenseBase<Derived>::ConstantReturnType\nDenseBase<Derived>::Ones()\n{\n  return Constant(Scalar(1));\n}\n\n/** \\returns true if *this is approximately equal to the matrix where all coefficients\n  *          are equal to 1, within the precision given by \\a prec.\n  *\n  * Example: \\include MatrixBase_isOnes.cpp\n  * Output: \\verbinclude MatrixBase_isOnes.out\n  *\n  * \\sa class CwiseNullaryOp, Ones()\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC bool DenseBase<Derived>::isOnes\n(const RealScalar& prec) const\n{\n  return isApproxToConstant(Scalar(1), prec);\n}\n\n/** Sets all coefficients in this expression to one.\n  *\n  * Example: \\include MatrixBase_setOnes.cpp\n  * Output: \\verbinclude MatrixBase_setOnes.out\n  *\n  * \\sa class CwiseNullaryOp, Ones()\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& DenseBase<Derived>::setOnes()\n{\n  return setConstant(Scalar(1));\n}\n\n/** Resizes to the given \\a newSize, and sets all coefficients in this expression to one.\n  *\n  * \\only_for_vectors\n  *\n  * Example: \\include Matrix_setOnes_int.cpp\n  * Output: \\verbinclude Matrix_setOnes_int.out\n  *\n  * \\sa MatrixBase::setOnes(), setOnes(Index,Index), class CwiseNullaryOp, MatrixBase::Ones()\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived&\nPlainObjectBase<Derived>::setOnes(Index newSize)\n{\n  resize(newSize);\n  return setConstant(Scalar(1));\n}\n\n/** Resizes to the given size, and sets all coefficients in this expression to one.\n  *\n  * \\param rows the new number of rows\n  * \\param cols the new number of columns\n  *\n  * Example: \\include Matrix_setOnes_int_int.cpp\n  * Output: \\verbinclude Matrix_setOnes_int_int.out\n  *\n  * \\sa MatrixBase::setOnes(), setOnes(Index), class CwiseNullaryOp, MatrixBase::Ones()\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived&\nPlainObjectBase<Derived>::setOnes(Index rows, Index cols)\n{\n  resize(rows, cols);\n  return setConstant(Scalar(1));\n}\n\n// Identity:\n\n/** \\returns an expression of the identity matrix (not necessarily square).\n  *\n  * The parameters \\a rows and \\a cols are the number of rows and of columns of\n  * the returned matrix. Must be compatible with this MatrixBase type.\n  *\n  * This variant is meant to be used for dynamic-size matrix types. For fixed-size types,\n  * it is redundant to pass \\a rows and \\a cols as arguments, so Identity() should be used\n  * instead.\n  *\n  * Example: \\include MatrixBase_identity_int_int.cpp\n  * Output: \\verbinclude MatrixBase_identity_int_int.out\n  *\n  * \\sa Identity(), setIdentity(), isIdentity()\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename MatrixBase<Derived>::IdentityReturnType\nMatrixBase<Derived>::Identity(Index rows, Index cols)\n{\n  return DenseBase<Derived>::NullaryExpr(rows, cols, internal::scalar_identity_op<Scalar>());\n}\n\n/** \\returns an expression of the identity matrix (not necessarily square).\n  *\n  * This variant is only for fixed-size MatrixBase types. For dynamic-size types, you\n  * need to use the variant taking size arguments.\n  *\n  * Example: \\include MatrixBase_identity.cpp\n  * Output: \\verbinclude MatrixBase_identity.out\n  *\n  * \\sa Identity(Index,Index), setIdentity(), isIdentity()\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename MatrixBase<Derived>::IdentityReturnType\nMatrixBase<Derived>::Identity()\n{\n  EIGEN_STATIC_ASSERT_FIXED_SIZE(Derived)\n  return MatrixBase<Derived>::NullaryExpr(RowsAtCompileTime, ColsAtCompileTime, internal::scalar_identity_op<Scalar>());\n}\n\n/** \\returns true if *this is approximately equal to the identity matrix\n  *          (not necessarily square),\n  *          within the precision given by \\a prec.\n  *\n  * Example: \\include MatrixBase_isIdentity.cpp\n  * Output: \\verbinclude MatrixBase_isIdentity.out\n  *\n  * \\sa class CwiseNullaryOp, Identity(), Identity(Index,Index), setIdentity()\n  */\ntemplate<typename Derived>\nbool MatrixBase<Derived>::isIdentity\n(const RealScalar& prec) const\n{\n  typename internal::nested_eval<Derived,1>::type self(derived());\n  for(Index j = 0; j < cols(); ++j)\n  {\n    for(Index i = 0; i < rows(); ++i)\n    {\n      if(i == j)\n      {\n        if(!internal::isApprox(self.coeff(i, j), static_cast<Scalar>(1), prec))\n          return false;\n      }\n      else\n      {\n        if(!internal::isMuchSmallerThan(self.coeff(i, j), static_cast<RealScalar>(1), prec))\n          return false;\n      }\n    }\n  }\n  return true;\n}\n\nnamespace internal {\n\ntemplate<typename Derived, bool Big = (Derived::SizeAtCompileTime>=16)>\nstruct setIdentity_impl\n{\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE Derived& run(Derived& m)\n  {\n    return m = Derived::Identity(m.rows(), m.cols());\n  }\n};\n\ntemplate<typename Derived>\nstruct setIdentity_impl<Derived, true>\n{\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE Derived& run(Derived& m)\n  {\n    m.setZero();\n    const Index size = numext::mini(m.rows(), m.cols());\n    for(Index i = 0; i < size; ++i) m.coeffRef(i,i) = typename Derived::Scalar(1);\n    return m;\n  }\n};\n\n} // end namespace internal\n\n/** Writes the identity expression (not necessarily square) into *this.\n  *\n  * Example: \\include MatrixBase_setIdentity.cpp\n  * Output: \\verbinclude MatrixBase_setIdentity.out\n  *\n  * \\sa class CwiseNullaryOp, Identity(), Identity(Index,Index), isIdentity()\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& MatrixBase<Derived>::setIdentity()\n{\n  return internal::setIdentity_impl<Derived>::run(derived());\n}\n\n/** \\brief Resizes to the given size, and writes the identity expression (not necessarily square) into *this.\n  *\n  * \\param rows the new number of rows\n  * \\param cols the new number of columns\n  *\n  * Example: \\include Matrix_setIdentity_int_int.cpp\n  * Output: \\verbinclude Matrix_setIdentity_int_int.out\n  *\n  * \\sa MatrixBase::setIdentity(), class CwiseNullaryOp, MatrixBase::Identity()\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& MatrixBase<Derived>::setIdentity(Index rows, Index cols)\n{\n  derived().resize(rows, cols);\n  return setIdentity();\n}\n\n/** \\returns an expression of the i-th unit (basis) vector.\n  *\n  * \\only_for_vectors\n  *\n  * \\sa MatrixBase::Unit(Index), MatrixBase::UnitX(), MatrixBase::UnitY(), MatrixBase::UnitZ(), MatrixBase::UnitW()\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename MatrixBase<Derived>::BasisReturnType MatrixBase<Derived>::Unit(Index newSize, Index i)\n{\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)\n  return BasisReturnType(SquareMatrixType::Identity(newSize,newSize), i);\n}\n\n/** \\returns an expression of the i-th unit (basis) vector.\n  *\n  * \\only_for_vectors\n  *\n  * This variant is for fixed-size vector only.\n  *\n  * \\sa MatrixBase::Unit(Index,Index), MatrixBase::UnitX(), MatrixBase::UnitY(), MatrixBase::UnitZ(), MatrixBase::UnitW()\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename MatrixBase<Derived>::BasisReturnType MatrixBase<Derived>::Unit(Index i)\n{\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)\n  return BasisReturnType(SquareMatrixType::Identity(),i);\n}\n\n/** \\returns an expression of the X axis unit vector (1{,0}^*)\n  *\n  * \\only_for_vectors\n  *\n  * \\sa MatrixBase::Unit(Index,Index), MatrixBase::Unit(Index), MatrixBase::UnitY(), MatrixBase::UnitZ(), MatrixBase::UnitW()\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename MatrixBase<Derived>::BasisReturnType MatrixBase<Derived>::UnitX()\n{ return Derived::Unit(0); }\n\n/** \\returns an expression of the Y axis unit vector (0,1{,0}^*)\n  *\n  * \\only_for_vectors\n  *\n  * \\sa MatrixBase::Unit(Index,Index), MatrixBase::Unit(Index), MatrixBase::UnitY(), MatrixBase::UnitZ(), MatrixBase::UnitW()\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename MatrixBase<Derived>::BasisReturnType MatrixBase<Derived>::UnitY()\n{ return Derived::Unit(1); }\n\n/** \\returns an expression of the Z axis unit vector (0,0,1{,0}^*)\n  *\n  * \\only_for_vectors\n  *\n  * \\sa MatrixBase::Unit(Index,Index), MatrixBase::Unit(Index), MatrixBase::UnitY(), MatrixBase::UnitZ(), MatrixBase::UnitW()\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename MatrixBase<Derived>::BasisReturnType MatrixBase<Derived>::UnitZ()\n{ return Derived::Unit(2); }\n\n/** \\returns an expression of the W axis unit vector (0,0,0,1)\n  *\n  * \\only_for_vectors\n  *\n  * \\sa MatrixBase::Unit(Index,Index), MatrixBase::Unit(Index), MatrixBase::UnitY(), MatrixBase::UnitZ(), MatrixBase::UnitW()\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename MatrixBase<Derived>::BasisReturnType MatrixBase<Derived>::UnitW()\n{ return Derived::Unit(3); }\n\n/** \\brief Set the coefficients of \\c *this to the i-th unit (basis) vector\n  *\n  * \\param i index of the unique coefficient to be set to 1\n  *\n  * \\only_for_vectors\n  *\n  * \\sa MatrixBase::setIdentity(), class CwiseNullaryOp, MatrixBase::Unit(Index,Index)\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& MatrixBase<Derived>::setUnit(Index i)\n{\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived);\n  eigen_assert(i<size());\n  derived().setZero();\n  derived().coeffRef(i) = Scalar(1);\n  return derived();\n}\n\n/** \\brief Resizes to the given \\a newSize, and writes the i-th unit (basis) vector into *this.\n  *\n  * \\param newSize the new size of the vector\n  * \\param i index of the unique coefficient to be set to 1\n  *\n  * \\only_for_vectors\n  *\n  * \\sa MatrixBase::setIdentity(), class CwiseNullaryOp, MatrixBase::Unit(Index,Index)\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& MatrixBase<Derived>::setUnit(Index newSize, Index i)\n{\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived);\n  eigen_assert(i<newSize);\n  derived().resize(newSize);\n  return setUnit(i);\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_CWISE_NULLARY_OP_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/CwiseTernaryOp.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2016 Eugene Brevdo <ebrevdo@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CWISE_TERNARY_OP_H\n#define EIGEN_CWISE_TERNARY_OP_H\n\nnamespace Eigen {\n\nnamespace internal {\ntemplate <typename TernaryOp, typename Arg1, typename Arg2, typename Arg3>\nstruct traits<CwiseTernaryOp<TernaryOp, Arg1, Arg2, Arg3> > {\n  // we must not inherit from traits<Arg1> since it has\n  // the potential to cause problems with MSVC\n  typedef typename remove_all<Arg1>::type Ancestor;\n  typedef typename traits<Ancestor>::XprKind XprKind;\n  enum {\n    RowsAtCompileTime = traits<Ancestor>::RowsAtCompileTime,\n    ColsAtCompileTime = traits<Ancestor>::ColsAtCompileTime,\n    MaxRowsAtCompileTime = traits<Ancestor>::MaxRowsAtCompileTime,\n    MaxColsAtCompileTime = traits<Ancestor>::MaxColsAtCompileTime\n  };\n\n  // even though we require Arg1, Arg2, and Arg3 to have the same scalar type\n  // (see CwiseTernaryOp constructor),\n  // we still want to handle the case when the result type is different.\n  typedef typename result_of<TernaryOp(\n      const typename Arg1::Scalar&, const typename Arg2::Scalar&,\n      const typename Arg3::Scalar&)>::type Scalar;\n\n  typedef typename internal::traits<Arg1>::StorageKind StorageKind;\n  typedef typename internal::traits<Arg1>::StorageIndex StorageIndex;\n\n  typedef typename Arg1::Nested Arg1Nested;\n  typedef typename Arg2::Nested Arg2Nested;\n  typedef typename Arg3::Nested Arg3Nested;\n  typedef typename remove_reference<Arg1Nested>::type _Arg1Nested;\n  typedef typename remove_reference<Arg2Nested>::type _Arg2Nested;\n  typedef typename remove_reference<Arg3Nested>::type _Arg3Nested;\n  enum { Flags = _Arg1Nested::Flags & RowMajorBit };\n};\n}  // end namespace internal\n\ntemplate <typename TernaryOp, typename Arg1, typename Arg2, typename Arg3,\n          typename StorageKind>\nclass CwiseTernaryOpImpl;\n\n/** \\class CwiseTernaryOp\n  * \\ingroup Core_Module\n  *\n  * \\brief Generic expression where a coefficient-wise ternary operator is\n * applied to two expressions\n  *\n  * \\tparam TernaryOp template functor implementing the operator\n  * \\tparam Arg1Type the type of the first argument\n  * \\tparam Arg2Type the type of the second argument\n  * \\tparam Arg3Type the type of the third argument\n  *\n  * This class represents an expression where a coefficient-wise ternary\n * operator is applied to three expressions.\n  * It is the return type of ternary operators, by which we mean only those\n * ternary operators where\n  * all three arguments are Eigen expressions.\n  * For example, the return type of betainc(matrix1, matrix2, matrix3) is a\n * CwiseTernaryOp.\n  *\n  * Most of the time, this is the only way that it is used, so you typically\n * don't have to name\n  * CwiseTernaryOp types explicitly.\n  *\n  * \\sa MatrixBase::ternaryExpr(const MatrixBase<Argument2> &, const\n * MatrixBase<Argument3> &, const CustomTernaryOp &) const, class CwiseBinaryOp,\n * class CwiseUnaryOp, class CwiseNullaryOp\n  */\ntemplate <typename TernaryOp, typename Arg1Type, typename Arg2Type,\n          typename Arg3Type>\nclass CwiseTernaryOp : public CwiseTernaryOpImpl<\n                           TernaryOp, Arg1Type, Arg2Type, Arg3Type,\n                           typename internal::traits<Arg1Type>::StorageKind>,\n                       internal::no_assignment_operator\n{\n public:\n  typedef typename internal::remove_all<Arg1Type>::type Arg1;\n  typedef typename internal::remove_all<Arg2Type>::type Arg2;\n  typedef typename internal::remove_all<Arg3Type>::type Arg3;\n\n  typedef typename CwiseTernaryOpImpl<\n      TernaryOp, Arg1Type, Arg2Type, Arg3Type,\n      typename internal::traits<Arg1Type>::StorageKind>::Base Base;\n  EIGEN_GENERIC_PUBLIC_INTERFACE(CwiseTernaryOp)\n\n  typedef typename internal::ref_selector<Arg1Type>::type Arg1Nested;\n  typedef typename internal::ref_selector<Arg2Type>::type Arg2Nested;\n  typedef typename internal::ref_selector<Arg3Type>::type Arg3Nested;\n  typedef typename internal::remove_reference<Arg1Nested>::type _Arg1Nested;\n  typedef typename internal::remove_reference<Arg2Nested>::type _Arg2Nested;\n  typedef typename internal::remove_reference<Arg3Nested>::type _Arg3Nested;\n\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE CwiseTernaryOp(const Arg1& a1, const Arg2& a2,\n                                     const Arg3& a3,\n                                     const TernaryOp& func = TernaryOp())\n      : m_arg1(a1), m_arg2(a2), m_arg3(a3), m_functor(func) {\n    // require the sizes to match\n    EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(Arg1, Arg2)\n    EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(Arg1, Arg3)\n\n    // The index types should match\n    EIGEN_STATIC_ASSERT((internal::is_same<\n                         typename internal::traits<Arg1Type>::StorageKind,\n                         typename internal::traits<Arg2Type>::StorageKind>::value),\n                        STORAGE_KIND_MUST_MATCH)\n    EIGEN_STATIC_ASSERT((internal::is_same<\n                         typename internal::traits<Arg1Type>::StorageKind,\n                         typename internal::traits<Arg3Type>::StorageKind>::value),\n                        STORAGE_KIND_MUST_MATCH)\n\n    eigen_assert(a1.rows() == a2.rows() && a1.cols() == a2.cols() &&\n                 a1.rows() == a3.rows() && a1.cols() == a3.cols());\n  }\n\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE Index rows() const {\n    // return the fixed size type if available to enable compile time\n    // optimizations\n    if (internal::traits<typename internal::remove_all<Arg1Nested>::type>::\n                RowsAtCompileTime == Dynamic &&\n        internal::traits<typename internal::remove_all<Arg2Nested>::type>::\n                RowsAtCompileTime == Dynamic)\n      return m_arg3.rows();\n    else if (internal::traits<typename internal::remove_all<Arg1Nested>::type>::\n                     RowsAtCompileTime == Dynamic &&\n             internal::traits<typename internal::remove_all<Arg3Nested>::type>::\n                     RowsAtCompileTime == Dynamic)\n      return m_arg2.rows();\n    else\n      return m_arg1.rows();\n  }\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE Index cols() const {\n    // return the fixed size type if available to enable compile time\n    // optimizations\n    if (internal::traits<typename internal::remove_all<Arg1Nested>::type>::\n                ColsAtCompileTime == Dynamic &&\n        internal::traits<typename internal::remove_all<Arg2Nested>::type>::\n                ColsAtCompileTime == Dynamic)\n      return m_arg3.cols();\n    else if (internal::traits<typename internal::remove_all<Arg1Nested>::type>::\n                     ColsAtCompileTime == Dynamic &&\n             internal::traits<typename internal::remove_all<Arg3Nested>::type>::\n                     ColsAtCompileTime == Dynamic)\n      return m_arg2.cols();\n    else\n      return m_arg1.cols();\n  }\n\n  /** \\returns the first argument nested expression */\n  EIGEN_DEVICE_FUNC\n  const _Arg1Nested& arg1() const { return m_arg1; }\n  /** \\returns the first argument nested expression */\n  EIGEN_DEVICE_FUNC\n  const _Arg2Nested& arg2() const { return m_arg2; }\n  /** \\returns the third argument nested expression */\n  EIGEN_DEVICE_FUNC\n  const _Arg3Nested& arg3() const { return m_arg3; }\n  /** \\returns the functor representing the ternary operation */\n  EIGEN_DEVICE_FUNC\n  const TernaryOp& functor() const { return m_functor; }\n\n protected:\n  Arg1Nested m_arg1;\n  Arg2Nested m_arg2;\n  Arg3Nested m_arg3;\n  const TernaryOp m_functor;\n};\n\n// Generic API dispatcher\ntemplate <typename TernaryOp, typename Arg1, typename Arg2, typename Arg3,\n          typename StorageKind>\nclass CwiseTernaryOpImpl\n    : public internal::generic_xpr_base<\n          CwiseTernaryOp<TernaryOp, Arg1, Arg2, Arg3> >::type {\n public:\n  typedef typename internal::generic_xpr_base<\n      CwiseTernaryOp<TernaryOp, Arg1, Arg2, Arg3> >::type Base;\n};\n\n}  // end namespace Eigen\n\n#endif  // EIGEN_CWISE_TERNARY_OP_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/CwiseUnaryOp.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CWISE_UNARY_OP_H\n#define EIGEN_CWISE_UNARY_OP_H\n\nnamespace Eigen { \n\nnamespace internal {\ntemplate<typename UnaryOp, typename XprType>\nstruct traits<CwiseUnaryOp<UnaryOp, XprType> >\n : traits<XprType>\n{\n  typedef typename result_of<\n                     UnaryOp(const typename XprType::Scalar&)\n                   >::type Scalar;\n  typedef typename XprType::Nested XprTypeNested;\n  typedef typename remove_reference<XprTypeNested>::type _XprTypeNested;\n  enum {\n    Flags = _XprTypeNested::Flags & RowMajorBit \n  };\n};\n}\n\ntemplate<typename UnaryOp, typename XprType, typename StorageKind>\nclass CwiseUnaryOpImpl;\n\n/** \\class CwiseUnaryOp\n  * \\ingroup Core_Module\n  *\n  * \\brief Generic expression where a coefficient-wise unary operator is applied to an expression\n  *\n  * \\tparam UnaryOp template functor implementing the operator\n  * \\tparam XprType the type of the expression to which we are applying the unary operator\n  *\n  * This class represents an expression where a unary operator is applied to an expression.\n  * It is the return type of all operations taking exactly 1 input expression, regardless of the\n  * presence of other inputs such as scalars. For example, the operator* in the expression 3*matrix\n  * is considered unary, because only the right-hand side is an expression, and its\n  * return type is a specialization of CwiseUnaryOp.\n  *\n  * Most of the time, this is the only way that it is used, so you typically don't have to name\n  * CwiseUnaryOp types explicitly.\n  *\n  * \\sa MatrixBase::unaryExpr(const CustomUnaryOp &) const, class CwiseBinaryOp, class CwiseNullaryOp\n  */\ntemplate<typename UnaryOp, typename XprType>\nclass CwiseUnaryOp : public CwiseUnaryOpImpl<UnaryOp, XprType, typename internal::traits<XprType>::StorageKind>, internal::no_assignment_operator\n{\n  public:\n\n    typedef typename CwiseUnaryOpImpl<UnaryOp, XprType,typename internal::traits<XprType>::StorageKind>::Base Base;\n    EIGEN_GENERIC_PUBLIC_INTERFACE(CwiseUnaryOp)\n    typedef typename internal::ref_selector<XprType>::type XprTypeNested;\n    typedef typename internal::remove_all<XprType>::type NestedExpression;\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    explicit CwiseUnaryOp(const XprType& xpr, const UnaryOp& func = UnaryOp())\n      : m_xpr(xpr), m_functor(func) {}\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Index rows() const { return m_xpr.rows(); }\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Index cols() const { return m_xpr.cols(); }\n\n    /** \\returns the functor representing the unary operation */\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const UnaryOp& functor() const { return m_functor; }\n\n    /** \\returns the nested expression */\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const typename internal::remove_all<XprTypeNested>::type&\n    nestedExpression() const { return m_xpr; }\n\n    /** \\returns the nested expression */\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    typename internal::remove_all<XprTypeNested>::type&\n    nestedExpression() { return m_xpr; }\n\n  protected:\n    XprTypeNested m_xpr;\n    const UnaryOp m_functor;\n};\n\n// Generic API dispatcher\ntemplate<typename UnaryOp, typename XprType, typename StorageKind>\nclass CwiseUnaryOpImpl\n  : public internal::generic_xpr_base<CwiseUnaryOp<UnaryOp, XprType> >::type\n{\npublic:\n  typedef typename internal::generic_xpr_base<CwiseUnaryOp<UnaryOp, XprType> >::type Base;\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_CWISE_UNARY_OP_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/CwiseUnaryView.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009-2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CWISE_UNARY_VIEW_H\n#define EIGEN_CWISE_UNARY_VIEW_H\n\nnamespace Eigen {\n\nnamespace internal {\ntemplate<typename ViewOp, typename MatrixType>\nstruct traits<CwiseUnaryView<ViewOp, MatrixType> >\n : traits<MatrixType>\n{\n  typedef typename result_of<\n                     ViewOp(const typename traits<MatrixType>::Scalar&)\n                   >::type Scalar;\n  typedef typename MatrixType::Nested MatrixTypeNested;\n  typedef typename remove_all<MatrixTypeNested>::type _MatrixTypeNested;\n  enum {\n    FlagsLvalueBit = is_lvalue<MatrixType>::value ? LvalueBit : 0,\n    Flags = traits<_MatrixTypeNested>::Flags & (RowMajorBit | FlagsLvalueBit | DirectAccessBit), // FIXME DirectAccessBit should not be handled by expressions\n    MatrixTypeInnerStride =  inner_stride_at_compile_time<MatrixType>::ret,\n    // need to cast the sizeof's from size_t to int explicitly, otherwise:\n    // \"error: no integral type can represent all of the enumerator values\n    InnerStrideAtCompileTime = MatrixTypeInnerStride == Dynamic\n                             ? int(Dynamic)\n                             : int(MatrixTypeInnerStride) * int(sizeof(typename traits<MatrixType>::Scalar) / sizeof(Scalar)),\n    OuterStrideAtCompileTime = outer_stride_at_compile_time<MatrixType>::ret == Dynamic\n                             ? int(Dynamic)\n                             : outer_stride_at_compile_time<MatrixType>::ret * int(sizeof(typename traits<MatrixType>::Scalar) / sizeof(Scalar))\n  };\n};\n}\n\ntemplate<typename ViewOp, typename MatrixType, typename StorageKind>\nclass CwiseUnaryViewImpl;\n\n/** \\class CwiseUnaryView\n  * \\ingroup Core_Module\n  *\n  * \\brief Generic lvalue expression of a coefficient-wise unary operator of a matrix or a vector\n  *\n  * \\tparam ViewOp template functor implementing the view\n  * \\tparam MatrixType the type of the matrix we are applying the unary operator\n  *\n  * This class represents a lvalue expression of a generic unary view operator of a matrix or a vector.\n  * It is the return type of real() and imag(), and most of the time this is the only way it is used.\n  *\n  * \\sa MatrixBase::unaryViewExpr(const CustomUnaryOp &) const, class CwiseUnaryOp\n  */\ntemplate<typename ViewOp, typename MatrixType>\nclass CwiseUnaryView : public CwiseUnaryViewImpl<ViewOp, MatrixType, typename internal::traits<MatrixType>::StorageKind>\n{\n  public:\n\n    typedef typename CwiseUnaryViewImpl<ViewOp, MatrixType,typename internal::traits<MatrixType>::StorageKind>::Base Base;\n    EIGEN_GENERIC_PUBLIC_INTERFACE(CwiseUnaryView)\n    typedef typename internal::ref_selector<MatrixType>::non_const_type MatrixTypeNested;\n    typedef typename internal::remove_all<MatrixType>::type NestedExpression;\n\n    explicit inline CwiseUnaryView(MatrixType& mat, const ViewOp& func = ViewOp())\n      : m_matrix(mat), m_functor(func) {}\n\n    EIGEN_INHERIT_ASSIGNMENT_OPERATORS(CwiseUnaryView)\n\n    EIGEN_STRONG_INLINE Index rows() const { return m_matrix.rows(); }\n    EIGEN_STRONG_INLINE Index cols() const { return m_matrix.cols(); }\n\n    /** \\returns the functor representing unary operation */\n    const ViewOp& functor() const { return m_functor; }\n\n    /** \\returns the nested expression */\n    const typename internal::remove_all<MatrixTypeNested>::type&\n    nestedExpression() const { return m_matrix; }\n\n    /** \\returns the nested expression */\n    typename internal::remove_reference<MatrixTypeNested>::type&\n    nestedExpression() { return m_matrix; }\n\n  protected:\n    MatrixTypeNested m_matrix;\n    ViewOp m_functor;\n};\n\n// Generic API dispatcher\ntemplate<typename ViewOp, typename XprType, typename StorageKind>\nclass CwiseUnaryViewImpl\n  : public internal::generic_xpr_base<CwiseUnaryView<ViewOp, XprType> >::type\n{\npublic:\n  typedef typename internal::generic_xpr_base<CwiseUnaryView<ViewOp, XprType> >::type Base;\n};\n\ntemplate<typename ViewOp, typename MatrixType>\nclass CwiseUnaryViewImpl<ViewOp,MatrixType,Dense>\n  : public internal::dense_xpr_base< CwiseUnaryView<ViewOp, MatrixType> >::type\n{\n  public:\n\n    typedef CwiseUnaryView<ViewOp, MatrixType> Derived;\n    typedef typename internal::dense_xpr_base< CwiseUnaryView<ViewOp, MatrixType> >::type Base;\n\n    EIGEN_DENSE_PUBLIC_INTERFACE(Derived)\n    EIGEN_INHERIT_ASSIGNMENT_OPERATORS(CwiseUnaryViewImpl)\n    \n    EIGEN_DEVICE_FUNC inline Scalar* data() { return &(this->coeffRef(0)); }\n    EIGEN_DEVICE_FUNC inline const Scalar* data() const { return &(this->coeff(0)); }\n\n    EIGEN_DEVICE_FUNC inline Index innerStride() const\n    {\n      return derived().nestedExpression().innerStride() * sizeof(typename internal::traits<MatrixType>::Scalar) / sizeof(Scalar);\n    }\n\n    EIGEN_DEVICE_FUNC inline Index outerStride() const\n    {\n      return derived().nestedExpression().outerStride() * sizeof(typename internal::traits<MatrixType>::Scalar) / sizeof(Scalar);\n    }\n  protected:\n    EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(CwiseUnaryViewImpl)\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_CWISE_UNARY_VIEW_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/DenseBase.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2007-2010 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2008-2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_DENSEBASE_H\n#define EIGEN_DENSEBASE_H\n\nnamespace Eigen {\n\nnamespace internal {\n  \n// The index type defined by EIGEN_DEFAULT_DENSE_INDEX_TYPE must be a signed type.\n// This dummy function simply aims at checking that at compile time.\nstatic inline void check_DenseIndex_is_signed() {\n  EIGEN_STATIC_ASSERT(NumTraits<DenseIndex>::IsSigned,THE_INDEX_TYPE_MUST_BE_A_SIGNED_TYPE); \n}\n\n} // end namespace internal\n  \n/** \\class DenseBase\n  * \\ingroup Core_Module\n  *\n  * \\brief Base class for all dense matrices, vectors, and arrays\n  *\n  * This class is the base that is inherited by all dense objects (matrix, vector, arrays,\n  * and related expression types). The common Eigen API for dense objects is contained in this class.\n  *\n  * \\tparam Derived is the derived type, e.g., a matrix type or an expression.\n  *\n  * This class can be extended with the help of the plugin mechanism described on the page\n  * \\ref TopicCustomizing_Plugins by defining the preprocessor symbol \\c EIGEN_DENSEBASE_PLUGIN.\n  *\n  * \\sa \\blank \\ref TopicClassHierarchy\n  */\ntemplate<typename Derived> class DenseBase\n#ifndef EIGEN_PARSED_BY_DOXYGEN\n  : public DenseCoeffsBase<Derived, internal::accessors_level<Derived>::value>\n#else\n  : public DenseCoeffsBase<Derived,DirectWriteAccessors>\n#endif // not EIGEN_PARSED_BY_DOXYGEN\n{\n  public:\n\n    /** Inner iterator type to iterate over the coefficients of a row or column.\n      * \\sa class InnerIterator\n      */\n    typedef Eigen::InnerIterator<Derived> InnerIterator;\n\n    typedef typename internal::traits<Derived>::StorageKind StorageKind;\n\n    /**\n      * \\brief The type used to store indices\n      * \\details This typedef is relevant for types that store multiple indices such as\n      *          PermutationMatrix or Transpositions, otherwise it defaults to Eigen::Index\n      * \\sa \\blank \\ref TopicPreprocessorDirectives, Eigen::Index, SparseMatrixBase.\n     */\n    typedef typename internal::traits<Derived>::StorageIndex StorageIndex;\n\n    /** The numeric type of the expression' coefficients, e.g. float, double, int or std::complex<float>, etc. */\n    typedef typename internal::traits<Derived>::Scalar Scalar;\n    \n    /** The numeric type of the expression' coefficients, e.g. float, double, int or std::complex<float>, etc.\n      *\n      * It is an alias for the Scalar type */\n    typedef Scalar value_type;\n    \n    typedef typename NumTraits<Scalar>::Real RealScalar;\n    typedef DenseCoeffsBase<Derived, internal::accessors_level<Derived>::value> Base;\n\n    using Base::derived;\n    using Base::const_cast_derived;\n    using Base::rows;\n    using Base::cols;\n    using Base::size;\n    using Base::rowIndexByOuterInner;\n    using Base::colIndexByOuterInner;\n    using Base::coeff;\n    using Base::coeffByOuterInner;\n    using Base::operator();\n    using Base::operator[];\n    using Base::x;\n    using Base::y;\n    using Base::z;\n    using Base::w;\n    using Base::stride;\n    using Base::innerStride;\n    using Base::outerStride;\n    using Base::rowStride;\n    using Base::colStride;\n    typedef typename Base::CoeffReturnType CoeffReturnType;\n\n    enum {\n\n      RowsAtCompileTime = internal::traits<Derived>::RowsAtCompileTime,\n        /**< The number of rows at compile-time. This is just a copy of the value provided\n          * by the \\a Derived type. If a value is not known at compile-time,\n          * it is set to the \\a Dynamic constant.\n          * \\sa MatrixBase::rows(), MatrixBase::cols(), ColsAtCompileTime, SizeAtCompileTime */\n\n      ColsAtCompileTime = internal::traits<Derived>::ColsAtCompileTime,\n        /**< The number of columns at compile-time. This is just a copy of the value provided\n          * by the \\a Derived type. If a value is not known at compile-time,\n          * it is set to the \\a Dynamic constant.\n          * \\sa MatrixBase::rows(), MatrixBase::cols(), RowsAtCompileTime, SizeAtCompileTime */\n\n\n      SizeAtCompileTime = (internal::size_at_compile_time<internal::traits<Derived>::RowsAtCompileTime,\n                                                   internal::traits<Derived>::ColsAtCompileTime>::ret),\n        /**< This is equal to the number of coefficients, i.e. the number of\n          * rows times the number of columns, or to \\a Dynamic if this is not\n          * known at compile-time. \\sa RowsAtCompileTime, ColsAtCompileTime */\n\n      MaxRowsAtCompileTime = internal::traits<Derived>::MaxRowsAtCompileTime,\n        /**< This value is equal to the maximum possible number of rows that this expression\n          * might have. If this expression might have an arbitrarily high number of rows,\n          * this value is set to \\a Dynamic.\n          *\n          * This value is useful to know when evaluating an expression, in order to determine\n          * whether it is possible to avoid doing a dynamic memory allocation.\n          *\n          * \\sa RowsAtCompileTime, MaxColsAtCompileTime, MaxSizeAtCompileTime\n          */\n\n      MaxColsAtCompileTime = internal::traits<Derived>::MaxColsAtCompileTime,\n        /**< This value is equal to the maximum possible number of columns that this expression\n          * might have. If this expression might have an arbitrarily high number of columns,\n          * this value is set to \\a Dynamic.\n          *\n          * This value is useful to know when evaluating an expression, in order to determine\n          * whether it is possible to avoid doing a dynamic memory allocation.\n          *\n          * \\sa ColsAtCompileTime, MaxRowsAtCompileTime, MaxSizeAtCompileTime\n          */\n\n      MaxSizeAtCompileTime = (internal::size_at_compile_time<internal::traits<Derived>::MaxRowsAtCompileTime,\n                                                      internal::traits<Derived>::MaxColsAtCompileTime>::ret),\n        /**< This value is equal to the maximum possible number of coefficients that this expression\n          * might have. If this expression might have an arbitrarily high number of coefficients,\n          * this value is set to \\a Dynamic.\n          *\n          * This value is useful to know when evaluating an expression, in order to determine\n          * whether it is possible to avoid doing a dynamic memory allocation.\n          *\n          * \\sa SizeAtCompileTime, MaxRowsAtCompileTime, MaxColsAtCompileTime\n          */\n\n      IsVectorAtCompileTime = internal::traits<Derived>::RowsAtCompileTime == 1\n                           || internal::traits<Derived>::ColsAtCompileTime == 1,\n        /**< This is set to true if either the number of rows or the number of\n          * columns is known at compile-time to be equal to 1. Indeed, in that case,\n          * we are dealing with a column-vector (if there is only one column) or with\n          * a row-vector (if there is only one row). */\n\n      NumDimensions = int(MaxSizeAtCompileTime) == 1 ? 0 : bool(IsVectorAtCompileTime) ? 1 : 2,\n        /**< This value is equal to Tensor::NumDimensions, i.e. 0 for scalars, 1 for vectors, \n         * and 2 for matrices.\n         */\n\n      Flags = internal::traits<Derived>::Flags,\n        /**< This stores expression \\ref flags flags which may or may not be inherited by new expressions\n          * constructed from this one. See the \\ref flags \"list of flags\".\n          */\n\n      IsRowMajor = int(Flags) & RowMajorBit, /**< True if this expression has row-major storage order. */\n\n      InnerSizeAtCompileTime = int(IsVectorAtCompileTime) ? int(SizeAtCompileTime)\n                             : int(IsRowMajor) ? int(ColsAtCompileTime) : int(RowsAtCompileTime),\n\n      InnerStrideAtCompileTime = internal::inner_stride_at_compile_time<Derived>::ret,\n      OuterStrideAtCompileTime = internal::outer_stride_at_compile_time<Derived>::ret\n    };\n    \n    typedef typename internal::find_best_packet<Scalar,SizeAtCompileTime>::type PacketScalar;\n\n    enum { IsPlainObjectBase = 0 };\n    \n    /** The plain matrix type corresponding to this expression.\n      * \\sa PlainObject */\n    typedef Matrix<typename internal::traits<Derived>::Scalar,\n                internal::traits<Derived>::RowsAtCompileTime,\n                internal::traits<Derived>::ColsAtCompileTime,\n                AutoAlign | (internal::traits<Derived>::Flags&RowMajorBit ? RowMajor : ColMajor),\n                internal::traits<Derived>::MaxRowsAtCompileTime,\n                internal::traits<Derived>::MaxColsAtCompileTime\n          > PlainMatrix;\n    \n    /** The plain array type corresponding to this expression.\n      * \\sa PlainObject */\n    typedef Array<typename internal::traits<Derived>::Scalar,\n                internal::traits<Derived>::RowsAtCompileTime,\n                internal::traits<Derived>::ColsAtCompileTime,\n                AutoAlign | (internal::traits<Derived>::Flags&RowMajorBit ? RowMajor : ColMajor),\n                internal::traits<Derived>::MaxRowsAtCompileTime,\n                internal::traits<Derived>::MaxColsAtCompileTime\n          > PlainArray;\n\n    /** \\brief The plain matrix or array type corresponding to this expression.\n      *\n      * This is not necessarily exactly the return type of eval(). In the case of plain matrices,\n      * the return type of eval() is a const reference to a matrix, not a matrix! It is however guaranteed\n      * that the return type of eval() is either PlainObject or const PlainObject&.\n      */\n    typedef typename internal::conditional<internal::is_same<typename internal::traits<Derived>::XprKind,MatrixXpr >::value,\n                                 PlainMatrix, PlainArray>::type PlainObject;\n\n    /** \\returns the number of nonzero coefficients which is in practice the number\n      * of stored coefficients. */\n    EIGEN_DEVICE_FUNC\n    inline Index nonZeros() const { return size(); }\n\n    /** \\returns the outer size.\n      *\n      * \\note For a vector, this returns just 1. For a matrix (non-vector), this is the major dimension\n      * with respect to the \\ref TopicStorageOrders \"storage order\", i.e., the number of columns for a\n      * column-major matrix, and the number of rows for a row-major matrix. */\n    EIGEN_DEVICE_FUNC\n    Index outerSize() const\n    {\n      return IsVectorAtCompileTime ? 1\n           : int(IsRowMajor) ? this->rows() : this->cols();\n    }\n\n    /** \\returns the inner size.\n      *\n      * \\note For a vector, this is just the size. For a matrix (non-vector), this is the minor dimension\n      * with respect to the \\ref TopicStorageOrders \"storage order\", i.e., the number of rows for a \n      * column-major matrix, and the number of columns for a row-major matrix. */\n    EIGEN_DEVICE_FUNC\n    Index innerSize() const\n    {\n      return IsVectorAtCompileTime ? this->size()\n           : int(IsRowMajor) ? this->cols() : this->rows();\n    }\n\n    /** Only plain matrices/arrays, not expressions, may be resized; therefore the only useful resize methods are\n      * Matrix::resize() and Array::resize(). The present method only asserts that the new size equals the old size, and does\n      * nothing else.\n      */\n    EIGEN_DEVICE_FUNC\n    void resize(Index newSize)\n    {\n      EIGEN_ONLY_USED_FOR_DEBUG(newSize);\n      eigen_assert(newSize == this->size()\n                && \"DenseBase::resize() does not actually allow to resize.\");\n    }\n    /** Only plain matrices/arrays, not expressions, may be resized; therefore the only useful resize methods are\n      * Matrix::resize() and Array::resize(). The present method only asserts that the new size equals the old size, and does\n      * nothing else.\n      */\n    EIGEN_DEVICE_FUNC\n    void resize(Index rows, Index cols)\n    {\n      EIGEN_ONLY_USED_FOR_DEBUG(rows);\n      EIGEN_ONLY_USED_FOR_DEBUG(cols);\n      eigen_assert(rows == this->rows() && cols == this->cols()\n                && \"DenseBase::resize() does not actually allow to resize.\");\n    }\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\n    /** \\internal Represents a matrix with all coefficients equal to one another*/\n    typedef CwiseNullaryOp<internal::scalar_constant_op<Scalar>,PlainObject> ConstantReturnType;\n    /** \\internal \\deprecated Represents a vector with linearly spaced coefficients that allows sequential access only. */\n    EIGEN_DEPRECATED typedef CwiseNullaryOp<internal::linspaced_op<Scalar>,PlainObject> SequentialLinSpacedReturnType;\n    /** \\internal Represents a vector with linearly spaced coefficients that allows random access. */\n    typedef CwiseNullaryOp<internal::linspaced_op<Scalar>,PlainObject> RandomAccessLinSpacedReturnType;\n    /** \\internal the return type of MatrixBase::eigenvalues() */\n    typedef Matrix<typename NumTraits<typename internal::traits<Derived>::Scalar>::Real, internal::traits<Derived>::ColsAtCompileTime, 1> EigenvaluesReturnType;\n\n#endif // not EIGEN_PARSED_BY_DOXYGEN\n\n    /** Copies \\a other into *this. \\returns a reference to *this. */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Derived& operator=(const DenseBase<OtherDerived>& other);\n\n    /** Special case of the template operator=, in order to prevent the compiler\n      * from generating a default operator= (issue hit with g++ 4.1)\n      */\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Derived& operator=(const DenseBase& other);\n\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    Derived& operator=(const EigenBase<OtherDerived> &other);\n\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    Derived& operator+=(const EigenBase<OtherDerived> &other);\n\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    Derived& operator-=(const EigenBase<OtherDerived> &other);\n\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    Derived& operator=(const ReturnByValue<OtherDerived>& func);\n\n    /** \\internal\n      * Copies \\a other into *this without evaluating other. \\returns a reference to *this. */\n    template<typename OtherDerived>\n    /** \\deprecated */\n    EIGEN_DEPRECATED EIGEN_DEVICE_FUNC\n    Derived& lazyAssign(const DenseBase<OtherDerived>& other);\n\n    EIGEN_DEVICE_FUNC\n    CommaInitializer<Derived> operator<< (const Scalar& s);\n\n    template<unsigned int Added,unsigned int Removed>\n    /** \\deprecated it now returns \\c *this */\n    EIGEN_DEPRECATED\n    const Derived& flagged() const\n    { return derived(); }\n\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    CommaInitializer<Derived> operator<< (const DenseBase<OtherDerived>& other);\n\n    typedef Transpose<Derived> TransposeReturnType;\n    EIGEN_DEVICE_FUNC\n    TransposeReturnType transpose();\n    typedef typename internal::add_const<Transpose<const Derived> >::type ConstTransposeReturnType;\n    EIGEN_DEVICE_FUNC\n    ConstTransposeReturnType transpose() const;\n    EIGEN_DEVICE_FUNC\n    void transposeInPlace();\n\n    EIGEN_DEVICE_FUNC static const ConstantReturnType\n    Constant(Index rows, Index cols, const Scalar& value);\n    EIGEN_DEVICE_FUNC static const ConstantReturnType\n    Constant(Index size, const Scalar& value);\n    EIGEN_DEVICE_FUNC static const ConstantReturnType\n    Constant(const Scalar& value);\n\n    EIGEN_DEPRECATED EIGEN_DEVICE_FUNC static const RandomAccessLinSpacedReturnType\n    LinSpaced(Sequential_t, Index size, const Scalar& low, const Scalar& high);\n    EIGEN_DEPRECATED EIGEN_DEVICE_FUNC static const RandomAccessLinSpacedReturnType\n    LinSpaced(Sequential_t, const Scalar& low, const Scalar& high);\n\n    EIGEN_DEVICE_FUNC static const RandomAccessLinSpacedReturnType\n    LinSpaced(Index size, const Scalar& low, const Scalar& high);\n    EIGEN_DEVICE_FUNC static const RandomAccessLinSpacedReturnType\n    LinSpaced(const Scalar& low, const Scalar& high);\n\n    template<typename CustomNullaryOp> EIGEN_DEVICE_FUNC\n    static const CwiseNullaryOp<CustomNullaryOp, PlainObject>\n    NullaryExpr(Index rows, Index cols, const CustomNullaryOp& func);\n    template<typename CustomNullaryOp> EIGEN_DEVICE_FUNC\n    static const CwiseNullaryOp<CustomNullaryOp, PlainObject>\n    NullaryExpr(Index size, const CustomNullaryOp& func);\n    template<typename CustomNullaryOp> EIGEN_DEVICE_FUNC\n    static const CwiseNullaryOp<CustomNullaryOp, PlainObject>\n    NullaryExpr(const CustomNullaryOp& func);\n\n    EIGEN_DEVICE_FUNC static const ConstantReturnType Zero(Index rows, Index cols);\n    EIGEN_DEVICE_FUNC static const ConstantReturnType Zero(Index size);\n    EIGEN_DEVICE_FUNC static const ConstantReturnType Zero();\n    EIGEN_DEVICE_FUNC static const ConstantReturnType Ones(Index rows, Index cols);\n    EIGEN_DEVICE_FUNC static const ConstantReturnType Ones(Index size);\n    EIGEN_DEVICE_FUNC static const ConstantReturnType Ones();\n\n    EIGEN_DEVICE_FUNC void fill(const Scalar& value);\n    EIGEN_DEVICE_FUNC Derived& setConstant(const Scalar& value);\n    EIGEN_DEVICE_FUNC Derived& setLinSpaced(Index size, const Scalar& low, const Scalar& high);\n    EIGEN_DEVICE_FUNC Derived& setLinSpaced(const Scalar& low, const Scalar& high);\n    EIGEN_DEVICE_FUNC Derived& setZero();\n    EIGEN_DEVICE_FUNC Derived& setOnes();\n    EIGEN_DEVICE_FUNC Derived& setRandom();\n\n    template<typename OtherDerived> EIGEN_DEVICE_FUNC\n    bool isApprox(const DenseBase<OtherDerived>& other,\n                  const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const;\n    EIGEN_DEVICE_FUNC\n    bool isMuchSmallerThan(const RealScalar& other,\n                           const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const;\n    template<typename OtherDerived> EIGEN_DEVICE_FUNC\n    bool isMuchSmallerThan(const DenseBase<OtherDerived>& other,\n                           const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const;\n\n    EIGEN_DEVICE_FUNC bool isApproxToConstant(const Scalar& value, const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const;\n    EIGEN_DEVICE_FUNC bool isConstant(const Scalar& value, const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const;\n    EIGEN_DEVICE_FUNC bool isZero(const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const;\n    EIGEN_DEVICE_FUNC bool isOnes(const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const;\n\n    inline bool hasNaN() const;\n    inline bool allFinite() const;\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Derived& operator*=(const Scalar& other);\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Derived& operator/=(const Scalar& other);\n\n    typedef typename internal::add_const_on_value_type<typename internal::eval<Derived>::type>::type EvalReturnType;\n    /** \\returns the matrix or vector obtained by evaluating this expression.\n      *\n      * Notice that in the case of a plain matrix or vector (not an expression) this function just returns\n      * a const reference, in order to avoid a useless copy.\n      *\n      * \\warning Be careful with eval() and the auto C++ keyword, as detailed in this \\link TopicPitfalls_auto_keyword page \\endlink.\n      */\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE EvalReturnType eval() const\n    {\n      // Even though MSVC does not honor strong inlining when the return type\n      // is a dynamic matrix, we desperately need strong inlining for fixed\n      // size types on MSVC.\n      return typename internal::eval<Derived>::type(derived());\n    }\n    \n    /** swaps *this with the expression \\a other.\n      *\n      */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    void swap(const DenseBase<OtherDerived>& other)\n    {\n      EIGEN_STATIC_ASSERT(!OtherDerived::IsPlainObjectBase,THIS_EXPRESSION_IS_NOT_A_LVALUE__IT_IS_READ_ONLY);\n      eigen_assert(rows()==other.rows() && cols()==other.cols());\n      call_assignment(derived(), other.const_cast_derived(), internal::swap_assign_op<Scalar>());\n    }\n\n    /** swaps *this with the matrix or array \\a other.\n      *\n      */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    void swap(PlainObjectBase<OtherDerived>& other)\n    {\n      eigen_assert(rows()==other.rows() && cols()==other.cols());\n      call_assignment(derived(), other.derived(), internal::swap_assign_op<Scalar>());\n    }\n\n    EIGEN_DEVICE_FUNC inline const NestByValue<Derived> nestByValue() const;\n    EIGEN_DEVICE_FUNC inline const ForceAlignedAccess<Derived> forceAlignedAccess() const;\n    EIGEN_DEVICE_FUNC inline ForceAlignedAccess<Derived> forceAlignedAccess();\n    template<bool Enable> EIGEN_DEVICE_FUNC\n    inline const typename internal::conditional<Enable,ForceAlignedAccess<Derived>,Derived&>::type forceAlignedAccessIf() const;\n    template<bool Enable> EIGEN_DEVICE_FUNC\n    inline typename internal::conditional<Enable,ForceAlignedAccess<Derived>,Derived&>::type forceAlignedAccessIf();\n\n    EIGEN_DEVICE_FUNC Scalar sum() const;\n    EIGEN_DEVICE_FUNC Scalar mean() const;\n    EIGEN_DEVICE_FUNC Scalar trace() const;\n\n    EIGEN_DEVICE_FUNC Scalar prod() const;\n\n    EIGEN_DEVICE_FUNC typename internal::traits<Derived>::Scalar minCoeff() const;\n    EIGEN_DEVICE_FUNC typename internal::traits<Derived>::Scalar maxCoeff() const;\n\n    template<typename IndexType> EIGEN_DEVICE_FUNC\n    typename internal::traits<Derived>::Scalar minCoeff(IndexType* row, IndexType* col) const;\n    template<typename IndexType> EIGEN_DEVICE_FUNC\n    typename internal::traits<Derived>::Scalar maxCoeff(IndexType* row, IndexType* col) const;\n    template<typename IndexType> EIGEN_DEVICE_FUNC\n    typename internal::traits<Derived>::Scalar minCoeff(IndexType* index) const;\n    template<typename IndexType> EIGEN_DEVICE_FUNC\n    typename internal::traits<Derived>::Scalar maxCoeff(IndexType* index) const;\n\n    template<typename BinaryOp>\n    EIGEN_DEVICE_FUNC\n    Scalar redux(const BinaryOp& func) const;\n\n    template<typename Visitor>\n    EIGEN_DEVICE_FUNC\n    void visit(Visitor& func) const;\n\n    /** \\returns a WithFormat proxy object allowing to print a matrix the with given\n      * format \\a fmt.\n      *\n      * See class IOFormat for some examples.\n      *\n      * \\sa class IOFormat, class WithFormat\n      */\n    inline const WithFormat<Derived> format(const IOFormat& fmt) const\n    {\n      return WithFormat<Derived>(derived(), fmt);\n    }\n\n    /** \\returns the unique coefficient of a 1x1 expression */\n    EIGEN_DEVICE_FUNC\n    CoeffReturnType value() const\n    {\n      EIGEN_STATIC_ASSERT_SIZE_1x1(Derived)\n      eigen_assert(this->rows() == 1 && this->cols() == 1);\n      return derived().coeff(0,0);\n    }\n\n    EIGEN_DEVICE_FUNC bool all() const;\n    EIGEN_DEVICE_FUNC bool any() const;\n    EIGEN_DEVICE_FUNC Index count() const;\n\n    typedef VectorwiseOp<Derived, Horizontal> RowwiseReturnType;\n    typedef const VectorwiseOp<const Derived, Horizontal> ConstRowwiseReturnType;\n    typedef VectorwiseOp<Derived, Vertical> ColwiseReturnType;\n    typedef const VectorwiseOp<const Derived, Vertical> ConstColwiseReturnType;\n\n    /** \\returns a VectorwiseOp wrapper of *this for broadcasting and partial reductions\n    *\n    * Example: \\include MatrixBase_rowwise.cpp\n    * Output: \\verbinclude MatrixBase_rowwise.out\n    *\n    * \\sa colwise(), class VectorwiseOp, \\ref TutorialReductionsVisitorsBroadcasting\n    */\n    //Code moved here due to a CUDA compiler bug\n    EIGEN_DEVICE_FUNC inline ConstRowwiseReturnType rowwise() const {\n      return ConstRowwiseReturnType(derived());\n    }\n    EIGEN_DEVICE_FUNC RowwiseReturnType rowwise();\n\n    /** \\returns a VectorwiseOp wrapper of *this broadcasting and partial reductions\n    *\n    * Example: \\include MatrixBase_colwise.cpp\n    * Output: \\verbinclude MatrixBase_colwise.out\n    *\n    * \\sa rowwise(), class VectorwiseOp, \\ref TutorialReductionsVisitorsBroadcasting\n    */\n    EIGEN_DEVICE_FUNC inline ConstColwiseReturnType colwise() const {\n      return ConstColwiseReturnType(derived());\n    }\n    EIGEN_DEVICE_FUNC ColwiseReturnType colwise();\n\n    typedef CwiseNullaryOp<internal::scalar_random_op<Scalar>,PlainObject> RandomReturnType;\n    static const RandomReturnType Random(Index rows, Index cols);\n    static const RandomReturnType Random(Index size);\n    static const RandomReturnType Random();\n\n    template<typename ThenDerived,typename ElseDerived>\n    const Select<Derived,ThenDerived,ElseDerived>\n    select(const DenseBase<ThenDerived>& thenMatrix,\n           const DenseBase<ElseDerived>& elseMatrix) const;\n\n    template<typename ThenDerived>\n    inline const Select<Derived,ThenDerived, typename ThenDerived::ConstantReturnType>\n    select(const DenseBase<ThenDerived>& thenMatrix, const typename ThenDerived::Scalar& elseScalar) const;\n\n    template<typename ElseDerived>\n    inline const Select<Derived, typename ElseDerived::ConstantReturnType, ElseDerived >\n    select(const typename ElseDerived::Scalar& thenScalar, const DenseBase<ElseDerived>& elseMatrix) const;\n\n    template<int p> RealScalar lpNorm() const;\n\n    template<int RowFactor, int ColFactor>\n    EIGEN_DEVICE_FUNC\n    const Replicate<Derived,RowFactor,ColFactor> replicate() const;\n    /**\n    * \\return an expression of the replication of \\c *this\n    *\n    * Example: \\include MatrixBase_replicate_int_int.cpp\n    * Output: \\verbinclude MatrixBase_replicate_int_int.out\n    *\n    * \\sa VectorwiseOp::replicate(), DenseBase::replicate<int,int>(), class Replicate\n    */\n    //Code moved here due to a CUDA compiler bug\n    EIGEN_DEVICE_FUNC\n    const Replicate<Derived, Dynamic, Dynamic> replicate(Index rowFactor, Index colFactor) const\n    {\n      return Replicate<Derived, Dynamic, Dynamic>(derived(), rowFactor, colFactor);\n    }\n\n    typedef Reverse<Derived, BothDirections> ReverseReturnType;\n    typedef const Reverse<const Derived, BothDirections> ConstReverseReturnType;\n    EIGEN_DEVICE_FUNC ReverseReturnType reverse();\n    /** This is the const version of reverse(). */\n    //Code moved here due to a CUDA compiler bug\n    EIGEN_DEVICE_FUNC ConstReverseReturnType reverse() const\n    {\n      return ConstReverseReturnType(derived());\n    }\n    EIGEN_DEVICE_FUNC void reverseInPlace();\n\n    #ifdef EIGEN_PARSED_BY_DOXYGEN\n    /** STL-like <a href=\"https://en.cppreference.com/w/cpp/named_req/RandomAccessIterator\">RandomAccessIterator</a>\n      * iterator type as returned by the begin() and end() methods.\n      */\n    typedef random_access_iterator_type iterator;\n    /** This is the const version of iterator (aka read-only) */\n    typedef random_access_iterator_type const_iterator;\n    #else\n    typedef typename internal::conditional< (Flags&DirectAccessBit)==DirectAccessBit,\n                                            internal::pointer_based_stl_iterator<Derived>,\n                                            internal::generic_randaccess_stl_iterator<Derived>\n                                          >::type iterator_type;\n\n    typedef typename internal::conditional< (Flags&DirectAccessBit)==DirectAccessBit,\n                                            internal::pointer_based_stl_iterator<const Derived>,\n                                            internal::generic_randaccess_stl_iterator<const Derived>\n                                          >::type const_iterator_type;\n\n    // Stl-style iterators are supported only for vectors.\n\n    typedef typename internal::conditional< IsVectorAtCompileTime,\n                                            iterator_type,\n                                            void\n                                          >::type iterator;\n\n    typedef typename internal::conditional< IsVectorAtCompileTime,\n                                            const_iterator_type,\n                                            void\n                                          >::type const_iterator;\n    #endif\n\n    inline iterator begin();\n    inline const_iterator begin() const;\n    inline const_iterator cbegin() const;\n    inline iterator end();\n    inline const_iterator end() const;\n    inline const_iterator cend() const;\n\n#define EIGEN_CURRENT_STORAGE_BASE_CLASS Eigen::DenseBase\n#define EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL\n#define EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(COND)\n#define EIGEN_DOC_UNARY_ADDONS(X,Y)\n#   include \"../plugins/CommonCwiseUnaryOps.h\"\n#   include \"../plugins/BlockMethods.h\"\n#   include \"../plugins/IndexedViewMethods.h\"\n#   include \"../plugins/ReshapedMethods.h\"\n#   ifdef EIGEN_DENSEBASE_PLUGIN\n#     include EIGEN_DENSEBASE_PLUGIN\n#   endif\n#undef EIGEN_CURRENT_STORAGE_BASE_CLASS\n#undef EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL\n#undef EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF\n#undef EIGEN_DOC_UNARY_ADDONS\n\n    // disable the use of evalTo for dense objects with a nice compilation error\n    template<typename Dest>\n    EIGEN_DEVICE_FUNC\n    inline void evalTo(Dest& ) const\n    {\n      EIGEN_STATIC_ASSERT((internal::is_same<Dest,void>::value),THE_EVAL_EVALTO_FUNCTION_SHOULD_NEVER_BE_CALLED_FOR_DENSE_OBJECTS);\n    }\n\n  protected:\n    EIGEN_DEFAULT_COPY_CONSTRUCTOR(DenseBase)\n    /** Default constructor. Do nothing. */\n    EIGEN_DEVICE_FUNC DenseBase()\n    {\n      /* Just checks for self-consistency of the flags.\n       * Only do it when debugging Eigen, as this borders on paranoia and could slow compilation down\n       */\n#ifdef EIGEN_INTERNAL_DEBUGGING\n      EIGEN_STATIC_ASSERT((EIGEN_IMPLIES(MaxRowsAtCompileTime==1 && MaxColsAtCompileTime!=1, int(IsRowMajor))\n                        && EIGEN_IMPLIES(MaxColsAtCompileTime==1 && MaxRowsAtCompileTime!=1, int(!IsRowMajor))),\n                          INVALID_STORAGE_ORDER_FOR_THIS_VECTOR_EXPRESSION)\n#endif\n    }\n\n  private:\n    EIGEN_DEVICE_FUNC explicit DenseBase(int);\n    EIGEN_DEVICE_FUNC DenseBase(int,int);\n    template<typename OtherDerived> EIGEN_DEVICE_FUNC explicit DenseBase(const DenseBase<OtherDerived>&);\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_DENSEBASE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/DenseCoeffsBase.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2010 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_DENSECOEFFSBASE_H\n#define EIGEN_DENSECOEFFSBASE_H\n\nnamespace Eigen {\n\nnamespace internal {\ntemplate<typename T> struct add_const_on_value_type_if_arithmetic\n{\n  typedef typename conditional<is_arithmetic<T>::value, T, typename add_const_on_value_type<T>::type>::type type;\n};\n}\n\n/** \\brief Base class providing read-only coefficient access to matrices and arrays.\n  * \\ingroup Core_Module\n  * \\tparam Derived Type of the derived class\n  *\n  * \\note #ReadOnlyAccessors Constant indicating read-only access\n  *\n  * This class defines the \\c operator() \\c const function and friends, which can be used to read specific\n  * entries of a matrix or array.\n  * \n  * \\sa DenseCoeffsBase<Derived, WriteAccessors>, DenseCoeffsBase<Derived, DirectAccessors>,\n  *     \\ref TopicClassHierarchy\n  */\ntemplate<typename Derived>\nclass DenseCoeffsBase<Derived,ReadOnlyAccessors> : public EigenBase<Derived>\n{\n  public:\n    typedef typename internal::traits<Derived>::StorageKind StorageKind;\n    typedef typename internal::traits<Derived>::Scalar Scalar;\n    typedef typename internal::packet_traits<Scalar>::type PacketScalar;\n\n    // Explanation for this CoeffReturnType typedef.\n    // - This is the return type of the coeff() method.\n    // - The LvalueBit means exactly that we can offer a coeffRef() method, which means exactly that we can get references\n    // to coeffs, which means exactly that we can have coeff() return a const reference (as opposed to returning a value).\n    // - The is_artihmetic check is required since \"const int\", \"const double\", etc. will cause warnings on some systems\n    // while the declaration of \"const T\", where T is a non arithmetic type does not. Always returning \"const Scalar&\" is\n    // not possible, since the underlying expressions might not offer a valid address the reference could be referring to.\n    typedef typename internal::conditional<bool(internal::traits<Derived>::Flags&LvalueBit),\n                         const Scalar&,\n                         typename internal::conditional<internal::is_arithmetic<Scalar>::value, Scalar, const Scalar>::type\n                     >::type CoeffReturnType;\n\n    typedef typename internal::add_const_on_value_type_if_arithmetic<\n                         typename internal::packet_traits<Scalar>::type\n                     >::type PacketReturnType;\n\n    typedef EigenBase<Derived> Base;\n    using Base::rows;\n    using Base::cols;\n    using Base::size;\n    using Base::derived;\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Index rowIndexByOuterInner(Index outer, Index inner) const\n    {\n      return int(Derived::RowsAtCompileTime) == 1 ? 0\n          : int(Derived::ColsAtCompileTime) == 1 ? inner\n          : int(Derived::Flags)&RowMajorBit ? outer\n          : inner;\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Index colIndexByOuterInner(Index outer, Index inner) const\n    {\n      return int(Derived::ColsAtCompileTime) == 1 ? 0\n          : int(Derived::RowsAtCompileTime) == 1 ? inner\n          : int(Derived::Flags)&RowMajorBit ? inner\n          : outer;\n    }\n\n    /** Short version: don't use this function, use\n      * \\link operator()(Index,Index) const \\endlink instead.\n      *\n      * Long version: this function is similar to\n      * \\link operator()(Index,Index) const \\endlink, but without the assertion.\n      * Use this for limiting the performance cost of debugging code when doing\n      * repeated coefficient access. Only use this when it is guaranteed that the\n      * parameters \\a row and \\a col are in range.\n      *\n      * If EIGEN_INTERNAL_DEBUGGING is defined, an assertion will be made, making this\n      * function equivalent to \\link operator()(Index,Index) const \\endlink.\n      *\n      * \\sa operator()(Index,Index) const, coeffRef(Index,Index), coeff(Index) const\n      */\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index col) const\n    {\n      eigen_internal_assert(row >= 0 && row < rows()\n                         && col >= 0 && col < cols());\n      return internal::evaluator<Derived>(derived()).coeff(row,col);\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE CoeffReturnType coeffByOuterInner(Index outer, Index inner) const\n    {\n      return coeff(rowIndexByOuterInner(outer, inner),\n                   colIndexByOuterInner(outer, inner));\n    }\n\n    /** \\returns the coefficient at given the given row and column.\n      *\n      * \\sa operator()(Index,Index), operator[](Index)\n      */\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE CoeffReturnType operator()(Index row, Index col) const\n    {\n      eigen_assert(row >= 0 && row < rows()\n          && col >= 0 && col < cols());\n      return coeff(row, col);\n    }\n\n    /** Short version: don't use this function, use\n      * \\link operator[](Index) const \\endlink instead.\n      *\n      * Long version: this function is similar to\n      * \\link operator[](Index) const \\endlink, but without the assertion.\n      * Use this for limiting the performance cost of debugging code when doing\n      * repeated coefficient access. Only use this when it is guaranteed that the\n      * parameter \\a index is in range.\n      *\n      * If EIGEN_INTERNAL_DEBUGGING is defined, an assertion will be made, making this\n      * function equivalent to \\link operator[](Index) const \\endlink.\n      *\n      * \\sa operator[](Index) const, coeffRef(Index), coeff(Index,Index) const\n      */\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE CoeffReturnType\n    coeff(Index index) const\n    {\n      EIGEN_STATIC_ASSERT(internal::evaluator<Derived>::Flags & LinearAccessBit,\n                          THIS_COEFFICIENT_ACCESSOR_TAKING_ONE_ACCESS_IS_ONLY_FOR_EXPRESSIONS_ALLOWING_LINEAR_ACCESS)\n      eigen_internal_assert(index >= 0 && index < size());\n      return internal::evaluator<Derived>(derived()).coeff(index);\n    }\n\n\n    /** \\returns the coefficient at given index.\n      *\n      * This method is allowed only for vector expressions, and for matrix expressions having the LinearAccessBit.\n      *\n      * \\sa operator[](Index), operator()(Index,Index) const, x() const, y() const,\n      * z() const, w() const\n      */\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE CoeffReturnType\n    operator[](Index index) const\n    {\n      EIGEN_STATIC_ASSERT(Derived::IsVectorAtCompileTime,\n                          THE_BRACKET_OPERATOR_IS_ONLY_FOR_VECTORS__USE_THE_PARENTHESIS_OPERATOR_INSTEAD)\n      eigen_assert(index >= 0 && index < size());\n      return coeff(index);\n    }\n\n    /** \\returns the coefficient at given index.\n      *\n      * This is synonymous to operator[](Index) const.\n      *\n      * This method is allowed only for vector expressions, and for matrix expressions having the LinearAccessBit.\n      *\n      * \\sa operator[](Index), operator()(Index,Index) const, x() const, y() const,\n      * z() const, w() const\n      */\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE CoeffReturnType\n    operator()(Index index) const\n    {\n      eigen_assert(index >= 0 && index < size());\n      return coeff(index);\n    }\n\n    /** equivalent to operator[](0).  */\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE CoeffReturnType\n    x() const { return (*this)[0]; }\n\n    /** equivalent to operator[](1).  */\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE CoeffReturnType\n    y() const\n    {\n      EIGEN_STATIC_ASSERT(Derived::SizeAtCompileTime==-1 || Derived::SizeAtCompileTime>=2, OUT_OF_RANGE_ACCESS);\n      return (*this)[1];\n    }\n\n    /** equivalent to operator[](2).  */\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE CoeffReturnType\n    z() const\n    {\n      EIGEN_STATIC_ASSERT(Derived::SizeAtCompileTime==-1 || Derived::SizeAtCompileTime>=3, OUT_OF_RANGE_ACCESS);\n      return (*this)[2];\n    }\n\n    /** equivalent to operator[](3).  */\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE CoeffReturnType\n    w() const\n    {\n      EIGEN_STATIC_ASSERT(Derived::SizeAtCompileTime==-1 || Derived::SizeAtCompileTime>=4, OUT_OF_RANGE_ACCESS);\n      return (*this)[3];\n    }\n\n    /** \\internal\n      * \\returns the packet of coefficients starting at the given row and column. It is your responsibility\n      * to ensure that a packet really starts there. This method is only available on expressions having the\n      * PacketAccessBit.\n      *\n      * The \\a LoadMode parameter may have the value \\a #Aligned or \\a #Unaligned. Its effect is to select\n      * the appropriate vectorization instruction. Aligned access is faster, but is only possible for packets\n      * starting at an address which is a multiple of the packet size.\n      */\n\n    template<int LoadMode>\n    EIGEN_STRONG_INLINE PacketReturnType packet(Index row, Index col) const\n    {\n      typedef typename internal::packet_traits<Scalar>::type DefaultPacketType;\n      eigen_internal_assert(row >= 0 && row < rows() && col >= 0 && col < cols());\n      return internal::evaluator<Derived>(derived()).template packet<LoadMode,DefaultPacketType>(row,col);\n    }\n\n\n    /** \\internal */\n    template<int LoadMode>\n    EIGEN_STRONG_INLINE PacketReturnType packetByOuterInner(Index outer, Index inner) const\n    {\n      return packet<LoadMode>(rowIndexByOuterInner(outer, inner),\n                              colIndexByOuterInner(outer, inner));\n    }\n\n    /** \\internal\n      * \\returns the packet of coefficients starting at the given index. It is your responsibility\n      * to ensure that a packet really starts there. This method is only available on expressions having the\n      * PacketAccessBit and the LinearAccessBit.\n      *\n      * The \\a LoadMode parameter may have the value \\a #Aligned or \\a #Unaligned. Its effect is to select\n      * the appropriate vectorization instruction. Aligned access is faster, but is only possible for packets\n      * starting at an address which is a multiple of the packet size.\n      */\n\n    template<int LoadMode>\n    EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const\n    {\n      EIGEN_STATIC_ASSERT(internal::evaluator<Derived>::Flags & LinearAccessBit,\n                          THIS_COEFFICIENT_ACCESSOR_TAKING_ONE_ACCESS_IS_ONLY_FOR_EXPRESSIONS_ALLOWING_LINEAR_ACCESS)\n      typedef typename internal::packet_traits<Scalar>::type DefaultPacketType;\n      eigen_internal_assert(index >= 0 && index < size());\n      return internal::evaluator<Derived>(derived()).template packet<LoadMode,DefaultPacketType>(index);\n    }\n\n  protected:\n    // explanation: DenseBase is doing \"using ...\" on the methods from DenseCoeffsBase.\n    // But some methods are only available in the DirectAccess case.\n    // So we add dummy methods here with these names, so that \"using... \" doesn't fail.\n    // It's not private so that the child class DenseBase can access them, and it's not public\n    // either since it's an implementation detail, so has to be protected.\n    void coeffRef();\n    void coeffRefByOuterInner();\n    void writePacket();\n    void writePacketByOuterInner();\n    void copyCoeff();\n    void copyCoeffByOuterInner();\n    void copyPacket();\n    void copyPacketByOuterInner();\n    void stride();\n    void innerStride();\n    void outerStride();\n    void rowStride();\n    void colStride();\n};\n\n/** \\brief Base class providing read/write coefficient access to matrices and arrays.\n  * \\ingroup Core_Module\n  * \\tparam Derived Type of the derived class\n  *\n  * \\note #WriteAccessors Constant indicating read/write access\n  *\n  * This class defines the non-const \\c operator() function and friends, which can be used to write specific\n  * entries of a matrix or array. This class inherits DenseCoeffsBase<Derived, ReadOnlyAccessors> which\n  * defines the const variant for reading specific entries.\n  * \n  * \\sa DenseCoeffsBase<Derived, DirectAccessors>, \\ref TopicClassHierarchy\n  */\ntemplate<typename Derived>\nclass DenseCoeffsBase<Derived, WriteAccessors> : public DenseCoeffsBase<Derived, ReadOnlyAccessors>\n{\n  public:\n\n    typedef DenseCoeffsBase<Derived, ReadOnlyAccessors> Base;\n\n    typedef typename internal::traits<Derived>::StorageKind StorageKind;\n    typedef typename internal::traits<Derived>::Scalar Scalar;\n    typedef typename internal::packet_traits<Scalar>::type PacketScalar;\n    typedef typename NumTraits<Scalar>::Real RealScalar;\n\n    using Base::coeff;\n    using Base::rows;\n    using Base::cols;\n    using Base::size;\n    using Base::derived;\n    using Base::rowIndexByOuterInner;\n    using Base::colIndexByOuterInner;\n    using Base::operator[];\n    using Base::operator();\n    using Base::x;\n    using Base::y;\n    using Base::z;\n    using Base::w;\n\n    /** Short version: don't use this function, use\n      * \\link operator()(Index,Index) \\endlink instead.\n      *\n      * Long version: this function is similar to\n      * \\link operator()(Index,Index) \\endlink, but without the assertion.\n      * Use this for limiting the performance cost of debugging code when doing\n      * repeated coefficient access. Only use this when it is guaranteed that the\n      * parameters \\a row and \\a col are in range.\n      *\n      * If EIGEN_INTERNAL_DEBUGGING is defined, an assertion will be made, making this\n      * function equivalent to \\link operator()(Index,Index) \\endlink.\n      *\n      * \\sa operator()(Index,Index), coeff(Index, Index) const, coeffRef(Index)\n      */\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Scalar& coeffRef(Index row, Index col)\n    {\n      eigen_internal_assert(row >= 0 && row < rows()\n                         && col >= 0 && col < cols());\n      return internal::evaluator<Derived>(derived()).coeffRef(row,col);\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Scalar&\n    coeffRefByOuterInner(Index outer, Index inner)\n    {\n      return coeffRef(rowIndexByOuterInner(outer, inner),\n                      colIndexByOuterInner(outer, inner));\n    }\n\n    /** \\returns a reference to the coefficient at given the given row and column.\n      *\n      * \\sa operator[](Index)\n      */\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Scalar&\n    operator()(Index row, Index col)\n    {\n      eigen_assert(row >= 0 && row < rows()\n          && col >= 0 && col < cols());\n      return coeffRef(row, col);\n    }\n\n\n    /** Short version: don't use this function, use\n      * \\link operator[](Index) \\endlink instead.\n      *\n      * Long version: this function is similar to\n      * \\link operator[](Index) \\endlink, but without the assertion.\n      * Use this for limiting the performance cost of debugging code when doing\n      * repeated coefficient access. Only use this when it is guaranteed that the\n      * parameters \\a row and \\a col are in range.\n      *\n      * If EIGEN_INTERNAL_DEBUGGING is defined, an assertion will be made, making this\n      * function equivalent to \\link operator[](Index) \\endlink.\n      *\n      * \\sa operator[](Index), coeff(Index) const, coeffRef(Index,Index)\n      */\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Scalar&\n    coeffRef(Index index)\n    {\n      EIGEN_STATIC_ASSERT(internal::evaluator<Derived>::Flags & LinearAccessBit,\n                          THIS_COEFFICIENT_ACCESSOR_TAKING_ONE_ACCESS_IS_ONLY_FOR_EXPRESSIONS_ALLOWING_LINEAR_ACCESS)\n      eigen_internal_assert(index >= 0 && index < size());\n      return internal::evaluator<Derived>(derived()).coeffRef(index);\n    }\n\n    /** \\returns a reference to the coefficient at given index.\n      *\n      * This method is allowed only for vector expressions, and for matrix expressions having the LinearAccessBit.\n      *\n      * \\sa operator[](Index) const, operator()(Index,Index), x(), y(), z(), w()\n      */\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Scalar&\n    operator[](Index index)\n    {\n      EIGEN_STATIC_ASSERT(Derived::IsVectorAtCompileTime,\n                          THE_BRACKET_OPERATOR_IS_ONLY_FOR_VECTORS__USE_THE_PARENTHESIS_OPERATOR_INSTEAD)\n      eigen_assert(index >= 0 && index < size());\n      return coeffRef(index);\n    }\n\n    /** \\returns a reference to the coefficient at given index.\n      *\n      * This is synonymous to operator[](Index).\n      *\n      * This method is allowed only for vector expressions, and for matrix expressions having the LinearAccessBit.\n      *\n      * \\sa operator[](Index) const, operator()(Index,Index), x(), y(), z(), w()\n      */\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Scalar&\n    operator()(Index index)\n    {\n      eigen_assert(index >= 0 && index < size());\n      return coeffRef(index);\n    }\n\n    /** equivalent to operator[](0).  */\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Scalar&\n    x() { return (*this)[0]; }\n\n    /** equivalent to operator[](1).  */\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Scalar&\n    y()\n    {\n      EIGEN_STATIC_ASSERT(Derived::SizeAtCompileTime==-1 || Derived::SizeAtCompileTime>=2, OUT_OF_RANGE_ACCESS);\n      return (*this)[1];\n    }\n\n    /** equivalent to operator[](2).  */\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Scalar&\n    z()\n    {\n      EIGEN_STATIC_ASSERT(Derived::SizeAtCompileTime==-1 || Derived::SizeAtCompileTime>=3, OUT_OF_RANGE_ACCESS);\n      return (*this)[2];\n    }\n\n    /** equivalent to operator[](3).  */\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Scalar&\n    w()\n    {\n      EIGEN_STATIC_ASSERT(Derived::SizeAtCompileTime==-1 || Derived::SizeAtCompileTime>=4, OUT_OF_RANGE_ACCESS);\n      return (*this)[3];\n    }\n};\n\n/** \\brief Base class providing direct read-only coefficient access to matrices and arrays.\n  * \\ingroup Core_Module\n  * \\tparam Derived Type of the derived class\n  *\n  * \\note #DirectAccessors Constant indicating direct access\n  *\n  * This class defines functions to work with strides which can be used to access entries directly. This class\n  * inherits DenseCoeffsBase<Derived, ReadOnlyAccessors> which defines functions to access entries read-only using\n  * \\c operator() .\n  *\n  * \\sa \\blank \\ref TopicClassHierarchy\n  */\ntemplate<typename Derived>\nclass DenseCoeffsBase<Derived, DirectAccessors> : public DenseCoeffsBase<Derived, ReadOnlyAccessors>\n{\n  public:\n\n    typedef DenseCoeffsBase<Derived, ReadOnlyAccessors> Base;\n    typedef typename internal::traits<Derived>::Scalar Scalar;\n    typedef typename NumTraits<Scalar>::Real RealScalar;\n\n    using Base::rows;\n    using Base::cols;\n    using Base::size;\n    using Base::derived;\n\n    /** \\returns the pointer increment between two consecutive elements within a slice in the inner direction.\n      *\n      * \\sa outerStride(), rowStride(), colStride()\n      */\n    EIGEN_DEVICE_FUNC\n    inline Index innerStride() const\n    {\n      return derived().innerStride();\n    }\n\n    /** \\returns the pointer increment between two consecutive inner slices (for example, between two consecutive columns\n      *          in a column-major matrix).\n      *\n      * \\sa innerStride(), rowStride(), colStride()\n      */\n    EIGEN_DEVICE_FUNC\n    inline Index outerStride() const\n    {\n      return derived().outerStride();\n    }\n\n    // FIXME shall we remove it ?\n    inline Index stride() const\n    {\n      return Derived::IsVectorAtCompileTime ? innerStride() : outerStride();\n    }\n\n    /** \\returns the pointer increment between two consecutive rows.\n      *\n      * \\sa innerStride(), outerStride(), colStride()\n      */\n    EIGEN_DEVICE_FUNC\n    inline Index rowStride() const\n    {\n      return Derived::IsRowMajor ? outerStride() : innerStride();\n    }\n\n    /** \\returns the pointer increment between two consecutive columns.\n      *\n      * \\sa innerStride(), outerStride(), rowStride()\n      */\n    EIGEN_DEVICE_FUNC\n    inline Index colStride() const\n    {\n      return Derived::IsRowMajor ? innerStride() : outerStride();\n    }\n};\n\n/** \\brief Base class providing direct read/write coefficient access to matrices and arrays.\n  * \\ingroup Core_Module\n  * \\tparam Derived Type of the derived class\n  *\n  * \\note #DirectWriteAccessors Constant indicating direct access\n  *\n  * This class defines functions to work with strides which can be used to access entries directly. This class\n  * inherits DenseCoeffsBase<Derived, WriteAccessors> which defines functions to access entries read/write using\n  * \\c operator().\n  *\n  * \\sa \\blank \\ref TopicClassHierarchy\n  */\ntemplate<typename Derived>\nclass DenseCoeffsBase<Derived, DirectWriteAccessors>\n  : public DenseCoeffsBase<Derived, WriteAccessors>\n{\n  public:\n\n    typedef DenseCoeffsBase<Derived, WriteAccessors> Base;\n    typedef typename internal::traits<Derived>::Scalar Scalar;\n    typedef typename NumTraits<Scalar>::Real RealScalar;\n\n    using Base::rows;\n    using Base::cols;\n    using Base::size;\n    using Base::derived;\n\n    /** \\returns the pointer increment between two consecutive elements within a slice in the inner direction.\n      *\n      * \\sa outerStride(), rowStride(), colStride()\n      */\n    EIGEN_DEVICE_FUNC\n    inline Index innerStride() const\n    {\n      return derived().innerStride();\n    }\n\n    /** \\returns the pointer increment between two consecutive inner slices (for example, between two consecutive columns\n      *          in a column-major matrix).\n      *\n      * \\sa innerStride(), rowStride(), colStride()\n      */\n    EIGEN_DEVICE_FUNC\n    inline Index outerStride() const\n    {\n      return derived().outerStride();\n    }\n\n    // FIXME shall we remove it ?\n    inline Index stride() const\n    {\n      return Derived::IsVectorAtCompileTime ? innerStride() : outerStride();\n    }\n\n    /** \\returns the pointer increment between two consecutive rows.\n      *\n      * \\sa innerStride(), outerStride(), colStride()\n      */\n    EIGEN_DEVICE_FUNC\n    inline Index rowStride() const\n    {\n      return Derived::IsRowMajor ? outerStride() : innerStride();\n    }\n\n    /** \\returns the pointer increment between two consecutive columns.\n      *\n      * \\sa innerStride(), outerStride(), rowStride()\n      */\n    EIGEN_DEVICE_FUNC\n    inline Index colStride() const\n    {\n      return Derived::IsRowMajor ? innerStride() : outerStride();\n    }\n};\n\nnamespace internal {\n\ntemplate<int Alignment, typename Derived, bool JustReturnZero>\nstruct first_aligned_impl\n{\n  static inline Index run(const Derived&)\n  { return 0; }\n};\n\ntemplate<int Alignment, typename Derived>\nstruct first_aligned_impl<Alignment, Derived, false>\n{\n  static inline Index run(const Derived& m)\n  {\n    return internal::first_aligned<Alignment>(m.data(), m.size());\n  }\n};\n\n/** \\internal \\returns the index of the first element of the array stored by \\a m that is properly aligned with respect to \\a Alignment for vectorization.\n  *\n  * \\tparam Alignment requested alignment in Bytes.\n  *\n  * There is also the variant first_aligned(const Scalar*, Integer) defined in Memory.h. See it for more\n  * documentation.\n  */\ntemplate<int Alignment, typename Derived>\nstatic inline Index first_aligned(const DenseBase<Derived>& m)\n{\n  enum { ReturnZero = (int(evaluator<Derived>::Alignment) >= Alignment) || !(Derived::Flags & DirectAccessBit) };\n  return first_aligned_impl<Alignment, Derived, ReturnZero>::run(m.derived());\n}\n\ntemplate<typename Derived>\nstatic inline Index first_default_aligned(const DenseBase<Derived>& m)\n{\n  typedef typename Derived::Scalar Scalar;\n  typedef typename packet_traits<Scalar>::type DefaultPacketType;\n  return internal::first_aligned<int(unpacket_traits<DefaultPacketType>::alignment),Derived>(m);\n}\n\ntemplate<typename Derived, bool HasDirectAccess = has_direct_access<Derived>::ret>\nstruct inner_stride_at_compile_time\n{\n  enum { ret = traits<Derived>::InnerStrideAtCompileTime };\n};\n\ntemplate<typename Derived>\nstruct inner_stride_at_compile_time<Derived, false>\n{\n  enum { ret = 0 };\n};\n\ntemplate<typename Derived, bool HasDirectAccess = has_direct_access<Derived>::ret>\nstruct outer_stride_at_compile_time\n{\n  enum { ret = traits<Derived>::OuterStrideAtCompileTime };\n};\n\ntemplate<typename Derived>\nstruct outer_stride_at_compile_time<Derived, false>\n{\n  enum { ret = 0 };\n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_DENSECOEFFSBASE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/DenseStorage.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2006-2009 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2010-2013 Hauke Heibel <hauke.heibel@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_MATRIXSTORAGE_H\n#define EIGEN_MATRIXSTORAGE_H\n\n#ifdef EIGEN_DENSE_STORAGE_CTOR_PLUGIN\n  #define EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN(X) X; EIGEN_DENSE_STORAGE_CTOR_PLUGIN;\n#else\n  #define EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN(X)\n#endif\n\nnamespace Eigen {\n\nnamespace internal {\n\nstruct constructor_without_unaligned_array_assert {};\n\ntemplate<typename T, int Size>\nEIGEN_DEVICE_FUNC\nvoid check_static_allocation_size()\n{\n  // if EIGEN_STACK_ALLOCATION_LIMIT is defined to 0, then no limit\n  #if EIGEN_STACK_ALLOCATION_LIMIT\n  EIGEN_STATIC_ASSERT(Size * sizeof(T) <= EIGEN_STACK_ALLOCATION_LIMIT, OBJECT_ALLOCATED_ON_STACK_IS_TOO_BIG);\n  #endif\n}\n\n/** \\internal\n  * Static array. If the MatrixOrArrayOptions require auto-alignment, the array will be automatically aligned:\n  * to 16 bytes boundary if the total size is a multiple of 16 bytes.\n  */\ntemplate <typename T, int Size, int MatrixOrArrayOptions,\n          int Alignment = (MatrixOrArrayOptions&DontAlign) ? 0\n                        : compute_default_alignment<T,Size>::value >\nstruct plain_array\n{\n  T array[Size];\n\n  EIGEN_DEVICE_FUNC\n  plain_array()\n  { \n    check_static_allocation_size<T,Size>();\n  }\n\n  EIGEN_DEVICE_FUNC\n  plain_array(constructor_without_unaligned_array_assert)\n  { \n    check_static_allocation_size<T,Size>();\n  }\n};\n\n#if defined(EIGEN_DISABLE_UNALIGNED_ARRAY_ASSERT)\n  #define EIGEN_MAKE_UNALIGNED_ARRAY_ASSERT(sizemask)\n#elif EIGEN_GNUC_AT_LEAST(4,7) \n  // GCC 4.7 is too aggressive in its optimizations and remove the alignment test based on the fact the array is declared to be aligned.\n  // See this bug report: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53900\n  // Hiding the origin of the array pointer behind a function argument seems to do the trick even if the function is inlined:\n  template<typename PtrType>\n  EIGEN_ALWAYS_INLINE PtrType eigen_unaligned_array_assert_workaround_gcc47(PtrType array) { return array; }\n  #define EIGEN_MAKE_UNALIGNED_ARRAY_ASSERT(sizemask) \\\n    eigen_assert((internal::UIntPtr(eigen_unaligned_array_assert_workaround_gcc47(array)) & (sizemask)) == 0 \\\n              && \"this assertion is explained here: \" \\\n              \"http://eigen.tuxfamily.org/dox-devel/group__TopicUnalignedArrayAssert.html\" \\\n              \" **** READ THIS WEB PAGE !!! ****\");\n#else\n  #define EIGEN_MAKE_UNALIGNED_ARRAY_ASSERT(sizemask) \\\n    eigen_assert((internal::UIntPtr(array) & (sizemask)) == 0 \\\n              && \"this assertion is explained here: \" \\\n              \"http://eigen.tuxfamily.org/dox-devel/group__TopicUnalignedArrayAssert.html\" \\\n              \" **** READ THIS WEB PAGE !!! ****\");\n#endif\n\ntemplate <typename T, int Size, int MatrixOrArrayOptions>\nstruct plain_array<T, Size, MatrixOrArrayOptions, 8>\n{\n  EIGEN_ALIGN_TO_BOUNDARY(8) T array[Size];\n\n  EIGEN_DEVICE_FUNC\n  plain_array() \n  {\n    EIGEN_MAKE_UNALIGNED_ARRAY_ASSERT(7);\n    check_static_allocation_size<T,Size>();\n  }\n\n  EIGEN_DEVICE_FUNC\n  plain_array(constructor_without_unaligned_array_assert) \n  { \n    check_static_allocation_size<T,Size>();\n  }\n};\n\ntemplate <typename T, int Size, int MatrixOrArrayOptions>\nstruct plain_array<T, Size, MatrixOrArrayOptions, 16>\n{\n  EIGEN_ALIGN_TO_BOUNDARY(16) T array[Size];\n\n  EIGEN_DEVICE_FUNC\n  plain_array() \n  { \n    EIGEN_MAKE_UNALIGNED_ARRAY_ASSERT(15);\n    check_static_allocation_size<T,Size>();\n  }\n\n  EIGEN_DEVICE_FUNC\n  plain_array(constructor_without_unaligned_array_assert) \n  { \n    check_static_allocation_size<T,Size>();\n  }\n};\n\ntemplate <typename T, int Size, int MatrixOrArrayOptions>\nstruct plain_array<T, Size, MatrixOrArrayOptions, 32>\n{\n  EIGEN_ALIGN_TO_BOUNDARY(32) T array[Size];\n\n  EIGEN_DEVICE_FUNC\n  plain_array() \n  {\n    EIGEN_MAKE_UNALIGNED_ARRAY_ASSERT(31);\n    check_static_allocation_size<T,Size>();\n  }\n\n  EIGEN_DEVICE_FUNC\n  plain_array(constructor_without_unaligned_array_assert) \n  { \n    check_static_allocation_size<T,Size>();\n  }\n};\n\ntemplate <typename T, int Size, int MatrixOrArrayOptions>\nstruct plain_array<T, Size, MatrixOrArrayOptions, 64>\n{\n  EIGEN_ALIGN_TO_BOUNDARY(64) T array[Size];\n\n  EIGEN_DEVICE_FUNC\n  plain_array() \n  { \n    EIGEN_MAKE_UNALIGNED_ARRAY_ASSERT(63);\n    check_static_allocation_size<T,Size>();\n  }\n\n  EIGEN_DEVICE_FUNC\n  plain_array(constructor_without_unaligned_array_assert) \n  { \n    check_static_allocation_size<T,Size>();\n  }\n};\n\ntemplate <typename T, int MatrixOrArrayOptions, int Alignment>\nstruct plain_array<T, 0, MatrixOrArrayOptions, Alignment>\n{\n  T array[1];\n  EIGEN_DEVICE_FUNC plain_array() {}\n  EIGEN_DEVICE_FUNC plain_array(constructor_without_unaligned_array_assert) {}\n};\n\n} // end namespace internal\n\n/** \\internal\n  *\n  * \\class DenseStorage\n  * \\ingroup Core_Module\n  *\n  * \\brief Stores the data of a matrix\n  *\n  * This class stores the data of fixed-size, dynamic-size or mixed matrices\n  * in a way as compact as possible.\n  *\n  * \\sa Matrix\n  */\ntemplate<typename T, int Size, int _Rows, int _Cols, int _Options> class DenseStorage;\n\n// purely fixed-size matrix\ntemplate<typename T, int Size, int _Rows, int _Cols, int _Options> class DenseStorage\n{\n    internal::plain_array<T,Size,_Options> m_data;\n  public:\n    EIGEN_DEVICE_FUNC DenseStorage() {\n      EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN(Index size = Size)\n    }\n    EIGEN_DEVICE_FUNC\n    explicit DenseStorage(internal::constructor_without_unaligned_array_assert)\n      : m_data(internal::constructor_without_unaligned_array_assert()) {}\n    EIGEN_DEVICE_FUNC \n    DenseStorage(const DenseStorage& other) : m_data(other.m_data) {\n      EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN(Index size = Size)\n    }\n    EIGEN_DEVICE_FUNC \n    DenseStorage& operator=(const DenseStorage& other)\n    { \n      if (this != &other) m_data = other.m_data;\n      return *this; \n    }\n    EIGEN_DEVICE_FUNC DenseStorage(Index size, Index rows, Index cols) {\n      EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN({})\n      eigen_internal_assert(size==rows*cols && rows==_Rows && cols==_Cols);\n      EIGEN_UNUSED_VARIABLE(size);\n      EIGEN_UNUSED_VARIABLE(rows);\n      EIGEN_UNUSED_VARIABLE(cols);\n    }\n    EIGEN_DEVICE_FUNC void swap(DenseStorage& other) {\n      numext::swap(m_data, other.m_data);\n    }\n    EIGEN_DEVICE_FUNC static Index rows(void) {return _Rows;}\n    EIGEN_DEVICE_FUNC static Index cols(void) {return _Cols;}\n    EIGEN_DEVICE_FUNC void conservativeResize(Index,Index,Index) {}\n    EIGEN_DEVICE_FUNC void resize(Index,Index,Index) {}\n    EIGEN_DEVICE_FUNC const T *data() const { return m_data.array; }\n    EIGEN_DEVICE_FUNC T *data() { return m_data.array; }\n};\n\n// null matrix\ntemplate<typename T, int _Rows, int _Cols, int _Options> class DenseStorage<T, 0, _Rows, _Cols, _Options>\n{\n  public:\n    EIGEN_DEVICE_FUNC DenseStorage() {}\n    EIGEN_DEVICE_FUNC explicit DenseStorage(internal::constructor_without_unaligned_array_assert) {}\n    EIGEN_DEVICE_FUNC DenseStorage(const DenseStorage&) {}\n    EIGEN_DEVICE_FUNC DenseStorage& operator=(const DenseStorage&) { return *this; }\n    EIGEN_DEVICE_FUNC DenseStorage(Index,Index,Index) {}\n    EIGEN_DEVICE_FUNC void swap(DenseStorage& ) {}\n    EIGEN_DEVICE_FUNC static Index rows(void) {return _Rows;}\n    EIGEN_DEVICE_FUNC static Index cols(void) {return _Cols;}\n    EIGEN_DEVICE_FUNC void conservativeResize(Index,Index,Index) {}\n    EIGEN_DEVICE_FUNC void resize(Index,Index,Index) {}\n    EIGEN_DEVICE_FUNC const T *data() const { return 0; }\n    EIGEN_DEVICE_FUNC T *data() { return 0; }\n};\n\n// more specializations for null matrices; these are necessary to resolve ambiguities\ntemplate<typename T, int _Options> class DenseStorage<T, 0, Dynamic, Dynamic, _Options>\n: public DenseStorage<T, 0, 0, 0, _Options> { };\n\ntemplate<typename T, int _Rows, int _Options> class DenseStorage<T, 0, _Rows, Dynamic, _Options>\n: public DenseStorage<T, 0, 0, 0, _Options> { };\n\ntemplate<typename T, int _Cols, int _Options> class DenseStorage<T, 0, Dynamic, _Cols, _Options>\n: public DenseStorage<T, 0, 0, 0, _Options> { };\n\n// dynamic-size matrix with fixed-size storage\ntemplate<typename T, int Size, int _Options> class DenseStorage<T, Size, Dynamic, Dynamic, _Options>\n{\n    internal::plain_array<T,Size,_Options> m_data;\n    Index m_rows;\n    Index m_cols;\n  public:\n    EIGEN_DEVICE_FUNC DenseStorage() : m_rows(0), m_cols(0) {}\n    EIGEN_DEVICE_FUNC explicit DenseStorage(internal::constructor_without_unaligned_array_assert)\n      : m_data(internal::constructor_without_unaligned_array_assert()), m_rows(0), m_cols(0) {}\n    EIGEN_DEVICE_FUNC DenseStorage(const DenseStorage& other) : m_data(other.m_data), m_rows(other.m_rows), m_cols(other.m_cols) {}\n    EIGEN_DEVICE_FUNC DenseStorage& operator=(const DenseStorage& other) \n    { \n      if (this != &other)\n      {\n        m_data = other.m_data;\n        m_rows = other.m_rows;\n        m_cols = other.m_cols;\n      }\n      return *this; \n    }\n    EIGEN_DEVICE_FUNC DenseStorage(Index, Index rows, Index cols) : m_rows(rows), m_cols(cols) {}\n    EIGEN_DEVICE_FUNC void swap(DenseStorage& other)\n    {\n      numext::swap(m_data,other.m_data);\n      numext::swap(m_rows,other.m_rows);\n      numext::swap(m_cols,other.m_cols);\n    }\n    EIGEN_DEVICE_FUNC Index rows() const {return m_rows;}\n    EIGEN_DEVICE_FUNC Index cols() const {return m_cols;}\n    EIGEN_DEVICE_FUNC void conservativeResize(Index, Index rows, Index cols) { m_rows = rows; m_cols = cols; }\n    EIGEN_DEVICE_FUNC void resize(Index, Index rows, Index cols) { m_rows = rows; m_cols = cols; }\n    EIGEN_DEVICE_FUNC const T *data() const { return m_data.array; }\n    EIGEN_DEVICE_FUNC T *data() { return m_data.array; }\n};\n\n// dynamic-size matrix with fixed-size storage and fixed width\ntemplate<typename T, int Size, int _Cols, int _Options> class DenseStorage<T, Size, Dynamic, _Cols, _Options>\n{\n    internal::plain_array<T,Size,_Options> m_data;\n    Index m_rows;\n  public:\n    EIGEN_DEVICE_FUNC DenseStorage() : m_rows(0) {}\n    EIGEN_DEVICE_FUNC explicit DenseStorage(internal::constructor_without_unaligned_array_assert)\n      : m_data(internal::constructor_without_unaligned_array_assert()), m_rows(0) {}\n    EIGEN_DEVICE_FUNC DenseStorage(const DenseStorage& other) : m_data(other.m_data), m_rows(other.m_rows) {}\n    EIGEN_DEVICE_FUNC DenseStorage& operator=(const DenseStorage& other) \n    {\n      if (this != &other)\n      {\n        m_data = other.m_data;\n        m_rows = other.m_rows;\n      }\n      return *this; \n    }\n    EIGEN_DEVICE_FUNC DenseStorage(Index, Index rows, Index) : m_rows(rows) {}\n    EIGEN_DEVICE_FUNC void swap(DenseStorage& other)\n    {\n      numext::swap(m_data,other.m_data);\n      numext::swap(m_rows,other.m_rows);\n    }\n    EIGEN_DEVICE_FUNC Index rows(void) const {return m_rows;}\n    EIGEN_DEVICE_FUNC Index cols(void) const {return _Cols;}\n    EIGEN_DEVICE_FUNC void conservativeResize(Index, Index rows, Index) { m_rows = rows; }\n    EIGEN_DEVICE_FUNC void resize(Index, Index rows, Index) { m_rows = rows; }\n    EIGEN_DEVICE_FUNC const T *data() const { return m_data.array; }\n    EIGEN_DEVICE_FUNC T *data() { return m_data.array; }\n};\n\n// dynamic-size matrix with fixed-size storage and fixed height\ntemplate<typename T, int Size, int _Rows, int _Options> class DenseStorage<T, Size, _Rows, Dynamic, _Options>\n{\n    internal::plain_array<T,Size,_Options> m_data;\n    Index m_cols;\n  public:\n    EIGEN_DEVICE_FUNC DenseStorage() : m_cols(0) {}\n    EIGEN_DEVICE_FUNC explicit DenseStorage(internal::constructor_without_unaligned_array_assert)\n      : m_data(internal::constructor_without_unaligned_array_assert()), m_cols(0) {}\n    EIGEN_DEVICE_FUNC DenseStorage(const DenseStorage& other) : m_data(other.m_data), m_cols(other.m_cols) {}\n    EIGEN_DEVICE_FUNC DenseStorage& operator=(const DenseStorage& other)\n    {\n      if (this != &other)\n      {\n        m_data = other.m_data;\n        m_cols = other.m_cols;\n      }\n      return *this;\n    }\n    EIGEN_DEVICE_FUNC DenseStorage(Index, Index, Index cols) : m_cols(cols) {}\n    EIGEN_DEVICE_FUNC void swap(DenseStorage& other) {\n      numext::swap(m_data,other.m_data);\n      numext::swap(m_cols,other.m_cols);\n    }\n    EIGEN_DEVICE_FUNC Index rows(void) const {return _Rows;}\n    EIGEN_DEVICE_FUNC Index cols(void) const {return m_cols;}\n    EIGEN_DEVICE_FUNC void conservativeResize(Index, Index, Index cols) { m_cols = cols; }\n    EIGEN_DEVICE_FUNC void resize(Index, Index, Index cols) { m_cols = cols; }\n    EIGEN_DEVICE_FUNC const T *data() const { return m_data.array; }\n    EIGEN_DEVICE_FUNC T *data() { return m_data.array; }\n};\n\n// purely dynamic matrix.\ntemplate<typename T, int _Options> class DenseStorage<T, Dynamic, Dynamic, Dynamic, _Options>\n{\n    T *m_data;\n    Index m_rows;\n    Index m_cols;\n  public:\n    EIGEN_DEVICE_FUNC DenseStorage() : m_data(0), m_rows(0), m_cols(0) {}\n    EIGEN_DEVICE_FUNC explicit DenseStorage(internal::constructor_without_unaligned_array_assert)\n       : m_data(0), m_rows(0), m_cols(0) {}\n    EIGEN_DEVICE_FUNC DenseStorage(Index size, Index rows, Index cols)\n      : m_data(internal::conditional_aligned_new_auto<T,(_Options&DontAlign)==0>(size)), m_rows(rows), m_cols(cols)\n    {\n      EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN({})\n      eigen_internal_assert(size==rows*cols && rows>=0 && cols >=0);\n    }\n    EIGEN_DEVICE_FUNC DenseStorage(const DenseStorage& other)\n      : m_data(internal::conditional_aligned_new_auto<T,(_Options&DontAlign)==0>(other.m_rows*other.m_cols))\n      , m_rows(other.m_rows)\n      , m_cols(other.m_cols)\n    {\n      EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN(Index size = m_rows*m_cols)\n      internal::smart_copy(other.m_data, other.m_data+other.m_rows*other.m_cols, m_data);\n    }\n    EIGEN_DEVICE_FUNC DenseStorage& operator=(const DenseStorage& other)\n    {\n      if (this != &other)\n      {\n        DenseStorage tmp(other);\n        this->swap(tmp);\n      }\n      return *this;\n    }\n#if EIGEN_HAS_RVALUE_REFERENCES\n    EIGEN_DEVICE_FUNC\n    DenseStorage(DenseStorage&& other) EIGEN_NOEXCEPT\n      : m_data(std::move(other.m_data))\n      , m_rows(std::move(other.m_rows))\n      , m_cols(std::move(other.m_cols))\n    {\n      other.m_data = nullptr;\n      other.m_rows = 0;\n      other.m_cols = 0;\n    }\n    EIGEN_DEVICE_FUNC\n    DenseStorage& operator=(DenseStorage&& other) EIGEN_NOEXCEPT\n    {\n      numext::swap(m_data, other.m_data);\n      numext::swap(m_rows, other.m_rows);\n      numext::swap(m_cols, other.m_cols);\n      return *this;\n    }\n#endif\n    EIGEN_DEVICE_FUNC ~DenseStorage() { internal::conditional_aligned_delete_auto<T,(_Options&DontAlign)==0>(m_data, m_rows*m_cols); }\n    EIGEN_DEVICE_FUNC void swap(DenseStorage& other)\n    {\n      numext::swap(m_data,other.m_data);\n      numext::swap(m_rows,other.m_rows);\n      numext::swap(m_cols,other.m_cols);\n    }\n    EIGEN_DEVICE_FUNC Index rows(void) const {return m_rows;}\n    EIGEN_DEVICE_FUNC Index cols(void) const {return m_cols;}\n    void conservativeResize(Index size, Index rows, Index cols)\n    {\n      m_data = internal::conditional_aligned_realloc_new_auto<T,(_Options&DontAlign)==0>(m_data, size, m_rows*m_cols);\n      m_rows = rows;\n      m_cols = cols;\n    }\n    EIGEN_DEVICE_FUNC void resize(Index size, Index rows, Index cols)\n    {\n      if(size != m_rows*m_cols)\n      {\n        internal::conditional_aligned_delete_auto<T,(_Options&DontAlign)==0>(m_data, m_rows*m_cols);\n        if (size>0) // >0 and not simply !=0 to let the compiler knows that size cannot be negative\n          m_data = internal::conditional_aligned_new_auto<T,(_Options&DontAlign)==0>(size);\n        else\n          m_data = 0;\n        EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN({})\n      }\n      m_rows = rows;\n      m_cols = cols;\n    }\n    EIGEN_DEVICE_FUNC const T *data() const { return m_data; }\n    EIGEN_DEVICE_FUNC T *data() { return m_data; }\n};\n\n// matrix with dynamic width and fixed height (so that matrix has dynamic size).\ntemplate<typename T, int _Rows, int _Options> class DenseStorage<T, Dynamic, _Rows, Dynamic, _Options>\n{\n    T *m_data;\n    Index m_cols;\n  public:\n    EIGEN_DEVICE_FUNC DenseStorage() : m_data(0), m_cols(0) {}\n    explicit DenseStorage(internal::constructor_without_unaligned_array_assert) : m_data(0), m_cols(0) {}\n    EIGEN_DEVICE_FUNC DenseStorage(Index size, Index rows, Index cols) : m_data(internal::conditional_aligned_new_auto<T,(_Options&DontAlign)==0>(size)), m_cols(cols)\n    {\n      EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN({})\n      eigen_internal_assert(size==rows*cols && rows==_Rows && cols >=0);\n      EIGEN_UNUSED_VARIABLE(rows);\n    }\n    EIGEN_DEVICE_FUNC DenseStorage(const DenseStorage& other)\n      : m_data(internal::conditional_aligned_new_auto<T,(_Options&DontAlign)==0>(_Rows*other.m_cols))\n      , m_cols(other.m_cols)\n    {\n      EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN(Index size = m_cols*_Rows)\n      internal::smart_copy(other.m_data, other.m_data+_Rows*m_cols, m_data);\n    }\n    EIGEN_DEVICE_FUNC DenseStorage& operator=(const DenseStorage& other)\n    {\n      if (this != &other)\n      {\n        DenseStorage tmp(other);\n        this->swap(tmp);\n      }\n      return *this;\n    }    \n#if EIGEN_HAS_RVALUE_REFERENCES\n    EIGEN_DEVICE_FUNC\n    DenseStorage(DenseStorage&& other) EIGEN_NOEXCEPT\n      : m_data(std::move(other.m_data))\n      , m_cols(std::move(other.m_cols))\n    {\n      other.m_data = nullptr;\n      other.m_cols = 0;\n    }\n    EIGEN_DEVICE_FUNC\n    DenseStorage& operator=(DenseStorage&& other) EIGEN_NOEXCEPT\n    {\n      numext::swap(m_data, other.m_data);\n      numext::swap(m_cols, other.m_cols);\n      return *this;\n    }\n#endif\n    EIGEN_DEVICE_FUNC ~DenseStorage() { internal::conditional_aligned_delete_auto<T,(_Options&DontAlign)==0>(m_data, _Rows*m_cols); }\n    EIGEN_DEVICE_FUNC void swap(DenseStorage& other) {\n      numext::swap(m_data,other.m_data);\n      numext::swap(m_cols,other.m_cols);\n    }\n    EIGEN_DEVICE_FUNC static Index rows(void) {return _Rows;}\n    EIGEN_DEVICE_FUNC Index cols(void) const {return m_cols;}\n    EIGEN_DEVICE_FUNC void conservativeResize(Index size, Index, Index cols)\n    {\n      m_data = internal::conditional_aligned_realloc_new_auto<T,(_Options&DontAlign)==0>(m_data, size, _Rows*m_cols);\n      m_cols = cols;\n    }\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void resize(Index size, Index, Index cols)\n    {\n      if(size != _Rows*m_cols)\n      {\n        internal::conditional_aligned_delete_auto<T,(_Options&DontAlign)==0>(m_data, _Rows*m_cols);\n        if (size>0) // >0 and not simply !=0 to let the compiler knows that size cannot be negative\n          m_data = internal::conditional_aligned_new_auto<T,(_Options&DontAlign)==0>(size);\n        else\n          m_data = 0;\n        EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN({})\n      }\n      m_cols = cols;\n    }\n    EIGEN_DEVICE_FUNC const T *data() const { return m_data; }\n    EIGEN_DEVICE_FUNC T *data() { return m_data; }\n};\n\n// matrix with dynamic height and fixed width (so that matrix has dynamic size).\ntemplate<typename T, int _Cols, int _Options> class DenseStorage<T, Dynamic, Dynamic, _Cols, _Options>\n{\n    T *m_data;\n    Index m_rows;\n  public:\n    EIGEN_DEVICE_FUNC DenseStorage() : m_data(0), m_rows(0) {}\n    explicit DenseStorage(internal::constructor_without_unaligned_array_assert) : m_data(0), m_rows(0) {}\n    EIGEN_DEVICE_FUNC DenseStorage(Index size, Index rows, Index cols) : m_data(internal::conditional_aligned_new_auto<T,(_Options&DontAlign)==0>(size)), m_rows(rows)\n    {\n      EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN({})\n      eigen_internal_assert(size==rows*cols && rows>=0 && cols == _Cols);\n      EIGEN_UNUSED_VARIABLE(cols);\n    }\n    EIGEN_DEVICE_FUNC DenseStorage(const DenseStorage& other)\n      : m_data(internal::conditional_aligned_new_auto<T,(_Options&DontAlign)==0>(other.m_rows*_Cols))\n      , m_rows(other.m_rows)\n    {\n      EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN(Index size = m_rows*_Cols)\n      internal::smart_copy(other.m_data, other.m_data+other.m_rows*_Cols, m_data);\n    }\n    EIGEN_DEVICE_FUNC DenseStorage& operator=(const DenseStorage& other)\n    {\n      if (this != &other)\n      {\n        DenseStorage tmp(other);\n        this->swap(tmp);\n      }\n      return *this;\n    }    \n#if EIGEN_HAS_RVALUE_REFERENCES\n    EIGEN_DEVICE_FUNC\n    DenseStorage(DenseStorage&& other) EIGEN_NOEXCEPT\n      : m_data(std::move(other.m_data))\n      , m_rows(std::move(other.m_rows))\n    {\n      other.m_data = nullptr;\n      other.m_rows = 0;\n    }\n    EIGEN_DEVICE_FUNC\n    DenseStorage& operator=(DenseStorage&& other) EIGEN_NOEXCEPT\n    {\n      numext::swap(m_data, other.m_data);\n      numext::swap(m_rows, other.m_rows);\n      return *this;\n    }\n#endif\n    EIGEN_DEVICE_FUNC ~DenseStorage() { internal::conditional_aligned_delete_auto<T,(_Options&DontAlign)==0>(m_data, _Cols*m_rows); }\n    EIGEN_DEVICE_FUNC void swap(DenseStorage& other) {\n      numext::swap(m_data,other.m_data);\n      numext::swap(m_rows,other.m_rows);\n    }\n    EIGEN_DEVICE_FUNC Index rows(void) const {return m_rows;}\n    EIGEN_DEVICE_FUNC static Index cols(void) {return _Cols;}\n    void conservativeResize(Index size, Index rows, Index)\n    {\n      m_data = internal::conditional_aligned_realloc_new_auto<T,(_Options&DontAlign)==0>(m_data, size, m_rows*_Cols);\n      m_rows = rows;\n    }\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void resize(Index size, Index rows, Index)\n    {\n      if(size != m_rows*_Cols)\n      {\n        internal::conditional_aligned_delete_auto<T,(_Options&DontAlign)==0>(m_data, _Cols*m_rows);\n        if (size>0) // >0 and not simply !=0 to let the compiler knows that size cannot be negative\n          m_data = internal::conditional_aligned_new_auto<T,(_Options&DontAlign)==0>(size);\n        else\n          m_data = 0;\n        EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN({})\n      }\n      m_rows = rows;\n    }\n    EIGEN_DEVICE_FUNC const T *data() const { return m_data; }\n    EIGEN_DEVICE_FUNC T *data() { return m_data; }\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_MATRIX_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/Diagonal.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2007-2009 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2009-2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_DIAGONAL_H\n#define EIGEN_DIAGONAL_H\n\nnamespace Eigen { \n\n/** \\class Diagonal\n  * \\ingroup Core_Module\n  *\n  * \\brief Expression of a diagonal/subdiagonal/superdiagonal in a matrix\n  *\n  * \\param MatrixType the type of the object in which we are taking a sub/main/super diagonal\n  * \\param DiagIndex the index of the sub/super diagonal. The default is 0 and it means the main diagonal.\n  *              A positive value means a superdiagonal, a negative value means a subdiagonal.\n  *              You can also use DynamicIndex so the index can be set at runtime.\n  *\n  * The matrix is not required to be square.\n  *\n  * This class represents an expression of the main diagonal, or any sub/super diagonal\n  * of a square matrix. It is the return type of MatrixBase::diagonal() and MatrixBase::diagonal(Index) and most of the\n  * time this is the only way it is used.\n  *\n  * \\sa MatrixBase::diagonal(), MatrixBase::diagonal(Index)\n  */\n\nnamespace internal {\ntemplate<typename MatrixType, int DiagIndex>\nstruct traits<Diagonal<MatrixType,DiagIndex> >\n : traits<MatrixType>\n{\n  typedef typename ref_selector<MatrixType>::type MatrixTypeNested;\n  typedef typename remove_reference<MatrixTypeNested>::type _MatrixTypeNested;\n  typedef typename MatrixType::StorageKind StorageKind;\n  enum {\n    RowsAtCompileTime = (int(DiagIndex) == DynamicIndex || int(MatrixType::SizeAtCompileTime) == Dynamic) ? Dynamic\n                      : (EIGEN_PLAIN_ENUM_MIN(MatrixType::RowsAtCompileTime - EIGEN_PLAIN_ENUM_MAX(-DiagIndex, 0),\n                                              MatrixType::ColsAtCompileTime - EIGEN_PLAIN_ENUM_MAX( DiagIndex, 0))),\n    ColsAtCompileTime = 1,\n    MaxRowsAtCompileTime = int(MatrixType::MaxSizeAtCompileTime) == Dynamic ? Dynamic\n                         : DiagIndex == DynamicIndex ? EIGEN_SIZE_MIN_PREFER_FIXED(MatrixType::MaxRowsAtCompileTime,\n                                                                              MatrixType::MaxColsAtCompileTime)\n                         : (EIGEN_PLAIN_ENUM_MIN(MatrixType::MaxRowsAtCompileTime - EIGEN_PLAIN_ENUM_MAX(-DiagIndex, 0),\n                                                 MatrixType::MaxColsAtCompileTime - EIGEN_PLAIN_ENUM_MAX( DiagIndex, 0))),\n    MaxColsAtCompileTime = 1,\n    MaskLvalueBit = is_lvalue<MatrixType>::value ? LvalueBit : 0,\n    Flags = (unsigned int)_MatrixTypeNested::Flags & (RowMajorBit | MaskLvalueBit | DirectAccessBit) & ~RowMajorBit, // FIXME DirectAccessBit should not be handled by expressions\n    MatrixTypeOuterStride = outer_stride_at_compile_time<MatrixType>::ret,\n    InnerStrideAtCompileTime = MatrixTypeOuterStride == Dynamic ? Dynamic : MatrixTypeOuterStride+1,\n    OuterStrideAtCompileTime = 0\n  };\n};\n}\n\ntemplate<typename MatrixType, int _DiagIndex> class Diagonal\n   : public internal::dense_xpr_base< Diagonal<MatrixType,_DiagIndex> >::type\n{\n  public:\n\n    enum { DiagIndex = _DiagIndex };\n    typedef typename internal::dense_xpr_base<Diagonal>::type Base;\n    EIGEN_DENSE_PUBLIC_INTERFACE(Diagonal)\n\n    EIGEN_DEVICE_FUNC\n    explicit inline Diagonal(MatrixType& matrix, Index a_index = DiagIndex) : m_matrix(matrix), m_index(a_index)\n    {\n      eigen_assert( a_index <= m_matrix.cols() && -a_index <= m_matrix.rows() );\n    }\n\n    EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Diagonal)\n\n    EIGEN_DEVICE_FUNC\n    inline Index rows() const\n    {\n      return m_index.value()<0 ? numext::mini<Index>(m_matrix.cols(),m_matrix.rows()+m_index.value())\n                               : numext::mini<Index>(m_matrix.rows(),m_matrix.cols()-m_index.value());\n    }\n\n    EIGEN_DEVICE_FUNC\n    inline Index cols() const { return 1; }\n\n    EIGEN_DEVICE_FUNC\n    inline Index innerStride() const\n    {\n      return m_matrix.outerStride() + 1;\n    }\n\n    EIGEN_DEVICE_FUNC\n    inline Index outerStride() const\n    {\n      return 0;\n    }\n\n    typedef typename internal::conditional<\n                       internal::is_lvalue<MatrixType>::value,\n                       Scalar,\n                       const Scalar\n                     >::type ScalarWithConstIfNotLvalue;\n\n    EIGEN_DEVICE_FUNC\n    inline ScalarWithConstIfNotLvalue* data() { return &(m_matrix.coeffRef(rowOffset(), colOffset())); }\n    EIGEN_DEVICE_FUNC\n    inline const Scalar* data() const { return &(m_matrix.coeffRef(rowOffset(), colOffset())); }\n\n    EIGEN_DEVICE_FUNC\n    inline Scalar& coeffRef(Index row, Index)\n    {\n      EIGEN_STATIC_ASSERT_LVALUE(MatrixType)\n      return m_matrix.coeffRef(row+rowOffset(), row+colOffset());\n    }\n\n    EIGEN_DEVICE_FUNC\n    inline const Scalar& coeffRef(Index row, Index) const\n    {\n      return m_matrix.coeffRef(row+rowOffset(), row+colOffset());\n    }\n\n    EIGEN_DEVICE_FUNC\n    inline CoeffReturnType coeff(Index row, Index) const\n    {\n      return m_matrix.coeff(row+rowOffset(), row+colOffset());\n    }\n\n    EIGEN_DEVICE_FUNC\n    inline Scalar& coeffRef(Index idx)\n    {\n      EIGEN_STATIC_ASSERT_LVALUE(MatrixType)\n      return m_matrix.coeffRef(idx+rowOffset(), idx+colOffset());\n    }\n\n    EIGEN_DEVICE_FUNC\n    inline const Scalar& coeffRef(Index idx) const\n    {\n      return m_matrix.coeffRef(idx+rowOffset(), idx+colOffset());\n    }\n\n    EIGEN_DEVICE_FUNC\n    inline CoeffReturnType coeff(Index idx) const\n    {\n      return m_matrix.coeff(idx+rowOffset(), idx+colOffset());\n    }\n\n    EIGEN_DEVICE_FUNC\n    inline const typename internal::remove_all<typename MatrixType::Nested>::type& \n    nestedExpression() const \n    {\n      return m_matrix;\n    }\n\n    EIGEN_DEVICE_FUNC\n    inline Index index() const\n    {\n      return m_index.value();\n    }\n\n  protected:\n    typename internal::ref_selector<MatrixType>::non_const_type m_matrix;\n    const internal::variable_if_dynamicindex<Index, DiagIndex> m_index;\n\n  private:\n    // some compilers may fail to optimize std::max etc in case of compile-time constants...\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Index absDiagIndex() const { return m_index.value()>0 ? m_index.value() : -m_index.value(); }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Index rowOffset() const { return m_index.value()>0 ? 0 : -m_index.value(); }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Index colOffset() const { return m_index.value()>0 ? m_index.value() : 0; }\n    // trigger a compile-time error if someone try to call packet\n    template<int LoadMode> typename MatrixType::PacketReturnType packet(Index) const;\n    template<int LoadMode> typename MatrixType::PacketReturnType packet(Index,Index) const;\n};\n\n/** \\returns an expression of the main diagonal of the matrix \\c *this\n  *\n  * \\c *this is not required to be square.\n  *\n  * Example: \\include MatrixBase_diagonal.cpp\n  * Output: \\verbinclude MatrixBase_diagonal.out\n  *\n  * \\sa class Diagonal */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC inline typename MatrixBase<Derived>::DiagonalReturnType\nMatrixBase<Derived>::diagonal()\n{\n  return DiagonalReturnType(derived());\n}\n\n/** This is the const version of diagonal(). */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC inline typename MatrixBase<Derived>::ConstDiagonalReturnType\nMatrixBase<Derived>::diagonal() const\n{\n  return ConstDiagonalReturnType(derived());\n}\n\n/** \\returns an expression of the \\a DiagIndex-th sub or super diagonal of the matrix \\c *this\n  *\n  * \\c *this is not required to be square.\n  *\n  * The template parameter \\a DiagIndex represent a super diagonal if \\a DiagIndex > 0\n  * and a sub diagonal otherwise. \\a DiagIndex == 0 is equivalent to the main diagonal.\n  *\n  * Example: \\include MatrixBase_diagonal_int.cpp\n  * Output: \\verbinclude MatrixBase_diagonal_int.out\n  *\n  * \\sa MatrixBase::diagonal(), class Diagonal */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC inline typename MatrixBase<Derived>::DiagonalDynamicIndexReturnType\nMatrixBase<Derived>::diagonal(Index index)\n{\n  return DiagonalDynamicIndexReturnType(derived(), index);\n}\n\n/** This is the const version of diagonal(Index). */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC inline typename MatrixBase<Derived>::ConstDiagonalDynamicIndexReturnType\nMatrixBase<Derived>::diagonal(Index index) const\n{\n  return ConstDiagonalDynamicIndexReturnType(derived(), index);\n}\n\n/** \\returns an expression of the \\a DiagIndex-th sub or super diagonal of the matrix \\c *this\n  *\n  * \\c *this is not required to be square.\n  *\n  * The template parameter \\a DiagIndex represent a super diagonal if \\a DiagIndex > 0\n  * and a sub diagonal otherwise. \\a DiagIndex == 0 is equivalent to the main diagonal.\n  *\n  * Example: \\include MatrixBase_diagonal_template_int.cpp\n  * Output: \\verbinclude MatrixBase_diagonal_template_int.out\n  *\n  * \\sa MatrixBase::diagonal(), class Diagonal */\ntemplate<typename Derived>\ntemplate<int Index_>\nEIGEN_DEVICE_FUNC\ninline typename MatrixBase<Derived>::template DiagonalIndexReturnType<Index_>::Type\nMatrixBase<Derived>::diagonal()\n{\n  return typename DiagonalIndexReturnType<Index_>::Type(derived());\n}\n\n/** This is the const version of diagonal<int>(). */\ntemplate<typename Derived>\ntemplate<int Index_>\nEIGEN_DEVICE_FUNC\ninline typename MatrixBase<Derived>::template ConstDiagonalIndexReturnType<Index_>::Type\nMatrixBase<Derived>::diagonal() const\n{\n  return typename ConstDiagonalIndexReturnType<Index_>::Type(derived());\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_DIAGONAL_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/DiagonalMatrix.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2007-2009 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_DIAGONALMATRIX_H\n#define EIGEN_DIAGONALMATRIX_H\n\nnamespace Eigen { \n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\ntemplate<typename Derived>\nclass DiagonalBase : public EigenBase<Derived>\n{\n  public:\n    typedef typename internal::traits<Derived>::DiagonalVectorType DiagonalVectorType;\n    typedef typename DiagonalVectorType::Scalar Scalar;\n    typedef typename DiagonalVectorType::RealScalar RealScalar;\n    typedef typename internal::traits<Derived>::StorageKind StorageKind;\n    typedef typename internal::traits<Derived>::StorageIndex StorageIndex;\n\n    enum {\n      RowsAtCompileTime = DiagonalVectorType::SizeAtCompileTime,\n      ColsAtCompileTime = DiagonalVectorType::SizeAtCompileTime,\n      MaxRowsAtCompileTime = DiagonalVectorType::MaxSizeAtCompileTime,\n      MaxColsAtCompileTime = DiagonalVectorType::MaxSizeAtCompileTime,\n      IsVectorAtCompileTime = 0,\n      Flags = NoPreferredStorageOrderBit\n    };\n\n    typedef Matrix<Scalar, RowsAtCompileTime, ColsAtCompileTime, 0, MaxRowsAtCompileTime, MaxColsAtCompileTime> DenseMatrixType;\n    typedef DenseMatrixType DenseType;\n    typedef DiagonalMatrix<Scalar,DiagonalVectorType::SizeAtCompileTime,DiagonalVectorType::MaxSizeAtCompileTime> PlainObject;\n\n    EIGEN_DEVICE_FUNC\n    inline const Derived& derived() const { return *static_cast<const Derived*>(this); }\n    EIGEN_DEVICE_FUNC\n    inline Derived& derived() { return *static_cast<Derived*>(this); }\n\n    EIGEN_DEVICE_FUNC\n    DenseMatrixType toDenseMatrix() const { return derived(); }\n\n    EIGEN_DEVICE_FUNC\n    inline const DiagonalVectorType& diagonal() const { return derived().diagonal(); }\n    EIGEN_DEVICE_FUNC\n    inline DiagonalVectorType& diagonal() { return derived().diagonal(); }\n\n    EIGEN_DEVICE_FUNC\n    inline Index rows() const { return diagonal().size(); }\n    EIGEN_DEVICE_FUNC\n    inline Index cols() const { return diagonal().size(); }\n\n    template<typename MatrixDerived>\n    EIGEN_DEVICE_FUNC\n    const Product<Derived,MatrixDerived,LazyProduct>\n    operator*(const MatrixBase<MatrixDerived> &matrix) const\n    {\n      return Product<Derived, MatrixDerived, LazyProduct>(derived(),matrix.derived());\n    }\n\n    typedef DiagonalWrapper<const CwiseUnaryOp<internal::scalar_inverse_op<Scalar>, const DiagonalVectorType> > InverseReturnType;\n    EIGEN_DEVICE_FUNC\n    inline const InverseReturnType\n    inverse() const\n    {\n      return InverseReturnType(diagonal().cwiseInverse());\n    }\n    \n    EIGEN_DEVICE_FUNC\n    inline const DiagonalWrapper<const EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DiagonalVectorType,Scalar,product) >\n    operator*(const Scalar& scalar) const\n    {\n      return DiagonalWrapper<const EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DiagonalVectorType,Scalar,product) >(diagonal() * scalar);\n    }\n    EIGEN_DEVICE_FUNC\n    friend inline const DiagonalWrapper<const EIGEN_SCALAR_BINARYOP_EXPR_RETURN_TYPE(Scalar,DiagonalVectorType,product) >\n    operator*(const Scalar& scalar, const DiagonalBase& other)\n    {\n      return DiagonalWrapper<const EIGEN_SCALAR_BINARYOP_EXPR_RETURN_TYPE(Scalar,DiagonalVectorType,product) >(scalar * other.diagonal());\n    }\n\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    #ifdef EIGEN_PARSED_BY_DOXYGEN\n    inline unspecified_expression_type\n    #else\n    inline const DiagonalWrapper<const EIGEN_CWISE_BINARY_RETURN_TYPE(DiagonalVectorType,typename OtherDerived::DiagonalVectorType,sum) >\n    #endif\n    operator+(const DiagonalBase<OtherDerived>& other) const\n    {\n      return (diagonal() + other.diagonal()).asDiagonal();\n    }\n\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    #ifdef EIGEN_PARSED_BY_DOXYGEN\n    inline unspecified_expression_type\n    #else\n    inline const DiagonalWrapper<const EIGEN_CWISE_BINARY_RETURN_TYPE(DiagonalVectorType,typename OtherDerived::DiagonalVectorType,difference) >\n    #endif\n    operator-(const DiagonalBase<OtherDerived>& other) const\n    {\n      return (diagonal() - other.diagonal()).asDiagonal();\n    }\n};\n\n#endif\n\n/** \\class DiagonalMatrix\n  * \\ingroup Core_Module\n  *\n  * \\brief Represents a diagonal matrix with its storage\n  *\n  * \\param _Scalar the type of coefficients\n  * \\param SizeAtCompileTime the dimension of the matrix, or Dynamic\n  * \\param MaxSizeAtCompileTime the dimension of the matrix, or Dynamic. This parameter is optional and defaults\n  *        to SizeAtCompileTime. Most of the time, you do not need to specify it.\n  *\n  * \\sa class DiagonalWrapper\n  */\n\nnamespace internal {\ntemplate<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>\nstruct traits<DiagonalMatrix<_Scalar,SizeAtCompileTime,MaxSizeAtCompileTime> >\n : traits<Matrix<_Scalar,SizeAtCompileTime,SizeAtCompileTime,0,MaxSizeAtCompileTime,MaxSizeAtCompileTime> >\n{\n  typedef Matrix<_Scalar,SizeAtCompileTime,1,0,MaxSizeAtCompileTime,1> DiagonalVectorType;\n  typedef DiagonalShape StorageKind;\n  enum {\n    Flags = LvalueBit | NoPreferredStorageOrderBit\n  };\n};\n}\ntemplate<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>\nclass DiagonalMatrix\n  : public DiagonalBase<DiagonalMatrix<_Scalar,SizeAtCompileTime,MaxSizeAtCompileTime> >\n{\n  public:\n    #ifndef EIGEN_PARSED_BY_DOXYGEN\n    typedef typename internal::traits<DiagonalMatrix>::DiagonalVectorType DiagonalVectorType;\n    typedef const DiagonalMatrix& Nested;\n    typedef _Scalar Scalar;\n    typedef typename internal::traits<DiagonalMatrix>::StorageKind StorageKind;\n    typedef typename internal::traits<DiagonalMatrix>::StorageIndex StorageIndex;\n    #endif\n\n  protected:\n\n    DiagonalVectorType m_diagonal;\n\n  public:\n\n    /** const version of diagonal(). */\n    EIGEN_DEVICE_FUNC\n    inline const DiagonalVectorType& diagonal() const { return m_diagonal; }\n    /** \\returns a reference to the stored vector of diagonal coefficients. */\n    EIGEN_DEVICE_FUNC\n    inline DiagonalVectorType& diagonal() { return m_diagonal; }\n\n    /** Default constructor without initialization */\n    EIGEN_DEVICE_FUNC\n    inline DiagonalMatrix() {}\n\n    /** Constructs a diagonal matrix with given dimension  */\n    EIGEN_DEVICE_FUNC\n    explicit inline DiagonalMatrix(Index dim) : m_diagonal(dim) {}\n\n    /** 2D constructor. */\n    EIGEN_DEVICE_FUNC\n    inline DiagonalMatrix(const Scalar& x, const Scalar& y) : m_diagonal(x,y) {}\n\n    /** 3D constructor. */\n    EIGEN_DEVICE_FUNC\n    inline DiagonalMatrix(const Scalar& x, const Scalar& y, const Scalar& z) : m_diagonal(x,y,z) {}\n\n    #if EIGEN_HAS_CXX11\n    /** \\brief Construct a diagonal matrix with fixed size from an arbitrary number of coefficients. \\cpp11\n      * \n      * There exists C++98 anologue constructors for fixed-size diagonal matrices having 2 or 3 coefficients.\n      * \n      * \\warning To construct a diagonal matrix of fixed size, the number of values passed to this \n      * constructor must match the fixed dimension of \\c *this.\n      * \n      * \\sa DiagonalMatrix(const Scalar&, const Scalar&)\n      * \\sa DiagonalMatrix(const Scalar&, const Scalar&, const Scalar&)\n      */\n    template <typename... ArgTypes>\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    DiagonalMatrix(const Scalar& a0, const Scalar& a1, const Scalar& a2, const ArgTypes&... args)\n      : m_diagonal(a0, a1, a2, args...) {}\n\n    /** \\brief Constructs a DiagonalMatrix and initializes it by elements given by an initializer list of initializer\n      * lists \\cpp11\n      */\n    EIGEN_DEVICE_FUNC\n    explicit EIGEN_STRONG_INLINE DiagonalMatrix(const std::initializer_list<std::initializer_list<Scalar>>& list)\n      : m_diagonal(list) {}\n    #endif  // EIGEN_HAS_CXX11\n\n    /** Copy constructor. */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    inline DiagonalMatrix(const DiagonalBase<OtherDerived>& other) : m_diagonal(other.diagonal()) {}\n\n    #ifndef EIGEN_PARSED_BY_DOXYGEN\n    /** copy constructor. prevent a default copy constructor from hiding the other templated constructor */\n    inline DiagonalMatrix(const DiagonalMatrix& other) : m_diagonal(other.diagonal()) {}\n    #endif\n\n    /** generic constructor from expression of the diagonal coefficients */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    explicit inline DiagonalMatrix(const MatrixBase<OtherDerived>& other) : m_diagonal(other)\n    {}\n\n    /** Copy operator. */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    DiagonalMatrix& operator=(const DiagonalBase<OtherDerived>& other)\n    {\n      m_diagonal = other.diagonal();\n      return *this;\n    }\n\n    #ifndef EIGEN_PARSED_BY_DOXYGEN\n    /** This is a special case of the templated operator=. Its purpose is to\n      * prevent a default operator= from hiding the templated operator=.\n      */\n    EIGEN_DEVICE_FUNC\n    DiagonalMatrix& operator=(const DiagonalMatrix& other)\n    {\n      m_diagonal = other.diagonal();\n      return *this;\n    }\n    #endif\n\n    /** Resizes to given size. */\n    EIGEN_DEVICE_FUNC\n    inline void resize(Index size) { m_diagonal.resize(size); }\n    /** Sets all coefficients to zero. */\n    EIGEN_DEVICE_FUNC\n    inline void setZero() { m_diagonal.setZero(); }\n    /** Resizes and sets all coefficients to zero. */\n    EIGEN_DEVICE_FUNC\n    inline void setZero(Index size) { m_diagonal.setZero(size); }\n    /** Sets this matrix to be the identity matrix of the current size. */\n    EIGEN_DEVICE_FUNC\n    inline void setIdentity() { m_diagonal.setOnes(); }\n    /** Sets this matrix to be the identity matrix of the given size. */\n    EIGEN_DEVICE_FUNC\n    inline void setIdentity(Index size) { m_diagonal.setOnes(size); }\n};\n\n/** \\class DiagonalWrapper\n  * \\ingroup Core_Module\n  *\n  * \\brief Expression of a diagonal matrix\n  *\n  * \\param _DiagonalVectorType the type of the vector of diagonal coefficients\n  *\n  * This class is an expression of a diagonal matrix, but not storing its own vector of diagonal coefficients,\n  * instead wrapping an existing vector expression. It is the return type of MatrixBase::asDiagonal()\n  * and most of the time this is the only way that it is used.\n  *\n  * \\sa class DiagonalMatrix, class DiagonalBase, MatrixBase::asDiagonal()\n  */\n\nnamespace internal {\ntemplate<typename _DiagonalVectorType>\nstruct traits<DiagonalWrapper<_DiagonalVectorType> >\n{\n  typedef _DiagonalVectorType DiagonalVectorType;\n  typedef typename DiagonalVectorType::Scalar Scalar;\n  typedef typename DiagonalVectorType::StorageIndex StorageIndex;\n  typedef DiagonalShape StorageKind;\n  typedef typename traits<DiagonalVectorType>::XprKind XprKind;\n  enum {\n    RowsAtCompileTime = DiagonalVectorType::SizeAtCompileTime,\n    ColsAtCompileTime = DiagonalVectorType::SizeAtCompileTime,\n    MaxRowsAtCompileTime = DiagonalVectorType::MaxSizeAtCompileTime,\n    MaxColsAtCompileTime = DiagonalVectorType::MaxSizeAtCompileTime,\n    Flags =  (traits<DiagonalVectorType>::Flags & LvalueBit) | NoPreferredStorageOrderBit\n  };\n};\n}\n\ntemplate<typename _DiagonalVectorType>\nclass DiagonalWrapper\n  : public DiagonalBase<DiagonalWrapper<_DiagonalVectorType> >, internal::no_assignment_operator\n{\n  public:\n    #ifndef EIGEN_PARSED_BY_DOXYGEN\n    typedef _DiagonalVectorType DiagonalVectorType;\n    typedef DiagonalWrapper Nested;\n    #endif\n\n    /** Constructor from expression of diagonal coefficients to wrap. */\n    EIGEN_DEVICE_FUNC\n    explicit inline DiagonalWrapper(DiagonalVectorType& a_diagonal) : m_diagonal(a_diagonal) {}\n\n    /** \\returns a const reference to the wrapped expression of diagonal coefficients. */\n    EIGEN_DEVICE_FUNC\n    const DiagonalVectorType& diagonal() const { return m_diagonal; }\n\n  protected:\n    typename DiagonalVectorType::Nested m_diagonal;\n};\n\n/** \\returns a pseudo-expression of a diagonal matrix with *this as vector of diagonal coefficients\n  *\n  * \\only_for_vectors\n  *\n  * Example: \\include MatrixBase_asDiagonal.cpp\n  * Output: \\verbinclude MatrixBase_asDiagonal.out\n  *\n  * \\sa class DiagonalWrapper, class DiagonalMatrix, diagonal(), isDiagonal()\n  **/\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC inline const DiagonalWrapper<const Derived>\nMatrixBase<Derived>::asDiagonal() const\n{\n  return DiagonalWrapper<const Derived>(derived());\n}\n\n/** \\returns true if *this is approximately equal to a diagonal matrix,\n  *          within the precision given by \\a prec.\n  *\n  * Example: \\include MatrixBase_isDiagonal.cpp\n  * Output: \\verbinclude MatrixBase_isDiagonal.out\n  *\n  * \\sa asDiagonal()\n  */\ntemplate<typename Derived>\nbool MatrixBase<Derived>::isDiagonal(const RealScalar& prec) const\n{\n  if(cols() != rows()) return false;\n  RealScalar maxAbsOnDiagonal = static_cast<RealScalar>(-1);\n  for(Index j = 0; j < cols(); ++j)\n  {\n    RealScalar absOnDiagonal = numext::abs(coeff(j,j));\n    if(absOnDiagonal > maxAbsOnDiagonal) maxAbsOnDiagonal = absOnDiagonal;\n  }\n  for(Index j = 0; j < cols(); ++j)\n    for(Index i = 0; i < j; ++i)\n    {\n      if(!internal::isMuchSmallerThan(coeff(i, j), maxAbsOnDiagonal, prec)) return false;\n      if(!internal::isMuchSmallerThan(coeff(j, i), maxAbsOnDiagonal, prec)) return false;\n    }\n  return true;\n}\n\nnamespace internal {\n\ntemplate<> struct storage_kind_to_shape<DiagonalShape> { typedef DiagonalShape Shape; };\n\nstruct Diagonal2Dense {};\n\ntemplate<> struct AssignmentKind<DenseShape,DiagonalShape> { typedef Diagonal2Dense Kind; };\n\n// Diagonal matrix to Dense assignment\ntemplate< typename DstXprType, typename SrcXprType, typename Functor>\nstruct Assignment<DstXprType, SrcXprType, Functor, Diagonal2Dense>\n{\n  static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op<typename DstXprType::Scalar,typename SrcXprType::Scalar> &/*func*/)\n  {\n    Index dstRows = src.rows();\n    Index dstCols = src.cols();\n    if((dst.rows()!=dstRows) || (dst.cols()!=dstCols))\n      dst.resize(dstRows, dstCols);\n    \n    dst.setZero();\n    dst.diagonal() = src.diagonal();\n  }\n  \n  static void run(DstXprType &dst, const SrcXprType &src, const internal::add_assign_op<typename DstXprType::Scalar,typename SrcXprType::Scalar> &/*func*/)\n  { dst.diagonal() += src.diagonal(); }\n  \n  static void run(DstXprType &dst, const SrcXprType &src, const internal::sub_assign_op<typename DstXprType::Scalar,typename SrcXprType::Scalar> &/*func*/)\n  { dst.diagonal() -= src.diagonal(); }\n};\n\n} // namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_DIAGONALMATRIX_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/DiagonalProduct.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2007-2009 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_DIAGONALPRODUCT_H\n#define EIGEN_DIAGONALPRODUCT_H\n\nnamespace Eigen { \n\n/** \\returns the diagonal matrix product of \\c *this by the diagonal matrix \\a diagonal.\n  */\ntemplate<typename Derived>\ntemplate<typename DiagonalDerived>\nEIGEN_DEVICE_FUNC inline const Product<Derived, DiagonalDerived, LazyProduct>\nMatrixBase<Derived>::operator*(const DiagonalBase<DiagonalDerived> &a_diagonal) const\n{\n  return Product<Derived, DiagonalDerived, LazyProduct>(derived(),a_diagonal.derived());\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_DIAGONALPRODUCT_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/Dot.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2008, 2010 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_DOT_H\n#define EIGEN_DOT_H\n\nnamespace Eigen { \n\nnamespace internal {\n\n// helper function for dot(). The problem is that if we put that in the body of dot(), then upon calling dot\n// with mismatched types, the compiler emits errors about failing to instantiate cwiseProduct BEFORE\n// looking at the static assertions. Thus this is a trick to get better compile errors.\ntemplate<typename T, typename U,\n// the NeedToTranspose condition here is taken straight from Assign.h\n         bool NeedToTranspose = T::IsVectorAtCompileTime\n                && U::IsVectorAtCompileTime\n                && ((int(T::RowsAtCompileTime) == 1 && int(U::ColsAtCompileTime) == 1)\n                      |  // FIXME | instead of || to please GCC 4.4.0 stupid warning \"suggest parentheses around &&\".\n                         // revert to || as soon as not needed anymore.\n                    (int(T::ColsAtCompileTime) == 1 && int(U::RowsAtCompileTime) == 1))\n>\nstruct dot_nocheck\n{\n  typedef scalar_conj_product_op<typename traits<T>::Scalar,typename traits<U>::Scalar> conj_prod;\n  typedef typename conj_prod::result_type ResScalar;\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE\n  static ResScalar run(const MatrixBase<T>& a, const MatrixBase<U>& b)\n  {\n    return a.template binaryExpr<conj_prod>(b).sum();\n  }\n};\n\ntemplate<typename T, typename U>\nstruct dot_nocheck<T, U, true>\n{\n  typedef scalar_conj_product_op<typename traits<T>::Scalar,typename traits<U>::Scalar> conj_prod;\n  typedef typename conj_prod::result_type ResScalar;\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE\n  static ResScalar run(const MatrixBase<T>& a, const MatrixBase<U>& b)\n  {\n    return a.transpose().template binaryExpr<conj_prod>(b).sum();\n  }\n};\n\n} // end namespace internal\n\n/** \\fn MatrixBase::dot\n  * \\returns the dot product of *this with other.\n  *\n  * \\only_for_vectors\n  *\n  * \\note If the scalar type is complex numbers, then this function returns the hermitian\n  * (sesquilinear) dot product, conjugate-linear in the first variable and linear in the\n  * second variable.\n  *\n  * \\sa squaredNorm(), norm()\n  */\ntemplate<typename Derived>\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC\nEIGEN_STRONG_INLINE\ntypename ScalarBinaryOpTraits<typename internal::traits<Derived>::Scalar,typename internal::traits<OtherDerived>::Scalar>::ReturnType\nMatrixBase<Derived>::dot(const MatrixBase<OtherDerived>& other) const\n{\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)\n  EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(Derived,OtherDerived)\n#if !(defined(EIGEN_NO_STATIC_ASSERT) && defined(EIGEN_NO_DEBUG))\n  typedef internal::scalar_conj_product_op<Scalar,typename OtherDerived::Scalar> func;\n  EIGEN_CHECK_BINARY_COMPATIBILIY(func,Scalar,typename OtherDerived::Scalar);\n#endif\n  \n  eigen_assert(size() == other.size());\n\n  return internal::dot_nocheck<Derived,OtherDerived>::run(*this, other);\n}\n\n//---------- implementation of L2 norm and related functions ----------\n\n/** \\returns, for vectors, the squared \\em l2 norm of \\c *this, and for matrices the Frobenius norm.\n  * In both cases, it consists in the sum of the square of all the matrix entries.\n  * For vectors, this is also equals to the dot product of \\c *this with itself.\n  *\n  * \\sa dot(), norm(), lpNorm()\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename NumTraits<typename internal::traits<Derived>::Scalar>::Real MatrixBase<Derived>::squaredNorm() const\n{\n  return numext::real((*this).cwiseAbs2().sum());\n}\n\n/** \\returns, for vectors, the \\em l2 norm of \\c *this, and for matrices the Frobenius norm.\n  * In both cases, it consists in the square root of the sum of the square of all the matrix entries.\n  * For vectors, this is also equals to the square root of the dot product of \\c *this with itself.\n  *\n  * \\sa lpNorm(), dot(), squaredNorm()\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename NumTraits<typename internal::traits<Derived>::Scalar>::Real MatrixBase<Derived>::norm() const\n{\n  return numext::sqrt(squaredNorm());\n}\n\n/** \\returns an expression of the quotient of \\c *this by its own norm.\n  *\n  * \\warning If the input vector is too small (i.e., this->norm()==0),\n  *          then this function returns a copy of the input.\n  *\n  * \\only_for_vectors\n  *\n  * \\sa norm(), normalize()\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename MatrixBase<Derived>::PlainObject\nMatrixBase<Derived>::normalized() const\n{\n  typedef typename internal::nested_eval<Derived,2>::type _Nested;\n  _Nested n(derived());\n  RealScalar z = n.squaredNorm();\n  // NOTE: after extensive benchmarking, this conditional does not impact performance, at least on recent x86 CPU\n  if(z>RealScalar(0))\n    return n / numext::sqrt(z);\n  else\n    return n;\n}\n\n/** Normalizes the vector, i.e. divides it by its own norm.\n  *\n  * \\only_for_vectors\n  *\n  * \\warning If the input vector is too small (i.e., this->norm()==0), then \\c *this is left unchanged.\n  *\n  * \\sa norm(), normalized()\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void MatrixBase<Derived>::normalize()\n{\n  RealScalar z = squaredNorm();\n  // NOTE: after extensive benchmarking, this conditional does not impact performance, at least on recent x86 CPU\n  if(z>RealScalar(0))\n    derived() /= numext::sqrt(z);\n}\n\n/** \\returns an expression of the quotient of \\c *this by its own norm while avoiding underflow and overflow.\n  *\n  * \\only_for_vectors\n  *\n  * This method is analogue to the normalized() method, but it reduces the risk of\n  * underflow and overflow when computing the norm.\n  *\n  * \\warning If the input vector is too small (i.e., this->norm()==0),\n  *          then this function returns a copy of the input.\n  *\n  * \\sa stableNorm(), stableNormalize(), normalized()\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename MatrixBase<Derived>::PlainObject\nMatrixBase<Derived>::stableNormalized() const\n{\n  typedef typename internal::nested_eval<Derived,3>::type _Nested;\n  _Nested n(derived());\n  RealScalar w = n.cwiseAbs().maxCoeff();\n  RealScalar z = (n/w).squaredNorm();\n  if(z>RealScalar(0))\n    return n / (numext::sqrt(z)*w);\n  else\n    return n;\n}\n\n/** Normalizes the vector while avoid underflow and overflow\n  *\n  * \\only_for_vectors\n  *\n  * This method is analogue to the normalize() method, but it reduces the risk of\n  * underflow and overflow when computing the norm.\n  *\n  * \\warning If the input vector is too small (i.e., this->norm()==0), then \\c *this is left unchanged.\n  *\n  * \\sa stableNorm(), stableNormalized(), normalize()\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void MatrixBase<Derived>::stableNormalize()\n{\n  RealScalar w = cwiseAbs().maxCoeff();\n  RealScalar z = (derived()/w).squaredNorm();\n  if(z>RealScalar(0))\n    derived() /= numext::sqrt(z)*w;\n}\n\n//---------- implementation of other norms ----------\n\nnamespace internal {\n\ntemplate<typename Derived, int p>\nstruct lpNorm_selector\n{\n  typedef typename NumTraits<typename traits<Derived>::Scalar>::Real RealScalar;\n  EIGEN_DEVICE_FUNC\n  static inline RealScalar run(const MatrixBase<Derived>& m)\n  {\n    EIGEN_USING_STD_MATH(pow)\n    return pow(m.cwiseAbs().array().pow(p).sum(), RealScalar(1)/p);\n  }\n};\n\ntemplate<typename Derived>\nstruct lpNorm_selector<Derived, 1>\n{\n  EIGEN_DEVICE_FUNC\n  static inline typename NumTraits<typename traits<Derived>::Scalar>::Real run(const MatrixBase<Derived>& m)\n  {\n    return m.cwiseAbs().sum();\n  }\n};\n\ntemplate<typename Derived>\nstruct lpNorm_selector<Derived, 2>\n{\n  EIGEN_DEVICE_FUNC\n  static inline typename NumTraits<typename traits<Derived>::Scalar>::Real run(const MatrixBase<Derived>& m)\n  {\n    return m.norm();\n  }\n};\n\ntemplate<typename Derived>\nstruct lpNorm_selector<Derived, Infinity>\n{\n  typedef typename NumTraits<typename traits<Derived>::Scalar>::Real RealScalar;\n  EIGEN_DEVICE_FUNC\n  static inline RealScalar run(const MatrixBase<Derived>& m)\n  {\n    if(Derived::SizeAtCompileTime==0 || (Derived::SizeAtCompileTime==Dynamic && m.size()==0))\n      return RealScalar(0);\n    return m.cwiseAbs().maxCoeff();\n  }\n};\n\n} // end namespace internal\n\n/** \\returns the \\b coefficient-wise \\f$ \\ell^p \\f$ norm of \\c *this, that is, returns the p-th root of the sum of the p-th powers of the absolute values\n  *          of the coefficients of \\c *this. If \\a p is the special value \\a Eigen::Infinity, this function returns the \\f$ \\ell^\\infty \\f$\n  *          norm, that is the maximum of the absolute values of the coefficients of \\c *this.\n  *\n  * In all cases, if \\c *this is empty, then the value 0 is returned.\n  *\n  * \\note For matrices, this function does not compute the <a href=\"https://en.wikipedia.org/wiki/Operator_norm\">operator-norm</a>. That is, if \\c *this is a matrix, then its coefficients are interpreted as a 1D vector. Nonetheless, you can easily compute the 1-norm and \\f$\\infty\\f$-norm matrix operator norms using \\link TutorialReductionsVisitorsBroadcastingReductionsNorm partial reductions \\endlink.\n  *\n  * \\sa norm()\n  */\ntemplate<typename Derived>\ntemplate<int p>\n#ifndef EIGEN_PARSED_BY_DOXYGEN\nEIGEN_DEVICE_FUNC inline typename NumTraits<typename internal::traits<Derived>::Scalar>::Real\n#else\nEIGEN_DEVICE_FUNC MatrixBase<Derived>::RealScalar\n#endif\nMatrixBase<Derived>::lpNorm() const\n{\n  return internal::lpNorm_selector<Derived, p>::run(*this);\n}\n\n//---------- implementation of isOrthogonal / isUnitary ----------\n\n/** \\returns true if *this is approximately orthogonal to \\a other,\n  *          within the precision given by \\a prec.\n  *\n  * Example: \\include MatrixBase_isOrthogonal.cpp\n  * Output: \\verbinclude MatrixBase_isOrthogonal.out\n  */\ntemplate<typename Derived>\ntemplate<typename OtherDerived>\nbool MatrixBase<Derived>::isOrthogonal\n(const MatrixBase<OtherDerived>& other, const RealScalar& prec) const\n{\n  typename internal::nested_eval<Derived,2>::type nested(derived());\n  typename internal::nested_eval<OtherDerived,2>::type otherNested(other.derived());\n  return numext::abs2(nested.dot(otherNested)) <= prec * prec * nested.squaredNorm() * otherNested.squaredNorm();\n}\n\n/** \\returns true if *this is approximately an unitary matrix,\n  *          within the precision given by \\a prec. In the case where the \\a Scalar\n  *          type is real numbers, a unitary matrix is an orthogonal matrix, whence the name.\n  *\n  * \\note This can be used to check whether a family of vectors forms an orthonormal basis.\n  *       Indeed, \\c m.isUnitary() returns true if and only if the columns (equivalently, the rows) of m form an\n  *       orthonormal basis.\n  *\n  * Example: \\include MatrixBase_isUnitary.cpp\n  * Output: \\verbinclude MatrixBase_isUnitary.out\n  */\ntemplate<typename Derived>\nbool MatrixBase<Derived>::isUnitary(const RealScalar& prec) const\n{\n  typename internal::nested_eval<Derived,1>::type self(derived());\n  for(Index i = 0; i < cols(); ++i)\n  {\n    if(!internal::isApprox(self.col(i).squaredNorm(), static_cast<RealScalar>(1), prec))\n      return false;\n    for(Index j = 0; j < i; ++j)\n      if(!internal::isMuchSmallerThan(self.col(i).dot(self.col(j)), static_cast<Scalar>(1), prec))\n        return false;\n  }\n  return true;\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_DOT_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/EigenBase.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_EIGENBASE_H\n#define EIGEN_EIGENBASE_H\n\nnamespace Eigen {\n\n/** \\class EigenBase\n  * \\ingroup Core_Module\n  * \n  * Common base class for all classes T such that MatrixBase has an operator=(T) and a constructor MatrixBase(T).\n  *\n  * In other words, an EigenBase object is an object that can be copied into a MatrixBase.\n  *\n  * Besides MatrixBase-derived classes, this also includes special matrix classes such as diagonal matrices, etc.\n  *\n  * Notice that this class is trivial, it is only used to disambiguate overloaded functions.\n  *\n  * \\sa \\blank \\ref TopicClassHierarchy\n  */\ntemplate<typename Derived> struct EigenBase\n{\n//   typedef typename internal::plain_matrix_type<Derived>::type PlainObject;\n  \n  /** \\brief The interface type of indices\n    * \\details To change this, \\c \\#define the preprocessor symbol \\c EIGEN_DEFAULT_DENSE_INDEX_TYPE.\n    * \\sa StorageIndex, \\ref TopicPreprocessorDirectives.\n    * DEPRECATED: Since Eigen 3.3, its usage is deprecated. Use Eigen::Index instead.\n    * Deprecation is not marked with a doxygen comment because there are too many existing usages to add the deprecation attribute.\n    */\n  typedef Eigen::Index Index;\n\n  // FIXME is it needed?\n  typedef typename internal::traits<Derived>::StorageKind StorageKind;\n\n  /** \\returns a reference to the derived object */\n  EIGEN_DEVICE_FUNC\n  Derived& derived() { return *static_cast<Derived*>(this); }\n  /** \\returns a const reference to the derived object */\n  EIGEN_DEVICE_FUNC\n  const Derived& derived() const { return *static_cast<const Derived*>(this); }\n\n  EIGEN_DEVICE_FUNC\n  inline Derived& const_cast_derived() const\n  { return *static_cast<Derived*>(const_cast<EigenBase*>(this)); }\n  EIGEN_DEVICE_FUNC\n  inline const Derived& const_derived() const\n  { return *static_cast<const Derived*>(this); }\n\n  /** \\returns the number of rows. \\sa cols(), RowsAtCompileTime */\n  EIGEN_DEVICE_FUNC\n  inline Index rows() const { return derived().rows(); }\n  /** \\returns the number of columns. \\sa rows(), ColsAtCompileTime*/\n  EIGEN_DEVICE_FUNC\n  inline Index cols() const { return derived().cols(); }\n  /** \\returns the number of coefficients, which is rows()*cols().\n    * \\sa rows(), cols(), SizeAtCompileTime. */\n  EIGEN_DEVICE_FUNC\n  inline Index size() const { return rows() * cols(); }\n\n  /** \\internal Don't use it, but do the equivalent: \\code dst = *this; \\endcode */\n  template<typename Dest>\n  EIGEN_DEVICE_FUNC\n  inline void evalTo(Dest& dst) const\n  { derived().evalTo(dst); }\n\n  /** \\internal Don't use it, but do the equivalent: \\code dst += *this; \\endcode */\n  template<typename Dest>\n  EIGEN_DEVICE_FUNC\n  inline void addTo(Dest& dst) const\n  {\n    // This is the default implementation,\n    // derived class can reimplement it in a more optimized way.\n    typename Dest::PlainObject res(rows(),cols());\n    evalTo(res);\n    dst += res;\n  }\n\n  /** \\internal Don't use it, but do the equivalent: \\code dst -= *this; \\endcode */\n  template<typename Dest>\n  EIGEN_DEVICE_FUNC\n  inline void subTo(Dest& dst) const\n  {\n    // This is the default implementation,\n    // derived class can reimplement it in a more optimized way.\n    typename Dest::PlainObject res(rows(),cols());\n    evalTo(res);\n    dst -= res;\n  }\n\n  /** \\internal Don't use it, but do the equivalent: \\code dst.applyOnTheRight(*this); \\endcode */\n  template<typename Dest>\n  EIGEN_DEVICE_FUNC inline void applyThisOnTheRight(Dest& dst) const\n  {\n    // This is the default implementation,\n    // derived class can reimplement it in a more optimized way.\n    dst = dst * this->derived();\n  }\n\n  /** \\internal Don't use it, but do the equivalent: \\code dst.applyOnTheLeft(*this); \\endcode */\n  template<typename Dest>\n  EIGEN_DEVICE_FUNC inline void applyThisOnTheLeft(Dest& dst) const\n  {\n    // This is the default implementation,\n    // derived class can reimplement it in a more optimized way.\n    dst = this->derived() * dst;\n  }\n\n};\n\n/***************************************************************************\n* Implementation of matrix base methods\n***************************************************************************/\n\n/** \\brief Copies the generic expression \\a other into *this.\n  *\n  * \\details The expression must provide a (templated) evalTo(Derived& dst) const\n  * function which does the actual job. In practice, this allows any user to write\n  * its own special matrix without having to modify MatrixBase\n  *\n  * \\returns a reference to *this.\n  */\ntemplate<typename Derived>\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC\nDerived& DenseBase<Derived>::operator=(const EigenBase<OtherDerived> &other)\n{\n  call_assignment(derived(), other.derived());\n  return derived();\n}\n\ntemplate<typename Derived>\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC\nDerived& DenseBase<Derived>::operator+=(const EigenBase<OtherDerived> &other)\n{\n  call_assignment(derived(), other.derived(), internal::add_assign_op<Scalar,typename OtherDerived::Scalar>());\n  return derived();\n}\n\ntemplate<typename Derived>\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC\nDerived& DenseBase<Derived>::operator-=(const EigenBase<OtherDerived> &other)\n{\n  call_assignment(derived(), other.derived(), internal::sub_assign_op<Scalar,typename OtherDerived::Scalar>());\n  return derived();\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_EIGENBASE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/ForceAlignedAccess.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009-2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_FORCEALIGNEDACCESS_H\n#define EIGEN_FORCEALIGNEDACCESS_H\n\nnamespace Eigen {\n\n/** \\class ForceAlignedAccess\n  * \\ingroup Core_Module\n  *\n  * \\brief Enforce aligned packet loads and stores regardless of what is requested\n  *\n  * \\param ExpressionType the type of the object of which we are forcing aligned packet access\n  *\n  * This class is the return type of MatrixBase::forceAlignedAccess()\n  * and most of the time this is the only way it is used.\n  *\n  * \\sa MatrixBase::forceAlignedAccess()\n  */\n\nnamespace internal {\ntemplate<typename ExpressionType>\nstruct traits<ForceAlignedAccess<ExpressionType> > : public traits<ExpressionType>\n{};\n}\n\ntemplate<typename ExpressionType> class ForceAlignedAccess\n  : public internal::dense_xpr_base< ForceAlignedAccess<ExpressionType> >::type\n{\n  public:\n\n    typedef typename internal::dense_xpr_base<ForceAlignedAccess>::type Base;\n    EIGEN_DENSE_PUBLIC_INTERFACE(ForceAlignedAccess)\n\n    EIGEN_DEVICE_FUNC explicit inline ForceAlignedAccess(const ExpressionType& matrix) : m_expression(matrix) {}\n\n    EIGEN_DEVICE_FUNC inline Index rows() const { return m_expression.rows(); }\n    EIGEN_DEVICE_FUNC inline Index cols() const { return m_expression.cols(); }\n    EIGEN_DEVICE_FUNC inline Index outerStride() const { return m_expression.outerStride(); }\n    EIGEN_DEVICE_FUNC inline Index innerStride() const { return m_expression.innerStride(); }\n\n    EIGEN_DEVICE_FUNC inline const CoeffReturnType coeff(Index row, Index col) const\n    {\n      return m_expression.coeff(row, col);\n    }\n\n    EIGEN_DEVICE_FUNC inline Scalar& coeffRef(Index row, Index col)\n    {\n      return m_expression.const_cast_derived().coeffRef(row, col);\n    }\n\n    EIGEN_DEVICE_FUNC inline const CoeffReturnType coeff(Index index) const\n    {\n      return m_expression.coeff(index);\n    }\n\n    EIGEN_DEVICE_FUNC inline Scalar& coeffRef(Index index)\n    {\n      return m_expression.const_cast_derived().coeffRef(index);\n    }\n\n    template<int LoadMode>\n    inline const PacketScalar packet(Index row, Index col) const\n    {\n      return m_expression.template packet<Aligned>(row, col);\n    }\n\n    template<int LoadMode>\n    inline void writePacket(Index row, Index col, const PacketScalar& x)\n    {\n      m_expression.const_cast_derived().template writePacket<Aligned>(row, col, x);\n    }\n\n    template<int LoadMode>\n    inline const PacketScalar packet(Index index) const\n    {\n      return m_expression.template packet<Aligned>(index);\n    }\n\n    template<int LoadMode>\n    inline void writePacket(Index index, const PacketScalar& x)\n    {\n      m_expression.const_cast_derived().template writePacket<Aligned>(index, x);\n    }\n\n    EIGEN_DEVICE_FUNC operator const ExpressionType&() const { return m_expression; }\n\n  protected:\n    const ExpressionType& m_expression;\n\n  private:\n    ForceAlignedAccess& operator=(const ForceAlignedAccess&);\n};\n\n/** \\returns an expression of *this with forced aligned access\n  * \\sa forceAlignedAccessIf(),class ForceAlignedAccess\n  */\ntemplate<typename Derived>\ninline const ForceAlignedAccess<Derived>\nMatrixBase<Derived>::forceAlignedAccess() const\n{\n  return ForceAlignedAccess<Derived>(derived());\n}\n\n/** \\returns an expression of *this with forced aligned access\n  * \\sa forceAlignedAccessIf(), class ForceAlignedAccess\n  */\ntemplate<typename Derived>\ninline ForceAlignedAccess<Derived>\nMatrixBase<Derived>::forceAlignedAccess()\n{\n  return ForceAlignedAccess<Derived>(derived());\n}\n\n/** \\returns an expression of *this with forced aligned access if \\a Enable is true.\n  * \\sa forceAlignedAccess(), class ForceAlignedAccess\n  */\ntemplate<typename Derived>\ntemplate<bool Enable>\ninline typename internal::add_const_on_value_type<typename internal::conditional<Enable,ForceAlignedAccess<Derived>,Derived&>::type>::type\nMatrixBase<Derived>::forceAlignedAccessIf() const\n{\n  return derived();  // FIXME This should not work but apparently is never used\n}\n\n/** \\returns an expression of *this with forced aligned access if \\a Enable is true.\n  * \\sa forceAlignedAccess(), class ForceAlignedAccess\n  */\ntemplate<typename Derived>\ntemplate<bool Enable>\ninline typename internal::conditional<Enable,ForceAlignedAccess<Derived>,Derived&>::type\nMatrixBase<Derived>::forceAlignedAccessIf()\n{\n  return derived();  // FIXME This should not work but apparently is never used\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_FORCEALIGNEDACCESS_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/Fuzzy.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_FUZZY_H\n#define EIGEN_FUZZY_H\n\nnamespace Eigen { \n\nnamespace internal\n{\n\ntemplate<typename Derived, typename OtherDerived, bool is_integer = NumTraits<typename Derived::Scalar>::IsInteger>\nstruct isApprox_selector\n{\n  EIGEN_DEVICE_FUNC\n  static bool run(const Derived& x, const OtherDerived& y, const typename Derived::RealScalar& prec)\n  {\n    typename internal::nested_eval<Derived,2>::type nested(x);\n    typename internal::nested_eval<OtherDerived,2>::type otherNested(y);\n    return (nested - otherNested).cwiseAbs2().sum() <= prec * prec * numext::mini(nested.cwiseAbs2().sum(), otherNested.cwiseAbs2().sum());\n  }\n};\n\ntemplate<typename Derived, typename OtherDerived>\nstruct isApprox_selector<Derived, OtherDerived, true>\n{\n  EIGEN_DEVICE_FUNC\n  static bool run(const Derived& x, const OtherDerived& y, const typename Derived::RealScalar&)\n  {\n    return x.matrix() == y.matrix();\n  }\n};\n\ntemplate<typename Derived, typename OtherDerived, bool is_integer = NumTraits<typename Derived::Scalar>::IsInteger>\nstruct isMuchSmallerThan_object_selector\n{\n  EIGEN_DEVICE_FUNC\n  static bool run(const Derived& x, const OtherDerived& y, const typename Derived::RealScalar& prec)\n  {\n    return x.cwiseAbs2().sum() <= numext::abs2(prec) * y.cwiseAbs2().sum();\n  }\n};\n\ntemplate<typename Derived, typename OtherDerived>\nstruct isMuchSmallerThan_object_selector<Derived, OtherDerived, true>\n{\n  EIGEN_DEVICE_FUNC\n  static bool run(const Derived& x, const OtherDerived&, const typename Derived::RealScalar&)\n  {\n    return x.matrix() == Derived::Zero(x.rows(), x.cols()).matrix();\n  }\n};\n\ntemplate<typename Derived, bool is_integer = NumTraits<typename Derived::Scalar>::IsInteger>\nstruct isMuchSmallerThan_scalar_selector\n{\n  EIGEN_DEVICE_FUNC\n  static bool run(const Derived& x, const typename Derived::RealScalar& y, const typename Derived::RealScalar& prec)\n  {\n    return x.cwiseAbs2().sum() <= numext::abs2(prec * y);\n  }\n};\n\ntemplate<typename Derived>\nstruct isMuchSmallerThan_scalar_selector<Derived, true>\n{\n  EIGEN_DEVICE_FUNC\n  static bool run(const Derived& x, const typename Derived::RealScalar&, const typename Derived::RealScalar&)\n  {\n    return x.matrix() == Derived::Zero(x.rows(), x.cols()).matrix();\n  }\n};\n\n} // end namespace internal\n\n\n/** \\returns \\c true if \\c *this is approximately equal to \\a other, within the precision\n  * determined by \\a prec.\n  *\n  * \\note The fuzzy compares are done multiplicatively. Two vectors \\f$ v \\f$ and \\f$ w \\f$\n  * are considered to be approximately equal within precision \\f$ p \\f$ if\n  * \\f[ \\Vert v - w \\Vert \\leqslant p\\,\\min(\\Vert v\\Vert, \\Vert w\\Vert). \\f]\n  * For matrices, the comparison is done using the Hilbert-Schmidt norm (aka Frobenius norm\n  * L2 norm).\n  *\n  * \\note Because of the multiplicativeness of this comparison, one can't use this function\n  * to check whether \\c *this is approximately equal to the zero matrix or vector.\n  * Indeed, \\c isApprox(zero) returns false unless \\c *this itself is exactly the zero matrix\n  * or vector. If you want to test whether \\c *this is zero, use internal::isMuchSmallerThan(const\n  * RealScalar&, RealScalar) instead.\n  *\n  * \\sa internal::isMuchSmallerThan(const RealScalar&, RealScalar) const\n  */\ntemplate<typename Derived>\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC bool DenseBase<Derived>::isApprox(\n  const DenseBase<OtherDerived>& other,\n  const RealScalar& prec\n) const\n{\n  return internal::isApprox_selector<Derived, OtherDerived>::run(derived(), other.derived(), prec);\n}\n\n/** \\returns \\c true if the norm of \\c *this is much smaller than \\a other,\n  * within the precision determined by \\a prec.\n  *\n  * \\note The fuzzy compares are done multiplicatively. A vector \\f$ v \\f$ is\n  * considered to be much smaller than \\f$ x \\f$ within precision \\f$ p \\f$ if\n  * \\f[ \\Vert v \\Vert \\leqslant p\\,\\vert x\\vert. \\f]\n  *\n  * For matrices, the comparison is done using the Hilbert-Schmidt norm. For this reason,\n  * the value of the reference scalar \\a other should come from the Hilbert-Schmidt norm\n  * of a reference matrix of same dimensions.\n  *\n  * \\sa isApprox(), isMuchSmallerThan(const DenseBase<OtherDerived>&, RealScalar) const\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC bool DenseBase<Derived>::isMuchSmallerThan(\n  const typename NumTraits<Scalar>::Real& other,\n  const RealScalar& prec\n) const\n{\n  return internal::isMuchSmallerThan_scalar_selector<Derived>::run(derived(), other, prec);\n}\n\n/** \\returns \\c true if the norm of \\c *this is much smaller than the norm of \\a other,\n  * within the precision determined by \\a prec.\n  *\n  * \\note The fuzzy compares are done multiplicatively. A vector \\f$ v \\f$ is\n  * considered to be much smaller than a vector \\f$ w \\f$ within precision \\f$ p \\f$ if\n  * \\f[ \\Vert v \\Vert \\leqslant p\\,\\Vert w\\Vert. \\f]\n  * For matrices, the comparison is done using the Hilbert-Schmidt norm.\n  *\n  * \\sa isApprox(), isMuchSmallerThan(const RealScalar&, RealScalar) const\n  */\ntemplate<typename Derived>\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC bool DenseBase<Derived>::isMuchSmallerThan(\n  const DenseBase<OtherDerived>& other,\n  const RealScalar& prec\n) const\n{\n  return internal::isMuchSmallerThan_object_selector<Derived, OtherDerived>::run(derived(), other.derived(), prec);\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_FUZZY_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/GeneralProduct.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2008-2011 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_GENERAL_PRODUCT_H\n#define EIGEN_GENERAL_PRODUCT_H\n\nnamespace Eigen {\n\nenum {\n  Large = 2,\n  Small = 3\n};\n\n// Define the threshold value to fallback from the generic matrix-matrix product\n// implementation (heavy) to the lightweight coeff-based product one.\n// See generic_product_impl<Lhs,Rhs,DenseShape,DenseShape,GemmProduct>\n// in products/GeneralMatrixMatrix.h for more details.\n// TODO This threshold should also be used in the compile-time selector below.\n#ifndef EIGEN_GEMM_TO_COEFFBASED_THRESHOLD\n// This default value has been obtained on a Haswell architecture.\n#define EIGEN_GEMM_TO_COEFFBASED_THRESHOLD 20\n#endif\n\nnamespace internal {\n\ntemplate<int Rows, int Cols, int Depth> struct product_type_selector;\n\ntemplate<int Size, int MaxSize> struct product_size_category\n{\n  enum {\n    #ifndef EIGEN_GPU_COMPILE_PHASE\n    is_large = MaxSize == Dynamic ||\n               Size >= EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD ||\n               (Size==Dynamic && MaxSize>=EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD),\n    #else\n    is_large = 0,\n    #endif\n    value = is_large  ? Large\n          : Size == 1 ? 1\n                      : Small\n  };\n};\n\ntemplate<typename Lhs, typename Rhs> struct product_type\n{\n  typedef typename remove_all<Lhs>::type _Lhs;\n  typedef typename remove_all<Rhs>::type _Rhs;\n  enum {\n    MaxRows = traits<_Lhs>::MaxRowsAtCompileTime,\n    Rows    = traits<_Lhs>::RowsAtCompileTime,\n    MaxCols = traits<_Rhs>::MaxColsAtCompileTime,\n    Cols    = traits<_Rhs>::ColsAtCompileTime,\n    MaxDepth = EIGEN_SIZE_MIN_PREFER_FIXED(traits<_Lhs>::MaxColsAtCompileTime,\n                                           traits<_Rhs>::MaxRowsAtCompileTime),\n    Depth = EIGEN_SIZE_MIN_PREFER_FIXED(traits<_Lhs>::ColsAtCompileTime,\n                                        traits<_Rhs>::RowsAtCompileTime)\n  };\n\n  // the splitting into different lines of code here, introducing the _select enums and the typedef below,\n  // is to work around an internal compiler error with gcc 4.1 and 4.2.\nprivate:\n  enum {\n    rows_select = product_size_category<Rows,MaxRows>::value,\n    cols_select = product_size_category<Cols,MaxCols>::value,\n    depth_select = product_size_category<Depth,MaxDepth>::value\n  };\n  typedef product_type_selector<rows_select, cols_select, depth_select> selector;\n\npublic:\n  enum {\n    value = selector::ret,\n    ret = selector::ret\n  };\n#ifdef EIGEN_DEBUG_PRODUCT\n  static void debug()\n  {\n      EIGEN_DEBUG_VAR(Rows);\n      EIGEN_DEBUG_VAR(Cols);\n      EIGEN_DEBUG_VAR(Depth);\n      EIGEN_DEBUG_VAR(rows_select);\n      EIGEN_DEBUG_VAR(cols_select);\n      EIGEN_DEBUG_VAR(depth_select);\n      EIGEN_DEBUG_VAR(value);\n  }\n#endif\n};\n\n/* The following allows to select the kind of product at compile time\n * based on the three dimensions of the product.\n * This is a compile time mapping from {1,Small,Large}^3 -> {product types} */\n// FIXME I'm not sure the current mapping is the ideal one.\ntemplate<int M, int N>  struct product_type_selector<M,N,1>              { enum { ret = OuterProduct }; };\ntemplate<int M>         struct product_type_selector<M, 1, 1>            { enum { ret = LazyCoeffBasedProductMode }; };\ntemplate<int N>         struct product_type_selector<1, N, 1>            { enum { ret = LazyCoeffBasedProductMode }; };\ntemplate<int Depth>     struct product_type_selector<1,    1,    Depth>  { enum { ret = InnerProduct }; };\ntemplate<>              struct product_type_selector<1,    1,    1>      { enum { ret = InnerProduct }; };\ntemplate<>              struct product_type_selector<Small,1,    Small>  { enum { ret = CoeffBasedProductMode }; };\ntemplate<>              struct product_type_selector<1,    Small,Small>  { enum { ret = CoeffBasedProductMode }; };\ntemplate<>              struct product_type_selector<Small,Small,Small>  { enum { ret = CoeffBasedProductMode }; };\ntemplate<>              struct product_type_selector<Small, Small, 1>    { enum { ret = LazyCoeffBasedProductMode }; };\ntemplate<>              struct product_type_selector<Small, Large, 1>    { enum { ret = LazyCoeffBasedProductMode }; };\ntemplate<>              struct product_type_selector<Large, Small, 1>    { enum { ret = LazyCoeffBasedProductMode }; };\ntemplate<>              struct product_type_selector<1,    Large,Small>  { enum { ret = CoeffBasedProductMode }; };\ntemplate<>              struct product_type_selector<1,    Large,Large>  { enum { ret = GemvProduct }; };\ntemplate<>              struct product_type_selector<1,    Small,Large>  { enum { ret = CoeffBasedProductMode }; };\ntemplate<>              struct product_type_selector<Large,1,    Small>  { enum { ret = CoeffBasedProductMode }; };\ntemplate<>              struct product_type_selector<Large,1,    Large>  { enum { ret = GemvProduct }; };\ntemplate<>              struct product_type_selector<Small,1,    Large>  { enum { ret = CoeffBasedProductMode }; };\ntemplate<>              struct product_type_selector<Small,Small,Large>  { enum { ret = GemmProduct }; };\ntemplate<>              struct product_type_selector<Large,Small,Large>  { enum { ret = GemmProduct }; };\ntemplate<>              struct product_type_selector<Small,Large,Large>  { enum { ret = GemmProduct }; };\ntemplate<>              struct product_type_selector<Large,Large,Large>  { enum { ret = GemmProduct }; };\ntemplate<>              struct product_type_selector<Large,Small,Small>  { enum { ret = CoeffBasedProductMode }; };\ntemplate<>              struct product_type_selector<Small,Large,Small>  { enum { ret = CoeffBasedProductMode }; };\ntemplate<>              struct product_type_selector<Large,Large,Small>  { enum { ret = GemmProduct }; };\n\n} // end namespace internal\n\n/***********************************************************************\n*  Implementation of Inner Vector Vector Product\n***********************************************************************/\n\n// FIXME : maybe the \"inner product\" could return a Scalar\n// instead of a 1x1 matrix ??\n// Pro: more natural for the user\n// Cons: this could be a problem if in a meta unrolled algorithm a matrix-matrix\n// product ends up to a row-vector times col-vector product... To tackle this use\n// case, we could have a specialization for Block<MatrixType,1,1> with: operator=(Scalar x);\n\n/***********************************************************************\n*  Implementation of Outer Vector Vector Product\n***********************************************************************/\n\n/***********************************************************************\n*  Implementation of General Matrix Vector Product\n***********************************************************************/\n\n/*  According to the shape/flags of the matrix we have to distinghish 3 different cases:\n *   1 - the matrix is col-major, BLAS compatible and M is large => call fast BLAS-like colmajor routine\n *   2 - the matrix is row-major, BLAS compatible and N is large => call fast BLAS-like rowmajor routine\n *   3 - all other cases are handled using a simple loop along the outer-storage direction.\n *  Therefore we need a lower level meta selector.\n *  Furthermore, if the matrix is the rhs, then the product has to be transposed.\n */\nnamespace internal {\n\ntemplate<int Side, int StorageOrder, bool BlasCompatible>\nstruct gemv_dense_selector;\n\n} // end namespace internal\n\nnamespace internal {\n\ntemplate<typename Scalar,int Size,int MaxSize,bool Cond> struct gemv_static_vector_if;\n\ntemplate<typename Scalar,int Size,int MaxSize>\nstruct gemv_static_vector_if<Scalar,Size,MaxSize,false>\n{\n  EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Scalar* data() { eigen_internal_assert(false && \"should never be called\"); return 0; }\n};\n\ntemplate<typename Scalar,int Size>\nstruct gemv_static_vector_if<Scalar,Size,Dynamic,true>\n{\n  EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Scalar* data() { return 0; }\n};\n\ntemplate<typename Scalar,int Size,int MaxSize>\nstruct gemv_static_vector_if<Scalar,Size,MaxSize,true>\n{\n  enum {\n    ForceAlignment  = internal::packet_traits<Scalar>::Vectorizable,\n    PacketSize      = internal::packet_traits<Scalar>::size\n  };\n  #if EIGEN_MAX_STATIC_ALIGN_BYTES!=0\n  internal::plain_array<Scalar,EIGEN_SIZE_MIN_PREFER_FIXED(Size,MaxSize),0,EIGEN_PLAIN_ENUM_MIN(AlignedMax,PacketSize)> m_data;\n  EIGEN_STRONG_INLINE Scalar* data() { return m_data.array; }\n  #else\n  // Some architectures cannot align on the stack,\n  // => let's manually enforce alignment by allocating more data and return the address of the first aligned element.\n  internal::plain_array<Scalar,EIGEN_SIZE_MIN_PREFER_FIXED(Size,MaxSize)+(ForceAlignment?EIGEN_MAX_ALIGN_BYTES:0),0> m_data;\n  EIGEN_STRONG_INLINE Scalar* data() {\n    return ForceAlignment\n            ? reinterpret_cast<Scalar*>((internal::UIntPtr(m_data.array) & ~(std::size_t(EIGEN_MAX_ALIGN_BYTES-1))) + EIGEN_MAX_ALIGN_BYTES)\n            : m_data.array;\n  }\n  #endif\n};\n\n// The vector is on the left => transposition\ntemplate<int StorageOrder, bool BlasCompatible>\nstruct gemv_dense_selector<OnTheLeft,StorageOrder,BlasCompatible>\n{\n  template<typename Lhs, typename Rhs, typename Dest>\n  static void run(const Lhs &lhs, const Rhs &rhs, Dest& dest, const typename Dest::Scalar& alpha)\n  {\n    Transpose<Dest> destT(dest);\n    enum { OtherStorageOrder = StorageOrder == RowMajor ? ColMajor : RowMajor };\n    gemv_dense_selector<OnTheRight,OtherStorageOrder,BlasCompatible>\n      ::run(rhs.transpose(), lhs.transpose(), destT, alpha);\n  }\n};\n\ntemplate<> struct gemv_dense_selector<OnTheRight,ColMajor,true>\n{\n  template<typename Lhs, typename Rhs, typename Dest>\n  static inline void run(const Lhs &lhs, const Rhs &rhs, Dest& dest, const typename Dest::Scalar& alpha)\n  {\n    typedef typename Lhs::Scalar   LhsScalar;\n    typedef typename Rhs::Scalar   RhsScalar;\n    typedef typename Dest::Scalar  ResScalar;\n    typedef typename Dest::RealScalar  RealScalar;\n    \n    typedef internal::blas_traits<Lhs> LhsBlasTraits;\n    typedef typename LhsBlasTraits::DirectLinearAccessType ActualLhsType;\n    typedef internal::blas_traits<Rhs> RhsBlasTraits;\n    typedef typename RhsBlasTraits::DirectLinearAccessType ActualRhsType;\n  \n    typedef Map<Matrix<ResScalar,Dynamic,1>, EIGEN_PLAIN_ENUM_MIN(AlignedMax,internal::packet_traits<ResScalar>::size)> MappedDest;\n\n    ActualLhsType actualLhs = LhsBlasTraits::extract(lhs);\n    ActualRhsType actualRhs = RhsBlasTraits::extract(rhs);\n\n    ResScalar actualAlpha = alpha * LhsBlasTraits::extractScalarFactor(lhs)\n                                  * RhsBlasTraits::extractScalarFactor(rhs);\n\n    // make sure Dest is a compile-time vector type (bug 1166)\n    typedef typename conditional<Dest::IsVectorAtCompileTime, Dest, typename Dest::ColXpr>::type ActualDest;\n\n    enum {\n      // FIXME find a way to allow an inner stride on the result if packet_traits<Scalar>::size==1\n      // on, the other hand it is good for the cache to pack the vector anyways...\n      EvalToDestAtCompileTime = (ActualDest::InnerStrideAtCompileTime==1),\n      ComplexByReal = (NumTraits<LhsScalar>::IsComplex) && (!NumTraits<RhsScalar>::IsComplex),\n      MightCannotUseDest = ((!EvalToDestAtCompileTime) || ComplexByReal) && (ActualDest::MaxSizeAtCompileTime!=0)\n    };\n\n    typedef const_blas_data_mapper<LhsScalar,Index,ColMajor> LhsMapper;\n    typedef const_blas_data_mapper<RhsScalar,Index,RowMajor> RhsMapper;\n    RhsScalar compatibleAlpha = get_factor<ResScalar,RhsScalar>::run(actualAlpha);\n\n    if(!MightCannotUseDest)\n    {\n      // shortcut if we are sure to be able to use dest directly,\n      // this ease the compiler to generate cleaner and more optimzized code for most common cases\n      general_matrix_vector_product\n          <Index,LhsScalar,LhsMapper,ColMajor,LhsBlasTraits::NeedToConjugate,RhsScalar,RhsMapper,RhsBlasTraits::NeedToConjugate>::run(\n          actualLhs.rows(), actualLhs.cols(),\n          LhsMapper(actualLhs.data(), actualLhs.outerStride()),\n          RhsMapper(actualRhs.data(), actualRhs.innerStride()),\n          dest.data(), 1,\n          compatibleAlpha);\n    }\n    else\n    {\n      gemv_static_vector_if<ResScalar,ActualDest::SizeAtCompileTime,ActualDest::MaxSizeAtCompileTime,MightCannotUseDest> static_dest;\n\n      const bool alphaIsCompatible = (!ComplexByReal) || (numext::imag(actualAlpha)==RealScalar(0));\n      const bool evalToDest = EvalToDestAtCompileTime && alphaIsCompatible;\n\n      ei_declare_aligned_stack_constructed_variable(ResScalar,actualDestPtr,dest.size(),\n                                                    evalToDest ? dest.data() : static_dest.data());\n\n      if(!evalToDest)\n      {\n        #ifdef EIGEN_DENSE_STORAGE_CTOR_PLUGIN\n        Index size = dest.size();\n        EIGEN_DENSE_STORAGE_CTOR_PLUGIN\n        #endif\n        if(!alphaIsCompatible)\n        {\n          MappedDest(actualDestPtr, dest.size()).setZero();\n          compatibleAlpha = RhsScalar(1);\n        }\n        else\n          MappedDest(actualDestPtr, dest.size()) = dest;\n      }\n\n      general_matrix_vector_product\n          <Index,LhsScalar,LhsMapper,ColMajor,LhsBlasTraits::NeedToConjugate,RhsScalar,RhsMapper,RhsBlasTraits::NeedToConjugate>::run(\n          actualLhs.rows(), actualLhs.cols(),\n          LhsMapper(actualLhs.data(), actualLhs.outerStride()),\n          RhsMapper(actualRhs.data(), actualRhs.innerStride()),\n          actualDestPtr, 1,\n          compatibleAlpha);\n\n      if (!evalToDest)\n      {\n        if(!alphaIsCompatible)\n          dest.matrix() += actualAlpha * MappedDest(actualDestPtr, dest.size());\n        else\n          dest = MappedDest(actualDestPtr, dest.size());\n      }\n    }\n  }\n};\n\ntemplate<> struct gemv_dense_selector<OnTheRight,RowMajor,true>\n{\n  template<typename Lhs, typename Rhs, typename Dest>\n  static void run(const Lhs &lhs, const Rhs &rhs, Dest& dest, const typename Dest::Scalar& alpha)\n  {\n    typedef typename Lhs::Scalar   LhsScalar;\n    typedef typename Rhs::Scalar   RhsScalar;\n    typedef typename Dest::Scalar  ResScalar;\n    \n    typedef internal::blas_traits<Lhs> LhsBlasTraits;\n    typedef typename LhsBlasTraits::DirectLinearAccessType ActualLhsType;\n    typedef internal::blas_traits<Rhs> RhsBlasTraits;\n    typedef typename RhsBlasTraits::DirectLinearAccessType ActualRhsType;\n    typedef typename internal::remove_all<ActualRhsType>::type ActualRhsTypeCleaned;\n\n    typename add_const<ActualLhsType>::type actualLhs = LhsBlasTraits::extract(lhs);\n    typename add_const<ActualRhsType>::type actualRhs = RhsBlasTraits::extract(rhs);\n\n    ResScalar actualAlpha = alpha * LhsBlasTraits::extractScalarFactor(lhs)\n                                  * RhsBlasTraits::extractScalarFactor(rhs);\n\n    enum {\n      // FIXME find a way to allow an inner stride on the result if packet_traits<Scalar>::size==1\n      // on, the other hand it is good for the cache to pack the vector anyways...\n      DirectlyUseRhs = ActualRhsTypeCleaned::InnerStrideAtCompileTime==1 || ActualRhsTypeCleaned::MaxSizeAtCompileTime==0\n    };\n\n    gemv_static_vector_if<RhsScalar,ActualRhsTypeCleaned::SizeAtCompileTime,ActualRhsTypeCleaned::MaxSizeAtCompileTime,!DirectlyUseRhs> static_rhs;\n\n    ei_declare_aligned_stack_constructed_variable(RhsScalar,actualRhsPtr,actualRhs.size(),\n        DirectlyUseRhs ? const_cast<RhsScalar*>(actualRhs.data()) : static_rhs.data());\n\n    if(!DirectlyUseRhs)\n    {\n      #ifdef EIGEN_DENSE_STORAGE_CTOR_PLUGIN\n      Index size = actualRhs.size();\n      EIGEN_DENSE_STORAGE_CTOR_PLUGIN\n      #endif\n      Map<typename ActualRhsTypeCleaned::PlainObject>(actualRhsPtr, actualRhs.size()) = actualRhs;\n    }\n\n    typedef const_blas_data_mapper<LhsScalar,Index,RowMajor> LhsMapper;\n    typedef const_blas_data_mapper<RhsScalar,Index,ColMajor> RhsMapper;\n    general_matrix_vector_product\n        <Index,LhsScalar,LhsMapper,RowMajor,LhsBlasTraits::NeedToConjugate,RhsScalar,RhsMapper,RhsBlasTraits::NeedToConjugate>::run(\n        actualLhs.rows(), actualLhs.cols(),\n        LhsMapper(actualLhs.data(), actualLhs.outerStride()),\n        RhsMapper(actualRhsPtr, 1),\n        dest.data(), dest.col(0).innerStride(), //NOTE  if dest is not a vector at compile-time, then dest.innerStride() might be wrong. (bug 1166)\n        actualAlpha);\n  }\n};\n\ntemplate<> struct gemv_dense_selector<OnTheRight,ColMajor,false>\n{\n  template<typename Lhs, typename Rhs, typename Dest>\n  static void run(const Lhs &lhs, const Rhs &rhs, Dest& dest, const typename Dest::Scalar& alpha)\n  {\n    EIGEN_STATIC_ASSERT((!nested_eval<Lhs,1>::Evaluate),EIGEN_INTERNAL_COMPILATION_ERROR_OR_YOU_MADE_A_PROGRAMMING_MISTAKE);\n    // TODO if rhs is large enough it might be beneficial to make sure that dest is sequentially stored in memory, otherwise use a temp\n    typename nested_eval<Rhs,1>::type actual_rhs(rhs);\n    const Index size = rhs.rows();\n    for(Index k=0; k<size; ++k)\n      dest += (alpha*actual_rhs.coeff(k)) * lhs.col(k);\n  }\n};\n\ntemplate<> struct gemv_dense_selector<OnTheRight,RowMajor,false>\n{\n  template<typename Lhs, typename Rhs, typename Dest>\n  static void run(const Lhs &lhs, const Rhs &rhs, Dest& dest, const typename Dest::Scalar& alpha)\n  {\n    EIGEN_STATIC_ASSERT((!nested_eval<Lhs,1>::Evaluate),EIGEN_INTERNAL_COMPILATION_ERROR_OR_YOU_MADE_A_PROGRAMMING_MISTAKE);\n    typename nested_eval<Rhs,Lhs::RowsAtCompileTime>::type actual_rhs(rhs);\n    const Index rows = dest.rows();\n    for(Index i=0; i<rows; ++i)\n      dest.coeffRef(i) += alpha * (lhs.row(i).cwiseProduct(actual_rhs.transpose())).sum();\n  }\n};\n\n} // end namespace internal\n\n/***************************************************************************\n* Implementation of matrix base methods\n***************************************************************************/\n\n/** \\returns the matrix product of \\c *this and \\a other.\n  *\n  * \\note If instead of the matrix product you want the coefficient-wise product, see Cwise::operator*().\n  *\n  * \\sa lazyProduct(), operator*=(const MatrixBase&), Cwise::operator*()\n  */\ntemplate<typename Derived>\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nconst Product<Derived, OtherDerived>\nMatrixBase<Derived>::operator*(const MatrixBase<OtherDerived> &other) const\n{\n  // A note regarding the function declaration: In MSVC, this function will sometimes\n  // not be inlined since DenseStorage is an unwindable object for dynamic\n  // matrices and product types are holding a member to store the result.\n  // Thus it does not help tagging this function with EIGEN_STRONG_INLINE.\n  enum {\n    ProductIsValid =  Derived::ColsAtCompileTime==Dynamic\n                   || OtherDerived::RowsAtCompileTime==Dynamic\n                   || int(Derived::ColsAtCompileTime)==int(OtherDerived::RowsAtCompileTime),\n    AreVectors = Derived::IsVectorAtCompileTime && OtherDerived::IsVectorAtCompileTime,\n    SameSizes = EIGEN_PREDICATE_SAME_MATRIX_SIZE(Derived,OtherDerived)\n  };\n  // note to the lost user:\n  //    * for a dot product use: v1.dot(v2)\n  //    * for a coeff-wise product use: v1.cwiseProduct(v2)\n  EIGEN_STATIC_ASSERT(ProductIsValid || !(AreVectors && SameSizes),\n    INVALID_VECTOR_VECTOR_PRODUCT__IF_YOU_WANTED_A_DOT_OR_COEFF_WISE_PRODUCT_YOU_MUST_USE_THE_EXPLICIT_FUNCTIONS)\n  EIGEN_STATIC_ASSERT(ProductIsValid || !(SameSizes && !AreVectors),\n    INVALID_MATRIX_PRODUCT__IF_YOU_WANTED_A_COEFF_WISE_PRODUCT_YOU_MUST_USE_THE_EXPLICIT_FUNCTION)\n  EIGEN_STATIC_ASSERT(ProductIsValid || SameSizes, INVALID_MATRIX_PRODUCT)\n#ifdef EIGEN_DEBUG_PRODUCT\n  internal::product_type<Derived,OtherDerived>::debug();\n#endif\n\n  return Product<Derived, OtherDerived>(derived(), other.derived());\n}\n\n/** \\returns an expression of the matrix product of \\c *this and \\a other without implicit evaluation.\n  *\n  * The returned product will behave like any other expressions: the coefficients of the product will be\n  * computed once at a time as requested. This might be useful in some extremely rare cases when only\n  * a small and no coherent fraction of the result's coefficients have to be computed.\n  *\n  * \\warning This version of the matrix product can be much much slower. So use it only if you know\n  * what you are doing and that you measured a true speed improvement.\n  *\n  * \\sa operator*(const MatrixBase&)\n  */\ntemplate<typename Derived>\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nconst Product<Derived,OtherDerived,LazyProduct>\nMatrixBase<Derived>::lazyProduct(const MatrixBase<OtherDerived> &other) const\n{\n  enum {\n    ProductIsValid =  Derived::ColsAtCompileTime==Dynamic\n                   || OtherDerived::RowsAtCompileTime==Dynamic\n                   || int(Derived::ColsAtCompileTime)==int(OtherDerived::RowsAtCompileTime),\n    AreVectors = Derived::IsVectorAtCompileTime && OtherDerived::IsVectorAtCompileTime,\n    SameSizes = EIGEN_PREDICATE_SAME_MATRIX_SIZE(Derived,OtherDerived)\n  };\n  // note to the lost user:\n  //    * for a dot product use: v1.dot(v2)\n  //    * for a coeff-wise product use: v1.cwiseProduct(v2)\n  EIGEN_STATIC_ASSERT(ProductIsValid || !(AreVectors && SameSizes),\n    INVALID_VECTOR_VECTOR_PRODUCT__IF_YOU_WANTED_A_DOT_OR_COEFF_WISE_PRODUCT_YOU_MUST_USE_THE_EXPLICIT_FUNCTIONS)\n  EIGEN_STATIC_ASSERT(ProductIsValid || !(SameSizes && !AreVectors),\n    INVALID_MATRIX_PRODUCT__IF_YOU_WANTED_A_COEFF_WISE_PRODUCT_YOU_MUST_USE_THE_EXPLICIT_FUNCTION)\n  EIGEN_STATIC_ASSERT(ProductIsValid || SameSizes, INVALID_MATRIX_PRODUCT)\n\n  return Product<Derived,OtherDerived,LazyProduct>(derived(), other.derived());\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_PRODUCT_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/GenericPacketMath.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_GENERIC_PACKET_MATH_H\n#define EIGEN_GENERIC_PACKET_MATH_H\n\nnamespace Eigen {\n\nnamespace internal {\n\n/** \\internal\n  * \\file GenericPacketMath.h\n  *\n  * Default implementation for types not supported by the vectorization.\n  * In practice these functions are provided to make easier the writing\n  * of generic vectorized code.\n  */\n\n#ifndef EIGEN_DEBUG_ALIGNED_LOAD\n#define EIGEN_DEBUG_ALIGNED_LOAD\n#endif\n\n#ifndef EIGEN_DEBUG_UNALIGNED_LOAD\n#define EIGEN_DEBUG_UNALIGNED_LOAD\n#endif\n\n#ifndef EIGEN_DEBUG_ALIGNED_STORE\n#define EIGEN_DEBUG_ALIGNED_STORE\n#endif\n\n#ifndef EIGEN_DEBUG_UNALIGNED_STORE\n#define EIGEN_DEBUG_UNALIGNED_STORE\n#endif\n\nstruct default_packet_traits\n{\n  enum {\n    HasHalfPacket = 0,\n\n    HasAdd       = 1,\n    HasSub       = 1,\n    HasShift     = 1,\n    HasMul       = 1,\n    HasNegate    = 1,\n    HasAbs       = 1,\n    HasArg       = 0,\n    HasAbs2      = 1,\n    HasAbsDiff   = 0,\n    HasMin       = 1,\n    HasMax       = 1,\n    HasConj      = 1,\n    HasSetLinear = 1,\n    HasBlend     = 0,\n    HasInsert    = 0,\n    HasReduxp    = 1,\n\n    HasDiv    = 0,\n    HasSqrt   = 0,\n    HasRsqrt  = 0,\n    HasExp    = 0,\n    HasExpm1  = 0,\n    HasLog    = 0,\n    HasLog1p  = 0,\n    HasLog10  = 0,\n    HasPow    = 0,\n\n    HasSin    = 0,\n    HasCos    = 0,\n    HasTan    = 0,\n    HasASin   = 0,\n    HasACos   = 0,\n    HasATan   = 0,\n    HasSinh   = 0,\n    HasCosh   = 0,\n    HasTanh   = 0,\n    HasLGamma = 0,\n    HasDiGamma = 0,\n    HasZeta = 0,\n    HasPolygamma = 0,\n    HasErf = 0,\n    HasErfc = 0,\n    HasNdtri = 0,\n    HasBessel = 0,\n    HasIGamma = 0,\n    HasIGammaDerA = 0,\n    HasGammaSampleDerAlpha = 0,\n    HasIGammac = 0,\n    HasBetaInc = 0,\n\n    HasRound  = 0,\n    HasRint   = 0,\n    HasFloor  = 0,\n    HasCeil   = 0,\n    HasCast   = 0, \n    HasSign   = 0\n  };\n};\n\ntemplate<typename T> struct packet_traits : default_packet_traits\n{\n  typedef T type;\n  typedef T half;\n  enum {\n    Vectorizable = 0,\n    size = 1,\n    AlignedOnScalar = 0,\n    HasHalfPacket = 0\n  };\n  enum {\n    HasAdd    = 0,\n    HasSub    = 0,\n    HasMul    = 0,\n    HasNegate = 0,\n    HasAbs    = 0,\n    HasAbs2   = 0,\n    HasMin    = 0,\n    HasMax    = 0,\n    HasConj   = 0,\n    HasSetLinear = 0\n  };\n};\n\ntemplate<typename T> struct packet_traits<const T> : packet_traits<T> { };\n\ntemplate <typename Src, typename Tgt> struct type_casting_traits {\n  enum {\n    VectorizedCast = 0,\n    SrcCoeffRatio = 1,\n    TgtCoeffRatio = 1\n  };\n};\n\n/** \\internal Wrapper to ensure that multiple packet types can map to the same\n    same underlying vector type. */\ntemplate<typename T, int unique_id = 0>\nstruct eigen_packet_wrapper\n{\n  EIGEN_ALWAYS_INLINE operator T&() { return m_val; }\n  EIGEN_ALWAYS_INLINE operator const T&() const { return m_val; }\n  EIGEN_ALWAYS_INLINE eigen_packet_wrapper() {}\n  EIGEN_ALWAYS_INLINE eigen_packet_wrapper(const T &v) : m_val(v) {}\n  EIGEN_ALWAYS_INLINE eigen_packet_wrapper& operator=(const T &v) {\n    m_val = v;\n    return *this;\n  }\n\n  T m_val;\n};\n\n/** \\internal \\returns static_cast<TgtType>(a) (coeff-wise) */\ntemplate <typename SrcPacket, typename TgtPacket>\nEIGEN_DEVICE_FUNC inline TgtPacket\npcast(const SrcPacket& a) {\n  return static_cast<TgtPacket>(a);\n}\ntemplate <typename SrcPacket, typename TgtPacket>\nEIGEN_DEVICE_FUNC inline TgtPacket\npcast(const SrcPacket& a, const SrcPacket& /*b*/) {\n  return static_cast<TgtPacket>(a);\n}\n\ntemplate <typename SrcPacket, typename TgtPacket>\nEIGEN_DEVICE_FUNC inline TgtPacket\npcast(const SrcPacket& a, const SrcPacket& /*b*/, const SrcPacket& /*c*/, const SrcPacket& /*d*/) {\n  return static_cast<TgtPacket>(a);\n}\n\n/** \\internal \\returns reinterpret_cast<Target>(a) */\ntemplate <typename Target, typename Packet>\nEIGEN_DEVICE_FUNC inline Target\npreinterpret(const Packet& a); /* { return reinterpret_cast<const Target&>(a); } */\n\n/** \\internal \\returns a + b (coeff-wise) */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline Packet\npadd(const Packet& a, const Packet& b) { return a+b; }\n\n/** \\internal \\returns a - b (coeff-wise) */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline Packet\npsub(const Packet& a, const Packet& b) { return a-b; }\n\n/** \\internal \\returns -a (coeff-wise) */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline Packet\npnegate(const Packet& a) { return -a; }\n\n/** \\internal \\returns conj(a) (coeff-wise) */\n\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline Packet\npconj(const Packet& a) { return numext::conj(a); }\n\n/** \\internal \\returns a * b (coeff-wise) */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline Packet\npmul(const Packet& a, const Packet& b) { return a*b; }\n\n/** \\internal \\returns a / b (coeff-wise) */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline Packet\npdiv(const Packet& a, const Packet& b) { return a/b; }\n\n/** \\internal \\returns the min of \\a a and \\a b  (coeff-wise) */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline Packet\npmin(const Packet& a, const Packet& b) { return numext::mini(a, b); }\n\n/** \\internal \\returns the max of \\a a and \\a b  (coeff-wise) */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline Packet\npmax(const Packet& a, const Packet& b) { return numext::maxi(a, b); }\n\n/** \\internal \\returns the absolute value of \\a a */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline Packet\npabs(const Packet& a) { using std::abs; return abs(a); }\ntemplate<> EIGEN_DEVICE_FUNC inline unsigned int\npabs(const unsigned int& a) { return a; }\ntemplate<> EIGEN_DEVICE_FUNC inline unsigned long\npabs(const unsigned long& a) { return a; }\ntemplate<> EIGEN_DEVICE_FUNC inline unsigned long long\npabs(const unsigned long long& a) { return a; }\n\n/** \\internal \\returns the phase angle of \\a a */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline Packet\nparg(const Packet& a) { using numext::arg; return arg(a); }\n\n\n/** \\internal \\returns \\a a logically shifted by N bits to the right */\ntemplate<int N> EIGEN_DEVICE_FUNC inline int\nparithmetic_shift_right(const int& a) { return a >> N; }\ntemplate<int N> EIGEN_DEVICE_FUNC inline long int\nparithmetic_shift_right(const long int& a) { return a >> N; }\n\n/** \\internal \\returns \\a a arithmetically shifted by N bits to the right */\ntemplate<int N> EIGEN_DEVICE_FUNC inline int\nplogical_shift_right(const int& a) { return static_cast<int>(static_cast<unsigned int>(a) >> N); }\ntemplate<int N> EIGEN_DEVICE_FUNC inline long int\nplogical_shift_right(const long int& a) { return static_cast<long>(static_cast<unsigned long>(a) >> N); }\n\n/** \\internal \\returns \\a a shifted by N bits to the left */\ntemplate<int N> EIGEN_DEVICE_FUNC inline int\nplogical_shift_left(const int& a) { return a << N; }\ntemplate<int N> EIGEN_DEVICE_FUNC inline long int\nplogical_shift_left(const long int& a) { return a << N; }\n\n/** \\internal \\returns the significant and exponent of the underlying floating point numbers\n  * See https://en.cppreference.com/w/cpp/numeric/math/frexp\n  */\ntemplate <typename Packet>\nEIGEN_DEVICE_FUNC inline Packet pfrexp(const Packet& a, Packet& exponent) {\n  int exp;\n  EIGEN_USING_STD_MATH(frexp);\n  Packet result = frexp(a, &exp);\n  exponent = static_cast<Packet>(exp);\n  return result;\n}\n\n/** \\internal \\returns a * 2^exponent\n  * See https://en.cppreference.com/w/cpp/numeric/math/ldexp\n  */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline Packet\npldexp(const Packet &a, const Packet &exponent) {\n  EIGEN_USING_STD_MATH(ldexp);\n  return ldexp(a, static_cast<int>(exponent));\n}\n\n// Notice: The following ops accept and operator on bitwise masks.\n// The value of each field in a masks is Scalar(0) or ~Scalar(0).\n// For boolean packet like Packet16b, this is different from the\n// representation of true and false, which are 1 and 0.\n// As an example\n//    ptrue<Packet16b>()     = 0xffffffffffffffffffffffffffffffff\n// while\n//    pset1<Packet16b>(true) = 0x01010101010101010101010101010101\n\n/** \\internal \\returns the bitwise and of \\a a and \\a b */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline Packet\npand(const Packet& a, const Packet& b) { return a & b; }\n\n/** \\internal \\returns the bitwise or of \\a a and \\a b */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline Packet\npor(const Packet& a, const Packet& b) { return a | b; }\n\n/** \\internal \\returns the bitwise xor of \\a a and \\a b */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline Packet\npxor(const Packet& a, const Packet& b) { return a ^ b; }\n\n/** \\internal \\returns the bitwise and of \\a a and not \\a b */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline Packet\npandnot(const Packet& a, const Packet& b) { return a & (~b); }\n\n/** \\internal \\returns ones */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline Packet\nptrue(const Packet& /*a*/) { Packet b; memset((void*)&b, 0xff, sizeof(b)); return b;}\n\n/** \\internal \\returns zeros */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline Packet\npzero(const Packet& a) { return pxor(a,a); }\n\ntemplate<> EIGEN_DEVICE_FUNC inline float pzero<float>(const float& a) {\n  EIGEN_UNUSED_VARIABLE(a);\n  return 0.f;\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline double pzero<double>(const double& a) {\n  EIGEN_UNUSED_VARIABLE(a);\n  return 0.;\n}\n\ntemplate <typename RealScalar>\nEIGEN_DEVICE_FUNC inline std::complex<RealScalar> ptrue(const std::complex<RealScalar>& /*a*/) {\n  RealScalar b;\n  b = ptrue(b);\n  return std::complex<RealScalar>(b, b);\n}\n\n/** \\internal \\returns the bitwise not of \\a a */\ntemplate <typename Packet> EIGEN_DEVICE_FUNC inline Packet\npnot(const Packet& a) { return pxor(ptrue(a), a);}\n\n/** \\internal \\returns a <= b as a bit mask */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline Packet\npcmp_le(const Packet& a, const Packet& b)  { return a<=b ? ptrue(a) : pzero(a); }\n\n/** \\internal \\returns a < b as a bit mask */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline Packet\npcmp_lt(const Packet& a, const Packet& b)  { return a<b ? ptrue(a) : pzero(a); }\n\n/** \\internal \\returns a == b as a bit mask */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline Packet\npcmp_eq(const Packet& a, const Packet& b) { return a==b ? ptrue(a) : pzero(a); }\n\n/** \\internal \\returns a < b or a==NaN or b==NaN as a bit mask */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline Packet\npcmp_lt_or_nan(const Packet& a, const Packet& b) { return pnot(pcmp_le(b,a)); } \n\n/** \\internal \\returns \\a or \\b for each field in packet according to \\mask */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline Packet\npselect(const Packet& mask, const Packet& a, const Packet& b) {\n  return por(pand(a,mask),pandnot(b,mask));\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline float pselect<float>(\n    const float& cond, const float& a, const float&b) {\n  return numext::equal_strict(cond,0.f) ? b : a;\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline double pselect<double>(\n    const double& cond, const double& a, const double& b) {\n  return numext::equal_strict(cond,0.) ? b : a;\n}\n\n\n\n/** \\internal \\returns the min of \\a a and \\a b  (coeff-wise) */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline Packet\npabsdiff(const Packet& a, const Packet& b) { return pselect(pcmp_lt(a, b), psub(b, a), psub(a, b)); }\n\n/** \\internal \\returns a packet version of \\a *from, from must be 16 bytes aligned */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline Packet\npload(const typename unpacket_traits<Packet>::type* from) { return *from; }\n\n/** \\internal \\returns a packet version of \\a *from, (un-aligned load) */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline Packet\nploadu(const typename unpacket_traits<Packet>::type* from) { return *from; }\n\n/** \\internal \\returns a packet version of \\a *from, (un-aligned masked load)\n * There is no generic implementation. We only have implementations for specialized\n * cases. Generic case should not be called.\n */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline\ntypename enable_if<unpacket_traits<Packet>::masked_load_available, Packet>::type\nploadu(const typename unpacket_traits<Packet>::type* from, typename unpacket_traits<Packet>::mask_t umask);\n\n/** \\internal \\returns a packet with constant coefficients \\a a, e.g.: (a,a,a,a) */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline Packet\npset1(const typename unpacket_traits<Packet>::type& a) { return a; }\n\n/** \\internal \\returns a packet with constant coefficients set from bits */\ntemplate<typename Packet,typename BitsType> EIGEN_DEVICE_FUNC inline Packet\npset1frombits(BitsType a);\n\n/** \\internal \\returns a packet with constant coefficients \\a a[0], e.g.: (a[0],a[0],a[0],a[0]) */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline Packet\npload1(const typename unpacket_traits<Packet>::type  *a) { return pset1<Packet>(*a); }\n\n/** \\internal \\returns a packet with elements of \\a *from duplicated.\n  * For instance, for a packet of 8 elements, 4 scalars will be read from \\a *from and\n  * duplicated to form: {from[0],from[0],from[1],from[1],from[2],from[2],from[3],from[3]}\n  * Currently, this function is only used for scalar * complex products.\n  */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet\nploaddup(const typename unpacket_traits<Packet>::type* from) { return *from; }\n\n/** \\internal \\returns a packet with elements of \\a *from quadrupled.\n  * For instance, for a packet of 8 elements, 2 scalars will be read from \\a *from and\n  * replicated to form: {from[0],from[0],from[0],from[0],from[1],from[1],from[1],from[1]}\n  * Currently, this function is only used in matrix products.\n  * For packet-size smaller or equal to 4, this function is equivalent to pload1 \n  */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline Packet\nploadquad(const typename unpacket_traits<Packet>::type* from)\n{ return pload1<Packet>(from); }\n\n/** \\internal equivalent to\n  * \\code\n  * a0 = pload1(a+0);\n  * a1 = pload1(a+1);\n  * a2 = pload1(a+2);\n  * a3 = pload1(a+3);\n  * \\endcode\n  * \\sa pset1, pload1, ploaddup, pbroadcast2\n  */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC\ninline void pbroadcast4(const typename unpacket_traits<Packet>::type *a,\n                        Packet& a0, Packet& a1, Packet& a2, Packet& a3)\n{\n  a0 = pload1<Packet>(a+0);\n  a1 = pload1<Packet>(a+1);\n  a2 = pload1<Packet>(a+2);\n  a3 = pload1<Packet>(a+3);\n}\n\n/** \\internal equivalent to\n  * \\code\n  * a0 = pload1(a+0);\n  * a1 = pload1(a+1);\n  * \\endcode\n  * \\sa pset1, pload1, ploaddup, pbroadcast4\n  */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC\ninline void pbroadcast2(const typename unpacket_traits<Packet>::type *a,\n                        Packet& a0, Packet& a1)\n{\n  a0 = pload1<Packet>(a+0);\n  a1 = pload1<Packet>(a+1);\n}\n\n/** \\internal \\brief Returns a packet with coefficients (a,a+1,...,a+packet_size-1). */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet\nplset(const typename unpacket_traits<Packet>::type& a) { return a; }\n\n/** \\internal copy the packet \\a from to \\a *to, \\a to must be 16 bytes aligned */\ntemplate<typename Scalar, typename Packet> EIGEN_DEVICE_FUNC inline void pstore(Scalar* to, const Packet& from)\n{ (*to) = from; }\n\n/** \\internal copy the packet \\a from to \\a *to, (un-aligned store) */\ntemplate<typename Scalar, typename Packet> EIGEN_DEVICE_FUNC inline void pstoreu(Scalar* to, const Packet& from)\n{  (*to) = from; }\n\n/** \\internal copy the packet \\a from to \\a *to, (un-aligned store with a mask)\n * There is no generic implementation. We only have implementations for specialized\n * cases. Generic case should not be called.\n */\ntemplate<typename Scalar, typename Packet>\nEIGEN_DEVICE_FUNC inline\ntypename enable_if<unpacket_traits<Packet>::masked_store_available, void>::type\npstoreu(Scalar* to, const Packet& from, typename unpacket_traits<Packet>::mask_t umask);\n\n template<typename Scalar, typename Packet> EIGEN_DEVICE_FUNC inline Packet pgather(const Scalar* from, Index /*stride*/)\n { return ploadu<Packet>(from); }\n\n template<typename Scalar, typename Packet> EIGEN_DEVICE_FUNC inline void pscatter(Scalar* to, const Packet& from, Index /*stride*/)\n { pstore(to, from); }\n\n/** \\internal tries to do cache prefetching of \\a addr */\ntemplate<typename Scalar> EIGEN_DEVICE_FUNC inline void prefetch(const Scalar* addr)\n{\n#if defined(EIGEN_HIP_DEVICE_COMPILE)\n  // do nothing\n#elif defined(EIGEN_CUDA_ARCH)\n#if defined(__LP64__)\n  // 64-bit pointer operand constraint for inlined asm\n  asm(\" prefetch.L1 [ %1 ];\" : \"=l\"(addr) : \"l\"(addr));\n#else\n  // 32-bit pointer operand constraint for inlined asm\n  asm(\" prefetch.L1 [ %1 ];\" : \"=r\"(addr) : \"r\"(addr));\n#endif\n#elif (!EIGEN_COMP_MSVC) && (EIGEN_COMP_GNUC || EIGEN_COMP_CLANG || EIGEN_COMP_ICC)\n  __builtin_prefetch(addr);\n#endif\n}\n\n/** \\internal \\returns the first element of a packet */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline typename unpacket_traits<Packet>::type pfirst(const Packet& a)\n{ return a; }\n\n/** \\internal \\returns a packet where the element i contains the sum of the packet of \\a vec[i] */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline Packet\npreduxp(const Packet* vecs) { return vecs[0]; }\n\n/** \\internal \\returns the sum of the elements of \\a a*/\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline typename unpacket_traits<Packet>::type predux(const Packet& a)\n{ return a; }\n\n/** \\internal \\returns the sum of the elements of upper and lower half of \\a a if \\a a is larger than 4.\n  * For a packet {a0, a1, a2, a3, a4, a5, a6, a7}, it returns a half packet {a0+a4, a1+a5, a2+a6, a3+a7}\n  * For packet-size smaller or equal to 4, this boils down to a noop.\n  */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline\ntypename conditional<(unpacket_traits<Packet>::size%8)==0,typename unpacket_traits<Packet>::half,Packet>::type\npredux_half_dowto4(const Packet& a)\n{ return a; }\n\n/** \\internal \\returns the product of the elements of \\a a */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline typename unpacket_traits<Packet>::type predux_mul(const Packet& a)\n{ return a; }\n\n/** \\internal \\returns the min of the elements of \\a a */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline typename unpacket_traits<Packet>::type predux_min(const Packet& a)\n{ return a; }\n\n/** \\internal \\returns the max of the elements of \\a a */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline typename unpacket_traits<Packet>::type predux_max(const Packet& a)\n{ return a; }\n\n/** \\internal \\returns true if all coeffs of \\a a means \"true\"\n  * It is supposed to be called on values returned by pcmp_*.\n  */\n// not needed yet\n// template<typename Packet> EIGEN_DEVICE_FUNC inline bool predux_all(const Packet& a)\n// { return bool(a); }\n\n/** \\internal \\returns true if any coeffs of \\a a means \"true\"\n  * It is supposed to be called on values returned by pcmp_*.\n  */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline bool predux_any(const Packet& a)\n{\n  // Dirty but generic implementation where \"true\" is assumed to be non 0 and all the sames.\n  // It is expected that \"true\" is either:\n  //  - Scalar(1)\n  //  - bits full of ones (NaN for floats),\n  //  - or first bit equals to 1 (1 for ints, smallest denormal for floats).\n  // For all these cases, taking the sum is just fine, and this boils down to a no-op for scalars.\n  return bool(predux(a));\n}\n\n/** \\internal \\returns the reversed elements of \\a a*/\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline Packet preverse(const Packet& a)\n{ return a; }\n\n/** \\internal \\returns \\a a with real and imaginary part flipped (for complex type only) */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline Packet pcplxflip(const Packet& a)\n{\n  return Packet(numext::imag(a),numext::real(a));\n}\n\n/**************************\n* Special math functions\n***************************/\n\n/** \\internal \\returns the sine of \\a a (coeff-wise) */\ntemplate<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nPacket psin(const Packet& a) { EIGEN_USING_STD_MATH(sin); return sin(a); }\n\n/** \\internal \\returns the cosine of \\a a (coeff-wise) */\ntemplate<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nPacket pcos(const Packet& a) { EIGEN_USING_STD_MATH(cos); return cos(a); }\n\n/** \\internal \\returns the tan of \\a a (coeff-wise) */\ntemplate<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nPacket ptan(const Packet& a) { EIGEN_USING_STD_MATH(tan); return tan(a); }\n\n/** \\internal \\returns the arc sine of \\a a (coeff-wise) */\ntemplate<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nPacket pasin(const Packet& a) { EIGEN_USING_STD_MATH(asin); return asin(a); }\n\n/** \\internal \\returns the arc cosine of \\a a (coeff-wise) */\ntemplate<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nPacket pacos(const Packet& a) { EIGEN_USING_STD_MATH(acos); return acos(a); }\n\n/** \\internal \\returns the arc tangent of \\a a (coeff-wise) */\ntemplate<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nPacket patan(const Packet& a) { EIGEN_USING_STD_MATH(atan); return atan(a); }\n\n/** \\internal \\returns the hyperbolic sine of \\a a (coeff-wise) */\ntemplate<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nPacket psinh(const Packet& a) { EIGEN_USING_STD_MATH(sinh); return sinh(a); }\n\n/** \\internal \\returns the hyperbolic cosine of \\a a (coeff-wise) */\ntemplate<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nPacket pcosh(const Packet& a) { EIGEN_USING_STD_MATH(cosh); return cosh(a); }\n\n/** \\internal \\returns the hyperbolic tan of \\a a (coeff-wise) */\ntemplate<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nPacket ptanh(const Packet& a) { EIGEN_USING_STD_MATH(tanh); return tanh(a); }\n\n/** \\internal \\returns the exp of \\a a (coeff-wise) */\ntemplate<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nPacket pexp(const Packet& a) { EIGEN_USING_STD_MATH(exp); return exp(a); }\n\n/** \\internal \\returns the expm1 of \\a a (coeff-wise) */\ntemplate<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nPacket pexpm1(const Packet& a) { return numext::expm1(a); }\n\n/** \\internal \\returns the log of \\a a (coeff-wise) */\ntemplate<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nPacket plog(const Packet& a) { EIGEN_USING_STD_MATH(log); return log(a); }\n\n/** \\internal \\returns the log1p of \\a a (coeff-wise) */\ntemplate<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nPacket plog1p(const Packet& a) { return numext::log1p(a); }\n\n/** \\internal \\returns the log10 of \\a a (coeff-wise) */\ntemplate<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nPacket plog10(const Packet& a) { EIGEN_USING_STD_MATH(log10); return log10(a); }\n\n/** \\internal \\returns the square-root of \\a a (coeff-wise) */\ntemplate<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nPacket psqrt(const Packet& a) { EIGEN_USING_STD_MATH(sqrt); return sqrt(a); }\n\n/** \\internal \\returns the reciprocal square-root of \\a a (coeff-wise) */\ntemplate<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nPacket prsqrt(const Packet& a) {\n  return pdiv(pset1<Packet>(1), psqrt(a));\n}\n\n/** \\internal \\returns the rounded value of \\a a (coeff-wise) */\ntemplate<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nPacket pround(const Packet& a) { using numext::round; return round(a); }\n\n/** \\internal \\returns the floor of \\a a (coeff-wise) */\ntemplate<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nPacket pfloor(const Packet& a) { using numext::floor; return floor(a); }\n\n/** \\internal \\returns the rounded value of \\a a (coeff-wise) with current\n * rounding mode */\ntemplate<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nPacket print(const Packet& a) { using numext::rint; return rint(a); }\n\n/** \\internal \\returns the ceil of \\a a (coeff-wise) */\ntemplate<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nPacket pceil(const Packet& a) { using numext::ceil; return ceil(a); }\n\n/***************************************************************************\n* The following functions might not have to be overwritten for vectorized types\n***************************************************************************/\n\n/** \\internal copy a packet with constant coefficient \\a a (e.g., [a,a,a,a]) to \\a *to. \\a to must be 16 bytes aligned */\n// NOTE: this function must really be templated on the packet type (think about different packet types for the same scalar type)\ntemplate<typename Packet>\ninline void pstore1(typename unpacket_traits<Packet>::type* to, const typename unpacket_traits<Packet>::type& a)\n{\n  pstore(to, pset1<Packet>(a));\n}\n\n/** \\internal \\returns a * b + c (coeff-wise) */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline Packet\npmadd(const Packet&  a,\n         const Packet&  b,\n         const Packet&  c)\n{ return padd(pmul(a, b),c); }\n\n/** \\internal \\returns a packet version of \\a *from.\n  * The pointer \\a from must be aligned on a \\a Alignment bytes boundary. */\ntemplate<typename Packet, int Alignment>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Packet ploadt(const typename unpacket_traits<Packet>::type* from)\n{\n  if(Alignment >= unpacket_traits<Packet>::alignment)\n    return pload<Packet>(from);\n  else\n    return ploadu<Packet>(from);\n}\n\n/** \\internal copy the packet \\a from to \\a *to.\n  * The pointer \\a from must be aligned on a \\a Alignment bytes boundary. */\ntemplate<typename Scalar, typename Packet, int Alignment>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void pstoret(Scalar* to, const Packet& from)\n{\n  if(Alignment >= unpacket_traits<Packet>::alignment)\n    pstore(to, from);\n  else\n    pstoreu(to, from);\n}\n\n/** \\internal \\returns a packet version of \\a *from.\n  * Unlike ploadt, ploadt_ro takes advantage of the read-only memory path on the\n  * hardware if available to speedup the loading of data that won't be modified\n  * by the current computation.\n  */\ntemplate<typename Packet, int LoadMode>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Packet ploadt_ro(const typename unpacket_traits<Packet>::type* from)\n{\n  return ploadt<Packet, LoadMode>(from);\n}\n\n/** \\internal default implementation of palign() allowing partial specialization */\ntemplate<int Offset,typename PacketType>\nstruct palign_impl\n{\n  // by default data are aligned, so there is nothing to be done :)\n  static inline void run(PacketType&, const PacketType&) {}\n};\n\n/** \\internal update \\a first using the concatenation of the packet_size minus \\a Offset last elements\n  * of \\a first and \\a Offset first elements of \\a second.\n  * \n  * This function is currently only used to optimize matrix-vector products on unligned matrices.\n  * It takes 2 packets that represent a contiguous memory array, and returns a packet starting\n  * at the position \\a Offset. For instance, for packets of 4 elements, we have:\n  *  Input:\n  *  - first = {f0,f1,f2,f3}\n  *  - second = {s0,s1,s2,s3}\n  * Output: \n  *   - if Offset==0 then {f0,f1,f2,f3}\n  *   - if Offset==1 then {f1,f2,f3,s0}\n  *   - if Offset==2 then {f2,f3,s0,s1}\n  *   - if Offset==3 then {f3,s0,s1,s3}\n  */\ntemplate<int Offset,typename PacketType>\ninline void palign(PacketType& first, const PacketType& second)\n{\n  palign_impl<Offset,PacketType>::run(first,second);\n}\n\n/***************************************************************************\n* Fast complex products (GCC generates a function call which is very slow)\n***************************************************************************/\n\n// Eigen+CUDA does not support complexes.\n#if !defined(EIGEN_GPUCC)\n\ntemplate<> inline std::complex<float> pmul(const std::complex<float>& a, const std::complex<float>& b)\n{ return std::complex<float>(a.real()*b.real() - a.imag()*b.imag(), a.imag()*b.real() + a.real()*b.imag()); }\n\ntemplate<> inline std::complex<double> pmul(const std::complex<double>& a, const std::complex<double>& b)\n{ return std::complex<double>(a.real()*b.real() - a.imag()*b.imag(), a.imag()*b.real() + a.real()*b.imag()); }\n\n#endif\n\n\n/***************************************************************************\n * PacketBlock, that is a collection of N packets where the number of words\n * in the packet is a multiple of N.\n***************************************************************************/\ntemplate <typename Packet,int N=unpacket_traits<Packet>::size> struct PacketBlock {\n  Packet packet[N];\n};\n\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline void\nptranspose(PacketBlock<Packet,1>& /*kernel*/) {\n  // Nothing to do in the scalar case, i.e. a 1x1 matrix.\n}\n\n/***************************************************************************\n * Selector, i.e. vector of N boolean values used to select (i.e. blend)\n * words from 2 packets.\n***************************************************************************/\ntemplate <size_t N> struct Selector {\n  bool select[N];\n};\n\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline Packet\npblend(const Selector<unpacket_traits<Packet>::size>& ifPacket, const Packet& thenPacket, const Packet& elsePacket) {\n  return ifPacket.select[0] ? thenPacket : elsePacket;\n}\n\n/** \\internal \\returns \\a a with the first coefficient replaced by the scalar b */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline Packet\npinsertfirst(const Packet& a, typename unpacket_traits<Packet>::type b)\n{\n  // Default implementation based on pblend.\n  // It must be specialized for higher performance.\n  Selector<unpacket_traits<Packet>::size> mask;\n  mask.select[0] = true;\n  // This for loop should be optimized away by the compiler.\n  for(Index i=1; i<unpacket_traits<Packet>::size; ++i)\n    mask.select[i] = false;\n  return pblend(mask, pset1<Packet>(b), a);\n}\n\n/** \\internal \\returns \\a a with the last coefficient replaced by the scalar b */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC inline Packet\npinsertlast(const Packet& a, typename unpacket_traits<Packet>::type b)\n{\n  // Default implementation based on pblend.\n  // It must be specialized for higher performance.\n  Selector<unpacket_traits<Packet>::size> mask;\n  // This for loop should be optimized away by the compiler.\n  for(Index i=0; i<unpacket_traits<Packet>::size-1; ++i)\n    mask.select[i] = false;\n  mask.select[unpacket_traits<Packet>::size-1] = true;\n  return pblend(mask, pset1<Packet>(b), a);\n}\n\n/***************************************************************************\n * Some generic implementations to be used by implementors\n***************************************************************************/\n\n/** Default implementation of pfrexp for float.\n  * It is expected to be called by implementers of template<> pfrexp.\n  */\ntemplate<typename Packet> EIGEN_STRONG_INLINE Packet\npfrexp_float(const Packet& a, Packet& exponent);\n\n/** Default implementation of pldexp for float.\n  * It is expected to be called by implementers of template<> pldexp.\n  */\ntemplate<typename Packet> EIGEN_STRONG_INLINE Packet\npldexp_float(Packet a, Packet exponent);\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_GENERIC_PACKET_MATH_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/GlobalFunctions.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010-2016 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2010 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_GLOBAL_FUNCTIONS_H\n#define EIGEN_GLOBAL_FUNCTIONS_H\n\n#ifdef EIGEN_PARSED_BY_DOXYGEN\n\n#define EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(NAME,FUNCTOR,DOC_OP,DOC_DETAILS) \\\n  /** \\returns an expression of the coefficient-wise DOC_OP of \\a x\n\n    DOC_DETAILS\n\n    \\sa <a href=\"group__CoeffwiseMathFunctions.html#cwisetable_##NAME\">Math functions</a>, class CwiseUnaryOp\n    */ \\\n  template<typename Derived> \\\n  inline const Eigen::CwiseUnaryOp<Eigen::internal::FUNCTOR<typename Derived::Scalar>, const Derived> \\\n  NAME(const Eigen::ArrayBase<Derived>& x);\n\n#else\n\n#define EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(NAME,FUNCTOR,DOC_OP,DOC_DETAILS) \\\n  template<typename Derived> \\\n  inline const Eigen::CwiseUnaryOp<Eigen::internal::FUNCTOR<typename Derived::Scalar>, const Derived> \\\n  (NAME)(const Eigen::ArrayBase<Derived>& x) { \\\n    return Eigen::CwiseUnaryOp<Eigen::internal::FUNCTOR<typename Derived::Scalar>, const Derived>(x.derived()); \\\n  }\n\n#endif // EIGEN_PARSED_BY_DOXYGEN\n\n#define EIGEN_ARRAY_DECLARE_GLOBAL_EIGEN_UNARY(NAME,FUNCTOR) \\\n  \\\n  template<typename Derived> \\\n  struct NAME##_retval<ArrayBase<Derived> > \\\n  { \\\n    typedef const Eigen::CwiseUnaryOp<Eigen::internal::FUNCTOR<typename Derived::Scalar>, const Derived> type; \\\n  }; \\\n  template<typename Derived> \\\n  struct NAME##_impl<ArrayBase<Derived> > \\\n  { \\\n    static inline typename NAME##_retval<ArrayBase<Derived> >::type run(const Eigen::ArrayBase<Derived>& x) \\\n    { \\\n      return typename NAME##_retval<ArrayBase<Derived> >::type(x.derived()); \\\n    } \\\n  };\n\nnamespace Eigen\n{\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(real,scalar_real_op,real part,\\sa ArrayBase::real)\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(imag,scalar_imag_op,imaginary part,\\sa ArrayBase::imag)\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(conj,scalar_conjugate_op,complex conjugate,\\sa ArrayBase::conjugate)\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(inverse,scalar_inverse_op,inverse,\\sa ArrayBase::inverse)\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(sin,scalar_sin_op,sine,\\sa ArrayBase::sin)\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(cos,scalar_cos_op,cosine,\\sa ArrayBase::cos)\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(tan,scalar_tan_op,tangent,\\sa ArrayBase::tan)\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(atan,scalar_atan_op,arc-tangent,\\sa ArrayBase::atan)\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(asin,scalar_asin_op,arc-sine,\\sa ArrayBase::asin)\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(acos,scalar_acos_op,arc-consine,\\sa ArrayBase::acos)\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(sinh,scalar_sinh_op,hyperbolic sine,\\sa ArrayBase::sinh)\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(cosh,scalar_cosh_op,hyperbolic cosine,\\sa ArrayBase::cosh)\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(tanh,scalar_tanh_op,hyperbolic tangent,\\sa ArrayBase::tanh)\n#if EIGEN_HAS_CXX11_MATH\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(asinh,scalar_asinh_op,inverse hyperbolic sine,\\sa ArrayBase::asinh)\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(acosh,scalar_acosh_op,inverse hyperbolic cosine,\\sa ArrayBase::acosh)\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(atanh,scalar_atanh_op,inverse hyperbolic tangent,\\sa ArrayBase::atanh)\n#endif\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(logistic,scalar_logistic_op,logistic function,\\sa ArrayBase::logistic)\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(lgamma,scalar_lgamma_op,natural logarithm of the gamma function,\\sa ArrayBase::lgamma)\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(digamma,scalar_digamma_op,derivative of lgamma,\\sa ArrayBase::digamma)\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(erf,scalar_erf_op,error function,\\sa ArrayBase::erf)\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(erfc,scalar_erfc_op,complement error function,\\sa ArrayBase::erfc)\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(ndtri,scalar_ndtri_op,inverse normal distribution function,\\sa ArrayBase::ndtri)\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(exp,scalar_exp_op,exponential,\\sa ArrayBase::exp)\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(expm1,scalar_expm1_op,exponential of a value minus 1,\\sa ArrayBase::expm1)\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(log,scalar_log_op,natural logarithm,\\sa Eigen::log10 DOXCOMMA ArrayBase::log)\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(log1p,scalar_log1p_op,natural logarithm of 1 plus the value,\\sa ArrayBase::log1p)\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(log10,scalar_log10_op,base 10 logarithm,\\sa Eigen::log DOXCOMMA ArrayBase::log)\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(abs,scalar_abs_op,absolute value,\\sa ArrayBase::abs DOXCOMMA MatrixBase::cwiseAbs)\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(abs2,scalar_abs2_op,squared absolute value,\\sa ArrayBase::abs2 DOXCOMMA MatrixBase::cwiseAbs2)\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(arg,scalar_arg_op,complex argument,\\sa ArrayBase::arg)\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(sqrt,scalar_sqrt_op,square root,\\sa ArrayBase::sqrt DOXCOMMA MatrixBase::cwiseSqrt)\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(rsqrt,scalar_rsqrt_op,reciprocal square root,\\sa ArrayBase::rsqrt)\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(square,scalar_square_op,square (power 2),\\sa Eigen::abs2 DOXCOMMA Eigen::pow DOXCOMMA ArrayBase::square)\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(cube,scalar_cube_op,cube (power 3),\\sa Eigen::pow DOXCOMMA ArrayBase::cube)\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(rint,scalar_rint_op,nearest integer,\\sa Eigen::floor DOXCOMMA Eigen::ceil DOXCOMMA ArrayBase::round)\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(round,scalar_round_op,nearest integer,\\sa Eigen::floor DOXCOMMA Eigen::ceil DOXCOMMA ArrayBase::round)\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(floor,scalar_floor_op,nearest integer not greater than the giben value,\\sa Eigen::ceil DOXCOMMA ArrayBase::floor)\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(ceil,scalar_ceil_op,nearest integer not less than the giben value,\\sa Eigen::floor DOXCOMMA ArrayBase::ceil)\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(isnan,scalar_isnan_op,not-a-number test,\\sa Eigen::isinf DOXCOMMA Eigen::isfinite DOXCOMMA ArrayBase::isnan)\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(isinf,scalar_isinf_op,infinite value test,\\sa Eigen::isnan DOXCOMMA Eigen::isfinite DOXCOMMA ArrayBase::isinf)\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(isfinite,scalar_isfinite_op,finite value test,\\sa Eigen::isinf DOXCOMMA Eigen::isnan DOXCOMMA ArrayBase::isfinite)\n  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(sign,scalar_sign_op,sign (or 0),\\sa ArrayBase::sign)\n\n  /** \\returns an expression of the coefficient-wise power of \\a x to the given constant \\a exponent.\n    *\n    * \\tparam ScalarExponent is the scalar type of \\a exponent. It must be compatible with the scalar type of the given expression (\\c Derived::Scalar).\n    *\n    * \\sa ArrayBase::pow()\n    *\n    * \\relates ArrayBase\n    */\n#ifdef EIGEN_PARSED_BY_DOXYGEN\n  template<typename Derived,typename ScalarExponent>\n  inline const CwiseBinaryOp<internal::scalar_pow_op<Derived::Scalar,ScalarExponent>,Derived,Constant<ScalarExponent> >\n  pow(const Eigen::ArrayBase<Derived>& x, const ScalarExponent& exponent);\n#else\n  template <typename Derived,typename ScalarExponent>\n  EIGEN_DEVICE_FUNC inline\n  EIGEN_MSVC10_WORKAROUND_BINARYOP_RETURN_TYPE(\n    const EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(Derived,typename internal::promote_scalar_arg<typename Derived::Scalar\n                                                 EIGEN_COMMA ScalarExponent EIGEN_COMMA\n                                                 EIGEN_SCALAR_BINARY_SUPPORTED(pow,typename Derived::Scalar,ScalarExponent)>::type,pow))\n  pow(const Eigen::ArrayBase<Derived>& x, const ScalarExponent& exponent)\n  {\n    typedef typename internal::promote_scalar_arg<typename Derived::Scalar,ScalarExponent,\n                                                  EIGEN_SCALAR_BINARY_SUPPORTED(pow,typename Derived::Scalar,ScalarExponent)>::type PromotedExponent;\n    return EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(Derived,PromotedExponent,pow)(x.derived(),\n           typename internal::plain_constant_type<Derived,PromotedExponent>::type(x.derived().rows(), x.derived().cols(), internal::scalar_constant_op<PromotedExponent>(exponent)));\n  }\n#endif\n\n  /** \\returns an expression of the coefficient-wise power of \\a x to the given array of \\a exponents.\n    *\n    * This function computes the coefficient-wise power.\n    *\n    * Example: \\include Cwise_array_power_array.cpp\n    * Output: \\verbinclude Cwise_array_power_array.out\n    *\n    * \\sa ArrayBase::pow()\n    *\n    * \\relates ArrayBase\n    */\n  template<typename Derived,typename ExponentDerived>\n  inline const Eigen::CwiseBinaryOp<Eigen::internal::scalar_pow_op<typename Derived::Scalar, typename ExponentDerived::Scalar>, const Derived, const ExponentDerived>\n  pow(const Eigen::ArrayBase<Derived>& x, const Eigen::ArrayBase<ExponentDerived>& exponents)\n  {\n    return Eigen::CwiseBinaryOp<Eigen::internal::scalar_pow_op<typename Derived::Scalar, typename ExponentDerived::Scalar>, const Derived, const ExponentDerived>(\n      x.derived(),\n      exponents.derived()\n    );\n  }\n\n  /** \\returns an expression of the coefficient-wise power of the scalar \\a x to the given array of \\a exponents.\n    *\n    * This function computes the coefficient-wise power between a scalar and an array of exponents.\n    *\n    * \\tparam Scalar is the scalar type of \\a x. It must be compatible with the scalar type of the given array expression (\\c Derived::Scalar).\n    *\n    * Example: \\include Cwise_scalar_power_array.cpp\n    * Output: \\verbinclude Cwise_scalar_power_array.out\n    *\n    * \\sa ArrayBase::pow()\n    *\n    * \\relates ArrayBase\n    */\n#ifdef EIGEN_PARSED_BY_DOXYGEN\n  template<typename Scalar,typename Derived>\n  inline const CwiseBinaryOp<internal::scalar_pow_op<Scalar,Derived::Scalar>,Constant<Scalar>,Derived>\n  pow(const Scalar& x,const Eigen::ArrayBase<Derived>& x);\n#else\n  template <typename Scalar, typename Derived>\n  EIGEN_DEVICE_FUNC inline\n  EIGEN_MSVC10_WORKAROUND_BINARYOP_RETURN_TYPE(\n    const EIGEN_SCALAR_BINARYOP_EXPR_RETURN_TYPE(typename internal::promote_scalar_arg<typename Derived::Scalar\n                                                 EIGEN_COMMA Scalar EIGEN_COMMA\n                                                 EIGEN_SCALAR_BINARY_SUPPORTED(pow,Scalar,typename Derived::Scalar)>::type,Derived,pow))\n  pow(const Scalar& x, const Eigen::ArrayBase<Derived>& exponents) {\n    typedef typename internal::promote_scalar_arg<typename Derived::Scalar,Scalar,\n                                                  EIGEN_SCALAR_BINARY_SUPPORTED(pow,Scalar,typename Derived::Scalar)>::type PromotedScalar;\n    return EIGEN_SCALAR_BINARYOP_EXPR_RETURN_TYPE(PromotedScalar,Derived,pow)(\n           typename internal::plain_constant_type<Derived,PromotedScalar>::type(exponents.derived().rows(), exponents.derived().cols(), internal::scalar_constant_op<PromotedScalar>(x)), exponents.derived());\n  }\n#endif\n\n\n  namespace internal\n  {\n    EIGEN_ARRAY_DECLARE_GLOBAL_EIGEN_UNARY(real,scalar_real_op)\n    EIGEN_ARRAY_DECLARE_GLOBAL_EIGEN_UNARY(imag,scalar_imag_op)\n    EIGEN_ARRAY_DECLARE_GLOBAL_EIGEN_UNARY(abs2,scalar_abs2_op)\n  }\n}\n\n// TODO: cleanly disable those functions that are not supported on Array (numext::real_ref, internal::random, internal::isApprox...)\n\n#endif // EIGEN_GLOBAL_FUNCTIONS_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/IO.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_IO_H\n#define EIGEN_IO_H\n\nnamespace Eigen { \n\nenum { DontAlignCols = 1 };\nenum { StreamPrecision = -1,\n       FullPrecision = -2 };\n\nnamespace internal {\ntemplate<typename Derived>\nstd::ostream & print_matrix(std::ostream & s, const Derived& _m, const IOFormat& fmt);\n}\n\n/** \\class IOFormat\n  * \\ingroup Core_Module\n  *\n  * \\brief Stores a set of parameters controlling the way matrices are printed\n  *\n  * List of available parameters:\n  *  - \\b precision number of digits for floating point values, or one of the special constants \\c StreamPrecision and \\c FullPrecision.\n  *                 The default is the special value \\c StreamPrecision which means to use the\n  *                 stream's own precision setting, as set for instance using \\c cout.precision(3). The other special value\n  *                 \\c FullPrecision means that the number of digits will be computed to match the full precision of each floating-point\n  *                 type.\n  *  - \\b flags an OR-ed combination of flags, the default value is 0, the only currently available flag is \\c DontAlignCols which\n  *             allows to disable the alignment of columns, resulting in faster code.\n  *  - \\b coeffSeparator string printed between two coefficients of the same row\n  *  - \\b rowSeparator string printed between two rows\n  *  - \\b rowPrefix string printed at the beginning of each row\n  *  - \\b rowSuffix string printed at the end of each row\n  *  - \\b matPrefix string printed at the beginning of the matrix\n  *  - \\b matSuffix string printed at the end of the matrix\n  *  - \\b fill character printed to fill the empty space in aligned columns\n  *\n  * Example: \\include IOFormat.cpp\n  * Output: \\verbinclude IOFormat.out\n  *\n  * \\sa DenseBase::format(), class WithFormat\n  */\nstruct IOFormat\n{\n  /** Default constructor, see class IOFormat for the meaning of the parameters */\n  IOFormat(int _precision = StreamPrecision, int _flags = 0,\n    const std::string& _coeffSeparator = \" \",\n    const std::string& _rowSeparator = \"\\n\", const std::string& _rowPrefix=\"\", const std::string& _rowSuffix=\"\",\n    const std::string& _matPrefix=\"\", const std::string& _matSuffix=\"\", const char _fill=' ')\n  : matPrefix(_matPrefix), matSuffix(_matSuffix), rowPrefix(_rowPrefix), rowSuffix(_rowSuffix), rowSeparator(_rowSeparator),\n    rowSpacer(\"\"), coeffSeparator(_coeffSeparator), fill(_fill), precision(_precision), flags(_flags)\n  {\n    // TODO check if rowPrefix, rowSuffix or rowSeparator contains a newline\n    // don't add rowSpacer if columns are not to be aligned\n    if((flags & DontAlignCols))\n      return;\n    int i = int(matSuffix.length())-1;\n    while (i>=0 && matSuffix[i]!='\\n')\n    {\n      rowSpacer += ' ';\n      i--;\n    }\n  }\n  std::string matPrefix, matSuffix;\n  std::string rowPrefix, rowSuffix, rowSeparator, rowSpacer;\n  std::string coeffSeparator;\n  char fill;\n  int precision;\n  int flags;\n};\n\n/** \\class WithFormat\n  * \\ingroup Core_Module\n  *\n  * \\brief Pseudo expression providing matrix output with given format\n  *\n  * \\tparam ExpressionType the type of the object on which IO stream operations are performed\n  *\n  * This class represents an expression with stream operators controlled by a given IOFormat.\n  * It is the return type of DenseBase::format()\n  * and most of the time this is the only way it is used.\n  *\n  * See class IOFormat for some examples.\n  *\n  * \\sa DenseBase::format(), class IOFormat\n  */\ntemplate<typename ExpressionType>\nclass WithFormat\n{\n  public:\n\n    WithFormat(const ExpressionType& matrix, const IOFormat& format)\n      : m_matrix(matrix), m_format(format)\n    {}\n\n    friend std::ostream & operator << (std::ostream & s, const WithFormat& wf)\n    {\n      return internal::print_matrix(s, wf.m_matrix.eval(), wf.m_format);\n    }\n\n  protected:\n    typename ExpressionType::Nested m_matrix;\n    IOFormat m_format;\n};\n\nnamespace internal {\n\n// NOTE: This helper is kept for backward compatibility with previous code specializing\n//       this internal::significant_decimals_impl structure. In the future we should directly\n//       call digits10() which has been introduced in July 2016 in 3.3.\ntemplate<typename Scalar>\nstruct significant_decimals_impl\n{\n  static inline int run()\n  {\n    return NumTraits<Scalar>::digits10();\n  }\n};\n\n/** \\internal\n  * print the matrix \\a _m to the output stream \\a s using the output format \\a fmt */\ntemplate<typename Derived>\nstd::ostream & print_matrix(std::ostream & s, const Derived& _m, const IOFormat& fmt)\n{\n  using internal::is_same;\n  using internal::conditional;\n\n  if(_m.size() == 0)\n  {\n    s << fmt.matPrefix << fmt.matSuffix;\n    return s;\n  }\n  \n  typename Derived::Nested m = _m;\n  typedef typename Derived::Scalar Scalar;\n  typedef typename\n      conditional<\n          is_same<Scalar, char>::value ||\n            is_same<Scalar, unsigned char>::value ||\n            is_same<Scalar, numext::int8_t>::value ||\n            is_same<Scalar, numext::uint8_t>::value,\n          int,\n          typename conditional<\n              is_same<Scalar, std::complex<char> >::value ||\n                is_same<Scalar, std::complex<unsigned char> >::value ||\n                is_same<Scalar, std::complex<numext::int8_t> >::value ||\n                is_same<Scalar, std::complex<numext::uint8_t> >::value,\n              std::complex<int>,\n              const Scalar&\n            >::type\n        >::type PrintType;\n\n  Index width = 0;\n\n  std::streamsize explicit_precision;\n  if(fmt.precision == StreamPrecision)\n  {\n    explicit_precision = 0;\n  }\n  else if(fmt.precision == FullPrecision)\n  {\n    if (NumTraits<Scalar>::IsInteger)\n    {\n      explicit_precision = 0;\n    }\n    else\n    {\n      explicit_precision = significant_decimals_impl<Scalar>::run();\n    }\n  }\n  else\n  {\n    explicit_precision = fmt.precision;\n  }\n\n  std::streamsize old_precision = 0;\n  if(explicit_precision) old_precision = s.precision(explicit_precision);\n\n  bool align_cols = !(fmt.flags & DontAlignCols);\n  if(align_cols)\n  {\n    // compute the largest width\n    for(Index j = 0; j < m.cols(); ++j)\n      for(Index i = 0; i < m.rows(); ++i)\n      {\n        std::stringstream sstr;\n        sstr.copyfmt(s);\n        sstr << static_cast<PrintType>(m.coeff(i,j));\n        width = std::max<Index>(width, Index(sstr.str().length()));\n      }\n  }\n  std::streamsize old_width = s.width();\n  char old_fill_character = s.fill();\n  s << fmt.matPrefix;\n  for(Index i = 0; i < m.rows(); ++i)\n  {\n    if (i)\n      s << fmt.rowSpacer;\n    s << fmt.rowPrefix;\n    if(width) {\n      s.fill(fmt.fill);\n      s.width(width);\n    }\n    s << static_cast<PrintType>(m.coeff(i, 0));\n    for(Index j = 1; j < m.cols(); ++j)\n    {\n      s << fmt.coeffSeparator;\n      if(width) {\n        s.fill(fmt.fill);\n        s.width(width);\n      }\n      s << static_cast<PrintType>(m.coeff(i, j));\n    }\n    s << fmt.rowSuffix;\n    if( i < m.rows() - 1)\n      s << fmt.rowSeparator;\n  }\n  s << fmt.matSuffix;\n  if(explicit_precision) s.precision(old_precision);\n  if(width) {\n    s.fill(old_fill_character);\n    s.width(old_width);\n  }\n  return s;\n}\n\n} // end namespace internal\n\n/** \\relates DenseBase\n  *\n  * Outputs the matrix, to the given stream.\n  *\n  * If you wish to print the matrix with a format different than the default, use DenseBase::format().\n  *\n  * It is also possible to change the default format by defining EIGEN_DEFAULT_IO_FORMAT before including Eigen headers.\n  * If not defined, this will automatically be defined to Eigen::IOFormat(), that is the Eigen::IOFormat with default parameters.\n  *\n  * \\sa DenseBase::format()\n  */\ntemplate<typename Derived>\nstd::ostream & operator <<\n(std::ostream & s,\n const DenseBase<Derived> & m)\n{\n  return internal::print_matrix(s, m.eval(), EIGEN_DEFAULT_IO_FORMAT);\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_IO_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/IndexedView.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2017 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_INDEXED_VIEW_H\n#define EIGEN_INDEXED_VIEW_H\n\nnamespace Eigen {\n\nnamespace internal {\n\ntemplate<typename XprType, typename RowIndices, typename ColIndices>\nstruct traits<IndexedView<XprType, RowIndices, ColIndices> >\n : traits<XprType>\n{\n  enum {\n    RowsAtCompileTime = int(array_size<RowIndices>::value),\n    ColsAtCompileTime = int(array_size<ColIndices>::value),\n    MaxRowsAtCompileTime = RowsAtCompileTime != Dynamic ? int(RowsAtCompileTime) : Dynamic,\n    MaxColsAtCompileTime = ColsAtCompileTime != Dynamic ? int(ColsAtCompileTime) : Dynamic,\n\n    XprTypeIsRowMajor = (int(traits<XprType>::Flags)&RowMajorBit) != 0,\n    IsRowMajor = (MaxRowsAtCompileTime==1&&MaxColsAtCompileTime!=1) ? 1\n               : (MaxColsAtCompileTime==1&&MaxRowsAtCompileTime!=1) ? 0\n               : XprTypeIsRowMajor,\n\n    RowIncr = int(get_compile_time_incr<RowIndices>::value),\n    ColIncr = int(get_compile_time_incr<ColIndices>::value),\n    InnerIncr = IsRowMajor ? ColIncr : RowIncr,\n    OuterIncr = IsRowMajor ? RowIncr : ColIncr,\n\n    HasSameStorageOrderAsXprType = (IsRowMajor == XprTypeIsRowMajor),\n    XprInnerStride = HasSameStorageOrderAsXprType ? int(inner_stride_at_compile_time<XprType>::ret) : int(outer_stride_at_compile_time<XprType>::ret),\n    XprOuterstride = HasSameStorageOrderAsXprType ? int(outer_stride_at_compile_time<XprType>::ret) : int(inner_stride_at_compile_time<XprType>::ret),\n\n    InnerSize = XprTypeIsRowMajor ? ColsAtCompileTime : RowsAtCompileTime,\n    IsBlockAlike = InnerIncr==1 && OuterIncr==1,\n    IsInnerPannel = HasSameStorageOrderAsXprType && is_same<AllRange<InnerSize>,typename conditional<XprTypeIsRowMajor,ColIndices,RowIndices>::type>::value,\n\n    InnerStrideAtCompileTime = InnerIncr<0 || InnerIncr==DynamicIndex || XprInnerStride==Dynamic ? Dynamic : XprInnerStride * InnerIncr,\n    OuterStrideAtCompileTime = OuterIncr<0 || OuterIncr==DynamicIndex || XprOuterstride==Dynamic ? Dynamic : XprOuterstride * OuterIncr,\n\n    ReturnAsScalar = is_same<RowIndices,SingleRange>::value && is_same<ColIndices,SingleRange>::value,\n    ReturnAsBlock = (!ReturnAsScalar) && IsBlockAlike,\n    ReturnAsIndexedView = (!ReturnAsScalar) && (!ReturnAsBlock),\n\n    // FIXME we deal with compile-time strides if and only if we have DirectAccessBit flag,\n    // but this is too strict regarding negative strides...\n    DirectAccessMask = (int(InnerIncr)!=UndefinedIncr && int(OuterIncr)!=UndefinedIncr && InnerIncr>=0 && OuterIncr>=0) ? DirectAccessBit : 0,\n    FlagsRowMajorBit = IsRowMajor ? RowMajorBit : 0,\n    FlagsLvalueBit = is_lvalue<XprType>::value ? LvalueBit : 0,\n    Flags = (traits<XprType>::Flags & (HereditaryBits | DirectAccessMask)) | FlagsLvalueBit | FlagsRowMajorBit\n  };\n\n  typedef Block<XprType,RowsAtCompileTime,ColsAtCompileTime,IsInnerPannel> BlockType;\n};\n\n}\n\ntemplate<typename XprType, typename RowIndices, typename ColIndices, typename StorageKind>\nclass IndexedViewImpl;\n\n\n/** \\class IndexedView\n  * \\ingroup Core_Module\n  *\n  * \\brief Expression of a non-sequential sub-matrix defined by arbitrary sequences of row and column indices\n  *\n  * \\tparam XprType the type of the expression in which we are taking the intersections of sub-rows and sub-columns\n  * \\tparam RowIndices the type of the object defining the sequence of row indices\n  * \\tparam ColIndices the type of the object defining the sequence of column indices\n  *\n  * This class represents an expression of a sub-matrix (or sub-vector) defined as the intersection\n  * of sub-sets of rows and columns, that are themself defined by generic sequences of row indices \\f$ \\{r_0,r_1,..r_{m-1}\\} \\f$\n  * and column indices \\f$ \\{c_0,c_1,..c_{n-1} \\}\\f$. Let \\f$ A \\f$  be the nested matrix, then the resulting matrix \\f$ B \\f$ has \\c m\n  * rows and \\c n columns, and its entries are given by: \\f$ B(i,j) = A(r_i,c_j) \\f$.\n  *\n  * The \\c RowIndices and \\c ColIndices types must be compatible with the following API:\n  * \\code\n  * <integral type> operator[](Index) const;\n  * Index size() const;\n  * \\endcode\n  *\n  * Typical supported types thus include:\n  *  - std::vector<int>\n  *  - std::valarray<int>\n  *  - std::array<int>\n  *  - Plain C arrays: int[N]\n  *  - Eigen::ArrayXi\n  *  - decltype(ArrayXi::LinSpaced(...))\n  *  - Any view/expressions of the previous types\n  *  - Eigen::ArithmeticSequence\n  *  - Eigen::internal::AllRange      (helper for Eigen::all)\n  *  - Eigen::internal::SingleRange  (helper for single index)\n  *  - etc.\n  *\n  * In typical usages of %Eigen, this class should never be used directly. It is the return type of\n  * DenseBase::operator()(const RowIndices&, const ColIndices&).\n  *\n  * \\sa class Block\n  */\ntemplate<typename XprType, typename RowIndices, typename ColIndices>\nclass IndexedView : public IndexedViewImpl<XprType, RowIndices, ColIndices, typename internal::traits<XprType>::StorageKind>\n{\npublic:\n  typedef typename IndexedViewImpl<XprType, RowIndices, ColIndices, typename internal::traits<XprType>::StorageKind>::Base Base;\n  EIGEN_GENERIC_PUBLIC_INTERFACE(IndexedView)\n  EIGEN_INHERIT_ASSIGNMENT_OPERATORS(IndexedView)\n\n  typedef typename internal::ref_selector<XprType>::non_const_type MatrixTypeNested;\n  typedef typename internal::remove_all<XprType>::type NestedExpression;\n\n  template<typename T0, typename T1>\n  IndexedView(XprType& xpr, const T0& rowIndices, const T1& colIndices)\n    : m_xpr(xpr), m_rowIndices(rowIndices), m_colIndices(colIndices)\n  {}\n\n  /** \\returns number of rows */\n  Index rows() const { return internal::size(m_rowIndices); }\n\n  /** \\returns number of columns */\n  Index cols() const { return internal::size(m_colIndices); }\n\n  /** \\returns the nested expression */\n  const typename internal::remove_all<XprType>::type&\n  nestedExpression() const { return m_xpr; }\n\n  /** \\returns the nested expression */\n  typename internal::remove_reference<XprType>::type&\n  nestedExpression() { return m_xpr; }\n\n  /** \\returns a const reference to the object storing/generating the row indices */\n  const RowIndices& rowIndices() const { return m_rowIndices; }\n\n  /** \\returns a const reference to the object storing/generating the column indices */\n  const ColIndices& colIndices() const { return m_colIndices; }\n\nprotected:\n  MatrixTypeNested m_xpr;\n  RowIndices m_rowIndices;\n  ColIndices m_colIndices;\n};\n\n\n// Generic API dispatcher\ntemplate<typename XprType, typename RowIndices, typename ColIndices, typename StorageKind>\nclass IndexedViewImpl\n  : public internal::generic_xpr_base<IndexedView<XprType, RowIndices, ColIndices> >::type\n{\npublic:\n  typedef typename internal::generic_xpr_base<IndexedView<XprType, RowIndices, ColIndices> >::type Base;\n};\n\nnamespace internal {\n\n\ntemplate<typename ArgType, typename RowIndices, typename ColIndices>\nstruct unary_evaluator<IndexedView<ArgType, RowIndices, ColIndices>, IndexBased>\n  : evaluator_base<IndexedView<ArgType, RowIndices, ColIndices> >\n{\n  typedef IndexedView<ArgType, RowIndices, ColIndices> XprType;\n\n  enum {\n    CoeffReadCost = evaluator<ArgType>::CoeffReadCost /* TODO + cost of row/col index */,\n\n    Flags = (evaluator<ArgType>::Flags & (HereditaryBits /*| LinearAccessBit | DirectAccessBit*/)),\n\n    Alignment = 0\n  };\n\n  EIGEN_DEVICE_FUNC explicit unary_evaluator(const XprType& xpr) : m_argImpl(xpr.nestedExpression()), m_xpr(xpr)\n  {\n    EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);\n  }\n\n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  CoeffReturnType coeff(Index row, Index col) const\n  {\n    return m_argImpl.coeff(m_xpr.rowIndices()[row], m_xpr.colIndices()[col]);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  Scalar& coeffRef(Index row, Index col)\n  {\n    return m_argImpl.coeffRef(m_xpr.rowIndices()[row], m_xpr.colIndices()[col]);\n  }\n\nprotected:\n\n  evaluator<ArgType> m_argImpl;\n  const XprType& m_xpr;\n\n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_INDEXED_VIEW_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/Inverse.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014-2019 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_INVERSE_H\n#define EIGEN_INVERSE_H\n\nnamespace Eigen { \n\ntemplate<typename XprType,typename StorageKind> class InverseImpl;\n\nnamespace internal {\n\ntemplate<typename XprType>\nstruct traits<Inverse<XprType> >\n  : traits<typename XprType::PlainObject>\n{\n  typedef typename XprType::PlainObject PlainObject;\n  typedef traits<PlainObject> BaseTraits;\n  enum {\n    Flags = BaseTraits::Flags & RowMajorBit\n  };\n};\n\n} // end namespace internal\n\n/** \\class Inverse\n  *\n  * \\brief Expression of the inverse of another expression\n  *\n  * \\tparam XprType the type of the expression we are taking the inverse\n  *\n  * This class represents an abstract expression of A.inverse()\n  * and most of the time this is the only way it is used.\n  *\n  */\ntemplate<typename XprType>\nclass Inverse : public InverseImpl<XprType,typename internal::traits<XprType>::StorageKind>\n{\npublic:\n  typedef typename XprType::StorageIndex StorageIndex;\n  typedef typename XprType::Scalar                            Scalar;\n  typedef typename internal::ref_selector<XprType>::type      XprTypeNested;\n  typedef typename internal::remove_all<XprTypeNested>::type  XprTypeNestedCleaned;\n  typedef typename internal::ref_selector<Inverse>::type Nested;\n  typedef typename internal::remove_all<XprType>::type NestedExpression;\n  \n  explicit EIGEN_DEVICE_FUNC Inverse(const XprType &xpr)\n    : m_xpr(xpr)\n  {}\n\n  EIGEN_DEVICE_FUNC Index rows() const { return m_xpr.cols(); }\n  EIGEN_DEVICE_FUNC Index cols() const { return m_xpr.rows(); }\n\n  EIGEN_DEVICE_FUNC const XprTypeNestedCleaned& nestedExpression() const { return m_xpr; }\n\nprotected:\n  XprTypeNested m_xpr;\n};\n\n// Generic API dispatcher\ntemplate<typename XprType, typename StorageKind>\nclass InverseImpl\n  : public internal::generic_xpr_base<Inverse<XprType> >::type\n{\npublic:\n  typedef typename internal::generic_xpr_base<Inverse<XprType> >::type Base;\n  typedef typename XprType::Scalar Scalar;\nprivate:\n\n  Scalar coeff(Index row, Index col) const;\n  Scalar coeff(Index i) const;\n};\n\nnamespace internal {\n\n/** \\internal\n  * \\brief Default evaluator for Inverse expression.\n  * \n  * This default evaluator for Inverse expression simply evaluate the inverse into a temporary\n  * by a call to internal::call_assignment_no_alias.\n  * Therefore, inverse implementers only have to specialize Assignment<Dst,Inverse<...>, ...> for\n  * there own nested expression.\n  *\n  * \\sa class Inverse\n  */\ntemplate<typename ArgType>\nstruct unary_evaluator<Inverse<ArgType> >\n  : public evaluator<typename Inverse<ArgType>::PlainObject>\n{\n  typedef Inverse<ArgType> InverseType;\n  typedef typename InverseType::PlainObject PlainObject;\n  typedef evaluator<PlainObject> Base;\n  \n  enum { Flags = Base::Flags | EvalBeforeNestingBit };\n\n  unary_evaluator(const InverseType& inv_xpr)\n    : m_result(inv_xpr.rows(), inv_xpr.cols())\n  {\n    ::new (static_cast<Base*>(this)) Base(m_result);\n    internal::call_assignment_no_alias(m_result, inv_xpr);\n  }\n  \nprotected:\n  PlainObject m_result;\n};\n  \n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_INVERSE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/Map.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2007-2010 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_MAP_H\n#define EIGEN_MAP_H\n\nnamespace Eigen { \n\nnamespace internal {\ntemplate<typename PlainObjectType, int MapOptions, typename StrideType>\nstruct traits<Map<PlainObjectType, MapOptions, StrideType> >\n  : public traits<PlainObjectType>\n{\n  typedef traits<PlainObjectType> TraitsBase;\n  enum {\n    PlainObjectTypeInnerSize = ((traits<PlainObjectType>::Flags&RowMajorBit)==RowMajorBit)\n                             ? PlainObjectType::ColsAtCompileTime\n                             : PlainObjectType::RowsAtCompileTime,\n\n    InnerStrideAtCompileTime = StrideType::InnerStrideAtCompileTime == 0\n                             ? int(PlainObjectType::InnerStrideAtCompileTime)\n                             : int(StrideType::InnerStrideAtCompileTime),\n    OuterStrideAtCompileTime = StrideType::OuterStrideAtCompileTime == 0\n                             ? (InnerStrideAtCompileTime==Dynamic || PlainObjectTypeInnerSize==Dynamic\n                                ? Dynamic\n                                : int(InnerStrideAtCompileTime) * int(PlainObjectTypeInnerSize))\n                             : int(StrideType::OuterStrideAtCompileTime),\n    Alignment = int(MapOptions)&int(AlignedMask),\n    Flags0 = TraitsBase::Flags & (~NestByRefBit),\n    Flags = is_lvalue<PlainObjectType>::value ? int(Flags0) : (int(Flags0) & ~LvalueBit)\n  };\nprivate:\n  enum { Options }; // Expressions don't have Options\n};\n}\n\n/** \\class Map\n  * \\ingroup Core_Module\n  *\n  * \\brief A matrix or vector expression mapping an existing array of data.\n  *\n  * \\tparam PlainObjectType the equivalent matrix type of the mapped data\n  * \\tparam MapOptions specifies the pointer alignment in bytes. It can be: \\c #Aligned128, , \\c #Aligned64, \\c #Aligned32, \\c #Aligned16, \\c #Aligned8 or \\c #Unaligned.\n  *                The default is \\c #Unaligned.\n  * \\tparam StrideType optionally specifies strides. By default, Map assumes the memory layout\n  *                   of an ordinary, contiguous array. This can be overridden by specifying strides.\n  *                   The type passed here must be a specialization of the Stride template, see examples below.\n  *\n  * This class represents a matrix or vector expression mapping an existing array of data.\n  * It can be used to let Eigen interface without any overhead with non-Eigen data structures,\n  * such as plain C arrays or structures from other libraries. By default, it assumes that the\n  * data is laid out contiguously in memory. You can however override this by explicitly specifying\n  * inner and outer strides.\n  *\n  * Here's an example of simply mapping a contiguous array as a \\ref TopicStorageOrders \"column-major\" matrix:\n  * \\include Map_simple.cpp\n  * Output: \\verbinclude Map_simple.out\n  *\n  * If you need to map non-contiguous arrays, you can do so by specifying strides:\n  *\n  * Here's an example of mapping an array as a vector, specifying an inner stride, that is, the pointer\n  * increment between two consecutive coefficients. Here, we're specifying the inner stride as a compile-time\n  * fixed value.\n  * \\include Map_inner_stride.cpp\n  * Output: \\verbinclude Map_inner_stride.out\n  *\n  * Here's an example of mapping an array while specifying an outer stride. Here, since we're mapping\n  * as a column-major matrix, 'outer stride' means the pointer increment between two consecutive columns.\n  * Here, we're specifying the outer stride as a runtime parameter. Note that here \\c OuterStride<> is\n  * a short version of \\c OuterStride<Dynamic> because the default template parameter of OuterStride\n  * is  \\c Dynamic\n  * \\include Map_outer_stride.cpp\n  * Output: \\verbinclude Map_outer_stride.out\n  *\n  * For more details and for an example of specifying both an inner and an outer stride, see class Stride.\n  *\n  * \\b Tip: to change the array of data mapped by a Map object, you can use the C++\n  * placement new syntax:\n  *\n  * Example: \\include Map_placement_new.cpp\n  * Output: \\verbinclude Map_placement_new.out\n  *\n  * This class is the return type of PlainObjectBase::Map() but can also be used directly.\n  *\n  * \\sa PlainObjectBase::Map(), \\ref TopicStorageOrders\n  */\ntemplate<typename PlainObjectType, int MapOptions, typename StrideType> class Map\n  : public MapBase<Map<PlainObjectType, MapOptions, StrideType> >\n{\n  public:\n\n    typedef MapBase<Map> Base;\n    EIGEN_DENSE_PUBLIC_INTERFACE(Map)\n\n    typedef typename Base::PointerType PointerType;\n    typedef PointerType PointerArgType;\n    EIGEN_DEVICE_FUNC\n    inline PointerType cast_to_pointer_type(PointerArgType ptr) { return ptr; }\n\n    EIGEN_DEVICE_FUNC\n    inline Index innerStride() const\n    {\n      return StrideType::InnerStrideAtCompileTime != 0 ? m_stride.inner() : 1;\n    }\n\n    EIGEN_DEVICE_FUNC\n    inline Index outerStride() const\n    {\n      return StrideType::OuterStrideAtCompileTime != 0 ? m_stride.outer()\n           : internal::traits<Map>::OuterStrideAtCompileTime != Dynamic ? Index(internal::traits<Map>::OuterStrideAtCompileTime)\n           : IsVectorAtCompileTime ? (this->size() * innerStride())\n           : int(Flags)&RowMajorBit ? (this->cols() * innerStride())\n           : (this->rows() * innerStride());\n    }\n\n    /** Constructor in the fixed-size case.\n      *\n      * \\param dataPtr pointer to the array to map\n      * \\param stride optional Stride object, passing the strides.\n      */\n    EIGEN_DEVICE_FUNC\n    explicit inline Map(PointerArgType dataPtr, const StrideType& stride = StrideType())\n      : Base(cast_to_pointer_type(dataPtr)), m_stride(stride)\n    {\n      PlainObjectType::Base::_check_template_params();\n    }\n\n    /** Constructor in the dynamic-size vector case.\n      *\n      * \\param dataPtr pointer to the array to map\n      * \\param size the size of the vector expression\n      * \\param stride optional Stride object, passing the strides.\n      */\n    EIGEN_DEVICE_FUNC\n    inline Map(PointerArgType dataPtr, Index size, const StrideType& stride = StrideType())\n      : Base(cast_to_pointer_type(dataPtr), size), m_stride(stride)\n    {\n      PlainObjectType::Base::_check_template_params();\n    }\n\n    /** Constructor in the dynamic-size matrix case.\n      *\n      * \\param dataPtr pointer to the array to map\n      * \\param rows the number of rows of the matrix expression\n      * \\param cols the number of columns of the matrix expression\n      * \\param stride optional Stride object, passing the strides.\n      */\n    EIGEN_DEVICE_FUNC\n    inline Map(PointerArgType dataPtr, Index rows, Index cols, const StrideType& stride = StrideType())\n      : Base(cast_to_pointer_type(dataPtr), rows, cols), m_stride(stride)\n    {\n      PlainObjectType::Base::_check_template_params();\n    }\n\n    EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Map)\n\n  protected:\n    StrideType m_stride;\n};\n\n\n} // end namespace Eigen\n\n#endif // EIGEN_MAP_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/MapBase.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2007-2010 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_MAPBASE_H\n#define EIGEN_MAPBASE_H\n\n#define EIGEN_STATIC_ASSERT_INDEX_BASED_ACCESS(Derived) \\\n      EIGEN_STATIC_ASSERT((int(internal::evaluator<Derived>::Flags) & LinearAccessBit) || Derived::IsVectorAtCompileTime, \\\n                          YOU_ARE_TRYING_TO_USE_AN_INDEX_BASED_ACCESSOR_ON_AN_EXPRESSION_THAT_DOES_NOT_SUPPORT_THAT)\n\nnamespace Eigen { \n\n/** \\ingroup Core_Module\n  *\n  * \\brief Base class for dense Map and Block expression with direct access\n  *\n  * This base class provides the const low-level accessors (e.g. coeff, coeffRef) of dense\n  * Map and Block objects with direct access.\n  * Typical users do not have to directly deal with this class.\n  *\n  * This class can be extended by through the macro plugin \\c EIGEN_MAPBASE_PLUGIN.\n  * See \\link TopicCustomizing_Plugins customizing Eigen \\endlink for details.\n  *\n  * The \\c Derived class has to provide the following two methods describing the memory layout:\n  *  \\code Index innerStride() const; \\endcode\n  *  \\code Index outerStride() const; \\endcode\n  *\n  * \\sa class Map, class Block\n  */\ntemplate<typename Derived> class MapBase<Derived, ReadOnlyAccessors>\n  : public internal::dense_xpr_base<Derived>::type\n{\n  public:\n\n    typedef typename internal::dense_xpr_base<Derived>::type Base;\n    enum {\n      RowsAtCompileTime = internal::traits<Derived>::RowsAtCompileTime,\n      ColsAtCompileTime = internal::traits<Derived>::ColsAtCompileTime,\n      InnerStrideAtCompileTime = internal::traits<Derived>::InnerStrideAtCompileTime,\n      SizeAtCompileTime = Base::SizeAtCompileTime\n    };\n\n    typedef typename internal::traits<Derived>::StorageKind StorageKind;\n    typedef typename internal::traits<Derived>::Scalar Scalar;\n    typedef typename internal::packet_traits<Scalar>::type PacketScalar;\n    typedef typename NumTraits<Scalar>::Real RealScalar;\n    typedef typename internal::conditional<\n                         bool(internal::is_lvalue<Derived>::value),\n                         Scalar *,\n                         const Scalar *>::type\n                     PointerType;\n\n    using Base::derived;\n//    using Base::RowsAtCompileTime;\n//    using Base::ColsAtCompileTime;\n//    using Base::SizeAtCompileTime;\n    using Base::MaxRowsAtCompileTime;\n    using Base::MaxColsAtCompileTime;\n    using Base::MaxSizeAtCompileTime;\n    using Base::IsVectorAtCompileTime;\n    using Base::Flags;\n    using Base::IsRowMajor;\n\n    using Base::rows;\n    using Base::cols;\n    using Base::size;\n    using Base::coeff;\n    using Base::coeffRef;\n    using Base::lazyAssign;\n    using Base::eval;\n\n    using Base::innerStride;\n    using Base::outerStride;\n    using Base::rowStride;\n    using Base::colStride;\n\n    // bug 217 - compile error on ICC 11.1\n    using Base::operator=;\n\n    typedef typename Base::CoeffReturnType CoeffReturnType;\n\n    /** \\copydoc DenseBase::rows() */\n    EIGEN_DEVICE_FUNC inline Index rows() const { return m_rows.value(); }\n    /** \\copydoc DenseBase::cols() */\n    EIGEN_DEVICE_FUNC inline Index cols() const { return m_cols.value(); }\n\n    /** Returns a pointer to the first coefficient of the matrix or vector.\n      *\n      * \\note When addressing this data, make sure to honor the strides returned by innerStride() and outerStride().\n      *\n      * \\sa innerStride(), outerStride()\n      */\n    EIGEN_DEVICE_FUNC inline const Scalar* data() const { return m_data; }\n\n    /** \\copydoc PlainObjectBase::coeff(Index,Index) const */\n    EIGEN_DEVICE_FUNC\n    inline const Scalar& coeff(Index rowId, Index colId) const\n    {\n      return m_data[colId * colStride() + rowId * rowStride()];\n    }\n\n    /** \\copydoc PlainObjectBase::coeff(Index) const */\n    EIGEN_DEVICE_FUNC\n    inline const Scalar& coeff(Index index) const\n    {\n      EIGEN_STATIC_ASSERT_INDEX_BASED_ACCESS(Derived)\n      return m_data[index * innerStride()];\n    }\n\n    /** \\copydoc PlainObjectBase::coeffRef(Index,Index) const */\n    EIGEN_DEVICE_FUNC\n    inline const Scalar& coeffRef(Index rowId, Index colId) const\n    {\n      return this->m_data[colId * colStride() + rowId * rowStride()];\n    }\n\n    /** \\copydoc PlainObjectBase::coeffRef(Index) const */\n    EIGEN_DEVICE_FUNC\n    inline const Scalar& coeffRef(Index index) const\n    {\n      EIGEN_STATIC_ASSERT_INDEX_BASED_ACCESS(Derived)\n      return this->m_data[index * innerStride()];\n    }\n\n    /** \\internal */\n    template<int LoadMode>\n    inline PacketScalar packet(Index rowId, Index colId) const\n    {\n      return internal::ploadt<PacketScalar, LoadMode>\n               (m_data + (colId * colStride() + rowId * rowStride()));\n    }\n\n    /** \\internal */\n    template<int LoadMode>\n    inline PacketScalar packet(Index index) const\n    {\n      EIGEN_STATIC_ASSERT_INDEX_BASED_ACCESS(Derived)\n      return internal::ploadt<PacketScalar, LoadMode>(m_data + index * innerStride());\n    }\n\n    /** \\internal Constructor for fixed size matrices or vectors */\n    EIGEN_DEVICE_FUNC\n    explicit inline MapBase(PointerType dataPtr) : m_data(dataPtr), m_rows(RowsAtCompileTime), m_cols(ColsAtCompileTime)\n    {\n      EIGEN_STATIC_ASSERT_FIXED_SIZE(Derived)\n      checkSanity<Derived>();\n    }\n\n    /** \\internal Constructor for dynamically sized vectors */\n    EIGEN_DEVICE_FUNC\n    inline MapBase(PointerType dataPtr, Index vecSize)\n            : m_data(dataPtr),\n              m_rows(RowsAtCompileTime == Dynamic ? vecSize : Index(RowsAtCompileTime)),\n              m_cols(ColsAtCompileTime == Dynamic ? vecSize : Index(ColsAtCompileTime))\n    {\n      EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)\n      eigen_assert(vecSize >= 0);\n      eigen_assert(dataPtr == 0 || SizeAtCompileTime == Dynamic || SizeAtCompileTime == vecSize);\n      checkSanity<Derived>();\n    }\n\n    /** \\internal Constructor for dynamically sized matrices */\n    EIGEN_DEVICE_FUNC\n    inline MapBase(PointerType dataPtr, Index rows, Index cols)\n            : m_data(dataPtr), m_rows(rows), m_cols(cols)\n    {\n      eigen_assert( (dataPtr == 0)\n              || (   rows >= 0 && (RowsAtCompileTime == Dynamic || RowsAtCompileTime == rows)\n                  && cols >= 0 && (ColsAtCompileTime == Dynamic || ColsAtCompileTime == cols)));\n      checkSanity<Derived>();\n    }\n\n    #ifdef EIGEN_MAPBASE_PLUGIN\n    #include EIGEN_MAPBASE_PLUGIN\n    #endif\n\n  protected:\n    EIGEN_DEFAULT_COPY_CONSTRUCTOR(MapBase)\n    EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(MapBase)\n\n    template<typename T>\n    EIGEN_DEVICE_FUNC\n    void checkSanity(typename internal::enable_if<(internal::traits<T>::Alignment>0),void*>::type = 0) const\n    {\n#if EIGEN_MAX_ALIGN_BYTES>0\n      // innerStride() is not set yet when this function is called, so we optimistically assume the lowest plausible value:\n      const Index minInnerStride = InnerStrideAtCompileTime == Dynamic ? 1 : Index(InnerStrideAtCompileTime);\n      EIGEN_ONLY_USED_FOR_DEBUG(minInnerStride);\n      eigen_assert((   ((internal::UIntPtr(m_data) % internal::traits<Derived>::Alignment) == 0)\n                    || (cols() * rows() * minInnerStride * sizeof(Scalar)) < internal::traits<Derived>::Alignment ) && \"data is not aligned\");\n#endif\n    }\n\n    template<typename T>\n    EIGEN_DEVICE_FUNC\n    void checkSanity(typename internal::enable_if<internal::traits<T>::Alignment==0,void*>::type = 0) const\n    {}\n\n    PointerType m_data;\n    const internal::variable_if_dynamic<Index, RowsAtCompileTime> m_rows;\n    const internal::variable_if_dynamic<Index, ColsAtCompileTime> m_cols;\n};\n\n/** \\ingroup Core_Module\n  *\n  * \\brief Base class for non-const dense Map and Block expression with direct access\n  *\n  * This base class provides the non-const low-level accessors (e.g. coeff and coeffRef) of\n  * dense Map and Block objects with direct access.\n  * It inherits MapBase<Derived, ReadOnlyAccessors> which defines the const variant for reading specific entries.\n  *\n  * \\sa class Map, class Block\n  */\ntemplate<typename Derived> class MapBase<Derived, WriteAccessors>\n  : public MapBase<Derived, ReadOnlyAccessors>\n{\n    typedef MapBase<Derived, ReadOnlyAccessors> ReadOnlyMapBase;\n  public:\n\n    typedef MapBase<Derived, ReadOnlyAccessors> Base;\n\n    typedef typename Base::Scalar Scalar;\n    typedef typename Base::PacketScalar PacketScalar;\n    typedef typename Base::StorageIndex StorageIndex;\n    typedef typename Base::PointerType PointerType;\n\n    using Base::derived;\n    using Base::rows;\n    using Base::cols;\n    using Base::size;\n    using Base::coeff;\n    using Base::coeffRef;\n\n    using Base::innerStride;\n    using Base::outerStride;\n    using Base::rowStride;\n    using Base::colStride;\n\n    typedef typename internal::conditional<\n                    internal::is_lvalue<Derived>::value,\n                    Scalar,\n                    const Scalar\n                  >::type ScalarWithConstIfNotLvalue;\n\n    EIGEN_DEVICE_FUNC\n    inline const Scalar* data() const { return this->m_data; }\n    EIGEN_DEVICE_FUNC\n    inline ScalarWithConstIfNotLvalue* data() { return this->m_data; } // no const-cast here so non-const-correct code will give a compile error\n\n    EIGEN_DEVICE_FUNC\n    inline ScalarWithConstIfNotLvalue& coeffRef(Index row, Index col)\n    {\n      return this->m_data[col * colStride() + row * rowStride()];\n    }\n\n    EIGEN_DEVICE_FUNC\n    inline ScalarWithConstIfNotLvalue& coeffRef(Index index)\n    {\n      EIGEN_STATIC_ASSERT_INDEX_BASED_ACCESS(Derived)\n      return this->m_data[index * innerStride()];\n    }\n\n    template<int StoreMode>\n    inline void writePacket(Index row, Index col, const PacketScalar& val)\n    {\n      internal::pstoret<Scalar, PacketScalar, StoreMode>\n               (this->m_data + (col * colStride() + row * rowStride()), val);\n    }\n\n    template<int StoreMode>\n    inline void writePacket(Index index, const PacketScalar& val)\n    {\n      EIGEN_STATIC_ASSERT_INDEX_BASED_ACCESS(Derived)\n      internal::pstoret<Scalar, PacketScalar, StoreMode>\n                (this->m_data + index * innerStride(), val);\n    }\n\n    EIGEN_DEVICE_FUNC explicit inline MapBase(PointerType dataPtr) : Base(dataPtr) {}\n    EIGEN_DEVICE_FUNC inline MapBase(PointerType dataPtr, Index vecSize) : Base(dataPtr, vecSize) {}\n    EIGEN_DEVICE_FUNC inline MapBase(PointerType dataPtr, Index rows, Index cols) : Base(dataPtr, rows, cols) {}\n\n    EIGEN_DEVICE_FUNC\n    Derived& operator=(const MapBase& other)\n    {\n      ReadOnlyMapBase::Base::operator=(other);\n      return derived();\n    }\n\n    // In theory we could simply refer to Base:Base::operator=, but MSVC does not like Base::Base,\n    // see bugs 821 and 920.\n    using ReadOnlyMapBase::Base::operator=;\n  protected:\n    EIGEN_DEFAULT_COPY_CONSTRUCTOR(MapBase)\n    EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(MapBase)\n};\n\n#undef EIGEN_STATIC_ASSERT_INDEX_BASED_ACCESS\n\n} // end namespace Eigen\n\n#endif // EIGEN_MAPBASE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/MathFunctions.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2010 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_MATHFUNCTIONS_H\n#define EIGEN_MATHFUNCTIONS_H\n\n// source: http://www.geom.uiuc.edu/~huberty/math5337/groupe/digits.html\n// TODO this should better be moved to NumTraits\n#define EIGEN_PI 3.141592653589793238462643383279502884197169399375105820974944592307816406L\n\nnamespace Eigen {\n\n// On WINCE, std::abs is defined for int only, so let's defined our own overloads:\n// This issue has been confirmed with MSVC 2008 only, but the issue might exist for more recent versions too.\n#if EIGEN_OS_WINCE && EIGEN_COMP_MSVC && EIGEN_COMP_MSVC<=1500\nlong        abs(long        x) { return (labs(x));  }\ndouble      abs(double      x) { return (fabs(x));  }\nfloat       abs(float       x) { return (fabsf(x)); }\nlong double abs(long double x) { return (fabsl(x)); }\n#endif\n\nnamespace internal {\n\n/** \\internal \\class global_math_functions_filtering_base\n  *\n  * What it does:\n  * Defines a typedef 'type' as follows:\n  * - if type T has a member typedef Eigen_BaseClassForSpecializationOfGlobalMathFuncImpl, then\n  *   global_math_functions_filtering_base<T>::type is a typedef for it.\n  * - otherwise, global_math_functions_filtering_base<T>::type is a typedef for T.\n  *\n  * How it's used:\n  * To allow to defined the global math functions (like sin...) in certain cases, like the Array expressions.\n  * When you do sin(array1+array2), the object array1+array2 has a complicated expression type, all what you want to know\n  * is that it inherits ArrayBase. So we implement a partial specialization of sin_impl for ArrayBase<Derived>.\n  * So we must make sure to use sin_impl<ArrayBase<Derived> > and not sin_impl<Derived>, otherwise our partial specialization\n  * won't be used. How does sin know that? That's exactly what global_math_functions_filtering_base tells it.\n  *\n  * How it's implemented:\n  * SFINAE in the style of enable_if. Highly susceptible of breaking compilers. With GCC, it sure does work, but if you replace\n  * the typename dummy by an integer template parameter, it doesn't work anymore!\n  */\n\ntemplate<typename T, typename dummy = void>\nstruct global_math_functions_filtering_base\n{\n  typedef T type;\n};\n\ntemplate<typename T> struct always_void { typedef void type; };\n\ntemplate<typename T>\nstruct global_math_functions_filtering_base\n  <T,\n   typename always_void<typename T::Eigen_BaseClassForSpecializationOfGlobalMathFuncImpl>::type\n  >\n{\n  typedef typename T::Eigen_BaseClassForSpecializationOfGlobalMathFuncImpl type;\n};\n\n#define EIGEN_MATHFUNC_IMPL(func, scalar) Eigen::internal::func##_impl<typename Eigen::internal::global_math_functions_filtering_base<scalar>::type>\n#define EIGEN_MATHFUNC_RETVAL(func, scalar) typename Eigen::internal::func##_retval<typename Eigen::internal::global_math_functions_filtering_base<scalar>::type>::type\n\n/****************************************************************************\n* Implementation of real                                                 *\n****************************************************************************/\n\ntemplate<typename Scalar, bool IsComplex = NumTraits<Scalar>::IsComplex>\nstruct real_default_impl\n{\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  EIGEN_DEVICE_FUNC\n  static inline RealScalar run(const Scalar& x)\n  {\n    return x;\n  }\n};\n\ntemplate<typename Scalar>\nstruct real_default_impl<Scalar,true>\n{\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  EIGEN_DEVICE_FUNC\n  static inline RealScalar run(const Scalar& x)\n  {\n    using std::real;\n    return real(x);\n  }\n};\n\ntemplate<typename Scalar> struct real_impl : real_default_impl<Scalar> {};\n\n#if defined(EIGEN_GPU_COMPILE_PHASE)\ntemplate<typename T>\nstruct real_impl<std::complex<T> >\n{\n  typedef T RealScalar;\n  EIGEN_DEVICE_FUNC\n  static inline T run(const std::complex<T>& x)\n  {\n    return x.real();\n  }\n};\n#endif\n\ntemplate<typename Scalar>\nstruct real_retval\n{\n  typedef typename NumTraits<Scalar>::Real type;\n};\n\n/****************************************************************************\n* Implementation of imag                                                 *\n****************************************************************************/\n\ntemplate<typename Scalar, bool IsComplex = NumTraits<Scalar>::IsComplex>\nstruct imag_default_impl\n{\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  EIGEN_DEVICE_FUNC\n  static inline RealScalar run(const Scalar&)\n  {\n    return RealScalar(0);\n  }\n};\n\ntemplate<typename Scalar>\nstruct imag_default_impl<Scalar,true>\n{\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  EIGEN_DEVICE_FUNC\n  static inline RealScalar run(const Scalar& x)\n  {\n    using std::imag;\n    return imag(x);\n  }\n};\n\ntemplate<typename Scalar> struct imag_impl : imag_default_impl<Scalar> {};\n\n#if defined(EIGEN_GPU_COMPILE_PHASE)\ntemplate<typename T>\nstruct imag_impl<std::complex<T> >\n{\n  typedef T RealScalar;\n  EIGEN_DEVICE_FUNC\n  static inline T run(const std::complex<T>& x)\n  {\n    return x.imag();\n  }\n};\n#endif\n\ntemplate<typename Scalar>\nstruct imag_retval\n{\n  typedef typename NumTraits<Scalar>::Real type;\n};\n\n/****************************************************************************\n* Implementation of real_ref                                             *\n****************************************************************************/\n\ntemplate<typename Scalar>\nstruct real_ref_impl\n{\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  EIGEN_DEVICE_FUNC\n  static inline RealScalar& run(Scalar& x)\n  {\n    return reinterpret_cast<RealScalar*>(&x)[0];\n  }\n  EIGEN_DEVICE_FUNC\n  static inline const RealScalar& run(const Scalar& x)\n  {\n    return reinterpret_cast<const RealScalar*>(&x)[0];\n  }\n};\n\ntemplate<typename Scalar>\nstruct real_ref_retval\n{\n  typedef typename NumTraits<Scalar>::Real & type;\n};\n\n/****************************************************************************\n* Implementation of imag_ref                                             *\n****************************************************************************/\n\ntemplate<typename Scalar, bool IsComplex>\nstruct imag_ref_default_impl\n{\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  EIGEN_DEVICE_FUNC\n  static inline RealScalar& run(Scalar& x)\n  {\n    return reinterpret_cast<RealScalar*>(&x)[1];\n  }\n  EIGEN_DEVICE_FUNC\n  static inline const RealScalar& run(const Scalar& x)\n  {\n    return reinterpret_cast<RealScalar*>(&x)[1];\n  }\n};\n\ntemplate<typename Scalar>\nstruct imag_ref_default_impl<Scalar, false>\n{\n  EIGEN_DEVICE_FUNC\n  static inline Scalar run(Scalar&)\n  {\n    return Scalar(0);\n  }\n  EIGEN_DEVICE_FUNC\n  static inline const Scalar run(const Scalar&)\n  {\n    return Scalar(0);\n  }\n};\n\ntemplate<typename Scalar>\nstruct imag_ref_impl : imag_ref_default_impl<Scalar, NumTraits<Scalar>::IsComplex> {};\n\ntemplate<typename Scalar>\nstruct imag_ref_retval\n{\n  typedef typename NumTraits<Scalar>::Real & type;\n};\n\n/****************************************************************************\n* Implementation of conj                                                 *\n****************************************************************************/\n\ntemplate<typename Scalar, bool IsComplex = NumTraits<Scalar>::IsComplex>\nstruct conj_default_impl\n{\n  EIGEN_DEVICE_FUNC\n  static inline Scalar run(const Scalar& x)\n  {\n    return x;\n  }\n};\n\ntemplate<typename Scalar>\nstruct conj_default_impl<Scalar,true>\n{\n  EIGEN_DEVICE_FUNC\n  static inline Scalar run(const Scalar& x)\n  {\n    using std::conj;\n    return conj(x);\n  }\n};\n\ntemplate<typename Scalar> struct conj_impl : conj_default_impl<Scalar> {};\n\n#if defined(EIGEN_GPU_COMPILE_PHASE)\ntemplate<typename T>\nstruct conj_impl<std::complex<T> >\n{\n  EIGEN_DEVICE_FUNC\n  static inline std::complex<T> run(const std::complex<T>& x)\n  {\n    return std::complex<T>(x.real(), -x.imag());\n  }\n};\n#endif\n\ntemplate<typename Scalar>\nstruct conj_retval\n{\n  typedef Scalar type;\n};\n\n/****************************************************************************\n* Implementation of abs2                                                 *\n****************************************************************************/\n\ntemplate<typename Scalar,bool IsComplex>\nstruct abs2_impl_default\n{\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  EIGEN_DEVICE_FUNC\n  static inline RealScalar run(const Scalar& x)\n  {\n    return x*x;\n  }\n};\n\ntemplate<typename Scalar>\nstruct abs2_impl_default<Scalar, true> // IsComplex\n{\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  EIGEN_DEVICE_FUNC\n  static inline RealScalar run(const Scalar& x)\n  {\n    return x.real()*x.real() + x.imag()*x.imag();\n  }\n};\n\ntemplate<typename Scalar>\nstruct abs2_impl\n{\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  EIGEN_DEVICE_FUNC\n  static inline RealScalar run(const Scalar& x)\n  {\n    return abs2_impl_default<Scalar,NumTraits<Scalar>::IsComplex>::run(x);\n  }\n};\n\ntemplate<typename Scalar>\nstruct abs2_retval\n{\n  typedef typename NumTraits<Scalar>::Real type;\n};\n\n/****************************************************************************\n* Implementation of norm1                                                *\n****************************************************************************/\n\ntemplate<typename Scalar, bool IsComplex>\nstruct norm1_default_impl;\n\ntemplate<typename Scalar>\nstruct norm1_default_impl<Scalar,true>\n{\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  EIGEN_DEVICE_FUNC\n  static inline RealScalar run(const Scalar& x)\n  {\n    EIGEN_USING_STD_MATH(abs);\n    return abs(x.real()) + abs(x.imag());\n  }\n};\n\ntemplate<typename Scalar>\nstruct norm1_default_impl<Scalar, false>\n{\n  EIGEN_DEVICE_FUNC\n  static inline Scalar run(const Scalar& x)\n  {\n    EIGEN_USING_STD_MATH(abs);\n    return abs(x);\n  }\n};\n\ntemplate<typename Scalar>\nstruct norm1_impl : norm1_default_impl<Scalar, NumTraits<Scalar>::IsComplex> {};\n\ntemplate<typename Scalar>\nstruct norm1_retval\n{\n  typedef typename NumTraits<Scalar>::Real type;\n};\n\n/****************************************************************************\n* Implementation of hypot                                                *\n****************************************************************************/\n\ntemplate<typename Scalar> struct hypot_impl;\n\ntemplate<typename Scalar>\nstruct hypot_retval\n{\n  typedef typename NumTraits<Scalar>::Real type;\n};\n\n/****************************************************************************\n* Implementation of cast                                                 *\n****************************************************************************/\n\ntemplate<typename OldType, typename NewType>\nstruct cast_impl\n{\n  EIGEN_DEVICE_FUNC\n  static inline NewType run(const OldType& x)\n  {\n    return static_cast<NewType>(x);\n  }\n};\n\n// here, for once, we're plainly returning NewType: we don't want cast to do weird things.\n\ntemplate<typename OldType, typename NewType>\nEIGEN_DEVICE_FUNC\ninline NewType cast(const OldType& x)\n{\n  return cast_impl<OldType, NewType>::run(x);\n}\n\n/****************************************************************************\n* Implementation of round                                                   *\n****************************************************************************/\n\n#if EIGEN_HAS_CXX11_MATH\n  template<typename Scalar>\n  struct round_impl {\n    EIGEN_DEVICE_FUNC\n    static inline Scalar run(const Scalar& x)\n    {\n      EIGEN_STATIC_ASSERT((!NumTraits<Scalar>::IsComplex), NUMERIC_TYPE_MUST_BE_REAL)\n      EIGEN_USING_STD_MATH(round);\n      return round(x);\n    }\n  };\n#else\n  template<typename Scalar>\n  struct round_impl\n  {\n    EIGEN_DEVICE_FUNC\n    static inline Scalar run(const Scalar& x)\n    {\n      EIGEN_STATIC_ASSERT((!NumTraits<Scalar>::IsComplex), NUMERIC_TYPE_MUST_BE_REAL)\n      EIGEN_USING_STD_MATH(floor);\n      EIGEN_USING_STD_MATH(ceil);\n      return (x > Scalar(0)) ? floor(x + Scalar(0.5)) : ceil(x - Scalar(0.5));\n    }\n  };\n#endif\n\ntemplate<typename Scalar>\nstruct round_retval\n{\n  typedef Scalar type;\n};\n\n/****************************************************************************\n* Implementation of rint                                                    *\n****************************************************************************/\n\ntemplate<typename Scalar>\nstruct rint_impl {\n  EIGEN_DEVICE_FUNC\n  static inline Scalar run(const Scalar& x)\n  {\n    EIGEN_STATIC_ASSERT((!NumTraits<Scalar>::IsComplex), NUMERIC_TYPE_MUST_BE_REAL)\n#if EIGEN_HAS_CXX11_MATH\n      EIGEN_USING_STD_MATH(rint);\n#endif\n    return rint(x);\n  }\n};\n\n#if !EIGEN_HAS_CXX11_MATH\ntemplate<>\nstruct rint_impl<double> {\n  EIGEN_DEVICE_FUNC\n  static inline double run(const double& x)\n  {\n    return ::rint(x);\n  }\n};\ntemplate<>\nstruct rint_impl<float> {\n  EIGEN_DEVICE_FUNC\n  static inline float run(const float& x)\n  {\n    return ::rintf(x);\n  }\n};\n#endif\n\ntemplate<typename Scalar>\nstruct rint_retval\n{\n  typedef Scalar type;\n};\n\n/****************************************************************************\n* Implementation of arg                                                     *\n****************************************************************************/\n\n#if EIGEN_HAS_CXX11_MATH\n  template<typename Scalar>\n  struct arg_impl {\n    EIGEN_DEVICE_FUNC\n    static inline Scalar run(const Scalar& x)\n    {\n      #if defined(EIGEN_HIP_DEVICE_COMPILE)\n      // HIP does not seem to have a native device side implementation for the math routine \"arg\"\n      using std::arg;\n      #else \t\t  \n      EIGEN_USING_STD_MATH(arg);\n      #endif\n      return arg(x);\n    }\n  };\n#else\n  template<typename Scalar, bool IsComplex = NumTraits<Scalar>::IsComplex>\n  struct arg_default_impl\n  {\n    typedef typename NumTraits<Scalar>::Real RealScalar;\n    EIGEN_DEVICE_FUNC\n    static inline RealScalar run(const Scalar& x)\n    {\n      return (x < Scalar(0)) ? Scalar(EIGEN_PI) : Scalar(0); }\n  };\n\n  template<typename Scalar>\n  struct arg_default_impl<Scalar,true>\n  {\n    typedef typename NumTraits<Scalar>::Real RealScalar;\n    EIGEN_DEVICE_FUNC\n    static inline RealScalar run(const Scalar& x)\n    {\n      EIGEN_USING_STD_MATH(arg);\n      return arg(x);\n    }\n  };\n\n  template<typename Scalar> struct arg_impl : arg_default_impl<Scalar> {};\n#endif\n\ntemplate<typename Scalar>\nstruct arg_retval\n{\n  typedef typename NumTraits<Scalar>::Real type;\n};\n\n/****************************************************************************\n* Implementation of expm1                                                   *\n****************************************************************************/\n\n// This implementation is based on GSL Math's expm1.\nnamespace std_fallback {\n  // fallback expm1 implementation in case there is no expm1(Scalar) function in namespace of Scalar,\n  // or that there is no suitable std::expm1 function available. Implementation\n  // attributed to Kahan. See: http://www.plunk.org/~hatch/rightway.php.\n  template<typename Scalar>\n  EIGEN_DEVICE_FUNC inline Scalar expm1(const Scalar& x) {\n    EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar)\n    typedef typename NumTraits<Scalar>::Real RealScalar;\n\n    EIGEN_USING_STD_MATH(exp);\n    Scalar u = exp(x);\n    if (numext::equal_strict(u, Scalar(1))) {\n      return x;\n    }\n    Scalar um1 = u - RealScalar(1);\n    if (numext::equal_strict(um1, Scalar(-1))) {\n      return RealScalar(-1);\n    }\n\n    EIGEN_USING_STD_MATH(log);\n    Scalar logu = log(u);\n    return numext::equal_strict(u, logu) ? u : (u - RealScalar(1)) * x / logu;\n  }\n}\n\ntemplate<typename Scalar>\nstruct expm1_impl {\n  EIGEN_DEVICE_FUNC static inline Scalar run(const Scalar& x)\n  {\n    EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar)\n    #if EIGEN_HAS_CXX11_MATH\n    using std::expm1;\n    #else\n    using std_fallback::expm1;\n    #endif\n    return expm1(x);\n  }\n};\n\n// Specialization for complex types that are not supported by std::expm1.\ntemplate <typename RealScalar>\nstruct expm1_impl<std::complex<RealScalar> > {\n  EIGEN_DEVICE_FUNC static inline std::complex<RealScalar> run(\n      const std::complex<RealScalar>& x) {\n    EIGEN_STATIC_ASSERT_NON_INTEGER(RealScalar)\n    RealScalar xr = x.real();\n    RealScalar xi = x.imag();\n    // expm1(z) = exp(z) - 1\n    //          = exp(x +  i * y) - 1\n    //          = exp(x) * (cos(y) + i * sin(y)) - 1\n    //          = exp(x) * cos(y) - 1 + i * exp(x) * sin(y)\n    // Imag(expm1(z)) = exp(x) * sin(y)\n    // Real(expm1(z)) = exp(x) * cos(y) - 1\n    //          = exp(x) * cos(y) - 1.\n    //          = expm1(x) + exp(x) * (cos(y) - 1)\n    //          = expm1(x) + exp(x) * (2 * sin(y / 2) ** 2)\n\n    // TODO better use numext::expm1 and numext::sin (but that would require forward declarations or moving this specialization down).\n    RealScalar erm1 = expm1_impl<RealScalar>::run(xr);\n    RealScalar er = erm1 + RealScalar(1.);\n    EIGEN_USING_STD_MATH(sin);\n    RealScalar sin2 = sin(xi / RealScalar(2.));\n    sin2 = sin2 * sin2;\n    RealScalar s = sin(xi);\n    RealScalar real_part = erm1 - RealScalar(2.) * er * sin2;\n    return std::complex<RealScalar>(real_part, er * s);\n  }\n};\n\ntemplate<typename Scalar>\nstruct expm1_retval\n{\n  typedef Scalar type;\n};\n\n/****************************************************************************\n* Implementation of log1p                                                   *\n****************************************************************************/\n\nnamespace std_fallback {\n  // fallback log1p implementation in case there is no log1p(Scalar) function in namespace of Scalar,\n  // or that there is no suitable std::log1p function available\n  template<typename Scalar>\n  EIGEN_DEVICE_FUNC inline Scalar log1p(const Scalar& x) {\n    EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar)\n    typedef typename NumTraits<Scalar>::Real RealScalar;\n    EIGEN_USING_STD_MATH(log);\n    Scalar x1p = RealScalar(1) + x;\n    Scalar log_1p = log(x1p);\n    const bool is_small = numext::equal_strict(x1p, Scalar(1));\n    const bool is_inf = numext::equal_strict(x1p, log_1p);\n    return (is_small || is_inf) ? x : x * (log_1p / (x1p - RealScalar(1)));\n  }\n}\n\ntemplate<typename Scalar>\nstruct log1p_impl {\n  EIGEN_DEVICE_FUNC static inline Scalar run(const Scalar& x)\n  {\n    EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar)\n    #if EIGEN_HAS_CXX11_MATH\n    using std::log1p;\n    #else\n    using std_fallback::log1p;\n    #endif\n    return log1p(x);\n  }\n};\n\n// Specialization for complex types that are not supported by std::log1p.\ntemplate <typename RealScalar>\nstruct log1p_impl<std::complex<RealScalar> > {\n  EIGEN_DEVICE_FUNC static inline std::complex<RealScalar> run(\n      const std::complex<RealScalar>& x) {\n    EIGEN_STATIC_ASSERT_NON_INTEGER(RealScalar)\n    return std_fallback::log1p(x);\n  }\n};\n\ntemplate<typename Scalar>\nstruct log1p_retval\n{\n  typedef Scalar type;\n};\n\n/****************************************************************************\n* Implementation of pow                                                  *\n****************************************************************************/\n\ntemplate<typename ScalarX,typename ScalarY, bool IsInteger = NumTraits<ScalarX>::IsInteger&&NumTraits<ScalarY>::IsInteger>\nstruct pow_impl\n{\n  //typedef Scalar retval;\n  typedef typename ScalarBinaryOpTraits<ScalarX,ScalarY,internal::scalar_pow_op<ScalarX,ScalarY> >::ReturnType result_type;\n  static EIGEN_DEVICE_FUNC inline result_type run(const ScalarX& x, const ScalarY& y)\n  {\n    EIGEN_USING_STD_MATH(pow);\n    return pow(x, y);\n  }\n};\n\ntemplate<typename ScalarX,typename ScalarY>\nstruct pow_impl<ScalarX,ScalarY, true>\n{\n  typedef ScalarX result_type;\n  static EIGEN_DEVICE_FUNC inline ScalarX run(ScalarX x, ScalarY y)\n  {\n    ScalarX res(1);\n    eigen_assert(!NumTraits<ScalarY>::IsSigned || y >= 0);\n    if(y & 1) res *= x;\n    y >>= 1;\n    while(y)\n    {\n      x *= x;\n      if(y&1) res *= x;\n      y >>= 1;\n    }\n    return res;\n  }\n};\n\n/****************************************************************************\n* Implementation of random                                               *\n****************************************************************************/\n\ntemplate<typename Scalar,\n         bool IsComplex,\n         bool IsInteger>\nstruct random_default_impl {};\n\ntemplate<typename Scalar>\nstruct random_impl : random_default_impl<Scalar, NumTraits<Scalar>::IsComplex, NumTraits<Scalar>::IsInteger> {};\n\ntemplate<typename Scalar>\nstruct random_retval\n{\n  typedef Scalar type;\n};\n\ntemplate<typename Scalar> inline EIGEN_MATHFUNC_RETVAL(random, Scalar) random(const Scalar& x, const Scalar& y);\ntemplate<typename Scalar> inline EIGEN_MATHFUNC_RETVAL(random, Scalar) random();\n\ntemplate<typename Scalar>\nstruct random_default_impl<Scalar, false, false>\n{\n  static inline Scalar run(const Scalar& x, const Scalar& y)\n  {\n    return x + (y-x) * Scalar(std::rand()) / Scalar(RAND_MAX);\n  }\n  static inline Scalar run()\n  {\n    return run(Scalar(NumTraits<Scalar>::IsSigned ? -1 : 0), Scalar(1));\n  }\n};\n\nenum {\n  meta_floor_log2_terminate,\n  meta_floor_log2_move_up,\n  meta_floor_log2_move_down,\n  meta_floor_log2_bogus\n};\n\ntemplate<unsigned int n, int lower, int upper> struct meta_floor_log2_selector\n{\n  enum { middle = (lower + upper) / 2,\n         value = (upper <= lower + 1) ? int(meta_floor_log2_terminate)\n               : (n < (1 << middle)) ? int(meta_floor_log2_move_down)\n               : (n==0) ? int(meta_floor_log2_bogus)\n               : int(meta_floor_log2_move_up)\n  };\n};\n\ntemplate<unsigned int n,\n         int lower = 0,\n         int upper = sizeof(unsigned int) * CHAR_BIT - 1,\n         int selector = meta_floor_log2_selector<n, lower, upper>::value>\nstruct meta_floor_log2 {};\n\ntemplate<unsigned int n, int lower, int upper>\nstruct meta_floor_log2<n, lower, upper, meta_floor_log2_move_down>\n{\n  enum { value = meta_floor_log2<n, lower, meta_floor_log2_selector<n, lower, upper>::middle>::value };\n};\n\ntemplate<unsigned int n, int lower, int upper>\nstruct meta_floor_log2<n, lower, upper, meta_floor_log2_move_up>\n{\n  enum { value = meta_floor_log2<n, meta_floor_log2_selector<n, lower, upper>::middle, upper>::value };\n};\n\ntemplate<unsigned int n, int lower, int upper>\nstruct meta_floor_log2<n, lower, upper, meta_floor_log2_terminate>\n{\n  enum { value = (n >= ((unsigned int)(1) << (lower+1))) ? lower+1 : lower };\n};\n\ntemplate<unsigned int n, int lower, int upper>\nstruct meta_floor_log2<n, lower, upper, meta_floor_log2_bogus>\n{\n  // no value, error at compile time\n};\n\ntemplate<typename Scalar>\nstruct random_default_impl<Scalar, false, true>\n{\n  static inline Scalar run(const Scalar& x, const Scalar& y)\n  {\n    if (y <= x)\n      return x;\n    // ScalarU is the unsigned counterpart of Scalar, possibly Scalar itself.\n    typedef typename make_unsigned<Scalar>::type ScalarU;\n    // ScalarX is the widest of ScalarU and unsigned int.\n    // We'll deal only with ScalarX and unsigned int below thus avoiding signed\n    // types and arithmetic and signed overflows (which are undefined behavior).\n    typedef typename conditional<(ScalarU(-1) > unsigned(-1)), ScalarU, unsigned>::type ScalarX;\n    // The following difference doesn't overflow, provided our integer types are two's\n    // complement and have the same number of padding bits in signed and unsigned variants.\n    // This is the case in most modern implementations of C++.\n    ScalarX range = ScalarX(y) - ScalarX(x);\n    ScalarX offset = 0;\n    ScalarX divisor = 1;\n    ScalarX multiplier = 1;\n    const unsigned rand_max = RAND_MAX;\n    if (range <= rand_max) divisor = (rand_max + 1) / (range + 1);\n    else                   multiplier = 1 + range / (rand_max + 1);\n    // Rejection sampling.\n    do {\n      offset = (unsigned(std::rand()) * multiplier) / divisor;\n    } while (offset > range);\n    return Scalar(ScalarX(x) + offset);\n  }\n\n  static inline Scalar run()\n  {\n#ifdef EIGEN_MAKING_DOCS\n    return run(Scalar(NumTraits<Scalar>::IsSigned ? -10 : 0), Scalar(10));\n#else\n    enum { rand_bits = meta_floor_log2<(unsigned int)(RAND_MAX)+1>::value,\n           scalar_bits = sizeof(Scalar) * CHAR_BIT,\n           shift = EIGEN_PLAIN_ENUM_MAX(0, int(rand_bits) - int(scalar_bits)),\n           offset = NumTraits<Scalar>::IsSigned ? (1 << (EIGEN_PLAIN_ENUM_MIN(rand_bits,scalar_bits)-1)) : 0\n    };\n    return Scalar((std::rand() >> shift) - offset);\n#endif\n  }\n};\n\ntemplate<typename Scalar>\nstruct random_default_impl<Scalar, true, false>\n{\n  static inline Scalar run(const Scalar& x, const Scalar& y)\n  {\n    return Scalar(random(x.real(), y.real()),\n                  random(x.imag(), y.imag()));\n  }\n  static inline Scalar run()\n  {\n    typedef typename NumTraits<Scalar>::Real RealScalar;\n    return Scalar(random<RealScalar>(), random<RealScalar>());\n  }\n};\n\ntemplate<typename Scalar>\ninline EIGEN_MATHFUNC_RETVAL(random, Scalar) random(const Scalar& x, const Scalar& y)\n{\n  return EIGEN_MATHFUNC_IMPL(random, Scalar)::run(x, y);\n}\n\ntemplate<typename Scalar>\ninline EIGEN_MATHFUNC_RETVAL(random, Scalar) random()\n{\n  return EIGEN_MATHFUNC_IMPL(random, Scalar)::run();\n}\n\n// Implementation of is* functions\n\n// std::is* do not work with fast-math and gcc, std::is* are available on MSVC 2013 and newer, as well as in clang.\n#if (EIGEN_HAS_CXX11_MATH && !(EIGEN_COMP_GNUC_STRICT && __FINITE_MATH_ONLY__)) || (EIGEN_COMP_MSVC>=1800) || (EIGEN_COMP_CLANG)\n#define EIGEN_USE_STD_FPCLASSIFY 1\n#else\n#define EIGEN_USE_STD_FPCLASSIFY 0\n#endif\n\ntemplate<typename T>\nEIGEN_DEVICE_FUNC\ntypename internal::enable_if<internal::is_integral<T>::value,bool>::type\nisnan_impl(const T&) { return false; }\n\ntemplate<typename T>\nEIGEN_DEVICE_FUNC\ntypename internal::enable_if<internal::is_integral<T>::value,bool>::type\nisinf_impl(const T&) { return false; }\n\ntemplate<typename T>\nEIGEN_DEVICE_FUNC\ntypename internal::enable_if<internal::is_integral<T>::value,bool>::type\nisfinite_impl(const T&) { return true; }\n\ntemplate<typename T>\nEIGEN_DEVICE_FUNC\ntypename internal::enable_if<(!internal::is_integral<T>::value)&&(!NumTraits<T>::IsComplex),bool>::type\nisfinite_impl(const T& x)\n{\n  #if defined(EIGEN_GPU_COMPILE_PHASE)\n    return (::isfinite)(x);\n  #elif EIGEN_USE_STD_FPCLASSIFY\n    using std::isfinite;\n    return isfinite EIGEN_NOT_A_MACRO (x);\n  #else\n    return x<=NumTraits<T>::highest() && x>=NumTraits<T>::lowest();\n  #endif\n}\n\ntemplate<typename T>\nEIGEN_DEVICE_FUNC\ntypename internal::enable_if<(!internal::is_integral<T>::value)&&(!NumTraits<T>::IsComplex),bool>::type\nisinf_impl(const T& x)\n{\n  #if defined(EIGEN_GPU_COMPILE_PHASE)\n    return (::isinf)(x);\n  #elif EIGEN_USE_STD_FPCLASSIFY\n    using std::isinf;\n    return isinf EIGEN_NOT_A_MACRO (x);\n  #else\n    return x>NumTraits<T>::highest() || x<NumTraits<T>::lowest();\n  #endif\n}\n\ntemplate<typename T>\nEIGEN_DEVICE_FUNC\ntypename internal::enable_if<(!internal::is_integral<T>::value)&&(!NumTraits<T>::IsComplex),bool>::type\nisnan_impl(const T& x)\n{\n  #if defined(EIGEN_GPU_COMPILE_PHASE)\n    return (::isnan)(x);\n  #elif EIGEN_USE_STD_FPCLASSIFY\n    using std::isnan;\n    return isnan EIGEN_NOT_A_MACRO (x);\n  #else\n    return x != x;\n  #endif\n}\n\n#if (!EIGEN_USE_STD_FPCLASSIFY)\n\n#if EIGEN_COMP_MSVC\n\ntemplate<typename T> EIGEN_DEVICE_FUNC bool isinf_msvc_helper(T x)\n{\n  return _fpclass(x)==_FPCLASS_NINF || _fpclass(x)==_FPCLASS_PINF;\n}\n\n//MSVC defines a _isnan builtin function, but for double only\nEIGEN_DEVICE_FUNC inline bool isnan_impl(const long double& x) { return _isnan(x)!=0; }\nEIGEN_DEVICE_FUNC inline bool isnan_impl(const double& x)      { return _isnan(x)!=0; }\nEIGEN_DEVICE_FUNC inline bool isnan_impl(const float& x)       { return _isnan(x)!=0; }\n\nEIGEN_DEVICE_FUNC inline bool isinf_impl(const long double& x) { return isinf_msvc_helper(x); }\nEIGEN_DEVICE_FUNC inline bool isinf_impl(const double& x)      { return isinf_msvc_helper(x); }\nEIGEN_DEVICE_FUNC inline bool isinf_impl(const float& x)       { return isinf_msvc_helper(x); }\n\n#elif (defined __FINITE_MATH_ONLY__ && __FINITE_MATH_ONLY__ && EIGEN_COMP_GNUC)\n\n#if EIGEN_GNUC_AT_LEAST(5,0)\n  #define EIGEN_TMP_NOOPT_ATTRIB EIGEN_DEVICE_FUNC inline __attribute__((optimize(\"no-finite-math-only\")))\n#else\n  // NOTE the inline qualifier and noinline attribute are both needed: the former is to avoid linking issue (duplicate symbol),\n  //      while the second prevent too aggressive optimizations in fast-math mode:\n  #define EIGEN_TMP_NOOPT_ATTRIB EIGEN_DEVICE_FUNC inline __attribute__((noinline,optimize(\"no-finite-math-only\")))\n#endif\n\ntemplate<> EIGEN_TMP_NOOPT_ATTRIB bool isnan_impl(const long double& x) { return __builtin_isnan(x); }\ntemplate<> EIGEN_TMP_NOOPT_ATTRIB bool isnan_impl(const double& x)      { return __builtin_isnan(x); }\ntemplate<> EIGEN_TMP_NOOPT_ATTRIB bool isnan_impl(const float& x)       { return __builtin_isnan(x); }\ntemplate<> EIGEN_TMP_NOOPT_ATTRIB bool isinf_impl(const double& x)      { return __builtin_isinf(x); }\ntemplate<> EIGEN_TMP_NOOPT_ATTRIB bool isinf_impl(const float& x)       { return __builtin_isinf(x); }\ntemplate<> EIGEN_TMP_NOOPT_ATTRIB bool isinf_impl(const long double& x) { return __builtin_isinf(x); }\n\n#undef EIGEN_TMP_NOOPT_ATTRIB\n\n#endif\n\n#endif\n\n// The following overload are defined at the end of this file\ntemplate<typename T> EIGEN_DEVICE_FUNC bool isfinite_impl(const std::complex<T>& x);\ntemplate<typename T> EIGEN_DEVICE_FUNC bool isnan_impl(const std::complex<T>& x);\ntemplate<typename T> EIGEN_DEVICE_FUNC bool isinf_impl(const std::complex<T>& x);\n\ntemplate<typename T> T generic_fast_tanh_float(const T& a_x);\n} // end namespace internal\n\n/****************************************************************************\n* Generic math functions                                                    *\n****************************************************************************/\n\nnamespace numext {\n\n#if (!defined(EIGEN_GPUCC) || defined(EIGEN_CONSTEXPR_ARE_DEVICE_FUNC)) \ntemplate<typename T>\nEIGEN_DEVICE_FUNC\nEIGEN_ALWAYS_INLINE T mini(const T& x, const T& y)\n{\n  EIGEN_USING_STD_MATH(min);\n  return min EIGEN_NOT_A_MACRO (x,y);\n}\n\ntemplate<typename T>\nEIGEN_DEVICE_FUNC\nEIGEN_ALWAYS_INLINE T maxi(const T& x, const T& y)\n{\n  EIGEN_USING_STD_MATH(max);\n  return max EIGEN_NOT_A_MACRO (x,y);\n}\n#else\ntemplate<typename T>\nEIGEN_DEVICE_FUNC\nEIGEN_ALWAYS_INLINE T mini(const T& x, const T& y)\n{\n  return y < x ? y : x;\n}\ntemplate<>\nEIGEN_DEVICE_FUNC\nEIGEN_ALWAYS_INLINE float mini(const float& x, const float& y)\n{\n  return fminf(x, y);\n}\ntemplate<>\nEIGEN_DEVICE_FUNC\nEIGEN_ALWAYS_INLINE double mini(const double& x, const double& y)\n{\n  return fmin(x, y);\n}\ntemplate<>\nEIGEN_DEVICE_FUNC\nEIGEN_ALWAYS_INLINE long double mini(const long double& x, const long double& y)\n{\n#if defined(EIGEN_HIPCC)\n  // no \"fminl\" on HIP yet\n  return (x < y) ? x : y;\n#else\n  return fminl(x, y);\n#endif\n}\n\ntemplate<typename T>\nEIGEN_DEVICE_FUNC\nEIGEN_ALWAYS_INLINE T maxi(const T& x, const T& y)\n{\n  return x < y ? y : x;\n}\ntemplate<>\nEIGEN_DEVICE_FUNC\nEIGEN_ALWAYS_INLINE float maxi(const float& x, const float& y)\n{\n  return fmaxf(x, y);\n}\ntemplate<>\nEIGEN_DEVICE_FUNC\nEIGEN_ALWAYS_INLINE double maxi(const double& x, const double& y)\n{\n  return fmax(x, y);\n}\ntemplate<>\nEIGEN_DEVICE_FUNC\nEIGEN_ALWAYS_INLINE long double maxi(const long double& x, const long double& y)\n{\n#if defined(EIGEN_HIPCC)\n  // no \"fmaxl\" on HIP yet\n  return (x > y) ? x : y;\n#else\n  return fmaxl(x, y);\n#endif\n}\n#endif\n\n#if defined(SYCL_DEVICE_ONLY)\n\n\n#define SYCL_SPECIALIZE_SIGNED_INTEGER_TYPES_BINARY(NAME, FUNC) \\\n  SYCL_SPECIALIZE_BINARY_FUNC(NAME, FUNC, cl::sycl::cl_char)   \\\n  SYCL_SPECIALIZE_BINARY_FUNC(NAME, FUNC, cl::sycl::cl_short)  \\\n  SYCL_SPECIALIZE_BINARY_FUNC(NAME, FUNC, cl::sycl::cl_int)    \\\n  SYCL_SPECIALIZE_BINARY_FUNC(NAME, FUNC, cl::sycl::cl_long)\n#define SYCL_SPECIALIZE_SIGNED_INTEGER_TYPES_UNARY(NAME, FUNC) \\\n  SYCL_SPECIALIZE_UNARY_FUNC(NAME, FUNC, cl::sycl::cl_char)   \\\n  SYCL_SPECIALIZE_UNARY_FUNC(NAME, FUNC, cl::sycl::cl_short)  \\\n  SYCL_SPECIALIZE_UNARY_FUNC(NAME, FUNC, cl::sycl::cl_int)    \\\n  SYCL_SPECIALIZE_UNARY_FUNC(NAME, FUNC, cl::sycl::cl_long)\n#define SYCL_SPECIALIZE_UNSIGNED_INTEGER_TYPES_BINARY(NAME, FUNC) \\\n  SYCL_SPECIALIZE_BINARY_FUNC(NAME, FUNC, cl::sycl::cl_uchar)  \\\n  SYCL_SPECIALIZE_BINARY_FUNC(NAME, FUNC, cl::sycl::cl_ushort) \\\n  SYCL_SPECIALIZE_BINARY_FUNC(NAME, FUNC, cl::sycl::cl_uint)   \\\n  SYCL_SPECIALIZE_BINARY_FUNC(NAME, FUNC, cl::sycl::cl_ulong)\n#define SYCL_SPECIALIZE_UNSIGNED_INTEGER_TYPES_UNARY(NAME, FUNC) \\\n  SYCL_SPECIALIZE_UNARY_FUNC(NAME, FUNC, cl::sycl::cl_uchar)  \\\n  SYCL_SPECIALIZE_UNARY_FUNC(NAME, FUNC, cl::sycl::cl_ushort) \\\n  SYCL_SPECIALIZE_UNARY_FUNC(NAME, FUNC, cl::sycl::cl_uint)   \\\n  SYCL_SPECIALIZE_UNARY_FUNC(NAME, FUNC, cl::sycl::cl_ulong)\n#define SYCL_SPECIALIZE_INTEGER_TYPES_BINARY(NAME, FUNC) \\\n  SYCL_SPECIALIZE_SIGNED_INTEGER_TYPES_BINARY(NAME, FUNC) \\\n  SYCL_SPECIALIZE_UNSIGNED_INTEGER_TYPES_BINARY(NAME, FUNC)\n#define SYCL_SPECIALIZE_INTEGER_TYPES_UNARY(NAME, FUNC) \\\n  SYCL_SPECIALIZE_SIGNED_INTEGER_TYPES_UNARY(NAME, FUNC) \\\n  SYCL_SPECIALIZE_UNSIGNED_INTEGER_TYPES_UNARY(NAME, FUNC)\n#define SYCL_SPECIALIZE_FLOATING_TYPES_BINARY(NAME, FUNC) \\\n  SYCL_SPECIALIZE_BINARY_FUNC(NAME, FUNC, cl::sycl::cl_float) \\\n  SYCL_SPECIALIZE_BINARY_FUNC(NAME, FUNC,cl::sycl::cl_double)\n#define SYCL_SPECIALIZE_FLOATING_TYPES_UNARY(NAME, FUNC) \\\n  SYCL_SPECIALIZE_UNARY_FUNC(NAME, FUNC, cl::sycl::cl_float) \\\n  SYCL_SPECIALIZE_UNARY_FUNC(NAME, FUNC,cl::sycl::cl_double)\n#define SYCL_SPECIALIZE_FLOATING_TYPES_UNARY_FUNC_RET_TYPE(NAME, FUNC, RET_TYPE) \\\n  SYCL_SPECIALIZE_GEN_UNARY_FUNC(NAME, FUNC, RET_TYPE, cl::sycl::cl_float) \\\n  SYCL_SPECIALIZE_GEN_UNARY_FUNC(NAME, FUNC, RET_TYPE, cl::sycl::cl_double)\n\n#define SYCL_SPECIALIZE_GEN_UNARY_FUNC(NAME, FUNC, RET_TYPE, ARG_TYPE) \\\ntemplate<>                                               \\\n  EIGEN_DEVICE_FUNC                                      \\\n  EIGEN_ALWAYS_INLINE RET_TYPE NAME(const ARG_TYPE& x) { \\\n    return cl::sycl::FUNC(x);                            \\\n  }\n\n#define SYCL_SPECIALIZE_UNARY_FUNC(NAME, FUNC, TYPE) \\\n  SYCL_SPECIALIZE_GEN_UNARY_FUNC(NAME, FUNC, TYPE, TYPE)\n\n#define SYCL_SPECIALIZE_GEN1_BINARY_FUNC(NAME, FUNC, RET_TYPE, ARG_TYPE1, ARG_TYPE2) \\\n  template<>                                                                  \\\n  EIGEN_DEVICE_FUNC                                                           \\\n  EIGEN_ALWAYS_INLINE RET_TYPE NAME(const ARG_TYPE1& x, const ARG_TYPE2& y) { \\\n    return cl::sycl::FUNC(x, y);                                              \\\n  }\n\n#define SYCL_SPECIALIZE_GEN2_BINARY_FUNC(NAME, FUNC, RET_TYPE, ARG_TYPE) \\\n  SYCL_SPECIALIZE_GEN1_BINARY_FUNC(NAME, FUNC, RET_TYPE, ARG_TYPE, ARG_TYPE)\n\n#define SYCL_SPECIALIZE_BINARY_FUNC(NAME, FUNC, TYPE) \\\n  SYCL_SPECIALIZE_GEN2_BINARY_FUNC(NAME, FUNC, TYPE, TYPE)\n\nSYCL_SPECIALIZE_INTEGER_TYPES_BINARY(mini, min)\nSYCL_SPECIALIZE_FLOATING_TYPES_BINARY(mini, fmin)\nSYCL_SPECIALIZE_INTEGER_TYPES_BINARY(maxi, max)\nSYCL_SPECIALIZE_FLOATING_TYPES_BINARY(maxi, fmax)\n\n#endif\n\n\ntemplate<typename Scalar>\nEIGEN_DEVICE_FUNC\ninline EIGEN_MATHFUNC_RETVAL(real, Scalar) real(const Scalar& x)\n{\n  return EIGEN_MATHFUNC_IMPL(real, Scalar)::run(x);\n}\n\ntemplate<typename Scalar>\nEIGEN_DEVICE_FUNC\ninline typename internal::add_const_on_value_type< EIGEN_MATHFUNC_RETVAL(real_ref, Scalar) >::type real_ref(const Scalar& x)\n{\n  return internal::real_ref_impl<Scalar>::run(x);\n}\n\ntemplate<typename Scalar>\nEIGEN_DEVICE_FUNC\ninline EIGEN_MATHFUNC_RETVAL(real_ref, Scalar) real_ref(Scalar& x)\n{\n  return EIGEN_MATHFUNC_IMPL(real_ref, Scalar)::run(x);\n}\n\ntemplate<typename Scalar>\nEIGEN_DEVICE_FUNC\ninline EIGEN_MATHFUNC_RETVAL(imag, Scalar) imag(const Scalar& x)\n{\n  return EIGEN_MATHFUNC_IMPL(imag, Scalar)::run(x);\n}\n\ntemplate<typename Scalar>\nEIGEN_DEVICE_FUNC\ninline EIGEN_MATHFUNC_RETVAL(arg, Scalar) arg(const Scalar& x)\n{\n  return EIGEN_MATHFUNC_IMPL(arg, Scalar)::run(x);\n}\n\ntemplate<typename Scalar>\nEIGEN_DEVICE_FUNC\ninline typename internal::add_const_on_value_type< EIGEN_MATHFUNC_RETVAL(imag_ref, Scalar) >::type imag_ref(const Scalar& x)\n{\n  return internal::imag_ref_impl<Scalar>::run(x);\n}\n\ntemplate<typename Scalar>\nEIGEN_DEVICE_FUNC\ninline EIGEN_MATHFUNC_RETVAL(imag_ref, Scalar) imag_ref(Scalar& x)\n{\n  return EIGEN_MATHFUNC_IMPL(imag_ref, Scalar)::run(x);\n}\n\ntemplate<typename Scalar>\nEIGEN_DEVICE_FUNC\ninline EIGEN_MATHFUNC_RETVAL(conj, Scalar) conj(const Scalar& x)\n{\n  return EIGEN_MATHFUNC_IMPL(conj, Scalar)::run(x);\n}\n\ntemplate<typename Scalar>\nEIGEN_DEVICE_FUNC\ninline EIGEN_MATHFUNC_RETVAL(abs2, Scalar) abs2(const Scalar& x)\n{\n  return EIGEN_MATHFUNC_IMPL(abs2, Scalar)::run(x);\n}\n\nEIGEN_DEVICE_FUNC\ninline bool abs2(bool x) { return x; }\n\ntemplate<typename T>\nEIGEN_DEVICE_FUNC\nEIGEN_ALWAYS_INLINE T absdiff(const T& x, const T& y)\n{\n  return x > y ? x - y : y - x;\n}\ntemplate<>\nEIGEN_DEVICE_FUNC\nEIGEN_ALWAYS_INLINE float absdiff(const float& x, const float& y)\n{\n  return fabsf(x - y);\n}\ntemplate<>\nEIGEN_DEVICE_FUNC\nEIGEN_ALWAYS_INLINE double absdiff(const double& x, const double& y)\n{\n  return fabs(x - y);\n}\ntemplate<>\nEIGEN_DEVICE_FUNC\nEIGEN_ALWAYS_INLINE long double absdiff(const long double& x, const long double& y)\n{\n#if defined(EIGEN_HIPCC)\n  // no \"fabsl\" on HIP yet\n  return (x > y) ? x : y;\n#else\n  return fabsl(x - y);\n#endif\n}\n\ntemplate<typename Scalar>\nEIGEN_DEVICE_FUNC\ninline EIGEN_MATHFUNC_RETVAL(norm1, Scalar) norm1(const Scalar& x)\n{\n  return EIGEN_MATHFUNC_IMPL(norm1, Scalar)::run(x);\n}\n\ntemplate<typename Scalar>\nEIGEN_DEVICE_FUNC\ninline EIGEN_MATHFUNC_RETVAL(hypot, Scalar) hypot(const Scalar& x, const Scalar& y)\n{\n  return EIGEN_MATHFUNC_IMPL(hypot, Scalar)::run(x, y);\n}\n\n#if defined(SYCL_DEVICE_ONLY)\n  SYCL_SPECIALIZE_FLOATING_TYPES_BINARY(hypot, hypot)\n#endif\n\ntemplate<typename Scalar>\nEIGEN_DEVICE_FUNC\ninline EIGEN_MATHFUNC_RETVAL(log1p, Scalar) log1p(const Scalar& x)\n{\n  return EIGEN_MATHFUNC_IMPL(log1p, Scalar)::run(x);\n}\n\n#if defined(SYCL_DEVICE_ONLY)\nSYCL_SPECIALIZE_FLOATING_TYPES_UNARY(log1p, log1p)\n#endif\n\n#if defined(EIGEN_GPUCC)\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nfloat log1p(const float &x) { return ::log1pf(x); }\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\ndouble log1p(const double &x) { return ::log1p(x); }\n#endif\n\ntemplate<typename ScalarX,typename ScalarY>\nEIGEN_DEVICE_FUNC\ninline typename internal::pow_impl<ScalarX,ScalarY>::result_type pow(const ScalarX& x, const ScalarY& y)\n{\n  return internal::pow_impl<ScalarX,ScalarY>::run(x, y);\n}\n\n#if defined(SYCL_DEVICE_ONLY)\nSYCL_SPECIALIZE_FLOATING_TYPES_BINARY(pow, pow)\n#endif\n\ntemplate<typename T> EIGEN_DEVICE_FUNC bool (isnan)   (const T &x) { return internal::isnan_impl(x); }\ntemplate<typename T> EIGEN_DEVICE_FUNC bool (isinf)   (const T &x) { return internal::isinf_impl(x); }\ntemplate<typename T> EIGEN_DEVICE_FUNC bool (isfinite)(const T &x) { return internal::isfinite_impl(x); }\n\n#if defined(SYCL_DEVICE_ONLY)\nSYCL_SPECIALIZE_FLOATING_TYPES_UNARY_FUNC_RET_TYPE(isnan, isnan, bool)\nSYCL_SPECIALIZE_FLOATING_TYPES_UNARY_FUNC_RET_TYPE(isinf, isinf, bool)\nSYCL_SPECIALIZE_FLOATING_TYPES_UNARY_FUNC_RET_TYPE(isfinite, isfinite, bool)\n#endif\n\ntemplate<typename Scalar>\nEIGEN_DEVICE_FUNC\ninline EIGEN_MATHFUNC_RETVAL(rint, Scalar) rint(const Scalar& x)\n{\n  return EIGEN_MATHFUNC_IMPL(rint, Scalar)::run(x);\n}\n\ntemplate<typename Scalar>\nEIGEN_DEVICE_FUNC\ninline EIGEN_MATHFUNC_RETVAL(round, Scalar) round(const Scalar& x)\n{\n  return EIGEN_MATHFUNC_IMPL(round, Scalar)::run(x);\n}\n\n#if defined(SYCL_DEVICE_ONLY)\nSYCL_SPECIALIZE_FLOATING_TYPES_UNARY(round, round)\n#endif\n\ntemplate<typename T>\nEIGEN_DEVICE_FUNC\nT (floor)(const T& x)\n{\n  EIGEN_USING_STD_MATH(floor);\n  return floor(x);\n}\n\n#if defined(SYCL_DEVICE_ONLY)\nSYCL_SPECIALIZE_FLOATING_TYPES_UNARY(floor, floor)\n#endif\n\n#if defined(EIGEN_GPUCC)\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nfloat floor(const float &x) { return ::floorf(x); }\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\ndouble floor(const double &x) { return ::floor(x); }\n#endif\n\ntemplate<typename T>\nEIGEN_DEVICE_FUNC\nT (ceil)(const T& x)\n{\n  EIGEN_USING_STD_MATH(ceil);\n  return ceil(x);\n}\n\n#if defined(SYCL_DEVICE_ONLY)\nSYCL_SPECIALIZE_FLOATING_TYPES_UNARY(ceil, ceil)\n#endif\n\n#if defined(EIGEN_GPUCC)\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nfloat ceil(const float &x) { return ::ceilf(x); }\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\ndouble ceil(const double &x) { return ::ceil(x); }\n#endif\n\n\n/** Log base 2 for 32 bits positive integers.\n  * Conveniently returns 0 for x==0. */\ninline int log2(int x)\n{\n  eigen_assert(x>=0);\n  unsigned int v(x);\n  static const int table[32] = { 0, 9, 1, 10, 13, 21, 2, 29, 11, 14, 16, 18, 22, 25, 3, 30, 8, 12, 20, 28, 15, 17, 24, 7, 19, 27, 23, 6, 26, 5, 4, 31 };\n  v |= v >> 1;\n  v |= v >> 2;\n  v |= v >> 4;\n  v |= v >> 8;\n  v |= v >> 16;\n  return table[(v * 0x07C4ACDDU) >> 27];\n}\n\n/** \\returns the square root of \\a x.\n  *\n  * It is essentially equivalent to\n  * \\code using std::sqrt; return sqrt(x); \\endcode\n  * but slightly faster for float/double and some compilers (e.g., gcc), thanks to\n  * specializations when SSE is enabled.\n  *\n  * It's usage is justified in performance critical functions, like norm/normalize.\n  */\ntemplate<typename T>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nT sqrt(const T &x)\n{\n  EIGEN_USING_STD_MATH(sqrt);\n  return sqrt(x);\n}\n\n#if defined(SYCL_DEVICE_ONLY)\nSYCL_SPECIALIZE_FLOATING_TYPES_UNARY(sqrt, sqrt)\n#endif\n\ntemplate<typename T>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nT log(const T &x) {\n  EIGEN_USING_STD_MATH(log);\n  return log(x);\n}\n\n#if defined(SYCL_DEVICE_ONLY)\nSYCL_SPECIALIZE_FLOATING_TYPES_UNARY(log, log)\n#endif\n\n\n#if defined(EIGEN_GPUCC)\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nfloat log(const float &x) { return ::logf(x); }\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\ndouble log(const double &x) { return ::log(x); }\n#endif\n\ntemplate<typename T>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\ntypename internal::enable_if<NumTraits<T>::IsSigned || NumTraits<T>::IsComplex,typename NumTraits<T>::Real>::type\nabs(const T &x) {\n  EIGEN_USING_STD_MATH(abs);\n  return abs(x);\n}\n\ntemplate<typename T>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\ntypename internal::enable_if<!(NumTraits<T>::IsSigned || NumTraits<T>::IsComplex),typename NumTraits<T>::Real>::type\nabs(const T &x) {\n  return x;\n}\n\n#if defined(SYCL_DEVICE_ONLY)\nSYCL_SPECIALIZE_INTEGER_TYPES_UNARY(abs, abs)\nSYCL_SPECIALIZE_FLOATING_TYPES_UNARY(abs, fabs)\n#endif\n\n#if defined(EIGEN_GPUCC)\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nfloat abs(const float &x) { return ::fabsf(x); }\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\ndouble abs(const double &x) { return ::fabs(x); }\n\ntemplate <> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nfloat abs(const std::complex<float>& x) {\n  return ::hypotf(x.real(), x.imag());\n}\n\ntemplate <> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\ndouble abs(const std::complex<double>& x) {\n  return ::hypot(x.real(), x.imag());\n}\n#endif\n\ntemplate<typename T>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nT exp(const T &x) {\n  EIGEN_USING_STD_MATH(exp);\n  return exp(x);\n}\n\n#if defined(SYCL_DEVICE_ONLY)\nSYCL_SPECIALIZE_FLOATING_TYPES_UNARY(exp, exp)\n#endif\n\n#if defined(EIGEN_GPUCC)\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nfloat exp(const float &x) { return ::expf(x); }\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\ndouble exp(const double &x) { return ::exp(x); }\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nstd::complex<float> exp(const std::complex<float>& x) {\n  float com = ::expf(x.real());\n  float res_real = com * ::cosf(x.imag());\n  float res_imag = com * ::sinf(x.imag());\n  return std::complex<float>(res_real, res_imag);\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nstd::complex<double> exp(const std::complex<double>& x) {\n  double com = ::exp(x.real());\n  double res_real = com * ::cos(x.imag());\n  double res_imag = com * ::sin(x.imag());\n  return std::complex<double>(res_real, res_imag);\n}\n#endif\n\ntemplate<typename Scalar>\nEIGEN_DEVICE_FUNC\ninline EIGEN_MATHFUNC_RETVAL(expm1, Scalar) expm1(const Scalar& x)\n{\n  return EIGEN_MATHFUNC_IMPL(expm1, Scalar)::run(x);\n}\n\n#if defined(SYCL_DEVICE_ONLY)\nSYCL_SPECIALIZE_FLOATING_TYPES_UNARY(expm1, expm1)\n#endif\n\n#if defined(EIGEN_GPUCC)\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nfloat expm1(const float &x) { return ::expm1f(x); }\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\ndouble expm1(const double &x) { return ::expm1(x); }\n#endif\n\ntemplate<typename T>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nT cos(const T &x) {\n  EIGEN_USING_STD_MATH(cos);\n  return cos(x);\n}\n\n#if defined(SYCL_DEVICE_ONLY)\nSYCL_SPECIALIZE_FLOATING_TYPES_UNARY(cos,cos)\n#endif\n\n#if defined(EIGEN_GPUCC)\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nfloat cos(const float &x) { return ::cosf(x); }\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\ndouble cos(const double &x) { return ::cos(x); }\n#endif\n\ntemplate<typename T>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nT sin(const T &x) {\n  EIGEN_USING_STD_MATH(sin);\n  return sin(x);\n}\n\n#if defined(SYCL_DEVICE_ONLY)\nSYCL_SPECIALIZE_FLOATING_TYPES_UNARY(sin, sin)\n#endif\n\n#if defined(EIGEN_GPUCC)\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nfloat sin(const float &x) { return ::sinf(x); }\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\ndouble sin(const double &x) { return ::sin(x); }\n#endif\n\ntemplate<typename T>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nT tan(const T &x) {\n  EIGEN_USING_STD_MATH(tan);\n  return tan(x);\n}\n\n#if defined(SYCL_DEVICE_ONLY)\nSYCL_SPECIALIZE_FLOATING_TYPES_UNARY(tan, tan)\n#endif\n\n#if defined(EIGEN_GPUCC)\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nfloat tan(const float &x) { return ::tanf(x); }\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\ndouble tan(const double &x) { return ::tan(x); }\n#endif\n\ntemplate<typename T>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nT acos(const T &x) {\n  EIGEN_USING_STD_MATH(acos);\n  return acos(x);\n}\n\n#if EIGEN_HAS_CXX11_MATH\ntemplate<typename T>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nT acosh(const T &x) {\n  EIGEN_USING_STD_MATH(acosh);\n  return acosh(x);\n}\n#endif\n\n#if defined(SYCL_DEVICE_ONLY)\nSYCL_SPECIALIZE_FLOATING_TYPES_UNARY(acos, acos)\nSYCL_SPECIALIZE_FLOATING_TYPES_UNARY(acosh, acosh)\n#endif\n\n#if defined(EIGEN_GPUCC)\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nfloat acos(const float &x) { return ::acosf(x); }\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\ndouble acos(const double &x) { return ::acos(x); }\n#endif\n\ntemplate<typename T>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nT asin(const T &x) {\n  EIGEN_USING_STD_MATH(asin);\n  return asin(x);\n}\n\n#if EIGEN_HAS_CXX11_MATH\ntemplate<typename T>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nT asinh(const T &x) {\n  EIGEN_USING_STD_MATH(asinh);\n  return asinh(x);\n}\n#endif\n\n#if defined(SYCL_DEVICE_ONLY)\nSYCL_SPECIALIZE_FLOATING_TYPES_UNARY(asin, asin)\nSYCL_SPECIALIZE_FLOATING_TYPES_UNARY(asinh, asinh)\n#endif\n\n#if defined(EIGEN_GPUCC)\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nfloat asin(const float &x) { return ::asinf(x); }\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\ndouble asin(const double &x) { return ::asin(x); }\n#endif\n\ntemplate<typename T>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nT atan(const T &x) {\n  EIGEN_USING_STD_MATH(atan);\n  return atan(x);\n}\n\n#if EIGEN_HAS_CXX11_MATH\ntemplate<typename T>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nT atanh(const T &x) {\n  EIGEN_USING_STD_MATH(atanh);\n  return atanh(x);\n}\n#endif\n\n#if defined(SYCL_DEVICE_ONLY)\nSYCL_SPECIALIZE_FLOATING_TYPES_UNARY(atan, atan)\nSYCL_SPECIALIZE_FLOATING_TYPES_UNARY(atanh, atanh)\n#endif\n\n#if defined(EIGEN_GPUCC)\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nfloat atan(const float &x) { return ::atanf(x); }\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\ndouble atan(const double &x) { return ::atan(x); }\n#endif\n\n\ntemplate<typename T>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nT cosh(const T &x) {\n  EIGEN_USING_STD_MATH(cosh);\n  return cosh(x);\n}\n\n#if defined(SYCL_DEVICE_ONLY)\nSYCL_SPECIALIZE_FLOATING_TYPES_UNARY(cosh, cosh)\n#endif\n\n#if defined(EIGEN_GPUCC)\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nfloat cosh(const float &x) { return ::coshf(x); }\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\ndouble cosh(const double &x) { return ::cosh(x); }\n#endif\n\ntemplate<typename T>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nT sinh(const T &x) {\n  EIGEN_USING_STD_MATH(sinh);\n  return sinh(x);\n}\n\n#if defined(SYCL_DEVICE_ONLY)\nSYCL_SPECIALIZE_FLOATING_TYPES_UNARY(sinh, sinh)\n#endif\n\n#if defined(EIGEN_GPUCC)\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nfloat sinh(const float &x) { return ::sinhf(x); }\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\ndouble sinh(const double &x) { return ::sinh(x); }\n#endif\n\ntemplate<typename T>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nT tanh(const T &x) {\n  EIGEN_USING_STD_MATH(tanh);\n  return tanh(x);\n}\n\n#if (!defined(EIGEN_GPUCC)) && EIGEN_FAST_MATH && !defined(SYCL_DEVICE_ONLY)\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nfloat tanh(float x) { return internal::generic_fast_tanh_float(x); }\n#endif\n\n#if defined(SYCL_DEVICE_ONLY)\nSYCL_SPECIALIZE_FLOATING_TYPES_UNARY(tanh, tanh)\n#endif\n\n#if defined(EIGEN_GPUCC)\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nfloat tanh(const float &x) { return ::tanhf(x); }\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\ndouble tanh(const double &x) { return ::tanh(x); }\n#endif\n\ntemplate <typename T>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nT fmod(const T& a, const T& b) {\n  EIGEN_USING_STD_MATH(fmod);\n  return fmod(a, b);\n}\n\n#if defined(SYCL_DEVICE_ONLY)\nSYCL_SPECIALIZE_FLOATING_TYPES_BINARY(fmod, fmod)\n#endif\n\n#if defined(EIGEN_GPUCC)\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nfloat fmod(const float& a, const float& b) {\n  return ::fmodf(a, b);\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\ndouble fmod(const double& a, const double& b) {\n  return ::fmod(a, b);\n}\n#endif\n\n#if defined(SYCL_DEVICE_ONLY)\n#undef SYCL_SPECIALIZE_SIGNED_INTEGER_TYPES_BINARY\n#undef SYCL_SPECIALIZE_SIGNED_INTEGER_TYPES_UNARY\n#undef SYCL_SPECIALIZE_UNSIGNED_INTEGER_TYPES_BINARY\n#undef SYCL_SPECIALIZE_UNSIGNED_INTEGER_TYPES_UNARY\n#undef SYCL_SPECIALIZE_INTEGER_TYPES_BINARY\n#undef SYCL_SPECIALIZE_UNSIGNED_INTEGER_TYPES_UNARY\n#undef SYCL_SPECIALIZE_FLOATING_TYPES_BINARY\n#undef SYCL_SPECIALIZE_FLOATING_TYPES_UNARY\n#undef SYCL_SPECIALIZE_FLOATING_TYPES_UNARY_FUNC_RET_TYPE\n#undef SYCL_SPECIALIZE_GEN_UNARY_FUNC\n#undef SYCL_SPECIALIZE_UNARY_FUNC\n#undef SYCL_SPECIALIZE_GEN1_BINARY_FUNC\n#undef SYCL_SPECIALIZE_GEN2_BINARY_FUNC\n#undef SYCL_SPECIALIZE_BINARY_FUNC\n#endif\n\n} // end namespace numext\n\nnamespace internal {\n\ntemplate<typename T>\nEIGEN_DEVICE_FUNC bool isfinite_impl(const std::complex<T>& x)\n{\n  return (numext::isfinite)(numext::real(x)) && (numext::isfinite)(numext::imag(x));\n}\n\ntemplate<typename T>\nEIGEN_DEVICE_FUNC bool isnan_impl(const std::complex<T>& x)\n{\n  return (numext::isnan)(numext::real(x)) || (numext::isnan)(numext::imag(x));\n}\n\ntemplate<typename T>\nEIGEN_DEVICE_FUNC bool isinf_impl(const std::complex<T>& x)\n{\n  return ((numext::isinf)(numext::real(x)) || (numext::isinf)(numext::imag(x))) && (!(numext::isnan)(x));\n}\n\n/****************************************************************************\n* Implementation of fuzzy comparisons                                       *\n****************************************************************************/\n\ntemplate<typename Scalar,\n         bool IsComplex,\n         bool IsInteger>\nstruct scalar_fuzzy_default_impl {};\n\ntemplate<typename Scalar>\nstruct scalar_fuzzy_default_impl<Scalar, false, false>\n{\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  template<typename OtherScalar> EIGEN_DEVICE_FUNC\n  static inline bool isMuchSmallerThan(const Scalar& x, const OtherScalar& y, const RealScalar& prec)\n  {\n    return numext::abs(x) <= numext::abs(y) * prec;\n  }\n  EIGEN_DEVICE_FUNC\n  static inline bool isApprox(const Scalar& x, const Scalar& y, const RealScalar& prec)\n  {\n    return numext::abs(x - y) <= numext::mini(numext::abs(x), numext::abs(y)) * prec;\n  }\n  EIGEN_DEVICE_FUNC\n  static inline bool isApproxOrLessThan(const Scalar& x, const Scalar& y, const RealScalar& prec)\n  {\n    return x <= y || isApprox(x, y, prec);\n  }\n};\n\ntemplate<typename Scalar>\nstruct scalar_fuzzy_default_impl<Scalar, false, true>\n{\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  template<typename OtherScalar> EIGEN_DEVICE_FUNC\n  static inline bool isMuchSmallerThan(const Scalar& x, const Scalar&, const RealScalar&)\n  {\n    return x == Scalar(0);\n  }\n  EIGEN_DEVICE_FUNC\n  static inline bool isApprox(const Scalar& x, const Scalar& y, const RealScalar&)\n  {\n    return x == y;\n  }\n  EIGEN_DEVICE_FUNC\n  static inline bool isApproxOrLessThan(const Scalar& x, const Scalar& y, const RealScalar&)\n  {\n    return x <= y;\n  }\n};\n\ntemplate<typename Scalar>\nstruct scalar_fuzzy_default_impl<Scalar, true, false>\n{\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  template<typename OtherScalar> EIGEN_DEVICE_FUNC\n  static inline bool isMuchSmallerThan(const Scalar& x, const OtherScalar& y, const RealScalar& prec)\n  {\n    return numext::abs2(x) <= numext::abs2(y) * prec * prec;\n  }\n  EIGEN_DEVICE_FUNC\n  static inline bool isApprox(const Scalar& x, const Scalar& y, const RealScalar& prec)\n  {\n    return numext::abs2(x - y) <= numext::mini(numext::abs2(x), numext::abs2(y)) * prec * prec;\n  }\n};\n\ntemplate<typename Scalar>\nstruct scalar_fuzzy_impl : scalar_fuzzy_default_impl<Scalar, NumTraits<Scalar>::IsComplex, NumTraits<Scalar>::IsInteger> {};\n\ntemplate<typename Scalar, typename OtherScalar> EIGEN_DEVICE_FUNC\ninline bool isMuchSmallerThan(const Scalar& x, const OtherScalar& y,\n                              const typename NumTraits<Scalar>::Real &precision = NumTraits<Scalar>::dummy_precision())\n{\n  return scalar_fuzzy_impl<Scalar>::template isMuchSmallerThan<OtherScalar>(x, y, precision);\n}\n\ntemplate<typename Scalar> EIGEN_DEVICE_FUNC\ninline bool isApprox(const Scalar& x, const Scalar& y,\n                     const typename NumTraits<Scalar>::Real &precision = NumTraits<Scalar>::dummy_precision())\n{\n  return scalar_fuzzy_impl<Scalar>::isApprox(x, y, precision);\n}\n\ntemplate<typename Scalar> EIGEN_DEVICE_FUNC\ninline bool isApproxOrLessThan(const Scalar& x, const Scalar& y,\n                               const typename NumTraits<Scalar>::Real &precision = NumTraits<Scalar>::dummy_precision())\n{\n  return scalar_fuzzy_impl<Scalar>::isApproxOrLessThan(x, y, precision);\n}\n\n/******************************************\n***  The special case of the  bool type ***\n******************************************/\n\ntemplate<> struct random_impl<bool>\n{\n  static inline bool run()\n  {\n    return random<int>(0,1)==0 ? false : true;\n  }\n};\n\ntemplate<> struct scalar_fuzzy_impl<bool>\n{\n  typedef bool RealScalar;\n\n  template<typename OtherScalar> EIGEN_DEVICE_FUNC\n  static inline bool isMuchSmallerThan(const bool& x, const bool&, const bool&)\n  {\n    return !x;\n  }\n\n  EIGEN_DEVICE_FUNC\n  static inline bool isApprox(bool x, bool y, bool)\n  {\n    return x == y;\n  }\n\n  EIGEN_DEVICE_FUNC\n  static inline bool isApproxOrLessThan(const bool& x, const bool& y, const bool&)\n  {\n    return (!x) || y;\n  }\n\n};\n\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_MATHFUNCTIONS_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/MathFunctionsImpl.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Pedro Gonnet (pedro.gonnet@gmail.com)\n// Copyright (C) 2016 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_MATHFUNCTIONSIMPL_H\n#define EIGEN_MATHFUNCTIONSIMPL_H\n\nnamespace Eigen {\n\nnamespace internal {\n\n/** \\internal \\returns the hyperbolic tan of \\a a (coeff-wise)\n    Doesn't do anything fancy, just a 13/6-degree rational interpolant which\n    is accurate up to a couple of ulps in the (approximate) range [-8, 8],\n    outside of which tanh(x) = +/-1 in single precision. The input is clamped\n    to the range [-c, c]. The value c is chosen as the smallest value where\n    the approximation evaluates to exactly 1. In the reange [-0.0004, 0.0004]\n    the approxmation tanh(x) ~= x is used for better accuracy as x tends to zero.\n\n    This implementation works on both scalars and packets.\n*/\ntemplate<typename T>\nT generic_fast_tanh_float(const T& a_x)\n{\n  // Clamp the inputs to the range [-c, c]\n#ifdef EIGEN_VECTORIZE_FMA\n  const T plus_clamp = pset1<T>(7.99881172180175781f);\n  const T minus_clamp = pset1<T>(-7.99881172180175781f);\n#else\n  const T plus_clamp = pset1<T>(7.90531110763549805f);\n  const T minus_clamp = pset1<T>(-7.90531110763549805f);\n#endif\n  const T tiny = pset1<T>(0.0004f);\n  const T x = pmax(pmin(a_x, plus_clamp), minus_clamp);\n  const T tiny_mask = pcmp_lt(pabs(a_x), tiny);\n  // The monomial coefficients of the numerator polynomial (odd).\n  const T alpha_1 = pset1<T>(4.89352455891786e-03f);\n  const T alpha_3 = pset1<T>(6.37261928875436e-04f);\n  const T alpha_5 = pset1<T>(1.48572235717979e-05f);\n  const T alpha_7 = pset1<T>(5.12229709037114e-08f);\n  const T alpha_9 = pset1<T>(-8.60467152213735e-11f);\n  const T alpha_11 = pset1<T>(2.00018790482477e-13f);\n  const T alpha_13 = pset1<T>(-2.76076847742355e-16f);\n\n  // The monomial coefficients of the denominator polynomial (even).\n  const T beta_0 = pset1<T>(4.89352518554385e-03f);\n  const T beta_2 = pset1<T>(2.26843463243900e-03f);\n  const T beta_4 = pset1<T>(1.18534705686654e-04f);\n  const T beta_6 = pset1<T>(1.19825839466702e-06f);\n\n  // Since the polynomials are odd/even, we need x^2.\n  const T x2 = pmul(x, x);\n\n  // Evaluate the numerator polynomial p.\n  T p = pmadd(x2, alpha_13, alpha_11);\n  p = pmadd(x2, p, alpha_9);\n  p = pmadd(x2, p, alpha_7);\n  p = pmadd(x2, p, alpha_5);\n  p = pmadd(x2, p, alpha_3);\n  p = pmadd(x2, p, alpha_1);\n  p = pmul(x, p);\n\n  // Evaluate the denominator polynomial q.\n  T q = pmadd(x2, beta_6, beta_4);\n  q = pmadd(x2, q, beta_2);\n  q = pmadd(x2, q, beta_0);\n\n  // Divide the numerator by the denominator.\n  return pselect(tiny_mask, x, pdiv(p, q));\n}\n\ntemplate<typename RealScalar>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nRealScalar positive_real_hypot(const RealScalar& x, const RealScalar& y)\n{\n  EIGEN_USING_STD_MATH(sqrt);\n  RealScalar p, qp;\n  p = numext::maxi(x,y);\n  if(p==RealScalar(0)) return RealScalar(0);\n  qp = numext::mini(y,x) / p;\n  return p * sqrt(RealScalar(1) + qp*qp);\n}\n\ntemplate<typename Scalar>\nstruct hypot_impl\n{\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  static EIGEN_DEVICE_FUNC\n  inline RealScalar run(const Scalar& x, const Scalar& y)\n  {\n    EIGEN_USING_STD_MATH(abs);\n    return positive_real_hypot<RealScalar>(abs(x), abs(y));\n  }\n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_MATHFUNCTIONSIMPL_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/Matrix.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2010 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_MATRIX_H\n#define EIGEN_MATRIX_H\n\nnamespace Eigen {\n\nnamespace internal {\ntemplate<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>\nstruct traits<Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> >\n{\nprivate:\n  enum { size = internal::size_at_compile_time<_Rows,_Cols>::ret };\n  typedef typename find_best_packet<_Scalar,size>::type PacketScalar;\n  enum {\n      row_major_bit = _Options&RowMajor ? RowMajorBit : 0,\n      is_dynamic_size_storage = _MaxRows==Dynamic || _MaxCols==Dynamic,\n      max_size = is_dynamic_size_storage ? Dynamic : _MaxRows*_MaxCols,\n      default_alignment = compute_default_alignment<_Scalar,max_size>::value,\n      actual_alignment = ((_Options&DontAlign)==0) ? default_alignment : 0,\n      required_alignment = unpacket_traits<PacketScalar>::alignment,\n      packet_access_bit = (packet_traits<_Scalar>::Vectorizable && (EIGEN_UNALIGNED_VECTORIZE || (actual_alignment>=required_alignment))) ? PacketAccessBit : 0\n    };\n    \npublic:\n  typedef _Scalar Scalar;\n  typedef Dense StorageKind;\n  typedef Eigen::Index StorageIndex;\n  typedef MatrixXpr XprKind;\n  enum {\n    RowsAtCompileTime = _Rows,\n    ColsAtCompileTime = _Cols,\n    MaxRowsAtCompileTime = _MaxRows,\n    MaxColsAtCompileTime = _MaxCols,\n    Flags = compute_matrix_flags<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::ret,\n    Options = _Options,\n    InnerStrideAtCompileTime = 1,\n    OuterStrideAtCompileTime = (Options&RowMajor) ? ColsAtCompileTime : RowsAtCompileTime,\n    \n    // FIXME, the following flag in only used to define NeedsToAlign in PlainObjectBase\n    EvaluatorFlags = LinearAccessBit | DirectAccessBit | packet_access_bit | row_major_bit,\n    Alignment = actual_alignment\n  };\n};\n}\n\n/** \\class Matrix\n  * \\ingroup Core_Module\n  *\n  * \\brief The matrix class, also used for vectors and row-vectors\n  *\n  * The %Matrix class is the work-horse for all \\em dense (\\ref dense \"note\") matrices and vectors within Eigen.\n  * Vectors are matrices with one column, and row-vectors are matrices with one row.\n  *\n  * The %Matrix class encompasses \\em both fixed-size and dynamic-size objects (\\ref fixedsize \"note\").\n  *\n  * The first three template parameters are required:\n  * \\tparam _Scalar Numeric type, e.g. float, double, int or std::complex<float>.\n  *                 User defined scalar types are supported as well (see \\ref user_defined_scalars \"here\").\n  * \\tparam _Rows Number of rows, or \\b Dynamic\n  * \\tparam _Cols Number of columns, or \\b Dynamic\n  *\n  * The remaining template parameters are optional -- in most cases you don't have to worry about them.\n  * \\tparam _Options A combination of either \\b #RowMajor or \\b #ColMajor, and of either\n  *                 \\b #AutoAlign or \\b #DontAlign.\n  *                 The former controls \\ref TopicStorageOrders \"storage order\", and defaults to column-major. The latter controls alignment, which is required\n  *                 for vectorization. It defaults to aligning matrices except for fixed sizes that aren't a multiple of the packet size.\n  * \\tparam _MaxRows Maximum number of rows. Defaults to \\a _Rows (\\ref maxrows \"note\").\n  * \\tparam _MaxCols Maximum number of columns. Defaults to \\a _Cols (\\ref maxrows \"note\").\n  *\n  * Eigen provides a number of typedefs covering the usual cases. Here are some examples:\n  *\n  * \\li \\c Matrix2d is a 2x2 square matrix of doubles (\\c Matrix<double, 2, 2>)\n  * \\li \\c Vector4f is a vector of 4 floats (\\c Matrix<float, 4, 1>)\n  * \\li \\c RowVector3i is a row-vector of 3 ints (\\c Matrix<int, 1, 3>)\n  *\n  * \\li \\c MatrixXf is a dynamic-size matrix of floats (\\c Matrix<float, Dynamic, Dynamic>)\n  * \\li \\c VectorXf is a dynamic-size vector of floats (\\c Matrix<float, Dynamic, 1>)\n  *\n  * \\li \\c Matrix2Xf is a partially fixed-size (dynamic-size) matrix of floats (\\c Matrix<float, 2, Dynamic>)\n  * \\li \\c MatrixX3d is a partially dynamic-size (fixed-size) matrix of double (\\c Matrix<double, Dynamic, 3>)\n  *\n  * See \\link matrixtypedefs this page \\endlink for a complete list of predefined \\em %Matrix and \\em Vector typedefs.\n  *\n  * You can access elements of vectors and matrices using normal subscripting:\n  *\n  * \\code\n  * Eigen::VectorXd v(10);\n  * v[0] = 0.1;\n  * v[1] = 0.2;\n  * v(0) = 0.3;\n  * v(1) = 0.4;\n  *\n  * Eigen::MatrixXi m(10, 10);\n  * m(0, 1) = 1;\n  * m(0, 2) = 2;\n  * m(0, 3) = 3;\n  * \\endcode\n  *\n  * This class can be extended with the help of the plugin mechanism described on the page\n  * \\ref TopicCustomizing_Plugins by defining the preprocessor symbol \\c EIGEN_MATRIX_PLUGIN.\n  *\n  * <i><b>Some notes:</b></i>\n  *\n  * <dl>\n  * <dt><b>\\anchor dense Dense versus sparse:</b></dt>\n  * <dd>This %Matrix class handles dense, not sparse matrices and vectors. For sparse matrices and vectors, see the Sparse module.\n  *\n  * Dense matrices and vectors are plain usual arrays of coefficients. All the coefficients are stored, in an ordinary contiguous array.\n  * This is unlike Sparse matrices and vectors where the coefficients are stored as a list of nonzero coefficients.</dd>\n  *\n  * <dt><b>\\anchor fixedsize Fixed-size versus dynamic-size:</b></dt>\n  * <dd>Fixed-size means that the numbers of rows and columns are known are compile-time. In this case, Eigen allocates the array\n  * of coefficients as a fixed-size array, as a class member. This makes sense for very small matrices, typically up to 4x4, sometimes up\n  * to 16x16. Larger matrices should be declared as dynamic-size even if one happens to know their size at compile-time.\n  *\n  * Dynamic-size means that the numbers of rows or columns are not necessarily known at compile-time. In this case they are runtime\n  * variables, and the array of coefficients is allocated dynamically on the heap.\n  *\n  * Note that \\em dense matrices, be they Fixed-size or Dynamic-size, <em>do not</em> expand dynamically in the sense of a std::map.\n  * If you want this behavior, see the Sparse module.</dd>\n  *\n  * <dt><b>\\anchor maxrows _MaxRows and _MaxCols:</b></dt>\n  * <dd>In most cases, one just leaves these parameters to the default values.\n  * These parameters mean the maximum size of rows and columns that the matrix may have. They are useful in cases\n  * when the exact numbers of rows and columns are not known are compile-time, but it is known at compile-time that they cannot\n  * exceed a certain value. This happens when taking dynamic-size blocks inside fixed-size matrices: in this case _MaxRows and _MaxCols\n  * are the dimensions of the original matrix, while _Rows and _Cols are Dynamic.</dd>\n  * </dl>\n  *\n  * <i><b>ABI and storage layout</b></i>\n  *\n  * The table below summarizes the ABI of some possible Matrix instances which is fixed thorough the lifetime of Eigen 3.\n  * <table  class=\"manual\">\n  * <tr><th>Matrix type</th><th>Equivalent C structure</th></tr>\n  * <tr><td>\\code Matrix<T,Dynamic,Dynamic> \\endcode</td><td>\\code\n  * struct {\n  *   T *data;                  // with (size_t(data)%EIGEN_MAX_ALIGN_BYTES)==0\n  *   Eigen::Index rows, cols;\n  *  };\n  * \\endcode</td></tr>\n  * <tr class=\"alt\"><td>\\code\n  * Matrix<T,Dynamic,1>\n  * Matrix<T,1,Dynamic> \\endcode</td><td>\\code\n  * struct {\n  *   T *data;                  // with (size_t(data)%EIGEN_MAX_ALIGN_BYTES)==0\n  *   Eigen::Index size;\n  *  };\n  * \\endcode</td></tr>\n  * <tr><td>\\code Matrix<T,Rows,Cols> \\endcode</td><td>\\code\n  * struct {\n  *   T data[Rows*Cols];        // with (size_t(data)%A(Rows*Cols*sizeof(T)))==0\n  *  };\n  * \\endcode</td></tr>\n  * <tr class=\"alt\"><td>\\code Matrix<T,Dynamic,Dynamic,0,MaxRows,MaxCols> \\endcode</td><td>\\code\n  * struct {\n  *   T data[MaxRows*MaxCols];  // with (size_t(data)%A(MaxRows*MaxCols*sizeof(T)))==0\n  *   Eigen::Index rows, cols;\n  *  };\n  * \\endcode</td></tr>\n  * </table>\n  * Note that in this table Rows, Cols, MaxRows and MaxCols are all positive integers. A(S) is defined to the largest possible power-of-two\n  * smaller to EIGEN_MAX_STATIC_ALIGN_BYTES.\n  *\n  * \\see MatrixBase for the majority of the API methods for matrices, \\ref TopicClassHierarchy,\n  * \\ref TopicStorageOrders\n  */\n\ntemplate<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>\nclass Matrix\n  : public PlainObjectBase<Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> >\n{\n  public:\n\n    /** \\brief Base class typedef.\n      * \\sa PlainObjectBase\n      */\n    typedef PlainObjectBase<Matrix> Base;\n\n    enum { Options = _Options };\n\n    EIGEN_DENSE_PUBLIC_INTERFACE(Matrix)\n\n    typedef typename Base::PlainObject PlainObject;\n\n    using Base::base;\n    using Base::coeffRef;\n\n    /**\n      * \\brief Assigns matrices to each other.\n      *\n      * \\note This is a special case of the templated operator=. Its purpose is\n      * to prevent a default operator= from hiding the templated operator=.\n      *\n      * \\callgraph\n      */\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Matrix& operator=(const Matrix& other)\n    {\n      return Base::_set(other);\n    }\n\n    /** \\internal\n      * \\brief Copies the value of the expression \\a other into \\c *this with automatic resizing.\n      *\n      * *this might be resized to match the dimensions of \\a other. If *this was a null matrix (not already initialized),\n      * it will be initialized.\n      *\n      * Note that copying a row-vector into a vector (and conversely) is allowed.\n      * The resizing, if any, is then done in the appropriate way so that row-vectors\n      * remain row-vectors and vectors remain vectors.\n      */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Matrix& operator=(const DenseBase<OtherDerived>& other)\n    {\n      return Base::_set(other);\n    }\n\n    /* Here, doxygen failed to copy the brief information when using \\copydoc */\n\n    /**\n      * \\brief Copies the generic expression \\a other into *this.\n      * \\copydetails DenseBase::operator=(const EigenBase<OtherDerived> &other)\n      */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Matrix& operator=(const EigenBase<OtherDerived> &other)\n    {\n      return Base::operator=(other);\n    }\n\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Matrix& operator=(const ReturnByValue<OtherDerived>& func)\n    {\n      return Base::operator=(func);\n    }\n\n    /** \\brief Default constructor.\n      *\n      * For fixed-size matrices, does nothing.\n      *\n      * For dynamic-size matrices, creates an empty matrix of size 0. Does not allocate any array. Such a matrix\n      * is called a null matrix. This constructor is the unique way to create null matrices: resizing\n      * a matrix to 0 is not supported.\n      *\n      * \\sa resize(Index,Index)\n      */\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Matrix() : Base()\n    {\n      Base::_check_template_params();\n      EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED\n    }\n\n    // FIXME is it still needed\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    explicit Matrix(internal::constructor_without_unaligned_array_assert)\n      : Base(internal::constructor_without_unaligned_array_assert())\n    { Base::_check_template_params(); EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED }\n\n#if EIGEN_HAS_RVALUE_REFERENCES\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Matrix(Matrix&& other) EIGEN_NOEXCEPT_IF(std::is_nothrow_move_constructible<Scalar>::value)\n      : Base(std::move(other))\n    {\n      Base::_check_template_params();\n    }\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Matrix& operator=(Matrix&& other) EIGEN_NOEXCEPT_IF(std::is_nothrow_move_assignable<Scalar>::value)\n    {\n      other.swap(*this);\n      return *this;\n    }\n#endif\n\n#if EIGEN_HAS_CXX11\n    /** \\copydoc PlainObjectBase(const Scalar&, const Scalar&, const Scalar&,  const Scalar&, const ArgTypes&... args)\n     *\n     * Example: \\include Matrix_variadic_ctor_cxx11.cpp\n     * Output: \\verbinclude Matrix_variadic_ctor_cxx11.out\n     *\n     * \\sa Matrix(const std::initializer_list<std::initializer_list<Scalar>>&)\n     */\n    template <typename... ArgTypes>\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Matrix(const Scalar& a0, const Scalar& a1, const Scalar& a2,  const Scalar& a3, const ArgTypes&... args)\n      : Base(a0, a1, a2, a3, args...) {}\n\n    /** \\brief Constructs a Matrix and initializes it from the coefficients given as initializer-lists grouped by row. \\cpp11\n      * \n      * In the general case, the constructor takes a list of rows, each row being represented as a list of coefficients:\n      * \n      * Example: \\include Matrix_initializer_list_23_cxx11.cpp\n      * Output: \\verbinclude Matrix_initializer_list_23_cxx11.out\n      * \n      * Each of the inner initializer lists must contain the exact same number of elements, otherwise an assertion is triggered.\n      * \n      * In the case of a compile-time column vector, implicit transposition from a single row is allowed.\n      * Therefore <code>VectorXd{{1,2,3,4,5}}</code> is legal and the more verbose syntax\n      * <code>RowVectorXd{{1},{2},{3},{4},{5}}</code> can be avoided:\n      * \n      * Example: \\include Matrix_initializer_list_vector_cxx11.cpp\n      * Output: \\verbinclude Matrix_initializer_list_vector_cxx11.out\n      * \n      * In the case of fixed-sized matrices, the initializer list sizes must exactly match the matrix sizes,\n      * and implicit transposition is allowed for compile-time vectors only.\n      * \n      * \\sa Matrix(const Scalar& a0, const Scalar& a1, const Scalar& a2,  const Scalar& a3, const ArgTypes&... args)\n      */\n    EIGEN_DEVICE_FUNC\n    explicit EIGEN_STRONG_INLINE Matrix(const std::initializer_list<std::initializer_list<Scalar>>& list) : Base(list) {}\n#endif // end EIGEN_HAS_CXX11\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\n\n    // This constructor is for both 1x1 matrices and dynamic vectors\n    template<typename T>\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    explicit Matrix(const T& x)\n    {\n      Base::_check_template_params();\n      Base::template _init1<T>(x);\n    }\n\n    template<typename T0, typename T1>\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Matrix(const T0& x, const T1& y)\n    {\n      Base::_check_template_params();\n      Base::template _init2<T0,T1>(x, y);\n    }\n\n\n#else\n    /** \\brief Constructs a fixed-sized matrix initialized with coefficients starting at \\a data */\n    EIGEN_DEVICE_FUNC\n    explicit Matrix(const Scalar *data);\n\n    /** \\brief Constructs a vector or row-vector with given dimension. \\only_for_vectors\n      *\n      * This is useful for dynamic-size vectors. For fixed-size vectors,\n      * it is redundant to pass these parameters, so one should use the default constructor\n      * Matrix() instead.\n      * \n      * \\warning This constructor is disabled for fixed-size \\c 1x1 matrices. For instance,\n      * calling Matrix<double,1,1>(1) will call the initialization constructor: Matrix(const Scalar&).\n      * For fixed-size \\c 1x1 matrices it is therefore recommended to use the default\n      * constructor Matrix() instead, especially when using one of the non standard\n      * \\c EIGEN_INITIALIZE_MATRICES_BY_{ZERO,\\c NAN} macros (see \\ref TopicPreprocessorDirectives).\n      */\n    EIGEN_STRONG_INLINE explicit Matrix(Index dim);\n    /** \\brief Constructs an initialized 1x1 matrix with the given coefficient\n      * \\sa Matrix(const Scalar&, const Scalar&, const Scalar&,  const Scalar&, const ArgTypes&...) */\n    Matrix(const Scalar& x);\n    /** \\brief Constructs an uninitialized matrix with \\a rows rows and \\a cols columns.\n      *\n      * This is useful for dynamic-size matrices. For fixed-size matrices,\n      * it is redundant to pass these parameters, so one should use the default constructor\n      * Matrix() instead.\n      * \n      * \\warning This constructor is disabled for fixed-size \\c 1x2 and \\c 2x1 vectors. For instance,\n      * calling Matrix2f(2,1) will call the initialization constructor: Matrix(const Scalar& x, const Scalar& y).\n      * For fixed-size \\c 1x2 or \\c 2x1 vectors it is therefore recommended to use the default\n      * constructor Matrix() instead, especially when using one of the non standard\n      * \\c EIGEN_INITIALIZE_MATRICES_BY_{ZERO,\\c NAN} macros (see \\ref TopicPreprocessorDirectives).\n      */\n    EIGEN_DEVICE_FUNC\n    Matrix(Index rows, Index cols);\n    \n    /** \\brief Constructs an initialized 2D vector with given coefficients\n      * \\sa Matrix(const Scalar&, const Scalar&, const Scalar&,  const Scalar&, const ArgTypes&...) */\n    Matrix(const Scalar& x, const Scalar& y);\n    #endif  // end EIGEN_PARSED_BY_DOXYGEN\n\n    /** \\brief Constructs an initialized 3D vector with given coefficients\n      * \\sa Matrix(const Scalar&, const Scalar&, const Scalar&,  const Scalar&, const ArgTypes&...)\n      */\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Matrix(const Scalar& x, const Scalar& y, const Scalar& z)\n    {\n      Base::_check_template_params();\n      EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Matrix, 3)\n      m_storage.data()[0] = x;\n      m_storage.data()[1] = y;\n      m_storage.data()[2] = z;\n    }\n    /** \\brief Constructs an initialized 4D vector with given coefficients\n      * \\sa Matrix(const Scalar&, const Scalar&, const Scalar&,  const Scalar&, const ArgTypes&...)\n      */\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Matrix(const Scalar& x, const Scalar& y, const Scalar& z, const Scalar& w)\n    {\n      Base::_check_template_params();\n      EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Matrix, 4)\n      m_storage.data()[0] = x;\n      m_storage.data()[1] = y;\n      m_storage.data()[2] = z;\n      m_storage.data()[3] = w;\n    }\n\n\n    /** \\brief Copy constructor */\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Matrix(const Matrix& other) : Base(other)\n    { }\n\n    /** \\brief Copy constructor for generic expressions.\n      * \\sa MatrixBase::operator=(const EigenBase<OtherDerived>&)\n      */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Matrix(const EigenBase<OtherDerived> &other)\n      : Base(other.derived())\n    { }\n\n    EIGEN_DEVICE_FUNC inline Index innerStride() const { return 1; }\n    EIGEN_DEVICE_FUNC inline Index outerStride() const { return this->innerSize(); }\n\n    /////////// Geometry module ///////////\n\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    explicit Matrix(const RotationBase<OtherDerived,ColsAtCompileTime>& r);\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    Matrix& operator=(const RotationBase<OtherDerived,ColsAtCompileTime>& r);\n\n    // allow to extend Matrix outside Eigen\n    #ifdef EIGEN_MATRIX_PLUGIN\n    #include EIGEN_MATRIX_PLUGIN\n    #endif\n\n  protected:\n    template <typename Derived, typename OtherDerived, bool IsVector>\n    friend struct internal::conservative_resize_like_impl;\n\n    using Base::m_storage;\n};\n\n/** \\defgroup matrixtypedefs Global matrix typedefs\n  *\n  * \\ingroup Core_Module\n  *\n  * %Eigen defines several typedef shortcuts for most common matrix and vector types.\n  *\n  * The general patterns are the following:\n  *\n  * \\c MatrixSizeType where \\c Size can be \\c 2,\\c 3,\\c 4 for fixed size square matrices or \\c X for dynamic size,\n  * and where \\c Type can be \\c i for integer, \\c f for float, \\c d for double, \\c cf for complex float, \\c cd\n  * for complex double.\n  *\n  * For example, \\c Matrix3d is a fixed-size 3x3 matrix type of doubles, and \\c MatrixXf is a dynamic-size matrix of floats.\n  *\n  * There are also \\c VectorSizeType and \\c RowVectorSizeType which are self-explanatory. For example, \\c Vector4cf is\n  * a fixed-size vector of 4 complex floats.\n  * \n  * With \\cpp11, template alias are also defined for common sizes.\n  * They follow the same pattern as above except that the scalar type suffix is replaced by a\n  * template parameter, i.e.:\n  *   - `MatrixSize<Type>` where `Size` can be \\c 2,\\c 3,\\c 4 for fixed size square matrices or \\c X for dynamic size.\n  *   - `MatrixXSize<Type>` and `MatrixSizeX<Type>` where `Size` can be \\c 2,\\c 3,\\c 4 for hybrid dynamic/fixed matrices.\n  *   - `VectorSize<Type>` and `RowVectorSize<Type>` for column and row vectors.\n  * \n  * With \\cpp11, you can also use fully generic column and row vector types: `Vector<Type,Size>` and `RowVector<Type,Size>`.\n  *\n  * \\sa class Matrix\n  */\n\n#define EIGEN_MAKE_TYPEDEFS(Type, TypeSuffix, Size, SizeSuffix)   \\\n/** \\ingroup matrixtypedefs */                                    \\\ntypedef Matrix<Type, Size, Size> Matrix##SizeSuffix##TypeSuffix;  \\\n/** \\ingroup matrixtypedefs */                                    \\\ntypedef Matrix<Type, Size, 1>    Vector##SizeSuffix##TypeSuffix;  \\\n/** \\ingroup matrixtypedefs */                                    \\\ntypedef Matrix<Type, 1, Size>    RowVector##SizeSuffix##TypeSuffix;\n\n#define EIGEN_MAKE_FIXED_TYPEDEFS(Type, TypeSuffix, Size)         \\\n/** \\ingroup matrixtypedefs */                                    \\\ntypedef Matrix<Type, Size, Dynamic> Matrix##Size##X##TypeSuffix;  \\\n/** \\ingroup matrixtypedefs */                                    \\\ntypedef Matrix<Type, Dynamic, Size> Matrix##X##Size##TypeSuffix;\n\n#define EIGEN_MAKE_TYPEDEFS_ALL_SIZES(Type, TypeSuffix) \\\nEIGEN_MAKE_TYPEDEFS(Type, TypeSuffix, 2, 2) \\\nEIGEN_MAKE_TYPEDEFS(Type, TypeSuffix, 3, 3) \\\nEIGEN_MAKE_TYPEDEFS(Type, TypeSuffix, 4, 4) \\\nEIGEN_MAKE_TYPEDEFS(Type, TypeSuffix, Dynamic, X) \\\nEIGEN_MAKE_FIXED_TYPEDEFS(Type, TypeSuffix, 2) \\\nEIGEN_MAKE_FIXED_TYPEDEFS(Type, TypeSuffix, 3) \\\nEIGEN_MAKE_FIXED_TYPEDEFS(Type, TypeSuffix, 4)\n\nEIGEN_MAKE_TYPEDEFS_ALL_SIZES(int,                  i)\nEIGEN_MAKE_TYPEDEFS_ALL_SIZES(float,                f)\nEIGEN_MAKE_TYPEDEFS_ALL_SIZES(double,               d)\nEIGEN_MAKE_TYPEDEFS_ALL_SIZES(std::complex<float>,  cf)\nEIGEN_MAKE_TYPEDEFS_ALL_SIZES(std::complex<double>, cd)\n\n#undef EIGEN_MAKE_TYPEDEFS_ALL_SIZES\n#undef EIGEN_MAKE_TYPEDEFS\n#undef EIGEN_MAKE_FIXED_TYPEDEFS\n\n#if EIGEN_HAS_CXX11\n\n#define EIGEN_MAKE_TYPEDEFS(Size, SizeSuffix)                     \\\n/** \\ingroup matrixtypedefs */                                    \\\n/** \\brief \\cpp11 */                                              \\\ntemplate <typename Type>                                          \\\nusing Matrix##SizeSuffix = Matrix<Type, Size, Size>;              \\\n/** \\ingroup matrixtypedefs */                                    \\\n/** \\brief \\cpp11 */                                              \\\ntemplate <typename Type>                                          \\\nusing Vector##SizeSuffix = Matrix<Type, Size, 1>;                 \\\n/** \\ingroup matrixtypedefs */                                    \\\n/** \\brief \\cpp11 */                                              \\\ntemplate <typename Type>                                          \\\nusing RowVector##SizeSuffix = Matrix<Type, 1, Size>;\n\n#define EIGEN_MAKE_FIXED_TYPEDEFS(Size)                           \\\n/** \\ingroup matrixtypedefs */                                    \\\n/** \\brief \\cpp11 */                                              \\\ntemplate <typename Type>                                          \\\nusing Matrix##Size##X = Matrix<Type, Size, Dynamic>;              \\\n/** \\ingroup matrixtypedefs */                                    \\\n/** \\brief \\cpp11 */                                              \\\ntemplate <typename Type>                                          \\\nusing Matrix##X##Size = Matrix<Type, Dynamic, Size>;\n\nEIGEN_MAKE_TYPEDEFS(2, 2)\nEIGEN_MAKE_TYPEDEFS(3, 3)\nEIGEN_MAKE_TYPEDEFS(4, 4)\nEIGEN_MAKE_TYPEDEFS(Dynamic, X)\nEIGEN_MAKE_FIXED_TYPEDEFS(2)\nEIGEN_MAKE_FIXED_TYPEDEFS(3)\nEIGEN_MAKE_FIXED_TYPEDEFS(4)\n\n/** \\ingroup matrixtypedefs\n  * \\brief \\cpp11 */\ntemplate <typename Type, int Size>\nusing Vector = Matrix<Type, Size, 1>;\n\n/** \\ingroup matrixtypedefs\n  * \\brief \\cpp11 */\ntemplate <typename Type, int Size>\nusing RowVector = Matrix<Type, 1, Size>;\n\n#undef EIGEN_MAKE_TYPEDEFS\n#undef EIGEN_MAKE_FIXED_TYPEDEFS\n\n#endif // EIGEN_HAS_CXX11\n\n} // end namespace Eigen\n\n#endif // EIGEN_MATRIX_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/MatrixBase.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2009 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_MATRIXBASE_H\n#define EIGEN_MATRIXBASE_H\n\nnamespace Eigen {\n\n/** \\class MatrixBase\n  * \\ingroup Core_Module\n  *\n  * \\brief Base class for all dense matrices, vectors, and expressions\n  *\n  * This class is the base that is inherited by all matrix, vector, and related expression\n  * types. Most of the Eigen API is contained in this class, and its base classes. Other important\n  * classes for the Eigen API are Matrix, and VectorwiseOp.\n  *\n  * Note that some methods are defined in other modules such as the \\ref LU_Module LU module\n  * for all functions related to matrix inversions.\n  *\n  * \\tparam Derived is the derived type, e.g. a matrix type, or an expression, etc.\n  *\n  * When writing a function taking Eigen objects as argument, if you want your function\n  * to take as argument any matrix, vector, or expression, just let it take a\n  * MatrixBase argument. As an example, here is a function printFirstRow which, given\n  * a matrix, vector, or expression \\a x, prints the first row of \\a x.\n  *\n  * \\code\n    template<typename Derived>\n    void printFirstRow(const Eigen::MatrixBase<Derived>& x)\n    {\n      cout << x.row(0) << endl;\n    }\n  * \\endcode\n  *\n  * This class can be extended with the help of the plugin mechanism described on the page\n  * \\ref TopicCustomizing_Plugins by defining the preprocessor symbol \\c EIGEN_MATRIXBASE_PLUGIN.\n  *\n  * \\sa \\blank \\ref TopicClassHierarchy\n  */\ntemplate<typename Derived> class MatrixBase\n  : public DenseBase<Derived>\n{\n  public:\n#ifndef EIGEN_PARSED_BY_DOXYGEN\n    typedef MatrixBase StorageBaseType;\n    typedef typename internal::traits<Derived>::StorageKind StorageKind;\n    typedef typename internal::traits<Derived>::StorageIndex StorageIndex;\n    typedef typename internal::traits<Derived>::Scalar Scalar;\n    typedef typename internal::packet_traits<Scalar>::type PacketScalar;\n    typedef typename NumTraits<Scalar>::Real RealScalar;\n\n    typedef DenseBase<Derived> Base;\n    using Base::RowsAtCompileTime;\n    using Base::ColsAtCompileTime;\n    using Base::SizeAtCompileTime;\n    using Base::MaxRowsAtCompileTime;\n    using Base::MaxColsAtCompileTime;\n    using Base::MaxSizeAtCompileTime;\n    using Base::IsVectorAtCompileTime;\n    using Base::Flags;\n\n    using Base::derived;\n    using Base::const_cast_derived;\n    using Base::rows;\n    using Base::cols;\n    using Base::size;\n    using Base::coeff;\n    using Base::coeffRef;\n    using Base::lazyAssign;\n    using Base::eval;\n    using Base::operator-;\n    using Base::operator+=;\n    using Base::operator-=;\n    using Base::operator*=;\n    using Base::operator/=;\n\n    typedef typename Base::CoeffReturnType CoeffReturnType;\n    typedef typename Base::ConstTransposeReturnType ConstTransposeReturnType;\n    typedef typename Base::RowXpr RowXpr;\n    typedef typename Base::ColXpr ColXpr;\n#endif // not EIGEN_PARSED_BY_DOXYGEN\n\n\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\n    /** type of the equivalent square matrix */\n    typedef Matrix<Scalar,EIGEN_SIZE_MAX(RowsAtCompileTime,ColsAtCompileTime),\n                          EIGEN_SIZE_MAX(RowsAtCompileTime,ColsAtCompileTime)> SquareMatrixType;\n#endif // not EIGEN_PARSED_BY_DOXYGEN\n\n    /** \\returns the size of the main diagonal, which is min(rows(),cols()).\n      * \\sa rows(), cols(), SizeAtCompileTime. */\n    EIGEN_DEVICE_FUNC\n    inline Index diagonalSize() const { return (numext::mini)(rows(),cols()); }\n\n    typedef typename Base::PlainObject PlainObject;\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\n    /** \\internal Represents a matrix with all coefficients equal to one another*/\n    typedef CwiseNullaryOp<internal::scalar_constant_op<Scalar>,PlainObject> ConstantReturnType;\n    /** \\internal the return type of MatrixBase::adjoint() */\n    typedef typename internal::conditional<NumTraits<Scalar>::IsComplex,\n                        CwiseUnaryOp<internal::scalar_conjugate_op<Scalar>, ConstTransposeReturnType>,\n                        ConstTransposeReturnType\n                     >::type AdjointReturnType;\n    /** \\internal Return type of eigenvalues() */\n    typedef Matrix<std::complex<RealScalar>, internal::traits<Derived>::ColsAtCompileTime, 1, ColMajor> EigenvaluesReturnType;\n    /** \\internal the return type of identity */\n    typedef CwiseNullaryOp<internal::scalar_identity_op<Scalar>,PlainObject> IdentityReturnType;\n    /** \\internal the return type of unit vectors */\n    typedef Block<const CwiseNullaryOp<internal::scalar_identity_op<Scalar>, SquareMatrixType>,\n                  internal::traits<Derived>::RowsAtCompileTime,\n                  internal::traits<Derived>::ColsAtCompileTime> BasisReturnType;\n#endif // not EIGEN_PARSED_BY_DOXYGEN\n\n#define EIGEN_CURRENT_STORAGE_BASE_CLASS Eigen::MatrixBase\n#define EIGEN_DOC_UNARY_ADDONS(X,Y)\n#   include \"../plugins/CommonCwiseBinaryOps.h\"\n#   include \"../plugins/MatrixCwiseUnaryOps.h\"\n#   include \"../plugins/MatrixCwiseBinaryOps.h\"\n#   ifdef EIGEN_MATRIXBASE_PLUGIN\n#     include EIGEN_MATRIXBASE_PLUGIN\n#   endif\n#undef EIGEN_CURRENT_STORAGE_BASE_CLASS\n#undef EIGEN_DOC_UNARY_ADDONS\n\n    /** Special case of the template operator=, in order to prevent the compiler\n      * from generating a default operator= (issue hit with g++ 4.1)\n      */\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Derived& operator=(const MatrixBase& other);\n\n    // We cannot inherit here via Base::operator= since it is causing\n    // trouble with MSVC.\n\n    template <typename OtherDerived>\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Derived& operator=(const DenseBase<OtherDerived>& other);\n\n    template <typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    Derived& operator=(const EigenBase<OtherDerived>& other);\n\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    Derived& operator=(const ReturnByValue<OtherDerived>& other);\n\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Derived& operator+=(const MatrixBase<OtherDerived>& other);\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Derived& operator-=(const MatrixBase<OtherDerived>& other);\n\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    const Product<Derived,OtherDerived>\n    operator*(const MatrixBase<OtherDerived> &other) const;\n\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    const Product<Derived,OtherDerived,LazyProduct>\n    lazyProduct(const MatrixBase<OtherDerived> &other) const;\n\n    template<typename OtherDerived>\n    Derived& operator*=(const EigenBase<OtherDerived>& other);\n\n    template<typename OtherDerived>\n    void applyOnTheLeft(const EigenBase<OtherDerived>& other);\n\n    template<typename OtherDerived>\n    void applyOnTheRight(const EigenBase<OtherDerived>& other);\n\n    template<typename DiagonalDerived>\n    EIGEN_DEVICE_FUNC\n    const Product<Derived, DiagonalDerived, LazyProduct>\n    operator*(const DiagonalBase<DiagonalDerived> &diagonal) const;\n\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    typename ScalarBinaryOpTraits<typename internal::traits<Derived>::Scalar,typename internal::traits<OtherDerived>::Scalar>::ReturnType\n    dot(const MatrixBase<OtherDerived>& other) const;\n\n    EIGEN_DEVICE_FUNC RealScalar squaredNorm() const;\n    EIGEN_DEVICE_FUNC RealScalar norm() const;\n    RealScalar stableNorm() const;\n    RealScalar blueNorm() const;\n    RealScalar hypotNorm() const;\n    EIGEN_DEVICE_FUNC const PlainObject normalized() const;\n    EIGEN_DEVICE_FUNC const PlainObject stableNormalized() const;\n    EIGEN_DEVICE_FUNC void normalize();\n    EIGEN_DEVICE_FUNC void stableNormalize();\n\n    EIGEN_DEVICE_FUNC const AdjointReturnType adjoint() const;\n    EIGEN_DEVICE_FUNC void adjointInPlace();\n\n    typedef Diagonal<Derived> DiagonalReturnType;\n    EIGEN_DEVICE_FUNC\n    DiagonalReturnType diagonal();\n\n    typedef typename internal::add_const<Diagonal<const Derived> >::type ConstDiagonalReturnType;\n    EIGEN_DEVICE_FUNC\n    ConstDiagonalReturnType diagonal() const;\n\n    template<int Index> struct DiagonalIndexReturnType { typedef Diagonal<Derived,Index> Type; };\n    template<int Index> struct ConstDiagonalIndexReturnType { typedef const Diagonal<const Derived,Index> Type; };\n\n    template<int Index>\n    EIGEN_DEVICE_FUNC\n    typename DiagonalIndexReturnType<Index>::Type diagonal();\n\n    template<int Index>\n    EIGEN_DEVICE_FUNC\n    typename ConstDiagonalIndexReturnType<Index>::Type diagonal() const;\n\n    typedef Diagonal<Derived,DynamicIndex> DiagonalDynamicIndexReturnType;\n    typedef typename internal::add_const<Diagonal<const Derived,DynamicIndex> >::type ConstDiagonalDynamicIndexReturnType;\n\n    EIGEN_DEVICE_FUNC\n    DiagonalDynamicIndexReturnType diagonal(Index index);\n    EIGEN_DEVICE_FUNC\n    ConstDiagonalDynamicIndexReturnType diagonal(Index index) const;\n\n    template<unsigned int Mode> struct TriangularViewReturnType { typedef TriangularView<Derived, Mode> Type; };\n    template<unsigned int Mode> struct ConstTriangularViewReturnType { typedef const TriangularView<const Derived, Mode> Type; };\n\n    template<unsigned int Mode>\n    EIGEN_DEVICE_FUNC\n    typename TriangularViewReturnType<Mode>::Type triangularView();\n    template<unsigned int Mode>\n    EIGEN_DEVICE_FUNC\n    typename ConstTriangularViewReturnType<Mode>::Type triangularView() const;\n\n    template<unsigned int UpLo> struct SelfAdjointViewReturnType { typedef SelfAdjointView<Derived, UpLo> Type; };\n    template<unsigned int UpLo> struct ConstSelfAdjointViewReturnType { typedef const SelfAdjointView<const Derived, UpLo> Type; };\n\n    template<unsigned int UpLo>\n    EIGEN_DEVICE_FUNC\n    typename SelfAdjointViewReturnType<UpLo>::Type selfadjointView();\n    template<unsigned int UpLo>\n    EIGEN_DEVICE_FUNC\n    typename ConstSelfAdjointViewReturnType<UpLo>::Type selfadjointView() const;\n\n    const SparseView<Derived> sparseView(const Scalar& m_reference = Scalar(0),\n                                         const typename NumTraits<Scalar>::Real& m_epsilon = NumTraits<Scalar>::dummy_precision()) const;\n    EIGEN_DEVICE_FUNC static const IdentityReturnType Identity();\n    EIGEN_DEVICE_FUNC static const IdentityReturnType Identity(Index rows, Index cols);\n    EIGEN_DEVICE_FUNC static const BasisReturnType Unit(Index size, Index i);\n    EIGEN_DEVICE_FUNC static const BasisReturnType Unit(Index i);\n    EIGEN_DEVICE_FUNC static const BasisReturnType UnitX();\n    EIGEN_DEVICE_FUNC static const BasisReturnType UnitY();\n    EIGEN_DEVICE_FUNC static const BasisReturnType UnitZ();\n    EIGEN_DEVICE_FUNC static const BasisReturnType UnitW();\n\n    EIGEN_DEVICE_FUNC\n    const DiagonalWrapper<const Derived> asDiagonal() const;\n    const PermutationWrapper<const Derived> asPermutation() const;\n\n    EIGEN_DEVICE_FUNC\n    Derived& setIdentity();\n    EIGEN_DEVICE_FUNC\n    Derived& setIdentity(Index rows, Index cols);\n    EIGEN_DEVICE_FUNC Derived& setUnit(Index i);\n    EIGEN_DEVICE_FUNC Derived& setUnit(Index newSize, Index i);\n\n    bool isIdentity(const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const;\n    bool isDiagonal(const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const;\n\n    bool isUpperTriangular(const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const;\n    bool isLowerTriangular(const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const;\n\n    template<typename OtherDerived>\n    bool isOrthogonal(const MatrixBase<OtherDerived>& other,\n                      const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const;\n    bool isUnitary(const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const;\n\n    /** \\returns true if each coefficients of \\c *this and \\a other are all exactly equal.\n      * \\warning When using floating point scalar values you probably should rather use a\n      *          fuzzy comparison such as isApprox()\n      * \\sa isApprox(), operator!= */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC inline bool operator==(const MatrixBase<OtherDerived>& other) const\n    { return cwiseEqual(other).all(); }\n\n    /** \\returns true if at least one pair of coefficients of \\c *this and \\a other are not exactly equal to each other.\n      * \\warning When using floating point scalar values you probably should rather use a\n      *          fuzzy comparison such as isApprox()\n      * \\sa isApprox(), operator== */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC inline bool operator!=(const MatrixBase<OtherDerived>& other) const\n    { return cwiseNotEqual(other).any(); }\n\n    NoAlias<Derived,Eigen::MatrixBase > EIGEN_DEVICE_FUNC noalias();\n\n    // TODO forceAlignedAccess is temporarily disabled\n    // Need to find a nicer workaround.\n    inline const Derived& forceAlignedAccess() const { return derived(); }\n    inline Derived& forceAlignedAccess() { return derived(); }\n    template<bool Enable> inline const Derived& forceAlignedAccessIf() const { return derived(); }\n    template<bool Enable> inline Derived& forceAlignedAccessIf() { return derived(); }\n\n    EIGEN_DEVICE_FUNC Scalar trace() const;\n\n    template<int p> EIGEN_DEVICE_FUNC RealScalar lpNorm() const;\n\n    EIGEN_DEVICE_FUNC MatrixBase<Derived>& matrix() { return *this; }\n    EIGEN_DEVICE_FUNC const MatrixBase<Derived>& matrix() const { return *this; }\n\n    /** \\returns an \\link Eigen::ArrayBase Array \\endlink expression of this matrix\n      * \\sa ArrayBase::matrix() */\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ArrayWrapper<Derived> array() { return ArrayWrapper<Derived>(derived()); }\n    /** \\returns a const \\link Eigen::ArrayBase Array \\endlink expression of this matrix\n      * \\sa ArrayBase::matrix() */\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ArrayWrapper<const Derived> array() const { return ArrayWrapper<const Derived>(derived()); }\n\n/////////// LU module ///////////\n\n    inline const FullPivLU<PlainObject> fullPivLu() const;\n    inline const PartialPivLU<PlainObject> partialPivLu() const;\n\n    inline const PartialPivLU<PlainObject> lu() const;\n\n    EIGEN_DEVICE_FUNC\n    inline const Inverse<Derived> inverse() const;\n\n    template<typename ResultType>\n    inline void computeInverseAndDetWithCheck(\n      ResultType& inverse,\n      typename ResultType::Scalar& determinant,\n      bool& invertible,\n      const RealScalar& absDeterminantThreshold = NumTraits<Scalar>::dummy_precision()\n    ) const;\n\n    template<typename ResultType>\n    inline void computeInverseWithCheck(\n      ResultType& inverse,\n      bool& invertible,\n      const RealScalar& absDeterminantThreshold = NumTraits<Scalar>::dummy_precision()\n    ) const;\n\n    EIGEN_DEVICE_FUNC\n    Scalar determinant() const;\n\n/////////// Cholesky module ///////////\n\n    inline const LLT<PlainObject>  llt() const;\n    inline const LDLT<PlainObject> ldlt() const;\n\n/////////// QR module ///////////\n\n    inline const HouseholderQR<PlainObject> householderQr() const;\n    inline const ColPivHouseholderQR<PlainObject> colPivHouseholderQr() const;\n    inline const FullPivHouseholderQR<PlainObject> fullPivHouseholderQr() const;\n    inline const CompleteOrthogonalDecomposition<PlainObject> completeOrthogonalDecomposition() const;\n\n/////////// Eigenvalues module ///////////\n\n    inline EigenvaluesReturnType eigenvalues() const;\n    inline RealScalar operatorNorm() const;\n\n/////////// SVD module ///////////\n\n    inline JacobiSVD<PlainObject> jacobiSvd(unsigned int computationOptions = 0) const;\n    inline BDCSVD<PlainObject>    bdcSvd(unsigned int computationOptions = 0) const;\n\n/////////// Geometry module ///////////\n\n    #ifndef EIGEN_PARSED_BY_DOXYGEN\n    /// \\internal helper struct to form the return type of the cross product\n    template<typename OtherDerived> struct cross_product_return_type {\n      typedef typename ScalarBinaryOpTraits<typename internal::traits<Derived>::Scalar,typename internal::traits<OtherDerived>::Scalar>::ReturnType Scalar;\n      typedef Matrix<Scalar,MatrixBase::RowsAtCompileTime,MatrixBase::ColsAtCompileTime> type;\n    };\n    #endif // EIGEN_PARSED_BY_DOXYGEN\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n#ifndef EIGEN_PARSED_BY_DOXYGEN\n    inline typename cross_product_return_type<OtherDerived>::type\n#else\n    inline PlainObject\n#endif\n    cross(const MatrixBase<OtherDerived>& other) const;\n\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    inline PlainObject cross3(const MatrixBase<OtherDerived>& other) const;\n\n    EIGEN_DEVICE_FUNC\n    inline PlainObject unitOrthogonal(void) const;\n\n    EIGEN_DEVICE_FUNC\n    inline Matrix<Scalar,3,1> eulerAngles(Index a0, Index a1, Index a2) const;\n\n    // put this as separate enum value to work around possible GCC 4.3 bug (?)\n    enum { HomogeneousReturnTypeDirection = ColsAtCompileTime==1&&RowsAtCompileTime==1 ? ((internal::traits<Derived>::Flags&RowMajorBit)==RowMajorBit ? Horizontal : Vertical)\n                                          : ColsAtCompileTime==1 ? Vertical : Horizontal };\n    typedef Homogeneous<Derived, HomogeneousReturnTypeDirection> HomogeneousReturnType;\n    EIGEN_DEVICE_FUNC\n    inline HomogeneousReturnType homogeneous() const;\n\n    enum {\n      SizeMinusOne = SizeAtCompileTime==Dynamic ? Dynamic : SizeAtCompileTime-1\n    };\n    typedef Block<const Derived,\n                  internal::traits<Derived>::ColsAtCompileTime==1 ? SizeMinusOne : 1,\n                  internal::traits<Derived>::ColsAtCompileTime==1 ? 1 : SizeMinusOne> ConstStartMinusOne;\n    typedef EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(ConstStartMinusOne,Scalar,quotient) HNormalizedReturnType;\n    EIGEN_DEVICE_FUNC\n    inline const HNormalizedReturnType hnormalized() const;\n\n////////// Householder module ///////////\n\n    EIGEN_DEVICE_FUNC\n    void makeHouseholderInPlace(Scalar& tau, RealScalar& beta);\n    template<typename EssentialPart>\n    EIGEN_DEVICE_FUNC\n    void makeHouseholder(EssentialPart& essential,\n                         Scalar& tau, RealScalar& beta) const;\n    template<typename EssentialPart>\n    EIGEN_DEVICE_FUNC\n    void applyHouseholderOnTheLeft(const EssentialPart& essential,\n                                   const Scalar& tau,\n                                   Scalar* workspace);\n    template<typename EssentialPart>\n    EIGEN_DEVICE_FUNC\n    void applyHouseholderOnTheRight(const EssentialPart& essential,\n                                    const Scalar& tau,\n                                    Scalar* workspace);\n\n///////// Jacobi module /////////\n\n    template<typename OtherScalar>\n    EIGEN_DEVICE_FUNC\n    void applyOnTheLeft(Index p, Index q, const JacobiRotation<OtherScalar>& j);\n    template<typename OtherScalar>\n    EIGEN_DEVICE_FUNC\n    void applyOnTheRight(Index p, Index q, const JacobiRotation<OtherScalar>& j);\n\n///////// SparseCore module /////////\n\n    template<typename OtherDerived>\n    EIGEN_STRONG_INLINE const typename SparseMatrixBase<OtherDerived>::template CwiseProductDenseReturnType<Derived>::Type\n    cwiseProduct(const SparseMatrixBase<OtherDerived> &other) const\n    {\n      return other.cwiseProduct(derived());\n    }\n\n///////// MatrixFunctions module /////////\n\n    typedef typename internal::stem_function<Scalar>::type StemFunction;\n#define EIGEN_MATRIX_FUNCTION(ReturnType, Name, Description) \\\n    /** \\returns an expression of the matrix Description of \\c *this. \\brief This function requires the <a href=\"unsupported/group__MatrixFunctions__Module.html\"> unsupported MatrixFunctions module</a>. To compute the coefficient-wise Description use ArrayBase::##Name . */ \\\n    const ReturnType<Derived> Name() const;\n#define EIGEN_MATRIX_FUNCTION_1(ReturnType, Name, Description, Argument) \\\n    /** \\returns an expression of the matrix Description of \\c *this. \\brief This function requires the <a href=\"unsupported/group__MatrixFunctions__Module.html\"> unsupported MatrixFunctions module</a>. To compute the coefficient-wise Description use ArrayBase::##Name . */ \\\n    const ReturnType<Derived> Name(Argument) const;\n\n    EIGEN_MATRIX_FUNCTION(MatrixExponentialReturnValue, exp, exponential)\n    /** \\brief Helper function for the <a href=\"unsupported/group__MatrixFunctions__Module.html\"> unsupported MatrixFunctions module</a>.*/\n    const MatrixFunctionReturnValue<Derived> matrixFunction(StemFunction f) const;\n    EIGEN_MATRIX_FUNCTION(MatrixFunctionReturnValue, cosh, hyperbolic cosine)\n    EIGEN_MATRIX_FUNCTION(MatrixFunctionReturnValue, sinh, hyperbolic sine)\n#if EIGEN_HAS_CXX11_MATH\n    EIGEN_MATRIX_FUNCTION(MatrixFunctionReturnValue, atanh, inverse hyperbolic cosine)\n    EIGEN_MATRIX_FUNCTION(MatrixFunctionReturnValue, acosh, inverse hyperbolic cosine)\n    EIGEN_MATRIX_FUNCTION(MatrixFunctionReturnValue, asinh, inverse hyperbolic sine)\n#endif\n    EIGEN_MATRIX_FUNCTION(MatrixFunctionReturnValue, cos, cosine)\n    EIGEN_MATRIX_FUNCTION(MatrixFunctionReturnValue, sin, sine)\n    EIGEN_MATRIX_FUNCTION(MatrixSquareRootReturnValue, sqrt, square root)\n    EIGEN_MATRIX_FUNCTION(MatrixLogarithmReturnValue, log, logarithm)\n    EIGEN_MATRIX_FUNCTION_1(MatrixPowerReturnValue,        pow, power to \\c p, const RealScalar& p)\n    EIGEN_MATRIX_FUNCTION_1(MatrixComplexPowerReturnValue, pow, power to \\c p, const std::complex<RealScalar>& p)\n\n  protected:\n    EIGEN_DEFAULT_COPY_CONSTRUCTOR(MatrixBase)\n    EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(MatrixBase)\n\n  private:\n    EIGEN_DEVICE_FUNC explicit MatrixBase(int);\n    EIGEN_DEVICE_FUNC MatrixBase(int,int);\n    template<typename OtherDerived> EIGEN_DEVICE_FUNC explicit MatrixBase(const MatrixBase<OtherDerived>&);\n  protected:\n    // mixing arrays and matrices is not legal\n    template<typename OtherDerived> Derived& operator+=(const ArrayBase<OtherDerived>& )\n    {EIGEN_STATIC_ASSERT(std::ptrdiff_t(sizeof(typename OtherDerived::Scalar))==-1,YOU_CANNOT_MIX_ARRAYS_AND_MATRICES); return *this;}\n    // mixing arrays and matrices is not legal\n    template<typename OtherDerived> Derived& operator-=(const ArrayBase<OtherDerived>& )\n    {EIGEN_STATIC_ASSERT(std::ptrdiff_t(sizeof(typename OtherDerived::Scalar))==-1,YOU_CANNOT_MIX_ARRAYS_AND_MATRICES); return *this;}\n};\n\n\n/***************************************************************************\n* Implementation of matrix base methods\n***************************************************************************/\n\n/** replaces \\c *this by \\c *this * \\a other.\n  *\n  * \\returns a reference to \\c *this\n  *\n  * Example: \\include MatrixBase_applyOnTheRight.cpp\n  * Output: \\verbinclude MatrixBase_applyOnTheRight.out\n  */\ntemplate<typename Derived>\ntemplate<typename OtherDerived>\ninline Derived&\nMatrixBase<Derived>::operator*=(const EigenBase<OtherDerived> &other)\n{\n  other.derived().applyThisOnTheRight(derived());\n  return derived();\n}\n\n/** replaces \\c *this by \\c *this * \\a other. It is equivalent to MatrixBase::operator*=().\n  *\n  * Example: \\include MatrixBase_applyOnTheRight.cpp\n  * Output: \\verbinclude MatrixBase_applyOnTheRight.out\n  */\ntemplate<typename Derived>\ntemplate<typename OtherDerived>\ninline void MatrixBase<Derived>::applyOnTheRight(const EigenBase<OtherDerived> &other)\n{\n  other.derived().applyThisOnTheRight(derived());\n}\n\n/** replaces \\c *this by \\a other * \\c *this.\n  *\n  * Example: \\include MatrixBase_applyOnTheLeft.cpp\n  * Output: \\verbinclude MatrixBase_applyOnTheLeft.out\n  */\ntemplate<typename Derived>\ntemplate<typename OtherDerived>\ninline void MatrixBase<Derived>::applyOnTheLeft(const EigenBase<OtherDerived> &other)\n{\n  other.derived().applyThisOnTheLeft(derived());\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_MATRIXBASE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/NestByValue.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_NESTBYVALUE_H\n#define EIGEN_NESTBYVALUE_H\n\nnamespace Eigen {\n\nnamespace internal {\ntemplate<typename ExpressionType>\nstruct traits<NestByValue<ExpressionType> > : public traits<ExpressionType>\n{\n  enum {\n    Flags = traits<ExpressionType>::Flags & ~NestByRefBit\n  };\n};\n}\n\n/** \\class NestByValue\n  * \\ingroup Core_Module\n  *\n  * \\brief Expression which must be nested by value\n  *\n  * \\tparam ExpressionType the type of the object of which we are requiring nesting-by-value\n  *\n  * This class is the return type of MatrixBase::nestByValue()\n  * and most of the time this is the only way it is used.\n  *\n  * \\sa MatrixBase::nestByValue()\n  */\ntemplate<typename ExpressionType> class NestByValue\n  : public internal::dense_xpr_base< NestByValue<ExpressionType> >::type\n{\n  public:\n\n    typedef typename internal::dense_xpr_base<NestByValue>::type Base;\n    EIGEN_DENSE_PUBLIC_INTERFACE(NestByValue)\n\n    EIGEN_DEVICE_FUNC explicit inline NestByValue(const ExpressionType& matrix) : m_expression(matrix) {}\n\n    EIGEN_DEVICE_FUNC inline Index rows() const { return m_expression.rows(); }\n    EIGEN_DEVICE_FUNC inline Index cols() const { return m_expression.cols(); }\n\n    EIGEN_DEVICE_FUNC operator const ExpressionType&() const { return m_expression; }\n\n    EIGEN_DEVICE_FUNC const ExpressionType& nestedExpression() const { return m_expression; }\n\n  protected:\n    const ExpressionType m_expression;\n};\n\n/** \\returns an expression of the temporary version of *this.\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC inline const NestByValue<Derived>\nDenseBase<Derived>::nestByValue() const\n{\n  return NestByValue<Derived>(derived());\n}\n\nnamespace internal {\n\n// Evaluator of Solve -> eval into a temporary\ntemplate<typename ArgType>\nstruct evaluator<NestByValue<ArgType> >\n  : public evaluator<ArgType>\n{\n  typedef evaluator<ArgType> Base;\n\n  EIGEN_DEVICE_FUNC explicit evaluator(const NestByValue<ArgType>& xpr)\n    : Base(xpr.nestedExpression())\n  {}\n};\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_NESTBYVALUE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/NoAlias.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_NOALIAS_H\n#define EIGEN_NOALIAS_H\n\nnamespace Eigen {\n\n/** \\class NoAlias\n  * \\ingroup Core_Module\n  *\n  * \\brief Pseudo expression providing an operator = assuming no aliasing\n  *\n  * \\tparam ExpressionType the type of the object on which to do the lazy assignment\n  *\n  * This class represents an expression with special assignment operators\n  * assuming no aliasing between the target expression and the source expression.\n  * More precisely it alloas to bypass the EvalBeforeAssignBit flag of the source expression.\n  * It is the return type of MatrixBase::noalias()\n  * and most of the time this is the only way it is used.\n  *\n  * \\sa MatrixBase::noalias()\n  */\ntemplate<typename ExpressionType, template <typename> class StorageBase>\nclass NoAlias\n{\n  public:\n    typedef typename ExpressionType::Scalar Scalar;\n    \n    EIGEN_DEVICE_FUNC\n    explicit NoAlias(ExpressionType& expression) : m_expression(expression) {}\n    \n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE ExpressionType& operator=(const StorageBase<OtherDerived>& other)\n    {\n      call_assignment_no_alias(m_expression, other.derived(), internal::assign_op<Scalar,typename OtherDerived::Scalar>());\n      return m_expression;\n    }\n    \n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE ExpressionType& operator+=(const StorageBase<OtherDerived>& other)\n    {\n      call_assignment_no_alias(m_expression, other.derived(), internal::add_assign_op<Scalar,typename OtherDerived::Scalar>());\n      return m_expression;\n    }\n    \n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE ExpressionType& operator-=(const StorageBase<OtherDerived>& other)\n    {\n      call_assignment_no_alias(m_expression, other.derived(), internal::sub_assign_op<Scalar,typename OtherDerived::Scalar>());\n      return m_expression;\n    }\n\n    EIGEN_DEVICE_FUNC\n    ExpressionType& expression() const\n    {\n      return m_expression;\n    }\n\n  protected:\n    ExpressionType& m_expression;\n};\n\n/** \\returns a pseudo expression of \\c *this with an operator= assuming\n  * no aliasing between \\c *this and the source expression.\n  *\n  * More precisely, noalias() allows to bypass the EvalBeforeAssignBit flag.\n  * Currently, even though several expressions may alias, only product\n  * expressions have this flag. Therefore, noalias() is only useful when\n  * the source expression contains a matrix product.\n  *\n  * Here are some examples where noalias is useful:\n  * \\code\n  * D.noalias()  = A * B;\n  * D.noalias() += A.transpose() * B;\n  * D.noalias() -= 2 * A * B.adjoint();\n  * \\endcode\n  *\n  * On the other hand the following example will lead to a \\b wrong result:\n  * \\code\n  * A.noalias() = A * B;\n  * \\endcode\n  * because the result matrix A is also an operand of the matrix product. Therefore,\n  * there is no alternative than evaluating A * B in a temporary, that is the default\n  * behavior when you write:\n  * \\code\n  * A = A * B;\n  * \\endcode\n  *\n  * \\sa class NoAlias\n  */\ntemplate<typename Derived>\nNoAlias<Derived,MatrixBase> EIGEN_DEVICE_FUNC MatrixBase<Derived>::noalias()\n{\n  return NoAlias<Derived, Eigen::MatrixBase >(derived());\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_NOALIAS_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/NumTraits.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2010 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_NUMTRAITS_H\n#define EIGEN_NUMTRAITS_H\n\nnamespace Eigen {\n\nnamespace internal {\n\n// default implementation of digits10(), based on numeric_limits if specialized,\n// 0 for integer types, and log10(epsilon()) otherwise.\ntemplate< typename T,\n          bool use_numeric_limits = std::numeric_limits<T>::is_specialized,\n          bool is_integer = NumTraits<T>::IsInteger>\nstruct default_digits10_impl\n{\n  EIGEN_DEVICE_FUNC\n  static int run() { return std::numeric_limits<T>::digits10; }\n};\n\ntemplate<typename T>\nstruct default_digits10_impl<T,false,false> // Floating point\n{\n  EIGEN_DEVICE_FUNC\n  static int run() {\n    using std::log10;\n    using std::ceil;\n    typedef typename NumTraits<T>::Real Real;\n    return int(ceil(-log10(NumTraits<Real>::epsilon())));\n  }\n};\n\ntemplate<typename T>\nstruct default_digits10_impl<T,false,true> // Integer\n{\n  EIGEN_DEVICE_FUNC\n  static int run() { return 0; }\n};\n\n\n// default implementation of digits(), based on numeric_limits if specialized,\n// 0 for integer types, and log2(epsilon()) otherwise.\ntemplate< typename T,\n          bool use_numeric_limits = std::numeric_limits<T>::is_specialized,\n          bool is_integer = NumTraits<T>::IsInteger>\nstruct default_digits_impl\n{\n  EIGEN_DEVICE_FUNC\n  static int run() { return std::numeric_limits<T>::digits; }\n};\n\ntemplate<typename T>\nstruct default_digits_impl<T,false,false> // Floating point\n{\n  EIGEN_DEVICE_FUNC\n  static int run() {\n    using std::log;\n    using std::ceil;\n    typedef typename NumTraits<T>::Real Real;\n    return int(ceil(-log(NumTraits<Real>::epsilon())/log(static_cast<Real>(2))));\n  }\n};\n\ntemplate<typename T>\nstruct default_digits_impl<T,false,true> // Integer\n{\n  EIGEN_DEVICE_FUNC\n  static int run() { return 0; }\n};\n\n} // end namespace internal\n\n/** \\class NumTraits\n  * \\ingroup Core_Module\n  *\n  * \\brief Holds information about the various numeric (i.e. scalar) types allowed by Eigen.\n  *\n  * \\tparam T the numeric type at hand\n  *\n  * This class stores enums, typedefs and static methods giving information about a numeric type.\n  *\n  * The provided data consists of:\n  * \\li A typedef \\c Real, giving the \"real part\" type of \\a T. If \\a T is already real,\n  *     then \\c Real is just a typedef to \\a T. If \\a T is \\c std::complex<U> then \\c Real\n  *     is a typedef to \\a U.\n  * \\li A typedef \\c NonInteger, giving the type that should be used for operations producing non-integral values,\n  *     such as quotients, square roots, etc. If \\a T is a floating-point type, then this typedef just gives\n  *     \\a T again. Note however that many Eigen functions such as internal::sqrt simply refuse to\n  *     take integers. Outside of a few cases, Eigen doesn't do automatic type promotion. Thus, this typedef is\n  *     only intended as a helper for code that needs to explicitly promote types.\n  * \\li A typedef \\c Literal giving the type to use for numeric literals such as \"2\" or \"0.5\". For instance, for \\c std::complex<U>, Literal is defined as \\c U.\n  *     Of course, this type must be fully compatible with \\a T. In doubt, just use \\a T here.\n  * \\li A typedef \\a Nested giving the type to use to nest a value inside of the expression tree. If you don't know what\n  *     this means, just use \\a T here.\n  * \\li An enum value \\a IsComplex. It is equal to 1 if \\a T is a \\c std::complex\n  *     type, and to 0 otherwise.\n  * \\li An enum value \\a IsInteger. It is equal to \\c 1 if \\a T is an integer type such as \\c int,\n  *     and to \\c 0 otherwise.\n  * \\li Enum values ReadCost, AddCost and MulCost representing a rough estimate of the number of CPU cycles needed\n  *     to by move / add / mul instructions respectively, assuming the data is already stored in CPU registers.\n  *     Stay vague here. No need to do architecture-specific stuff. If you don't know what this means, just use \\c Eigen::HugeCost.\n  * \\li An enum value \\a IsSigned. It is equal to \\c 1 if \\a T is a signed type and to 0 if \\a T is unsigned.\n  * \\li An enum value \\a RequireInitialization. It is equal to \\c 1 if the constructor of the numeric type \\a T must\n  *     be called, and to 0 if it is safe not to call it. Default is 0 if \\a T is an arithmetic type, and 1 otherwise.\n  * \\li An epsilon() function which, unlike <a href=\"http://en.cppreference.com/w/cpp/types/numeric_limits/epsilon\">std::numeric_limits::epsilon()</a>,\n  *     it returns a \\a Real instead of a \\a T.\n  * \\li A dummy_precision() function returning a weak epsilon value. It is mainly used as a default\n  *     value by the fuzzy comparison operators.\n  * \\li highest() and lowest() functions returning the highest and lowest possible values respectively.\n  * \\li digits10() function returning the number of decimal digits that can be represented without change. This is\n  *     the analogue of <a href=\"http://en.cppreference.com/w/cpp/types/numeric_limits/digits10\">std::numeric_limits<T>::digits10</a>\n  *     which is used as the default implementation if specialized.\n  */\n\ntemplate<typename T> struct GenericNumTraits\n{\n  enum {\n    IsInteger = std::numeric_limits<T>::is_integer,\n    IsSigned = std::numeric_limits<T>::is_signed,\n    IsComplex = 0,\n    RequireInitialization = internal::is_arithmetic<T>::value ? 0 : 1,\n    ReadCost = 1,\n    AddCost = 1,\n    MulCost = 1\n  };\n\n  typedef T Real;\n  typedef typename internal::conditional<\n                     IsInteger,\n                     typename internal::conditional<sizeof(T)<=2, float, double>::type,\n                     T\n                   >::type NonInteger;\n  typedef T Nested;\n  typedef T Literal;\n\n  EIGEN_DEVICE_FUNC\n  static inline Real epsilon()\n  {\n    return numext::numeric_limits<T>::epsilon();\n  }\n\n  EIGEN_DEVICE_FUNC\n  static inline int digits10()\n  {\n    return internal::default_digits10_impl<T>::run();\n  }\n\n  EIGEN_DEVICE_FUNC\n  static inline int digits()\n  {\n    return internal::default_digits_impl<T>::run();\n  }\n\n  EIGEN_DEVICE_FUNC\n  static inline Real dummy_precision()\n  {\n    // make sure to override this for floating-point types\n    return Real(0);\n  }\n\n\n  EIGEN_DEVICE_FUNC\n  static inline T highest() {\n    return (numext::numeric_limits<T>::max)();\n  }\n\n  EIGEN_DEVICE_FUNC\n  static inline T lowest()  {\n    return IsInteger ? (numext::numeric_limits<T>::min)()\n                     : static_cast<T>(-(numext::numeric_limits<T>::max)());\n  }\n\n  EIGEN_DEVICE_FUNC\n  static inline T infinity() {\n    return numext::numeric_limits<T>::infinity();\n  }\n\n  EIGEN_DEVICE_FUNC\n  static inline T quiet_NaN() {\n    return numext::numeric_limits<T>::quiet_NaN();\n  }\n};\n\ntemplate<typename T> struct NumTraits : GenericNumTraits<T>\n{};\n\ntemplate<> struct NumTraits<float>\n  : GenericNumTraits<float>\n{\n  EIGEN_DEVICE_FUNC\n  static inline float dummy_precision() { return 1e-5f; }\n};\n\ntemplate<> struct NumTraits<double> : GenericNumTraits<double>\n{\n  EIGEN_DEVICE_FUNC\n  static inline double dummy_precision() { return 1e-12; }\n};\n\ntemplate<> struct NumTraits<long double>\n  : GenericNumTraits<long double>\n{\n  static inline long double dummy_precision() { return 1e-15l; }\n};\n\ntemplate<typename _Real> struct NumTraits<std::complex<_Real> >\n  : GenericNumTraits<std::complex<_Real> >\n{\n  typedef _Real Real;\n  typedef typename NumTraits<_Real>::Literal Literal;\n  enum {\n    IsComplex = 1,\n    RequireInitialization = NumTraits<_Real>::RequireInitialization,\n    ReadCost = 2 * NumTraits<_Real>::ReadCost,\n    AddCost = 2 * NumTraits<Real>::AddCost,\n    MulCost = 4 * NumTraits<Real>::MulCost + 2 * NumTraits<Real>::AddCost\n  };\n\n  EIGEN_DEVICE_FUNC\n  static inline Real epsilon() { return NumTraits<Real>::epsilon(); }\n  EIGEN_DEVICE_FUNC\n  static inline Real dummy_precision() { return NumTraits<Real>::dummy_precision(); }\n  EIGEN_DEVICE_FUNC\n  static inline int digits10() { return NumTraits<Real>::digits10(); }\n};\n\ntemplate<typename Scalar, int Rows, int Cols, int Options, int MaxRows, int MaxCols>\nstruct NumTraits<Array<Scalar, Rows, Cols, Options, MaxRows, MaxCols> >\n{\n  typedef Array<Scalar, Rows, Cols, Options, MaxRows, MaxCols> ArrayType;\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  typedef Array<RealScalar, Rows, Cols, Options, MaxRows, MaxCols> Real;\n  typedef typename NumTraits<Scalar>::NonInteger NonIntegerScalar;\n  typedef Array<NonIntegerScalar, Rows, Cols, Options, MaxRows, MaxCols> NonInteger;\n  typedef ArrayType & Nested;\n  typedef typename NumTraits<Scalar>::Literal Literal;\n\n  enum {\n    IsComplex = NumTraits<Scalar>::IsComplex,\n    IsInteger = NumTraits<Scalar>::IsInteger,\n    IsSigned  = NumTraits<Scalar>::IsSigned,\n    RequireInitialization = 1,\n    ReadCost = ArrayType::SizeAtCompileTime==Dynamic ? HugeCost : ArrayType::SizeAtCompileTime * NumTraits<Scalar>::ReadCost,\n    AddCost  = ArrayType::SizeAtCompileTime==Dynamic ? HugeCost : ArrayType::SizeAtCompileTime * NumTraits<Scalar>::AddCost,\n    MulCost  = ArrayType::SizeAtCompileTime==Dynamic ? HugeCost : ArrayType::SizeAtCompileTime * NumTraits<Scalar>::MulCost\n  };\n\n  EIGEN_DEVICE_FUNC\n  static inline RealScalar epsilon() { return NumTraits<RealScalar>::epsilon(); }\n  EIGEN_DEVICE_FUNC\n  static inline RealScalar dummy_precision() { return NumTraits<RealScalar>::dummy_precision(); }\n\n  static inline int digits10() { return NumTraits<Scalar>::digits10(); }\n};\n\ntemplate<> struct NumTraits<std::string>\n  : GenericNumTraits<std::string>\n{\n  enum {\n    RequireInitialization = 1,\n    ReadCost = HugeCost,\n    AddCost  = HugeCost,\n    MulCost  = HugeCost\n  };\n\n  static inline int digits10() { return 0; }\n\nprivate:\n  static inline std::string epsilon();\n  static inline std::string dummy_precision();\n  static inline std::string lowest();\n  static inline std::string highest();\n  static inline std::string infinity();\n  static inline std::string quiet_NaN();\n};\n\n// Empty specialization for void to allow template specialization based on NumTraits<T>::Real with T==void and SFINAE.\ntemplate<> struct NumTraits<void> {};\n\ntemplate<> struct NumTraits<bool> : GenericNumTraits<bool> {};\n\n} // end namespace Eigen\n\n#endif // EIGEN_NUMTRAITS_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/PartialReduxEvaluator.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2011-2018 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_PARTIALREDUX_H\n#define EIGEN_PARTIALREDUX_H\n\nnamespace Eigen { \n\nnamespace internal {\n\n\n/***************************************************************************\n*\n* This file provides evaluators for partial reductions.\n* There are two modes:\n*\n*  - scalar path: simply calls the respective function on the column or row.\n*    -> nothing special here, all the tricky part is handled by the return\n*       types of VectorwiseOp's members. They embed the functor calling the\n*       respective DenseBase's member function.\n*\n*  - vectorized path: implements a packet-wise reductions followed by\n*    some (optional) processing of the outcome, e.g., division by n for mean.\n*\n* For the vectorized path let's observe that the packet-size and outer-unrolling\n* are both decided by the assignement logic. So all we have to do is to decide\n* on the inner unrolling.\n*\n* For the unrolling, we can reuse \"internal::redux_vec_unroller\" from Redux.h,\n* but be need to be careful to specify correct increment.\n*\n***************************************************************************/\n\n\n/* logic deciding a strategy for unrolling of vectorized paths */\ntemplate<typename Func, typename Evaluator>\nstruct packetwise_redux_traits\n{\n  enum {\n    OuterSize = int(Evaluator::IsRowMajor) ? Evaluator::RowsAtCompileTime : Evaluator::ColsAtCompileTime,\n    Cost = OuterSize == Dynamic ? HugeCost\n         : OuterSize * Evaluator::CoeffReadCost + (OuterSize-1) * functor_traits<Func>::Cost,\n    Unrolling = Cost <= EIGEN_UNROLLING_LIMIT ? CompleteUnrolling : NoUnrolling\n  };\n\n};\n\n/* Value to be returned when size==0 , by default let's return 0 */\ntemplate<typename PacketType,typename Func>\nEIGEN_DEVICE_FUNC\nPacketType packetwise_redux_empty_value(const Func& ) { return pset1<PacketType>(0); }\n\n/* For products the default is 1 */\ntemplate<typename PacketType,typename Scalar>\nEIGEN_DEVICE_FUNC\nPacketType packetwise_redux_empty_value(const scalar_product_op<Scalar,Scalar>& ) { return pset1<PacketType>(1); }\n\n/* Perform the actual reduction */\ntemplate<typename Func, typename Evaluator,\n         int Unrolling = packetwise_redux_traits<Func, Evaluator>::Unrolling\n>\nstruct packetwise_redux_impl;\n\n/* Perform the actual reduction with unrolling */\ntemplate<typename Func, typename Evaluator>\nstruct packetwise_redux_impl<Func, Evaluator, CompleteUnrolling>\n{\n  typedef redux_novec_unroller<Func,Evaluator, 0, Evaluator::SizeAtCompileTime> Base;\n  typedef typename Evaluator::Scalar Scalar;\n\n  template<typename PacketType>\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE\n  PacketType run(const Evaluator &eval, const Func& func, Index /*size*/)\n  {\n    return redux_vec_unroller<Func, Evaluator, 0, packetwise_redux_traits<Func, Evaluator>::OuterSize>::template run<PacketType>(eval,func);\n  }\n};\n\n/* Add a specialization of redux_vec_unroller for size==0 at compiletime.\n * This specialization is not required for general reductions, which is\n * why it is defined here.\n */\ntemplate<typename Func, typename Evaluator, int Start>\nstruct redux_vec_unroller<Func, Evaluator, Start, 0>\n{\n  template<typename PacketType>\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE PacketType run(const Evaluator &, const Func& f)\n  {\n    return packetwise_redux_empty_value<PacketType>(f);\n  }\n};\n\n/* Perform the actual reduction for dynamic sizes */\ntemplate<typename Func, typename Evaluator>\nstruct packetwise_redux_impl<Func, Evaluator, NoUnrolling>\n{\n  typedef typename Evaluator::Scalar Scalar;\n  typedef typename redux_traits<Func, Evaluator>::PacketType PacketScalar;\n\n  template<typename PacketType>\n  EIGEN_DEVICE_FUNC\n  static PacketType run(const Evaluator &eval, const Func& func, Index size)\n  {\n    if(size==0)\n      return packetwise_redux_empty_value<PacketType>(func);\n    \n    const Index size4 = (size-1)&(~3);\n    PacketType p = eval.template packetByOuterInner<Unaligned,PacketType>(0,0);\n    Index i = 1;\n    // This loop is optimized for instruction pipelining:\n    // - each iteration generates two independent instructions\n    // - thanks to branch prediction and out-of-order execution we have independent instructions across loops\n    for(; i<size4; i+=4)\n      p = func.packetOp(p,\n            func.packetOp(\n              func.packetOp(eval.template packetByOuterInner<Unaligned,PacketType>(i+0,0),eval.template packetByOuterInner<Unaligned,PacketType>(i+1,0)),\n              func.packetOp(eval.template packetByOuterInner<Unaligned,PacketType>(i+2,0),eval.template packetByOuterInner<Unaligned,PacketType>(i+3,0))));\n    for(; i<size; ++i)\n      p = func.packetOp(p, eval.template packetByOuterInner<Unaligned,PacketType>(i,0));\n    return p;\n  }\n};\n\ntemplate< typename ArgType, typename MemberOp, int Direction>\nstruct evaluator<PartialReduxExpr<ArgType, MemberOp, Direction> >\n  : evaluator_base<PartialReduxExpr<ArgType, MemberOp, Direction> >\n{\n  typedef PartialReduxExpr<ArgType, MemberOp, Direction> XprType;\n  typedef typename internal::nested_eval<ArgType,1>::type ArgTypeNested;\n  typedef typename internal::add_const_on_value_type<ArgTypeNested>::type ConstArgTypeNested;\n  typedef typename internal::remove_all<ArgTypeNested>::type ArgTypeNestedCleaned;\n  typedef typename ArgType::Scalar InputScalar;\n  typedef typename XprType::Scalar Scalar;\n  enum {\n    TraversalSize = Direction==int(Vertical) ? int(ArgType::RowsAtCompileTime) :  int(ArgType::ColsAtCompileTime)\n  };\n  typedef typename MemberOp::template Cost<int(TraversalSize)> CostOpType;\n  enum {\n    CoeffReadCost = TraversalSize==Dynamic ? HugeCost\n                  : TraversalSize==0 ? 1\n                  : TraversalSize * evaluator<ArgType>::CoeffReadCost + int(CostOpType::value),\n    \n    _ArgFlags = evaluator<ArgType>::Flags,\n\n    _Vectorizable =  bool(int(_ArgFlags)&PacketAccessBit)\n                  && bool(MemberOp::Vectorizable)\n                  && (Direction==int(Vertical) ? bool(_ArgFlags&RowMajorBit) : (_ArgFlags&RowMajorBit)==0)\n                  && (TraversalSize!=0),\n                  \n    Flags = (traits<XprType>::Flags&RowMajorBit)\n          | (evaluator<ArgType>::Flags&(HereditaryBits&(~RowMajorBit)))\n          | (_Vectorizable ? PacketAccessBit : 0)\n          | LinearAccessBit,\n    \n    Alignment = 0 // FIXME this will need to be improved once PartialReduxExpr is vectorized\n  };\n\n  EIGEN_DEVICE_FUNC explicit evaluator(const XprType xpr)\n    : m_arg(xpr.nestedExpression()), m_functor(xpr.functor())\n  {\n    EIGEN_INTERNAL_CHECK_COST_VALUE(TraversalSize==Dynamic ? HugeCost : (TraversalSize==0 ? 1 : int(CostOpType::value)));\n    EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);\n  }\n\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  const Scalar coeff(Index i, Index j) const\n  {\n    return coeff(Direction==Vertical ? j : i);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  const Scalar coeff(Index index) const\n  {\n    return m_functor(m_arg.template subVector<DirectionType(Direction)>(index));\n  }\n\n  template<int LoadMode,typename PacketType>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  PacketType packet(Index i, Index j) const\n  {\n    return packet<LoadMode,PacketType>(Direction==Vertical ? j : i);\n  }\n  \n  template<int LoadMode,typename PacketType>\n  EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC\n  PacketType packet(Index idx) const\n  {\n    enum { PacketSize = internal::unpacket_traits<PacketType>::size };\n    typedef Block<const ArgTypeNestedCleaned,\n                  Direction==Vertical ? int(ArgType::RowsAtCompileTime) : int(PacketSize),\n                  Direction==Vertical ? int(PacketSize) : int(ArgType::ColsAtCompileTime),\n                  true /* InnerPanel */> PanelType;\n    \n    PanelType panel(m_arg,\n                    Direction==Vertical ? 0 : idx,\n                    Direction==Vertical ? idx : 0,\n                    Direction==Vertical ? m_arg.rows() : Index(PacketSize),\n                    Direction==Vertical ? Index(PacketSize) : m_arg.cols());\n\n    // FIXME\n    // See bug 1612, currently if PacketSize==1 (i.e. complex<double> with 128bits registers) then the storage-order of panel get reversed\n    // and methods like packetByOuterInner do not make sense anymore in this context.\n    // So let's just by pass \"vectorization\" in this case:\n    if(PacketSize==1)\n      return internal::pset1<PacketType>(coeff(idx));\n    \n    typedef typename internal::redux_evaluator<PanelType> PanelEvaluator;\n    PanelEvaluator panel_eval(panel);\n    typedef typename MemberOp::BinaryOp BinaryOp;\n    PacketType p = internal::packetwise_redux_impl<BinaryOp,PanelEvaluator>::template run<PacketType>(panel_eval,m_functor.binaryFunc(),m_arg.outerSize());\n    return p;\n  }\n\nprotected:\n  ConstArgTypeNested m_arg;\n  const MemberOp m_functor;\n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_PARTIALREDUX_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/PermutationMatrix.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2009-2015 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_PERMUTATIONMATRIX_H\n#define EIGEN_PERMUTATIONMATRIX_H\n\nnamespace Eigen { \n\nnamespace internal {\n\nenum PermPermProduct_t {PermPermProduct};\n\n} // end namespace internal\n\n/** \\class PermutationBase\n  * \\ingroup Core_Module\n  *\n  * \\brief Base class for permutations\n  *\n  * \\tparam Derived the derived class\n  *\n  * This class is the base class for all expressions representing a permutation matrix,\n  * internally stored as a vector of integers.\n  * The convention followed here is that if \\f$ \\sigma \\f$ is a permutation, the corresponding permutation matrix\n  * \\f$ P_\\sigma \\f$ is such that if \\f$ (e_1,\\ldots,e_p) \\f$ is the canonical basis, we have:\n  *  \\f[ P_\\sigma(e_i) = e_{\\sigma(i)}. \\f]\n  * This convention ensures that for any two permutations \\f$ \\sigma, \\tau \\f$, we have:\n  *  \\f[ P_{\\sigma\\circ\\tau} = P_\\sigma P_\\tau. \\f]\n  *\n  * Permutation matrices are square and invertible.\n  *\n  * Notice that in addition to the member functions and operators listed here, there also are non-member\n  * operator* to multiply any kind of permutation object with any kind of matrix expression (MatrixBase)\n  * on either side.\n  *\n  * \\sa class PermutationMatrix, class PermutationWrapper\n  */\ntemplate<typename Derived>\nclass PermutationBase : public EigenBase<Derived>\n{\n    typedef internal::traits<Derived> Traits;\n    typedef EigenBase<Derived> Base;\n  public:\n\n    #ifndef EIGEN_PARSED_BY_DOXYGEN\n    typedef typename Traits::IndicesType IndicesType;\n    enum {\n      Flags = Traits::Flags,\n      RowsAtCompileTime = Traits::RowsAtCompileTime,\n      ColsAtCompileTime = Traits::ColsAtCompileTime,\n      MaxRowsAtCompileTime = Traits::MaxRowsAtCompileTime,\n      MaxColsAtCompileTime = Traits::MaxColsAtCompileTime\n    };\n    typedef typename Traits::StorageIndex StorageIndex;\n    typedef Matrix<StorageIndex,RowsAtCompileTime,ColsAtCompileTime,0,MaxRowsAtCompileTime,MaxColsAtCompileTime>\n            DenseMatrixType;\n    typedef PermutationMatrix<IndicesType::SizeAtCompileTime,IndicesType::MaxSizeAtCompileTime,StorageIndex>\n            PlainPermutationType;\n    typedef PlainPermutationType PlainObject;\n    using Base::derived;\n    typedef Inverse<Derived> InverseReturnType;\n    typedef void Scalar;\n    #endif\n\n    /** Copies the other permutation into *this */\n    template<typename OtherDerived>\n    Derived& operator=(const PermutationBase<OtherDerived>& other)\n    {\n      indices() = other.indices();\n      return derived();\n    }\n\n    /** Assignment from the Transpositions \\a tr */\n    template<typename OtherDerived>\n    Derived& operator=(const TranspositionsBase<OtherDerived>& tr)\n    {\n      setIdentity(tr.size());\n      for(Index k=size()-1; k>=0; --k)\n        applyTranspositionOnTheRight(k,tr.coeff(k));\n      return derived();\n    }\n\n    /** \\returns the number of rows */\n    inline EIGEN_DEVICE_FUNC Index rows() const { return Index(indices().size()); }\n\n    /** \\returns the number of columns */\n    inline EIGEN_DEVICE_FUNC Index cols() const { return Index(indices().size()); }\n\n    /** \\returns the size of a side of the respective square matrix, i.e., the number of indices */\n    inline EIGEN_DEVICE_FUNC Index size() const { return Index(indices().size()); }\n\n    #ifndef EIGEN_PARSED_BY_DOXYGEN\n    template<typename DenseDerived>\n    void evalTo(MatrixBase<DenseDerived>& other) const\n    {\n      other.setZero();\n      for (Index i=0; i<rows(); ++i)\n        other.coeffRef(indices().coeff(i),i) = typename DenseDerived::Scalar(1);\n    }\n    #endif\n\n    /** \\returns a Matrix object initialized from this permutation matrix. Notice that it\n      * is inefficient to return this Matrix object by value. For efficiency, favor using\n      * the Matrix constructor taking EigenBase objects.\n      */\n    DenseMatrixType toDenseMatrix() const\n    {\n      return derived();\n    }\n\n    /** const version of indices(). */\n    const IndicesType& indices() const { return derived().indices(); }\n    /** \\returns a reference to the stored array representing the permutation. */\n    IndicesType& indices() { return derived().indices(); }\n\n    /** Resizes to given size.\n      */\n    inline void resize(Index newSize)\n    {\n      indices().resize(newSize);\n    }\n\n    /** Sets *this to be the identity permutation matrix */\n    void setIdentity()\n    {\n      StorageIndex n = StorageIndex(size());\n      for(StorageIndex i = 0; i < n; ++i)\n        indices().coeffRef(i) = i;\n    }\n\n    /** Sets *this to be the identity permutation matrix of given size.\n      */\n    void setIdentity(Index newSize)\n    {\n      resize(newSize);\n      setIdentity();\n    }\n\n    /** Multiplies *this by the transposition \\f$(ij)\\f$ on the left.\n      *\n      * \\returns a reference to *this.\n      *\n      * \\warning This is much slower than applyTranspositionOnTheRight(Index,Index):\n      * this has linear complexity and requires a lot of branching.\n      *\n      * \\sa applyTranspositionOnTheRight(Index,Index)\n      */\n    Derived& applyTranspositionOnTheLeft(Index i, Index j)\n    {\n      eigen_assert(i>=0 && j>=0 && i<size() && j<size());\n      for(Index k = 0; k < size(); ++k)\n      {\n        if(indices().coeff(k) == i) indices().coeffRef(k) = StorageIndex(j);\n        else if(indices().coeff(k) == j) indices().coeffRef(k) = StorageIndex(i);\n      }\n      return derived();\n    }\n\n    /** Multiplies *this by the transposition \\f$(ij)\\f$ on the right.\n      *\n      * \\returns a reference to *this.\n      *\n      * This is a fast operation, it only consists in swapping two indices.\n      *\n      * \\sa applyTranspositionOnTheLeft(Index,Index)\n      */\n    Derived& applyTranspositionOnTheRight(Index i, Index j)\n    {\n      eigen_assert(i>=0 && j>=0 && i<size() && j<size());\n      std::swap(indices().coeffRef(i), indices().coeffRef(j));\n      return derived();\n    }\n\n    /** \\returns the inverse permutation matrix.\n      *\n      * \\note \\blank \\note_try_to_help_rvo\n      */\n    inline InverseReturnType inverse() const\n    { return InverseReturnType(derived()); }\n    /** \\returns the tranpose permutation matrix.\n      *\n      * \\note \\blank \\note_try_to_help_rvo\n      */\n    inline InverseReturnType transpose() const\n    { return InverseReturnType(derived()); }\n\n    /**** multiplication helpers to hopefully get RVO ****/\n\n  \n#ifndef EIGEN_PARSED_BY_DOXYGEN\n  protected:\n    template<typename OtherDerived>\n    void assignTranspose(const PermutationBase<OtherDerived>& other)\n    {\n      for (Index i=0; i<rows();++i) indices().coeffRef(other.indices().coeff(i)) = i;\n    }\n    template<typename Lhs,typename Rhs>\n    void assignProduct(const Lhs& lhs, const Rhs& rhs)\n    {\n      eigen_assert(lhs.cols() == rhs.rows());\n      for (Index i=0; i<rows();++i) indices().coeffRef(i) = lhs.indices().coeff(rhs.indices().coeff(i));\n    }\n#endif\n\n  public:\n\n    /** \\returns the product permutation matrix.\n      *\n      * \\note \\blank \\note_try_to_help_rvo\n      */\n    template<typename Other>\n    inline PlainPermutationType operator*(const PermutationBase<Other>& other) const\n    { return PlainPermutationType(internal::PermPermProduct, derived(), other.derived()); }\n\n    /** \\returns the product of a permutation with another inverse permutation.\n      *\n      * \\note \\blank \\note_try_to_help_rvo\n      */\n    template<typename Other>\n    inline PlainPermutationType operator*(const InverseImpl<Other,PermutationStorage>& other) const\n    { return PlainPermutationType(internal::PermPermProduct, *this, other.eval()); }\n\n    /** \\returns the product of an inverse permutation with another permutation.\n      *\n      * \\note \\blank \\note_try_to_help_rvo\n      */\n    template<typename Other> friend\n    inline PlainPermutationType operator*(const InverseImpl<Other, PermutationStorage>& other, const PermutationBase& perm)\n    { return PlainPermutationType(internal::PermPermProduct, other.eval(), perm); }\n    \n    /** \\returns the determinant of the permutation matrix, which is either 1 or -1 depending on the parity of the permutation.\n      *\n      * This function is O(\\c n) procedure allocating a buffer of \\c n booleans.\n      */\n    Index determinant() const\n    {\n      Index res = 1;\n      Index n = size();\n      Matrix<bool,RowsAtCompileTime,1,0,MaxRowsAtCompileTime> mask(n);\n      mask.fill(false);\n      Index r = 0;\n      while(r < n)\n      {\n        // search for the next seed\n        while(r<n && mask[r]) r++;\n        if(r>=n)\n          break;\n        // we got one, let's follow it until we are back to the seed\n        Index k0 = r++;\n        mask.coeffRef(k0) = true;\n        for(Index k=indices().coeff(k0); k!=k0; k=indices().coeff(k))\n        {\n          mask.coeffRef(k) = true;\n          res = -res;\n        }\n      }\n      return res;\n    }\n\n  protected:\n\n};\n\nnamespace internal {\ntemplate<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex>\nstruct traits<PermutationMatrix<SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex> >\n : traits<Matrix<_StorageIndex,SizeAtCompileTime,SizeAtCompileTime,0,MaxSizeAtCompileTime,MaxSizeAtCompileTime> >\n{\n  typedef PermutationStorage StorageKind;\n  typedef Matrix<_StorageIndex, SizeAtCompileTime, 1, 0, MaxSizeAtCompileTime, 1> IndicesType;\n  typedef _StorageIndex StorageIndex;\n  typedef void Scalar;\n};\n}\n\n/** \\class PermutationMatrix\n  * \\ingroup Core_Module\n  *\n  * \\brief Permutation matrix\n  *\n  * \\tparam SizeAtCompileTime the number of rows/cols, or Dynamic\n  * \\tparam MaxSizeAtCompileTime the maximum number of rows/cols, or Dynamic. This optional parameter defaults to SizeAtCompileTime. Most of the time, you should not have to specify it.\n  * \\tparam _StorageIndex the integer type of the indices\n  *\n  * This class represents a permutation matrix, internally stored as a vector of integers.\n  *\n  * \\sa class PermutationBase, class PermutationWrapper, class DiagonalMatrix\n  */\ntemplate<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex>\nclass PermutationMatrix : public PermutationBase<PermutationMatrix<SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex> >\n{\n    typedef PermutationBase<PermutationMatrix> Base;\n    typedef internal::traits<PermutationMatrix> Traits;\n  public:\n\n    typedef const PermutationMatrix& Nested;\n\n    #ifndef EIGEN_PARSED_BY_DOXYGEN\n    typedef typename Traits::IndicesType IndicesType;\n    typedef typename Traits::StorageIndex StorageIndex;\n    #endif\n\n    inline PermutationMatrix()\n    {}\n\n    /** Constructs an uninitialized permutation matrix of given size.\n      */\n    explicit inline PermutationMatrix(Index size) : m_indices(size)\n    {\n      eigen_internal_assert(size <= NumTraits<StorageIndex>::highest());\n    }\n\n    /** Copy constructor. */\n    template<typename OtherDerived>\n    inline PermutationMatrix(const PermutationBase<OtherDerived>& other)\n      : m_indices(other.indices()) {}\n\n    /** Generic constructor from expression of the indices. The indices\n      * array has the meaning that the permutations sends each integer i to indices[i].\n      *\n      * \\warning It is your responsibility to check that the indices array that you passes actually\n      * describes a permutation, i.e., each value between 0 and n-1 occurs exactly once, where n is the\n      * array's size.\n      */\n    template<typename Other>\n    explicit inline PermutationMatrix(const MatrixBase<Other>& indices) : m_indices(indices)\n    {}\n\n    /** Convert the Transpositions \\a tr to a permutation matrix */\n    template<typename Other>\n    explicit PermutationMatrix(const TranspositionsBase<Other>& tr)\n      : m_indices(tr.size())\n    {\n      *this = tr;\n    }\n\n    /** Copies the other permutation into *this */\n    template<typename Other>\n    PermutationMatrix& operator=(const PermutationBase<Other>& other)\n    {\n      m_indices = other.indices();\n      return *this;\n    }\n\n    /** Assignment from the Transpositions \\a tr */\n    template<typename Other>\n    PermutationMatrix& operator=(const TranspositionsBase<Other>& tr)\n    {\n      return Base::operator=(tr.derived());\n    }\n\n    /** const version of indices(). */\n    const IndicesType& indices() const { return m_indices; }\n    /** \\returns a reference to the stored array representing the permutation. */\n    IndicesType& indices() { return m_indices; }\n\n\n    /**** multiplication helpers to hopefully get RVO ****/\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\n    template<typename Other>\n    PermutationMatrix(const InverseImpl<Other,PermutationStorage>& other)\n      : m_indices(other.derived().nestedExpression().size())\n    {\n      eigen_internal_assert(m_indices.size() <= NumTraits<StorageIndex>::highest());\n      StorageIndex end = StorageIndex(m_indices.size());\n      for (StorageIndex i=0; i<end;++i)\n        m_indices.coeffRef(other.derived().nestedExpression().indices().coeff(i)) = i;\n    }\n    template<typename Lhs,typename Rhs>\n    PermutationMatrix(internal::PermPermProduct_t, const Lhs& lhs, const Rhs& rhs)\n      : m_indices(lhs.indices().size())\n    {\n      Base::assignProduct(lhs,rhs);\n    }\n#endif\n\n  protected:\n\n    IndicesType m_indices;\n};\n\n\nnamespace internal {\ntemplate<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex, int _PacketAccess>\nstruct traits<Map<PermutationMatrix<SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex>,_PacketAccess> >\n : traits<Matrix<_StorageIndex,SizeAtCompileTime,SizeAtCompileTime,0,MaxSizeAtCompileTime,MaxSizeAtCompileTime> >\n{\n  typedef PermutationStorage StorageKind;\n  typedef Map<const Matrix<_StorageIndex, SizeAtCompileTime, 1, 0, MaxSizeAtCompileTime, 1>, _PacketAccess> IndicesType;\n  typedef _StorageIndex StorageIndex;\n  typedef void Scalar;\n};\n}\n\ntemplate<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex, int _PacketAccess>\nclass Map<PermutationMatrix<SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex>,_PacketAccess>\n  : public PermutationBase<Map<PermutationMatrix<SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex>,_PacketAccess> >\n{\n    typedef PermutationBase<Map> Base;\n    typedef internal::traits<Map> Traits;\n  public:\n\n    #ifndef EIGEN_PARSED_BY_DOXYGEN\n    typedef typename Traits::IndicesType IndicesType;\n    typedef typename IndicesType::Scalar StorageIndex;\n    #endif\n\n    inline Map(const StorageIndex* indicesPtr)\n      : m_indices(indicesPtr)\n    {}\n\n    inline Map(const StorageIndex* indicesPtr, Index size)\n      : m_indices(indicesPtr,size)\n    {}\n\n    /** Copies the other permutation into *this */\n    template<typename Other>\n    Map& operator=(const PermutationBase<Other>& other)\n    { return Base::operator=(other.derived()); }\n\n    /** Assignment from the Transpositions \\a tr */\n    template<typename Other>\n    Map& operator=(const TranspositionsBase<Other>& tr)\n    { return Base::operator=(tr.derived()); }\n\n    #ifndef EIGEN_PARSED_BY_DOXYGEN\n    /** This is a special case of the templated operator=. Its purpose is to\n      * prevent a default operator= from hiding the templated operator=.\n      */\n    Map& operator=(const Map& other)\n    {\n      m_indices = other.m_indices;\n      return *this;\n    }\n    #endif\n\n    /** const version of indices(). */\n    const IndicesType& indices() const { return m_indices; }\n    /** \\returns a reference to the stored array representing the permutation. */\n    IndicesType& indices() { return m_indices; }\n\n  protected:\n\n    IndicesType m_indices;\n};\n\ntemplate<typename _IndicesType> class TranspositionsWrapper;\nnamespace internal {\ntemplate<typename _IndicesType>\nstruct traits<PermutationWrapper<_IndicesType> >\n{\n  typedef PermutationStorage StorageKind;\n  typedef void Scalar;\n  typedef typename _IndicesType::Scalar StorageIndex;\n  typedef _IndicesType IndicesType;\n  enum {\n    RowsAtCompileTime = _IndicesType::SizeAtCompileTime,\n    ColsAtCompileTime = _IndicesType::SizeAtCompileTime,\n    MaxRowsAtCompileTime = IndicesType::MaxSizeAtCompileTime,\n    MaxColsAtCompileTime = IndicesType::MaxSizeAtCompileTime,\n    Flags = 0\n  };\n};\n}\n\n/** \\class PermutationWrapper\n  * \\ingroup Core_Module\n  *\n  * \\brief Class to view a vector of integers as a permutation matrix\n  *\n  * \\tparam _IndicesType the type of the vector of integer (can be any compatible expression)\n  *\n  * This class allows to view any vector expression of integers as a permutation matrix.\n  *\n  * \\sa class PermutationBase, class PermutationMatrix\n  */\ntemplate<typename _IndicesType>\nclass PermutationWrapper : public PermutationBase<PermutationWrapper<_IndicesType> >\n{\n    typedef PermutationBase<PermutationWrapper> Base;\n    typedef internal::traits<PermutationWrapper> Traits;\n  public:\n\n    #ifndef EIGEN_PARSED_BY_DOXYGEN\n    typedef typename Traits::IndicesType IndicesType;\n    #endif\n\n    inline PermutationWrapper(const IndicesType& indices)\n      : m_indices(indices)\n    {}\n\n    /** const version of indices(). */\n    const typename internal::remove_all<typename IndicesType::Nested>::type&\n    indices() const { return m_indices; }\n\n  protected:\n\n    typename IndicesType::Nested m_indices;\n};\n\n\n/** \\returns the matrix with the permutation applied to the columns.\n  */\ntemplate<typename MatrixDerived, typename PermutationDerived>\nEIGEN_DEVICE_FUNC\nconst Product<MatrixDerived, PermutationDerived, AliasFreeProduct>\noperator*(const MatrixBase<MatrixDerived> &matrix,\n          const PermutationBase<PermutationDerived>& permutation)\n{\n  return Product<MatrixDerived, PermutationDerived, AliasFreeProduct>\n            (matrix.derived(), permutation.derived());\n}\n\n/** \\returns the matrix with the permutation applied to the rows.\n  */\ntemplate<typename PermutationDerived, typename MatrixDerived>\nEIGEN_DEVICE_FUNC\nconst Product<PermutationDerived, MatrixDerived, AliasFreeProduct>\noperator*(const PermutationBase<PermutationDerived> &permutation,\n          const MatrixBase<MatrixDerived>& matrix)\n{\n  return Product<PermutationDerived, MatrixDerived, AliasFreeProduct>\n            (permutation.derived(), matrix.derived());\n}\n\n\ntemplate<typename PermutationType>\nclass InverseImpl<PermutationType, PermutationStorage>\n  : public EigenBase<Inverse<PermutationType> >\n{\n    typedef typename PermutationType::PlainPermutationType PlainPermutationType;\n    typedef internal::traits<PermutationType> PermTraits;\n  protected:\n    InverseImpl() {}\n  public:\n    typedef Inverse<PermutationType> InverseType;\n    using EigenBase<Inverse<PermutationType> >::derived;\n\n    #ifndef EIGEN_PARSED_BY_DOXYGEN\n    typedef typename PermutationType::DenseMatrixType DenseMatrixType;\n    enum {\n      RowsAtCompileTime = PermTraits::RowsAtCompileTime,\n      ColsAtCompileTime = PermTraits::ColsAtCompileTime,\n      MaxRowsAtCompileTime = PermTraits::MaxRowsAtCompileTime,\n      MaxColsAtCompileTime = PermTraits::MaxColsAtCompileTime\n    };\n    #endif\n\n    #ifndef EIGEN_PARSED_BY_DOXYGEN\n    template<typename DenseDerived>\n    void evalTo(MatrixBase<DenseDerived>& other) const\n    {\n      other.setZero();\n      for (Index i=0; i<derived().rows();++i)\n        other.coeffRef(i, derived().nestedExpression().indices().coeff(i)) = typename DenseDerived::Scalar(1);\n    }\n    #endif\n\n    /** \\return the equivalent permutation matrix */\n    PlainPermutationType eval() const { return derived(); }\n\n    DenseMatrixType toDenseMatrix() const { return derived(); }\n\n    /** \\returns the matrix with the inverse permutation applied to the columns.\n      */\n    template<typename OtherDerived> friend\n    const Product<OtherDerived, InverseType, AliasFreeProduct>\n    operator*(const MatrixBase<OtherDerived>& matrix, const InverseType& trPerm)\n    {\n      return Product<OtherDerived, InverseType, AliasFreeProduct>(matrix.derived(), trPerm.derived());\n    }\n\n    /** \\returns the matrix with the inverse permutation applied to the rows.\n      */\n    template<typename OtherDerived>\n    const Product<InverseType, OtherDerived, AliasFreeProduct>\n    operator*(const MatrixBase<OtherDerived>& matrix) const\n    {\n      return Product<InverseType, OtherDerived, AliasFreeProduct>(derived(), matrix.derived());\n    }\n};\n\ntemplate<typename Derived>\nconst PermutationWrapper<const Derived> MatrixBase<Derived>::asPermutation() const\n{\n  return derived();\n}\n\nnamespace internal {\n\ntemplate<> struct AssignmentKind<DenseShape,PermutationShape> { typedef EigenBase2EigenBase Kind; };\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_PERMUTATIONMATRIX_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/PlainObjectBase.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_DENSESTORAGEBASE_H\n#define EIGEN_DENSESTORAGEBASE_H\n\n#if defined(EIGEN_INITIALIZE_MATRICES_BY_ZERO)\n# define EIGEN_INITIALIZE_COEFFS\n# define EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED for(int i=0;i<base().size();++i) coeffRef(i)=Scalar(0);\n#elif defined(EIGEN_INITIALIZE_MATRICES_BY_NAN)\n# define EIGEN_INITIALIZE_COEFFS\n# define EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED for(int i=0;i<base().size();++i) coeffRef(i)=std::numeric_limits<Scalar>::quiet_NaN();\n#else\n# undef EIGEN_INITIALIZE_COEFFS\n# define EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED\n#endif\n\nnamespace Eigen {\n\nnamespace internal {\n\ntemplate<int MaxSizeAtCompileTime> struct check_rows_cols_for_overflow {\n  template<typename Index>\n  EIGEN_DEVICE_FUNC\n  static EIGEN_ALWAYS_INLINE void run(Index, Index)\n  {\n  }\n};\n\ntemplate<> struct check_rows_cols_for_overflow<Dynamic> {\n  template<typename Index>\n  EIGEN_DEVICE_FUNC\n  static EIGEN_ALWAYS_INLINE void run(Index rows, Index cols)\n  {\n    // http://hg.mozilla.org/mozilla-central/file/6c8a909977d3/xpcom/ds/CheckedInt.h#l242\n    // we assume Index is signed\n    Index max_index = (std::size_t(1) << (8 * sizeof(Index) - 1)) - 1; // assume Index is signed\n    bool error = (rows == 0 || cols == 0) ? false\n               : (rows > max_index / cols);\n    if (error)\n      throw_std_bad_alloc();\n  }\n};\n\ntemplate <typename Derived,\n          typename OtherDerived = Derived,\n          bool IsVector = bool(Derived::IsVectorAtCompileTime) && bool(OtherDerived::IsVectorAtCompileTime)>\nstruct conservative_resize_like_impl;\n\ntemplate<typename MatrixTypeA, typename MatrixTypeB, bool SwapPointers> struct matrix_swap_impl;\n\n} // end namespace internal\n\n#ifdef EIGEN_PARSED_BY_DOXYGEN\nnamespace doxygen {\n\n// This is a workaround to doxygen not being able to understand the inheritance logic\n// when it is hidden by the dense_xpr_base helper struct.\n// Moreover, doxygen fails to include members that are not documented in the declaration body of\n// MatrixBase if we inherits MatrixBase<Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> >,\n// this is why we simply inherits MatrixBase, though this does not make sense.\n\n/** This class is just a workaround for Doxygen and it does not not actually exist. */\ntemplate<typename Derived> struct dense_xpr_base_dispatcher;\n/** This class is just a workaround for Doxygen and it does not not actually exist. */\ntemplate<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>\nstruct dense_xpr_base_dispatcher<Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> >\n    : public MatrixBase {};\n/** This class is just a workaround for Doxygen and it does not not actually exist. */\ntemplate<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>\nstruct dense_xpr_base_dispatcher<Array<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> >\n    : public ArrayBase {};\n\n} // namespace doxygen\n\n/** \\class PlainObjectBase\n  * \\ingroup Core_Module\n  * \\brief %Dense storage base class for matrices and arrays.\n  *\n  * This class can be extended with the help of the plugin mechanism described on the page\n  * \\ref TopicCustomizing_Plugins by defining the preprocessor symbol \\c EIGEN_PLAINOBJECTBASE_PLUGIN.\n  *\n  * \\tparam Derived is the derived type, e.g., a Matrix or Array\n  *\n  * \\sa \\ref TopicClassHierarchy\n  */\ntemplate<typename Derived>\nclass PlainObjectBase : public doxygen::dense_xpr_base_dispatcher<Derived>\n#else\ntemplate<typename Derived>\nclass PlainObjectBase : public internal::dense_xpr_base<Derived>::type\n#endif\n{\n  public:\n    enum { Options = internal::traits<Derived>::Options };\n    typedef typename internal::dense_xpr_base<Derived>::type Base;\n\n    typedef typename internal::traits<Derived>::StorageKind StorageKind;\n    typedef typename internal::traits<Derived>::Scalar Scalar;\n\n    typedef typename internal::packet_traits<Scalar>::type PacketScalar;\n    typedef typename NumTraits<Scalar>::Real RealScalar;\n    typedef Derived DenseType;\n\n    using Base::RowsAtCompileTime;\n    using Base::ColsAtCompileTime;\n    using Base::SizeAtCompileTime;\n    using Base::MaxRowsAtCompileTime;\n    using Base::MaxColsAtCompileTime;\n    using Base::MaxSizeAtCompileTime;\n    using Base::IsVectorAtCompileTime;\n    using Base::Flags;\n\n    template<typename PlainObjectType, int MapOptions, typename StrideType> friend class Eigen::Map;\n    friend  class Eigen::Map<Derived, Unaligned>;\n    typedef Eigen::Map<Derived, Unaligned>  MapType;\n    friend  class Eigen::Map<const Derived, Unaligned>;\n    typedef const Eigen::Map<const Derived, Unaligned> ConstMapType;\n#if EIGEN_MAX_ALIGN_BYTES>0\n    // for EIGEN_MAX_ALIGN_BYTES==0, AlignedMax==Unaligned, and many compilers generate warnings for friend-ing a class twice.\n    friend  class Eigen::Map<Derived, AlignedMax>;\n    friend  class Eigen::Map<const Derived, AlignedMax>;\n#endif\n    typedef Eigen::Map<Derived, AlignedMax> AlignedMapType;\n    typedef const Eigen::Map<const Derived, AlignedMax> ConstAlignedMapType;\n    template<typename StrideType> struct StridedMapType { typedef Eigen::Map<Derived, Unaligned, StrideType> type; };\n    template<typename StrideType> struct StridedConstMapType { typedef Eigen::Map<const Derived, Unaligned, StrideType> type; };\n    template<typename StrideType> struct StridedAlignedMapType { typedef Eigen::Map<Derived, AlignedMax, StrideType> type; };\n    template<typename StrideType> struct StridedConstAlignedMapType { typedef Eigen::Map<const Derived, AlignedMax, StrideType> type; };\n\n  protected:\n    DenseStorage<Scalar, Base::MaxSizeAtCompileTime, Base::RowsAtCompileTime, Base::ColsAtCompileTime, Options> m_storage;\n\n  public:\n    enum { NeedsToAlign = (SizeAtCompileTime != Dynamic) && (internal::traits<Derived>::Alignment>0) };\n    EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign)\n\n    EIGEN_DEVICE_FUNC\n    Base& base() { return *static_cast<Base*>(this); }\n    EIGEN_DEVICE_FUNC\n    const Base& base() const { return *static_cast<const Base*>(this); }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Index rows() const { return m_storage.rows(); }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Index cols() const { return m_storage.cols(); }\n\n    /** This is an overloaded version of DenseCoeffsBase<Derived,ReadOnlyAccessors>::coeff(Index,Index) const\n      * provided to by-pass the creation of an evaluator of the expression, thus saving compilation efforts.\n      *\n      * See DenseCoeffsBase<Derived,ReadOnlyAccessors>::coeff(Index) const for details. */\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const Scalar& coeff(Index rowId, Index colId) const\n    {\n      if(Flags & RowMajorBit)\n        return m_storage.data()[colId + rowId * m_storage.cols()];\n      else // column-major\n        return m_storage.data()[rowId + colId * m_storage.rows()];\n    }\n\n    /** This is an overloaded version of DenseCoeffsBase<Derived,ReadOnlyAccessors>::coeff(Index) const\n      * provided to by-pass the creation of an evaluator of the expression, thus saving compilation efforts.\n      *\n      * See DenseCoeffsBase<Derived,ReadOnlyAccessors>::coeff(Index) const for details. */\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const Scalar& coeff(Index index) const\n    {\n      return m_storage.data()[index];\n    }\n\n    /** This is an overloaded version of DenseCoeffsBase<Derived,WriteAccessors>::coeffRef(Index,Index) const\n      * provided to by-pass the creation of an evaluator of the expression, thus saving compilation efforts.\n      *\n      * See DenseCoeffsBase<Derived,WriteAccessors>::coeffRef(Index,Index) const for details. */\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Scalar& coeffRef(Index rowId, Index colId)\n    {\n      if(Flags & RowMajorBit)\n        return m_storage.data()[colId + rowId * m_storage.cols()];\n      else // column-major\n        return m_storage.data()[rowId + colId * m_storage.rows()];\n    }\n\n    /** This is an overloaded version of DenseCoeffsBase<Derived,WriteAccessors>::coeffRef(Index) const\n      * provided to by-pass the creation of an evaluator of the expression, thus saving compilation efforts.\n      *\n      * See DenseCoeffsBase<Derived,WriteAccessors>::coeffRef(Index) const for details. */\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Scalar& coeffRef(Index index)\n    {\n      return m_storage.data()[index];\n    }\n\n    /** This is the const version of coeffRef(Index,Index) which is thus synonym of coeff(Index,Index).\n      * It is provided for convenience. */\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const Scalar& coeffRef(Index rowId, Index colId) const\n    {\n      if(Flags & RowMajorBit)\n        return m_storage.data()[colId + rowId * m_storage.cols()];\n      else // column-major\n        return m_storage.data()[rowId + colId * m_storage.rows()];\n    }\n\n    /** This is the const version of coeffRef(Index) which is thus synonym of coeff(Index).\n      * It is provided for convenience. */\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const Scalar& coeffRef(Index index) const\n    {\n      return m_storage.data()[index];\n    }\n\n    /** \\internal */\n    template<int LoadMode>\n    EIGEN_STRONG_INLINE PacketScalar packet(Index rowId, Index colId) const\n    {\n      return internal::ploadt<PacketScalar, LoadMode>\n               (m_storage.data() + (Flags & RowMajorBit\n                                   ? colId + rowId * m_storage.cols()\n                                   : rowId + colId * m_storage.rows()));\n    }\n\n    /** \\internal */\n    template<int LoadMode>\n    EIGEN_STRONG_INLINE PacketScalar packet(Index index) const\n    {\n      return internal::ploadt<PacketScalar, LoadMode>(m_storage.data() + index);\n    }\n\n    /** \\internal */\n    template<int StoreMode>\n    EIGEN_STRONG_INLINE void writePacket(Index rowId, Index colId, const PacketScalar& val)\n    {\n      internal::pstoret<Scalar, PacketScalar, StoreMode>\n              (m_storage.data() + (Flags & RowMajorBit\n                                   ? colId + rowId * m_storage.cols()\n                                   : rowId + colId * m_storage.rows()), val);\n    }\n\n    /** \\internal */\n    template<int StoreMode>\n    EIGEN_STRONG_INLINE void writePacket(Index index, const PacketScalar& val)\n    {\n      internal::pstoret<Scalar, PacketScalar, StoreMode>(m_storage.data() + index, val);\n    }\n\n    /** \\returns a const pointer to the data array of this matrix */\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar *data() const\n    { return m_storage.data(); }\n\n    /** \\returns a pointer to the data array of this matrix */\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar *data()\n    { return m_storage.data(); }\n\n    /** Resizes \\c *this to a \\a rows x \\a cols matrix.\n      *\n      * This method is intended for dynamic-size matrices, although it is legal to call it on any\n      * matrix as long as fixed dimensions are left unchanged. If you only want to change the number\n      * of rows and/or of columns, you can use resize(NoChange_t, Index), resize(Index, NoChange_t).\n      *\n      * If the current number of coefficients of \\c *this exactly matches the\n      * product \\a rows * \\a cols, then no memory allocation is performed and\n      * the current values are left unchanged. In all other cases, including\n      * shrinking, the data is reallocated and all previous values are lost.\n      *\n      * Example: \\include Matrix_resize_int_int.cpp\n      * Output: \\verbinclude Matrix_resize_int_int.out\n      *\n      * \\sa resize(Index) for vectors, resize(NoChange_t, Index), resize(Index, NoChange_t)\n      */\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE void resize(Index rows, Index cols)\n    {\n      eigen_assert(   EIGEN_IMPLIES(RowsAtCompileTime!=Dynamic,rows==RowsAtCompileTime)\n                   && EIGEN_IMPLIES(ColsAtCompileTime!=Dynamic,cols==ColsAtCompileTime)\n                   && EIGEN_IMPLIES(RowsAtCompileTime==Dynamic && MaxRowsAtCompileTime!=Dynamic,rows<=MaxRowsAtCompileTime)\n                   && EIGEN_IMPLIES(ColsAtCompileTime==Dynamic && MaxColsAtCompileTime!=Dynamic,cols<=MaxColsAtCompileTime)\n                   && rows>=0 && cols>=0 && \"Invalid sizes when resizing a matrix or array.\");\n      internal::check_rows_cols_for_overflow<MaxSizeAtCompileTime>::run(rows, cols);\n      #ifdef EIGEN_INITIALIZE_COEFFS\n        Index size = rows*cols;\n        bool size_changed = size != this->size();\n        m_storage.resize(size, rows, cols);\n        if(size_changed) EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED\n      #else\n        m_storage.resize(rows*cols, rows, cols);\n      #endif\n    }\n\n    /** Resizes \\c *this to a vector of length \\a size\n      *\n      * \\only_for_vectors. This method does not work for\n      * partially dynamic matrices when the static dimension is anything other\n      * than 1. For example it will not work with Matrix<double, 2, Dynamic>.\n      *\n      * Example: \\include Matrix_resize_int.cpp\n      * Output: \\verbinclude Matrix_resize_int.out\n      *\n      * \\sa resize(Index,Index), resize(NoChange_t, Index), resize(Index, NoChange_t)\n      */\n    EIGEN_DEVICE_FUNC\n    inline void resize(Index size)\n    {\n      EIGEN_STATIC_ASSERT_VECTOR_ONLY(PlainObjectBase)\n      eigen_assert(((SizeAtCompileTime == Dynamic && (MaxSizeAtCompileTime==Dynamic || size<=MaxSizeAtCompileTime)) || SizeAtCompileTime == size) && size>=0);\n      #ifdef EIGEN_INITIALIZE_COEFFS\n        bool size_changed = size != this->size();\n      #endif\n      if(RowsAtCompileTime == 1)\n        m_storage.resize(size, 1, size);\n      else\n        m_storage.resize(size, size, 1);\n      #ifdef EIGEN_INITIALIZE_COEFFS\n        if(size_changed) EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED\n      #endif\n    }\n\n    /** Resizes the matrix, changing only the number of columns. For the parameter of type NoChange_t, just pass the special value \\c NoChange\n      * as in the example below.\n      *\n      * Example: \\include Matrix_resize_NoChange_int.cpp\n      * Output: \\verbinclude Matrix_resize_NoChange_int.out\n      *\n      * \\sa resize(Index,Index)\n      */\n    EIGEN_DEVICE_FUNC\n    inline void resize(NoChange_t, Index cols)\n    {\n      resize(rows(), cols);\n    }\n\n    /** Resizes the matrix, changing only the number of rows. For the parameter of type NoChange_t, just pass the special value \\c NoChange\n      * as in the example below.\n      *\n      * Example: \\include Matrix_resize_int_NoChange.cpp\n      * Output: \\verbinclude Matrix_resize_int_NoChange.out\n      *\n      * \\sa resize(Index,Index)\n      */\n    EIGEN_DEVICE_FUNC\n    inline void resize(Index rows, NoChange_t)\n    {\n      resize(rows, cols());\n    }\n\n    /** Resizes \\c *this to have the same dimensions as \\a other.\n      * Takes care of doing all the checking that's needed.\n      *\n      * Note that copying a row-vector into a vector (and conversely) is allowed.\n      * The resizing, if any, is then done in the appropriate way so that row-vectors\n      * remain row-vectors and vectors remain vectors.\n      */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE void resizeLike(const EigenBase<OtherDerived>& _other)\n    {\n      const OtherDerived& other = _other.derived();\n      internal::check_rows_cols_for_overflow<MaxSizeAtCompileTime>::run(other.rows(), other.cols());\n      const Index othersize = other.rows()*other.cols();\n      if(RowsAtCompileTime == 1)\n      {\n        eigen_assert(other.rows() == 1 || other.cols() == 1);\n        resize(1, othersize);\n      }\n      else if(ColsAtCompileTime == 1)\n      {\n        eigen_assert(other.rows() == 1 || other.cols() == 1);\n        resize(othersize, 1);\n      }\n      else resize(other.rows(), other.cols());\n    }\n\n    /** Resizes the matrix to \\a rows x \\a cols while leaving old values untouched.\n      *\n      * The method is intended for matrices of dynamic size. If you only want to change the number\n      * of rows and/or of columns, you can use conservativeResize(NoChange_t, Index) or\n      * conservativeResize(Index, NoChange_t).\n      *\n      * Matrices are resized relative to the top-left element. In case values need to be\n      * appended to the matrix they will be uninitialized.\n      */\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE void conservativeResize(Index rows, Index cols)\n    {\n      internal::conservative_resize_like_impl<Derived>::run(*this, rows, cols);\n    }\n\n    /** Resizes the matrix to \\a rows x \\a cols while leaving old values untouched.\n      *\n      * As opposed to conservativeResize(Index rows, Index cols), this version leaves\n      * the number of columns unchanged.\n      *\n      * In case the matrix is growing, new rows will be uninitialized.\n      */\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE void conservativeResize(Index rows, NoChange_t)\n    {\n      // Note: see the comment in conservativeResize(Index,Index)\n      conservativeResize(rows, cols());\n    }\n\n    /** Resizes the matrix to \\a rows x \\a cols while leaving old values untouched.\n      *\n      * As opposed to conservativeResize(Index rows, Index cols), this version leaves\n      * the number of rows unchanged.\n      *\n      * In case the matrix is growing, new columns will be uninitialized.\n      */\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE void conservativeResize(NoChange_t, Index cols)\n    {\n      // Note: see the comment in conservativeResize(Index,Index)\n      conservativeResize(rows(), cols);\n    }\n\n    /** Resizes the vector to \\a size while retaining old values.\n      *\n      * \\only_for_vectors. This method does not work for\n      * partially dynamic matrices when the static dimension is anything other\n      * than 1. For example it will not work with Matrix<double, 2, Dynamic>.\n      *\n      * When values are appended, they will be uninitialized.\n      */\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE void conservativeResize(Index size)\n    {\n      internal::conservative_resize_like_impl<Derived>::run(*this, size);\n    }\n\n    /** Resizes the matrix to \\a rows x \\a cols of \\c other, while leaving old values untouched.\n      *\n      * The method is intended for matrices of dynamic size. If you only want to change the number\n      * of rows and/or of columns, you can use conservativeResize(NoChange_t, Index) or\n      * conservativeResize(Index, NoChange_t).\n      *\n      * Matrices are resized relative to the top-left element. In case values need to be\n      * appended to the matrix they will copied from \\c other.\n      */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE void conservativeResizeLike(const DenseBase<OtherDerived>& other)\n    {\n      internal::conservative_resize_like_impl<Derived,OtherDerived>::run(*this, other);\n    }\n\n    /** This is a special case of the templated operator=. Its purpose is to\n      * prevent a default operator= from hiding the templated operator=.\n      */\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Derived& operator=(const PlainObjectBase& other)\n    {\n      return _set(other);\n    }\n\n    /** \\sa MatrixBase::lazyAssign() */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Derived& lazyAssign(const DenseBase<OtherDerived>& other)\n    {\n      _resize_to_match(other);\n      return Base::lazyAssign(other.derived());\n    }\n\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Derived& operator=(const ReturnByValue<OtherDerived>& func)\n    {\n      resize(func.rows(), func.cols());\n      return Base::operator=(func);\n    }\n\n    // Prevent user from trying to instantiate PlainObjectBase objects\n    // by making all its constructor protected. See bug 1074.\n  protected:\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE PlainObjectBase() : m_storage()\n    {\n//       _check_template_params();\n//       EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED\n    }\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\n    // FIXME is it still needed ?\n    /** \\internal */\n    EIGEN_DEVICE_FUNC\n    explicit PlainObjectBase(internal::constructor_without_unaligned_array_assert)\n      : m_storage(internal::constructor_without_unaligned_array_assert())\n    {\n//       _check_template_params(); EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED\n    }\n#endif\n\n#if EIGEN_HAS_RVALUE_REFERENCES\n    EIGEN_DEVICE_FUNC\n    PlainObjectBase(PlainObjectBase&& other) EIGEN_NOEXCEPT\n      : m_storage( std::move(other.m_storage) )\n    {\n    }\n\n    EIGEN_DEVICE_FUNC\n    PlainObjectBase& operator=(PlainObjectBase&& other) EIGEN_NOEXCEPT\n    {\n      using std::swap;\n      swap(m_storage, other.m_storage);\n      return *this;\n    }\n#endif\n\n    /** Copy constructor */\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE PlainObjectBase(const PlainObjectBase& other)\n      : Base(), m_storage(other.m_storage) { }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE PlainObjectBase(Index size, Index rows, Index cols)\n      : m_storage(size, rows, cols)\n    {\n//       _check_template_params();\n//       EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED\n    }\n\n    #if EIGEN_HAS_CXX11\n    /** \\brief Construct a row of column vector with fixed size from an arbitrary number of coefficients. \\cpp11\n      *\n      * \\only_for_vectors\n      * \n      * This constructor is for 1D array or vectors with more than 4 coefficients.\n      * There exists C++98 analogue constructors for fixed-size array/vector having 1, 2, 3, or 4 coefficients.\n      * \n      * \\warning To construct a column (resp. row) vector of fixed length, the number of values passed to this \n      * constructor must match the the fixed number of rows (resp. columns) of \\c *this.\n      */\n    template <typename... ArgTypes>\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    PlainObjectBase(const Scalar& a0, const Scalar& a1, const Scalar& a2,  const Scalar& a3, const ArgTypes&... args)\n      : m_storage()\n    {\n      _check_template_params();\n      EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(PlainObjectBase, sizeof...(args) + 4);\n      m_storage.data()[0] = a0;\n      m_storage.data()[1] = a1;\n      m_storage.data()[2] = a2;\n      m_storage.data()[3] = a3;\n      int i = 4;\n      auto x = {(m_storage.data()[i++] = args, 0)...};\n      static_cast<void>(x);\n    }\n\n    /** \\brief Constructs a Matrix or Array and initializes it by elements given by an initializer list of initializer\n      * lists \\cpp11\n      */\n    EIGEN_DEVICE_FUNC\n    explicit EIGEN_STRONG_INLINE PlainObjectBase(const std::initializer_list<std::initializer_list<Scalar>>& list)\n      : m_storage()\n    {\n      _check_template_params();\n\n      size_t list_size = 0;\n      if (list.begin() != list.end()) {\n        list_size = list.begin()->size();\n      }\n\n      // This is to allow syntax like VectorXi {{1, 2, 3, 4}}\n      if (ColsAtCompileTime == 1 && list.size() == 1) {\n        eigen_assert(list_size == static_cast<size_t>(RowsAtCompileTime) || RowsAtCompileTime == Dynamic);\n        resize(list_size, ColsAtCompileTime);\n        std::copy(list.begin()->begin(), list.begin()->end(), m_storage.data());\n      } else {\n        eigen_assert(list.size() == static_cast<size_t>(RowsAtCompileTime) || RowsAtCompileTime == Dynamic);\n        eigen_assert(list_size == static_cast<size_t>(ColsAtCompileTime) || ColsAtCompileTime == Dynamic);\n        resize(list.size(), list_size);\n       \n        Index row_index = 0;\n        for (const std::initializer_list<Scalar>& row : list) {\n          eigen_assert(list_size == row.size());\n          Index col_index = 0;\n          for (const Scalar& e : row) {\n            coeffRef(row_index, col_index) = e;\n            ++col_index;\n          }\n          ++row_index;\n        }\n      }\n    }\n    #endif  // end EIGEN_HAS_CXX11\n\n    /** \\sa PlainObjectBase::operator=(const EigenBase<OtherDerived>&) */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE PlainObjectBase(const DenseBase<OtherDerived> &other)\n      : m_storage()\n    {\n      _check_template_params();\n      resizeLike(other);\n      _set_noalias(other);\n    }\n\n    /** \\sa PlainObjectBase::operator=(const EigenBase<OtherDerived>&) */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE PlainObjectBase(const EigenBase<OtherDerived> &other)\n      : m_storage()\n    {\n      _check_template_params();\n      resizeLike(other);\n      *this = other.derived();\n    }\n    /** \\brief Copy constructor with in-place evaluation */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE PlainObjectBase(const ReturnByValue<OtherDerived>& other)\n    {\n      _check_template_params();\n      // FIXME this does not automatically transpose vectors if necessary\n      resize(other.rows(), other.cols());\n      other.evalTo(this->derived());\n    }\n\n  public:\n\n    /** \\brief Copies the generic expression \\a other into *this.\n      * \\copydetails DenseBase::operator=(const EigenBase<OtherDerived> &other)\n      */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Derived& operator=(const EigenBase<OtherDerived> &other)\n    {\n      _resize_to_match(other);\n      Base::operator=(other.derived());\n      return this->derived();\n    }\n\n    /** \\name Map\n      * These are convenience functions returning Map objects. The Map() static functions return unaligned Map objects,\n      * while the AlignedMap() functions return aligned Map objects and thus should be called only with 16-byte-aligned\n      * \\a data pointers.\n      *\n      * Here is an example using strides:\n      * \\include Matrix_Map_stride.cpp\n      * Output: \\verbinclude Matrix_Map_stride.out\n      *\n      * \\see class Map\n      */\n    //@{\n    static inline ConstMapType Map(const Scalar* data)\n    { return ConstMapType(data); }\n    static inline MapType Map(Scalar* data)\n    { return MapType(data); }\n    static inline ConstMapType Map(const Scalar* data, Index size)\n    { return ConstMapType(data, size); }\n    static inline MapType Map(Scalar* data, Index size)\n    { return MapType(data, size); }\n    static inline ConstMapType Map(const Scalar* data, Index rows, Index cols)\n    { return ConstMapType(data, rows, cols); }\n    static inline MapType Map(Scalar* data, Index rows, Index cols)\n    { return MapType(data, rows, cols); }\n\n    static inline ConstAlignedMapType MapAligned(const Scalar* data)\n    { return ConstAlignedMapType(data); }\n    static inline AlignedMapType MapAligned(Scalar* data)\n    { return AlignedMapType(data); }\n    static inline ConstAlignedMapType MapAligned(const Scalar* data, Index size)\n    { return ConstAlignedMapType(data, size); }\n    static inline AlignedMapType MapAligned(Scalar* data, Index size)\n    { return AlignedMapType(data, size); }\n    static inline ConstAlignedMapType MapAligned(const Scalar* data, Index rows, Index cols)\n    { return ConstAlignedMapType(data, rows, cols); }\n    static inline AlignedMapType MapAligned(Scalar* data, Index rows, Index cols)\n    { return AlignedMapType(data, rows, cols); }\n\n    template<int Outer, int Inner>\n    static inline typename StridedConstMapType<Stride<Outer, Inner> >::type Map(const Scalar* data, const Stride<Outer, Inner>& stride)\n    { return typename StridedConstMapType<Stride<Outer, Inner> >::type(data, stride); }\n    template<int Outer, int Inner>\n    static inline typename StridedMapType<Stride<Outer, Inner> >::type Map(Scalar* data, const Stride<Outer, Inner>& stride)\n    { return typename StridedMapType<Stride<Outer, Inner> >::type(data, stride); }\n    template<int Outer, int Inner>\n    static inline typename StridedConstMapType<Stride<Outer, Inner> >::type Map(const Scalar* data, Index size, const Stride<Outer, Inner>& stride)\n    { return typename StridedConstMapType<Stride<Outer, Inner> >::type(data, size, stride); }\n    template<int Outer, int Inner>\n    static inline typename StridedMapType<Stride<Outer, Inner> >::type Map(Scalar* data, Index size, const Stride<Outer, Inner>& stride)\n    { return typename StridedMapType<Stride<Outer, Inner> >::type(data, size, stride); }\n    template<int Outer, int Inner>\n    static inline typename StridedConstMapType<Stride<Outer, Inner> >::type Map(const Scalar* data, Index rows, Index cols, const Stride<Outer, Inner>& stride)\n    { return typename StridedConstMapType<Stride<Outer, Inner> >::type(data, rows, cols, stride); }\n    template<int Outer, int Inner>\n    static inline typename StridedMapType<Stride<Outer, Inner> >::type Map(Scalar* data, Index rows, Index cols, const Stride<Outer, Inner>& stride)\n    { return typename StridedMapType<Stride<Outer, Inner> >::type(data, rows, cols, stride); }\n\n    template<int Outer, int Inner>\n    static inline typename StridedConstAlignedMapType<Stride<Outer, Inner> >::type MapAligned(const Scalar* data, const Stride<Outer, Inner>& stride)\n    { return typename StridedConstAlignedMapType<Stride<Outer, Inner> >::type(data, stride); }\n    template<int Outer, int Inner>\n    static inline typename StridedAlignedMapType<Stride<Outer, Inner> >::type MapAligned(Scalar* data, const Stride<Outer, Inner>& stride)\n    { return typename StridedAlignedMapType<Stride<Outer, Inner> >::type(data, stride); }\n    template<int Outer, int Inner>\n    static inline typename StridedConstAlignedMapType<Stride<Outer, Inner> >::type MapAligned(const Scalar* data, Index size, const Stride<Outer, Inner>& stride)\n    { return typename StridedConstAlignedMapType<Stride<Outer, Inner> >::type(data, size, stride); }\n    template<int Outer, int Inner>\n    static inline typename StridedAlignedMapType<Stride<Outer, Inner> >::type MapAligned(Scalar* data, Index size, const Stride<Outer, Inner>& stride)\n    { return typename StridedAlignedMapType<Stride<Outer, Inner> >::type(data, size, stride); }\n    template<int Outer, int Inner>\n    static inline typename StridedConstAlignedMapType<Stride<Outer, Inner> >::type MapAligned(const Scalar* data, Index rows, Index cols, const Stride<Outer, Inner>& stride)\n    { return typename StridedConstAlignedMapType<Stride<Outer, Inner> >::type(data, rows, cols, stride); }\n    template<int Outer, int Inner>\n    static inline typename StridedAlignedMapType<Stride<Outer, Inner> >::type MapAligned(Scalar* data, Index rows, Index cols, const Stride<Outer, Inner>& stride)\n    { return typename StridedAlignedMapType<Stride<Outer, Inner> >::type(data, rows, cols, stride); }\n    //@}\n\n    using Base::setConstant;\n    EIGEN_DEVICE_FUNC Derived& setConstant(Index size, const Scalar& val);\n    EIGEN_DEVICE_FUNC Derived& setConstant(Index rows, Index cols, const Scalar& val);\n\n    using Base::setZero;\n    EIGEN_DEVICE_FUNC Derived& setZero(Index size);\n    EIGEN_DEVICE_FUNC Derived& setZero(Index rows, Index cols);\n\n    using Base::setOnes;\n    EIGEN_DEVICE_FUNC Derived& setOnes(Index size);\n    EIGEN_DEVICE_FUNC Derived& setOnes(Index rows, Index cols);\n\n    using Base::setRandom;\n    Derived& setRandom(Index size);\n    Derived& setRandom(Index rows, Index cols);\n\n    #ifdef EIGEN_PLAINOBJECTBASE_PLUGIN\n    #include EIGEN_PLAINOBJECTBASE_PLUGIN\n    #endif\n\n  protected:\n    /** \\internal Resizes *this in preparation for assigning \\a other to it.\n      * Takes care of doing all the checking that's needed.\n      *\n      * Note that copying a row-vector into a vector (and conversely) is allowed.\n      * The resizing, if any, is then done in the appropriate way so that row-vectors\n      * remain row-vectors and vectors remain vectors.\n      */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE void _resize_to_match(const EigenBase<OtherDerived>& other)\n    {\n      #ifdef EIGEN_NO_AUTOMATIC_RESIZING\n      eigen_assert((this->size()==0 || (IsVectorAtCompileTime ? (this->size() == other.size())\n                 : (rows() == other.rows() && cols() == other.cols())))\n        && \"Size mismatch. Automatic resizing is disabled because EIGEN_NO_AUTOMATIC_RESIZING is defined\");\n      EIGEN_ONLY_USED_FOR_DEBUG(other);\n      #else\n      resizeLike(other);\n      #endif\n    }\n\n    /**\n      * \\brief Copies the value of the expression \\a other into \\c *this with automatic resizing.\n      *\n      * *this might be resized to match the dimensions of \\a other. If *this was a null matrix (not already initialized),\n      * it will be initialized.\n      *\n      * Note that copying a row-vector into a vector (and conversely) is allowed.\n      * The resizing, if any, is then done in the appropriate way so that row-vectors\n      * remain row-vectors and vectors remain vectors.\n      *\n      * \\sa operator=(const MatrixBase<OtherDerived>&), _set_noalias()\n      *\n      * \\internal\n      */\n    // aliasing is dealt once in internal::call_assignment\n    // so at this stage we have to assume aliasing... and resising has to be done later.\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Derived& _set(const DenseBase<OtherDerived>& other)\n    {\n      internal::call_assignment(this->derived(), other.derived());\n      return this->derived();\n    }\n\n    /** \\internal Like _set() but additionally makes the assumption that no aliasing effect can happen (which\n      * is the case when creating a new matrix) so one can enforce lazy evaluation.\n      *\n      * \\sa operator=(const MatrixBase<OtherDerived>&), _set()\n      */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Derived& _set_noalias(const DenseBase<OtherDerived>& other)\n    {\n      // I don't think we need this resize call since the lazyAssign will anyways resize\n      // and lazyAssign will be called by the assign selector.\n      //_resize_to_match(other);\n      // the 'false' below means to enforce lazy evaluation. We don't use lazyAssign() because\n      // it wouldn't allow to copy a row-vector into a column-vector.\n      internal::call_assignment_no_alias(this->derived(), other.derived(), internal::assign_op<Scalar,typename OtherDerived::Scalar>());\n      return this->derived();\n    }\n\n    template<typename T0, typename T1>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE void _init2(Index rows, Index cols, typename internal::enable_if<Base::SizeAtCompileTime!=2,T0>::type* = 0)\n    {\n      const bool t0_is_integer_alike = internal::is_valid_index_type<T0>::value;\n      const bool t1_is_integer_alike = internal::is_valid_index_type<T1>::value;\n      EIGEN_STATIC_ASSERT(t0_is_integer_alike &&\n                          t1_is_integer_alike,\n                          FLOATING_POINT_ARGUMENT_PASSED__INTEGER_WAS_EXPECTED)\n      resize(rows,cols);\n    }\n\n    template<typename T0, typename T1>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE void _init2(const T0& val0, const T1& val1, typename internal::enable_if<Base::SizeAtCompileTime==2,T0>::type* = 0)\n    {\n      EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(PlainObjectBase, 2)\n      m_storage.data()[0] = Scalar(val0);\n      m_storage.data()[1] = Scalar(val1);\n    }\n\n    template<typename T0, typename T1>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE void _init2(const Index& val0, const Index& val1,\n                                    typename internal::enable_if<    (!internal::is_same<Index,Scalar>::value)\n                                                                  && (internal::is_same<T0,Index>::value)\n                                                                  && (internal::is_same<T1,Index>::value)\n                                                                  && Base::SizeAtCompileTime==2,T1>::type* = 0)\n    {\n      EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(PlainObjectBase, 2)\n      m_storage.data()[0] = Scalar(val0);\n      m_storage.data()[1] = Scalar(val1);\n    }\n\n    // The argument is convertible to the Index type and we either have a non 1x1 Matrix, or a dynamic-sized Array,\n    // then the argument is meant to be the size of the object.\n    template<typename T>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE void _init1(Index size, typename internal::enable_if<    (Base::SizeAtCompileTime!=1 || !internal::is_convertible<T, Scalar>::value)\n                                                                              && ((!internal::is_same<typename internal::traits<Derived>::XprKind,ArrayXpr>::value || Base::SizeAtCompileTime==Dynamic)),T>::type* = 0)\n    {\n      // NOTE MSVC 2008 complains if we directly put bool(NumTraits<T>::IsInteger) as the EIGEN_STATIC_ASSERT argument.\n      const bool is_integer_alike = internal::is_valid_index_type<T>::value;\n      EIGEN_UNUSED_VARIABLE(is_integer_alike);\n      EIGEN_STATIC_ASSERT(is_integer_alike,\n                          FLOATING_POINT_ARGUMENT_PASSED__INTEGER_WAS_EXPECTED)\n      resize(size);\n    }\n\n    // We have a 1x1 matrix/array => the argument is interpreted as the value of the unique coefficient (case where scalar type can be implicitly converted)\n    template<typename T>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE void _init1(const Scalar& val0, typename internal::enable_if<Base::SizeAtCompileTime==1 && internal::is_convertible<T, Scalar>::value,T>::type* = 0)\n    {\n      EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(PlainObjectBase, 1)\n      m_storage.data()[0] = val0;\n    }\n\n    // We have a 1x1 matrix/array => the argument is interpreted as the value of the unique coefficient (case where scalar type match the index type)\n    template<typename T>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE void _init1(const Index& val0,\n                                    typename internal::enable_if<    (!internal::is_same<Index,Scalar>::value)\n                                                                  && (internal::is_same<Index,T>::value)\n                                                                  && Base::SizeAtCompileTime==1\n                                                                  && internal::is_convertible<T, Scalar>::value,T*>::type* = 0)\n    {\n      EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(PlainObjectBase, 1)\n      m_storage.data()[0] = Scalar(val0);\n    }\n\n    // Initialize a fixed size matrix from a pointer to raw data\n    template<typename T>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE void _init1(const Scalar* data){\n      this->_set_noalias(ConstMapType(data));\n    }\n\n    // Initialize an arbitrary matrix from a dense expression\n    template<typename T, typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE void _init1(const DenseBase<OtherDerived>& other){\n      this->_set_noalias(other);\n    }\n\n    // Initialize an arbitrary matrix from an object convertible to the Derived type.\n    template<typename T>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE void _init1(const Derived& other){\n      this->_set_noalias(other);\n    }\n\n    // Initialize an arbitrary matrix from a generic Eigen expression\n    template<typename T, typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE void _init1(const EigenBase<OtherDerived>& other){\n      this->derived() = other;\n    }\n\n    template<typename T, typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE void _init1(const ReturnByValue<OtherDerived>& other)\n    {\n      resize(other.rows(), other.cols());\n      other.evalTo(this->derived());\n    }\n\n    template<typename T, typename OtherDerived, int ColsAtCompileTime>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE void _init1(const RotationBase<OtherDerived,ColsAtCompileTime>& r)\n    {\n      this->derived() = r;\n    }\n\n    // For fixed-size Array<Scalar,...>\n    template<typename T>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE void _init1(const Scalar& val0,\n                                    typename internal::enable_if<    Base::SizeAtCompileTime!=Dynamic\n                                                                  && Base::SizeAtCompileTime!=1\n                                                                  && internal::is_convertible<T, Scalar>::value\n                                                                  && internal::is_same<typename internal::traits<Derived>::XprKind,ArrayXpr>::value,T>::type* = 0)\n    {\n      Base::setConstant(val0);\n    }\n\n    // For fixed-size Array<Index,...>\n    template<typename T>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE void _init1(const Index& val0,\n                                    typename internal::enable_if<    (!internal::is_same<Index,Scalar>::value)\n                                                                  && (internal::is_same<Index,T>::value)\n                                                                  && Base::SizeAtCompileTime!=Dynamic\n                                                                  && Base::SizeAtCompileTime!=1\n                                                                  && internal::is_convertible<T, Scalar>::value\n                                                                  && internal::is_same<typename internal::traits<Derived>::XprKind,ArrayXpr>::value,T*>::type* = 0)\n    {\n      Base::setConstant(val0);\n    }\n\n    template<typename MatrixTypeA, typename MatrixTypeB, bool SwapPointers>\n    friend struct internal::matrix_swap_impl;\n\n  public:\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\n    /** \\internal\n      * \\brief Override DenseBase::swap() since for dynamic-sized matrices\n      * of same type it is enough to swap the data pointers.\n      */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    void swap(DenseBase<OtherDerived> & other)\n    {\n      enum { SwapPointers = internal::is_same<Derived, OtherDerived>::value && Base::SizeAtCompileTime==Dynamic };\n      internal::matrix_swap_impl<Derived, OtherDerived, bool(SwapPointers)>::run(this->derived(), other.derived());\n    }\n\n    /** \\internal\n      * \\brief const version forwarded to DenseBase::swap\n      */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    void swap(DenseBase<OtherDerived> const & other)\n    { Base::swap(other.derived()); }\n\n    EIGEN_DEVICE_FUNC\n    static EIGEN_STRONG_INLINE void _check_template_params()\n    {\n      EIGEN_STATIC_ASSERT((EIGEN_IMPLIES(MaxRowsAtCompileTime==1 && MaxColsAtCompileTime!=1, (Options&RowMajor)==RowMajor)\n                        && EIGEN_IMPLIES(MaxColsAtCompileTime==1 && MaxRowsAtCompileTime!=1, (Options&RowMajor)==0)\n                        && ((RowsAtCompileTime == Dynamic) || (RowsAtCompileTime >= 0))\n                        && ((ColsAtCompileTime == Dynamic) || (ColsAtCompileTime >= 0))\n                        && ((MaxRowsAtCompileTime == Dynamic) || (MaxRowsAtCompileTime >= 0))\n                        && ((MaxColsAtCompileTime == Dynamic) || (MaxColsAtCompileTime >= 0))\n                        && (MaxRowsAtCompileTime == RowsAtCompileTime || RowsAtCompileTime==Dynamic)\n                        && (MaxColsAtCompileTime == ColsAtCompileTime || ColsAtCompileTime==Dynamic)\n                        && (Options & (DontAlign|RowMajor)) == Options),\n        INVALID_MATRIX_TEMPLATE_PARAMETERS)\n    }\n\n    enum { IsPlainObjectBase = 1 };\n#endif\n};\n\nnamespace internal {\n\ntemplate <typename Derived, typename OtherDerived, bool IsVector>\nstruct conservative_resize_like_impl\n{\n  #if EIGEN_HAS_TYPE_TRAITS\n  static const bool IsRelocatable = std::is_trivially_copyable<typename Derived::Scalar>::value;\n  #else\n  static const bool IsRelocatable = !NumTraits<typename Derived::Scalar>::RequireInitialization;\n  #endif\n  static void run(DenseBase<Derived>& _this, Index rows, Index cols)\n  {\n    if (_this.rows() == rows && _this.cols() == cols) return;\n    EIGEN_STATIC_ASSERT_DYNAMIC_SIZE(Derived)\n\n    if ( IsRelocatable\n          && (( Derived::IsRowMajor && _this.cols() == cols) ||  // row-major and we change only the number of rows\n              (!Derived::IsRowMajor && _this.rows() == rows) ))  // column-major and we change only the number of columns\n    {\n      internal::check_rows_cols_for_overflow<Derived::MaxSizeAtCompileTime>::run(rows, cols);\n      _this.derived().m_storage.conservativeResize(rows*cols,rows,cols);\n    }\n    else\n    {\n      // The storage order does not allow us to use reallocation.\n      typename Derived::PlainObject tmp(rows,cols);\n      const Index common_rows = numext::mini(rows, _this.rows());\n      const Index common_cols = numext::mini(cols, _this.cols());\n      tmp.block(0,0,common_rows,common_cols) = _this.block(0,0,common_rows,common_cols);\n      _this.derived().swap(tmp);\n    }\n  }\n\n  static void run(DenseBase<Derived>& _this, const DenseBase<OtherDerived>& other)\n  {\n    if (_this.rows() == other.rows() && _this.cols() == other.cols()) return;\n\n    // Note: Here is space for improvement. Basically, for conservativeResize(Index,Index),\n    // neither RowsAtCompileTime or ColsAtCompileTime must be Dynamic. If only one of the\n    // dimensions is dynamic, one could use either conservativeResize(Index rows, NoChange_t) or\n    // conservativeResize(NoChange_t, Index cols). For these methods new static asserts like\n    // EIGEN_STATIC_ASSERT_DYNAMIC_ROWS and EIGEN_STATIC_ASSERT_DYNAMIC_COLS would be good.\n    EIGEN_STATIC_ASSERT_DYNAMIC_SIZE(Derived)\n    EIGEN_STATIC_ASSERT_DYNAMIC_SIZE(OtherDerived)\n\n    if ( IsRelocatable &&\n          (( Derived::IsRowMajor && _this.cols() == other.cols()) ||  // row-major and we change only the number of rows\n           (!Derived::IsRowMajor && _this.rows() == other.rows()) ))  // column-major and we change only the number of columns\n    {\n      const Index new_rows = other.rows() - _this.rows();\n      const Index new_cols = other.cols() - _this.cols();\n      _this.derived().m_storage.conservativeResize(other.size(),other.rows(),other.cols());\n      if (new_rows>0)\n        _this.bottomRightCorner(new_rows, other.cols()) = other.bottomRows(new_rows);\n      else if (new_cols>0)\n        _this.bottomRightCorner(other.rows(), new_cols) = other.rightCols(new_cols);\n    }\n    else\n    {\n      // The storage order does not allow us to use reallocation.\n      typename Derived::PlainObject tmp(other);\n      const Index common_rows = numext::mini(tmp.rows(), _this.rows());\n      const Index common_cols = numext::mini(tmp.cols(), _this.cols());\n      tmp.block(0,0,common_rows,common_cols) = _this.block(0,0,common_rows,common_cols);\n      _this.derived().swap(tmp);\n    }\n  }\n};\n\n// Here, the specialization for vectors inherits from the general matrix case\n// to allow calling .conservativeResize(rows,cols) on vectors.\ntemplate <typename Derived, typename OtherDerived>\nstruct conservative_resize_like_impl<Derived,OtherDerived,true>\n  : conservative_resize_like_impl<Derived,OtherDerived,false>\n{\n  typedef conservative_resize_like_impl<Derived,OtherDerived,false> Base;\n  using Base::run;\n  using Base::IsRelocatable;\n\n  static void run(DenseBase<Derived>& _this, Index size)\n  {\n    const Index new_rows = Derived::RowsAtCompileTime==1 ? 1 : size;\n    const Index new_cols = Derived::RowsAtCompileTime==1 ? size : 1;\n    if(IsRelocatable)\n      _this.derived().m_storage.conservativeResize(size,new_rows,new_cols);\n    else\n      Base::run(_this.derived(), new_rows, new_cols);\n  }\n\n  static void run(DenseBase<Derived>& _this, const DenseBase<OtherDerived>& other)\n  {\n    if (_this.rows() == other.rows() && _this.cols() == other.cols()) return;\n\n    const Index num_new_elements = other.size() - _this.size();\n\n    const Index new_rows = Derived::RowsAtCompileTime==1 ? 1 : other.rows();\n    const Index new_cols = Derived::RowsAtCompileTime==1 ? other.cols() : 1;\n    if(IsRelocatable)\n      _this.derived().m_storage.conservativeResize(other.size(),new_rows,new_cols);\n    else\n      Base::run(_this.derived(), new_rows, new_cols);\n\n    if (num_new_elements > 0)\n      _this.tail(num_new_elements) = other.tail(num_new_elements);\n  }\n};\n\ntemplate<typename MatrixTypeA, typename MatrixTypeB, bool SwapPointers>\nstruct matrix_swap_impl\n{\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE void run(MatrixTypeA& a, MatrixTypeB& b)\n  {\n    a.base().swap(b);\n  }\n};\n\ntemplate<typename MatrixTypeA, typename MatrixTypeB>\nstruct matrix_swap_impl<MatrixTypeA, MatrixTypeB, true>\n{\n  EIGEN_DEVICE_FUNC\n  static inline void run(MatrixTypeA& a, MatrixTypeB& b)\n  {\n    static_cast<typename MatrixTypeA::Base&>(a).m_storage.swap(static_cast<typename MatrixTypeB::Base&>(b).m_storage);\n  }\n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_DENSESTORAGEBASE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/Product.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2011 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_PRODUCT_H\n#define EIGEN_PRODUCT_H\n\nnamespace Eigen {\n\ntemplate<typename Lhs, typename Rhs, int Option, typename StorageKind> class ProductImpl;\n\nnamespace internal {\n\ntemplate<typename Lhs, typename Rhs, int Option>\nstruct traits<Product<Lhs, Rhs, Option> >\n{\n  typedef typename remove_all<Lhs>::type LhsCleaned;\n  typedef typename remove_all<Rhs>::type RhsCleaned;\n  typedef traits<LhsCleaned> LhsTraits;\n  typedef traits<RhsCleaned> RhsTraits;\n  \n  typedef MatrixXpr XprKind;\n  \n  typedef typename ScalarBinaryOpTraits<typename traits<LhsCleaned>::Scalar, typename traits<RhsCleaned>::Scalar>::ReturnType Scalar;\n  typedef typename product_promote_storage_type<typename LhsTraits::StorageKind,\n                                                typename RhsTraits::StorageKind,\n                                                internal::product_type<Lhs,Rhs>::ret>::ret StorageKind;\n  typedef typename promote_index_type<typename LhsTraits::StorageIndex,\n                                      typename RhsTraits::StorageIndex>::type StorageIndex;\n  \n  enum {\n    RowsAtCompileTime    = LhsTraits::RowsAtCompileTime,\n    ColsAtCompileTime    = RhsTraits::ColsAtCompileTime,\n    MaxRowsAtCompileTime = LhsTraits::MaxRowsAtCompileTime,\n    MaxColsAtCompileTime = RhsTraits::MaxColsAtCompileTime,\n    \n    // FIXME: only needed by GeneralMatrixMatrixTriangular\n    InnerSize = EIGEN_SIZE_MIN_PREFER_FIXED(LhsTraits::ColsAtCompileTime, RhsTraits::RowsAtCompileTime),\n    \n    // The storage order is somewhat arbitrary here. The correct one will be determined through the evaluator.\n    Flags = (MaxRowsAtCompileTime==1 && MaxColsAtCompileTime!=1) ? RowMajorBit\n          : (MaxColsAtCompileTime==1 && MaxRowsAtCompileTime!=1) ? 0\n          : (   ((LhsTraits::Flags&NoPreferredStorageOrderBit) && (RhsTraits::Flags&RowMajorBit))\n             || ((RhsTraits::Flags&NoPreferredStorageOrderBit) && (LhsTraits::Flags&RowMajorBit)) ) ? RowMajorBit\n          : NoPreferredStorageOrderBit\n  };\n};\n\n} // end namespace internal\n\n/** \\class Product\n  * \\ingroup Core_Module\n  *\n  * \\brief Expression of the product of two arbitrary matrices or vectors\n  *\n  * \\tparam _Lhs the type of the left-hand side expression\n  * \\tparam _Rhs the type of the right-hand side expression\n  *\n  * This class represents an expression of the product of two arbitrary matrices.\n  *\n  * The other template parameters are:\n  * \\tparam Option     can be DefaultProduct, AliasFreeProduct, or LazyProduct\n  *\n  */\ntemplate<typename _Lhs, typename _Rhs, int Option>\nclass Product : public ProductImpl<_Lhs,_Rhs,Option,\n                                   typename internal::product_promote_storage_type<typename internal::traits<_Lhs>::StorageKind,\n                                                                                   typename internal::traits<_Rhs>::StorageKind,\n                                                                                   internal::product_type<_Lhs,_Rhs>::ret>::ret>\n{\n  public:\n    \n    typedef _Lhs Lhs;\n    typedef _Rhs Rhs;\n    \n    typedef typename ProductImpl<\n        Lhs, Rhs, Option,\n        typename internal::product_promote_storage_type<typename internal::traits<Lhs>::StorageKind,\n                                                        typename internal::traits<Rhs>::StorageKind,\n                                                        internal::product_type<Lhs,Rhs>::ret>::ret>::Base Base;\n    EIGEN_GENERIC_PUBLIC_INTERFACE(Product)\n\n    typedef typename internal::ref_selector<Lhs>::type LhsNested;\n    typedef typename internal::ref_selector<Rhs>::type RhsNested;\n    typedef typename internal::remove_all<LhsNested>::type LhsNestedCleaned;\n    typedef typename internal::remove_all<RhsNested>::type RhsNestedCleaned;\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Product(const Lhs& lhs, const Rhs& rhs) : m_lhs(lhs), m_rhs(rhs)\n    {\n      eigen_assert(lhs.cols() == rhs.rows()\n        && \"invalid matrix product\"\n        && \"if you wanted a coeff-wise or a dot product use the respective explicit functions\");\n    }\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Index rows() const { return m_lhs.rows(); }\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Index cols() const { return m_rhs.cols(); }\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const LhsNestedCleaned& lhs() const { return m_lhs; }\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const RhsNestedCleaned& rhs() const { return m_rhs; }\n\n  protected:\n\n    LhsNested m_lhs;\n    RhsNested m_rhs;\n};\n\nnamespace internal {\n  \ntemplate<typename Lhs, typename Rhs, int Option, int ProductTag = internal::product_type<Lhs,Rhs>::ret>\nclass dense_product_base\n : public internal::dense_xpr_base<Product<Lhs,Rhs,Option> >::type\n{};\n\n/** Conversion to scalar for inner-products */\ntemplate<typename Lhs, typename Rhs, int Option>\nclass dense_product_base<Lhs, Rhs, Option, InnerProduct>\n : public internal::dense_xpr_base<Product<Lhs,Rhs,Option> >::type\n{\n  typedef Product<Lhs,Rhs,Option> ProductXpr;\n  typedef typename internal::dense_xpr_base<ProductXpr>::type Base;\npublic:\n  using Base::derived;\n  typedef typename Base::Scalar Scalar;\n  \n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE operator const Scalar() const\n  {\n    return internal::evaluator<ProductXpr>(derived()).coeff(0,0);\n  }\n};\n\n} // namespace internal\n\n// Generic API dispatcher\ntemplate<typename Lhs, typename Rhs, int Option, typename StorageKind>\nclass ProductImpl : public internal::generic_xpr_base<Product<Lhs,Rhs,Option>, MatrixXpr, StorageKind>::type\n{\n  public:\n    typedef typename internal::generic_xpr_base<Product<Lhs,Rhs,Option>, MatrixXpr, StorageKind>::type Base;\n};\n\ntemplate<typename Lhs, typename Rhs, int Option>\nclass ProductImpl<Lhs,Rhs,Option,Dense>\n  : public internal::dense_product_base<Lhs,Rhs,Option>\n{\n    typedef Product<Lhs, Rhs, Option> Derived;\n    \n  public:\n    \n    typedef typename internal::dense_product_base<Lhs, Rhs, Option> Base;\n    EIGEN_DENSE_PUBLIC_INTERFACE(Derived)\n  protected:\n    enum {\n      IsOneByOne = (RowsAtCompileTime == 1 || RowsAtCompileTime == Dynamic) && \n                   (ColsAtCompileTime == 1 || ColsAtCompileTime == Dynamic),\n      EnableCoeff = IsOneByOne || Option==LazyProduct\n    };\n    \n  public:\n  \n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar coeff(Index row, Index col) const\n    {\n      EIGEN_STATIC_ASSERT(EnableCoeff, THIS_METHOD_IS_ONLY_FOR_INNER_OR_LAZY_PRODUCTS);\n      eigen_assert( (Option==LazyProduct) || (this->rows() == 1 && this->cols() == 1) );\n      \n      return internal::evaluator<Derived>(derived()).coeff(row,col);\n    }\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar coeff(Index i) const\n    {\n      EIGEN_STATIC_ASSERT(EnableCoeff, THIS_METHOD_IS_ONLY_FOR_INNER_OR_LAZY_PRODUCTS);\n      eigen_assert( (Option==LazyProduct) || (this->rows() == 1 && this->cols() == 1) );\n      \n      return internal::evaluator<Derived>(derived()).coeff(i);\n    }\n    \n  \n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_PRODUCT_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/ProductEvaluators.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2008-2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2011 Jitse Niesen <jitse@maths.leeds.ac.uk>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n\n#ifndef EIGEN_PRODUCTEVALUATORS_H\n#define EIGEN_PRODUCTEVALUATORS_H\n\nnamespace Eigen {\n  \nnamespace internal {\n\n/** \\internal\n  * Evaluator of a product expression.\n  * Since products require special treatments to handle all possible cases,\n  * we simply defer the evaluation logic to a product_evaluator class\n  * which offers more partial specialization possibilities.\n  * \n  * \\sa class product_evaluator\n  */\ntemplate<typename Lhs, typename Rhs, int Options>\nstruct evaluator<Product<Lhs, Rhs, Options> > \n : public product_evaluator<Product<Lhs, Rhs, Options> >\n{\n  typedef Product<Lhs, Rhs, Options> XprType;\n  typedef product_evaluator<XprType> Base;\n  \n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit evaluator(const XprType& xpr) : Base(xpr) {}\n};\n \n// Catch \"scalar * ( A * B )\" and transform it to \"(A*scalar) * B\"\n// TODO we should apply that rule only if that's really helpful\ntemplate<typename Lhs, typename Rhs, typename Scalar1, typename Scalar2, typename Plain1>\nstruct evaluator_assume_aliasing<CwiseBinaryOp<internal::scalar_product_op<Scalar1,Scalar2>,\n                                               const CwiseNullaryOp<internal::scalar_constant_op<Scalar1>, Plain1>,\n                                               const Product<Lhs, Rhs, DefaultProduct> > >\n{\n  static const bool value = true;\n};\ntemplate<typename Lhs, typename Rhs, typename Scalar1, typename Scalar2, typename Plain1>\nstruct evaluator<CwiseBinaryOp<internal::scalar_product_op<Scalar1,Scalar2>,\n                               const CwiseNullaryOp<internal::scalar_constant_op<Scalar1>, Plain1>,\n                               const Product<Lhs, Rhs, DefaultProduct> > >\n : public evaluator<Product<EIGEN_SCALAR_BINARYOP_EXPR_RETURN_TYPE(Scalar1,Lhs,product), Rhs, DefaultProduct> >\n{\n  typedef CwiseBinaryOp<internal::scalar_product_op<Scalar1,Scalar2>,\n                               const CwiseNullaryOp<internal::scalar_constant_op<Scalar1>, Plain1>,\n                               const Product<Lhs, Rhs, DefaultProduct> > XprType;\n  typedef evaluator<Product<EIGEN_SCALAR_BINARYOP_EXPR_RETURN_TYPE(Scalar1,Lhs,product), Rhs, DefaultProduct> > Base;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit evaluator(const XprType& xpr)\n    : Base(xpr.lhs().functor().m_other * xpr.rhs().lhs() * xpr.rhs().rhs())\n  {}\n};\n\n\ntemplate<typename Lhs, typename Rhs, int DiagIndex>\nstruct evaluator<Diagonal<const Product<Lhs, Rhs, DefaultProduct>, DiagIndex> > \n : public evaluator<Diagonal<const Product<Lhs, Rhs, LazyProduct>, DiagIndex> >\n{\n  typedef Diagonal<const Product<Lhs, Rhs, DefaultProduct>, DiagIndex> XprType;\n  typedef evaluator<Diagonal<const Product<Lhs, Rhs, LazyProduct>, DiagIndex> > Base;\n  \n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit evaluator(const XprType& xpr)\n    : Base(Diagonal<const Product<Lhs, Rhs, LazyProduct>, DiagIndex>(\n        Product<Lhs, Rhs, LazyProduct>(xpr.nestedExpression().lhs(), xpr.nestedExpression().rhs()),\n        xpr.index() ))\n  {}\n};\n\n\n// Helper class to perform a matrix product with the destination at hand.\n// Depending on the sizes of the factors, there are different evaluation strategies\n// as controlled by internal::product_type.\ntemplate< typename Lhs, typename Rhs,\n          typename LhsShape = typename evaluator_traits<Lhs>::Shape,\n          typename RhsShape = typename evaluator_traits<Rhs>::Shape,\n          int ProductType = internal::product_type<Lhs,Rhs>::value>\nstruct generic_product_impl;\n\ntemplate<typename Lhs, typename Rhs>\nstruct evaluator_assume_aliasing<Product<Lhs, Rhs, DefaultProduct> > {\n  static const bool value = true;\n};\n\n// This is the default evaluator implementation for products:\n// It creates a temporary and call generic_product_impl\ntemplate<typename Lhs, typename Rhs, int Options, int ProductTag, typename LhsShape, typename RhsShape>\nstruct product_evaluator<Product<Lhs, Rhs, Options>, ProductTag, LhsShape, RhsShape>\n  : public evaluator<typename Product<Lhs, Rhs, Options>::PlainObject>\n{\n  typedef Product<Lhs, Rhs, Options> XprType;\n  typedef typename XprType::PlainObject PlainObject;\n  typedef evaluator<PlainObject> Base;\n  enum {\n    Flags = Base::Flags | EvalBeforeNestingBit\n  };\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  explicit product_evaluator(const XprType& xpr)\n    : m_result(xpr.rows(), xpr.cols())\n  {\n    ::new (static_cast<Base*>(this)) Base(m_result);\n    \n// FIXME shall we handle nested_eval here?,\n// if so, then we must take care at removing the call to nested_eval in the specializations (e.g., in permutation_matrix_product, transposition_matrix_product, etc.)\n//     typedef typename internal::nested_eval<Lhs,Rhs::ColsAtCompileTime>::type LhsNested;\n//     typedef typename internal::nested_eval<Rhs,Lhs::RowsAtCompileTime>::type RhsNested;\n//     typedef typename internal::remove_all<LhsNested>::type LhsNestedCleaned;\n//     typedef typename internal::remove_all<RhsNested>::type RhsNestedCleaned;\n//     \n//     const LhsNested lhs(xpr.lhs());\n//     const RhsNested rhs(xpr.rhs());\n//   \n//     generic_product_impl<LhsNestedCleaned, RhsNestedCleaned>::evalTo(m_result, lhs, rhs);\n\n    generic_product_impl<Lhs, Rhs, LhsShape, RhsShape, ProductTag>::evalTo(m_result, xpr.lhs(), xpr.rhs());\n  }\n  \nprotected:  \n  PlainObject m_result;\n};\n\n// The following three shortcuts are enabled only if the scalar types match exactly.\n// TODO: we could enable them for different scalar types when the product is not vectorized.\n\n// Dense = Product\ntemplate< typename DstXprType, typename Lhs, typename Rhs, int Options, typename Scalar>\nstruct Assignment<DstXprType, Product<Lhs,Rhs,Options>, internal::assign_op<Scalar,Scalar>, Dense2Dense,\n  typename enable_if<(Options==DefaultProduct || Options==AliasFreeProduct)>::type>\n{\n  typedef Product<Lhs,Rhs,Options> SrcXprType;\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op<Scalar,Scalar> &)\n  {\n    Index dstRows = src.rows();\n    Index dstCols = src.cols();\n    if((dst.rows()!=dstRows) || (dst.cols()!=dstCols))\n      dst.resize(dstRows, dstCols);\n    // FIXME shall we handle nested_eval here?\n    generic_product_impl<Lhs, Rhs>::evalTo(dst, src.lhs(), src.rhs());\n  }\n};\n\n// Dense += Product\ntemplate< typename DstXprType, typename Lhs, typename Rhs, int Options, typename Scalar>\nstruct Assignment<DstXprType, Product<Lhs,Rhs,Options>, internal::add_assign_op<Scalar,Scalar>, Dense2Dense,\n  typename enable_if<(Options==DefaultProduct || Options==AliasFreeProduct)>::type>\n{\n  typedef Product<Lhs,Rhs,Options> SrcXprType;\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  void run(DstXprType &dst, const SrcXprType &src, const internal::add_assign_op<Scalar,Scalar> &)\n  {\n    eigen_assert(dst.rows() == src.rows() && dst.cols() == src.cols());\n    // FIXME shall we handle nested_eval here?\n    generic_product_impl<Lhs, Rhs>::addTo(dst, src.lhs(), src.rhs());\n  }\n};\n\n// Dense -= Product\ntemplate< typename DstXprType, typename Lhs, typename Rhs, int Options, typename Scalar>\nstruct Assignment<DstXprType, Product<Lhs,Rhs,Options>, internal::sub_assign_op<Scalar,Scalar>, Dense2Dense,\n  typename enable_if<(Options==DefaultProduct || Options==AliasFreeProduct)>::type>\n{\n  typedef Product<Lhs,Rhs,Options> SrcXprType;\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  void run(DstXprType &dst, const SrcXprType &src, const internal::sub_assign_op<Scalar,Scalar> &)\n  {\n    eigen_assert(dst.rows() == src.rows() && dst.cols() == src.cols());\n    // FIXME shall we handle nested_eval here?\n    generic_product_impl<Lhs, Rhs>::subTo(dst, src.lhs(), src.rhs());\n  }\n};\n\n\n// Dense ?= scalar * Product\n// TODO we should apply that rule if that's really helpful\n// for instance, this is not good for inner products\ntemplate< typename DstXprType, typename Lhs, typename Rhs, typename AssignFunc, typename Scalar, typename ScalarBis, typename Plain>\nstruct Assignment<DstXprType, CwiseBinaryOp<internal::scalar_product_op<ScalarBis,Scalar>, const CwiseNullaryOp<internal::scalar_constant_op<ScalarBis>,Plain>,\n                                           const Product<Lhs,Rhs,DefaultProduct> >, AssignFunc, Dense2Dense>\n{\n  typedef CwiseBinaryOp<internal::scalar_product_op<ScalarBis,Scalar>,\n                        const CwiseNullaryOp<internal::scalar_constant_op<ScalarBis>,Plain>,\n                        const Product<Lhs,Rhs,DefaultProduct> > SrcXprType;\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  void run(DstXprType &dst, const SrcXprType &src, const AssignFunc& func)\n  {\n    call_assignment_no_alias(dst, (src.lhs().functor().m_other * src.rhs().lhs())*src.rhs().rhs(), func);\n  }\n};\n\n//----------------------------------------\n// Catch \"Dense ?= xpr + Product<>\" expression to save one temporary\n// FIXME we could probably enable these rules for any product, i.e., not only Dense and DefaultProduct\n\ntemplate<typename OtherXpr, typename Lhs, typename Rhs>\nstruct evaluator_assume_aliasing<CwiseBinaryOp<internal::scalar_sum_op<typename OtherXpr::Scalar,typename Product<Lhs,Rhs,DefaultProduct>::Scalar>, const OtherXpr,\n                                               const Product<Lhs,Rhs,DefaultProduct> >, DenseShape > {\n  static const bool value = true;\n};\n\ntemplate<typename OtherXpr, typename Lhs, typename Rhs>\nstruct evaluator_assume_aliasing<CwiseBinaryOp<internal::scalar_difference_op<typename OtherXpr::Scalar,typename Product<Lhs,Rhs,DefaultProduct>::Scalar>, const OtherXpr,\n                                               const Product<Lhs,Rhs,DefaultProduct> >, DenseShape > {\n  static const bool value = true;\n};\n\ntemplate<typename DstXprType, typename OtherXpr, typename ProductType, typename Func1, typename Func2>\nstruct assignment_from_xpr_op_product\n{\n  template<typename SrcXprType, typename InitialFunc>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  void run(DstXprType &dst, const SrcXprType &src, const InitialFunc& /*func*/)\n  {\n    call_assignment_no_alias(dst, src.lhs(), Func1());\n    call_assignment_no_alias(dst, src.rhs(), Func2());\n  }\n};\n\n#define EIGEN_CATCH_ASSIGN_XPR_OP_PRODUCT(ASSIGN_OP,BINOP,ASSIGN_OP2) \\\n  template< typename DstXprType, typename OtherXpr, typename Lhs, typename Rhs, typename DstScalar, typename SrcScalar, typename OtherScalar,typename ProdScalar> \\\n  struct Assignment<DstXprType, CwiseBinaryOp<internal::BINOP<OtherScalar,ProdScalar>, const OtherXpr, \\\n                                            const Product<Lhs,Rhs,DefaultProduct> >, internal::ASSIGN_OP<DstScalar,SrcScalar>, Dense2Dense> \\\n    : assignment_from_xpr_op_product<DstXprType, OtherXpr, Product<Lhs,Rhs,DefaultProduct>, internal::ASSIGN_OP<DstScalar,OtherScalar>, internal::ASSIGN_OP2<DstScalar,ProdScalar> > \\\n  {}\n\nEIGEN_CATCH_ASSIGN_XPR_OP_PRODUCT(assign_op,    scalar_sum_op,add_assign_op);\nEIGEN_CATCH_ASSIGN_XPR_OP_PRODUCT(add_assign_op,scalar_sum_op,add_assign_op);\nEIGEN_CATCH_ASSIGN_XPR_OP_PRODUCT(sub_assign_op,scalar_sum_op,sub_assign_op);\n\nEIGEN_CATCH_ASSIGN_XPR_OP_PRODUCT(assign_op,    scalar_difference_op,sub_assign_op);\nEIGEN_CATCH_ASSIGN_XPR_OP_PRODUCT(add_assign_op,scalar_difference_op,sub_assign_op);\nEIGEN_CATCH_ASSIGN_XPR_OP_PRODUCT(sub_assign_op,scalar_difference_op,add_assign_op);\n\n//----------------------------------------\n\ntemplate<typename Lhs, typename Rhs>\nstruct generic_product_impl<Lhs,Rhs,DenseShape,DenseShape,InnerProduct>\n{\n  template<typename Dst>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)\n  {\n    dst.coeffRef(0,0) = (lhs.transpose().cwiseProduct(rhs)).sum();\n  }\n  \n  template<typename Dst>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void addTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)\n  {\n    dst.coeffRef(0,0) += (lhs.transpose().cwiseProduct(rhs)).sum();\n  }\n  \n  template<typename Dst>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void subTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)\n  { dst.coeffRef(0,0) -= (lhs.transpose().cwiseProduct(rhs)).sum(); }\n};\n\n\n/***********************************************************************\n*  Implementation of outer dense * dense vector product\n***********************************************************************/\n\n// Column major result\ntemplate<typename Dst, typename Lhs, typename Rhs, typename Func>\nvoid EIGEN_DEVICE_FUNC outer_product_selector_run(Dst& dst, const Lhs &lhs, const Rhs &rhs, const Func& func, const false_type&)\n{\n  evaluator<Rhs> rhsEval(rhs);\n  ei_declare_local_nested_eval(Lhs,lhs,Rhs::SizeAtCompileTime,actual_lhs);\n  // FIXME if cols is large enough, then it might be useful to make sure that lhs is sequentially stored\n  // FIXME not very good if rhs is real and lhs complex while alpha is real too\n  const Index cols = dst.cols();\n  for (Index j=0; j<cols; ++j)\n    func(dst.col(j), rhsEval.coeff(Index(0),j) * actual_lhs);\n}\n\n// Row major result\ntemplate<typename Dst, typename Lhs, typename Rhs, typename Func>\nvoid EIGEN_DEVICE_FUNC outer_product_selector_run(Dst& dst, const Lhs &lhs, const Rhs &rhs, const Func& func, const true_type&)\n{\n  evaluator<Lhs> lhsEval(lhs);\n  ei_declare_local_nested_eval(Rhs,rhs,Lhs::SizeAtCompileTime,actual_rhs);\n  // FIXME if rows is large enough, then it might be useful to make sure that rhs is sequentially stored\n  // FIXME not very good if lhs is real and rhs complex while alpha is real too\n  const Index rows = dst.rows();\n  for (Index i=0; i<rows; ++i)\n    func(dst.row(i), lhsEval.coeff(i,Index(0)) * actual_rhs);\n}\n\ntemplate<typename Lhs, typename Rhs>\nstruct generic_product_impl<Lhs,Rhs,DenseShape,DenseShape,OuterProduct>\n{\n  template<typename T> struct is_row_major : internal::conditional<(int(T::Flags)&RowMajorBit), internal::true_type, internal::false_type>::type {};\n  typedef typename Product<Lhs,Rhs>::Scalar Scalar;\n  \n  // TODO it would be nice to be able to exploit our *_assign_op functors for that purpose\n  struct set  { template<typename Dst, typename Src> EIGEN_DEVICE_FUNC void operator()(const Dst& dst, const Src& src) const { dst.const_cast_derived()  = src; } };\n  struct add  { template<typename Dst, typename Src> EIGEN_DEVICE_FUNC void operator()(const Dst& dst, const Src& src) const { dst.const_cast_derived() += src; } };\n  struct sub  { template<typename Dst, typename Src> EIGEN_DEVICE_FUNC void operator()(const Dst& dst, const Src& src) const { dst.const_cast_derived() -= src; } };\n  struct adds {\n    Scalar m_scale;\n    explicit adds(const Scalar& s) : m_scale(s) {}\n    template<typename Dst, typename Src> void EIGEN_DEVICE_FUNC operator()(const Dst& dst, const Src& src) const {\n      dst.const_cast_derived() += m_scale * src;\n    }\n  };\n  \n  template<typename Dst>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)\n  {\n    internal::outer_product_selector_run(dst, lhs, rhs, set(), is_row_major<Dst>());\n  }\n  \n  template<typename Dst>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void addTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)\n  {\n    internal::outer_product_selector_run(dst, lhs, rhs, add(), is_row_major<Dst>());\n  }\n  \n  template<typename Dst>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void subTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)\n  {\n    internal::outer_product_selector_run(dst, lhs, rhs, sub(), is_row_major<Dst>());\n  }\n  \n  template<typename Dst>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void scaleAndAddTo(Dst& dst, const Lhs& lhs, const Rhs& rhs, const Scalar& alpha)\n  {\n    internal::outer_product_selector_run(dst, lhs, rhs, adds(alpha), is_row_major<Dst>());\n  }\n  \n};\n\n\n// This base class provides default implementations for evalTo, addTo, subTo, in terms of scaleAndAddTo\ntemplate<typename Lhs, typename Rhs, typename Derived>\nstruct generic_product_impl_base\n{\n  typedef typename Product<Lhs,Rhs>::Scalar Scalar;\n  \n  template<typename Dst>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)\n  { dst.setZero(); scaleAndAddTo(dst, lhs, rhs, Scalar(1)); }\n\n  template<typename Dst>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void addTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)\n  { scaleAndAddTo(dst,lhs, rhs, Scalar(1)); }\n\n  template<typename Dst>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void subTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)\n  { scaleAndAddTo(dst, lhs, rhs, Scalar(-1)); }\n  \n  template<typename Dst>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void scaleAndAddTo(Dst& dst, const Lhs& lhs, const Rhs& rhs, const Scalar& alpha)\n  { Derived::scaleAndAddTo(dst,lhs,rhs,alpha); }\n\n};\n\ntemplate<typename Lhs, typename Rhs>\nstruct generic_product_impl<Lhs,Rhs,DenseShape,DenseShape,GemvProduct>\n  : generic_product_impl_base<Lhs,Rhs,generic_product_impl<Lhs,Rhs,DenseShape,DenseShape,GemvProduct> >\n{\n  typedef typename nested_eval<Lhs,1>::type LhsNested;\n  typedef typename nested_eval<Rhs,1>::type RhsNested;\n  typedef typename Product<Lhs,Rhs>::Scalar Scalar;\n  enum { Side = Lhs::IsVectorAtCompileTime ? OnTheLeft : OnTheRight };\n  typedef typename internal::remove_all<typename internal::conditional<int(Side)==OnTheRight,LhsNested,RhsNested>::type>::type MatrixType;\n\n  template<typename Dest>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void scaleAndAddTo(Dest& dst, const Lhs& lhs, const Rhs& rhs, const Scalar& alpha)\n  {\n    LhsNested actual_lhs(lhs);\n    RhsNested actual_rhs(rhs);\n    internal::gemv_dense_selector<Side,\n                            (int(MatrixType::Flags)&RowMajorBit) ? RowMajor : ColMajor,\n                            bool(internal::blas_traits<MatrixType>::HasUsableDirectAccess)\n                           >::run(actual_lhs, actual_rhs, dst, alpha);\n  }\n};\n\ntemplate<typename Lhs, typename Rhs>\nstruct generic_product_impl<Lhs,Rhs,DenseShape,DenseShape,CoeffBasedProductMode> \n{\n  typedef typename Product<Lhs,Rhs>::Scalar Scalar;\n  \n  template<typename Dst>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)\n  {\n    // Same as: dst.noalias() = lhs.lazyProduct(rhs);\n    // but easier on the compiler side\n    call_assignment_no_alias(dst, lhs.lazyProduct(rhs), internal::assign_op<typename Dst::Scalar,Scalar>());\n  }\n\n  template<typename Dst>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void addTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)\n  {\n    // dst.noalias() += lhs.lazyProduct(rhs);\n    call_assignment_no_alias(dst, lhs.lazyProduct(rhs), internal::add_assign_op<typename Dst::Scalar,Scalar>());\n  }\n  \n  template<typename Dst>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void subTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)\n  {\n    // dst.noalias() -= lhs.lazyProduct(rhs);\n    call_assignment_no_alias(dst, lhs.lazyProduct(rhs), internal::sub_assign_op<typename Dst::Scalar,Scalar>());\n  }\n\n  // This is a special evaluation path called from generic_product_impl<...,GemmProduct> in file GeneralMatrixMatrix.h\n  // This variant tries to extract scalar multiples from both the LHS and RHS and factor them out. For instance:\n  //   dst {,+,-}= (s1*A)*(B*s2)\n  // will be rewritten as:\n  //   dst {,+,-}= (s1*s2) * (A.lazyProduct(B))\n  // There are at least four benefits of doing so:\n  //  1 - huge performance gain for heap-allocated matrix types as it save costly allocations.\n  //  2 - it is faster than simply by-passing the heap allocation through stack allocation.\n  //  3 - it makes this fallback consistent with the heavy GEMM routine.\n  //  4 - it fully by-passes huge stack allocation attempts when multiplying huge fixed-size matrices.\n  //      (see https://stackoverflow.com/questions/54738495)\n  // For small fixed sizes matrices, howver, the gains are less obvious, it is sometimes x2 faster, but sometimes x3 slower,\n  // and the behavior depends also a lot on the compiler... This is why this re-writting strategy is currently\n  // enabled only when falling back from the main GEMM.\n  template<typename Dst, typename Func>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  void eval_dynamic(Dst& dst, const Lhs& lhs, const Rhs& rhs, const Func &func)\n  {\n    enum {\n      HasScalarFactor = blas_traits<Lhs>::HasScalarFactor || blas_traits<Rhs>::HasScalarFactor,\n      ConjLhs = blas_traits<Lhs>::NeedToConjugate,\n      ConjRhs = blas_traits<Rhs>::NeedToConjugate\n    };\n    // FIXME: in c++11 this should be auto, and extractScalarFactor should also return auto\n    //        this is important for real*complex_mat\n    Scalar actualAlpha =    blas_traits<Lhs>::extractScalarFactor(lhs)\n                          * blas_traits<Rhs>::extractScalarFactor(rhs);\n    eval_dynamic_impl(dst,\n                      blas_traits<Lhs>::extract(lhs).template conjugateIf<ConjLhs>(),\n                      blas_traits<Rhs>::extract(rhs).template conjugateIf<ConjRhs>(),\n                      func,\n                      actualAlpha,\n                      typename conditional<HasScalarFactor,true_type,false_type>::type());\n  }\n\nprotected:\n\n  template<typename Dst, typename LhsT, typename RhsT, typename Func, typename Scalar>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  void eval_dynamic_impl(Dst& dst, const LhsT& lhs, const RhsT& rhs, const Func &func, const Scalar&  s /* == 1 */, false_type)\n  {\n    EIGEN_UNUSED_VARIABLE(s);\n    eigen_internal_assert(s==Scalar(1));\n    call_restricted_packet_assignment_no_alias(dst, lhs.lazyProduct(rhs), func);\n  }\n\n  template<typename Dst, typename LhsT, typename RhsT, typename Func, typename Scalar>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  void eval_dynamic_impl(Dst& dst, const LhsT& lhs, const RhsT& rhs, const Func &func, const Scalar& s, true_type)\n  {\n    call_restricted_packet_assignment_no_alias(dst, s * lhs.lazyProduct(rhs), func);\n  }\n};\n\n// This specialization enforces the use of a coefficient-based evaluation strategy\ntemplate<typename Lhs, typename Rhs>\nstruct generic_product_impl<Lhs,Rhs,DenseShape,DenseShape,LazyCoeffBasedProductMode>\n  : generic_product_impl<Lhs,Rhs,DenseShape,DenseShape,CoeffBasedProductMode> {};\n\n// Case 2: Evaluate coeff by coeff\n//\n// This is mostly taken from CoeffBasedProduct.h\n// The main difference is that we add an extra argument to the etor_product_*_impl::run() function\n// for the inner dimension of the product, because evaluator object do not know their size.\n\ntemplate<int Traversal, int UnrollingIndex, typename Lhs, typename Rhs, typename RetScalar>\nstruct etor_product_coeff_impl;\n\ntemplate<int StorageOrder, int UnrollingIndex, typename Lhs, typename Rhs, typename Packet, int LoadMode>\nstruct etor_product_packet_impl;\n\ntemplate<typename Lhs, typename Rhs, int ProductTag>\nstruct product_evaluator<Product<Lhs, Rhs, LazyProduct>, ProductTag, DenseShape, DenseShape>\n    : evaluator_base<Product<Lhs, Rhs, LazyProduct> >\n{\n  typedef Product<Lhs, Rhs, LazyProduct> XprType;\n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  explicit product_evaluator(const XprType& xpr)\n    : m_lhs(xpr.lhs()),\n      m_rhs(xpr.rhs()),\n      m_lhsImpl(m_lhs),     // FIXME the creation of the evaluator objects should result in a no-op, but check that!\n      m_rhsImpl(m_rhs),     //       Moreover, they are only useful for the packet path, so we could completely disable them when not needed,\n                            //       or perhaps declare them on the fly on the packet method... We have experiment to check what's best.\n      m_innerDim(xpr.lhs().cols())\n  {\n    EIGEN_INTERNAL_CHECK_COST_VALUE(NumTraits<Scalar>::MulCost);\n    EIGEN_INTERNAL_CHECK_COST_VALUE(NumTraits<Scalar>::AddCost);\n    EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);\n#if 0\n    std::cerr << \"LhsOuterStrideBytes=  \" << LhsOuterStrideBytes << \"\\n\";\n    std::cerr << \"RhsOuterStrideBytes=  \" << RhsOuterStrideBytes << \"\\n\";\n    std::cerr << \"LhsAlignment=         \" << LhsAlignment << \"\\n\";\n    std::cerr << \"RhsAlignment=         \" << RhsAlignment << \"\\n\";\n    std::cerr << \"CanVectorizeLhs=      \" << CanVectorizeLhs << \"\\n\";\n    std::cerr << \"CanVectorizeRhs=      \" << CanVectorizeRhs << \"\\n\";\n    std::cerr << \"CanVectorizeInner=    \" << CanVectorizeInner << \"\\n\";\n    std::cerr << \"EvalToRowMajor=       \" << EvalToRowMajor << \"\\n\";\n    std::cerr << \"Alignment=            \" << Alignment << \"\\n\";\n    std::cerr << \"Flags=                \" << Flags << \"\\n\";\n#endif\n  }\n\n  // Everything below here is taken from CoeffBasedProduct.h\n\n  typedef typename internal::nested_eval<Lhs,Rhs::ColsAtCompileTime>::type LhsNested;\n  typedef typename internal::nested_eval<Rhs,Lhs::RowsAtCompileTime>::type RhsNested;\n  \n  typedef typename internal::remove_all<LhsNested>::type LhsNestedCleaned;\n  typedef typename internal::remove_all<RhsNested>::type RhsNestedCleaned;\n\n  typedef evaluator<LhsNestedCleaned> LhsEtorType;\n  typedef evaluator<RhsNestedCleaned> RhsEtorType;\n\n  enum {\n    RowsAtCompileTime = LhsNestedCleaned::RowsAtCompileTime,\n    ColsAtCompileTime = RhsNestedCleaned::ColsAtCompileTime,\n    InnerSize = EIGEN_SIZE_MIN_PREFER_FIXED(LhsNestedCleaned::ColsAtCompileTime, RhsNestedCleaned::RowsAtCompileTime),\n    MaxRowsAtCompileTime = LhsNestedCleaned::MaxRowsAtCompileTime,\n    MaxColsAtCompileTime = RhsNestedCleaned::MaxColsAtCompileTime\n  };\n\n  typedef typename find_best_packet<Scalar,RowsAtCompileTime>::type LhsVecPacketType;\n  typedef typename find_best_packet<Scalar,ColsAtCompileTime>::type RhsVecPacketType;\n\n  enum {\n      \n    LhsCoeffReadCost = LhsEtorType::CoeffReadCost,\n    RhsCoeffReadCost = RhsEtorType::CoeffReadCost,\n    CoeffReadCost = InnerSize==0 ? NumTraits<Scalar>::ReadCost\n                  : InnerSize == Dynamic ? HugeCost\n                  : InnerSize * (NumTraits<Scalar>::MulCost + LhsCoeffReadCost + RhsCoeffReadCost)\n                    + (InnerSize - 1) * NumTraits<Scalar>::AddCost,\n\n    Unroll = CoeffReadCost <= EIGEN_UNROLLING_LIMIT,\n    \n    LhsFlags = LhsEtorType::Flags,\n    RhsFlags = RhsEtorType::Flags,\n    \n    LhsRowMajor = LhsFlags & RowMajorBit,\n    RhsRowMajor = RhsFlags & RowMajorBit,\n\n    LhsVecPacketSize = unpacket_traits<LhsVecPacketType>::size,\n    RhsVecPacketSize = unpacket_traits<RhsVecPacketType>::size,\n\n    // Here, we don't care about alignment larger than the usable packet size.\n    LhsAlignment = EIGEN_PLAIN_ENUM_MIN(LhsEtorType::Alignment,LhsVecPacketSize*int(sizeof(typename LhsNestedCleaned::Scalar))),\n    RhsAlignment = EIGEN_PLAIN_ENUM_MIN(RhsEtorType::Alignment,RhsVecPacketSize*int(sizeof(typename RhsNestedCleaned::Scalar))),\n      \n    SameType = is_same<typename LhsNestedCleaned::Scalar,typename RhsNestedCleaned::Scalar>::value,\n\n    CanVectorizeRhs = bool(RhsRowMajor) && (RhsFlags & PacketAccessBit) && (ColsAtCompileTime!=1),\n    CanVectorizeLhs = (!LhsRowMajor) && (LhsFlags & PacketAccessBit) && (RowsAtCompileTime!=1),\n\n    EvalToRowMajor = (MaxRowsAtCompileTime==1&&MaxColsAtCompileTime!=1) ? 1\n                    : (MaxColsAtCompileTime==1&&MaxRowsAtCompileTime!=1) ? 0\n                    : (bool(RhsRowMajor) && !CanVectorizeLhs),\n\n    Flags = ((unsigned int)(LhsFlags | RhsFlags) & HereditaryBits & ~RowMajorBit)\n          | (EvalToRowMajor ? RowMajorBit : 0)\n          // TODO enable vectorization for mixed types\n          | (SameType && (CanVectorizeLhs || CanVectorizeRhs) ? PacketAccessBit : 0)\n          | (XprType::IsVectorAtCompileTime ? LinearAccessBit : 0),\n          \n    LhsOuterStrideBytes = int(LhsNestedCleaned::OuterStrideAtCompileTime) * int(sizeof(typename LhsNestedCleaned::Scalar)),\n    RhsOuterStrideBytes = int(RhsNestedCleaned::OuterStrideAtCompileTime) * int(sizeof(typename RhsNestedCleaned::Scalar)),\n\n    Alignment = bool(CanVectorizeLhs) ? (LhsOuterStrideBytes<=0 || (int(LhsOuterStrideBytes) % EIGEN_PLAIN_ENUM_MAX(1,LhsAlignment))!=0 ? 0 : LhsAlignment)\n              : bool(CanVectorizeRhs) ? (RhsOuterStrideBytes<=0 || (int(RhsOuterStrideBytes) % EIGEN_PLAIN_ENUM_MAX(1,RhsAlignment))!=0 ? 0 : RhsAlignment)\n              : 0,\n\n    /* CanVectorizeInner deserves special explanation. It does not affect the product flags. It is not used outside\n     * of Product. If the Product itself is not a packet-access expression, there is still a chance that the inner\n     * loop of the product might be vectorized. This is the meaning of CanVectorizeInner. Since it doesn't affect\n     * the Flags, it is safe to make this value depend on ActualPacketAccessBit, that doesn't affect the ABI.\n     */\n    CanVectorizeInner =    SameType\n                        && LhsRowMajor\n                        && (!RhsRowMajor)\n                        && (LhsFlags & RhsFlags & ActualPacketAccessBit)\n                        && (InnerSize % packet_traits<Scalar>::size == 0)\n  };\n  \n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CoeffReturnType coeff(Index row, Index col) const\n  {\n    return (m_lhs.row(row).transpose().cwiseProduct( m_rhs.col(col) )).sum();\n  }\n\n  /* Allow index-based non-packet access. It is impossible though to allow index-based packed access,\n   * which is why we don't set the LinearAccessBit.\n   * TODO: this seems possible when the result is a vector\n   */\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  const CoeffReturnType coeff(Index index) const\n  {\n    const Index row = (RowsAtCompileTime == 1 || MaxRowsAtCompileTime==1) ? 0 : index;\n    const Index col = (RowsAtCompileTime == 1 || MaxRowsAtCompileTime==1) ? index : 0;\n    return (m_lhs.row(row).transpose().cwiseProduct( m_rhs.col(col) )).sum();\n  }\n\n  template<int LoadMode, typename PacketType>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  const PacketType packet(Index row, Index col) const\n  {\n    PacketType res;\n    typedef etor_product_packet_impl<bool(int(Flags)&RowMajorBit) ? RowMajor : ColMajor,\n                                     Unroll ? int(InnerSize) : Dynamic,\n                                     LhsEtorType, RhsEtorType, PacketType, LoadMode> PacketImpl;\n    PacketImpl::run(row, col, m_lhsImpl, m_rhsImpl, m_innerDim, res);\n    return res;\n  }\n\n  template<int LoadMode, typename PacketType>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  const PacketType packet(Index index) const\n  {\n    const Index row = (RowsAtCompileTime == 1 || MaxRowsAtCompileTime==1) ? 0 : index;\n    const Index col = (RowsAtCompileTime == 1 || MaxRowsAtCompileTime==1) ? index : 0;\n    return packet<LoadMode,PacketType>(row,col);\n  }\n\nprotected:\n  typename internal::add_const_on_value_type<LhsNested>::type m_lhs;\n  typename internal::add_const_on_value_type<RhsNested>::type m_rhs;\n  \n  LhsEtorType m_lhsImpl;\n  RhsEtorType m_rhsImpl;\n\n  // TODO: Get rid of m_innerDim if known at compile time\n  Index m_innerDim;\n};\n\ntemplate<typename Lhs, typename Rhs>\nstruct product_evaluator<Product<Lhs, Rhs, DefaultProduct>, LazyCoeffBasedProductMode, DenseShape, DenseShape>\n  : product_evaluator<Product<Lhs, Rhs, LazyProduct>, CoeffBasedProductMode, DenseShape, DenseShape>\n{\n  typedef Product<Lhs, Rhs, DefaultProduct> XprType;\n  typedef Product<Lhs, Rhs, LazyProduct> BaseProduct;\n  typedef product_evaluator<BaseProduct, CoeffBasedProductMode, DenseShape, DenseShape> Base;\n  enum {\n    Flags = Base::Flags | EvalBeforeNestingBit\n  };\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  explicit product_evaluator(const XprType& xpr)\n    : Base(BaseProduct(xpr.lhs(),xpr.rhs()))\n  {}\n};\n\n/****************************************\n*** Coeff based product, Packet path  ***\n****************************************/\n\ntemplate<int UnrollingIndex, typename Lhs, typename Rhs, typename Packet, int LoadMode>\nstruct etor_product_packet_impl<RowMajor, UnrollingIndex, Lhs, Rhs, Packet, LoadMode>\n{\n  static EIGEN_STRONG_INLINE void run(Index row, Index col, const Lhs& lhs, const Rhs& rhs, Index innerDim, Packet &res)\n  {\n    etor_product_packet_impl<RowMajor, UnrollingIndex-1, Lhs, Rhs, Packet, LoadMode>::run(row, col, lhs, rhs, innerDim, res);\n    res =  pmadd(pset1<Packet>(lhs.coeff(row, Index(UnrollingIndex-1))), rhs.template packet<LoadMode,Packet>(Index(UnrollingIndex-1), col), res);\n  }\n};\n\ntemplate<int UnrollingIndex, typename Lhs, typename Rhs, typename Packet, int LoadMode>\nstruct etor_product_packet_impl<ColMajor, UnrollingIndex, Lhs, Rhs, Packet, LoadMode>\n{\n  static EIGEN_STRONG_INLINE void run(Index row, Index col, const Lhs& lhs, const Rhs& rhs, Index innerDim, Packet &res)\n  {\n    etor_product_packet_impl<ColMajor, UnrollingIndex-1, Lhs, Rhs, Packet, LoadMode>::run(row, col, lhs, rhs, innerDim, res);\n    res =  pmadd(lhs.template packet<LoadMode,Packet>(row, Index(UnrollingIndex-1)), pset1<Packet>(rhs.coeff(Index(UnrollingIndex-1), col)), res);\n  }\n};\n\ntemplate<typename Lhs, typename Rhs, typename Packet, int LoadMode>\nstruct etor_product_packet_impl<RowMajor, 1, Lhs, Rhs, Packet, LoadMode>\n{\n  static EIGEN_STRONG_INLINE void run(Index row, Index col, const Lhs& lhs, const Rhs& rhs, Index /*innerDim*/, Packet &res)\n  {\n    res = pmul(pset1<Packet>(lhs.coeff(row, Index(0))),rhs.template packet<LoadMode,Packet>(Index(0), col));\n  }\n};\n\ntemplate<typename Lhs, typename Rhs, typename Packet, int LoadMode>\nstruct etor_product_packet_impl<ColMajor, 1, Lhs, Rhs, Packet, LoadMode>\n{\n  static EIGEN_STRONG_INLINE void run(Index row, Index col, const Lhs& lhs, const Rhs& rhs, Index /*innerDim*/, Packet &res)\n  {\n    res = pmul(lhs.template packet<LoadMode,Packet>(row, Index(0)), pset1<Packet>(rhs.coeff(Index(0), col)));\n  }\n};\n\ntemplate<typename Lhs, typename Rhs, typename Packet, int LoadMode>\nstruct etor_product_packet_impl<RowMajor, 0, Lhs, Rhs, Packet, LoadMode>\n{\n  static EIGEN_STRONG_INLINE void run(Index /*row*/, Index /*col*/, const Lhs& /*lhs*/, const Rhs& /*rhs*/, Index /*innerDim*/, Packet &res)\n  {\n    res = pset1<Packet>(typename unpacket_traits<Packet>::type(0));\n  }\n};\n\ntemplate<typename Lhs, typename Rhs, typename Packet, int LoadMode>\nstruct etor_product_packet_impl<ColMajor, 0, Lhs, Rhs, Packet, LoadMode>\n{\n  static EIGEN_STRONG_INLINE void run(Index /*row*/, Index /*col*/, const Lhs& /*lhs*/, const Rhs& /*rhs*/, Index /*innerDim*/, Packet &res)\n  {\n    res = pset1<Packet>(typename unpacket_traits<Packet>::type(0));\n  }\n};\n\ntemplate<typename Lhs, typename Rhs, typename Packet, int LoadMode>\nstruct etor_product_packet_impl<RowMajor, Dynamic, Lhs, Rhs, Packet, LoadMode>\n{\n  static EIGEN_STRONG_INLINE void run(Index row, Index col, const Lhs& lhs, const Rhs& rhs, Index innerDim, Packet& res)\n  {\n    res = pset1<Packet>(typename unpacket_traits<Packet>::type(0));\n    for(Index i = 0; i < innerDim; ++i)\n      res =  pmadd(pset1<Packet>(lhs.coeff(row, i)), rhs.template packet<LoadMode,Packet>(i, col), res);\n  }\n};\n\ntemplate<typename Lhs, typename Rhs, typename Packet, int LoadMode>\nstruct etor_product_packet_impl<ColMajor, Dynamic, Lhs, Rhs, Packet, LoadMode>\n{\n  static EIGEN_STRONG_INLINE void run(Index row, Index col, const Lhs& lhs, const Rhs& rhs, Index innerDim, Packet& res)\n  {\n    res = pset1<Packet>(typename unpacket_traits<Packet>::type(0));\n    for(Index i = 0; i < innerDim; ++i)\n      res =  pmadd(lhs.template packet<LoadMode,Packet>(row, i), pset1<Packet>(rhs.coeff(i, col)), res);\n  }\n};\n\n\n/***************************************************************************\n* Triangular products\n***************************************************************************/\ntemplate<int Mode, bool LhsIsTriangular,\n         typename Lhs, bool LhsIsVector,\n         typename Rhs, bool RhsIsVector>\nstruct triangular_product_impl;\n\ntemplate<typename Lhs, typename Rhs, int ProductTag>\nstruct generic_product_impl<Lhs,Rhs,TriangularShape,DenseShape,ProductTag>\n  : generic_product_impl_base<Lhs,Rhs,generic_product_impl<Lhs,Rhs,TriangularShape,DenseShape,ProductTag> >\n{\n  typedef typename Product<Lhs,Rhs>::Scalar Scalar;\n  \n  template<typename Dest>\n  static void scaleAndAddTo(Dest& dst, const Lhs& lhs, const Rhs& rhs, const Scalar& alpha)\n  {\n    triangular_product_impl<Lhs::Mode,true,typename Lhs::MatrixType,false,Rhs, Rhs::ColsAtCompileTime==1>\n        ::run(dst, lhs.nestedExpression(), rhs, alpha);\n  }\n};\n\ntemplate<typename Lhs, typename Rhs, int ProductTag>\nstruct generic_product_impl<Lhs,Rhs,DenseShape,TriangularShape,ProductTag>\n: generic_product_impl_base<Lhs,Rhs,generic_product_impl<Lhs,Rhs,DenseShape,TriangularShape,ProductTag> >\n{\n  typedef typename Product<Lhs,Rhs>::Scalar Scalar;\n  \n  template<typename Dest>\n  static void scaleAndAddTo(Dest& dst, const Lhs& lhs, const Rhs& rhs, const Scalar& alpha)\n  {\n    triangular_product_impl<Rhs::Mode,false,Lhs,Lhs::RowsAtCompileTime==1, typename Rhs::MatrixType, false>::run(dst, lhs, rhs.nestedExpression(), alpha);\n  }\n};\n\n\n/***************************************************************************\n* SelfAdjoint products\n***************************************************************************/\ntemplate <typename Lhs, int LhsMode, bool LhsIsVector,\n          typename Rhs, int RhsMode, bool RhsIsVector>\nstruct selfadjoint_product_impl;\n\ntemplate<typename Lhs, typename Rhs, int ProductTag>\nstruct generic_product_impl<Lhs,Rhs,SelfAdjointShape,DenseShape,ProductTag>\n  : generic_product_impl_base<Lhs,Rhs,generic_product_impl<Lhs,Rhs,SelfAdjointShape,DenseShape,ProductTag> >\n{\n  typedef typename Product<Lhs,Rhs>::Scalar Scalar;\n  \n  template<typename Dest>\n  static EIGEN_DEVICE_FUNC\n  void scaleAndAddTo(Dest& dst, const Lhs& lhs, const Rhs& rhs, const Scalar& alpha)\n  {\n    selfadjoint_product_impl<typename Lhs::MatrixType,Lhs::Mode,false,Rhs,0,Rhs::IsVectorAtCompileTime>::run(dst, lhs.nestedExpression(), rhs, alpha);\n  }\n};\n\ntemplate<typename Lhs, typename Rhs, int ProductTag>\nstruct generic_product_impl<Lhs,Rhs,DenseShape,SelfAdjointShape,ProductTag>\n: generic_product_impl_base<Lhs,Rhs,generic_product_impl<Lhs,Rhs,DenseShape,SelfAdjointShape,ProductTag> >\n{\n  typedef typename Product<Lhs,Rhs>::Scalar Scalar;\n  \n  template<typename Dest>\n  static void scaleAndAddTo(Dest& dst, const Lhs& lhs, const Rhs& rhs, const Scalar& alpha)\n  {\n    selfadjoint_product_impl<Lhs,0,Lhs::IsVectorAtCompileTime,typename Rhs::MatrixType,Rhs::Mode,false>::run(dst, lhs, rhs.nestedExpression(), alpha);\n  }\n};\n\n\n/***************************************************************************\n* Diagonal products\n***************************************************************************/\n  \ntemplate<typename MatrixType, typename DiagonalType, typename Derived, int ProductOrder>\nstruct diagonal_product_evaluator_base\n  : evaluator_base<Derived>\n{\n   typedef typename ScalarBinaryOpTraits<typename MatrixType::Scalar, typename DiagonalType::Scalar>::ReturnType Scalar;\npublic:\n  enum {\n    CoeffReadCost = NumTraits<Scalar>::MulCost + evaluator<MatrixType>::CoeffReadCost + evaluator<DiagonalType>::CoeffReadCost,\n    \n    MatrixFlags = evaluator<MatrixType>::Flags,\n    DiagFlags = evaluator<DiagonalType>::Flags,\n    \n    _StorageOrder = (Derived::MaxRowsAtCompileTime==1 && Derived::MaxColsAtCompileTime!=1) ? RowMajor\n                  : (Derived::MaxColsAtCompileTime==1 && Derived::MaxRowsAtCompileTime!=1) ? ColMajor\n                  : MatrixFlags & RowMajorBit ? RowMajor : ColMajor,\n    _SameStorageOrder = _StorageOrder == (MatrixFlags & RowMajorBit ? RowMajor : ColMajor),\n\n    _ScalarAccessOnDiag =  !((int(_StorageOrder) == ColMajor && int(ProductOrder) == OnTheLeft)\n                           ||(int(_StorageOrder) == RowMajor && int(ProductOrder) == OnTheRight)),\n    _SameTypes = is_same<typename MatrixType::Scalar, typename DiagonalType::Scalar>::value,\n    // FIXME currently we need same types, but in the future the next rule should be the one\n    //_Vectorizable = bool(int(MatrixFlags)&PacketAccessBit) && ((!_PacketOnDiag) || (_SameTypes && bool(int(DiagFlags)&PacketAccessBit))),\n    _Vectorizable =   bool(int(MatrixFlags)&PacketAccessBit)\n                  &&  _SameTypes\n                  && (_SameStorageOrder || (MatrixFlags&LinearAccessBit)==LinearAccessBit)\n                  && (_ScalarAccessOnDiag || (bool(int(DiagFlags)&PacketAccessBit))),\n    _LinearAccessMask = (MatrixType::RowsAtCompileTime==1 || MatrixType::ColsAtCompileTime==1) ? LinearAccessBit : 0,\n    Flags = ((HereditaryBits|_LinearAccessMask) & (unsigned int)(MatrixFlags)) | (_Vectorizable ? PacketAccessBit : 0),\n    Alignment = evaluator<MatrixType>::Alignment,\n\n    AsScalarProduct =     (DiagonalType::SizeAtCompileTime==1)\n                      ||  (DiagonalType::SizeAtCompileTime==Dynamic && MatrixType::RowsAtCompileTime==1 && ProductOrder==OnTheLeft)\n                      ||  (DiagonalType::SizeAtCompileTime==Dynamic && MatrixType::ColsAtCompileTime==1 && ProductOrder==OnTheRight)\n  };\n  \n  EIGEN_DEVICE_FUNC diagonal_product_evaluator_base(const MatrixType &mat, const DiagonalType &diag)\n    : m_diagImpl(diag), m_matImpl(mat)\n  {\n    EIGEN_INTERNAL_CHECK_COST_VALUE(NumTraits<Scalar>::MulCost);\n    EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);\n  }\n  \n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar coeff(Index idx) const\n  {\n    if(AsScalarProduct)\n      return m_diagImpl.coeff(0) * m_matImpl.coeff(idx);\n    else\n      return m_diagImpl.coeff(idx) * m_matImpl.coeff(idx);\n  }\n  \nprotected:\n  template<int LoadMode,typename PacketType>\n  EIGEN_STRONG_INLINE PacketType packet_impl(Index row, Index col, Index id, internal::true_type) const\n  {\n    return internal::pmul(m_matImpl.template packet<LoadMode,PacketType>(row, col),\n                          internal::pset1<PacketType>(m_diagImpl.coeff(id)));\n  }\n  \n  template<int LoadMode,typename PacketType>\n  EIGEN_STRONG_INLINE PacketType packet_impl(Index row, Index col, Index id, internal::false_type) const\n  {\n    enum {\n      InnerSize = (MatrixType::Flags & RowMajorBit) ? MatrixType::ColsAtCompileTime : MatrixType::RowsAtCompileTime,\n      DiagonalPacketLoadMode = EIGEN_PLAIN_ENUM_MIN(LoadMode,((InnerSize%16) == 0) ? int(Aligned16) : int(evaluator<DiagonalType>::Alignment)) // FIXME hardcoded 16!!\n    };\n    return internal::pmul(m_matImpl.template packet<LoadMode,PacketType>(row, col),\n                          m_diagImpl.template packet<DiagonalPacketLoadMode,PacketType>(id));\n  }\n  \n  evaluator<DiagonalType> m_diagImpl;\n  evaluator<MatrixType>   m_matImpl;\n};\n\n// diagonal * dense\ntemplate<typename Lhs, typename Rhs, int ProductKind, int ProductTag>\nstruct product_evaluator<Product<Lhs, Rhs, ProductKind>, ProductTag, DiagonalShape, DenseShape>\n  : diagonal_product_evaluator_base<Rhs, typename Lhs::DiagonalVectorType, Product<Lhs, Rhs, LazyProduct>, OnTheLeft>\n{\n  typedef diagonal_product_evaluator_base<Rhs, typename Lhs::DiagonalVectorType, Product<Lhs, Rhs, LazyProduct>, OnTheLeft> Base;\n  using Base::m_diagImpl;\n  using Base::m_matImpl;\n  using Base::coeff;\n  typedef typename Base::Scalar Scalar;\n  \n  typedef Product<Lhs, Rhs, ProductKind> XprType;\n  typedef typename XprType::PlainObject PlainObject;\n  typedef typename Lhs::DiagonalVectorType DiagonalType;\n\n  \n  enum { StorageOrder = Base::_StorageOrder };\n\n  EIGEN_DEVICE_FUNC explicit product_evaluator(const XprType& xpr)\n    : Base(xpr.rhs(), xpr.lhs().diagonal())\n  {\n  }\n  \n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar coeff(Index row, Index col) const\n  {\n    return m_diagImpl.coeff(row) * m_matImpl.coeff(row, col);\n  }\n  \n#ifndef EIGEN_GPUCC\n  template<int LoadMode,typename PacketType>\n  EIGEN_STRONG_INLINE PacketType packet(Index row, Index col) const\n  {\n    // FIXME: NVCC used to complain about the template keyword, but we have to check whether this is still the case.\n    // See also similar calls below.\n    return this->template packet_impl<LoadMode,PacketType>(row,col, row,\n                                 typename internal::conditional<int(StorageOrder)==RowMajor, internal::true_type, internal::false_type>::type());\n  }\n  \n  template<int LoadMode,typename PacketType>\n  EIGEN_STRONG_INLINE PacketType packet(Index idx) const\n  {\n    return packet<LoadMode,PacketType>(int(StorageOrder)==ColMajor?idx:0,int(StorageOrder)==ColMajor?0:idx);\n  }\n#endif\n};\n\n// dense * diagonal\ntemplate<typename Lhs, typename Rhs, int ProductKind, int ProductTag>\nstruct product_evaluator<Product<Lhs, Rhs, ProductKind>, ProductTag, DenseShape, DiagonalShape>\n  : diagonal_product_evaluator_base<Lhs, typename Rhs::DiagonalVectorType, Product<Lhs, Rhs, LazyProduct>, OnTheRight>\n{\n  typedef diagonal_product_evaluator_base<Lhs, typename Rhs::DiagonalVectorType, Product<Lhs, Rhs, LazyProduct>, OnTheRight> Base;\n  using Base::m_diagImpl;\n  using Base::m_matImpl;\n  using Base::coeff;\n  typedef typename Base::Scalar Scalar;\n  \n  typedef Product<Lhs, Rhs, ProductKind> XprType;\n  typedef typename XprType::PlainObject PlainObject;\n  \n  enum { StorageOrder = Base::_StorageOrder };\n\n  EIGEN_DEVICE_FUNC explicit product_evaluator(const XprType& xpr)\n    : Base(xpr.lhs(), xpr.rhs().diagonal())\n  {\n  }\n  \n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar coeff(Index row, Index col) const\n  {\n    return m_matImpl.coeff(row, col) * m_diagImpl.coeff(col);\n  }\n  \n#ifndef EIGEN_GPUCC\n  template<int LoadMode,typename PacketType>\n  EIGEN_STRONG_INLINE PacketType packet(Index row, Index col) const\n  {\n    return this->template packet_impl<LoadMode,PacketType>(row,col, col,\n                                 typename internal::conditional<int(StorageOrder)==ColMajor, internal::true_type, internal::false_type>::type());\n  }\n  \n  template<int LoadMode,typename PacketType>\n  EIGEN_STRONG_INLINE PacketType packet(Index idx) const\n  {\n    return packet<LoadMode,PacketType>(int(StorageOrder)==ColMajor?idx:0,int(StorageOrder)==ColMajor?0:idx);\n  }\n#endif\n};\n\n/***************************************************************************\n* Products with permutation matrices\n***************************************************************************/\n\n/** \\internal\n  * \\class permutation_matrix_product\n  * Internal helper class implementing the product between a permutation matrix and a matrix.\n  * This class is specialized for DenseShape below and for SparseShape in SparseCore/SparsePermutation.h\n  */\ntemplate<typename ExpressionType, int Side, bool Transposed, typename ExpressionShape>\nstruct permutation_matrix_product;\n\ntemplate<typename ExpressionType, int Side, bool Transposed>\nstruct permutation_matrix_product<ExpressionType, Side, Transposed, DenseShape>\n{\n    typedef typename nested_eval<ExpressionType, 1>::type MatrixType;\n    typedef typename remove_all<MatrixType>::type MatrixTypeCleaned;\n\n    template<typename Dest, typename PermutationType>\n    static inline void run(Dest& dst, const PermutationType& perm, const ExpressionType& xpr)\n    {\n      MatrixType mat(xpr);\n      const Index n = Side==OnTheLeft ? mat.rows() : mat.cols();\n      // FIXME we need an is_same for expression that is not sensitive to constness. For instance\n      // is_same_xpr<Block<const Matrix>, Block<Matrix> >::value should be true.\n      //if(is_same<MatrixTypeCleaned,Dest>::value && extract_data(dst) == extract_data(mat))\n      if(is_same_dense(dst, mat))\n      {\n        // apply the permutation inplace\n        Matrix<bool,PermutationType::RowsAtCompileTime,1,0,PermutationType::MaxRowsAtCompileTime> mask(perm.size());\n        mask.fill(false);\n        Index r = 0;\n        while(r < perm.size())\n        {\n          // search for the next seed\n          while(r<perm.size() && mask[r]) r++;\n          if(r>=perm.size())\n            break;\n          // we got one, let's follow it until we are back to the seed\n          Index k0 = r++;\n          Index kPrev = k0;\n          mask.coeffRef(k0) = true;\n          for(Index k=perm.indices().coeff(k0); k!=k0; k=perm.indices().coeff(k))\n          {\n                  Block<Dest, Side==OnTheLeft ? 1 : Dest::RowsAtCompileTime, Side==OnTheRight ? 1 : Dest::ColsAtCompileTime>(dst, k)\n            .swap(Block<Dest, Side==OnTheLeft ? 1 : Dest::RowsAtCompileTime, Side==OnTheRight ? 1 : Dest::ColsAtCompileTime>\n                       (dst,((Side==OnTheLeft) ^ Transposed) ? k0 : kPrev));\n\n            mask.coeffRef(k) = true;\n            kPrev = k;\n          }\n        }\n      }\n      else\n      {\n        for(Index i = 0; i < n; ++i)\n        {\n          Block<Dest, Side==OnTheLeft ? 1 : Dest::RowsAtCompileTime, Side==OnTheRight ? 1 : Dest::ColsAtCompileTime>\n               (dst, ((Side==OnTheLeft) ^ Transposed) ? perm.indices().coeff(i) : i)\n\n          =\n\n          Block<const MatrixTypeCleaned,Side==OnTheLeft ? 1 : MatrixTypeCleaned::RowsAtCompileTime,Side==OnTheRight ? 1 : MatrixTypeCleaned::ColsAtCompileTime>\n               (mat, ((Side==OnTheRight) ^ Transposed) ? perm.indices().coeff(i) : i);\n        }\n      }\n    }\n};\n\ntemplate<typename Lhs, typename Rhs, int ProductTag, typename MatrixShape>\nstruct generic_product_impl<Lhs, Rhs, PermutationShape, MatrixShape, ProductTag>\n{\n  template<typename Dest>\n  static void evalTo(Dest& dst, const Lhs& lhs, const Rhs& rhs)\n  {\n    permutation_matrix_product<Rhs, OnTheLeft, false, MatrixShape>::run(dst, lhs, rhs);\n  }\n};\n\ntemplate<typename Lhs, typename Rhs, int ProductTag, typename MatrixShape>\nstruct generic_product_impl<Lhs, Rhs, MatrixShape, PermutationShape, ProductTag>\n{\n  template<typename Dest>\n  static void evalTo(Dest& dst, const Lhs& lhs, const Rhs& rhs)\n  {\n    permutation_matrix_product<Lhs, OnTheRight, false, MatrixShape>::run(dst, rhs, lhs);\n  }\n};\n\ntemplate<typename Lhs, typename Rhs, int ProductTag, typename MatrixShape>\nstruct generic_product_impl<Inverse<Lhs>, Rhs, PermutationShape, MatrixShape, ProductTag>\n{\n  template<typename Dest>\n  static void evalTo(Dest& dst, const Inverse<Lhs>& lhs, const Rhs& rhs)\n  {\n    permutation_matrix_product<Rhs, OnTheLeft, true, MatrixShape>::run(dst, lhs.nestedExpression(), rhs);\n  }\n};\n\ntemplate<typename Lhs, typename Rhs, int ProductTag, typename MatrixShape>\nstruct generic_product_impl<Lhs, Inverse<Rhs>, MatrixShape, PermutationShape, ProductTag>\n{\n  template<typename Dest>\n  static void evalTo(Dest& dst, const Lhs& lhs, const Inverse<Rhs>& rhs)\n  {\n    permutation_matrix_product<Lhs, OnTheRight, true, MatrixShape>::run(dst, rhs.nestedExpression(), lhs);\n  }\n};\n\n\n/***************************************************************************\n* Products with transpositions matrices\n***************************************************************************/\n\n// FIXME could we unify Transpositions and Permutation into a single \"shape\"??\n\n/** \\internal\n  * \\class transposition_matrix_product\n  * Internal helper class implementing the product between a permutation matrix and a matrix.\n  */\ntemplate<typename ExpressionType, int Side, bool Transposed, typename ExpressionShape>\nstruct transposition_matrix_product\n{\n  typedef typename nested_eval<ExpressionType, 1>::type MatrixType;\n  typedef typename remove_all<MatrixType>::type MatrixTypeCleaned;\n  \n  template<typename Dest, typename TranspositionType>\n  static inline void run(Dest& dst, const TranspositionType& tr, const ExpressionType& xpr)\n  {\n    MatrixType mat(xpr);\n    typedef typename TranspositionType::StorageIndex StorageIndex;\n    const Index size = tr.size();\n    StorageIndex j = 0;\n\n    if(!is_same_dense(dst,mat))\n      dst = mat;\n\n    for(Index k=(Transposed?size-1:0) ; Transposed?k>=0:k<size ; Transposed?--k:++k)\n      if(Index(j=tr.coeff(k))!=k)\n      {\n        if(Side==OnTheLeft)        dst.row(k).swap(dst.row(j));\n        else if(Side==OnTheRight)  dst.col(k).swap(dst.col(j));\n      }\n  }\n};\n\ntemplate<typename Lhs, typename Rhs, int ProductTag, typename MatrixShape>\nstruct generic_product_impl<Lhs, Rhs, TranspositionsShape, MatrixShape, ProductTag>\n{\n  template<typename Dest>\n  static void evalTo(Dest& dst, const Lhs& lhs, const Rhs& rhs)\n  {\n    transposition_matrix_product<Rhs, OnTheLeft, false, MatrixShape>::run(dst, lhs, rhs);\n  }\n};\n\ntemplate<typename Lhs, typename Rhs, int ProductTag, typename MatrixShape>\nstruct generic_product_impl<Lhs, Rhs, MatrixShape, TranspositionsShape, ProductTag>\n{\n  template<typename Dest>\n  static void evalTo(Dest& dst, const Lhs& lhs, const Rhs& rhs)\n  {\n    transposition_matrix_product<Lhs, OnTheRight, false, MatrixShape>::run(dst, rhs, lhs);\n  }\n};\n\n\ntemplate<typename Lhs, typename Rhs, int ProductTag, typename MatrixShape>\nstruct generic_product_impl<Transpose<Lhs>, Rhs, TranspositionsShape, MatrixShape, ProductTag>\n{\n  template<typename Dest>\n  static void evalTo(Dest& dst, const Transpose<Lhs>& lhs, const Rhs& rhs)\n  {\n    transposition_matrix_product<Rhs, OnTheLeft, true, MatrixShape>::run(dst, lhs.nestedExpression(), rhs);\n  }\n};\n\ntemplate<typename Lhs, typename Rhs, int ProductTag, typename MatrixShape>\nstruct generic_product_impl<Lhs, Transpose<Rhs>, MatrixShape, TranspositionsShape, ProductTag>\n{\n  template<typename Dest>\n  static void evalTo(Dest& dst, const Lhs& lhs, const Transpose<Rhs>& rhs)\n  {\n    transposition_matrix_product<Lhs, OnTheRight, true, MatrixShape>::run(dst, rhs.nestedExpression(), lhs);\n  }\n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_PRODUCT_EVALUATORS_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/Random.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_RANDOM_H\n#define EIGEN_RANDOM_H\n\nnamespace Eigen { \n\nnamespace internal {\n\ntemplate<typename Scalar> struct scalar_random_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_random_op)\n  inline const Scalar operator() () const { return random<Scalar>(); }\n};\n\ntemplate<typename Scalar>\nstruct functor_traits<scalar_random_op<Scalar> >\n{ enum { Cost = 5 * NumTraits<Scalar>::MulCost, PacketAccess = false, IsRepeatable = false }; };\n\n} // end namespace internal\n\n/** \\returns a random matrix expression\n  *\n  * Numbers are uniformly spread through their whole definition range for integer types,\n  * and in the [-1:1] range for floating point scalar types.\n  * \n  * The parameters \\a rows and \\a cols are the number of rows and of columns of\n  * the returned matrix. Must be compatible with this MatrixBase type.\n  *\n  * \\not_reentrant\n  * \n  * This variant is meant to be used for dynamic-size matrix types. For fixed-size types,\n  * it is redundant to pass \\a rows and \\a cols as arguments, so Random() should be used\n  * instead.\n  * \n  *\n  * Example: \\include MatrixBase_random_int_int.cpp\n  * Output: \\verbinclude MatrixBase_random_int_int.out\n  *\n  * This expression has the \"evaluate before nesting\" flag so that it will be evaluated into\n  * a temporary matrix whenever it is nested in a larger expression. This prevents unexpected\n  * behavior with expressions involving random matrices.\n  * \n  * See DenseBase::NullaryExpr(Index, const CustomNullaryOp&) for an example using C++11 random generators.\n  *\n  * \\sa DenseBase::setRandom(), DenseBase::Random(Index), DenseBase::Random()\n  */\ntemplate<typename Derived>\ninline const typename DenseBase<Derived>::RandomReturnType\nDenseBase<Derived>::Random(Index rows, Index cols)\n{\n  return NullaryExpr(rows, cols, internal::scalar_random_op<Scalar>());\n}\n\n/** \\returns a random vector expression\n  *\n  * Numbers are uniformly spread through their whole definition range for integer types,\n  * and in the [-1:1] range for floating point scalar types.\n  *\n  * The parameter \\a size is the size of the returned vector.\n  * Must be compatible with this MatrixBase type.\n  *\n  * \\only_for_vectors\n  * \\not_reentrant\n  *\n  * This variant is meant to be used for dynamic-size vector types. For fixed-size types,\n  * it is redundant to pass \\a size as argument, so Random() should be used\n  * instead.\n  *\n  * Example: \\include MatrixBase_random_int.cpp\n  * Output: \\verbinclude MatrixBase_random_int.out\n  *\n  * This expression has the \"evaluate before nesting\" flag so that it will be evaluated into\n  * a temporary vector whenever it is nested in a larger expression. This prevents unexpected\n  * behavior with expressions involving random matrices.\n  *\n  * \\sa DenseBase::setRandom(), DenseBase::Random(Index,Index), DenseBase::Random()\n  */\ntemplate<typename Derived>\ninline const typename DenseBase<Derived>::RandomReturnType\nDenseBase<Derived>::Random(Index size)\n{\n  return NullaryExpr(size, internal::scalar_random_op<Scalar>());\n}\n\n/** \\returns a fixed-size random matrix or vector expression\n  *\n  * Numbers are uniformly spread through their whole definition range for integer types,\n  * and in the [-1:1] range for floating point scalar types.\n  * \n  * This variant is only for fixed-size MatrixBase types. For dynamic-size types, you\n  * need to use the variants taking size arguments.\n  *\n  * Example: \\include MatrixBase_random.cpp\n  * Output: \\verbinclude MatrixBase_random.out\n  *\n  * This expression has the \"evaluate before nesting\" flag so that it will be evaluated into\n  * a temporary matrix whenever it is nested in a larger expression. This prevents unexpected\n  * behavior with expressions involving random matrices.\n  * \n  * \\not_reentrant\n  *\n  * \\sa DenseBase::setRandom(), DenseBase::Random(Index,Index), DenseBase::Random(Index)\n  */\ntemplate<typename Derived>\ninline const typename DenseBase<Derived>::RandomReturnType\nDenseBase<Derived>::Random()\n{\n  return NullaryExpr(RowsAtCompileTime, ColsAtCompileTime, internal::scalar_random_op<Scalar>());\n}\n\n/** Sets all coefficients in this expression to random values.\n  *\n  * Numbers are uniformly spread through their whole definition range for integer types,\n  * and in the [-1:1] range for floating point scalar types.\n  * \n  * \\not_reentrant\n  * \n  * Example: \\include MatrixBase_setRandom.cpp\n  * Output: \\verbinclude MatrixBase_setRandom.out\n  *\n  * \\sa class CwiseNullaryOp, setRandom(Index), setRandom(Index,Index)\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC inline Derived& DenseBase<Derived>::setRandom()\n{\n  return *this = Random(rows(), cols());\n}\n\n/** Resizes to the given \\a newSize, and sets all coefficients in this expression to random values.\n  *\n  * Numbers are uniformly spread through their whole definition range for integer types,\n  * and in the [-1:1] range for floating point scalar types.\n  * \n  * \\only_for_vectors\n  * \\not_reentrant\n  *\n  * Example: \\include Matrix_setRandom_int.cpp\n  * Output: \\verbinclude Matrix_setRandom_int.out\n  *\n  * \\sa DenseBase::setRandom(), setRandom(Index,Index), class CwiseNullaryOp, DenseBase::Random()\n  */\ntemplate<typename Derived>\nEIGEN_STRONG_INLINE Derived&\nPlainObjectBase<Derived>::setRandom(Index newSize)\n{\n  resize(newSize);\n  return setRandom();\n}\n\n/** Resizes to the given size, and sets all coefficients in this expression to random values.\n  *\n  * Numbers are uniformly spread through their whole definition range for integer types,\n  * and in the [-1:1] range for floating point scalar types.\n  *\n  * \\not_reentrant\n  * \n  * \\param rows the new number of rows\n  * \\param cols the new number of columns\n  *\n  * Example: \\include Matrix_setRandom_int_int.cpp\n  * Output: \\verbinclude Matrix_setRandom_int_int.out\n  *\n  * \\sa DenseBase::setRandom(), setRandom(Index), class CwiseNullaryOp, DenseBase::Random()\n  */\ntemplate<typename Derived>\nEIGEN_STRONG_INLINE Derived&\nPlainObjectBase<Derived>::setRandom(Index rows, Index cols)\n{\n  resize(rows, cols);\n  return setRandom();\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_RANDOM_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/Redux.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_REDUX_H\n#define EIGEN_REDUX_H\n\nnamespace Eigen { \n\nnamespace internal {\n\n// TODO\n//  * implement other kind of vectorization\n//  * factorize code\n\n/***************************************************************************\n* Part 1 : the logic deciding a strategy for vectorization and unrolling\n***************************************************************************/\n\ntemplate<typename Func, typename Evaluator>\nstruct redux_traits\n{\npublic:\n    typedef typename find_best_packet<typename Evaluator::Scalar,Evaluator::SizeAtCompileTime>::type PacketType;\n  enum {\n    PacketSize = unpacket_traits<PacketType>::size,\n    InnerMaxSize = int(Evaluator::IsRowMajor)\n                 ? Evaluator::MaxColsAtCompileTime\n                 : Evaluator::MaxRowsAtCompileTime,\n    OuterMaxSize = int(Evaluator::IsRowMajor)\n                 ? Evaluator::MaxRowsAtCompileTime\n                 : Evaluator::MaxColsAtCompileTime,\n    SliceVectorizedWork = int(InnerMaxSize)==Dynamic ? Dynamic\n                        : int(OuterMaxSize)==Dynamic ? (int(InnerMaxSize)>=int(PacketSize) ? Dynamic : 0)\n                        : (int(InnerMaxSize)/int(PacketSize)) * int(OuterMaxSize)\n  };\n\n  enum {\n    MightVectorize = (int(Evaluator::Flags)&ActualPacketAccessBit)\n                  && (functor_traits<Func>::PacketAccess),\n    MayLinearVectorize = bool(MightVectorize) && (int(Evaluator::Flags)&LinearAccessBit),\n    MaySliceVectorize  = bool(MightVectorize) && (int(SliceVectorizedWork)==Dynamic || int(SliceVectorizedWork)>=3)\n  };\n\npublic:\n  enum {\n    Traversal = int(MayLinearVectorize) ? int(LinearVectorizedTraversal)\n              : int(MaySliceVectorize)  ? int(SliceVectorizedTraversal)\n                                        : int(DefaultTraversal)\n  };\n\npublic:\n  enum {\n    Cost = Evaluator::SizeAtCompileTime == Dynamic ? HugeCost\n         : Evaluator::SizeAtCompileTime * Evaluator::CoeffReadCost + (Evaluator::SizeAtCompileTime-1) * functor_traits<Func>::Cost,\n    UnrollingLimit = EIGEN_UNROLLING_LIMIT * (int(Traversal) == int(DefaultTraversal) ? 1 : int(PacketSize))\n  };\n\npublic:\n  enum {\n    Unrolling = Cost <= UnrollingLimit ? CompleteUnrolling : NoUnrolling\n  };\n  \n#ifdef EIGEN_DEBUG_ASSIGN\n  static void debug()\n  {\n    std::cerr << \"Xpr: \" << typeid(typename Evaluator::XprType).name() << std::endl;\n    std::cerr.setf(std::ios::hex, std::ios::basefield);\n    EIGEN_DEBUG_VAR(Evaluator::Flags)\n    std::cerr.unsetf(std::ios::hex);\n    EIGEN_DEBUG_VAR(InnerMaxSize)\n    EIGEN_DEBUG_VAR(OuterMaxSize)\n    EIGEN_DEBUG_VAR(SliceVectorizedWork)\n    EIGEN_DEBUG_VAR(PacketSize)\n    EIGEN_DEBUG_VAR(MightVectorize)\n    EIGEN_DEBUG_VAR(MayLinearVectorize)\n    EIGEN_DEBUG_VAR(MaySliceVectorize)\n    std::cerr << \"Traversal\" << \" = \" << Traversal << \" (\" << demangle_traversal(Traversal) << \")\" << std::endl;\n    EIGEN_DEBUG_VAR(UnrollingLimit)\n    std::cerr << \"Unrolling\" << \" = \" << Unrolling << \" (\" << demangle_unrolling(Unrolling) << \")\" << std::endl;\n    std::cerr << std::endl;\n  }\n#endif\n};\n\n/***************************************************************************\n* Part 2 : unrollers\n***************************************************************************/\n\n/*** no vectorization ***/\n\ntemplate<typename Func, typename Evaluator, int Start, int Length>\nstruct redux_novec_unroller\n{\n  enum {\n    HalfLength = Length/2\n  };\n\n  typedef typename Evaluator::Scalar Scalar;\n\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE Scalar run(const Evaluator &eval, const Func& func)\n  {\n    return func(redux_novec_unroller<Func, Evaluator, Start, HalfLength>::run(eval,func),\n                redux_novec_unroller<Func, Evaluator, Start+HalfLength, Length-HalfLength>::run(eval,func));\n  }\n};\n\ntemplate<typename Func, typename Evaluator, int Start>\nstruct redux_novec_unroller<Func, Evaluator, Start, 1>\n{\n  enum {\n    outer = Start / Evaluator::InnerSizeAtCompileTime,\n    inner = Start % Evaluator::InnerSizeAtCompileTime\n  };\n\n  typedef typename Evaluator::Scalar Scalar;\n\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE Scalar run(const Evaluator &eval, const Func&)\n  {\n    return eval.coeffByOuterInner(outer, inner);\n  }\n};\n\n// This is actually dead code and will never be called. It is required\n// to prevent false warnings regarding failed inlining though\n// for 0 length run() will never be called at all.\ntemplate<typename Func, typename Evaluator, int Start>\nstruct redux_novec_unroller<Func, Evaluator, Start, 0>\n{\n  typedef typename Evaluator::Scalar Scalar;\n  EIGEN_DEVICE_FUNC \n  static EIGEN_STRONG_INLINE Scalar run(const Evaluator&, const Func&) { return Scalar(); }\n};\n\n/*** vectorization ***/\n\ntemplate<typename Func, typename Evaluator, int Start, int Length>\nstruct redux_vec_unroller\n{\n  template<typename PacketType>\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE PacketType run(const Evaluator &eval, const Func& func)\n  {\n    enum {\n      PacketSize = unpacket_traits<PacketType>::size,\n      HalfLength = Length/2\n    };\n\n    return func.packetOp(\n            redux_vec_unroller<Func, Evaluator, Start, HalfLength>::template run<PacketType>(eval,func),\n            redux_vec_unroller<Func, Evaluator, Start+HalfLength, Length-HalfLength>::template run<PacketType>(eval,func) );\n  }\n};\n\ntemplate<typename Func, typename Evaluator, int Start>\nstruct redux_vec_unroller<Func, Evaluator, Start, 1>\n{\n  template<typename PacketType>\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE PacketType run(const Evaluator &eval, const Func&)\n  {\n    enum {\n      PacketSize = unpacket_traits<PacketType>::size,\n      index = Start * PacketSize,\n      outer = index / int(Evaluator::InnerSizeAtCompileTime),\n      inner = index % int(Evaluator::InnerSizeAtCompileTime),\n      alignment = Evaluator::Alignment\n    };\n    return eval.template packetByOuterInner<alignment,PacketType>(outer, inner);\n  }\n};\n\n/***************************************************************************\n* Part 3 : implementation of all cases\n***************************************************************************/\n\ntemplate<typename Func, typename Evaluator,\n         int Traversal = redux_traits<Func, Evaluator>::Traversal,\n         int Unrolling = redux_traits<Func, Evaluator>::Unrolling\n>\nstruct redux_impl;\n\ntemplate<typename Func, typename Evaluator>\nstruct redux_impl<Func, Evaluator, DefaultTraversal, NoUnrolling>\n{\n  typedef typename Evaluator::Scalar Scalar;\n\n  template<typename XprType>\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE\n  Scalar run(const Evaluator &eval, const Func& func, const XprType& xpr)\n  {\n    eigen_assert(xpr.rows()>0 && xpr.cols()>0 && \"you are using an empty matrix\");\n    Scalar res;\n    res = eval.coeffByOuterInner(0, 0);\n    for(Index i = 1; i < xpr.innerSize(); ++i)\n      res = func(res, eval.coeffByOuterInner(0, i));\n    for(Index i = 1; i < xpr.outerSize(); ++i)\n      for(Index j = 0; j < xpr.innerSize(); ++j)\n        res = func(res, eval.coeffByOuterInner(i, j));\n    return res;\n  }\n};\n\ntemplate<typename Func, typename Evaluator>\nstruct redux_impl<Func,Evaluator, DefaultTraversal, CompleteUnrolling>\n  : redux_novec_unroller<Func,Evaluator, 0, Evaluator::SizeAtCompileTime>\n{\n  typedef redux_novec_unroller<Func,Evaluator, 0, Evaluator::SizeAtCompileTime> Base;\n  typedef typename Evaluator::Scalar Scalar;\n  template<typename XprType>\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE\n  Scalar run(const Evaluator &eval, const Func& func, const XprType& /*xpr*/)\n  {\n    return Base::run(eval,func);\n  }\n};\n\ntemplate<typename Func, typename Evaluator>\nstruct redux_impl<Func, Evaluator, LinearVectorizedTraversal, NoUnrolling>\n{\n  typedef typename Evaluator::Scalar Scalar;\n  typedef typename redux_traits<Func, Evaluator>::PacketType PacketScalar;\n\n  template<typename XprType>\n  static Scalar run(const Evaluator &eval, const Func& func, const XprType& xpr)\n  {\n    const Index size = xpr.size();\n    \n    const Index packetSize = redux_traits<Func, Evaluator>::PacketSize;\n    const int packetAlignment = unpacket_traits<PacketScalar>::alignment;\n    enum {\n      alignment0 = (bool(Evaluator::Flags & DirectAccessBit) && bool(packet_traits<Scalar>::AlignedOnScalar)) ? int(packetAlignment) : int(Unaligned),\n      alignment = EIGEN_PLAIN_ENUM_MAX(alignment0, Evaluator::Alignment)\n    };\n    const Index alignedStart = internal::first_default_aligned(xpr);\n    const Index alignedSize2 = ((size-alignedStart)/(2*packetSize))*(2*packetSize);\n    const Index alignedSize = ((size-alignedStart)/(packetSize))*(packetSize);\n    const Index alignedEnd2 = alignedStart + alignedSize2;\n    const Index alignedEnd  = alignedStart + alignedSize;\n    Scalar res;\n    if(alignedSize)\n    {\n      PacketScalar packet_res0 = eval.template packet<alignment,PacketScalar>(alignedStart);\n      if(alignedSize>packetSize) // we have at least two packets to partly unroll the loop\n      {\n        PacketScalar packet_res1 = eval.template packet<alignment,PacketScalar>(alignedStart+packetSize);\n        for(Index index = alignedStart + 2*packetSize; index < alignedEnd2; index += 2*packetSize)\n        {\n          packet_res0 = func.packetOp(packet_res0, eval.template packet<alignment,PacketScalar>(index));\n          packet_res1 = func.packetOp(packet_res1, eval.template packet<alignment,PacketScalar>(index+packetSize));\n        }\n\n        packet_res0 = func.packetOp(packet_res0,packet_res1);\n        if(alignedEnd>alignedEnd2)\n          packet_res0 = func.packetOp(packet_res0, eval.template packet<alignment,PacketScalar>(alignedEnd2));\n      }\n      res = func.predux(packet_res0);\n\n      for(Index index = 0; index < alignedStart; ++index)\n        res = func(res,eval.coeff(index));\n\n      for(Index index = alignedEnd; index < size; ++index)\n        res = func(res,eval.coeff(index));\n    }\n    else // too small to vectorize anything.\n         // since this is dynamic-size hence inefficient anyway for such small sizes, don't try to optimize.\n    {\n      res = eval.coeff(0);\n      for(Index index = 1; index < size; ++index)\n        res = func(res,eval.coeff(index));\n    }\n\n    return res;\n  }\n};\n\n// NOTE: for SliceVectorizedTraversal we simply bypass unrolling\ntemplate<typename Func, typename Evaluator, int Unrolling>\nstruct redux_impl<Func, Evaluator, SliceVectorizedTraversal, Unrolling>\n{\n  typedef typename Evaluator::Scalar Scalar;\n  typedef typename redux_traits<Func, Evaluator>::PacketType PacketType;\n\n  template<typename XprType>\n  EIGEN_DEVICE_FUNC static Scalar run(const Evaluator &eval, const Func& func, const XprType& xpr)\n  {\n    eigen_assert(xpr.rows()>0 && xpr.cols()>0 && \"you are using an empty matrix\");\n    const Index innerSize = xpr.innerSize();\n    const Index outerSize = xpr.outerSize();\n    enum {\n      packetSize = redux_traits<Func, Evaluator>::PacketSize\n    };\n    const Index packetedInnerSize = ((innerSize)/packetSize)*packetSize;\n    Scalar res;\n    if(packetedInnerSize)\n    {\n      PacketType packet_res = eval.template packet<Unaligned,PacketType>(0,0);\n      for(Index j=0; j<outerSize; ++j)\n        for(Index i=(j==0?packetSize:0); i<packetedInnerSize; i+=Index(packetSize))\n          packet_res = func.packetOp(packet_res, eval.template packetByOuterInner<Unaligned,PacketType>(j,i));\n\n      res = func.predux(packet_res);\n      for(Index j=0; j<outerSize; ++j)\n        for(Index i=packetedInnerSize; i<innerSize; ++i)\n          res = func(res, eval.coeffByOuterInner(j,i));\n    }\n    else // too small to vectorize anything.\n         // since this is dynamic-size hence inefficient anyway for such small sizes, don't try to optimize.\n    {\n      res = redux_impl<Func, Evaluator, DefaultTraversal, NoUnrolling>::run(eval, func, xpr);\n    }\n\n    return res;\n  }\n};\n\ntemplate<typename Func, typename Evaluator>\nstruct redux_impl<Func, Evaluator, LinearVectorizedTraversal, CompleteUnrolling>\n{\n  typedef typename Evaluator::Scalar Scalar;\n\n  typedef typename redux_traits<Func, Evaluator>::PacketType PacketType;\n  enum {\n    PacketSize = redux_traits<Func, Evaluator>::PacketSize,\n    Size = Evaluator::SizeAtCompileTime,\n    VectorizedSize = (Size / PacketSize) * PacketSize\n  };\n\n  template<typename XprType>\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE\n  Scalar run(const Evaluator &eval, const Func& func, const XprType &xpr)\n  {\n    EIGEN_ONLY_USED_FOR_DEBUG(xpr)\n    eigen_assert(xpr.rows()>0 && xpr.cols()>0 && \"you are using an empty matrix\");\n    if (VectorizedSize > 0) {\n      Scalar res = func.predux(redux_vec_unroller<Func, Evaluator, 0, Size / PacketSize>::template run<PacketType>(eval,func));\n      if (VectorizedSize != Size)\n        res = func(res,redux_novec_unroller<Func, Evaluator, VectorizedSize, Size-VectorizedSize>::run(eval,func));\n      return res;\n    }\n    else {\n      return redux_novec_unroller<Func, Evaluator, 0, Size>::run(eval,func);\n    }\n  }\n};\n\n// evaluator adaptor\ntemplate<typename _XprType>\nclass redux_evaluator : public internal::evaluator<_XprType>\n{\n  typedef internal::evaluator<_XprType> Base;\npublic:\n  typedef _XprType XprType;\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  explicit redux_evaluator(const XprType &xpr) : Base(xpr) {}\n  \n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename XprType::PacketScalar PacketScalar;\n  \n  enum {\n    MaxRowsAtCompileTime = XprType::MaxRowsAtCompileTime,\n    MaxColsAtCompileTime = XprType::MaxColsAtCompileTime,\n    // TODO we should not remove DirectAccessBit and rather find an elegant way to query the alignment offset at runtime from the evaluator\n    Flags = Base::Flags & ~DirectAccessBit,\n    IsRowMajor = XprType::IsRowMajor,\n    SizeAtCompileTime = XprType::SizeAtCompileTime,\n    InnerSizeAtCompileTime = XprType::InnerSizeAtCompileTime\n  };\n  \n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  CoeffReturnType coeffByOuterInner(Index outer, Index inner) const\n  { return Base::coeff(IsRowMajor ? outer : inner, IsRowMajor ? inner : outer); }\n  \n  template<int LoadMode, typename PacketType>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  PacketType packetByOuterInner(Index outer, Index inner) const\n  { return Base::template packet<LoadMode,PacketType>(IsRowMajor ? outer : inner, IsRowMajor ? inner : outer); }\n  \n};\n\n} // end namespace internal\n\n/***************************************************************************\n* Part 4 : public API\n***************************************************************************/\n\n\n/** \\returns the result of a full redux operation on the whole matrix or vector using \\a func\n  *\n  * The template parameter \\a BinaryOp is the type of the functor \\a func which must be\n  * an associative operator. Both current C++98 and C++11 functor styles are handled.\n  *\n  * \\warning the matrix must be not empty, otherwise an assertion is triggered.\n  *\n  * \\sa DenseBase::sum(), DenseBase::minCoeff(), DenseBase::maxCoeff(), MatrixBase::colwise(), MatrixBase::rowwise()\n  */\ntemplate<typename Derived>\ntemplate<typename Func>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename internal::traits<Derived>::Scalar\nDenseBase<Derived>::redux(const Func& func) const\n{\n  eigen_assert(this->rows()>0 && this->cols()>0 && \"you are using an empty matrix\");\n\n  typedef typename internal::redux_evaluator<Derived> ThisEvaluator;\n  ThisEvaluator thisEval(derived());\n\n  // The initial expression is passed to the reducer as an additional argument instead of\n  // passing it as a member of redux_evaluator to help  \n  return internal::redux_impl<Func, ThisEvaluator>::run(thisEval, func, derived());\n}\n\n/** \\returns the minimum of all coefficients of \\c *this.\n  * \\warning the matrix must be not empty, otherwise an assertion is triggered.\n  * \\warning the result is undefined if \\c *this contains NaN.\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename internal::traits<Derived>::Scalar\nDenseBase<Derived>::minCoeff() const\n{\n  return derived().redux(Eigen::internal::scalar_min_op<Scalar,Scalar>());\n}\n\n/** \\returns the maximum of all coefficients of \\c *this.\n  * \\warning the matrix must be not empty, otherwise an assertion is triggered.\n  * \\warning the result is undefined if \\c *this contains NaN.\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename internal::traits<Derived>::Scalar\nDenseBase<Derived>::maxCoeff() const\n{\n  return derived().redux(Eigen::internal::scalar_max_op<Scalar,Scalar>());\n}\n\n/** \\returns the sum of all coefficients of \\c *this\n  *\n  * If \\c *this is empty, then the value 0 is returned.\n  *\n  * \\sa trace(), prod(), mean()\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename internal::traits<Derived>::Scalar\nDenseBase<Derived>::sum() const\n{\n  if(SizeAtCompileTime==0 || (SizeAtCompileTime==Dynamic && size()==0))\n    return Scalar(0);\n  return derived().redux(Eigen::internal::scalar_sum_op<Scalar,Scalar>());\n}\n\n/** \\returns the mean of all coefficients of *this\n*\n* \\sa trace(), prod(), sum()\n*/\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename internal::traits<Derived>::Scalar\nDenseBase<Derived>::mean() const\n{\n#ifdef __INTEL_COMPILER\n  #pragma warning push\n  #pragma warning ( disable : 2259 )\n#endif\n  return Scalar(derived().redux(Eigen::internal::scalar_sum_op<Scalar,Scalar>())) / Scalar(this->size());\n#ifdef __INTEL_COMPILER\n  #pragma warning pop\n#endif\n}\n\n/** \\returns the product of all coefficients of *this\n  *\n  * Example: \\include MatrixBase_prod.cpp\n  * Output: \\verbinclude MatrixBase_prod.out\n  *\n  * \\sa sum(), mean(), trace()\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename internal::traits<Derived>::Scalar\nDenseBase<Derived>::prod() const\n{\n  if(SizeAtCompileTime==0 || (SizeAtCompileTime==Dynamic && size()==0))\n    return Scalar(1);\n  return derived().redux(Eigen::internal::scalar_product_op<Scalar>());\n}\n\n/** \\returns the trace of \\c *this, i.e. the sum of the coefficients on the main diagonal.\n  *\n  * \\c *this can be any matrix, not necessarily square.\n  *\n  * \\sa diagonal(), sum()\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename internal::traits<Derived>::Scalar\nMatrixBase<Derived>::trace() const\n{\n  return derived().diagonal().sum();\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_REDUX_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/Ref.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_REF_H\n#define EIGEN_REF_H\n\nnamespace Eigen { \n\nnamespace internal {\n\ntemplate<typename _PlainObjectType, int _Options, typename _StrideType>\nstruct traits<Ref<_PlainObjectType, _Options, _StrideType> >\n  : public traits<Map<_PlainObjectType, _Options, _StrideType> >\n{\n  typedef _PlainObjectType PlainObjectType;\n  typedef _StrideType StrideType;\n  enum {\n    Options = _Options,\n    Flags = traits<Map<_PlainObjectType, _Options, _StrideType> >::Flags | NestByRefBit,\n    Alignment = traits<Map<_PlainObjectType, _Options, _StrideType> >::Alignment\n  };\n\n  template<typename Derived> struct match {\n    enum {\n      IsVectorAtCompileTime = PlainObjectType::IsVectorAtCompileTime || Derived::IsVectorAtCompileTime,\n      HasDirectAccess = internal::has_direct_access<Derived>::ret,\n      StorageOrderMatch = IsVectorAtCompileTime || ((PlainObjectType::Flags&RowMajorBit)==(Derived::Flags&RowMajorBit)),\n      InnerStrideMatch = int(StrideType::InnerStrideAtCompileTime)==int(Dynamic)\n                      || int(StrideType::InnerStrideAtCompileTime)==int(Derived::InnerStrideAtCompileTime)\n                      || (int(StrideType::InnerStrideAtCompileTime)==0 && int(Derived::InnerStrideAtCompileTime)==1),\n      OuterStrideMatch = IsVectorAtCompileTime\n                      || int(StrideType::OuterStrideAtCompileTime)==int(Dynamic) || int(StrideType::OuterStrideAtCompileTime)==int(Derived::OuterStrideAtCompileTime),\n      // NOTE, this indirection of evaluator<Derived>::Alignment is needed\n      // to workaround a very strange bug in MSVC related to the instantiation\n      // of has_*ary_operator in evaluator<CwiseNullaryOp>.\n      // This line is surprisingly very sensitive. For instance, simply adding parenthesis\n      // as \"DerivedAlignment = (int(evaluator<Derived>::Alignment)),\" will make MSVC fail...\n      DerivedAlignment = int(evaluator<Derived>::Alignment),\n      AlignmentMatch = (int(traits<PlainObjectType>::Alignment)==int(Unaligned)) || (DerivedAlignment >= int(Alignment)), // FIXME the first condition is not very clear, it should be replaced by the required alignment\n      ScalarTypeMatch = internal::is_same<typename PlainObjectType::Scalar, typename Derived::Scalar>::value,\n      MatchAtCompileTime = HasDirectAccess && StorageOrderMatch && InnerStrideMatch && OuterStrideMatch && AlignmentMatch && ScalarTypeMatch\n    };\n    typedef typename internal::conditional<MatchAtCompileTime,internal::true_type,internal::false_type>::type type;\n  };\n  \n};\n\ntemplate<typename Derived>\nstruct traits<RefBase<Derived> > : public traits<Derived> {};\n\n}\n\ntemplate<typename Derived> class RefBase\n : public MapBase<Derived>\n{\n  typedef typename internal::traits<Derived>::PlainObjectType PlainObjectType;\n  typedef typename internal::traits<Derived>::StrideType StrideType;\n\npublic:\n\n  typedef MapBase<Derived> Base;\n  EIGEN_DENSE_PUBLIC_INTERFACE(RefBase)\n\n  EIGEN_DEVICE_FUNC inline Index innerStride() const\n  {\n    return StrideType::InnerStrideAtCompileTime != 0 ? m_stride.inner() : 1;\n  }\n\n  EIGEN_DEVICE_FUNC inline Index outerStride() const\n  {\n    return StrideType::OuterStrideAtCompileTime != 0 ? m_stride.outer()\n         : IsVectorAtCompileTime ? this->size()\n         : int(Flags)&RowMajorBit ? this->cols()\n         : this->rows();\n  }\n\n  EIGEN_DEVICE_FUNC RefBase()\n    : Base(0,RowsAtCompileTime==Dynamic?0:RowsAtCompileTime,ColsAtCompileTime==Dynamic?0:ColsAtCompileTime),\n      // Stride<> does not allow default ctor for Dynamic strides, so let' initialize it with dummy values:\n      m_stride(StrideType::OuterStrideAtCompileTime==Dynamic?0:StrideType::OuterStrideAtCompileTime,\n               StrideType::InnerStrideAtCompileTime==Dynamic?0:StrideType::InnerStrideAtCompileTime)\n  {}\n  \n  EIGEN_INHERIT_ASSIGNMENT_OPERATORS(RefBase)\n\nprotected:\n\n  typedef Stride<StrideType::OuterStrideAtCompileTime,StrideType::InnerStrideAtCompileTime> StrideBase;\n\n  template<typename Expression>\n  EIGEN_DEVICE_FUNC void construct(Expression& expr)\n  {\n    EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(PlainObjectType,Expression);\n\n    if(PlainObjectType::RowsAtCompileTime==1)\n    {\n      eigen_assert(expr.rows()==1 || expr.cols()==1);\n      ::new (static_cast<Base*>(this)) Base(expr.data(), 1, expr.size());\n    }\n    else if(PlainObjectType::ColsAtCompileTime==1)\n    {\n      eigen_assert(expr.rows()==1 || expr.cols()==1);\n      ::new (static_cast<Base*>(this)) Base(expr.data(), expr.size(), 1);\n    }\n    else\n      ::new (static_cast<Base*>(this)) Base(expr.data(), expr.rows(), expr.cols());\n    \n    if(Expression::IsVectorAtCompileTime && (!PlainObjectType::IsVectorAtCompileTime) && ((Expression::Flags&RowMajorBit)!=(PlainObjectType::Flags&RowMajorBit)))\n      ::new (&m_stride) StrideBase(expr.innerStride(), StrideType::InnerStrideAtCompileTime==0?0:1);\n    else\n      ::new (&m_stride) StrideBase(StrideType::OuterStrideAtCompileTime==0?0:expr.outerStride(),\n                                   StrideType::InnerStrideAtCompileTime==0?0:expr.innerStride());    \n  }\n\n  StrideBase m_stride;\n};\n\n/** \\class Ref\n  * \\ingroup Core_Module\n  *\n  * \\brief A matrix or vector expression mapping an existing expression\n  *\n  * \\tparam PlainObjectType the equivalent matrix type of the mapped data\n  * \\tparam Options specifies the pointer alignment in bytes. It can be: \\c #Aligned128, , \\c #Aligned64, \\c #Aligned32, \\c #Aligned16, \\c #Aligned8 or \\c #Unaligned.\n  *                 The default is \\c #Unaligned.\n  * \\tparam StrideType optionally specifies strides. By default, Ref implies a contiguous storage along the inner dimension (inner stride==1),\n  *                   but accepts a variable outer stride (leading dimension).\n  *                   This can be overridden by specifying strides.\n  *                   The type passed here must be a specialization of the Stride template, see examples below.\n  *\n  * This class provides a way to write non-template functions taking Eigen objects as parameters while limiting the number of copies.\n  * A Ref<> object can represent either a const expression or a l-value:\n  * \\code\n  * // in-out argument:\n  * void foo1(Ref<VectorXf> x);\n  *\n  * // read-only const argument:\n  * void foo2(const Ref<const VectorXf>& x);\n  * \\endcode\n  *\n  * In the in-out case, the input argument must satisfy the constraints of the actual Ref<> type, otherwise a compilation issue will be triggered.\n  * By default, a Ref<VectorXf> can reference any dense vector expression of float having a contiguous memory layout.\n  * Likewise, a Ref<MatrixXf> can reference any column-major dense matrix expression of float whose column's elements are contiguously stored with\n  * the possibility to have a constant space in-between each column, i.e. the inner stride must be equal to 1, but the outer stride (or leading dimension)\n  * can be greater than the number of rows.\n  *\n  * In the const case, if the input expression does not match the above requirement, then it is evaluated into a temporary before being passed to the function.\n  * Here are some examples:\n  * \\code\n  * MatrixXf A;\n  * VectorXf a;\n  * foo1(a.head());             // OK\n  * foo1(A.col());              // OK\n  * foo1(A.row());              // Compilation error because here innerstride!=1\n  * foo2(A.row());              // Compilation error because A.row() is a 1xN object while foo2 is expecting a Nx1 object\n  * foo2(A.row().transpose());  // The row is copied into a contiguous temporary\n  * foo2(2*a);                  // The expression is evaluated into a temporary\n  * foo2(A.col().segment(2,4)); // No temporary\n  * \\endcode\n  *\n  * The range of inputs that can be referenced without temporary can be enlarged using the last two template parameters.\n  * Here is an example accepting an innerstride!=1:\n  * \\code\n  * // in-out argument:\n  * void foo3(Ref<VectorXf,0,InnerStride<> > x);\n  * foo3(A.row());              // OK\n  * \\endcode\n  * The downside here is that the function foo3 might be significantly slower than foo1 because it won't be able to exploit vectorization, and will involve more\n  * expensive address computations even if the input is contiguously stored in memory. To overcome this issue, one might propose to overload internally calling a\n  * template function, e.g.:\n  * \\code\n  * // in the .h:\n  * void foo(const Ref<MatrixXf>& A);\n  * void foo(const Ref<MatrixXf,0,Stride<> >& A);\n  *\n  * // in the .cpp:\n  * template<typename TypeOfA> void foo_impl(const TypeOfA& A) {\n  *     ... // crazy code goes here\n  * }\n  * void foo(const Ref<MatrixXf>& A) { foo_impl(A); }\n  * void foo(const Ref<MatrixXf,0,Stride<> >& A) { foo_impl(A); }\n  * \\endcode\n  *\n  * See also the following stackoverflow questions for further references:\n  *  - <a href=\"http://stackoverflow.com/questions/21132538/correct-usage-of-the-eigenref-class\">Correct usage of the Eigen::Ref<> class</a>\n  *\n  * \\sa PlainObjectBase::Map(), \\ref TopicStorageOrders\n  */\ntemplate<typename PlainObjectType, int Options, typename StrideType> class Ref\n  : public RefBase<Ref<PlainObjectType, Options, StrideType> >\n{\n  private:\n    typedef internal::traits<Ref> Traits;\n    template<typename Derived>\n    EIGEN_DEVICE_FUNC inline Ref(const PlainObjectBase<Derived>& expr,\n                                 typename internal::enable_if<bool(Traits::template match<Derived>::MatchAtCompileTime),Derived>::type* = 0);\n  public:\n\n    typedef RefBase<Ref> Base;\n    EIGEN_DENSE_PUBLIC_INTERFACE(Ref)\n\n\n    #ifndef EIGEN_PARSED_BY_DOXYGEN\n    template<typename Derived>\n    EIGEN_DEVICE_FUNC inline Ref(PlainObjectBase<Derived>& expr,\n                                 typename internal::enable_if<bool(Traits::template match<Derived>::MatchAtCompileTime),Derived>::type* = 0)\n    {\n      EIGEN_STATIC_ASSERT(bool(Traits::template match<Derived>::MatchAtCompileTime), STORAGE_LAYOUT_DOES_NOT_MATCH);\n      Base::construct(expr.derived());\n    }\n    template<typename Derived>\n    EIGEN_DEVICE_FUNC inline Ref(const DenseBase<Derived>& expr,\n                                 typename internal::enable_if<bool(Traits::template match<Derived>::MatchAtCompileTime),Derived>::type* = 0)\n    #else\n    /** Implicit constructor from any dense expression */\n    template<typename Derived>\n    inline Ref(DenseBase<Derived>& expr)\n    #endif\n    {\n      EIGEN_STATIC_ASSERT(bool(internal::is_lvalue<Derived>::value), THIS_EXPRESSION_IS_NOT_A_LVALUE__IT_IS_READ_ONLY);\n      EIGEN_STATIC_ASSERT(bool(Traits::template match<Derived>::MatchAtCompileTime), STORAGE_LAYOUT_DOES_NOT_MATCH);\n      EIGEN_STATIC_ASSERT(!Derived::IsPlainObjectBase,THIS_EXPRESSION_IS_NOT_A_LVALUE__IT_IS_READ_ONLY);\n      Base::construct(expr.const_cast_derived());\n    }\n\n    EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Ref)\n\n};\n\n// this is the const ref version\ntemplate<typename TPlainObjectType, int Options, typename StrideType> class Ref<const TPlainObjectType, Options, StrideType>\n  : public RefBase<Ref<const TPlainObjectType, Options, StrideType> >\n{\n    typedef internal::traits<Ref> Traits;\n  public:\n\n    typedef RefBase<Ref> Base;\n    EIGEN_DENSE_PUBLIC_INTERFACE(Ref)\n\n    template<typename Derived>\n    EIGEN_DEVICE_FUNC inline Ref(const DenseBase<Derived>& expr,\n                                 typename internal::enable_if<bool(Traits::template match<Derived>::ScalarTypeMatch),Derived>::type* = 0)\n    {\n//      std::cout << match_helper<Derived>::HasDirectAccess << \",\" << match_helper<Derived>::OuterStrideMatch << \",\" << match_helper<Derived>::InnerStrideMatch << \"\\n\";\n//      std::cout << int(StrideType::OuterStrideAtCompileTime) << \" - \" << int(Derived::OuterStrideAtCompileTime) << \"\\n\";\n//      std::cout << int(StrideType::InnerStrideAtCompileTime) << \" - \" << int(Derived::InnerStrideAtCompileTime) << \"\\n\";\n      construct(expr.derived(), typename Traits::template match<Derived>::type());\n    }\n\n    EIGEN_DEVICE_FUNC inline Ref(const Ref& other) : Base(other) {\n      // copy constructor shall not copy the m_object, to avoid unnecessary malloc and copy\n    }\n\n    template<typename OtherRef>\n    EIGEN_DEVICE_FUNC inline Ref(const RefBase<OtherRef>& other) {\n      construct(other.derived(), typename Traits::template match<OtherRef>::type());\n    }\n\n  protected:\n\n    template<typename Expression>\n    EIGEN_DEVICE_FUNC void construct(const Expression& expr,internal::true_type)\n    {\n      Base::construct(expr);\n    }\n\n    template<typename Expression>\n    EIGEN_DEVICE_FUNC void construct(const Expression& expr, internal::false_type)\n    {\n      internal::call_assignment_no_alias(m_object,expr,internal::assign_op<Scalar,Scalar>());\n      Base::construct(m_object);\n    }\n\n  protected:\n    TPlainObjectType m_object;\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_REF_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/Replicate.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009-2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_REPLICATE_H\n#define EIGEN_REPLICATE_H\n\nnamespace Eigen { \n\nnamespace internal {\ntemplate<typename MatrixType,int RowFactor,int ColFactor>\nstruct traits<Replicate<MatrixType,RowFactor,ColFactor> >\n : traits<MatrixType>\n{\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename traits<MatrixType>::StorageKind StorageKind;\n  typedef typename traits<MatrixType>::XprKind XprKind;\n  typedef typename ref_selector<MatrixType>::type MatrixTypeNested;\n  typedef typename remove_reference<MatrixTypeNested>::type _MatrixTypeNested;\n  enum {\n    RowsAtCompileTime = RowFactor==Dynamic || int(MatrixType::RowsAtCompileTime)==Dynamic\n                      ? Dynamic\n                      : RowFactor * MatrixType::RowsAtCompileTime,\n    ColsAtCompileTime = ColFactor==Dynamic || int(MatrixType::ColsAtCompileTime)==Dynamic\n                      ? Dynamic\n                      : ColFactor * MatrixType::ColsAtCompileTime,\n   //FIXME we don't propagate the max sizes !!!\n    MaxRowsAtCompileTime = RowsAtCompileTime,\n    MaxColsAtCompileTime = ColsAtCompileTime,\n    IsRowMajor = MaxRowsAtCompileTime==1 && MaxColsAtCompileTime!=1 ? 1\n               : MaxColsAtCompileTime==1 && MaxRowsAtCompileTime!=1 ? 0\n               : (MatrixType::Flags & RowMajorBit) ? 1 : 0,\n    \n    // FIXME enable DirectAccess with negative strides?\n    Flags = IsRowMajor ? RowMajorBit : 0\n  };\n};\n}\n\n/**\n  * \\class Replicate\n  * \\ingroup Core_Module\n  *\n  * \\brief Expression of the multiple replication of a matrix or vector\n  *\n  * \\tparam MatrixType the type of the object we are replicating\n  * \\tparam RowFactor number of repetitions at compile time along the vertical direction, can be Dynamic.\n  * \\tparam ColFactor number of repetitions at compile time along the horizontal direction, can be Dynamic.\n  *\n  * This class represents an expression of the multiple replication of a matrix or vector.\n  * It is the return type of DenseBase::replicate() and most of the time\n  * this is the only way it is used.\n  *\n  * \\sa DenseBase::replicate()\n  */\ntemplate<typename MatrixType,int RowFactor,int ColFactor> class Replicate\n  : public internal::dense_xpr_base< Replicate<MatrixType,RowFactor,ColFactor> >::type\n{\n    typedef typename internal::traits<Replicate>::MatrixTypeNested MatrixTypeNested;\n    typedef typename internal::traits<Replicate>::_MatrixTypeNested _MatrixTypeNested;\n  public:\n\n    typedef typename internal::dense_xpr_base<Replicate>::type Base;\n    EIGEN_DENSE_PUBLIC_INTERFACE(Replicate)\n    typedef typename internal::remove_all<MatrixType>::type NestedExpression;\n\n    template<typename OriginalMatrixType>\n    EIGEN_DEVICE_FUNC\n    inline explicit Replicate(const OriginalMatrixType& matrix)\n      : m_matrix(matrix), m_rowFactor(RowFactor), m_colFactor(ColFactor)\n    {\n      EIGEN_STATIC_ASSERT((internal::is_same<typename internal::remove_const<MatrixType>::type,OriginalMatrixType>::value),\n                          THE_MATRIX_OR_EXPRESSION_THAT_YOU_PASSED_DOES_NOT_HAVE_THE_EXPECTED_TYPE)\n      eigen_assert(RowFactor!=Dynamic && ColFactor!=Dynamic);\n    }\n\n    template<typename OriginalMatrixType>\n    EIGEN_DEVICE_FUNC\n    inline Replicate(const OriginalMatrixType& matrix, Index rowFactor, Index colFactor)\n      : m_matrix(matrix), m_rowFactor(rowFactor), m_colFactor(colFactor)\n    {\n      EIGEN_STATIC_ASSERT((internal::is_same<typename internal::remove_const<MatrixType>::type,OriginalMatrixType>::value),\n                          THE_MATRIX_OR_EXPRESSION_THAT_YOU_PASSED_DOES_NOT_HAVE_THE_EXPECTED_TYPE)\n    }\n\n    EIGEN_DEVICE_FUNC\n    inline Index rows() const { return m_matrix.rows() * m_rowFactor.value(); }\n    EIGEN_DEVICE_FUNC\n    inline Index cols() const { return m_matrix.cols() * m_colFactor.value(); }\n\n    EIGEN_DEVICE_FUNC\n    const _MatrixTypeNested& nestedExpression() const\n    { \n      return m_matrix; \n    }\n\n  protected:\n    MatrixTypeNested m_matrix;\n    const internal::variable_if_dynamic<Index, RowFactor> m_rowFactor;\n    const internal::variable_if_dynamic<Index, ColFactor> m_colFactor;\n};\n\n/**\n  * \\return an expression of the replication of \\c *this\n  *\n  * Example: \\include MatrixBase_replicate.cpp\n  * Output: \\verbinclude MatrixBase_replicate.out\n  *\n  * \\sa VectorwiseOp::replicate(), DenseBase::replicate(Index,Index), class Replicate\n  */\ntemplate<typename Derived>\ntemplate<int RowFactor, int ColFactor>\nEIGEN_DEVICE_FUNC const Replicate<Derived,RowFactor,ColFactor>\nDenseBase<Derived>::replicate() const\n{\n  return Replicate<Derived,RowFactor,ColFactor>(derived());\n}\n\n/**\n  * \\return an expression of the replication of each column (or row) of \\c *this\n  *\n  * Example: \\include DirectionWise_replicate_int.cpp\n  * Output: \\verbinclude DirectionWise_replicate_int.out\n  *\n  * \\sa VectorwiseOp::replicate(), DenseBase::replicate(), class Replicate\n  */\ntemplate<typename ExpressionType, int Direction>\nEIGEN_DEVICE_FUNC const typename VectorwiseOp<ExpressionType,Direction>::ReplicateReturnType\nVectorwiseOp<ExpressionType,Direction>::replicate(Index factor) const\n{\n  return typename VectorwiseOp<ExpressionType,Direction>::ReplicateReturnType\n          (_expression(),Direction==Vertical?factor:1,Direction==Horizontal?factor:1);\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_REPLICATE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/Reshaped.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2017 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2014 yoco <peter.xiau@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_RESHAPED_H\n#define EIGEN_RESHAPED_H\n\nnamespace Eigen {\nnamespace internal {\n\n/** \\class Reshaped\n  * \\ingroup Core_Module\n  *\n  * \\brief Expression of a fixed-size or dynamic-size reshape\n  *\n  * \\tparam XprType the type of the expression in which we are taking a reshape\n  * \\tparam Rows the number of rows of the reshape we are taking at compile time (optional)\n  * \\tparam Cols the number of columns of the reshape we are taking at compile time (optional)\n  * \\tparam Order can be ColMajor or RowMajor, default is ColMajor.\n  *\n  * This class represents an expression of either a fixed-size or dynamic-size reshape.\n  * It is the return type of DenseBase::reshaped(NRowsType,NColsType) and\n  * most of the time this is the only way it is used.\n  *\n  * However, in C++98, if you want to directly maniputate reshaped expressions,\n  * for instance if you want to write a function returning such an expression, you\n  * will need to use this class. In C++11, it is advised to use the \\em auto\n  * keyword for such use cases.\n  *\n  * Here is an example illustrating the dynamic case:\n  * \\include class_Reshaped.cpp\n  * Output: \\verbinclude class_Reshaped.out\n  *\n  * Here is an example illustrating the fixed-size case:\n  * \\include class_FixedReshaped.cpp\n  * Output: \\verbinclude class_FixedReshaped.out\n  *\n  * \\sa DenseBase::reshaped(NRowsType,NColsType)\n  */\n\ntemplate<typename XprType, int Rows, int Cols, int Order>\nstruct traits<Reshaped<XprType, Rows, Cols, Order> > : traits<XprType>\n{\n  typedef typename traits<XprType>::Scalar Scalar;\n  typedef typename traits<XprType>::StorageKind StorageKind;\n  typedef typename traits<XprType>::XprKind XprKind;\n  enum{\n    MatrixRows = traits<XprType>::RowsAtCompileTime,\n    MatrixCols = traits<XprType>::ColsAtCompileTime,\n    RowsAtCompileTime = Rows,\n    ColsAtCompileTime = Cols,\n    MaxRowsAtCompileTime = Rows,\n    MaxColsAtCompileTime = Cols,\n    XpxStorageOrder = ((int(traits<XprType>::Flags) & RowMajorBit) == RowMajorBit) ? RowMajor : ColMajor,\n    ReshapedStorageOrder = (RowsAtCompileTime == 1 && ColsAtCompileTime != 1) ? RowMajor\n                         : (ColsAtCompileTime == 1 && RowsAtCompileTime != 1) ? ColMajor\n                         : XpxStorageOrder,\n    HasSameStorageOrderAsXprType = (ReshapedStorageOrder == XpxStorageOrder),\n    InnerSize = (ReshapedStorageOrder==int(RowMajor)) ? int(ColsAtCompileTime) : int(RowsAtCompileTime),\n    InnerStrideAtCompileTime = HasSameStorageOrderAsXprType\n                             ? int(inner_stride_at_compile_time<XprType>::ret)\n                             : Dynamic,\n    OuterStrideAtCompileTime = Dynamic,\n\n    HasDirectAccess = internal::has_direct_access<XprType>::ret\n                    && (Order==int(XpxStorageOrder))\n                    && ((evaluator<XprType>::Flags&LinearAccessBit)==LinearAccessBit),\n\n    MaskPacketAccessBit = (InnerSize == Dynamic || (InnerSize % packet_traits<Scalar>::size) == 0)\n                       && (InnerStrideAtCompileTime == 1)\n                        ? PacketAccessBit : 0,\n    //MaskAlignedBit = ((OuterStrideAtCompileTime!=Dynamic) && (((OuterStrideAtCompileTime * int(sizeof(Scalar))) % 16) == 0)) ? AlignedBit : 0,\n    FlagsLinearAccessBit = (RowsAtCompileTime == 1 || ColsAtCompileTime == 1) ? LinearAccessBit : 0,\n    FlagsLvalueBit = is_lvalue<XprType>::value ? LvalueBit : 0,\n    FlagsRowMajorBit = (ReshapedStorageOrder==int(RowMajor)) ? RowMajorBit : 0,\n    FlagsDirectAccessBit = HasDirectAccess ? DirectAccessBit : 0,\n    Flags0 = traits<XprType>::Flags & ( (HereditaryBits & ~RowMajorBit) | MaskPacketAccessBit),\n\n    Flags = (Flags0 | FlagsLinearAccessBit | FlagsLvalueBit | FlagsRowMajorBit | FlagsDirectAccessBit)\n  };\n};\n\ntemplate<typename XprType, int Rows, int Cols, int Order, bool HasDirectAccess> class ReshapedImpl_dense;\n\n} // end namespace internal\n\ntemplate<typename XprType, int Rows, int Cols, int Order, typename StorageKind> class ReshapedImpl;\n\ntemplate<typename XprType, int Rows, int Cols, int Order> class Reshaped\n  : public ReshapedImpl<XprType, Rows, Cols, Order, typename internal::traits<XprType>::StorageKind>\n{\n    typedef ReshapedImpl<XprType, Rows, Cols, Order, typename internal::traits<XprType>::StorageKind> Impl;\n  public:\n    //typedef typename Impl::Base Base;\n    typedef Impl Base;\n    EIGEN_GENERIC_PUBLIC_INTERFACE(Reshaped)\n    EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Reshaped)\n\n    /** Fixed-size constructor\n      */\n    EIGEN_DEVICE_FUNC\n    inline Reshaped(XprType& xpr)\n      : Impl(xpr)\n    {\n      EIGEN_STATIC_ASSERT(RowsAtCompileTime!=Dynamic && ColsAtCompileTime!=Dynamic,THIS_METHOD_IS_ONLY_FOR_FIXED_SIZE)\n      eigen_assert(Rows * Cols == xpr.rows() * xpr.cols());\n    }\n\n    /** Dynamic-size constructor\n      */\n    EIGEN_DEVICE_FUNC\n    inline Reshaped(XprType& xpr,\n          Index reshapeRows, Index reshapeCols)\n      : Impl(xpr, reshapeRows, reshapeCols)\n    {\n      eigen_assert((RowsAtCompileTime==Dynamic || RowsAtCompileTime==reshapeRows)\n          && (ColsAtCompileTime==Dynamic || ColsAtCompileTime==reshapeCols));\n      eigen_assert(reshapeRows * reshapeCols == xpr.rows() * xpr.cols());\n    }\n};\n\n// The generic default implementation for dense reshape simply forward to the internal::ReshapedImpl_dense\n// that must be specialized for direct and non-direct access...\ntemplate<typename XprType, int Rows, int Cols, int Order>\nclass ReshapedImpl<XprType, Rows, Cols, Order, Dense>\n  : public internal::ReshapedImpl_dense<XprType, Rows, Cols, Order,internal::traits<Reshaped<XprType,Rows,Cols,Order> >::HasDirectAccess>\n{\n    typedef internal::ReshapedImpl_dense<XprType, Rows, Cols, Order,internal::traits<Reshaped<XprType,Rows,Cols,Order> >::HasDirectAccess> Impl;\n  public:\n    typedef Impl Base;\n    EIGEN_INHERIT_ASSIGNMENT_OPERATORS(ReshapedImpl)\n    EIGEN_DEVICE_FUNC inline ReshapedImpl(XprType& xpr) : Impl(xpr) {}\n    EIGEN_DEVICE_FUNC inline ReshapedImpl(XprType& xpr, Index reshapeRows, Index reshapeCols)\n      : Impl(xpr, reshapeRows, reshapeCols) {}\n};\n\nnamespace internal {\n\n/** \\internal Internal implementation of dense Reshaped in the general case. */\ntemplate<typename XprType, int Rows, int Cols, int Order>\nclass ReshapedImpl_dense<XprType,Rows,Cols,Order,false>\n  : public internal::dense_xpr_base<Reshaped<XprType, Rows, Cols, Order> >::type\n{\n    typedef Reshaped<XprType, Rows, Cols, Order> ReshapedType;\n  public:\n\n    typedef typename internal::dense_xpr_base<ReshapedType>::type Base;\n    EIGEN_DENSE_PUBLIC_INTERFACE(ReshapedType)\n    EIGEN_INHERIT_ASSIGNMENT_OPERATORS(ReshapedImpl_dense)\n\n    typedef typename internal::ref_selector<XprType>::non_const_type MatrixTypeNested;\n    typedef typename internal::remove_all<XprType>::type NestedExpression;\n\n    class InnerIterator;\n\n    /** Fixed-size constructor\n      */\n    EIGEN_DEVICE_FUNC\n    inline ReshapedImpl_dense(XprType& xpr)\n      : m_xpr(xpr), m_rows(Rows), m_cols(Cols)\n    {}\n\n    /** Dynamic-size constructor\n      */\n    EIGEN_DEVICE_FUNC\n    inline ReshapedImpl_dense(XprType& xpr, Index nRows, Index nCols)\n      : m_xpr(xpr), m_rows(nRows), m_cols(nCols)\n    {}\n\n    EIGEN_DEVICE_FUNC Index rows() const { return m_rows; }\n    EIGEN_DEVICE_FUNC Index cols() const { return m_cols; }\n\n    #ifdef EIGEN_PARSED_BY_DOXYGEN\n    /** \\sa MapBase::data() */\n    EIGEN_DEVICE_FUNC inline const Scalar* data() const;\n    EIGEN_DEVICE_FUNC inline Index innerStride() const;\n    EIGEN_DEVICE_FUNC inline Index outerStride() const;\n    #endif\n\n    /** \\returns the nested expression */\n    EIGEN_DEVICE_FUNC\n    const typename internal::remove_all<XprType>::type&\n    nestedExpression() const { return m_xpr; }\n\n    /** \\returns the nested expression */\n    EIGEN_DEVICE_FUNC\n    typename internal::remove_reference<XprType>::type&\n    nestedExpression() { return m_xpr; }\n\n  protected:\n\n    MatrixTypeNested m_xpr;\n    const internal::variable_if_dynamic<Index, Rows> m_rows;\n    const internal::variable_if_dynamic<Index, Cols> m_cols;\n};\n\n\n/** \\internal Internal implementation of dense Reshaped in the direct access case. */\ntemplate<typename XprType, int Rows, int Cols, int Order>\nclass ReshapedImpl_dense<XprType, Rows, Cols, Order, true>\n  : public MapBase<Reshaped<XprType, Rows, Cols, Order> >\n{\n    typedef Reshaped<XprType, Rows, Cols, Order> ReshapedType;\n    typedef typename internal::ref_selector<XprType>::non_const_type XprTypeNested;\n  public:\n\n    typedef MapBase<ReshapedType> Base;\n    EIGEN_DENSE_PUBLIC_INTERFACE(ReshapedType)\n    EIGEN_INHERIT_ASSIGNMENT_OPERATORS(ReshapedImpl_dense)\n\n    /** Fixed-size constructor\n      */\n    EIGEN_DEVICE_FUNC\n    inline ReshapedImpl_dense(XprType& xpr)\n      : Base(xpr.data()), m_xpr(xpr)\n    {}\n\n    /** Dynamic-size constructor\n      */\n    EIGEN_DEVICE_FUNC\n    inline ReshapedImpl_dense(XprType& xpr, Index nRows, Index nCols)\n      : Base(xpr.data(), nRows, nCols),\n        m_xpr(xpr)\n    {}\n\n    EIGEN_DEVICE_FUNC\n    const typename internal::remove_all<XprTypeNested>::type& nestedExpression() const\n    {\n      return m_xpr;\n    }\n\n    EIGEN_DEVICE_FUNC\n    XprType& nestedExpression() { return m_xpr; }\n\n    /** \\sa MapBase::innerStride() */\n    EIGEN_DEVICE_FUNC\n    inline Index innerStride() const\n    {\n      return m_xpr.innerStride();\n    }\n\n    /** \\sa MapBase::outerStride() */\n    EIGEN_DEVICE_FUNC\n    inline Index outerStride() const\n    {\n      return ((Flags&RowMajorBit)==RowMajorBit) ? this->cols() : this->rows();\n    }\n\n  protected:\n\n    XprTypeNested m_xpr;\n};\n\n// Evaluators\ntemplate<typename ArgType, int Rows, int Cols, int Order, bool HasDirectAccess> struct reshaped_evaluator;\n\ntemplate<typename ArgType, int Rows, int Cols, int Order>\nstruct evaluator<Reshaped<ArgType, Rows, Cols, Order> >\n  : reshaped_evaluator<ArgType, Rows, Cols, Order, traits<Reshaped<ArgType,Rows,Cols,Order> >::HasDirectAccess>\n{\n  typedef Reshaped<ArgType, Rows, Cols, Order> XprType;\n  typedef typename XprType::Scalar Scalar;\n  // TODO: should check for smaller packet types\n  typedef typename packet_traits<Scalar>::type PacketScalar;\n\n  enum {\n    CoeffReadCost = evaluator<ArgType>::CoeffReadCost,\n    HasDirectAccess = traits<XprType>::HasDirectAccess,\n\n//     RowsAtCompileTime = traits<XprType>::RowsAtCompileTime,\n//     ColsAtCompileTime = traits<XprType>::ColsAtCompileTime,\n//     MaxRowsAtCompileTime = traits<XprType>::MaxRowsAtCompileTime,\n//     MaxColsAtCompileTime = traits<XprType>::MaxColsAtCompileTime,\n//\n//     InnerStrideAtCompileTime = traits<XprType>::HasSameStorageOrderAsXprType\n//                              ? int(inner_stride_at_compile_time<ArgType>::ret)\n//                              : Dynamic,\n//     OuterStrideAtCompileTime = Dynamic,\n\n    FlagsLinearAccessBit = (traits<XprType>::RowsAtCompileTime == 1 || traits<XprType>::ColsAtCompileTime == 1 || HasDirectAccess) ? LinearAccessBit : 0,\n    FlagsRowMajorBit = (traits<XprType>::ReshapedStorageOrder==int(RowMajor)) ? RowMajorBit : 0,\n    FlagsDirectAccessBit =  HasDirectAccess ? DirectAccessBit : 0,\n    Flags0 = evaluator<ArgType>::Flags & (HereditaryBits & ~RowMajorBit),\n    Flags = Flags0 | FlagsLinearAccessBit | FlagsRowMajorBit | FlagsDirectAccessBit,\n\n    PacketAlignment = unpacket_traits<PacketScalar>::alignment,\n    Alignment = evaluator<ArgType>::Alignment\n  };\n  typedef reshaped_evaluator<ArgType, Rows, Cols, Order, HasDirectAccess> reshaped_evaluator_type;\n  EIGEN_DEVICE_FUNC explicit evaluator(const XprType& xpr) : reshaped_evaluator_type(xpr)\n  {\n    EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);\n  }\n};\n\ntemplate<typename ArgType, int Rows, int Cols, int Order>\nstruct reshaped_evaluator<ArgType, Rows, Cols, Order, /* HasDirectAccess */ false>\n  : evaluator_base<Reshaped<ArgType, Rows, Cols, Order> >\n{\n  typedef Reshaped<ArgType, Rows, Cols, Order> XprType;\n\n  enum {\n    CoeffReadCost = evaluator<ArgType>::CoeffReadCost /* TODO + cost of index computations */,\n\n    Flags = (evaluator<ArgType>::Flags & (HereditaryBits /*| LinearAccessBit | DirectAccessBit*/)),\n\n    Alignment = 0\n  };\n\n  EIGEN_DEVICE_FUNC explicit reshaped_evaluator(const XprType& xpr) : m_argImpl(xpr.nestedExpression()), m_xpr(xpr)\n  {\n    EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);\n  }\n\n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n\n  typedef std::pair<Index, Index> RowCol;\n\n  inline RowCol index_remap(Index rowId, Index colId) const\n  {\n    if(Order==ColMajor)\n    {\n      const Index nth_elem_idx = colId * m_xpr.rows() + rowId;\n      return RowCol(nth_elem_idx % m_xpr.nestedExpression().rows(),\n                    nth_elem_idx / m_xpr.nestedExpression().rows());\n    }\n    else\n    {\n      const Index nth_elem_idx = colId + rowId * m_xpr.cols();\n      return RowCol(nth_elem_idx / m_xpr.nestedExpression().cols(),\n                    nth_elem_idx % m_xpr.nestedExpression().cols());\n    }\n  }\n\n  EIGEN_DEVICE_FUNC\n  inline Scalar& coeffRef(Index rowId, Index colId)\n  {\n    EIGEN_STATIC_ASSERT_LVALUE(XprType)\n    const RowCol row_col = index_remap(rowId, colId);\n    return m_argImpl.coeffRef(row_col.first, row_col.second);\n  }\n\n  EIGEN_DEVICE_FUNC\n  inline const Scalar& coeffRef(Index rowId, Index colId) const\n  {\n    const RowCol row_col = index_remap(rowId, colId);\n    return m_argImpl.coeffRef(row_col.first, row_col.second);\n  }\n\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE const CoeffReturnType coeff(Index rowId, Index colId) const\n  {\n    const RowCol row_col = index_remap(rowId, colId);\n    return m_argImpl.coeff(row_col.first, row_col.second);\n  }\n\n  EIGEN_DEVICE_FUNC\n  inline Scalar& coeffRef(Index index)\n  {\n    EIGEN_STATIC_ASSERT_LVALUE(XprType)\n    const RowCol row_col = index_remap(Rows == 1 ? 0 : index,\n                                       Rows == 1 ? index : 0);\n    return m_argImpl.coeffRef(row_col.first, row_col.second);\n\n  }\n\n  EIGEN_DEVICE_FUNC\n  inline const Scalar& coeffRef(Index index) const\n  {\n    const RowCol row_col = index_remap(Rows == 1 ? 0 : index,\n                                       Rows == 1 ? index : 0);\n    return m_argImpl.coeffRef(row_col.first, row_col.second);\n  }\n\n  EIGEN_DEVICE_FUNC\n  inline const CoeffReturnType coeff(Index index) const\n  {\n    const RowCol row_col = index_remap(Rows == 1 ? 0 : index,\n                                       Rows == 1 ? index : 0);\n    return m_argImpl.coeff(row_col.first, row_col.second);\n  }\n#if 0\n  EIGEN_DEVICE_FUNC\n  template<int LoadMode>\n  inline PacketScalar packet(Index rowId, Index colId) const\n  {\n    const RowCol row_col = index_remap(rowId, colId);\n    return m_argImpl.template packet<Unaligned>(row_col.first, row_col.second);\n\n  }\n\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC\n  inline void writePacket(Index rowId, Index colId, const PacketScalar& val)\n  {\n    const RowCol row_col = index_remap(rowId, colId);\n    m_argImpl.const_cast_derived().template writePacket<Unaligned>\n            (row_col.first, row_col.second, val);\n  }\n\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC\n  inline PacketScalar packet(Index index) const\n  {\n    const RowCol row_col = index_remap(RowsAtCompileTime == 1 ? 0 : index,\n                                        RowsAtCompileTime == 1 ? index : 0);\n    return m_argImpl.template packet<Unaligned>(row_col.first, row_col.second);\n  }\n\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC\n  inline void writePacket(Index index, const PacketScalar& val)\n  {\n    const RowCol row_col = index_remap(RowsAtCompileTime == 1 ? 0 : index,\n                                        RowsAtCompileTime == 1 ? index : 0);\n    return m_argImpl.template packet<Unaligned>(row_col.first, row_col.second, val);\n  }\n#endif\nprotected:\n\n  evaluator<ArgType> m_argImpl;\n  const XprType& m_xpr;\n\n};\n\ntemplate<typename ArgType, int Rows, int Cols, int Order>\nstruct reshaped_evaluator<ArgType, Rows, Cols, Order, /* HasDirectAccess */ true>\n: mapbase_evaluator<Reshaped<ArgType, Rows, Cols, Order>,\n                      typename Reshaped<ArgType, Rows, Cols, Order>::PlainObject>\n{\n  typedef Reshaped<ArgType, Rows, Cols, Order> XprType;\n  typedef typename XprType::Scalar Scalar;\n\n  EIGEN_DEVICE_FUNC explicit reshaped_evaluator(const XprType& xpr)\n    : mapbase_evaluator<XprType, typename XprType::PlainObject>(xpr)\n  {\n    // TODO: for the 3.4 release, this should be turned to an internal assertion, but let's keep it as is for the beta lifetime\n    eigen_assert(((internal::UIntPtr(xpr.data()) % EIGEN_PLAIN_ENUM_MAX(1,evaluator<XprType>::Alignment)) == 0) && \"data is not aligned\");\n  }\n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_RESHAPED_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/ReturnByValue.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009-2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2009-2010 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_RETURNBYVALUE_H\n#define EIGEN_RETURNBYVALUE_H\n\nnamespace Eigen {\n\nnamespace internal {\n\ntemplate<typename Derived>\nstruct traits<ReturnByValue<Derived> >\n  : public traits<typename traits<Derived>::ReturnType>\n{\n  enum {\n    // We're disabling the DirectAccess because e.g. the constructor of\n    // the Block-with-DirectAccess expression requires to have a coeffRef method.\n    // Also, we don't want to have to implement the stride stuff.\n    Flags = (traits<typename traits<Derived>::ReturnType>::Flags\n             | EvalBeforeNestingBit) & ~DirectAccessBit\n  };\n};\n\n/* The ReturnByValue object doesn't even have a coeff() method.\n * So the only way that nesting it in an expression can work, is by evaluating it into a plain matrix.\n * So internal::nested always gives the plain return matrix type.\n *\n * FIXME: I don't understand why we need this specialization: isn't this taken care of by the EvalBeforeNestingBit ??\n * Answer: EvalBeforeNestingBit should be deprecated since we have the evaluators\n */\ntemplate<typename Derived,int n,typename PlainObject>\nstruct nested_eval<ReturnByValue<Derived>, n, PlainObject>\n{\n  typedef typename traits<Derived>::ReturnType type;\n};\n\n} // end namespace internal\n\n/** \\class ReturnByValue\n  * \\ingroup Core_Module\n  *\n  */\ntemplate<typename Derived> class ReturnByValue\n  : public internal::dense_xpr_base< ReturnByValue<Derived> >::type, internal::no_assignment_operator\n{\n  public:\n    typedef typename internal::traits<Derived>::ReturnType ReturnType;\n\n    typedef typename internal::dense_xpr_base<ReturnByValue>::type Base;\n    EIGEN_DENSE_PUBLIC_INTERFACE(ReturnByValue)\n\n    template<typename Dest>\n    EIGEN_DEVICE_FUNC\n    inline void evalTo(Dest& dst) const\n    { static_cast<const Derived*>(this)->evalTo(dst); }\n    EIGEN_DEVICE_FUNC inline Index rows() const { return static_cast<const Derived*>(this)->rows(); }\n    EIGEN_DEVICE_FUNC inline Index cols() const { return static_cast<const Derived*>(this)->cols(); }\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\n#define Unusable YOU_ARE_TRYING_TO_ACCESS_A_SINGLE_COEFFICIENT_IN_A_SPECIAL_EXPRESSION_WHERE_THAT_IS_NOT_ALLOWED_BECAUSE_THAT_WOULD_BE_INEFFICIENT\n    class Unusable{\n      Unusable(const Unusable&) {}\n      Unusable& operator=(const Unusable&) {return *this;}\n    };\n    const Unusable& coeff(Index) const { return *reinterpret_cast<const Unusable*>(this); }\n    const Unusable& coeff(Index,Index) const { return *reinterpret_cast<const Unusable*>(this); }\n    Unusable& coeffRef(Index) { return *reinterpret_cast<Unusable*>(this); }\n    Unusable& coeffRef(Index,Index) { return *reinterpret_cast<Unusable*>(this); }\n#undef Unusable\n#endif\n};\n\ntemplate<typename Derived>\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC Derived& DenseBase<Derived>::operator=(const ReturnByValue<OtherDerived>& other)\n{\n  other.evalTo(derived());\n  return derived();\n}\n\nnamespace internal {\n\n// Expression is evaluated in a temporary; default implementation of Assignment is bypassed so that\n// when a ReturnByValue expression is assigned, the evaluator is not constructed.\n// TODO: Finalize port to new regime; ReturnByValue should not exist in the expression world\n  \ntemplate<typename Derived>\nstruct evaluator<ReturnByValue<Derived> >\n  : public evaluator<typename internal::traits<Derived>::ReturnType>\n{\n  typedef ReturnByValue<Derived> XprType;\n  typedef typename internal::traits<Derived>::ReturnType PlainObject;\n  typedef evaluator<PlainObject> Base;\n  \n  EIGEN_DEVICE_FUNC explicit evaluator(const XprType& xpr)\n    : m_result(xpr.rows(), xpr.cols())\n  {\n    ::new (static_cast<Base*>(this)) Base(m_result);\n    xpr.evalTo(m_result);\n  }\n\nprotected:\n  PlainObject m_result;\n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_RETURNBYVALUE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/Reverse.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2009 Ricard Marxer <email@ricardmarxer.com>\n// Copyright (C) 2009-2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_REVERSE_H\n#define EIGEN_REVERSE_H\n\nnamespace Eigen { \n\nnamespace internal {\n\ntemplate<typename MatrixType, int Direction>\nstruct traits<Reverse<MatrixType, Direction> >\n : traits<MatrixType>\n{\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename traits<MatrixType>::StorageKind StorageKind;\n  typedef typename traits<MatrixType>::XprKind XprKind;\n  typedef typename ref_selector<MatrixType>::type MatrixTypeNested;\n  typedef typename remove_reference<MatrixTypeNested>::type _MatrixTypeNested;\n  enum {\n    RowsAtCompileTime = MatrixType::RowsAtCompileTime,\n    ColsAtCompileTime = MatrixType::ColsAtCompileTime,\n    MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime,\n    MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime,\n    Flags = _MatrixTypeNested::Flags & (RowMajorBit | LvalueBit)\n  };\n};\n\ntemplate<typename PacketType, bool ReversePacket> struct reverse_packet_cond\n{\n  static inline PacketType run(const PacketType& x) { return preverse(x); }\n};\n\ntemplate<typename PacketType> struct reverse_packet_cond<PacketType,false>\n{\n  static inline PacketType run(const PacketType& x) { return x; }\n};\n\n} // end namespace internal \n\n/** \\class Reverse\n  * \\ingroup Core_Module\n  *\n  * \\brief Expression of the reverse of a vector or matrix\n  *\n  * \\tparam MatrixType the type of the object of which we are taking the reverse\n  * \\tparam Direction defines the direction of the reverse operation, can be Vertical, Horizontal, or BothDirections\n  *\n  * This class represents an expression of the reverse of a vector.\n  * It is the return type of MatrixBase::reverse() and VectorwiseOp::reverse()\n  * and most of the time this is the only way it is used.\n  *\n  * \\sa MatrixBase::reverse(), VectorwiseOp::reverse()\n  */\ntemplate<typename MatrixType, int Direction> class Reverse\n  : public internal::dense_xpr_base< Reverse<MatrixType, Direction> >::type\n{\n  public:\n\n    typedef typename internal::dense_xpr_base<Reverse>::type Base;\n    EIGEN_DENSE_PUBLIC_INTERFACE(Reverse)\n    typedef typename internal::remove_all<MatrixType>::type NestedExpression;\n    using Base::IsRowMajor;\n\n  protected:\n    enum {\n      PacketSize = internal::packet_traits<Scalar>::size,\n      IsColMajor = !IsRowMajor,\n      ReverseRow = (Direction == Vertical)   || (Direction == BothDirections),\n      ReverseCol = (Direction == Horizontal) || (Direction == BothDirections),\n      OffsetRow  = ReverseRow && IsColMajor ? PacketSize : 1,\n      OffsetCol  = ReverseCol && IsRowMajor ? PacketSize : 1,\n      ReversePacket = (Direction == BothDirections)\n                    || ((Direction == Vertical)   && IsColMajor)\n                    || ((Direction == Horizontal) && IsRowMajor)\n    };\n    typedef internal::reverse_packet_cond<PacketScalar,ReversePacket> reverse_packet;\n  public:\n\n    EIGEN_DEVICE_FUNC explicit inline Reverse(const MatrixType& matrix) : m_matrix(matrix) { }\n\n    EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Reverse)\n\n    EIGEN_DEVICE_FUNC inline Index rows() const { return m_matrix.rows(); }\n    EIGEN_DEVICE_FUNC inline Index cols() const { return m_matrix.cols(); }\n\n    EIGEN_DEVICE_FUNC inline Index innerStride() const\n    {\n      return -m_matrix.innerStride();\n    }\n\n    EIGEN_DEVICE_FUNC const typename internal::remove_all<typename MatrixType::Nested>::type&\n    nestedExpression() const \n    {\n      return m_matrix;\n    }\n\n  protected:\n    typename MatrixType::Nested m_matrix;\n};\n\n/** \\returns an expression of the reverse of *this.\n  *\n  * Example: \\include MatrixBase_reverse.cpp\n  * Output: \\verbinclude MatrixBase_reverse.out\n  *\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC inline typename DenseBase<Derived>::ReverseReturnType\nDenseBase<Derived>::reverse()\n{\n  return ReverseReturnType(derived());\n}\n\n\n//reverse const overload moved DenseBase.h due to a CUDA compiler bug\n\n/** This is the \"in place\" version of reverse: it reverses \\c *this.\n  *\n  * In most cases it is probably better to simply use the reversed expression\n  * of a matrix. However, when reversing the matrix data itself is really needed,\n  * then this \"in-place\" version is probably the right choice because it provides\n  * the following additional benefits:\n  *  - less error prone: doing the same operation with .reverse() requires special care:\n  *    \\code m = m.reverse().eval(); \\endcode\n  *  - this API enables reverse operations without the need for a temporary\n  *  - it allows future optimizations (cache friendliness, etc.)\n  *\n  * \\sa VectorwiseOp::reverseInPlace(), reverse() */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC inline void DenseBase<Derived>::reverseInPlace()\n{\n  if(cols()>rows())\n  {\n    Index half = cols()/2;\n    leftCols(half).swap(rightCols(half).reverse());\n    if((cols()%2)==1)\n    {\n      Index half2 = rows()/2;\n      col(half).head(half2).swap(col(half).tail(half2).reverse());\n    }\n  }\n  else\n  {\n    Index half = rows()/2;\n    topRows(half).swap(bottomRows(half).reverse());\n    if((rows()%2)==1)\n    {\n      Index half2 = cols()/2;\n      row(half).head(half2).swap(row(half).tail(half2).reverse());\n    }\n  }\n}\n\nnamespace internal {\n  \ntemplate<int Direction>\nstruct vectorwise_reverse_inplace_impl;\n\ntemplate<>\nstruct vectorwise_reverse_inplace_impl<Vertical>\n{\n  template<typename ExpressionType>\n  static void run(ExpressionType &xpr)\n  {\n    const int HalfAtCompileTime = ExpressionType::RowsAtCompileTime==Dynamic?Dynamic:ExpressionType::RowsAtCompileTime/2;\n    Index half = xpr.rows()/2;\n    xpr.topRows(fix<HalfAtCompileTime>(half))\n       .swap(xpr.bottomRows(fix<HalfAtCompileTime>(half)).colwise().reverse());\n  }\n};\n\ntemplate<>\nstruct vectorwise_reverse_inplace_impl<Horizontal>\n{\n  template<typename ExpressionType>\n  static void run(ExpressionType &xpr)\n  {\n    const int HalfAtCompileTime = ExpressionType::ColsAtCompileTime==Dynamic?Dynamic:ExpressionType::ColsAtCompileTime/2;\n    Index half = xpr.cols()/2;\n    xpr.leftCols(fix<HalfAtCompileTime>(half))\n       .swap(xpr.rightCols(fix<HalfAtCompileTime>(half)).rowwise().reverse());\n  }\n};\n\n} // end namespace internal\n\n/** This is the \"in place\" version of VectorwiseOp::reverse: it reverses each column or row of \\c *this.\n  *\n  * In most cases it is probably better to simply use the reversed expression\n  * of a matrix. However, when reversing the matrix data itself is really needed,\n  * then this \"in-place\" version is probably the right choice because it provides\n  * the following additional benefits:\n  *  - less error prone: doing the same operation with .reverse() requires special care:\n  *    \\code m = m.reverse().eval(); \\endcode\n  *  - this API enables reverse operations without the need for a temporary\n  *\n  * \\sa DenseBase::reverseInPlace(), reverse() */\ntemplate<typename ExpressionType, int Direction>\nEIGEN_DEVICE_FUNC void VectorwiseOp<ExpressionType,Direction>::reverseInPlace()\n{\n  internal::vectorwise_reverse_inplace_impl<Direction>::run(m_matrix);\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_REVERSE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/Select.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SELECT_H\n#define EIGEN_SELECT_H\n\nnamespace Eigen { \n\n/** \\class Select\n  * \\ingroup Core_Module\n  *\n  * \\brief Expression of a coefficient wise version of the C++ ternary operator ?:\n  *\n  * \\param ConditionMatrixType the type of the \\em condition expression which must be a boolean matrix\n  * \\param ThenMatrixType the type of the \\em then expression\n  * \\param ElseMatrixType the type of the \\em else expression\n  *\n  * This class represents an expression of a coefficient wise version of the C++ ternary operator ?:.\n  * It is the return type of DenseBase::select() and most of the time this is the only way it is used.\n  *\n  * \\sa DenseBase::select(const DenseBase<ThenDerived>&, const DenseBase<ElseDerived>&) const\n  */\n\nnamespace internal {\ntemplate<typename ConditionMatrixType, typename ThenMatrixType, typename ElseMatrixType>\nstruct traits<Select<ConditionMatrixType, ThenMatrixType, ElseMatrixType> >\n : traits<ThenMatrixType>\n{\n  typedef typename traits<ThenMatrixType>::Scalar Scalar;\n  typedef Dense StorageKind;\n  typedef typename traits<ThenMatrixType>::XprKind XprKind;\n  typedef typename ConditionMatrixType::Nested ConditionMatrixNested;\n  typedef typename ThenMatrixType::Nested ThenMatrixNested;\n  typedef typename ElseMatrixType::Nested ElseMatrixNested;\n  enum {\n    RowsAtCompileTime = ConditionMatrixType::RowsAtCompileTime,\n    ColsAtCompileTime = ConditionMatrixType::ColsAtCompileTime,\n    MaxRowsAtCompileTime = ConditionMatrixType::MaxRowsAtCompileTime,\n    MaxColsAtCompileTime = ConditionMatrixType::MaxColsAtCompileTime,\n    Flags = (unsigned int)ThenMatrixType::Flags & ElseMatrixType::Flags & RowMajorBit\n  };\n};\n}\n\ntemplate<typename ConditionMatrixType, typename ThenMatrixType, typename ElseMatrixType>\nclass Select : public internal::dense_xpr_base< Select<ConditionMatrixType, ThenMatrixType, ElseMatrixType> >::type,\n               internal::no_assignment_operator\n{\n  public:\n\n    typedef typename internal::dense_xpr_base<Select>::type Base;\n    EIGEN_DENSE_PUBLIC_INTERFACE(Select)\n\n    inline EIGEN_DEVICE_FUNC\n    Select(const ConditionMatrixType& a_conditionMatrix,\n           const ThenMatrixType& a_thenMatrix,\n           const ElseMatrixType& a_elseMatrix)\n      : m_condition(a_conditionMatrix), m_then(a_thenMatrix), m_else(a_elseMatrix)\n    {\n      eigen_assert(m_condition.rows() == m_then.rows() && m_condition.rows() == m_else.rows());\n      eigen_assert(m_condition.cols() == m_then.cols() && m_condition.cols() == m_else.cols());\n    }\n\n    inline EIGEN_DEVICE_FUNC Index rows() const { return m_condition.rows(); }\n    inline EIGEN_DEVICE_FUNC Index cols() const { return m_condition.cols(); }\n\n    inline EIGEN_DEVICE_FUNC\n    const Scalar coeff(Index i, Index j) const\n    {\n      if (m_condition.coeff(i,j))\n        return m_then.coeff(i,j);\n      else\n        return m_else.coeff(i,j);\n    }\n\n    inline EIGEN_DEVICE_FUNC\n    const Scalar coeff(Index i) const\n    {\n      if (m_condition.coeff(i))\n        return m_then.coeff(i);\n      else\n        return m_else.coeff(i);\n    }\n\n    inline EIGEN_DEVICE_FUNC const ConditionMatrixType& conditionMatrix() const\n    {\n      return m_condition;\n    }\n\n    inline EIGEN_DEVICE_FUNC const ThenMatrixType& thenMatrix() const\n    {\n      return m_then;\n    }\n\n    inline EIGEN_DEVICE_FUNC const ElseMatrixType& elseMatrix() const\n    {\n      return m_else;\n    }\n\n  protected:\n    typename ConditionMatrixType::Nested m_condition;\n    typename ThenMatrixType::Nested m_then;\n    typename ElseMatrixType::Nested m_else;\n};\n\n\n/** \\returns a matrix where each coefficient (i,j) is equal to \\a thenMatrix(i,j)\n  * if \\c *this(i,j), and \\a elseMatrix(i,j) otherwise.\n  *\n  * Example: \\include MatrixBase_select.cpp\n  * Output: \\verbinclude MatrixBase_select.out\n  *\n  * \\sa class Select\n  */\ntemplate<typename Derived>\ntemplate<typename ThenDerived,typename ElseDerived>\ninline const Select<Derived,ThenDerived,ElseDerived>\nDenseBase<Derived>::select(const DenseBase<ThenDerived>& thenMatrix,\n                            const DenseBase<ElseDerived>& elseMatrix) const\n{\n  return Select<Derived,ThenDerived,ElseDerived>(derived(), thenMatrix.derived(), elseMatrix.derived());\n}\n\n/** Version of DenseBase::select(const DenseBase&, const DenseBase&) with\n  * the \\em else expression being a scalar value.\n  *\n  * \\sa DenseBase::select(const DenseBase<ThenDerived>&, const DenseBase<ElseDerived>&) const, class Select\n  */\ntemplate<typename Derived>\ntemplate<typename ThenDerived>\ninline const Select<Derived,ThenDerived, typename ThenDerived::ConstantReturnType>\nDenseBase<Derived>::select(const DenseBase<ThenDerived>& thenMatrix,\n                           const typename ThenDerived::Scalar& elseScalar) const\n{\n  return Select<Derived,ThenDerived,typename ThenDerived::ConstantReturnType>(\n    derived(), thenMatrix.derived(), ThenDerived::Constant(rows(),cols(),elseScalar));\n}\n\n/** Version of DenseBase::select(const DenseBase&, const DenseBase&) with\n  * the \\em then expression being a scalar value.\n  *\n  * \\sa DenseBase::select(const DenseBase<ThenDerived>&, const DenseBase<ElseDerived>&) const, class Select\n  */\ntemplate<typename Derived>\ntemplate<typename ElseDerived>\ninline const Select<Derived, typename ElseDerived::ConstantReturnType, ElseDerived >\nDenseBase<Derived>::select(const typename ElseDerived::Scalar& thenScalar,\n                           const DenseBase<ElseDerived>& elseMatrix) const\n{\n  return Select<Derived,typename ElseDerived::ConstantReturnType,ElseDerived>(\n    derived(), ElseDerived::Constant(rows(),cols(),thenScalar), elseMatrix.derived());\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_SELECT_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/SelfAdjointView.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SELFADJOINTMATRIX_H\n#define EIGEN_SELFADJOINTMATRIX_H\n\nnamespace Eigen { \n\n/** \\class SelfAdjointView\n  * \\ingroup Core_Module\n  *\n  *\n  * \\brief Expression of a selfadjoint matrix from a triangular part of a dense matrix\n  *\n  * \\param MatrixType the type of the dense matrix storing the coefficients\n  * \\param TriangularPart can be either \\c #Lower or \\c #Upper\n  *\n  * This class is an expression of a sefladjoint matrix from a triangular part of a matrix\n  * with given dense storage of the coefficients. It is the return type of MatrixBase::selfadjointView()\n  * and most of the time this is the only way that it is used.\n  *\n  * \\sa class TriangularBase, MatrixBase::selfadjointView()\n  */\n\nnamespace internal {\ntemplate<typename MatrixType, unsigned int UpLo>\nstruct traits<SelfAdjointView<MatrixType, UpLo> > : traits<MatrixType>\n{\n  typedef typename ref_selector<MatrixType>::non_const_type MatrixTypeNested;\n  typedef typename remove_all<MatrixTypeNested>::type MatrixTypeNestedCleaned;\n  typedef MatrixType ExpressionType;\n  typedef typename MatrixType::PlainObject FullMatrixType;\n  enum {\n    Mode = UpLo | SelfAdjoint,\n    FlagsLvalueBit = is_lvalue<MatrixType>::value ? LvalueBit : 0,\n    Flags =  MatrixTypeNestedCleaned::Flags & (HereditaryBits|FlagsLvalueBit)\n           & (~(PacketAccessBit | DirectAccessBit | LinearAccessBit)) // FIXME these flags should be preserved\n  };\n};\n}\n\n\ntemplate<typename _MatrixType, unsigned int UpLo> class SelfAdjointView\n  : public TriangularBase<SelfAdjointView<_MatrixType, UpLo> >\n{\n  public:\n\n    typedef _MatrixType MatrixType;\n    typedef TriangularBase<SelfAdjointView> Base;\n    typedef typename internal::traits<SelfAdjointView>::MatrixTypeNested MatrixTypeNested;\n    typedef typename internal::traits<SelfAdjointView>::MatrixTypeNestedCleaned MatrixTypeNestedCleaned;\n    typedef MatrixTypeNestedCleaned NestedExpression;\n\n    /** \\brief The type of coefficients in this matrix */\n    typedef typename internal::traits<SelfAdjointView>::Scalar Scalar; \n    typedef typename MatrixType::StorageIndex StorageIndex;\n    typedef typename internal::remove_all<typename MatrixType::ConjugateReturnType>::type MatrixConjugateReturnType;\n    typedef SelfAdjointView<typename internal::add_const<MatrixType>::type, UpLo> ConstSelfAdjointView;\n\n    enum {\n      Mode = internal::traits<SelfAdjointView>::Mode,\n      Flags = internal::traits<SelfAdjointView>::Flags,\n      TransposeMode = ((Mode & Upper) ? Lower : 0) | ((Mode & Lower) ? Upper : 0)\n    };\n    typedef typename MatrixType::PlainObject PlainObject;\n\n    EIGEN_DEVICE_FUNC\n    explicit inline SelfAdjointView(MatrixType& matrix) : m_matrix(matrix)\n    {\n      EIGEN_STATIC_ASSERT(UpLo==Lower || UpLo==Upper,SELFADJOINTVIEW_ACCEPTS_UPPER_AND_LOWER_MODE_ONLY);\n    }\n\n    EIGEN_DEVICE_FUNC\n    inline Index rows() const { return m_matrix.rows(); }\n    EIGEN_DEVICE_FUNC\n    inline Index cols() const { return m_matrix.cols(); }\n    EIGEN_DEVICE_FUNC\n    inline Index outerStride() const { return m_matrix.outerStride(); }\n    EIGEN_DEVICE_FUNC\n    inline Index innerStride() const { return m_matrix.innerStride(); }\n\n    /** \\sa MatrixBase::coeff()\n      * \\warning the coordinates must fit into the referenced triangular part\n      */\n    EIGEN_DEVICE_FUNC\n    inline Scalar coeff(Index row, Index col) const\n    {\n      Base::check_coordinates_internal(row, col);\n      return m_matrix.coeff(row, col);\n    }\n\n    /** \\sa MatrixBase::coeffRef()\n      * \\warning the coordinates must fit into the referenced triangular part\n      */\n    EIGEN_DEVICE_FUNC\n    inline Scalar& coeffRef(Index row, Index col)\n    {\n      EIGEN_STATIC_ASSERT_LVALUE(SelfAdjointView);\n      Base::check_coordinates_internal(row, col);\n      return m_matrix.coeffRef(row, col);\n    }\n\n    /** \\internal */\n    EIGEN_DEVICE_FUNC\n    const MatrixTypeNestedCleaned& _expression() const { return m_matrix; }\n\n    EIGEN_DEVICE_FUNC\n    const MatrixTypeNestedCleaned& nestedExpression() const { return m_matrix; }\n    EIGEN_DEVICE_FUNC\n    MatrixTypeNestedCleaned& nestedExpression() { return m_matrix; }\n\n    /** Efficient triangular matrix times vector/matrix product */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    const Product<SelfAdjointView,OtherDerived>\n    operator*(const MatrixBase<OtherDerived>& rhs) const\n    {\n      return Product<SelfAdjointView,OtherDerived>(*this, rhs.derived());\n    }\n\n    /** Efficient vector/matrix times triangular matrix product */\n    template<typename OtherDerived> friend\n    EIGEN_DEVICE_FUNC\n    const Product<OtherDerived,SelfAdjointView>\n    operator*(const MatrixBase<OtherDerived>& lhs, const SelfAdjointView& rhs)\n    {\n      return Product<OtherDerived,SelfAdjointView>(lhs.derived(),rhs);\n    }\n    \n    friend EIGEN_DEVICE_FUNC\n    const SelfAdjointView<const EIGEN_SCALAR_BINARYOP_EXPR_RETURN_TYPE(Scalar,MatrixType,product),UpLo>\n    operator*(const Scalar& s, const SelfAdjointView& mat)\n    {\n      return (s*mat.nestedExpression()).template selfadjointView<UpLo>();\n    }\n\n    /** Perform a symmetric rank 2 update of the selfadjoint matrix \\c *this:\n      * \\f$ this = this + \\alpha u v^* + conj(\\alpha) v u^* \\f$\n      * \\returns a reference to \\c *this\n      *\n      * The vectors \\a u and \\c v \\b must be column vectors, however they can be\n      * a adjoint expression without any overhead. Only the meaningful triangular\n      * part of the matrix is updated, the rest is left unchanged.\n      *\n      * \\sa rankUpdate(const MatrixBase<DerivedU>&, Scalar)\n      */\n    template<typename DerivedU, typename DerivedV>\n    EIGEN_DEVICE_FUNC\n    SelfAdjointView& rankUpdate(const MatrixBase<DerivedU>& u, const MatrixBase<DerivedV>& v, const Scalar& alpha = Scalar(1));\n\n    /** Perform a symmetric rank K update of the selfadjoint matrix \\c *this:\n      * \\f$ this = this + \\alpha ( u u^* ) \\f$ where \\a u is a vector or matrix.\n      *\n      * \\returns a reference to \\c *this\n      *\n      * Note that to perform \\f$ this = this + \\alpha ( u^* u ) \\f$ you can simply\n      * call this function with u.adjoint().\n      *\n      * \\sa rankUpdate(const MatrixBase<DerivedU>&, const MatrixBase<DerivedV>&, Scalar)\n      */\n    template<typename DerivedU>\n    EIGEN_DEVICE_FUNC\n    SelfAdjointView& rankUpdate(const MatrixBase<DerivedU>& u, const Scalar& alpha = Scalar(1));\n\n    /** \\returns an expression of a triangular view extracted from the current selfadjoint view of a given triangular part\n      *\n      * The parameter \\a TriMode can have the following values: \\c #Upper, \\c #StrictlyUpper, \\c #UnitUpper,\n      * \\c #Lower, \\c #StrictlyLower, \\c #UnitLower.\n      *\n      * If \\c TriMode references the same triangular part than \\c *this, then this method simply return a \\c TriangularView of the nested expression,\n      * otherwise, the nested expression is first transposed, thus returning a \\c TriangularView<Transpose<MatrixType>> object.\n      *\n      * \\sa MatrixBase::triangularView(), class TriangularView\n      */\n    template<unsigned int TriMode>\n    EIGEN_DEVICE_FUNC\n    typename internal::conditional<(TriMode&(Upper|Lower))==(UpLo&(Upper|Lower)),\n                                   TriangularView<MatrixType,TriMode>,\n                                   TriangularView<typename MatrixType::AdjointReturnType,TriMode> >::type\n    triangularView() const\n    {\n      typename internal::conditional<(TriMode&(Upper|Lower))==(UpLo&(Upper|Lower)), MatrixType&, typename MatrixType::ConstTransposeReturnType>::type tmp1(m_matrix);\n      typename internal::conditional<(TriMode&(Upper|Lower))==(UpLo&(Upper|Lower)), MatrixType&, typename MatrixType::AdjointReturnType>::type tmp2(tmp1);\n      return typename internal::conditional<(TriMode&(Upper|Lower))==(UpLo&(Upper|Lower)),\n                                   TriangularView<MatrixType,TriMode>,\n                                   TriangularView<typename MatrixType::AdjointReturnType,TriMode> >::type(tmp2);\n    }\n\n    typedef SelfAdjointView<const MatrixConjugateReturnType,UpLo> ConjugateReturnType;\n    /** \\sa MatrixBase::conjugate() const */\n    EIGEN_DEVICE_FUNC\n    inline const ConjugateReturnType conjugate() const\n    { return ConjugateReturnType(m_matrix.conjugate()); }\n\n    /** \\returns an expression of the complex conjugate of \\c *this if Cond==true,\n     *           returns \\c *this otherwise.\n     */\n    template<bool Cond>\n    EIGEN_DEVICE_FUNC\n    inline typename internal::conditional<Cond,ConjugateReturnType,ConstSelfAdjointView>::type\n    conjugateIf() const\n    {\n      typedef typename internal::conditional<Cond,ConjugateReturnType,ConstSelfAdjointView>::type ReturnType;\n      return ReturnType(m_matrix.template conjugateIf<Cond>());\n    }\n\n    typedef SelfAdjointView<const typename MatrixType::AdjointReturnType,TransposeMode> AdjointReturnType;\n    /** \\sa MatrixBase::adjoint() const */\n    EIGEN_DEVICE_FUNC\n    inline const AdjointReturnType adjoint() const\n    { return AdjointReturnType(m_matrix.adjoint()); }\n\n    typedef SelfAdjointView<typename MatrixType::TransposeReturnType,TransposeMode> TransposeReturnType;\n     /** \\sa MatrixBase::transpose() */\n    EIGEN_DEVICE_FUNC\n    inline TransposeReturnType transpose()\n    {\n      EIGEN_STATIC_ASSERT_LVALUE(MatrixType)\n      typename MatrixType::TransposeReturnType tmp(m_matrix);\n      return TransposeReturnType(tmp);\n    }\n\n    typedef SelfAdjointView<const typename MatrixType::ConstTransposeReturnType,TransposeMode> ConstTransposeReturnType;\n    /** \\sa MatrixBase::transpose() const */\n    EIGEN_DEVICE_FUNC\n    inline const ConstTransposeReturnType transpose() const\n    {\n      return ConstTransposeReturnType(m_matrix.transpose());\n    }\n\n    /** \\returns a const expression of the main diagonal of the matrix \\c *this\n      *\n      * This method simply returns the diagonal of the nested expression, thus by-passing the SelfAdjointView decorator.\n      *\n      * \\sa MatrixBase::diagonal(), class Diagonal */\n    EIGEN_DEVICE_FUNC\n    typename MatrixType::ConstDiagonalReturnType diagonal() const\n    {\n      return typename MatrixType::ConstDiagonalReturnType(m_matrix);\n    }\n\n/////////// Cholesky module ///////////\n\n    const LLT<PlainObject, UpLo> llt() const;\n    const LDLT<PlainObject, UpLo> ldlt() const;\n\n/////////// Eigenvalue module ///////////\n\n    /** Real part of #Scalar */\n    typedef typename NumTraits<Scalar>::Real RealScalar;\n    /** Return type of eigenvalues() */\n    typedef Matrix<RealScalar, internal::traits<MatrixType>::ColsAtCompileTime, 1> EigenvaluesReturnType;\n\n    EIGEN_DEVICE_FUNC\n    EigenvaluesReturnType eigenvalues() const;\n    EIGEN_DEVICE_FUNC\n    RealScalar operatorNorm() const;\n\n  protected:\n    MatrixTypeNested m_matrix;\n};\n\n\n// template<typename OtherDerived, typename MatrixType, unsigned int UpLo>\n// internal::selfadjoint_matrix_product_returntype<OtherDerived,SelfAdjointView<MatrixType,UpLo> >\n// operator*(const MatrixBase<OtherDerived>& lhs, const SelfAdjointView<MatrixType,UpLo>& rhs)\n// {\n//   return internal::matrix_selfadjoint_product_returntype<OtherDerived,SelfAdjointView<MatrixType,UpLo> >(lhs.derived(),rhs);\n// }\n\n// selfadjoint to dense matrix\n\nnamespace internal {\n\n// TODO currently a selfadjoint expression has the form SelfAdjointView<.,.>\n//      in the future selfadjoint-ness should be defined by the expression traits\n//      such that Transpose<SelfAdjointView<.,.> > is valid. (currently TriangularBase::transpose() is overloaded to make it work)\ntemplate<typename MatrixType, unsigned int Mode>\nstruct evaluator_traits<SelfAdjointView<MatrixType,Mode> >\n{\n  typedef typename storage_kind_to_evaluator_kind<typename MatrixType::StorageKind>::Kind Kind;\n  typedef SelfAdjointShape Shape;\n};\n\ntemplate<int UpLo, int SetOpposite, typename DstEvaluatorTypeT, typename SrcEvaluatorTypeT, typename Functor, int Version>\nclass triangular_dense_assignment_kernel<UpLo,SelfAdjoint,SetOpposite,DstEvaluatorTypeT,SrcEvaluatorTypeT,Functor,Version>\n  : public generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, Version>\n{\nprotected:\n  typedef generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, Version> Base;\n  typedef typename Base::DstXprType DstXprType;\n  typedef typename Base::SrcXprType SrcXprType;\n  using Base::m_dst;\n  using Base::m_src;\n  using Base::m_functor;\npublic:\n  \n  typedef typename Base::DstEvaluatorType DstEvaluatorType;\n  typedef typename Base::SrcEvaluatorType SrcEvaluatorType;\n  typedef typename Base::Scalar Scalar;\n  typedef typename Base::AssignmentTraits AssignmentTraits;\n  \n  \n  EIGEN_DEVICE_FUNC triangular_dense_assignment_kernel(DstEvaluatorType &dst, const SrcEvaluatorType &src, const Functor &func, DstXprType& dstExpr)\n    : Base(dst, src, func, dstExpr)\n  {}\n  \n  EIGEN_DEVICE_FUNC void assignCoeff(Index row, Index col)\n  {\n    eigen_internal_assert(row!=col);\n    Scalar tmp = m_src.coeff(row,col);\n    m_functor.assignCoeff(m_dst.coeffRef(row,col), tmp);\n    m_functor.assignCoeff(m_dst.coeffRef(col,row), numext::conj(tmp));\n  }\n  \n  EIGEN_DEVICE_FUNC void assignDiagonalCoeff(Index id)\n  {\n    Base::assignCoeff(id,id);\n  }\n  \n  EIGEN_DEVICE_FUNC void assignOppositeCoeff(Index, Index)\n  { eigen_internal_assert(false && \"should never be called\"); }\n};\n\n} // end namespace internal\n\n/***************************************************************************\n* Implementation of MatrixBase methods\n***************************************************************************/\n\n/** This is the const version of MatrixBase::selfadjointView() */\ntemplate<typename Derived>\ntemplate<unsigned int UpLo>\nEIGEN_DEVICE_FUNC typename MatrixBase<Derived>::template ConstSelfAdjointViewReturnType<UpLo>::Type\nMatrixBase<Derived>::selfadjointView() const\n{\n  return typename ConstSelfAdjointViewReturnType<UpLo>::Type(derived());\n}\n\n/** \\returns an expression of a symmetric/self-adjoint view extracted from the upper or lower triangular part of the current matrix\n  *\n  * The parameter \\a UpLo can be either \\c #Upper or \\c #Lower\n  *\n  * Example: \\include MatrixBase_selfadjointView.cpp\n  * Output: \\verbinclude MatrixBase_selfadjointView.out\n  *\n  * \\sa class SelfAdjointView\n  */\ntemplate<typename Derived>\ntemplate<unsigned int UpLo>\nEIGEN_DEVICE_FUNC typename MatrixBase<Derived>::template SelfAdjointViewReturnType<UpLo>::Type\nMatrixBase<Derived>::selfadjointView()\n{\n  return typename SelfAdjointViewReturnType<UpLo>::Type(derived());\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_SELFADJOINTMATRIX_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/SelfCwiseBinaryOp.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009-2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SELFCWISEBINARYOP_H\n#define EIGEN_SELFCWISEBINARYOP_H\n\nnamespace Eigen { \n\n// TODO generalize the scalar type of 'other'\n\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& DenseBase<Derived>::operator*=(const Scalar& other)\n{\n  internal::call_assignment(this->derived(), PlainObject::Constant(rows(),cols(),other), internal::mul_assign_op<Scalar,Scalar>());\n  return derived();\n}\n\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& ArrayBase<Derived>::operator+=(const Scalar& other)\n{\n  internal::call_assignment(this->derived(), PlainObject::Constant(rows(),cols(),other), internal::add_assign_op<Scalar,Scalar>());\n  return derived();\n}\n\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& ArrayBase<Derived>::operator-=(const Scalar& other)\n{\n  internal::call_assignment(this->derived(), PlainObject::Constant(rows(),cols(),other), internal::sub_assign_op<Scalar,Scalar>());\n  return derived();\n}\n\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& DenseBase<Derived>::operator/=(const Scalar& other)\n{\n  internal::call_assignment(this->derived(), PlainObject::Constant(rows(),cols(),other), internal::div_assign_op<Scalar,Scalar>());\n  return derived();\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_SELFCWISEBINARYOP_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/Solve.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SOLVE_H\n#define EIGEN_SOLVE_H\n\nnamespace Eigen {\n\ntemplate<typename Decomposition, typename RhsType, typename StorageKind> class SolveImpl;\n  \n/** \\class Solve\n  * \\ingroup Core_Module\n  *\n  * \\brief Pseudo expression representing a solving operation\n  *\n  * \\tparam Decomposition the type of the matrix or decomposition object\n  * \\tparam Rhstype the type of the right-hand side\n  *\n  * This class represents an expression of A.solve(B)\n  * and most of the time this is the only way it is used.\n  *\n  */\nnamespace internal {\n\n// this solve_traits class permits to determine the evaluation type with respect to storage kind (Dense vs Sparse)\ntemplate<typename Decomposition, typename RhsType,typename StorageKind> struct solve_traits;\n\ntemplate<typename Decomposition, typename RhsType>\nstruct solve_traits<Decomposition,RhsType,Dense>\n{\n  typedef typename make_proper_matrix_type<typename RhsType::Scalar,\n                 Decomposition::ColsAtCompileTime,\n                 RhsType::ColsAtCompileTime,\n                 RhsType::PlainObject::Options,\n                 Decomposition::MaxColsAtCompileTime,\n                 RhsType::MaxColsAtCompileTime>::type PlainObject;\n};\n\ntemplate<typename Decomposition, typename RhsType>\nstruct traits<Solve<Decomposition, RhsType> >\n  : traits<typename solve_traits<Decomposition,RhsType,typename internal::traits<RhsType>::StorageKind>::PlainObject>\n{\n  typedef typename solve_traits<Decomposition,RhsType,typename internal::traits<RhsType>::StorageKind>::PlainObject PlainObject;\n  typedef typename promote_index_type<typename Decomposition::StorageIndex, typename RhsType::StorageIndex>::type StorageIndex;\n  typedef traits<PlainObject> BaseTraits;\n  enum {\n    Flags = BaseTraits::Flags & RowMajorBit,\n    CoeffReadCost = HugeCost\n  };\n};\n\n}\n\n\ntemplate<typename Decomposition, typename RhsType>\nclass Solve : public SolveImpl<Decomposition,RhsType,typename internal::traits<RhsType>::StorageKind>\n{\npublic:\n  typedef typename internal::traits<Solve>::PlainObject PlainObject;\n  typedef typename internal::traits<Solve>::StorageIndex StorageIndex;\n  \n  Solve(const Decomposition &dec, const RhsType &rhs)\n    : m_dec(dec), m_rhs(rhs)\n  {}\n  \n  EIGEN_DEVICE_FUNC Index rows() const { return m_dec.cols(); }\n  EIGEN_DEVICE_FUNC Index cols() const { return m_rhs.cols(); }\n\n  EIGEN_DEVICE_FUNC const Decomposition& dec() const { return m_dec; }\n  EIGEN_DEVICE_FUNC const RhsType&       rhs() const { return m_rhs; }\n\nprotected:\n  const Decomposition &m_dec;\n  const RhsType       &m_rhs;\n};\n\n\n// Specialization of the Solve expression for dense results\ntemplate<typename Decomposition, typename RhsType>\nclass SolveImpl<Decomposition,RhsType,Dense>\n  : public MatrixBase<Solve<Decomposition,RhsType> >\n{\n  typedef Solve<Decomposition,RhsType> Derived;\n  \npublic:\n  \n  typedef MatrixBase<Solve<Decomposition,RhsType> > Base;\n  EIGEN_DENSE_PUBLIC_INTERFACE(Derived)\n\nprivate:\n  \n  Scalar coeff(Index row, Index col) const;\n  Scalar coeff(Index i) const;\n};\n\n// Generic API dispatcher\ntemplate<typename Decomposition, typename RhsType, typename StorageKind>\nclass SolveImpl : public internal::generic_xpr_base<Solve<Decomposition,RhsType>, MatrixXpr, StorageKind>::type\n{\n  public:\n    typedef typename internal::generic_xpr_base<Solve<Decomposition,RhsType>, MatrixXpr, StorageKind>::type Base;\n};\n\nnamespace internal {\n\n// Evaluator of Solve -> eval into a temporary\ntemplate<typename Decomposition, typename RhsType>\nstruct evaluator<Solve<Decomposition,RhsType> >\n  : public evaluator<typename Solve<Decomposition,RhsType>::PlainObject>\n{\n  typedef Solve<Decomposition,RhsType> SolveType;\n  typedef typename SolveType::PlainObject PlainObject;\n  typedef evaluator<PlainObject> Base;\n\n  enum { Flags = Base::Flags | EvalBeforeNestingBit };\n  \n  EIGEN_DEVICE_FUNC explicit evaluator(const SolveType& solve)\n    : m_result(solve.rows(), solve.cols())\n  {\n    ::new (static_cast<Base*>(this)) Base(m_result);\n    solve.dec()._solve_impl(solve.rhs(), m_result);\n  }\n  \nprotected:  \n  PlainObject m_result;\n};\n\n// Specialization for \"dst = dec.solve(rhs)\"\n// NOTE we need to specialize it for Dense2Dense to avoid ambiguous specialization error and a Sparse2Sparse specialization must exist somewhere\ntemplate<typename DstXprType, typename DecType, typename RhsType, typename Scalar>\nstruct Assignment<DstXprType, Solve<DecType,RhsType>, internal::assign_op<Scalar,Scalar>, Dense2Dense>\n{\n  typedef Solve<DecType,RhsType> SrcXprType;\n  static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op<Scalar,Scalar> &)\n  {\n    Index dstRows = src.rows();\n    Index dstCols = src.cols();\n    if((dst.rows()!=dstRows) || (dst.cols()!=dstCols))\n      dst.resize(dstRows, dstCols);\n\n    src.dec()._solve_impl(src.rhs(), dst);\n  }\n};\n\n// Specialization for \"dst = dec.transpose().solve(rhs)\"\ntemplate<typename DstXprType, typename DecType, typename RhsType, typename Scalar>\nstruct Assignment<DstXprType, Solve<Transpose<const DecType>,RhsType>, internal::assign_op<Scalar,Scalar>, Dense2Dense>\n{\n  typedef Solve<Transpose<const DecType>,RhsType> SrcXprType;\n  static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op<Scalar,Scalar> &)\n  {\n    Index dstRows = src.rows();\n    Index dstCols = src.cols();\n    if((dst.rows()!=dstRows) || (dst.cols()!=dstCols))\n      dst.resize(dstRows, dstCols);\n\n    src.dec().nestedExpression().template _solve_impl_transposed<false>(src.rhs(), dst);\n  }\n};\n\n// Specialization for \"dst = dec.adjoint().solve(rhs)\"\ntemplate<typename DstXprType, typename DecType, typename RhsType, typename Scalar>\nstruct Assignment<DstXprType, Solve<CwiseUnaryOp<internal::scalar_conjugate_op<typename DecType::Scalar>, const Transpose<const DecType> >,RhsType>,\n                  internal::assign_op<Scalar,Scalar>, Dense2Dense>\n{\n  typedef Solve<CwiseUnaryOp<internal::scalar_conjugate_op<typename DecType::Scalar>, const Transpose<const DecType> >,RhsType> SrcXprType;\n  static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op<Scalar,Scalar> &)\n  {\n    Index dstRows = src.rows();\n    Index dstCols = src.cols();\n    if((dst.rows()!=dstRows) || (dst.cols()!=dstCols))\n      dst.resize(dstRows, dstCols);\n    \n    src.dec().nestedExpression().nestedExpression().template _solve_impl_transposed<true>(src.rhs(), dst);\n  }\n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_SOLVE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/SolveTriangular.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SOLVETRIANGULAR_H\n#define EIGEN_SOLVETRIANGULAR_H\n\nnamespace Eigen { \n\nnamespace internal {\n\n// Forward declarations:\n// The following two routines are implemented in the products/TriangularSolver*.h files\ntemplate<typename LhsScalar, typename RhsScalar, typename Index, int Side, int Mode, bool Conjugate, int StorageOrder>\nstruct triangular_solve_vector;\n\ntemplate <typename Scalar, typename Index, int Side, int Mode, bool Conjugate, int TriStorageOrder, int OtherStorageOrder, int OtherInnerStride>\nstruct triangular_solve_matrix;\n\n// small helper struct extracting some traits on the underlying solver operation\ntemplate<typename Lhs, typename Rhs, int Side>\nclass trsolve_traits\n{\n  private:\n    enum {\n      RhsIsVectorAtCompileTime = (Side==OnTheLeft ? Rhs::ColsAtCompileTime : Rhs::RowsAtCompileTime)==1\n    };\n  public:\n    enum {\n      Unrolling   = (RhsIsVectorAtCompileTime && Rhs::SizeAtCompileTime != Dynamic && Rhs::SizeAtCompileTime <= 8)\n                  ? CompleteUnrolling : NoUnrolling,\n      RhsVectors  = RhsIsVectorAtCompileTime ? 1 : Dynamic\n    };\n};\n\ntemplate<typename Lhs, typename Rhs,\n  int Side, // can be OnTheLeft/OnTheRight\n  int Mode, // can be Upper/Lower | UnitDiag\n  int Unrolling = trsolve_traits<Lhs,Rhs,Side>::Unrolling,\n  int RhsVectors = trsolve_traits<Lhs,Rhs,Side>::RhsVectors\n  >\nstruct triangular_solver_selector;\n\ntemplate<typename Lhs, typename Rhs, int Side, int Mode>\nstruct triangular_solver_selector<Lhs,Rhs,Side,Mode,NoUnrolling,1>\n{\n  typedef typename Lhs::Scalar LhsScalar;\n  typedef typename Rhs::Scalar RhsScalar;\n  typedef blas_traits<Lhs> LhsProductTraits;\n  typedef typename LhsProductTraits::ExtractType ActualLhsType;\n  typedef Map<Matrix<RhsScalar,Dynamic,1>, Aligned> MappedRhs;\n  static void run(const Lhs& lhs, Rhs& rhs)\n  {\n    ActualLhsType actualLhs = LhsProductTraits::extract(lhs);\n\n    // FIXME find a way to allow an inner stride if packet_traits<Scalar>::size==1\n\n    bool useRhsDirectly = Rhs::InnerStrideAtCompileTime==1 || rhs.innerStride()==1;\n\n    ei_declare_aligned_stack_constructed_variable(RhsScalar,actualRhs,rhs.size(),\n                                                  (useRhsDirectly ? rhs.data() : 0));\n                                                  \n    if(!useRhsDirectly)\n      MappedRhs(actualRhs,rhs.size()) = rhs;\n\n    triangular_solve_vector<LhsScalar, RhsScalar, Index, Side, Mode, LhsProductTraits::NeedToConjugate,\n                            (int(Lhs::Flags) & RowMajorBit) ? RowMajor : ColMajor>\n      ::run(actualLhs.cols(), actualLhs.data(), actualLhs.outerStride(), actualRhs);\n\n    if(!useRhsDirectly)\n      rhs = MappedRhs(actualRhs, rhs.size());\n  }\n};\n\n// the rhs is a matrix\ntemplate<typename Lhs, typename Rhs, int Side, int Mode>\nstruct triangular_solver_selector<Lhs,Rhs,Side,Mode,NoUnrolling,Dynamic>\n{\n  typedef typename Rhs::Scalar Scalar;\n  typedef blas_traits<Lhs> LhsProductTraits;\n  typedef typename LhsProductTraits::DirectLinearAccessType ActualLhsType;\n\n  static void run(const Lhs& lhs, Rhs& rhs)\n  {\n    typename internal::add_const_on_value_type<ActualLhsType>::type actualLhs = LhsProductTraits::extract(lhs);\n\n    const Index size = lhs.rows();\n    const Index othersize = Side==OnTheLeft? rhs.cols() : rhs.rows();\n\n    typedef internal::gemm_blocking_space<(Rhs::Flags&RowMajorBit) ? RowMajor : ColMajor,Scalar,Scalar,\n              Rhs::MaxRowsAtCompileTime, Rhs::MaxColsAtCompileTime, Lhs::MaxRowsAtCompileTime,4> BlockingType;\n\n    BlockingType blocking(rhs.rows(), rhs.cols(), size, 1, false);\n\n    triangular_solve_matrix<Scalar,Index,Side,Mode,LhsProductTraits::NeedToConjugate,(int(Lhs::Flags) & RowMajorBit) ? RowMajor : ColMajor,\n                               (Rhs::Flags&RowMajorBit) ? RowMajor : ColMajor, Rhs::InnerStrideAtCompileTime>\n      ::run(size, othersize, &actualLhs.coeffRef(0,0), actualLhs.outerStride(), &rhs.coeffRef(0,0), rhs.innerStride(), rhs.outerStride(), blocking);\n  }\n};\n\n/***************************************************************************\n* meta-unrolling implementation\n***************************************************************************/\n\ntemplate<typename Lhs, typename Rhs, int Mode, int LoopIndex, int Size,\n         bool Stop = LoopIndex==Size>\nstruct triangular_solver_unroller;\n\ntemplate<typename Lhs, typename Rhs, int Mode, int LoopIndex, int Size>\nstruct triangular_solver_unroller<Lhs,Rhs,Mode,LoopIndex,Size,false> {\n  enum {\n    IsLower = ((Mode&Lower)==Lower),\n    DiagIndex  = IsLower ? LoopIndex : Size - LoopIndex - 1,\n    StartIndex = IsLower ? 0         : DiagIndex+1\n  };\n  static void run(const Lhs& lhs, Rhs& rhs)\n  {\n    if (LoopIndex>0)\n      rhs.coeffRef(DiagIndex) -= lhs.row(DiagIndex).template segment<LoopIndex>(StartIndex).transpose()\n                                .cwiseProduct(rhs.template segment<LoopIndex>(StartIndex)).sum();\n\n    if(!(Mode & UnitDiag))\n      rhs.coeffRef(DiagIndex) /= lhs.coeff(DiagIndex,DiagIndex);\n\n    triangular_solver_unroller<Lhs,Rhs,Mode,LoopIndex+1,Size>::run(lhs,rhs);\n  }\n};\n\ntemplate<typename Lhs, typename Rhs, int Mode, int LoopIndex, int Size>\nstruct triangular_solver_unroller<Lhs,Rhs,Mode,LoopIndex,Size,true> {\n  static void run(const Lhs&, Rhs&) {}\n};\n\ntemplate<typename Lhs, typename Rhs, int Mode>\nstruct triangular_solver_selector<Lhs,Rhs,OnTheLeft,Mode,CompleteUnrolling,1> {\n  static void run(const Lhs& lhs, Rhs& rhs)\n  { triangular_solver_unroller<Lhs,Rhs,Mode,0,Rhs::SizeAtCompileTime>::run(lhs,rhs); }\n};\n\ntemplate<typename Lhs, typename Rhs, int Mode>\nstruct triangular_solver_selector<Lhs,Rhs,OnTheRight,Mode,CompleteUnrolling,1> {\n  static void run(const Lhs& lhs, Rhs& rhs)\n  {\n    Transpose<const Lhs> trLhs(lhs);\n    Transpose<Rhs> trRhs(rhs);\n    \n    triangular_solver_unroller<Transpose<const Lhs>,Transpose<Rhs>,\n                              ((Mode&Upper)==Upper ? Lower : Upper) | (Mode&UnitDiag),\n                              0,Rhs::SizeAtCompileTime>::run(trLhs,trRhs);\n  }\n};\n\n} // end namespace internal\n\n/***************************************************************************\n* TriangularView methods\n***************************************************************************/\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\ntemplate<typename MatrixType, unsigned int Mode>\ntemplate<int Side, typename OtherDerived>\nEIGEN_DEVICE_FUNC void TriangularViewImpl<MatrixType,Mode,Dense>::solveInPlace(const MatrixBase<OtherDerived>& _other) const\n{\n  OtherDerived& other = _other.const_cast_derived();\n  eigen_assert( derived().cols() == derived().rows() && ((Side==OnTheLeft && derived().cols() == other.rows()) || (Side==OnTheRight && derived().cols() == other.cols())) );\n  eigen_assert((!(Mode & ZeroDiag)) && bool(Mode & (Upper|Lower)));\n  // If solving for a 0x0 matrix, nothing to do, simply return.\n  if (derived().cols() == 0)\n    return;\n\n  enum { copy = (internal::traits<OtherDerived>::Flags & RowMajorBit)  && OtherDerived::IsVectorAtCompileTime && OtherDerived::SizeAtCompileTime!=1};\n  typedef typename internal::conditional<copy,\n    typename internal::plain_matrix_type_column_major<OtherDerived>::type, OtherDerived&>::type OtherCopy;\n  OtherCopy otherCopy(other);\n\n  internal::triangular_solver_selector<MatrixType, typename internal::remove_reference<OtherCopy>::type,\n    Side, Mode>::run(derived().nestedExpression(), otherCopy);\n\n  if (copy)\n    other = otherCopy;\n}\n\ntemplate<typename Derived, unsigned int Mode>\ntemplate<int Side, typename Other>\nconst internal::triangular_solve_retval<Side,TriangularView<Derived,Mode>,Other>\nTriangularViewImpl<Derived,Mode,Dense>::solve(const MatrixBase<Other>& other) const\n{\n  return internal::triangular_solve_retval<Side,TriangularViewType,Other>(derived(), other.derived());\n}\n#endif\n\nnamespace internal {\n\n\ntemplate<int Side, typename TriangularType, typename Rhs>\nstruct traits<triangular_solve_retval<Side, TriangularType, Rhs> >\n{\n  typedef typename internal::plain_matrix_type_column_major<Rhs>::type ReturnType;\n};\n\ntemplate<int Side, typename TriangularType, typename Rhs> struct triangular_solve_retval\n : public ReturnByValue<triangular_solve_retval<Side, TriangularType, Rhs> >\n{\n  typedef typename remove_all<typename Rhs::Nested>::type RhsNestedCleaned;\n  typedef ReturnByValue<triangular_solve_retval> Base;\n\n  triangular_solve_retval(const TriangularType& tri, const Rhs& rhs)\n    : m_triangularMatrix(tri), m_rhs(rhs)\n  {}\n\n  inline Index rows() const { return m_rhs.rows(); }\n  inline Index cols() const { return m_rhs.cols(); }\n\n  template<typename Dest> inline void evalTo(Dest& dst) const\n  {\n    if(!is_same_dense(dst,m_rhs))\n      dst = m_rhs;\n    m_triangularMatrix.template solveInPlace<Side>(dst);\n  }\n\n  protected:\n    const TriangularType& m_triangularMatrix;\n    typename Rhs::Nested m_rhs;\n};\n\n} // namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_SOLVETRIANGULAR_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/SolverBase.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SOLVERBASE_H\n#define EIGEN_SOLVERBASE_H\n\nnamespace Eigen {\n\nnamespace internal {\n\ntemplate<typename Derived>\nstruct solve_assertion {\n    template<bool Transpose_, typename Rhs>\n    static void run(const Derived& solver, const Rhs& b) { solver.template _check_solve_assertion<Transpose_>(b); }\n};\n\ntemplate<typename Derived>\nstruct solve_assertion<Transpose<Derived> >\n{\n    typedef Transpose<Derived> type;\n\n    template<bool Transpose_, typename Rhs>\n    static void run(const type& transpose, const Rhs& b)\n    {\n        internal::solve_assertion<typename internal::remove_all<Derived>::type>::template run<true>(transpose.nestedExpression(), b);\n    }\n};\n\ntemplate<typename Scalar, typename Derived>\nstruct solve_assertion<CwiseUnaryOp<Eigen::internal::scalar_conjugate_op<Scalar>, const Transpose<Derived> > >\n{\n    typedef CwiseUnaryOp<Eigen::internal::scalar_conjugate_op<Scalar>, const Transpose<Derived> > type;\n\n    template<bool Transpose_, typename Rhs>\n    static void run(const type& adjoint, const Rhs& b)\n    {\n        internal::solve_assertion<typename internal::remove_all<Transpose<Derived> >::type>::template run<true>(adjoint.nestedExpression(), b);\n    }\n};\n} // end namespace internal\n\n/** \\class SolverBase\n  * \\brief A base class for matrix decomposition and solvers\n  *\n  * \\tparam Derived the actual type of the decomposition/solver.\n  *\n  * Any matrix decomposition inheriting this base class provide the following API:\n  *\n  * \\code\n  * MatrixType A, b, x;\n  * DecompositionType dec(A);\n  * x = dec.solve(b);             // solve A   * x = b\n  * x = dec.transpose().solve(b); // solve A^T * x = b\n  * x = dec.adjoint().solve(b);   // solve A'  * x = b\n  * \\endcode\n  *\n  * \\warning Currently, any other usage of transpose() and adjoint() are not supported and will produce compilation errors.\n  *\n  * \\sa class PartialPivLU, class FullPivLU, class HouseholderQR, class ColPivHouseholderQR, class FullPivHouseholderQR, class CompleteOrthogonalDecomposition, class LLT, class LDLT, class SVDBase\n  */\ntemplate<typename Derived>\nclass SolverBase : public EigenBase<Derived>\n{\n  public:\n\n    typedef EigenBase<Derived> Base;\n    typedef typename internal::traits<Derived>::Scalar Scalar;\n    typedef Scalar CoeffReturnType;\n\n    template<typename Derived_>\n    friend struct internal::solve_assertion;\n\n    enum {\n      RowsAtCompileTime = internal::traits<Derived>::RowsAtCompileTime,\n      ColsAtCompileTime = internal::traits<Derived>::ColsAtCompileTime,\n      SizeAtCompileTime = (internal::size_at_compile_time<internal::traits<Derived>::RowsAtCompileTime,\n                                                          internal::traits<Derived>::ColsAtCompileTime>::ret),\n      MaxRowsAtCompileTime = internal::traits<Derived>::MaxRowsAtCompileTime,\n      MaxColsAtCompileTime = internal::traits<Derived>::MaxColsAtCompileTime,\n      MaxSizeAtCompileTime = (internal::size_at_compile_time<internal::traits<Derived>::MaxRowsAtCompileTime,\n                                                             internal::traits<Derived>::MaxColsAtCompileTime>::ret),\n      IsVectorAtCompileTime = internal::traits<Derived>::MaxRowsAtCompileTime == 1\n                           || internal::traits<Derived>::MaxColsAtCompileTime == 1,\n      NumDimensions = int(MaxSizeAtCompileTime) == 1 ? 0 : bool(IsVectorAtCompileTime) ? 1 : 2\n    };\n\n    /** Default constructor */\n    SolverBase()\n    {}\n\n    ~SolverBase()\n    {}\n\n    using Base::derived;\n\n    /** \\returns an expression of the solution x of \\f$ A x = b \\f$ using the current decomposition of A.\n      */\n    template<typename Rhs>\n    inline const Solve<Derived, Rhs>\n    solve(const MatrixBase<Rhs>& b) const\n    {\n      internal::solve_assertion<typename internal::remove_all<Derived>::type>::template run<false>(derived(), b);\n      return Solve<Derived, Rhs>(derived(), b.derived());\n    }\n\n    /** \\internal the return type of transpose() */\n    typedef typename internal::add_const<Transpose<const Derived> >::type ConstTransposeReturnType;\n    /** \\returns an expression of the transposed of the factored matrix.\n      *\n      * A typical usage is to solve for the transposed problem A^T x = b:\n      * \\code x = dec.transpose().solve(b); \\endcode\n      *\n      * \\sa adjoint(), solve()\n      */\n    inline ConstTransposeReturnType transpose() const\n    {\n      return ConstTransposeReturnType(derived());\n    }\n\n    /** \\internal the return type of adjoint() */\n    typedef typename internal::conditional<NumTraits<Scalar>::IsComplex,\n                        CwiseUnaryOp<internal::scalar_conjugate_op<Scalar>, ConstTransposeReturnType>,\n                        ConstTransposeReturnType\n                     >::type AdjointReturnType;\n    /** \\returns an expression of the adjoint of the factored matrix\n      *\n      * A typical usage is to solve for the adjoint problem A' x = b:\n      * \\code x = dec.adjoint().solve(b); \\endcode\n      *\n      * For real scalar types, this function is equivalent to transpose().\n      *\n      * \\sa transpose(), solve()\n      */\n    inline AdjointReturnType adjoint() const\n    {\n      return AdjointReturnType(derived().transpose());\n    }\n\n  protected:\n\n    template<bool Transpose_, typename Rhs>\n    void _check_solve_assertion(const Rhs& b) const {\n        EIGEN_ONLY_USED_FOR_DEBUG(b);\n        eigen_assert(derived().m_isInitialized && \"Solver is not initialized.\");\n        eigen_assert((Transpose_?derived().cols():derived().rows())==b.rows() && \"SolverBase::solve(): invalid number of rows of the right hand side matrix b\");\n    }\n};\n\nnamespace internal {\n\ntemplate<typename Derived>\nstruct generic_xpr_base<Derived, MatrixXpr, SolverStorage>\n{\n  typedef SolverBase<Derived> type;\n\n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_SOLVERBASE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/StableNorm.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_STABLENORM_H\n#define EIGEN_STABLENORM_H\n\nnamespace Eigen { \n\nnamespace internal {\n\ntemplate<typename ExpressionType, typename Scalar>\ninline void stable_norm_kernel(const ExpressionType& bl, Scalar& ssq, Scalar& scale, Scalar& invScale)\n{\n  Scalar maxCoeff = bl.cwiseAbs().maxCoeff();\n  \n  if(maxCoeff>scale)\n  {\n    ssq = ssq * numext::abs2(scale/maxCoeff);\n    Scalar tmp = Scalar(1)/maxCoeff;\n    if(tmp > NumTraits<Scalar>::highest())\n    {\n      invScale = NumTraits<Scalar>::highest();\n      scale = Scalar(1)/invScale;\n    }\n    else if(maxCoeff>NumTraits<Scalar>::highest()) // we got a INF\n    {\n      invScale = Scalar(1);\n      scale = maxCoeff;\n    }\n    else\n    {\n      scale = maxCoeff;\n      invScale = tmp;\n    }\n  }\n  else if(maxCoeff!=maxCoeff) // we got a NaN\n  {\n    scale = maxCoeff;\n  }\n  \n  // TODO if the maxCoeff is much much smaller than the current scale,\n  // then we can neglect this sub vector\n  if(scale>Scalar(0)) // if scale==0, then bl is 0 \n    ssq += (bl*invScale).squaredNorm();\n}\n\ntemplate<typename VectorType, typename RealScalar>\nvoid stable_norm_impl_inner_step(const VectorType &vec, RealScalar& ssq, RealScalar& scale, RealScalar& invScale)\n{\n  typedef typename VectorType::Scalar Scalar;\n  const Index blockSize = 4096;\n  \n  typedef typename internal::nested_eval<VectorType,2>::type VectorTypeCopy;\n  typedef typename internal::remove_all<VectorTypeCopy>::type VectorTypeCopyClean;\n  const VectorTypeCopy copy(vec);\n  \n  enum {\n    CanAlign = (   (int(VectorTypeCopyClean::Flags)&DirectAccessBit)\n                || (int(internal::evaluator<VectorTypeCopyClean>::Alignment)>0) // FIXME Alignment)>0 might not be enough\n               ) && (blockSize*sizeof(Scalar)*2<EIGEN_STACK_ALLOCATION_LIMIT)\n                 && (EIGEN_MAX_STATIC_ALIGN_BYTES>0) // if we cannot allocate on the stack, then let's not bother about this optimization\n  };\n  typedef typename internal::conditional<CanAlign, Ref<const Matrix<Scalar,Dynamic,1,0,blockSize,1>, internal::evaluator<VectorTypeCopyClean>::Alignment>,\n                                                   typename VectorTypeCopyClean::ConstSegmentReturnType>::type SegmentWrapper;\n  Index n = vec.size();\n  \n  Index bi = internal::first_default_aligned(copy);\n  if (bi>0)\n    internal::stable_norm_kernel(copy.head(bi), ssq, scale, invScale);\n  for (; bi<n; bi+=blockSize)\n    internal::stable_norm_kernel(SegmentWrapper(copy.segment(bi,numext::mini(blockSize, n - bi))), ssq, scale, invScale);\n}\n\ntemplate<typename VectorType>\ntypename VectorType::RealScalar\nstable_norm_impl(const VectorType &vec, typename enable_if<VectorType::IsVectorAtCompileTime>::type* = 0 )\n{\n  using std::sqrt;\n  using std::abs;\n\n  Index n = vec.size();\n\n  if(n==1)\n    return abs(vec.coeff(0));\n\n  typedef typename VectorType::RealScalar RealScalar;\n  RealScalar scale(0);\n  RealScalar invScale(1);\n  RealScalar ssq(0); // sum of squares\n\n  stable_norm_impl_inner_step(vec, ssq, scale, invScale);\n  \n  return scale * sqrt(ssq);\n}\n\ntemplate<typename MatrixType>\ntypename MatrixType::RealScalar\nstable_norm_impl(const MatrixType &mat, typename enable_if<!MatrixType::IsVectorAtCompileTime>::type* = 0 )\n{\n  using std::sqrt;\n\n  typedef typename MatrixType::RealScalar RealScalar;\n  RealScalar scale(0);\n  RealScalar invScale(1);\n  RealScalar ssq(0); // sum of squares\n\n  for(Index j=0; j<mat.outerSize(); ++j)\n    stable_norm_impl_inner_step(mat.innerVector(j), ssq, scale, invScale);\n  return scale * sqrt(ssq);\n}\n\ntemplate<typename Derived>\ninline typename NumTraits<typename traits<Derived>::Scalar>::Real\nblueNorm_impl(const EigenBase<Derived>& _vec)\n{\n  typedef typename Derived::RealScalar RealScalar;  \n  using std::pow;\n  using std::sqrt;\n  using std::abs;\n  const Derived& vec(_vec.derived());\n  static bool initialized = false;\n  static RealScalar b1, b2, s1m, s2m, rbig, relerr;\n  if(!initialized)\n  {\n    int ibeta, it, iemin, iemax, iexp;\n    RealScalar eps;\n    // This program calculates the machine-dependent constants\n    // bl, b2, slm, s2m, relerr overfl\n    // from the \"basic\" machine-dependent numbers\n    // nbig, ibeta, it, iemin, iemax, rbig.\n    // The following define the basic machine-dependent constants.\n    // For portability, the PORT subprograms \"ilmaeh\" and \"rlmach\"\n    // are used. For any specific computer, each of the assignment\n    // statements can be replaced\n    ibeta = std::numeric_limits<RealScalar>::radix;                 // base for floating-point numbers\n    it    = NumTraits<RealScalar>::digits();                        // number of base-beta digits in mantissa\n    iemin = std::numeric_limits<RealScalar>::min_exponent;          // minimum exponent\n    iemax = std::numeric_limits<RealScalar>::max_exponent;          // maximum exponent\n    rbig  = (std::numeric_limits<RealScalar>::max)();               // largest floating-point number\n\n    iexp  = -((1-iemin)/2);\n    b1    = RealScalar(pow(RealScalar(ibeta),RealScalar(iexp)));    // lower boundary of midrange\n    iexp  = (iemax + 1 - it)/2;\n    b2    = RealScalar(pow(RealScalar(ibeta),RealScalar(iexp)));    // upper boundary of midrange\n\n    iexp  = (2-iemin)/2;\n    s1m   = RealScalar(pow(RealScalar(ibeta),RealScalar(iexp)));    // scaling factor for lower range\n    iexp  = - ((iemax+it)/2);\n    s2m   = RealScalar(pow(RealScalar(ibeta),RealScalar(iexp)));    // scaling factor for upper range\n\n    eps     = RealScalar(pow(double(ibeta), 1-it));\n    relerr  = sqrt(eps);                                            // tolerance for neglecting asml\n    initialized = true;\n  }\n  Index n = vec.size();\n  RealScalar ab2 = b2 / RealScalar(n);\n  RealScalar asml = RealScalar(0);\n  RealScalar amed = RealScalar(0);\n  RealScalar abig = RealScalar(0);\n\n  for(Index j=0; j<vec.outerSize(); ++j)\n  {\n    for(typename Derived::InnerIterator it(vec, j); it; ++it)\n    {\n      RealScalar ax = abs(it.value());\n      if(ax > ab2)     abig += numext::abs2(ax*s2m);\n      else if(ax < b1) asml += numext::abs2(ax*s1m);\n      else             amed += numext::abs2(ax);\n    }\n  }\n  if(amed!=amed)\n    return amed;  // we got a NaN\n  if(abig > RealScalar(0))\n  {\n    abig = sqrt(abig);\n    if(abig > rbig) // overflow, or *this contains INF values\n      return abig;  // return INF\n    if(amed > RealScalar(0))\n    {\n      abig = abig/s2m;\n      amed = sqrt(amed);\n    }\n    else\n      return abig/s2m;\n  }\n  else if(asml > RealScalar(0))\n  {\n    if (amed > RealScalar(0))\n    {\n      abig = sqrt(amed);\n      amed = sqrt(asml) / s1m;\n    }\n    else\n      return sqrt(asml)/s1m;\n  }\n  else\n    return sqrt(amed);\n  asml = numext::mini(abig, amed);\n  abig = numext::maxi(abig, amed);\n  if(asml <= abig*relerr)\n    return abig;\n  else\n    return abig * sqrt(RealScalar(1) + numext::abs2(asml/abig));\n}\n\n} // end namespace internal\n\n/** \\returns the \\em l2 norm of \\c *this avoiding underflow and overflow.\n  * This version use a blockwise two passes algorithm:\n  *  1 - find the absolute largest coefficient \\c s\n  *  2 - compute \\f$ s \\Vert \\frac{*this}{s} \\Vert \\f$ in a standard way\n  *\n  * For architecture/scalar types supporting vectorization, this version\n  * is faster than blueNorm(). Otherwise the blueNorm() is much faster.\n  *\n  * \\sa norm(), blueNorm(), hypotNorm()\n  */\ntemplate<typename Derived>\ninline typename NumTraits<typename internal::traits<Derived>::Scalar>::Real\nMatrixBase<Derived>::stableNorm() const\n{\n  return internal::stable_norm_impl(derived());\n}\n\n/** \\returns the \\em l2 norm of \\c *this using the Blue's algorithm.\n  * A Portable Fortran Program to Find the Euclidean Norm of a Vector,\n  * ACM TOMS, Vol 4, Issue 1, 1978.\n  *\n  * For architecture/scalar types without vectorization, this version\n  * is much faster than stableNorm(). Otherwise the stableNorm() is faster.\n  *\n  * \\sa norm(), stableNorm(), hypotNorm()\n  */\ntemplate<typename Derived>\ninline typename NumTraits<typename internal::traits<Derived>::Scalar>::Real\nMatrixBase<Derived>::blueNorm() const\n{\n  return internal::blueNorm_impl(*this);\n}\n\n/** \\returns the \\em l2 norm of \\c *this avoiding undeflow and overflow.\n  * This version use a concatenation of hypot() calls, and it is very slow.\n  *\n  * \\sa norm(), stableNorm()\n  */\ntemplate<typename Derived>\ninline typename NumTraits<typename internal::traits<Derived>::Scalar>::Real\nMatrixBase<Derived>::hypotNorm() const\n{\n  if(size()==1)\n    return numext::abs(coeff(0,0));\n  else\n    return this->cwiseAbs().redux(internal::scalar_hypot_op<RealScalar>());\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_STABLENORM_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/StlIterators.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2018 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\nnamespace Eigen {\n\nnamespace internal {\n\ntemplate<typename IteratorType>\nstruct indexed_based_stl_iterator_traits;\n\ntemplate<typename  Derived>\nclass indexed_based_stl_iterator_base\n{\nprotected:\n  typedef indexed_based_stl_iterator_traits<Derived> traits;\n  typedef typename traits::XprType XprType;\n  typedef indexed_based_stl_iterator_base<typename traits::non_const_iterator> non_const_iterator;\n  typedef indexed_based_stl_iterator_base<typename traits::const_iterator> const_iterator;\n  typedef typename internal::conditional<internal::is_const<XprType>::value,non_const_iterator,const_iterator>::type other_iterator;\n  // NOTE: in C++03 we cannot declare friend classes through typedefs because we need to write friend class:\n  friend class indexed_based_stl_iterator_base<typename traits::const_iterator>;\n  friend class indexed_based_stl_iterator_base<typename traits::non_const_iterator>;\npublic:\n  typedef Index difference_type;\n  typedef std::random_access_iterator_tag iterator_category;\n\n  indexed_based_stl_iterator_base() : mp_xpr(0), m_index(0) {}\n  indexed_based_stl_iterator_base(XprType& xpr, Index index) : mp_xpr(&xpr), m_index(index) {}\n\n  indexed_based_stl_iterator_base(const non_const_iterator& other)\n    : mp_xpr(other.mp_xpr), m_index(other.m_index)\n  {}\n\n  indexed_based_stl_iterator_base& operator=(const non_const_iterator& other)\n  {\n    mp_xpr = other.mp_xpr;\n    m_index = other.m_index;\n    return *this;\n  }\n\n  Derived& operator++() { ++m_index; return derived(); }\n  Derived& operator--() { --m_index; return derived(); }\n\n  Derived operator++(int) { Derived prev(derived()); operator++(); return prev;}\n  Derived operator--(int) { Derived prev(derived()); operator--(); return prev;}\n\n  friend Derived operator+(const indexed_based_stl_iterator_base& a, Index b) { Derived ret(a.derived()); ret += b; return ret; }\n  friend Derived operator-(const indexed_based_stl_iterator_base& a, Index b) { Derived ret(a.derived()); ret -= b; return ret; }\n  friend Derived operator+(Index a, const indexed_based_stl_iterator_base& b) { Derived ret(b.derived()); ret += a; return ret; }\n  friend Derived operator-(Index a, const indexed_based_stl_iterator_base& b) { Derived ret(b.derived()); ret -= a; return ret; }\n  \n  Derived& operator+=(Index b) { m_index += b; return derived(); }\n  Derived& operator-=(Index b) { m_index -= b; return derived(); }\n\n  difference_type operator-(const indexed_based_stl_iterator_base& other) const\n  {\n    eigen_assert(mp_xpr == other.mp_xpr);\n    return m_index - other.m_index;\n  }\n\n  difference_type operator-(const other_iterator& other) const\n  {\n    eigen_assert(mp_xpr == other.mp_xpr);\n    return m_index - other.m_index;\n  }\n\n  bool operator==(const indexed_based_stl_iterator_base& other) const { eigen_assert(mp_xpr == other.mp_xpr); return m_index == other.m_index; }\n  bool operator!=(const indexed_based_stl_iterator_base& other) const { eigen_assert(mp_xpr == other.mp_xpr); return m_index != other.m_index; }\n  bool operator< (const indexed_based_stl_iterator_base& other) const { eigen_assert(mp_xpr == other.mp_xpr); return m_index <  other.m_index; }\n  bool operator<=(const indexed_based_stl_iterator_base& other) const { eigen_assert(mp_xpr == other.mp_xpr); return m_index <= other.m_index; }\n  bool operator> (const indexed_based_stl_iterator_base& other) const { eigen_assert(mp_xpr == other.mp_xpr); return m_index >  other.m_index; }\n  bool operator>=(const indexed_based_stl_iterator_base& other) const { eigen_assert(mp_xpr == other.mp_xpr); return m_index >= other.m_index; }\n\n  bool operator==(const other_iterator& other) const { eigen_assert(mp_xpr == other.mp_xpr); return m_index == other.m_index; }\n  bool operator!=(const other_iterator& other) const { eigen_assert(mp_xpr == other.mp_xpr); return m_index != other.m_index; }\n  bool operator< (const other_iterator& other) const { eigen_assert(mp_xpr == other.mp_xpr); return m_index <  other.m_index; }\n  bool operator<=(const other_iterator& other) const { eigen_assert(mp_xpr == other.mp_xpr); return m_index <= other.m_index; }\n  bool operator> (const other_iterator& other) const { eigen_assert(mp_xpr == other.mp_xpr); return m_index >  other.m_index; }\n  bool operator>=(const other_iterator& other) const { eigen_assert(mp_xpr == other.mp_xpr); return m_index >= other.m_index; }\n\nprotected:\n\n  Derived& derived() { return static_cast<Derived&>(*this); }\n  const Derived& derived() const { return static_cast<const Derived&>(*this); }\n\n  XprType *mp_xpr;\n  Index m_index;\n};\n\ntemplate<typename XprType>\nclass pointer_based_stl_iterator\n{\n  enum { is_lvalue  = internal::is_lvalue<XprType>::value };\n  typedef pointer_based_stl_iterator<typename internal::remove_const<XprType>::type> non_const_iterator;\n  typedef pointer_based_stl_iterator<typename internal::add_const<XprType>::type> const_iterator;\n  typedef typename internal::conditional<internal::is_const<XprType>::value,non_const_iterator,const_iterator>::type other_iterator;\n  // NOTE: in C++03 we cannot declare friend classes through typedefs because we need to write friend class:\n  friend class pointer_based_stl_iterator<typename internal::add_const<XprType>::type>;\n  friend class pointer_based_stl_iterator<typename internal::remove_const<XprType>::type>;\npublic:\n  typedef Index difference_type;\n  typedef typename XprType::Scalar value_type;\n  typedef std::random_access_iterator_tag iterator_category;\n  typedef typename internal::conditional<bool(is_lvalue), value_type*, const value_type*>::type pointer;\n  typedef typename internal::conditional<bool(is_lvalue), value_type&, const value_type&>::type reference;\n\n\n  pointer_based_stl_iterator() : m_ptr(0) {}\n  pointer_based_stl_iterator(XprType& xpr, Index index) : m_incr(xpr.innerStride())\n  {\n    m_ptr = xpr.data() + index * m_incr.value();\n  }\n\n  pointer_based_stl_iterator(const non_const_iterator& other)\n    : m_ptr(other.m_ptr), m_incr(other.m_incr)\n  {}\n\n  pointer_based_stl_iterator& operator=(const non_const_iterator& other)\n  {\n    m_ptr = other.m_ptr;\n    m_incr.setValue(other.m_incr);\n    return *this;\n  }\n\n  reference operator*()         const { return *m_ptr;   }\n  reference operator[](Index i) const { return *(m_ptr+i*m_incr.value()); }\n  pointer   operator->()        const { return m_ptr;    }\n\n  pointer_based_stl_iterator& operator++() { m_ptr += m_incr.value(); return *this; }\n  pointer_based_stl_iterator& operator--() { m_ptr -= m_incr.value(); return *this; }\n\n  pointer_based_stl_iterator operator++(int) { pointer_based_stl_iterator prev(*this); operator++(); return prev;}\n  pointer_based_stl_iterator operator--(int) { pointer_based_stl_iterator prev(*this); operator--(); return prev;}\n\n  friend pointer_based_stl_iterator operator+(const pointer_based_stl_iterator& a, Index b) { pointer_based_stl_iterator ret(a); ret += b; return ret; }\n  friend pointer_based_stl_iterator operator-(const pointer_based_stl_iterator& a, Index b) { pointer_based_stl_iterator ret(a); ret -= b; return ret; }\n  friend pointer_based_stl_iterator operator+(Index a, const pointer_based_stl_iterator& b) { pointer_based_stl_iterator ret(b); ret += a; return ret; }\n  friend pointer_based_stl_iterator operator-(Index a, const pointer_based_stl_iterator& b) { pointer_based_stl_iterator ret(b); ret -= a; return ret; }\n  \n  pointer_based_stl_iterator& operator+=(Index b) { m_ptr += b*m_incr.value(); return *this; }\n  pointer_based_stl_iterator& operator-=(Index b) { m_ptr -= b*m_incr.value(); return *this; }\n\n  difference_type operator-(const pointer_based_stl_iterator& other) const {\n    return (m_ptr - other.m_ptr)/m_incr.value();\n  }\n\n  difference_type operator-(const other_iterator& other) const {\n    return (m_ptr - other.m_ptr)/m_incr.value();\n  }\n\n  bool operator==(const pointer_based_stl_iterator& other) const { return m_ptr == other.m_ptr; }\n  bool operator!=(const pointer_based_stl_iterator& other) const { return m_ptr != other.m_ptr; }\n  bool operator< (const pointer_based_stl_iterator& other) const { return m_ptr <  other.m_ptr; }\n  bool operator<=(const pointer_based_stl_iterator& other) const { return m_ptr <= other.m_ptr; }\n  bool operator> (const pointer_based_stl_iterator& other) const { return m_ptr >  other.m_ptr; }\n  bool operator>=(const pointer_based_stl_iterator& other) const { return m_ptr >= other.m_ptr; }\n\n  bool operator==(const other_iterator& other) const { return m_ptr == other.m_ptr; }\n  bool operator!=(const other_iterator& other) const { return m_ptr != other.m_ptr; }\n  bool operator< (const other_iterator& other) const { return m_ptr <  other.m_ptr; }\n  bool operator<=(const other_iterator& other) const { return m_ptr <= other.m_ptr; }\n  bool operator> (const other_iterator& other) const { return m_ptr >  other.m_ptr; }\n  bool operator>=(const other_iterator& other) const { return m_ptr >= other.m_ptr; }\n\nprotected:\n\n  pointer m_ptr;\n  internal::variable_if_dynamic<Index, XprType::InnerStrideAtCompileTime> m_incr;\n};\n\ntemplate<typename _XprType>\nstruct indexed_based_stl_iterator_traits<generic_randaccess_stl_iterator<_XprType> >\n{\n  typedef _XprType XprType;\n  typedef generic_randaccess_stl_iterator<typename internal::remove_const<XprType>::type> non_const_iterator;\n  typedef generic_randaccess_stl_iterator<typename internal::add_const<XprType>::type> const_iterator;\n};\n\ntemplate<typename XprType>\nclass generic_randaccess_stl_iterator : public indexed_based_stl_iterator_base<generic_randaccess_stl_iterator<XprType> >\n{\npublic:\n  typedef typename XprType::Scalar value_type;\n\nprotected:\n\n  enum {\n    has_direct_access = (internal::traits<XprType>::Flags & DirectAccessBit) ? 1 : 0,\n    is_lvalue  = internal::is_lvalue<XprType>::value\n  };\n\n  typedef indexed_based_stl_iterator_base<generic_randaccess_stl_iterator> Base;\n  using Base::m_index;\n  using Base::mp_xpr;\n\n  // TODO currently const Transpose/Reshape expressions never returns const references,\n  // so lets return by value too.\n  //typedef typename internal::conditional<bool(has_direct_access), const value_type&, const value_type>::type read_only_ref_t;\n  typedef const value_type read_only_ref_t;\n\npublic:\n  \n  typedef typename internal::conditional<bool(is_lvalue), value_type *, const value_type *>::type pointer;\n  typedef typename internal::conditional<bool(is_lvalue), value_type&, read_only_ref_t>::type reference;\n  \n  generic_randaccess_stl_iterator() : Base() {}\n  generic_randaccess_stl_iterator(XprType& xpr, Index index) : Base(xpr,index) {}\n  generic_randaccess_stl_iterator(const typename Base::non_const_iterator& other) : Base(other) {}\n  using Base::operator=;\n\n  reference operator*()         const { return   (*mp_xpr)(m_index);   }\n  reference operator[](Index i) const { return   (*mp_xpr)(m_index+i); }\n  pointer   operator->()        const { return &((*mp_xpr)(m_index)); }\n};\n\ntemplate<typename _XprType, DirectionType Direction>\nstruct indexed_based_stl_iterator_traits<subvector_stl_iterator<_XprType,Direction> >\n{\n  typedef _XprType XprType;\n  typedef subvector_stl_iterator<typename internal::remove_const<XprType>::type, Direction> non_const_iterator;\n  typedef subvector_stl_iterator<typename internal::add_const<XprType>::type, Direction> const_iterator;\n};\n\ntemplate<typename XprType, DirectionType Direction>\nclass subvector_stl_iterator : public indexed_based_stl_iterator_base<subvector_stl_iterator<XprType,Direction> >\n{\nprotected:\n\n  enum { is_lvalue  = internal::is_lvalue<XprType>::value };\n\n  typedef indexed_based_stl_iterator_base<subvector_stl_iterator> Base;\n  using Base::m_index;\n  using Base::mp_xpr;\n\n  typedef typename internal::conditional<Direction==Vertical,typename XprType::ColXpr,typename XprType::RowXpr>::type SubVectorType;\n  typedef typename internal::conditional<Direction==Vertical,typename XprType::ConstColXpr,typename XprType::ConstRowXpr>::type ConstSubVectorType;\n\n\npublic:\n  typedef typename internal::conditional<bool(is_lvalue), SubVectorType, ConstSubVectorType>::type reference;\n  typedef typename reference::PlainObject value_type;\n\nprivate:\n  class subvector_stl_iterator_ptr\n  {\n  public:\n      subvector_stl_iterator_ptr(const reference &subvector) : m_subvector(subvector) {}\n      reference* operator->() { return &m_subvector; }\n  private:\n      reference m_subvector;\n  };\npublic:\n\n  typedef subvector_stl_iterator_ptr pointer;\n  \n  subvector_stl_iterator() : Base() {}\n  subvector_stl_iterator(XprType& xpr, Index index) : Base(xpr,index) {}\n\n  reference operator*()         const { return (*mp_xpr).template subVector<Direction>(m_index); }\n  reference operator[](Index i) const { return (*mp_xpr).template subVector<Direction>(m_index+i); }\n  pointer   operator->()        const { return (*mp_xpr).template subVector<Direction>(m_index); }\n};\n\n} // namespace internal\n\n\n/** returns an iterator to the first element of the 1D vector or array\n  * \\only_for_vectors\n  * \\sa end(), cbegin()\n  */\ntemplate<typename Derived>\ninline typename DenseBase<Derived>::iterator DenseBase<Derived>::begin()\n{\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived);\n  return iterator(derived(), 0);\n}\n\n/** const version of begin() */\ntemplate<typename Derived>\ninline typename DenseBase<Derived>::const_iterator DenseBase<Derived>::begin() const\n{\n  return cbegin();\n}\n\n/** returns a read-only const_iterator to the first element of the 1D vector or array\n  * \\only_for_vectors\n  * \\sa cend(), begin()\n  */\ntemplate<typename Derived>\ninline typename DenseBase<Derived>::const_iterator DenseBase<Derived>::cbegin() const\n{\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived);\n  return const_iterator(derived(), 0);\n}\n\n/** returns an iterator to the element following the last element of the 1D vector or array\n  * \\only_for_vectors\n  * \\sa begin(), cend()\n  */\ntemplate<typename Derived>\ninline typename DenseBase<Derived>::iterator DenseBase<Derived>::end()\n{\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived);\n  return iterator(derived(), size());\n}\n\n/** const version of end() */\ntemplate<typename Derived>\ninline typename DenseBase<Derived>::const_iterator DenseBase<Derived>::end() const\n{\n  return cend();\n}\n\n/** returns a read-only const_iterator to the element following the last element of the 1D vector or array\n  * \\only_for_vectors\n  * \\sa begin(), cend()\n  */\ntemplate<typename Derived>\ninline typename DenseBase<Derived>::const_iterator DenseBase<Derived>::cend() const\n{\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived);\n  return const_iterator(derived(), size());\n}\n\n} // namespace Eigen\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/Stride.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_STRIDE_H\n#define EIGEN_STRIDE_H\n\nnamespace Eigen { \n\n/** \\class Stride\n  * \\ingroup Core_Module\n  *\n  * \\brief Holds strides information for Map\n  *\n  * This class holds the strides information for mapping arrays with strides with class Map.\n  *\n  * It holds two values: the inner stride and the outer stride.\n  *\n  * The inner stride is the pointer increment between two consecutive entries within a given row of a\n  * row-major matrix or within a given column of a column-major matrix.\n  *\n  * The outer stride is the pointer increment between two consecutive rows of a row-major matrix or\n  * between two consecutive columns of a column-major matrix.\n  *\n  * These two values can be passed either at compile-time as template parameters, or at runtime as\n  * arguments to the constructor.\n  *\n  * Indeed, this class takes two template parameters:\n  *  \\tparam _OuterStrideAtCompileTime the outer stride, or Dynamic if you want to specify it at runtime.\n  *  \\tparam _InnerStrideAtCompileTime the inner stride, or Dynamic if you want to specify it at runtime.\n  *\n  * Here is an example:\n  * \\include Map_general_stride.cpp\n  * Output: \\verbinclude Map_general_stride.out\n  *\n  * \\sa class InnerStride, class OuterStride, \\ref TopicStorageOrders\n  */\ntemplate<int _OuterStrideAtCompileTime, int _InnerStrideAtCompileTime>\nclass Stride\n{\n  public:\n    typedef Eigen::Index Index; ///< \\deprecated since Eigen 3.3\n    enum {\n      InnerStrideAtCompileTime = _InnerStrideAtCompileTime,\n      OuterStrideAtCompileTime = _OuterStrideAtCompileTime\n    };\n\n    /** Default constructor, for use when strides are fixed at compile time */\n    EIGEN_DEVICE_FUNC\n    Stride()\n      : m_outer(OuterStrideAtCompileTime), m_inner(InnerStrideAtCompileTime)\n    {\n      eigen_assert(InnerStrideAtCompileTime != Dynamic && OuterStrideAtCompileTime != Dynamic);\n    }\n\n    /** Constructor allowing to pass the strides at runtime */\n    EIGEN_DEVICE_FUNC\n    Stride(Index outerStride, Index innerStride)\n      : m_outer(outerStride), m_inner(innerStride)\n    {\n      eigen_assert(innerStride>=0 && outerStride>=0);\n    }\n\n    /** Copy constructor */\n    EIGEN_DEVICE_FUNC\n    Stride(const Stride& other)\n      : m_outer(other.outer()), m_inner(other.inner())\n    {}\n\n    /** \\returns the outer stride */\n    EIGEN_DEVICE_FUNC\n    inline Index outer() const { return m_outer.value(); }\n    /** \\returns the inner stride */\n    EIGEN_DEVICE_FUNC\n    inline Index inner() const { return m_inner.value(); }\n\n  protected:\n    internal::variable_if_dynamic<Index, OuterStrideAtCompileTime> m_outer;\n    internal::variable_if_dynamic<Index, InnerStrideAtCompileTime> m_inner;\n};\n\n/** \\brief Convenience specialization of Stride to specify only an inner stride\n  * See class Map for some examples */\ntemplate<int Value>\nclass InnerStride : public Stride<0, Value>\n{\n    typedef Stride<0, Value> Base;\n  public:\n    EIGEN_DEVICE_FUNC InnerStride() : Base() {}\n    EIGEN_DEVICE_FUNC InnerStride(Index v) : Base(0, v) {} // FIXME making this explicit could break valid code\n};\n\n/** \\brief Convenience specialization of Stride to specify only an outer stride\n  * See class Map for some examples */\ntemplate<int Value>\nclass OuterStride : public Stride<Value, 0>\n{\n    typedef Stride<Value, 0> Base;\n  public:\n    EIGEN_DEVICE_FUNC OuterStride() : Base() {}\n    EIGEN_DEVICE_FUNC OuterStride(Index v) : Base(v,0) {} // FIXME making this explicit could break valid code\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_STRIDE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/Swap.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SWAP_H\n#define EIGEN_SWAP_H\n\nnamespace Eigen { \n\nnamespace internal {\n\n// Overload default assignPacket behavior for swapping them\ntemplate<typename DstEvaluatorTypeT, typename SrcEvaluatorTypeT>\nclass generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, swap_assign_op<typename DstEvaluatorTypeT::Scalar>, Specialized>\n : public generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, swap_assign_op<typename DstEvaluatorTypeT::Scalar>, BuiltIn>\n{\nprotected:\n  typedef generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, swap_assign_op<typename DstEvaluatorTypeT::Scalar>, BuiltIn> Base;\n  using Base::m_dst;\n  using Base::m_src;\n  using Base::m_functor;\n  \npublic:\n  typedef typename Base::Scalar Scalar;\n  typedef typename Base::DstXprType DstXprType;\n  typedef swap_assign_op<Scalar> Functor;\n  \n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  generic_dense_assignment_kernel(DstEvaluatorTypeT &dst, const SrcEvaluatorTypeT &src, const Functor &func, DstXprType& dstExpr)\n    : Base(dst, src, func, dstExpr)\n  {}\n  \n  template<int StoreMode, int LoadMode, typename PacketType>\n  EIGEN_STRONG_INLINE void assignPacket(Index row, Index col)\n  {\n    PacketType tmp = m_src.template packet<LoadMode,PacketType>(row,col);\n    const_cast<SrcEvaluatorTypeT&>(m_src).template writePacket<LoadMode>(row,col, m_dst.template packet<StoreMode,PacketType>(row,col));\n    m_dst.template writePacket<StoreMode>(row,col,tmp);\n  }\n  \n  template<int StoreMode, int LoadMode, typename PacketType>\n  EIGEN_STRONG_INLINE void assignPacket(Index index)\n  {\n    PacketType tmp = m_src.template packet<LoadMode,PacketType>(index);\n    const_cast<SrcEvaluatorTypeT&>(m_src).template writePacket<LoadMode>(index, m_dst.template packet<StoreMode,PacketType>(index));\n    m_dst.template writePacket<StoreMode>(index,tmp);\n  }\n  \n  // TODO find a simple way not to have to copy/paste this function from generic_dense_assignment_kernel, by simple I mean no CRTP (Gael)\n  template<int StoreMode, int LoadMode, typename PacketType>\n  EIGEN_STRONG_INLINE void assignPacketByOuterInner(Index outer, Index inner)\n  {\n    Index row = Base::rowIndexByOuterInner(outer, inner); \n    Index col = Base::colIndexByOuterInner(outer, inner);\n    assignPacket<StoreMode,LoadMode,PacketType>(row, col);\n  }\n};\n\n} // namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_SWAP_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/Transpose.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2009-2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_TRANSPOSE_H\n#define EIGEN_TRANSPOSE_H\n\nnamespace Eigen { \n\nnamespace internal {\ntemplate<typename MatrixType>\nstruct traits<Transpose<MatrixType> > : public traits<MatrixType>\n{\n  typedef typename ref_selector<MatrixType>::type MatrixTypeNested;\n  typedef typename remove_reference<MatrixTypeNested>::type MatrixTypeNestedPlain;\n  enum {\n    RowsAtCompileTime = MatrixType::ColsAtCompileTime,\n    ColsAtCompileTime = MatrixType::RowsAtCompileTime,\n    MaxRowsAtCompileTime = MatrixType::MaxColsAtCompileTime,\n    MaxColsAtCompileTime = MatrixType::MaxRowsAtCompileTime,\n    FlagsLvalueBit = is_lvalue<MatrixType>::value ? LvalueBit : 0,\n    Flags0 = traits<MatrixTypeNestedPlain>::Flags & ~(LvalueBit | NestByRefBit),\n    Flags1 = Flags0 | FlagsLvalueBit,\n    Flags = Flags1 ^ RowMajorBit,\n    InnerStrideAtCompileTime = inner_stride_at_compile_time<MatrixType>::ret,\n    OuterStrideAtCompileTime = outer_stride_at_compile_time<MatrixType>::ret\n  };\n};\n}\n\ntemplate<typename MatrixType, typename StorageKind> class TransposeImpl;\n\n/** \\class Transpose\n  * \\ingroup Core_Module\n  *\n  * \\brief Expression of the transpose of a matrix\n  *\n  * \\tparam MatrixType the type of the object of which we are taking the transpose\n  *\n  * This class represents an expression of the transpose of a matrix.\n  * It is the return type of MatrixBase::transpose() and MatrixBase::adjoint()\n  * and most of the time this is the only way it is used.\n  *\n  * \\sa MatrixBase::transpose(), MatrixBase::adjoint()\n  */\ntemplate<typename MatrixType> class Transpose\n  : public TransposeImpl<MatrixType,typename internal::traits<MatrixType>::StorageKind>\n{\n  public:\n\n    typedef typename internal::ref_selector<MatrixType>::non_const_type MatrixTypeNested;\n\n    typedef typename TransposeImpl<MatrixType,typename internal::traits<MatrixType>::StorageKind>::Base Base;\n    EIGEN_GENERIC_PUBLIC_INTERFACE(Transpose)\n    typedef typename internal::remove_all<MatrixType>::type NestedExpression;\n\n    EIGEN_DEVICE_FUNC\n    explicit EIGEN_STRONG_INLINE Transpose(MatrixType& matrix) : m_matrix(matrix) {}\n\n    EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Transpose)\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Index rows() const { return m_matrix.cols(); }\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Index cols() const { return m_matrix.rows(); }\n\n    /** \\returns the nested expression */\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const typename internal::remove_all<MatrixTypeNested>::type&\n    nestedExpression() const { return m_matrix; }\n\n    /** \\returns the nested expression */\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    typename internal::remove_reference<MatrixTypeNested>::type&\n    nestedExpression() { return m_matrix; }\n\n    /** \\internal */\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    void resize(Index nrows, Index ncols) {\n      m_matrix.resize(ncols,nrows);\n    }\n\n  protected:\n    typename internal::ref_selector<MatrixType>::non_const_type m_matrix;\n};\n\nnamespace internal {\n\ntemplate<typename MatrixType, bool HasDirectAccess = has_direct_access<MatrixType>::ret>\nstruct TransposeImpl_base\n{\n  typedef typename dense_xpr_base<Transpose<MatrixType> >::type type;\n};\n\ntemplate<typename MatrixType>\nstruct TransposeImpl_base<MatrixType, false>\n{\n  typedef typename dense_xpr_base<Transpose<MatrixType> >::type type;\n};\n\n} // end namespace internal\n\n// Generic API dispatcher\ntemplate<typename XprType, typename StorageKind>\nclass TransposeImpl\n  : public internal::generic_xpr_base<Transpose<XprType> >::type\n{\npublic:\n  typedef typename internal::generic_xpr_base<Transpose<XprType> >::type Base;\n};\n\ntemplate<typename MatrixType> class TransposeImpl<MatrixType,Dense>\n  : public internal::TransposeImpl_base<MatrixType>::type\n{\n  public:\n\n    typedef typename internal::TransposeImpl_base<MatrixType>::type Base;\n    using Base::coeffRef;\n    EIGEN_DENSE_PUBLIC_INTERFACE(Transpose<MatrixType>)\n    EIGEN_INHERIT_ASSIGNMENT_OPERATORS(TransposeImpl)\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Index innerStride() const { return derived().nestedExpression().innerStride(); }\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Index outerStride() const { return derived().nestedExpression().outerStride(); }\n\n    typedef typename internal::conditional<\n                       internal::is_lvalue<MatrixType>::value,\n                       Scalar,\n                       const Scalar\n                     >::type ScalarWithConstIfNotLvalue;\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    ScalarWithConstIfNotLvalue* data() { return derived().nestedExpression().data(); }\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const Scalar* data() const { return derived().nestedExpression().data(); }\n\n    // FIXME: shall we keep the const version of coeffRef?\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const Scalar& coeffRef(Index rowId, Index colId) const\n    {\n      return derived().nestedExpression().coeffRef(colId, rowId);\n    }\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const Scalar& coeffRef(Index index) const\n    {\n      return derived().nestedExpression().coeffRef(index);\n    }\n  protected:\n    EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(TransposeImpl)\n};\n\n/** \\returns an expression of the transpose of *this.\n  *\n  * Example: \\include MatrixBase_transpose.cpp\n  * Output: \\verbinclude MatrixBase_transpose.out\n  *\n  * \\warning If you want to replace a matrix by its own transpose, do \\b NOT do this:\n  * \\code\n  * m = m.transpose(); // bug!!! caused by aliasing effect\n  * \\endcode\n  * Instead, use the transposeInPlace() method:\n  * \\code\n  * m.transposeInPlace();\n  * \\endcode\n  * which gives Eigen good opportunities for optimization, or alternatively you can also do:\n  * \\code\n  * m = m.transpose().eval();\n  * \\endcode\n  *\n  * \\sa transposeInPlace(), adjoint() */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nTranspose<Derived>\nDenseBase<Derived>::transpose()\n{\n  return TransposeReturnType(derived());\n}\n\n/** This is the const version of transpose().\n  *\n  * Make sure you read the warning for transpose() !\n  *\n  * \\sa transposeInPlace(), adjoint() */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ntypename DenseBase<Derived>::ConstTransposeReturnType\nDenseBase<Derived>::transpose() const\n{\n  return ConstTransposeReturnType(derived());\n}\n\n/** \\returns an expression of the adjoint (i.e. conjugate transpose) of *this.\n  *\n  * Example: \\include MatrixBase_adjoint.cpp\n  * Output: \\verbinclude MatrixBase_adjoint.out\n  *\n  * \\warning If you want to replace a matrix by its own adjoint, do \\b NOT do this:\n  * \\code\n  * m = m.adjoint(); // bug!!! caused by aliasing effect\n  * \\endcode\n  * Instead, use the adjointInPlace() method:\n  * \\code\n  * m.adjointInPlace();\n  * \\endcode\n  * which gives Eigen good opportunities for optimization, or alternatively you can also do:\n  * \\code\n  * m = m.adjoint().eval();\n  * \\endcode\n  *\n  * \\sa adjointInPlace(), transpose(), conjugate(), class Transpose, class internal::scalar_conjugate_op */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC inline const typename MatrixBase<Derived>::AdjointReturnType\nMatrixBase<Derived>::adjoint() const\n{\n  return AdjointReturnType(this->transpose());\n}\n\n/***************************************************************************\n* \"in place\" transpose implementation\n***************************************************************************/\n\nnamespace internal {\n\ntemplate<typename MatrixType,\n  bool IsSquare = (MatrixType::RowsAtCompileTime == MatrixType::ColsAtCompileTime) && MatrixType::RowsAtCompileTime!=Dynamic,\n  bool MatchPacketSize =\n        (int(MatrixType::RowsAtCompileTime) == int(internal::packet_traits<typename MatrixType::Scalar>::size))\n    &&  (internal::evaluator<MatrixType>::Flags&PacketAccessBit) >\nstruct inplace_transpose_selector;\n\ntemplate<typename MatrixType>\nstruct inplace_transpose_selector<MatrixType,true,false> { // square matrix\n  static void run(MatrixType& m) {\n    m.matrix().template triangularView<StrictlyUpper>().swap(m.matrix().transpose().template triangularView<StrictlyUpper>());\n  }\n};\n\n// TODO: vectorized path is currently limited to LargestPacketSize x LargestPacketSize cases only.\ntemplate<typename MatrixType>\nstruct inplace_transpose_selector<MatrixType,true,true> { // PacketSize x PacketSize\n  static void run(MatrixType& m) {\n    typedef typename MatrixType::Scalar Scalar;\n    typedef typename internal::packet_traits<typename MatrixType::Scalar>::type Packet;\n    const Index PacketSize = internal::packet_traits<Scalar>::size;\n    const Index Alignment = internal::evaluator<MatrixType>::Alignment;\n    PacketBlock<Packet> A;\n    for (Index i=0; i<PacketSize; ++i)\n      A.packet[i] = m.template packetByOuterInner<Alignment>(i,0);\n    internal::ptranspose(A);\n    for (Index i=0; i<PacketSize; ++i)\n      m.template writePacket<Alignment>(m.rowIndexByOuterInner(i,0), m.colIndexByOuterInner(i,0), A.packet[i]);\n  }\n};\n\ntemplate<typename MatrixType,bool MatchPacketSize>\nstruct inplace_transpose_selector<MatrixType,false,MatchPacketSize> { // non square matrix\n  static void run(MatrixType& m) {\n    if (m.rows()==m.cols())\n      m.matrix().template triangularView<StrictlyUpper>().swap(m.matrix().transpose().template triangularView<StrictlyUpper>());\n    else\n      m = m.transpose().eval();\n  }\n};\n\n} // end namespace internal\n\n/** This is the \"in place\" version of transpose(): it replaces \\c *this by its own transpose.\n  * Thus, doing\n  * \\code\n  * m.transposeInPlace();\n  * \\endcode\n  * has the same effect on m as doing\n  * \\code\n  * m = m.transpose().eval();\n  * \\endcode\n  * and is faster and also safer because in the latter line of code, forgetting the eval() results\n  * in a bug caused by \\ref TopicAliasing \"aliasing\".\n  *\n  * Notice however that this method is only useful if you want to replace a matrix by its own transpose.\n  * If you just need the transpose of a matrix, use transpose().\n  *\n  * \\note if the matrix is not square, then \\c *this must be a resizable matrix. \n  * This excludes (non-square) fixed-size matrices, block-expressions and maps.\n  *\n  * \\sa transpose(), adjoint(), adjointInPlace() */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC inline void DenseBase<Derived>::transposeInPlace()\n{\n  eigen_assert((rows() == cols() || (RowsAtCompileTime == Dynamic && ColsAtCompileTime == Dynamic))\n               && \"transposeInPlace() called on a non-square non-resizable matrix\");\n  internal::inplace_transpose_selector<Derived>::run(derived());\n}\n\n/***************************************************************************\n* \"in place\" adjoint implementation\n***************************************************************************/\n\n/** This is the \"in place\" version of adjoint(): it replaces \\c *this by its own transpose.\n  * Thus, doing\n  * \\code\n  * m.adjointInPlace();\n  * \\endcode\n  * has the same effect on m as doing\n  * \\code\n  * m = m.adjoint().eval();\n  * \\endcode\n  * and is faster and also safer because in the latter line of code, forgetting the eval() results\n  * in a bug caused by aliasing.\n  *\n  * Notice however that this method is only useful if you want to replace a matrix by its own adjoint.\n  * If you just need the adjoint of a matrix, use adjoint().\n  *\n  * \\note if the matrix is not square, then \\c *this must be a resizable matrix.\n  * This excludes (non-square) fixed-size matrices, block-expressions and maps.\n  *\n  * \\sa transpose(), adjoint(), transposeInPlace() */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC inline void MatrixBase<Derived>::adjointInPlace()\n{\n  derived() = adjoint().eval();\n}\n\n#ifndef EIGEN_NO_DEBUG\n\n// The following is to detect aliasing problems in most common cases.\n\nnamespace internal {\n\ntemplate<bool DestIsTransposed, typename OtherDerived>\nstruct check_transpose_aliasing_compile_time_selector\n{\n  enum { ret = bool(blas_traits<OtherDerived>::IsTransposed) != DestIsTransposed };\n};\n\ntemplate<bool DestIsTransposed, typename BinOp, typename DerivedA, typename DerivedB>\nstruct check_transpose_aliasing_compile_time_selector<DestIsTransposed,CwiseBinaryOp<BinOp,DerivedA,DerivedB> >\n{\n  enum { ret =    bool(blas_traits<DerivedA>::IsTransposed) != DestIsTransposed\n               || bool(blas_traits<DerivedB>::IsTransposed) != DestIsTransposed\n  };\n};\n\ntemplate<typename Scalar, bool DestIsTransposed, typename OtherDerived>\nstruct check_transpose_aliasing_run_time_selector\n{\n  static bool run(const Scalar* dest, const OtherDerived& src)\n  {\n    return (bool(blas_traits<OtherDerived>::IsTransposed) != DestIsTransposed) && (dest!=0 && dest==(const Scalar*)extract_data(src));\n  }\n};\n\ntemplate<typename Scalar, bool DestIsTransposed, typename BinOp, typename DerivedA, typename DerivedB>\nstruct check_transpose_aliasing_run_time_selector<Scalar,DestIsTransposed,CwiseBinaryOp<BinOp,DerivedA,DerivedB> >\n{\n  static bool run(const Scalar* dest, const CwiseBinaryOp<BinOp,DerivedA,DerivedB>& src)\n  {\n    return ((blas_traits<DerivedA>::IsTransposed != DestIsTransposed) && (dest!=0 && dest==(const Scalar*)extract_data(src.lhs())))\n        || ((blas_traits<DerivedB>::IsTransposed != DestIsTransposed) && (dest!=0 && dest==(const Scalar*)extract_data(src.rhs())));\n  }\n};\n\n// the following selector, checkTransposeAliasing_impl, based on MightHaveTransposeAliasing,\n// is because when the condition controlling the assert is known at compile time, ICC emits a warning.\n// This is actually a good warning: in expressions that don't have any transposing, the condition is\n// known at compile time to be false, and using that, we can avoid generating the code of the assert again\n// and again for all these expressions that don't need it.\n\ntemplate<typename Derived, typename OtherDerived,\n         bool MightHaveTransposeAliasing\n                 = check_transpose_aliasing_compile_time_selector\n                     <blas_traits<Derived>::IsTransposed,OtherDerived>::ret\n        >\nstruct checkTransposeAliasing_impl\n{\n    static void run(const Derived& dst, const OtherDerived& other)\n    {\n        eigen_assert((!check_transpose_aliasing_run_time_selector\n                      <typename Derived::Scalar,blas_traits<Derived>::IsTransposed,OtherDerived>\n                      ::run(extract_data(dst), other))\n          && \"aliasing detected during transposition, use transposeInPlace() \"\n             \"or evaluate the rhs into a temporary using .eval()\");\n\n    }\n};\n\ntemplate<typename Derived, typename OtherDerived>\nstruct checkTransposeAliasing_impl<Derived, OtherDerived, false>\n{\n    static void run(const Derived&, const OtherDerived&)\n    {\n    }\n};\n\ntemplate<typename Dst, typename Src>\nvoid check_for_aliasing(const Dst &dst, const Src &src)\n{\n  if((!Dst::IsVectorAtCompileTime) && dst.rows()>1 && dst.cols()>1)\n    internal::checkTransposeAliasing_impl<Dst, Src>::run(dst, src);\n}\n\n} // end namespace internal\n\n#endif // EIGEN_NO_DEBUG\n\n} // end namespace Eigen\n\n#endif // EIGEN_TRANSPOSE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/Transpositions.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010-2011 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_TRANSPOSITIONS_H\n#define EIGEN_TRANSPOSITIONS_H\n\nnamespace Eigen { \n\ntemplate<typename Derived>\nclass TranspositionsBase\n{\n    typedef internal::traits<Derived> Traits;\n    \n  public:\n\n    typedef typename Traits::IndicesType IndicesType;\n    typedef typename IndicesType::Scalar StorageIndex;\n    typedef Eigen::Index Index; ///< \\deprecated since Eigen 3.3\n\n    Derived& derived() { return *static_cast<Derived*>(this); }\n    const Derived& derived() const { return *static_cast<const Derived*>(this); }\n\n    /** Copies the \\a other transpositions into \\c *this */\n    template<typename OtherDerived>\n    Derived& operator=(const TranspositionsBase<OtherDerived>& other)\n    {\n      indices() = other.indices();\n      return derived();\n    }\n\n    /** \\returns the number of transpositions */\n    Index size() const { return indices().size(); }\n    /** \\returns the number of rows of the equivalent permutation matrix */\n    Index rows() const { return indices().size(); }\n    /** \\returns the number of columns of the equivalent permutation matrix */\n    Index cols() const { return indices().size(); }\n\n    /** Direct access to the underlying index vector */\n    inline const StorageIndex& coeff(Index i) const { return indices().coeff(i); }\n    /** Direct access to the underlying index vector */\n    inline StorageIndex& coeffRef(Index i) { return indices().coeffRef(i); }\n    /** Direct access to the underlying index vector */\n    inline const StorageIndex& operator()(Index i) const { return indices()(i); }\n    /** Direct access to the underlying index vector */\n    inline StorageIndex& operator()(Index i) { return indices()(i); }\n    /** Direct access to the underlying index vector */\n    inline const StorageIndex& operator[](Index i) const { return indices()(i); }\n    /** Direct access to the underlying index vector */\n    inline StorageIndex& operator[](Index i) { return indices()(i); }\n\n    /** const version of indices(). */\n    const IndicesType& indices() const { return derived().indices(); }\n    /** \\returns a reference to the stored array representing the transpositions. */\n    IndicesType& indices() { return derived().indices(); }\n\n    /** Resizes to given size. */\n    inline void resize(Index newSize)\n    {\n      indices().resize(newSize);\n    }\n\n    /** Sets \\c *this to represents an identity transformation */\n    void setIdentity()\n    {\n      for(StorageIndex i = 0; i < indices().size(); ++i)\n        coeffRef(i) = i;\n    }\n\n    // FIXME: do we want such methods ?\n    // might be useful when the target matrix expression is complex, e.g.:\n    // object.matrix().block(..,..,..,..) = trans * object.matrix().block(..,..,..,..);\n    /*\n    template<typename MatrixType>\n    void applyForwardToRows(MatrixType& mat) const\n    {\n      for(Index k=0 ; k<size() ; ++k)\n        if(m_indices(k)!=k)\n          mat.row(k).swap(mat.row(m_indices(k)));\n    }\n\n    template<typename MatrixType>\n    void applyBackwardToRows(MatrixType& mat) const\n    {\n      for(Index k=size()-1 ; k>=0 ; --k)\n        if(m_indices(k)!=k)\n          mat.row(k).swap(mat.row(m_indices(k)));\n    }\n    */\n\n    /** \\returns the inverse transformation */\n    inline Transpose<TranspositionsBase> inverse() const\n    { return Transpose<TranspositionsBase>(derived()); }\n\n    /** \\returns the tranpose transformation */\n    inline Transpose<TranspositionsBase> transpose() const\n    { return Transpose<TranspositionsBase>(derived()); }\n\n  protected:\n};\n\nnamespace internal {\ntemplate<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex>\nstruct traits<Transpositions<SizeAtCompileTime,MaxSizeAtCompileTime,_StorageIndex> >\n : traits<PermutationMatrix<SizeAtCompileTime,MaxSizeAtCompileTime,_StorageIndex> >\n{\n  typedef Matrix<_StorageIndex, SizeAtCompileTime, 1, 0, MaxSizeAtCompileTime, 1> IndicesType;\n  typedef TranspositionsStorage StorageKind;\n};\n}\n\n/** \\class Transpositions\n  * \\ingroup Core_Module\n  *\n  * \\brief Represents a sequence of transpositions (row/column interchange)\n  *\n  * \\tparam SizeAtCompileTime the number of transpositions, or Dynamic\n  * \\tparam MaxSizeAtCompileTime the maximum number of transpositions, or Dynamic. This optional parameter defaults to SizeAtCompileTime. Most of the time, you should not have to specify it.\n  *\n  * This class represents a permutation transformation as a sequence of \\em n transpositions\n  * \\f$[T_{n-1} \\ldots T_{i} \\ldots T_{0}]\\f$. It is internally stored as a vector of integers \\c indices.\n  * Each transposition \\f$ T_{i} \\f$ applied on the left of a matrix (\\f$ T_{i} M\\f$) interchanges\n  * the rows \\c i and \\c indices[i] of the matrix \\c M.\n  * A transposition applied on the right (e.g., \\f$ M T_{i}\\f$) yields a column interchange.\n  *\n  * Compared to the class PermutationMatrix, such a sequence of transpositions is what is\n  * computed during a decomposition with pivoting, and it is faster when applying the permutation in-place.\n  *\n  * To apply a sequence of transpositions to a matrix, simply use the operator * as in the following example:\n  * \\code\n  * Transpositions tr;\n  * MatrixXf mat;\n  * mat = tr * mat;\n  * \\endcode\n  * In this example, we detect that the matrix appears on both side, and so the transpositions\n  * are applied in-place without any temporary or extra copy.\n  *\n  * \\sa class PermutationMatrix\n  */\n\ntemplate<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex>\nclass Transpositions : public TranspositionsBase<Transpositions<SizeAtCompileTime,MaxSizeAtCompileTime,_StorageIndex> >\n{\n    typedef internal::traits<Transpositions> Traits;\n  public:\n\n    typedef TranspositionsBase<Transpositions> Base;\n    typedef typename Traits::IndicesType IndicesType;\n    typedef typename IndicesType::Scalar StorageIndex;\n\n    inline Transpositions() {}\n\n    /** Copy constructor. */\n    template<typename OtherDerived>\n    inline Transpositions(const TranspositionsBase<OtherDerived>& other)\n      : m_indices(other.indices()) {}\n\n    /** Generic constructor from expression of the transposition indices. */\n    template<typename Other>\n    explicit inline Transpositions(const MatrixBase<Other>& indices) : m_indices(indices)\n    {}\n\n    /** Copies the \\a other transpositions into \\c *this */\n    template<typename OtherDerived>\n    Transpositions& operator=(const TranspositionsBase<OtherDerived>& other)\n    {\n      return Base::operator=(other);\n    }\n\n    /** Constructs an uninitialized permutation matrix of given size.\n      */\n    inline Transpositions(Index size) : m_indices(size)\n    {}\n\n    /** const version of indices(). */\n    const IndicesType& indices() const { return m_indices; }\n    /** \\returns a reference to the stored array representing the transpositions. */\n    IndicesType& indices() { return m_indices; }\n\n  protected:\n\n    IndicesType m_indices;\n};\n\n\nnamespace internal {\ntemplate<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex, int _PacketAccess>\nstruct traits<Map<Transpositions<SizeAtCompileTime,MaxSizeAtCompileTime,_StorageIndex>,_PacketAccess> >\n : traits<PermutationMatrix<SizeAtCompileTime,MaxSizeAtCompileTime,_StorageIndex> >\n{\n  typedef Map<const Matrix<_StorageIndex,SizeAtCompileTime,1,0,MaxSizeAtCompileTime,1>, _PacketAccess> IndicesType;\n  typedef _StorageIndex StorageIndex;\n  typedef TranspositionsStorage StorageKind;\n};\n}\n\ntemplate<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex, int PacketAccess>\nclass Map<Transpositions<SizeAtCompileTime,MaxSizeAtCompileTime,_StorageIndex>,PacketAccess>\n : public TranspositionsBase<Map<Transpositions<SizeAtCompileTime,MaxSizeAtCompileTime,_StorageIndex>,PacketAccess> >\n{\n    typedef internal::traits<Map> Traits;\n  public:\n\n    typedef TranspositionsBase<Map> Base;\n    typedef typename Traits::IndicesType IndicesType;\n    typedef typename IndicesType::Scalar StorageIndex;\n\n    explicit inline Map(const StorageIndex* indicesPtr)\n      : m_indices(indicesPtr)\n    {}\n\n    inline Map(const StorageIndex* indicesPtr, Index size)\n      : m_indices(indicesPtr,size)\n    {}\n\n    /** Copies the \\a other transpositions into \\c *this */\n    template<typename OtherDerived>\n    Map& operator=(const TranspositionsBase<OtherDerived>& other)\n    {\n      return Base::operator=(other);\n    }\n\n    #ifndef EIGEN_PARSED_BY_DOXYGEN\n    /** This is a special case of the templated operator=. Its purpose is to\n      * prevent a default operator= from hiding the templated operator=.\n      */\n    Map& operator=(const Map& other)\n    {\n      m_indices = other.m_indices;\n      return *this;\n    }\n    #endif\n\n    /** const version of indices(). */\n    const IndicesType& indices() const { return m_indices; }\n    \n    /** \\returns a reference to the stored array representing the transpositions. */\n    IndicesType& indices() { return m_indices; }\n\n  protected:\n\n    IndicesType m_indices;\n};\n\nnamespace internal {\ntemplate<typename _IndicesType>\nstruct traits<TranspositionsWrapper<_IndicesType> >\n : traits<PermutationWrapper<_IndicesType> >\n{\n  typedef TranspositionsStorage StorageKind;\n};\n}\n\ntemplate<typename _IndicesType>\nclass TranspositionsWrapper\n : public TranspositionsBase<TranspositionsWrapper<_IndicesType> >\n{\n    typedef internal::traits<TranspositionsWrapper> Traits;\n  public:\n\n    typedef TranspositionsBase<TranspositionsWrapper> Base;\n    typedef typename Traits::IndicesType IndicesType;\n    typedef typename IndicesType::Scalar StorageIndex;\n\n    explicit inline TranspositionsWrapper(IndicesType& indices)\n      : m_indices(indices)\n    {}\n\n    /** Copies the \\a other transpositions into \\c *this */\n    template<typename OtherDerived>\n    TranspositionsWrapper& operator=(const TranspositionsBase<OtherDerived>& other)\n    {\n      return Base::operator=(other);\n    }\n\n    /** const version of indices(). */\n    const IndicesType& indices() const { return m_indices; }\n\n    /** \\returns a reference to the stored array representing the transpositions. */\n    IndicesType& indices() { return m_indices; }\n\n  protected:\n\n    typename IndicesType::Nested m_indices;\n};\n\n\n\n/** \\returns the \\a matrix with the \\a transpositions applied to the columns.\n  */\ntemplate<typename MatrixDerived, typename TranspositionsDerived>\nEIGEN_DEVICE_FUNC\nconst Product<MatrixDerived, TranspositionsDerived, AliasFreeProduct>\noperator*(const MatrixBase<MatrixDerived> &matrix,\n          const TranspositionsBase<TranspositionsDerived>& transpositions)\n{\n  return Product<MatrixDerived, TranspositionsDerived, AliasFreeProduct>\n            (matrix.derived(), transpositions.derived());\n}\n\n/** \\returns the \\a matrix with the \\a transpositions applied to the rows.\n  */\ntemplate<typename TranspositionsDerived, typename MatrixDerived>\nEIGEN_DEVICE_FUNC\nconst Product<TranspositionsDerived, MatrixDerived, AliasFreeProduct>\noperator*(const TranspositionsBase<TranspositionsDerived> &transpositions,\n          const MatrixBase<MatrixDerived>& matrix)\n{\n  return Product<TranspositionsDerived, MatrixDerived, AliasFreeProduct>\n            (transpositions.derived(), matrix.derived());\n}\n\n// Template partial specialization for transposed/inverse transpositions\n\nnamespace internal {\n\ntemplate<typename Derived>\nstruct traits<Transpose<TranspositionsBase<Derived> > >\n : traits<Derived>\n{};\n\n} // end namespace internal\n\ntemplate<typename TranspositionsDerived>\nclass Transpose<TranspositionsBase<TranspositionsDerived> >\n{\n    typedef TranspositionsDerived TranspositionType;\n    typedef typename TranspositionType::IndicesType IndicesType;\n  public:\n\n    explicit Transpose(const TranspositionType& t) : m_transpositions(t) {}\n\n    Index size() const { return m_transpositions.size(); }\n    Index rows() const { return m_transpositions.size(); }\n    Index cols() const { return m_transpositions.size(); }\n\n    /** \\returns the \\a matrix with the inverse transpositions applied to the columns.\n      */\n    template<typename OtherDerived> friend\n    const Product<OtherDerived, Transpose, AliasFreeProduct>\n    operator*(const MatrixBase<OtherDerived>& matrix, const Transpose& trt)\n    {\n      return Product<OtherDerived, Transpose, AliasFreeProduct>(matrix.derived(), trt);\n    }\n\n    /** \\returns the \\a matrix with the inverse transpositions applied to the rows.\n      */\n    template<typename OtherDerived>\n    const Product<Transpose, OtherDerived, AliasFreeProduct>\n    operator*(const MatrixBase<OtherDerived>& matrix) const\n    {\n      return Product<Transpose, OtherDerived, AliasFreeProduct>(*this, matrix.derived());\n    }\n    \n    const TranspositionType& nestedExpression() const { return m_transpositions; }\n\n  protected:\n    const TranspositionType& m_transpositions;\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_TRANSPOSITIONS_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/TriangularMatrix.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_TRIANGULARMATRIX_H\n#define EIGEN_TRIANGULARMATRIX_H\n\nnamespace Eigen { \n\nnamespace internal {\n  \ntemplate<int Side, typename TriangularType, typename Rhs> struct triangular_solve_retval;\n  \n}\n\n/** \\class TriangularBase\n  * \\ingroup Core_Module\n  *\n  * \\brief Base class for triangular part in a matrix\n  */\ntemplate<typename Derived> class TriangularBase : public EigenBase<Derived>\n{\n  public:\n\n    enum {\n      Mode = internal::traits<Derived>::Mode,\n      RowsAtCompileTime = internal::traits<Derived>::RowsAtCompileTime,\n      ColsAtCompileTime = internal::traits<Derived>::ColsAtCompileTime,\n      MaxRowsAtCompileTime = internal::traits<Derived>::MaxRowsAtCompileTime,\n      MaxColsAtCompileTime = internal::traits<Derived>::MaxColsAtCompileTime,\n      \n      SizeAtCompileTime = (internal::size_at_compile_time<internal::traits<Derived>::RowsAtCompileTime,\n                                                   internal::traits<Derived>::ColsAtCompileTime>::ret),\n      /**< This is equal to the number of coefficients, i.e. the number of\n          * rows times the number of columns, or to \\a Dynamic if this is not\n          * known at compile-time. \\sa RowsAtCompileTime, ColsAtCompileTime */\n      \n      MaxSizeAtCompileTime = (internal::size_at_compile_time<internal::traits<Derived>::MaxRowsAtCompileTime,\n                                                   internal::traits<Derived>::MaxColsAtCompileTime>::ret)\n        \n    };\n    typedef typename internal::traits<Derived>::Scalar Scalar;\n    typedef typename internal::traits<Derived>::StorageKind StorageKind;\n    typedef typename internal::traits<Derived>::StorageIndex StorageIndex;\n    typedef typename internal::traits<Derived>::FullMatrixType DenseMatrixType;\n    typedef DenseMatrixType DenseType;\n    typedef Derived const& Nested;\n\n    EIGEN_DEVICE_FUNC\n    inline TriangularBase() { eigen_assert(!((Mode&UnitDiag) && (Mode&ZeroDiag))); }\n\n    EIGEN_DEVICE_FUNC\n    inline Index rows() const { return derived().rows(); }\n    EIGEN_DEVICE_FUNC\n    inline Index cols() const { return derived().cols(); }\n    EIGEN_DEVICE_FUNC\n    inline Index outerStride() const { return derived().outerStride(); }\n    EIGEN_DEVICE_FUNC\n    inline Index innerStride() const { return derived().innerStride(); }\n    \n    // dummy resize function\n    EIGEN_DEVICE_FUNC\n    void resize(Index rows, Index cols)\n    {\n      EIGEN_UNUSED_VARIABLE(rows);\n      EIGEN_UNUSED_VARIABLE(cols);\n      eigen_assert(rows==this->rows() && cols==this->cols());\n    }\n\n    EIGEN_DEVICE_FUNC\n    inline Scalar coeff(Index row, Index col) const  { return derived().coeff(row,col); }\n    EIGEN_DEVICE_FUNC\n    inline Scalar& coeffRef(Index row, Index col) { return derived().coeffRef(row,col); }\n\n    /** \\see MatrixBase::copyCoeff(row,col)\n      */\n    template<typename Other>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE void copyCoeff(Index row, Index col, Other& other)\n    {\n      derived().coeffRef(row, col) = other.coeff(row, col);\n    }\n\n    EIGEN_DEVICE_FUNC\n    inline Scalar operator()(Index row, Index col) const\n    {\n      check_coordinates(row, col);\n      return coeff(row,col);\n    }\n    EIGEN_DEVICE_FUNC\n    inline Scalar& operator()(Index row, Index col)\n    {\n      check_coordinates(row, col);\n      return coeffRef(row,col);\n    }\n\n    #ifndef EIGEN_PARSED_BY_DOXYGEN\n    EIGEN_DEVICE_FUNC\n    inline const Derived& derived() const { return *static_cast<const Derived*>(this); }\n    EIGEN_DEVICE_FUNC\n    inline Derived& derived() { return *static_cast<Derived*>(this); }\n    #endif // not EIGEN_PARSED_BY_DOXYGEN\n\n    template<typename DenseDerived>\n    EIGEN_DEVICE_FUNC\n    void evalTo(MatrixBase<DenseDerived> &other) const;\n    template<typename DenseDerived>\n    EIGEN_DEVICE_FUNC\n    void evalToLazy(MatrixBase<DenseDerived> &other) const;\n\n    EIGEN_DEVICE_FUNC\n    DenseMatrixType toDenseMatrix() const\n    {\n      DenseMatrixType res(rows(), cols());\n      evalToLazy(res);\n      return res;\n    }\n\n  protected:\n\n    void check_coordinates(Index row, Index col) const\n    {\n      EIGEN_ONLY_USED_FOR_DEBUG(row);\n      EIGEN_ONLY_USED_FOR_DEBUG(col);\n      eigen_assert(col>=0 && col<cols() && row>=0 && row<rows());\n      const int mode = int(Mode) & ~SelfAdjoint;\n      EIGEN_ONLY_USED_FOR_DEBUG(mode);\n      eigen_assert((mode==Upper && col>=row)\n                || (mode==Lower && col<=row)\n                || ((mode==StrictlyUpper || mode==UnitUpper) && col>row)\n                || ((mode==StrictlyLower || mode==UnitLower) && col<row));\n    }\n\n    #ifdef EIGEN_INTERNAL_DEBUGGING\n    void check_coordinates_internal(Index row, Index col) const\n    {\n      check_coordinates(row, col);\n    }\n    #else\n    void check_coordinates_internal(Index , Index ) const {}\n    #endif\n\n};\n\n/** \\class TriangularView\n  * \\ingroup Core_Module\n  *\n  * \\brief Expression of a triangular part in a matrix\n  *\n  * \\param MatrixType the type of the object in which we are taking the triangular part\n  * \\param Mode the kind of triangular matrix expression to construct. Can be #Upper,\n  *             #Lower, #UnitUpper, #UnitLower, #StrictlyUpper, or #StrictlyLower.\n  *             This is in fact a bit field; it must have either #Upper or #Lower, \n  *             and additionally it may have #UnitDiag or #ZeroDiag or neither.\n  *\n  * This class represents a triangular part of a matrix, not necessarily square. Strictly speaking, for rectangular\n  * matrices one should speak of \"trapezoid\" parts. This class is the return type\n  * of MatrixBase::triangularView() and SparseMatrixBase::triangularView(), and most of the time this is the only way it is used.\n  *\n  * \\sa MatrixBase::triangularView()\n  */\nnamespace internal {\ntemplate<typename MatrixType, unsigned int _Mode>\nstruct traits<TriangularView<MatrixType, _Mode> > : traits<MatrixType>\n{\n  typedef typename ref_selector<MatrixType>::non_const_type MatrixTypeNested;\n  typedef typename remove_reference<MatrixTypeNested>::type MatrixTypeNestedNonRef;\n  typedef typename remove_all<MatrixTypeNested>::type MatrixTypeNestedCleaned;\n  typedef typename MatrixType::PlainObject FullMatrixType;\n  typedef MatrixType ExpressionType;\n  enum {\n    Mode = _Mode,\n    FlagsLvalueBit = is_lvalue<MatrixType>::value ? LvalueBit : 0,\n    Flags = (MatrixTypeNestedCleaned::Flags & (HereditaryBits | FlagsLvalueBit) & (~(PacketAccessBit | DirectAccessBit | LinearAccessBit)))\n  };\n};\n}\n\ntemplate<typename _MatrixType, unsigned int _Mode, typename StorageKind> class TriangularViewImpl;\n\ntemplate<typename _MatrixType, unsigned int _Mode> class TriangularView\n  : public TriangularViewImpl<_MatrixType, _Mode, typename internal::traits<_MatrixType>::StorageKind >\n{\n  public:\n\n    typedef TriangularViewImpl<_MatrixType, _Mode, typename internal::traits<_MatrixType>::StorageKind > Base;\n    typedef typename internal::traits<TriangularView>::Scalar Scalar;\n    typedef _MatrixType MatrixType;\n\n  protected:\n    typedef typename internal::traits<TriangularView>::MatrixTypeNested MatrixTypeNested;\n    typedef typename internal::traits<TriangularView>::MatrixTypeNestedNonRef MatrixTypeNestedNonRef;\n\n    typedef typename internal::remove_all<typename MatrixType::ConjugateReturnType>::type MatrixConjugateReturnType;\n    typedef TriangularView<typename internal::add_const<MatrixType>::type, _Mode> ConstTriangularView;\n    \n  public:\n\n    typedef typename internal::traits<TriangularView>::StorageKind StorageKind;\n    typedef typename internal::traits<TriangularView>::MatrixTypeNestedCleaned NestedExpression;\n\n    enum {\n      Mode = _Mode,\n      Flags = internal::traits<TriangularView>::Flags,\n      TransposeMode = (Mode & Upper ? Lower : 0)\n                    | (Mode & Lower ? Upper : 0)\n                    | (Mode & (UnitDiag))\n                    | (Mode & (ZeroDiag)),\n      IsVectorAtCompileTime = false\n    };\n\n    EIGEN_DEVICE_FUNC\n    explicit inline TriangularView(MatrixType& matrix) : m_matrix(matrix)\n    {}\n    \n    EIGEN_INHERIT_ASSIGNMENT_OPERATORS(TriangularView)\n\n    /** \\copydoc EigenBase::rows() */\n    EIGEN_DEVICE_FUNC\n    inline Index rows() const { return m_matrix.rows(); }\n    /** \\copydoc EigenBase::cols() */\n    EIGEN_DEVICE_FUNC\n    inline Index cols() const { return m_matrix.cols(); }\n\n    /** \\returns a const reference to the nested expression */\n    EIGEN_DEVICE_FUNC\n    const NestedExpression& nestedExpression() const { return m_matrix; }\n\n    /** \\returns a reference to the nested expression */\n    EIGEN_DEVICE_FUNC\n    NestedExpression& nestedExpression() { return m_matrix; }\n    \n    typedef TriangularView<const MatrixConjugateReturnType,Mode> ConjugateReturnType;\n    /** \\sa MatrixBase::conjugate() const */\n    EIGEN_DEVICE_FUNC\n    inline const ConjugateReturnType conjugate() const\n    { return ConjugateReturnType(m_matrix.conjugate()); }\n\n    /** \\returns an expression of the complex conjugate of \\c *this if Cond==true,\n     *           returns \\c *this otherwise.\n     */\n    template<bool Cond>\n    EIGEN_DEVICE_FUNC\n    inline typename internal::conditional<Cond,ConjugateReturnType,ConstTriangularView>::type\n    conjugateIf() const\n    {\n      typedef typename internal::conditional<Cond,ConjugateReturnType,ConstTriangularView>::type ReturnType;\n      return ReturnType(m_matrix.template conjugateIf<Cond>());\n    }\n\n    typedef TriangularView<const typename MatrixType::AdjointReturnType,TransposeMode> AdjointReturnType;\n    /** \\sa MatrixBase::adjoint() const */\n    EIGEN_DEVICE_FUNC\n    inline const AdjointReturnType adjoint() const\n    { return AdjointReturnType(m_matrix.adjoint()); }\n\n    typedef TriangularView<typename MatrixType::TransposeReturnType,TransposeMode> TransposeReturnType;\n     /** \\sa MatrixBase::transpose() */\n    EIGEN_DEVICE_FUNC\n    inline TransposeReturnType transpose()\n    {\n      EIGEN_STATIC_ASSERT_LVALUE(MatrixType)\n      typename MatrixType::TransposeReturnType tmp(m_matrix);\n      return TransposeReturnType(tmp);\n    }\n    \n    typedef TriangularView<const typename MatrixType::ConstTransposeReturnType,TransposeMode> ConstTransposeReturnType;\n    /** \\sa MatrixBase::transpose() const */\n    EIGEN_DEVICE_FUNC\n    inline const ConstTransposeReturnType transpose() const\n    {\n      return ConstTransposeReturnType(m_matrix.transpose());\n    }\n\n    template<typename Other>\n    EIGEN_DEVICE_FUNC\n    inline const Solve<TriangularView, Other> \n    solve(const MatrixBase<Other>& other) const\n    { return Solve<TriangularView, Other>(*this, other.derived()); }\n    \n  // workaround MSVC ICE\n  #if EIGEN_COMP_MSVC\n    template<int Side, typename Other>\n    EIGEN_DEVICE_FUNC\n    inline const internal::triangular_solve_retval<Side,TriangularView, Other>\n    solve(const MatrixBase<Other>& other) const\n    { return Base::template solve<Side>(other); }\n  #else\n    using Base::solve;\n  #endif\n\n    /** \\returns a selfadjoint view of the referenced triangular part which must be either \\c #Upper or \\c #Lower.\n      *\n      * This is a shortcut for \\code this->nestedExpression().selfadjointView<(*this)::Mode>() \\endcode\n      * \\sa MatrixBase::selfadjointView() */\n    EIGEN_DEVICE_FUNC\n    SelfAdjointView<MatrixTypeNestedNonRef,Mode> selfadjointView()\n    {\n      EIGEN_STATIC_ASSERT((Mode&(UnitDiag|ZeroDiag))==0,PROGRAMMING_ERROR);\n      return SelfAdjointView<MatrixTypeNestedNonRef,Mode>(m_matrix);\n    }\n\n    /** This is the const version of selfadjointView() */\n    EIGEN_DEVICE_FUNC\n    const SelfAdjointView<MatrixTypeNestedNonRef,Mode> selfadjointView() const\n    {\n      EIGEN_STATIC_ASSERT((Mode&(UnitDiag|ZeroDiag))==0,PROGRAMMING_ERROR);\n      return SelfAdjointView<MatrixTypeNestedNonRef,Mode>(m_matrix);\n    }\n\n\n    /** \\returns the determinant of the triangular matrix\n      * \\sa MatrixBase::determinant() */\n    EIGEN_DEVICE_FUNC\n    Scalar determinant() const\n    {\n      if (Mode & UnitDiag)\n        return 1;\n      else if (Mode & ZeroDiag)\n        return 0;\n      else\n        return m_matrix.diagonal().prod();\n    }\n      \n  protected:\n\n    MatrixTypeNested m_matrix;\n};\n\n/** \\ingroup Core_Module\n  *\n  * \\brief Base class for a triangular part in a \\b dense matrix\n  *\n  * This class is an abstract base class of class TriangularView, and objects of type TriangularViewImpl cannot be instantiated.\n  * It extends class TriangularView with additional methods which available for dense expressions only.\n  *\n  * \\sa class TriangularView, MatrixBase::triangularView()\n  */\ntemplate<typename _MatrixType, unsigned int _Mode> class TriangularViewImpl<_MatrixType,_Mode,Dense>\n  : public TriangularBase<TriangularView<_MatrixType, _Mode> >\n{\n  public:\n\n    typedef TriangularView<_MatrixType, _Mode> TriangularViewType;\n    typedef TriangularBase<TriangularViewType> Base;\n    typedef typename internal::traits<TriangularViewType>::Scalar Scalar;\n\n    typedef _MatrixType MatrixType;\n    typedef typename MatrixType::PlainObject DenseMatrixType;\n    typedef DenseMatrixType PlainObject;\n\n  public:\n    using Base::evalToLazy;\n    using Base::derived;\n\n    typedef typename internal::traits<TriangularViewType>::StorageKind StorageKind;\n\n    enum {\n      Mode = _Mode,\n      Flags = internal::traits<TriangularViewType>::Flags\n    };\n\n    /** \\returns the outer-stride of the underlying dense matrix\n      * \\sa DenseCoeffsBase::outerStride() */\n    EIGEN_DEVICE_FUNC\n    inline Index outerStride() const { return derived().nestedExpression().outerStride(); }\n    /** \\returns the inner-stride of the underlying dense matrix\n      * \\sa DenseCoeffsBase::innerStride() */\n    EIGEN_DEVICE_FUNC\n    inline Index innerStride() const { return derived().nestedExpression().innerStride(); }\n\n    /** \\sa MatrixBase::operator+=() */\n    template<typename Other>\n    EIGEN_DEVICE_FUNC\n    TriangularViewType&  operator+=(const DenseBase<Other>& other) {\n      internal::call_assignment_no_alias(derived(), other.derived(), internal::add_assign_op<Scalar,typename Other::Scalar>());\n      return derived();\n    }\n    /** \\sa MatrixBase::operator-=() */\n    template<typename Other>\n    EIGEN_DEVICE_FUNC\n    TriangularViewType&  operator-=(const DenseBase<Other>& other) {\n      internal::call_assignment_no_alias(derived(), other.derived(), internal::sub_assign_op<Scalar,typename Other::Scalar>());\n      return derived();\n    }\n    \n    /** \\sa MatrixBase::operator*=() */\n    EIGEN_DEVICE_FUNC\n    TriangularViewType&  operator*=(const typename internal::traits<MatrixType>::Scalar& other) { return *this = derived().nestedExpression() * other; }\n    /** \\sa DenseBase::operator/=() */\n    EIGEN_DEVICE_FUNC\n    TriangularViewType&  operator/=(const typename internal::traits<MatrixType>::Scalar& other) { return *this = derived().nestedExpression() / other; }\n\n    /** \\sa MatrixBase::fill() */\n    EIGEN_DEVICE_FUNC\n    void fill(const Scalar& value) { setConstant(value); }\n    /** \\sa MatrixBase::setConstant() */\n    EIGEN_DEVICE_FUNC\n    TriangularViewType& setConstant(const Scalar& value)\n    { return *this = MatrixType::Constant(derived().rows(), derived().cols(), value); }\n    /** \\sa MatrixBase::setZero() */\n    EIGEN_DEVICE_FUNC\n    TriangularViewType& setZero() { return setConstant(Scalar(0)); }\n    /** \\sa MatrixBase::setOnes() */\n    EIGEN_DEVICE_FUNC\n    TriangularViewType& setOnes() { return setConstant(Scalar(1)); }\n\n    /** \\sa MatrixBase::coeff()\n      * \\warning the coordinates must fit into the referenced triangular part\n      */\n    EIGEN_DEVICE_FUNC\n    inline Scalar coeff(Index row, Index col) const\n    {\n      Base::check_coordinates_internal(row, col);\n      return derived().nestedExpression().coeff(row, col);\n    }\n\n    /** \\sa MatrixBase::coeffRef()\n      * \\warning the coordinates must fit into the referenced triangular part\n      */\n    EIGEN_DEVICE_FUNC\n    inline Scalar& coeffRef(Index row, Index col)\n    {\n      EIGEN_STATIC_ASSERT_LVALUE(TriangularViewType);\n      Base::check_coordinates_internal(row, col);\n      return derived().nestedExpression().coeffRef(row, col);\n    }\n\n    /** Assigns a triangular matrix to a triangular part of a dense matrix */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    TriangularViewType& operator=(const TriangularBase<OtherDerived>& other);\n\n    /** Shortcut for\\code *this = other.other.triangularView<(*this)::Mode>() \\endcode */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    TriangularViewType& operator=(const MatrixBase<OtherDerived>& other);\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\n    EIGEN_DEVICE_FUNC\n    TriangularViewType& operator=(const TriangularViewImpl& other)\n    { return *this = other.derived().nestedExpression(); }\n\n    template<typename OtherDerived>\n    /** \\deprecated */\n    EIGEN_DEPRECATED EIGEN_DEVICE_FUNC\n    void lazyAssign(const TriangularBase<OtherDerived>& other);\n\n    template<typename OtherDerived>\n    /** \\deprecated */\n    EIGEN_DEPRECATED EIGEN_DEVICE_FUNC\n    void lazyAssign(const MatrixBase<OtherDerived>& other);\n#endif\n\n    /** Efficient triangular matrix times vector/matrix product */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    const Product<TriangularViewType,OtherDerived>\n    operator*(const MatrixBase<OtherDerived>& rhs) const\n    {\n      return Product<TriangularViewType,OtherDerived>(derived(), rhs.derived());\n    }\n\n    /** Efficient vector/matrix times triangular matrix product */\n    template<typename OtherDerived> friend\n    EIGEN_DEVICE_FUNC\n    const Product<OtherDerived,TriangularViewType>\n    operator*(const MatrixBase<OtherDerived>& lhs, const TriangularViewImpl& rhs)\n    {\n      return Product<OtherDerived,TriangularViewType>(lhs.derived(),rhs.derived());\n    }\n\n    /** \\returns the product of the inverse of \\c *this with \\a other, \\a *this being triangular.\n      *\n      * This function computes the inverse-matrix matrix product inverse(\\c *this) * \\a other if\n      * \\a Side==OnTheLeft (the default), or the right-inverse-multiply  \\a other * inverse(\\c *this) if\n      * \\a Side==OnTheRight.\n      *\n      * Note that the template parameter \\c Side can be omitted, in which case \\c Side==OnTheLeft\n      *\n      * The matrix \\c *this must be triangular and invertible (i.e., all the coefficients of the\n      * diagonal must be non zero). It works as a forward (resp. backward) substitution if \\c *this\n      * is an upper (resp. lower) triangular matrix.\n      *\n      * Example: \\include Triangular_solve.cpp\n      * Output: \\verbinclude Triangular_solve.out\n      *\n      * This function returns an expression of the inverse-multiply and can works in-place if it is assigned\n      * to the same matrix or vector \\a other.\n      *\n      * For users coming from BLAS, this function (and more specifically solveInPlace()) offer\n      * all the operations supported by the \\c *TRSV and \\c *TRSM BLAS routines.\n      *\n      * \\sa TriangularView::solveInPlace()\n      */\n    template<int Side, typename Other>\n    inline const internal::triangular_solve_retval<Side,TriangularViewType, Other>\n    solve(const MatrixBase<Other>& other) const;\n\n    /** \"in-place\" version of TriangularView::solve() where the result is written in \\a other\n      *\n      * \\warning The parameter is only marked 'const' to make the C++ compiler accept a temporary expression here.\n      * This function will const_cast it, so constness isn't honored here.\n      *\n      * Note that the template parameter \\c Side can be omitted, in which case \\c Side==OnTheLeft\n      *\n      * See TriangularView:solve() for the details.\n      */\n    template<int Side, typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    void solveInPlace(const MatrixBase<OtherDerived>& other) const;\n\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    void solveInPlace(const MatrixBase<OtherDerived>& other) const\n    { return solveInPlace<OnTheLeft>(other); }\n\n    /** Swaps the coefficients of the common triangular parts of two matrices */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n#ifdef EIGEN_PARSED_BY_DOXYGEN\n    void swap(TriangularBase<OtherDerived> &other)\n#else\n    void swap(TriangularBase<OtherDerived> const & other)\n#endif\n    {\n      EIGEN_STATIC_ASSERT_LVALUE(OtherDerived);\n      call_assignment(derived(), other.const_cast_derived(), internal::swap_assign_op<Scalar>());\n    }\n\n    /** Shortcut for \\code (*this).swap(other.triangularView<(*this)::Mode>()) \\endcode */\n    template<typename OtherDerived>\n    /** \\deprecated */\n    EIGEN_DEPRECATED EIGEN_DEVICE_FUNC\n    void swap(MatrixBase<OtherDerived> const & other)\n    {\n      EIGEN_STATIC_ASSERT_LVALUE(OtherDerived);\n      call_assignment(derived(), other.const_cast_derived(), internal::swap_assign_op<Scalar>());\n    }\n\n    template<typename RhsType, typename DstType>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE void _solve_impl(const RhsType &rhs, DstType &dst) const {\n      if(!internal::is_same_dense(dst,rhs))\n        dst = rhs;\n      this->solveInPlace(dst);\n    }\n\n    template<typename ProductType>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE TriangularViewType& _assignProduct(const ProductType& prod, const Scalar& alpha, bool beta);\n  protected:\n    EIGEN_DEFAULT_COPY_CONSTRUCTOR(TriangularViewImpl)\n    EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(TriangularViewImpl)\n\n};\n\n/***************************************************************************\n* Implementation of triangular evaluation/assignment\n***************************************************************************/\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\n// FIXME should we keep that possibility\ntemplate<typename MatrixType, unsigned int Mode>\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC inline TriangularView<MatrixType, Mode>&\nTriangularViewImpl<MatrixType, Mode, Dense>::operator=(const MatrixBase<OtherDerived>& other)\n{\n  internal::call_assignment_no_alias(derived(), other.derived(), internal::assign_op<Scalar,typename OtherDerived::Scalar>());\n  return derived();\n}\n\n// FIXME should we keep that possibility\ntemplate<typename MatrixType, unsigned int Mode>\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC void TriangularViewImpl<MatrixType, Mode, Dense>::lazyAssign(const MatrixBase<OtherDerived>& other)\n{\n  internal::call_assignment_no_alias(derived(), other.template triangularView<Mode>());\n}\n\n\n\ntemplate<typename MatrixType, unsigned int Mode>\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC inline TriangularView<MatrixType, Mode>&\nTriangularViewImpl<MatrixType, Mode, Dense>::operator=(const TriangularBase<OtherDerived>& other)\n{\n  eigen_assert(Mode == int(OtherDerived::Mode));\n  internal::call_assignment(derived(), other.derived());\n  return derived();\n}\n\ntemplate<typename MatrixType, unsigned int Mode>\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC void TriangularViewImpl<MatrixType, Mode, Dense>::lazyAssign(const TriangularBase<OtherDerived>& other)\n{\n  eigen_assert(Mode == int(OtherDerived::Mode));\n  internal::call_assignment_no_alias(derived(), other.derived());\n}\n#endif\n\n/***************************************************************************\n* Implementation of TriangularBase methods\n***************************************************************************/\n\n/** Assigns a triangular or selfadjoint matrix to a dense matrix.\n  * If the matrix is triangular, the opposite part is set to zero. */\ntemplate<typename Derived>\ntemplate<typename DenseDerived>\nEIGEN_DEVICE_FUNC void TriangularBase<Derived>::evalTo(MatrixBase<DenseDerived> &other) const\n{\n  evalToLazy(other.derived());\n}\n\n/***************************************************************************\n* Implementation of TriangularView methods\n***************************************************************************/\n\n/***************************************************************************\n* Implementation of MatrixBase methods\n***************************************************************************/\n\n/**\n  * \\returns an expression of a triangular view extracted from the current matrix\n  *\n  * The parameter \\a Mode can have the following values: \\c #Upper, \\c #StrictlyUpper, \\c #UnitUpper,\n  * \\c #Lower, \\c #StrictlyLower, \\c #UnitLower.\n  *\n  * Example: \\include MatrixBase_triangularView.cpp\n  * Output: \\verbinclude MatrixBase_triangularView.out\n  *\n  * \\sa class TriangularView\n  */\ntemplate<typename Derived>\ntemplate<unsigned int Mode>\nEIGEN_DEVICE_FUNC\ntypename MatrixBase<Derived>::template TriangularViewReturnType<Mode>::Type\nMatrixBase<Derived>::triangularView()\n{\n  return typename TriangularViewReturnType<Mode>::Type(derived());\n}\n\n/** This is the const version of MatrixBase::triangularView() */\ntemplate<typename Derived>\ntemplate<unsigned int Mode>\nEIGEN_DEVICE_FUNC\ntypename MatrixBase<Derived>::template ConstTriangularViewReturnType<Mode>::Type\nMatrixBase<Derived>::triangularView() const\n{\n  return typename ConstTriangularViewReturnType<Mode>::Type(derived());\n}\n\n/** \\returns true if *this is approximately equal to an upper triangular matrix,\n  *          within the precision given by \\a prec.\n  *\n  * \\sa isLowerTriangular()\n  */\ntemplate<typename Derived>\nbool MatrixBase<Derived>::isUpperTriangular(const RealScalar& prec) const\n{\n  RealScalar maxAbsOnUpperPart = static_cast<RealScalar>(-1);\n  for(Index j = 0; j < cols(); ++j)\n  {\n    Index maxi = numext::mini(j, rows()-1);\n    for(Index i = 0; i <= maxi; ++i)\n    {\n      RealScalar absValue = numext::abs(coeff(i,j));\n      if(absValue > maxAbsOnUpperPart) maxAbsOnUpperPart = absValue;\n    }\n  }\n  RealScalar threshold = maxAbsOnUpperPart * prec;\n  for(Index j = 0; j < cols(); ++j)\n    for(Index i = j+1; i < rows(); ++i)\n      if(numext::abs(coeff(i, j)) > threshold) return false;\n  return true;\n}\n\n/** \\returns true if *this is approximately equal to a lower triangular matrix,\n  *          within the precision given by \\a prec.\n  *\n  * \\sa isUpperTriangular()\n  */\ntemplate<typename Derived>\nbool MatrixBase<Derived>::isLowerTriangular(const RealScalar& prec) const\n{\n  RealScalar maxAbsOnLowerPart = static_cast<RealScalar>(-1);\n  for(Index j = 0; j < cols(); ++j)\n    for(Index i = j; i < rows(); ++i)\n    {\n      RealScalar absValue = numext::abs(coeff(i,j));\n      if(absValue > maxAbsOnLowerPart) maxAbsOnLowerPart = absValue;\n    }\n  RealScalar threshold = maxAbsOnLowerPart * prec;\n  for(Index j = 1; j < cols(); ++j)\n  {\n    Index maxi = numext::mini(j, rows()-1);\n    for(Index i = 0; i < maxi; ++i)\n      if(numext::abs(coeff(i, j)) > threshold) return false;\n  }\n  return true;\n}\n\n\n/***************************************************************************\n****************************************************************************\n* Evaluators and Assignment of triangular expressions\n***************************************************************************\n***************************************************************************/\n\nnamespace internal {\n\n  \n// TODO currently a triangular expression has the form TriangularView<.,.>\n//      in the future triangular-ness should be defined by the expression traits\n//      such that Transpose<TriangularView<.,.> > is valid. (currently TriangularBase::transpose() is overloaded to make it work)\ntemplate<typename MatrixType, unsigned int Mode>\nstruct evaluator_traits<TriangularView<MatrixType,Mode> >\n{\n  typedef typename storage_kind_to_evaluator_kind<typename MatrixType::StorageKind>::Kind Kind;\n  typedef typename glue_shapes<typename evaluator_traits<MatrixType>::Shape, TriangularShape>::type Shape;\n};\n\ntemplate<typename MatrixType, unsigned int Mode>\nstruct unary_evaluator<TriangularView<MatrixType,Mode>, IndexBased>\n : evaluator<typename internal::remove_all<MatrixType>::type>\n{\n  typedef TriangularView<MatrixType,Mode> XprType;\n  typedef evaluator<typename internal::remove_all<MatrixType>::type> Base;\n  EIGEN_DEVICE_FUNC\n  unary_evaluator(const XprType &xpr) : Base(xpr.nestedExpression()) {}\n};\n\n// Additional assignment kinds:\nstruct Triangular2Triangular    {};\nstruct Triangular2Dense         {};\nstruct Dense2Triangular         {};\n\n\ntemplate<typename Kernel, unsigned int Mode, int UnrollCount, bool ClearOpposite> struct triangular_assignment_loop;\n\n \n/** \\internal Specialization of the dense assignment kernel for triangular matrices.\n  * The main difference is that the triangular, diagonal, and opposite parts are processed through three different functions.\n  * \\tparam UpLo must be either Lower or Upper\n  * \\tparam Mode must be either 0, UnitDiag, ZeroDiag, or SelfAdjoint\n  */\ntemplate<int UpLo, int Mode, int SetOpposite, typename DstEvaluatorTypeT, typename SrcEvaluatorTypeT, typename Functor, int Version = Specialized>\nclass triangular_dense_assignment_kernel : public generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, Version>\n{\nprotected:\n  typedef generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, Version> Base;\n  typedef typename Base::DstXprType DstXprType;\n  typedef typename Base::SrcXprType SrcXprType;\n  using Base::m_dst;\n  using Base::m_src;\n  using Base::m_functor;\npublic:\n  \n  typedef typename Base::DstEvaluatorType DstEvaluatorType;\n  typedef typename Base::SrcEvaluatorType SrcEvaluatorType;\n  typedef typename Base::Scalar Scalar;\n  typedef typename Base::AssignmentTraits AssignmentTraits;\n  \n  \n  EIGEN_DEVICE_FUNC triangular_dense_assignment_kernel(DstEvaluatorType &dst, const SrcEvaluatorType &src, const Functor &func, DstXprType& dstExpr)\n    : Base(dst, src, func, dstExpr)\n  {}\n  \n#ifdef EIGEN_INTERNAL_DEBUGGING\n  EIGEN_DEVICE_FUNC void assignCoeff(Index row, Index col)\n  {\n    eigen_internal_assert(row!=col);\n    Base::assignCoeff(row,col);\n  }\n#else\n  using Base::assignCoeff;\n#endif\n  \n  EIGEN_DEVICE_FUNC void assignDiagonalCoeff(Index id)\n  {\n         if(Mode==UnitDiag && SetOpposite) m_functor.assignCoeff(m_dst.coeffRef(id,id), Scalar(1));\n    else if(Mode==ZeroDiag && SetOpposite) m_functor.assignCoeff(m_dst.coeffRef(id,id), Scalar(0));\n    else if(Mode==0)                       Base::assignCoeff(id,id);\n  }\n  \n  EIGEN_DEVICE_FUNC void assignOppositeCoeff(Index row, Index col)\n  { \n    eigen_internal_assert(row!=col);\n    if(SetOpposite)\n      m_functor.assignCoeff(m_dst.coeffRef(row,col), Scalar(0));\n  }\n};\n\ntemplate<int Mode, bool SetOpposite, typename DstXprType, typename SrcXprType, typename Functor>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nvoid call_triangular_assignment_loop(DstXprType& dst, const SrcXprType& src, const Functor &func)\n{\n  typedef evaluator<DstXprType> DstEvaluatorType;\n  typedef evaluator<SrcXprType> SrcEvaluatorType;\n\n  SrcEvaluatorType srcEvaluator(src);\n\n  Index dstRows = src.rows();\n  Index dstCols = src.cols();\n  if((dst.rows()!=dstRows) || (dst.cols()!=dstCols))\n    dst.resize(dstRows, dstCols);\n  DstEvaluatorType dstEvaluator(dst);\n    \n  typedef triangular_dense_assignment_kernel< Mode&(Lower|Upper),Mode&(UnitDiag|ZeroDiag|SelfAdjoint),SetOpposite,\n                                              DstEvaluatorType,SrcEvaluatorType,Functor> Kernel;\n  Kernel kernel(dstEvaluator, srcEvaluator, func, dst.const_cast_derived());\n  \n  enum {\n      unroll = DstXprType::SizeAtCompileTime != Dynamic\n            && SrcEvaluatorType::CoeffReadCost < HugeCost\n            && DstXprType::SizeAtCompileTime * (DstEvaluatorType::CoeffReadCost+SrcEvaluatorType::CoeffReadCost) / 2 <= EIGEN_UNROLLING_LIMIT\n    };\n  \n  triangular_assignment_loop<Kernel, Mode, unroll ? int(DstXprType::SizeAtCompileTime) : Dynamic, SetOpposite>::run(kernel);\n}\n\ntemplate<int Mode, bool SetOpposite, typename DstXprType, typename SrcXprType>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nvoid call_triangular_assignment_loop(DstXprType& dst, const SrcXprType& src)\n{\n  call_triangular_assignment_loop<Mode,SetOpposite>(dst, src, internal::assign_op<typename DstXprType::Scalar,typename SrcXprType::Scalar>());\n}\n\ntemplate<> struct AssignmentKind<TriangularShape,TriangularShape> { typedef Triangular2Triangular Kind; };\ntemplate<> struct AssignmentKind<DenseShape,TriangularShape>      { typedef Triangular2Dense      Kind; };\ntemplate<> struct AssignmentKind<TriangularShape,DenseShape>      { typedef Dense2Triangular      Kind; };\n\n\ntemplate< typename DstXprType, typename SrcXprType, typename Functor>\nstruct Assignment<DstXprType, SrcXprType, Functor, Triangular2Triangular>\n{\n  EIGEN_DEVICE_FUNC static void run(DstXprType &dst, const SrcXprType &src, const Functor &func)\n  {\n    eigen_assert(int(DstXprType::Mode) == int(SrcXprType::Mode));\n    \n    call_triangular_assignment_loop<DstXprType::Mode, false>(dst, src, func);  \n  }\n};\n\ntemplate< typename DstXprType, typename SrcXprType, typename Functor>\nstruct Assignment<DstXprType, SrcXprType, Functor, Triangular2Dense>\n{\n  EIGEN_DEVICE_FUNC static void run(DstXprType &dst, const SrcXprType &src, const Functor &func)\n  {\n    call_triangular_assignment_loop<SrcXprType::Mode, (SrcXprType::Mode&SelfAdjoint)==0>(dst, src, func);  \n  }\n};\n\ntemplate< typename DstXprType, typename SrcXprType, typename Functor>\nstruct Assignment<DstXprType, SrcXprType, Functor, Dense2Triangular>\n{\n  EIGEN_DEVICE_FUNC static void run(DstXprType &dst, const SrcXprType &src, const Functor &func)\n  {\n    call_triangular_assignment_loop<DstXprType::Mode, false>(dst, src, func);  \n  }\n};\n\n\ntemplate<typename Kernel, unsigned int Mode, int UnrollCount, bool SetOpposite>\nstruct triangular_assignment_loop\n{\n  // FIXME: this is not very clean, perhaps this information should be provided by the kernel?\n  typedef typename Kernel::DstEvaluatorType DstEvaluatorType;\n  typedef typename DstEvaluatorType::XprType DstXprType;\n  \n  enum {\n    col = (UnrollCount-1) / DstXprType::RowsAtCompileTime,\n    row = (UnrollCount-1) % DstXprType::RowsAtCompileTime\n  };\n  \n  typedef typename Kernel::Scalar Scalar;\n\n  EIGEN_DEVICE_FUNC\n  static inline void run(Kernel &kernel)\n  {\n    triangular_assignment_loop<Kernel, Mode, UnrollCount-1, SetOpposite>::run(kernel);\n    \n    if(row==col)\n      kernel.assignDiagonalCoeff(row);\n    else if( ((Mode&Lower) && row>col) || ((Mode&Upper) && row<col) )\n      kernel.assignCoeff(row,col);\n    else if(SetOpposite)\n      kernel.assignOppositeCoeff(row,col);\n  }\n};\n\n// prevent buggy user code from causing an infinite recursion\ntemplate<typename Kernel, unsigned int Mode, bool SetOpposite>\nstruct triangular_assignment_loop<Kernel, Mode, 0, SetOpposite>\n{\n  EIGEN_DEVICE_FUNC\n  static inline void run(Kernel &) {}\n};\n\n\n\n// TODO: experiment with a recursive assignment procedure splitting the current\n//       triangular part into one rectangular and two triangular parts.\n\n\ntemplate<typename Kernel, unsigned int Mode, bool SetOpposite>\nstruct triangular_assignment_loop<Kernel, Mode, Dynamic, SetOpposite>\n{\n  typedef typename Kernel::Scalar Scalar;\n  EIGEN_DEVICE_FUNC\n  static inline void run(Kernel &kernel)\n  {\n    for(Index j = 0; j < kernel.cols(); ++j)\n    {\n      Index maxi = numext::mini(j, kernel.rows());\n      Index i = 0;\n      if (((Mode&Lower) && SetOpposite) || (Mode&Upper))\n      {\n        for(; i < maxi; ++i)\n          if(Mode&Upper) kernel.assignCoeff(i, j);\n          else           kernel.assignOppositeCoeff(i, j);\n      }\n      else\n        i = maxi;\n      \n      if(i<kernel.rows()) // then i==j\n        kernel.assignDiagonalCoeff(i++);\n      \n      if (((Mode&Upper) && SetOpposite) || (Mode&Lower))\n      {\n        for(; i < kernel.rows(); ++i)\n          if(Mode&Lower) kernel.assignCoeff(i, j);\n          else           kernel.assignOppositeCoeff(i, j);\n      }\n    }\n  }\n};\n\n} // end namespace internal\n\n/** Assigns a triangular or selfadjoint matrix to a dense matrix.\n  * If the matrix is triangular, the opposite part is set to zero. */\ntemplate<typename Derived>\ntemplate<typename DenseDerived>\nEIGEN_DEVICE_FUNC void TriangularBase<Derived>::evalToLazy(MatrixBase<DenseDerived> &other) const\n{\n  other.derived().resize(this->rows(), this->cols());\n  internal::call_triangular_assignment_loop<Derived::Mode,(Derived::Mode&SelfAdjoint)==0 /* SetOpposite */>(other.derived(), derived().nestedExpression());\n}\n\nnamespace internal {\n  \n// Triangular = Product\ntemplate< typename DstXprType, typename Lhs, typename Rhs, typename Scalar>\nstruct Assignment<DstXprType, Product<Lhs,Rhs,DefaultProduct>, internal::assign_op<Scalar,typename Product<Lhs,Rhs,DefaultProduct>::Scalar>, Dense2Triangular>\n{\n  typedef Product<Lhs,Rhs,DefaultProduct> SrcXprType;\n  static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op<Scalar,typename SrcXprType::Scalar> &)\n  {\n    Index dstRows = src.rows();\n    Index dstCols = src.cols();\n    if((dst.rows()!=dstRows) || (dst.cols()!=dstCols))\n      dst.resize(dstRows, dstCols);\n\n    dst._assignProduct(src, 1, 0);\n  }\n};\n\n// Triangular += Product\ntemplate< typename DstXprType, typename Lhs, typename Rhs, typename Scalar>\nstruct Assignment<DstXprType, Product<Lhs,Rhs,DefaultProduct>, internal::add_assign_op<Scalar,typename Product<Lhs,Rhs,DefaultProduct>::Scalar>, Dense2Triangular>\n{\n  typedef Product<Lhs,Rhs,DefaultProduct> SrcXprType;\n  static void run(DstXprType &dst, const SrcXprType &src, const internal::add_assign_op<Scalar,typename SrcXprType::Scalar> &)\n  {\n    dst._assignProduct(src, 1, 1);\n  }\n};\n\n// Triangular -= Product\ntemplate< typename DstXprType, typename Lhs, typename Rhs, typename Scalar>\nstruct Assignment<DstXprType, Product<Lhs,Rhs,DefaultProduct>, internal::sub_assign_op<Scalar,typename Product<Lhs,Rhs,DefaultProduct>::Scalar>, Dense2Triangular>\n{\n  typedef Product<Lhs,Rhs,DefaultProduct> SrcXprType;\n  static void run(DstXprType &dst, const SrcXprType &src, const internal::sub_assign_op<Scalar,typename SrcXprType::Scalar> &)\n  {\n    dst._assignProduct(src, -1, 1);\n  }\n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_TRIANGULARMATRIX_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/VectorBlock.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_VECTORBLOCK_H\n#define EIGEN_VECTORBLOCK_H\n\nnamespace Eigen { \n\nnamespace internal {\ntemplate<typename VectorType, int Size>\nstruct traits<VectorBlock<VectorType, Size> >\n  : public traits<Block<VectorType,\n                     traits<VectorType>::Flags & RowMajorBit ? 1 : Size,\n                     traits<VectorType>::Flags & RowMajorBit ? Size : 1> >\n{\n};\n}\n\n/** \\class VectorBlock\n  * \\ingroup Core_Module\n  *\n  * \\brief Expression of a fixed-size or dynamic-size sub-vector\n  *\n  * \\tparam VectorType the type of the object in which we are taking a sub-vector\n  * \\tparam Size size of the sub-vector we are taking at compile time (optional)\n  *\n  * This class represents an expression of either a fixed-size or dynamic-size sub-vector.\n  * It is the return type of DenseBase::segment(Index,Index) and DenseBase::segment<int>(Index) and\n  * most of the time this is the only way it is used.\n  *\n  * However, if you want to directly manipulate sub-vector expressions,\n  * for instance if you want to write a function returning such an expression, you\n  * will need to use this class.\n  *\n  * Here is an example illustrating the dynamic case:\n  * \\include class_VectorBlock.cpp\n  * Output: \\verbinclude class_VectorBlock.out\n  *\n  * \\note Even though this expression has dynamic size, in the case where \\a VectorType\n  * has fixed size, this expression inherits a fixed maximal size which means that evaluating\n  * it does not cause a dynamic memory allocation.\n  *\n  * Here is an example illustrating the fixed-size case:\n  * \\include class_FixedVectorBlock.cpp\n  * Output: \\verbinclude class_FixedVectorBlock.out\n  *\n  * \\sa class Block, DenseBase::segment(Index,Index,Index,Index), DenseBase::segment(Index,Index)\n  */\ntemplate<typename VectorType, int Size> class VectorBlock\n  : public Block<VectorType,\n                     internal::traits<VectorType>::Flags & RowMajorBit ? 1 : Size,\n                     internal::traits<VectorType>::Flags & RowMajorBit ? Size : 1>\n{\n    typedef Block<VectorType,\n                     internal::traits<VectorType>::Flags & RowMajorBit ? 1 : Size,\n                     internal::traits<VectorType>::Flags & RowMajorBit ? Size : 1> Base;\n    enum {\n      IsColVector = !(internal::traits<VectorType>::Flags & RowMajorBit)\n    };\n  public:\n    EIGEN_DENSE_PUBLIC_INTERFACE(VectorBlock)\n\n    using Base::operator=;\n\n    /** Dynamic-size constructor\n      */\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    VectorBlock(VectorType& vector, Index start, Index size)\n      : Base(vector,\n             IsColVector ? start : 0, IsColVector ? 0 : start,\n             IsColVector ? size  : 1, IsColVector ? 1 : size)\n    {\n      EIGEN_STATIC_ASSERT_VECTOR_ONLY(VectorBlock);\n    }\n\n    /** Fixed-size constructor\n      */\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    VectorBlock(VectorType& vector, Index start)\n      : Base(vector, IsColVector ? start : 0, IsColVector ? 0 : start)\n    {\n      EIGEN_STATIC_ASSERT_VECTOR_ONLY(VectorBlock);\n    }\n};\n\n\n} // end namespace Eigen\n\n#endif // EIGEN_VECTORBLOCK_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/VectorwiseOp.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2019 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_PARTIAL_REDUX_H\n#define EIGEN_PARTIAL_REDUX_H\n\nnamespace Eigen {\n\n/** \\class PartialReduxExpr\n  * \\ingroup Core_Module\n  *\n  * \\brief Generic expression of a partially reduxed matrix\n  *\n  * \\tparam MatrixType the type of the matrix we are applying the redux operation\n  * \\tparam MemberOp type of the member functor\n  * \\tparam Direction indicates the direction of the redux (#Vertical or #Horizontal)\n  *\n  * This class represents an expression of a partial redux operator of a matrix.\n  * It is the return type of some VectorwiseOp functions,\n  * and most of the time this is the only way it is used.\n  *\n  * \\sa class VectorwiseOp\n  */\n\ntemplate< typename MatrixType, typename MemberOp, int Direction>\nclass PartialReduxExpr;\n\nnamespace internal {\ntemplate<typename MatrixType, typename MemberOp, int Direction>\nstruct traits<PartialReduxExpr<MatrixType, MemberOp, Direction> >\n : traits<MatrixType>\n{\n  typedef typename MemberOp::result_type Scalar;\n  typedef typename traits<MatrixType>::StorageKind StorageKind;\n  typedef typename traits<MatrixType>::XprKind XprKind;\n  typedef typename MatrixType::Scalar InputScalar;\n  enum {\n    RowsAtCompileTime = Direction==Vertical   ? 1 : MatrixType::RowsAtCompileTime,\n    ColsAtCompileTime = Direction==Horizontal ? 1 : MatrixType::ColsAtCompileTime,\n    MaxRowsAtCompileTime = Direction==Vertical   ? 1 : MatrixType::MaxRowsAtCompileTime,\n    MaxColsAtCompileTime = Direction==Horizontal ? 1 : MatrixType::MaxColsAtCompileTime,\n    Flags = RowsAtCompileTime == 1 ? RowMajorBit : 0,\n    TraversalSize = Direction==Vertical ? MatrixType::RowsAtCompileTime :  MatrixType::ColsAtCompileTime\n  };\n};\n}\n\ntemplate< typename MatrixType, typename MemberOp, int Direction>\nclass PartialReduxExpr : public internal::dense_xpr_base< PartialReduxExpr<MatrixType, MemberOp, Direction> >::type,\n                         internal::no_assignment_operator\n{\n  public:\n\n    typedef typename internal::dense_xpr_base<PartialReduxExpr>::type Base;\n    EIGEN_DENSE_PUBLIC_INTERFACE(PartialReduxExpr)\n\n    EIGEN_DEVICE_FUNC\n    explicit PartialReduxExpr(const MatrixType& mat, const MemberOp& func = MemberOp())\n      : m_matrix(mat), m_functor(func) {}\n\n    EIGEN_DEVICE_FUNC\n    Index rows() const { return (Direction==Vertical   ? 1 : m_matrix.rows()); }\n    EIGEN_DEVICE_FUNC\n    Index cols() const { return (Direction==Horizontal ? 1 : m_matrix.cols()); }\n\n    EIGEN_DEVICE_FUNC\n    typename MatrixType::Nested nestedExpression() const { return m_matrix; }\n\n    EIGEN_DEVICE_FUNC\n    const MemberOp& functor() const { return m_functor; }\n\n  protected:\n    typename MatrixType::Nested m_matrix;\n    const MemberOp m_functor;\n};\n\ntemplate<typename A,typename B> struct partial_redux_dummy_func;\n\n#define EIGEN_MAKE_PARTIAL_REDUX_FUNCTOR(MEMBER,COST,VECTORIZABLE,BINARYOP)                \\\n  template <typename ResultType,typename Scalar>                                                            \\\n  struct member_##MEMBER {                                                                  \\\n    EIGEN_EMPTY_STRUCT_CTOR(member_##MEMBER)                                                \\\n    typedef ResultType result_type;                                                         \\\n    typedef BINARYOP<Scalar,Scalar> BinaryOp;   \\\n    template<int Size> struct Cost { enum { value = COST }; };             \\\n    enum { Vectorizable = VECTORIZABLE };                                                   \\\n    template<typename XprType>                                                              \\\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE                                                   \\\n    ResultType operator()(const XprType& mat) const                                         \\\n    { return mat.MEMBER(); }                                                                \\\n    BinaryOp binaryFunc() const { return BinaryOp(); }                                      \\\n  }\n\n#define EIGEN_MEMBER_FUNCTOR(MEMBER,COST) \\\n  EIGEN_MAKE_PARTIAL_REDUX_FUNCTOR(MEMBER,COST,0,partial_redux_dummy_func)\n\nnamespace internal {\n\nEIGEN_MEMBER_FUNCTOR(norm, (Size+5) * NumTraits<Scalar>::MulCost + (Size-1)*NumTraits<Scalar>::AddCost);\nEIGEN_MEMBER_FUNCTOR(stableNorm, (Size+5) * NumTraits<Scalar>::MulCost + (Size-1)*NumTraits<Scalar>::AddCost);\nEIGEN_MEMBER_FUNCTOR(blueNorm, (Size+5) * NumTraits<Scalar>::MulCost + (Size-1)*NumTraits<Scalar>::AddCost);\nEIGEN_MEMBER_FUNCTOR(hypotNorm, (Size-1) * functor_traits<scalar_hypot_op<Scalar> >::Cost );\nEIGEN_MEMBER_FUNCTOR(all, (Size-1)*NumTraits<Scalar>::AddCost);\nEIGEN_MEMBER_FUNCTOR(any, (Size-1)*NumTraits<Scalar>::AddCost);\nEIGEN_MEMBER_FUNCTOR(count, (Size-1)*NumTraits<Scalar>::AddCost);\n\nEIGEN_MAKE_PARTIAL_REDUX_FUNCTOR(sum, (Size-1)*NumTraits<Scalar>::AddCost, 1, internal::scalar_sum_op);\nEIGEN_MAKE_PARTIAL_REDUX_FUNCTOR(minCoeff, (Size-1)*NumTraits<Scalar>::AddCost, 1, internal::scalar_min_op);\nEIGEN_MAKE_PARTIAL_REDUX_FUNCTOR(maxCoeff, (Size-1)*NumTraits<Scalar>::AddCost, 1, internal::scalar_max_op);\nEIGEN_MAKE_PARTIAL_REDUX_FUNCTOR(prod, (Size-1)*NumTraits<Scalar>::MulCost, 1, internal::scalar_product_op);\n\ntemplate <int p, typename ResultType,typename Scalar>\nstruct member_lpnorm {\n  typedef ResultType result_type;\n  enum { Vectorizable = 0 };\n  template<int Size> struct Cost\n  { enum { value = (Size+5) * NumTraits<Scalar>::MulCost + (Size-1)*NumTraits<Scalar>::AddCost }; };\n  EIGEN_DEVICE_FUNC member_lpnorm() {}\n  template<typename XprType>\n  EIGEN_DEVICE_FUNC inline ResultType operator()(const XprType& mat) const\n  { return mat.template lpNorm<p>(); }\n};\n\ntemplate <typename BinaryOpT, typename Scalar>\nstruct member_redux {\n  typedef BinaryOpT BinaryOp;\n  typedef typename result_of<\n                     BinaryOp(const Scalar&,const Scalar&)\n                   >::type  result_type;\n  \n  enum { Vectorizable = functor_traits<BinaryOp>::PacketAccess };\n  template<int Size> struct Cost { enum { value = (Size-1) * functor_traits<BinaryOp>::Cost }; };\n  EIGEN_DEVICE_FUNC explicit member_redux(const BinaryOp func) : m_functor(func) {}\n  template<typename Derived>\n  EIGEN_DEVICE_FUNC inline result_type operator()(const DenseBase<Derived>& mat) const\n  { return mat.redux(m_functor); }\n  const BinaryOp& binaryFunc() const { return m_functor; }\n  const BinaryOp m_functor;\n};\n}\n\n/** \\class VectorwiseOp\n  * \\ingroup Core_Module\n  *\n  * \\brief Pseudo expression providing broadcasting and partial reduction operations\n  *\n  * \\tparam ExpressionType the type of the object on which to do partial reductions\n  * \\tparam Direction indicates whether to operate on columns (#Vertical) or rows (#Horizontal)\n  *\n  * This class represents a pseudo expression with broadcasting and partial reduction features.\n  * It is the return type of DenseBase::colwise() and DenseBase::rowwise()\n  * and most of the time this is the only way it is explicitly used.\n  *\n  * To understand the logic of rowwise/colwise expression, let's consider a generic case `A.colwise().foo()`\n  * where `foo` is any method of `VectorwiseOp`. This expression is equivalent to applying `foo()` to each\n  * column of `A` and then re-assemble the outputs in a matrix expression:\n  * \\code [A.col(0).foo(), A.col(1).foo(), ..., A.col(A.cols()-1).foo()] \\endcode\n  * \n  * Example: \\include MatrixBase_colwise.cpp\n  * Output: \\verbinclude MatrixBase_colwise.out\n  *\n  * The begin() and end() methods are obviously exceptions to the previous rule as they\n  * return STL-compatible begin/end iterators to the rows or columns of the nested expression.\n  * Typical use cases include for-range-loop and calls to STL algorithms:\n  * \n  * Example: \\include MatrixBase_colwise_iterator_cxx11.cpp\n  * Output: \\verbinclude MatrixBase_colwise_iterator_cxx11.out\n  * \n  * For a partial reduction on an empty input, some rules apply.\n  * For the sake of clarity, let's consider a vertical reduction:\n  *   - If the number of columns is zero, then a 1x0 row-major vector expression is returned.\n  *   - Otherwise, if the number of rows is zero, then\n  *       - a row vector of zeros is returned for sum-like reductions (sum, squaredNorm, norm, etc.)\n  *       - a row vector of ones is returned for a product reduction (e.g., <code>MatrixXd(n,0).colwise().prod()</code>)\n  *       - an assert is triggered for all other reductions (minCoeff,maxCoeff,redux(bin_op))\n  * \n  * \\sa DenseBase::colwise(), DenseBase::rowwise(), class PartialReduxExpr\n  */\ntemplate<typename ExpressionType, int Direction> class VectorwiseOp\n{\n  public:\n\n    typedef typename ExpressionType::Scalar Scalar;\n    typedef typename ExpressionType::RealScalar RealScalar;\n    typedef Eigen::Index Index; ///< \\deprecated since Eigen 3.3\n    typedef typename internal::ref_selector<ExpressionType>::non_const_type ExpressionTypeNested;\n    typedef typename internal::remove_all<ExpressionTypeNested>::type ExpressionTypeNestedCleaned;\n\n    template<template<typename OutScalar,typename InputScalar> class Functor,\n                      typename ReturnScalar=Scalar> struct ReturnType\n    {\n      typedef PartialReduxExpr<ExpressionType,\n                               Functor<ReturnScalar,Scalar>,\n                               Direction\n                              > Type;\n    };\n\n    template<typename BinaryOp> struct ReduxReturnType\n    {\n      typedef PartialReduxExpr<ExpressionType,\n                               internal::member_redux<BinaryOp,Scalar>,\n                               Direction\n                              > Type;\n    };\n\n    enum {\n      isVertical   = (Direction==Vertical) ? 1 : 0,\n      isHorizontal = (Direction==Horizontal) ? 1 : 0\n    };\n\n  protected:\n  \n    template<typename OtherDerived> struct ExtendedType {\n      typedef Replicate<OtherDerived,\n                        isVertical   ? 1 : ExpressionType::RowsAtCompileTime,\n                        isHorizontal ? 1 : ExpressionType::ColsAtCompileTime> Type;\n    };\n\n    /** \\internal\n      * Replicates a vector to match the size of \\c *this */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    typename ExtendedType<OtherDerived>::Type\n    extendedTo(const DenseBase<OtherDerived>& other) const\n    {\n      EIGEN_STATIC_ASSERT(EIGEN_IMPLIES(isVertical, OtherDerived::MaxColsAtCompileTime==1),\n                          YOU_PASSED_A_ROW_VECTOR_BUT_A_COLUMN_VECTOR_WAS_EXPECTED)\n      EIGEN_STATIC_ASSERT(EIGEN_IMPLIES(isHorizontal, OtherDerived::MaxRowsAtCompileTime==1),\n                          YOU_PASSED_A_COLUMN_VECTOR_BUT_A_ROW_VECTOR_WAS_EXPECTED)\n      return typename ExtendedType<OtherDerived>::Type\n                      (other.derived(),\n                       isVertical   ? 1 : m_matrix.rows(),\n                       isHorizontal ? 1 : m_matrix.cols());\n    }\n\n    template<typename OtherDerived> struct OppositeExtendedType {\n      typedef Replicate<OtherDerived,\n                        isHorizontal ? 1 : ExpressionType::RowsAtCompileTime,\n                        isVertical   ? 1 : ExpressionType::ColsAtCompileTime> Type;\n    };\n\n    /** \\internal\n      * Replicates a vector in the opposite direction to match the size of \\c *this */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    typename OppositeExtendedType<OtherDerived>::Type\n    extendedToOpposite(const DenseBase<OtherDerived>& other) const\n    {\n      EIGEN_STATIC_ASSERT(EIGEN_IMPLIES(isHorizontal, OtherDerived::MaxColsAtCompileTime==1),\n                          YOU_PASSED_A_ROW_VECTOR_BUT_A_COLUMN_VECTOR_WAS_EXPECTED)\n      EIGEN_STATIC_ASSERT(EIGEN_IMPLIES(isVertical, OtherDerived::MaxRowsAtCompileTime==1),\n                          YOU_PASSED_A_COLUMN_VECTOR_BUT_A_ROW_VECTOR_WAS_EXPECTED)\n      return typename OppositeExtendedType<OtherDerived>::Type\n                      (other.derived(),\n                       isHorizontal  ? 1 : m_matrix.rows(),\n                       isVertical    ? 1 : m_matrix.cols());\n    }\n\n  public:\n    EIGEN_DEVICE_FUNC\n    explicit inline VectorwiseOp(ExpressionType& matrix) : m_matrix(matrix) {}\n\n    /** \\internal */\n    EIGEN_DEVICE_FUNC\n    inline const ExpressionType& _expression() const { return m_matrix; }\n\n    #ifdef EIGEN_PARSED_BY_DOXYGEN\n    /** STL-like <a href=\"https://en.cppreference.com/w/cpp/named_req/RandomAccessIterator\">RandomAccessIterator</a>\n      * iterator type over the columns or rows as returned by the begin() and end() methods.\n      */\n    random_access_iterator_type iterator;\n    /** This is the const version of iterator (aka read-only) */\n    random_access_iterator_type const_iterator;\n    #else\n    typedef internal::subvector_stl_iterator<ExpressionType,       DirectionType(Direction)> iterator;\n    typedef internal::subvector_stl_iterator<const ExpressionType, DirectionType(Direction)> const_iterator;\n    #endif\n\n    /** returns an iterator to the first row (rowwise) or column (colwise) of the nested expression.\n      * \\sa end(), cbegin()\n      */\n    iterator        begin()       { return iterator      (m_matrix, 0); }\n    /** const version of begin() */\n    const_iterator  begin() const { return const_iterator(m_matrix, 0); }\n    /** const version of begin() */\n    const_iterator cbegin() const { return const_iterator(m_matrix, 0); }\n\n    /** returns an iterator to the row (resp. column) following the last row (resp. column) of the nested expression\n      * \\sa begin(), cend()\n      */\n    iterator        end()         { return iterator      (m_matrix, m_matrix.template subVectors<DirectionType(Direction)>()); }\n    /** const version of end() */\n    const_iterator  end()   const { return const_iterator(m_matrix, m_matrix.template subVectors<DirectionType(Direction)>()); }\n    /** const version of end() */\n    const_iterator cend()   const { return const_iterator(m_matrix, m_matrix.template subVectors<DirectionType(Direction)>()); }\n\n    /** \\returns a row or column vector expression of \\c *this reduxed by \\a func\n      *\n      * The template parameter \\a BinaryOp is the type of the functor\n      * of the custom redux operator. Note that func must be an associative operator.\n      *\n      * \\warning the size along the reduction direction must be strictly positive,\n      *          otherwise an assertion is triggered.\n      * \n      * \\sa class VectorwiseOp, DenseBase::colwise(), DenseBase::rowwise()\n      */\n    template<typename BinaryOp>\n    EIGEN_DEVICE_FUNC\n    const typename ReduxReturnType<BinaryOp>::Type\n    redux(const BinaryOp& func = BinaryOp()) const\n    {\n      eigen_assert(redux_length()>0 && \"you are using an empty matrix\");\n      return typename ReduxReturnType<BinaryOp>::Type(_expression(), internal::member_redux<BinaryOp,Scalar>(func));\n    }\n\n    typedef typename ReturnType<internal::member_minCoeff>::Type MinCoeffReturnType;\n    typedef typename ReturnType<internal::member_maxCoeff>::Type MaxCoeffReturnType;\n    typedef PartialReduxExpr<const CwiseUnaryOp<internal::scalar_abs2_op<Scalar>, const ExpressionTypeNestedCleaned>,internal::member_sum<RealScalar,RealScalar>,Direction> SquaredNormReturnType;\n    typedef CwiseUnaryOp<internal::scalar_sqrt_op<RealScalar>, const SquaredNormReturnType> NormReturnType;\n    typedef typename ReturnType<internal::member_blueNorm,RealScalar>::Type BlueNormReturnType;\n    typedef typename ReturnType<internal::member_stableNorm,RealScalar>::Type StableNormReturnType;\n    typedef typename ReturnType<internal::member_hypotNorm,RealScalar>::Type HypotNormReturnType;\n    typedef typename ReturnType<internal::member_sum>::Type SumReturnType;\n    typedef EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(SumReturnType,Scalar,quotient) MeanReturnType;\n    typedef typename ReturnType<internal::member_all>::Type AllReturnType;\n    typedef typename ReturnType<internal::member_any>::Type AnyReturnType;\n    typedef PartialReduxExpr<ExpressionType, internal::member_count<Index,Scalar>, Direction> CountReturnType;\n    typedef typename ReturnType<internal::member_prod>::Type ProdReturnType;\n    typedef Reverse<const ExpressionType, Direction> ConstReverseReturnType;\n    typedef Reverse<ExpressionType, Direction> ReverseReturnType;\n\n    template<int p> struct LpNormReturnType {\n      typedef PartialReduxExpr<ExpressionType, internal::member_lpnorm<p,RealScalar,Scalar>,Direction> Type;\n    };\n\n    /** \\returns a row (or column) vector expression of the smallest coefficient\n      * of each column (or row) of the referenced expression.\n      *\n      * \\warning the size along the reduction direction must be strictly positive,\n      *          otherwise an assertion is triggered.\n      * \n      * \\warning the result is undefined if \\c *this contains NaN.\n      *\n      * Example: \\include PartialRedux_minCoeff.cpp\n      * Output: \\verbinclude PartialRedux_minCoeff.out\n      *\n      * \\sa DenseBase::minCoeff() */\n    EIGEN_DEVICE_FUNC\n    const MinCoeffReturnType minCoeff() const\n    {\n      eigen_assert(redux_length()>0 && \"you are using an empty matrix\");\n      return MinCoeffReturnType(_expression());\n    }\n\n    /** \\returns a row (or column) vector expression of the largest coefficient\n      * of each column (or row) of the referenced expression.\n      *\n      * \\warning the size along the reduction direction must be strictly positive,\n      *          otherwise an assertion is triggered.\n      * \n      * \\warning the result is undefined if \\c *this contains NaN.\n      *\n      * Example: \\include PartialRedux_maxCoeff.cpp\n      * Output: \\verbinclude PartialRedux_maxCoeff.out\n      *\n      * \\sa DenseBase::maxCoeff() */\n    EIGEN_DEVICE_FUNC\n    const MaxCoeffReturnType maxCoeff() const\n    {\n      eigen_assert(redux_length()>0 && \"you are using an empty matrix\");\n      return MaxCoeffReturnType(_expression());\n    }\n\n    /** \\returns a row (or column) vector expression of the squared norm\n      * of each column (or row) of the referenced expression.\n      * This is a vector with real entries, even if the original matrix has complex entries.\n      *\n      * Example: \\include PartialRedux_squaredNorm.cpp\n      * Output: \\verbinclude PartialRedux_squaredNorm.out\n      *\n      * \\sa DenseBase::squaredNorm() */\n    EIGEN_DEVICE_FUNC\n    const SquaredNormReturnType squaredNorm() const\n    { return SquaredNormReturnType(m_matrix.cwiseAbs2()); }\n\n    /** \\returns a row (or column) vector expression of the norm\n      * of each column (or row) of the referenced expression.\n      * This is a vector with real entries, even if the original matrix has complex entries.\n      *\n      * Example: \\include PartialRedux_norm.cpp\n      * Output: \\verbinclude PartialRedux_norm.out\n      *\n      * \\sa DenseBase::norm() */\n    EIGEN_DEVICE_FUNC\n    const NormReturnType norm() const\n    { return NormReturnType(squaredNorm()); }\n\n    /** \\returns a row (or column) vector expression of the norm\n      * of each column (or row) of the referenced expression.\n      * This is a vector with real entries, even if the original matrix has complex entries.\n      *\n      * Example: \\include PartialRedux_norm.cpp\n      * Output: \\verbinclude PartialRedux_norm.out\n      *\n      * \\sa DenseBase::norm() */\n    template<int p>\n    EIGEN_DEVICE_FUNC\n    const typename LpNormReturnType<p>::Type lpNorm() const\n    { return typename LpNormReturnType<p>::Type(_expression()); }\n\n\n    /** \\returns a row (or column) vector expression of the norm\n      * of each column (or row) of the referenced expression, using\n      * Blue's algorithm.\n      * This is a vector with real entries, even if the original matrix has complex entries.\n      *\n      * \\sa DenseBase::blueNorm() */\n    EIGEN_DEVICE_FUNC\n    const BlueNormReturnType blueNorm() const\n    { return BlueNormReturnType(_expression()); }\n\n\n    /** \\returns a row (or column) vector expression of the norm\n      * of each column (or row) of the referenced expression, avoiding\n      * underflow and overflow.\n      * This is a vector with real entries, even if the original matrix has complex entries.\n      *\n      * \\sa DenseBase::stableNorm() */\n    EIGEN_DEVICE_FUNC\n    const StableNormReturnType stableNorm() const\n    { return StableNormReturnType(_expression()); }\n\n\n    /** \\returns a row (or column) vector expression of the norm\n      * of each column (or row) of the referenced expression, avoiding\n      * underflow and overflow using a concatenation of hypot() calls.\n      * This is a vector with real entries, even if the original matrix has complex entries.\n      *\n      * \\sa DenseBase::hypotNorm() */\n    EIGEN_DEVICE_FUNC\n    const HypotNormReturnType hypotNorm() const\n    { return HypotNormReturnType(_expression()); }\n\n    /** \\returns a row (or column) vector expression of the sum\n      * of each column (or row) of the referenced expression.\n      *\n      * Example: \\include PartialRedux_sum.cpp\n      * Output: \\verbinclude PartialRedux_sum.out\n      *\n      * \\sa DenseBase::sum() */\n    EIGEN_DEVICE_FUNC\n    const SumReturnType sum() const\n    { return SumReturnType(_expression()); }\n\n    /** \\returns a row (or column) vector expression of the mean\n    * of each column (or row) of the referenced expression.\n    *\n    * \\sa DenseBase::mean() */\n    EIGEN_DEVICE_FUNC\n    const MeanReturnType mean() const\n    { return sum() / Scalar(Direction==Vertical?m_matrix.rows():m_matrix.cols()); }\n\n    /** \\returns a row (or column) vector expression representing\n      * whether \\b all coefficients of each respective column (or row) are \\c true.\n      * This expression can be assigned to a vector with entries of type \\c bool.\n      *\n      * \\sa DenseBase::all() */\n    EIGEN_DEVICE_FUNC\n    const AllReturnType all() const\n    { return AllReturnType(_expression()); }\n\n    /** \\returns a row (or column) vector expression representing\n      * whether \\b at \\b least one coefficient of each respective column (or row) is \\c true.\n      * This expression can be assigned to a vector with entries of type \\c bool.\n      *\n      * \\sa DenseBase::any() */\n    EIGEN_DEVICE_FUNC\n    const AnyReturnType any() const\n    { return AnyReturnType(_expression()); }\n\n    /** \\returns a row (or column) vector expression representing\n      * the number of \\c true coefficients of each respective column (or row).\n      * This expression can be assigned to a vector whose entries have the same type as is used to\n      * index entries of the original matrix; for dense matrices, this is \\c std::ptrdiff_t .\n      *\n      * Example: \\include PartialRedux_count.cpp\n      * Output: \\verbinclude PartialRedux_count.out\n      *\n      * \\sa DenseBase::count() */\n    EIGEN_DEVICE_FUNC\n    const CountReturnType count() const\n    { return CountReturnType(_expression()); }\n\n    /** \\returns a row (or column) vector expression of the product\n      * of each column (or row) of the referenced expression.\n      *\n      * Example: \\include PartialRedux_prod.cpp\n      * Output: \\verbinclude PartialRedux_prod.out\n      *\n      * \\sa DenseBase::prod() */\n    EIGEN_DEVICE_FUNC\n    const ProdReturnType prod() const\n    { return ProdReturnType(_expression()); }\n\n\n    /** \\returns a matrix expression\n      * where each column (or row) are reversed.\n      *\n      * Example: \\include Vectorwise_reverse.cpp\n      * Output: \\verbinclude Vectorwise_reverse.out\n      *\n      * \\sa DenseBase::reverse() */\n    EIGEN_DEVICE_FUNC\n    const ConstReverseReturnType reverse() const\n    { return ConstReverseReturnType( _expression() ); }\n\n    /** \\returns a writable matrix expression\n      * where each column (or row) are reversed.\n      *\n      * \\sa reverse() const */\n    EIGEN_DEVICE_FUNC\n    ReverseReturnType reverse()\n    { return ReverseReturnType( _expression() ); }\n\n    typedef Replicate<ExpressionType,(isVertical?Dynamic:1),(isHorizontal?Dynamic:1)> ReplicateReturnType;\n    EIGEN_DEVICE_FUNC\n    const ReplicateReturnType replicate(Index factor) const;\n\n    /**\n      * \\return an expression of the replication of each column (or row) of \\c *this\n      *\n      * Example: \\include DirectionWise_replicate.cpp\n      * Output: \\verbinclude DirectionWise_replicate.out\n      *\n      * \\sa VectorwiseOp::replicate(Index), DenseBase::replicate(), class Replicate\n      */\n    // NOTE implemented here because of sunstudio's compilation errors\n    // isVertical*Factor+isHorizontal instead of (isVertical?Factor:1) to handle CUDA bug with ternary operator\n    template<int Factor> const Replicate<ExpressionType,isVertical*Factor+isHorizontal,isHorizontal*Factor+isVertical>\n    EIGEN_DEVICE_FUNC\n    replicate(Index factor = Factor) const\n    {\n      return Replicate<ExpressionType,(isVertical?Factor:1),(isHorizontal?Factor:1)>\n          (_expression(),isVertical?factor:1,isHorizontal?factor:1);\n    }\n\n/////////// Artithmetic operators ///////////\n\n    /** Copies the vector \\a other to each subvector of \\c *this */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    ExpressionType& operator=(const DenseBase<OtherDerived>& other)\n    {\n      EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)\n      EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived)\n      //eigen_assert((m_matrix.isNull()) == (other.isNull())); FIXME\n      return m_matrix = extendedTo(other.derived());\n    }\n\n    /** Adds the vector \\a other to each subvector of \\c *this */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    ExpressionType& operator+=(const DenseBase<OtherDerived>& other)\n    {\n      EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)\n      EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived)\n      return m_matrix += extendedTo(other.derived());\n    }\n\n    /** Substracts the vector \\a other to each subvector of \\c *this */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    ExpressionType& operator-=(const DenseBase<OtherDerived>& other)\n    {\n      EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)\n      EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived)\n      return m_matrix -= extendedTo(other.derived());\n    }\n\n    /** Multiples each subvector of \\c *this by the vector \\a other */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    ExpressionType& operator*=(const DenseBase<OtherDerived>& other)\n    {\n      EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)\n      EIGEN_STATIC_ASSERT_ARRAYXPR(ExpressionType)\n      EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived)\n      m_matrix *= extendedTo(other.derived());\n      return m_matrix;\n    }\n\n    /** Divides each subvector of \\c *this by the vector \\a other */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    ExpressionType& operator/=(const DenseBase<OtherDerived>& other)\n    {\n      EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)\n      EIGEN_STATIC_ASSERT_ARRAYXPR(ExpressionType)\n      EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived)\n      m_matrix /= extendedTo(other.derived());\n      return m_matrix;\n    }\n\n    /** Returns the expression of the sum of the vector \\a other to each subvector of \\c *this */\n    template<typename OtherDerived> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC\n    CwiseBinaryOp<internal::scalar_sum_op<Scalar,typename OtherDerived::Scalar>,\n                  const ExpressionTypeNestedCleaned,\n                  const typename ExtendedType<OtherDerived>::Type>\n    operator+(const DenseBase<OtherDerived>& other) const\n    {\n      EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)\n      EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived)\n      return m_matrix + extendedTo(other.derived());\n    }\n\n    /** Returns the expression of the difference between each subvector of \\c *this and the vector \\a other */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    CwiseBinaryOp<internal::scalar_difference_op<Scalar,typename OtherDerived::Scalar>,\n                  const ExpressionTypeNestedCleaned,\n                  const typename ExtendedType<OtherDerived>::Type>\n    operator-(const DenseBase<OtherDerived>& other) const\n    {\n      EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)\n      EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived)\n      return m_matrix - extendedTo(other.derived());\n    }\n\n    /** Returns the expression where each subvector is the product of the vector \\a other\n      * by the corresponding subvector of \\c *this */\n    template<typename OtherDerived> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC\n    CwiseBinaryOp<internal::scalar_product_op<Scalar>,\n                  const ExpressionTypeNestedCleaned,\n                  const typename ExtendedType<OtherDerived>::Type>\n    EIGEN_DEVICE_FUNC\n    operator*(const DenseBase<OtherDerived>& other) const\n    {\n      EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)\n      EIGEN_STATIC_ASSERT_ARRAYXPR(ExpressionType)\n      EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived)\n      return m_matrix * extendedTo(other.derived());\n    }\n\n    /** Returns the expression where each subvector is the quotient of the corresponding\n      * subvector of \\c *this by the vector \\a other */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    CwiseBinaryOp<internal::scalar_quotient_op<Scalar>,\n                  const ExpressionTypeNestedCleaned,\n                  const typename ExtendedType<OtherDerived>::Type>\n    operator/(const DenseBase<OtherDerived>& other) const\n    {\n      EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)\n      EIGEN_STATIC_ASSERT_ARRAYXPR(ExpressionType)\n      EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived)\n      return m_matrix / extendedTo(other.derived());\n    }\n\n    /** \\returns an expression where each column (or row) of the referenced matrix are normalized.\n      * The referenced matrix is \\b not modified.\n      * \\sa MatrixBase::normalized(), normalize()\n      */\n    EIGEN_DEVICE_FUNC\n    CwiseBinaryOp<internal::scalar_quotient_op<Scalar>,\n                  const ExpressionTypeNestedCleaned,\n                  const typename OppositeExtendedType<NormReturnType>::Type>\n    normalized() const { return m_matrix.cwiseQuotient(extendedToOpposite(this->norm())); }\n\n\n    /** Normalize in-place each row or columns of the referenced matrix.\n      * \\sa MatrixBase::normalize(), normalized()\n      */\n    EIGEN_DEVICE_FUNC void normalize() {\n      m_matrix = this->normalized();\n    }\n\n    EIGEN_DEVICE_FUNC inline void reverseInPlace();\n\n/////////// Geometry module ///////////\n\n    typedef Homogeneous<ExpressionType,Direction> HomogeneousReturnType;\n    EIGEN_DEVICE_FUNC\n    HomogeneousReturnType homogeneous() const;\n\n    typedef typename ExpressionType::PlainObject CrossReturnType;\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    const CrossReturnType cross(const MatrixBase<OtherDerived>& other) const;\n\n    enum {\n      HNormalized_Size = Direction==Vertical ? internal::traits<ExpressionType>::RowsAtCompileTime\n                                             : internal::traits<ExpressionType>::ColsAtCompileTime,\n      HNormalized_SizeMinusOne = HNormalized_Size==Dynamic ? Dynamic : HNormalized_Size-1\n    };\n    typedef Block<const ExpressionType,\n                  Direction==Vertical   ? int(HNormalized_SizeMinusOne)\n                                        : int(internal::traits<ExpressionType>::RowsAtCompileTime),\n                  Direction==Horizontal ? int(HNormalized_SizeMinusOne)\n                                        : int(internal::traits<ExpressionType>::ColsAtCompileTime)>\n            HNormalized_Block;\n    typedef Block<const ExpressionType,\n                  Direction==Vertical   ? 1 : int(internal::traits<ExpressionType>::RowsAtCompileTime),\n                  Direction==Horizontal ? 1 : int(internal::traits<ExpressionType>::ColsAtCompileTime)>\n            HNormalized_Factors;\n    typedef CwiseBinaryOp<internal::scalar_quotient_op<typename internal::traits<ExpressionType>::Scalar>,\n                const HNormalized_Block,\n                const Replicate<HNormalized_Factors,\n                  Direction==Vertical   ? HNormalized_SizeMinusOne : 1,\n                  Direction==Horizontal ? HNormalized_SizeMinusOne : 1> >\n            HNormalizedReturnType;\n\n    EIGEN_DEVICE_FUNC\n    const HNormalizedReturnType hnormalized() const;\n\n#   ifdef EIGEN_VECTORWISEOP_PLUGIN\n#     include EIGEN_VECTORWISEOP_PLUGIN\n#   endif\n\n  protected:\n    Index redux_length() const\n    {\n      return Direction==Vertical ? m_matrix.rows() : m_matrix.cols();\n    }\n    ExpressionTypeNested m_matrix;\n};\n\n//const colwise moved to DenseBase.h due to CUDA compiler bug\n\n\n/** \\returns a writable VectorwiseOp wrapper of *this providing additional partial reduction operations\n  *\n  * \\sa rowwise(), class VectorwiseOp, \\ref TutorialReductionsVisitorsBroadcasting\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC inline typename DenseBase<Derived>::ColwiseReturnType\nDenseBase<Derived>::colwise()\n{\n  return ColwiseReturnType(derived());\n}\n\n//const rowwise moved to DenseBase.h due to CUDA compiler bug\n\n\n/** \\returns a writable VectorwiseOp wrapper of *this providing additional partial reduction operations\n  *\n  * \\sa colwise(), class VectorwiseOp, \\ref TutorialReductionsVisitorsBroadcasting\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC inline typename DenseBase<Derived>::RowwiseReturnType\nDenseBase<Derived>::rowwise()\n{\n  return RowwiseReturnType(derived());\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_PARTIAL_REDUX_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/Visitor.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_VISITOR_H\n#define EIGEN_VISITOR_H\n\nnamespace Eigen { \n\nnamespace internal {\n\ntemplate<typename Visitor, typename Derived, int UnrollCount>\nstruct visitor_impl\n{\n  enum {\n    col = (UnrollCount-1) / Derived::RowsAtCompileTime,\n    row = (UnrollCount-1) % Derived::RowsAtCompileTime\n  };\n\n  EIGEN_DEVICE_FUNC\n  static inline void run(const Derived &mat, Visitor& visitor)\n  {\n    visitor_impl<Visitor, Derived, UnrollCount-1>::run(mat, visitor);\n    visitor(mat.coeff(row, col), row, col);\n  }\n};\n\ntemplate<typename Visitor, typename Derived>\nstruct visitor_impl<Visitor, Derived, 1>\n{\n  EIGEN_DEVICE_FUNC\n  static inline void run(const Derived &mat, Visitor& visitor)\n  {\n    return visitor.init(mat.coeff(0, 0), 0, 0);\n  }\n};\n\n// This specialization enables visitors on empty matrices at compile-time\ntemplate<typename Visitor, typename Derived>\nstruct visitor_impl<Visitor, Derived, 0> {\n  EIGEN_DEVICE_FUNC\n  static inline void run(const Derived &/*mat*/, Visitor& /*visitor*/)\n  {}\n};\n\ntemplate<typename Visitor, typename Derived>\nstruct visitor_impl<Visitor, Derived, Dynamic>\n{\n  EIGEN_DEVICE_FUNC\n  static inline void run(const Derived& mat, Visitor& visitor)\n  {\n    visitor.init(mat.coeff(0,0), 0, 0);\n    for(Index i = 1; i < mat.rows(); ++i)\n      visitor(mat.coeff(i, 0), i, 0);\n    for(Index j = 1; j < mat.cols(); ++j)\n      for(Index i = 0; i < mat.rows(); ++i)\n        visitor(mat.coeff(i, j), i, j);\n  }\n};\n\n// evaluator adaptor\ntemplate<typename XprType>\nclass visitor_evaluator\n{\npublic:\n  EIGEN_DEVICE_FUNC\n  explicit visitor_evaluator(const XprType &xpr) : m_evaluator(xpr), m_xpr(xpr) {}\n  \n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  \n  enum {\n    RowsAtCompileTime = XprType::RowsAtCompileTime,\n    CoeffReadCost = internal::evaluator<XprType>::CoeffReadCost\n  };\n  \n  EIGEN_DEVICE_FUNC Index rows() const { return m_xpr.rows(); }\n  EIGEN_DEVICE_FUNC Index cols() const { return m_xpr.cols(); }\n  EIGEN_DEVICE_FUNC Index size() const { return m_xpr.size(); }\n\n  EIGEN_DEVICE_FUNC CoeffReturnType coeff(Index row, Index col) const\n  { return m_evaluator.coeff(row, col); }\n  \nprotected:\n  internal::evaluator<XprType> m_evaluator;\n  const XprType &m_xpr;\n};\n} // end namespace internal\n\n/** Applies the visitor \\a visitor to the whole coefficients of the matrix or vector.\n  *\n  * The template parameter \\a Visitor is the type of the visitor and provides the following interface:\n  * \\code\n  * struct MyVisitor {\n  *   // called for the first coefficient\n  *   void init(const Scalar& value, Index i, Index j);\n  *   // called for all other coefficients\n  *   void operator() (const Scalar& value, Index i, Index j);\n  * };\n  * \\endcode\n  *\n  * \\note compared to one or two \\em for \\em loops, visitors offer automatic\n  * unrolling for small fixed size matrix.\n  * \n  * \\note if the matrix is empty, then the visitor is left unchanged.\n  *\n  * \\sa minCoeff(Index*,Index*), maxCoeff(Index*,Index*), DenseBase::redux()\n  */\ntemplate<typename Derived>\ntemplate<typename Visitor>\nEIGEN_DEVICE_FUNC\nvoid DenseBase<Derived>::visit(Visitor& visitor) const\n{\n  if(size()==0)\n    return;\n  \n  typedef typename internal::visitor_evaluator<Derived> ThisEvaluator;\n  ThisEvaluator thisEval(derived());\n  \n  enum {\n    unroll =  SizeAtCompileTime != Dynamic\n           && SizeAtCompileTime * ThisEvaluator::CoeffReadCost + (SizeAtCompileTime-1) * internal::functor_traits<Visitor>::Cost <= EIGEN_UNROLLING_LIMIT\n  };\n  return internal::visitor_impl<Visitor, ThisEvaluator, unroll ? int(SizeAtCompileTime) : Dynamic>::run(thisEval, visitor);\n}\n\nnamespace internal {\n\n/** \\internal\n  * \\brief Base class to implement min and max visitors\n  */\ntemplate <typename Derived>\nstruct coeff_visitor\n{\n  // default initialization to avoid countless invalid maybe-uninitialized warnings by gcc\n  EIGEN_DEVICE_FUNC\n  coeff_visitor() : row(-1), col(-1), res(0) {}\n  typedef typename Derived::Scalar Scalar;\n  Index row, col;\n  Scalar res;\n  EIGEN_DEVICE_FUNC\n  inline void init(const Scalar& value, Index i, Index j)\n  {\n    res = value;\n    row = i;\n    col = j;\n  }\n};\n\n/** \\internal\n  * \\brief Visitor computing the min coefficient with its value and coordinates\n  *\n  * \\sa DenseBase::minCoeff(Index*, Index*)\n  */\ntemplate <typename Derived>\nstruct min_coeff_visitor : coeff_visitor<Derived>\n{\n  typedef typename Derived::Scalar Scalar;\n  EIGEN_DEVICE_FUNC\n  void operator() (const Scalar& value, Index i, Index j)\n  {\n    if(value < this->res)\n    {\n      this->res = value;\n      this->row = i;\n      this->col = j;\n    }\n  }\n};\n\ntemplate<typename Scalar>\nstruct functor_traits<min_coeff_visitor<Scalar> > {\n  enum {\n    Cost = NumTraits<Scalar>::AddCost\n  };\n};\n\n/** \\internal\n  * \\brief Visitor computing the max coefficient with its value and coordinates\n  *\n  * \\sa DenseBase::maxCoeff(Index*, Index*)\n  */\ntemplate <typename Derived>\nstruct max_coeff_visitor : coeff_visitor<Derived>\n{\n  typedef typename Derived::Scalar Scalar; \n  EIGEN_DEVICE_FUNC\n  void operator() (const Scalar& value, Index i, Index j)\n  {\n    if(value > this->res)\n    {\n      this->res = value;\n      this->row = i;\n      this->col = j;\n    }\n  }\n};\n\ntemplate<typename Scalar>\nstruct functor_traits<max_coeff_visitor<Scalar> > {\n  enum {\n    Cost = NumTraits<Scalar>::AddCost\n  };\n};\n\n} // end namespace internal\n\n/** \\fn DenseBase<Derived>::minCoeff(IndexType* rowId, IndexType* colId) const\n  * \\returns the minimum of all coefficients of *this and puts in *row and *col its location.\n  * \n  * \\warning the matrix must be not empty, otherwise an assertion is triggered.\n  * \n  * \\warning the result is undefined if \\c *this contains NaN.\n  *\n  * \\sa DenseBase::minCoeff(Index*), DenseBase::maxCoeff(Index*,Index*), DenseBase::visit(), DenseBase::minCoeff()\n  */\ntemplate<typename Derived>\ntemplate<typename IndexType>\nEIGEN_DEVICE_FUNC\ntypename internal::traits<Derived>::Scalar\nDenseBase<Derived>::minCoeff(IndexType* rowId, IndexType* colId) const\n{\n  eigen_assert(this->rows()>0 && this->cols()>0 && \"you are using an empty matrix\");\n\n  internal::min_coeff_visitor<Derived> minVisitor;\n  this->visit(minVisitor);\n  *rowId = minVisitor.row;\n  if (colId) *colId = minVisitor.col;\n  return minVisitor.res;\n}\n\n/** \\returns the minimum of all coefficients of *this and puts in *index its location.\n  * \n  * \\warning the matrix must be not empty, otherwise an assertion is triggered.\n  * \n  * \\warning the result is undefined if \\c *this contains NaN. \n  *\n  * \\sa DenseBase::minCoeff(IndexType*,IndexType*), DenseBase::maxCoeff(IndexType*,IndexType*), DenseBase::visit(), DenseBase::minCoeff()\n  */\ntemplate<typename Derived>\ntemplate<typename IndexType>\nEIGEN_DEVICE_FUNC\ntypename internal::traits<Derived>::Scalar\nDenseBase<Derived>::minCoeff(IndexType* index) const\n{\n  eigen_assert(this->rows()>0 && this->cols()>0 && \"you are using an empty matrix\");\n\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)\n  internal::min_coeff_visitor<Derived> minVisitor;\n  this->visit(minVisitor);\n  *index = IndexType((RowsAtCompileTime==1) ? minVisitor.col : minVisitor.row);\n  return minVisitor.res;\n}\n\n/** \\fn DenseBase<Derived>::maxCoeff(IndexType* rowId, IndexType* colId) const\n  * \\returns the maximum of all coefficients of *this and puts in *row and *col its location.\n  * \n  * \\warning the matrix must be not empty, otherwise an assertion is triggered.\n  * \n  * \\warning the result is undefined if \\c *this contains NaN. \n  *\n  * \\sa DenseBase::minCoeff(IndexType*,IndexType*), DenseBase::visit(), DenseBase::maxCoeff()\n  */\ntemplate<typename Derived>\ntemplate<typename IndexType>\nEIGEN_DEVICE_FUNC\ntypename internal::traits<Derived>::Scalar\nDenseBase<Derived>::maxCoeff(IndexType* rowPtr, IndexType* colPtr) const\n{\n  eigen_assert(this->rows()>0 && this->cols()>0 && \"you are using an empty matrix\");\n\n  internal::max_coeff_visitor<Derived> maxVisitor;\n  this->visit(maxVisitor);\n  *rowPtr = maxVisitor.row;\n  if (colPtr) *colPtr = maxVisitor.col;\n  return maxVisitor.res;\n}\n\n/** \\returns the maximum of all coefficients of *this and puts in *index its location.\n  * \n  * \\warning the matrix must be not empty, otherwise an assertion is triggered.\n  *\n  * \\warning the result is undefined if \\c *this contains NaN.\n  *\n  * \\sa DenseBase::maxCoeff(IndexType*,IndexType*), DenseBase::minCoeff(IndexType*,IndexType*), DenseBase::visitor(), DenseBase::maxCoeff()\n  */\ntemplate<typename Derived>\ntemplate<typename IndexType>\nEIGEN_DEVICE_FUNC\ntypename internal::traits<Derived>::Scalar\nDenseBase<Derived>::maxCoeff(IndexType* index) const\n{\n  eigen_assert(this->rows()>0 && this->cols()>0 && \"you are using an empty matrix\");\n\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)\n  internal::max_coeff_visitor<Derived> maxVisitor;\n  this->visit(maxVisitor);\n  *index = (RowsAtCompileTime==1) ? maxVisitor.col : maxVisitor.row;\n  return maxVisitor.res;\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_VISITOR_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/AVX/Complex.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner (benoit.steiner.goog@gmail.com)\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_COMPLEX_AVX_H\n#define EIGEN_COMPLEX_AVX_H\n\nnamespace Eigen {\n\nnamespace internal {\n\n//---------- float ----------\nstruct Packet4cf\n{\n  EIGEN_STRONG_INLINE Packet4cf() {}\n  EIGEN_STRONG_INLINE explicit Packet4cf(const __m256& a) : v(a) {}\n  __m256  v;\n};\n\n#ifndef EIGEN_VECTORIZE_AVX512\ntemplate<> struct packet_traits<std::complex<float> >  : default_packet_traits\n{\n  typedef Packet4cf type;\n  typedef Packet2cf half;\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size = 4,\n    HasHalfPacket = 1,\n\n    HasAdd    = 1,\n    HasSub    = 1,\n    HasMul    = 1,\n    HasDiv    = 1,\n    HasNegate = 1,\n    HasAbs    = 0,\n    HasAbs2   = 0,\n    HasMin    = 0,\n    HasMax    = 0,\n    HasSetLinear = 0,\n    HasInsert = 1\n  };\n};\n#endif\n\ntemplate<> struct unpacket_traits<Packet4cf> { typedef std::complex<float> type; enum {size=4, alignment=Aligned32, vectorizable=true, masked_load_available=false, masked_store_available=false}; typedef Packet2cf half; };\n\ntemplate<> EIGEN_STRONG_INLINE Packet4cf padd<Packet4cf>(const Packet4cf& a, const Packet4cf& b) { return Packet4cf(_mm256_add_ps(a.v,b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4cf psub<Packet4cf>(const Packet4cf& a, const Packet4cf& b) { return Packet4cf(_mm256_sub_ps(a.v,b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4cf pnegate(const Packet4cf& a)\n{\n  return Packet4cf(pnegate(a.v));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4cf pconj(const Packet4cf& a)\n{\n  const __m256 mask = _mm256_castsi256_ps(_mm256_setr_epi32(0x00000000,0x80000000,0x00000000,0x80000000,0x00000000,0x80000000,0x00000000,0x80000000));\n  return Packet4cf(_mm256_xor_ps(a.v,mask));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4cf pmul<Packet4cf>(const Packet4cf& a, const Packet4cf& b)\n{\n  __m256 tmp1 = _mm256_mul_ps(_mm256_moveldup_ps(a.v), b.v);\n  __m256 tmp2 = _mm256_mul_ps(_mm256_movehdup_ps(a.v), _mm256_permute_ps(b.v, _MM_SHUFFLE(2,3,0,1)));\n  __m256 result = _mm256_addsub_ps(tmp1, tmp2);\n  return Packet4cf(result);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4cf pcmp_eq(const Packet4cf& a, const Packet4cf& b) {\n  __m256 eq = _mm256_cmp_ps(a.v, b.v, _CMP_EQ_OQ);\n  return Packet4cf(_mm256_and_ps(eq, _mm256_permute_ps(eq, 0xb1)));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4cf ptrue<Packet4cf>(const Packet4cf& a) { return Packet4cf(ptrue(Packet8f(a.v))); }\ntemplate<> EIGEN_STRONG_INLINE Packet4cf pnot<Packet4cf>(const Packet4cf& a) { return Packet4cf(pnot(Packet8f(a.v))); }\ntemplate<> EIGEN_STRONG_INLINE Packet4cf pand   <Packet4cf>(const Packet4cf& a, const Packet4cf& b) { return Packet4cf(_mm256_and_ps(a.v,b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4cf por    <Packet4cf>(const Packet4cf& a, const Packet4cf& b) { return Packet4cf(_mm256_or_ps(a.v,b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4cf pxor   <Packet4cf>(const Packet4cf& a, const Packet4cf& b) { return Packet4cf(_mm256_xor_ps(a.v,b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4cf pandnot<Packet4cf>(const Packet4cf& a, const Packet4cf& b) { return Packet4cf(_mm256_andnot_ps(b.v,a.v)); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4cf pload <Packet4cf>(const std::complex<float>* from) { EIGEN_DEBUG_ALIGNED_LOAD return Packet4cf(pload<Packet8f>(&numext::real_ref(*from))); }\ntemplate<> EIGEN_STRONG_INLINE Packet4cf ploadu<Packet4cf>(const std::complex<float>* from) { EIGEN_DEBUG_UNALIGNED_LOAD return Packet4cf(ploadu<Packet8f>(&numext::real_ref(*from))); }\n\n\ntemplate<> EIGEN_STRONG_INLINE Packet4cf pset1<Packet4cf>(const std::complex<float>& from)\n{\n  return Packet4cf(_mm256_castpd_ps(_mm256_broadcast_sd((const double*)(const void*)&from)));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4cf ploaddup<Packet4cf>(const std::complex<float>* from)\n{\n  // FIXME The following might be optimized using _mm256_movedup_pd\n  Packet2cf a = ploaddup<Packet2cf>(from);\n  Packet2cf b = ploaddup<Packet2cf>(from+1);\n  return  Packet4cf(_mm256_insertf128_ps(_mm256_castps128_ps256(a.v), b.v, 1));\n}\n\ntemplate<> EIGEN_STRONG_INLINE void pstore <std::complex<float> >(std::complex<float>* to, const Packet4cf& from) { EIGEN_DEBUG_ALIGNED_STORE pstore(&numext::real_ref(*to), from.v); }\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<std::complex<float> >(std::complex<float>* to, const Packet4cf& from) { EIGEN_DEBUG_UNALIGNED_STORE pstoreu(&numext::real_ref(*to), from.v); }\n\ntemplate<> EIGEN_DEVICE_FUNC inline Packet4cf pgather<std::complex<float>, Packet4cf>(const std::complex<float>* from, Index stride)\n{\n  return Packet4cf(_mm256_set_ps(std::imag(from[3*stride]), std::real(from[3*stride]),\n                                 std::imag(from[2*stride]), std::real(from[2*stride]),\n                                 std::imag(from[1*stride]), std::real(from[1*stride]),\n                                 std::imag(from[0*stride]), std::real(from[0*stride])));\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<std::complex<float>, Packet4cf>(std::complex<float>* to, const Packet4cf& from, Index stride)\n{\n  __m128 low = _mm256_extractf128_ps(from.v, 0);\n  to[stride*0] = std::complex<float>(_mm_cvtss_f32(_mm_shuffle_ps(low, low, 0)),\n                                     _mm_cvtss_f32(_mm_shuffle_ps(low, low, 1)));\n  to[stride*1] = std::complex<float>(_mm_cvtss_f32(_mm_shuffle_ps(low, low, 2)),\n                                     _mm_cvtss_f32(_mm_shuffle_ps(low, low, 3)));\n\n  __m128 high = _mm256_extractf128_ps(from.v, 1);\n  to[stride*2] = std::complex<float>(_mm_cvtss_f32(_mm_shuffle_ps(high, high, 0)),\n                                     _mm_cvtss_f32(_mm_shuffle_ps(high, high, 1)));\n  to[stride*3] = std::complex<float>(_mm_cvtss_f32(_mm_shuffle_ps(high, high, 2)),\n                                     _mm_cvtss_f32(_mm_shuffle_ps(high, high, 3)));\n\n}\n\ntemplate<> EIGEN_STRONG_INLINE std::complex<float>  pfirst<Packet4cf>(const Packet4cf& a)\n{\n  return pfirst(Packet2cf(_mm256_castps256_ps128(a.v)));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4cf preverse(const Packet4cf& a) {\n  __m128 low  = _mm256_extractf128_ps(a.v, 0);\n  __m128 high = _mm256_extractf128_ps(a.v, 1);\n  __m128d lowd  = _mm_castps_pd(low);\n  __m128d highd = _mm_castps_pd(high);\n  low  = _mm_castpd_ps(_mm_shuffle_pd(lowd,lowd,0x1));\n  high = _mm_castpd_ps(_mm_shuffle_pd(highd,highd,0x1));\n  __m256 result = _mm256_setzero_ps();\n  result = _mm256_insertf128_ps(result, low, 1);\n  result = _mm256_insertf128_ps(result, high, 0);\n  return Packet4cf(result);\n}\n\ntemplate<> EIGEN_STRONG_INLINE std::complex<float> predux<Packet4cf>(const Packet4cf& a)\n{\n  return predux(padd(Packet2cf(_mm256_extractf128_ps(a.v,0)),\n                     Packet2cf(_mm256_extractf128_ps(a.v,1))));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4cf preduxp<Packet4cf>(const Packet4cf* vecs)\n{\n  Packet8f t0 = _mm256_shuffle_ps(vecs[0].v, vecs[0].v, _MM_SHUFFLE(3, 1, 2 ,0));\n  Packet8f t1 = _mm256_shuffle_ps(vecs[1].v, vecs[1].v, _MM_SHUFFLE(3, 1, 2 ,0));\n  t0 = _mm256_hadd_ps(t0,t1);\n  Packet8f t2 = _mm256_shuffle_ps(vecs[2].v, vecs[2].v, _MM_SHUFFLE(3, 1, 2 ,0));\n  Packet8f t3 = _mm256_shuffle_ps(vecs[3].v, vecs[3].v, _MM_SHUFFLE(3, 1, 2 ,0));\n  t2 = _mm256_hadd_ps(t2,t3);\n  \n  t1 = _mm256_permute2f128_ps(t0,t2, 0 + (2<<4));\n  t3 = _mm256_permute2f128_ps(t0,t2, 1 + (3<<4));\n\n  return Packet4cf(_mm256_add_ps(t1,t3));\n}\n\ntemplate<> EIGEN_STRONG_INLINE std::complex<float> predux_mul<Packet4cf>(const Packet4cf& a)\n{\n  return predux_mul(pmul(Packet2cf(_mm256_extractf128_ps(a.v, 0)),\n                         Packet2cf(_mm256_extractf128_ps(a.v, 1))));\n}\n\ntemplate<int Offset>\nstruct palign_impl<Offset,Packet4cf>\n{\n  static EIGEN_STRONG_INLINE void run(Packet4cf& first, const Packet4cf& second)\n  {\n    if (Offset==0) return;\n    palign_impl<Offset*2,Packet8f>::run(first.v, second.v);\n  }\n};\n\ntemplate<> struct conj_helper<Packet4cf, Packet4cf, false,true>\n{\n  EIGEN_STRONG_INLINE Packet4cf pmadd(const Packet4cf& x, const Packet4cf& y, const Packet4cf& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet4cf pmul(const Packet4cf& a, const Packet4cf& b) const\n  {\n    return internal::pmul(a, pconj(b));\n  }\n};\n\ntemplate<> struct conj_helper<Packet4cf, Packet4cf, true,false>\n{\n  EIGEN_STRONG_INLINE Packet4cf pmadd(const Packet4cf& x, const Packet4cf& y, const Packet4cf& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet4cf pmul(const Packet4cf& a, const Packet4cf& b) const\n  {\n    return internal::pmul(pconj(a), b);\n  }\n};\n\ntemplate<> struct conj_helper<Packet4cf, Packet4cf, true,true>\n{\n  EIGEN_STRONG_INLINE Packet4cf pmadd(const Packet4cf& x, const Packet4cf& y, const Packet4cf& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet4cf pmul(const Packet4cf& a, const Packet4cf& b) const\n  {\n    return pconj(internal::pmul(a, b));\n  }\n};\n\nEIGEN_MAKE_CONJ_HELPER_CPLX_REAL(Packet4cf,Packet8f)\n\ntemplate<> EIGEN_STRONG_INLINE Packet4cf pdiv<Packet4cf>(const Packet4cf& a, const Packet4cf& b)\n{\n  Packet4cf num = pmul(a, pconj(b));\n  __m256 tmp = _mm256_mul_ps(b.v, b.v);\n  __m256 tmp2    = _mm256_shuffle_ps(tmp,tmp,0xB1);\n  __m256 denom = _mm256_add_ps(tmp, tmp2);\n  return Packet4cf(_mm256_div_ps(num.v, denom));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4cf pcplxflip<Packet4cf>(const Packet4cf& x)\n{\n  return Packet4cf(_mm256_shuffle_ps(x.v, x.v, _MM_SHUFFLE(2, 3, 0 ,1)));\n}\n\n//---------- double ----------\nstruct Packet2cd\n{\n  EIGEN_STRONG_INLINE Packet2cd() {}\n  EIGEN_STRONG_INLINE explicit Packet2cd(const __m256d& a) : v(a) {}\n  __m256d  v;\n};\n\n#ifndef EIGEN_VECTORIZE_AVX512\ntemplate<> struct packet_traits<std::complex<double> >  : default_packet_traits\n{\n  typedef Packet2cd type;\n  typedef Packet1cd half;\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 0,\n    size = 2,\n    HasHalfPacket = 1,\n\n    HasAdd    = 1,\n    HasSub    = 1,\n    HasMul    = 1,\n    HasDiv    = 1,\n    HasNegate = 1,\n    HasAbs    = 0,\n    HasAbs2   = 0,\n    HasMin    = 0,\n    HasMax    = 0,\n    HasSetLinear = 0\n  };\n};\n#endif\n\ntemplate<> struct unpacket_traits<Packet2cd> { typedef std::complex<double> type; enum {size=2, alignment=Aligned32, vectorizable=true, masked_load_available=false, masked_store_available=false}; typedef Packet1cd half; };\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cd padd<Packet2cd>(const Packet2cd& a, const Packet2cd& b) { return Packet2cd(_mm256_add_pd(a.v,b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cd psub<Packet2cd>(const Packet2cd& a, const Packet2cd& b) { return Packet2cd(_mm256_sub_pd(a.v,b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cd pnegate(const Packet2cd& a) { return Packet2cd(pnegate(a.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cd pconj(const Packet2cd& a)\n{\n  const __m256d mask = _mm256_castsi256_pd(_mm256_set_epi32(0x80000000,0x0,0x0,0x0,0x80000000,0x0,0x0,0x0));\n  return Packet2cd(_mm256_xor_pd(a.v,mask));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cd pmul<Packet2cd>(const Packet2cd& a, const Packet2cd& b)\n{\n  __m256d tmp1 = _mm256_shuffle_pd(a.v,a.v,0x0);\n  __m256d even = _mm256_mul_pd(tmp1, b.v);\n  __m256d tmp2 = _mm256_shuffle_pd(a.v,a.v,0xF);\n  __m256d tmp3 = _mm256_shuffle_pd(b.v,b.v,0x5);\n  __m256d odd  = _mm256_mul_pd(tmp2, tmp3);\n  return Packet2cd(_mm256_addsub_pd(even, odd));\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2cd pcmp_eq(const Packet2cd& a, const Packet2cd& b) {\n  __m256d eq = _mm256_cmp_pd(a.v, b.v, _CMP_EQ_OQ);\n  return Packet2cd(pand(eq, _mm256_permute_pd(eq, 0x5)));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cd ptrue<Packet2cd>(const Packet2cd& a) { return Packet2cd(ptrue(Packet4d(a.v))); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cd pnot<Packet2cd>(const Packet2cd& a) { return Packet2cd(pnot(Packet4d(a.v))); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cd pand   <Packet2cd>(const Packet2cd& a, const Packet2cd& b) { return Packet2cd(_mm256_and_pd(a.v,b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cd por    <Packet2cd>(const Packet2cd& a, const Packet2cd& b) { return Packet2cd(_mm256_or_pd(a.v,b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cd pxor   <Packet2cd>(const Packet2cd& a, const Packet2cd& b) { return Packet2cd(_mm256_xor_pd(a.v,b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cd pandnot<Packet2cd>(const Packet2cd& a, const Packet2cd& b) { return Packet2cd(_mm256_andnot_pd(b.v,a.v)); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cd pload <Packet2cd>(const std::complex<double>* from)\n{ EIGEN_DEBUG_ALIGNED_LOAD return Packet2cd(pload<Packet4d>((const double*)from)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cd ploadu<Packet2cd>(const std::complex<double>* from)\n{ EIGEN_DEBUG_UNALIGNED_LOAD return Packet2cd(ploadu<Packet4d>((const double*)from)); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cd pset1<Packet2cd>(const std::complex<double>& from)\n{\n  // in case casting to a __m128d* is really not safe, then we can still fallback to this version: (much slower though)\n//   return Packet2cd(_mm256_loadu2_m128d((const double*)&from,(const double*)&from));\n    return Packet2cd(_mm256_broadcast_pd((const __m128d*)(const void*)&from));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cd ploaddup<Packet2cd>(const std::complex<double>* from) { return pset1<Packet2cd>(*from); }\n\ntemplate<> EIGEN_STRONG_INLINE void pstore <std::complex<double> >(std::complex<double> *   to, const Packet2cd& from) { EIGEN_DEBUG_ALIGNED_STORE pstore((double*)to, from.v); }\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<std::complex<double> >(std::complex<double> *   to, const Packet2cd& from) { EIGEN_DEBUG_UNALIGNED_STORE pstoreu((double*)to, from.v); }\n\ntemplate<> EIGEN_DEVICE_FUNC inline Packet2cd pgather<std::complex<double>, Packet2cd>(const std::complex<double>* from, Index stride)\n{\n  return Packet2cd(_mm256_set_pd(std::imag(from[1*stride]), std::real(from[1*stride]),\n\t\t\t\t std::imag(from[0*stride]), std::real(from[0*stride])));\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<std::complex<double>, Packet2cd>(std::complex<double>* to, const Packet2cd& from, Index stride)\n{\n  __m128d low = _mm256_extractf128_pd(from.v, 0);\n  to[stride*0] = std::complex<double>(_mm_cvtsd_f64(low), _mm_cvtsd_f64(_mm_shuffle_pd(low, low, 1)));\n  __m128d high = _mm256_extractf128_pd(from.v, 1);\n  to[stride*1] = std::complex<double>(_mm_cvtsd_f64(high), _mm_cvtsd_f64(_mm_shuffle_pd(high, high, 1)));\n}\n\ntemplate<> EIGEN_STRONG_INLINE std::complex<double> pfirst<Packet2cd>(const Packet2cd& a)\n{\n  __m128d low = _mm256_extractf128_pd(a.v, 0);\n  EIGEN_ALIGN16 double res[2];\n  _mm_store_pd(res, low);\n  return std::complex<double>(res[0],res[1]);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cd preverse(const Packet2cd& a) {\n  __m256d result = _mm256_permute2f128_pd(a.v, a.v, 1);\n  return Packet2cd(result);\n}\n\ntemplate<> EIGEN_STRONG_INLINE std::complex<double> predux<Packet2cd>(const Packet2cd& a)\n{\n  return predux(padd(Packet1cd(_mm256_extractf128_pd(a.v,0)),\n                     Packet1cd(_mm256_extractf128_pd(a.v,1))));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cd preduxp<Packet2cd>(const Packet2cd* vecs)\n{\n  Packet4d t0 = _mm256_permute2f128_pd(vecs[0].v,vecs[1].v, 0 + (2<<4));\n  Packet4d t1 = _mm256_permute2f128_pd(vecs[0].v,vecs[1].v, 1 + (3<<4));\n\n  return Packet2cd(_mm256_add_pd(t0,t1));\n}\n\ntemplate<> EIGEN_STRONG_INLINE std::complex<double> predux_mul<Packet2cd>(const Packet2cd& a)\n{\n  return predux(pmul(Packet1cd(_mm256_extractf128_pd(a.v,0)),\n                     Packet1cd(_mm256_extractf128_pd(a.v,1))));\n}\n\ntemplate<int Offset>\nstruct palign_impl<Offset,Packet2cd>\n{\n  static EIGEN_STRONG_INLINE void run(Packet2cd& first, const Packet2cd& second)\n  {\n    if (Offset==0) return;\n    palign_impl<Offset*2,Packet4d>::run(first.v, second.v);\n  }\n};\n\ntemplate<> struct conj_helper<Packet2cd, Packet2cd, false,true>\n{\n  EIGEN_STRONG_INLINE Packet2cd pmadd(const Packet2cd& x, const Packet2cd& y, const Packet2cd& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet2cd pmul(const Packet2cd& a, const Packet2cd& b) const\n  {\n    return internal::pmul(a, pconj(b));\n  }\n};\n\ntemplate<> struct conj_helper<Packet2cd, Packet2cd, true,false>\n{\n  EIGEN_STRONG_INLINE Packet2cd pmadd(const Packet2cd& x, const Packet2cd& y, const Packet2cd& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet2cd pmul(const Packet2cd& a, const Packet2cd& b) const\n  {\n    return internal::pmul(pconj(a), b);\n  }\n};\n\ntemplate<> struct conj_helper<Packet2cd, Packet2cd, true,true>\n{\n  EIGEN_STRONG_INLINE Packet2cd pmadd(const Packet2cd& x, const Packet2cd& y, const Packet2cd& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet2cd pmul(const Packet2cd& a, const Packet2cd& b) const\n  {\n    return pconj(internal::pmul(a, b));\n  }\n};\n\nEIGEN_MAKE_CONJ_HELPER_CPLX_REAL(Packet2cd,Packet4d)\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cd pdiv<Packet2cd>(const Packet2cd& a, const Packet2cd& b)\n{\n  Packet2cd num = pmul(a, pconj(b));\n  __m256d tmp = _mm256_mul_pd(b.v, b.v);\n  __m256d denom = _mm256_hadd_pd(tmp, tmp);\n  return Packet2cd(_mm256_div_pd(num.v, denom));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cd pcplxflip<Packet2cd>(const Packet2cd& x)\n{\n  return Packet2cd(_mm256_shuffle_pd(x.v, x.v, 0x5));\n}\n\nEIGEN_DEVICE_FUNC inline void\nptranspose(PacketBlock<Packet4cf,4>& kernel) {\n  __m256d P0 = _mm256_castps_pd(kernel.packet[0].v);\n  __m256d P1 = _mm256_castps_pd(kernel.packet[1].v);\n  __m256d P2 = _mm256_castps_pd(kernel.packet[2].v);\n  __m256d P3 = _mm256_castps_pd(kernel.packet[3].v);\n\n  __m256d T0 = _mm256_shuffle_pd(P0, P1, 15);\n  __m256d T1 = _mm256_shuffle_pd(P0, P1, 0);\n  __m256d T2 = _mm256_shuffle_pd(P2, P3, 15);\n  __m256d T3 = _mm256_shuffle_pd(P2, P3, 0);\n\n  kernel.packet[1].v = _mm256_castpd_ps(_mm256_permute2f128_pd(T0, T2, 32));\n  kernel.packet[3].v = _mm256_castpd_ps(_mm256_permute2f128_pd(T0, T2, 49));\n  kernel.packet[0].v = _mm256_castpd_ps(_mm256_permute2f128_pd(T1, T3, 32));\n  kernel.packet[2].v = _mm256_castpd_ps(_mm256_permute2f128_pd(T1, T3, 49));\n}\n\nEIGEN_DEVICE_FUNC inline void\nptranspose(PacketBlock<Packet2cd,2>& kernel) {\n  __m256d tmp = _mm256_permute2f128_pd(kernel.packet[0].v, kernel.packet[1].v, 0+(2<<4));\n  kernel.packet[1].v = _mm256_permute2f128_pd(kernel.packet[0].v, kernel.packet[1].v, 1+(3<<4));\n kernel.packet[0].v = tmp;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4cf pinsertfirst(const Packet4cf& a, std::complex<float> b)\n{\n  return Packet4cf(_mm256_blend_ps(a.v,pset1<Packet4cf>(b).v,1|2));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cd pinsertfirst(const Packet2cd& a, std::complex<double> b)\n{\n  return Packet2cd(_mm256_blend_pd(a.v,pset1<Packet2cd>(b).v,1|2));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4cf pinsertlast(const Packet4cf& a, std::complex<float> b)\n{\n  return Packet4cf(_mm256_blend_ps(a.v,pset1<Packet4cf>(b).v,(1<<7)|(1<<6)));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cd pinsertlast(const Packet2cd& a, std::complex<double> b)\n{\n  return Packet2cd(_mm256_blend_pd(a.v,pset1<Packet2cd>(b).v,(1<<3)|(1<<2)));\n}\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_COMPLEX_AVX_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/AVX/MathFunctions.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Pedro Gonnet (pedro.gonnet@gmail.com)\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_MATH_FUNCTIONS_AVX_H\n#define EIGEN_MATH_FUNCTIONS_AVX_H\n\n/* The sin and cos functions of this file are loosely derived from\n * Julien Pommier's sse math library: http://gruntthepeon.free.fr/ssemath/\n */\n\nnamespace Eigen {\n\nnamespace internal {\n\ntemplate <>\nEIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet8f\npsin<Packet8f>(const Packet8f& _x) {\n  return psin_float(_x);\n}\n\ntemplate <>\nEIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet8f\npcos<Packet8f>(const Packet8f& _x) {\n  return pcos_float(_x);\n}\n\ntemplate <>\nEIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet8f\nplog<Packet8f>(const Packet8f& _x) {\n  return plog_float(_x);\n}\n\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED\nPacket8f plog1p<Packet8f>(const Packet8f& _x) {\n  return generic_plog1p(_x);\n}\n\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED\nPacket8f pexpm1<Packet8f>(const Packet8f& _x) {\n  return generic_expm1(_x);\n}\n\n// Exponential function. Works by writing \"x = m*log(2) + r\" where\n// \"m = floor(x/log(2)+1/2)\" and \"r\" is the remainder. The result is then\n// \"exp(x) = 2^m*exp(r)\" where exp(r) is in the range [-1,1).\ntemplate <>\nEIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet8f\npexp<Packet8f>(const Packet8f& _x) {\n  return pexp_float(_x);\n}\n\n// Hyperbolic Tangent function.\ntemplate <>\nEIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet8f\nptanh<Packet8f>(const Packet8f& x) {\n  return internal::generic_fast_tanh_float(x);\n}\n\n// Exponential function for doubles.\ntemplate <>\nEIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet4d\npexp<Packet4d>(const Packet4d& x) {\n  return pexp_double(x);\n}\n\n// Functions for sqrt.\n// The EIGEN_FAST_MATH version uses the _mm_rsqrt_ps approximation and one step\n// of Newton's method, at a cost of 1-2 bits of precision as opposed to the\n// exact solution. It does not handle +inf, or denormalized numbers correctly.\n// The main advantage of this approach is not just speed, but also the fact that\n// it can be inlined and pipelined with other computations, further reducing its\n// effective latency. This is similar to Quake3's fast inverse square root.\n// For detail see here: http://www.beyond3d.com/content/articles/8/\n#if EIGEN_FAST_MATH\ntemplate <>\nEIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet8f\npsqrt<Packet8f>(const Packet8f& _x) {\n  Packet8f half = pmul(_x, pset1<Packet8f>(.5f));\n  Packet8f denormal_mask = _mm256_and_ps(\n      _mm256_cmp_ps(_x, pset1<Packet8f>((std::numeric_limits<float>::min)()),\n                    _CMP_LT_OQ),\n      _mm256_cmp_ps(_x, _mm256_setzero_ps(), _CMP_GE_OQ));\n\n  // Compute approximate reciprocal sqrt.\n  Packet8f x = _mm256_rsqrt_ps(_x);\n  // Do a single step of Newton's iteration.\n  x = pmul(x, psub(pset1<Packet8f>(1.5f), pmul(half, pmul(x,x))));\n  // Flush results for denormals to zero.\n  return _mm256_andnot_ps(denormal_mask, pmul(_x,x));\n}\n#else\ntemplate <> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED\nPacket8f psqrt<Packet8f>(const Packet8f& x) {\n  return _mm256_sqrt_ps(x);\n}\n#endif\ntemplate <> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED\nPacket4d psqrt<Packet4d>(const Packet4d& x) {\n  return _mm256_sqrt_pd(x);\n}\n#if EIGEN_FAST_MATH\n\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED\nPacket8f prsqrt<Packet8f>(const Packet8f& _x) {\n  _EIGEN_DECLARE_CONST_Packet8f_FROM_INT(inf, 0x7f800000);\n  _EIGEN_DECLARE_CONST_Packet8f(one_point_five, 1.5f);\n  _EIGEN_DECLARE_CONST_Packet8f(minus_half, -0.5f);\n  _EIGEN_DECLARE_CONST_Packet8f_FROM_INT(flt_min, 0x00800000);\n\n  Packet8f neg_half = pmul(_x, p8f_minus_half);\n\n  // select only the inverse sqrt of positive normal inputs (denormals are\n  // flushed to zero and cause infs as well).\n  Packet8f lt_min_mask = _mm256_cmp_ps(_x, p8f_flt_min, _CMP_LT_OQ);\n  Packet8f inf_mask =  _mm256_cmp_ps(_x, p8f_inf, _CMP_EQ_OQ);\n  Packet8f not_normal_finite_mask = _mm256_or_ps(lt_min_mask, inf_mask);\n\n  // Compute an approximate result using the rsqrt intrinsic.\n  Packet8f y_approx = _mm256_rsqrt_ps(_x);\n\n  // Do a single step of Newton-Raphson iteration to improve the approximation.\n  // This uses the formula y_{n+1} = y_n * (1.5 - y_n * (0.5 * x) * y_n).\n  // It is essential to evaluate the inner term like this because forming\n  // y_n^2 may over- or underflow.\n  Packet8f y_newton = pmul(y_approx, pmadd(y_approx, pmul(neg_half, y_approx), p8f_one_point_five));\n\n  // Select the result of the Newton-Raphson step for positive normal arguments.\n  // For other arguments, choose the output of the intrinsic. This will\n  // return rsqrt(+inf) = 0, rsqrt(x) = NaN if x < 0, and rsqrt(x) = +inf if\n  // x is zero or a positive denormalized float (equivalent to flushing positive\n  // denormalized inputs to zero).\n  return pselect<Packet8f>(not_normal_finite_mask, y_approx, y_newton);\n}\n\n#else\ntemplate <> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED\nPacket8f prsqrt<Packet8f>(const Packet8f& x) {\n  _EIGEN_DECLARE_CONST_Packet8f(one, 1.0f);\n  return _mm256_div_ps(p8f_one, _mm256_sqrt_ps(x));\n}\n#endif\n\ntemplate <> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED\nPacket4d prsqrt<Packet4d>(const Packet4d& x) {\n  _EIGEN_DECLARE_CONST_Packet4d(one, 1.0);\n  return _mm256_div_pd(p4d_one, _mm256_sqrt_pd(x));\n}\n\n\n}  // end namespace internal\n\n}  // end namespace Eigen\n\n#endif  // EIGEN_MATH_FUNCTIONS_AVX_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/AVX/PacketMath.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner (benoit.steiner.goog@gmail.com)\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_PACKET_MATH_AVX_H\n#define EIGEN_PACKET_MATH_AVX_H\n\nnamespace Eigen {\n\nnamespace internal {\n\n#ifndef EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD\n#define EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 8\n#endif\n\n#if !defined(EIGEN_VECTORIZE_AVX512) && !defined(EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS)\n#define EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS 16\n#endif\n\n#ifdef EIGEN_VECTORIZE_FMA\n#ifndef EIGEN_HAS_SINGLE_INSTRUCTION_MADD\n#define EIGEN_HAS_SINGLE_INSTRUCTION_MADD\n#endif\n#endif\n\ntypedef __m256  Packet8f;\ntypedef __m256i Packet8i;\ntypedef __m256d Packet4d;\ntypedef eigen_packet_wrapper<__m128i, 2> Packet8h;\n\ntemplate<> struct is_arithmetic<__m256>  { enum { value = true }; };\ntemplate<> struct is_arithmetic<__m256i> { enum { value = true }; };\ntemplate<> struct is_arithmetic<__m256d> { enum { value = true }; };\ntemplate<> struct is_arithmetic<Packet8h> { enum { value = true }; };\n\n#define _EIGEN_DECLARE_CONST_Packet8f(NAME,X) \\\n  const Packet8f p8f_##NAME = pset1<Packet8f>(X)\n\n#define _EIGEN_DECLARE_CONST_Packet4d(NAME,X) \\\n  const Packet4d p4d_##NAME = pset1<Packet4d>(X)\n\n#define _EIGEN_DECLARE_CONST_Packet8f_FROM_INT(NAME,X) \\\n  const Packet8f p8f_##NAME = _mm256_castsi256_ps(pset1<Packet8i>(X))\n\n#define _EIGEN_DECLARE_CONST_Packet8i(NAME,X) \\\n  const Packet8i p8i_##NAME = pset1<Packet8i>(X)\n\n// Use the packet_traits defined in AVX512/PacketMath.h instead if we're going\n// to leverage AVX512 instructions.\n#ifndef EIGEN_VECTORIZE_AVX512\ntemplate<> struct packet_traits<float>  : default_packet_traits\n{\n  typedef Packet8f type;\n  typedef Packet4f half;\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size = 8,\n    HasHalfPacket = 1,\n    HasInsert = 1,\n\n    HasDiv = 1,\n    HasSin = EIGEN_FAST_MATH,\n    HasCos = EIGEN_FAST_MATH,\n    HasLog = 1,\n    HasLog1p = 1,\n    HasExpm1 = 1,\n    HasExp = 1,\n    HasNdtri = 1,\n    HasBessel = 1,\n    HasSqrt = 1,\n    HasRsqrt = 1,\n    HasTanh = EIGEN_FAST_MATH,\n    HasErf = EIGEN_FAST_MATH,\n    HasBlend = 1,\n    HasRound = 1,\n    HasFloor = 1,\n    HasCeil = 1,\n    HasRint = 1\n  };\n};\ntemplate<> struct packet_traits<double> : default_packet_traits\n{\n  typedef Packet4d type;\n  typedef Packet2d half;\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size=4,\n    HasHalfPacket = 1,\n    HasInsert = 1,\n\n    HasDiv  = 1,\n    HasExp  = 1,\n    HasSqrt = 1,\n    HasRsqrt = 1,\n    HasBlend = 1,\n    HasRound = 1,\n    HasFloor = 1,\n    HasCeil = 1\n  };\n};\n\ntemplate <>\nstruct packet_traits<Eigen::half> : default_packet_traits {\n  typedef Packet8h type;\n  // There is no half-size packet for Packet8h.\n  typedef Packet8h half;\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size = 8,\n    HasHalfPacket = 0,\n    HasAdd    = 1,\n    HasSub    = 1,\n    HasMul    = 1,\n    HasDiv    = 1,\n    HasNegate = 1,\n    HasAbs    = 0,\n    HasAbs2   = 0,\n    HasMin    = 0,\n    HasMax    = 0,\n    HasConj   = 0,\n    HasSetLinear = 0,\n    HasSqrt = 0,\n    HasRsqrt = 0,\n    HasExp = 0,\n    HasLog = 0,\n    HasBlend = 0,\n    HasInsert = 1\n  };\n};\n#endif\n\ntemplate<> struct scalar_div_cost<float,true> { enum { value = 14 }; };\ntemplate<> struct scalar_div_cost<double,true> { enum { value = 16 }; };\n\n/* Proper support for integers is only provided by AVX2. In the meantime, we'll\n   use SSE instructions and packets to deal with integers.\ntemplate<> struct packet_traits<int>    : default_packet_traits\n{\n  typedef Packet8i type;\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size=8\n  };\n};\n*/\n\ntemplate<> struct unpacket_traits<Packet8f> {\n  typedef float     type;\n  typedef Packet4f  half;\n  typedef Packet8i  integer_packet;\n  typedef uint8_t   mask_t;\n  enum {size=8, alignment=Aligned32, vectorizable=true, masked_load_available=true, masked_store_available=true};\n};\ntemplate<> struct unpacket_traits<Packet4d> {\n  typedef double type;\n  typedef Packet2d half;\n  enum {size=4, alignment=Aligned32, vectorizable=true, masked_load_available=false, masked_store_available=false};\n};\ntemplate<> struct unpacket_traits<Packet8i> { typedef int    type; typedef Packet4i half; enum {size=8, alignment=Aligned32, vectorizable=false, masked_load_available=false, masked_store_available=false}; };\n\ntemplate<> EIGEN_STRONG_INLINE Packet8f pset1<Packet8f>(const float&  from) { return _mm256_set1_ps(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet4d pset1<Packet4d>(const double& from) { return _mm256_set1_pd(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet8i pset1<Packet8i>(const int&    from) { return _mm256_set1_epi32(from); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet8f pset1frombits<Packet8f>(unsigned int from) { return _mm256_castsi256_ps(pset1<Packet8i>(from)); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet8f pzero(const Packet8f& /*a*/) { return _mm256_setzero_ps(); }\ntemplate<> EIGEN_STRONG_INLINE Packet4d pzero(const Packet4d& /*a*/) { return _mm256_setzero_pd(); }\ntemplate<> EIGEN_STRONG_INLINE Packet8i pzero(const Packet8i& /*a*/) { return _mm256_setzero_si256(); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet8f pload1<Packet8f>(const float*  from) { return _mm256_broadcast_ss(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet4d pload1<Packet4d>(const double* from) { return _mm256_broadcast_sd(from); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet8f plset<Packet8f>(const float& a) { return _mm256_add_ps(_mm256_set1_ps(a), _mm256_set_ps(7.0,6.0,5.0,4.0,3.0,2.0,1.0,0.0)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4d plset<Packet4d>(const double& a) { return _mm256_add_pd(_mm256_set1_pd(a), _mm256_set_pd(3.0,2.0,1.0,0.0)); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet8f padd<Packet8f>(const Packet8f& a, const Packet8f& b) { return _mm256_add_ps(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4d padd<Packet4d>(const Packet4d& a, const Packet4d& b) { return _mm256_add_pd(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet8i padd<Packet8i>(const Packet8i& a, const Packet8i& b) {\n#ifdef EIGEN_VECTORIZE_AVX2\n  return _mm256_add_epi32(a,b);\n#else\n  __m128i lo = _mm_add_epi32(_mm256_extractf128_si256(a, 0), _mm256_extractf128_si256(b, 0));\n  __m128i hi = _mm_add_epi32(_mm256_extractf128_si256(a, 1), _mm256_extractf128_si256(b, 1));\n  return _mm256_insertf128_si256(_mm256_castsi128_si256(lo), (hi), 1);\n#endif\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8f psub<Packet8f>(const Packet8f& a, const Packet8f& b) { return _mm256_sub_ps(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4d psub<Packet4d>(const Packet4d& a, const Packet4d& b) { return _mm256_sub_pd(a,b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet8f pnegate(const Packet8f& a)\n{\n  return _mm256_sub_ps(_mm256_set1_ps(0.0),a);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4d pnegate(const Packet4d& a)\n{\n  return _mm256_sub_pd(_mm256_set1_pd(0.0),a);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8f pconj(const Packet8f& a) { return a; }\ntemplate<> EIGEN_STRONG_INLINE Packet4d pconj(const Packet4d& a) { return a; }\ntemplate<> EIGEN_STRONG_INLINE Packet8i pconj(const Packet8i& a) { return a; }\n\ntemplate<> EIGEN_STRONG_INLINE Packet8f pmul<Packet8f>(const Packet8f& a, const Packet8f& b) { return _mm256_mul_ps(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4d pmul<Packet4d>(const Packet4d& a, const Packet4d& b) { return _mm256_mul_pd(a,b); }\n\n\ntemplate<> EIGEN_STRONG_INLINE Packet8f pdiv<Packet8f>(const Packet8f& a, const Packet8f& b) { return _mm256_div_ps(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4d pdiv<Packet4d>(const Packet4d& a, const Packet4d& b) { return _mm256_div_pd(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet8i pdiv<Packet8i>(const Packet8i& /*a*/, const Packet8i& /*b*/)\n{ eigen_assert(false && \"packet integer division are not supported by AVX\");\n  return pset1<Packet8i>(0);\n}\n\n#ifdef EIGEN_VECTORIZE_FMA\ntemplate<> EIGEN_STRONG_INLINE Packet8f pmadd(const Packet8f& a, const Packet8f& b, const Packet8f& c) {\n#if ( (EIGEN_COMP_GNUC_STRICT && EIGEN_COMP_GNUC<80) || (EIGEN_COMP_CLANG) )\n  // Clang stupidly generates a vfmadd213ps instruction plus some vmovaps on registers,\n  //  and even register spilling with clang>=6.0 (bug 1637).\n  // Gcc stupidly generates a vfmadd132ps instruction.\n  // So let's enforce it to generate a vfmadd231ps instruction since the most common use\n  //  case is to accumulate the result of the product.\n  Packet8f res = c;\n  __asm__(\"vfmadd231ps %[a], %[b], %[c]\" : [c] \"+x\" (res) : [a] \"x\" (a), [b] \"x\" (b));\n  return res;\n#else\n  return _mm256_fmadd_ps(a,b,c);\n#endif\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4d pmadd(const Packet4d& a, const Packet4d& b, const Packet4d& c) {\n#if ( (EIGEN_COMP_GNUC_STRICT && EIGEN_COMP_GNUC<80) || (EIGEN_COMP_CLANG) )\n  // see above\n  Packet4d res = c;\n  __asm__(\"vfmadd231pd %[a], %[b], %[c]\" : [c] \"+x\" (res) : [a] \"x\" (a), [b] \"x\" (b));\n  return res;\n#else\n  return _mm256_fmadd_pd(a,b,c);\n#endif\n}\n#endif\n\ntemplate<> EIGEN_STRONG_INLINE Packet8f pmin<Packet8f>(const Packet8f& a, const Packet8f& b) {\n#if EIGEN_COMP_GNUC && EIGEN_COMP_GNUC < 63\n  // There appears to be a bug in GCC, by which the optimizer may flip\n  // the argument order in calls to _mm_min_ps/_mm_max_ps, so we have to\n  // resort to inline ASM here. This is supposed to be fixed in gcc6.3,\n  // see also: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72867\n  Packet8f res;\n  asm(\"vminps %[a], %[b], %[res]\" : [res] \"=x\" (res) : [a] \"x\" (a), [b] \"x\" (b));\n  return res;\n#else\n  // Arguments are swapped to match NaN propagation behavior of std::min.\n  return _mm256_min_ps(b,a);\n#endif\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4d pmin<Packet4d>(const Packet4d& a, const Packet4d& b) {\n#if EIGEN_COMP_GNUC && EIGEN_COMP_GNUC < 63\n  // See pmin above\n  Packet4d res;\n  asm(\"vminpd %[a], %[b], %[res]\" : [res] \"=x\" (res) : [a] \"x\" (a), [b] \"x\" (b));\n  return res;\n#else\n  // Arguments are swapped to match NaN propagation behavior of std::min.\n  return _mm256_min_pd(b,a);\n#endif\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8f pmax<Packet8f>(const Packet8f& a, const Packet8f& b) {\n#if EIGEN_COMP_GNUC && EIGEN_COMP_GNUC < 63\n  // See pmin above\n  Packet8f res;\n  asm(\"vmaxps %[a], %[b], %[res]\" : [res] \"=x\" (res) : [a] \"x\" (a), [b] \"x\" (b));\n  return res;\n#else\n  // Arguments are swapped to match NaN propagation behavior of std::max.\n  return _mm256_max_ps(b,a);\n#endif\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4d pmax<Packet4d>(const Packet4d& a, const Packet4d& b) {\n#if EIGEN_COMP_GNUC && EIGEN_COMP_GNUC < 63\n  // See pmin above\n  Packet4d res;\n  asm(\"vmaxpd %[a], %[b], %[res]\" : [res] \"=x\" (res) : [a] \"x\" (a), [b] \"x\" (b));\n  return res;\n#else\n  // Arguments are swapped to match NaN propagation behavior of std::max.\n  return _mm256_max_pd(b,a);\n#endif\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8f pcmp_le(const Packet8f& a, const Packet8f& b) { return _mm256_cmp_ps(a,b,_CMP_LE_OQ); }\ntemplate<> EIGEN_STRONG_INLINE Packet8f pcmp_lt(const Packet8f& a, const Packet8f& b) { return _mm256_cmp_ps(a,b,_CMP_LT_OQ); }\ntemplate<> EIGEN_STRONG_INLINE Packet8f pcmp_lt_or_nan(const Packet8f& a, const Packet8f& b) { return _mm256_cmp_ps(a, b, _CMP_NGE_UQ); }\ntemplate<> EIGEN_STRONG_INLINE Packet8f pcmp_eq(const Packet8f& a, const Packet8f& b) { return _mm256_cmp_ps(a,b,_CMP_EQ_OQ); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4d pcmp_le(const Packet4d& a, const Packet4d& b) { return _mm256_cmp_pd(a,b,_CMP_LE_OQ); }\ntemplate<> EIGEN_STRONG_INLINE Packet4d pcmp_lt(const Packet4d& a, const Packet4d& b) { return _mm256_cmp_pd(a,b,_CMP_LT_OQ); }\ntemplate<> EIGEN_STRONG_INLINE Packet4d pcmp_lt_or_nan(const Packet4d& a, const Packet4d& b) { return _mm256_cmp_pd(a, b, _CMP_NGE_UQ); }\ntemplate<> EIGEN_STRONG_INLINE Packet4d pcmp_eq(const Packet4d& a, const Packet4d& b) { return _mm256_cmp_pd(a,b,_CMP_EQ_OQ); }\n\n\ntemplate<> EIGEN_STRONG_INLINE Packet8i pcmp_eq(const Packet8i& a, const Packet8i& b) {\n#ifdef EIGEN_VECTORIZE_AVX2\n  return _mm256_cmpeq_epi32(a,b);\n#else\n  __m128i lo = _mm_cmpeq_epi32(_mm256_extractf128_si256(a, 0), _mm256_extractf128_si256(b, 0));\n  __m128i hi = _mm_cmpeq_epi32(_mm256_extractf128_si256(a, 1), _mm256_extractf128_si256(b, 1));\n  return _mm256_insertf128_si256(_mm256_castsi128_si256(lo), (hi), 1);\n#endif\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8f print<Packet8f>(const Packet8f& a) { return _mm256_round_ps(a, _MM_FROUND_CUR_DIRECTION); }\ntemplate<> EIGEN_STRONG_INLINE Packet4d print<Packet4d>(const Packet4d& a) { return _mm256_round_pd(a, _MM_FROUND_CUR_DIRECTION); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet8f pceil<Packet8f>(const Packet8f& a) { return _mm256_ceil_ps(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4d pceil<Packet4d>(const Packet4d& a) { return _mm256_ceil_pd(a); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet8f pfloor<Packet8f>(const Packet8f& a) { return _mm256_floor_ps(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4d pfloor<Packet4d>(const Packet4d& a) { return _mm256_floor_pd(a); }\n\n\ntemplate<> EIGEN_STRONG_INLINE Packet8i ptrue<Packet8i>(const Packet8i& a) {\n#ifdef EIGEN_VECTORIZE_AVX2\n  // vpcmpeqd has lower latency than the more general vcmpps\n  return _mm256_cmpeq_epi32(a,a);\n#else\n  const __m256 b = _mm256_castsi256_ps(a);\n  return _mm256_castps_si256(_mm256_cmp_ps(b,b,_CMP_TRUE_UQ));\n#endif\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8f ptrue<Packet8f>(const Packet8f& a) {\n#ifdef EIGEN_VECTORIZE_AVX2\n  // vpcmpeqd has lower latency than the more general vcmpps\n  const __m256i b = _mm256_castps_si256(a);\n  return _mm256_castsi256_ps(_mm256_cmpeq_epi32(b,b));\n#else\n  return _mm256_cmp_ps(a,a,_CMP_TRUE_UQ);\n#endif\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4d ptrue<Packet4d>(const Packet4d& a) {\n#ifdef EIGEN_VECTORIZE_AVX2\n  // vpcmpeqq has lower latency than the more general vcmppd\n  const __m256i b = _mm256_castpd_si256(a);\n  return _mm256_castsi256_pd(_mm256_cmpeq_epi64(b,b));\n#else\n  return _mm256_cmp_pd(a,a,_CMP_TRUE_UQ);\n#endif\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8f pand<Packet8f>(const Packet8f& a, const Packet8f& b) { return _mm256_and_ps(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4d pand<Packet4d>(const Packet4d& a, const Packet4d& b) { return _mm256_and_pd(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet8i pand<Packet8i>(const Packet8i& a, const Packet8i& b) {\n#ifdef EIGEN_VECTORIZE_AVX2\n  return _mm256_and_si256(a,b);\n#else\n  return _mm256_castps_si256(_mm256_and_ps(_mm256_castsi256_ps(a),_mm256_castsi256_ps(b)));\n#endif\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8f por<Packet8f>(const Packet8f& a, const Packet8f& b) { return _mm256_or_ps(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4d por<Packet4d>(const Packet4d& a, const Packet4d& b) { return _mm256_or_pd(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet8i por<Packet8i>(const Packet8i& a, const Packet8i& b) {\n#ifdef EIGEN_VECTORIZE_AVX2\n  return _mm256_or_si256(a,b);\n#else\n  return _mm256_castps_si256(_mm256_or_ps(_mm256_castsi256_ps(a),_mm256_castsi256_ps(b)));\n#endif\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8f pxor<Packet8f>(const Packet8f& a, const Packet8f& b) { return _mm256_xor_ps(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4d pxor<Packet4d>(const Packet4d& a, const Packet4d& b) { return _mm256_xor_pd(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet8i pxor<Packet8i>(const Packet8i& a, const Packet8i& b) {\n#ifdef EIGEN_VECTORIZE_AVX2\n  return _mm256_xor_si256(a,b);\n#else\n  return _mm256_castps_si256(_mm256_xor_ps(_mm256_castsi256_ps(a),_mm256_castsi256_ps(b)));\n#endif\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8f pandnot<Packet8f>(const Packet8f& a, const Packet8f& b) { return _mm256_andnot_ps(b,a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4d pandnot<Packet4d>(const Packet4d& a, const Packet4d& b) { return _mm256_andnot_pd(b,a); }\ntemplate<> EIGEN_STRONG_INLINE Packet8i pandnot<Packet8i>(const Packet8i& a, const Packet8i& b) {\n#ifdef EIGEN_VECTORIZE_AVX2\n  return _mm256_andnot_si256(b,a);\n#else\n  return _mm256_castps_si256(_mm256_andnot_ps(_mm256_castsi256_ps(b),_mm256_castsi256_ps(a)));\n#endif\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8f pround<Packet8f>(const Packet8f& a)\n{\n  const Packet8f mask = pset1frombits<Packet8f>(0x80000000u);\n  const Packet8f prev0dot5 = pset1frombits<Packet8f>(0x3EFFFFFFu);\n  return _mm256_round_ps(padd(por(pand(a, mask), prev0dot5), a), _MM_FROUND_TO_ZERO);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4d pround<Packet4d>(const Packet4d& a)\n{\n  const Packet4d mask = _mm256_castsi256_pd(_mm256_set_epi64x(0x8000000000000000ull, 0x8000000000000000ull, 0x8000000000000000ull, 0x8000000000000000ull));\n  const Packet4d prev0dot5 = _mm256_castsi256_pd(_mm256_set_epi64x(0x3FDFFFFFFFFFFFFFull, 0x3FDFFFFFFFFFFFFFull, 0x3FDFFFFFFFFFFFFFull, 0x3FDFFFFFFFFFFFFFull));\n  return _mm256_round_pd(padd(por(pand(a, mask), prev0dot5), a), _MM_FROUND_TO_ZERO);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8f pselect<Packet8f>(const Packet8f& mask, const Packet8f& a, const Packet8f& b)\n{ return _mm256_blendv_ps(b,a,mask); }\ntemplate<> EIGEN_STRONG_INLINE Packet4d pselect<Packet4d>(const Packet4d& mask, const Packet4d& a, const Packet4d& b)\n{ return _mm256_blendv_pd(b,a,mask); }\n\ntemplate<int N> EIGEN_STRONG_INLINE Packet8i parithmetic_shift_right(Packet8i a) {\n#ifdef EIGEN_VECTORIZE_AVX2\n  return _mm256_srai_epi32(a, N);\n#else\n  __m128i lo = _mm_srai_epi32(_mm256_extractf128_si256(a, 0), N);\n  __m128i hi = _mm_srai_epi32(_mm256_extractf128_si256(a, 1), N);\n  return _mm256_insertf128_si256(_mm256_castsi128_si256(lo), (hi), 1);\n#endif\n}\n\ntemplate<int N> EIGEN_STRONG_INLINE Packet8i plogical_shift_right(Packet8i a) {\n#ifdef EIGEN_VECTORIZE_AVX2\n  return _mm256_srli_epi32(a, N);\n#else\n  __m128i lo = _mm_srli_epi32(_mm256_extractf128_si256(a, 0), N);\n  __m128i hi = _mm_srli_epi32(_mm256_extractf128_si256(a, 1), N);\n  return _mm256_insertf128_si256(_mm256_castsi128_si256(lo), (hi), 1);\n#endif\n}\n\ntemplate<int N> EIGEN_STRONG_INLINE Packet8i plogical_shift_left(Packet8i a) {\n#ifdef EIGEN_VECTORIZE_AVX2\n  return _mm256_slli_epi32(a, N);\n#else\n  __m128i lo = _mm_slli_epi32(_mm256_extractf128_si256(a, 0), N);\n  __m128i hi = _mm_slli_epi32(_mm256_extractf128_si256(a, 1), N);\n  return _mm256_insertf128_si256(_mm256_castsi128_si256(lo), (hi), 1);\n#endif\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8f pload<Packet8f>(const float*   from) { EIGEN_DEBUG_ALIGNED_LOAD return _mm256_load_ps(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet4d pload<Packet4d>(const double*  from) { EIGEN_DEBUG_ALIGNED_LOAD return _mm256_load_pd(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet8i pload<Packet8i>(const int*     from) { EIGEN_DEBUG_ALIGNED_LOAD return _mm256_load_si256(reinterpret_cast<const __m256i*>(from)); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet8f ploadu<Packet8f>(const float* from) { EIGEN_DEBUG_UNALIGNED_LOAD return _mm256_loadu_ps(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet4d ploadu<Packet4d>(const double* from) { EIGEN_DEBUG_UNALIGNED_LOAD return _mm256_loadu_pd(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet8i ploadu<Packet8i>(const int* from) { EIGEN_DEBUG_UNALIGNED_LOAD return _mm256_loadu_si256(reinterpret_cast<const __m256i*>(from)); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet8f ploadu<Packet8f>(const float* from, uint8_t umask) {\n  Packet8i mask = _mm256_set1_epi8(static_cast<char>(umask));\n  const Packet8i bit_mask = _mm256_set_epi32(0xffffff7f, 0xffffffbf, 0xffffffdf, 0xffffffef, 0xfffffff7, 0xfffffffb, 0xfffffffd, 0xfffffffe);\n  mask = por<Packet8i>(mask, bit_mask);\n  mask = pcmp_eq<Packet8i>(mask, _mm256_set1_epi32(0xffffffff));\n  EIGEN_DEBUG_UNALIGNED_LOAD return _mm256_maskload_ps(from, mask);\n}\n\n// Loads 4 floats from memory a returns the packet {a0, a0  a1, a1, a2, a2, a3, a3}\ntemplate<> EIGEN_STRONG_INLINE Packet8f ploaddup<Packet8f>(const float* from)\n{\n  // TODO try to find a way to avoid the need of a temporary register\n//   Packet8f tmp  = _mm256_castps128_ps256(_mm_loadu_ps(from));\n//   tmp = _mm256_insertf128_ps(tmp, _mm_movehl_ps(_mm256_castps256_ps128(tmp),_mm256_castps256_ps128(tmp)), 1);\n//   return _mm256_unpacklo_ps(tmp,tmp);\n\n  // _mm256_insertf128_ps is very slow on Haswell, thus:\n  Packet8f tmp = _mm256_broadcast_ps((const __m128*)(const void*)from);\n  // mimic an \"inplace\" permutation of the lower 128bits using a blend\n  tmp = _mm256_blend_ps(tmp,_mm256_castps128_ps256(_mm_permute_ps( _mm256_castps256_ps128(tmp), _MM_SHUFFLE(1,0,1,0))), 15);\n  // then we can perform a consistent permutation on the global register to get everything in shape:\n  return  _mm256_permute_ps(tmp, _MM_SHUFFLE(3,3,2,2));\n}\n// Loads 2 doubles from memory a returns the packet {a0, a0  a1, a1}\ntemplate<> EIGEN_STRONG_INLINE Packet4d ploaddup<Packet4d>(const double* from)\n{\n  Packet4d tmp = _mm256_broadcast_pd((const __m128d*)(const void*)from);\n  return  _mm256_permute_pd(tmp, 3<<2);\n}\n\n// Loads 2 floats from memory a returns the packet {a0, a0  a0, a0, a1, a1, a1, a1}\ntemplate<> EIGEN_STRONG_INLINE Packet8f ploadquad<Packet8f>(const float* from)\n{\n  Packet8f tmp = _mm256_castps128_ps256(_mm_broadcast_ss(from));\n  return _mm256_insertf128_ps(tmp, _mm_broadcast_ss(from+1), 1);\n}\n\ntemplate<> EIGEN_STRONG_INLINE void pstore<float>(float*   to, const Packet8f& from) { EIGEN_DEBUG_ALIGNED_STORE _mm256_store_ps(to, from); }\ntemplate<> EIGEN_STRONG_INLINE void pstore<double>(double* to, const Packet4d& from) { EIGEN_DEBUG_ALIGNED_STORE _mm256_store_pd(to, from); }\ntemplate<> EIGEN_STRONG_INLINE void pstore<int>(int*       to, const Packet8i& from) { EIGEN_DEBUG_ALIGNED_STORE _mm256_storeu_si256(reinterpret_cast<__m256i*>(to), from); }\n\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<float>(float*   to, const Packet8f& from) { EIGEN_DEBUG_UNALIGNED_STORE _mm256_storeu_ps(to, from); }\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<double>(double* to, const Packet4d& from) { EIGEN_DEBUG_UNALIGNED_STORE _mm256_storeu_pd(to, from); }\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<int>(int*       to, const Packet8i& from) { EIGEN_DEBUG_UNALIGNED_STORE _mm256_storeu_si256(reinterpret_cast<__m256i*>(to), from); }\n\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<float>(float*   to, const Packet8f& from, uint8_t umask) {\n  Packet8i mask = _mm256_set1_epi8(static_cast<char>(umask));\n  const Packet8i bit_mask = _mm256_set_epi32(0xffffff7f, 0xffffffbf, 0xffffffdf, 0xffffffef, 0xfffffff7, 0xfffffffb, 0xfffffffd, 0xfffffffe);\n  mask = por<Packet8i>(mask, bit_mask);\n  mask = pcmp_eq<Packet8i>(mask, _mm256_set1_epi32(0xffffffff));\n  EIGEN_DEBUG_UNALIGNED_STORE return _mm256_maskstore_ps(to, mask, from);\n}\n\n// NOTE: leverage _mm256_i32gather_ps and _mm256_i32gather_pd if AVX2 instructions are available\n// NOTE: for the record the following seems to be slower: return _mm256_i32gather_ps(from, _mm256_set1_epi32(stride), 4);\ntemplate<> EIGEN_DEVICE_FUNC inline Packet8f pgather<float, Packet8f>(const float* from, Index stride)\n{\n  return _mm256_set_ps(from[7*stride], from[6*stride], from[5*stride], from[4*stride],\n                       from[3*stride], from[2*stride], from[1*stride], from[0*stride]);\n}\ntemplate<> EIGEN_DEVICE_FUNC inline Packet4d pgather<double, Packet4d>(const double* from, Index stride)\n{\n  return _mm256_set_pd(from[3*stride], from[2*stride], from[1*stride], from[0*stride]);\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<float, Packet8f>(float* to, const Packet8f& from, Index stride)\n{\n  __m128 low = _mm256_extractf128_ps(from, 0);\n  to[stride*0] = _mm_cvtss_f32(low);\n  to[stride*1] = _mm_cvtss_f32(_mm_shuffle_ps(low, low, 1));\n  to[stride*2] = _mm_cvtss_f32(_mm_shuffle_ps(low, low, 2));\n  to[stride*3] = _mm_cvtss_f32(_mm_shuffle_ps(low, low, 3));\n\n  __m128 high = _mm256_extractf128_ps(from, 1);\n  to[stride*4] = _mm_cvtss_f32(high);\n  to[stride*5] = _mm_cvtss_f32(_mm_shuffle_ps(high, high, 1));\n  to[stride*6] = _mm_cvtss_f32(_mm_shuffle_ps(high, high, 2));\n  to[stride*7] = _mm_cvtss_f32(_mm_shuffle_ps(high, high, 3));\n}\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<double, Packet4d>(double* to, const Packet4d& from, Index stride)\n{\n  __m128d low = _mm256_extractf128_pd(from, 0);\n  to[stride*0] = _mm_cvtsd_f64(low);\n  to[stride*1] = _mm_cvtsd_f64(_mm_shuffle_pd(low, low, 1));\n  __m128d high = _mm256_extractf128_pd(from, 1);\n  to[stride*2] = _mm_cvtsd_f64(high);\n  to[stride*3] = _mm_cvtsd_f64(_mm_shuffle_pd(high, high, 1));\n}\n\ntemplate<> EIGEN_STRONG_INLINE void pstore1<Packet8f>(float* to, const float& a)\n{\n  Packet8f pa = pset1<Packet8f>(a);\n  pstore(to, pa);\n}\ntemplate<> EIGEN_STRONG_INLINE void pstore1<Packet4d>(double* to, const double& a)\n{\n  Packet4d pa = pset1<Packet4d>(a);\n  pstore(to, pa);\n}\ntemplate<> EIGEN_STRONG_INLINE void pstore1<Packet8i>(int* to, const int& a)\n{\n  Packet8i pa = pset1<Packet8i>(a);\n  pstore(to, pa);\n}\n\n#ifndef EIGEN_VECTORIZE_AVX512\ntemplate<> EIGEN_STRONG_INLINE void prefetch<float>(const float*   addr) { _mm_prefetch((SsePrefetchPtrType)(addr), _MM_HINT_T0); }\ntemplate<> EIGEN_STRONG_INLINE void prefetch<double>(const double* addr) { _mm_prefetch((SsePrefetchPtrType)(addr), _MM_HINT_T0); }\ntemplate<> EIGEN_STRONG_INLINE void prefetch<int>(const int*       addr) { _mm_prefetch((SsePrefetchPtrType)(addr), _MM_HINT_T0); }\n#endif\n\ntemplate<> EIGEN_STRONG_INLINE float  pfirst<Packet8f>(const Packet8f& a) {\n  return _mm_cvtss_f32(_mm256_castps256_ps128(a));\n}\ntemplate<> EIGEN_STRONG_INLINE double pfirst<Packet4d>(const Packet4d& a) {\n  return _mm_cvtsd_f64(_mm256_castpd256_pd128(a));\n}\ntemplate<> EIGEN_STRONG_INLINE int    pfirst<Packet8i>(const Packet8i& a) {\n  return _mm_cvtsi128_si32(_mm256_castsi256_si128(a));\n}\n\n\ntemplate<> EIGEN_STRONG_INLINE Packet8f preverse(const Packet8f& a)\n{\n  __m256 tmp = _mm256_shuffle_ps(a,a,0x1b);\n  return _mm256_permute2f128_ps(tmp, tmp, 1);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4d preverse(const Packet4d& a)\n{\n   __m256d tmp = _mm256_shuffle_pd(a,a,5);\n  return _mm256_permute2f128_pd(tmp, tmp, 1);\n  #if 0\n  // This version is unlikely to be faster as _mm256_shuffle_ps and _mm256_permute_pd\n  // exhibit the same latency/throughput, but it is here for future reference/benchmarking...\n  __m256d swap_halves = _mm256_permute2f128_pd(a,a,1);\n    return _mm256_permute_pd(swap_halves,5);\n  #endif\n}\n\n// pabs should be ok\ntemplate<> EIGEN_STRONG_INLINE Packet8f pabs(const Packet8f& a)\n{\n  const Packet8f mask = _mm256_castsi256_ps(_mm256_setr_epi32(0x7FFFFFFF,0x7FFFFFFF,0x7FFFFFFF,0x7FFFFFFF,0x7FFFFFFF,0x7FFFFFFF,0x7FFFFFFF,0x7FFFFFFF));\n  return _mm256_and_ps(a,mask);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4d pabs(const Packet4d& a)\n{\n  const Packet4d mask = _mm256_castsi256_pd(_mm256_setr_epi32(0xFFFFFFFF,0x7FFFFFFF,0xFFFFFFFF,0x7FFFFFFF,0xFFFFFFFF,0x7FFFFFFF,0xFFFFFFFF,0x7FFFFFFF));\n  return _mm256_and_pd(a,mask);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8f pfrexp<Packet8f>(const Packet8f& a, Packet8f& exponent) {\n  return pfrexp_float(a,exponent);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8f pldexp<Packet8f>(const Packet8f& a, const Packet8f& exponent) {\n  return pldexp_float(a,exponent);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4d pldexp<Packet4d>(const Packet4d& a, const Packet4d& exponent) {\n  // Build e=2^n by constructing the exponents in a 128-bit vector and\n  // shifting them to where they belong in double-precision values.\n  Packet4i cst_1023 = pset1<Packet4i>(1023);\n  __m128i emm0 = _mm256_cvtpd_epi32(exponent);\n  emm0 = _mm_add_epi32(emm0, cst_1023);\n  emm0 = _mm_shuffle_epi32(emm0, _MM_SHUFFLE(3, 1, 2, 0));\n  __m128i lo = _mm_slli_epi64(emm0, 52);\n  __m128i hi = _mm_slli_epi64(_mm_srli_epi64(emm0, 32), 52);\n  __m256i e = _mm256_insertf128_si256(_mm256_setzero_si256(), lo, 0);\n  e = _mm256_insertf128_si256(e, hi, 1);\n  return pmul(a,_mm256_castsi256_pd(e));\n}\n\n// preduxp should be ok\n// FIXME: why is this ok? why isn't the simply implementation working as expected?\ntemplate<> EIGEN_STRONG_INLINE Packet8f preduxp<Packet8f>(const Packet8f* vecs)\n{\n    __m256 hsum1 = _mm256_hadd_ps(vecs[0], vecs[1]);\n    __m256 hsum2 = _mm256_hadd_ps(vecs[2], vecs[3]);\n    __m256 hsum3 = _mm256_hadd_ps(vecs[4], vecs[5]);\n    __m256 hsum4 = _mm256_hadd_ps(vecs[6], vecs[7]);\n\n    __m256 hsum5 = _mm256_hadd_ps(hsum1, hsum1);\n    __m256 hsum6 = _mm256_hadd_ps(hsum2, hsum2);\n    __m256 hsum7 = _mm256_hadd_ps(hsum3, hsum3);\n    __m256 hsum8 = _mm256_hadd_ps(hsum4, hsum4);\n\n    __m256 perm1 =  _mm256_permute2f128_ps(hsum5, hsum5, 0x23);\n    __m256 perm2 =  _mm256_permute2f128_ps(hsum6, hsum6, 0x23);\n    __m256 perm3 =  _mm256_permute2f128_ps(hsum7, hsum7, 0x23);\n    __m256 perm4 =  _mm256_permute2f128_ps(hsum8, hsum8, 0x23);\n\n    __m256 sum1 = _mm256_add_ps(perm1, hsum5);\n    __m256 sum2 = _mm256_add_ps(perm2, hsum6);\n    __m256 sum3 = _mm256_add_ps(perm3, hsum7);\n    __m256 sum4 = _mm256_add_ps(perm4, hsum8);\n\n    __m256 blend1 = _mm256_blend_ps(sum1, sum2, 0xcc);\n    __m256 blend2 = _mm256_blend_ps(sum3, sum4, 0xcc);\n\n    __m256 final = _mm256_blend_ps(blend1, blend2, 0xf0);\n    return final;\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4d preduxp<Packet4d>(const Packet4d* vecs)\n{\n Packet4d tmp0, tmp1;\n\n  tmp0 = _mm256_hadd_pd(vecs[0], vecs[1]);\n  tmp0 = _mm256_add_pd(tmp0, _mm256_permute2f128_pd(tmp0, tmp0, 1));\n\n  tmp1 = _mm256_hadd_pd(vecs[2], vecs[3]);\n  tmp1 = _mm256_add_pd(tmp1, _mm256_permute2f128_pd(tmp1, tmp1, 1));\n\n  return _mm256_blend_pd(tmp0, tmp1, 0xC);\n}\n\ntemplate<> EIGEN_STRONG_INLINE float predux<Packet8f>(const Packet8f& a)\n{\n  return predux(Packet4f(_mm_add_ps(_mm256_castps256_ps128(a),_mm256_extractf128_ps(a,1))));\n}\ntemplate<> EIGEN_STRONG_INLINE double predux<Packet4d>(const Packet4d& a)\n{\n  return predux(Packet2d(_mm_add_pd(_mm256_castpd256_pd128(a),_mm256_extractf128_pd(a,1))));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f predux_half_dowto4<Packet8f>(const Packet8f& a)\n{\n  return _mm_add_ps(_mm256_castps256_ps128(a),_mm256_extractf128_ps(a,1));\n}\n\ntemplate<> EIGEN_STRONG_INLINE float predux_mul<Packet8f>(const Packet8f& a)\n{\n  Packet8f tmp;\n  tmp = _mm256_mul_ps(a, _mm256_permute2f128_ps(a,a,1));\n  tmp = _mm256_mul_ps(tmp, _mm256_shuffle_ps(tmp,tmp,_MM_SHUFFLE(1,0,3,2)));\n  return pfirst(_mm256_mul_ps(tmp, _mm256_shuffle_ps(tmp,tmp,1)));\n}\ntemplate<> EIGEN_STRONG_INLINE double predux_mul<Packet4d>(const Packet4d& a)\n{\n  Packet4d tmp;\n  tmp = _mm256_mul_pd(a, _mm256_permute2f128_pd(a,a,1));\n  return pfirst(_mm256_mul_pd(tmp, _mm256_shuffle_pd(tmp,tmp,1)));\n}\n\ntemplate<> EIGEN_STRONG_INLINE float predux_min<Packet8f>(const Packet8f& a)\n{\n  Packet8f tmp = _mm256_min_ps(a, _mm256_permute2f128_ps(a,a,1));\n  tmp = _mm256_min_ps(tmp, _mm256_shuffle_ps(tmp,tmp,_MM_SHUFFLE(1,0,3,2)));\n  return pfirst(_mm256_min_ps(tmp, _mm256_shuffle_ps(tmp,tmp,1)));\n}\ntemplate<> EIGEN_STRONG_INLINE double predux_min<Packet4d>(const Packet4d& a)\n{\n  Packet4d tmp = _mm256_min_pd(a, _mm256_permute2f128_pd(a,a,1));\n  return pfirst(_mm256_min_pd(tmp, _mm256_shuffle_pd(tmp, tmp, 1)));\n}\n\ntemplate<> EIGEN_STRONG_INLINE float predux_max<Packet8f>(const Packet8f& a)\n{\n  Packet8f tmp = _mm256_max_ps(a, _mm256_permute2f128_ps(a,a,1));\n  tmp = _mm256_max_ps(tmp, _mm256_shuffle_ps(tmp,tmp,_MM_SHUFFLE(1,0,3,2)));\n  return pfirst(_mm256_max_ps(tmp, _mm256_shuffle_ps(tmp,tmp,1)));\n}\n\ntemplate<> EIGEN_STRONG_INLINE double predux_max<Packet4d>(const Packet4d& a)\n{\n  Packet4d tmp = _mm256_max_pd(a, _mm256_permute2f128_pd(a,a,1));\n  return pfirst(_mm256_max_pd(tmp, _mm256_shuffle_pd(tmp, tmp, 1)));\n}\n\n// not needed yet\n// template<> EIGEN_STRONG_INLINE bool predux_all(const Packet8f& x)\n// {\n//   return _mm256_movemask_ps(x)==0xFF;\n// }\n\ntemplate<> EIGEN_STRONG_INLINE bool predux_any(const Packet8f& x)\n{\n  return _mm256_movemask_ps(x)!=0;\n}\n\ntemplate<int Offset>\nstruct palign_impl<Offset,Packet8f>\n{\n  static EIGEN_STRONG_INLINE void run(Packet8f& first, const Packet8f& second)\n  {\n    if (Offset==1)\n    {\n      first = _mm256_blend_ps(first, second, 1);\n      Packet8f tmp1 = _mm256_permute_ps (first, _MM_SHUFFLE(0,3,2,1));\n      Packet8f tmp2 = _mm256_permute2f128_ps (tmp1, tmp1, 1);\n      first = _mm256_blend_ps(tmp1, tmp2, 0x88);\n    }\n    else if (Offset==2)\n    {\n      first = _mm256_blend_ps(first, second, 3);\n      Packet8f tmp1 = _mm256_permute_ps (first, _MM_SHUFFLE(1,0,3,2));\n      Packet8f tmp2 = _mm256_permute2f128_ps (tmp1, tmp1, 1);\n      first = _mm256_blend_ps(tmp1, tmp2, 0xcc);\n    }\n    else if (Offset==3)\n    {\n      first = _mm256_blend_ps(first, second, 7);\n      Packet8f tmp1 = _mm256_permute_ps (first, _MM_SHUFFLE(2,1,0,3));\n      Packet8f tmp2 = _mm256_permute2f128_ps (tmp1, tmp1, 1);\n      first = _mm256_blend_ps(tmp1, tmp2, 0xee);\n    }\n    else if (Offset==4)\n    {\n      first = _mm256_blend_ps(first, second, 15);\n      Packet8f tmp1 = _mm256_permute_ps (first, _MM_SHUFFLE(3,2,1,0));\n      Packet8f tmp2 = _mm256_permute2f128_ps (tmp1, tmp1, 1);\n      first = _mm256_permute_ps(tmp2, _MM_SHUFFLE(3,2,1,0));\n    }\n    else if (Offset==5)\n    {\n      first = _mm256_blend_ps(first, second, 31);\n      first = _mm256_permute2f128_ps(first, first, 1);\n      Packet8f tmp = _mm256_permute_ps (first, _MM_SHUFFLE(0,3,2,1));\n      first = _mm256_permute2f128_ps(tmp, tmp, 1);\n      first = _mm256_blend_ps(tmp, first, 0x88);\n    }\n    else if (Offset==6)\n    {\n      first = _mm256_blend_ps(first, second, 63);\n      first = _mm256_permute2f128_ps(first, first, 1);\n      Packet8f tmp = _mm256_permute_ps (first, _MM_SHUFFLE(1,0,3,2));\n      first = _mm256_permute2f128_ps(tmp, tmp, 1);\n      first = _mm256_blend_ps(tmp, first, 0xcc);\n    }\n    else if (Offset==7)\n    {\n      first = _mm256_blend_ps(first, second, 127);\n      first = _mm256_permute2f128_ps(first, first, 1);\n      Packet8f tmp = _mm256_permute_ps (first, _MM_SHUFFLE(2,1,0,3));\n      first = _mm256_permute2f128_ps(tmp, tmp, 1);\n      first = _mm256_blend_ps(tmp, first, 0xee);\n    }\n  }\n};\n\ntemplate<int Offset>\nstruct palign_impl<Offset,Packet4d>\n{\n  static EIGEN_STRONG_INLINE void run(Packet4d& first, const Packet4d& second)\n  {\n    if (Offset==1)\n    {\n      first = _mm256_blend_pd(first, second, 1);\n      __m256d tmp = _mm256_permute_pd(first, 5);\n      first = _mm256_permute2f128_pd(tmp, tmp, 1);\n      first = _mm256_blend_pd(tmp, first, 0xA);\n    }\n    else if (Offset==2)\n    {\n      first = _mm256_blend_pd(first, second, 3);\n      first = _mm256_permute2f128_pd(first, first, 1);\n    }\n    else if (Offset==3)\n    {\n      first = _mm256_blend_pd(first, second, 7);\n      __m256d tmp = _mm256_permute_pd(first, 5);\n      first = _mm256_permute2f128_pd(tmp, tmp, 1);\n      first = _mm256_blend_pd(tmp, first, 5);\n    }\n  }\n};\n\nEIGEN_DEVICE_FUNC inline void\nptranspose(PacketBlock<Packet8f,8>& kernel) {\n  __m256 T0 = _mm256_unpacklo_ps(kernel.packet[0], kernel.packet[1]);\n  __m256 T1 = _mm256_unpackhi_ps(kernel.packet[0], kernel.packet[1]);\n  __m256 T2 = _mm256_unpacklo_ps(kernel.packet[2], kernel.packet[3]);\n  __m256 T3 = _mm256_unpackhi_ps(kernel.packet[2], kernel.packet[3]);\n  __m256 T4 = _mm256_unpacklo_ps(kernel.packet[4], kernel.packet[5]);\n  __m256 T5 = _mm256_unpackhi_ps(kernel.packet[4], kernel.packet[5]);\n  __m256 T6 = _mm256_unpacklo_ps(kernel.packet[6], kernel.packet[7]);\n  __m256 T7 = _mm256_unpackhi_ps(kernel.packet[6], kernel.packet[7]);\n  __m256 S0 = _mm256_shuffle_ps(T0,T2,_MM_SHUFFLE(1,0,1,0));\n  __m256 S1 = _mm256_shuffle_ps(T0,T2,_MM_SHUFFLE(3,2,3,2));\n  __m256 S2 = _mm256_shuffle_ps(T1,T3,_MM_SHUFFLE(1,0,1,0));\n  __m256 S3 = _mm256_shuffle_ps(T1,T3,_MM_SHUFFLE(3,2,3,2));\n  __m256 S4 = _mm256_shuffle_ps(T4,T6,_MM_SHUFFLE(1,0,1,0));\n  __m256 S5 = _mm256_shuffle_ps(T4,T6,_MM_SHUFFLE(3,2,3,2));\n  __m256 S6 = _mm256_shuffle_ps(T5,T7,_MM_SHUFFLE(1,0,1,0));\n  __m256 S7 = _mm256_shuffle_ps(T5,T7,_MM_SHUFFLE(3,2,3,2));\n  kernel.packet[0] = _mm256_permute2f128_ps(S0, S4, 0x20);\n  kernel.packet[1] = _mm256_permute2f128_ps(S1, S5, 0x20);\n  kernel.packet[2] = _mm256_permute2f128_ps(S2, S6, 0x20);\n  kernel.packet[3] = _mm256_permute2f128_ps(S3, S7, 0x20);\n  kernel.packet[4] = _mm256_permute2f128_ps(S0, S4, 0x31);\n  kernel.packet[5] = _mm256_permute2f128_ps(S1, S5, 0x31);\n  kernel.packet[6] = _mm256_permute2f128_ps(S2, S6, 0x31);\n  kernel.packet[7] = _mm256_permute2f128_ps(S3, S7, 0x31);\n}\n\nEIGEN_DEVICE_FUNC inline void\nptranspose(PacketBlock<Packet8f,4>& kernel) {\n  __m256 T0 = _mm256_unpacklo_ps(kernel.packet[0], kernel.packet[1]);\n  __m256 T1 = _mm256_unpackhi_ps(kernel.packet[0], kernel.packet[1]);\n  __m256 T2 = _mm256_unpacklo_ps(kernel.packet[2], kernel.packet[3]);\n  __m256 T3 = _mm256_unpackhi_ps(kernel.packet[2], kernel.packet[3]);\n\n  __m256 S0 = _mm256_shuffle_ps(T0,T2,_MM_SHUFFLE(1,0,1,0));\n  __m256 S1 = _mm256_shuffle_ps(T0,T2,_MM_SHUFFLE(3,2,3,2));\n  __m256 S2 = _mm256_shuffle_ps(T1,T3,_MM_SHUFFLE(1,0,1,0));\n  __m256 S3 = _mm256_shuffle_ps(T1,T3,_MM_SHUFFLE(3,2,3,2));\n\n  kernel.packet[0] = _mm256_permute2f128_ps(S0, S1, 0x20);\n  kernel.packet[1] = _mm256_permute2f128_ps(S2, S3, 0x20);\n  kernel.packet[2] = _mm256_permute2f128_ps(S0, S1, 0x31);\n  kernel.packet[3] = _mm256_permute2f128_ps(S2, S3, 0x31);\n}\n\nEIGEN_DEVICE_FUNC inline void\nptranspose(PacketBlock<Packet4d,4>& kernel) {\n  __m256d T0 = _mm256_shuffle_pd(kernel.packet[0], kernel.packet[1], 15);\n  __m256d T1 = _mm256_shuffle_pd(kernel.packet[0], kernel.packet[1], 0);\n  __m256d T2 = _mm256_shuffle_pd(kernel.packet[2], kernel.packet[3], 15);\n  __m256d T3 = _mm256_shuffle_pd(kernel.packet[2], kernel.packet[3], 0);\n\n  kernel.packet[1] = _mm256_permute2f128_pd(T0, T2, 32);\n  kernel.packet[3] = _mm256_permute2f128_pd(T0, T2, 49);\n  kernel.packet[0] = _mm256_permute2f128_pd(T1, T3, 32);\n  kernel.packet[2] = _mm256_permute2f128_pd(T1, T3, 49);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8f pblend(const Selector<8>& ifPacket, const Packet8f& thenPacket, const Packet8f& elsePacket) {\n  const __m256 zero = _mm256_setzero_ps();\n  const __m256 select = _mm256_set_ps(ifPacket.select[7], ifPacket.select[6], ifPacket.select[5], ifPacket.select[4], ifPacket.select[3], ifPacket.select[2], ifPacket.select[1], ifPacket.select[0]);\n  __m256 false_mask = _mm256_cmp_ps(select, zero, _CMP_EQ_UQ);\n  return _mm256_blendv_ps(thenPacket, elsePacket, false_mask);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4d pblend(const Selector<4>& ifPacket, const Packet4d& thenPacket, const Packet4d& elsePacket) {\n  const __m256d zero = _mm256_setzero_pd();\n  const __m256d select = _mm256_set_pd(ifPacket.select[3], ifPacket.select[2], ifPacket.select[1], ifPacket.select[0]);\n  __m256d false_mask = _mm256_cmp_pd(select, zero, _CMP_EQ_UQ);\n  return _mm256_blendv_pd(thenPacket, elsePacket, false_mask);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8f pinsertfirst(const Packet8f& a, float b)\n{\n  return _mm256_blend_ps(a,pset1<Packet8f>(b),1);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4d pinsertfirst(const Packet4d& a, double b)\n{\n  return _mm256_blend_pd(a,pset1<Packet4d>(b),1);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8f pinsertlast(const Packet8f& a, float b)\n{\n  return _mm256_blend_ps(a,pset1<Packet8f>(b),(1<<7));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4d pinsertlast(const Packet4d& a, double b)\n{\n  return _mm256_blend_pd(a,pset1<Packet4d>(b),(1<<3));\n}\n\n\n// Packet math for Eigen::half\ntemplate<> struct unpacket_traits<Packet8h> { typedef Eigen::half type; enum {size=8, alignment=Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false}; typedef Packet8h half; };\n\ntemplate<> EIGEN_STRONG_INLINE Packet8h pset1<Packet8h>(const Eigen::half& from) {\n  return _mm_set1_epi16(from.x);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Eigen::half pfirst<Packet8h>(const Packet8h& from) {\n  return half_impl::raw_uint16_to_half(static_cast<unsigned short>(_mm_extract_epi16(from, 0)));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8h pload<Packet8h>(const Eigen::half* from) {\n  return _mm_load_si128(reinterpret_cast<const __m128i*>(from));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8h ploadu<Packet8h>(const Eigen::half* from) {\n  return _mm_loadu_si128(reinterpret_cast<const __m128i*>(from));\n}\n\ntemplate<> EIGEN_STRONG_INLINE void pstore<Eigen::half>(Eigen::half* to, const Packet8h& from) {\n  _mm_store_si128(reinterpret_cast<__m128i*>(to), from);\n}\n\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<Eigen::half>(Eigen::half* to, const Packet8h& from) {\n  _mm_storeu_si128(reinterpret_cast<__m128i*>(to), from);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8h\nploaddup<Packet8h>(const Eigen::half*  from) {\n  unsigned short a = from[0].x;\n  unsigned short b = from[1].x;\n  unsigned short c = from[2].x;\n  unsigned short d = from[3].x;\n  return _mm_set_epi16(d, d, c, c, b, b, a, a);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8h\nploadquad<Packet8h>(const Eigen::half* from) {\n  unsigned short a = from[0].x;\n  unsigned short b = from[1].x;\n  return _mm_set_epi16(b, b, b, b, a, a, a, a);\n}\n\nEIGEN_STRONG_INLINE Packet8f half2float(const Packet8h& a) {\n#ifdef EIGEN_HAS_FP16_C\n  return _mm256_cvtph_ps(a);\n#else\n  EIGEN_ALIGN32 Eigen::half aux[8];\n  pstore(aux, a);\n  float f0(aux[0]);\n  float f1(aux[1]);\n  float f2(aux[2]);\n  float f3(aux[3]);\n  float f4(aux[4]);\n  float f5(aux[5]);\n  float f6(aux[6]);\n  float f7(aux[7]);\n\n  return _mm256_set_ps(f7, f6, f5, f4, f3, f2, f1, f0);\n#endif\n}\n\nEIGEN_STRONG_INLINE Packet8h float2half(const Packet8f& a) {\n#ifdef EIGEN_HAS_FP16_C\n  return _mm256_cvtps_ph(a, _MM_FROUND_TO_NEAREST_INT|_MM_FROUND_NO_EXC);\n#else\n  EIGEN_ALIGN32 float aux[8];\n  pstore(aux, a);\n  Eigen::half h0(aux[0]);\n  Eigen::half h1(aux[1]);\n  Eigen::half h2(aux[2]);\n  Eigen::half h3(aux[3]);\n  Eigen::half h4(aux[4]);\n  Eigen::half h5(aux[5]);\n  Eigen::half h6(aux[6]);\n  Eigen::half h7(aux[7]);\n\n  return _mm_set_epi16(h7.x, h6.x, h5.x, h4.x, h3.x, h2.x, h1.x, h0.x);\n#endif\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8h ptrue(const Packet8h& a) {\n return _mm_cmpeq_epi32(a, a);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8h por(const Packet8h& a,const Packet8h& b) {\n  // in some cases Packet4i is a wrapper around __m128i, so we either need to\n  // cast to Packet4i to directly call the intrinsics as below:\n  return _mm_or_si128(a,b);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8h pxor(const Packet8h& a,const Packet8h& b) {\n  return _mm_xor_si128(a,b);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8h pand(const Packet8h& a,const Packet8h& b) {\n  return _mm_and_si128(a,b);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8h pandnot(const Packet8h& a,const Packet8h& b) {\n  return _mm_andnot_si128(b,a);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8h pselect(const Packet8h& mask, const Packet8h& a, const Packet8h& b) {\n  return _mm_blendv_epi8(b, a, mask);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8h pcmp_eq(const Packet8h& a,const Packet8h& b) {\n  Packet8f af = half2float(a);\n  Packet8f bf = half2float(b);\n  Packet8f rf = pcmp_eq(af, bf);\n  // Pack the 32-bit flags into 16-bits flags.\n  return _mm_packs_epi32(_mm256_extractf128_si256(_mm256_castps_si256(rf), 0),\n                         _mm256_extractf128_si256(_mm256_castps_si256(rf), 1));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8h pconj(const Packet8h& a) { return a; }\n\ntemplate<> EIGEN_STRONG_INLINE Packet8h pnegate(const Packet8h& a) {\n  Packet8h sign_mask = _mm_set1_epi16(static_cast<unsigned short>(0x8000));\n  return _mm_xor_si128(a, sign_mask);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8h padd<Packet8h>(const Packet8h& a, const Packet8h& b) {\n  Packet8f af = half2float(a);\n  Packet8f bf = half2float(b);\n  Packet8f rf = padd(af, bf);\n  return float2half(rf);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8h psub<Packet8h>(const Packet8h& a, const Packet8h& b) {\n  Packet8f af = half2float(a);\n  Packet8f bf = half2float(b);\n  Packet8f rf = psub(af, bf);\n  return float2half(rf);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8h pmul<Packet8h>(const Packet8h& a, const Packet8h& b) {\n  Packet8f af = half2float(a);\n  Packet8f bf = half2float(b);\n  Packet8f rf = pmul(af, bf);\n  return float2half(rf);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8h pdiv<Packet8h>(const Packet8h& a, const Packet8h& b) {\n  Packet8f af = half2float(a);\n  Packet8f bf = half2float(b);\n  Packet8f rf = pdiv(af, bf);\n  return float2half(rf);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8h pgather<Eigen::half, Packet8h>(const Eigen::half* from, Index stride)\n{\n  return _mm_set_epi16(from[7*stride].x, from[6*stride].x, from[5*stride].x, from[4*stride].x, from[3*stride].x, from[2*stride].x, from[1*stride].x, from[0*stride].x);\n}\n\ntemplate<> EIGEN_STRONG_INLINE void pscatter<Eigen::half, Packet8h>(Eigen::half* to, const Packet8h& from, Index stride)\n{\n  EIGEN_ALIGN32 Eigen::half aux[8];\n  pstore(aux, from);\n  to[stride*0] = aux[0];\n  to[stride*1] = aux[1];\n  to[stride*2] = aux[2];\n  to[stride*3] = aux[3];\n  to[stride*4] = aux[4];\n  to[stride*5] = aux[5];\n  to[stride*6] = aux[6];\n  to[stride*7] = aux[7];\n}\n\ntemplate<> EIGEN_STRONG_INLINE Eigen::half predux<Packet8h>(const Packet8h& a) {\n  Packet8f af = half2float(a);\n  float reduced = predux<Packet8f>(af);\n  return Eigen::half(reduced);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Eigen::half predux_max<Packet8h>(const Packet8h& a) {\n  Packet8f af = half2float(a);\n  float reduced = predux_max<Packet8f>(af);\n  return Eigen::half(reduced);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Eigen::half predux_min<Packet8h>(const Packet8h& a) {\n  Packet8f af = half2float(a);\n  float reduced = predux_min<Packet8f>(af);\n  return Eigen::half(reduced);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Eigen::half predux_mul<Packet8h>(const Packet8h& a) {\n  Packet8f af = half2float(a);\n  float reduced = predux_mul<Packet8f>(af);\n  return Eigen::half(reduced);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8h preduxp<Packet8h>(const Packet8h* p) {\n  Packet8f pf[8];\n  pf[0] = half2float(p[0]);\n  pf[1] = half2float(p[1]);\n  pf[2] = half2float(p[2]);\n  pf[3] = half2float(p[3]);\n  pf[4] = half2float(p[4]);\n  pf[5] = half2float(p[5]);\n  pf[6] = half2float(p[6]);\n  pf[7] = half2float(p[7]);\n  Packet8f reduced = preduxp<Packet8f>(pf);\n  return float2half(reduced);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8h preverse(const Packet8h& a)\n{\n  __m128i m = _mm_setr_epi8(14,15,12,13,10,11,8,9,6,7,4,5,2,3,0,1);\n  return _mm_shuffle_epi8(a,m);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8h pinsertfirst(const Packet8h& a, Eigen::half b)\n{\n  return _mm_insert_epi16(a,int(b.x),0);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8h pinsertlast(const Packet8h& a, Eigen::half b)\n{\n  return _mm_insert_epi16(a,int(b.x),7);\n}\n\ntemplate<int Offset>\nstruct palign_impl<Offset,Packet8h>\n{\n  static EIGEN_STRONG_INLINE void run(Packet8h& first, const Packet8h& second)\n  {\n    if (Offset!=0)\n      first = _mm_alignr_epi8(second,first, Offset*2);\n  }\n};\n\nEIGEN_STRONG_INLINE void\nptranspose(PacketBlock<Packet8h,8>& kernel) {\n  __m128i a = kernel.packet[0];\n  __m128i b = kernel.packet[1];\n  __m128i c = kernel.packet[2];\n  __m128i d = kernel.packet[3];\n  __m128i e = kernel.packet[4];\n  __m128i f = kernel.packet[5];\n  __m128i g = kernel.packet[6];\n  __m128i h = kernel.packet[7];\n\n  __m128i a03b03 = _mm_unpacklo_epi16(a, b);\n  __m128i c03d03 = _mm_unpacklo_epi16(c, d);\n  __m128i e03f03 = _mm_unpacklo_epi16(e, f);\n  __m128i g03h03 = _mm_unpacklo_epi16(g, h);\n  __m128i a47b47 = _mm_unpackhi_epi16(a, b);\n  __m128i c47d47 = _mm_unpackhi_epi16(c, d);\n  __m128i e47f47 = _mm_unpackhi_epi16(e, f);\n  __m128i g47h47 = _mm_unpackhi_epi16(g, h);\n\n  __m128i a01b01c01d01 = _mm_unpacklo_epi32(a03b03, c03d03);\n  __m128i a23b23c23d23 = _mm_unpackhi_epi32(a03b03, c03d03);\n  __m128i e01f01g01h01 = _mm_unpacklo_epi32(e03f03, g03h03);\n  __m128i e23f23g23h23 = _mm_unpackhi_epi32(e03f03, g03h03);\n  __m128i a45b45c45d45 = _mm_unpacklo_epi32(a47b47, c47d47);\n  __m128i a67b67c67d67 = _mm_unpackhi_epi32(a47b47, c47d47);\n  __m128i e45f45g45h45 = _mm_unpacklo_epi32(e47f47, g47h47);\n  __m128i e67f67g67h67 = _mm_unpackhi_epi32(e47f47, g47h47);\n\n  __m128i a0b0c0d0e0f0g0h0 = _mm_unpacklo_epi64(a01b01c01d01, e01f01g01h01);\n  __m128i a1b1c1d1e1f1g1h1 = _mm_unpackhi_epi64(a01b01c01d01, e01f01g01h01);\n  __m128i a2b2c2d2e2f2g2h2 = _mm_unpacklo_epi64(a23b23c23d23, e23f23g23h23);\n  __m128i a3b3c3d3e3f3g3h3 = _mm_unpackhi_epi64(a23b23c23d23, e23f23g23h23);\n  __m128i a4b4c4d4e4f4g4h4 = _mm_unpacklo_epi64(a45b45c45d45, e45f45g45h45);\n  __m128i a5b5c5d5e5f5g5h5 = _mm_unpackhi_epi64(a45b45c45d45, e45f45g45h45);\n  __m128i a6b6c6d6e6f6g6h6 = _mm_unpacklo_epi64(a67b67c67d67, e67f67g67h67);\n  __m128i a7b7c7d7e7f7g7h7 = _mm_unpackhi_epi64(a67b67c67d67, e67f67g67h67);\n\n  kernel.packet[0] = a0b0c0d0e0f0g0h0;\n  kernel.packet[1] = a1b1c1d1e1f1g1h1;\n  kernel.packet[2] = a2b2c2d2e2f2g2h2;\n  kernel.packet[3] = a3b3c3d3e3f3g3h3;\n  kernel.packet[4] = a4b4c4d4e4f4g4h4;\n  kernel.packet[5] = a5b5c5d5e5f5g5h5;\n  kernel.packet[6] = a6b6c6d6e6f6g6h6;\n  kernel.packet[7] = a7b7c7d7e7f7g7h7;\n}\n\nEIGEN_STRONG_INLINE void\nptranspose(PacketBlock<Packet8h,4>& kernel) {\n  EIGEN_ALIGN32 Eigen::half in[4][8];\n  pstore<Eigen::half>(in[0], kernel.packet[0]);\n  pstore<Eigen::half>(in[1], kernel.packet[1]);\n  pstore<Eigen::half>(in[2], kernel.packet[2]);\n  pstore<Eigen::half>(in[3], kernel.packet[3]);\n\n  EIGEN_ALIGN32 Eigen::half out[4][8];\n\n  for (int i = 0; i < 4; ++i) {\n    for (int j = 0; j < 4; ++j) {\n      out[i][j] = in[j][2*i];\n    }\n    for (int j = 0; j < 4; ++j) {\n      out[i][j+4] = in[j][2*i+1];\n    }\n  }\n\n  kernel.packet[0] = pload<Packet8h>(out[0]);\n  kernel.packet[1] = pload<Packet8h>(out[1]);\n  kernel.packet[2] = pload<Packet8h>(out[2]);\n  kernel.packet[3] = pload<Packet8h>(out[3]);\n}\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_PACKET_MATH_AVX_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/AVX/TypeCasting.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_TYPE_CASTING_AVX_H\n#define EIGEN_TYPE_CASTING_AVX_H\n\nnamespace Eigen {\n\nnamespace internal {\n\n// For now we use SSE to handle integers, so we can't use AVX instructions to cast\n// from int to float\ntemplate <>\nstruct type_casting_traits<float, int> {\n  enum {\n    VectorizedCast = 0,\n    SrcCoeffRatio = 1,\n    TgtCoeffRatio = 1\n  };\n};\n\ntemplate <>\nstruct type_casting_traits<int, float> {\n  enum {\n    VectorizedCast = 0,\n    SrcCoeffRatio = 1,\n    TgtCoeffRatio = 1\n  };\n};\n\n\n\ntemplate<> EIGEN_STRONG_INLINE Packet8i pcast<Packet8f, Packet8i>(const Packet8f& a) {\n  return _mm256_cvttps_epi32(a);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8f pcast<Packet8i, Packet8f>(const Packet8i& a) {\n  return _mm256_cvtepi32_ps(a);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8i preinterpret<Packet8i,Packet8f>(const Packet8f& a) {\n  return _mm256_castps_si256(a);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8f preinterpret<Packet8f,Packet8i>(const Packet8i& a) {\n  return _mm256_castsi256_ps(a);\n}\n\n#ifndef EIGEN_VECTORIZE_AVX512\n\ntemplate <>\nstruct type_casting_traits<Eigen::half, float> {\n  enum {\n    VectorizedCast = 1,\n    SrcCoeffRatio = 1,\n    TgtCoeffRatio = 1\n  };\n};\n\ntemplate<> EIGEN_STRONG_INLINE Packet8f pcast<Packet8h, Packet8f>(const Packet8h& a) {\n  return half2float(a);\n}\n\ntemplate <>\nstruct type_casting_traits<float, Eigen::half> {\n  enum {\n    VectorizedCast = 1,\n    SrcCoeffRatio = 1,\n    TgtCoeffRatio = 1\n  };\n};\n\n#endif  // EIGEN_VECTORIZE_AVX512\n\ntemplate<> EIGEN_STRONG_INLINE Packet8h pcast<Packet8f, Packet8h>(const Packet8f& a) {\n  return float2half(a);\n}\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_TYPE_CASTING_AVX_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/AVX512/Complex.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2018 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_COMPLEX_AVX512_H\n#define EIGEN_COMPLEX_AVX512_H\n\nnamespace Eigen {\n\nnamespace internal {\n\n//---------- float ----------\nstruct Packet8cf\n{\n  EIGEN_STRONG_INLINE Packet8cf() {}\n  EIGEN_STRONG_INLINE explicit Packet8cf(const __m512& a) : v(a) {}\n  __m512  v;\n};\n\ntemplate<> struct packet_traits<std::complex<float> >  : default_packet_traits\n{\n  typedef Packet8cf type;\n  typedef Packet4cf half;\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size = 8,\n    HasHalfPacket = 1,\n\n    HasAdd    = 1,\n    HasSub    = 1,\n    HasMul    = 1,\n    HasDiv    = 1,\n    HasNegate = 1,\n    HasAbs    = 0,\n    HasAbs2   = 0,\n    HasMin    = 0,\n    HasMax    = 0,\n    HasSetLinear = 0,\n    HasReduxp = 0,\n    HasInsert = 1\n  };\n};\n\ntemplate<> struct unpacket_traits<Packet8cf> {\n  typedef std::complex<float> type;\n  enum {\n    size = 8,\n    alignment=unpacket_traits<Packet16f>::alignment,\n    vectorizable=true,\n    masked_load_available=false,\n    masked_store_available=false\n  };\n  typedef Packet4cf half;\n};\n\ntemplate<> EIGEN_STRONG_INLINE Packet8cf ptrue<Packet8cf>(const Packet8cf& a) { return Packet8cf(ptrue(Packet16f(a.v))); }\ntemplate<> EIGEN_STRONG_INLINE Packet8cf pnot<Packet8cf>(const Packet8cf& a) { return Packet8cf(pnot(Packet16f(a.v))); }\ntemplate<> EIGEN_STRONG_INLINE Packet8cf padd<Packet8cf>(const Packet8cf& a, const Packet8cf& b) { return Packet8cf(_mm512_add_ps(a.v,b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet8cf psub<Packet8cf>(const Packet8cf& a, const Packet8cf& b) { return Packet8cf(_mm512_sub_ps(a.v,b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet8cf pnegate(const Packet8cf& a)\n{\n  return Packet8cf(pnegate(a.v));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8cf pconj(const Packet8cf& a)\n{\n  const __m512 mask = _mm512_castsi512_ps(_mm512_setr_epi32(\n    0x00000000,0x80000000,0x00000000,0x80000000,0x00000000,0x80000000,0x00000000,0x80000000,\n    0x00000000,0x80000000,0x00000000,0x80000000,0x00000000,0x80000000,0x00000000,0x80000000));\n  return Packet8cf(pxor(a.v,mask));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8cf pmul<Packet8cf>(const Packet8cf& a, const Packet8cf& b)\n{\n  __m512 tmp2 = _mm512_mul_ps(_mm512_movehdup_ps(a.v), _mm512_permute_ps(b.v, _MM_SHUFFLE(2,3,0,1)));\n  return Packet8cf(_mm512_fmaddsub_ps(_mm512_moveldup_ps(a.v), b.v, tmp2));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8cf pand   <Packet8cf>(const Packet8cf& a, const Packet8cf& b) { return Packet8cf(pand(a.v,b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet8cf por    <Packet8cf>(const Packet8cf& a, const Packet8cf& b) { return Packet8cf(por(a.v,b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet8cf pxor   <Packet8cf>(const Packet8cf& a, const Packet8cf& b) { return Packet8cf(pxor(a.v,b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet8cf pandnot<Packet8cf>(const Packet8cf& a, const Packet8cf& b) { return Packet8cf(pandnot(a.v,b.v)); }\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet8cf pcmp_eq(const Packet8cf& a, const Packet8cf& b) {\n  __m512 eq = pcmp_eq<Packet16f>(a.v, b.v);\n  return Packet8cf(pand(eq, _mm512_permute_ps(eq, 0xB1)));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8cf pload <Packet8cf>(const std::complex<float>* from) { EIGEN_DEBUG_ALIGNED_LOAD return Packet8cf(pload<Packet16f>(&numext::real_ref(*from))); }\ntemplate<> EIGEN_STRONG_INLINE Packet8cf ploadu<Packet8cf>(const std::complex<float>* from) { EIGEN_DEBUG_UNALIGNED_LOAD return Packet8cf(ploadu<Packet16f>(&numext::real_ref(*from))); }\n\n\ntemplate<> EIGEN_STRONG_INLINE Packet8cf pset1<Packet8cf>(const std::complex<float>& from)\n{\n  return Packet8cf(_mm512_castpd_ps(pload1<Packet8d>((const double*)(const void*)&from)));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8cf ploaddup<Packet8cf>(const std::complex<float>* from)\n{\n  return Packet8cf( _mm512_castpd_ps( ploaddup<Packet8d>((const double*)(const void*)from )) );\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8cf ploadquad<Packet8cf>(const std::complex<float>* from)\n{\n  return Packet8cf( _mm512_castpd_ps( ploadquad<Packet8d>((const double*)(const void*)from )) );\n}\n\ntemplate<> EIGEN_STRONG_INLINE void pstore <std::complex<float> >(std::complex<float>* to, const Packet8cf& from) { EIGEN_DEBUG_ALIGNED_STORE pstore(&numext::real_ref(*to), from.v); }\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<std::complex<float> >(std::complex<float>* to, const Packet8cf& from) { EIGEN_DEBUG_UNALIGNED_STORE pstoreu(&numext::real_ref(*to), from.v); }\n\ntemplate<> EIGEN_DEVICE_FUNC inline Packet8cf pgather<std::complex<float>, Packet8cf>(const std::complex<float>* from, Index stride)\n{\n  return Packet8cf(_mm512_castpd_ps(pgather<double,Packet8d>((const double*)(const void*)from, stride)));\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<std::complex<float>, Packet8cf>(std::complex<float>* to, const Packet8cf& from, Index stride)\n{\n  pscatter((double*)(void*)to, _mm512_castps_pd(from.v), stride);\n}\n\ntemplate<> EIGEN_STRONG_INLINE std::complex<float>  pfirst<Packet8cf>(const Packet8cf& a)\n{\n  return pfirst(Packet2cf(_mm512_castps512_ps128(a.v)));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8cf preverse(const Packet8cf& a) {\n  return Packet8cf(_mm512_castsi512_ps(\n            _mm512_permutexvar_epi64( _mm512_set_epi32(0, 0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7),\n                                      _mm512_castps_si512(a.v))));\n}\n\ntemplate<> EIGEN_STRONG_INLINE std::complex<float> predux<Packet8cf>(const Packet8cf& a)\n{\n  return predux(padd(Packet4cf(extract256<0>(a.v)),\n                     Packet4cf(extract256<1>(a.v))));\n}\n\ntemplate<> EIGEN_STRONG_INLINE std::complex<float> predux_mul<Packet8cf>(const Packet8cf& a)\n{\n  return predux_mul(pmul(Packet4cf(extract256<0>(a.v)),\n                         Packet4cf(extract256<1>(a.v))));\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4cf predux_half_dowto4<Packet8cf>(const Packet8cf& a) {\n  __m256 lane0 = extract256<0>(a.v);\n  __m256 lane1 = extract256<1>(a.v);\n  __m256 res = _mm256_add_ps(lane0, lane1);\n  return Packet4cf(res);\n}\n\ntemplate<int Offset>\nstruct palign_impl<Offset,Packet8cf>\n{\n  static EIGEN_STRONG_INLINE void run(Packet8cf& first, const Packet8cf& second)\n  {\n    if (Offset==0) return;\n    palign_impl<Offset*2,Packet16f>::run(first.v, second.v);\n  }\n};\n\ntemplate<> struct conj_helper<Packet8cf, Packet8cf, false,true>\n{\n  EIGEN_STRONG_INLINE Packet8cf pmadd(const Packet8cf& x, const Packet8cf& y, const Packet8cf& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet8cf pmul(const Packet8cf& a, const Packet8cf& b) const\n  {\n    return internal::pmul(a, pconj(b));\n  }\n};\n\ntemplate<> struct conj_helper<Packet8cf, Packet8cf, true,false>\n{\n  EIGEN_STRONG_INLINE Packet8cf pmadd(const Packet8cf& x, const Packet8cf& y, const Packet8cf& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet8cf pmul(const Packet8cf& a, const Packet8cf& b) const\n  {\n    return internal::pmul(pconj(a), b);\n  }\n};\n\ntemplate<> struct conj_helper<Packet8cf, Packet8cf, true,true>\n{\n  EIGEN_STRONG_INLINE Packet8cf pmadd(const Packet8cf& x, const Packet8cf& y, const Packet8cf& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet8cf pmul(const Packet8cf& a, const Packet8cf& b) const\n  {\n    return pconj(internal::pmul(a, b));\n  }\n};\n\nEIGEN_MAKE_CONJ_HELPER_CPLX_REAL(Packet8cf,Packet16f)\n\ntemplate<> EIGEN_STRONG_INLINE Packet8cf pdiv<Packet8cf>(const Packet8cf& a, const Packet8cf& b)\n{\n  Packet8cf num = pmul(a, pconj(b));\n  __m512 tmp = _mm512_mul_ps(b.v, b.v);\n  __m512 tmp2    = _mm512_shuffle_ps(tmp,tmp,0xB1);\n  __m512 denom = _mm512_add_ps(tmp, tmp2);\n  return Packet8cf(_mm512_div_ps(num.v, denom));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8cf pcplxflip<Packet8cf>(const Packet8cf& x)\n{\n  return Packet8cf(_mm512_shuffle_ps(x.v, x.v, _MM_SHUFFLE(2, 3, 0 ,1)));\n}\n\n//---------- double ----------\nstruct Packet4cd\n{\n  EIGEN_STRONG_INLINE Packet4cd() {}\n  EIGEN_STRONG_INLINE explicit Packet4cd(const __m512d& a) : v(a) {}\n  __m512d  v;\n};\n\ntemplate<> struct packet_traits<std::complex<double> >  : default_packet_traits\n{\n  typedef Packet4cd type;\n  typedef Packet2cd half;\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 0,\n    size = 4,\n    HasHalfPacket = 1,\n\n    HasAdd    = 1,\n    HasSub    = 1,\n    HasMul    = 1,\n    HasDiv    = 1,\n    HasNegate = 1,\n    HasAbs    = 0,\n    HasAbs2   = 0,\n    HasMin    = 0,\n    HasMax    = 0,\n    HasSetLinear = 0,\n    HasReduxp = 0\n  };\n};\n\ntemplate<> struct unpacket_traits<Packet4cd> {\n  typedef std::complex<double> type;\n  enum {\n    size = 4,\n    alignment = unpacket_traits<Packet8d>::alignment,\n    vectorizable=true,\n    masked_load_available=false,\n    masked_store_available=false\n  };\n  typedef Packet2cd half;\n};\n\ntemplate<> EIGEN_STRONG_INLINE Packet4cd padd<Packet4cd>(const Packet4cd& a, const Packet4cd& b) { return Packet4cd(_mm512_add_pd(a.v,b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4cd psub<Packet4cd>(const Packet4cd& a, const Packet4cd& b) { return Packet4cd(_mm512_sub_pd(a.v,b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4cd pnegate(const Packet4cd& a) { return Packet4cd(pnegate(a.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4cd pconj(const Packet4cd& a)\n{\n  const __m512d mask = _mm512_castsi512_pd(\n          _mm512_set_epi32(0x80000000,0x0,0x0,0x0,0x80000000,0x0,0x0,0x0,\n                           0x80000000,0x0,0x0,0x0,0x80000000,0x0,0x0,0x0));\n  return Packet4cd(pxor(a.v,mask));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4cd pmul<Packet4cd>(const Packet4cd& a, const Packet4cd& b)\n{\n  __m512d tmp1 = _mm512_shuffle_pd(a.v,a.v,0x0);\n  __m512d tmp2 = _mm512_shuffle_pd(a.v,a.v,0xFF);\n  __m512d tmp3 = _mm512_shuffle_pd(b.v,b.v,0x55);\n  __m512d odd  = _mm512_mul_pd(tmp2, tmp3);\n  return Packet4cd(_mm512_fmaddsub_pd(tmp1, b.v, odd));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4cd ptrue<Packet4cd>(const Packet4cd& a) { return Packet4cd(ptrue(Packet8d(a.v))); }\ntemplate<> EIGEN_STRONG_INLINE Packet4cd pnot<Packet4cd>(const Packet4cd& a) { return Packet4cd(pnot(Packet8d(a.v))); }\ntemplate<> EIGEN_STRONG_INLINE Packet4cd pand   <Packet4cd>(const Packet4cd& a, const Packet4cd& b) { return Packet4cd(pand(a.v,b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4cd por    <Packet4cd>(const Packet4cd& a, const Packet4cd& b) { return Packet4cd(por(a.v,b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4cd pxor   <Packet4cd>(const Packet4cd& a, const Packet4cd& b) { return Packet4cd(pxor(a.v,b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4cd pandnot<Packet4cd>(const Packet4cd& a, const Packet4cd& b) { return Packet4cd(pandnot(a.v,b.v)); }\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4cd pcmp_eq(const Packet4cd& a, const Packet4cd& b) {\n  __m512d eq = pcmp_eq<Packet8d>(a.v, b.v);\n  return Packet4cd(pand(eq, _mm512_permute_pd(eq, 0x55)));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4cd pload <Packet4cd>(const std::complex<double>* from)\n{ EIGEN_DEBUG_ALIGNED_LOAD return Packet4cd(pload<Packet8d>((const double*)from)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4cd ploadu<Packet4cd>(const std::complex<double>* from)\n{ EIGEN_DEBUG_UNALIGNED_LOAD return Packet4cd(ploadu<Packet8d>((const double*)from)); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4cd pset1<Packet4cd>(const std::complex<double>& from)\n{\n  #ifdef EIGEN_VECTORIZE_AVX512DQ\n  return Packet4cd(_mm512_broadcast_f64x2(pset1<Packet1cd>(from).v));\n  #else\n  return Packet4cd(_mm512_castps_pd(_mm512_broadcast_f32x4( _mm_castpd_ps(pset1<Packet1cd>(from).v))));\n  #endif\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4cd ploaddup<Packet4cd>(const std::complex<double>* from) {\n  return Packet4cd(_mm512_insertf64x4(\n          _mm512_castpd256_pd512(ploaddup<Packet2cd>(from).v), ploaddup<Packet2cd>(from+1).v, 1));\n}\n\ntemplate<> EIGEN_STRONG_INLINE void pstore <std::complex<double> >(std::complex<double> *   to, const Packet4cd& from) { EIGEN_DEBUG_ALIGNED_STORE pstore((double*)to, from.v); }\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<std::complex<double> >(std::complex<double> *   to, const Packet4cd& from) { EIGEN_DEBUG_UNALIGNED_STORE pstoreu((double*)to, from.v); }\n\ntemplate<> EIGEN_DEVICE_FUNC inline Packet4cd pgather<std::complex<double>, Packet4cd>(const std::complex<double>* from, Index stride)\n{\n  return Packet4cd(_mm512_insertf64x4(_mm512_castpd256_pd512(\n            _mm256_insertf128_pd(_mm256_castpd128_pd256(ploadu<Packet1cd>(from+0*stride).v), ploadu<Packet1cd>(from+1*stride).v,1)),\n            _mm256_insertf128_pd(_mm256_castpd128_pd256(ploadu<Packet1cd>(from+2*stride).v), ploadu<Packet1cd>(from+3*stride).v,1), 1));\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<std::complex<double>, Packet4cd>(std::complex<double>* to, const Packet4cd& from, Index stride)\n{\n  __m512i fromi = _mm512_castpd_si512(from.v);\n  double* tod = (double*)(void*)to;\n  _mm_storeu_pd(tod+0*stride, _mm_castsi128_pd(_mm512_extracti32x4_epi32(fromi,0)) );\n  _mm_storeu_pd(tod+2*stride, _mm_castsi128_pd(_mm512_extracti32x4_epi32(fromi,1)) );\n  _mm_storeu_pd(tod+4*stride, _mm_castsi128_pd(_mm512_extracti32x4_epi32(fromi,2)) );\n  _mm_storeu_pd(tod+6*stride, _mm_castsi128_pd(_mm512_extracti32x4_epi32(fromi,3)) );\n}\n\ntemplate<> EIGEN_STRONG_INLINE std::complex<double> pfirst<Packet4cd>(const Packet4cd& a)\n{\n  __m128d low = extract128<0>(a.v);\n  EIGEN_ALIGN16 double res[2];\n  _mm_store_pd(res, low);\n  return std::complex<double>(res[0],res[1]);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4cd preverse(const Packet4cd& a) {\n  return Packet4cd(_mm512_shuffle_f64x2(a.v, a.v, EIGEN_SSE_SHUFFLE_MASK(3,2,1,0)));\n}\n\ntemplate<> EIGEN_STRONG_INLINE std::complex<double> predux<Packet4cd>(const Packet4cd& a)\n{\n  return predux(padd(Packet2cd(_mm512_extractf64x4_pd(a.v,0)),\n                     Packet2cd(_mm512_extractf64x4_pd(a.v,1))));\n}\n\ntemplate<> EIGEN_STRONG_INLINE std::complex<double> predux_mul<Packet4cd>(const Packet4cd& a)\n{\n  return predux_mul(pmul(Packet2cd(_mm512_extractf64x4_pd(a.v,0)),\n                         Packet2cd(_mm512_extractf64x4_pd(a.v,1))));\n}\n\ntemplate<int Offset>\nstruct palign_impl<Offset,Packet4cd>\n{\n  static EIGEN_STRONG_INLINE void run(Packet4cd& first, const Packet4cd& second)\n  {\n    if (Offset==0) return;\n    palign_impl<Offset*2,Packet8d>::run(first.v, second.v);\n  }\n};\n\ntemplate<> struct conj_helper<Packet4cd, Packet4cd, false,true>\n{\n  EIGEN_STRONG_INLINE Packet4cd pmadd(const Packet4cd& x, const Packet4cd& y, const Packet4cd& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet4cd pmul(const Packet4cd& a, const Packet4cd& b) const\n  {\n    return internal::pmul(a, pconj(b));\n  }\n};\n\ntemplate<> struct conj_helper<Packet4cd, Packet4cd, true,false>\n{\n  EIGEN_STRONG_INLINE Packet4cd pmadd(const Packet4cd& x, const Packet4cd& y, const Packet4cd& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet4cd pmul(const Packet4cd& a, const Packet4cd& b) const\n  {\n    return internal::pmul(pconj(a), b);\n  }\n};\n\ntemplate<> struct conj_helper<Packet4cd, Packet4cd, true,true>\n{\n  EIGEN_STRONG_INLINE Packet4cd pmadd(const Packet4cd& x, const Packet4cd& y, const Packet4cd& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet4cd pmul(const Packet4cd& a, const Packet4cd& b) const\n  {\n    return pconj(internal::pmul(a, b));\n  }\n};\n\nEIGEN_MAKE_CONJ_HELPER_CPLX_REAL(Packet4cd,Packet8d)\n\ntemplate<> EIGEN_STRONG_INLINE Packet4cd pdiv<Packet4cd>(const Packet4cd& a, const Packet4cd& b)\n{\n  Packet4cd num = pmul(a, pconj(b));\n  __m512d tmp = _mm512_mul_pd(b.v, b.v);\n  __m512d denom =  padd(_mm512_permute_pd(tmp,0x55), tmp);\n  return Packet4cd(_mm512_div_pd(num.v, denom));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4cd pcplxflip<Packet4cd>(const Packet4cd& x)\n{\n  return Packet4cd(_mm512_permute_pd(x.v,0x55));\n}\n\nEIGEN_DEVICE_FUNC inline void\nptranspose(PacketBlock<Packet8cf,4>& kernel) {\n  PacketBlock<Packet8d,4> pb;\n  \n  pb.packet[0] = _mm512_castps_pd(kernel.packet[0].v);\n  pb.packet[1] = _mm512_castps_pd(kernel.packet[1].v);\n  pb.packet[2] = _mm512_castps_pd(kernel.packet[2].v);\n  pb.packet[3] = _mm512_castps_pd(kernel.packet[3].v);\n  ptranspose(pb);\n  kernel.packet[0].v = _mm512_castpd_ps(pb.packet[0]);\n  kernel.packet[1].v = _mm512_castpd_ps(pb.packet[1]);\n  kernel.packet[2].v = _mm512_castpd_ps(pb.packet[2]);\n  kernel.packet[3].v = _mm512_castpd_ps(pb.packet[3]);\n}\n\nEIGEN_DEVICE_FUNC inline void\nptranspose(PacketBlock<Packet8cf,8>& kernel) {\n  PacketBlock<Packet8d,8> pb;\n  \n  pb.packet[0] = _mm512_castps_pd(kernel.packet[0].v);\n  pb.packet[1] = _mm512_castps_pd(kernel.packet[1].v);\n  pb.packet[2] = _mm512_castps_pd(kernel.packet[2].v);\n  pb.packet[3] = _mm512_castps_pd(kernel.packet[3].v);\n  pb.packet[4] = _mm512_castps_pd(kernel.packet[4].v);\n  pb.packet[5] = _mm512_castps_pd(kernel.packet[5].v);\n  pb.packet[6] = _mm512_castps_pd(kernel.packet[6].v);\n  pb.packet[7] = _mm512_castps_pd(kernel.packet[7].v);\n  ptranspose(pb);\n  kernel.packet[0].v = _mm512_castpd_ps(pb.packet[0]);\n  kernel.packet[1].v = _mm512_castpd_ps(pb.packet[1]);\n  kernel.packet[2].v = _mm512_castpd_ps(pb.packet[2]);\n  kernel.packet[3].v = _mm512_castpd_ps(pb.packet[3]);\n  kernel.packet[4].v = _mm512_castpd_ps(pb.packet[4]);\n  kernel.packet[5].v = _mm512_castpd_ps(pb.packet[5]);\n  kernel.packet[6].v = _mm512_castpd_ps(pb.packet[6]);\n  kernel.packet[7].v = _mm512_castpd_ps(pb.packet[7]);\n}\n\nEIGEN_DEVICE_FUNC inline void\nptranspose(PacketBlock<Packet4cd,4>& kernel) {\n  __m512d T0 = _mm512_shuffle_f64x2(kernel.packet[0].v, kernel.packet[1].v, EIGEN_SSE_SHUFFLE_MASK(0,1,0,1)); // [a0 a1 b0 b1]\n  __m512d T1 = _mm512_shuffle_f64x2(kernel.packet[0].v, kernel.packet[1].v, EIGEN_SSE_SHUFFLE_MASK(2,3,2,3)); // [a2 a3 b2 b3]\n  __m512d T2 = _mm512_shuffle_f64x2(kernel.packet[2].v, kernel.packet[3].v, EIGEN_SSE_SHUFFLE_MASK(0,1,0,1)); // [c0 c1 d0 d1]\n  __m512d T3 = _mm512_shuffle_f64x2(kernel.packet[2].v, kernel.packet[3].v, EIGEN_SSE_SHUFFLE_MASK(2,3,2,3)); // [c2 c3 d2 d3]\n\n  kernel.packet[3] = Packet4cd(_mm512_shuffle_f64x2(T1, T3, EIGEN_SSE_SHUFFLE_MASK(1,3,1,3))); // [a3 b3 c3 d3]\n  kernel.packet[2] = Packet4cd(_mm512_shuffle_f64x2(T1, T3, EIGEN_SSE_SHUFFLE_MASK(0,2,0,2))); // [a2 b2 c2 d2]\n  kernel.packet[1] = Packet4cd(_mm512_shuffle_f64x2(T0, T2, EIGEN_SSE_SHUFFLE_MASK(1,3,1,3))); // [a1 b1 c1 d1]\n  kernel.packet[0] = Packet4cd(_mm512_shuffle_f64x2(T0, T2, EIGEN_SSE_SHUFFLE_MASK(0,2,0,2))); // [a0 b0 c0 d0]\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8cf pinsertfirst(const Packet8cf& a, std::complex<float> b)\n{\n  Packet2cf tmp = Packet2cf(_mm512_extractf32x4_ps(a.v,0));\n  tmp = pinsertfirst(tmp, b);\n  return Packet8cf( _mm512_insertf32x4(a.v, tmp.v, 0) );\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4cd pinsertfirst(const Packet4cd& a, std::complex<double> b)\n{\n  return Packet4cd(_mm512_castsi512_pd( _mm512_inserti32x4(_mm512_castpd_si512(a.v), _mm_castpd_si128(pset1<Packet1cd>(b).v), 0) ));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8cf pinsertlast(const Packet8cf& a, std::complex<float> b)\n{\n  Packet2cf tmp = Packet2cf(_mm512_extractf32x4_ps(a.v,3) );\n  tmp = pinsertlast(tmp, b);\n  return Packet8cf( _mm512_insertf32x4(a.v, tmp.v, 3) );\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4cd pinsertlast(const Packet4cd& a, std::complex<double> b)\n{\n  return Packet4cd(_mm512_castsi512_pd( _mm512_inserti32x4(_mm512_castpd_si512(a.v), _mm_castpd_si128(pset1<Packet1cd>(b).v), 3) ));\n}\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_COMPLEX_AVX512_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/AVX512/MathFunctions.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Pedro Gonnet (pedro.gonnet@gmail.com)\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef THIRD_PARTY_EIGEN3_EIGEN_SRC_CORE_ARCH_AVX512_MATHFUNCTIONS_H_\n#define THIRD_PARTY_EIGEN3_EIGEN_SRC_CORE_ARCH_AVX512_MATHFUNCTIONS_H_\n\nnamespace Eigen {\n\nnamespace internal {\n\n// Disable the code for older versions of gcc that don't support many of the required avx512 instrinsics.\n#if EIGEN_GNUC_AT_LEAST(5, 3) || EIGEN_COMP_CLANG  || EIGEN_COMP_MSVC >= 1923\n\n#define _EIGEN_DECLARE_CONST_Packet16f(NAME, X) \\\n  const Packet16f p16f_##NAME = pset1<Packet16f>(X)\n\n#define _EIGEN_DECLARE_CONST_Packet16f_FROM_INT(NAME, X) \\\n  const Packet16f p16f_##NAME =  preinterpret<Packet16f,Packet16i>(pset1<Packet16i>(X))\n\n#define _EIGEN_DECLARE_CONST_Packet8d(NAME, X) \\\n  const Packet8d p8d_##NAME = pset1<Packet8d>(X)\n\n#define _EIGEN_DECLARE_CONST_Packet8d_FROM_INT64(NAME, X) \\\n  const Packet8d p8d_##NAME = _mm512_castsi512_pd(_mm512_set1_epi64(X))\n\n// Natural logarithm\n// Computes log(x) as log(2^e * m) = C*e + log(m), where the constant C =log(2)\n// and m is in the range [sqrt(1/2),sqrt(2)). In this range, the logarithm can\n// be easily approximated by a polynomial centered on m=1 for stability.\n#if defined(EIGEN_VECTORIZE_AVX512DQ)\ntemplate <>\nEIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet16f\nplog<Packet16f>(const Packet16f& _x) {\n  Packet16f x = _x;\n  _EIGEN_DECLARE_CONST_Packet16f(1, 1.0f);\n  _EIGEN_DECLARE_CONST_Packet16f(half, 0.5f);\n  _EIGEN_DECLARE_CONST_Packet16f(126f, 126.0f);\n\n  _EIGEN_DECLARE_CONST_Packet16f_FROM_INT(inv_mant_mask, ~0x7f800000);\n\n  // The smallest non denormalized float number.\n  _EIGEN_DECLARE_CONST_Packet16f_FROM_INT(min_norm_pos, 0x00800000);\n  _EIGEN_DECLARE_CONST_Packet16f_FROM_INT(minus_inf, 0xff800000);\n  _EIGEN_DECLARE_CONST_Packet16f_FROM_INT(pos_inf, 0x7f800000);\n  _EIGEN_DECLARE_CONST_Packet16f_FROM_INT(nan, 0x7fc00000);\n\n  // Polynomial coefficients.\n  _EIGEN_DECLARE_CONST_Packet16f(cephes_SQRTHF, 0.707106781186547524f);\n  _EIGEN_DECLARE_CONST_Packet16f(cephes_log_p0, 7.0376836292E-2f);\n  _EIGEN_DECLARE_CONST_Packet16f(cephes_log_p1, -1.1514610310E-1f);\n  _EIGEN_DECLARE_CONST_Packet16f(cephes_log_p2, 1.1676998740E-1f);\n  _EIGEN_DECLARE_CONST_Packet16f(cephes_log_p3, -1.2420140846E-1f);\n  _EIGEN_DECLARE_CONST_Packet16f(cephes_log_p4, +1.4249322787E-1f);\n  _EIGEN_DECLARE_CONST_Packet16f(cephes_log_p5, -1.6668057665E-1f);\n  _EIGEN_DECLARE_CONST_Packet16f(cephes_log_p6, +2.0000714765E-1f);\n  _EIGEN_DECLARE_CONST_Packet16f(cephes_log_p7, -2.4999993993E-1f);\n  _EIGEN_DECLARE_CONST_Packet16f(cephes_log_p8, +3.3333331174E-1f);\n  _EIGEN_DECLARE_CONST_Packet16f(cephes_log_q1, -2.12194440e-4f);\n  _EIGEN_DECLARE_CONST_Packet16f(cephes_log_q2, 0.693359375f);\n\n  // invalid_mask is set to true when x is NaN\n  __mmask16 invalid_mask =  _mm512_cmp_ps_mask(x, _mm512_setzero_ps(), _CMP_NGE_UQ);\n  __mmask16 iszero_mask  =  _mm512_cmp_ps_mask(x, _mm512_setzero_ps(), _CMP_EQ_OQ);\n      \n  // Truncate input values to the minimum positive normal.\n  x = pmax(x, p16f_min_norm_pos);\n\n  // Extract the shifted exponents.\n  Packet16f emm0 = _mm512_cvtepi32_ps(_mm512_srli_epi32((preinterpret<Packet16i,Packet16f>(x)), 23));\n  Packet16f e = _mm512_sub_ps(emm0, p16f_126f);\n\n  // Set the exponents to -1, i.e. x are in the range [0.5,1).\n  x = _mm512_and_ps(x, p16f_inv_mant_mask);\n  x = _mm512_or_ps(x, p16f_half);\n\n  // part2: Shift the inputs from the range [0.5,1) to [sqrt(1/2),sqrt(2))\n  // and shift by -1. The values are then centered around 0, which improves\n  // the stability of the polynomial evaluation.\n  //   if( x < SQRTHF ) {\n  //     e -= 1;\n  //     x = x + x - 1.0;\n  //   } else { x = x - 1.0; }\n  __mmask16 mask = _mm512_cmp_ps_mask(x, p16f_cephes_SQRTHF, _CMP_LT_OQ);\n  Packet16f tmp = _mm512_mask_blend_ps(mask, _mm512_setzero_ps(), x);\n  x = psub(x, p16f_1);\n  e = psub(e, _mm512_mask_blend_ps(mask, _mm512_setzero_ps(), p16f_1));\n  x = padd(x, tmp);\n\n  Packet16f x2 = pmul(x, x);\n  Packet16f x3 = pmul(x2, x);\n\n  // Evaluate the polynomial approximant of degree 8 in three parts, probably\n  // to improve instruction-level parallelism.\n  Packet16f y, y1, y2;\n  y = pmadd(p16f_cephes_log_p0, x, p16f_cephes_log_p1);\n  y1 = pmadd(p16f_cephes_log_p3, x, p16f_cephes_log_p4);\n  y2 = pmadd(p16f_cephes_log_p6, x, p16f_cephes_log_p7);\n  y = pmadd(y, x, p16f_cephes_log_p2);\n  y1 = pmadd(y1, x, p16f_cephes_log_p5);\n  y2 = pmadd(y2, x, p16f_cephes_log_p8);\n  y = pmadd(y, x3, y1);\n  y = pmadd(y, x3, y2);\n  y = pmul(y, x3);\n\n  // Add the logarithm of the exponent back to the result of the interpolation.\n  y1 = pmul(e, p16f_cephes_log_q1);\n  tmp = pmul(x2, p16f_half);\n  y = padd(y, y1);\n  x = psub(x, tmp);\n  y2 = pmul(e, p16f_cephes_log_q2);\n  x = padd(x, y);\n  x = padd(x, y2);\n\n  __mmask16 pos_inf_mask = _mm512_cmp_ps_mask(_x,p16f_pos_inf,_CMP_EQ_OQ);\n  // Filter out invalid inputs, i.e.:\n  //  - negative arg will be NAN,\n  //  - 0 will be -INF.\n  //  - +INF will be +INF\n  return _mm512_mask_blend_ps(iszero_mask,\n            _mm512_mask_blend_ps(invalid_mask,\n              _mm512_mask_blend_ps(pos_inf_mask,x,p16f_pos_inf),\n              p16f_nan),\n            p16f_minus_inf);\n}\n#endif\n\n// Exponential function. Works by writing \"x = m*log(2) + r\" where\n// \"m = floor(x/log(2)+1/2)\" and \"r\" is the remainder. The result is then\n// \"exp(x) = 2^m*exp(r)\" where exp(r) is in the range [-1,1).\ntemplate <>\nEIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet16f\npexp<Packet16f>(const Packet16f& _x) {\n  _EIGEN_DECLARE_CONST_Packet16f(1, 1.0f);\n  _EIGEN_DECLARE_CONST_Packet16f(half, 0.5f);\n  _EIGEN_DECLARE_CONST_Packet16f(127, 127.0f);\n\n  _EIGEN_DECLARE_CONST_Packet16f(exp_hi, 88.3762626647950f);\n  _EIGEN_DECLARE_CONST_Packet16f(exp_lo, -88.3762626647949f);\n\n  _EIGEN_DECLARE_CONST_Packet16f(cephes_LOG2EF, 1.44269504088896341f);\n\n  _EIGEN_DECLARE_CONST_Packet16f(cephes_exp_p0, 1.9875691500E-4f);\n  _EIGEN_DECLARE_CONST_Packet16f(cephes_exp_p1, 1.3981999507E-3f);\n  _EIGEN_DECLARE_CONST_Packet16f(cephes_exp_p2, 8.3334519073E-3f);\n  _EIGEN_DECLARE_CONST_Packet16f(cephes_exp_p3, 4.1665795894E-2f);\n  _EIGEN_DECLARE_CONST_Packet16f(cephes_exp_p4, 1.6666665459E-1f);\n  _EIGEN_DECLARE_CONST_Packet16f(cephes_exp_p5, 5.0000001201E-1f);\n\n  // Clamp x.\n  Packet16f x = pmax(pmin(_x, p16f_exp_hi), p16f_exp_lo);\n\n  // Express exp(x) as exp(m*ln(2) + r), start by extracting\n  // m = floor(x/ln(2) + 0.5).\n  Packet16f m = _mm512_floor_ps(pmadd(x, p16f_cephes_LOG2EF, p16f_half));\n\n  // Get r = x - m*ln(2). Note that we can do this without losing more than one\n  // ulp precision due to the FMA instruction.\n  _EIGEN_DECLARE_CONST_Packet16f(nln2, -0.6931471805599453f);\n  Packet16f r = _mm512_fmadd_ps(m, p16f_nln2, x);\n  Packet16f r2 = pmul(r, r);\n\n  // TODO(gonnet): Split into odd/even polynomials and try to exploit\n  //               instruction-level parallelism.\n  Packet16f y = p16f_cephes_exp_p0;\n  y = pmadd(y, r, p16f_cephes_exp_p1);\n  y = pmadd(y, r, p16f_cephes_exp_p2);\n  y = pmadd(y, r, p16f_cephes_exp_p3);\n  y = pmadd(y, r, p16f_cephes_exp_p4);\n  y = pmadd(y, r, p16f_cephes_exp_p5);\n  y = pmadd(y, r2, r);\n  y = padd(y, p16f_1);\n\n  // Build emm0 = 2^m.\n  Packet16i emm0 = _mm512_cvttps_epi32(padd(m, p16f_127));\n  emm0 = _mm512_slli_epi32(emm0, 23);\n\n  // Return 2^m * exp(r).\n  return pmax(pmul(y, _mm512_castsi512_ps(emm0)), _x);\n}\n\n/*template <>\nEIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet8d\npexp<Packet8d>(const Packet8d& _x) {\n  Packet8d x = _x;\n\n  _EIGEN_DECLARE_CONST_Packet8d(1, 1.0);\n  _EIGEN_DECLARE_CONST_Packet8d(2, 2.0);\n\n  _EIGEN_DECLARE_CONST_Packet8d(exp_hi, 709.437);\n  _EIGEN_DECLARE_CONST_Packet8d(exp_lo, -709.436139303);\n\n  _EIGEN_DECLARE_CONST_Packet8d(cephes_LOG2EF, 1.4426950408889634073599);\n\n  _EIGEN_DECLARE_CONST_Packet8d(cephes_exp_p0, 1.26177193074810590878e-4);\n  _EIGEN_DECLARE_CONST_Packet8d(cephes_exp_p1, 3.02994407707441961300e-2);\n  _EIGEN_DECLARE_CONST_Packet8d(cephes_exp_p2, 9.99999999999999999910e-1);\n\n  _EIGEN_DECLARE_CONST_Packet8d(cephes_exp_q0, 3.00198505138664455042e-6);\n  _EIGEN_DECLARE_CONST_Packet8d(cephes_exp_q1, 2.52448340349684104192e-3);\n  _EIGEN_DECLARE_CONST_Packet8d(cephes_exp_q2, 2.27265548208155028766e-1);\n  _EIGEN_DECLARE_CONST_Packet8d(cephes_exp_q3, 2.00000000000000000009e0);\n\n  _EIGEN_DECLARE_CONST_Packet8d(cephes_exp_C1, 0.693145751953125);\n  _EIGEN_DECLARE_CONST_Packet8d(cephes_exp_C2, 1.42860682030941723212e-6);\n\n  // clamp x\n  x = pmax(pmin(x, p8d_exp_hi), p8d_exp_lo);\n\n  // Express exp(x) as exp(g + n*log(2)).\n  const Packet8d n =\n      _mm512_mul_round_pd(p8d_cephes_LOG2EF, x, _MM_FROUND_TO_NEAREST_INT);\n\n  // Get the remainder modulo log(2), i.e. the \"g\" described above. Subtract\n  // n*log(2) out in two steps, i.e. n*C1 + n*C2, C1+C2=log2 to get the last\n  // digits right.\n  const Packet8d nC1 = pmul(n, p8d_cephes_exp_C1);\n  const Packet8d nC2 = pmul(n, p8d_cephes_exp_C2);\n  x = psub(x, nC1);\n  x = psub(x, nC2);\n\n  const Packet8d x2 = pmul(x, x);\n\n  // Evaluate the numerator polynomial of the rational interpolant.\n  Packet8d px = p8d_cephes_exp_p0;\n  px = pmadd(px, x2, p8d_cephes_exp_p1);\n  px = pmadd(px, x2, p8d_cephes_exp_p2);\n  px = pmul(px, x);\n\n  // Evaluate the denominator polynomial of the rational interpolant.\n  Packet8d qx = p8d_cephes_exp_q0;\n  qx = pmadd(qx, x2, p8d_cephes_exp_q1);\n  qx = pmadd(qx, x2, p8d_cephes_exp_q2);\n  qx = pmadd(qx, x2, p8d_cephes_exp_q3);\n\n  // I don't really get this bit, copied from the SSE2 routines, so...\n  // TODO(gonnet): Figure out what is going on here, perhaps find a better\n  // rational interpolant?\n  x = _mm512_div_pd(px, psub(qx, px));\n  x = pmadd(p8d_2, x, p8d_1);\n\n  // Build e=2^n.\n  const Packet8d e = _mm512_castsi512_pd(_mm512_slli_epi64(\n      _mm512_add_epi64(_mm512_cvtpd_epi64(n), _mm512_set1_epi64(1023)), 52));\n\n  // Construct the result 2^n * exp(g) = e * x. The max is used to catch\n  // non-finite values in the input.\n  return pmax(pmul(x, e), _x);\n  }*/\n\n\n// Functions for sqrt.\n// The EIGEN_FAST_MATH version uses the _mm_rsqrt_ps approximation and one step\n// of Newton's method, at a cost of 1-2 bits of precision as opposed to the\n// exact solution. The main advantage of this approach is not just speed, but\n// also the fact that it can be inlined and pipelined with other computations,\n// further reducing its effective latency.\n#if EIGEN_FAST_MATH\ntemplate <>\nEIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet16f\npsqrt<Packet16f>(const Packet16f& _x) {\n  Packet16f neg_half = pmul(_x, pset1<Packet16f>(-.5f));\n  __mmask16 denormal_mask = _mm512_kand(\n      _mm512_cmp_ps_mask(_x, pset1<Packet16f>((std::numeric_limits<float>::min)()),\n                        _CMP_LT_OQ),\n      _mm512_cmp_ps_mask(_x, _mm512_setzero_ps(), _CMP_GE_OQ));\n\n  Packet16f x = _mm512_rsqrt14_ps(_x);\n\n  // Do a single step of Newton's iteration.\n  x = pmul(x, pmadd(neg_half, pmul(x, x), pset1<Packet16f>(1.5f)));\n\n  // Flush results for denormals to zero.\n  return _mm512_mask_blend_ps(denormal_mask, pmul(_x,x), _mm512_setzero_ps());\n}\n\ntemplate <>\nEIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet8d\npsqrt<Packet8d>(const Packet8d& _x) {\n  Packet8d neg_half = pmul(_x, pset1<Packet8d>(-.5));\n  __mmask16 denormal_mask = _mm512_kand(\n      _mm512_cmp_pd_mask(_x, pset1<Packet8d>((std::numeric_limits<double>::min)()),\n                        _CMP_LT_OQ),\n      _mm512_cmp_pd_mask(_x, _mm512_setzero_pd(), _CMP_GE_OQ));\n\n  Packet8d x = _mm512_rsqrt14_pd(_x);\n\n  // Do a single step of Newton's iteration.\n  x = pmul(x, pmadd(neg_half, pmul(x, x), pset1<Packet8d>(1.5)));\n\n  // Do a second step of Newton's iteration.\n  x = pmul(x, pmadd(neg_half, pmul(x, x), pset1<Packet8d>(1.5)));\n\n  return _mm512_mask_blend_pd(denormal_mask, pmul(_x,x), _mm512_setzero_pd());\n}\n#else\ntemplate <>\nEIGEN_STRONG_INLINE Packet16f psqrt<Packet16f>(const Packet16f& x) {\n  return _mm512_sqrt_ps(x);\n}\ntemplate <>\nEIGEN_STRONG_INLINE Packet8d psqrt<Packet8d>(const Packet8d& x) {\n  return _mm512_sqrt_pd(x);\n}\n#endif\n\n// prsqrt for float.\n#if defined(EIGEN_VECTORIZE_AVX512ER)\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet16f prsqrt<Packet16f>(const Packet16f& x) {\n  return _mm512_rsqrt28_ps(x);\n}\n\n#elif EIGEN_FAST_MATH\n\ntemplate <>\nEIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet16f\nprsqrt<Packet16f>(const Packet16f& _x) {\n  _EIGEN_DECLARE_CONST_Packet16f_FROM_INT(inf, 0x7f800000);\n  _EIGEN_DECLARE_CONST_Packet16f(one_point_five, 1.5f);\n  _EIGEN_DECLARE_CONST_Packet16f(minus_half, -0.5f);\n\n  Packet16f neg_half = pmul(_x, p16f_minus_half);\n\n  // Identity infinite, negative and denormal arguments.\n  __mmask16 inf_mask = _mm512_cmp_ps_mask(_x, p16f_inf, _CMP_EQ_OQ);\n  __mmask16 not_pos_mask = _mm512_cmp_ps_mask(_x, _mm512_setzero_ps(), _CMP_LE_OQ);\n  __mmask16 not_finite_pos_mask = not_pos_mask | inf_mask;\n  \n  // Compute an approximate result using the rsqrt intrinsic, forcing +inf\n  // for denormals for consistency with AVX and SSE implementations.\n  Packet16f y_approx = _mm512_rsqrt14_ps(_x);\n\n  // Do a single step of Newton-Raphson iteration to improve the approximation.\n  // This uses the formula y_{n+1} = y_n * (1.5 - y_n * (0.5 * x) * y_n).\n  // It is essential to evaluate the inner term like this because forming\n  // y_n^2 may over- or underflow.\n  Packet16f y_newton = pmul(y_approx, pmadd(y_approx, pmul(neg_half, y_approx), p16f_one_point_five));\n\n  // Select the result of the Newton-Raphson step for positive finite arguments.\n  // For other arguments, choose the output of the intrinsic. This will\n  // return rsqrt(+inf) = 0, rsqrt(x) = NaN if x < 0, and rsqrt(0) = +inf.\n  return _mm512_mask_blend_ps(not_finite_pos_mask, y_newton, y_approx);\n  }\n\n#else\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet16f prsqrt<Packet16f>(const Packet16f& x) {\n  _EIGEN_DECLARE_CONST_Packet16f(one, 1.0f);\n  return _mm512_div_ps(p16f_one, _mm512_sqrt_ps(x));\n}\n\n#endif\n\n// prsqrt for double.\n#if EIGEN_FAST_MATH\ntemplate <>\nEIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet8d\nprsqrt<Packet8d>(const Packet8d& _x) {\n  _EIGEN_DECLARE_CONST_Packet8d(one_point_five, 1.5);\n  _EIGEN_DECLARE_CONST_Packet8d(minus_half, -0.5);\n  _EIGEN_DECLARE_CONST_Packet8d_FROM_INT64(inf, 0x7ff0000000000000LL);\n\n  Packet8d neg_half = pmul(_x, p8d_minus_half);\n\n  // Identity infinite, negative and denormal arguments.\n  __mmask8 inf_mask = _mm512_cmp_pd_mask(_x, p8d_inf, _CMP_EQ_OQ);\n  __mmask8 not_pos_mask = _mm512_cmp_pd_mask(_x, _mm512_setzero_pd(), _CMP_LE_OQ);\n  __mmask8 not_finite_pos_mask = not_pos_mask | inf_mask;\n\n  // Compute an approximate result using the rsqrt intrinsic, forcing +inf\n  // for denormals for consistency with AVX and SSE implementations.\n#if defined(EIGEN_VECTORIZE_AVX512ER)\n  Packet8d y_approx = _mm512_rsqrt28_pd(_x);\n#else\n  Packet8d y_approx = _mm512_rsqrt14_pd(_x);\n#endif\n  // Do one or two steps of Newton-Raphson's to improve the approximation, depending on the\n  // starting accuracy (either 2^-14 or 2^-28, depending on whether AVX512ER is available).\n  // The Newton-Raphson algorithm has quadratic convergence and roughly doubles the number\n  // of correct digits for each step.\n  // This uses the formula y_{n+1} = y_n * (1.5 - y_n * (0.5 * x) * y_n).\n  // It is essential to evaluate the inner term like this because forming\n  // y_n^2 may over- or underflow.\n  Packet8d y_newton = pmul(y_approx, pmadd(neg_half, pmul(y_approx, y_approx), p8d_one_point_five));\n#if !defined(EIGEN_VECTORIZE_AVX512ER)\n  y_newton = pmul(y_newton, pmadd(y_newton, pmul(neg_half, y_newton), p8d_one_point_five));\n#endif\n  // Select the result of the Newton-Raphson step for positive finite arguments.\n  // For other arguments, choose the output of the intrinsic. This will\n  // return rsqrt(+inf) = 0, rsqrt(x) = NaN if x < 0, and rsqrt(0) = +inf.\n  return _mm512_mask_blend_pd(not_finite_pos_mask, y_newton, y_approx);\n}\n#else\ntemplate <>\nEIGEN_STRONG_INLINE Packet8d prsqrt<Packet8d>(const Packet8d& x) {\n  _EIGEN_DECLARE_CONST_Packet8d(one, 1.0f);\n  return _mm512_div_pd(p8d_one, _mm512_sqrt_pd(x));\n}\n#endif\n\n#if defined(EIGEN_VECTORIZE_AVX512DQ)\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED\nPacket16f plog1p<Packet16f>(const Packet16f& _x) {\n  return generic_plog1p(_x);\n}\n\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED\nPacket16f pexpm1<Packet16f>(const Packet16f& _x) {\n  return generic_expm1(_x);\n}\n#endif\n\n#endif\n\n\ntemplate <>\nEIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet16f\npsin<Packet16f>(const Packet16f& _x) {\n  return psin_float(_x);\n}\n\ntemplate <>\nEIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet16f\npcos<Packet16f>(const Packet16f& _x) {\n  return pcos_float(_x);\n}\n\ntemplate <>\nEIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet16f\nptanh<Packet16f>(const Packet16f& _x) {\n  return internal::generic_fast_tanh_float(_x);\n}\n\n}  // end namespace internal\n\n}  // end namespace Eigen\n\n#endif  // THIRD_PARTY_EIGEN3_EIGEN_SRC_CORE_ARCH_AVX512_MATHFUNCTIONS_H_\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/AVX512/PacketMath.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Benoit Steiner (benoit.steiner.goog@gmail.com)\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_PACKET_MATH_AVX512_H\n#define EIGEN_PACKET_MATH_AVX512_H\n\nnamespace Eigen {\n\nnamespace internal {\n\n#ifndef EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD\n#define EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 8\n#endif\n\n#ifndef EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS\n#define EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS 32\n#endif\n\n#ifdef EIGEN_VECTORIZE_FMA\n#ifndef EIGEN_HAS_SINGLE_INSTRUCTION_MADD\n#define EIGEN_HAS_SINGLE_INSTRUCTION_MADD\n#endif\n#endif\n\ntypedef __m512 Packet16f;\ntypedef __m512i Packet16i;\ntypedef __m512d Packet8d;\ntypedef eigen_packet_wrapper<__m256i, 1> Packet16h;\n\ntemplate <>\nstruct is_arithmetic<__m512> {\n  enum { value = true };\n};\ntemplate <>\nstruct is_arithmetic<__m512i> {\n  enum { value = true };\n};\ntemplate <>\nstruct is_arithmetic<__m512d> {\n  enum { value = true };\n};\n\ntemplate<> struct is_arithmetic<Packet16h> { enum { value = true }; };\n\ntemplate <>\nstruct packet_traits<half> : default_packet_traits {\n  typedef Packet16h type;\n  // There is no half-size packet for Packet16h.\n  typedef Packet16h half;\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size = 16,\n    HasHalfPacket = 0,\n    HasAdd    = 1,\n    HasSub    = 1,\n    HasMul    = 1,\n    HasDiv    = 1,\n    HasNegate = 1,\n    HasAbs    = 0,\n    HasAbs2   = 0,\n    HasMin    = 0,\n    HasMax    = 0,\n    HasConj   = 0,\n    HasSetLinear = 0,\n    HasSqrt = 0,\n    HasRsqrt = 0,\n    HasExp = 0,\n    HasLog = 0,\n    HasBlend = 0,\n    HasInsert = 1\n  };\n};\n\ntemplate<> struct packet_traits<float>  : default_packet_traits\n{\n  typedef Packet16f type;\n  typedef Packet8f half;\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size = 16,\n    HasHalfPacket = 1,\n    HasBlend = 0,\n    HasInsert = 1,\n    HasSin = EIGEN_FAST_MATH,\n    HasCos = EIGEN_FAST_MATH,\n#if EIGEN_GNUC_AT_LEAST(5, 3) || (!EIGEN_COMP_GNUC_STRICT)\n#ifdef EIGEN_VECTORIZE_AVX512DQ\n    HasLog = 1,\n    HasLog1p  = 1,\n    HasExpm1  = 1,\n    HasNdtri = 1,\n    HasBessel  = 1,\n#endif\n    HasExp = 1,\n    HasSqrt = EIGEN_FAST_MATH,\n    HasRsqrt = EIGEN_FAST_MATH,\n    HasTanh = EIGEN_FAST_MATH,\n    HasErf = EIGEN_FAST_MATH,\n#endif\n    HasDiv = 1\n  };\n };\ntemplate<> struct packet_traits<double> : default_packet_traits\n{\n  typedef Packet8d type;\n  typedef Packet4d half;\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size = 8,\n    HasHalfPacket = 1,\n    HasInsert = 1,\n#if EIGEN_GNUC_AT_LEAST(5, 3) || (!EIGEN_COMP_GNUC_STRICT)\n    HasSqrt = EIGEN_FAST_MATH,\n    HasRsqrt = EIGEN_FAST_MATH,\n#endif\n    HasDiv = 1\n  };\n};\n\n/* TODO Implement AVX512 for integers\ntemplate<> struct packet_traits<int>    : default_packet_traits\n{\n  typedef Packet16i type;\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size=8\n  };\n};\n*/\n\ntemplate <>\nstruct unpacket_traits<Packet16f> {\n  typedef float type;\n  typedef Packet8f half;\n  typedef Packet16i integer_packet;\n  typedef uint16_t mask_t;\n  enum { size = 16, alignment=Aligned64, vectorizable=true, masked_load_available=true, masked_store_available=true };\n};\ntemplate <>\nstruct unpacket_traits<Packet8d> {\n  typedef double type;\n  typedef Packet4d half;\n  enum { size = 8, alignment=Aligned64, vectorizable=true, masked_load_available=false, masked_store_available=false };\n};\ntemplate <>\nstruct unpacket_traits<Packet16i> {\n  typedef int type;\n  typedef Packet8i half;\n  enum { size = 16, alignment=Aligned64, vectorizable=false, masked_load_available=false, masked_store_available=false };\n};\n\ntemplate<>\nstruct unpacket_traits<Packet16h> {\n  typedef Eigen::half type;\n  typedef Packet16h half;\n  enum {size=16, alignment=Aligned32, vectorizable=true, masked_load_available=false, masked_store_available=false};\n};\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet16f pset1<Packet16f>(const float& from) {\n  return _mm512_set1_ps(from);\n}\ntemplate <>\nEIGEN_STRONG_INLINE Packet8d pset1<Packet8d>(const double& from) {\n  return _mm512_set1_pd(from);\n}\ntemplate <>\nEIGEN_STRONG_INLINE Packet16i pset1<Packet16i>(const int& from) {\n  return _mm512_set1_epi32(from);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet16f pset1frombits<Packet16f>(unsigned int from) {\n  return _mm512_castsi512_ps(_mm512_set1_epi32(from));\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet16f pload1<Packet16f>(const float* from) {\n  return _mm512_broadcastss_ps(_mm_load_ps1(from));\n}\ntemplate <>\nEIGEN_STRONG_INLINE Packet8d pload1<Packet8d>(const double* from) {\n  return _mm512_set1_pd(*from);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet16f plset<Packet16f>(const float& a) {\n  return _mm512_add_ps(\n      _mm512_set1_ps(a),\n      _mm512_set_ps(15.0f, 14.0f, 13.0f, 12.0f, 11.0f, 10.0f, 9.0f, 8.0f, 7.0f, 6.0f, 5.0f,\n                    4.0f, 3.0f, 2.0f, 1.0f, 0.0f));\n}\ntemplate <>\nEIGEN_STRONG_INLINE Packet8d plset<Packet8d>(const double& a) {\n  return _mm512_add_pd(_mm512_set1_pd(a),\n                       _mm512_set_pd(7.0, 6.0, 5.0, 4.0, 3.0, 2.0, 1.0, 0.0));\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet16f padd<Packet16f>(const Packet16f& a,\n                                              const Packet16f& b) {\n  return _mm512_add_ps(a, b);\n}\ntemplate <>\nEIGEN_STRONG_INLINE Packet8d padd<Packet8d>(const Packet8d& a,\n                                            const Packet8d& b) {\n  return _mm512_add_pd(a, b);\n}\ntemplate <>\nEIGEN_STRONG_INLINE Packet16i padd<Packet16i>(const Packet16i& a,\n                                              const Packet16i& b) {\n  return _mm512_add_epi32(a, b);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet16f psub<Packet16f>(const Packet16f& a,\n                                              const Packet16f& b) {\n  return _mm512_sub_ps(a, b);\n}\ntemplate <>\nEIGEN_STRONG_INLINE Packet8d psub<Packet8d>(const Packet8d& a,\n                                            const Packet8d& b) {\n  return _mm512_sub_pd(a, b);\n}\ntemplate <>\nEIGEN_STRONG_INLINE Packet16i psub<Packet16i>(const Packet16i& a,\n                                              const Packet16i& b) {\n  return _mm512_sub_epi32(a, b);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet16f pnegate(const Packet16f& a) {\n  return _mm512_sub_ps(_mm512_set1_ps(0.0), a);\n}\ntemplate <>\nEIGEN_STRONG_INLINE Packet8d pnegate(const Packet8d& a) {\n  return _mm512_sub_pd(_mm512_set1_pd(0.0), a);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet16f pconj(const Packet16f& a) {\n  return a;\n}\ntemplate <>\nEIGEN_STRONG_INLINE Packet8d pconj(const Packet8d& a) {\n  return a;\n}\ntemplate <>\nEIGEN_STRONG_INLINE Packet16i pconj(const Packet16i& a) {\n  return a;\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet16f pmul<Packet16f>(const Packet16f& a,\n                                              const Packet16f& b) {\n  return _mm512_mul_ps(a, b);\n}\ntemplate <>\nEIGEN_STRONG_INLINE Packet8d pmul<Packet8d>(const Packet8d& a,\n                                            const Packet8d& b) {\n  return _mm512_mul_pd(a, b);\n}\ntemplate <>\nEIGEN_STRONG_INLINE Packet16i pmul<Packet16i>(const Packet16i& a,\n                                              const Packet16i& b) {\n  return _mm512_mul_epi32(a, b);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet16f pdiv<Packet16f>(const Packet16f& a,\n                                              const Packet16f& b) {\n  return _mm512_div_ps(a, b);\n}\ntemplate <>\nEIGEN_STRONG_INLINE Packet8d pdiv<Packet8d>(const Packet8d& a,\n                                            const Packet8d& b) {\n  return _mm512_div_pd(a, b);\n}\n\n#ifdef EIGEN_VECTORIZE_FMA\ntemplate <>\nEIGEN_STRONG_INLINE Packet16f pmadd(const Packet16f& a, const Packet16f& b,\n                                    const Packet16f& c) {\n  return _mm512_fmadd_ps(a, b, c);\n}\ntemplate <>\nEIGEN_STRONG_INLINE Packet8d pmadd(const Packet8d& a, const Packet8d& b,\n                                   const Packet8d& c) {\n  return _mm512_fmadd_pd(a, b, c);\n}\n#endif\n\ntemplate <>\nEIGEN_DEVICE_FUNC inline Packet16f pselect(const Packet16f& mask,\n                                           const Packet16f& a,\n                                           const Packet16f& b) {\n  __mmask16 mask16 = _mm512_cmp_epi32_mask(\n      _mm512_castps_si512(mask), _mm512_setzero_epi32(), _MM_CMPINT_EQ);\n  return _mm512_mask_blend_ps(mask16, a, b);\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC inline Packet8d pselect(const Packet8d& mask,\n                                          const Packet8d& a,\n                                          const Packet8d& b) {\n  __mmask8 mask8 = _mm512_cmp_epi64_mask(_mm512_castpd_si512(mask),\n                                         _mm512_setzero_epi32(), _MM_CMPINT_EQ);\n  return _mm512_mask_blend_pd(mask8, a, b);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet16f pmin<Packet16f>(const Packet16f& a,\n                                              const Packet16f& b) {\n  // Arguments are reversed to match NaN propagation behavior of std::min.\n  return _mm512_min_ps(b, a);\n}\ntemplate <>\nEIGEN_STRONG_INLINE Packet8d pmin<Packet8d>(const Packet8d& a,\n                                            const Packet8d& b) {\n  // Arguments are reversed to match NaN propagation behavior of std::min.\n  return _mm512_min_pd(b, a);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet16f pmax<Packet16f>(const Packet16f& a,\n                                              const Packet16f& b) {\n  // Arguments are reversed to match NaN propagation behavior of std::max.\n  return _mm512_max_ps(b, a);\n}\ntemplate <>\nEIGEN_STRONG_INLINE Packet8d pmax<Packet8d>(const Packet8d& a,\n                                            const Packet8d& b) {\n  // Arguments are reversed to match NaN propagation behavior of std::max.\n  return _mm512_max_pd(b, a);\n}\n\n#ifdef EIGEN_VECTORIZE_AVX512DQ\ntemplate<int I_> EIGEN_STRONG_INLINE Packet8f extract256(Packet16f x) { return _mm512_extractf32x8_ps(x,I_); }\ntemplate<int I_> EIGEN_STRONG_INLINE Packet2d extract128(Packet8d x) { return _mm512_extractf64x2_pd(x,I_); }\nEIGEN_STRONG_INLINE Packet16f cat256(Packet8f a, Packet8f b) { return _mm512_insertf32x8(_mm512_castps256_ps512(a),b,1); }\n#else\n// AVX512F does not define _mm512_extractf32x8_ps to extract _m256 from _m512\ntemplate<int I_> EIGEN_STRONG_INLINE Packet8f extract256(Packet16f x) {\n  return  _mm256_castsi256_ps(_mm512_extracti64x4_epi64( _mm512_castps_si512(x),I_));\n}\n\n// AVX512F does not define _mm512_extractf64x2_pd to extract _m128 from _m512\ntemplate<int I_> EIGEN_STRONG_INLINE Packet2d extract128(Packet8d x) {\n  return _mm_castsi128_pd(_mm512_extracti32x4_epi32( _mm512_castpd_si512(x),I_));\n}\n\nEIGEN_STRONG_INLINE Packet16f cat256(Packet8f a, Packet8f b) {\n  return _mm512_castsi512_ps(_mm512_inserti64x4(_mm512_castsi256_si512(_mm256_castps_si256(a)),\n                                                _mm256_castps_si256(b),1));\n}\n#endif\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet16f pcmp_eq(const Packet16f& a, const Packet16f& b) {\n  __mmask16 mask = _mm512_cmp_ps_mask(a, b, _CMP_EQ_OQ);\n  return _mm512_castsi512_ps(\n      _mm512_mask_set1_epi32(_mm512_set1_epi32(0), mask, 0xffffffffu));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet16f pcmp_le(const Packet16f& a, const Packet16f& b) {\n  __mmask16 mask = _mm512_cmp_ps_mask(a, b, _CMP_LE_OQ);\n  return _mm512_castsi512_ps(\n      _mm512_mask_set1_epi32(_mm512_set1_epi32(0), mask, 0xffffffffu));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet16f pcmp_lt(const Packet16f& a, const Packet16f& b) {\n  __mmask16 mask = _mm512_cmp_ps_mask(a, b, _CMP_LT_OQ);\n  return _mm512_castsi512_ps(\n      _mm512_mask_set1_epi32(_mm512_set1_epi32(0), mask, 0xffffffffu));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet16f pcmp_lt_or_nan(const Packet16f& a, const Packet16f& b) {\n  __mmask16 mask = _mm512_cmp_ps_mask(a, b, _CMP_NGT_UQ);\n  return _mm512_castsi512_ps(\n      _mm512_mask_set1_epi32(_mm512_set1_epi32(0), mask, 0xffffffffu));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet16i pcmp_eq(const Packet16i& a, const Packet16i& b) {\n  __mmask16 mask = _mm512_cmp_epi32_mask(a, b, _CMP_EQ_OQ);\n  return _mm512_mask_set1_epi32(_mm512_set1_epi32(0), mask, 0xffffffffu);\n}\n\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet8d pcmp_eq(const Packet8d& a, const Packet8d& b) {\n  __mmask8 mask = _mm512_cmp_pd_mask(a, b, _CMP_EQ_OQ);\n  return _mm512_castsi512_pd(\n      _mm512_mask_set1_epi64(_mm512_set1_epi64(0), mask, 0xffffffffffffffffu));\n}\ntemplate <>\nEIGEN_STRONG_INLINE Packet8d pcmp_le(const Packet8d& a, const Packet8d& b) {\n  __mmask8 mask = _mm512_cmp_pd_mask(a, b, _CMP_LE_OQ);\n  return _mm512_castsi512_pd(\n      _mm512_mask_set1_epi64(_mm512_set1_epi64(0), mask, 0xffffffffffffffffu));\n}\ntemplate <>\nEIGEN_STRONG_INLINE Packet8d pcmp_lt(const Packet8d& a, const Packet8d& b) {\n  __mmask8 mask = _mm512_cmp_pd_mask(a, b, _CMP_LT_OQ);\n  return _mm512_castsi512_pd(\n      _mm512_mask_set1_epi64(_mm512_set1_epi64(0), mask, 0xffffffffffffffffu));\n}\ntemplate <>\nEIGEN_STRONG_INLINE Packet8d pcmp_lt_or_nan(const Packet8d& a, const Packet8d& b) {\n  __mmask8 mask = _mm512_cmp_pd_mask(a, b, _CMP_NGT_UQ);\n  return _mm512_castsi512_pd(\n      _mm512_mask_set1_epi64(_mm512_set1_epi64(0), mask, 0xffffffffffffffffu));\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet16i ptrue<Packet16i>(const Packet16i& /*a*/) {\n  return _mm512_set1_epi32(0xffffffffu);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet16f ptrue<Packet16f>(const Packet16f& a) {\n  return _mm512_castsi512_ps(ptrue<Packet16i>(_mm512_castps_si512(a)));\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet8d ptrue<Packet8d>(const Packet8d& a) {\n  return _mm512_castsi512_pd(ptrue<Packet16i>(_mm512_castpd_si512(a)));\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet16i pand<Packet16i>(const Packet16i& a,\n                                              const Packet16i& b) {\n  return _mm512_and_si512(a,b);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet16f pand<Packet16f>(const Packet16f& a,\n                                              const Packet16f& b) {\n#ifdef EIGEN_VECTORIZE_AVX512DQ\n  return _mm512_and_ps(a, b);\n#else\n  return _mm512_castsi512_ps(pand(_mm512_castps_si512(a),_mm512_castps_si512(b)));\n#endif\n}\ntemplate <>\nEIGEN_STRONG_INLINE Packet8d pand<Packet8d>(const Packet8d& a,\n                                            const Packet8d& b) {\n#ifdef EIGEN_VECTORIZE_AVX512DQ\n  return _mm512_and_pd(a, b);\n#else\n  Packet8d res = _mm512_undefined_pd();\n  Packet4d lane0_a = _mm512_extractf64x4_pd(a, 0);\n  Packet4d lane0_b = _mm512_extractf64x4_pd(b, 0);\n  res = _mm512_insertf64x4(res, _mm256_and_pd(lane0_a, lane0_b), 0);\n\n  Packet4d lane1_a = _mm512_extractf64x4_pd(a, 1);\n  Packet4d lane1_b = _mm512_extractf64x4_pd(b, 1);\n  return _mm512_insertf64x4(res, _mm256_and_pd(lane1_a, lane1_b), 1);\n#endif\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet16i por<Packet16i>(const Packet16i& a, const Packet16i& b) {\n  return _mm512_or_si512(a, b);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet16f por<Packet16f>(const Packet16f& a, const Packet16f& b) {\n#ifdef EIGEN_VECTORIZE_AVX512DQ\n  return _mm512_or_ps(a, b);\n#else\n  return _mm512_castsi512_ps(por(_mm512_castps_si512(a),_mm512_castps_si512(b)));\n#endif\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet8d por<Packet8d>(const Packet8d& a,\n                                           const Packet8d& b) {\n#ifdef EIGEN_VECTORIZE_AVX512DQ\n  return _mm512_or_pd(a, b);\n#else\n  return _mm512_castsi512_pd(por(_mm512_castpd_si512(a),_mm512_castpd_si512(b)));\n#endif\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet16i pxor<Packet16i>(const Packet16i& a, const Packet16i& b) {\n  return _mm512_xor_si512(a, b);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet16f pxor<Packet16f>(const Packet16f& a, const Packet16f& b) {\n#ifdef EIGEN_VECTORIZE_AVX512DQ\n  return _mm512_xor_ps(a, b);\n#else\n  return _mm512_castsi512_ps(pxor(_mm512_castps_si512(a),_mm512_castps_si512(b)));\n#endif\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet8d pxor<Packet8d>(const Packet8d& a, const Packet8d& b) {\n#ifdef EIGEN_VECTORIZE_AVX512DQ\n  return _mm512_xor_pd(a, b);\n#else\n  return _mm512_castsi512_pd(pxor(_mm512_castpd_si512(a),_mm512_castpd_si512(b)));\n#endif\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet16i pandnot<Packet16i>(const Packet16i& a, const Packet16i& b) {\n  return _mm512_andnot_si512(b, a);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet16f pandnot<Packet16f>(const Packet16f& a, const Packet16f& b) {\n#ifdef EIGEN_VECTORIZE_AVX512DQ\n  return _mm512_andnot_ps(b, a);\n#else\n  return _mm512_castsi512_ps(pandnot(_mm512_castps_si512(a),_mm512_castps_si512(b)));\n#endif\n}\ntemplate <>\nEIGEN_STRONG_INLINE Packet8d pandnot<Packet8d>(const Packet8d& a,const Packet8d& b) {\n#ifdef EIGEN_VECTORIZE_AVX512DQ\n  return _mm512_andnot_pd(b, a);\n#else\n  return _mm512_castsi512_pd(pandnot(_mm512_castpd_si512(a),_mm512_castpd_si512(b)));\n#endif\n}\n\ntemplate<int N> EIGEN_STRONG_INLINE Packet16i parithmetic_shift_right(Packet16i a) {\n  return _mm512_srai_epi32(a, N);\n}\n\ntemplate<int N> EIGEN_STRONG_INLINE Packet16i plogical_shift_right(Packet16i a) {\n  return _mm512_srli_epi32(a, N);\n}\n\ntemplate<int N> EIGEN_STRONG_INLINE Packet16i plogical_shift_left(Packet16i a) {\n  return _mm512_slli_epi32(a, N);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet16f pload<Packet16f>(const float* from) {\n  EIGEN_DEBUG_ALIGNED_LOAD return _mm512_load_ps(from);\n}\ntemplate <>\nEIGEN_STRONG_INLINE Packet8d pload<Packet8d>(const double* from) {\n  EIGEN_DEBUG_ALIGNED_LOAD return _mm512_load_pd(from);\n}\ntemplate <>\nEIGEN_STRONG_INLINE Packet16i pload<Packet16i>(const int* from) {\n  EIGEN_DEBUG_ALIGNED_LOAD return _mm512_load_si512(\n      reinterpret_cast<const __m512i*>(from));\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet16f ploadu<Packet16f>(const float* from) {\n  EIGEN_DEBUG_UNALIGNED_LOAD return _mm512_loadu_ps(from);\n}\ntemplate <>\nEIGEN_STRONG_INLINE Packet8d ploadu<Packet8d>(const double* from) {\n  EIGEN_DEBUG_UNALIGNED_LOAD return _mm512_loadu_pd(from);\n}\ntemplate <>\nEIGEN_STRONG_INLINE Packet16i ploadu<Packet16i>(const int* from) {\n  EIGEN_DEBUG_UNALIGNED_LOAD return _mm512_loadu_si512(\n      reinterpret_cast<const __m512i*>(from));\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet16f ploadu<Packet16f>(const float* from, uint16_t umask) {\n  __mmask16 mask = static_cast<__mmask16>(umask);\n  EIGEN_DEBUG_UNALIGNED_LOAD return _mm512_maskz_loadu_ps(mask, from);\n}\n\n// Loads 8 floats from memory a returns the packet\n// {a0, a0  a1, a1, a2, a2, a3, a3, a4, a4, a5, a5, a6, a6, a7, a7}\ntemplate <>\nEIGEN_STRONG_INLINE Packet16f ploaddup<Packet16f>(const float* from) {\n  // an unaligned load is required here as there is no requirement\n  // on the alignment of input pointer 'from'\n  __m256i low_half = _mm256_loadu_si256(reinterpret_cast<const __m256i*>(from));\n  __m512 even_elements = _mm512_castsi512_ps(_mm512_cvtepu32_epi64(low_half));\n  __m512 pairs = _mm512_permute_ps(even_elements, _MM_SHUFFLE(2, 2, 0, 0));\n  return pairs;\n}\n\n#ifdef EIGEN_VECTORIZE_AVX512DQ\n// FIXME: this does not look optimal, better load a Packet4d and shuffle...\n// Loads 4 doubles from memory a returns the packet {a0, a0  a1, a1, a2, a2, a3,\n// a3}\ntemplate <>\nEIGEN_STRONG_INLINE Packet8d ploaddup<Packet8d>(const double* from) {\n __m512d x = _mm512_setzero_pd();\n  x = _mm512_insertf64x2(x, _mm_loaddup_pd(&from[0]), 0);\n  x = _mm512_insertf64x2(x, _mm_loaddup_pd(&from[1]), 1);\n  x = _mm512_insertf64x2(x, _mm_loaddup_pd(&from[2]), 2);\n  x = _mm512_insertf64x2(x, _mm_loaddup_pd(&from[3]), 3);\n  return x;\n}\n#else\ntemplate <>\nEIGEN_STRONG_INLINE Packet8d ploaddup<Packet8d>(const double* from) {\n  __m512d x = _mm512_setzero_pd();\n  x = _mm512_mask_broadcastsd_pd(x, 0x3<<0, _mm_load_sd(from+0));\n  x = _mm512_mask_broadcastsd_pd(x, 0x3<<2, _mm_load_sd(from+1));\n  x = _mm512_mask_broadcastsd_pd(x, 0x3<<4, _mm_load_sd(from+2));\n  x = _mm512_mask_broadcastsd_pd(x, 0x3<<6, _mm_load_sd(from+3));\n  return x;\n}\n#endif\n\n// Loads 4 floats from memory a returns the packet\n// {a0, a0  a0, a0, a1, a1, a1, a1, a2, a2, a2, a2, a3, a3, a3, a3}\ntemplate <>\nEIGEN_STRONG_INLINE Packet16f ploadquad<Packet16f>(const float* from) {\n  Packet16f tmp = _mm512_castps128_ps512(ploadu<Packet4f>(from));\n  const Packet16i scatter_mask = _mm512_set_epi32(3,3,3,3, 2,2,2,2, 1,1,1,1, 0,0,0,0);\n  return _mm512_permutexvar_ps(scatter_mask, tmp);\n}\n\n// Loads 2 doubles from memory a returns the packet\n// {a0, a0  a0, a0, a1, a1, a1, a1}\ntemplate <>\nEIGEN_STRONG_INLINE Packet8d ploadquad<Packet8d>(const double* from) {\n  __m256d lane0 = _mm256_set1_pd(*from);\n  __m256d lane1 = _mm256_set1_pd(*(from+1));\n  __m512d tmp = _mm512_undefined_pd();\n  tmp = _mm512_insertf64x4(tmp, lane0, 0);\n  return _mm512_insertf64x4(tmp, lane1, 1);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE void pstore<float>(float* to, const Packet16f& from) {\n  EIGEN_DEBUG_ALIGNED_STORE _mm512_store_ps(to, from);\n}\ntemplate <>\nEIGEN_STRONG_INLINE void pstore<double>(double* to, const Packet8d& from) {\n  EIGEN_DEBUG_ALIGNED_STORE _mm512_store_pd(to, from);\n}\ntemplate <>\nEIGEN_STRONG_INLINE void pstore<int>(int* to, const Packet16i& from) {\n  EIGEN_DEBUG_ALIGNED_STORE _mm512_storeu_si512(reinterpret_cast<__m512i*>(to),\n                                                from);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE void pstoreu<float>(float* to, const Packet16f& from) {\n  EIGEN_DEBUG_UNALIGNED_STORE _mm512_storeu_ps(to, from);\n}\ntemplate <>\nEIGEN_STRONG_INLINE void pstoreu<double>(double* to, const Packet8d& from) {\n  EIGEN_DEBUG_UNALIGNED_STORE _mm512_storeu_pd(to, from);\n}\ntemplate <>\nEIGEN_STRONG_INLINE void pstoreu<int>(int* to, const Packet16i& from) {\n  EIGEN_DEBUG_UNALIGNED_STORE _mm512_storeu_si512(\n      reinterpret_cast<__m512i*>(to), from);\n}\ntemplate <>\nEIGEN_STRONG_INLINE void pstoreu<float>(float* to, const Packet16f& from, uint16_t umask) {\n  __mmask16 mask = static_cast<__mmask16>(umask);\n  EIGEN_DEBUG_UNALIGNED_STORE return _mm512_mask_storeu_ps(to, mask, from);\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC inline Packet16f pgather<float, Packet16f>(const float* from,\n                                                             Index stride) {\n  Packet16i stride_vector = _mm512_set1_epi32(convert_index<int>(stride));\n  Packet16i stride_multiplier =\n      _mm512_set_epi32(15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0);\n  Packet16i indices = _mm512_mullo_epi32(stride_vector, stride_multiplier);\n\n  return _mm512_i32gather_ps(indices, from, 4);\n}\ntemplate <>\nEIGEN_DEVICE_FUNC inline Packet8d pgather<double, Packet8d>(const double* from,\n                                                            Index stride) {\n  Packet8i stride_vector = _mm256_set1_epi32(convert_index<int>(stride));\n  Packet8i stride_multiplier = _mm256_set_epi32(7, 6, 5, 4, 3, 2, 1, 0);\n  Packet8i indices = _mm256_mullo_epi32(stride_vector, stride_multiplier);\n\n  return _mm512_i32gather_pd(indices, from, 8);\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC inline void pscatter<float, Packet16f>(float* to,\n                                                         const Packet16f& from,\n                                                         Index stride) {\n  Packet16i stride_vector = _mm512_set1_epi32(convert_index<int>(stride));\n  Packet16i stride_multiplier =\n      _mm512_set_epi32(15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0);\n  Packet16i indices = _mm512_mullo_epi32(stride_vector, stride_multiplier);\n  _mm512_i32scatter_ps(to, indices, from, 4);\n}\ntemplate <>\nEIGEN_DEVICE_FUNC inline void pscatter<double, Packet8d>(double* to,\n                                                         const Packet8d& from,\n                                                         Index stride) {\n  Packet8i stride_vector = _mm256_set1_epi32(convert_index<int>(stride));\n  Packet8i stride_multiplier = _mm256_set_epi32(7, 6, 5, 4, 3, 2, 1, 0);\n  Packet8i indices = _mm256_mullo_epi32(stride_vector, stride_multiplier);\n  _mm512_i32scatter_pd(to, indices, from, 8);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE void pstore1<Packet16f>(float* to, const float& a) {\n  Packet16f pa = pset1<Packet16f>(a);\n  pstore(to, pa);\n}\ntemplate <>\nEIGEN_STRONG_INLINE void pstore1<Packet8d>(double* to, const double& a) {\n  Packet8d pa = pset1<Packet8d>(a);\n  pstore(to, pa);\n}\ntemplate <>\nEIGEN_STRONG_INLINE void pstore1<Packet16i>(int* to, const int& a) {\n  Packet16i pa = pset1<Packet16i>(a);\n  pstore(to, pa);\n}\n\ntemplate<> EIGEN_STRONG_INLINE void prefetch<float>(const float*   addr) { _mm_prefetch((SsePrefetchPtrType)(addr), _MM_HINT_T0); }\ntemplate<> EIGEN_STRONG_INLINE void prefetch<double>(const double* addr) { _mm_prefetch((SsePrefetchPtrType)(addr), _MM_HINT_T0); }\ntemplate<> EIGEN_STRONG_INLINE void prefetch<int>(const int*       addr) { _mm_prefetch((SsePrefetchPtrType)(addr), _MM_HINT_T0); }\n\ntemplate <>\nEIGEN_STRONG_INLINE float pfirst<Packet16f>(const Packet16f& a) {\n  return _mm_cvtss_f32(_mm512_extractf32x4_ps(a, 0));\n}\ntemplate <>\nEIGEN_STRONG_INLINE double pfirst<Packet8d>(const Packet8d& a) {\n  return _mm_cvtsd_f64(_mm256_extractf128_pd(_mm512_extractf64x4_pd(a, 0), 0));\n}\ntemplate <>\nEIGEN_STRONG_INLINE int pfirst<Packet16i>(const Packet16i& a) {\n  return _mm_extract_epi32(_mm512_extracti32x4_epi32(a, 0), 0);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet16f preverse(const Packet16f& a)\n{\n  return _mm512_permutexvar_ps(_mm512_set_epi32(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), a);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8d preverse(const Packet8d& a)\n{\n  return _mm512_permutexvar_pd(_mm512_set_epi32(0, 0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7), a);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet16f pabs(const Packet16f& a)\n{\n  // _mm512_abs_ps intrinsic not found, so hack around it\n  return _mm512_castsi512_ps(_mm512_and_si512(_mm512_castps_si512(a), _mm512_set1_epi32(0x7fffffff)));\n}\ntemplate <>\nEIGEN_STRONG_INLINE Packet8d pabs(const Packet8d& a) {\n  // _mm512_abs_ps intrinsic not found, so hack around it\n  return _mm512_castsi512_pd(_mm512_and_si512(_mm512_castpd_si512(a),\n                                   _mm512_set1_epi64(0x7fffffffffffffff)));\n}\n\n#ifdef EIGEN_VECTORIZE_AVX512DQ\n// AVX512F does not define _mm512_extractf32x8_ps to extract _m256 from _m512\n#define EIGEN_EXTRACT_8f_FROM_16f(INPUT, OUTPUT)                           \\\n  __m256 OUTPUT##_0 = _mm512_extractf32x8_ps(INPUT, 0);                    \\\n  __m256 OUTPUT##_1 = _mm512_extractf32x8_ps(INPUT, 1)\n#else\n#define EIGEN_EXTRACT_8f_FROM_16f(INPUT, OUTPUT)                \\\n  __m256 OUTPUT##_0 = _mm256_insertf128_ps(                     \\\n      _mm256_castps128_ps256(_mm512_extractf32x4_ps(INPUT, 0)), \\\n      _mm512_extractf32x4_ps(INPUT, 1), 1);                     \\\n  __m256 OUTPUT##_1 = _mm256_insertf128_ps(                     \\\n      _mm256_castps128_ps256(_mm512_extractf32x4_ps(INPUT, 2)), \\\n      _mm512_extractf32x4_ps(INPUT, 3), 1);\n#endif\n\n#ifdef EIGEN_VECTORIZE_AVX512DQ\n#define EIGEN_INSERT_8f_INTO_16f(OUTPUT, INPUTA, INPUTB) \\\n  OUTPUT = _mm512_insertf32x8(_mm512_castps256_ps512(INPUTA), INPUTB, 1);\n#else\n#define EIGEN_INSERT_8f_INTO_16f(OUTPUT, INPUTA, INPUTB)                    \\\n  OUTPUT = _mm512_undefined_ps();                                           \\\n  OUTPUT = _mm512_insertf32x4(OUTPUT, _mm256_extractf128_ps(INPUTA, 0), 0); \\\n  OUTPUT = _mm512_insertf32x4(OUTPUT, _mm256_extractf128_ps(INPUTA, 1), 1); \\\n  OUTPUT = _mm512_insertf32x4(OUTPUT, _mm256_extractf128_ps(INPUTB, 0), 2); \\\n  OUTPUT = _mm512_insertf32x4(OUTPUT, _mm256_extractf128_ps(INPUTB, 1), 3);\n#endif\ntemplate<> EIGEN_STRONG_INLINE Packet16f preduxp<Packet16f>(const Packet16f*\nvecs)\n{\n  EIGEN_EXTRACT_8f_FROM_16f(vecs[0], vecs0);\n  EIGEN_EXTRACT_8f_FROM_16f(vecs[1], vecs1);\n  EIGEN_EXTRACT_8f_FROM_16f(vecs[2], vecs2);\n  EIGEN_EXTRACT_8f_FROM_16f(vecs[3], vecs3);\n  EIGEN_EXTRACT_8f_FROM_16f(vecs[4], vecs4);\n  EIGEN_EXTRACT_8f_FROM_16f(vecs[5], vecs5);\n  EIGEN_EXTRACT_8f_FROM_16f(vecs[6], vecs6);\n  EIGEN_EXTRACT_8f_FROM_16f(vecs[7], vecs7);\n  EIGEN_EXTRACT_8f_FROM_16f(vecs[8], vecs8);\n  EIGEN_EXTRACT_8f_FROM_16f(vecs[9], vecs9);\n  EIGEN_EXTRACT_8f_FROM_16f(vecs[10], vecs10);\n  EIGEN_EXTRACT_8f_FROM_16f(vecs[11], vecs11);\n  EIGEN_EXTRACT_8f_FROM_16f(vecs[12], vecs12);\n  EIGEN_EXTRACT_8f_FROM_16f(vecs[13], vecs13);\n  EIGEN_EXTRACT_8f_FROM_16f(vecs[14], vecs14);\n  EIGEN_EXTRACT_8f_FROM_16f(vecs[15], vecs15);\n\n  __m256 hsum1 = _mm256_hadd_ps(vecs0_0, vecs1_0);\n  __m256 hsum2 = _mm256_hadd_ps(vecs2_0, vecs3_0);\n  __m256 hsum3 = _mm256_hadd_ps(vecs4_0, vecs5_0);\n  __m256 hsum4 = _mm256_hadd_ps(vecs6_0, vecs7_0);\n\n  __m256 hsum5 = _mm256_hadd_ps(hsum1, hsum1);\n  __m256 hsum6 = _mm256_hadd_ps(hsum2, hsum2);\n  __m256 hsum7 = _mm256_hadd_ps(hsum3, hsum3);\n  __m256 hsum8 = _mm256_hadd_ps(hsum4, hsum4);\n\n  __m256 perm1 = _mm256_permute2f128_ps(hsum5, hsum5, 0x23);\n  __m256 perm2 = _mm256_permute2f128_ps(hsum6, hsum6, 0x23);\n  __m256 perm3 = _mm256_permute2f128_ps(hsum7, hsum7, 0x23);\n  __m256 perm4 = _mm256_permute2f128_ps(hsum8, hsum8, 0x23);\n\n  __m256 sum1 = _mm256_add_ps(perm1, hsum5);\n  __m256 sum2 = _mm256_add_ps(perm2, hsum6);\n  __m256 sum3 = _mm256_add_ps(perm3, hsum7);\n  __m256 sum4 = _mm256_add_ps(perm4, hsum8);\n\n  __m256 blend1 = _mm256_blend_ps(sum1, sum2, 0xcc);\n  __m256 blend2 = _mm256_blend_ps(sum3, sum4, 0xcc);\n\n  __m256 final = _mm256_blend_ps(blend1, blend2, 0xf0);\n\n  hsum1 = _mm256_hadd_ps(vecs0_1, vecs1_1);\n  hsum2 = _mm256_hadd_ps(vecs2_1, vecs3_1);\n  hsum3 = _mm256_hadd_ps(vecs4_1, vecs5_1);\n  hsum4 = _mm256_hadd_ps(vecs6_1, vecs7_1);\n\n  hsum5 = _mm256_hadd_ps(hsum1, hsum1);\n  hsum6 = _mm256_hadd_ps(hsum2, hsum2);\n  hsum7 = _mm256_hadd_ps(hsum3, hsum3);\n  hsum8 = _mm256_hadd_ps(hsum4, hsum4);\n\n  perm1 = _mm256_permute2f128_ps(hsum5, hsum5, 0x23);\n  perm2 = _mm256_permute2f128_ps(hsum6, hsum6, 0x23);\n  perm3 = _mm256_permute2f128_ps(hsum7, hsum7, 0x23);\n  perm4 = _mm256_permute2f128_ps(hsum8, hsum8, 0x23);\n\n  sum1 = _mm256_add_ps(perm1, hsum5);\n  sum2 = _mm256_add_ps(perm2, hsum6);\n  sum3 = _mm256_add_ps(perm3, hsum7);\n  sum4 = _mm256_add_ps(perm4, hsum8);\n\n  blend1 = _mm256_blend_ps(sum1, sum2, 0xcc);\n  blend2 = _mm256_blend_ps(sum3, sum4, 0xcc);\n\n  final = _mm256_add_ps(final, _mm256_blend_ps(blend1, blend2, 0xf0));\n\n  hsum1 = _mm256_hadd_ps(vecs8_0, vecs9_0);\n  hsum2 = _mm256_hadd_ps(vecs10_0, vecs11_0);\n  hsum3 = _mm256_hadd_ps(vecs12_0, vecs13_0);\n  hsum4 = _mm256_hadd_ps(vecs14_0, vecs15_0);\n\n  hsum5 = _mm256_hadd_ps(hsum1, hsum1);\n  hsum6 = _mm256_hadd_ps(hsum2, hsum2);\n  hsum7 = _mm256_hadd_ps(hsum3, hsum3);\n  hsum8 = _mm256_hadd_ps(hsum4, hsum4);\n\n  perm1 = _mm256_permute2f128_ps(hsum5, hsum5, 0x23);\n  perm2 = _mm256_permute2f128_ps(hsum6, hsum6, 0x23);\n  perm3 = _mm256_permute2f128_ps(hsum7, hsum7, 0x23);\n  perm4 = _mm256_permute2f128_ps(hsum8, hsum8, 0x23);\n\n  sum1 = _mm256_add_ps(perm1, hsum5);\n  sum2 = _mm256_add_ps(perm2, hsum6);\n  sum3 = _mm256_add_ps(perm3, hsum7);\n  sum4 = _mm256_add_ps(perm4, hsum8);\n\n  blend1 = _mm256_blend_ps(sum1, sum2, 0xcc);\n  blend2 = _mm256_blend_ps(sum3, sum4, 0xcc);\n\n  __m256 final_1 = _mm256_blend_ps(blend1, blend2, 0xf0);\n\n  hsum1 = _mm256_hadd_ps(vecs8_1, vecs9_1);\n  hsum2 = _mm256_hadd_ps(vecs10_1, vecs11_1);\n  hsum3 = _mm256_hadd_ps(vecs12_1, vecs13_1);\n  hsum4 = _mm256_hadd_ps(vecs14_1, vecs15_1);\n\n  hsum5 = _mm256_hadd_ps(hsum1, hsum1);\n  hsum6 = _mm256_hadd_ps(hsum2, hsum2);\n  hsum7 = _mm256_hadd_ps(hsum3, hsum3);\n  hsum8 = _mm256_hadd_ps(hsum4, hsum4);\n\n  perm1 = _mm256_permute2f128_ps(hsum5, hsum5, 0x23);\n  perm2 = _mm256_permute2f128_ps(hsum6, hsum6, 0x23);\n  perm3 = _mm256_permute2f128_ps(hsum7, hsum7, 0x23);\n  perm4 = _mm256_permute2f128_ps(hsum8, hsum8, 0x23);\n\n  sum1 = _mm256_add_ps(perm1, hsum5);\n  sum2 = _mm256_add_ps(perm2, hsum6);\n  sum3 = _mm256_add_ps(perm3, hsum7);\n  sum4 = _mm256_add_ps(perm4, hsum8);\n\n  blend1 = _mm256_blend_ps(sum1, sum2, 0xcc);\n  blend2 = _mm256_blend_ps(sum3, sum4, 0xcc);\n\n  final_1 = _mm256_add_ps(final_1, _mm256_blend_ps(blend1, blend2, 0xf0));\n\n  __m512 final_output;\n\n  EIGEN_INSERT_8f_INTO_16f(final_output, final, final_1);\n  return final_output;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8d preduxp<Packet8d>(const Packet8d* vecs)\n{\n  Packet4d vecs0_0 = _mm512_extractf64x4_pd(vecs[0], 0);\n  Packet4d vecs0_1 = _mm512_extractf64x4_pd(vecs[0], 1);\n\n  Packet4d vecs1_0 = _mm512_extractf64x4_pd(vecs[1], 0);\n  Packet4d vecs1_1 = _mm512_extractf64x4_pd(vecs[1], 1);\n\n  Packet4d vecs2_0 = _mm512_extractf64x4_pd(vecs[2], 0);\n  Packet4d vecs2_1 = _mm512_extractf64x4_pd(vecs[2], 1);\n\n  Packet4d vecs3_0 = _mm512_extractf64x4_pd(vecs[3], 0);\n  Packet4d vecs3_1 = _mm512_extractf64x4_pd(vecs[3], 1);\n\n  Packet4d vecs4_0 = _mm512_extractf64x4_pd(vecs[4], 0);\n  Packet4d vecs4_1 = _mm512_extractf64x4_pd(vecs[4], 1);\n\n  Packet4d vecs5_0 = _mm512_extractf64x4_pd(vecs[5], 0);\n  Packet4d vecs5_1 = _mm512_extractf64x4_pd(vecs[5], 1);\n\n  Packet4d vecs6_0 = _mm512_extractf64x4_pd(vecs[6], 0);\n  Packet4d vecs6_1 = _mm512_extractf64x4_pd(vecs[6], 1);\n\n  Packet4d vecs7_0 = _mm512_extractf64x4_pd(vecs[7], 0);\n  Packet4d vecs7_1 = _mm512_extractf64x4_pd(vecs[7], 1);\n\n  Packet4d tmp0, tmp1;\n\n  tmp0 = _mm256_hadd_pd(vecs0_0, vecs1_0);\n  tmp0 = _mm256_add_pd(tmp0, _mm256_permute2f128_pd(tmp0, tmp0, 1));\n\n  tmp1 = _mm256_hadd_pd(vecs2_0, vecs3_0);\n  tmp1 = _mm256_add_pd(tmp1, _mm256_permute2f128_pd(tmp1, tmp1, 1));\n\n  __m256d final_0 = _mm256_blend_pd(tmp0, tmp1, 0xC);\n\n  tmp0 = _mm256_hadd_pd(vecs0_1, vecs1_1);\n  tmp0 = _mm256_add_pd(tmp0, _mm256_permute2f128_pd(tmp0, tmp0, 1));\n\n  tmp1 = _mm256_hadd_pd(vecs2_1, vecs3_1);\n  tmp1 = _mm256_add_pd(tmp1, _mm256_permute2f128_pd(tmp1, tmp1, 1));\n\n  final_0 = _mm256_add_pd(final_0, _mm256_blend_pd(tmp0, tmp1, 0xC));\n\n  tmp0 = _mm256_hadd_pd(vecs4_0, vecs5_0);\n  tmp0 = _mm256_add_pd(tmp0, _mm256_permute2f128_pd(tmp0, tmp0, 1));\n\n  tmp1 = _mm256_hadd_pd(vecs6_0, vecs7_0);\n  tmp1 = _mm256_add_pd(tmp1, _mm256_permute2f128_pd(tmp1, tmp1, 1));\n\n  __m256d final_1 = _mm256_blend_pd(tmp0, tmp1, 0xC);\n\n  tmp0 = _mm256_hadd_pd(vecs4_1, vecs5_1);\n  tmp0 = _mm256_add_pd(tmp0, _mm256_permute2f128_pd(tmp0, tmp0, 1));\n\n  tmp1 = _mm256_hadd_pd(vecs6_1, vecs7_1);\n  tmp1 = _mm256_add_pd(tmp1, _mm256_permute2f128_pd(tmp1, tmp1, 1));\n\n  final_1 = _mm256_add_pd(final_1, _mm256_blend_pd(tmp0, tmp1, 0xC));\n\n  __m512d final_output = _mm512_castpd256_pd512(final_0);\n\n  return _mm512_insertf64x4(final_output, final_1, 1);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE float predux<Packet16f>(const Packet16f& a) {\n#ifdef EIGEN_VECTORIZE_AVX512DQ\n  __m256 lane0 = _mm512_extractf32x8_ps(a, 0);\n  __m256 lane1 = _mm512_extractf32x8_ps(a, 1);\n  Packet8f x = _mm256_add_ps(lane0, lane1);\n  return predux<Packet8f>(x);\n#else\n  __m128 lane0 = _mm512_extractf32x4_ps(a, 0);\n  __m128 lane1 = _mm512_extractf32x4_ps(a, 1);\n  __m128 lane2 = _mm512_extractf32x4_ps(a, 2);\n  __m128 lane3 = _mm512_extractf32x4_ps(a, 3);\n  __m128 sum = _mm_add_ps(_mm_add_ps(lane0, lane1), _mm_add_ps(lane2, lane3));\n  sum = _mm_hadd_ps(sum, sum);\n  sum = _mm_hadd_ps(sum, _mm_permute_ps(sum, 1));\n  return _mm_cvtss_f32(sum);\n#endif\n}\ntemplate <>\nEIGEN_STRONG_INLINE double predux<Packet8d>(const Packet8d& a) {\n  __m256d lane0 = _mm512_extractf64x4_pd(a, 0);\n  __m256d lane1 = _mm512_extractf64x4_pd(a, 1);\n  __m256d sum = _mm256_add_pd(lane0, lane1);\n  __m256d tmp0 = _mm256_hadd_pd(sum, _mm256_permute2f128_pd(sum, sum, 1));\n  return _mm_cvtsd_f64(_mm256_castpd256_pd128(_mm256_hadd_pd(tmp0, tmp0)));\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet8f predux_half_dowto4<Packet16f>(const Packet16f& a) {\n#ifdef EIGEN_VECTORIZE_AVX512DQ\n  __m256 lane0 = _mm512_extractf32x8_ps(a, 0);\n  __m256 lane1 = _mm512_extractf32x8_ps(a, 1);\n  return _mm256_add_ps(lane0, lane1);\n#else\n  __m128 lane0 = _mm512_extractf32x4_ps(a, 0);\n  __m128 lane1 = _mm512_extractf32x4_ps(a, 1);\n  __m128 lane2 = _mm512_extractf32x4_ps(a, 2);\n  __m128 lane3 = _mm512_extractf32x4_ps(a, 3);\n  __m128 sum0 = _mm_add_ps(lane0, lane2);\n  __m128 sum1 = _mm_add_ps(lane1, lane3);\n  return _mm256_insertf128_ps(_mm256_castps128_ps256(sum0), sum1, 1);\n#endif\n}\ntemplate <>\nEIGEN_STRONG_INLINE Packet4d predux_half_dowto4<Packet8d>(const Packet8d& a) {\n  __m256d lane0 = _mm512_extractf64x4_pd(a, 0);\n  __m256d lane1 = _mm512_extractf64x4_pd(a, 1);\n  return _mm256_add_pd(lane0, lane1);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE float predux_mul<Packet16f>(const Packet16f& a) {\n//#ifdef EIGEN_VECTORIZE_AVX512DQ\n#if 0\n  Packet8f lane0 = _mm512_extractf32x8_ps(a, 0);\n  Packet8f lane1 = _mm512_extractf32x8_ps(a, 1);\n  Packet8f res = pmul(lane0, lane1);\n  res = pmul(res, _mm256_permute2f128_ps(res, res, 1));\n  res = pmul(res, _mm_permute_ps(res, _MM_SHUFFLE(0, 0, 3, 2)));\n  return pfirst(pmul(res, _mm_permute_ps(res, _MM_SHUFFLE(0, 0, 0, 1))));\n#else\n  __m128 lane0 = _mm512_extractf32x4_ps(a, 0);\n  __m128 lane1 = _mm512_extractf32x4_ps(a, 1);\n  __m128 lane2 = _mm512_extractf32x4_ps(a, 2);\n  __m128 lane3 = _mm512_extractf32x4_ps(a, 3);\n  __m128 res = pmul(pmul(lane0, lane1), pmul(lane2, lane3));\n  res = pmul(res, _mm_permute_ps(res, _MM_SHUFFLE(0, 0, 3, 2)));\n  return pfirst(pmul(res, _mm_permute_ps(res, _MM_SHUFFLE(0, 0, 0, 1))));\n#endif\n}\ntemplate <>\nEIGEN_STRONG_INLINE double predux_mul<Packet8d>(const Packet8d& a) {\n  __m256d lane0 = _mm512_extractf64x4_pd(a, 0);\n  __m256d lane1 = _mm512_extractf64x4_pd(a, 1);\n  __m256d res = pmul(lane0, lane1);\n  res = pmul(res, _mm256_permute2f128_pd(res, res, 1));\n  return pfirst(pmul(res, _mm256_shuffle_pd(res, res, 1)));\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE float predux_min<Packet16f>(const Packet16f& a) {\n  __m128 lane0 = _mm512_extractf32x4_ps(a, 0);\n  __m128 lane1 = _mm512_extractf32x4_ps(a, 1);\n  __m128 lane2 = _mm512_extractf32x4_ps(a, 2);\n  __m128 lane3 = _mm512_extractf32x4_ps(a, 3);\n  __m128 res = _mm_min_ps(_mm_min_ps(lane0, lane1), _mm_min_ps(lane2, lane3));\n  res = _mm_min_ps(res, _mm_permute_ps(res, _MM_SHUFFLE(0, 0, 3, 2)));\n  return pfirst(_mm_min_ps(res, _mm_permute_ps(res, _MM_SHUFFLE(0, 0, 0, 1))));\n}\ntemplate <>\nEIGEN_STRONG_INLINE double predux_min<Packet8d>(const Packet8d& a) {\n  __m256d lane0 = _mm512_extractf64x4_pd(a, 0);\n  __m256d lane1 = _mm512_extractf64x4_pd(a, 1);\n  __m256d res = _mm256_min_pd(lane0, lane1);\n  res = _mm256_min_pd(res, _mm256_permute2f128_pd(res, res, 1));\n  return pfirst(_mm256_min_pd(res, _mm256_shuffle_pd(res, res, 1)));\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE float predux_max<Packet16f>(const Packet16f& a) {\n  __m128 lane0 = _mm512_extractf32x4_ps(a, 0);\n  __m128 lane1 = _mm512_extractf32x4_ps(a, 1);\n  __m128 lane2 = _mm512_extractf32x4_ps(a, 2);\n  __m128 lane3 = _mm512_extractf32x4_ps(a, 3);\n  __m128 res = _mm_max_ps(_mm_max_ps(lane0, lane1), _mm_max_ps(lane2, lane3));\n  res = _mm_max_ps(res, _mm_permute_ps(res, _MM_SHUFFLE(0, 0, 3, 2)));\n  return pfirst(_mm_max_ps(res, _mm_permute_ps(res, _MM_SHUFFLE(0, 0, 0, 1))));\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE double predux_max<Packet8d>(const Packet8d& a) {\n  __m256d lane0 = _mm512_extractf64x4_pd(a, 0);\n  __m256d lane1 = _mm512_extractf64x4_pd(a, 1);\n  __m256d res = _mm256_max_pd(lane0, lane1);\n  res = _mm256_max_pd(res, _mm256_permute2f128_pd(res, res, 1));\n  return pfirst(_mm256_max_pd(res, _mm256_shuffle_pd(res, res, 1)));\n}\n\ntemplate<> EIGEN_STRONG_INLINE bool predux_any(const Packet16f& x)\n{\n  Packet16i xi = _mm512_castps_si512(x);\n  __mmask16 tmp = _mm512_test_epi32_mask(xi,xi);\n  return !_mm512_kortestz(tmp,tmp);\n}\n\ntemplate <int Offset>\nstruct palign_impl<Offset, Packet16f> {\n  static EIGEN_STRONG_INLINE void run(Packet16f& first,\n                                      const Packet16f& second) {\n    if (Offset != 0) {\n      __m512i first_idx = _mm512_set_epi32(\n          Offset + 15, Offset + 14, Offset + 13, Offset + 12, Offset + 11,\n          Offset + 10, Offset + 9, Offset + 8, Offset + 7, Offset + 6,\n          Offset + 5, Offset + 4, Offset + 3, Offset + 2, Offset + 1, Offset);\n\n      __m512i second_idx =\n          _mm512_set_epi32(Offset - 1, Offset - 2, Offset - 3, Offset - 4,\n                           Offset - 5, Offset - 6, Offset - 7, Offset - 8,\n                           Offset - 9, Offset - 10, Offset - 11, Offset - 12,\n                           Offset - 13, Offset - 14, Offset - 15, Offset - 16);\n\n      unsigned short mask = 0xFFFF;\n      mask <<= (16 - Offset);\n\n      first = _mm512_permutexvar_ps(first_idx, first);\n      Packet16f tmp = _mm512_permutexvar_ps(second_idx, second);\n      first = _mm512_mask_blend_ps(mask, first, tmp);\n    }\n  }\n};\ntemplate <int Offset>\nstruct palign_impl<Offset, Packet8d> {\n  static EIGEN_STRONG_INLINE void run(Packet8d& first, const Packet8d& second) {\n    if (Offset != 0) {\n      __m512i first_idx = _mm512_set_epi32(\n          0, Offset + 7, 0, Offset + 6, 0, Offset + 5, 0, Offset + 4, 0,\n          Offset + 3, 0, Offset + 2, 0, Offset + 1, 0, Offset);\n\n      __m512i second_idx = _mm512_set_epi32(\n          0, Offset - 1, 0, Offset - 2, 0, Offset - 3, 0, Offset - 4, 0,\n          Offset - 5, 0, Offset - 6, 0, Offset - 7, 0, Offset - 8);\n\n      unsigned char mask = 0xFF;\n      mask <<= (8 - Offset);\n\n      first = _mm512_permutexvar_pd(first_idx, first);\n      Packet8d tmp = _mm512_permutexvar_pd(second_idx, second);\n      first = _mm512_mask_blend_pd(mask, first, tmp);\n    }\n  }\n};\n\n\n#define PACK_OUTPUT(OUTPUT, INPUT, INDEX, STRIDE) \\\n  EIGEN_INSERT_8f_INTO_16f(OUTPUT[INDEX], INPUT[INDEX], INPUT[INDEX + STRIDE]);\n\nEIGEN_DEVICE_FUNC inline void ptranspose(PacketBlock<Packet16f, 16>& kernel) {\n  __m512 T0 = _mm512_unpacklo_ps(kernel.packet[0], kernel.packet[1]);\n  __m512 T1 = _mm512_unpackhi_ps(kernel.packet[0], kernel.packet[1]);\n  __m512 T2 = _mm512_unpacklo_ps(kernel.packet[2], kernel.packet[3]);\n  __m512 T3 = _mm512_unpackhi_ps(kernel.packet[2], kernel.packet[3]);\n  __m512 T4 = _mm512_unpacklo_ps(kernel.packet[4], kernel.packet[5]);\n  __m512 T5 = _mm512_unpackhi_ps(kernel.packet[4], kernel.packet[5]);\n  __m512 T6 = _mm512_unpacklo_ps(kernel.packet[6], kernel.packet[7]);\n  __m512 T7 = _mm512_unpackhi_ps(kernel.packet[6], kernel.packet[7]);\n  __m512 T8 = _mm512_unpacklo_ps(kernel.packet[8], kernel.packet[9]);\n  __m512 T9 = _mm512_unpackhi_ps(kernel.packet[8], kernel.packet[9]);\n  __m512 T10 = _mm512_unpacklo_ps(kernel.packet[10], kernel.packet[11]);\n  __m512 T11 = _mm512_unpackhi_ps(kernel.packet[10], kernel.packet[11]);\n  __m512 T12 = _mm512_unpacklo_ps(kernel.packet[12], kernel.packet[13]);\n  __m512 T13 = _mm512_unpackhi_ps(kernel.packet[12], kernel.packet[13]);\n  __m512 T14 = _mm512_unpacklo_ps(kernel.packet[14], kernel.packet[15]);\n  __m512 T15 = _mm512_unpackhi_ps(kernel.packet[14], kernel.packet[15]);\n  __m512 S0 = _mm512_shuffle_ps(T0, T2, _MM_SHUFFLE(1, 0, 1, 0));\n  __m512 S1 = _mm512_shuffle_ps(T0, T2, _MM_SHUFFLE(3, 2, 3, 2));\n  __m512 S2 = _mm512_shuffle_ps(T1, T3, _MM_SHUFFLE(1, 0, 1, 0));\n  __m512 S3 = _mm512_shuffle_ps(T1, T3, _MM_SHUFFLE(3, 2, 3, 2));\n  __m512 S4 = _mm512_shuffle_ps(T4, T6, _MM_SHUFFLE(1, 0, 1, 0));\n  __m512 S5 = _mm512_shuffle_ps(T4, T6, _MM_SHUFFLE(3, 2, 3, 2));\n  __m512 S6 = _mm512_shuffle_ps(T5, T7, _MM_SHUFFLE(1, 0, 1, 0));\n  __m512 S7 = _mm512_shuffle_ps(T5, T7, _MM_SHUFFLE(3, 2, 3, 2));\n  __m512 S8 = _mm512_shuffle_ps(T8, T10, _MM_SHUFFLE(1, 0, 1, 0));\n  __m512 S9 = _mm512_shuffle_ps(T8, T10, _MM_SHUFFLE(3, 2, 3, 2));\n  __m512 S10 = _mm512_shuffle_ps(T9, T11, _MM_SHUFFLE(1, 0, 1, 0));\n  __m512 S11 = _mm512_shuffle_ps(T9, T11, _MM_SHUFFLE(3, 2, 3, 2));\n  __m512 S12 = _mm512_shuffle_ps(T12, T14, _MM_SHUFFLE(1, 0, 1, 0));\n  __m512 S13 = _mm512_shuffle_ps(T12, T14, _MM_SHUFFLE(3, 2, 3, 2));\n  __m512 S14 = _mm512_shuffle_ps(T13, T15, _MM_SHUFFLE(1, 0, 1, 0));\n  __m512 S15 = _mm512_shuffle_ps(T13, T15, _MM_SHUFFLE(3, 2, 3, 2));\n\n  EIGEN_EXTRACT_8f_FROM_16f(S0, S0);\n  EIGEN_EXTRACT_8f_FROM_16f(S1, S1);\n  EIGEN_EXTRACT_8f_FROM_16f(S2, S2);\n  EIGEN_EXTRACT_8f_FROM_16f(S3, S3);\n  EIGEN_EXTRACT_8f_FROM_16f(S4, S4);\n  EIGEN_EXTRACT_8f_FROM_16f(S5, S5);\n  EIGEN_EXTRACT_8f_FROM_16f(S6, S6);\n  EIGEN_EXTRACT_8f_FROM_16f(S7, S7);\n  EIGEN_EXTRACT_8f_FROM_16f(S8, S8);\n  EIGEN_EXTRACT_8f_FROM_16f(S9, S9);\n  EIGEN_EXTRACT_8f_FROM_16f(S10, S10);\n  EIGEN_EXTRACT_8f_FROM_16f(S11, S11);\n  EIGEN_EXTRACT_8f_FROM_16f(S12, S12);\n  EIGEN_EXTRACT_8f_FROM_16f(S13, S13);\n  EIGEN_EXTRACT_8f_FROM_16f(S14, S14);\n  EIGEN_EXTRACT_8f_FROM_16f(S15, S15);\n\n  PacketBlock<Packet8f, 32> tmp;\n\n  tmp.packet[0] = _mm256_permute2f128_ps(S0_0, S4_0, 0x20);\n  tmp.packet[1] = _mm256_permute2f128_ps(S1_0, S5_0, 0x20);\n  tmp.packet[2] = _mm256_permute2f128_ps(S2_0, S6_0, 0x20);\n  tmp.packet[3] = _mm256_permute2f128_ps(S3_0, S7_0, 0x20);\n  tmp.packet[4] = _mm256_permute2f128_ps(S0_0, S4_0, 0x31);\n  tmp.packet[5] = _mm256_permute2f128_ps(S1_0, S5_0, 0x31);\n  tmp.packet[6] = _mm256_permute2f128_ps(S2_0, S6_0, 0x31);\n  tmp.packet[7] = _mm256_permute2f128_ps(S3_0, S7_0, 0x31);\n\n  tmp.packet[8] = _mm256_permute2f128_ps(S0_1, S4_1, 0x20);\n  tmp.packet[9] = _mm256_permute2f128_ps(S1_1, S5_1, 0x20);\n  tmp.packet[10] = _mm256_permute2f128_ps(S2_1, S6_1, 0x20);\n  tmp.packet[11] = _mm256_permute2f128_ps(S3_1, S7_1, 0x20);\n  tmp.packet[12] = _mm256_permute2f128_ps(S0_1, S4_1, 0x31);\n  tmp.packet[13] = _mm256_permute2f128_ps(S1_1, S5_1, 0x31);\n  tmp.packet[14] = _mm256_permute2f128_ps(S2_1, S6_1, 0x31);\n  tmp.packet[15] = _mm256_permute2f128_ps(S3_1, S7_1, 0x31);\n\n  // Second set of _m256 outputs\n  tmp.packet[16] = _mm256_permute2f128_ps(S8_0, S12_0, 0x20);\n  tmp.packet[17] = _mm256_permute2f128_ps(S9_0, S13_0, 0x20);\n  tmp.packet[18] = _mm256_permute2f128_ps(S10_0, S14_0, 0x20);\n  tmp.packet[19] = _mm256_permute2f128_ps(S11_0, S15_0, 0x20);\n  tmp.packet[20] = _mm256_permute2f128_ps(S8_0, S12_0, 0x31);\n  tmp.packet[21] = _mm256_permute2f128_ps(S9_0, S13_0, 0x31);\n  tmp.packet[22] = _mm256_permute2f128_ps(S10_0, S14_0, 0x31);\n  tmp.packet[23] = _mm256_permute2f128_ps(S11_0, S15_0, 0x31);\n\n  tmp.packet[24] = _mm256_permute2f128_ps(S8_1, S12_1, 0x20);\n  tmp.packet[25] = _mm256_permute2f128_ps(S9_1, S13_1, 0x20);\n  tmp.packet[26] = _mm256_permute2f128_ps(S10_1, S14_1, 0x20);\n  tmp.packet[27] = _mm256_permute2f128_ps(S11_1, S15_1, 0x20);\n  tmp.packet[28] = _mm256_permute2f128_ps(S8_1, S12_1, 0x31);\n  tmp.packet[29] = _mm256_permute2f128_ps(S9_1, S13_1, 0x31);\n  tmp.packet[30] = _mm256_permute2f128_ps(S10_1, S14_1, 0x31);\n  tmp.packet[31] = _mm256_permute2f128_ps(S11_1, S15_1, 0x31);\n\n  // Pack them into the output\n  PACK_OUTPUT(kernel.packet, tmp.packet, 0, 16);\n  PACK_OUTPUT(kernel.packet, tmp.packet, 1, 16);\n  PACK_OUTPUT(kernel.packet, tmp.packet, 2, 16);\n  PACK_OUTPUT(kernel.packet, tmp.packet, 3, 16);\n\n  PACK_OUTPUT(kernel.packet, tmp.packet, 4, 16);\n  PACK_OUTPUT(kernel.packet, tmp.packet, 5, 16);\n  PACK_OUTPUT(kernel.packet, tmp.packet, 6, 16);\n  PACK_OUTPUT(kernel.packet, tmp.packet, 7, 16);\n\n  PACK_OUTPUT(kernel.packet, tmp.packet, 8, 16);\n  PACK_OUTPUT(kernel.packet, tmp.packet, 9, 16);\n  PACK_OUTPUT(kernel.packet, tmp.packet, 10, 16);\n  PACK_OUTPUT(kernel.packet, tmp.packet, 11, 16);\n\n  PACK_OUTPUT(kernel.packet, tmp.packet, 12, 16);\n  PACK_OUTPUT(kernel.packet, tmp.packet, 13, 16);\n  PACK_OUTPUT(kernel.packet, tmp.packet, 14, 16);\n  PACK_OUTPUT(kernel.packet, tmp.packet, 15, 16);\n}\n#define PACK_OUTPUT_2(OUTPUT, INPUT, INDEX, STRIDE)         \\\n  EIGEN_INSERT_8f_INTO_16f(OUTPUT[INDEX], INPUT[2 * INDEX], \\\n                           INPUT[2 * INDEX + STRIDE]);\n\nEIGEN_DEVICE_FUNC inline void ptranspose(PacketBlock<Packet16f, 4>& kernel) {\n  __m512 T0 = _mm512_unpacklo_ps(kernel.packet[0], kernel.packet[1]);\n  __m512 T1 = _mm512_unpackhi_ps(kernel.packet[0], kernel.packet[1]);\n  __m512 T2 = _mm512_unpacklo_ps(kernel.packet[2], kernel.packet[3]);\n  __m512 T3 = _mm512_unpackhi_ps(kernel.packet[2], kernel.packet[3]);\n\n  __m512 S0 = _mm512_shuffle_ps(T0, T2, _MM_SHUFFLE(1, 0, 1, 0));\n  __m512 S1 = _mm512_shuffle_ps(T0, T2, _MM_SHUFFLE(3, 2, 3, 2));\n  __m512 S2 = _mm512_shuffle_ps(T1, T3, _MM_SHUFFLE(1, 0, 1, 0));\n  __m512 S3 = _mm512_shuffle_ps(T1, T3, _MM_SHUFFLE(3, 2, 3, 2));\n\n  EIGEN_EXTRACT_8f_FROM_16f(S0, S0);\n  EIGEN_EXTRACT_8f_FROM_16f(S1, S1);\n  EIGEN_EXTRACT_8f_FROM_16f(S2, S2);\n  EIGEN_EXTRACT_8f_FROM_16f(S3, S3);\n\n  PacketBlock<Packet8f, 8> tmp;\n\n  tmp.packet[0] = _mm256_permute2f128_ps(S0_0, S1_0, 0x20);\n  tmp.packet[1] = _mm256_permute2f128_ps(S2_0, S3_0, 0x20);\n  tmp.packet[2] = _mm256_permute2f128_ps(S0_0, S1_0, 0x31);\n  tmp.packet[3] = _mm256_permute2f128_ps(S2_0, S3_0, 0x31);\n\n  tmp.packet[4] = _mm256_permute2f128_ps(S0_1, S1_1, 0x20);\n  tmp.packet[5] = _mm256_permute2f128_ps(S2_1, S3_1, 0x20);\n  tmp.packet[6] = _mm256_permute2f128_ps(S0_1, S1_1, 0x31);\n  tmp.packet[7] = _mm256_permute2f128_ps(S2_1, S3_1, 0x31);\n\n  PACK_OUTPUT_2(kernel.packet, tmp.packet, 0, 1);\n  PACK_OUTPUT_2(kernel.packet, tmp.packet, 1, 1);\n  PACK_OUTPUT_2(kernel.packet, tmp.packet, 2, 1);\n  PACK_OUTPUT_2(kernel.packet, tmp.packet, 3, 1);\n}\n\n#define PACK_OUTPUT_SQ_D(OUTPUT, INPUT, INDEX, STRIDE)                \\\n  OUTPUT[INDEX] = _mm512_insertf64x4(OUTPUT[INDEX], INPUT[INDEX], 0); \\\n  OUTPUT[INDEX] = _mm512_insertf64x4(OUTPUT[INDEX], INPUT[INDEX + STRIDE], 1);\n\n#define PACK_OUTPUT_D(OUTPUT, INPUT, INDEX, STRIDE)                         \\\n  OUTPUT[INDEX] = _mm512_insertf64x4(OUTPUT[INDEX], INPUT[(2 * INDEX)], 0); \\\n  OUTPUT[INDEX] =                                                           \\\n      _mm512_insertf64x4(OUTPUT[INDEX], INPUT[(2 * INDEX) + STRIDE], 1);\n\nEIGEN_DEVICE_FUNC inline void ptranspose(PacketBlock<Packet8d, 4>& kernel) {\n  __m512d T0 = _mm512_shuffle_pd(kernel.packet[0], kernel.packet[1], 0);\n  __m512d T1 = _mm512_shuffle_pd(kernel.packet[0], kernel.packet[1], 0xff);\n  __m512d T2 = _mm512_shuffle_pd(kernel.packet[2], kernel.packet[3], 0);\n  __m512d T3 = _mm512_shuffle_pd(kernel.packet[2], kernel.packet[3], 0xff);\n\n  PacketBlock<Packet4d, 8> tmp;\n\n  tmp.packet[0] = _mm256_permute2f128_pd(_mm512_extractf64x4_pd(T0, 0),\n                                         _mm512_extractf64x4_pd(T2, 0), 0x20);\n  tmp.packet[1] = _mm256_permute2f128_pd(_mm512_extractf64x4_pd(T1, 0),\n                                         _mm512_extractf64x4_pd(T3, 0), 0x20);\n  tmp.packet[2] = _mm256_permute2f128_pd(_mm512_extractf64x4_pd(T0, 0),\n                                         _mm512_extractf64x4_pd(T2, 0), 0x31);\n  tmp.packet[3] = _mm256_permute2f128_pd(_mm512_extractf64x4_pd(T1, 0),\n                                         _mm512_extractf64x4_pd(T3, 0), 0x31);\n\n  tmp.packet[4] = _mm256_permute2f128_pd(_mm512_extractf64x4_pd(T0, 1),\n                                         _mm512_extractf64x4_pd(T2, 1), 0x20);\n  tmp.packet[5] = _mm256_permute2f128_pd(_mm512_extractf64x4_pd(T1, 1),\n                                         _mm512_extractf64x4_pd(T3, 1), 0x20);\n  tmp.packet[6] = _mm256_permute2f128_pd(_mm512_extractf64x4_pd(T0, 1),\n                                         _mm512_extractf64x4_pd(T2, 1), 0x31);\n  tmp.packet[7] = _mm256_permute2f128_pd(_mm512_extractf64x4_pd(T1, 1),\n                                         _mm512_extractf64x4_pd(T3, 1), 0x31);\n\n  PACK_OUTPUT_D(kernel.packet, tmp.packet, 0, 1);\n  PACK_OUTPUT_D(kernel.packet, tmp.packet, 1, 1);\n  PACK_OUTPUT_D(kernel.packet, tmp.packet, 2, 1);\n  PACK_OUTPUT_D(kernel.packet, tmp.packet, 3, 1);\n}\n\nEIGEN_DEVICE_FUNC inline void ptranspose(PacketBlock<Packet8d, 8>& kernel) {\n  __m512d T0 = _mm512_unpacklo_pd(kernel.packet[0], kernel.packet[1]);\n  __m512d T1 = _mm512_unpackhi_pd(kernel.packet[0], kernel.packet[1]);\n  __m512d T2 = _mm512_unpacklo_pd(kernel.packet[2], kernel.packet[3]);\n  __m512d T3 = _mm512_unpackhi_pd(kernel.packet[2], kernel.packet[3]);\n  __m512d T4 = _mm512_unpacklo_pd(kernel.packet[4], kernel.packet[5]);\n  __m512d T5 = _mm512_unpackhi_pd(kernel.packet[4], kernel.packet[5]);\n  __m512d T6 = _mm512_unpacklo_pd(kernel.packet[6], kernel.packet[7]);\n  __m512d T7 = _mm512_unpackhi_pd(kernel.packet[6], kernel.packet[7]);\n\n  PacketBlock<Packet4d, 16> tmp;\n\n  tmp.packet[0] = _mm256_permute2f128_pd(_mm512_extractf64x4_pd(T0, 0),\n                                         _mm512_extractf64x4_pd(T2, 0), 0x20);\n  tmp.packet[1] = _mm256_permute2f128_pd(_mm512_extractf64x4_pd(T1, 0),\n                                         _mm512_extractf64x4_pd(T3, 0), 0x20);\n  tmp.packet[2] = _mm256_permute2f128_pd(_mm512_extractf64x4_pd(T0, 0),\n                                         _mm512_extractf64x4_pd(T2, 0), 0x31);\n  tmp.packet[3] = _mm256_permute2f128_pd(_mm512_extractf64x4_pd(T1, 0),\n                                         _mm512_extractf64x4_pd(T3, 0), 0x31);\n\n  tmp.packet[4] = _mm256_permute2f128_pd(_mm512_extractf64x4_pd(T0, 1),\n                                         _mm512_extractf64x4_pd(T2, 1), 0x20);\n  tmp.packet[5] = _mm256_permute2f128_pd(_mm512_extractf64x4_pd(T1, 1),\n                                         _mm512_extractf64x4_pd(T3, 1), 0x20);\n  tmp.packet[6] = _mm256_permute2f128_pd(_mm512_extractf64x4_pd(T0, 1),\n                                         _mm512_extractf64x4_pd(T2, 1), 0x31);\n  tmp.packet[7] = _mm256_permute2f128_pd(_mm512_extractf64x4_pd(T1, 1),\n                                         _mm512_extractf64x4_pd(T3, 1), 0x31);\n\n  tmp.packet[8] = _mm256_permute2f128_pd(_mm512_extractf64x4_pd(T4, 0),\n                                         _mm512_extractf64x4_pd(T6, 0), 0x20);\n  tmp.packet[9] = _mm256_permute2f128_pd(_mm512_extractf64x4_pd(T5, 0),\n                                         _mm512_extractf64x4_pd(T7, 0), 0x20);\n  tmp.packet[10] = _mm256_permute2f128_pd(_mm512_extractf64x4_pd(T4, 0),\n                                          _mm512_extractf64x4_pd(T6, 0), 0x31);\n  tmp.packet[11] = _mm256_permute2f128_pd(_mm512_extractf64x4_pd(T5, 0),\n                                          _mm512_extractf64x4_pd(T7, 0), 0x31);\n\n  tmp.packet[12] = _mm256_permute2f128_pd(_mm512_extractf64x4_pd(T4, 1),\n                                          _mm512_extractf64x4_pd(T6, 1), 0x20);\n  tmp.packet[13] = _mm256_permute2f128_pd(_mm512_extractf64x4_pd(T5, 1),\n                                          _mm512_extractf64x4_pd(T7, 1), 0x20);\n  tmp.packet[14] = _mm256_permute2f128_pd(_mm512_extractf64x4_pd(T4, 1),\n                                          _mm512_extractf64x4_pd(T6, 1), 0x31);\n  tmp.packet[15] = _mm256_permute2f128_pd(_mm512_extractf64x4_pd(T5, 1),\n                                          _mm512_extractf64x4_pd(T7, 1), 0x31);\n\n  PACK_OUTPUT_SQ_D(kernel.packet, tmp.packet, 0, 8);\n  PACK_OUTPUT_SQ_D(kernel.packet, tmp.packet, 1, 8);\n  PACK_OUTPUT_SQ_D(kernel.packet, tmp.packet, 2, 8);\n  PACK_OUTPUT_SQ_D(kernel.packet, tmp.packet, 3, 8);\n\n  PACK_OUTPUT_SQ_D(kernel.packet, tmp.packet, 4, 8);\n  PACK_OUTPUT_SQ_D(kernel.packet, tmp.packet, 5, 8);\n  PACK_OUTPUT_SQ_D(kernel.packet, tmp.packet, 6, 8);\n  PACK_OUTPUT_SQ_D(kernel.packet, tmp.packet, 7, 8);\n}\ntemplate <>\nEIGEN_STRONG_INLINE Packet16f pblend(const Selector<16>& /*ifPacket*/,\n                                     const Packet16f& /*thenPacket*/,\n                                     const Packet16f& /*elsePacket*/) {\n  assert(false && \"To be implemented\");\n  return Packet16f();\n}\ntemplate <>\nEIGEN_STRONG_INLINE Packet8d pblend(const Selector<8>& ifPacket,\n                                    const Packet8d& thenPacket,\n                                    const Packet8d& elsePacket) {\n  __mmask8 m = (ifPacket.select[0]   )\n             | (ifPacket.select[1]<<1)\n             | (ifPacket.select[2]<<2)\n             | (ifPacket.select[3]<<3)\n             | (ifPacket.select[4]<<4)\n             | (ifPacket.select[5]<<5)\n             | (ifPacket.select[6]<<6)\n             | (ifPacket.select[7]<<7);\n  return _mm512_mask_blend_pd(m, elsePacket, thenPacket);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet16f pinsertfirst(const Packet16f& a, float b)\n{\n  return _mm512_mask_broadcastss_ps(a, (1), _mm_load_ss(&b));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8d pinsertfirst(const Packet8d& a, double b)\n{\n  return _mm512_mask_broadcastsd_pd(a, (1), _mm_load_sd(&b));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet16f pinsertlast(const Packet16f& a, float b)\n{\n  return _mm512_mask_broadcastss_ps(a, (1<<15), _mm_load_ss(&b));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8d pinsertlast(const Packet8d& a, double b)\n{\n  return _mm512_mask_broadcastsd_pd(a, (1<<7), _mm_load_sd(&b));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet16i pcast<Packet16f, Packet16i>(const Packet16f& a) {\n  return _mm512_cvttps_epi32(a);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet16f pcast<Packet16i, Packet16f>(const Packet16i& a) {\n  return _mm512_cvtepi32_ps(a);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet16i preinterpret<Packet16i,Packet16f>(const Packet16f& a) {\n  return _mm512_castps_si512(a);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet16f preinterpret<Packet16f,Packet16i>(const Packet16i& a) {\n  return _mm512_castsi512_ps(a);\n}\n\n\n// Packet math for Eigen::half\ntemplate<> EIGEN_STRONG_INLINE Packet16h pset1<Packet16h>(const Eigen::half& from) {\n  return _mm256_set1_epi16(from.x);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Eigen::half pfirst<Packet16h>(const Packet16h& from) {\n  return half_impl::raw_uint16_to_half(static_cast<unsigned short>(_mm256_extract_epi16(from, 0)));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet16h pload<Packet16h>(const Eigen::half* from) {\n  return _mm256_load_si256(reinterpret_cast<const __m256i*>(from));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet16h ploadu<Packet16h>(const Eigen::half* from) {\n  return _mm256_loadu_si256(reinterpret_cast<const __m256i*>(from));\n}\n\ntemplate<> EIGEN_STRONG_INLINE void pstore<half>(Eigen::half* to, const Packet16h& from) {\n  // (void*) -> workaround clang warning:\n  // cast from 'Eigen::half *' to '__m256i *' increases required alignment from 2 to 32\n  _mm256_store_si256((__m256i*)(void*)to, from);\n}\n\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<half>(Eigen::half* to, const Packet16h& from) {\n  // (void*) -> workaround clang warning:\n  // cast from 'Eigen::half *' to '__m256i *' increases required alignment from 2 to 32\n  _mm256_storeu_si256((__m256i*)(void*)to, from);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet16h\nploaddup<Packet16h>(const Eigen::half*  from) {\n  unsigned short a = from[0].x;\n  unsigned short b = from[1].x;\n  unsigned short c = from[2].x;\n  unsigned short d = from[3].x;\n  unsigned short e = from[4].x;\n  unsigned short f = from[5].x;\n  unsigned short g = from[6].x;\n  unsigned short h = from[7].x;\n  return _mm256_set_epi16(h, h, g, g, f, f, e, e, d, d, c, c, b, b, a, a);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet16h\nploadquad(const Eigen::half* from) {\n  unsigned short a = from[0].x;\n  unsigned short b = from[1].x;\n  unsigned short c = from[2].x;\n  unsigned short d = from[3].x;\n  return _mm256_set_epi16(d, d, d, d, c, c, c, c, b, b, b, b, a, a, a, a);\n}\n\nEIGEN_STRONG_INLINE Packet16f half2float(const Packet16h& a) {\n#ifdef EIGEN_HAS_FP16_C\n  return _mm512_cvtph_ps(a);\n#else\n  EIGEN_ALIGN64 half aux[16];\n  pstore(aux, a);\n  float f0(aux[0]);\n  float f1(aux[1]);\n  float f2(aux[2]);\n  float f3(aux[3]);\n  float f4(aux[4]);\n  float f5(aux[5]);\n  float f6(aux[6]);\n  float f7(aux[7]);\n  float f8(aux[8]);\n  float f9(aux[9]);\n  float fa(aux[10]);\n  float fb(aux[11]);\n  float fc(aux[12]);\n  float fd(aux[13]);\n  float fe(aux[14]);\n  float ff(aux[15]);\n\n  return _mm512_set_ps(\n      ff, fe, fd, fc, fb, fa, f9, f8, f7, f6, f5, f4, f3, f2, f1, f0);\n#endif\n}\n\nEIGEN_STRONG_INLINE Packet16h float2half(const Packet16f& a) {\n#ifdef EIGEN_HAS_FP16_C\n  return _mm512_cvtps_ph(a, _MM_FROUND_TO_NEAREST_INT|_MM_FROUND_NO_EXC);\n#else\n  EIGEN_ALIGN64 float aux[16];\n  pstore(aux, a);\n  half h0(aux[0]);\n  half h1(aux[1]);\n  half h2(aux[2]);\n  half h3(aux[3]);\n  half h4(aux[4]);\n  half h5(aux[5]);\n  half h6(aux[6]);\n  half h7(aux[7]);\n  half h8(aux[8]);\n  half h9(aux[9]);\n  half ha(aux[10]);\n  half hb(aux[11]);\n  half hc(aux[12]);\n  half hd(aux[13]);\n  half he(aux[14]);\n  half hf(aux[15]);\n\n  return _mm256_set_epi16(\n      hf.x, he.x, hd.x, hc.x, hb.x, ha.x, h9.x, h8.x,\n      h7.x, h6.x, h5.x, h4.x, h3.x, h2.x, h1.x, h0.x);\n#endif\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet16h ptrue(const Packet16h& a) {\n  return ptrue(Packet8i(a));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet16h pnot(const Packet16h& a) {\n  return _mm256_xor_si256(a, ptrue(a));\n}\n\n\ntemplate<> EIGEN_STRONG_INLINE Packet16h por(const Packet16h& a,const Packet16h& b) {\n  // in some cases Packet8i is a wrapper around __m256i, so we need to\n  // cast to Packet8i to call the correct overload.\n  return por(Packet8i(a),Packet8i(b));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet16h pxor(const Packet16h& a,const Packet16h& b) {\n  return pxor(Packet8i(a),Packet8i(b));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet16h pand(const Packet16h& a,const Packet16h& b) {\n  return pand(Packet8i(a),Packet8i(b));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet16h pandnot(const Packet16h& a,const Packet16h& b) {\n  return pandnot(Packet8i(a),Packet8i(b));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet16h pselect(const Packet16h& mask, const Packet16h& a, const Packet16h& b) {\n  return _mm256_blendv_epi8(b, a, mask);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet16h pcmp_eq(const Packet16h& a,const Packet16h& b) {\n  Packet16f af = half2float(a);\n  Packet16f bf = half2float(b);\n  Packet16f rf = pcmp_eq(af, bf);\n  // Pack the 32-bit flags into 16-bits flags.\n  __m256i lo = _mm256_castps_si256(extract256<0>(rf));\n  __m256i hi = _mm256_castps_si256(extract256<1>(rf));\n  __m128i result_lo = _mm_packs_epi32(_mm256_extractf128_si256(lo, 0),\n                                      _mm256_extractf128_si256(lo, 1));\n  __m128i result_hi = _mm_packs_epi32(_mm256_extractf128_si256(hi, 0),\n                                      _mm256_extractf128_si256(hi, 1));\n  return _mm256_insertf128_si256(_mm256_castsi128_si256(result_lo), result_hi, 1);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet16h pnegate(const Packet16h& a) {\n  Packet16h sign_mask = _mm256_set1_epi16(static_cast<unsigned short>(0x8000));\n  return _mm256_xor_si256(a, sign_mask);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet16h padd<Packet16h>(const Packet16h& a, const Packet16h& b) {\n  Packet16f af = half2float(a);\n  Packet16f bf = half2float(b);\n  Packet16f rf = padd(af, bf);\n  return float2half(rf);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet16h psub<Packet16h>(const Packet16h& a, const Packet16h& b) {\n  Packet16f af = half2float(a);\n  Packet16f bf = half2float(b);\n  Packet16f rf = psub(af, bf);\n  return float2half(rf);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet16h pmul<Packet16h>(const Packet16h& a, const Packet16h& b) {\n  Packet16f af = half2float(a);\n  Packet16f bf = half2float(b);\n  Packet16f rf = pmul(af, bf);\n  return float2half(rf);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet16h pdiv<Packet16h>(const Packet16h& a, const Packet16h& b) {\n  Packet16f af = half2float(a);\n  Packet16f bf = half2float(b);\n  Packet16f rf = pdiv(af, bf);\n  return float2half(rf);\n}\n\ntemplate<> EIGEN_STRONG_INLINE half predux<Packet16h>(const Packet16h& from) {\n  Packet16f from_float = half2float(from);\n  return half(predux(from_float));\n}\n\ntemplate<> EIGEN_STRONG_INLINE half predux_mul<Packet16h>(const Packet16h& from) {\n  Packet16f from_float = half2float(from);\n  return half(predux_mul(from_float));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet16h preduxp<Packet16h>(const Packet16h* p) {\n  Packet16f pf[16];\n  pf[0] = half2float(p[0]);\n  pf[1] = half2float(p[1]);\n  pf[2] = half2float(p[2]);\n  pf[3] = half2float(p[3]);\n  pf[4] = half2float(p[4]);\n  pf[5] = half2float(p[5]);\n  pf[6] = half2float(p[6]);\n  pf[7] = half2float(p[7]);\n  pf[8] = half2float(p[8]);\n  pf[9] = half2float(p[9]);\n  pf[10] = half2float(p[10]);\n  pf[11] = half2float(p[11]);\n  pf[12] = half2float(p[12]);\n  pf[13] = half2float(p[13]);\n  pf[14] = half2float(p[14]);\n  pf[15] = half2float(p[15]);\n  Packet16f reduced = preduxp<Packet16f>(pf);\n  return float2half(reduced);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet16h preverse(const Packet16h& a)\n{\n  __m128i m = _mm_setr_epi8(14,15,12,13,10,11,8,9,6,7,4,5,2,3,0,1);\n  return _mm256_insertf128_si256(\n                    _mm256_castsi128_si256(_mm_shuffle_epi8(_mm256_extractf128_si256(a,1),m)),\n                                           _mm_shuffle_epi8(_mm256_extractf128_si256(a,0),m), 1);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet16h pinsertfirst(const Packet16h& a, Eigen::half b)\n{\n  return _mm256_insert_epi16(a,b.x,0);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet16h pinsertlast(const Packet16h& a, Eigen::half b)\n{\n  return _mm256_insert_epi16(a,b.x,15);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet16h pgather<Eigen::half, Packet16h>(const Eigen::half* from, Index stride)\n{\n  return _mm256_set_epi16(\n      from[15*stride].x, from[14*stride].x, from[13*stride].x, from[12*stride].x,\n      from[11*stride].x, from[10*stride].x, from[9*stride].x, from[8*stride].x,\n      from[7*stride].x, from[6*stride].x, from[5*stride].x, from[4*stride].x,\n      from[3*stride].x, from[2*stride].x, from[1*stride].x, from[0*stride].x);\n}\n\ntemplate<> EIGEN_STRONG_INLINE void pscatter<half, Packet16h>(half* to, const Packet16h& from, Index stride)\n{\n  EIGEN_ALIGN64 half aux[16];\n  pstore(aux, from);\n  to[stride*0].x = aux[0].x;\n  to[stride*1].x = aux[1].x;\n  to[stride*2].x = aux[2].x;\n  to[stride*3].x = aux[3].x;\n  to[stride*4].x = aux[4].x;\n  to[stride*5].x = aux[5].x;\n  to[stride*6].x = aux[6].x;\n  to[stride*7].x = aux[7].x;\n  to[stride*8].x = aux[8].x;\n  to[stride*9].x = aux[9].x;\n  to[stride*10].x = aux[10].x;\n  to[stride*11].x = aux[11].x;\n  to[stride*12].x = aux[12].x;\n  to[stride*13].x = aux[13].x;\n  to[stride*14].x = aux[14].x;\n  to[stride*15].x = aux[15].x;\n}\n\nEIGEN_STRONG_INLINE void\nptranspose(PacketBlock<Packet16h,16>& kernel) {\n  __m256i a = kernel.packet[0];\n  __m256i b = kernel.packet[1];\n  __m256i c = kernel.packet[2];\n  __m256i d = kernel.packet[3];\n  __m256i e = kernel.packet[4];\n  __m256i f = kernel.packet[5];\n  __m256i g = kernel.packet[6];\n  __m256i h = kernel.packet[7];\n  __m256i i = kernel.packet[8];\n  __m256i j = kernel.packet[9];\n  __m256i k = kernel.packet[10];\n  __m256i l = kernel.packet[11];\n  __m256i m = kernel.packet[12];\n  __m256i n = kernel.packet[13];\n  __m256i o = kernel.packet[14];\n  __m256i p = kernel.packet[15];\n\n  __m256i ab_07 = _mm256_unpacklo_epi16(a, b);\n  __m256i cd_07 = _mm256_unpacklo_epi16(c, d);\n  __m256i ef_07 = _mm256_unpacklo_epi16(e, f);\n  __m256i gh_07 = _mm256_unpacklo_epi16(g, h);\n  __m256i ij_07 = _mm256_unpacklo_epi16(i, j);\n  __m256i kl_07 = _mm256_unpacklo_epi16(k, l);\n  __m256i mn_07 = _mm256_unpacklo_epi16(m, n);\n  __m256i op_07 = _mm256_unpacklo_epi16(o, p);\n\n  __m256i ab_8f = _mm256_unpackhi_epi16(a, b);\n  __m256i cd_8f = _mm256_unpackhi_epi16(c, d);\n  __m256i ef_8f = _mm256_unpackhi_epi16(e, f);\n  __m256i gh_8f = _mm256_unpackhi_epi16(g, h);\n  __m256i ij_8f = _mm256_unpackhi_epi16(i, j);\n  __m256i kl_8f = _mm256_unpackhi_epi16(k, l);\n  __m256i mn_8f = _mm256_unpackhi_epi16(m, n);\n  __m256i op_8f = _mm256_unpackhi_epi16(o, p);\n\n  __m256i abcd_03 = _mm256_unpacklo_epi32(ab_07, cd_07);\n  __m256i abcd_47 = _mm256_unpackhi_epi32(ab_07, cd_07);\n  __m256i efgh_03 = _mm256_unpacklo_epi32(ef_07, gh_07);\n  __m256i efgh_47 = _mm256_unpackhi_epi32(ef_07, gh_07);\n  __m256i ijkl_03 = _mm256_unpacklo_epi32(ij_07, kl_07);\n  __m256i ijkl_47 = _mm256_unpackhi_epi32(ij_07, kl_07);\n  __m256i mnop_03 = _mm256_unpacklo_epi32(mn_07, op_07);\n  __m256i mnop_47 = _mm256_unpackhi_epi32(mn_07, op_07);\n\n  __m256i abcd_8b = _mm256_unpacklo_epi32(ab_8f, cd_8f);\n  __m256i abcd_cf = _mm256_unpackhi_epi32(ab_8f, cd_8f);\n  __m256i efgh_8b = _mm256_unpacklo_epi32(ef_8f, gh_8f);\n  __m256i efgh_cf = _mm256_unpackhi_epi32(ef_8f, gh_8f);\n  __m256i ijkl_8b = _mm256_unpacklo_epi32(ij_8f, kl_8f);\n  __m256i ijkl_cf = _mm256_unpackhi_epi32(ij_8f, kl_8f);\n  __m256i mnop_8b = _mm256_unpacklo_epi32(mn_8f, op_8f);\n  __m256i mnop_cf = _mm256_unpackhi_epi32(mn_8f, op_8f);\n\n  __m256i abcdefgh_01 = _mm256_unpacklo_epi64(abcd_03, efgh_03);\n  __m256i abcdefgh_23 = _mm256_unpackhi_epi64(abcd_03, efgh_03);\n  __m256i ijklmnop_01 = _mm256_unpacklo_epi64(ijkl_03, mnop_03);\n  __m256i ijklmnop_23 = _mm256_unpackhi_epi64(ijkl_03, mnop_03);\n  __m256i abcdefgh_45 = _mm256_unpacklo_epi64(abcd_47, efgh_47);\n  __m256i abcdefgh_67 = _mm256_unpackhi_epi64(abcd_47, efgh_47);\n  __m256i ijklmnop_45 = _mm256_unpacklo_epi64(ijkl_47, mnop_47);\n  __m256i ijklmnop_67 = _mm256_unpackhi_epi64(ijkl_47, mnop_47);\n  __m256i abcdefgh_89 = _mm256_unpacklo_epi64(abcd_8b, efgh_8b);\n  __m256i abcdefgh_ab = _mm256_unpackhi_epi64(abcd_8b, efgh_8b);\n  __m256i ijklmnop_89 = _mm256_unpacklo_epi64(ijkl_8b, mnop_8b);\n  __m256i ijklmnop_ab = _mm256_unpackhi_epi64(ijkl_8b, mnop_8b);\n  __m256i abcdefgh_cd = _mm256_unpacklo_epi64(abcd_cf, efgh_cf);\n  __m256i abcdefgh_ef = _mm256_unpackhi_epi64(abcd_cf, efgh_cf);\n  __m256i ijklmnop_cd = _mm256_unpacklo_epi64(ijkl_cf, mnop_cf);\n  __m256i ijklmnop_ef = _mm256_unpackhi_epi64(ijkl_cf, mnop_cf);\n\n  // NOTE: no unpacklo/hi instr in this case, so using permute instr.\n  __m256i a_p_0 = _mm256_permute2x128_si256(abcdefgh_01, ijklmnop_01, 0x20);\n  __m256i a_p_1 = _mm256_permute2x128_si256(abcdefgh_23, ijklmnop_23, 0x20);\n  __m256i a_p_2 = _mm256_permute2x128_si256(abcdefgh_45, ijklmnop_45, 0x20);\n  __m256i a_p_3 = _mm256_permute2x128_si256(abcdefgh_67, ijklmnop_67, 0x20);\n  __m256i a_p_4 = _mm256_permute2x128_si256(abcdefgh_89, ijklmnop_89, 0x20);\n  __m256i a_p_5 = _mm256_permute2x128_si256(abcdefgh_ab, ijklmnop_ab, 0x20);\n  __m256i a_p_6 = _mm256_permute2x128_si256(abcdefgh_cd, ijklmnop_cd, 0x20);\n  __m256i a_p_7 = _mm256_permute2x128_si256(abcdefgh_ef, ijklmnop_ef, 0x20);\n  __m256i a_p_8 = _mm256_permute2x128_si256(abcdefgh_01, ijklmnop_01, 0x31);\n  __m256i a_p_9 = _mm256_permute2x128_si256(abcdefgh_23, ijklmnop_23, 0x31);\n  __m256i a_p_a = _mm256_permute2x128_si256(abcdefgh_45, ijklmnop_45, 0x31);\n  __m256i a_p_b = _mm256_permute2x128_si256(abcdefgh_67, ijklmnop_67, 0x31);\n  __m256i a_p_c = _mm256_permute2x128_si256(abcdefgh_89, ijklmnop_89, 0x31);\n  __m256i a_p_d = _mm256_permute2x128_si256(abcdefgh_ab, ijklmnop_ab, 0x31);\n  __m256i a_p_e = _mm256_permute2x128_si256(abcdefgh_cd, ijklmnop_cd, 0x31);\n  __m256i a_p_f = _mm256_permute2x128_si256(abcdefgh_ef, ijklmnop_ef, 0x31);\n\n  kernel.packet[0] = a_p_0;\n  kernel.packet[1] = a_p_1;\n  kernel.packet[2] = a_p_2;\n  kernel.packet[3] = a_p_3;\n  kernel.packet[4] = a_p_4;\n  kernel.packet[5] = a_p_5;\n  kernel.packet[6] = a_p_6;\n  kernel.packet[7] = a_p_7;\n  kernel.packet[8] = a_p_8;\n  kernel.packet[9] = a_p_9;\n  kernel.packet[10] = a_p_a;\n  kernel.packet[11] = a_p_b;\n  kernel.packet[12] = a_p_c;\n  kernel.packet[13] = a_p_d;\n  kernel.packet[14] = a_p_e;\n  kernel.packet[15] = a_p_f;\n}\n\nEIGEN_STRONG_INLINE void\nptranspose(PacketBlock<Packet16h,8>& kernel) {\n  EIGEN_ALIGN64 half in[8][16];\n  pstore<half>(in[0], kernel.packet[0]);\n  pstore<half>(in[1], kernel.packet[1]);\n  pstore<half>(in[2], kernel.packet[2]);\n  pstore<half>(in[3], kernel.packet[3]);\n  pstore<half>(in[4], kernel.packet[4]);\n  pstore<half>(in[5], kernel.packet[5]);\n  pstore<half>(in[6], kernel.packet[6]);\n  pstore<half>(in[7], kernel.packet[7]);\n\n  EIGEN_ALIGN64 half out[8][16];\n\n  for (int i = 0; i < 8; ++i) {\n    for (int j = 0; j < 8; ++j) {\n      out[i][j] = in[j][2*i];\n    }\n    for (int j = 0; j < 8; ++j) {\n      out[i][j+8] = in[j][2*i+1];\n    }\n  }\n\n  kernel.packet[0] = pload<Packet16h>(out[0]);\n  kernel.packet[1] = pload<Packet16h>(out[1]);\n  kernel.packet[2] = pload<Packet16h>(out[2]);\n  kernel.packet[3] = pload<Packet16h>(out[3]);\n  kernel.packet[4] = pload<Packet16h>(out[4]);\n  kernel.packet[5] = pload<Packet16h>(out[5]);\n  kernel.packet[6] = pload<Packet16h>(out[6]);\n  kernel.packet[7] = pload<Packet16h>(out[7]);\n}\n\nEIGEN_STRONG_INLINE void\nptranspose(PacketBlock<Packet16h,4>& kernel) {\n  EIGEN_ALIGN64 half in[4][16];\n  pstore<half>(in[0], kernel.packet[0]);\n  pstore<half>(in[1], kernel.packet[1]);\n  pstore<half>(in[2], kernel.packet[2]);\n  pstore<half>(in[3], kernel.packet[3]);\n\n  EIGEN_ALIGN64 half out[4][16];\n\n  for (int i = 0; i < 4; ++i) {\n    for (int j = 0; j < 4; ++j) {\n      out[i][j] = in[j][4*i];\n    }\n    for (int j = 0; j < 4; ++j) {\n      out[i][j+4] = in[j][4*i+1];\n    }\n    for (int j = 0; j < 4; ++j) {\n      out[i][j+8] = in[j][4*i+2];\n    }\n    for (int j = 0; j < 4; ++j) {\n      out[i][j+12] = in[j][4*i+3];\n    }\n  }\n\n  kernel.packet[0] = pload<Packet16h>(out[0]);\n  kernel.packet[1] = pload<Packet16h>(out[1]);\n  kernel.packet[2] = pload<Packet16h>(out[2]);\n  kernel.packet[3] = pload<Packet16h>(out[3]);\n}\n\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_PACKET_MATH_AVX512_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/AVX512/TypeCasting.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2019 Rasmus Munk Larsen <rmlarsen@google.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_TYPE_CASTING_AVX512_H\n#define EIGEN_TYPE_CASTING_AVX512_H\n\nnamespace Eigen {\n\nnamespace internal {\n\ntemplate <>\nstruct type_casting_traits<half, float> {\n  enum {\n    VectorizedCast = 1,\n    SrcCoeffRatio = 1,\n    TgtCoeffRatio = 1\n  };\n};\n\ntemplate<> EIGEN_STRONG_INLINE Packet16f pcast<Packet16h, Packet16f>(const Packet16h& a) {\n  return half2float(a);\n}\n\ntemplate <>\nstruct type_casting_traits<float, half> {\n  enum {\n    VectorizedCast = 1,\n    SrcCoeffRatio = 1,\n    TgtCoeffRatio = 1\n  };\n};\n\ntemplate<> EIGEN_STRONG_INLINE Packet16h pcast<Packet16f, Packet16h>(const Packet16f& a) {\n  return float2half(a);\n}\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_TYPE_CASTING_AVX512_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/AltiVec/Complex.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2010-2016 Konstantinos Margaritis <markos@freevec.org>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_COMPLEX32_ALTIVEC_H\n#define EIGEN_COMPLEX32_ALTIVEC_H\n\nnamespace Eigen {\n\nnamespace internal {\n\nstatic Packet4ui  p4ui_CONJ_XOR = vec_mergeh((Packet4ui)p4i_ZERO, (Packet4ui)p4f_MZERO);//{ 0x00000000, 0x80000000, 0x00000000, 0x80000000 };\n#ifdef __VSX__\n#if defined(_BIG_ENDIAN)\nstatic Packet2ul  p2ul_CONJ_XOR1 = (Packet2ul) vec_sld((Packet4ui) p2d_MZERO, (Packet4ui) p2l_ZERO, 8);//{ 0x8000000000000000, 0x0000000000000000 };\nstatic Packet2ul  p2ul_CONJ_XOR2 = (Packet2ul) vec_sld((Packet4ui) p2l_ZERO,  (Packet4ui) p2d_MZERO, 8);//{ 0x8000000000000000, 0x0000000000000000 };\n#else\nstatic Packet2ul  p2ul_CONJ_XOR1 = (Packet2ul) vec_sld((Packet4ui) p2l_ZERO,  (Packet4ui) p2d_MZERO, 8);//{ 0x8000000000000000, 0x0000000000000000 };\nstatic Packet2ul  p2ul_CONJ_XOR2 = (Packet2ul) vec_sld((Packet4ui) p2d_MZERO, (Packet4ui) p2l_ZERO, 8);//{ 0x8000000000000000, 0x0000000000000000 };\n#endif\n#endif\n\n//---------- float ----------\nstruct Packet2cf\n{\n  EIGEN_STRONG_INLINE explicit Packet2cf() : v(p4f_ZERO) {}\n  EIGEN_STRONG_INLINE explicit Packet2cf(const Packet4f& a) : v(a) {}\n  Packet4f  v;\n};\n\ntemplate<> struct packet_traits<std::complex<float> >  : default_packet_traits\n{\n  typedef Packet2cf type;\n  typedef Packet2cf half;\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size = 2,\n    HasHalfPacket = 0,\n\n    HasAdd    = 1,\n    HasSub    = 1,\n    HasMul    = 1,\n    HasDiv    = 1,\n    HasNegate = 1,\n    HasAbs    = 0,\n    HasAbs2   = 0,\n    HasMin    = 0,\n    HasMax    = 0,\n#ifdef __VSX__\n    HasBlend  = 1,\n#endif\n    HasSetLinear = 0\n  };\n};\n\ntemplate<> struct unpacket_traits<Packet2cf> { typedef std::complex<float> type; enum {size=2, alignment=Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false}; typedef Packet2cf half; };\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pset1<Packet2cf>(const std::complex<float>&  from)\n{\n  Packet2cf res;\n  if((std::ptrdiff_t(&from) % 16) == 0)\n    res.v = pload<Packet4f>((const float *)&from);\n  else\n    res.v = ploadu<Packet4f>((const float *)&from);\n  res.v = vec_perm(res.v, res.v, p16uc_PSET64_HI);\n  return res;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pload<Packet2cf>(const std::complex<float>*        from) { return Packet2cf(pload<Packet4f>((const float *) from)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cf ploadu<Packet2cf>(const std::complex<float>*       from) { return Packet2cf(ploadu<Packet4f>((const float*) from)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cf ploaddup<Packet2cf>(const std::complex<float>*     from) { return pset1<Packet2cf>(*from); }\n\ntemplate<> EIGEN_STRONG_INLINE void pstore <std::complex<float> >(std::complex<float> *   to, const Packet2cf& from) { pstore((float*)to, from.v); }\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<std::complex<float> >(std::complex<float> *   to, const Packet2cf& from) { pstoreu((float*)to, from.v); }\n\ntemplate<> EIGEN_DEVICE_FUNC inline Packet2cf pgather<std::complex<float>, Packet2cf>(const std::complex<float>* from, Index stride)\n{\n  EIGEN_ALIGN16 std::complex<float> af[2];\n  af[0] = from[0*stride];\n  af[1] = from[1*stride];\n  return pload<Packet2cf>(af);\n}\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<std::complex<float>, Packet2cf>(std::complex<float>* to, const Packet2cf& from, Index stride)\n{\n  EIGEN_ALIGN16 std::complex<float> af[2];\n  pstore<std::complex<float> >((std::complex<float> *) af, from);\n  to[0*stride] = af[0];\n  to[1*stride] = af[1];\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cf padd<Packet2cf>(const Packet2cf& a, const Packet2cf& b) { return Packet2cf(a.v + b.v); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cf psub<Packet2cf>(const Packet2cf& a, const Packet2cf& b) { return Packet2cf(a.v - b.v); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pnegate(const Packet2cf& a) { return Packet2cf(pnegate(a.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pconj(const Packet2cf& a) { return Packet2cf(pxor<Packet4f>(a.v, reinterpret_cast<Packet4f>(p4ui_CONJ_XOR))); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pmul<Packet2cf>(const Packet2cf& a, const Packet2cf& b)\n{\n  Packet4f v1, v2;\n\n  // Permute and multiply the real parts of a and b\n  v1 = vec_perm(a.v, a.v, p16uc_PSET32_WODD);\n  // Get the imaginary parts of a\n  v2 = vec_perm(a.v, a.v, p16uc_PSET32_WEVEN);\n  // multiply a_re * b \n  v1 = vec_madd(v1, b.v, p4f_ZERO);\n  // multiply a_im * b and get the conjugate result\n  v2 = vec_madd(v2, b.v, p4f_ZERO);\n  v2 = reinterpret_cast<Packet4f>(pxor(v2, reinterpret_cast<Packet4f>(p4ui_CONJ_XOR)));\n  // permute back to a proper order\n  v2 = vec_perm(v2, v2, p16uc_COMPLEX32_REV);\n  \n  return Packet2cf(padd<Packet4f>(v1, v2));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pand   <Packet2cf>(const Packet2cf& a, const Packet2cf& b) { return Packet2cf(pand<Packet4f>(a.v, b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cf por    <Packet2cf>(const Packet2cf& a, const Packet2cf& b) { return Packet2cf(por<Packet4f>(a.v, b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pxor   <Packet2cf>(const Packet2cf& a, const Packet2cf& b) { return Packet2cf(pxor<Packet4f>(a.v, b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pandnot<Packet2cf>(const Packet2cf& a, const Packet2cf& b) { return Packet2cf(pandnot<Packet4f>(a.v, b.v)); }\n\ntemplate<> EIGEN_STRONG_INLINE void prefetch<std::complex<float> >(const std::complex<float> * addr)    { EIGEN_PPC_PREFETCH(addr); }\n\ntemplate<> EIGEN_STRONG_INLINE std::complex<float>  pfirst<Packet2cf>(const Packet2cf& a)\n{\n  EIGEN_ALIGN16 std::complex<float> res[2];\n  pstore((float *)&res, a.v);\n\n  return res[0];\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cf preverse(const Packet2cf& a)\n{\n  Packet4f rev_a;\n  rev_a = vec_perm(a.v, a.v, p16uc_COMPLEX32_REV2);\n  return Packet2cf(rev_a);\n}\n\ntemplate<> EIGEN_STRONG_INLINE std::complex<float> predux<Packet2cf>(const Packet2cf& a)\n{\n  Packet4f b;\n  b = vec_sld(a.v, a.v, 8);\n  b = padd<Packet4f>(a.v, b);\n  return pfirst<Packet2cf>(Packet2cf(b));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cf preduxp<Packet2cf>(const Packet2cf* vecs)\n{\n  Packet4f b1, b2;\n#ifdef _BIG_ENDIAN  \n  b1 = vec_sld(vecs[0].v, vecs[1].v, 8);\n  b2 = vec_sld(vecs[1].v, vecs[0].v, 8);\n#else\n  b1 = vec_sld(vecs[1].v, vecs[0].v, 8);\n  b2 = vec_sld(vecs[0].v, vecs[1].v, 8);\n#endif\n  b2 = vec_sld(b2, b2, 8);\n  b2 = padd<Packet4f>(b1, b2);\n\n  return Packet2cf(b2);\n}\n\ntemplate<> EIGEN_STRONG_INLINE std::complex<float> predux_mul<Packet2cf>(const Packet2cf& a)\n{\n  Packet4f b;\n  Packet2cf prod;\n  b = vec_sld(a.v, a.v, 8);\n  prod = pmul<Packet2cf>(a, Packet2cf(b));\n\n  return pfirst<Packet2cf>(prod);\n}\n\ntemplate<int Offset>\nstruct palign_impl<Offset,Packet2cf>\n{\n  static EIGEN_STRONG_INLINE void run(Packet2cf& first, const Packet2cf& second)\n  {\n    if (Offset==1)\n    {\n#ifdef _BIG_ENDIAN\n      first.v = vec_sld(first.v, second.v, 8);\n#else\n      first.v = vec_sld(second.v, first.v, 8);\n#endif\n    }\n  }\n};\n\ntemplate<> struct conj_helper<Packet2cf, Packet2cf, false,true>\n{\n  EIGEN_STRONG_INLINE Packet2cf pmadd(const Packet2cf& x, const Packet2cf& y, const Packet2cf& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet2cf pmul(const Packet2cf& a, const Packet2cf& b) const\n  {\n    return internal::pmul(a, pconj(b));\n  }\n};\n\ntemplate<> struct conj_helper<Packet2cf, Packet2cf, true,false>\n{\n  EIGEN_STRONG_INLINE Packet2cf pmadd(const Packet2cf& x, const Packet2cf& y, const Packet2cf& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet2cf pmul(const Packet2cf& a, const Packet2cf& b) const\n  {\n    return internal::pmul(pconj(a), b);\n  }\n};\n\ntemplate<> struct conj_helper<Packet2cf, Packet2cf, true,true>\n{\n  EIGEN_STRONG_INLINE Packet2cf pmadd(const Packet2cf& x, const Packet2cf& y, const Packet2cf& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet2cf pmul(const Packet2cf& a, const Packet2cf& b) const\n  {\n    return pconj(internal::pmul(a, b));\n  }\n};\n\nEIGEN_MAKE_CONJ_HELPER_CPLX_REAL(Packet2cf,Packet4f)\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pdiv<Packet2cf>(const Packet2cf& a, const Packet2cf& b)\n{\n  // TODO optimize it for AltiVec\n  Packet2cf res = conj_helper<Packet2cf,Packet2cf,false,true>().pmul(a, b);\n  Packet4f s = pmul<Packet4f>(b.v, b.v);\n  return Packet2cf(pdiv(res.v, padd<Packet4f>(s, vec_perm(s, s, p16uc_COMPLEX32_REV))));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pcplxflip<Packet2cf>(const Packet2cf& x)\n{\n  return Packet2cf(vec_perm(x.v, x.v, p16uc_COMPLEX32_REV));\n}\n\nEIGEN_STRONG_INLINE void ptranspose(PacketBlock<Packet2cf,2>& kernel)\n{\n  Packet4f tmp = vec_perm(kernel.packet[0].v, kernel.packet[1].v, p16uc_TRANSPOSE64_HI);\n  kernel.packet[1].v = vec_perm(kernel.packet[0].v, kernel.packet[1].v, p16uc_TRANSPOSE64_LO);\n  kernel.packet[0].v = tmp;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pcmp_eq(const Packet2cf& a, const Packet2cf& b) {\n  Packet4f eq = reinterpret_cast<Packet4f>(vec_cmpeq(a.v,b.v));\n  return Packet2cf(vec_and(eq, vec_perm(eq, eq, p16uc_COMPLEX32_REV)));\n}\n\n#ifdef __VSX__\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pblend(const Selector<2>& ifPacket, const Packet2cf& thenPacket, const Packet2cf& elsePacket) {\n  Packet2cf result;\n  result.v = reinterpret_cast<Packet4f>(pblend<Packet2d>(ifPacket, reinterpret_cast<Packet2d>(thenPacket.v), reinterpret_cast<Packet2d>(elsePacket.v)));\n  return result;\n}\n#endif\n\n//---------- double ----------\n#ifdef __VSX__\nstruct Packet1cd\n{\n  EIGEN_STRONG_INLINE Packet1cd() {}\n  EIGEN_STRONG_INLINE explicit Packet1cd(const Packet2d& a) : v(a) {}\n  Packet2d v;\n};\n\ntemplate<> struct packet_traits<std::complex<double> >  : default_packet_traits\n{\n  typedef Packet1cd type;\n  typedef Packet1cd half;\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 0,\n    size = 1,\n    HasHalfPacket = 0,\n\n    HasAdd    = 1,\n    HasSub    = 1,\n    HasMul    = 1,\n    HasDiv    = 1,\n    HasNegate = 1,\n    HasAbs    = 0,\n    HasAbs2   = 0,\n    HasMin    = 0,\n    HasMax    = 0,\n    HasSetLinear = 0\n  };\n};\n\ntemplate<> struct unpacket_traits<Packet1cd> { typedef std::complex<double> type; enum {size=1, alignment=Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false}; typedef Packet1cd half; };\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pload <Packet1cd>(const std::complex<double>* from) { return Packet1cd(pload<Packet2d>((const double*)from)); }\ntemplate<> EIGEN_STRONG_INLINE Packet1cd ploadu<Packet1cd>(const std::complex<double>* from) { return Packet1cd(ploadu<Packet2d>((const double*)from)); }\ntemplate<> EIGEN_STRONG_INLINE void pstore <std::complex<double> >(std::complex<double> *   to, const Packet1cd& from) { pstore((double*)to, from.v); }\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<std::complex<double> >(std::complex<double> *   to, const Packet1cd& from) { pstoreu((double*)to, from.v); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pset1<Packet1cd>(const std::complex<double>&  from)\n{ /* here we really have to use unaligned loads :( */ return ploadu<Packet1cd>(&from); }\n\ntemplate<> EIGEN_DEVICE_FUNC inline Packet1cd pgather<std::complex<double>, Packet1cd>(const std::complex<double>* from, Index stride)\n{\n  EIGEN_ALIGN16 std::complex<double> af[2];\n  af[0] = from[0*stride];\n  af[1] = from[1*stride];\n  return pload<Packet1cd>(af);\n}\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<std::complex<double>, Packet1cd>(std::complex<double>* to, const Packet1cd& from, Index stride)\n{\n  EIGEN_ALIGN16 std::complex<double> af[2];\n  pstore<std::complex<double> >(af, from);\n  to[0*stride] = af[0];\n  to[1*stride] = af[1];\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cd padd<Packet1cd>(const Packet1cd& a, const Packet1cd& b) { return Packet1cd(a.v + b.v); }\ntemplate<> EIGEN_STRONG_INLINE Packet1cd psub<Packet1cd>(const Packet1cd& a, const Packet1cd& b) { return Packet1cd(a.v - b.v); }\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pnegate(const Packet1cd& a) { return Packet1cd(pnegate(Packet2d(a.v))); }\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pconj(const Packet1cd& a) { return Packet1cd(pxor(a.v, reinterpret_cast<Packet2d>(p2ul_CONJ_XOR2))); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pmul<Packet1cd>(const Packet1cd& a, const Packet1cd& b)\n{\n  Packet2d a_re, a_im, v1, v2;\n\n  // Permute and multiply the real parts of a and b\n  a_re = vec_perm(a.v, a.v, p16uc_PSET64_HI);\n  // Get the imaginary parts of a\n  a_im = vec_perm(a.v, a.v, p16uc_PSET64_LO);\n  // multiply a_re * b\n  v1 = vec_madd(a_re, b.v, p2d_ZERO);\n  // multiply a_im * b and get the conjugate result\n  v2 = vec_madd(a_im, b.v, p2d_ZERO);\n  v2 = reinterpret_cast<Packet2d>(vec_sld(reinterpret_cast<Packet4ui>(v2), reinterpret_cast<Packet4ui>(v2), 8));\n  v2 = pxor(v2, reinterpret_cast<Packet2d>(p2ul_CONJ_XOR1));\n\n  return Packet1cd(padd<Packet2d>(v1, v2));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pand   <Packet1cd>(const Packet1cd& a, const Packet1cd& b) { return Packet1cd(pand(a.v,b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet1cd por    <Packet1cd>(const Packet1cd& a, const Packet1cd& b) { return Packet1cd(por(a.v,b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pxor   <Packet1cd>(const Packet1cd& a, const Packet1cd& b) { return Packet1cd(pxor(a.v,b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pandnot<Packet1cd>(const Packet1cd& a, const Packet1cd& b) { return Packet1cd(pandnot(a.v, b.v)); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cd ploaddup<Packet1cd>(const std::complex<double>*     from)  { return pset1<Packet1cd>(*from); }\n\ntemplate<> EIGEN_STRONG_INLINE void prefetch<std::complex<double> >(const std::complex<double> * addr)    { EIGEN_PPC_PREFETCH(addr); }\n\ntemplate<> EIGEN_STRONG_INLINE std::complex<double>  pfirst<Packet1cd>(const Packet1cd& a)\n{\n  EIGEN_ALIGN16 std::complex<double> res[2];\n  pstore<std::complex<double> >(res, a);\n\n  return res[0];\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cd preverse(const Packet1cd& a) { return a; }\n\ntemplate<> EIGEN_STRONG_INLINE std::complex<double> predux<Packet1cd>(const Packet1cd& a) { return pfirst(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet1cd preduxp<Packet1cd>(const Packet1cd* vecs)        { return vecs[0]; }\n\ntemplate<> EIGEN_STRONG_INLINE std::complex<double> predux_mul<Packet1cd>(const Packet1cd& a) { return pfirst(a); }\n\ntemplate<int Offset>\nstruct palign_impl<Offset,Packet1cd>\n{\n  static EIGEN_STRONG_INLINE void run(Packet1cd& /*first*/, const Packet1cd& /*second*/)\n  {\n    // FIXME is it sure we never have to align a Packet1cd?\n    // Even though a std::complex<double> has 16 bytes, it is not necessarily aligned on a 16 bytes boundary...\n  }\n};\n\ntemplate<> struct conj_helper<Packet1cd, Packet1cd, false,true>\n{\n  EIGEN_STRONG_INLINE Packet1cd pmadd(const Packet1cd& x, const Packet1cd& y, const Packet1cd& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet1cd pmul(const Packet1cd& a, const Packet1cd& b) const\n  {\n    return internal::pmul(a, pconj(b));\n  }\n};\n\ntemplate<> struct conj_helper<Packet1cd, Packet1cd, true,false>\n{\n  EIGEN_STRONG_INLINE Packet1cd pmadd(const Packet1cd& x, const Packet1cd& y, const Packet1cd& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet1cd pmul(const Packet1cd& a, const Packet1cd& b) const\n  {\n    return internal::pmul(pconj(a), b);\n  }\n};\n\ntemplate<> struct conj_helper<Packet1cd, Packet1cd, true,true>\n{\n  EIGEN_STRONG_INLINE Packet1cd pmadd(const Packet1cd& x, const Packet1cd& y, const Packet1cd& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet1cd pmul(const Packet1cd& a, const Packet1cd& b) const\n  {\n    return pconj(internal::pmul(a, b));\n  }\n};\n\nEIGEN_MAKE_CONJ_HELPER_CPLX_REAL(Packet1cd,Packet2d)\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pdiv<Packet1cd>(const Packet1cd& a, const Packet1cd& b)\n{\n  // TODO optimize it for AltiVec\n  Packet1cd res = conj_helper<Packet1cd,Packet1cd,false,true>().pmul(a,b);\n  Packet2d s = pmul<Packet2d>(b.v, b.v);\n  return Packet1cd(pdiv(res.v, padd<Packet2d>(s, vec_perm(s, s, p16uc_REVERSE64))));\n}\n\nEIGEN_STRONG_INLINE Packet1cd pcplxflip/*<Packet1cd>*/(const Packet1cd& x)\n{\n  return Packet1cd(preverse(Packet2d(x.v)));\n}\n\nEIGEN_STRONG_INLINE void ptranspose(PacketBlock<Packet1cd,2>& kernel)\n{\n  Packet2d tmp = vec_perm(kernel.packet[0].v, kernel.packet[1].v, p16uc_TRANSPOSE64_HI);\n  kernel.packet[1].v = vec_perm(kernel.packet[0].v, kernel.packet[1].v, p16uc_TRANSPOSE64_LO);\n  kernel.packet[0].v = tmp;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pcmp_eq(const Packet1cd& a, const Packet1cd& b) {\n  // Compare real and imaginary parts of a and b to get the mask vector:\n  // [re(a)==re(b), im(a)==im(b)]\n  Packet2d eq = reinterpret_cast<Packet2d>(vec_cmpeq(a.v,b.v));\n  // Swap real/imag elements in the mask in to get:\n  // [im(a)==im(b), re(a)==re(b)]\n  Packet2d eq_swapped = reinterpret_cast<Packet2d>(vec_sld(reinterpret_cast<Packet4ui>(eq), reinterpret_cast<Packet4ui>(eq), 8));\n  // Return re(a)==re(b) & im(a)==im(b) by computing bitwise AND of eq and eq_swapped\n  return Packet1cd(vec_and(eq, eq_swapped));\n}\n\n#endif // __VSX__\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_COMPLEX32_ALTIVEC_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/AltiVec/MathFunctions.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2007 Julien Pommier\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2016 Konstantinos Margaritis <markos@freevec.org>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_MATH_FUNCTIONS_ALTIVEC_H\n#define EIGEN_MATH_FUNCTIONS_ALTIVEC_H\n\nnamespace Eigen {\n\nnamespace internal {\n\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED\nPacket4f plog<Packet4f>(const Packet4f& _x)\n{\n  return plog_float(_x);\n}\n\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED\nPacket4f pexp<Packet4f>(const Packet4f& _x)\n{\n  return pexp_float(_x);\n}\n\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED\nPacket4f psin<Packet4f>(const Packet4f& _x)\n{\n  return psin_float(_x);\n}\n\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED\nPacket4f pcos<Packet4f>(const Packet4f& _x)\n{\n  return pcos_float(_x);\n}\n\n#ifndef EIGEN_COMP_CLANG\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED\nPacket4f prsqrt<Packet4f>(const Packet4f& x)\n{\n  return  vec_rsqrt(x);\n}\n#endif\n\n#ifdef __VSX__\n#ifndef EIGEN_COMP_CLANG\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED\nPacket2d prsqrt<Packet2d>(const Packet2d& x)\n{\n  return  vec_rsqrt(x);\n}\n#endif\n\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED\nPacket4f psqrt<Packet4f>(const Packet4f& x)\n{\n  return  vec_sqrt(x);\n}\n\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED\nPacket2d psqrt<Packet2d>(const Packet2d& x)\n{\n  return  vec_sqrt(x);\n}\n\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED\nPacket2d pexp<Packet2d>(const Packet2d& _x)\n{\n  return pexp_double(_x);\n}\n#endif\n\n// Hyperbolic Tangent function.\ntemplate <>\nEIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet4f\nptanh<Packet4f>(const Packet4f& x) {\n  return internal::generic_fast_tanh_float(x);\n}\n\n}  // end namespace internal\n\n}  // end namespace Eigen\n\n#endif  // EIGEN_MATH_FUNCTIONS_ALTIVEC_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/AltiVec/PacketMath.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2016 Konstantinos Margaritis <markos@freevec.org>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_PACKET_MATH_ALTIVEC_H\n#define EIGEN_PACKET_MATH_ALTIVEC_H\n\nnamespace Eigen {\n\nnamespace internal {\n\n#ifndef EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD\n#define EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 4\n#endif\n\n#ifndef EIGEN_HAS_SINGLE_INSTRUCTION_MADD\n#define EIGEN_HAS_SINGLE_INSTRUCTION_MADD\n#endif\n\n#ifndef EIGEN_HAS_SINGLE_INSTRUCTION_CJMADD\n#define EIGEN_HAS_SINGLE_INSTRUCTION_CJMADD\n#endif\n\n// NOTE Altivec has 32 registers, but Eigen only accepts a value of 8 or 16\n#ifndef EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS\n#define EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS  32\n#endif\n\ntypedef __vector float                   Packet4f;\ntypedef __vector int                     Packet4i;\ntypedef __vector unsigned int            Packet4ui;\ntypedef __vector __bool int              Packet4bi;\ntypedef __vector short int               Packet8s;\ntypedef __vector unsigned short int      Packet8us;\ntypedef __vector unsigned char           Packet16uc;\n\n// We don't want to write the same code all the time, but we need to reuse the constants\n// and it doesn't really work to declare them global, so we define macros instead\n\n#define _EIGEN_DECLARE_CONST_FAST_Packet4f(NAME,X) \\\n  Packet4f p4f_##NAME = {X, X, X, X}\n\n#define _EIGEN_DECLARE_CONST_FAST_Packet4i(NAME,X) \\\n  Packet4i p4i_##NAME = vec_splat_s32(X)\n\n#define _EIGEN_DECLARE_CONST_FAST_Packet4ui(NAME,X) \\\n  Packet4ui p4ui_##NAME = {X, X, X, X}\n\n#define _EIGEN_DECLARE_CONST_FAST_Packet8us(NAME,X) \\\n  Packet8us p8us_##NAME = {X, X, X, X, X, X, X, X}\n\n#define _EIGEN_DECLARE_CONST_Packet4f(NAME,X) \\\n  Packet4f p4f_##NAME = pset1<Packet4f>(X)\n\n#define _EIGEN_DECLARE_CONST_Packet4i(NAME,X) \\\n  Packet4i p4i_##NAME = pset1<Packet4i>(X)\n\n#define _EIGEN_DECLARE_CONST_Packet2d(NAME,X) \\\n  Packet2d p2d_##NAME = pset1<Packet2d>(X)\n\n#define _EIGEN_DECLARE_CONST_Packet2l(NAME,X) \\\n  Packet2l p2l_##NAME = pset1<Packet2l>(X)\n\n#define _EIGEN_DECLARE_CONST_Packet4f_FROM_INT(NAME,X) \\\n  const Packet4f p4f_##NAME = reinterpret_cast<Packet4f>(pset1<Packet4i>(X))\n\n#define DST_CHAN 1\n#define DST_CTRL(size, count, stride) (((size) << 24) | ((count) << 16) | (stride))\n\n// These constants are endian-agnostic\nstatic _EIGEN_DECLARE_CONST_FAST_Packet4f(ZERO, 0); //{ 0.0, 0.0, 0.0, 0.0}\nstatic _EIGEN_DECLARE_CONST_FAST_Packet4i(ZERO, 0); //{ 0, 0, 0, 0,}\nstatic _EIGEN_DECLARE_CONST_FAST_Packet4i(ONE,1); //{ 1, 1, 1, 1}\nstatic _EIGEN_DECLARE_CONST_FAST_Packet4i(MINUS16,-16); //{ -16, -16, -16, -16}\nstatic _EIGEN_DECLARE_CONST_FAST_Packet4i(MINUS1,-1); //{ -1, -1, -1, -1}\nstatic _EIGEN_DECLARE_CONST_FAST_Packet4ui(SIGN, 0x80000000u);\nstatic _EIGEN_DECLARE_CONST_FAST_Packet4ui(PREV0DOT5, 0x3EFFFFFFu);\nstatic _EIGEN_DECLARE_CONST_FAST_Packet8us(ONE,1); //{ 1, 1, 1, 1, 1, 1, 1, 1}\nstatic Packet4f p4f_MZERO = (Packet4f) vec_sl((Packet4ui)p4i_MINUS1, (Packet4ui)p4i_MINUS1); //{ 0x80000000, 0x80000000, 0x80000000, 0x80000000}\n#ifndef __VSX__\nstatic Packet4f p4f_ONE = vec_ctf(p4i_ONE, 0); //{ 1.0, 1.0, 1.0, 1.0}\n#endif\n\nstatic Packet4f  p4f_COUNTDOWN  = { 0.0, 1.0, 2.0, 3.0 };\nstatic Packet4i  p4i_COUNTDOWN  = { 0, 1, 2, 3 };\nstatic Packet8s  p8s_COUNTDOWN  = { 0, 1, 2, 3, 4, 5, 6, 7 };\nstatic Packet8us p8us_COUNTDOWN = { 0, 1, 2, 3, 4, 5, 6, 7 };\n\nstatic Packet16uc p16uc_REVERSE32 = { 12,13,14,15, 8,9,10,11, 4,5,6,7, 0,1,2,3 };\nstatic Packet16uc p16uc_REVERSE16 = { 14,15, 12,13, 10,11, 8,9, 6,7, 4,5, 2,3, 0,1 };\nstatic Packet16uc p16uc_DUPLICATE32_HI = { 0,1,2,3, 0,1,2,3, 4,5,6,7, 4,5,6,7 };\nstatic Packet16uc p16uc_DUPLICATE16_HI = { 0,1,0,1, 2,3,2,3, 4,5,4,5, 6,7,6,7 };\nstatic Packet16uc p16uc_QUADRUPLICATE16_HI = { 0,1,0,1,0,1,0,1, 2,3,2,3,2,3,2,3 };\n\n// Handle endianness properly while loading constants\n// Define global static constants:\n#ifdef _BIG_ENDIAN\nstatic Packet16uc p16uc_FORWARD = vec_lvsl(0, (float*)0);\n#ifdef __VSX__\nstatic Packet16uc p16uc_REVERSE64 = { 8,9,10,11, 12,13,14,15, 0,1,2,3, 4,5,6,7 };\n#endif\nstatic Packet16uc p16uc_PSET32_WODD   = vec_sld((Packet16uc) vec_splat((Packet4ui)p16uc_FORWARD, 0), (Packet16uc) vec_splat((Packet4ui)p16uc_FORWARD, 2), 8);//{ 0,1,2,3, 0,1,2,3, 8,9,10,11, 8,9,10,11 };\nstatic Packet16uc p16uc_PSET32_WEVEN  = vec_sld(p16uc_DUPLICATE32_HI, (Packet16uc) vec_splat((Packet4ui)p16uc_FORWARD, 3), 8);//{ 4,5,6,7, 4,5,6,7, 12,13,14,15, 12,13,14,15 };\nstatic Packet16uc p16uc_HALF64_0_16 = vec_sld((Packet16uc)p4i_ZERO, vec_splat((Packet16uc) vec_abs(p4i_MINUS16), 3), 8);      //{ 0,0,0,0, 0,0,0,0, 16,16,16,16, 16,16,16,16};\n#else\nstatic Packet16uc p16uc_FORWARD = p16uc_REVERSE32;\nstatic Packet16uc p16uc_REVERSE64 = { 8,9,10,11, 12,13,14,15, 0,1,2,3, 4,5,6,7 };\nstatic Packet16uc p16uc_PSET32_WODD = vec_sld((Packet16uc) vec_splat((Packet4ui)p16uc_FORWARD, 1), (Packet16uc) vec_splat((Packet4ui)p16uc_FORWARD, 3), 8);//{ 0,1,2,3, 0,1,2,3, 8,9,10,11, 8,9,10,11 };\nstatic Packet16uc p16uc_PSET32_WEVEN = vec_sld((Packet16uc) vec_splat((Packet4ui)p16uc_FORWARD, 0), (Packet16uc) vec_splat((Packet4ui)p16uc_FORWARD, 2), 8);//{ 4,5,6,7, 4,5,6,7, 12,13,14,15, 12,13,14,15 };\nstatic Packet16uc p16uc_HALF64_0_16 = vec_sld(vec_splat((Packet16uc) vec_abs(p4i_MINUS16), 0), (Packet16uc)p4i_ZERO, 8);      //{ 0,0,0,0, 0,0,0,0, 16,16,16,16, 16,16,16,16};\n#endif // _BIG_ENDIAN\n\nstatic Packet16uc p16uc_PSET64_HI = (Packet16uc) vec_mergeh((Packet4ui)p16uc_PSET32_WODD, (Packet4ui)p16uc_PSET32_WEVEN);     //{ 0,1,2,3, 4,5,6,7, 0,1,2,3, 4,5,6,7 };\nstatic Packet16uc p16uc_PSET64_LO = (Packet16uc) vec_mergel((Packet4ui)p16uc_PSET32_WODD, (Packet4ui)p16uc_PSET32_WEVEN);     //{ 8,9,10,11, 12,13,14,15, 8,9,10,11, 12,13,14,15 };\nstatic Packet16uc p16uc_TRANSPOSE64_HI = p16uc_PSET64_HI + p16uc_HALF64_0_16;                                         //{ 0,1,2,3, 4,5,6,7, 16,17,18,19, 20,21,22,23};\nstatic Packet16uc p16uc_TRANSPOSE64_LO = p16uc_PSET64_LO + p16uc_HALF64_0_16;                                         //{ 8,9,10,11, 12,13,14,15, 24,25,26,27, 28,29,30,31};\n\nstatic Packet16uc p16uc_COMPLEX32_REV = vec_sld(p16uc_REVERSE32, p16uc_REVERSE32, 8);                                         //{ 4,5,6,7, 0,1,2,3, 12,13,14,15, 8,9,10,11 };\n\n#ifdef _BIG_ENDIAN\nstatic Packet16uc p16uc_COMPLEX32_REV2 = vec_sld(p16uc_FORWARD, p16uc_FORWARD, 8);                                            //{ 8,9,10,11, 12,13,14,15, 0,1,2,3, 4,5,6,7 };\n#else\nstatic Packet16uc p16uc_COMPLEX32_REV2 = vec_sld(p16uc_PSET64_HI, p16uc_PSET64_LO, 8);                                            //{ 8,9,10,11, 12,13,14,15, 0,1,2,3, 4,5,6,7 };\n#endif // _BIG_ENDIAN\n\n#if EIGEN_HAS_BUILTIN(__builtin_prefetch) || EIGEN_COMP_GNUC\n  #define EIGEN_PPC_PREFETCH(ADDR) __builtin_prefetch(ADDR);\n#else\n  #define EIGEN_PPC_PREFETCH(ADDR) asm( \"   dcbt [%[addr]]\\n\" :: [addr] \"r\" (ADDR) : \"cc\" );\n#endif\n\ntemplate <>\nstruct packet_traits<float> : default_packet_traits {\n  typedef Packet4f type;\n  typedef Packet4f half;\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size = 4,\n    HasHalfPacket = 1,\n\n    HasAdd = 1,\n    HasSub = 1,\n    HasMul = 1,\n    HasDiv = 1,\n    HasMin = 1,\n    HasMax = 1,\n    HasAbs = 1,\n    HasSin = EIGEN_FAST_MATH,\n    HasCos = EIGEN_FAST_MATH,\n    HasLog = 1,\n    HasExp = 1,\n#ifdef __VSX__\n    HasSqrt = 1,\n#if !EIGEN_COMP_CLANG\n    HasRsqrt = 1,\n#else\n    HasRsqrt = 0,\n#endif\n#else\n    HasSqrt = 0,\n    HasRsqrt = 0,\n    HasTanh = EIGEN_FAST_MATH,\n    HasErf = EIGEN_FAST_MATH,\n#endif\n    HasRound = 1,\n    HasFloor = 1,\n    HasCeil = 1,\n    HasNegate = 1,\n    HasBlend = 1\n  };\n};\ntemplate <>\nstruct packet_traits<int> : default_packet_traits {\n  typedef Packet4i type;\n  typedef Packet4i half;\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size = 4,\n    HasHalfPacket = 0,\n\n    HasAdd   = 1,\n    HasSub   = 1,\n    HasShift = 1,\n    HasMul   = 1,\n    HasDiv   = 0,\n    HasBlend = 1\n  };\n};\n\ntemplate <>\nstruct packet_traits<short int> : default_packet_traits {\n  typedef Packet8s type;\n  typedef Packet8s half;\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size = 8,\n    HasHalfPacket = 0,\n\n    HasAdd  = 1,\n    HasSub  = 1,\n    HasMul  = 1,\n    HasDiv  = 0,\n    HasBlend = 1\n  };\n};\n\ntemplate <>\nstruct packet_traits<unsigned short int> : default_packet_traits {\n  typedef Packet8us type;\n  typedef Packet8us half;\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size = 8,\n    HasHalfPacket = 0,\n\n    HasAdd  = 1,\n    HasSub  = 1,\n    HasMul  = 1,\n    HasDiv  = 0,\n    HasBlend = 1\n  };\n};\n\ntemplate<> struct unpacket_traits<Packet4f>\n{\n  typedef float     type;\n  typedef Packet4f  half;\n  typedef Packet4i  integer_packet;\n  enum {size=4, alignment=Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false};\n};\ntemplate<> struct unpacket_traits<Packet4i>\n{\n  typedef int       type;\n  typedef Packet4i  half;\n  enum {size=4, alignment=Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false};\n};\ntemplate<> struct unpacket_traits<Packet8s>\n{\n  typedef short int type;\n  typedef Packet8s  half;\n  enum {size=8, alignment=Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false};\n};\ntemplate<> struct unpacket_traits<Packet8us>\n{\n  typedef unsigned short int type;\n  typedef Packet8us          half;\n  enum {size=8, alignment=Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false};\n};\ninline std::ostream & operator <<(std::ostream & s, const Packet16uc & v)\n{\n  union {\n    Packet16uc   v;\n    unsigned char n[16];\n  } vt;\n  vt.v = v;\n  for (int i=0; i< 16; i++)\n    s << (int)vt.n[i] << \", \";\n  return s;\n}\n\ninline std::ostream & operator <<(std::ostream & s, const Packet4f & v)\n{\n  union {\n    Packet4f   v;\n    float n[4];\n  } vt;\n  vt.v = v;\n  s << vt.n[0] << \", \" << vt.n[1] << \", \" << vt.n[2] << \", \" << vt.n[3];\n  return s;\n}\n\ninline std::ostream & operator <<(std::ostream & s, const Packet4i & v)\n{\n  union {\n    Packet4i   v;\n    int n[4];\n  } vt;\n  vt.v = v;\n  s << vt.n[0] << \", \" << vt.n[1] << \", \" << vt.n[2] << \", \" << vt.n[3];\n  return s;\n}\n\ninline std::ostream & operator <<(std::ostream & s, const Packet4ui & v)\n{\n  union {\n    Packet4ui   v;\n    unsigned int n[4];\n  } vt;\n  vt.v = v;\n  s << vt.n[0] << \", \" << vt.n[1] << \", \" << vt.n[2] << \", \" << vt.n[3];\n  return s;\n}\n\n// Need to define them first or we get specialization after instantiation errors\ntemplate<> EIGEN_STRONG_INLINE Packet4f pload<Packet4f>(const float* from)\n{\n  // some versions of GCC throw \"unused-but-set-parameter\".\n  // ignoring these warnings for now.\n  EIGEN_UNUSED_VARIABLE(from);\n  EIGEN_DEBUG_ALIGNED_LOAD\n#ifdef __VSX__\n  return vec_xl(0, from);\n#else\n  return vec_ld(0, from);\n#endif\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4i pload<Packet4i>(const int*     from)\n{\n  // some versions of GCC throw \"unused-but-set-parameter\".\n  // ignoring these warnings for now.\n  EIGEN_UNUSED_VARIABLE(from);\n  EIGEN_DEBUG_ALIGNED_LOAD\n#ifdef __VSX__\n  return vec_xl(0, from);\n#else\n  return vec_ld(0, from);\n#endif\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8s pload<Packet8s>(const short int* from)\n{\n  // some versions of GCC throw \"unused-but-set-parameter\".\n  // ignoring these warnings for now.\n  EIGEN_UNUSED_VARIABLE(from);\n  EIGEN_DEBUG_ALIGNED_LOAD\n  return vec_ld(0, from);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8us pload<Packet8us>(const unsigned short int* from)\n{\n  // some versions of GCC throw \"unused-but-set-parameter\".\n  // ignoring these warnings for now.\n  EIGEN_UNUSED_VARIABLE(from);\n  EIGEN_DEBUG_ALIGNED_LOAD\n  return vec_ld(0, from);\n}\n\ntemplate<> EIGEN_STRONG_INLINE void pstore<float>(float*   to, const Packet4f& from)\n{\n  // some versions of GCC throw \"unused-but-set-parameter\" (float *to).\n  // ignoring these warnings for now.\n  EIGEN_UNUSED_VARIABLE(to);\n  EIGEN_DEBUG_ALIGNED_STORE\n#ifdef __VSX__\n  vec_xst(from, 0, to);\n#else\n  vec_st(from, 0, to);\n#endif\n}\n\ntemplate<> EIGEN_STRONG_INLINE void pstore<int>(int*       to, const Packet4i& from)\n{\n  // some versions of GCC throw \"unused-but-set-parameter\" (float *to).\n  // ignoring these warnings for now.\n  EIGEN_UNUSED_VARIABLE(to);\n  EIGEN_DEBUG_ALIGNED_STORE\n#ifdef __VSX__\n  vec_xst(from, 0, to);\n#else\n  vec_st(from, 0, to);\n#endif\n}\n\ntemplate<> EIGEN_STRONG_INLINE void pstore<short int>(short int*       to, const Packet8s& from)\n{\n  // some versions of GCC throw \"unused-but-set-parameter\" (float *to).\n  // ignoring these warnings for now.\n  EIGEN_UNUSED_VARIABLE(to);\n  EIGEN_DEBUG_ALIGNED_STORE\n  vec_st(from, 0, to);\n}\n\ntemplate<> EIGEN_STRONG_INLINE void pstore<unsigned short int>(unsigned short int*       to, const Packet8us& from)\n{\n  // some versions of GCC throw \"unused-but-set-parameter\" (float *to).\n  // ignoring these warnings for now.\n  EIGEN_UNUSED_VARIABLE(to);\n  EIGEN_DEBUG_ALIGNED_STORE\n  vec_st(from, 0, to);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pset1<Packet4f>(const float&  from) {\n  Packet4f v = {from, from, from, from};\n  return v;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4i pset1<Packet4i>(const int&    from)   {\n  Packet4i v = {from, from, from, from};\n  return v;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8s pset1<Packet8s>(const short int&    from)   {\n  Packet8s v = {from, from, from, from, from, from, from, from};\n  return v;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8us pset1<Packet8us>(const unsigned short int&    from)   {\n  Packet8us v = {from, from, from, from, from, from, from, from};\n  return v;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pset1frombits<Packet4f>(unsigned int from) {\n  return reinterpret_cast<Packet4f>(pset1<Packet4i>(from));\n}\n\ntemplate<> EIGEN_STRONG_INLINE void\npbroadcast4<Packet4f>(const float *a,\n                      Packet4f& a0, Packet4f& a1, Packet4f& a2, Packet4f& a3)\n{\n  a3 = pload<Packet4f>(a);\n  a0 = vec_splat(a3, 0);\n  a1 = vec_splat(a3, 1);\n  a2 = vec_splat(a3, 2);\n  a3 = vec_splat(a3, 3);\n}\ntemplate<> EIGEN_STRONG_INLINE void\npbroadcast4<Packet4i>(const int *a,\n                      Packet4i& a0, Packet4i& a1, Packet4i& a2, Packet4i& a3)\n{\n  a3 = pload<Packet4i>(a);\n  a0 = vec_splat(a3, 0);\n  a1 = vec_splat(a3, 1);\n  a2 = vec_splat(a3, 2);\n  a3 = vec_splat(a3, 3);\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline Packet4f pgather<float, Packet4f>(const float* from, Index stride)\n{\n  EIGEN_ALIGN16 float af[4];\n  af[0] = from[0*stride];\n  af[1] = from[1*stride];\n  af[2] = from[2*stride];\n  af[3] = from[3*stride];\n return pload<Packet4f>(af);\n}\ntemplate<> EIGEN_DEVICE_FUNC inline Packet4i pgather<int, Packet4i>(const int* from, Index stride)\n{\n  EIGEN_ALIGN16 int ai[4];\n  ai[0] = from[0*stride];\n  ai[1] = from[1*stride];\n  ai[2] = from[2*stride];\n  ai[3] = from[3*stride];\n return pload<Packet4i>(ai);\n}\ntemplate<> EIGEN_DEVICE_FUNC inline Packet8s pgather<short int, Packet8s>(const short int* from, Index stride)\n{\n  EIGEN_ALIGN16 short int ai[8];\n  ai[0] = from[0*stride];\n  ai[1] = from[1*stride];\n  ai[2] = from[2*stride];\n  ai[3] = from[3*stride];\n  ai[4] = from[4*stride];\n  ai[5] = from[5*stride];\n  ai[6] = from[6*stride];\n  ai[7] = from[7*stride];\n  return pload<Packet8s>(ai);\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline Packet8us pgather<unsigned short int, Packet8us>(const unsigned short int* from, Index stride)\n{\n  EIGEN_ALIGN16 unsigned short int ai[8];\n  ai[0] = from[0*stride];\n  ai[1] = from[1*stride];\n  ai[2] = from[2*stride];\n  ai[3] = from[3*stride];\n  ai[4] = from[4*stride];\n  ai[5] = from[5*stride];\n  ai[6] = from[6*stride];\n  ai[7] = from[7*stride];\n  return pload<Packet8us>(ai);\n}\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<float, Packet4f>(float* to, const Packet4f& from, Index stride)\n{\n  EIGEN_ALIGN16 float af[4];\n  pstore<float>(af, from);\n  to[0*stride] = af[0];\n  to[1*stride] = af[1];\n  to[2*stride] = af[2];\n  to[3*stride] = af[3];\n}\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<int, Packet4i>(int* to, const Packet4i& from, Index stride)\n{\n  EIGEN_ALIGN16 int ai[4];\n  pstore<int>((int *)ai, from);\n  to[0*stride] = ai[0];\n  to[1*stride] = ai[1];\n  to[2*stride] = ai[2];\n  to[3*stride] = ai[3];\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<short int, Packet8s>(short int* to, const Packet8s& from, Index stride)\n{\n  EIGEN_ALIGN16 short int ai[8];\n  pstore<short int>((short int *)ai, from);\n  to[0*stride] = ai[0];\n  to[1*stride] = ai[1];\n  to[2*stride] = ai[2];\n  to[3*stride] = ai[3];\n  to[4*stride] = ai[4];\n  to[5*stride] = ai[5];\n  to[6*stride] = ai[6];\n  to[7*stride] = ai[7];\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<unsigned short int, Packet8us>(unsigned short int* to, const Packet8us& from, Index stride)\n{\n  EIGEN_ALIGN16 unsigned short int ai[8];\n  pstore<unsigned short int>((unsigned short int *)ai, from);\n  to[0*stride] = ai[0];\n  to[1*stride] = ai[1];\n  to[2*stride] = ai[2];\n  to[3*stride] = ai[3];\n  to[4*stride] = ai[4];\n  to[5*stride] = ai[5];\n  to[6*stride] = ai[6];\n  to[7*stride] = ai[7];\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f plset<Packet4f>(const float&     a) { return pset1<Packet4f>(a) + p4f_COUNTDOWN;  }\ntemplate<> EIGEN_STRONG_INLINE Packet4i plset<Packet4i>(const int&       a) { return pset1<Packet4i>(a) + p4i_COUNTDOWN;  }\ntemplate<> EIGEN_STRONG_INLINE Packet8s plset<Packet8s>(const short int& a) { return pset1<Packet8s>(a) + p8s_COUNTDOWN; }\ntemplate<> EIGEN_STRONG_INLINE Packet8us plset<Packet8us>(const unsigned short int& a) { return pset1<Packet8us>(a) + p8us_COUNTDOWN; }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f  padd<Packet4f> (const Packet4f&  a, const Packet4f&  b) { return a + b; }\ntemplate<> EIGEN_STRONG_INLINE Packet4i  padd<Packet4i> (const Packet4i&  a, const Packet4i&  b) { return a + b; }\ntemplate<> EIGEN_STRONG_INLINE Packet8s  padd<Packet8s> (const Packet8s&  a, const Packet8s&  b) { return a + b; }\ntemplate<> EIGEN_STRONG_INLINE Packet8us padd<Packet8us>(const Packet8us& a, const Packet8us& b) { return a + b; }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f psub<Packet4f>(const Packet4f& a, const Packet4f& b) { return a - b; }\ntemplate<> EIGEN_STRONG_INLINE Packet4i psub<Packet4i>(const Packet4i& a, const Packet4i& b) { return a - b; }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pnegate(const Packet4f& a) { return p4f_ZERO - a; }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pnegate(const Packet4i& a) { return p4i_ZERO - a; }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pconj(const Packet4f& a) { return a; }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pconj(const Packet4i& a) { return a; }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pmul<Packet4f>(const Packet4f& a, const Packet4f& b) { return vec_madd(a,b, p4f_MZERO); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pmul<Packet4i>(const Packet4i& a, const Packet4i& b) { return a * b; }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pdiv<Packet4f>(const Packet4f& a, const Packet4f& b)\n{\n#ifndef __VSX__  // VSX actually provides a div instruction\n  Packet4f t, y_0, y_1;\n\n  // Altivec does not offer a divide instruction, we have to do a reciprocal approximation\n  y_0 = vec_re(b);\n\n  // Do one Newton-Raphson iteration to get the needed accuracy\n  t   = vec_nmsub(y_0, b, p4f_ONE);\n  y_1 = vec_madd(y_0, t, y_0);\n\n  return vec_madd(a, y_1, p4f_MZERO);\n#else\n  return vec_div(a, b);\n#endif\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4i pdiv<Packet4i>(const Packet4i& /*a*/, const Packet4i& /*b*/)\n{ eigen_assert(false && \"packet integer division are not supported by AltiVec\");\n  return pset1<Packet4i>(0);\n}\n\n// for some weird raisons, it has to be overloaded for packet of integers\ntemplate<> EIGEN_STRONG_INLINE Packet4f pmadd(const Packet4f& a, const Packet4f& b, const Packet4f& c) { return vec_madd(a,b,c); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pmadd(const Packet4i& a, const Packet4i& b, const Packet4i& c) { return a*b + c; }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pmin<Packet4f>(const Packet4f& a, const Packet4f& b)\n{\n  #ifdef __VSX__\n  // NOTE: about 10% slower than vec_min, but consistent with std::min and SSE regarding NaN\n  Packet4f ret;\n  __asm__ (\"xvcmpgesp %x0,%x1,%x2\\n\\txxsel %x0,%x1,%x2,%x0\" : \"=&wa\" (ret) : \"wa\" (a), \"wa\" (b));\n  return ret;\n  #else\n  return vec_min(a, b);\n  #endif\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4i pmin<Packet4i>(const Packet4i& a, const Packet4i& b) { return vec_min(a, b); }\ntemplate<> EIGEN_STRONG_INLINE Packet8s pmin<Packet8s>(const Packet8s& a, const Packet8s& b) { return vec_min(a, b); }\ntemplate<> EIGEN_STRONG_INLINE Packet8us pmin<Packet8us>(const Packet8us& a, const Packet8us& b) { return vec_min(a, b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pmax<Packet4f>(const Packet4f& a, const Packet4f& b)\n{\n  #ifdef __VSX__\n  // NOTE: about 10% slower than vec_max, but consistent with std::max and SSE regarding NaN\n  Packet4f ret;\n  __asm__ (\"xvcmpgtsp %x0,%x2,%x1\\n\\txxsel %x0,%x1,%x2,%x0\" : \"=&wa\" (ret) : \"wa\" (a), \"wa\" (b));\n  return ret;\n  #else\n  return vec_max(a, b);\n  #endif\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4i pmax<Packet4i>(const Packet4i& a, const Packet4i& b) { return vec_max(a, b); }\ntemplate<> EIGEN_STRONG_INLINE Packet8s pmax<Packet8s>(const Packet8s& a, const Packet8s& b) { return vec_max(a, b); }\ntemplate<> EIGEN_STRONG_INLINE Packet8us pmax<Packet8us>(const Packet8us& a, const Packet8us& b) { return vec_max(a, b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pcmp_le(const Packet4f& a, const Packet4f& b) { return reinterpret_cast<Packet4f>(vec_cmple(a,b)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pcmp_lt(const Packet4f& a, const Packet4f& b) { return reinterpret_cast<Packet4f>(vec_cmplt(a,b)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pcmp_eq(const Packet4f& a, const Packet4f& b) { return reinterpret_cast<Packet4f>(vec_cmpeq(a,b)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pcmp_lt_or_nan(const Packet4f& a, const Packet4f& b) {\n  Packet4f c = reinterpret_cast<Packet4f>(vec_cmpge(a,b));\n  return vec_nor(c,c);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4i pcmp_eq(const Packet4i& a, const Packet4i& b) { return reinterpret_cast<Packet4i>(vec_cmpeq(a,b)); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pand<Packet4f>(const Packet4f& a, const Packet4f& b) { return vec_and(a, b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pand<Packet4i>(const Packet4i& a, const Packet4i& b) { return vec_and(a, b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f por<Packet4f>(const Packet4f& a, const Packet4f& b) { return vec_or(a, b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i por<Packet4i>(const Packet4i& a, const Packet4i& b) { return vec_or(a, b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pxor<Packet4f>(const Packet4f& a, const Packet4f& b) { return vec_xor(a, b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pxor<Packet4i>(const Packet4i& a, const Packet4i& b) { return vec_xor(a, b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pandnot<Packet4f>(const Packet4f& a, const Packet4f& b) { return vec_and(a, vec_nor(b, b)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pandnot<Packet4i>(const Packet4i& a, const Packet4i& b) { return vec_and(a, vec_nor(b, b)); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pselect(const Packet4f& mask, const Packet4f& a, const Packet4f& b) {\n  return vec_sel(b, a, reinterpret_cast<Packet4ui>(mask));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4f pround<Packet4f>(const Packet4f& a) {\n    Packet4f t = vec_add(reinterpret_cast<Packet4f>(vec_or(vec_and(reinterpret_cast<Packet4ui>(a), p4ui_SIGN), p4ui_PREV0DOT5)), a);\n    Packet4f res;\n\n    __asm__(\"vrfiz %0, %1\\n\\t\"\n        : \"=v\" (res)\n        : \"v\" (t));\n\n    return res;\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4f pceil<Packet4f>(const  Packet4f& a) { return vec_ceil(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pfloor<Packet4f>(const Packet4f& a) { return vec_floor(a); }\n\n#ifdef _BIG_ENDIAN\ntemplate<> EIGEN_STRONG_INLINE Packet4f ploadu<Packet4f>(const float* from)\n{\n  EIGEN_DEBUG_ALIGNED_LOAD\n  Packet16uc MSQ, LSQ;\n  Packet16uc mask;\n  MSQ = vec_ld(0, (unsigned char *)from);          // most significant quadword\n  LSQ = vec_ld(15, (unsigned char *)from);         // least significant quadword\n  mask = vec_lvsl(0, from);                        // create the permute mask\n  return (Packet4f) vec_perm(MSQ, LSQ, mask);           // align the data\n\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4i ploadu<Packet4i>(const int* from)\n{\n  EIGEN_DEBUG_ALIGNED_LOAD\n  // Taken from http://developer.apple.com/hardwaredrivers/ve/alignment.html\n  Packet16uc MSQ, LSQ;\n  Packet16uc mask;\n  MSQ = vec_ld(0, (unsigned char *)from);          // most significant quadword\n  LSQ = vec_ld(15, (unsigned char *)from);         // least significant quadword\n  mask = vec_lvsl(0, from);                        // create the permute mask\n  return (Packet4i) vec_perm(MSQ, LSQ, mask);    // align the data\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8s ploadu<Packet8s>(const short int* from)\n{\n  EIGEN_DEBUG_ALIGNED_LOAD\n  // Taken from http://developer.apple.com/hardwaredrivers/ve/alignment.html\n  Packet16uc MSQ, LSQ;\n  Packet16uc mask;\n  MSQ = vec_ld(0, (unsigned char *)from);          // most significant quadword\n  LSQ = vec_ld(15, (unsigned char *)from);         // least significant quadword\n  mask = vec_lvsl(0, from);                        // create the permute mask\n  return static_cast<Packet8s>(vec_perm(MSQ, LSQ, mask));    // align the data\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8us ploadu<Packet8us>(const unsigned short int* from)\n{\n  EIGEN_DEBUG_ALIGNED_LOAD\n  // Taken from http://developer.apple.com/hardwaredrivers/ve/alignment.html\n  Packet16uc MSQ, LSQ;\n  Packet16uc mask;\n  MSQ = vec_ld(0, (unsigned char *)from);          // most significant quadword\n  LSQ = vec_ld(15, (unsigned char *)from);         // least significant quadword\n  mask = vec_lvsl(0, from);                        // create the permute mask\n  return static_cast<Packet8us>(vec_perm(MSQ, LSQ, mask));    // align the data\n}\n#else\n// We also need to redefine little endian loading of Packet4i/Packet4f using VSX\ntemplate<> EIGEN_STRONG_INLINE Packet4i ploadu<Packet4i>(const int* from)\n{\n  EIGEN_DEBUG_UNALIGNED_LOAD\n  return vec_xl(0, from);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4f ploadu<Packet4f>(const float* from)\n{\n  EIGEN_DEBUG_UNALIGNED_LOAD\n  return vec_xl(0, from);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8s ploadu<Packet8s>(const short int* from)\n{\n  EIGEN_DEBUG_UNALIGNED_LOAD\n  return vec_vsx_ld(0, from);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8us ploadu<Packet8us>(const unsigned short int* from)\n{\n  EIGEN_DEBUG_UNALIGNED_LOAD\n  return vec_vsx_ld(0, from);\n}\n#endif\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f ploaddup<Packet4f>(const float*   from)\n{\n  Packet4f p;\n  if((std::ptrdiff_t(from) % 16) == 0)  p = pload<Packet4f>(from);\n  else                                  p = ploadu<Packet4f>(from);\n  return vec_perm(p, p, p16uc_DUPLICATE32_HI);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4i ploaddup<Packet4i>(const int*     from)\n{\n  Packet4i p;\n  if((std::ptrdiff_t(from) % 16) == 0)  p = pload<Packet4i>(from);\n  else                                  p = ploadu<Packet4i>(from);\n  return vec_perm(p, p, p16uc_DUPLICATE32_HI);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8s ploaddup<Packet8s>(const short int*     from)\n{\n  Packet8s p;\n  if((std::ptrdiff_t(from) % 16) == 0)  p = pload<Packet8s>(from);\n  else                                  p = ploadu<Packet8s>(from);\n  return vec_perm(p, p, p16uc_DUPLICATE16_HI);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8us ploaddup<Packet8us>(const unsigned short int*     from)\n{\n  Packet8us p;\n  if((std::ptrdiff_t(from) % 16) == 0)  p = pload<Packet8us>(from);\n  else                                  p = ploadu<Packet8us>(from);\n  return vec_perm(p, p, p16uc_DUPLICATE16_HI);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8s ploadquad<Packet8s>(const short int*     from)\n{\n  Packet8s p;\n  if((std::ptrdiff_t(from) % 16) == 0)  p = pload<Packet8s>(from);\n  else                                  p = ploadu<Packet8s>(from);\n  return vec_perm(p, p, p16uc_QUADRUPLICATE16_HI);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8us ploadquad<Packet8us>(const unsigned short int*     from)\n{\n  Packet8us p;\n  if((std::ptrdiff_t(from) % 16) == 0)  p = pload<Packet8us>(from);\n  else                                  p = ploadu<Packet8us>(from);\n  return vec_perm(p, p, p16uc_QUADRUPLICATE16_HI);\n}\n\n#ifdef _BIG_ENDIAN\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<float>(float*  to, const Packet4f& from)\n{\n  EIGEN_DEBUG_UNALIGNED_STORE\n  // Taken from http://developer.apple.com/hardwaredrivers/ve/alignment.html\n  // Warning: not thread safe!\n  Packet16uc MSQ, LSQ, edges;\n  Packet16uc edgeAlign, align;\n\n  MSQ = vec_ld(0, (unsigned char *)to);                     // most significant quadword\n  LSQ = vec_ld(15, (unsigned char *)to);                    // least significant quadword\n  edgeAlign = vec_lvsl(0, to);                              // permute map to extract edges\n  edges=vec_perm(LSQ,MSQ,edgeAlign);                        // extract the edges\n  align = vec_lvsr( 0, to );                                // permute map to misalign data\n  MSQ = vec_perm(edges,(Packet16uc)from,align);             // misalign the data (MSQ)\n  LSQ = vec_perm((Packet16uc)from,edges,align);             // misalign the data (LSQ)\n  vec_st( LSQ, 15, (unsigned char *)to );                   // Store the LSQ part first\n  vec_st( MSQ, 0, (unsigned char *)to );                    // Store the MSQ part\n}\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<int>(int*      to, const Packet4i& from)\n{\n  EIGEN_DEBUG_UNALIGNED_STORE\n  // Taken from http://developer.apple.com/hardwaredrivers/ve/alignment.html\n  // Warning: not thread safe!\n  Packet16uc MSQ, LSQ, edges;\n  Packet16uc edgeAlign, align;\n\n  MSQ = vec_ld(0, (unsigned char *)to);                     // most significant quadword\n  LSQ = vec_ld(15, (unsigned char *)to);                    // least significant quadword\n  edgeAlign = vec_lvsl(0, to);                              // permute map to extract edges\n  edges=vec_perm(LSQ, MSQ, edgeAlign);                      // extract the edges\n  align = vec_lvsr( 0, to );                                // permute map to misalign data\n  MSQ = vec_perm(edges, (Packet16uc) from, align);          // misalign the data (MSQ)\n  LSQ = vec_perm((Packet16uc) from, edges, align);          // misalign the data (LSQ)\n  vec_st( LSQ, 15, (unsigned char *)to );                   // Store the LSQ part first\n  vec_st( MSQ, 0, (unsigned char *)to );                    // Store the MSQ part\n}\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<short int>(short int*      to, const Packet8s& from)\n{\n  EIGEN_DEBUG_UNALIGNED_STORE\n  // Taken from http://developer.apple.com/hardwaredrivers/ve/alignment.html\n  // Warning: not thread safe!\n  Packet16uc MSQ, LSQ, edges;\n  Packet16uc edgeAlign, align;\n\n  MSQ = vec_ld(0, (unsigned char *)to);                     // most significant quadword\n  LSQ = vec_ld(15, (unsigned char *)to);                    // least significant quadword\n  edgeAlign = vec_lvsl(0, to);                              // permute map to extract edges\n  edges = vec_perm(LSQ, MSQ, edgeAlign);                      // extract the edges\n  align = vec_lvsr( 0, to );                                // permute map to misalign data\n  MSQ = vec_perm(edges, (Packet16uc) from, align);          // misalign the data (MSQ)\n  LSQ = vec_perm((Packet16uc) from, edges, align);          // misalign the data (LSQ)\n  vec_st( LSQ, 15, (unsigned char *)to );                   // Store the LSQ part first\n  vec_st( MSQ, 0, (unsigned char *)to );                    // Store the MSQ part\n}\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<unsigned short int>(unsigned short int*      to, const Packet8us& from)\n{\n  EIGEN_DEBUG_UNALIGNED_STORE\n  // Taken from http://developer.apple.com/hardwaredrivers/ve/alignment.html\n  // Warning: not thread safe!\n  Packet16uc MSQ, LSQ, edges;\n  Packet16uc edgeAlign, align;\n\n  MSQ = vec_ld(0, (unsigned char *)to);                     // most significant quadword\n  LSQ = vec_ld(15, (unsigned char *)to);                    // least significant quadword\n  edgeAlign = vec_lvsl(0, to);                              // permute map to extract edges\n  edges = vec_perm(LSQ, MSQ, edgeAlign);                      // extract the edges\n  align = vec_lvsr( 0, to );                                // permute map to misalign data\n  MSQ = vec_perm(edges, (Packet16uc) from, align);          // misalign the data (MSQ)\n  LSQ = vec_perm((Packet16uc) from, edges, align);          // misalign the data (LSQ)\n  vec_st( LSQ, 15, (unsigned char *)to );                   // Store the LSQ part first\n  vec_st( MSQ, 0, (unsigned char *)to );                    // Store the MSQ part\n}\n#else\n// We also need to redefine little endian loading of Packet4i/Packet4f using VSX\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<int>(int*       to, const Packet4i& from)\n{\n  EIGEN_DEBUG_UNALIGNED_STORE\n  vec_xst(from, 0, to);\n}\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<short int>(short int*       to, const Packet8s& from)\n{\n  EIGEN_DEBUG_UNALIGNED_STORE\n  /*GCC provides a commonly used synonym for vec_xst called vec_vsx_st.\n   * Although these have the same behavior,\n   *  only vec_xst is guaranteed to be portable across compliant compilers\n   *  vec_xst should be preferred. */\n  vec_xst(from, 0, to);\n}\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<unsigned short int>(unsigned short int*       to, const Packet8us& from)\n{\n  EIGEN_DEBUG_UNALIGNED_STORE\n  /*GCC provides a commonly used synonym for vec_xst called vec_vsx_st.\n   * Although these have the same behavior,\n   *  only vec_xst is guaranteed to be portable across compliant compilers\n   *  vec_xst should be preferred. */\n  vec_xst(from, 0, to);\n}\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<float>(float*   to, const Packet4f& from)\n{\n  EIGEN_DEBUG_UNALIGNED_STORE\n  vec_xst(from, 0, to);\n}\n#endif\n\ntemplate<> EIGEN_STRONG_INLINE void prefetch<float>(const float* addr)    { EIGEN_PPC_PREFETCH(addr); }\ntemplate<> EIGEN_STRONG_INLINE void prefetch<int>(const int*     addr)    { EIGEN_PPC_PREFETCH(addr); }\n\ntemplate<> EIGEN_STRONG_INLINE float  pfirst<Packet4f>(const Packet4f& a) { EIGEN_ALIGN16 float x; vec_ste(a, 0, &x); return x; }\ntemplate<> EIGEN_STRONG_INLINE int    pfirst<Packet4i>(const Packet4i& a) { EIGEN_ALIGN16 int   x; vec_ste(a, 0, &x); return x; }\n\ntemplate<> EIGEN_STRONG_INLINE short int pfirst<Packet8s>(const Packet8s& a) { \n\tEIGEN_ALIGN16 short int x;\n       \tvec_ste(a, 0, &x);\n       \treturn x;\n}\n\ntemplate<> EIGEN_STRONG_INLINE unsigned short int pfirst<Packet8us>(const Packet8us& a) { \n\tEIGEN_ALIGN16 unsigned short int x;\n       \tvec_ste(a, 0, &x);\n       \treturn x;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f preverse(const Packet4f& a)\n{\n  return reinterpret_cast<Packet4f>(vec_perm(reinterpret_cast<Packet16uc>(a), reinterpret_cast<Packet16uc>(a), p16uc_REVERSE32));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4i preverse(const Packet4i& a)\n{\n  return reinterpret_cast<Packet4i>(vec_perm(reinterpret_cast<Packet16uc>(a), reinterpret_cast<Packet16uc>(a), p16uc_REVERSE32));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8s preverse(const Packet8s& a)\n{\n  return reinterpret_cast<Packet8s>(vec_perm(reinterpret_cast<Packet16uc>(a), reinterpret_cast<Packet16uc>(a), p16uc_REVERSE16));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8us preverse(const Packet8us& a)\n{\n  return reinterpret_cast<Packet8us>(vec_perm(reinterpret_cast<Packet16uc>(a), reinterpret_cast<Packet16uc>(a), p16uc_REVERSE16));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pabs(const Packet4f& a) { return vec_abs(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pabs(const Packet4i& a) { return vec_abs(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet8s pabs(const Packet8s& a) { return vec_abs(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet8us pabs(const Packet8us& a) { return a; }\n\ntemplate<int N> EIGEN_STRONG_INLINE Packet4i parithmetic_shift_right(Packet4i a)\n{ return vec_sra(a,reinterpret_cast<Packet4ui>(pset1<Packet4i>(N))); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet4i plogical_shift_right(Packet4i a)\n{ return vec_sr(a,reinterpret_cast<Packet4ui>(pset1<Packet4i>(N))); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet4i plogical_shift_left(Packet4i a)\n{ return vec_sl(a,reinterpret_cast<Packet4ui>(pset1<Packet4i>(N))); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pfrexp<Packet4f>(const Packet4f& a, Packet4f& exponent) {\n  return pfrexp_float(a,exponent);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pldexp<Packet4f>(const Packet4f& a, const Packet4f& exponent) {\n  return pldexp_float(a,exponent);\n}\n\ntemplate<> EIGEN_STRONG_INLINE float predux<Packet4f>(const Packet4f& a)\n{\n  Packet4f b, sum;\n  b   = vec_sld(a, a, 8);\n  sum = a + b;\n  b   = vec_sld(sum, sum, 4);\n  sum += b;\n  return pfirst(sum);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f preduxp<Packet4f>(const Packet4f* vecs)\n{\n  Packet4f v[4], sum[4];\n\n  // It's easier and faster to transpose then add as columns\n  // Check: http://www.freevec.org/function/matrix_4x4_transpose_floats for explanation\n  // Do the transpose, first set of moves\n  v[0] = vec_mergeh(vecs[0], vecs[2]);\n  v[1] = vec_mergel(vecs[0], vecs[2]);\n  v[2] = vec_mergeh(vecs[1], vecs[3]);\n  v[3] = vec_mergel(vecs[1], vecs[3]);\n  // Get the resulting vectors\n  sum[0] = vec_mergeh(v[0], v[2]);\n  sum[1] = vec_mergel(v[0], v[2]);\n  sum[2] = vec_mergeh(v[1], v[3]);\n  sum[3] = vec_mergel(v[1], v[3]);\n\n  // Now do the summation:\n  // Lines 0+1\n  sum[0] = sum[0] + sum[1];\n  // Lines 2+3\n  sum[1] = sum[2] + sum[3];\n  // Add the results\n  sum[0] = sum[0] + sum[1];\n\n  return sum[0];\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8s preduxp<Packet8s>(const Packet8s* vecs)\n{\n  Packet8s step1[8], step2[8], step3[8];\n\n  step1[0] = vec_mergeh(vecs[0], vecs[4]);\n  step1[1] = vec_mergel(vecs[0], vecs[4]);\n  step1[2] = vec_mergeh(vecs[1], vecs[5]);\n  step1[3] = vec_mergel(vecs[1], vecs[5]);\n  step1[4] = vec_mergeh(vecs[2], vecs[6]);\n  step1[5] = vec_mergel(vecs[2], vecs[6]);\n  step1[6] = vec_mergeh(vecs[3], vecs[7]);\n  step1[7] = vec_mergel(vecs[3], vecs[7]);\n\n  step2[0] = vec_mergeh(step1[0], step1[4]);\n  step2[1] = vec_mergel(step1[0], step1[4]);\n  step2[2] = vec_mergeh(step1[1], step1[5]);\n  step2[3] = vec_mergel(step1[1], step1[5]);\n  step2[4] = vec_mergeh(step1[2], step1[6]);\n  step2[5] = vec_mergel(step1[2], step1[6]);\n  step2[6] = vec_mergeh(step1[3], step1[7]);\n  step2[7] = vec_mergel(step1[3], step1[7]);\n\n  step3[0] = vec_mergeh(step2[0], step2[4]);\n  step3[1] = vec_mergel(step2[0], step2[4]);\n  step3[2] = vec_mergeh(step2[1], step2[5]);\n  step3[3] = vec_mergel(step2[1], step2[5]);\n  step3[4] = vec_mergeh(step2[2], step2[6]);\n  step3[5] = vec_mergel(step2[2], step2[6]);\n  step3[6] = vec_mergeh(step2[3], step2[7]);\n  step3[7] = vec_mergel(step2[3], step2[7]);\n\n  step3[0] += step3[1] + step3[2] + step3[3] + step3[4] + step3[5] + step3[6] + step3[7];\n  \n  return step3[0];\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8us preduxp<Packet8us>(const Packet8us* vecs)\n{\n  Packet8us step1[8], step2[8], step3[8];\n\n  step1[0] = vec_mergeh(vecs[0], vecs[4]);\n  step1[1] = vec_mergel(vecs[0], vecs[4]);\n  step1[2] = vec_mergeh(vecs[1], vecs[5]);\n  step1[3] = vec_mergel(vecs[1], vecs[5]);\n  step1[4] = vec_mergeh(vecs[2], vecs[6]);\n  step1[5] = vec_mergel(vecs[2], vecs[6]);\n  step1[6] = vec_mergeh(vecs[3], vecs[7]);\n  step1[7] = vec_mergel(vecs[3], vecs[7]);\n\n  step2[0] = vec_mergeh(step1[0], step1[4]);\n  step2[1] = vec_mergel(step1[0], step1[4]);\n  step2[2] = vec_mergeh(step1[1], step1[5]);\n  step2[3] = vec_mergel(step1[1], step1[5]);\n  step2[4] = vec_mergeh(step1[2], step1[6]);\n  step2[5] = vec_mergel(step1[2], step1[6]);\n  step2[6] = vec_mergeh(step1[3], step1[7]);\n  step2[7] = vec_mergel(step1[3], step1[7]);\n\n  step3[0] = vec_mergeh(step2[0], step2[4]);\n  step3[1] = vec_mergel(step2[0], step2[4]);\n  step3[2] = vec_mergeh(step2[1], step2[5]);\n  step3[3] = vec_mergel(step2[1], step2[5]);\n  step3[4] = vec_mergeh(step2[2], step2[6]);\n  step3[5] = vec_mergel(step2[2], step2[6]);\n  step3[6] = vec_mergeh(step2[3], step2[7]);\n  step3[7] = vec_mergel(step2[3], step2[7]);\n\n  step3[0] += step3[1] + step3[2] + step3[3] + step3[4] + step3[5] + step3[6] + step3[7];\n  \n  return step3[0];\n}\n\ntemplate<> EIGEN_STRONG_INLINE int predux<Packet4i>(const Packet4i& a)\n{\n  Packet4i sum;\n  sum = vec_sums(a, p4i_ZERO);\n#ifdef _BIG_ENDIAN\n  sum = vec_sld(sum, p4i_ZERO, 12);\n#else\n  sum = vec_sld(p4i_ZERO, sum, 4);\n#endif\n  return pfirst(sum);\n}\n\ntemplate<> EIGEN_STRONG_INLINE short int predux<Packet8s>(const Packet8s& a)\n{\n  union{\n    Packet8s v;\n    short int n[8];\n  } vt;\n  vt.v = a;\n\n  EIGEN_ALIGN16 int  first_loader[4] = { vt.n[0], vt.n[1], vt.n[2], vt.n[3] };\n  EIGEN_ALIGN16 int second_loader[4] = { vt.n[4], vt.n[5], vt.n[6], vt.n[7] };\n  Packet4i first_half  = pload<Packet4i>(first_loader);\n  Packet4i second_half = pload<Packet4i>(second_loader);\n\n  return static_cast<short int>(predux(first_half) + predux(second_half));\n}\n\ntemplate<> EIGEN_STRONG_INLINE unsigned short int predux<Packet8us>(const Packet8us& a)\n{\n  union{\n    Packet8us v;\n    unsigned short int n[8];\n  } vt;\n  vt.v = a;\n\n  //There is no predux for Packet4ui. So we are intentionally using int\n  EIGEN_ALIGN16 int first_loader[4]  = { vt.n[0], vt.n[1], vt.n[2], vt.n[3] };\n  EIGEN_ALIGN16 int second_loader[4] = { vt.n[4], vt.n[5], vt.n[6], vt.n[7] };\n  Packet4i first_half  = pload<Packet4i>(first_loader);\n  Packet4i second_half = pload<Packet4i>(second_loader);\n\n  return static_cast<unsigned short int>(predux(first_half) + predux(second_half));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4i preduxp<Packet4i>(const Packet4i* vecs)\n{\n  Packet4i v[4], sum[4];\n\n  // It's easier and faster to transpose then add as columns\n  // Check: http://www.freevec.org/function/matrix_4x4_transpose_floats for explanation\n  // Do the transpose, first set of moves\n  v[0] = vec_mergeh(vecs[0], vecs[2]);\n  v[1] = vec_mergel(vecs[0], vecs[2]);\n  v[2] = vec_mergeh(vecs[1], vecs[3]);\n  v[3] = vec_mergel(vecs[1], vecs[3]);\n  // Get the resulting vectors\n  sum[0] = vec_mergeh(v[0], v[2]);\n  sum[1] = vec_mergel(v[0], v[2]);\n  sum[2] = vec_mergeh(v[1], v[3]);\n  sum[3] = vec_mergel(v[1], v[3]);\n\n  // Now do the summation:\n  // Lines 0+1\n  sum[0] = sum[0] + sum[1];\n  // Lines 2+3\n  sum[1] = sum[2] + sum[3];\n  // Add the results\n  sum[0] = sum[0] + sum[1];\n\n  return sum[0];\n}\n\n// Other reduction functions:\n// mul\ntemplate<> EIGEN_STRONG_INLINE float predux_mul<Packet4f>(const Packet4f& a)\n{\n  Packet4f prod;\n  prod = pmul(a, vec_sld(a, a, 8));\n  return pfirst(pmul(prod, vec_sld(prod, prod, 4)));\n}\n\ntemplate<> EIGEN_STRONG_INLINE short int predux_mul<Packet8s>(const Packet8s& a)\n{\n  Packet8s pair, quad, octo;\n\n  pair = vec_mul(a, vec_sld(a, a, 8));\n  quad = vec_mul(pair, vec_sld(pair, pair, 4));\n  octo = vec_mul(quad, vec_sld(quad, quad, 2));\n\n  return pfirst(octo);\n}\n\ntemplate<> EIGEN_STRONG_INLINE unsigned short int predux_mul<Packet8us>(const Packet8us& a)\n{\n  Packet8us pair, quad, octo;\n\n  pair = vec_mul(a, vec_sld(a, a, 8));\n  quad = vec_mul(pair, vec_sld(pair, pair, 4));\n  octo = vec_mul(quad, vec_sld(quad, quad, 2));\n\n  return pfirst(octo);\n}\n\n\ntemplate<> EIGEN_STRONG_INLINE int predux_mul<Packet4i>(const Packet4i& a)\n{\n  EIGEN_ALIGN16 int aux[4];\n  pstore(aux, a);\n  return aux[0] * aux[1] * aux[2] * aux[3];\n}\n\n// min\ntemplate<> EIGEN_STRONG_INLINE float predux_min<Packet4f>(const Packet4f& a)\n{\n  Packet4f b, res;\n  b = vec_min(a, vec_sld(a, a, 8));\n  res = vec_min(b, vec_sld(b, b, 4));\n  return pfirst(res);\n}\n\ntemplate<> EIGEN_STRONG_INLINE int predux_min<Packet4i>(const Packet4i& a)\n{\n  Packet4i b, res;\n  b = vec_min(a, vec_sld(a, a, 8));\n  res = vec_min(b, vec_sld(b, b, 4));\n  return pfirst(res);\n}\n\ntemplate<> EIGEN_STRONG_INLINE short int predux_min<Packet8s>(const Packet8s& a)\n{\n  Packet8s pair, quad, octo;\n  \n  //pair = { Min(a0,a4), Min(a1,a5), Min(a2,a6), Min(a3,a7) }\n  pair = vec_min(a, vec_sld(a, a, 8)); \n\n  //quad = { Min(a0, a4, a2, a6), Min(a1, a5, a3, a7) }\n  quad = vec_min(pair, vec_sld(pair, pair, 4));\n\n  //octo = { Min(a0, a4, a2, a6, a1, a5, a3, a7) }\n  octo = vec_min(quad, vec_sld(quad, quad, 2));\n  return pfirst(octo);\n}\n\ntemplate<> EIGEN_STRONG_INLINE unsigned short int predux_min<Packet8us>(const Packet8us& a)\n{\n  Packet8us pair, quad, octo;\n  \n  //pair = { Min(a0,a4), Min(a1,a5), Min(a2,a6), Min(a3,a7) }\n  pair = vec_min(a, vec_sld(a, a, 8)); \n\n  //quad = { Min(a0, a4, a2, a6), Min(a1, a5, a3, a7) }\n  quad = vec_min(pair, vec_sld(pair, pair, 4));\n\n  //octo = { Min(a0, a4, a2, a6, a1, a5, a3, a7) }\n  octo = vec_min(quad, vec_sld(quad, quad, 2));\n  return pfirst(octo);\n}\n// max\ntemplate<> EIGEN_STRONG_INLINE float predux_max<Packet4f>(const Packet4f& a)\n{\n  Packet4f b, res;\n  b = vec_max(a, vec_sld(a, a, 8));\n  res = vec_max(b, vec_sld(b, b, 4));\n  return pfirst(res);\n}\n\ntemplate<> EIGEN_STRONG_INLINE int predux_max<Packet4i>(const Packet4i& a)\n{\n  Packet4i b, res;\n  b = vec_max(a, vec_sld(a, a, 8));\n  res = vec_max(b, vec_sld(b, b, 4));\n  return pfirst(res);\n}\n\ntemplate<> EIGEN_STRONG_INLINE short int predux_max<Packet8s>(const Packet8s& a)\n{\n  Packet8s pair, quad, octo;\n  \n  //pair = { Max(a0,a4), Max(a1,a5), Max(a2,a6), Max(a3,a7) }\n  pair = vec_max(a, vec_sld(a, a, 8)); \n\n  //quad = { Max(a0, a4, a2, a6), Max(a1, a5, a3, a7) }\n  quad = vec_max(pair, vec_sld(pair, pair, 4));\n\n  //octo = { Max(a0, a4, a2, a6, a1, a5, a3, a7) }\n  octo = vec_max(quad, vec_sld(quad, quad, 2));\n  return pfirst(octo);\n}\n\ntemplate<> EIGEN_STRONG_INLINE unsigned short int predux_max<Packet8us>(const Packet8us& a)\n{\n  Packet8us pair, quad, octo;\n  \n  //pair = { Max(a0,a4), Max(a1,a5), Max(a2,a6), Max(a3,a7) }\n  pair = vec_max(a, vec_sld(a, a, 8)); \n\n  //quad = { Max(a0, a4, a2, a6), Max(a1, a5, a3, a7) }\n  quad = vec_max(pair, vec_sld(pair, pair, 4));\n\n  //octo = { Max(a0, a4, a2, a6, a1, a5, a3, a7) }\n  octo = vec_max(quad, vec_sld(quad, quad, 2));\n  return pfirst(octo);\n}\n\ntemplate<> EIGEN_STRONG_INLINE bool predux_any(const Packet4f& x)\n{\n  return vec_any_ne(x, pzero(x));\n}\n\ntemplate<int Offset>\nstruct palign_impl<Offset,Packet4f>\n{\n  static EIGEN_STRONG_INLINE void run(Packet4f& first, const Packet4f& second)\n  {\n#ifdef _BIG_ENDIAN\n    switch (Offset % 4) {\n    case 1:\n      first = vec_sld(first, second, 4); break;\n    case 2:\n      first = vec_sld(first, second, 8); break;\n    case 3:\n      first = vec_sld(first, second, 12); break;\n    }\n#else\n    switch (Offset % 4) {\n    case 1:\n      first = vec_sld(second, first, 12); break;\n    case 2:\n      first = vec_sld(second, first, 8); break;\n    case 3:\n      first = vec_sld(second, first, 4); break;\n    }\n#endif\n  }\n};\n\ntemplate<int Offset>\nstruct palign_impl<Offset,Packet4i>\n{\n  static EIGEN_STRONG_INLINE void run(Packet4i& first, const Packet4i& second)\n  {\n#ifdef _BIG_ENDIAN\n    switch (Offset % 4) {\n    case 1:\n      first = vec_sld(first, second, 4); break;\n    case 2:\n      first = vec_sld(first, second, 8); break;\n    case 3:\n      first = vec_sld(first, second, 12); break;\n    }\n#else\n    switch (Offset % 4) {\n    case 1:\n      first = vec_sld(second, first, 12); break;\n    case 2:\n      first = vec_sld(second, first, 8); break;\n    case 3:\n      first = vec_sld(second, first, 4); break;\n    }\n#endif\n  }\n};\n\ntemplate<int Offset>\nstruct palign_impl<Offset,Packet8s>\n{\n  static EIGEN_STRONG_INLINE void run(Packet8s& first, const Packet8s& second)\n  {\n#ifdef _BIG_ENDIAN\n    switch (Offset % 8) {\n    case 1:\n      first = vec_sld(first, second, 2); break;\n    case 2:\n      first = vec_sld(first, second, 4); break;\n    case 3:\n      first = vec_sld(first, second, 6); break;\n    case 4:\n      first = vec_sld(first, second, 8); break;\n    case 5:\n      first = vec_sld(first, second, 10); break;\n    case 6:\n      first = vec_sld(first, second, 12); break;\n    case 7:\n      first = vec_sld(first, second, 14); break;\n    }\n#else\n    switch (Offset % 8) {\n    case 1:\n      first = vec_sld(second, first, 14); break;\n    case 2:\n      first = vec_sld(second, first, 12); break;\n    case 3:\n      first = vec_sld(second, first, 10); break;\n    case 4:\n      first = vec_sld(second, first, 8); break;\n    case 5:\n      first = vec_sld(second, first, 6); break;\n    case 6:\n      first = vec_sld(second, first, 4); break;\n    case 7:\n      first = vec_sld(second, first, 2); break;\n    }\n#endif\n  }\n};\n\ntemplate<int Offset>\nstruct palign_impl<Offset,Packet8us>\n{\n  static EIGEN_STRONG_INLINE void run(Packet8us& first, const Packet8us& second)\n  {\n#ifdef _BIG_ENDIAN\n    switch (Offset % 8) {\n    case 1:\n      first = vec_sld(first, second, 2); break;\n    case 2:\n      first = vec_sld(first, second, 4); break;\n    case 3:\n      first = vec_sld(first, second, 6); break;\n    case 4:\n      first = vec_sld(first, second, 8); break;\n    case 5:\n      first = vec_sld(first, second, 10); break;\n    case 6:\n      first = vec_sld(first, second, 12); break;\n    case 7:\n      first = vec_sld(first, second, 14); break;\n    }\n#else\n    switch (Offset % 8) {\n    case 1:\n      first = vec_sld(second, first, 14); break;\n    case 2:\n      first = vec_sld(second, first, 12); break;\n    case 3:\n      first = vec_sld(second, first, 10); break;\n    case 4:\n      first = vec_sld(second, first, 8); break;\n    case 5:\n      first = vec_sld(second, first, 6); break;\n    case 6:\n      first = vec_sld(second, first, 4); break;\n    case 7:\n      first = vec_sld(second, first, 2); break;\n    }\n#endif\n  }\n};\n\nEIGEN_DEVICE_FUNC inline void\nptranspose(PacketBlock<Packet4f,4>& kernel) {\n  Packet4f t0, t1, t2, t3;\n  t0 = vec_mergeh(kernel.packet[0], kernel.packet[2]);\n  t1 = vec_mergel(kernel.packet[0], kernel.packet[2]);\n  t2 = vec_mergeh(kernel.packet[1], kernel.packet[3]);\n  t3 = vec_mergel(kernel.packet[1], kernel.packet[3]);\n  kernel.packet[0] = vec_mergeh(t0, t2);\n  kernel.packet[1] = vec_mergel(t0, t2);\n  kernel.packet[2] = vec_mergeh(t1, t3);\n  kernel.packet[3] = vec_mergel(t1, t3);\n}\n\nEIGEN_DEVICE_FUNC inline void\nptranspose(PacketBlock<Packet4i,4>& kernel) {\n  Packet4i t0, t1, t2, t3;\n  t0 = vec_mergeh(kernel.packet[0], kernel.packet[2]);\n  t1 = vec_mergel(kernel.packet[0], kernel.packet[2]);\n  t2 = vec_mergeh(kernel.packet[1], kernel.packet[3]);\n  t3 = vec_mergel(kernel.packet[1], kernel.packet[3]);\n  kernel.packet[0] = vec_mergeh(t0, t2);\n  kernel.packet[1] = vec_mergel(t0, t2);\n  kernel.packet[2] = vec_mergeh(t1, t3);\n  kernel.packet[3] = vec_mergel(t1, t3);\n}\n\nEIGEN_DEVICE_FUNC inline void\nptranspose(PacketBlock<Packet8s,4>& kernel) {\n  Packet8s t0, t1, t2, t3;\n  t0 = vec_mergeh(kernel.packet[0], kernel.packet[2]);\n  t1 = vec_mergel(kernel.packet[0], kernel.packet[2]);\n  t2 = vec_mergeh(kernel.packet[1], kernel.packet[3]);\n  t3 = vec_mergel(kernel.packet[1], kernel.packet[3]);\n  kernel.packet[0] = vec_mergeh(t0, t2);\n  kernel.packet[1] = vec_mergel(t0, t2);\n  kernel.packet[2] = vec_mergeh(t1, t3);\n  kernel.packet[3] = vec_mergel(t1, t3);\n}\n\nEIGEN_DEVICE_FUNC inline void\nptranspose(PacketBlock<Packet8us,4>& kernel) {\n  Packet8us t0, t1, t2, t3;\n  t0 = vec_mergeh(kernel.packet[0], kernel.packet[2]);\n  t1 = vec_mergel(kernel.packet[0], kernel.packet[2]);\n  t2 = vec_mergeh(kernel.packet[1], kernel.packet[3]);\n  t3 = vec_mergel(kernel.packet[1], kernel.packet[3]);\n  kernel.packet[0] = vec_mergeh(t0, t2);\n  kernel.packet[1] = vec_mergel(t0, t2);\n  kernel.packet[2] = vec_mergeh(t1, t3);\n  kernel.packet[3] = vec_mergel(t1, t3);\n}\n\nEIGEN_DEVICE_FUNC inline void\nptranspose(PacketBlock<Packet8s,8>& kernel) {\n  Packet8s v[8], sum[8];\n\n  v[0] = vec_mergeh(kernel.packet[0], kernel.packet[4]);\n  v[1] = vec_mergel(kernel.packet[0], kernel.packet[4]);\n  v[2] = vec_mergeh(kernel.packet[1], kernel.packet[5]);\n  v[3] = vec_mergel(kernel.packet[1], kernel.packet[5]);\n  v[4] = vec_mergeh(kernel.packet[2], kernel.packet[6]);\n  v[5] = vec_mergel(kernel.packet[2], kernel.packet[6]);\n  v[6] = vec_mergeh(kernel.packet[3], kernel.packet[7]);\n  v[7] = vec_mergel(kernel.packet[3], kernel.packet[7]);\n  sum[0] = vec_mergeh(v[0], v[4]);\n  sum[1] = vec_mergel(v[0], v[4]);\n  sum[2] = vec_mergeh(v[1], v[5]);\n  sum[3] = vec_mergel(v[1], v[5]);\n  sum[4] = vec_mergeh(v[2], v[6]);\n  sum[5] = vec_mergel(v[2], v[6]);\n  sum[6] = vec_mergeh(v[3], v[7]);\n  sum[7] = vec_mergel(v[3], v[7]);\n\n  kernel.packet[0] = vec_mergeh(sum[0], sum[4]);\n  kernel.packet[1] = vec_mergel(sum[0], sum[4]);\n  kernel.packet[2] = vec_mergeh(sum[1], sum[5]);\n  kernel.packet[3] = vec_mergel(sum[1], sum[5]);\n  kernel.packet[4] = vec_mergeh(sum[2], sum[6]);\n  kernel.packet[5] = vec_mergel(sum[2], sum[6]);\n  kernel.packet[6] = vec_mergeh(sum[3], sum[7]);\n  kernel.packet[7] = vec_mergel(sum[3], sum[7]);\n}\n\nEIGEN_DEVICE_FUNC inline void\nptranspose(PacketBlock<Packet8us,8>& kernel) {\n  Packet8us v[8], sum[8];\n\n  v[0] = vec_mergeh(kernel.packet[0], kernel.packet[4]);\n  v[1] = vec_mergel(kernel.packet[0], kernel.packet[4]);\n  v[2] = vec_mergeh(kernel.packet[1], kernel.packet[5]);\n  v[3] = vec_mergel(kernel.packet[1], kernel.packet[5]);\n  v[4] = vec_mergeh(kernel.packet[2], kernel.packet[6]);\n  v[5] = vec_mergel(kernel.packet[2], kernel.packet[6]);\n  v[6] = vec_mergeh(kernel.packet[3], kernel.packet[7]);\n  v[7] = vec_mergel(kernel.packet[3], kernel.packet[7]);\n  sum[0] = vec_mergeh(v[0], v[4]);\n  sum[1] = vec_mergel(v[0], v[4]);\n  sum[2] = vec_mergeh(v[1], v[5]);\n  sum[3] = vec_mergel(v[1], v[5]);\n  sum[4] = vec_mergeh(v[2], v[6]);\n  sum[5] = vec_mergel(v[2], v[6]);\n  sum[6] = vec_mergeh(v[3], v[7]);\n  sum[7] = vec_mergel(v[3], v[7]);\n\n  kernel.packet[0] = vec_mergeh(sum[0], sum[4]);\n  kernel.packet[1] = vec_mergel(sum[0], sum[4]);\n  kernel.packet[2] = vec_mergeh(sum[1], sum[5]);\n  kernel.packet[3] = vec_mergel(sum[1], sum[5]);\n  kernel.packet[4] = vec_mergeh(sum[2], sum[6]);\n  kernel.packet[5] = vec_mergel(sum[2], sum[6]);\n  kernel.packet[6] = vec_mergeh(sum[3], sum[7]);\n  kernel.packet[7] = vec_mergel(sum[3], sum[7]);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4i pblend(const Selector<4>& ifPacket, const Packet4i& thenPacket, const Packet4i& elsePacket) {\n  Packet4ui select = { ifPacket.select[0], ifPacket.select[1], ifPacket.select[2], ifPacket.select[3] };\n  Packet4ui mask = reinterpret_cast<Packet4ui>(vec_cmpeq(reinterpret_cast<Packet4ui>(select), reinterpret_cast<Packet4ui>(p4i_ONE)));\n  return vec_sel(elsePacket, thenPacket, mask);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pblend(const Selector<4>& ifPacket, const Packet4f& thenPacket, const Packet4f& elsePacket) {\n  Packet4ui select = { ifPacket.select[0], ifPacket.select[1], ifPacket.select[2], ifPacket.select[3] };\n  Packet4ui mask = reinterpret_cast<Packet4ui>(vec_cmpeq(reinterpret_cast<Packet4ui>(select), reinterpret_cast<Packet4ui>(p4i_ONE)));\n  return vec_sel(elsePacket, thenPacket, mask);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8s pblend(const Selector<8>& ifPacket, const Packet8s& thenPacket, const Packet8s& elsePacket) {\n  Packet8us select = { ifPacket.select[0], ifPacket.select[1], ifPacket.select[2], ifPacket.select[3],\n                       ifPacket.select[4], ifPacket.select[5], ifPacket.select[6], ifPacket.select[7] };\n  Packet8us mask = reinterpret_cast<Packet8us>(vec_cmpeq(select, p8us_ONE));\n  Packet8s result = vec_sel(elsePacket, thenPacket, mask);\n  return result;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet8us pblend(const Selector<8>& ifPacket, const Packet8us& thenPacket, const Packet8us& elsePacket) {\n  Packet8us select = { ifPacket.select[0], ifPacket.select[1], ifPacket.select[2], ifPacket.select[3],\n                       ifPacket.select[4], ifPacket.select[5], ifPacket.select[6], ifPacket.select[7] };\n  Packet8us mask = reinterpret_cast<Packet8us>(vec_cmpeq(reinterpret_cast<Packet8us>(select), p8us_ONE));\n  return vec_sel(elsePacket, thenPacket, mask);\n}\n\ntemplate <>\nstruct type_casting_traits<float, int> {\n  enum {\n    VectorizedCast = 1,\n    SrcCoeffRatio = 1,\n    TgtCoeffRatio = 1\n  };\n};\n\ntemplate <>\nstruct type_casting_traits<int, float> {\n  enum {\n    VectorizedCast = 1,\n    SrcCoeffRatio = 1,\n    TgtCoeffRatio = 1\n  };\n};\n\n\ntemplate<> EIGEN_STRONG_INLINE Packet4i pcast<Packet4f, Packet4i>(const Packet4f& a) {\n  return vec_cts(a,0);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pcast<Packet4i, Packet4f>(const Packet4i& a) {\n  return vec_ctf(a,0);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4i preinterpret<Packet4i,Packet4f>(const Packet4f& a) {\n  return reinterpret_cast<Packet4i>(a);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f preinterpret<Packet4f,Packet4i>(const Packet4i& a) {\n  return reinterpret_cast<Packet4f>(a);\n}\n\n\n\n//---------- double ----------\n#ifdef __VSX__\ntypedef __vector double              Packet2d;\ntypedef __vector unsigned long long  Packet2ul;\ntypedef __vector long long           Packet2l;\n#if EIGEN_COMP_CLANG\ntypedef Packet2ul                    Packet2bl;\n#else\ntypedef __vector __bool long         Packet2bl;\n#endif\n\nstatic Packet2l  p2l_ONE  = { 1, 1 };\nstatic Packet2l  p2l_ZERO = reinterpret_cast<Packet2l>(p4i_ZERO);\nstatic Packet2d  p2d_ONE  = { 1.0, 1.0 };\nstatic Packet2d  p2d_ZERO = reinterpret_cast<Packet2d>(p4f_ZERO);\nstatic Packet2d  p2d_MZERO = { -0.0, -0.0 };\n\n#ifdef _BIG_ENDIAN\nstatic Packet2d p2d_COUNTDOWN = reinterpret_cast<Packet2d>(vec_sld(reinterpret_cast<Packet4f>(p2d_ZERO), reinterpret_cast<Packet4f>(p2d_ONE), 8));\n#else\nstatic Packet2d p2d_COUNTDOWN = reinterpret_cast<Packet2d>(vec_sld(reinterpret_cast<Packet4f>(p2d_ONE), reinterpret_cast<Packet4f>(p2d_ZERO), 8));\n#endif\n\ntemplate<int index> Packet2d vec_splat_dbl(Packet2d& a);\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d vec_splat_dbl<0>(Packet2d& a)\n{\n  return reinterpret_cast<Packet2d>(vec_perm(a, a, p16uc_PSET64_HI));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d vec_splat_dbl<1>(Packet2d& a)\n{\n  return reinterpret_cast<Packet2d>(vec_perm(a, a, p16uc_PSET64_LO));\n}\n\ntemplate<> struct packet_traits<double> : default_packet_traits\n{\n  typedef Packet2d type;\n  typedef Packet2d half;\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size=2,\n    HasHalfPacket = 1,\n\n    HasAdd  = 1,\n    HasSub  = 1,\n    HasMul  = 1,\n    HasDiv  = 1,\n    HasMin  = 1,\n    HasMax  = 1,\n    HasAbs  = 1,\n    HasSin  = 0,\n    HasCos  = 0,\n    HasLog  = 0,\n    HasExp  = 1,\n    HasSqrt = 1,\n    HasRsqrt = 1,\n    HasRound = 1,\n    HasFloor = 1,\n    HasCeil = 1,\n    HasNegate = 1,\n    HasBlend = 1\n  };\n};\n\ntemplate<> struct unpacket_traits<Packet2d> { typedef double type; enum {size=2, alignment=Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false}; typedef Packet2d half; };\n\ninline std::ostream & operator <<(std::ostream & s, const Packet2l & v)\n{\n  union {\n    Packet2l   v;\n    int64_t n[2];\n  } vt;\n  vt.v = v;\n  s << vt.n[0] << \", \" << vt.n[1];\n  return s;\n}\n\ninline std::ostream & operator <<(std::ostream & s, const Packet2d & v)\n{\n  union {\n    Packet2d   v;\n    double n[2];\n  } vt;\n  vt.v = v;\n  s << vt.n[0] << \", \" << vt.n[1];\n  return s;\n}\n\n// Need to define them first or we get specialization after instantiation errors\ntemplate<> EIGEN_STRONG_INLINE Packet2d pload<Packet2d>(const double* from)\n{\n  EIGEN_DEBUG_ALIGNED_LOAD\n  return vec_xl(0, const_cast<double *>(from)); // cast needed by Clang\n}\n\ntemplate<> EIGEN_STRONG_INLINE void pstore<double>(double*   to, const Packet2d& from)\n{\n  EIGEN_DEBUG_ALIGNED_STORE\n  vec_xst(from, 0, to);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d pset1<Packet2d>(const double&  from) {\n  Packet2d v = {from, from};\n  return v;\n}\n\ntemplate<> EIGEN_STRONG_INLINE void\npbroadcast4<Packet2d>(const double *a,\n                      Packet2d& a0, Packet2d& a1, Packet2d& a2, Packet2d& a3)\n{\n  a1 = pload<Packet2d>(a);\n  a0 = vec_splat_dbl<0>(a1);\n  a1 = vec_splat_dbl<1>(a1);\n  a3 = pload<Packet2d>(a+2);\n  a2 = vec_splat_dbl<0>(a3);\n  a3 = vec_splat_dbl<1>(a3);\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline Packet2d pgather<double, Packet2d>(const double* from, Index stride)\n{\n  EIGEN_ALIGN16 double af[2];\n  af[0] = from[0*stride];\n  af[1] = from[1*stride];\n return pload<Packet2d>(af);\n}\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<double, Packet2d>(double* to, const Packet2d& from, Index stride)\n{\n  EIGEN_ALIGN16 double af[2];\n  pstore<double>(af, from);\n  to[0*stride] = af[0];\n  to[1*stride] = af[1];\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d plset<Packet2d>(const double& a) { return pset1<Packet2d>(a) + p2d_COUNTDOWN; }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d padd<Packet2d>(const Packet2d& a, const Packet2d& b) { return a + b; }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d psub<Packet2d>(const Packet2d& a, const Packet2d& b) { return a - b; }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d pnegate(const Packet2d& a) { return p2d_ZERO - a; }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d pconj(const Packet2d& a) { return a; }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d pmul<Packet2d>(const Packet2d& a, const Packet2d& b) { return vec_madd(a,b,p2d_MZERO); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pdiv<Packet2d>(const Packet2d& a, const Packet2d& b) { return vec_div(a,b); }\n\n// for some weird raisons, it has to be overloaded for packet of integers\ntemplate<> EIGEN_STRONG_INLINE Packet2d pmadd(const Packet2d& a, const Packet2d& b, const Packet2d& c) { return vec_madd(a, b, c); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d pmin<Packet2d>(const Packet2d& a, const Packet2d& b)\n{\n  // NOTE: about 10% slower than vec_min, but consistent with std::min and SSE regarding NaN\n  Packet2d ret;\n  __asm__ (\"xvcmpgedp %x0,%x1,%x2\\n\\txxsel %x0,%x1,%x2,%x0\" : \"=&wa\" (ret) : \"wa\" (a), \"wa\" (b));\n  return ret;\n }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d pmax<Packet2d>(const Packet2d& a, const Packet2d& b)\n{\n  // NOTE: about 10% slower than vec_max, but consistent with std::max and SSE regarding NaN\n  Packet2d ret;\n  __asm__ (\"xvcmpgtdp %x0,%x2,%x1\\n\\txxsel %x0,%x1,%x2,%x0\" : \"=&wa\" (ret) : \"wa\" (a), \"wa\" (b));\n  return ret;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d pcmp_le(const Packet2d& a, const Packet2d& b) { return reinterpret_cast<Packet2d>(vec_cmple(a,b)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pcmp_lt(const Packet2d& a, const Packet2d& b) { return reinterpret_cast<Packet2d>(vec_cmplt(a,b)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pcmp_eq(const Packet2d& a, const Packet2d& b) { return reinterpret_cast<Packet2d>(vec_cmpeq(a,b)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pcmp_lt_or_nan(const Packet2d& a, const Packet2d& b) {\n  Packet2d c = reinterpret_cast<Packet2d>(vec_cmpge(a,b));\n  return vec_nor(c,c);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d pand<Packet2d>(const Packet2d& a, const Packet2d& b) { return vec_and(a, b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d por<Packet2d>(const Packet2d& a, const Packet2d& b) { return vec_or(a, b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d pxor<Packet2d>(const Packet2d& a, const Packet2d& b) { return vec_xor(a, b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d pandnot<Packet2d>(const Packet2d& a, const Packet2d& b) { return vec_and(a, vec_nor(b, b)); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d pround<Packet2d>(const Packet2d& a) { return vec_round(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pceil<Packet2d>(const  Packet2d& a) { return vec_ceil(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pfloor<Packet2d>(const Packet2d& a) { return vec_floor(a); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d ploadu<Packet2d>(const double* from)\n{\n  EIGEN_DEBUG_UNALIGNED_LOAD\n  return vec_xl(0, from);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d ploaddup<Packet2d>(const double*   from)\n{\n  Packet2d p;\n  if((std::ptrdiff_t(from) % 16) == 0)  p = pload<Packet2d>(from);\n  else                                  p = ploadu<Packet2d>(from);\n  return vec_splat_dbl<0>(p);\n}\n\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<double>(double*  to, const Packet2d& from)\n{\n  EIGEN_DEBUG_UNALIGNED_STORE\n  vec_xst(from, 0, to);\n}\n\ntemplate<> EIGEN_STRONG_INLINE void prefetch<double>(const double* addr) { EIGEN_PPC_PREFETCH(addr); }\n\ntemplate<> EIGEN_STRONG_INLINE double  pfirst<Packet2d>(const Packet2d& a) { EIGEN_ALIGN16 double x[2]; pstore<double>(x, a); return x[0]; }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d preverse(const Packet2d& a)\n{\n  return reinterpret_cast<Packet2d>(vec_perm(reinterpret_cast<Packet16uc>(a), reinterpret_cast<Packet16uc>(a), p16uc_REVERSE64));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet2d pabs(const Packet2d& a) { return vec_abs(a); }\n\n// VSX support varies between different compilers and even different\n// versions of the same compiler.  For gcc version >= 4.9.3, we can use\n// vec_cts to efficiently convert Packet2d to Packet2l.  Otherwise, use\n// a slow version that works with older compilers. \n// Update: apparently vec_cts/vec_ctf intrinsics for 64-bit doubles\n// are buggy, https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70963\nstatic inline Packet2l ConvertToPacket2l(const Packet2d& x) {\n#if EIGEN_GNUC_AT_LEAST(5, 4) || \\\n    (EIGEN_GNUC_AT(6, 1) && __GNUC_PATCHLEVEL__ >= 1)\n  return vec_cts(x, 0);    // TODO: check clang version.\n#else\n  double tmp[2];\n  memcpy(tmp, &x, sizeof(tmp));\n  Packet2l l = { static_cast<long long>(tmp[0]),\n                 static_cast<long long>(tmp[1]) };\n  return l;\n#endif\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d pldexp<Packet2d>(const Packet2d& a, const Packet2d& exponent) {\n  \n  // build 2^n\n  Packet2l emm0 = ConvertToPacket2l(exponent);\n\n#ifdef __POWER8_VECTOR__ \n  const Packet2l  p2l_1023 = { 1023, 1023 };\n  const Packet2ul p2ul_52 = { 52, 52 };\n  emm0 = vec_add(emm0, p2l_1023);\n  emm0 = vec_sl(emm0, p2ul_52);\n#else\n  // Code is a bit complex for POWER7.  There is actually a\n  // vec_xxsldi intrinsic but it is not supported by some gcc versions.\n  // So we shift (52-32) bits and do a word swap with zeros.\n  const Packet4i p4i_1023 = pset1<Packet4i>(1023);\n  const Packet4i p4i_20 = pset1<Packet4i>(20);    // 52 - 32\n\n  Packet4i emm04i = reinterpret_cast<Packet4i>(emm0);\n  emm04i = vec_add(emm04i, p4i_1023);\n  emm04i = vec_sl(emm04i, reinterpret_cast<Packet4ui>(p4i_20));\n  static const Packet16uc perm = {\n    0x14, 0x15, 0x16, 0x17, 0x00, 0x01, 0x02, 0x03, \n    0x1c, 0x1d, 0x1e, 0x1f, 0x08, 0x09, 0x0a, 0x0b };\n#ifdef  _BIG_ENDIAN\n  emm0 = reinterpret_cast<Packet2l>(vec_perm(p4i_ZERO, emm04i, perm));\n#else\n  emm0 = reinterpret_cast<Packet2l>(vec_perm(emm04i, p4i_ZERO, perm));\n#endif\n\n#endif\n\n  return pmul(a, reinterpret_cast<Packet2d>(emm0));\n}\n\ntemplate<> EIGEN_STRONG_INLINE double predux<Packet2d>(const Packet2d& a)\n{\n  Packet2d b, sum;\n  b   = reinterpret_cast<Packet2d>(vec_sld(reinterpret_cast<Packet4f>(a), reinterpret_cast<Packet4f>(a), 8));\n  sum = a + b;\n  return pfirst<Packet2d>(sum);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d preduxp<Packet2d>(const Packet2d* vecs)\n{\n  Packet2d v[2], sum;\n  v[0] = vecs[0] + reinterpret_cast<Packet2d>(vec_sld(reinterpret_cast<Packet4f>(vecs[0]), reinterpret_cast<Packet4f>(vecs[0]), 8));\n  v[1] = vecs[1] + reinterpret_cast<Packet2d>(vec_sld(reinterpret_cast<Packet4f>(vecs[1]), reinterpret_cast<Packet4f>(vecs[1]), 8));\n\n#ifdef _BIG_ENDIAN\n  sum = reinterpret_cast<Packet2d>(vec_sld(reinterpret_cast<Packet4f>(v[0]), reinterpret_cast<Packet4f>(v[1]), 8));\n#else\n  sum = reinterpret_cast<Packet2d>(vec_sld(reinterpret_cast<Packet4f>(v[1]), reinterpret_cast<Packet4f>(v[0]), 8));\n#endif\n\n  return sum;\n}\n// Other reduction functions:\n// mul\ntemplate<> EIGEN_STRONG_INLINE double predux_mul<Packet2d>(const Packet2d& a)\n{\n  return pfirst(pmul(a, reinterpret_cast<Packet2d>(vec_sld(reinterpret_cast<Packet4ui>(a), reinterpret_cast<Packet4ui>(a), 8))));\n}\n\n// min\ntemplate<> EIGEN_STRONG_INLINE double predux_min<Packet2d>(const Packet2d& a)\n{\n  return pfirst(pmin(a, reinterpret_cast<Packet2d>(vec_sld(reinterpret_cast<Packet4ui>(a), reinterpret_cast<Packet4ui>(a), 8))));\n}\n\n// max\ntemplate<> EIGEN_STRONG_INLINE double predux_max<Packet2d>(const Packet2d& a)\n{\n  return pfirst(pmax(a, reinterpret_cast<Packet2d>(vec_sld(reinterpret_cast<Packet4ui>(a), reinterpret_cast<Packet4ui>(a), 8))));\n}\n\ntemplate<int Offset>\nstruct palign_impl<Offset,Packet2d>\n{\n  static EIGEN_STRONG_INLINE void run(Packet2d& first, const Packet2d& second)\n  {\n    if (Offset == 1)\n#ifdef _BIG_ENDIAN\n      first = reinterpret_cast<Packet2d>(vec_sld(reinterpret_cast<Packet4ui>(first), reinterpret_cast<Packet4ui>(second), 8));\n#else\n      first = reinterpret_cast<Packet2d>(vec_sld(reinterpret_cast<Packet4ui>(second), reinterpret_cast<Packet4ui>(first), 8));\n#endif\n  }\n};\n\nEIGEN_DEVICE_FUNC inline void\nptranspose(PacketBlock<Packet2d,2>& kernel) {\n  Packet2d t0, t1;\n  t0 = vec_perm(kernel.packet[0], kernel.packet[1], p16uc_TRANSPOSE64_HI);\n  t1 = vec_perm(kernel.packet[0], kernel.packet[1], p16uc_TRANSPOSE64_LO);\n  kernel.packet[0] = t0;\n  kernel.packet[1] = t1;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d pblend(const Selector<2>& ifPacket, const Packet2d& thenPacket, const Packet2d& elsePacket) {\n  Packet2l select = { ifPacket.select[0], ifPacket.select[1] };\n  Packet2bl mask = reinterpret_cast<Packet2bl>( vec_cmpeq(reinterpret_cast<Packet2d>(select), reinterpret_cast<Packet2d>(p2l_ONE)) );\n  return vec_sel(elsePacket, thenPacket, mask);\n}\n#endif // __VSX__\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_PACKET_MATH_ALTIVEC_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/CUDA/Complex.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_COMPLEX_CUDA_H\n#define EIGEN_COMPLEX_CUDA_H\n\n// clang-format off\n\nnamespace Eigen {\n\nnamespace internal {\n\n#if defined(EIGEN_CUDACC) && defined(EIGEN_USE_GPU)\n\n// Many std::complex methods such as operator+, operator-, operator* and\n// operator/ are not constexpr. Due to this, clang does not treat them as device\n// functions and thus Eigen functors making use of these operators fail to\n// compile. Here, we manually specialize these functors for complex types when\n// building for CUDA to avoid non-constexpr methods.\n\n// Sum\ntemplate<typename T> struct scalar_sum_op<const std::complex<T>, const std::complex<T> > : binary_op_base<const std::complex<T>, const std::complex<T> > {\n  typedef typename std::complex<T> result_type;\n\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_sum_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::complex<T> operator() (const std::complex<T>& a, const std::complex<T>& b) const {\n    return std::complex<T>(numext::real(a) + numext::real(b),\n                           numext::imag(a) + numext::imag(b));\n  }\n};\n\ntemplate<typename T> struct scalar_sum_op<std::complex<T>, std::complex<T> > : scalar_sum_op<const std::complex<T>, const std::complex<T> > {};\n\n\n// Difference\ntemplate<typename T> struct scalar_difference_op<const std::complex<T>, const std::complex<T> >  : binary_op_base<const std::complex<T>, const std::complex<T> > {\n  typedef typename std::complex<T> result_type;\n\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_difference_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::complex<T> operator() (const std::complex<T>& a, const std::complex<T>& b) const {\n    return std::complex<T>(numext::real(a) - numext::real(b),\n                           numext::imag(a) - numext::imag(b));\n  }\n};\n\ntemplate<typename T> struct scalar_difference_op<std::complex<T>, std::complex<T> > : scalar_difference_op<const std::complex<T>, const std::complex<T> > {};\n\n\n// Product\ntemplate<typename T> struct scalar_product_op<const std::complex<T>, const std::complex<T> >  : binary_op_base<const std::complex<T>, const std::complex<T> > {\n  enum {\n    Vectorizable = packet_traits<std::complex<T> >::HasMul\n  };\n  typedef typename std::complex<T> result_type;\n\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_product_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::complex<T> operator() (const std::complex<T>& a, const std::complex<T>& b) const {\n    const T a_real = numext::real(a);\n    const T a_imag = numext::imag(a);\n    const T b_real = numext::real(b);\n    const T b_imag = numext::imag(b);\n    return std::complex<T>(a_real * b_real - a_imag * b_imag,\n                           a_real * b_imag + a_imag * b_real);\n  }\n};\n\ntemplate<typename T> struct scalar_product_op<std::complex<T>, std::complex<T> > : scalar_product_op<const std::complex<T>, const std::complex<T> > {};\n\n\n// Quotient\ntemplate<typename T> struct scalar_quotient_op<const std::complex<T>, const std::complex<T> > : binary_op_base<const std::complex<T>, const std::complex<T> > {\n  enum {\n    Vectorizable = packet_traits<std::complex<T> >::HasDiv\n  };\n  typedef typename std::complex<T> result_type;\n\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_quotient_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::complex<T> operator() (const std::complex<T>& a, const std::complex<T>& b) const {\n    const T a_real = numext::real(a);\n    const T a_imag = numext::imag(a);\n    const T b_real = numext::real(b);\n    const T b_imag = numext::imag(b);\n    const T norm = T(1) / (b_real * b_real + b_imag * b_imag);\n    return std::complex<T>((a_real * b_real + a_imag * b_imag) * norm,\n                           (a_imag * b_real - a_real * b_imag) * norm);\n  }\n};\n\ntemplate<typename T> struct scalar_quotient_op<std::complex<T>, std::complex<T> > : scalar_quotient_op<const std::complex<T>, const std::complex<T> > {};\n\n#endif\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_COMPLEX_CUDA_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/Default/ConjHelper.h",
    "content": "\n// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2017 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_ARCH_CONJ_HELPER_H\n#define EIGEN_ARCH_CONJ_HELPER_H\n\n#define EIGEN_MAKE_CONJ_HELPER_CPLX_REAL(PACKET_CPLX, PACKET_REAL)                                                          \\\n  template<> struct conj_helper<PACKET_REAL, PACKET_CPLX, false,false> {                                          \\\n    EIGEN_STRONG_INLINE PACKET_CPLX pmadd(const PACKET_REAL& x, const PACKET_CPLX& y, const PACKET_CPLX& c) const \\\n    { return padd(c, pmul(x,y)); }                                                                                \\\n    EIGEN_STRONG_INLINE PACKET_CPLX pmul(const PACKET_REAL& x, const PACKET_CPLX& y) const                        \\\n    { return PACKET_CPLX(Eigen::internal::pmul<PACKET_REAL>(x, y.v)); }                                           \\\n  };                                                                                                              \\\n                                                                                                                  \\\n  template<> struct conj_helper<PACKET_CPLX, PACKET_REAL, false,false> {                                          \\\n    EIGEN_STRONG_INLINE PACKET_CPLX pmadd(const PACKET_CPLX& x, const PACKET_REAL& y, const PACKET_CPLX& c) const \\\n    { return padd(c, pmul(x,y)); }                                                                                \\\n    EIGEN_STRONG_INLINE PACKET_CPLX pmul(const PACKET_CPLX& x, const PACKET_REAL& y) const                        \\\n    { return PACKET_CPLX(Eigen::internal::pmul<PACKET_REAL>(x.v, y)); }                                           \\\n  };\n\n#endif // EIGEN_ARCH_CONJ_HELPER_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2007 Julien Pommier\n// Copyright (C) 2014 Pedro Gonnet (pedro.gonnet@gmail.com)\n// Copyright (C) 2009-2019 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n/* The exp and log functions of this file initially come from\n * Julien Pommier's sse math library: http://gruntthepeon.free.fr/ssemath/\n */\n\n#ifndef EIGEN_ARCH_GENERIC_PACKET_MATH_FUNCTIONS_H\n#define EIGEN_ARCH_GENERIC_PACKET_MATH_FUNCTIONS_H\n\nnamespace Eigen {\nnamespace internal {\n\ntemplate<typename Packet> EIGEN_STRONG_INLINE Packet\npfrexp_float(const Packet& a, Packet& exponent) {\n  typedef typename unpacket_traits<Packet>::integer_packet PacketI;\n  const Packet cst_126f = pset1<Packet>(126.0f);\n  const Packet cst_half = pset1<Packet>(0.5f);\n  const Packet cst_inv_mant_mask  = pset1frombits<Packet>(~0x7f800000u);\n  exponent = psub(pcast<PacketI,Packet>(plogical_shift_right<23>(preinterpret<PacketI>(a))), cst_126f);\n  return por(pand(a, cst_inv_mant_mask), cst_half);\n}\n\ntemplate<typename Packet> EIGEN_STRONG_INLINE Packet\npldexp_float(Packet a, Packet exponent)\n{\n  typedef typename unpacket_traits<Packet>::integer_packet PacketI;\n  const Packet cst_127 = pset1<Packet>(127.f);\n  // return a * 2^exponent\n  PacketI ei = pcast<Packet,PacketI>(padd(exponent, cst_127));\n  return pmul(a, preinterpret<Packet>(plogical_shift_left<23>(ei)));\n}\n\n// Natural logarithm\n// Computes log(x) as log(2^e * m) = C*e + log(m), where the constant C =log(2)\n// and m is in the range [sqrt(1/2),sqrt(2)). In this range, the logarithm can\n// be easily approximated by a polynomial centered on m=1 for stability.\n// TODO(gonnet): Further reduce the interval allowing for lower-degree\n//               polynomial interpolants -> ... -> profit!\ntemplate <typename Packet>\nEIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nEIGEN_UNUSED\nPacket plog_float(const Packet _x)\n{\n  Packet x = _x;\n\n  const Packet cst_1              = pset1<Packet>(1.0f);\n  const Packet cst_half           = pset1<Packet>(0.5f);\n  // The smallest non denormalized float number.\n  const Packet cst_min_norm_pos   = pset1frombits<Packet>( 0x00800000u);\n  const Packet cst_minus_inf      = pset1frombits<Packet>( 0xff800000u);\n  const Packet cst_pos_inf        = pset1frombits<Packet>( 0x7f800000u);\n\n  // Polynomial coefficients.\n  const Packet cst_cephes_SQRTHF = pset1<Packet>(0.707106781186547524f);\n  const Packet cst_cephes_log_p0 = pset1<Packet>(7.0376836292E-2f);\n  const Packet cst_cephes_log_p1 = pset1<Packet>(-1.1514610310E-1f);\n  const Packet cst_cephes_log_p2 = pset1<Packet>(1.1676998740E-1f);\n  const Packet cst_cephes_log_p3 = pset1<Packet>(-1.2420140846E-1f);\n  const Packet cst_cephes_log_p4 = pset1<Packet>(+1.4249322787E-1f);\n  const Packet cst_cephes_log_p5 = pset1<Packet>(-1.6668057665E-1f);\n  const Packet cst_cephes_log_p6 = pset1<Packet>(+2.0000714765E-1f);\n  const Packet cst_cephes_log_p7 = pset1<Packet>(-2.4999993993E-1f);\n  const Packet cst_cephes_log_p8 = pset1<Packet>(+3.3333331174E-1f);\n  const Packet cst_cephes_log_q1 = pset1<Packet>(-2.12194440e-4f);\n  const Packet cst_cephes_log_q2 = pset1<Packet>(0.693359375f);\n\n  // Truncate input values to the minimum positive normal.\n  x = pmax(x, cst_min_norm_pos);\n\n  Packet e;\n  // extract significant in the range [0.5,1) and exponent\n  x = pfrexp(x,e);\n\n  // part2: Shift the inputs from the range [0.5,1) to [sqrt(1/2),sqrt(2))\n  // and shift by -1. The values are then centered around 0, which improves\n  // the stability of the polynomial evaluation.\n  //   if( x < SQRTHF ) {\n  //     e -= 1;\n  //     x = x + x - 1.0;\n  //   } else { x = x - 1.0; }\n  Packet mask = pcmp_lt(x, cst_cephes_SQRTHF);\n  Packet tmp = pand(x, mask);\n  x = psub(x, cst_1);\n  e = psub(e, pand(cst_1, mask));\n  x = padd(x, tmp);\n\n  Packet x2 = pmul(x, x);\n  Packet x3 = pmul(x2, x);\n\n  // Evaluate the polynomial approximant of degree 8 in three parts, probably\n  // to improve instruction-level parallelism.\n  Packet y, y1, y2;\n  y  = pmadd(cst_cephes_log_p0, x, cst_cephes_log_p1);\n  y1 = pmadd(cst_cephes_log_p3, x, cst_cephes_log_p4);\n  y2 = pmadd(cst_cephes_log_p6, x, cst_cephes_log_p7);\n  y  = pmadd(y, x, cst_cephes_log_p2);\n  y1 = pmadd(y1, x, cst_cephes_log_p5);\n  y2 = pmadd(y2, x, cst_cephes_log_p8);\n  y  = pmadd(y, x3, y1);\n  y  = pmadd(y, x3, y2);\n  y  = pmul(y, x3);\n\n  // Add the logarithm of the exponent back to the result of the interpolation.\n  y1  = pmul(e, cst_cephes_log_q1);\n  tmp = pmul(x2, cst_half);\n  y   = padd(y, y1);\n  x   = psub(x, tmp);\n  y2  = pmul(e, cst_cephes_log_q2);\n  x   = padd(x, y);\n  x   = padd(x, y2);\n\n  Packet invalid_mask = pcmp_lt_or_nan(_x, pzero(_x));\n  Packet iszero_mask  = pcmp_eq(_x,pzero(_x));\n  Packet pos_inf_mask = pcmp_eq(_x,cst_pos_inf);\n  // Filter out invalid inputs, i.e.:\n  //  - negative arg will be NAN\n  //  - 0 will be -INF\n  //  - +INF will be +INF\n  return pselect(iszero_mask, cst_minus_inf,\n                              por(pselect(pos_inf_mask,cst_pos_inf,x), invalid_mask));\n}\n\n/** \\internal \\returns log(1 + x) computed using W. Kahan's formula.\n    See: http://www.plunk.org/~hatch/rightway.php\n */\ntemplate<typename Packet>\nPacket generic_plog1p(const Packet& x)\n{\n  typedef typename unpacket_traits<Packet>::type ScalarType;\n  const Packet one = pset1<Packet>(ScalarType(1));\n  Packet xp1 = padd(x, one);\n  Packet small_mask = pcmp_eq(xp1, one);\n  Packet log1 = plog(xp1);\n  Packet inf_mask = pcmp_eq(xp1, log1);\n  Packet log_large = pmul(x, pdiv(log1, psub(xp1, one)));\n  return pselect(por(small_mask, inf_mask), x, log_large);\n}\n\n/** \\internal \\returns exp(x)-1 computed using W. Kahan's formula.\n    See: http://www.plunk.org/~hatch/rightway.php\n */\ntemplate<typename Packet>\nPacket generic_expm1(const Packet& x)\n{\n  typedef typename unpacket_traits<Packet>::type ScalarType;\n  const Packet one = pset1<Packet>(ScalarType(1));\n  const Packet neg_one = pset1<Packet>(ScalarType(-1));\n  Packet u = pexp(x);\n  Packet one_mask = pcmp_eq(u, one);\n  Packet u_minus_one = psub(u, one);\n  Packet neg_one_mask = pcmp_eq(u_minus_one, neg_one);\n  Packet logu = plog(u);\n  // The following comparison is to catch the case where\n  // exp(x) = +inf. It is written in this way to avoid having\n  // to form the constant +inf, which depends on the packet\n  // type.\n  Packet pos_inf_mask = pcmp_eq(logu, u);\n  Packet expm1 = pmul(u_minus_one, pdiv(x, logu));\n  expm1 = pselect(pos_inf_mask, u, expm1);\n  return pselect(one_mask,\n                 x,\n                 pselect(neg_one_mask,\n                         neg_one,\n                         expm1));\n}\n\n\n// Exponential function. Works by writing \"x = m*log(2) + r\" where\n// \"m = floor(x/log(2)+1/2)\" and \"r\" is the remainder. The result is then\n// \"exp(x) = 2^m*exp(r)\" where exp(r) is in the range [-1,1).\ntemplate <typename Packet>\nEIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nEIGEN_UNUSED\nPacket pexp_float(const Packet _x)\n{\n  const Packet cst_1      = pset1<Packet>(1.0f);\n  const Packet cst_half   = pset1<Packet>(0.5f);\n  const Packet cst_exp_hi = pset1<Packet>( 88.3762626647950f);\n  const Packet cst_exp_lo = pset1<Packet>(-88.3762626647949f);\n\n  const Packet cst_cephes_LOG2EF = pset1<Packet>(1.44269504088896341f);\n  const Packet cst_cephes_exp_p0 = pset1<Packet>(1.9875691500E-4f);\n  const Packet cst_cephes_exp_p1 = pset1<Packet>(1.3981999507E-3f);\n  const Packet cst_cephes_exp_p2 = pset1<Packet>(8.3334519073E-3f);\n  const Packet cst_cephes_exp_p3 = pset1<Packet>(4.1665795894E-2f);\n  const Packet cst_cephes_exp_p4 = pset1<Packet>(1.6666665459E-1f);\n  const Packet cst_cephes_exp_p5 = pset1<Packet>(5.0000001201E-1f);\n\n  // Clamp x.\n  Packet x = pmax(pmin(_x, cst_exp_hi), cst_exp_lo);\n\n  // Express exp(x) as exp(m*ln(2) + r), start by extracting\n  // m = floor(x/ln(2) + 0.5).\n  Packet m = pfloor(pmadd(x, cst_cephes_LOG2EF, cst_half));\n\n  // Get r = x - m*ln(2). If no FMA instructions are available, m*ln(2) is\n  // subtracted out in two parts, m*C1+m*C2 = m*ln(2), to avoid accumulating\n  // truncation errors.\n  Packet r;\n#ifdef EIGEN_HAS_SINGLE_INSTRUCTION_MADD\n  const Packet cst_nln2 = pset1<Packet>(-0.6931471805599453f);\n  r = pmadd(m, cst_nln2, x);\n#else\n  const Packet cst_cephes_exp_C1 = pset1<Packet>(0.693359375f);\n  const Packet cst_cephes_exp_C2 = pset1<Packet>(-2.12194440e-4f);\n  r = psub(x, pmul(m, cst_cephes_exp_C1));\n  r = psub(r, pmul(m, cst_cephes_exp_C2));\n#endif\n\n  Packet r2 = pmul(r, r);\n\n  // TODO(gonnet): Split into odd/even polynomials and try to exploit\n  //               instruction-level parallelism.\n  Packet y = cst_cephes_exp_p0;\n  y = pmadd(y, r, cst_cephes_exp_p1);\n  y = pmadd(y, r, cst_cephes_exp_p2);\n  y = pmadd(y, r, cst_cephes_exp_p3);\n  y = pmadd(y, r, cst_cephes_exp_p4);\n  y = pmadd(y, r, cst_cephes_exp_p5);\n  y = pmadd(y, r2, r);\n  y = padd(y, cst_1);\n\n  // Return 2^m * exp(r).\n  return pmax(pldexp(y,m), _x);\n}\n\n// make it the default path for scalar float\ntemplate<>\nEIGEN_DEVICE_FUNC inline float pexp(const float& a) { return pexp_float(a); }\n\ntemplate <typename Packet>\nEIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nEIGEN_UNUSED\nPacket pexp_double(const Packet _x)\n{\n  Packet x = _x;\n\n  const Packet cst_1 = pset1<Packet>(1.0);\n  const Packet cst_2 = pset1<Packet>(2.0);\n  const Packet cst_half = pset1<Packet>(0.5);\n\n  const Packet cst_exp_hi = pset1<Packet>(709.437);\n  const Packet cst_exp_lo = pset1<Packet>(-709.436139303);\n\n  const Packet cst_cephes_LOG2EF = pset1<Packet>(1.4426950408889634073599);\n  const Packet cst_cephes_exp_p0 = pset1<Packet>(1.26177193074810590878e-4);\n  const Packet cst_cephes_exp_p1 = pset1<Packet>(3.02994407707441961300e-2);\n  const Packet cst_cephes_exp_p2 = pset1<Packet>(9.99999999999999999910e-1);\n  const Packet cst_cephes_exp_q0 = pset1<Packet>(3.00198505138664455042e-6);\n  const Packet cst_cephes_exp_q1 = pset1<Packet>(2.52448340349684104192e-3);\n  const Packet cst_cephes_exp_q2 = pset1<Packet>(2.27265548208155028766e-1);\n  const Packet cst_cephes_exp_q3 = pset1<Packet>(2.00000000000000000009e0);\n  const Packet cst_cephes_exp_C1 = pset1<Packet>(0.693145751953125);\n  const Packet cst_cephes_exp_C2 = pset1<Packet>(1.42860682030941723212e-6);\n\n  Packet tmp, fx;\n\n  // clamp x\n  x = pmax(pmin(x, cst_exp_hi), cst_exp_lo);\n  // Express exp(x) as exp(g + n*log(2)).\n  fx = pmadd(cst_cephes_LOG2EF, x, cst_half);\n\n  // Get the integer modulus of log(2), i.e. the \"n\" described above.\n  fx = pfloor(fx);\n\n  // Get the remainder modulo log(2), i.e. the \"g\" described above. Subtract\n  // n*log(2) out in two steps, i.e. n*C1 + n*C2, C1+C2=log2 to get the last\n  // digits right.\n  tmp = pmul(fx, cst_cephes_exp_C1);\n  Packet z = pmul(fx, cst_cephes_exp_C2);\n  x = psub(x, tmp);\n  x = psub(x, z);\n\n  Packet x2 = pmul(x, x);\n\n  // Evaluate the numerator polynomial of the rational interpolant.\n  Packet px = cst_cephes_exp_p0;\n  px = pmadd(px, x2, cst_cephes_exp_p1);\n  px = pmadd(px, x2, cst_cephes_exp_p2);\n  px = pmul(px, x);\n\n  // Evaluate the denominator polynomial of the rational interpolant.\n  Packet qx = cst_cephes_exp_q0;\n  qx = pmadd(qx, x2, cst_cephes_exp_q1);\n  qx = pmadd(qx, x2, cst_cephes_exp_q2);\n  qx = pmadd(qx, x2, cst_cephes_exp_q3);\n\n  // I don't really get this bit, copied from the SSE2 routines, so...\n  // TODO(gonnet): Figure out what is going on here, perhaps find a better\n  // rational interpolant?\n  x = pdiv(px, psub(qx, px));\n  x = pmadd(cst_2, x, cst_1);\n\n  // Construct the result 2^n * exp(g) = e * x. The max is used to catch\n  // non-finite values in the input.\n  return pmax(pldexp(x,fx), _x);\n}\n\n// make it the default path for scalar double\ntemplate<>\nEIGEN_DEVICE_FUNC inline double pexp(const double& a) { return pexp_double(a); }\n\n// The following code is inspired by the following stack-overflow answer:\n//   https://stackoverflow.com/questions/30463616/payne-hanek-algorithm-implementation-in-c/30465751#30465751\n// It has been largely optimized:\n//  - By-pass calls to frexp.\n//  - Aligned loads of required 96 bits of 2/pi. This is accomplished by\n//    (1) balancing the mantissa and exponent to the required bits of 2/pi are\n//    aligned on 8-bits, and (2) replicating the storage of the bits of 2/pi.\n//  - Avoid a branch in rounding and extraction of the remaining fractional part.\n// Overall, I measured a speed up higher than x2 on x86-64.\ninline float trig_reduce_huge (float xf, int *quadrant)\n{\n  using Eigen::numext::int32_t;\n  using Eigen::numext::uint32_t;\n  using Eigen::numext::int64_t;\n  using Eigen::numext::uint64_t;\n\n  const double pio2_62 = 3.4061215800865545e-19;    // pi/2 * 2^-62\n  const uint64_t zero_dot_five = uint64_t(1) << 61; // 0.5 in 2.62-bit fixed-point foramt\n\n  // 192 bits of 2/pi for Payne-Hanek reduction\n  // Bits are introduced by packet of 8 to enable aligned reads.\n  static const uint32_t two_over_pi [] = \n  {\n    0x00000028, 0x000028be, 0x0028be60, 0x28be60db,\n    0xbe60db93, 0x60db9391, 0xdb939105, 0x9391054a,\n    0x91054a7f, 0x054a7f09, 0x4a7f09d5, 0x7f09d5f4,\n    0x09d5f47d, 0xd5f47d4d, 0xf47d4d37, 0x7d4d3770,\n    0x4d377036, 0x377036d8, 0x7036d8a5, 0x36d8a566,\n    0xd8a5664f, 0xa5664f10, 0x664f10e4, 0x4f10e410,\n    0x10e41000, 0xe4100000\n  };\n  \n  uint32_t xi = numext::as_uint(xf);\n  // Below, -118 = -126 + 8.\n  //   -126 is to get the exponent,\n  //   +8 is to enable alignment of 2/pi's bits on 8 bits.\n  // This is possible because the fractional part of x as only 24 meaningful bits.\n  uint32_t e = (xi >> 23) - 118;\n  // Extract the mantissa and shift it to align it wrt the exponent\n  xi = ((xi & 0x007fffffu)| 0x00800000u) << (e & 0x7);\n\n  uint32_t i = e >> 3;\n  uint32_t twoopi_1  = two_over_pi[i-1];\n  uint32_t twoopi_2  = two_over_pi[i+3];\n  uint32_t twoopi_3  = two_over_pi[i+7];\n\n  // Compute x * 2/pi in 2.62-bit fixed-point format.\n  uint64_t p;\n  p = uint64_t(xi) * twoopi_3;\n  p = uint64_t(xi) * twoopi_2 + (p >> 32);\n  p = (uint64_t(xi * twoopi_1) << 32) + p;\n\n  // Round to nearest: add 0.5 and extract integral part.\n  uint64_t q = (p + zero_dot_five) >> 62;\n  *quadrant = int(q);\n  // Now it remains to compute \"r = x - q*pi/2\" with high accuracy,\n  // since we have p=x/(pi/2) with high accuracy, we can more efficiently compute r as:\n  //   r = (p-q)*pi/2,\n  // where the product can be be carried out with sufficient accuracy using double precision.\n  p -= q<<62;\n  return float(double(int64_t(p)) * pio2_62);\n}\n\ntemplate<bool ComputeSine,typename Packet>\nEIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nEIGEN_UNUSED\n#if EIGEN_GNUC_AT_LEAST(4,4) && EIGEN_COMP_GNUC_STRICT\n__attribute__((optimize(\"-fno-unsafe-math-optimizations\")))\n#endif\nPacket psincos_float(const Packet& _x)\n{\n// Workaround -ffast-math aggressive optimizations\n// See bug 1674\n#if EIGEN_COMP_CLANG && defined(EIGEN_VECTORIZE_SSE)\n#define EIGEN_SINCOS_DONT_OPT(X) __asm__  (\"\" : \"+x\" (X));\n#else\n#define EIGEN_SINCOS_DONT_OPT(X)\n#endif\n\n  typedef typename unpacket_traits<Packet>::integer_packet PacketI;\n\n  const Packet  cst_2oPI            = pset1<Packet>(0.636619746685028076171875f); // 2/PI\n  const Packet  cst_rounding_magic  = pset1<Packet>(12582912); // 2^23 for rounding\n  const PacketI csti_1              = pset1<PacketI>(1);\n  const Packet  cst_sign_mask       = pset1frombits<Packet>(0x80000000u);\n\n  Packet x = pabs(_x);\n\n  // Scale x by 2/Pi to find x's octant.\n  Packet y = pmul(x, cst_2oPI);\n\n  // Rounding trick:\n  Packet y_round = padd(y, cst_rounding_magic);\n  EIGEN_SINCOS_DONT_OPT(y_round)\n  PacketI y_int = preinterpret<PacketI>(y_round); // last 23 digits represent integer (if abs(x)<2^24)\n  y = psub(y_round, cst_rounding_magic); // nearest integer to x*4/pi\n\n  // Reduce x by y octants to get: -Pi/4 <= x <= +Pi/4\n  // using \"Extended precision modular arithmetic\"\n  #if defined(EIGEN_HAS_SINGLE_INSTRUCTION_MADD)\n  // This version requires true FMA for high accuracy\n  // It provides a max error of 1ULP up to (with absolute_error < 5.9605e-08):\n  const float huge_th = ComputeSine ? 117435.992f : 71476.0625f;\n  x = pmadd(y, pset1<Packet>(-1.57079601287841796875f), x);\n  x = pmadd(y, pset1<Packet>(-3.1391647326017846353352069854736328125e-07f), x);\n  x = pmadd(y, pset1<Packet>(-5.390302529957764765544681040410068817436695098876953125e-15f), x);\n  #else\n  // Without true FMA, the previous set of coefficients maintain 1ULP accuracy\n  // up to x<15.7 (for sin), but accuracy is immediately lost for x>15.7.\n  // We thus use one more iteration to maintain 2ULPs up to reasonably large inputs.\n\n  // The following set of coefficients maintain 1ULP up to 9.43 and 14.16 for sin and cos respectively.\n  // and 2 ULP up to:\n  const float huge_th = ComputeSine ? 25966.f : 18838.f;\n  x = pmadd(y, pset1<Packet>(-1.5703125), x); // = 0xbfc90000\n  EIGEN_SINCOS_DONT_OPT(x)\n  x = pmadd(y, pset1<Packet>(-0.000483989715576171875), x); // = 0xb9fdc000\n  EIGEN_SINCOS_DONT_OPT(x)\n  x = pmadd(y, pset1<Packet>(1.62865035235881805419921875e-07), x); // = 0x342ee000\n  x = pmadd(y, pset1<Packet>(5.5644315544167710640977020375430583953857421875e-11), x); // = 0x2e74b9ee\n\n  // For the record, the following set of coefficients maintain 2ULP up\n  // to a slightly larger range:\n  // const float huge_th = ComputeSine ? 51981.f : 39086.125f;\n  // but it slightly fails to maintain 1ULP for two values of sin below pi.\n  // x = pmadd(y, pset1<Packet>(-3.140625/2.), x);\n  // x = pmadd(y, pset1<Packet>(-0.00048351287841796875), x);\n  // x = pmadd(y, pset1<Packet>(-3.13855707645416259765625e-07), x);\n  // x = pmadd(y, pset1<Packet>(-6.0771006282767103812147979624569416046142578125e-11), x);\n\n  // For the record, with only 3 iterations it is possible to maintain\n  // 1 ULP up to 3PI (maybe more) and 2ULP up to 255.\n  // The coefficients are: 0xbfc90f80, 0xb7354480, 0x2e74b9ee\n  #endif\n\n  if(predux_any(pcmp_le(pset1<Packet>(huge_th),pabs(_x))))\n  {\n    const int PacketSize = unpacket_traits<Packet>::size;\n    EIGEN_ALIGN_TO_BOUNDARY(sizeof(Packet)) float vals[PacketSize];\n    EIGEN_ALIGN_TO_BOUNDARY(sizeof(Packet)) float x_cpy[PacketSize];\n    EIGEN_ALIGN_TO_BOUNDARY(sizeof(Packet)) int y_int2[PacketSize];\n    pstoreu(vals, pabs(_x));\n    pstoreu(x_cpy, x);\n    pstoreu(y_int2, y_int);\n    for(int k=0; k<PacketSize;++k)\n    {\n      float val = vals[k];\n      if(val>=huge_th && (numext::isfinite)(val))\n        x_cpy[k] = trig_reduce_huge(val,&y_int2[k]);\n    }\n    x = ploadu<Packet>(x_cpy);\n    y_int = ploadu<PacketI>(y_int2);\n  }\n\n  // Compute the sign to apply to the polynomial.\n  // sin: sign = second_bit(y_int) xor signbit(_x)\n  // cos: sign = second_bit(y_int+1)\n  Packet sign_bit = ComputeSine ? pxor(_x, preinterpret<Packet>(plogical_shift_left<30>(y_int)))\n                                : preinterpret<Packet>(plogical_shift_left<30>(padd(y_int,csti_1)));\n  sign_bit = pand(sign_bit, cst_sign_mask); // clear all but left most bit\n\n  // Get the polynomial selection mask from the second bit of y_int\n  // We'll calculate both (sin and cos) polynomials and then select from the two.\n  Packet poly_mask = preinterpret<Packet>(pcmp_eq(pand(y_int, csti_1), pzero(y_int)));\n\n  Packet x2 = pmul(x,x);\n\n  // Evaluate the cos(x) polynomial. (-Pi/4 <= x <= Pi/4)\n  Packet y1 =        pset1<Packet>(2.4372266125283204019069671630859375e-05f);\n  y1 = pmadd(y1, x2, pset1<Packet>(-0.00138865201734006404876708984375f     ));\n  y1 = pmadd(y1, x2, pset1<Packet>(0.041666619479656219482421875f           ));\n  y1 = pmadd(y1, x2, pset1<Packet>(-0.5f));\n  y1 = pmadd(y1, x2, pset1<Packet>(1.f));\n\n  // Evaluate the sin(x) polynomial. (Pi/4 <= x <= Pi/4)\n  // octave/matlab code to compute those coefficients:\n  //    x = (0:0.0001:pi/4)';\n  //    A = [x.^3 x.^5 x.^7];\n  //    w = ((1.-(x/(pi/4)).^2).^5)*2000+1;         # weights trading relative accuracy\n  //    c = (A'*diag(w)*A)\\(A'*diag(w)*(sin(x)-x)); # weighted LS, linear coeff forced to 1\n  //    printf('%.64f\\n %.64f\\n%.64f\\n', c(3), c(2), c(1))\n  //\n  Packet y2 =        pset1<Packet>(-0.0001959234114083702898469196984621021329076029360294342041015625f);\n  y2 = pmadd(y2, x2, pset1<Packet>( 0.0083326873655616851693794799871284340042620897293090820312500000f));\n  y2 = pmadd(y2, x2, pset1<Packet>(-0.1666666203982298255503735617821803316473960876464843750000000000f));\n  y2 = pmul(y2, x2);\n  y2 = pmadd(y2, x, x);\n\n  // Select the correct result from the two polynomials.\n  y = ComputeSine ? pselect(poly_mask,y2,y1)\n                  : pselect(poly_mask,y1,y2);\n\n  // Update the sign and filter huge inputs\n  return pxor(y, sign_bit);\n\n#undef EIGEN_SINCOS_DONT_OPT\n}\n\ntemplate<typename Packet>\nEIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nEIGEN_UNUSED\nPacket psin_float(const Packet& x)\n{\n  return psincos_float<true>(x);\n}\n\ntemplate<typename Packet>\nEIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nEIGEN_UNUSED\nPacket pcos_float(const Packet& x)\n{\n  return psincos_float<false>(x);\n}\n\n/* polevl (modified for Eigen)\n *\n *      Evaluate polynomial\n *\n *\n *\n * SYNOPSIS:\n *\n * int N;\n * Scalar x, y, coef[N+1];\n *\n * y = polevl<decltype(x), N>( x, coef);\n *\n *\n *\n * DESCRIPTION:\n *\n * Evaluates polynomial of degree N:\n *\n *                     2          N\n * y  =  C  + C x + C x  +...+ C x\n *        0    1     2          N\n *\n * Coefficients are stored in reverse order:\n *\n * coef[0] = C  , ..., coef[N] = C  .\n *            N                   0\n *\n *  The function p1evl() assumes that coef[N] = 1.0 and is\n * omitted from the array.  Its calling arguments are\n * otherwise the same as polevl().\n *\n *\n * The Eigen implementation is templatized.  For best speed, store\n * coef as a const array (constexpr), e.g.\n *\n * const double coef[] = {1.0, 2.0, 3.0, ...};\n *\n */\ntemplate <typename Packet, int N>\nstruct ppolevl {\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet run(const Packet& x, const typename unpacket_traits<Packet>::type coeff[]) {\n    EIGEN_STATIC_ASSERT((N > 0), YOU_MADE_A_PROGRAMMING_MISTAKE);\n    return pmadd(ppolevl<Packet, N-1>::run(x, coeff), x, pset1<Packet>(coeff[N]));\n  }\n};\n\ntemplate <typename Packet>\nstruct ppolevl<Packet, 0> {\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet run(const Packet& x, const typename unpacket_traits<Packet>::type coeff[]) {\n    EIGEN_UNUSED_VARIABLE(x);\n    return pset1<Packet>(coeff[0]);\n  }\n};\n\n/* chbevl (modified for Eigen)\n *\n *     Evaluate Chebyshev series\n *\n *\n *\n * SYNOPSIS:\n *\n * int N;\n * Scalar x, y, coef[N], chebevl();\n *\n * y = chbevl( x, coef, N );\n *\n *\n *\n * DESCRIPTION:\n *\n * Evaluates the series\n *\n *        N-1\n *         - '\n *  y  =   >   coef[i] T (x/2)\n *         -            i\n *        i=0\n *\n * of Chebyshev polynomials Ti at argument x/2.\n *\n * Coefficients are stored in reverse order, i.e. the zero\n * order term is last in the array.  Note N is the number of\n * coefficients, not the order.\n *\n * If coefficients are for the interval a to b, x must\n * have been transformed to x -> 2(2x - b - a)/(b-a) before\n * entering the routine.  This maps x from (a, b) to (-1, 1),\n * over which the Chebyshev polynomials are defined.\n *\n * If the coefficients are for the inverted interval, in\n * which (a, b) is mapped to (1/b, 1/a), the transformation\n * required is x -> 2(2ab/x - b - a)/(b-a).  If b is infinity,\n * this becomes x -> 4a/x - 1.\n *\n *\n *\n * SPEED:\n *\n * Taking advantage of the recurrence properties of the\n * Chebyshev polynomials, the routine requires one more\n * addition per loop than evaluating a nested polynomial of\n * the same degree.\n *\n */\n\ntemplate <typename Packet, int N>\nstruct pchebevl {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE Packet run(Packet x, const typename unpacket_traits<Packet>::type coef[]) {\n    typedef typename unpacket_traits<Packet>::type Scalar;\n    Packet b0 = pset1<Packet>(coef[0]);\n    Packet b1 = pset1<Packet>(static_cast<Scalar>(0.f));\n    Packet b2;\n\n    for (int i = 1; i < N; i++) {\n      b2 = b1;\n      b1 = b0;\n      b0 = psub(pmadd(x, b1, pset1<Packet>(coef[i])), b2);\n    }\n\n    return pmul(pset1<Packet>(static_cast<Scalar>(0.5f)), psub(b0, b2));\n  }\n};\n\n} // end namespace internal\n} // end namespace Eigen\n\n#endif // EIGEN_ARCH_GENERIC_PACKET_MATH_FUNCTIONS_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/Default/GenericPacketMathFunctionsFwd.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2019 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_ARCH_GENERIC_PACKET_MATH_FUNCTIONS_FWD_H\n#define EIGEN_ARCH_GENERIC_PACKET_MATH_FUNCTIONS_FWD_H\n\nnamespace Eigen {\nnamespace internal {\n\n// Forward declarations of the generic math functions\n// implemented in GenericPacketMathFunctions.h\n// This is needed to workaround a circular dependency.\n\ntemplate<typename Packet> EIGEN_STRONG_INLINE Packet\npfrexp_float(const Packet& a, Packet& exponent);\n\ntemplate<typename Packet> EIGEN_STRONG_INLINE Packet\npldexp_float(Packet a, Packet exponent);\n\n/** \\internal \\returns log(x) for single precision float */\ntemplate <typename Packet>\nEIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nEIGEN_UNUSED\nPacket plog_float(const Packet _x);\n\n/** \\internal \\returns log(1 + x) */\ntemplate<typename Packet>\nPacket generic_plog1p(const Packet& x);\n\n/** \\internal \\returns exp(x)-1 */\ntemplate<typename Packet>\nPacket generic_expm1(const Packet& x);\n\n/** \\internal \\returns exp(x) for single precision float */\ntemplate <typename Packet>\nEIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nEIGEN_UNUSED\nPacket pexp_float(const Packet _x);\n\n/** \\internal \\returns exp(x) for double precision real numbers */\ntemplate <typename Packet>\nEIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nEIGEN_UNUSED\nPacket pexp_double(const Packet _x);\n\n/** \\internal \\returns sin(x) for single precision float */\ntemplate<typename Packet>\nEIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nEIGEN_UNUSED\nPacket psin_float(const Packet& x);\n\n/** \\internal \\returns cos(x) for single precision float */\ntemplate<typename Packet>\nEIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nEIGEN_UNUSED\nPacket pcos_float(const Packet& x);\n\ntemplate <typename Packet, int N> struct ppolevl;\n\n} // end namespace internal\n} // end namespace Eigen\n\n#endif // EIGEN_ARCH_GENERIC_PACKET_MATH_FUNCTIONS_FWD_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/Default/Half.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n//\n// The conversion routines are Copyright (c) Fabian Giesen, 2016.\n// The original license follows:\n//\n// Copyright (c) Fabian Giesen, 2016\n// All rights reserved.\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted.\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n// Standard 16-bit float type, mostly useful for GPUs. Defines a new\n// type Eigen::half (inheriting either from CUDA's or HIP's __half struct) with\n// operator overloads such that it behaves basically as an arithmetic\n// type. It will be quite slow on CPUs (so it is recommended to stay\n// in fp32 for CPUs, except for simple parameter conversions, I/O\n// to disk and the likes), but fast on GPUs.\n\n\n#ifndef EIGEN_HALF_H\n#define EIGEN_HALF_H\n\n#if __cplusplus > 199711L\n#define EIGEN_EXPLICIT_CAST(tgt_type) explicit operator tgt_type()\n#else\n#define EIGEN_EXPLICIT_CAST(tgt_type) operator tgt_type()\n#endif\n\n#include <sstream>\n\nnamespace Eigen {\n\nstruct half;\n\nnamespace half_impl {\n\n#if !defined(EIGEN_HAS_GPU_FP16)\n// Make our own __half_raw definition that is similar to CUDA's.\nstruct __half_raw {\n  EIGEN_DEVICE_FUNC __half_raw() : x(0) {}\n  explicit EIGEN_DEVICE_FUNC __half_raw(unsigned short raw) : x(raw) {}\n  unsigned short x;\n};\n#elif defined(EIGEN_HAS_HIP_FP16)\n  // Nothing to do here\n  // HIP fp16 header file has a definition for __half_raw\n#elif defined(EIGEN_HAS_CUDA_FP16)\n #if defined(EIGEN_CUDA_SDK_VER) && EIGEN_CUDA_SDK_VER < 90000\n// In CUDA < 9.0, __half is the equivalent of CUDA 9's __half_raw\n typedef __half __half_raw;\n #endif // defined(EIGEN_HAS_CUDA_FP16)\n\n#elif defined(SYCL_DEVICE_ONLY)\ntypedef cl::sycl::half __half_raw;\n\n#endif\n\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC __half_raw raw_uint16_to_half(unsigned short x);\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC __half_raw float_to_half_rtne(float ff);\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC float half_to_float(__half_raw h);\n\nstruct half_base : public __half_raw {\n  EIGEN_DEVICE_FUNC half_base() {}\n  EIGEN_DEVICE_FUNC half_base(const __half_raw& h) : __half_raw(h) {}\n\n#if defined(EIGEN_HAS_GPU_FP16)\n #if defined(EIGEN_HAS_HIP_FP16)\n  EIGEN_DEVICE_FUNC half_base(const __half& h) { x = __half_as_ushort(h); }\n #elif defined(EIGEN_HAS_CUDA_FP16)\n  #if (defined(EIGEN_CUDA_SDK_VER) && EIGEN_CUDA_SDK_VER >= 90000)\n  EIGEN_DEVICE_FUNC half_base(const __half& h) : __half_raw(*(__half_raw*)&h) {}\n  #endif\n #endif    \n#endif\n};\n\n} // namespace half_impl\n\n// Class definition.\nstruct half : public half_impl::half_base {\n\n  // Writing this out as separate #if-else blocks to make the code easier to follow\n  // The same applies to most #if-else blocks in this file\n#if !defined(EIGEN_HAS_GPU_FP16)\n  typedef half_impl::__half_raw __half_raw;\n#elif defined(EIGEN_HAS_HIP_FP16)\n  // Nothing to do here\n  // HIP fp16 header file has a definition for __half_raw\n#elif defined(EIGEN_HAS_CUDA_FP16)\n  // Note that EIGEN_CUDA_SDK_VER is set to 0 even when compiling with HIP, so\n  // (EIGEN_CUDA_SDK_VER < 90000) is true even for HIP!  So keeping this within\n  // #if defined(EIGEN_HAS_CUDA_FP16) is needed\n  #if defined(EIGEN_CUDA_SDK_VER) && EIGEN_CUDA_SDK_VER < 90000\n    typedef half_impl::__half_raw __half_raw;\n  #endif\n#endif\n\n  EIGEN_DEVICE_FUNC half() {}\n\n  EIGEN_DEVICE_FUNC half(const __half_raw& h) : half_impl::half_base(h) {}\n\n#if defined(EIGEN_HAS_GPU_FP16)\n #if defined(EIGEN_HAS_HIP_FP16)\n  EIGEN_DEVICE_FUNC half(const __half& h) : half_impl::half_base(h) {}\n #elif defined(EIGEN_HAS_CUDA_FP16)\n  #if defined(EIGEN_CUDA_SDK_VER) && EIGEN_CUDA_SDK_VER >= 90000\n  EIGEN_DEVICE_FUNC half(const __half& h) : half_impl::half_base(h) {}\n  #endif\n #endif\n#endif\n\n\n  explicit EIGEN_DEVICE_FUNC half(bool b)\n      : half_impl::half_base(half_impl::raw_uint16_to_half(b ? 0x3c00 : 0)) {}\n  template<class T>\n  explicit EIGEN_DEVICE_FUNC half(const T& val)\n      : half_impl::half_base(half_impl::float_to_half_rtne(static_cast<float>(val))) {}\n  explicit EIGEN_DEVICE_FUNC half(float f)\n      : half_impl::half_base(half_impl::float_to_half_rtne(f)) {}\n\n  EIGEN_DEVICE_FUNC EIGEN_EXPLICIT_CAST(bool) const {\n    // +0.0 and -0.0 become false, everything else becomes true.\n    return (x & 0x7fff) != 0;\n  }\n  EIGEN_DEVICE_FUNC EIGEN_EXPLICIT_CAST(signed char) const {\n    return static_cast<signed char>(half_impl::half_to_float(*this));\n  }\n  EIGEN_DEVICE_FUNC EIGEN_EXPLICIT_CAST(unsigned char) const {\n    return static_cast<unsigned char>(half_impl::half_to_float(*this));\n  }\n  EIGEN_DEVICE_FUNC EIGEN_EXPLICIT_CAST(short) const {\n    return static_cast<short>(half_impl::half_to_float(*this));\n  }\n  EIGEN_DEVICE_FUNC EIGEN_EXPLICIT_CAST(unsigned short) const {\n    return static_cast<unsigned short>(half_impl::half_to_float(*this));\n  }\n  EIGEN_DEVICE_FUNC EIGEN_EXPLICIT_CAST(int) const {\n    return static_cast<int>(half_impl::half_to_float(*this));\n  }\n  EIGEN_DEVICE_FUNC EIGEN_EXPLICIT_CAST(unsigned int) const {\n    return static_cast<unsigned int>(half_impl::half_to_float(*this));\n  }\n  EIGEN_DEVICE_FUNC EIGEN_EXPLICIT_CAST(long) const {\n    return static_cast<long>(half_impl::half_to_float(*this));\n  }\n  EIGEN_DEVICE_FUNC EIGEN_EXPLICIT_CAST(unsigned long) const {\n    return static_cast<unsigned long>(half_impl::half_to_float(*this));\n  }\n  EIGEN_DEVICE_FUNC EIGEN_EXPLICIT_CAST(long long) const {\n    return static_cast<long long>(half_impl::half_to_float(*this));\n  }\n  EIGEN_DEVICE_FUNC EIGEN_EXPLICIT_CAST(unsigned long long) const {\n    return static_cast<unsigned long long>(half_to_float(*this));\n  }\n  EIGEN_DEVICE_FUNC EIGEN_EXPLICIT_CAST(float) const {\n    return half_impl::half_to_float(*this);\n  }\n  EIGEN_DEVICE_FUNC EIGEN_EXPLICIT_CAST(double) const {\n    return static_cast<double>(half_impl::half_to_float(*this));\n  }\n};\n\n} // end namespace Eigen\n\nnamespace std {\ntemplate<>\nstruct numeric_limits<Eigen::half> {\n  static const bool is_specialized = true;\n  static const bool is_signed = true;\n  static const bool is_integer = false;\n  static const bool is_exact = false;\n  static const bool has_infinity = true;\n  static const bool has_quiet_NaN = true;\n  static const bool has_signaling_NaN = true;\n  static const float_denorm_style has_denorm = denorm_present;\n  static const bool has_denorm_loss = false;\n  static const std::float_round_style round_style = std::round_to_nearest;\n  static const bool is_iec559 = false;\n  static const bool is_bounded = false;\n  static const bool is_modulo = false;\n  static const int digits = 11;\n  static const int digits10 = 3;      // according to http://half.sourceforge.net/structstd_1_1numeric__limits_3_01half__float_1_1half_01_4.html\n  static const int max_digits10 = 5;  // according to http://half.sourceforge.net/structstd_1_1numeric__limits_3_01half__float_1_1half_01_4.html\n  static const int radix = 2;\n  static const int min_exponent = -13;\n  static const int min_exponent10 = -4;\n  static const int max_exponent = 16;\n  static const int max_exponent10 = 4;\n  static const bool traps = true;\n  static const bool tinyness_before = false;\n\n  static Eigen::half (min)() { return Eigen::half_impl::raw_uint16_to_half(0x400); }\n  static Eigen::half lowest() { return Eigen::half_impl::raw_uint16_to_half(0xfbff); }\n  static Eigen::half (max)() { return Eigen::half_impl::raw_uint16_to_half(0x7bff); }\n  static Eigen::half epsilon() { return Eigen::half_impl::raw_uint16_to_half(0x0800); }\n  static Eigen::half round_error() { return Eigen::half(0.5); }\n  static Eigen::half infinity() { return Eigen::half_impl::raw_uint16_to_half(0x7c00); }\n  static Eigen::half quiet_NaN() { return Eigen::half_impl::raw_uint16_to_half(0x7e00); }\n  static Eigen::half signaling_NaN() { return Eigen::half_impl::raw_uint16_to_half(0x7e00); }\n  static Eigen::half denorm_min() { return Eigen::half_impl::raw_uint16_to_half(0x1); }\n};\n\n// If std::numeric_limits<T> is specialized, should also specialize\n// std::numeric_limits<const T>, std::numeric_limits<volatile T>, and\n// std::numeric_limits<const volatile T>\n// https://stackoverflow.com/a/16519653/\ntemplate<>\nstruct numeric_limits<const Eigen::half> : numeric_limits<Eigen::half> {};\ntemplate<>\nstruct numeric_limits<volatile Eigen::half> : numeric_limits<Eigen::half> {};\ntemplate<>\nstruct numeric_limits<const volatile Eigen::half> : numeric_limits<Eigen::half> {};\n} // end namespace std\n\nnamespace Eigen {\n\nnamespace half_impl {\n\n#if (defined(EIGEN_HAS_CUDA_FP16) && defined(EIGEN_CUDA_ARCH) && \\\n     EIGEN_CUDA_ARCH >= 530) ||                                  \\\n    (defined(EIGEN_HAS_HIP_FP16) && defined(HIP_DEVICE_COMPILE))\n#define EIGEN_HAS_NATIVE_FP16\n#endif\n\n// Intrinsics for native fp16 support. Note that on current hardware,\n// these are no faster than fp32 arithmetic (you need to use the half2\n// versions to get the ALU speed increased), but you do save the\n// conversion steps back and forth.\n\n#if defined(EIGEN_HAS_NATIVE_FP16)\nEIGEN_STRONG_INLINE __device__ half operator + (const half& a, const half& b) {\n#if defined(EIGEN_CUDA_SDK_VER) && EIGEN_CUDA_SDK_VER >= 90000\n  return __hadd(::__half(a), ::__half(b));\n#else\n  return __hadd(a, b);\n#endif\n}\nEIGEN_STRONG_INLINE __device__ half operator * (const half& a, const half& b) {\n  return __hmul(a, b);\n}\nEIGEN_STRONG_INLINE __device__ half operator - (const half& a, const half& b) {\n  return __hsub(a, b);\n}\nEIGEN_STRONG_INLINE __device__ half operator / (const half& a, const half& b) {\n#if defined(EIGEN_CUDA_SDK_VER) && EIGEN_CUDA_SDK_VER >= 90000\n  return __hdiv(a, b);\n#else\n  float num = __half2float(a);\n  float denom = __half2float(b);\n  return __float2half(num / denom);\n#endif\n}\nEIGEN_STRONG_INLINE __device__ half operator - (const half& a) {\n  return __hneg(a);\n}\nEIGEN_STRONG_INLINE __device__ half& operator += (half& a, const half& b) {\n  a = a + b;\n  return a;\n}\nEIGEN_STRONG_INLINE __device__ half& operator *= (half& a, const half& b) {\n  a = a * b;\n  return a;\n}\nEIGEN_STRONG_INLINE __device__ half& operator -= (half& a, const half& b) {\n  a = a - b;\n  return a;\n}\nEIGEN_STRONG_INLINE __device__ half& operator /= (half& a, const half& b) {\n  a = a / b;\n  return a;\n}\nEIGEN_STRONG_INLINE __device__ bool operator == (const half& a, const half& b) {\n  return __heq(a, b);\n}\nEIGEN_STRONG_INLINE __device__ bool operator != (const half& a, const half& b) {\n  return __hne(a, b);\n}\nEIGEN_STRONG_INLINE __device__ bool operator < (const half& a, const half& b) {\n  return __hlt(a, b);\n}\nEIGEN_STRONG_INLINE __device__ bool operator <= (const half& a, const half& b) {\n  return __hle(a, b);\n}\nEIGEN_STRONG_INLINE __device__ bool operator > (const half& a, const half& b) {\n  return __hgt(a, b);\n}\nEIGEN_STRONG_INLINE __device__ bool operator >= (const half& a, const half& b) {\n  return __hge(a, b);\n}\n\n#endif\n\n// We need to distinguish ‘clang as the CUDA compiler’ from ‘clang as the host compiler,\n// invoked by NVCC’ (e.g. on MacOS). The former needs to see both host and device implementation\n// of the functions, while the latter can only deal with one of them.\n#if !defined(EIGEN_HAS_NATIVE_FP16) || (EIGEN_COMP_CLANG && !EIGEN_COMP_NVCC) // Emulate support for half floats\n\n#if EIGEN_COMP_CLANG && defined(EIGEN_CUDACC)\n// We need to provide emulated *host-side* FP16 operators for clang.\n#pragma push_macro(\"EIGEN_DEVICE_FUNC\")\n#undef EIGEN_DEVICE_FUNC\n#if defined(EIGEN_HAS_CUDA_FP16) && defined(EIGEN_HAS_NATIVE_FP16)\n#define EIGEN_DEVICE_FUNC __host__\n#else // both host and device need emulated ops.\n#define EIGEN_DEVICE_FUNC __host__ __device__\n#endif\n#endif\n\n// Definitions for CPUs and older HIP+CUDA, mostly working through conversion\n// to/from fp32.\n\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half operator + (const half& a, const half& b) {\n  return half(float(a) + float(b));\n}\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half operator * (const half& a, const half& b) {\n  return half(float(a) * float(b));\n}\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half operator - (const half& a, const half& b) {\n  return half(float(a) - float(b));\n}\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half operator / (const half& a, const half& b) {\n  return half(float(a) / float(b));\n}\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half operator - (const half& a) {\n  half result;\n  result.x = a.x ^ 0x8000;\n  return result;\n}\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half& operator += (half& a, const half& b) {\n  a = half(float(a) + float(b));\n  return a;\n}\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half& operator *= (half& a, const half& b) {\n  a = half(float(a) * float(b));\n  return a;\n}\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half& operator -= (half& a, const half& b) {\n  a = half(float(a) - float(b));\n  return a;\n}\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half& operator /= (half& a, const half& b) {\n  a = half(float(a) / float(b));\n  return a;\n}\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool operator == (const half& a, const half& b) {\n  return numext::equal_strict(float(a),float(b));\n}\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool operator != (const half& a, const half& b) {\n  return numext::not_equal_strict(float(a), float(b));\n}\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool operator < (const half& a, const half& b) {\n  return float(a) < float(b);\n}\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool operator <= (const half& a, const half& b) {\n  return float(a) <= float(b);\n}\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool operator > (const half& a, const half& b) {\n  return float(a) > float(b);\n}\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool operator >= (const half& a, const half& b) {\n  return float(a) >= float(b);\n}\n\n#if defined(__clang__) && defined(__CUDA__)\n#pragma pop_macro(\"EIGEN_DEVICE_FUNC\")\n#endif\n#endif  // Emulate support for half floats\n\n// Division by an index. Do it in full float precision to avoid accuracy\n// issues in converting the denominator to half.\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half operator / (const half& a, Index b) {\n  return half(static_cast<float>(a) / static_cast<float>(b));\n}\n\n// Conversion routines, including fallbacks for the host or older CUDA.\n// Note that newer Intel CPUs (Haswell or newer) have vectorized versions of\n// these in hardware. If we need more performance on older/other CPUs, they are\n// also possible to vectorize directly.\n\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC __half_raw raw_uint16_to_half(unsigned short x) {\n  __half_raw h;\n  h.x = x;\n  return h;\n}\n\nunion float32_bits {\n  unsigned int u;\n  float f;\n};\n\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC __half_raw float_to_half_rtne(float ff) {\n#if (defined(EIGEN_HAS_CUDA_FP16) && defined(EIGEN_CUDA_ARCH) && EIGEN_CUDA_ARCH >= 300) || \\\n  (defined(EIGEN_HAS_HIP_FP16) && defined(EIGEN_HIP_DEVICE_COMPILE))\n  __half tmp_ff = __float2half(ff);\n  return *(__half_raw*)&tmp_ff;\n\n#elif defined(EIGEN_HAS_FP16_C)\n  __half_raw h;\n  h.x = _cvtss_sh(ff, 0);\n  return h;\n\n#else\n  float32_bits f; f.f = ff;\n\n  const float32_bits f32infty = { 255 << 23 };\n  const float32_bits f16max = { (127 + 16) << 23 };\n  const float32_bits denorm_magic = { ((127 - 15) + (23 - 10) + 1) << 23 };\n  unsigned int sign_mask = 0x80000000u;\n  __half_raw o;\n  o.x = static_cast<unsigned short>(0x0u);\n\n  unsigned int sign = f.u & sign_mask;\n  f.u ^= sign;\n\n  // NOTE all the integer compares in this function can be safely\n  // compiled into signed compares since all operands are below\n  // 0x80000000. Important if you want fast straight SSE2 code\n  // (since there's no unsigned PCMPGTD).\n\n  if (f.u >= f16max.u) {  // result is Inf or NaN (all exponent bits set)\n    o.x = (f.u > f32infty.u) ? 0x7e00 : 0x7c00; // NaN->qNaN and Inf->Inf\n  } else {  // (De)normalized number or zero\n    if (f.u < (113 << 23)) {  // resulting FP16 is subnormal or zero\n      // use a magic value to align our 10 mantissa bits at the bottom of\n      // the float. as long as FP addition is round-to-nearest-even this\n      // just works.\n      f.f += denorm_magic.f;\n\n      // and one integer subtract of the bias later, we have our final float!\n      o.x = static_cast<unsigned short>(f.u - denorm_magic.u);\n    } else {\n      unsigned int mant_odd = (f.u >> 13) & 1; // resulting mantissa is odd\n\n      // update exponent, rounding bias part 1\n      f.u += ((unsigned int)(15 - 127) << 23) + 0xfff;\n      // rounding bias part 2\n      f.u += mant_odd;\n      // take the bits!\n      o.x = static_cast<unsigned short>(f.u >> 13);\n    }\n  }\n\n  o.x |= static_cast<unsigned short>(sign >> 16);\n  return o;\n#endif\n}\n\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC float half_to_float(__half_raw h) {\n#if (defined(EIGEN_HAS_CUDA_FP16) && defined(EIGEN_CUDA_ARCH) && EIGEN_CUDA_ARCH >= 300) || \\\n  (defined(EIGEN_HAS_HIP_FP16) && defined(EIGEN_HIP_DEVICE_COMPILE))\n  return __half2float(h);\n\n#elif defined(EIGEN_HAS_FP16_C)\n  return _cvtsh_ss(h.x);\n\n#else\n  const float32_bits magic = { 113 << 23 };\n  const unsigned int shifted_exp = 0x7c00 << 13; // exponent mask after shift\n  float32_bits o;\n\n  o.u = (h.x & 0x7fff) << 13;             // exponent/mantissa bits\n  unsigned int exp = shifted_exp & o.u;   // just the exponent\n  o.u += (127 - 15) << 23;                // exponent adjust\n\n  // handle exponent special cases\n  if (exp == shifted_exp) {     // Inf/NaN?\n    o.u += (128 - 16) << 23;    // extra exp adjust\n  } else if (exp == 0) {        // Zero/Denormal?\n    o.u += 1 << 23;             // extra exp adjust\n    o.f -= magic.f;             // renormalize\n  }\n\n  o.u |= (h.x & 0x8000) << 16;    // sign bit\n  return o.f;\n#endif\n}\n\n// --- standard functions ---\n\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool (isinf)(const half& a) {\n  return (a.x & 0x7fff) == 0x7c00;\n}\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool (isnan)(const half& a) {\n#if (defined(EIGEN_HAS_CUDA_FP16) && defined(EIGEN_CUDA_ARCH) && EIGEN_CUDA_ARCH >= 530) || \\\n  (defined(EIGEN_HAS_HIP_FP16) && defined(EIGEN_HIP_DEVICE_COMPILE))\n  return __hisnan(a);\n#else\n  return (a.x & 0x7fff) > 0x7c00;\n#endif\n}\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool (isfinite)(const half& a) {\n  return !(isinf EIGEN_NOT_A_MACRO (a)) && !(isnan EIGEN_NOT_A_MACRO (a));\n}\n\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half abs(const half& a) {\n  half result;\n  result.x = a.x & 0x7FFF;\n  return result;\n}\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half exp(const half& a) {\n#if (EIGEN_CUDA_SDK_VER >= 80000 && defined EIGEN_CUDA_ARCH && EIGEN_CUDA_ARCH >= 530) || \\\n  defined(EIGEN_HIP_DEVICE_COMPILE)\n  return half(hexp(a));\n#else\n   return half(::expf(float(a)));\n#endif\n}\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half expm1(const half& a) {\n  return half(numext::expm1(float(a)));\n}\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half log(const half& a) {\n#if (defined(EIGEN_HAS_CUDA_FP16) && EIGEN_CUDA_SDK_VER >= 80000 && defined(EIGEN_CUDA_ARCH) && EIGEN_CUDA_ARCH >= 530) || \\\n  (defined(EIGEN_HAS_HIP_FP16) && defined(EIGEN_HIP_DEVICE_COMPILE))\n  return half(::hlog(a));\n#else\n  return half(::logf(float(a)));\n#endif\n}\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half log1p(const half& a) {\n  return half(numext::log1p(float(a)));\n}\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half log10(const half& a) {\n  return half(::log10f(float(a)));\n}\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half sqrt(const half& a) {\n#if (EIGEN_CUDA_SDK_VER >= 80000 && defined EIGEN_CUDA_ARCH && EIGEN_CUDA_ARCH >= 530) || \\\n  defined(EIGEN_HIP_DEVICE_COMPILE)\n  return half(hsqrt(a));\n#else\n    return half(::sqrtf(float(a)));\n#endif\n}\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half pow(const half& a, const half& b) {\n  return half(::powf(float(a), float(b)));\n}\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half sin(const half& a) {\n  return half(::sinf(float(a)));\n}\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half cos(const half& a) {\n  return half(::cosf(float(a)));\n}\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half tan(const half& a) {\n  return half(::tanf(float(a)));\n}\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half tanh(const half& a) {\n  return half(::tanhf(float(a)));\n}\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half floor(const half& a) {\n#if (EIGEN_CUDA_SDK_VER >= 80000 && defined EIGEN_CUDA_ARCH && EIGEN_CUDA_ARCH >= 300) || \\\n  defined(EIGEN_HIP_DEVICE_COMPILE)\n  return half(hfloor(a));\n#else\n  return half(::floorf(float(a)));\n#endif\n}\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half ceil(const half& a) {\n#if (EIGEN_CUDA_SDK_VER >= 80000 && defined EIGEN_CUDA_ARCH && EIGEN_CUDA_ARCH >= 300) || \\\n  defined(EIGEN_HIP_DEVICE_COMPILE)\n  return half(hceil(a));\n#else\n  return half(::ceilf(float(a)));\n#endif\n}\n\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half (min)(const half& a, const half& b) {\n#if (defined(EIGEN_HAS_CUDA_FP16) && defined(EIGEN_CUDA_ARCH) && EIGEN_CUDA_ARCH >= 530) || \\\n  (defined(EIGEN_HAS_HIP_FP16) && defined(EIGEN_HIP_DEVICE_COMPILE))\n  return __hlt(b, a) ? b : a;\n#else\n  const float f1 = static_cast<float>(a);\n  const float f2 = static_cast<float>(b);\n  return f2 < f1 ? b : a;\n#endif\n}\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half (max)(const half& a, const half& b) {\n#if (defined(EIGEN_HAS_CUDA_FP16) && defined(EIGEN_CUDA_ARCH) && EIGEN_CUDA_ARCH >= 530) || \\\n  (defined(EIGEN_HAS_HIP_FP16) && defined(EIGEN_HIP_DEVICE_COMPILE))\n  return __hlt(a, b) ? b : a;\n#else\n  const float f1 = static_cast<float>(a);\n  const float f2 = static_cast<float>(b);\n  return f1 < f2 ? b : a;\n#endif\n}\n\n#ifndef EIGEN_NO_IO\nEIGEN_ALWAYS_INLINE std::ostream& operator << (std::ostream& os, const half& v) {\n  os << static_cast<float>(v);\n  return os;\n}\n#endif\n\n} // end namespace half_impl\n\n// import Eigen::half_impl::half into Eigen namespace\n// using half_impl::half;\n\nnamespace internal {\n\ntemplate<>\nstruct random_default_impl<half, false, false>\n{\n  static inline half run(const half& x, const half& y)\n  {\n    return x + (y-x) * half(float(std::rand()) / float(RAND_MAX));\n  }\n  static inline half run()\n  {\n    return run(half(-1.f), half(1.f));\n  }\n};\n\ntemplate<> struct is_arithmetic<half> { enum { value = true }; };\n\n} // end namespace internal\n\ntemplate<> struct NumTraits<Eigen::half>\n    : GenericNumTraits<Eigen::half>\n{\n  enum {\n    IsSigned = true,\n    IsInteger = false,\n    IsComplex = false,\n    RequireInitialization = false\n  };\n\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Eigen::half epsilon() {\n    return half_impl::raw_uint16_to_half(0x0800);\n  }\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Eigen::half dummy_precision() { return Eigen::half(1e-2f); }\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Eigen::half highest() {\n    return half_impl::raw_uint16_to_half(0x7bff);\n  }\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Eigen::half lowest() {\n    return half_impl::raw_uint16_to_half(0xfbff);\n  }\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Eigen::half infinity() {\n    return half_impl::raw_uint16_to_half(0x7c00);\n  }\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Eigen::half quiet_NaN() {\n    return half_impl::raw_uint16_to_half(0x7c01);\n  }\n};\n\n} // end namespace Eigen\n\n// C-like standard mathematical functions and trancendentals.\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half fabsh(const Eigen::half& a) {\n  Eigen::half result;\n  result.x = a.x & 0x7FFF;\n  return result;\n}\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half exph(const Eigen::half& a) {\n  return Eigen::half(::expf(float(a)));\n}\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half logh(const Eigen::half& a) {\n#if (EIGEN_CUDA_SDK_VER >= 80000 && defined(EIGEN_CUDA_ARCH) && EIGEN_CUDA_ARCH >= 530) || \\\n  defined(EIGEN_HIP_DEVICE_COMPILE)\n  return Eigen::half(::hlog(a));\n#else\n  return Eigen::half(::logf(float(a)));\n#endif\n}\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half sqrth(const Eigen::half& a) {\n  return Eigen::half(::sqrtf(float(a)));\n}\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half powh(const Eigen::half& a, const Eigen::half& b) {\n  return Eigen::half(::powf(float(a), float(b)));\n}\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half floorh(const Eigen::half& a) {\n  return Eigen::half(::floorf(float(a)));\n}\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half ceilh(const Eigen::half& a) {\n  return Eigen::half(::ceilf(float(a)));\n}\n\nnamespace std {\n\n#if __cplusplus > 199711L\ntemplate <>\nstruct hash<Eigen::half> {\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::size_t operator()(const Eigen::half& a) const {\n    return static_cast<std::size_t>(a.x);\n  }\n};\n#endif\n\n} // end namespace std\n\n\n// Add the missing shfl_xor intrinsic\n#if (defined(EIGEN_CUDA_ARCH) && EIGEN_CUDA_ARCH >= 300) || \\\n  defined(EIGEN_HIPCC)\n\n__device__ EIGEN_STRONG_INLINE Eigen::half __shfl_xor(Eigen::half var, int laneMask, int width=warpSize) {\n  #if (EIGEN_CUDA_SDK_VER < 90000) || \\\n    defined(EIGEN_HAS_HIP_FP16)\n  return static_cast<Eigen::half>(__shfl_xor(static_cast<float>(var), laneMask, width));\n  #else\n  return static_cast<Eigen::half>(__shfl_xor_sync(0xFFFFFFFF, static_cast<float>(var), laneMask, width));\n  #endif\n}\n#endif\n\n// ldg() has an overload for __half_raw, but we also need one for Eigen::half.\n#if (defined(EIGEN_CUDA_ARCH) && EIGEN_CUDA_ARCH >= 350) || \\\n  defined(EIGEN_HIPCC)\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half __ldg(const Eigen::half* ptr) {\n  return Eigen::half_impl::raw_uint16_to_half(\n      __ldg(reinterpret_cast<const unsigned short*>(ptr)));\n}\n#endif\n\n\n#if defined(EIGEN_GPU_COMPILE_PHASE)\nnamespace Eigen {\nnamespace numext {\n\ntemplate<>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nbool (isnan)(const Eigen::half& h) {\n  return (half_impl::isnan)(h);\n}\n\ntemplate<>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nbool (isinf)(const Eigen::half& h) {\n  return (half_impl::isinf)(h);\n}\n\ntemplate<>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nbool (isfinite)(const Eigen::half& h) {\n  return (half_impl::isfinite)(h);\n}\n\n} // namespace Eigen\n}  // namespace numext\n#endif\n\n#endif // EIGEN_HALF_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/Default/Settings.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n\n/* All the parameters defined in this file can be specialized in the\n * architecture specific files, and/or by the user.\n * More to come... */\n\n#ifndef EIGEN_DEFAULT_SETTINGS_H\n#define EIGEN_DEFAULT_SETTINGS_H\n\n/** Defines the maximal loop size to enable meta unrolling of loops.\n  * Note that the value here is expressed in Eigen's own notion of \"number of FLOPS\",\n  * it does not correspond to the number of iterations or the number of instructions\n  */\n#ifndef EIGEN_UNROLLING_LIMIT\n#define EIGEN_UNROLLING_LIMIT 110\n#endif\n\n/** Defines the threshold between a \"small\" and a \"large\" matrix.\n  * This threshold is mainly used to select the proper product implementation.\n  */\n#ifndef EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD\n#define EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 8\n#endif\n\n/** Defines the maximal width of the blocks used in the triangular product and solver\n  * for vectors (level 2 blas xTRMV and xTRSV). The default is 8.\n  */\n#ifndef EIGEN_TUNE_TRIANGULAR_PANEL_WIDTH\n#define EIGEN_TUNE_TRIANGULAR_PANEL_WIDTH 8\n#endif\n\n\n/** Defines the default number of registers available for that architecture.\n  * Currently it must be 8 or 16. Other values will fail.\n  */\n#ifndef EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS\n#define EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS 8\n#endif\n\n#endif // EIGEN_DEFAULT_SETTINGS_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/Default/TypeCasting.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Benoit Steiner <benoit.steiner.goog@gmail.com>\n// Copyright (C) 2019 Rasmus Munk Larsen <rmlarsen@google.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_GENERIC_TYPE_CASTING_H\n#define EIGEN_GENERIC_TYPE_CASTING_H\n\nnamespace Eigen {\n\nnamespace internal {\n\ntemplate<>\nstruct scalar_cast_op<float, Eigen::half> {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_cast_op)\n  typedef Eigen::half result_type;\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::half operator() (const float& a) const {\n    #if (defined(EIGEN_HAS_CUDA_FP16) && defined(EIGEN_CUDA_ARCH) && EIGEN_CUDA_ARCH >= 300) || \\\n      (defined(EIGEN_HAS_HIP_FP16) && defined(EIGEN_HIP_DEVICE_COMPILE))\n      return __float2half(a);\n    #else\n      return Eigen::half(a);\n    #endif\n  }\n};\n\ntemplate<>\nstruct functor_traits<scalar_cast_op<float, Eigen::half> >\n{ enum { Cost = NumTraits<float>::AddCost, PacketAccess = false }; };\n\n\ntemplate<>\nstruct scalar_cast_op<int, Eigen::half> {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_cast_op)\n  typedef Eigen::half result_type;\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::half operator() (const int& a) const {\n    #if (defined(EIGEN_HAS_CUDA_FP16) && defined(EIGEN_CUDA_ARCH) && EIGEN_CUDA_ARCH >= 300) || \\\n      (defined(EIGEN_HAS_HIP_FP16) && defined(EIGEN_HIP_DEVICE_COMPILE))\n      return __float2half(static_cast<float>(a));\n    #else\n      return Eigen::half(static_cast<float>(a));\n    #endif\n  }\n};\n\ntemplate<>\nstruct functor_traits<scalar_cast_op<int, Eigen::half> >\n{ enum { Cost = NumTraits<float>::AddCost, PacketAccess = false }; };\n\n\ntemplate<>\nstruct scalar_cast_op<Eigen::half, float> {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_cast_op)\n  typedef float result_type;\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float operator() (const Eigen::half& a) const {\n    #if (defined(EIGEN_HAS_CUDA_FP16) && defined(EIGEN_CUDA_ARCH) && EIGEN_CUDA_ARCH >= 300) || \\\n      (defined(EIGEN_HAS_HIP_FP16) && defined(EIGEN_HIP_DEVICE_COMPILE))\n      return __half2float(a);\n    #else\n      return static_cast<float>(a);\n    #endif\n  }\n};\n\ntemplate<>\nstruct functor_traits<scalar_cast_op<Eigen::half, float> >\n{ enum { Cost = NumTraits<float>::AddCost, PacketAccess = false }; };\n\n}\n}\n\n#endif  // EIGEN_GENERIC_TYPE_CASTING_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/GPU/MathFunctions.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_MATH_FUNCTIONS_GPU_H\n#define EIGEN_MATH_FUNCTIONS_GPU_H\n\nnamespace Eigen {\n\nnamespace internal {\n\n// Make sure this is only available when targeting a GPU: we don't want to\n// introduce conflicts between these packet_traits definitions and the ones\n// we'll use on the host side (SSE, AVX, ...)\n#if defined(EIGEN_GPUCC) && defined(EIGEN_USE_GPU)\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nfloat4 plog<float4>(const float4& a)\n{\n  return make_float4(logf(a.x), logf(a.y), logf(a.z), logf(a.w));\n}\n\ntemplate<>  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ndouble2 plog<double2>(const double2& a)\n{\n  using ::log;\n  return make_double2(log(a.x), log(a.y));\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nfloat4 plog1p<float4>(const float4& a)\n{\n  return make_float4(log1pf(a.x), log1pf(a.y), log1pf(a.z), log1pf(a.w));\n}\n\ntemplate<>  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ndouble2 plog1p<double2>(const double2& a)\n{\n  return make_double2(log1p(a.x), log1p(a.y));\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nfloat4 pexp<float4>(const float4& a)\n{\n  return make_float4(expf(a.x), expf(a.y), expf(a.z), expf(a.w));\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ndouble2 pexp<double2>(const double2& a)\n{\n  using ::exp;\n  return make_double2(exp(a.x), exp(a.y));\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nfloat4 pexpm1<float4>(const float4& a)\n{\n  return make_float4(expm1f(a.x), expm1f(a.y), expm1f(a.z), expm1f(a.w));\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ndouble2 pexpm1<double2>(const double2& a)\n{\n  return make_double2(expm1(a.x), expm1(a.y));\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nfloat4 psqrt<float4>(const float4& a)\n{\n  return make_float4(sqrtf(a.x), sqrtf(a.y), sqrtf(a.z), sqrtf(a.w));\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ndouble2 psqrt<double2>(const double2& a)\n{\n  using ::sqrt;\n  return make_double2(sqrt(a.x), sqrt(a.y));\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nfloat4 prsqrt<float4>(const float4& a)\n{\n  return make_float4(rsqrtf(a.x), rsqrtf(a.y), rsqrtf(a.z), rsqrtf(a.w));\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ndouble2 prsqrt<double2>(const double2& a)\n{\n  return make_double2(rsqrt(a.x), rsqrt(a.y));\n}\n\n\n#endif\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_MATH_FUNCTIONS_GPU_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/GPU/PacketMath.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_PACKET_MATH_GPU_H\n#define EIGEN_PACKET_MATH_GPU_H\n\nnamespace Eigen {\n\nnamespace internal {\n\n// Make sure this is only available when targeting a GPU: we don't want to\n// introduce conflicts between these packet_traits definitions and the ones\n// we'll use on the host side (SSE, AVX, ...)\n#if defined(EIGEN_GPUCC) && defined(EIGEN_USE_GPU)\ntemplate<> struct is_arithmetic<float4>  { enum { value = true }; };\ntemplate<> struct is_arithmetic<double2> { enum { value = true }; };\n\ntemplate<> struct packet_traits<float> : default_packet_traits\n{\n  typedef float4 type;\n  typedef float4 half;\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size=4,\n    HasHalfPacket = 0,\n\n    HasDiv  = 1,\n    HasSin  = 0,\n    HasCos  = 0,\n    HasLog  = 1,\n    HasExp  = 1,\n    HasSqrt = 1,\n    HasRsqrt = 1,\n    HasLGamma = 1,\n    HasDiGamma = 1,\n    HasZeta = 1,\n    HasPolygamma = 1,\n    HasErf = 1,\n    HasErfc = 1,\n    HasNdtri = 1,\n    HasBessel = 1,\n    HasIGamma = 1,\n    HasIGammaDerA = 1,\n    HasGammaSampleDerAlpha = 1,\n    HasIGammac = 1,\n    HasBetaInc = 1,\n\n    HasBlend = 0,\n    HasFloor = 1,\n  };\n};\n\ntemplate<> struct packet_traits<double> : default_packet_traits\n{\n  typedef double2 type;\n  typedef double2 half;\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size=2,\n    HasHalfPacket = 0,\n\n    HasDiv  = 1,\n    HasLog  = 1,\n    HasExp  = 1,\n    HasSqrt = 1,\n    HasRsqrt = 1,\n    HasLGamma = 1,\n    HasDiGamma = 1,\n    HasZeta = 1,\n    HasPolygamma = 1,\n    HasErf = 1,\n    HasErfc = 1,\n    HasNdtri = 1,\n    HasBessel = 1,\n    HasIGamma = 1,\n    HasIGammaDerA = 1,\n    HasGammaSampleDerAlpha = 1,\n    HasIGammac = 1,\n    HasBetaInc = 1,\n\n    HasBlend = 0,\n    HasFloor = 1,\n  };\n};\n\n\ntemplate<> struct unpacket_traits<float4>  { typedef float  type; enum {size=4, alignment=Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false}; typedef float4 half; };\ntemplate<> struct unpacket_traits<double2> { typedef double type; enum {size=2, alignment=Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false}; typedef double2 half; };\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 pset1<float4>(const float&  from) {\n  return make_float4(from, from, from, from);\n}\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2 pset1<double2>(const double& from) {\n  return make_double2(from, from);\n}\n\n// We need to distinguish ‘clang as the CUDA compiler’ from ‘clang as the host compiler,\n// invoked by NVCC’ (e.g. on MacOS). The former needs to see both host and device implementation\n// of the functions, while the latter can only deal with one of them.\n#if defined(EIGEN_CUDA_ARCH) || defined(EIGEN_HIPCC) || (defined(EIGEN_CUDACC) && EIGEN_COMP_CLANG && !EIGEN_COMP_NVCC)\nnamespace {\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float bitwise_and(const float& a,\n                                                        const float& b) {\n  return __int_as_float(__float_as_int(a) & __float_as_int(b));\n}\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double bitwise_and(const double& a,\n                                                         const double& b) {\n  return __longlong_as_double(__double_as_longlong(a) &\n                              __double_as_longlong(b));\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float bitwise_or(const float& a,\n                                                       const float& b) {\n  return __int_as_float(__float_as_int(a) | __float_as_int(b));\n}\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double bitwise_or(const double& a,\n                                                        const double& b) {\n  return __longlong_as_double(__double_as_longlong(a) |\n                              __double_as_longlong(b));\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float bitwise_xor(const float& a,\n                                                        const float& b) {\n  return __int_as_float(__float_as_int(a) ^ __float_as_int(b));\n}\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double bitwise_xor(const double& a,\n                                                         const double& b) {\n  return __longlong_as_double(__double_as_longlong(a) ^\n                              __double_as_longlong(b));\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float bitwise_andnot(const float& a,\n                                                           const float& b) {\n  return __int_as_float(__float_as_int(a) & ~__float_as_int(b));\n}\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double bitwise_andnot(const double& a,\n                                                            const double& b) {\n  return __longlong_as_double(__double_as_longlong(a) &\n                              ~__double_as_longlong(b));\n}\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float eq_mask(const float& a,\n                                                    const float& b) {\n  return __int_as_float(a == b ? 0xffffffffu : 0u);\n}\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double eq_mask(const double& a,\n                                                     const double& b) {\n  return __longlong_as_double(a == b ? 0xffffffffffffffffull : 0ull);\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float lt_mask(const float& a,\n                                                    const float& b) {\n  return __int_as_float(a < b ? 0xffffffffu : 0u);\n}\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double lt_mask(const double& a,\n                                                     const double& b) {\n  return __longlong_as_double(a < b ? 0xffffffffffffffffull : 0ull);\n}\n\n}  // namespace\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 pand<float4>(const float4& a,\n                                                          const float4& b) {\n  return make_float4(bitwise_and(a.x, b.x), bitwise_and(a.y, b.y),\n                     bitwise_and(a.z, b.z), bitwise_and(a.w, b.w));\n}\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2 pand<double2>(const double2& a,\n                                                            const double2& b) {\n  return make_double2(bitwise_and(a.x, b.x), bitwise_and(a.y, b.y));\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 por<float4>(const float4& a,\n                                                         const float4& b) {\n  return make_float4(bitwise_or(a.x, b.x), bitwise_or(a.y, b.y),\n                     bitwise_or(a.z, b.z), bitwise_or(a.w, b.w));\n}\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2 por<double2>(const double2& a,\n                                                           const double2& b) {\n  return make_double2(bitwise_or(a.x, b.x), bitwise_or(a.y, b.y));\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 pxor<float4>(const float4& a,\n                                                          const float4& b) {\n  return make_float4(bitwise_xor(a.x, b.x), bitwise_xor(a.y, b.y),\n                     bitwise_xor(a.z, b.z), bitwise_xor(a.w, b.w));\n}\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2 pxor<double2>(const double2& a,\n                                                            const double2& b) {\n  return make_double2(bitwise_xor(a.x, b.x), bitwise_xor(a.y, b.y));\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 pandnot<float4>(const float4& a,\n                                                             const float4& b) {\n  return make_float4(bitwise_andnot(a.x, b.x), bitwise_andnot(a.y, b.y),\n                     bitwise_andnot(a.z, b.z), bitwise_andnot(a.w, b.w));\n}\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2\npandnot<double2>(const double2& a, const double2& b) {\n  return make_double2(bitwise_andnot(a.x, b.x), bitwise_andnot(a.y, b.y));\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 pcmp_eq<float4>(const float4& a,\n                                                             const float4& b) {\n  return make_float4(eq_mask(a.x, b.x), eq_mask(a.y, b.y), eq_mask(a.z, b.z),\n                     eq_mask(a.w, b.w));\n}\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 pcmp_lt<float4>(const float4& a,\n                                                             const float4& b) {\n  return make_float4(lt_mask(a.x, b.x), lt_mask(a.y, b.y), lt_mask(a.z, b.z),\n                     lt_mask(a.w, b.w));\n}\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2\npcmp_eq<double2>(const double2& a, const double2& b) {\n  return make_double2(eq_mask(a.x, b.x), eq_mask(a.y, b.y));\n}\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2\npcmp_lt<double2>(const double2& a, const double2& b) {\n  return make_double2(lt_mask(a.x, b.x), lt_mask(a.y, b.y));\n}\n#endif  // EIGEN_CUDA_ARCH || defined(EIGEN_HIP_DEVICE_COMPILE)\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 plset<float4>(const float& a) {\n  return make_float4(a, a+1, a+2, a+3);\n}\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2 plset<double2>(const double& a) {\n  return make_double2(a, a+1);\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 padd<float4>(const float4& a, const float4& b) {\n  return make_float4(a.x+b.x, a.y+b.y, a.z+b.z, a.w+b.w);\n}\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2 padd<double2>(const double2& a, const double2& b) {\n  return make_double2(a.x+b.x, a.y+b.y);\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 psub<float4>(const float4& a, const float4& b) {\n  return make_float4(a.x-b.x, a.y-b.y, a.z-b.z, a.w-b.w);\n}\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2 psub<double2>(const double2& a, const double2& b) {\n  return make_double2(a.x-b.x, a.y-b.y);\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 pnegate(const float4& a) {\n  return make_float4(-a.x, -a.y, -a.z, -a.w);\n}\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2 pnegate(const double2& a) {\n  return make_double2(-a.x, -a.y);\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 pconj(const float4& a) { return a; }\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2 pconj(const double2& a) { return a; }\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 pmul<float4>(const float4& a, const float4& b) {\n  return make_float4(a.x*b.x, a.y*b.y, a.z*b.z, a.w*b.w);\n}\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2 pmul<double2>(const double2& a, const double2& b) {\n  return make_double2(a.x*b.x, a.y*b.y);\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 pdiv<float4>(const float4& a, const float4& b) {\n  return make_float4(a.x/b.x, a.y/b.y, a.z/b.z, a.w/b.w);\n}\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2 pdiv<double2>(const double2& a, const double2& b) {\n  return make_double2(a.x/b.x, a.y/b.y);\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 pmin<float4>(const float4& a, const float4& b) {\n  return make_float4(fminf(a.x, b.x), fminf(a.y, b.y), fminf(a.z, b.z), fminf(a.w, b.w));\n}\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2 pmin<double2>(const double2& a, const double2& b) {\n  return make_double2(fmin(a.x, b.x), fmin(a.y, b.y));\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 pmax<float4>(const float4& a, const float4& b) {\n  return make_float4(fmaxf(a.x, b.x), fmaxf(a.y, b.y), fmaxf(a.z, b.z), fmaxf(a.w, b.w));\n}\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2 pmax<double2>(const double2& a, const double2& b) {\n  return make_double2(fmax(a.x, b.x), fmax(a.y, b.y));\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 pload<float4>(const float* from) {\n  return *reinterpret_cast<const float4*>(from);\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2 pload<double2>(const double* from) {\n  return *reinterpret_cast<const double2*>(from);\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 ploadu<float4>(const float* from) {\n  return make_float4(from[0], from[1], from[2], from[3]);\n}\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2 ploadu<double2>(const double* from) {\n  return make_double2(from[0], from[1]);\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 ploaddup<float4>(const float*   from) {\n  return make_float4(from[0], from[0], from[1], from[1]);\n}\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2 ploaddup<double2>(const double*  from) {\n  return make_double2(from[0], from[0]);\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void pstore<float>(float*   to, const float4& from) {\n  *reinterpret_cast<float4*>(to) = from;\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void pstore<double>(double* to, const double2& from) {\n  *reinterpret_cast<double2*>(to) = from;\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void pstoreu<float>(float*  to, const float4& from) {\n  to[0] = from.x;\n  to[1] = from.y;\n  to[2] = from.z;\n  to[3] = from.w;\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void pstoreu<double>(double* to, const double2& from) {\n  to[0] = from.x;\n  to[1] = from.y;\n}\n\ntemplate<>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE float4 ploadt_ro<float4, Aligned>(const float* from) {\n#if defined(EIGEN_CUDA_ARCH) && EIGEN_CUDA_ARCH >= 350\n  return __ldg((const float4*)from);\n#else\n  return make_float4(from[0], from[1], from[2], from[3]);\n#endif\n}\ntemplate<>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE double2 ploadt_ro<double2, Aligned>(const double* from) {\n#if defined(EIGEN_CUDA_ARCH) && EIGEN_CUDA_ARCH >= 350\n  return __ldg((const double2*)from);\n#else\n  return make_double2(from[0], from[1]);\n#endif\n}\n\ntemplate<>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE float4 ploadt_ro<float4, Unaligned>(const float* from) {\n#if defined(EIGEN_CUDA_ARCH) && EIGEN_CUDA_ARCH >= 350\n  return make_float4(__ldg(from+0), __ldg(from+1), __ldg(from+2), __ldg(from+3));\n#else\n  return make_float4(from[0], from[1], from[2], from[3]);\n#endif\n}\ntemplate<>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE double2 ploadt_ro<double2, Unaligned>(const double* from) {\n#if defined(EIGEN_CUDA_ARCH) && EIGEN_CUDA_ARCH >= 350\n  return make_double2(__ldg(from+0), __ldg(from+1));\n#else\n  return make_double2(from[0], from[1]);\n#endif\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline float4 pgather<float, float4>(const float* from, Index stride) {\n  return make_float4(from[0*stride], from[1*stride], from[2*stride], from[3*stride]);\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline double2 pgather<double, double2>(const double* from, Index stride) {\n  return make_double2(from[0*stride], from[1*stride]);\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<float, float4>(float* to, const float4& from, Index stride) {\n  to[stride*0] = from.x;\n  to[stride*1] = from.y;\n  to[stride*2] = from.z;\n  to[stride*3] = from.w;\n}\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<double, double2>(double* to, const double2& from, Index stride) {\n  to[stride*0] = from.x;\n  to[stride*1] = from.y;\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline float  pfirst<float4>(const float4& a) {\n  return a.x;\n}\ntemplate<> EIGEN_DEVICE_FUNC inline double pfirst<double2>(const double2& a) {\n  return a.x;\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline float  predux<float4>(const float4& a) {\n  return a.x + a.y + a.z + a.w;\n}\ntemplate<> EIGEN_DEVICE_FUNC inline double predux<double2>(const double2& a) {\n  return a.x + a.y;\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline float  predux_max<float4>(const float4& a) {\n  return fmaxf(fmaxf(a.x, a.y), fmaxf(a.z, a.w));\n}\ntemplate<> EIGEN_DEVICE_FUNC inline double predux_max<double2>(const double2& a) {\n  return fmax(a.x, a.y);\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline float  predux_min<float4>(const float4& a) {\n  return fminf(fminf(a.x, a.y), fminf(a.z, a.w));\n}\ntemplate<> EIGEN_DEVICE_FUNC inline double predux_min<double2>(const double2& a) {\n  return fmin(a.x, a.y);\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline float  predux_mul<float4>(const float4& a) {\n  return a.x * a.y * a.z * a.w;\n}\ntemplate<> EIGEN_DEVICE_FUNC inline double predux_mul<double2>(const double2& a) {\n  return a.x * a.y;\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline float4  pabs<float4>(const float4& a) {\n  return make_float4(fabsf(a.x), fabsf(a.y), fabsf(a.z), fabsf(a.w));\n}\ntemplate<> EIGEN_DEVICE_FUNC inline double2 pabs<double2>(const double2& a) {\n  return make_double2(fabs(a.x), fabs(a.y));\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline float4  pfloor<float4>(const float4& a) {\n  return make_float4(floorf(a.x), floorf(a.y), floorf(a.z), floorf(a.w));\n}\ntemplate<> EIGEN_DEVICE_FUNC inline double2 pfloor<double2>(const double2& a) {\n  return make_double2(floor(a.x), floor(a.y));\n}\n\nEIGEN_DEVICE_FUNC inline void\nptranspose(PacketBlock<float4,4>& kernel) {\n  float tmp = kernel.packet[0].y;\n  kernel.packet[0].y = kernel.packet[1].x;\n  kernel.packet[1].x = tmp;\n\n  tmp = kernel.packet[0].z;\n  kernel.packet[0].z = kernel.packet[2].x;\n  kernel.packet[2].x = tmp;\n\n  tmp = kernel.packet[0].w;\n  kernel.packet[0].w = kernel.packet[3].x;\n  kernel.packet[3].x = tmp;\n\n  tmp = kernel.packet[1].z;\n  kernel.packet[1].z = kernel.packet[2].y;\n  kernel.packet[2].y = tmp;\n\n  tmp = kernel.packet[1].w;\n  kernel.packet[1].w = kernel.packet[3].y;\n  kernel.packet[3].y = tmp;\n\n  tmp = kernel.packet[2].w;\n  kernel.packet[2].w = kernel.packet[3].z;\n  kernel.packet[3].z = tmp;\n}\n\nEIGEN_DEVICE_FUNC inline void\nptranspose(PacketBlock<double2,2>& kernel) {\n  double tmp = kernel.packet[0].y;\n  kernel.packet[0].y = kernel.packet[1].x;\n  kernel.packet[1].x = tmp;\n}\n\n#endif // defined(EIGEN_GPUCC) && defined(EIGEN_USE_GPU)\n\n// Packet4h2 must be defined in the macro without EIGEN_CUDA_ARCH, meaning\n// its corresponding packet_traits<Eigen::half> must be visible on host.\n#if (defined(EIGEN_HAS_CUDA_FP16) && defined(EIGEN_CUDACC)) || \\\n  (defined(EIGEN_HAS_HIP_FP16) && defined(EIGEN_HIPCC)) || \\\n  (defined(EIGEN_HAS_CUDA_FP16) && defined(__clang__) && defined(__CUDA__))\n\ntypedef ulonglong2 Packet4h2;\ntemplate<> struct unpacket_traits<Packet4h2> { typedef Eigen::half type; enum {size=8, alignment=Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false}; typedef Packet4h2 half; };\ntemplate<> struct is_arithmetic<Packet4h2> { enum { value = true }; };\n\ntemplate<> struct unpacket_traits<half2> { typedef Eigen::half type; enum {size=2, alignment=Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false}; typedef half2 half; };\ntemplate<> struct is_arithmetic<half2> { enum { value = true }; };\n\ntemplate<> struct packet_traits<Eigen::half> : default_packet_traits\n{\n  typedef Packet4h2 type;\n  typedef Packet4h2 half;\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size=8,\n    HasHalfPacket = 0,\n    HasAdd    = 1,\n    HasSub    = 1,\n    HasMul    = 1,\n    HasDiv    = 1,\n    HasSqrt   = 1,\n    HasRsqrt  = 1,\n    HasExp    = 1,\n    HasExpm1  = 1,\n    HasLog    = 1,\n    HasLog1p  = 1\n  };\n};\n\ntemplate<>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 pset1<half2>(const Eigen::half& from) {\n#if !defined(EIGEN_CUDA_ARCH) && !defined(EIGEN_HIPCC)\n  half2 r;\n  r.x = from;\n  r.y = from;\n  return r;\n#elif defined(EIGEN_HIPCC)\n  return __half2{from,from};\n#else\n  return __half2half2(from);\n#endif\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4h2\npset1<Packet4h2>(const Eigen::half& from) {\n  Packet4h2 r;\n  half2* p_alias = reinterpret_cast<half2*>(&r);\n  p_alias[0] = pset1<half2>(from);\n  p_alias[1] = pset1<half2>(from);\n  p_alias[2] = pset1<half2>(from);\n  p_alias[3] = pset1<half2>(from);\n  return r;\n}\n\n#if defined(EIGEN_CUDA_ARCH) || defined(EIGEN_HIPCC) || (defined(EIGEN_CUDACC) && EIGEN_COMP_CLANG && !EIGEN_COMP_NVCC)\nnamespace {\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 pload(const Eigen::half* from) {\n  return *reinterpret_cast<const half2*>(from);\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 ploadu(const Eigen::half* from) {\n  return __halves2half2(from[0], from[1]);\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 ploaddup(const Eigen::half*  from) {\n  return __halves2half2(from[0], from[0]);\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void pstore(Eigen::half* to,\n                                                  const half2& from) {\n  *reinterpret_cast<half2*>(to) = from;\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void pstoreu(Eigen::half* to,\n                                                   const half2& from) {\n#if !defined(EIGEN_CUDA_ARCH) && !defined(EIGEN_HIPCC)\n  to[0] = from.x;\n  to[1] = from.y;\n#else\n  to[0] = __low2half(from);\n  to[1] = __high2half(from);\n#endif\n}\n\n\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE half2 ploadt_ro_aligned(\n    const Eigen::half* from) {\n\n#if defined(EIGEN_HIP_DEVICE_COMPILE)\n\n  return __ldg((const half2*)from);\n\n#else  // EIGEN_CUDA_ARCH\n\n#if EIGEN_CUDA_ARCH >= 350\n   return __ldg((const half2*)from);\n#else\n  return __halves2half2(*(from+0), *(from+1));\n#endif\n\n#endif\n}\n\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE half2 ploadt_ro_unaligned(\n    const Eigen::half* from) {\n\n#if defined(EIGEN_HIP_DEVICE_COMPILE)\n\n  return __halves2half2(__ldg(from+0), __ldg(from+1));\n\n#else  // EIGEN_CUDA_ARCH\n\n#if EIGEN_CUDA_ARCH >= 350\n   return __halves2half2(__ldg(from+0), __ldg(from+1));\n#else\n  return __halves2half2(*(from+0), *(from+1));\n#endif\n\n#endif\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 pgather(const Eigen::half* from,\n                                                    Index stride) {\n  return __halves2half2(from[0*stride], from[1*stride]);\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void pscatter(\n    Eigen::half* to, const half2& from, Index stride) {\n  to[stride*0] = __low2half(from);\n  to[stride*1] = __high2half(from);\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::half pfirst(const half2& a) {\n  return __low2half(a);\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 pabs(const half2& a) {\n  half a1 = __low2half(a);\n  half a2 = __high2half(a);\n  half result1 = half_impl::raw_uint16_to_half(a1.x & 0x7FFF);\n  half result2 = half_impl::raw_uint16_to_half(a2.x & 0x7FFF);\n  return __halves2half2(result1, result2);\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 ptrue(const half2& a) {\n  half true_half = half_impl::raw_uint16_to_half(0xffffu);\n  return pset1<half2>(true_half);\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 pzero(const half2& a) {\n  half false_half = half_impl::raw_uint16_to_half(0x0000u);\n  return pset1<half2>(false_half);\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void\nptranspose(PacketBlock<half2,2>& kernel) {\n  __half a1 = __low2half(kernel.packet[0]);\n  __half a2 = __high2half(kernel.packet[0]);\n  __half b1 = __low2half(kernel.packet[1]);\n  __half b2 = __high2half(kernel.packet[1]);\n  kernel.packet[0] = __halves2half2(a1, b1);\n  kernel.packet[1] = __halves2half2(a2, b2);\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 plset(const Eigen::half& a) {\n#if defined(EIGEN_HIP_DEVICE_COMPILE)\n\n  return __halves2half2(a, __hadd(a, __float2half(1.0f)));\n\n#else  // EIGEN_CUDA_ARCH\n\n#if EIGEN_CUDA_ARCH >= 530\n  return __halves2half2(a, __hadd(a, __float2half(1.0f)));\n#else\n  float f = __half2float(a) + 1.0f;\n  return __halves2half2(a, __float2half(f));\n#endif\n\n#endif\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 pselect(const half2& mask,\n                                                    const half2& a,\n                                                    const half2& b) {\n  half mask_low = __low2half(mask);\n  half mask_high = __high2half(mask);\n  half result_low = mask_low == half(0) ? __low2half(b) : __low2half(a);\n  half result_high = mask_high == half(0) ? __high2half(b) : __high2half(a);\n  return __halves2half2(result_low, result_high);\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 pcmp_eq(const half2& a,\n                                                    const half2& b) {\n  half true_half = half_impl::raw_uint16_to_half(0xffffu);\n  half false_half = half_impl::raw_uint16_to_half(0x0000u);\n  half a1 = __low2half(a);\n  half a2 = __high2half(a);\n  half b1 = __low2half(b);\n  half b2 = __high2half(b);\n  half eq1 = __half2float(a1) == __half2float(b1) ? true_half : false_half;\n  half eq2 = __half2float(a2) == __half2float(b2) ? true_half : false_half;\n  return __halves2half2(eq1, eq2);\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 pcmp_lt(const half2& a,\n                                                    const half2& b) {\n  half true_half = half_impl::raw_uint16_to_half(0xffffu);\n  half false_half = half_impl::raw_uint16_to_half(0x0000u);\n  half a1 = __low2half(a);\n  half a2 = __high2half(a);\n  half b1 = __low2half(b);\n  half b2 = __high2half(b);\n  half eq1 = __half2float(a1) < __half2float(b1) ? true_half : false_half;\n  half eq2 = __half2float(a2) < __half2float(b2) ? true_half : false_half;\n  return __halves2half2(eq1, eq2);\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 pand(const half2& a,\n                                                 const half2& b) {\n  half a1 = __low2half(a);\n  half a2 = __high2half(a);\n  half b1 = __low2half(b);\n  half b2 = __high2half(b);\n  half result1 = half_impl::raw_uint16_to_half(a1.x & b1.x);\n  half result2 = half_impl::raw_uint16_to_half(a2.x & b2.x);\n  return __halves2half2(result1, result2);\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 por(const half2& a,\n                                                const half2& b) {\n  half a1 = __low2half(a);\n  half a2 = __high2half(a);\n  half b1 = __low2half(b);\n  half b2 = __high2half(b);\n  half result1 = half_impl::raw_uint16_to_half(a1.x | b1.x);\n  half result2 = half_impl::raw_uint16_to_half(a2.x | b2.x);\n  return __halves2half2(result1, result2);\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 pxor(const half2& a,\n                                                 const half2& b) {\n  half a1 = __low2half(a);\n  half a2 = __high2half(a);\n  half b1 = __low2half(b);\n  half b2 = __high2half(b);\n  half result1 = half_impl::raw_uint16_to_half(a1.x ^ b1.x);\n  half result2 = half_impl::raw_uint16_to_half(a2.x ^ b2.x);\n  return __halves2half2(result1, result2);\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 pandnot(const half2& a,\n                                                    const half2& b) {\n  half a1 = __low2half(a);\n  half a2 = __high2half(a);\n  half b1 = __low2half(b);\n  half b2 = __high2half(b);\n  half result1 = half_impl::raw_uint16_to_half(a1.x & ~b1.x);\n  half result2 = half_impl::raw_uint16_to_half(a2.x & ~b2.x);\n  return __halves2half2(result1, result2);\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 padd(const half2& a,\n                                                 const half2& b) {\n#if defined(EIGEN_HIP_DEVICE_COMPILE)\n\n  return __hadd2(a, b);\n\n#else  // EIGEN_CUDA_ARCH\n\n#if EIGEN_CUDA_ARCH >= 530\n  return __hadd2(a, b);\n#else\n  float a1 = __low2float(a);\n  float a2 = __high2float(a);\n  float b1 = __low2float(b);\n  float b2 = __high2float(b);\n  float r1 = a1 + b1;\n  float r2 = a2 + b2;\n  return __floats2half2_rn(r1, r2);\n#endif\n\n#endif\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 psub(const half2& a,\n                                                 const half2& b) {\n#if defined(EIGEN_HIP_DEVICE_COMPILE)\n\n  return __hsub2(a, b);\n\n#else  // EIGEN_CUDA_ARCH\n\n#if EIGEN_CUDA_ARCH >= 530\n  return __hsub2(a, b);\n#else\n  float a1 = __low2float(a);\n  float a2 = __high2float(a);\n  float b1 = __low2float(b);\n  float b2 = __high2float(b);\n  float r1 = a1 - b1;\n  float r2 = a2 - b2;\n  return __floats2half2_rn(r1, r2);\n#endif\n\n#endif\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 pnegate(const half2& a) {\n#if defined(EIGEN_HIP_DEVICE_COMPILE)\n\n  return __hneg2(a);\n\n#else  // EIGEN_CUDA_ARCH\n\n#if EIGEN_CUDA_ARCH >= 530\n  return __hneg2(a);\n#else\n  float a1 = __low2float(a);\n  float a2 = __high2float(a);\n  return __floats2half2_rn(-a1, -a2);\n#endif\n\n#endif\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 pconj(const half2& a) { return a; }\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 pmul(const half2& a,\n                                                 const half2& b) {\n#if defined(EIGEN_HIP_DEVICE_COMPILE)\n\n  return __hmul2(a, b);\n\n#else  // EIGEN_CUDA_ARCH\n\n#if EIGEN_CUDA_ARCH >= 530\n  return __hmul2(a, b);\n#else\n  float a1 = __low2float(a);\n  float a2 = __high2float(a);\n  float b1 = __low2float(b);\n  float b2 = __high2float(b);\n  float r1 = a1 * b1;\n  float r2 = a2 * b2;\n  return __floats2half2_rn(r1, r2);\n#endif\n\n#endif\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 pmadd(const half2& a,\n                                                  const half2& b,\n                                                  const half2& c) {\n#if defined(EIGEN_HIP_DEVICE_COMPILE)\n\n   return __hfma2(a, b, c);\n\n#else  // EIGEN_CUDA_ARCH\n\n#if EIGEN_CUDA_ARCH >= 530\n   return __hfma2(a, b, c);\n#else\n  float a1 = __low2float(a);\n  float a2 = __high2float(a);\n  float b1 = __low2float(b);\n  float b2 = __high2float(b);\n  float c1 = __low2float(c);\n  float c2 = __high2float(c);\n  float r1 = a1 * b1 + c1;\n  float r2 = a2 * b2 + c2;\n  return __floats2half2_rn(r1, r2);\n#endif\n\n#endif\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 pdiv(const half2& a,\n                                                 const half2& b) {\n#if defined(EIGEN_HIP_DEVICE_COMPILE)\n\n  return __h2div(a, b);\n\n#else // EIGEN_CUDA_ARCH\n\n  float a1 = __low2float(a);\n  float a2 = __high2float(a);\n  float b1 = __low2float(b);\n  float b2 = __high2float(b);\n  float r1 = a1 / b1;\n  float r2 = a2 / b2;\n  return __floats2half2_rn(r1, r2);\n\n#endif\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 pmin(const half2& a,\n                                                 const half2& b) {\n  float a1 = __low2float(a);\n  float a2 = __high2float(a);\n  float b1 = __low2float(b);\n  float b2 = __high2float(b);\n  __half r1 = a1 < b1 ? __low2half(a) : __low2half(b);\n  __half r2 = a2 < b2 ? __high2half(a) : __high2half(b);\n  return __halves2half2(r1, r2);\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 pmax(const half2& a,\n                                                 const half2& b) {\n  float a1 = __low2float(a);\n  float a2 = __high2float(a);\n  float b1 = __low2float(b);\n  float b2 = __high2float(b);\n  __half r1 = a1 > b1 ? __low2half(a) : __low2half(b);\n  __half r2 = a2 > b2 ? __high2half(a) : __high2half(b);\n  return __halves2half2(r1, r2);\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::half predux(const half2& a) {\n#if defined(EIGEN_HIP_DEVICE_COMPILE)\n\n  return __hadd(__low2half(a), __high2half(a));\n\n#else  // EIGEN_CUDA_ARCH\n\n#if EIGEN_CUDA_ARCH >= 530\n  return __hadd(__low2half(a), __high2half(a));\n#else\n  float a1 = __low2float(a);\n  float a2 = __high2float(a);\n  return Eigen::half(__float2half(a1 + a2));\n#endif\n\n#endif\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::half predux_max(const half2& a) {\n#if defined(EIGEN_HIP_DEVICE_COMPILE)\n\n  __half first = __low2half(a);\n  __half second = __high2half(a);\n  return __hgt(first, second) ? first : second;\n\n#else  // EIGEN_CUDA_ARCH\n\n#if EIGEN_CUDA_ARCH >= 530\n  __half first = __low2half(a);\n  __half second = __high2half(a);\n  return __hgt(first, second) ? first : second;\n#else\n  float a1 = __low2float(a);\n  float a2 = __high2float(a);\n  return a1 > a2 ? __low2half(a) : __high2half(a);\n#endif\n\n#endif\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::half predux_min(const half2& a) {\n#if defined(EIGEN_HIP_DEVICE_COMPILE)\n\n  __half first = __low2half(a);\n  __half second = __high2half(a);\n  return __hlt(first, second) ? first : second;\n\n#else  // EIGEN_CUDA_ARCH\n\n#if EIGEN_CUDA_ARCH >= 530\n  __half first = __low2half(a);\n  __half second = __high2half(a);\n  return __hlt(first, second) ? first : second;\n#else\n  float a1 = __low2float(a);\n  float a2 = __high2float(a);\n  return a1 < a2 ? __low2half(a) : __high2half(a);\n#endif\n\n#endif\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::half predux_mul(const half2& a) {\n#if defined(EIGEN_HIP_DEVICE_COMPILE)\n\n  return __hmul(__low2half(a), __high2half(a));\n\n#else  // EIGEN_CUDA_ARCH\n\n#if EIGEN_CUDA_ARCH >= 530\n  return __hmul(__low2half(a), __high2half(a));\n#else\n  float a1 = __low2float(a);\n  float a2 = __high2float(a);\n  return Eigen::half(__float2half(a1 * a2));\n#endif\n\n#endif\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 plog1p(const half2& a) {\n  float a1 = __low2float(a);\n  float a2 = __high2float(a);\n  float r1 = log1pf(a1);\n  float r2 = log1pf(a2);\n  return __floats2half2_rn(r1, r2);\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 pexpm1(const half2& a) {\n  float a1 = __low2float(a);\n  float a2 = __high2float(a);\n  float r1 = expm1f(a1);\n  float r2 = expm1f(a2);\n  return __floats2half2_rn(r1, r2);\n}\n\n#if (EIGEN_CUDA_SDK_VER >= 80000 && defined EIGEN_CUDA_ARCH && EIGEN_CUDA_ARCH >= 530) || \\\n  defined(EIGEN_HIP_DEVICE_COMPILE)\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nhalf2 plog(const half2& a) {\n  return h2log(a);\n}\n\n EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nhalf2 pexp(const half2& a) {\n  return h2exp(a);\n}\n\n EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nhalf2 psqrt(const half2& a) {\n  return h2sqrt(a);\n}\n\n EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nhalf2 prsqrt(const half2& a) {\n  return h2rsqrt(a);\n}\n\n#else\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 plog(const half2& a) {\n  float a1 = __low2float(a);\n  float a2 = __high2float(a);\n  float r1 = logf(a1);\n  float r2 = logf(a2);\n  return __floats2half2_rn(r1, r2);\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 pexp(const half2& a) {\n  float a1 = __low2float(a);\n  float a2 = __high2float(a);\n  float r1 = expf(a1);\n  float r2 = expf(a2);\n  return __floats2half2_rn(r1, r2);\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 psqrt(const half2& a) {\n  float a1 = __low2float(a);\n  float a2 = __high2float(a);\n  float r1 = sqrtf(a1);\n  float r2 = sqrtf(a2);\n  return __floats2half2_rn(r1, r2);\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 prsqrt(const half2& a) {\n  float a1 = __low2float(a);\n  float a2 = __high2float(a);\n  float r1 = rsqrtf(a1);\n  float r2 = rsqrtf(a2);\n  return __floats2half2_rn(r1, r2);\n}\n#endif\n} // namespace\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4h2\npload<Packet4h2>(const Eigen::half* from) {\n  return *reinterpret_cast<const Packet4h2*>(from);\n}\n\n// unaligned load;\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4h2\nploadu<Packet4h2>(const Eigen::half* from) {\n  Packet4h2 r;\n  half2* p_alias = reinterpret_cast<half2*>(&r);\n  p_alias[0] = ploadu(from + 0);\n  p_alias[1] = ploadu(from + 2);\n  p_alias[2] = ploadu(from + 4);\n  p_alias[3] = ploadu(from + 6);\n  return r;\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4h2\nploaddup<Packet4h2>(const Eigen::half* from) {\n  Packet4h2 r;\n  half2* p_alias = reinterpret_cast<half2*>(&r);\n  p_alias[0] = ploaddup(from + 0);\n  p_alias[1] = ploaddup(from + 1);\n  p_alias[2] = ploaddup(from + 2);\n  p_alias[3] = ploaddup(from + 3);\n  return r;\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void pstore<Eigen::half>(\n    Eigen::half* to, const Packet4h2& from) {\n  *reinterpret_cast<Packet4h2*>(to) = from;\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void pstoreu<Eigen::half>(\n    Eigen::half* to, const Packet4h2& from) {\n  const half2* from_alias = reinterpret_cast<const half2*>(&from);\n  pstoreu(to + 0,from_alias[0]);\n  pstoreu(to + 2,from_alias[1]);\n  pstoreu(to + 4,from_alias[2]);\n  pstoreu(to + 6,from_alias[3]);\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Packet4h2\nploadt_ro<Packet4h2, Aligned>(const Eigen::half* from) {\n#if defined(EIGEN_HIP_DEVICE_COMPILE)\n\n  Packet4h2 r;\n  r = __ldg((const Packet4h2*)from);\n  return r;\n#else  // EIGEN_CUDA_ARCH\n\n#if EIGEN_CUDA_ARCH >= 350\n  Packet4h2 r;\n  r = __ldg((const Packet4h2*)from);\n  return r;\n#else\n  Packet4h2 r;\n  half2* r_alias = reinterpret_cast<half2*>(&r);\n  r_alias[0] = ploadt_ro_aligned(from + 0);\n  r_alias[1] = ploadt_ro_aligned(from + 2);\n  r_alias[2] = ploadt_ro_aligned(from + 4);\n  r_alias[3] = ploadt_ro_aligned(from + 6);\n  return r;\n#endif\n\n#endif\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Packet4h2\nploadt_ro<Packet4h2, Unaligned>(const Eigen::half* from) {\n  Packet4h2 r;\n  half2* r_alias = reinterpret_cast<half2*>(&r);\n  r_alias[0] = ploadt_ro_unaligned(from + 0);\n  r_alias[1] = ploadt_ro_unaligned(from + 2);\n  r_alias[2] = ploadt_ro_unaligned(from + 4);\n  r_alias[3] = ploadt_ro_unaligned(from + 6);\n  return r;\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4h2\npgather<Eigen::half, Packet4h2>(const Eigen::half* from, Index stride) {\n  Packet4h2 r;\n  half2* p_alias = reinterpret_cast<half2*>(&r);\n  p_alias[0] = __halves2half2(from[0 * stride], from[1 * stride]);\n  p_alias[1] = __halves2half2(from[2 * stride], from[3 * stride]);\n  p_alias[2] = __halves2half2(from[4 * stride], from[5 * stride]);\n  p_alias[3] = __halves2half2(from[6 * stride], from[7 * stride]);\n  return r;\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void pscatter<Eigen::half, Packet4h2>(\n    Eigen::half* to, const Packet4h2& from, Index stride) {\n  const half2* from_alias = reinterpret_cast<const half2*>(&from);\n  pscatter(to + stride * 0, from_alias[0], stride);\n  pscatter(to + stride * 2, from_alias[1], stride);\n  pscatter(to + stride * 4, from_alias[2], stride);\n  pscatter(to + stride * 6, from_alias[3], stride);\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::half pfirst<Packet4h2>(\n    const Packet4h2& a) {\n  return pfirst(*(reinterpret_cast<const half2*>(&a)));\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4h2 pabs<Packet4h2>(\n    const Packet4h2& a) {\n  Packet4h2 r;\n  half2* p_alias = reinterpret_cast<half2*>(&r);\n  const half2* a_alias = reinterpret_cast<const half2*>(&a);\n  p_alias[0] = pabs(a_alias[0]);\n  p_alias[1] = pabs(a_alias[1]);\n  p_alias[2] = pabs(a_alias[2]);\n  p_alias[3] = pabs(a_alias[3]);\n  return r;\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4h2 ptrue<Packet4h2>(\n    const Packet4h2& a) {\n  half true_half = half_impl::raw_uint16_to_half(0xffffu);\n  return pset1<Packet4h2>(true_half);\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4h2 pzero<Packet4h2>(const Packet4h2& a) {\n  half false_half = half_impl::raw_uint16_to_half(0x0000u);\n  return pset1<Packet4h2>(false_half);\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void ptranspose_double(\n    double* d_row0, double* d_row1, double* d_row2, double* d_row3,\n    double* d_row4, double* d_row5, double* d_row6, double* d_row7) {\n  double d_tmp;\n  d_tmp = d_row0[1];\n  d_row0[1] = d_row4[0];\n  d_row4[0] = d_tmp;\n\n  d_tmp = d_row1[1];\n  d_row1[1] = d_row5[0];\n  d_row5[0] = d_tmp;\n\n  d_tmp = d_row2[1];\n  d_row2[1] = d_row6[0];\n  d_row6[0] = d_tmp;\n\n  d_tmp = d_row3[1];\n  d_row3[1] = d_row7[0];\n  d_row7[0] = d_tmp;\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void ptranspose_half2(\n    half2* f_row0, half2* f_row1, half2* f_row2, half2* f_row3) {\n  half2 f_tmp;\n  f_tmp = f_row0[1];\n  f_row0[1] = f_row2[0];\n  f_row2[0] = f_tmp;\n\n  f_tmp = f_row1[1];\n  f_row1[1] = f_row3[0];\n  f_row3[0] = f_tmp;\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void\nptranspose_half(half2& f0, half2& f1) {\n  __half a1 = __low2half(f0);\n  __half a2 = __high2half(f0);\n  __half b1 = __low2half(f1);\n  __half b2 = __high2half(f1);\n  f0 = __halves2half2(a1, b1);\n  f1 = __halves2half2(a2, b2);\n}\n\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void\nptranspose(PacketBlock<Packet4h2,8>& kernel) {\n  double* d_row0 = reinterpret_cast<double*>(&kernel.packet[0]);\n  double* d_row1 = reinterpret_cast<double*>(&kernel.packet[1]);\n  double* d_row2 = reinterpret_cast<double*>(&kernel.packet[2]);\n  double* d_row3 = reinterpret_cast<double*>(&kernel.packet[3]);\n  double* d_row4 = reinterpret_cast<double*>(&kernel.packet[4]);\n  double* d_row5 = reinterpret_cast<double*>(&kernel.packet[5]);\n  double* d_row6 = reinterpret_cast<double*>(&kernel.packet[6]);\n  double* d_row7 = reinterpret_cast<double*>(&kernel.packet[7]);\n  ptranspose_double(d_row0, d_row1, d_row2, d_row3,\n                    d_row4, d_row5, d_row6, d_row7);\n\n\n  half2* f_row0 = reinterpret_cast<half2*>(d_row0);\n  half2* f_row1 = reinterpret_cast<half2*>(d_row1);\n  half2* f_row2 = reinterpret_cast<half2*>(d_row2);\n  half2* f_row3 = reinterpret_cast<half2*>(d_row3);\n  ptranspose_half2(f_row0, f_row1, f_row2, f_row3);\n  ptranspose_half(f_row0[0], f_row1[0]);\n  ptranspose_half(f_row0[1], f_row1[1]);\n  ptranspose_half(f_row2[0], f_row3[0]);\n  ptranspose_half(f_row2[1], f_row3[1]);\n\n  f_row0 = reinterpret_cast<half2*>(d_row0 + 1);\n  f_row1 = reinterpret_cast<half2*>(d_row1 + 1);\n  f_row2 = reinterpret_cast<half2*>(d_row2 + 1);\n  f_row3 = reinterpret_cast<half2*>(d_row3 + 1);\n  ptranspose_half2(f_row0, f_row1, f_row2, f_row3);\n  ptranspose_half(f_row0[0], f_row1[0]);\n  ptranspose_half(f_row0[1], f_row1[1]);\n  ptranspose_half(f_row2[0], f_row3[0]);\n  ptranspose_half(f_row2[1], f_row3[1]);\n\n  f_row0 = reinterpret_cast<half2*>(d_row4);\n  f_row1 = reinterpret_cast<half2*>(d_row5);\n  f_row2 = reinterpret_cast<half2*>(d_row6);\n  f_row3 = reinterpret_cast<half2*>(d_row7);\n  ptranspose_half2(f_row0, f_row1, f_row2, f_row3);\n  ptranspose_half(f_row0[0], f_row1[0]);\n  ptranspose_half(f_row0[1], f_row1[1]);\n  ptranspose_half(f_row2[0], f_row3[0]);\n  ptranspose_half(f_row2[1], f_row3[1]);\n\n  f_row0 = reinterpret_cast<half2*>(d_row4 + 1);\n  f_row1 = reinterpret_cast<half2*>(d_row5 + 1);\n  f_row2 = reinterpret_cast<half2*>(d_row6 + 1);\n  f_row3 = reinterpret_cast<half2*>(d_row7 + 1);\n  ptranspose_half2(f_row0, f_row1, f_row2, f_row3);\n  ptranspose_half(f_row0[0], f_row1[0]);\n  ptranspose_half(f_row0[1], f_row1[1]);\n  ptranspose_half(f_row2[0], f_row3[0]);\n  ptranspose_half(f_row2[1], f_row3[1]);\n  \n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4h2\nplset<Packet4h2>(const Eigen::half& a) {\n#if defined(EIGEN_HIP_DEVICE_COMPILE)\n\n  Packet4h2 r;\n  half2* p_alias = reinterpret_cast<half2*>(&r);\n  p_alias[0] = __halves2half2(a, __hadd(a, __float2half(1.0f)));\n  p_alias[1] = __halves2half2(__hadd(a, __float2half(2.0f)),\n                              __hadd(a, __float2half(3.0f)));\n  p_alias[2] = __halves2half2(__hadd(a, __float2half(4.0f)),\n                              __hadd(a, __float2half(5.0f)));\n  p_alias[3] = __halves2half2(__hadd(a, __float2half(6.0f)),\n                              __hadd(a, __float2half(7.0f)));\n  return r;\n#else  // EIGEN_CUDA_ARCH\n\n#if EIGEN_CUDA_ARCH >= 530\n  Packet4h2 r;\n  half2* r_alias = reinterpret_cast<half2*>(&r);\n\n  half2 b = pset1<half2>(a);\n  half2 c;\n  half2 half_offset0 = __halves2half2(__float2half(0.0f),__float2half(2.0f));\n  half2 half_offset1 = __halves2half2(__float2half(4.0f),__float2half(6.0f));\n\n  c = __hadd2(b, half_offset0);\n  r_alias[0] = plset(__low2half(c));\n  r_alias[1] = plset(__high2half(c));\n\n  c = __hadd2(b, half_offset1);\n  r_alias[2] = plset(__low2half(c));\n  r_alias[3] = plset(__high2half(c));\n\n  return r;\n\n#else\n  float f = __half2float(a);\n  Packet4h2 r;\n  half2* p_alias = reinterpret_cast<half2*>(&r);\n  p_alias[0] = __halves2half2(a, __float2half(f + 1.0f));\n  p_alias[1] = __halves2half2(__float2half(f + 2.0f), __float2half(f + 3.0f));\n  p_alias[2] = __halves2half2(__float2half(f + 4.0f), __float2half(f + 5.0f));\n  p_alias[3] = __halves2half2(__float2half(f + 6.0f), __float2half(f + 7.0f));\n  return r;\n#endif\n\n#endif\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4h2\npselect<Packet4h2>(const Packet4h2& mask, const Packet4h2& a,\n                   const Packet4h2& b) {\n  Packet4h2 r;\n  half2* r_alias = reinterpret_cast<half2*>(&r);\n  const half2* mask_alias = reinterpret_cast<const half2*>(&mask);\n  const half2* a_alias = reinterpret_cast<const half2*>(&a);\n  const half2* b_alias = reinterpret_cast<const half2*>(&b);\n  r_alias[0] = pselect(mask_alias[0], a_alias[0], b_alias[0]);\n  r_alias[1] = pselect(mask_alias[1], a_alias[1], b_alias[1]);\n  r_alias[2] = pselect(mask_alias[2], a_alias[2], b_alias[2]);\n  r_alias[3] = pselect(mask_alias[3], a_alias[3], b_alias[3]);\n  return r;\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4h2\npcmp_eq<Packet4h2>(const Packet4h2& a, const Packet4h2& b) {\n  Packet4h2 r;\n  half2* r_alias = reinterpret_cast<half2*>(&r);\n  const half2* a_alias = reinterpret_cast<const half2*>(&a);\n  const half2* b_alias = reinterpret_cast<const half2*>(&b);\n  r_alias[0] = pcmp_eq(a_alias[0], b_alias[0]);\n  r_alias[1] = pcmp_eq(a_alias[1], b_alias[1]);\n  r_alias[2] = pcmp_eq(a_alias[2], b_alias[2]);\n  r_alias[3] = pcmp_eq(a_alias[3], b_alias[3]);\n  return r;\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4h2 pand<Packet4h2>(\n    const Packet4h2& a, const Packet4h2& b) {\n  Packet4h2 r;\n  half2* r_alias = reinterpret_cast<half2*>(&r);\n  const half2* a_alias = reinterpret_cast<const half2*>(&a);\n  const half2* b_alias = reinterpret_cast<const half2*>(&b);\n  r_alias[0] = pand(a_alias[0], b_alias[0]);\n  r_alias[1] = pand(a_alias[1], b_alias[1]);\n  r_alias[2] = pand(a_alias[2], b_alias[2]);\n  r_alias[3] = pand(a_alias[3], b_alias[3]);\n  return r;\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4h2 por<Packet4h2>(\n    const Packet4h2& a, const Packet4h2& b) {\n  Packet4h2 r;\n  half2* r_alias = reinterpret_cast<half2*>(&r);\n  const half2* a_alias = reinterpret_cast<const half2*>(&a);\n  const half2* b_alias = reinterpret_cast<const half2*>(&b);\n  r_alias[0] = por(a_alias[0], b_alias[0]);\n  r_alias[1] = por(a_alias[1], b_alias[1]);\n  r_alias[2] = por(a_alias[2], b_alias[2]);\n  r_alias[3] = por(a_alias[3], b_alias[3]);\n  return r;\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4h2 pxor<Packet4h2>(\n    const Packet4h2& a, const Packet4h2& b) {\n  Packet4h2 r;\n  half2* r_alias = reinterpret_cast<half2*>(&r);\n  const half2* a_alias = reinterpret_cast<const half2*>(&a);\n  const half2* b_alias = reinterpret_cast<const half2*>(&b);\n  r_alias[0] = pxor(a_alias[0], b_alias[0]);\n  r_alias[1] = pxor(a_alias[1], b_alias[1]);\n  r_alias[2] = pxor(a_alias[2], b_alias[2]);\n  r_alias[3] = pxor(a_alias[3], b_alias[3]);\n  return r;\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4h2\npandnot<Packet4h2>(const Packet4h2& a, const Packet4h2& b) {\n  Packet4h2 r;\n  half2* r_alias = reinterpret_cast<half2*>(&r);\n  const half2* a_alias = reinterpret_cast<const half2*>(&a);\n  const half2* b_alias = reinterpret_cast<const half2*>(&b);\n  r_alias[0] = pandnot(a_alias[0], b_alias[0]);\n  r_alias[1] = pandnot(a_alias[1], b_alias[1]);\n  r_alias[2] = pandnot(a_alias[2], b_alias[2]);\n  r_alias[3] = pandnot(a_alias[3], b_alias[3]);\n  return r;\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4h2 padd<Packet4h2>(\n    const Packet4h2& a, const Packet4h2& b) {\n  Packet4h2 r;\n  half2* r_alias = reinterpret_cast<half2*>(&r);\n  const half2* a_alias = reinterpret_cast<const half2*>(&a);\n  const half2* b_alias = reinterpret_cast<const half2*>(&b);\n  r_alias[0] = padd(a_alias[0], b_alias[0]);\n  r_alias[1] = padd(a_alias[1], b_alias[1]);\n  r_alias[2] = padd(a_alias[2], b_alias[2]);\n  r_alias[3] = padd(a_alias[3], b_alias[3]);\n  return r;\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4h2 psub<Packet4h2>(\n    const Packet4h2& a, const Packet4h2& b) {\n  Packet4h2 r;\n  half2* r_alias = reinterpret_cast<half2*>(&r);\n  const half2* a_alias = reinterpret_cast<const half2*>(&a);\n  const half2* b_alias = reinterpret_cast<const half2*>(&b);\n  r_alias[0] = psub(a_alias[0], b_alias[0]);\n  r_alias[1] = psub(a_alias[1], b_alias[1]);\n  r_alias[2] = psub(a_alias[2], b_alias[2]);\n  r_alias[3] = psub(a_alias[3], b_alias[3]);\n  return r;\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4h2 pnegate(const Packet4h2& a) {\n  Packet4h2 r;\n  half2* r_alias = reinterpret_cast<half2*>(&r);\n  const half2* a_alias = reinterpret_cast<const half2*>(&a);\n  r_alias[0] = pnegate(a_alias[0]);\n  r_alias[1] = pnegate(a_alias[1]);\n  r_alias[2] = pnegate(a_alias[2]);\n  r_alias[3] = pnegate(a_alias[3]);\n  return r;\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4h2 pconj(const Packet4h2& a) {\n  return a;\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4h2 pmul<Packet4h2>(\n    const Packet4h2& a, const Packet4h2& b) {\n  Packet4h2 r;\n  half2* r_alias = reinterpret_cast<half2*>(&r);\n  const half2* a_alias = reinterpret_cast<const half2*>(&a);\n  const half2* b_alias = reinterpret_cast<const half2*>(&b);\n  r_alias[0] = pmul(a_alias[0], b_alias[0]);\n  r_alias[1] = pmul(a_alias[1], b_alias[1]);\n  r_alias[2] = pmul(a_alias[2], b_alias[2]);\n  r_alias[3] = pmul(a_alias[3], b_alias[3]);\n  return r;\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4h2 pmadd<Packet4h2>(\n    const Packet4h2& a, const Packet4h2& b, const Packet4h2& c) {\n  Packet4h2 r;\n  half2* r_alias = reinterpret_cast<half2*>(&r);\n  const half2* a_alias = reinterpret_cast<const half2*>(&a);\n  const half2* b_alias = reinterpret_cast<const half2*>(&b);\n  const half2* c_alias = reinterpret_cast<const half2*>(&c);\n  r_alias[0] = pmadd(a_alias[0], b_alias[0], c_alias[0]);\n  r_alias[1] = pmadd(a_alias[1], b_alias[1], c_alias[1]);\n  r_alias[2] = pmadd(a_alias[2], b_alias[2], c_alias[2]);\n  r_alias[3] = pmadd(a_alias[3], b_alias[3], c_alias[3]);\n  return r;\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4h2 pdiv<Packet4h2>(\n    const Packet4h2& a, const Packet4h2& b) {\n  Packet4h2 r;\n  half2* r_alias = reinterpret_cast<half2*>(&r);\n  const half2* a_alias = reinterpret_cast<const half2*>(&a);\n  const half2* b_alias = reinterpret_cast<const half2*>(&b);\n  r_alias[0] = pdiv(a_alias[0], b_alias[0]);\n  r_alias[1] = pdiv(a_alias[1], b_alias[1]);\n  r_alias[2] = pdiv(a_alias[2], b_alias[2]);\n  r_alias[3] = pdiv(a_alias[3], b_alias[3]);\n  return r;\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4h2 pmin<Packet4h2>(\n    const Packet4h2& a, const Packet4h2& b) {\n  Packet4h2 r;\n  half2* r_alias = reinterpret_cast<half2*>(&r);\n  const half2* a_alias = reinterpret_cast<const half2*>(&a);\n  const half2* b_alias = reinterpret_cast<const half2*>(&b);\n  r_alias[0] = pmin(a_alias[0], b_alias[0]);\n  r_alias[1] = pmin(a_alias[1], b_alias[1]);\n  r_alias[2] = pmin(a_alias[2], b_alias[2]);\n  r_alias[3] = pmin(a_alias[3], b_alias[3]);\n  return r;\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4h2 pmax<Packet4h2>(\n    const Packet4h2& a, const Packet4h2& b) {\n  Packet4h2 r;\n  half2* r_alias = reinterpret_cast<half2*>(&r);\n  const half2* a_alias = reinterpret_cast<const half2*>(&a);\n  const half2* b_alias = reinterpret_cast<const half2*>(&b);\n  r_alias[0] = pmax(a_alias[0], b_alias[0]);\n  r_alias[1] = pmax(a_alias[1], b_alias[1]);\n  r_alias[2] = pmax(a_alias[2], b_alias[2]);\n  r_alias[3] = pmax(a_alias[3], b_alias[3]);\n  return r;\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::half predux<Packet4h2>(\n    const Packet4h2& a) {\n  const half2* a_alias = reinterpret_cast<const half2*>(&a);\n\n  return predux(a_alias[0]) + predux(a_alias[1]) +\n         predux(a_alias[2]) + predux(a_alias[3]);\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::half predux_max<Packet4h2>(\n    const Packet4h2& a) {\n  const half2* a_alias = reinterpret_cast<const half2*>(&a);\n  half2 m0 = __halves2half2(predux_max(a_alias[0]),\n                            predux_max(a_alias[1]));\n  half2 m1 = __halves2half2(predux_max(a_alias[2]),\n                            predux_max(a_alias[3]));\n  __half first  = predux_max(m0);\n  __half second = predux_max(m1);\n#if EIGEN_CUDA_ARCH >= 530\n  return (__hgt(first, second) ? first : second);\n#else\n  float ffirst  = __half2float(first);\n  float fsecond = __half2float(second);\n  return (ffirst > fsecond)? first: second;\n#endif\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::half predux_min<Packet4h2>(\n    const Packet4h2& a) {\n  const half2* a_alias = reinterpret_cast<const half2*>(&a);\n  half2 m0 = __halves2half2(predux_min(a_alias[0]),\n                            predux_min(a_alias[1]));\n  half2 m1 = __halves2half2(predux_min(a_alias[2]),\n                            predux_min(a_alias[3]));\n  __half first  = predux_min(m0);\n  __half second = predux_min(m1);\n#if EIGEN_CUDA_ARCH >= 530\n  return (__hlt(first, second) ? first : second);\n#else\n  float ffirst  = __half2float(first);\n  float fsecond = __half2float(second);\n  return (ffirst < fsecond)? first: second;\n#endif\n}\n\n// likely overflow/underflow\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::half predux_mul<Packet4h2>(\n    const Packet4h2& a) {\n  const half2* a_alias = reinterpret_cast<const half2*>(&a);\n  return predux_mul(pmul(pmul(a_alias[0], a_alias[1]),\n                                       pmul(a_alias[2], a_alias[3])));\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4h2\nplog1p<Packet4h2>(const Packet4h2& a) {\n  Packet4h2 r;\n  half2* r_alias = reinterpret_cast<half2*>(&r);\n  const half2* a_alias = reinterpret_cast<const half2*>(&a);\n  r_alias[0] = plog1p(a_alias[0]);\n  r_alias[1] = plog1p(a_alias[1]);\n  r_alias[2] = plog1p(a_alias[2]);\n  r_alias[3] = plog1p(a_alias[3]);\n  return r;\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4h2\npexpm1<Packet4h2>(const Packet4h2& a) {\n  Packet4h2 r;\n  half2* r_alias = reinterpret_cast<half2*>(&r);\n  const half2* a_alias = reinterpret_cast<const half2*>(&a);\n  r_alias[0] = pexpm1(a_alias[0]);\n  r_alias[1] = pexpm1(a_alias[1]);\n  r_alias[2] = pexpm1(a_alias[2]);\n  r_alias[3] = pexpm1(a_alias[3]);\n  return r;\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4h2 plog<Packet4h2>(const Packet4h2& a) {\n  Packet4h2 r;\n  half2* r_alias = reinterpret_cast<half2*>(&r);\n  const half2* a_alias = reinterpret_cast<const half2*>(&a);\n  r_alias[0] = plog(a_alias[0]);\n  r_alias[1] = plog(a_alias[1]);\n  r_alias[2] = plog(a_alias[2]);\n  r_alias[3] = plog(a_alias[3]);\n  return r;\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4h2 pexp<Packet4h2>(const Packet4h2& a) {\n  Packet4h2 r;\n  half2* r_alias = reinterpret_cast<half2*>(&r);\n  const half2* a_alias = reinterpret_cast<const half2*>(&a);\n  r_alias[0] = pexp(a_alias[0]);\n  r_alias[1] = pexp(a_alias[1]);\n  r_alias[2] = pexp(a_alias[2]);\n  r_alias[3] = pexp(a_alias[3]);\n  return r;\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4h2 psqrt<Packet4h2>(const Packet4h2& a) {\n  Packet4h2 r;\n  half2* r_alias = reinterpret_cast<half2*>(&r);\n  const half2* a_alias = reinterpret_cast<const half2*>(&a);\n  r_alias[0] = psqrt(a_alias[0]);\n  r_alias[1] = psqrt(a_alias[1]);\n  r_alias[2] = psqrt(a_alias[2]);\n  r_alias[3] = psqrt(a_alias[3]);\n  return r;\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4h2\nprsqrt<Packet4h2>(const Packet4h2& a) {\n  Packet4h2 r;\n  half2* r_alias = reinterpret_cast<half2*>(&r);\n  const half2* a_alias = reinterpret_cast<const half2*>(&a);\n  r_alias[0] = prsqrt(a_alias[0]);\n  r_alias[1] = prsqrt(a_alias[1]);\n  r_alias[2] = prsqrt(a_alias[2]);\n  r_alias[3] = prsqrt(a_alias[3]);\n  return r;\n}\n\n// The following specialized padd, pmul, pdiv, pmin, pmax, pset1 are needed for\n// the implementation of GPU half reduction.\ntemplate<>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 padd<half2>(const half2& a,\n                                                        const half2& b) {\n#if defined(EIGEN_HIP_DEVICE_COMPILE)\n\n  return __hadd2(a, b);\n\n#else  // EIGEN_CUDA_ARCH\n\n#if EIGEN_CUDA_ARCH >= 530\n  return __hadd2(a, b);\n#else\n  float a1 = __low2float(a);\n  float a2 = __high2float(a);\n  float b1 = __low2float(b);\n  float b2 = __high2float(b);\n  float r1 = a1 + b1;\n  float r2 = a2 + b2;\n  return __floats2half2_rn(r1, r2);\n#endif\n\n#endif\n}\n\ntemplate<>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 pmul<half2>(const half2& a,\n                                                        const half2& b) {\n#if defined(EIGEN_HIP_DEVICE_COMPILE)\n\n  return __hmul2(a, b);\n\n#else  // EIGEN_CUDA_ARCH\n\n#if EIGEN_CUDA_ARCH >= 530\n  return __hmul2(a, b);\n#else\n  float a1 = __low2float(a);\n  float a2 = __high2float(a);\n  float b1 = __low2float(b);\n  float b2 = __high2float(b);\n  float r1 = a1 * b1;\n  float r2 = a2 * b2;\n  return __floats2half2_rn(r1, r2);\n#endif\n\n#endif\n}\n\ntemplate<>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 pdiv<half2>(const half2& a,\n                                                        const half2& b) {\n#if defined(EIGEN_HIP_DEVICE_COMPILE)\n\n  return __h2div(a, b);\n\n#else // EIGEN_CUDA_ARCH\n\n  float a1 = __low2float(a);\n  float a2 = __high2float(a);\n  float b1 = __low2float(b);\n  float b2 = __high2float(b);\n  float r1 = a1 / b1;\n  float r2 = a2 / b2;\n  return __floats2half2_rn(r1, r2);\n\n#endif\n}\n\ntemplate<>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 pmin<half2>(const half2& a,\n                                                        const half2& b) {\n  float a1 = __low2float(a);\n  float a2 = __high2float(a);\n  float b1 = __low2float(b);\n  float b2 = __high2float(b);\n  __half r1 = a1 < b1 ? __low2half(a) : __low2half(b);\n  __half r2 = a2 < b2 ? __high2half(a) : __high2half(b);\n  return __halves2half2(r1, r2);\n}\n\ntemplate<>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 pmax<half2>(const half2& a,\n                                                        const half2& b) {\n  float a1 = __low2float(a);\n  float a2 = __high2float(a);\n  float b1 = __low2float(b);\n  float b2 = __high2float(b);\n  __half r1 = a1 > b1 ? __low2half(a) : __low2half(b);\n  __half r2 = a2 > b2 ? __high2half(a) : __high2half(b);\n  return __halves2half2(r1, r2);\n}\n\n#endif // defined(EIGEN_CUDA_ARCH)\n\n#endif // defined(EIGEN_HAS_CUDA_FP16) && defined(EIGEN_CUDACC)\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n\n#endif // EIGEN_PACKET_MATH_GPU_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/GPU/TypeCasting.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_TYPE_CASTING_GPU_H\n#define EIGEN_TYPE_CASTING_GPU_H\n\nnamespace Eigen {\n\nnamespace internal {\n\n#if (defined(EIGEN_HAS_CUDA_FP16) && defined(EIGEN_CUDA_ARCH) && EIGEN_CUDA_ARCH >= 300) || \\\n  (defined(EIGEN_HAS_HIP_FP16) && defined(EIGEN_HIP_DEVICE_COMPILE))\n\n\ntemplate <>\nstruct type_casting_traits<Eigen::half, float> {\n  enum {\n    VectorizedCast = 1,\n    SrcCoeffRatio = 1,\n    TgtCoeffRatio = 2\n  };\n};\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 pcast<half2, float4>(const half2& a, const half2& b) {\n  float2 r1 = __half22float2(a);\n  float2 r2 = __half22float2(b);\n  return make_float4(r1.x, r1.y, r2.x, r2.y);\n}\n\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4h2 pcast<float4, Packet4h2>(const float4& a, const float4& b) {\n  Packet4h2 r;\n  half2* r_alias=reinterpret_cast<half2*>(&r);\n  r_alias[0]=__floats2half2_rn(a.x,a.y);\n  r_alias[1]=__floats2half2_rn(a.z,a.w);\n  r_alias[2]=__floats2half2_rn(b.x,b.y);\n  r_alias[3]=__floats2half2_rn(b.z,b.w);\n  return r;\n}\n\ntemplate <>\nstruct type_casting_traits<float, Eigen::half> {\n  enum {\n    VectorizedCast = 1,\n    SrcCoeffRatio = 2,\n    TgtCoeffRatio = 1\n  };\n};\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 pcast<Packet4h2, float4>(const Packet4h2& a) {\n  // Simply discard the second half of the input\n  float4 r;\n  const half2* a_alias=reinterpret_cast<const half2*>(&a);\n  float2 r1 = __half22float2(a_alias[0]);\n  float2 r2 = __half22float2(a_alias[1]);\n  r.x=static_cast<float>(r1.x);\n  r.y=static_cast<float>(r1.y);\n  r.z=static_cast<float>(r2.x);\n  r.w=static_cast<float>(r2.y);\n  return r;\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 pcast<float4, half2>(const float4& a) {\n  // Simply discard the second half of the input\n  return __floats2half2_rn(a.x, a.y);\n}\n\n#endif\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_TYPE_CASTING_GPU_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/HIP/hcc/math_constants.h",
    "content": "/*\n * math_constants.h - \n *  HIP equivalent of the CUDA header of the same name\n */\n\n#ifndef __MATH_CONSTANTS_H__\n#define __MATH_CONSTANTS_H__\n\n/* single precision constants */\n\n#define HIPRT_INF_F        __int_as_float(0x7f800000)\n#define HIPRT_NAN_F        __int_as_float(0x7fffffff)\n#define HIPRT_MIN_DENORM_F __int_as_float(0x00000001)\n#define HIPRT_MAX_NORMAL_F __int_as_float(0x7f7fffff)\n#define HIPRT_NEG_ZERO_F   __int_as_float(0x80000000)\n#define HIPRT_ZERO_F       0.0f\n#define HIPRT_ONE_F        1.0f\n\n/* double precision constants */\n#define HIPRT_INF          __hiloint2double(0x7ff00000, 0x00000000)\n#define HIPRT_NAN          __hiloint2double(0xfff80000, 0x00000000)\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/MSA/Complex.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2018 Wave Computing, Inc.\n// Written by:\n//   Chris Larsen\n//   Alexey Frunze (afrunze@wavecomp.com)\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_COMPLEX_MSA_H\n#define EIGEN_COMPLEX_MSA_H\n\n#include <iostream>\n\nnamespace Eigen {\n\nnamespace internal {\n\n//---------- float ----------\nstruct Packet2cf {\n  EIGEN_STRONG_INLINE Packet2cf() {\n  }\n  EIGEN_STRONG_INLINE explicit Packet2cf(const std::complex<float>& a,\n                                         const std::complex<float>& b) {\n    Packet4f t = { std::real(a), std::imag(a), std::real(b), std::imag(b) };\n    v = t;\n  }\n  EIGEN_STRONG_INLINE explicit Packet2cf(const Packet4f& a) : v(a) {\n  }\n  EIGEN_STRONG_INLINE Packet2cf(const Packet2cf& a) : v(a.v) {\n  }\n  EIGEN_STRONG_INLINE Packet2cf& operator=(const Packet2cf& b) {\n    v = b.v;\n    return *this;\n  }\n  EIGEN_STRONG_INLINE Packet2cf conjugate(void) const {\n    return Packet2cf((Packet4f)__builtin_msa_bnegi_d((v2u64)v, 63));\n  }\n  EIGEN_STRONG_INLINE Packet2cf& operator*=(const Packet2cf& b) {\n    Packet4f v1, v2;\n\n    // Get the real values of a | a1_re | a1_re | a2_re | a2_re |\n    v1 = (Packet4f)__builtin_msa_ilvev_w((v4i32)v, (v4i32)v);\n    // Get the imag values of a | a1_im | a1_im | a2_im | a2_im |\n    v2 = (Packet4f)__builtin_msa_ilvod_w((v4i32)v, (v4i32)v);\n    // Multiply the real a with b\n    v1 = pmul(v1, b.v);\n    // Multiply the imag a with b\n    v2 = pmul(v2, b.v);\n    // Conjugate v2\n    v2 = Packet2cf(v2).conjugate().v;\n    // Swap real/imag elements in v2.\n    v2 = (Packet4f)__builtin_msa_shf_w((v4i32)v2, EIGEN_MSA_SHF_I8(1, 0, 3, 2));\n    // Add and return the result\n    v = padd(v1, v2);\n    return *this;\n  }\n  EIGEN_STRONG_INLINE Packet2cf operator*(const Packet2cf& b) const {\n    return Packet2cf(*this) *= b;\n  }\n  EIGEN_STRONG_INLINE Packet2cf& operator+=(const Packet2cf& b) {\n    v = padd(v, b.v);\n    return *this;\n  }\n  EIGEN_STRONG_INLINE Packet2cf operator+(const Packet2cf& b) const {\n    return Packet2cf(*this) += b;\n  }\n  EIGEN_STRONG_INLINE Packet2cf& operator-=(const Packet2cf& b) {\n    v = psub(v, b.v);\n    return *this;\n  }\n  EIGEN_STRONG_INLINE Packet2cf operator-(const Packet2cf& b) const {\n    return Packet2cf(*this) -= b;\n  }\n  EIGEN_STRONG_INLINE Packet2cf& operator/=(const Packet2cf& b) {\n    *this *= b.conjugate();\n    Packet4f s = pmul<Packet4f>(b.v, b.v);\n    s = padd(s, (Packet4f)__builtin_msa_shf_w((v4i32)s, EIGEN_MSA_SHF_I8(1, 0, 3, 2)));\n    v = pdiv(v, s);\n    return *this;\n  }\n  EIGEN_STRONG_INLINE Packet2cf operator/(const Packet2cf& b) const {\n    return Packet2cf(*this) /= b;\n  }\n  EIGEN_STRONG_INLINE Packet2cf operator-(void) const {\n    return Packet2cf(pnegate(v));\n  }\n\n  Packet4f v;\n};\n\ninline std::ostream& operator<<(std::ostream& os, const Packet2cf& value) {\n  os << \"[ (\" << value.v[0] << \", \" << value.v[1]\n     << \"i),\"\n        \"  (\"\n     << value.v[2] << \", \" << value.v[3] << \"i) ]\";\n  return os;\n}\n\ntemplate <>\nstruct packet_traits<std::complex<float> > : default_packet_traits {\n  typedef Packet2cf type;\n  typedef Packet2cf half;\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size = 2,\n    HasHalfPacket = 0,\n\n    HasAdd = 1,\n    HasSub = 1,\n    HasMul = 1,\n    HasDiv = 1,\n    HasNegate = 1,\n    HasAbs = 0,\n    HasAbs2 = 0,\n    HasMin = 0,\n    HasMax = 0,\n    HasSetLinear = 0,\n    HasBlend = 1\n  };\n};\n\ntemplate <>\nstruct unpacket_traits<Packet2cf> {\n  typedef std::complex<float> type;\n  enum { size = 2, alignment = Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false };\n  typedef Packet2cf half;\n};\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2cf pset1<Packet2cf>(const std::complex<float>& from) {\n  EIGEN_MSA_DEBUG;\n\n  float f0 = from.real(), f1 = from.imag();\n  Packet4f v0 = { f0, f0, f0, f0 };\n  Packet4f v1 = { f1, f1, f1, f1 };\n  return Packet2cf((Packet4f)__builtin_msa_ilvr_w((Packet4i)v1, (Packet4i)v0));\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2cf padd<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {\n  EIGEN_MSA_DEBUG;\n\n  return a + b;\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2cf psub<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {\n  EIGEN_MSA_DEBUG;\n\n  return a - b;\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2cf pnegate(const Packet2cf& a) {\n  EIGEN_MSA_DEBUG;\n\n  return -a;\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2cf pconj(const Packet2cf& a) {\n  EIGEN_MSA_DEBUG;\n\n  return a.conjugate();\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2cf pmul<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {\n  EIGEN_MSA_DEBUG;\n\n  return a * b;\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2cf pand<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {\n  EIGEN_MSA_DEBUG;\n\n  return Packet2cf(pand(a.v, b.v));\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2cf por<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {\n  EIGEN_MSA_DEBUG;\n\n  return Packet2cf(por(a.v, b.v));\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2cf pxor<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {\n  EIGEN_MSA_DEBUG;\n\n  return Packet2cf(pxor(a.v, b.v));\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2cf pandnot<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {\n  EIGEN_MSA_DEBUG;\n\n  return Packet2cf(pandnot(a.v, b.v));\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2cf pload<Packet2cf>(const std::complex<float>* from) {\n  EIGEN_MSA_DEBUG;\n\n  EIGEN_DEBUG_ALIGNED_LOAD return Packet2cf(pload<Packet4f>((const float*)from));\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2cf ploadu<Packet2cf>(const std::complex<float>* from) {\n  EIGEN_MSA_DEBUG;\n\n  EIGEN_DEBUG_UNALIGNED_LOAD return Packet2cf(ploadu<Packet4f>((const float*)from));\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2cf ploaddup<Packet2cf>(const std::complex<float>* from) {\n  EIGEN_MSA_DEBUG;\n\n  return pset1<Packet2cf>(*from);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE void pstore<std::complex<float> >(std::complex<float>* to,\n                                                      const Packet2cf& from) {\n  EIGEN_MSA_DEBUG;\n\n  EIGEN_DEBUG_ALIGNED_STORE pstore<float>((float*)to, from.v);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE void pstoreu<std::complex<float> >(std::complex<float>* to,\n                                                       const Packet2cf& from) {\n  EIGEN_MSA_DEBUG;\n\n  EIGEN_DEBUG_UNALIGNED_STORE pstoreu<float>((float*)to, from.v);\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC inline Packet2cf pgather<std::complex<float>, Packet2cf>(\n    const std::complex<float>* from, Index stride) {\n  EIGEN_MSA_DEBUG;\n\n  return Packet2cf(from[0 * stride], from[1 * stride]);\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC inline void pscatter<std::complex<float>, Packet2cf>(std::complex<float>* to,\n                                                                       const Packet2cf& from,\n                                                                       Index stride) {\n  EIGEN_MSA_DEBUG;\n\n  *to = std::complex<float>(from.v[0], from.v[1]);\n  to += stride;\n  *to = std::complex<float>(from.v[2], from.v[3]);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE void prefetch<std::complex<float> >(const std::complex<float>* addr) {\n  EIGEN_MSA_DEBUG;\n\n  prefetch(reinterpret_cast<const float*>(addr));\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE std::complex<float> pfirst<Packet2cf>(const Packet2cf& a) {\n  EIGEN_MSA_DEBUG;\n\n  return std::complex<float>(a.v[0], a.v[1]);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2cf preverse(const Packet2cf& a) {\n  EIGEN_MSA_DEBUG;\n\n  return Packet2cf((Packet4f)__builtin_msa_shf_w((v4i32)a.v, EIGEN_MSA_SHF_I8(2, 3, 0, 1)));\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2cf pcplxflip<Packet2cf>(const Packet2cf& a) {\n  EIGEN_MSA_DEBUG;\n\n  return Packet2cf((Packet4f)__builtin_msa_shf_w((v4i32)a.v, EIGEN_MSA_SHF_I8(1, 0, 3, 2)));\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE std::complex<float> predux<Packet2cf>(const Packet2cf& a) {\n  EIGEN_MSA_DEBUG;\n\n  Packet4f value = (Packet4f)preverse((Packet2d)a.v);\n  value += a.v;\n  return std::complex<float>(value[0], value[1]);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2cf preduxp<Packet2cf>(const Packet2cf* vecs) {\n  EIGEN_MSA_DEBUG;\n\n  Packet4f sum1, sum2, sum;\n\n  // Add the first two 64-bit float32x2_t of vecs[0]\n  sum1 = (Packet4f)__builtin_msa_ilvr_d((v2i64)vecs[1].v, (v2i64)vecs[0].v);\n  sum2 = (Packet4f)__builtin_msa_ilvl_d((v2i64)vecs[1].v, (v2i64)vecs[0].v);\n  sum = padd(sum1, sum2);\n\n  return Packet2cf(sum);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE std::complex<float> predux_mul<Packet2cf>(const Packet2cf& a) {\n  EIGEN_MSA_DEBUG;\n\n  return std::complex<float>((a.v[0] * a.v[2]) - (a.v[1] * a.v[3]),\n                             (a.v[0] * a.v[3]) + (a.v[1] * a.v[2]));\n}\n\ntemplate <int Offset>\nstruct palign_impl<Offset, Packet2cf> {\n  EIGEN_STRONG_INLINE static void run(Packet2cf& first, const Packet2cf& second) {\n    if (Offset == 1) {\n      first.v = (Packet4f)__builtin_msa_sldi_b((v16i8)second.v, (v16i8)first.v, Offset * 8);\n    }\n  }\n};\n\ntemplate <>\nstruct conj_helper<Packet2cf, Packet2cf, false, true> {\n  EIGEN_STRONG_INLINE Packet2cf pmadd(const Packet2cf& x, const Packet2cf& y,\n                                      const Packet2cf& c) const {\n    return padd(pmul(x, y), c);\n  }\n\n  EIGEN_STRONG_INLINE Packet2cf pmul(const Packet2cf& a, const Packet2cf& b) const {\n    return internal::pmul(a, pconj(b));\n  }\n};\n\ntemplate <>\nstruct conj_helper<Packet2cf, Packet2cf, true, false> {\n  EIGEN_STRONG_INLINE Packet2cf pmadd(const Packet2cf& x, const Packet2cf& y,\n                                      const Packet2cf& c) const {\n    return padd(pmul(x, y), c);\n  }\n\n  EIGEN_STRONG_INLINE Packet2cf pmul(const Packet2cf& a, const Packet2cf& b) const {\n    return internal::pmul(pconj(a), b);\n  }\n};\n\ntemplate <>\nstruct conj_helper<Packet2cf, Packet2cf, true, true> {\n  EIGEN_STRONG_INLINE Packet2cf pmadd(const Packet2cf& x, const Packet2cf& y,\n                                      const Packet2cf& c) const {\n    return padd(pmul(x, y), c);\n  }\n\n  EIGEN_STRONG_INLINE Packet2cf pmul(const Packet2cf& a, const Packet2cf& b) const {\n    return pconj(internal::pmul(a, b));\n  }\n};\n\nEIGEN_MAKE_CONJ_HELPER_CPLX_REAL(Packet2cf, Packet4f)\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2cf pdiv<Packet2cf>(const Packet2cf& a, const Packet2cf& b) {\n  EIGEN_MSA_DEBUG;\n\n  return a / b;\n}\n\ninline std::ostream& operator<<(std::ostream& os, const PacketBlock<Packet2cf, 2>& value) {\n  os << \"[ \" << value.packet[0] << \", \" << std::endl << \"  \" << value.packet[1] << \" ]\";\n  return os;\n}\n\nEIGEN_DEVICE_FUNC inline void ptranspose(PacketBlock<Packet2cf, 2>& kernel) {\n  EIGEN_MSA_DEBUG;\n\n  Packet4f tmp =\n      (Packet4f)__builtin_msa_ilvl_d((v2i64)kernel.packet[1].v, (v2i64)kernel.packet[0].v);\n  kernel.packet[0].v =\n      (Packet4f)__builtin_msa_ilvr_d((v2i64)kernel.packet[1].v, (v2i64)kernel.packet[0].v);\n  kernel.packet[1].v = tmp;\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2cf pblend(const Selector<2>& ifPacket, const Packet2cf& thenPacket,\n                                     const Packet2cf& elsePacket) {\n  return (Packet2cf)(Packet4f)pblend<Packet2d>(ifPacket, (Packet2d)thenPacket.v,\n                                               (Packet2d)elsePacket.v);\n}\n\n//---------- double ----------\n\nstruct Packet1cd {\n  EIGEN_STRONG_INLINE Packet1cd() {\n  }\n  EIGEN_STRONG_INLINE explicit Packet1cd(const std::complex<double>& a) {\n    v[0] = std::real(a);\n    v[1] = std::imag(a);\n  }\n  EIGEN_STRONG_INLINE explicit Packet1cd(const Packet2d& a) : v(a) {\n  }\n  EIGEN_STRONG_INLINE Packet1cd(const Packet1cd& a) : v(a.v) {\n  }\n  EIGEN_STRONG_INLINE Packet1cd& operator=(const Packet1cd& b) {\n    v = b.v;\n    return *this;\n  }\n  EIGEN_STRONG_INLINE Packet1cd conjugate(void) const {\n    static const v2u64 p2ul_CONJ_XOR = { 0x0, 0x8000000000000000 };\n    return (Packet1cd)pxor(v, (Packet2d)p2ul_CONJ_XOR);\n  }\n  EIGEN_STRONG_INLINE Packet1cd& operator*=(const Packet1cd& b) {\n    Packet2d v1, v2;\n\n    // Get the real values of a | a1_re | a1_re\n    v1 = (Packet2d)__builtin_msa_ilvev_d((v2i64)v, (v2i64)v);\n    // Get the imag values of a | a1_im | a1_im\n    v2 = (Packet2d)__builtin_msa_ilvod_d((v2i64)v, (v2i64)v);\n    // Multiply the real a with b\n    v1 = pmul(v1, b.v);\n    // Multiply the imag a with b\n    v2 = pmul(v2, b.v);\n    // Conjugate v2\n    v2 = Packet1cd(v2).conjugate().v;\n    // Swap real/imag elements in v2.\n    v2 = (Packet2d)__builtin_msa_shf_w((v4i32)v2, EIGEN_MSA_SHF_I8(2, 3, 0, 1));\n    // Add and return the result\n    v = padd(v1, v2);\n    return *this;\n  }\n  EIGEN_STRONG_INLINE Packet1cd operator*(const Packet1cd& b) const {\n    return Packet1cd(*this) *= b;\n  }\n  EIGEN_STRONG_INLINE Packet1cd& operator+=(const Packet1cd& b) {\n    v = padd(v, b.v);\n    return *this;\n  }\n  EIGEN_STRONG_INLINE Packet1cd operator+(const Packet1cd& b) const {\n    return Packet1cd(*this) += b;\n  }\n  EIGEN_STRONG_INLINE Packet1cd& operator-=(const Packet1cd& b) {\n    v = psub(v, b.v);\n    return *this;\n  }\n  EIGEN_STRONG_INLINE Packet1cd operator-(const Packet1cd& b) const {\n    return Packet1cd(*this) -= b;\n  }\n  EIGEN_STRONG_INLINE Packet1cd& operator/=(const Packet1cd& b) {\n    *this *= b.conjugate();\n    Packet2d s = pmul<Packet2d>(b.v, b.v);\n    s = padd(s, preverse<Packet2d>(s));\n    v = pdiv(v, s);\n    return *this;\n  }\n  EIGEN_STRONG_INLINE Packet1cd operator/(const Packet1cd& b) const {\n    return Packet1cd(*this) /= b;\n  }\n  EIGEN_STRONG_INLINE Packet1cd operator-(void) const {\n    return Packet1cd(pnegate(v));\n  }\n\n  Packet2d v;\n};\n\ninline std::ostream& operator<<(std::ostream& os, const Packet1cd& value) {\n  os << \"[ (\" << value.v[0] << \", \" << value.v[1] << \"i) ]\";\n  return os;\n}\n\ntemplate <>\nstruct packet_traits<std::complex<double> > : default_packet_traits {\n  typedef Packet1cd type;\n  typedef Packet1cd half;\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 0,\n    size = 1,\n    HasHalfPacket = 0,\n\n    HasAdd = 1,\n    HasSub = 1,\n    HasMul = 1,\n    HasDiv = 1,\n    HasNegate = 1,\n    HasAbs = 0,\n    HasAbs2 = 0,\n    HasMin = 0,\n    HasMax = 0,\n    HasSetLinear = 0\n  };\n};\n\ntemplate <>\nstruct unpacket_traits<Packet1cd> {\n  typedef std::complex<double> type;\n  enum { size = 1, alignment = Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false };\n  typedef Packet1cd half;\n};\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet1cd pload<Packet1cd>(const std::complex<double>* from) {\n  EIGEN_MSA_DEBUG;\n\n  EIGEN_DEBUG_ALIGNED_LOAD return Packet1cd(pload<Packet2d>((const double*)from));\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet1cd ploadu<Packet1cd>(const std::complex<double>* from) {\n  EIGEN_MSA_DEBUG;\n\n  EIGEN_DEBUG_UNALIGNED_LOAD return Packet1cd(ploadu<Packet2d>((const double*)from));\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet1cd pset1<Packet1cd>(const std::complex<double>& from) {\n  EIGEN_MSA_DEBUG;\n\n  return Packet1cd(from);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet1cd padd<Packet1cd>(const Packet1cd& a, const Packet1cd& b) {\n  EIGEN_MSA_DEBUG;\n\n  return a + b;\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet1cd psub<Packet1cd>(const Packet1cd& a, const Packet1cd& b) {\n  EIGEN_MSA_DEBUG;\n\n  return a - b;\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet1cd pnegate(const Packet1cd& a) {\n  EIGEN_MSA_DEBUG;\n\n  return -a;\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet1cd pconj(const Packet1cd& a) {\n  EIGEN_MSA_DEBUG;\n\n  return a.conjugate();\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet1cd pmul<Packet1cd>(const Packet1cd& a, const Packet1cd& b) {\n  EIGEN_MSA_DEBUG;\n\n  return a * b;\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet1cd pand<Packet1cd>(const Packet1cd& a, const Packet1cd& b) {\n  EIGEN_MSA_DEBUG;\n\n  return Packet1cd(pand(a.v, b.v));\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet1cd por<Packet1cd>(const Packet1cd& a, const Packet1cd& b) {\n  EIGEN_MSA_DEBUG;\n\n  return Packet1cd(por(a.v, b.v));\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet1cd pxor<Packet1cd>(const Packet1cd& a, const Packet1cd& b) {\n  EIGEN_MSA_DEBUG;\n\n  return Packet1cd(pxor(a.v, b.v));\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet1cd pandnot<Packet1cd>(const Packet1cd& a, const Packet1cd& b) {\n  EIGEN_MSA_DEBUG;\n\n  return Packet1cd(pandnot(a.v, b.v));\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet1cd ploaddup<Packet1cd>(const std::complex<double>* from) {\n  EIGEN_MSA_DEBUG;\n\n  return pset1<Packet1cd>(*from);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE void pstore<std::complex<double> >(std::complex<double>* to,\n                                                       const Packet1cd& from) {\n  EIGEN_MSA_DEBUG;\n\n  EIGEN_DEBUG_ALIGNED_STORE pstore<double>((double*)to, from.v);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE void pstoreu<std::complex<double> >(std::complex<double>* to,\n                                                        const Packet1cd& from) {\n  EIGEN_MSA_DEBUG;\n\n  EIGEN_DEBUG_UNALIGNED_STORE pstoreu<double>((double*)to, from.v);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE void prefetch<std::complex<double> >(const std::complex<double>* addr) {\n  EIGEN_MSA_DEBUG;\n\n  prefetch(reinterpret_cast<const double*>(addr));\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC inline Packet1cd pgather<std::complex<double>, Packet1cd>(\n    const std::complex<double>* from, Index stride __attribute__((unused))) {\n  EIGEN_MSA_DEBUG;\n\n  Packet1cd res;\n  res.v[0] = std::real(from[0]);\n  res.v[1] = std::imag(from[0]);\n  return res;\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC inline void pscatter<std::complex<double>, Packet1cd>(std::complex<double>* to,\n                                                                        const Packet1cd& from,\n                                                                        Index stride\n                                                                        __attribute__((unused))) {\n  EIGEN_MSA_DEBUG;\n\n  pstore(to, from);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE std::complex<double> pfirst<Packet1cd>(const Packet1cd& a) {\n  EIGEN_MSA_DEBUG;\n\n  return std::complex<double>(a.v[0], a.v[1]);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet1cd preverse(const Packet1cd& a) {\n  EIGEN_MSA_DEBUG;\n\n  return a;\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE std::complex<double> predux<Packet1cd>(const Packet1cd& a) {\n  EIGEN_MSA_DEBUG;\n\n  return pfirst(a);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet1cd preduxp<Packet1cd>(const Packet1cd* vecs) {\n  EIGEN_MSA_DEBUG;\n\n  return vecs[0];\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE std::complex<double> predux_mul<Packet1cd>(const Packet1cd& a) {\n  EIGEN_MSA_DEBUG;\n\n  return pfirst(a);\n}\n\ntemplate <int Offset>\nstruct palign_impl<Offset, Packet1cd> {\n  static EIGEN_STRONG_INLINE void run(Packet1cd& /*first*/, const Packet1cd& /*second*/) {\n    // FIXME is it sure we never have to align a Packet1cd?\n    // Even though a std::complex<double> has 16 bytes, it is not necessarily aligned on a 16 bytes\n    // boundary...\n  }\n};\n\ntemplate <>\nstruct conj_helper<Packet1cd, Packet1cd, false, true> {\n  EIGEN_STRONG_INLINE Packet1cd pmadd(const Packet1cd& x, const Packet1cd& y,\n                                      const Packet1cd& c) const {\n    return padd(pmul(x, y), c);\n  }\n\n  EIGEN_STRONG_INLINE Packet1cd pmul(const Packet1cd& a, const Packet1cd& b) const {\n    return internal::pmul(a, pconj(b));\n  }\n};\n\ntemplate <>\nstruct conj_helper<Packet1cd, Packet1cd, true, false> {\n  EIGEN_STRONG_INLINE Packet1cd pmadd(const Packet1cd& x, const Packet1cd& y,\n                                      const Packet1cd& c) const {\n    return padd(pmul(x, y), c);\n  }\n\n  EIGEN_STRONG_INLINE Packet1cd pmul(const Packet1cd& a, const Packet1cd& b) const {\n    return internal::pmul(pconj(a), b);\n  }\n};\n\ntemplate <>\nstruct conj_helper<Packet1cd, Packet1cd, true, true> {\n  EIGEN_STRONG_INLINE Packet1cd pmadd(const Packet1cd& x, const Packet1cd& y,\n                                      const Packet1cd& c) const {\n    return padd(pmul(x, y), c);\n  }\n\n  EIGEN_STRONG_INLINE Packet1cd pmul(const Packet1cd& a, const Packet1cd& b) const {\n    return pconj(internal::pmul(a, b));\n  }\n};\n\nEIGEN_MAKE_CONJ_HELPER_CPLX_REAL(Packet1cd, Packet2d)\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet1cd pdiv<Packet1cd>(const Packet1cd& a, const Packet1cd& b) {\n  EIGEN_MSA_DEBUG;\n\n  return a / b;\n}\n\nEIGEN_STRONG_INLINE Packet1cd pcplxflip /*<Packet1cd>*/ (const Packet1cd& x) {\n  EIGEN_MSA_DEBUG;\n\n  return Packet1cd(preverse(Packet2d(x.v)));\n}\n\ninline std::ostream& operator<<(std::ostream& os, const PacketBlock<Packet1cd, 2>& value) {\n  os << \"[ \" << value.packet[0] << \", \" << std::endl << \"  \" << value.packet[1] << \" ]\";\n  return os;\n}\n\nEIGEN_STRONG_INLINE void ptranspose(PacketBlock<Packet1cd, 2>& kernel) {\n  EIGEN_MSA_DEBUG;\n\n  Packet2d v1, v2;\n\n  v1 = (Packet2d)__builtin_msa_ilvev_d((v2i64)kernel.packet[0].v, (v2i64)kernel.packet[1].v);\n  // Get the imag values of a\n  v2 = (Packet2d)__builtin_msa_ilvod_d((v2i64)kernel.packet[0].v, (v2i64)kernel.packet[1].v);\n\n  kernel.packet[0].v = v1;\n  kernel.packet[1].v = v2;\n}\n\n}  // end namespace internal\n\n}  // end namespace Eigen\n\n#endif  // EIGEN_COMPLEX_MSA_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/MSA/MathFunctions.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2007 Julien Pommier\n// Copyright (C) 2014 Pedro Gonnet (pedro.gonnet@gmail.com)\n// Copyright (C) 2016 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// Copyright (C) 2018 Wave Computing, Inc.\n// Written by:\n//   Chris Larsen\n//   Alexey Frunze (afrunze@wavecomp.com)\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n/* The sin, cos, exp, and log functions of this file come from\n * Julien Pommier's sse math library: http://gruntthepeon.free.fr/ssemath/\n */\n\n/* The tanh function of this file is an adaptation of\n * template<typename T> T generic_fast_tanh_float(const T&)\n * from MathFunctionsImpl.h.\n */\n\n#ifndef EIGEN_MATH_FUNCTIONS_MSA_H\n#define EIGEN_MATH_FUNCTIONS_MSA_H\n\nnamespace Eigen {\n\nnamespace internal {\n\ntemplate <>\nEIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet4f\nplog<Packet4f>(const Packet4f& _x) {\n  static _EIGEN_DECLARE_CONST_Packet4f(cephes_SQRTHF, 0.707106781186547524f);\n  static _EIGEN_DECLARE_CONST_Packet4f(cephes_log_p0, 7.0376836292e-2f);\n  static _EIGEN_DECLARE_CONST_Packet4f(cephes_log_p1, -1.1514610310e-1f);\n  static _EIGEN_DECLARE_CONST_Packet4f(cephes_log_p2, 1.1676998740e-1f);\n  static _EIGEN_DECLARE_CONST_Packet4f(cephes_log_p3, -1.2420140846e-1f);\n  static _EIGEN_DECLARE_CONST_Packet4f(cephes_log_p4, +1.4249322787e-1f);\n  static _EIGEN_DECLARE_CONST_Packet4f(cephes_log_p5, -1.6668057665e-1f);\n  static _EIGEN_DECLARE_CONST_Packet4f(cephes_log_p6, +2.0000714765e-1f);\n  static _EIGEN_DECLARE_CONST_Packet4f(cephes_log_p7, -2.4999993993e-1f);\n  static _EIGEN_DECLARE_CONST_Packet4f(cephes_log_p8, +3.3333331174e-1f);\n  static _EIGEN_DECLARE_CONST_Packet4f(cephes_log_q1, -2.12194440e-4f);\n  static _EIGEN_DECLARE_CONST_Packet4f(cephes_log_q2, 0.693359375f);\n  static _EIGEN_DECLARE_CONST_Packet4f(half, 0.5f);\n  static _EIGEN_DECLARE_CONST_Packet4f(1, 1.0f);\n\n  // Convert negative argument into NAN (quiet negative, to be specific).\n  Packet4f zero = (Packet4f)__builtin_msa_ldi_w(0);\n  Packet4i neg_mask = __builtin_msa_fclt_w(_x, zero);\n  Packet4i zero_mask = __builtin_msa_fceq_w(_x, zero);\n  Packet4f non_neg_x_or_nan = padd(_x, (Packet4f)neg_mask);  // Add 0.0 or NAN.\n  Packet4f x = non_neg_x_or_nan;\n\n  // Extract exponent from x = mantissa * 2**exponent, where 1.0 <= mantissa < 2.0.\n  // N.B. the exponent is one less of what frexpf() would return.\n  Packet4i e_int = __builtin_msa_ftint_s_w(__builtin_msa_flog2_w(x));\n  // Multiply x by 2**(-exponent-1) to get 0.5 <= x < 1.0 as from frexpf().\n  x = __builtin_msa_fexp2_w(x, (Packet4i)__builtin_msa_nori_b((v16u8)e_int, 0));\n\n  /*\n     if (x < SQRTHF) {\n       x = x + x - 1.0;\n     } else {\n       e += 1;\n       x = x - 1.0;\n     }\n  */\n  Packet4f xx = padd(x, x);\n  Packet4i ge_mask = __builtin_msa_fcle_w(p4f_cephes_SQRTHF, x);\n  e_int = psub(e_int, ge_mask);\n  x = (Packet4f)__builtin_msa_bsel_v((v16u8)ge_mask, (v16u8)xx, (v16u8)x);\n  x = psub(x, p4f_1);\n  Packet4f e = __builtin_msa_ffint_s_w(e_int);\n\n  Packet4f x2 = pmul(x, x);\n  Packet4f x3 = pmul(x2, x);\n\n  Packet4f y, y1, y2;\n  y = pmadd(p4f_cephes_log_p0, x, p4f_cephes_log_p1);\n  y1 = pmadd(p4f_cephes_log_p3, x, p4f_cephes_log_p4);\n  y2 = pmadd(p4f_cephes_log_p6, x, p4f_cephes_log_p7);\n  y = pmadd(y, x, p4f_cephes_log_p2);\n  y1 = pmadd(y1, x, p4f_cephes_log_p5);\n  y2 = pmadd(y2, x, p4f_cephes_log_p8);\n  y = pmadd(y, x3, y1);\n  y = pmadd(y, x3, y2);\n  y = pmul(y, x3);\n\n  y = pmadd(e, p4f_cephes_log_q1, y);\n  x = __builtin_msa_fmsub_w(x, x2, p4f_half);\n  x = padd(x, y);\n  x = pmadd(e, p4f_cephes_log_q2, x);\n\n  // x is now the logarithm result candidate. We still need to handle the\n  // extreme arguments of zero and positive infinity, though.\n  // N.B. if the argument is +INFINITY, x is NAN because the polynomial terms\n  // contain infinities of both signs (see the coefficients and code above).\n  // INFINITY - INFINITY is NAN.\n\n  // If the argument is +INFINITY, make it the new result candidate.\n  // To achieve that we choose the smaller of the result candidate and the\n  // argument.\n  // This is correct for all finite pairs of values (the logarithm is smaller\n  // than the argument).\n  // This is also correct in the special case when the argument is +INFINITY\n  // and the result candidate is NAN. This is because the fmin.df instruction\n  // prefers non-NANs to NANs.\n  x = __builtin_msa_fmin_w(x, non_neg_x_or_nan);\n\n  // If the argument is zero (including -0.0), the result becomes -INFINITY.\n  Packet4i neg_infs = __builtin_msa_slli_w(zero_mask, 23);\n  x = (Packet4f)__builtin_msa_bsel_v((v16u8)zero_mask, (v16u8)x, (v16u8)neg_infs);\n\n  return x;\n}\n\ntemplate <>\nEIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet4f\npexp<Packet4f>(const Packet4f& _x) {\n  // Limiting single-precision pexp's argument to [-128, +128] lets pexp\n  // reach 0 and INFINITY naturally.\n  static _EIGEN_DECLARE_CONST_Packet4f(exp_lo, -128.0f);\n  static _EIGEN_DECLARE_CONST_Packet4f(exp_hi, +128.0f);\n  static _EIGEN_DECLARE_CONST_Packet4f(cephes_LOG2EF, 1.44269504088896341f);\n  static _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_C1, 0.693359375f);\n  static _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_C2, -2.12194440e-4f);\n  static _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p0, 1.9875691500e-4f);\n  static _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p1, 1.3981999507e-3f);\n  static _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p2, 8.3334519073e-3f);\n  static _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p3, 4.1665795894e-2f);\n  static _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p4, 1.6666665459e-1f);\n  static _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p5, 5.0000001201e-1f);\n  static _EIGEN_DECLARE_CONST_Packet4f(half, 0.5f);\n  static _EIGEN_DECLARE_CONST_Packet4f(1, 1.0f);\n\n  Packet4f x = _x;\n\n  // Clamp x.\n  x = (Packet4f)__builtin_msa_bsel_v((v16u8)__builtin_msa_fclt_w(x, p4f_exp_lo), (v16u8)x,\n                                     (v16u8)p4f_exp_lo);\n  x = (Packet4f)__builtin_msa_bsel_v((v16u8)__builtin_msa_fclt_w(p4f_exp_hi, x), (v16u8)x,\n                                     (v16u8)p4f_exp_hi);\n\n  // Round to nearest integer by adding 0.5 (with x's sign) and truncating.\n  Packet4f x2_add = (Packet4f)__builtin_msa_binsli_w((v4u32)p4f_half, (v4u32)x, 0);\n  Packet4f x2 = pmadd(x, p4f_cephes_LOG2EF, x2_add);\n  Packet4i x2_int = __builtin_msa_ftrunc_s_w(x2);\n  Packet4f x2_int_f = __builtin_msa_ffint_s_w(x2_int);\n\n  x = __builtin_msa_fmsub_w(x, x2_int_f, p4f_cephes_exp_C1);\n  x = __builtin_msa_fmsub_w(x, x2_int_f, p4f_cephes_exp_C2);\n\n  Packet4f z = pmul(x, x);\n\n  Packet4f y = p4f_cephes_exp_p0;\n  y = pmadd(y, x, p4f_cephes_exp_p1);\n  y = pmadd(y, x, p4f_cephes_exp_p2);\n  y = pmadd(y, x, p4f_cephes_exp_p3);\n  y = pmadd(y, x, p4f_cephes_exp_p4);\n  y = pmadd(y, x, p4f_cephes_exp_p5);\n  y = pmadd(y, z, x);\n  y = padd(y, p4f_1);\n\n  // y *= 2**exponent.\n  y = __builtin_msa_fexp2_w(y, x2_int);\n\n  return y;\n}\n\ntemplate <>\nEIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet4f\nptanh<Packet4f>(const Packet4f& _x) {\n  static _EIGEN_DECLARE_CONST_Packet4f(tanh_tiny, 1e-4f);\n  static _EIGEN_DECLARE_CONST_Packet4f(tanh_hi, 9.0f);\n  // The monomial coefficients of the numerator polynomial (odd).\n  static _EIGEN_DECLARE_CONST_Packet4f(alpha_1, 4.89352455891786e-3f);\n  static _EIGEN_DECLARE_CONST_Packet4f(alpha_3, 6.37261928875436e-4f);\n  static _EIGEN_DECLARE_CONST_Packet4f(alpha_5, 1.48572235717979e-5f);\n  static _EIGEN_DECLARE_CONST_Packet4f(alpha_7, 5.12229709037114e-8f);\n  static _EIGEN_DECLARE_CONST_Packet4f(alpha_9, -8.60467152213735e-11f);\n  static _EIGEN_DECLARE_CONST_Packet4f(alpha_11, 2.00018790482477e-13f);\n  static _EIGEN_DECLARE_CONST_Packet4f(alpha_13, -2.76076847742355e-16f);\n  // The monomial coefficients of the denominator polynomial (even).\n  static _EIGEN_DECLARE_CONST_Packet4f(beta_0, 4.89352518554385e-3f);\n  static _EIGEN_DECLARE_CONST_Packet4f(beta_2, 2.26843463243900e-3f);\n  static _EIGEN_DECLARE_CONST_Packet4f(beta_4, 1.18534705686654e-4f);\n  static _EIGEN_DECLARE_CONST_Packet4f(beta_6, 1.19825839466702e-6f);\n\n  Packet4f x = pabs(_x);\n  Packet4i tiny_mask = __builtin_msa_fclt_w(x, p4f_tanh_tiny);\n\n  // Clamp the inputs to the range [-9, 9] since anything outside\n  // this range is -/+1.0f in single-precision.\n  x = (Packet4f)__builtin_msa_bsel_v((v16u8)__builtin_msa_fclt_w(p4f_tanh_hi, x), (v16u8)x,\n                                     (v16u8)p4f_tanh_hi);\n\n  // Since the polynomials are odd/even, we need x**2.\n  Packet4f x2 = pmul(x, x);\n\n  // Evaluate the numerator polynomial p.\n  Packet4f p = pmadd(x2, p4f_alpha_13, p4f_alpha_11);\n  p = pmadd(x2, p, p4f_alpha_9);\n  p = pmadd(x2, p, p4f_alpha_7);\n  p = pmadd(x2, p, p4f_alpha_5);\n  p = pmadd(x2, p, p4f_alpha_3);\n  p = pmadd(x2, p, p4f_alpha_1);\n  p = pmul(x, p);\n\n  // Evaluate the denominator polynomial q.\n  Packet4f q = pmadd(x2, p4f_beta_6, p4f_beta_4);\n  q = pmadd(x2, q, p4f_beta_2);\n  q = pmadd(x2, q, p4f_beta_0);\n\n  // Divide the numerator by the denominator.\n  p = pdiv(p, q);\n\n  // Reinstate the sign.\n  p = (Packet4f)__builtin_msa_binsli_w((v4u32)p, (v4u32)_x, 0);\n\n  // When the argument is very small in magnitude it's more accurate to just return it.\n  p = (Packet4f)__builtin_msa_bsel_v((v16u8)tiny_mask, (v16u8)p, (v16u8)_x);\n\n  return p;\n}\n\ntemplate <bool sine>\nPacket4f psincos_inner_msa_float(const Packet4f& _x) {\n  static _EIGEN_DECLARE_CONST_Packet4f(sincos_max_arg, 13176795.0f);  // Approx. (2**24) / (4/Pi).\n  static _EIGEN_DECLARE_CONST_Packet4f(minus_cephes_DP1, -0.78515625f);\n  static _EIGEN_DECLARE_CONST_Packet4f(minus_cephes_DP2, -2.4187564849853515625e-4f);\n  static _EIGEN_DECLARE_CONST_Packet4f(minus_cephes_DP3, -3.77489497744594108e-8f);\n  static _EIGEN_DECLARE_CONST_Packet4f(sincof_p0, -1.9515295891e-4f);\n  static _EIGEN_DECLARE_CONST_Packet4f(sincof_p1, 8.3321608736e-3f);\n  static _EIGEN_DECLARE_CONST_Packet4f(sincof_p2, -1.6666654611e-1f);\n  static _EIGEN_DECLARE_CONST_Packet4f(coscof_p0, 2.443315711809948e-5f);\n  static _EIGEN_DECLARE_CONST_Packet4f(coscof_p1, -1.388731625493765e-3f);\n  static _EIGEN_DECLARE_CONST_Packet4f(coscof_p2, 4.166664568298827e-2f);\n  static _EIGEN_DECLARE_CONST_Packet4f(cephes_FOPI, 1.27323954473516f);  // 4/Pi.\n  static _EIGEN_DECLARE_CONST_Packet4f(half, 0.5f);\n  static _EIGEN_DECLARE_CONST_Packet4f(1, 1.0f);\n\n  Packet4f x = pabs(_x);\n\n  // Translate infinite arguments into NANs.\n  Packet4f zero_or_nan_if_inf = psub(_x, _x);\n  x = padd(x, zero_or_nan_if_inf);\n  // Prevent sin/cos from generating values larger than 1.0 in magnitude\n  // for very large arguments by setting x to 0.0.\n  Packet4i small_or_nan_mask = __builtin_msa_fcult_w(x, p4f_sincos_max_arg);\n  x = pand(x, (Packet4f)small_or_nan_mask);\n\n  // Scale x by 4/Pi to find x's octant.\n  Packet4f y = pmul(x, p4f_cephes_FOPI);\n  // Get the octant. We'll reduce x by this number of octants or by one more than it.\n  Packet4i y_int = __builtin_msa_ftrunc_s_w(y);\n  // x's from even-numbered octants will translate to octant 0: [0, +Pi/4].\n  // x's from odd-numbered octants will translate to octant -1: [-Pi/4, 0].\n  // Adjustment for odd-numbered octants: octant = (octant + 1) & (~1).\n  Packet4i y_int1 = __builtin_msa_addvi_w(y_int, 1);\n  Packet4i y_int2 = (Packet4i)__builtin_msa_bclri_w((Packet4ui)y_int1, 0); // bclri = bit-clear\n  y = __builtin_msa_ffint_s_w(y_int2);\n\n  // Compute the sign to apply to the polynomial.\n  Packet4i sign_mask = sine ? pxor(__builtin_msa_slli_w(y_int1, 29), (Packet4i)_x)\n                            : __builtin_msa_slli_w(__builtin_msa_addvi_w(y_int, 3), 29);\n\n  // Get the polynomial selection mask.\n  // We'll calculate both (sin and cos) polynomials and then select from the two.\n  Packet4i poly_mask = __builtin_msa_ceqi_w(__builtin_msa_slli_w(y_int2, 30), 0);\n\n  // Reduce x by y octants to get: -Pi/4 <= x <= +Pi/4.\n  // The magic pass: \"Extended precision modular arithmetic\"\n  // x = ((x - y * DP1) - y * DP2) - y * DP3\n  Packet4f tmp1 = pmul(y, p4f_minus_cephes_DP1);\n  Packet4f tmp2 = pmul(y, p4f_minus_cephes_DP2);\n  Packet4f tmp3 = pmul(y, p4f_minus_cephes_DP3);\n  x = padd(x, tmp1);\n  x = padd(x, tmp2);\n  x = padd(x, tmp3);\n\n  // Evaluate the cos(x) polynomial.\n  y = p4f_coscof_p0;\n  Packet4f z = pmul(x, x);\n  y = pmadd(y, z, p4f_coscof_p1);\n  y = pmadd(y, z, p4f_coscof_p2);\n  y = pmul(y, z);\n  y = pmul(y, z);\n  y = __builtin_msa_fmsub_w(y, z, p4f_half);\n  y = padd(y, p4f_1);\n\n  // Evaluate the sin(x) polynomial.\n  Packet4f y2 = p4f_sincof_p0;\n  y2 = pmadd(y2, z, p4f_sincof_p1);\n  y2 = pmadd(y2, z, p4f_sincof_p2);\n  y2 = pmul(y2, z);\n  y2 = pmadd(y2, x, x);\n\n  // Select the correct result from the two polynomials.\n  y = sine ? (Packet4f)__builtin_msa_bsel_v((v16u8)poly_mask, (v16u8)y, (v16u8)y2)\n           : (Packet4f)__builtin_msa_bsel_v((v16u8)poly_mask, (v16u8)y2, (v16u8)y);\n\n  // Update the sign.\n  sign_mask = pxor(sign_mask, (Packet4i)y);\n  y = (Packet4f)__builtin_msa_binsli_w((v4u32)y, (v4u32)sign_mask, 0); // binsli = bit-insert-left\n  return y;\n}\n\ntemplate <>\nEIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet4f\npsin<Packet4f>(const Packet4f& x) {\n  return psincos_inner_msa_float</* sine */ true>(x);\n}\n\ntemplate <>\nEIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet4f\npcos<Packet4f>(const Packet4f& x) {\n  return psincos_inner_msa_float</* sine */ false>(x);\n}\n\ntemplate <>\nEIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet2d\npexp<Packet2d>(const Packet2d& _x) {\n  // Limiting double-precision pexp's argument to [-1024, +1024] lets pexp\n  // reach 0 and INFINITY naturally.\n  static _EIGEN_DECLARE_CONST_Packet2d(exp_lo, -1024.0);\n  static _EIGEN_DECLARE_CONST_Packet2d(exp_hi, +1024.0);\n  static _EIGEN_DECLARE_CONST_Packet2d(cephes_LOG2EF, 1.4426950408889634073599);\n  static _EIGEN_DECLARE_CONST_Packet2d(cephes_exp_C1, 0.693145751953125);\n  static _EIGEN_DECLARE_CONST_Packet2d(cephes_exp_C2, 1.42860682030941723212e-6);\n  static _EIGEN_DECLARE_CONST_Packet2d(cephes_exp_p0, 1.26177193074810590878e-4);\n  static _EIGEN_DECLARE_CONST_Packet2d(cephes_exp_p1, 3.02994407707441961300e-2);\n  static _EIGEN_DECLARE_CONST_Packet2d(cephes_exp_p2, 9.99999999999999999910e-1);\n  static _EIGEN_DECLARE_CONST_Packet2d(cephes_exp_q0, 3.00198505138664455042e-6);\n  static _EIGEN_DECLARE_CONST_Packet2d(cephes_exp_q1, 2.52448340349684104192e-3);\n  static _EIGEN_DECLARE_CONST_Packet2d(cephes_exp_q2, 2.27265548208155028766e-1);\n  static _EIGEN_DECLARE_CONST_Packet2d(cephes_exp_q3, 2.00000000000000000009e0);\n  static _EIGEN_DECLARE_CONST_Packet2d(half, 0.5);\n  static _EIGEN_DECLARE_CONST_Packet2d(1, 1.0);\n  static _EIGEN_DECLARE_CONST_Packet2d(2, 2.0);\n\n  Packet2d x = _x;\n\n  // Clamp x.\n  x = (Packet2d)__builtin_msa_bsel_v((v16u8)__builtin_msa_fclt_d(x, p2d_exp_lo), (v16u8)x,\n                                     (v16u8)p2d_exp_lo);\n  x = (Packet2d)__builtin_msa_bsel_v((v16u8)__builtin_msa_fclt_d(p2d_exp_hi, x), (v16u8)x,\n                                     (v16u8)p2d_exp_hi);\n\n  // Round to nearest integer by adding 0.5 (with x's sign) and truncating.\n  Packet2d x2_add = (Packet2d)__builtin_msa_binsli_d((v2u64)p2d_half, (v2u64)x, 0);\n  Packet2d x2 = pmadd(x, p2d_cephes_LOG2EF, x2_add);\n  Packet2l x2_long = __builtin_msa_ftrunc_s_d(x2);\n  Packet2d x2_long_d = __builtin_msa_ffint_s_d(x2_long);\n\n  x = __builtin_msa_fmsub_d(x, x2_long_d, p2d_cephes_exp_C1);\n  x = __builtin_msa_fmsub_d(x, x2_long_d, p2d_cephes_exp_C2);\n\n  x2 = pmul(x, x);\n\n  Packet2d px = p2d_cephes_exp_p0;\n  px = pmadd(px, x2, p2d_cephes_exp_p1);\n  px = pmadd(px, x2, p2d_cephes_exp_p2);\n  px = pmul(px, x);\n\n  Packet2d qx = p2d_cephes_exp_q0;\n  qx = pmadd(qx, x2, p2d_cephes_exp_q1);\n  qx = pmadd(qx, x2, p2d_cephes_exp_q2);\n  qx = pmadd(qx, x2, p2d_cephes_exp_q3);\n\n  x = pdiv(px, psub(qx, px));\n  x = pmadd(p2d_2, x, p2d_1);\n\n  // x *= 2**exponent.\n  x = __builtin_msa_fexp2_d(x, x2_long);\n\n  return x;\n}\n\n}  // end namespace internal\n\n}  // end namespace Eigen\n\n#endif  // EIGEN_MATH_FUNCTIONS_MSA_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/MSA/PacketMath.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2018 Wave Computing, Inc.\n// Written by:\n//   Chris Larsen\n//   Alexey Frunze (afrunze@wavecomp.com)\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_PACKET_MATH_MSA_H\n#define EIGEN_PACKET_MATH_MSA_H\n\n#include <iostream>\n#include <string>\n\nnamespace Eigen {\n\nnamespace internal {\n\n#ifndef EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD\n#define EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 8\n#endif\n\n#ifndef EIGEN_HAS_SINGLE_INSTRUCTION_MADD\n#define EIGEN_HAS_SINGLE_INSTRUCTION_MADD\n#endif\n\n#ifndef EIGEN_HAS_SINGLE_INSTRUCTION_CJMADD\n#define EIGEN_HAS_SINGLE_INSTRUCTION_CJMADD\n#endif\n\n#ifndef EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS\n#define EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS 32\n#endif\n\n#if 0\n#define EIGEN_MSA_DEBUG                                                             \\\n  static bool firstTime = true;                                                     \\\n  do {                                                                              \\\n    if (firstTime) {                                                                \\\n      std::cout << __FILE__ << ':' << __LINE__ << ':' << __FUNCTION__ << std::endl; \\\n      firstTime = false;                                                            \\\n    }                                                                               \\\n  } while (0)\n#else\n#define EIGEN_MSA_DEBUG\n#endif\n\n#define EIGEN_MSA_SHF_I8(a, b, c, d) (((d) << 6) | ((c) << 4) | ((b) << 2) | (a))\n\ntypedef v4f32 Packet4f;\ntypedef v4i32 Packet4i;\ntypedef v4u32 Packet4ui;\n\n#define _EIGEN_DECLARE_CONST_Packet4f(NAME, X) const Packet4f p4f_##NAME = { X, X, X, X }\n#define _EIGEN_DECLARE_CONST_Packet4i(NAME, X) const Packet4i p4i_##NAME = { X, X, X, X }\n#define _EIGEN_DECLARE_CONST_Packet4ui(NAME, X) const Packet4ui p4ui_##NAME = { X, X, X, X }\n\ninline std::ostream& operator<<(std::ostream& os, const Packet4f& value) {\n  os << \"[ \" << value[0] << \", \" << value[1] << \", \" << value[2] << \", \" << value[3] << \" ]\";\n  return os;\n}\n\ninline std::ostream& operator<<(std::ostream& os, const Packet4i& value) {\n  os << \"[ \" << value[0] << \", \" << value[1] << \", \" << value[2] << \", \" << value[3] << \" ]\";\n  return os;\n}\n\ninline std::ostream& operator<<(std::ostream& os, const Packet4ui& value) {\n  os << \"[ \" << value[0] << \", \" << value[1] << \", \" << value[2] << \", \" << value[3] << \" ]\";\n  return os;\n}\n\ntemplate <>\nstruct packet_traits<float> : default_packet_traits {\n  typedef Packet4f type;\n  typedef Packet4f half;  // Packet2f intrinsics not implemented yet\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size = 4,\n    HasHalfPacket = 0,  // Packet2f intrinsics not implemented yet\n    // FIXME check the Has*\n    HasDiv = 1,\n    HasSin = EIGEN_FAST_MATH,\n    HasCos = EIGEN_FAST_MATH,\n    HasTanh = EIGEN_FAST_MATH,\n    HasErf = EIGEN_FAST_MATH,\n    HasLog = 1,\n    HasExp = 1,\n    HasSqrt = 1,\n    HasRsqrt = 1,\n    HasRound = 1,\n    HasFloor = 1,\n    HasCeil = 1,\n    HasBlend = 1\n  };\n};\n\ntemplate <>\nstruct packet_traits<int32_t> : default_packet_traits {\n  typedef Packet4i type;\n  typedef Packet4i half;  // Packet2i intrinsics not implemented yet\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size = 4,\n    HasHalfPacket = 0,  // Packet2i intrinsics not implemented yet\n    // FIXME check the Has*\n    HasDiv = 1,\n    HasBlend = 1\n  };\n};\n\ntemplate <>\nstruct unpacket_traits<Packet4f> {\n  typedef float type;\n  enum { size = 4, alignment = Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false };\n  typedef Packet4f half;\n};\n\ntemplate <>\nstruct unpacket_traits<Packet4i> {\n  typedef int32_t type;\n  enum { size = 4, alignment = Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false };\n  typedef Packet4i half;\n};\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4f pset1<Packet4f>(const float& from) {\n  EIGEN_MSA_DEBUG;\n\n  Packet4f v = { from, from, from, from };\n  return v;\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4i pset1<Packet4i>(const int32_t& from) {\n  EIGEN_MSA_DEBUG;\n\n  return __builtin_msa_fill_w(from);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4f pload1<Packet4f>(const float* from) {\n  EIGEN_MSA_DEBUG;\n\n  float f = *from;\n  Packet4f v = { f, f, f, f };\n  return v;\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4i pload1<Packet4i>(const int32_t* from) {\n  EIGEN_MSA_DEBUG;\n\n  return __builtin_msa_fill_w(*from);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4f padd<Packet4f>(const Packet4f& a, const Packet4f& b) {\n  EIGEN_MSA_DEBUG;\n\n  return __builtin_msa_fadd_w(a, b);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4i padd<Packet4i>(const Packet4i& a, const Packet4i& b) {\n  EIGEN_MSA_DEBUG;\n\n  return __builtin_msa_addv_w(a, b);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4f plset<Packet4f>(const float& a) {\n  EIGEN_MSA_DEBUG;\n\n  static const Packet4f countdown = { 0.0f, 1.0f, 2.0f, 3.0f };\n  return padd(pset1<Packet4f>(a), countdown);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4i plset<Packet4i>(const int32_t& a) {\n  EIGEN_MSA_DEBUG;\n\n  static const Packet4i countdown = { 0, 1, 2, 3 };\n  return padd(pset1<Packet4i>(a), countdown);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4f psub<Packet4f>(const Packet4f& a, const Packet4f& b) {\n  EIGEN_MSA_DEBUG;\n\n  return __builtin_msa_fsub_w(a, b);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4i psub<Packet4i>(const Packet4i& a, const Packet4i& b) {\n  EIGEN_MSA_DEBUG;\n\n  return __builtin_msa_subv_w(a, b);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4f pnegate(const Packet4f& a) {\n  EIGEN_MSA_DEBUG;\n\n  return (Packet4f)__builtin_msa_bnegi_w((v4u32)a, 31);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4i pnegate(const Packet4i& a) {\n  EIGEN_MSA_DEBUG;\n\n  return __builtin_msa_addvi_w((v4i32)__builtin_msa_nori_b((v16u8)a, 0), 1);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4f pconj(const Packet4f& a) {\n  EIGEN_MSA_DEBUG;\n\n  return a;\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4i pconj(const Packet4i& a) {\n  EIGEN_MSA_DEBUG;\n\n  return a;\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4f pmul<Packet4f>(const Packet4f& a, const Packet4f& b) {\n  EIGEN_MSA_DEBUG;\n\n  return __builtin_msa_fmul_w(a, b);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4i pmul<Packet4i>(const Packet4i& a, const Packet4i& b) {\n  EIGEN_MSA_DEBUG;\n\n  return __builtin_msa_mulv_w(a, b);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4f pdiv<Packet4f>(const Packet4f& a, const Packet4f& b) {\n  EIGEN_MSA_DEBUG;\n\n  return __builtin_msa_fdiv_w(a, b);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4i pdiv<Packet4i>(const Packet4i& a, const Packet4i& b) {\n  EIGEN_MSA_DEBUG;\n\n  return __builtin_msa_div_s_w(a, b);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4f pmadd(const Packet4f& a, const Packet4f& b, const Packet4f& c) {\n  EIGEN_MSA_DEBUG;\n\n  return __builtin_msa_fmadd_w(c, a, b);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4i pmadd(const Packet4i& a, const Packet4i& b, const Packet4i& c) {\n  EIGEN_MSA_DEBUG;\n\n  // Use \"asm\" construct to avoid __builtin_msa_maddv_w GNU C bug.\n  Packet4i value = c;\n  __asm__(\"maddv.w %w[value], %w[a], %w[b]\\n\"\n          // Outputs\n          : [value] \"+f\"(value)\n          // Inputs\n          : [a] \"f\"(a), [b] \"f\"(b));\n  return value;\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4f pand<Packet4f>(const Packet4f& a, const Packet4f& b) {\n  EIGEN_MSA_DEBUG;\n\n  return (Packet4f)__builtin_msa_and_v((v16u8)a, (v16u8)b);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4i pand<Packet4i>(const Packet4i& a, const Packet4i& b) {\n  EIGEN_MSA_DEBUG;\n\n  return (Packet4i)__builtin_msa_and_v((v16u8)a, (v16u8)b);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4f por<Packet4f>(const Packet4f& a, const Packet4f& b) {\n  EIGEN_MSA_DEBUG;\n\n  return (Packet4f)__builtin_msa_or_v((v16u8)a, (v16u8)b);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4i por<Packet4i>(const Packet4i& a, const Packet4i& b) {\n  EIGEN_MSA_DEBUG;\n\n  return (Packet4i)__builtin_msa_or_v((v16u8)a, (v16u8)b);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4f pxor<Packet4f>(const Packet4f& a, const Packet4f& b) {\n  EIGEN_MSA_DEBUG;\n\n  return (Packet4f)__builtin_msa_xor_v((v16u8)a, (v16u8)b);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4i pxor<Packet4i>(const Packet4i& a, const Packet4i& b) {\n  EIGEN_MSA_DEBUG;\n\n  return (Packet4i)__builtin_msa_xor_v((v16u8)a, (v16u8)b);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4f pandnot<Packet4f>(const Packet4f& a, const Packet4f& b) {\n  EIGEN_MSA_DEBUG;\n\n  return pand(a, (Packet4f)__builtin_msa_xori_b((v16u8)b, 255));\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4i pandnot<Packet4i>(const Packet4i& a, const Packet4i& b) {\n  EIGEN_MSA_DEBUG;\n\n  return pand(a, (Packet4i)__builtin_msa_xori_b((v16u8)b, 255));\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4f pmin<Packet4f>(const Packet4f& a, const Packet4f& b) {\n  EIGEN_MSA_DEBUG;\n\n#if EIGEN_FAST_MATH\n  // This prefers numbers to NaNs.\n  return __builtin_msa_fmin_w(a, b);\n#else\n  // This prefers NaNs to numbers.\n  Packet4i aNaN = __builtin_msa_fcun_w(a, a);\n  Packet4i aMinOrNaN = por(__builtin_msa_fclt_w(a, b), aNaN);\n  return (Packet4f)__builtin_msa_bsel_v((v16u8)aMinOrNaN, (v16u8)b, (v16u8)a);\n#endif\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4i pmin<Packet4i>(const Packet4i& a, const Packet4i& b) {\n  EIGEN_MSA_DEBUG;\n\n  return __builtin_msa_min_s_w(a, b);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4f pmax<Packet4f>(const Packet4f& a, const Packet4f& b) {\n  EIGEN_MSA_DEBUG;\n\n#if EIGEN_FAST_MATH\n  // This prefers numbers to NaNs.\n  return __builtin_msa_fmax_w(a, b);\n#else\n  // This prefers NaNs to numbers.\n  Packet4i aNaN = __builtin_msa_fcun_w(a, a);\n  Packet4i aMaxOrNaN = por(__builtin_msa_fclt_w(b, a), aNaN);\n  return (Packet4f)__builtin_msa_bsel_v((v16u8)aMaxOrNaN, (v16u8)b, (v16u8)a);\n#endif\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4i pmax<Packet4i>(const Packet4i& a, const Packet4i& b) {\n  EIGEN_MSA_DEBUG;\n\n  return __builtin_msa_max_s_w(a, b);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4f pload<Packet4f>(const float* from) {\n  EIGEN_MSA_DEBUG;\n\n  EIGEN_DEBUG_ALIGNED_LOAD return (Packet4f)__builtin_msa_ld_w(const_cast<float*>(from), 0);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4i pload<Packet4i>(const int32_t* from) {\n  EIGEN_MSA_DEBUG;\n\n  EIGEN_DEBUG_ALIGNED_LOAD return __builtin_msa_ld_w(const_cast<int32_t*>(from), 0);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4f ploadu<Packet4f>(const float* from) {\n  EIGEN_MSA_DEBUG;\n\n  EIGEN_DEBUG_UNALIGNED_LOAD return (Packet4f)__builtin_msa_ld_w(const_cast<float*>(from), 0);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4i ploadu<Packet4i>(const int32_t* from) {\n  EIGEN_MSA_DEBUG;\n\n  EIGEN_DEBUG_UNALIGNED_LOAD return (Packet4i)__builtin_msa_ld_w(const_cast<int32_t*>(from), 0);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4f ploaddup<Packet4f>(const float* from) {\n  EIGEN_MSA_DEBUG;\n\n  float f0 = from[0], f1 = from[1];\n  Packet4f v0 = { f0, f0, f0, f0 };\n  Packet4f v1 = { f1, f1, f1, f1 };\n  return (Packet4f)__builtin_msa_ilvr_d((v2i64)v1, (v2i64)v0);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4i ploaddup<Packet4i>(const int32_t* from) {\n  EIGEN_MSA_DEBUG;\n\n  int32_t i0 = from[0], i1 = from[1];\n  Packet4i v0 = { i0, i0, i0, i0 };\n  Packet4i v1 = { i1, i1, i1, i1 };\n  return (Packet4i)__builtin_msa_ilvr_d((v2i64)v1, (v2i64)v0);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE void pstore<float>(float* to, const Packet4f& from) {\n  EIGEN_MSA_DEBUG;\n\n  EIGEN_DEBUG_ALIGNED_STORE __builtin_msa_st_w((Packet4i)from, to, 0);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE void pstore<int32_t>(int32_t* to, const Packet4i& from) {\n  EIGEN_MSA_DEBUG;\n\n  EIGEN_DEBUG_ALIGNED_STORE __builtin_msa_st_w(from, to, 0);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE void pstoreu<float>(float* to, const Packet4f& from) {\n  EIGEN_MSA_DEBUG;\n\n  EIGEN_DEBUG_UNALIGNED_STORE __builtin_msa_st_w((Packet4i)from, to, 0);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE void pstoreu<int32_t>(int32_t* to, const Packet4i& from) {\n  EIGEN_MSA_DEBUG;\n\n  EIGEN_DEBUG_UNALIGNED_STORE __builtin_msa_st_w(from, to, 0);\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC inline Packet4f pgather<float, Packet4f>(const float* from, Index stride) {\n  EIGEN_MSA_DEBUG;\n\n  float f = *from;\n  Packet4f v = { f, f, f, f };\n  v[1] = from[stride];\n  v[2] = from[2 * stride];\n  v[3] = from[3 * stride];\n  return v;\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC inline Packet4i pgather<int32_t, Packet4i>(const int32_t* from, Index stride) {\n  EIGEN_MSA_DEBUG;\n\n  int32_t i = *from;\n  Packet4i v = { i, i, i, i };\n  v[1] = from[stride];\n  v[2] = from[2 * stride];\n  v[3] = from[3 * stride];\n  return v;\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC inline void pscatter<float, Packet4f>(float* to, const Packet4f& from,\n                                                        Index stride) {\n  EIGEN_MSA_DEBUG;\n\n  *to = from[0];\n  to += stride;\n  *to = from[1];\n  to += stride;\n  *to = from[2];\n  to += stride;\n  *to = from[3];\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC inline void pscatter<int32_t, Packet4i>(int32_t* to, const Packet4i& from,\n                                                          Index stride) {\n  EIGEN_MSA_DEBUG;\n\n  *to = from[0];\n  to += stride;\n  *to = from[1];\n  to += stride;\n  *to = from[2];\n  to += stride;\n  *to = from[3];\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE void prefetch<float>(const float* addr) {\n  EIGEN_MSA_DEBUG;\n\n  __builtin_prefetch(addr);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE void prefetch<int32_t>(const int32_t* addr) {\n  EIGEN_MSA_DEBUG;\n\n  __builtin_prefetch(addr);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE float pfirst<Packet4f>(const Packet4f& a) {\n  EIGEN_MSA_DEBUG;\n\n  return a[0];\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE int32_t pfirst<Packet4i>(const Packet4i& a) {\n  EIGEN_MSA_DEBUG;\n\n  return a[0];\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4f preverse(const Packet4f& a) {\n  EIGEN_MSA_DEBUG;\n\n  return (Packet4f)__builtin_msa_shf_w((v4i32)a, EIGEN_MSA_SHF_I8(3, 2, 1, 0));\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4i preverse(const Packet4i& a) {\n  EIGEN_MSA_DEBUG;\n\n  return __builtin_msa_shf_w(a, EIGEN_MSA_SHF_I8(3, 2, 1, 0));\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4f pabs(const Packet4f& a) {\n  EIGEN_MSA_DEBUG;\n\n  return (Packet4f)__builtin_msa_bclri_w((v4u32)a, 31);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4i pabs(const Packet4i& a) {\n  EIGEN_MSA_DEBUG;\n\n  Packet4i zero = __builtin_msa_ldi_w(0);\n  return __builtin_msa_add_a_w(zero, a);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE float predux<Packet4f>(const Packet4f& a) {\n  EIGEN_MSA_DEBUG;\n\n  Packet4f s = padd(a, (Packet4f)__builtin_msa_shf_w((v4i32)a, EIGEN_MSA_SHF_I8(2, 3, 0, 1)));\n  s = padd(s, (Packet4f)__builtin_msa_shf_w((v4i32)s, EIGEN_MSA_SHF_I8(1, 0, 3, 2)));\n  return s[0];\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4f preduxp<Packet4f>(const Packet4f* vecs) {\n  EIGEN_MSA_DEBUG;\n\n  v4i32 tmp1, tmp2, tmp3, tmp4;\n  Packet4f sum;\n\n  tmp1 = __builtin_msa_ilvr_w((v4i32)vecs[1], (v4i32)vecs[0]);\n  tmp2 = __builtin_msa_ilvr_w((v4i32)vecs[3], (v4i32)vecs[2]);\n  tmp3 = __builtin_msa_ilvl_w((v4i32)vecs[1], (v4i32)vecs[0]);\n  tmp4 = __builtin_msa_ilvl_w((v4i32)vecs[3], (v4i32)vecs[2]);\n\n  sum = (Packet4f)__builtin_msa_ilvr_d((v2i64)tmp2, (v2i64)tmp1);\n  sum = padd(sum, (Packet4f)__builtin_msa_ilvod_d((v2i64)tmp2, (v2i64)tmp1));\n  sum = padd(sum, (Packet4f)__builtin_msa_ilvr_d((v2i64)tmp4, (v2i64)tmp3));\n  sum = padd(sum, (Packet4f)__builtin_msa_ilvod_d((v2i64)tmp4, (v2i64)tmp3));\n\n  return sum;\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4i preduxp<Packet4i>(const Packet4i* vecs) {\n  EIGEN_MSA_DEBUG;\n\n  v4i32 tmp1, tmp2, tmp3, tmp4;\n  Packet4i sum;\n\n  tmp1 = __builtin_msa_ilvr_w((v4i32)vecs[1], (v4i32)vecs[0]);\n  tmp2 = __builtin_msa_ilvr_w((v4i32)vecs[3], (v4i32)vecs[2]);\n  tmp3 = __builtin_msa_ilvl_w((v4i32)vecs[1], (v4i32)vecs[0]);\n  tmp4 = __builtin_msa_ilvl_w((v4i32)vecs[3], (v4i32)vecs[2]);\n\n  sum = (Packet4i)__builtin_msa_ilvr_d((v2i64)tmp2, (v2i64)tmp1);\n  sum = padd(sum, (Packet4i)__builtin_msa_ilvod_d((v2i64)tmp2, (v2i64)tmp1));\n  sum = padd(sum, (Packet4i)__builtin_msa_ilvr_d((v2i64)tmp4, (v2i64)tmp3));\n  sum = padd(sum, (Packet4i)__builtin_msa_ilvod_d((v2i64)tmp4, (v2i64)tmp3));\n\n  return sum;\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE int32_t predux<Packet4i>(const Packet4i& a) {\n  EIGEN_MSA_DEBUG;\n\n  Packet4i s = padd(a, __builtin_msa_shf_w(a, EIGEN_MSA_SHF_I8(2, 3, 0, 1)));\n  s = padd(s, __builtin_msa_shf_w(s, EIGEN_MSA_SHF_I8(1, 0, 3, 2)));\n  return s[0];\n}\n\n// Other reduction functions:\n// mul\ntemplate <>\nEIGEN_STRONG_INLINE float predux_mul<Packet4f>(const Packet4f& a) {\n  EIGEN_MSA_DEBUG;\n\n  Packet4f p = pmul(a, (Packet4f)__builtin_msa_shf_w((v4i32)a, EIGEN_MSA_SHF_I8(2, 3, 0, 1)));\n  p = pmul(p, (Packet4f)__builtin_msa_shf_w((v4i32)p, EIGEN_MSA_SHF_I8(1, 0, 3, 2)));\n  return p[0];\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE int32_t predux_mul<Packet4i>(const Packet4i& a) {\n  EIGEN_MSA_DEBUG;\n\n  Packet4i p = pmul(a, __builtin_msa_shf_w(a, EIGEN_MSA_SHF_I8(2, 3, 0, 1)));\n  p = pmul(p, __builtin_msa_shf_w(p, EIGEN_MSA_SHF_I8(1, 0, 3, 2)));\n  return p[0];\n}\n\n// min\ntemplate <>\nEIGEN_STRONG_INLINE float predux_min<Packet4f>(const Packet4f& a) {\n  EIGEN_MSA_DEBUG;\n\n  // Swap 64-bit halves of a.\n  Packet4f swapped = (Packet4f)__builtin_msa_shf_w((Packet4i)a, EIGEN_MSA_SHF_I8(2, 3, 0, 1));\n#if !EIGEN_FAST_MATH\n  // Detect presence of NaNs from pairs a[0]-a[2] and a[1]-a[3] as two 32-bit\n  // masks of all zeroes/ones in low 64 bits.\n  v16u8 unord = (v16u8)__builtin_msa_fcun_w(a, swapped);\n  // Combine the two masks into one: 64 ones if no NaNs, otherwise 64 zeroes.\n  unord = (v16u8)__builtin_msa_ceqi_d((v2i64)unord, 0);\n#endif\n  // Continue with min computation.\n  Packet4f v = __builtin_msa_fmin_w(a, swapped);\n  v = __builtin_msa_fmin_w(\n      v, (Packet4f)__builtin_msa_shf_w((Packet4i)v, EIGEN_MSA_SHF_I8(1, 0, 3, 2)));\n#if !EIGEN_FAST_MATH\n  // Based on the mask select between v and 4 qNaNs.\n  v16u8 qnans = (v16u8)__builtin_msa_fill_w(0x7FC00000);\n  v = (Packet4f)__builtin_msa_bsel_v(unord, qnans, (v16u8)v);\n#endif\n  return v[0];\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE int32_t predux_min<Packet4i>(const Packet4i& a) {\n  EIGEN_MSA_DEBUG;\n\n  Packet4i m = pmin(a, __builtin_msa_shf_w(a, EIGEN_MSA_SHF_I8(2, 3, 0, 1)));\n  m = pmin(m, __builtin_msa_shf_w(m, EIGEN_MSA_SHF_I8(1, 0, 3, 2)));\n  return m[0];\n}\n\n// max\ntemplate <>\nEIGEN_STRONG_INLINE float predux_max<Packet4f>(const Packet4f& a) {\n  EIGEN_MSA_DEBUG;\n\n  // Swap 64-bit halves of a.\n  Packet4f swapped = (Packet4f)__builtin_msa_shf_w((Packet4i)a, EIGEN_MSA_SHF_I8(2, 3, 0, 1));\n#if !EIGEN_FAST_MATH\n  // Detect presence of NaNs from pairs a[0]-a[2] and a[1]-a[3] as two 32-bit\n  // masks of all zeroes/ones in low 64 bits.\n  v16u8 unord = (v16u8)__builtin_msa_fcun_w(a, swapped);\n  // Combine the two masks into one: 64 ones if no NaNs, otherwise 64 zeroes.\n  unord = (v16u8)__builtin_msa_ceqi_d((v2i64)unord, 0);\n#endif\n  // Continue with max computation.\n  Packet4f v = __builtin_msa_fmax_w(a, swapped);\n  v = __builtin_msa_fmax_w(\n      v, (Packet4f)__builtin_msa_shf_w((Packet4i)v, EIGEN_MSA_SHF_I8(1, 0, 3, 2)));\n#if !EIGEN_FAST_MATH\n  // Based on the mask select between v and 4 qNaNs.\n  v16u8 qnans = (v16u8)__builtin_msa_fill_w(0x7FC00000);\n  v = (Packet4f)__builtin_msa_bsel_v(unord, qnans, (v16u8)v);\n#endif\n  return v[0];\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE int32_t predux_max<Packet4i>(const Packet4i& a) {\n  EIGEN_MSA_DEBUG;\n\n  Packet4i m = pmax(a, __builtin_msa_shf_w(a, EIGEN_MSA_SHF_I8(2, 3, 0, 1)));\n  m = pmax(m, __builtin_msa_shf_w(m, EIGEN_MSA_SHF_I8(1, 0, 3, 2)));\n  return m[0];\n}\n\n#define PALIGN_MSA(Offset, Type, Command)                                                \\\n  template <>                                                                            \\\n  struct palign_impl<Offset, Type> {                                                     \\\n    EIGEN_STRONG_INLINE static void run(Type& first, const Type& second) {               \\\n      if (Offset != 0) first = (Type)(Command((v16i8)second, (v16i8)first, Offset * 4)); \\\n    }                                                                                    \\\n  };\n\nPALIGN_MSA(0, Packet4f, __builtin_msa_sldi_b)\nPALIGN_MSA(1, Packet4f, __builtin_msa_sldi_b)\nPALIGN_MSA(2, Packet4f, __builtin_msa_sldi_b)\nPALIGN_MSA(3, Packet4f, __builtin_msa_sldi_b)\nPALIGN_MSA(0, Packet4i, __builtin_msa_sldi_b)\nPALIGN_MSA(1, Packet4i, __builtin_msa_sldi_b)\nPALIGN_MSA(2, Packet4i, __builtin_msa_sldi_b)\nPALIGN_MSA(3, Packet4i, __builtin_msa_sldi_b)\n\n#undef PALIGN_MSA\n\ninline std::ostream& operator<<(std::ostream& os, const PacketBlock<Packet4f, 4>& value) {\n  os << \"[ \" << value.packet[0] << \",\" << std::endl\n     << \"  \" << value.packet[1] << \",\" << std::endl\n     << \"  \" << value.packet[2] << \",\" << std::endl\n     << \"  \" << value.packet[3] << \" ]\";\n  return os;\n}\n\nEIGEN_DEVICE_FUNC inline void ptranspose(PacketBlock<Packet4f, 4>& kernel) {\n  EIGEN_MSA_DEBUG;\n\n  v4i32 tmp1, tmp2, tmp3, tmp4;\n\n  tmp1 = __builtin_msa_ilvr_w((v4i32)kernel.packet[1], (v4i32)kernel.packet[0]);\n  tmp2 = __builtin_msa_ilvr_w((v4i32)kernel.packet[3], (v4i32)kernel.packet[2]);\n  tmp3 = __builtin_msa_ilvl_w((v4i32)kernel.packet[1], (v4i32)kernel.packet[0]);\n  tmp4 = __builtin_msa_ilvl_w((v4i32)kernel.packet[3], (v4i32)kernel.packet[2]);\n\n  kernel.packet[0] = (Packet4f)__builtin_msa_ilvr_d((v2i64)tmp2, (v2i64)tmp1);\n  kernel.packet[1] = (Packet4f)__builtin_msa_ilvod_d((v2i64)tmp2, (v2i64)tmp1);\n  kernel.packet[2] = (Packet4f)__builtin_msa_ilvr_d((v2i64)tmp4, (v2i64)tmp3);\n  kernel.packet[3] = (Packet4f)__builtin_msa_ilvod_d((v2i64)tmp4, (v2i64)tmp3);\n}\n\ninline std::ostream& operator<<(std::ostream& os, const PacketBlock<Packet4i, 4>& value) {\n  os << \"[ \" << value.packet[0] << \",\" << std::endl\n     << \"  \" << value.packet[1] << \",\" << std::endl\n     << \"  \" << value.packet[2] << \",\" << std::endl\n     << \"  \" << value.packet[3] << \" ]\";\n  return os;\n}\n\nEIGEN_DEVICE_FUNC inline void ptranspose(PacketBlock<Packet4i, 4>& kernel) {\n  EIGEN_MSA_DEBUG;\n\n  v4i32 tmp1, tmp2, tmp3, tmp4;\n\n  tmp1 = __builtin_msa_ilvr_w(kernel.packet[1], kernel.packet[0]);\n  tmp2 = __builtin_msa_ilvr_w(kernel.packet[3], kernel.packet[2]);\n  tmp3 = __builtin_msa_ilvl_w(kernel.packet[1], kernel.packet[0]);\n  tmp4 = __builtin_msa_ilvl_w(kernel.packet[3], kernel.packet[2]);\n\n  kernel.packet[0] = (Packet4i)__builtin_msa_ilvr_d((v2i64)tmp2, (v2i64)tmp1);\n  kernel.packet[1] = (Packet4i)__builtin_msa_ilvod_d((v2i64)tmp2, (v2i64)tmp1);\n  kernel.packet[2] = (Packet4i)__builtin_msa_ilvr_d((v2i64)tmp4, (v2i64)tmp3);\n  kernel.packet[3] = (Packet4i)__builtin_msa_ilvod_d((v2i64)tmp4, (v2i64)tmp3);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4f psqrt(const Packet4f& a) {\n  EIGEN_MSA_DEBUG;\n\n  return __builtin_msa_fsqrt_w(a);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4f prsqrt(const Packet4f& a) {\n  EIGEN_MSA_DEBUG;\n\n#if EIGEN_FAST_MATH\n  return __builtin_msa_frsqrt_w(a);\n#else\n  Packet4f ones = __builtin_msa_ffint_s_w(__builtin_msa_ldi_w(1));\n  return pdiv(ones, psqrt(a));\n#endif\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4f pfloor<Packet4f>(const Packet4f& a) {\n  Packet4f v = a;\n  int32_t old_mode, new_mode;\n  asm volatile(\n      \"cfcmsa  %[old_mode], $1\\n\"\n      \"ori     %[new_mode], %[old_mode], 3\\n\"  // 3 = round towards -INFINITY.\n      \"ctcmsa  $1, %[new_mode]\\n\"\n      \"frint.w %w[v], %w[v]\\n\"\n      \"ctcmsa  $1, %[old_mode]\\n\"\n      :  // outputs\n      [old_mode] \"=r\"(old_mode), [new_mode] \"=r\"(new_mode),\n      [v] \"+f\"(v)\n      :  // inputs\n      :  // clobbers\n  );\n  return v;\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4f pceil<Packet4f>(const Packet4f& a) {\n  Packet4f v = a;\n  int32_t old_mode, new_mode;\n  asm volatile(\n      \"cfcmsa  %[old_mode], $1\\n\"\n      \"ori     %[new_mode], %[old_mode], 3\\n\"\n      \"xori    %[new_mode], %[new_mode], 1\\n\"  // 2 = round towards +INFINITY.\n      \"ctcmsa  $1, %[new_mode]\\n\"\n      \"frint.w %w[v], %w[v]\\n\"\n      \"ctcmsa  $1, %[old_mode]\\n\"\n      :  // outputs\n      [old_mode] \"=r\"(old_mode), [new_mode] \"=r\"(new_mode),\n      [v] \"+f\"(v)\n      :  // inputs\n      :  // clobbers\n  );\n  return v;\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4f pround<Packet4f>(const Packet4f& a) {\n  Packet4f v = a;\n  int32_t old_mode, new_mode;\n  asm volatile(\n      \"cfcmsa  %[old_mode], $1\\n\"\n      \"ori     %[new_mode], %[old_mode], 3\\n\"\n      \"xori    %[new_mode], %[new_mode], 3\\n\"  // 0 = round to nearest, ties to even.\n      \"ctcmsa  $1, %[new_mode]\\n\"\n      \"frint.w %w[v], %w[v]\\n\"\n      \"ctcmsa  $1, %[old_mode]\\n\"\n      :  // outputs\n      [old_mode] \"=r\"(old_mode), [new_mode] \"=r\"(new_mode),\n      [v] \"+f\"(v)\n      :  // inputs\n      :  // clobbers\n  );\n  return v;\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4f pblend(const Selector<4>& ifPacket, const Packet4f& thenPacket,\n                                    const Packet4f& elsePacket) {\n  Packet4ui select = { ifPacket.select[0], ifPacket.select[1], ifPacket.select[2],\n                       ifPacket.select[3] };\n  Packet4i mask = __builtin_msa_ceqi_w((Packet4i)select, 0);\n  return (Packet4f)__builtin_msa_bsel_v((v16u8)mask, (v16u8)thenPacket, (v16u8)elsePacket);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet4i pblend(const Selector<4>& ifPacket, const Packet4i& thenPacket,\n                                    const Packet4i& elsePacket) {\n  Packet4ui select = { ifPacket.select[0], ifPacket.select[1], ifPacket.select[2],\n                       ifPacket.select[3] };\n  Packet4i mask = __builtin_msa_ceqi_w((Packet4i)select, 0);\n  return (Packet4i)__builtin_msa_bsel_v((v16u8)mask, (v16u8)thenPacket, (v16u8)elsePacket);\n}\n\n//---------- double ----------\n\ntypedef v2f64 Packet2d;\ntypedef v2i64 Packet2l;\ntypedef v2u64 Packet2ul;\n\n#define _EIGEN_DECLARE_CONST_Packet2d(NAME, X) const Packet2d p2d_##NAME = { X, X }\n#define _EIGEN_DECLARE_CONST_Packet2l(NAME, X) const Packet2l p2l_##NAME = { X, X }\n#define _EIGEN_DECLARE_CONST_Packet2ul(NAME, X) const Packet2ul p2ul_##NAME = { X, X }\n\ninline std::ostream& operator<<(std::ostream& os, const Packet2d& value) {\n  os << \"[ \" << value[0] << \", \" << value[1] << \" ]\";\n  return os;\n}\n\ninline std::ostream& operator<<(std::ostream& os, const Packet2l& value) {\n  os << \"[ \" << value[0] << \", \" << value[1] << \" ]\";\n  return os;\n}\n\ninline std::ostream& operator<<(std::ostream& os, const Packet2ul& value) {\n  os << \"[ \" << value[0] << \", \" << value[1] << \" ]\";\n  return os;\n}\n\ntemplate <>\nstruct packet_traits<double> : default_packet_traits {\n  typedef Packet2d type;\n  typedef Packet2d half;\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size = 2,\n    HasHalfPacket = 0,\n    // FIXME check the Has*\n    HasDiv = 1,\n    HasExp = 1,\n    HasSqrt = 1,\n    HasRsqrt = 1,\n    HasRound = 1,\n    HasFloor = 1,\n    HasCeil = 1,\n    HasBlend = 1\n  };\n};\n\ntemplate <>\nstruct unpacket_traits<Packet2d> {\n  typedef double type;\n  enum { size = 2, alignment = Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false };\n  typedef Packet2d half;\n};\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2d pset1<Packet2d>(const double& from) {\n  EIGEN_MSA_DEBUG;\n\n  Packet2d value = { from, from };\n  return value;\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2d padd<Packet2d>(const Packet2d& a, const Packet2d& b) {\n  EIGEN_MSA_DEBUG;\n\n  return __builtin_msa_fadd_d(a, b);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2d plset<Packet2d>(const double& a) {\n  EIGEN_MSA_DEBUG;\n\n  static const Packet2d countdown = { 0.0, 1.0 };\n  return padd(pset1<Packet2d>(a), countdown);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2d psub<Packet2d>(const Packet2d& a, const Packet2d& b) {\n  EIGEN_MSA_DEBUG;\n\n  return __builtin_msa_fsub_d(a, b);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2d pnegate(const Packet2d& a) {\n  EIGEN_MSA_DEBUG;\n\n  return (Packet2d)__builtin_msa_bnegi_d((v2u64)a, 63);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2d pconj(const Packet2d& a) {\n  EIGEN_MSA_DEBUG;\n\n  return a;\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2d pmul<Packet2d>(const Packet2d& a, const Packet2d& b) {\n  EIGEN_MSA_DEBUG;\n\n  return __builtin_msa_fmul_d(a, b);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2d pdiv<Packet2d>(const Packet2d& a, const Packet2d& b) {\n  EIGEN_MSA_DEBUG;\n\n  return __builtin_msa_fdiv_d(a, b);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2d pmadd(const Packet2d& a, const Packet2d& b, const Packet2d& c) {\n  EIGEN_MSA_DEBUG;\n\n  return __builtin_msa_fmadd_d(c, a, b);\n}\n\n// Logical Operations are not supported for float, so we have to reinterpret casts using MSA\n// intrinsics\ntemplate <>\nEIGEN_STRONG_INLINE Packet2d pand<Packet2d>(const Packet2d& a, const Packet2d& b) {\n  EIGEN_MSA_DEBUG;\n\n  return (Packet2d)__builtin_msa_and_v((v16u8)a, (v16u8)b);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2d por<Packet2d>(const Packet2d& a, const Packet2d& b) {\n  EIGEN_MSA_DEBUG;\n\n  return (Packet2d)__builtin_msa_or_v((v16u8)a, (v16u8)b);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2d pxor<Packet2d>(const Packet2d& a, const Packet2d& b) {\n  EIGEN_MSA_DEBUG;\n\n  return (Packet2d)__builtin_msa_xor_v((v16u8)a, (v16u8)b);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2d pandnot<Packet2d>(const Packet2d& a, const Packet2d& b) {\n  EIGEN_MSA_DEBUG;\n\n  return pand(a, (Packet2d)__builtin_msa_xori_b((v16u8)b, 255));\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2d pload<Packet2d>(const double* from) {\n  EIGEN_MSA_DEBUG;\n\n  EIGEN_DEBUG_UNALIGNED_LOAD return (Packet2d)__builtin_msa_ld_d(const_cast<double*>(from), 0);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2d pmin<Packet2d>(const Packet2d& a, const Packet2d& b) {\n  EIGEN_MSA_DEBUG;\n\n#if EIGEN_FAST_MATH\n  // This prefers numbers to NaNs.\n  return __builtin_msa_fmin_d(a, b);\n#else\n  // This prefers NaNs to numbers.\n  v2i64 aNaN = __builtin_msa_fcun_d(a, a);\n  v2i64 aMinOrNaN = por(__builtin_msa_fclt_d(a, b), aNaN);\n  return (Packet2d)__builtin_msa_bsel_v((v16u8)aMinOrNaN, (v16u8)b, (v16u8)a);\n#endif\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2d pmax<Packet2d>(const Packet2d& a, const Packet2d& b) {\n  EIGEN_MSA_DEBUG;\n\n#if EIGEN_FAST_MATH\n  // This prefers numbers to NaNs.\n  return __builtin_msa_fmax_d(a, b);\n#else\n  // This prefers NaNs to numbers.\n  v2i64 aNaN = __builtin_msa_fcun_d(a, a);\n  v2i64 aMaxOrNaN = por(__builtin_msa_fclt_d(b, a), aNaN);\n  return (Packet2d)__builtin_msa_bsel_v((v16u8)aMaxOrNaN, (v16u8)b, (v16u8)a);\n#endif\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2d ploadu<Packet2d>(const double* from) {\n  EIGEN_MSA_DEBUG;\n\n  EIGEN_DEBUG_UNALIGNED_LOAD return (Packet2d)__builtin_msa_ld_d(const_cast<double*>(from), 0);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2d ploaddup<Packet2d>(const double* from) {\n  EIGEN_MSA_DEBUG;\n\n  Packet2d value = { *from, *from };\n  return value;\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE void pstore<double>(double* to, const Packet2d& from) {\n  EIGEN_MSA_DEBUG;\n\n  EIGEN_DEBUG_ALIGNED_STORE __builtin_msa_st_d((v2i64)from, to, 0);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE void pstoreu<double>(double* to, const Packet2d& from) {\n  EIGEN_MSA_DEBUG;\n\n  EIGEN_DEBUG_UNALIGNED_STORE __builtin_msa_st_d((v2i64)from, to, 0);\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC inline Packet2d pgather<double, Packet2d>(const double* from, Index stride) {\n  EIGEN_MSA_DEBUG;\n\n  Packet2d value;\n  value[0] = *from;\n  from += stride;\n  value[1] = *from;\n  return value;\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC inline void pscatter<double, Packet2d>(double* to, const Packet2d& from,\n                                                         Index stride) {\n  EIGEN_MSA_DEBUG;\n\n  *to = from[0];\n  to += stride;\n  *to = from[1];\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE void prefetch<double>(const double* addr) {\n  EIGEN_MSA_DEBUG;\n\n  __builtin_prefetch(addr);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE double pfirst<Packet2d>(const Packet2d& a) {\n  EIGEN_MSA_DEBUG;\n\n  return a[0];\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2d preverse(const Packet2d& a) {\n  EIGEN_MSA_DEBUG;\n\n  return (Packet2d)__builtin_msa_shf_w((v4i32)a, EIGEN_MSA_SHF_I8(2, 3, 0, 1));\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2d pabs(const Packet2d& a) {\n  EIGEN_MSA_DEBUG;\n\n  return (Packet2d)__builtin_msa_bclri_d((v2u64)a, 63);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE double predux<Packet2d>(const Packet2d& a) {\n  EIGEN_MSA_DEBUG;\n\n  Packet2d s = padd(a, preverse(a));\n  return s[0];\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2d preduxp<Packet2d>(const Packet2d* vecs) {\n  EIGEN_MSA_DEBUG;\n\n  Packet2d v0 = (Packet2d)__builtin_msa_ilvev_d((v2i64)vecs[1], (v2i64)vecs[0]);\n  Packet2d v1 = (Packet2d)__builtin_msa_ilvod_d((v2i64)vecs[1], (v2i64)vecs[0]);\n\n  return padd(v0, v1);\n}\n\n// Other reduction functions:\n// mul\ntemplate <>\nEIGEN_STRONG_INLINE double predux_mul<Packet2d>(const Packet2d& a) {\n  EIGEN_MSA_DEBUG;\n\n  Packet2d p = pmul(a, preverse(a));\n  return p[0];\n}\n\n// min\ntemplate <>\nEIGEN_STRONG_INLINE double predux_min<Packet2d>(const Packet2d& a) {\n  EIGEN_MSA_DEBUG;\n\n#if EIGEN_FAST_MATH\n  Packet2d swapped = (Packet2d)__builtin_msa_shf_w((Packet4i)a, EIGEN_MSA_SHF_I8(2, 3, 0, 1));\n  Packet2d v = __builtin_msa_fmin_d(a, swapped);\n  return v[0];\n#else\n  double a0 = a[0], a1 = a[1];\n  return ((numext::isnan)(a0) || a0 < a1) ? a0 : a1;\n#endif\n}\n\n// max\ntemplate <>\nEIGEN_STRONG_INLINE double predux_max<Packet2d>(const Packet2d& a) {\n  EIGEN_MSA_DEBUG;\n\n#if EIGEN_FAST_MATH\n  Packet2d swapped = (Packet2d)__builtin_msa_shf_w((Packet4i)a, EIGEN_MSA_SHF_I8(2, 3, 0, 1));\n  Packet2d v = __builtin_msa_fmax_d(a, swapped);\n  return v[0];\n#else\n  double a0 = a[0], a1 = a[1];\n  return ((numext::isnan)(a0) || a0 > a1) ? a0 : a1;\n#endif\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2d psqrt(const Packet2d& a) {\n  EIGEN_MSA_DEBUG;\n\n  return __builtin_msa_fsqrt_d(a);\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2d prsqrt(const Packet2d& a) {\n  EIGEN_MSA_DEBUG;\n\n#if EIGEN_FAST_MATH\n  return __builtin_msa_frsqrt_d(a);\n#else\n  Packet2d ones = __builtin_msa_ffint_s_d(__builtin_msa_ldi_d(1));\n  return pdiv(ones, psqrt(a));\n#endif\n}\n\n#define PALIGN_MSA(Offset, Type, Command)                                                \\\n  template <>                                                                            \\\n  struct palign_impl<Offset, Type> {                                                     \\\n    EIGEN_STRONG_INLINE static void run(Type& first, const Type& second) {               \\\n      if (Offset != 0) first = (Type)(Command((v16i8)second, (v16i8)first, Offset * 8)); \\\n    }                                                                                    \\\n  };\n\nPALIGN_MSA(0, Packet2d, __builtin_msa_sldi_b)\nPALIGN_MSA(1, Packet2d, __builtin_msa_sldi_b)\n\n#undef PALIGN_MSA\n\ninline std::ostream& operator<<(std::ostream& os, const PacketBlock<Packet2d, 2>& value) {\n  os << \"[ \" << value.packet[0] << \",\" << std::endl << \"  \" << value.packet[1] << \" ]\";\n  return os;\n}\n\nEIGEN_DEVICE_FUNC inline void ptranspose(PacketBlock<Packet2d, 2>& kernel) {\n  EIGEN_MSA_DEBUG;\n\n  Packet2d trn1 = (Packet2d)__builtin_msa_ilvev_d((v2i64)kernel.packet[1], (v2i64)kernel.packet[0]);\n  Packet2d trn2 = (Packet2d)__builtin_msa_ilvod_d((v2i64)kernel.packet[1], (v2i64)kernel.packet[0]);\n  kernel.packet[0] = trn1;\n  kernel.packet[1] = trn2;\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2d pfloor<Packet2d>(const Packet2d& a) {\n  Packet2d v = a;\n  int32_t old_mode, new_mode;\n  asm volatile(\n      \"cfcmsa  %[old_mode], $1\\n\"\n      \"ori     %[new_mode], %[old_mode], 3\\n\"  // 3 = round towards -INFINITY.\n      \"ctcmsa  $1, %[new_mode]\\n\"\n      \"frint.d %w[v], %w[v]\\n\"\n      \"ctcmsa  $1, %[old_mode]\\n\"\n      :  // outputs\n      [old_mode] \"=r\"(old_mode), [new_mode] \"=r\"(new_mode),\n      [v] \"+f\"(v)\n      :  // inputs\n      :  // clobbers\n  );\n  return v;\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2d pceil<Packet2d>(const Packet2d& a) {\n  Packet2d v = a;\n  int32_t old_mode, new_mode;\n  asm volatile(\n      \"cfcmsa  %[old_mode], $1\\n\"\n      \"ori     %[new_mode], %[old_mode], 3\\n\"\n      \"xori    %[new_mode], %[new_mode], 1\\n\"  // 2 = round towards +INFINITY.\n      \"ctcmsa  $1, %[new_mode]\\n\"\n      \"frint.d %w[v], %w[v]\\n\"\n      \"ctcmsa  $1, %[old_mode]\\n\"\n      :  // outputs\n      [old_mode] \"=r\"(old_mode), [new_mode] \"=r\"(new_mode),\n      [v] \"+f\"(v)\n      :  // inputs\n      :  // clobbers\n  );\n  return v;\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2d pround<Packet2d>(const Packet2d& a) {\n  Packet2d v = a;\n  int32_t old_mode, new_mode;\n  asm volatile(\n      \"cfcmsa  %[old_mode], $1\\n\"\n      \"ori     %[new_mode], %[old_mode], 3\\n\"\n      \"xori    %[new_mode], %[new_mode], 3\\n\"  // 0 = round to nearest, ties to even.\n      \"ctcmsa  $1, %[new_mode]\\n\"\n      \"frint.d %w[v], %w[v]\\n\"\n      \"ctcmsa  $1, %[old_mode]\\n\"\n      :  // outputs\n      [old_mode] \"=r\"(old_mode), [new_mode] \"=r\"(new_mode),\n      [v] \"+f\"(v)\n      :  // inputs\n      :  // clobbers\n  );\n  return v;\n}\n\ntemplate <>\nEIGEN_STRONG_INLINE Packet2d pblend(const Selector<2>& ifPacket, const Packet2d& thenPacket,\n                                    const Packet2d& elsePacket) {\n  Packet2ul select = { ifPacket.select[0], ifPacket.select[1] };\n  Packet2l mask = __builtin_msa_ceqi_d((Packet2l)select, 0);\n  return (Packet2d)__builtin_msa_bsel_v((v16u8)mask, (v16u8)thenPacket, (v16u8)elsePacket);\n}\n\n}  // end namespace internal\n\n}  // end namespace Eigen\n\n#endif  // EIGEN_PACKET_MATH_MSA_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/NEON/Complex.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2010 Konstantinos Margaritis <markos@freevec.org>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_COMPLEX_NEON_H\n#define EIGEN_COMPLEX_NEON_H\n\nnamespace Eigen {\n\nnamespace internal {\n\ninline uint32x4_t p4ui_CONJ_XOR()\n{\n// See bug 1325, clang fails to call vld1q_u64.\n#if EIGEN_COMP_CLANG\n  uint32x4_t ret = { 0x00000000, 0x80000000, 0x00000000, 0x80000000 };\n  return ret;\n#else\n  static const uint32_t conj_XOR_DATA[] = { 0x00000000, 0x80000000, 0x00000000, 0x80000000 };\n  return vld1q_u32( conj_XOR_DATA );\n#endif\n}\n\ninline uint32x2_t p2ui_CONJ_XOR()\n{\n  static const uint32_t conj_XOR_DATA[] = { 0x00000000, 0x80000000 };\n  return vld1_u32( conj_XOR_DATA );\n}\n\n//---------- float ----------\n\nstruct Packet1cf\n{\n  EIGEN_STRONG_INLINE Packet1cf() {}\n  EIGEN_STRONG_INLINE explicit Packet1cf(const Packet2f& a) : v(a) {}\n  Packet2f v;\n};\nstruct Packet2cf\n{\n  EIGEN_STRONG_INLINE Packet2cf() {}\n  EIGEN_STRONG_INLINE explicit Packet2cf(const Packet4f& a) : v(a) {}\n  Packet4f v;\n};\n\ntemplate<> struct packet_traits<std::complex<float> > : default_packet_traits\n{\n  typedef Packet2cf type;\n  typedef Packet1cf half;\n  enum\n  {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size = 2,\n    HasHalfPacket = 1,\n\n    HasAdd       = 1,\n    HasSub       = 1,\n    HasMul       = 1,\n    HasDiv       = 1,\n    HasNegate    = 1,\n    HasAbs       = 0,\n    HasAbs2      = 0,\n    HasMin       = 0,\n    HasMax       = 0,\n    HasSetLinear = 0\n  };\n};\n\ntemplate<> struct unpacket_traits<Packet1cf>\n{\n  typedef std::complex<float> type;\n  typedef Packet1cf half;\n  enum\n  {\n    size = 1,\n    alignment = Aligned16,\n    vectorizable = true,\n    masked_load_available = false,\n    masked_store_available = false\n  };\n};\ntemplate<> struct unpacket_traits<Packet2cf>\n{\n  typedef std::complex<float> type;\n  typedef Packet1cf half;\n  enum\n  {\n    size = 2,\n    alignment = Aligned16,\n    vectorizable = true,\n    masked_load_available = false,\n    masked_store_available = false\n  };\n};\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cf pcast<float,Packet1cf>(const float& a)\n{ return Packet1cf(vset_lane_f32(a, vdup_n_f32(0.f), 0)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pcast<Packet2f,Packet2cf>(const Packet2f& a)\n{ return Packet2cf(vreinterpretq_f32_u64(vmovl_u32(vreinterpret_u32_f32(a)))); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cf pset1<Packet1cf>(const std::complex<float>& from)\n{ return Packet1cf(vld1_f32(reinterpret_cast<const float*>(&from))); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pset1<Packet2cf>(const std::complex<float>& from)\n{\n  const float32x2_t r64 = vld1_f32(reinterpret_cast<const float*>(&from));\n  return Packet2cf(vcombine_f32(r64, r64));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cf padd<Packet1cf>(const Packet1cf& a, const Packet1cf& b)\n{ return Packet1cf(padd<Packet2f>(a.v, b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cf padd<Packet2cf>(const Packet2cf& a, const Packet2cf& b)\n{ return Packet2cf(padd<Packet4f>(a.v, b.v)); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cf psub<Packet1cf>(const Packet1cf& a, const Packet1cf& b)\n{ return Packet1cf(psub<Packet2f>(a.v, b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cf psub<Packet2cf>(const Packet2cf& a, const Packet2cf& b)\n{ return Packet2cf(psub<Packet4f>(a.v, b.v)); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cf pnegate(const Packet1cf& a) { return Packet1cf(pnegate<Packet2f>(a.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pnegate(const Packet2cf& a) { return Packet2cf(pnegate<Packet4f>(a.v)); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cf pconj(const Packet1cf& a)\n{\n  const Packet2ui b = vreinterpret_u32_f32(a.v);\n  return Packet1cf(vreinterpret_f32_u32(veor_u32(b, p2ui_CONJ_XOR())));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pconj(const Packet2cf& a)\n{\n  const Packet4ui b = vreinterpretq_u32_f32(a.v);\n  return Packet2cf(vreinterpretq_f32_u32(veorq_u32(b, p4ui_CONJ_XOR())));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cf pmul<Packet1cf>(const Packet1cf& a, const Packet1cf& b)\n{\n  Packet2f v1, v2;\n\n  // Get the real values of a | a1_re | a1_re |\n  v1 = vdup_lane_f32(a.v, 0);\n  // Get the imag values of a | a1_im | a1_im |\n  v2 = vdup_lane_f32(a.v, 1);\n  // Multiply the real a with b\n  v1 = vmul_f32(v1, b.v);\n  // Multiply the imag a with b\n  v2 = vmul_f32(v2, b.v);\n  // Conjugate v2\n  v2 = vreinterpret_f32_u32(veor_u32(vreinterpret_u32_f32(v2), p2ui_CONJ_XOR()));\n  // Swap real/imag elements in v2.\n  v2 = vrev64_f32(v2);\n  // Add and return the result\n  return Packet1cf(vadd_f32(v1, v2));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pmul<Packet2cf>(const Packet2cf& a, const Packet2cf& b)\n{\n  Packet4f v1, v2;\n\n  // Get the real values of a | a1_re | a1_re | a2_re | a2_re |\n  v1 = vcombine_f32(vdup_lane_f32(vget_low_f32(a.v), 0), vdup_lane_f32(vget_high_f32(a.v), 0));\n  // Get the imag values of a | a1_im | a1_im | a2_im | a2_im |\n  v2 = vcombine_f32(vdup_lane_f32(vget_low_f32(a.v), 1), vdup_lane_f32(vget_high_f32(a.v), 1));\n  // Multiply the real a with b\n  v1 = vmulq_f32(v1, b.v);\n  // Multiply the imag a with b\n  v2 = vmulq_f32(v2, b.v);\n  // Conjugate v2\n  v2 = vreinterpretq_f32_u32(veorq_u32(vreinterpretq_u32_f32(v2), p4ui_CONJ_XOR()));\n  // Swap real/imag elements in v2.\n  v2 = vrev64q_f32(v2);\n  // Add and return the result\n  return Packet2cf(vaddq_f32(v1, v2));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cf pcmp_eq(const Packet1cf& a, const Packet1cf& b)\n{\n  // Compare real and imaginary parts of a and b to get the mask vector:\n  // [re(a[0])==re(b[0]), im(a[0])==im(b[0])]\n  Packet2f eq = pcmp_eq<Packet2f>(a.v, b.v);\n  // Swap real/imag elements in the mask in to get:\n  // [im(a[0])==im(b[0]), re(a[0])==re(b[0])]\n  Packet2f eq_swapped = vrev64_f32(eq);\n  // Return re(a)==re(b) && im(a)==im(b) by computing bitwise AND of eq and eq_swapped\n  return Packet1cf(pand<Packet2f>(eq, eq_swapped));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pcmp_eq(const Packet2cf& a, const Packet2cf& b)\n{\n  // Compare real and imaginary parts of a and b to get the mask vector:\n  // [re(a[0])==re(b[0]), im(a[0])==im(b[0]), re(a[1])==re(b[1]), im(a[1])==im(b[1])]\n  Packet4f eq = pcmp_eq<Packet4f>(a.v, b.v);\n  // Swap real/imag elements in the mask in to get:\n  // [im(a[0])==im(b[0]), re(a[0])==re(b[0]), im(a[1])==im(b[1]), re(a[1])==re(b[1])]\n  Packet4f eq_swapped = vrev64q_f32(eq);\n  // Return re(a)==re(b) && im(a)==im(b) by computing bitwise AND of eq and eq_swapped\n  return Packet2cf(pand<Packet4f>(eq, eq_swapped));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cf pand<Packet1cf>(const Packet1cf& a, const Packet1cf& b)\n{ return Packet1cf(vreinterpret_f32_u32(vand_u32(vreinterpret_u32_f32(a.v), vreinterpret_u32_f32(b.v)))); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pand<Packet2cf>(const Packet2cf& a, const Packet2cf& b)\n{ return Packet2cf(vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(a.v), vreinterpretq_u32_f32(b.v)))); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cf por<Packet1cf>(const Packet1cf& a, const Packet1cf& b)\n{ return Packet1cf(vreinterpret_f32_u32(vorr_u32(vreinterpret_u32_f32(a.v), vreinterpret_u32_f32(b.v)))); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cf por<Packet2cf>(const Packet2cf& a, const Packet2cf& b)\n{ return Packet2cf(vreinterpretq_f32_u32(vorrq_u32(vreinterpretq_u32_f32(a.v), vreinterpretq_u32_f32(b.v)))); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cf pxor<Packet1cf>(const Packet1cf& a, const Packet1cf& b)\n{ return Packet1cf(vreinterpret_f32_u32(veor_u32(vreinterpret_u32_f32(a.v), vreinterpret_u32_f32(b.v)))); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pxor<Packet2cf>(const Packet2cf& a, const Packet2cf& b)\n{ return Packet2cf(vreinterpretq_f32_u32(veorq_u32(vreinterpretq_u32_f32(a.v), vreinterpretq_u32_f32(b.v)))); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cf pandnot<Packet1cf>(const Packet1cf& a, const Packet1cf& b)\n{ return Packet1cf(vreinterpret_f32_u32(vbic_u32(vreinterpret_u32_f32(a.v), vreinterpret_u32_f32(b.v)))); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pandnot<Packet2cf>(const Packet2cf& a, const Packet2cf& b)\n{ return Packet2cf(vreinterpretq_f32_u32(vbicq_u32(vreinterpretq_u32_f32(a.v), vreinterpretq_u32_f32(b.v)))); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cf pload<Packet1cf>(const std::complex<float>* from)\n{ EIGEN_DEBUG_ALIGNED_LOAD return Packet1cf(pload<Packet2f>((const float*)from)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pload<Packet2cf>(const std::complex<float>* from)\n{ EIGEN_DEBUG_ALIGNED_LOAD return Packet2cf(pload<Packet4f>(reinterpret_cast<const float*>(from))); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cf ploadu<Packet1cf>(const std::complex<float>* from)\n{ EIGEN_DEBUG_UNALIGNED_LOAD return Packet1cf(ploadu<Packet2f>((const float*)from)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cf ploadu<Packet2cf>(const std::complex<float>* from)\n{ EIGEN_DEBUG_UNALIGNED_LOAD return Packet2cf(ploadu<Packet4f>(reinterpret_cast<const float*>(from))); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cf ploaddup<Packet1cf>(const std::complex<float>* from)\n{ return pset1<Packet1cf>(*from); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cf ploaddup<Packet2cf>(const std::complex<float>* from)\n{ return pset1<Packet2cf>(*from); }\n\ntemplate<> EIGEN_STRONG_INLINE void pstore <std::complex<float> >(std::complex<float> *to, const Packet1cf& from)\n{ EIGEN_DEBUG_ALIGNED_STORE pstore((float*)to, from.v); }\ntemplate<> EIGEN_STRONG_INLINE void pstore <std::complex<float> >(std::complex<float> *to, const Packet2cf& from)\n{ EIGEN_DEBUG_ALIGNED_STORE pstore(reinterpret_cast<float*>(to), from.v); }\n\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<std::complex<float> >(std::complex<float> *to, const Packet1cf& from)\n{ EIGEN_DEBUG_UNALIGNED_STORE pstoreu((float*)to, from.v); }\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<std::complex<float> >(std::complex<float> *to, const Packet2cf& from)\n{ EIGEN_DEBUG_UNALIGNED_STORE pstoreu(reinterpret_cast<float*>(to), from.v); }\n\ntemplate<> EIGEN_DEVICE_FUNC inline Packet1cf pgather<std::complex<float>, Packet1cf>(\n    const std::complex<float>* from, Index stride)\n{\n  const Packet2f tmp = vdup_n_f32(std::real(from[0*stride]));\n  return Packet1cf(vset_lane_f32(std::imag(from[0*stride]), tmp, 1));\n}\ntemplate<> EIGEN_DEVICE_FUNC inline Packet2cf pgather<std::complex<float>, Packet2cf>(\n    const std::complex<float>* from, Index stride)\n{\n  Packet4f res = vdupq_n_f32(std::real(from[0*stride]));\n  res = vsetq_lane_f32(std::imag(from[0*stride]), res, 1);\n  res = vsetq_lane_f32(std::real(from[1*stride]), res, 2);\n  res = vsetq_lane_f32(std::imag(from[1*stride]), res, 3);\n  return Packet2cf(res);\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<std::complex<float>, Packet1cf>(\n    std::complex<float>* to, const Packet1cf& from, Index stride)\n{ to[stride*0] = std::complex<float>(vget_lane_f32(from.v, 0), vget_lane_f32(from.v, 1)); }\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<std::complex<float>, Packet2cf>(\n    std::complex<float>* to, const Packet2cf& from, Index stride)\n{\n  to[stride*0] = std::complex<float>(vgetq_lane_f32(from.v, 0), vgetq_lane_f32(from.v, 1));\n  to[stride*1] = std::complex<float>(vgetq_lane_f32(from.v, 2), vgetq_lane_f32(from.v, 3));\n}\n\ntemplate<> EIGEN_STRONG_INLINE void prefetch<std::complex<float> >(const std::complex<float> *addr)\n{ EIGEN_ARM_PREFETCH(reinterpret_cast<const float*>(addr)); }\n\ntemplate<> EIGEN_STRONG_INLINE std::complex<float> pfirst<Packet1cf>(const Packet1cf& a)\n{\n  EIGEN_ALIGN16 std::complex<float> x;\n  vst1_f32(reinterpret_cast<float*>(&x), a.v);\n  return x;\n}\ntemplate<> EIGEN_STRONG_INLINE std::complex<float> pfirst<Packet2cf>(const Packet2cf& a)\n{\n  EIGEN_ALIGN16 std::complex<float> x[2];\n  vst1q_f32(reinterpret_cast<float*>(x), a.v);\n  return x[0];\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cf preverse(const Packet1cf& a) { return a; }\ntemplate<> EIGEN_STRONG_INLINE Packet2cf preverse(const Packet2cf& a)\n{ return Packet2cf(vcombine_f32(vget_high_f32(a.v), vget_low_f32(a.v))); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cf pcplxflip<Packet1cf>(const Packet1cf& a)\n{ return Packet1cf(vrev64_f32(a.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pcplxflip<Packet2cf>(const Packet2cf& a)\n{ return Packet2cf(vrev64q_f32(a.v)); }\n\ntemplate<> EIGEN_STRONG_INLINE std::complex<float> predux<Packet1cf>(const Packet1cf& a)\n{\n  std::complex<float> s;\n  vst1_f32((float *)&s, a.v);\n  return s;\n}\ntemplate<> EIGEN_STRONG_INLINE std::complex<float> predux<Packet2cf>(const Packet2cf& a)\n{\n  std::complex<float> s;\n  vst1_f32(reinterpret_cast<float*>(&s), vadd_f32(vget_low_f32(a.v), vget_high_f32(a.v)));\n  return s;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cf preduxp<Packet1cf>(const Packet1cf* vecs) { return vecs[0]; }\ntemplate<> EIGEN_STRONG_INLINE Packet2cf preduxp<Packet2cf>(const Packet2cf* vecs)\n{\n  const Packet4f sum1 = vcombine_f32(vget_low_f32(vecs[0].v), vget_low_f32(vecs[1].v));\n  const Packet4f sum2 = vcombine_f32(vget_high_f32(vecs[0].v), vget_high_f32(vecs[1].v));\n  return Packet2cf(vaddq_f32(sum1, sum2));\n}\n\ntemplate<> EIGEN_STRONG_INLINE std::complex<float> predux_mul<Packet1cf>(const Packet1cf& a)\n{\n  std::complex<float> s;\n  vst1_f32((float *)&s, a.v);\n  return s;\n}\ntemplate<> EIGEN_STRONG_INLINE std::complex<float> predux_mul<Packet2cf>(const Packet2cf& a)\n{\n  float32x2_t a1, a2, v1, v2, prod;\n  std::complex<float> s;\n\n  a1 = vget_low_f32(a.v);\n  a2 = vget_high_f32(a.v);\n   // Get the real values of a | a1_re | a1_re | a2_re | a2_re |\n  v1 = vdup_lane_f32(a1, 0);\n  // Get the real values of a | a1_im | a1_im | a2_im | a2_im |\n  v2 = vdup_lane_f32(a1, 1);\n  // Multiply the real a with b\n  v1 = vmul_f32(v1, a2);\n  // Multiply the imag a with b\n  v2 = vmul_f32(v2, a2);\n  // Conjugate v2\n  v2 = vreinterpret_f32_u32(veor_u32(vreinterpret_u32_f32(v2), p2ui_CONJ_XOR()));\n  // Swap real/imag elements in v2.\n  v2 = vrev64_f32(v2);\n  // Add v1, v2\n  prod = vadd_f32(v1, v2);\n\n  vst1_f32(reinterpret_cast<float*>(&s), prod);\n\n  return s;\n}\n\ntemplate<int Offset>\nstruct palign_impl<Offset,Packet2cf>\n{\n  EIGEN_STRONG_INLINE static void run(Packet2cf& first, const Packet2cf& second)\n  {\n    if (Offset == 1)\n      first.v = vextq_f32(first.v, second.v, 2);\n  }\n};\n\ntemplate<> struct conj_helper<Packet1cf,Packet1cf,false,true>\n{\n  EIGEN_STRONG_INLINE Packet1cf pmadd(const Packet1cf& x, const Packet1cf& y, const Packet1cf& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet1cf pmul(const Packet1cf& a, const Packet1cf& b) const\n  { return internal::pmul(a, pconj(b)); }\n};\n\ntemplate<> struct conj_helper<Packet1cf,Packet1cf,true,false>\n{\n  EIGEN_STRONG_INLINE Packet1cf pmadd(const Packet1cf& x, const Packet1cf& y, const Packet1cf& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet1cf pmul(const Packet1cf& a, const Packet1cf& b) const\n  { return internal::pmul(pconj(a), b); }\n};\n\ntemplate<> struct conj_helper<Packet1cf,Packet1cf,true,true>\n{\n  EIGEN_STRONG_INLINE Packet1cf pmadd(const Packet1cf& x, const Packet1cf& y, const Packet1cf& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet1cf pmul(const Packet1cf& a, const Packet1cf& b) const\n  { return pconj(internal::pmul(a,b)); }\n};\n\ntemplate<> struct conj_helper<Packet2cf,Packet2cf,false,true>\n{\n  EIGEN_STRONG_INLINE Packet2cf pmadd(const Packet2cf& x, const Packet2cf& y, const Packet2cf& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet2cf pmul(const Packet2cf& a, const Packet2cf& b) const\n  { return internal::pmul(a, pconj(b)); }\n};\n\ntemplate<> struct conj_helper<Packet2cf,Packet2cf,true,false>\n{\n  EIGEN_STRONG_INLINE Packet2cf pmadd(const Packet2cf& x, const Packet2cf& y, const Packet2cf& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet2cf pmul(const Packet2cf& a, const Packet2cf& b) const\n  { return internal::pmul(pconj(a), b); }\n};\n\ntemplate<> struct conj_helper<Packet2cf,Packet2cf,true,true>\n{\n  EIGEN_STRONG_INLINE Packet2cf pmadd(const Packet2cf& x, const Packet2cf& y, const Packet2cf& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet2cf pmul(const Packet2cf& a, const Packet2cf& b) const\n  { return pconj(internal::pmul(a,b)); }\n};\n\nEIGEN_MAKE_CONJ_HELPER_CPLX_REAL(Packet1cf,Packet2f)\nEIGEN_MAKE_CONJ_HELPER_CPLX_REAL(Packet2cf,Packet4f)\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cf pdiv<Packet1cf>(const Packet1cf& a, const Packet1cf& b)\n{\n  // TODO optimize it for NEON\n  Packet1cf res = conj_helper<Packet1cf, Packet1cf, false, true>().pmul(a,b);\n  Packet2f s, rev_s;\n\n  // this computes the norm\n  s = vmul_f32(b.v, b.v);\n  rev_s = vrev64_f32(s);\n\n  return Packet1cf(pdiv<Packet2f>(res.v, vadd_f32(s, rev_s)));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pdiv<Packet2cf>(const Packet2cf& a, const Packet2cf& b)\n{\n  // TODO optimize it for NEON\n  Packet2cf res = conj_helper<Packet2cf, Packet2cf, false, true>().pmul(a,b);\n  Packet4f s, rev_s;\n\n  // this computes the norm\n  s = vmulq_f32(b.v, b.v);\n  rev_s = vrev64q_f32(s);\n\n  return Packet2cf(pdiv<Packet4f>(res.v, vaddq_f32(s, rev_s)));\n}\n\nEIGEN_DEVICE_FUNC inline void ptranspose(PacketBlock<Packet1cf, 1>& /*kernel*/) {}\nEIGEN_DEVICE_FUNC inline void ptranspose(PacketBlock<Packet2cf, 2>& kernel)\n{\n  Packet4f tmp = vcombine_f32(vget_high_f32(kernel.packet[0].v), vget_high_f32(kernel.packet[1].v));\n  kernel.packet[0].v = vcombine_f32(vget_low_f32(kernel.packet[0].v), vget_low_f32(kernel.packet[1].v));\n  kernel.packet[1].v = tmp;\n}\n\n//---------- double ----------\n#if EIGEN_ARCH_ARM64 && !EIGEN_APPLE_DOUBLE_NEON_BUG\n\n// See bug 1325, clang fails to call vld1q_u64.\n#if EIGEN_COMP_CLANG\n  static uint64x2_t p2ul_CONJ_XOR = {0x0, 0x8000000000000000};\n#else\n  const uint64_t  p2ul_conj_XOR_DATA[] = { 0x0, 0x8000000000000000 };\n  static uint64x2_t p2ul_CONJ_XOR = vld1q_u64( p2ul_conj_XOR_DATA );\n#endif\n\nstruct Packet1cd\n{\n  EIGEN_STRONG_INLINE Packet1cd() {}\n  EIGEN_STRONG_INLINE explicit Packet1cd(const Packet2d& a) : v(a) {}\n  Packet2d v;\n};\n\ntemplate<> struct packet_traits<std::complex<double> >  : default_packet_traits\n{\n  typedef Packet1cd type;\n  typedef Packet1cd half;\n  enum\n  {\n    Vectorizable = 1,\n    AlignedOnScalar = 0,\n    size = 1,\n    HasHalfPacket = 0,\n\n    HasAdd    = 1,\n    HasSub    = 1,\n    HasMul    = 1,\n    HasDiv    = 1,\n    HasNegate = 1,\n    HasAbs    = 0,\n    HasAbs2   = 0,\n    HasMin    = 0,\n    HasMax    = 0,\n    HasSetLinear = 0\n  };\n};\n\ntemplate<> struct unpacket_traits<Packet1cd>\n{\n  typedef std::complex<double> type;\n  enum\n  {\n    size=1,\n    alignment=Aligned16,\n    vectorizable=true,\n    masked_load_available=false,\n    masked_store_available=false\n  };\n  typedef Packet1cd half;\n};\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pload<Packet1cd>(const std::complex<double>* from)\n{ EIGEN_DEBUG_ALIGNED_LOAD return Packet1cd(pload<Packet2d>(reinterpret_cast<const double*>(from))); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cd ploadu<Packet1cd>(const std::complex<double>* from)\n{ EIGEN_DEBUG_UNALIGNED_LOAD return Packet1cd(ploadu<Packet2d>(reinterpret_cast<const double*>(from))); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pset1<Packet1cd>(const std::complex<double>& from)\n{\n  /* here we really have to use unaligned loads :( */\n  return ploadu<Packet1cd>(&from);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cd padd<Packet1cd>(const Packet1cd& a, const Packet1cd& b)\n{ return Packet1cd(padd<Packet2d>(a.v, b.v)); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cd psub<Packet1cd>(const Packet1cd& a, const Packet1cd& b)\n{ return Packet1cd(psub<Packet2d>(a.v, b.v)); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pnegate(const Packet1cd& a)\n{ return Packet1cd(pnegate<Packet2d>(a.v)); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pconj(const Packet1cd& a)\n{ return Packet1cd(vreinterpretq_f64_u64(veorq_u64(vreinterpretq_u64_f64(a.v), p2ul_CONJ_XOR))); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pmul<Packet1cd>(const Packet1cd& a, const Packet1cd& b)\n{\n  Packet2d v1, v2;\n\n  // Get the real values of a\n  v1 = vdupq_lane_f64(vget_low_f64(a.v), 0);\n  // Get the imag values of a\n  v2 = vdupq_lane_f64(vget_high_f64(a.v), 0);\n  // Multiply the real a with b\n  v1 = vmulq_f64(v1, b.v);\n  // Multiply the imag a with b\n  v2 = vmulq_f64(v2, b.v);\n  // Conjugate v2\n  v2 = vreinterpretq_f64_u64(veorq_u64(vreinterpretq_u64_f64(v2), p2ul_CONJ_XOR));\n  // Swap real/imag elements in v2.\n  v2 = preverse<Packet2d>(v2);\n  // Add and return the result\n  return Packet1cd(vaddq_f64(v1, v2));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pcmp_eq(const Packet1cd& a, const Packet1cd& b)\n{\n  // Compare real and imaginary parts of a and b to get the mask vector:\n  // [re(a)==re(b), im(a)==im(b)]\n  Packet2d eq = pcmp_eq<Packet2d>(a.v, b.v);\n  // Swap real/imag elements in the mask in to get:\n  // [im(a)==im(b), re(a)==re(b)]\n  Packet2d eq_swapped = vreinterpretq_f64_u32(vrev64q_u32(vreinterpretq_u32_f64(eq)));\n  // Return re(a)==re(b) & im(a)==im(b) by computing bitwise AND of eq and eq_swapped\n  return Packet1cd(pand<Packet2d>(eq, eq_swapped));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pand<Packet1cd>(const Packet1cd& a, const Packet1cd& b)\n{ return Packet1cd(vreinterpretq_f64_u64(vandq_u64(vreinterpretq_u64_f64(a.v),vreinterpretq_u64_f64(b.v)))); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cd por<Packet1cd>(const Packet1cd& a, const Packet1cd& b)\n{ return Packet1cd(vreinterpretq_f64_u64(vorrq_u64(vreinterpretq_u64_f64(a.v),vreinterpretq_u64_f64(b.v)))); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pxor<Packet1cd>(const Packet1cd& a, const Packet1cd& b)\n{ return Packet1cd(vreinterpretq_f64_u64(veorq_u64(vreinterpretq_u64_f64(a.v),vreinterpretq_u64_f64(b.v)))); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pandnot<Packet1cd>(const Packet1cd& a, const Packet1cd& b)\n{ return Packet1cd(vreinterpretq_f64_u64(vbicq_u64(vreinterpretq_u64_f64(a.v),vreinterpretq_u64_f64(b.v)))); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cd ploaddup<Packet1cd>(const std::complex<double>* from)\n{ return pset1<Packet1cd>(*from); }\n\ntemplate<> EIGEN_STRONG_INLINE void pstore <std::complex<double> >(std::complex<double> *to, const Packet1cd& from)\n{ EIGEN_DEBUG_ALIGNED_STORE pstore(reinterpret_cast<double*>(to), from.v); }\n\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<std::complex<double> >(std::complex<double> *to, const Packet1cd& from)\n{ EIGEN_DEBUG_UNALIGNED_STORE pstoreu(reinterpret_cast<double*>(to), from.v); }\n\ntemplate<> EIGEN_STRONG_INLINE void prefetch<std::complex<double> >(const std::complex<double> *addr)\n{ EIGEN_ARM_PREFETCH(reinterpret_cast<const double*>(addr)); }\n\ntemplate<> EIGEN_DEVICE_FUNC inline Packet1cd pgather<std::complex<double>, Packet1cd>(\n    const std::complex<double>* from, Index stride)\n{\n  Packet2d res = pset1<Packet2d>(0.0);\n  res = vsetq_lane_f64(std::real(from[0*stride]), res, 0);\n  res = vsetq_lane_f64(std::imag(from[0*stride]), res, 1);\n  return Packet1cd(res);\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<std::complex<double>, Packet1cd>(\n    std::complex<double>* to, const Packet1cd& from, Index stride)\n{ to[stride*0] = std::complex<double>(vgetq_lane_f64(from.v, 0), vgetq_lane_f64(from.v, 1)); }\n\ntemplate<> EIGEN_STRONG_INLINE std::complex<double> pfirst<Packet1cd>(const Packet1cd& a)\n{\n  EIGEN_ALIGN16 std::complex<double> res;\n  pstore<std::complex<double> >(&res, a);\n  return res;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cd preverse(const Packet1cd& a) { return a; }\n\ntemplate<> EIGEN_STRONG_INLINE std::complex<double> predux<Packet1cd>(const Packet1cd& a) { return pfirst(a); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cd preduxp<Packet1cd>(const Packet1cd* vecs) { return vecs[0]; }\n\ntemplate<> EIGEN_STRONG_INLINE std::complex<double> predux_mul<Packet1cd>(const Packet1cd& a) { return pfirst(a); }\n\ntemplate<int Offset>\nstruct palign_impl<Offset,Packet1cd>\n{\n  static EIGEN_STRONG_INLINE void run(Packet1cd& /*first*/, const Packet1cd& /*second*/)\n  {\n    // FIXME is it sure we never have to align a Packet1cd?\n    // Even though a std::complex<double> has 16 bytes, it is not necessarily aligned on a 16 bytes boundary...\n  }\n};\n\ntemplate<> struct conj_helper<Packet1cd, Packet1cd, false,true>\n{\n  EIGEN_STRONG_INLINE Packet1cd pmadd(const Packet1cd& x, const Packet1cd& y, const Packet1cd& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet1cd pmul(const Packet1cd& a, const Packet1cd& b) const\n  { return internal::pmul(a, pconj(b)); }\n};\n\ntemplate<> struct conj_helper<Packet1cd, Packet1cd, true,false>\n{\n  EIGEN_STRONG_INLINE Packet1cd pmadd(const Packet1cd& x, const Packet1cd& y, const Packet1cd& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet1cd pmul(const Packet1cd& a, const Packet1cd& b) const\n  { return internal::pmul(pconj(a), b); }\n};\n\ntemplate<> struct conj_helper<Packet1cd, Packet1cd, true,true>\n{\n  EIGEN_STRONG_INLINE Packet1cd pmadd(const Packet1cd& x, const Packet1cd& y, const Packet1cd& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet1cd pmul(const Packet1cd& a, const Packet1cd& b) const\n  { return pconj(internal::pmul(a,b)); }\n};\n\nEIGEN_MAKE_CONJ_HELPER_CPLX_REAL(Packet1cd,Packet2d)\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pdiv<Packet1cd>(const Packet1cd& a, const Packet1cd& b)\n{\n  // TODO optimize it for NEON\n  Packet1cd res = conj_helper<Packet1cd,Packet1cd,false,true>().pmul(a,b);\n  Packet2d s = pmul<Packet2d>(b.v, b.v);\n  Packet2d rev_s = preverse<Packet2d>(s);\n\n  return Packet1cd(pdiv(res.v, padd<Packet2d>(s,rev_s)));\n}\n\nEIGEN_STRONG_INLINE Packet1cd pcplxflip/*<Packet1cd>*/(const Packet1cd& x)\n{ return Packet1cd(preverse(Packet2d(x.v))); }\n\nEIGEN_STRONG_INLINE void ptranspose(PacketBlock<Packet1cd,2>& kernel)\n{\n  Packet2d tmp = vcombine_f64(vget_high_f64(kernel.packet[0].v), vget_high_f64(kernel.packet[1].v));\n  kernel.packet[0].v = vcombine_f64(vget_low_f64(kernel.packet[0].v), vget_low_f64(kernel.packet[1].v));\n  kernel.packet[1].v = tmp;\n}\n#endif // EIGEN_ARCH_ARM64\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_COMPLEX_NEON_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/NEON/MathFunctions.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_MATH_FUNCTIONS_NEON_H\n#define EIGEN_MATH_FUNCTIONS_NEON_H\n\nnamespace Eigen {\n\nnamespace internal {\n\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet2f pexp<Packet2f>(const Packet2f& x)\n{ return pexp_float(x); }\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet4f pexp<Packet4f>(const Packet4f& x)\n{ return pexp_float(x); }\n\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet2f plog<Packet2f>(const Packet2f& x)\n{ return plog_float(x); }\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet4f plog<Packet4f>(const Packet4f& x)\n{ return plog_float(x); }\n\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet2f psin<Packet2f>(const Packet2f& x)\n{ return psin_float(x); }\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet4f psin<Packet4f>(const Packet4f& x)\n{ return psin_float(x); }\n\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet2f pcos<Packet2f>(const Packet2f& x)\n{ return pcos_float(x); }\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet4f pcos<Packet4f>(const Packet4f& x)\n{ return pcos_float(x); }\n\n// Hyperbolic Tangent function.\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet2f ptanh<Packet2f>(const Packet2f& x)\n{ return internal::generic_fast_tanh_float(x); }\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet4f ptanh<Packet4f>(const Packet4f& x)\n{ return internal::generic_fast_tanh_float(x); }\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_MATH_FUNCTIONS_NEON_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/NEON/PacketMath.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2010 Konstantinos Margaritis <markos@freevec.org>\n// Heavily based on Gael's SSE version.\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_PACKET_MATH_NEON_H\n#define EIGEN_PACKET_MATH_NEON_H\n\nnamespace Eigen {\n\nnamespace internal {\n\n#ifndef EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD\n#define EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 8\n#endif\n\n#ifndef EIGEN_HAS_SINGLE_INSTRUCTION_MADD\n#define EIGEN_HAS_SINGLE_INSTRUCTION_MADD\n#endif\n\n#ifndef EIGEN_HAS_SINGLE_INSTRUCTION_CJMADD\n#define EIGEN_HAS_SINGLE_INSTRUCTION_CJMADD\n#endif\n\n#ifndef EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS\n#if EIGEN_ARCH_ARM64\n#define EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS 32\n#else\n#define EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS 16\n#endif\n#endif\n\n#if EIGEN_COMP_MSVC\n\n// In MSVC's arm_neon.h header file, all NEON vector types\n// are aliases to the same underlying type __n128.\n// We thus have to wrap them to make them different C++ types.\n// (See also bug 1428)\ntypedef eigen_packet_wrapper<float32x2_t,0>  Packet2f;\ntypedef eigen_packet_wrapper<float32x4_t,1>  Packet4f;\ntypedef eigen_packet_wrapper<int32_t    ,2>  Packet4c;\ntypedef eigen_packet_wrapper<int8x8_t   ,3>  Packet8c;\ntypedef eigen_packet_wrapper<int8x16_t  ,4>  Packet16c;\ntypedef eigen_packet_wrapper<uint32_t   ,5>  Packet4uc;\ntypedef eigen_packet_wrapper<uint8x8_t  ,6>  Packet8uc;\ntypedef eigen_packet_wrapper<uint8x16_t ,7>  Packet16uc;\ntypedef eigen_packet_wrapper<int16x4_t  ,8>  Packet4s;\ntypedef eigen_packet_wrapper<int16x8_t  ,9>  Packet8s;\ntypedef eigen_packet_wrapper<uint16x4_t ,10> Packet4us;\ntypedef eigen_packet_wrapper<uint16x8_t ,11> Packet8us;\ntypedef eigen_packet_wrapper<int32x2_t  ,12> Packet2i;\ntypedef eigen_packet_wrapper<int32x4_t  ,13> Packet4i;\ntypedef eigen_packet_wrapper<uint32x2_t ,14> Packet2ui;\ntypedef eigen_packet_wrapper<uint32x4_t ,15> Packet4ui;\ntypedef eigen_packet_wrapper<int64x2_t  ,16> Packet2l;\ntypedef eigen_packet_wrapper<uint64x2_t ,17> Packet2ul;\n\n#else\n\ntypedef float32x2_t                          Packet2f;\ntypedef float32x4_t                          Packet4f;\ntypedef eigen_packet_wrapper<int32_t    ,2>  Packet4c;\ntypedef int8x8_t                             Packet8c;\ntypedef int8x16_t                            Packet16c;\ntypedef eigen_packet_wrapper<uint32_t   ,5>  Packet4uc;\ntypedef uint8x8_t                            Packet8uc;\ntypedef uint8x16_t                           Packet16uc;\ntypedef int16x4_t                            Packet4s;\ntypedef int16x8_t                            Packet8s;\ntypedef uint16x4_t                           Packet4us;\ntypedef uint16x8_t                           Packet8us;\ntypedef int32x2_t                            Packet2i;\ntypedef int32x4_t                            Packet4i;\ntypedef uint32x2_t                           Packet2ui;\ntypedef uint32x4_t                           Packet4ui;\ntypedef int64x2_t                            Packet2l;\ntypedef uint64x2_t                           Packet2ul;\n\n#endif // EIGEN_COMP_MSVC\n\n#define _EIGEN_DECLARE_CONST_Packet4f(NAME,X) \\\n  const Packet4f p4f_##NAME = pset1<Packet4f>(X)\n\n#define _EIGEN_DECLARE_CONST_Packet4f_FROM_INT(NAME,X) \\\n  const Packet4f p4f_##NAME = vreinterpretq_f32_u32(pset1<int32_t>(X))\n\n#define _EIGEN_DECLARE_CONST_Packet4i(NAME,X) \\\n  const Packet4i p4i_##NAME = pset1<Packet4i>(X)\n\n#if EIGEN_ARCH_ARM64\n  // __builtin_prefetch tends to do nothing on ARM64 compilers because the\n  // prefetch instructions there are too detailed for __builtin_prefetch to map\n  // meaningfully to them.\n  #define EIGEN_ARM_PREFETCH(ADDR)  __asm__ __volatile__(\"prfm pldl1keep, [%[addr]]\\n\" ::[addr] \"r\"(ADDR) : );\n#elif EIGEN_HAS_BUILTIN(__builtin_prefetch) || EIGEN_COMP_GNUC\n  #define EIGEN_ARM_PREFETCH(ADDR) __builtin_prefetch(ADDR);\n#elif defined __pld\n  #define EIGEN_ARM_PREFETCH(ADDR) __pld(ADDR)\n#elif EIGEN_ARCH_ARM32\n  #define EIGEN_ARM_PREFETCH(ADDR) __asm__ __volatile__ (\"pld [%[addr]]\\n\" :: [addr] \"r\" (ADDR) : );\n#else\n  // by default no explicit prefetching\n  #define EIGEN_ARM_PREFETCH(ADDR)\n#endif\n\ntemplate <>\nstruct packet_traits<float> : default_packet_traits\n{\n  typedef Packet4f type;\n  typedef Packet2f half;\n  enum\n  {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size = 4,\n    HasHalfPacket = 1,\n\n    HasCast      = 1,\n    HasAdd       = 1,\n    HasSub       = 1,\n    HasShift     = 1,\n    HasMul       = 1,\n    HasNegate    = 1,\n    HasAbs       = 1,\n    HasArg       = 0,\n    HasAbs2      = 1,\n    HasAbsDiff   = 1,\n    HasMin       = 1,\n    HasMax       = 1,\n    HasConj      = 1,\n    HasSetLinear = 0,\n    HasBlend     = 0,\n    HasInsert    = 1,\n    HasReduxp    = 1,\n\n    HasDiv   = 1,\n    HasFloor = 1,\n\n    HasSin  = EIGEN_FAST_MATH,\n    HasCos  = EIGEN_FAST_MATH,\n    HasLog  = 1,\n    HasExp  = 1,\n    HasSqrt = 0,\n    HasTanh = EIGEN_FAST_MATH,\n    HasErf  = EIGEN_FAST_MATH\n  };\n};\n\ntemplate <>\nstruct packet_traits<int8_t> : default_packet_traits\n{\n  typedef Packet16c type;\n  typedef Packet8c half;\n  enum\n  {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size = 16,\n    HasHalfPacket = 1,\n\n    HasCast      = 1,\n    HasAdd       = 1,\n    HasSub       = 1,\n    HasShift     = 1,\n    HasMul       = 1,\n    HasNegate    = 1,\n    HasAbs       = 1,\n    HasAbsDiff   = 1,\n    HasArg       = 0,\n    HasAbs2      = 1,\n    HasMin       = 1,\n    HasMax       = 1,\n    HasConj      = 1,\n    HasSetLinear = 0,\n    HasBlend     = 0,\n    HasInsert    = 1,\n    HasReduxp    = 1\n  };\n};\n\ntemplate <>\nstruct packet_traits<uint8_t> : default_packet_traits\n{\n  typedef Packet16uc type;\n  typedef Packet8uc half;\n  enum\n  {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size = 16,\n    HasHalfPacket = 1,\n\n    HasCast      = 1,\n    HasAdd       = 1,\n    HasSub       = 1,\n    HasShift     = 1,\n    HasMul       = 1,\n    HasNegate    = 0,\n    HasAbs       = 1,\n    HasAbsDiff   = 1,\n    HasArg       = 0,\n    HasAbs2      = 1,\n    HasMin       = 1,\n    HasMax       = 1,\n    HasConj      = 1,\n    HasSetLinear = 0,\n    HasBlend     = 0,\n    HasInsert    = 1,\n    HasReduxp    = 1,\n\n    HasSqrt = 1\n  };\n};\n\ntemplate <>\nstruct packet_traits<int16_t> : default_packet_traits\n{\n  typedef Packet8s type;\n  typedef Packet4s half;\n  enum\n  {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size = 8,\n    HasHalfPacket = 1,\n\n    HasCast      = 1,\n    HasAdd       = 1,\n    HasSub       = 1,\n    HasShift     = 1,\n    HasMul       = 1,\n    HasNegate    = 1,\n    HasAbs       = 1,\n    HasAbsDiff   = 1,\n    HasArg       = 0,\n    HasAbs2      = 1,\n    HasMin       = 1,\n    HasMax       = 1,\n    HasConj      = 1,\n    HasSetLinear = 0,\n    HasBlend     = 0,\n    HasInsert    = 1,\n    HasReduxp    = 1\n  };\n};\n\ntemplate <>\nstruct packet_traits<uint16_t> : default_packet_traits\n{\n  typedef Packet8us type;\n  typedef Packet4us half;\n  enum\n  {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size = 8,\n    HasHalfPacket = 1,\n\n    HasCast      = 1,\n    HasAdd       = 1,\n    HasSub       = 1,\n    HasShift     = 1,\n    HasMul       = 1,\n    HasNegate    = 0,\n    HasAbs       = 0,\n    HasAbsDiff   = 1,\n    HasArg       = 0,\n    HasAbs2      = 1,\n    HasMin       = 1,\n    HasMax       = 1,\n    HasConj      = 1,\n    HasSetLinear = 0,\n    HasBlend     = 0,\n    HasInsert    = 1,\n    HasReduxp    = 1,\n\n    HasSqrt = 1\n  };\n};\n\ntemplate <>\nstruct packet_traits<int32_t> : default_packet_traits\n{\n  typedef Packet4i type;\n  typedef Packet2i half;\n  enum\n  {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size = 4,\n    HasHalfPacket = 1,\n\n    HasCast      = 1,\n    HasAdd       = 1,\n    HasSub       = 1,\n    HasShift     = 1,\n    HasMul       = 1,\n    HasNegate    = 1,\n    HasAbs       = 1,\n    HasArg       = 0,\n    HasAbs2      = 1,\n    HasAbsDiff   = 1,\n    HasMin       = 1,\n    HasMax       = 1,\n    HasConj      = 1,\n    HasSetLinear = 0,\n    HasBlend     = 0,\n    HasInsert    = 1,\n    HasReduxp    = 1\n  };\n};\n\ntemplate <>\nstruct packet_traits<uint32_t> : default_packet_traits\n{\n  typedef Packet4ui type;\n  typedef Packet2ui half;\n  enum\n  {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size = 4,\n    HasHalfPacket = 1,\n\n    HasCast      = 1,\n    HasAdd       = 1,\n    HasSub       = 1,\n    HasShift     = 1,\n    HasMul       = 1,\n    HasNegate    = 0,\n    HasAbs       = 0,\n    HasArg       = 0,\n    HasAbs2      = 1,\n    HasAbsDiff   = 1,\n    HasMin       = 1,\n    HasMax       = 1,\n    HasConj      = 1,\n    HasSetLinear = 0,\n    HasBlend     = 0,\n    HasInsert    = 1,\n    HasReduxp    = 1,\n\n    HasSqrt = 1\n  };\n};\n\ntemplate <>\nstruct packet_traits<int64_t> : default_packet_traits\n{\n  typedef Packet2l type;\n  typedef Packet2l half;\n  enum\n  {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size = 2,\n    HasHalfPacket = 1,\n\n    HasCast      = 1,\n    HasCmp       = 1,\n    HasAdd       = 1,\n    HasSub       = 1,\n    HasShift     = 1,\n    HasMul       = 1,\n    HasNegate    = 1,\n    HasAbs       = 1,\n    HasArg       = 0,\n    HasAbs2      = 1,\n    HasAbsDiff   = 1,\n    HasMin       = 1,\n    HasMax       = 1,\n    HasConj      = 1,\n    HasSetLinear = 0,\n    HasBlend     = 0,\n    HasInsert    = 1,\n    HasReduxp    = 1\n  };\n};\n\ntemplate <>\nstruct packet_traits<uint64_t> : default_packet_traits\n{\n  typedef Packet2ul type;\n  typedef Packet2ul half;\n  enum\n  {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size = 2,\n    HasHalfPacket = 1,\n\n    HasCast      = 1,\n    HasCmp       = 1,\n    HasAdd       = 1,\n    HasSub       = 1,\n    HasShift     = 1,\n    HasMul       = 1,\n    HasNegate    = 0,\n    HasAbs       = 0,\n    HasArg       = 0,\n    HasAbs2      = 1,\n    HasAbsDiff   = 1,\n    HasMin       = 1,\n    HasMax       = 1,\n    HasConj      = 1,\n    HasSetLinear = 0,\n    HasBlend     = 0,\n    HasInsert    = 1,\n    HasReduxp    = 1\n  };\n};\n\n#if EIGEN_GNUC_AT_MOST(4, 4) && !EIGEN_COMP_LLVM\n// workaround gcc 4.2, 4.3 and 4.4 compilatin issue\nEIGEN_STRONG_INLINE float32x4_t vld1q_f32(const float* x) { return ::vld1q_f32((const float32_t*)x); }\nEIGEN_STRONG_INLINE float32x2_t vld1_f32(const float* x) { return ::vld1_f32 ((const float32_t*)x); }\nEIGEN_STRONG_INLINE float32x2_t vld1_dup_f32(const float* x) { return ::vld1_dup_f32 ((const float32_t*)x); }\nEIGEN_STRONG_INLINE void vst1q_f32(float* to, float32x4_t from) { ::vst1q_f32((float32_t*)to,from); }\nEIGEN_STRONG_INLINE void vst1_f32 (float* to, float32x2_t from) { ::vst1_f32 ((float32_t*)to,from); }\n#endif\n\ntemplate<> struct unpacket_traits<Packet2f>\n{\n  typedef float type;\n  typedef Packet2f half;\n  typedef Packet2i integer_packet;\n  enum\n  {\n    size = 2,\n    alignment = Aligned16,\n    vectorizable = true,\n    masked_load_available = false,\n    masked_store_available = false\n  };\n};\ntemplate<> struct unpacket_traits<Packet4f>\n{\n  typedef float type;\n  typedef Packet2f half;\n  typedef Packet4i integer_packet;\n  enum\n  {\n    size = 4,\n    alignment = Aligned16,\n    vectorizable = true,\n    masked_load_available = false,\n    masked_store_available = false\n  };\n};\ntemplate<> struct unpacket_traits<Packet4c>\n{\n  typedef int8_t type;\n  typedef Packet4c half;\n  enum\n  {\n    size = 4,\n    alignment = Unaligned,\n    vectorizable = true,\n    masked_load_available = false,\n    masked_store_available = false\n  };\n};\ntemplate<> struct unpacket_traits<Packet8c>\n{\n  typedef int8_t type;\n  typedef Packet4c half;\n  enum\n  {\n    size = 8,\n    alignment = Aligned16,\n    vectorizable = true,\n    masked_load_available = false,\n    masked_store_available = false\n  };\n};\ntemplate<> struct unpacket_traits<Packet16c>\n{\n  typedef int8_t type;\n  typedef Packet8c half;\n  enum\n  {\n    size = 16,\n    alignment = Aligned16,\n    vectorizable = true,\n    masked_load_available = false,\n    masked_store_available = false\n  };\n};\ntemplate<> struct unpacket_traits<Packet4uc>\n{\n  typedef uint8_t type;\n  typedef Packet4uc half;\n  enum\n  {\n    size = 4,\n    alignment = Unaligned,\n    vectorizable = true,\n    masked_load_available = false,\n    masked_store_available = false\n  };\n};\ntemplate<> struct unpacket_traits<Packet8uc>\n{\n  typedef uint8_t type;\n  typedef Packet4uc half;\n  enum\n  {\n    size = 8,\n    alignment = Aligned16,\n    vectorizable = true,\n    masked_load_available = false,\n    masked_store_available = false\n  };\n};\ntemplate<> struct unpacket_traits<Packet16uc>\n{\n  typedef uint8_t type;\n  typedef Packet8uc half;\n  enum\n  {\n    size = 16,\n    alignment = Aligned16,\n    vectorizable = true,\n    masked_load_available = false,\n    masked_store_available = false};\n};\ntemplate<> struct unpacket_traits<Packet4s>\n{\n  typedef int16_t type;\n  typedef Packet4s half;\n  enum\n  {\n    size = 4,\n    alignment = Aligned16,\n    vectorizable = true,\n    masked_load_available = false,\n    masked_store_available = false\n  };\n};\ntemplate<> struct unpacket_traits<Packet8s>\n{\n  typedef int16_t type;\n  typedef Packet4s half;\n  enum\n  {\n    size = 8,\n    alignment = Aligned16,\n    vectorizable = true,\n    masked_load_available = false,\n    masked_store_available = false\n  };\n};\ntemplate<> struct unpacket_traits<Packet4us>\n{\n  typedef uint16_t type;\n  typedef Packet4us half;\n  enum\n  {\n    size = 4,\n    alignment = Aligned16,\n    vectorizable = true,\n    masked_load_available = false,\n    masked_store_available = false\n  };\n};\ntemplate<> struct unpacket_traits<Packet8us>\n{\n  typedef uint16_t type;\n  typedef Packet4us half;\n  enum\n  {\n    size = 8,\n    alignment = Aligned16,\n    vectorizable = true,\n    masked_load_available = false,\n    masked_store_available = false\n  };\n};\ntemplate<> struct unpacket_traits<Packet2i>\n{\n  typedef int32_t type;\n  typedef Packet2i half;\n  enum\n  {\n    size = 2,\n    alignment = Aligned16,\n    vectorizable = true,\n    masked_load_available = false,\n    masked_store_available = false\n  };\n};\ntemplate<> struct unpacket_traits<Packet4i>\n{\n  typedef int32_t type;\n  typedef Packet2i half;\n  enum\n  {\n    size = 4,\n    alignment = Aligned16,\n    vectorizable = true,\n    masked_load_available = false,\n    masked_store_available = false\n  };\n};\ntemplate<> struct unpacket_traits<Packet2ui>\n{\n  typedef uint32_t type;\n  typedef Packet2ui half;\n  enum\n  {\n    size = 2,\n    alignment = Aligned16,\n    vectorizable = true,\n    masked_load_available = false,\n    masked_store_available = false\n  };\n};\ntemplate<> struct unpacket_traits<Packet4ui>\n{\n  typedef uint32_t type;\n  typedef Packet2ui half;\n  enum\n  {\n    size = 4,\n    alignment = Aligned16,\n    vectorizable = true,\n    masked_load_available = false,\n    masked_store_available = false\n  };\n};\ntemplate<> struct unpacket_traits<Packet2l>\n{\n  typedef int64_t type;\n  typedef Packet2l half;\n  enum\n  {\n    size = 2,\n    alignment = Aligned16,\n    vectorizable = true,\n    masked_load_available = false,\n    masked_store_available = false\n  };\n};\ntemplate<> struct unpacket_traits<Packet2ul>\n{\n  typedef uint64_t type;\n  typedef Packet2ul half;\n  enum\n  {\n    size = 2,\n    alignment = Aligned16,\n    vectorizable = true,\n    masked_load_available = false,\n    masked_store_available = false\n  };\n};\n\ntemplate<> EIGEN_STRONG_INLINE Packet2f pset1<Packet2f>(const float& from) { return vdup_n_f32(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pset1<Packet4f>(const float& from) { return vdupq_n_f32(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet4c pset1<Packet4c>(const int8_t& from)\n{ return vget_lane_s32(vreinterpret_s32_s8(vdup_n_s8(from)), 0); }\ntemplate<> EIGEN_STRONG_INLINE Packet8c pset1<Packet8c>(const int8_t& from) { return vdup_n_s8(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet16c pset1<Packet16c>(const int8_t& from) { return vdupq_n_s8(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet4uc pset1<Packet4uc>(const uint8_t& from)\n{ return vget_lane_u32(vreinterpret_u32_u8(vdup_n_u8(from)), 0); }\ntemplate<> EIGEN_STRONG_INLINE Packet8uc pset1<Packet8uc>(const uint8_t& from) { return vdup_n_u8(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet16uc pset1<Packet16uc>(const uint8_t& from) { return vdupq_n_u8(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet4s pset1<Packet4s>(const int16_t& from) { return vdup_n_s16(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet8s pset1<Packet8s>(const int16_t& from) { return vdupq_n_s16(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet4us pset1<Packet4us>(const uint16_t& from) { return vdup_n_u16(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet8us pset1<Packet8us>(const uint16_t& from) { return vdupq_n_u16(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet2i pset1<Packet2i>(const int32_t& from) { return vdup_n_s32(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pset1<Packet4i>(const int32_t& from) { return vdupq_n_s32(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ui pset1<Packet2ui>(const uint32_t& from) { return vdup_n_u32(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet4ui pset1<Packet4ui>(const uint32_t& from) { return vdupq_n_u32(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet2l pset1<Packet2l>(const int64_t& from) { return vdupq_n_s64(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ul pset1<Packet2ul>(const uint64_t& from) { return vdupq_n_u64(from); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2f pset1frombits<Packet2f>(unsigned int from)\n{ return vreinterpret_f32_u32(vdup_n_u32(from)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pset1frombits<Packet4f>(unsigned int from)\n{ return vreinterpretq_f32_u32(vdupq_n_u32(from)); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2f plset<Packet2f>(const float& a)\n{\n  const float c[] = {0.0f,1.0f};\n  return vadd_f32(pset1<Packet2f>(a), vld1_f32(c));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4f plset<Packet4f>(const float& a)\n{\n  const float c[] = {0.0f,1.0f,2.0f,3.0f};\n  return vaddq_f32(pset1<Packet4f>(a), vld1q_f32(c));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4c plset<Packet4c>(const int8_t& a)\n{ return vget_lane_s32(vreinterpret_s32_s8(vadd_s8(vreinterpret_s8_u32(vdup_n_u32(0x03020100)), vdup_n_s8(a))), 0); }\ntemplate<> EIGEN_STRONG_INLINE Packet8c plset<Packet8c>(const int8_t& a)\n{\n  const int8_t c[] = {0,1,2,3,4,5,6,7};\n  return vadd_s8(pset1<Packet8c>(a), vld1_s8(c));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet16c plset<Packet16c>(const int8_t& a)\n{\n  const int8_t c[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};\n  return vaddq_s8(pset1<Packet16c>(a), vld1q_s8(c));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4uc plset<Packet4uc>(const uint8_t& a)\n{ return vget_lane_u32(vreinterpret_u32_u8(vadd_u8(vreinterpret_u8_u32(vdup_n_u32(0x03020100)), vdup_n_u8(a))), 0); }\ntemplate<> EIGEN_STRONG_INLINE Packet8uc plset<Packet8uc>(const uint8_t& a)\n{\n  const uint8_t c[] = {0,1,2,3,4,5,6,7};\n  return vadd_u8(pset1<Packet8uc>(a), vld1_u8(c));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet16uc plset<Packet16uc>(const uint8_t& a)\n{\n  const uint8_t c[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};\n  return vaddq_u8(pset1<Packet16uc>(a), vld1q_u8(c));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4s plset<Packet4s>(const int16_t& a)\n{\n  const int16_t c[] = {0,1,2,3};\n  return vadd_s16(pset1<Packet4s>(a), vld1_s16(c));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4us plset<Packet4us>(const uint16_t& a)\n{\n  const uint16_t c[] = {0,1,2,3};\n  return vadd_u16(pset1<Packet4us>(a), vld1_u16(c));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8s plset<Packet8s>(const int16_t& a)\n{\n  const int16_t c[] = {0,1,2,3,4,5,6,7};\n  return vaddq_s16(pset1<Packet8s>(a), vld1q_s16(c));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8us plset<Packet8us>(const uint16_t& a)\n{\n  const uint16_t c[] = {0,1,2,3,4,5,6,7};\n  return vaddq_u16(pset1<Packet8us>(a), vld1q_u16(c));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet2i plset<Packet2i>(const int32_t& a)\n{\n  const int32_t c[] = {0,1};\n  return vadd_s32(pset1<Packet2i>(a), vld1_s32(c));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4i plset<Packet4i>(const int32_t& a)\n{\n  const int32_t c[] = {0,1,2,3};\n  return vaddq_s32(pset1<Packet4i>(a), vld1q_s32(c));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet2ui plset<Packet2ui>(const uint32_t& a)\n{\n  const uint32_t c[] = {0,1};\n  return vadd_u32(pset1<Packet2ui>(a), vld1_u32(c));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4ui plset<Packet4ui>(const uint32_t& a)\n{\n  const uint32_t c[] = {0,1,2,3};\n  return vaddq_u32(pset1<Packet4ui>(a), vld1q_u32(c));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet2l plset<Packet2l>(const int64_t& a)\n{\n  const int64_t c[] = {0,1};\n  return vaddq_s64(pset1<Packet2l>(a), vld1q_s64(c));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet2ul plset<Packet2ul>(const uint64_t& a)\n{\n  const uint64_t c[] = {0,1};\n  return vaddq_u64(pset1<Packet2ul>(a), vld1q_u64(c));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2f padd<Packet2f>(const Packet2f& a, const Packet2f& b) { return vadd_f32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f padd<Packet4f>(const Packet4f& a, const Packet4f& b) { return vaddq_f32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4c padd<Packet4c>(const Packet4c& a, const Packet4c& b)\n{\n  return vget_lane_s32(vreinterpret_s32_s8(vadd_s8(\n      vreinterpret_s8_s32(vdup_n_s32(a)),\n      vreinterpret_s8_s32(vdup_n_s32(b)))), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8c padd<Packet8c>(const Packet8c& a, const Packet8c& b) { return vadd_s8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet16c padd<Packet16c>(const Packet16c& a, const Packet16c& b) { return vaddq_s8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4uc padd<Packet4uc>(const Packet4uc& a, const Packet4uc& b)\n{\n  return vget_lane_u32(vreinterpret_u32_u8(vadd_u8(\n      vreinterpret_u8_u32(vdup_n_u32(a)),\n      vreinterpret_u8_u32(vdup_n_u32(b)))), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8uc padd<Packet8uc>(const Packet8uc& a, const Packet8uc& b) { return vadd_u8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet16uc padd<Packet16uc>(const Packet16uc& a, const Packet16uc& b) { return vaddq_u8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4s padd<Packet4s>(const Packet4s& a, const Packet4s& b) { return vadd_s16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet8s padd<Packet8s>(const Packet8s& a, const Packet8s& b) { return vaddq_s16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4us padd<Packet4us>(const Packet4us& a, const Packet4us& b) { return vadd_u16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet8us padd<Packet8us>(const Packet8us& a, const Packet8us& b) { return vaddq_u16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2i padd<Packet2i>(const Packet2i& a, const Packet2i& b) { return vadd_s32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i padd<Packet4i>(const Packet4i& a, const Packet4i& b) { return vaddq_s32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ui padd<Packet2ui>(const Packet2ui& a, const Packet2ui& b) { return vadd_u32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4ui padd<Packet4ui>(const Packet4ui& a, const Packet4ui& b) { return vaddq_u32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2l padd<Packet2l>(const Packet2l& a, const Packet2l& b) { return vaddq_s64(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ul padd<Packet2ul>(const Packet2ul& a, const Packet2ul& b) { return vaddq_u64(a,b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2f psub<Packet2f>(const Packet2f& a, const Packet2f& b) { return vsub_f32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f psub<Packet4f>(const Packet4f& a, const Packet4f& b) { return vsubq_f32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4c psub<Packet4c>(const Packet4c& a, const Packet4c& b)\n{\n  return vget_lane_s32(vreinterpret_s32_s8(vsub_s8(\n      vreinterpret_s8_s32(vdup_n_s32(a)),\n      vreinterpret_s8_s32(vdup_n_s32(b)))), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8c psub<Packet8c>(const Packet8c& a, const Packet8c& b) { return vsub_s8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet16c psub<Packet16c>(const Packet16c& a, const Packet16c& b) { return vsubq_s8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4uc psub<Packet4uc>(const Packet4uc& a, const Packet4uc& b)\n{\n  return vget_lane_u32(vreinterpret_u32_u8(vsub_u8(\n      vreinterpret_u8_u32(vdup_n_u32(a)),\n      vreinterpret_u8_u32(vdup_n_u32(b)))), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8uc psub<Packet8uc>(const Packet8uc& a, const Packet8uc& b) { return vsub_u8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet16uc psub<Packet16uc>(const Packet16uc& a, const Packet16uc& b) { return vsubq_u8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4s psub<Packet4s>(const Packet4s& a, const Packet4s& b) { return vsub_s16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet8s psub<Packet8s>(const Packet8s& a, const Packet8s& b) { return vsubq_s16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4us psub<Packet4us>(const Packet4us& a, const Packet4us& b) { return vsub_u16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet8us psub<Packet8us>(const Packet8us& a, const Packet8us& b) { return vsubq_u16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2i psub<Packet2i>(const Packet2i& a, const Packet2i& b) { return vsub_s32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i psub<Packet4i>(const Packet4i& a, const Packet4i& b) { return vsubq_s32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ui psub<Packet2ui>(const Packet2ui& a, const Packet2ui& b) { return vsub_u32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4ui psub<Packet4ui>(const Packet4ui& a, const Packet4ui& b) { return vsubq_u32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2l psub<Packet2l>(const Packet2l& a, const Packet2l& b) { return vsubq_s64(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ul psub<Packet2ul>(const Packet2ul& a, const Packet2ul& b) { return vsubq_u64(a,b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2f pnegate(const Packet2f& a) { return vneg_f32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pnegate(const Packet4f& a) { return vnegq_f32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4c pnegate(const Packet4c& a)\n{ return vget_lane_s32(vreinterpret_s32_s8(vneg_s8(vreinterpret_s8_s32(vdup_n_s32(a)))), 0); }\ntemplate<> EIGEN_STRONG_INLINE Packet8c pnegate(const Packet8c& a) { return vneg_s8(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet16c pnegate(const Packet16c& a) { return vnegq_s8(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4s pnegate(const Packet4s& a) { return vneg_s16(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet8s pnegate(const Packet8s& a) { return vnegq_s16(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2i pnegate(const Packet2i& a) { return vneg_s32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pnegate(const Packet4i& a) { return vnegq_s32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2l pnegate(const Packet2l& a) {\n#if EIGEN_ARCH_ARM64\n  return vnegq_s64(a);\n#else\n  return vcombine_s64(\n      vdup_n_s64(-vgetq_lane_s64(a, 0)),\n      vdup_n_s64(-vgetq_lane_s64(a, 1)));\n#endif\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2f pconj(const Packet2f& a) { return a; }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pconj(const Packet4f& a) { return a; }\ntemplate<> EIGEN_STRONG_INLINE Packet4c pconj(const Packet4c& a) { return a; }\ntemplate<> EIGEN_STRONG_INLINE Packet8c pconj(const Packet8c& a) { return a; }\ntemplate<> EIGEN_STRONG_INLINE Packet16c pconj(const Packet16c& a) { return a; }\ntemplate<> EIGEN_STRONG_INLINE Packet4uc pconj(const Packet4uc& a) { return a; }\ntemplate<> EIGEN_STRONG_INLINE Packet8uc pconj(const Packet8uc& a) { return a; }\ntemplate<> EIGEN_STRONG_INLINE Packet16uc pconj(const Packet16uc& a) { return a; }\ntemplate<> EIGEN_STRONG_INLINE Packet4s pconj(const Packet4s& a) { return a; }\ntemplate<> EIGEN_STRONG_INLINE Packet8s pconj(const Packet8s& a) { return a; }\ntemplate<> EIGEN_STRONG_INLINE Packet4us pconj(const Packet4us& a) { return a; }\ntemplate<> EIGEN_STRONG_INLINE Packet8us pconj(const Packet8us& a) { return a; }\ntemplate<> EIGEN_STRONG_INLINE Packet2i pconj(const Packet2i& a) { return a; }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pconj(const Packet4i& a) { return a; }\ntemplate<> EIGEN_STRONG_INLINE Packet2ui pconj(const Packet2ui& a) { return a; }\ntemplate<> EIGEN_STRONG_INLINE Packet4ui pconj(const Packet4ui& a) { return a; }\ntemplate<> EIGEN_STRONG_INLINE Packet2l pconj(const Packet2l& a) { return a; }\ntemplate<> EIGEN_STRONG_INLINE Packet2ul pconj(const Packet2ul& a) { return a; }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2f pmul<Packet2f>(const Packet2f& a, const Packet2f& b) { return vmul_f32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pmul<Packet4f>(const Packet4f& a, const Packet4f& b) { return vmulq_f32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4c pmul<Packet4c>(const Packet4c& a, const Packet4c& b)\n{\n  return vget_lane_s32(vreinterpret_s32_s8(vmul_s8(\n      vreinterpret_s8_s32(vdup_n_s32(a)),\n      vreinterpret_s8_s32(vdup_n_s32(b)))), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8c pmul<Packet8c>(const Packet8c& a, const Packet8c& b) { return vmul_s8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet16c pmul<Packet16c>(const Packet16c& a, const Packet16c& b) { return vmulq_s8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4uc pmul<Packet4uc>(const Packet4uc& a, const Packet4uc& b)\n{\n  return vget_lane_u32(vreinterpret_u32_u8(vmul_u8(\n      vreinterpret_u8_u32(vdup_n_u32(a)),\n      vreinterpret_u8_u32(vdup_n_u32(b)))), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8uc pmul<Packet8uc>(const Packet8uc& a, const Packet8uc& b) { return vmul_u8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet16uc pmul<Packet16uc>(const Packet16uc& a, const Packet16uc& b) { return vmulq_u8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4s pmul<Packet4s>(const Packet4s& a, const Packet4s& b) { return vmul_s16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet8s pmul<Packet8s>(const Packet8s& a, const Packet8s& b) { return vmulq_s16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4us pmul<Packet4us>(const Packet4us& a, const Packet4us& b) { return vmul_u16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet8us pmul<Packet8us>(const Packet8us& a, const Packet8us& b) { return vmulq_u16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2i pmul<Packet2i>(const Packet2i& a, const Packet2i& b) { return vmul_s32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pmul<Packet4i>(const Packet4i& a, const Packet4i& b) { return vmulq_s32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ui pmul<Packet2ui>(const Packet2ui& a, const Packet2ui& b) { return vmul_u32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4ui pmul<Packet4ui>(const Packet4ui& a, const Packet4ui& b) { return vmulq_u32(a,b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2f pdiv<Packet2f>(const Packet2f& a, const Packet2f& b)\n{\n#if EIGEN_ARCH_ARM64\n  return vdiv_f32(a,b);\n#else\n  Packet2f inv, restep, div;\n\n  // NEON does not offer a divide instruction, we have to do a reciprocal approximation\n  // However NEON in contrast to other SIMD engines (AltiVec/SSE), offers\n  // a reciprocal estimate AND a reciprocal step -which saves a few instructions\n  // vrecpeq_f32() returns an estimate to 1/b, which we will finetune with\n  // Newton-Raphson and vrecpsq_f32()\n  inv = vrecpe_f32(b);\n\n  // This returns a differential, by which we will have to multiply inv to get a better\n  // approximation of 1/b.\n  restep = vrecps_f32(b, inv);\n  inv = vmul_f32(restep, inv);\n\n  // Finally, multiply a by 1/b and get the wanted result of the division.\n  div = vmul_f32(a, inv);\n\n  return div;\n#endif\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4f pdiv<Packet4f>(const Packet4f& a, const Packet4f& b)\n{\n#if EIGEN_ARCH_ARM64\n  return vdivq_f32(a,b);\n#else\n  Packet4f inv, restep, div;\n\n  // NEON does not offer a divide instruction, we have to do a reciprocal approximation\n  // However NEON in contrast to other SIMD engines (AltiVec/SSE), offers\n  // a reciprocal estimate AND a reciprocal step -which saves a few instructions\n  // vrecpeq_f32() returns an estimate to 1/b, which we will finetune with\n  // Newton-Raphson and vrecpsq_f32()\n  inv = vrecpeq_f32(b);\n\n  // This returns a differential, by which we will have to multiply inv to get a better\n  // approximation of 1/b.\n  restep = vrecpsq_f32(b, inv);\n  inv = vmulq_f32(restep, inv);\n\n  // Finally, multiply a by 1/b and get the wanted result of the division.\n  div = vmulq_f32(a, inv);\n\n  return div;\n#endif\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4c pdiv<Packet4c>(const Packet4c& /*a*/, const Packet4c& /*b*/)\n{\n  eigen_assert(false && \"packet integer division are not supported by NEON\");\n  return pset1<Packet4c>(0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8c pdiv<Packet8c>(const Packet8c& /*a*/, const Packet8c& /*b*/)\n{\n  eigen_assert(false && \"packet integer division are not supported by NEON\");\n  return pset1<Packet8c>(0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet16c pdiv<Packet16c>(const Packet16c& /*a*/, const Packet16c& /*b*/)\n{\n  eigen_assert(false && \"packet integer division are not supported by NEON\");\n  return pset1<Packet16c>(0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4uc pdiv<Packet4uc>(const Packet4uc& /*a*/, const Packet4uc& /*b*/)\n{\n  eigen_assert(false && \"packet integer division are not supported by NEON\");\n  return pset1<Packet4uc>(0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8uc pdiv<Packet8uc>(const Packet8uc& /*a*/, const Packet8uc& /*b*/)\n{\n  eigen_assert(false && \"packet integer division are not supported by NEON\");\n  return pset1<Packet8uc>(0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet16uc pdiv<Packet16uc>(const Packet16uc& /*a*/, const Packet16uc& /*b*/)\n{\n  eigen_assert(false && \"packet integer division are not supported by NEON\");\n  return pset1<Packet16uc>(0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4s pdiv<Packet4s>(const Packet4s& /*a*/, const Packet4s& /*b*/)\n{\n  eigen_assert(false && \"packet integer division are not supported by NEON\");\n  return pset1<Packet4s>(0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8s pdiv<Packet8s>(const Packet8s& /*a*/, const Packet8s& /*b*/)\n{\n  eigen_assert(false && \"packet integer division are not supported by NEON\");\n  return pset1<Packet8s>(0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4us pdiv<Packet4us>(const Packet4us& /*a*/, const Packet4us& /*b*/)\n{\n  eigen_assert(false && \"packet integer division are not supported by NEON\");\n  return pset1<Packet4us>(0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8us pdiv<Packet8us>(const Packet8us& /*a*/, const Packet8us& /*b*/)\n{\n  eigen_assert(false && \"packet integer division are not supported by NEON\");\n  return pset1<Packet8us>(0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet2i pdiv<Packet2i>(const Packet2i& /*a*/, const Packet2i& /*b*/)\n{\n  eigen_assert(false && \"packet integer division are not supported by NEON\");\n  return pset1<Packet2i>(0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4i pdiv<Packet4i>(const Packet4i& /*a*/, const Packet4i& /*b*/)\n{\n  eigen_assert(false && \"packet integer division are not supported by NEON\");\n  return pset1<Packet4i>(0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet2ui pdiv<Packet2ui>(const Packet2ui& /*a*/, const Packet2ui& /*b*/)\n{\n  eigen_assert(false && \"packet integer division are not supported by NEON\");\n  return pset1<Packet2ui>(0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4ui pdiv<Packet4ui>(const Packet4ui& /*a*/, const Packet4ui& /*b*/)\n{\n  eigen_assert(false && \"packet integer division are not supported by NEON\");\n  return pset1<Packet4ui>(0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet2l pdiv<Packet2l>(const Packet2l& /*a*/, const Packet2l& /*b*/)\n{\n  eigen_assert(false && \"packet integer division are not supported by NEON\");\n  return pset1<Packet2l>(0LL);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet2ul pdiv<Packet2ul>(const Packet2ul& /*a*/, const Packet2ul& /*b*/)\n{\n  eigen_assert(false && \"packet integer division are not supported by NEON\");\n  return pset1<Packet2ul>(0ULL);\n}\n\n// Clang/ARM wrongly advertises __ARM_FEATURE_FMA even when it's not available,\n// then implements a slow software scalar fallback calling fmaf()!\n// Filed LLVM bug:\n//     https://llvm.org/bugs/show_bug.cgi?id=27216\n#if (defined __ARM_FEATURE_FMA) && !(EIGEN_COMP_CLANG && EIGEN_ARCH_ARM)\n// See bug 936.\n// FMA is available on VFPv4 i.e. when compiling with -mfpu=neon-vfpv4.\n// FMA is a true fused multiply-add i.e. only 1 rounding at the end, no intermediate rounding.\n// MLA is not fused i.e. does 2 roundings.\n// In addition to giving better accuracy, FMA also gives better performance here on a Krait (Nexus 4):\n// MLA: 10 GFlop/s ; FMA: 12 GFlops/s.\ntemplate<> EIGEN_STRONG_INLINE Packet4f pmadd(const Packet4f& a, const Packet4f& b, const Packet4f& c)\n{ return vfmaq_f32(c,a,b); }\n#else\ntemplate<> EIGEN_STRONG_INLINE Packet4f pmadd(const Packet4f& a, const Packet4f& b, const Packet4f& c)\n{\n#if EIGEN_COMP_CLANG && EIGEN_ARCH_ARM\n  // Clang/ARM will replace VMLA by VMUL+VADD at least for some values of -mcpu,\n  // at least -mcpu=cortex-a8 and -mcpu=cortex-a7. Since the former is the default on\n  // -march=armv7-a, that is a very common case.\n  // See e.g. this thread:\n  //     http://lists.llvm.org/pipermail/llvm-dev/2013-December/068806.html\n  // Filed LLVM bug:\n  //     https://llvm.org/bugs/show_bug.cgi?id=27219\n  Packet4f r = c;\n  asm volatile(\n    \"vmla.f32 %q[r], %q[a], %q[b]\"\n    : [r] \"+w\" (r)\n    : [a] \"w\" (a),\n      [b] \"w\" (b)\n    : );\n  return r;\n#else\n  return vmlaq_f32(c,a,b);\n#endif\n}\n#endif\n\n// No FMA instruction for int, so use MLA unconditionally.\ntemplate<> EIGEN_STRONG_INLINE Packet4c pmadd(const Packet4c& a, const Packet4c& b, const Packet4c& c)\n{\n  return vget_lane_s32(vreinterpret_s32_s8(vmla_s8(\n      vreinterpret_s8_s32(vdup_n_s32(c)),\n      vreinterpret_s8_s32(vdup_n_s32(a)),\n      vreinterpret_s8_s32(vdup_n_s32(b)))), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8c pmadd(const Packet8c& a, const Packet8c& b, const Packet8c& c)\n{ return vmla_s8(c,a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet16c pmadd(const Packet16c& a, const Packet16c& b, const Packet16c& c)\n{ return vmlaq_s8(c,a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4uc pmadd(const Packet4uc& a, const Packet4uc& b, const Packet4uc& c)\n{\n  return vget_lane_u32(vreinterpret_u32_u8(vmla_u8(\n      vreinterpret_u8_u32(vdup_n_u32(c)),\n      vreinterpret_u8_u32(vdup_n_u32(a)),\n      vreinterpret_u8_u32(vdup_n_u32(b)))), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8uc pmadd(const Packet8uc& a, const Packet8uc& b, const Packet8uc& c)\n{ return vmla_u8(c,a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet16uc pmadd(const Packet16uc& a, const Packet16uc& b, const Packet16uc& c)\n{ return vmlaq_u8(c,a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4s pmadd(const Packet4s& a, const Packet4s& b, const Packet4s& c)\n{ return vmla_s16(c,a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet8s pmadd(const Packet8s& a, const Packet8s& b, const Packet8s& c)\n{ return vmlaq_s16(c,a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4us pmadd(const Packet4us& a, const Packet4us& b, const Packet4us& c)\n{ return vmla_u16(c,a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet8us pmadd(const Packet8us& a, const Packet8us& b, const Packet8us& c)\n{ return vmlaq_u16(c,a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2i pmadd(const Packet2i& a, const Packet2i& b, const Packet2i& c)\n{ return vmla_s32(c,a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pmadd(const Packet4i& a, const Packet4i& b, const Packet4i& c)\n{ return vmlaq_s32(c,a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ui pmadd(const Packet2ui& a, const Packet2ui& b, const Packet2ui& c)\n{ return vmla_u32(c,a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4ui pmadd(const Packet4ui& a, const Packet4ui& b, const Packet4ui& c)\n{ return vmlaq_u32(c,a,b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2f pabsdiff<Packet2f>(const Packet2f& a, const Packet2f& b)\n{ return vabd_f32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pabsdiff<Packet4f>(const Packet4f& a, const Packet4f& b)\n{ return vabdq_f32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4c pabsdiff<Packet4c>(const Packet4c& a, const Packet4c& b)\n{\n  return vget_lane_s32(vreinterpret_s32_s8(vabd_s8(\n      vreinterpret_s8_s32(vdup_n_s32(a)),\n      vreinterpret_s8_s32(vdup_n_s32(b)))), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8c pabsdiff<Packet8c>(const Packet8c& a, const Packet8c& b)\n{ return vabd_s8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet16c pabsdiff<Packet16c>(const Packet16c& a, const Packet16c& b)\n{ return vabdq_s8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4uc pabsdiff<Packet4uc>(const Packet4uc& a, const Packet4uc& b)\n{\n  return vget_lane_u32(vreinterpret_u32_u8(vabd_u8(\n      vreinterpret_u8_u32(vdup_n_u32(a)),\n      vreinterpret_u8_u32(vdup_n_u32(b)))), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8uc pabsdiff<Packet8uc>(const Packet8uc& a, const Packet8uc& b)\n{ return vabd_u8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet16uc pabsdiff<Packet16uc>(const Packet16uc& a, const Packet16uc& b)\n{ return vabdq_u8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4s pabsdiff<Packet4s>(const Packet4s& a, const Packet4s& b)\n{ return vabd_s16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet8s pabsdiff<Packet8s>(const Packet8s& a, const Packet8s& b)\n{ return vabdq_s16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4us pabsdiff<Packet4us>(const Packet4us& a, const Packet4us& b)\n{ return vabd_u16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet8us pabsdiff<Packet8us>(const Packet8us& a, const Packet8us& b)\n{ return vabdq_u16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2i pabsdiff<Packet2i>(const Packet2i& a, const Packet2i& b)\n{ return vabd_s32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pabsdiff<Packet4i>(const Packet4i& a, const Packet4i& b)\n{ return vabdq_s32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ui pabsdiff<Packet2ui>(const Packet2ui& a, const Packet2ui& b)\n{ return vabd_u32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4ui pabsdiff<Packet4ui>(const Packet4ui& a, const Packet4ui& b)\n{ return vabdq_u32(a,b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2f pmin<Packet2f>(const Packet2f& a, const Packet2f& b) { return vmin_f32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pmin<Packet4f>(const Packet4f& a, const Packet4f& b) { return vminq_f32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4c pmin<Packet4c>(const Packet4c& a, const Packet4c& b)\n{\n  return vget_lane_s32(vreinterpret_s32_s8(vmin_s8(\n      vreinterpret_s8_s32(vdup_n_s32(a)),\n      vreinterpret_s8_s32(vdup_n_s32(b)))), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8c pmin<Packet8c>(const Packet8c& a, const Packet8c& b) { return vmin_s8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet16c pmin<Packet16c>(const Packet16c& a, const Packet16c& b) { return vminq_s8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4uc pmin<Packet4uc>(const Packet4uc& a, const Packet4uc& b)\n{\n  return vget_lane_u32(vreinterpret_u32_u8(vmin_u8(\n      vreinterpret_u8_u32(vdup_n_u32(a)),\n      vreinterpret_u8_u32(vdup_n_u32(b)))), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8uc pmin<Packet8uc>(const Packet8uc& a, const Packet8uc& b) { return vmin_u8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet16uc pmin<Packet16uc>(const Packet16uc& a, const Packet16uc& b) { return vminq_u8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4s pmin<Packet4s>(const Packet4s& a, const Packet4s& b) { return vmin_s16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet8s pmin<Packet8s>(const Packet8s& a, const Packet8s& b) { return vminq_s16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4us pmin<Packet4us>(const Packet4us& a, const Packet4us& b) { return vmin_u16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet8us pmin<Packet8us>(const Packet8us& a, const Packet8us& b) { return vminq_u16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2i pmin<Packet2i>(const Packet2i& a, const Packet2i& b) { return vmin_s32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pmin<Packet4i>(const Packet4i& a, const Packet4i& b) { return vminq_s32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ui pmin<Packet2ui>(const Packet2ui& a, const Packet2ui& b) { return vmin_u32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4ui pmin<Packet4ui>(const Packet4ui& a, const Packet4ui& b) { return vminq_u32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2l pmin<Packet2l>(const Packet2l& a, const Packet2l& b) {\n  return vcombine_s64(\n      vdup_n_s64((std::min)(vgetq_lane_s64(a, 0), vgetq_lane_s64(b, 0))),\n      vdup_n_s64((std::min)(vgetq_lane_s64(a, 1), vgetq_lane_s64(b, 1))));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet2ul pmin<Packet2ul>(const Packet2ul& a, const Packet2ul& b) {\n  return vcombine_u64(\n      vdup_n_u64((std::min)(vgetq_lane_u64(a, 0), vgetq_lane_u64(b, 0))),\n      vdup_n_u64((std::min)(vgetq_lane_u64(a, 1), vgetq_lane_u64(b, 1))));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2f pmax<Packet2f>(const Packet2f& a, const Packet2f& b) { return vmax_f32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pmax<Packet4f>(const Packet4f& a, const Packet4f& b) { return vmaxq_f32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4c pmax<Packet4c>(const Packet4c& a, const Packet4c& b)\n{\n  return vget_lane_s32(vreinterpret_s32_s8(vmax_s8(\n      vreinterpret_s8_s32(vdup_n_s32(a)),\n      vreinterpret_s8_s32(vdup_n_s32(b)))), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8c pmax<Packet8c>(const Packet8c& a, const Packet8c& b) { return vmax_s8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet16c pmax<Packet16c>(const Packet16c& a, const Packet16c& b) { return vmaxq_s8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4uc pmax<Packet4uc>(const Packet4uc& a, const Packet4uc& b)\n{\n  return vget_lane_u32(vreinterpret_u32_u8(vmax_u8(\n      vreinterpret_u8_u32(vdup_n_u32(a)),\n      vreinterpret_u8_u32(vdup_n_u32(b)))), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8uc pmax<Packet8uc>(const Packet8uc& a, const Packet8uc& b) { return vmax_u8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet16uc pmax<Packet16uc>(const Packet16uc& a, const Packet16uc& b) { return vmaxq_u8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4s pmax<Packet4s>(const Packet4s& a, const Packet4s& b) { return vmax_s16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet8s pmax<Packet8s>(const Packet8s& a, const Packet8s& b) { return vmaxq_s16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4us pmax<Packet4us>(const Packet4us& a, const Packet4us& b) { return vmax_u16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet8us pmax<Packet8us>(const Packet8us& a, const Packet8us& b) { return vmaxq_u16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2i pmax<Packet2i>(const Packet2i& a, const Packet2i& b) { return vmax_s32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pmax<Packet4i>(const Packet4i& a, const Packet4i& b) { return vmaxq_s32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ui pmax<Packet2ui>(const Packet2ui& a, const Packet2ui& b) { return vmax_u32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4ui pmax<Packet4ui>(const Packet4ui& a, const Packet4ui& b) { return vmaxq_u32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2l pmax<Packet2l>(const Packet2l& a, const Packet2l& b) {\n  return vcombine_s64(\n      vdup_n_s64((std::max)(vgetq_lane_s64(a, 0), vgetq_lane_s64(b, 0))),\n      vdup_n_s64((std::max)(vgetq_lane_s64(a, 1), vgetq_lane_s64(b, 1))));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet2ul pmax<Packet2ul>(const Packet2ul& a, const Packet2ul& b) {\n  return vcombine_u64(\n      vdup_n_u64((std::max)(vgetq_lane_u64(a, 0), vgetq_lane_u64(b, 0))),\n      vdup_n_u64((std::max)(vgetq_lane_u64(a, 1), vgetq_lane_u64(b, 1))));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2f pcmp_le<Packet2f>(const Packet2f& a, const Packet2f& b)\n{ return vreinterpret_f32_u32(vcle_f32(a,b)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pcmp_le<Packet4f>(const Packet4f& a, const Packet4f& b)\n{ return vreinterpretq_f32_u32(vcleq_f32(a,b)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4c pcmp_le<Packet4c>(const Packet4c& a, const Packet4c& b)\n{\n  return vget_lane_s32(vreinterpret_s32_u8(vcle_s8(\n      vreinterpret_s8_s32(vdup_n_s32(a)),\n      vreinterpret_s8_s32(vdup_n_s32(b)))), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8c pcmp_le<Packet8c>(const Packet8c& a, const Packet8c& b)\n{ return vreinterpret_s8_u8(vcle_s8(a,b)); }\ntemplate<> EIGEN_STRONG_INLINE Packet16c pcmp_le<Packet16c>(const Packet16c& a, const Packet16c& b)\n{ return vreinterpretq_s8_u8(vcleq_s8(a,b)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4uc pcmp_le<Packet4uc>(const Packet4uc& a, const Packet4uc& b)\n{\n  return vget_lane_u32(vreinterpret_u32_u8(vcle_u8(\n      vreinterpret_u8_u32(vdup_n_u32(a)),\n      vreinterpret_u8_u32(vdup_n_u32(b)))), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8uc pcmp_le<Packet8uc>(const Packet8uc& a, const Packet8uc& b)\n{ return vcle_u8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet16uc pcmp_le<Packet16uc>(const Packet16uc& a, const Packet16uc& b)\n{ return vcleq_u8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4s pcmp_le<Packet4s>(const Packet4s& a, const Packet4s& b)\n{ return vreinterpret_s16_u16(vcle_s16(a,b)); }\ntemplate<> EIGEN_STRONG_INLINE Packet8s pcmp_le<Packet8s>(const Packet8s& a, const Packet8s& b)\n{ return vreinterpretq_s16_u16(vcleq_s16(a,b)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4us pcmp_le<Packet4us>(const Packet4us& a, const Packet4us& b)\n{ return vcle_u16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet8us pcmp_le<Packet8us>(const Packet8us& a, const Packet8us& b)\n{ return vcleq_u16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2i pcmp_le<Packet2i>(const Packet2i& a, const Packet2i& b)\n{ return vreinterpret_s32_u32(vcle_s32(a,b)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pcmp_le<Packet4i>(const Packet4i& a, const Packet4i& b)\n{ return vreinterpretq_s32_u32(vcleq_s32(a,b)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ui pcmp_le<Packet2ui>(const Packet2ui& a, const Packet2ui& b)\n{ return vcle_u32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4ui pcmp_le<Packet4ui>(const Packet4ui& a, const Packet4ui& b)\n{ return vcleq_u32(a,b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2f pcmp_lt<Packet2f>(const Packet2f& a, const Packet2f& b)\n{ return vreinterpret_f32_u32(vclt_f32(a,b)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pcmp_lt<Packet4f>(const Packet4f& a, const Packet4f& b)\n{ return vreinterpretq_f32_u32(vcltq_f32(a,b)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4c pcmp_lt<Packet4c>(const Packet4c& a, const Packet4c& b)\n{\n  return vget_lane_s32(vreinterpret_s32_u8(vclt_s8(\n      vreinterpret_s8_s32(vdup_n_s32(a)),\n      vreinterpret_s8_s32(vdup_n_s32(b)))), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8c pcmp_lt<Packet8c>(const Packet8c& a, const Packet8c& b)\n{ return vreinterpret_s8_u8(vclt_s8(a,b)); }\ntemplate<> EIGEN_STRONG_INLINE Packet16c pcmp_lt<Packet16c>(const Packet16c& a, const Packet16c& b)\n{ return vreinterpretq_s8_u8(vcltq_s8(a,b)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4uc pcmp_lt<Packet4uc>(const Packet4uc& a, const Packet4uc& b)\n{\n  return vget_lane_u32(vreinterpret_u32_u8(vclt_u8(\n      vreinterpret_u8_u32(vdup_n_u32(a)),\n      vreinterpret_u8_u32(vdup_n_u32(b)))), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8uc pcmp_lt<Packet8uc>(const Packet8uc& a, const Packet8uc& b)\n{ return vclt_u8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet16uc pcmp_lt<Packet16uc>(const Packet16uc& a, const Packet16uc& b)\n{ return vcltq_u8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4s pcmp_lt<Packet4s>(const Packet4s& a, const Packet4s& b)\n{ return vreinterpret_s16_u16(vclt_s16(a,b)); }\ntemplate<> EIGEN_STRONG_INLINE Packet8s pcmp_lt<Packet8s>(const Packet8s& a, const Packet8s& b)\n{ return vreinterpretq_s16_u16(vcltq_s16(a,b)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4us pcmp_lt<Packet4us>(const Packet4us& a, const Packet4us& b)\n{ return vclt_u16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet8us pcmp_lt<Packet8us>(const Packet8us& a, const Packet8us& b)\n{ return vcltq_u16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2i pcmp_lt<Packet2i>(const Packet2i& a, const Packet2i& b)\n{ return vreinterpret_s32_u32(vclt_s32(a,b)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pcmp_lt<Packet4i>(const Packet4i& a, const Packet4i& b)\n{ return vreinterpretq_s32_u32(vcltq_s32(a,b)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ui pcmp_lt<Packet2ui>(const Packet2ui& a, const Packet2ui& b)\n{ return vclt_u32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4ui pcmp_lt<Packet4ui>(const Packet4ui& a, const Packet4ui& b)\n{ return vcltq_u32(a,b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2f pcmp_eq<Packet2f>(const Packet2f& a, const Packet2f& b)\n{ return vreinterpret_f32_u32(vceq_f32(a,b)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pcmp_eq<Packet4f>(const Packet4f& a, const Packet4f& b)\n{ return vreinterpretq_f32_u32(vceqq_f32(a,b)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4c pcmp_eq<Packet4c>(const Packet4c& a, const Packet4c& b)\n{\n  return vget_lane_s32(vreinterpret_s32_u8(vceq_s8(\n      vreinterpret_s8_s32(vdup_n_s32(a)),\n      vreinterpret_s8_s32(vdup_n_s32(b)))), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8c pcmp_eq<Packet8c>(const Packet8c& a, const Packet8c& b)\n{ return vreinterpret_s8_u8(vceq_s8(a,b)); }\ntemplate<> EIGEN_STRONG_INLINE Packet16c pcmp_eq<Packet16c>(const Packet16c& a, const Packet16c& b)\n{ return vreinterpretq_s8_u8(vceqq_s8(a,b)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4uc pcmp_eq<Packet4uc>(const Packet4uc& a, const Packet4uc& b)\n{\n  return vget_lane_u32(vreinterpret_u32_u8(vceq_u8(\n      vreinterpret_u8_u32(vdup_n_u32(a)),\n      vreinterpret_u8_u32(vdup_n_u32(b)))), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8uc pcmp_eq<Packet8uc>(const Packet8uc& a, const Packet8uc& b)\n{ return vceq_u8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet16uc pcmp_eq<Packet16uc>(const Packet16uc& a, const Packet16uc& b)\n{ return vceqq_u8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4s pcmp_eq<Packet4s>(const Packet4s& a, const Packet4s& b)\n{ return vreinterpret_s16_u16(vceq_s16(a,b)); }\ntemplate<> EIGEN_STRONG_INLINE Packet8s pcmp_eq<Packet8s>(const Packet8s& a, const Packet8s& b)\n{ return vreinterpretq_s16_u16(vceqq_s16(a,b)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4us pcmp_eq<Packet4us>(const Packet4us& a, const Packet4us& b)\n{ return vceq_u16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet8us pcmp_eq<Packet8us>(const Packet8us& a, const Packet8us& b)\n{ return vceqq_u16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2i pcmp_eq<Packet2i>(const Packet2i& a, const Packet2i& b)\n{ return vreinterpret_s32_u32(vceq_s32(a,b)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pcmp_eq<Packet4i>(const Packet4i& a, const Packet4i& b)\n{ return vreinterpretq_s32_u32(vceqq_s32(a,b)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ui pcmp_eq<Packet2ui>(const Packet2ui& a, const Packet2ui& b)\n{ return vceq_u32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4ui pcmp_eq<Packet4ui>(const Packet4ui& a, const Packet4ui& b)\n{ return vceqq_u32(a,b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2f pcmp_lt_or_nan<Packet2f>(const Packet2f& a, const Packet2f& b)\n{ return vreinterpret_f32_u32(vmvn_u32(vcge_f32(a,b))); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pcmp_lt_or_nan<Packet4f>(const Packet4f& a, const Packet4f& b)\n{ return vreinterpretq_f32_u32(vmvnq_u32(vcgeq_f32(a,b))); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2f pfloor<Packet2f>(const Packet2f& a)\n{\n  const Packet2f cst_1 = pset1<Packet2f>(1.0f);\n  /* perform a floorf */\n  Packet2f tmp = vcvt_f32_s32(vcvt_s32_f32(a));\n\n  /* if greater, substract 1 */\n  Packet2ui mask = vcgt_f32(tmp, a);\n  mask = vand_u32(mask, vreinterpret_u32_f32(cst_1));\n  return vsub_f32(tmp, vreinterpret_f32_u32(mask));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4f pfloor<Packet4f>(const Packet4f& a)\n{\n  const Packet4f cst_1 = pset1<Packet4f>(1.0f);\n  /* perform a floorf */\n  Packet4f tmp = vcvtq_f32_s32(vcvtq_s32_f32(a));\n\n  /* if greater, substract 1 */\n  Packet4ui mask = vcgtq_f32(tmp, a);\n  mask = vandq_u32(mask, vreinterpretq_u32_f32(cst_1));\n  return vsubq_f32(tmp, vreinterpretq_f32_u32(mask));\n}\n\n// Logical Operations are not supported for float, so we have to reinterpret casts using NEON intrinsics\ntemplate<> EIGEN_STRONG_INLINE Packet2f pand<Packet2f>(const Packet2f& a, const Packet2f& b)\n{ return vreinterpret_f32_u32(vand_u32(vreinterpret_u32_f32(a),vreinterpret_u32_f32(b))); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pand<Packet4f>(const Packet4f& a, const Packet4f& b)\n{ return vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(a),vreinterpretq_u32_f32(b))); }\ntemplate<> EIGEN_STRONG_INLINE Packet4c pand<Packet4c>(const Packet4c& a, const Packet4c& b)\n{ return a & b; }\ntemplate<> EIGEN_STRONG_INLINE Packet8c pand<Packet8c>(const Packet8c& a, const Packet8c& b)\n{ return vand_s8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet16c pand<Packet16c>(const Packet16c& a, const Packet16c& b)\n{ return vandq_s8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4uc pand<Packet4uc>(const Packet4uc& a, const Packet4uc& b)\n{ return a & b; }\ntemplate<> EIGEN_STRONG_INLINE Packet8uc pand<Packet8uc>(const Packet8uc& a, const Packet8uc& b)\n{ return vand_u8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet16uc pand<Packet16uc>(const Packet16uc& a, const Packet16uc& b)\n{ return vandq_u8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4s pand<Packet4s>(const Packet4s& a, const Packet4s& b) { return vand_s16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet8s pand<Packet8s>(const Packet8s& a, const Packet8s& b) { return vandq_s16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4us pand<Packet4us>(const Packet4us& a, const Packet4us& b)\n{ return vand_u16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet8us pand<Packet8us>(const Packet8us& a, const Packet8us& b)\n{ return vandq_u16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2i pand<Packet2i>(const Packet2i& a, const Packet2i& b) { return vand_s32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pand<Packet4i>(const Packet4i& a, const Packet4i& b) { return vandq_s32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ui pand<Packet2ui>(const Packet2ui& a, const Packet2ui& b)\n{ return vand_u32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4ui pand<Packet4ui>(const Packet4ui& a, const Packet4ui& b)\n{ return vandq_u32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2l pand<Packet2l>(const Packet2l& a, const Packet2l& b) { return vandq_s64(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ul pand<Packet2ul>(const Packet2ul& a, const Packet2ul& b)\n{ return vandq_u64(a,b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2f por<Packet2f>(const Packet2f& a, const Packet2f& b)\n{ return vreinterpret_f32_u32(vorr_u32(vreinterpret_u32_f32(a),vreinterpret_u32_f32(b))); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f por<Packet4f>(const Packet4f& a, const Packet4f& b)\n{ return vreinterpretq_f32_u32(vorrq_u32(vreinterpretq_u32_f32(a),vreinterpretq_u32_f32(b))); }\ntemplate<> EIGEN_STRONG_INLINE Packet4c por<Packet4c>(const Packet4c& a, const Packet4c& b)\n{ return a | b; }\ntemplate<> EIGEN_STRONG_INLINE Packet8c por<Packet8c>(const Packet8c& a, const Packet8c& b) { return vorr_s8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet16c por<Packet16c>(const Packet16c& a, const Packet16c& b)\n{ return vorrq_s8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4uc por<Packet4uc>(const Packet4uc& a, const Packet4uc& b)\n{ return a | b; }\ntemplate<> EIGEN_STRONG_INLINE Packet8uc por<Packet8uc>(const Packet8uc& a, const Packet8uc& b)\n{ return vorr_u8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet16uc por<Packet16uc>(const Packet16uc& a, const Packet16uc& b)\n{ return vorrq_u8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4s por<Packet4s>(const Packet4s& a, const Packet4s& b)\n{ return vorr_s16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet8s por<Packet8s>(const Packet8s& a, const Packet8s& b)\n{ return vorrq_s16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4us por<Packet4us>(const Packet4us& a, const Packet4us& b)\n{ return vorr_u16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet8us por<Packet8us>(const Packet8us& a, const Packet8us& b)\n{ return vorrq_u16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2i por<Packet2i>(const Packet2i& a, const Packet2i& b) { return vorr_s32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i por<Packet4i>(const Packet4i& a, const Packet4i& b) { return vorrq_s32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ui por<Packet2ui>(const Packet2ui& a, const Packet2ui& b)\n{ return vorr_u32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4ui por<Packet4ui>(const Packet4ui& a, const Packet4ui& b)\n{ return vorrq_u32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2l por<Packet2l>(const Packet2l& a, const Packet2l& b)\n{ return vorrq_s64(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ul por<Packet2ul>(const Packet2ul& a, const Packet2ul& b)\n{ return vorrq_u64(a,b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2f pxor<Packet2f>(const Packet2f& a, const Packet2f& b)\n{ return vreinterpret_f32_u32(veor_u32(vreinterpret_u32_f32(a),vreinterpret_u32_f32(b))); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pxor<Packet4f>(const Packet4f& a, const Packet4f& b)\n{ return vreinterpretq_f32_u32(veorq_u32(vreinterpretq_u32_f32(a),vreinterpretq_u32_f32(b))); }\ntemplate<> EIGEN_STRONG_INLINE Packet4c pxor<Packet4c>(const Packet4c& a, const Packet4c& b)\n{ return a ^ b; }\ntemplate<> EIGEN_STRONG_INLINE Packet8c pxor<Packet8c>(const Packet8c& a, const Packet8c& b)\n{ return veor_s8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet16c pxor<Packet16c>(const Packet16c& a, const Packet16c& b)\n{ return veorq_s8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4uc pxor<Packet4uc>(const Packet4uc& a, const Packet4uc& b)\n{ return a ^ b; }\ntemplate<> EIGEN_STRONG_INLINE Packet8uc pxor<Packet8uc>(const Packet8uc& a, const Packet8uc& b)\n{ return veor_u8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet16uc pxor<Packet16uc>(const Packet16uc& a, const Packet16uc& b)\n{ return veorq_u8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4s pxor<Packet4s>(const Packet4s& a, const Packet4s& b) { return veor_s16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet8s pxor<Packet8s>(const Packet8s& a, const Packet8s& b) { return veorq_s16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4us pxor<Packet4us>(const Packet4us& a, const Packet4us& b)\n{ return veor_u16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet8us pxor<Packet8us>(const Packet8us& a, const Packet8us& b)\n{ return veorq_u16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2i pxor<Packet2i>(const Packet2i& a, const Packet2i& b) { return veor_s32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pxor<Packet4i>(const Packet4i& a, const Packet4i& b) { return veorq_s32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ui pxor<Packet2ui>(const Packet2ui& a, const Packet2ui& b)\n{ return veor_u32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4ui pxor<Packet4ui>(const Packet4ui& a, const Packet4ui& b)\n{ return veorq_u32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2l pxor<Packet2l>(const Packet2l& a, const Packet2l& b)\n{ return veorq_s64(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ul pxor<Packet2ul>(const Packet2ul& a, const Packet2ul& b)\n{ return veorq_u64(a,b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2f pandnot<Packet2f>(const Packet2f& a, const Packet2f& b)\n{ return vreinterpret_f32_u32(vbic_u32(vreinterpret_u32_f32(a),vreinterpret_u32_f32(b))); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pandnot<Packet4f>(const Packet4f& a, const Packet4f& b)\n{ return vreinterpretq_f32_u32(vbicq_u32(vreinterpretq_u32_f32(a),vreinterpretq_u32_f32(b))); }\ntemplate<> EIGEN_STRONG_INLINE Packet4c pandnot<Packet4c>(const Packet4c& a, const Packet4c& b)\n{ return a & ~b; }\ntemplate<> EIGEN_STRONG_INLINE Packet8c pandnot<Packet8c>(const Packet8c& a, const Packet8c& b) { return vbic_s8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet16c pandnot<Packet16c>(const Packet16c& a, const Packet16c& b) { return vbicq_s8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4uc pandnot<Packet4uc>(const Packet4uc& a, const Packet4uc& b)\n{ return a & ~b; }\ntemplate<> EIGEN_STRONG_INLINE Packet8uc pandnot<Packet8uc>(const Packet8uc& a, const Packet8uc& b)\n{ return vbic_u8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet16uc pandnot<Packet16uc>(const Packet16uc& a, const Packet16uc& b)\n{ return vbicq_u8(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4s pandnot<Packet4s>(const Packet4s& a, const Packet4s& b)\n{ return vbic_s16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet8s pandnot<Packet8s>(const Packet8s& a, const Packet8s& b)\n{ return vbicq_s16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4us pandnot<Packet4us>(const Packet4us& a, const Packet4us& b)\n{ return vbic_u16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet8us pandnot<Packet8us>(const Packet8us& a, const Packet8us& b)\n{ return vbicq_u16(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2i pandnot<Packet2i>(const Packet2i& a, const Packet2i& b)\n{ return vbic_s32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pandnot<Packet4i>(const Packet4i& a, const Packet4i& b)\n{ return vbicq_s32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ui pandnot<Packet2ui>(const Packet2ui& a, const Packet2ui& b)\n{ return vbic_u32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4ui pandnot<Packet4ui>(const Packet4ui& a, const Packet4ui& b)\n{ return vbicq_u32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2l pandnot<Packet2l>(const Packet2l& a, const Packet2l& b)\n{ return vbicq_s64(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ul pandnot<Packet2ul>(const Packet2ul& a, const Packet2ul& b)\n{ return vbicq_u64(a,b); }\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet2f pnot<Packet2f>(const Packet2f& a)\n{ return vreinterpret_f32_u32(vmvn_u32(vreinterpret_u32_f32(a))); }\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4f pnot<Packet4f>(const Packet4f& a)\n{ return vreinterpretq_f32_u32(vmvnq_u32(vreinterpretq_u32_f32(a))); }\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4c pnot<Packet4c>(const Packet4c& a)\n{ return ~a; }\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet8c pnot<Packet8c>(const Packet8c& a)\n{ return vmvn_s8(a); }\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet16c pnot<Packet16c>(const Packet16c& a)\n{ return vmvnq_s8(a); }\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4uc pnot<Packet4uc>(const Packet4uc& a)\n{ return ~a; }\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet8uc pnot<Packet8uc>(const Packet8uc& a)\n{ return vmvn_u8(a); }\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet16uc pnot<Packet16uc>(const Packet16uc& a)\n{ return vmvnq_u8(a); }\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4s pnot<Packet4s>(const Packet4s& a)\n{ return vmvn_s16(a); }\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet8s pnot<Packet8s>(const Packet8s& a)\n{ return vmvnq_s16(a); }\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4us pnot<Packet4us>(const Packet4us& a)\n{ return vmvn_u16(a); }\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet8us pnot<Packet8us>(const Packet8us& a)\n{ return vmvnq_u16(a); }\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet2i pnot<Packet2i>(const Packet2i& a)\n{ return vmvn_s32(a); }\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4i pnot<Packet4i>(const Packet4i& a)\n{ return vmvnq_s32(a); }\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet2ui pnot<Packet2ui>(const Packet2ui& a)\n{ return vmvn_u32(a); }\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4ui pnot<Packet4ui>(const Packet4ui& a)\n{ return vmvnq_u32(a); }\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet2l pnot<Packet2l>(const Packet2l& a)\n{ return vreinterpretq_s64_s32(vmvnq_s32(vreinterpretq_s32_s64(a))); }\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet2ul pnot<Packet2ul>(const Packet2ul& a)\n{ return vreinterpretq_u64_u32(vmvnq_u32(vreinterpretq_u32_u64(a))); }\n\ntemplate<int N> EIGEN_STRONG_INLINE Packet4c parithmetic_shift_right(Packet4c& a)\n{ return vget_lane_s32(vreinterpret_s32_s8(vshr_n_s8(vreinterpret_s8_s32(vdup_n_s32(a)), N)), 0); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet8c parithmetic_shift_right(Packet8c a) { return vshr_n_s8(a,N); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet16c parithmetic_shift_right(Packet16c a) { return vshrq_n_s8(a,N); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet4uc parithmetic_shift_right(Packet4uc& a)\n{ return vget_lane_u32(vreinterpret_u32_u8(vshr_n_u8(vreinterpret_u8_u32(vdup_n_u32(a)), N)), 0); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet8uc parithmetic_shift_right(Packet8uc a) { return vshr_n_u8(a,N); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet16uc parithmetic_shift_right(Packet16uc a) { return vshrq_n_u8(a,N); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet4s parithmetic_shift_right(Packet4s a) { return vshr_n_s16(a,N); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet8s parithmetic_shift_right(Packet8s a) { return vshrq_n_s16(a,N); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet4us parithmetic_shift_right(Packet4us a) { return vshr_n_u16(a,N); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet8us parithmetic_shift_right(Packet8us a) { return vshrq_n_u16(a,N); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet2i parithmetic_shift_right(Packet2i a) { return vshr_n_s32(a,N); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet4i parithmetic_shift_right(Packet4i a) { return vshrq_n_s32(a,N); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet2ui parithmetic_shift_right(Packet2ui a) { return vshr_n_u32(a,N); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet4ui parithmetic_shift_right(Packet4ui a) { return vshrq_n_u32(a,N); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet2l parithmetic_shift_right(Packet2l a) { return vshrq_n_s64(a,N); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet2ul parithmetic_shift_right(Packet2ul a) { return vshrq_n_u64(a,N); }\n\ntemplate<int N> EIGEN_STRONG_INLINE Packet4c plogical_shift_right(Packet4c& a)\n{ return vget_lane_s32(vreinterpret_s32_u8(vshr_n_u8(vreinterpret_u8_s32(vdup_n_s32(a)), N)), 0); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet8c plogical_shift_right(Packet8c a)\n{ return vreinterpret_s8_u8(vshr_n_u8(vreinterpret_u8_s8(a),N)); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet16c plogical_shift_right(Packet16c a)\n{ return vreinterpretq_s8_u8(vshrq_n_u8(vreinterpretq_u8_s8(a),N)); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet4uc plogical_shift_right(Packet4uc& a)\n{ return vget_lane_u32(vreinterpret_u32_s8(vshr_n_s8(vreinterpret_s8_u32(vdup_n_u32(a)), N)), 0); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet8uc plogical_shift_right(Packet8uc a) { return vshr_n_u8(a,N); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet16uc plogical_shift_right(Packet16uc a) { return vshrq_n_u8(a,N); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet4s plogical_shift_right(Packet4s a)\n{ return vreinterpret_s16_u16(vshr_n_u16(vreinterpret_u16_s16(a),N)); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet8s plogical_shift_right(Packet8s a)\n{ return vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(a),N)); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet4us plogical_shift_right(Packet4us a) { return vshr_n_u16(a,N); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet8us plogical_shift_right(Packet8us a) { return vshrq_n_u16(a,N); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet2i plogical_shift_right(Packet2i a)\n{ return vreinterpret_s32_u32(vshr_n_u32(vreinterpret_u32_s32(a),N)); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet4i plogical_shift_right(Packet4i a)\n{ return vreinterpretq_s32_u32(vshrq_n_u32(vreinterpretq_u32_s32(a),N)); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet2ui plogical_shift_right(Packet2ui a) { return vshr_n_u32(a,N); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet4ui plogical_shift_right(Packet4ui a) { return vshrq_n_u32(a,N); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet2l plogical_shift_right(Packet2l a)\n{ return vreinterpretq_s64_u64(vshrq_n_u64(vreinterpretq_u64_s64(a),N)); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet2ul plogical_shift_right(Packet2ul a) { return vshrq_n_u64(a,N); }\n\ntemplate<int N> EIGEN_STRONG_INLINE Packet4c plogical_shift_left(Packet4c& a)\n{ return vget_lane_s32(vreinterpret_s32_s8(vshl_n_s8(vreinterpret_s8_s32(vdup_n_s32(a)), N)), 0); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet8c plogical_shift_left(Packet8c a) { return vshl_n_s8(a,N); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet16c plogical_shift_left(Packet16c a) { return vshlq_n_s8(a,N); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet4uc plogical_shift_left(Packet4uc& a)\n{ return vget_lane_u32(vreinterpret_u32_u8(vshl_n_u8(vreinterpret_u8_u32(vdup_n_u32(a)), N)), 0); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet8uc plogical_shift_left(Packet8uc a) { return vshl_n_u8(a,N); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet16uc plogical_shift_left(Packet16uc a) { return vshlq_n_u8(a,N); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet4s plogical_shift_left(Packet4s a) { return vshl_n_s16(a,N); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet8s plogical_shift_left(Packet8s a) { return vshlq_n_s16(a,N); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet4us plogical_shift_left(Packet4us a) { return vshl_n_u16(a,N); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet8us plogical_shift_left(Packet8us a) { return vshlq_n_u16(a,N); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet2i plogical_shift_left(Packet2i a) { return vshl_n_s32(a,N); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet4i plogical_shift_left(Packet4i a) { return vshlq_n_s32(a,N); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet2ui plogical_shift_left(Packet2ui a) { return vshl_n_u32(a,N); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet4ui plogical_shift_left(Packet4ui a) { return vshlq_n_u32(a,N); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet2l plogical_shift_left(Packet2l a) { return vshlq_n_s64(a,N); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet2ul plogical_shift_left(Packet2ul a) { return vshlq_n_u64(a,N); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2f pload<Packet2f>(const float* from)\n{ EIGEN_DEBUG_ALIGNED_LOAD return vld1_f32(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pload<Packet4f>(const float* from)\n{ EIGEN_DEBUG_ALIGNED_LOAD return vld1q_f32(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet4c pload<Packet4c>(const int8_t* from)\n{\n  Packet4c res;\n  memcpy(&res, from, sizeof(Packet4c));\n  return res;\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8c pload<Packet8c>(const int8_t* from)\n{ EIGEN_DEBUG_ALIGNED_LOAD return vld1_s8(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet16c pload<Packet16c>(const int8_t* from)\n{ EIGEN_DEBUG_ALIGNED_LOAD return vld1q_s8(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet4uc pload<Packet4uc>(const uint8_t* from)\n{\n  Packet4uc res;\n  memcpy(&res, from, sizeof(Packet4uc));\n  return res;\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8uc pload<Packet8uc>(const uint8_t* from)\n{ EIGEN_DEBUG_ALIGNED_LOAD return vld1_u8(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet16uc pload<Packet16uc>(const uint8_t* from)\n{ EIGEN_DEBUG_ALIGNED_LOAD return vld1q_u8(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet4s pload<Packet4s>(const int16_t* from)\n{ EIGEN_DEBUG_ALIGNED_LOAD return vld1_s16(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet8s pload<Packet8s>(const int16_t* from)\n{ EIGEN_DEBUG_ALIGNED_LOAD return vld1q_s16(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet4us pload<Packet4us>(const uint16_t* from)\n{ EIGEN_DEBUG_ALIGNED_LOAD return vld1_u16(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet8us pload<Packet8us>(const uint16_t* from)\n{ EIGEN_DEBUG_ALIGNED_LOAD return vld1q_u16(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet2i pload<Packet2i>(const int32_t* from)\n{ EIGEN_DEBUG_ALIGNED_LOAD return vld1_s32(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pload<Packet4i>(const int32_t* from)\n{ EIGEN_DEBUG_ALIGNED_LOAD return vld1q_s32(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ui pload<Packet2ui>(const uint32_t* from)\n{ EIGEN_DEBUG_ALIGNED_LOAD return vld1_u32(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet4ui pload<Packet4ui>(const uint32_t* from)\n{ EIGEN_DEBUG_ALIGNED_LOAD return vld1q_u32(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet2l pload<Packet2l>(const int64_t* from)\n{ EIGEN_DEBUG_ALIGNED_LOAD return vld1q_s64(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ul pload<Packet2ul>(const uint64_t* from)\n{ EIGEN_DEBUG_ALIGNED_LOAD return vld1q_u64(from); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2f ploadu<Packet2f>(const float* from)\n{ EIGEN_DEBUG_UNALIGNED_LOAD return vld1_f32(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f ploadu<Packet4f>(const float* from)\n{ EIGEN_DEBUG_UNALIGNED_LOAD return vld1q_f32(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet4c ploadu<Packet4c>(const int8_t* from)\n{\n  Packet4c res;\n  memcpy(&res, from, sizeof(Packet4c));\n  return res;\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8c ploadu<Packet8c>(const int8_t* from)\n{ EIGEN_DEBUG_UNALIGNED_LOAD return vld1_s8(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet16c ploadu<Packet16c>(const int8_t* from)\n{ EIGEN_DEBUG_UNALIGNED_LOAD return vld1q_s8(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet4uc ploadu<Packet4uc>(const uint8_t* from)\n{\n  Packet4uc res;\n  memcpy(&res, from, sizeof(Packet4uc));\n  return res;\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8uc ploadu<Packet8uc>(const uint8_t* from)\n{ EIGEN_DEBUG_UNALIGNED_LOAD return vld1_u8(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet16uc ploadu<Packet16uc>(const uint8_t* from)\n{ EIGEN_DEBUG_UNALIGNED_LOAD return vld1q_u8(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet4s ploadu<Packet4s>(const int16_t* from)\n{ EIGEN_DEBUG_UNALIGNED_LOAD return vld1_s16(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet8s ploadu<Packet8s>(const int16_t* from)\n{ EIGEN_DEBUG_UNALIGNED_LOAD return vld1q_s16(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet4us ploadu<Packet4us>(const uint16_t* from)\n{ EIGEN_DEBUG_UNALIGNED_LOAD return vld1_u16(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet8us ploadu<Packet8us>(const uint16_t* from)\n{ EIGEN_DEBUG_UNALIGNED_LOAD return vld1q_u16(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet2i ploadu<Packet2i>(const int32_t* from)\n{ EIGEN_DEBUG_UNALIGNED_LOAD return vld1_s32(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i ploadu<Packet4i>(const int32_t* from)\n{ EIGEN_DEBUG_UNALIGNED_LOAD return vld1q_s32(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ui ploadu<Packet2ui>(const uint32_t* from)\n{ EIGEN_DEBUG_UNALIGNED_LOAD return vld1_u32(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet4ui ploadu<Packet4ui>(const uint32_t* from)\n{ EIGEN_DEBUG_UNALIGNED_LOAD return vld1q_u32(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet2l ploadu<Packet2l>(const int64_t* from)\n{ EIGEN_DEBUG_UNALIGNED_LOAD return vld1q_s64(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ul ploadu<Packet2ul>(const uint64_t* from)\n{ EIGEN_DEBUG_UNALIGNED_LOAD return vld1q_u64(from); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2f ploaddup<Packet2f>(const float* from)\n{ return vld1_dup_f32(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f ploaddup<Packet4f>(const float* from)\n{ return vcombine_f32(vld1_dup_f32(from), vld1_dup_f32(from+1)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4c ploaddup<Packet4c>(const int8_t* from)\n{\n  const int8x8_t a = vreinterpret_s8_s32(vdup_n_s32(pload<Packet4c>(from)));\n  return vget_lane_s32(vreinterpret_s32_s8(vzip_s8(a,a).val[0]), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8c ploaddup<Packet8c>(const int8_t* from)\n{\n  const int8x8_t a = vld1_s8(from);\n  return vzip_s8(a,a).val[0];\n}\ntemplate<> EIGEN_STRONG_INLINE Packet16c ploaddup<Packet16c>(const int8_t* from)\n{\n  const int8x8_t a = vld1_s8(from);\n  const int8x8x2_t b = vzip_s8(a,a);\n  return vcombine_s8(b.val[0], b.val[1]);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4uc ploaddup<Packet4uc>(const uint8_t* from)\n{\n  const uint8x8_t a = vreinterpret_u8_u32(vdup_n_u32(pload<Packet4uc>(from)));\n  return vget_lane_u32(vreinterpret_u32_u8(vzip_u8(a,a).val[0]), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8uc ploaddup<Packet8uc>(const uint8_t* from)\n{\n  const uint8x8_t a = vld1_u8(from);\n  return vzip_u8(a,a).val[0];\n}\ntemplate<> EIGEN_STRONG_INLINE Packet16uc ploaddup<Packet16uc>(const uint8_t* from)\n{\n  const uint8x8_t a = vld1_u8(from);\n  const uint8x8x2_t b = vzip_u8(a,a);\n  return vcombine_u8(b.val[0], b.val[1]);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4s ploaddup<Packet4s>(const int16_t* from)\n{\n  return vreinterpret_s16_u32(vzip_u32(vreinterpret_u32_s16(vld1_dup_s16(from)),\n      vreinterpret_u32_s16(vld1_dup_s16(from+1))).val[0]);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8s ploaddup<Packet8s>(const int16_t* from)\n{\n  const int16x4_t a = vld1_s16(from);\n  const int16x4x2_t b = vzip_s16(a,a);\n  return vcombine_s16(b.val[0], b.val[1]);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4us ploaddup<Packet4us>(const uint16_t* from)\n{\n  return vreinterpret_u16_u32(vzip_u32(vreinterpret_u32_u16(vld1_dup_u16(from)),\n      vreinterpret_u32_u16(vld1_dup_u16(from+1))).val[0]);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8us ploaddup<Packet8us>(const uint16_t* from)\n{\n  const uint16x4_t a = vld1_u16(from);\n  const uint16x4x2_t b = vzip_u16(a,a);\n  return vcombine_u16(b.val[0], b.val[1]);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet2i ploaddup<Packet2i>(const int32_t* from)\n{ return vld1_dup_s32(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i ploaddup<Packet4i>(const int32_t* from)\n{ return vcombine_s32(vld1_dup_s32(from), vld1_dup_s32(from+1)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ui ploaddup<Packet2ui>(const uint32_t* from)\n{ return vld1_dup_u32(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet4ui ploaddup<Packet4ui>(const uint32_t* from)\n{ return vcombine_u32(vld1_dup_u32(from), vld1_dup_u32(from+1)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2l ploaddup<Packet2l>(const int64_t* from)\n{ return vld1q_dup_s64(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ul ploaddup<Packet2ul>(const uint64_t* from)\n{ return vld1q_dup_u64(from); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f ploadquad<Packet4f>(const float* from) { return vld1q_dup_f32(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet4c ploadquad<Packet4c>(const int8_t* from)\n{ return vget_lane_s32(vreinterpret_s32_s8(vld1_dup_s8(from)), 0); }\ntemplate<> EIGEN_STRONG_INLINE Packet8c ploadquad<Packet8c>(const int8_t* from)\n{\n  return vreinterpret_s8_u32(vzip_u32(\n      vreinterpret_u32_s8(vld1_dup_s8(from)),\n      vreinterpret_u32_s8(vld1_dup_s8(from+1))).val[0]);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet16c ploadquad<Packet16c>(const int8_t* from)\n{\n  const int8x8_t a = vreinterpret_s8_u32(vzip_u32(\n      vreinterpret_u32_s8(vld1_dup_s8(from)),\n      vreinterpret_u32_s8(vld1_dup_s8(from+1))).val[0]);\n  const int8x8_t b = vreinterpret_s8_u32(vzip_u32(\n      vreinterpret_u32_s8(vld1_dup_s8(from+2)),\n      vreinterpret_u32_s8(vld1_dup_s8(from+3))).val[0]);\n  return vcombine_s8(a,b);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4uc ploadquad<Packet4uc>(const uint8_t* from)\n{ return vget_lane_u32(vreinterpret_u32_u8(vld1_dup_u8(from)), 0); }\ntemplate<> EIGEN_STRONG_INLINE Packet8uc ploadquad<Packet8uc>(const uint8_t* from)\n{\n  return vreinterpret_u8_u32(vzip_u32(\n      vreinterpret_u32_u8(vld1_dup_u8(from)),\n      vreinterpret_u32_u8(vld1_dup_u8(from+1))).val[0]);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet16uc ploadquad<Packet16uc>(const uint8_t* from)\n{\n  const uint8x8_t a = vreinterpret_u8_u32(vzip_u32(\n      vreinterpret_u32_u8(vld1_dup_u8(from)),\n      vreinterpret_u32_u8(vld1_dup_u8(from+1))).val[0]);\n  const uint8x8_t b = vreinterpret_u8_u32(vzip_u32(\n      vreinterpret_u32_u8(vld1_dup_u8(from+2)),\n      vreinterpret_u32_u8(vld1_dup_u8(from+3))).val[0]);\n  return vcombine_u8(a,b);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8s ploadquad<Packet8s>(const int16_t* from)\n{ return vcombine_s16(vld1_dup_s16(from), vld1_dup_s16(from+1)); }\ntemplate<> EIGEN_STRONG_INLINE Packet8us ploadquad<Packet8us>(const uint16_t* from)\n{ return vcombine_u16(vld1_dup_u16(from), vld1_dup_u16(from+1)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i ploadquad<Packet4i>(const int32_t* from) { return vld1q_dup_s32(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet4ui ploadquad<Packet4ui>(const uint32_t* from) { return vld1q_dup_u32(from); }\n\ntemplate<> EIGEN_STRONG_INLINE void pstore<float>(float* to, const Packet2f& from)\n{ EIGEN_DEBUG_ALIGNED_STORE vst1_f32(to,from); }\ntemplate<> EIGEN_STRONG_INLINE void pstore<float>(float* to, const Packet4f& from)\n{ EIGEN_DEBUG_ALIGNED_STORE vst1q_f32(to,from); }\ntemplate<> EIGEN_STRONG_INLINE void pstore<int8_t>(int8_t* to, const Packet4c& from)\n{ memcpy(to, &from, sizeof(from)); }\ntemplate<> EIGEN_STRONG_INLINE void pstore<int8_t>(int8_t* to, const Packet8c& from)\n{ EIGEN_DEBUG_ALIGNED_STORE vst1_s8(to,from); }\ntemplate<> EIGEN_STRONG_INLINE void pstore<int8_t>(int8_t* to, const Packet16c& from)\n{ EIGEN_DEBUG_ALIGNED_STORE vst1q_s8(to,from); }\ntemplate<> EIGEN_STRONG_INLINE void pstore<uint8_t>(uint8_t* to, const Packet4uc& from)\n{ memcpy(to, &from, sizeof(from)); }\ntemplate<> EIGEN_STRONG_INLINE void pstore<uint8_t>(uint8_t* to, const Packet8uc& from)\n{ EIGEN_DEBUG_ALIGNED_STORE vst1_u8(to,from); }\ntemplate<> EIGEN_STRONG_INLINE void pstore<uint8_t>(uint8_t* to, const Packet16uc& from)\n{ EIGEN_DEBUG_ALIGNED_STORE vst1q_u8(to,from); }\ntemplate<> EIGEN_STRONG_INLINE void pstore<int16_t>(int16_t* to, const Packet4s& from)\n{ EIGEN_DEBUG_ALIGNED_STORE vst1_s16(to,from); }\ntemplate<> EIGEN_STRONG_INLINE void pstore<int16_t>(int16_t* to, const Packet8s& from)\n{ EIGEN_DEBUG_ALIGNED_STORE vst1q_s16(to,from); }\ntemplate<> EIGEN_STRONG_INLINE void pstore<uint16_t>(uint16_t* to, const Packet4us& from)\n{ EIGEN_DEBUG_ALIGNED_STORE vst1_u16(to,from); }\ntemplate<> EIGEN_STRONG_INLINE void pstore<uint16_t>(uint16_t* to, const Packet8us& from)\n{ EIGEN_DEBUG_ALIGNED_STORE vst1q_u16(to,from); }\ntemplate<> EIGEN_STRONG_INLINE void pstore<int32_t>(int32_t* to, const Packet2i& from)\n{ EIGEN_DEBUG_ALIGNED_STORE vst1_s32(to,from); }\ntemplate<> EIGEN_STRONG_INLINE void pstore<int32_t>(int32_t* to, const Packet4i& from)\n{ EIGEN_DEBUG_ALIGNED_STORE vst1q_s32(to,from); }\ntemplate<> EIGEN_STRONG_INLINE void pstore<uint32_t>(uint32_t* to, const Packet2ui& from)\n{ EIGEN_DEBUG_ALIGNED_STORE vst1_u32(to,from); }\ntemplate<> EIGEN_STRONG_INLINE void pstore<uint32_t>(uint32_t* to, const Packet4ui& from)\n{ EIGEN_DEBUG_ALIGNED_STORE vst1q_u32(to,from); }\ntemplate<> EIGEN_STRONG_INLINE void pstore<int64_t>(int64_t* to, const Packet2l& from)\n{ EIGEN_DEBUG_ALIGNED_STORE vst1q_s64(to,from); }\ntemplate<> EIGEN_STRONG_INLINE void pstore<uint64_t>(uint64_t* to, const Packet2ul& from)\n{ EIGEN_DEBUG_ALIGNED_STORE vst1q_u64(to,from); }\n\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<float>(float* to, const Packet2f& from)\n{ EIGEN_DEBUG_UNALIGNED_STORE vst1_f32(to,from); }\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<float>(float* to, const Packet4f& from)\n{ EIGEN_DEBUG_UNALIGNED_STORE vst1q_f32(to,from); }\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<int8_t>(int8_t* to, const Packet4c& from)\n{ memcpy(to, &from, sizeof(from)); }\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<int8_t>(int8_t* to, const Packet8c& from)\n{ EIGEN_DEBUG_UNALIGNED_STORE vst1_s8(to,from); }\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<int8_t>(int8_t* to, const Packet16c& from)\n{ EIGEN_DEBUG_UNALIGNED_STORE vst1q_s8(to,from); }\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<uint8_t>(uint8_t* to, const Packet4uc& from)\n{ memcpy(to, &from, sizeof(from)); }\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<uint8_t>(uint8_t* to, const Packet8uc& from)\n{ EIGEN_DEBUG_UNALIGNED_STORE vst1_u8(to,from); }\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<uint8_t>(uint8_t* to, const Packet16uc& from)\n{ EIGEN_DEBUG_UNALIGNED_STORE vst1q_u8(to,from); }\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<int16_t>(int16_t* to, const Packet4s& from)\n{ EIGEN_DEBUG_UNALIGNED_STORE vst1_s16(to,from); }\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<int16_t>(int16_t* to, const Packet8s& from)\n{ EIGEN_DEBUG_UNALIGNED_STORE vst1q_s16(to,from); }\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<uint16_t>(uint16_t* to, const Packet4us& from)\n{ EIGEN_DEBUG_UNALIGNED_STORE vst1_u16(to,from); }\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<uint16_t>(uint16_t* to, const Packet8us& from)\n{ EIGEN_DEBUG_UNALIGNED_STORE vst1q_u16(to,from); }\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<int32_t>(int32_t* to, const Packet2i& from)\n{ EIGEN_DEBUG_UNALIGNED_STORE vst1_s32(to,from); }\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<int32_t>(int32_t* to, const Packet4i& from)\n{ EIGEN_DEBUG_UNALIGNED_STORE vst1q_s32(to,from); }\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<uint32_t>(uint32_t* to, const Packet2ui& from)\n{ EIGEN_DEBUG_UNALIGNED_STORE vst1_u32(to,from); }\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<uint32_t>(uint32_t* to, const Packet4ui& from)\n{ EIGEN_DEBUG_UNALIGNED_STORE vst1q_u32(to,from); }\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<int64_t>(int64_t* to, const Packet2l& from)\n{ EIGEN_DEBUG_UNALIGNED_STORE vst1q_s64(to,from); }\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<uint64_t>(uint64_t* to, const Packet2ul& from)\n{ EIGEN_DEBUG_UNALIGNED_STORE vst1q_u64(to,from); }\n\ntemplate<> EIGEN_DEVICE_FUNC inline Packet2f pgather<float, Packet2f>(const float* from, Index stride)\n{\n  Packet2f res = vld1_dup_f32(from);\n  res = vld1_lane_f32(from + 1*stride, res, 1);\n  return res;\n}\ntemplate<> EIGEN_DEVICE_FUNC inline Packet4f pgather<float, Packet4f>(const float* from, Index stride)\n{\n  Packet4f res = vld1q_dup_f32(from);\n  res = vld1q_lane_f32(from + 1*stride, res, 1);\n  res = vld1q_lane_f32(from + 2*stride, res, 2);\n  res = vld1q_lane_f32(from + 3*stride, res, 3);\n  return res;\n}\ntemplate<> EIGEN_DEVICE_FUNC inline Packet4c pgather<int8_t, Packet4c>(const int8_t* from, Index stride)\n{\n  Packet4c res;\n  for (int i = 0; i != 4; i++)\n    reinterpret_cast<int8_t*>(&res)[i] = *(from + i * stride);\n  return res;\n}\ntemplate<> EIGEN_DEVICE_FUNC inline Packet8c pgather<int8_t, Packet8c>(const int8_t* from, Index stride)\n{\n  Packet8c res = vld1_dup_s8(from);\n  res = vld1_lane_s8(from + 1*stride, res, 1);\n  res = vld1_lane_s8(from + 2*stride, res, 2);\n  res = vld1_lane_s8(from + 3*stride, res, 3);\n  res = vld1_lane_s8(from + 4*stride, res, 4);\n  res = vld1_lane_s8(from + 5*stride, res, 5);\n  res = vld1_lane_s8(from + 6*stride, res, 6);\n  res = vld1_lane_s8(from + 7*stride, res, 7);\n  return res;\n}\ntemplate<> EIGEN_DEVICE_FUNC inline Packet16c pgather<int8_t, Packet16c>(const int8_t* from, Index stride)\n{\n  Packet16c res = vld1q_dup_s8(from);\n  res = vld1q_lane_s8(from + 1*stride, res, 1);\n  res = vld1q_lane_s8(from + 2*stride, res, 2);\n  res = vld1q_lane_s8(from + 3*stride, res, 3);\n  res = vld1q_lane_s8(from + 4*stride, res, 4);\n  res = vld1q_lane_s8(from + 5*stride, res, 5);\n  res = vld1q_lane_s8(from + 6*stride, res, 6);\n  res = vld1q_lane_s8(from + 7*stride, res, 7);\n  res = vld1q_lane_s8(from + 8*stride, res, 8);\n  res = vld1q_lane_s8(from + 9*stride, res, 9);\n  res = vld1q_lane_s8(from + 10*stride, res, 10);\n  res = vld1q_lane_s8(from + 11*stride, res, 11);\n  res = vld1q_lane_s8(from + 12*stride, res, 12);\n  res = vld1q_lane_s8(from + 13*stride, res, 13);\n  res = vld1q_lane_s8(from + 14*stride, res, 14);\n  res = vld1q_lane_s8(from + 15*stride, res, 15);\n  return res;\n}\ntemplate<> EIGEN_DEVICE_FUNC inline Packet4uc pgather<uint8_t, Packet4uc>(const uint8_t* from, Index stride)\n{\n  Packet4uc res;\n  for (int i = 0; i != 4; i++)\n    reinterpret_cast<uint8_t*>(&res)[i] = *(from + i * stride);\n  return res;\n}\ntemplate<> EIGEN_DEVICE_FUNC inline Packet8uc pgather<uint8_t, Packet8uc>(const uint8_t* from, Index stride)\n{\n  Packet8uc res = vld1_dup_u8(from);\n  res = vld1_lane_u8(from + 1*stride, res, 1);\n  res = vld1_lane_u8(from + 2*stride, res, 2);\n  res = vld1_lane_u8(from + 3*stride, res, 3);\n  res = vld1_lane_u8(from + 4*stride, res, 4);\n  res = vld1_lane_u8(from + 5*stride, res, 5);\n  res = vld1_lane_u8(from + 6*stride, res, 6);\n  res = vld1_lane_u8(from + 7*stride, res, 7);\n  return res;\n}\ntemplate<> EIGEN_DEVICE_FUNC inline Packet16uc pgather<uint8_t, Packet16uc>(const uint8_t* from, Index stride)\n{\n  Packet16uc res = vld1q_dup_u8(from);\n  res = vld1q_lane_u8(from + 1*stride, res, 1);\n  res = vld1q_lane_u8(from + 2*stride, res, 2);\n  res = vld1q_lane_u8(from + 3*stride, res, 3);\n  res = vld1q_lane_u8(from + 4*stride, res, 4);\n  res = vld1q_lane_u8(from + 5*stride, res, 5);\n  res = vld1q_lane_u8(from + 6*stride, res, 6);\n  res = vld1q_lane_u8(from + 7*stride, res, 7);\n  res = vld1q_lane_u8(from + 8*stride, res, 8);\n  res = vld1q_lane_u8(from + 9*stride, res, 9);\n  res = vld1q_lane_u8(from + 10*stride, res, 10);\n  res = vld1q_lane_u8(from + 11*stride, res, 11);\n  res = vld1q_lane_u8(from + 12*stride, res, 12);\n  res = vld1q_lane_u8(from + 13*stride, res, 13);\n  res = vld1q_lane_u8(from + 14*stride, res, 14);\n  res = vld1q_lane_u8(from + 15*stride, res, 15);\n  return res;\n}\ntemplate<> EIGEN_DEVICE_FUNC inline Packet4s pgather<int16_t, Packet4s>(const int16_t* from, Index stride)\n{\n  Packet4s res = vld1_dup_s16(from);\n  res = vld1_lane_s16(from + 1*stride, res, 1);\n  res = vld1_lane_s16(from + 2*stride, res, 2);\n  res = vld1_lane_s16(from + 3*stride, res, 3);\n  return res;\n}\ntemplate<> EIGEN_DEVICE_FUNC inline Packet8s pgather<int16_t, Packet8s>(const int16_t* from, Index stride)\n{\n  Packet8s res = vld1q_dup_s16(from);\n  res = vld1q_lane_s16(from + 1*stride, res, 1);\n  res = vld1q_lane_s16(from + 2*stride, res, 2);\n  res = vld1q_lane_s16(from + 3*stride, res, 3);\n  res = vld1q_lane_s16(from + 4*stride, res, 4);\n  res = vld1q_lane_s16(from + 5*stride, res, 5);\n  res = vld1q_lane_s16(from + 6*stride, res, 6);\n  res = vld1q_lane_s16(from + 7*stride, res, 7);\n  return res;\n}\ntemplate<> EIGEN_DEVICE_FUNC inline Packet4us pgather<uint16_t, Packet4us>(const uint16_t* from, Index stride)\n{\n  Packet4us res = vld1_dup_u16(from);\n  res = vld1_lane_u16(from + 1*stride, res, 1);\n  res = vld1_lane_u16(from + 2*stride, res, 2);\n  res = vld1_lane_u16(from + 3*stride, res, 3);\n  return res;\n}\ntemplate<> EIGEN_DEVICE_FUNC inline Packet8us pgather<uint16_t, Packet8us>(const uint16_t* from, Index stride)\n{\n  Packet8us res = vld1q_dup_u16(from);\n  res = vld1q_lane_u16(from + 1*stride, res, 1);\n  res = vld1q_lane_u16(from + 2*stride, res, 2);\n  res = vld1q_lane_u16(from + 3*stride, res, 3);\n  res = vld1q_lane_u16(from + 4*stride, res, 4);\n  res = vld1q_lane_u16(from + 5*stride, res, 5);\n  res = vld1q_lane_u16(from + 6*stride, res, 6);\n  res = vld1q_lane_u16(from + 7*stride, res, 7);\n  return res;\n}\ntemplate<> EIGEN_DEVICE_FUNC inline Packet2i pgather<int32_t, Packet2i>(const int32_t* from, Index stride)\n{\n  Packet2i res = vld1_dup_s32(from);\n  res = vld1_lane_s32(from + 1*stride, res, 1);\n  return res;\n}\ntemplate<> EIGEN_DEVICE_FUNC inline Packet4i pgather<int32_t, Packet4i>(const int32_t* from, Index stride)\n{\n  Packet4i res = vld1q_dup_s32(from);\n  res = vld1q_lane_s32(from + 1*stride, res, 1);\n  res = vld1q_lane_s32(from + 2*stride, res, 2);\n  res = vld1q_lane_s32(from + 3*stride, res, 3);\n  return res;\n}\ntemplate<> EIGEN_DEVICE_FUNC inline Packet2ui pgather<uint32_t, Packet2ui>(const uint32_t* from, Index stride)\n{\n  Packet2ui res = vld1_dup_u32(from);\n  res = vld1_lane_u32(from + 1*stride, res, 1);\n  return res;\n}\ntemplate<> EIGEN_DEVICE_FUNC inline Packet4ui pgather<uint32_t, Packet4ui>(const uint32_t* from, Index stride)\n{\n  Packet4ui res = vld1q_dup_u32(from);\n  res = vld1q_lane_u32(from + 1*stride, res, 1);\n  res = vld1q_lane_u32(from + 2*stride, res, 2);\n  res = vld1q_lane_u32(from + 3*stride, res, 3);\n  return res;\n}\ntemplate<> EIGEN_DEVICE_FUNC inline Packet2l pgather<int64_t, Packet2l>(const int64_t* from, Index stride)\n{\n  Packet2l res = vld1q_dup_s64(from);\n  res = vld1q_lane_s64(from + 1*stride, res, 1);\n  return res;\n}\ntemplate<> EIGEN_DEVICE_FUNC inline Packet2ul pgather<uint64_t, Packet2ul>(const uint64_t* from, Index stride)\n{\n  Packet2ul res = vld1q_dup_u64(from);\n  res = vld1q_lane_u64(from + 1*stride, res, 1);\n  return res;\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<float, Packet2f>(float* to, const Packet2f& from, Index stride)\n{\n  vst1_lane_f32(to + stride*0, from, 0);\n  vst1_lane_f32(to + stride*1, from, 1);\n}\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<float, Packet4f>(float* to, const Packet4f& from, Index stride)\n{\n  vst1q_lane_f32(to + stride*0, from, 0);\n  vst1q_lane_f32(to + stride*1, from, 1);\n  vst1q_lane_f32(to + stride*2, from, 2);\n  vst1q_lane_f32(to + stride*3, from, 3);\n}\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<int8_t, Packet4c>(int8_t* to, const Packet4c& from, Index stride)\n{\n  for (int i = 0; i != 4; i++)\n    *(to + i * stride) = reinterpret_cast<const int8_t*>(&from)[i];\n}\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<int8_t, Packet8c>(int8_t* to, const Packet8c& from, Index stride)\n{\n  vst1_lane_s8(to + stride*0, from, 0);\n  vst1_lane_s8(to + stride*1, from, 1);\n  vst1_lane_s8(to + stride*2, from, 2);\n  vst1_lane_s8(to + stride*3, from, 3);\n  vst1_lane_s8(to + stride*4, from, 4);\n  vst1_lane_s8(to + stride*5, from, 5);\n  vst1_lane_s8(to + stride*6, from, 6);\n  vst1_lane_s8(to + stride*7, from, 7);\n}\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<int8_t, Packet16c>(int8_t* to, const Packet16c& from, Index stride)\n{\n  vst1q_lane_s8(to + stride*0, from, 0);\n  vst1q_lane_s8(to + stride*1, from, 1);\n  vst1q_lane_s8(to + stride*2, from, 2);\n  vst1q_lane_s8(to + stride*3, from, 3);\n  vst1q_lane_s8(to + stride*4, from, 4);\n  vst1q_lane_s8(to + stride*5, from, 5);\n  vst1q_lane_s8(to + stride*6, from, 6);\n  vst1q_lane_s8(to + stride*7, from, 7);\n  vst1q_lane_s8(to + stride*8, from, 8);\n  vst1q_lane_s8(to + stride*9, from, 9);\n  vst1q_lane_s8(to + stride*10, from, 10);\n  vst1q_lane_s8(to + stride*11, from, 11);\n  vst1q_lane_s8(to + stride*12, from, 12);\n  vst1q_lane_s8(to + stride*13, from, 13);\n  vst1q_lane_s8(to + stride*14, from, 14);\n  vst1q_lane_s8(to + stride*15, from, 15);\n}\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<uint8_t, Packet4uc>(uint8_t* to, const Packet4uc& from, Index stride)\n{\n  for (int i = 0; i != 4; i++)\n    *(to + i * stride) = reinterpret_cast<const uint8_t*>(&from)[i];\n}\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<uint8_t, Packet8uc>(uint8_t* to, const Packet8uc& from, Index stride)\n{\n  vst1_lane_u8(to + stride*0, from, 0);\n  vst1_lane_u8(to + stride*1, from, 1);\n  vst1_lane_u8(to + stride*2, from, 2);\n  vst1_lane_u8(to + stride*3, from, 3);\n  vst1_lane_u8(to + stride*4, from, 4);\n  vst1_lane_u8(to + stride*5, from, 5);\n  vst1_lane_u8(to + stride*6, from, 6);\n  vst1_lane_u8(to + stride*7, from, 7);\n}\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<uint8_t, Packet16uc>(uint8_t* to, const Packet16uc& from, Index stride)\n{\n  vst1q_lane_u8(to + stride*0, from, 0);\n  vst1q_lane_u8(to + stride*1, from, 1);\n  vst1q_lane_u8(to + stride*2, from, 2);\n  vst1q_lane_u8(to + stride*3, from, 3);\n  vst1q_lane_u8(to + stride*4, from, 4);\n  vst1q_lane_u8(to + stride*5, from, 5);\n  vst1q_lane_u8(to + stride*6, from, 6);\n  vst1q_lane_u8(to + stride*7, from, 7);\n  vst1q_lane_u8(to + stride*8, from, 8);\n  vst1q_lane_u8(to + stride*9, from, 9);\n  vst1q_lane_u8(to + stride*10, from, 10);\n  vst1q_lane_u8(to + stride*11, from, 11);\n  vst1q_lane_u8(to + stride*12, from, 12);\n  vst1q_lane_u8(to + stride*13, from, 13);\n  vst1q_lane_u8(to + stride*14, from, 14);\n  vst1q_lane_u8(to + stride*15, from, 15);\n}\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<int16_t, Packet4s>(int16_t* to, const Packet4s& from, Index stride)\n{\n  vst1_lane_s16(to + stride*0, from, 0);\n  vst1_lane_s16(to + stride*1, from, 1);\n  vst1_lane_s16(to + stride*2, from, 2);\n  vst1_lane_s16(to + stride*3, from, 3);\n}\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<int16_t, Packet8s>(int16_t* to, const Packet8s& from, Index stride)\n{\n  vst1q_lane_s16(to + stride*0, from, 0);\n  vst1q_lane_s16(to + stride*1, from, 1);\n  vst1q_lane_s16(to + stride*2, from, 2);\n  vst1q_lane_s16(to + stride*3, from, 3);\n  vst1q_lane_s16(to + stride*4, from, 4);\n  vst1q_lane_s16(to + stride*5, from, 5);\n  vst1q_lane_s16(to + stride*6, from, 6);\n  vst1q_lane_s16(to + stride*7, from, 7);\n}\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<uint16_t, Packet4us>(uint16_t* to, const Packet4us& from, Index stride)\n{\n  vst1_lane_u16(to + stride*0, from, 0);\n  vst1_lane_u16(to + stride*1, from, 1);\n  vst1_lane_u16(to + stride*2, from, 2);\n  vst1_lane_u16(to + stride*3, from, 3);\n}\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<uint16_t, Packet8us>(uint16_t* to, const Packet8us& from, Index stride)\n{\n  vst1q_lane_u16(to + stride*0, from, 0);\n  vst1q_lane_u16(to + stride*1, from, 1);\n  vst1q_lane_u16(to + stride*2, from, 2);\n  vst1q_lane_u16(to + stride*3, from, 3);\n  vst1q_lane_u16(to + stride*4, from, 4);\n  vst1q_lane_u16(to + stride*5, from, 5);\n  vst1q_lane_u16(to + stride*6, from, 6);\n  vst1q_lane_u16(to + stride*7, from, 7);\n}\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<int32_t, Packet2i>(int32_t* to, const Packet2i& from, Index stride)\n{\n  vst1_lane_s32(to + stride*0, from, 0);\n  vst1_lane_s32(to + stride*1, from, 1);\n}\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<int32_t, Packet4i>(int32_t* to, const Packet4i& from, Index stride)\n{\n  vst1q_lane_s32(to + stride*0, from, 0);\n  vst1q_lane_s32(to + stride*1, from, 1);\n  vst1q_lane_s32(to + stride*2, from, 2);\n  vst1q_lane_s32(to + stride*3, from, 3);\n}\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<uint32_t, Packet2ui>(uint32_t* to, const Packet2ui& from, Index stride)\n{\n  vst1_lane_u32(to + stride*0, from, 0);\n  vst1_lane_u32(to + stride*1, from, 1);\n}\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<uint32_t, Packet4ui>(uint32_t* to, const Packet4ui& from, Index stride)\n{\n  vst1q_lane_u32(to + stride*0, from, 0);\n  vst1q_lane_u32(to + stride*1, from, 1);\n  vst1q_lane_u32(to + stride*2, from, 2);\n  vst1q_lane_u32(to + stride*3, from, 3);\n}\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<int64_t, Packet2l>(int64_t* to, const Packet2l& from, Index stride)\n{\n  vst1q_lane_s64(to + stride*0, from, 0);\n  vst1q_lane_s64(to + stride*1, from, 1);\n}\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<uint64_t, Packet2ul>(uint64_t* to, const Packet2ul& from, Index stride)\n{\n  vst1q_lane_u64(to + stride*0, from, 0);\n  vst1q_lane_u64(to + stride*1, from, 1);\n}\n\ntemplate<> EIGEN_STRONG_INLINE void prefetch<float>(const float* addr) { EIGEN_ARM_PREFETCH(addr); }\ntemplate<> EIGEN_STRONG_INLINE void prefetch<int8_t>(const int8_t* addr) { EIGEN_ARM_PREFETCH(addr); }\ntemplate<> EIGEN_STRONG_INLINE void prefetch<uint8_t>(const uint8_t* addr) { EIGEN_ARM_PREFETCH(addr); }\ntemplate<> EIGEN_STRONG_INLINE void prefetch<int16_t>(const int16_t* addr) { EIGEN_ARM_PREFETCH(addr); }\ntemplate<> EIGEN_STRONG_INLINE void prefetch<uint16_t>(const uint16_t* addr) { EIGEN_ARM_PREFETCH(addr); }\ntemplate<> EIGEN_STRONG_INLINE void prefetch<int32_t>(const int32_t* addr) { EIGEN_ARM_PREFETCH(addr); }\ntemplate<> EIGEN_STRONG_INLINE void prefetch<uint32_t>(const uint32_t* addr) { EIGEN_ARM_PREFETCH(addr); }\ntemplate<> EIGEN_STRONG_INLINE void prefetch<int64_t>(const int64_t* addr) { EIGEN_ARM_PREFETCH(addr); }\ntemplate<> EIGEN_STRONG_INLINE void prefetch<uint64_t>(const uint64_t* addr) { EIGEN_ARM_PREFETCH(addr); }\n\ntemplate<> EIGEN_STRONG_INLINE float pfirst<Packet2f>(const Packet2f& a) { return vget_lane_f32(a,0); }\ntemplate<> EIGEN_STRONG_INLINE float pfirst<Packet4f>(const Packet4f& a) { return vgetq_lane_f32(a,0); }\ntemplate<> EIGEN_STRONG_INLINE int8_t pfirst<Packet4c>(const Packet4c& a) { return static_cast<int8_t>(a & 0xff); }\ntemplate<> EIGEN_STRONG_INLINE int8_t pfirst<Packet8c>(const Packet8c& a) { return vget_lane_s8(a,0); }\ntemplate<> EIGEN_STRONG_INLINE int8_t pfirst<Packet16c>(const Packet16c& a) { return vgetq_lane_s8(a,0); }\ntemplate<> EIGEN_STRONG_INLINE uint8_t pfirst<Packet4uc>(const Packet4uc& a) { return static_cast<uint8_t>(a & 0xff); }\ntemplate<> EIGEN_STRONG_INLINE uint8_t pfirst<Packet8uc>(const Packet8uc& a) { return vget_lane_u8(a,0); }\ntemplate<> EIGEN_STRONG_INLINE uint8_t pfirst<Packet16uc>(const Packet16uc& a) { return vgetq_lane_u8(a,0); }\ntemplate<> EIGEN_STRONG_INLINE int16_t pfirst<Packet4s>(const Packet4s& a) { return vget_lane_s16(a,0); }\ntemplate<> EIGEN_STRONG_INLINE int16_t pfirst<Packet8s>(const Packet8s& a) { return vgetq_lane_s16(a,0); }\ntemplate<> EIGEN_STRONG_INLINE uint16_t pfirst<Packet4us>(const Packet4us& a) { return vget_lane_u16(a,0); }\ntemplate<> EIGEN_STRONG_INLINE uint16_t pfirst<Packet8us>(const Packet8us& a) { return vgetq_lane_u16(a,0); }\ntemplate<> EIGEN_STRONG_INLINE int32_t pfirst<Packet2i>(const Packet2i& a) { return vget_lane_s32(a,0); }\ntemplate<> EIGEN_STRONG_INLINE int32_t pfirst<Packet4i>(const Packet4i& a) { return vgetq_lane_s32(a,0); }\ntemplate<> EIGEN_STRONG_INLINE uint32_t pfirst<Packet2ui>(const Packet2ui& a) { return vget_lane_u32(a,0); }\ntemplate<> EIGEN_STRONG_INLINE uint32_t pfirst<Packet4ui>(const Packet4ui& a) { return vgetq_lane_u32(a,0); }\ntemplate<> EIGEN_STRONG_INLINE int64_t pfirst<Packet2l>(const Packet2l& a) { return vgetq_lane_s64(a,0); }\ntemplate<> EIGEN_STRONG_INLINE uint64_t pfirst<Packet2ul>(const Packet2ul& a) { return vgetq_lane_u64(a,0); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2f preverse(const Packet2f& a) { return vrev64_f32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f preverse(const Packet4f& a)\n{\n  const float32x4_t a_r64 = vrev64q_f32(a);\n  return vcombine_f32(vget_high_f32(a_r64), vget_low_f32(a_r64));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4c preverse(const Packet4c& a)\n{ return vget_lane_s32(vreinterpret_s32_s8(vrev64_s8(vreinterpret_s8_s32(vdup_n_s32(a)))), 0); }\ntemplate<> EIGEN_STRONG_INLINE Packet8c preverse(const Packet8c& a) { return vrev64_s8(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet16c preverse(const Packet16c& a)\n{\n  const int8x16_t a_r64 = vrev64q_s8(a);\n  return vcombine_s8(vget_high_s8(a_r64), vget_low_s8(a_r64));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4uc preverse(const Packet4uc& a)\n{ return vget_lane_u32(vreinterpret_u32_u8(vrev64_u8(vreinterpret_u8_u32(vdup_n_u32(a)))), 0); }\ntemplate<> EIGEN_STRONG_INLINE Packet8uc preverse(const Packet8uc& a) { return vrev64_u8(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet16uc preverse(const Packet16uc& a)\n{\n  const uint8x16_t a_r64 = vrev64q_u8(a);\n  return vcombine_u8(vget_high_u8(a_r64), vget_low_u8(a_r64));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4s preverse(const Packet4s& a) { return vrev64_s16(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet8s preverse(const Packet8s& a)\n{\n  const int16x8_t a_r64 = vrev64q_s16(a);\n  return vcombine_s16(vget_high_s16(a_r64), vget_low_s16(a_r64));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4us preverse(const Packet4us& a) { return vrev64_u16(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet8us preverse(const Packet8us& a)\n{\n  const uint16x8_t a_r64 = vrev64q_u16(a);\n  return vcombine_u16(vget_high_u16(a_r64), vget_low_u16(a_r64));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet2i preverse(const Packet2i& a) { return vrev64_s32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i preverse(const Packet4i& a)\n{\n  const int32x4_t a_r64 = vrev64q_s32(a);\n  return vcombine_s32(vget_high_s32(a_r64), vget_low_s32(a_r64));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet2ui preverse(const Packet2ui& a) { return vrev64_u32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4ui preverse(const Packet4ui& a)\n{\n  const uint32x4_t a_r64 = vrev64q_u32(a);\n  return vcombine_u32(vget_high_u32(a_r64), vget_low_u32(a_r64));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet2l preverse(const Packet2l& a)\n{ return vcombine_s64(vget_high_s64(a), vget_low_s64(a)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ul preverse(const Packet2ul& a)\n{ return vcombine_u64(vget_high_u64(a), vget_low_u64(a)); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2f pabs(const Packet2f& a) { return vabs_f32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pabs(const Packet4f& a) { return vabsq_f32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4c pabs<Packet4c>(const Packet4c& a)\n{ return vget_lane_s32(vreinterpret_s32_s8(vabs_s8(vreinterpret_s8_s32(vdup_n_s32(a)))), 0); }\ntemplate<> EIGEN_STRONG_INLINE Packet8c pabs(const Packet8c& a) { return vabs_s8(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet16c pabs(const Packet16c& a) { return vabsq_s8(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4uc pabs(const Packet4uc& a) { return a; }\ntemplate<> EIGEN_STRONG_INLINE Packet8uc pabs(const Packet8uc& a) { return a; }\ntemplate<> EIGEN_STRONG_INLINE Packet16uc pabs(const Packet16uc& a) { return a; }\ntemplate<> EIGEN_STRONG_INLINE Packet4s pabs(const Packet4s& a) { return vabs_s16(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet8s pabs(const Packet8s& a) { return vabsq_s16(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4us pabs(const Packet4us& a) { return a; }\ntemplate<> EIGEN_STRONG_INLINE Packet8us pabs(const Packet8us& a) { return a; }\ntemplate<> EIGEN_STRONG_INLINE Packet2i pabs(const Packet2i& a) { return vabs_s32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pabs(const Packet4i& a) { return vabsq_s32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ui pabs(const Packet2ui& a) { return a; }\ntemplate<> EIGEN_STRONG_INLINE Packet4ui pabs(const Packet4ui& a) { return a; }\ntemplate<> EIGEN_STRONG_INLINE Packet2l pabs(const Packet2l& a) {\n#if EIGEN_ARCH_ARM64\n  return vabsq_s64(a);\n#else\n  return vcombine_s64(\n      vdup_n_s64((std::abs)(vgetq_lane_s64(a, 0))),\n      vdup_n_s64((std::abs)(vgetq_lane_s64(a, 1))));\n#endif\n}\ntemplate<> EIGEN_STRONG_INLINE Packet2ul pabs(const Packet2ul& a) { return a; }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2f pfrexp<Packet2f>(const Packet2f& a, Packet2f& exponent)\n{ return pfrexp_float(a,exponent); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pfrexp<Packet4f>(const Packet4f& a, Packet4f& exponent)\n{ return pfrexp_float(a,exponent); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2f pldexp<Packet2f>(const Packet2f& a, const Packet2f& exponent)\n{ return pldexp_float(a,exponent); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pldexp<Packet4f>(const Packet4f& a, const Packet4f& exponent)\n{ return pldexp_float(a,exponent); }\n\ntemplate<> EIGEN_STRONG_INLINE float predux<Packet2f>(const Packet2f& a) { return vget_lane_f32(vpadd_f32(a,a), 0); }\ntemplate<> EIGEN_STRONG_INLINE float predux<Packet4f>(const Packet4f& a)\n{\n  const float32x2_t sum = vadd_f32(vget_low_f32(a), vget_high_f32(a));\n  return vget_lane_f32(vpadd_f32(sum, sum), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE int8_t predux<Packet4c>(const Packet4c& a)\n{\n  const int8x8_t a_dup = vreinterpret_s8_s32(vdup_n_s32(a));\n  int8x8_t sum = vpadd_s8(a_dup, a_dup);\n  sum = vpadd_s8(sum, sum);\n  return vget_lane_s8(sum, 0);\n}\ntemplate<> EIGEN_STRONG_INLINE int8_t predux<Packet8c>(const Packet8c& a)\n{\n  int8x8_t sum = vpadd_s8(a,a);\n  sum = vpadd_s8(sum, sum);\n  sum = vpadd_s8(sum, sum);\n  return vget_lane_s8(sum, 0);\n}\ntemplate<> EIGEN_STRONG_INLINE int8_t predux<Packet16c>(const Packet16c& a)\n{\n  int8x8_t sum = vadd_s8(vget_low_s8(a), vget_high_s8(a));\n  sum = vpadd_s8(sum, sum);\n  sum = vpadd_s8(sum, sum);\n  sum = vpadd_s8(sum, sum);\n  return vget_lane_s8(sum, 0);\n}\ntemplate<> EIGEN_STRONG_INLINE uint8_t predux<Packet4uc>(const Packet4uc& a)\n{\n  const uint8x8_t a_dup = vreinterpret_u8_u32(vdup_n_u32(a));\n  uint8x8_t sum = vpadd_u8(a_dup, a_dup);\n  sum = vpadd_u8(sum, sum);\n  return vget_lane_u8(sum, 0);\n}\ntemplate<> EIGEN_STRONG_INLINE uint8_t predux<Packet8uc>(const Packet8uc& a)\n{\n  uint8x8_t sum = vpadd_u8(a,a);\n  sum = vpadd_u8(sum, sum);\n  sum = vpadd_u8(sum, sum);\n  return vget_lane_u8(sum, 0);\n}\ntemplate<> EIGEN_STRONG_INLINE uint8_t predux<Packet16uc>(const Packet16uc& a)\n{\n  uint8x8_t sum = vadd_u8(vget_low_u8(a), vget_high_u8(a));\n  sum = vpadd_u8(sum, sum);\n  sum = vpadd_u8(sum, sum);\n  sum = vpadd_u8(sum, sum);\n  return vget_lane_u8(sum, 0);\n}\ntemplate<> EIGEN_STRONG_INLINE int16_t predux<Packet4s>(const Packet4s& a)\n{\n  const int16x4_t sum = vpadd_s16(a,a);\n  return vget_lane_s16(vpadd_s16(sum, sum), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE int16_t predux<Packet8s>(const Packet8s& a)\n{\n  int16x4_t sum = vadd_s16(vget_low_s16(a), vget_high_s16(a));\n  sum = vpadd_s16(sum, sum);\n  sum = vpadd_s16(sum, sum);\n  return vget_lane_s16(sum, 0);\n}\ntemplate<> EIGEN_STRONG_INLINE uint16_t predux<Packet4us>(const Packet4us& a)\n{\n  const uint16x4_t sum = vpadd_u16(a,a);\n  return vget_lane_u16(vpadd_u16(sum, sum), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE uint16_t predux<Packet8us>(const Packet8us& a)\n{\n  uint16x4_t sum = vadd_u16(vget_low_u16(a), vget_high_u16(a));\n  sum = vpadd_u16(sum, sum);\n  sum = vpadd_u16(sum, sum);\n  return vget_lane_u16(sum, 0);\n}\ntemplate<> EIGEN_STRONG_INLINE int32_t predux<Packet2i>(const Packet2i& a) { return vget_lane_s32(vpadd_s32(a,a), 0); }\ntemplate<> EIGEN_STRONG_INLINE int32_t predux<Packet4i>(const Packet4i& a)\n{\n  const int32x2_t sum = vadd_s32(vget_low_s32(a), vget_high_s32(a));\n  return vget_lane_s32(vpadd_s32(sum, sum), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE uint32_t predux<Packet2ui>(const Packet2ui& a) { return vget_lane_u32(vpadd_u32(a,a), 0); }\ntemplate<> EIGEN_STRONG_INLINE uint32_t predux<Packet4ui>(const Packet4ui& a)\n{\n  const uint32x2_t sum = vadd_u32(vget_low_u32(a), vget_high_u32(a));\n  return vget_lane_u32(vpadd_u32(sum, sum), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE int64_t predux<Packet2l>(const Packet2l& a)\n{ return vgetq_lane_s64(a, 0) + vgetq_lane_s64(a, 1); }\ntemplate<> EIGEN_STRONG_INLINE uint64_t predux<Packet2ul>(const Packet2ul& a)\n{ return vgetq_lane_u64(a, 0) + vgetq_lane_u64(a, 1); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2f preduxp<Packet2f>(const Packet2f* vecs)\n{\n  const float32x2x2_t vtrn = vzip_f32(vecs[0], vecs[1]);\n  return vadd_f32(vtrn.val[0], vtrn.val[1]);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4f preduxp<Packet4f>(const Packet4f* vecs)\n{\n  const float32x4x2_t vtrn1 = vzipq_f32(vecs[0], vecs[2]);\n  const float32x4x2_t vtrn2 = vzipq_f32(vecs[1], vecs[3]);\n  const float32x4x2_t res1 = vzipq_f32(vtrn1.val[0], vtrn2.val[0]);\n  const float32x4x2_t res2 = vzipq_f32(vtrn1.val[1], vtrn2.val[1]);\n  return vaddq_f32(vaddq_f32(res1.val[0], res1.val[1]), vaddq_f32(res2.val[0], res2.val[1]));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4c preduxp<Packet4c>(const Packet4c* vecs)\n{\n  const int8x8x2_t zip8 = vzip_s8(\n      vreinterpret_s8_s32(vset_lane_s32(vecs[2], vdup_n_s32(vecs[0]), 1)),\n      vreinterpret_s8_s32(vset_lane_s32(vecs[3], vdup_n_s32(vecs[1]), 1)));\n  const uint16x4x2_t zip16 = vzip_u16(\n      vreinterpret_u16_s8(zip8.val[0]),\n      vreinterpret_u16_s8(zip8.val[1]));\n  const int8x8_t sum = vadd_s8(\n      vreinterpret_s8_u16(zip16.val[0]),\n      vreinterpret_s8_u16(zip16.val[1]));\n  return vget_lane_s32(vreinterpret_s32_s8(vadd_s8(sum,\n      vreinterpret_s8_s32(vrev64_s32(vreinterpret_s32_s8(sum))))), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8c preduxp<Packet8c>(const Packet8c* vecs)\n{\n  int8x8_t sum[4];\n\n  EIGEN_UNROLL_LOOP\n  for (int i = 0; i != 4; i++)\n  {\n    const int8x8x2_t z = vzip_s8(vecs[i*2], vecs[i*2+1]);\n    sum[i] = vadd_s8(z.val[0], z.val[1]);\n  }\n\n  EIGEN_UNROLL_LOOP\n  for (int i = 0; i != 2; i++)\n  {\n    const uint16x4x2_t z = vzip_u16(vreinterpret_u16_s8(sum[i*2]), vreinterpret_u16_s8(sum[i*2+1]));\n    sum[i] = vadd_s8(vreinterpret_s8_u16(z.val[0]), vreinterpret_s8_u16(z.val[1]));\n  }\n\n  const uint32x2x2_t z = vzip_u32(vreinterpret_u32_s8(sum[0]), vreinterpret_u32_s8(sum[1]));\n  return vadd_s8(vreinterpret_s8_u32(z.val[0]), vreinterpret_s8_u32(z.val[1]));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet16c preduxp<Packet16c>(const Packet16c* vecs)\n{\n  int8x16_t sum[8];\n\n  EIGEN_UNROLL_LOOP\n  for (int i = 0; i != 8; i++)\n  {\n    const int8x16x2_t z = vzipq_s8(vecs[i*2], vecs[i*2+1]);\n    sum[i] = vaddq_s8(z.val[0], z.val[1]);\n  }\n\n  EIGEN_UNROLL_LOOP\n  for (int i = 0; i != 4; i++)\n  {\n    const uint16x8x2_t z = vzipq_u16(vreinterpretq_u16_s8(sum[i*2]), vreinterpretq_u16_s8(sum[i*2+1]));\n    sum[i] = vaddq_s8(vreinterpretq_s8_u16(z.val[0]), vreinterpretq_s8_u16(z.val[1]));\n  }\n\n  EIGEN_UNROLL_LOOP\n  for (int i = 0; i != 2; i++)\n  {\n    const uint32x4x2_t z = vzipq_u32(vreinterpretq_u32_s8(sum[i*2]), vreinterpretq_u32_s8(sum[i*2+1]));\n    sum[i] = vaddq_s8(vreinterpretq_s8_u32(z.val[0]), vreinterpretq_s8_u32(z.val[1]));\n  }\n\n  return vcombine_s8(\n      vadd_s8(vget_low_s8(sum[0]), vget_high_s8(sum[0])),\n      vadd_s8(vget_low_s8(sum[1]), vget_high_s8(sum[1])));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4uc preduxp<Packet4uc>(const Packet4uc* vecs)\n{\n  const uint8x8x2_t zip8 = vzip_u8(\n      vreinterpret_u8_u32(vset_lane_u32(vecs[2], vdup_n_u32(vecs[0]), 1)),\n      vreinterpret_u8_u32(vset_lane_u32(vecs[3], vdup_n_u32(vecs[1]), 1)));\n  const uint16x4x2_t zip16 = vzip_u16(\n      vreinterpret_u16_u8(zip8.val[0]),\n      vreinterpret_u16_u8(zip8.val[1]));\n  const uint8x8_t sum = vadd_u8(\n      vreinterpret_u8_u16(zip16.val[0]),\n      vreinterpret_u8_u16(zip16.val[1]));\n  return vget_lane_u32(vreinterpret_u32_u8(vadd_u8(sum,\n      vreinterpret_u8_u32(vrev64_u32(vreinterpret_u32_u8(sum))))), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8uc preduxp<Packet8uc>(const Packet8uc* vecs)\n{\n  uint8x8_t sum[4];\n\n  EIGEN_UNROLL_LOOP\n  for (int i = 0; i != 4; i++)\n  {\n    const uint8x8x2_t z = vzip_u8(vecs[i*2], vecs[i*2+1]);\n    sum[i] = vadd_u8(z.val[0], z.val[1]);\n  }\n\n  EIGEN_UNROLL_LOOP\n  for (int i = 0; i != 2; i++)\n  {\n    const uint16x4x2_t z = vzip_u16(vreinterpret_u16_u8(sum[i*2]), vreinterpret_u16_u8(sum[i*2+1]));\n    sum[i] = vadd_u8(vreinterpret_u8_u16(z.val[0]), vreinterpret_u8_u16(z.val[1]));\n  }\n\n  const uint32x2x2_t z = vzip_u32(vreinterpret_u32_u8(sum[0]), vreinterpret_u32_u8(sum[1]));\n  return vadd_u8(vreinterpret_u8_u32(z.val[0]), vreinterpret_u8_u32(z.val[1]));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet16uc preduxp<Packet16uc>(const Packet16uc* vecs)\n{\n  uint8x16_t sum[8];\n\n  EIGEN_UNROLL_LOOP\n  for (int i = 0; i != 8; i++)\n  {\n    const uint8x16x2_t z = vzipq_u8(vecs[i*2], vecs[i*2+1]);\n    sum[i] = vaddq_u8(z.val[0], z.val[1]);\n  }\n\n  EIGEN_UNROLL_LOOP\n  for (int i = 0; i != 4; i++)\n  {\n    const uint16x8x2_t z = vzipq_u16(vreinterpretq_u16_u8(sum[i*2]), vreinterpretq_u16_u8(sum[i*2+1]));\n    sum[i] = vaddq_u8(vreinterpretq_u8_u16(z.val[0]), vreinterpretq_u8_u16(z.val[1]));\n  }\n\n  EIGEN_UNROLL_LOOP\n  for (int i = 0; i != 2; i++)\n  {\n    const uint32x4x2_t z = vzipq_u32(vreinterpretq_u32_u8(sum[i*2]), vreinterpretq_u32_u8(sum[i*2+1]));\n    sum[i] = vaddq_u8(vreinterpretq_u8_u32(z.val[0]), vreinterpretq_u8_u32(z.val[1]));\n  }\n\n  return vcombine_u8(\n      vadd_u8(vget_low_u8(sum[0]), vget_high_u8(sum[0])),\n      vadd_u8(vget_low_u8(sum[1]), vget_high_u8(sum[1])));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4s preduxp<Packet4s>(const Packet4s* vecs)\n{\n  int16x4x2_t zip16;\n  int32x2x2_t zip32;\n  int16x4_t sum1, sum2;\n\n  zip16 = vzip_s16(vecs[0], vecs[1]);\n  sum1 = vadd_s16(zip16.val[0], zip16.val[1]);\n  zip16 = vzip_s16(vecs[2], vecs[3]);\n  sum2 = vadd_s16(zip16.val[0], zip16.val[1]);\n\n  zip32 = vzip_s32(vreinterpret_s32_s16(sum1), vreinterpret_s32_s16(sum2));\n  return vadd_s16(vreinterpret_s16_s32(zip32.val[0]), vreinterpret_s16_s32(zip32.val[1]));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8s preduxp<Packet8s>(const Packet8s* vecs)\n{\n  int16x8x2_t zip16;\n  int32x4x2_t zip32;\n  int16x8_t sum1, sum2, sum3, sum4;\n\n  zip16 = vzipq_s16(vecs[0], vecs[1]);\n  sum1 = vaddq_s16(zip16.val[0], zip16.val[1]);\n  zip16 = vzipq_s16(vecs[2], vecs[3]);\n  sum2 = vaddq_s16(zip16.val[0], zip16.val[1]);\n  zip16 = vzipq_s16(vecs[4], vecs[5]);\n  sum3 = vaddq_s16(zip16.val[0], zip16.val[1]);\n  zip16 = vzipq_s16(vecs[6], vecs[7]);\n  sum4 = vaddq_s16(zip16.val[0], zip16.val[1]);\n\n  zip32 = vzipq_s32(vreinterpretq_s32_s16(sum1), vreinterpretq_s32_s16(sum2));\n  sum1 = vaddq_s16(vreinterpretq_s16_s32(zip32.val[0]), vreinterpretq_s16_s32(zip32.val[1]));\n  zip32 = vzipq_s32(vreinterpretq_s32_s16(sum3), vreinterpretq_s32_s16(sum4));\n  sum2 = vaddq_s16(vreinterpretq_s16_s32(zip32.val[0]), vreinterpretq_s16_s32(zip32.val[1]));\n\n  return vcombine_s16(\n      vadd_s16(vget_low_s16(sum1), vget_high_s16(sum1)),\n      vadd_s16(vget_low_s16(sum2), vget_high_s16(sum2)));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4us preduxp<Packet4us>(const Packet4us* vecs)\n{\n  uint16x4x2_t zip16;\n  uint32x2x2_t zip32;\n  uint16x4_t sum1, sum2;\n\n  zip16 = vzip_u16(vecs[0], vecs[1]);\n  sum1 = vadd_u16(zip16.val[0], zip16.val[1]);\n  zip16 = vzip_u16(vecs[2], vecs[3]);\n  sum2 = vadd_u16(zip16.val[0], zip16.val[1]);\n\n  zip32 = vzip_u32(vreinterpret_u32_u16(sum1), vreinterpret_u32_u16(sum2));\n  return vadd_u16(vreinterpret_u16_u32(zip32.val[0]), vreinterpret_u16_u32(zip32.val[1]));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8us preduxp<Packet8us>(const Packet8us* vecs)\n{\n  uint16x8x2_t zip16;\n  uint32x4x2_t zip32;\n  uint16x8_t sum1, sum2, sum3, sum4;\n\n  zip16 = vzipq_u16(vecs[0], vecs[1]);\n  sum1 = vaddq_u16(zip16.val[0], zip16.val[1]);\n  zip16 = vzipq_u16(vecs[2], vecs[3]);\n  sum2 = vaddq_u16(zip16.val[0], zip16.val[1]);\n  zip16 = vzipq_u16(vecs[4], vecs[5]);\n  sum3 = vaddq_u16(zip16.val[0], zip16.val[1]);\n  zip16 = vzipq_u16(vecs[6], vecs[7]);\n  sum4 = vaddq_u16(zip16.val[0], zip16.val[1]);\n\n  zip32 = vzipq_u32(vreinterpretq_u32_u16(sum1), vreinterpretq_u32_u16(sum2));\n  sum1 = vaddq_u16(vreinterpretq_u16_u32(zip32.val[0]), vreinterpretq_u16_u32(zip32.val[1]));\n  zip32 = vzipq_u32(vreinterpretq_u32_u16(sum3), vreinterpretq_u32_u16(sum4));\n  sum2 = vaddq_u16(vreinterpretq_u16_u32(zip32.val[0]), vreinterpretq_u16_u32(zip32.val[1]));\n\n  return vcombine_u16(\n      vadd_u16(vget_low_u16(sum1), vget_high_u16(sum1)),\n      vadd_u16(vget_low_u16(sum2), vget_high_u16(sum2)));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet2i preduxp<Packet2i>(const Packet2i* vecs)\n{\n  const int32x2x2_t vtrn = vzip_s32(vecs[0], vecs[1]);\n  return vadd_s32(vtrn.val[0], vtrn.val[1]);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4i preduxp<Packet4i>(const Packet4i* vecs)\n{\n  const int32x4x2_t vtrn1 = vzipq_s32(vecs[0], vecs[2]);\n  const int32x4x2_t vtrn2 = vzipq_s32(vecs[1], vecs[3]);\n  const int32x4x2_t res1 = vzipq_s32(vtrn1.val[0], vtrn2.val[0]);\n  const int32x4x2_t res2 = vzipq_s32(vtrn1.val[1], vtrn2.val[1]);\n  return vaddq_s32(vaddq_s32(res1.val[0], res1.val[1]), vaddq_s32(res2.val[0], res2.val[1]));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet2ui preduxp<Packet2ui>(const Packet2ui* vecs)\n{\n  const uint32x2x2_t vtrn = vzip_u32(vecs[0], vecs[1]);\n  return vadd_u32(vtrn.val[0], vtrn.val[1]);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4ui preduxp<Packet4ui>(const Packet4ui* vecs)\n{\n  uint32x4x2_t vtrn1, vtrn2, res1, res2;\n  Packet4ui sum1, sum2, sum;\n\n  // NEON zip performs interleaving of the supplied vectors.\n  // We perform two interleaves in a row to acquire the transposed vector\n  vtrn1 = vzipq_u32(vecs[0], vecs[2]);\n  vtrn2 = vzipq_u32(vecs[1], vecs[3]);\n  res1 = vzipq_u32(vtrn1.val[0], vtrn2.val[0]);\n  res2 = vzipq_u32(vtrn1.val[1], vtrn2.val[1]);\n\n  // Do the addition of the resulting vectors\n  sum1 = vaddq_u32(res1.val[0], res1.val[1]);\n  sum2 = vaddq_u32(res2.val[0], res2.val[1]);\n  sum = vaddq_u32(sum1, sum2);\n\n  return sum;\n}\ntemplate<> EIGEN_STRONG_INLINE Packet2l preduxp<Packet2l>(const Packet2l* vecs)\n{\n  return vsetq_lane_s64(\n      vget_lane_s64(vget_low_s64(vecs[0]), 0) +\n        vget_lane_s64(vget_high_s64(vecs[0]), 0),\n      vdupq_n_s64(\n        vget_lane_s64(vget_low_s64(vecs[1]), 0) +\n          vget_lane_s64(vget_high_s64(vecs[1]), 0)),\n      0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet2ul preduxp<Packet2ul>(const Packet2ul* vecs)\n{\n  return vsetq_lane_u64(\n      vget_lane_u64(vget_low_u64(vecs[0]), 0) +\n        vget_lane_u64(vget_high_u64(vecs[0]), 0),\n      vdupq_n_u64(\n        vget_lane_u64(vget_low_u64(vecs[1]), 0) +\n          vget_lane_u64(vget_high_u64(vecs[1]), 0)),\n      0);\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline Packet4c predux_half_dowto4(const Packet8c& a)\n{\n  return vget_lane_s32(vreinterpret_s32_s8(vadd_s8(a,\n      vreinterpret_s8_s32(vrev64_s32(vreinterpret_s32_s8(a))))), 0);\n}\ntemplate<> EIGEN_DEVICE_FUNC inline Packet8c predux_half_dowto4(const Packet16c& a)\n{ return vadd_s8(vget_high_s8(a), vget_low_s8(a)); }\ntemplate<> EIGEN_DEVICE_FUNC inline Packet4uc predux_half_dowto4(const Packet8uc& a)\n{\n  return vget_lane_u32(vreinterpret_u32_u8(vadd_u8(a,\n      vreinterpret_u8_u32(vrev64_u32(vreinterpret_u32_u8(a))))), 0);\n}\ntemplate<> EIGEN_DEVICE_FUNC inline Packet8uc predux_half_dowto4(const Packet16uc& a)\n{ return vadd_u8(vget_high_u8(a), vget_low_u8(a)); }\ntemplate<> EIGEN_DEVICE_FUNC inline Packet4s predux_half_dowto4(const Packet8s& a)\n{ return vadd_s16(vget_high_s16(a), vget_low_s16(a)); }\ntemplate<> EIGEN_DEVICE_FUNC inline Packet4us predux_half_dowto4(const Packet8us& a)\n{ return vadd_u16(vget_high_u16(a), vget_low_u16(a)); }\n\n// Other reduction functions:\n// mul\ntemplate<> EIGEN_STRONG_INLINE float predux_mul<Packet2f>(const Packet2f& a)\n{ return vget_lane_f32(a, 0) * vget_lane_f32(a, 1); }\ntemplate<> EIGEN_STRONG_INLINE float predux_mul<Packet4f>(const Packet4f& a)\n{ return predux_mul(vmul_f32(vget_low_f32(a), vget_high_f32(a))); }\ntemplate<> EIGEN_STRONG_INLINE int8_t predux_mul<Packet4c>(const Packet4c& a)\n{\n  int8x8_t prod = vreinterpret_s8_s32(vdup_n_s32(a));\n  prod = vmul_s8(prod, vrev16_s8(prod));\n  return vget_lane_s8(prod, 0) * vget_lane_s8(prod, 2);\n}\ntemplate<> EIGEN_STRONG_INLINE int8_t predux_mul<Packet8c>(const Packet8c& a)\n{\n  int8x8_t prod = vmul_s8(a, vrev16_s8(a));\n  prod = vmul_s8(prod, vrev32_s8(prod));\n  return vget_lane_s8(prod, 0) * vget_lane_s8(prod, 4);\n}\ntemplate<> EIGEN_STRONG_INLINE int8_t predux_mul<Packet16c>(const Packet16c& a)\n{ return predux_mul(vmul_s8(vget_low_s8(a), vget_high_s8(a))); }\ntemplate<> EIGEN_STRONG_INLINE uint8_t predux_mul<Packet4uc>(const Packet4uc& a)\n{\n  uint8x8_t prod = vreinterpret_u8_u32(vdup_n_u32(a));\n  prod = vmul_u8(prod, vrev16_u8(prod));\n  return vget_lane_u8(prod, 0) * vget_lane_u8(prod, 2);\n}\ntemplate<> EIGEN_STRONG_INLINE uint8_t predux_mul<Packet8uc>(const Packet8uc& a)\n{\n  uint8x8_t prod = vmul_u8(a, vrev16_u8(a));\n  prod = vmul_u8(prod, vrev32_u8(prod));\n  return vget_lane_u8(prod, 0) * vget_lane_u8(prod, 4);\n}\ntemplate<> EIGEN_STRONG_INLINE uint8_t predux_mul<Packet16uc>(const Packet16uc& a)\n{ return predux_mul(vmul_u8(vget_low_u8(a), vget_high_u8(a))); }\ntemplate<> EIGEN_STRONG_INLINE int16_t predux_mul<Packet4s>(const Packet4s& a)\n{\n  const int16x4_t prod = vmul_s16(a, vrev32_s16(a));\n  return vget_lane_s16(prod, 0) * vget_lane_s16(prod, 2);\n}\ntemplate<> EIGEN_STRONG_INLINE int16_t predux_mul<Packet8s>(const Packet8s& a)\n{\n  int16x4_t prod;\n\n  // Get the product of a_lo * a_hi -> |a1*a5|a2*a6|a3*a7|a4*a8|\n  prod = vmul_s16(vget_low_s16(a), vget_high_s16(a));\n  // Swap and multiply |a1*a5*a2*a6|a3*a7*a4*a8|\n  prod = vmul_s16(prod, vrev32_s16(prod));\n  // Multiply |a1*a5*a2*a6*a3*a7*a4*a8|\n  return vget_lane_s16(prod, 0) * vget_lane_s16(prod, 2);\n}\ntemplate<> EIGEN_STRONG_INLINE uint16_t predux_mul<Packet4us>(const Packet4us& a)\n{\n  const uint16x4_t prod = vmul_u16(a, vrev32_u16(a));\n  return vget_lane_u16(prod, 0) * vget_lane_u16(prod, 2);\n}\ntemplate<> EIGEN_STRONG_INLINE uint16_t predux_mul<Packet8us>(const Packet8us& a)\n{\n  uint16x4_t prod;\n\n  // Get the product of a_lo * a_hi -> |a1*a5|a2*a6|a3*a7|a4*a8|\n  prod = vmul_u16(vget_low_u16(a), vget_high_u16(a));\n  // Swap and multiply |a1*a5*a2*a6|a3*a7*a4*a8|\n  prod = vmul_u16(prod, vrev32_u16(prod));\n  // Multiply |a1*a5*a2*a6*a3*a7*a4*a8|\n  return vget_lane_u16(prod, 0) * vget_lane_u16(prod, 2);\n}\ntemplate<> EIGEN_STRONG_INLINE int32_t predux_mul<Packet2i>(const Packet2i& a)\n{ return vget_lane_s32(a, 0) * vget_lane_s32(a, 1); }\ntemplate<> EIGEN_STRONG_INLINE int32_t predux_mul<Packet4i>(const Packet4i& a)\n{ return predux_mul(vmul_s32(vget_low_s32(a), vget_high_s32(a))); }\ntemplate<> EIGEN_STRONG_INLINE uint32_t predux_mul<Packet2ui>(const Packet2ui& a)\n{ return vget_lane_u32(a, 0) * vget_lane_u32(a, 1); }\ntemplate<> EIGEN_STRONG_INLINE uint32_t predux_mul<Packet4ui>(const Packet4ui& a)\n{ return predux_mul(vmul_u32(vget_low_u32(a), vget_high_u32(a))); }\ntemplate<> EIGEN_STRONG_INLINE int64_t predux_mul<Packet2l>(const Packet2l& a)\n{ return vgetq_lane_s64(a, 0) * vgetq_lane_s64(a, 1); }\ntemplate<> EIGEN_STRONG_INLINE uint64_t predux_mul<Packet2ul>(const Packet2ul& a)\n{ return vgetq_lane_u64(a, 0) * vgetq_lane_u64(a, 1); }\n\n// min\ntemplate<> EIGEN_STRONG_INLINE float predux_min<Packet2f>(const Packet2f& a)\n{ return vget_lane_f32(vpmin_f32(a,a), 0); }\ntemplate<> EIGEN_STRONG_INLINE float predux_min<Packet4f>(const Packet4f& a)\n{\n  const float32x2_t min = vmin_f32(vget_low_f32(a), vget_high_f32(a));\n  return vget_lane_f32(vpmin_f32(min, min), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE int8_t predux_min<Packet4c>(const Packet4c& a)\n{\n  const int8x8_t a_dup = vreinterpret_s8_s32(vdup_n_s32(a));\n  int8x8_t min = vpmin_s8(a_dup, a_dup);\n  min = vpmin_s8(min, min);\n  return vget_lane_s8(min, 0);\n}\ntemplate<> EIGEN_STRONG_INLINE int8_t predux_min<Packet8c>(const Packet8c& a)\n{\n  int8x8_t min = vpmin_s8(a,a);\n  min = vpmin_s8(min, min);\n  min = vpmin_s8(min, min);\n  return vget_lane_s8(min, 0);\n}\ntemplate<> EIGEN_STRONG_INLINE int8_t predux_min<Packet16c>(const Packet16c& a)\n{\n  int8x8_t min = vmin_s8(vget_low_s8(a), vget_high_s8(a));\n  min = vpmin_s8(min, min);\n  min = vpmin_s8(min, min);\n  min = vpmin_s8(min, min);\n  return vget_lane_s8(min, 0);\n}\ntemplate<> EIGEN_STRONG_INLINE uint8_t predux_min<Packet4uc>(const Packet4uc& a)\n{\n  const uint8x8_t a_dup = vreinterpret_u8_u32(vdup_n_u32(a));\n  uint8x8_t min = vpmin_u8(a_dup, a_dup);\n  min = vpmin_u8(min, min);\n  return vget_lane_u8(min, 0);\n}\ntemplate<> EIGEN_STRONG_INLINE uint8_t predux_min<Packet8uc>(const Packet8uc& a)\n{\n  uint8x8_t min = vpmin_u8(a,a);\n  min = vpmin_u8(min, min);\n  min = vpmin_u8(min, min);\n  return vget_lane_u8(min, 0);\n}\ntemplate<> EIGEN_STRONG_INLINE uint8_t predux_min<Packet16uc>(const Packet16uc& a)\n{\n  uint8x8_t min = vmin_u8(vget_low_u8(a), vget_high_u8(a));\n  min = vpmin_u8(min, min);\n  min = vpmin_u8(min, min);\n  min = vpmin_u8(min, min);\n  return vget_lane_u8(min, 0);\n}\ntemplate<> EIGEN_STRONG_INLINE int16_t predux_min<Packet4s>(const Packet4s& a)\n{\n  const int16x4_t min = vpmin_s16(a,a);\n  return vget_lane_s16(vpmin_s16(min, min), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE int16_t predux_min<Packet8s>(const Packet8s& a)\n{\n  int16x4_t min = vmin_s16(vget_low_s16(a), vget_high_s16(a));\n  min = vpmin_s16(min, min);\n  min = vpmin_s16(min, min);\n  return vget_lane_s16(min, 0);\n}\ntemplate<> EIGEN_STRONG_INLINE uint16_t predux_min<Packet4us>(const Packet4us& a)\n{\n  const uint16x4_t min = vpmin_u16(a,a);\n  return vget_lane_u16(vpmin_u16(min, min), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE uint16_t predux_min<Packet8us>(const Packet8us& a)\n{\n  uint16x4_t min = vmin_u16(vget_low_u16(a), vget_high_u16(a));\n  min = vpmin_u16(min, min);\n  min = vpmin_u16(min, min);\n  return vget_lane_u16(min, 0);\n}\ntemplate<> EIGEN_STRONG_INLINE int32_t predux_min<Packet2i>(const Packet2i& a)\n{ return vget_lane_s32(vpmin_s32(a,a), 0); }\ntemplate<> EIGEN_STRONG_INLINE int32_t predux_min<Packet4i>(const Packet4i& a)\n{\n  const int32x2_t min = vmin_s32(vget_low_s32(a), vget_high_s32(a));\n  return vget_lane_s32(vpmin_s32(min, min), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE uint32_t predux_min<Packet2ui>(const Packet2ui& a)\n{ return vget_lane_u32(vpmin_u32(a,a), 0); }\ntemplate<> EIGEN_STRONG_INLINE uint32_t predux_min<Packet4ui>(const Packet4ui& a)\n{\n  const uint32x2_t min = vmin_u32(vget_low_u32(a), vget_high_u32(a));\n  return vget_lane_u32(vpmin_u32(min, min), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE int64_t predux_min<Packet2l>(const Packet2l& a)\n{ return (std::min)(vgetq_lane_s64(a, 0), vgetq_lane_s64(a, 1)); }\ntemplate<> EIGEN_STRONG_INLINE uint64_t predux_min<Packet2ul>(const Packet2ul& a)\n{ return (std::min)(vgetq_lane_u64(a, 0), vgetq_lane_u64(a, 1)); }\n\n// max\ntemplate<> EIGEN_STRONG_INLINE float predux_max<Packet2f>(const Packet2f& a)\n{ return vget_lane_f32(vpmax_f32(a,a), 0); }\ntemplate<> EIGEN_STRONG_INLINE float predux_max<Packet4f>(const Packet4f& a)\n{\n  const float32x2_t max = vmax_f32(vget_low_f32(a), vget_high_f32(a));\n  return vget_lane_f32(vpmax_f32(max, max), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE int8_t predux_max<Packet4c>(const Packet4c& a)\n{\n  const int8x8_t a_dup = vreinterpret_s8_s32(vdup_n_s32(a));\n  int8x8_t max = vpmax_s8(a_dup, a_dup);\n  max = vpmax_s8(max, max);\n  return vget_lane_s8(max, 0);\n}\ntemplate<> EIGEN_STRONG_INLINE int8_t predux_max<Packet8c>(const Packet8c& a)\n{\n  int8x8_t max = vpmax_s8(a,a);\n  max = vpmax_s8(max, max);\n  max = vpmax_s8(max, max);\n  return vget_lane_s8(max, 0);\n}\ntemplate<> EIGEN_STRONG_INLINE int8_t predux_max<Packet16c>(const Packet16c& a)\n{\n  int8x8_t max = vmax_s8(vget_low_s8(a), vget_high_s8(a));\n  max = vpmax_s8(max, max);\n  max = vpmax_s8(max, max);\n  max = vpmax_s8(max, max);\n  return vget_lane_s8(max, 0);\n}\ntemplate<> EIGEN_STRONG_INLINE uint8_t predux_max<Packet4uc>(const Packet4uc& a)\n{\n  const uint8x8_t a_dup = vreinterpret_u8_u32(vdup_n_u32(a));\n  uint8x8_t max = vpmax_u8(a_dup, a_dup);\n  max = vpmax_u8(max, max);\n  return vget_lane_u8(max, 0);\n}\ntemplate<> EIGEN_STRONG_INLINE uint8_t predux_max<Packet8uc>(const Packet8uc& a)\n{\n  uint8x8_t max = vpmax_u8(a,a);\n  max = vpmax_u8(max, max);\n  max = vpmax_u8(max, max);\n  return vget_lane_u8(max, 0);\n}\ntemplate<> EIGEN_STRONG_INLINE uint8_t predux_max<Packet16uc>(const Packet16uc& a)\n{\n  uint8x8_t max = vmax_u8(vget_low_u8(a), vget_high_u8(a));\n  max = vpmax_u8(max, max);\n  max = vpmax_u8(max, max);\n  max = vpmax_u8(max, max);\n  return vget_lane_u8(max, 0);\n}\ntemplate<> EIGEN_STRONG_INLINE int16_t predux_max<Packet4s>(const Packet4s& a)\n{\n  const int16x4_t max = vpmax_s16(a,a);\n  return vget_lane_s16(vpmax_s16(max, max), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE int16_t predux_max<Packet8s>(const Packet8s& a)\n{\n  int16x4_t max = vmax_s16(vget_low_s16(a), vget_high_s16(a));\n  max = vpmax_s16(max, max);\n  max = vpmax_s16(max, max);\n  return vget_lane_s16(max, 0);\n}\ntemplate<> EIGEN_STRONG_INLINE uint16_t predux_max<Packet4us>(const Packet4us& a)\n{\n  const uint16x4_t max = vpmax_u16(a,a);\n  return vget_lane_u16(vpmax_u16(max, max), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE uint16_t predux_max<Packet8us>(const Packet8us& a)\n{\n  uint16x4_t max = vmax_u16(vget_low_u16(a), vget_high_u16(a));\n  max = vpmax_u16(max, max);\n  max = vpmax_u16(max, max);\n  return vget_lane_u16(max, 0);\n}\ntemplate<> EIGEN_STRONG_INLINE int32_t predux_max<Packet2i>(const Packet2i& a)\n{ return vget_lane_s32(vpmax_s32(a,a), 0); }\ntemplate<> EIGEN_STRONG_INLINE int32_t predux_max<Packet4i>(const Packet4i& a)\n{\n  const int32x2_t max = vmax_s32(vget_low_s32(a), vget_high_s32(a));\n  return vget_lane_s32(vpmax_s32(max, max), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE uint32_t predux_max<Packet2ui>(const Packet2ui& a)\n{ return vget_lane_u32(vpmax_u32(a,a), 0); }\ntemplate<> EIGEN_STRONG_INLINE uint32_t predux_max<Packet4ui>(const Packet4ui& a)\n{\n  const uint32x2_t max = vmax_u32(vget_low_u32(a), vget_high_u32(a));\n  return vget_lane_u32(vpmax_u32(max, max), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE int64_t predux_max<Packet2l>(const Packet2l& a)\n{ return (std::max)(vgetq_lane_s64(a, 0), vgetq_lane_s64(a, 1)); }\ntemplate<> EIGEN_STRONG_INLINE uint64_t predux_max<Packet2ul>(const Packet2ul& a)\n{ return (std::max)(vgetq_lane_u64(a, 0), vgetq_lane_u64(a, 1)); }\n\ntemplate<> EIGEN_STRONG_INLINE bool predux_any(const Packet4f& x)\n{\n  uint32x2_t tmp = vorr_u32(vget_low_u32( vreinterpretq_u32_f32(x)),\n                            vget_high_u32(vreinterpretq_u32_f32(x)));\n  return vget_lane_u32(vpmax_u32(tmp, tmp), 0);\n}\n\n// this PALIGN_NEON business is to work around a bug in LLVM Clang 3.0 causing incorrect compilation errors,\n// see bug 347 and this LLVM bug: http://llvm.org/bugs/show_bug.cgi?id=11074\n#define PALIGN_NEON(Offset,Type,Command) \\\ntemplate<>\\\nstruct palign_impl<Offset,Type>\\\n{\\\n    EIGEN_STRONG_INLINE static void run(Type& first, const Type& second)\\\n    {\\\n        if (Offset!=0)\\\n            first = Command(first, second, Offset);\\\n    }\\\n};\\\n\ntemplate<typename T>\nEIGEN_STRONG_INLINE T palign_4c(const T& first, const T &second, const int n)\n{\n  return static_cast<T>((static_cast<uint32_t>(second) << (32 - n * 8)) | (static_cast<uint32_t>(first) >> (n * 8)));\n}\n\nPALIGN_NEON(0, Packet2f, vext_f32)\nPALIGN_NEON(1, Packet2f, vext_f32)\n\nPALIGN_NEON(0, Packet4f, vextq_f32)\nPALIGN_NEON(1, Packet4f, vextq_f32)\nPALIGN_NEON(2, Packet4f, vextq_f32)\nPALIGN_NEON(3, Packet4f, vextq_f32)\n\nPALIGN_NEON(0, Packet4c, palign_4c)\nPALIGN_NEON(1, Packet4c, palign_4c)\nPALIGN_NEON(2, Packet4c, palign_4c)\nPALIGN_NEON(3, Packet4c, palign_4c)\n\nPALIGN_NEON(0, Packet8c, vext_s8)\nPALIGN_NEON(1, Packet8c, vext_s8)\nPALIGN_NEON(2, Packet8c, vext_s8)\nPALIGN_NEON(3, Packet8c, vext_s8)\nPALIGN_NEON(4, Packet8c, vext_s8)\nPALIGN_NEON(5, Packet8c, vext_s8)\nPALIGN_NEON(6, Packet8c, vext_s8)\nPALIGN_NEON(7, Packet8c, vext_s8)\n\nPALIGN_NEON(0, Packet16c, vextq_s8)\nPALIGN_NEON(1, Packet16c, vextq_s8)\nPALIGN_NEON(2, Packet16c, vextq_s8)\nPALIGN_NEON(3, Packet16c, vextq_s8)\nPALIGN_NEON(4, Packet16c, vextq_s8)\nPALIGN_NEON(5, Packet16c, vextq_s8)\nPALIGN_NEON(6, Packet16c, vextq_s8)\nPALIGN_NEON(7, Packet16c, vextq_s8)\nPALIGN_NEON(8, Packet16c, vextq_s8)\nPALIGN_NEON(9, Packet16c, vextq_s8)\nPALIGN_NEON(10, Packet16c, vextq_s8)\nPALIGN_NEON(11, Packet16c, vextq_s8)\nPALIGN_NEON(12, Packet16c, vextq_s8)\nPALIGN_NEON(13, Packet16c, vextq_s8)\nPALIGN_NEON(14, Packet16c, vextq_s8)\nPALIGN_NEON(15, Packet16c, vextq_s8)\n\nPALIGN_NEON(0, Packet4uc, palign_4c)\nPALIGN_NEON(1, Packet4uc, palign_4c)\nPALIGN_NEON(2, Packet4uc, palign_4c)\nPALIGN_NEON(3, Packet4uc, palign_4c)\n\nPALIGN_NEON(0, Packet8uc, vext_u8)\nPALIGN_NEON(1, Packet8uc, vext_u8)\nPALIGN_NEON(2, Packet8uc, vext_u8)\nPALIGN_NEON(3, Packet8uc, vext_u8)\nPALIGN_NEON(4, Packet8uc, vext_u8)\nPALIGN_NEON(5, Packet8uc, vext_u8)\nPALIGN_NEON(6, Packet8uc, vext_u8)\nPALIGN_NEON(7, Packet8uc, vext_u8)\n\nPALIGN_NEON(0, Packet16uc, vextq_u8)\nPALIGN_NEON(1, Packet16uc, vextq_u8)\nPALIGN_NEON(2, Packet16uc, vextq_u8)\nPALIGN_NEON(3, Packet16uc, vextq_u8)\nPALIGN_NEON(4, Packet16uc, vextq_u8)\nPALIGN_NEON(5, Packet16uc, vextq_u8)\nPALIGN_NEON(6, Packet16uc, vextq_u8)\nPALIGN_NEON(7, Packet16uc, vextq_u8)\nPALIGN_NEON(8, Packet16uc, vextq_u8)\nPALIGN_NEON(9, Packet16uc, vextq_u8)\nPALIGN_NEON(10, Packet16uc, vextq_u8)\nPALIGN_NEON(11, Packet16uc, vextq_u8)\nPALIGN_NEON(12, Packet16uc, vextq_u8)\nPALIGN_NEON(13, Packet16uc, vextq_u8)\nPALIGN_NEON(14, Packet16uc, vextq_u8)\nPALIGN_NEON(15, Packet16uc, vextq_u8)\n\nPALIGN_NEON(0, Packet4s, vext_s16)\nPALIGN_NEON(1, Packet4s, vext_s16)\nPALIGN_NEON(2, Packet4s, vext_s16)\nPALIGN_NEON(3, Packet4s, vext_s16)\n\nPALIGN_NEON(0, Packet8s, vextq_s16)\nPALIGN_NEON(1, Packet8s, vextq_s16)\nPALIGN_NEON(2, Packet8s, vextq_s16)\nPALIGN_NEON(3, Packet8s, vextq_s16)\nPALIGN_NEON(4, Packet8s, vextq_s16)\nPALIGN_NEON(5, Packet8s, vextq_s16)\nPALIGN_NEON(6, Packet8s, vextq_s16)\nPALIGN_NEON(7, Packet8s, vextq_s16)\n\nPALIGN_NEON(0, Packet4us, vext_u16)\nPALIGN_NEON(1, Packet4us, vext_u16)\nPALIGN_NEON(2, Packet4us, vext_u16)\nPALIGN_NEON(3, Packet4us, vext_u16)\n\nPALIGN_NEON(0, Packet8us, vextq_u16)\nPALIGN_NEON(1, Packet8us, vextq_u16)\nPALIGN_NEON(2, Packet8us, vextq_u16)\nPALIGN_NEON(3, Packet8us, vextq_u16)\nPALIGN_NEON(4, Packet8us, vextq_u16)\nPALIGN_NEON(5, Packet8us, vextq_u16)\nPALIGN_NEON(6, Packet8us, vextq_u16)\nPALIGN_NEON(7, Packet8us, vextq_u16)\n\nPALIGN_NEON(0, Packet2i, vext_s32)\nPALIGN_NEON(1, Packet2i, vext_s32)\n\nPALIGN_NEON(0, Packet4i, vextq_s32)\nPALIGN_NEON(1, Packet4i, vextq_s32)\nPALIGN_NEON(2, Packet4i, vextq_s32)\nPALIGN_NEON(3, Packet4i, vextq_s32)\n\nPALIGN_NEON(0, Packet2ui, vext_u32)\nPALIGN_NEON(1, Packet2ui, vext_u32)\n\nPALIGN_NEON(0, Packet4ui, vextq_u32)\nPALIGN_NEON(1, Packet4ui, vextq_u32)\nPALIGN_NEON(2, Packet4ui, vextq_u32)\nPALIGN_NEON(3, Packet4ui, vextq_u32)\n\nPALIGN_NEON(0, Packet2l, vextq_s64)\nPALIGN_NEON(1, Packet2l, vextq_s64)\n\nPALIGN_NEON(0, Packet2ul, vextq_u64)\nPALIGN_NEON(1, Packet2ul, vextq_u64)\n\n#undef PALIGN_NEON\n\nEIGEN_DEVICE_FUNC inline void ptranspose(PacketBlock<Packet2f, 2>& kernel)\n{\n  const float32x2x2_t z = vzip_f32(kernel.packet[0], kernel.packet[1]);\n  kernel.packet[0] = z.val[0];\n  kernel.packet[1] = z.val[1];\n}\nEIGEN_DEVICE_FUNC inline void ptranspose(PacketBlock<Packet4f, 4>& kernel)\n{\n  const float32x4x2_t tmp1 = vzipq_f32(kernel.packet[0], kernel.packet[1]);\n  const float32x4x2_t tmp2 = vzipq_f32(kernel.packet[2], kernel.packet[3]);\n\n  kernel.packet[0] = vcombine_f32(vget_low_f32(tmp1.val[0]), vget_low_f32(tmp2.val[0]));\n  kernel.packet[1] = vcombine_f32(vget_high_f32(tmp1.val[0]), vget_high_f32(tmp2.val[0]));\n  kernel.packet[2] = vcombine_f32(vget_low_f32(tmp1.val[1]), vget_low_f32(tmp2.val[1]));\n  kernel.packet[3] = vcombine_f32(vget_high_f32(tmp1.val[1]), vget_high_f32(tmp2.val[1]));\n}\nEIGEN_DEVICE_FUNC inline void ptranspose(PacketBlock<Packet4c, 4>& kernel)\n{\n  const int8x8_t a = vreinterpret_s8_s32(vset_lane_s32(kernel.packet[2], vdup_n_s32(kernel.packet[0]), 1));\n  const int8x8_t b = vreinterpret_s8_s32(vset_lane_s32(kernel.packet[3], vdup_n_s32(kernel.packet[1]), 1));\n\n  const int8x8x2_t zip8 = vzip_s8(a,b);\n  const int16x4x2_t zip16 = vzip_s16(vreinterpret_s16_s8(zip8.val[0]), vreinterpret_s16_s8(zip8.val[1]));\n\n  kernel.packet[0] = vget_lane_s32(vreinterpret_s32_s16(zip16.val[0]), 0);\n  kernel.packet[1] = vget_lane_s32(vreinterpret_s32_s16(zip16.val[0]), 1);\n  kernel.packet[2] = vget_lane_s32(vreinterpret_s32_s16(zip16.val[1]), 0);\n  kernel.packet[3] = vget_lane_s32(vreinterpret_s32_s16(zip16.val[1]), 1);\n}\nEIGEN_DEVICE_FUNC inline void ptranspose(PacketBlock<Packet8c, 8>& kernel)\n{\n  int8x8x2_t zip8[4];\n  uint16x4x2_t zip16[4];\n\n  EIGEN_UNROLL_LOOP\n  for (int i = 0; i != 4; i++)\n    zip8[i] = vzip_s8(kernel.packet[i*2], kernel.packet[i*2+1]);\n\n  EIGEN_UNROLL_LOOP\n  for (int i = 0; i != 2; i++)\n  {\n    EIGEN_UNROLL_LOOP\n    for (int j = 0; j != 2; j++)\n      zip16[i*2+j] = vzip_u16(vreinterpret_u16_s8(zip8[i*2].val[j]), vreinterpret_u16_s8(zip8[i*2+1].val[j]));\n  }\n\n  EIGEN_UNROLL_LOOP\n  for (int i = 0; i != 2; i++)\n  {\n    EIGEN_UNROLL_LOOP\n    for (int j = 0; j != 2; j++)\n    {\n      const uint32x2x2_t z = vzip_u32(vreinterpret_u32_u16(zip16[i].val[j]), vreinterpret_u32_u16(zip16[i+2].val[j]));\n      EIGEN_UNROLL_LOOP\n      for (int k = 0; k != 2; k++)\n        kernel.packet[i*4+j*2+k] = vreinterpret_s8_u32(z.val[k]);\n    }\n  }\n}\nEIGEN_DEVICE_FUNC inline void ptranspose(PacketBlock<Packet16c, 16>& kernel)\n{\n  int8x16x2_t zip8[8];\n  uint16x8x2_t zip16[8];\n  uint32x4x2_t zip32[8];\n\n  EIGEN_UNROLL_LOOP\n  for (int i = 0; i != 8; i++)\n    zip8[i] = vzipq_s8(kernel.packet[i*2], kernel.packet[i*2+1]);\n\n  EIGEN_UNROLL_LOOP\n  for (int i = 0; i != 4; i++)\n  {\n    EIGEN_UNROLL_LOOP\n    for (int j = 0; j != 2; j++)\n    {\n      zip16[i*2+j] = vzipq_u16(vreinterpretq_u16_s8(zip8[i*2].val[j]),\n          vreinterpretq_u16_s8(zip8[i*2+1].val[j]));\n    }\n  }\n\n  EIGEN_UNROLL_LOOP\n  for (int i = 0; i != 2; i++)\n  {\n    EIGEN_UNROLL_LOOP\n    for (int j = 0; j != 2; j++)\n    {\n      EIGEN_UNROLL_LOOP\n      for (int k = 0; k != 2; k++)\n        zip32[i*4+j*2+k] = vzipq_u32(vreinterpretq_u32_u16(zip16[i*4+j].val[k]),\n            vreinterpretq_u32_u16(zip16[i*4+j+2].val[k]));\n    }\n  }\n\n  EIGEN_UNROLL_LOOP\n  for (int i = 0; i != 4; i++)\n  {\n    EIGEN_UNROLL_LOOP\n    for (int j = 0; j != 2; j++)\n    {\n      kernel.packet[i*4+j*2] = vreinterpretq_s8_u32(vcombine_u32(vget_low_u32(zip32[i].val[j]),\n          vget_low_u32(zip32[i+4].val[j])));\n      kernel.packet[i*4+j*2+1] = vreinterpretq_s8_u32(vcombine_u32(vget_high_u32(zip32[i].val[j]),\n          vget_high_u32(zip32[i+4].val[j])));\n    }\n  }\n}\nEIGEN_DEVICE_FUNC inline void ptranspose(PacketBlock<Packet4uc, 4>& kernel)\n{\n  const uint8x8_t a = vreinterpret_u8_u32(vset_lane_u32(kernel.packet[2], vdup_n_u32(kernel.packet[0]), 1));\n  const uint8x8_t b = vreinterpret_u8_u32(vset_lane_u32(kernel.packet[3], vdup_n_u32(kernel.packet[1]), 1));\n\n  const uint8x8x2_t zip8 = vzip_u8(a,b);\n  const uint16x4x2_t zip16 = vzip_u16(vreinterpret_u16_u8(zip8.val[0]), vreinterpret_u16_u8(zip8.val[1]));\n\n  kernel.packet[0] = vget_lane_u32(vreinterpret_u32_u16(zip16.val[0]), 0);\n  kernel.packet[1] = vget_lane_u32(vreinterpret_u32_u16(zip16.val[0]), 1);\n  kernel.packet[2] = vget_lane_u32(vreinterpret_u32_u16(zip16.val[1]), 0);\n  kernel.packet[3] = vget_lane_u32(vreinterpret_u32_u16(zip16.val[1]), 1);\n}\nEIGEN_DEVICE_FUNC inline void ptranspose(PacketBlock<Packet8uc, 8>& kernel)\n{\n  uint8x8x2_t zip8[4];\n  uint16x4x2_t zip16[4];\n\n  EIGEN_UNROLL_LOOP\n  for (int i = 0; i != 4; i++)\n    zip8[i] = vzip_u8(kernel.packet[i*2], kernel.packet[i*2+1]);\n\n  EIGEN_UNROLL_LOOP\n  for (int i = 0; i != 2; i++)\n  {\n    EIGEN_UNROLL_LOOP\n    for (int j = 0; j != 2; j++)\n      zip16[i*2+j] = vzip_u16(vreinterpret_u16_u8(zip8[i*2].val[j]), vreinterpret_u16_u8(zip8[i*2+1].val[j]));\n  }\n\n  EIGEN_UNROLL_LOOP\n  for (int i = 0; i != 2; i++)\n  {\n    EIGEN_UNROLL_LOOP\n    for (int j = 0; j != 2; j++)\n    {\n      const uint32x2x2_t z = vzip_u32(vreinterpret_u32_u16(zip16[i].val[j]), vreinterpret_u32_u16(zip16[i+2].val[j]));\n      EIGEN_UNROLL_LOOP\n      for (int k = 0; k != 2; k++)\n        kernel.packet[i*4+j*2+k] = vreinterpret_u8_u32(z.val[k]);\n    }\n  }\n}\nEIGEN_DEVICE_FUNC inline void ptranspose(PacketBlock<Packet16uc, 16>& kernel)\n{\n  uint8x16x2_t zip8[8];\n  uint16x8x2_t zip16[8];\n  uint32x4x2_t zip32[8];\n\n  EIGEN_UNROLL_LOOP\n  for (int i = 0; i != 8; i++)\n    zip8[i] = vzipq_u8(kernel.packet[i*2], kernel.packet[i*2+1]);\n\n  EIGEN_UNROLL_LOOP\n  for (int i = 0; i != 4; i++)\n  {\n    EIGEN_UNROLL_LOOP\n    for (int j = 0; j != 2; j++)\n      zip16[i*2+j] = vzipq_u16(vreinterpretq_u16_u8(zip8[i*2].val[j]),\n          vreinterpretq_u16_u8(zip8[i*2+1].val[j]));\n  }\n\n  EIGEN_UNROLL_LOOP\n  for (int i = 0; i != 2; i++)\n  {\n    EIGEN_UNROLL_LOOP\n    for (int j = 0; j != 2; j++)\n    {\n      EIGEN_UNROLL_LOOP\n      for (int k = 0; k != 2; k++)\n        zip32[i*4+j*2+k] = vzipq_u32(vreinterpretq_u32_u16(zip16[i*4+j].val[k]),\n            vreinterpretq_u32_u16(zip16[i*4+j+2].val[k]));\n    }\n  }\n\n  EIGEN_UNROLL_LOOP\n  for (int i = 0; i != 4; i++)\n  {\n    EIGEN_UNROLL_LOOP\n    for (int j = 0; j != 2; j++)\n    {\n      kernel.packet[i*4+j*2] = vreinterpretq_u8_u32(vcombine_u32(vget_low_u32(zip32[i].val[j]),\n          vget_low_u32(zip32[i+4].val[j])));\n      kernel.packet[i*4+j*2+1] = vreinterpretq_u8_u32(vcombine_u32(vget_high_u32(zip32[i].val[j]),\n          vget_high_u32(zip32[i+4].val[j])));\n    }\n  }\n}\nEIGEN_DEVICE_FUNC inline void ptranspose(PacketBlock<Packet4s, 4>& kernel)\n{\n  const int16x4x2_t zip16_1 = vzip_s16(kernel.packet[0], kernel.packet[1]);\n  const int16x4x2_t zip16_2 = vzip_s16(kernel.packet[2], kernel.packet[3]);\n\n  const uint32x2x2_t zip32_1 = vzip_u32(vreinterpret_u32_s16(zip16_1.val[0]), vreinterpret_u32_s16(zip16_2.val[0]));\n  const uint32x2x2_t zip32_2 = vzip_u32(vreinterpret_u32_s16(zip16_1.val[1]), vreinterpret_u32_s16(zip16_2.val[1]));\n\n  kernel.packet[0] = vreinterpret_s16_u32(zip32_1.val[0]);\n  kernel.packet[1] = vreinterpret_s16_u32(zip32_1.val[1]);\n  kernel.packet[2] = vreinterpret_s16_u32(zip32_2.val[0]);\n  kernel.packet[3] = vreinterpret_s16_u32(zip32_2.val[1]);\n}\nEIGEN_DEVICE_FUNC inline void ptranspose(PacketBlock<Packet8s, 8>& kernel)\n{\n  const int16x8x2_t zip16_1 = vzipq_s16(kernel.packet[0], kernel.packet[1]);\n  const int16x8x2_t zip16_2 = vzipq_s16(kernel.packet[2], kernel.packet[3]);\n  const int16x8x2_t zip16_3 = vzipq_s16(kernel.packet[4], kernel.packet[5]);\n  const int16x8x2_t zip16_4 = vzipq_s16(kernel.packet[6], kernel.packet[7]);\n\n  const uint32x4x2_t zip32_1 = vzipq_u32(vreinterpretq_u32_s16(zip16_1.val[0]), vreinterpretq_u32_s16(zip16_2.val[0]));\n  const uint32x4x2_t zip32_2 = vzipq_u32(vreinterpretq_u32_s16(zip16_1.val[1]), vreinterpretq_u32_s16(zip16_2.val[1]));\n  const uint32x4x2_t zip32_3 = vzipq_u32(vreinterpretq_u32_s16(zip16_3.val[0]), vreinterpretq_u32_s16(zip16_4.val[0]));\n  const uint32x4x2_t zip32_4 = vzipq_u32(vreinterpretq_u32_s16(zip16_3.val[1]), vreinterpretq_u32_s16(zip16_4.val[1]));\n\n  kernel.packet[0] = vreinterpretq_s16_u32(vcombine_u32(vget_low_u32(zip32_1.val[0]), vget_low_u32(zip32_3.val[0])));\n  kernel.packet[1] = vreinterpretq_s16_u32(vcombine_u32(vget_high_u32(zip32_1.val[0]), vget_high_u32(zip32_3.val[0])));\n  kernel.packet[2] = vreinterpretq_s16_u32(vcombine_u32(vget_low_u32(zip32_1.val[1]), vget_low_u32(zip32_3.val[1])));\n  kernel.packet[3] = vreinterpretq_s16_u32(vcombine_u32(vget_high_u32(zip32_1.val[1]), vget_high_u32(zip32_3.val[1])));\n  kernel.packet[4] = vreinterpretq_s16_u32(vcombine_u32(vget_low_u32(zip32_2.val[0]), vget_low_u32(zip32_4.val[0])));\n  kernel.packet[5] = vreinterpretq_s16_u32(vcombine_u32(vget_high_u32(zip32_2.val[0]), vget_high_u32(zip32_4.val[0])));\n  kernel.packet[6] = vreinterpretq_s16_u32(vcombine_u32(vget_low_u32(zip32_2.val[1]), vget_low_u32(zip32_4.val[1])));\n  kernel.packet[7] = vreinterpretq_s16_u32(vcombine_u32(vget_high_u32(zip32_2.val[1]), vget_high_u32(zip32_4.val[1])));\n}\nEIGEN_DEVICE_FUNC inline void ptranspose(PacketBlock<Packet4us, 4>& kernel)\n{\n  const uint16x4x2_t zip16_1 = vzip_u16(kernel.packet[0], kernel.packet[1]);\n  const uint16x4x2_t zip16_2 = vzip_u16(kernel.packet[2], kernel.packet[3]);\n\n  const uint32x2x2_t zip32_1 = vzip_u32(vreinterpret_u32_u16(zip16_1.val[0]), vreinterpret_u32_u16(zip16_2.val[0]));\n  const uint32x2x2_t zip32_2 = vzip_u32(vreinterpret_u32_u16(zip16_1.val[1]), vreinterpret_u32_u16(zip16_2.val[1]));\n\n  kernel.packet[0] = vreinterpret_u16_u32(zip32_1.val[0]);\n  kernel.packet[1] = vreinterpret_u16_u32(zip32_1.val[1]);\n  kernel.packet[2] = vreinterpret_u16_u32(zip32_2.val[0]);\n  kernel.packet[3] = vreinterpret_u16_u32(zip32_2.val[1]);\n}\nEIGEN_DEVICE_FUNC inline void ptranspose(PacketBlock<Packet8us, 8>& kernel)\n{\n  const uint16x8x2_t zip16_1 = vzipq_u16(kernel.packet[0], kernel.packet[1]);\n  const uint16x8x2_t zip16_2 = vzipq_u16(kernel.packet[2], kernel.packet[3]);\n  const uint16x8x2_t zip16_3 = vzipq_u16(kernel.packet[4], kernel.packet[5]);\n  const uint16x8x2_t zip16_4 = vzipq_u16(kernel.packet[6], kernel.packet[7]);\n\n  const uint32x4x2_t zip32_1 = vzipq_u32(vreinterpretq_u32_u16(zip16_1.val[0]), vreinterpretq_u32_u16(zip16_2.val[0]));\n  const uint32x4x2_t zip32_2 = vzipq_u32(vreinterpretq_u32_u16(zip16_1.val[1]), vreinterpretq_u32_u16(zip16_2.val[1]));\n  const uint32x4x2_t zip32_3 = vzipq_u32(vreinterpretq_u32_u16(zip16_3.val[0]), vreinterpretq_u32_u16(zip16_4.val[0]));\n  const uint32x4x2_t zip32_4 = vzipq_u32(vreinterpretq_u32_u16(zip16_3.val[1]), vreinterpretq_u32_u16(zip16_4.val[1]));\n\n  kernel.packet[0] = vreinterpretq_u16_u32(vcombine_u32(vget_low_u32(zip32_1.val[0]), vget_low_u32(zip32_3.val[0])));\n  kernel.packet[1] = vreinterpretq_u16_u32(vcombine_u32(vget_high_u32(zip32_1.val[0]), vget_high_u32(zip32_3.val[0])));\n  kernel.packet[2] = vreinterpretq_u16_u32(vcombine_u32(vget_low_u32(zip32_1.val[1]), vget_low_u32(zip32_3.val[1])));\n  kernel.packet[3] = vreinterpretq_u16_u32(vcombine_u32(vget_high_u32(zip32_1.val[1]), vget_high_u32(zip32_3.val[1])));\n  kernel.packet[4] = vreinterpretq_u16_u32(vcombine_u32(vget_low_u32(zip32_2.val[0]), vget_low_u32(zip32_4.val[0])));\n  kernel.packet[5] = vreinterpretq_u16_u32(vcombine_u32(vget_high_u32(zip32_2.val[0]), vget_high_u32(zip32_4.val[0])));\n  kernel.packet[6] = vreinterpretq_u16_u32(vcombine_u32(vget_low_u32(zip32_2.val[1]), vget_low_u32(zip32_4.val[1])));\n  kernel.packet[7] = vreinterpretq_u16_u32(vcombine_u32(vget_high_u32(zip32_2.val[1]), vget_high_u32(zip32_4.val[1])));\n}\nEIGEN_DEVICE_FUNC inline void ptranspose(PacketBlock<Packet2i, 2>& kernel)\n{\n  const int32x2x2_t z = vzip_s32(kernel.packet[0], kernel.packet[1]);\n  kernel.packet[0] = z.val[0];\n  kernel.packet[1] = z.val[1];\n}\nEIGEN_DEVICE_FUNC inline void ptranspose(PacketBlock<Packet4i, 4>& kernel)\n{\n  const int32x4x2_t tmp1 = vzipq_s32(kernel.packet[0], kernel.packet[1]);\n  const int32x4x2_t tmp2 = vzipq_s32(kernel.packet[2], kernel.packet[3]);\n\n  kernel.packet[0] = vcombine_s32(vget_low_s32(tmp1.val[0]), vget_low_s32(tmp2.val[0]));\n  kernel.packet[1] = vcombine_s32(vget_high_s32(tmp1.val[0]), vget_high_s32(tmp2.val[0]));\n  kernel.packet[2] = vcombine_s32(vget_low_s32(tmp1.val[1]), vget_low_s32(tmp2.val[1]));\n  kernel.packet[3] = vcombine_s32(vget_high_s32(tmp1.val[1]), vget_high_s32(tmp2.val[1]));\n}\nEIGEN_DEVICE_FUNC inline void ptranspose(PacketBlock<Packet2ui, 2>& kernel)\n{\n  const uint32x2x2_t z = vzip_u32(kernel.packet[0], kernel.packet[1]);\n  kernel.packet[0] = z.val[0];\n  kernel.packet[1] = z.val[1];\n}\nEIGEN_DEVICE_FUNC inline void ptranspose(PacketBlock<Packet4ui, 4>& kernel)\n{\n  const uint32x4x2_t tmp1 = vzipq_u32(kernel.packet[0], kernel.packet[1]);\n  const uint32x4x2_t tmp2 = vzipq_u32(kernel.packet[2], kernel.packet[3]);\n\n  kernel.packet[0] = vcombine_u32(vget_low_u32(tmp1.val[0]), vget_low_u32(tmp2.val[0]));\n  kernel.packet[1] = vcombine_u32(vget_high_u32(tmp1.val[0]), vget_high_u32(tmp2.val[0]));\n  kernel.packet[2] = vcombine_u32(vget_low_u32(tmp1.val[1]), vget_low_u32(tmp2.val[1]));\n  kernel.packet[3] = vcombine_u32(vget_high_u32(tmp1.val[1]), vget_high_u32(tmp2.val[1]));\n}\nEIGEN_DEVICE_FUNC inline void\nptranspose(PacketBlock<Packet2l, 2>& kernel)\n{\n#if EIGEN_ARCH_ARM64\n  const int64x2_t tmp1 = vzip1q_s64(kernel.packet[0], kernel.packet[1]);\n  const int64x2_t tmp2 = vzip2q_s64(kernel.packet[0], kernel.packet[1]);\n\n  kernel.packet[0] = tmp1;\n  kernel.packet[1] = tmp2;\n#else\n  const int64x1_t tmp[2][2] = {\n    { vget_low_s64(kernel.packet[0]), vget_high_s64(kernel.packet[0]) },\n    { vget_low_s64(kernel.packet[1]), vget_high_s64(kernel.packet[1]) }\n  };\n\n  kernel.packet[0] = vcombine_s64(tmp[0][0], tmp[1][0]);\n  kernel.packet[1] = vcombine_s64(tmp[0][1], tmp[1][1]);\n#endif\n}\nEIGEN_DEVICE_FUNC inline void\nptranspose(PacketBlock<Packet2ul, 2>& kernel)\n{\n#if EIGEN_ARCH_ARM64\n  const uint64x2_t tmp1 = vzip1q_u64(kernel.packet[0], kernel.packet[1]);\n  const uint64x2_t tmp2 = vzip2q_u64(kernel.packet[0], kernel.packet[1]);\n\n  kernel.packet[0] = tmp1;\n  kernel.packet[1] = tmp2;\n#else\n  const uint64x1_t tmp[2][2] = {\n    { vget_low_u64(kernel.packet[0]), vget_high_u64(kernel.packet[0]) },\n    { vget_low_u64(kernel.packet[1]), vget_high_u64(kernel.packet[1]) }\n  };\n\n  kernel.packet[0] = vcombine_u64(tmp[0][0], tmp[1][0]);\n  kernel.packet[1] = vcombine_u64(tmp[0][1], tmp[1][1]);\n#endif\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline Packet2f pselect( const Packet2f& mask, const Packet2f& a, const Packet2f& b)\n{ return vbsl_f32(vreinterpret_u32_f32(mask), a, b); }\ntemplate<> EIGEN_DEVICE_FUNC inline Packet4f pselect(const Packet4f& mask, const Packet4f& a, const Packet4f& b)\n{ return vbslq_f32(vreinterpretq_u32_f32(mask), a, b); }\ntemplate<> EIGEN_DEVICE_FUNC inline Packet8c pselect(const Packet8c& mask, const Packet8c& a, const Packet8c& b)\n{ return vbsl_s8(vreinterpret_u8_s8(mask), a, b); }\ntemplate<> EIGEN_DEVICE_FUNC inline Packet16c pselect(const Packet16c& mask, const Packet16c& a, const Packet16c& b)\n{ return vbslq_s8(vreinterpretq_u8_s8(mask), a, b); }\ntemplate<> EIGEN_DEVICE_FUNC inline Packet8uc pselect(const Packet8uc& mask, const Packet8uc& a, const Packet8uc& b)\n{ return vbsl_u8(mask, a, b); }\ntemplate<> EIGEN_DEVICE_FUNC inline Packet16uc pselect(const Packet16uc& mask, const Packet16uc& a, const Packet16uc& b)\n{ return vbslq_u8(mask, a, b); }\ntemplate<> EIGEN_DEVICE_FUNC inline Packet4s pselect(const Packet4s& mask, const Packet4s& a, const Packet4s& b)\n{ return vbsl_s16(vreinterpret_u16_s16(mask), a, b); }\ntemplate<> EIGEN_DEVICE_FUNC inline Packet8s pselect(const Packet8s& mask, const Packet8s& a, const Packet8s& b)\n{ return vbslq_s16(vreinterpretq_u16_s16(mask), a, b); }\ntemplate<> EIGEN_DEVICE_FUNC inline Packet4us pselect(const Packet4us& mask, const Packet4us& a, const Packet4us& b)\n{ return vbsl_u16(mask, a, b); }\ntemplate<> EIGEN_DEVICE_FUNC inline Packet8us pselect(const Packet8us& mask, const Packet8us& a, const Packet8us& b)\n{ return vbslq_u16(mask, a, b); }\ntemplate<> EIGEN_DEVICE_FUNC inline Packet2i pselect(const Packet2i& mask, const Packet2i& a, const Packet2i& b)\n{ return vbsl_s32(vreinterpret_u32_s32(mask), a, b); }\ntemplate<> EIGEN_DEVICE_FUNC inline Packet4i pselect(const Packet4i& mask, const Packet4i& a, const Packet4i& b)\n{ return vbslq_s32(vreinterpretq_u32_s32(mask), a, b); }\ntemplate<> EIGEN_DEVICE_FUNC inline Packet2ui pselect(const Packet2ui& mask, const Packet2ui& a, const Packet2ui& b)\n{ return vbsl_u32(mask, a, b); }\ntemplate<> EIGEN_DEVICE_FUNC inline Packet4ui pselect(const Packet4ui& mask, const Packet4ui& a, const Packet4ui& b)\n{ return vbslq_u32(mask, a, b); }\ntemplate<> EIGEN_DEVICE_FUNC inline Packet2l pselect(const Packet2l& mask, const Packet2l& a, const Packet2l& b)\n{ return vbslq_s64(vreinterpretq_u64_s64(mask), a, b); }\ntemplate<> EIGEN_DEVICE_FUNC inline Packet2ul pselect(const Packet2ul& mask, const Packet2ul& a, const Packet2ul& b)\n{ return vbslq_u64(mask, a, b); }\n\nEIGEN_DEVICE_FUNC inline Packet2f pinsertfirst(const Packet2f& a, float b) { return vset_lane_f32(b, a, 0); }\nEIGEN_DEVICE_FUNC inline Packet4f pinsertfirst(const Packet4f& a, float b) { return vsetq_lane_f32(b, a, 0); }\nEIGEN_DEVICE_FUNC inline Packet4c pinsertfirst(const Packet4c& a, int8_t b)\n{\n  return static_cast<int32_t>((static_cast<uint32_t>(a) & 0xffffff00u) |\n      (static_cast<uint32_t>(b) & 0xffu));\n}\nEIGEN_DEVICE_FUNC inline Packet8c pinsertfirst(const Packet8c& a, int8_t b) { return vset_lane_s8(b, a, 0); }\nEIGEN_DEVICE_FUNC inline Packet16c pinsertfirst(const Packet16c& a, int8_t b) { return vsetq_lane_s8(b, a, 0); }\nEIGEN_DEVICE_FUNC inline Packet4uc pinsertfirst(const Packet4uc& a, uint8_t b) { return (a & ~0xffu) | b; }\nEIGEN_DEVICE_FUNC inline Packet8uc pinsertfirst(const Packet8uc& a, uint8_t b) { return vset_lane_u8(b, a, 0); }\nEIGEN_DEVICE_FUNC inline Packet16uc pinsertfirst(const Packet16uc& a, uint8_t b) { return vsetq_lane_u8(b, a, 0); }\nEIGEN_DEVICE_FUNC inline Packet4s pinsertfirst(const Packet4s& a, int16_t b) { return vset_lane_s16(b, a, 0); }\nEIGEN_DEVICE_FUNC inline Packet8s pinsertfirst(const Packet8s& a, int16_t b) { return vsetq_lane_s16(b, a, 0); }\nEIGEN_DEVICE_FUNC inline Packet4us pinsertfirst(const Packet4us& a, uint16_t b) { return vset_lane_u16(b, a, 0); }\nEIGEN_DEVICE_FUNC inline Packet8us pinsertfirst(const Packet8us& a, uint16_t b) { return vsetq_lane_u16(b, a, 0); }\nEIGEN_DEVICE_FUNC inline Packet2i pinsertfirst(const Packet2i& a, int32_t b) { return vset_lane_s32(b, a, 0); }\nEIGEN_DEVICE_FUNC inline Packet4i pinsertfirst(const Packet4i& a, int32_t b) { return vsetq_lane_s32(b, a, 0); }\nEIGEN_DEVICE_FUNC inline Packet2ui pinsertfirst(const Packet2ui& a, uint32_t b) { return vset_lane_u32(b, a, 0); }\nEIGEN_DEVICE_FUNC inline Packet4ui pinsertfirst(const Packet4ui& a, uint32_t b) { return vsetq_lane_u32(b, a, 0); }\nEIGEN_DEVICE_FUNC inline Packet2l pinsertfirst(const Packet2l& a, int64_t b) { return vsetq_lane_s64(b, a, 0); }\nEIGEN_DEVICE_FUNC inline Packet2ul pinsertfirst(const Packet2ul& a, uint64_t b) { return vsetq_lane_u64(b, a, 0); }\n\nEIGEN_DEVICE_FUNC inline Packet2f pinsertlast(const Packet2f& a, float b) { return vset_lane_f32(b, a, 1); }\nEIGEN_DEVICE_FUNC inline Packet4f pinsertlast(const Packet4f& a, float b) { return vsetq_lane_f32(b, a, 3); }\nEIGEN_DEVICE_FUNC inline Packet4c pinsertlast(const Packet4c& a, int8_t b)\n{ return (static_cast<uint32_t>(a) & 0x00ffffffu) | (static_cast<uint32_t>(b) << 24); }\nEIGEN_DEVICE_FUNC inline Packet8c pinsertlast(const Packet8c& a, int8_t b) { return vset_lane_s8(b, a, 7); }\nEIGEN_DEVICE_FUNC inline Packet16c pinsertlast(const Packet16c& a, int8_t b) { return vsetq_lane_s8(b, a, 15); }\nEIGEN_DEVICE_FUNC inline Packet4uc pinsertlast(const Packet4uc& a, uint8_t b) { return (a & ~0xff000000u) | (b << 24); }\nEIGEN_DEVICE_FUNC inline Packet8uc pinsertlast(const Packet8uc& a, uint8_t b) { return vset_lane_u8(b, a, 7); }\nEIGEN_DEVICE_FUNC inline Packet16uc pinsertlast(const Packet16uc& a, uint8_t b) { return vsetq_lane_u8(b, a, 15); }\nEIGEN_DEVICE_FUNC inline Packet4s pinsertlast(const Packet4s& a, int16_t b) { return vset_lane_s16(b, a, 3); }\nEIGEN_DEVICE_FUNC inline Packet8s pinsertlast(const Packet8s& a, int16_t b) { return vsetq_lane_s16(b, a, 7); }\nEIGEN_DEVICE_FUNC inline Packet4us pinsertlast(const Packet4us& a, uint16_t b) { return vset_lane_u16(b, a, 3); }\nEIGEN_DEVICE_FUNC inline Packet8us pinsertlast(const Packet8us& a, uint16_t b) { return vsetq_lane_u16(b, a, 7); }\nEIGEN_DEVICE_FUNC inline Packet2i pinsertlast(const Packet2i& a, int32_t b) { return vset_lane_s32(b, a, 1); }\nEIGEN_DEVICE_FUNC inline Packet4i pinsertlast(const Packet4i& a, int32_t b) { return vsetq_lane_s32(b, a, 3); }\nEIGEN_DEVICE_FUNC inline Packet2ui pinsertlast(const Packet2ui& a, uint32_t b) { return vset_lane_u32(b, a, 1); }\nEIGEN_DEVICE_FUNC inline Packet4ui pinsertlast(const Packet4ui& a, uint32_t b) { return vsetq_lane_u32(b, a, 3); }\nEIGEN_DEVICE_FUNC inline Packet2l pinsertlast(const Packet2l& a, int64_t b) { return vsetq_lane_s64(b, a, 1); }\nEIGEN_DEVICE_FUNC inline Packet2ul pinsertlast(const Packet2ul& a, uint64_t b) { return vsetq_lane_u64(b, a, 1); }\n\n/**\n * Computes the integer square root\n * @remarks The calculation is performed using an algorithm which iterates through each binary digit of the result\n *   and tests whether setting that digit to 1 would cause the square of the value to be greater than the argument\n *   value. The algorithm is described in detail here: http://ww1.microchip.com/downloads/en/AppNotes/91040a.pdf .\n */\ntemplate<> EIGEN_STRONG_INLINE Packet4uc psqrt(const Packet4uc& a) {\n  uint8x8_t x = vreinterpret_u8_u32(vdup_n_u32(a));\n  uint8x8_t res = vdup_n_u8(0);\n  uint8x8_t add = vdup_n_u8(0x8);\n  for (int i = 0; i < 4; i++)\n  {\n    const uint8x8_t temp = vorr_u8(res, add);\n    res = vbsl_u8(vcge_u8(x, vmul_u8(temp, temp)), temp, res);\n    add = vshr_n_u8(add, 1);\n  }\n  return vget_lane_u32(vreinterpret_u32_u8(res), 0);\n}\n/// @copydoc Eigen::internal::psqrt(const Packet4uc& a)\ntemplate<> EIGEN_STRONG_INLINE Packet8uc psqrt(const Packet8uc& a) {\n  uint8x8_t res = vdup_n_u8(0);\n  uint8x8_t add = vdup_n_u8(0x8);\n  for (int i = 0; i < 4; i++)\n  {\n    const uint8x8_t temp = vorr_u8(res, add);\n    res = vbsl_u8(vcge_u8(a, vmul_u8(temp, temp)), temp, res);\n    add = vshr_n_u8(add, 1);\n  }\n  return res;\n}\n/// @copydoc Eigen::internal::psqrt(const Packet4uc& a)\ntemplate<> EIGEN_STRONG_INLINE Packet16uc psqrt(const Packet16uc& a) {\n  uint8x16_t res = vdupq_n_u8(0);\n  uint8x16_t add = vdupq_n_u8(0x8);\n  for (int i = 0; i < 4; i++)\n  {\n    const uint8x16_t temp = vorrq_u8(res, add);\n    res = vbslq_u8(vcgeq_u8(a, vmulq_u8(temp, temp)), temp, res);\n    add = vshrq_n_u8(add, 1);\n  }\n  return res;\n}\n/// @copydoc Eigen::internal::psqrt(const Packet4uc& a)\ntemplate<> EIGEN_STRONG_INLINE Packet4us psqrt(const Packet4us& a) {\n  uint16x4_t res = vdup_n_u16(0);\n  uint16x4_t add = vdup_n_u16(0x80);\n  for (int i = 0; i < 8; i++)\n  {\n    const uint16x4_t temp = vorr_u16(res, add);\n    res = vbsl_u16(vcge_u16(a, vmul_u16(temp, temp)), temp, res);\n    add = vshr_n_u16(add, 1);\n  }\n  return res;\n}\n/// @copydoc Eigen::internal::psqrt(const Packet4uc& a)\ntemplate<> EIGEN_STRONG_INLINE Packet8us psqrt(const Packet8us& a) {\n  uint16x8_t res = vdupq_n_u16(0);\n  uint16x8_t add = vdupq_n_u16(0x80);\n  for (int i = 0; i < 8; i++)\n  {\n    const uint16x8_t temp = vorrq_u16(res, add);\n    res = vbslq_u16(vcgeq_u16(a, vmulq_u16(temp, temp)), temp, res);\n    add = vshrq_n_u16(add, 1);\n  }\n  return res;\n}\n/// @copydoc Eigen::internal::psqrt(const Packet4uc& a)\ntemplate<> EIGEN_STRONG_INLINE Packet2ui psqrt(const Packet2ui& a) {\n  uint32x2_t res = vdup_n_u32(0);\n  uint32x2_t add = vdup_n_u32(0x8000);\n  for (int i = 0; i < 16; i++)\n  {\n    const uint32x2_t temp = vorr_u32(res, add);\n    res = vbsl_u32(vcge_u32(a, vmul_u32(temp, temp)), temp, res);\n    add = vshr_n_u32(add, 1);\n  }\n  return res;\n}\n/// @copydoc Eigen::internal::psqrt(const Packet4uc& a)\ntemplate<> EIGEN_STRONG_INLINE Packet4ui psqrt(const Packet4ui& a) {\n  uint32x4_t res = vdupq_n_u32(0);\n  uint32x4_t add = vdupq_n_u32(0x8000);\n  for (int i = 0; i < 16; i++)\n  {\n    const uint32x4_t temp = vorrq_u32(res, add);\n    res = vbslq_u32(vcgeq_u32(a, vmulq_u32(temp, temp)), temp, res);\n    add = vshrq_n_u32(add, 1);\n  }\n  return res;\n}\n\n//---------- double ----------\n\n// Clang 3.5 in the iOS toolchain has an ICE triggered by NEON intrisics for double.\n// Confirmed at least with __apple_build_version__ = 6000054.\n#ifdef __apple_build_version__\n// Let's hope that by the time __apple_build_version__ hits the 601* range, the bug will be fixed.\n// https://gist.github.com/yamaya/2924292 suggests that the 3 first digits are only updated with\n// major toolchain updates.\n#define EIGEN_APPLE_DOUBLE_NEON_BUG (__apple_build_version__ < 6010000)\n#else\n#define EIGEN_APPLE_DOUBLE_NEON_BUG 0\n#endif\n\n#if EIGEN_ARCH_ARM64 && !EIGEN_APPLE_DOUBLE_NEON_BUG\n\n// Bug 907: workaround missing declarations of the following two functions in the ADK\n// Defining these functions as templates ensures that if these intrinsics are\n// already defined in arm_neon.h, then our workaround doesn't cause a conflict\n// and has lower priority in overload resolution.\ntemplate <typename T> uint64x2_t vreinterpretq_u64_f64(T a) { return (uint64x2_t) a; }\n\ntemplate <typename T> float64x2_t vreinterpretq_f64_u64(T a) { return (float64x2_t) a; }\n\ntypedef float64x2_t Packet2d;\ntypedef float64x1_t Packet1d;\n\ntemplate<> struct packet_traits<double>  : default_packet_traits\n{\n  typedef Packet2d type;\n  typedef Packet2d half;\n  enum\n  {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size = 2,\n    HasHalfPacket = 0,\n\n    HasCast      = 1,\n    HasCmp       = 1,\n    HasAdd       = 1,\n    HasSub       = 1,\n    HasShift     = 1,\n    HasMul       = 1,\n    HasNegate    = 1,\n    HasAbs       = 1,\n    HasArg       = 0,\n    HasAbs2      = 1,\n    HasAbsDiff   = 1,\n    HasMin       = 1,\n    HasMax       = 1,\n    HasConj      = 1,\n    HasSetLinear = 0,\n    HasBlend     = 0,\n    HasInsert    = 1,\n    HasReduxp    = 1,\n\n    HasDiv   = 1,\n    HasFloor = 1,\n\n    HasSin  = 0,\n    HasCos  = 0,\n    HasLog  = 0,\n    HasExp  = 0,\n    HasSqrt = 0,\n    HasTanh = 0,\n    HasErf  = 0\n  };\n};\n\ntemplate<> struct unpacket_traits<Packet2d>\n{\n  typedef double type;\n  typedef Packet2d half;\n  typedef Packet2l integer_packet;\n  enum\n  {\n    size = 2,\n    alignment = Aligned16,\n    vectorizable = true,\n    masked_load_available = false,\n    masked_store_available = false\n  };\n};\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d pset1<Packet2d>(const double&  from) { return vdupq_n_f64(from); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d plset<Packet2d>(const double& a)\n{\n  const double c[] = {0.0,1.0};\n  return vaddq_f64(pset1<Packet2d>(a), vld1q_f64(c));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d padd<Packet2d>(const Packet2d& a, const Packet2d& b) { return vaddq_f64(a,b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d psub<Packet2d>(const Packet2d& a, const Packet2d& b) { return vsubq_f64(a,b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d pnegate(const Packet2d& a) { return vnegq_f64(a); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d pconj(const Packet2d& a) { return a; }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d pmul<Packet2d>(const Packet2d& a, const Packet2d& b) { return vmulq_f64(a,b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d pdiv<Packet2d>(const Packet2d& a, const Packet2d& b) { return vdivq_f64(a,b); }\n\n#ifdef __ARM_FEATURE_FMA\n// See bug 936. See above comment about FMA for float.\ntemplate<> EIGEN_STRONG_INLINE Packet2d pmadd(const Packet2d& a, const Packet2d& b, const Packet2d& c)\n{ return vfmaq_f64(c,a,b); }\n#else\ntemplate<> EIGEN_STRONG_INLINE Packet2d pmadd(const Packet2d& a, const Packet2d& b, const Packet2d& c)\n{ return vmlaq_f64(c,a,b); }\n#endif\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d pmin<Packet2d>(const Packet2d& a, const Packet2d& b) { return vminq_f64(a,b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d pmax<Packet2d>(const Packet2d& a, const Packet2d& b) { return vmaxq_f64(a,b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d pfloor<Packet2d>(const Packet2d& a)\n{\n  const Packet2d cst_1 = pset1<Packet2d>(1.0);\n  /* perform a floorf */\n  const Packet2d tmp = vcvtq_f64_s64(vcvtq_s64_f64(a));\n\n  /* if greater, substract 1 */\n  uint64x2_t mask = vcgtq_f64(tmp, a);\n  mask = vandq_u64(mask, vreinterpretq_u64_f64(cst_1));\n  return vsubq_f64(tmp, vreinterpretq_f64_u64(mask));\n}\n\n// Logical Operations are not supported for float, so we have to reinterpret casts using NEON intrinsics\ntemplate<> EIGEN_STRONG_INLINE Packet2d pand<Packet2d>(const Packet2d& a, const Packet2d& b)\n{ return vreinterpretq_f64_u64(vandq_u64(vreinterpretq_u64_f64(a),vreinterpretq_u64_f64(b))); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d por<Packet2d>(const Packet2d& a, const Packet2d& b)\n{ return vreinterpretq_f64_u64(vorrq_u64(vreinterpretq_u64_f64(a),vreinterpretq_u64_f64(b))); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d pxor<Packet2d>(const Packet2d& a, const Packet2d& b)\n{ return vreinterpretq_f64_u64(veorq_u64(vreinterpretq_u64_f64(a),vreinterpretq_u64_f64(b))); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d pandnot<Packet2d>(const Packet2d& a, const Packet2d& b)\n{ return vreinterpretq_f64_u64(vbicq_u64(vreinterpretq_u64_f64(a),vreinterpretq_u64_f64(b))); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d pcmp_le(const Packet2d& a, const Packet2d& b)\n{ return vreinterpretq_f64_u64(vcleq_f64(a,b)); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d pcmp_lt(const Packet2d& a, const Packet2d& b)\n{ return vreinterpretq_f64_u64(vcltq_f64(a,b)); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d pcmp_eq(const Packet2d& a, const Packet2d& b)\n{ return vreinterpretq_f64_u64(vceqq_f64(a,b)); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d pload<Packet2d>(const double* from)\n{ EIGEN_DEBUG_ALIGNED_LOAD return vld1q_f64(from); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d ploadu<Packet2d>(const double* from)\n{ EIGEN_DEBUG_UNALIGNED_LOAD return vld1q_f64(from); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d ploaddup<Packet2d>(const double* from) { return vld1q_dup_f64(from); }\ntemplate<> EIGEN_STRONG_INLINE void pstore<double>(double* to, const Packet2d& from)\n{ EIGEN_DEBUG_ALIGNED_STORE vst1q_f64(to,from); }\n\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<double>(double* to, const Packet2d& from)\n{ EIGEN_DEBUG_UNALIGNED_STORE vst1q_f64(to,from); }\n\ntemplate<> EIGEN_DEVICE_FUNC inline Packet2d pgather<double, Packet2d>(const double* from, Index stride)\n{\n  Packet2d res = pset1<Packet2d>(0.0);\n  res = vld1q_lane_f64(from + 0*stride, res, 0);\n  res = vld1q_lane_f64(from + 1*stride, res, 1);\n  return res;\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<double, Packet2d>(double* to, const Packet2d& from, Index stride)\n{\n  vst1q_lane_f64(to + stride*0, from, 0);\n  vst1q_lane_f64(to + stride*1, from, 1);\n}\n\ntemplate<> EIGEN_STRONG_INLINE void prefetch<double>(const double* addr) { EIGEN_ARM_PREFETCH(addr); }\n\n// FIXME only store the 2 first elements ?\ntemplate<> EIGEN_STRONG_INLINE double pfirst<Packet2d>(const Packet2d& a) { return vgetq_lane_f64(a,0); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d preverse(const Packet2d& a)\n{ return vcombine_f64(vget_high_f64(a), vget_low_f64(a)); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d pabs(const Packet2d& a) { return vabsq_f64(a); }\n\n#if EIGEN_COMP_CLANG && defined(__apple_build_version__)\n// workaround ICE, see bug 907\ntemplate<> EIGEN_STRONG_INLINE double predux<Packet2d>(const Packet2d& a)\n{ return (vget_low_f64(a) + vget_high_f64(a))[0]; }\n#else\ntemplate<> EIGEN_STRONG_INLINE double predux<Packet2d>(const Packet2d& a)\n{ return vget_lane_f64(vget_low_f64(a) + vget_high_f64(a), 0); }\n#endif\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d preduxp<Packet2d>(const Packet2d* vecs)\n{\n  return vaddq_f64(vzip1q_f64(vecs[0], vecs[1]), vzip2q_f64(vecs[0], vecs[1]));\n}\n// Other reduction functions:\n// mul\n#if EIGEN_COMP_CLANG && defined(__apple_build_version__)\ntemplate<> EIGEN_STRONG_INLINE double predux_mul<Packet2d>(const Packet2d& a)\n{ return (vget_low_f64(a) * vget_high_f64(a))[0]; }\n#else\ntemplate<> EIGEN_STRONG_INLINE double predux_mul<Packet2d>(const Packet2d& a)\n{ return vget_lane_f64(vget_low_f64(a) * vget_high_f64(a), 0); }\n#endif\n\n// min\ntemplate<> EIGEN_STRONG_INLINE double predux_min<Packet2d>(const Packet2d& a)\n{ return vgetq_lane_f64(vpminq_f64(a,a), 0); }\n\n// max\ntemplate<> EIGEN_STRONG_INLINE double predux_max<Packet2d>(const Packet2d& a)\n{ return vgetq_lane_f64(vpmaxq_f64(a,a), 0); }\n\n// this PALIGN_NEON business is to work around a bug in LLVM Clang 3.0 causing incorrect compilation errors,\n// see bug 347 and this LLVM bug: http://llvm.org/bugs/show_bug.cgi?id=11074\n#define PALIGN_NEON(Offset,Type,Command) \\\ntemplate<>\\\nstruct palign_impl<Offset,Type>\\\n{\\\n    EIGEN_STRONG_INLINE static void run(Type& first, const Type& second)\\\n    {\\\n        if (Offset!=0)\\\n            first = Command(first, second, Offset);\\\n    }\\\n};\\\n\nPALIGN_NEON(0, Packet2d, vextq_f64)\nPALIGN_NEON(1, Packet2d, vextq_f64)\n#undef PALIGN_NEON\n\nEIGEN_DEVICE_FUNC inline void\nptranspose(PacketBlock<Packet2d, 2>& kernel)\n{\n  const float64x2_t tmp1 = vzip1q_f64(kernel.packet[0], kernel.packet[1]);\n  const float64x2_t tmp2 = vzip2q_f64(kernel.packet[0], kernel.packet[1]);\n\n  kernel.packet[0] = tmp1;\n  kernel.packet[1] = tmp2;\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline Packet2d pselect( const Packet2d& mask, const Packet2d& a, const Packet2d& b)\n{ return vbslq_f64(vreinterpretq_u64_f64(mask), a, b); }\n\nEIGEN_DEVICE_FUNC inline Packet2d pinsertfirst(const Packet2d& a, double b) { return vsetq_lane_f64(b, a, 0); }\n\nEIGEN_DEVICE_FUNC inline Packet2d pinsertlast(const Packet2d& a, double b) { return vsetq_lane_f64(b, a, 1); }\n\n#endif // EIGEN_ARCH_ARM64\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_PACKET_MATH_NEON_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/NEON/TypeCasting.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2018 Rasmus Munk Larsen <rmlarsen@google.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_TYPE_CASTING_NEON_H\n#define EIGEN_TYPE_CASTING_NEON_H\n\nnamespace Eigen {\n\nnamespace internal {\n\ntemplate<> struct type_casting_traits<float,numext::int8_t>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<float,numext::uint8_t>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<float,numext::int16_t>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<float,numext::uint16_t>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<float,numext::int32_t>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<float,numext::uint32_t>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<float,numext::int64_t>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<float,numext::uint64_t>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::int8_t,float>\n{ enum { VectorizedCast = 0, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::int8_t,numext::uint8_t>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::int8_t,numext::int16_t>\n{ enum { VectorizedCast = 0, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::int8_t,numext::uint16_t>\n{ enum { VectorizedCast = 0, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::int8_t,numext::int32_t>\n{ enum { VectorizedCast = 0, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::int8_t,numext::uint32_t>\n{ enum { VectorizedCast = 0, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::uint8_t,float>\n{ enum { VectorizedCast = 0, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::uint8_t,numext::int8_t>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::uint8_t,numext::int16_t>\n{ enum { VectorizedCast = 0, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::uint8_t,numext::uint16_t>\n{ enum { VectorizedCast = 0, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::uint8_t,numext::int32_t>\n{ enum { VectorizedCast = 0, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::uint8_t,numext::uint32_t>\n{ enum { VectorizedCast = 0, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::int16_t,float>\n{ enum { VectorizedCast = 0, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::int16_t,numext::int8_t>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::int16_t,numext::uint8_t>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::int16_t,numext::uint16_t>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::int16_t,numext::int32_t>\n{ enum { VectorizedCast = 0, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::int16_t,numext::uint32_t>\n{ enum { VectorizedCast = 0, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::int16_t,numext::int64_t>\n{ enum { VectorizedCast = 0, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::int16_t,numext::uint64_t>\n{ enum { VectorizedCast = 0, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::uint16_t,float>\n{ enum { VectorizedCast = 0, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::uint16_t,numext::int8_t>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::uint16_t,numext::uint8_t>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::uint16_t,numext::int16_t>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::uint16_t,numext::int32_t>\n{ enum { VectorizedCast = 0, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::uint16_t,numext::uint32_t>\n{ enum { VectorizedCast = 0, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::uint16_t,numext::int64_t>\n{ enum { VectorizedCast = 0, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::uint16_t,numext::uint64_t>\n{ enum { VectorizedCast = 0, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::int32_t,float>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::int32_t,numext::int8_t>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::int32_t,numext::uint8_t>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::int32_t,numext::int16_t>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::int32_t,numext::uint16_t>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::int32_t,numext::uint32_t>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::int32_t,numext::int64_t>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::int32_t,numext::uint64_t>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::uint32_t,float>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::uint32_t,numext::int8_t>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::uint32_t,numext::uint8_t>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::uint32_t,numext::int16_t>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::uint32_t,numext::uint16_t>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::uint32_t,numext::int32_t>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::uint32_t,numext::int64_t>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::uint32_t,numext::uint64_t>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::int64_t,float>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::int64_t,numext::int16_t>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::int64_t,numext::uint16_t>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::int64_t,numext::uint32_t>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::int64_t,numext::uint64_t>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::uint64_t,float>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::uint64_t,numext::int16_t>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::uint64_t,numext::uint16_t>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::uint64_t,numext::int32_t>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\ntemplate<> struct type_casting_traits<numext::uint64_t,numext::int64_t>\n{ enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; };\n\ntemplate<> EIGEN_STRONG_INLINE Packet2f pcast<Packet2i,Packet2f>(const Packet2i& a) { return vcvt_f32_s32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2f pcast<Packet2ui,Packet2f>(const Packet2ui& a) { return vcvt_f32_u32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2f pcast<Packet2l,Packet2f>(const Packet2l& a)\n{ return vcvt_f32_s32(vmovn_s64(a)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2f pcast<Packet2ul,Packet2f>(const Packet2ul& a)\n{ return vcvt_f32_u32(vmovn_u64(a)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pcast<Packet4c,Packet4f>(const Packet4c& a)\n{ return vcvtq_f32_s32(vmovl_s16(vget_low_s16(vmovl_s8(vreinterpret_s8_s32(vdup_n_s32(a)))))); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pcast<Packet4uc,Packet4f>(const Packet4uc& a)\n{ return vcvtq_f32_s32(vreinterpretq_s32_u32(vmovl_u16(vget_low_u16(vmovl_u8(vreinterpret_u8_u32(vdup_n_u32(a))))))); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pcast<Packet4s,Packet4f>(const Packet4s& a)\n{ return vcvtq_f32_s32(vmovl_s16(a)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pcast<Packet4us,Packet4f>(const Packet4us& a)\n{ return vcvtq_f32_s32(vreinterpretq_s32_u32(vmovl_u16(a))); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pcast<Packet4i,Packet4f>(const Packet4i& a) { return vcvtq_f32_s32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pcast<Packet4ui,Packet4f>(const Packet4ui& a) { return vcvtq_f32_u32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4c pcast<Packet4f,Packet4c>(const Packet4f& a)\n{\n  const int16x4_t b = vmovn_s32(vcvtq_s32_f32(a));\n  return vget_lane_s32(vreinterpret_s32_s8(vmovn_s16(vcombine_s16(b, b))), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4c pcast<Packet4uc,Packet4c>(const Packet4uc& a)\n{ return static_cast<Packet4c>(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4c pcast<Packet4s,Packet4c>(const Packet4s& a)\n{ return vget_lane_s32(vreinterpret_s32_s8(vmovn_s16(vcombine_s16(a, a))), 0); }\ntemplate<> EIGEN_STRONG_INLINE Packet4c pcast<Packet4us,Packet4c>(const Packet4us& a)\n{\n  const int16x4_t b = vreinterpret_s16_u16(a);\n  return vget_lane_s32(vreinterpret_s32_s8(vmovn_s16(vcombine_s16(b, b))), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4c pcast<Packet4i,Packet4c>(const Packet4i& a)\n{\n  const int16x4_t b = vmovn_s32(a);\n  return vget_lane_s32(vreinterpret_s32_s8(vmovn_s16(vcombine_s16(b, b))), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4c pcast<Packet4ui,Packet4c>(const Packet4ui& a)\n{\n  const int16x4_t b = vmovn_s32(vreinterpretq_s32_u32(a));\n  return vget_lane_s32(vreinterpret_s32_s8(vmovn_s16(vcombine_s16(b, b))), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet8c pcast<Packet8uc,Packet8c>(const Packet8uc& a) { return vreinterpret_s8_u8(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet8c pcast<Packet8s,Packet8c>(const Packet8s& a) { return vmovn_s16(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet8c pcast<Packet8us,Packet8c>(const Packet8us& a)\n{ return vreinterpret_s8_u8(vmovn_u16(a)); }\ntemplate<> EIGEN_STRONG_INLINE Packet16c pcast<Packet16uc,Packet16c>(const Packet16uc& a)\n{ return vreinterpretq_s8_u8(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4uc pcast<Packet4f,Packet4uc>(const Packet4f& a)\n{\n  const uint16x4_t b = vmovn_u32(vreinterpretq_u32_s32(vcvtq_s32_f32(a)));\n  return vget_lane_u32(vreinterpret_u32_u8(vmovn_u16(vcombine_u16(b, b))), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4uc pcast<Packet4i,Packet4uc>(const Packet4i& a)\n{\n  const uint16x4_t b = vmovn_u32(vreinterpretq_u32_s32(a));\n  return vget_lane_u32(vreinterpret_u32_u8(vmovn_u16(vcombine_u16(b, b))), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4uc pcast<Packet4ui,Packet4uc>(const Packet4ui& a)\n{\n  const uint16x4_t b = vmovn_u32(a);\n  return vget_lane_u32(vreinterpret_u32_u8(vmovn_u16(vcombine_u16(b, b))), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4uc pcast<Packet4c,Packet4uc>(const Packet4c& a)\n{ return static_cast<Packet4uc>(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4uc pcast<Packet4s,Packet4uc>(const Packet4s& a)\n{\n  const uint16x4_t b = vreinterpret_u16_s16(a);\n  return vget_lane_u32(vreinterpret_u32_u8(vmovn_u16(vcombine_u16(b, b))), 0);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4uc pcast<Packet4us,Packet4uc>(const Packet4us& a)\n{ return vget_lane_u32(vreinterpret_u32_u8(vmovn_u16(vcombine_u16(a, a))), 0); }\ntemplate<> EIGEN_STRONG_INLINE Packet8uc pcast<Packet8c,Packet8uc>(const Packet8c& a) { return vreinterpret_u8_s8(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet8uc pcast<Packet8s,Packet8uc>(const Packet8s& a)\n{ return vreinterpret_u8_s8(vmovn_s16(a)); }\ntemplate<> EIGEN_STRONG_INLINE Packet8uc pcast<Packet8us,Packet8uc>(const Packet8us& a) { return vmovn_u16(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet16uc pcast<Packet16c,Packet16uc>(const Packet16c& a)\n{ return vreinterpretq_u8_s8(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4s pcast<Packet4f,Packet4s>(const Packet4f& a)\n{ return vmovn_s32(vcvtq_s32_f32(a)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4s pcast<Packet4c,Packet4s>(const Packet4c& a)\n{ return vget_low_s16(vmovl_s8(vreinterpret_s8_s32(vdup_n_s32(a)))); }\ntemplate<> EIGEN_STRONG_INLINE Packet4s pcast<Packet4uc,Packet4s>(const Packet4uc& a)\n{ return vget_low_s16(vreinterpretq_s16_u16(vmovl_u8(vreinterpret_u8_u32(vdup_n_u32(a))))); }\ntemplate<> EIGEN_STRONG_INLINE Packet4s pcast<Packet4us,Packet4s>(const Packet4us& a)\n{ return vreinterpret_s16_u16(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4s pcast<Packet4i,Packet4s>(const Packet4i& a) { return vmovn_s32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4s pcast<Packet4ui,Packet4s>(const Packet4ui& a)\n{ return vmovn_s32(vreinterpretq_s32_u32(a)); }\ntemplate<> EIGEN_STRONG_INLINE Packet8s pcast<Packet8uc,Packet8s>(const Packet8uc& a)\n{ return vreinterpretq_s16_u16(vmovl_u8(a)); }\ntemplate<> EIGEN_STRONG_INLINE Packet8s pcast<Packet8c,Packet8s>(const Packet8c& a) { return vmovl_s8(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet8s pcast<Packet8us,Packet8s>(const Packet8us& a)\n{ return vreinterpretq_s16_u16(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4us pcast<Packet4f,Packet4us>(const Packet4f& a)\n{ return vmovn_u32(vreinterpretq_u32_s32(vcvtq_s32_f32(a))); }\ntemplate<> EIGEN_STRONG_INLINE Packet4us pcast<Packet4c,Packet4us>(const Packet4c& a)\n{ return vget_low_u16(vreinterpretq_u16_s16(vmovl_s8(vreinterpret_s8_s32(vdup_n_s32(a))))); }\ntemplate<> EIGEN_STRONG_INLINE Packet4us pcast<Packet4uc,Packet4us>(const Packet4uc& a)\n{ return vget_low_u16(vmovl_u8(vreinterpret_u8_u32(vdup_n_u32(a)))); }\ntemplate<> EIGEN_STRONG_INLINE Packet4us pcast<Packet4s,Packet4us>(const Packet4s& a)\n{ return vreinterpret_u16_s16(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4us pcast<Packet4i,Packet4us>(const Packet4i& a)\n{ return vmovn_u32(vreinterpretq_u32_s32(a)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4us pcast<Packet4ui,Packet4us>(const Packet4ui& a) { return vmovn_u32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet8us pcast<Packet8c,Packet8us>(const Packet8c& a)\n{ return vreinterpretq_u16_s16(vmovl_s8(a)); }\ntemplate<> EIGEN_STRONG_INLINE Packet8us pcast<Packet8uc,Packet8us>(const Packet8uc& a) { return vmovl_u8(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet8us pcast<Packet8s,Packet8us>(const Packet8s& a)\n{ return vreinterpretq_u16_s16(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2i pcast<Packet2f,Packet2i>(const Packet2f& a) { return vcvt_s32_f32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2i pcast<Packet2ui,Packet2i>(const Packet2ui& a)\n{ return vreinterpret_s32_u32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2i pcast<Packet2l,Packet2i>(const Packet2l& a)\n{ return vmovn_s64(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2i pcast<Packet2ul,Packet2i>(const Packet2ul& a)\n{ return vmovn_s64(vreinterpretq_s64_u64(a)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pcast<Packet4f,Packet4i>(const Packet4f& a) { return vcvtq_s32_f32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pcast<Packet4c,Packet4i>(const Packet4c& a)\n{ return vmovl_s16(vget_low_s16(vmovl_s8(vreinterpret_s8_s32(vdup_n_s32(a))))); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pcast<Packet4uc,Packet4i>(const Packet4uc& a)\n{ return vreinterpretq_s32_u32(vmovl_u16(vget_low_u16(vmovl_u8(vreinterpret_u8_u32(vdup_n_u32(a)))))); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pcast<Packet4s,Packet4i>(const Packet4s& a) { return vmovl_s16(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pcast<Packet4us,Packet4i>(const Packet4us& a)\n{ return vreinterpretq_s32_u32(vmovl_u16(a)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pcast<Packet4ui,Packet4i>(const Packet4ui& a)\n{ return vreinterpretq_s32_u32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ui pcast<Packet2f,Packet2ui>(const Packet2f& a) { return vcvt_u32_f32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ui pcast<Packet2i,Packet2ui>(const Packet2i& a)\n{ return vreinterpret_u32_s32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ui pcast<Packet2l,Packet2ui>(const Packet2l& a)\n{ return vmovn_u64(vreinterpretq_u64_s64(a)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ui pcast<Packet2ul,Packet2ui>(const Packet2ul& a)\n{ return vmovn_u64(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4ui pcast<Packet4f,Packet4ui>(const Packet4f& a) { return vcvtq_u32_f32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4ui pcast<Packet4c,Packet4ui>(const Packet4c& a)\n{ return vreinterpretq_u32_s32(vmovl_s16(vget_low_s16(vmovl_s8(vreinterpret_s8_s32(vdup_n_s32(a)))))); }\ntemplate<> EIGEN_STRONG_INLINE Packet4ui pcast<Packet4uc,Packet4ui>(const Packet4uc& a)\n{ return vmovl_u16(vget_low_u16(vmovl_u8(vreinterpret_u8_u32(vdup_n_u32(a))))); }\ntemplate<> EIGEN_STRONG_INLINE Packet4ui pcast<Packet4s,Packet4ui>(const Packet4s& a)\n{ return vreinterpretq_u32_s32(vmovl_s16(a)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4ui pcast<Packet4us,Packet4ui>(const Packet4us& a) { return vmovl_u16(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4ui pcast<Packet4i,Packet4ui>(const Packet4i& a)\n{ return vreinterpretq_u32_s32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2l pcast<Packet2f,Packet2l>(const Packet2f& a)\n{ return vmovl_s32(vcvt_s32_f32(a)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2l pcast<Packet2i,Packet2l>(const Packet2i& a)\n{ return vmovl_s32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2l pcast<Packet2ui,Packet2l>(const Packet2ui& a)\n{ return vreinterpretq_s64_u64(vmovl_u32(a)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2l pcast<Packet2ul,Packet2l>(const Packet2ul& a)\n{ return vreinterpretq_s64_u64(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ul pcast<Packet2f,Packet2ul>(const Packet2f& a)\n{ return vmovl_u32(vcvt_u32_f32(a)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ul pcast<Packet2i,Packet2ul>(const Packet2i& a)\n{ return vreinterpretq_u64_s64(vmovl_s32(a)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ul pcast<Packet2ui,Packet2ul>(const Packet2ui& a)\n{ return vmovl_u32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ul pcast<Packet2l,Packet2ul>(const Packet2l& a)\n{ return vreinterpretq_u64_s64(a); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2f preinterpret<Packet2f,Packet2i>(const Packet2i& a)\n{ return vreinterpret_f32_s32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2f preinterpret<Packet2f,Packet2ui>(const Packet2ui& a)\n{ return vreinterpret_f32_u32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f preinterpret<Packet4f,Packet4i>(const Packet4i& a)\n{ return vreinterpretq_f32_s32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f preinterpret<Packet4f,Packet4ui>(const Packet4ui& a)\n{ return vreinterpretq_f32_u32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4c preinterpret<Packet4c,Packet4uc>(const Packet4uc& a)\n{ return static_cast<Packet4c>(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet8c preinterpret<Packet8c,Packet8uc>(const Packet8uc& a)\n{ return vreinterpret_s8_u8(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet16c preinterpret<Packet16c,Packet16uc>(const Packet16uc& a)\n{ return vreinterpretq_s8_u8(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4uc preinterpret<Packet4uc,Packet4c>(const Packet4c& a)\n{ return static_cast<Packet4uc>(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet8uc preinterpret<Packet8uc,Packet8c>(const Packet8c& a)\n{ return vreinterpret_u8_s8(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet16uc preinterpret<Packet16uc,Packet16c>(const Packet16c& a)\n{ return vreinterpretq_u8_s8(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4s preinterpret<Packet4s,Packet4us>(const Packet4us& a)\n{ return vreinterpret_s16_u16(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet8s preinterpret<Packet8s,Packet8us>(const Packet8us& a)\n{ return vreinterpretq_s16_u16(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4us preinterpret<Packet4us,Packet4s>(const Packet4s& a)\n{ return vreinterpret_u16_s16(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet8us preinterpret<Packet8us,Packet8s>(const Packet8s& a)\n{ return vreinterpretq_u16_s16(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2i preinterpret<Packet2i,Packet2f>(const Packet2f& a)\n{ return vreinterpret_s32_f32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2i preinterpret<Packet2i,Packet2ui>(const Packet2ui& a)\n{ return vreinterpret_s32_u32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i preinterpret<Packet4i,Packet4f>(const Packet4f& a)\n{ return vreinterpretq_s32_f32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i preinterpret<Packet4i,Packet4ui>(const Packet4ui& a)\n{ return vreinterpretq_s32_u32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ui preinterpret<Packet2ui,Packet2f>(const Packet2f& a)\n{ return vreinterpret_u32_f32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ui preinterpret<Packet2ui,Packet2i>(const Packet2i& a)\n{ return vreinterpret_u32_s32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4ui preinterpret<Packet4ui,Packet4f>(const Packet4f& a)\n{ return vreinterpretq_u32_f32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4ui preinterpret<Packet4ui,Packet4i>(const Packet4i& a)\n{ return vreinterpretq_u32_s32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2l preinterpret<Packet2l,Packet2ul>(const Packet2ul& a)\n{ return vreinterpretq_s64_u64(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ul preinterpret<Packet2ul,Packet2l>(const Packet2l& a)\n{ return vreinterpretq_u64_s64(a); }\n\n#if EIGEN_ARCH_ARM64\n\ntemplate<> EIGEN_STRONG_INLINE Packet2f pcast<Packet2d,Packet2f>(const Packet2d& a) { return vcvt_f32_f64(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pcast<Packet2f,Packet2d>(const Packet2f& a) { return vcvt_f64_f32(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pcast<Packet2i,Packet2d>(const Packet2i& a) { return vcvtq_f64_s64(vmovl_s32(a)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pcast<Packet2ui,Packet2d>(const Packet2ui& a) { return vcvtq_f64_u64(vmovl_u32(a)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pcast<Packet2l,Packet2d>(const Packet2l& a) { return vcvtq_f64_s64(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pcast<Packet2ul,Packet2d>(const Packet2ul& a) { return vcvtq_f64_u64(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2i pcast<Packet2d,Packet2i>(const Packet2d& a) { return vcvt_s32_f32(vcvt_f32_f64(a)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ui pcast<Packet2d,Packet2ui>(const Packet2d& a) { return vcvt_u32_f32(vcvt_f32_f64(a)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2l pcast<Packet2d,Packet2l>(const Packet2d& a) { return vcvtq_s64_f64(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ul pcast<Packet2d,Packet2ul>(const Packet2d& a) { return vcvtq_u64_f64(a); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d preinterpret<Packet2d,Packet2l>(const Packet2l& a)\n{ return vreinterpretq_f64_s64(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d preinterpret<Packet2d,Packet2ul>(const Packet2ul& a)\n{ return vreinterpretq_f64_u64(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2l preinterpret<Packet2l,Packet2d>(const Packet2d& a)\n{ return vreinterpretq_s64_f64(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2ul preinterpret<Packet2ul,Packet2d>(const Packet2d& a)\n{ return vreinterpretq_u64_f64(a); }\n\n#endif // EIGEN_ARCH_ARM64\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_TYPE_CASTING_NEON_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/SSE/Complex.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_COMPLEX_SSE_H\n#define EIGEN_COMPLEX_SSE_H\n\nnamespace Eigen {\n\nnamespace internal {\n\n//---------- float ----------\nstruct Packet2cf\n{\n  EIGEN_STRONG_INLINE Packet2cf() {}\n  EIGEN_STRONG_INLINE explicit Packet2cf(const __m128& a) : v(a) {}\n  __m128  v;\n};\n\n// Use the packet_traits defined in AVX/PacketMath.h instead if we're going\n// to leverage AVX instructions.\n#ifndef EIGEN_VECTORIZE_AVX\ntemplate<> struct packet_traits<std::complex<float> >  : default_packet_traits\n{\n  typedef Packet2cf type;\n  typedef Packet2cf half;\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size = 2,\n    HasHalfPacket = 0,\n\n    HasAdd    = 1,\n    HasSub    = 1,\n    HasMul    = 1,\n    HasDiv    = 1,\n    HasNegate = 1,\n    HasAbs    = 0,\n    HasAbs2   = 0,\n    HasMin    = 0,\n    HasMax    = 0,\n    HasSetLinear = 0,\n    HasBlend  = 1,\n    HasInsert = 1\n  };\n};\n#endif\n\ntemplate<> struct unpacket_traits<Packet2cf> { typedef std::complex<float> type; enum {size=2, alignment=Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false}; typedef Packet2cf half; };\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cf padd<Packet2cf>(const Packet2cf& a, const Packet2cf& b) { return Packet2cf(_mm_add_ps(a.v,b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cf psub<Packet2cf>(const Packet2cf& a, const Packet2cf& b) { return Packet2cf(_mm_sub_ps(a.v,b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pnegate(const Packet2cf& a)\n{\n  const __m128 mask = _mm_castsi128_ps(_mm_setr_epi32(0x80000000,0x80000000,0x80000000,0x80000000));\n  return Packet2cf(_mm_xor_ps(a.v,mask));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pconj(const Packet2cf& a)\n{\n  const __m128 mask = _mm_castsi128_ps(_mm_setr_epi32(0x00000000,0x80000000,0x00000000,0x80000000));\n  return Packet2cf(_mm_xor_ps(a.v,mask));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pmul<Packet2cf>(const Packet2cf& a, const Packet2cf& b)\n{\n  #ifdef EIGEN_VECTORIZE_SSE3\n  return Packet2cf(_mm_addsub_ps(_mm_mul_ps(_mm_moveldup_ps(a.v), b.v),\n                                 _mm_mul_ps(_mm_movehdup_ps(a.v),\n                                            vec4f_swizzle1(b.v, 1, 0, 3, 2))));\n//   return Packet2cf(_mm_addsub_ps(_mm_mul_ps(vec4f_swizzle1(a.v, 0, 0, 2, 2), b.v),\n//                                  _mm_mul_ps(vec4f_swizzle1(a.v, 1, 1, 3, 3),\n//                                             vec4f_swizzle1(b.v, 1, 0, 3, 2))));\n  #else\n  const __m128 mask = _mm_castsi128_ps(_mm_setr_epi32(0x80000000,0x00000000,0x80000000,0x00000000));\n  return Packet2cf(_mm_add_ps(_mm_mul_ps(vec4f_swizzle1(a.v, 0, 0, 2, 2), b.v),\n                              _mm_xor_ps(_mm_mul_ps(vec4f_swizzle1(a.v, 1, 1, 3, 3),\n                                                    vec4f_swizzle1(b.v, 1, 0, 3, 2)), mask)));\n  #endif\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cf ptrue  <Packet2cf>(const Packet2cf& a) { return Packet2cf(ptrue(Packet4f(a.v))); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pnot   <Packet2cf>(const Packet2cf& a) { return Packet2cf(pnot(Packet4f(a.v))); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pand   <Packet2cf>(const Packet2cf& a, const Packet2cf& b) { return Packet2cf(_mm_and_ps(a.v,b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cf por    <Packet2cf>(const Packet2cf& a, const Packet2cf& b) { return Packet2cf(_mm_or_ps(a.v,b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pxor   <Packet2cf>(const Packet2cf& a, const Packet2cf& b) { return Packet2cf(_mm_xor_ps(a.v,b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pandnot<Packet2cf>(const Packet2cf& a, const Packet2cf& b) { return Packet2cf(_mm_andnot_ps(b.v,a.v)); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pload <Packet2cf>(const std::complex<float>* from) { EIGEN_DEBUG_ALIGNED_LOAD return Packet2cf(pload<Packet4f>(&numext::real_ref(*from))); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cf ploadu<Packet2cf>(const std::complex<float>* from) { EIGEN_DEBUG_UNALIGNED_LOAD return Packet2cf(ploadu<Packet4f>(&numext::real_ref(*from))); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pset1<Packet2cf>(const std::complex<float>&  from)\n{\n  Packet2cf res;\n#if EIGEN_GNUC_AT_MOST(4,2)\n  // Workaround annoying \"may be used uninitialized in this function\" warning with gcc 4.2\n  res.v = _mm_loadl_pi(_mm_set1_ps(0.0f), reinterpret_cast<const __m64*>(&from));\n#elif EIGEN_GNUC_AT_LEAST(4,6)\n  // Suppress annoying \"may be used uninitialized in this function\" warning with gcc >= 4.6\n  #pragma GCC diagnostic push\n  #pragma GCC diagnostic ignored \"-Wuninitialized\"\n  res.v = _mm_loadl_pi(res.v, (const __m64*)&from);\n  #pragma GCC diagnostic pop\n#else\n  res.v = _mm_loadl_pi(res.v, (const __m64*)&from);\n#endif\n  return Packet2cf(_mm_movelh_ps(res.v,res.v));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cf ploaddup<Packet2cf>(const std::complex<float>* from) { return pset1<Packet2cf>(*from); }\n\ntemplate<> EIGEN_STRONG_INLINE void pstore <std::complex<float> >(std::complex<float> *   to, const Packet2cf& from) { EIGEN_DEBUG_ALIGNED_STORE pstore(&numext::real_ref(*to), Packet4f(from.v)); }\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<std::complex<float> >(std::complex<float> *   to, const Packet2cf& from) { EIGEN_DEBUG_UNALIGNED_STORE pstoreu(&numext::real_ref(*to), Packet4f(from.v)); }\n\n\ntemplate<> EIGEN_DEVICE_FUNC inline Packet2cf pgather<std::complex<float>, Packet2cf>(const std::complex<float>* from, Index stride)\n{\n  return Packet2cf(_mm_set_ps(std::imag(from[1*stride]), std::real(from[1*stride]),\n                              std::imag(from[0*stride]), std::real(from[0*stride])));\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<std::complex<float>, Packet2cf>(std::complex<float>* to, const Packet2cf& from, Index stride)\n{\n  to[stride*0] = std::complex<float>(_mm_cvtss_f32(_mm_shuffle_ps(from.v, from.v, 0)),\n                                     _mm_cvtss_f32(_mm_shuffle_ps(from.v, from.v, 1)));\n  to[stride*1] = std::complex<float>(_mm_cvtss_f32(_mm_shuffle_ps(from.v, from.v, 2)),\n                                     _mm_cvtss_f32(_mm_shuffle_ps(from.v, from.v, 3)));\n}\n\ntemplate<> EIGEN_STRONG_INLINE void prefetch<std::complex<float> >(const std::complex<float> *   addr) { _mm_prefetch((SsePrefetchPtrType)(addr), _MM_HINT_T0); }\n\ntemplate<> EIGEN_STRONG_INLINE std::complex<float>  pfirst<Packet2cf>(const Packet2cf& a)\n{\n  #if EIGEN_GNUC_AT_MOST(4,3)\n  // Workaround gcc 4.2 ICE - this is not performance wise ideal, but who cares...\n  // This workaround also fix invalid code generation with gcc 4.3\n  EIGEN_ALIGN16 std::complex<float> res[2];\n  _mm_store_ps((float*)res, a.v);\n  return res[0];\n  #else\n  std::complex<float> res;\n  _mm_storel_pi((__m64*)&res, a.v);\n  return res;\n  #endif\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cf preverse(const Packet2cf& a) { return Packet2cf(_mm_castpd_ps(preverse(Packet2d(_mm_castps_pd(a.v))))); }\n\ntemplate<> EIGEN_STRONG_INLINE std::complex<float> predux<Packet2cf>(const Packet2cf& a)\n{\n  return pfirst(Packet2cf(_mm_add_ps(a.v, _mm_movehl_ps(a.v,a.v))));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cf preduxp<Packet2cf>(const Packet2cf* vecs)\n{\n  return Packet2cf(_mm_add_ps(_mm_movelh_ps(vecs[0].v,vecs[1].v), _mm_movehl_ps(vecs[1].v,vecs[0].v)));\n}\n\ntemplate<> EIGEN_STRONG_INLINE std::complex<float> predux_mul<Packet2cf>(const Packet2cf& a)\n{\n  return pfirst(pmul(a, Packet2cf(_mm_movehl_ps(a.v,a.v))));\n}\n\ntemplate<int Offset>\nstruct palign_impl<Offset,Packet2cf>\n{\n  static EIGEN_STRONG_INLINE void run(Packet2cf& first, const Packet2cf& second)\n  {\n    if (Offset==1)\n    {\n      first.v = _mm_movehl_ps(first.v, first.v);\n      first.v = _mm_movelh_ps(first.v, second.v);\n    }\n  }\n};\n\ntemplate<> struct conj_helper<Packet2cf, Packet2cf, false,true>\n{\n  EIGEN_STRONG_INLINE Packet2cf pmadd(const Packet2cf& x, const Packet2cf& y, const Packet2cf& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet2cf pmul(const Packet2cf& a, const Packet2cf& b) const\n  {\n    #ifdef EIGEN_VECTORIZE_SSE3\n    return internal::pmul(a, pconj(b));\n    #else\n    const __m128 mask = _mm_castsi128_ps(_mm_setr_epi32(0x00000000,0x80000000,0x00000000,0x80000000));\n    return Packet2cf(_mm_add_ps(_mm_xor_ps(_mm_mul_ps(vec4f_swizzle1(a.v, 0, 0, 2, 2), b.v), mask),\n                                _mm_mul_ps(vec4f_swizzle1(a.v, 1, 1, 3, 3),\n                                           vec4f_swizzle1(b.v, 1, 0, 3, 2))));\n    #endif\n  }\n};\n\ntemplate<> struct conj_helper<Packet2cf, Packet2cf, true,false>\n{\n  EIGEN_STRONG_INLINE Packet2cf pmadd(const Packet2cf& x, const Packet2cf& y, const Packet2cf& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet2cf pmul(const Packet2cf& a, const Packet2cf& b) const\n  {\n    #ifdef EIGEN_VECTORIZE_SSE3\n    return internal::pmul(pconj(a), b);\n    #else\n    const __m128 mask = _mm_castsi128_ps(_mm_setr_epi32(0x00000000,0x80000000,0x00000000,0x80000000));\n    return Packet2cf(_mm_add_ps(_mm_mul_ps(vec4f_swizzle1(a.v, 0, 0, 2, 2), b.v),\n                                _mm_xor_ps(_mm_mul_ps(vec4f_swizzle1(a.v, 1, 1, 3, 3),\n                                                      vec4f_swizzle1(b.v, 1, 0, 3, 2)), mask)));\n    #endif\n  }\n};\n\ntemplate<> struct conj_helper<Packet2cf, Packet2cf, true,true>\n{\n  EIGEN_STRONG_INLINE Packet2cf pmadd(const Packet2cf& x, const Packet2cf& y, const Packet2cf& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet2cf pmul(const Packet2cf& a, const Packet2cf& b) const\n  {\n    #ifdef EIGEN_VECTORIZE_SSE3\n    return pconj(internal::pmul(a, b));\n    #else\n    const __m128 mask = _mm_castsi128_ps(_mm_setr_epi32(0x00000000,0x80000000,0x00000000,0x80000000));\n    return Packet2cf(_mm_sub_ps(_mm_xor_ps(_mm_mul_ps(vec4f_swizzle1(a.v, 0, 0, 2, 2), b.v), mask),\n                                _mm_mul_ps(vec4f_swizzle1(a.v, 1, 1, 3, 3),\n                                           vec4f_swizzle1(b.v, 1, 0, 3, 2))));\n    #endif\n  }\n};\n\nEIGEN_MAKE_CONJ_HELPER_CPLX_REAL(Packet2cf,Packet4f)\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pdiv<Packet2cf>(const Packet2cf& a, const Packet2cf& b)\n{\n  // TODO optimize it for SSE3 and 4\n  Packet2cf res = conj_helper<Packet2cf,Packet2cf,false,true>().pmul(a,b);\n  __m128 s = _mm_mul_ps(b.v,b.v);\n  return Packet2cf(_mm_div_ps(res.v,_mm_add_ps(s,_mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(s), 0xb1)))));\n}\n\nEIGEN_STRONG_INLINE Packet2cf pcplxflip/* <Packet2cf> */(const Packet2cf& x)\n{\n  return Packet2cf(vec4f_swizzle1(x.v, 1, 0, 3, 2));\n}\n\n\n//---------- double ----------\nstruct Packet1cd\n{\n  EIGEN_STRONG_INLINE Packet1cd() {}\n  EIGEN_STRONG_INLINE explicit Packet1cd(const __m128d& a) : v(a) {}\n  __m128d  v;\n};\n\n// Use the packet_traits defined in AVX/PacketMath.h instead if we're going\n// to leverage AVX instructions.\n#ifndef EIGEN_VECTORIZE_AVX\ntemplate<> struct packet_traits<std::complex<double> >  : default_packet_traits\n{\n  typedef Packet1cd type;\n  typedef Packet1cd half;\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 0,\n    size = 1,\n    HasHalfPacket = 0,\n\n    HasAdd    = 1,\n    HasSub    = 1,\n    HasMul    = 1,\n    HasDiv    = 1,\n    HasNegate = 1,\n    HasAbs    = 0,\n    HasAbs2   = 0,\n    HasMin    = 0,\n    HasMax    = 0,\n    HasSetLinear = 0\n  };\n};\n#endif\n\ntemplate<> struct unpacket_traits<Packet1cd> { typedef std::complex<double> type; enum {size=1, alignment=Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false}; typedef Packet1cd half; };\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cd padd<Packet1cd>(const Packet1cd& a, const Packet1cd& b) { return Packet1cd(_mm_add_pd(a.v,b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet1cd psub<Packet1cd>(const Packet1cd& a, const Packet1cd& b) { return Packet1cd(_mm_sub_pd(a.v,b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pnegate(const Packet1cd& a) { return Packet1cd(pnegate(Packet2d(a.v))); }\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pconj(const Packet1cd& a)\n{\n  const __m128d mask = _mm_castsi128_pd(_mm_set_epi32(0x80000000,0x0,0x0,0x0));\n  return Packet1cd(_mm_xor_pd(a.v,mask));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pmul<Packet1cd>(const Packet1cd& a, const Packet1cd& b)\n{\n  #ifdef EIGEN_VECTORIZE_SSE3\n  return Packet1cd(_mm_addsub_pd(_mm_mul_pd(_mm_movedup_pd(a.v), b.v),\n                                 _mm_mul_pd(vec2d_swizzle1(a.v, 1, 1),\n                                            vec2d_swizzle1(b.v, 1, 0))));\n  #else\n  const __m128d mask = _mm_castsi128_pd(_mm_set_epi32(0x0,0x0,0x80000000,0x0));\n  return Packet1cd(_mm_add_pd(_mm_mul_pd(vec2d_swizzle1(a.v, 0, 0), b.v),\n                              _mm_xor_pd(_mm_mul_pd(vec2d_swizzle1(a.v, 1, 1),\n                                                    vec2d_swizzle1(b.v, 1, 0)), mask)));\n  #endif\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cd ptrue  <Packet1cd>(const Packet1cd& a) { return Packet1cd(ptrue(Packet2d(a.v))); }\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pnot   <Packet1cd>(const Packet1cd& a) { return Packet1cd(pnot(Packet2d(a.v))); }\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pand   <Packet1cd>(const Packet1cd& a, const Packet1cd& b) { return Packet1cd(_mm_and_pd(a.v,b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet1cd por    <Packet1cd>(const Packet1cd& a, const Packet1cd& b) { return Packet1cd(_mm_or_pd(a.v,b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pxor   <Packet1cd>(const Packet1cd& a, const Packet1cd& b) { return Packet1cd(_mm_xor_pd(a.v,b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pandnot<Packet1cd>(const Packet1cd& a, const Packet1cd& b) { return Packet1cd(_mm_andnot_pd(b.v,a.v)); }\n\n// FIXME force unaligned load, this is a temporary fix\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pload <Packet1cd>(const std::complex<double>* from)\n{ EIGEN_DEBUG_ALIGNED_LOAD return Packet1cd(pload<Packet2d>((const double*)from)); }\ntemplate<> EIGEN_STRONG_INLINE Packet1cd ploadu<Packet1cd>(const std::complex<double>* from)\n{ EIGEN_DEBUG_UNALIGNED_LOAD return Packet1cd(ploadu<Packet2d>((const double*)from)); }\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pset1<Packet1cd>(const std::complex<double>&  from)\n{ /* here we really have to use unaligned loads :( */ return ploadu<Packet1cd>(&from); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cd ploaddup<Packet1cd>(const std::complex<double>* from) { return pset1<Packet1cd>(*from); }\n\n// FIXME force unaligned store, this is a temporary fix\ntemplate<> EIGEN_STRONG_INLINE void pstore <std::complex<double> >(std::complex<double> *   to, const Packet1cd& from) { EIGEN_DEBUG_ALIGNED_STORE pstore((double*)to, Packet2d(from.v)); }\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<std::complex<double> >(std::complex<double> *   to, const Packet1cd& from) { EIGEN_DEBUG_UNALIGNED_STORE pstoreu((double*)to, Packet2d(from.v)); }\n\ntemplate<> EIGEN_STRONG_INLINE void prefetch<std::complex<double> >(const std::complex<double> *   addr) { _mm_prefetch((SsePrefetchPtrType)(addr), _MM_HINT_T0); }\n\ntemplate<> EIGEN_STRONG_INLINE std::complex<double>  pfirst<Packet1cd>(const Packet1cd& a)\n{\n  EIGEN_ALIGN16 double res[2];\n  _mm_store_pd(res, a.v);\n  return std::complex<double>(res[0],res[1]);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cd preverse(const Packet1cd& a) { return a; }\n\ntemplate<> EIGEN_STRONG_INLINE std::complex<double> predux<Packet1cd>(const Packet1cd& a)\n{\n  return pfirst(a);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cd preduxp<Packet1cd>(const Packet1cd* vecs)\n{\n  return vecs[0];\n}\n\ntemplate<> EIGEN_STRONG_INLINE std::complex<double> predux_mul<Packet1cd>(const Packet1cd& a)\n{\n  return pfirst(a);\n}\n\ntemplate<int Offset>\nstruct palign_impl<Offset,Packet1cd>\n{\n  static EIGEN_STRONG_INLINE void run(Packet1cd& /*first*/, const Packet1cd& /*second*/)\n  {\n    // FIXME is it sure we never have to align a Packet1cd?\n    // Even though a std::complex<double> has 16 bytes, it is not necessarily aligned on a 16 bytes boundary...\n  }\n};\n\ntemplate<> struct conj_helper<Packet1cd, Packet1cd, false,true>\n{\n  EIGEN_STRONG_INLINE Packet1cd pmadd(const Packet1cd& x, const Packet1cd& y, const Packet1cd& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet1cd pmul(const Packet1cd& a, const Packet1cd& b) const\n  {\n    #ifdef EIGEN_VECTORIZE_SSE3\n    return internal::pmul(a, pconj(b));\n    #else\n    const __m128d mask = _mm_castsi128_pd(_mm_set_epi32(0x80000000,0x0,0x0,0x0));\n    return Packet1cd(_mm_add_pd(_mm_xor_pd(_mm_mul_pd(vec2d_swizzle1(a.v, 0, 0), b.v), mask),\n                                _mm_mul_pd(vec2d_swizzle1(a.v, 1, 1),\n                                           vec2d_swizzle1(b.v, 1, 0))));\n    #endif\n  }\n};\n\ntemplate<> struct conj_helper<Packet1cd, Packet1cd, true,false>\n{\n  EIGEN_STRONG_INLINE Packet1cd pmadd(const Packet1cd& x, const Packet1cd& y, const Packet1cd& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet1cd pmul(const Packet1cd& a, const Packet1cd& b) const\n  {\n    #ifdef EIGEN_VECTORIZE_SSE3\n    return internal::pmul(pconj(a), b);\n    #else\n    const __m128d mask = _mm_castsi128_pd(_mm_set_epi32(0x80000000,0x0,0x0,0x0));\n    return Packet1cd(_mm_add_pd(_mm_mul_pd(vec2d_swizzle1(a.v, 0, 0), b.v),\n                                _mm_xor_pd(_mm_mul_pd(vec2d_swizzle1(a.v, 1, 1),\n                                                      vec2d_swizzle1(b.v, 1, 0)), mask)));\n    #endif\n  }\n};\n\ntemplate<> struct conj_helper<Packet1cd, Packet1cd, true,true>\n{\n  EIGEN_STRONG_INLINE Packet1cd pmadd(const Packet1cd& x, const Packet1cd& y, const Packet1cd& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet1cd pmul(const Packet1cd& a, const Packet1cd& b) const\n  {\n    #ifdef EIGEN_VECTORIZE_SSE3\n    return pconj(internal::pmul(a, b));\n    #else\n    const __m128d mask = _mm_castsi128_pd(_mm_set_epi32(0x80000000,0x0,0x0,0x0));\n    return Packet1cd(_mm_sub_pd(_mm_xor_pd(_mm_mul_pd(vec2d_swizzle1(a.v, 0, 0), b.v), mask),\n                                _mm_mul_pd(vec2d_swizzle1(a.v, 1, 1),\n                                           vec2d_swizzle1(b.v, 1, 0))));\n    #endif\n  }\n};\n\nEIGEN_MAKE_CONJ_HELPER_CPLX_REAL(Packet1cd,Packet2d)\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pdiv<Packet1cd>(const Packet1cd& a, const Packet1cd& b)\n{\n  // TODO optimize it for SSE3 and 4\n  Packet1cd res = conj_helper<Packet1cd,Packet1cd,false,true>().pmul(a,b);\n  __m128d s = _mm_mul_pd(b.v,b.v);\n  return Packet1cd(_mm_div_pd(res.v, _mm_add_pd(s,_mm_shuffle_pd(s, s, 0x1))));\n}\n\nEIGEN_STRONG_INLINE Packet1cd pcplxflip/* <Packet1cd> */(const Packet1cd& x)\n{\n  return Packet1cd(preverse(Packet2d(x.v)));\n}\n\nEIGEN_DEVICE_FUNC inline void\nptranspose(PacketBlock<Packet2cf,2>& kernel) {\n  __m128d w1 = _mm_castps_pd(kernel.packet[0].v);\n  __m128d w2 = _mm_castps_pd(kernel.packet[1].v);\n\n  __m128 tmp = _mm_castpd_ps(_mm_unpackhi_pd(w1, w2));\n  kernel.packet[0].v = _mm_castpd_ps(_mm_unpacklo_pd(w1, w2));\n  kernel.packet[1].v = tmp;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pcmp_eq(const Packet2cf& a, const Packet2cf& b)\n{\n  __m128 eq = _mm_cmpeq_ps(a.v, b.v);\n  return Packet2cf(pand<Packet4f>(eq, vec4f_swizzle1(eq, 1, 0, 3, 2)));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pcmp_eq(const Packet1cd& a, const Packet1cd& b)\n{\n  __m128d eq = _mm_cmpeq_pd(a.v, b.v);\n  return Packet1cd(pand<Packet2d>(eq, vec2d_swizzle1(eq, 1, 0)));\n}\n\ntemplate<>  EIGEN_STRONG_INLINE Packet2cf pblend(const Selector<2>& ifPacket, const Packet2cf& thenPacket, const Packet2cf& elsePacket) {\n  __m128d result = pblend<Packet2d>(ifPacket, _mm_castps_pd(thenPacket.v), _mm_castps_pd(elsePacket.v));\n  return Packet2cf(_mm_castpd_ps(result));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pinsertfirst(const Packet2cf& a, std::complex<float> b)\n{\n  return Packet2cf(_mm_loadl_pi(a.v, reinterpret_cast<const __m64*>(&b)));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pinsertfirst(const Packet1cd&, std::complex<double> b)\n{\n  return pset1<Packet1cd>(b);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pinsertlast(const Packet2cf& a, std::complex<float> b)\n{\n  return Packet2cf(_mm_loadh_pi(a.v, reinterpret_cast<const __m64*>(&b)));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pinsertlast(const Packet1cd&, std::complex<double> b)\n{\n  return pset1<Packet1cd>(b);\n}\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_COMPLEX_SSE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/SSE/MathFunctions.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2007 Julien Pommier\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n/* The sin and cos and functions of this file come from\n * Julien Pommier's sse math library: http://gruntthepeon.free.fr/ssemath/\n */\n\n#ifndef EIGEN_MATH_FUNCTIONS_SSE_H\n#define EIGEN_MATH_FUNCTIONS_SSE_H\n\nnamespace Eigen {\n\nnamespace internal {\n\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED\nPacket4f plog<Packet4f>(const Packet4f& _x) {\n  return plog_float(_x);\n}\n\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED\nPacket4f plog1p<Packet4f>(const Packet4f& _x) {\n  return generic_plog1p(_x);\n}\n\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED\nPacket4f pexpm1<Packet4f>(const Packet4f& _x) {\n  return generic_expm1(_x);\n}\n\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED\nPacket4f pexp<Packet4f>(const Packet4f& _x)\n{\n  return pexp_float(_x);\n}\n\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED\nPacket2d pexp<Packet2d>(const Packet2d& x)\n{\n  return pexp_double(x);\n}\n\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED\nPacket4f psin<Packet4f>(const Packet4f& _x)\n{\n  return psin_float(_x);\n}\n\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED\nPacket4f pcos<Packet4f>(const Packet4f& _x)\n{\n  return pcos_float(_x);\n}\n\n#if EIGEN_FAST_MATH\n\n// Functions for sqrt.\n// The EIGEN_FAST_MATH version uses the _mm_rsqrt_ps approximation and one step\n// of Newton's method, at a cost of 1-2 bits of precision as opposed to the\n// exact solution. It does not handle +inf, or denormalized numbers correctly.\n// The main advantage of this approach is not just speed, but also the fact that\n// it can be inlined and pipelined with other computations, further reducing its\n// effective latency. This is similar to Quake3's fast inverse square root.\n// For detail see here: http://www.beyond3d.com/content/articles/8/\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED\nPacket4f psqrt<Packet4f>(const Packet4f& _x)\n{\n  Packet4f half = pmul(_x, pset1<Packet4f>(.5f));\n  Packet4f denormal_mask = _mm_and_ps(\n      _mm_cmpge_ps(_x, _mm_setzero_ps()),\n      _mm_cmplt_ps(_x, pset1<Packet4f>((std::numeric_limits<float>::min)())));\n\n  // Compute approximate reciprocal sqrt.\n  Packet4f x = _mm_rsqrt_ps(_x);\n  // Do a single step of Newton's iteration.\n  x = pmul(x, psub(pset1<Packet4f>(1.5f), pmul(half, pmul(x,x))));\n  // Flush results for denormals to zero.\n  return _mm_andnot_ps(denormal_mask, pmul(_x,x));\n}\n\n#else\n\ntemplate<>EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED\nPacket4f psqrt<Packet4f>(const Packet4f& x) { return _mm_sqrt_ps(x); }\n\n#endif\n\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED\nPacket2d psqrt<Packet2d>(const Packet2d& x) { return _mm_sqrt_pd(x); }\n\n#if EIGEN_FAST_MATH\n\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED\nPacket4f prsqrt<Packet4f>(const Packet4f& _x) {\n  _EIGEN_DECLARE_CONST_Packet4f(one_point_five, 1.5f);\n  _EIGEN_DECLARE_CONST_Packet4f(minus_half, -0.5f);\n  _EIGEN_DECLARE_CONST_Packet4f_FROM_INT(inf, 0x7f800000u);\n  _EIGEN_DECLARE_CONST_Packet4f_FROM_INT(flt_min, 0x00800000u);\n\n  Packet4f neg_half = pmul(_x, p4f_minus_half);\n\n  // Identity infinite, zero, negative and denormal arguments.\n  Packet4f lt_min_mask = _mm_cmplt_ps(_x, p4f_flt_min);\n  Packet4f inf_mask = _mm_cmpeq_ps(_x, p4f_inf);\n  Packet4f not_normal_finite_mask = _mm_or_ps(lt_min_mask, inf_mask);\n\n  // Compute an approximate result using the rsqrt intrinsic.\n  Packet4f y_approx = _mm_rsqrt_ps(_x);\n\n  // Do a single step of Newton-Raphson iteration to improve the approximation.\n  // This uses the formula y_{n+1} = y_n * (1.5 - y_n * (0.5 * x) * y_n).\n  // It is essential to evaluate the inner term like this because forming\n  // y_n^2 may over- or underflow.\n  Packet4f y_newton = pmul(\n      y_approx, pmadd(y_approx, pmul(neg_half, y_approx), p4f_one_point_five));\n\n  // Select the result of the Newton-Raphson step for positive normal arguments.\n  // For other arguments, choose the output of the intrinsic. This will\n  // return rsqrt(+inf) = 0, rsqrt(x) = NaN if x < 0, and rsqrt(x) = +inf if\n  // x is zero or a positive denormalized float (equivalent to flushing positive\n  // denormalized inputs to zero).\n  return pselect<Packet4f>(not_normal_finite_mask, y_approx, y_newton);\n}\n\n#else\n\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED\nPacket4f prsqrt<Packet4f>(const Packet4f& x) {\n  // Unfortunately we can't use the much faster mm_rqsrt_ps since it only provides an approximation.\n  return _mm_div_ps(pset1<Packet4f>(1.0f), _mm_sqrt_ps(x));\n}\n\n#endif\n\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED\nPacket2d prsqrt<Packet2d>(const Packet2d& x) {\n  // Unfortunately we can't use the much faster mm_rqsrt_pd since it only provides an approximation.\n  return _mm_div_pd(pset1<Packet2d>(1.0), _mm_sqrt_pd(x));\n}\n\n// Hyperbolic Tangent function.\ntemplate <>\nEIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet4f\nptanh<Packet4f>(const Packet4f& x) {\n  return internal::generic_fast_tanh_float(x);\n}\n\n} // end namespace internal\n\nnamespace numext {\n\ntemplate<>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nfloat sqrt(const float &x)\n{\n  return internal::pfirst(internal::Packet4f(_mm_sqrt_ss(_mm_set_ss(x))));\n}\n\ntemplate<>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\ndouble sqrt(const double &x)\n{\n#if EIGEN_COMP_GNUC_STRICT\n  // This works around a GCC bug generating poor code for _mm_sqrt_pd\n  // See https://gitlab.com/libeigen/eigen/commit/8dca9f97e38970\n  return internal::pfirst(internal::Packet2d(__builtin_ia32_sqrtsd(_mm_set_sd(x))));\n#else\n  return internal::pfirst(internal::Packet2d(_mm_sqrt_pd(_mm_set_sd(x))));\n#endif\n}\n\n} // end namespace numex\n\n} // end namespace Eigen\n\n#endif // EIGEN_MATH_FUNCTIONS_SSE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/SSE/PacketMath.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_PACKET_MATH_SSE_H\n#define EIGEN_PACKET_MATH_SSE_H\n\nnamespace Eigen {\n\nnamespace internal {\n\n#ifndef EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD\n#define EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 8\n#endif\n\n#if !defined(EIGEN_VECTORIZE_AVX) && !defined(EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS)\n// 32 bits =>  8 registers\n// 64 bits => 16 registers\n#define EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS (2*sizeof(void*))\n#endif\n\n#ifdef EIGEN_VECTORIZE_FMA\n#ifndef EIGEN_HAS_SINGLE_INSTRUCTION_MADD\n#define EIGEN_HAS_SINGLE_INSTRUCTION_MADD 1\n#endif\n#endif\n\n#if ((defined EIGEN_VECTORIZE_AVX) && (EIGEN_COMP_GNUC_STRICT || EIGEN_COMP_MINGW) && (__GXX_ABI_VERSION < 1004)) || EIGEN_OS_QNX\n// With GCC's default ABI version, a __m128 or __m256 are the same types and therefore we cannot\n// have overloads for both types without linking error.\n// One solution is to increase ABI version using -fabi-version=4 (or greater).\n// Otherwise, we workaround this inconvenience by wrapping 128bit types into the following helper\n// structure:\ntypedef eigen_packet_wrapper<__m128>  Packet4f;\ntypedef eigen_packet_wrapper<__m128d> Packet2d;\n#else\ntypedef __m128  Packet4f;\ntypedef __m128d Packet2d;\n#endif\n\ntypedef eigen_packet_wrapper<__m128i, 0> Packet4i;\ntypedef eigen_packet_wrapper<__m128i, 1> Packet16b;\n\ntemplate<> struct is_arithmetic<__m128>  { enum { value = true }; };\ntemplate<> struct is_arithmetic<__m128i> { enum { value = true }; };\ntemplate<> struct is_arithmetic<__m128d> { enum { value = true }; };\ntemplate<> struct is_arithmetic<Packet16b>  { enum { value = true }; };\n\n#define EIGEN_SSE_SHUFFLE_MASK(p,q,r,s) ((s)<<6|(r)<<4|(q)<<2|(p))\n\n#define vec4f_swizzle1(v,p,q,r,s) \\\n  (_mm_castsi128_ps(_mm_shuffle_epi32( _mm_castps_si128(v), EIGEN_SSE_SHUFFLE_MASK(p,q,r,s))))\n\n#define vec4i_swizzle1(v,p,q,r,s) \\\n  (_mm_shuffle_epi32( v, EIGEN_SSE_SHUFFLE_MASK(p,q,r,s)))\n\n#define vec2d_swizzle1(v,p,q) \\\n  (_mm_castsi128_pd(_mm_shuffle_epi32( _mm_castpd_si128(v), EIGEN_SSE_SHUFFLE_MASK(2*p,2*p+1,2*q,2*q+1))))\n\n#define vec4f_swizzle2(a,b,p,q,r,s) \\\n  (_mm_shuffle_ps( (a), (b), EIGEN_SSE_SHUFFLE_MASK(p,q,r,s)))\n\n#define vec4i_swizzle2(a,b,p,q,r,s) \\\n  (_mm_castps_si128( (_mm_shuffle_ps( _mm_castsi128_ps(a), _mm_castsi128_ps(b), EIGEN_SSE_SHUFFLE_MASK(p,q,r,s)))))\n\n#define _EIGEN_DECLARE_CONST_Packet4f(NAME,X) \\\n  const Packet4f p4f_##NAME = pset1<Packet4f>(X)\n\n#define _EIGEN_DECLARE_CONST_Packet2d(NAME,X) \\\n  const Packet2d p2d_##NAME = pset1<Packet2d>(X)\n\n#define _EIGEN_DECLARE_CONST_Packet4f_FROM_INT(NAME,X) \\\n  const Packet4f p4f_##NAME = pset1frombits<Packet4f>(X)\n\n#define _EIGEN_DECLARE_CONST_Packet4i(NAME,X) \\\n  const Packet4i p4i_##NAME = pset1<Packet4i>(X)\n\n\n// Use the packet_traits defined in AVX/PacketMath.h instead if we're going\n// to leverage AVX instructions.\n#ifndef EIGEN_VECTORIZE_AVX\ntemplate <>\nstruct packet_traits<float> : default_packet_traits {\n  typedef Packet4f type;\n  typedef Packet4f half;\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size = 4,\n    HasHalfPacket = 0,\n\n    HasDiv = 1,\n    HasSin = EIGEN_FAST_MATH,\n    HasCos = EIGEN_FAST_MATH,\n    HasLog = 1,\n    HasLog1p = 1,\n    HasExpm1 = 1,\n    HasNdtri = 1,\n    HasExp = 1,\n    HasBessel = 1,\n    HasSqrt = 1,\n    HasRsqrt = 1,\n    HasTanh = EIGEN_FAST_MATH,\n    HasErf = EIGEN_FAST_MATH,\n    HasBlend = 1,\n    HasInsert = 1,\n    HasFloor = 1\n\n#ifdef EIGEN_VECTORIZE_SSE4_1\n    ,\n    HasRint = 1,\n    HasRound = 1,\n    HasCeil = 1\n#endif\n  };\n};\ntemplate <>\nstruct packet_traits<double> : default_packet_traits {\n  typedef Packet2d type;\n  typedef Packet2d half;\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size=2,\n    HasHalfPacket = 0,\n\n    HasDiv  = 1,\n    HasExp  = 1,\n    HasSqrt = 1,\n    HasRsqrt = 1,\n    HasBlend = 1,\n    HasInsert = 1\n\n#ifdef EIGEN_VECTORIZE_SSE4_1\n    ,\n    HasRound = 1,\n    HasRint = 1,\n    HasFloor = 1,\n    HasCeil = 1\n#endif\n  };\n};\n#endif\ntemplate<> struct packet_traits<int>    : default_packet_traits\n{\n  typedef Packet4i type;\n  typedef Packet4i half;\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size=4,\n\n    HasShift = 1,\n    HasBlend = 1\n  };\n};\n\ntemplate<> struct packet_traits<bool> : default_packet_traits\n{\n  typedef Packet16b type;\n  typedef Packet16b half;\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    HasHalfPacket = 0,\n    size=16,\n\n    HasAdd       = 0,\n    HasSub       = 0,\n    HasShift     = 0,\n    HasMul       = 0,\n    HasNegate    = 0,\n    HasAbs       = 0,\n    HasAbs2      = 0,\n    HasMin       = 0,\n    HasMax       = 0,\n    HasConj      = 0,\n    HasReduxp    = 0\n  };\n};\n\ntemplate<> struct unpacket_traits<Packet4f> {\n  typedef float     type;\n  typedef Packet4f  half;\n  typedef Packet4i  integer_packet;\n  enum {size=4, alignment=Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false};\n};\ntemplate<> struct unpacket_traits<Packet2d> {\n  typedef double    type;\n  typedef Packet2d  half;\n  enum {size=2, alignment=Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false};\n};\ntemplate<> struct unpacket_traits<Packet4i> {\n  typedef int       type;\n  typedef Packet4i  half;\n  enum {size=4, alignment=Aligned16, vectorizable=false, masked_load_available=false, masked_store_available=false};\n};\ntemplate<> struct unpacket_traits<Packet16b> {\n  typedef bool       type;\n  typedef Packet16b  half;\n  enum {size=16, alignment=Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false};\n};\n\n#ifndef EIGEN_VECTORIZE_AVX\ntemplate<> struct scalar_div_cost<float,true> { enum { value = 7 }; };\ntemplate<> struct scalar_div_cost<double,true> { enum { value = 8 }; };\n#endif\n\n#if EIGEN_COMP_MSVC==1500\n// Workaround MSVC 9 internal compiler error.\n// TODO: It has been detected with win64 builds (amd64), so let's check whether it also happens in 32bits+SSE mode\n// TODO: let's check whether there does not exist a better fix, like adding a pset0() function. (it crashed on pset1(0)).\ntemplate<> EIGEN_STRONG_INLINE Packet4f pset1<Packet4f>(const float&  from) { return _mm_set_ps(from,from,from,from); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pset1<Packet2d>(const double& from) { return _mm_set_pd(from,from); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pset1<Packet4i>(const int&    from) { return _mm_set_epi32(from,from,from,from); }\n#else\ntemplate<> EIGEN_STRONG_INLINE Packet4f pset1<Packet4f>(const float&  from) { return _mm_set_ps1(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pset1<Packet2d>(const double& from) { return _mm_set1_pd(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pset1<Packet4i>(const int&    from) { return _mm_set1_epi32(from); }\n#endif\ntemplate<> EIGEN_STRONG_INLINE Packet16b pset1<Packet16b>(const bool&    from) { return _mm_set1_epi8(static_cast<char>(from)); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pset1frombits<Packet4f>(unsigned int from) { return _mm_castsi128_ps(pset1<Packet4i>(from)); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pzero(const Packet4f& /*a*/) { return _mm_setzero_ps(); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pzero(const Packet2d& /*a*/) { return _mm_setzero_pd(); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pzero(const Packet4i& /*a*/) { return _mm_setzero_si128(); }\n\n// GCC generates a shufps instruction for _mm_set1_ps/_mm_load1_ps instead of the more efficient pshufd instruction.\n// However, using inrinsics for pset1 makes gcc to generate crappy code in some cases (see bug 203)\n// Using inline assembly is also not an option because then gcc fails to reorder properly the instructions.\n// Therefore, we introduced the pload1 functions to be used in product kernels for which bug 203 does not apply.\n// Also note that with AVX, we want it to generate a vbroadcastss.\n#if EIGEN_COMP_GNUC_STRICT && (!defined __AVX__)\ntemplate<> EIGEN_STRONG_INLINE Packet4f pload1<Packet4f>(const float *from) {\n  return vec4f_swizzle1(_mm_load_ss(from),0,0,0,0);\n}\n#endif\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f plset<Packet4f>(const float& a) { return _mm_add_ps(pset1<Packet4f>(a), _mm_set_ps(3,2,1,0)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d plset<Packet2d>(const double& a) { return _mm_add_pd(pset1<Packet2d>(a),_mm_set_pd(1,0)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i plset<Packet4i>(const int& a) { return _mm_add_epi32(pset1<Packet4i>(a),_mm_set_epi32(3,2,1,0)); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f padd<Packet4f>(const Packet4f& a, const Packet4f& b) { return _mm_add_ps(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d padd<Packet2d>(const Packet2d& a, const Packet2d& b) { return _mm_add_pd(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i padd<Packet4i>(const Packet4i& a, const Packet4i& b) { return _mm_add_epi32(a,b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f psub<Packet4f>(const Packet4f& a, const Packet4f& b) { return _mm_sub_ps(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d psub<Packet2d>(const Packet2d& a, const Packet2d& b) { return _mm_sub_pd(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i psub<Packet4i>(const Packet4i& a, const Packet4i& b) { return _mm_sub_epi32(a,b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pnegate(const Packet4f& a)\n{\n  const Packet4f mask = _mm_castsi128_ps(_mm_setr_epi32(0x80000000,0x80000000,0x80000000,0x80000000));\n  return _mm_xor_ps(a,mask);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet2d pnegate(const Packet2d& a)\n{\n  const Packet2d mask = _mm_castsi128_pd(_mm_setr_epi32(0x0,0x80000000,0x0,0x80000000));\n  return _mm_xor_pd(a,mask);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4i pnegate(const Packet4i& a)\n{\n  return psub(Packet4i(_mm_setr_epi32(0,0,0,0)), a);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pconj(const Packet4f& a) { return a; }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pconj(const Packet2d& a) { return a; }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pconj(const Packet4i& a) { return a; }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pmul<Packet4f>(const Packet4f& a, const Packet4f& b) { return _mm_mul_ps(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pmul<Packet2d>(const Packet2d& a, const Packet2d& b) { return _mm_mul_pd(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pmul<Packet4i>(const Packet4i& a, const Packet4i& b)\n{\n#ifdef EIGEN_VECTORIZE_SSE4_1\n  return _mm_mullo_epi32(a,b);\n#else\n  // this version is slightly faster than 4 scalar products\n  return vec4i_swizzle1(\n            vec4i_swizzle2(\n              _mm_mul_epu32(a,b),\n              _mm_mul_epu32(vec4i_swizzle1(a,1,0,3,2),\n                            vec4i_swizzle1(b,1,0,3,2)),\n              0,2,0,2),\n            0,2,1,3);\n#endif\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pdiv<Packet4f>(const Packet4f& a, const Packet4f& b) { return _mm_div_ps(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pdiv<Packet2d>(const Packet2d& a, const Packet2d& b) { return _mm_div_pd(a,b); }\n\n// for some weird raisons, it has to be overloaded for packet of integers\ntemplate<> EIGEN_STRONG_INLINE Packet4i pmadd(const Packet4i& a, const Packet4i& b, const Packet4i& c) { return padd(pmul(a,b), c); }\n#ifdef EIGEN_VECTORIZE_FMA\ntemplate<> EIGEN_STRONG_INLINE Packet4f pmadd(const Packet4f& a, const Packet4f& b, const Packet4f& c) { return _mm_fmadd_ps(a,b,c); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pmadd(const Packet2d& a, const Packet2d& b, const Packet2d& c) { return _mm_fmadd_pd(a,b,c); }\n#endif\n\n#ifdef EIGEN_VECTORIZE_SSE4_1\ntemplate<> EIGEN_DEVICE_FUNC inline Packet4f pselect(const Packet4f& mask, const Packet4f& a, const Packet4f& b) {  return _mm_blendv_ps(b,a,mask); }\n\ntemplate<> EIGEN_DEVICE_FUNC inline Packet2d pselect(const Packet2d& mask, const Packet2d& a, const Packet2d& b) {  return _mm_blendv_pd(b,a,mask); }\n#endif\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pmin<Packet4f>(const Packet4f& a, const Packet4f& b) {\n#if EIGEN_COMP_GNUC && EIGEN_COMP_GNUC < 63\n  // There appears to be a bug in GCC, by which the optimizer may\n  // flip the argument order in calls to _mm_min_ps, so we have to\n  // resort to inline ASM here. This is supposed to be fixed in gcc6.3,\n  // see also: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72867\n  #ifdef EIGEN_VECTORIZE_AVX\n  Packet4f res;\n  asm(\"vminps %[a], %[b], %[res]\" : [res] \"=x\" (res) : [a] \"x\" (a), [b] \"x\" (b));\n  #else\n  Packet4f res = b;\n  asm(\"minps %[a], %[res]\" : [res] \"+x\" (res) : [a] \"x\" (a));\n  #endif\n  return res;\n#else\n  // Arguments are reversed to match NaN propagation behavior of std::min.\n  return _mm_min_ps(b, a);\n#endif\n}\ntemplate<> EIGEN_STRONG_INLINE Packet2d pmin<Packet2d>(const Packet2d& a, const Packet2d& b) {\n#if EIGEN_COMP_GNUC && EIGEN_COMP_GNUC < 63\n  // There appears to be a bug in GCC, by which the optimizer may\n  // flip the argument order in calls to _mm_min_pd, so we have to\n  // resort to inline ASM here. This is supposed to be fixed in gcc6.3,\n  // see also: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72867\n  #ifdef EIGEN_VECTORIZE_AVX\n  Packet2d res;\n  asm(\"vminpd %[a], %[b], %[res]\" : [res] \"=x\" (res) : [a] \"x\" (a), [b] \"x\" (b));\n  #else\n  Packet2d res = b;\n  asm(\"minpd %[a], %[res]\" : [res] \"+x\" (res) : [a] \"x\" (a));\n  #endif\n  return res;\n#else\n  // Arguments are reversed to match NaN propagation behavior of std::min.\n  return _mm_min_pd(b, a);\n#endif\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4i pmin<Packet4i>(const Packet4i& a, const Packet4i& b)\n{\n#ifdef EIGEN_VECTORIZE_SSE4_1\n  return _mm_min_epi32(a,b);\n#else\n  // after some bench, this version *is* faster than a scalar implementation\n  Packet4i mask = _mm_cmplt_epi32(a,b);\n  return _mm_or_si128(_mm_and_si128(mask,a),_mm_andnot_si128(mask,b));\n#endif\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pmax<Packet4f>(const Packet4f& a, const Packet4f& b) {\n#if EIGEN_COMP_GNUC && EIGEN_COMP_GNUC < 63\n  // There appears to be a bug in GCC, by which the optimizer may\n  // flip the argument order in calls to _mm_max_ps, so we have to\n  // resort to inline ASM here. This is supposed to be fixed in gcc6.3,\n  // see also: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72867\n  #ifdef EIGEN_VECTORIZE_AVX\n  Packet4f res;\n  asm(\"vmaxps %[a], %[b], %[res]\" : [res] \"=x\" (res) : [a] \"x\" (a), [b] \"x\" (b));\n  #else\n  Packet4f res = b;\n  asm(\"maxps %[a], %[res]\" : [res] \"+x\" (res) : [a] \"x\" (a));\n  #endif\n  return res;\n#else\n  // Arguments are reversed to match NaN propagation behavior of std::max.\n  return _mm_max_ps(b, a);\n#endif\n}\ntemplate<> EIGEN_STRONG_INLINE Packet2d pmax<Packet2d>(const Packet2d& a, const Packet2d& b) {\n#if EIGEN_COMP_GNUC && EIGEN_COMP_GNUC < 63\n  // There appears to be a bug in GCC, by which the optimizer may\n  // flip the argument order in calls to _mm_max_pd, so we have to\n  // resort to inline ASM here. This is supposed to be fixed in gcc6.3,\n  // see also: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72867\n  #ifdef EIGEN_VECTORIZE_AVX\n  Packet2d res;\n  asm(\"vmaxpd %[a], %[b], %[res]\" : [res] \"=x\" (res) : [a] \"x\" (a), [b] \"x\" (b));\n  #else\n  Packet2d res = b;\n  asm(\"maxpd %[a], %[res]\" : [res] \"+x\" (res) : [a] \"x\" (a));\n  #endif\n  return res;\n#else\n  // Arguments are reversed to match NaN propagation behavior of std::max.\n  return _mm_max_pd(b, a);\n#endif\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4i pmax<Packet4i>(const Packet4i& a, const Packet4i& b)\n{\n#ifdef EIGEN_VECTORIZE_SSE4_1\n  return _mm_max_epi32(a,b);\n#else\n  // after some bench, this version *is* faster than a scalar implementation\n  Packet4i mask = _mm_cmpgt_epi32(a,b);\n  return _mm_or_si128(_mm_and_si128(mask,a),_mm_andnot_si128(mask,b));\n#endif\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pcmp_le(const Packet4f& a, const Packet4f& b) { return _mm_cmple_ps(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pcmp_lt(const Packet4f& a, const Packet4f& b) { return _mm_cmplt_ps(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pcmp_lt_or_nan(const Packet4f& a, const Packet4f& b) { return _mm_cmpnge_ps(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pcmp_eq(const Packet4f& a, const Packet4f& b) { return _mm_cmpeq_ps(a,b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d pcmp_le(const Packet2d& a, const Packet2d& b) { return _mm_cmple_pd(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pcmp_lt(const Packet2d& a, const Packet2d& b) { return _mm_cmplt_pd(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pcmp_lt_or_nan(const Packet2d& a, const Packet2d& b) { return _mm_cmpnge_pd(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pcmp_eq(const Packet2d& a, const Packet2d& b) { return _mm_cmpeq_pd(a,b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4i pcmp_lt(const Packet4i& a, const Packet4i& b) { return _mm_cmplt_epi32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pcmp_eq(const Packet4i& a, const Packet4i& b) { return _mm_cmpeq_epi32(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet16b pcmp_eq(const Packet16b& a, const Packet16b& b) { return _mm_cmpeq_epi8(a,b); }\n\n\ntemplate<> EIGEN_STRONG_INLINE Packet4i ptrue<Packet4i>(const Packet4i& a) { return _mm_cmpeq_epi32(a, a); }\ntemplate<> EIGEN_STRONG_INLINE Packet16b ptrue<Packet16b>(const Packet16b& a) { return _mm_cmpeq_epi8(a, a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f\nptrue<Packet4f>(const Packet4f& a) {\n  Packet4i b = _mm_castps_si128(a);\n  return _mm_castsi128_ps(_mm_cmpeq_epi32(b, b));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet2d\nptrue<Packet2d>(const Packet2d& a) {\n  Packet4i b = _mm_castpd_si128(a);\n  return _mm_castsi128_pd(_mm_cmpeq_epi32(b, b));\n}\n\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pand<Packet4f>(const Packet4f& a, const Packet4f& b) { return _mm_and_ps(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pand<Packet2d>(const Packet2d& a, const Packet2d& b) { return _mm_and_pd(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pand<Packet4i>(const Packet4i& a, const Packet4i& b) { return _mm_and_si128(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet16b pand<Packet16b>(const Packet16b& a, const Packet16b& b) { return _mm_and_si128(a,b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f por<Packet4f>(const Packet4f& a, const Packet4f& b) { return _mm_or_ps(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d por<Packet2d>(const Packet2d& a, const Packet2d& b) { return _mm_or_pd(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i por<Packet4i>(const Packet4i& a, const Packet4i& b) { return _mm_or_si128(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet16b por<Packet16b>(const Packet16b& a, const Packet16b& b) { return _mm_or_si128(a,b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pxor<Packet4f>(const Packet4f& a, const Packet4f& b) { return _mm_xor_ps(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pxor<Packet2d>(const Packet2d& a, const Packet2d& b) { return _mm_xor_pd(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pxor<Packet4i>(const Packet4i& a, const Packet4i& b) { return _mm_xor_si128(a,b); }\ntemplate<> EIGEN_STRONG_INLINE Packet16b pxor<Packet16b>(const Packet16b& a, const Packet16b& b) { return _mm_xor_si128(a,b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pandnot<Packet4f>(const Packet4f& a, const Packet4f& b) { return _mm_andnot_ps(b,a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pandnot<Packet2d>(const Packet2d& a, const Packet2d& b) { return _mm_andnot_pd(b,a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pandnot<Packet4i>(const Packet4i& a, const Packet4i& b) { return _mm_andnot_si128(b,a); }\n\ntemplate<int N> EIGEN_STRONG_INLINE Packet4i parithmetic_shift_right(Packet4i a) { return _mm_srai_epi32(a,N); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet4i plogical_shift_right(Packet4i a) { return _mm_srli_epi32(a,N); }\ntemplate<int N> EIGEN_STRONG_INLINE Packet4i plogical_shift_left(Packet4i a) { return _mm_slli_epi32(a,N); }\n\n#ifdef EIGEN_VECTORIZE_SSE4_1\ntemplate<> EIGEN_STRONG_INLINE Packet4f pround<Packet4f>(const Packet4f& a)\n{\n  // Unfortunatly _mm_round_ps doesn't have a rounding mode to implement numext::round.\n  const Packet4f mask = pset1frombits<Packet4f>(0x80000000u);\n  const Packet4f prev0dot5 = pset1frombits<Packet4f>(0x3EFFFFFFu);\n  return _mm_round_ps(padd(por(pand(a, mask), prev0dot5), a), _MM_FROUND_TO_ZERO);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d pround<Packet2d>(const Packet2d& a)\n{\n  const Packet2d mask = _mm_castsi128_pd(_mm_set_epi64x(0x8000000000000000ull, 0x8000000000000000ull));\n  const Packet2d prev0dot5 = _mm_castsi128_pd(_mm_set_epi64x(0x3FDFFFFFFFFFFFFFull, 0x3FDFFFFFFFFFFFFFull));\n  return _mm_round_pd(padd(por(pand(a, mask), prev0dot5), a), _MM_FROUND_TO_ZERO);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f print<Packet4f>(const Packet4f& a) { return _mm_round_ps(a, _MM_FROUND_CUR_DIRECTION); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d print<Packet2d>(const Packet2d& a) { return _mm_round_pd(a, _MM_FROUND_CUR_DIRECTION); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pceil<Packet4f>(const Packet4f& a) { return _mm_ceil_ps(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pceil<Packet2d>(const Packet2d& a) { return _mm_ceil_pd(a); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pfloor<Packet4f>(const Packet4f& a) { return _mm_floor_ps(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pfloor<Packet2d>(const Packet2d& a) { return _mm_floor_pd(a); }\n#else\ntemplate<> EIGEN_STRONG_INLINE Packet4f pfloor<Packet4f>(const Packet4f& a)\n{\n  const Packet4f cst_1 = pset1<Packet4f>(1.0f);\n  Packet4i emm0 = _mm_cvttps_epi32(a);\n  Packet4f tmp  = _mm_cvtepi32_ps(emm0);\n  /* if greater, substract 1 */\n  Packet4f mask = _mm_cmpgt_ps(tmp, a);\n  mask = pand(mask, cst_1);\n  return psub(tmp, mask);\n}\n\n// WARNING: this pfloor implementation makes sense for small inputs only,\n// It is currently only used by pexp and not exposed through HasFloor.\ntemplate<> EIGEN_STRONG_INLINE Packet2d pfloor<Packet2d>(const Packet2d& a)\n{\n  const Packet2d cst_1 = pset1<Packet2d>(1.0);\n  Packet4i emm0 = _mm_cvttpd_epi32(a);\n  Packet2d tmp  = _mm_cvtepi32_pd(emm0);\n  /* if greater, substract 1 */\n  Packet2d mask = _mm_cmpgt_pd(tmp, a);\n  mask = pand(mask, cst_1);\n  return psub(tmp, mask);\n}\n#endif\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pload<Packet4f>(const float*   from) { EIGEN_DEBUG_ALIGNED_LOAD return _mm_load_ps(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pload<Packet2d>(const double*  from) { EIGEN_DEBUG_ALIGNED_LOAD return _mm_load_pd(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i pload<Packet4i>(const int*     from) { EIGEN_DEBUG_ALIGNED_LOAD return _mm_load_si128(reinterpret_cast<const __m128i*>(from)); }\ntemplate<> EIGEN_STRONG_INLINE Packet16b pload<Packet16b>(const bool*     from) { EIGEN_DEBUG_ALIGNED_LOAD return  _mm_load_si128(reinterpret_cast<const __m128i*>(from)); }\n\n#if EIGEN_COMP_MSVC\n  template<> EIGEN_STRONG_INLINE Packet4f ploadu<Packet4f>(const float*  from) {\n    EIGEN_DEBUG_UNALIGNED_LOAD\n    #if (EIGEN_COMP_MSVC==1600)\n    // NOTE Some version of MSVC10 generates bad code when using _mm_loadu_ps\n    // (i.e., it does not generate an unaligned load!!\n    __m128 res = _mm_loadl_pi(_mm_set1_ps(0.0f), (const __m64*)(from));\n    res = _mm_loadh_pi(res, (const __m64*)(from+2));\n    return res;\n    #else\n    return _mm_loadu_ps(from);\n    #endif\n  }\n#else\n// NOTE: with the code below, MSVC's compiler crashes!\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f ploadu<Packet4f>(const float* from)\n{\n  EIGEN_DEBUG_UNALIGNED_LOAD\n  return _mm_loadu_ps(from);\n}\n#endif\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d ploadu<Packet2d>(const double* from)\n{\n  EIGEN_DEBUG_UNALIGNED_LOAD\n  return _mm_loadu_pd(from);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4i ploadu<Packet4i>(const int* from)\n{\n  EIGEN_DEBUG_UNALIGNED_LOAD\n  return _mm_loadu_si128(reinterpret_cast<const __m128i*>(from));\n}\ntemplate<> EIGEN_STRONG_INLINE Packet16b ploadu<Packet16b>(const bool*     from) {\n  EIGEN_DEBUG_UNALIGNED_LOAD\n  return _mm_loadu_si128(reinterpret_cast<const __m128i*>(from));\n}\n\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f ploaddup<Packet4f>(const float*   from)\n{\n  return vec4f_swizzle1(_mm_castpd_ps(_mm_load_sd(reinterpret_cast<const double*>(from))), 0, 0, 1, 1);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet2d ploaddup<Packet2d>(const double*  from)\n{ return pset1<Packet2d>(from[0]); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i ploaddup<Packet4i>(const int*     from)\n{\n  Packet4i tmp;\n  tmp = _mm_loadl_epi64(reinterpret_cast<const __m128i*>(from));\n  return vec4i_swizzle1(tmp, 0, 0, 1, 1);\n}\n\ntemplate<> EIGEN_STRONG_INLINE void pstore<float>(float*   to, const Packet4f& from) { EIGEN_DEBUG_ALIGNED_STORE _mm_store_ps(to, from); }\ntemplate<> EIGEN_STRONG_INLINE void pstore<double>(double* to, const Packet2d& from) { EIGEN_DEBUG_ALIGNED_STORE _mm_store_pd(to, from); }\ntemplate<> EIGEN_STRONG_INLINE void pstore<int>(int*       to, const Packet4i& from) { EIGEN_DEBUG_ALIGNED_STORE _mm_store_si128(reinterpret_cast<__m128i*>(to), from); }\ntemplate<> EIGEN_STRONG_INLINE void pstore<bool>(bool*     to, const Packet16b& from) { EIGEN_DEBUG_ALIGNED_STORE _mm_store_si128(reinterpret_cast<__m128i*>(to), from); }\n\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<double>(double* to, const Packet2d& from) { EIGEN_DEBUG_UNALIGNED_STORE _mm_storeu_pd(to, from); }\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<float>(float*   to, const Packet4f& from) { EIGEN_DEBUG_UNALIGNED_STORE _mm_storeu_ps(to, from); }\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<int>(int*       to, const Packet4i& from) { EIGEN_DEBUG_UNALIGNED_STORE _mm_storeu_si128(reinterpret_cast<__m128i*>(to), from); }\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<bool>(bool*     to, const Packet16b& from) { EIGEN_DEBUG_ALIGNED_STORE _mm_storeu_si128(reinterpret_cast<__m128i*>(to), from); }\n\ntemplate<> EIGEN_DEVICE_FUNC inline Packet4f pgather<float, Packet4f>(const float* from, Index stride)\n{\n return _mm_set_ps(from[3*stride], from[2*stride], from[1*stride], from[0*stride]);\n}\ntemplate<> EIGEN_DEVICE_FUNC inline Packet2d pgather<double, Packet2d>(const double* from, Index stride)\n{\n return _mm_set_pd(from[1*stride], from[0*stride]);\n}\ntemplate<> EIGEN_DEVICE_FUNC inline Packet4i pgather<int, Packet4i>(const int* from, Index stride)\n{\n return _mm_set_epi32(from[3*stride], from[2*stride], from[1*stride], from[0*stride]);\n }\n\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<float, Packet4f>(float* to, const Packet4f& from, Index stride)\n{\n  to[stride*0] = _mm_cvtss_f32(from);\n  to[stride*1] = _mm_cvtss_f32(_mm_shuffle_ps(from, from, 1));\n  to[stride*2] = _mm_cvtss_f32(_mm_shuffle_ps(from, from, 2));\n  to[stride*3] = _mm_cvtss_f32(_mm_shuffle_ps(from, from, 3));\n}\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<double, Packet2d>(double* to, const Packet2d& from, Index stride)\n{\n  to[stride*0] = _mm_cvtsd_f64(from);\n  to[stride*1] = _mm_cvtsd_f64(_mm_shuffle_pd(from, from, 1));\n}\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<int, Packet4i>(int* to, const Packet4i& from, Index stride)\n{\n  to[stride*0] = _mm_cvtsi128_si32(from);\n  to[stride*1] = _mm_cvtsi128_si32(_mm_shuffle_epi32(from, 1));\n  to[stride*2] = _mm_cvtsi128_si32(_mm_shuffle_epi32(from, 2));\n  to[stride*3] = _mm_cvtsi128_si32(_mm_shuffle_epi32(from, 3));\n}\n\n// some compilers might be tempted to perform multiple moves instead of using a vector path.\ntemplate<> EIGEN_STRONG_INLINE void pstore1<Packet4f>(float* to, const float& a)\n{\n  Packet4f pa = _mm_set_ss(a);\n  pstore(to, Packet4f(vec4f_swizzle1(pa,0,0,0,0)));\n}\n// some compilers might be tempted to perform multiple moves instead of using a vector path.\ntemplate<> EIGEN_STRONG_INLINE void pstore1<Packet2d>(double* to, const double& a)\n{\n  Packet2d pa = _mm_set_sd(a);\n  pstore(to, Packet2d(vec2d_swizzle1(pa,0,0)));\n}\n\n#if EIGEN_COMP_PGI && EIGEN_COMP_PGI < 1900\ntypedef const void * SsePrefetchPtrType;\n#else\ntypedef const char * SsePrefetchPtrType;\n#endif\n\n#ifndef EIGEN_VECTORIZE_AVX\ntemplate<> EIGEN_STRONG_INLINE void prefetch<float>(const float*   addr) { _mm_prefetch((SsePrefetchPtrType)(addr), _MM_HINT_T0); }\ntemplate<> EIGEN_STRONG_INLINE void prefetch<double>(const double* addr) { _mm_prefetch((SsePrefetchPtrType)(addr), _MM_HINT_T0); }\ntemplate<> EIGEN_STRONG_INLINE void prefetch<int>(const int*       addr) { _mm_prefetch((SsePrefetchPtrType)(addr), _MM_HINT_T0); }\n#endif\n\n#if EIGEN_COMP_MSVC_STRICT && EIGEN_OS_WIN64\n// The temporary variable fixes an internal compilation error in vs <= 2008 and a wrong-result bug in vs 2010\n// Direct of the struct members fixed bug #62.\ntemplate<> EIGEN_STRONG_INLINE float  pfirst<Packet4f>(const Packet4f& a) { return a.m128_f32[0]; }\ntemplate<> EIGEN_STRONG_INLINE double pfirst<Packet2d>(const Packet2d& a) { return a.m128d_f64[0]; }\ntemplate<> EIGEN_STRONG_INLINE int    pfirst<Packet4i>(const Packet4i& a) { int x = _mm_cvtsi128_si32(a); return x; }\n#elif EIGEN_COMP_MSVC_STRICT\n// The temporary variable fixes an internal compilation error in vs <= 2008 and a wrong-result bug in vs 2010\ntemplate<> EIGEN_STRONG_INLINE float  pfirst<Packet4f>(const Packet4f& a) { float x = _mm_cvtss_f32(a); return x; }\ntemplate<> EIGEN_STRONG_INLINE double pfirst<Packet2d>(const Packet2d& a) { double x = _mm_cvtsd_f64(a); return x; }\ntemplate<> EIGEN_STRONG_INLINE int    pfirst<Packet4i>(const Packet4i& a) { int x = _mm_cvtsi128_si32(a); return x; }\n#else\ntemplate<> EIGEN_STRONG_INLINE float  pfirst<Packet4f>(const Packet4f& a) { return _mm_cvtss_f32(a); }\ntemplate<> EIGEN_STRONG_INLINE double pfirst<Packet2d>(const Packet2d& a) { return _mm_cvtsd_f64(a); }\ntemplate<> EIGEN_STRONG_INLINE int    pfirst<Packet4i>(const Packet4i& a) { return _mm_cvtsi128_si32(a); }\n#endif\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f preverse(const Packet4f& a)\n{ return _mm_shuffle_ps(a,a,0x1B); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d preverse(const Packet2d& a)\n{ return _mm_shuffle_pd(a,a,0x1); }\ntemplate<> EIGEN_STRONG_INLINE Packet4i preverse(const Packet4i& a)\n{ return _mm_shuffle_epi32(a,0x1B); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pabs(const Packet4f& a)\n{\n  const Packet4f mask = _mm_castsi128_ps(_mm_setr_epi32(0x7FFFFFFF,0x7FFFFFFF,0x7FFFFFFF,0x7FFFFFFF));\n  return _mm_and_ps(a,mask);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet2d pabs(const Packet2d& a)\n{\n  const Packet2d mask = _mm_castsi128_pd(_mm_setr_epi32(0xFFFFFFFF,0x7FFFFFFF,0xFFFFFFFF,0x7FFFFFFF));\n  return _mm_and_pd(a,mask);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4i pabs(const Packet4i& a)\n{\n  #ifdef EIGEN_VECTORIZE_SSSE3\n  return _mm_abs_epi32(a);\n  #else\n  Packet4i aux = _mm_srai_epi32(a,31);\n  return _mm_sub_epi32(_mm_xor_si128(a,aux),aux);\n  #endif\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pfrexp<Packet4f>(const Packet4f& a, Packet4f& exponent) {\n  return pfrexp_float(a,exponent);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pldexp<Packet4f>(const Packet4f& a, const Packet4f& exponent) {\n  return pldexp_float(a,exponent);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d pldexp<Packet2d>(const Packet2d& a, const Packet2d& exponent) {\n  const Packet4i cst_1023_0 = _mm_setr_epi32(1023, 1023, 0, 0);\n  Packet4i emm0 = _mm_cvttpd_epi32(exponent);\n  emm0 = padd(emm0, cst_1023_0);\n  emm0 = _mm_slli_epi32(emm0, 20);\n  emm0 = _mm_shuffle_epi32(emm0, _MM_SHUFFLE(1,2,0,3));\n  return pmul(a, Packet2d(_mm_castsi128_pd(emm0)));\n}\n\n// with AVX, the default implementations based on pload1 are faster\n#ifndef __AVX__\ntemplate<> EIGEN_STRONG_INLINE void\npbroadcast4<Packet4f>(const float *a,\n                      Packet4f& a0, Packet4f& a1, Packet4f& a2, Packet4f& a3)\n{\n  a3 = pload<Packet4f>(a);\n  a0 = vec4f_swizzle1(a3, 0,0,0,0);\n  a1 = vec4f_swizzle1(a3, 1,1,1,1);\n  a2 = vec4f_swizzle1(a3, 2,2,2,2);\n  a3 = vec4f_swizzle1(a3, 3,3,3,3);\n}\ntemplate<> EIGEN_STRONG_INLINE void\npbroadcast4<Packet2d>(const double *a,\n                      Packet2d& a0, Packet2d& a1, Packet2d& a2, Packet2d& a3)\n{\n#ifdef EIGEN_VECTORIZE_SSE3\n  a0 = _mm_loaddup_pd(a+0);\n  a1 = _mm_loaddup_pd(a+1);\n  a2 = _mm_loaddup_pd(a+2);\n  a3 = _mm_loaddup_pd(a+3);\n#else\n  a1 = pload<Packet2d>(a);\n  a0 = vec2d_swizzle1(a1, 0,0);\n  a1 = vec2d_swizzle1(a1, 1,1);\n  a3 = pload<Packet2d>(a+2);\n  a2 = vec2d_swizzle1(a3, 0,0);\n  a3 = vec2d_swizzle1(a3, 1,1);\n#endif\n}\n#endif\n\nEIGEN_STRONG_INLINE void punpackp(Packet4f* vecs)\n{\n  vecs[1] = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(vecs[0]), 0x55));\n  vecs[2] = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(vecs[0]), 0xAA));\n  vecs[3] = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(vecs[0]), 0xFF));\n  vecs[0] = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(vecs[0]), 0x00));\n}\n\n#ifdef EIGEN_VECTORIZE_SSE3\ntemplate<> EIGEN_STRONG_INLINE Packet4f preduxp<Packet4f>(const Packet4f* vecs)\n{\n  return _mm_hadd_ps(_mm_hadd_ps(vecs[0], vecs[1]),_mm_hadd_ps(vecs[2], vecs[3]));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d preduxp<Packet2d>(const Packet2d* vecs)\n{\n  return _mm_hadd_pd(vecs[0], vecs[1]);\n}\n\n#else\ntemplate<> EIGEN_STRONG_INLINE Packet4f preduxp<Packet4f>(const Packet4f* vecs)\n{\n  Packet4f tmp0, tmp1, tmp2;\n  tmp0 = _mm_unpacklo_ps(vecs[0], vecs[1]);\n  tmp1 = _mm_unpackhi_ps(vecs[0], vecs[1]);\n  tmp2 = _mm_unpackhi_ps(vecs[2], vecs[3]);\n  tmp0 = _mm_add_ps(tmp0, tmp1);\n  tmp1 = _mm_unpacklo_ps(vecs[2], vecs[3]);\n  tmp1 = _mm_add_ps(tmp1, tmp2);\n  tmp2 = _mm_movehl_ps(tmp1, tmp0);\n  tmp0 = _mm_movelh_ps(tmp0, tmp1);\n  return _mm_add_ps(tmp0, tmp2);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d preduxp<Packet2d>(const Packet2d* vecs)\n{\n  return _mm_add_pd(_mm_unpacklo_pd(vecs[0], vecs[1]), _mm_unpackhi_pd(vecs[0], vecs[1]));\n}\n#endif  // SSE3\n\ntemplate<> EIGEN_STRONG_INLINE float predux<Packet4f>(const Packet4f& a)\n{\n  // Disable SSE3 _mm_hadd_pd that is extremely slow on all existing Intel's architectures\n  // (from Nehalem to Haswell)\n// #ifdef EIGEN_VECTORIZE_SSE3\n//   Packet4f tmp = _mm_add_ps(a, vec4f_swizzle1(a,2,3,2,3));\n//   return pfirst<Packet4f>(_mm_hadd_ps(tmp, tmp));\n// #else\n  Packet4f tmp = _mm_add_ps(a, _mm_movehl_ps(a,a));\n  return pfirst<Packet4f>(_mm_add_ss(tmp, _mm_shuffle_ps(tmp,tmp, 1)));\n// #endif\n}\n\ntemplate<> EIGEN_STRONG_INLINE double predux<Packet2d>(const Packet2d& a)\n{\n  // Disable SSE3 _mm_hadd_pd that is extremely slow on all existing Intel's architectures\n  // (from Nehalem to Haswell)\n// #ifdef EIGEN_VECTORIZE_SSE3\n//   return pfirst<Packet2d>(_mm_hadd_pd(a, a));\n// #else\n  return pfirst<Packet2d>(_mm_add_sd(a, _mm_unpackhi_pd(a,a)));\n// #endif\n}\n\n#ifdef EIGEN_VECTORIZE_SSSE3\ntemplate<> EIGEN_STRONG_INLINE Packet4i preduxp<Packet4i>(const Packet4i* vecs)\n{\n  return _mm_hadd_epi32(_mm_hadd_epi32(vecs[0], vecs[1]),_mm_hadd_epi32(vecs[2], vecs[3]));\n}\ntemplate<> EIGEN_STRONG_INLINE int predux<Packet4i>(const Packet4i& a)\n{\n  Packet4i tmp0 = _mm_hadd_epi32(a,a);\n  return pfirst<Packet4i>(_mm_hadd_epi32(tmp0,tmp0));\n}\n#else\ntemplate<> EIGEN_STRONG_INLINE int predux<Packet4i>(const Packet4i& a)\n{\n  Packet4i tmp = _mm_add_epi32(a, _mm_unpackhi_epi64(a,a));\n  return pfirst(tmp) + pfirst<Packet4i>(_mm_shuffle_epi32(tmp, 1));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4i preduxp<Packet4i>(const Packet4i* vecs)\n{\n  Packet4i tmp0, tmp1, tmp2;\n  tmp0 = _mm_unpacklo_epi32(vecs[0], vecs[1]);\n  tmp1 = _mm_unpackhi_epi32(vecs[0], vecs[1]);\n  tmp2 = _mm_unpackhi_epi32(vecs[2], vecs[3]);\n  tmp0 = _mm_add_epi32(tmp0, tmp1);\n  tmp1 = _mm_unpacklo_epi32(vecs[2], vecs[3]);\n  tmp1 = _mm_add_epi32(tmp1, tmp2);\n  tmp2 = _mm_unpacklo_epi64(tmp0, tmp1);\n  tmp0 = _mm_unpackhi_epi64(tmp0, tmp1);\n  return _mm_add_epi32(tmp0, tmp2);\n}\n#endif\n// Other reduction functions:\n\n// mul\ntemplate<> EIGEN_STRONG_INLINE float predux_mul<Packet4f>(const Packet4f& a)\n{\n  Packet4f tmp = _mm_mul_ps(a, _mm_movehl_ps(a,a));\n  return pfirst<Packet4f>(_mm_mul_ss(tmp, _mm_shuffle_ps(tmp,tmp, 1)));\n}\ntemplate<> EIGEN_STRONG_INLINE double predux_mul<Packet2d>(const Packet2d& a)\n{\n  return pfirst<Packet2d>(_mm_mul_sd(a, _mm_unpackhi_pd(a,a)));\n}\ntemplate<> EIGEN_STRONG_INLINE int predux_mul<Packet4i>(const Packet4i& a)\n{\n  // after some experiments, it is seems this is the fastest way to implement it\n  // for GCC (eg., reusing pmul is very slow !)\n  // TODO try to call _mm_mul_epu32 directly\n  EIGEN_ALIGN16 int aux[4];\n  pstore(aux, a);\n  return  (aux[0] * aux[1]) * (aux[2] * aux[3]);\n}\n\n// min\ntemplate<> EIGEN_STRONG_INLINE float predux_min<Packet4f>(const Packet4f& a)\n{\n  Packet4f tmp = _mm_min_ps(a, _mm_movehl_ps(a,a));\n  return pfirst<Packet4f>(_mm_min_ss(tmp, _mm_shuffle_ps(tmp,tmp, 1)));\n}\ntemplate<> EIGEN_STRONG_INLINE double predux_min<Packet2d>(const Packet2d& a)\n{\n  return pfirst<Packet2d>(_mm_min_sd(a, _mm_unpackhi_pd(a,a)));\n}\ntemplate<> EIGEN_STRONG_INLINE int predux_min<Packet4i>(const Packet4i& a)\n{\n#ifdef EIGEN_VECTORIZE_SSE4_1\n  Packet4i tmp = _mm_min_epi32(a, _mm_shuffle_epi32(a, _MM_SHUFFLE(0,0,3,2)));\n  return pfirst<Packet4i>(_mm_min_epi32(tmp,_mm_shuffle_epi32(tmp, 1)));\n#else\n  // after some experiments, it is seems this is the fastest way to implement it\n  // for GCC (eg., it does not like using std::min after the pstore !!)\n  EIGEN_ALIGN16 int aux[4];\n  pstore(aux, a);\n  int aux0 = aux[0]<aux[1] ? aux[0] : aux[1];\n  int aux2 = aux[2]<aux[3] ? aux[2] : aux[3];\n  return aux0<aux2 ? aux0 : aux2;\n#endif // EIGEN_VECTORIZE_SSE4_1\n}\n\n// max\ntemplate<> EIGEN_STRONG_INLINE float predux_max<Packet4f>(const Packet4f& a)\n{\n  Packet4f tmp = _mm_max_ps(a, _mm_movehl_ps(a,a));\n  return pfirst<Packet4f>(_mm_max_ss(tmp, _mm_shuffle_ps(tmp,tmp, 1)));\n}\ntemplate<> EIGEN_STRONG_INLINE double predux_max<Packet2d>(const Packet2d& a)\n{\n  return pfirst<Packet2d>(_mm_max_sd(a, _mm_unpackhi_pd(a,a)));\n}\ntemplate<> EIGEN_STRONG_INLINE int predux_max<Packet4i>(const Packet4i& a)\n{\n#ifdef EIGEN_VECTORIZE_SSE4_1\n  Packet4i tmp = _mm_max_epi32(a, _mm_shuffle_epi32(a, _MM_SHUFFLE(0,0,3,2)));\n  return pfirst<Packet4i>(_mm_max_epi32(tmp,_mm_shuffle_epi32(tmp, 1)));\n#else\n  // after some experiments, it is seems this is the fastest way to implement it\n  // for GCC (eg., it does not like using std::min after the pstore !!)\n  EIGEN_ALIGN16 int aux[4];\n  pstore(aux, a);\n  int aux0 = aux[0]>aux[1] ? aux[0] : aux[1];\n  int aux2 = aux[2]>aux[3] ? aux[2] : aux[3];\n  return aux0>aux2 ? aux0 : aux2;\n#endif // EIGEN_VECTORIZE_SSE4_1\n}\n\n// not needed yet\n// template<> EIGEN_STRONG_INLINE bool predux_all(const Packet4f& x)\n// {\n//   return _mm_movemask_ps(x) == 0xF;\n// }\n\ntemplate<> EIGEN_STRONG_INLINE bool predux_any(const Packet4f& x)\n{\n  return _mm_movemask_ps(x) != 0x0;\n}\n\n#if EIGEN_COMP_GNUC\n// template <> EIGEN_STRONG_INLINE Packet4f pmadd(const Packet4f&  a, const Packet4f&  b, const Packet4f&  c)\n// {\n//   Packet4f res = b;\n//   asm(\"mulps %[a], %[b] \\n\\taddps %[c], %[b]\" : [b] \"+x\" (res) : [a] \"x\" (a), [c] \"x\" (c));\n//   return res;\n// }\n// EIGEN_STRONG_INLINE Packet4i _mm_alignr_epi8(const Packet4i&  a, const Packet4i&  b, const int i)\n// {\n//   Packet4i res = a;\n//   asm(\"palignr %[i], %[a], %[b] \" : [b] \"+x\" (res) : [a] \"x\" (a), [i] \"i\" (i));\n//   return res;\n// }\n#endif\n\n#ifdef EIGEN_VECTORIZE_SSSE3\n// SSSE3 versions\ntemplate<int Offset>\nstruct palign_impl<Offset,Packet4f>\n{\n  static EIGEN_STRONG_INLINE void run(Packet4f& first, const Packet4f& second)\n  {\n    if (Offset!=0)\n      first = _mm_castsi128_ps(_mm_alignr_epi8(_mm_castps_si128(second), _mm_castps_si128(first), Offset*4));\n  }\n};\n\ntemplate<int Offset>\nstruct palign_impl<Offset,Packet4i>\n{\n  static EIGEN_STRONG_INLINE void run(Packet4i& first, const Packet4i& second)\n  {\n    if (Offset!=0)\n      first = _mm_alignr_epi8(second,first, Offset*4);\n  }\n};\n\ntemplate<int Offset>\nstruct palign_impl<Offset,Packet2d>\n{\n  static EIGEN_STRONG_INLINE void run(Packet2d& first, const Packet2d& second)\n  {\n    if (Offset==1)\n      first = _mm_castsi128_pd(_mm_alignr_epi8(_mm_castpd_si128(second), _mm_castpd_si128(first), 8));\n  }\n};\n#else\n// SSE2 versions\ntemplate<int Offset>\nstruct palign_impl<Offset,Packet4f>\n{\n  static EIGEN_STRONG_INLINE void run(Packet4f& first, const Packet4f& second)\n  {\n    if (Offset==1)\n    {\n      first = _mm_move_ss(first,second);\n      first = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(first),0x39));\n    }\n    else if (Offset==2)\n    {\n      first = _mm_movehl_ps(first,first);\n      first = _mm_movelh_ps(first,second);\n    }\n    else if (Offset==3)\n    {\n      first = _mm_move_ss(first,second);\n      first = _mm_shuffle_ps(first,second,0x93);\n    }\n  }\n};\n\ntemplate<int Offset>\nstruct palign_impl<Offset,Packet4i>\n{\n  static EIGEN_STRONG_INLINE void run(Packet4i& first, const Packet4i& second)\n  {\n    if (Offset==1)\n    {\n      first = _mm_castps_si128(_mm_move_ss(_mm_castsi128_ps(first),_mm_castsi128_ps(second)));\n      first = _mm_shuffle_epi32(first,0x39);\n    }\n    else if (Offset==2)\n    {\n      first = _mm_castps_si128(_mm_movehl_ps(_mm_castsi128_ps(first),_mm_castsi128_ps(first)));\n      first = _mm_castps_si128(_mm_movelh_ps(_mm_castsi128_ps(first),_mm_castsi128_ps(second)));\n    }\n    else if (Offset==3)\n    {\n      first = _mm_castps_si128(_mm_move_ss(_mm_castsi128_ps(first),_mm_castsi128_ps(second)));\n      first = _mm_castps_si128(_mm_shuffle_ps(_mm_castsi128_ps(first),_mm_castsi128_ps(second),0x93));\n    }\n  }\n};\n\ntemplate<int Offset>\nstruct palign_impl<Offset,Packet2d>\n{\n  static EIGEN_STRONG_INLINE void run(Packet2d& first, const Packet2d& second)\n  {\n    if (Offset==1)\n    {\n      first = _mm_castps_pd(_mm_movehl_ps(_mm_castpd_ps(first),_mm_castpd_ps(first)));\n      first = _mm_castps_pd(_mm_movelh_ps(_mm_castpd_ps(first),_mm_castpd_ps(second)));\n    }\n  }\n};\n#endif\n\nEIGEN_DEVICE_FUNC inline void\nptranspose(PacketBlock<Packet4f,4>& kernel) {\n  _MM_TRANSPOSE4_PS(kernel.packet[0], kernel.packet[1], kernel.packet[2], kernel.packet[3]);\n}\n\nEIGEN_DEVICE_FUNC inline void\nptranspose(PacketBlock<Packet2d,2>& kernel) {\n  __m128d tmp = _mm_unpackhi_pd(kernel.packet[0], kernel.packet[1]);\n  kernel.packet[0] = _mm_unpacklo_pd(kernel.packet[0], kernel.packet[1]);\n  kernel.packet[1] = tmp;\n}\n\nEIGEN_DEVICE_FUNC inline void\nptranspose(PacketBlock<Packet4i,4>& kernel) {\n  __m128i T0 = _mm_unpacklo_epi32(kernel.packet[0], kernel.packet[1]);\n  __m128i T1 = _mm_unpacklo_epi32(kernel.packet[2], kernel.packet[3]);\n  __m128i T2 = _mm_unpackhi_epi32(kernel.packet[0], kernel.packet[1]);\n  __m128i T3 = _mm_unpackhi_epi32(kernel.packet[2], kernel.packet[3]);\n\n  kernel.packet[0] = _mm_unpacklo_epi64(T0, T1);\n  kernel.packet[1] = _mm_unpackhi_epi64(T0, T1);\n  kernel.packet[2] = _mm_unpacklo_epi64(T2, T3);\n  kernel.packet[3] = _mm_unpackhi_epi64(T2, T3);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4i pblend(const Selector<4>& ifPacket, const Packet4i& thenPacket, const Packet4i& elsePacket) {\n  const __m128i zero = _mm_setzero_si128();\n  const __m128i select = _mm_set_epi32(ifPacket.select[3], ifPacket.select[2], ifPacket.select[1], ifPacket.select[0]);\n  __m128i false_mask = _mm_cmpeq_epi32(select, zero);\n#ifdef EIGEN_VECTORIZE_SSE4_1\n  return _mm_blendv_epi8(thenPacket, elsePacket, false_mask);\n#else\n  return _mm_or_si128(_mm_andnot_si128(false_mask, thenPacket), _mm_and_si128(false_mask, elsePacket));\n#endif\n}\ntemplate<> EIGEN_STRONG_INLINE Packet4f pblend(const Selector<4>& ifPacket, const Packet4f& thenPacket, const Packet4f& elsePacket) {\n  const __m128 zero = _mm_setzero_ps();\n  const __m128 select = _mm_set_ps(ifPacket.select[3], ifPacket.select[2], ifPacket.select[1], ifPacket.select[0]);\n  __m128 false_mask = _mm_cmpeq_ps(select, zero);\n#ifdef EIGEN_VECTORIZE_SSE4_1\n  return _mm_blendv_ps(thenPacket, elsePacket, false_mask);\n#else\n  return _mm_or_ps(_mm_andnot_ps(false_mask, thenPacket), _mm_and_ps(false_mask, elsePacket));\n#endif\n}\ntemplate<> EIGEN_STRONG_INLINE Packet2d pblend(const Selector<2>& ifPacket, const Packet2d& thenPacket, const Packet2d& elsePacket) {\n  const __m128d zero = _mm_setzero_pd();\n  const __m128d select = _mm_set_pd(ifPacket.select[1], ifPacket.select[0]);\n  __m128d false_mask = _mm_cmpeq_pd(select, zero);\n#ifdef EIGEN_VECTORIZE_SSE4_1\n  return _mm_blendv_pd(thenPacket, elsePacket, false_mask);\n#else\n  return _mm_or_pd(_mm_andnot_pd(false_mask, thenPacket), _mm_and_pd(false_mask, elsePacket));\n#endif\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pinsertfirst(const Packet4f& a, float b)\n{\n#ifdef EIGEN_VECTORIZE_SSE4_1\n  return _mm_blend_ps(a,pset1<Packet4f>(b),1);\n#else\n  return _mm_move_ss(a, _mm_load_ss(&b));\n#endif\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d pinsertfirst(const Packet2d& a, double b)\n{\n#ifdef EIGEN_VECTORIZE_SSE4_1\n  return _mm_blend_pd(a,pset1<Packet2d>(b),1);\n#else\n  return _mm_move_sd(a, _mm_load_sd(&b));\n#endif\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pinsertlast(const Packet4f& a, float b)\n{\n#ifdef EIGEN_VECTORIZE_SSE4_1\n  return _mm_blend_ps(a,pset1<Packet4f>(b),(1<<3));\n#else\n  const Packet4f mask = _mm_castsi128_ps(_mm_setr_epi32(0x0,0x0,0x0,0xFFFFFFFF));\n  return _mm_or_ps(_mm_andnot_ps(mask, a), _mm_and_ps(mask, pset1<Packet4f>(b)));\n#endif\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d pinsertlast(const Packet2d& a, double b)\n{\n#ifdef EIGEN_VECTORIZE_SSE4_1\n  return _mm_blend_pd(a,pset1<Packet2d>(b),(1<<1));\n#else\n  const Packet2d mask = _mm_castsi128_pd(_mm_setr_epi32(0x0,0x0,0xFFFFFFFF,0xFFFFFFFF));\n  return _mm_or_pd(_mm_andnot_pd(mask, a), _mm_and_pd(mask, pset1<Packet2d>(b)));\n#endif\n}\n\n// Scalar path for pmadd with FMA to ensure consistency with vectorized path.\n#ifdef EIGEN_VECTORIZE_FMA\ntemplate<> EIGEN_STRONG_INLINE float pmadd(const float& a, const float& b, const float& c) {\n  return ::fmaf(a,b,c);\n}\ntemplate<> EIGEN_STRONG_INLINE double pmadd(const double& a, const double& b, const double& c) {\n  return ::fma(a,b,c);\n}\n#endif\n\n\n// Packet math for Eigen::half\n// Disable the following code since it's broken on too many platforms / compilers.\n//#elif defined(EIGEN_VECTORIZE_SSE) && (!EIGEN_ARCH_x86_64) && (!EIGEN_COMP_MSVC)\n#if 0\n\ntypedef struct {\n  __m64 x;\n} Packet4h;\n\n\ntemplate<> struct is_arithmetic<Packet4h> { enum { value = true }; };\n\ntemplate <>\nstruct packet_traits<Eigen::half> : default_packet_traits {\n  typedef Packet4h type;\n  // There is no half-size packet for Packet4h.\n  typedef Packet4h half;\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size = 4,\n    HasHalfPacket = 0,\n    HasAdd    = 1,\n    HasSub    = 1,\n    HasMul    = 1,\n    HasDiv    = 1,\n    HasNegate = 0,\n    HasAbs    = 0,\n    HasAbs2   = 0,\n    HasMin    = 0,\n    HasMax    = 0,\n    HasConj   = 0,\n    HasSetLinear = 0,\n    HasSqrt = 0,\n    HasRsqrt = 0,\n    HasExp = 0,\n    HasLog = 0,\n    HasBlend = 0\n  };\n};\n\n\ntemplate<> struct unpacket_traits<Packet4h> { typedef Eigen::half type; enum {size=4, alignment=Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false}; typedef Packet4h half; };\n\ntemplate<> EIGEN_STRONG_INLINE Packet4h pset1<Packet4h>(const Eigen::half& from) {\n  Packet4h result;\n  result.x = _mm_set1_pi16(from.x);\n  return result;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Eigen::half pfirst<Packet4h>(const Packet4h& from) {\n  return half_impl::raw_uint16_to_half(static_cast<unsigned short>(_mm_cvtsi64_si32(from.x)));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4h pconj(const Packet4h& a) { return a; }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4h padd<Packet4h>(const Packet4h& a, const Packet4h& b) {\n  __int64_t a64 = _mm_cvtm64_si64(a.x);\n  __int64_t b64 = _mm_cvtm64_si64(b.x);\n\n  Eigen::half h[4];\n\n  Eigen::half ha = half_impl::raw_uint16_to_half(static_cast<unsigned short>(a64));\n  Eigen::half hb = half_impl::raw_uint16_to_half(static_cast<unsigned short>(b64));\n  h[0] = ha + hb;\n  ha = half_impl::raw_uint16_to_half(static_cast<unsigned short>(a64 >> 16));\n  hb = half_impl::raw_uint16_to_half(static_cast<unsigned short>(b64 >> 16));\n  h[1] = ha + hb;\n  ha = half_impl::raw_uint16_to_half(static_cast<unsigned short>(a64 >> 32));\n  hb = half_impl::raw_uint16_to_half(static_cast<unsigned short>(b64 >> 32));\n  h[2] = ha + hb;\n  ha = half_impl::raw_uint16_to_half(static_cast<unsigned short>(a64 >> 48));\n  hb = half_impl::raw_uint16_to_half(static_cast<unsigned short>(b64 >> 48));\n  h[3] = ha + hb;\n  Packet4h result;\n  result.x = _mm_set_pi16(h[3].x, h[2].x, h[1].x, h[0].x);\n  return result;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4h psub<Packet4h>(const Packet4h& a, const Packet4h& b) {\n  __int64_t a64 = _mm_cvtm64_si64(a.x);\n  __int64_t b64 = _mm_cvtm64_si64(b.x);\n\n  Eigen::half h[4];\n\n  Eigen::half ha = half_impl::raw_uint16_to_half(static_cast<unsigned short>(a64));\n  Eigen::half hb = half_impl::raw_uint16_to_half(static_cast<unsigned short>(b64));\n  h[0] = ha - hb;\n  ha = half_impl::raw_uint16_to_half(static_cast<unsigned short>(a64 >> 16));\n  hb = half_impl::raw_uint16_to_half(static_cast<unsigned short>(b64 >> 16));\n  h[1] = ha - hb;\n  ha = half_impl::raw_uint16_to_half(static_cast<unsigned short>(a64 >> 32));\n  hb = half_impl::raw_uint16_to_half(static_cast<unsigned short>(b64 >> 32));\n  h[2] = ha - hb;\n  ha = half_impl::raw_uint16_to_half(static_cast<unsigned short>(a64 >> 48));\n  hb = half_impl::raw_uint16_to_half(static_cast<unsigned short>(b64 >> 48));\n  h[3] = ha - hb;\n  Packet4h result;\n  result.x = _mm_set_pi16(h[3].x, h[2].x, h[1].x, h[0].x);\n  return result;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4h pmul<Packet4h>(const Packet4h& a, const Packet4h& b) {\n  __int64_t a64 = _mm_cvtm64_si64(a.x);\n  __int64_t b64 = _mm_cvtm64_si64(b.x);\n\n  Eigen::half h[4];\n\n  Eigen::half ha = half_impl::raw_uint16_to_half(static_cast<unsigned short>(a64));\n  Eigen::half hb = half_impl::raw_uint16_to_half(static_cast<unsigned short>(b64));\n  h[0] = ha * hb;\n  ha = half_impl::raw_uint16_to_half(static_cast<unsigned short>(a64 >> 16));\n  hb = half_impl::raw_uint16_to_half(static_cast<unsigned short>(b64 >> 16));\n  h[1] = ha * hb;\n  ha = half_impl::raw_uint16_to_half(static_cast<unsigned short>(a64 >> 32));\n  hb = half_impl::raw_uint16_to_half(static_cast<unsigned short>(b64 >> 32));\n  h[2] = ha * hb;\n  ha = half_impl::raw_uint16_to_half(static_cast<unsigned short>(a64 >> 48));\n  hb = half_impl::raw_uint16_to_half(static_cast<unsigned short>(b64 >> 48));\n  h[3] = ha * hb;\n  Packet4h result;\n  result.x = _mm_set_pi16(h[3].x, h[2].x, h[1].x, h[0].x);\n  return result;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4h pdiv<Packet4h>(const Packet4h& a, const Packet4h& b) {\n  __int64_t a64 = _mm_cvtm64_si64(a.x);\n  __int64_t b64 = _mm_cvtm64_si64(b.x);\n\n  Eigen::half h[4];\n\n  Eigen::half ha = half_impl::raw_uint16_to_half(static_cast<unsigned short>(a64));\n  Eigen::half hb = half_impl::raw_uint16_to_half(static_cast<unsigned short>(b64));\n  h[0] = ha / hb;\n  ha = half_impl::raw_uint16_to_half(static_cast<unsigned short>(a64 >> 16));\n  hb = half_impl::raw_uint16_to_half(static_cast<unsigned short>(b64 >> 16));\n  h[1] = ha / hb;\n  ha = half_impl::raw_uint16_to_half(static_cast<unsigned short>(a64 >> 32));\n  hb = half_impl::raw_uint16_to_half(static_cast<unsigned short>(b64 >> 32));\n  h[2] = ha / hb;\n  ha = half_impl::raw_uint16_to_half(static_cast<unsigned short>(a64 >> 48));\n  hb = half_impl::raw_uint16_to_half(static_cast<unsigned short>(b64 >> 48));\n  h[3] = ha / hb;\n  Packet4h result;\n  result.x = _mm_set_pi16(h[3].x, h[2].x, h[1].x, h[0].x);\n  return result;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4h pload<Packet4h>(const Eigen::half* from) {\n  Packet4h result;\n  result.x = _mm_cvtsi64_m64(*reinterpret_cast<const __int64_t*>(from));\n  return result;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4h ploadu<Packet4h>(const Eigen::half* from) {\n  Packet4h result;\n  result.x = _mm_cvtsi64_m64(*reinterpret_cast<const __int64_t*>(from));\n  return result;\n}\n\ntemplate<> EIGEN_STRONG_INLINE void pstore<Eigen::half>(Eigen::half* to, const Packet4h& from) {\n  __int64_t r = _mm_cvtm64_si64(from.x);\n  *(reinterpret_cast<__int64_t*>(to)) = r;\n}\n\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<Eigen::half>(Eigen::half* to, const Packet4h& from) {\n  __int64_t r = _mm_cvtm64_si64(from.x);\n  *(reinterpret_cast<__int64_t*>(to)) = r;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4h\nploadquad<Packet4h>(const Eigen::half* from) {\n  return pset1<Packet4h>(*from);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4h pgather<Eigen::half, Packet4h>(const Eigen::half* from, Index stride)\n{\n  Packet4h result;\n  result.x = _mm_set_pi16(from[3*stride].x, from[2*stride].x, from[1*stride].x, from[0*stride].x);\n  return result;\n}\n\ntemplate<> EIGEN_STRONG_INLINE void pscatter<Eigen::half, Packet4h>(Eigen::half* to, const Packet4h& from, Index stride)\n{\n  __int64_t a = _mm_cvtm64_si64(from.x);\n  to[stride*0].x = static_cast<unsigned short>(a);\n  to[stride*1].x = static_cast<unsigned short>(a >> 16);\n  to[stride*2].x = static_cast<unsigned short>(a >> 32);\n  to[stride*3].x = static_cast<unsigned short>(a >> 48);\n}\n\nEIGEN_STRONG_INLINE void\nptranspose(PacketBlock<Packet4h,4>& kernel) {\n  __m64 T0 = _mm_unpacklo_pi16(kernel.packet[0].x, kernel.packet[1].x);\n  __m64 T1 = _mm_unpacklo_pi16(kernel.packet[2].x, kernel.packet[3].x);\n  __m64 T2 = _mm_unpackhi_pi16(kernel.packet[0].x, kernel.packet[1].x);\n  __m64 T3 = _mm_unpackhi_pi16(kernel.packet[2].x, kernel.packet[3].x);\n\n  kernel.packet[0].x = _mm_unpacklo_pi32(T0, T1);\n  kernel.packet[1].x = _mm_unpackhi_pi32(T0, T1);\n  kernel.packet[2].x = _mm_unpacklo_pi32(T2, T3);\n  kernel.packet[3].x = _mm_unpackhi_pi32(T2, T3);\n}\n\n#endif\n\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#if EIGEN_COMP_PGI && EIGEN_COMP_PGI < 1900\n// PGI++ does not define the following intrinsics in C++ mode.\nstatic inline __m128  _mm_castpd_ps   (__m128d x) { return reinterpret_cast<__m128&>(x);  }\nstatic inline __m128i _mm_castpd_si128(__m128d x) { return reinterpret_cast<__m128i&>(x); }\nstatic inline __m128d _mm_castps_pd   (__m128  x) { return reinterpret_cast<__m128d&>(x); }\nstatic inline __m128i _mm_castps_si128(__m128  x) { return reinterpret_cast<__m128i&>(x); }\nstatic inline __m128  _mm_castsi128_ps(__m128i x) { return reinterpret_cast<__m128&>(x);  }\nstatic inline __m128d _mm_castsi128_pd(__m128i x) { return reinterpret_cast<__m128d&>(x); }\n#endif\n\n#endif // EIGEN_PACKET_MATH_SSE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/SSE/TypeCasting.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_TYPE_CASTING_SSE_H\n#define EIGEN_TYPE_CASTING_SSE_H\n\nnamespace Eigen {\n\nnamespace internal {\n\n#ifndef EIGEN_VECTORIZE_AVX\ntemplate <>\nstruct type_casting_traits<float, int> {\n  enum {\n    VectorizedCast = 1,\n    SrcCoeffRatio = 1,\n    TgtCoeffRatio = 1\n  };\n};\n\ntemplate <>\nstruct type_casting_traits<int, float> {\n  enum {\n    VectorizedCast = 1,\n    SrcCoeffRatio = 1,\n    TgtCoeffRatio = 1\n  };\n};\n\ntemplate <>\nstruct type_casting_traits<double, float> {\n  enum {\n    VectorizedCast = 1,\n    SrcCoeffRatio = 2,\n    TgtCoeffRatio = 1\n  };\n};\n\ntemplate <>\nstruct type_casting_traits<float, double> {\n  enum {\n    VectorizedCast = 1,\n    SrcCoeffRatio = 1,\n    TgtCoeffRatio = 2\n  };\n};\n#endif\n\ntemplate<> EIGEN_STRONG_INLINE Packet4i pcast<Packet4f, Packet4i>(const Packet4f& a) {\n  return _mm_cvttps_epi32(a);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pcast<Packet4i, Packet4f>(const Packet4i& a) {\n  return _mm_cvtepi32_ps(a);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pcast<Packet2d, Packet4f>(const Packet2d& a, const Packet2d& b) {\n  return _mm_shuffle_ps(_mm_cvtpd_ps(a), _mm_cvtpd_ps(b), (1 << 2) | (1 << 6));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d pcast<Packet4f, Packet2d>(const Packet4f& a) {\n  // Simply discard the second half of the input\n  return _mm_cvtps_pd(a);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4i preinterpret<Packet4i,Packet4f>(const Packet4f& a) {\n  return _mm_castps_si128(a);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f preinterpret<Packet4f,Packet4i>(const Packet4i& a) {\n  return _mm_castsi128_ps(a);\n}\n\n\n// Disable the following code since it's broken on too many platforms / compilers.\n//#elif defined(EIGEN_VECTORIZE_SSE) && (!EIGEN_ARCH_x86_64) && (!EIGEN_COMP_MSVC)\n#if 0\n\ntemplate <>\nstruct type_casting_traits<Eigen::half, float> {\n  enum {\n    VectorizedCast = 1,\n    SrcCoeffRatio = 1,\n    TgtCoeffRatio = 1\n  };\n};\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pcast<Packet4h, Packet4f>(const Packet4h& a) {\n  __int64_t a64 = _mm_cvtm64_si64(a.x);\n  Eigen::half h = raw_uint16_to_half(static_cast<unsigned short>(a64));\n  float f1 = static_cast<float>(h);\n  h = raw_uint16_to_half(static_cast<unsigned short>(a64 >> 16));\n  float f2 = static_cast<float>(h);\n  h = raw_uint16_to_half(static_cast<unsigned short>(a64 >> 32));\n  float f3 = static_cast<float>(h);\n  h = raw_uint16_to_half(static_cast<unsigned short>(a64 >> 48));\n  float f4 = static_cast<float>(h);\n  return _mm_set_ps(f4, f3, f2, f1);\n}\n\ntemplate <>\nstruct type_casting_traits<float, Eigen::half> {\n  enum {\n    VectorizedCast = 1,\n    SrcCoeffRatio = 1,\n    TgtCoeffRatio = 1\n  };\n};\n\ntemplate<> EIGEN_STRONG_INLINE Packet4h pcast<Packet4f, Packet4h>(const Packet4f& a) {\n  EIGEN_ALIGN16 float aux[4];\n  pstore(aux, a);\n  Eigen::half h0(aux[0]);\n  Eigen::half h1(aux[1]);\n  Eigen::half h2(aux[2]);\n  Eigen::half h3(aux[3]);\n\n  Packet4h result;\n  result.x = _mm_set_pi16(h3.x, h2.x, h1.x, h0.x);\n  return result;\n}\n\n#endif\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_TYPE_CASTING_SSE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/SYCL/InteropHeaders.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Mehdi Goli    Codeplay Software Ltd.\n// Ralph Potter  Codeplay Software Ltd.\n// Luke Iwanski  Codeplay Software Ltd.\n// Contact: <eigen@codeplay.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n/*****************************************************************\n * InteropHeaders.h\n *\n * \\brief:\n *  InteropHeaders\n *\n *****************************************************************/\n\n#ifndef EIGEN_INTEROP_HEADERS_SYCL_H\n#define EIGEN_INTEROP_HEADERS_SYCL_H\n\nnamespace Eigen {\n\n#if !defined(EIGEN_DONT_VECTORIZE_SYCL)\n\nnamespace internal {\n\ntemplate <int has_blend, int lengths>\nstruct sycl_packet_traits : default_packet_traits {\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size = lengths,\n    HasHalfPacket = 0,\n    HasDiv = 1,\n    HasLog = 1,\n    HasExp = 1,\n    HasSqrt = 1,\n    HasRsqrt = 1,\n    HasSin = 1,\n    HasCos = 1,\n    HasTan = 1,\n    HasASin = 1,\n    HasACos = 1,\n    HasATan = 1,\n    HasSinh = 1,\n    HasCosh = 1,\n    HasTanh = 1,\n    HasLGamma = 0,\n    HasDiGamma = 0,\n    HasZeta = 0,\n    HasPolygamma = 0,\n    HasErf = 0,\n    HasErfc = 0,\n    HasNdtri = 0,\n    HasIGamma = 0,\n    HasIGammac = 0,\n    HasBetaInc = 0,\n    HasBlend = has_blend,\n    HasMax = 1,\n    HasMin = 1,\n    HasMul = 1,\n    HasAdd = 1,\n    HasFloor = 1,\n    HasRound = 1,\n    HasRint = 1,\n    HasLog1p = 1,\n    HasExpm1 = 1,\n    HasCeil = 1,\n  };\n};\n\n#ifdef SYCL_DEVICE_ONLY\n#define SYCL_PACKET_TRAITS(packet_type, has_blend, unpacket_type, lengths) \\\n  template <>                                                              \\\n  struct packet_traits<unpacket_type>                                      \\\n      : sycl_packet_traits<has_blend, lengths> {                           \\\n    typedef packet_type type;                                              \\\n    typedef packet_type half;                                              \\\n  };\n\nSYCL_PACKET_TRAITS(cl::sycl::cl_float4, 1, float, 4)\nSYCL_PACKET_TRAITS(cl::sycl::cl_float4, 1, const float, 4)\nSYCL_PACKET_TRAITS(cl::sycl::cl_double2, 0, double, 2)\nSYCL_PACKET_TRAITS(cl::sycl::cl_double2, 0, const double, 2)\n#undef SYCL_PACKET_TRAITS\n\n// Make sure this is only available when targeting a GPU: we don't want to\n// introduce conflicts between these packet_traits definitions and the ones\n// we'll use on the host side (SSE, AVX, ...)\n#define SYCL_ARITHMETIC(packet_type)  \\\n  template <>                         \\\n  struct is_arithmetic<packet_type> { \\\n    enum { value = true };            \\\n  };\nSYCL_ARITHMETIC(cl::sycl::cl_float4)\nSYCL_ARITHMETIC(cl::sycl::cl_double2)\n#undef SYCL_ARITHMETIC\n\n#define SYCL_UNPACKET_TRAITS(packet_type, unpacket_type, lengths)        \\\n  template <>                                                            \\\n  struct unpacket_traits<packet_type> {                                  \\\n    typedef unpacket_type type;                                          \\\n    enum { size = lengths, vectorizable = true, alignment = Aligned16 }; \\\n    typedef packet_type half;                                            \\\n  };\nSYCL_UNPACKET_TRAITS(cl::sycl::cl_float4, float, 4)\nSYCL_UNPACKET_TRAITS(cl::sycl::cl_double2, double, 2)\n\n#undef SYCL_UNPACKET_TRAITS\n#endif\n\n}  // end namespace internal\n\n#endif\n\nnamespace TensorSycl {\nnamespace internal {\n\ntemplate <typename PacketReturnType, int PacketSize>\nstruct PacketWrapper;\n// This function should never get called on the device\n#ifndef SYCL_DEVICE_ONLY\ntemplate <typename PacketReturnType, int PacketSize>\nstruct PacketWrapper {\n  typedef typename ::Eigen::internal::unpacket_traits<PacketReturnType>::type\n      Scalar;\n  template <typename Index>\n  EIGEN_DEVICE_FUNC static Scalar scalarize(Index, PacketReturnType &) {\n    eigen_assert(false && \"THERE IS NO PACKETIZE VERSION FOR  THE CHOSEN TYPE\");\n    abort();\n  }\n  EIGEN_DEVICE_FUNC static PacketReturnType convert_to_packet_type(Scalar in,\n                                                                   Scalar) {\n    return ::Eigen::internal::template plset<PacketReturnType>(in);\n  }\n  EIGEN_DEVICE_FUNC static void set_packet(PacketReturnType, Scalar *) {\n    eigen_assert(false && \"THERE IS NO PACKETIZE VERSION FOR  THE CHOSEN TYPE\");\n    abort();\n  }\n};\n\n#elif defined(SYCL_DEVICE_ONLY)\ntemplate <typename PacketReturnType>\nstruct PacketWrapper<PacketReturnType, 4> {\n  typedef typename ::Eigen::internal::unpacket_traits<PacketReturnType>::type\n      Scalar;\n  template <typename Index>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE static Scalar scalarize(Index index, PacketReturnType &in) {\n    switch (index) {\n      case 0:\n        return in.x();\n      case 1:\n        return in.y();\n      case 2:\n        return in.z();\n      case 3:\n        return in.w();\n      default:\n      //INDEX MUST BE BETWEEN 0 and 3.There is no abort function in SYCL kernel. so we cannot use abort here. \n      // The code will never reach here\n      __builtin_unreachable();\n    }\n    __builtin_unreachable();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE static PacketReturnType convert_to_packet_type(\n      Scalar in, Scalar other) {\n    return PacketReturnType(in, other, other, other);\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE static void set_packet(PacketReturnType &lhs, Scalar *rhs) {\n    lhs = PacketReturnType(rhs[0], rhs[1], rhs[2], rhs[3]);\n  }\n};\n\ntemplate <typename PacketReturnType>\nstruct PacketWrapper<PacketReturnType, 1> {\n  typedef typename ::Eigen::internal::unpacket_traits<PacketReturnType>::type\n      Scalar;\n  template <typename Index>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE static Scalar scalarize(Index, PacketReturnType &in) {\n    return in;\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE static PacketReturnType convert_to_packet_type(Scalar in,\n                                                                   Scalar) {\n    return PacketReturnType(in);\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE static void set_packet(PacketReturnType &lhs, Scalar *rhs) {\n    lhs = rhs[0];\n  }\n};\n\ntemplate <typename PacketReturnType>\nstruct PacketWrapper<PacketReturnType, 2> {\n  typedef typename ::Eigen::internal::unpacket_traits<PacketReturnType>::type\n      Scalar;\n  template <typename Index>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE static Scalar scalarize(Index index, PacketReturnType &in) {\n    switch (index) {\n      case 0:\n        return in.x();\n      case 1:\n        return in.y();\n      default:\n        //INDEX MUST BE BETWEEN 0 and 1.There is no abort function in SYCL kernel. so we cannot use abort here. \n      // The code will never reach here\n        __builtin_unreachable();\n    }\n    __builtin_unreachable();\n  }\n  \n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE static PacketReturnType convert_to_packet_type(\n      Scalar in, Scalar other) {\n    return PacketReturnType(in, other);\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE static void set_packet(PacketReturnType &lhs, Scalar *rhs) {\n    lhs = PacketReturnType(rhs[0], rhs[1]);\n  }\n};\n\n#endif\n\n}  // end namespace internal\n}  // end namespace TensorSycl\n}  // end namespace Eigen\n\n#endif  // EIGEN_INTEROP_HEADERS_SYCL_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/SYCL/MathFunctions.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Mehdi Goli    Codeplay Software Ltd.\n// Ralph Potter  Codeplay Software Ltd.\n// Luke Iwanski  Codeplay Software Ltd.\n// Contact: <eigen@codeplay.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n/*****************************************************************\n * MathFunctions.h\n *\n * \\brief:\n *  MathFunctions\n *\n *****************************************************************/\n\n#ifndef EIGEN_MATH_FUNCTIONS_SYCL_H\n#define EIGEN_MATH_FUNCTIONS_SYCL_H\n\nnamespace Eigen {\n\nnamespace internal {\n\n// Make sure this is only available when targeting a GPU: we don't want to\n// introduce conflicts between these packet_traits definitions and the ones\n// we'll use on the host side (SSE, AVX, ...)\n#if defined(SYCL_DEVICE_ONLY)\n#define SYCL_PLOG(packet_type)                                         \\\n  template <>                                                          \\\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE packet_type plog<packet_type>( \\\n      const packet_type& a) {                                          \\\n    return cl::sycl::log(a);                                           \\\n  }\n\nSYCL_PLOG(cl::sycl::cl_float4)\nSYCL_PLOG(cl::sycl::cl_double2)\n#undef SYCL_PLOG\n\n#define SYCL_PLOG1P(packet_type)                                         \\\n  template <>                                                            \\\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE packet_type plog1p<packet_type>( \\\n      const packet_type& a) {                                            \\\n    return cl::sycl::log1p(a);                                           \\\n  }\n\nSYCL_PLOG1P(cl::sycl::cl_float4)\nSYCL_PLOG1P(cl::sycl::cl_double2)\n#undef SYCL_PLOG1P\n\n#define SYCL_PLOG10(packet_type)                                         \\\n  template <>                                                            \\\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE packet_type plog10<packet_type>( \\\n      const packet_type& a) {                                            \\\n    return cl::sycl::log10(a);                                           \\\n  }\n\nSYCL_PLOG10(cl::sycl::cl_float4)\nSYCL_PLOG10(cl::sycl::cl_double2)\n#undef SYCL_PLOG10\n\n#define SYCL_PEXP(packet_type)                                         \\\n  template <>                                                          \\\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE packet_type pexp<packet_type>( \\\n      const packet_type& a) {                                          \\\n    return cl::sycl::exp(a);                                           \\\n  }\n\nSYCL_PEXP(cl::sycl::cl_float4)\nSYCL_PEXP(cl::sycl::cl_double2)\n#undef SYCL_PEXP\n\n#define SYCL_PEXPM1(packet_type)                                         \\\n  template <>                                                            \\\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE packet_type pexpm1<packet_type>( \\\n      const packet_type& a) {                                            \\\n    return cl::sycl::expm1(a);                                           \\\n  }\n\nSYCL_PEXPM1(cl::sycl::cl_float4)\nSYCL_PEXPM1(cl::sycl::cl_double2)\n#undef SYCL_PEXPM1\n\n#define SYCL_PSQRT(packet_type)                                         \\\n  template <>                                                           \\\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE packet_type psqrt<packet_type>( \\\n      const packet_type& a) {                                           \\\n    return cl::sycl::sqrt(a);                                           \\\n  }\n\nSYCL_PSQRT(cl::sycl::cl_float4)\nSYCL_PSQRT(cl::sycl::cl_double2)\n#undef SYCL_PSQRT\n\n#define SYCL_PRSQRT(packet_type)                                         \\\n  template <>                                                            \\\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE packet_type prsqrt<packet_type>( \\\n      const packet_type& a) {                                            \\\n    return cl::sycl::rsqrt(a);                                           \\\n  }\n\nSYCL_PRSQRT(cl::sycl::cl_float4)\nSYCL_PRSQRT(cl::sycl::cl_double2)\n#undef SYCL_PRSQRT\n\n/** \\internal \\returns the hyperbolic sine of \\a a (coeff-wise) */\n#define SYCL_PSIN(packet_type)                                         \\\n  template <>                                                          \\\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE packet_type psin<packet_type>( \\\n      const packet_type& a) {                                          \\\n    return cl::sycl::sin(a);                                           \\\n  }\n\nSYCL_PSIN(cl::sycl::cl_float4)\nSYCL_PSIN(cl::sycl::cl_double2)\n#undef SYCL_PSIN\n\n/** \\internal \\returns the hyperbolic cosine of \\a a (coeff-wise) */\n#define SYCL_PCOS(packet_type)                                         \\\n  template <>                                                          \\\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE packet_type pcos<packet_type>( \\\n      const packet_type& a) {                                          \\\n    return cl::sycl::cos(a);                                           \\\n  }\n\nSYCL_PCOS(cl::sycl::cl_float4)\nSYCL_PCOS(cl::sycl::cl_double2)\n#undef SYCL_PCOS\n\n/** \\internal \\returns the hyperbolic tan of \\a a (coeff-wise) */\n#define SYCL_PTAN(packet_type)                                         \\\n  template <>                                                          \\\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE packet_type ptan<packet_type>( \\\n      const packet_type& a) {                                          \\\n    return cl::sycl::tan(a);                                           \\\n  }\n\nSYCL_PTAN(cl::sycl::cl_float4)\nSYCL_PTAN(cl::sycl::cl_double2)\n#undef SYCL_PTAN\n\n/** \\internal \\returns the hyperbolic sine of \\a a (coeff-wise) */\n#define SYCL_PASIN(packet_type)                                         \\\n  template <>                                                           \\\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE packet_type pasin<packet_type>( \\\n      const packet_type& a) {                                           \\\n    return cl::sycl::asin(a);                                           \\\n  }\n\nSYCL_PASIN(cl::sycl::cl_float4)\nSYCL_PASIN(cl::sycl::cl_double2)\n#undef SYCL_PASIN\n\n/** \\internal \\returns the hyperbolic cosine of \\a a (coeff-wise) */\n#define SYCL_PACOS(packet_type)                                         \\\n  template <>                                                           \\\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE packet_type pacos<packet_type>( \\\n      const packet_type& a) {                                           \\\n    return cl::sycl::acos(a);                                           \\\n  }\n\nSYCL_PACOS(cl::sycl::cl_float4)\nSYCL_PACOS(cl::sycl::cl_double2)\n#undef SYCL_PACOS\n\n/** \\internal \\returns the hyperbolic tan of \\a a (coeff-wise) */\n#define SYCL_PATAN(packet_type)                                         \\\n  template <>                                                           \\\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE packet_type patan<packet_type>( \\\n      const packet_type& a) {                                           \\\n    return cl::sycl::atan(a);                                           \\\n  }\n\nSYCL_PATAN(cl::sycl::cl_float4)\nSYCL_PATAN(cl::sycl::cl_double2)\n#undef SYCL_PATAN\n\n/** \\internal \\returns the hyperbolic sine of \\a a (coeff-wise) */\n#define SYCL_PSINH(packet_type)                                         \\\n  template <>                                                           \\\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE packet_type psinh<packet_type>( \\\n      const packet_type& a) {                                           \\\n    return cl::sycl::sinh(a);                                           \\\n  }\n\nSYCL_PSINH(cl::sycl::cl_float4)\nSYCL_PSINH(cl::sycl::cl_double2)\n#undef SYCL_PSINH\n\n/** \\internal \\returns the hyperbolic cosine of \\a a (coeff-wise) */\n#define SYCL_PCOSH(packet_type)                                         \\\n  template <>                                                           \\\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE packet_type pcosh<packet_type>( \\\n      const packet_type& a) {                                           \\\n    return cl::sycl::cosh(a);                                           \\\n  }\n\nSYCL_PCOSH(cl::sycl::cl_float4)\nSYCL_PCOSH(cl::sycl::cl_double2)\n#undef SYCL_PCOSH\n\n/** \\internal \\returns the hyperbolic tan of \\a a (coeff-wise) */\n#define SYCL_PTANH(packet_type)                                         \\\n  template <>                                                           \\\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE packet_type ptanh<packet_type>( \\\n      const packet_type& a) {                                           \\\n    return cl::sycl::tanh(a);                                           \\\n  }\n\nSYCL_PTANH(cl::sycl::cl_float4)\nSYCL_PTANH(cl::sycl::cl_double2)\n#undef SYCL_PTANH\n\n#define SYCL_PCEIL(packet_type)                                         \\\n  template <>                                                           \\\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE packet_type pceil<packet_type>( \\\n      const packet_type& a) {                                           \\\n    return cl::sycl::ceil(a);                                           \\\n  }\n\nSYCL_PCEIL(cl::sycl::cl_float4)\nSYCL_PCEIL(cl::sycl::cl_double2)\n#undef SYCL_PCEIL\n\n#define SYCL_PROUND(packet_type)                                         \\\n  template <>                                                            \\\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE packet_type pround<packet_type>( \\\n      const packet_type& a) {                                            \\\n    return cl::sycl::round(a);                                           \\\n  }\n\nSYCL_PROUND(cl::sycl::cl_float4)\nSYCL_PROUND(cl::sycl::cl_double2)\n#undef SYCL_PROUND\n\n#define SYCL_PRINT(packet_type)                                         \\\n  template<>                                                            \\\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE packet_type print<packet_type>( \\\n      const packet_type& a) {                                           \\\n    return cl::sycl::rint(a);                                           \\\n  }\n\nSYCL_PRINT(cl::sycl::cl_float4)\nSYCL_PRINT(cl::sycl::cl_double2)\n#undef SYCL_PRINT\n\n#define SYCL_FLOOR(packet_type)                                          \\\n  template <>                                                            \\\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE packet_type pfloor<packet_type>( \\\n      const packet_type& a) {                                            \\\n    return cl::sycl::floor(a);                                           \\\n  }\n\nSYCL_FLOOR(cl::sycl::cl_float4)\nSYCL_FLOOR(cl::sycl::cl_double2)\n#undef SYCL_FLOOR\n\n#define SYCL_PMIN(packet_type, expr)                                   \\\n  template <>                                                          \\\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE packet_type pmin<packet_type>( \\\n      const packet_type& a, const packet_type& b) {                    \\\n    return expr;                                                       \\\n  }\n\nSYCL_PMIN(cl::sycl::cl_float4, cl::sycl::fmin(a, b))\nSYCL_PMIN(cl::sycl::cl_double2, cl::sycl::fmin(a, b))\n#undef SYCL_PMIN\n\n#define SYCL_PMAX(packet_type, expr)                                   \\\n  template <>                                                          \\\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE packet_type pmax<packet_type>( \\\n      const packet_type& a, const packet_type& b) {                    \\\n    return expr;                                                       \\\n  }\n\nSYCL_PMAX(cl::sycl::cl_float4, cl::sycl::fmax(a, b))\nSYCL_PMAX(cl::sycl::cl_double2, cl::sycl::fmax(a, b))\n#undef SYCL_PMAX\n\n#endif\n\n}  // end namespace internal\n\n}  // end namespace Eigen\n\n#endif  // EIGEN_MATH_FUNCTIONS_SYCL_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/SYCL/PacketMath.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Mehdi Goli    Codeplay Software Ltd.\n// Ralph Potter  Codeplay Software Ltd.\n// Luke Iwanski  Codeplay Software Ltd.\n// Contact: <eigen@codeplay.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n/*****************************************************************\n * PacketMath.h\n *\n * \\brief:\n *  PacketMath\n *\n *****************************************************************/\n\n#ifndef EIGEN_PACKET_MATH_SYCL_H\n#define EIGEN_PACKET_MATH_SYCL_H\n#include <type_traits>\nnamespace Eigen {\n\nnamespace internal {\n#ifdef SYCL_DEVICE_ONLY\n\n#define SYCL_PLOADT_RO(address_space_target)                                 \\\n  template <typename packet_type, int Alignment>                             \\\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE packet_type ploadt_ro(               \\\n      typename cl::sycl::multi_ptr<                                          \\\n          const typename unpacket_traits<packet_type>::type,                 \\\n          cl::sycl::access::address_space::address_space_target>::pointer_t  \\\n          from) {                                                            \\\n    typedef typename unpacket_traits<packet_type>::type scalar;              \\\n    typedef cl::sycl::multi_ptr<                                             \\\n        scalar, cl::sycl::access::address_space::address_space_target>       \\\n        multi_ptr;                                                           \\\n    auto res = packet_type(                                                  \\\n        static_cast<typename unpacket_traits<packet_type>::type>(0));        \\\n    res.load(0, multi_ptr(const_cast<typename multi_ptr::pointer_t>(from))); \\\n    return res;                                                              \\\n  }\n\nSYCL_PLOADT_RO(global_space)\nSYCL_PLOADT_RO(local_space)\n#undef SYCL_PLOADT_RO\n#endif\n\ntemplate <typename packet_type, int Alignment, typename T>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE packet_type\nploadt_ro(const Eigen::TensorSycl::internal::RangeAccess<\n          cl::sycl::access::mode::read_write, T>& from) {\n  return ploadt_ro<packet_type, Alignment>(from.get_pointer());\n}\n\n#ifdef SYCL_DEVICE_ONLY\n#define SYCL_PLOAD(address_space_target, Alignment, AlignedType)            \\\n  template <typename packet_type>                                           \\\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE packet_type pload##AlignedType(     \\\n      typename cl::sycl::multi_ptr<                                         \\\n          const typename unpacket_traits<packet_type>::type,                \\\n          cl::sycl::access::address_space::address_space_target>::pointer_t \\\n          from) {                                                           \\\n    return ploadt_ro<packet_type, Alignment>(from);                         \\\n  }\n\n// global space\nSYCL_PLOAD(global_space, Unaligned, u)\nSYCL_PLOAD(global_space, Aligned, )\n// local space\nSYCL_PLOAD(local_space, Unaligned, u)\nSYCL_PLOAD(local_space, Aligned, )\n\n#undef SYCL_PLOAD\n#endif\n\n#define SYCL_PLOAD(Alignment, AlignedType)                              \\\n  template <typename packet_type>                                       \\\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE packet_type pload##AlignedType( \\\n      const Eigen::TensorSycl::internal::RangeAccess<                   \\\n          cl::sycl::access::mode::read_write,                           \\\n          typename unpacket_traits<packet_type>::type>                  \\\n          from) {                                                       \\\n    return ploadt_ro<packet_type, Alignment>(from);                     \\\n  }\nSYCL_PLOAD(Unaligned, u)\nSYCL_PLOAD(Aligned, )\n#undef SYCL_PLOAD\n\n#ifdef SYCL_DEVICE_ONLY\n/** \\internal \\returns a packet version of \\a *from.\n * The pointer \\a from must be aligned on a \\a Alignment bytes boundary. */\n#define SYCL_PLOADT(address_space_target)                                   \\\n  template <typename packet_type, int Alignment>                            \\\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE packet_type ploadt(                 \\\n      typename cl::sycl::multi_ptr<                                         \\\n          const typename unpacket_traits<packet_type>::type,                \\\n          cl::sycl::access::address_space::address_space_target>::pointer_t \\\n          from) {                                                           \\\n    if (Alignment >= unpacket_traits<packet_type>::alignment)               \\\n      return pload<packet_type>(from);                                      \\\n    else                                                                    \\\n      return ploadu<packet_type>(from);                                     \\\n  }\n\n// global space\nSYCL_PLOADT(global_space)\n// local space\nSYCL_PLOADT(local_space)\n#undef SYCL_PLOADT\n#endif\n\ntemplate <typename packet_type, int Alignment>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE packet_type\nploadt(const Eigen::TensorSycl::internal::RangeAccess<\n       cl::sycl::access::mode::read_write,\n       typename unpacket_traits<packet_type>::type>& from) {\n  return ploadt<packet_type, Alignment>(from.get_pointer());\n}\n#ifdef SYCL_DEVICE_ONLY\n\n// private_space\n#define SYCL_PLOADT_RO_SPECIAL(packet_type, Alignment)                 \\\n  template <>                                                          \\\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE packet_type                    \\\n  ploadt_ro<packet_type, Alignment>(                                   \\\n      const typename unpacket_traits<packet_type>::type* from) {       \\\n    typedef typename unpacket_traits<packet_type>::type scalar;        \\\n    auto res = packet_type(static_cast<scalar>(0));                    \\\n    res.template load<cl::sycl::access::address_space::private_space>( \\\n        0, const_cast<scalar*>(from));                                 \\\n    return res;                                                        \\\n  }\n\nSYCL_PLOADT_RO_SPECIAL(cl::sycl::cl_float4, Aligned)\nSYCL_PLOADT_RO_SPECIAL(cl::sycl::cl_double2, Aligned)\nSYCL_PLOADT_RO_SPECIAL(cl::sycl::cl_float4, Unaligned)\nSYCL_PLOADT_RO_SPECIAL(cl::sycl::cl_double2, Unaligned)\n\n#define SYCL_PLOAD_SPECIAL(packet_type, alignment_type)                    \\\n  template <>                                                              \\\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE packet_type pload##alignment_type( \\\n      const typename unpacket_traits<packet_type>::type* from) {           \\\n    typedef typename unpacket_traits<packet_type>::type scalar;            \\\n    auto res = packet_type(static_cast<scalar>(0));                        \\\n    res.template load<cl::sycl::access::address_space::private_space>(     \\\n        0, const_cast<scalar*>(from));                                     \\\n    return res;                                                            \\\n  }\nSYCL_PLOAD_SPECIAL(cl::sycl::cl_float4, )\nSYCL_PLOAD_SPECIAL(cl::sycl::cl_double2, )\nSYCL_PLOAD_SPECIAL(cl::sycl::cl_float4, u)\nSYCL_PLOAD_SPECIAL(cl::sycl::cl_double2, u)\n\n#undef SYCL_PLOAD_SPECIAL\n\n#define SYCL_PSTORE(scalar, packet_type, address_space_target, alignment)   \\\n  template <>                                                               \\\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void pstore##alignment(             \\\n      typename cl::sycl::multi_ptr<                                         \\\n          scalar,                                                           \\\n          cl::sycl::access::address_space::address_space_target>::pointer_t \\\n          to,                                                               \\\n      const packet_type& from) {                                            \\\n    typedef cl::sycl::multi_ptr<                                            \\\n        scalar, cl::sycl::access::address_space::address_space_target>      \\\n        multi_ptr;                                                          \\\n    from.store(0, multi_ptr(to));                                           \\\n  }\n\n// global space\nSYCL_PSTORE(float, cl::sycl::cl_float4, global_space, )\nSYCL_PSTORE(float, cl::sycl::cl_float4, global_space, u)\nSYCL_PSTORE(double, cl::sycl::cl_double2, global_space, )\nSYCL_PSTORE(double, cl::sycl::cl_double2, global_space, u)\nSYCL_PSTORE(float, cl::sycl::cl_float4, local_space, )\nSYCL_PSTORE(float, cl::sycl::cl_float4, local_space, u)\nSYCL_PSTORE(double, cl::sycl::cl_double2, local_space, )\nSYCL_PSTORE(double, cl::sycl::cl_double2, local_space, u)\n\nSYCL_PSTORE(float, cl::sycl::cl_float4, private_space, )\nSYCL_PSTORE(float, cl::sycl::cl_float4, private_space, u)\nSYCL_PSTORE(double, cl::sycl::cl_double2, private_space, )\nSYCL_PSTORE(double, cl::sycl::cl_double2, private_space, u)\n#undef SYCL_PSTORE\n\n#define SYCL_PSTORE_T(address_space_target)                                 \\\n  template <typename scalar, typename packet_type, int Alignment>           \\\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void pstoret(                       \\\n      typename cl::sycl::multi_ptr<                                         \\\n          scalar,                                                           \\\n          cl::sycl::access::address_space::address_space_target>::pointer_t \\\n          to,                                                               \\\n      const packet_type& from) {                                            \\\n    if (Alignment)                                                          \\\n      pstore(to, from);                                                     \\\n    else                                                                    \\\n      pstoreu(to, from);                                                    \\\n  }\n\nSYCL_PSTORE_T(global_space)\n\nSYCL_PSTORE_T(local_space)\n\n#undef SYCL_PSTORE_T\n\n#define SYCL_PSET1(packet_type)                                         \\\n  template <>                                                           \\\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE packet_type pset1<packet_type>( \\\n      const typename unpacket_traits<packet_type>::type& from) {        \\\n    return packet_type(from);                                           \\\n  }\n\n// global space\nSYCL_PSET1(cl::sycl::cl_float4)\nSYCL_PSET1(cl::sycl::cl_double2)\n\n#undef SYCL_PSET1\n\ntemplate <typename packet_type>\nstruct get_base_packet {\n  template <typename sycl_multi_pointer>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE packet_type\n  get_ploaddup(sycl_multi_pointer) {}\n\n  template <typename sycl_multi_pointer>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE packet_type\n  get_pgather(sycl_multi_pointer, Index) {}\n};\n\ntemplate <>\nstruct get_base_packet<cl::sycl::cl_float4> {\n  template <typename sycl_multi_pointer>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE cl::sycl::cl_float4 get_ploaddup(\n      sycl_multi_pointer from) {\n    return cl::sycl::cl_float4(from[0], from[0], from[1], from[1]);\n  }\n  template <typename sycl_multi_pointer>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE cl::sycl::cl_float4 get_pgather(\n      sycl_multi_pointer from, Index stride) {\n    return cl::sycl::cl_float4(from[0 * stride], from[1 * stride],\n                               from[2 * stride], from[3 * stride]);\n  }\n\n  template <typename sycl_multi_pointer>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void set_pscatter(\n      sycl_multi_pointer to, const cl::sycl::cl_float4& from, Index stride) {\n    auto tmp = stride;\n    to[0] = from.x();\n    to[tmp] = from.y();\n    to[tmp += stride] = from.z();\n    to[tmp += stride] = from.w();\n  }\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE cl::sycl::cl_float4 set_plset(\n      const float& a) {\n    return cl::sycl::cl_float4(static_cast<float>(a), static_cast<float>(a + 1),\n                               static_cast<float>(a + 2),\n                               static_cast<float>(a + 3));\n  }\n};\n\ntemplate <>\nstruct get_base_packet<cl::sycl::cl_double2> {\n  template <typename sycl_multi_pointer>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE cl::sycl::cl_double2\n  get_ploaddup(const sycl_multi_pointer from) {\n    return cl::sycl::cl_double2(from[0], from[0]);\n  }\n\n  template <typename sycl_multi_pointer, typename Index>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE cl::sycl::cl_double2 get_pgather(\n      const sycl_multi_pointer from, Index stride) {\n    return cl::sycl::cl_double2(from[0 * stride], from[1 * stride]);\n  }\n\n  template <typename sycl_multi_pointer>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void set_pscatter(\n      sycl_multi_pointer to, const cl::sycl::cl_double2& from, Index stride) {\n    to[0] = from.x();\n    to[stride] = from.y();\n  }\n\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE cl::sycl::cl_double2 set_plset(\n      const double& a) {\n    return cl::sycl::cl_double2(static_cast<double>(a),\n                                static_cast<double>(a + 1));\n  }\n};\n\n#define SYCL_PLOAD_DUP(address_space_target)                                \\\n  template <typename packet_type>                                           \\\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE packet_type ploaddup(               \\\n      typename cl::sycl::multi_ptr<                                         \\\n          const typename unpacket_traits<packet_type>::type,                \\\n          cl::sycl::access::address_space::address_space_target>::pointer_t \\\n          from) {                                                           \\\n    return get_base_packet<packet_type>::get_ploaddup(from);                \\\n  }\n\n// global space\nSYCL_PLOAD_DUP(global_space)\n// local_space\nSYCL_PLOAD_DUP(local_space)\n#undef SYCL_PLOAD_DUP\n\n#define SYCL_PLOAD_DUP_SPECILIZE(packet_type)                              \\\n  template <>                                                              \\\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE packet_type ploaddup<packet_type>( \\\n      const typename unpacket_traits<packet_type>::type* from) {           \\\n    return get_base_packet<packet_type>::get_ploaddup(from);               \\\n  }\n\nSYCL_PLOAD_DUP_SPECILIZE(cl::sycl::cl_float4)\nSYCL_PLOAD_DUP_SPECILIZE(cl::sycl::cl_double2)\n\n#undef SYCL_PLOAD_DUP_SPECILIZE\n\n#define SYCL_PLSET(packet_type)                                         \\\n  template <>                                                           \\\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE packet_type plset<packet_type>( \\\n      const typename unpacket_traits<packet_type>::type& a) {           \\\n    return get_base_packet<packet_type>::set_plset(a);                  \\\n  }\n\nSYCL_PLSET(cl::sycl::cl_float4)\nSYCL_PLSET(cl::sycl::cl_double2)\n\n#undef SYCL_PLSET\n\n#define SYCL_PGATHER(address_space_target)                                  \\\n  template <typename Scalar, typename packet_type>                          \\\n  EIGEN_DEVICE_FUNC inline packet_type pgather(                             \\\n      typename cl::sycl::multi_ptr<                                         \\\n          const typename unpacket_traits<packet_type>::type,                \\\n          cl::sycl::access::address_space::address_space_target>::pointer_t \\\n          from,                                                             \\\n      Index stride) {                                                       \\\n    return get_base_packet<packet_type>::get_pgather(from, stride);         \\\n  }\n\n// global space\nSYCL_PGATHER(global_space)\n// local space\nSYCL_PGATHER(local_space)\n\n#undef SYCL_PGATHER\n\n#define SYCL_PGATHER_SPECILIZE(scalar, packet_type)                            \\\n  template <>                                                                  \\\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE packet_type                            \\\n  pgather<scalar, packet_type>(                                                \\\n      const typename unpacket_traits<packet_type>::type* from, Index stride) { \\\n    return get_base_packet<packet_type>::get_pgather(from, stride);            \\\n  }\n\nSYCL_PGATHER_SPECILIZE(float, cl::sycl::cl_float4)\nSYCL_PGATHER_SPECILIZE(double, cl::sycl::cl_double2)\n\n#undef SYCL_PGATHER_SPECILIZE\n\n#define SYCL_PSCATTER(address_space_target)                                 \\\n  template <typename Scalar, typename packet_type>                          \\\n  EIGEN_DEVICE_FUNC inline void pscatter(                                   \\\n      typename cl::sycl::multi_ptr<                                         \\\n          typename unpacket_traits<packet_type>::type,                      \\\n          cl::sycl::access::address_space::address_space_target>::pointer_t \\\n          to,                                                               \\\n      const packet_type& from, Index stride) {                              \\\n    get_base_packet<packet_type>::set_pscatter(to, from, stride);           \\\n  }\n\n// global space\nSYCL_PSCATTER(global_space)\n// local space\nSYCL_PSCATTER(local_space)\n\n#undef SYCL_PSCATTER\n\n#define SYCL_PSCATTER_SPECILIZE(scalar, packet_type)                        \\\n  template <>                                                               \\\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void pscatter<scalar, packet_type>( \\\n      typename unpacket_traits<packet_type>::type * to,                     \\\n      const packet_type& from, Index stride) {                              \\\n    get_base_packet<packet_type>::set_pscatter(to, from, stride);           \\\n  }\n\nSYCL_PSCATTER_SPECILIZE(float, cl::sycl::cl_float4)\nSYCL_PSCATTER_SPECILIZE(double, cl::sycl::cl_double2)\n\n#undef SYCL_PSCATTER_SPECILIZE\n\n#define SYCL_PMAD(packet_type)                                            \\\n  template <>                                                             \\\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE packet_type pmadd(                \\\n      const packet_type& a, const packet_type& b, const packet_type& c) { \\\n    return cl::sycl::mad(a, b, c);                                        \\\n  }\n\nSYCL_PMAD(cl::sycl::cl_float4)\nSYCL_PMAD(cl::sycl::cl_double2)\n#undef SYCL_PMAD\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE float pfirst<cl::sycl::cl_float4>(\n    const cl::sycl::cl_float4& a) {\n  return a.x();\n}\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE double pfirst<cl::sycl::cl_double2>(\n    const cl::sycl::cl_double2& a) {\n  return a.x();\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE float predux<cl::sycl::cl_float4>(\n    const cl::sycl::cl_float4& a) {\n  return a.x() + a.y() + a.z() + a.w();\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE double predux<cl::sycl::cl_double2>(\n    const cl::sycl::cl_double2& a) {\n  return a.x() + a.y();\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE float predux_max<cl::sycl::cl_float4>(\n    const cl::sycl::cl_float4& a) {\n  return cl::sycl::fmax(cl::sycl::fmax(a.x(), a.y()),\n                        cl::sycl::fmax(a.z(), a.w()));\n}\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE double predux_max<cl::sycl::cl_double2>(\n    const cl::sycl::cl_double2& a) {\n  return cl::sycl::fmax(a.x(), a.y());\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE float predux_min<cl::sycl::cl_float4>(\n    const cl::sycl::cl_float4& a) {\n  return cl::sycl::fmin(cl::sycl::fmin(a.x(), a.y()),\n                        cl::sycl::fmin(a.z(), a.w()));\n}\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE double predux_min<cl::sycl::cl_double2>(\n    const cl::sycl::cl_double2& a) {\n  return cl::sycl::fmin(a.x(), a.y());\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE float predux_mul<cl::sycl::cl_float4>(\n    const cl::sycl::cl_float4& a) {\n  return a.x() * a.y() * a.z() * a.w();\n}\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE double predux_mul<cl::sycl::cl_double2>(\n    const cl::sycl::cl_double2& a) {\n  return a.x() * a.y();\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE cl::sycl::cl_float4\npabs<cl::sycl::cl_float4>(const cl::sycl::cl_float4& a) {\n  return cl::sycl::cl_float4(cl::sycl::fabs(a.x()), cl::sycl::fabs(a.y()),\n                             cl::sycl::fabs(a.z()), cl::sycl::fabs(a.w()));\n}\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE cl::sycl::cl_double2\npabs<cl::sycl::cl_double2>(const cl::sycl::cl_double2& a) {\n  return cl::sycl::cl_double2(cl::sycl::fabs(a.x()), cl::sycl::fabs(a.y()));\n}\n\ntemplate <typename Packet>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Packet sycl_pcmp_le(const Packet &a,\n                                                          const Packet &b) {\n  return ((a <= b)\n              .template convert<typename unpacket_traits<Packet>::type,\n                                cl::sycl::rounding_mode::automatic>());\n}\n\ntemplate <typename Packet>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Packet sycl_pcmp_lt(const Packet &a,\n                                                          const Packet &b) {\n  return ((a < b)\n              .template convert<typename unpacket_traits<Packet>::type,\n                                cl::sycl::rounding_mode::automatic>());\n}\n\ntemplate <typename Packet>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Packet sycl_pcmp_eq(const Packet &a,\n                                                          const Packet &b) {\n  return ((a == b)\n              .template convert<typename unpacket_traits<Packet>::type,\n                                cl::sycl::rounding_mode::automatic>());\n}\n\n#define SYCL_PCMP(OP, TYPE)                                                    \\\n  template <>                                                                  \\\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE TYPE pcmp_##OP<TYPE>(const TYPE &a,    \\\n                                                             const TYPE &b) {  \\\n    return sycl_pcmp_##OP<TYPE>(a, b);                                         \\\n  }\n\nSYCL_PCMP(le, cl::sycl::cl_float4)\nSYCL_PCMP(lt, cl::sycl::cl_float4)\nSYCL_PCMP(eq, cl::sycl::cl_float4)\nSYCL_PCMP(le, cl::sycl::cl_double2)\nSYCL_PCMP(lt, cl::sycl::cl_double2)\nSYCL_PCMP(eq, cl::sycl::cl_double2)\n#undef SYCL_PCMP\n\ntemplate <typename T> struct convert_to_integer;\n\ntemplate <> struct convert_to_integer<float> {\n  using type = int;\n  using packet_type = cl::sycl::cl_int4;\n};\ntemplate <> struct convert_to_integer<double> {\n  using type = long;\n  using packet_type = cl::sycl::cl_long2;\n};\n\ntemplate <typename PacketIn>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename convert_to_integer<\n    typename unpacket_traits<PacketIn>::type>::packet_type\nvector_as_int(const PacketIn &p) {\n  return (\n      p.template convert<typename convert_to_integer<\n                             typename unpacket_traits<PacketIn>::type>::type,\n                         cl::sycl::rounding_mode::automatic>());\n}\n\ntemplate <typename packetOut, typename PacketIn>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE packetOut\nconvert_vector(const PacketIn &p) {\n  return (p.template convert<typename unpacket_traits<packetOut>::type,\n                             cl::sycl::rounding_mode::automatic>());\n}\n\n#define SYCL_PAND(TYPE)                                                        \\\n  template <>                                                                  \\\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TYPE pand<TYPE>(const TYPE &a,         \\\n                                                        const TYPE &b) {       \\\n    return convert_vector<TYPE>(vector_as_int(a) & vector_as_int(b));          \\\n  }\nSYCL_PAND(cl::sycl::cl_float4)\nSYCL_PAND(cl::sycl::cl_double2)\n#undef SYCL_PAND\n\n#define SYCL_POR(TYPE)                                                         \\\n  template <>                                                                  \\\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TYPE por<TYPE>(const TYPE &a,          \\\n                                                       const TYPE &b) {        \\\n    return convert_vector<TYPE>(vector_as_int(a) | vector_as_int(b));          \\\n  }\n\nSYCL_POR(cl::sycl::cl_float4)\nSYCL_POR(cl::sycl::cl_double2)\n#undef SYCL_POR\n\n#define SYCL_PXOR(TYPE)                                                        \\\n  template <>                                                                  \\\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TYPE pxor<TYPE>(const TYPE &a,         \\\n                                                        const TYPE &b) {       \\\n    return convert_vector<TYPE>(vector_as_int(a) ^ vector_as_int(b));          \\\n  }\n\nSYCL_PXOR(cl::sycl::cl_float4)\nSYCL_PXOR(cl::sycl::cl_double2)\n#undef SYCL_PXOR\n\n#define SYCL_PANDNOT(TYPE)                                                     \\\n  template <>                                                                  \\\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TYPE pandnot<TYPE>(const TYPE &a,      \\\n                                                           const TYPE &b) {    \\\n    return convert_vector<TYPE>(vector_as_int(a) & (~vector_as_int(b)));       \\\n  }\nSYCL_PANDNOT(cl::sycl::cl_float4)\nSYCL_PANDNOT(cl::sycl::cl_double2)\n#undef SYCL_PANDNOT\n\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void ptranspose(\n    PacketBlock<cl::sycl::cl_float4, 4>& kernel) {\n  float tmp = kernel.packet[0].y();\n  kernel.packet[0].y() = kernel.packet[1].x();\n  kernel.packet[1].x() = tmp;\n\n  tmp = kernel.packet[0].z();\n  kernel.packet[0].z() = kernel.packet[2].x();\n  kernel.packet[2].x() = tmp;\n\n  tmp = kernel.packet[0].w();\n  kernel.packet[0].w() = kernel.packet[3].x();\n  kernel.packet[3].x() = tmp;\n\n  tmp = kernel.packet[1].z();\n  kernel.packet[1].z() = kernel.packet[2].y();\n  kernel.packet[2].y() = tmp;\n\n  tmp = kernel.packet[1].w();\n  kernel.packet[1].w() = kernel.packet[3].y();\n  kernel.packet[3].y() = tmp;\n\n  tmp = kernel.packet[2].w();\n  kernel.packet[2].w() = kernel.packet[3].z();\n  kernel.packet[3].z() = tmp;\n}\n\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void ptranspose(\n    PacketBlock<cl::sycl::cl_double2, 2>& kernel) {\n  double tmp = kernel.packet[0].y();\n  kernel.packet[0].y() = kernel.packet[1].x();\n  kernel.packet[1].x() = tmp;\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE cl::sycl::cl_float4 pblend(\n    const Selector<unpacket_traits<cl::sycl::cl_float4>::size>& ifPacket,\n    const cl::sycl::cl_float4& thenPacket,\n    const cl::sycl::cl_float4& elsePacket) {\n  cl::sycl::cl_int4 condition(\n      ifPacket.select[0] ? 0 : -1, ifPacket.select[1] ? 0 : -1,\n      ifPacket.select[2] ? 0 : -1, ifPacket.select[3] ? 0 : -1);\n  return cl::sycl::select(thenPacket, elsePacket, condition);\n}\n\ntemplate <>\ninline cl::sycl::cl_double2 pblend(\n    const Selector<unpacket_traits<cl::sycl::cl_double2>::size>& ifPacket,\n    const cl::sycl::cl_double2& thenPacket,\n    const cl::sycl::cl_double2& elsePacket) {\n  cl::sycl::cl_long2 condition(ifPacket.select[0] ? 0 : -1,\n                               ifPacket.select[1] ? 0 : -1);\n  return cl::sycl::select(thenPacket, elsePacket, condition);\n}\n#endif  // SYCL_DEVICE_ONLY\n\n#define SYCL_PSTORE(alignment)                                  \\\n  template <typename packet_type>                               \\\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void pstore##alignment( \\\n      const Eigen::TensorSycl::internal::RangeAccess<           \\\n          cl::sycl::access::mode::read_write,                   \\\n          typename unpacket_traits<packet_type>::type>& to,     \\\n      const packet_type& from) {                                \\\n    pstore##alignment(to.get_pointer(), from);                  \\\n  }\n\n// global space\nSYCL_PSTORE()\nSYCL_PSTORE(u)\n\n#undef SYCL_PSTORE\n\ntemplate <typename scalar, typename packet_type, int Alignment>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void pstoret(\n    Eigen::TensorSycl::internal::RangeAccess<\n        cl::sycl::access::mode::read_write,\n        typename unpacket_traits<packet_type>::type>\n        to,\n    const packet_type& from) {\n  pstoret<scalar, packet_type, Alignment>(to.get_pointer(), from);\n}\n\n}  // end namespace internal\n\n}  // end namespace Eigen\n\n#endif  // EIGEN_PACKET_MATH_SYCL_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/SYCL/SyclMemoryModel.h",
    "content": "/***************************************************************************\n *  Copyright (C) 2017 Codeplay Software Limited\n *  This Source Code Form is subject to the terms of the Mozilla\n *  Public License v. 2.0. If a copy of the MPL was not distributed\n *  with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n *\n *  SyclMemoryModel.h\n *\n *  Description:\n *    Interface for SYCL buffers to behave as a non-dereferenceable pointer\n *    Interface for Placeholder accessor to behave as a pointer on both host\n *    and device\n *\n * Authors:\n *\n *    Ruyman Reyes   Codeplay Software Ltd.\n *    Mehdi Goli     Codeplay Software Ltd.\n *    Vanya Yaneva   Codeplay Software Ltd.\n *\n **************************************************************************/\n\n#if defined(EIGEN_USE_SYCL) && \\\n    !defined(EIGEN_CXX11_TENSOR_TENSOR_SYCL_STORAGE_MEMORY_H)\n#define EIGEN_CXX11_TENSOR_TENSOR_SYCL_STORAGE_MEMORY_H\n\n#include <CL/sycl.hpp>\n#ifdef EIGEN_EXCEPTIONS\n#include <stdexcept>\n#endif\n#include <cstddef>\n#include <queue>\n#include <set>\n#include <unordered_map>\n\nnamespace Eigen {\nnamespace TensorSycl {\nnamespace internal {\n\nusing sycl_acc_target = cl::sycl::access::target;\nusing sycl_acc_mode = cl::sycl::access::mode;\n\n/**\n * Default values for template arguments\n */\nusing buffer_data_type_t = uint8_t;\nconst sycl_acc_target default_acc_target = sycl_acc_target::global_buffer;\nconst sycl_acc_mode default_acc_mode = sycl_acc_mode::read_write;\n\n/**\n * PointerMapper\n *  Associates fake pointers with buffers.\n *\n */\nclass PointerMapper {\n public:\n  using base_ptr_t = std::intptr_t;\n\n  /* Structure of a virtual pointer\n   *\n   * |================================================|\n   * |               POINTER ADDRESS                  |\n   * |================================================|\n   */\n  struct virtual_pointer_t {\n    /* Type for the pointers\n     */\n    base_ptr_t m_contents;\n\n    /** Conversions from virtual_pointer_t to\n     * void * should just reinterpret_cast the integer number\n     */\n    operator void *() const { return reinterpret_cast<void *>(m_contents); }\n\n    /**\n     * Convert back to the integer number.\n     */\n    operator base_ptr_t() const { return m_contents; }\n\n    /**\n     * Add a certain value to the pointer to create a\n     * new pointer to that offset\n     */\n    virtual_pointer_t operator+(size_t off) { return m_contents + off; }\n\n    /* Numerical order for sorting pointers in containers. */\n    bool operator<(virtual_pointer_t rhs) const {\n      return (static_cast<base_ptr_t>(m_contents) <\n              static_cast<base_ptr_t>(rhs.m_contents));\n    }\n\n    bool operator>(virtual_pointer_t rhs) const {\n      return (static_cast<base_ptr_t>(m_contents) >\n              static_cast<base_ptr_t>(rhs.m_contents));\n    }\n\n    /**\n     * Numerical order for sorting pointers in containers\n     */\n    bool operator==(virtual_pointer_t rhs) const {\n      return (static_cast<base_ptr_t>(m_contents) ==\n              static_cast<base_ptr_t>(rhs.m_contents));\n    }\n\n    /**\n     * Simple forward to the equality overload.\n     */\n    bool operator!=(virtual_pointer_t rhs) const {\n      return !(this->operator==(rhs));\n    }\n\n    /**\n     * Converts a void * into a virtual pointer structure.\n     * Note that this will only work if the void * was\n     * already a virtual_pointer_t, but we have no way of\n     * checking\n     */\n    virtual_pointer_t(const void *ptr)\n        : m_contents(reinterpret_cast<base_ptr_t>(ptr)){};\n\n    /**\n     * Creates a virtual_pointer_t from the given integer\n     * number\n     */\n    virtual_pointer_t(base_ptr_t u) : m_contents(u){};\n  };\n\n  /* Definition of a null pointer\n   */\n  const virtual_pointer_t null_virtual_ptr = nullptr;\n\n  /**\n   * Whether if a pointer is null or not.\n   * A pointer is nullptr if the value is of null_virtual_ptr\n   */\n  static inline bool is_nullptr(virtual_pointer_t ptr) {\n    return (static_cast<void *>(ptr) == nullptr);\n  }\n\n  /* basic type for all buffers\n   */\n  using buffer_t = cl::sycl::buffer_mem;\n\n  /**\n   * Node that stores information about a device allocation.\n   * Nodes are sorted by size to organise a free list of nodes\n   * that can be recovered.\n   */\n  struct pMapNode_t {\n    buffer_t m_buffer;\n    size_t m_size;\n    bool m_free;\n\n    pMapNode_t(buffer_t b, size_t size, bool f)\n        : m_buffer{b}, m_size{size}, m_free{f} {\n      m_buffer.set_final_data(nullptr);\n    }\n\n    bool operator<=(const pMapNode_t &rhs) { return (m_size <= rhs.m_size); }\n  };\n\n  /** Storage of the pointer / buffer tree\n   */\n  using pointerMap_t = std::map<virtual_pointer_t, pMapNode_t>;\n\n  /**\n   * Obtain the insertion point in the pointer map for\n   * a pointer of the given size.\n   * \\param requiredSize Size attemted to reclaim\n   */\n  typename pointerMap_t::iterator get_insertion_point(size_t requiredSize) {\n    typename pointerMap_t::iterator retVal;\n    bool reuse = false;\n    if (!m_freeList.empty()) {\n      // try to re-use an existing block\n      for (auto freeElem : m_freeList) {\n        if (freeElem->second.m_size >= requiredSize) {\n          retVal = freeElem;\n          reuse = true;\n          // Element is not going to be free anymore\n          m_freeList.erase(freeElem);\n          break;\n        }\n      }\n    }\n    if (!reuse) {\n      retVal = std::prev(m_pointerMap.end());\n    }\n    return retVal;\n  }\n\n  /**\n   * Returns an iterator to the node that stores the information\n   * of the given virtual pointer from the given pointer map structure.\n   * If pointer is not found, throws std::out_of_range.\n   * If the pointer map structure is empty, throws std::out_of_range\n   *\n   * \\param pMap the pointerMap_t structure storing all the pointers\n   * \\param virtual_pointer_ptr The virtual pointer to obtain the node of\n   * \\throws std::out:of_range if the pointer is not found or pMap is empty\n   */\n  typename pointerMap_t::iterator get_node(const virtual_pointer_t ptr) {\n    if (this->count() == 0) {\n      m_pointerMap.clear();\n      EIGEN_THROW_X(std::out_of_range(\"There are no pointers allocated\\n\"));\n\n    }\n    if (is_nullptr(ptr)) {\n      m_pointerMap.clear();\n      EIGEN_THROW_X(std::out_of_range(\"Cannot access null pointer\\n\"));\n    }\n    // The previous element to the lower bound is the node that\n    // holds this memory address\n    auto node = m_pointerMap.lower_bound(ptr);\n    // If the value of the pointer is not the one of the node\n    // then we return the previous one\n    if (node == std::end(m_pointerMap)) {\n      --node;\n    } else if (node->first != ptr) {\n      if (node == std::begin(m_pointerMap)) {\n        m_pointerMap.clear();\n        EIGEN_THROW_X(\n            std::out_of_range(\"The pointer is not registered in the map\\n\"));\n\n      }\n      --node;\n    }\n\n    return node;\n  }\n\n  /* get_buffer.\n   * Returns a buffer from the map using the pointer address\n   */\n  template <typename buffer_data_type = buffer_data_type_t>\n  cl::sycl::buffer<buffer_data_type, 1> get_buffer(\n      const virtual_pointer_t ptr) {\n    using sycl_buffer_t = cl::sycl::buffer<buffer_data_type, 1>;\n\n    // get_node() returns a `buffer_mem`, so we need to cast it to a `buffer<>`.\n    // We can do this without the `buffer_mem` being a pointer, as we\n    // only declare member variables in the base class (`buffer_mem`) and not in\n    // the child class (`buffer<>).\n    auto node = get_node(ptr);\n    eigen_assert(node->first == ptr || node->first < ptr);\n    eigen_assert(ptr < static_cast<virtual_pointer_t>(node->second.m_size +\n                                                      node->first));\n    return *(static_cast<sycl_buffer_t *>(&node->second.m_buffer));\n  }\n\n  /**\n   * @brief Returns an accessor to the buffer of the given virtual pointer\n   * @param accessMode\n   * @param accessTarget\n   * @param ptr The virtual pointer\n   */\n  template <sycl_acc_mode access_mode = default_acc_mode,\n            sycl_acc_target access_target = default_acc_target,\n            typename buffer_data_type = buffer_data_type_t>\n  cl::sycl::accessor<buffer_data_type, 1, access_mode, access_target>\n  get_access(const virtual_pointer_t ptr) {\n    auto buf = get_buffer<buffer_data_type>(ptr);\n    return buf.template get_access<access_mode, access_target>();\n  }\n\n  /**\n   * @brief Returns an accessor to the buffer of the given virtual pointer\n   *        in the given command group scope\n   * @param accessMode\n   * @param accessTarget\n   * @param ptr The virtual pointer\n   * @param cgh Reference to the command group scope\n   */\n  template <sycl_acc_mode access_mode = default_acc_mode,\n            sycl_acc_target access_target = default_acc_target,\n            typename buffer_data_type = buffer_data_type_t>\n  cl::sycl::accessor<buffer_data_type, 1, access_mode, access_target>\n  get_access(const virtual_pointer_t ptr, cl::sycl::handler &cgh) {\n    auto buf = get_buffer<buffer_data_type>(ptr);\n    return buf.template get_access<access_mode, access_target>(cgh);\n  }\n\n  /*\n   * Returns the offset from the base address of this pointer.\n   */\n  inline std::ptrdiff_t get_offset(const virtual_pointer_t ptr) {\n    // The previous element to the lower bound is the node that\n    // holds this memory address\n    auto node = get_node(ptr);\n    auto start = node->first;\n    eigen_assert(start == ptr || start < ptr);\n    eigen_assert(ptr < start + node->second.m_size);\n    return (ptr - start);\n  }\n\n  /*\n   * Returns the number of elements by which the given pointer is offset from\n   * the base address.\n   */\n  template <typename buffer_data_type>\n  inline size_t get_element_offset(const virtual_pointer_t ptr) {\n    return get_offset(ptr) / sizeof(buffer_data_type);\n  }\n\n  /**\n   * Constructs the PointerMapper structure.\n   */\n  PointerMapper(base_ptr_t baseAddress = 4096)\n      : m_pointerMap{}, m_freeList{}, m_baseAddress{baseAddress} {\n    if (m_baseAddress == 0) {\n      EIGEN_THROW_X(std::invalid_argument(\"Base address cannot be zero\\n\"));\n    }\n  };\n\n  /**\n   * PointerMapper cannot be copied or moved\n   */\n  PointerMapper(const PointerMapper &) = delete;\n\n  /**\n   * Empty the pointer list\n   */\n  inline void clear() {\n    m_freeList.clear();\n    m_pointerMap.clear();\n  }\n\n  /* add_pointer.\n   * Adds an existing pointer to the map and returns the virtual pointer id.\n   */\n  inline virtual_pointer_t add_pointer(const buffer_t &b) {\n    return add_pointer_impl(b);\n  }\n\n  /* add_pointer.\n   * Adds a pointer to the map and returns the virtual pointer id.\n   */\n  inline virtual_pointer_t add_pointer(buffer_t &&b) {\n    return add_pointer_impl(b);\n  }\n\n  /**\n   * @brief Fuses the given node with the previous nodes in the\n   *        pointer map if they are free\n   *\n   * @param node A reference to the free node to be fused\n   */\n  void fuse_forward(typename pointerMap_t::iterator &node) {\n    while (node != std::prev(m_pointerMap.end())) {\n      // if following node is free\n      // remove it and extend the current node with its size\n      auto fwd_node = std::next(node);\n      if (!fwd_node->second.m_free) {\n        break;\n      }\n      auto fwd_size = fwd_node->second.m_size;\n      m_freeList.erase(fwd_node);\n      m_pointerMap.erase(fwd_node);\n\n      node->second.m_size += fwd_size;\n    }\n  }\n\n  /**\n   * @brief Fuses the given node with the following nodes in the\n   *        pointer map if they are free\n   *\n   * @param node A reference to the free node to be fused\n   */\n  void fuse_backward(typename pointerMap_t::iterator &node) {\n    while (node != m_pointerMap.begin()) {\n      // if previous node is free, extend it\n      // with the size of the current one\n      auto prev_node = std::prev(node);\n      if (!prev_node->second.m_free) {\n        break;\n      }\n      prev_node->second.m_size += node->second.m_size;\n\n      // remove the current node\n      m_freeList.erase(node);\n      m_pointerMap.erase(node);\n\n      // point to the previous node\n      node = prev_node;\n    }\n  }\n\n  /* remove_pointer.\n   * Removes the given pointer from the map.\n   * The pointer is allowed to be reused only if ReUse if true.\n   */\n  template <bool ReUse = true>\n  void remove_pointer(const virtual_pointer_t ptr) {\n    if (is_nullptr(ptr)) {\n      return;\n    }\n    auto node = this->get_node(ptr);\n\n    node->second.m_free = true;\n    m_freeList.emplace(node);\n\n    // Fuse the node\n    // with free nodes before and after it\n    fuse_forward(node);\n    fuse_backward(node);\n\n    // If after fusing the node is the last one\n    // simply remove it (since it is free)\n    if (node == std::prev(m_pointerMap.end())) {\n      m_freeList.erase(node);\n      m_pointerMap.erase(node);\n    }\n  }\n\n  /* count.\n   * Return the number of active pointers (i.e, pointers that\n   * have been malloc but not freed).\n   */\n  size_t count() const { return (m_pointerMap.size() - m_freeList.size()); }\n\n private:\n  /* add_pointer_impl.\n   * Adds a pointer to the map and returns the virtual pointer id.\n   * BufferT is either a const buffer_t& or a buffer_t&&.\n   */\n  template <class BufferT>\n  virtual_pointer_t add_pointer_impl(BufferT b) {\n    virtual_pointer_t retVal = nullptr;\n    size_t bufSize = b.get_count();\n    pMapNode_t p{b, bufSize, false};\n    // If this is the first pointer:\n    if (m_pointerMap.empty()) {\n      virtual_pointer_t initialVal{m_baseAddress};\n      m_pointerMap.emplace(initialVal, p);\n      return initialVal;\n    }\n\n    auto lastElemIter = get_insertion_point(bufSize);\n    // We are recovering an existing free node\n    if (lastElemIter->second.m_free) {\n      lastElemIter->second.m_buffer = b;\n      lastElemIter->second.m_free = false;\n\n      // If the recovered node is bigger than the inserted one\n      // add a new free node with the remaining space\n      if (lastElemIter->second.m_size > bufSize) {\n        // create a new node with the remaining space\n        auto remainingSize = lastElemIter->second.m_size - bufSize;\n        pMapNode_t p2{b, remainingSize, true};\n\n        // update size of the current node\n        lastElemIter->second.m_size = bufSize;\n\n        // add the new free node\n        auto newFreePtr = lastElemIter->first + bufSize;\n        auto freeNode = m_pointerMap.emplace(newFreePtr, p2).first;\n        m_freeList.emplace(freeNode);\n      }\n\n      retVal = lastElemIter->first;\n    } else {\n      size_t lastSize = lastElemIter->second.m_size;\n      retVal = lastElemIter->first + lastSize;\n      m_pointerMap.emplace(retVal, p);\n    }\n    return retVal;\n  }\n\n  /**\n   * Compare two iterators to pointer map entries according to\n   * the size of the allocation on the device.\n   */\n  struct SortBySize {\n    bool operator()(typename pointerMap_t::iterator a,\n                    typename pointerMap_t::iterator b) const {\n      return ((a->first < b->first) && (a->second <= b->second)) ||\n             ((a->first < b->first) && (b->second <= a->second));\n    }\n  };\n\n  /* Maps the pointer addresses to buffer and size pairs.\n   */\n  pointerMap_t m_pointerMap;\n\n  /* List of free nodes available for re-using\n   */\n  std::set<typename pointerMap_t::iterator, SortBySize> m_freeList;\n\n  /* Base address used when issuing the first virtual pointer, allows users\n   * to specify alignment. Cannot be zero. */\n  std::intptr_t m_baseAddress;\n};\n\n/* remove_pointer.\n * Removes the given pointer from the map.\n * The pointer is allowed to be reused only if ReUse if true.\n */\ntemplate <>\ninline void PointerMapper::remove_pointer<false>(const virtual_pointer_t ptr) {\n  if (is_nullptr(ptr)) {\n    return;\n  }\n  m_pointerMap.erase(this->get_node(ptr));\n}\n\n/**\n * Malloc-like interface to the pointer-mapper.\n * Given a size, creates a byte-typed buffer and returns a\n * fake pointer to keep track of it.\n * \\param size Size in bytes of the desired allocation\n * \\throw cl::sycl::exception if error while creating the buffer\n */\ninline void *SYCLmalloc(size_t size, PointerMapper &pMap) {\n  if (size == 0) {\n    return nullptr;\n  }\n  // Create a generic buffer of the given size\n  using buffer_t = cl::sycl::buffer<buffer_data_type_t, 1>;\n  auto thePointer = pMap.add_pointer(buffer_t(cl::sycl::range<1>{size}));\n  // Store the buffer on the global list\n  return static_cast<void *>(thePointer);\n}\n\n/**\n * Free-like interface to the pointer mapper.\n * Given a fake-pointer created with the virtual-pointer malloc,\n * destroys the buffer and remove it from the list.\n * If ReUse is false, the pointer is not added to the freeList,\n * it should be false only for sub-buffers.\n */\ntemplate <bool ReUse = true, typename PointerMapper>\ninline void SYCLfree(void *ptr, PointerMapper &pMap) {\n  pMap.template remove_pointer<ReUse>(ptr);\n}\n\n/**\n * Clear all the memory allocated by SYCL.\n */\ntemplate <typename PointerMapper>\ninline void SYCLfreeAll(PointerMapper &pMap) {\n  pMap.clear();\n}\n\ntemplate <cl::sycl::access::mode AcMd, typename T>\nstruct RangeAccess {\n  static const auto global_access = cl::sycl::access::target::global_buffer;\n  static const auto is_place_holder = cl::sycl::access::placeholder::true_t;\n  typedef T scalar_t;\n  typedef scalar_t &ref_t;\n  typedef typename cl::sycl::global_ptr<scalar_t>::pointer_t ptr_t;\n\n  // the accessor type does not necessarily the same as T\n  typedef cl::sycl::accessor<scalar_t, 1, AcMd, global_access, is_place_holder>\n      accessor;\n\n  typedef RangeAccess<AcMd, T> self_t;\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE RangeAccess(accessor access,\n                                                    size_t offset,\n                                                    std::intptr_t virtual_ptr)\n      : access_(access), offset_(offset), virtual_ptr_(virtual_ptr) {}\n\n  RangeAccess(cl::sycl::buffer<scalar_t, 1> buff =\n                  cl::sycl::buffer<scalar_t, 1>(cl::sycl::range<1>(1)))\n      : access_{accessor{buff}}, offset_(0), virtual_ptr_(-1) {}\n\n  // This should be only used for null constructor on the host side\n  RangeAccess(std::nullptr_t) : RangeAccess() {}\n  // This template parameter must be removed and scalar_t should be replaced\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ptr_t get_pointer() const {\n    return (access_.get_pointer().get() + offset_);\n  }\n  template <typename Index>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE self_t &operator+=(Index offset) {\n    offset_ += (offset);\n    return *this;\n  }\n  template <typename Index>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE self_t operator+(Index offset) const {\n    return self_t(access_, offset_ + offset, virtual_ptr_);\n  }\n  template <typename Index>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE self_t operator-(Index offset) const {\n    return self_t(access_, offset_ - offset, virtual_ptr_);\n  }\n  template <typename Index>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE self_t &operator-=(Index offset) {\n    offset_ -= offset;\n    return *this;\n  }\n\n  // THIS IS FOR NULL COMPARISON ONLY\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE friend bool operator==(\n      const RangeAccess &lhs, std::nullptr_t) {\n    return ((lhs.virtual_ptr_ == -1));\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE friend bool operator!=(\n      const RangeAccess &lhs, std::nullptr_t i) {\n    return !(lhs == i);\n  }\n\n  // THIS IS FOR NULL COMPARISON ONLY\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE friend bool operator==(\n      std::nullptr_t, const RangeAccess &rhs) {\n    return ((rhs.virtual_ptr_ == -1));\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE friend bool operator!=(\n      std::nullptr_t i, const RangeAccess &rhs) {\n    return !(i == rhs);\n  }\n  // Prefix operator (Increment and return value)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE self_t &operator++() {\n    offset_++;\n    return (*this);\n  }\n\n  // Postfix operator (Return value and increment)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE self_t operator++(int i) {\n    EIGEN_UNUSED_VARIABLE(i);\n    self_t temp_iterator(*this);\n    offset_++;\n    return temp_iterator;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::ptrdiff_t get_size() const {\n    return (access_.get_count() - offset_);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::ptrdiff_t get_offset() const {\n    return offset_;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void set_offset(std::ptrdiff_t offset) {\n    offset_ = offset;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ref_t operator*() const {\n    return *get_pointer();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ref_t operator*() {\n    return *get_pointer();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ptr_t operator->() = delete;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ref_t operator[](int x) {\n    return *(get_pointer() + x);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ref_t operator[](int x) const {\n    return *(get_pointer() + x);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE scalar_t *get_virtual_pointer() const {\n    return reinterpret_cast<scalar_t *>(virtual_ptr_ +\n                                        (offset_ * sizeof(scalar_t)));\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit operator bool() const {\n    return (virtual_ptr_ != -1);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE operator RangeAccess<AcMd, const T>() {\n    return RangeAccess<AcMd, const T>(access_, offset_, virtual_ptr_);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  operator RangeAccess<AcMd, const T>() const {\n    return RangeAccess<AcMd, const T>(access_, offset_, virtual_ptr_);\n  }\n  // binding placeholder accessors to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(\n      cl::sycl::handler &cgh) const {\n    cgh.require(access_);\n  }\n\n private:\n  accessor access_;\n  size_t offset_;\n  std::intptr_t virtual_ptr_;  // the location of the buffer in the map\n};\n\ntemplate <cl::sycl::access::mode AcMd, typename T>\nstruct RangeAccess<AcMd, const T> : RangeAccess<AcMd, T> {\n  typedef RangeAccess<AcMd, T> Base;\n  using Base::Base;\n};\n\n}  // namespace internal\n}  // namespace TensorSycl\n}  // namespace Eigen\n\n#endif  // EIGEN_CXX11_TENSOR_TENSOR_SYCL_STORAGE_MEMORY_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/SYCL/TypeCasting.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Mehdi Goli    Codeplay Software Ltd.\n// Ralph Potter  Codeplay Software Ltd.\n// Luke Iwanski  Codeplay Software Ltd.\n// Contact: <eigen@codeplay.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n/*****************************************************************\n * TypeCasting.h\n *\n * \\brief:\n *  TypeCasting\n *\n *****************************************************************/\n\n#ifndef EIGEN_TYPE_CASTING_SYCL_H\n#define EIGEN_TYPE_CASTING_SYCL_H\n\nnamespace Eigen {\n\nnamespace internal {\n#ifdef SYCL_DEVICE_ONLY\ntemplate <>\nstruct type_casting_traits<float, int> {\n  enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 };\n};\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE cl::sycl::cl_int4\npcast<cl::sycl::cl_float4, cl::sycl::cl_int4>(const cl::sycl::cl_float4& a) {\n  return a\n      .template convert<cl::sycl::cl_int, cl::sycl::rounding_mode::automatic>();\n}\n\ntemplate <>\nstruct type_casting_traits<int, float> {\n  enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 };\n};\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE cl::sycl::cl_float4\npcast<cl::sycl::cl_int4, cl::sycl::cl_float4>(const cl::sycl::cl_int4& a) {\n  return a.template convert<cl::sycl::cl_float,\n                            cl::sycl::rounding_mode::automatic>();\n}\n\ntemplate <>\nstruct type_casting_traits<double, float> {\n  enum { VectorizedCast = 1, SrcCoeffRatio = 2, TgtCoeffRatio = 1 };\n};\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE cl::sycl::cl_float4\npcast<cl::sycl::cl_double2, cl::sycl::cl_float4>(\n    const cl::sycl::cl_double2& a, const cl::sycl::cl_double2& b) {\n  auto a1 = a.template convert<cl::sycl::cl_float,\n                               cl::sycl::rounding_mode::automatic>();\n  auto b1 = b.template convert<cl::sycl::cl_float,\n                               cl::sycl::rounding_mode::automatic>();\n  return cl::sycl::float4(a1.x(), a1.y(), b1.x(), b1.y());\n}\n\ntemplate <>\nstruct type_casting_traits<float, double> {\n  enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 2 };\n};\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE cl::sycl::cl_double2\npcast<cl::sycl::cl_float4, cl::sycl::cl_double2>(const cl::sycl::cl_float4& a) {\n  // Simply discard the second half of the input\n  return cl::sycl::cl_double2(a.x(), a.y());\n}\n\n#endif\n}  // end namespace internal\n\n}  // end namespace Eigen\n\n#endif  // EIGEN_TYPE_CASTING_SYCL_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/ZVector/Complex.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2016 Konstantinos Margaritis <markos@freevec.org>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_COMPLEX32_ALTIVEC_H\n#define EIGEN_COMPLEX32_ALTIVEC_H\n\nnamespace Eigen {\n\nnamespace internal {\n\n#if !defined(__ARCH__) || (defined(__ARCH__) && __ARCH__ >= 12)\nstatic Packet4ui  p4ui_CONJ_XOR = { 0x00000000, 0x80000000, 0x00000000, 0x80000000 }; //vec_mergeh((Packet4ui)p4i_ZERO, (Packet4ui)p4f_MZERO);\n#endif\n\nstatic Packet2ul  p2ul_CONJ_XOR1 = (Packet2ul) vec_sld((Packet4ui) p2d_ZERO_, (Packet4ui) p2l_ZERO, 8);//{ 0x8000000000000000, 0x0000000000000000 };\nstatic Packet2ul  p2ul_CONJ_XOR2 = (Packet2ul) vec_sld((Packet4ui) p2l_ZERO,  (Packet4ui) p2d_ZERO_, 8);//{ 0x8000000000000000, 0x0000000000000000 };\n\nstruct Packet1cd\n{\n  EIGEN_STRONG_INLINE Packet1cd() {}\n  EIGEN_STRONG_INLINE explicit Packet1cd(const Packet2d& a) : v(a) {}\n  Packet2d v;\n};\n\nstruct Packet2cf\n{\n  EIGEN_STRONG_INLINE Packet2cf() {}\n  EIGEN_STRONG_INLINE explicit Packet2cf(const Packet4f& a) : v(a) {}\n#if !defined(__ARCH__) || (defined(__ARCH__) && __ARCH__ < 12)\n  union {\n    Packet4f v;\n    Packet1cd cd[2];\n  };\n#else\n  Packet4f v;\n#endif\n};\n\ntemplate<> struct packet_traits<std::complex<float> >  : default_packet_traits\n{\n  typedef Packet2cf type;\n  typedef Packet2cf half;\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size = 2,\n    HasHalfPacket = 0,\n\n    HasAdd    = 1,\n    HasSub    = 1,\n    HasMul    = 1,\n    HasDiv    = 1,\n    HasNegate = 1,\n    HasAbs    = 0,\n    HasAbs2   = 0,\n    HasMin    = 0,\n    HasMax    = 0,\n    HasBlend  = 1,\n    HasSetLinear = 0\n  };\n};\n\n\ntemplate<> struct packet_traits<std::complex<double> >  : default_packet_traits\n{\n  typedef Packet1cd type;\n  typedef Packet1cd half;\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size = 1,\n    HasHalfPacket = 0,\n\n    HasAdd    = 1,\n    HasSub    = 1,\n    HasMul    = 1,\n    HasDiv    = 1,\n    HasNegate = 1,\n    HasAbs    = 0,\n    HasAbs2   = 0,\n    HasMin    = 0,\n    HasMax    = 0,\n    HasSetLinear = 0\n  };\n};\n\ntemplate<> struct unpacket_traits<Packet2cf> { typedef std::complex<float>  type; enum {size=2, alignment=Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false}; typedef Packet2cf half; };\ntemplate<> struct unpacket_traits<Packet1cd> { typedef std::complex<double> type; enum {size=1, alignment=Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false}; typedef Packet1cd half; };\n\n/* Forward declaration */\nEIGEN_STRONG_INLINE void ptranspose(PacketBlock<Packet2cf,2>& kernel);\n\n/* complex<double> first */\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pload <Packet1cd>(const std::complex<double>* from) { EIGEN_DEBUG_ALIGNED_LOAD return Packet1cd(pload<Packet2d>((const double*)from)); }\ntemplate<> EIGEN_STRONG_INLINE Packet1cd ploadu<Packet1cd>(const std::complex<double>* from) { EIGEN_DEBUG_UNALIGNED_LOAD return Packet1cd(ploadu<Packet2d>((const double*)from)); }\ntemplate<> EIGEN_STRONG_INLINE void pstore <std::complex<double> >(std::complex<double> *   to, const Packet1cd& from) { EIGEN_DEBUG_ALIGNED_STORE pstore((double*)to, from.v); }\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<std::complex<double> >(std::complex<double> *   to, const Packet1cd& from) { EIGEN_DEBUG_UNALIGNED_STORE pstoreu((double*)to, from.v); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pset1<Packet1cd>(const std::complex<double>&  from)\n{ /* here we really have to use unaligned loads :( */ return ploadu<Packet1cd>(&from); }\n\ntemplate<> EIGEN_DEVICE_FUNC inline Packet1cd pgather<std::complex<double>, Packet1cd>(const std::complex<double>* from, Index stride EIGEN_UNUSED)\n{\n  return pload<Packet1cd>(from);\n}\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<std::complex<double>, Packet1cd>(std::complex<double>* to, const Packet1cd& from, Index stride EIGEN_UNUSED)\n{\n  pstore<std::complex<double> >(to, from);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet1cd padd<Packet1cd>(const Packet1cd& a, const Packet1cd& b) { return Packet1cd(a.v + b.v); }\ntemplate<> EIGEN_STRONG_INLINE Packet1cd psub<Packet1cd>(const Packet1cd& a, const Packet1cd& b) { return Packet1cd(a.v - b.v); }\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pnegate(const Packet1cd& a) { return Packet1cd(pnegate(Packet2d(a.v))); }\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pconj(const Packet1cd& a) { return Packet1cd((Packet2d)vec_xor((Packet2d)a.v, (Packet2d)p2ul_CONJ_XOR2)); }\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pmul<Packet1cd>(const Packet1cd& a, const Packet1cd& b)\n{\n  Packet2d a_re, a_im, v1, v2;\n\n  // Permute and multiply the real parts of a and b\n  a_re = vec_perm(a.v, a.v, p16uc_PSET64_HI);\n  // Get the imaginary parts of a\n  a_im = vec_perm(a.v, a.v, p16uc_PSET64_LO);\n  // multiply a_re * b\n  v1 = vec_madd(a_re, b.v, p2d_ZERO);\n  // multiply a_im * b and get the conjugate result\n  v2 = vec_madd(a_im, b.v, p2d_ZERO);\n  v2 = (Packet2d) vec_sld((Packet4ui)v2, (Packet4ui)v2, 8);\n  v2 = (Packet2d) vec_xor((Packet2d)v2, (Packet2d) p2ul_CONJ_XOR1);\n\n  return Packet1cd(v1 + v2);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pand    <Packet1cd>(const Packet1cd& a, const Packet1cd& b) { return Packet1cd(vec_and(a.v,b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet1cd por     <Packet1cd>(const Packet1cd& a, const Packet1cd& b) { return Packet1cd(vec_or(a.v,b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pxor    <Packet1cd>(const Packet1cd& a, const Packet1cd& b) { return Packet1cd(vec_xor(a.v,b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pandnot <Packet1cd>(const Packet1cd& a, const Packet1cd& b) { return Packet1cd(vec_and(a.v, vec_nor(b.v,b.v))); }\ntemplate<> EIGEN_STRONG_INLINE Packet1cd ploaddup<Packet1cd>(const std::complex<double>*     from) {  return pset1<Packet1cd>(*from); }\n\ntemplate<> EIGEN_STRONG_INLINE void prefetch<std::complex<double> >(const std::complex<double> *   addr) { EIGEN_ZVECTOR_PREFETCH(addr); }\n\ntemplate<> EIGEN_STRONG_INLINE std::complex<double>  pfirst<Packet1cd>(const Packet1cd& a)\n{\n  std::complex<double> EIGEN_ALIGN16 res;\n  pstore<std::complex<double> >(&res, a);\n\n  return res;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cd preverse(const Packet1cd& a) { return a; }\ntemplate<> EIGEN_STRONG_INLINE std::complex<double> predux<Packet1cd>(const Packet1cd& a)\n{\n  return pfirst(a);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet1cd preduxp<Packet1cd>(const Packet1cd* vecs)\n{\n  return vecs[0];\n}\ntemplate<> EIGEN_STRONG_INLINE std::complex<double> predux_mul<Packet1cd>(const Packet1cd& a)\n{\n  return pfirst(a);\n}\ntemplate<int Offset>\nstruct palign_impl<Offset,Packet1cd>\n{\n  static EIGEN_STRONG_INLINE void run(Packet1cd& /*first*/, const Packet1cd& /*second*/)\n  {\n    // FIXME is it sure we never have to align a Packet1cd?\n    // Even though a std::complex<double> has 16 bytes, it is not necessarily aligned on a 16 bytes boundary...\n  }\n};\n\ntemplate<> struct conj_helper<Packet1cd, Packet1cd, false,true>\n{\n  EIGEN_STRONG_INLINE Packet1cd pmadd(const Packet1cd& x, const Packet1cd& y, const Packet1cd& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet1cd pmul(const Packet1cd& a, const Packet1cd& b) const\n  {\n    return internal::pmul(a, pconj(b));\n  }\n};\n\ntemplate<> struct conj_helper<Packet1cd, Packet1cd, true,false>\n{\n  EIGEN_STRONG_INLINE Packet1cd pmadd(const Packet1cd& x, const Packet1cd& y, const Packet1cd& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet1cd pmul(const Packet1cd& a, const Packet1cd& b) const\n  {\n    return internal::pmul(pconj(a), b);\n  }\n};\n\ntemplate<> struct conj_helper<Packet1cd, Packet1cd, true,true>\n{\n  EIGEN_STRONG_INLINE Packet1cd pmadd(const Packet1cd& x, const Packet1cd& y, const Packet1cd& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet1cd pmul(const Packet1cd& a, const Packet1cd& b) const\n  {\n    return pconj(internal::pmul(a, b));\n  }\n};\n\nEIGEN_MAKE_CONJ_HELPER_CPLX_REAL(Packet1cd,Packet2d)\n\ntemplate<> EIGEN_STRONG_INLINE Packet1cd pdiv<Packet1cd>(const Packet1cd& a, const Packet1cd& b)\n{\n  // TODO optimize it for AltiVec\n  Packet1cd res = conj_helper<Packet1cd,Packet1cd,false,true>().pmul(a,b);\n  Packet2d s = vec_madd(b.v, b.v, p2d_ZERO_);\n  return Packet1cd(pdiv(res.v, s + vec_perm(s, s, p16uc_REVERSE64)));\n}\n\nEIGEN_STRONG_INLINE Packet1cd pcplxflip/*<Packet1cd>*/(const Packet1cd& x)\n{\n  return Packet1cd(preverse(Packet2d(x.v)));\n}\n\nEIGEN_STRONG_INLINE void ptranspose(PacketBlock<Packet1cd,2>& kernel)\n{\n  Packet2d tmp = vec_perm(kernel.packet[0].v, kernel.packet[1].v, p16uc_TRANSPOSE64_HI);\n  kernel.packet[1].v = vec_perm(kernel.packet[0].v, kernel.packet[1].v, p16uc_TRANSPOSE64_LO);\n  kernel.packet[0].v = tmp;\n}\n\n/* complex<float> follows */\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pload <Packet2cf>(const std::complex<float>* from)  { EIGEN_DEBUG_ALIGNED_LOAD return Packet2cf(pload<Packet4f>((const float*)from)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cf ploadu<Packet2cf>(const std::complex<float>* from)  { EIGEN_DEBUG_UNALIGNED_LOAD return Packet2cf(ploadu<Packet4f>((const float*)from)); }\ntemplate<> EIGEN_STRONG_INLINE void pstore <std::complex<float> >(std::complex<float> *     to, const Packet2cf& from) { EIGEN_DEBUG_ALIGNED_STORE pstore((float*)to, from.v); }\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<std::complex<float> >(std::complex<float> *     to, const Packet2cf& from) { EIGEN_DEBUG_UNALIGNED_STORE pstoreu((float*)to, from.v); }\n\ntemplate<> EIGEN_STRONG_INLINE std::complex<float>  pfirst<Packet2cf>(const Packet2cf& a)\n{\n  std::complex<float> EIGEN_ALIGN16 res[2];\n  pstore<std::complex<float> >(res, a);\n\n  return res[0];\n}\n\n\n#if !defined(__ARCH__) || (defined(__ARCH__) && __ARCH__ < 12)\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pset1<Packet2cf>(const std::complex<float>&  from)\n{\n  Packet2cf res;\n  res.cd[0] = Packet1cd(vec_ld2f((const float *)&from));\n  res.cd[1] = res.cd[0];\n  return res;\n}\n#else\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pset1<Packet2cf>(const std::complex<float>&  from)\n{\n  Packet2cf res;\n  if((std::ptrdiff_t(&from) % 16) == 0)\n    res.v = pload<Packet4f>((const float *)&from);\n  else\n    res.v = ploadu<Packet4f>((const float *)&from);\n  res.v = vec_perm(res.v, res.v, p16uc_PSET64_HI);\n  return res;\n}\n#endif\n\ntemplate<> EIGEN_DEVICE_FUNC inline Packet2cf pgather<std::complex<float>, Packet2cf>(const std::complex<float>* from, Index stride)\n{\n  std::complex<float> EIGEN_ALIGN16 af[2];\n  af[0] = from[0*stride];\n  af[1] = from[1*stride];\n  return pload<Packet2cf>(af);\n}\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<std::complex<float>, Packet2cf>(std::complex<float>* to, const Packet2cf& from, Index stride)\n{\n  std::complex<float> EIGEN_ALIGN16 af[2];\n  pstore<std::complex<float> >((std::complex<float> *) af, from);\n  to[0*stride] = af[0];\n  to[1*stride] = af[1];\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cf padd<Packet2cf>(const Packet2cf& a, const Packet2cf& b) { return Packet2cf(padd<Packet4f>(a.v, b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cf psub<Packet2cf>(const Packet2cf& a, const Packet2cf& b) { return Packet2cf(psub<Packet4f>(a.v, b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pnegate(const Packet2cf& a) { return Packet2cf(pnegate(Packet4f(a.v))); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pand   <Packet2cf>(const Packet2cf& a, const Packet2cf& b) { return Packet2cf(pand<Packet4f>(a.v,b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cf por    <Packet2cf>(const Packet2cf& a, const Packet2cf& b) { return Packet2cf(por<Packet4f>(a.v,b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pxor   <Packet2cf>(const Packet2cf& a, const Packet2cf& b) { return Packet2cf(pxor<Packet4f>(a.v,b.v)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pandnot<Packet2cf>(const Packet2cf& a, const Packet2cf& b) { return Packet2cf(pandnot<Packet4f>(a.v,b.v)); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cf ploaddup<Packet2cf>(const std::complex<float>*      from) {  return pset1<Packet2cf>(*from); }\n\ntemplate<> EIGEN_STRONG_INLINE void prefetch<std::complex<float> >(const std::complex<float> *     addr) { EIGEN_ZVECTOR_PREFETCH(addr); }\n\n\n#if !defined(__ARCH__) || (defined(__ARCH__) && __ARCH__ < 12)\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pconj(const Packet2cf& a)\n{\n  Packet2cf res;\n  res.v.v4f[0] = pconj(Packet1cd(reinterpret_cast<Packet2d>(a.v.v4f[0]))).v;\n  res.v.v4f[1] = pconj(Packet1cd(reinterpret_cast<Packet2d>(a.v.v4f[1]))).v;\n  return res;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pmul<Packet2cf>(const Packet2cf& a, const Packet2cf& b)\n{\n  Packet2cf res;\n  res.v.v4f[0] = pmul(Packet1cd(reinterpret_cast<Packet2d>(a.v.v4f[0])), Packet1cd(reinterpret_cast<Packet2d>(b.v.v4f[0]))).v;\n  res.v.v4f[1] = pmul(Packet1cd(reinterpret_cast<Packet2d>(a.v.v4f[1])), Packet1cd(reinterpret_cast<Packet2d>(b.v.v4f[1]))).v;\n  return res;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cf preverse(const Packet2cf& a)\n{\n  Packet2cf res;\n  res.cd[0] = a.cd[1];\n  res.cd[1] = a.cd[0];\n  return res;\n}\n\ntemplate<> EIGEN_STRONG_INLINE std::complex<float> predux<Packet2cf>(const Packet2cf& a)\n{\n  std::complex<float> res;\n  Packet1cd b = padd<Packet1cd>(a.cd[0], a.cd[1]);\n  vec_st2f(b.v, (float*)&res);\n  return res;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cf preduxp<Packet2cf>(const Packet2cf* vecs)\n{\n  PacketBlock<Packet2cf,2> transpose;\n  transpose.packet[0] = vecs[0];\n  transpose.packet[1] = vecs[1];\n  ptranspose(transpose);\n\n  return padd<Packet2cf>(transpose.packet[0], transpose.packet[1]);\n} \n\ntemplate<> EIGEN_STRONG_INLINE std::complex<float> predux_mul<Packet2cf>(const Packet2cf& a)\n{\n  std::complex<float> res;\n  Packet1cd b = pmul<Packet1cd>(a.cd[0], a.cd[1]);\n  vec_st2f(b.v, (float*)&res);\n  return res;\n}\n\ntemplate<int Offset>\nstruct palign_impl<Offset,Packet2cf>\n{\n  static EIGEN_STRONG_INLINE void run(Packet2cf& first, const Packet2cf& second)\n  {\n    if (Offset == 1) {\n      first.cd[0] = first.cd[1];\n      first.cd[1] = second.cd[0];\n    }\n  }\n};\n\ntemplate<> struct conj_helper<Packet2cf, Packet2cf, false,true>\n{\n  EIGEN_STRONG_INLINE Packet2cf pmadd(const Packet2cf& x, const Packet2cf& y, const Packet2cf& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet2cf pmul(const Packet2cf& a, const Packet2cf& b) const\n  {\n    return internal::pmul(a, pconj(b));\n  }\n};\n\ntemplate<> struct conj_helper<Packet2cf, Packet2cf, true,false>\n{\n  EIGEN_STRONG_INLINE Packet2cf pmadd(const Packet2cf& x, const Packet2cf& y, const Packet2cf& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet2cf pmul(const Packet2cf& a, const Packet2cf& b) const\n  {\n    return internal::pmul(pconj(a), b);\n  }\n};\n\ntemplate<> struct conj_helper<Packet2cf, Packet2cf, true,true>\n{\n  EIGEN_STRONG_INLINE Packet2cf pmadd(const Packet2cf& x, const Packet2cf& y, const Packet2cf& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet2cf pmul(const Packet2cf& a, const Packet2cf& b) const\n  {\n    return pconj(internal::pmul(a, b));\n  }\n};\n\nEIGEN_MAKE_CONJ_HELPER_CPLX_REAL(Packet2cf,Packet4f)\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pdiv<Packet2cf>(const Packet2cf& a, const Packet2cf& b)\n{\n  // TODO optimize it for AltiVec\n  Packet2cf res;\n  res.cd[0] = pdiv<Packet1cd>(a.cd[0], b.cd[0]);\n  res.cd[1] = pdiv<Packet1cd>(a.cd[1], b.cd[1]);\n  return res;\n}\n\nEIGEN_STRONG_INLINE Packet2cf pcplxflip/*<Packet2cf>*/(const Packet2cf& x)\n{\n  Packet2cf res;\n  res.cd[0] = pcplxflip(x.cd[0]);\n  res.cd[1] = pcplxflip(x.cd[1]);\n  return res;\n}\n\nEIGEN_STRONG_INLINE void ptranspose(PacketBlock<Packet2cf,2>& kernel)\n{\n  Packet1cd tmp = kernel.packet[0].cd[1];\n  kernel.packet[0].cd[1] = kernel.packet[1].cd[0];\n  kernel.packet[1].cd[0] = tmp;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pblend(const Selector<2>& ifPacket, const Packet2cf& thenPacket, const Packet2cf& elsePacket) {\n  Packet2cf result;\n  const Selector<4> ifPacket4 = { ifPacket.select[0], ifPacket.select[0], ifPacket.select[1], ifPacket.select[1] };\n  result.v = pblend<Packet4f>(ifPacket4, thenPacket.v, elsePacket.v);\n  return result;\n}\n#else\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pconj(const Packet2cf& a) { return Packet2cf(pxor<Packet4f>(a.v, reinterpret_cast<Packet4f>(p4ui_CONJ_XOR))); }\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pmul<Packet2cf>(const Packet2cf& a, const Packet2cf& b)\n{\n  Packet4f a_re, a_im, prod, prod_im;\n\n  // Permute and multiply the real parts of a and b\n  a_re = vec_perm(a.v, a.v, p16uc_PSET32_WODD);\n  \n  // Get the imaginary parts of a\n  a_im = vec_perm(a.v, a.v, p16uc_PSET32_WEVEN);\n\n  // multiply a_im * b and get the conjugate result\n  prod_im = a_im * b.v;\n  prod_im = pxor<Packet4f>(prod_im, reinterpret_cast<Packet4f>(p4ui_CONJ_XOR));\n  // permute back to a proper order\n  prod_im = vec_perm(prod_im, prod_im, p16uc_COMPLEX32_REV);\n\n  // multiply a_re * b, add prod_im\n  prod = pmadd<Packet4f>(a_re, b.v, prod_im);\n \n  return Packet2cf(prod);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cf preverse(const Packet2cf& a)\n{\n  Packet4f rev_a;\n  rev_a = vec_perm(a.v, a.v, p16uc_COMPLEX32_REV2);\n  return Packet2cf(rev_a);\n}\n\ntemplate<> EIGEN_STRONG_INLINE std::complex<float> predux<Packet2cf>(const Packet2cf& a)\n{\n  Packet4f b;\n  b = vec_sld(a.v, a.v, 8);\n  b = padd<Packet4f>(a.v, b);\n  return pfirst<Packet2cf>(Packet2cf(b));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cf preduxp<Packet2cf>(const Packet2cf* vecs)\n{\n  Packet4f b1, b2;\n  b1 = vec_sld(vecs[0].v, vecs[1].v, 8);\n  b2 = vec_sld(vecs[1].v, vecs[0].v, 8);\n  b2 = vec_sld(b2, b2, 8);\n  b2 = padd<Packet4f>(b1, b2);\n\n  return Packet2cf(b2);\n}\n\ntemplate<> EIGEN_STRONG_INLINE std::complex<float> predux_mul<Packet2cf>(const Packet2cf& a)\n{\n  Packet4f b;\n  Packet2cf prod;\n  b = vec_sld(a.v, a.v, 8);\n  prod = pmul<Packet2cf>(a, Packet2cf(b));\n\n  return pfirst<Packet2cf>(prod);\n}\n\ntemplate<int Offset>\nstruct palign_impl<Offset,Packet2cf>\n{\n  static EIGEN_STRONG_INLINE void run(Packet2cf& first, const Packet2cf& second)\n  {\n    if (Offset==1)\n    {\n      first.v = vec_sld(first.v, second.v, 8);\n    }\n  }\n};\n\ntemplate<> struct conj_helper<Packet2cf, Packet2cf, false,true>\n{\n  EIGEN_STRONG_INLINE Packet2cf pmadd(const Packet2cf& x, const Packet2cf& y, const Packet2cf& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet2cf pmul(const Packet2cf& a, const Packet2cf& b) const\n  {\n    return internal::pmul(a, pconj(b));\n  }\n};\n\ntemplate<> struct conj_helper<Packet2cf, Packet2cf, true,false>\n{\n  EIGEN_STRONG_INLINE Packet2cf pmadd(const Packet2cf& x, const Packet2cf& y, const Packet2cf& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet2cf pmul(const Packet2cf& a, const Packet2cf& b) const\n  {\n    return internal::pmul(pconj(a), b);\n  }\n};\n\ntemplate<> struct conj_helper<Packet2cf, Packet2cf, true,true>\n{\n  EIGEN_STRONG_INLINE Packet2cf pmadd(const Packet2cf& x, const Packet2cf& y, const Packet2cf& c) const\n  { return padd(pmul(x,y),c); }\n\n  EIGEN_STRONG_INLINE Packet2cf pmul(const Packet2cf& a, const Packet2cf& b) const\n  {\n    return pconj(internal::pmul(a, b));\n  }\n};\n\nEIGEN_MAKE_CONJ_HELPER_CPLX_REAL(Packet2cf,Packet4f)\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pdiv<Packet2cf>(const Packet2cf& a, const Packet2cf& b)\n{\n  // TODO optimize it for AltiVec\n  Packet2cf res = conj_helper<Packet2cf,Packet2cf,false,true>().pmul(a, b);\n  Packet4f s = pmul<Packet4f>(b.v, b.v);\n  return Packet2cf(pdiv(res.v, padd<Packet4f>(s, vec_perm(s, s, p16uc_COMPLEX32_REV))));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pcplxflip<Packet2cf>(const Packet2cf& x)\n{\n  return Packet2cf(vec_perm(x.v, x.v, p16uc_COMPLEX32_REV));\n}\n\nEIGEN_STRONG_INLINE void ptranspose(PacketBlock<Packet2cf,2>& kernel)\n{\n  Packet4f tmp = vec_perm(kernel.packet[0].v, kernel.packet[1].v, p16uc_TRANSPOSE64_HI);\n  kernel.packet[1].v = vec_perm(kernel.packet[0].v, kernel.packet[1].v, p16uc_TRANSPOSE64_LO);\n  kernel.packet[0].v = tmp;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2cf pblend(const Selector<2>& ifPacket, const Packet2cf& thenPacket, const Packet2cf& elsePacket) {\n  Packet2cf result;\n  result.v = reinterpret_cast<Packet4f>(pblend<Packet2d>(ifPacket, reinterpret_cast<Packet2d>(thenPacket.v), reinterpret_cast<Packet2d>(elsePacket.v)));\n  return result;\n}\n#endif\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_COMPLEX32_ALTIVEC_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/ZVector/MathFunctions.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2007 Julien Pommier\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2016 Konstantinos Margaritis <markos@freevec.org>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n/* The sin, cos, exp, and log functions of this file come from\n * Julien Pommier's sse math library: http://gruntthepeon.free.fr/ssemath/\n */\n\n#ifndef EIGEN_MATH_FUNCTIONS_ALTIVEC_H\n#define EIGEN_MATH_FUNCTIONS_ALTIVEC_H\n\nnamespace Eigen {\n\nnamespace internal {\n\n#if !defined(__ARCH__) || (defined(__ARCH__) && __ARCH__ >= 12)\nstatic _EIGEN_DECLARE_CONST_Packet4f(1 , 1.0f);\nstatic _EIGEN_DECLARE_CONST_Packet4f(half, 0.5f);\nstatic _EIGEN_DECLARE_CONST_Packet4i(0x7f, 0x7f);\nstatic _EIGEN_DECLARE_CONST_Packet4i(23, 23);\n\nstatic _EIGEN_DECLARE_CONST_Packet4f_FROM_INT(inv_mant_mask, ~0x7f800000);\n\n/* the smallest non denormalized float number */\nstatic _EIGEN_DECLARE_CONST_Packet4f_FROM_INT(min_norm_pos,  0x00800000);\nstatic _EIGEN_DECLARE_CONST_Packet4f_FROM_INT(minus_inf,     0xff800000); // -1.f/0.f\nstatic _EIGEN_DECLARE_CONST_Packet4f_FROM_INT(minus_nan,     0xffffffff);\n  \n/* natural logarithm computed for 4 simultaneous float\n  return NaN for x <= 0\n*/\nstatic _EIGEN_DECLARE_CONST_Packet4f(cephes_SQRTHF, 0.707106781186547524f);\nstatic _EIGEN_DECLARE_CONST_Packet4f(cephes_log_p0, 7.0376836292E-2f);\nstatic _EIGEN_DECLARE_CONST_Packet4f(cephes_log_p1, - 1.1514610310E-1f);\nstatic _EIGEN_DECLARE_CONST_Packet4f(cephes_log_p2, 1.1676998740E-1f);\nstatic _EIGEN_DECLARE_CONST_Packet4f(cephes_log_p3, - 1.2420140846E-1f);\nstatic _EIGEN_DECLARE_CONST_Packet4f(cephes_log_p4, + 1.4249322787E-1f);\nstatic _EIGEN_DECLARE_CONST_Packet4f(cephes_log_p5, - 1.6668057665E-1f);\nstatic _EIGEN_DECLARE_CONST_Packet4f(cephes_log_p6, + 2.0000714765E-1f);\nstatic _EIGEN_DECLARE_CONST_Packet4f(cephes_log_p7, - 2.4999993993E-1f);\nstatic _EIGEN_DECLARE_CONST_Packet4f(cephes_log_p8, + 3.3333331174E-1f);\nstatic _EIGEN_DECLARE_CONST_Packet4f(cephes_log_q1, -2.12194440e-4f);\nstatic _EIGEN_DECLARE_CONST_Packet4f(cephes_log_q2, 0.693359375f);\n\nstatic _EIGEN_DECLARE_CONST_Packet4f(exp_hi,  88.3762626647950f);\nstatic _EIGEN_DECLARE_CONST_Packet4f(exp_lo, -88.3762626647949f);\n\nstatic _EIGEN_DECLARE_CONST_Packet4f(cephes_LOG2EF, 1.44269504088896341f);\nstatic _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_C1, 0.693359375f);\nstatic _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_C2, -2.12194440e-4f);\n\nstatic _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p0, 1.9875691500E-4f);\nstatic _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p1, 1.3981999507E-3f);\nstatic _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p2, 8.3334519073E-3f);\nstatic _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p3, 4.1665795894E-2f);\nstatic _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p4, 1.6666665459E-1f);\nstatic _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p5, 5.0000001201E-1f);\n#endif\n\nstatic _EIGEN_DECLARE_CONST_Packet2d(1 , 1.0);\nstatic _EIGEN_DECLARE_CONST_Packet2d(2 , 2.0);\nstatic _EIGEN_DECLARE_CONST_Packet2d(half, 0.5);\n\nstatic _EIGEN_DECLARE_CONST_Packet2d(exp_hi,  709.437);\nstatic _EIGEN_DECLARE_CONST_Packet2d(exp_lo, -709.436139303);\n\nstatic _EIGEN_DECLARE_CONST_Packet2d(cephes_LOG2EF, 1.4426950408889634073599);\n\nstatic _EIGEN_DECLARE_CONST_Packet2d(cephes_exp_p0, 1.26177193074810590878e-4);\nstatic _EIGEN_DECLARE_CONST_Packet2d(cephes_exp_p1, 3.02994407707441961300e-2);\nstatic _EIGEN_DECLARE_CONST_Packet2d(cephes_exp_p2, 9.99999999999999999910e-1);\n\nstatic _EIGEN_DECLARE_CONST_Packet2d(cephes_exp_q0, 3.00198505138664455042e-6);\nstatic _EIGEN_DECLARE_CONST_Packet2d(cephes_exp_q1, 2.52448340349684104192e-3);\nstatic _EIGEN_DECLARE_CONST_Packet2d(cephes_exp_q2, 2.27265548208155028766e-1);\nstatic _EIGEN_DECLARE_CONST_Packet2d(cephes_exp_q3, 2.00000000000000000009e0);\n\nstatic _EIGEN_DECLARE_CONST_Packet2d(cephes_exp_C1, 0.693145751953125);\nstatic _EIGEN_DECLARE_CONST_Packet2d(cephes_exp_C2, 1.42860682030941723212e-6);\n\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED\nPacket2d pexp<Packet2d>(const Packet2d& _x)\n{\n  Packet2d x = _x;\n\n  Packet2d tmp, fx;\n  Packet2l emm0;\n\n  // clamp x\n  x = pmax(pmin(x, p2d_exp_hi), p2d_exp_lo);\n  /* express exp(x) as exp(g + n*log(2)) */\n  fx = pmadd(p2d_cephes_LOG2EF, x, p2d_half);\n\n  fx = vec_floor(fx);\n\n  tmp = pmul(fx, p2d_cephes_exp_C1);\n  Packet2d z = pmul(fx, p2d_cephes_exp_C2);\n  x = psub(x, tmp);\n  x = psub(x, z);\n\n  Packet2d x2 = pmul(x,x);\n\n  Packet2d px = p2d_cephes_exp_p0;\n  px = pmadd(px, x2, p2d_cephes_exp_p1);\n  px = pmadd(px, x2, p2d_cephes_exp_p2);\n  px = pmul (px, x);\n\n  Packet2d qx = p2d_cephes_exp_q0;\n  qx = pmadd(qx, x2, p2d_cephes_exp_q1);\n  qx = pmadd(qx, x2, p2d_cephes_exp_q2);\n  qx = pmadd(qx, x2, p2d_cephes_exp_q3);\n\n  x = pdiv(px,psub(qx,px));\n  x = pmadd(p2d_2,x,p2d_1);\n\n  // build 2^n\n  emm0 = vec_ctsl(fx, 0);\n\n  static const Packet2l p2l_1023 = { 1023, 1023 };\n  static const Packet2ul p2ul_52 = { 52, 52 };\n\n  emm0 = emm0 + p2l_1023;\n  emm0 = emm0 << reinterpret_cast<Packet2l>(p2ul_52);\n\n  // Altivec's max & min operators just drop silent NaNs. Check NaNs in \n  // inputs and return them unmodified.\n  Packet2ul isnumber_mask = reinterpret_cast<Packet2ul>(vec_cmpeq(_x, _x));\n  return vec_sel(_x, pmax(pmul(x, reinterpret_cast<Packet2d>(emm0)), _x),\n                 isnumber_mask);\n}\n\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED\nPacket4f pexp<Packet4f>(const Packet4f& _x)\n{\n#if !defined(__ARCH__) || (defined(__ARCH__) && __ARCH__ >= 12)\n/*\n  Packet4f x = _x;\n\n  Packet4f tmp, fx;\n  Packet4i emm0;\n\n  // clamp x\n  x = pmax(pmin(x, p4f_exp_hi), p4f_exp_lo);\n\n  // express exp(x) as exp(g + n*log(2))\n  fx = pmadd(x, p4f_cephes_LOG2EF, p4f_half);\n\n  fx = pfloor(fx);\n\n  tmp = pmul(fx, p4f_cephes_exp_C1);\n  Packet4f z = pmul(fx, p4f_cephes_exp_C2);\n  x = psub(x, tmp);\n  x = psub(x, z);\n\n  z = pmul(x,x);\n\n  Packet4f y = p4f_cephes_exp_p0;\n  y = pmadd(y, x, p4f_cephes_exp_p1);\n  y = pmadd(y, x, p4f_cephes_exp_p2);\n  y = pmadd(y, x, p4f_cephes_exp_p3);\n  y = pmadd(y, x, p4f_cephes_exp_p4);\n  y = pmadd(y, x, p4f_cephes_exp_p5);\n  y = pmadd(y, z, x);\n  y = padd(y, p4f_1);\n\n  // build 2^n\n  emm0 = vec_cts(fx, 0);\n  emm0 = emm0 + p4i_0x7f;\n  emm0 = emm0 << reinterpret_cast<Packet4i>(p4i_23);\n\n  // Altivec's max & min operators just drop silent NaNs. Check NaNs in \n  // inputs and return them unmodified.\n  Packet4ui isnumber_mask = reinterpret_cast<Packet4ui>(vec_cmpeq(_x, _x));\n  return vec_sel(_x, pmax(pmul(y, reinterpret_cast<Packet4f>(emm0)), _x),\n                 isnumber_mask);*/\n  return _x;\n#else\n  Packet4f res;\n  res.v4f[0] = pexp<Packet2d>(_x.v4f[0]);\n  res.v4f[1] = pexp<Packet2d>(_x.v4f[1]);\n  return res;\n#endif\n}\n\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED\nPacket2d psqrt<Packet2d>(const Packet2d& x)\n{\n  return vec_sqrt(x);\n}\n\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED\nPacket4f psqrt<Packet4f>(const Packet4f& x)\n{\n  Packet4f res;\n#if !defined(__ARCH__) || (defined(__ARCH__) && __ARCH__ >= 12)\n  res = vec_sqrt(x);\n#else\n  res.v4f[0] = psqrt<Packet2d>(x.v4f[0]);\n  res.v4f[1] = psqrt<Packet2d>(x.v4f[1]);\n#endif\n  return res;\n}\n\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED\nPacket2d prsqrt<Packet2d>(const Packet2d& x) {\n  return pset1<Packet2d>(1.0) / psqrt<Packet2d>(x);\n}\n\ntemplate<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED\nPacket4f prsqrt<Packet4f>(const Packet4f& x) {\n  Packet4f res;\n#if !defined(__ARCH__) || (defined(__ARCH__) && __ARCH__ >= 12)\n  res = pset1<Packet4f>(1.0) / psqrt<Packet4f>(x);\n#else\n  res.v4f[0] = prsqrt<Packet2d>(x.v4f[0]);\n  res.v4f[1] = prsqrt<Packet2d>(x.v4f[1]);\n#endif\n  return res;\n}\n\n// Hyperbolic Tangent function.\ntemplate <>\nEIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet4f\nptanh<Packet4f>(const Packet4f& x) {\n  return internal::generic_fast_tanh_float(x);\n}\n\n}  // end namespace internal\n\n}  // end namespace Eigen\n\n#endif  // EIGEN_MATH_FUNCTIONS_ALTIVEC_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/arch/ZVector/PacketMath.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Konstantinos Margaritis <markos@freevec.org>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_PACKET_MATH_ZVECTOR_H\n#define EIGEN_PACKET_MATH_ZVECTOR_H\n\n#include <stdint.h>\n\nnamespace Eigen {\n\nnamespace internal {\n\n#ifndef EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD\n#define EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 16\n#endif\n\n#ifndef EIGEN_HAS_SINGLE_INSTRUCTION_MADD\n#define EIGEN_HAS_SINGLE_INSTRUCTION_MADD\n#endif\n\n#ifndef EIGEN_HAS_SINGLE_INSTRUCTION_CJMADD\n#define EIGEN_HAS_SINGLE_INSTRUCTION_CJMADD\n#endif\n\n#ifndef EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS\n#define EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS  32\n#endif\n\ntypedef __vector int                 Packet4i;\ntypedef __vector unsigned int        Packet4ui;\ntypedef __vector __bool int          Packet4bi;\ntypedef __vector short int           Packet8i;\ntypedef __vector unsigned char       Packet16uc;\ntypedef __vector double              Packet2d;\ntypedef __vector unsigned long long  Packet2ul;\ntypedef __vector long long           Packet2l;\n\n// Z14 has builtin support for float vectors\n#if !defined(__ARCH__) || (defined(__ARCH__) && __ARCH__ >= 12)\ntypedef __vector float               Packet4f;\n#else\ntypedef struct {\n\tPacket2d  v4f[2];\n} Packet4f;\n#endif\n\ntypedef union {\n  int32_t   i[4];\n  uint32_t ui[4];\n  int64_t   l[2];\n  uint64_t ul[2];\n  double    d[2];\n  float     f[4];\n  Packet4i  v4i;\n  Packet4ui v4ui;\n  Packet2l  v2l;\n  Packet2ul v2ul;\n  Packet2d  v2d;\n#if !defined(__ARCH__) || (defined(__ARCH__) && __ARCH__ >= 12)\n  Packet4f  v4f;\n#endif\n} Packet;\n\n// We don't want to write the same code all the time, but we need to reuse the constants\n// and it doesn't really work to declare them global, so we define macros instead\n\n#define _EIGEN_DECLARE_CONST_FAST_Packet4i(NAME,X) \\\n  Packet4i p4i_##NAME = reinterpret_cast<Packet4i>(vec_splat_s32(X))\n\n#define _EIGEN_DECLARE_CONST_FAST_Packet2d(NAME,X) \\\n  Packet2d p2d_##NAME = reinterpret_cast<Packet2d>(vec_splat_s64(X))\n\n#define _EIGEN_DECLARE_CONST_FAST_Packet2l(NAME,X) \\\n  Packet2l p2l_##NAME = reinterpret_cast<Packet2l>(vec_splat_s64(X))\n\n#define _EIGEN_DECLARE_CONST_Packet4i(NAME,X) \\\n  Packet4i p4i_##NAME = pset1<Packet4i>(X)\n\n#define _EIGEN_DECLARE_CONST_Packet2d(NAME,X) \\\n  Packet2d p2d_##NAME = pset1<Packet2d>(X)\n\n#define _EIGEN_DECLARE_CONST_Packet2l(NAME,X) \\\n  Packet2l p2l_##NAME = pset1<Packet2l>(X)\n\n// These constants are endian-agnostic\nstatic _EIGEN_DECLARE_CONST_FAST_Packet4i(ZERO, 0); //{ 0, 0, 0, 0,}\nstatic _EIGEN_DECLARE_CONST_FAST_Packet4i(ONE, 1); //{ 1, 1, 1, 1}\n\nstatic _EIGEN_DECLARE_CONST_FAST_Packet2d(ZERO, 0);\nstatic _EIGEN_DECLARE_CONST_FAST_Packet2l(ZERO, 0);\nstatic _EIGEN_DECLARE_CONST_FAST_Packet2l(ONE, 1);\n\nstatic Packet2d p2d_ONE = { 1.0, 1.0 }; \nstatic Packet2d p2d_ZERO_ = { -0.0, -0.0 };\n\n#if !defined(__ARCH__) || (defined(__ARCH__) && __ARCH__ >= 12)\n#define _EIGEN_DECLARE_CONST_FAST_Packet4f(NAME,X) \\\n  Packet4f p4f_##NAME = reinterpret_cast<Packet4f>(vec_splat_s32(X))\n\n#define _EIGEN_DECLARE_CONST_Packet4f(NAME,X) \\\n  Packet4f p4f_##NAME = pset1<Packet4f>(X)\n\n#define _EIGEN_DECLARE_CONST_Packet4f_FROM_INT(NAME,X) \\\n  const Packet4f p4f_##NAME = reinterpret_cast<Packet4f>(pset1<Packet4i>(X))\n\nstatic _EIGEN_DECLARE_CONST_FAST_Packet4f(ZERO, 0); //{ 0.0, 0.0, 0.0, 0.0}\nstatic _EIGEN_DECLARE_CONST_FAST_Packet4i(MINUS1,-1); //{ -1, -1, -1, -1}\nstatic Packet4f p4f_MZERO = { 0x80000000, 0x80000000, 0x80000000, 0x80000000};\n#endif\n\nstatic Packet4i p4i_COUNTDOWN = { 0, 1, 2, 3 };\nstatic Packet4f p4f_COUNTDOWN = { 0.0, 1.0, 2.0, 3.0 };\nstatic Packet2d p2d_COUNTDOWN = reinterpret_cast<Packet2d>(vec_sld(reinterpret_cast<Packet16uc>(p2d_ZERO), reinterpret_cast<Packet16uc>(p2d_ONE), 8));\n\nstatic Packet16uc p16uc_PSET64_HI = { 0,1,2,3, 4,5,6,7, 0,1,2,3, 4,5,6,7 };\nstatic Packet16uc p16uc_DUPLICATE32_HI = { 0,1,2,3, 0,1,2,3, 4,5,6,7, 4,5,6,7 };\n\n// Mask alignment\n#define _EIGEN_MASK_ALIGNMENT\t0xfffffffffffffff0\n\n#define _EIGEN_ALIGNED_PTR(x)\t((std::ptrdiff_t)(x) & _EIGEN_MASK_ALIGNMENT)\n\n// Handle endianness properly while loading constants\n// Define global static constants:\n\nstatic Packet16uc p16uc_FORWARD =   { 0,1,2,3, 4,5,6,7, 8,9,10,11, 12,13,14,15 };\nstatic Packet16uc p16uc_REVERSE32 = { 12,13,14,15, 8,9,10,11, 4,5,6,7, 0,1,2,3 };\nstatic Packet16uc p16uc_REVERSE64 = { 8,9,10,11, 12,13,14,15, 0,1,2,3, 4,5,6,7 };\n\nstatic Packet16uc p16uc_PSET32_WODD   = vec_sld((Packet16uc) vec_splat((Packet4ui)p16uc_FORWARD, 0), (Packet16uc) vec_splat((Packet4ui)p16uc_FORWARD, 2), 8);//{ 0,1,2,3, 0,1,2,3, 8,9,10,11, 8,9,10,11 };\nstatic Packet16uc p16uc_PSET32_WEVEN  = vec_sld(p16uc_DUPLICATE32_HI, (Packet16uc) vec_splat((Packet4ui)p16uc_FORWARD, 3), 8);//{ 4,5,6,7, 4,5,6,7, 12,13,14,15, 12,13,14,15 };\n/*static Packet16uc p16uc_HALF64_0_16 = vec_sld((Packet16uc)p4i_ZERO, vec_splat((Packet16uc) vec_abs(p4i_MINUS16), 3), 8);      //{ 0,0,0,0, 0,0,0,0, 16,16,16,16, 16,16,16,16};\n\nstatic Packet16uc p16uc_PSET64_HI = (Packet16uc) vec_mergeh((Packet4ui)p16uc_PSET32_WODD, (Packet4ui)p16uc_PSET32_WEVEN);     //{ 0,1,2,3, 4,5,6,7, 0,1,2,3, 4,5,6,7 };*/\nstatic Packet16uc p16uc_PSET64_LO = (Packet16uc) vec_mergel((Packet4ui)p16uc_PSET32_WODD, (Packet4ui)p16uc_PSET32_WEVEN);     //{ 8,9,10,11, 12,13,14,15, 8,9,10,11, 12,13,14,15 };\n/*static Packet16uc p16uc_TRANSPOSE64_HI = vec_add(p16uc_PSET64_HI, p16uc_HALF64_0_16);                                         //{ 0,1,2,3, 4,5,6,7, 16,17,18,19, 20,21,22,23};\nstatic Packet16uc p16uc_TRANSPOSE64_LO = vec_add(p16uc_PSET64_LO, p16uc_HALF64_0_16);                                         //{ 8,9,10,11, 12,13,14,15, 24,25,26,27, 28,29,30,31};*/\nstatic Packet16uc p16uc_TRANSPOSE64_HI = { 0,1,2,3, 4,5,6,7, 16,17,18,19, 20,21,22,23};\nstatic Packet16uc p16uc_TRANSPOSE64_LO = { 8,9,10,11, 12,13,14,15, 24,25,26,27, 28,29,30,31};\n\nstatic Packet16uc p16uc_COMPLEX32_REV = vec_sld(p16uc_REVERSE32, p16uc_REVERSE32, 8);                                         //{ 4,5,6,7, 0,1,2,3, 12,13,14,15, 8,9,10,11 };\n\nstatic Packet16uc p16uc_COMPLEX32_REV2 = vec_sld(p16uc_FORWARD, p16uc_FORWARD, 8);                                            //{ 8,9,10,11, 12,13,14,15, 0,1,2,3, 4,5,6,7 };\n\n\n#if EIGEN_HAS_BUILTIN(__builtin_prefetch) || EIGEN_COMP_GNUC\n  #define EIGEN_ZVECTOR_PREFETCH(ADDR) __builtin_prefetch(ADDR);\n#else\n  #define EIGEN_ZVECTOR_PREFETCH(ADDR) asm( \"   pfd [%[addr]]\\n\" :: [addr] \"r\" (ADDR) : \"cc\" );\n#endif\n\ntemplate<> struct packet_traits<int>    : default_packet_traits\n{\n  typedef Packet4i type;\n  typedef Packet4i half;\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size = 4,\n    HasHalfPacket = 0,\n\n    HasAdd  = 1,\n    HasSub  = 1,\n    HasMul  = 1,\n    HasDiv  = 1,\n    HasBlend = 1\n  };\n};\n\ntemplate <>\nstruct packet_traits<float> : default_packet_traits {\n  typedef Packet4f type;\n  typedef Packet4f half;\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size = 4,\n    HasHalfPacket = 0,\n\n    HasAdd = 1,\n    HasSub = 1,\n    HasMul = 1,\n    HasDiv = 1,\n    HasMin = 1,\n    HasMax = 1,\n    HasAbs = 1,\n    HasSin = 0,\n    HasCos = 0,\n    HasLog = 0,\n#if !defined(__ARCH__) || (defined(__ARCH__) && __ARCH__ >= 12)\n    HasExp = 0,\n#else\n    HasExp = 1,\n#endif\n    HasSqrt = 1,\n    HasRsqrt = 1,\n    HasTanh = 1,\n    HasErf = 1,\n    HasRound = 1,\n    HasFloor = 1,\n    HasCeil = 1,\n    HasNegate = 1,\n    HasBlend = 1\n  };\n};\n\ntemplate<> struct packet_traits<double> : default_packet_traits\n{\n  typedef Packet2d type;\n  typedef Packet2d half;\n  enum {\n    Vectorizable = 1,\n    AlignedOnScalar = 1,\n    size=2,\n    HasHalfPacket = 1,\n\n    HasAdd  = 1,\n    HasSub  = 1,\n    HasMul  = 1,\n    HasDiv  = 1,\n    HasMin  = 1,\n    HasMax  = 1,\n    HasAbs  = 1,\n    HasSin  = 0,\n    HasCos  = 0,\n    HasLog  = 0,\n    HasExp  = 1,\n    HasSqrt = 1,\n    HasRsqrt = 1,\n    HasRound = 1,\n    HasFloor = 1,\n    HasCeil = 1,\n    HasNegate = 1,\n    HasBlend = 1\n  };\n};\n\ntemplate<> struct unpacket_traits<Packet4i> { typedef int    type; enum {size=4, alignment=Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false}; typedef Packet4i half; };\ntemplate<> struct unpacket_traits<Packet4f> { typedef float  type; enum {size=4, alignment=Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false}; typedef Packet4f half; };\ntemplate<> struct unpacket_traits<Packet2d> { typedef double type; enum {size=2, alignment=Aligned16, vectorizable=true, masked_load_available=false, masked_store_available=false}; typedef Packet2d half; };\n\n/* Forward declaration */\nEIGEN_DEVICE_FUNC inline void ptranspose(PacketBlock<Packet4f,4>& kernel);\n \ninline std::ostream & operator <<(std::ostream & s, const Packet4i & v)\n{\n  Packet vt;\n  vt.v4i = v;\n  s << vt.i[0] << \", \" << vt.i[1] << \", \" << vt.i[2] << \", \" << vt.i[3];\n  return s;\n}\n\ninline std::ostream & operator <<(std::ostream & s, const Packet4ui & v)\n{\n  Packet vt;\n  vt.v4ui = v;\n  s << vt.ui[0] << \", \" << vt.ui[1] << \", \" << vt.ui[2] << \", \" << vt.ui[3];\n  return s;\n}\n\ninline std::ostream & operator <<(std::ostream & s, const Packet2l & v)\n{\n  Packet vt;\n  vt.v2l = v;\n  s << vt.l[0] << \", \" << vt.l[1];\n  return s;\n}\n\ninline std::ostream & operator <<(std::ostream & s, const Packet2ul & v)\n{\n  Packet vt;\n  vt.v2ul = v;\n  s << vt.ul[0] << \", \" << vt.ul[1] ;\n  return s;\n}\n\ninline std::ostream & operator <<(std::ostream & s, const Packet2d & v)\n{\n  Packet vt;\n  vt.v2d = v;\n  s << vt.d[0] << \", \" << vt.d[1];\n  return s;\n}\n\n#if !defined(__ARCH__) || (defined(__ARCH__) && __ARCH__ >= 12)\ninline std::ostream & operator <<(std::ostream & s, const Packet4f & v)\n{\n  Packet vt;\n  vt.v4f = v;\n  s << vt.f[0] << \", \" << vt.f[1] << \", \" << vt.f[2] << \", \" << vt.f[3];\n  return s;\n}\n#endif\n\n\ntemplate<int Offset>\nstruct palign_impl<Offset,Packet4i>\n{\n  static EIGEN_STRONG_INLINE void run(Packet4i& first, const Packet4i& second)\n  {\n    switch (Offset % 4) {\n    case 1:\n      first = vec_sld(first, second, 4); break;\n    case 2:\n      first = vec_sld(first, second, 8); break;\n    case 3:\n      first = vec_sld(first, second, 12); break;\n    }\n  }\n};\n\ntemplate<int Offset>\nstruct palign_impl<Offset,Packet2d>\n{\n  static EIGEN_STRONG_INLINE void run(Packet2d& first, const Packet2d& second)\n  {\n    if (Offset == 1)\n      first = reinterpret_cast<Packet2d>(vec_sld(reinterpret_cast<Packet4i>(first), reinterpret_cast<Packet4i>(second), 8));\n  }\n};\n\ntemplate<> EIGEN_STRONG_INLINE Packet4i pload<Packet4i>(const int*     from)\n{\n  // FIXME: No intrinsic yet\n  EIGEN_DEBUG_ALIGNED_LOAD\n  Packet *vfrom;\n  vfrom = (Packet *) from;\n  return vfrom->v4i;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d pload<Packet2d>(const double* from)\n{\n  // FIXME: No intrinsic yet\n  EIGEN_DEBUG_ALIGNED_LOAD\n  Packet *vfrom;\n  vfrom = (Packet *) from;\n  return vfrom->v2d;\n}\n\ntemplate<> EIGEN_STRONG_INLINE void pstore<int>(int*       to, const Packet4i& from)\n{\n  // FIXME: No intrinsic yet\n  EIGEN_DEBUG_ALIGNED_STORE\n  Packet *vto;\n  vto = (Packet *) to;\n  vto->v4i = from;\n}\n\ntemplate<> EIGEN_STRONG_INLINE void pstore<double>(double*   to, const Packet2d& from)\n{\n  // FIXME: No intrinsic yet\n  EIGEN_DEBUG_ALIGNED_STORE\n  Packet *vto;\n  vto = (Packet *) to;\n  vto->v2d = from;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4i pset1<Packet4i>(const int&    from)\n{\n  return vec_splats(from);\n}\ntemplate<> EIGEN_STRONG_INLINE Packet2d pset1<Packet2d>(const double& from) {\n  return vec_splats(from);\n}\n\ntemplate<> EIGEN_STRONG_INLINE void\npbroadcast4<Packet4i>(const int *a,\n                      Packet4i& a0, Packet4i& a1, Packet4i& a2, Packet4i& a3)\n{\n  a3 = pload<Packet4i>(a);\n  a0 = vec_splat(a3, 0);\n  a1 = vec_splat(a3, 1);\n  a2 = vec_splat(a3, 2);\n  a3 = vec_splat(a3, 3);\n}\n\ntemplate<> EIGEN_STRONG_INLINE void\npbroadcast4<Packet2d>(const double *a,\n                      Packet2d& a0, Packet2d& a1, Packet2d& a2, Packet2d& a3)\n{\n  a1 = pload<Packet2d>(a);\n  a0 = vec_splat(a1, 0);\n  a1 = vec_splat(a1, 1);\n  a3 = pload<Packet2d>(a+2);\n  a2 = vec_splat(a3, 0);\n  a3 = vec_splat(a3, 1);\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline Packet4i pgather<int, Packet4i>(const int* from, Index stride)\n{\n  int EIGEN_ALIGN16 ai[4];\n  ai[0] = from[0*stride];\n  ai[1] = from[1*stride];\n  ai[2] = from[2*stride];\n  ai[3] = from[3*stride];\n return pload<Packet4i>(ai);\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline Packet2d pgather<double, Packet2d>(const double* from, Index stride)\n{\n  double EIGEN_ALIGN16 af[2];\n  af[0] = from[0*stride];\n  af[1] = from[1*stride];\n return pload<Packet2d>(af);\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<int, Packet4i>(int* to, const Packet4i& from, Index stride)\n{\n  int EIGEN_ALIGN16 ai[4];\n  pstore<int>((int *)ai, from);\n  to[0*stride] = ai[0];\n  to[1*stride] = ai[1];\n  to[2*stride] = ai[2];\n  to[3*stride] = ai[3];\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<double, Packet2d>(double* to, const Packet2d& from, Index stride)\n{\n  double EIGEN_ALIGN16 af[2];\n  pstore<double>(af, from);\n  to[0*stride] = af[0];\n  to[1*stride] = af[1];\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4i padd<Packet4i>(const Packet4i& a, const Packet4i& b) { return (a + b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d padd<Packet2d>(const Packet2d& a, const Packet2d& b) { return (a + b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4i psub<Packet4i>(const Packet4i& a, const Packet4i& b) { return (a - b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d psub<Packet2d>(const Packet2d& a, const Packet2d& b) { return (a - b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4i pmul<Packet4i>(const Packet4i& a, const Packet4i& b) { return (a * b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pmul<Packet2d>(const Packet2d& a, const Packet2d& b) { return (a * b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4i pdiv<Packet4i>(const Packet4i& a, const Packet4i& b) { return (a / b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pdiv<Packet2d>(const Packet2d& a, const Packet2d& b) { return (a / b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4i pnegate(const Packet4i& a) { return (-a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pnegate(const Packet2d& a) { return (-a); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4i pconj(const Packet4i& a) { return a; }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pconj(const Packet2d& a) { return a; }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4i pmadd(const Packet4i& a, const Packet4i& b, const Packet4i& c) { return padd<Packet4i>(pmul<Packet4i>(a, b), c); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pmadd(const Packet2d& a, const Packet2d& b, const Packet2d& c) { return vec_madd(a, b, c); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4i plset<Packet4i>(const int& a)    { return padd<Packet4i>(pset1<Packet4i>(a), p4i_COUNTDOWN); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d plset<Packet2d>(const double& a) { return padd<Packet2d>(pset1<Packet2d>(a), p2d_COUNTDOWN); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4i pmin<Packet4i>(const Packet4i& a, const Packet4i& b) { return vec_min(a, b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pmin<Packet2d>(const Packet2d& a, const Packet2d& b) { return vec_min(a, b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4i pmax<Packet4i>(const Packet4i& a, const Packet4i& b) { return vec_max(a, b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pmax<Packet2d>(const Packet2d& a, const Packet2d& b) { return vec_max(a, b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4i pand<Packet4i>(const Packet4i& a, const Packet4i& b) { return vec_and(a, b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pand<Packet2d>(const Packet2d& a, const Packet2d& b) { return vec_and(a, b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4i por<Packet4i>(const Packet4i& a, const Packet4i& b) { return vec_or(a, b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d por<Packet2d>(const Packet2d& a, const Packet2d& b) { return vec_or(a, b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4i pxor<Packet4i>(const Packet4i& a, const Packet4i& b) { return vec_xor(a, b); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pxor<Packet2d>(const Packet2d& a, const Packet2d& b) { return vec_xor(a, b); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4i pandnot<Packet4i>(const Packet4i& a, const Packet4i& b) { return pand<Packet4i>(a, vec_nor(b, b)); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pandnot<Packet2d>(const Packet2d& a, const Packet2d& b) { return vec_and(a, vec_nor(b, b)); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d pround<Packet2d>(const Packet2d& a) { return vec_round(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pceil<Packet2d>(const  Packet2d& a) { return vec_ceil(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pfloor<Packet2d>(const Packet2d& a) { return vec_floor(a); }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4i ploadu<Packet4i>(const int*       from) { return pload<Packet4i>(from); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d ploadu<Packet2d>(const double*    from) { return pload<Packet2d>(from); }\n\n\ntemplate<> EIGEN_STRONG_INLINE Packet4i ploaddup<Packet4i>(const int*     from)\n{\n  Packet4i p = pload<Packet4i>(from);\n  return vec_perm(p, p, p16uc_DUPLICATE32_HI);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d ploaddup<Packet2d>(const double*   from)\n{\n  Packet2d p = pload<Packet2d>(from);\n  return vec_perm(p, p, p16uc_PSET64_HI);\n}\n\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<int>(int*        to, const Packet4i& from) { pstore<int>(to, from); }\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<double>(double*  to, const Packet2d& from) { pstore<double>(to, from); }\n\ntemplate<> EIGEN_STRONG_INLINE void prefetch<int>(const int*       addr) { EIGEN_ZVECTOR_PREFETCH(addr); }\ntemplate<> EIGEN_STRONG_INLINE void prefetch<double>(const double* addr) { EIGEN_ZVECTOR_PREFETCH(addr); }\n\ntemplate<> EIGEN_STRONG_INLINE int    pfirst<Packet4i>(const Packet4i& a) { int    EIGEN_ALIGN16 x[4]; pstore(x, a); return x[0]; }\ntemplate<> EIGEN_STRONG_INLINE double pfirst<Packet2d>(const Packet2d& a) { double EIGEN_ALIGN16 x[2]; pstore(x, a); return x[0]; }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4i preverse(const Packet4i& a)\n{\n  return reinterpret_cast<Packet4i>(vec_perm(reinterpret_cast<Packet16uc>(a), reinterpret_cast<Packet16uc>(a), p16uc_REVERSE32));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d preverse(const Packet2d& a)\n{\n  return reinterpret_cast<Packet2d>(vec_perm(reinterpret_cast<Packet16uc>(a), reinterpret_cast<Packet16uc>(a), p16uc_REVERSE64));\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4i pabs<Packet4i>(const Packet4i& a) { return vec_abs(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet2d pabs<Packet2d>(const Packet2d& a) { return vec_abs(a); }\n\ntemplate<> EIGEN_STRONG_INLINE int predux<Packet4i>(const Packet4i& a)\n{\n  Packet4i b, sum;\n  b   = vec_sld(a, a, 8);\n  sum = padd<Packet4i>(a, b);\n  b   = vec_sld(sum, sum, 4);\n  sum = padd<Packet4i>(sum, b);\n  return pfirst(sum);\n}\n\ntemplate<> EIGEN_STRONG_INLINE double predux<Packet2d>(const Packet2d& a)\n{\n  Packet2d b, sum;\n  b   = reinterpret_cast<Packet2d>(vec_sld(reinterpret_cast<Packet4i>(a), reinterpret_cast<Packet4i>(a), 8));\n  sum = padd<Packet2d>(a, b);\n  return pfirst(sum);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4i preduxp<Packet4i>(const Packet4i* vecs)\n{\n  Packet4i v[4], sum[4];\n\n  // It's easier and faster to transpose then add as columns\n  // Check: http://www.freevec.org/function/matrix_4x4_transpose_floats for explanation\n  // Do the transpose, first set of moves\n  v[0] = vec_mergeh(vecs[0], vecs[2]);\n  v[1] = vec_mergel(vecs[0], vecs[2]);\n  v[2] = vec_mergeh(vecs[1], vecs[3]);\n  v[3] = vec_mergel(vecs[1], vecs[3]);\n  // Get the resulting vectors\n  sum[0] = vec_mergeh(v[0], v[2]);\n  sum[1] = vec_mergel(v[0], v[2]);\n  sum[2] = vec_mergeh(v[1], v[3]);\n  sum[3] = vec_mergel(v[1], v[3]);\n\n  // Now do the summation:\n  // Lines 0+1\n  sum[0] = padd<Packet4i>(sum[0], sum[1]);\n  // Lines 2+3\n  sum[1] = padd<Packet4i>(sum[2], sum[3]);\n  // Add the results\n  sum[0] = padd<Packet4i>(sum[0], sum[1]);\n\n  return sum[0];\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d preduxp<Packet2d>(const Packet2d* vecs)\n{\n  Packet2d v[2], sum;\n  v[0] = padd<Packet2d>(vecs[0], reinterpret_cast<Packet2d>(vec_sld(reinterpret_cast<Packet4ui>(vecs[0]), reinterpret_cast<Packet4ui>(vecs[0]), 8)));\n  v[1] = padd<Packet2d>(vecs[1], reinterpret_cast<Packet2d>(vec_sld(reinterpret_cast<Packet4ui>(vecs[1]), reinterpret_cast<Packet4ui>(vecs[1]), 8)));\n \n  sum = reinterpret_cast<Packet2d>(vec_sld(reinterpret_cast<Packet4ui>(v[0]), reinterpret_cast<Packet4ui>(v[1]), 8));\n\n  return sum;\n}\n\n// Other reduction functions:\n// mul\ntemplate<> EIGEN_STRONG_INLINE int predux_mul<Packet4i>(const Packet4i& a)\n{\n  EIGEN_ALIGN16 int aux[4];\n  pstore(aux, a);\n  return aux[0] * aux[1] * aux[2] * aux[3];\n}\n\ntemplate<> EIGEN_STRONG_INLINE double predux_mul<Packet2d>(const Packet2d& a)\n{\n  return pfirst(pmul(a, reinterpret_cast<Packet2d>(vec_sld(reinterpret_cast<Packet4i>(a), reinterpret_cast<Packet4i>(a), 8))));\n}\n\n// min\ntemplate<> EIGEN_STRONG_INLINE int predux_min<Packet4i>(const Packet4i& a)\n{\n  Packet4i b, res;\n  b   = pmin<Packet4i>(a, vec_sld(a, a, 8));\n  res = pmin<Packet4i>(b, vec_sld(b, b, 4));\n  return pfirst(res);\n}\n\ntemplate<> EIGEN_STRONG_INLINE double predux_min<Packet2d>(const Packet2d& a)\n{\n  return pfirst(pmin<Packet2d>(a, reinterpret_cast<Packet2d>(vec_sld(reinterpret_cast<Packet4i>(a), reinterpret_cast<Packet4i>(a), 8))));\n}\n\n// max\ntemplate<> EIGEN_STRONG_INLINE int predux_max<Packet4i>(const Packet4i& a)\n{\n  Packet4i b, res;\n  b = pmax<Packet4i>(a, vec_sld(a, a, 8));\n  res = pmax<Packet4i>(b, vec_sld(b, b, 4));\n  return pfirst(res);\n}\n\n// max\ntemplate<> EIGEN_STRONG_INLINE double predux_max<Packet2d>(const Packet2d& a)\n{\n  return pfirst(pmax<Packet2d>(a, reinterpret_cast<Packet2d>(vec_sld(reinterpret_cast<Packet4i>(a), reinterpret_cast<Packet4i>(a), 8))));\n}\n\nEIGEN_DEVICE_FUNC inline void\nptranspose(PacketBlock<Packet4i,4>& kernel) {\n  Packet4i t0 = vec_mergeh(kernel.packet[0], kernel.packet[2]);\n  Packet4i t1 = vec_mergel(kernel.packet[0], kernel.packet[2]);\n  Packet4i t2 = vec_mergeh(kernel.packet[1], kernel.packet[3]);\n  Packet4i t3 = vec_mergel(kernel.packet[1], kernel.packet[3]);\n  kernel.packet[0] = vec_mergeh(t0, t2);\n  kernel.packet[1] = vec_mergel(t0, t2);\n  kernel.packet[2] = vec_mergeh(t1, t3);\n  kernel.packet[3] = vec_mergel(t1, t3);\n}\n\nEIGEN_DEVICE_FUNC inline void\nptranspose(PacketBlock<Packet2d,2>& kernel) {\n  Packet2d t0 = vec_perm(kernel.packet[0], kernel.packet[1], p16uc_TRANSPOSE64_HI);\n  Packet2d t1 = vec_perm(kernel.packet[0], kernel.packet[1], p16uc_TRANSPOSE64_LO);\n  kernel.packet[0] = t0;\n  kernel.packet[1] = t1;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4i pblend(const Selector<4>& ifPacket, const Packet4i& thenPacket, const Packet4i& elsePacket) {\n  Packet4ui select = { ifPacket.select[0], ifPacket.select[1], ifPacket.select[2], ifPacket.select[3] };\n  Packet4ui mask = vec_cmpeq(select, reinterpret_cast<Packet4ui>(p4i_ONE));\n  return vec_sel(elsePacket, thenPacket, mask);\n}\n\n\ntemplate<> EIGEN_STRONG_INLINE Packet2d pblend(const Selector<2>& ifPacket, const Packet2d& thenPacket, const Packet2d& elsePacket) {\n  Packet2ul select = { ifPacket.select[0], ifPacket.select[1] };\n  Packet2ul mask = vec_cmpeq(select, reinterpret_cast<Packet2ul>(p2l_ONE));\n  return vec_sel(elsePacket, thenPacket, mask);\n}\n\n/* z13 has no vector float support so we emulate that with double\n   z14 has proper vector float support.\n*/\n#if !defined(__ARCH__) || (defined(__ARCH__) && __ARCH__ < 12)\n/* Helper function to simulate a vec_splat_packet4f\n */\ntemplate<int element> EIGEN_STRONG_INLINE Packet4f vec_splat_packet4f(const Packet4f&   from)\n{\n  Packet4f splat;\n  switch (element) {\n  case 0:\n    splat.v4f[0] = vec_splat(from.v4f[0], 0);\n    splat.v4f[1] = splat.v4f[0];\n    break;\n  case 1:\n    splat.v4f[0] = vec_splat(from.v4f[0], 1);\n    splat.v4f[1] = splat.v4f[0];\n    break;\n  case 2:\n    splat.v4f[0] = vec_splat(from.v4f[1], 0);\n    splat.v4f[1] = splat.v4f[0];\n    break;\n  case 3:\n    splat.v4f[0] = vec_splat(from.v4f[1], 1);\n    splat.v4f[1] = splat.v4f[0];\n    break;\n  }\n  return splat;\n}\n\n/* This is a tricky one, we have to translate float alignment to vector elements of sizeof double\n */\ntemplate<int Offset>\nstruct palign_impl<Offset,Packet4f>\n{\n  static EIGEN_STRONG_INLINE void run(Packet4f& first, const Packet4f& second)\n  {\n    switch (Offset % 4) {\n    case 1:\n      first.v4f[0] = vec_sld(first.v4f[0], first.v4f[1], 8);\n      first.v4f[1] = vec_sld(first.v4f[1], second.v4f[0], 8);\n      break;\n    case 2:\n      first.v4f[0] = first.v4f[1];\n      first.v4f[1] = second.v4f[0];\n      break;\n    case 3:\n      first.v4f[0] = vec_sld(first.v4f[1],  second.v4f[0], 8);\n      first.v4f[1] = vec_sld(second.v4f[0], second.v4f[1], 8);\n      break;\n    }\n  }\n};\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pload<Packet4f>(const float*   from)\n{\n  // FIXME: No intrinsic yet\n  EIGEN_DEBUG_ALIGNED_LOAD\n  Packet4f vfrom;\n  vfrom.v4f[0] = vec_ld2f(&from[0]);\n  vfrom.v4f[1] = vec_ld2f(&from[2]);\n  return vfrom;\n}\n\ntemplate<> EIGEN_STRONG_INLINE void pstore<float>(float*   to, const Packet4f& from)\n{\n  // FIXME: No intrinsic yet\n  EIGEN_DEBUG_ALIGNED_STORE\n  vec_st2f(from.v4f[0], &to[0]);\n  vec_st2f(from.v4f[1], &to[2]);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pset1<Packet4f>(const float&    from)\n{\n  Packet4f to;\n  to.v4f[0] = pset1<Packet2d>(static_cast<const double&>(from));\n  to.v4f[1] = to.v4f[0];\n  return to;\n}\n\ntemplate<> EIGEN_STRONG_INLINE void\npbroadcast4<Packet4f>(const float *a,\n                      Packet4f& a0, Packet4f& a1, Packet4f& a2, Packet4f& a3)\n{\n  a3 = pload<Packet4f>(a);\n  a0 = vec_splat_packet4f<0>(a3);\n  a1 = vec_splat_packet4f<1>(a3);\n  a2 = vec_splat_packet4f<2>(a3);\n  a3 = vec_splat_packet4f<3>(a3);\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline Packet4f pgather<float, Packet4f>(const float* from, Index stride)\n{\n  float EIGEN_ALIGN16 ai[4];\n  ai[0] = from[0*stride];\n  ai[1] = from[1*stride];\n  ai[2] = from[2*stride];\n  ai[3] = from[3*stride];\n return pload<Packet4f>(ai);\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<float, Packet4f>(float* to, const Packet4f& from, Index stride)\n{\n  float EIGEN_ALIGN16 ai[4];\n  pstore<float>((float *)ai, from);\n  to[0*stride] = ai[0];\n  to[1*stride] = ai[1];\n  to[2*stride] = ai[2];\n  to[3*stride] = ai[3];\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f padd<Packet4f>(const Packet4f& a, const Packet4f& b)\n{\n  Packet4f c;\n  c.v4f[0] = a.v4f[0] + b.v4f[0];\n  c.v4f[1] = a.v4f[1] + b.v4f[1];\n  return c;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f psub<Packet4f>(const Packet4f& a, const Packet4f& b)\n{\n  Packet4f c;\n  c.v4f[0] = a.v4f[0] - b.v4f[0];\n  c.v4f[1] = a.v4f[1] - b.v4f[1];\n  return c;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pmul<Packet4f>(const Packet4f& a, const Packet4f& b)\n{\n  Packet4f c;\n  c.v4f[0] = a.v4f[0] * b.v4f[0];\n  c.v4f[1] = a.v4f[1] * b.v4f[1];\n  return c;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pdiv<Packet4f>(const Packet4f& a, const Packet4f& b)\n{\n  Packet4f c;\n  c.v4f[0] = a.v4f[0] / b.v4f[0];\n  c.v4f[1] = a.v4f[1] / b.v4f[1];\n  return c;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pnegate(const Packet4f& a)\n{\n  Packet4f c;\n  c.v4f[0] = -a.v4f[0];\n  c.v4f[1] = -a.v4f[1];\n  return c;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pmadd(const Packet4f& a, const Packet4f& b, const Packet4f& c)\n{\n  Packet4f res;\n  res.v4f[0] = vec_madd(a.v4f[0], b.v4f[0], c.v4f[0]);\n  res.v4f[1] = vec_madd(a.v4f[1], b.v4f[1], c.v4f[1]);\n  return res;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pmin<Packet4f>(const Packet4f& a, const Packet4f& b)\n{\n  Packet4f res;\n  res.v4f[0] = pmin(a.v4f[0], b.v4f[0]);\n  res.v4f[1] = pmin(a.v4f[1], b.v4f[1]);\n  return res;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pmax<Packet4f>(const Packet4f& a, const Packet4f& b)\n{\n  Packet4f res;\n  res.v4f[0] = pmax(a.v4f[0], b.v4f[0]);\n  res.v4f[1] = pmax(a.v4f[1], b.v4f[1]);\n  return res;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pand<Packet4f>(const Packet4f& a, const Packet4f& b)\n{\n  Packet4f res;\n  res.v4f[0] = pand(a.v4f[0], b.v4f[0]);\n  res.v4f[1] = pand(a.v4f[1], b.v4f[1]);\n  return res;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f por<Packet4f>(const Packet4f& a, const Packet4f& b)\n{\n  Packet4f res;\n  res.v4f[0] = pand(a.v4f[0], b.v4f[0]);\n  res.v4f[1] = pand(a.v4f[1], b.v4f[1]);\n  return res;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pxor<Packet4f>(const Packet4f& a, const Packet4f& b)\n{\n  Packet4f res;\n  res.v4f[0] = pand(a.v4f[0], b.v4f[0]);\n  res.v4f[1] = pand(a.v4f[1], b.v4f[1]);\n  return res;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pandnot<Packet4f>(const Packet4f& a, const Packet4f& b)\n{\n  Packet4f res;\n  res.v4f[0] = pandnot(a.v4f[0], b.v4f[0]);\n  res.v4f[1] = pandnot(a.v4f[1], b.v4f[1]);\n  return res;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pround<Packet4f>(const Packet4f& a)\n{\n  Packet4f res;\n  res.v4f[0] = vec_round(a.v4f[0]);\n  res.v4f[1] = vec_round(a.v4f[1]);\n  return res;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pceil<Packet4f>(const  Packet4f& a)\n{\n  Packet4f res;\n  res.v4f[0] = vec_ceil(a.v4f[0]);\n  res.v4f[1] = vec_ceil(a.v4f[1]);\n  return res;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pfloor<Packet4f>(const Packet4f& a)\n{\n  Packet4f res;\n  res.v4f[0] = vec_floor(a.v4f[0]);\n  res.v4f[1] = vec_floor(a.v4f[1]);\n  return res;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f ploaddup<Packet4f>(const float*    from)\n{\n  Packet4f p = pload<Packet4f>(from);\n  p.v4f[1] = vec_splat(p.v4f[0], 1);\n  p.v4f[0] = vec_splat(p.v4f[0], 0);\n  return p;\n}\n\ntemplate<> EIGEN_STRONG_INLINE float  pfirst<Packet4f>(const Packet4f& a) { float  EIGEN_ALIGN16 x[2]; vec_st2f(a.v4f[0], &x[0]); return x[0]; }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f preverse(const Packet4f& a)\n{\n  Packet4f rev;\n  rev.v4f[0] = preverse<Packet2d>(a.v4f[1]);\n  rev.v4f[1] = preverse<Packet2d>(a.v4f[0]);\n  return rev;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pabs<Packet4f>(const Packet4f& a)\n{\n  Packet4f res;\n  res.v4f[0] = pabs(a.v4f[0]);\n  res.v4f[1] = pabs(a.v4f[1]);\n  return res;\n}\n\ntemplate<> EIGEN_STRONG_INLINE float predux<Packet4f>(const Packet4f& a)\n{\n  Packet2d sum;\n  sum = padd<Packet2d>(a.v4f[0], a.v4f[1]);\n  double first = predux<Packet2d>(sum);\n  return static_cast<float>(first);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f preduxp<Packet4f>(const Packet4f* vecs)\n{\n  PacketBlock<Packet4f,4> transpose;\n  transpose.packet[0] = vecs[0];\n  transpose.packet[1] = vecs[1];\n  transpose.packet[2] = vecs[2];\n  transpose.packet[3] = vecs[3];\n  ptranspose(transpose);\n\n  Packet4f sum = padd(transpose.packet[0], transpose.packet[1]);\n  sum = padd(sum, transpose.packet[2]);\n  sum = padd(sum, transpose.packet[3]);\n  return sum;\n}\n\ntemplate<> EIGEN_STRONG_INLINE float predux_mul<Packet4f>(const Packet4f& a)\n{\n  // Return predux_mul<Packet2d> of the subvectors product\n  return static_cast<float>(pfirst(predux_mul(pmul(a.v4f[0], a.v4f[1]))));\n}\n\ntemplate<> EIGEN_STRONG_INLINE float predux_min<Packet4f>(const Packet4f& a)\n{\n  Packet2d b, res;\n  b   = pmin<Packet2d>(a.v4f[0], a.v4f[1]);\n  res = pmin<Packet2d>(b, reinterpret_cast<Packet2d>(vec_sld(reinterpret_cast<Packet4i>(b), reinterpret_cast<Packet4i>(b), 8)));\n  return static_cast<float>(pfirst(res));\n}\n\ntemplate<> EIGEN_STRONG_INLINE float predux_max<Packet4f>(const Packet4f& a)\n{\n  Packet2d b, res;\n  b   = pmax<Packet2d>(a.v4f[0], a.v4f[1]);\n  res = pmax<Packet2d>(b, reinterpret_cast<Packet2d>(vec_sld(reinterpret_cast<Packet4i>(b), reinterpret_cast<Packet4i>(b), 8)));\n  return static_cast<float>(pfirst(res));\n}\n\n/* Split the Packet4f PacketBlock into 4 Packet2d PacketBlocks and transpose each one\n */\nEIGEN_DEVICE_FUNC inline void\nptranspose(PacketBlock<Packet4f,4>& kernel) {\n  PacketBlock<Packet2d,2> t0,t1,t2,t3;\n  // copy top-left 2x2 Packet2d block\n  t0.packet[0] = kernel.packet[0].v4f[0];\n  t0.packet[1] = kernel.packet[1].v4f[0];\n\n  // copy top-right 2x2 Packet2d block\n  t1.packet[0] = kernel.packet[0].v4f[1];\n  t1.packet[1] = kernel.packet[1].v4f[1];\n\n  // copy bottom-left 2x2 Packet2d block\n  t2.packet[0] = kernel.packet[2].v4f[0];\n  t2.packet[1] = kernel.packet[3].v4f[0];\n\n  // copy bottom-right 2x2 Packet2d block\n  t3.packet[0] = kernel.packet[2].v4f[1];\n  t3.packet[1] = kernel.packet[3].v4f[1];\n\n  // Transpose all 2x2 blocks\n  ptranspose(t0);\n  ptranspose(t1);\n  ptranspose(t2);\n  ptranspose(t3);\n\n  // Copy back transposed blocks, but exchange t1 and t2 due to transposition\n  kernel.packet[0].v4f[0] = t0.packet[0];\n  kernel.packet[0].v4f[1] = t2.packet[0];\n  kernel.packet[1].v4f[0] = t0.packet[1];\n  kernel.packet[1].v4f[1] = t2.packet[1];\n  kernel.packet[2].v4f[0] = t1.packet[0];\n  kernel.packet[2].v4f[1] = t3.packet[0];\n  kernel.packet[3].v4f[0] = t1.packet[1];\n  kernel.packet[3].v4f[1] = t3.packet[1];\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pblend(const Selector<4>& ifPacket, const Packet4f& thenPacket, const Packet4f& elsePacket) {\n  Packet2ul select_hi = { ifPacket.select[0], ifPacket.select[1] };\n  Packet2ul select_lo = { ifPacket.select[2], ifPacket.select[3] };\n  Packet2ul mask_hi = vec_cmpeq(select_hi, reinterpret_cast<Packet2ul>(p2l_ONE));\n  Packet2ul mask_lo = vec_cmpeq(select_lo, reinterpret_cast<Packet2ul>(p2l_ONE));\n  Packet4f result;\n  result.v4f[0] = vec_sel(elsePacket.v4f[0], thenPacket.v4f[0], mask_hi);\n  result.v4f[1] = vec_sel(elsePacket.v4f[1], thenPacket.v4f[1], mask_lo);\n  return result;\n}\n#else\ntemplate<int Offset>\nstruct palign_impl<Offset,Packet4f>\n{\n  static EIGEN_STRONG_INLINE void run(Packet4f& first, const Packet4f& second)\n  {\n    switch (Offset % 4) {\n    case 1:\n      first = vec_sld(first, second, 4); break;\n    case 2:\n      first = vec_sld(first, second, 8); break;\n    case 3:\n      first = vec_sld(first, second, 12); break;\n    }\n  }\n};\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pload<Packet4f>(const float* from)\n{\n  // FIXME: No intrinsic yet\n  EIGEN_DEBUG_ALIGNED_LOAD\n  Packet *vfrom;\n  vfrom = (Packet *) from;\n  return vfrom->v4f;\n}\n\ntemplate<> EIGEN_STRONG_INLINE void pstore<float>(float* to, const Packet4f& from)\n{\n  // FIXME: No intrinsic yet\n  EIGEN_DEBUG_ALIGNED_STORE\n  Packet *vto;\n  vto = (Packet *) to;\n  vto->v4f = from;\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pset1<Packet4f>(const float& from)\n{\n  return vec_splats(from);\n}\n\ntemplate<> EIGEN_STRONG_INLINE void\npbroadcast4<Packet4f>(const float *a,\n                      Packet4f& a0, Packet4f& a1, Packet4f& a2, Packet4f& a3)\n{\n  a3 = pload<Packet4f>(a);\n  a0 = vec_splat(a3, 0);\n  a1 = vec_splat(a3, 1);\n  a2 = vec_splat(a3, 2);\n  a3 = vec_splat(a3, 3);\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline Packet4f pgather<float, Packet4f>(const float* from, Index stride)\n{\n  float EIGEN_ALIGN16 af[4];\n  af[0] = from[0*stride];\n  af[1] = from[1*stride];\n  af[2] = from[2*stride];\n  af[3] = from[3*stride];\n return pload<Packet4f>(af);\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline void pscatter<float, Packet4f>(float* to, const Packet4f& from, Index stride)\n{\n  float EIGEN_ALIGN16 af[4];\n  pstore<float>((float*)af, from);\n  to[0*stride] = af[0];\n  to[1*stride] = af[1];\n  to[2*stride] = af[2];\n  to[3*stride] = af[3];\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f padd<Packet4f>(const Packet4f& a, const Packet4f& b) { return (a + b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f psub<Packet4f>(const Packet4f& a, const Packet4f& b) { return (a - b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pmul<Packet4f>(const Packet4f& a, const Packet4f& b) { return (a * b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pdiv<Packet4f>(const Packet4f& a, const Packet4f& b) { return (a / b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pnegate<Packet4f>(const Packet4f& a) { return (-a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pconj<Packet4f>  (const Packet4f& a) { return a; }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pmadd<Packet4f>  (const Packet4f& a, const Packet4f& b, const Packet4f& c) { return vec_madd(a, b, c); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pmin<Packet4f>   (const Packet4f& a, const Packet4f& b) { return vec_min(a, b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pmax<Packet4f>   (const Packet4f& a, const Packet4f& b) { return vec_max(a, b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pand<Packet4f>   (const Packet4f& a, const Packet4f& b) { return vec_and(a, b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f por<Packet4f>    (const Packet4f& a, const Packet4f& b) { return vec_or(a, b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pxor<Packet4f>   (const Packet4f& a, const Packet4f& b) { return vec_xor(a, b); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pandnot<Packet4f>(const Packet4f& a, const Packet4f& b) { return vec_and(a, vec_nor(b, b)); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pround<Packet4f> (const Packet4f& a) { return vec_round(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pceil<Packet4f>  (const Packet4f& a) { return vec_ceil(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pfloor<Packet4f> (const Packet4f& a) { return vec_floor(a); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f pabs<Packet4f>   (const Packet4f& a) { return vec_abs(a); }\ntemplate<> EIGEN_STRONG_INLINE float pfirst<Packet4f>(const Packet4f& a) { float EIGEN_ALIGN16 x[4]; pstore(x, a); return x[0]; }\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f ploaddup<Packet4f>(const float* from)\n{\n  Packet4f p = pload<Packet4f>(from);\n  return vec_perm(p, p, p16uc_DUPLICATE32_HI);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f preverse(const Packet4f& a)\n{\n  return reinterpret_cast<Packet4f>(vec_perm(reinterpret_cast<Packet16uc>(a), reinterpret_cast<Packet16uc>(a), p16uc_REVERSE32));\n}\n\ntemplate<> EIGEN_STRONG_INLINE float predux<Packet4f>(const Packet4f& a)\n{\n  Packet4f b, sum;\n  b   = vec_sld(a, a, 8);\n  sum = padd<Packet4f>(a, b);\n  b   = vec_sld(sum, sum, 4);\n  sum = padd<Packet4f>(sum, b);\n  return pfirst(sum);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f preduxp<Packet4f>(const Packet4f* vecs)\n{\n  Packet4f v[4], sum[4];\n\n  // It's easier and faster to transpose then add as columns\n  // Check: http://www.freevec.org/function/matrix_4x4_transpose_floats for explanation\n  // Do the transpose, first set of moves\n  v[0] = vec_mergeh(vecs[0], vecs[2]);\n  v[1] = vec_mergel(vecs[0], vecs[2]);\n  v[2] = vec_mergeh(vecs[1], vecs[3]);\n  v[3] = vec_mergel(vecs[1], vecs[3]);\n  // Get the resulting vectors\n  sum[0] = vec_mergeh(v[0], v[2]);\n  sum[1] = vec_mergel(v[0], v[2]);\n  sum[2] = vec_mergeh(v[1], v[3]);\n  sum[3] = vec_mergel(v[1], v[3]);\n\n  // Now do the summation:\n  // Lines 0+1\n  sum[0] = padd<Packet4f>(sum[0], sum[1]);\n  // Lines 2+3\n  sum[1] = padd<Packet4f>(sum[2], sum[3]);\n  // Add the results\n  sum[0] = padd<Packet4f>(sum[0], sum[1]);\n\n  return sum[0];\n}\n\n// Other reduction functions:\n// mul\ntemplate<> EIGEN_STRONG_INLINE float predux_mul<Packet4f>(const Packet4f& a)\n{\n  Packet4f prod;\n  prod = pmul(a, vec_sld(a, a, 8));\n  return pfirst(pmul(prod, vec_sld(prod, prod, 4)));\n}\n\n// min\ntemplate<> EIGEN_STRONG_INLINE float predux_min<Packet4f>(const Packet4f& a)\n{\n  Packet4f b, res;\n  b   = pmin<Packet4f>(a, vec_sld(a, a, 8));\n  res = pmin<Packet4f>(b, vec_sld(b, b, 4));\n  return pfirst(res);\n}\n\n// max\ntemplate<> EIGEN_STRONG_INLINE float predux_max<Packet4f>(const Packet4f& a)\n{\n  Packet4f b, res;\n  b = pmax<Packet4f>(a, vec_sld(a, a, 8));\n  res = pmax<Packet4f>(b, vec_sld(b, b, 4));\n  return pfirst(res);\n}\n\nEIGEN_DEVICE_FUNC inline void\nptranspose(PacketBlock<Packet4f,4>& kernel) {\n  Packet4f t0 = vec_mergeh(kernel.packet[0], kernel.packet[2]);\n  Packet4f t1 = vec_mergel(kernel.packet[0], kernel.packet[2]);\n  Packet4f t2 = vec_mergeh(kernel.packet[1], kernel.packet[3]);\n  Packet4f t3 = vec_mergel(kernel.packet[1], kernel.packet[3]);\n  kernel.packet[0] = vec_mergeh(t0, t2);\n  kernel.packet[1] = vec_mergel(t0, t2);\n  kernel.packet[2] = vec_mergeh(t1, t3);\n  kernel.packet[3] = vec_mergel(t1, t3);\n}\n\ntemplate<> EIGEN_STRONG_INLINE Packet4f pblend(const Selector<4>& ifPacket, const Packet4f& thenPacket, const Packet4f& elsePacket) {\n  Packet4ui select = { ifPacket.select[0], ifPacket.select[1], ifPacket.select[2], ifPacket.select[3] };\n  Packet4ui mask = vec_cmpeq(select, reinterpret_cast<Packet4ui>(p4i_ONE));\n  return vec_sel(elsePacket, thenPacket, mask);\n}\n\n#endif\n\ntemplate<> EIGEN_STRONG_INLINE void prefetch<float>(const float*   addr) { EIGEN_ZVECTOR_PREFETCH(addr); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f ploadu<Packet4f> (const float* from) { return pload<Packet4f>(from); }\ntemplate<> EIGEN_STRONG_INLINE void pstoreu<float>(float* to, const Packet4f& from) { pstore<float>(to, from); }\ntemplate<> EIGEN_STRONG_INLINE Packet4f plset<Packet4f>  (const float& a)  { return padd<Packet4f>(pset1<Packet4f>(a), p4f_COUNTDOWN); }\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_PACKET_MATH_ZVECTOR_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/functors/AssignmentFunctors.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_ASSIGNMENT_FUNCTORS_H\n#define EIGEN_ASSIGNMENT_FUNCTORS_H\n\nnamespace Eigen {\n\nnamespace internal {\n  \n/** \\internal\n  * \\brief Template functor for scalar/packet assignment\n  *\n  */\ntemplate<typename DstScalar,typename SrcScalar> struct assign_op {\n\n  EIGEN_EMPTY_STRUCT_CTOR(assign_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void assignCoeff(DstScalar& a, const SrcScalar& b) const { a = b; }\n  \n  template<int Alignment, typename Packet>\n  EIGEN_STRONG_INLINE void assignPacket(DstScalar* a, const Packet& b) const\n  { internal::pstoret<DstScalar,Packet,Alignment>(a,b); }\n};\n\n// Empty overload for void type (used by PermutationMatrix)\ntemplate<typename DstScalar> struct assign_op<DstScalar,void> {};\n\ntemplate<typename DstScalar,typename SrcScalar>\nstruct functor_traits<assign_op<DstScalar,SrcScalar> > {\n  enum {\n    Cost = NumTraits<DstScalar>::ReadCost,\n    PacketAccess = is_same<DstScalar,SrcScalar>::value && packet_traits<DstScalar>::Vectorizable && packet_traits<SrcScalar>::Vectorizable\n  };\n};\n\n/** \\internal\n  * \\brief Template functor for scalar/packet assignment with addition\n  *\n  */\ntemplate<typename DstScalar,typename SrcScalar> struct add_assign_op {\n\n  EIGEN_EMPTY_STRUCT_CTOR(add_assign_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void assignCoeff(DstScalar& a, const SrcScalar& b) const { a += b; }\n  \n  template<int Alignment, typename Packet>\n  EIGEN_STRONG_INLINE void assignPacket(DstScalar* a, const Packet& b) const\n  { internal::pstoret<DstScalar,Packet,Alignment>(a,internal::padd(internal::ploadt<Packet,Alignment>(a),b)); }\n};\ntemplate<typename DstScalar,typename SrcScalar>\nstruct functor_traits<add_assign_op<DstScalar,SrcScalar> > {\n  enum {\n    Cost = NumTraits<DstScalar>::ReadCost + NumTraits<DstScalar>::AddCost,\n    PacketAccess = is_same<DstScalar,SrcScalar>::value && packet_traits<DstScalar>::HasAdd\n  };\n};\n\n/** \\internal\n  * \\brief Template functor for scalar/packet assignment with subtraction\n  *\n  */\ntemplate<typename DstScalar,typename SrcScalar> struct sub_assign_op {\n\n  EIGEN_EMPTY_STRUCT_CTOR(sub_assign_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void assignCoeff(DstScalar& a, const SrcScalar& b) const { a -= b; }\n  \n  template<int Alignment, typename Packet>\n  EIGEN_STRONG_INLINE void assignPacket(DstScalar* a, const Packet& b) const\n  { internal::pstoret<DstScalar,Packet,Alignment>(a,internal::psub(internal::ploadt<Packet,Alignment>(a),b)); }\n};\ntemplate<typename DstScalar,typename SrcScalar>\nstruct functor_traits<sub_assign_op<DstScalar,SrcScalar> > {\n  enum {\n    Cost = NumTraits<DstScalar>::ReadCost + NumTraits<DstScalar>::AddCost,\n    PacketAccess = is_same<DstScalar,SrcScalar>::value && packet_traits<DstScalar>::HasSub\n  };\n};\n\n/** \\internal\n  * \\brief Template functor for scalar/packet assignment with multiplication\n  *\n  */\ntemplate<typename DstScalar, typename SrcScalar=DstScalar>\nstruct mul_assign_op {\n\n  EIGEN_EMPTY_STRUCT_CTOR(mul_assign_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void assignCoeff(DstScalar& a, const SrcScalar& b) const { a *= b; }\n  \n  template<int Alignment, typename Packet>\n  EIGEN_STRONG_INLINE void assignPacket(DstScalar* a, const Packet& b) const\n  { internal::pstoret<DstScalar,Packet,Alignment>(a,internal::pmul(internal::ploadt<Packet,Alignment>(a),b)); }\n};\ntemplate<typename DstScalar, typename SrcScalar>\nstruct functor_traits<mul_assign_op<DstScalar,SrcScalar> > {\n  enum {\n    Cost = NumTraits<DstScalar>::ReadCost + NumTraits<DstScalar>::MulCost,\n    PacketAccess = is_same<DstScalar,SrcScalar>::value && packet_traits<DstScalar>::HasMul\n  };\n};\n\n/** \\internal\n  * \\brief Template functor for scalar/packet assignment with diviving\n  *\n  */\ntemplate<typename DstScalar, typename SrcScalar=DstScalar> struct div_assign_op {\n\n  EIGEN_EMPTY_STRUCT_CTOR(div_assign_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void assignCoeff(DstScalar& a, const SrcScalar& b) const { a /= b; }\n  \n  template<int Alignment, typename Packet>\n  EIGEN_STRONG_INLINE void assignPacket(DstScalar* a, const Packet& b) const\n  { internal::pstoret<DstScalar,Packet,Alignment>(a,internal::pdiv(internal::ploadt<Packet,Alignment>(a),b)); }\n};\ntemplate<typename DstScalar, typename SrcScalar>\nstruct functor_traits<div_assign_op<DstScalar,SrcScalar> > {\n  enum {\n    Cost = NumTraits<DstScalar>::ReadCost + NumTraits<DstScalar>::MulCost,\n    PacketAccess = is_same<DstScalar,SrcScalar>::value && packet_traits<DstScalar>::HasDiv\n  };\n};\n\n/** \\internal\n  * \\brief Template functor for scalar/packet assignment with swapping\n  *\n  * It works as follow. For a non-vectorized evaluation loop, we have:\n  *   for(i) func(A.coeffRef(i), B.coeff(i));\n  * where B is a SwapWrapper expression. The trick is to make SwapWrapper::coeff behaves like a non-const coeffRef.\n  * Actually, SwapWrapper might not even be needed since even if B is a plain expression, since it has to be writable\n  * B.coeff already returns a const reference to the underlying scalar value.\n  * \n  * The case of a vectorized loop is more tricky:\n  *   for(i,j) func.assignPacket<A_Align>(&A.coeffRef(i,j), B.packet<B_Align>(i,j));\n  * Here, B must be a SwapWrapper whose packet function actually returns a proxy object holding a Scalar*,\n  * the actual alignment and Packet type.\n  *\n  */\ntemplate<typename Scalar> struct swap_assign_op {\n\n  EIGEN_EMPTY_STRUCT_CTOR(swap_assign_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void assignCoeff(Scalar& a, const Scalar& b) const\n  {\n#ifdef EIGEN_GPUCC\n    // FIXME is there some kind of cuda::swap?\n    Scalar t=b; const_cast<Scalar&>(b)=a; a=t;\n#else\n    using std::swap;\n    swap(a,const_cast<Scalar&>(b));\n#endif\n  }\n};\ntemplate<typename Scalar>\nstruct functor_traits<swap_assign_op<Scalar> > {\n  enum {\n    Cost = 3 * NumTraits<Scalar>::ReadCost,\n    PacketAccess = \n    #if defined(EIGEN_VECTORIZE_AVX) && EIGEN_COMP_CLANG && (EIGEN_COMP_CLANG<800 || defined(__apple_build_version__))\n    // This is a partial workaround for a bug in clang generating bad code\n    // when mixing 256/512 bits loads and 128 bits moves.\n    // See http://eigen.tuxfamily.org/bz/show_bug.cgi?id=1684\n    //     https://bugs.llvm.org/show_bug.cgi?id=40815\n    0\n    #else\n    packet_traits<Scalar>::Vectorizable\n    #endif\n  };\n};\n\n} // namespace internal\n\n} // namespace Eigen\n\n#endif // EIGEN_ASSIGNMENT_FUNCTORS_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/functors/BinaryFunctors.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_BINARY_FUNCTORS_H\n#define EIGEN_BINARY_FUNCTORS_H\n\nnamespace Eigen {\n\nnamespace internal {\n\n//---------- associative binary functors ----------\n\ntemplate<typename Arg1, typename Arg2>\nstruct binary_op_base\n{\n  typedef Arg1 first_argument_type;\n  typedef Arg2 second_argument_type;\n};\n\n/** \\internal\n  * \\brief Template functor to compute the sum of two scalars\n  *\n  * \\sa class CwiseBinaryOp, MatrixBase::operator+, class VectorwiseOp, DenseBase::sum()\n  */\ntemplate<typename LhsScalar,typename RhsScalar>\nstruct scalar_sum_op : binary_op_base<LhsScalar,RhsScalar>\n{\n  typedef typename ScalarBinaryOpTraits<LhsScalar,RhsScalar,scalar_sum_op>::ReturnType result_type;\n#ifndef EIGEN_SCALAR_BINARY_OP_PLUGIN\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_sum_op)\n#else\n  scalar_sum_op() {\n    EIGEN_SCALAR_BINARY_OP_PLUGIN\n  }\n#endif\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type operator() (const LhsScalar& a, const RhsScalar& b) const { return a + b; }\n  template<typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a, const Packet& b) const\n  { return internal::padd(a,b); }\n  template<typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type predux(const Packet& a) const\n  { return internal::predux(a); }\n};\ntemplate<typename LhsScalar,typename RhsScalar>\nstruct functor_traits<scalar_sum_op<LhsScalar,RhsScalar> > {\n  enum {\n    Cost = (NumTraits<LhsScalar>::AddCost+NumTraits<RhsScalar>::AddCost)/2, // rough estimate!\n    PacketAccess = is_same<LhsScalar,RhsScalar>::value && packet_traits<LhsScalar>::HasAdd && packet_traits<RhsScalar>::HasAdd\n    // TODO vectorize mixed sum\n  };\n};\n\n/** \\internal\n  * \\brief Template specialization to deprecate the summation of boolean expressions.\n  * This is required to solve Bug 426.\n  * \\sa DenseBase::count(), DenseBase::any(), ArrayBase::cast(), MatrixBase::cast()\n  */\ntemplate<> struct scalar_sum_op<bool,bool> : scalar_sum_op<int,int> {\n  EIGEN_DEPRECATED\n  scalar_sum_op() {}\n};\n\n\n/** \\internal\n  * \\brief Template functor to compute the product of two scalars\n  *\n  * \\sa class CwiseBinaryOp, Cwise::operator*(), class VectorwiseOp, MatrixBase::redux()\n  */\ntemplate<typename LhsScalar,typename RhsScalar>\nstruct scalar_product_op  : binary_op_base<LhsScalar,RhsScalar>\n{\n  typedef typename ScalarBinaryOpTraits<LhsScalar,RhsScalar,scalar_product_op>::ReturnType result_type;\n#ifndef EIGEN_SCALAR_BINARY_OP_PLUGIN\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_product_op)\n#else\n  scalar_product_op() {\n    EIGEN_SCALAR_BINARY_OP_PLUGIN\n  }\n#endif\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type operator() (const LhsScalar& a, const RhsScalar& b) const { return a * b; }\n  template<typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a, const Packet& b) const\n  { return internal::pmul(a,b); }\n  template<typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type predux(const Packet& a) const\n  { return internal::predux_mul(a); }\n};\ntemplate<typename LhsScalar,typename RhsScalar>\nstruct functor_traits<scalar_product_op<LhsScalar,RhsScalar> > {\n  enum {\n    Cost = (NumTraits<LhsScalar>::MulCost + NumTraits<RhsScalar>::MulCost)/2, // rough estimate!\n    PacketAccess = is_same<LhsScalar,RhsScalar>::value && packet_traits<LhsScalar>::HasMul && packet_traits<RhsScalar>::HasMul\n    // TODO vectorize mixed product\n  };\n};\n\n/** \\internal\n  * \\brief Template functor to compute the conjugate product of two scalars\n  *\n  * This is a short cut for conj(x) * y which is needed for optimization purpose; in Eigen2 support mode, this becomes x * conj(y)\n  */\ntemplate<typename LhsScalar,typename RhsScalar>\nstruct scalar_conj_product_op  : binary_op_base<LhsScalar,RhsScalar>\n{\n\n  enum {\n    Conj = NumTraits<LhsScalar>::IsComplex\n  };\n  \n  typedef typename ScalarBinaryOpTraits<LhsScalar,RhsScalar,scalar_conj_product_op>::ReturnType result_type;\n  \n  EIGEN_EMPTY_STRUCT_CTOR(scalar_conj_product_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type operator() (const LhsScalar& a, const RhsScalar& b) const\n  { return conj_helper<LhsScalar,RhsScalar,Conj,false>().pmul(a,b); }\n  \n  template<typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a, const Packet& b) const\n  { return conj_helper<Packet,Packet,Conj,false>().pmul(a,b); }\n};\ntemplate<typename LhsScalar,typename RhsScalar>\nstruct functor_traits<scalar_conj_product_op<LhsScalar,RhsScalar> > {\n  enum {\n    Cost = NumTraits<LhsScalar>::MulCost,\n    PacketAccess = internal::is_same<LhsScalar, RhsScalar>::value && packet_traits<LhsScalar>::HasMul\n  };\n};\n\n/** \\internal\n  * \\brief Template functor to compute the min of two scalars\n  *\n  * \\sa class CwiseBinaryOp, MatrixBase::cwiseMin, class VectorwiseOp, MatrixBase::minCoeff()\n  */\ntemplate<typename LhsScalar,typename RhsScalar>\nstruct scalar_min_op : binary_op_base<LhsScalar,RhsScalar>\n{\n  typedef typename ScalarBinaryOpTraits<LhsScalar,RhsScalar,scalar_min_op>::ReturnType result_type;\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_min_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type operator() (const LhsScalar& a, const RhsScalar& b) const { return numext::mini(a, b); }\n  template<typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a, const Packet& b) const\n  { return internal::pmin(a,b); }\n  template<typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type predux(const Packet& a) const\n  { return internal::predux_min(a); }\n};\ntemplate<typename LhsScalar,typename RhsScalar>\nstruct functor_traits<scalar_min_op<LhsScalar,RhsScalar> > {\n  enum {\n    Cost = (NumTraits<LhsScalar>::AddCost+NumTraits<RhsScalar>::AddCost)/2,\n    PacketAccess = internal::is_same<LhsScalar, RhsScalar>::value && packet_traits<LhsScalar>::HasMin\n  };\n};\n\n/** \\internal\n  * \\brief Template functor to compute the max of two scalars\n  *\n  * \\sa class CwiseBinaryOp, MatrixBase::cwiseMax, class VectorwiseOp, MatrixBase::maxCoeff()\n  */\ntemplate<typename LhsScalar,typename RhsScalar>\nstruct scalar_max_op  : binary_op_base<LhsScalar,RhsScalar>\n{\n  typedef typename ScalarBinaryOpTraits<LhsScalar,RhsScalar,scalar_max_op>::ReturnType result_type;\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_max_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type operator() (const LhsScalar& a, const RhsScalar& b) const { return numext::maxi(a, b); }\n  template<typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a, const Packet& b) const\n  { return internal::pmax(a,b); }\n  template<typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type predux(const Packet& a) const\n  { return internal::predux_max(a); }\n};\ntemplate<typename LhsScalar,typename RhsScalar>\nstruct functor_traits<scalar_max_op<LhsScalar,RhsScalar> > {\n  enum {\n    Cost = (NumTraits<LhsScalar>::AddCost+NumTraits<RhsScalar>::AddCost)/2,\n    PacketAccess = internal::is_same<LhsScalar, RhsScalar>::value && packet_traits<LhsScalar>::HasMax\n  };\n};\n\n/** \\internal\n  * \\brief Template functors for comparison of two scalars\n  * \\todo Implement packet-comparisons\n  */\ntemplate<typename LhsScalar, typename RhsScalar, ComparisonName cmp> struct scalar_cmp_op;\n\ntemplate<typename LhsScalar, typename RhsScalar, ComparisonName cmp>\nstruct functor_traits<scalar_cmp_op<LhsScalar,RhsScalar, cmp> > {\n  enum {\n    Cost = (NumTraits<LhsScalar>::AddCost+NumTraits<RhsScalar>::AddCost)/2,\n    PacketAccess = false\n  };\n};\n\ntemplate<ComparisonName Cmp, typename LhsScalar, typename RhsScalar>\nstruct result_of<scalar_cmp_op<LhsScalar, RhsScalar, Cmp>(LhsScalar,RhsScalar)> {\n  typedef bool type;\n};\n\n\ntemplate<typename LhsScalar, typename RhsScalar>\nstruct scalar_cmp_op<LhsScalar,RhsScalar, cmp_EQ> : binary_op_base<LhsScalar,RhsScalar>\n{\n  typedef bool result_type;\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_cmp_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator()(const LhsScalar& a, const RhsScalar& b) const {return a==b;}\n};\ntemplate<typename LhsScalar, typename RhsScalar>\nstruct scalar_cmp_op<LhsScalar,RhsScalar, cmp_LT> : binary_op_base<LhsScalar,RhsScalar>\n{\n  typedef bool result_type;\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_cmp_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator()(const LhsScalar& a, const RhsScalar& b) const {return a<b;}\n};\ntemplate<typename LhsScalar, typename RhsScalar>\nstruct scalar_cmp_op<LhsScalar,RhsScalar, cmp_LE> : binary_op_base<LhsScalar,RhsScalar>\n{\n  typedef bool result_type;\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_cmp_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator()(const LhsScalar& a, const RhsScalar& b) const {return a<=b;}\n};\ntemplate<typename LhsScalar, typename RhsScalar>\nstruct scalar_cmp_op<LhsScalar,RhsScalar, cmp_GT> : binary_op_base<LhsScalar,RhsScalar>\n{\n  typedef bool result_type;\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_cmp_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator()(const LhsScalar& a, const RhsScalar& b) const {return a>b;}\n};\ntemplate<typename LhsScalar, typename RhsScalar>\nstruct scalar_cmp_op<LhsScalar,RhsScalar, cmp_GE> : binary_op_base<LhsScalar,RhsScalar>\n{\n  typedef bool result_type;\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_cmp_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator()(const LhsScalar& a, const RhsScalar& b) const {return a>=b;}\n};\ntemplate<typename LhsScalar, typename RhsScalar>\nstruct scalar_cmp_op<LhsScalar,RhsScalar, cmp_UNORD> : binary_op_base<LhsScalar,RhsScalar>\n{\n  typedef bool result_type;\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_cmp_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator()(const LhsScalar& a, const RhsScalar& b) const {return !(a<=b || b<=a);}\n};\ntemplate<typename LhsScalar, typename RhsScalar>\nstruct scalar_cmp_op<LhsScalar,RhsScalar, cmp_NEQ> : binary_op_base<LhsScalar,RhsScalar>\n{\n  typedef bool result_type;\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_cmp_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator()(const LhsScalar& a, const RhsScalar& b) const {return a!=b;}\n};\n\n\n/** \\internal\n  * \\brief Template functor to compute the hypot of two \\b positive \\b and \\b real scalars\n  *\n  * \\sa MatrixBase::stableNorm(), class Redux\n  */\ntemplate<typename Scalar>\nstruct scalar_hypot_op<Scalar,Scalar> : binary_op_base<Scalar,Scalar>\n{\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_hypot_op)\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (const Scalar &x, const Scalar &y) const\n  {\n    // This functor is used by hypotNorm only for which it is faster to first apply abs\n    // on all coefficients prior to reduction through hypot.\n    // This way we avoid calling abs on positive and real entries, and this also permits\n    // to seamlessly handle complexes. Otherwise we would have to handle both real and complexes\n    // through the same functor...\n    return internal::positive_real_hypot(x,y);\n  }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_hypot_op<Scalar,Scalar> > {\n  enum\n  {\n    Cost = 3 * NumTraits<Scalar>::AddCost +\n           2 * NumTraits<Scalar>::MulCost +\n           2 * scalar_div_cost<Scalar,false>::value,\n    PacketAccess = false\n  };\n};\n\n/** \\internal\n  * \\brief Template functor to compute the pow of two scalars\n  */\ntemplate<typename Scalar, typename Exponent>\nstruct scalar_pow_op  : binary_op_base<Scalar,Exponent>\n{\n  typedef typename ScalarBinaryOpTraits<Scalar,Exponent,scalar_pow_op>::ReturnType result_type;\n#ifndef EIGEN_SCALAR_BINARY_OP_PLUGIN\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_pow_op)\n#else\n  scalar_pow_op() {\n    typedef Scalar LhsScalar;\n    typedef Exponent RhsScalar;\n    EIGEN_SCALAR_BINARY_OP_PLUGIN\n  }\n#endif\n  EIGEN_DEVICE_FUNC\n  inline result_type operator() (const Scalar& a, const Exponent& b) const { return numext::pow(a, b); }\n};\ntemplate<typename Scalar, typename Exponent>\nstruct functor_traits<scalar_pow_op<Scalar,Exponent> > {\n  enum { Cost = 5 * NumTraits<Scalar>::MulCost, PacketAccess = false };\n};\n\n\n\n//---------- non associative binary functors ----------\n\n/** \\internal\n  * \\brief Template functor to compute the difference of two scalars\n  *\n  * \\sa class CwiseBinaryOp, MatrixBase::operator-\n  */\ntemplate<typename LhsScalar,typename RhsScalar>\nstruct scalar_difference_op : binary_op_base<LhsScalar,RhsScalar>\n{\n  typedef typename ScalarBinaryOpTraits<LhsScalar,RhsScalar,scalar_difference_op>::ReturnType result_type;\n#ifndef EIGEN_SCALAR_BINARY_OP_PLUGIN\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_difference_op)\n#else\n  scalar_difference_op() {\n    EIGEN_SCALAR_BINARY_OP_PLUGIN\n  }\n#endif\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type operator() (const LhsScalar& a, const RhsScalar& b) const { return a - b; }\n  template<typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a, const Packet& b) const\n  { return internal::psub(a,b); }\n};\ntemplate<typename LhsScalar,typename RhsScalar>\nstruct functor_traits<scalar_difference_op<LhsScalar,RhsScalar> > {\n  enum {\n    Cost = (NumTraits<LhsScalar>::AddCost+NumTraits<RhsScalar>::AddCost)/2,\n    PacketAccess = is_same<LhsScalar,RhsScalar>::value && packet_traits<LhsScalar>::HasSub && packet_traits<RhsScalar>::HasSub\n  };\n};\n\n/** \\internal\n  * \\brief Template functor to compute the quotient of two scalars\n  *\n  * \\sa class CwiseBinaryOp, Cwise::operator/()\n  */\ntemplate<typename LhsScalar,typename RhsScalar>\nstruct scalar_quotient_op  : binary_op_base<LhsScalar,RhsScalar>\n{\n  typedef typename ScalarBinaryOpTraits<LhsScalar,RhsScalar,scalar_quotient_op>::ReturnType result_type;\n#ifndef EIGEN_SCALAR_BINARY_OP_PLUGIN\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_quotient_op)\n#else\n  scalar_quotient_op() {\n    EIGEN_SCALAR_BINARY_OP_PLUGIN\n  }\n#endif\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type operator() (const LhsScalar& a, const RhsScalar& b) const { return a / b; }\n  template<typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a, const Packet& b) const\n  { return internal::pdiv(a,b); }\n};\ntemplate<typename LhsScalar,typename RhsScalar>\nstruct functor_traits<scalar_quotient_op<LhsScalar,RhsScalar> > {\n  typedef typename scalar_quotient_op<LhsScalar,RhsScalar>::result_type result_type;\n  enum {\n    PacketAccess = is_same<LhsScalar,RhsScalar>::value && packet_traits<LhsScalar>::HasDiv && packet_traits<RhsScalar>::HasDiv,\n    Cost = scalar_div_cost<result_type,PacketAccess>::value\n  };\n};\n\n\n\n/** \\internal\n  * \\brief Template functor to compute the and of two booleans\n  *\n  * \\sa class CwiseBinaryOp, ArrayBase::operator&&\n  */\nstruct scalar_boolean_and_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_boolean_and_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator() (const bool& a, const bool& b) const { return a && b; }\n  template<typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a, const Packet& b) const\n  { return internal::pand(a,b); }\n};\ntemplate<> struct functor_traits<scalar_boolean_and_op> {\n  enum {\n    Cost = NumTraits<bool>::AddCost,\n    PacketAccess = true\n  };\n};\n\n/** \\internal\n  * \\brief Template functor to compute the or of two booleans\n  *\n  * \\sa class CwiseBinaryOp, ArrayBase::operator||\n  */\nstruct scalar_boolean_or_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_boolean_or_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator() (const bool& a, const bool& b) const { return a || b; }\n  template<typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a, const Packet& b) const\n  { return internal::por(a,b); }\n};\ntemplate<> struct functor_traits<scalar_boolean_or_op> {\n  enum {\n    Cost = NumTraits<bool>::AddCost,\n    PacketAccess = true\n  };\n};\n\n/** \\internal\n * \\brief Template functor to compute the xor of two booleans\n *\n * \\sa class CwiseBinaryOp, ArrayBase::operator^\n */\nstruct scalar_boolean_xor_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_boolean_xor_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator() (const bool& a, const bool& b) const { return a ^ b; }\n  template<typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a, const Packet& b) const\n  { return internal::pxor(a,b); }\n};\ntemplate<> struct functor_traits<scalar_boolean_xor_op> {\n  enum {\n    Cost = NumTraits<bool>::AddCost,\n    PacketAccess = true\n  };\n};\n\n/** \\internal\n  * \\brief Template functor to compute the absolute difference of two scalars\n  *\n  * \\sa class CwiseBinaryOp, MatrixBase::absolute_difference\n  */\ntemplate<typename LhsScalar,typename RhsScalar>\nstruct scalar_absolute_difference_op : binary_op_base<LhsScalar,RhsScalar>\n{\n  typedef typename ScalarBinaryOpTraits<LhsScalar,RhsScalar,scalar_absolute_difference_op>::ReturnType result_type;\n#ifndef EIGEN_SCALAR_BINARY_OP_PLUGIN\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_absolute_difference_op)\n#else\n  scalar_absolute_difference_op() {\n    EIGEN_SCALAR_BINARY_OP_PLUGIN\n  }\n#endif\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type operator() (const LhsScalar& a, const RhsScalar& b) const\n  { return numext::absdiff(a,b); }\n  template<typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a, const Packet& b) const\n  { return internal::pabsdiff(a,b); }\n};\ntemplate<typename LhsScalar,typename RhsScalar>\nstruct functor_traits<scalar_absolute_difference_op<LhsScalar,RhsScalar> > {\n  enum {\n    Cost = (NumTraits<LhsScalar>::AddCost+NumTraits<RhsScalar>::AddCost)/2,\n    PacketAccess = is_same<LhsScalar,RhsScalar>::value && packet_traits<LhsScalar>::HasAbsDiff\n  };\n};\n\n\n\n//---------- binary functors bound to a constant, thus appearing as a unary functor ----------\n\n// The following two classes permits to turn any binary functor into a unary one with one argument bound to a constant value.\n// They are analogues to std::binder1st/binder2nd but with the following differences:\n//  - they are compatible with packetOp\n//  - they are portable across C++ versions (the std::binder* are deprecated in C++11)\ntemplate<typename BinaryOp> struct bind1st_op : BinaryOp {\n\n  typedef typename BinaryOp::first_argument_type  first_argument_type;\n  typedef typename BinaryOp::second_argument_type second_argument_type;\n  typedef typename BinaryOp::result_type          result_type;\n\n  EIGEN_DEVICE_FUNC explicit bind1st_op(const first_argument_type &val) : m_value(val) {}\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type operator() (const second_argument_type& b) const { return BinaryOp::operator()(m_value,b); }\n\n  template<typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& b) const\n  { return BinaryOp::packetOp(internal::pset1<Packet>(m_value), b); }\n\n  first_argument_type m_value;\n};\ntemplate<typename BinaryOp> struct functor_traits<bind1st_op<BinaryOp> > : functor_traits<BinaryOp> {};\n\n\ntemplate<typename BinaryOp> struct bind2nd_op : BinaryOp {\n\n  typedef typename BinaryOp::first_argument_type  first_argument_type;\n  typedef typename BinaryOp::second_argument_type second_argument_type;\n  typedef typename BinaryOp::result_type          result_type;\n\n  EIGEN_DEVICE_FUNC explicit bind2nd_op(const second_argument_type &val) : m_value(val) {}\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type operator() (const first_argument_type& a) const { return BinaryOp::operator()(a,m_value); }\n\n  template<typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a) const\n  { return BinaryOp::packetOp(a,internal::pset1<Packet>(m_value)); }\n\n  second_argument_type m_value;\n};\ntemplate<typename BinaryOp> struct functor_traits<bind2nd_op<BinaryOp> > : functor_traits<BinaryOp> {};\n\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_BINARY_FUNCTORS_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/functors/NullaryFunctors.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2016 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_NULLARY_FUNCTORS_H\n#define EIGEN_NULLARY_FUNCTORS_H\n\nnamespace Eigen {\n\nnamespace internal {\n\ntemplate<typename Scalar>\nstruct scalar_constant_op {\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE scalar_constant_op(const scalar_constant_op& other) : m_other(other.m_other) { }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE scalar_constant_op(const Scalar& other) : m_other(other) { }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() () const { return m_other; }\n  template<typename PacketType>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const PacketType packetOp() const { return internal::pset1<PacketType>(m_other); }\n  const Scalar m_other;\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_constant_op<Scalar> >\n{ enum { Cost = 0 /* as the constant value should be loaded in register only once for the whole expression */,\n         PacketAccess = packet_traits<Scalar>::Vectorizable, IsRepeatable = true }; };\n\ntemplate<typename Scalar> struct scalar_identity_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_identity_op)\n  template<typename IndexType>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (IndexType row, IndexType col) const { return row==col ? Scalar(1) : Scalar(0); }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_identity_op<Scalar> >\n{ enum { Cost = NumTraits<Scalar>::AddCost, PacketAccess = false, IsRepeatable = true }; };\n\ntemplate <typename Scalar, bool IsInteger> struct linspaced_op_impl;\n\ntemplate <typename Scalar>\nstruct linspaced_op_impl<Scalar,/*IsInteger*/false>\n{\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n\n  linspaced_op_impl(const Scalar& low, const Scalar& high, Index num_steps) :\n    m_low(low), m_high(high), m_size1(num_steps==1 ? 1 : num_steps-1), m_step(num_steps==1 ? Scalar() : Scalar((high-low)/RealScalar(num_steps-1))),\n    m_flip(numext::abs(high)<numext::abs(low))\n  {}\n\n  template<typename IndexType>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (IndexType i) const {\n    if(m_flip)\n      return (i==0)? m_low : Scalar(m_high - RealScalar(m_size1-i)*m_step);\n    else\n      return (i==m_size1)? m_high : Scalar(m_low + RealScalar(i)*m_step);\n  }\n\n  template<typename Packet, typename IndexType>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(IndexType i) const\n  {\n    // Principle:\n    // [low, ..., low] + ( [step, ..., step] * ( [i, ..., i] + [0, ..., size] ) )\n    if(m_flip)\n    {\n      Packet pi = plset<Packet>(Scalar(i-m_size1));\n      Packet res = padd(pset1<Packet>(m_high), pmul(pset1<Packet>(m_step), pi));\n      if(i==0)\n        res = pinsertfirst(res, m_low);\n      return res;\n    }\n    else\n    {\n      Packet pi = plset<Packet>(Scalar(i));\n      Packet res = padd(pset1<Packet>(m_low), pmul(pset1<Packet>(m_step), pi));\n      if(i==m_size1-unpacket_traits<Packet>::size+1)\n        res = pinsertlast(res, m_high);\n      return res;\n    }\n  }\n\n  const Scalar m_low;\n  const Scalar m_high;\n  const Index m_size1;\n  const Scalar m_step;\n  const bool m_flip;\n};\n\ntemplate <typename Scalar>\nstruct linspaced_op_impl<Scalar,/*IsInteger*/true>\n{\n  linspaced_op_impl(const Scalar& low, const Scalar& high, Index num_steps) :\n    m_low(low),\n    m_multiplier((high-low)/convert_index<Scalar>(num_steps<=1 ? 1 : num_steps-1)),\n    m_divisor(convert_index<Scalar>((high>=low?num_steps:-num_steps)+(high-low))/((numext::abs(high-low)+1)==0?1:(numext::abs(high-low)+1))),\n    m_use_divisor(num_steps>1 && (numext::abs(high-low)+1)<num_steps)\n  {}\n\n  template<typename IndexType>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  const Scalar operator() (IndexType i) const\n  {\n    if(m_use_divisor) return m_low + convert_index<Scalar>(i)/m_divisor;\n    else              return m_low + convert_index<Scalar>(i)*m_multiplier;\n  }\n\n  const Scalar m_low;\n  const Scalar m_multiplier;\n  const Scalar m_divisor;\n  const bool m_use_divisor;\n};\n\n// ----- Linspace functor ----------------------------------------------------------------\n\n// Forward declaration (we default to random access which does not really give\n// us a speed gain when using packet access but it allows to use the functor in\n// nested expressions).\ntemplate <typename Scalar> struct linspaced_op;\ntemplate <typename Scalar> struct functor_traits< linspaced_op<Scalar> >\n{\n  enum\n  {\n    Cost = 1,\n    PacketAccess =   (!NumTraits<Scalar>::IsInteger) && packet_traits<Scalar>::HasSetLinear && packet_traits<Scalar>::HasBlend,\n                  /*&& ((!NumTraits<Scalar>::IsInteger) || packet_traits<Scalar>::HasDiv),*/ // <- vectorization for integer is currently disabled\n    IsRepeatable = true\n  };\n};\ntemplate <typename Scalar> struct linspaced_op\n{\n  linspaced_op(const Scalar& low, const Scalar& high, Index num_steps)\n    : impl((num_steps==1 ? high : low),high,num_steps)\n  {}\n\n  template<typename IndexType>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (IndexType i) const { return impl(i); }\n\n  template<typename Packet,typename IndexType>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(IndexType i) const { return impl.template packetOp<Packet>(i); }\n\n  // This proxy object handles the actual required temporaries and the different\n  // implementations (integer vs. floating point).\n  const linspaced_op_impl<Scalar,NumTraits<Scalar>::IsInteger> impl;\n};\n\n// Linear access is automatically determined from the operator() prototypes available for the given functor.\n// If it exposes an operator()(i,j), then we assume the i and j coefficients are required independently\n// and linear access is not possible. In all other cases, linear access is enabled.\n// Users should not have to deal with this structure.\ntemplate<typename Functor> struct functor_has_linear_access { enum { ret = !has_binary_operator<Functor>::value }; };\n\n// For unreliable compilers, let's specialize the has_*ary_operator\n// helpers so that at least built-in nullary functors work fine.\n#if !( (EIGEN_COMP_MSVC>1600) || (EIGEN_GNUC_AT_LEAST(4,8)) || (EIGEN_COMP_ICC>=1600))\ntemplate<typename Scalar,typename IndexType>\nstruct has_nullary_operator<scalar_constant_op<Scalar>,IndexType> { enum { value = 1}; };\ntemplate<typename Scalar,typename IndexType>\nstruct has_unary_operator<scalar_constant_op<Scalar>,IndexType> { enum { value = 0}; };\ntemplate<typename Scalar,typename IndexType>\nstruct has_binary_operator<scalar_constant_op<Scalar>,IndexType> { enum { value = 0}; };\n\ntemplate<typename Scalar,typename IndexType>\nstruct has_nullary_operator<scalar_identity_op<Scalar>,IndexType> { enum { value = 0}; };\ntemplate<typename Scalar,typename IndexType>\nstruct has_unary_operator<scalar_identity_op<Scalar>,IndexType> { enum { value = 0}; };\ntemplate<typename Scalar,typename IndexType>\nstruct has_binary_operator<scalar_identity_op<Scalar>,IndexType> { enum { value = 1}; };\n\ntemplate<typename Scalar,typename IndexType>\nstruct has_nullary_operator<linspaced_op<Scalar>,IndexType> { enum { value = 0}; };\ntemplate<typename Scalar,typename IndexType>\nstruct has_unary_operator<linspaced_op<Scalar>,IndexType> { enum { value = 1}; };\ntemplate<typename Scalar,typename IndexType>\nstruct has_binary_operator<linspaced_op<Scalar>,IndexType> { enum { value = 0}; };\n\ntemplate<typename Scalar,typename IndexType>\nstruct has_nullary_operator<scalar_random_op<Scalar>,IndexType> { enum { value = 1}; };\ntemplate<typename Scalar,typename IndexType>\nstruct has_unary_operator<scalar_random_op<Scalar>,IndexType> { enum { value = 0}; };\ntemplate<typename Scalar,typename IndexType>\nstruct has_binary_operator<scalar_random_op<Scalar>,IndexType> { enum { value = 0}; };\n#endif\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_NULLARY_FUNCTORS_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/functors/StlFunctors.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_STL_FUNCTORS_H\n#define EIGEN_STL_FUNCTORS_H\n\nnamespace Eigen {\n\nnamespace internal {\n\n// default functor traits for STL functors:\n\ntemplate<typename T>\nstruct functor_traits<std::multiplies<T> >\n{ enum { Cost = NumTraits<T>::MulCost, PacketAccess = false }; };\n\ntemplate<typename T>\nstruct functor_traits<std::divides<T> >\n{ enum { Cost = NumTraits<T>::MulCost, PacketAccess = false }; };\n\ntemplate<typename T>\nstruct functor_traits<std::plus<T> >\n{ enum { Cost = NumTraits<T>::AddCost, PacketAccess = false }; };\n\ntemplate<typename T>\nstruct functor_traits<std::minus<T> >\n{ enum { Cost = NumTraits<T>::AddCost, PacketAccess = false }; };\n\ntemplate<typename T>\nstruct functor_traits<std::negate<T> >\n{ enum { Cost = NumTraits<T>::AddCost, PacketAccess = false }; };\n\ntemplate<typename T>\nstruct functor_traits<std::logical_or<T> >\n{ enum { Cost = 1, PacketAccess = false }; };\n\ntemplate<typename T>\nstruct functor_traits<std::logical_and<T> >\n{ enum { Cost = 1, PacketAccess = false }; };\n\ntemplate<typename T>\nstruct functor_traits<std::logical_not<T> >\n{ enum { Cost = 1, PacketAccess = false }; };\n\ntemplate<typename T>\nstruct functor_traits<std::greater<T> >\n{ enum { Cost = 1, PacketAccess = false }; };\n\ntemplate<typename T>\nstruct functor_traits<std::less<T> >\n{ enum { Cost = 1, PacketAccess = false }; };\n\ntemplate<typename T>\nstruct functor_traits<std::greater_equal<T> >\n{ enum { Cost = 1, PacketAccess = false }; };\n\ntemplate<typename T>\nstruct functor_traits<std::less_equal<T> >\n{ enum { Cost = 1, PacketAccess = false }; };\n\ntemplate<typename T>\nstruct functor_traits<std::equal_to<T> >\n{ enum { Cost = 1, PacketAccess = false }; };\n\ntemplate<typename T>\nstruct functor_traits<std::not_equal_to<T> >\n{ enum { Cost = 1, PacketAccess = false }; };\n\n#if (__cplusplus < 201103L) && (EIGEN_COMP_MSVC <= 1900)\n// std::binder* are deprecated since c++11 and will be removed in c++17\ntemplate<typename T>\nstruct functor_traits<std::binder2nd<T> >\n{ enum { Cost = functor_traits<T>::Cost, PacketAccess = false }; };\n\ntemplate<typename T>\nstruct functor_traits<std::binder1st<T> >\n{ enum { Cost = functor_traits<T>::Cost, PacketAccess = false }; };\n#endif\n\n#if (__cplusplus < 201703L) && (EIGEN_COMP_MSVC < 1910)\n// std::unary_negate is deprecated since c++17 and will be removed in c++20\ntemplate<typename T>\nstruct functor_traits<std::unary_negate<T> >\n{ enum { Cost = 1 + functor_traits<T>::Cost, PacketAccess = false }; };\n\n// std::binary_negate is deprecated since c++17 and will be removed in c++20\ntemplate<typename T>\nstruct functor_traits<std::binary_negate<T> >\n{ enum { Cost = 1 + functor_traits<T>::Cost, PacketAccess = false }; };\n#endif\n\n#ifdef EIGEN_STDEXT_SUPPORT\n\ntemplate<typename T0,typename T1>\nstruct functor_traits<std::project1st<T0,T1> >\n{ enum { Cost = 0, PacketAccess = false }; };\n\ntemplate<typename T0,typename T1>\nstruct functor_traits<std::project2nd<T0,T1> >\n{ enum { Cost = 0, PacketAccess = false }; };\n\ntemplate<typename T0,typename T1>\nstruct functor_traits<std::select2nd<std::pair<T0,T1> > >\n{ enum { Cost = 0, PacketAccess = false }; };\n\ntemplate<typename T0,typename T1>\nstruct functor_traits<std::select1st<std::pair<T0,T1> > >\n{ enum { Cost = 0, PacketAccess = false }; };\n\ntemplate<typename T0,typename T1>\nstruct functor_traits<std::unary_compose<T0,T1> >\n{ enum { Cost = functor_traits<T0>::Cost + functor_traits<T1>::Cost, PacketAccess = false }; };\n\ntemplate<typename T0,typename T1,typename T2>\nstruct functor_traits<std::binary_compose<T0,T1,T2> >\n{ enum { Cost = functor_traits<T0>::Cost + functor_traits<T1>::Cost + functor_traits<T2>::Cost, PacketAccess = false }; };\n\n#endif // EIGEN_STDEXT_SUPPORT\n\n// allow to add new functors and specializations of functor_traits from outside Eigen.\n// this macro is really needed because functor_traits must be specialized after it is declared but before it is used...\n#ifdef EIGEN_FUNCTORS_PLUGIN\n#include EIGEN_FUNCTORS_PLUGIN\n#endif\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_STL_FUNCTORS_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/functors/TernaryFunctors.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Eugene Brevdo <ebrevdo@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_TERNARY_FUNCTORS_H\n#define EIGEN_TERNARY_FUNCTORS_H\n\nnamespace Eigen {\n\nnamespace internal {\n\n//---------- associative ternary functors ----------\n\n\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_TERNARY_FUNCTORS_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/functors/UnaryFunctors.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2016 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_UNARY_FUNCTORS_H\n#define EIGEN_UNARY_FUNCTORS_H\n\nnamespace Eigen {\n\nnamespace internal {\n\n/** \\internal\n  * \\brief Template functor to compute the opposite of a scalar\n  *\n  * \\sa class CwiseUnaryOp, MatrixBase::operator-\n  */\ntemplate<typename Scalar> struct scalar_opposite_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_opposite_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a) const { return -a; }\n  template<typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a) const\n  { return internal::pnegate(a); }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_opposite_op<Scalar> >\n{ enum {\n    Cost = NumTraits<Scalar>::AddCost,\n    PacketAccess = packet_traits<Scalar>::HasNegate };\n};\n\n/** \\internal\n  * \\brief Template functor to compute the absolute value of a scalar\n  *\n  * \\sa class CwiseUnaryOp, Cwise::abs\n  */\ntemplate<typename Scalar> struct scalar_abs_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_abs_op)\n  typedef typename NumTraits<Scalar>::Real result_type;\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type operator() (const Scalar& a) const { return numext::abs(a); }\n  template<typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a) const\n  { return internal::pabs(a); }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_abs_op<Scalar> >\n{\n  enum {\n    Cost = NumTraits<Scalar>::AddCost,\n    PacketAccess = packet_traits<Scalar>::HasAbs\n  };\n};\n\n/** \\internal\n  * \\brief Template functor to compute the score of a scalar, to chose a pivot\n  *\n  * \\sa class CwiseUnaryOp\n  */\ntemplate<typename Scalar> struct scalar_score_coeff_op : scalar_abs_op<Scalar>\n{\n  typedef void Score_is_abs;\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_score_coeff_op<Scalar> > : functor_traits<scalar_abs_op<Scalar> > {};\n\n/* Avoid recomputing abs when we know the score and they are the same. Not a true Eigen functor.  */\ntemplate<typename Scalar, typename=void> struct abs_knowing_score\n{\n  EIGEN_EMPTY_STRUCT_CTOR(abs_knowing_score)\n  typedef typename NumTraits<Scalar>::Real result_type;\n  template<typename Score>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type operator() (const Scalar& a, const Score&) const { return numext::abs(a); }\n};\ntemplate<typename Scalar> struct abs_knowing_score<Scalar, typename scalar_score_coeff_op<Scalar>::Score_is_abs>\n{\n  EIGEN_EMPTY_STRUCT_CTOR(abs_knowing_score)\n  typedef typename NumTraits<Scalar>::Real result_type;\n  template<typename Scal>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type operator() (const Scal&, const result_type& a) const { return a; }\n};\n\n/** \\internal\n  * \\brief Template functor to compute the squared absolute value of a scalar\n  *\n  * \\sa class CwiseUnaryOp, Cwise::abs2\n  */\ntemplate<typename Scalar> struct scalar_abs2_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_abs2_op)\n  typedef typename NumTraits<Scalar>::Real result_type;\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE const result_type operator() (const Scalar& a) const { return numext::abs2(a); }\n  template<typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a) const\n  { return internal::pmul(a,a); }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_abs2_op<Scalar> >\n{ enum { Cost = NumTraits<Scalar>::MulCost, PacketAccess = packet_traits<Scalar>::HasAbs2 }; };\n\n/** \\internal\n  * \\brief Template functor to compute the conjugate of a complex value\n  *\n  * \\sa class CwiseUnaryOp, MatrixBase::conjugate()\n  */\ntemplate<typename Scalar> struct scalar_conjugate_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_conjugate_op)\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a) const { using numext::conj; return conj(a); }\n  template<typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a) const { return internal::pconj(a); }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_conjugate_op<Scalar> >\n{\n  enum {\n    Cost = 0,\n    // Yes the cost is zero even for complexes because in most cases for which\n    // the cost is used, conjugation turns to be a no-op. Some examples:\n    //   cost(a*conj(b)) == cost(a*b)\n    //   cost(a+conj(b)) == cost(a+b)\n    //   <etc.\n    // If we don't set it to zero, then:\n    //   A.conjugate().lazyProduct(B.conjugate())\n    // will bake its operands. We definitely don't want that!\n    PacketAccess = packet_traits<Scalar>::HasConj\n  };\n};\n\n/** \\internal\n  * \\brief Template functor to compute the phase angle of a complex\n  *\n  * \\sa class CwiseUnaryOp, Cwise::arg\n  */\ntemplate<typename Scalar> struct scalar_arg_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_arg_op)\n  typedef typename NumTraits<Scalar>::Real result_type;\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type operator() (const Scalar& a) const { using numext::arg; return arg(a); }\n  template<typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a) const\n  { return internal::parg(a); }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_arg_op<Scalar> >\n{\n  enum {\n    Cost = NumTraits<Scalar>::IsComplex ? 5 * NumTraits<Scalar>::MulCost : NumTraits<Scalar>::AddCost,\n    PacketAccess = packet_traits<Scalar>::HasArg\n  };\n};\n/** \\internal\n  * \\brief Template functor to cast a scalar to another type\n  *\n  * \\sa class CwiseUnaryOp, MatrixBase::cast()\n  */\ntemplate<typename Scalar, typename NewType>\nstruct scalar_cast_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_cast_op)\n  typedef NewType result_type;\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const NewType operator() (const Scalar& a) const { return cast<Scalar, NewType>(a); }\n};\ntemplate<typename Scalar, typename NewType>\nstruct functor_traits<scalar_cast_op<Scalar,NewType> >\n{ enum { Cost = is_same<Scalar, NewType>::value ? 0 : NumTraits<NewType>::AddCost, PacketAccess = false }; };\n\n/** \\internal\n  * \\brief Template functor to arithmetically shift a scalar right by a number of bits\n  *\n  * \\sa class CwiseUnaryOp, MatrixBase::shift_right()\n  */\ntemplate<typename Scalar, int N>\nstruct scalar_shift_right_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_shift_right_op)\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a) const\n  { return a >> N; }\n  template<typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a) const\n  { return internal::parithmetic_shift_right<N>(a); }\n};\ntemplate<typename Scalar, int N>\nstruct functor_traits<scalar_shift_right_op<Scalar,N> >\n{ enum { Cost = NumTraits<Scalar>::AddCost, PacketAccess = packet_traits<Scalar>::HasShift }; };\n\n/** \\internal\n  * \\brief Template functor to logically shift a scalar left by a number of bits\n  *\n  * \\sa class CwiseUnaryOp, MatrixBase::shift_left()\n  */\ntemplate<typename Scalar, int N>\nstruct scalar_shift_left_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_shift_left_op)\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a) const\n  { return a << N; }\n  template<typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a) const\n  { return internal::plogical_shift_left<N>(a); }\n};\ntemplate<typename Scalar, int N>\nstruct functor_traits<scalar_shift_left_op<Scalar,N> >\n{ enum { Cost = NumTraits<Scalar>::AddCost, PacketAccess = packet_traits<Scalar>::HasShift }; };\n\n/** \\internal\n  * \\brief Template functor to extract the real part of a complex\n  *\n  * \\sa class CwiseUnaryOp, MatrixBase::real()\n  */\ntemplate<typename Scalar>\nstruct scalar_real_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_real_op)\n  typedef typename NumTraits<Scalar>::Real result_type;\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE result_type operator() (const Scalar& a) const { return numext::real(a); }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_real_op<Scalar> >\n{ enum { Cost = 0, PacketAccess = false }; };\n\n/** \\internal\n  * \\brief Template functor to extract the imaginary part of a complex\n  *\n  * \\sa class CwiseUnaryOp, MatrixBase::imag()\n  */\ntemplate<typename Scalar>\nstruct scalar_imag_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_imag_op)\n  typedef typename NumTraits<Scalar>::Real result_type;\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE result_type operator() (const Scalar& a) const { return numext::imag(a); }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_imag_op<Scalar> >\n{ enum { Cost = 0, PacketAccess = false }; };\n\n/** \\internal\n  * \\brief Template functor to extract the real part of a complex as a reference\n  *\n  * \\sa class CwiseUnaryOp, MatrixBase::real()\n  */\ntemplate<typename Scalar>\nstruct scalar_real_ref_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_real_ref_op)\n  typedef typename NumTraits<Scalar>::Real result_type;\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE result_type& operator() (const Scalar& a) const { return numext::real_ref(*const_cast<Scalar*>(&a)); }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_real_ref_op<Scalar> >\n{ enum { Cost = 0, PacketAccess = false }; };\n\n/** \\internal\n  * \\brief Template functor to extract the imaginary part of a complex as a reference\n  *\n  * \\sa class CwiseUnaryOp, MatrixBase::imag()\n  */\ntemplate<typename Scalar>\nstruct scalar_imag_ref_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_imag_ref_op)\n  typedef typename NumTraits<Scalar>::Real result_type;\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE result_type& operator() (const Scalar& a) const { return numext::imag_ref(*const_cast<Scalar*>(&a)); }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_imag_ref_op<Scalar> >\n{ enum { Cost = 0, PacketAccess = false }; };\n\n/** \\internal\n  *\n  * \\brief Template functor to compute the exponential of a scalar\n  *\n  * \\sa class CwiseUnaryOp, Cwise::exp()\n  */\ntemplate<typename Scalar> struct scalar_exp_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_exp_op)\n  EIGEN_DEVICE_FUNC inline const Scalar operator() (const Scalar& a) const { return numext::exp(a); }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::pexp(a); }\n};\ntemplate <typename Scalar>\nstruct functor_traits<scalar_exp_op<Scalar> > {\n  enum {\n    PacketAccess = packet_traits<Scalar>::HasExp,\n    // The following numbers are based on the AVX implementation.\n#ifdef EIGEN_VECTORIZE_FMA\n    // Haswell can issue 2 add/mul/madd per cycle.\n    Cost =\n    (sizeof(Scalar) == 4\n     // float: 8 pmadd, 4 pmul, 2 padd/psub, 6 other\n     ? (8 * NumTraits<Scalar>::AddCost + 6 * NumTraits<Scalar>::MulCost)\n     // double: 7 pmadd, 5 pmul, 3 padd/psub, 1 div,  13 other\n     : (14 * NumTraits<Scalar>::AddCost +\n        6 * NumTraits<Scalar>::MulCost +\n        scalar_div_cost<Scalar,packet_traits<Scalar>::HasDiv>::value))\n#else\n    Cost =\n    (sizeof(Scalar) == 4\n     // float: 7 pmadd, 6 pmul, 4 padd/psub, 10 other\n     ? (21 * NumTraits<Scalar>::AddCost + 13 * NumTraits<Scalar>::MulCost)\n     // double: 7 pmadd, 5 pmul, 3 padd/psub, 1 div,  13 other\n     : (23 * NumTraits<Scalar>::AddCost +\n        12 * NumTraits<Scalar>::MulCost +\n        scalar_div_cost<Scalar,packet_traits<Scalar>::HasDiv>::value))\n#endif\n  };\n};\n\n/** \\internal\n  *\n  * \\brief Template functor to compute the exponential of a scalar - 1.\n  *\n  * \\sa class CwiseUnaryOp, ArrayBase::expm1()\n  */\ntemplate<typename Scalar> struct scalar_expm1_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_expm1_op)\n  EIGEN_DEVICE_FUNC inline const Scalar operator() (const Scalar& a) const { return numext::expm1(a); }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::pexpm1(a); }\n};\ntemplate <typename Scalar>\nstruct functor_traits<scalar_expm1_op<Scalar> > {\n  enum {\n    PacketAccess = packet_traits<Scalar>::HasExpm1,\n    Cost = functor_traits<scalar_exp_op<Scalar> >::Cost // TODO measure cost of expm1\n  };\n};\n\n/** \\internal\n  *\n  * \\brief Template functor to compute the logarithm of a scalar\n  *\n  * \\sa class CwiseUnaryOp, ArrayBase::log()\n  */\ntemplate<typename Scalar> struct scalar_log_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_log_op)\n  EIGEN_DEVICE_FUNC inline const Scalar operator() (const Scalar& a) const { return numext::log(a); }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::plog(a); }\n};\ntemplate <typename Scalar>\nstruct functor_traits<scalar_log_op<Scalar> > {\n  enum {\n    PacketAccess = packet_traits<Scalar>::HasLog,\n    Cost =\n    (PacketAccess\n     // The following numbers are based on the AVX implementation.\n#ifdef EIGEN_VECTORIZE_FMA\n     // 8 pmadd, 6 pmul, 8 padd/psub, 16 other, can issue 2 add/mul/madd per cycle.\n     ? (20 * NumTraits<Scalar>::AddCost + 7 * NumTraits<Scalar>::MulCost)\n#else\n     // 8 pmadd, 6 pmul, 8 padd/psub, 20 other\n     ? (36 * NumTraits<Scalar>::AddCost + 14 * NumTraits<Scalar>::MulCost)\n#endif\n     // Measured cost of std::log.\n     : sizeof(Scalar)==4 ? 40 : 85)\n  };\n};\n\n/** \\internal\n  *\n  * \\brief Template functor to compute the logarithm of 1 plus a scalar value\n  *\n  * \\sa class CwiseUnaryOp, ArrayBase::log1p()\n  */\ntemplate<typename Scalar> struct scalar_log1p_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_log1p_op)\n  EIGEN_DEVICE_FUNC inline const Scalar operator() (const Scalar& a) const { return numext::log1p(a); }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::plog1p(a); }\n};\ntemplate <typename Scalar>\nstruct functor_traits<scalar_log1p_op<Scalar> > {\n  enum {\n    PacketAccess = packet_traits<Scalar>::HasLog1p,\n    Cost = functor_traits<scalar_log_op<Scalar> >::Cost // TODO measure cost of log1p\n  };\n};\n\n/** \\internal\n  *\n  * \\brief Template functor to compute the base-10 logarithm of a scalar\n  *\n  * \\sa class CwiseUnaryOp, Cwise::log10()\n  */\ntemplate<typename Scalar> struct scalar_log10_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_log10_op)\n  EIGEN_DEVICE_FUNC inline const Scalar operator() (const Scalar& a) const { EIGEN_USING_STD_MATH(log10) return log10(a); }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::plog10(a); }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_log10_op<Scalar> >\n{ enum { Cost = 5 * NumTraits<Scalar>::MulCost, PacketAccess = packet_traits<Scalar>::HasLog10 }; };\n\n/** \\internal\n  * \\brief Template functor to compute the square root of a scalar\n  * \\sa class CwiseUnaryOp, Cwise::sqrt()\n  */\ntemplate<typename Scalar> struct scalar_sqrt_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_sqrt_op)\n  EIGEN_DEVICE_FUNC inline const Scalar operator() (const Scalar& a) const { return numext::sqrt(a); }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::psqrt(a); }\n};\ntemplate <typename Scalar>\nstruct functor_traits<scalar_sqrt_op<Scalar> > {\n  enum {\n#if EIGEN_FAST_MATH\n    // The following numbers are based on the AVX implementation.\n    Cost = (sizeof(Scalar) == 8 ? 28\n                                // 4 pmul, 1 pmadd, 3 other\n                                : (3 * NumTraits<Scalar>::AddCost +\n                                   5 * NumTraits<Scalar>::MulCost)),\n#else\n    // The following numbers are based on min VSQRT throughput on Haswell.\n    Cost = (sizeof(Scalar) == 8 ? 28 : 14),\n#endif\n    PacketAccess = packet_traits<Scalar>::HasSqrt\n  };\n};\n\n/** \\internal\n  * \\brief Template functor to compute the reciprocal square root of a scalar\n  * \\sa class CwiseUnaryOp, Cwise::rsqrt()\n  */\ntemplate<typename Scalar> struct scalar_rsqrt_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_rsqrt_op)\n  EIGEN_DEVICE_FUNC inline const Scalar operator() (const Scalar& a) const { return Scalar(1)/numext::sqrt(a); }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::prsqrt(a); }\n};\n\ntemplate<typename Scalar>\nstruct functor_traits<scalar_rsqrt_op<Scalar> >\n{ enum {\n    Cost = 5 * NumTraits<Scalar>::MulCost,\n    PacketAccess = packet_traits<Scalar>::HasRsqrt\n  };\n};\n\n/** \\internal\n  * \\brief Template functor to compute the cosine of a scalar\n  * \\sa class CwiseUnaryOp, ArrayBase::cos()\n  */\ntemplate<typename Scalar> struct scalar_cos_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_cos_op)\n  EIGEN_DEVICE_FUNC inline Scalar operator() (const Scalar& a) const { return numext::cos(a); }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::pcos(a); }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_cos_op<Scalar> >\n{\n  enum {\n    Cost = 5 * NumTraits<Scalar>::MulCost,\n    PacketAccess = packet_traits<Scalar>::HasCos\n  };\n};\n\n/** \\internal\n  * \\brief Template functor to compute the sine of a scalar\n  * \\sa class CwiseUnaryOp, ArrayBase::sin()\n  */\ntemplate<typename Scalar> struct scalar_sin_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_sin_op)\n  EIGEN_DEVICE_FUNC inline const Scalar operator() (const Scalar& a) const { return numext::sin(a); }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::psin(a); }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_sin_op<Scalar> >\n{\n  enum {\n    Cost = 5 * NumTraits<Scalar>::MulCost,\n    PacketAccess = packet_traits<Scalar>::HasSin\n  };\n};\n\n\n/** \\internal\n  * \\brief Template functor to compute the tan of a scalar\n  * \\sa class CwiseUnaryOp, ArrayBase::tan()\n  */\ntemplate<typename Scalar> struct scalar_tan_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_tan_op)\n  EIGEN_DEVICE_FUNC inline const Scalar operator() (const Scalar& a) const { return numext::tan(a); }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::ptan(a); }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_tan_op<Scalar> >\n{\n  enum {\n    Cost = 5 * NumTraits<Scalar>::MulCost,\n    PacketAccess = packet_traits<Scalar>::HasTan\n  };\n};\n\n/** \\internal\n  * \\brief Template functor to compute the arc cosine of a scalar\n  * \\sa class CwiseUnaryOp, ArrayBase::acos()\n  */\ntemplate<typename Scalar> struct scalar_acos_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_acos_op)\n  EIGEN_DEVICE_FUNC inline const Scalar operator() (const Scalar& a) const { return numext::acos(a); }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::pacos(a); }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_acos_op<Scalar> >\n{\n  enum {\n    Cost = 5 * NumTraits<Scalar>::MulCost,\n    PacketAccess = packet_traits<Scalar>::HasACos\n  };\n};\n\n/** \\internal\n  * \\brief Template functor to compute the arc sine of a scalar\n  * \\sa class CwiseUnaryOp, ArrayBase::asin()\n  */\ntemplate<typename Scalar> struct scalar_asin_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_asin_op)\n  EIGEN_DEVICE_FUNC inline const Scalar operator() (const Scalar& a) const { return numext::asin(a); }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::pasin(a); }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_asin_op<Scalar> >\n{\n  enum {\n    Cost = 5 * NumTraits<Scalar>::MulCost,\n    PacketAccess = packet_traits<Scalar>::HasASin\n  };\n};\n\n\n/** \\internal\n  * \\brief Template functor to compute the atan of a scalar\n  * \\sa class CwiseUnaryOp, ArrayBase::atan()\n  */\ntemplate<typename Scalar> struct scalar_atan_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_atan_op)\n  EIGEN_DEVICE_FUNC inline const Scalar operator() (const Scalar& a) const { return numext::atan(a); }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::patan(a); }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_atan_op<Scalar> >\n{\n  enum {\n    Cost = 5 * NumTraits<Scalar>::MulCost,\n    PacketAccess = packet_traits<Scalar>::HasATan\n  };\n};\n\n/** \\internal\n  * \\brief Template functor to compute the tanh of a scalar\n  * \\sa class CwiseUnaryOp, ArrayBase::tanh()\n  */\ntemplate <typename Scalar>\nstruct scalar_tanh_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_tanh_op)\n  EIGEN_DEVICE_FUNC inline const Scalar operator()(const Scalar& a) const { return numext::tanh(a); }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& x) const { return ptanh(x); }\n};\n\ntemplate <typename Scalar>\nstruct functor_traits<scalar_tanh_op<Scalar> > {\n  enum {\n    PacketAccess = packet_traits<Scalar>::HasTanh,\n    Cost = ( (EIGEN_FAST_MATH && is_same<Scalar,float>::value)\n// The following numbers are based on the AVX implementation,\n#ifdef EIGEN_VECTORIZE_FMA\n                // Haswell can issue 2 add/mul/madd per cycle.\n                // 9 pmadd, 2 pmul, 1 div, 2 other\n                ? (2 * NumTraits<Scalar>::AddCost +\n                   6 * NumTraits<Scalar>::MulCost +\n                   scalar_div_cost<Scalar,packet_traits<Scalar>::HasDiv>::value)\n#else\n                ? (11 * NumTraits<Scalar>::AddCost +\n                   11 * NumTraits<Scalar>::MulCost +\n                   scalar_div_cost<Scalar,packet_traits<Scalar>::HasDiv>::value)\n#endif\n                // This number assumes a naive implementation of tanh\n                : (6 * NumTraits<Scalar>::AddCost +\n                   3 * NumTraits<Scalar>::MulCost +\n                   2 * scalar_div_cost<Scalar,packet_traits<Scalar>::HasDiv>::value +\n                   functor_traits<scalar_exp_op<Scalar> >::Cost))\n  };\n};\n\n#if EIGEN_HAS_CXX11_MATH\n/** \\internal\n  * \\brief Template functor to compute the atanh of a scalar\n  * \\sa class CwiseUnaryOp, ArrayBase::atanh()\n  */\ntemplate <typename Scalar>\nstruct scalar_atanh_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_atanh_op)\n  EIGEN_DEVICE_FUNC inline const Scalar operator()(const Scalar& a) const { return numext::atanh(a); }\n};\n\ntemplate <typename Scalar>\nstruct functor_traits<scalar_atanh_op<Scalar> > {\n  enum { Cost = 5 * NumTraits<Scalar>::MulCost, PacketAccess = false };\n};\n#endif\n\n/** \\internal\n  * \\brief Template functor to compute the sinh of a scalar\n  * \\sa class CwiseUnaryOp, ArrayBase::sinh()\n  */\ntemplate<typename Scalar> struct scalar_sinh_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_sinh_op)\n  EIGEN_DEVICE_FUNC inline const Scalar operator() (const Scalar& a) const { return numext::sinh(a); }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::psinh(a); }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_sinh_op<Scalar> >\n{\n  enum {\n    Cost = 5 * NumTraits<Scalar>::MulCost,\n    PacketAccess = packet_traits<Scalar>::HasSinh\n  };\n};\n\n#if EIGEN_HAS_CXX11_MATH\n/** \\internal\n  * \\brief Template functor to compute the asinh of a scalar\n  * \\sa class CwiseUnaryOp, ArrayBase::asinh()\n  */\ntemplate <typename Scalar>\nstruct scalar_asinh_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_asinh_op)\n  EIGEN_DEVICE_FUNC inline const Scalar operator()(const Scalar& a) const { return numext::asinh(a); }\n};\n\ntemplate <typename Scalar>\nstruct functor_traits<scalar_asinh_op<Scalar> > {\n  enum { Cost = 5 * NumTraits<Scalar>::MulCost, PacketAccess = false };\n};\n#endif\n\n/** \\internal\n  * \\brief Template functor to compute the cosh of a scalar\n  * \\sa class CwiseUnaryOp, ArrayBase::cosh()\n  */\ntemplate<typename Scalar> struct scalar_cosh_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_cosh_op)\n  EIGEN_DEVICE_FUNC inline const Scalar operator() (const Scalar& a) const { return numext::cosh(a); }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::pcosh(a); }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_cosh_op<Scalar> >\n{\n  enum {\n    Cost = 5 * NumTraits<Scalar>::MulCost,\n    PacketAccess = packet_traits<Scalar>::HasCosh\n  };\n};\n\n#if EIGEN_HAS_CXX11_MATH\n/** \\internal\n  * \\brief Template functor to compute the acosh of a scalar\n  * \\sa class CwiseUnaryOp, ArrayBase::acosh()\n  */\ntemplate <typename Scalar>\nstruct scalar_acosh_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_acosh_op)\n  EIGEN_DEVICE_FUNC inline const Scalar operator()(const Scalar& a) const { return numext::acosh(a); }\n};\n\ntemplate <typename Scalar>\nstruct functor_traits<scalar_acosh_op<Scalar> > {\n  enum { Cost = 5 * NumTraits<Scalar>::MulCost, PacketAccess = false };\n};\n#endif\n\n/** \\internal\n  * \\brief Template functor to compute the inverse of a scalar\n  * \\sa class CwiseUnaryOp, Cwise::inverse()\n  */\ntemplate<typename Scalar>\nstruct scalar_inverse_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_inverse_op)\n  EIGEN_DEVICE_FUNC inline Scalar operator() (const Scalar& a) const { return Scalar(1)/a; }\n  template<typename Packet>\n  EIGEN_DEVICE_FUNC inline const Packet packetOp(const Packet& a) const\n  { return internal::pdiv(pset1<Packet>(Scalar(1)),a); }\n};\ntemplate <typename Scalar>\nstruct functor_traits<scalar_inverse_op<Scalar> > {\n  enum {\n    PacketAccess = packet_traits<Scalar>::HasDiv,\n    Cost = scalar_div_cost<Scalar, PacketAccess>::value\n  };\n};\n\n/** \\internal\n  * \\brief Template functor to compute the square of a scalar\n  * \\sa class CwiseUnaryOp, Cwise::square()\n  */\ntemplate<typename Scalar>\nstruct scalar_square_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_square_op)\n  EIGEN_DEVICE_FUNC inline Scalar operator() (const Scalar& a) const { return a*a; }\n  template<typename Packet>\n  EIGEN_DEVICE_FUNC inline const Packet packetOp(const Packet& a) const\n  { return internal::pmul(a,a); }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_square_op<Scalar> >\n{ enum { Cost = NumTraits<Scalar>::MulCost, PacketAccess = packet_traits<Scalar>::HasMul }; };\n\n/** \\internal\n  * \\brief Template functor to compute the cube of a scalar\n  * \\sa class CwiseUnaryOp, Cwise::cube()\n  */\ntemplate<typename Scalar>\nstruct scalar_cube_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_cube_op)\n  EIGEN_DEVICE_FUNC inline Scalar operator() (const Scalar& a) const { return a*a*a; }\n  template<typename Packet>\n  EIGEN_DEVICE_FUNC inline const Packet packetOp(const Packet& a) const\n  { return internal::pmul(a,pmul(a,a)); }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_cube_op<Scalar> >\n{ enum { Cost = 2*NumTraits<Scalar>::MulCost, PacketAccess = packet_traits<Scalar>::HasMul }; };\n\n/** \\internal\n  * \\brief Template functor to compute the rounded value of a scalar\n  * \\sa class CwiseUnaryOp, ArrayBase::round()\n  */\ntemplate<typename Scalar> struct scalar_round_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_round_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a) const { return numext::round(a); }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::pround(a); }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_round_op<Scalar> >\n{\n  enum {\n    Cost = NumTraits<Scalar>::MulCost,\n    PacketAccess = packet_traits<Scalar>::HasRound\n  };\n};\n\n/** \\internal\n  * \\brief Template functor to compute the floor of a scalar\n  * \\sa class CwiseUnaryOp, ArrayBase::floor()\n  */\ntemplate<typename Scalar> struct scalar_floor_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_floor_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a) const { return numext::floor(a); }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::pfloor(a); }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_floor_op<Scalar> >\n{\n  enum {\n    Cost = NumTraits<Scalar>::MulCost,\n    PacketAccess = packet_traits<Scalar>::HasFloor\n  };\n};\n\n/** \\internal\n  * \\brief Template functor to compute the rounded (with current rounding mode)  value of a scalar\n  * \\sa class CwiseUnaryOp, ArrayBase::rint()\n  */\ntemplate<typename Scalar> struct scalar_rint_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_rint_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a) const { return numext::rint(a); }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::print(a); }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_rint_op<Scalar> >\n{\n  enum {\n    Cost = NumTraits<Scalar>::MulCost,\n    PacketAccess = packet_traits<Scalar>::HasRint\n  };\n};\n\n/** \\internal\n  * \\brief Template functor to compute the ceil of a scalar\n  * \\sa class CwiseUnaryOp, ArrayBase::ceil()\n  */\ntemplate<typename Scalar> struct scalar_ceil_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_ceil_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a) const { return numext::ceil(a); }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::pceil(a); }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_ceil_op<Scalar> >\n{\n  enum {\n    Cost = NumTraits<Scalar>::MulCost,\n    PacketAccess = packet_traits<Scalar>::HasCeil\n  };\n};\n\n/** \\internal\n  * \\brief Template functor to compute whether a scalar is NaN\n  * \\sa class CwiseUnaryOp, ArrayBase::isnan()\n  */\ntemplate<typename Scalar> struct scalar_isnan_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_isnan_op)\n  typedef bool result_type;\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE result_type operator() (const Scalar& a) const {\n#if defined(SYCL_DEVICE_ONLY)\n    return numext::isnan(a);\n#else\n    return (numext::isnan)(a);\n#endif\n  }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_isnan_op<Scalar> >\n{\n  enum {\n    Cost = NumTraits<Scalar>::MulCost,\n    PacketAccess = false\n  };\n};\n\n/** \\internal\n  * \\brief Template functor to check whether a scalar is +/-inf\n  * \\sa class CwiseUnaryOp, ArrayBase::isinf()\n  */\ntemplate<typename Scalar> struct scalar_isinf_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_isinf_op)\n  typedef bool result_type;\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE result_type operator() (const Scalar& a) const {\n#if defined(SYCL_DEVICE_ONLY)\n    return numext::isinf(a);\n#else\n    return (numext::isinf)(a);\n#endif\n  }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_isinf_op<Scalar> >\n{\n  enum {\n    Cost = NumTraits<Scalar>::MulCost,\n    PacketAccess = false\n  };\n};\n\n/** \\internal\n  * \\brief Template functor to check whether a scalar has a finite value\n  * \\sa class CwiseUnaryOp, ArrayBase::isfinite()\n  */\ntemplate<typename Scalar> struct scalar_isfinite_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_isfinite_op)\n  typedef bool result_type;\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE result_type operator() (const Scalar& a) const {\n#if defined(SYCL_DEVICE_ONLY)\n    return numext::isfinite(a);\n#else\n    return (numext::isfinite)(a);\n#endif\n  }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_isfinite_op<Scalar> >\n{\n  enum {\n    Cost = NumTraits<Scalar>::MulCost,\n    PacketAccess = false\n  };\n};\n\n/** \\internal\n  * \\brief Template functor to compute the logical not of a boolean\n  *\n  * \\sa class CwiseUnaryOp, ArrayBase::operator!\n  */\ntemplate<typename Scalar> struct scalar_boolean_not_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_boolean_not_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator() (const bool& a) const { return !a; }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_boolean_not_op<Scalar> > {\n  enum {\n    Cost = NumTraits<bool>::AddCost,\n    PacketAccess = false\n  };\n};\n\n/** \\internal\n  * \\brief Template functor to compute the signum of a scalar\n  * \\sa class CwiseUnaryOp, Cwise::sign()\n  */\ntemplate<typename Scalar,bool iscpx=(NumTraits<Scalar>::IsComplex!=0) > struct scalar_sign_op;\ntemplate<typename Scalar>\nstruct scalar_sign_op<Scalar,false> {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_sign_op)\n  EIGEN_DEVICE_FUNC inline const Scalar operator() (const Scalar& a) const\n  {\n      return Scalar( (a>Scalar(0)) - (a<Scalar(0)) );\n  }\n  //TODO\n  //template <typename Packet>\n  //EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::psign(a); }\n};\ntemplate<typename Scalar>\nstruct scalar_sign_op<Scalar,true> {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_sign_op)\n  EIGEN_DEVICE_FUNC inline const Scalar operator() (const Scalar& a) const\n  {\n    typedef typename NumTraits<Scalar>::Real real_type;\n    real_type aa = numext::abs(a);\n    if (aa==real_type(0))\n      return Scalar(0);\n    aa = real_type(1)/aa;\n    return Scalar(a.real()*aa, a.imag()*aa );\n  }\n  //TODO\n  //template <typename Packet>\n  //EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::psign(a); }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_sign_op<Scalar> >\n{ enum {\n    Cost =\n        NumTraits<Scalar>::IsComplex\n        ? ( 8*NumTraits<Scalar>::MulCost  ) // roughly\n        : ( 3*NumTraits<Scalar>::AddCost),\n    PacketAccess = packet_traits<Scalar>::HasSign\n  };\n};\n\n/** \\internal\n  * \\brief Template functor to compute the logistic function of a scalar\n  * \\sa class CwiseUnaryOp, ArrayBase::logistic()\n  */\ntemplate <typename T>\nstruct scalar_logistic_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_logistic_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T operator()(const T& x) const {\n    const T one = T(1);\n    return one / (one + numext::exp(-x));\n  }\n\n  template <typename Packet> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  Packet packetOp(const Packet& x) const {\n    const Packet one = pset1<Packet>(T(1));\n    return pdiv(one, padd(one, pexp(pnegate(x))));\n  }\n};\n\n#ifndef EIGEN_GPU_COMPILE_PHASE\n/** \\internal\n  * \\brief Template specialization of the logistic function for float.\n  *\n  *  Uses just a 9/10-degree rational interpolant which\n  *  interpolates 1/(1+exp(-x)) - 0.5 up to a couple of ulps in the range\n  *  [-9, 18]. Below -9 we use the more accurate approximation\n  *  1/(1+exp(-x)) ~= exp(x), and above 18 the logistic function is 1 withing\n  *  one ulp. The shifted logistic is interpolated because it was easier to\n  *  make the fit converge.\n  *\n  */\ntemplate <>\nstruct scalar_logistic_op<float> {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_logistic_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float operator()(const float& x) const {\n    // The upper cut-off is the smallest x for which the rational approximation evaluates to 1.\n    // Choosing this value saves us a few instructions clamping the results at the end.\n#ifdef EIGEN_VECTORIZE_FMA\n    const float cutoff_upper = 15.7243833541870117f;\n#else\n    const float cutoff_upper = 15.6437711715698242f;\n#endif\n    const float cutoff_lower = -9.f;\n    if (x > cutoff_upper) return 1.0f;\n    else if (x < cutoff_lower) return numext::exp(x);\n    else return 1.0f / (1.0f + numext::exp(-x));\n  }\n\n  template <typename Packet> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  Packet packetOp(const Packet& _x) const {\n    const Packet cutoff_lower = pset1<Packet>(-9.f);\n    const Packet lt_mask = pcmp_lt<Packet>(_x, cutoff_lower);\n    const bool any_small = predux(lt_mask);\n\n    // Clamp the input to be at most 'cutoff_upper'.\n#ifdef EIGEN_VECTORIZE_FMA\n    const Packet cutoff_upper = pset1<Packet>(15.7243833541870117f);\n#else\n    const Packet cutoff_upper = pset1<Packet>(15.6437711715698242f);\n#endif\n    const Packet x = pmin(_x, cutoff_upper);\n\n    // The monomial coefficients of the numerator polynomial (odd).\n    const Packet alpha_1 = pset1<Packet>(2.48287947061529e-01f);\n    const Packet alpha_3 = pset1<Packet>(8.51377133304701e-03f);\n    const Packet alpha_5 = pset1<Packet>(6.08574864600143e-05f);\n    const Packet alpha_7 = pset1<Packet>(1.15627324459942e-07f);\n    const Packet alpha_9 = pset1<Packet>(4.37031012579801e-11f);\n\n    // The monomial coefficients of the denominator polynomial (even).\n    const Packet beta_0 = pset1<Packet>(9.93151921023180e-01f);\n    const Packet beta_2 = pset1<Packet>(1.16817656904453e-01f);\n    const Packet beta_4 = pset1<Packet>(1.70198817374094e-03f);\n    const Packet beta_6 = pset1<Packet>(6.29106785017040e-06f);\n    const Packet beta_8 = pset1<Packet>(5.76102136993427e-09f);\n    const Packet beta_10 = pset1<Packet>(6.10247389755681e-13f);\n\n    // Since the polynomials are odd/even, we need x^2.\n    const Packet x2 = pmul(x, x);\n\n    // Evaluate the numerator polynomial p.\n    Packet p = pmadd(x2, alpha_9, alpha_7);\n    p = pmadd(x2, p, alpha_5);\n    p = pmadd(x2, p, alpha_3);\n    p = pmadd(x2, p, alpha_1);\n    p = pmul(x, p);\n\n    // Evaluate the denominator polynomial q.\n    Packet q = pmadd(x2, beta_10, beta_8);\n    q = pmadd(x2, q, beta_6);\n    q = pmadd(x2, q, beta_4);\n    q = pmadd(x2, q, beta_2);\n    q = pmadd(x2, q, beta_0);\n    // Divide the numerator by the denominator and shift it up.\n    const Packet logistic = padd(pdiv(p, q), pset1<Packet>(0.5f));\n    if (EIGEN_PREDICT_FALSE(any_small)) {\n      const Packet exponential = pexp(_x);\n      return pselect(lt_mask, exponential, logistic);\n    } else {\n      return logistic;\n    }\n  }\n};\n#endif  // #ifndef EIGEN_GPU_COMPILE_PHASE\n\ntemplate <typename T>\nstruct functor_traits<scalar_logistic_op<T> > {\n  enum {\n    // The cost estimate for float here here is for the common(?) case where\n    // all arguments are greater than -9.\n    Cost = scalar_div_cost<T, packet_traits<T>::HasDiv>::value +\n           (internal::is_same<T, float>::value\n                ? NumTraits<T>::AddCost * 15 + NumTraits<T>::MulCost * 11\n                : NumTraits<T>::AddCost * 2 +\n                      functor_traits<scalar_exp_op<T> >::Cost),\n    PacketAccess =\n        packet_traits<T>::HasAdd && packet_traits<T>::HasDiv &&\n        (internal::is_same<T, float>::value\n             ? packet_traits<T>::HasMul && packet_traits<T>::HasMax &&\n                   packet_traits<T>::HasMin\n             : packet_traits<T>::HasNegate && packet_traits<T>::HasExp)\n  };\n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_FUNCTORS_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/products/GeneralBlockPanelKernel.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_GENERAL_BLOCK_PANEL_H\n#define EIGEN_GENERAL_BLOCK_PANEL_H\n\n\nnamespace Eigen {\n\nnamespace internal {\n\nenum GEBPPacketSizeType {\n  GEBPPacketFull = 0,\n  GEBPPacketHalf,\n  GEBPPacketQuarter\n};\n\ntemplate<typename _LhsScalar, typename _RhsScalar, bool _ConjLhs=false, bool _ConjRhs=false, int Arch=Architecture::Target, int _PacketSize=GEBPPacketFull>\nclass gebp_traits;\n\n\n/** \\internal \\returns b if a<=0, and returns a otherwise. */\ninline std::ptrdiff_t manage_caching_sizes_helper(std::ptrdiff_t a, std::ptrdiff_t b)\n{\n  return a<=0 ? b : a;\n}\n\n#if EIGEN_ARCH_i386_OR_x86_64\nconst std::ptrdiff_t defaultL1CacheSize = 32*1024;\nconst std::ptrdiff_t defaultL2CacheSize = 256*1024;\nconst std::ptrdiff_t defaultL3CacheSize = 2*1024*1024;\n#elif EIGEN_ARCH_PPC\nconst std::ptrdiff_t defaultL1CacheSize = 64*1024;\nconst std::ptrdiff_t defaultL2CacheSize = 512*1024;\nconst std::ptrdiff_t defaultL3CacheSize = 4*1024*1024;\n#else\nconst std::ptrdiff_t defaultL1CacheSize = 16*1024;\nconst std::ptrdiff_t defaultL2CacheSize = 512*1024;\nconst std::ptrdiff_t defaultL3CacheSize = 512*1024;\n#endif\n\n/** \\internal */\nstruct CacheSizes {\n  CacheSizes(): m_l1(-1),m_l2(-1),m_l3(-1) {\n    int l1CacheSize, l2CacheSize, l3CacheSize;\n    queryCacheSizes(l1CacheSize, l2CacheSize, l3CacheSize);\n    m_l1 = manage_caching_sizes_helper(l1CacheSize, defaultL1CacheSize);\n    m_l2 = manage_caching_sizes_helper(l2CacheSize, defaultL2CacheSize);\n    m_l3 = manage_caching_sizes_helper(l3CacheSize, defaultL3CacheSize);\n  }\n\n  std::ptrdiff_t m_l1;\n  std::ptrdiff_t m_l2;\n  std::ptrdiff_t m_l3;\n};\n\n\n/** \\internal */\ninline void manage_caching_sizes(Action action, std::ptrdiff_t* l1, std::ptrdiff_t* l2, std::ptrdiff_t* l3)\n{\n  static CacheSizes m_cacheSizes;\n\n  if(action==SetAction)\n  {\n    // set the cpu cache size and cache all block sizes from a global cache size in byte\n    eigen_internal_assert(l1!=0 && l2!=0);\n    m_cacheSizes.m_l1 = *l1;\n    m_cacheSizes.m_l2 = *l2;\n    m_cacheSizes.m_l3 = *l3;\n  }\n  else if(action==GetAction)\n  {\n    eigen_internal_assert(l1!=0 && l2!=0);\n    *l1 = m_cacheSizes.m_l1;\n    *l2 = m_cacheSizes.m_l2;\n    *l3 = m_cacheSizes.m_l3;\n  }\n  else\n  {\n    eigen_internal_assert(false);\n  }\n}\n\n/* Helper for computeProductBlockingSizes.\n *\n * Given a m x k times k x n matrix product of scalar types \\c LhsScalar and \\c RhsScalar,\n * this function computes the blocking size parameters along the respective dimensions\n * for matrix products and related algorithms. The blocking sizes depends on various\n * parameters:\n * - the L1 and L2 cache sizes,\n * - the register level blocking sizes defined by gebp_traits,\n * - the number of scalars that fit into a packet (when vectorization is enabled).\n *\n * \\sa setCpuCacheSizes */\n\ntemplate<typename LhsScalar, typename RhsScalar, int KcFactor, typename Index>\nvoid evaluateProductBlockingSizesHeuristic(Index& k, Index& m, Index& n, Index num_threads = 1)\n{\n  typedef gebp_traits<LhsScalar,RhsScalar> Traits;\n\n  // Explanations:\n  // Let's recall that the product algorithms form mc x kc vertical panels A' on the lhs and\n  // kc x nc blocks B' on the rhs. B' has to fit into L2/L3 cache. Moreover, A' is processed\n  // per mr x kc horizontal small panels where mr is the blocking size along the m dimension\n  // at the register level. This small horizontal panel has to stay within L1 cache.\n  std::ptrdiff_t l1, l2, l3;\n  manage_caching_sizes(GetAction, &l1, &l2, &l3);\n  #ifdef EIGEN_VECTORIZE_AVX512\n  // We need to find a rationale for that, but without this adjustment,\n  // performance with AVX512 is pretty bad, like -20% slower.\n  // One reason is that with increasing packet-size, the blocking size k\n  // has to become pretty small if we want that 1 lhs panel fit within L1.\n  // For instance, with the 3pX4 kernel and double, the size of the lhs+rhs panels are:\n  //   k*(3*64 + 4*8) Bytes, with l1=32kBytes, and k%8=0, we have k=144.\n  // This is quite small for a good reuse of the accumulation registers.\n  l1 *= 4;\n  #endif\n\n  if (num_threads > 1) {\n    typedef typename Traits::ResScalar ResScalar;\n    enum {\n      kdiv = KcFactor * (Traits::mr * sizeof(LhsScalar) + Traits::nr * sizeof(RhsScalar)),\n      ksub = Traits::mr * Traits::nr * sizeof(ResScalar),\n      kr = 8,\n      mr = Traits::mr,\n      nr = Traits::nr\n    };\n    // Increasing k gives us more time to prefetch the content of the \"C\"\n    // registers. However once the latency is hidden there is no point in\n    // increasing the value of k, so we'll cap it at 320 (value determined\n    // experimentally).\n    const Index k_cache = (numext::mini<Index>)((l1-ksub)/kdiv, 320);\n    if (k_cache < k) {\n      k = k_cache - (k_cache % kr);\n      eigen_internal_assert(k > 0);\n    }\n\n    const Index n_cache = (l2-l1) / (nr * sizeof(RhsScalar) * k);\n    const Index n_per_thread = numext::div_ceil(n, num_threads);\n    if (n_cache <= n_per_thread) {\n      // Don't exceed the capacity of the l2 cache.\n      eigen_internal_assert(n_cache >= static_cast<Index>(nr));\n      n = n_cache - (n_cache % nr);\n      eigen_internal_assert(n > 0);\n    } else {\n      n = (numext::mini<Index>)(n, (n_per_thread + nr - 1) - ((n_per_thread + nr - 1) % nr));\n    }\n\n    if (l3 > l2) {\n      // l3 is shared between all cores, so we'll give each thread its own chunk of l3.\n      const Index m_cache = (l3-l2) / (sizeof(LhsScalar) * k * num_threads);\n      const Index m_per_thread = numext::div_ceil(m, num_threads);\n      if(m_cache < m_per_thread && m_cache >= static_cast<Index>(mr)) {\n        m = m_cache - (m_cache % mr);\n        eigen_internal_assert(m > 0);\n      } else {\n        m = (numext::mini<Index>)(m, (m_per_thread + mr - 1) - ((m_per_thread + mr - 1) % mr));\n      }\n    }\n  }\n  else {\n    // In unit tests we do not want to use extra large matrices,\n    // so we reduce the cache size to check the blocking strategy is not flawed\n#ifdef EIGEN_DEBUG_SMALL_PRODUCT_BLOCKS\n    l1 = 9*1024;\n    l2 = 32*1024;\n    l3 = 512*1024;\n#endif\n\n    // Early return for small problems because the computation below are time consuming for small problems.\n    // Perhaps it would make more sense to consider k*n*m??\n    // Note that for very tiny problem, this function should be bypassed anyway\n    // because we use the coefficient-based implementation for them.\n    if((numext::maxi)(k,(numext::maxi)(m,n))<48)\n      return;\n\n    typedef typename Traits::ResScalar ResScalar;\n    enum {\n      k_peeling = 8,\n      k_div = KcFactor * (Traits::mr * sizeof(LhsScalar) + Traits::nr * sizeof(RhsScalar)),\n      k_sub = Traits::mr * Traits::nr * sizeof(ResScalar)\n    };\n\n    // ---- 1st level of blocking on L1, yields kc ----\n\n    // Blocking on the third dimension (i.e., k) is chosen so that an horizontal panel\n    // of size mr x kc of the lhs plus a vertical panel of kc x nr of the rhs both fits within L1 cache.\n    // We also include a register-level block of the result (mx x nr).\n    // (In an ideal world only the lhs panel would stay in L1)\n    // Moreover, kc has to be a multiple of 8 to be compatible with loop peeling, leading to a maximum blocking size of:\n    const Index max_kc = numext::maxi<Index>(((l1-k_sub)/k_div) & (~(k_peeling-1)),1);\n    const Index old_k = k;\n    if(k>max_kc)\n    {\n      // We are really blocking on the third dimension:\n      // -> reduce blocking size to make sure the last block is as large as possible\n      //    while keeping the same number of sweeps over the result.\n      k = (k%max_kc)==0 ? max_kc\n                        : max_kc - k_peeling * ((max_kc-1-(k%max_kc))/(k_peeling*(k/max_kc+1)));\n\n      eigen_internal_assert(((old_k/k) == (old_k/max_kc)) && \"the number of sweeps has to remain the same\");\n    }\n\n    // ---- 2nd level of blocking on max(L2,L3), yields nc ----\n\n    // TODO find a reliable way to get the actual amount of cache per core to use for 2nd level blocking, that is:\n    //      actual_l2 = max(l2, l3/nb_core_sharing_l3)\n    // The number below is quite conservative: it is better to underestimate the cache size rather than overestimating it)\n    // For instance, it corresponds to 6MB of L3 shared among 4 cores.\n    #ifdef EIGEN_DEBUG_SMALL_PRODUCT_BLOCKS\n    const Index actual_l2 = l3;\n    #else\n    const Index actual_l2 = 1572864; // == 1.5 MB\n    #endif\n\n    // Here, nc is chosen such that a block of kc x nc of the rhs fit within half of L2.\n    // The second half is implicitly reserved to access the result and lhs coefficients.\n    // When k<max_kc, then nc can arbitrarily growth. In practice, it seems to be fruitful\n    // to limit this growth: we bound nc to growth by a factor x1.5.\n    // However, if the entire lhs block fit within L1, then we are not going to block on the rows at all,\n    // and it becomes fruitful to keep the packed rhs blocks in L1 if there is enough remaining space.\n    Index max_nc;\n    const Index lhs_bytes = m * k * sizeof(LhsScalar);\n    const Index remaining_l1 = l1- k_sub - lhs_bytes;\n    if(remaining_l1 >= Index(Traits::nr*sizeof(RhsScalar))*k)\n    {\n      // L1 blocking\n      max_nc = remaining_l1 / (k*sizeof(RhsScalar));\n    }\n    else\n    {\n      // L2 blocking\n      max_nc = (3*actual_l2)/(2*2*max_kc*sizeof(RhsScalar));\n    }\n    // WARNING Below, we assume that Traits::nr is a power of two.\n    Index nc = numext::mini<Index>(actual_l2/(2*k*sizeof(RhsScalar)), max_nc) & (~(Traits::nr-1));\n    if(n>nc)\n    {\n      // We are really blocking over the columns:\n      // -> reduce blocking size to make sure the last block is as large as possible\n      //    while keeping the same number of sweeps over the packed lhs.\n      //    Here we allow one more sweep if this gives us a perfect match, thus the commented \"-1\"\n      n = (n%nc)==0 ? nc\n                    : (nc - Traits::nr * ((nc/*-1*/-(n%nc))/(Traits::nr*(n/nc+1))));\n    }\n    else if(old_k==k)\n    {\n      // So far, no blocking at all, i.e., kc==k, and nc==n.\n      // In this case, let's perform a blocking over the rows such that the packed lhs data is kept in cache L1/L2\n      // TODO: part of this blocking strategy is now implemented within the kernel itself, so the L1-based heuristic here should be obsolete.\n      Index problem_size = k*n*sizeof(LhsScalar);\n      Index actual_lm = actual_l2;\n      Index max_mc = m;\n      if(problem_size<=1024)\n      {\n        // problem is small enough to keep in L1\n        // Let's choose m such that lhs's block fit in 1/3 of L1\n        actual_lm = l1;\n      }\n      else if(l3!=0 && problem_size<=32768)\n      {\n        // we have both L2 and L3, and problem is small enough to be kept in L2\n        // Let's choose m such that lhs's block fit in 1/3 of L2\n        actual_lm = l2;\n        max_mc = (numext::mini<Index>)(576,max_mc);\n      }\n      Index mc = (numext::mini<Index>)(actual_lm/(3*k*sizeof(LhsScalar)), max_mc);\n      if (mc > Traits::mr) mc -= mc % Traits::mr;\n      else if (mc==0) return;\n      m = (m%mc)==0 ? mc\n                    : (mc - Traits::mr * ((mc/*-1*/-(m%mc))/(Traits::mr*(m/mc+1))));\n    }\n  }\n}\n\ntemplate <typename Index>\ninline bool useSpecificBlockingSizes(Index& k, Index& m, Index& n)\n{\n#ifdef EIGEN_TEST_SPECIFIC_BLOCKING_SIZES\n  if (EIGEN_TEST_SPECIFIC_BLOCKING_SIZES) {\n    k = numext::mini<Index>(k, EIGEN_TEST_SPECIFIC_BLOCKING_SIZE_K);\n    m = numext::mini<Index>(m, EIGEN_TEST_SPECIFIC_BLOCKING_SIZE_M);\n    n = numext::mini<Index>(n, EIGEN_TEST_SPECIFIC_BLOCKING_SIZE_N);\n    return true;\n  }\n#else\n  EIGEN_UNUSED_VARIABLE(k)\n  EIGEN_UNUSED_VARIABLE(m)\n  EIGEN_UNUSED_VARIABLE(n)\n#endif\n  return false;\n}\n\n/** \\brief Computes the blocking parameters for a m x k times k x n matrix product\n  *\n  * \\param[in,out] k Input: the third dimension of the product. Output: the blocking size along the same dimension.\n  * \\param[in,out] m Input: the number of rows of the left hand side. Output: the blocking size along the same dimension.\n  * \\param[in,out] n Input: the number of columns of the right hand side. Output: the blocking size along the same dimension.\n  *\n  * Given a m x k times k x n matrix product of scalar types \\c LhsScalar and \\c RhsScalar,\n  * this function computes the blocking size parameters along the respective dimensions\n  * for matrix products and related algorithms.\n  *\n  * The blocking size parameters may be evaluated:\n  *   - either by a heuristic based on cache sizes;\n  *   - or using fixed prescribed values (for testing purposes).\n  *\n  * \\sa setCpuCacheSizes */\n\ntemplate<typename LhsScalar, typename RhsScalar, int KcFactor, typename Index>\nvoid computeProductBlockingSizes(Index& k, Index& m, Index& n, Index num_threads = 1)\n{\n  if (!useSpecificBlockingSizes(k, m, n)) {\n    evaluateProductBlockingSizesHeuristic<LhsScalar, RhsScalar, KcFactor, Index>(k, m, n, num_threads);\n  }\n}\n\ntemplate<typename LhsScalar, typename RhsScalar, typename Index>\ninline void computeProductBlockingSizes(Index& k, Index& m, Index& n, Index num_threads = 1)\n{\n  computeProductBlockingSizes<LhsScalar,RhsScalar,1,Index>(k, m, n, num_threads);\n}\n\n#ifdef EIGEN_HAS_SINGLE_INSTRUCTION_CJMADD\n  #define CJMADD(CJ,A,B,C,T)  C = CJ.pmadd(A,B,C);\n#else\n\n  // FIXME (a bit overkill maybe ?)\n\n  template<typename CJ, typename A, typename B, typename C, typename T> struct gebp_madd_selector {\n    EIGEN_ALWAYS_INLINE static void run(const CJ& cj, A& a, B& b, C& c, T& /*t*/)\n    {\n      c = cj.pmadd(a,b,c);\n    }\n  };\n\n  template<typename CJ, typename T> struct gebp_madd_selector<CJ,T,T,T,T> {\n    EIGEN_ALWAYS_INLINE static void run(const CJ& cj, T& a, T& b, T& c, T& t)\n    {\n      t = b; t = cj.pmul(a,t); c = padd(c,t);\n    }\n  };\n\n  template<typename CJ, typename A, typename B, typename C, typename T>\n  EIGEN_STRONG_INLINE void gebp_madd(const CJ& cj, A& a, B& b, C& c, T& t)\n  {\n    gebp_madd_selector<CJ,A,B,C,T>::run(cj,a,b,c,t);\n  }\n\n  #define CJMADD(CJ,A,B,C,T)  gebp_madd(CJ,A,B,C,T);\n//   #define CJMADD(CJ,A,B,C,T)  T = B; T = CJ.pmul(A,T); C = padd(C,T);\n#endif\n\ntemplate <typename RhsPacket, typename RhsPacketx4, int registers_taken>\nstruct RhsPanelHelper {\n private:\n  static const int remaining_registers = EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS - registers_taken;\n public:\n  typedef typename conditional<remaining_registers>=4, RhsPacketx4, RhsPacket>::type type;\n};\n\ntemplate <typename Packet>\nstruct QuadPacket\n{\n  Packet B_0, B1, B2, B3;\n  const Packet& get(const FixedInt<0>&) const { return B_0; }\n  const Packet& get(const FixedInt<1>&) const { return B1; }\n  const Packet& get(const FixedInt<2>&) const { return B2; }\n  const Packet& get(const FixedInt<3>&) const { return B3; }\n};\n\ntemplate <int N, typename T1, typename T2, typename T3>\nstruct packet_conditional { typedef T3 type; };\n\ntemplate <typename T1, typename T2, typename T3>\nstruct packet_conditional<GEBPPacketFull, T1, T2, T3> { typedef T1 type; };\n\ntemplate <typename T1, typename T2, typename T3>\nstruct packet_conditional<GEBPPacketHalf, T1, T2, T3> { typedef T2 type; };\n\n#define PACKET_DECL_COND_PREFIX(prefix, name, packet_size)         \\\n  typedef typename packet_conditional<packet_size,                 \\\n                                      typename packet_traits<name ## Scalar>::type, \\\n                                      typename packet_traits<name ## Scalar>::half, \\\n                                      typename unpacket_traits<typename packet_traits<name ## Scalar>::half>::half>::type \\\n  prefix ## name ## Packet\n\n#define PACKET_DECL_COND(name, packet_size)                        \\\n  typedef typename packet_conditional<packet_size,                 \\\n                                      typename packet_traits<name ## Scalar>::type, \\\n                                      typename packet_traits<name ## Scalar>::half, \\\n                                      typename unpacket_traits<typename packet_traits<name ## Scalar>::half>::half>::type \\\n  name ## Packet\n\n#define PACKET_DECL_COND_SCALAR_PREFIX(prefix, packet_size)        \\\n  typedef typename packet_conditional<packet_size,                 \\\n                                      typename packet_traits<Scalar>::type, \\\n                                      typename packet_traits<Scalar>::half, \\\n                                      typename unpacket_traits<typename packet_traits<Scalar>::half>::half>::type \\\n  prefix ## ScalarPacket\n\n#define PACKET_DECL_COND_SCALAR(packet_size)                       \\\n  typedef typename packet_conditional<packet_size,                 \\\n                                      typename packet_traits<Scalar>::type, \\\n                                      typename packet_traits<Scalar>::half, \\\n                                      typename unpacket_traits<typename packet_traits<Scalar>::half>::half>::type \\\n  ScalarPacket\n\n/* Vectorization logic\n *  real*real: unpack rhs to constant packets, ...\n * \n *  cd*cd : unpack rhs to (b_r,b_r), (b_i,b_i), mul to get (a_r b_r,a_i b_r) (a_r b_i,a_i b_i),\n *          storing each res packet into two packets (2x2),\n *          at the end combine them: swap the second and addsub them \n *  cf*cf : same but with 2x4 blocks\n *  cplx*real : unpack rhs to constant packets, ...\n *  real*cplx : load lhs as (a0,a0,a1,a1), and mul as usual\n */\ntemplate<typename _LhsScalar, typename _RhsScalar, bool _ConjLhs, bool _ConjRhs, int Arch, int _PacketSize>\nclass gebp_traits\n{\npublic:\n  typedef _LhsScalar LhsScalar;\n  typedef _RhsScalar RhsScalar;\n  typedef typename ScalarBinaryOpTraits<LhsScalar, RhsScalar>::ReturnType ResScalar;\n\n  PACKET_DECL_COND_PREFIX(_, Lhs, _PacketSize);\n  PACKET_DECL_COND_PREFIX(_, Rhs, _PacketSize);\n  PACKET_DECL_COND_PREFIX(_, Res, _PacketSize);\n\n  enum {\n    ConjLhs = _ConjLhs,\n    ConjRhs = _ConjRhs,\n    Vectorizable = unpacket_traits<_LhsPacket>::vectorizable && unpacket_traits<_RhsPacket>::vectorizable,\n    LhsPacketSize = Vectorizable ? unpacket_traits<_LhsPacket>::size : 1,\n    RhsPacketSize = Vectorizable ? unpacket_traits<_RhsPacket>::size : 1,\n    ResPacketSize = Vectorizable ? unpacket_traits<_ResPacket>::size : 1,\n    \n    NumberOfRegisters = EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS,\n\n    // register block size along the N direction must be 1 or 4\n    nr = 4,\n\n    // register block size along the M direction (currently, this one cannot be modified)\n    default_mr = (EIGEN_PLAIN_ENUM_MIN(16,NumberOfRegisters)/2/nr)*LhsPacketSize,\n#if defined(EIGEN_HAS_SINGLE_INSTRUCTION_MADD) && !defined(EIGEN_VECTORIZE_ALTIVEC) && !defined(EIGEN_VECTORIZE_VSX) \\\n    && ((!EIGEN_COMP_MSVC) || (EIGEN_COMP_MSVC>=1914))\n    // we assume 16 registers or more\n    // See bug 992, if the scalar type is not vectorizable but that EIGEN_HAS_SINGLE_INSTRUCTION_MADD is defined,\n    // then using 3*LhsPacketSize triggers non-implemented paths in syrk.\n    // Bug 1515: MSVC prior to v19.14 yields to register spilling.\n    mr = Vectorizable ? 3*LhsPacketSize : default_mr,\n#else\n    mr = default_mr,\n#endif\n    \n    LhsProgress = LhsPacketSize,\n    RhsProgress = 1\n  };\n\n\n  typedef typename conditional<Vectorizable,_LhsPacket,LhsScalar>::type LhsPacket;\n  typedef typename conditional<Vectorizable,_RhsPacket,RhsScalar>::type RhsPacket;\n  typedef typename conditional<Vectorizable,_ResPacket,ResScalar>::type ResPacket;\n  typedef LhsPacket LhsPacket4Packing;\n\n  typedef QuadPacket<RhsPacket> RhsPacketx4;\n  typedef ResPacket AccPacket;\n  \n  EIGEN_STRONG_INLINE void initAcc(AccPacket& p)\n  {\n    p = pset1<ResPacket>(ResScalar(0));\n  }\n\n  template<typename RhsPacketType>\n  EIGEN_STRONG_INLINE void loadRhs(const RhsScalar* b, RhsPacketType& dest) const\n  {\n    dest = pset1<RhsPacketType>(*b);\n  }\n\n  EIGEN_STRONG_INLINE void loadRhs(const RhsScalar* b, RhsPacketx4& dest) const\n  {\n    pbroadcast4(b, dest.B_0, dest.B1, dest.B2, dest.B3);\n  }\n\n  template<typename RhsPacketType>\n  EIGEN_STRONG_INLINE void updateRhs(const RhsScalar* b, RhsPacketType& dest) const\n  {\n    loadRhs(b, dest);\n  }\n\n  EIGEN_STRONG_INLINE void updateRhs(const RhsScalar*, RhsPacketx4&) const\n  {\n  }\n\n  EIGEN_STRONG_INLINE void loadRhsQuad(const RhsScalar* b, RhsPacket& dest) const\n  {\n    dest = ploadquad<RhsPacket>(b);\n  }\n\n  template<typename LhsPacketType>\n  EIGEN_STRONG_INLINE void loadLhs(const LhsScalar* a, LhsPacketType& dest) const\n  {\n    dest = pload<LhsPacketType>(a);\n  }\n\n  template<typename LhsPacketType>\n  EIGEN_STRONG_INLINE void loadLhsUnaligned(const LhsScalar* a, LhsPacketType& dest) const\n  {\n    dest = ploadu<LhsPacketType>(a);\n  }\n\n  template<typename LhsPacketType, typename RhsPacketType, typename AccPacketType, typename LaneIdType>\n  EIGEN_STRONG_INLINE void madd(const LhsPacketType& a, const RhsPacketType& b, AccPacketType& c, RhsPacketType& tmp, const LaneIdType&) const\n  {\n    conj_helper<LhsPacketType,RhsPacketType,ConjLhs,ConjRhs> cj;\n    // It would be a lot cleaner to call pmadd all the time. Unfortunately if we\n    // let gcc allocate the register in which to store the result of the pmul\n    // (in the case where there is no FMA) gcc fails to figure out how to avoid\n    // spilling register.\n#ifdef EIGEN_HAS_SINGLE_INSTRUCTION_MADD\n    EIGEN_UNUSED_VARIABLE(tmp);\n    c = cj.pmadd(a,b,c);\n#else\n    tmp = b; tmp = cj.pmul(a,tmp); c = padd(c,tmp);\n#endif\n  }\n\n  template<typename LhsPacketType, typename AccPacketType, typename LaneIdType>\n  EIGEN_STRONG_INLINE void madd(const LhsPacketType& a, const RhsPacketx4& b, AccPacketType& c, RhsPacket& tmp, const LaneIdType& lane) const\n  {\n    madd(a, b.get(lane), c, tmp, lane);\n  }\n\n  EIGEN_STRONG_INLINE void acc(const AccPacket& c, const ResPacket& alpha, ResPacket& r) const\n  {\n    r = pmadd(c,alpha,r);\n  }\n  \n  template<typename ResPacketHalf>\n  EIGEN_STRONG_INLINE void acc(const ResPacketHalf& c, const ResPacketHalf& alpha, ResPacketHalf& r) const\n  {\n    r = pmadd(c,alpha,r);\n  }\n\n};\n\ntemplate<typename RealScalar, bool _ConjLhs, int Arch, int _PacketSize>\nclass gebp_traits<std::complex<RealScalar>, RealScalar, _ConjLhs, false, Arch, _PacketSize>\n{\npublic:\n  typedef std::complex<RealScalar> LhsScalar;\n  typedef RealScalar RhsScalar;\n  typedef typename ScalarBinaryOpTraits<LhsScalar, RhsScalar>::ReturnType ResScalar;\n\n  PACKET_DECL_COND_PREFIX(_, Lhs, _PacketSize);\n  PACKET_DECL_COND_PREFIX(_, Rhs, _PacketSize);\n  PACKET_DECL_COND_PREFIX(_, Res, _PacketSize);\n\n  enum {\n    ConjLhs = _ConjLhs,\n    ConjRhs = false,\n    Vectorizable = unpacket_traits<_LhsPacket>::vectorizable && unpacket_traits<_RhsPacket>::vectorizable,\n    LhsPacketSize = Vectorizable ? unpacket_traits<_LhsPacket>::size : 1,\n    RhsPacketSize = Vectorizable ? unpacket_traits<_RhsPacket>::size : 1,\n    ResPacketSize = Vectorizable ? unpacket_traits<_ResPacket>::size : 1,\n    \n    NumberOfRegisters = EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS,\n    nr = 4,\n#if defined(EIGEN_HAS_SINGLE_INSTRUCTION_MADD) && !defined(EIGEN_VECTORIZE_ALTIVEC) && !defined(EIGEN_VECTORIZE_VSX)\n    // we assume 16 registers\n    mr = 3*LhsPacketSize,\n#else\n    mr = (EIGEN_PLAIN_ENUM_MIN(16,NumberOfRegisters)/2/nr)*LhsPacketSize,\n#endif\n\n    LhsProgress = LhsPacketSize,\n    RhsProgress = 1\n  };\n\n  typedef typename conditional<Vectorizable,_LhsPacket,LhsScalar>::type LhsPacket;\n  typedef typename conditional<Vectorizable,_RhsPacket,RhsScalar>::type RhsPacket;\n  typedef typename conditional<Vectorizable,_ResPacket,ResScalar>::type ResPacket;\n  typedef LhsPacket LhsPacket4Packing;\n\n  typedef QuadPacket<RhsPacket> RhsPacketx4;\n\n  typedef ResPacket AccPacket;\n\n  EIGEN_STRONG_INLINE void initAcc(AccPacket& p)\n  {\n    p = pset1<ResPacket>(ResScalar(0));\n  }\n\n  template<typename RhsPacketType>\n  EIGEN_STRONG_INLINE void loadRhs(const RhsScalar* b, RhsPacketType& dest) const\n  {\n    dest = pset1<RhsPacketType>(*b);\n  }\n\n  EIGEN_STRONG_INLINE void loadRhs(const RhsScalar* b, RhsPacketx4& dest) const\n  {\n    pbroadcast4(b, dest.B_0, dest.B1, dest.B2, dest.B3);\n  }\n\n  template<typename RhsPacketType>\n  EIGEN_STRONG_INLINE void updateRhs(const RhsScalar* b, RhsPacketType& dest) const\n  {\n    loadRhs(b, dest);\n  }\n\n  EIGEN_STRONG_INLINE void updateRhs(const RhsScalar*, RhsPacketx4&) const\n  {}\n  \n  EIGEN_STRONG_INLINE void loadRhsQuad(const RhsScalar* b, RhsPacket& dest) const\n  {\n    loadRhsQuad_impl(b,dest, typename conditional<RhsPacketSize==16,true_type,false_type>::type());\n  }\n\n  EIGEN_STRONG_INLINE void loadRhsQuad_impl(const RhsScalar* b, RhsPacket& dest, const true_type&) const\n  {\n    // FIXME we can do better!\n    // what we want here is a ploadheight\n    RhsScalar tmp[4] = {b[0],b[0],b[1],b[1]};\n    dest = ploadquad<RhsPacket>(tmp);\n  }\n\n  EIGEN_STRONG_INLINE void loadRhsQuad_impl(const RhsScalar* b, RhsPacket& dest, const false_type&) const\n  {\n    eigen_internal_assert(RhsPacketSize<=8);\n    dest = pset1<RhsPacket>(*b);\n  }\n\n  EIGEN_STRONG_INLINE void loadLhs(const LhsScalar* a, LhsPacket& dest) const\n  {\n    dest = pload<LhsPacket>(a);\n  }\n\n  template<typename LhsPacketType>\n  EIGEN_STRONG_INLINE void loadLhsUnaligned(const LhsScalar* a, LhsPacketType& dest) const\n  {\n    dest = ploadu<LhsPacketType>(a);\n  }\n\n  template <typename LhsPacketType, typename RhsPacketType, typename AccPacketType, typename LaneIdType>\n  EIGEN_STRONG_INLINE void madd(const LhsPacketType& a, const RhsPacketType& b, AccPacketType& c, RhsPacketType& tmp, const LaneIdType&) const\n  {\n    madd_impl(a, b, c, tmp, typename conditional<Vectorizable,true_type,false_type>::type());\n  }\n\n  template <typename LhsPacketType, typename RhsPacketType, typename AccPacketType>\n  EIGEN_STRONG_INLINE void madd_impl(const LhsPacketType& a, const RhsPacketType& b, AccPacketType& c, RhsPacketType& tmp, const true_type&) const\n  {\n#ifdef EIGEN_HAS_SINGLE_INSTRUCTION_MADD\n    EIGEN_UNUSED_VARIABLE(tmp);\n    c.v = pmadd(a.v,b,c.v);\n#else\n    tmp = b; tmp = pmul(a.v,tmp); c.v = padd(c.v,tmp);\n#endif\n  }\n\n  EIGEN_STRONG_INLINE void madd_impl(const LhsScalar& a, const RhsScalar& b, ResScalar& c, RhsScalar& /*tmp*/, const false_type&) const\n  {\n    c += a * b;\n  }\n\n  template<typename LhsPacketType, typename AccPacketType, typename LaneIdType>\n  EIGEN_STRONG_INLINE void madd(const LhsPacketType& a, const RhsPacketx4& b, AccPacketType& c, RhsPacket& tmp, const LaneIdType& lane) const\n  {\n    madd(a, b.get(lane), c, tmp, lane);\n  }\n\n  template <typename ResPacketType, typename AccPacketType>\n  EIGEN_STRONG_INLINE void acc(const AccPacketType& c, const ResPacketType& alpha, ResPacketType& r) const\n  {\n    conj_helper<ResPacketType,ResPacketType,ConjLhs,false> cj;\n    r = cj.pmadd(c,alpha,r);\n  }\n\nprotected:\n};\n\ntemplate<typename Packet>\nstruct DoublePacket\n{\n  Packet first;\n  Packet second;\n};\n\ntemplate<typename Packet>\nDoublePacket<Packet> padd(const DoublePacket<Packet> &a, const DoublePacket<Packet> &b)\n{\n  DoublePacket<Packet> res;\n  res.first  = padd(a.first, b.first);\n  res.second = padd(a.second,b.second);\n  return res;\n}\n\n// note that for DoublePacket<RealPacket> the \"4\" in \"downto4\"\n// corresponds to the number of complexes, so it means \"8\"\n// it terms of real coefficients.\n\ntemplate<typename Packet>\nconst DoublePacket<Packet>&\npredux_half_dowto4(const DoublePacket<Packet> &a,\n                   typename enable_if<unpacket_traits<Packet>::size<=8>::type* = 0)\n{\n  return a;\n}\n\ntemplate<typename Packet>\nDoublePacket<typename unpacket_traits<Packet>::half>\npredux_half_dowto4(const DoublePacket<Packet> &a,\n                   typename enable_if<unpacket_traits<Packet>::size==16>::type* = 0)\n{\n  // yes, that's pretty hackish :(\n  DoublePacket<typename unpacket_traits<Packet>::half> res;\n  typedef std::complex<typename unpacket_traits<Packet>::type> Cplx;\n  typedef typename packet_traits<Cplx>::type CplxPacket;\n  res.first  = predux_half_dowto4(CplxPacket(a.first)).v;\n  res.second = predux_half_dowto4(CplxPacket(a.second)).v;\n  return res;\n}\n\n// same here, \"quad\" actually means \"8\" in terms of real coefficients\ntemplate<typename Scalar, typename RealPacket>\nvoid loadQuadToDoublePacket(const Scalar* b, DoublePacket<RealPacket>& dest,\n                            typename enable_if<unpacket_traits<RealPacket>::size<=8>::type* = 0)\n{\n  dest.first  = pset1<RealPacket>(numext::real(*b));\n  dest.second = pset1<RealPacket>(numext::imag(*b));\n}\n\ntemplate<typename Scalar, typename RealPacket>\nvoid loadQuadToDoublePacket(const Scalar* b, DoublePacket<RealPacket>& dest,\n                            typename enable_if<unpacket_traits<RealPacket>::size==16>::type* = 0)\n{\n  // yes, that's pretty hackish too :(\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  RealScalar r[4] = {numext::real(b[0]), numext::real(b[0]), numext::real(b[1]), numext::real(b[1])};\n  RealScalar i[4] = {numext::imag(b[0]), numext::imag(b[0]), numext::imag(b[1]), numext::imag(b[1])};\n  dest.first  = ploadquad<RealPacket>(r);\n  dest.second = ploadquad<RealPacket>(i);\n}\n\n\ntemplate<typename Packet> struct unpacket_traits<DoublePacket<Packet> > {\n  typedef DoublePacket<typename unpacket_traits<Packet>::half> half;\n};\n// template<typename Packet>\n// DoublePacket<Packet> pmadd(const DoublePacket<Packet> &a, const DoublePacket<Packet> &b)\n// {\n//   DoublePacket<Packet> res;\n//   res.first  = padd(a.first, b.first);\n//   res.second = padd(a.second,b.second);\n//   return res;\n// }\n\ntemplate<typename RealScalar, bool _ConjLhs, bool _ConjRhs, int Arch, int _PacketSize>\nclass gebp_traits<std::complex<RealScalar>, std::complex<RealScalar>, _ConjLhs, _ConjRhs, Arch, _PacketSize >\n{\npublic:\n  typedef std::complex<RealScalar>  Scalar;\n  typedef std::complex<RealScalar>  LhsScalar;\n  typedef std::complex<RealScalar>  RhsScalar;\n  typedef std::complex<RealScalar>  ResScalar;\n  \n  PACKET_DECL_COND_PREFIX(_, Lhs, _PacketSize);\n  PACKET_DECL_COND_PREFIX(_, Rhs, _PacketSize);\n  PACKET_DECL_COND_PREFIX(_, Res, _PacketSize);\n  PACKET_DECL_COND(Real, _PacketSize);\n  PACKET_DECL_COND_SCALAR(_PacketSize);\n\n  enum {\n    ConjLhs = _ConjLhs,\n    ConjRhs = _ConjRhs,\n    Vectorizable = unpacket_traits<RealPacket>::vectorizable\n                && unpacket_traits<ScalarPacket>::vectorizable,\n    ResPacketSize   = Vectorizable ? unpacket_traits<_ResPacket>::size : 1,\n    LhsPacketSize = Vectorizable ? unpacket_traits<_LhsPacket>::size : 1,\n    RhsPacketSize = Vectorizable ? unpacket_traits<RhsScalar>::size : 1,\n    RealPacketSize  = Vectorizable ? unpacket_traits<RealPacket>::size : 1,\n\n    // FIXME: should depend on NumberOfRegisters\n    nr = 4,\n    mr = ResPacketSize,\n\n    LhsProgress = ResPacketSize,\n    RhsProgress = 1\n  };\n  \n  typedef DoublePacket<RealPacket>                 DoublePacketType;\n\n  typedef typename conditional<Vectorizable,ScalarPacket,Scalar>::type LhsPacket4Packing;\n  typedef typename conditional<Vectorizable,RealPacket,  Scalar>::type LhsPacket;\n  typedef typename conditional<Vectorizable,DoublePacketType,Scalar>::type RhsPacket;\n  typedef typename conditional<Vectorizable,ScalarPacket,Scalar>::type ResPacket;\n  typedef typename conditional<Vectorizable,DoublePacketType,Scalar>::type AccPacket;\n\n  // this actualy holds 8 packets!\n  typedef QuadPacket<RhsPacket> RhsPacketx4;\n  \n  EIGEN_STRONG_INLINE void initAcc(Scalar& p) { p = Scalar(0); }\n\n  EIGEN_STRONG_INLINE void initAcc(DoublePacketType& p)\n  {\n    p.first   = pset1<RealPacket>(RealScalar(0));\n    p.second  = pset1<RealPacket>(RealScalar(0));\n  }\n\n  // Scalar path\n  EIGEN_STRONG_INLINE void loadRhs(const RhsScalar* b, ScalarPacket& dest) const\n  {\n    dest = pset1<ScalarPacket>(*b);\n  }\n\n  // Vectorized path\n  template<typename RealPacketType>\n  EIGEN_STRONG_INLINE void loadRhs(const RhsScalar* b, DoublePacket<RealPacketType>& dest) const\n  {\n    dest.first  = pset1<RealPacketType>(numext::real(*b));\n    dest.second = pset1<RealPacketType>(numext::imag(*b));\n  }\n\n  EIGEN_STRONG_INLINE void loadRhs(const RhsScalar* b, RhsPacketx4& dest) const\n  {\n    loadRhs(b, dest.B_0);\n    loadRhs(b + 1, dest.B1);\n    loadRhs(b + 2, dest.B2);\n    loadRhs(b + 3, dest.B3);\n  }\n\n  // Scalar path\n  EIGEN_STRONG_INLINE void updateRhs(const RhsScalar* b, ScalarPacket& dest) const\n  {\n    loadRhs(b, dest);\n  }\n\n  // Vectorized path\n  template<typename RealPacketType>\n  EIGEN_STRONG_INLINE void updateRhs(const RhsScalar* b, DoublePacket<RealPacketType>& dest) const\n  {\n    loadRhs(b, dest);\n  }\n\n  EIGEN_STRONG_INLINE void updateRhs(const RhsScalar*, RhsPacketx4&) const {}\n  \n  EIGEN_STRONG_INLINE void loadRhsQuad(const RhsScalar* b, ResPacket& dest) const\n  {\n    loadRhs(b,dest);\n  }\n  EIGEN_STRONG_INLINE void loadRhsQuad(const RhsScalar* b, DoublePacketType& dest) const\n  {\n    loadQuadToDoublePacket(b,dest);\n  }\n\n  // nothing special here\n  EIGEN_STRONG_INLINE void loadLhs(const LhsScalar* a, LhsPacket& dest) const\n  {\n    dest = pload<LhsPacket>((const typename unpacket_traits<LhsPacket>::type*)(a));\n  }\n\n  template<typename LhsPacketType>\n  EIGEN_STRONG_INLINE void loadLhsUnaligned(const LhsScalar* a, LhsPacketType& dest) const\n  {\n    dest = ploadu<LhsPacketType>((const typename unpacket_traits<LhsPacketType>::type*)(a));\n  }\n\n  template<typename LhsPacketType, typename RhsPacketType, typename ResPacketType, typename TmpType, typename LaneIdType>\n  EIGEN_STRONG_INLINE\n  typename enable_if<!is_same<RhsPacketType,RhsPacketx4>::value>::type\n  madd(const LhsPacketType& a, const RhsPacketType& b, DoublePacket<ResPacketType>& c, TmpType& /*tmp*/, const LaneIdType&) const\n  {\n    c.first   = padd(pmul(a,b.first), c.first);\n    c.second  = padd(pmul(a,b.second),c.second);\n  }\n\n  template<typename LaneIdType>\n  EIGEN_STRONG_INLINE void madd(const LhsPacket& a, const RhsPacket& b, ResPacket& c, RhsPacket& /*tmp*/, const LaneIdType&) const\n  {\n    c = cj.pmadd(a,b,c);\n  }\n\n  template<typename LhsPacketType, typename AccPacketType, typename LaneIdType>\n  EIGEN_STRONG_INLINE void madd(const LhsPacketType& a, const RhsPacketx4& b, AccPacketType& c, RhsPacket& tmp, const LaneIdType& lane) const\n  {\n    madd(a, b.get(lane), c, tmp, lane);\n  }\n  \n  EIGEN_STRONG_INLINE void acc(const Scalar& c, const Scalar& alpha, Scalar& r) const { r += alpha * c; }\n  \n  template<typename RealPacketType, typename ResPacketType>\n  EIGEN_STRONG_INLINE void acc(const DoublePacket<RealPacketType>& c, const ResPacketType& alpha, ResPacketType& r) const\n  {\n    // assemble c\n    ResPacketType tmp;\n    if((!ConjLhs)&&(!ConjRhs))\n    {\n      tmp = pcplxflip(pconj(ResPacketType(c.second)));\n      tmp = padd(ResPacketType(c.first),tmp);\n    }\n    else if((!ConjLhs)&&(ConjRhs))\n    {\n      tmp = pconj(pcplxflip(ResPacketType(c.second)));\n      tmp = padd(ResPacketType(c.first),tmp);\n    }\n    else if((ConjLhs)&&(!ConjRhs))\n    {\n      tmp = pcplxflip(ResPacketType(c.second));\n      tmp = padd(pconj(ResPacketType(c.first)),tmp);\n    }\n    else if((ConjLhs)&&(ConjRhs))\n    {\n      tmp = pcplxflip(ResPacketType(c.second));\n      tmp = psub(pconj(ResPacketType(c.first)),tmp);\n    }\n    \n    r = pmadd(tmp,alpha,r);\n  }\n\nprotected:\n  conj_helper<LhsScalar,RhsScalar,ConjLhs,ConjRhs> cj;\n};\n\ntemplate<typename RealScalar, bool _ConjRhs, int Arch, int _PacketSize>\nclass gebp_traits<RealScalar, std::complex<RealScalar>, false, _ConjRhs, Arch, _PacketSize >\n{\npublic:\n  typedef std::complex<RealScalar>  Scalar;\n  typedef RealScalar  LhsScalar;\n  typedef Scalar      RhsScalar;\n  typedef Scalar      ResScalar;\n\n  PACKET_DECL_COND_PREFIX(_, Lhs, _PacketSize);\n  PACKET_DECL_COND_PREFIX(_, Rhs, _PacketSize);\n  PACKET_DECL_COND_PREFIX(_, Res, _PacketSize);\n  PACKET_DECL_COND_PREFIX(_, Real, _PacketSize);\n  PACKET_DECL_COND_SCALAR_PREFIX(_, _PacketSize);\n\n#undef PACKET_DECL_COND_SCALAR_PREFIX\n#undef PACKET_DECL_COND_PREFIX\n#undef PACKET_DECL_COND_SCALAR\n#undef PACKET_DECL_COND\n\n  enum {\n    ConjLhs = false,\n    ConjRhs = _ConjRhs,\n    Vectorizable = unpacket_traits<_RealPacket>::vectorizable\n                && unpacket_traits<_ScalarPacket>::vectorizable,\n    LhsPacketSize = Vectorizable ? unpacket_traits<_LhsPacket>::size : 1,\n    RhsPacketSize = Vectorizable ? unpacket_traits<_RhsPacket>::size : 1,\n    ResPacketSize = Vectorizable ? unpacket_traits<_ResPacket>::size : 1,\n    \n    NumberOfRegisters = EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS,\n    // FIXME: should depend on NumberOfRegisters\n    nr = 4,\n    mr = (EIGEN_PLAIN_ENUM_MIN(16,NumberOfRegisters)/2/nr)*ResPacketSize,\n\n    LhsProgress = ResPacketSize,\n    RhsProgress = 1\n  };\n\n  typedef typename conditional<Vectorizable,_LhsPacket,LhsScalar>::type LhsPacket;\n  typedef typename conditional<Vectorizable,_RhsPacket,RhsScalar>::type RhsPacket;\n  typedef typename conditional<Vectorizable,_ResPacket,ResScalar>::type ResPacket;\n  typedef LhsPacket LhsPacket4Packing;\n  typedef QuadPacket<RhsPacket> RhsPacketx4;\n  typedef ResPacket AccPacket;\n\n  EIGEN_STRONG_INLINE void initAcc(AccPacket& p)\n  {\n    p = pset1<ResPacket>(ResScalar(0));\n  }\n\n  template<typename RhsPacketType>\n  EIGEN_STRONG_INLINE void loadRhs(const RhsScalar* b, RhsPacketType& dest) const\n  {\n    dest = pset1<RhsPacketType>(*b);\n  }\n\n  EIGEN_STRONG_INLINE void loadRhs(const RhsScalar* b, RhsPacketx4& dest) const\n  {\n    pbroadcast4(b, dest.B_0, dest.B1, dest.B2, dest.B3);\n  }\n\n  template<typename RhsPacketType>\n  EIGEN_STRONG_INLINE void updateRhs(const RhsScalar* b, RhsPacketType& dest) const\n  {\n    loadRhs(b, dest);\n  }\n\n  EIGEN_STRONG_INLINE void updateRhs(const RhsScalar*, RhsPacketx4&) const\n  {}\n\n  EIGEN_STRONG_INLINE void loadLhs(const LhsScalar* a, LhsPacket& dest) const\n  {\n    dest = ploaddup<LhsPacket>(a);\n  }\n  \n  EIGEN_STRONG_INLINE void loadRhsQuad(const RhsScalar* b, RhsPacket& dest) const\n  {\n    dest = ploadquad<RhsPacket>(b);\n  }\n\n  template<typename LhsPacketType>\n  EIGEN_STRONG_INLINE void loadLhsUnaligned(const LhsScalar* a, LhsPacketType& dest) const\n  {\n    dest = ploaddup<LhsPacketType>(a);\n  }\n\n  template <typename LhsPacketType, typename RhsPacketType, typename AccPacketType, typename LaneIdType>\n  EIGEN_STRONG_INLINE void madd(const LhsPacketType& a, const RhsPacketType& b, AccPacketType& c, RhsPacketType& tmp, const LaneIdType&) const\n  {\n    madd_impl(a, b, c, tmp, typename conditional<Vectorizable,true_type,false_type>::type());\n  }\n\n  template <typename LhsPacketType, typename RhsPacketType, typename AccPacketType>\n  EIGEN_STRONG_INLINE void madd_impl(const LhsPacketType& a, const RhsPacketType& b, AccPacketType& c, RhsPacketType& tmp, const true_type&) const\n  {\n#ifdef EIGEN_HAS_SINGLE_INSTRUCTION_MADD\n    EIGEN_UNUSED_VARIABLE(tmp);\n    c.v = pmadd(a,b.v,c.v);\n#else\n    tmp = b; tmp.v = pmul(a,tmp.v); c = padd(c,tmp);\n#endif\n    \n  }\n\n  EIGEN_STRONG_INLINE void madd_impl(const LhsScalar& a, const RhsScalar& b, ResScalar& c, RhsScalar& /*tmp*/, const false_type&) const\n  {\n    c += a * b;\n  }\n\n  template<typename LhsPacketType, typename AccPacketType, typename LaneIdType>\n  EIGEN_STRONG_INLINE void madd(const LhsPacketType& a, const RhsPacketx4& b, AccPacketType& c, RhsPacket& tmp, const LaneIdType& lane) const\n  {\n    madd(a, b.get(lane), c, tmp, lane);\n  }\n\n  template <typename ResPacketType, typename AccPacketType>\n  EIGEN_STRONG_INLINE void acc(const AccPacketType& c, const ResPacketType& alpha, ResPacketType& r) const\n  {\n    conj_helper<ResPacketType,ResPacketType,false,ConjRhs> cj;\n    r = cj.pmadd(alpha,c,r);\n  }\n\nprotected:\n\n};\n\n\n#if EIGEN_ARCH_ARM64 && defined EIGEN_VECTORIZE_NEON\n\ntemplate<>\nstruct gebp_traits <float, float, false, false,Architecture::NEON,GEBPPacketFull>\n : gebp_traits<float,float,false,false,Architecture::Generic,GEBPPacketFull>\n{\n  typedef float RhsPacket;\n\n  typedef float32x4_t RhsPacketx4;\n\n  EIGEN_STRONG_INLINE void loadRhs(const RhsScalar* b, RhsPacket& dest) const\n  {\n    dest = *b;\n  }\n\n  EIGEN_STRONG_INLINE void loadRhs(const RhsScalar* b, RhsPacketx4& dest) const\n  {\n    dest = vld1q_f32(b);\n  }\n\n  EIGEN_STRONG_INLINE void updateRhs(const RhsScalar* b, RhsPacket& dest) const\n  {\n    dest = *b;\n  }\n\n  EIGEN_STRONG_INLINE void updateRhs(const RhsScalar* b, RhsPacketx4& dest) const\n  {}\n\n  EIGEN_STRONG_INLINE void loadRhsQuad(const RhsScalar* b, RhsPacket& dest) const\n  {\n    loadRhs(b,dest);\n  }\n\n  EIGEN_STRONG_INLINE void madd(const LhsPacket& a, const RhsPacket& b, AccPacket& c, RhsPacket& /*tmp*/, const FixedInt<0>&) const\n  {\n    c = vfmaq_n_f32(c, a, b);\n  }\n\n  // NOTE: Template parameter inference failed when compiled with Android NDK:\n  // \"candidate template ignored: could not match 'FixedInt<N>' against 'Eigen::internal::FixedInt<0>\".\n\n  EIGEN_STRONG_INLINE void madd(const LhsPacket& a, const RhsPacketx4& b, AccPacket& c, RhsPacket& /*tmp*/, const FixedInt<0>&) const\n  { madd_helper<0>(a, b, c); }\n  EIGEN_STRONG_INLINE void madd(const LhsPacket& a, const RhsPacketx4& b, AccPacket& c, RhsPacket& /*tmp*/, const FixedInt<1>&) const\n  { madd_helper<1>(a, b, c); }\n  EIGEN_STRONG_INLINE void madd(const LhsPacket& a, const RhsPacketx4& b, AccPacket& c, RhsPacket& /*tmp*/, const FixedInt<2>&) const\n  { madd_helper<2>(a, b, c); }\n  EIGEN_STRONG_INLINE void madd(const LhsPacket& a, const RhsPacketx4& b, AccPacket& c, RhsPacket& /*tmp*/, const FixedInt<3>&) const\n  { madd_helper<3>(a, b, c); }\n\n private:\n  template<int LaneID>\n  EIGEN_STRONG_INLINE void madd_helper(const LhsPacket& a, const RhsPacketx4& b, AccPacket& c) const\n  {\n    #if EIGEN_COMP_GNUC_STRICT && !(EIGEN_GNUC_AT_LEAST(9,0))\n    // workaround gcc issue https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89101\n    // vfmaq_laneq_f32 is implemented through a costly dup\n         if(LaneID==0)  asm(\"fmla %0.4s, %1.4s, %2.s[0]\\n\" : \"+w\" (c) : \"w\" (a), \"w\" (b) :  );\n    else if(LaneID==1)  asm(\"fmla %0.4s, %1.4s, %2.s[1]\\n\" : \"+w\" (c) : \"w\" (a), \"w\" (b) :  );\n    else if(LaneID==2)  asm(\"fmla %0.4s, %1.4s, %2.s[2]\\n\" : \"+w\" (c) : \"w\" (a), \"w\" (b) :  );\n    else if(LaneID==3)  asm(\"fmla %0.4s, %1.4s, %2.s[3]\\n\" : \"+w\" (c) : \"w\" (a), \"w\" (b) :  );\n    #else\n    c = vfmaq_laneq_f32(c, a, b, LaneID);\n    #endif\n  }\n};\n\n\ntemplate<>\nstruct gebp_traits <double, double, false, false,Architecture::NEON>\n : gebp_traits<double,double,false,false,Architecture::Generic>\n{\n  typedef double RhsPacket;\n\n  struct RhsPacketx4 {\n    float64x2_t B_0, B_1;\n  };\n\n  EIGEN_STRONG_INLINE void loadRhs(const RhsScalar* b, RhsPacket& dest) const\n  {\n    dest = *b;\n  }\n\n  EIGEN_STRONG_INLINE void loadRhs(const RhsScalar* b, RhsPacketx4& dest) const\n  {\n    dest.B_0 = vld1q_f64(b);\n    dest.B_1 = vld1q_f64(b+2);\n  }\n\n  EIGEN_STRONG_INLINE void updateRhs(const RhsScalar* b, RhsPacket& dest) const\n  {\n    loadRhs(b,dest);\n  }\n\n  EIGEN_STRONG_INLINE void updateRhs(const RhsScalar* b, RhsPacketx4& dest) const\n  {}\n\n  EIGEN_STRONG_INLINE void loadRhsQuad(const RhsScalar* b, RhsPacket& dest) const\n  {\n    loadRhs(b,dest);\n  }\n\n  EIGEN_STRONG_INLINE void madd(const LhsPacket& a, const RhsPacket& b, AccPacket& c, RhsPacket& /*tmp*/, const FixedInt<0>&) const\n  {\n    c = vfmaq_n_f64(c, a, b);\n  }\n\n  // NOTE: Template parameter inference failed when compiled with Android NDK:\n  // \"candidate template ignored: could not match 'FixedInt<N>' against 'Eigen::internal::FixedInt<0>\".\n\n  EIGEN_STRONG_INLINE void madd(const LhsPacket& a, const RhsPacketx4& b, AccPacket& c, RhsPacket& /*tmp*/, const FixedInt<0>&) const\n  { madd_helper<0>(a, b, c); }\n  EIGEN_STRONG_INLINE void madd(const LhsPacket& a, const RhsPacketx4& b, AccPacket& c, RhsPacket& /*tmp*/, const FixedInt<1>&) const\n  { madd_helper<1>(a, b, c); }\n  EIGEN_STRONG_INLINE void madd(const LhsPacket& a, const RhsPacketx4& b, AccPacket& c, RhsPacket& /*tmp*/, const FixedInt<2>&) const\n  { madd_helper<2>(a, b, c); }\n  EIGEN_STRONG_INLINE void madd(const LhsPacket& a, const RhsPacketx4& b, AccPacket& c, RhsPacket& /*tmp*/, const FixedInt<3>&) const\n  { madd_helper<3>(a, b, c); }\n\n private:\n  template <int LaneID>\n  EIGEN_STRONG_INLINE void madd_helper(const LhsPacket& a, const RhsPacketx4& b, AccPacket& c) const\n  {\n    #if EIGEN_COMP_GNUC_STRICT && !(EIGEN_GNUC_AT_LEAST(9,0))\n    // workaround gcc issue https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89101\n    // vfmaq_laneq_f64 is implemented through a costly dup\n         if(LaneID==0)  asm(\"fmla %0.2d, %1.2d, %2.d[0]\\n\" : \"+w\" (c) : \"w\" (a), \"w\" (b.B_0) :  );\n    else if(LaneID==1)  asm(\"fmla %0.2d, %1.2d, %2.d[1]\\n\" : \"+w\" (c) : \"w\" (a), \"w\" (b.B_0) :  );\n    else if(LaneID==2)  asm(\"fmla %0.2d, %1.2d, %2.d[0]\\n\" : \"+w\" (c) : \"w\" (a), \"w\" (b.B_1) :  );\n    else if(LaneID==3)  asm(\"fmla %0.2d, %1.2d, %2.d[1]\\n\" : \"+w\" (c) : \"w\" (a), \"w\" (b.B_1) :  );\n    #else\n         if(LaneID==0) c = vfmaq_laneq_f64(c, a, b.B_0, 0);\n    else if(LaneID==1) c = vfmaq_laneq_f64(c, a, b.B_0, 1);\n    else if(LaneID==2) c = vfmaq_laneq_f64(c, a, b.B_1, 0);\n    else if(LaneID==3) c = vfmaq_laneq_f64(c, a, b.B_1, 1);\n    #endif\n  }\n};\n\n#endif\n\n/* optimized General packed Block * packed Panel product kernel\n *\n * Mixing type logic: C += A * B\n *  |  A  |  B  | comments\n *  |real |cplx | no vectorization yet, would require to pack A with duplication\n *  |cplx |real | easy vectorization\n */\ntemplate<typename LhsScalar, typename RhsScalar, typename Index, typename DataMapper, int mr, int nr, bool ConjugateLhs, bool ConjugateRhs>\nstruct gebp_kernel\n{\n  typedef gebp_traits<LhsScalar,RhsScalar,ConjugateLhs,ConjugateRhs,Architecture::Target> Traits;\n  typedef gebp_traits<LhsScalar,RhsScalar,ConjugateLhs,ConjugateRhs,Architecture::Target,GEBPPacketHalf> HalfTraits;\n  typedef gebp_traits<LhsScalar,RhsScalar,ConjugateLhs,ConjugateRhs,Architecture::Target,GEBPPacketQuarter> QuarterTraits;\n  \n  typedef typename Traits::ResScalar ResScalar;\n  typedef typename Traits::LhsPacket LhsPacket;\n  typedef typename Traits::RhsPacket RhsPacket;\n  typedef typename Traits::ResPacket ResPacket;\n  typedef typename Traits::AccPacket AccPacket;\n  typedef typename Traits::RhsPacketx4 RhsPacketx4;\n\n  typedef typename RhsPanelHelper<RhsPacket, RhsPacketx4, 15>::type RhsPanel15;\n\n  typedef gebp_traits<RhsScalar,LhsScalar,ConjugateRhs,ConjugateLhs,Architecture::Target> SwappedTraits;\n\n  typedef typename SwappedTraits::ResScalar SResScalar;\n  typedef typename SwappedTraits::LhsPacket SLhsPacket;\n  typedef typename SwappedTraits::RhsPacket SRhsPacket;\n  typedef typename SwappedTraits::ResPacket SResPacket;\n  typedef typename SwappedTraits::AccPacket SAccPacket;\n\n  typedef typename HalfTraits::LhsPacket LhsPacketHalf;\n  typedef typename HalfTraits::RhsPacket RhsPacketHalf;\n  typedef typename HalfTraits::ResPacket ResPacketHalf;\n  typedef typename HalfTraits::AccPacket AccPacketHalf;\n\n  typedef typename QuarterTraits::LhsPacket LhsPacketQuarter;\n  typedef typename QuarterTraits::RhsPacket RhsPacketQuarter;\n  typedef typename QuarterTraits::ResPacket ResPacketQuarter;\n  typedef typename QuarterTraits::AccPacket AccPacketQuarter;\n\n  typedef typename DataMapper::LinearMapper LinearMapper;\n\n  enum {\n    Vectorizable  = Traits::Vectorizable,\n    LhsProgress   = Traits::LhsProgress,\n    LhsProgressHalf      = HalfTraits::LhsProgress,\n    LhsProgressQuarter   = QuarterTraits::LhsProgress,\n    RhsProgress   = Traits::RhsProgress,\n    RhsProgressHalf      = HalfTraits::RhsProgress,\n    RhsProgressQuarter   = QuarterTraits::RhsProgress,\n    ResPacketSize = Traits::ResPacketSize\n  };\n\n  EIGEN_DONT_INLINE\n  void operator()(const DataMapper& res, const LhsScalar* blockA, const RhsScalar* blockB,\n                  Index rows, Index depth, Index cols, ResScalar alpha,\n                  Index strideA=-1, Index strideB=-1, Index offsetA=0, Index offsetB=0);\n};\n\ntemplate<typename LhsScalar, typename RhsScalar, typename Index, typename DataMapper, int mr, int nr, bool ConjugateLhs, bool ConjugateRhs,\nint SwappedLhsProgress = gebp_traits<RhsScalar,LhsScalar,ConjugateRhs,ConjugateLhs,Architecture::Target>::LhsProgress>\nstruct last_row_process_16_packets\n{\n  typedef gebp_traits<LhsScalar,RhsScalar,ConjugateLhs,ConjugateRhs,Architecture::Target> Traits;\n  typedef gebp_traits<RhsScalar,LhsScalar,ConjugateRhs,ConjugateLhs,Architecture::Target> SwappedTraits;\n\n  typedef typename Traits::ResScalar ResScalar;\n  typedef typename SwappedTraits::LhsPacket SLhsPacket;\n  typedef typename SwappedTraits::RhsPacket SRhsPacket;\n  typedef typename SwappedTraits::ResPacket SResPacket;\n  typedef typename SwappedTraits::AccPacket SAccPacket;\n\n  EIGEN_STRONG_INLINE void operator()(const DataMapper& res, SwappedTraits &straits, const LhsScalar* blA,\n                  const RhsScalar* blB, Index depth, const Index endk, Index i, Index j2,\n                  ResScalar alpha, SAccPacket &C0)\n    {\n      EIGEN_UNUSED_VARIABLE(res);\n      EIGEN_UNUSED_VARIABLE(straits);\n      EIGEN_UNUSED_VARIABLE(blA);\n      EIGEN_UNUSED_VARIABLE(blB);\n      EIGEN_UNUSED_VARIABLE(depth);\n      EIGEN_UNUSED_VARIABLE(endk);\n      EIGEN_UNUSED_VARIABLE(i);\n      EIGEN_UNUSED_VARIABLE(j2);\n      EIGEN_UNUSED_VARIABLE(alpha);\n      EIGEN_UNUSED_VARIABLE(C0);\n    }\n};\n\n\ntemplate<typename LhsScalar, typename RhsScalar, typename Index, typename DataMapper, int mr, int nr, bool ConjugateLhs, bool ConjugateRhs>\nstruct last_row_process_16_packets<LhsScalar, RhsScalar, Index, DataMapper,  mr,  nr, ConjugateLhs,  ConjugateRhs, 16> {\n  typedef gebp_traits<LhsScalar,RhsScalar,ConjugateLhs,ConjugateRhs,Architecture::Target> Traits;\n  typedef gebp_traits<RhsScalar,LhsScalar,ConjugateRhs,ConjugateLhs,Architecture::Target> SwappedTraits;\n\n  typedef typename Traits::ResScalar ResScalar;\n  typedef typename SwappedTraits::LhsPacket SLhsPacket;\n  typedef typename SwappedTraits::RhsPacket SRhsPacket;\n  typedef typename SwappedTraits::ResPacket SResPacket;\n  typedef typename SwappedTraits::AccPacket SAccPacket;\n\n  EIGEN_STRONG_INLINE void operator()(const DataMapper& res, SwappedTraits &straits, const LhsScalar* blA,\n                  const RhsScalar* blB, Index depth, const Index endk, Index i, Index j2,\n                  ResScalar alpha, SAccPacket &C0)\n  {\n    typedef typename unpacket_traits<typename unpacket_traits<SResPacket>::half>::half SResPacketQuarter;\n    typedef typename unpacket_traits<typename unpacket_traits<SLhsPacket>::half>::half SLhsPacketQuarter;\n    typedef typename unpacket_traits<typename unpacket_traits<SRhsPacket>::half>::half SRhsPacketQuarter;\n    typedef typename unpacket_traits<typename unpacket_traits<SAccPacket>::half>::half SAccPacketQuarter;\n\n    SResPacketQuarter R = res.template gatherPacket<SResPacketQuarter>(i, j2);\n    SResPacketQuarter alphav = pset1<SResPacketQuarter>(alpha);\n\n    if (depth - endk > 0)\n      {\n\t// We have to handle the last row(s) of the rhs, which\n\t// correspond to a half-packet\n\tSAccPacketQuarter c0 = predux_half_dowto4(predux_half_dowto4(C0));\n\n\tfor (Index kk = endk; kk < depth; kk++)\n\t  {\n\t    SLhsPacketQuarter a0;\n\t    SRhsPacketQuarter b0;\n\t    straits.loadLhsUnaligned(blB, a0);\n\t    straits.loadRhs(blA, b0);\n\t    straits.madd(a0,b0,c0,b0, fix<0>);\n\t    blB += SwappedTraits::LhsProgress/4;\n\t    blA += 1;\n\t  }\n\tstraits.acc(c0, alphav, R);\n      }\n    else\n      {\n\tstraits.acc(predux_half_dowto4(predux_half_dowto4(C0)), alphav, R);\n      }\n    res.scatterPacket(i, j2, R);\n  }\n};\n\ntemplate<int nr, Index LhsProgress, Index RhsProgress, typename LhsScalar, typename RhsScalar, typename ResScalar, typename AccPacket, typename LhsPacket, typename RhsPacket, typename ResPacket, typename GEBPTraits, typename LinearMapper, typename DataMapper>\nstruct lhs_process_one_packet\n{\n  typedef typename GEBPTraits::RhsPacketx4 RhsPacketx4;\n\n  EIGEN_STRONG_INLINE void peeled_kc_onestep(Index K, const LhsScalar* blA, const RhsScalar* blB, GEBPTraits traits, LhsPacket *A0, RhsPacketx4 *rhs_panel, RhsPacket *T0, AccPacket *C0, AccPacket *C1, AccPacket *C2, AccPacket *C3)\n  {\n    EIGEN_ASM_COMMENT(\"begin step of gebp micro kernel 1X4\");\n    EIGEN_ASM_COMMENT(\"Note: these asm comments work around bug 935!\");\n    traits.loadLhs(&blA[(0+1*K)*LhsProgress], *A0);\n    traits.loadRhs(&blB[(0+4*K)*RhsProgress], *rhs_panel);\n    traits.madd(*A0, *rhs_panel, *C0, *T0, fix<0>);\n    traits.madd(*A0, *rhs_panel, *C1, *T0, fix<1>);\n    traits.madd(*A0, *rhs_panel, *C2, *T0, fix<2>);\n    traits.madd(*A0, *rhs_panel, *C3, *T0, fix<3>);\n    #if EIGEN_GNUC_AT_LEAST(6,0) && defined(EIGEN_VECTORIZE_SSE)\n    __asm__  (\"\" : \"+x,m\" (*A0));\n    #endif\n    EIGEN_ASM_COMMENT(\"end step of gebp micro kernel 1X4\");\n  }\n\n  EIGEN_STRONG_INLINE void operator()(\n    const DataMapper& res, const LhsScalar* blockA, const RhsScalar* blockB, ResScalar alpha,\n    Index peelStart, Index peelEnd, Index strideA, Index strideB, Index offsetA, Index offsetB,\n    int prefetch_res_offset, Index peeled_kc, Index pk, Index cols, Index depth, Index packet_cols4)\n  {\n    GEBPTraits traits;\n\n    // loops on each largest micro horizontal panel of lhs\n    // (LhsProgress x depth)\n    for(Index i=peelStart; i<peelEnd; i+=LhsProgress)\n    {\n      // loops on each largest micro vertical panel of rhs (depth * nr)\n      for(Index j2=0; j2<packet_cols4; j2+=nr)\n      {\n        // We select a LhsProgress x nr micro block of res\n        // which is entirely stored into 1 x nr registers.\n\n        const LhsScalar* blA = &blockA[i*strideA+offsetA*(LhsProgress)];\n        prefetch(&blA[0]);\n\n        // gets res block as register\n        AccPacket C0, C1, C2, C3;\n        traits.initAcc(C0);\n        traits.initAcc(C1);\n        traits.initAcc(C2);\n        traits.initAcc(C3);\n        // To improve instruction pipelining, let's double the accumulation registers:\n        //  even k will accumulate in C*, while odd k will accumulate in D*.\n        // This trick is crutial to get good performance with FMA, otherwise it is \n        // actually faster to perform separated MUL+ADD because of a naturally\n        // better instruction-level parallelism.\n        AccPacket D0, D1, D2, D3;\n        traits.initAcc(D0);\n        traits.initAcc(D1);\n        traits.initAcc(D2);\n        traits.initAcc(D3);\n\n        LinearMapper r0 = res.getLinearMapper(i, j2 + 0);\n        LinearMapper r1 = res.getLinearMapper(i, j2 + 1);\n        LinearMapper r2 = res.getLinearMapper(i, j2 + 2);\n        LinearMapper r3 = res.getLinearMapper(i, j2 + 3);\n\n        r0.prefetch(prefetch_res_offset);\n        r1.prefetch(prefetch_res_offset);\n        r2.prefetch(prefetch_res_offset);\n        r3.prefetch(prefetch_res_offset);\n\n        // performs \"inner\" products\n        const RhsScalar* blB = &blockB[j2*strideB+offsetB*nr];\n        prefetch(&blB[0]);\n        LhsPacket A0, A1;\n\n        for(Index k=0; k<peeled_kc; k+=pk)\n        {\n          EIGEN_ASM_COMMENT(\"begin gebp micro kernel 1/half/quarterX4\");\n          RhsPacketx4 rhs_panel;\n          RhsPacket T0;\n\n          internal::prefetch(blB+(48+0));\n          peeled_kc_onestep(0, blA, blB, traits, &A0, &rhs_panel, &T0, &C0, &C1, &C2, &C3);\n          peeled_kc_onestep(1, blA, blB, traits, &A1, &rhs_panel, &T0, &D0, &D1, &D2, &D3);\n          peeled_kc_onestep(2, blA, blB, traits, &A0, &rhs_panel, &T0, &C0, &C1, &C2, &C3);\n          peeled_kc_onestep(3, blA, blB, traits, &A1, &rhs_panel, &T0, &D0, &D1, &D2, &D3);\n          internal::prefetch(blB+(48+16));\n          peeled_kc_onestep(4, blA, blB, traits, &A0, &rhs_panel, &T0, &C0, &C1, &C2, &C3);\n          peeled_kc_onestep(5, blA, blB, traits, &A1, &rhs_panel, &T0, &D0, &D1, &D2, &D3);\n          peeled_kc_onestep(6, blA, blB, traits, &A0, &rhs_panel, &T0, &C0, &C1, &C2, &C3);\n          peeled_kc_onestep(7, blA, blB, traits, &A1, &rhs_panel, &T0, &D0, &D1, &D2, &D3);\n\n          blB += pk*4*RhsProgress;\n          blA += pk*LhsProgress;\n\n          EIGEN_ASM_COMMENT(\"end gebp micro kernel 1/half/quarterX4\");\n        }\n        C0 = padd(C0,D0);\n        C1 = padd(C1,D1);\n        C2 = padd(C2,D2);\n        C3 = padd(C3,D3);\n\n        // process remaining peeled loop\n        for(Index k=peeled_kc; k<depth; k++)\n        {\n          RhsPacketx4 rhs_panel;\n          RhsPacket T0;\n          peeled_kc_onestep(0, blA, blB, traits, &A0, &rhs_panel, &T0, &C0, &C1, &C2, &C3);\n          blB += 4*RhsProgress;\n          blA += LhsProgress;\n        }\n\n        ResPacket R0, R1;\n        ResPacket alphav = pset1<ResPacket>(alpha);\n\n        R0 = r0.template loadPacket<ResPacket>(0);\n        R1 = r1.template loadPacket<ResPacket>(0);\n        traits.acc(C0, alphav, R0);\n        traits.acc(C1,  alphav, R1);\n        r0.storePacket(0, R0);\n        r1.storePacket(0, R1);\n\n        R0 = r2.template loadPacket<ResPacket>(0);\n        R1 = r3.template loadPacket<ResPacket>(0);\n        traits.acc(C2,  alphav, R0);\n        traits.acc(C3,  alphav, R1);\n        r2.storePacket(0, R0);\n        r3.storePacket(0, R1);\n      }\n\n      // Deal with remaining columns of the rhs\n      for(Index j2=packet_cols4; j2<cols; j2++)\n      {\n        // One column at a time\n        const LhsScalar* blA = &blockA[i*strideA+offsetA*(LhsProgress)];\n        prefetch(&blA[0]);\n\n        // gets res block as register\n        AccPacket C0;\n        traits.initAcc(C0);\n\n        LinearMapper r0 = res.getLinearMapper(i, j2);\n\n        // performs \"inner\" products\n        const RhsScalar* blB = &blockB[j2*strideB+offsetB];\n        LhsPacket A0;\n\n        for(Index k= 0; k<peeled_kc; k+=pk)\n        {\n          EIGEN_ASM_COMMENT(\"begin gebp micro kernel 1/half/quarterX1\");\n          RhsPacket B_0;\n\n#define EIGEN_GEBGP_ONESTEP(K)                                          \\\n\t      do {                                                      \\\n\t\tEIGEN_ASM_COMMENT(\"begin step of gebp micro kernel 1/half/quarterX1\"); \\\n\t\tEIGEN_ASM_COMMENT(\"Note: these asm comments work around bug 935!\"); \\\n    /* FIXME: why unaligned???? */ \\\n\t\ttraits.loadLhsUnaligned(&blA[(0+1*K)*LhsProgress], A0); \\\n\t\ttraits.loadRhs(&blB[(0+K)*RhsProgress], B_0);\t\t\\\n\t\ttraits.madd(A0, B_0, C0, B_0, fix<0>);\t\t\t\t\\\n\t\tEIGEN_ASM_COMMENT(\"end step of gebp micro kernel 1/half/quarterX1\"); \\\n\t      } while(false);\n\n          EIGEN_GEBGP_ONESTEP(0);\n          EIGEN_GEBGP_ONESTEP(1);\n          EIGEN_GEBGP_ONESTEP(2);\n          EIGEN_GEBGP_ONESTEP(3);\n          EIGEN_GEBGP_ONESTEP(4);\n          EIGEN_GEBGP_ONESTEP(5);\n          EIGEN_GEBGP_ONESTEP(6);\n          EIGEN_GEBGP_ONESTEP(7);\n\n          blB += pk*RhsProgress;\n          blA += pk*LhsProgress;\n\n          EIGEN_ASM_COMMENT(\"end gebp micro kernel 1/half/quarterX1\");\n        }\n\n        // process remaining peeled loop\n        for(Index k=peeled_kc; k<depth; k++)\n        {\n          RhsPacket B_0;\n          EIGEN_GEBGP_ONESTEP(0);\n          blB += RhsProgress;\n          blA += LhsProgress;\n        }\n#undef EIGEN_GEBGP_ONESTEP\n        ResPacket R0;\n        ResPacket alphav = pset1<ResPacket>(alpha);\n        R0 = r0.template loadPacket<ResPacket>(0);\n        traits.acc(C0, alphav, R0);\n        r0.storePacket(0, R0);\n      }\n    }\n  }\n};\n\ntemplate<int nr, Index LhsProgress, Index RhsProgress, typename LhsScalar, typename RhsScalar, typename ResScalar, typename AccPacket, typename LhsPacket, typename RhsPacket, typename ResPacket, typename GEBPTraits, typename LinearMapper, typename DataMapper>\nstruct lhs_process_fraction_of_packet : lhs_process_one_packet<nr, LhsProgress, RhsProgress, LhsScalar, RhsScalar, ResScalar, AccPacket, LhsPacket, RhsPacket, ResPacket, GEBPTraits, LinearMapper, DataMapper>\n{\n\nEIGEN_STRONG_INLINE void peeled_kc_onestep(Index K, const LhsScalar* blA, const RhsScalar* blB, GEBPTraits traits, LhsPacket *A0, RhsPacket *B_0, RhsPacket *B1, RhsPacket *B2, RhsPacket *B3, AccPacket *C0, AccPacket *C1, AccPacket *C2, AccPacket *C3)\n  {\n        EIGEN_ASM_COMMENT(\"begin step of gebp micro kernel 1X4\");\n        EIGEN_ASM_COMMENT(\"Note: these asm comments work around bug 935!\");\n        traits.loadLhsUnaligned(&blA[(0+1*K)*(LhsProgress)], *A0);\n        traits.broadcastRhs(&blB[(0+4*K)*RhsProgress], *B_0, *B1, *B2, *B3);\n        traits.madd(*A0, *B_0, *C0, *B_0);\n        traits.madd(*A0, *B1,  *C1, *B1);\n        traits.madd(*A0, *B2,  *C2, *B2);\n        traits.madd(*A0, *B3,  *C3, *B3);\n        EIGEN_ASM_COMMENT(\"end step of gebp micro kernel 1X4\");\n  }\n};\n\ntemplate<typename LhsScalar, typename RhsScalar, typename Index, typename DataMapper, int mr, int nr, bool ConjugateLhs, bool ConjugateRhs>\nEIGEN_DONT_INLINE\nvoid gebp_kernel<LhsScalar,RhsScalar,Index,DataMapper,mr,nr,ConjugateLhs,ConjugateRhs>\n  ::operator()(const DataMapper& res, const LhsScalar* blockA, const RhsScalar* blockB,\n               Index rows, Index depth, Index cols, ResScalar alpha,\n               Index strideA, Index strideB, Index offsetA, Index offsetB)\n  {\n    Traits traits;\n    SwappedTraits straits;\n    \n    if(strideA==-1) strideA = depth;\n    if(strideB==-1) strideB = depth;\n    conj_helper<LhsScalar,RhsScalar,ConjugateLhs,ConjugateRhs> cj;\n    Index packet_cols4 = nr>=4 ? (cols/4) * 4 : 0;\n    const Index peeled_mc3 = mr>=3*Traits::LhsProgress ? (rows/(3*LhsProgress))*(3*LhsProgress) : 0;\n    const Index peeled_mc2 = mr>=2*Traits::LhsProgress ? peeled_mc3+((rows-peeled_mc3)/(2*LhsProgress))*(2*LhsProgress) : 0;\n    const Index peeled_mc1 = mr>=1*Traits::LhsProgress ? peeled_mc2+((rows-peeled_mc2)/(1*LhsProgress))*(1*LhsProgress) : 0;\n    const Index peeled_mc_half = mr>=LhsProgressHalf ? peeled_mc1+((rows-peeled_mc1)/(LhsProgressHalf))*(LhsProgressHalf) : 0;\n    const Index peeled_mc_quarter = mr>=LhsProgressQuarter ? peeled_mc_half+((rows-peeled_mc_half)/(LhsProgressQuarter))*(LhsProgressQuarter) : 0;\n    enum { pk = 8 }; // NOTE Such a large peeling factor is important for large matrices (~ +5% when >1000 on Haswell)\n    const Index peeled_kc  = depth & ~(pk-1);\n    const int prefetch_res_offset = 32/sizeof(ResScalar);    \n//     const Index depth2     = depth & ~1;\n\n    //---------- Process 3 * LhsProgress rows at once ----------\n    // This corresponds to 3*LhsProgress x nr register blocks.\n    // Usually, make sense only with FMA\n    if(mr>=3*Traits::LhsProgress)\n    {\n      // Here, the general idea is to loop on each largest micro horizontal panel of the lhs (3*Traits::LhsProgress x depth)\n      // and on each largest micro vertical panel of the rhs (depth * nr).\n      // Blocking sizes, i.e., 'depth' has been computed so that the micro horizontal panel of the lhs fit in L1.\n      // However, if depth is too small, we can extend the number of rows of these horizontal panels.\n      // This actual number of rows is computed as follow:\n      const Index l1 = defaultL1CacheSize; // in Bytes, TODO, l1 should be passed to this function.\n      // The max(1, ...) here is needed because we may be using blocking params larger than what our known l1 cache size\n      // suggests we should be using: either because our known l1 cache size is inaccurate (e.g. on Android, we can only guess),\n      // or because we are testing specific blocking sizes.\n      const Index actual_panel_rows = (3*LhsProgress) * std::max<Index>(1,( (l1 - sizeof(ResScalar)*mr*nr - depth*nr*sizeof(RhsScalar)) / (depth * sizeof(LhsScalar) * 3*LhsProgress) ));\n      for(Index i1=0; i1<peeled_mc3; i1+=actual_panel_rows)\n      {\n        const Index actual_panel_end = (std::min)(i1+actual_panel_rows, peeled_mc3);\n        for(Index j2=0; j2<packet_cols4; j2+=nr)\n        {\n          for(Index i=i1; i<actual_panel_end; i+=3*LhsProgress)\n          {\n          \n          // We selected a 3*Traits::LhsProgress x nr micro block of res which is entirely\n          // stored into 3 x nr registers.\n          \n          const LhsScalar* blA = &blockA[i*strideA+offsetA*(3*LhsProgress)];\n          prefetch(&blA[0]);\n\n          // gets res block as register\n          AccPacket C0, C1, C2,  C3,\n                    C4, C5, C6,  C7,\n                    C8, C9, C10, C11;\n          traits.initAcc(C0);  traits.initAcc(C1);  traits.initAcc(C2);  traits.initAcc(C3);\n          traits.initAcc(C4);  traits.initAcc(C5);  traits.initAcc(C6);  traits.initAcc(C7);\n          traits.initAcc(C8);  traits.initAcc(C9);  traits.initAcc(C10); traits.initAcc(C11);\n\n          LinearMapper r0 = res.getLinearMapper(i, j2 + 0);\n          LinearMapper r1 = res.getLinearMapper(i, j2 + 1);\n          LinearMapper r2 = res.getLinearMapper(i, j2 + 2);\n          LinearMapper r3 = res.getLinearMapper(i, j2 + 3);\n\n          r0.prefetch(0);\n          r1.prefetch(0);\n          r2.prefetch(0);\n          r3.prefetch(0);\n\n          // performs \"inner\" products\n          const RhsScalar* blB = &blockB[j2*strideB+offsetB*nr];\n          prefetch(&blB[0]);\n          LhsPacket A0, A1;\n\n          for(Index k=0; k<peeled_kc; k+=pk)\n          {\n            EIGEN_ASM_COMMENT(\"begin gebp micro kernel 3pX4\");\n            // 15 registers are taken (12 for acc, 2 for lhs).\n            RhsPanel15 rhs_panel;\n            RhsPacket T0;\n            LhsPacket A2;\n            #if EIGEN_COMP_GNUC_STRICT && EIGEN_ARCH_ARM64 && defined(EIGEN_VECTORIZE_NEON) && !(EIGEN_GNUC_AT_LEAST(9,0))\n            // see http://eigen.tuxfamily.org/bz/show_bug.cgi?id=1633\n            // without this workaround A0, A1, and A2 are loaded in the same register,\n            // which is not good for pipelining\n            #define EIGEN_GEBP_3PX4_REGISTER_ALLOC_WORKAROUND __asm__  (\"\" : \"+w,m\" (A0), \"+w,m\" (A1), \"+w,m\" (A2));\n            #else\n            #define EIGEN_GEBP_3PX4_REGISTER_ALLOC_WORKAROUND\n            #endif\n#define EIGEN_GEBP_ONESTEP(K)                                                     \\\n            do {                                                                  \\\n              EIGEN_ASM_COMMENT(\"begin step of gebp micro kernel 3pX4\");          \\\n              EIGEN_ASM_COMMENT(\"Note: these asm comments work around bug 935!\"); \\\n              internal::prefetch(blA + (3 * K + 16) * LhsProgress);               \\\n              if (EIGEN_ARCH_ARM || EIGEN_ARCH_MIPS) {                            \\\n                internal::prefetch(blB + (4 * K + 16) * RhsProgress);             \\\n              } /* Bug 953 */                                                     \\\n              traits.loadLhs(&blA[(0 + 3 * K) * LhsProgress], A0);                \\\n              traits.loadLhs(&blA[(1 + 3 * K) * LhsProgress], A1);                \\\n              traits.loadLhs(&blA[(2 + 3 * K) * LhsProgress], A2);                \\\n              EIGEN_GEBP_3PX4_REGISTER_ALLOC_WORKAROUND \\\n              traits.loadRhs(blB + (0+4*K) * Traits::RhsProgress, rhs_panel);     \\\n              traits.madd(A0, rhs_panel, C0, T0, fix<0>);                         \\\n              traits.madd(A1, rhs_panel, C4, T0, fix<0>);                         \\\n              traits.madd(A2, rhs_panel, C8, T0, fix<0>);                         \\\n              traits.updateRhs(blB + (1+4*K) * Traits::RhsProgress, rhs_panel);   \\\n              traits.madd(A0, rhs_panel, C1, T0, fix<1>);                         \\\n              traits.madd(A1, rhs_panel, C5, T0, fix<1>);                         \\\n              traits.madd(A2, rhs_panel, C9, T0, fix<1>);                         \\\n              traits.updateRhs(blB + (2+4*K) * Traits::RhsProgress, rhs_panel);   \\\n              traits.madd(A0, rhs_panel, C2, T0, fix<2>);                         \\\n              traits.madd(A1, rhs_panel, C6, T0, fix<2>);                         \\\n              traits.madd(A2, rhs_panel, C10, T0, fix<2>);                        \\\n              traits.updateRhs(blB + (3+4*K) * Traits::RhsProgress, rhs_panel);   \\\n              traits.madd(A0, rhs_panel, C3, T0, fix<3>);                         \\\n              traits.madd(A1, rhs_panel, C7, T0, fix<3>);                         \\\n              traits.madd(A2, rhs_panel, C11, T0, fix<3>);                        \\\n              EIGEN_ASM_COMMENT(\"end step of gebp micro kernel 3pX4\");            \\\n            } while (false)\n\n            internal::prefetch(blB);\n            EIGEN_GEBP_ONESTEP(0);\n            EIGEN_GEBP_ONESTEP(1);\n            EIGEN_GEBP_ONESTEP(2);\n            EIGEN_GEBP_ONESTEP(3);\n            EIGEN_GEBP_ONESTEP(4);\n            EIGEN_GEBP_ONESTEP(5);\n            EIGEN_GEBP_ONESTEP(6);\n            EIGEN_GEBP_ONESTEP(7);\n\n            blB += pk*4*RhsProgress;\n            blA += pk*3*Traits::LhsProgress;\n\n            EIGEN_ASM_COMMENT(\"end gebp micro kernel 3pX4\");\n          }\n          // process remaining peeled loop\n          for(Index k=peeled_kc; k<depth; k++)\n          {\n            RhsPanel15 rhs_panel;\n            RhsPacket T0;\n            LhsPacket A2;\n            EIGEN_GEBP_ONESTEP(0);\n            blB += 4*RhsProgress;\n            blA += 3*Traits::LhsProgress;\n          }\n\n#undef EIGEN_GEBP_ONESTEP\n\n          ResPacket R0, R1, R2;\n          ResPacket alphav = pset1<ResPacket>(alpha);\n\n          R0 = r0.template loadPacket<ResPacket>(0 * Traits::ResPacketSize);\n          R1 = r0.template loadPacket<ResPacket>(1 * Traits::ResPacketSize);\n          R2 = r0.template loadPacket<ResPacket>(2 * Traits::ResPacketSize);\n          traits.acc(C0, alphav, R0);\n          traits.acc(C4, alphav, R1);\n          traits.acc(C8, alphav, R2);\n          r0.storePacket(0 * Traits::ResPacketSize, R0);\n          r0.storePacket(1 * Traits::ResPacketSize, R1);\n          r0.storePacket(2 * Traits::ResPacketSize, R2);\n\n          R0 = r1.template loadPacket<ResPacket>(0 * Traits::ResPacketSize);\n          R1 = r1.template loadPacket<ResPacket>(1 * Traits::ResPacketSize);\n          R2 = r1.template loadPacket<ResPacket>(2 * Traits::ResPacketSize);\n          traits.acc(C1, alphav, R0);\n          traits.acc(C5, alphav, R1);\n          traits.acc(C9, alphav, R2);\n          r1.storePacket(0 * Traits::ResPacketSize, R0);\n          r1.storePacket(1 * Traits::ResPacketSize, R1);\n          r1.storePacket(2 * Traits::ResPacketSize, R2);\n\n          R0 = r2.template loadPacket<ResPacket>(0 * Traits::ResPacketSize);\n          R1 = r2.template loadPacket<ResPacket>(1 * Traits::ResPacketSize);\n          R2 = r2.template loadPacket<ResPacket>(2 * Traits::ResPacketSize);\n          traits.acc(C2, alphav, R0);\n          traits.acc(C6, alphav, R1);\n          traits.acc(C10, alphav, R2);\n          r2.storePacket(0 * Traits::ResPacketSize, R0);\n          r2.storePacket(1 * Traits::ResPacketSize, R1);\n          r2.storePacket(2 * Traits::ResPacketSize, R2);\n\n          R0 = r3.template loadPacket<ResPacket>(0 * Traits::ResPacketSize);\n          R1 = r3.template loadPacket<ResPacket>(1 * Traits::ResPacketSize);\n          R2 = r3.template loadPacket<ResPacket>(2 * Traits::ResPacketSize);\n          traits.acc(C3, alphav, R0);\n          traits.acc(C7, alphav, R1);\n          traits.acc(C11, alphav, R2);\n          r3.storePacket(0 * Traits::ResPacketSize, R0);\n          r3.storePacket(1 * Traits::ResPacketSize, R1);\n          r3.storePacket(2 * Traits::ResPacketSize, R2);          \n          }\n        }\n\n        // Deal with remaining columns of the rhs\n        for(Index j2=packet_cols4; j2<cols; j2++)\n        {\n          for(Index i=i1; i<actual_panel_end; i+=3*LhsProgress)\n          {\n          // One column at a time\n          const LhsScalar* blA = &blockA[i*strideA+offsetA*(3*Traits::LhsProgress)];\n          prefetch(&blA[0]);\n\n          // gets res block as register\n          AccPacket C0, C4, C8;\n          traits.initAcc(C0);\n          traits.initAcc(C4);\n          traits.initAcc(C8);\n\n          LinearMapper r0 = res.getLinearMapper(i, j2);\n          r0.prefetch(0);\n\n          // performs \"inner\" products\n          const RhsScalar* blB = &blockB[j2*strideB+offsetB];\n          LhsPacket A0, A1, A2;\n          \n          for(Index k=0; k<peeled_kc; k+=pk)\n          {\n            EIGEN_ASM_COMMENT(\"begin gebp micro kernel 3pX1\");\n            RhsPacket B_0;\n#define EIGEN_GEBGP_ONESTEP(K)                                                    \\\n            do {                                                                  \\\n              EIGEN_ASM_COMMENT(\"begin step of gebp micro kernel 3pX1\");          \\\n              EIGEN_ASM_COMMENT(\"Note: these asm comments work around bug 935!\"); \\\n              traits.loadLhs(&blA[(0 + 3 * K) * LhsProgress], A0);                \\\n              traits.loadLhs(&blA[(1 + 3 * K) * LhsProgress], A1);                \\\n              traits.loadLhs(&blA[(2 + 3 * K) * LhsProgress], A2);                \\\n              traits.loadRhs(&blB[(0 + K) * RhsProgress], B_0);                   \\\n              traits.madd(A0, B_0, C0, B_0, fix<0>);                              \\\n              traits.madd(A1, B_0, C4, B_0, fix<0>);                              \\\n              traits.madd(A2, B_0, C8, B_0, fix<0>);                              \\\n              EIGEN_ASM_COMMENT(\"end step of gebp micro kernel 3pX1\");            \\\n            } while (false)\n\n            EIGEN_GEBGP_ONESTEP(0);\n            EIGEN_GEBGP_ONESTEP(1);\n            EIGEN_GEBGP_ONESTEP(2);\n            EIGEN_GEBGP_ONESTEP(3);\n            EIGEN_GEBGP_ONESTEP(4);\n            EIGEN_GEBGP_ONESTEP(5);\n            EIGEN_GEBGP_ONESTEP(6);\n            EIGEN_GEBGP_ONESTEP(7);\n\n            blB += pk*RhsProgress;\n            blA += pk*3*Traits::LhsProgress;\n\n            EIGEN_ASM_COMMENT(\"end gebp micro kernel 3pX1\");\n          }\n\n          // process remaining peeled loop\n          for(Index k=peeled_kc; k<depth; k++)\n          {\n            RhsPacket B_0;\n            EIGEN_GEBGP_ONESTEP(0);\n            blB += RhsProgress;\n            blA += 3*Traits::LhsProgress;\n          }\n#undef EIGEN_GEBGP_ONESTEP\n          ResPacket R0, R1, R2;\n          ResPacket alphav = pset1<ResPacket>(alpha);\n\n          R0 = r0.template loadPacket<ResPacket>(0 * Traits::ResPacketSize);\n          R1 = r0.template loadPacket<ResPacket>(1 * Traits::ResPacketSize);\n          R2 = r0.template loadPacket<ResPacket>(2 * Traits::ResPacketSize);\n          traits.acc(C0, alphav, R0);\n          traits.acc(C4, alphav, R1);\n          traits.acc(C8, alphav, R2);\n          r0.storePacket(0 * Traits::ResPacketSize, R0);\n          r0.storePacket(1 * Traits::ResPacketSize, R1);\n          r0.storePacket(2 * Traits::ResPacketSize, R2);          \n          }\n        }\n      }\n    }\n\n    //---------- Process 2 * LhsProgress rows at once ----------\n    if(mr>=2*Traits::LhsProgress)\n    {\n      const Index l1 = defaultL1CacheSize; // in Bytes, TODO, l1 should be passed to this function.\n      // The max(1, ...) here is needed because we may be using blocking params larger than what our known l1 cache size\n      // suggests we should be using: either because our known l1 cache size is inaccurate (e.g. on Android, we can only guess),\n      // or because we are testing specific blocking sizes.\n      Index actual_panel_rows = (2*LhsProgress) * std::max<Index>(1,( (l1 - sizeof(ResScalar)*mr*nr - depth*nr*sizeof(RhsScalar)) / (depth * sizeof(LhsScalar) * 2*LhsProgress) ));\n\n      for(Index i1=peeled_mc3; i1<peeled_mc2; i1+=actual_panel_rows)\n      {\n        Index actual_panel_end = (std::min)(i1+actual_panel_rows, peeled_mc2);\n        for(Index j2=0; j2<packet_cols4; j2+=nr)\n        {\n          for(Index i=i1; i<actual_panel_end; i+=2*LhsProgress)\n          {\n          \n          // We selected a 2*Traits::LhsProgress x nr micro block of res which is entirely\n          // stored into 2 x nr registers.\n          \n          const LhsScalar* blA = &blockA[i*strideA+offsetA*(2*Traits::LhsProgress)];\n          prefetch(&blA[0]);\n\n          // gets res block as register\n          AccPacket C0, C1, C2, C3,\n                    C4, C5, C6, C7;\n          traits.initAcc(C0); traits.initAcc(C1); traits.initAcc(C2); traits.initAcc(C3);\n          traits.initAcc(C4); traits.initAcc(C5); traits.initAcc(C6); traits.initAcc(C7);\n\n          LinearMapper r0 = res.getLinearMapper(i, j2 + 0);\n          LinearMapper r1 = res.getLinearMapper(i, j2 + 1);\n          LinearMapper r2 = res.getLinearMapper(i, j2 + 2);\n          LinearMapper r3 = res.getLinearMapper(i, j2 + 3);\n\n          r0.prefetch(prefetch_res_offset);\n          r1.prefetch(prefetch_res_offset);\n          r2.prefetch(prefetch_res_offset);\n          r3.prefetch(prefetch_res_offset);\n\n          // performs \"inner\" products\n          const RhsScalar* blB = &blockB[j2*strideB+offsetB*nr];\n          prefetch(&blB[0]);\n          LhsPacket A0, A1;\n\n          for(Index k=0; k<peeled_kc; k+=pk)\n          {\n            EIGEN_ASM_COMMENT(\"begin gebp micro kernel 2pX4\");\n            RhsPacketx4 rhs_panel;\n            RhsPacket T0;\n\n          // NOTE: the begin/end asm comments below work around bug 935!\n          // but they are not enough for gcc>=6 without FMA (bug 1637)\n          #if EIGEN_GNUC_AT_LEAST(6,0) && defined(EIGEN_VECTORIZE_SSE)\n            #define EIGEN_GEBP_2PX4_SPILLING_WORKAROUND __asm__  (\"\" : [a0] \"+x,m\" (A0),[a1] \"+x,m\" (A1));\n          #else\n            #define EIGEN_GEBP_2PX4_SPILLING_WORKAROUND\n          #endif\n#define EIGEN_GEBGP_ONESTEP(K)                                            \\\n            do {                                                          \\\n              EIGEN_ASM_COMMENT(\"begin step of gebp micro kernel 2pX4\");  \\\n              traits.loadLhs(&blA[(0 + 2 * K) * LhsProgress], A0);        \\\n              traits.loadLhs(&blA[(1 + 2 * K) * LhsProgress], A1);        \\\n              traits.loadRhs(&blB[(0 + 4 * K) * RhsProgress], rhs_panel); \\\n              traits.madd(A0, rhs_panel, C0, T0, fix<0>);                 \\\n              traits.madd(A1, rhs_panel, C4, T0, fix<0>);                 \\\n              traits.madd(A0, rhs_panel, C1, T0, fix<1>);                 \\\n              traits.madd(A1, rhs_panel, C5, T0, fix<1>);                 \\\n              traits.madd(A0, rhs_panel, C2, T0, fix<2>);                 \\\n              traits.madd(A1, rhs_panel, C6, T0, fix<2>);                 \\\n              traits.madd(A0, rhs_panel, C3, T0, fix<3>);                 \\\n              traits.madd(A1, rhs_panel, C7, T0, fix<3>);                 \\\n              EIGEN_GEBP_2PX4_SPILLING_WORKAROUND                         \\\n              EIGEN_ASM_COMMENT(\"end step of gebp micro kernel 2pX4\");    \\\n            } while (false)\n\n            internal::prefetch(blB+(48+0));\n            EIGEN_GEBGP_ONESTEP(0);\n            EIGEN_GEBGP_ONESTEP(1);\n            EIGEN_GEBGP_ONESTEP(2);\n            EIGEN_GEBGP_ONESTEP(3);\n            internal::prefetch(blB+(48+16));\n            EIGEN_GEBGP_ONESTEP(4);\n            EIGEN_GEBGP_ONESTEP(5);\n            EIGEN_GEBGP_ONESTEP(6);\n            EIGEN_GEBGP_ONESTEP(7);\n\n            blB += pk*4*RhsProgress;\n            blA += pk*(2*Traits::LhsProgress);\n\n            EIGEN_ASM_COMMENT(\"end gebp micro kernel 2pX4\");\n          }\n          // process remaining peeled loop\n          for(Index k=peeled_kc; k<depth; k++)\n          {\n            RhsPacketx4 rhs_panel;\n            RhsPacket T0;\n            EIGEN_GEBGP_ONESTEP(0);\n            blB += 4*RhsProgress;\n            blA += 2*Traits::LhsProgress;\n          }\n#undef EIGEN_GEBGP_ONESTEP\n\n          ResPacket R0, R1, R2, R3;\n          ResPacket alphav = pset1<ResPacket>(alpha);\n\n          R0 = r0.template loadPacket<ResPacket>(0 * Traits::ResPacketSize);\n          R1 = r0.template loadPacket<ResPacket>(1 * Traits::ResPacketSize);\n          R2 = r1.template loadPacket<ResPacket>(0 * Traits::ResPacketSize);\n          R3 = r1.template loadPacket<ResPacket>(1 * Traits::ResPacketSize);\n          traits.acc(C0, alphav, R0);\n          traits.acc(C4, alphav, R1);\n          traits.acc(C1, alphav, R2);\n          traits.acc(C5, alphav, R3);\n          r0.storePacket(0 * Traits::ResPacketSize, R0);\n          r0.storePacket(1 * Traits::ResPacketSize, R1);\n          r1.storePacket(0 * Traits::ResPacketSize, R2);\n          r1.storePacket(1 * Traits::ResPacketSize, R3);\n\n          R0 = r2.template loadPacket<ResPacket>(0 * Traits::ResPacketSize);\n          R1 = r2.template loadPacket<ResPacket>(1 * Traits::ResPacketSize);\n          R2 = r3.template loadPacket<ResPacket>(0 * Traits::ResPacketSize);\n          R3 = r3.template loadPacket<ResPacket>(1 * Traits::ResPacketSize);\n          traits.acc(C2,  alphav, R0);\n          traits.acc(C6,  alphav, R1);\n          traits.acc(C3,  alphav, R2);\n          traits.acc(C7,  alphav, R3);\n          r2.storePacket(0 * Traits::ResPacketSize, R0);\n          r2.storePacket(1 * Traits::ResPacketSize, R1);\n          r3.storePacket(0 * Traits::ResPacketSize, R2);\n          r3.storePacket(1 * Traits::ResPacketSize, R3);\n          }\n        }\n      \n        // Deal with remaining columns of the rhs\n        for(Index j2=packet_cols4; j2<cols; j2++)\n        {\n          for(Index i=i1; i<actual_panel_end; i+=2*LhsProgress)\n          {\n          // One column at a time\n          const LhsScalar* blA = &blockA[i*strideA+offsetA*(2*Traits::LhsProgress)];\n          prefetch(&blA[0]);\n\n          // gets res block as register\n          AccPacket C0, C4;\n          traits.initAcc(C0);\n          traits.initAcc(C4);\n\n          LinearMapper r0 = res.getLinearMapper(i, j2);\n          r0.prefetch(prefetch_res_offset);\n\n          // performs \"inner\" products\n          const RhsScalar* blB = &blockB[j2*strideB+offsetB];\n          LhsPacket A0, A1;\n\n          for(Index k=0; k<peeled_kc; k+=pk)\n          {\n            EIGEN_ASM_COMMENT(\"begin gebp micro kernel 2pX1\");\n            RhsPacket B_0, B1;\n        \n#define EIGEN_GEBGP_ONESTEP(K) \\\n            do {                                                                  \\\n              EIGEN_ASM_COMMENT(\"begin step of gebp micro kernel 2pX1\");          \\\n              EIGEN_ASM_COMMENT(\"Note: these asm comments work around bug 935!\"); \\\n              traits.loadLhs(&blA[(0+2*K)*LhsProgress], A0);                      \\\n              traits.loadLhs(&blA[(1+2*K)*LhsProgress], A1);                      \\\n              traits.loadRhs(&blB[(0+K)*RhsProgress], B_0);                       \\\n              traits.madd(A0, B_0, C0, B1, fix<0>);                               \\\n              traits.madd(A1, B_0, C4, B_0, fix<0>);                              \\\n              EIGEN_ASM_COMMENT(\"end step of gebp micro kernel 2pX1\");            \\\n            } while(false)\n        \n            EIGEN_GEBGP_ONESTEP(0);\n            EIGEN_GEBGP_ONESTEP(1);\n            EIGEN_GEBGP_ONESTEP(2);\n            EIGEN_GEBGP_ONESTEP(3);\n            EIGEN_GEBGP_ONESTEP(4);\n            EIGEN_GEBGP_ONESTEP(5);\n            EIGEN_GEBGP_ONESTEP(6);\n            EIGEN_GEBGP_ONESTEP(7);\n\n            blB += pk*RhsProgress;\n            blA += pk*2*Traits::LhsProgress;\n\n            EIGEN_ASM_COMMENT(\"end gebp micro kernel 2pX1\");\n          }\n\n          // process remaining peeled loop\n          for(Index k=peeled_kc; k<depth; k++)\n          {\n            RhsPacket B_0, B1;\n            EIGEN_GEBGP_ONESTEP(0);\n            blB += RhsProgress;\n            blA += 2*Traits::LhsProgress;\n          }\n#undef EIGEN_GEBGP_ONESTEP\n          ResPacket R0, R1;\n          ResPacket alphav = pset1<ResPacket>(alpha);\n\n          R0 = r0.template loadPacket<ResPacket>(0 * Traits::ResPacketSize);\n          R1 = r0.template loadPacket<ResPacket>(1 * Traits::ResPacketSize);\n          traits.acc(C0, alphav, R0);\n          traits.acc(C4, alphav, R1);\n          r0.storePacket(0 * Traits::ResPacketSize, R0);\n          r0.storePacket(1 * Traits::ResPacketSize, R1);\n          }\n        }\n      }\n    }\n    //---------- Process 1 * LhsProgress rows at once ----------\n    if(mr>=1*Traits::LhsProgress)\n    {\n      lhs_process_one_packet<nr, LhsProgress, RhsProgress, LhsScalar, RhsScalar, ResScalar, AccPacket, LhsPacket, RhsPacket, ResPacket, Traits, LinearMapper, DataMapper> p;\n      p(res, blockA, blockB, alpha, peeled_mc2, peeled_mc1, strideA, strideB, offsetA, offsetB, prefetch_res_offset, peeled_kc, pk, cols, depth, packet_cols4);\n    }\n    //---------- Process LhsProgressHalf rows at once ----------\n    if((LhsProgressHalf < LhsProgress) && mr>=LhsProgressHalf)\n    {\n      lhs_process_fraction_of_packet<nr, LhsProgressHalf, RhsProgressHalf, LhsScalar, RhsScalar, ResScalar, AccPacketHalf, LhsPacketHalf, RhsPacketHalf, ResPacketHalf, HalfTraits, LinearMapper, DataMapper> p;\n      p(res, blockA, blockB, alpha, peeled_mc1, peeled_mc_half, strideA, strideB, offsetA, offsetB, prefetch_res_offset, peeled_kc, pk, cols, depth, packet_cols4);\n    }\n    //---------- Process LhsProgressQuarter rows at once ----------\n    if((LhsProgressQuarter < LhsProgressHalf) && mr>=LhsProgressQuarter)\n    {\n      lhs_process_fraction_of_packet<nr, LhsProgressQuarter, RhsProgressQuarter, LhsScalar, RhsScalar, ResScalar, AccPacketQuarter, LhsPacketQuarter, RhsPacketQuarter, ResPacketQuarter, QuarterTraits, LinearMapper, DataMapper> p;\n      p(res, blockA, blockB, alpha, peeled_mc_half, peeled_mc_quarter, strideA, strideB, offsetA, offsetB, prefetch_res_offset, peeled_kc, pk, cols, depth, packet_cols4);\n    }\n    //---------- Process remaining rows, 1 at once ----------\n    if(peeled_mc_quarter<rows)\n    {\n      // loop on each panel of the rhs\n      for(Index j2=0; j2<packet_cols4; j2+=nr)\n      {\n        // loop on each row of the lhs (1*LhsProgress x depth)\n        for(Index i=peeled_mc_quarter; i<rows; i+=1)\n        {\n          const LhsScalar* blA = &blockA[i*strideA+offsetA];\n          prefetch(&blA[0]);\n          const RhsScalar* blB = &blockB[j2*strideB+offsetB*nr];\n\n          // If LhsProgress is 8 or 16, it assumes that there is a\n          // half or quarter packet, respectively, of the same size as\n          // nr (which is currently 4) for the return type.\n          const int SResPacketHalfSize = unpacket_traits<typename unpacket_traits<SResPacket>::half>::size;\n          const int SResPacketQuarterSize = unpacket_traits<typename unpacket_traits<typename unpacket_traits<SResPacket>::half>::half>::size;\n          if ((SwappedTraits::LhsProgress % 4) == 0 &&\n              (SwappedTraits::LhsProgress<=16) &&\n              (SwappedTraits::LhsProgress!=8  || SResPacketHalfSize==nr) &&\n              (SwappedTraits::LhsProgress!=16 || SResPacketQuarterSize==nr))\n          {\n            SAccPacket C0, C1, C2, C3;\n            straits.initAcc(C0);\n            straits.initAcc(C1);\n            straits.initAcc(C2);\n            straits.initAcc(C3);\n\n            const Index spk   = (std::max)(1,SwappedTraits::LhsProgress/4);\n            const Index endk  = (depth/spk)*spk;\n            const Index endk4 = (depth/(spk*4))*(spk*4);\n\n            Index k=0;\n            for(; k<endk4; k+=4*spk)\n            {\n              SLhsPacket A0,A1;\n              SRhsPacket B_0,B_1;\n\n              straits.loadLhsUnaligned(blB+0*SwappedTraits::LhsProgress, A0);\n              straits.loadLhsUnaligned(blB+1*SwappedTraits::LhsProgress, A1);\n\n              straits.loadRhsQuad(blA+0*spk, B_0);\n              straits.loadRhsQuad(blA+1*spk, B_1);\n              straits.madd(A0,B_0,C0,B_0, fix<0>);\n              straits.madd(A1,B_1,C1,B_1, fix<0>);\n\n              straits.loadLhsUnaligned(blB+2*SwappedTraits::LhsProgress, A0);\n              straits.loadLhsUnaligned(blB+3*SwappedTraits::LhsProgress, A1);\n              straits.loadRhsQuad(blA+2*spk, B_0);\n              straits.loadRhsQuad(blA+3*spk, B_1);\n              straits.madd(A0,B_0,C2,B_0, fix<0>);\n              straits.madd(A1,B_1,C3,B_1, fix<0>);\n\n              blB += 4*SwappedTraits::LhsProgress;\n              blA += 4*spk;\n            }\n            C0 = padd(padd(C0,C1),padd(C2,C3));\n            for(; k<endk; k+=spk)\n            {\n              SLhsPacket A0;\n              SRhsPacket B_0;\n\n              straits.loadLhsUnaligned(blB, A0);\n              straits.loadRhsQuad(blA, B_0);\n              straits.madd(A0,B_0,C0,B_0, fix<0>);\n\n              blB += SwappedTraits::LhsProgress;\n              blA += spk;\n            }\n            if(SwappedTraits::LhsProgress==8)\n            {\n              // Special case where we have to first reduce the accumulation register C0\n              typedef typename conditional<SwappedTraits::LhsProgress>=8,typename unpacket_traits<SResPacket>::half,SResPacket>::type SResPacketHalf;\n              typedef typename conditional<SwappedTraits::LhsProgress>=8,typename unpacket_traits<SLhsPacket>::half,SLhsPacket>::type SLhsPacketHalf;\n              typedef typename conditional<SwappedTraits::LhsProgress>=8,typename unpacket_traits<SRhsPacket>::half,SRhsPacket>::type SRhsPacketHalf;\n              typedef typename conditional<SwappedTraits::LhsProgress>=8,typename unpacket_traits<SAccPacket>::half,SAccPacket>::type SAccPacketHalf;\n\n              SResPacketHalf R = res.template gatherPacket<SResPacketHalf>(i, j2);\n              SResPacketHalf alphav = pset1<SResPacketHalf>(alpha);\n\n              if(depth-endk>0)\n              {\n                // We have to handle the last row of the rhs which corresponds to a half-packet\n                SLhsPacketHalf a0;\n                SRhsPacketHalf b0;\n                straits.loadLhsUnaligned(blB, a0);\n                straits.loadRhs(blA, b0);\n                SAccPacketHalf c0 = predux_half_dowto4(C0);\n                straits.madd(a0,b0,c0,b0, fix<0>);\n                straits.acc(c0, alphav, R);\n              }\n              else\n              {\n                straits.acc(predux_half_dowto4(C0), alphav, R);\n              }\n              res.scatterPacket(i, j2, R);\n            }\n            else if (SwappedTraits::LhsProgress==16)\n            {\n              // Special case where we have to first reduce the\n              // accumulation register C0. We specialize the block in\n              // template form, so that LhsProgress < 16 paths don't\n              // fail to compile\n              last_row_process_16_packets<LhsScalar, RhsScalar, Index, DataMapper, mr, nr, ConjugateLhs, ConjugateRhs> p;\n\t            p(res, straits, blA, blB, depth, endk, i, j2,alpha, C0);\n            }\n            else\n            {\n              SResPacket R = res.template gatherPacket<SResPacket>(i, j2);\n              SResPacket alphav = pset1<SResPacket>(alpha);\n              straits.acc(C0, alphav, R);\n              res.scatterPacket(i, j2, R);\n            }\n          }\n          else // scalar path\n          {\n            // get a 1 x 4 res block as registers\n            ResScalar C0(0), C1(0), C2(0), C3(0);\n\n            for(Index k=0; k<depth; k++)\n            {\n              LhsScalar A0;\n              RhsScalar B_0, B_1;\n\n              A0 = blA[k];\n\n              B_0 = blB[0];\n              B_1 = blB[1];\n              CJMADD(cj,A0,B_0,C0,  B_0);\n              CJMADD(cj,A0,B_1,C1,  B_1);\n              \n              B_0 = blB[2];\n              B_1 = blB[3];\n              CJMADD(cj,A0,B_0,C2,  B_0);\n              CJMADD(cj,A0,B_1,C3,  B_1);\n              \n              blB += 4;\n            }\n            res(i, j2 + 0) += alpha * C0;\n            res(i, j2 + 1) += alpha * C1;\n            res(i, j2 + 2) += alpha * C2;\n            res(i, j2 + 3) += alpha * C3;\n          }\n        }\n      }\n      // remaining columns\n      for(Index j2=packet_cols4; j2<cols; j2++)\n      {\n        // loop on each row of the lhs (1*LhsProgress x depth)\n        for(Index i=peeled_mc_quarter; i<rows; i+=1)\n        {\n          const LhsScalar* blA = &blockA[i*strideA+offsetA];\n          prefetch(&blA[0]);\n          // gets a 1 x 1 res block as registers\n          ResScalar C0(0);\n          const RhsScalar* blB = &blockB[j2*strideB+offsetB];\n          for(Index k=0; k<depth; k++)\n          {\n            LhsScalar A0 = blA[k];\n            RhsScalar B_0 = blB[k];\n            CJMADD(cj, A0, B_0, C0, B_0);\n          }\n          res(i, j2) += alpha * C0;\n        }\n      }\n    }\n  }\n\n\n#undef CJMADD\n\n// pack a block of the lhs\n// The traversal is as follow (mr==4):\n//   0  4  8 12 ...\n//   1  5  9 13 ...\n//   2  6 10 14 ...\n//   3  7 11 15 ...\n//\n//  16 20 24 28 ...\n//  17 21 25 29 ...\n//  18 22 26 30 ...\n//  19 23 27 31 ...\n//\n//  32 33 34 35 ...\n//  36 36 38 39 ...\ntemplate<typename Scalar, typename Index, typename DataMapper, int Pack1, int Pack2, typename Packet, bool Conjugate, bool PanelMode>\nstruct gemm_pack_lhs<Scalar, Index, DataMapper, Pack1, Pack2, Packet, ColMajor, Conjugate, PanelMode>\n{\n  typedef typename DataMapper::LinearMapper LinearMapper;\n  EIGEN_DONT_INLINE void operator()(Scalar* blockA, const DataMapper& lhs, Index depth, Index rows, Index stride=0, Index offset=0);\n};\n\ntemplate<typename Scalar, typename Index, typename DataMapper, int Pack1, int Pack2, typename Packet, bool Conjugate, bool PanelMode>\nEIGEN_DONT_INLINE void gemm_pack_lhs<Scalar, Index, DataMapper, Pack1, Pack2, Packet, ColMajor, Conjugate, PanelMode>\n  ::operator()(Scalar* blockA, const DataMapper& lhs, Index depth, Index rows, Index stride, Index offset)\n{\n  typedef typename unpacket_traits<Packet>::half HalfPacket;\n  typedef typename unpacket_traits<typename unpacket_traits<Packet>::half>::half QuarterPacket;\n  enum { PacketSize = unpacket_traits<Packet>::size,\n         HalfPacketSize = unpacket_traits<HalfPacket>::size,\n         QuarterPacketSize = unpacket_traits<QuarterPacket>::size,\n         HasHalf = (int)HalfPacketSize < (int)PacketSize,\n         HasQuarter = (int)QuarterPacketSize < (int)HalfPacketSize};\n\n  EIGEN_ASM_COMMENT(\"EIGEN PRODUCT PACK LHS\");\n  EIGEN_UNUSED_VARIABLE(stride);\n  EIGEN_UNUSED_VARIABLE(offset);\n  eigen_assert(((!PanelMode) && stride==0 && offset==0) || (PanelMode && stride>=depth && offset<=stride));\n  eigen_assert( ((Pack1%PacketSize)==0 && Pack1<=4*PacketSize) || (Pack1<=4) );\n  conj_if<NumTraits<Scalar>::IsComplex && Conjugate> cj;\n  Index count = 0;\n\n  const Index peeled_mc3 = Pack1>=3*PacketSize ? (rows/(3*PacketSize))*(3*PacketSize) : 0;\n  const Index peeled_mc2 = Pack1>=2*PacketSize ? peeled_mc3+((rows-peeled_mc3)/(2*PacketSize))*(2*PacketSize) : 0;\n  const Index peeled_mc1 = Pack1>=1*PacketSize ? peeled_mc2+((rows-peeled_mc2)/(1*PacketSize))*(1*PacketSize) : 0;\n  const Index peeled_mc_half = Pack1>=HalfPacketSize ? peeled_mc1+((rows-peeled_mc1)/(HalfPacketSize))*(HalfPacketSize) : 0;\n  const Index peeled_mc_quarter = Pack1>=QuarterPacketSize ? (rows/(QuarterPacketSize))*(QuarterPacketSize) : 0;\n  const Index last_lhs_progress = rows > peeled_mc_quarter ? (rows - peeled_mc_quarter) & ~1 : 0;\n  const Index peeled_mc0 = Pack2>=PacketSize ? peeled_mc_quarter\n                         : Pack2>1 && last_lhs_progress ? (rows/last_lhs_progress)*last_lhs_progress : 0;\n\n  Index i=0;\n\n  // Pack 3 packets\n  if(Pack1>=3*PacketSize)\n  {\n    for(; i<peeled_mc3; i+=3*PacketSize)\n    {\n      if(PanelMode) count += (3*PacketSize) * offset;\n\n      for(Index k=0; k<depth; k++)\n      {\n        Packet A, B, C;\n        A = lhs.template loadPacket<Packet>(i+0*PacketSize, k);\n        B = lhs.template loadPacket<Packet>(i+1*PacketSize, k);\n        C = lhs.template loadPacket<Packet>(i+2*PacketSize, k);\n        pstore(blockA+count, cj.pconj(A)); count+=PacketSize;\n        pstore(blockA+count, cj.pconj(B)); count+=PacketSize;\n        pstore(blockA+count, cj.pconj(C)); count+=PacketSize;\n      }\n      if(PanelMode) count += (3*PacketSize) * (stride-offset-depth);\n    }\n  }\n  // Pack 2 packets\n  if(Pack1>=2*PacketSize)\n  {\n    for(; i<peeled_mc2; i+=2*PacketSize)\n    {\n      if(PanelMode) count += (2*PacketSize) * offset;\n\n      for(Index k=0; k<depth; k++)\n      {\n        Packet A, B;\n        A = lhs.template loadPacket<Packet>(i+0*PacketSize, k);\n        B = lhs.template loadPacket<Packet>(i+1*PacketSize, k);\n        pstore(blockA+count, cj.pconj(A)); count+=PacketSize;\n        pstore(blockA+count, cj.pconj(B)); count+=PacketSize;\n      }\n      if(PanelMode) count += (2*PacketSize) * (stride-offset-depth);\n    }\n  }\n  // Pack 1 packets\n  if(Pack1>=1*PacketSize)\n  {\n    for(; i<peeled_mc1; i+=1*PacketSize)\n    {\n      if(PanelMode) count += (1*PacketSize) * offset;\n\n      for(Index k=0; k<depth; k++)\n      {\n        Packet A;\n        A = lhs.template loadPacket<Packet>(i+0*PacketSize, k);\n        pstore(blockA+count, cj.pconj(A));\n        count+=PacketSize;\n      }\n      if(PanelMode) count += (1*PacketSize) * (stride-offset-depth);\n    }\n  }\n  // Pack half packets\n  if(HasHalf && Pack1>=HalfPacketSize)\n  {\n    for(; i<peeled_mc_half; i+=HalfPacketSize)\n    {\n      if(PanelMode) count += (HalfPacketSize) * offset;\n\n      for(Index k=0; k<depth; k++)\n      {\n        HalfPacket A;\n        A = lhs.template loadPacket<HalfPacket>(i+0*(HalfPacketSize), k);\n        pstoreu(blockA+count, cj.pconj(A));\n        count+=HalfPacketSize;\n      }\n      if(PanelMode) count += (HalfPacketSize) * (stride-offset-depth);\n    }\n  }\n  // Pack quarter packets\n  if(HasQuarter && Pack1>=QuarterPacketSize)\n  {\n    for(; i<peeled_mc_quarter; i+=QuarterPacketSize)\n    {\n      if(PanelMode) count += (QuarterPacketSize) * offset;\n\n      for(Index k=0; k<depth; k++)\n      {\n        QuarterPacket A;\n        A = lhs.template loadPacket<QuarterPacket>(i+0*(QuarterPacketSize), k);\n        pstoreu(blockA+count, cj.pconj(A));\n        count+=QuarterPacketSize;\n      }\n      if(PanelMode) count += (QuarterPacketSize) * (stride-offset-depth);\n    }\n  }\n  // Pack2 may be *smaller* than PacketSize—that happens for\n  // products like real * complex, where we have to go half the\n  // progress on the lhs in order to duplicate those operands to\n  // address both real & imaginary parts on the rhs. This portion will\n  // pack those half ones until they match the number expected on the\n  // last peeling loop at this point (for the rhs).\n  if(Pack2<PacketSize && Pack2>1)\n  {\n    for(; i<peeled_mc0; i+=last_lhs_progress)\n    {\n      if(PanelMode) count += last_lhs_progress * offset;\n\n      for(Index k=0; k<depth; k++)\n        for(Index w=0; w<last_lhs_progress; w++)\n          blockA[count++] = cj(lhs(i+w, k));\n\n      if(PanelMode) count += last_lhs_progress * (stride-offset-depth);\n    }\n  }\n  // Pack scalars\n  for(; i<rows; i++)\n  {\n    if(PanelMode) count += offset;\n    for(Index k=0; k<depth; k++)\n      blockA[count++] = cj(lhs(i, k));\n    if(PanelMode) count += (stride-offset-depth);\n  }\n}\n\ntemplate<typename Scalar, typename Index, typename DataMapper, int Pack1, int Pack2, typename Packet, bool Conjugate, bool PanelMode>\nstruct gemm_pack_lhs<Scalar, Index, DataMapper, Pack1, Pack2, Packet, RowMajor, Conjugate, PanelMode>\n{\n  typedef typename DataMapper::LinearMapper LinearMapper;\n  EIGEN_DONT_INLINE void operator()(Scalar* blockA, const DataMapper& lhs, Index depth, Index rows, Index stride=0, Index offset=0);\n};\n\ntemplate<typename Scalar, typename Index, typename DataMapper, int Pack1, int Pack2, typename Packet, bool Conjugate, bool PanelMode>\nEIGEN_DONT_INLINE void gemm_pack_lhs<Scalar, Index, DataMapper, Pack1, Pack2, Packet, RowMajor, Conjugate, PanelMode>\n  ::operator()(Scalar* blockA, const DataMapper& lhs, Index depth, Index rows, Index stride, Index offset)\n{\n  typedef typename unpacket_traits<Packet>::half HalfPacket;\n  typedef typename unpacket_traits<typename unpacket_traits<Packet>::half>::half QuarterPacket;\n  enum { PacketSize = unpacket_traits<Packet>::size,\n         HalfPacketSize = unpacket_traits<HalfPacket>::size,\n         QuarterPacketSize = unpacket_traits<QuarterPacket>::size,\n         HasHalf = (int)HalfPacketSize < (int)PacketSize,\n         HasQuarter = (int)QuarterPacketSize < (int)HalfPacketSize};\n\n  EIGEN_ASM_COMMENT(\"EIGEN PRODUCT PACK LHS\");\n  EIGEN_UNUSED_VARIABLE(stride);\n  EIGEN_UNUSED_VARIABLE(offset);\n  eigen_assert(((!PanelMode) && stride==0 && offset==0) || (PanelMode && stride>=depth && offset<=stride));\n  conj_if<NumTraits<Scalar>::IsComplex && Conjugate> cj;\n  Index count = 0;\n  bool gone_half = false, gone_quarter = false, gone_last = false;\n\n  Index i = 0;\n  int pack = Pack1;\n  int psize = PacketSize;\n  while(pack>0)\n  {\n    Index remaining_rows = rows-i;\n    Index peeled_mc = gone_last ? Pack2>1 ? (rows/pack)*pack : 0 : i+(remaining_rows/pack)*pack;\n    Index starting_pos = i;\n    for(; i<peeled_mc; i+=pack)\n    {\n      if(PanelMode) count += pack * offset;\n\n      Index k=0;\n      if(pack>=psize && psize >= QuarterPacketSize)\n      {\n        const Index peeled_k = (depth/psize)*psize;\n        for(; k<peeled_k; k+=psize)\n        {\n          for (Index m = 0; m < pack; m += psize)\n          {\n            if (psize == PacketSize) {\n              PacketBlock<Packet> kernel;\n              for (int p = 0; p < psize; ++p) kernel.packet[p] = lhs.template loadPacket<Packet>(i+p+m, k);\n              ptranspose(kernel);\n              for (int p = 0; p < psize; ++p) pstore(blockA+count+m+(pack)*p, cj.pconj(kernel.packet[p]));\n            } else if (HasHalf && psize == HalfPacketSize) {\n              gone_half = true;\n              PacketBlock<HalfPacket> kernel_half;\n              for (int p = 0; p < psize; ++p) kernel_half.packet[p] = lhs.template loadPacket<HalfPacket>(i+p+m, k);\n              ptranspose(kernel_half);\n              for (int p = 0; p < psize; ++p) pstore(blockA+count+m+(pack)*p, cj.pconj(kernel_half.packet[p]));\n            } else if (HasQuarter && psize == QuarterPacketSize) {\n              gone_quarter = true;\n              PacketBlock<QuarterPacket> kernel_quarter;\n              for (int p = 0; p < psize; ++p) kernel_quarter.packet[p] = lhs.template loadPacket<QuarterPacket>(i+p+m, k);\n              ptranspose(kernel_quarter);\n              for (int p = 0; p < psize; ++p) pstore(blockA+count+m+(pack)*p, cj.pconj(kernel_quarter.packet[p]));\n\t    }\n          }\n          count += psize*pack;\n        }\n      }\n\n      for(; k<depth; k++)\n      {\n        Index w=0;\n        for(; w<pack-3; w+=4)\n        {\n          Scalar a(cj(lhs(i+w+0, k))),\n                 b(cj(lhs(i+w+1, k))),\n                 c(cj(lhs(i+w+2, k))),\n                 d(cj(lhs(i+w+3, k)));\n          blockA[count++] = a;\n          blockA[count++] = b;\n          blockA[count++] = c;\n          blockA[count++] = d;\n        }\n        if(pack%4)\n          for(;w<pack;++w)\n            blockA[count++] = cj(lhs(i+w, k));\n      }\n\n      if(PanelMode) count += pack * (stride-offset-depth);\n    }\n\n    pack -= psize;\n    Index left = rows - i;\n    if (pack <= 0) {\n      if (!gone_last &&\n          (starting_pos == i || left >= psize/2 || left >= psize/4) &&\n          ((psize/2 == HalfPacketSize && HasHalf && !gone_half) ||\n           (psize/2 == QuarterPacketSize && HasQuarter && !gone_quarter))) {\n        psize /= 2;\n        pack = psize;\n        continue;\n      }\n      // Pack2 may be *smaller* than PacketSize—that happens for\n      // products like real * complex, where we have to go half the\n      // progress on the lhs in order to duplicate those operands to\n      // address both real & imaginary parts on the rhs. This portion will\n      // pack those half ones until they match the number expected on the\n      // last peeling loop at this point (for the rhs).\n      if (Pack2 < PacketSize && !gone_last) {\n        gone_last = true;\n        psize = pack = left & ~1;\n      }\n    }\n  }\n\n  for(; i<rows; i++)\n  {\n    if(PanelMode) count += offset;\n    for(Index k=0; k<depth; k++)\n      blockA[count++] = cj(lhs(i, k));\n    if(PanelMode) count += (stride-offset-depth);\n  }\n}\n\n// copy a complete panel of the rhs\n// this version is optimized for column major matrices\n// The traversal order is as follow: (nr==4):\n//  0  1  2  3   12 13 14 15   24 27\n//  4  5  6  7   16 17 18 19   25 28\n//  8  9 10 11   20 21 22 23   26 29\n//  .  .  .  .    .  .  .  .    .  .\ntemplate<typename Scalar, typename Index, typename DataMapper, int nr, bool Conjugate, bool PanelMode>\nstruct gemm_pack_rhs<Scalar, Index, DataMapper, nr, ColMajor, Conjugate, PanelMode>\n{\n  typedef typename packet_traits<Scalar>::type Packet;\n  typedef typename DataMapper::LinearMapper LinearMapper;\n  enum { PacketSize = packet_traits<Scalar>::size };\n  EIGEN_DONT_INLINE void operator()(Scalar* blockB, const DataMapper& rhs, Index depth, Index cols, Index stride=0, Index offset=0);\n};\n\ntemplate<typename Scalar, typename Index, typename DataMapper, int nr, bool Conjugate, bool PanelMode>\nEIGEN_DONT_INLINE void gemm_pack_rhs<Scalar, Index, DataMapper, nr, ColMajor, Conjugate, PanelMode>\n  ::operator()(Scalar* blockB, const DataMapper& rhs, Index depth, Index cols, Index stride, Index offset)\n{\n  EIGEN_ASM_COMMENT(\"EIGEN PRODUCT PACK RHS COLMAJOR\");\n  EIGEN_UNUSED_VARIABLE(stride);\n  EIGEN_UNUSED_VARIABLE(offset);\n  eigen_assert(((!PanelMode) && stride==0 && offset==0) || (PanelMode && stride>=depth && offset<=stride));\n  conj_if<NumTraits<Scalar>::IsComplex && Conjugate> cj;\n  Index packet_cols8 = nr>=8 ? (cols/8) * 8 : 0;\n  Index packet_cols4 = nr>=4 ? (cols/4) * 4 : 0;\n  Index count = 0;\n  const Index peeled_k = (depth/PacketSize)*PacketSize;\n//   if(nr>=8)\n//   {\n//     for(Index j2=0; j2<packet_cols8; j2+=8)\n//     {\n//       // skip what we have before\n//       if(PanelMode) count += 8 * offset;\n//       const Scalar* b0 = &rhs[(j2+0)*rhsStride];\n//       const Scalar* b1 = &rhs[(j2+1)*rhsStride];\n//       const Scalar* b2 = &rhs[(j2+2)*rhsStride];\n//       const Scalar* b3 = &rhs[(j2+3)*rhsStride];\n//       const Scalar* b4 = &rhs[(j2+4)*rhsStride];\n//       const Scalar* b5 = &rhs[(j2+5)*rhsStride];\n//       const Scalar* b6 = &rhs[(j2+6)*rhsStride];\n//       const Scalar* b7 = &rhs[(j2+7)*rhsStride];\n//       Index k=0;\n//       if(PacketSize==8) // TODO enable vectorized transposition for PacketSize==4\n//       {\n//         for(; k<peeled_k; k+=PacketSize) {\n//           PacketBlock<Packet> kernel;\n//           for (int p = 0; p < PacketSize; ++p) {\n//             kernel.packet[p] = ploadu<Packet>(&rhs[(j2+p)*rhsStride+k]);\n//           }\n//           ptranspose(kernel);\n//           for (int p = 0; p < PacketSize; ++p) {\n//             pstoreu(blockB+count, cj.pconj(kernel.packet[p]));\n//             count+=PacketSize;\n//           }\n//         }\n//       }\n//       for(; k<depth; k++)\n//       {\n//         blockB[count+0] = cj(b0[k]);\n//         blockB[count+1] = cj(b1[k]);\n//         blockB[count+2] = cj(b2[k]);\n//         blockB[count+3] = cj(b3[k]);\n//         blockB[count+4] = cj(b4[k]);\n//         blockB[count+5] = cj(b5[k]);\n//         blockB[count+6] = cj(b6[k]);\n//         blockB[count+7] = cj(b7[k]);\n//         count += 8;\n//       }\n//       // skip what we have after\n//       if(PanelMode) count += 8 * (stride-offset-depth);\n//     }\n//   }\n\n  if(nr>=4)\n  {\n    for(Index j2=packet_cols8; j2<packet_cols4; j2+=4)\n    {\n      // skip what we have before\n      if(PanelMode) count += 4 * offset;\n      const LinearMapper dm0 = rhs.getLinearMapper(0, j2 + 0);\n      const LinearMapper dm1 = rhs.getLinearMapper(0, j2 + 1);\n      const LinearMapper dm2 = rhs.getLinearMapper(0, j2 + 2);\n      const LinearMapper dm3 = rhs.getLinearMapper(0, j2 + 3);\n\n      Index k=0;\n      if((PacketSize%4)==0) // TODO enable vectorized transposition for PacketSize==2 ??\n      {\n        for(; k<peeled_k; k+=PacketSize) {\n          PacketBlock<Packet,(PacketSize%4)==0?4:PacketSize> kernel;\n          kernel.packet[0           ] = dm0.template loadPacket<Packet>(k);\n          kernel.packet[1%PacketSize] = dm1.template loadPacket<Packet>(k);\n          kernel.packet[2%PacketSize] = dm2.template loadPacket<Packet>(k);\n          kernel.packet[3%PacketSize] = dm3.template loadPacket<Packet>(k);\n          ptranspose(kernel);\n          pstoreu(blockB+count+0*PacketSize, cj.pconj(kernel.packet[0]));\n          pstoreu(blockB+count+1*PacketSize, cj.pconj(kernel.packet[1%PacketSize]));\n          pstoreu(blockB+count+2*PacketSize, cj.pconj(kernel.packet[2%PacketSize]));\n          pstoreu(blockB+count+3*PacketSize, cj.pconj(kernel.packet[3%PacketSize]));\n          count+=4*PacketSize;\n        }\n      }\n      for(; k<depth; k++)\n      {\n        blockB[count+0] = cj(dm0(k));\n        blockB[count+1] = cj(dm1(k));\n        blockB[count+2] = cj(dm2(k));\n        blockB[count+3] = cj(dm3(k));\n        count += 4;\n      }\n      // skip what we have after\n      if(PanelMode) count += 4 * (stride-offset-depth);\n    }\n  }\n\n  // copy the remaining columns one at a time (nr==1)\n  for(Index j2=packet_cols4; j2<cols; ++j2)\n  {\n    if(PanelMode) count += offset;\n    const LinearMapper dm0 = rhs.getLinearMapper(0, j2);\n    for(Index k=0; k<depth; k++)\n    {\n      blockB[count] = cj(dm0(k));\n      count += 1;\n    }\n    if(PanelMode) count += (stride-offset-depth);\n  }\n}\n\n// this version is optimized for row major matrices\ntemplate<typename Scalar, typename Index, typename DataMapper, int nr, bool Conjugate, bool PanelMode>\nstruct gemm_pack_rhs<Scalar, Index, DataMapper, nr, RowMajor, Conjugate, PanelMode>\n{\n  typedef typename packet_traits<Scalar>::type Packet;\n  typedef typename unpacket_traits<Packet>::half HalfPacket;\n  typedef typename unpacket_traits<typename unpacket_traits<Packet>::half>::half QuarterPacket;\n  typedef typename DataMapper::LinearMapper LinearMapper;\n  enum { PacketSize = packet_traits<Scalar>::size,\n         HalfPacketSize = unpacket_traits<HalfPacket>::size,\n         QuarterPacketSize = unpacket_traits<QuarterPacket>::size,\n         HasHalf = (int)HalfPacketSize < (int)PacketSize,\n         HasQuarter = (int)QuarterPacketSize < (int)HalfPacketSize };\n  EIGEN_DONT_INLINE void operator()(Scalar* blockB, const DataMapper& rhs, Index depth, Index cols, Index stride=0, Index offset=0);\n};\n\ntemplate<typename Scalar, typename Index, typename DataMapper, int nr, bool Conjugate, bool PanelMode>\nEIGEN_DONT_INLINE void gemm_pack_rhs<Scalar, Index, DataMapper, nr, RowMajor, Conjugate, PanelMode>\n  ::operator()(Scalar* blockB, const DataMapper& rhs, Index depth, Index cols, Index stride, Index offset)\n{\n  EIGEN_ASM_COMMENT(\"EIGEN PRODUCT PACK RHS ROWMAJOR\");\n  EIGEN_UNUSED_VARIABLE(stride);\n  EIGEN_UNUSED_VARIABLE(offset);\n  eigen_assert(((!PanelMode) && stride==0 && offset==0) || (PanelMode && stride>=depth && offset<=stride));\n  conj_if<NumTraits<Scalar>::IsComplex && Conjugate> cj;\n  Index packet_cols8 = nr>=8 ? (cols/8) * 8 : 0;\n  Index packet_cols4 = nr>=4 ? (cols/4) * 4 : 0;\n  Index count = 0;\n\n//   if(nr>=8)\n//   {\n//     for(Index j2=0; j2<packet_cols8; j2+=8)\n//     {\n//       // skip what we have before\n//       if(PanelMode) count += 8 * offset;\n//       for(Index k=0; k<depth; k++)\n//       {\n//         if (PacketSize==8) {\n//           Packet A = ploadu<Packet>(&rhs[k*rhsStride + j2]);\n//           pstoreu(blockB+count, cj.pconj(A));\n//         } else if (PacketSize==4) {\n//           Packet A = ploadu<Packet>(&rhs[k*rhsStride + j2]);\n//           Packet B = ploadu<Packet>(&rhs[k*rhsStride + j2 + PacketSize]);\n//           pstoreu(blockB+count, cj.pconj(A));\n//           pstoreu(blockB+count+PacketSize, cj.pconj(B));\n//         } else {\n//           const Scalar* b0 = &rhs[k*rhsStride + j2];\n//           blockB[count+0] = cj(b0[0]);\n//           blockB[count+1] = cj(b0[1]);\n//           blockB[count+2] = cj(b0[2]);\n//           blockB[count+3] = cj(b0[3]);\n//           blockB[count+4] = cj(b0[4]);\n//           blockB[count+5] = cj(b0[5]);\n//           blockB[count+6] = cj(b0[6]);\n//           blockB[count+7] = cj(b0[7]);\n//         }\n//         count += 8;\n//       }\n//       // skip what we have after\n//       if(PanelMode) count += 8 * (stride-offset-depth);\n//     }\n//   }\n  if(nr>=4)\n  {\n    for(Index j2=packet_cols8; j2<packet_cols4; j2+=4)\n    {\n      // skip what we have before\n      if(PanelMode) count += 4 * offset;\n      for(Index k=0; k<depth; k++)\n      {\n        if (PacketSize==4) {\n          Packet A = rhs.template loadPacket<Packet>(k, j2);\n          pstoreu(blockB+count, cj.pconj(A));\n          count += PacketSize;\n        } else if (HasHalf && HalfPacketSize==4) {\n          HalfPacket A = rhs.template loadPacket<HalfPacket>(k, j2);\n          pstoreu(blockB+count, cj.pconj(A));\n          count += HalfPacketSize;\n        } else if (HasQuarter && QuarterPacketSize==4) {\n          QuarterPacket A = rhs.template loadPacket<QuarterPacket>(k, j2);\n          pstoreu(blockB+count, cj.pconj(A));\n          count += QuarterPacketSize;\n        } else {\n          const LinearMapper dm0 = rhs.getLinearMapper(k, j2);\n          blockB[count+0] = cj(dm0(0));\n          blockB[count+1] = cj(dm0(1));\n          blockB[count+2] = cj(dm0(2));\n          blockB[count+3] = cj(dm0(3));\n          count += 4;\n        }\n      }\n      // skip what we have after\n      if(PanelMode) count += 4 * (stride-offset-depth);\n    }\n  }\n  // copy the remaining columns one at a time (nr==1)\n  for(Index j2=packet_cols4; j2<cols; ++j2)\n  {\n    if(PanelMode) count += offset;\n    for(Index k=0; k<depth; k++)\n    {\n      blockB[count] = cj(rhs(k, j2));\n      count += 1;\n    }\n    if(PanelMode) count += stride-offset-depth;\n  }\n}\n\n} // end namespace internal\n\n/** \\returns the currently set level 1 cpu cache size (in bytes) used to estimate the ideal blocking size parameters.\n  * \\sa setCpuCacheSize */\ninline std::ptrdiff_t l1CacheSize()\n{\n  std::ptrdiff_t l1, l2, l3;\n  internal::manage_caching_sizes(GetAction, &l1, &l2, &l3);\n  return l1;\n}\n\n/** \\returns the currently set level 2 cpu cache size (in bytes) used to estimate the ideal blocking size parameters.\n  * \\sa setCpuCacheSize */\ninline std::ptrdiff_t l2CacheSize()\n{\n  std::ptrdiff_t l1, l2, l3;\n  internal::manage_caching_sizes(GetAction, &l1, &l2, &l3);\n  return l2;\n}\n\n/** \\returns the currently set level 3 cpu cache size (in bytes) used to estimate the ideal blocking size paramete\\\nrs.                                                                                                                \n* \\sa setCpuCacheSize */\ninline std::ptrdiff_t l3CacheSize()\n{\n  std::ptrdiff_t l1, l2, l3;\n  internal::manage_caching_sizes(GetAction, &l1, &l2, &l3);\n  return l3;\n}\n\n/** Set the cpu L1 and L2 cache sizes (in bytes).\n  * These values are use to adjust the size of the blocks\n  * for the algorithms working per blocks.\n  *\n  * \\sa computeProductBlockingSizes */\ninline void setCpuCacheSizes(std::ptrdiff_t l1, std::ptrdiff_t l2, std::ptrdiff_t l3)\n{\n  internal::manage_caching_sizes(SetAction, &l1, &l2, &l3);\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_GENERAL_BLOCK_PANEL_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/products/GeneralMatrixMatrix.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_GENERAL_MATRIX_MATRIX_H\n#define EIGEN_GENERAL_MATRIX_MATRIX_H\n\nnamespace Eigen {\n\nnamespace internal {\n\ntemplate<typename _LhsScalar, typename _RhsScalar> class level3_blocking;\n\n/* Specialization for a row-major destination matrix => simple transposition of the product */\ntemplate<\n  typename Index,\n  typename LhsScalar, int LhsStorageOrder, bool ConjugateLhs,\n  typename RhsScalar, int RhsStorageOrder, bool ConjugateRhs,\n  int ResInnerStride>\nstruct general_matrix_matrix_product<Index,LhsScalar,LhsStorageOrder,ConjugateLhs,RhsScalar,RhsStorageOrder,ConjugateRhs,RowMajor,ResInnerStride>\n{\n  typedef gebp_traits<RhsScalar,LhsScalar> Traits;\n\n  typedef typename ScalarBinaryOpTraits<LhsScalar, RhsScalar>::ReturnType ResScalar;\n  static EIGEN_STRONG_INLINE void run(\n    Index rows, Index cols, Index depth,\n    const LhsScalar* lhs, Index lhsStride,\n    const RhsScalar* rhs, Index rhsStride,\n    ResScalar* res, Index resIncr, Index resStride,\n    ResScalar alpha,\n    level3_blocking<RhsScalar,LhsScalar>& blocking,\n    GemmParallelInfo<Index>* info = 0)\n  {\n    // transpose the product such that the result is column major\n    general_matrix_matrix_product<Index,\n      RhsScalar, RhsStorageOrder==RowMajor ? ColMajor : RowMajor, ConjugateRhs,\n      LhsScalar, LhsStorageOrder==RowMajor ? ColMajor : RowMajor, ConjugateLhs,\n      ColMajor,ResInnerStride>\n    ::run(cols,rows,depth,rhs,rhsStride,lhs,lhsStride,res,resIncr,resStride,alpha,blocking,info);\n  }\n};\n\n/*  Specialization for a col-major destination matrix\n *    => Blocking algorithm following Goto's paper */\ntemplate<\n  typename Index,\n  typename LhsScalar, int LhsStorageOrder, bool ConjugateLhs,\n  typename RhsScalar, int RhsStorageOrder, bool ConjugateRhs,\n  int ResInnerStride>\nstruct general_matrix_matrix_product<Index,LhsScalar,LhsStorageOrder,ConjugateLhs,RhsScalar,RhsStorageOrder,ConjugateRhs,ColMajor,ResInnerStride>\n{\n\ntypedef gebp_traits<LhsScalar,RhsScalar> Traits;\n\ntypedef typename ScalarBinaryOpTraits<LhsScalar, RhsScalar>::ReturnType ResScalar;\nstatic void run(Index rows, Index cols, Index depth,\n  const LhsScalar* _lhs, Index lhsStride,\n  const RhsScalar* _rhs, Index rhsStride,\n  ResScalar* _res, Index resIncr, Index resStride,\n  ResScalar alpha,\n  level3_blocking<LhsScalar,RhsScalar>& blocking,\n  GemmParallelInfo<Index>* info = 0)\n{\n  typedef const_blas_data_mapper<LhsScalar, Index, LhsStorageOrder> LhsMapper;\n  typedef const_blas_data_mapper<RhsScalar, Index, RhsStorageOrder> RhsMapper;\n  typedef blas_data_mapper<typename Traits::ResScalar, Index, ColMajor,Unaligned,ResInnerStride> ResMapper;\n  LhsMapper lhs(_lhs, lhsStride);\n  RhsMapper rhs(_rhs, rhsStride);\n  ResMapper res(_res, resStride, resIncr);\n\n  Index kc = blocking.kc();                   // cache block size along the K direction\n  Index mc = (std::min)(rows,blocking.mc());  // cache block size along the M direction\n  Index nc = (std::min)(cols,blocking.nc());  // cache block size along the N direction\n\n  gemm_pack_lhs<LhsScalar, Index, LhsMapper, Traits::mr, Traits::LhsProgress, typename Traits::LhsPacket4Packing, LhsStorageOrder> pack_lhs;\n  gemm_pack_rhs<RhsScalar, Index, RhsMapper, Traits::nr, RhsStorageOrder> pack_rhs;\n  gebp_kernel<LhsScalar, RhsScalar, Index, ResMapper, Traits::mr, Traits::nr, ConjugateLhs, ConjugateRhs> gebp;\n\n#ifdef EIGEN_HAS_OPENMP\n  if(info)\n  {\n    // this is the parallel version!\n    int tid = omp_get_thread_num();\n    int threads = omp_get_num_threads();\n\n    LhsScalar* blockA = blocking.blockA();\n    eigen_internal_assert(blockA!=0);\n\n    std::size_t sizeB = kc*nc;\n    ei_declare_aligned_stack_constructed_variable(RhsScalar, blockB, sizeB, 0);\n\n    // For each horizontal panel of the rhs, and corresponding vertical panel of the lhs...\n    for(Index k=0; k<depth; k+=kc)\n    {\n      const Index actual_kc = (std::min)(k+kc,depth)-k; // => rows of B', and cols of the A'\n\n      // In order to reduce the chance that a thread has to wait for the other,\n      // let's start by packing B'.\n      pack_rhs(blockB, rhs.getSubMapper(k,0), actual_kc, nc);\n\n      // Pack A_k to A' in a parallel fashion:\n      // each thread packs the sub block A_k,i to A'_i where i is the thread id.\n\n      // However, before copying to A'_i, we have to make sure that no other thread is still using it,\n      // i.e., we test that info[tid].users equals 0.\n      // Then, we set info[tid].users to the number of threads to mark that all other threads are going to use it.\n      while(info[tid].users!=0) {}\n      info[tid].users = threads;\n\n      pack_lhs(blockA+info[tid].lhs_start*actual_kc, lhs.getSubMapper(info[tid].lhs_start,k), actual_kc, info[tid].lhs_length);\n\n      // Notify the other threads that the part A'_i is ready to go.\n      info[tid].sync = k;\n\n      // Computes C_i += A' * B' per A'_i\n      for(int shift=0; shift<threads; ++shift)\n      {\n        int i = (tid+shift)%threads;\n\n        // At this point we have to make sure that A'_i has been updated by the thread i,\n        // we use testAndSetOrdered to mimic a volatile access.\n        // However, no need to wait for the B' part which has been updated by the current thread!\n        if (shift>0) {\n          while(info[i].sync!=k) {\n          }\n        }\n\n        gebp(res.getSubMapper(info[i].lhs_start, 0), blockA+info[i].lhs_start*actual_kc, blockB, info[i].lhs_length, actual_kc, nc, alpha);\n      }\n\n      // Then keep going as usual with the remaining B'\n      for(Index j=nc; j<cols; j+=nc)\n      {\n        const Index actual_nc = (std::min)(j+nc,cols)-j;\n\n        // pack B_k,j to B'\n        pack_rhs(blockB, rhs.getSubMapper(k,j), actual_kc, actual_nc);\n\n        // C_j += A' * B'\n        gebp(res.getSubMapper(0, j), blockA, blockB, rows, actual_kc, actual_nc, alpha);\n      }\n\n      // Release all the sub blocks A'_i of A' for the current thread,\n      // i.e., we simply decrement the number of users by 1\n      for(Index i=0; i<threads; ++i)\n#if !EIGEN_HAS_CXX11_ATOMIC\n        #pragma omp atomic\n#endif\n        info[i].users -= 1;\n    }\n  }\n  else\n#endif // EIGEN_HAS_OPENMP\n  {\n    EIGEN_UNUSED_VARIABLE(info);\n\n    // this is the sequential version!\n    std::size_t sizeA = kc*mc;\n    std::size_t sizeB = kc*nc;\n\n    ei_declare_aligned_stack_constructed_variable(LhsScalar, blockA, sizeA, blocking.blockA());\n    ei_declare_aligned_stack_constructed_variable(RhsScalar, blockB, sizeB, blocking.blockB());\n\n    const bool pack_rhs_once = mc!=rows && kc==depth && nc==cols;\n\n    // For each horizontal panel of the rhs, and corresponding panel of the lhs...\n    for(Index i2=0; i2<rows; i2+=mc)\n    {\n      const Index actual_mc = (std::min)(i2+mc,rows)-i2;\n\n      for(Index k2=0; k2<depth; k2+=kc)\n      {\n        const Index actual_kc = (std::min)(k2+kc,depth)-k2;\n\n        // OK, here we have selected one horizontal panel of rhs and one vertical panel of lhs.\n        // => Pack lhs's panel into a sequential chunk of memory (L2/L3 caching)\n        // Note that this panel will be read as many times as the number of blocks in the rhs's\n        // horizontal panel which is, in practice, a very low number.\n        pack_lhs(blockA, lhs.getSubMapper(i2,k2), actual_kc, actual_mc);\n\n        // For each kc x nc block of the rhs's horizontal panel...\n        for(Index j2=0; j2<cols; j2+=nc)\n        {\n          const Index actual_nc = (std::min)(j2+nc,cols)-j2;\n\n          // We pack the rhs's block into a sequential chunk of memory (L2 caching)\n          // Note that this block will be read a very high number of times, which is equal to the number of\n          // micro horizontal panel of the large rhs's panel (e.g., rows/12 times).\n          if((!pack_rhs_once) || i2==0)\n            pack_rhs(blockB, rhs.getSubMapper(k2,j2), actual_kc, actual_nc);\n\n          // Everything is packed, we can now call the panel * block kernel:\n          gebp(res.getSubMapper(i2, j2), blockA, blockB, actual_mc, actual_kc, actual_nc, alpha);\n        }\n      }\n    }\n  }\n}\n\n};\n\n/*********************************************************************************\n*  Specialization of generic_product_impl for \"large\" GEMM, i.e.,\n*  implementation of the high level wrapper to general_matrix_matrix_product\n**********************************************************************************/\n\ntemplate<typename Scalar, typename Index, typename Gemm, typename Lhs, typename Rhs, typename Dest, typename BlockingType>\nstruct gemm_functor\n{\n  gemm_functor(const Lhs& lhs, const Rhs& rhs, Dest& dest, const Scalar& actualAlpha, BlockingType& blocking)\n    : m_lhs(lhs), m_rhs(rhs), m_dest(dest), m_actualAlpha(actualAlpha), m_blocking(blocking)\n  {}\n\n  void initParallelSession(Index num_threads) const\n  {\n    m_blocking.initParallel(m_lhs.rows(), m_rhs.cols(), m_lhs.cols(), num_threads);\n    m_blocking.allocateA();\n  }\n\n  void operator() (Index row, Index rows, Index col=0, Index cols=-1, GemmParallelInfo<Index>* info=0) const\n  {\n    if(cols==-1)\n      cols = m_rhs.cols();\n\n    Gemm::run(rows, cols, m_lhs.cols(),\n              &m_lhs.coeffRef(row,0), m_lhs.outerStride(),\n              &m_rhs.coeffRef(0,col), m_rhs.outerStride(),\n              (Scalar*)&(m_dest.coeffRef(row,col)), m_dest.innerStride(), m_dest.outerStride(),\n              m_actualAlpha, m_blocking, info);\n  }\n\n  typedef typename Gemm::Traits Traits;\n\n  protected:\n    const Lhs& m_lhs;\n    const Rhs& m_rhs;\n    Dest& m_dest;\n    Scalar m_actualAlpha;\n    BlockingType& m_blocking;\n};\n\ntemplate<int StorageOrder, typename LhsScalar, typename RhsScalar, int MaxRows, int MaxCols, int MaxDepth, int KcFactor=1,\nbool FiniteAtCompileTime = MaxRows!=Dynamic && MaxCols!=Dynamic && MaxDepth != Dynamic> class gemm_blocking_space;\n\ntemplate<typename _LhsScalar, typename _RhsScalar>\nclass level3_blocking\n{\n    typedef _LhsScalar LhsScalar;\n    typedef _RhsScalar RhsScalar;\n\n  protected:\n    LhsScalar* m_blockA;\n    RhsScalar* m_blockB;\n\n    Index m_mc;\n    Index m_nc;\n    Index m_kc;\n\n  public:\n\n    level3_blocking()\n      : m_blockA(0), m_blockB(0), m_mc(0), m_nc(0), m_kc(0)\n    {}\n\n    inline Index mc() const { return m_mc; }\n    inline Index nc() const { return m_nc; }\n    inline Index kc() const { return m_kc; }\n\n    inline LhsScalar* blockA() { return m_blockA; }\n    inline RhsScalar* blockB() { return m_blockB; }\n};\n\ntemplate<int StorageOrder, typename _LhsScalar, typename _RhsScalar, int MaxRows, int MaxCols, int MaxDepth, int KcFactor>\nclass gemm_blocking_space<StorageOrder,_LhsScalar,_RhsScalar,MaxRows, MaxCols, MaxDepth, KcFactor, true /* == FiniteAtCompileTime */>\n  : public level3_blocking<\n      typename conditional<StorageOrder==RowMajor,_RhsScalar,_LhsScalar>::type,\n      typename conditional<StorageOrder==RowMajor,_LhsScalar,_RhsScalar>::type>\n{\n    enum {\n      Transpose = StorageOrder==RowMajor,\n      ActualRows = Transpose ? MaxCols : MaxRows,\n      ActualCols = Transpose ? MaxRows : MaxCols\n    };\n    typedef typename conditional<Transpose,_RhsScalar,_LhsScalar>::type LhsScalar;\n    typedef typename conditional<Transpose,_LhsScalar,_RhsScalar>::type RhsScalar;\n    typedef gebp_traits<LhsScalar,RhsScalar> Traits;\n    enum {\n      SizeA = ActualRows * MaxDepth,\n      SizeB = ActualCols * MaxDepth\n    };\n\n#if EIGEN_MAX_STATIC_ALIGN_BYTES >= EIGEN_DEFAULT_ALIGN_BYTES\n    EIGEN_ALIGN_MAX LhsScalar m_staticA[SizeA];\n    EIGEN_ALIGN_MAX RhsScalar m_staticB[SizeB];\n#else\n    EIGEN_ALIGN_MAX char m_staticA[SizeA * sizeof(LhsScalar) + EIGEN_DEFAULT_ALIGN_BYTES-1];\n    EIGEN_ALIGN_MAX char m_staticB[SizeB * sizeof(RhsScalar) + EIGEN_DEFAULT_ALIGN_BYTES-1];\n#endif\n\n  public:\n\n    gemm_blocking_space(Index /*rows*/, Index /*cols*/, Index /*depth*/, Index /*num_threads*/, bool /*full_rows = false*/)\n    {\n      this->m_mc = ActualRows;\n      this->m_nc = ActualCols;\n      this->m_kc = MaxDepth;\n#if EIGEN_MAX_STATIC_ALIGN_BYTES >= EIGEN_DEFAULT_ALIGN_BYTES\n      this->m_blockA = m_staticA;\n      this->m_blockB = m_staticB;\n#else\n      this->m_blockA = reinterpret_cast<LhsScalar*>((internal::UIntPtr(m_staticA) + (EIGEN_DEFAULT_ALIGN_BYTES-1)) & ~std::size_t(EIGEN_DEFAULT_ALIGN_BYTES-1));\n      this->m_blockB = reinterpret_cast<RhsScalar*>((internal::UIntPtr(m_staticB) + (EIGEN_DEFAULT_ALIGN_BYTES-1)) & ~std::size_t(EIGEN_DEFAULT_ALIGN_BYTES-1));\n#endif\n    }\n\n    void initParallel(Index, Index, Index, Index)\n    {}\n\n    inline void allocateA() {}\n    inline void allocateB() {}\n    inline void allocateAll() {}\n};\n\ntemplate<int StorageOrder, typename _LhsScalar, typename _RhsScalar, int MaxRows, int MaxCols, int MaxDepth, int KcFactor>\nclass gemm_blocking_space<StorageOrder,_LhsScalar,_RhsScalar,MaxRows, MaxCols, MaxDepth, KcFactor, false>\n  : public level3_blocking<\n      typename conditional<StorageOrder==RowMajor,_RhsScalar,_LhsScalar>::type,\n      typename conditional<StorageOrder==RowMajor,_LhsScalar,_RhsScalar>::type>\n{\n    enum {\n      Transpose = StorageOrder==RowMajor\n    };\n    typedef typename conditional<Transpose,_RhsScalar,_LhsScalar>::type LhsScalar;\n    typedef typename conditional<Transpose,_LhsScalar,_RhsScalar>::type RhsScalar;\n    typedef gebp_traits<LhsScalar,RhsScalar> Traits;\n\n    Index m_sizeA;\n    Index m_sizeB;\n\n  public:\n\n    gemm_blocking_space(Index rows, Index cols, Index depth, Index num_threads, bool l3_blocking)\n    {\n      this->m_mc = Transpose ? cols : rows;\n      this->m_nc = Transpose ? rows : cols;\n      this->m_kc = depth;\n\n      if(l3_blocking)\n      {\n        computeProductBlockingSizes<LhsScalar,RhsScalar,KcFactor>(this->m_kc, this->m_mc, this->m_nc, num_threads);\n      }\n      else  // no l3 blocking\n      {\n        Index n = this->m_nc;\n        computeProductBlockingSizes<LhsScalar,RhsScalar,KcFactor>(this->m_kc, this->m_mc, n, num_threads);\n      }\n\n      m_sizeA = this->m_mc * this->m_kc;\n      m_sizeB = this->m_kc * this->m_nc;\n    }\n\n    void initParallel(Index rows, Index cols, Index depth, Index num_threads)\n    {\n      this->m_mc = Transpose ? cols : rows;\n      this->m_nc = Transpose ? rows : cols;\n      this->m_kc = depth;\n\n      eigen_internal_assert(this->m_blockA==0 && this->m_blockB==0);\n      Index m = this->m_mc;\n      computeProductBlockingSizes<LhsScalar,RhsScalar,KcFactor>(this->m_kc, m, this->m_nc, num_threads);\n      m_sizeA = this->m_mc * this->m_kc;\n      m_sizeB = this->m_kc * this->m_nc;\n    }\n\n    void allocateA()\n    {\n      if(this->m_blockA==0)\n        this->m_blockA = aligned_new<LhsScalar>(m_sizeA);\n    }\n\n    void allocateB()\n    {\n      if(this->m_blockB==0)\n        this->m_blockB = aligned_new<RhsScalar>(m_sizeB);\n    }\n\n    void allocateAll()\n    {\n      allocateA();\n      allocateB();\n    }\n\n    ~gemm_blocking_space()\n    {\n      aligned_delete(this->m_blockA, m_sizeA);\n      aligned_delete(this->m_blockB, m_sizeB);\n    }\n};\n\n} // end namespace internal\n\nnamespace internal {\n\ntemplate<typename Lhs, typename Rhs>\nstruct generic_product_impl<Lhs,Rhs,DenseShape,DenseShape,GemmProduct>\n  : generic_product_impl_base<Lhs,Rhs,generic_product_impl<Lhs,Rhs,DenseShape,DenseShape,GemmProduct> >\n{\n  typedef typename Product<Lhs,Rhs>::Scalar Scalar;\n  typedef typename Lhs::Scalar LhsScalar;\n  typedef typename Rhs::Scalar RhsScalar;\n\n  typedef internal::blas_traits<Lhs> LhsBlasTraits;\n  typedef typename LhsBlasTraits::DirectLinearAccessType ActualLhsType;\n  typedef typename internal::remove_all<ActualLhsType>::type ActualLhsTypeCleaned;\n\n  typedef internal::blas_traits<Rhs> RhsBlasTraits;\n  typedef typename RhsBlasTraits::DirectLinearAccessType ActualRhsType;\n  typedef typename internal::remove_all<ActualRhsType>::type ActualRhsTypeCleaned;\n\n  enum {\n    MaxDepthAtCompileTime = EIGEN_SIZE_MIN_PREFER_FIXED(Lhs::MaxColsAtCompileTime,Rhs::MaxRowsAtCompileTime)\n  };\n\n  typedef generic_product_impl<Lhs,Rhs,DenseShape,DenseShape,CoeffBasedProductMode> lazyproduct;\n\n  template<typename Dst>\n  static void evalTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)\n  {\n    // See http://eigen.tuxfamily.org/bz/show_bug.cgi?id=404 for a discussion and helper program\n    // to determine the following heuristic.\n    // EIGEN_GEMM_TO_COEFFBASED_THRESHOLD is typically defined to 20 in GeneralProduct.h,\n    // unless it has been specialized by the user or for a given architecture.\n    // Note that the condition rhs.rows()>0 was required because lazy product is (was?) not happy with empty inputs.\n    // I'm not sure it is still required.\n    if((rhs.rows()+dst.rows()+dst.cols())<EIGEN_GEMM_TO_COEFFBASED_THRESHOLD && rhs.rows()>0)\n      lazyproduct::eval_dynamic(dst, lhs, rhs, internal::assign_op<typename Dst::Scalar,Scalar>());\n    else\n    {\n      dst.setZero();\n      scaleAndAddTo(dst, lhs, rhs, Scalar(1));\n    }\n  }\n\n  template<typename Dst>\n  static void addTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)\n  {\n    if((rhs.rows()+dst.rows()+dst.cols())<EIGEN_GEMM_TO_COEFFBASED_THRESHOLD && rhs.rows()>0)\n      lazyproduct::eval_dynamic(dst, lhs, rhs, internal::add_assign_op<typename Dst::Scalar,Scalar>());\n    else\n      scaleAndAddTo(dst,lhs, rhs, Scalar(1));\n  }\n\n  template<typename Dst>\n  static void subTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)\n  {\n    if((rhs.rows()+dst.rows()+dst.cols())<EIGEN_GEMM_TO_COEFFBASED_THRESHOLD && rhs.rows()>0)\n      lazyproduct::eval_dynamic(dst, lhs, rhs, internal::sub_assign_op<typename Dst::Scalar,Scalar>());\n    else\n      scaleAndAddTo(dst, lhs, rhs, Scalar(-1));\n  }\n\n  template<typename Dest>\n  static void scaleAndAddTo(Dest& dst, const Lhs& a_lhs, const Rhs& a_rhs, const Scalar& alpha)\n  {\n    eigen_assert(dst.rows()==a_lhs.rows() && dst.cols()==a_rhs.cols());\n    if(a_lhs.cols()==0 || a_lhs.rows()==0 || a_rhs.cols()==0)\n      return;\n\n    // Fallback to GEMV if either the lhs or rhs is a runtime vector\n    if (dst.cols() == 1)\n    {\n      typename Dest::ColXpr dst_vec(dst.col(0));\n      return internal::generic_product_impl<Lhs,typename Rhs::ConstColXpr,DenseShape,DenseShape,GemvProduct>\n        ::scaleAndAddTo(dst_vec, a_lhs, a_rhs.col(0), alpha);\n    }\n    else if (dst.rows() == 1)\n    {\n      typename Dest::RowXpr dst_vec(dst.row(0));\n      return internal::generic_product_impl<typename Lhs::ConstRowXpr,Rhs,DenseShape,DenseShape,GemvProduct>\n        ::scaleAndAddTo(dst_vec, a_lhs.row(0), a_rhs, alpha);\n    }\n\n    typename internal::add_const_on_value_type<ActualLhsType>::type lhs = LhsBlasTraits::extract(a_lhs);\n    typename internal::add_const_on_value_type<ActualRhsType>::type rhs = RhsBlasTraits::extract(a_rhs);\n\n    Scalar actualAlpha = alpha * LhsBlasTraits::extractScalarFactor(a_lhs)\n                               * RhsBlasTraits::extractScalarFactor(a_rhs);\n\n    typedef internal::gemm_blocking_space<(Dest::Flags&RowMajorBit) ? RowMajor : ColMajor,LhsScalar,RhsScalar,\n            Dest::MaxRowsAtCompileTime,Dest::MaxColsAtCompileTime,MaxDepthAtCompileTime> BlockingType;\n\n    typedef internal::gemm_functor<\n      Scalar, Index,\n      internal::general_matrix_matrix_product<\n        Index,\n        LhsScalar, (ActualLhsTypeCleaned::Flags&RowMajorBit) ? RowMajor : ColMajor, bool(LhsBlasTraits::NeedToConjugate),\n        RhsScalar, (ActualRhsTypeCleaned::Flags&RowMajorBit) ? RowMajor : ColMajor, bool(RhsBlasTraits::NeedToConjugate),\n        (Dest::Flags&RowMajorBit) ? RowMajor : ColMajor,\n        Dest::InnerStrideAtCompileTime>,\n      ActualLhsTypeCleaned, ActualRhsTypeCleaned, Dest, BlockingType> GemmFunctor;\n\n    BlockingType blocking(dst.rows(), dst.cols(), lhs.cols(), 1, true);\n    internal::parallelize_gemm<(Dest::MaxRowsAtCompileTime>32 || Dest::MaxRowsAtCompileTime==Dynamic)>\n        (GemmFunctor(lhs, rhs, dst, actualAlpha, blocking), a_lhs.rows(), a_rhs.cols(), a_lhs.cols(), Dest::Flags&RowMajorBit);\n  }\n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_GENERAL_MATRIX_MATRIX_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009-2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_GENERAL_MATRIX_MATRIX_TRIANGULAR_H\n#define EIGEN_GENERAL_MATRIX_MATRIX_TRIANGULAR_H\n\nnamespace Eigen { \n\ntemplate<typename Scalar, typename Index, int StorageOrder, int UpLo, bool ConjLhs, bool ConjRhs>\nstruct selfadjoint_rank1_update;\n\nnamespace internal {\n\n/**********************************************************************\n* This file implements a general A * B product while\n* evaluating only one triangular part of the product.\n* This is a more general version of self adjoint product (C += A A^T)\n* as the level 3 SYRK Blas routine.\n**********************************************************************/\n\n// forward declarations (defined at the end of this file)\ntemplate<typename LhsScalar, typename RhsScalar, typename Index, int mr, int nr, bool ConjLhs, bool ConjRhs, int ResInnerStride, int UpLo>\nstruct tribb_kernel;\n  \n/* Optimized matrix-matrix product evaluating only one triangular half */\ntemplate <typename Index,\n          typename LhsScalar, int LhsStorageOrder, bool ConjugateLhs,\n          typename RhsScalar, int RhsStorageOrder, bool ConjugateRhs,\n                              int ResStorageOrder, int ResInnerStride, int  UpLo, int Version = Specialized>\nstruct general_matrix_matrix_triangular_product;\n\n// as usual if the result is row major => we transpose the product\ntemplate <typename Index, typename LhsScalar, int LhsStorageOrder, bool ConjugateLhs,\n                          typename RhsScalar, int RhsStorageOrder, bool ConjugateRhs,\n                          int ResInnerStride, int  UpLo, int Version>\nstruct general_matrix_matrix_triangular_product<Index,LhsScalar,LhsStorageOrder,ConjugateLhs,RhsScalar,RhsStorageOrder,ConjugateRhs,RowMajor,ResInnerStride,UpLo,Version>\n{\n  typedef typename ScalarBinaryOpTraits<LhsScalar, RhsScalar>::ReturnType ResScalar;\n  static EIGEN_STRONG_INLINE void run(Index size, Index depth,const LhsScalar* lhs, Index lhsStride,\n                                      const RhsScalar* rhs, Index rhsStride, ResScalar* res, Index resIncr, Index resStride,\n                                      const ResScalar& alpha, level3_blocking<RhsScalar,LhsScalar>& blocking)\n  {\n    general_matrix_matrix_triangular_product<Index,\n        RhsScalar, RhsStorageOrder==RowMajor ? ColMajor : RowMajor, ConjugateRhs,\n        LhsScalar, LhsStorageOrder==RowMajor ? ColMajor : RowMajor, ConjugateLhs,\n        ColMajor, ResInnerStride, UpLo==Lower?Upper:Lower>\n      ::run(size,depth,rhs,rhsStride,lhs,lhsStride,res,resIncr,resStride,alpha,blocking);\n  }\n};\n\ntemplate <typename Index, typename LhsScalar, int LhsStorageOrder, bool ConjugateLhs,\n                          typename RhsScalar, int RhsStorageOrder, bool ConjugateRhs,\n                          int ResInnerStride, int  UpLo, int Version>\nstruct general_matrix_matrix_triangular_product<Index,LhsScalar,LhsStorageOrder,ConjugateLhs,RhsScalar,RhsStorageOrder,ConjugateRhs,ColMajor,ResInnerStride,UpLo,Version>\n{\n  typedef typename ScalarBinaryOpTraits<LhsScalar, RhsScalar>::ReturnType ResScalar;\n  static EIGEN_STRONG_INLINE void run(Index size, Index depth,const LhsScalar* _lhs, Index lhsStride,\n                                      const RhsScalar* _rhs, Index rhsStride,\n                                      ResScalar* _res, Index resIncr, Index resStride,\n                                      const ResScalar& alpha, level3_blocking<LhsScalar,RhsScalar>& blocking)\n  {\n    typedef gebp_traits<LhsScalar,RhsScalar> Traits;\n\n    typedef const_blas_data_mapper<LhsScalar, Index, LhsStorageOrder> LhsMapper;\n    typedef const_blas_data_mapper<RhsScalar, Index, RhsStorageOrder> RhsMapper;\n    typedef blas_data_mapper<typename Traits::ResScalar, Index, ColMajor, Unaligned, ResInnerStride> ResMapper;\n    LhsMapper lhs(_lhs,lhsStride);\n    RhsMapper rhs(_rhs,rhsStride);\n    ResMapper res(_res, resStride, resIncr);\n\n    Index kc = blocking.kc();\n    Index mc = (std::min)(size,blocking.mc());\n\n    // !!! mc must be a multiple of nr:\n    if(mc > Traits::nr)\n      mc = (mc/Traits::nr)*Traits::nr;\n\n    std::size_t sizeA = kc*mc;\n    std::size_t sizeB = kc*size;\n\n    ei_declare_aligned_stack_constructed_variable(LhsScalar, blockA, sizeA, blocking.blockA());\n    ei_declare_aligned_stack_constructed_variable(RhsScalar, blockB, sizeB, blocking.blockB());\n\n    gemm_pack_lhs<LhsScalar, Index, LhsMapper, Traits::mr, Traits::LhsProgress, typename Traits::LhsPacket4Packing, LhsStorageOrder> pack_lhs;\n    gemm_pack_rhs<RhsScalar, Index, RhsMapper, Traits::nr, RhsStorageOrder> pack_rhs;\n    gebp_kernel<LhsScalar, RhsScalar, Index, ResMapper, Traits::mr, Traits::nr, ConjugateLhs, ConjugateRhs> gebp;\n    tribb_kernel<LhsScalar, RhsScalar, Index, Traits::mr, Traits::nr, ConjugateLhs, ConjugateRhs, ResInnerStride, UpLo> sybb;\n\n    for(Index k2=0; k2<depth; k2+=kc)\n    {\n      const Index actual_kc = (std::min)(k2+kc,depth)-k2;\n\n      // note that the actual rhs is the transpose/adjoint of mat\n      pack_rhs(blockB, rhs.getSubMapper(k2,0), actual_kc, size);\n\n      for(Index i2=0; i2<size; i2+=mc)\n      {\n        const Index actual_mc = (std::min)(i2+mc,size)-i2;\n\n        pack_lhs(blockA, lhs.getSubMapper(i2, k2), actual_kc, actual_mc);\n\n        // the selected actual_mc * size panel of res is split into three different part:\n        //  1 - before the diagonal => processed with gebp or skipped\n        //  2 - the actual_mc x actual_mc symmetric block => processed with a special kernel\n        //  3 - after the diagonal => processed with gebp or skipped\n        if (UpLo==Lower)\n          gebp(res.getSubMapper(i2, 0), blockA, blockB, actual_mc, actual_kc,\n               (std::min)(size,i2), alpha, -1, -1, 0, 0);\n\n        sybb(_res+resStride*i2 + resIncr*i2, resIncr, resStride, blockA, blockB + actual_kc*i2, actual_mc, actual_kc, alpha);\n\n        if (UpLo==Upper)\n        {\n          Index j2 = i2+actual_mc;\n          gebp(res.getSubMapper(i2, j2), blockA, blockB+actual_kc*j2, actual_mc,\n               actual_kc, (std::max)(Index(0), size-j2), alpha, -1, -1, 0, 0);\n        }\n      }\n    }\n  }\n};\n\n// Optimized packed Block * packed Block product kernel evaluating only one given triangular part\n// This kernel is built on top of the gebp kernel:\n// - the current destination block is processed per panel of actual_mc x BlockSize\n//   where BlockSize is set to the minimal value allowing gebp to be as fast as possible\n// - then, as usual, each panel is split into three parts along the diagonal,\n//   the sub blocks above and below the diagonal are processed as usual,\n//   while the triangular block overlapping the diagonal is evaluated into a\n//   small temporary buffer which is then accumulated into the result using a\n//   triangular traversal.\ntemplate<typename LhsScalar, typename RhsScalar, typename Index, int mr, int nr, bool ConjLhs, bool ConjRhs, int ResInnerStride, int UpLo>\nstruct tribb_kernel\n{\n  typedef gebp_traits<LhsScalar,RhsScalar,ConjLhs,ConjRhs> Traits;\n  typedef typename Traits::ResScalar ResScalar;\n\n  enum {\n    BlockSize  = meta_least_common_multiple<EIGEN_PLAIN_ENUM_MAX(mr,nr),EIGEN_PLAIN_ENUM_MIN(mr,nr)>::ret\n  };\n  void operator()(ResScalar* _res, Index resIncr, Index resStride, const LhsScalar* blockA, const RhsScalar* blockB, Index size, Index depth, const ResScalar& alpha)\n  {\n    typedef blas_data_mapper<ResScalar, Index, ColMajor, Unaligned, ResInnerStride> ResMapper;\n    typedef blas_data_mapper<ResScalar, Index, ColMajor, Unaligned> BufferMapper;\n    ResMapper res(_res, resStride, resIncr);\n    gebp_kernel<LhsScalar, RhsScalar, Index, ResMapper, mr, nr, ConjLhs, ConjRhs> gebp_kernel1;\n    gebp_kernel<LhsScalar, RhsScalar, Index, BufferMapper, mr, nr, ConjLhs, ConjRhs> gebp_kernel2;\n\n    Matrix<ResScalar,BlockSize,BlockSize,ColMajor> buffer((internal::constructor_without_unaligned_array_assert()));\n\n    // let's process the block per panel of actual_mc x BlockSize,\n    // again, each is split into three parts, etc.\n    for (Index j=0; j<size; j+=BlockSize)\n    {\n      Index actualBlockSize = std::min<Index>(BlockSize,size - j);\n      const RhsScalar* actual_b = blockB+j*depth;\n\n      if(UpLo==Upper)\n        gebp_kernel1(res.getSubMapper(0, j), blockA, actual_b, j, depth, actualBlockSize, alpha,\n                     -1, -1, 0, 0);\n      \n      // selfadjoint micro block\n      {\n        Index i = j;\n        buffer.setZero();\n        // 1 - apply the kernel on the temporary buffer\n        gebp_kernel2(BufferMapper(buffer.data(), BlockSize), blockA+depth*i, actual_b, actualBlockSize, depth, actualBlockSize, alpha,\n                     -1, -1, 0, 0);\n\n        // 2 - triangular accumulation\n        for(Index j1=0; j1<actualBlockSize; ++j1)\n        {\n          typename ResMapper::LinearMapper r = res.getLinearMapper(i,j+j1);\n          for(Index i1=UpLo==Lower ? j1 : 0;\n              UpLo==Lower ? i1<actualBlockSize : i1<=j1; ++i1)\n            r(i1) += buffer(i1,j1);\n        }\n      }\n\n      if(UpLo==Lower)\n      {\n        Index i = j+actualBlockSize;\n        gebp_kernel1(res.getSubMapper(i, j), blockA+depth*i, actual_b, size-i, \n                     depth, actualBlockSize, alpha, -1, -1, 0, 0);\n      }\n    }\n  }\n};\n\n} // end namespace internal\n\n// high level API\n\ntemplate<typename MatrixType, typename ProductType, int UpLo, bool IsOuterProduct>\nstruct general_product_to_triangular_selector;\n\n\ntemplate<typename MatrixType, typename ProductType, int UpLo>\nstruct general_product_to_triangular_selector<MatrixType,ProductType,UpLo,true>\n{\n  static void run(MatrixType& mat, const ProductType& prod, const typename MatrixType::Scalar& alpha, bool beta)\n  {\n    typedef typename MatrixType::Scalar Scalar;\n    \n    typedef typename internal::remove_all<typename ProductType::LhsNested>::type Lhs;\n    typedef internal::blas_traits<Lhs> LhsBlasTraits;\n    typedef typename LhsBlasTraits::DirectLinearAccessType ActualLhs;\n    typedef typename internal::remove_all<ActualLhs>::type _ActualLhs;\n    typename internal::add_const_on_value_type<ActualLhs>::type actualLhs = LhsBlasTraits::extract(prod.lhs());\n    \n    typedef typename internal::remove_all<typename ProductType::RhsNested>::type Rhs;\n    typedef internal::blas_traits<Rhs> RhsBlasTraits;\n    typedef typename RhsBlasTraits::DirectLinearAccessType ActualRhs;\n    typedef typename internal::remove_all<ActualRhs>::type _ActualRhs;\n    typename internal::add_const_on_value_type<ActualRhs>::type actualRhs = RhsBlasTraits::extract(prod.rhs());\n\n    Scalar actualAlpha = alpha * LhsBlasTraits::extractScalarFactor(prod.lhs().derived()) * RhsBlasTraits::extractScalarFactor(prod.rhs().derived());\n\n    if(!beta)\n      mat.template triangularView<UpLo>().setZero();\n\n    enum {\n      StorageOrder = (internal::traits<MatrixType>::Flags&RowMajorBit) ? RowMajor : ColMajor,\n      UseLhsDirectly = _ActualLhs::InnerStrideAtCompileTime==1,\n      UseRhsDirectly = _ActualRhs::InnerStrideAtCompileTime==1\n    };\n    \n    internal::gemv_static_vector_if<Scalar,Lhs::SizeAtCompileTime,Lhs::MaxSizeAtCompileTime,!UseLhsDirectly> static_lhs;\n    ei_declare_aligned_stack_constructed_variable(Scalar, actualLhsPtr, actualLhs.size(),\n      (UseLhsDirectly ? const_cast<Scalar*>(actualLhs.data()) : static_lhs.data()));\n    if(!UseLhsDirectly) Map<typename _ActualLhs::PlainObject>(actualLhsPtr, actualLhs.size()) = actualLhs;\n    \n    internal::gemv_static_vector_if<Scalar,Rhs::SizeAtCompileTime,Rhs::MaxSizeAtCompileTime,!UseRhsDirectly> static_rhs;\n    ei_declare_aligned_stack_constructed_variable(Scalar, actualRhsPtr, actualRhs.size(),\n      (UseRhsDirectly ? const_cast<Scalar*>(actualRhs.data()) : static_rhs.data()));\n    if(!UseRhsDirectly) Map<typename _ActualRhs::PlainObject>(actualRhsPtr, actualRhs.size()) = actualRhs;\n    \n    \n    selfadjoint_rank1_update<Scalar,Index,StorageOrder,UpLo,\n                              LhsBlasTraits::NeedToConjugate && NumTraits<Scalar>::IsComplex,\n                              RhsBlasTraits::NeedToConjugate && NumTraits<Scalar>::IsComplex>\n          ::run(actualLhs.size(), mat.data(), mat.outerStride(), actualLhsPtr, actualRhsPtr, actualAlpha);\n  }\n};\n\ntemplate<typename MatrixType, typename ProductType, int UpLo>\nstruct general_product_to_triangular_selector<MatrixType,ProductType,UpLo,false>\n{\n  static void run(MatrixType& mat, const ProductType& prod, const typename MatrixType::Scalar& alpha, bool beta)\n  {\n    typedef typename internal::remove_all<typename ProductType::LhsNested>::type Lhs;\n    typedef internal::blas_traits<Lhs> LhsBlasTraits;\n    typedef typename LhsBlasTraits::DirectLinearAccessType ActualLhs;\n    typedef typename internal::remove_all<ActualLhs>::type _ActualLhs;\n    typename internal::add_const_on_value_type<ActualLhs>::type actualLhs = LhsBlasTraits::extract(prod.lhs());\n    \n    typedef typename internal::remove_all<typename ProductType::RhsNested>::type Rhs;\n    typedef internal::blas_traits<Rhs> RhsBlasTraits;\n    typedef typename RhsBlasTraits::DirectLinearAccessType ActualRhs;\n    typedef typename internal::remove_all<ActualRhs>::type _ActualRhs;\n    typename internal::add_const_on_value_type<ActualRhs>::type actualRhs = RhsBlasTraits::extract(prod.rhs());\n\n    typename ProductType::Scalar actualAlpha = alpha * LhsBlasTraits::extractScalarFactor(prod.lhs().derived()) * RhsBlasTraits::extractScalarFactor(prod.rhs().derived());\n\n    if(!beta)\n      mat.template triangularView<UpLo>().setZero();\n\n    enum {\n      IsRowMajor = (internal::traits<MatrixType>::Flags&RowMajorBit) ? 1 : 0,\n      LhsIsRowMajor = _ActualLhs::Flags&RowMajorBit ? 1 : 0,\n      RhsIsRowMajor = _ActualRhs::Flags&RowMajorBit ? 1 : 0,\n      SkipDiag = (UpLo&(UnitDiag|ZeroDiag))!=0\n    };\n\n    Index size = mat.cols();\n    if(SkipDiag)\n      size--;\n    Index depth = actualLhs.cols();\n\n    typedef internal::gemm_blocking_space<IsRowMajor ? RowMajor : ColMajor,typename Lhs::Scalar,typename Rhs::Scalar,\n          MatrixType::MaxColsAtCompileTime, MatrixType::MaxColsAtCompileTime, _ActualRhs::MaxColsAtCompileTime> BlockingType;\n\n    BlockingType blocking(size, size, depth, 1, false);\n\n    internal::general_matrix_matrix_triangular_product<Index,\n      typename Lhs::Scalar, LhsIsRowMajor ? RowMajor : ColMajor, LhsBlasTraits::NeedToConjugate,\n      typename Rhs::Scalar, RhsIsRowMajor ? RowMajor : ColMajor, RhsBlasTraits::NeedToConjugate,\n      IsRowMajor ? RowMajor : ColMajor, MatrixType::InnerStrideAtCompileTime, UpLo&(Lower|Upper)>\n      ::run(size, depth,\n            &actualLhs.coeffRef(SkipDiag&&(UpLo&Lower)==Lower ? 1 : 0,0), actualLhs.outerStride(),\n            &actualRhs.coeffRef(0,SkipDiag&&(UpLo&Upper)==Upper ? 1 : 0), actualRhs.outerStride(),\n            mat.data() + (SkipDiag ? (bool(IsRowMajor) != ((UpLo&Lower)==Lower) ? mat.innerStride() : mat.outerStride() ) : 0),\n            mat.innerStride(), mat.outerStride(), actualAlpha, blocking);\n  }\n};\n\ntemplate<typename MatrixType, unsigned int UpLo>\ntemplate<typename ProductType>\nEIGEN_DEVICE_FUNC TriangularView<MatrixType,UpLo>& TriangularViewImpl<MatrixType,UpLo,Dense>::_assignProduct(const ProductType& prod, const Scalar& alpha, bool beta)\n{\n  EIGEN_STATIC_ASSERT((UpLo&UnitDiag)==0, WRITING_TO_TRIANGULAR_PART_WITH_UNIT_DIAGONAL_IS_NOT_SUPPORTED);\n  eigen_assert(derived().nestedExpression().rows() == prod.rows() && derived().cols() == prod.cols());\n\n  general_product_to_triangular_selector<MatrixType, ProductType, UpLo, internal::traits<ProductType>::InnerSize==1>::run(derived().nestedExpression().const_cast_derived(), prod, alpha, beta);\n\n  return derived();\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_GENERAL_MATRIX_MATRIX_TRIANGULAR_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h",
    "content": "/*\n Copyright (c) 2011, Intel Corporation. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without modification,\n are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n   list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n * Neither the name of Intel Corporation nor the names of its contributors may\n   be used to endorse or promote products derived from this software without\n   specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\n ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n ********************************************************************************\n *   Content : Eigen bindings to BLAS F77\n *   Level 3 BLAS SYRK/HERK implementation.\n ********************************************************************************\n*/\n\n#ifndef EIGEN_GENERAL_MATRIX_MATRIX_TRIANGULAR_BLAS_H\n#define EIGEN_GENERAL_MATRIX_MATRIX_TRIANGULAR_BLAS_H\n\nnamespace Eigen {\n\nnamespace internal {\n\ntemplate <typename Index, typename Scalar, int AStorageOrder, bool ConjugateA, int ResStorageOrder, int UpLo>\nstruct general_matrix_matrix_rankupdate :\n       general_matrix_matrix_triangular_product<\n         Index,Scalar,AStorageOrder,ConjugateA,Scalar,AStorageOrder,ConjugateA,ResStorageOrder,1,UpLo,BuiltIn> {};\n\n\n// try to go to BLAS specialization\n#define EIGEN_BLAS_RANKUPDATE_SPECIALIZE(Scalar) \\\ntemplate <typename Index, int LhsStorageOrder, bool ConjugateLhs, \\\n                          int RhsStorageOrder, bool ConjugateRhs, int  UpLo> \\\nstruct general_matrix_matrix_triangular_product<Index,Scalar,LhsStorageOrder,ConjugateLhs, \\\n               Scalar,RhsStorageOrder,ConjugateRhs,ColMajor,1,UpLo,Specialized> { \\\n  static EIGEN_STRONG_INLINE void run(Index size, Index depth,const Scalar* lhs, Index lhsStride, \\\n                          const Scalar* rhs, Index rhsStride, Scalar* res, Index resIncr, Index resStride, Scalar alpha, level3_blocking<Scalar, Scalar>& blocking) \\\n  { \\\n    if ( lhs==rhs && ((UpLo&(Lower|Upper))==UpLo) ) { \\\n      general_matrix_matrix_rankupdate<Index,Scalar,LhsStorageOrder,ConjugateLhs,ColMajor,UpLo> \\\n      ::run(size,depth,lhs,lhsStride,rhs,rhsStride,res,resStride,alpha,blocking); \\\n    } else { \\\n      general_matrix_matrix_triangular_product<Index, \\\n        Scalar, LhsStorageOrder, ConjugateLhs, \\\n        Scalar, RhsStorageOrder, ConjugateRhs, \\\n        ColMajor, 1, UpLo, BuiltIn> \\\n      ::run(size,depth,lhs,lhsStride,rhs,rhsStride,res,resIncr,resStride,alpha,blocking); \\\n    } \\\n  } \\\n};\n\nEIGEN_BLAS_RANKUPDATE_SPECIALIZE(double)\nEIGEN_BLAS_RANKUPDATE_SPECIALIZE(float)\n// TODO handle complex cases\n// EIGEN_BLAS_RANKUPDATE_SPECIALIZE(dcomplex)\n// EIGEN_BLAS_RANKUPDATE_SPECIALIZE(scomplex)\n\n// SYRK for float/double\n#define EIGEN_BLAS_RANKUPDATE_R(EIGTYPE, BLASTYPE, BLASFUNC) \\\ntemplate <typename Index, int AStorageOrder, bool ConjugateA, int  UpLo> \\\nstruct general_matrix_matrix_rankupdate<Index,EIGTYPE,AStorageOrder,ConjugateA,ColMajor,UpLo> { \\\n  enum { \\\n    IsLower = (UpLo&Lower) == Lower, \\\n    LowUp = IsLower ? Lower : Upper, \\\n    conjA = ((AStorageOrder==ColMajor) && ConjugateA) ? 1 : 0 \\\n  }; \\\n  static EIGEN_STRONG_INLINE void run(Index size, Index depth,const EIGTYPE* lhs, Index lhsStride, \\\n                          const EIGTYPE* /*rhs*/, Index /*rhsStride*/, EIGTYPE* res, Index resStride, EIGTYPE alpha, level3_blocking<EIGTYPE, EIGTYPE>& /*blocking*/) \\\n  { \\\n  /* typedef Matrix<EIGTYPE, Dynamic, Dynamic, RhsStorageOrder> MatrixRhs;*/ \\\n\\\n   BlasIndex lda=convert_index<BlasIndex>(lhsStride), ldc=convert_index<BlasIndex>(resStride), n=convert_index<BlasIndex>(size), k=convert_index<BlasIndex>(depth); \\\n   char uplo=((IsLower) ? 'L' : 'U'), trans=((AStorageOrder==RowMajor) ? 'T':'N'); \\\n   EIGTYPE beta(1); \\\n   BLASFUNC(&uplo, &trans, &n, &k, (const BLASTYPE*)&numext::real_ref(alpha), lhs, &lda, (const BLASTYPE*)&numext::real_ref(beta), res, &ldc); \\\n  } \\\n};\n\n// HERK for complex data\n#define EIGEN_BLAS_RANKUPDATE_C(EIGTYPE, BLASTYPE, RTYPE, BLASFUNC) \\\ntemplate <typename Index, int AStorageOrder, bool ConjugateA, int  UpLo> \\\nstruct general_matrix_matrix_rankupdate<Index,EIGTYPE,AStorageOrder,ConjugateA,ColMajor,UpLo> { \\\n  enum { \\\n    IsLower = (UpLo&Lower) == Lower, \\\n    LowUp = IsLower ? Lower : Upper, \\\n    conjA = (((AStorageOrder==ColMajor) && ConjugateA) || ((AStorageOrder==RowMajor) && !ConjugateA)) ? 1 : 0 \\\n  }; \\\n  static EIGEN_STRONG_INLINE void run(Index size, Index depth,const EIGTYPE* lhs, Index lhsStride, \\\n                          const EIGTYPE* /*rhs*/, Index /*rhsStride*/, EIGTYPE* res, Index resStride, EIGTYPE alpha, level3_blocking<EIGTYPE, EIGTYPE>& /*blocking*/) \\\n  { \\\n   typedef Matrix<EIGTYPE, Dynamic, Dynamic, AStorageOrder> MatrixType; \\\n\\\n   BlasIndex lda=convert_index<BlasIndex>(lhsStride), ldc=convert_index<BlasIndex>(resStride), n=convert_index<BlasIndex>(size), k=convert_index<BlasIndex>(depth); \\\n   char uplo=((IsLower) ? 'L' : 'U'), trans=((AStorageOrder==RowMajor) ? 'C':'N'); \\\n   RTYPE alpha_, beta_; \\\n   const EIGTYPE* a_ptr; \\\n\\\n   alpha_ = alpha.real(); \\\n   beta_ = 1.0; \\\n/* Copy with conjugation in some cases*/ \\\n   MatrixType a; \\\n   if (conjA) { \\\n     Map<const MatrixType, 0, OuterStride<> > mapA(lhs,n,k,OuterStride<>(lhsStride)); \\\n     a = mapA.conjugate(); \\\n     lda = a.outerStride(); \\\n     a_ptr = a.data(); \\\n   } else a_ptr=lhs; \\\n   BLASFUNC(&uplo, &trans, &n, &k, &alpha_, (BLASTYPE*)a_ptr, &lda, &beta_, (BLASTYPE*)res, &ldc); \\\n  } \\\n};\n\n#ifdef EIGEN_USE_MKL\nEIGEN_BLAS_RANKUPDATE_R(double, double, dsyrk)\nEIGEN_BLAS_RANKUPDATE_R(float,  float,  ssyrk)\n#else\nEIGEN_BLAS_RANKUPDATE_R(double, double, dsyrk_)\nEIGEN_BLAS_RANKUPDATE_R(float,  float,  ssyrk_)\n#endif\n\n// TODO hanlde complex cases\n// EIGEN_BLAS_RANKUPDATE_C(dcomplex, double, double, zherk_)\n// EIGEN_BLAS_RANKUPDATE_C(scomplex, float,  float, cherk_)\n\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_GENERAL_MATRIX_MATRIX_TRIANGULAR_BLAS_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h",
    "content": "/*\n Copyright (c) 2011, Intel Corporation. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without modification,\n are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n   list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n * Neither the name of Intel Corporation nor the names of its contributors may\n   be used to endorse or promote products derived from this software without\n   specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\n ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n ********************************************************************************\n *   Content : Eigen bindings to BLAS F77\n *   General matrix-matrix product functionality based on ?GEMM.\n ********************************************************************************\n*/\n\n#ifndef EIGEN_GENERAL_MATRIX_MATRIX_BLAS_H\n#define EIGEN_GENERAL_MATRIX_MATRIX_BLAS_H\n\nnamespace Eigen { \n\nnamespace internal {\n\n/**********************************************************************\n* This file implements general matrix-matrix multiplication using BLAS\n* gemm function via partial specialization of\n* general_matrix_matrix_product::run(..) method for float, double,\n* std::complex<float> and std::complex<double> types\n**********************************************************************/\n\n// gemm specialization\n\n#define GEMM_SPECIALIZATION(EIGTYPE, EIGPREFIX, BLASTYPE, BLASFUNC) \\\ntemplate< \\\n  typename Index, \\\n  int LhsStorageOrder, bool ConjugateLhs, \\\n  int RhsStorageOrder, bool ConjugateRhs> \\\nstruct general_matrix_matrix_product<Index,EIGTYPE,LhsStorageOrder,ConjugateLhs,EIGTYPE,RhsStorageOrder,ConjugateRhs,ColMajor,1> \\\n{ \\\ntypedef gebp_traits<EIGTYPE,EIGTYPE> Traits; \\\n\\\nstatic void run(Index rows, Index cols, Index depth, \\\n  const EIGTYPE* _lhs, Index lhsStride, \\\n  const EIGTYPE* _rhs, Index rhsStride, \\\n  EIGTYPE* res, Index resIncr, Index resStride, \\\n  EIGTYPE alpha, \\\n  level3_blocking<EIGTYPE, EIGTYPE>& /*blocking*/, \\\n  GemmParallelInfo<Index>* /*info = 0*/) \\\n{ \\\n  using std::conj; \\\n\\\n  EIGEN_ONLY_USED_FOR_DEBUG(resIncr); \\\n  eigen_assert(resIncr == 1); \\\n  char transa, transb; \\\n  BlasIndex m, n, k, lda, ldb, ldc; \\\n  const EIGTYPE *a, *b; \\\n  EIGTYPE beta(1); \\\n  MatrixX##EIGPREFIX a_tmp, b_tmp; \\\n\\\n/* Set transpose options */ \\\n  transa = (LhsStorageOrder==RowMajor) ? ((ConjugateLhs) ? 'C' : 'T') : 'N'; \\\n  transb = (RhsStorageOrder==RowMajor) ? ((ConjugateRhs) ? 'C' : 'T') : 'N'; \\\n\\\n/* Set m, n, k */ \\\n  m = convert_index<BlasIndex>(rows);  \\\n  n = convert_index<BlasIndex>(cols);  \\\n  k = convert_index<BlasIndex>(depth); \\\n\\\n/* Set lda, ldb, ldc */ \\\n  lda = convert_index<BlasIndex>(lhsStride); \\\n  ldb = convert_index<BlasIndex>(rhsStride); \\\n  ldc = convert_index<BlasIndex>(resStride); \\\n\\\n/* Set a, b, c */ \\\n  if ((LhsStorageOrder==ColMajor) && (ConjugateLhs)) { \\\n    Map<const MatrixX##EIGPREFIX, 0, OuterStride<> > lhs(_lhs,m,k,OuterStride<>(lhsStride)); \\\n    a_tmp = lhs.conjugate(); \\\n    a = a_tmp.data(); \\\n    lda = convert_index<BlasIndex>(a_tmp.outerStride()); \\\n  } else a = _lhs; \\\n\\\n  if ((RhsStorageOrder==ColMajor) && (ConjugateRhs)) { \\\n    Map<const MatrixX##EIGPREFIX, 0, OuterStride<> > rhs(_rhs,k,n,OuterStride<>(rhsStride)); \\\n    b_tmp = rhs.conjugate(); \\\n    b = b_tmp.data(); \\\n    ldb = convert_index<BlasIndex>(b_tmp.outerStride()); \\\n  } else b = _rhs; \\\n\\\n  BLASFUNC(&transa, &transb, &m, &n, &k, (const BLASTYPE*)&numext::real_ref(alpha), (const BLASTYPE*)a, &lda, (const BLASTYPE*)b, &ldb, (const BLASTYPE*)&numext::real_ref(beta), (BLASTYPE*)res, &ldc); \\\n}};\n\n#ifdef EIGEN_USE_MKL\nGEMM_SPECIALIZATION(double,   d,  double, dgemm)\nGEMM_SPECIALIZATION(float,    f,  float,  sgemm)\nGEMM_SPECIALIZATION(dcomplex, cd, MKL_Complex16, zgemm)\nGEMM_SPECIALIZATION(scomplex, cf, MKL_Complex8,  cgemm)\n#else\nGEMM_SPECIALIZATION(double,   d,  double, dgemm_)\nGEMM_SPECIALIZATION(float,    f,  float,  sgemm_)\nGEMM_SPECIALIZATION(dcomplex, cd, double, zgemm_)\nGEMM_SPECIALIZATION(scomplex, cf, float,  cgemm_)\n#endif\n\n} // end namespase internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_GENERAL_MATRIX_MATRIX_BLAS_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/products/GeneralMatrixVector.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2016 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_GENERAL_MATRIX_VECTOR_H\n#define EIGEN_GENERAL_MATRIX_VECTOR_H\n\nnamespace Eigen {\n\nnamespace internal {\n\nenum GEMVPacketSizeType {\n  GEMVPacketFull = 0,\n  GEMVPacketHalf,\n  GEMVPacketQuarter\n};\n\ntemplate <int N, typename T1, typename T2, typename T3>\nstruct gemv_packet_cond { typedef T3 type; };\n\ntemplate <typename T1, typename T2, typename T3>\nstruct gemv_packet_cond<GEMVPacketFull, T1, T2, T3> { typedef T1 type; };\n\ntemplate <typename T1, typename T2, typename T3>\nstruct gemv_packet_cond<GEMVPacketHalf, T1, T2, T3> { typedef T2 type; };\n\ntemplate<typename LhsScalar, typename RhsScalar, int _PacketSize=GEMVPacketFull>\nclass gemv_traits\n{\n  typedef typename ScalarBinaryOpTraits<LhsScalar, RhsScalar>::ReturnType ResScalar;\n\n#define PACKET_DECL_COND_PREFIX(prefix, name, packet_size)                        \\\n  typedef typename gemv_packet_cond<packet_size,                                  \\\n                                    typename packet_traits<name ## Scalar>::type, \\\n                                    typename packet_traits<name ## Scalar>::half, \\\n                                    typename unpacket_traits<typename packet_traits<name ## Scalar>::half>::half>::type \\\n  prefix ## name ## Packet\n\n  PACKET_DECL_COND_PREFIX(_, Lhs, _PacketSize);\n  PACKET_DECL_COND_PREFIX(_, Rhs, _PacketSize);\n  PACKET_DECL_COND_PREFIX(_, Res, _PacketSize);\n#undef PACKET_DECL_COND_PREFIX\n\npublic:\n  enum {\n        Vectorizable = unpacket_traits<_LhsPacket>::vectorizable &&\n        unpacket_traits<_RhsPacket>::vectorizable &&\n        int(unpacket_traits<_LhsPacket>::size)==int(unpacket_traits<_RhsPacket>::size),\n        LhsPacketSize = Vectorizable ? unpacket_traits<_LhsPacket>::size : 1,\n        RhsPacketSize = Vectorizable ? unpacket_traits<_RhsPacket>::size : 1,\n        ResPacketSize = Vectorizable ? unpacket_traits<_ResPacket>::size : 1\n  };\n\n  typedef typename conditional<Vectorizable,_LhsPacket,LhsScalar>::type LhsPacket;\n  typedef typename conditional<Vectorizable,_RhsPacket,RhsScalar>::type RhsPacket;\n  typedef typename conditional<Vectorizable,_ResPacket,ResScalar>::type ResPacket;\n};\n\n\n/* Optimized col-major matrix * vector product:\n * This algorithm processes the matrix per vertical panels,\n * which are then processed horizontaly per chunck of 8*PacketSize x 1 vertical segments.\n *\n * Mixing type logic: C += alpha * A * B\n *  |  A  |  B  |alpha| comments\n *  |real |cplx |cplx | no vectorization\n *  |real |cplx |real | alpha is converted to a cplx when calling the run function, no vectorization\n *  |cplx |real |cplx | invalid, the caller has to do tmp: = A * B; C += alpha*tmp\n *  |cplx |real |real | optimal case, vectorization possible via real-cplx mul\n *\n * The same reasoning apply for the transposed case.\n */\ntemplate<typename Index, typename LhsScalar, typename LhsMapper, bool ConjugateLhs, typename RhsScalar, typename RhsMapper, bool ConjugateRhs, int Version>\nstruct general_matrix_vector_product<Index,LhsScalar,LhsMapper,ColMajor,ConjugateLhs,RhsScalar,RhsMapper,ConjugateRhs,Version>\n{\n  typedef gemv_traits<LhsScalar,RhsScalar> Traits;\n  typedef gemv_traits<LhsScalar,RhsScalar,GEMVPacketHalf> HalfTraits;\n  typedef gemv_traits<LhsScalar,RhsScalar,GEMVPacketQuarter> QuarterTraits;\n\n  typedef typename ScalarBinaryOpTraits<LhsScalar, RhsScalar>::ReturnType ResScalar;\n\n  typedef typename Traits::LhsPacket LhsPacket;\n  typedef typename Traits::RhsPacket RhsPacket;\n  typedef typename Traits::ResPacket ResPacket;\n\n  typedef typename HalfTraits::LhsPacket LhsPacketHalf;\n  typedef typename HalfTraits::RhsPacket RhsPacketHalf;\n  typedef typename HalfTraits::ResPacket ResPacketHalf;\n\n  typedef typename QuarterTraits::LhsPacket LhsPacketQuarter;\n  typedef typename QuarterTraits::RhsPacket RhsPacketQuarter;\n  typedef typename QuarterTraits::ResPacket ResPacketQuarter;\n\nEIGEN_DEVICE_FUNC EIGEN_DONT_INLINE static void run(\n  Index rows, Index cols,\n  const LhsMapper& lhs,\n  const RhsMapper& rhs,\n        ResScalar* res, Index resIncr,\n  RhsScalar alpha);\n};\n\ntemplate<typename Index, typename LhsScalar, typename LhsMapper, bool ConjugateLhs, typename RhsScalar, typename RhsMapper, bool ConjugateRhs, int Version>\nEIGEN_DEVICE_FUNC EIGEN_DONT_INLINE void general_matrix_vector_product<Index,LhsScalar,LhsMapper,ColMajor,ConjugateLhs,RhsScalar,RhsMapper,ConjugateRhs,Version>::run(\n  Index rows, Index cols,\n  const LhsMapper& alhs,\n  const RhsMapper& rhs,\n        ResScalar* res, Index resIncr,\n  RhsScalar alpha)\n{\n  EIGEN_UNUSED_VARIABLE(resIncr);\n  eigen_internal_assert(resIncr==1);\n\n  // The following copy tells the compiler that lhs's attributes are not modified outside this function\n  // This helps GCC to generate propoer code.\n  LhsMapper lhs(alhs);\n\n  conj_helper<LhsScalar,RhsScalar,ConjugateLhs,ConjugateRhs> cj;\n  conj_helper<LhsPacket,RhsPacket,ConjugateLhs,ConjugateRhs> pcj;\n  conj_helper<LhsPacketHalf,RhsPacketHalf,ConjugateLhs,ConjugateRhs> pcj_half;\n  conj_helper<LhsPacketQuarter,RhsPacketQuarter,ConjugateLhs,ConjugateRhs> pcj_quarter;\n\n  const Index lhsStride = lhs.stride();\n  // TODO: for padded aligned inputs, we could enable aligned reads\n  enum { LhsAlignment = Unaligned,\n         ResPacketSize = Traits::ResPacketSize,\n         ResPacketSizeHalf = HalfTraits::ResPacketSize,\n         ResPacketSizeQuarter = QuarterTraits::ResPacketSize,\n         LhsPacketSize = Traits::LhsPacketSize,\n         HasHalf = (int)ResPacketSizeHalf < (int)ResPacketSize,\n         HasQuarter = (int)ResPacketSizeQuarter < (int)ResPacketSizeHalf\n  };\n\n  const Index n8 = rows-8*ResPacketSize+1;\n  const Index n4 = rows-4*ResPacketSize+1;\n  const Index n3 = rows-3*ResPacketSize+1;\n  const Index n2 = rows-2*ResPacketSize+1;\n  const Index n1 = rows-1*ResPacketSize+1;\n  const Index n_half = rows-1*ResPacketSizeHalf+1;\n  const Index n_quarter = rows-1*ResPacketSizeQuarter+1;\n\n  // TODO: improve the following heuristic:\n  const Index block_cols = cols<128 ? cols : (lhsStride*sizeof(LhsScalar)<32000?16:4);\n  ResPacket palpha = pset1<ResPacket>(alpha);\n  ResPacketHalf palpha_half = pset1<ResPacketHalf>(alpha);\n  ResPacketQuarter palpha_quarter = pset1<ResPacketQuarter>(alpha);\n\n  for(Index j2=0; j2<cols; j2+=block_cols)\n  {\n    Index jend = numext::mini(j2+block_cols,cols);\n    Index i=0;\n    for(; i<n8; i+=ResPacketSize*8)\n    {\n      ResPacket c0 = pset1<ResPacket>(ResScalar(0)),\n                c1 = pset1<ResPacket>(ResScalar(0)),\n                c2 = pset1<ResPacket>(ResScalar(0)),\n                c3 = pset1<ResPacket>(ResScalar(0)),\n                c4 = pset1<ResPacket>(ResScalar(0)),\n                c5 = pset1<ResPacket>(ResScalar(0)),\n                c6 = pset1<ResPacket>(ResScalar(0)),\n                c7 = pset1<ResPacket>(ResScalar(0));\n\n      for(Index j=j2; j<jend; j+=1)\n      {\n        RhsPacket b0 = pset1<RhsPacket>(rhs(j,0));\n        c0 = pcj.pmadd(lhs.template load<LhsPacket,LhsAlignment>(i+LhsPacketSize*0,j),b0,c0);\n        c1 = pcj.pmadd(lhs.template load<LhsPacket,LhsAlignment>(i+LhsPacketSize*1,j),b0,c1);\n        c2 = pcj.pmadd(lhs.template load<LhsPacket,LhsAlignment>(i+LhsPacketSize*2,j),b0,c2);\n        c3 = pcj.pmadd(lhs.template load<LhsPacket,LhsAlignment>(i+LhsPacketSize*3,j),b0,c3);\n        c4 = pcj.pmadd(lhs.template load<LhsPacket,LhsAlignment>(i+LhsPacketSize*4,j),b0,c4);\n        c5 = pcj.pmadd(lhs.template load<LhsPacket,LhsAlignment>(i+LhsPacketSize*5,j),b0,c5);\n        c6 = pcj.pmadd(lhs.template load<LhsPacket,LhsAlignment>(i+LhsPacketSize*6,j),b0,c6);\n        c7 = pcj.pmadd(lhs.template load<LhsPacket,LhsAlignment>(i+LhsPacketSize*7,j),b0,c7);\n      }\n      pstoreu(res+i+ResPacketSize*0, pmadd(c0,palpha,ploadu<ResPacket>(res+i+ResPacketSize*0)));\n      pstoreu(res+i+ResPacketSize*1, pmadd(c1,palpha,ploadu<ResPacket>(res+i+ResPacketSize*1)));\n      pstoreu(res+i+ResPacketSize*2, pmadd(c2,palpha,ploadu<ResPacket>(res+i+ResPacketSize*2)));\n      pstoreu(res+i+ResPacketSize*3, pmadd(c3,palpha,ploadu<ResPacket>(res+i+ResPacketSize*3)));\n      pstoreu(res+i+ResPacketSize*4, pmadd(c4,palpha,ploadu<ResPacket>(res+i+ResPacketSize*4)));\n      pstoreu(res+i+ResPacketSize*5, pmadd(c5,palpha,ploadu<ResPacket>(res+i+ResPacketSize*5)));\n      pstoreu(res+i+ResPacketSize*6, pmadd(c6,palpha,ploadu<ResPacket>(res+i+ResPacketSize*6)));\n      pstoreu(res+i+ResPacketSize*7, pmadd(c7,palpha,ploadu<ResPacket>(res+i+ResPacketSize*7)));\n    }\n    if(i<n4)\n    {\n      ResPacket c0 = pset1<ResPacket>(ResScalar(0)),\n                c1 = pset1<ResPacket>(ResScalar(0)),\n                c2 = pset1<ResPacket>(ResScalar(0)),\n                c3 = pset1<ResPacket>(ResScalar(0));\n\n      for(Index j=j2; j<jend; j+=1)\n      {\n        RhsPacket b0 = pset1<RhsPacket>(rhs(j,0));\n        c0 = pcj.pmadd(lhs.template load<LhsPacket,LhsAlignment>(i+LhsPacketSize*0,j),b0,c0);\n        c1 = pcj.pmadd(lhs.template load<LhsPacket,LhsAlignment>(i+LhsPacketSize*1,j),b0,c1);\n        c2 = pcj.pmadd(lhs.template load<LhsPacket,LhsAlignment>(i+LhsPacketSize*2,j),b0,c2);\n        c3 = pcj.pmadd(lhs.template load<LhsPacket,LhsAlignment>(i+LhsPacketSize*3,j),b0,c3);\n      }\n      pstoreu(res+i+ResPacketSize*0, pmadd(c0,palpha,ploadu<ResPacket>(res+i+ResPacketSize*0)));\n      pstoreu(res+i+ResPacketSize*1, pmadd(c1,palpha,ploadu<ResPacket>(res+i+ResPacketSize*1)));\n      pstoreu(res+i+ResPacketSize*2, pmadd(c2,palpha,ploadu<ResPacket>(res+i+ResPacketSize*2)));\n      pstoreu(res+i+ResPacketSize*3, pmadd(c3,palpha,ploadu<ResPacket>(res+i+ResPacketSize*3)));\n\n      i+=ResPacketSize*4;\n    }\n    if(i<n3)\n    {\n      ResPacket c0 = pset1<ResPacket>(ResScalar(0)),\n                c1 = pset1<ResPacket>(ResScalar(0)),\n                c2 = pset1<ResPacket>(ResScalar(0));\n\n      for(Index j=j2; j<jend; j+=1)\n      {\n        RhsPacket b0 = pset1<RhsPacket>(rhs(j,0));\n        c0 = pcj.pmadd(lhs.template load<LhsPacket,LhsAlignment>(i+LhsPacketSize*0,j),b0,c0);\n        c1 = pcj.pmadd(lhs.template load<LhsPacket,LhsAlignment>(i+LhsPacketSize*1,j),b0,c1);\n        c2 = pcj.pmadd(lhs.template load<LhsPacket,LhsAlignment>(i+LhsPacketSize*2,j),b0,c2);\n      }\n      pstoreu(res+i+ResPacketSize*0, pmadd(c0,palpha,ploadu<ResPacket>(res+i+ResPacketSize*0)));\n      pstoreu(res+i+ResPacketSize*1, pmadd(c1,palpha,ploadu<ResPacket>(res+i+ResPacketSize*1)));\n      pstoreu(res+i+ResPacketSize*2, pmadd(c2,palpha,ploadu<ResPacket>(res+i+ResPacketSize*2)));\n\n      i+=ResPacketSize*3;\n    }\n    if(i<n2)\n    {\n      ResPacket c0 = pset1<ResPacket>(ResScalar(0)),\n                c1 = pset1<ResPacket>(ResScalar(0));\n\n      for(Index j=j2; j<jend; j+=1)\n      {\n        RhsPacket b0 = pset1<RhsPacket>(rhs(j,0));\n        c0 = pcj.pmadd(lhs.template load<LhsPacket,LhsAlignment>(i+LhsPacketSize*0,j),b0,c0);\n        c1 = pcj.pmadd(lhs.template load<LhsPacket,LhsAlignment>(i+LhsPacketSize*1,j),b0,c1);\n      }\n      pstoreu(res+i+ResPacketSize*0, pmadd(c0,palpha,ploadu<ResPacket>(res+i+ResPacketSize*0)));\n      pstoreu(res+i+ResPacketSize*1, pmadd(c1,palpha,ploadu<ResPacket>(res+i+ResPacketSize*1)));\n      i+=ResPacketSize*2;\n    }\n    if(i<n1)\n    {\n      ResPacket c0 = pset1<ResPacket>(ResScalar(0));\n      for(Index j=j2; j<jend; j+=1)\n      {\n        RhsPacket b0 = pset1<RhsPacket>(rhs(j,0));\n        c0 = pcj.pmadd(lhs.template load<LhsPacket,LhsAlignment>(i+0,j),b0,c0);\n      }\n      pstoreu(res+i+ResPacketSize*0, pmadd(c0,palpha,ploadu<ResPacket>(res+i+ResPacketSize*0)));\n      i+=ResPacketSize;\n    }\n    if(HasHalf && i<n_half)\n    {\n      ResPacketHalf c0 = pset1<ResPacketHalf>(ResScalar(0));\n      for(Index j=j2; j<jend; j+=1)\n      {\n        RhsPacketHalf b0 = pset1<RhsPacketHalf>(rhs(j,0));\n        c0 = pcj_half.pmadd(lhs.template load<LhsPacketHalf,LhsAlignment>(i+0,j),b0,c0);\n      }\n      pstoreu(res+i+ResPacketSizeHalf*0, pmadd(c0,palpha_half,ploadu<ResPacketHalf>(res+i+ResPacketSizeHalf*0)));\n      i+=ResPacketSizeHalf;\n    }\n    if(HasQuarter && i<n_quarter)\n    {\n      ResPacketQuarter c0 = pset1<ResPacketQuarter>(ResScalar(0));\n      for(Index j=j2; j<jend; j+=1)\n      {\n        RhsPacketQuarter b0 = pset1<RhsPacketQuarter>(rhs(j,0));\n        c0 = pcj_quarter.pmadd(lhs.template load<LhsPacketQuarter,LhsAlignment>(i+0,j),b0,c0);\n      }\n      pstoreu(res+i+ResPacketSizeQuarter*0, pmadd(c0,palpha_quarter,ploadu<ResPacketQuarter>(res+i+ResPacketSizeQuarter*0)));\n      i+=ResPacketSizeQuarter;\n    }\n    for(;i<rows;++i)\n    {\n      ResScalar c0(0);\n      for(Index j=j2; j<jend; j+=1)\n        c0 += cj.pmul(lhs(i,j), rhs(j,0));\n      res[i] += alpha*c0;\n    }\n  }\n}\n\n/* Optimized row-major matrix * vector product:\n * This algorithm processes 4 rows at once that allows to both reduce\n * the number of load/stores of the result by a factor 4 and to reduce\n * the instruction dependency. Moreover, we know that all bands have the\n * same alignment pattern.\n *\n * Mixing type logic:\n *  - alpha is always a complex (or converted to a complex)\n *  - no vectorization\n */\ntemplate<typename Index, typename LhsScalar, typename LhsMapper, bool ConjugateLhs, typename RhsScalar, typename RhsMapper, bool ConjugateRhs, int Version>\nstruct general_matrix_vector_product<Index,LhsScalar,LhsMapper,RowMajor,ConjugateLhs,RhsScalar,RhsMapper,ConjugateRhs,Version>\n{\n  typedef gemv_traits<LhsScalar,RhsScalar> Traits;\n  typedef gemv_traits<LhsScalar,RhsScalar,GEMVPacketHalf> HalfTraits;\n  typedef gemv_traits<LhsScalar,RhsScalar,GEMVPacketQuarter> QuarterTraits;\n\n  typedef typename ScalarBinaryOpTraits<LhsScalar, RhsScalar>::ReturnType ResScalar;\n\n  typedef typename Traits::LhsPacket LhsPacket;\n  typedef typename Traits::RhsPacket RhsPacket;\n  typedef typename Traits::ResPacket ResPacket;\n\n  typedef typename HalfTraits::LhsPacket LhsPacketHalf;\n  typedef typename HalfTraits::RhsPacket RhsPacketHalf;\n  typedef typename HalfTraits::ResPacket ResPacketHalf;\n\n  typedef typename QuarterTraits::LhsPacket LhsPacketQuarter;\n  typedef typename QuarterTraits::RhsPacket RhsPacketQuarter;\n  typedef typename QuarterTraits::ResPacket ResPacketQuarter;\n\nEIGEN_DEVICE_FUNC EIGEN_DONT_INLINE static void run(\n  Index rows, Index cols,\n  const LhsMapper& lhs,\n  const RhsMapper& rhs,\n        ResScalar* res, Index resIncr,\n  ResScalar alpha);\n};\n\ntemplate<typename Index, typename LhsScalar, typename LhsMapper, bool ConjugateLhs, typename RhsScalar, typename RhsMapper, bool ConjugateRhs, int Version>\nEIGEN_DEVICE_FUNC EIGEN_DONT_INLINE void general_matrix_vector_product<Index,LhsScalar,LhsMapper,RowMajor,ConjugateLhs,RhsScalar,RhsMapper,ConjugateRhs,Version>::run(\n  Index rows, Index cols,\n  const LhsMapper& alhs,\n  const RhsMapper& rhs,\n  ResScalar* res, Index resIncr,\n  ResScalar alpha)\n{\n  // The following copy tells the compiler that lhs's attributes are not modified outside this function\n  // This helps GCC to generate propoer code.\n  LhsMapper lhs(alhs);\n\n  eigen_internal_assert(rhs.stride()==1);\n  conj_helper<LhsScalar,RhsScalar,ConjugateLhs,ConjugateRhs> cj;\n  conj_helper<LhsPacket,RhsPacket,ConjugateLhs,ConjugateRhs> pcj;\n  conj_helper<LhsPacketHalf,RhsPacketHalf,ConjugateLhs,ConjugateRhs> pcj_half;\n  conj_helper<LhsPacketQuarter,RhsPacketQuarter,ConjugateLhs,ConjugateRhs> pcj_quarter;\n\n  // TODO: fine tune the following heuristic. The rationale is that if the matrix is very large,\n  //       processing 8 rows at once might be counter productive wrt cache.\n  const Index n8 = lhs.stride()*sizeof(LhsScalar)>32000 ? 0 : rows-7;\n  const Index n4 = rows-3;\n  const Index n2 = rows-1;\n\n  // TODO: for padded aligned inputs, we could enable aligned reads\n  enum { LhsAlignment = Unaligned,\n         ResPacketSize = Traits::ResPacketSize,\n         ResPacketSizeHalf = HalfTraits::ResPacketSize,\n         ResPacketSizeQuarter = QuarterTraits::ResPacketSize,\n         LhsPacketSize = Traits::LhsPacketSize,\n         LhsPacketSizeHalf = HalfTraits::LhsPacketSize,\n         LhsPacketSizeQuarter = QuarterTraits::LhsPacketSize,\n         HasHalf = (int)ResPacketSizeHalf < (int)ResPacketSize,\n         HasQuarter = (int)ResPacketSizeQuarter < (int)ResPacketSizeHalf\n  };\n\n  Index i=0;\n  for(; i<n8; i+=8)\n  {\n    ResPacket c0 = pset1<ResPacket>(ResScalar(0)),\n              c1 = pset1<ResPacket>(ResScalar(0)),\n              c2 = pset1<ResPacket>(ResScalar(0)),\n              c3 = pset1<ResPacket>(ResScalar(0)),\n              c4 = pset1<ResPacket>(ResScalar(0)),\n              c5 = pset1<ResPacket>(ResScalar(0)),\n              c6 = pset1<ResPacket>(ResScalar(0)),\n              c7 = pset1<ResPacket>(ResScalar(0));\n\n    Index j=0;\n    for(; j+LhsPacketSize<=cols; j+=LhsPacketSize)\n    {\n      RhsPacket b0 = rhs.template load<RhsPacket, Unaligned>(j,0);\n\n      c0 = pcj.pmadd(lhs.template load<LhsPacket,LhsAlignment>(i+0,j),b0,c0);\n      c1 = pcj.pmadd(lhs.template load<LhsPacket,LhsAlignment>(i+1,j),b0,c1);\n      c2 = pcj.pmadd(lhs.template load<LhsPacket,LhsAlignment>(i+2,j),b0,c2);\n      c3 = pcj.pmadd(lhs.template load<LhsPacket,LhsAlignment>(i+3,j),b0,c3);\n      c4 = pcj.pmadd(lhs.template load<LhsPacket,LhsAlignment>(i+4,j),b0,c4);\n      c5 = pcj.pmadd(lhs.template load<LhsPacket,LhsAlignment>(i+5,j),b0,c5);\n      c6 = pcj.pmadd(lhs.template load<LhsPacket,LhsAlignment>(i+6,j),b0,c6);\n      c7 = pcj.pmadd(lhs.template load<LhsPacket,LhsAlignment>(i+7,j),b0,c7);\n    }\n    ResScalar cc0 = predux(c0);\n    ResScalar cc1 = predux(c1);\n    ResScalar cc2 = predux(c2);\n    ResScalar cc3 = predux(c3);\n    ResScalar cc4 = predux(c4);\n    ResScalar cc5 = predux(c5);\n    ResScalar cc6 = predux(c6);\n    ResScalar cc7 = predux(c7);\n    for(; j<cols; ++j)\n    {\n      RhsScalar b0 = rhs(j,0);\n\n      cc0 += cj.pmul(lhs(i+0,j), b0);\n      cc1 += cj.pmul(lhs(i+1,j), b0);\n      cc2 += cj.pmul(lhs(i+2,j), b0);\n      cc3 += cj.pmul(lhs(i+3,j), b0);\n      cc4 += cj.pmul(lhs(i+4,j), b0);\n      cc5 += cj.pmul(lhs(i+5,j), b0);\n      cc6 += cj.pmul(lhs(i+6,j), b0);\n      cc7 += cj.pmul(lhs(i+7,j), b0);\n    }\n    res[(i+0)*resIncr] += alpha*cc0;\n    res[(i+1)*resIncr] += alpha*cc1;\n    res[(i+2)*resIncr] += alpha*cc2;\n    res[(i+3)*resIncr] += alpha*cc3;\n    res[(i+4)*resIncr] += alpha*cc4;\n    res[(i+5)*resIncr] += alpha*cc5;\n    res[(i+6)*resIncr] += alpha*cc6;\n    res[(i+7)*resIncr] += alpha*cc7;\n  }\n  for(; i<n4; i+=4)\n  {\n    ResPacket c0 = pset1<ResPacket>(ResScalar(0)),\n              c1 = pset1<ResPacket>(ResScalar(0)),\n              c2 = pset1<ResPacket>(ResScalar(0)),\n              c3 = pset1<ResPacket>(ResScalar(0));\n\n    Index j=0;\n    for(; j+LhsPacketSize<=cols; j+=LhsPacketSize)\n    {\n      RhsPacket b0 = rhs.template load<RhsPacket, Unaligned>(j,0);\n\n      c0 = pcj.pmadd(lhs.template load<LhsPacket,LhsAlignment>(i+0,j),b0,c0);\n      c1 = pcj.pmadd(lhs.template load<LhsPacket,LhsAlignment>(i+1,j),b0,c1);\n      c2 = pcj.pmadd(lhs.template load<LhsPacket,LhsAlignment>(i+2,j),b0,c2);\n      c3 = pcj.pmadd(lhs.template load<LhsPacket,LhsAlignment>(i+3,j),b0,c3);\n    }\n    ResScalar cc0 = predux(c0);\n    ResScalar cc1 = predux(c1);\n    ResScalar cc2 = predux(c2);\n    ResScalar cc3 = predux(c3);\n    for(; j<cols; ++j)\n    {\n      RhsScalar b0 = rhs(j,0);\n\n      cc0 += cj.pmul(lhs(i+0,j), b0);\n      cc1 += cj.pmul(lhs(i+1,j), b0);\n      cc2 += cj.pmul(lhs(i+2,j), b0);\n      cc3 += cj.pmul(lhs(i+3,j), b0);\n    }\n    res[(i+0)*resIncr] += alpha*cc0;\n    res[(i+1)*resIncr] += alpha*cc1;\n    res[(i+2)*resIncr] += alpha*cc2;\n    res[(i+3)*resIncr] += alpha*cc3;\n  }\n  for(; i<n2; i+=2)\n  {\n    ResPacket c0 = pset1<ResPacket>(ResScalar(0)),\n              c1 = pset1<ResPacket>(ResScalar(0));\n\n    Index j=0;\n    for(; j+LhsPacketSize<=cols; j+=LhsPacketSize)\n    {\n      RhsPacket b0 = rhs.template load<RhsPacket, Unaligned>(j,0);\n\n      c0 = pcj.pmadd(lhs.template load<LhsPacket,LhsAlignment>(i+0,j),b0,c0);\n      c1 = pcj.pmadd(lhs.template load<LhsPacket,LhsAlignment>(i+1,j),b0,c1);\n    }\n    ResScalar cc0 = predux(c0);\n    ResScalar cc1 = predux(c1);\n    for(; j<cols; ++j)\n    {\n      RhsScalar b0 = rhs(j,0);\n\n      cc0 += cj.pmul(lhs(i+0,j), b0);\n      cc1 += cj.pmul(lhs(i+1,j), b0);\n    }\n    res[(i+0)*resIncr] += alpha*cc0;\n    res[(i+1)*resIncr] += alpha*cc1;\n  }\n  for(; i<rows; ++i)\n  {\n    ResPacket c0 = pset1<ResPacket>(ResScalar(0));\n    ResPacketHalf c0_h = pset1<ResPacketHalf>(ResScalar(0));\n    ResPacketQuarter c0_q = pset1<ResPacketQuarter>(ResScalar(0));\n    Index j=0;\n    for(; j+LhsPacketSize<=cols; j+=LhsPacketSize)\n    {\n      RhsPacket b0 = rhs.template load<RhsPacket,Unaligned>(j,0);\n      c0 = pcj.pmadd(lhs.template load<LhsPacket,LhsAlignment>(i,j),b0,c0);\n    }\n    ResScalar cc0 = predux(c0);\n    if (HasHalf) {\n      for(; j+LhsPacketSizeHalf<=cols; j+=LhsPacketSizeHalf)\n        {\n          RhsPacketHalf b0 = rhs.template load<RhsPacketHalf,Unaligned>(j,0);\n          c0_h = pcj_half.pmadd(lhs.template load<LhsPacketHalf,LhsAlignment>(i,j),b0,c0_h);\n        }\n      cc0 += predux(c0_h);\n    }\n    if (HasQuarter) {\n      for(; j+LhsPacketSizeQuarter<=cols; j+=LhsPacketSizeQuarter)\n        {\n          RhsPacketQuarter b0 = rhs.template load<RhsPacketQuarter,Unaligned>(j,0);\n          c0_q = pcj_quarter.pmadd(lhs.template load<LhsPacketQuarter,LhsAlignment>(i,j),b0,c0_q);\n        }\n      cc0 += predux(c0_q);\n    }\n    for(; j<cols; ++j)\n    {\n      cc0 += cj.pmul(lhs(i,j), rhs(j,0));\n    }\n    res[i*resIncr] += alpha*cc0;\n  }\n}\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_GENERAL_MATRIX_VECTOR_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/products/GeneralMatrixVector_BLAS.h",
    "content": "/*\n Copyright (c) 2011, Intel Corporation. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without modification,\n are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n   list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n * Neither the name of Intel Corporation nor the names of its contributors may\n   be used to endorse or promote products derived from this software without\n   specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\n ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n ********************************************************************************\n *   Content : Eigen bindings to BLAS F77\n *   General matrix-vector product functionality based on ?GEMV.\n ********************************************************************************\n*/\n\n#ifndef EIGEN_GENERAL_MATRIX_VECTOR_BLAS_H\n#define EIGEN_GENERAL_MATRIX_VECTOR_BLAS_H\n\nnamespace Eigen { \n\nnamespace internal {\n\n/**********************************************************************\n* This file implements general matrix-vector multiplication using BLAS\n* gemv function via partial specialization of\n* general_matrix_vector_product::run(..) method for float, double,\n* std::complex<float> and std::complex<double> types\n**********************************************************************/\n\n// gemv specialization\n\ntemplate<typename Index, typename LhsScalar, int StorageOrder, bool ConjugateLhs, typename RhsScalar, bool ConjugateRhs>\nstruct general_matrix_vector_product_gemv;\n\n#define EIGEN_BLAS_GEMV_SPECIALIZE(Scalar) \\\ntemplate<typename Index, bool ConjugateLhs, bool ConjugateRhs> \\\nstruct general_matrix_vector_product<Index,Scalar,const_blas_data_mapper<Scalar,Index,ColMajor>,ColMajor,ConjugateLhs,Scalar,const_blas_data_mapper<Scalar,Index,RowMajor>,ConjugateRhs,Specialized> { \\\nstatic void run( \\\n  Index rows, Index cols, \\\n  const const_blas_data_mapper<Scalar,Index,ColMajor> &lhs, \\\n  const const_blas_data_mapper<Scalar,Index,RowMajor> &rhs, \\\n  Scalar* res, Index resIncr, Scalar alpha) \\\n{ \\\n  if (ConjugateLhs) { \\\n    general_matrix_vector_product<Index,Scalar,const_blas_data_mapper<Scalar,Index,ColMajor>,ColMajor,ConjugateLhs,Scalar,const_blas_data_mapper<Scalar,Index,RowMajor>,ConjugateRhs,BuiltIn>::run( \\\n      rows, cols, lhs, rhs, res, resIncr, alpha); \\\n  } else { \\\n    general_matrix_vector_product_gemv<Index,Scalar,ColMajor,ConjugateLhs,Scalar,ConjugateRhs>::run( \\\n      rows, cols, lhs.data(), lhs.stride(), rhs.data(), rhs.stride(), res, resIncr, alpha); \\\n  } \\\n} \\\n}; \\\ntemplate<typename Index, bool ConjugateLhs, bool ConjugateRhs> \\\nstruct general_matrix_vector_product<Index,Scalar,const_blas_data_mapper<Scalar,Index,RowMajor>,RowMajor,ConjugateLhs,Scalar,const_blas_data_mapper<Scalar,Index,ColMajor>,ConjugateRhs,Specialized> { \\\nstatic void run( \\\n  Index rows, Index cols, \\\n  const const_blas_data_mapper<Scalar,Index,RowMajor> &lhs, \\\n  const const_blas_data_mapper<Scalar,Index,ColMajor> &rhs, \\\n  Scalar* res, Index resIncr, Scalar alpha) \\\n{ \\\n    general_matrix_vector_product_gemv<Index,Scalar,RowMajor,ConjugateLhs,Scalar,ConjugateRhs>::run( \\\n      rows, cols, lhs.data(), lhs.stride(), rhs.data(), rhs.stride(), res, resIncr, alpha); \\\n} \\\n}; \\\n\nEIGEN_BLAS_GEMV_SPECIALIZE(double)\nEIGEN_BLAS_GEMV_SPECIALIZE(float)\nEIGEN_BLAS_GEMV_SPECIALIZE(dcomplex)\nEIGEN_BLAS_GEMV_SPECIALIZE(scomplex)\n\n#define EIGEN_BLAS_GEMV_SPECIALIZATION(EIGTYPE,BLASTYPE,BLASFUNC) \\\ntemplate<typename Index, int LhsStorageOrder, bool ConjugateLhs, bool ConjugateRhs> \\\nstruct general_matrix_vector_product_gemv<Index,EIGTYPE,LhsStorageOrder,ConjugateLhs,EIGTYPE,ConjugateRhs> \\\n{ \\\ntypedef Matrix<EIGTYPE,Dynamic,1,ColMajor> GEMVVector;\\\n\\\nstatic void run( \\\n  Index rows, Index cols, \\\n  const EIGTYPE* lhs, Index lhsStride, \\\n  const EIGTYPE* rhs, Index rhsIncr, \\\n  EIGTYPE* res, Index resIncr, EIGTYPE alpha) \\\n{ \\\n  BlasIndex m=convert_index<BlasIndex>(rows), n=convert_index<BlasIndex>(cols), \\\n            lda=convert_index<BlasIndex>(lhsStride), incx=convert_index<BlasIndex>(rhsIncr), incy=convert_index<BlasIndex>(resIncr); \\\n  const EIGTYPE beta(1); \\\n  const EIGTYPE *x_ptr; \\\n  char trans=(LhsStorageOrder==ColMajor) ? 'N' : (ConjugateLhs) ? 'C' : 'T'; \\\n  if (LhsStorageOrder==RowMajor) { \\\n    m = convert_index<BlasIndex>(cols); \\\n    n = convert_index<BlasIndex>(rows); \\\n  }\\\n  GEMVVector x_tmp; \\\n  if (ConjugateRhs) { \\\n    Map<const GEMVVector, 0, InnerStride<> > map_x(rhs,cols,1,InnerStride<>(incx)); \\\n    x_tmp=map_x.conjugate(); \\\n    x_ptr=x_tmp.data(); \\\n    incx=1; \\\n  } else x_ptr=rhs; \\\n  BLASFUNC(&trans, &m, &n, (const BLASTYPE*)&numext::real_ref(alpha), (const BLASTYPE*)lhs, &lda, (const BLASTYPE*)x_ptr, &incx, (const BLASTYPE*)&numext::real_ref(beta), (BLASTYPE*)res, &incy); \\\n}\\\n};\n\n#ifdef EIGEN_USE_MKL\nEIGEN_BLAS_GEMV_SPECIALIZATION(double,   double, dgemv)\nEIGEN_BLAS_GEMV_SPECIALIZATION(float,    float,  sgemv)\nEIGEN_BLAS_GEMV_SPECIALIZATION(dcomplex, MKL_Complex16, zgemv)\nEIGEN_BLAS_GEMV_SPECIALIZATION(scomplex, MKL_Complex8 , cgemv)\n#else\nEIGEN_BLAS_GEMV_SPECIALIZATION(double,   double, dgemv_)\nEIGEN_BLAS_GEMV_SPECIALIZATION(float,    float,  sgemv_)\nEIGEN_BLAS_GEMV_SPECIALIZATION(dcomplex, double, zgemv_)\nEIGEN_BLAS_GEMV_SPECIALIZATION(scomplex, float,  cgemv_)\n#endif\n\n} // end namespase internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_GENERAL_MATRIX_VECTOR_BLAS_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/products/Parallelizer.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_PARALLELIZER_H\n#define EIGEN_PARALLELIZER_H\n\n#if EIGEN_HAS_CXX11_ATOMIC\n#include <atomic>\n#endif\n\nnamespace Eigen {\n\nnamespace internal {\n\n/** \\internal */\ninline void manage_multi_threading(Action action, int* v)\n{\n  static int m_maxThreads = -1;\n  EIGEN_UNUSED_VARIABLE(m_maxThreads);\n\n  if(action==SetAction)\n  {\n    eigen_internal_assert(v!=0);\n    m_maxThreads = *v;\n  }\n  else if(action==GetAction)\n  {\n    eigen_internal_assert(v!=0);\n    #ifdef EIGEN_HAS_OPENMP\n    if(m_maxThreads>0)\n      *v = m_maxThreads;\n    else\n      *v = omp_get_max_threads();\n    #else\n    *v = 1;\n    #endif\n  }\n  else\n  {\n    eigen_internal_assert(false);\n  }\n}\n\n}\n\n/** Must be call first when calling Eigen from multiple threads */\ninline void initParallel()\n{\n  int nbt;\n  internal::manage_multi_threading(GetAction, &nbt);\n  std::ptrdiff_t l1, l2, l3;\n  internal::manage_caching_sizes(GetAction, &l1, &l2, &l3);\n}\n\n/** \\returns the max number of threads reserved for Eigen\n  * \\sa setNbThreads */\ninline int nbThreads()\n{\n  int ret;\n  internal::manage_multi_threading(GetAction, &ret);\n  return ret;\n}\n\n/** Sets the max number of threads reserved for Eigen\n  * \\sa nbThreads */\ninline void setNbThreads(int v)\n{\n  internal::manage_multi_threading(SetAction, &v);\n}\n\nnamespace internal {\n\ntemplate<typename Index> struct GemmParallelInfo\n{\n  GemmParallelInfo() : sync(-1), users(0), lhs_start(0), lhs_length(0) {}\n\n  // volatile is not enough on all architectures (see bug 1572)\n  // to guarantee that when thread A says to thread B that it is\n  // done with packing a block, then all writes have been really\n  // carried out... C++11 memory model+atomic guarantees this.\n#if EIGEN_HAS_CXX11_ATOMIC\n  std::atomic<Index> sync;\n  std::atomic<int> users;\n#else\n  Index volatile sync;\n  int volatile users;\n#endif\n\n  Index lhs_start;\n  Index lhs_length;\n};\n\ntemplate<bool Condition, typename Functor, typename Index>\nvoid parallelize_gemm(const Functor& func, Index rows, Index cols, Index depth, bool transpose)\n{\n  // TODO when EIGEN_USE_BLAS is defined,\n  // we should still enable OMP for other scalar types\n  // Without C++11, we have to disable GEMM's parallelization on\n  // non x86 architectures because there volatile is not enough for our purpose.\n  // See bug 1572.\n#if (! defined(EIGEN_HAS_OPENMP)) || defined(EIGEN_USE_BLAS) || ((!EIGEN_HAS_CXX11_ATOMIC) && !(EIGEN_ARCH_i386_OR_x86_64))\n  // FIXME the transpose variable is only needed to properly split\n  // the matrix product when multithreading is enabled. This is a temporary\n  // fix to support row-major destination matrices. This whole\n  // parallelizer mechanism has to be redesigned anyway.\n  EIGEN_UNUSED_VARIABLE(depth);\n  EIGEN_UNUSED_VARIABLE(transpose);\n  func(0,rows, 0,cols);\n#else\n\n  // Dynamically check whether we should enable or disable OpenMP.\n  // The conditions are:\n  // - the max number of threads we can create is greater than 1\n  // - we are not already in a parallel code\n  // - the sizes are large enough\n\n  // compute the maximal number of threads from the size of the product:\n  // This first heuristic takes into account that the product kernel is fully optimized when working with nr columns at once.\n  Index size = transpose ? rows : cols;\n  Index pb_max_threads = std::max<Index>(1,size / Functor::Traits::nr);\n\n  // compute the maximal number of threads from the total amount of work:\n  double work = static_cast<double>(rows) * static_cast<double>(cols) *\n      static_cast<double>(depth);\n  double kMinTaskSize = 50000;  // FIXME improve this heuristic.\n  pb_max_threads = std::max<Index>(1, std::min<Index>(pb_max_threads, static_cast<Index>( work / kMinTaskSize ) ));\n\n  // compute the number of threads we are going to use\n  Index threads = std::min<Index>(nbThreads(), pb_max_threads);\n\n  // if multi-threading is explicitly disabled, not useful, or if we already are in a parallel session,\n  // then abort multi-threading\n  // FIXME omp_get_num_threads()>1 only works for openmp, what if the user does not use openmp?\n  if((!Condition) || (threads==1) || (omp_get_num_threads()>1))\n    return func(0,rows, 0,cols);\n\n  Eigen::initParallel();\n  func.initParallelSession(threads);\n\n  if(transpose)\n    std::swap(rows,cols);\n\n  ei_declare_aligned_stack_constructed_variable(GemmParallelInfo<Index>,info,threads,0);\n\n  #pragma omp parallel num_threads(threads)\n  {\n    Index i = omp_get_thread_num();\n    // Note that the actual number of threads might be lower than the number of request ones.\n    Index actual_threads = omp_get_num_threads();\n\n    Index blockCols = (cols / actual_threads) & ~Index(0x3);\n    Index blockRows = (rows / actual_threads);\n    blockRows = (blockRows/Functor::Traits::mr)*Functor::Traits::mr;\n\n    Index r0 = i*blockRows;\n    Index actualBlockRows = (i+1==actual_threads) ? rows-r0 : blockRows;\n\n    Index c0 = i*blockCols;\n    Index actualBlockCols = (i+1==actual_threads) ? cols-c0 : blockCols;\n\n    info[i].lhs_start = r0;\n    info[i].lhs_length = actualBlockRows;\n\n    if(transpose) func(c0, actualBlockCols, 0, rows, info);\n    else          func(0, rows, c0, actualBlockCols, info);\n  }\n#endif\n}\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_PARALLELIZER_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/products/SelfadjointMatrixMatrix.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SELFADJOINT_MATRIX_MATRIX_H\n#define EIGEN_SELFADJOINT_MATRIX_MATRIX_H\n\nnamespace Eigen { \n\nnamespace internal {\n\n// pack a selfadjoint block diagonal for use with the gebp_kernel\ntemplate<typename Scalar, typename Index, int Pack1, int Pack2_dummy, int StorageOrder>\nstruct symm_pack_lhs\n{\n  template<int BlockRows> inline\n  void pack(Scalar* blockA, const const_blas_data_mapper<Scalar,Index,StorageOrder>& lhs, Index cols, Index i, Index& count)\n  {\n    // normal copy\n    for(Index k=0; k<i; k++)\n      for(Index w=0; w<BlockRows; w++)\n        blockA[count++] = lhs(i+w,k);           // normal\n    // symmetric copy\n    Index h = 0;\n    for(Index k=i; k<i+BlockRows; k++)\n    {\n      for(Index w=0; w<h; w++)\n        blockA[count++] = numext::conj(lhs(k, i+w)); // transposed\n\n      blockA[count++] = numext::real(lhs(k,k));   // real (diagonal)\n\n      for(Index w=h+1; w<BlockRows; w++)\n        blockA[count++] = lhs(i+w, k);          // normal\n      ++h;\n    }\n    // transposed copy\n    for(Index k=i+BlockRows; k<cols; k++)\n      for(Index w=0; w<BlockRows; w++)\n        blockA[count++] = numext::conj(lhs(k, i+w)); // transposed\n  }\n  void operator()(Scalar* blockA, const Scalar* _lhs, Index lhsStride, Index cols, Index rows)\n  {\n    typedef typename unpacket_traits<typename packet_traits<Scalar>::type>::half HalfPacket;\n    typedef typename unpacket_traits<typename unpacket_traits<typename packet_traits<Scalar>::type>::half>::half QuarterPacket;\n    enum { PacketSize = packet_traits<Scalar>::size,\n           HalfPacketSize = unpacket_traits<HalfPacket>::size,\n           QuarterPacketSize = unpacket_traits<QuarterPacket>::size,\n           HasHalf = (int)HalfPacketSize < (int)PacketSize,\n           HasQuarter = (int)QuarterPacketSize < (int)HalfPacketSize};\n\n    const_blas_data_mapper<Scalar,Index,StorageOrder> lhs(_lhs,lhsStride);\n    Index count = 0;\n    //Index peeled_mc3 = (rows/Pack1)*Pack1;\n    \n    const Index peeled_mc3 = Pack1>=3*PacketSize ? (rows/(3*PacketSize))*(3*PacketSize) : 0;\n    const Index peeled_mc2 = Pack1>=2*PacketSize ? peeled_mc3+((rows-peeled_mc3)/(2*PacketSize))*(2*PacketSize) : 0;\n    const Index peeled_mc1 = Pack1>=1*PacketSize ? peeled_mc2+((rows-peeled_mc2)/(1*PacketSize))*(1*PacketSize) : 0;\n    const Index peeled_mc_half = Pack1>=HalfPacketSize ? peeled_mc1+((rows-peeled_mc1)/(HalfPacketSize))*(HalfPacketSize) : 0;\n    const Index peeled_mc_quarter = Pack1>=QuarterPacketSize ? peeled_mc_half+((rows-peeled_mc_half)/(QuarterPacketSize))*(QuarterPacketSize) : 0;\n    \n    if(Pack1>=3*PacketSize)\n      for(Index i=0; i<peeled_mc3; i+=3*PacketSize)\n        pack<3*PacketSize>(blockA, lhs, cols, i, count);\n    \n    if(Pack1>=2*PacketSize)\n      for(Index i=peeled_mc3; i<peeled_mc2; i+=2*PacketSize)\n        pack<2*PacketSize>(blockA, lhs, cols, i, count);\n    \n    if(Pack1>=1*PacketSize)\n      for(Index i=peeled_mc2; i<peeled_mc1; i+=1*PacketSize)\n        pack<1*PacketSize>(blockA, lhs, cols, i, count);\n\n    if(HasHalf && Pack1>=HalfPacketSize)\n      for(Index i=peeled_mc1; i<peeled_mc_half; i+=HalfPacketSize)\n        pack<HalfPacketSize>(blockA, lhs, cols, i, count);\n\n    if(HasQuarter && Pack1>=QuarterPacketSize)\n      for(Index i=peeled_mc_half; i<peeled_mc_quarter; i+=QuarterPacketSize)\n        pack<QuarterPacketSize>(blockA, lhs, cols, i, count);\n\n    // do the same with mr==1\n    for(Index i=peeled_mc_quarter; i<rows; i++)\n    {\n      for(Index k=0; k<i; k++)\n        blockA[count++] = lhs(i, k);                   // normal\n\n      blockA[count++] = numext::real(lhs(i, i));       // real (diagonal)\n\n      for(Index k=i+1; k<cols; k++)\n        blockA[count++] = numext::conj(lhs(k, i));     // transposed\n    }\n  }\n};\n\ntemplate<typename Scalar, typename Index, int nr, int StorageOrder>\nstruct symm_pack_rhs\n{\n  enum { PacketSize = packet_traits<Scalar>::size };\n  void operator()(Scalar* blockB, const Scalar* _rhs, Index rhsStride, Index rows, Index cols, Index k2)\n  {\n    Index end_k = k2 + rows;\n    Index count = 0;\n    const_blas_data_mapper<Scalar,Index,StorageOrder> rhs(_rhs,rhsStride);\n    Index packet_cols8 = nr>=8 ? (cols/8) * 8 : 0;\n    Index packet_cols4 = nr>=4 ? (cols/4) * 4 : 0;\n\n    // first part: normal case\n    for(Index j2=0; j2<k2; j2+=nr)\n    {\n      for(Index k=k2; k<end_k; k++)\n      {\n        blockB[count+0] = rhs(k,j2+0);\n        blockB[count+1] = rhs(k,j2+1);\n        if (nr>=4)\n        {\n          blockB[count+2] = rhs(k,j2+2);\n          blockB[count+3] = rhs(k,j2+3);\n        }\n        if (nr>=8)\n        {\n          blockB[count+4] = rhs(k,j2+4);\n          blockB[count+5] = rhs(k,j2+5);\n          blockB[count+6] = rhs(k,j2+6);\n          blockB[count+7] = rhs(k,j2+7);\n        }\n        count += nr;\n      }\n    }\n\n    // second part: diagonal block\n    Index end8 = nr>=8 ? (std::min)(k2+rows,packet_cols8) : k2;\n    if(nr>=8)\n    {\n      for(Index j2=k2; j2<end8; j2+=8)\n      {\n        // again we can split vertically in three different parts (transpose, symmetric, normal)\n        // transpose\n        for(Index k=k2; k<j2; k++)\n        {\n          blockB[count+0] = numext::conj(rhs(j2+0,k));\n          blockB[count+1] = numext::conj(rhs(j2+1,k));\n          blockB[count+2] = numext::conj(rhs(j2+2,k));\n          blockB[count+3] = numext::conj(rhs(j2+3,k));\n          blockB[count+4] = numext::conj(rhs(j2+4,k));\n          blockB[count+5] = numext::conj(rhs(j2+5,k));\n          blockB[count+6] = numext::conj(rhs(j2+6,k));\n          blockB[count+7] = numext::conj(rhs(j2+7,k));\n          count += 8;\n        }\n        // symmetric\n        Index h = 0;\n        for(Index k=j2; k<j2+8; k++)\n        {\n          // normal\n          for (Index w=0 ; w<h; ++w)\n            blockB[count+w] = rhs(k,j2+w);\n\n          blockB[count+h] = numext::real(rhs(k,k));\n\n          // transpose\n          for (Index w=h+1 ; w<8; ++w)\n            blockB[count+w] = numext::conj(rhs(j2+w,k));\n          count += 8;\n          ++h;\n        }\n        // normal\n        for(Index k=j2+8; k<end_k; k++)\n        {\n          blockB[count+0] = rhs(k,j2+0);\n          blockB[count+1] = rhs(k,j2+1);\n          blockB[count+2] = rhs(k,j2+2);\n          blockB[count+3] = rhs(k,j2+3);\n          blockB[count+4] = rhs(k,j2+4);\n          blockB[count+5] = rhs(k,j2+5);\n          blockB[count+6] = rhs(k,j2+6);\n          blockB[count+7] = rhs(k,j2+7);\n          count += 8;\n        }\n      }\n    }\n    if(nr>=4)\n    {\n      for(Index j2=end8; j2<(std::min)(k2+rows,packet_cols4); j2+=4)\n      {\n        // again we can split vertically in three different parts (transpose, symmetric, normal)\n        // transpose\n        for(Index k=k2; k<j2; k++)\n        {\n          blockB[count+0] = numext::conj(rhs(j2+0,k));\n          blockB[count+1] = numext::conj(rhs(j2+1,k));\n          blockB[count+2] = numext::conj(rhs(j2+2,k));\n          blockB[count+3] = numext::conj(rhs(j2+3,k));\n          count += 4;\n        }\n        // symmetric\n        Index h = 0;\n        for(Index k=j2; k<j2+4; k++)\n        {\n          // normal\n          for (Index w=0 ; w<h; ++w)\n            blockB[count+w] = rhs(k,j2+w);\n\n          blockB[count+h] = numext::real(rhs(k,k));\n\n          // transpose\n          for (Index w=h+1 ; w<4; ++w)\n            blockB[count+w] = numext::conj(rhs(j2+w,k));\n          count += 4;\n          ++h;\n        }\n        // normal\n        for(Index k=j2+4; k<end_k; k++)\n        {\n          blockB[count+0] = rhs(k,j2+0);\n          blockB[count+1] = rhs(k,j2+1);\n          blockB[count+2] = rhs(k,j2+2);\n          blockB[count+3] = rhs(k,j2+3);\n          count += 4;\n        }\n      }\n    }\n\n    // third part: transposed\n    if(nr>=8)\n    {\n      for(Index j2=k2+rows; j2<packet_cols8; j2+=8)\n      {\n        for(Index k=k2; k<end_k; k++)\n        {\n          blockB[count+0] = numext::conj(rhs(j2+0,k));\n          blockB[count+1] = numext::conj(rhs(j2+1,k));\n          blockB[count+2] = numext::conj(rhs(j2+2,k));\n          blockB[count+3] = numext::conj(rhs(j2+3,k));\n          blockB[count+4] = numext::conj(rhs(j2+4,k));\n          blockB[count+5] = numext::conj(rhs(j2+5,k));\n          blockB[count+6] = numext::conj(rhs(j2+6,k));\n          blockB[count+7] = numext::conj(rhs(j2+7,k));\n          count += 8;\n        }\n      }\n    }\n    if(nr>=4)\n    {\n      for(Index j2=(std::max)(packet_cols8,k2+rows); j2<packet_cols4; j2+=4)\n      {\n        for(Index k=k2; k<end_k; k++)\n        {\n          blockB[count+0] = numext::conj(rhs(j2+0,k));\n          blockB[count+1] = numext::conj(rhs(j2+1,k));\n          blockB[count+2] = numext::conj(rhs(j2+2,k));\n          blockB[count+3] = numext::conj(rhs(j2+3,k));\n          count += 4;\n        }\n      }\n    }\n\n    // copy the remaining columns one at a time (=> the same with nr==1)\n    for(Index j2=packet_cols4; j2<cols; ++j2)\n    {\n      // transpose\n      Index half = (std::min)(end_k,j2);\n      for(Index k=k2; k<half; k++)\n      {\n        blockB[count] = numext::conj(rhs(j2,k));\n        count += 1;\n      }\n\n      if(half==j2 && half<k2+rows)\n      {\n        blockB[count] = numext::real(rhs(j2,j2));\n        count += 1;\n      }\n      else\n        half--;\n\n      // normal\n      for(Index k=half+1; k<k2+rows; k++)\n      {\n        blockB[count] = rhs(k,j2);\n        count += 1;\n      }\n    }\n  }\n};\n\n/* Optimized selfadjoint matrix * matrix (_SYMM) product built on top of\n * the general matrix matrix product.\n */\ntemplate <typename Scalar, typename Index,\n          int LhsStorageOrder, bool LhsSelfAdjoint, bool ConjugateLhs,\n          int RhsStorageOrder, bool RhsSelfAdjoint, bool ConjugateRhs,\n          int ResStorageOrder, int ResInnerStride>\nstruct product_selfadjoint_matrix;\n\ntemplate <typename Scalar, typename Index,\n          int LhsStorageOrder, bool LhsSelfAdjoint, bool ConjugateLhs,\n          int RhsStorageOrder, bool RhsSelfAdjoint, bool ConjugateRhs,\n          int ResInnerStride>\nstruct product_selfadjoint_matrix<Scalar,Index,LhsStorageOrder,LhsSelfAdjoint,ConjugateLhs, RhsStorageOrder,RhsSelfAdjoint,ConjugateRhs,RowMajor,ResInnerStride>\n{\n\n  static EIGEN_STRONG_INLINE void run(\n    Index rows, Index cols,\n    const Scalar* lhs, Index lhsStride,\n    const Scalar* rhs, Index rhsStride,\n    Scalar* res,       Index resIncr, Index resStride,\n    const Scalar& alpha, level3_blocking<Scalar,Scalar>& blocking)\n  {\n    product_selfadjoint_matrix<Scalar, Index,\n      EIGEN_LOGICAL_XOR(RhsSelfAdjoint,RhsStorageOrder==RowMajor) ? ColMajor : RowMajor,\n      RhsSelfAdjoint, NumTraits<Scalar>::IsComplex && EIGEN_LOGICAL_XOR(RhsSelfAdjoint,ConjugateRhs),\n      EIGEN_LOGICAL_XOR(LhsSelfAdjoint,LhsStorageOrder==RowMajor) ? ColMajor : RowMajor,\n      LhsSelfAdjoint, NumTraits<Scalar>::IsComplex && EIGEN_LOGICAL_XOR(LhsSelfAdjoint,ConjugateLhs),\n      ColMajor,ResInnerStride>\n      ::run(cols, rows,  rhs, rhsStride,  lhs, lhsStride,  res, resIncr, resStride,  alpha, blocking);\n  }\n};\n\ntemplate <typename Scalar, typename Index,\n          int LhsStorageOrder, bool ConjugateLhs,\n          int RhsStorageOrder, bool ConjugateRhs,\n          int ResInnerStride>\nstruct product_selfadjoint_matrix<Scalar,Index,LhsStorageOrder,true,ConjugateLhs, RhsStorageOrder,false,ConjugateRhs,ColMajor,ResInnerStride>\n{\n\n  static EIGEN_DONT_INLINE void run(\n    Index rows, Index cols,\n    const Scalar* _lhs, Index lhsStride,\n    const Scalar* _rhs, Index rhsStride,\n    Scalar* res,        Index resIncr, Index resStride,\n    const Scalar& alpha, level3_blocking<Scalar,Scalar>& blocking);\n};\n\ntemplate <typename Scalar, typename Index,\n          int LhsStorageOrder, bool ConjugateLhs,\n          int RhsStorageOrder, bool ConjugateRhs,\n          int ResInnerStride>\nEIGEN_DONT_INLINE void product_selfadjoint_matrix<Scalar,Index,LhsStorageOrder,true,ConjugateLhs, RhsStorageOrder,false,ConjugateRhs,ColMajor,ResInnerStride>::run(\n    Index rows, Index cols,\n    const Scalar* _lhs, Index lhsStride,\n    const Scalar* _rhs, Index rhsStride,\n    Scalar* _res,       Index resIncr, Index resStride,\n    const Scalar& alpha, level3_blocking<Scalar,Scalar>& blocking)\n  {\n    Index size = rows;\n\n    typedef gebp_traits<Scalar,Scalar> Traits;\n\n    typedef const_blas_data_mapper<Scalar, Index, LhsStorageOrder> LhsMapper;\n    typedef const_blas_data_mapper<Scalar, Index, (LhsStorageOrder == RowMajor) ? ColMajor : RowMajor> LhsTransposeMapper;\n    typedef const_blas_data_mapper<Scalar, Index, RhsStorageOrder> RhsMapper;\n    typedef blas_data_mapper<typename Traits::ResScalar, Index, ColMajor, Unaligned, ResInnerStride> ResMapper;\n    LhsMapper lhs(_lhs,lhsStride);\n    LhsTransposeMapper lhs_transpose(_lhs,lhsStride);\n    RhsMapper rhs(_rhs,rhsStride);\n    ResMapper res(_res, resStride, resIncr);\n\n    Index kc = blocking.kc();                   // cache block size along the K direction\n    Index mc = (std::min)(rows,blocking.mc());  // cache block size along the M direction\n    // kc must be smaller than mc\n    kc = (std::min)(kc,mc);\n    std::size_t sizeA = kc*mc;\n    std::size_t sizeB = kc*cols;\n    ei_declare_aligned_stack_constructed_variable(Scalar, blockA, sizeA, blocking.blockA());\n    ei_declare_aligned_stack_constructed_variable(Scalar, blockB, sizeB, blocking.blockB());\n\n    gebp_kernel<Scalar, Scalar, Index, ResMapper, Traits::mr, Traits::nr, ConjugateLhs, ConjugateRhs> gebp_kernel;\n    symm_pack_lhs<Scalar, Index, Traits::mr, Traits::LhsProgress, LhsStorageOrder> pack_lhs;\n    gemm_pack_rhs<Scalar, Index, RhsMapper, Traits::nr,RhsStorageOrder> pack_rhs;\n    gemm_pack_lhs<Scalar, Index, LhsTransposeMapper, Traits::mr, Traits::LhsProgress, typename Traits::LhsPacket4Packing, LhsStorageOrder==RowMajor?ColMajor:RowMajor, true> pack_lhs_transposed;\n\n    for(Index k2=0; k2<size; k2+=kc)\n    {\n      const Index actual_kc = (std::min)(k2+kc,size)-k2;\n\n      // we have selected one row panel of rhs and one column panel of lhs\n      // pack rhs's panel into a sequential chunk of memory\n      // and expand each coeff to a constant packet for further reuse\n      pack_rhs(blockB, rhs.getSubMapper(k2,0), actual_kc, cols);\n\n      // the select lhs's panel has to be split in three different parts:\n      //  1 - the transposed panel above the diagonal block => transposed packed copy\n      //  2 - the diagonal block => special packed copy\n      //  3 - the panel below the diagonal block => generic packed copy\n      for(Index i2=0; i2<k2; i2+=mc)\n      {\n        const Index actual_mc = (std::min)(i2+mc,k2)-i2;\n        // transposed packed copy\n        pack_lhs_transposed(blockA, lhs_transpose.getSubMapper(i2, k2), actual_kc, actual_mc);\n\n        gebp_kernel(res.getSubMapper(i2, 0), blockA, blockB, actual_mc, actual_kc, cols, alpha);\n      }\n      // the block diagonal\n      {\n        const Index actual_mc = (std::min)(k2+kc,size)-k2;\n        // symmetric packed copy\n        pack_lhs(blockA, &lhs(k2,k2), lhsStride, actual_kc, actual_mc);\n\n        gebp_kernel(res.getSubMapper(k2, 0), blockA, blockB, actual_mc, actual_kc, cols, alpha);\n      }\n\n      for(Index i2=k2+kc; i2<size; i2+=mc)\n      {\n        const Index actual_mc = (std::min)(i2+mc,size)-i2;\n        gemm_pack_lhs<Scalar, Index, LhsMapper, Traits::mr, Traits::LhsProgress, typename Traits::LhsPacket4Packing, LhsStorageOrder,false>()\n          (blockA, lhs.getSubMapper(i2, k2), actual_kc, actual_mc);\n\n        gebp_kernel(res.getSubMapper(i2, 0), blockA, blockB, actual_mc, actual_kc, cols, alpha);\n      }\n    }\n  }\n\n// matrix * selfadjoint product\ntemplate <typename Scalar, typename Index,\n          int LhsStorageOrder, bool ConjugateLhs,\n          int RhsStorageOrder, bool ConjugateRhs,\n          int ResInnerStride>\nstruct product_selfadjoint_matrix<Scalar,Index,LhsStorageOrder,false,ConjugateLhs, RhsStorageOrder,true,ConjugateRhs,ColMajor,ResInnerStride>\n{\n\n  static EIGEN_DONT_INLINE void run(\n    Index rows, Index cols,\n    const Scalar* _lhs, Index lhsStride,\n    const Scalar* _rhs, Index rhsStride,\n    Scalar* res,        Index resIncr, Index resStride,\n    const Scalar& alpha, level3_blocking<Scalar,Scalar>& blocking);\n};\n\ntemplate <typename Scalar, typename Index,\n          int LhsStorageOrder, bool ConjugateLhs,\n          int RhsStorageOrder, bool ConjugateRhs,\n          int ResInnerStride>\nEIGEN_DONT_INLINE void product_selfadjoint_matrix<Scalar,Index,LhsStorageOrder,false,ConjugateLhs, RhsStorageOrder,true,ConjugateRhs,ColMajor,ResInnerStride>::run(\n    Index rows, Index cols,\n    const Scalar* _lhs, Index lhsStride,\n    const Scalar* _rhs, Index rhsStride,\n    Scalar* _res,       Index resIncr, Index resStride,\n    const Scalar& alpha, level3_blocking<Scalar,Scalar>& blocking)\n  {\n    Index size = cols;\n\n    typedef gebp_traits<Scalar,Scalar> Traits;\n\n    typedef const_blas_data_mapper<Scalar, Index, LhsStorageOrder> LhsMapper;\n    typedef blas_data_mapper<typename Traits::ResScalar, Index, ColMajor, Unaligned, ResInnerStride> ResMapper;\n    LhsMapper lhs(_lhs,lhsStride);\n    ResMapper res(_res,resStride, resIncr);\n\n    Index kc = blocking.kc();                   // cache block size along the K direction\n    Index mc = (std::min)(rows,blocking.mc());  // cache block size along the M direction\n    std::size_t sizeA = kc*mc;\n    std::size_t sizeB = kc*cols;\n    ei_declare_aligned_stack_constructed_variable(Scalar, blockA, sizeA, blocking.blockA());\n    ei_declare_aligned_stack_constructed_variable(Scalar, blockB, sizeB, blocking.blockB());\n\n    gebp_kernel<Scalar, Scalar, Index, ResMapper, Traits::mr, Traits::nr, ConjugateLhs, ConjugateRhs> gebp_kernel;\n    gemm_pack_lhs<Scalar, Index, LhsMapper, Traits::mr, Traits::LhsProgress, typename Traits::LhsPacket4Packing, LhsStorageOrder> pack_lhs;\n    symm_pack_rhs<Scalar, Index, Traits::nr,RhsStorageOrder> pack_rhs;\n\n    for(Index k2=0; k2<size; k2+=kc)\n    {\n      const Index actual_kc = (std::min)(k2+kc,size)-k2;\n\n      pack_rhs(blockB, _rhs, rhsStride, actual_kc, cols, k2);\n\n      // => GEPP\n      for(Index i2=0; i2<rows; i2+=mc)\n      {\n        const Index actual_mc = (std::min)(i2+mc,rows)-i2;\n        pack_lhs(blockA, lhs.getSubMapper(i2, k2), actual_kc, actual_mc);\n\n        gebp_kernel(res.getSubMapper(i2, 0), blockA, blockB, actual_mc, actual_kc, cols, alpha);\n      }\n    }\n  }\n\n} // end namespace internal\n\n/***************************************************************************\n* Wrapper to product_selfadjoint_matrix\n***************************************************************************/\n\nnamespace internal {\n  \ntemplate<typename Lhs, int LhsMode, typename Rhs, int RhsMode>\nstruct selfadjoint_product_impl<Lhs,LhsMode,false,Rhs,RhsMode,false>\n{\n  typedef typename Product<Lhs,Rhs>::Scalar Scalar;\n  \n  typedef internal::blas_traits<Lhs> LhsBlasTraits;\n  typedef typename LhsBlasTraits::DirectLinearAccessType ActualLhsType;\n  typedef internal::blas_traits<Rhs> RhsBlasTraits;\n  typedef typename RhsBlasTraits::DirectLinearAccessType ActualRhsType;\n  \n  enum {\n    LhsIsUpper = (LhsMode&(Upper|Lower))==Upper,\n    LhsIsSelfAdjoint = (LhsMode&SelfAdjoint)==SelfAdjoint,\n    RhsIsUpper = (RhsMode&(Upper|Lower))==Upper,\n    RhsIsSelfAdjoint = (RhsMode&SelfAdjoint)==SelfAdjoint\n  };\n  \n  template<typename Dest>\n  static void run(Dest &dst, const Lhs &a_lhs, const Rhs &a_rhs, const Scalar& alpha)\n  {\n    eigen_assert(dst.rows()==a_lhs.rows() && dst.cols()==a_rhs.cols());\n\n    typename internal::add_const_on_value_type<ActualLhsType>::type lhs = LhsBlasTraits::extract(a_lhs);\n    typename internal::add_const_on_value_type<ActualRhsType>::type rhs = RhsBlasTraits::extract(a_rhs);\n\n    Scalar actualAlpha = alpha * LhsBlasTraits::extractScalarFactor(a_lhs)\n                               * RhsBlasTraits::extractScalarFactor(a_rhs);\n\n    typedef internal::gemm_blocking_space<(Dest::Flags&RowMajorBit) ? RowMajor : ColMajor,Scalar,Scalar,\n              Lhs::MaxRowsAtCompileTime, Rhs::MaxColsAtCompileTime, Lhs::MaxColsAtCompileTime,1> BlockingType;\n\n    BlockingType blocking(lhs.rows(), rhs.cols(), lhs.cols(), 1, false);\n\n    internal::product_selfadjoint_matrix<Scalar, Index,\n      EIGEN_LOGICAL_XOR(LhsIsUpper,internal::traits<Lhs>::Flags &RowMajorBit) ? RowMajor : ColMajor, LhsIsSelfAdjoint,\n      NumTraits<Scalar>::IsComplex && EIGEN_LOGICAL_XOR(LhsIsUpper,bool(LhsBlasTraits::NeedToConjugate)),\n      EIGEN_LOGICAL_XOR(RhsIsUpper,internal::traits<Rhs>::Flags &RowMajorBit) ? RowMajor : ColMajor, RhsIsSelfAdjoint,\n      NumTraits<Scalar>::IsComplex && EIGEN_LOGICAL_XOR(RhsIsUpper,bool(RhsBlasTraits::NeedToConjugate)),\n      internal::traits<Dest>::Flags&RowMajorBit  ? RowMajor : ColMajor,\n      Dest::InnerStrideAtCompileTime>\n      ::run(\n        lhs.rows(), rhs.cols(),                 // sizes\n        &lhs.coeffRef(0,0), lhs.outerStride(),  // lhs info\n        &rhs.coeffRef(0,0), rhs.outerStride(),  // rhs info\n        &dst.coeffRef(0,0), dst.innerStride(), dst.outerStride(),  // result info\n        actualAlpha, blocking                   // alpha\n      );\n  }\n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_SELFADJOINT_MATRIX_MATRIX_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/products/SelfadjointMatrixMatrix_BLAS.h",
    "content": "/*\n Copyright (c) 2011, Intel Corporation. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without modification,\n are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n   list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n * Neither the name of Intel Corporation nor the names of its contributors may\n   be used to endorse or promote products derived from this software without\n   specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\n ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n ********************************************************************************\n *   Content : Eigen bindings to BLAS F77\n *   Self adjoint matrix * matrix product functionality based on ?SYMM/?HEMM.\n ********************************************************************************\n*/\n\n#ifndef EIGEN_SELFADJOINT_MATRIX_MATRIX_BLAS_H\n#define EIGEN_SELFADJOINT_MATRIX_MATRIX_BLAS_H\n\nnamespace Eigen { \n\nnamespace internal {\n\n\n/* Optimized selfadjoint matrix * matrix (?SYMM/?HEMM) product */\n\n#define EIGEN_BLAS_SYMM_L(EIGTYPE, BLASTYPE, EIGPREFIX, BLASFUNC) \\\ntemplate <typename Index, \\\n          int LhsStorageOrder, bool ConjugateLhs, \\\n          int RhsStorageOrder, bool ConjugateRhs> \\\nstruct product_selfadjoint_matrix<EIGTYPE,Index,LhsStorageOrder,true,ConjugateLhs,RhsStorageOrder,false,ConjugateRhs,ColMajor,1> \\\n{\\\n\\\n  static void run( \\\n    Index rows, Index cols, \\\n    const EIGTYPE* _lhs, Index lhsStride, \\\n    const EIGTYPE* _rhs, Index rhsStride, \\\n    EIGTYPE* res,        Index resIncr, Index resStride, \\\n    EIGTYPE alpha, level3_blocking<EIGTYPE, EIGTYPE>& /*blocking*/) \\\n  { \\\n    EIGEN_ONLY_USED_FOR_DEBUG(resIncr); \\\n    eigen_assert(resIncr == 1); \\\n    char side='L', uplo='L'; \\\n    BlasIndex m, n, lda, ldb, ldc; \\\n    const EIGTYPE *a, *b; \\\n    EIGTYPE beta(1); \\\n    MatrixX##EIGPREFIX b_tmp; \\\n\\\n/* Set transpose options */ \\\n/* Set m, n, k */ \\\n    m = convert_index<BlasIndex>(rows);  \\\n    n = convert_index<BlasIndex>(cols);  \\\n\\\n/* Set lda, ldb, ldc */ \\\n    lda = convert_index<BlasIndex>(lhsStride); \\\n    ldb = convert_index<BlasIndex>(rhsStride); \\\n    ldc = convert_index<BlasIndex>(resStride); \\\n\\\n/* Set a, b, c */ \\\n    if (LhsStorageOrder==RowMajor) uplo='U'; \\\n    a = _lhs; \\\n\\\n    if (RhsStorageOrder==RowMajor) { \\\n      Map<const MatrixX##EIGPREFIX, 0, OuterStride<> > rhs(_rhs,n,m,OuterStride<>(rhsStride)); \\\n      b_tmp = rhs.adjoint(); \\\n      b = b_tmp.data(); \\\n      ldb = convert_index<BlasIndex>(b_tmp.outerStride()); \\\n    } else b = _rhs; \\\n\\\n    BLASFUNC(&side, &uplo, &m, &n, (const BLASTYPE*)&numext::real_ref(alpha), (const BLASTYPE*)a, &lda, (const BLASTYPE*)b, &ldb, (const BLASTYPE*)&numext::real_ref(beta), (BLASTYPE*)res, &ldc); \\\n\\\n  } \\\n};\n\n\n#define EIGEN_BLAS_HEMM_L(EIGTYPE, BLASTYPE, EIGPREFIX, BLASFUNC) \\\ntemplate <typename Index, \\\n          int LhsStorageOrder, bool ConjugateLhs, \\\n          int RhsStorageOrder, bool ConjugateRhs> \\\nstruct product_selfadjoint_matrix<EIGTYPE,Index,LhsStorageOrder,true,ConjugateLhs,RhsStorageOrder,false,ConjugateRhs,ColMajor,1> \\\n{\\\n  static void run( \\\n    Index rows, Index cols, \\\n    const EIGTYPE* _lhs, Index lhsStride, \\\n    const EIGTYPE* _rhs, Index rhsStride, \\\n    EIGTYPE* res,        Index resIncr, Index resStride, \\\n    EIGTYPE alpha, level3_blocking<EIGTYPE, EIGTYPE>& /*blocking*/) \\\n  { \\\n    EIGEN_ONLY_USED_FOR_DEBUG(resIncr); \\\n    eigen_assert(resIncr == 1); \\\n    char side='L', uplo='L'; \\\n    BlasIndex m, n, lda, ldb, ldc; \\\n    const EIGTYPE *a, *b; \\\n    EIGTYPE beta(1); \\\n    MatrixX##EIGPREFIX b_tmp; \\\n    Matrix<EIGTYPE, Dynamic, Dynamic, LhsStorageOrder> a_tmp; \\\n\\\n/* Set transpose options */ \\\n/* Set m, n, k */ \\\n    m = convert_index<BlasIndex>(rows); \\\n    n = convert_index<BlasIndex>(cols); \\\n\\\n/* Set lda, ldb, ldc */ \\\n    lda = convert_index<BlasIndex>(lhsStride); \\\n    ldb = convert_index<BlasIndex>(rhsStride); \\\n    ldc = convert_index<BlasIndex>(resStride); \\\n\\\n/* Set a, b, c */ \\\n    if (((LhsStorageOrder==ColMajor) && ConjugateLhs) || ((LhsStorageOrder==RowMajor) && (!ConjugateLhs))) { \\\n      Map<const Matrix<EIGTYPE, Dynamic, Dynamic, LhsStorageOrder>, 0, OuterStride<> > lhs(_lhs,m,m,OuterStride<>(lhsStride)); \\\n      a_tmp = lhs.conjugate(); \\\n      a = a_tmp.data(); \\\n      lda = convert_index<BlasIndex>(a_tmp.outerStride()); \\\n    } else a = _lhs; \\\n    if (LhsStorageOrder==RowMajor) uplo='U'; \\\n\\\n    if (RhsStorageOrder==ColMajor && (!ConjugateRhs)) { \\\n       b = _rhs; } \\\n    else { \\\n      if (RhsStorageOrder==ColMajor && ConjugateRhs) { \\\n        Map<const MatrixX##EIGPREFIX, 0, OuterStride<> > rhs(_rhs,m,n,OuterStride<>(rhsStride)); \\\n        b_tmp = rhs.conjugate(); \\\n      } else \\\n      if (ConjugateRhs) { \\\n        Map<const MatrixX##EIGPREFIX, 0, OuterStride<> > rhs(_rhs,n,m,OuterStride<>(rhsStride)); \\\n        b_tmp = rhs.adjoint(); \\\n      } else { \\\n        Map<const MatrixX##EIGPREFIX, 0, OuterStride<> > rhs(_rhs,n,m,OuterStride<>(rhsStride)); \\\n        b_tmp = rhs.transpose(); \\\n      } \\\n      b = b_tmp.data(); \\\n      ldb = convert_index<BlasIndex>(b_tmp.outerStride()); \\\n    } \\\n\\\n    BLASFUNC(&side, &uplo, &m, &n, (const BLASTYPE*)&numext::real_ref(alpha), (const BLASTYPE*)a, &lda, (const BLASTYPE*)b, &ldb, (const BLASTYPE*)&numext::real_ref(beta), (BLASTYPE*)res, &ldc); \\\n\\\n  } \\\n};\n\n#ifdef EIGEN_USE_MKL\nEIGEN_BLAS_SYMM_L(double, double, d, dsymm)\nEIGEN_BLAS_SYMM_L(float, float, f, ssymm)\nEIGEN_BLAS_HEMM_L(dcomplex, MKL_Complex16, cd, zhemm)\nEIGEN_BLAS_HEMM_L(scomplex, MKL_Complex8, cf, chemm)\n#else\nEIGEN_BLAS_SYMM_L(double, double, d, dsymm_)\nEIGEN_BLAS_SYMM_L(float, float, f, ssymm_)\nEIGEN_BLAS_HEMM_L(dcomplex, double, cd, zhemm_)\nEIGEN_BLAS_HEMM_L(scomplex, float, cf, chemm_)\n#endif\n\n/* Optimized matrix * selfadjoint matrix (?SYMM/?HEMM) product */\n\n#define EIGEN_BLAS_SYMM_R(EIGTYPE, BLASTYPE, EIGPREFIX, BLASFUNC) \\\ntemplate <typename Index, \\\n          int LhsStorageOrder, bool ConjugateLhs, \\\n          int RhsStorageOrder, bool ConjugateRhs> \\\nstruct product_selfadjoint_matrix<EIGTYPE,Index,LhsStorageOrder,false,ConjugateLhs,RhsStorageOrder,true,ConjugateRhs,ColMajor,1> \\\n{\\\n\\\n  static void run( \\\n    Index rows, Index cols, \\\n    const EIGTYPE* _lhs, Index lhsStride, \\\n    const EIGTYPE* _rhs, Index rhsStride, \\\n    EIGTYPE* res,        Index resIncr, Index resStride, \\\n    EIGTYPE alpha, level3_blocking<EIGTYPE, EIGTYPE>& /*blocking*/) \\\n  { \\\n    EIGEN_ONLY_USED_FOR_DEBUG(resIncr); \\\n    eigen_assert(resIncr == 1); \\\n    char side='R', uplo='L'; \\\n    BlasIndex m, n, lda, ldb, ldc; \\\n    const EIGTYPE *a, *b; \\\n    EIGTYPE beta(1); \\\n    MatrixX##EIGPREFIX b_tmp; \\\n\\\n/* Set m, n, k */ \\\n    m = convert_index<BlasIndex>(rows);  \\\n    n = convert_index<BlasIndex>(cols);  \\\n\\\n/* Set lda, ldb, ldc */ \\\n    lda = convert_index<BlasIndex>(rhsStride); \\\n    ldb = convert_index<BlasIndex>(lhsStride); \\\n    ldc = convert_index<BlasIndex>(resStride); \\\n\\\n/* Set a, b, c */ \\\n    if (RhsStorageOrder==RowMajor) uplo='U'; \\\n    a = _rhs; \\\n\\\n    if (LhsStorageOrder==RowMajor) { \\\n      Map<const MatrixX##EIGPREFIX, 0, OuterStride<> > lhs(_lhs,n,m,OuterStride<>(rhsStride)); \\\n      b_tmp = lhs.adjoint(); \\\n      b = b_tmp.data(); \\\n      ldb = convert_index<BlasIndex>(b_tmp.outerStride()); \\\n    } else b = _lhs; \\\n\\\n    BLASFUNC(&side, &uplo, &m, &n, (const BLASTYPE*)&numext::real_ref(alpha), (const BLASTYPE*)a, &lda, (const BLASTYPE*)b, &ldb, (const BLASTYPE*)&numext::real_ref(beta), (BLASTYPE*)res, &ldc); \\\n\\\n  } \\\n};\n\n\n#define EIGEN_BLAS_HEMM_R(EIGTYPE, BLASTYPE, EIGPREFIX, BLASFUNC) \\\ntemplate <typename Index, \\\n          int LhsStorageOrder, bool ConjugateLhs, \\\n          int RhsStorageOrder, bool ConjugateRhs> \\\nstruct product_selfadjoint_matrix<EIGTYPE,Index,LhsStorageOrder,false,ConjugateLhs,RhsStorageOrder,true,ConjugateRhs,ColMajor,1> \\\n{\\\n  static void run( \\\n    Index rows, Index cols, \\\n    const EIGTYPE* _lhs, Index lhsStride, \\\n    const EIGTYPE* _rhs, Index rhsStride, \\\n    EIGTYPE* res,        Index resIncr, Index resStride, \\\n    EIGTYPE alpha, level3_blocking<EIGTYPE, EIGTYPE>& /*blocking*/) \\\n  { \\\n    EIGEN_ONLY_USED_FOR_DEBUG(resIncr); \\\n    eigen_assert(resIncr == 1); \\\n    char side='R', uplo='L'; \\\n    BlasIndex m, n, lda, ldb, ldc; \\\n    const EIGTYPE *a, *b; \\\n    EIGTYPE beta(1); \\\n    MatrixX##EIGPREFIX b_tmp; \\\n    Matrix<EIGTYPE, Dynamic, Dynamic, RhsStorageOrder> a_tmp; \\\n\\\n/* Set m, n, k */ \\\n    m = convert_index<BlasIndex>(rows); \\\n    n = convert_index<BlasIndex>(cols); \\\n\\\n/* Set lda, ldb, ldc */ \\\n    lda = convert_index<BlasIndex>(rhsStride); \\\n    ldb = convert_index<BlasIndex>(lhsStride); \\\n    ldc = convert_index<BlasIndex>(resStride); \\\n\\\n/* Set a, b, c */ \\\n    if (((RhsStorageOrder==ColMajor) && ConjugateRhs) || ((RhsStorageOrder==RowMajor) && (!ConjugateRhs))) { \\\n      Map<const Matrix<EIGTYPE, Dynamic, Dynamic, RhsStorageOrder>, 0, OuterStride<> > rhs(_rhs,n,n,OuterStride<>(rhsStride)); \\\n      a_tmp = rhs.conjugate(); \\\n      a = a_tmp.data(); \\\n      lda = convert_index<BlasIndex>(a_tmp.outerStride()); \\\n    } else a = _rhs; \\\n    if (RhsStorageOrder==RowMajor) uplo='U'; \\\n\\\n    if (LhsStorageOrder==ColMajor && (!ConjugateLhs)) { \\\n       b = _lhs; } \\\n    else { \\\n      if (LhsStorageOrder==ColMajor && ConjugateLhs) { \\\n        Map<const MatrixX##EIGPREFIX, 0, OuterStride<> > lhs(_lhs,m,n,OuterStride<>(lhsStride)); \\\n        b_tmp = lhs.conjugate(); \\\n      } else \\\n      if (ConjugateLhs) { \\\n        Map<const MatrixX##EIGPREFIX, 0, OuterStride<> > lhs(_lhs,n,m,OuterStride<>(lhsStride)); \\\n        b_tmp = lhs.adjoint(); \\\n      } else { \\\n        Map<const MatrixX##EIGPREFIX, 0, OuterStride<> > lhs(_lhs,n,m,OuterStride<>(lhsStride)); \\\n        b_tmp = lhs.transpose(); \\\n      } \\\n      b = b_tmp.data(); \\\n      ldb = convert_index<BlasIndex>(b_tmp.outerStride()); \\\n    } \\\n\\\n    BLASFUNC(&side, &uplo, &m, &n, (const BLASTYPE*)&numext::real_ref(alpha), (const BLASTYPE*)a, &lda, (const BLASTYPE*)b, &ldb, (const BLASTYPE*)&numext::real_ref(beta), (BLASTYPE*)res, &ldc); \\\n  } \\\n};\n\n#ifdef EIGEN_USE_MKL\nEIGEN_BLAS_SYMM_R(double, double, d, dsymm)\nEIGEN_BLAS_SYMM_R(float, float, f, ssymm)\nEIGEN_BLAS_HEMM_R(dcomplex, MKL_Complex16, cd, zhemm)\nEIGEN_BLAS_HEMM_R(scomplex, MKL_Complex8, cf, chemm)\n#else\nEIGEN_BLAS_SYMM_R(double, double, d, dsymm_)\nEIGEN_BLAS_SYMM_R(float, float, f, ssymm_)\nEIGEN_BLAS_HEMM_R(dcomplex, double, cd, zhemm_)\nEIGEN_BLAS_HEMM_R(scomplex, float, cf, chemm_)\n#endif\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_SELFADJOINT_MATRIX_MATRIX_BLAS_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/products/SelfadjointMatrixVector.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SELFADJOINT_MATRIX_VECTOR_H\n#define EIGEN_SELFADJOINT_MATRIX_VECTOR_H\n\nnamespace Eigen { \n\nnamespace internal {\n\n/* Optimized selfadjoint matrix * vector product:\n * This algorithm processes 2 columns at once that allows to both reduce\n * the number of load/stores of the result by a factor 2 and to reduce\n * the instruction dependency.\n */\n\ntemplate<typename Scalar, typename Index, int StorageOrder, int UpLo, bool ConjugateLhs, bool ConjugateRhs, int Version=Specialized>\nstruct selfadjoint_matrix_vector_product;\n\ntemplate<typename Scalar, typename Index, int StorageOrder, int UpLo, bool ConjugateLhs, bool ConjugateRhs, int Version>\nstruct selfadjoint_matrix_vector_product\n\n{\nstatic EIGEN_DONT_INLINE EIGEN_DEVICE_FUNC\nvoid run(\n  Index size,\n  const Scalar*  lhs, Index lhsStride,\n  const Scalar*  rhs,\n  Scalar* res,\n  Scalar alpha);\n};\n\ntemplate<typename Scalar, typename Index, int StorageOrder, int UpLo, bool ConjugateLhs, bool ConjugateRhs, int Version>\nEIGEN_DONT_INLINE EIGEN_DEVICE_FUNC\nvoid selfadjoint_matrix_vector_product<Scalar,Index,StorageOrder,UpLo,ConjugateLhs,ConjugateRhs,Version>::run(\n  Index size,\n  const Scalar*  lhs, Index lhsStride,\n  const Scalar*  rhs,\n  Scalar* res,\n  Scalar alpha)\n{\n  typedef typename packet_traits<Scalar>::type Packet;\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  const Index PacketSize = sizeof(Packet)/sizeof(Scalar);\n\n  enum {\n    IsRowMajor = StorageOrder==RowMajor ? 1 : 0,\n    IsLower = UpLo == Lower ? 1 : 0,\n    FirstTriangular = IsRowMajor == IsLower\n  };\n\n  conj_helper<Scalar,Scalar,NumTraits<Scalar>::IsComplex && EIGEN_LOGICAL_XOR(ConjugateLhs,  IsRowMajor), ConjugateRhs> cj0;\n  conj_helper<Scalar,Scalar,NumTraits<Scalar>::IsComplex && EIGEN_LOGICAL_XOR(ConjugateLhs, !IsRowMajor), ConjugateRhs> cj1;\n  conj_helper<RealScalar,Scalar,false, ConjugateRhs> cjd;\n\n  conj_helper<Packet,Packet,NumTraits<Scalar>::IsComplex && EIGEN_LOGICAL_XOR(ConjugateLhs,  IsRowMajor), ConjugateRhs> pcj0;\n  conj_helper<Packet,Packet,NumTraits<Scalar>::IsComplex && EIGEN_LOGICAL_XOR(ConjugateLhs, !IsRowMajor), ConjugateRhs> pcj1;\n\n  Scalar cjAlpha = ConjugateRhs ? numext::conj(alpha) : alpha;\n\n  Index bound = numext::maxi(Index(0), size-8) & 0xfffffffe;\n  if (FirstTriangular)\n    bound = size - bound;\n\n  for (Index j=FirstTriangular ? bound : 0;\n       j<(FirstTriangular ? size : bound);j+=2)\n  {\n    const Scalar* EIGEN_RESTRICT A0 = lhs + j*lhsStride;\n    const Scalar* EIGEN_RESTRICT A1 = lhs + (j+1)*lhsStride;\n\n    Scalar t0 = cjAlpha * rhs[j];\n    Packet ptmp0 = pset1<Packet>(t0);\n    Scalar t1 = cjAlpha * rhs[j+1];\n    Packet ptmp1 = pset1<Packet>(t1);\n\n    Scalar t2(0);\n    Packet ptmp2 = pset1<Packet>(t2);\n    Scalar t3(0);\n    Packet ptmp3 = pset1<Packet>(t3);\n\n    Index starti = FirstTriangular ? 0 : j+2;\n    Index endi   = FirstTriangular ? j : size;\n    Index alignedStart = (starti) + internal::first_default_aligned(&res[starti], endi-starti);\n    Index alignedEnd = alignedStart + ((endi-alignedStart)/(PacketSize))*(PacketSize);\n\n    res[j]   += cjd.pmul(numext::real(A0[j]), t0);\n    res[j+1] += cjd.pmul(numext::real(A1[j+1]), t1);\n    if(FirstTriangular)\n    {\n      res[j]   += cj0.pmul(A1[j],   t1);\n      t3       += cj1.pmul(A1[j],   rhs[j]);\n    }\n    else\n    {\n      res[j+1] += cj0.pmul(A0[j+1],t0);\n      t2 += cj1.pmul(A0[j+1], rhs[j+1]);\n    }\n\n    for (Index i=starti; i<alignedStart; ++i)\n    {\n      res[i] += cj0.pmul(A0[i], t0) + cj0.pmul(A1[i],t1);\n      t2 += cj1.pmul(A0[i], rhs[i]);\n      t3 += cj1.pmul(A1[i], rhs[i]);\n    }\n    // Yes this an optimization for gcc 4.3 and 4.4 (=> huge speed up)\n    // gcc 4.2 does this optimization automatically.\n    const Scalar* EIGEN_RESTRICT a0It  = A0  + alignedStart;\n    const Scalar* EIGEN_RESTRICT a1It  = A1  + alignedStart;\n    const Scalar* EIGEN_RESTRICT rhsIt = rhs + alignedStart;\n          Scalar* EIGEN_RESTRICT resIt = res + alignedStart;\n    for (Index i=alignedStart; i<alignedEnd; i+=PacketSize)\n    {\n      Packet A0i = ploadu<Packet>(a0It);  a0It  += PacketSize;\n      Packet A1i = ploadu<Packet>(a1It);  a1It  += PacketSize;\n      Packet Bi  = ploadu<Packet>(rhsIt); rhsIt += PacketSize; // FIXME should be aligned in most cases\n      Packet Xi  = pload <Packet>(resIt);\n\n      Xi    = pcj0.pmadd(A0i,ptmp0, pcj0.pmadd(A1i,ptmp1,Xi));\n      ptmp2 = pcj1.pmadd(A0i,  Bi, ptmp2);\n      ptmp3 = pcj1.pmadd(A1i,  Bi, ptmp3);\n      pstore(resIt,Xi); resIt += PacketSize;\n    }\n    for (Index i=alignedEnd; i<endi; i++)\n    {\n      res[i] += cj0.pmul(A0[i], t0) + cj0.pmul(A1[i],t1);\n      t2 += cj1.pmul(A0[i], rhs[i]);\n      t3 += cj1.pmul(A1[i], rhs[i]);\n    }\n\n    res[j]   += alpha * (t2 + predux(ptmp2));\n    res[j+1] += alpha * (t3 + predux(ptmp3));\n  }\n  for (Index j=FirstTriangular ? 0 : bound;j<(FirstTriangular ? bound : size);j++)\n  {\n    const Scalar* EIGEN_RESTRICT A0 = lhs + j*lhsStride;\n\n    Scalar t1 = cjAlpha * rhs[j];\n    Scalar t2(0);\n    res[j] += cjd.pmul(numext::real(A0[j]), t1);\n    for (Index i=FirstTriangular ? 0 : j+1; i<(FirstTriangular ? j : size); i++)\n    {\n      res[i] += cj0.pmul(A0[i], t1);\n      t2 += cj1.pmul(A0[i], rhs[i]);\n    }\n    res[j] += alpha * t2;\n  }\n}\n\n} // end namespace internal \n\n/***************************************************************************\n* Wrapper to product_selfadjoint_vector\n***************************************************************************/\n\nnamespace internal {\n\ntemplate<typename Lhs, int LhsMode, typename Rhs>\nstruct selfadjoint_product_impl<Lhs,LhsMode,false,Rhs,0,true>\n{\n  typedef typename Product<Lhs,Rhs>::Scalar Scalar;\n  \n  typedef internal::blas_traits<Lhs> LhsBlasTraits;\n  typedef typename LhsBlasTraits::DirectLinearAccessType ActualLhsType;\n  typedef typename internal::remove_all<ActualLhsType>::type ActualLhsTypeCleaned;\n  \n  typedef internal::blas_traits<Rhs> RhsBlasTraits;\n  typedef typename RhsBlasTraits::DirectLinearAccessType ActualRhsType;\n  typedef typename internal::remove_all<ActualRhsType>::type ActualRhsTypeCleaned;\n\n  enum { LhsUpLo = LhsMode&(Upper|Lower) };\n\n  template<typename Dest>\n  static EIGEN_DEVICE_FUNC\n  void run(Dest& dest, const Lhs &a_lhs, const Rhs &a_rhs, const Scalar& alpha)\n  {\n    typedef typename Dest::Scalar ResScalar;\n    typedef typename Rhs::Scalar RhsScalar;\n    typedef Map<Matrix<ResScalar,Dynamic,1>, EIGEN_PLAIN_ENUM_MIN(AlignedMax,internal::packet_traits<ResScalar>::size)> MappedDest;\n    \n    eigen_assert(dest.rows()==a_lhs.rows() && dest.cols()==a_rhs.cols());\n\n    typename internal::add_const_on_value_type<ActualLhsType>::type lhs = LhsBlasTraits::extract(a_lhs);\n    typename internal::add_const_on_value_type<ActualRhsType>::type rhs = RhsBlasTraits::extract(a_rhs);\n\n    Scalar actualAlpha = alpha * LhsBlasTraits::extractScalarFactor(a_lhs)\n                               * RhsBlasTraits::extractScalarFactor(a_rhs);\n\n    enum {\n      EvalToDest = (Dest::InnerStrideAtCompileTime==1),\n      UseRhs = (ActualRhsTypeCleaned::InnerStrideAtCompileTime==1)\n    };\n    \n    internal::gemv_static_vector_if<ResScalar,Dest::SizeAtCompileTime,Dest::MaxSizeAtCompileTime,!EvalToDest> static_dest;\n    internal::gemv_static_vector_if<RhsScalar,ActualRhsTypeCleaned::SizeAtCompileTime,ActualRhsTypeCleaned::MaxSizeAtCompileTime,!UseRhs> static_rhs;\n\n    ei_declare_aligned_stack_constructed_variable(ResScalar,actualDestPtr,dest.size(),\n                                                  EvalToDest ? dest.data() : static_dest.data());\n                                                  \n    ei_declare_aligned_stack_constructed_variable(RhsScalar,actualRhsPtr,rhs.size(),\n        UseRhs ? const_cast<RhsScalar*>(rhs.data()) : static_rhs.data());\n    \n    if(!EvalToDest)\n    {\n      #ifdef EIGEN_DENSE_STORAGE_CTOR_PLUGIN\n      Index size = dest.size();\n      EIGEN_DENSE_STORAGE_CTOR_PLUGIN\n      #endif\n      MappedDest(actualDestPtr, dest.size()) = dest;\n    }\n      \n    if(!UseRhs)\n    {\n      #ifdef EIGEN_DENSE_STORAGE_CTOR_PLUGIN\n      Index size = rhs.size();\n      EIGEN_DENSE_STORAGE_CTOR_PLUGIN\n      #endif\n      Map<typename ActualRhsTypeCleaned::PlainObject>(actualRhsPtr, rhs.size()) = rhs;\n    }\n      \n      \n    internal::selfadjoint_matrix_vector_product<Scalar, Index, (internal::traits<ActualLhsTypeCleaned>::Flags&RowMajorBit) ? RowMajor : ColMajor,\n                                                int(LhsUpLo), bool(LhsBlasTraits::NeedToConjugate), bool(RhsBlasTraits::NeedToConjugate)>::run\n      (\n        lhs.rows(),                             // size\n        &lhs.coeffRef(0,0),  lhs.outerStride(), // lhs info\n        actualRhsPtr,                           // rhs info\n        actualDestPtr,                          // result info\n        actualAlpha                             // scale factor\n      );\n    \n    if(!EvalToDest)\n      dest = MappedDest(actualDestPtr, dest.size());\n  }\n};\n\ntemplate<typename Lhs, typename Rhs, int RhsMode>\nstruct selfadjoint_product_impl<Lhs,0,true,Rhs,RhsMode,false>\n{\n  typedef typename Product<Lhs,Rhs>::Scalar Scalar;\n  enum { RhsUpLo = RhsMode&(Upper|Lower)  };\n\n  template<typename Dest>\n  static void run(Dest& dest, const Lhs &a_lhs, const Rhs &a_rhs, const Scalar& alpha)\n  {\n    // let's simply transpose the product\n    Transpose<Dest> destT(dest);\n    selfadjoint_product_impl<Transpose<const Rhs>, int(RhsUpLo)==Upper ? Lower : Upper, false,\n                             Transpose<const Lhs>, 0, true>::run(destT, a_rhs.transpose(), a_lhs.transpose(), alpha);\n  }\n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_SELFADJOINT_MATRIX_VECTOR_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/products/SelfadjointMatrixVector_BLAS.h",
    "content": "/*\n Copyright (c) 2011, Intel Corporation. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without modification,\n are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n   list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n * Neither the name of Intel Corporation nor the names of its contributors may\n   be used to endorse or promote products derived from this software without\n   specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\n ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n ********************************************************************************\n *   Content : Eigen bindings to BLAS F77\n *   Selfadjoint matrix-vector product functionality based on ?SYMV/HEMV.\n ********************************************************************************\n*/\n\n#ifndef EIGEN_SELFADJOINT_MATRIX_VECTOR_BLAS_H\n#define EIGEN_SELFADJOINT_MATRIX_VECTOR_BLAS_H\n\nnamespace Eigen { \n\nnamespace internal {\n\n/**********************************************************************\n* This file implements selfadjoint matrix-vector multiplication using BLAS\n**********************************************************************/\n\n// symv/hemv specialization\n\ntemplate<typename Scalar, typename Index, int StorageOrder, int UpLo, bool ConjugateLhs, bool ConjugateRhs>\nstruct selfadjoint_matrix_vector_product_symv :\n  selfadjoint_matrix_vector_product<Scalar,Index,StorageOrder,UpLo,ConjugateLhs,ConjugateRhs,BuiltIn> {};\n\n#define EIGEN_BLAS_SYMV_SPECIALIZE(Scalar) \\\ntemplate<typename Index, int StorageOrder, int UpLo, bool ConjugateLhs, bool ConjugateRhs> \\\nstruct selfadjoint_matrix_vector_product<Scalar,Index,StorageOrder,UpLo,ConjugateLhs,ConjugateRhs,Specialized> { \\\nstatic void run( \\\n  Index size, const Scalar*  lhs, Index lhsStride, \\\n  const Scalar* _rhs, Scalar* res, Scalar alpha) { \\\n    enum {\\\n      IsColMajor = StorageOrder==ColMajor \\\n    }; \\\n    if (IsColMajor == ConjugateLhs) {\\\n      selfadjoint_matrix_vector_product<Scalar,Index,StorageOrder,UpLo,ConjugateLhs,ConjugateRhs,BuiltIn>::run( \\\n        size, lhs, lhsStride, _rhs, res, alpha);  \\\n    } else {\\\n      selfadjoint_matrix_vector_product_symv<Scalar,Index,StorageOrder,UpLo,ConjugateLhs,ConjugateRhs>::run( \\\n        size, lhs, lhsStride, _rhs, res, alpha);  \\\n    }\\\n  } \\\n}; \\\n\nEIGEN_BLAS_SYMV_SPECIALIZE(double)\nEIGEN_BLAS_SYMV_SPECIALIZE(float)\nEIGEN_BLAS_SYMV_SPECIALIZE(dcomplex)\nEIGEN_BLAS_SYMV_SPECIALIZE(scomplex)\n\n#define EIGEN_BLAS_SYMV_SPECIALIZATION(EIGTYPE,BLASTYPE,BLASFUNC) \\\ntemplate<typename Index, int StorageOrder, int UpLo, bool ConjugateLhs, bool ConjugateRhs> \\\nstruct selfadjoint_matrix_vector_product_symv<EIGTYPE,Index,StorageOrder,UpLo,ConjugateLhs,ConjugateRhs> \\\n{ \\\ntypedef Matrix<EIGTYPE,Dynamic,1,ColMajor> SYMVVector;\\\n\\\nstatic void run( \\\nIndex size, const EIGTYPE*  lhs, Index lhsStride, \\\nconst EIGTYPE* _rhs, EIGTYPE* res, EIGTYPE alpha) \\\n{ \\\n  enum {\\\n    IsRowMajor = StorageOrder==RowMajor ? 1 : 0, \\\n    IsLower = UpLo == Lower ? 1 : 0 \\\n  }; \\\n  BlasIndex n=convert_index<BlasIndex>(size), lda=convert_index<BlasIndex>(lhsStride), incx=1, incy=1; \\\n  EIGTYPE beta(1); \\\n  const EIGTYPE *x_ptr; \\\n  char uplo=(IsRowMajor) ? (IsLower ? 'U' : 'L') : (IsLower ? 'L' : 'U'); \\\n  SYMVVector x_tmp; \\\n  if (ConjugateRhs) { \\\n    Map<const SYMVVector, 0 > map_x(_rhs,size,1); \\\n    x_tmp=map_x.conjugate(); \\\n    x_ptr=x_tmp.data(); \\\n  } else x_ptr=_rhs; \\\n  BLASFUNC(&uplo, &n, (const BLASTYPE*)&numext::real_ref(alpha), (const BLASTYPE*)lhs, &lda, (const BLASTYPE*)x_ptr, &incx, (const BLASTYPE*)&numext::real_ref(beta), (BLASTYPE*)res, &incy); \\\n}\\\n};\n\n#ifdef EIGEN_USE_MKL\nEIGEN_BLAS_SYMV_SPECIALIZATION(double,   double, dsymv)\nEIGEN_BLAS_SYMV_SPECIALIZATION(float,    float,  ssymv)\nEIGEN_BLAS_SYMV_SPECIALIZATION(dcomplex, MKL_Complex16, zhemv)\nEIGEN_BLAS_SYMV_SPECIALIZATION(scomplex, MKL_Complex8,  chemv)\n#else\nEIGEN_BLAS_SYMV_SPECIALIZATION(double,   double, dsymv_)\nEIGEN_BLAS_SYMV_SPECIALIZATION(float,    float,  ssymv_)\nEIGEN_BLAS_SYMV_SPECIALIZATION(dcomplex, double, zhemv_)\nEIGEN_BLAS_SYMV_SPECIALIZATION(scomplex, float,  chemv_)\n#endif\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_SELFADJOINT_MATRIX_VECTOR_BLAS_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/products/SelfadjointProduct.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SELFADJOINT_PRODUCT_H\n#define EIGEN_SELFADJOINT_PRODUCT_H\n\n/**********************************************************************\n* This file implements a self adjoint product: C += A A^T updating only\n* half of the selfadjoint matrix C.\n* It corresponds to the level 3 SYRK and level 2 SYR Blas routines.\n**********************************************************************/\n\nnamespace Eigen { \n\n\ntemplate<typename Scalar, typename Index, int UpLo, bool ConjLhs, bool ConjRhs>\nstruct selfadjoint_rank1_update<Scalar,Index,ColMajor,UpLo,ConjLhs,ConjRhs>\n{\n  static void run(Index size, Scalar* mat, Index stride, const Scalar* vecX, const Scalar* vecY, const Scalar& alpha)\n  {\n    internal::conj_if<ConjRhs> cj;\n    typedef Map<const Matrix<Scalar,Dynamic,1> > OtherMap;\n    typedef typename internal::conditional<ConjLhs,typename OtherMap::ConjugateReturnType,const OtherMap&>::type ConjLhsType;\n    for (Index i=0; i<size; ++i)\n    {\n      Map<Matrix<Scalar,Dynamic,1> >(mat+stride*i+(UpLo==Lower ? i : 0), (UpLo==Lower ? size-i : (i+1)))\n          += (alpha * cj(vecY[i])) * ConjLhsType(OtherMap(vecX+(UpLo==Lower ? i : 0),UpLo==Lower ? size-i : (i+1)));\n    }\n  }\n};\n\ntemplate<typename Scalar, typename Index, int UpLo, bool ConjLhs, bool ConjRhs>\nstruct selfadjoint_rank1_update<Scalar,Index,RowMajor,UpLo,ConjLhs,ConjRhs>\n{\n  static void run(Index size, Scalar* mat, Index stride, const Scalar* vecX, const Scalar* vecY, const Scalar& alpha)\n  {\n    selfadjoint_rank1_update<Scalar,Index,ColMajor,UpLo==Lower?Upper:Lower,ConjRhs,ConjLhs>::run(size,mat,stride,vecY,vecX,alpha);\n  }\n};\n\ntemplate<typename MatrixType, typename OtherType, int UpLo, bool OtherIsVector = OtherType::IsVectorAtCompileTime>\nstruct selfadjoint_product_selector;\n\ntemplate<typename MatrixType, typename OtherType, int UpLo>\nstruct selfadjoint_product_selector<MatrixType,OtherType,UpLo,true>\n{\n  static void run(MatrixType& mat, const OtherType& other, const typename MatrixType::Scalar& alpha)\n  {\n    typedef typename MatrixType::Scalar Scalar;\n    typedef internal::blas_traits<OtherType> OtherBlasTraits;\n    typedef typename OtherBlasTraits::DirectLinearAccessType ActualOtherType;\n    typedef typename internal::remove_all<ActualOtherType>::type _ActualOtherType;\n    typename internal::add_const_on_value_type<ActualOtherType>::type actualOther = OtherBlasTraits::extract(other.derived());\n\n    Scalar actualAlpha = alpha * OtherBlasTraits::extractScalarFactor(other.derived());\n\n    enum {\n      StorageOrder = (internal::traits<MatrixType>::Flags&RowMajorBit) ? RowMajor : ColMajor,\n      UseOtherDirectly = _ActualOtherType::InnerStrideAtCompileTime==1\n    };\n    internal::gemv_static_vector_if<Scalar,OtherType::SizeAtCompileTime,OtherType::MaxSizeAtCompileTime,!UseOtherDirectly> static_other;\n\n    ei_declare_aligned_stack_constructed_variable(Scalar, actualOtherPtr, other.size(),\n      (UseOtherDirectly ? const_cast<Scalar*>(actualOther.data()) : static_other.data()));\n      \n    if(!UseOtherDirectly)\n      Map<typename _ActualOtherType::PlainObject>(actualOtherPtr, actualOther.size()) = actualOther;\n    \n    selfadjoint_rank1_update<Scalar,Index,StorageOrder,UpLo,\n                              OtherBlasTraits::NeedToConjugate  && NumTraits<Scalar>::IsComplex,\n                            (!OtherBlasTraits::NeedToConjugate) && NumTraits<Scalar>::IsComplex>\n          ::run(other.size(), mat.data(), mat.outerStride(), actualOtherPtr, actualOtherPtr, actualAlpha);\n  }\n};\n\ntemplate<typename MatrixType, typename OtherType, int UpLo>\nstruct selfadjoint_product_selector<MatrixType,OtherType,UpLo,false>\n{\n  static void run(MatrixType& mat, const OtherType& other, const typename MatrixType::Scalar& alpha)\n  {\n    typedef typename MatrixType::Scalar Scalar;\n    typedef internal::blas_traits<OtherType> OtherBlasTraits;\n    typedef typename OtherBlasTraits::DirectLinearAccessType ActualOtherType;\n    typedef typename internal::remove_all<ActualOtherType>::type _ActualOtherType;\n    typename internal::add_const_on_value_type<ActualOtherType>::type actualOther = OtherBlasTraits::extract(other.derived());\n\n    Scalar actualAlpha = alpha * OtherBlasTraits::extractScalarFactor(other.derived());\n\n    enum {\n      IsRowMajor = (internal::traits<MatrixType>::Flags&RowMajorBit) ? 1 : 0,\n      OtherIsRowMajor = _ActualOtherType::Flags&RowMajorBit ? 1 : 0\n    };\n\n    Index size = mat.cols();\n    Index depth = actualOther.cols();\n\n    typedef internal::gemm_blocking_space<IsRowMajor ? RowMajor : ColMajor,Scalar,Scalar,\n              MatrixType::MaxColsAtCompileTime, MatrixType::MaxColsAtCompileTime, _ActualOtherType::MaxColsAtCompileTime> BlockingType;\n\n    BlockingType blocking(size, size, depth, 1, false);\n\n\n    internal::general_matrix_matrix_triangular_product<Index,\n      Scalar, OtherIsRowMajor ? RowMajor : ColMajor,   OtherBlasTraits::NeedToConjugate  && NumTraits<Scalar>::IsComplex,\n      Scalar, OtherIsRowMajor ? ColMajor : RowMajor, (!OtherBlasTraits::NeedToConjugate) && NumTraits<Scalar>::IsComplex,\n      IsRowMajor ? RowMajor : ColMajor, MatrixType::InnerStrideAtCompileTime, UpLo>\n      ::run(size, depth,\n            &actualOther.coeffRef(0,0), actualOther.outerStride(), &actualOther.coeffRef(0,0), actualOther.outerStride(),\n            mat.data(), mat.innerStride(), mat.outerStride(), actualAlpha, blocking);\n  }\n};\n\n// high level API\n\ntemplate<typename MatrixType, unsigned int UpLo>\ntemplate<typename DerivedU>\nEIGEN_DEVICE_FUNC SelfAdjointView<MatrixType,UpLo>& SelfAdjointView<MatrixType,UpLo>\n::rankUpdate(const MatrixBase<DerivedU>& u, const Scalar& alpha)\n{\n  selfadjoint_product_selector<MatrixType,DerivedU,UpLo>::run(_expression().const_cast_derived(), u.derived(), alpha);\n\n  return *this;\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_SELFADJOINT_PRODUCT_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/products/SelfadjointRank2Update.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SELFADJOINTRANK2UPTADE_H\n#define EIGEN_SELFADJOINTRANK2UPTADE_H\n\nnamespace Eigen { \n\nnamespace internal {\n\n/* Optimized selfadjoint matrix += alpha * uv' + conj(alpha)*vu'\n * It corresponds to the Level2 syr2 BLAS routine\n */\n\ntemplate<typename Scalar, typename Index, typename UType, typename VType, int UpLo>\nstruct selfadjoint_rank2_update_selector;\n\ntemplate<typename Scalar, typename Index, typename UType, typename VType>\nstruct selfadjoint_rank2_update_selector<Scalar,Index,UType,VType,Lower>\n{\n  static EIGEN_DEVICE_FUNC\n  void run(Scalar* mat, Index stride, const UType& u, const VType& v, const Scalar& alpha)\n  {\n    const Index size = u.size();\n    for (Index i=0; i<size; ++i)\n    {\n      Map<Matrix<Scalar,Dynamic,1> >(mat+stride*i+i, size-i) +=\n                        (numext::conj(alpha) * numext::conj(u.coeff(i))) * v.tail(size-i)\n                      + (alpha * numext::conj(v.coeff(i))) * u.tail(size-i);\n    }\n  }\n};\n\ntemplate<typename Scalar, typename Index, typename UType, typename VType>\nstruct selfadjoint_rank2_update_selector<Scalar,Index,UType,VType,Upper>\n{\n  static void run(Scalar* mat, Index stride, const UType& u, const VType& v, const Scalar& alpha)\n  {\n    const Index size = u.size();\n    for (Index i=0; i<size; ++i)\n      Map<Matrix<Scalar,Dynamic,1> >(mat+stride*i, i+1) +=\n                        (numext::conj(alpha)  * numext::conj(u.coeff(i))) * v.head(i+1)\n                      + (alpha * numext::conj(v.coeff(i))) * u.head(i+1);\n  }\n};\n\ntemplate<bool Cond, typename T> struct conj_expr_if\n  : conditional<!Cond, const T&,\n      CwiseUnaryOp<scalar_conjugate_op<typename traits<T>::Scalar>,T> > {};\n\n} // end namespace internal\n\ntemplate<typename MatrixType, unsigned int UpLo>\ntemplate<typename DerivedU, typename DerivedV>\nEIGEN_DEVICE_FUNC SelfAdjointView<MatrixType,UpLo>& SelfAdjointView<MatrixType,UpLo>\n::rankUpdate(const MatrixBase<DerivedU>& u, const MatrixBase<DerivedV>& v, const Scalar& alpha)\n{\n  typedef internal::blas_traits<DerivedU> UBlasTraits;\n  typedef typename UBlasTraits::DirectLinearAccessType ActualUType;\n  typedef typename internal::remove_all<ActualUType>::type _ActualUType;\n  typename internal::add_const_on_value_type<ActualUType>::type actualU = UBlasTraits::extract(u.derived());\n\n  typedef internal::blas_traits<DerivedV> VBlasTraits;\n  typedef typename VBlasTraits::DirectLinearAccessType ActualVType;\n  typedef typename internal::remove_all<ActualVType>::type _ActualVType;\n  typename internal::add_const_on_value_type<ActualVType>::type actualV = VBlasTraits::extract(v.derived());\n\n  // If MatrixType is row major, then we use the routine for lower triangular in the upper triangular case and\n  // vice versa, and take the complex conjugate of all coefficients and vector entries.\n\n  enum { IsRowMajor = (internal::traits<MatrixType>::Flags&RowMajorBit) ? 1 : 0 };\n  Scalar actualAlpha = alpha * UBlasTraits::extractScalarFactor(u.derived())\n                             * numext::conj(VBlasTraits::extractScalarFactor(v.derived()));\n  if (IsRowMajor)\n    actualAlpha = numext::conj(actualAlpha);\n\n  typedef typename internal::remove_all<typename internal::conj_expr_if<IsRowMajor ^ UBlasTraits::NeedToConjugate,_ActualUType>::type>::type UType;\n  typedef typename internal::remove_all<typename internal::conj_expr_if<IsRowMajor ^ VBlasTraits::NeedToConjugate,_ActualVType>::type>::type VType;\n  internal::selfadjoint_rank2_update_selector<Scalar, Index, UType, VType,\n    (IsRowMajor ? int(UpLo==Upper ? Lower : Upper) : UpLo)>\n    ::run(_expression().const_cast_derived().data(),_expression().outerStride(),UType(actualU),VType(actualV),actualAlpha);\n\n  return *this;\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_SELFADJOINTRANK2UPTADE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/products/TriangularMatrixMatrix.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_TRIANGULAR_MATRIX_MATRIX_H\n#define EIGEN_TRIANGULAR_MATRIX_MATRIX_H\n\nnamespace Eigen { \n\nnamespace internal {\n\n// template<typename Scalar, int mr, int StorageOrder, bool Conjugate, int Mode>\n// struct gemm_pack_lhs_triangular\n// {\n//   Matrix<Scalar,mr,mr,\n//   void operator()(Scalar* blockA, const EIGEN_RESTRICT Scalar* _lhs, int lhsStride, int depth, int rows)\n//   {\n//     conj_if<NumTraits<Scalar>::IsComplex && Conjugate> cj;\n//     const_blas_data_mapper<Scalar, StorageOrder> lhs(_lhs,lhsStride);\n//     int count = 0;\n//     const int peeled_mc = (rows/mr)*mr;\n//     for(int i=0; i<peeled_mc; i+=mr)\n//     {\n//       for(int k=0; k<depth; k++)\n//         for(int w=0; w<mr; w++)\n//           blockA[count++] = cj(lhs(i+w, k));\n//     }\n//     for(int i=peeled_mc; i<rows; i++)\n//     {\n//       for(int k=0; k<depth; k++)\n//         blockA[count++] = cj(lhs(i, k));\n//     }\n//   }\n// };\n\n/* Optimized triangular matrix * matrix (_TRMM++) product built on top of\n * the general matrix matrix product.\n */\ntemplate <typename Scalar, typename Index,\n          int Mode, bool LhsIsTriangular,\n          int LhsStorageOrder, bool ConjugateLhs,\n          int RhsStorageOrder, bool ConjugateRhs,\n          int ResStorageOrder, int ResInnerStride,\n          int Version = Specialized>\nstruct product_triangular_matrix_matrix;\n\ntemplate <typename Scalar, typename Index,\n          int Mode, bool LhsIsTriangular,\n          int LhsStorageOrder, bool ConjugateLhs,\n          int RhsStorageOrder, bool ConjugateRhs,\n          int ResInnerStride, int Version>\nstruct product_triangular_matrix_matrix<Scalar,Index,Mode,LhsIsTriangular,\n                                           LhsStorageOrder,ConjugateLhs,\n                                           RhsStorageOrder,ConjugateRhs,RowMajor,ResInnerStride,Version>\n{\n  static EIGEN_STRONG_INLINE void run(\n    Index rows, Index cols, Index depth,\n    const Scalar* lhs, Index lhsStride,\n    const Scalar* rhs, Index rhsStride,\n    Scalar* res,       Index resIncr, Index resStride,\n    const Scalar& alpha, level3_blocking<Scalar,Scalar>& blocking)\n  {\n    product_triangular_matrix_matrix<Scalar, Index,\n      (Mode&(UnitDiag|ZeroDiag)) | ((Mode&Upper) ? Lower : Upper),\n      (!LhsIsTriangular),\n      RhsStorageOrder==RowMajor ? ColMajor : RowMajor,\n      ConjugateRhs,\n      LhsStorageOrder==RowMajor ? ColMajor : RowMajor,\n      ConjugateLhs,\n      ColMajor, ResInnerStride>\n      ::run(cols, rows, depth, rhs, rhsStride, lhs, lhsStride, res, resIncr, resStride, alpha, blocking);\n  }\n};\n\n// implements col-major += alpha * op(triangular) * op(general)\ntemplate <typename Scalar, typename Index, int Mode,\n          int LhsStorageOrder, bool ConjugateLhs,\n          int RhsStorageOrder, bool ConjugateRhs,\n          int ResInnerStride, int Version>\nstruct product_triangular_matrix_matrix<Scalar,Index,Mode,true,\n                                           LhsStorageOrder,ConjugateLhs,\n                                           RhsStorageOrder,ConjugateRhs,ColMajor,ResInnerStride,Version>\n{\n  \n  typedef gebp_traits<Scalar,Scalar> Traits;\n  enum {\n    SmallPanelWidth   = 2 * EIGEN_PLAIN_ENUM_MAX(Traits::mr,Traits::nr),\n    IsLower = (Mode&Lower) == Lower,\n    SetDiag = (Mode&(ZeroDiag|UnitDiag)) ? 0 : 1\n  };\n\n  static EIGEN_DONT_INLINE void run(\n    Index _rows, Index _cols, Index _depth,\n    const Scalar* _lhs, Index lhsStride,\n    const Scalar* _rhs, Index rhsStride,\n    Scalar* res,        Index resIncr, Index resStride,\n    const Scalar& alpha, level3_blocking<Scalar,Scalar>& blocking);\n};\n\ntemplate <typename Scalar, typename Index, int Mode,\n          int LhsStorageOrder, bool ConjugateLhs,\n          int RhsStorageOrder, bool ConjugateRhs,\n          int ResInnerStride, int Version>\nEIGEN_DONT_INLINE void product_triangular_matrix_matrix<Scalar,Index,Mode,true,\n                                                        LhsStorageOrder,ConjugateLhs,\n                                                        RhsStorageOrder,ConjugateRhs,ColMajor,ResInnerStride,Version>::run(\n    Index _rows, Index _cols, Index _depth,\n    const Scalar* _lhs, Index lhsStride,\n    const Scalar* _rhs, Index rhsStride,\n    Scalar* _res,       Index resIncr, Index resStride,\n    const Scalar& alpha, level3_blocking<Scalar,Scalar>& blocking)\n  {\n    // strip zeros\n    Index diagSize  = (std::min)(_rows,_depth);\n    Index rows      = IsLower ? _rows : diagSize;\n    Index depth     = IsLower ? diagSize : _depth;\n    Index cols      = _cols;\n    \n    typedef const_blas_data_mapper<Scalar, Index, LhsStorageOrder> LhsMapper;\n    typedef const_blas_data_mapper<Scalar, Index, RhsStorageOrder> RhsMapper;\n    typedef blas_data_mapper<typename Traits::ResScalar, Index, ColMajor, Unaligned, ResInnerStride> ResMapper;\n    LhsMapper lhs(_lhs,lhsStride);\n    RhsMapper rhs(_rhs,rhsStride);\n    ResMapper res(_res, resStride, resIncr);\n\n    Index kc = blocking.kc();                   // cache block size along the K direction\n    Index mc = (std::min)(rows,blocking.mc());  // cache block size along the M direction\n    // The small panel size must not be larger than blocking size.\n    // Usually this should never be the case because SmallPanelWidth^2 is very small\n    // compared to L2 cache size, but let's be safe:\n    Index panelWidth = (std::min)(Index(SmallPanelWidth),(std::min)(kc,mc));\n\n    std::size_t sizeA = kc*mc;\n    std::size_t sizeB = kc*cols;\n\n    ei_declare_aligned_stack_constructed_variable(Scalar, blockA, sizeA, blocking.blockA());\n    ei_declare_aligned_stack_constructed_variable(Scalar, blockB, sizeB, blocking.blockB());\n\n    // To work around an \"error: member reference base type 'Matrix<...>\n    // (Eigen::internal::constructor_without_unaligned_array_assert (*)())' is\n    // not a structure or union\" compilation error in nvcc (tested V8.0.61),\n    // create a dummy internal::constructor_without_unaligned_array_assert\n    // object to pass to the Matrix constructor.\n    internal::constructor_without_unaligned_array_assert a;\n    Matrix<Scalar,SmallPanelWidth,SmallPanelWidth,LhsStorageOrder> triangularBuffer(a);\n    triangularBuffer.setZero();\n    if((Mode&ZeroDiag)==ZeroDiag)\n      triangularBuffer.diagonal().setZero();\n    else\n      triangularBuffer.diagonal().setOnes();\n\n    gebp_kernel<Scalar, Scalar, Index, ResMapper, Traits::mr, Traits::nr, ConjugateLhs, ConjugateRhs> gebp_kernel;\n    gemm_pack_lhs<Scalar, Index, LhsMapper, Traits::mr, Traits::LhsProgress, typename Traits::LhsPacket4Packing, LhsStorageOrder> pack_lhs;\n    gemm_pack_rhs<Scalar, Index, RhsMapper, Traits::nr,RhsStorageOrder> pack_rhs;\n\n    for(Index k2=IsLower ? depth : 0;\n        IsLower ? k2>0 : k2<depth;\n        IsLower ? k2-=kc : k2+=kc)\n    {\n      Index actual_kc = (std::min)(IsLower ? k2 : depth-k2, kc);\n      Index actual_k2 = IsLower ? k2-actual_kc : k2;\n\n      // align blocks with the end of the triangular part for trapezoidal lhs\n      if((!IsLower)&&(k2<rows)&&(k2+actual_kc>rows))\n      {\n        actual_kc = rows-k2;\n        k2 = k2+actual_kc-kc;\n      }\n\n      pack_rhs(blockB, rhs.getSubMapper(actual_k2,0), actual_kc, cols);\n\n      // the selected lhs's panel has to be split in three different parts:\n      //  1 - the part which is zero => skip it\n      //  2 - the diagonal block => special kernel\n      //  3 - the dense panel below (lower case) or above (upper case) the diagonal block => GEPP\n\n      // the block diagonal, if any:\n      if(IsLower || actual_k2<rows)\n      {\n        // for each small vertical panels of lhs\n        for (Index k1=0; k1<actual_kc; k1+=panelWidth)\n        {\n          Index actualPanelWidth = std::min<Index>(actual_kc-k1, panelWidth);\n          Index lengthTarget = IsLower ? actual_kc-k1-actualPanelWidth : k1;\n          Index startBlock   = actual_k2+k1;\n          Index blockBOffset = k1;\n\n          // => GEBP with the micro triangular block\n          // The trick is to pack this micro block while filling the opposite triangular part with zeros.\n          // To this end we do an extra triangular copy to a small temporary buffer\n          for (Index k=0;k<actualPanelWidth;++k)\n          {\n            if (SetDiag)\n              triangularBuffer.coeffRef(k,k) = lhs(startBlock+k,startBlock+k);\n            for (Index i=IsLower ? k+1 : 0; IsLower ? i<actualPanelWidth : i<k; ++i)\n              triangularBuffer.coeffRef(i,k) = lhs(startBlock+i,startBlock+k);\n          }\n          pack_lhs(blockA, LhsMapper(triangularBuffer.data(), triangularBuffer.outerStride()), actualPanelWidth, actualPanelWidth);\n\n          gebp_kernel(res.getSubMapper(startBlock, 0), blockA, blockB,\n                      actualPanelWidth, actualPanelWidth, cols, alpha,\n                      actualPanelWidth, actual_kc, 0, blockBOffset);\n\n          // GEBP with remaining micro panel\n          if (lengthTarget>0)\n          {\n            Index startTarget  = IsLower ? actual_k2+k1+actualPanelWidth : actual_k2;\n\n            pack_lhs(blockA, lhs.getSubMapper(startTarget,startBlock), actualPanelWidth, lengthTarget);\n\n            gebp_kernel(res.getSubMapper(startTarget, 0), blockA, blockB,\n                        lengthTarget, actualPanelWidth, cols, alpha,\n                        actualPanelWidth, actual_kc, 0, blockBOffset);\n          }\n        }\n      }\n      // the part below (lower case) or above (upper case) the diagonal => GEPP\n      {\n        Index start = IsLower ? k2 : 0;\n        Index end   = IsLower ? rows : (std::min)(actual_k2,rows);\n        for(Index i2=start; i2<end; i2+=mc)\n        {\n          const Index actual_mc = (std::min)(i2+mc,end)-i2;\n          gemm_pack_lhs<Scalar, Index, LhsMapper, Traits::mr,Traits::LhsProgress, typename Traits::LhsPacket4Packing, LhsStorageOrder,false>()\n            (blockA, lhs.getSubMapper(i2, actual_k2), actual_kc, actual_mc);\n\n          gebp_kernel(res.getSubMapper(i2, 0), blockA, blockB, actual_mc,\n                      actual_kc, cols, alpha, -1, -1, 0, 0);\n        }\n      }\n    }\n  }\n\n// implements col-major += alpha * op(general) * op(triangular)\ntemplate <typename Scalar, typename Index, int Mode,\n          int LhsStorageOrder, bool ConjugateLhs,\n          int RhsStorageOrder, bool ConjugateRhs,\n          int ResInnerStride, int Version>\nstruct product_triangular_matrix_matrix<Scalar,Index,Mode,false,\n                                        LhsStorageOrder,ConjugateLhs,\n                                        RhsStorageOrder,ConjugateRhs,ColMajor,ResInnerStride,Version>\n{\n  typedef gebp_traits<Scalar,Scalar> Traits;\n  enum {\n    SmallPanelWidth   = EIGEN_PLAIN_ENUM_MAX(Traits::mr,Traits::nr),\n    IsLower = (Mode&Lower) == Lower,\n    SetDiag = (Mode&(ZeroDiag|UnitDiag)) ? 0 : 1\n  };\n\n  static EIGEN_DONT_INLINE void run(\n    Index _rows, Index _cols, Index _depth,\n    const Scalar* _lhs, Index lhsStride,\n    const Scalar* _rhs, Index rhsStride,\n    Scalar* res,        Index resIncr, Index resStride,\n    const Scalar& alpha, level3_blocking<Scalar,Scalar>& blocking);\n};\n\ntemplate <typename Scalar, typename Index, int Mode,\n          int LhsStorageOrder, bool ConjugateLhs,\n          int RhsStorageOrder, bool ConjugateRhs,\n          int ResInnerStride, int Version>\nEIGEN_DONT_INLINE void product_triangular_matrix_matrix<Scalar,Index,Mode,false,\n                                                        LhsStorageOrder,ConjugateLhs,\n                                                        RhsStorageOrder,ConjugateRhs,ColMajor,ResInnerStride,Version>::run(\n    Index _rows, Index _cols, Index _depth,\n    const Scalar* _lhs, Index lhsStride,\n    const Scalar* _rhs, Index rhsStride,\n    Scalar* _res,       Index resIncr, Index resStride,\n    const Scalar& alpha, level3_blocking<Scalar,Scalar>& blocking)\n  {\n    const Index PacketBytes = packet_traits<Scalar>::size*sizeof(Scalar);\n    // strip zeros\n    Index diagSize  = (std::min)(_cols,_depth);\n    Index rows      = _rows;\n    Index depth     = IsLower ? _depth : diagSize;\n    Index cols      = IsLower ? diagSize : _cols;\n    \n    typedef const_blas_data_mapper<Scalar, Index, LhsStorageOrder> LhsMapper;\n    typedef const_blas_data_mapper<Scalar, Index, RhsStorageOrder> RhsMapper;\n    typedef blas_data_mapper<typename Traits::ResScalar, Index, ColMajor, Unaligned, ResInnerStride> ResMapper;\n    LhsMapper lhs(_lhs,lhsStride);\n    RhsMapper rhs(_rhs,rhsStride);\n    ResMapper res(_res, resStride, resIncr);\n\n    Index kc = blocking.kc();                   // cache block size along the K direction\n    Index mc = (std::min)(rows,blocking.mc());  // cache block size along the M direction\n\n    std::size_t sizeA = kc*mc;\n    std::size_t sizeB = kc*cols+EIGEN_MAX_ALIGN_BYTES/sizeof(Scalar);\n\n    ei_declare_aligned_stack_constructed_variable(Scalar, blockA, sizeA, blocking.blockA());\n    ei_declare_aligned_stack_constructed_variable(Scalar, blockB, sizeB, blocking.blockB());\n\n    internal::constructor_without_unaligned_array_assert a;\n    Matrix<Scalar,SmallPanelWidth,SmallPanelWidth,RhsStorageOrder> triangularBuffer(a);\n    triangularBuffer.setZero();\n    if((Mode&ZeroDiag)==ZeroDiag)\n      triangularBuffer.diagonal().setZero();\n    else\n      triangularBuffer.diagonal().setOnes();\n\n    gebp_kernel<Scalar, Scalar, Index, ResMapper, Traits::mr, Traits::nr, ConjugateLhs, ConjugateRhs> gebp_kernel;\n    gemm_pack_lhs<Scalar, Index, LhsMapper, Traits::mr, Traits::LhsProgress, typename Traits::LhsPacket4Packing, LhsStorageOrder> pack_lhs;\n    gemm_pack_rhs<Scalar, Index, RhsMapper, Traits::nr,RhsStorageOrder> pack_rhs;\n    gemm_pack_rhs<Scalar, Index, RhsMapper, Traits::nr,RhsStorageOrder,false,true> pack_rhs_panel;\n\n    for(Index k2=IsLower ? 0 : depth;\n        IsLower ? k2<depth  : k2>0;\n        IsLower ? k2+=kc   : k2-=kc)\n    {\n      Index actual_kc = (std::min)(IsLower ? depth-k2 : k2, kc);\n      Index actual_k2 = IsLower ? k2 : k2-actual_kc;\n\n      // align blocks with the end of the triangular part for trapezoidal rhs\n      if(IsLower && (k2<cols) && (actual_k2+actual_kc>cols))\n      {\n        actual_kc = cols-k2;\n        k2 = actual_k2 + actual_kc - kc;\n      }\n\n      // remaining size\n      Index rs = IsLower ? (std::min)(cols,actual_k2) : cols - k2;\n      // size of the triangular part\n      Index ts = (IsLower && actual_k2>=cols) ? 0 : actual_kc;\n\n      Scalar* geb = blockB+ts*ts;\n      geb = geb + internal::first_aligned<PacketBytes>(geb,PacketBytes/sizeof(Scalar));\n\n      pack_rhs(geb, rhs.getSubMapper(actual_k2,IsLower ? 0 : k2), actual_kc, rs);\n\n      // pack the triangular part of the rhs padding the unrolled blocks with zeros\n      if(ts>0)\n      {\n        for (Index j2=0; j2<actual_kc; j2+=SmallPanelWidth)\n        {\n          Index actualPanelWidth = std::min<Index>(actual_kc-j2, SmallPanelWidth);\n          Index actual_j2 = actual_k2 + j2;\n          Index panelOffset = IsLower ? j2+actualPanelWidth : 0;\n          Index panelLength = IsLower ? actual_kc-j2-actualPanelWidth : j2;\n          // general part\n          pack_rhs_panel(blockB+j2*actual_kc,\n                         rhs.getSubMapper(actual_k2+panelOffset, actual_j2),\n                         panelLength, actualPanelWidth,\n                         actual_kc, panelOffset);\n\n          // append the triangular part via a temporary buffer\n          for (Index j=0;j<actualPanelWidth;++j)\n          {\n            if (SetDiag)\n              triangularBuffer.coeffRef(j,j) = rhs(actual_j2+j,actual_j2+j);\n            for (Index k=IsLower ? j+1 : 0; IsLower ? k<actualPanelWidth : k<j; ++k)\n              triangularBuffer.coeffRef(k,j) = rhs(actual_j2+k,actual_j2+j);\n          }\n\n          pack_rhs_panel(blockB+j2*actual_kc,\n                         RhsMapper(triangularBuffer.data(), triangularBuffer.outerStride()),\n                         actualPanelWidth, actualPanelWidth,\n                         actual_kc, j2);\n        }\n      }\n\n      for (Index i2=0; i2<rows; i2+=mc)\n      {\n        const Index actual_mc = (std::min)(mc,rows-i2);\n        pack_lhs(blockA, lhs.getSubMapper(i2, actual_k2), actual_kc, actual_mc);\n\n        // triangular kernel\n        if(ts>0)\n        {\n          for (Index j2=0; j2<actual_kc; j2+=SmallPanelWidth)\n          {\n            Index actualPanelWidth = std::min<Index>(actual_kc-j2, SmallPanelWidth);\n            Index panelLength = IsLower ? actual_kc-j2 : j2+actualPanelWidth;\n            Index blockOffset = IsLower ? j2 : 0;\n\n            gebp_kernel(res.getSubMapper(i2, actual_k2 + j2),\n                        blockA, blockB+j2*actual_kc,\n                        actual_mc, panelLength, actualPanelWidth,\n                        alpha,\n                        actual_kc, actual_kc,  // strides\n                        blockOffset, blockOffset);// offsets\n          }\n        }\n        gebp_kernel(res.getSubMapper(i2, IsLower ? 0 : k2),\n                    blockA, geb, actual_mc, actual_kc, rs,\n                    alpha,\n                    -1, -1, 0, 0);\n      }\n    }\n  }\n\n/***************************************************************************\n* Wrapper to product_triangular_matrix_matrix\n***************************************************************************/\n\n} // end namespace internal\n\nnamespace internal {\ntemplate<int Mode, bool LhsIsTriangular, typename Lhs, typename Rhs>\nstruct triangular_product_impl<Mode,LhsIsTriangular,Lhs,false,Rhs,false>\n{\n  template<typename Dest> static void run(Dest& dst, const Lhs &a_lhs, const Rhs &a_rhs, const typename Dest::Scalar& alpha)\n  {\n    typedef typename Lhs::Scalar  LhsScalar;\n    typedef typename Rhs::Scalar  RhsScalar;\n    typedef typename Dest::Scalar Scalar;\n    \n    typedef internal::blas_traits<Lhs> LhsBlasTraits;\n    typedef typename LhsBlasTraits::DirectLinearAccessType ActualLhsType;\n    typedef typename internal::remove_all<ActualLhsType>::type ActualLhsTypeCleaned;\n    typedef internal::blas_traits<Rhs> RhsBlasTraits;\n    typedef typename RhsBlasTraits::DirectLinearAccessType ActualRhsType;\n    typedef typename internal::remove_all<ActualRhsType>::type ActualRhsTypeCleaned;\n    \n    typename internal::add_const_on_value_type<ActualLhsType>::type lhs = LhsBlasTraits::extract(a_lhs);\n    typename internal::add_const_on_value_type<ActualRhsType>::type rhs = RhsBlasTraits::extract(a_rhs);\n\n    LhsScalar lhs_alpha = LhsBlasTraits::extractScalarFactor(a_lhs);\n    RhsScalar rhs_alpha = RhsBlasTraits::extractScalarFactor(a_rhs);\n    Scalar actualAlpha = alpha * lhs_alpha * rhs_alpha;\n\n    typedef internal::gemm_blocking_space<(Dest::Flags&RowMajorBit) ? RowMajor : ColMajor,Scalar,Scalar,\n              Lhs::MaxRowsAtCompileTime, Rhs::MaxColsAtCompileTime, Lhs::MaxColsAtCompileTime,4> BlockingType;\n\n    enum { IsLower = (Mode&Lower) == Lower };\n    Index stripedRows  = ((!LhsIsTriangular) || (IsLower))  ? lhs.rows() : (std::min)(lhs.rows(),lhs.cols());\n    Index stripedCols  = ((LhsIsTriangular)  || (!IsLower)) ? rhs.cols() : (std::min)(rhs.cols(),rhs.rows());\n    Index stripedDepth = LhsIsTriangular ? ((!IsLower) ? lhs.cols() : (std::min)(lhs.cols(),lhs.rows()))\n                                         : ((IsLower)  ? rhs.rows() : (std::min)(rhs.rows(),rhs.cols()));\n\n    BlockingType blocking(stripedRows, stripedCols, stripedDepth, 1, false);\n\n    internal::product_triangular_matrix_matrix<Scalar, Index,\n      Mode, LhsIsTriangular,\n      (internal::traits<ActualLhsTypeCleaned>::Flags&RowMajorBit) ? RowMajor : ColMajor, LhsBlasTraits::NeedToConjugate,\n      (internal::traits<ActualRhsTypeCleaned>::Flags&RowMajorBit) ? RowMajor : ColMajor, RhsBlasTraits::NeedToConjugate,\n      (internal::traits<Dest          >::Flags&RowMajorBit) ? RowMajor : ColMajor, Dest::InnerStrideAtCompileTime>\n      ::run(\n        stripedRows, stripedCols, stripedDepth,   // sizes\n        &lhs.coeffRef(0,0), lhs.outerStride(),    // lhs info\n        &rhs.coeffRef(0,0), rhs.outerStride(),    // rhs info\n        &dst.coeffRef(0,0), dst.innerStride(), dst.outerStride(),    // result info\n        actualAlpha, blocking\n      );\n\n    // Apply correction if the diagonal is unit and a scalar factor was nested:\n    if ((Mode&UnitDiag)==UnitDiag)\n    {\n      if (LhsIsTriangular && lhs_alpha!=LhsScalar(1))\n      {\n        Index diagSize = (std::min)(lhs.rows(),lhs.cols());\n        dst.topRows(diagSize) -= ((lhs_alpha-LhsScalar(1))*a_rhs).topRows(diagSize);\n      }\n      else if ((!LhsIsTriangular) && rhs_alpha!=RhsScalar(1))\n      {\n        Index diagSize = (std::min)(rhs.rows(),rhs.cols());\n        dst.leftCols(diagSize) -= (rhs_alpha-RhsScalar(1))*a_lhs.leftCols(diagSize);\n      }\n    }\n  }\n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_TRIANGULAR_MATRIX_MATRIX_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/products/TriangularMatrixMatrix_BLAS.h",
    "content": "/*\n Copyright (c) 2011, Intel Corporation. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without modification,\n are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n   list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n * Neither the name of Intel Corporation nor the names of its contributors may\n   be used to endorse or promote products derived from this software without\n   specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\n ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n ********************************************************************************\n *   Content : Eigen bindings to BLAS F77\n *   Triangular matrix * matrix product functionality based on ?TRMM.\n ********************************************************************************\n*/\n\n#ifndef EIGEN_TRIANGULAR_MATRIX_MATRIX_BLAS_H\n#define EIGEN_TRIANGULAR_MATRIX_MATRIX_BLAS_H\n\nnamespace Eigen { \n\nnamespace internal {\n\n\ntemplate <typename Scalar, typename Index,\n          int Mode, bool LhsIsTriangular,\n          int LhsStorageOrder, bool ConjugateLhs,\n          int RhsStorageOrder, bool ConjugateRhs,\n          int ResStorageOrder>\nstruct product_triangular_matrix_matrix_trmm :\n       product_triangular_matrix_matrix<Scalar,Index,Mode,\n          LhsIsTriangular,LhsStorageOrder,ConjugateLhs,\n          RhsStorageOrder, ConjugateRhs, ResStorageOrder, 1, BuiltIn> {};\n\n\n// try to go to BLAS specialization\n#define EIGEN_BLAS_TRMM_SPECIALIZE(Scalar, LhsIsTriangular) \\\ntemplate <typename Index, int Mode, \\\n          int LhsStorageOrder, bool ConjugateLhs, \\\n          int RhsStorageOrder, bool ConjugateRhs> \\\nstruct product_triangular_matrix_matrix<Scalar,Index, Mode, LhsIsTriangular, \\\n           LhsStorageOrder,ConjugateLhs, RhsStorageOrder,ConjugateRhs,ColMajor,1,Specialized> { \\\n  static inline void run(Index _rows, Index _cols, Index _depth, const Scalar* _lhs, Index lhsStride,\\\n    const Scalar* _rhs, Index rhsStride, Scalar* res, Index resIncr, Index resStride, Scalar alpha, level3_blocking<Scalar,Scalar>& blocking) { \\\n      EIGEN_ONLY_USED_FOR_DEBUG(resIncr); \\\n      eigen_assert(resIncr == 1); \\\n      product_triangular_matrix_matrix_trmm<Scalar,Index,Mode, \\\n        LhsIsTriangular,LhsStorageOrder,ConjugateLhs, \\\n        RhsStorageOrder, ConjugateRhs, ColMajor>::run( \\\n          _rows, _cols, _depth, _lhs, lhsStride, _rhs, rhsStride, res, resStride, alpha, blocking); \\\n  } \\\n};\n\nEIGEN_BLAS_TRMM_SPECIALIZE(double, true)\nEIGEN_BLAS_TRMM_SPECIALIZE(double, false)\nEIGEN_BLAS_TRMM_SPECIALIZE(dcomplex, true)\nEIGEN_BLAS_TRMM_SPECIALIZE(dcomplex, false)\nEIGEN_BLAS_TRMM_SPECIALIZE(float, true)\nEIGEN_BLAS_TRMM_SPECIALIZE(float, false)\nEIGEN_BLAS_TRMM_SPECIALIZE(scomplex, true)\nEIGEN_BLAS_TRMM_SPECIALIZE(scomplex, false)\n\n// implements col-major += alpha * op(triangular) * op(general)\n#define EIGEN_BLAS_TRMM_L(EIGTYPE, BLASTYPE, EIGPREFIX, BLASFUNC) \\\ntemplate <typename Index, int Mode, \\\n          int LhsStorageOrder, bool ConjugateLhs, \\\n          int RhsStorageOrder, bool ConjugateRhs> \\\nstruct product_triangular_matrix_matrix_trmm<EIGTYPE,Index,Mode,true, \\\n         LhsStorageOrder,ConjugateLhs,RhsStorageOrder,ConjugateRhs,ColMajor> \\\n{ \\\n  enum { \\\n    IsLower = (Mode&Lower) == Lower, \\\n    SetDiag = (Mode&(ZeroDiag|UnitDiag)) ? 0 : 1, \\\n    IsUnitDiag  = (Mode&UnitDiag) ? 1 : 0, \\\n    IsZeroDiag  = (Mode&ZeroDiag) ? 1 : 0, \\\n    LowUp = IsLower ? Lower : Upper, \\\n    conjA = ((LhsStorageOrder==ColMajor) && ConjugateLhs) ? 1 : 0 \\\n  }; \\\n\\\n  static void run( \\\n    Index _rows, Index _cols, Index _depth, \\\n    const EIGTYPE* _lhs, Index lhsStride, \\\n    const EIGTYPE* _rhs, Index rhsStride, \\\n    EIGTYPE* res,        Index resStride, \\\n    EIGTYPE alpha, level3_blocking<EIGTYPE,EIGTYPE>& blocking) \\\n  { \\\n   Index diagSize  = (std::min)(_rows,_depth); \\\n   Index rows      = IsLower ? _rows : diagSize; \\\n   Index depth     = IsLower ? diagSize : _depth; \\\n   Index cols      = _cols; \\\n\\\n   typedef Matrix<EIGTYPE, Dynamic, Dynamic, LhsStorageOrder> MatrixLhs; \\\n   typedef Matrix<EIGTYPE, Dynamic, Dynamic, RhsStorageOrder> MatrixRhs; \\\n\\\n/* Non-square case - doesn't fit to BLAS ?TRMM. Fall to default triangular product or call BLAS ?GEMM*/ \\\n   if (rows != depth) { \\\n\\\n     /* FIXME handle mkl_domain_get_max_threads */ \\\n     /*int nthr = mkl_domain_get_max_threads(EIGEN_BLAS_DOMAIN_BLAS);*/ int nthr = 1;\\\n\\\n     if (((nthr==1) && (((std::max)(rows,depth)-diagSize)/(double)diagSize < 0.5))) { \\\n     /* Most likely no benefit to call TRMM or GEMM from BLAS */ \\\n       product_triangular_matrix_matrix<EIGTYPE,Index,Mode,true, \\\n       LhsStorageOrder,ConjugateLhs, RhsStorageOrder, ConjugateRhs, ColMajor, 1, BuiltIn>::run( \\\n           _rows, _cols, _depth, _lhs, lhsStride, _rhs, rhsStride, res, 1, resStride, alpha, blocking); \\\n     /*std::cout << \"TRMM_L: A is not square! Go to Eigen TRMM implementation!\\n\";*/ \\\n     } else { \\\n     /* Make sense to call GEMM */ \\\n       Map<const MatrixLhs, 0, OuterStride<> > lhsMap(_lhs,rows,depth,OuterStride<>(lhsStride)); \\\n       MatrixLhs aa_tmp=lhsMap.template triangularView<Mode>(); \\\n       BlasIndex aStride = convert_index<BlasIndex>(aa_tmp.outerStride()); \\\n       gemm_blocking_space<ColMajor,EIGTYPE,EIGTYPE,Dynamic,Dynamic,Dynamic> gemm_blocking(_rows,_cols,_depth, 1, true); \\\n       general_matrix_matrix_product<Index,EIGTYPE,LhsStorageOrder,ConjugateLhs,EIGTYPE,RhsStorageOrder,ConjugateRhs,ColMajor,1>::run( \\\n       rows, cols, depth, aa_tmp.data(), aStride, _rhs, rhsStride, res, 1, resStride, alpha, gemm_blocking, 0); \\\n\\\n     /*std::cout << \"TRMM_L: A is not square! Go to BLAS GEMM implementation! \" << nthr<<\" \\n\";*/ \\\n     } \\\n     return; \\\n   } \\\n   char side = 'L', transa, uplo, diag = 'N'; \\\n   EIGTYPE *b; \\\n   const EIGTYPE *a; \\\n   BlasIndex m, n, lda, ldb; \\\n\\\n/* Set m, n */ \\\n   m = convert_index<BlasIndex>(diagSize); \\\n   n = convert_index<BlasIndex>(cols); \\\n\\\n/* Set trans */ \\\n   transa = (LhsStorageOrder==RowMajor) ? ((ConjugateLhs) ? 'C' : 'T') : 'N'; \\\n\\\n/* Set b, ldb */ \\\n   Map<const MatrixRhs, 0, OuterStride<> > rhs(_rhs,depth,cols,OuterStride<>(rhsStride)); \\\n   MatrixX##EIGPREFIX b_tmp; \\\n\\\n   if (ConjugateRhs) b_tmp = rhs.conjugate(); else b_tmp = rhs; \\\n   b = b_tmp.data(); \\\n   ldb = convert_index<BlasIndex>(b_tmp.outerStride()); \\\n\\\n/* Set uplo */ \\\n   uplo = IsLower ? 'L' : 'U'; \\\n   if (LhsStorageOrder==RowMajor) uplo = (uplo == 'L') ? 'U' : 'L'; \\\n/* Set a, lda */ \\\n   Map<const MatrixLhs, 0, OuterStride<> > lhs(_lhs,rows,depth,OuterStride<>(lhsStride)); \\\n   MatrixLhs a_tmp; \\\n\\\n   if ((conjA!=0) || (SetDiag==0)) { \\\n     if (conjA) a_tmp = lhs.conjugate(); else a_tmp = lhs; \\\n     if (IsZeroDiag) \\\n       a_tmp.diagonal().setZero(); \\\n     else if (IsUnitDiag) \\\n       a_tmp.diagonal().setOnes();\\\n     a = a_tmp.data(); \\\n     lda = convert_index<BlasIndex>(a_tmp.outerStride()); \\\n   } else { \\\n     a = _lhs; \\\n     lda = convert_index<BlasIndex>(lhsStride); \\\n   } \\\n   /*std::cout << \"TRMM_L: A is square! Go to BLAS TRMM implementation! \\n\";*/ \\\n/* call ?trmm*/ \\\n   BLASFUNC(&side, &uplo, &transa, &diag, &m, &n, (const BLASTYPE*)&numext::real_ref(alpha), (const BLASTYPE*)a, &lda, (BLASTYPE*)b, &ldb); \\\n\\\n/* Add op(a_triangular)*b into res*/ \\\n   Map<MatrixX##EIGPREFIX, 0, OuterStride<> > res_tmp(res,rows,cols,OuterStride<>(resStride)); \\\n   res_tmp=res_tmp+b_tmp; \\\n  } \\\n};\n\n#ifdef EIGEN_USE_MKL\nEIGEN_BLAS_TRMM_L(double, double, d, dtrmm)\nEIGEN_BLAS_TRMM_L(dcomplex, MKL_Complex16, cd, ztrmm)\nEIGEN_BLAS_TRMM_L(float, float, f, strmm)\nEIGEN_BLAS_TRMM_L(scomplex, MKL_Complex8, cf, ctrmm)\n#else\nEIGEN_BLAS_TRMM_L(double, double, d, dtrmm_)\nEIGEN_BLAS_TRMM_L(dcomplex, double, cd, ztrmm_)\nEIGEN_BLAS_TRMM_L(float, float, f, strmm_)\nEIGEN_BLAS_TRMM_L(scomplex, float, cf, ctrmm_)\n#endif\n\n// implements col-major += alpha * op(general) * op(triangular)\n#define EIGEN_BLAS_TRMM_R(EIGTYPE, BLASTYPE, EIGPREFIX, BLASFUNC) \\\ntemplate <typename Index, int Mode, \\\n          int LhsStorageOrder, bool ConjugateLhs, \\\n          int RhsStorageOrder, bool ConjugateRhs> \\\nstruct product_triangular_matrix_matrix_trmm<EIGTYPE,Index,Mode,false, \\\n         LhsStorageOrder,ConjugateLhs,RhsStorageOrder,ConjugateRhs,ColMajor> \\\n{ \\\n  enum { \\\n    IsLower = (Mode&Lower) == Lower, \\\n    SetDiag = (Mode&(ZeroDiag|UnitDiag)) ? 0 : 1, \\\n    IsUnitDiag  = (Mode&UnitDiag) ? 1 : 0, \\\n    IsZeroDiag  = (Mode&ZeroDiag) ? 1 : 0, \\\n    LowUp = IsLower ? Lower : Upper, \\\n    conjA = ((RhsStorageOrder==ColMajor) && ConjugateRhs) ? 1 : 0 \\\n  }; \\\n\\\n  static void run( \\\n    Index _rows, Index _cols, Index _depth, \\\n    const EIGTYPE* _lhs, Index lhsStride, \\\n    const EIGTYPE* _rhs, Index rhsStride, \\\n    EIGTYPE* res,        Index resStride, \\\n    EIGTYPE alpha, level3_blocking<EIGTYPE,EIGTYPE>& blocking) \\\n  { \\\n   Index diagSize  = (std::min)(_cols,_depth); \\\n   Index rows      = _rows; \\\n   Index depth     = IsLower ? _depth : diagSize; \\\n   Index cols      = IsLower ? diagSize : _cols; \\\n\\\n   typedef Matrix<EIGTYPE, Dynamic, Dynamic, LhsStorageOrder> MatrixLhs; \\\n   typedef Matrix<EIGTYPE, Dynamic, Dynamic, RhsStorageOrder> MatrixRhs; \\\n\\\n/* Non-square case - doesn't fit to BLAS ?TRMM. Fall to default triangular product or call BLAS ?GEMM*/ \\\n   if (cols != depth) { \\\n\\\n     int nthr = 1 /*mkl_domain_get_max_threads(EIGEN_BLAS_DOMAIN_BLAS)*/; \\\n\\\n     if ((nthr==1) && (((std::max)(cols,depth)-diagSize)/(double)diagSize < 0.5)) { \\\n     /* Most likely no benefit to call TRMM or GEMM from BLAS*/ \\\n       product_triangular_matrix_matrix<EIGTYPE,Index,Mode,false, \\\n       LhsStorageOrder,ConjugateLhs, RhsStorageOrder, ConjugateRhs, ColMajor, 1, BuiltIn>::run( \\\n           _rows, _cols, _depth, _lhs, lhsStride, _rhs, rhsStride, res, 1, resStride, alpha, blocking); \\\n       /*std::cout << \"TRMM_R: A is not square! Go to Eigen TRMM implementation!\\n\";*/ \\\n     } else { \\\n     /* Make sense to call GEMM */ \\\n       Map<const MatrixRhs, 0, OuterStride<> > rhsMap(_rhs,depth,cols, OuterStride<>(rhsStride)); \\\n       MatrixRhs aa_tmp=rhsMap.template triangularView<Mode>(); \\\n       BlasIndex aStride = convert_index<BlasIndex>(aa_tmp.outerStride()); \\\n       gemm_blocking_space<ColMajor,EIGTYPE,EIGTYPE,Dynamic,Dynamic,Dynamic> gemm_blocking(_rows,_cols,_depth, 1, true); \\\n       general_matrix_matrix_product<Index,EIGTYPE,LhsStorageOrder,ConjugateLhs,EIGTYPE,RhsStorageOrder,ConjugateRhs,ColMajor,1>::run( \\\n       rows, cols, depth, _lhs, lhsStride, aa_tmp.data(), aStride, res, 1, resStride, alpha, gemm_blocking, 0); \\\n\\\n     /*std::cout << \"TRMM_R: A is not square! Go to BLAS GEMM implementation! \" << nthr<<\" \\n\";*/ \\\n     } \\\n     return; \\\n   } \\\n   char side = 'R', transa, uplo, diag = 'N'; \\\n   EIGTYPE *b; \\\n   const EIGTYPE *a; \\\n   BlasIndex m, n, lda, ldb; \\\n\\\n/* Set m, n */ \\\n   m = convert_index<BlasIndex>(rows); \\\n   n = convert_index<BlasIndex>(diagSize); \\\n\\\n/* Set trans */ \\\n   transa = (RhsStorageOrder==RowMajor) ? ((ConjugateRhs) ? 'C' : 'T') : 'N'; \\\n\\\n/* Set b, ldb */ \\\n   Map<const MatrixLhs, 0, OuterStride<> > lhs(_lhs,rows,depth,OuterStride<>(lhsStride)); \\\n   MatrixX##EIGPREFIX b_tmp; \\\n\\\n   if (ConjugateLhs) b_tmp = lhs.conjugate(); else b_tmp = lhs; \\\n   b = b_tmp.data(); \\\n   ldb = convert_index<BlasIndex>(b_tmp.outerStride()); \\\n\\\n/* Set uplo */ \\\n   uplo = IsLower ? 'L' : 'U'; \\\n   if (RhsStorageOrder==RowMajor) uplo = (uplo == 'L') ? 'U' : 'L'; \\\n/* Set a, lda */ \\\n   Map<const MatrixRhs, 0, OuterStride<> > rhs(_rhs,depth,cols, OuterStride<>(rhsStride)); \\\n   MatrixRhs a_tmp; \\\n\\\n   if ((conjA!=0) || (SetDiag==0)) { \\\n     if (conjA) a_tmp = rhs.conjugate(); else a_tmp = rhs; \\\n     if (IsZeroDiag) \\\n       a_tmp.diagonal().setZero(); \\\n     else if (IsUnitDiag) \\\n       a_tmp.diagonal().setOnes();\\\n     a = a_tmp.data(); \\\n     lda = convert_index<BlasIndex>(a_tmp.outerStride()); \\\n   } else { \\\n     a = _rhs; \\\n     lda = convert_index<BlasIndex>(rhsStride); \\\n   } \\\n   /*std::cout << \"TRMM_R: A is square! Go to BLAS TRMM implementation! \\n\";*/ \\\n/* call ?trmm*/ \\\n   BLASFUNC(&side, &uplo, &transa, &diag, &m, &n, (const BLASTYPE*)&numext::real_ref(alpha), (const BLASTYPE*)a, &lda, (BLASTYPE*)b, &ldb); \\\n\\\n/* Add op(a_triangular)*b into res*/ \\\n   Map<MatrixX##EIGPREFIX, 0, OuterStride<> > res_tmp(res,rows,cols,OuterStride<>(resStride)); \\\n   res_tmp=res_tmp+b_tmp; \\\n  } \\\n};\n\n#ifdef EIGEN_USE_MKL\nEIGEN_BLAS_TRMM_R(double, double, d, dtrmm)\nEIGEN_BLAS_TRMM_R(dcomplex, MKL_Complex16, cd, ztrmm)\nEIGEN_BLAS_TRMM_R(float, float, f, strmm)\nEIGEN_BLAS_TRMM_R(scomplex, MKL_Complex8, cf, ctrmm)\n#else\nEIGEN_BLAS_TRMM_R(double, double, d, dtrmm_)\nEIGEN_BLAS_TRMM_R(dcomplex, double, cd, ztrmm_)\nEIGEN_BLAS_TRMM_R(float, float, f, strmm_)\nEIGEN_BLAS_TRMM_R(scomplex, float, cf, ctrmm_)\n#endif\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_TRIANGULAR_MATRIX_MATRIX_BLAS_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/products/TriangularMatrixVector.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_TRIANGULARMATRIXVECTOR_H\n#define EIGEN_TRIANGULARMATRIXVECTOR_H\n\nnamespace Eigen {\n\nnamespace internal {\n\ntemplate<typename Index, int Mode, typename LhsScalar, bool ConjLhs, typename RhsScalar, bool ConjRhs, int StorageOrder, int Version=Specialized>\nstruct triangular_matrix_vector_product;\n\ntemplate<typename Index, int Mode, typename LhsScalar, bool ConjLhs, typename RhsScalar, bool ConjRhs, int Version>\nstruct triangular_matrix_vector_product<Index,Mode,LhsScalar,ConjLhs,RhsScalar,ConjRhs,ColMajor,Version>\n{\n  typedef typename ScalarBinaryOpTraits<LhsScalar, RhsScalar>::ReturnType ResScalar;\n  enum {\n    IsLower = ((Mode&Lower)==Lower),\n    HasUnitDiag = (Mode & UnitDiag)==UnitDiag,\n    HasZeroDiag = (Mode & ZeroDiag)==ZeroDiag\n  };\n  static EIGEN_DONT_INLINE  void run(Index _rows, Index _cols, const LhsScalar* _lhs, Index lhsStride,\n                                     const RhsScalar* _rhs, Index rhsIncr, ResScalar* _res, Index resIncr, const RhsScalar& alpha);\n};\n\ntemplate<typename Index, int Mode, typename LhsScalar, bool ConjLhs, typename RhsScalar, bool ConjRhs, int Version>\nEIGEN_DONT_INLINE void triangular_matrix_vector_product<Index,Mode,LhsScalar,ConjLhs,RhsScalar,ConjRhs,ColMajor,Version>\n  ::run(Index _rows, Index _cols, const LhsScalar* _lhs, Index lhsStride,\n        const RhsScalar* _rhs, Index rhsIncr, ResScalar* _res, Index resIncr, const RhsScalar& alpha)\n  {\n    static const Index PanelWidth = EIGEN_TUNE_TRIANGULAR_PANEL_WIDTH;\n    Index size = (std::min)(_rows,_cols);\n    Index rows = IsLower ? _rows : (std::min)(_rows,_cols);\n    Index cols = IsLower ? (std::min)(_rows,_cols) : _cols;\n\n    typedef Map<const Matrix<LhsScalar,Dynamic,Dynamic,ColMajor>, 0, OuterStride<> > LhsMap;\n    const LhsMap lhs(_lhs,rows,cols,OuterStride<>(lhsStride));\n    typename conj_expr_if<ConjLhs,LhsMap>::type cjLhs(lhs);\n\n    typedef Map<const Matrix<RhsScalar,Dynamic,1>, 0, InnerStride<> > RhsMap;\n    const RhsMap rhs(_rhs,cols,InnerStride<>(rhsIncr));\n    typename conj_expr_if<ConjRhs,RhsMap>::type cjRhs(rhs);\n\n    typedef Map<Matrix<ResScalar,Dynamic,1> > ResMap;\n    ResMap res(_res,rows);\n\n    typedef const_blas_data_mapper<LhsScalar,Index,ColMajor> LhsMapper;\n    typedef const_blas_data_mapper<RhsScalar,Index,RowMajor> RhsMapper;\n\n    for (Index pi=0; pi<size; pi+=PanelWidth)\n    {\n      Index actualPanelWidth = (std::min)(PanelWidth, size-pi);\n      for (Index k=0; k<actualPanelWidth; ++k)\n      {\n        Index i = pi + k;\n        Index s = IsLower ? ((HasUnitDiag||HasZeroDiag) ? i+1 : i ) : pi;\n        Index r = IsLower ? actualPanelWidth-k : k+1;\n        if ((!(HasUnitDiag||HasZeroDiag)) || (--r)>0)\n          res.segment(s,r) += (alpha * cjRhs.coeff(i)) * cjLhs.col(i).segment(s,r);\n        if (HasUnitDiag)\n          res.coeffRef(i) += alpha * cjRhs.coeff(i);\n      }\n      Index r = IsLower ? rows - pi - actualPanelWidth : pi;\n      if (r>0)\n      {\n        Index s = IsLower ? pi+actualPanelWidth : 0;\n        general_matrix_vector_product<Index,LhsScalar,LhsMapper,ColMajor,ConjLhs,RhsScalar,RhsMapper,ConjRhs,BuiltIn>::run(\n            r, actualPanelWidth,\n            LhsMapper(&lhs.coeffRef(s,pi), lhsStride),\n            RhsMapper(&rhs.coeffRef(pi), rhsIncr),\n            &res.coeffRef(s), resIncr, alpha);\n      }\n    }\n    if((!IsLower) && cols>size)\n    {\n      general_matrix_vector_product<Index,LhsScalar,LhsMapper,ColMajor,ConjLhs,RhsScalar,RhsMapper,ConjRhs>::run(\n          rows, cols-size,\n          LhsMapper(&lhs.coeffRef(0,size), lhsStride),\n          RhsMapper(&rhs.coeffRef(size), rhsIncr),\n          _res, resIncr, alpha);\n    }\n  }\n\ntemplate<typename Index, int Mode, typename LhsScalar, bool ConjLhs, typename RhsScalar, bool ConjRhs,int Version>\nstruct triangular_matrix_vector_product<Index,Mode,LhsScalar,ConjLhs,RhsScalar,ConjRhs,RowMajor,Version>\n{\n  typedef typename ScalarBinaryOpTraits<LhsScalar, RhsScalar>::ReturnType ResScalar;\n  enum {\n    IsLower = ((Mode&Lower)==Lower),\n    HasUnitDiag = (Mode & UnitDiag)==UnitDiag,\n    HasZeroDiag = (Mode & ZeroDiag)==ZeroDiag\n  };\n  static EIGEN_DONT_INLINE void run(Index _rows, Index _cols, const LhsScalar* _lhs, Index lhsStride,\n                                    const RhsScalar* _rhs, Index rhsIncr, ResScalar* _res, Index resIncr, const ResScalar& alpha);\n};\n\ntemplate<typename Index, int Mode, typename LhsScalar, bool ConjLhs, typename RhsScalar, bool ConjRhs,int Version>\nEIGEN_DONT_INLINE void triangular_matrix_vector_product<Index,Mode,LhsScalar,ConjLhs,RhsScalar,ConjRhs,RowMajor,Version>\n  ::run(Index _rows, Index _cols, const LhsScalar* _lhs, Index lhsStride,\n        const RhsScalar* _rhs, Index rhsIncr, ResScalar* _res, Index resIncr, const ResScalar& alpha)\n  {\n    static const Index PanelWidth = EIGEN_TUNE_TRIANGULAR_PANEL_WIDTH;\n    Index diagSize = (std::min)(_rows,_cols);\n    Index rows = IsLower ? _rows : diagSize;\n    Index cols = IsLower ? diagSize : _cols;\n\n    typedef Map<const Matrix<LhsScalar,Dynamic,Dynamic,RowMajor>, 0, OuterStride<> > LhsMap;\n    const LhsMap lhs(_lhs,rows,cols,OuterStride<>(lhsStride));\n    typename conj_expr_if<ConjLhs,LhsMap>::type cjLhs(lhs);\n\n    typedef Map<const Matrix<RhsScalar,Dynamic,1> > RhsMap;\n    const RhsMap rhs(_rhs,cols);\n    typename conj_expr_if<ConjRhs,RhsMap>::type cjRhs(rhs);\n\n    typedef Map<Matrix<ResScalar,Dynamic,1>, 0, InnerStride<> > ResMap;\n    ResMap res(_res,rows,InnerStride<>(resIncr));\n\n    typedef const_blas_data_mapper<LhsScalar,Index,RowMajor> LhsMapper;\n    typedef const_blas_data_mapper<RhsScalar,Index,RowMajor> RhsMapper;\n\n    for (Index pi=0; pi<diagSize; pi+=PanelWidth)\n    {\n      Index actualPanelWidth = (std::min)(PanelWidth, diagSize-pi);\n      for (Index k=0; k<actualPanelWidth; ++k)\n      {\n        Index i = pi + k;\n        Index s = IsLower ? pi  : ((HasUnitDiag||HasZeroDiag) ? i+1 : i);\n        Index r = IsLower ? k+1 : actualPanelWidth-k;\n        if ((!(HasUnitDiag||HasZeroDiag)) || (--r)>0)\n          res.coeffRef(i) += alpha * (cjLhs.row(i).segment(s,r).cwiseProduct(cjRhs.segment(s,r).transpose())).sum();\n        if (HasUnitDiag)\n          res.coeffRef(i) += alpha * cjRhs.coeff(i);\n      }\n      Index r = IsLower ? pi : cols - pi - actualPanelWidth;\n      if (r>0)\n      {\n        Index s = IsLower ? 0 : pi + actualPanelWidth;\n        general_matrix_vector_product<Index,LhsScalar,LhsMapper,RowMajor,ConjLhs,RhsScalar,RhsMapper,ConjRhs,BuiltIn>::run(\n            actualPanelWidth, r,\n            LhsMapper(&lhs.coeffRef(pi,s), lhsStride),\n            RhsMapper(&rhs.coeffRef(s), rhsIncr),\n            &res.coeffRef(pi), resIncr, alpha);\n      }\n    }\n    if(IsLower && rows>diagSize)\n    {\n      general_matrix_vector_product<Index,LhsScalar,LhsMapper,RowMajor,ConjLhs,RhsScalar,RhsMapper,ConjRhs>::run(\n            rows-diagSize, cols,\n            LhsMapper(&lhs.coeffRef(diagSize,0), lhsStride),\n            RhsMapper(&rhs.coeffRef(0), rhsIncr),\n            &res.coeffRef(diagSize), resIncr, alpha);\n    }\n  }\n\n/***************************************************************************\n* Wrapper to product_triangular_vector\n***************************************************************************/\n\ntemplate<int Mode,int StorageOrder>\nstruct trmv_selector;\n\n} // end namespace internal\n\nnamespace internal {\n\ntemplate<int Mode, typename Lhs, typename Rhs>\nstruct triangular_product_impl<Mode,true,Lhs,false,Rhs,true>\n{\n  template<typename Dest> static void run(Dest& dst, const Lhs &lhs, const Rhs &rhs, const typename Dest::Scalar& alpha)\n  {\n    eigen_assert(dst.rows()==lhs.rows() && dst.cols()==rhs.cols());\n  \n    internal::trmv_selector<Mode,(int(internal::traits<Lhs>::Flags)&RowMajorBit) ? RowMajor : ColMajor>::run(lhs, rhs, dst, alpha);\n  }\n};\n\ntemplate<int Mode, typename Lhs, typename Rhs>\nstruct triangular_product_impl<Mode,false,Lhs,true,Rhs,false>\n{\n  template<typename Dest> static void run(Dest& dst, const Lhs &lhs, const Rhs &rhs, const typename Dest::Scalar& alpha)\n  {\n    eigen_assert(dst.rows()==lhs.rows() && dst.cols()==rhs.cols());\n\n    Transpose<Dest> dstT(dst);\n    internal::trmv_selector<(Mode & (UnitDiag|ZeroDiag)) | ((Mode & Lower) ? Upper : Lower),\n                            (int(internal::traits<Rhs>::Flags)&RowMajorBit) ? ColMajor : RowMajor>\n            ::run(rhs.transpose(),lhs.transpose(), dstT, alpha);\n  }\n};\n\n} // end namespace internal\n\nnamespace internal {\n\n// TODO: find a way to factorize this piece of code with gemv_selector since the logic is exactly the same.\n  \ntemplate<int Mode> struct trmv_selector<Mode,ColMajor>\n{\n  template<typename Lhs, typename Rhs, typename Dest>\n  static void run(const Lhs &lhs, const Rhs &rhs, Dest& dest, const typename Dest::Scalar& alpha)\n  {\n    typedef typename Lhs::Scalar      LhsScalar;\n    typedef typename Rhs::Scalar      RhsScalar;\n    typedef typename Dest::Scalar     ResScalar;\n    typedef typename Dest::RealScalar RealScalar;\n    \n    typedef internal::blas_traits<Lhs> LhsBlasTraits;\n    typedef typename LhsBlasTraits::DirectLinearAccessType ActualLhsType;\n    typedef internal::blas_traits<Rhs> RhsBlasTraits;\n    typedef typename RhsBlasTraits::DirectLinearAccessType ActualRhsType;\n    \n    typedef Map<Matrix<ResScalar,Dynamic,1>, EIGEN_PLAIN_ENUM_MIN(AlignedMax,internal::packet_traits<ResScalar>::size)> MappedDest;\n\n    typename internal::add_const_on_value_type<ActualLhsType>::type actualLhs = LhsBlasTraits::extract(lhs);\n    typename internal::add_const_on_value_type<ActualRhsType>::type actualRhs = RhsBlasTraits::extract(rhs);\n\n    LhsScalar lhs_alpha = LhsBlasTraits::extractScalarFactor(lhs);\n    RhsScalar rhs_alpha = RhsBlasTraits::extractScalarFactor(rhs);\n    ResScalar actualAlpha = alpha * lhs_alpha * rhs_alpha;\n\n    enum {\n      // FIXME find a way to allow an inner stride on the result if packet_traits<Scalar>::size==1\n      // on, the other hand it is good for the cache to pack the vector anyways...\n      EvalToDestAtCompileTime = Dest::InnerStrideAtCompileTime==1,\n      ComplexByReal = (NumTraits<LhsScalar>::IsComplex) && (!NumTraits<RhsScalar>::IsComplex),\n      MightCannotUseDest = (Dest::InnerStrideAtCompileTime!=1) || ComplexByReal\n    };\n\n    gemv_static_vector_if<ResScalar,Dest::SizeAtCompileTime,Dest::MaxSizeAtCompileTime,MightCannotUseDest> static_dest;\n\n    bool alphaIsCompatible = (!ComplexByReal) || (numext::imag(actualAlpha)==RealScalar(0));\n    bool evalToDest = EvalToDestAtCompileTime && alphaIsCompatible;\n\n    RhsScalar compatibleAlpha = get_factor<ResScalar,RhsScalar>::run(actualAlpha);\n\n    ei_declare_aligned_stack_constructed_variable(ResScalar,actualDestPtr,dest.size(),\n                                                  evalToDest ? dest.data() : static_dest.data());\n\n    if(!evalToDest)\n    {\n      #ifdef EIGEN_DENSE_STORAGE_CTOR_PLUGIN\n      Index size = dest.size();\n      EIGEN_DENSE_STORAGE_CTOR_PLUGIN\n      #endif\n      if(!alphaIsCompatible)\n      {\n        MappedDest(actualDestPtr, dest.size()).setZero();\n        compatibleAlpha = RhsScalar(1);\n      }\n      else\n        MappedDest(actualDestPtr, dest.size()) = dest;\n    }\n\n    internal::triangular_matrix_vector_product\n      <Index,Mode,\n       LhsScalar, LhsBlasTraits::NeedToConjugate,\n       RhsScalar, RhsBlasTraits::NeedToConjugate,\n       ColMajor>\n      ::run(actualLhs.rows(),actualLhs.cols(),\n            actualLhs.data(),actualLhs.outerStride(),\n            actualRhs.data(),actualRhs.innerStride(),\n            actualDestPtr,1,compatibleAlpha);\n\n    if (!evalToDest)\n    {\n      if(!alphaIsCompatible)\n        dest += actualAlpha * MappedDest(actualDestPtr, dest.size());\n      else\n        dest = MappedDest(actualDestPtr, dest.size());\n    }\n\n    if ( ((Mode&UnitDiag)==UnitDiag) && (lhs_alpha!=LhsScalar(1)) )\n    {\n      Index diagSize = (std::min)(lhs.rows(),lhs.cols());\n      dest.head(diagSize) -= (lhs_alpha-LhsScalar(1))*rhs.head(diagSize);\n    }\n  }\n};\n\ntemplate<int Mode> struct trmv_selector<Mode,RowMajor>\n{\n  template<typename Lhs, typename Rhs, typename Dest>\n  static void run(const Lhs &lhs, const Rhs &rhs, Dest& dest, const typename Dest::Scalar& alpha)\n  {\n    typedef typename Lhs::Scalar      LhsScalar;\n    typedef typename Rhs::Scalar      RhsScalar;\n    typedef typename Dest::Scalar     ResScalar;\n    \n    typedef internal::blas_traits<Lhs> LhsBlasTraits;\n    typedef typename LhsBlasTraits::DirectLinearAccessType ActualLhsType;\n    typedef internal::blas_traits<Rhs> RhsBlasTraits;\n    typedef typename RhsBlasTraits::DirectLinearAccessType ActualRhsType;\n    typedef typename internal::remove_all<ActualRhsType>::type ActualRhsTypeCleaned;\n\n    typename add_const<ActualLhsType>::type actualLhs = LhsBlasTraits::extract(lhs);\n    typename add_const<ActualRhsType>::type actualRhs = RhsBlasTraits::extract(rhs);\n\n    LhsScalar lhs_alpha = LhsBlasTraits::extractScalarFactor(lhs);\n    RhsScalar rhs_alpha = RhsBlasTraits::extractScalarFactor(rhs);\n    ResScalar actualAlpha = alpha * lhs_alpha * rhs_alpha;\n\n    enum {\n      DirectlyUseRhs = ActualRhsTypeCleaned::InnerStrideAtCompileTime==1\n    };\n\n    gemv_static_vector_if<RhsScalar,ActualRhsTypeCleaned::SizeAtCompileTime,ActualRhsTypeCleaned::MaxSizeAtCompileTime,!DirectlyUseRhs> static_rhs;\n\n    ei_declare_aligned_stack_constructed_variable(RhsScalar,actualRhsPtr,actualRhs.size(),\n        DirectlyUseRhs ? const_cast<RhsScalar*>(actualRhs.data()) : static_rhs.data());\n\n    if(!DirectlyUseRhs)\n    {\n      #ifdef EIGEN_DENSE_STORAGE_CTOR_PLUGIN\n      Index size = actualRhs.size();\n      EIGEN_DENSE_STORAGE_CTOR_PLUGIN\n      #endif\n      Map<typename ActualRhsTypeCleaned::PlainObject>(actualRhsPtr, actualRhs.size()) = actualRhs;\n    }\n\n    internal::triangular_matrix_vector_product\n      <Index,Mode,\n       LhsScalar, LhsBlasTraits::NeedToConjugate,\n       RhsScalar, RhsBlasTraits::NeedToConjugate,\n       RowMajor>\n      ::run(actualLhs.rows(),actualLhs.cols(),\n            actualLhs.data(),actualLhs.outerStride(),\n            actualRhsPtr,1,\n            dest.data(),dest.innerStride(),\n            actualAlpha);\n\n    if ( ((Mode&UnitDiag)==UnitDiag) && (lhs_alpha!=LhsScalar(1)) )\n    {\n      Index diagSize = (std::min)(lhs.rows(),lhs.cols());\n      dest.head(diagSize) -= (lhs_alpha-LhsScalar(1))*rhs.head(diagSize);\n    }\n  }\n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_TRIANGULARMATRIXVECTOR_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/products/TriangularMatrixVector_BLAS.h",
    "content": "/*\n Copyright (c) 2011, Intel Corporation. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without modification,\n are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n   list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n * Neither the name of Intel Corporation nor the names of its contributors may\n   be used to endorse or promote products derived from this software without\n   specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\n ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n ********************************************************************************\n *   Content : Eigen bindings to BLAS F77\n *   Triangular matrix-vector product functionality based on ?TRMV.\n ********************************************************************************\n*/\n\n#ifndef EIGEN_TRIANGULAR_MATRIX_VECTOR_BLAS_H\n#define EIGEN_TRIANGULAR_MATRIX_VECTOR_BLAS_H\n\nnamespace Eigen { \n\nnamespace internal {\n\n/**********************************************************************\n* This file implements triangular matrix-vector multiplication using BLAS\n**********************************************************************/\n\n// trmv/hemv specialization\n\ntemplate<typename Index, int Mode, typename LhsScalar, bool ConjLhs, typename RhsScalar, bool ConjRhs, int StorageOrder>\nstruct triangular_matrix_vector_product_trmv :\n  triangular_matrix_vector_product<Index,Mode,LhsScalar,ConjLhs,RhsScalar,ConjRhs,StorageOrder,BuiltIn> {};\n\n#define EIGEN_BLAS_TRMV_SPECIALIZE(Scalar) \\\ntemplate<typename Index, int Mode, bool ConjLhs, bool ConjRhs> \\\nstruct triangular_matrix_vector_product<Index,Mode,Scalar,ConjLhs,Scalar,ConjRhs,ColMajor,Specialized> { \\\n static void run(Index _rows, Index _cols, const Scalar* _lhs, Index lhsStride, \\\n                                     const Scalar* _rhs, Index rhsIncr, Scalar* _res, Index resIncr, Scalar alpha) { \\\n      triangular_matrix_vector_product_trmv<Index,Mode,Scalar,ConjLhs,Scalar,ConjRhs,ColMajor>::run( \\\n        _rows, _cols, _lhs, lhsStride, _rhs, rhsIncr, _res, resIncr, alpha); \\\n  } \\\n}; \\\ntemplate<typename Index, int Mode, bool ConjLhs, bool ConjRhs> \\\nstruct triangular_matrix_vector_product<Index,Mode,Scalar,ConjLhs,Scalar,ConjRhs,RowMajor,Specialized> { \\\n static void run(Index _rows, Index _cols, const Scalar* _lhs, Index lhsStride, \\\n                                     const Scalar* _rhs, Index rhsIncr, Scalar* _res, Index resIncr, Scalar alpha) { \\\n      triangular_matrix_vector_product_trmv<Index,Mode,Scalar,ConjLhs,Scalar,ConjRhs,RowMajor>::run( \\\n        _rows, _cols, _lhs, lhsStride, _rhs, rhsIncr, _res, resIncr, alpha); \\\n  } \\\n};\n\nEIGEN_BLAS_TRMV_SPECIALIZE(double)\nEIGEN_BLAS_TRMV_SPECIALIZE(float)\nEIGEN_BLAS_TRMV_SPECIALIZE(dcomplex)\nEIGEN_BLAS_TRMV_SPECIALIZE(scomplex)\n\n// implements col-major: res += alpha * op(triangular) * vector\n#define EIGEN_BLAS_TRMV_CM(EIGTYPE, BLASTYPE, EIGPREFIX, BLASPREFIX, BLASPOSTFIX) \\\ntemplate<typename Index, int Mode, bool ConjLhs, bool ConjRhs> \\\nstruct triangular_matrix_vector_product_trmv<Index,Mode,EIGTYPE,ConjLhs,EIGTYPE,ConjRhs,ColMajor> { \\\n  enum { \\\n    IsLower = (Mode&Lower) == Lower, \\\n    SetDiag = (Mode&(ZeroDiag|UnitDiag)) ? 0 : 1, \\\n    IsUnitDiag  = (Mode&UnitDiag) ? 1 : 0, \\\n    IsZeroDiag  = (Mode&ZeroDiag) ? 1 : 0, \\\n    LowUp = IsLower ? Lower : Upper \\\n  }; \\\n static void run(Index _rows, Index _cols, const EIGTYPE* _lhs, Index lhsStride, \\\n                 const EIGTYPE* _rhs, Index rhsIncr, EIGTYPE* _res, Index resIncr, EIGTYPE alpha) \\\n { \\\n   if (ConjLhs || IsZeroDiag) { \\\n     triangular_matrix_vector_product<Index,Mode,EIGTYPE,ConjLhs,EIGTYPE,ConjRhs,ColMajor,BuiltIn>::run( \\\n       _rows, _cols, _lhs, lhsStride, _rhs, rhsIncr, _res, resIncr, alpha); \\\n     return; \\\n   }\\\n   Index size = (std::min)(_rows,_cols); \\\n   Index rows = IsLower ? _rows : size; \\\n   Index cols = IsLower ? size : _cols; \\\n\\\n   typedef VectorX##EIGPREFIX VectorRhs; \\\n   EIGTYPE *x, *y;\\\n\\\n/* Set x*/ \\\n   Map<const VectorRhs, 0, InnerStride<> > rhs(_rhs,cols,InnerStride<>(rhsIncr)); \\\n   VectorRhs x_tmp; \\\n   if (ConjRhs) x_tmp = rhs.conjugate(); else x_tmp = rhs; \\\n   x = x_tmp.data(); \\\n\\\n/* Square part handling */\\\n\\\n   char trans, uplo, diag; \\\n   BlasIndex m, n, lda, incx, incy; \\\n   EIGTYPE const *a; \\\n   EIGTYPE beta(1); \\\n\\\n/* Set m, n */ \\\n   n = convert_index<BlasIndex>(size); \\\n   lda = convert_index<BlasIndex>(lhsStride); \\\n   incx = 1; \\\n   incy = convert_index<BlasIndex>(resIncr); \\\n\\\n/* Set uplo, trans and diag*/ \\\n   trans = 'N'; \\\n   uplo = IsLower ? 'L' : 'U'; \\\n   diag = IsUnitDiag ? 'U' : 'N'; \\\n\\\n/* call ?TRMV*/ \\\n   BLASPREFIX##trmv##BLASPOSTFIX(&uplo, &trans, &diag, &n, (const BLASTYPE*)_lhs, &lda, (BLASTYPE*)x, &incx); \\\n\\\n/* Add op(a_tr)rhs into res*/ \\\n   BLASPREFIX##axpy##BLASPOSTFIX(&n, (const BLASTYPE*)&numext::real_ref(alpha),(const BLASTYPE*)x, &incx, (BLASTYPE*)_res, &incy); \\\n/* Non-square case - doesn't fit to BLAS ?TRMV. Fall to default triangular product*/ \\\n   if (size<(std::max)(rows,cols)) { \\\n     if (ConjRhs) x_tmp = rhs.conjugate(); else x_tmp = rhs; \\\n     x = x_tmp.data(); \\\n     if (size<rows) { \\\n       y = _res + size*resIncr; \\\n       a = _lhs + size; \\\n       m = convert_index<BlasIndex>(rows-size); \\\n       n = convert_index<BlasIndex>(size); \\\n     } \\\n     else { \\\n       x += size; \\\n       y = _res; \\\n       a = _lhs + size*lda; \\\n       m = convert_index<BlasIndex>(size); \\\n       n = convert_index<BlasIndex>(cols-size); \\\n     } \\\n     BLASPREFIX##gemv##BLASPOSTFIX(&trans, &m, &n, (const BLASTYPE*)&numext::real_ref(alpha), (const BLASTYPE*)a, &lda, (const BLASTYPE*)x, &incx, (const BLASTYPE*)&numext::real_ref(beta), (BLASTYPE*)y, &incy); \\\n   } \\\n  } \\\n};\n\n#ifdef EIGEN_USE_MKL\nEIGEN_BLAS_TRMV_CM(double,   double, d,  d,)\nEIGEN_BLAS_TRMV_CM(dcomplex, MKL_Complex16, cd, z,)\nEIGEN_BLAS_TRMV_CM(float,    float,  f,  s,)\nEIGEN_BLAS_TRMV_CM(scomplex, MKL_Complex8,  cf, c,)\n#else\nEIGEN_BLAS_TRMV_CM(double,   double, d,  d, _)\nEIGEN_BLAS_TRMV_CM(dcomplex, double, cd, z, _)\nEIGEN_BLAS_TRMV_CM(float,    float,  f,  s, _)\nEIGEN_BLAS_TRMV_CM(scomplex, float,  cf, c, _)\n#endif\n\n// implements row-major: res += alpha * op(triangular) * vector\n#define EIGEN_BLAS_TRMV_RM(EIGTYPE, BLASTYPE, EIGPREFIX, BLASPREFIX, BLASPOSTFIX) \\\ntemplate<typename Index, int Mode, bool ConjLhs, bool ConjRhs> \\\nstruct triangular_matrix_vector_product_trmv<Index,Mode,EIGTYPE,ConjLhs,EIGTYPE,ConjRhs,RowMajor> { \\\n  enum { \\\n    IsLower = (Mode&Lower) == Lower, \\\n    SetDiag = (Mode&(ZeroDiag|UnitDiag)) ? 0 : 1, \\\n    IsUnitDiag  = (Mode&UnitDiag) ? 1 : 0, \\\n    IsZeroDiag  = (Mode&ZeroDiag) ? 1 : 0, \\\n    LowUp = IsLower ? Lower : Upper \\\n  }; \\\n static void run(Index _rows, Index _cols, const EIGTYPE* _lhs, Index lhsStride, \\\n                 const EIGTYPE* _rhs, Index rhsIncr, EIGTYPE* _res, Index resIncr, EIGTYPE alpha) \\\n { \\\n   if (IsZeroDiag) { \\\n     triangular_matrix_vector_product<Index,Mode,EIGTYPE,ConjLhs,EIGTYPE,ConjRhs,RowMajor,BuiltIn>::run( \\\n       _rows, _cols, _lhs, lhsStride, _rhs, rhsIncr, _res, resIncr, alpha); \\\n     return; \\\n   }\\\n   Index size = (std::min)(_rows,_cols); \\\n   Index rows = IsLower ? _rows : size; \\\n   Index cols = IsLower ? size : _cols; \\\n\\\n   typedef VectorX##EIGPREFIX VectorRhs; \\\n   EIGTYPE *x, *y;\\\n\\\n/* Set x*/ \\\n   Map<const VectorRhs, 0, InnerStride<> > rhs(_rhs,cols,InnerStride<>(rhsIncr)); \\\n   VectorRhs x_tmp; \\\n   if (ConjRhs) x_tmp = rhs.conjugate(); else x_tmp = rhs; \\\n   x = x_tmp.data(); \\\n\\\n/* Square part handling */\\\n\\\n   char trans, uplo, diag; \\\n   BlasIndex m, n, lda, incx, incy; \\\n   EIGTYPE const *a; \\\n   EIGTYPE beta(1); \\\n\\\n/* Set m, n */ \\\n   n = convert_index<BlasIndex>(size); \\\n   lda = convert_index<BlasIndex>(lhsStride); \\\n   incx = 1; \\\n   incy = convert_index<BlasIndex>(resIncr); \\\n\\\n/* Set uplo, trans and diag*/ \\\n   trans = ConjLhs ? 'C' : 'T'; \\\n   uplo = IsLower ? 'U' : 'L'; \\\n   diag = IsUnitDiag ? 'U' : 'N'; \\\n\\\n/* call ?TRMV*/ \\\n   BLASPREFIX##trmv##BLASPOSTFIX(&uplo, &trans, &diag, &n, (const BLASTYPE*)_lhs, &lda, (BLASTYPE*)x, &incx); \\\n\\\n/* Add op(a_tr)rhs into res*/ \\\n   BLASPREFIX##axpy##BLASPOSTFIX(&n, (const BLASTYPE*)&numext::real_ref(alpha),(const BLASTYPE*)x, &incx, (BLASTYPE*)_res, &incy); \\\n/* Non-square case - doesn't fit to BLAS ?TRMV. Fall to default triangular product*/ \\\n   if (size<(std::max)(rows,cols)) { \\\n     if (ConjRhs) x_tmp = rhs.conjugate(); else x_tmp = rhs; \\\n     x = x_tmp.data(); \\\n     if (size<rows) { \\\n       y = _res + size*resIncr; \\\n       a = _lhs + size*lda; \\\n       m = convert_index<BlasIndex>(rows-size); \\\n       n = convert_index<BlasIndex>(size); \\\n     } \\\n     else { \\\n       x += size; \\\n       y = _res; \\\n       a = _lhs + size; \\\n       m = convert_index<BlasIndex>(size); \\\n       n = convert_index<BlasIndex>(cols-size); \\\n     } \\\n     BLASPREFIX##gemv##BLASPOSTFIX(&trans, &n, &m, (const BLASTYPE*)&numext::real_ref(alpha), (const BLASTYPE*)a, &lda, (const BLASTYPE*)x, &incx, (const BLASTYPE*)&numext::real_ref(beta), (BLASTYPE*)y, &incy); \\\n   } \\\n  } \\\n};\n\n#ifdef EIGEN_USE_MKL\nEIGEN_BLAS_TRMV_RM(double,   double, d,  d,)\nEIGEN_BLAS_TRMV_RM(dcomplex, MKL_Complex16, cd, z,)\nEIGEN_BLAS_TRMV_RM(float,    float,  f,  s,)\nEIGEN_BLAS_TRMV_RM(scomplex, MKL_Complex8,  cf, c,)\n#else\nEIGEN_BLAS_TRMV_RM(double,   double, d,  d,_)\nEIGEN_BLAS_TRMV_RM(dcomplex, double, cd, z,_)\nEIGEN_BLAS_TRMV_RM(float,    float,  f,  s,_)\nEIGEN_BLAS_TRMV_RM(scomplex, float,  cf, c,_)\n#endif\n\n} // end namespase internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_TRIANGULAR_MATRIX_VECTOR_BLAS_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/products/TriangularSolverMatrix.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_TRIANGULAR_SOLVER_MATRIX_H\n#define EIGEN_TRIANGULAR_SOLVER_MATRIX_H\n\nnamespace Eigen { \n\nnamespace internal {\n\n// if the rhs is row major, let's transpose the product\ntemplate <typename Scalar, typename Index, int Side, int Mode, bool Conjugate, int TriStorageOrder, int OtherInnerStride>\nstruct triangular_solve_matrix<Scalar,Index,Side,Mode,Conjugate,TriStorageOrder,RowMajor,OtherInnerStride>\n{\n  static void run(\n    Index size, Index cols,\n    const Scalar*  tri, Index triStride,\n    Scalar* _other, Index otherIncr, Index otherStride,\n    level3_blocking<Scalar,Scalar>& blocking)\n  {\n    triangular_solve_matrix<\n      Scalar, Index, Side==OnTheLeft?OnTheRight:OnTheLeft,\n      (Mode&UnitDiag) | ((Mode&Upper) ? Lower : Upper),\n      NumTraits<Scalar>::IsComplex && Conjugate,\n      TriStorageOrder==RowMajor ? ColMajor : RowMajor, ColMajor, OtherInnerStride>\n      ::run(size, cols, tri, triStride, _other, otherIncr, otherStride, blocking);\n  }\n};\n\n/* Optimized triangular solver with multiple right hand side and the triangular matrix on the left\n */\ntemplate <typename Scalar, typename Index, int Mode, bool Conjugate, int TriStorageOrder,int OtherInnerStride>\nstruct triangular_solve_matrix<Scalar,Index,OnTheLeft,Mode,Conjugate,TriStorageOrder,ColMajor,OtherInnerStride>\n{\n  static EIGEN_DONT_INLINE void run(\n    Index size, Index otherSize,\n    const Scalar* _tri, Index triStride,\n    Scalar* _other, Index otherIncr, Index otherStride,\n    level3_blocking<Scalar,Scalar>& blocking);\n};\ntemplate <typename Scalar, typename Index, int Mode, bool Conjugate, int TriStorageOrder, int OtherInnerStride>\nEIGEN_DONT_INLINE void triangular_solve_matrix<Scalar,Index,OnTheLeft,Mode,Conjugate,TriStorageOrder,ColMajor,OtherInnerStride>::run(\n    Index size, Index otherSize,\n    const Scalar* _tri, Index triStride,\n    Scalar* _other, Index otherIncr, Index otherStride,\n    level3_blocking<Scalar,Scalar>& blocking)\n  {\n    Index cols = otherSize;\n\n    typedef const_blas_data_mapper<Scalar, Index, TriStorageOrder> TriMapper;\n    typedef blas_data_mapper<Scalar, Index, ColMajor, Unaligned, OtherInnerStride> OtherMapper;\n    TriMapper tri(_tri, triStride);\n    OtherMapper other(_other, otherStride, otherIncr);\n\n    typedef gebp_traits<Scalar,Scalar> Traits;\n\n    enum {\n      SmallPanelWidth   = EIGEN_PLAIN_ENUM_MAX(Traits::mr,Traits::nr),\n      IsLower = (Mode&Lower) == Lower\n    };\n\n    Index kc = blocking.kc();                   // cache block size along the K direction\n    Index mc = (std::min)(size,blocking.mc());  // cache block size along the M direction\n\n    std::size_t sizeA = kc*mc;\n    std::size_t sizeB = kc*cols;\n\n    ei_declare_aligned_stack_constructed_variable(Scalar, blockA, sizeA, blocking.blockA());\n    ei_declare_aligned_stack_constructed_variable(Scalar, blockB, sizeB, blocking.blockB());\n\n    conj_if<Conjugate> conj;\n    gebp_kernel<Scalar, Scalar, Index, OtherMapper, Traits::mr, Traits::nr, Conjugate, false> gebp_kernel;\n    gemm_pack_lhs<Scalar, Index, TriMapper, Traits::mr, Traits::LhsProgress, typename Traits::LhsPacket4Packing, TriStorageOrder> pack_lhs;\n    gemm_pack_rhs<Scalar, Index, OtherMapper, Traits::nr, ColMajor, false, true> pack_rhs;\n\n    // the goal here is to subdivise the Rhs panels such that we keep some cache\n    // coherence when accessing the rhs elements\n    std::ptrdiff_t l1, l2, l3;\n    manage_caching_sizes(GetAction, &l1, &l2, &l3);\n    Index subcols = cols>0 ? l2/(4 * sizeof(Scalar) * std::max<Index>(otherStride,size)) : 0;\n    subcols = std::max<Index>((subcols/Traits::nr)*Traits::nr, Traits::nr);\n\n    for(Index k2=IsLower ? 0 : size;\n        IsLower ? k2<size : k2>0;\n        IsLower ? k2+=kc : k2-=kc)\n    {\n      const Index actual_kc = (std::min)(IsLower ? size-k2 : k2, kc);\n\n      // We have selected and packed a big horizontal panel R1 of rhs. Let B be the packed copy of this panel,\n      // and R2 the remaining part of rhs. The corresponding vertical panel of lhs is split into\n      // A11 (the triangular part) and A21 the remaining rectangular part.\n      // Then the high level algorithm is:\n      //  - B = R1                    => general block copy (done during the next step)\n      //  - R1 = A11^-1 B             => tricky part\n      //  - update B from the new R1  => actually this has to be performed continuously during the above step\n      //  - R2 -= A21 * B             => GEPP\n\n      // The tricky part: compute R1 = A11^-1 B while updating B from R1\n      // The idea is to split A11 into multiple small vertical panels.\n      // Each panel can be split into a small triangular part T1k which is processed without optimization,\n      // and the remaining small part T2k which is processed using gebp with appropriate block strides\n      for(Index j2=0; j2<cols; j2+=subcols)\n      {\n        Index actual_cols = (std::min)(cols-j2,subcols);\n        // for each small vertical panels [T1k^T, T2k^T]^T of lhs\n        for (Index k1=0; k1<actual_kc; k1+=SmallPanelWidth)\n        {\n          Index actualPanelWidth = std::min<Index>(actual_kc-k1, SmallPanelWidth);\n          // tr solve\n          for (Index k=0; k<actualPanelWidth; ++k)\n          {\n            // TODO write a small kernel handling this (can be shared with trsv)\n            Index i  = IsLower ? k2+k1+k : k2-k1-k-1;\n            Index rs = actualPanelWidth - k - 1; // remaining size\n            Index s  = TriStorageOrder==RowMajor ? (IsLower ? k2+k1 : i+1)\n                                                 :  IsLower ? i+1 : i-rs;\n\n            Scalar a = (Mode & UnitDiag) ? Scalar(1) : Scalar(1)/conj(tri(i,i));\n            for (Index j=j2; j<j2+actual_cols; ++j)\n            {\n              if (TriStorageOrder==RowMajor)\n              {\n                Scalar b(0);\n                const Scalar* l = &tri(i,s);\n                typename OtherMapper::LinearMapper r = other.getLinearMapper(s,j);\n                for (Index i3=0; i3<k; ++i3)\n                  b += conj(l[i3]) * r(i3);\n\n                other(i,j) = (other(i,j) - b)*a;\n              }\n              else\n              {\n                Scalar b = (other(i,j) *= a);\n                typename OtherMapper::LinearMapper r = other.getLinearMapper(s,j);\n                typename TriMapper::LinearMapper l = tri.getLinearMapper(s,i);\n                for (Index i3=0;i3<rs;++i3)\n                  r(i3) -= b * conj(l(i3));\n              }\n            }\n          }\n\n          Index lengthTarget = actual_kc-k1-actualPanelWidth;\n          Index startBlock   = IsLower ? k2+k1 : k2-k1-actualPanelWidth;\n          Index blockBOffset = IsLower ? k1 : lengthTarget;\n\n          // update the respective rows of B from other\n          pack_rhs(blockB+actual_kc*j2, other.getSubMapper(startBlock,j2), actualPanelWidth, actual_cols, actual_kc, blockBOffset);\n\n          // GEBP\n          if (lengthTarget>0)\n          {\n            Index startTarget  = IsLower ? k2+k1+actualPanelWidth : k2-actual_kc;\n\n            pack_lhs(blockA, tri.getSubMapper(startTarget,startBlock), actualPanelWidth, lengthTarget);\n\n            gebp_kernel(other.getSubMapper(startTarget,j2), blockA, blockB+actual_kc*j2, lengthTarget, actualPanelWidth, actual_cols, Scalar(-1),\n                        actualPanelWidth, actual_kc, 0, blockBOffset);\n          }\n        }\n      }\n      \n      // R2 -= A21 * B => GEPP\n      {\n        Index start = IsLower ? k2+kc : 0;\n        Index end   = IsLower ? size : k2-kc;\n        for(Index i2=start; i2<end; i2+=mc)\n        {\n          const Index actual_mc = (std::min)(mc,end-i2);\n          if (actual_mc>0)\n          {\n            pack_lhs(blockA, tri.getSubMapper(i2, IsLower ? k2 : k2-kc), actual_kc, actual_mc);\n\n            gebp_kernel(other.getSubMapper(i2, 0), blockA, blockB, actual_mc, actual_kc, cols, Scalar(-1), -1, -1, 0, 0);\n          }\n        }\n      }\n    }\n  }\n\n/* Optimized triangular solver with multiple left hand sides and the triangular matrix on the right\n */\ntemplate <typename Scalar, typename Index, int Mode, bool Conjugate, int TriStorageOrder, int OtherInnerStride>\nstruct triangular_solve_matrix<Scalar,Index,OnTheRight,Mode,Conjugate,TriStorageOrder,ColMajor,OtherInnerStride>\n{\n  static EIGEN_DONT_INLINE void run(\n    Index size, Index otherSize,\n    const Scalar* _tri, Index triStride,\n    Scalar* _other, Index otherIncr, Index otherStride,\n    level3_blocking<Scalar,Scalar>& blocking);\n};\ntemplate <typename Scalar, typename Index, int Mode, bool Conjugate, int TriStorageOrder, int OtherInnerStride>\nEIGEN_DONT_INLINE void triangular_solve_matrix<Scalar,Index,OnTheRight,Mode,Conjugate,TriStorageOrder,ColMajor,OtherInnerStride>::run(\n    Index size, Index otherSize,\n    const Scalar* _tri, Index triStride,\n    Scalar* _other, Index otherIncr, Index otherStride,\n    level3_blocking<Scalar,Scalar>& blocking)\n  {\n    Index rows = otherSize;\n    typedef typename NumTraits<Scalar>::Real RealScalar;\n\n    typedef blas_data_mapper<Scalar, Index, ColMajor, Unaligned, OtherInnerStride> LhsMapper;\n    typedef const_blas_data_mapper<Scalar, Index, TriStorageOrder> RhsMapper;\n    LhsMapper lhs(_other, otherStride, otherIncr);\n    RhsMapper rhs(_tri, triStride);\n\n    typedef gebp_traits<Scalar,Scalar> Traits;\n    enum {\n      RhsStorageOrder   = TriStorageOrder,\n      SmallPanelWidth   = EIGEN_PLAIN_ENUM_MAX(Traits::mr,Traits::nr),\n      IsLower = (Mode&Lower) == Lower\n    };\n\n    Index kc = blocking.kc();                   // cache block size along the K direction\n    Index mc = (std::min)(rows,blocking.mc());  // cache block size along the M direction\n\n    std::size_t sizeA = kc*mc;\n    std::size_t sizeB = kc*size;\n\n    ei_declare_aligned_stack_constructed_variable(Scalar, blockA, sizeA, blocking.blockA());\n    ei_declare_aligned_stack_constructed_variable(Scalar, blockB, sizeB, blocking.blockB());\n\n    conj_if<Conjugate> conj;\n    gebp_kernel<Scalar, Scalar, Index, LhsMapper, Traits::mr, Traits::nr, false, Conjugate> gebp_kernel;\n    gemm_pack_rhs<Scalar, Index, RhsMapper, Traits::nr, RhsStorageOrder> pack_rhs;\n    gemm_pack_rhs<Scalar, Index, RhsMapper, Traits::nr, RhsStorageOrder,false,true> pack_rhs_panel;\n    gemm_pack_lhs<Scalar, Index, LhsMapper, Traits::mr, Traits::LhsProgress, typename Traits::LhsPacket4Packing, ColMajor, false, true> pack_lhs_panel;\n\n    for(Index k2=IsLower ? size : 0;\n        IsLower ? k2>0 : k2<size;\n        IsLower ? k2-=kc : k2+=kc)\n    {\n      const Index actual_kc = (std::min)(IsLower ? k2 : size-k2, kc);\n      Index actual_k2 = IsLower ? k2-actual_kc : k2 ;\n\n      Index startPanel = IsLower ? 0 : k2+actual_kc;\n      Index rs = IsLower ? actual_k2 : size - actual_k2 - actual_kc;\n      Scalar* geb = blockB+actual_kc*actual_kc;\n\n      if (rs>0) pack_rhs(geb, rhs.getSubMapper(actual_k2,startPanel), actual_kc, rs);\n\n      // triangular packing (we only pack the panels off the diagonal,\n      // neglecting the blocks overlapping the diagonal\n      {\n        for (Index j2=0; j2<actual_kc; j2+=SmallPanelWidth)\n        {\n          Index actualPanelWidth = std::min<Index>(actual_kc-j2, SmallPanelWidth);\n          Index actual_j2 = actual_k2 + j2;\n          Index panelOffset = IsLower ? j2+actualPanelWidth : 0;\n          Index panelLength = IsLower ? actual_kc-j2-actualPanelWidth : j2;\n\n          if (panelLength>0)\n          pack_rhs_panel(blockB+j2*actual_kc,\n                         rhs.getSubMapper(actual_k2+panelOffset, actual_j2),\n                         panelLength, actualPanelWidth,\n                         actual_kc, panelOffset);\n        }\n      }\n\n      for(Index i2=0; i2<rows; i2+=mc)\n      {\n        const Index actual_mc = (std::min)(mc,rows-i2);\n\n        // triangular solver kernel\n        {\n          // for each small block of the diagonal (=> vertical panels of rhs)\n          for (Index j2 = IsLower\n                      ? (actual_kc - ((actual_kc%SmallPanelWidth) ? Index(actual_kc%SmallPanelWidth)\n                                                                  : Index(SmallPanelWidth)))\n                      : 0;\n               IsLower ? j2>=0 : j2<actual_kc;\n               IsLower ? j2-=SmallPanelWidth : j2+=SmallPanelWidth)\n          {\n            Index actualPanelWidth = std::min<Index>(actual_kc-j2, SmallPanelWidth);\n            Index absolute_j2 = actual_k2 + j2;\n            Index panelOffset = IsLower ? j2+actualPanelWidth : 0;\n            Index panelLength = IsLower ? actual_kc - j2 - actualPanelWidth : j2;\n\n            // GEBP\n            if(panelLength>0)\n            {\n              gebp_kernel(lhs.getSubMapper(i2,absolute_j2),\n                          blockA, blockB+j2*actual_kc,\n                          actual_mc, panelLength, actualPanelWidth,\n                          Scalar(-1),\n                          actual_kc, actual_kc, // strides\n                          panelOffset, panelOffset); // offsets\n            }\n\n            // unblocked triangular solve\n            for (Index k=0; k<actualPanelWidth; ++k)\n            {\n              Index j = IsLower ? absolute_j2+actualPanelWidth-k-1 : absolute_j2+k;\n\n              typename LhsMapper::LinearMapper r = lhs.getLinearMapper(i2,j);\n              for (Index k3=0; k3<k; ++k3)\n              {\n                Scalar b = conj(rhs(IsLower ? j+1+k3 : absolute_j2+k3,j));\n                typename LhsMapper::LinearMapper a = lhs.getLinearMapper(i2,IsLower ? j+1+k3 : absolute_j2+k3);\n                for (Index i=0; i<actual_mc; ++i)\n                  r(i) -= a(i) * b;\n              }\n              if((Mode & UnitDiag)==0)\n              {\n                Scalar inv_rjj = RealScalar(1)/conj(rhs(j,j));\n                for (Index i=0; i<actual_mc; ++i)\n                  r(i) *= inv_rjj;\n              }\n            }\n\n            // pack the just computed part of lhs to A\n            pack_lhs_panel(blockA, lhs.getSubMapper(i2,absolute_j2),\n                           actualPanelWidth, actual_mc,\n                           actual_kc, j2);\n          }\n        }\n\n        if (rs>0)\n          gebp_kernel(lhs.getSubMapper(i2, startPanel), blockA, geb,\n                      actual_mc, actual_kc, rs, Scalar(-1),\n                      -1, -1, 0, 0);\n      }\n    }\n  }\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_TRIANGULAR_SOLVER_MATRIX_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/products/TriangularSolverMatrix_BLAS.h",
    "content": "/*\n Copyright (c) 2011, Intel Corporation. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without modification,\n are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n   list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n * Neither the name of Intel Corporation nor the names of its contributors may\n   be used to endorse or promote products derived from this software without\n   specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\n ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n ********************************************************************************\n *   Content : Eigen bindings to BLAS F77\n *   Triangular matrix * matrix product functionality based on ?TRMM.\n ********************************************************************************\n*/\n\n#ifndef EIGEN_TRIANGULAR_SOLVER_MATRIX_BLAS_H\n#define EIGEN_TRIANGULAR_SOLVER_MATRIX_BLAS_H\n\nnamespace Eigen {\n\nnamespace internal {\n\n// implements LeftSide op(triangular)^-1 * general\n#define EIGEN_BLAS_TRSM_L(EIGTYPE, BLASTYPE, BLASFUNC) \\\ntemplate <typename Index, int Mode, bool Conjugate, int TriStorageOrder> \\\nstruct triangular_solve_matrix<EIGTYPE,Index,OnTheLeft,Mode,Conjugate,TriStorageOrder,ColMajor,1> \\\n{ \\\n  enum { \\\n    IsLower = (Mode&Lower) == Lower, \\\n    IsUnitDiag  = (Mode&UnitDiag) ? 1 : 0, \\\n    IsZeroDiag  = (Mode&ZeroDiag) ? 1 : 0, \\\n    conjA = ((TriStorageOrder==ColMajor) && Conjugate) ? 1 : 0 \\\n  }; \\\n  static void run( \\\n      Index size, Index otherSize, \\\n      const EIGTYPE* _tri, Index triStride, \\\n      EIGTYPE* _other, Index otherIncr, Index otherStride, level3_blocking<EIGTYPE,EIGTYPE>& /*blocking*/) \\\n  { \\\n   EIGEN_ONLY_USED_FOR_DEBUG(otherIncr); \\\n   eigen_assert(otherIncr == 1); \\\n   BlasIndex m = convert_index<BlasIndex>(size), n = convert_index<BlasIndex>(otherSize), lda, ldb; \\\n   char side = 'L', uplo, diag='N', transa; \\\n   /* Set alpha_ */ \\\n   EIGTYPE alpha(1); \\\n   ldb = convert_index<BlasIndex>(otherStride);\\\n\\\n   const EIGTYPE *a; \\\n/* Set trans */ \\\n   transa = (TriStorageOrder==RowMajor) ? ((Conjugate) ? 'C' : 'T') : 'N'; \\\n/* Set uplo */ \\\n   uplo = IsLower ? 'L' : 'U'; \\\n   if (TriStorageOrder==RowMajor) uplo = (uplo == 'L') ? 'U' : 'L'; \\\n/* Set a, lda */ \\\n   typedef Matrix<EIGTYPE, Dynamic, Dynamic, TriStorageOrder> MatrixTri; \\\n   Map<const MatrixTri, 0, OuterStride<> > tri(_tri,size,size,OuterStride<>(triStride)); \\\n   MatrixTri a_tmp; \\\n\\\n   if (conjA) { \\\n     a_tmp = tri.conjugate(); \\\n     a = a_tmp.data(); \\\n     lda = convert_index<BlasIndex>(a_tmp.outerStride()); \\\n   } else { \\\n     a = _tri; \\\n     lda = convert_index<BlasIndex>(triStride); \\\n   } \\\n   if (IsUnitDiag) diag='U'; \\\n/* call ?trsm*/ \\\n   BLASFUNC(&side, &uplo, &transa, &diag, &m, &n, (const BLASTYPE*)&numext::real_ref(alpha), (const BLASTYPE*)a, &lda, (BLASTYPE*)_other, &ldb); \\\n } \\\n};\n\n#ifdef EIGEN_USE_MKL\nEIGEN_BLAS_TRSM_L(double,   double, dtrsm)\nEIGEN_BLAS_TRSM_L(dcomplex, MKL_Complex16, ztrsm)\nEIGEN_BLAS_TRSM_L(float,    float,  strsm)\nEIGEN_BLAS_TRSM_L(scomplex, MKL_Complex8, ctrsm)\n#else\nEIGEN_BLAS_TRSM_L(double,   double, dtrsm_)\nEIGEN_BLAS_TRSM_L(dcomplex, double, ztrsm_)\nEIGEN_BLAS_TRSM_L(float,    float,  strsm_)\nEIGEN_BLAS_TRSM_L(scomplex, float,  ctrsm_)\n#endif\n\n// implements RightSide general * op(triangular)^-1\n#define EIGEN_BLAS_TRSM_R(EIGTYPE, BLASTYPE, BLASFUNC) \\\ntemplate <typename Index, int Mode, bool Conjugate, int TriStorageOrder> \\\nstruct triangular_solve_matrix<EIGTYPE,Index,OnTheRight,Mode,Conjugate,TriStorageOrder,ColMajor,1> \\\n{ \\\n  enum { \\\n    IsLower = (Mode&Lower) == Lower, \\\n    IsUnitDiag  = (Mode&UnitDiag) ? 1 : 0, \\\n    IsZeroDiag  = (Mode&ZeroDiag) ? 1 : 0, \\\n    conjA = ((TriStorageOrder==ColMajor) && Conjugate) ? 1 : 0 \\\n  }; \\\n  static void run( \\\n      Index size, Index otherSize, \\\n      const EIGTYPE* _tri, Index triStride, \\\n      EIGTYPE* _other, Index otherIncr, Index otherStride, level3_blocking<EIGTYPE,EIGTYPE>& /*blocking*/) \\\n  { \\\n   EIGEN_ONLY_USED_FOR_DEBUG(otherIncr); \\\n   eigen_assert(otherIncr == 1); \\\n   BlasIndex m = convert_index<BlasIndex>(otherSize), n = convert_index<BlasIndex>(size), lda, ldb; \\\n   char side = 'R', uplo, diag='N', transa; \\\n   /* Set alpha_ */ \\\n   EIGTYPE alpha(1); \\\n   ldb = convert_index<BlasIndex>(otherStride);\\\n\\\n   const EIGTYPE *a; \\\n/* Set trans */ \\\n   transa = (TriStorageOrder==RowMajor) ? ((Conjugate) ? 'C' : 'T') : 'N'; \\\n/* Set uplo */ \\\n   uplo = IsLower ? 'L' : 'U'; \\\n   if (TriStorageOrder==RowMajor) uplo = (uplo == 'L') ? 'U' : 'L'; \\\n/* Set a, lda */ \\\n   typedef Matrix<EIGTYPE, Dynamic, Dynamic, TriStorageOrder> MatrixTri; \\\n   Map<const MatrixTri, 0, OuterStride<> > tri(_tri,size,size,OuterStride<>(triStride)); \\\n   MatrixTri a_tmp; \\\n\\\n   if (conjA) { \\\n     a_tmp = tri.conjugate(); \\\n     a = a_tmp.data(); \\\n     lda = convert_index<BlasIndex>(a_tmp.outerStride()); \\\n   } else { \\\n     a = _tri; \\\n     lda = convert_index<BlasIndex>(triStride); \\\n   } \\\n   if (IsUnitDiag) diag='U'; \\\n/* call ?trsm*/ \\\n   BLASFUNC(&side, &uplo, &transa, &diag, &m, &n, (const BLASTYPE*)&numext::real_ref(alpha), (const BLASTYPE*)a, &lda, (BLASTYPE*)_other, &ldb); \\\n   /*std::cout << \"TRMS_L specialization!\\n\";*/ \\\n } \\\n};\n\n#ifdef EIGEN_USE_MKL\nEIGEN_BLAS_TRSM_R(double,   double, dtrsm)\nEIGEN_BLAS_TRSM_R(dcomplex, MKL_Complex16, ztrsm)\nEIGEN_BLAS_TRSM_R(float,    float,  strsm)\nEIGEN_BLAS_TRSM_R(scomplex, MKL_Complex8,  ctrsm)\n#else\nEIGEN_BLAS_TRSM_R(double,   double, dtrsm_)\nEIGEN_BLAS_TRSM_R(dcomplex, double, ztrsm_)\nEIGEN_BLAS_TRSM_R(float,    float,  strsm_)\nEIGEN_BLAS_TRSM_R(scomplex, float,  ctrsm_)\n#endif\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_TRIANGULAR_SOLVER_MATRIX_BLAS_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/products/TriangularSolverVector.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_TRIANGULAR_SOLVER_VECTOR_H\n#define EIGEN_TRIANGULAR_SOLVER_VECTOR_H\n\nnamespace Eigen {\n\nnamespace internal {\n\ntemplate<typename LhsScalar, typename RhsScalar, typename Index, int Mode, bool Conjugate, int StorageOrder>\nstruct triangular_solve_vector<LhsScalar, RhsScalar, Index, OnTheRight, Mode, Conjugate, StorageOrder>\n{\n  static void run(Index size, const LhsScalar* _lhs, Index lhsStride, RhsScalar* rhs)\n  {\n    triangular_solve_vector<LhsScalar,RhsScalar,Index,OnTheLeft,\n        ((Mode&Upper)==Upper ? Lower : Upper) | (Mode&UnitDiag),\n        Conjugate,StorageOrder==RowMajor?ColMajor:RowMajor\n      >::run(size, _lhs, lhsStride, rhs);\n  }\n};\n\n// forward and backward substitution, row-major, rhs is a vector\ntemplate<typename LhsScalar, typename RhsScalar, typename Index, int Mode, bool Conjugate>\nstruct triangular_solve_vector<LhsScalar, RhsScalar, Index, OnTheLeft, Mode, Conjugate, RowMajor>\n{\n  enum {\n    IsLower = ((Mode&Lower)==Lower)\n  };\n  static void run(Index size, const LhsScalar* _lhs, Index lhsStride, RhsScalar* rhs)\n  {\n    typedef Map<const Matrix<LhsScalar,Dynamic,Dynamic,RowMajor>, 0, OuterStride<> > LhsMap;\n    const LhsMap lhs(_lhs,size,size,OuterStride<>(lhsStride));\n\n    typedef const_blas_data_mapper<LhsScalar,Index,RowMajor> LhsMapper;\n    typedef const_blas_data_mapper<RhsScalar,Index,ColMajor> RhsMapper;\n\n    typename internal::conditional<\n                          Conjugate,\n                          const CwiseUnaryOp<typename internal::scalar_conjugate_op<LhsScalar>,LhsMap>,\n                          const LhsMap&>\n                        ::type cjLhs(lhs);\n    static const Index PanelWidth = EIGEN_TUNE_TRIANGULAR_PANEL_WIDTH;\n    for(Index pi=IsLower ? 0 : size;\n        IsLower ? pi<size : pi>0;\n        IsLower ? pi+=PanelWidth : pi-=PanelWidth)\n    {\n      Index actualPanelWidth = (std::min)(IsLower ? size - pi : pi, PanelWidth);\n\n      Index r = IsLower ? pi : size - pi; // remaining size\n      if (r > 0)\n      {\n        // let's directly call the low level product function because:\n        // 1 - it is faster to compile\n        // 2 - it is slightly faster at runtime\n        Index startRow = IsLower ? pi : pi-actualPanelWidth;\n        Index startCol = IsLower ? 0 : pi;\n\n        general_matrix_vector_product<Index,LhsScalar,LhsMapper,RowMajor,Conjugate,RhsScalar,RhsMapper,false>::run(\n          actualPanelWidth, r,\n          LhsMapper(&lhs.coeffRef(startRow,startCol), lhsStride),\n          RhsMapper(rhs + startCol, 1),\n          rhs + startRow, 1,\n          RhsScalar(-1));\n      }\n\n      for(Index k=0; k<actualPanelWidth; ++k)\n      {\n        Index i = IsLower ? pi+k : pi-k-1;\n        Index s = IsLower ? pi   : i+1;\n        if (k>0)\n          rhs[i] -= (cjLhs.row(i).segment(s,k).transpose().cwiseProduct(Map<const Matrix<RhsScalar,Dynamic,1> >(rhs+s,k))).sum();\n\n        if((!(Mode & UnitDiag)) && numext::not_equal_strict(rhs[i],RhsScalar(0)))\n          rhs[i] /= cjLhs(i,i);\n      }\n    }\n  }\n};\n\n// forward and backward substitution, column-major, rhs is a vector\ntemplate<typename LhsScalar, typename RhsScalar, typename Index, int Mode, bool Conjugate>\nstruct triangular_solve_vector<LhsScalar, RhsScalar, Index, OnTheLeft, Mode, Conjugate, ColMajor>\n{\n  enum {\n    IsLower = ((Mode&Lower)==Lower)\n  };\n  static void run(Index size, const LhsScalar* _lhs, Index lhsStride, RhsScalar* rhs)\n  {\n    typedef Map<const Matrix<LhsScalar,Dynamic,Dynamic,ColMajor>, 0, OuterStride<> > LhsMap;\n    const LhsMap lhs(_lhs,size,size,OuterStride<>(lhsStride));\n    typedef const_blas_data_mapper<LhsScalar,Index,ColMajor> LhsMapper;\n    typedef const_blas_data_mapper<RhsScalar,Index,ColMajor> RhsMapper;\n    typename internal::conditional<Conjugate,\n                                   const CwiseUnaryOp<typename internal::scalar_conjugate_op<LhsScalar>,LhsMap>,\n                                   const LhsMap&\n                                  >::type cjLhs(lhs);\n    static const Index PanelWidth = EIGEN_TUNE_TRIANGULAR_PANEL_WIDTH;\n\n    for(Index pi=IsLower ? 0 : size;\n        IsLower ? pi<size : pi>0;\n        IsLower ? pi+=PanelWidth : pi-=PanelWidth)\n    {\n      Index actualPanelWidth = (std::min)(IsLower ? size - pi : pi, PanelWidth);\n      Index startBlock = IsLower ? pi : pi-actualPanelWidth;\n      Index endBlock = IsLower ? pi + actualPanelWidth : 0;\n\n      for(Index k=0; k<actualPanelWidth; ++k)\n      {\n        Index i = IsLower ? pi+k : pi-k-1;\n        if(numext::not_equal_strict(rhs[i],RhsScalar(0)))\n        {\n          if(!(Mode & UnitDiag))\n            rhs[i] /= cjLhs.coeff(i,i);\n\n          Index r = actualPanelWidth - k - 1; // remaining size\n          Index s = IsLower ? i+1 : i-r;\n          if (r>0)\n            Map<Matrix<RhsScalar,Dynamic,1> >(rhs+s,r) -= rhs[i] * cjLhs.col(i).segment(s,r);\n        }\n      }\n      Index r = IsLower ? size - endBlock : startBlock; // remaining size\n      if (r > 0)\n      {\n        // let's directly call the low level product function because:\n        // 1 - it is faster to compile\n        // 2 - it is slightly faster at runtime\n        general_matrix_vector_product<Index,LhsScalar,LhsMapper,ColMajor,Conjugate,RhsScalar,RhsMapper,false>::run(\n            r, actualPanelWidth,\n            LhsMapper(&lhs.coeffRef(endBlock,startBlock), lhsStride),\n            RhsMapper(rhs+startBlock, 1),\n            rhs+endBlock, 1, RhsScalar(-1));\n      }\n    }\n  }\n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_TRIANGULAR_SOLVER_VECTOR_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/util/BlasUtil.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009-2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_BLASUTIL_H\n#define EIGEN_BLASUTIL_H\n\n// This file contains many lightweight helper classes used to\n// implement and control fast level 2 and level 3 BLAS-like routines.\n\nnamespace Eigen {\n\nnamespace internal {\n\n// forward declarations\ntemplate<typename LhsScalar, typename RhsScalar, typename Index, typename DataMapper, int mr, int nr, bool ConjugateLhs=false, bool ConjugateRhs=false>\nstruct gebp_kernel;\n\ntemplate<typename Scalar, typename Index, typename DataMapper, int nr, int StorageOrder, bool Conjugate = false, bool PanelMode=false>\nstruct gemm_pack_rhs;\n\ntemplate<typename Scalar, typename Index, typename DataMapper, int Pack1, int Pack2, typename Packet, int StorageOrder, bool Conjugate = false, bool PanelMode = false>\nstruct gemm_pack_lhs;\n\ntemplate<\n  typename Index,\n  typename LhsScalar, int LhsStorageOrder, bool ConjugateLhs,\n  typename RhsScalar, int RhsStorageOrder, bool ConjugateRhs,\n  int ResStorageOrder, int ResInnerStride>\nstruct general_matrix_matrix_product;\n\ntemplate<typename Index,\n         typename LhsScalar, typename LhsMapper, int LhsStorageOrder, bool ConjugateLhs,\n         typename RhsScalar, typename RhsMapper, bool ConjugateRhs, int Version=Specialized>\nstruct general_matrix_vector_product;\n\n\ntemplate<bool Conjugate> struct conj_if;\n\ntemplate<> struct conj_if<true> {\n  template<typename T>\n  inline T operator()(const T& x) const { return numext::conj(x); }\n  template<typename T>\n  inline T pconj(const T& x) const { return internal::pconj(x); }\n};\n\ntemplate<> struct conj_if<false> {\n  template<typename T>\n  inline const T& operator()(const T& x) const { return x; }\n  template<typename T>\n  inline const T& pconj(const T& x) const { return x; }\n};\n\n// Generic implementation for custom complex types.\ntemplate<typename LhsScalar, typename RhsScalar, bool ConjLhs, bool ConjRhs>\nstruct conj_helper\n{\n  typedef typename ScalarBinaryOpTraits<LhsScalar,RhsScalar>::ReturnType Scalar;\n\n  EIGEN_STRONG_INLINE Scalar pmadd(const LhsScalar& x, const RhsScalar& y, const Scalar& c) const\n  { return padd(c, pmul(x,y)); }\n\n  EIGEN_STRONG_INLINE Scalar pmul(const LhsScalar& x, const RhsScalar& y) const\n  { return conj_if<ConjLhs>()(x) *  conj_if<ConjRhs>()(y); }\n};\n\ntemplate<typename Scalar> struct conj_helper<Scalar,Scalar,false,false>\n{\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar pmadd(const Scalar& x, const Scalar& y, const Scalar& c) const { return internal::pmadd(x,y,c); }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar pmul(const Scalar& x, const Scalar& y) const { return internal::pmul(x,y); }\n};\n\ntemplate<typename RealScalar> struct conj_helper<std::complex<RealScalar>, std::complex<RealScalar>, false,true>\n{\n  typedef std::complex<RealScalar> Scalar;\n  EIGEN_STRONG_INLINE Scalar pmadd(const Scalar& x, const Scalar& y, const Scalar& c) const\n  { return c + pmul(x,y); }\n\n  EIGEN_STRONG_INLINE Scalar pmul(const Scalar& x, const Scalar& y) const\n  { return Scalar(numext::real(x)*numext::real(y) + numext::imag(x)*numext::imag(y), numext::imag(x)*numext::real(y) - numext::real(x)*numext::imag(y)); }\n};\n\ntemplate<typename RealScalar> struct conj_helper<std::complex<RealScalar>, std::complex<RealScalar>, true,false>\n{\n  typedef std::complex<RealScalar> Scalar;\n  EIGEN_STRONG_INLINE Scalar pmadd(const Scalar& x, const Scalar& y, const Scalar& c) const\n  { return c + pmul(x,y); }\n\n  EIGEN_STRONG_INLINE Scalar pmul(const Scalar& x, const Scalar& y) const\n  { return Scalar(numext::real(x)*numext::real(y) + numext::imag(x)*numext::imag(y), numext::real(x)*numext::imag(y) - numext::imag(x)*numext::real(y)); }\n};\n\ntemplate<typename RealScalar> struct conj_helper<std::complex<RealScalar>, std::complex<RealScalar>, true,true>\n{\n  typedef std::complex<RealScalar> Scalar;\n  EIGEN_STRONG_INLINE Scalar pmadd(const Scalar& x, const Scalar& y, const Scalar& c) const\n  { return c + pmul(x,y); }\n\n  EIGEN_STRONG_INLINE Scalar pmul(const Scalar& x, const Scalar& y) const\n  { return Scalar(numext::real(x)*numext::real(y) - numext::imag(x)*numext::imag(y), - numext::real(x)*numext::imag(y) - numext::imag(x)*numext::real(y)); }\n};\n\ntemplate<typename RealScalar,bool Conj> struct conj_helper<std::complex<RealScalar>, RealScalar, Conj,false>\n{\n  typedef std::complex<RealScalar> Scalar;\n  EIGEN_STRONG_INLINE Scalar pmadd(const Scalar& x, const RealScalar& y, const Scalar& c) const\n  { return padd(c, pmul(x,y)); }\n  EIGEN_STRONG_INLINE Scalar pmul(const Scalar& x, const RealScalar& y) const\n  { return conj_if<Conj>()(x)*y; }\n};\n\ntemplate<typename RealScalar,bool Conj> struct conj_helper<RealScalar, std::complex<RealScalar>, false,Conj>\n{\n  typedef std::complex<RealScalar> Scalar;\n  EIGEN_STRONG_INLINE Scalar pmadd(const RealScalar& x, const Scalar& y, const Scalar& c) const\n  { return padd(c, pmul(x,y)); }\n  EIGEN_STRONG_INLINE Scalar pmul(const RealScalar& x, const Scalar& y) const\n  { return x*conj_if<Conj>()(y); }\n};\n\ntemplate<typename From,typename To> struct get_factor {\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE To run(const From& x) { return To(x); }\n};\n\ntemplate<typename Scalar> struct get_factor<Scalar,typename NumTraits<Scalar>::Real> {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE typename NumTraits<Scalar>::Real run(const Scalar& x) { return numext::real(x); }\n};\n\n\ntemplate<typename Scalar, typename Index>\nclass BlasVectorMapper {\n  public:\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE BlasVectorMapper(Scalar *data) : m_data(data) {}\n\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Scalar operator()(Index i) const {\n    return m_data[i];\n  }\n  template <typename Packet, int AlignmentType>\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Packet load(Index i) const {\n    return ploadt<Packet, AlignmentType>(m_data + i);\n  }\n\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC bool aligned(Index i) const {\n    return (UIntPtr(m_data+i)%sizeof(Packet))==0;\n  }\n\n  protected:\n  Scalar* m_data;\n};\n\ntemplate<typename Scalar, typename Index, int AlignmentType, int Incr=1>\nclass BlasLinearMapper;\n\ntemplate<typename Scalar, typename Index, int AlignmentType>\nclass BlasLinearMapper<Scalar,Index,AlignmentType>\n{\npublic:\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE BlasLinearMapper(Scalar *data, Index incr=1)\n    : m_data(data)\n  {\n    EIGEN_ONLY_USED_FOR_DEBUG(incr);\n    eigen_assert(incr==1);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void prefetch(int i) const {\n    internal::prefetch(&operator()(i));\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Scalar& operator()(Index i) const {\n    return m_data[i];\n  }\n\n  template<typename PacketType>\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE PacketType loadPacket(Index i) const {\n    return ploadt<PacketType, AlignmentType>(m_data + i);\n  }\n\n  template<typename PacketType>\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void storePacket(Index i, const PacketType &p) const {\n    pstoret<Scalar, PacketType, AlignmentType>(m_data + i, p);\n  }\n\nprotected:\n  Scalar *m_data;\n};\n\n// Lightweight helper class to access matrix coefficients.\ntemplate<typename Scalar, typename Index, int StorageOrder, int AlignmentType = Unaligned, int Incr = 1>\nclass blas_data_mapper;\n\ntemplate<typename Scalar, typename Index, int StorageOrder, int AlignmentType>\nclass blas_data_mapper<Scalar,Index,StorageOrder,AlignmentType,1>\n{\npublic:\n  typedef BlasLinearMapper<Scalar, Index, AlignmentType> LinearMapper;\n  typedef BlasVectorMapper<Scalar, Index> VectorMapper;\n\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE blas_data_mapper(Scalar* data, Index stride, Index incr=1)\n   : m_data(data), m_stride(stride)\n  {\n    EIGEN_ONLY_USED_FOR_DEBUG(incr);\n    eigen_assert(incr==1);\n  }\n\n  EIGEN_DEVICE_FUNC  EIGEN_ALWAYS_INLINE blas_data_mapper<Scalar, Index, StorageOrder, AlignmentType>\n  getSubMapper(Index i, Index j) const {\n    return blas_data_mapper<Scalar, Index, StorageOrder, AlignmentType>(&operator()(i, j), m_stride);\n  }\n\n  EIGEN_DEVICE_FUNC  EIGEN_ALWAYS_INLINE LinearMapper getLinearMapper(Index i, Index j) const {\n    return LinearMapper(&operator()(i, j));\n  }\n\n  EIGEN_DEVICE_FUNC  EIGEN_ALWAYS_INLINE VectorMapper getVectorMapper(Index i, Index j) const {\n    return VectorMapper(&operator()(i, j));\n  }\n\n\n  EIGEN_DEVICE_FUNC\n  EIGEN_ALWAYS_INLINE Scalar& operator()(Index i, Index j) const {\n    return m_data[StorageOrder==RowMajor ? j + i*m_stride : i + j*m_stride];\n  }\n\n  template<typename PacketType>\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE PacketType loadPacket(Index i, Index j) const {\n    return ploadt<PacketType, AlignmentType>(&operator()(i, j));\n  }\n\n  template <typename PacketT, int AlignmentT>\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE PacketT load(Index i, Index j) const {\n    return ploadt<PacketT, AlignmentT>(&operator()(i, j));\n  }\n\n  template<typename SubPacket>\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void scatterPacket(Index i, Index j, const SubPacket &p) const {\n    pscatter<Scalar, SubPacket>(&operator()(i, j), p, m_stride);\n  }\n\n  template<typename SubPacket>\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE SubPacket gatherPacket(Index i, Index j) const {\n    return pgather<Scalar, SubPacket>(&operator()(i, j), m_stride);\n  }\n\n  EIGEN_DEVICE_FUNC const Index stride() const { return m_stride; }\n  EIGEN_DEVICE_FUNC const Scalar* data() const { return m_data; }\n\n  EIGEN_DEVICE_FUNC Index firstAligned(Index size) const {\n    if (UIntPtr(m_data)%sizeof(Scalar)) {\n      return -1;\n    }\n    return internal::first_default_aligned(m_data, size);\n  }\n\nprotected:\n  Scalar* EIGEN_RESTRICT m_data;\n  const Index m_stride;\n};\n\n// Implementation of non-natural increment (i.e. inner-stride != 1)\n// The exposed API is not complete yet compared to the Incr==1 case\n// because some features makes less sense in this case.\ntemplate<typename Scalar, typename Index, int AlignmentType, int Incr>\nclass BlasLinearMapper\n{\npublic:\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE BlasLinearMapper(Scalar *data,Index incr) : m_data(data), m_incr(incr) {}\n\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void prefetch(int i) const {\n    internal::prefetch(&operator()(i));\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Scalar& operator()(Index i) const {\n    return m_data[i*m_incr.value()];\n  }\n\n  template<typename PacketType>\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE PacketType loadPacket(Index i) const {\n    return pgather<Scalar,PacketType>(m_data + i*m_incr.value(), m_incr.value());\n  }\n\n  template<typename PacketType>\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void storePacket(Index i, const PacketType &p) const {\n    pscatter<Scalar, PacketType>(m_data + i*m_incr.value(), p, m_incr.value());\n  }\n\nprotected:\n  Scalar *m_data;\n  const internal::variable_if_dynamic<Index,Incr> m_incr;\n};\n\ntemplate<typename Scalar, typename Index, int StorageOrder, int AlignmentType,int Incr>\nclass blas_data_mapper\n{\npublic:\n  typedef BlasLinearMapper<Scalar, Index, AlignmentType,Incr> LinearMapper;\n\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE blas_data_mapper(Scalar* data, Index stride, Index incr) : m_data(data), m_stride(stride), m_incr(incr) {}\n\n  EIGEN_DEVICE_FUNC  EIGEN_ALWAYS_INLINE blas_data_mapper\n  getSubMapper(Index i, Index j) const {\n    return blas_data_mapper(&operator()(i, j), m_stride, m_incr.value());\n  }\n\n  EIGEN_DEVICE_FUNC  EIGEN_ALWAYS_INLINE LinearMapper getLinearMapper(Index i, Index j) const {\n    return LinearMapper(&operator()(i, j), m_incr.value());\n  }\n\n  EIGEN_DEVICE_FUNC\n  EIGEN_ALWAYS_INLINE Scalar& operator()(Index i, Index j) const {\n    return m_data[StorageOrder==RowMajor ? j*m_incr.value() + i*m_stride : i*m_incr.value() + j*m_stride];\n  }\n\n  template<typename PacketType>\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE PacketType loadPacket(Index i, Index j) const {\n    return pgather<Scalar,PacketType>(&operator()(i, j),m_incr.value());\n  }\n\n  template <typename PacketT, int AlignmentT>\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE PacketT load(Index i, Index j) const {\n    return pgather<Scalar,PacketT>(&operator()(i, j),m_incr.value());\n  }\n\n  template<typename SubPacket>\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void scatterPacket(Index i, Index j, const SubPacket &p) const {\n    pscatter<Scalar, SubPacket>(&operator()(i, j), p, m_stride);\n  }\n\n  template<typename SubPacket>\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE SubPacket gatherPacket(Index i, Index j) const {\n    return pgather<Scalar, SubPacket>(&operator()(i, j), m_stride);\n  }\n\nprotected:\n  Scalar* EIGEN_RESTRICT m_data;\n  const Index m_stride;\n  const internal::variable_if_dynamic<Index,Incr> m_incr;\n};\n\n// lightweight helper class to access matrix coefficients (const version)\ntemplate<typename Scalar, typename Index, int StorageOrder>\nclass const_blas_data_mapper : public blas_data_mapper<const Scalar, Index, StorageOrder> {\n  public:\n  EIGEN_ALWAYS_INLINE const_blas_data_mapper(const Scalar *data, Index stride) : blas_data_mapper<const Scalar, Index, StorageOrder>(data, stride) {}\n\n  EIGEN_ALWAYS_INLINE const_blas_data_mapper<Scalar, Index, StorageOrder> getSubMapper(Index i, Index j) const {\n    return const_blas_data_mapper<Scalar, Index, StorageOrder>(&(this->operator()(i, j)), this->m_stride);\n  }\n};\n\n\n/* Helper class to analyze the factors of a Product expression.\n * In particular it allows to pop out operator-, scalar multiples,\n * and conjugate */\ntemplate<typename XprType> struct blas_traits\n{\n  typedef typename traits<XprType>::Scalar Scalar;\n  typedef const XprType& ExtractType;\n  typedef XprType _ExtractType;\n  enum {\n    IsComplex = NumTraits<Scalar>::IsComplex,\n    IsTransposed = false,\n    NeedToConjugate = false,\n    HasUsableDirectAccess = (    (int(XprType::Flags)&DirectAccessBit)\n                              && (   bool(XprType::IsVectorAtCompileTime)\n                                  || int(inner_stride_at_compile_time<XprType>::ret) == 1)\n                             ) ?  1 : 0,\n    HasScalarFactor = false\n  };\n  typedef typename conditional<bool(HasUsableDirectAccess),\n    ExtractType,\n    typename _ExtractType::PlainObject\n    >::type DirectLinearAccessType;\n  static inline EIGEN_DEVICE_FUNC ExtractType extract(const XprType& x) { return x; }\n  static inline EIGEN_DEVICE_FUNC const Scalar extractScalarFactor(const XprType&) { return Scalar(1); }\n};\n\n// pop conjugate\ntemplate<typename Scalar, typename NestedXpr>\nstruct blas_traits<CwiseUnaryOp<scalar_conjugate_op<Scalar>, NestedXpr> >\n : blas_traits<NestedXpr>\n{\n  typedef blas_traits<NestedXpr> Base;\n  typedef CwiseUnaryOp<scalar_conjugate_op<Scalar>, NestedXpr> XprType;\n  typedef typename Base::ExtractType ExtractType;\n\n  enum {\n    IsComplex = NumTraits<Scalar>::IsComplex,\n    NeedToConjugate = Base::NeedToConjugate ? 0 : IsComplex\n  };\n  static inline ExtractType extract(const XprType& x) { return Base::extract(x.nestedExpression()); }\n  static inline Scalar extractScalarFactor(const XprType& x) { return conj(Base::extractScalarFactor(x.nestedExpression())); }\n};\n\n// pop scalar multiple\ntemplate<typename Scalar, typename NestedXpr, typename Plain>\nstruct blas_traits<CwiseBinaryOp<scalar_product_op<Scalar>, const CwiseNullaryOp<scalar_constant_op<Scalar>,Plain>, NestedXpr> >\n : blas_traits<NestedXpr>\n{\n  enum {\n    HasScalarFactor = true\n  };\n  typedef blas_traits<NestedXpr> Base;\n  typedef CwiseBinaryOp<scalar_product_op<Scalar>, const CwiseNullaryOp<scalar_constant_op<Scalar>,Plain>, NestedXpr> XprType;\n  typedef typename Base::ExtractType ExtractType;\n  static inline EIGEN_DEVICE_FUNC ExtractType extract(const XprType& x) { return Base::extract(x.rhs()); }\n  static inline EIGEN_DEVICE_FUNC Scalar extractScalarFactor(const XprType& x)\n  { return x.lhs().functor().m_other * Base::extractScalarFactor(x.rhs()); }\n};\ntemplate<typename Scalar, typename NestedXpr, typename Plain>\nstruct blas_traits<CwiseBinaryOp<scalar_product_op<Scalar>, NestedXpr, const CwiseNullaryOp<scalar_constant_op<Scalar>,Plain> > >\n : blas_traits<NestedXpr>\n{\n  enum {\n    HasScalarFactor = true\n  };\n  typedef blas_traits<NestedXpr> Base;\n  typedef CwiseBinaryOp<scalar_product_op<Scalar>, NestedXpr, const CwiseNullaryOp<scalar_constant_op<Scalar>,Plain> > XprType;\n  typedef typename Base::ExtractType ExtractType;\n  static inline ExtractType extract(const XprType& x) { return Base::extract(x.lhs()); }\n  static inline Scalar extractScalarFactor(const XprType& x)\n  { return Base::extractScalarFactor(x.lhs()) * x.rhs().functor().m_other; }\n};\ntemplate<typename Scalar, typename Plain1, typename Plain2>\nstruct blas_traits<CwiseBinaryOp<scalar_product_op<Scalar>, const CwiseNullaryOp<scalar_constant_op<Scalar>,Plain1>,\n                                                            const CwiseNullaryOp<scalar_constant_op<Scalar>,Plain2> > >\n : blas_traits<CwiseNullaryOp<scalar_constant_op<Scalar>,Plain1> >\n{};\n\n// pop opposite\ntemplate<typename Scalar, typename NestedXpr>\nstruct blas_traits<CwiseUnaryOp<scalar_opposite_op<Scalar>, NestedXpr> >\n : blas_traits<NestedXpr>\n{\n  enum {\n    HasScalarFactor = true\n  };\n  typedef blas_traits<NestedXpr> Base;\n  typedef CwiseUnaryOp<scalar_opposite_op<Scalar>, NestedXpr> XprType;\n  typedef typename Base::ExtractType ExtractType;\n  static inline ExtractType extract(const XprType& x) { return Base::extract(x.nestedExpression()); }\n  static inline Scalar extractScalarFactor(const XprType& x)\n  { return - Base::extractScalarFactor(x.nestedExpression()); }\n};\n\n// pop/push transpose\ntemplate<typename NestedXpr>\nstruct blas_traits<Transpose<NestedXpr> >\n : blas_traits<NestedXpr>\n{\n  typedef typename NestedXpr::Scalar Scalar;\n  typedef blas_traits<NestedXpr> Base;\n  typedef Transpose<NestedXpr> XprType;\n  typedef Transpose<const typename Base::_ExtractType>  ExtractType; // const to get rid of a compile error; anyway blas traits are only used on the RHS\n  typedef Transpose<const typename Base::_ExtractType> _ExtractType;\n  typedef typename conditional<bool(Base::HasUsableDirectAccess),\n    ExtractType,\n    typename ExtractType::PlainObject\n    >::type DirectLinearAccessType;\n  enum {\n    IsTransposed = Base::IsTransposed ? 0 : 1\n  };\n  static inline ExtractType extract(const XprType& x) { return ExtractType(Base::extract(x.nestedExpression())); }\n  static inline Scalar extractScalarFactor(const XprType& x) { return Base::extractScalarFactor(x.nestedExpression()); }\n};\n\ntemplate<typename T>\nstruct blas_traits<const T>\n     : blas_traits<T>\n{};\n\ntemplate<typename T, bool HasUsableDirectAccess=blas_traits<T>::HasUsableDirectAccess>\nstruct extract_data_selector {\n  static const typename T::Scalar* run(const T& m)\n  {\n    return blas_traits<T>::extract(m).data();\n  }\n};\n\ntemplate<typename T>\nstruct extract_data_selector<T,false> {\n  static typename T::Scalar* run(const T&) { return 0; }\n};\n\ntemplate<typename T> const typename T::Scalar* extract_data(const T& m)\n{\n  return extract_data_selector<T>::run(m);\n}\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_BLASUTIL_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/util/ConfigureVectorization.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2018 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CONFIGURE_VECTORIZATION_H\n#define EIGEN_CONFIGURE_VECTORIZATION_H\n\n//------------------------------------------------------------------------------------------\n// Static and dynamic alignment control\n//\n// The main purpose of this section is to define EIGEN_MAX_ALIGN_BYTES and EIGEN_MAX_STATIC_ALIGN_BYTES\n// as the maximal boundary in bytes on which dynamically and statically allocated data may be alignment respectively.\n// The values of EIGEN_MAX_ALIGN_BYTES and EIGEN_MAX_STATIC_ALIGN_BYTES can be specified by the user. If not,\n// a default value is automatically computed based on architecture, compiler, and OS.\n//\n// This section also defines macros EIGEN_ALIGN_TO_BOUNDARY(N) and the shortcuts EIGEN_ALIGN{8,16,32,_MAX}\n// to be used to declare statically aligned buffers.\n//------------------------------------------------------------------------------------------\n\n\n/* EIGEN_ALIGN_TO_BOUNDARY(n) forces data to be n-byte aligned. This is used to satisfy SIMD requirements.\n * However, we do that EVEN if vectorization (EIGEN_VECTORIZE) is disabled,\n * so that vectorization doesn't affect binary compatibility.\n *\n * If we made alignment depend on whether or not EIGEN_VECTORIZE is defined, it would be impossible to link\n * vectorized and non-vectorized code.\n * \n * FIXME: this code can be cleaned up once we switch to proper C++11 only.\n */\n#if (defined EIGEN_CUDACC)\n  #define EIGEN_ALIGN_TO_BOUNDARY(n) __align__(n)\n  #define EIGEN_ALIGNOF(x) __alignof(x)\n#elif EIGEN_HAS_ALIGNAS\n  #define EIGEN_ALIGN_TO_BOUNDARY(n) alignas(n)\n  #define EIGEN_ALIGNOF(x) alignof(x)\n#elif EIGEN_COMP_GNUC || EIGEN_COMP_PGI || EIGEN_COMP_IBM || EIGEN_COMP_ARM\n  #define EIGEN_ALIGN_TO_BOUNDARY(n) __attribute__((aligned(n)))\n  #define EIGEN_ALIGNOF(x) __alignof(x)\n#elif EIGEN_COMP_MSVC\n  #define EIGEN_ALIGN_TO_BOUNDARY(n) __declspec(align(n))\n  #define EIGEN_ALIGNOF(x) __alignof(x)\n#elif EIGEN_COMP_SUNCC\n  // FIXME not sure about this one:\n  #define EIGEN_ALIGN_TO_BOUNDARY(n) __attribute__((aligned(n)))\n  #define EIGEN_ALIGNOF(x) __alignof(x)\n#else\n  #error Please tell me what is the equivalent of alignas(n) and alignof(x) for your compiler\n#endif\n\n// If the user explicitly disable vectorization, then we also disable alignment\n#if defined(EIGEN_DONT_VECTORIZE)\n  #if defined(EIGEN_GPUCC)\n    // GPU code is always vectorized and requires memory alignment for\n    // statically allocated buffers.\n    #define EIGEN_IDEAL_MAX_ALIGN_BYTES 16\n  #else\n    #define EIGEN_IDEAL_MAX_ALIGN_BYTES 0\n  #endif\n#elif defined(__AVX512F__)\n  // 64 bytes static alignment is preferred only if really required\n  #define EIGEN_IDEAL_MAX_ALIGN_BYTES 64\n#elif defined(__AVX__)\n  // 32 bytes static alignment is preferred only if really required\n  #define EIGEN_IDEAL_MAX_ALIGN_BYTES 32\n#else\n  #define EIGEN_IDEAL_MAX_ALIGN_BYTES 16\n#endif\n\n\n// EIGEN_MIN_ALIGN_BYTES defines the minimal value for which the notion of explicit alignment makes sense\n#define EIGEN_MIN_ALIGN_BYTES 16\n\n// Defined the boundary (in bytes) on which the data needs to be aligned. Note\n// that unless EIGEN_ALIGN is defined and not equal to 0, the data may not be\n// aligned at all regardless of the value of this #define.\n\n#if (defined(EIGEN_DONT_ALIGN_STATICALLY) || defined(EIGEN_DONT_ALIGN))  && defined(EIGEN_MAX_STATIC_ALIGN_BYTES) && EIGEN_MAX_STATIC_ALIGN_BYTES>0\n#error EIGEN_MAX_STATIC_ALIGN_BYTES and EIGEN_DONT_ALIGN[_STATICALLY] are both defined with EIGEN_MAX_STATIC_ALIGN_BYTES!=0. Use EIGEN_MAX_STATIC_ALIGN_BYTES=0 as a synonym of EIGEN_DONT_ALIGN_STATICALLY.\n#endif\n\n// EIGEN_DONT_ALIGN_STATICALLY and EIGEN_DONT_ALIGN are deprecated\n// They imply EIGEN_MAX_STATIC_ALIGN_BYTES=0\n#if defined(EIGEN_DONT_ALIGN_STATICALLY) || defined(EIGEN_DONT_ALIGN)\n  #ifdef EIGEN_MAX_STATIC_ALIGN_BYTES\n    #undef EIGEN_MAX_STATIC_ALIGN_BYTES\n  #endif\n  #define EIGEN_MAX_STATIC_ALIGN_BYTES 0\n#endif\n\n#ifndef EIGEN_MAX_STATIC_ALIGN_BYTES\n\n  // Try to automatically guess what is the best default value for EIGEN_MAX_STATIC_ALIGN_BYTES\n\n  // 16 byte alignment is only useful for vectorization. Since it affects the ABI, we need to enable\n  // 16 byte alignment on all platforms where vectorization might be enabled. In theory we could always\n  // enable alignment, but it can be a cause of problems on some platforms, so we just disable it in\n  // certain common platform (compiler+architecture combinations) to avoid these problems.\n  // Only static alignment is really problematic (relies on nonstandard compiler extensions),\n  // try to keep heap alignment even when we have to disable static alignment.\n  #if EIGEN_COMP_GNUC && !(EIGEN_ARCH_i386_OR_x86_64 || EIGEN_ARCH_ARM_OR_ARM64 || EIGEN_ARCH_PPC || EIGEN_ARCH_IA64 || EIGEN_ARCH_MIPS)\n  #define EIGEN_GCC_AND_ARCH_DOESNT_WANT_STACK_ALIGNMENT 1\n  #elif EIGEN_ARCH_ARM_OR_ARM64 && EIGEN_COMP_GNUC_STRICT && EIGEN_GNUC_AT_MOST(4, 6)\n  // Old versions of GCC on ARM, at least 4.4, were once seen to have buggy static alignment support.\n  // Not sure which version fixed it, hopefully it doesn't affect 4.7, which is still somewhat in use.\n  // 4.8 and newer seem definitely unaffected.\n  #define EIGEN_GCC_AND_ARCH_DOESNT_WANT_STACK_ALIGNMENT 1\n  #else\n  #define EIGEN_GCC_AND_ARCH_DOESNT_WANT_STACK_ALIGNMENT 0\n  #endif\n\n  // static alignment is completely disabled with GCC 3, Sun Studio, and QCC/QNX\n  #if !EIGEN_GCC_AND_ARCH_DOESNT_WANT_STACK_ALIGNMENT \\\n  && !EIGEN_GCC3_OR_OLDER \\\n  && !EIGEN_COMP_SUNCC \\\n  && !EIGEN_OS_QNX\n    #define EIGEN_ARCH_WANTS_STACK_ALIGNMENT 1\n  #else\n    #define EIGEN_ARCH_WANTS_STACK_ALIGNMENT 0\n  #endif\n\n  #if EIGEN_ARCH_WANTS_STACK_ALIGNMENT\n    #define EIGEN_MAX_STATIC_ALIGN_BYTES EIGEN_IDEAL_MAX_ALIGN_BYTES\n  #else\n    #define EIGEN_MAX_STATIC_ALIGN_BYTES 0\n  #endif\n\n#endif\n\n// If EIGEN_MAX_ALIGN_BYTES is defined, then it is considered as an upper bound for EIGEN_MAX_STATIC_ALIGN_BYTES\n#if defined(EIGEN_MAX_ALIGN_BYTES) && EIGEN_MAX_ALIGN_BYTES<EIGEN_MAX_STATIC_ALIGN_BYTES\n#undef EIGEN_MAX_STATIC_ALIGN_BYTES\n#define EIGEN_MAX_STATIC_ALIGN_BYTES EIGEN_MAX_ALIGN_BYTES\n#endif\n\n#if EIGEN_MAX_STATIC_ALIGN_BYTES==0 && !defined(EIGEN_DISABLE_UNALIGNED_ARRAY_ASSERT)\n  #define EIGEN_DISABLE_UNALIGNED_ARRAY_ASSERT\n#endif\n\n// At this stage, EIGEN_MAX_STATIC_ALIGN_BYTES>0 is the true test whether we want to align arrays on the stack or not.\n// It takes into account both the user choice to explicitly enable/disable alignment (by setting EIGEN_MAX_STATIC_ALIGN_BYTES)\n// and the architecture config (EIGEN_ARCH_WANTS_STACK_ALIGNMENT).\n// Henceforth, only EIGEN_MAX_STATIC_ALIGN_BYTES should be used.\n\n\n// Shortcuts to EIGEN_ALIGN_TO_BOUNDARY\n#define EIGEN_ALIGN8  EIGEN_ALIGN_TO_BOUNDARY(8)\n#define EIGEN_ALIGN16 EIGEN_ALIGN_TO_BOUNDARY(16)\n#define EIGEN_ALIGN32 EIGEN_ALIGN_TO_BOUNDARY(32)\n#define EIGEN_ALIGN64 EIGEN_ALIGN_TO_BOUNDARY(64)\n#if EIGEN_MAX_STATIC_ALIGN_BYTES>0\n#define EIGEN_ALIGN_MAX EIGEN_ALIGN_TO_BOUNDARY(EIGEN_MAX_STATIC_ALIGN_BYTES)\n#else\n#define EIGEN_ALIGN_MAX\n#endif\n\n\n// Dynamic alignment control\n\n#if defined(EIGEN_DONT_ALIGN) && defined(EIGEN_MAX_ALIGN_BYTES) && EIGEN_MAX_ALIGN_BYTES>0\n#error EIGEN_MAX_ALIGN_BYTES and EIGEN_DONT_ALIGN are both defined with EIGEN_MAX_ALIGN_BYTES!=0. Use EIGEN_MAX_ALIGN_BYTES=0 as a synonym of EIGEN_DONT_ALIGN.\n#endif\n\n#ifdef EIGEN_DONT_ALIGN\n  #ifdef EIGEN_MAX_ALIGN_BYTES\n    #undef EIGEN_MAX_ALIGN_BYTES\n  #endif\n  #define EIGEN_MAX_ALIGN_BYTES 0\n#elif !defined(EIGEN_MAX_ALIGN_BYTES)\n  #define EIGEN_MAX_ALIGN_BYTES EIGEN_IDEAL_MAX_ALIGN_BYTES\n#endif\n\n#if EIGEN_IDEAL_MAX_ALIGN_BYTES > EIGEN_MAX_ALIGN_BYTES\n#define EIGEN_DEFAULT_ALIGN_BYTES EIGEN_IDEAL_MAX_ALIGN_BYTES\n#else\n#define EIGEN_DEFAULT_ALIGN_BYTES EIGEN_MAX_ALIGN_BYTES\n#endif\n\n\n#ifndef EIGEN_UNALIGNED_VECTORIZE\n#define EIGEN_UNALIGNED_VECTORIZE 1\n#endif\n\n//----------------------------------------------------------------------\n\n// if alignment is disabled, then disable vectorization. Note: EIGEN_MAX_ALIGN_BYTES is the proper check, it takes into\n// account both the user's will (EIGEN_MAX_ALIGN_BYTES,EIGEN_DONT_ALIGN) and our own platform checks\n#if EIGEN_MAX_ALIGN_BYTES==0\n  #ifndef EIGEN_DONT_VECTORIZE\n    #define EIGEN_DONT_VECTORIZE\n  #endif\n#endif\n\n\n// The following (except #include <malloc.h> and _M_IX86_FP ??) can likely be\n// removed as gcc 4.1 and msvc 2008 are not supported anyways.\n#if EIGEN_COMP_MSVC\n  #include <malloc.h> // for _aligned_malloc -- need it regardless of whether vectorization is enabled\n  #if (EIGEN_COMP_MSVC >= 1500) // 2008 or later\n    // a user reported that in 64-bit mode, MSVC doesn't care to define _M_IX86_FP.\n    #if (defined(_M_IX86_FP) && (_M_IX86_FP >= 2)) || EIGEN_ARCH_x86_64\n      #define EIGEN_SSE2_ON_MSVC_2008_OR_LATER\n    #endif\n  #endif\n#else\n  #if (defined __SSE2__) && ( (!EIGEN_COMP_GNUC) || EIGEN_COMP_ICC || EIGEN_GNUC_AT_LEAST(4,2) )\n    #define EIGEN_SSE2_ON_NON_MSVC_BUT_NOT_OLD_GCC\n  #endif\n#endif\n\n#if !(defined(EIGEN_DONT_VECTORIZE) || defined(EIGEN_GPUCC))\n\n  #if defined (EIGEN_SSE2_ON_NON_MSVC_BUT_NOT_OLD_GCC) || defined(EIGEN_SSE2_ON_MSVC_2008_OR_LATER)\n\n    // Defines symbols for compile-time detection of which instructions are\n    // used.\n    // EIGEN_VECTORIZE_YY is defined if and only if the instruction set YY is used\n    #define EIGEN_VECTORIZE\n    #define EIGEN_VECTORIZE_SSE\n    #define EIGEN_VECTORIZE_SSE2\n\n    // Detect sse3/ssse3/sse4:\n    // gcc and icc defines __SSE3__, ...\n    // there is no way to know about this on msvc. You can define EIGEN_VECTORIZE_SSE* if you\n    // want to force the use of those instructions with msvc.\n    #ifdef __SSE3__\n      #define EIGEN_VECTORIZE_SSE3\n    #endif\n    #ifdef __SSSE3__\n      #define EIGEN_VECTORIZE_SSSE3\n    #endif\n    #ifdef __SSE4_1__\n      #define EIGEN_VECTORIZE_SSE4_1\n    #endif\n    #ifdef __SSE4_2__\n      #define EIGEN_VECTORIZE_SSE4_2\n    #endif\n    #ifdef __AVX__\n      #ifndef EIGEN_USE_SYCL \n        #define EIGEN_VECTORIZE_AVX\n      #endif\n      #define EIGEN_VECTORIZE_SSE3\n      #define EIGEN_VECTORIZE_SSSE3\n      #define EIGEN_VECTORIZE_SSE4_1\n      #define EIGEN_VECTORIZE_SSE4_2\n    #endif\n    #ifdef __AVX2__\n      #ifndef EIGEN_USE_SYCL \n        #define EIGEN_VECTORIZE_AVX2\n        #define EIGEN_VECTORIZE_AVX\n      #endif\n      #define EIGEN_VECTORIZE_SSE3\n      #define EIGEN_VECTORIZE_SSSE3\n      #define EIGEN_VECTORIZE_SSE4_1\n      #define EIGEN_VECTORIZE_SSE4_2\n    #endif\n    #if defined(__FMA__) || (EIGEN_COMP_MSVC && defined(__AVX2__))\n      // MSVC does not expose a switch dedicated for FMA\n      // For MSVC, AVX2 => FMA\n      #define EIGEN_VECTORIZE_FMA\n    #endif\n    #if defined(__AVX512F__)\n      #ifndef EIGEN_VECTORIZE_FMA\n      #if EIGEN_COMP_GNUC\n      #error Please add -mfma to your compiler flags: compiling with -mavx512f alone without SSE/AVX FMA is not supported (bug 1638).\n      #else\n      #error Please enable FMA in your compiler flags (e.g. -mfma): compiling with AVX512 alone without SSE/AVX FMA is not supported (bug 1638).\n      #endif\n      #endif\n      #ifndef EIGEN_USE_SYCL\n        #define EIGEN_VECTORIZE_AVX512\n        #define EIGEN_VECTORIZE_AVX2\n        #define EIGEN_VECTORIZE_AVX\n      #endif\n      #define EIGEN_VECTORIZE_FMA\n      #define EIGEN_VECTORIZE_SSE3\n      #define EIGEN_VECTORIZE_SSSE3\n      #define EIGEN_VECTORIZE_SSE4_1\n      #define EIGEN_VECTORIZE_SSE4_2\n      #ifndef EIGEN_USE_SYCL\n        #ifdef __AVX512DQ__\n          #define EIGEN_VECTORIZE_AVX512DQ\n        #endif\n        #ifdef __AVX512ER__\n          #define EIGEN_VECTORIZE_AVX512ER\n        #endif\n      #endif\n    #endif\n\n    // Disable AVX support on broken xcode versions\n    #if defined(__apple_build_version__) && (__apple_build_version__ == 11000033 ) && ( __MAC_OS_X_VERSION_MIN_REQUIRED == 101500 )\n      // A nasty bug in the clang compiler shipped with xcode in a common compilation situation\n      // when XCode 11.0 and Mac deployment target macOS 10.15 is https://trac.macports.org/ticket/58776#no1\n      #ifdef EIGEN_VECTORIZE_AVX\n        #undef EIGEN_VECTORIZE_AVX\n        #warning \"Disabling AVX support: clang compiler shipped with XCode 11.[012] generates broken assembly with -macosx-version-min=10.15 and AVX enabled. \"\n        #ifdef EIGEN_VECTORIZE_AVX2\n          #undef EIGEN_VECTORIZE_AVX2\n        #endif\n        #ifdef EIGEN_VECTORIZE_FMA\n          #undef EIGEN_VECTORIZE_FMA\n        #endif\n        #ifdef EIGEN_VECTORIZE_AVX512\n          #undef EIGEN_VECTORIZE_AVX512\n        #endif\n        #ifdef EIGEN_VECTORIZE_AVX512DQ\n          #undef EIGEN_VECTORIZE_AVX512DQ\n        #endif\n        #ifdef EIGEN_VECTORIZE_AVX512ER\n          #undef EIGEN_VECTORIZE_AVX512ER\n        #endif\n      #endif\n      // NOTE: Confirmed test failures in XCode 11.0, and XCode 11.2 with  -macosx-version-min=10.15 and AVX\n      // NOTE using -macosx-version-min=10.15 with Xcode 11.0 results in runtime segmentation faults in many tests, 11.2 produce core dumps in 3 tests\n      // NOTE using -macosx-version-min=10.14 produces functioning and passing tests in all cases\n      // NOTE __clang_version__ \"11.0.0 (clang-1100.0.33.8)\"  XCode 11.0 <- Produces many segfault and core dumping tests\n      //                                                                    with  -macosx-version-min=10.15 and AVX\n      // NOTE __clang_version__ \"11.0.0 (clang-1100.0.33.12)\" XCode 11.2 <- Produces 3 core dumping tests with  \n      //                                                                    -macosx-version-min=10.15 and AVX\n    #endif\n\n    // include files\n\n    // This extern \"C\" works around a MINGW-w64 compilation issue\n    // https://sourceforge.net/tracker/index.php?func=detail&aid=3018394&group_id=202880&atid=983354\n    // In essence, intrin.h is included by windows.h and also declares intrinsics (just as emmintrin.h etc. below do).\n    // However, intrin.h uses an extern \"C\" declaration, and g++ thus complains of duplicate declarations\n    // with conflicting linkage.  The linkage for intrinsics doesn't matter, but at that stage the compiler doesn't know;\n    // so, to avoid compile errors when windows.h is included after Eigen/Core, ensure intrinsics are extern \"C\" here too.\n    // notice that since these are C headers, the extern \"C\" is theoretically needed anyways.\n    extern \"C\" {\n      // In theory we should only include immintrin.h and not the other *mmintrin.h header files directly.\n      // Doing so triggers some issues with ICC. However old gcc versions seems to not have this file, thus:\n      #if EIGEN_COMP_ICC >= 1110\n        #include <immintrin.h>\n      #else\n        #include <mmintrin.h>\n        #include <emmintrin.h>\n        #include <xmmintrin.h>\n        #ifdef  EIGEN_VECTORIZE_SSE3\n        #include <pmmintrin.h>\n        #endif\n        #ifdef EIGEN_VECTORIZE_SSSE3\n        #include <tmmintrin.h>\n        #endif\n        #ifdef EIGEN_VECTORIZE_SSE4_1\n        #include <smmintrin.h>\n        #endif\n        #ifdef EIGEN_VECTORIZE_SSE4_2\n        #include <nmmintrin.h>\n        #endif\n        #if defined(EIGEN_VECTORIZE_AVX) || defined(EIGEN_VECTORIZE_AVX512)\n        #include <immintrin.h>\n        #endif\n      #endif\n    } // end extern \"C\"\n\n  #elif defined __VSX__\n\n    #define EIGEN_VECTORIZE\n    #define EIGEN_VECTORIZE_VSX\n    #include <altivec.h>\n    // We need to #undef all these ugly tokens defined in <altivec.h>\n    // => use __vector instead of vector\n    #undef bool\n    #undef vector\n    #undef pixel\n\n  #elif defined __ALTIVEC__\n\n    #define EIGEN_VECTORIZE\n    #define EIGEN_VECTORIZE_ALTIVEC\n    #include <altivec.h>\n    // We need to #undef all these ugly tokens defined in <altivec.h>\n    // => use __vector instead of vector\n    #undef bool\n    #undef vector\n    #undef pixel\n\n  #elif (defined  __ARM_NEON) || (defined __ARM_NEON__)\n\n    #define EIGEN_VECTORIZE\n    #define EIGEN_VECTORIZE_NEON\n    #include <arm_neon.h>\n\n  #elif (defined __s390x__ && defined __VEC__)\n\n    #define EIGEN_VECTORIZE\n    #define EIGEN_VECTORIZE_ZVECTOR\n    #include <vecintrin.h>\n\n  #elif defined __mips_msa\n\n    // Limit MSA optimizations to little-endian CPUs for now.\n    // TODO: Perhaps, eventually support MSA optimizations on big-endian CPUs?\n    #if defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)\n      #if defined(__LP64__)\n        #define EIGEN_MIPS_64\n      #else\n        #define EIGEN_MIPS_32\n      #endif\n      #define EIGEN_VECTORIZE\n      #define EIGEN_VECTORIZE_MSA\n      #include <msa.h>\n    #endif\n\n  #endif\n#endif\n\n#if defined(__F16C__) && (!defined(EIGEN_GPUCC) && (!defined(EIGEN_COMP_CLANG) || EIGEN_COMP_CLANG>=380))\n  // We can use the optimized fp16 to float and float to fp16 conversion routines\n  #define EIGEN_HAS_FP16_C\n\n  #if defined(EIGEN_COMP_CLANG)\n    // Workaround for clang: The FP16C intrinsics for clang are included by\n    // immintrin.h, as opposed to emmintrin.h as suggested by Intel:\n    // https://software.intel.com/sites/landingpage/IntrinsicsGuide/#othertechs=FP16C&expand=1711\n    #include <immintrin.h>\n  #endif\n#endif\n\n#if defined EIGEN_CUDACC\n  #define EIGEN_VECTORIZE_GPU\n  #include <vector_types.h>\n  #if EIGEN_CUDA_SDK_VER >= 70500\n    #define EIGEN_HAS_CUDA_FP16\n  #endif\n#endif\n\n#if defined(EIGEN_HAS_CUDA_FP16)\n  #include <cuda_runtime_api.h>\n  #include <cuda_fp16.h>\n#endif\n\n#if defined(EIGEN_HIPCC)\n  #define EIGEN_VECTORIZE_GPU\n  #include <hip/hip_vector_types.h>\n  #define EIGEN_HAS_HIP_FP16\n  #include <hip/hip_fp16.h>\n#endif\n\n\n/** \\brief Namespace containing all symbols from the %Eigen library. */\nnamespace Eigen {\n\ninline static const char *SimdInstructionSetsInUse(void) {\n#if defined(EIGEN_VECTORIZE_AVX512)\n  return \"AVX512, FMA, AVX2, AVX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2\";\n#elif defined(EIGEN_VECTORIZE_AVX)\n  return \"AVX SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2\";\n#elif defined(EIGEN_VECTORIZE_SSE4_2)\n  return \"SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2\";\n#elif defined(EIGEN_VECTORIZE_SSE4_1)\n  return \"SSE, SSE2, SSE3, SSSE3, SSE4.1\";\n#elif defined(EIGEN_VECTORIZE_SSSE3)\n  return \"SSE, SSE2, SSE3, SSSE3\";\n#elif defined(EIGEN_VECTORIZE_SSE3)\n  return \"SSE, SSE2, SSE3\";\n#elif defined(EIGEN_VECTORIZE_SSE2)\n  return \"SSE, SSE2\";\n#elif defined(EIGEN_VECTORIZE_ALTIVEC)\n  return \"AltiVec\";\n#elif defined(EIGEN_VECTORIZE_VSX)\n  return \"VSX\";\n#elif defined(EIGEN_VECTORIZE_NEON)\n  return \"ARM NEON\";\n#elif defined(EIGEN_VECTORIZE_ZVECTOR)\n  return \"S390X ZVECTOR\";\n#elif defined(EIGEN_VECTORIZE_MSA)\n  return \"MIPS MSA\";\n#else\n  return \"None\";\n#endif\n}\n\n} // end namespace Eigen\n\n\n#endif // EIGEN_CONFIGURE_VECTORIZATION_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/util/Constants.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2015 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2007-2009 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CONSTANTS_H\n#define EIGEN_CONSTANTS_H\n\nnamespace Eigen {\n\n/** This value means that a positive quantity (e.g., a size) is not known at compile-time, and that instead the value is\n  * stored in some runtime variable.\n  *\n  * Changing the value of Dynamic breaks the ABI, as Dynamic is often used as a template parameter for Matrix.\n  */\nconst int Dynamic = -1;\n\n/** This value means that a signed quantity (e.g., a signed index) is not known at compile-time, and that instead its value\n  * has to be specified at runtime.\n  */\nconst int DynamicIndex = 0xffffff;\n\n/** This value means that the increment to go from one value to another in a sequence is not constant for each step.\n  */\nconst int UndefinedIncr = 0xfffffe;\n\n/** This value means +Infinity; it is currently used only as the p parameter to MatrixBase::lpNorm<int>().\n  * The value Infinity there means the L-infinity norm.\n  */\nconst int Infinity = -1;\n\n/** This value means that the cost to evaluate an expression coefficient is either very expensive or\n  * cannot be known at compile time.\n  *\n  * This value has to be positive to (1) simplify cost computation, and (2) allow to distinguish between a very expensive and very very expensive expressions.\n  * It thus must also be large enough to make sure unrolling won't happen and that sub expressions will be evaluated, but not too large to avoid overflow.\n  */\nconst int HugeCost = 10000;\n\n/** \\defgroup flags Flags\n  * \\ingroup Core_Module\n  *\n  * These are the possible bits which can be OR'ed to constitute the flags of a matrix or\n  * expression.\n  *\n  * It is important to note that these flags are a purely compile-time notion. They are a compile-time property of\n  * an expression type, implemented as enum's. They are not stored in memory at runtime, and they do not incur any\n  * runtime overhead.\n  *\n  * \\sa MatrixBase::Flags\n  */\n\n/** \\ingroup flags\n  *\n  * for a matrix, this means that the storage order is row-major.\n  * If this bit is not set, the storage order is column-major.\n  * For an expression, this determines the storage order of\n  * the matrix created by evaluation of that expression.\n  * \\sa \\blank  \\ref TopicStorageOrders */\nconst unsigned int RowMajorBit = 0x1;\n\n/** \\ingroup flags\n  * means the expression should be evaluated by the calling expression */\nconst unsigned int EvalBeforeNestingBit = 0x2;\n\n/** \\ingroup flags\n  * \\deprecated\n  * means the expression should be evaluated before any assignment */\nEIGEN_DEPRECATED\nconst unsigned int EvalBeforeAssigningBit = 0x4; // FIXME deprecated\n\n/** \\ingroup flags\n  *\n  * Short version: means the expression might be vectorized\n  *\n  * Long version: means that the coefficients can be handled by packets\n  * and start at a memory location whose alignment meets the requirements\n  * of the present CPU architecture for optimized packet access. In the fixed-size\n  * case, there is the additional condition that it be possible to access all the\n  * coefficients by packets (this implies the requirement that the size be a multiple of 16 bytes,\n  * and that any nontrivial strides don't break the alignment). In the dynamic-size case,\n  * there is no such condition on the total size and strides, so it might not be possible to access\n  * all coeffs by packets.\n  *\n  * \\note This bit can be set regardless of whether vectorization is actually enabled.\n  *       To check for actual vectorizability, see \\a ActualPacketAccessBit.\n  */\nconst unsigned int PacketAccessBit = 0x8;\n\n#ifdef EIGEN_VECTORIZE\n/** \\ingroup flags\n  *\n  * If vectorization is enabled (EIGEN_VECTORIZE is defined) this constant\n  * is set to the value \\a PacketAccessBit.\n  *\n  * If vectorization is not enabled (EIGEN_VECTORIZE is not defined) this constant\n  * is set to the value 0.\n  */\nconst unsigned int ActualPacketAccessBit = PacketAccessBit;\n#else\nconst unsigned int ActualPacketAccessBit = 0x0;\n#endif\n\n/** \\ingroup flags\n  *\n  * Short version: means the expression can be seen as 1D vector.\n  *\n  * Long version: means that one can access the coefficients\n  * of this expression by coeff(int), and coeffRef(int) in the case of a lvalue expression. These\n  * index-based access methods are guaranteed\n  * to not have to do any runtime computation of a (row, col)-pair from the index, so that it\n  * is guaranteed that whenever it is available, index-based access is at least as fast as\n  * (row,col)-based access. Expressions for which that isn't possible don't have the LinearAccessBit.\n  *\n  * If both PacketAccessBit and LinearAccessBit are set, then the\n  * packets of this expression can be accessed by packet(int), and writePacket(int) in the case of a\n  * lvalue expression.\n  *\n  * Typically, all vector expressions have the LinearAccessBit, but there is one exception:\n  * Product expressions don't have it, because it would be troublesome for vectorization, even when the\n  * Product is a vector expression. Thus, vector Product expressions allow index-based coefficient access but\n  * not index-based packet access, so they don't have the LinearAccessBit.\n  */\nconst unsigned int LinearAccessBit = 0x10;\n\n/** \\ingroup flags\n  *\n  * Means the expression has a coeffRef() method, i.e. is writable as its individual coefficients are directly addressable.\n  * This rules out read-only expressions.\n  *\n  * Note that DirectAccessBit and LvalueBit are mutually orthogonal, as there are examples of expression having one but note\n  * the other:\n  *   \\li writable expressions that don't have a very simple memory layout as a strided array, have LvalueBit but not DirectAccessBit\n  *   \\li Map-to-const expressions, for example Map<const Matrix>, have DirectAccessBit but not LvalueBit\n  *\n  * Expressions having LvalueBit also have their coeff() method returning a const reference instead of returning a new value.\n  */\nconst unsigned int LvalueBit = 0x20;\n\n/** \\ingroup flags\n  *\n  * Means that the underlying array of coefficients can be directly accessed as a plain strided array. The memory layout\n  * of the array of coefficients must be exactly the natural one suggested by rows(), cols(),\n  * outerStride(), innerStride(), and the RowMajorBit. This rules out expressions such as Diagonal, whose coefficients,\n  * though referencable, do not have such a regular memory layout.\n  *\n  * See the comment on LvalueBit for an explanation of how LvalueBit and DirectAccessBit are mutually orthogonal.\n  */\nconst unsigned int DirectAccessBit = 0x40;\n\n/** \\deprecated \\ingroup flags\n  *\n  * means the first coefficient packet is guaranteed to be aligned.\n  * An expression cannot has the AlignedBit without the PacketAccessBit flag.\n  * In other words, this means we are allow to perform an aligned packet access to the first element regardless\n  * of the expression kind:\n  * \\code\n  * expression.packet<Aligned>(0);\n  * \\endcode\n  */\nEIGEN_DEPRECATED const unsigned int AlignedBit = 0x80;\n\nconst unsigned int NestByRefBit = 0x100;\n\n/** \\ingroup flags\n  *\n  * for an expression, this means that the storage order\n  * can be either row-major or column-major.\n  * The precise choice will be decided at evaluation time or when\n  * combined with other expressions.\n  * \\sa \\blank  \\ref RowMajorBit, \\ref TopicStorageOrders */\nconst unsigned int NoPreferredStorageOrderBit = 0x200;\n\n/** \\ingroup flags\n  *\n  * Means that the underlying coefficients can be accessed through pointers to the sparse (un)compressed storage format,\n  * that is, the expression provides:\n  * \\code\n    inline const Scalar* valuePtr() const;\n    inline const Index* innerIndexPtr() const;\n    inline const Index* outerIndexPtr() const;\n    inline const Index* innerNonZeroPtr() const;\n    \\endcode\n  */\nconst unsigned int CompressedAccessBit = 0x400;\n\n\n// list of flags that are inherited by default\nconst unsigned int HereditaryBits = RowMajorBit\n                                  | EvalBeforeNestingBit;\n\n/** \\defgroup enums Enumerations\n  * \\ingroup Core_Module\n  *\n  * Various enumerations used in %Eigen. Many of these are used as template parameters.\n  */\n\n/** \\ingroup enums\n  * Enum containing possible values for the \\c Mode or \\c UpLo parameter of\n  * MatrixBase::selfadjointView() and MatrixBase::triangularView(), and selfadjoint solvers. */\nenum UpLoType {\n  /** View matrix as a lower triangular matrix. */\n  Lower=0x1,                      \n  /** View matrix as an upper triangular matrix. */\n  Upper=0x2,                      \n  /** %Matrix has ones on the diagonal; to be used in combination with #Lower or #Upper. */\n  UnitDiag=0x4, \n  /** %Matrix has zeros on the diagonal; to be used in combination with #Lower or #Upper. */\n  ZeroDiag=0x8,\n  /** View matrix as a lower triangular matrix with ones on the diagonal. */\n  UnitLower=UnitDiag|Lower, \n  /** View matrix as an upper triangular matrix with ones on the diagonal. */\n  UnitUpper=UnitDiag|Upper,\n  /** View matrix as a lower triangular matrix with zeros on the diagonal. */\n  StrictlyLower=ZeroDiag|Lower, \n  /** View matrix as an upper triangular matrix with zeros on the diagonal. */\n  StrictlyUpper=ZeroDiag|Upper,\n  /** Used in BandMatrix and SelfAdjointView to indicate that the matrix is self-adjoint. */\n  SelfAdjoint=0x10,\n  /** Used to support symmetric, non-selfadjoint, complex matrices. */\n  Symmetric=0x20\n};\n\n/** \\ingroup enums\n  * Enum for indicating whether a buffer is aligned or not. */\nenum AlignmentType {\n  Unaligned=0,        /**< Data pointer has no specific alignment. */\n  Aligned8=8,         /**< Data pointer is aligned on a 8 bytes boundary. */\n  Aligned16=16,       /**< Data pointer is aligned on a 16 bytes boundary. */\n  Aligned32=32,       /**< Data pointer is aligned on a 32 bytes boundary. */\n  Aligned64=64,       /**< Data pointer is aligned on a 64 bytes boundary. */\n  Aligned128=128,     /**< Data pointer is aligned on a 128 bytes boundary. */\n  AlignedMask=255,\n  Aligned=16,         /**< \\deprecated Synonym for Aligned16. */\n#if EIGEN_MAX_ALIGN_BYTES==128\n  AlignedMax = Aligned128\n#elif EIGEN_MAX_ALIGN_BYTES==64\n  AlignedMax = Aligned64\n#elif EIGEN_MAX_ALIGN_BYTES==32\n  AlignedMax = Aligned32\n#elif EIGEN_MAX_ALIGN_BYTES==16\n  AlignedMax = Aligned16\n#elif EIGEN_MAX_ALIGN_BYTES==8\n  AlignedMax = Aligned8\n#elif EIGEN_MAX_ALIGN_BYTES==0\n  AlignedMax = Unaligned\n#else\n#error Invalid value for EIGEN_MAX_ALIGN_BYTES\n#endif\n};\n\n/** \\ingroup enums\n  * Enum containing possible values for the \\p Direction parameter of\n  * Reverse, PartialReduxExpr and VectorwiseOp. */\nenum DirectionType { \n  /** For Reverse, all columns are reversed; \n    * for PartialReduxExpr and VectorwiseOp, act on columns. */\n  Vertical, \n  /** For Reverse, all rows are reversed; \n    * for PartialReduxExpr and VectorwiseOp, act on rows. */\n  Horizontal, \n  /** For Reverse, both rows and columns are reversed; \n    * not used for PartialReduxExpr and VectorwiseOp. */\n  BothDirections \n};\n\n/** \\internal \\ingroup enums\n  * Enum to specify how to traverse the entries of a matrix. */\nenum TraversalType {\n  /** \\internal Default traversal, no vectorization, no index-based access */\n  DefaultTraversal,\n  /** \\internal No vectorization, use index-based access to have only one for loop instead of 2 nested loops */\n  LinearTraversal,\n  /** \\internal Equivalent to a slice vectorization for fixed-size matrices having good alignment\n    * and good size */\n  InnerVectorizedTraversal,\n  /** \\internal Vectorization path using a single loop plus scalar loops for the\n    * unaligned boundaries */\n  LinearVectorizedTraversal,\n  /** \\internal Generic vectorization path using one vectorized loop per row/column with some\n    * scalar loops to handle the unaligned boundaries */\n  SliceVectorizedTraversal,\n  /** \\internal Special case to properly handle incompatible scalar types or other defecting cases*/\n  InvalidTraversal,\n  /** \\internal Evaluate all entries at once */\n  AllAtOnceTraversal\n};\n\n/** \\internal \\ingroup enums\n  * Enum to specify whether to unroll loops when traversing over the entries of a matrix. */\nenum UnrollingType {\n  /** \\internal Do not unroll loops. */\n  NoUnrolling,\n  /** \\internal Unroll only the inner loop, but not the outer loop. */\n  InnerUnrolling,\n  /** \\internal Unroll both the inner and the outer loop. If there is only one loop, \n    * because linear traversal is used, then unroll that loop. */\n  CompleteUnrolling\n};\n\n/** \\internal \\ingroup enums\n  * Enum to specify whether to use the default (built-in) implementation or the specialization. */\nenum SpecializedType {\n  Specialized,\n  BuiltIn\n};\n\n/** \\ingroup enums\n  * Enum containing possible values for the \\p _Options template parameter of\n  * Matrix, Array and BandMatrix. */\nenum StorageOptions {\n  /** Storage order is column major (see \\ref TopicStorageOrders). */\n  ColMajor = 0,\n  /** Storage order is row major (see \\ref TopicStorageOrders). */\n  RowMajor = 0x1,  // it is only a coincidence that this is equal to RowMajorBit -- don't rely on that\n  /** Align the matrix itself if it is vectorizable fixed-size */\n  AutoAlign = 0,\n  /** Don't require alignment for the matrix itself (the array of coefficients, if dynamically allocated, may still be requested to be aligned) */ // FIXME --- clarify the situation\n  DontAlign = 0x2\n};\n\n/** \\ingroup enums\n  * Enum for specifying whether to apply or solve on the left or right. */\nenum SideType {\n  /** Apply transformation on the left. */\n  OnTheLeft = 1,  \n  /** Apply transformation on the right. */\n  OnTheRight = 2  \n};\n\n\n\n/* the following used to be written as:\n *\n *   struct NoChange_t {};\n *   namespace {\n *     EIGEN_UNUSED NoChange_t NoChange;\n *   }\n *\n * on the ground that it feels dangerous to disambiguate overloaded functions on enum/integer types.  \n * However, this leads to \"variable declared but never referenced\" warnings on Intel Composer XE,\n * and we do not know how to get rid of them (bug 450).\n */\n\nenum NoChange_t   { NoChange };\nenum Sequential_t { Sequential };\nenum Default_t    { Default };\n\n/** \\internal \\ingroup enums\n  * Used in AmbiVector. */\nenum AmbiVectorMode {\n  IsDense         = 0,\n  IsSparse\n};\n\n/** \\ingroup enums\n  * Used as template parameter in DenseCoeffBase and MapBase to indicate \n  * which accessors should be provided. */\nenum AccessorLevels {\n  /** Read-only access via a member function. */\n  ReadOnlyAccessors, \n  /** Read/write access via member functions. */\n  WriteAccessors, \n  /** Direct read-only access to the coefficients. */\n  DirectAccessors, \n  /** Direct read/write access to the coefficients. */\n  DirectWriteAccessors\n};\n\n/** \\ingroup enums\n  * Enum with options to give to various decompositions. */\nenum DecompositionOptions {\n  /** \\internal Not used (meant for LDLT?). */\n  Pivoting            = 0x01, \n  /** \\internal Not used (meant for LDLT?). */\n  NoPivoting          = 0x02, \n  /** Used in JacobiSVD to indicate that the square matrix U is to be computed. */\n  ComputeFullU        = 0x04,\n  /** Used in JacobiSVD to indicate that the thin matrix U is to be computed. */\n  ComputeThinU        = 0x08,\n  /** Used in JacobiSVD to indicate that the square matrix V is to be computed. */\n  ComputeFullV        = 0x10,\n  /** Used in JacobiSVD to indicate that the thin matrix V is to be computed. */\n  ComputeThinV        = 0x20,\n  /** Used in SelfAdjointEigenSolver and GeneralizedSelfAdjointEigenSolver to specify\n    * that only the eigenvalues are to be computed and not the eigenvectors. */\n  EigenvaluesOnly     = 0x40,\n  /** Used in SelfAdjointEigenSolver and GeneralizedSelfAdjointEigenSolver to specify\n    * that both the eigenvalues and the eigenvectors are to be computed. */\n  ComputeEigenvectors = 0x80,\n  /** \\internal */\n  EigVecMask = EigenvaluesOnly | ComputeEigenvectors,\n  /** Used in GeneralizedSelfAdjointEigenSolver to indicate that it should\n    * solve the generalized eigenproblem \\f$ Ax = \\lambda B x \\f$. */\n  Ax_lBx              = 0x100,\n  /** Used in GeneralizedSelfAdjointEigenSolver to indicate that it should\n    * solve the generalized eigenproblem \\f$ ABx = \\lambda x \\f$. */\n  ABx_lx              = 0x200,\n  /** Used in GeneralizedSelfAdjointEigenSolver to indicate that it should\n    * solve the generalized eigenproblem \\f$ BAx = \\lambda x \\f$. */\n  BAx_lx              = 0x400,\n  /** \\internal */\n  GenEigMask = Ax_lBx | ABx_lx | BAx_lx\n};\n\n/** \\ingroup enums\n  * Possible values for the \\p QRPreconditioner template parameter of JacobiSVD. */\nenum QRPreconditioners {\n  /** Do not specify what is to be done if the SVD of a non-square matrix is asked for. */\n  NoQRPreconditioner,\n  /** Use a QR decomposition without pivoting as the first step. */\n  HouseholderQRPreconditioner,\n  /** Use a QR decomposition with column pivoting as the first step. */\n  ColPivHouseholderQRPreconditioner,\n  /** Use a QR decomposition with full pivoting as the first step. */\n  FullPivHouseholderQRPreconditioner\n};\n\n#ifdef Success\n#error The preprocessor symbol 'Success' is defined, possibly by the X11 header file X.h\n#endif\n\n/** \\ingroup enums\n  * Enum for reporting the status of a computation. */\nenum ComputationInfo {\n  /** Computation was successful. */\n  Success = 0,        \n  /** The provided data did not satisfy the prerequisites. */\n  NumericalIssue = 1, \n  /** Iterative procedure did not converge. */\n  NoConvergence = 2,\n  /** The inputs are invalid, or the algorithm has been improperly called.\n    * When assertions are enabled, such errors trigger an assert. */\n  InvalidInput = 3\n};\n\n/** \\ingroup enums\n  * Enum used to specify how a particular transformation is stored in a matrix.\n  * \\sa Transform, Hyperplane::transform(). */\nenum TransformTraits {\n  /** Transformation is an isometry. */\n  Isometry      = 0x1,\n  /** Transformation is an affine transformation stored as a (Dim+1)^2 matrix whose last row is \n    * assumed to be [0 ... 0 1]. */\n  Affine        = 0x2,\n  /** Transformation is an affine transformation stored as a (Dim) x (Dim+1) matrix. */\n  AffineCompact = 0x10 | Affine,\n  /** Transformation is a general projective transformation stored as a (Dim+1)^2 matrix. */\n  Projective    = 0x20\n};\n\n/** \\internal \\ingroup enums\n  * Enum used to choose between implementation depending on the computer architecture. */\nnamespace Architecture\n{\n  enum Type {\n    Generic = 0x0,\n    SSE = 0x1,\n    AltiVec = 0x2,\n    VSX = 0x3,\n    NEON = 0x4,\n    MSA = 0x5,\n#if defined EIGEN_VECTORIZE_SSE\n    Target = SSE\n#elif defined EIGEN_VECTORIZE_ALTIVEC\n    Target = AltiVec\n#elif defined EIGEN_VECTORIZE_VSX\n    Target = VSX\n#elif defined EIGEN_VECTORIZE_NEON\n    Target = NEON\n#elif defined EIGEN_VECTORIZE_MSA\n    Target = MSA\n#else\n    Target = Generic\n#endif\n  };\n}\n\n/** \\internal \\ingroup enums\n  * Enum used as template parameter in Product and product evaluators. */\nenum ProductImplType\n{ DefaultProduct=0, LazyProduct, AliasFreeProduct, CoeffBasedProductMode, LazyCoeffBasedProductMode, OuterProduct, InnerProduct, GemvProduct, GemmProduct };\n\n/** \\internal \\ingroup enums\n  * Enum used in experimental parallel implementation. */\nenum Action {GetAction, SetAction};\n\n/** The type used to identify a dense storage. */\nstruct Dense {};\n\n/** The type used to identify a general sparse storage. */\nstruct Sparse {};\n\n/** The type used to identify a general solver (factored) storage. */\nstruct SolverStorage {};\n\n/** The type used to identify a permutation storage. */\nstruct PermutationStorage {};\n\n/** The type used to identify a permutation storage. */\nstruct TranspositionsStorage {};\n\n/** The type used to identify a matrix expression */\nstruct MatrixXpr {};\n\n/** The type used to identify an array expression */\nstruct ArrayXpr {};\n\n// An evaluator must define its shape. By default, it can be one of the following:\nstruct DenseShape             { static std::string debugName() { return \"DenseShape\"; } };\nstruct SolverShape            { static std::string debugName() { return \"SolverShape\"; } };\nstruct HomogeneousShape       { static std::string debugName() { return \"HomogeneousShape\"; } };\nstruct DiagonalShape          { static std::string debugName() { return \"DiagonalShape\"; } };\nstruct BandShape              { static std::string debugName() { return \"BandShape\"; } };\nstruct TriangularShape        { static std::string debugName() { return \"TriangularShape\"; } };\nstruct SelfAdjointShape       { static std::string debugName() { return \"SelfAdjointShape\"; } };\nstruct PermutationShape       { static std::string debugName() { return \"PermutationShape\"; } };\nstruct TranspositionsShape    { static std::string debugName() { return \"TranspositionsShape\"; } };\nstruct SparseShape            { static std::string debugName() { return \"SparseShape\"; } };\n\nnamespace internal {\n\n  // random access iterators based on coeff*() accessors.\nstruct IndexBased {};\n\n// evaluator based on iterators to access coefficients. \nstruct IteratorBased {};\n\n/** \\internal\n * Constants for comparison functors\n */\nenum ComparisonName {\n  cmp_EQ = 0,\n  cmp_LT = 1,\n  cmp_LE = 2,\n  cmp_UNORD = 3,\n  cmp_NEQ = 4,\n  cmp_GT = 5,\n  cmp_GE = 6\n};\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_CONSTANTS_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/util/DisableStupidWarnings.h",
    "content": "#ifndef EIGEN_WARNINGS_DISABLED\n#define EIGEN_WARNINGS_DISABLED\n\n#ifdef _MSC_VER\n  // 4100 - unreferenced formal parameter (occurred e.g. in aligned_allocator::destroy(pointer p))\n  // 4101 - unreferenced local variable\n  // 4181 - qualifier applied to reference type ignored\n  // 4211 - nonstandard extension used : redefined extern to static\n  // 4244 - 'argument' : conversion from 'type1' to 'type2', possible loss of data\n  // 4273 - QtAlignedMalloc, inconsistent DLL linkage\n  // 4324 - structure was padded due to declspec(align())\n  // 4503 - decorated name length exceeded, name was truncated\n  // 4512 - assignment operator could not be generated\n  // 4522 - 'class' : multiple assignment operators specified\n  // 4700 - uninitialized local variable 'xyz' used\n  // 4714 - function marked as __forceinline not inlined\n  // 4717 - 'function' : recursive on all control paths, function will cause runtime stack overflow\n  // 4800 - 'type' : forcing value to bool 'true' or 'false' (performance warning)\n  #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS\n    #pragma warning( push )\n  #endif\n  #pragma warning( disable : 4100 4101 4181 4211 4244 4273 4324 4503 4512 4522 4700 4714 4717 4800)\n\n#elif defined __INTEL_COMPILER\n  // 2196 - routine is both \"inline\" and \"noinline\" (\"noinline\" assumed)\n  //        ICC 12 generates this warning even without any inline keyword, when defining class methods 'inline' i.e. inside of class body\n  //        typedef that may be a reference type.\n  // 279  - controlling expression is constant\n  //        ICC 12 generates this warning on assert(constant_expression_depending_on_template_params) and frankly this is a legitimate use case.\n  // 1684 - conversion from pointer to same-sized integral type (potential portability problem)\n  // 2259 - non-pointer conversion from \"Eigen::Index={ptrdiff_t={long}}\" to \"int\" may lose significant bits\n  #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS\n    #pragma warning push\n  #endif\n  #pragma warning disable 2196 279 1684 2259\n\n#elif defined __clang__\n  // -Wconstant-logical-operand - warning: use of logical && with constant operand; switch to bitwise & or remove constant\n  //     this is really a stupid warning as it warns on compile-time expressions involving enums\n  #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS\n    #pragma clang diagnostic push\n  #endif\n  #pragma clang diagnostic ignored \"-Wconstant-logical-operand\"\n  #if __clang_major__ >= 3 && __clang_minor__ >= 5\n    #pragma clang diagnostic ignored \"-Wabsolute-value\"\n  #endif\n  #if ( defined(__ALTIVEC__) || defined(__VSX__) ) && __cplusplus < 201103L\n    // warning: generic selections are a C11-specific feature\n    // ignoring warnings thrown at vec_ctf in Altivec/PacketMath.h\n    #pragma clang diagnostic ignored \"-Wc11-extensions\"\n  #endif\n\n#elif defined __GNUC__\n\n  #if (!defined(EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS)) &&  (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))\n    #pragma GCC diagnostic push\n  #endif\n  // g++ warns about local variables shadowing member functions, which is too strict\n  #pragma GCC diagnostic ignored \"-Wshadow\"\n  #if __GNUC__ == 4 && __GNUC_MINOR__ < 8\n    // Until g++-4.7 there are warnings when comparing unsigned int vs 0, even in templated functions:\n    #pragma GCC diagnostic ignored \"-Wtype-limits\"\n  #endif\n  #if __GNUC__>=6\n    #pragma GCC diagnostic ignored \"-Wignored-attributes\"\n  #endif\n  #if __GNUC__==7\n    // See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89325\n    #pragma GCC diagnostic ignored \"-Wattributes\"\n  #endif\n#endif\n\n#if defined __NVCC__\n  #pragma diag_suppress boolean_controlling_expr_is_constant\n  // Disable the \"statement is unreachable\" message\n  #pragma diag_suppress code_is_unreachable\n  // Disable the \"dynamic initialization in unreachable code\" message\n  #pragma diag_suppress initialization_not_reachable\n  // Disable the \"invalid error number\" message that we get with older versions of nvcc\n  #pragma diag_suppress 1222\n  // Disable the \"calling a __host__ function from a __host__ __device__ function is not allowed\" messages (yes, there are many of them and they seem to change with every version of the compiler)\n  #pragma diag_suppress 2527\n  #pragma diag_suppress 2529\n  #pragma diag_suppress 2651\n  #pragma diag_suppress 2653\n  #pragma diag_suppress 2668\n  #pragma diag_suppress 2669\n  #pragma diag_suppress 2670\n  #pragma diag_suppress 2671\n  #pragma diag_suppress 2735\n  #pragma diag_suppress 2737\n  #pragma diag_suppress 2739\n#endif\n\n#else\n// warnings already disabled:\n# ifndef EIGEN_WARNINGS_DISABLED_2\n#  define EIGEN_WARNINGS_DISABLED_2\n# elif defined(EIGEN_INTERNAL_DEBUGGING)\n#  error \"Do not include \\\"DisableStupidWarnings.h\\\" recursively more than twice!\"\n# endif\n\n#endif // not EIGEN_WARNINGS_DISABLED\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/util/ForwardDeclarations.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2007-2010 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_FORWARDDECLARATIONS_H\n#define EIGEN_FORWARDDECLARATIONS_H\n\nnamespace Eigen {\nnamespace internal {\n\ntemplate<typename T> struct traits;\n\n// here we say once and for all that traits<const T> == traits<T>\n// When constness must affect traits, it has to be constness on template parameters on which T itself depends.\n// For example, traits<Map<const T> > != traits<Map<T> >, but\n//              traits<const Map<T> > == traits<Map<T> >\ntemplate<typename T> struct traits<const T> : traits<T> {};\n\ntemplate<typename Derived> struct has_direct_access\n{\n  enum { ret = (traits<Derived>::Flags & DirectAccessBit) ? 1 : 0 };\n};\n\ntemplate<typename Derived> struct accessors_level\n{\n  enum { has_direct_access = (traits<Derived>::Flags & DirectAccessBit) ? 1 : 0,\n         has_write_access = (traits<Derived>::Flags & LvalueBit) ? 1 : 0,\n         value = has_direct_access ? (has_write_access ? DirectWriteAccessors : DirectAccessors)\n                                   : (has_write_access ? WriteAccessors       : ReadOnlyAccessors)\n  };\n};\n\ntemplate<typename T> struct evaluator_traits;\n\ntemplate< typename T> struct evaluator;\n\n} // end namespace internal\n\ntemplate<typename T> struct NumTraits;\n\ntemplate<typename Derived> struct EigenBase;\ntemplate<typename Derived> class DenseBase;\ntemplate<typename Derived> class PlainObjectBase;\ntemplate<typename Derived, int Level> class DenseCoeffsBase;\n\ntemplate<typename _Scalar, int _Rows, int _Cols,\n         int _Options = AutoAlign |\n#if EIGEN_GNUC_AT(3,4)\n    // workaround a bug in at least gcc 3.4.6\n    // the innermost ?: ternary operator is misparsed. We write it slightly\n    // differently and this makes gcc 3.4.6 happy, but it's ugly.\n    // The error would only show up with EIGEN_DEFAULT_TO_ROW_MAJOR is defined\n    // (when EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION is RowMajor)\n                          ( (_Rows==1 && _Cols!=1) ? Eigen::RowMajor\n                          : !(_Cols==1 && _Rows!=1) ?  EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION\n                          : Eigen::ColMajor ),\n#else\n                          ( (_Rows==1 && _Cols!=1) ? Eigen::RowMajor\n                          : (_Cols==1 && _Rows!=1) ? Eigen::ColMajor\n                          : EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION ),\n#endif\n         int _MaxRows = _Rows,\n         int _MaxCols = _Cols\n> class Matrix;\n\ntemplate<typename Derived> class MatrixBase;\ntemplate<typename Derived> class ArrayBase;\n\ntemplate<typename ExpressionType, unsigned int Added, unsigned int Removed> class Flagged;\ntemplate<typename ExpressionType, template <typename> class StorageBase > class NoAlias;\ntemplate<typename ExpressionType> class NestByValue;\ntemplate<typename ExpressionType> class ForceAlignedAccess;\ntemplate<typename ExpressionType> class SwapWrapper;\n\ntemplate<typename XprType, int BlockRows=Dynamic, int BlockCols=Dynamic, bool InnerPanel = false> class Block;\ntemplate<typename XprType, typename RowIndices, typename ColIndices> class IndexedView;\ntemplate<typename XprType, int Rows=Dynamic, int Cols=Dynamic, int Order=0> class Reshaped;\n\ntemplate<typename MatrixType, int Size=Dynamic> class VectorBlock;\ntemplate<typename MatrixType> class Transpose;\ntemplate<typename MatrixType> class Conjugate;\ntemplate<typename NullaryOp, typename MatrixType>         class CwiseNullaryOp;\ntemplate<typename UnaryOp,   typename MatrixType>         class CwiseUnaryOp;\ntemplate<typename ViewOp,    typename MatrixType>         class CwiseUnaryView;\ntemplate<typename BinaryOp,  typename Lhs, typename Rhs>  class CwiseBinaryOp;\ntemplate<typename TernaryOp, typename Arg1, typename Arg2, typename Arg3>  class CwiseTernaryOp;\ntemplate<typename Decomposition, typename Rhstype>        class Solve;\ntemplate<typename XprType>                                class Inverse;\n\ntemplate<typename Lhs, typename Rhs, int Option = DefaultProduct> class Product;\n\ntemplate<typename Derived> class DiagonalBase;\ntemplate<typename _DiagonalVectorType> class DiagonalWrapper;\ntemplate<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime=SizeAtCompileTime> class DiagonalMatrix;\ntemplate<typename MatrixType, typename DiagonalType, int ProductOrder> class DiagonalProduct;\ntemplate<typename MatrixType, int Index = 0> class Diagonal;\ntemplate<int SizeAtCompileTime, int MaxSizeAtCompileTime = SizeAtCompileTime, typename IndexType=int> class PermutationMatrix;\ntemplate<int SizeAtCompileTime, int MaxSizeAtCompileTime = SizeAtCompileTime, typename IndexType=int> class Transpositions;\ntemplate<typename Derived> class PermutationBase;\ntemplate<typename Derived> class TranspositionsBase;\ntemplate<typename _IndicesType> class PermutationWrapper;\ntemplate<typename _IndicesType> class TranspositionsWrapper;\n\ntemplate<typename Derived,\n         int Level = internal::accessors_level<Derived>::has_write_access ? WriteAccessors : ReadOnlyAccessors\n> class MapBase;\ntemplate<int InnerStrideAtCompileTime, int OuterStrideAtCompileTime> class Stride;\ntemplate<int Value = Dynamic> class InnerStride;\ntemplate<int Value = Dynamic> class OuterStride;\ntemplate<typename MatrixType, int MapOptions=Unaligned, typename StrideType = Stride<0,0> > class Map;\ntemplate<typename Derived> class RefBase;\ntemplate<typename PlainObjectType, int Options = 0,\n         typename StrideType = typename internal::conditional<PlainObjectType::IsVectorAtCompileTime,InnerStride<1>,OuterStride<> >::type > class Ref;\n\ntemplate<typename Derived> class TriangularBase;\ntemplate<typename MatrixType, unsigned int Mode> class TriangularView;\ntemplate<typename MatrixType, unsigned int Mode> class SelfAdjointView;\ntemplate<typename MatrixType> class SparseView;\ntemplate<typename ExpressionType> class WithFormat;\ntemplate<typename MatrixType> struct CommaInitializer;\ntemplate<typename Derived> class ReturnByValue;\ntemplate<typename ExpressionType> class ArrayWrapper;\ntemplate<typename ExpressionType> class MatrixWrapper;\ntemplate<typename Derived> class SolverBase;\ntemplate<typename XprType> class InnerIterator;\n\nnamespace internal {\ntemplate<typename XprType> class generic_randaccess_stl_iterator;\ntemplate<typename XprType> class pointer_based_stl_iterator;\ntemplate<typename XprType, DirectionType Direction> class subvector_stl_iterator;\ntemplate<typename DecompositionType> struct kernel_retval_base;\ntemplate<typename DecompositionType> struct kernel_retval;\ntemplate<typename DecompositionType> struct image_retval_base;\ntemplate<typename DecompositionType> struct image_retval;\n} // end namespace internal\n\nnamespace internal {\ntemplate<typename _Scalar, int Rows=Dynamic, int Cols=Dynamic, int Supers=Dynamic, int Subs=Dynamic, int Options=0> class BandMatrix;\n}\n\nnamespace internal {\ntemplate<typename Lhs, typename Rhs> struct product_type;\n\ntemplate<bool> struct EnableIf;\n\n/** \\internal\n  * \\class product_evaluator\n  * Products need their own evaluator with more template arguments allowing for\n  * easier partial template specializations.\n  */\ntemplate< typename T,\n          int ProductTag = internal::product_type<typename T::Lhs,typename T::Rhs>::ret,\n          typename LhsShape = typename evaluator_traits<typename T::Lhs>::Shape,\n          typename RhsShape = typename evaluator_traits<typename T::Rhs>::Shape,\n          typename LhsScalar = typename traits<typename T::Lhs>::Scalar,\n          typename RhsScalar = typename traits<typename T::Rhs>::Scalar\n        > struct product_evaluator;\n}\n\ntemplate<typename Lhs, typename Rhs,\n         int ProductType = internal::product_type<Lhs,Rhs>::value>\nstruct ProductReturnType;\n\n// this is a workaround for sun CC\ntemplate<typename Lhs, typename Rhs> struct LazyProductReturnType;\n\nnamespace internal {\n\n// Provides scalar/packet-wise product and product with accumulation\n// with optional conjugation of the arguments.\ntemplate<typename LhsScalar, typename RhsScalar, bool ConjLhs=false, bool ConjRhs=false> struct conj_helper;\n\ntemplate<typename LhsScalar,typename RhsScalar=LhsScalar> struct scalar_sum_op;\ntemplate<typename LhsScalar,typename RhsScalar=LhsScalar> struct scalar_difference_op;\ntemplate<typename LhsScalar,typename RhsScalar=LhsScalar> struct scalar_conj_product_op;\ntemplate<typename LhsScalar,typename RhsScalar=LhsScalar> struct scalar_min_op;\ntemplate<typename LhsScalar,typename RhsScalar=LhsScalar> struct scalar_max_op;\ntemplate<typename Scalar> struct scalar_opposite_op;\ntemplate<typename Scalar> struct scalar_conjugate_op;\ntemplate<typename Scalar> struct scalar_real_op;\ntemplate<typename Scalar> struct scalar_imag_op;\ntemplate<typename Scalar> struct scalar_abs_op;\ntemplate<typename Scalar> struct scalar_abs2_op;\ntemplate<typename LhsScalar,typename RhsScalar=LhsScalar> struct scalar_absolute_difference_op;\ntemplate<typename Scalar> struct scalar_sqrt_op;\ntemplate<typename Scalar> struct scalar_rsqrt_op;\ntemplate<typename Scalar> struct scalar_exp_op;\ntemplate<typename Scalar> struct scalar_log_op;\ntemplate<typename Scalar> struct scalar_cos_op;\ntemplate<typename Scalar> struct scalar_sin_op;\ntemplate<typename Scalar> struct scalar_acos_op;\ntemplate<typename Scalar> struct scalar_asin_op;\ntemplate<typename Scalar> struct scalar_tan_op;\ntemplate<typename Scalar> struct scalar_inverse_op;\ntemplate<typename Scalar> struct scalar_square_op;\ntemplate<typename Scalar> struct scalar_cube_op;\ntemplate<typename Scalar, typename NewType> struct scalar_cast_op;\ntemplate<typename Scalar> struct scalar_random_op;\ntemplate<typename Scalar> struct scalar_constant_op;\ntemplate<typename Scalar> struct scalar_identity_op;\ntemplate<typename Scalar,bool iscpx> struct scalar_sign_op;\ntemplate<typename Scalar,typename ScalarExponent> struct scalar_pow_op;\ntemplate<typename LhsScalar,typename RhsScalar=LhsScalar> struct scalar_hypot_op;\ntemplate<typename LhsScalar,typename RhsScalar=LhsScalar> struct scalar_product_op;\ntemplate<typename LhsScalar,typename RhsScalar=LhsScalar> struct scalar_quotient_op;\n\n// SpecialFunctions module\ntemplate<typename Scalar> struct scalar_lgamma_op;\ntemplate<typename Scalar> struct scalar_digamma_op;\ntemplate<typename Scalar> struct scalar_erf_op;\ntemplate<typename Scalar> struct scalar_erfc_op;\ntemplate<typename Scalar> struct scalar_ndtri_op;\ntemplate<typename Scalar> struct scalar_igamma_op;\ntemplate<typename Scalar> struct scalar_igammac_op;\ntemplate<typename Scalar> struct scalar_zeta_op;\ntemplate<typename Scalar> struct scalar_betainc_op;\n\n// Bessel functions in SpecialFunctions module\ntemplate<typename Scalar> struct scalar_bessel_i0_op;\ntemplate<typename Scalar> struct scalar_bessel_i0e_op;\ntemplate<typename Scalar> struct scalar_bessel_i1_op;\ntemplate<typename Scalar> struct scalar_bessel_i1e_op;\ntemplate<typename Scalar> struct scalar_bessel_j0_op;\ntemplate<typename Scalar> struct scalar_bessel_y0_op;\ntemplate<typename Scalar> struct scalar_bessel_j1_op;\ntemplate<typename Scalar> struct scalar_bessel_y1_op;\ntemplate<typename Scalar> struct scalar_bessel_k0_op;\ntemplate<typename Scalar> struct scalar_bessel_k0e_op;\ntemplate<typename Scalar> struct scalar_bessel_k1_op;\ntemplate<typename Scalar> struct scalar_bessel_k1e_op;\n\n\n} // end namespace internal\n\nstruct IOFormat;\n\n// Array module\ntemplate<typename _Scalar, int _Rows, int _Cols,\n         int _Options = AutoAlign |\n#if EIGEN_GNUC_AT(3,4)\n    // workaround a bug in at least gcc 3.4.6\n    // the innermost ?: ternary operator is misparsed. We write it slightly\n    // differently and this makes gcc 3.4.6 happy, but it's ugly.\n    // The error would only show up with EIGEN_DEFAULT_TO_ROW_MAJOR is defined\n    // (when EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION is RowMajor)\n                          ( (_Rows==1 && _Cols!=1) ? Eigen::RowMajor\n                          : !(_Cols==1 && _Rows!=1) ?  EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION\n                          : Eigen::ColMajor ),\n#else\n                          ( (_Rows==1 && _Cols!=1) ? Eigen::RowMajor\n                          : (_Cols==1 && _Rows!=1) ? Eigen::ColMajor\n                          : EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION ),\n#endif\n         int _MaxRows = _Rows, int _MaxCols = _Cols> class Array;\ntemplate<typename ConditionMatrixType, typename ThenMatrixType, typename ElseMatrixType> class Select;\ntemplate<typename MatrixType, typename BinaryOp, int Direction> class PartialReduxExpr;\ntemplate<typename ExpressionType, int Direction> class VectorwiseOp;\ntemplate<typename MatrixType,int RowFactor,int ColFactor> class Replicate;\ntemplate<typename MatrixType, int Direction = BothDirections> class Reverse;\n\ntemplate<typename MatrixType> class FullPivLU;\ntemplate<typename MatrixType> class PartialPivLU;\nnamespace internal {\ntemplate<typename MatrixType> struct inverse_impl;\n}\ntemplate<typename MatrixType> class HouseholderQR;\ntemplate<typename MatrixType> class ColPivHouseholderQR;\ntemplate<typename MatrixType> class FullPivHouseholderQR;\ntemplate<typename MatrixType> class CompleteOrthogonalDecomposition;\ntemplate<typename MatrixType> class SVDBase;\ntemplate<typename MatrixType, int QRPreconditioner = ColPivHouseholderQRPreconditioner> class JacobiSVD;\ntemplate<typename MatrixType> class BDCSVD;\ntemplate<typename MatrixType, int UpLo = Lower> class LLT;\ntemplate<typename MatrixType, int UpLo = Lower> class LDLT;\ntemplate<typename VectorsType, typename CoeffsType, int Side=OnTheLeft> class HouseholderSequence;\ntemplate<typename Scalar>     class JacobiRotation;\n\n// Geometry module:\ntemplate<typename Derived, int _Dim> class RotationBase;\ntemplate<typename Lhs, typename Rhs> class Cross;\ntemplate<typename Derived> class QuaternionBase;\ntemplate<typename Scalar> class Rotation2D;\ntemplate<typename Scalar> class AngleAxis;\ntemplate<typename Scalar,int Dim> class Translation;\ntemplate<typename Scalar,int Dim> class AlignedBox;\ntemplate<typename Scalar, int Options = AutoAlign> class Quaternion;\ntemplate<typename Scalar,int Dim,int Mode,int _Options=AutoAlign> class Transform;\ntemplate <typename _Scalar, int _AmbientDim, int Options=AutoAlign> class ParametrizedLine;\ntemplate <typename _Scalar, int _AmbientDim, int Options=AutoAlign> class Hyperplane;\ntemplate<typename Scalar> class UniformScaling;\ntemplate<typename MatrixType,int Direction> class Homogeneous;\n\n// Sparse module:\ntemplate<typename Derived> class SparseMatrixBase;\n\n// MatrixFunctions module\ntemplate<typename Derived> struct MatrixExponentialReturnValue;\ntemplate<typename Derived> class MatrixFunctionReturnValue;\ntemplate<typename Derived> class MatrixSquareRootReturnValue;\ntemplate<typename Derived> class MatrixLogarithmReturnValue;\ntemplate<typename Derived> class MatrixPowerReturnValue;\ntemplate<typename Derived> class MatrixComplexPowerReturnValue;\n\nnamespace internal {\ntemplate <typename Scalar>\nstruct stem_function\n{\n  typedef std::complex<typename NumTraits<Scalar>::Real> ComplexScalar;\n  typedef ComplexScalar type(ComplexScalar, int);\n};\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_FORWARDDECLARATIONS_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/util/IndexedViewHelper.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2017 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n\n#ifndef EIGEN_INDEXED_VIEW_HELPER_H\n#define EIGEN_INDEXED_VIEW_HELPER_H\n\nnamespace Eigen {\n\nnamespace internal {\nstruct symbolic_last_tag {};\n}\n\n/** \\var last\n  * \\ingroup Core_Module\n  *\n  * Can be used as a parameter to Eigen::seq and Eigen::seqN functions to symbolically reference the last element/row/columns\n  * of the underlying vector or matrix once passed to DenseBase::operator()(const RowIndices&, const ColIndices&).\n  *\n  * This symbolic placeholder supports standard arithmetic operations.\n  *\n  * A typical usage example would be:\n  * \\code\n  * using namespace Eigen;\n  * using Eigen::last;\n  * VectorXd v(n);\n  * v(seq(2,last-2)).setOnes();\n  * \\endcode\n  *\n  * \\sa end\n  */\nstatic const symbolic::SymbolExpr<internal::symbolic_last_tag> last; // PLEASE use Eigen::last   instead of Eigen::placeholders::last\n\n/** \\var lastp1\n  * \\ingroup Core_Module\n  *\n  * Can be used as a parameter to Eigen::seq and Eigen::seqN functions to symbolically\n  * reference the last+1 element/row/columns of the underlying vector or matrix once\n  * passed to DenseBase::operator()(const RowIndices&, const ColIndices&).\n  *\n  * This symbolic placeholder supports standard arithmetic operations.\n  * It is essentially an alias to last+fix<1>.\n  *\n  * \\sa last\n  */\n#ifdef EIGEN_PARSED_BY_DOXYGEN\nstatic const auto lastp1 = last+fix<1>;\n#else\n// Using a FixedExpr<1> expression is important here to make sure the compiler\n// can fully optimize the computation starting indices with zero overhead.\nstatic const symbolic::AddExpr<symbolic::SymbolExpr<internal::symbolic_last_tag>,symbolic::ValueExpr<Eigen::internal::FixedInt<1> > > lastp1(last+fix<1>());\n#endif\n\nnamespace internal {\n\n // Replace symbolic last/end \"keywords\" by their true runtime value\ninline Index eval_expr_given_size(Index x, Index /* size */)   { return x; }\n\ntemplate<int N>\nFixedInt<N> eval_expr_given_size(FixedInt<N> x, Index /*size*/)   { return x; }\n\ntemplate<typename Derived>\nIndex eval_expr_given_size(const symbolic::BaseExpr<Derived> &x, Index size)\n{\n  return x.derived().eval(last=size-1);\n}\n\n// Extract increment/step at compile time\ntemplate<typename T, typename EnableIf = void> struct get_compile_time_incr {\n  enum { value = UndefinedIncr };\n};\n\n// Analogue of std::get<0>(x), but tailored for our needs.\ntemplate<typename T>\nIndex first(const T& x) { return x.first(); }\n\n// IndexedViewCompatibleType/makeIndexedViewCompatible turn an arbitrary object of type T into something usable by MatrixSlice\n// The generic implementation is a no-op\ntemplate<typename T,int XprSize,typename EnableIf=void>\nstruct IndexedViewCompatibleType {\n  typedef T type;\n};\n\ntemplate<typename T,typename Q>\nconst T& makeIndexedViewCompatible(const T& x, Index /*size*/, Q) { return x; }\n\n//--------------------------------------------------------------------------------\n// Handling of a single Index\n//--------------------------------------------------------------------------------\n\nstruct SingleRange {\n  enum {\n    SizeAtCompileTime = 1\n  };\n  SingleRange(Index val) : m_value(val) {}\n  Index operator[](Index) const { return m_value; }\n  Index size() const { return 1; }\n  Index first() const { return m_value; }\n  Index m_value;\n};\n\ntemplate<> struct get_compile_time_incr<SingleRange> {\n  enum { value = 1 }; // 1 or 0 ??\n};\n\n// Turn a single index into something that looks like an array (i.e., that exposes a .size(), and operator[](int) methods)\ntemplate<typename T, int XprSize>\nstruct IndexedViewCompatibleType<T,XprSize,typename internal::enable_if<internal::is_integral<T>::value>::type> {\n  // Here we could simply use Array, but maybe it's less work for the compiler to use\n  // a simpler wrapper as SingleRange\n  //typedef Eigen::Array<Index,1,1> type;\n  typedef SingleRange type;\n};\n\ntemplate<typename T, int XprSize>\nstruct IndexedViewCompatibleType<T, XprSize, typename enable_if<symbolic::is_symbolic<T>::value>::type> {\n  typedef SingleRange type;\n};\n\n\ntemplate<typename T>\ntypename enable_if<symbolic::is_symbolic<T>::value,SingleRange>::type\nmakeIndexedViewCompatible(const T& id, Index size, SpecializedType) {\n  return eval_expr_given_size(id,size);\n}\n\n//--------------------------------------------------------------------------------\n// Handling of all\n//--------------------------------------------------------------------------------\n\nstruct all_t { all_t() {} };\n\n// Convert a symbolic 'all' into a usable range type\ntemplate<int XprSize>\nstruct AllRange {\n  enum { SizeAtCompileTime = XprSize };\n  AllRange(Index size = XprSize) : m_size(size) {}\n  Index operator[](Index i) const { return i; }\n  Index size() const { return m_size.value(); }\n  Index first() const { return 0; }\n  variable_if_dynamic<Index,XprSize> m_size;\n};\n\ntemplate<int XprSize>\nstruct IndexedViewCompatibleType<all_t,XprSize> {\n  typedef AllRange<XprSize> type;\n};\n\ntemplate<typename XprSizeType>\ninline AllRange<get_fixed_value<XprSizeType>::value> makeIndexedViewCompatible(all_t , XprSizeType size, SpecializedType) {\n  return AllRange<get_fixed_value<XprSizeType>::value>(size);\n}\n\ntemplate<int Size> struct get_compile_time_incr<AllRange<Size> > {\n  enum { value = 1 };\n};\n\n} // end namespace internal\n\n\n/** \\var all\n  * \\ingroup Core_Module\n  * Can be used as a parameter to DenseBase::operator()(const RowIndices&, const ColIndices&) to index all rows or columns\n  */\nstatic const Eigen::internal::all_t all; // PLEASE use Eigen::all instead of Eigen::placeholders::all\n\n\nnamespace placeholders {\n  typedef symbolic::SymbolExpr<internal::symbolic_last_tag> last_t;\n  typedef symbolic::AddExpr<symbolic::SymbolExpr<internal::symbolic_last_tag>,symbolic::ValueExpr<Eigen::internal::FixedInt<1> > > end_t;\n  typedef Eigen::internal::all_t all_t;\n\n  EIGEN_DEPRECATED static const all_t  all  = Eigen::all;    // PLEASE use Eigen::all    instead of Eigen::placeholders::all\n  EIGEN_DEPRECATED static const last_t last = Eigen::last;   // PLEASE use Eigen::last   instead of Eigen::placeholders::last\n  EIGEN_DEPRECATED static const end_t  end  = Eigen::lastp1; // PLEASE use Eigen::lastp1 instead of Eigen::placeholders::end\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_INDEXED_VIEW_HELPER_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/util/IntegralConstant.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2017 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n\n#ifndef EIGEN_INTEGRAL_CONSTANT_H\n#define EIGEN_INTEGRAL_CONSTANT_H\n\nnamespace Eigen {\n\nnamespace internal {\n\ntemplate<int N> class FixedInt;\ntemplate<int N> class VariableAndFixedInt;\n\n/** \\internal\n  * \\class FixedInt\n  *\n  * This class embeds a compile-time integer \\c N.\n  *\n  * It is similar to c++11 std::integral_constant<int,N> but with some additional features\n  * such as:\n  *  - implicit conversion to int\n  *  - arithmetic and some bitwise operators: -, +, *, /, %, &, |\n  *  - c++98/14 compatibility with fix<N> and fix<N>() syntax to define integral constants.\n  *\n  * It is strongly discouraged to directly deal with this class FixedInt. Instances are expcected to\n  * be created by the user using Eigen::fix<N> or Eigen::fix<N>(). In C++98-11, the former syntax does\n  * not create a FixedInt<N> instance but rather a point to function that needs to be \\em cleaned-up\n  * using the generic helper:\n  * \\code\n  * internal::cleanup_index_type<T>::type\n  * internal::cleanup_index_type<T,DynamicKey>::type\n  * \\endcode\n  * where T can a FixedInt<N>, a pointer to function FixedInt<N> (*)(), or numerous other integer-like representations.\n  * \\c DynamicKey is either Dynamic (default) or DynamicIndex and used to identify true compile-time values.\n  *\n  * For convenience, you can extract the compile-time value \\c N in a generic way using the following helper:\n  * \\code\n  * internal::get_fixed_value<T,DefaultVal>::value\n  * \\endcode\n  * that will give you \\c N if T equals FixedInt<N> or FixedInt<N> (*)(), and \\c DefaultVal if T does not embed any compile-time value (e.g., T==int).\n  *\n  * \\sa fix<N>, class VariableAndFixedInt\n  */\ntemplate<int N> class FixedInt\n{\npublic:\n  static const int value = N;\n  operator int() const { return value; }\n  FixedInt() {}\n  FixedInt( VariableAndFixedInt<N> other) {\n    #ifndef EIGEN_INTERNAL_DEBUGGING\n    EIGEN_UNUSED_VARIABLE(other);\n    #endif\n    eigen_internal_assert(int(other)==N);\n  }\n\n  FixedInt<-N> operator-() const { return FixedInt<-N>(); }\n  template<int M>\n  FixedInt<N+M> operator+( FixedInt<M>) const { return FixedInt<N+M>(); }\n  template<int M>\n  FixedInt<N-M> operator-( FixedInt<M>) const { return FixedInt<N-M>(); }\n  template<int M>\n  FixedInt<N*M> operator*( FixedInt<M>) const { return FixedInt<N*M>(); }\n  template<int M>\n  FixedInt<N/M> operator/( FixedInt<M>) const { return FixedInt<N/M>(); }\n  template<int M>\n  FixedInt<N%M> operator%( FixedInt<M>) const { return FixedInt<N%M>(); }\n  template<int M>\n  FixedInt<N|M> operator|( FixedInt<M>) const { return FixedInt<N|M>(); }\n  template<int M>\n  FixedInt<N&M> operator&( FixedInt<M>) const { return FixedInt<N&M>(); }\n\n#if EIGEN_HAS_CXX14\n  // Needed in C++14 to allow fix<N>():\n  FixedInt operator() () const { return *this; }\n\n  VariableAndFixedInt<N> operator() (int val) const { return VariableAndFixedInt<N>(val); }\n#else\n  FixedInt ( FixedInt<N> (*)() ) {}\n#endif\n\n#if EIGEN_HAS_CXX11\n  FixedInt(std::integral_constant<int,N>) {}\n#endif\n};\n\n/** \\internal\n  * \\class VariableAndFixedInt\n  *\n  * This class embeds both a compile-time integer \\c N and a runtime integer.\n  * Both values are supposed to be equal unless the compile-time value \\c N has a special\n  * value meaning that the runtime-value should be used. Depending on the context, this special\n  * value can be either Eigen::Dynamic (for positive quantities) or Eigen::DynamicIndex (for\n  * quantities that can be negative).\n  *\n  * It is the return-type of the function Eigen::fix<N>(int), and most of the time this is the only\n  * way it is used. It is strongly discouraged to directly deal with instances of VariableAndFixedInt.\n  * Indeed, in order to write generic code, it is the responsibility of the callee to properly convert\n  * it to either a true compile-time quantity (i.e. a FixedInt<N>), or to a runtime quantity (e.g., an Index)\n  * using the following generic helper:\n  * \\code\n  * internal::cleanup_index_type<T>::type\n  * internal::cleanup_index_type<T,DynamicKey>::type\n  * \\endcode\n  * where T can be a template instantiation of VariableAndFixedInt or numerous other integer-like representations.\n  * \\c DynamicKey is either Dynamic (default) or DynamicIndex and used to identify true compile-time values.\n  *\n  * For convenience, you can also extract the compile-time value \\c N using the following helper:\n  * \\code\n  * internal::get_fixed_value<T,DefaultVal>::value\n  * \\endcode\n  * that will give you \\c N if T equals VariableAndFixedInt<N>, and \\c DefaultVal if T does not embed any compile-time value (e.g., T==int).\n  *\n  * \\sa fix<N>(int), class FixedInt\n  */\ntemplate<int N> class VariableAndFixedInt\n{\npublic:\n  static const int value = N;\n  operator int() const { return m_value; }\n  VariableAndFixedInt(int val) { m_value = val; }\nprotected:\n  int m_value;\n};\n\ntemplate<typename T, int Default=Dynamic> struct get_fixed_value {\n  static const int value = Default;\n};\n\ntemplate<int N,int Default> struct get_fixed_value<FixedInt<N>,Default> {\n  static const int value = N;\n};\n\n#if !EIGEN_HAS_CXX14\ntemplate<int N,int Default> struct get_fixed_value<FixedInt<N> (*)(),Default> {\n  static const int value = N;\n};\n#endif\n\ntemplate<int N,int Default> struct get_fixed_value<VariableAndFixedInt<N>,Default> {\n  static const int value = N ;\n};\n\ntemplate<typename T, int N, int Default>\nstruct get_fixed_value<variable_if_dynamic<T,N>,Default> {\n  static const int value = N;\n};\n\ntemplate<typename T> EIGEN_DEVICE_FUNC Index get_runtime_value(const T &x) { return x; }\n#if !EIGEN_HAS_CXX14\ntemplate<int N> EIGEN_DEVICE_FUNC Index get_runtime_value(FixedInt<N> (*)()) { return N; }\n#endif\n\n// Cleanup integer/FixedInt/VariableAndFixedInt/etc types:\n\n// By default, no cleanup:\ntemplate<typename T, int DynamicKey=Dynamic, typename EnableIf=void> struct cleanup_index_type { typedef T type; };\n\n// Convert any integral type (e.g., short, int, unsigned int, etc.) to Eigen::Index\ntemplate<typename T, int DynamicKey> struct cleanup_index_type<T,DynamicKey,typename internal::enable_if<internal::is_integral<T>::value>::type> { typedef Index type; };\n\n#if !EIGEN_HAS_CXX14\n// In c++98/c++11, fix<N> is a pointer to function that we better cleanup to a true FixedInt<N>:\ntemplate<int N, int DynamicKey> struct cleanup_index_type<FixedInt<N> (*)(), DynamicKey> { typedef FixedInt<N> type; };\n#endif\n\n// If VariableAndFixedInt does not match DynamicKey, then we turn it to a pure compile-time value:\ntemplate<int N, int DynamicKey> struct cleanup_index_type<VariableAndFixedInt<N>, DynamicKey> { typedef FixedInt<N> type; };\n// If VariableAndFixedInt matches DynamicKey, then we turn it to a pure runtime-value (aka Index):\ntemplate<int DynamicKey> struct cleanup_index_type<VariableAndFixedInt<DynamicKey>, DynamicKey> { typedef Index type; };\n\n#if EIGEN_HAS_CXX11\ntemplate<int N, int DynamicKey> struct cleanup_index_type<std::integral_constant<int,N>, DynamicKey> { typedef FixedInt<N> type; };\n#endif\n\n} // end namespace internal\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\n\n#if EIGEN_HAS_CXX14\ntemplate<int N>\nstatic const internal::FixedInt<N> fix{};\n#else\ntemplate<int N>\ninline internal::FixedInt<N> fix() { return internal::FixedInt<N>(); }\n\n// The generic typename T is mandatory. Otherwise, a code like fix<N> could refer to either the function above or this next overload.\n// This way a code like fix<N> can only refer to the previous function.\ntemplate<int N,typename T>\ninline internal::VariableAndFixedInt<N> fix(T val) { return internal::VariableAndFixedInt<N>(internal::convert_index<int>(val)); }\n#endif\n\n#else // EIGEN_PARSED_BY_DOXYGEN\n\n/** \\var fix<N>()\n  * \\ingroup Core_Module\n  *\n  * This \\em identifier permits to construct an object embedding a compile-time integer \\c N.\n  *\n  * \\tparam N the compile-time integer value\n  *\n  * It is typically used in conjunction with the Eigen::seq and Eigen::seqN functions to pass compile-time values to them:\n  * \\code\n  * seqN(10,fix<4>,fix<-3>)   // <=> [10 7 4 1]\n  * \\endcode\n  *\n  * See also the function fix(int) to pass both a compile-time and runtime value.\n  *\n  * In c++14, it is implemented as:\n  * \\code\n  * template<int N> static const internal::FixedInt<N> fix{};\n  * \\endcode\n  * where internal::FixedInt<N> is an internal template class similar to\n  * <a href=\"http://en.cppreference.com/w/cpp/types/integral_constant\">\\c std::integral_constant </a><tt> <int,N> </tt>\n  * Here, \\c fix<N> is thus an object of type \\c internal::FixedInt<N>.\n  *\n  * In c++98/11, it is implemented as a function:\n  * \\code\n  * template<int N> inline internal::FixedInt<N> fix();\n  * \\endcode\n  * Here internal::FixedInt<N> is thus a pointer to function.\n  *\n  * If for some reason you want a true object in c++98 then you can write: \\code fix<N>() \\endcode which is also valid in c++14.\n  *\n  * \\sa fix<N>(int), seq, seqN\n  */\ntemplate<int N>\nstatic const auto fix();\n\n/** \\fn fix<N>(int)\n  * \\ingroup Core_Module\n  *\n  * This function returns an object embedding both a compile-time integer \\c N, and a fallback runtime value \\a val.\n  *\n  * \\tparam N the compile-time integer value\n  * \\param  val the fallback runtime integer value\n  *\n  * This function is a more general version of the \\ref fix identifier/function that can be used in template code\n  * where the compile-time value could turn out to actually mean \"undefined at compile-time\". For positive integers\n  * such as a size or a dimension, this case is identified by Eigen::Dynamic, whereas runtime signed integers\n  * (e.g., an increment/stride) are identified as Eigen::DynamicIndex. In such a case, the runtime value \\a val\n  * will be used as a fallback.\n  *\n  * A typical use case would be:\n  * \\code\n  * template<typename Derived> void foo(const MatrixBase<Derived> &mat) {\n  *   const int N = Derived::RowsAtCompileTime==Dynamic ? Dynamic : Derived::RowsAtCompileTime/2;\n  *   const int n = mat.rows()/2;\n  *   ... mat( seqN(0,fix<N>(n) ) ...;\n  * }\n  * \\endcode\n  * In this example, the function Eigen::seqN knows that the second argument is expected to be a size.\n  * If the passed compile-time value N equals Eigen::Dynamic, then the proxy object returned by fix will be dissmissed, and converted to an Eigen::Index of value \\c n.\n  * Otherwise, the runtime-value \\c n will be dissmissed, and the returned ArithmeticSequence will be of the exact same type as <tt> seqN(0,fix<N>) </tt>.\n  *\n  * \\sa fix, seqN, class ArithmeticSequence\n  */\ntemplate<int N>\nstatic const auto fix(int val);\n\n#endif // EIGEN_PARSED_BY_DOXYGEN\n\n} // end namespace Eigen\n\n#endif // EIGEN_INTEGRAL_CONSTANT_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/util/MKL_support.h",
    "content": "/*\n Copyright (c) 2011, Intel Corporation. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without modification,\n are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n   list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n * Neither the name of Intel Corporation nor the names of its contributors may\n   be used to endorse or promote products derived from this software without\n   specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\n ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n ********************************************************************************\n *   Content : Eigen bindings to Intel(R) MKL\n *   Include file with common MKL declarations\n ********************************************************************************\n*/\n\n#ifndef EIGEN_MKL_SUPPORT_H\n#define EIGEN_MKL_SUPPORT_H\n\n#ifdef EIGEN_USE_MKL_ALL\n  #ifndef EIGEN_USE_BLAS\n    #define EIGEN_USE_BLAS\n  #endif\n  #ifndef EIGEN_USE_LAPACKE\n    #define EIGEN_USE_LAPACKE\n  #endif\n  #ifndef EIGEN_USE_MKL_VML\n    #define EIGEN_USE_MKL_VML\n  #endif\n#endif\n\n#ifdef EIGEN_USE_LAPACKE_STRICT\n  #define EIGEN_USE_LAPACKE\n#endif\n\n#if defined(EIGEN_USE_MKL_VML) && !defined(EIGEN_USE_MKL)\n  #define EIGEN_USE_MKL\n#endif\n\n\n#if defined EIGEN_USE_MKL\n#   if (!defined MKL_DIRECT_CALL) && (!defined EIGEN_MKL_NO_DIRECT_CALL)\n#       define MKL_DIRECT_CALL\n#       define MKL_DIRECT_CALL_JUST_SET\n#   endif\n#   include <mkl.h>\n/*Check IMKL version for compatibility: < 10.3 is not usable with Eigen*/\n#   ifndef INTEL_MKL_VERSION\n#       undef EIGEN_USE_MKL /* INTEL_MKL_VERSION is not even defined on older versions */\n#   elif INTEL_MKL_VERSION < 100305    /* the intel-mkl-103-release-notes say this was when the lapacke.h interface was added*/\n#       undef EIGEN_USE_MKL\n#   endif\n#   ifndef EIGEN_USE_MKL\n    /*If the MKL version is too old, undef everything*/\n#       undef   EIGEN_USE_MKL_ALL\n#       undef   EIGEN_USE_LAPACKE\n#       undef   EIGEN_USE_MKL_VML\n#       undef   EIGEN_USE_LAPACKE_STRICT\n#       undef   EIGEN_USE_LAPACKE\n#       ifdef   MKL_DIRECT_CALL_JUST_SET\n#           undef MKL_DIRECT_CALL\n#       endif\n#   endif\n#endif\n\n#if defined EIGEN_USE_MKL\n\n#define EIGEN_MKL_VML_THRESHOLD 128\n\n/* MKL_DOMAIN_BLAS, etc are defined only in 10.3 update 7 */\n/* MKL_BLAS, etc are not defined in 11.2 */\n#ifdef MKL_DOMAIN_ALL\n#define EIGEN_MKL_DOMAIN_ALL MKL_DOMAIN_ALL\n#else\n#define EIGEN_MKL_DOMAIN_ALL MKL_ALL\n#endif\n\n#ifdef MKL_DOMAIN_BLAS\n#define EIGEN_MKL_DOMAIN_BLAS MKL_DOMAIN_BLAS\n#else\n#define EIGEN_MKL_DOMAIN_BLAS MKL_BLAS\n#endif\n\n#ifdef MKL_DOMAIN_FFT\n#define EIGEN_MKL_DOMAIN_FFT MKL_DOMAIN_FFT\n#else\n#define EIGEN_MKL_DOMAIN_FFT MKL_FFT\n#endif\n\n#ifdef MKL_DOMAIN_VML\n#define EIGEN_MKL_DOMAIN_VML MKL_DOMAIN_VML\n#else\n#define EIGEN_MKL_DOMAIN_VML MKL_VML\n#endif\n\n#ifdef MKL_DOMAIN_PARDISO\n#define EIGEN_MKL_DOMAIN_PARDISO MKL_DOMAIN_PARDISO\n#else\n#define EIGEN_MKL_DOMAIN_PARDISO MKL_PARDISO\n#endif\n#endif\n\n#if defined(EIGEN_USE_BLAS) && !defined(EIGEN_USE_MKL)\n#include \"../../misc/blas.h\"\n#endif\n\nnamespace Eigen {\n\ntypedef std::complex<double> dcomplex;\ntypedef std::complex<float>  scomplex;\n\n#if defined(EIGEN_USE_MKL)\ntypedef MKL_INT BlasIndex;\n#else\ntypedef int BlasIndex;\n#endif\n\n} // end namespace Eigen\n\n\n#endif // EIGEN_MKL_SUPPORT_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/util/Macros.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2015 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_MACROS_H\n#define EIGEN_MACROS_H\n\n//------------------------------------------------------------------------------------------\n// Eigen version and basic defaults\n//------------------------------------------------------------------------------------------\n\n#define EIGEN_WORLD_VERSION 3\n#define EIGEN_MAJOR_VERSION 3\n#define EIGEN_MINOR_VERSION 90\n\n#define EIGEN_VERSION_AT_LEAST(x,y,z) (EIGEN_WORLD_VERSION>x || (EIGEN_WORLD_VERSION>=x && \\\n                                      (EIGEN_MAJOR_VERSION>y || (EIGEN_MAJOR_VERSION>=y && \\\n                                                                 EIGEN_MINOR_VERSION>=z))))\n\n#ifdef EIGEN_DEFAULT_TO_ROW_MAJOR\n#define EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION Eigen::RowMajor\n#else\n#define EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION Eigen::ColMajor\n#endif\n\n#ifndef EIGEN_DEFAULT_DENSE_INDEX_TYPE\n#define EIGEN_DEFAULT_DENSE_INDEX_TYPE std::ptrdiff_t\n#endif\n\n// Upperbound on the C++ version to use.\n// Expected values are 03, 11, 14, 17, etc.\n// By default, let's use an arbitrarily large C++ version.\n#ifndef EIGEN_MAX_CPP_VER\n#define EIGEN_MAX_CPP_VER 99\n#endif\n\n/** Allows to disable some optimizations which might affect the accuracy of the result.\n  * Such optimization are enabled by default, and set EIGEN_FAST_MATH to 0 to disable them.\n  * They currently include:\n  *   - single precision ArrayBase::sin() and ArrayBase::cos() for SSE and AVX vectorization.\n  */\n#ifndef EIGEN_FAST_MATH\n#define EIGEN_FAST_MATH 1\n#endif\n\n#ifndef EIGEN_STACK_ALLOCATION_LIMIT\n// 131072 == 128 KB\n#define EIGEN_STACK_ALLOCATION_LIMIT 131072\n#endif\n\n//------------------------------------------------------------------------------------------\n// Compiler identification, EIGEN_COMP_*\n//------------------------------------------------------------------------------------------\n\n/// \\internal EIGEN_COMP_GNUC set to 1 for all compilers compatible with GCC\n#ifdef __GNUC__\n  #define EIGEN_COMP_GNUC (__GNUC__*10+__GNUC_MINOR__)\n#else\n  #define EIGEN_COMP_GNUC 0\n#endif\n\n/// \\internal EIGEN_COMP_CLANG set to major+minor version (e.g., 307 for clang 3.7) if the compiler is clang\n#if defined(__clang__)\n  #define EIGEN_COMP_CLANG (__clang_major__*100+__clang_minor__)\n#else\n  #define EIGEN_COMP_CLANG 0\n#endif\n\n\n/// \\internal EIGEN_COMP_LLVM set to 1 if the compiler backend is llvm\n#if defined(__llvm__)\n  #define EIGEN_COMP_LLVM 1\n#else\n  #define EIGEN_COMP_LLVM 0\n#endif\n\n/// \\internal EIGEN_COMP_ICC set to __INTEL_COMPILER if the compiler is Intel compiler, 0 otherwise\n#if defined(__INTEL_COMPILER)\n  #define EIGEN_COMP_ICC __INTEL_COMPILER\n#else\n  #define EIGEN_COMP_ICC 0\n#endif\n\n/// \\internal EIGEN_COMP_MINGW set to 1 if the compiler is mingw\n#if defined(__MINGW32__)\n  #define EIGEN_COMP_MINGW 1\n#else\n  #define EIGEN_COMP_MINGW 0\n#endif\n\n/// \\internal EIGEN_COMP_SUNCC set to 1 if the compiler is Solaris Studio\n#if defined(__SUNPRO_CC)\n  #define EIGEN_COMP_SUNCC 1\n#else\n  #define EIGEN_COMP_SUNCC 0\n#endif\n\n/// \\internal EIGEN_COMP_MSVC set to _MSC_VER if the compiler is Microsoft Visual C++, 0 otherwise.\n#if defined(_MSC_VER)\n  #define EIGEN_COMP_MSVC _MSC_VER\n#else\n  #define EIGEN_COMP_MSVC 0\n#endif\n\n#if defined(__NVCC__)\n#if defined(__CUDACC_VER_MAJOR__) && (__CUDACC_VER_MAJOR__ >= 9)\n  #define EIGEN_COMP_NVCC  ((__CUDACC_VER_MAJOR__ * 10000) + (__CUDACC_VER_MINOR__ * 100))\n#elif defined(__CUDACC_VER__)\n  #define EIGEN_COMP_NVCC __CUDACC_VER__\n#else\n  #error \"NVCC did not define compiler version.\"\n#endif\n#else\n  #define EIGEN_COMP_NVCC 0\n#endif\n\n// For the record, here is a table summarizing the possible values for EIGEN_COMP_MSVC:\n//  name        ver   MSC_VER\n//  2008         9      1500\n//  2010        10      1600\n//  2012        11      1700\n//  2013        12      1800\n//  2015        14      1900\n//  \"15\"        15      1900\n//  2017-14.1   15.0    1910\n//  2017-14.11  15.3    1911\n//  2017-14.12  15.5    1912\n//  2017-14.13  15.6    1913\n//  2017-14.14  15.7    1914\n\n/// \\internal EIGEN_COMP_MSVC_LANG set to _MSVC_LANG if the compiler is Microsoft Visual C++, 0 otherwise.\n#if defined(_MSVC_LANG)\n  #define EIGEN_COMP_MSVC_LANG _MSVC_LANG\n#else\n  #define EIGEN_COMP_MSVC_LANG 0\n#endif\n\n// For the record, here is a table summarizing the possible values for EIGEN_COMP_MSVC_LANG:\n// MSVC option                          Standard  MSVC_LANG\n// /std:c++14 (default as of VS 2019)   C++14     201402L\n// /std:c++17                           C++17     201703L\n// /std:c++latest                       >C++17    >201703L\n\n/// \\internal EIGEN_COMP_MSVC_STRICT set to 1 if the compiler is really Microsoft Visual C++ and not ,e.g., ICC or clang-cl\n#if EIGEN_COMP_MSVC && !(EIGEN_COMP_ICC || EIGEN_COMP_LLVM || EIGEN_COMP_CLANG)\n  #define EIGEN_COMP_MSVC_STRICT _MSC_VER\n#else\n  #define EIGEN_COMP_MSVC_STRICT 0\n#endif\n\n/// \\internal EIGEN_COMP_IBM set to xlc version if the compiler is IBM XL C++\n// XLC   version\n// 3.1   0x0301\t\n// 4.5   0x0405\t\n// 5.0   0x0500\n// 12.1  0x0C01\n#if defined(__IBMCPP__) || defined(__xlc__) || defined(__ibmxl__)\n  #define EIGEN_COMP_IBM __xlC__\n#else\n  #define EIGEN_COMP_IBM 0\n#endif\n\n/// \\internal EIGEN_COMP_PGI set to PGI version if the compiler is Portland Group Compiler\n#if defined(__PGI)\n  #define EIGEN_COMP_PGI (__PGIC__*100+__PGIC_MINOR__)\n#else\n  #define EIGEN_COMP_PGI 0\n#endif\n\n/// \\internal EIGEN_COMP_ARM set to 1 if the compiler is ARM Compiler\n#if defined(__CC_ARM) || defined(__ARMCC_VERSION)\n  #define EIGEN_COMP_ARM 1\n#else\n  #define EIGEN_COMP_ARM 0\n#endif\n\n/// \\internal EIGEN_COMP_EMSCRIPTEN set to 1 if the compiler is Emscripten Compiler\n#if defined(__EMSCRIPTEN__)\n  #define EIGEN_COMP_EMSCRIPTEN 1\n#else\n  #define EIGEN_COMP_EMSCRIPTEN 0\n#endif\n\n\n/// \\internal EIGEN_GNUC_STRICT set to 1 if the compiler is really GCC and not a compatible compiler (e.g., ICC, clang, mingw, etc.)\n#if EIGEN_COMP_GNUC && !(EIGEN_COMP_CLANG || EIGEN_COMP_ICC || EIGEN_COMP_MINGW || EIGEN_COMP_PGI || EIGEN_COMP_IBM || EIGEN_COMP_ARM || EIGEN_COMP_EMSCRIPTEN)\n  #define EIGEN_COMP_GNUC_STRICT 1\n#else\n  #define EIGEN_COMP_GNUC_STRICT 0\n#endif\n\n\n#if EIGEN_COMP_GNUC\n  #define EIGEN_GNUC_AT_LEAST(x,y) ((__GNUC__==x && __GNUC_MINOR__>=y) || __GNUC__>x)\n  #define EIGEN_GNUC_AT_MOST(x,y)  ((__GNUC__==x && __GNUC_MINOR__<=y) || __GNUC__<x)\n  #define EIGEN_GNUC_AT(x,y)       ( __GNUC__==x && __GNUC_MINOR__==y )\n#else\n  #define EIGEN_GNUC_AT_LEAST(x,y) 0\n  #define EIGEN_GNUC_AT_MOST(x,y)  0\n  #define EIGEN_GNUC_AT(x,y)       0\n#endif\n\n// FIXME: could probably be removed as we do not support gcc 3.x anymore\n#if EIGEN_COMP_GNUC && (__GNUC__ <= 3)\n#define EIGEN_GCC3_OR_OLDER 1\n#else\n#define EIGEN_GCC3_OR_OLDER 0\n#endif\n\n\n\n//------------------------------------------------------------------------------------------\n// Architecture identification, EIGEN_ARCH_*\n//------------------------------------------------------------------------------------------\n\n\n#if defined(__x86_64__) || defined(_M_X64) || defined(__amd64)\n  #define EIGEN_ARCH_x86_64 1\n#else\n  #define EIGEN_ARCH_x86_64 0\n#endif\n\n#if defined(__i386__) || defined(_M_IX86) || defined(_X86_) || defined(__i386)\n  #define EIGEN_ARCH_i386 1\n#else\n  #define EIGEN_ARCH_i386 0\n#endif\n\n#if EIGEN_ARCH_x86_64 || EIGEN_ARCH_i386\n  #define EIGEN_ARCH_i386_OR_x86_64 1\n#else\n  #define EIGEN_ARCH_i386_OR_x86_64 0\n#endif\n\n/// \\internal EIGEN_ARCH_ARM set to 1 if the architecture is ARM\n#if defined(__arm__)\n  #define EIGEN_ARCH_ARM 1\n#else\n  #define EIGEN_ARCH_ARM 0\n#endif\n\n/// \\internal EIGEN_ARCH_ARM64 set to 1 if the architecture is ARM64\n#if defined(__aarch64__)\n  #define EIGEN_ARCH_ARM64 1\n#else\n  #define EIGEN_ARCH_ARM64 0\n#endif\n\n#if EIGEN_ARCH_ARM || EIGEN_ARCH_ARM64\n  #define EIGEN_ARCH_ARM_OR_ARM64 1\n#else\n  #define EIGEN_ARCH_ARM_OR_ARM64 0\n#endif\n\n/// \\internal EIGEN_ARCH_MIPS set to 1 if the architecture is MIPS\n#if defined(__mips__) || defined(__mips)\n  #define EIGEN_ARCH_MIPS 1\n#else\n  #define EIGEN_ARCH_MIPS 0\n#endif\n\n/// \\internal EIGEN_ARCH_SPARC set to 1 if the architecture is SPARC\n#if defined(__sparc__) || defined(__sparc)\n  #define EIGEN_ARCH_SPARC 1\n#else\n  #define EIGEN_ARCH_SPARC 0\n#endif\n\n/// \\internal EIGEN_ARCH_IA64 set to 1 if the architecture is Intel Itanium\n#if defined(__ia64__)\n  #define EIGEN_ARCH_IA64 1\n#else\n  #define EIGEN_ARCH_IA64 0\n#endif\n\n/// \\internal EIGEN_ARCH_PPC set to 1 if the architecture is PowerPC\n#if defined(__powerpc__) || defined(__ppc__) || defined(_M_PPC)\n  #define EIGEN_ARCH_PPC 1\n#else\n  #define EIGEN_ARCH_PPC 0\n#endif\n\n\n\n//------------------------------------------------------------------------------------------\n// Operating system identification, EIGEN_OS_*\n//------------------------------------------------------------------------------------------\n\n/// \\internal EIGEN_OS_UNIX set to 1 if the OS is a unix variant\n#if defined(__unix__) || defined(__unix)\n  #define EIGEN_OS_UNIX 1\n#else\n  #define EIGEN_OS_UNIX 0\n#endif\n\n/// \\internal EIGEN_OS_LINUX set to 1 if the OS is based on Linux kernel\n#if defined(__linux__)\n  #define EIGEN_OS_LINUX 1\n#else\n  #define EIGEN_OS_LINUX 0\n#endif\n\n/// \\internal EIGEN_OS_ANDROID set to 1 if the OS is Android\n// note: ANDROID is defined when using ndk_build, __ANDROID__ is defined when using a standalone toolchain.\n#if defined(__ANDROID__) || defined(ANDROID)\n  #define EIGEN_OS_ANDROID 1\n#else\n  #define EIGEN_OS_ANDROID 0\n#endif\n\n/// \\internal EIGEN_OS_GNULINUX set to 1 if the OS is GNU Linux and not Linux-based OS (e.g., not android)\n#if defined(__gnu_linux__) && !(EIGEN_OS_ANDROID)\n  #define EIGEN_OS_GNULINUX 1\n#else\n  #define EIGEN_OS_GNULINUX 0\n#endif\n\n/// \\internal EIGEN_OS_BSD set to 1 if the OS is a BSD variant\n#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__DragonFly__)\n  #define EIGEN_OS_BSD 1\n#else\n  #define EIGEN_OS_BSD 0\n#endif\n\n/// \\internal EIGEN_OS_MAC set to 1 if the OS is MacOS\n#if defined(__APPLE__)\n  #define EIGEN_OS_MAC 1\n#else\n  #define EIGEN_OS_MAC 0\n#endif\n\n/// \\internal EIGEN_OS_QNX set to 1 if the OS is QNX\n#if defined(__QNX__)\n  #define EIGEN_OS_QNX 1\n#else\n  #define EIGEN_OS_QNX 0\n#endif\n\n/// \\internal EIGEN_OS_WIN set to 1 if the OS is Windows based\n#if defined(_WIN32)\n  #define EIGEN_OS_WIN 1\n#else\n  #define EIGEN_OS_WIN 0\n#endif\n\n/// \\internal EIGEN_OS_WIN64 set to 1 if the OS is Windows 64bits\n#if defined(_WIN64)\n  #define EIGEN_OS_WIN64 1\n#else\n  #define EIGEN_OS_WIN64 0\n#endif\n\n/// \\internal EIGEN_OS_WINCE set to 1 if the OS is Windows CE\n#if defined(_WIN32_WCE)\n  #define EIGEN_OS_WINCE 1\n#else\n  #define EIGEN_OS_WINCE 0\n#endif\n\n/// \\internal EIGEN_OS_CYGWIN set to 1 if the OS is Windows/Cygwin\n#if defined(__CYGWIN__)\n  #define EIGEN_OS_CYGWIN 1\n#else\n  #define EIGEN_OS_CYGWIN 0\n#endif\n\n/// \\internal EIGEN_OS_WIN_STRICT set to 1 if the OS is really Windows and not some variants\n#if EIGEN_OS_WIN && !( EIGEN_OS_WINCE || EIGEN_OS_CYGWIN )\n  #define EIGEN_OS_WIN_STRICT 1\n#else\n  #define EIGEN_OS_WIN_STRICT 0\n#endif\n\n/// \\internal EIGEN_OS_SUN set to __SUNPRO_C if the OS is SUN\n// compiler  solaris   __SUNPRO_C\n// version   studio\n// 5.7       10        0x570\n// 5.8       11        0x580\n// 5.9       12        0x590\n// 5.10\t     12.1      0x5100\n// 5.11\t     12.2      0x5110\n// 5.12\t     12.3      0x5120\n#if (defined(sun) || defined(__sun)) && !(defined(__SVR4) || defined(__svr4__))\n  #define EIGEN_OS_SUN __SUNPRO_C\n#else\n  #define EIGEN_OS_SUN 0\n#endif\n\n/// \\internal EIGEN_OS_SOLARIS set to 1 if the OS is Solaris\n#if (defined(sun) || defined(__sun)) && (defined(__SVR4) || defined(__svr4__))\n  #define EIGEN_OS_SOLARIS 1\n#else\n  #define EIGEN_OS_SOLARIS 0\n#endif\n\n\n//------------------------------------------------------------------------------------------\n// Detect GPU compilers and architectures\n//------------------------------------------------------------------------------------------\n\n// NVCC is not supported as the target platform for HIPCC\n// Note that this also makes EIGEN_CUDACC and EIGEN_HIPCC mutually exclusive\n#if defined(__NVCC__) && defined(__HIPCC__)\n  #error \"NVCC as the target platform for HIPCC is currently not supported.\"\n#endif\n\n#if defined(__CUDACC__) && !defined(EIGEN_NO_CUDA)\n  // Means the compiler is either nvcc or clang with CUDA enabled\n  #define EIGEN_CUDACC __CUDACC__\n#endif\n\n#if defined(__CUDA_ARCH__) && !defined(EIGEN_NO_CUDA)\n  // Means we are generating code for the device\n  #define EIGEN_CUDA_ARCH __CUDA_ARCH__\n#endif\n\n#if defined(EIGEN_CUDACC)\n#include <cuda.h>\n  #define EIGEN_CUDA_SDK_VER (CUDA_VERSION * 10)\n#else\n  #define EIGEN_CUDA_SDK_VER 0\n#endif\n\n#if defined(__HIPCC__) && !defined(EIGEN_NO_HIP)\n  // Means the compiler is HIPCC (analogous to EIGEN_CUDACC, but for HIP)\n  #define EIGEN_HIPCC __HIPCC__\n\n  // We need to include hip_runtime.h here because it pulls in\n  // ++ hip_common.h which contains the define for  __HIP_DEVICE_COMPILE__\n  // ++ host_defines.h which contains the defines for the __host__ and __device__ macros\n  #include <hip/hip_runtime.h>\n\n  #if defined(__HIP_DEVICE_COMPILE__)\n    // analogous to EIGEN_CUDA_ARCH, but for HIP\n    #define EIGEN_HIP_DEVICE_COMPILE __HIP_DEVICE_COMPILE__\n  #endif\n#endif\n\n// Unify CUDA/HIPCC\n\n#if defined(EIGEN_CUDACC) || defined(EIGEN_HIPCC)\n//\n// If either EIGEN_CUDACC or EIGEN_HIPCC is defined, then define EIGEN_GPUCC\n//\n#define EIGEN_GPUCC\n//\n// EIGEN_HIPCC implies the HIP compiler and is used to tweak Eigen code for use in HIP kernels\n// EIGEN_CUDACC implies the CUDA compiler and is used to tweak Eigen code for use in CUDA kernels\n//\n// In most cases the same tweaks are required to the Eigen code to enable in both the HIP and CUDA kernels.\n// For those cases, the corresponding code should be guarded with\n//      #if defined(EIGEN_GPUCC)\n// instead of\n//      #if defined(EIGEN_CUDACC) || defined(EIGEN_HIPCC)\n//\n// For cases where the tweak is specific to HIP, the code should be guarded with\n//      #if defined(EIGEN_HIPCC)\n//\n// For cases where the tweak is specific to CUDA, the code should be guarded with\n//      #if defined(EIGEN_CUDACC)\n//\n#endif\n\n#if defined(EIGEN_CUDA_ARCH) || defined(EIGEN_HIP_DEVICE_COMPILE)\n//\n// If either EIGEN_CUDA_ARCH or EIGEN_HIP_DEVICE_COMPILE is defined, then define EIGEN_GPU_COMPILE_PHASE\n//\n#define EIGEN_GPU_COMPILE_PHASE\n//\n// GPU compilers (HIPCC, NVCC) typically do two passes over the source code,\n//   + one to compile the source for the \"host\" (ie CPU)\n//   + another to compile the source for the \"device\" (ie. GPU)\n//\n// Code that needs to enabled only during the either the \"host\" or \"device\" compilation phase\n// needs to be guarded with a macro that indicates the current compilation phase\n//\n// EIGEN_HIP_DEVICE_COMPILE implies the device compilation phase in HIP\n// EIGEN_CUDA_ARCH implies the device compilation phase in CUDA\n//\n// In most cases, the \"host\" / \"device\" specific code is the same for both HIP and CUDA\n// For those cases, the code should be guarded with\n//       #if defined(EIGEN_GPU_COMPILE_PHASE)\n// instead of\n//       #if defined(EIGEN_CUDA_ARCH) || defined(EIGEN_HIP_DEVICE_COMPILE)\n//\n// For cases where the tweak is specific to HIP, the code should be guarded with\n//      #if defined(EIGEN_HIP_DEVICE_COMPILE)\n//\n// For cases where the tweak is specific to CUDA, the code should be guarded with\n//      #if defined(EIGEN_CUDA_ARCH)\n//\n#endif\n\n#if defined(EIGEN_USE_SYCL) && defined(__SYCL_DEVICE_ONLY__)\n// EIGEN_USE_SYCL is a user-defined macro while __SYCL_DEVICE_ONLY__ is a compiler-defined macro.\n// In most cases we want to check if both macros are defined which can be done using the define below.\n#define SYCL_DEVICE_ONLY\n#endif\n\n//------------------------------------------------------------------------------------------\n// Detect Compiler/Architecture/OS specific features\n//------------------------------------------------------------------------------------------\n\n#if EIGEN_GNUC_AT_MOST(4,3) && !EIGEN_COMP_CLANG\n  // see bug 89\n  #define EIGEN_SAFE_TO_USE_STANDARD_ASSERT_MACRO 0\n#else\n  #define EIGEN_SAFE_TO_USE_STANDARD_ASSERT_MACRO 1\n#endif\n\n// Cross compiler wrapper around LLVM's __has_builtin\n#ifdef __has_builtin\n#  define EIGEN_HAS_BUILTIN(x) __has_builtin(x)\n#else\n#  define EIGEN_HAS_BUILTIN(x) 0\n#endif\n\n// A Clang feature extension to determine compiler features.\n// We use it to determine 'cxx_rvalue_references'\n#ifndef __has_feature\n# define __has_feature(x) 0\n#endif\n\n// Some old compilers do not support template specializations like:\n// template<typename T,int N> void foo(const T x[N]);\n#if !(   EIGEN_COMP_CLANG && (   (EIGEN_COMP_CLANG<309)                                                       \\\n                              || (defined(__apple_build_version__) && (__apple_build_version__ < 9000000)))  \\\n      || EIGEN_COMP_GNUC_STRICT && EIGEN_COMP_GNUC<49)\n#define EIGEN_HAS_STATIC_ARRAY_TEMPLATE 1\n#else\n#define EIGEN_HAS_STATIC_ARRAY_TEMPLATE 0\n#endif\n\n\n// The macro EIGEN_COMP_CXXVER defines the c++ verson expected by the compiler.\n// For instance, if compiling with gcc and -std=c++17, then EIGEN_COMP_CXXVER\n// is defined to 17.\n#if   (defined(__cplusplus) && (__cplusplus >  201402L) || EIGEN_COMP_MSVC_LANG > 201402L)\n#define EIGEN_COMP_CXXVER 17\n#elif (defined(__cplusplus) && (__cplusplus >  201103L) || EIGEN_COMP_MSVC >= 1910)\n#define EIGEN_COMP_CXXVER 14\n#elif (defined(__cplusplus) && (__cplusplus >= 201103L) || EIGEN_COMP_MSVC >= 1900)\n#define EIGEN_COMP_CXXVER 11\n#else\n#define EIGEN_COMP_CXXVER 03\n#endif\n\n\n// The macros EIGEN_HAS_CXX?? defines a rough estimate of available c++ features\n// but in practice we should not rely on them but rather on the availabilty of\n// individual features as defined later.\n// This is why there is no EIGEN_HAS_CXX17.\n// FIXME: get rid of EIGEN_HAS_CXX14 and maybe even EIGEN_HAS_CXX11.\n#if EIGEN_MAX_CPP_VER>=11 && EIGEN_COMP_CXXVER>=11\n#define EIGEN_HAS_CXX11 1\n#else\n#define EIGEN_HAS_CXX11 0\n#endif\n\n#if EIGEN_MAX_CPP_VER>=14 && EIGEN_COMP_CXXVER>=14\n#define EIGEN_HAS_CXX14 1\n#else\n#define EIGEN_HAS_CXX14 0\n#endif\n\n// Do we support r-value references?\n#ifndef EIGEN_HAS_RVALUE_REFERENCES\n#if EIGEN_MAX_CPP_VER>=11 && \\\n    (__has_feature(cxx_rvalue_references) || \\\n    (defined(__cplusplus) && __cplusplus >= 201103L) || \\\n    (EIGEN_COMP_MSVC >= 1600))\n  #define EIGEN_HAS_RVALUE_REFERENCES 1\n#else\n  #define EIGEN_HAS_RVALUE_REFERENCES 0\n#endif\n#endif\n\n// Does the compiler support C99?\n// Need to include <cmath> to make sure _GLIBCXX_USE_C99 gets defined\n#include <cmath>\n#ifndef EIGEN_HAS_C99_MATH\n#if EIGEN_MAX_CPP_VER>=11 && \\\n    ((defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901))       \\\n  || (defined(__GNUC__) && defined(_GLIBCXX_USE_C99)) \\\n  || (defined(_LIBCPP_VERSION) && !defined(_MSC_VER)) \\\n  || (EIGEN_COMP_MSVC >= 1900) || defined(SYCL_DEVICE_ONLY))\n  #define EIGEN_HAS_C99_MATH 1\n#else\n  #define EIGEN_HAS_C99_MATH 0\n#endif\n#endif\n\n// Does the compiler support result_of?\n// It's likely that MSVC 2013 supports result_of but I couldn't not find a good source for that,\n// so let's be conservative.\n#ifndef EIGEN_HAS_STD_RESULT_OF\n#if EIGEN_MAX_CPP_VER>=11 && \\\n    (__has_feature(cxx_lambdas) || (defined(__cplusplus) && __cplusplus >= 201103L) || EIGEN_COMP_MSVC >= 1900)\n#define EIGEN_HAS_STD_RESULT_OF 1\n#else\n#define EIGEN_HAS_STD_RESULT_OF 0\n#endif\n#endif\n\n#ifndef EIGEN_HAS_ALIGNAS\n#if EIGEN_MAX_CPP_VER>=11 && EIGEN_HAS_CXX11 &&   \\\n      (     __has_feature(cxx_alignas)            \\\n        ||  EIGEN_HAS_CXX14                       \\\n        || (EIGEN_COMP_MSVC >= 1800)              \\\n        || (EIGEN_GNUC_AT_LEAST(4,8))             \\\n        || (EIGEN_COMP_CLANG>=305)                \\\n        || (EIGEN_COMP_ICC>=1500)                 \\\n        || (EIGEN_COMP_PGI>=1500)                 \\\n        || (EIGEN_COMP_SUNCC>=0x5130))\n#define EIGEN_HAS_ALIGNAS 1\n#else\n#define EIGEN_HAS_ALIGNAS 0\n#endif\n#endif\n\n// Does the compiler support type_traits?\n// - full support of type traits was added only to GCC 5.1.0.\n// - 20150626 corresponds to the last release of 4.x libstdc++\n#ifndef EIGEN_HAS_TYPE_TRAITS\n#if EIGEN_MAX_CPP_VER>=11 && (EIGEN_HAS_CXX11 || EIGEN_COMP_MSVC >= 1700) \\\n  && ((!EIGEN_COMP_GNUC_STRICT) || EIGEN_GNUC_AT_LEAST(5, 1)) \\\n  && ((!defined(__GLIBCXX__))   || __GLIBCXX__ > 20150626)\n#define EIGEN_HAS_TYPE_TRAITS 1\n#define EIGEN_INCLUDE_TYPE_TRAITS\n#else\n#define EIGEN_HAS_TYPE_TRAITS 0\n#endif\n#endif\n\n// Does the compiler support variadic templates?\n#ifndef EIGEN_HAS_VARIADIC_TEMPLATES\n#if EIGEN_MAX_CPP_VER>=11 && (__cplusplus > 199711L || EIGEN_COMP_MSVC >= 1900) \\\n  && (!defined(__NVCC__) || !EIGEN_ARCH_ARM_OR_ARM64 || (EIGEN_COMP_NVCC >= 80000) )\n    // ^^ Disable the use of variadic templates when compiling with versions of nvcc older than 8.0 on ARM devices:\n    //    this prevents nvcc from crashing when compiling Eigen on Tegra X1\n#define EIGEN_HAS_VARIADIC_TEMPLATES 1\n#elif  EIGEN_MAX_CPP_VER>=11 && (__cplusplus > 199711L || EIGEN_COMP_MSVC >= 1900) && defined(SYCL_DEVICE_ONLY)\n#define EIGEN_HAS_VARIADIC_TEMPLATES 1\n#else\n#define EIGEN_HAS_VARIADIC_TEMPLATES 0\n#endif\n#endif\n\n// Does the compiler fully support const expressions? (as in c++14)\n#ifndef EIGEN_HAS_CONSTEXPR\n  #if defined(EIGEN_CUDACC)\n  // Const expressions are supported provided that c++11 is enabled and we're using either clang or nvcc 7.5 or above\n    #if EIGEN_MAX_CPP_VER>=14 && (__cplusplus > 199711L && (EIGEN_COMP_CLANG || EIGEN_COMP_NVCC >= 70500))\n      #define EIGEN_HAS_CONSTEXPR 1\n    #endif\n  #elif EIGEN_MAX_CPP_VER>=14 && (__has_feature(cxx_relaxed_constexpr) || (defined(__cplusplus) && __cplusplus >= 201402L) || \\\n    (EIGEN_GNUC_AT_LEAST(4,8) && (__cplusplus > 199711L)) || \\\n    (EIGEN_COMP_CLANG >= 306 && (__cplusplus > 199711L)))\n    #define EIGEN_HAS_CONSTEXPR 1\n  #endif\n\n  #ifndef EIGEN_HAS_CONSTEXPR\n    #define EIGEN_HAS_CONSTEXPR 0\n  #endif\n\n#endif // EIGEN_HAS_CONSTEXPR\n\n// Does the compiler support C++11 math?\n// Let's be conservative and enable the default C++11 implementation only if we are sure it exists\n#ifndef EIGEN_HAS_CXX11_MATH\n  #if EIGEN_MAX_CPP_VER>=11 && ((__cplusplus > 201103L) || (__cplusplus >= 201103L) && (EIGEN_COMP_GNUC_STRICT || EIGEN_COMP_CLANG || EIGEN_COMP_MSVC || EIGEN_COMP_ICC)  \\\n      && (EIGEN_ARCH_i386_OR_x86_64) && (EIGEN_OS_GNULINUX || EIGEN_OS_WIN_STRICT || EIGEN_OS_MAC))\n    #define EIGEN_HAS_CXX11_MATH 1\n  #else\n    #define EIGEN_HAS_CXX11_MATH 0\n  #endif\n#endif\n\n// Does the compiler support proper C++11 containers?\n#ifndef EIGEN_HAS_CXX11_CONTAINERS\n  #if    EIGEN_MAX_CPP_VER>=11 && \\\n         ((__cplusplus > 201103L) \\\n      || ((__cplusplus >= 201103L) && (EIGEN_COMP_GNUC_STRICT || EIGEN_COMP_CLANG || EIGEN_COMP_ICC>=1400)) \\\n      || EIGEN_COMP_MSVC >= 1900)\n    #define EIGEN_HAS_CXX11_CONTAINERS 1\n  #else\n    #define EIGEN_HAS_CXX11_CONTAINERS 0\n  #endif\n#endif\n\n// Does the compiler support C++11 noexcept?\n#ifndef EIGEN_HAS_CXX11_NOEXCEPT\n  #if    EIGEN_MAX_CPP_VER>=11 && \\\n         (__has_feature(cxx_noexcept) \\\n      || (__cplusplus > 201103L) \\\n      || ((__cplusplus >= 201103L) && (EIGEN_COMP_GNUC_STRICT || EIGEN_COMP_CLANG || EIGEN_COMP_ICC>=1400)) \\\n      || EIGEN_COMP_MSVC >= 1900)\n    #define EIGEN_HAS_CXX11_NOEXCEPT 1\n  #else\n    #define EIGEN_HAS_CXX11_NOEXCEPT 0\n  #endif\n#endif\n\n#ifndef EIGEN_HAS_CXX11_ATOMIC\n  #if    EIGEN_MAX_CPP_VER>=11 && \\\n         (__has_feature(cxx_atomic) \\\n      || (__cplusplus > 201103L) \\\n      || ((__cplusplus >= 201103L) && (EIGEN_COMP_MSVC==0 || EIGEN_COMP_MSVC >= 1700)))\n    #define EIGEN_HAS_CXX11_ATOMIC 1\n  #else\n    #define EIGEN_HAS_CXX11_ATOMIC 0\n  #endif\n#endif\n\n#ifndef EIGEN_HAS_CXX11_OVERRIDE_FINAL\n  #if    EIGEN_MAX_CPP_VER>=11 && \\\n       (__cplusplus >= 201103L || EIGEN_COMP_MSVC >= 1700)\n    #define EIGEN_HAS_CXX11_OVERRIDE_FINAL 1\n  #else\n    #define EIGEN_HAS_CXX11_OVERRIDE_FINAL 0\n  #endif\n#endif\n\n// NOTE: the required Apple's clang version is very conservative \n//       and it could be that XCode 9 works just fine.\n// NOTE: the MSVC version is based on https://en.cppreference.com/w/cpp/compiler_support\n//       and not tested.\n#ifndef EIGEN_HAS_CXX17_OVERALIGN\n#if EIGEN_MAX_CPP_VER>=17 && EIGEN_COMP_CXXVER>=17 && (                                 \\\n           (EIGEN_COMP_MSVC >= 1912)                                                    \\\n        || (EIGEN_GNUC_AT_LEAST(7,0))                                                   \\\n        || ((!defined(__apple_build_version__)) && (EIGEN_COMP_CLANG>=500))             \\\n        || (( defined(__apple_build_version__)) && (__apple_build_version__>=10000000)) \\\n      )\n#define EIGEN_HAS_CXX17_OVERALIGN 1\n#else\n#define EIGEN_HAS_CXX17_OVERALIGN 0\n#endif\n#endif\n\n#if defined(EIGEN_CUDACC) && EIGEN_HAS_CONSTEXPR\n  // While available already with c++11, this is useful mostly starting with c++14 and relaxed constexpr rules\n  #if defined(__NVCC__)\n    // nvcc considers constexpr functions as __host__ __device__ with the option --expt-relaxed-constexpr\n    #ifdef __CUDACC_RELAXED_CONSTEXPR__\n      #define EIGEN_CONSTEXPR_ARE_DEVICE_FUNC\n    #endif\n  #elif defined(__clang__) && defined(__CUDA__) && __has_feature(cxx_relaxed_constexpr)\n    // clang++ always considers constexpr functions as implicitly __host__ __device__\n    #define EIGEN_CONSTEXPR_ARE_DEVICE_FUNC\n  #endif\n#endif\n\n// Does the compiler support the __int128 and __uint128_t extensions for 128-bit\n// integer arithmetic?\n//\n// Clang and GCC define __SIZEOF_INT128__ when these extensions are supported,\n// but we avoid using them in certain cases:\n//\n// * Building using Clang for Windows, where the Clang runtime library has\n//   128-bit support only on LP64 architectures, but Windows is LLP64.\n#ifndef EIGEN_HAS_BUILTIN_INT128\n#if defined(__SIZEOF_INT128__) && !(EIGEN_OS_WIN && EIGEN_COMP_CLANG)\n#define EIGEN_HAS_BUILTIN_INT128 1\n#else\n#define EIGEN_HAS_BUILTIN_INT128 0\n#endif\n#endif\n\n//------------------------------------------------------------------------------------------\n// Preprocessor programming helpers\n//------------------------------------------------------------------------------------------\n\n// This macro can be used to prevent from macro expansion, e.g.:\n//   std::max EIGEN_NOT_A_MACRO(a,b)\n#define EIGEN_NOT_A_MACRO\n\n#define EIGEN_DEBUG_VAR(x) std::cerr << #x << \" = \" << x << std::endl;\n\n// concatenate two tokens\n#define EIGEN_CAT2(a,b) a ## b\n#define EIGEN_CAT(a,b) EIGEN_CAT2(a,b)\n\n#define EIGEN_COMMA ,\n\n// convert a token to a string\n#define EIGEN_MAKESTRING2(a) #a\n#define EIGEN_MAKESTRING(a) EIGEN_MAKESTRING2(a)\n\n// EIGEN_STRONG_INLINE is a stronger version of the inline, using __forceinline on MSVC,\n// but it still doesn't use GCC's always_inline. This is useful in (common) situations where MSVC needs forceinline\n// but GCC is still doing fine with just inline.\n#ifndef EIGEN_STRONG_INLINE\n#if EIGEN_COMP_MSVC || EIGEN_COMP_ICC\n#define EIGEN_STRONG_INLINE __forceinline\n#else\n#define EIGEN_STRONG_INLINE inline\n#endif\n#endif\n\n// EIGEN_ALWAYS_INLINE is the stronget, it has the effect of making the function inline and adding every possible\n// attribute to maximize inlining. This should only be used when really necessary: in particular,\n// it uses __attribute__((always_inline)) on GCC, which most of the time is useless and can severely harm compile times.\n// FIXME with the always_inline attribute,\n// gcc 3.4.x and 4.1 reports the following compilation error:\n//   Eval.h:91: sorry, unimplemented: inlining failed in call to 'const Eigen::Eval<Derived> Eigen::MatrixBase<Scalar, Derived>::eval() const'\n//    : function body not available\n//   See also bug 1367\n#if EIGEN_GNUC_AT_LEAST(4,2) && !defined(SYCL_DEVICE_ONLY)\n#define EIGEN_ALWAYS_INLINE __attribute__((always_inline)) inline\n#else\n#define EIGEN_ALWAYS_INLINE EIGEN_STRONG_INLINE\n#endif\n\n#if EIGEN_COMP_GNUC\n#define EIGEN_DONT_INLINE __attribute__((noinline))\n#elif EIGEN_COMP_MSVC\n#define EIGEN_DONT_INLINE __declspec(noinline)\n#else\n#define EIGEN_DONT_INLINE\n#endif\n\n#if EIGEN_COMP_GNUC\n#define EIGEN_PERMISSIVE_EXPR __extension__\n#else\n#define EIGEN_PERMISSIVE_EXPR\n#endif\n\n// GPU stuff\n\n// Disable some features when compiling with GPU compilers (NVCC/clang-cuda/SYCL/HIPCC)\n#if defined(EIGEN_CUDACC) || defined(SYCL_DEVICE_ONLY) || defined(EIGEN_HIPCC)\n  // Do not try asserts on device code\n  #ifndef EIGEN_NO_DEBUG\n  #define EIGEN_NO_DEBUG\n  #endif\n\n  #ifdef EIGEN_INTERNAL_DEBUGGING\n  #undef EIGEN_INTERNAL_DEBUGGING\n  #endif\n\n  #ifdef EIGEN_EXCEPTIONS\n  #undef EIGEN_EXCEPTIONS\n  #endif\n#endif\n\n#if defined(SYCL_DEVICE_ONLY)\n  #ifndef EIGEN_DONT_VECTORIZE\n    #define EIGEN_DONT_VECTORIZE\n  #endif\n  #define EIGEN_DEVICE_FUNC __attribute__((flatten)) __attribute__((always_inline))\n// All functions callable from CUDA/HIP code must be qualified with __device__\n#elif defined(EIGEN_GPUCC) \n    #define EIGEN_DEVICE_FUNC __host__ __device__\n#else\n  #define EIGEN_DEVICE_FUNC\n#endif\n\n\n// this macro allows to get rid of linking errors about multiply defined functions.\n//  - static is not very good because it prevents definitions from different object files to be merged.\n//           So static causes the resulting linked executable to be bloated with multiple copies of the same function.\n//  - inline is not perfect either as it unwantedly hints the compiler toward inlining the function.\n#define EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_DEVICE_FUNC\n#define EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_DEVICE_FUNC inline\n\n#ifdef NDEBUG\n# ifndef EIGEN_NO_DEBUG\n#  define EIGEN_NO_DEBUG\n# endif\n#endif\n\n// eigen_plain_assert is where we implement the workaround for the assert() bug in GCC <= 4.3, see bug 89\n#ifdef EIGEN_NO_DEBUG\n  #ifdef SYCL_DEVICE_ONLY // used to silence the warning on SYCL device\n    #define eigen_plain_assert(x) EIGEN_UNUSED_VARIABLE(x)\n  #else\n    #define eigen_plain_assert(x)\n  #endif\n#else \n  #if EIGEN_SAFE_TO_USE_STANDARD_ASSERT_MACRO\n    namespace Eigen {\n    namespace internal {\n    inline bool copy_bool(bool b) { return b; }\n    }\n    }\n    #define eigen_plain_assert(x) assert(x)\n  #else\n    // work around bug 89\n    #include <cstdlib>   // for abort\n    #include <iostream>  // for std::cerr\n\n    namespace Eigen {\n    namespace internal {\n    // trivial function copying a bool. Must be EIGEN_DONT_INLINE, so we implement it after including Eigen headers.\n    // see bug 89.\n    namespace {\n    EIGEN_DONT_INLINE bool copy_bool(bool b) { return b; }\n    }\n    inline void assert_fail(const char *condition, const char *function, const char *file, int line)\n    {\n      std::cerr << \"assertion failed: \" << condition << \" in function \" << function << \" at \" << file << \":\" << line << std::endl;\n      abort();\n    }\n    }\n    }\n    #define eigen_plain_assert(x) \\\n      do { \\\n        if(!Eigen::internal::copy_bool(x)) \\\n          Eigen::internal::assert_fail(EIGEN_MAKESTRING(x), __PRETTY_FUNCTION__, __FILE__, __LINE__); \\\n      } while(false)\n  #endif\n#endif\n\n// eigen_assert can be overridden\n#ifndef eigen_assert\n#define eigen_assert(x) eigen_plain_assert(x)\n#endif\n\n#ifdef EIGEN_INTERNAL_DEBUGGING\n#define eigen_internal_assert(x) eigen_assert(x)\n#else\n#define eigen_internal_assert(x)\n#endif\n\n#ifdef EIGEN_NO_DEBUG\n#define EIGEN_ONLY_USED_FOR_DEBUG(x) EIGEN_UNUSED_VARIABLE(x)\n#else\n#define EIGEN_ONLY_USED_FOR_DEBUG(x)\n#endif\n\n#ifndef EIGEN_NO_DEPRECATED_WARNING\n  #if EIGEN_COMP_GNUC\n    #define EIGEN_DEPRECATED __attribute__((deprecated))\n  #elif EIGEN_COMP_MSVC\n    #define EIGEN_DEPRECATED __declspec(deprecated)\n  #else\n    #define EIGEN_DEPRECATED\n  #endif\n#else\n  #define EIGEN_DEPRECATED\n#endif\n\n#if EIGEN_COMP_GNUC\n#define EIGEN_UNUSED __attribute__((unused))\n#else\n#define EIGEN_UNUSED\n#endif\n\n// Suppresses 'unused variable' warnings.\nnamespace Eigen {\n  namespace internal {\n    template<typename T> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void ignore_unused_variable(const T&) {}\n  }\n}\n#define EIGEN_UNUSED_VARIABLE(var) Eigen::internal::ignore_unused_variable(var);\n\n#if !defined(EIGEN_ASM_COMMENT)\n  #if EIGEN_COMP_GNUC && (EIGEN_ARCH_i386_OR_x86_64 || EIGEN_ARCH_ARM_OR_ARM64)\n    #define EIGEN_ASM_COMMENT(X)  __asm__(\"#\" X)\n  #else\n    #define EIGEN_ASM_COMMENT(X)\n  #endif\n#endif\n\n\n#if EIGEN_COMP_MSVC\n  // NOTE MSVC often gives C4127 warnings with compiletime if statements. See bug 1362.\n  // This workaround is ugly, but it does the job.\n#  define EIGEN_CONST_CONDITIONAL(cond)  (void)0, cond\n#else\n#  define EIGEN_CONST_CONDITIONAL(cond)  cond\n#endif\n\n#ifdef EIGEN_DONT_USE_RESTRICT_KEYWORD\n  #define EIGEN_RESTRICT\n#endif\n#ifndef EIGEN_RESTRICT\n  #define EIGEN_RESTRICT __restrict\n#endif\n\n\n#ifndef EIGEN_DEFAULT_IO_FORMAT\n#ifdef EIGEN_MAKING_DOCS\n// format used in Eigen's documentation\n// needed to define it here as escaping characters in CMake add_definition's argument seems very problematic.\n#define EIGEN_DEFAULT_IO_FORMAT Eigen::IOFormat(3, 0, \" \", \"\\n\", \"\", \"\")\n#else\n#define EIGEN_DEFAULT_IO_FORMAT Eigen::IOFormat()\n#endif\n#endif\n\n// just an empty macro !\n#define EIGEN_EMPTY\n\n\n// When compiling CUDA/HIP device code with NVCC or HIPCC\n// pull in math functions from the global namespace.\n// In host mode, and when device code is compiled with clang,\n// use the std versions.\n#if (defined(EIGEN_CUDA_ARCH) && defined(__NVCC__)) || defined(EIGEN_HIP_DEVICE_COMPILE)\n  #define EIGEN_USING_STD_MATH(FUNC) using ::FUNC;\n#else\n  #define EIGEN_USING_STD_MATH(FUNC) using std::FUNC;\n#endif\n\n\n// When compiling HIP device code with HIPCC, certain functions\n// from the stdlib need to be pulled in from the global namespace\n// (as opposed to from the std:: namespace). This is because HIPCC\n// does not natively support all the std:: routines in device code.\n// Instead it contains header files that declare the corresponding\n// routines in the global namespace such they can be used in device code.\n#if defined(EIGEN_HIP_DEVICE_COMPILE)\n  #define EIGEN_USING_STD(FUNC) using ::FUNC;\n#else\n  #define EIGEN_USING_STD(FUNC) using std::FUNC;\n#endif\n\n\n#if EIGEN_COMP_MSVC_STRICT && (EIGEN_COMP_MSVC < 1900 || EIGEN_COMP_NVCC)\n  // for older MSVC versions, as well as 1900 && CUDA 8, using the base operator is sufficient (cf Bugs 1000, 1324)\n  #define EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived) \\\n    using Base::operator =;\n#elif EIGEN_COMP_CLANG // workaround clang bug (see http://forum.kde.org/viewtopic.php?f=74&t=102653)\n  #define EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived) \\\n    using Base::operator =; \\\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& operator=(const Derived& other) { Base::operator=(other); return *this; } \\\n    template <typename OtherDerived> \\\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& operator=(const DenseBase<OtherDerived>& other) { Base::operator=(other.derived()); return *this; }\n#else\n  #define EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived) \\\n    using Base::operator =; \\\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& operator=(const Derived& other) \\\n    { \\\n      Base::operator=(other); \\\n      return *this; \\\n    }\n#endif\n\n\n/**\n * \\internal\n * \\brief Macro to explicitly define the default copy constructor.\n * This is necessary, because the implicit definition is deprecated if the copy-assignment is overridden.\n */\n#if EIGEN_HAS_CXX11\n#define EIGEN_DEFAULT_COPY_CONSTRUCTOR(CLASS) EIGEN_DEVICE_FUNC CLASS(const CLASS&) = default;\n#else\n#define EIGEN_DEFAULT_COPY_CONSTRUCTOR(CLASS)\n#endif\n\n\n\n/** \\internal\n * \\brief Macro to manually inherit assignment operators.\n * This is necessary, because the implicitly defined assignment operator gets deleted when a custom operator= is defined.\n * With C++11 or later this also default-implements the copy-constructor\n */\n#define EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Derived)  \\\n    EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived) \\\n    EIGEN_DEFAULT_COPY_CONSTRUCTOR(Derived)\n\n/** \\internal\n * \\brief Macro to manually define default constructors and destructors.\n * This is necessary when the copy constructor is re-defined.\n * For empty helper classes this should usually be protected, to avoid accidentally creating empty objects.\n *\n * Hiding the default destructor lead to problems in C++03 mode together with boost::multiprecision\n */\n#if EIGEN_HAS_CXX11\n#define EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(Derived)  \\\n    EIGEN_DEVICE_FUNC Derived() = default; \\\n    EIGEN_DEVICE_FUNC ~Derived() = default;\n#else\n#define EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(Derived)  \\\n    EIGEN_DEVICE_FUNC Derived() {}; \\\n    /* EIGEN_DEVICE_FUNC ~Derived() {}; */\n#endif\n\n\n\n\n\n/**\n* Just a side note. Commenting within defines works only by documenting\n* behind the object (via '!<'). Comments cannot be multi-line and thus\n* we have these extra long lines. What is confusing doxygen over here is\n* that we use '\\' and basically have a bunch of typedefs with their\n* documentation in a single line.\n**/\n\n#define EIGEN_GENERIC_PUBLIC_INTERFACE(Derived) \\\n  typedef typename Eigen::internal::traits<Derived>::Scalar Scalar; /*!< \\brief Numeric type, e.g. float, double, int or std::complex<float>. */ \\\n  typedef typename Eigen::NumTraits<Scalar>::Real RealScalar; /*!< \\brief The underlying numeric type for composed scalar types. \\details In cases where Scalar is e.g. std::complex<T>, T were corresponding to RealScalar. */ \\\n  typedef typename Base::CoeffReturnType CoeffReturnType; /*!< \\brief The return type for coefficient access. \\details Depending on whether the object allows direct coefficient access (e.g. for a MatrixXd), this type is either 'const Scalar&' or simply 'Scalar' for objects that do not allow direct coefficient access. */ \\\n  typedef typename Eigen::internal::ref_selector<Derived>::type Nested; \\\n  typedef typename Eigen::internal::traits<Derived>::StorageKind StorageKind; \\\n  typedef typename Eigen::internal::traits<Derived>::StorageIndex StorageIndex; \\\n  enum CompileTimeTraits \\\n      { RowsAtCompileTime = Eigen::internal::traits<Derived>::RowsAtCompileTime, \\\n        ColsAtCompileTime = Eigen::internal::traits<Derived>::ColsAtCompileTime, \\\n        Flags = Eigen::internal::traits<Derived>::Flags, \\\n        SizeAtCompileTime = Base::SizeAtCompileTime, \\\n        MaxSizeAtCompileTime = Base::MaxSizeAtCompileTime, \\\n        IsVectorAtCompileTime = Base::IsVectorAtCompileTime }; \\\n  using Base::derived; \\\n  using Base::const_cast_derived;\n\n\n// FIXME Maybe the EIGEN_DENSE_PUBLIC_INTERFACE could be removed as importing PacketScalar is rarely needed\n#define EIGEN_DENSE_PUBLIC_INTERFACE(Derived) \\\n  EIGEN_GENERIC_PUBLIC_INTERFACE(Derived) \\\n  typedef typename Base::PacketScalar PacketScalar;\n\n\n#define EIGEN_PLAIN_ENUM_MIN(a,b) (((int)a <= (int)b) ? (int)a : (int)b)\n#define EIGEN_PLAIN_ENUM_MAX(a,b) (((int)a >= (int)b) ? (int)a : (int)b)\n\n// EIGEN_SIZE_MIN_PREFER_DYNAMIC gives the min between compile-time sizes. 0 has absolute priority, followed by 1,\n// followed by Dynamic, followed by other finite values. The reason for giving Dynamic the priority over\n// finite values is that min(3, Dynamic) should be Dynamic, since that could be anything between 0 and 3.\n#define EIGEN_SIZE_MIN_PREFER_DYNAMIC(a,b) (((int)a == 0 || (int)b == 0) ? 0 \\\n                           : ((int)a == 1 || (int)b == 1) ? 1 \\\n                           : ((int)a == Dynamic || (int)b == Dynamic) ? Dynamic \\\n                           : ((int)a <= (int)b) ? (int)a : (int)b)\n\n// EIGEN_SIZE_MIN_PREFER_FIXED is a variant of EIGEN_SIZE_MIN_PREFER_DYNAMIC comparing MaxSizes. The difference is that finite values\n// now have priority over Dynamic, so that min(3, Dynamic) gives 3. Indeed, whatever the actual value is\n// (between 0 and 3), it is not more than 3.\n#define EIGEN_SIZE_MIN_PREFER_FIXED(a,b)  (((int)a == 0 || (int)b == 0) ? 0 \\\n                           : ((int)a == 1 || (int)b == 1) ? 1 \\\n                           : ((int)a == Dynamic && (int)b == Dynamic) ? Dynamic \\\n                           : ((int)a == Dynamic) ? (int)b \\\n                           : ((int)b == Dynamic) ? (int)a \\\n                           : ((int)a <= (int)b) ? (int)a : (int)b)\n\n// see EIGEN_SIZE_MIN_PREFER_DYNAMIC. No need for a separate variant for MaxSizes here.\n#define EIGEN_SIZE_MAX(a,b) (((int)a == Dynamic || (int)b == Dynamic) ? Dynamic \\\n                           : ((int)a >= (int)b) ? (int)a : (int)b)\n\n#define EIGEN_LOGICAL_XOR(a,b) (((a) || (b)) && !((a) && (b)))\n\n#define EIGEN_IMPLIES(a,b) (!(a) || (b))\n\n#if EIGEN_HAS_BUILTIN(__builtin_expect) || EIGEN_COMP_GNUC\n#define EIGEN_PREDICT_FALSE(x) (__builtin_expect(x, false))\n#define EIGEN_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))\n#else\n#define EIGEN_PREDICT_FALSE(x) (x)\n#define EIGEN_PREDICT_TRUE(x) (x)\n#endif\n\n// the expression type of a standard coefficient wise binary operation\n#define EIGEN_CWISE_BINARY_RETURN_TYPE(LHS,RHS,OPNAME) \\\n    CwiseBinaryOp< \\\n      EIGEN_CAT(EIGEN_CAT(internal::scalar_,OPNAME),_op)< \\\n          typename internal::traits<LHS>::Scalar, \\\n          typename internal::traits<RHS>::Scalar \\\n      >, \\\n      const LHS, \\\n      const RHS \\\n    >\n\n#define EIGEN_MAKE_CWISE_BINARY_OP(METHOD,OPNAME) \\\n  template<typename OtherDerived> \\\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const EIGEN_CWISE_BINARY_RETURN_TYPE(Derived,OtherDerived,OPNAME) \\\n  (METHOD)(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const \\\n  { \\\n    return EIGEN_CWISE_BINARY_RETURN_TYPE(Derived,OtherDerived,OPNAME)(derived(), other.derived()); \\\n  }\n\n#define EIGEN_SCALAR_BINARY_SUPPORTED(OPNAME,TYPEA,TYPEB) \\\n  (Eigen::internal::has_ReturnType<Eigen::ScalarBinaryOpTraits<TYPEA,TYPEB,EIGEN_CAT(EIGEN_CAT(Eigen::internal::scalar_,OPNAME),_op)<TYPEA,TYPEB>  > >::value)\n\n#define EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(EXPR,SCALAR,OPNAME) \\\n  CwiseBinaryOp<EIGEN_CAT(EIGEN_CAT(internal::scalar_,OPNAME),_op)<typename internal::traits<EXPR>::Scalar,SCALAR>, const EXPR, \\\n                const typename internal::plain_constant_type<EXPR,SCALAR>::type>\n\n#define EIGEN_SCALAR_BINARYOP_EXPR_RETURN_TYPE(SCALAR,EXPR,OPNAME) \\\n  CwiseBinaryOp<EIGEN_CAT(EIGEN_CAT(internal::scalar_,OPNAME),_op)<SCALAR,typename internal::traits<EXPR>::Scalar>, \\\n                const typename internal::plain_constant_type<EXPR,SCALAR>::type, const EXPR>\n\n// Workaround for MSVC 2010 (see ML thread \"patch with compile for for MSVC 2010\")\n#if EIGEN_COMP_MSVC_STRICT && (EIGEN_COMP_MSVC_STRICT<=1600)\n#define EIGEN_MSVC10_WORKAROUND_BINARYOP_RETURN_TYPE(X) typename internal::enable_if<true,X>::type\n#else\n#define EIGEN_MSVC10_WORKAROUND_BINARYOP_RETURN_TYPE(X) X\n#endif\n\n#define EIGEN_MAKE_SCALAR_BINARY_OP_ONTHERIGHT(METHOD,OPNAME) \\\n  template <typename T> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE \\\n  EIGEN_MSVC10_WORKAROUND_BINARYOP_RETURN_TYPE(const EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(Derived,typename internal::promote_scalar_arg<Scalar EIGEN_COMMA T EIGEN_COMMA EIGEN_SCALAR_BINARY_SUPPORTED(OPNAME,Scalar,T)>::type,OPNAME))\\\n  (METHOD)(const T& scalar) const { \\\n    typedef typename internal::promote_scalar_arg<Scalar,T,EIGEN_SCALAR_BINARY_SUPPORTED(OPNAME,Scalar,T)>::type PromotedT; \\\n    return EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(Derived,PromotedT,OPNAME)(derived(), \\\n           typename internal::plain_constant_type<Derived,PromotedT>::type(derived().rows(), derived().cols(), internal::scalar_constant_op<PromotedT>(scalar))); \\\n  }\n\n#define EIGEN_MAKE_SCALAR_BINARY_OP_ONTHELEFT(METHOD,OPNAME) \\\n  template <typename T> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE friend \\\n  EIGEN_MSVC10_WORKAROUND_BINARYOP_RETURN_TYPE(const EIGEN_SCALAR_BINARYOP_EXPR_RETURN_TYPE(typename internal::promote_scalar_arg<Scalar EIGEN_COMMA T EIGEN_COMMA EIGEN_SCALAR_BINARY_SUPPORTED(OPNAME,T,Scalar)>::type,Derived,OPNAME)) \\\n  (METHOD)(const T& scalar, const StorageBaseType& matrix) { \\\n    typedef typename internal::promote_scalar_arg<Scalar,T,EIGEN_SCALAR_BINARY_SUPPORTED(OPNAME,T,Scalar)>::type PromotedT; \\\n    return EIGEN_SCALAR_BINARYOP_EXPR_RETURN_TYPE(PromotedT,Derived,OPNAME)( \\\n           typename internal::plain_constant_type<Derived,PromotedT>::type(matrix.derived().rows(), matrix.derived().cols(), internal::scalar_constant_op<PromotedT>(scalar)), matrix.derived()); \\\n  }\n\n#define EIGEN_MAKE_SCALAR_BINARY_OP(METHOD,OPNAME) \\\n  EIGEN_MAKE_SCALAR_BINARY_OP_ONTHELEFT(METHOD,OPNAME) \\\n  EIGEN_MAKE_SCALAR_BINARY_OP_ONTHERIGHT(METHOD,OPNAME)\n\n\n#if (defined(_CPPUNWIND) || defined(__EXCEPTIONS)) && !defined(EIGEN_CUDA_ARCH) && !defined(EIGEN_EXCEPTIONS) && !defined(EIGEN_USE_SYCL) && !defined(EIGEN_HIP_DEVICE_COMPILE)\n  #define EIGEN_EXCEPTIONS\n#endif\n\n\n#ifdef EIGEN_EXCEPTIONS\n#  define EIGEN_THROW_X(X) throw X\n#  define EIGEN_THROW throw\n#  define EIGEN_TRY try\n#  define EIGEN_CATCH(X) catch (X)\n#else\n#  if defined(EIGEN_CUDA_ARCH)\n#    define EIGEN_THROW_X(X) asm(\"trap;\")\n#    define EIGEN_THROW asm(\"trap;\")\n#  elif defined(EIGEN_HIP_DEVICE_COMPILE)\n#    define EIGEN_THROW_X(X) asm(\"s_trap 0\")\n#    define EIGEN_THROW asm(\"s_trap 0\")\n#  else\n#    define EIGEN_THROW_X(X) std::abort()\n#    define EIGEN_THROW std::abort()\n#  endif\n#  define EIGEN_TRY if (true)\n#  define EIGEN_CATCH(X) else\n#endif\n\n\n#if EIGEN_HAS_CXX11_NOEXCEPT\n#   define EIGEN_INCLUDE_TYPE_TRAITS\n#   define EIGEN_NOEXCEPT noexcept\n#   define EIGEN_NOEXCEPT_IF(x) noexcept(x)\n#   define EIGEN_NO_THROW noexcept(true)\n#   define EIGEN_EXCEPTION_SPEC(X) noexcept(false)\n#else\n#   define EIGEN_NOEXCEPT\n#   define EIGEN_NOEXCEPT_IF(x)\n#   define EIGEN_NO_THROW throw()\n#   if EIGEN_COMP_MSVC || EIGEN_COMP_CXXVER>=17\n      // MSVC does not support exception specifications (warning C4290),\n      // and they are deprecated in c++11 anyway. This is even an error in c++17.\n#     define EIGEN_EXCEPTION_SPEC(X) throw()\n#   else\n#     define EIGEN_EXCEPTION_SPEC(X) throw(X)\n#   endif\n#endif\n\n#if EIGEN_HAS_VARIADIC_TEMPLATES\n// The all function is used to enable a variadic version of eigen_assert which can take a parameter pack as its input.\nnamespace Eigen {\nnamespace internal {\n\ninline bool all(){ return true; }\n\ntemplate<typename T, typename ...Ts>\nbool all(T t, Ts ... ts){ return t && all(ts...); }\n\n}\n}\n#endif\n\n#if EIGEN_HAS_CXX11_OVERRIDE_FINAL\n// provide override and final specifiers if they are available:\n#   define EIGEN_OVERRIDE override\n#   define EIGEN_FINAL final\n#else\n#   define EIGEN_OVERRIDE\n#   define EIGEN_FINAL\n#endif\n\n// Wrapping #pragma unroll in a macro since it is required for SYCL\n#if defined(SYCL_DEVICE_ONLY)\n  #if defined(_MSC_VER)\n    #define EIGEN_UNROLL_LOOP __pragma(unroll)\n  #else\n    #define EIGEN_UNROLL_LOOP _Pragma(\"unroll\")\n  #endif\n#else\n  #define EIGEN_UNROLL_LOOP\n#endif\n\n#endif // EIGEN_MACROS_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/util/Memory.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2015 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2008-2009 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2009 Kenneth Riddile <kfriddile@yahoo.com>\n// Copyright (C) 2010 Hauke Heibel <hauke.heibel@gmail.com>\n// Copyright (C) 2010 Thomas Capricelli <orzel@freehackers.org>\n// Copyright (C) 2013 Pavel Holoborodko <pavel@holoborodko.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n\n/*****************************************************************************\n*** Platform checks for aligned malloc functions                           ***\n*****************************************************************************/\n\n#ifndef EIGEN_MEMORY_H\n#define EIGEN_MEMORY_H\n\n#ifndef EIGEN_MALLOC_ALREADY_ALIGNED\n\n// Try to determine automatically if malloc is already aligned.\n\n// On 64-bit systems, glibc's malloc returns 16-byte-aligned pointers, see:\n//   http://www.gnu.org/s/libc/manual/html_node/Aligned-Memory-Blocks.html\n// This is true at least since glibc 2.8.\n// This leaves the question how to detect 64-bit. According to this document,\n//   http://gcc.fyxm.net/summit/2003/Porting%20to%2064%20bit.pdf\n// page 114, \"[The] LP64 model [...] is used by all 64-bit UNIX ports\" so it's indeed\n// quite safe, at least within the context of glibc, to equate 64-bit with LP64.\n#if defined(__GLIBC__) && ((__GLIBC__>=2 && __GLIBC_MINOR__ >= 8) || __GLIBC__>2) \\\n && defined(__LP64__) && ! defined( __SANITIZE_ADDRESS__ ) && (EIGEN_DEFAULT_ALIGN_BYTES == 16)\n  #define EIGEN_GLIBC_MALLOC_ALREADY_ALIGNED 1\n#else\n  #define EIGEN_GLIBC_MALLOC_ALREADY_ALIGNED 0\n#endif\n\n// FreeBSD 6 seems to have 16-byte aligned malloc\n//   See http://svn.freebsd.org/viewvc/base/stable/6/lib/libc/stdlib/malloc.c?view=markup\n// FreeBSD 7 seems to have 16-byte aligned malloc except on ARM and MIPS architectures\n//   See http://svn.freebsd.org/viewvc/base/stable/7/lib/libc/stdlib/malloc.c?view=markup\n#if defined(__FreeBSD__) && !(EIGEN_ARCH_ARM || EIGEN_ARCH_MIPS) && (EIGEN_DEFAULT_ALIGN_BYTES == 16)\n  #define EIGEN_FREEBSD_MALLOC_ALREADY_ALIGNED 1\n#else\n  #define EIGEN_FREEBSD_MALLOC_ALREADY_ALIGNED 0\n#endif\n\n#if (EIGEN_OS_MAC && (EIGEN_DEFAULT_ALIGN_BYTES == 16))     \\\n || (EIGEN_OS_WIN64 && (EIGEN_DEFAULT_ALIGN_BYTES == 16))   \\\n || EIGEN_GLIBC_MALLOC_ALREADY_ALIGNED              \\\n || EIGEN_FREEBSD_MALLOC_ALREADY_ALIGNED\n  #define EIGEN_MALLOC_ALREADY_ALIGNED 1\n#else\n  #define EIGEN_MALLOC_ALREADY_ALIGNED 0\n#endif\n\n#endif\n\nnamespace Eigen {\n\nnamespace internal {\n\nEIGEN_DEVICE_FUNC\ninline void throw_std_bad_alloc()\n{\n  #ifdef EIGEN_EXCEPTIONS\n    throw std::bad_alloc();\n  #else\n    std::size_t huge = static_cast<std::size_t>(-1);\n    #if defined(EIGEN_HIPCC)\n    //\n    // calls to \"::operator new\" are to be treated as opaque function calls (i.e no inlining),\n    // and as a consequence the code in the #else block triggers the hipcc warning :\n    // \"no overloaded function has restriction specifiers that are compatible with the ambient context\"\n    //\n    // \"throw_std_bad_alloc\" has the EIGEN_DEVICE_FUNC attribute, so it seems that hipcc expects\n    // the same on \"operator new\"\n    // Reverting code back to the old version in this #if block for the hipcc compiler\n    //\n    new int[huge];\n    #else\n    ::operator new(huge);\n    #endif\n  #endif\n}\n\n/*****************************************************************************\n*** Implementation of handmade aligned functions                           ***\n*****************************************************************************/\n\n/* ----- Hand made implementations of aligned malloc/free and realloc ----- */\n\n/** \\internal Like malloc, but the returned pointer is guaranteed to be 16-byte aligned.\n  * Fast, but wastes 16 additional bytes of memory. Does not throw any exception.\n  */\nEIGEN_DEVICE_FUNC inline void* handmade_aligned_malloc(std::size_t size, std::size_t alignment = EIGEN_DEFAULT_ALIGN_BYTES)\n{\n  eigen_assert(alignment >= sizeof(void*) && (alignment & (alignment-1)) == 0 && \"Alignment must be at least sizeof(void*) and a power of 2\");\n\n  EIGEN_USING_STD(malloc)\n  void *original = malloc(size+alignment);\n  \n  if (original == 0) return 0;\n  void *aligned = reinterpret_cast<void*>((reinterpret_cast<std::size_t>(original) & ~(std::size_t(alignment-1))) + alignment);\n  *(reinterpret_cast<void**>(aligned) - 1) = original;\n  return aligned;\n}\n\n/** \\internal Frees memory allocated with handmade_aligned_malloc */\nEIGEN_DEVICE_FUNC inline void handmade_aligned_free(void *ptr)\n{\n  if (ptr) {\n    EIGEN_USING_STD(free)\n    free(*(reinterpret_cast<void**>(ptr) - 1));\n  }\n}\n\n/** \\internal\n  * \\brief Reallocates aligned memory.\n  * Since we know that our handmade version is based on std::malloc\n  * we can use std::realloc to implement efficient reallocation.\n  */\ninline void* handmade_aligned_realloc(void* ptr, std::size_t size, std::size_t = 0)\n{\n  if (ptr == 0) return handmade_aligned_malloc(size);\n  void *original = *(reinterpret_cast<void**>(ptr) - 1);\n  std::ptrdiff_t previous_offset = static_cast<char *>(ptr)-static_cast<char *>(original);\n  original = std::realloc(original,size+EIGEN_DEFAULT_ALIGN_BYTES);\n  if (original == 0) return 0;\n  void *aligned = reinterpret_cast<void*>((reinterpret_cast<std::size_t>(original) & ~(std::size_t(EIGEN_DEFAULT_ALIGN_BYTES-1))) + EIGEN_DEFAULT_ALIGN_BYTES);\n  void *previous_aligned = static_cast<char *>(original)+previous_offset;\n  if(aligned!=previous_aligned)\n    std::memmove(aligned, previous_aligned, size);\n\n  *(reinterpret_cast<void**>(aligned) - 1) = original;\n  return aligned;\n}\n\n/*****************************************************************************\n*** Implementation of portable aligned versions of malloc/free/realloc     ***\n*****************************************************************************/\n\n#ifdef EIGEN_NO_MALLOC\nEIGEN_DEVICE_FUNC inline void check_that_malloc_is_allowed()\n{\n  eigen_assert(false && \"heap allocation is forbidden (EIGEN_NO_MALLOC is defined)\");\n}\n#elif defined EIGEN_RUNTIME_NO_MALLOC\nEIGEN_DEVICE_FUNC inline bool is_malloc_allowed_impl(bool update, bool new_value = false)\n{\n  static bool value = true;\n  if (update == 1)\n    value = new_value;\n  return value;\n}\nEIGEN_DEVICE_FUNC inline bool is_malloc_allowed() { return is_malloc_allowed_impl(false); }\nEIGEN_DEVICE_FUNC inline bool set_is_malloc_allowed(bool new_value) { return is_malloc_allowed_impl(true, new_value); }\nEIGEN_DEVICE_FUNC inline void check_that_malloc_is_allowed()\n{\n  eigen_assert(is_malloc_allowed() && \"heap allocation is forbidden (EIGEN_RUNTIME_NO_MALLOC is defined and g_is_malloc_allowed is false)\");\n}\n#else\nEIGEN_DEVICE_FUNC inline void check_that_malloc_is_allowed()\n{}\n#endif\n\n/** \\internal Allocates \\a size bytes. The returned pointer is guaranteed to have 16 or 32 bytes alignment depending on the requirements.\n  * On allocation error, the returned pointer is null, and std::bad_alloc is thrown.\n  */\nEIGEN_DEVICE_FUNC inline void* aligned_malloc(std::size_t size)\n{\n  check_that_malloc_is_allowed();\n\n  void *result;\n  #if (EIGEN_DEFAULT_ALIGN_BYTES==0) || EIGEN_MALLOC_ALREADY_ALIGNED\n\n    EIGEN_USING_STD(malloc)\n    result = malloc(size);\n\n    #if EIGEN_DEFAULT_ALIGN_BYTES==16\n    eigen_assert((size<16 || (std::size_t(result)%16)==0) && \"System's malloc returned an unaligned pointer. Compile with EIGEN_MALLOC_ALREADY_ALIGNED=0 to fallback to handmade aligned memory allocator.\");\n    #endif\n  #else\n    result = handmade_aligned_malloc(size);\n  #endif\n\n  if(!result && size)\n    throw_std_bad_alloc();\n\n  return result;\n}\n\n/** \\internal Frees memory allocated with aligned_malloc. */\nEIGEN_DEVICE_FUNC inline void aligned_free(void *ptr)\n{\n  #if (EIGEN_DEFAULT_ALIGN_BYTES==0) || EIGEN_MALLOC_ALREADY_ALIGNED\n\n    EIGEN_USING_STD(free)\n    free(ptr);\n\n  #else\n    handmade_aligned_free(ptr);\n  #endif\n}\n\n/**\n  * \\internal\n  * \\brief Reallocates an aligned block of memory.\n  * \\throws std::bad_alloc on allocation failure\n  */\ninline void* aligned_realloc(void *ptr, std::size_t new_size, std::size_t old_size)\n{\n  EIGEN_UNUSED_VARIABLE(old_size);\n\n  void *result;\n#if (EIGEN_DEFAULT_ALIGN_BYTES==0) || EIGEN_MALLOC_ALREADY_ALIGNED\n  result = std::realloc(ptr,new_size);\n#else\n  result = handmade_aligned_realloc(ptr,new_size,old_size);\n#endif\n\n  if (!result && new_size)\n    throw_std_bad_alloc();\n\n  return result;\n}\n\n/*****************************************************************************\n*** Implementation of conditionally aligned functions                      ***\n*****************************************************************************/\n\n/** \\internal Allocates \\a size bytes. If Align is true, then the returned ptr is 16-byte-aligned.\n  * On allocation error, the returned pointer is null, and a std::bad_alloc is thrown.\n  */\ntemplate<bool Align> EIGEN_DEVICE_FUNC inline void* conditional_aligned_malloc(std::size_t size)\n{\n  return aligned_malloc(size);\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline void* conditional_aligned_malloc<false>(std::size_t size)\n{\n  check_that_malloc_is_allowed();\n\n  EIGEN_USING_STD(malloc)\n  void *result = malloc(size);\n\n  if(!result && size)\n    throw_std_bad_alloc();\n  return result;\n}\n\n/** \\internal Frees memory allocated with conditional_aligned_malloc */\ntemplate<bool Align> EIGEN_DEVICE_FUNC inline void conditional_aligned_free(void *ptr)\n{\n  aligned_free(ptr);\n}\n\ntemplate<> EIGEN_DEVICE_FUNC inline void conditional_aligned_free<false>(void *ptr)\n{\n  EIGEN_USING_STD(free)\n  free(ptr);\n}\n\ntemplate<bool Align> inline void* conditional_aligned_realloc(void* ptr, std::size_t new_size, std::size_t old_size)\n{\n  return aligned_realloc(ptr, new_size, old_size);\n}\n\ntemplate<> inline void* conditional_aligned_realloc<false>(void* ptr, std::size_t new_size, std::size_t)\n{\n  return std::realloc(ptr, new_size);\n}\n\n/*****************************************************************************\n*** Construction/destruction of array elements                             ***\n*****************************************************************************/\n\n/** \\internal Destructs the elements of an array.\n  * The \\a size parameters tells on how many objects to call the destructor of T.\n  */\ntemplate<typename T> EIGEN_DEVICE_FUNC inline void destruct_elements_of_array(T *ptr, std::size_t size)\n{\n  // always destruct an array starting from the end.\n  if(ptr)\n    while(size) ptr[--size].~T();\n}\n\n/** \\internal Constructs the elements of an array.\n  * The \\a size parameter tells on how many objects to call the constructor of T.\n  */\ntemplate<typename T> EIGEN_DEVICE_FUNC inline T* construct_elements_of_array(T *ptr, std::size_t size)\n{\n  std::size_t i;\n  EIGEN_TRY\n  {\n      for (i = 0; i < size; ++i) ::new (ptr + i) T;\n      return ptr;\n  }\n  EIGEN_CATCH(...)\n  {\n    destruct_elements_of_array(ptr, i);\n    EIGEN_THROW;\n  }\n  return NULL;\n}\n\n/*****************************************************************************\n*** Implementation of aligned new/delete-like functions                    ***\n*****************************************************************************/\n\ntemplate<typename T>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void check_size_for_overflow(std::size_t size)\n{\n  if(size > std::size_t(-1) / sizeof(T))\n    throw_std_bad_alloc();\n}\n\n/** \\internal Allocates \\a size objects of type T. The returned pointer is guaranteed to have 16 bytes alignment.\n  * On allocation error, the returned pointer is undefined, but a std::bad_alloc is thrown.\n  * The default constructor of T is called.\n  */\ntemplate<typename T> EIGEN_DEVICE_FUNC inline T* aligned_new(std::size_t size)\n{\n  check_size_for_overflow<T>(size);\n  T *result = reinterpret_cast<T*>(aligned_malloc(sizeof(T)*size));\n  EIGEN_TRY\n  {\n    return construct_elements_of_array(result, size);\n  }\n  EIGEN_CATCH(...)\n  {\n    aligned_free(result);\n    EIGEN_THROW;\n  }\n  return result;\n}\n\ntemplate<typename T, bool Align> EIGEN_DEVICE_FUNC inline T* conditional_aligned_new(std::size_t size)\n{\n  check_size_for_overflow<T>(size);\n  T *result = reinterpret_cast<T*>(conditional_aligned_malloc<Align>(sizeof(T)*size));\n  EIGEN_TRY\n  {\n    return construct_elements_of_array(result, size);\n  }\n  EIGEN_CATCH(...)\n  {\n    conditional_aligned_free<Align>(result);\n    EIGEN_THROW;\n  }\n  return result;\n}\n\n/** \\internal Deletes objects constructed with aligned_new\n  * The \\a size parameters tells on how many objects to call the destructor of T.\n  */\ntemplate<typename T> EIGEN_DEVICE_FUNC inline void aligned_delete(T *ptr, std::size_t size)\n{\n  destruct_elements_of_array<T>(ptr, size);\n  Eigen::internal::aligned_free(ptr);\n}\n\n/** \\internal Deletes objects constructed with conditional_aligned_new\n  * The \\a size parameters tells on how many objects to call the destructor of T.\n  */\ntemplate<typename T, bool Align> EIGEN_DEVICE_FUNC inline void conditional_aligned_delete(T *ptr, std::size_t size)\n{\n  destruct_elements_of_array<T>(ptr, size);\n  conditional_aligned_free<Align>(ptr);\n}\n\ntemplate<typename T, bool Align> EIGEN_DEVICE_FUNC inline T* conditional_aligned_realloc_new(T* pts, std::size_t new_size, std::size_t old_size)\n{\n  check_size_for_overflow<T>(new_size);\n  check_size_for_overflow<T>(old_size);\n  if(new_size < old_size)\n    destruct_elements_of_array(pts+new_size, old_size-new_size);\n  T *result = reinterpret_cast<T*>(conditional_aligned_realloc<Align>(reinterpret_cast<void*>(pts), sizeof(T)*new_size, sizeof(T)*old_size));\n  if(new_size > old_size)\n  {\n    EIGEN_TRY\n    {\n      construct_elements_of_array(result+old_size, new_size-old_size);\n    }\n    EIGEN_CATCH(...)\n    {\n      conditional_aligned_free<Align>(result);\n      EIGEN_THROW;\n    }\n  }\n  return result;\n}\n\n\ntemplate<typename T, bool Align> EIGEN_DEVICE_FUNC inline T* conditional_aligned_new_auto(std::size_t size)\n{\n  if(size==0)\n    return 0; // short-cut. Also fixes Bug 884\n  check_size_for_overflow<T>(size);\n  T *result = reinterpret_cast<T*>(conditional_aligned_malloc<Align>(sizeof(T)*size));\n  if(NumTraits<T>::RequireInitialization)\n  {\n    EIGEN_TRY\n    {\n      construct_elements_of_array(result, size);\n    }\n    EIGEN_CATCH(...)\n    {\n      conditional_aligned_free<Align>(result);\n      EIGEN_THROW;\n    }\n  }\n  return result;\n}\n\ntemplate<typename T, bool Align> inline T* conditional_aligned_realloc_new_auto(T* pts, std::size_t new_size, std::size_t old_size)\n{\n  check_size_for_overflow<T>(new_size);\n  check_size_for_overflow<T>(old_size);\n  if(NumTraits<T>::RequireInitialization && (new_size < old_size))\n    destruct_elements_of_array(pts+new_size, old_size-new_size);\n  T *result = reinterpret_cast<T*>(conditional_aligned_realloc<Align>(reinterpret_cast<void*>(pts), sizeof(T)*new_size, sizeof(T)*old_size));\n  if(NumTraits<T>::RequireInitialization && (new_size > old_size))\n  {\n    EIGEN_TRY\n    {\n      construct_elements_of_array(result+old_size, new_size-old_size);\n    }\n    EIGEN_CATCH(...)\n    {\n      conditional_aligned_free<Align>(result);\n      EIGEN_THROW;\n    }\n  }\n  return result;\n}\n\ntemplate<typename T, bool Align> EIGEN_DEVICE_FUNC inline void conditional_aligned_delete_auto(T *ptr, std::size_t size)\n{\n  if(NumTraits<T>::RequireInitialization)\n    destruct_elements_of_array<T>(ptr, size);\n  conditional_aligned_free<Align>(ptr);\n}\n\n/****************************************************************************/\n\n/** \\internal Returns the index of the first element of the array that is well aligned with respect to the requested \\a Alignment.\n  *\n  * \\tparam Alignment requested alignment in Bytes.\n  * \\param array the address of the start of the array\n  * \\param size the size of the array\n  *\n  * \\note If no element of the array is well aligned or the requested alignment is not a multiple of a scalar,\n  * the size of the array is returned. For example with SSE, the requested alignment is typically 16-bytes. If\n  * packet size for the given scalar type is 1, then everything is considered well-aligned.\n  *\n  * \\note Otherwise, if the Alignment is larger that the scalar size, we rely on the assumptions that sizeof(Scalar) is a\n  * power of 2. On the other hand, we do not assume that the array address is a multiple of sizeof(Scalar), as that fails for\n  * example with Scalar=double on certain 32-bit platforms, see bug #79.\n  *\n  * There is also the variant first_aligned(const MatrixBase&) defined in DenseCoeffsBase.h.\n  * \\sa first_default_aligned()\n  */\ntemplate<int Alignment, typename Scalar, typename Index>\nEIGEN_DEVICE_FUNC inline Index first_aligned(const Scalar* array, Index size)\n{\n  const Index ScalarSize = sizeof(Scalar);\n  const Index AlignmentSize = Alignment / ScalarSize;\n  const Index AlignmentMask = AlignmentSize-1;\n\n  if(AlignmentSize<=1)\n  {\n    // Either the requested alignment if smaller than a scalar, or it exactly match a 1 scalar\n    // so that all elements of the array have the same alignment.\n    return 0;\n  }\n  else if( (UIntPtr(array) & (sizeof(Scalar)-1)) || (Alignment%ScalarSize)!=0)\n  {\n    // The array is not aligned to the size of a single scalar, or the requested alignment is not a multiple of the scalar size.\n    // Consequently, no element of the array is well aligned.\n    return size;\n  }\n  else\n  {\n    Index first = (AlignmentSize - (Index((UIntPtr(array)/sizeof(Scalar))) & AlignmentMask)) & AlignmentMask;\n    return (first < size) ? first : size;\n  }\n}\n\n/** \\internal Returns the index of the first element of the array that is well aligned with respect the largest packet requirement.\n   * \\sa first_aligned(Scalar*,Index) and first_default_aligned(DenseBase<Derived>) */\ntemplate<typename Scalar, typename Index>\nEIGEN_DEVICE_FUNC inline Index first_default_aligned(const Scalar* array, Index size)\n{\n  typedef typename packet_traits<Scalar>::type DefaultPacketType;\n  return first_aligned<unpacket_traits<DefaultPacketType>::alignment>(array, size);\n}\n\n/** \\internal Returns the smallest integer multiple of \\a base and greater or equal to \\a size\n  */\ntemplate<typename Index>\ninline Index first_multiple(Index size, Index base)\n{\n  return ((size+base-1)/base)*base;\n}\n\n// std::copy is much slower than memcpy, so let's introduce a smart_copy which\n// use memcpy on trivial types, i.e., on types that does not require an initialization ctor.\ntemplate<typename T, bool UseMemcpy> struct smart_copy_helper;\n\ntemplate<typename T> EIGEN_DEVICE_FUNC void smart_copy(const T* start, const T* end, T* target)\n{\n  smart_copy_helper<T,!NumTraits<T>::RequireInitialization>::run(start, end, target);\n}\n\ntemplate<typename T> struct smart_copy_helper<T,true> {\n  EIGEN_DEVICE_FUNC static inline void run(const T* start, const T* end, T* target)\n  {\n    IntPtr size = IntPtr(end)-IntPtr(start);\n    if(size==0) return;\n    eigen_internal_assert(start!=0 && end!=0 && target!=0);\n    EIGEN_USING_STD(memcpy)\n    memcpy(target, start, size);\n  }\n};\n\ntemplate<typename T> struct smart_copy_helper<T,false> {\n  EIGEN_DEVICE_FUNC static inline void run(const T* start, const T* end, T* target)\n  { std::copy(start, end, target); }\n};\n\n// intelligent memmove. falls back to std::memmove for POD types, uses std::copy otherwise.\ntemplate<typename T, bool UseMemmove> struct smart_memmove_helper;\n\ntemplate<typename T> void smart_memmove(const T* start, const T* end, T* target)\n{\n  smart_memmove_helper<T,!NumTraits<T>::RequireInitialization>::run(start, end, target);\n}\n\ntemplate<typename T> struct smart_memmove_helper<T,true> {\n  static inline void run(const T* start, const T* end, T* target)\n  {\n    IntPtr size = IntPtr(end)-IntPtr(start);\n    if(size==0) return;\n    eigen_internal_assert(start!=0 && end!=0 && target!=0);\n    std::memmove(target, start, size);\n  }\n};\n\ntemplate<typename T> struct smart_memmove_helper<T,false> {\n  static inline void run(const T* start, const T* end, T* target)\n  {\n    if (UIntPtr(target) < UIntPtr(start))\n    {\n      std::copy(start, end, target);\n    }\n    else\n    {\n      std::ptrdiff_t count = (std::ptrdiff_t(end)-std::ptrdiff_t(start)) / sizeof(T);\n      std::copy_backward(start, end, target + count);\n    }\n  }\n};\n\n\n/*****************************************************************************\n*** Implementation of runtime stack allocation (falling back to malloc)    ***\n*****************************************************************************/\n\n// you can overwrite Eigen's default behavior regarding alloca by defining EIGEN_ALLOCA\n// to the appropriate stack allocation function\n#if ! defined EIGEN_ALLOCA && ! defined EIGEN_GPU_COMPILE_PHASE\n  #if EIGEN_OS_LINUX || EIGEN_OS_MAC || (defined alloca)\n    #define EIGEN_ALLOCA alloca\n  #elif EIGEN_COMP_MSVC\n    #define EIGEN_ALLOCA _alloca\n  #endif\n#endif\n\n// With clang -Oz -mthumb, alloca changes the stack pointer in a way that is\n// not allowed in Thumb2. -DEIGEN_STACK_ALLOCATION_LIMIT=0 doesn't work because\n// the compiler still emits bad code because stack allocation checks use \"<=\".\n// TODO: Eliminate after https://bugs.llvm.org/show_bug.cgi?id=23772\n// is fixed.\n#if defined(__clang__) && defined(__thumb__)\n  #undef EIGEN_ALLOCA\n#endif\n\n// This helper class construct the allocated memory, and takes care of destructing and freeing the handled data\n// at destruction time. In practice this helper class is mainly useful to avoid memory leak in case of exceptions.\ntemplate<typename T> class aligned_stack_memory_handler : noncopyable\n{\n  public:\n    /* Creates a stack_memory_handler responsible for the buffer \\a ptr of size \\a size.\n     * Note that \\a ptr can be 0 regardless of the other parameters.\n     * This constructor takes care of constructing/initializing the elements of the buffer if required by the scalar type T (see NumTraits<T>::RequireInitialization).\n     * In this case, the buffer elements will also be destructed when this handler will be destructed.\n     * Finally, if \\a dealloc is true, then the pointer \\a ptr is freed.\n     **/\n    EIGEN_DEVICE_FUNC\n    aligned_stack_memory_handler(T* ptr, std::size_t size, bool dealloc)\n      : m_ptr(ptr), m_size(size), m_deallocate(dealloc)\n    {\n      if(NumTraits<T>::RequireInitialization && m_ptr)\n        Eigen::internal::construct_elements_of_array(m_ptr, size);\n    }\n    EIGEN_DEVICE_FUNC\n    ~aligned_stack_memory_handler()\n    {\n      if(NumTraits<T>::RequireInitialization && m_ptr)\n        Eigen::internal::destruct_elements_of_array<T>(m_ptr, m_size);\n      if(m_deallocate)\n        Eigen::internal::aligned_free(m_ptr);\n    }\n  protected:\n    T* m_ptr;\n    std::size_t m_size;\n    bool m_deallocate;\n};\n\n#ifdef EIGEN_ALLOCA\n\ntemplate<typename Xpr, int NbEvaluations,\n         bool MapExternalBuffer = nested_eval<Xpr,NbEvaluations>::Evaluate && Xpr::MaxSizeAtCompileTime==Dynamic\n         >\nstruct local_nested_eval_wrapper\n{\n  static const bool NeedExternalBuffer = false;\n  typedef typename Xpr::Scalar Scalar;\n  typedef typename nested_eval<Xpr,NbEvaluations>::type ObjectType;\n  ObjectType object;\n\n  EIGEN_DEVICE_FUNC\n  local_nested_eval_wrapper(const Xpr& xpr, Scalar* ptr) : object(xpr)\n  {\n    EIGEN_UNUSED_VARIABLE(ptr);\n    eigen_internal_assert(ptr==0);\n  }\n};\n\ntemplate<typename Xpr, int NbEvaluations>\nstruct local_nested_eval_wrapper<Xpr,NbEvaluations,true>\n{\n  static const bool NeedExternalBuffer = true;\n  typedef typename Xpr::Scalar Scalar;\n  typedef typename plain_object_eval<Xpr>::type PlainObject;\n  typedef Map<PlainObject,EIGEN_DEFAULT_ALIGN_BYTES> ObjectType;\n  ObjectType object;\n\n  EIGEN_DEVICE_FUNC\n  local_nested_eval_wrapper(const Xpr& xpr, Scalar* ptr)\n    : object(ptr==0 ? reinterpret_cast<Scalar*>(Eigen::internal::aligned_malloc(sizeof(Scalar)*xpr.size())) : ptr, xpr.rows(), xpr.cols()),\n      m_deallocate(ptr==0)\n  {\n    if(NumTraits<Scalar>::RequireInitialization && object.data())\n      Eigen::internal::construct_elements_of_array(object.data(), object.size());\n    object = xpr;\n  }\n\n  EIGEN_DEVICE_FUNC\n  ~local_nested_eval_wrapper()\n  {\n    if(NumTraits<Scalar>::RequireInitialization && object.data())\n      Eigen::internal::destruct_elements_of_array(object.data(), object.size());\n    if(m_deallocate)\n      Eigen::internal::aligned_free(object.data());\n  }\n\nprivate:\n  bool m_deallocate;\n};\n\n#endif // EIGEN_ALLOCA\n\ntemplate<typename T> class scoped_array : noncopyable\n{\n  T* m_ptr;\npublic:\n  explicit scoped_array(std::ptrdiff_t size)\n  {\n    m_ptr = new T[size];\n  }\n  ~scoped_array()\n  {\n    delete[] m_ptr;\n  }\n  T& operator[](std::ptrdiff_t i) { return m_ptr[i]; }\n  const T& operator[](std::ptrdiff_t i) const { return m_ptr[i]; }\n  T* &ptr() { return m_ptr; }\n  const T* ptr() const { return m_ptr; }\n  operator const T*() const { return m_ptr; }\n};\n\ntemplate<typename T> void swap(scoped_array<T> &a,scoped_array<T> &b)\n{\n  std::swap(a.ptr(),b.ptr());\n}\n\n} // end namespace internal\n\n/** \\internal\n  *\n  * The macro ei_declare_aligned_stack_constructed_variable(TYPE,NAME,SIZE,BUFFER) declares, allocates,\n  * and construct an aligned buffer named NAME of SIZE elements of type TYPE on the stack\n  * if the size in bytes is smaller than EIGEN_STACK_ALLOCATION_LIMIT, and if stack allocation is supported by the platform\n  * (currently, this is Linux, OSX and Visual Studio only). Otherwise the memory is allocated on the heap.\n  * The allocated buffer is automatically deleted when exiting the scope of this declaration.\n  * If BUFFER is non null, then the declared variable is simply an alias for BUFFER, and no allocation/deletion occurs.\n  * Here is an example:\n  * \\code\n  * {\n  *   ei_declare_aligned_stack_constructed_variable(float,data,size,0);\n  *   // use data[0] to data[size-1]\n  * }\n  * \\endcode\n  * The underlying stack allocation function can controlled with the EIGEN_ALLOCA preprocessor token.\n  *\n  * The macro ei_declare_local_nested_eval(XPR_T,XPR,N,NAME) is analogue to\n  * \\code\n  *   typename internal::nested_eval<XPRT_T,N>::type NAME(XPR);\n  * \\endcode\n  * with the advantage of using aligned stack allocation even if the maximal size of XPR at compile time is unknown.\n  * This is accomplished through alloca if this later is supported and if the required number of bytes\n  * is below EIGEN_STACK_ALLOCATION_LIMIT.\n  */\n#ifdef EIGEN_ALLOCA\n\n  #if EIGEN_DEFAULT_ALIGN_BYTES>0\n    // We always manually re-align the result of EIGEN_ALLOCA.\n    // If alloca is already aligned, the compiler should be smart enough to optimize away the re-alignment.\n    #define EIGEN_ALIGNED_ALLOCA(SIZE) reinterpret_cast<void*>((internal::UIntPtr(EIGEN_ALLOCA(SIZE+EIGEN_DEFAULT_ALIGN_BYTES-1)) + EIGEN_DEFAULT_ALIGN_BYTES-1) & ~(std::size_t(EIGEN_DEFAULT_ALIGN_BYTES-1)))\n  #else\n    #define EIGEN_ALIGNED_ALLOCA(SIZE) EIGEN_ALLOCA(SIZE)\n  #endif\n\n  #define ei_declare_aligned_stack_constructed_variable(TYPE,NAME,SIZE,BUFFER) \\\n    Eigen::internal::check_size_for_overflow<TYPE>(SIZE); \\\n    TYPE* NAME = (BUFFER)!=0 ? (BUFFER) \\\n               : reinterpret_cast<TYPE*>( \\\n                      (sizeof(TYPE)*SIZE<=EIGEN_STACK_ALLOCATION_LIMIT) ? EIGEN_ALIGNED_ALLOCA(sizeof(TYPE)*SIZE) \\\n                    : Eigen::internal::aligned_malloc(sizeof(TYPE)*SIZE) );  \\\n    Eigen::internal::aligned_stack_memory_handler<TYPE> EIGEN_CAT(NAME,_stack_memory_destructor)((BUFFER)==0 ? NAME : 0,SIZE,sizeof(TYPE)*SIZE>EIGEN_STACK_ALLOCATION_LIMIT)\n\n\n  #define ei_declare_local_nested_eval(XPR_T,XPR,N,NAME) \\\n    Eigen::internal::local_nested_eval_wrapper<XPR_T,N> EIGEN_CAT(NAME,_wrapper)(XPR, reinterpret_cast<typename XPR_T::Scalar*>( \\\n      ( (Eigen::internal::local_nested_eval_wrapper<XPR_T,N>::NeedExternalBuffer) && ((sizeof(typename XPR_T::Scalar)*XPR.size())<=EIGEN_STACK_ALLOCATION_LIMIT) ) \\\n        ? EIGEN_ALIGNED_ALLOCA( sizeof(typename XPR_T::Scalar)*XPR.size() ) : 0 ) ) ; \\\n    typename Eigen::internal::local_nested_eval_wrapper<XPR_T,N>::ObjectType NAME(EIGEN_CAT(NAME,_wrapper).object)\n\n#else\n\n  #define ei_declare_aligned_stack_constructed_variable(TYPE,NAME,SIZE,BUFFER) \\\n    Eigen::internal::check_size_for_overflow<TYPE>(SIZE); \\\n    TYPE* NAME = (BUFFER)!=0 ? BUFFER : reinterpret_cast<TYPE*>(Eigen::internal::aligned_malloc(sizeof(TYPE)*SIZE));    \\\n    Eigen::internal::aligned_stack_memory_handler<TYPE> EIGEN_CAT(NAME,_stack_memory_destructor)((BUFFER)==0 ? NAME : 0,SIZE,true)\n\n\n#define ei_declare_local_nested_eval(XPR_T,XPR,N,NAME) typename Eigen::internal::nested_eval<XPR_T,N>::type NAME(XPR)\n\n#endif\n\n\n/*****************************************************************************\n*** Implementation of EIGEN_MAKE_ALIGNED_OPERATOR_NEW [_IF]                ***\n*****************************************************************************/\n\n#if EIGEN_HAS_CXX17_OVERALIGN\n\n// C++17 -> no need to bother about alignment anymore :)\n\n#define EIGEN_MAKE_ALIGNED_OPERATOR_NEW_NOTHROW(NeedsToAlign)\n#define EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign)\n#define EIGEN_MAKE_ALIGNED_OPERATOR_NEW\n#define EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar,Size)\n\n#else\n\n#if EIGEN_MAX_ALIGN_BYTES!=0\n  #define EIGEN_MAKE_ALIGNED_OPERATOR_NEW_NOTHROW(NeedsToAlign) \\\n      void* operator new(std::size_t size, const std::nothrow_t&) EIGEN_NO_THROW { \\\n        EIGEN_TRY { return Eigen::internal::conditional_aligned_malloc<NeedsToAlign>(size); } \\\n        EIGEN_CATCH (...) { return 0; } \\\n      }\n  #define EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign) \\\n      void *operator new(std::size_t size) { \\\n        return Eigen::internal::conditional_aligned_malloc<NeedsToAlign>(size); \\\n      } \\\n      void *operator new[](std::size_t size) { \\\n        return Eigen::internal::conditional_aligned_malloc<NeedsToAlign>(size); \\\n      } \\\n      void operator delete(void * ptr) EIGEN_NO_THROW { Eigen::internal::conditional_aligned_free<NeedsToAlign>(ptr); } \\\n      void operator delete[](void * ptr) EIGEN_NO_THROW { Eigen::internal::conditional_aligned_free<NeedsToAlign>(ptr); } \\\n      void operator delete(void * ptr, std::size_t /* sz */) EIGEN_NO_THROW { Eigen::internal::conditional_aligned_free<NeedsToAlign>(ptr); } \\\n      void operator delete[](void * ptr, std::size_t /* sz */) EIGEN_NO_THROW { Eigen::internal::conditional_aligned_free<NeedsToAlign>(ptr); } \\\n      /* in-place new and delete. since (at least afaik) there is no actual   */ \\\n      /* memory allocated we can safely let the default implementation handle */ \\\n      /* this particular case. */ \\\n      static void *operator new(std::size_t size, void *ptr) { return ::operator new(size,ptr); } \\\n      static void *operator new[](std::size_t size, void* ptr) { return ::operator new[](size,ptr); } \\\n      void operator delete(void * memory, void *ptr) EIGEN_NO_THROW { return ::operator delete(memory,ptr); } \\\n      void operator delete[](void * memory, void *ptr) EIGEN_NO_THROW { return ::operator delete[](memory,ptr); } \\\n      /* nothrow-new (returns zero instead of std::bad_alloc) */ \\\n      EIGEN_MAKE_ALIGNED_OPERATOR_NEW_NOTHROW(NeedsToAlign) \\\n      void operator delete(void *ptr, const std::nothrow_t&) EIGEN_NO_THROW { \\\n        Eigen::internal::conditional_aligned_free<NeedsToAlign>(ptr); \\\n      } \\\n      typedef void eigen_aligned_operator_new_marker_type;\n#else\n  #define EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign)\n#endif\n\n#define EIGEN_MAKE_ALIGNED_OPERATOR_NEW EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(true)\n#define EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar,Size)                        \\\n  EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(bool(                                                             \\\n        ((Size)!=Eigen::Dynamic) &&                                                                    \\\n        (((EIGEN_MAX_ALIGN_BYTES>=16) && ((sizeof(Scalar)*(Size))%(EIGEN_MAX_ALIGN_BYTES  )==0)) ||    \\\n         ((EIGEN_MAX_ALIGN_BYTES>=32) && ((sizeof(Scalar)*(Size))%(EIGEN_MAX_ALIGN_BYTES/2)==0)) ||    \\\n         ((EIGEN_MAX_ALIGN_BYTES>=64) && ((sizeof(Scalar)*(Size))%(EIGEN_MAX_ALIGN_BYTES/4)==0))   )))\n\n#endif\n\n/****************************************************************************/\n\n/** \\class aligned_allocator\n* \\ingroup Core_Module\n*\n* \\brief STL compatible allocator to use with types requiring a non standrad alignment.\n*\n* The memory is aligned as for dynamically aligned matrix/array types such as MatrixXd.\n* By default, it will thus provide at least 16 bytes alignment and more in following cases:\n*  - 32 bytes alignment if AVX is enabled.\n*  - 64 bytes alignment if AVX512 is enabled.\n*\n* This can be controlled using the \\c EIGEN_MAX_ALIGN_BYTES macro as documented\n* \\link TopicPreprocessorDirectivesPerformance there \\endlink.\n*\n* Example:\n* \\code\n* // Matrix4f requires 16 bytes alignment:\n* std::map< int, Matrix4f, std::less<int>,\n*           aligned_allocator<std::pair<const int, Matrix4f> > > my_map_mat4;\n* // Vector3f does not require 16 bytes alignment, no need to use Eigen's allocator:\n* std::map< int, Vector3f > my_map_vec3;\n* \\endcode\n*\n* \\sa \\blank \\ref TopicStlContainers.\n*/\ntemplate<class T>\nclass aligned_allocator : public std::allocator<T>\n{\npublic:\n  typedef std::size_t     size_type;\n  typedef std::ptrdiff_t  difference_type;\n  typedef T*              pointer;\n  typedef const T*        const_pointer;\n  typedef T&              reference;\n  typedef const T&        const_reference;\n  typedef T               value_type;\n\n  template<class U>\n  struct rebind\n  {\n    typedef aligned_allocator<U> other;\n  };\n\n  aligned_allocator() : std::allocator<T>() {}\n\n  aligned_allocator(const aligned_allocator& other) : std::allocator<T>(other) {}\n\n  template<class U>\n  aligned_allocator(const aligned_allocator<U>& other) : std::allocator<T>(other) {}\n\n  ~aligned_allocator() {}\n\n  #if EIGEN_COMP_GNUC_STRICT && EIGEN_GNUC_AT_LEAST(7,0)\n  // In gcc std::allocator::max_size() is bugged making gcc triggers a warning:\n  // eigen/Eigen/src/Core/util/Memory.h:189:12: warning: argument 1 value '18446744073709551612' exceeds maximum object size 9223372036854775807\n  // See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87544\n  size_type max_size() const {\n    return (std::numeric_limits<std::ptrdiff_t>::max)()/sizeof(T);\n  }\n  #endif\n\n  pointer allocate(size_type num, const void* /*hint*/ = 0)\n  {\n    internal::check_size_for_overflow<T>(num);\n    return static_cast<pointer>( internal::aligned_malloc(num * sizeof(T)) );\n  }\n\n  void deallocate(pointer p, size_type /*num*/)\n  {\n    internal::aligned_free(p);\n  }\n};\n\n//---------- Cache sizes ----------\n\n#if !defined(EIGEN_NO_CPUID)\n#  if EIGEN_COMP_GNUC && EIGEN_ARCH_i386_OR_x86_64\n#    if defined(__PIC__) && EIGEN_ARCH_i386\n       // Case for x86 with PIC\n#      define EIGEN_CPUID(abcd,func,id) \\\n         __asm__ __volatile__ (\"xchgl %%ebx, %k1;cpuid; xchgl %%ebx,%k1\": \"=a\" (abcd[0]), \"=&r\" (abcd[1]), \"=c\" (abcd[2]), \"=d\" (abcd[3]) : \"a\" (func), \"c\" (id));\n#    elif defined(__PIC__) && EIGEN_ARCH_x86_64\n       // Case for x64 with PIC. In theory this is only a problem with recent gcc and with medium or large code model, not with the default small code model.\n       // However, we cannot detect which code model is used, and the xchg overhead is negligible anyway.\n#      define EIGEN_CPUID(abcd,func,id) \\\n        __asm__ __volatile__ (\"xchg{q}\\t{%%}rbx, %q1; cpuid; xchg{q}\\t{%%}rbx, %q1\": \"=a\" (abcd[0]), \"=&r\" (abcd[1]), \"=c\" (abcd[2]), \"=d\" (abcd[3]) : \"0\" (func), \"2\" (id));\n#    else\n       // Case for x86_64 or x86 w/o PIC\n#      define EIGEN_CPUID(abcd,func,id) \\\n         __asm__ __volatile__ (\"cpuid\": \"=a\" (abcd[0]), \"=b\" (abcd[1]), \"=c\" (abcd[2]), \"=d\" (abcd[3]) : \"0\" (func), \"2\" (id) );\n#    endif\n#  elif EIGEN_COMP_MSVC\n#    if (EIGEN_COMP_MSVC > 1500) && EIGEN_ARCH_i386_OR_x86_64\n#      define EIGEN_CPUID(abcd,func,id) __cpuidex((int*)abcd,func,id)\n#    endif\n#  endif\n#endif\n\nnamespace internal {\n\n#ifdef EIGEN_CPUID\n\ninline bool cpuid_is_vendor(int abcd[4], const int vendor[3])\n{\n  return abcd[1]==vendor[0] && abcd[3]==vendor[1] && abcd[2]==vendor[2];\n}\n\ninline void queryCacheSizes_intel_direct(int& l1, int& l2, int& l3)\n{\n  int abcd[4];\n  l1 = l2 = l3 = 0;\n  int cache_id = 0;\n  int cache_type = 0;\n  do {\n    abcd[0] = abcd[1] = abcd[2] = abcd[3] = 0;\n    EIGEN_CPUID(abcd,0x4,cache_id);\n    cache_type  = (abcd[0] & 0x0F) >> 0;\n    if(cache_type==1||cache_type==3) // data or unified cache\n    {\n      int cache_level = (abcd[0] & 0xE0) >> 5;  // A[7:5]\n      int ways        = (abcd[1] & 0xFFC00000) >> 22; // B[31:22]\n      int partitions  = (abcd[1] & 0x003FF000) >> 12; // B[21:12]\n      int line_size   = (abcd[1] & 0x00000FFF) >>  0; // B[11:0]\n      int sets        = (abcd[2]);                    // C[31:0]\n\n      int cache_size = (ways+1) * (partitions+1) * (line_size+1) * (sets+1);\n\n      switch(cache_level)\n      {\n        case 1: l1 = cache_size; break;\n        case 2: l2 = cache_size; break;\n        case 3: l3 = cache_size; break;\n        default: break;\n      }\n    }\n    cache_id++;\n  } while(cache_type>0 && cache_id<16);\n}\n\ninline void queryCacheSizes_intel_codes(int& l1, int& l2, int& l3)\n{\n  int abcd[4];\n  abcd[0] = abcd[1] = abcd[2] = abcd[3] = 0;\n  l1 = l2 = l3 = 0;\n  EIGEN_CPUID(abcd,0x00000002,0);\n  unsigned char * bytes = reinterpret_cast<unsigned char *>(abcd)+2;\n  bool check_for_p2_core2 = false;\n  for(int i=0; i<14; ++i)\n  {\n    switch(bytes[i])\n    {\n      case 0x0A: l1 = 8; break;   // 0Ah   data L1 cache, 8 KB, 2 ways, 32 byte lines\n      case 0x0C: l1 = 16; break;  // 0Ch   data L1 cache, 16 KB, 4 ways, 32 byte lines\n      case 0x0E: l1 = 24; break;  // 0Eh   data L1 cache, 24 KB, 6 ways, 64 byte lines\n      case 0x10: l1 = 16; break;  // 10h   data L1 cache, 16 KB, 4 ways, 32 byte lines (IA-64)\n      case 0x15: l1 = 16; break;  // 15h   code L1 cache, 16 KB, 4 ways, 32 byte lines (IA-64)\n      case 0x2C: l1 = 32; break;  // 2Ch   data L1 cache, 32 KB, 8 ways, 64 byte lines\n      case 0x30: l1 = 32; break;  // 30h   code L1 cache, 32 KB, 8 ways, 64 byte lines\n      case 0x60: l1 = 16; break;  // 60h   data L1 cache, 16 KB, 8 ways, 64 byte lines, sectored\n      case 0x66: l1 = 8; break;   // 66h   data L1 cache, 8 KB, 4 ways, 64 byte lines, sectored\n      case 0x67: l1 = 16; break;  // 67h   data L1 cache, 16 KB, 4 ways, 64 byte lines, sectored\n      case 0x68: l1 = 32; break;  // 68h   data L1 cache, 32 KB, 4 ways, 64 byte lines, sectored\n      case 0x1A: l2 = 96; break;   // code and data L2 cache, 96 KB, 6 ways, 64 byte lines (IA-64)\n      case 0x22: l3 = 512; break;   // code and data L3 cache, 512 KB, 4 ways (!), 64 byte lines, dual-sectored\n      case 0x23: l3 = 1024; break;   // code and data L3 cache, 1024 KB, 8 ways, 64 byte lines, dual-sectored\n      case 0x25: l3 = 2048; break;   // code and data L3 cache, 2048 KB, 8 ways, 64 byte lines, dual-sectored\n      case 0x29: l3 = 4096; break;   // code and data L3 cache, 4096 KB, 8 ways, 64 byte lines, dual-sectored\n      case 0x39: l2 = 128; break;   // code and data L2 cache, 128 KB, 4 ways, 64 byte lines, sectored\n      case 0x3A: l2 = 192; break;   // code and data L2 cache, 192 KB, 6 ways, 64 byte lines, sectored\n      case 0x3B: l2 = 128; break;   // code and data L2 cache, 128 KB, 2 ways, 64 byte lines, sectored\n      case 0x3C: l2 = 256; break;   // code and data L2 cache, 256 KB, 4 ways, 64 byte lines, sectored\n      case 0x3D: l2 = 384; break;   // code and data L2 cache, 384 KB, 6 ways, 64 byte lines, sectored\n      case 0x3E: l2 = 512; break;   // code and data L2 cache, 512 KB, 4 ways, 64 byte lines, sectored\n      case 0x40: l2 = 0; break;   // no integrated L2 cache (P6 core) or L3 cache (P4 core)\n      case 0x41: l2 = 128; break;   // code and data L2 cache, 128 KB, 4 ways, 32 byte lines\n      case 0x42: l2 = 256; break;   // code and data L2 cache, 256 KB, 4 ways, 32 byte lines\n      case 0x43: l2 = 512; break;   // code and data L2 cache, 512 KB, 4 ways, 32 byte lines\n      case 0x44: l2 = 1024; break;   // code and data L2 cache, 1024 KB, 4 ways, 32 byte lines\n      case 0x45: l2 = 2048; break;   // code and data L2 cache, 2048 KB, 4 ways, 32 byte lines\n      case 0x46: l3 = 4096; break;   // code and data L3 cache, 4096 KB, 4 ways, 64 byte lines\n      case 0x47: l3 = 8192; break;   // code and data L3 cache, 8192 KB, 8 ways, 64 byte lines\n      case 0x48: l2 = 3072; break;   // code and data L2 cache, 3072 KB, 12 ways, 64 byte lines\n      case 0x49: if(l2!=0) l3 = 4096; else {check_for_p2_core2=true; l3 = l2 = 4096;} break;// code and data L3 cache, 4096 KB, 16 ways, 64 byte lines (P4) or L2 for core2\n      case 0x4A: l3 = 6144; break;   // code and data L3 cache, 6144 KB, 12 ways, 64 byte lines\n      case 0x4B: l3 = 8192; break;   // code and data L3 cache, 8192 KB, 16 ways, 64 byte lines\n      case 0x4C: l3 = 12288; break;   // code and data L3 cache, 12288 KB, 12 ways, 64 byte lines\n      case 0x4D: l3 = 16384; break;   // code and data L3 cache, 16384 KB, 16 ways, 64 byte lines\n      case 0x4E: l2 = 6144; break;   // code and data L2 cache, 6144 KB, 24 ways, 64 byte lines\n      case 0x78: l2 = 1024; break;   // code and data L2 cache, 1024 KB, 4 ways, 64 byte lines\n      case 0x79: l2 = 128; break;   // code and data L2 cache, 128 KB, 8 ways, 64 byte lines, dual-sectored\n      case 0x7A: l2 = 256; break;   // code and data L2 cache, 256 KB, 8 ways, 64 byte lines, dual-sectored\n      case 0x7B: l2 = 512; break;   // code and data L2 cache, 512 KB, 8 ways, 64 byte lines, dual-sectored\n      case 0x7C: l2 = 1024; break;   // code and data L2 cache, 1024 KB, 8 ways, 64 byte lines, dual-sectored\n      case 0x7D: l2 = 2048; break;   // code and data L2 cache, 2048 KB, 8 ways, 64 byte lines\n      case 0x7E: l2 = 256; break;   // code and data L2 cache, 256 KB, 8 ways, 128 byte lines, sect. (IA-64)\n      case 0x7F: l2 = 512; break;   // code and data L2 cache, 512 KB, 2 ways, 64 byte lines\n      case 0x80: l2 = 512; break;   // code and data L2 cache, 512 KB, 8 ways, 64 byte lines\n      case 0x81: l2 = 128; break;   // code and data L2 cache, 128 KB, 8 ways, 32 byte lines\n      case 0x82: l2 = 256; break;   // code and data L2 cache, 256 KB, 8 ways, 32 byte lines\n      case 0x83: l2 = 512; break;   // code and data L2 cache, 512 KB, 8 ways, 32 byte lines\n      case 0x84: l2 = 1024; break;   // code and data L2 cache, 1024 KB, 8 ways, 32 byte lines\n      case 0x85: l2 = 2048; break;   // code and data L2 cache, 2048 KB, 8 ways, 32 byte lines\n      case 0x86: l2 = 512; break;   // code and data L2 cache, 512 KB, 4 ways, 64 byte lines\n      case 0x87: l2 = 1024; break;   // code and data L2 cache, 1024 KB, 8 ways, 64 byte lines\n      case 0x88: l3 = 2048; break;   // code and data L3 cache, 2048 KB, 4 ways, 64 byte lines (IA-64)\n      case 0x89: l3 = 4096; break;   // code and data L3 cache, 4096 KB, 4 ways, 64 byte lines (IA-64)\n      case 0x8A: l3 = 8192; break;   // code and data L3 cache, 8192 KB, 4 ways, 64 byte lines (IA-64)\n      case 0x8D: l3 = 3072; break;   // code and data L3 cache, 3072 KB, 12 ways, 128 byte lines (IA-64)\n\n      default: break;\n    }\n  }\n  if(check_for_p2_core2 && l2 == l3)\n    l3 = 0;\n  l1 *= 1024;\n  l2 *= 1024;\n  l3 *= 1024;\n}\n\ninline void queryCacheSizes_intel(int& l1, int& l2, int& l3, int max_std_funcs)\n{\n  if(max_std_funcs>=4)\n    queryCacheSizes_intel_direct(l1,l2,l3);\n  else\n    queryCacheSizes_intel_codes(l1,l2,l3);\n}\n\ninline void queryCacheSizes_amd(int& l1, int& l2, int& l3)\n{\n  int abcd[4];\n  abcd[0] = abcd[1] = abcd[2] = abcd[3] = 0;\n  EIGEN_CPUID(abcd,0x80000005,0);\n  l1 = (abcd[2] >> 24) * 1024; // C[31:24] = L1 size in KB\n  abcd[0] = abcd[1] = abcd[2] = abcd[3] = 0;\n  EIGEN_CPUID(abcd,0x80000006,0);\n  l2 = (abcd[2] >> 16) * 1024; // C[31;16] = l2 cache size in KB\n  l3 = ((abcd[3] & 0xFFFC000) >> 18) * 512 * 1024; // D[31;18] = l3 cache size in 512KB\n}\n#endif\n\n/** \\internal\n * Queries and returns the cache sizes in Bytes of the L1, L2, and L3 data caches respectively */\ninline void queryCacheSizes(int& l1, int& l2, int& l3)\n{\n  #ifdef EIGEN_CPUID\n  int abcd[4];\n  const int GenuineIntel[] = {0x756e6547, 0x49656e69, 0x6c65746e};\n  const int AuthenticAMD[] = {0x68747541, 0x69746e65, 0x444d4163};\n  const int AMDisbetter_[] = {0x69444d41, 0x74656273, 0x21726574}; // \"AMDisbetter!\"\n\n  // identify the CPU vendor\n  EIGEN_CPUID(abcd,0x0,0);\n  int max_std_funcs = abcd[1];\n  if(cpuid_is_vendor(abcd,GenuineIntel))\n    queryCacheSizes_intel(l1,l2,l3,max_std_funcs);\n  else if(cpuid_is_vendor(abcd,AuthenticAMD) || cpuid_is_vendor(abcd,AMDisbetter_))\n    queryCacheSizes_amd(l1,l2,l3);\n  else\n    // by default let's use Intel's API\n    queryCacheSizes_intel(l1,l2,l3,max_std_funcs);\n\n  // here is the list of other vendors:\n//   ||cpuid_is_vendor(abcd,\"VIA VIA VIA \")\n//   ||cpuid_is_vendor(abcd,\"CyrixInstead\")\n//   ||cpuid_is_vendor(abcd,\"CentaurHauls\")\n//   ||cpuid_is_vendor(abcd,\"GenuineTMx86\")\n//   ||cpuid_is_vendor(abcd,\"TransmetaCPU\")\n//   ||cpuid_is_vendor(abcd,\"RiseRiseRise\")\n//   ||cpuid_is_vendor(abcd,\"Geode by NSC\")\n//   ||cpuid_is_vendor(abcd,\"SiS SiS SiS \")\n//   ||cpuid_is_vendor(abcd,\"UMC UMC UMC \")\n//   ||cpuid_is_vendor(abcd,\"NexGenDriven\")\n  #else\n  l1 = l2 = l3 = -1;\n  #endif\n}\n\n/** \\internal\n * \\returns the size in Bytes of the L1 data cache */\ninline int queryL1CacheSize()\n{\n  int l1(-1), l2, l3;\n  queryCacheSizes(l1,l2,l3);\n  return l1;\n}\n\n/** \\internal\n * \\returns the size in Bytes of the L2 or L3 cache if this later is present */\ninline int queryTopLevelCacheSize()\n{\n  int l1, l2(-1), l3(-1);\n  queryCacheSizes(l1,l2,l3);\n  return (std::max)(l2,l3);\n}\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_MEMORY_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/util/Meta.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2015 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_META_H\n#define EIGEN_META_H\n\n#if defined(EIGEN_GPU_COMPILE_PHASE)\n\n #include <cfloat>\n\n #if defined(EIGEN_CUDA_ARCH)\n  #include <math_constants.h>\n #endif\n\n #if defined(EIGEN_HIP_DEVICE_COMPILE)\n  #include \"Eigen/src/Core/arch/HIP/hcc/math_constants.h\"\n  #endif\n\n#endif\n\n#if EIGEN_COMP_ICC>=1600 &&  __cplusplus >= 201103L\n#include <cstdint>\n#endif\n\nnamespace Eigen {\n\ntypedef EIGEN_DEFAULT_DENSE_INDEX_TYPE DenseIndex;\n\n/**\n * \\brief The Index type as used for the API.\n * \\details To change this, \\c \\#define the preprocessor symbol \\c EIGEN_DEFAULT_DENSE_INDEX_TYPE.\n * \\sa \\blank \\ref TopicPreprocessorDirectives, StorageIndex.\n */\n\ntypedef EIGEN_DEFAULT_DENSE_INDEX_TYPE Index;\n\nnamespace internal {\n\n/** \\internal\n  * \\file Meta.h\n  * This file contains generic metaprogramming classes which are not specifically related to Eigen.\n  * \\note In case you wonder, yes we're aware that Boost already provides all these features,\n  * we however don't want to add a dependency to Boost.\n  */\n\n// Only recent versions of ICC complain about using ptrdiff_t to hold pointers,\n// and older versions do not provide *intptr_t types.\n#if EIGEN_COMP_ICC>=1600 &&  __cplusplus >= 201103L\ntypedef std::intptr_t  IntPtr;\ntypedef std::uintptr_t UIntPtr;\n#else\ntypedef std::ptrdiff_t IntPtr;\ntypedef std::size_t UIntPtr;\n#endif\n\nstruct true_type {  enum { value = 1 }; };\nstruct false_type { enum { value = 0 }; };\n\ntemplate<bool Condition>\nstruct bool_constant;\n\ntemplate<>\nstruct bool_constant<true> : true_type {};\n\ntemplate<>\nstruct bool_constant<false> : false_type {};\n\ntemplate<bool Condition, typename Then, typename Else>\nstruct conditional { typedef Then type; };\n\ntemplate<typename Then, typename Else>\nstruct conditional <false, Then, Else> { typedef Else type; };\n\ntemplate<typename T> struct remove_reference { typedef T type; };\ntemplate<typename T> struct remove_reference<T&> { typedef T type; };\n\ntemplate<typename T> struct remove_pointer { typedef T type; };\ntemplate<typename T> struct remove_pointer<T*> { typedef T type; };\ntemplate<typename T> struct remove_pointer<T*const> { typedef T type; };\n\ntemplate <class T> struct remove_const { typedef T type; };\ntemplate <class T> struct remove_const<const T> { typedef T type; };\ntemplate <class T> struct remove_const<const T[]> { typedef T type[]; };\ntemplate <class T, unsigned int Size> struct remove_const<const T[Size]> { typedef T type[Size]; };\n\ntemplate<typename T> struct remove_all { typedef T type; };\ntemplate<typename T> struct remove_all<const T>   { typedef typename remove_all<T>::type type; };\ntemplate<typename T> struct remove_all<T const&>  { typedef typename remove_all<T>::type type; };\ntemplate<typename T> struct remove_all<T&>        { typedef typename remove_all<T>::type type; };\ntemplate<typename T> struct remove_all<T const*>  { typedef typename remove_all<T>::type type; };\ntemplate<typename T> struct remove_all<T*>        { typedef typename remove_all<T>::type type; };\n\ntemplate<typename T> struct is_arithmetic      { enum { value = false }; };\ntemplate<> struct is_arithmetic<float>         { enum { value = true }; };\ntemplate<> struct is_arithmetic<double>        { enum { value = true }; };\ntemplate<> struct is_arithmetic<long double>   { enum { value = true }; };\ntemplate<> struct is_arithmetic<bool>          { enum { value = true }; };\ntemplate<> struct is_arithmetic<char>          { enum { value = true }; };\ntemplate<> struct is_arithmetic<signed char>   { enum { value = true }; };\ntemplate<> struct is_arithmetic<unsigned char> { enum { value = true }; };\ntemplate<> struct is_arithmetic<signed short>  { enum { value = true }; };\ntemplate<> struct is_arithmetic<unsigned short>{ enum { value = true }; };\ntemplate<> struct is_arithmetic<signed int>    { enum { value = true }; };\ntemplate<> struct is_arithmetic<unsigned int>  { enum { value = true }; };\ntemplate<> struct is_arithmetic<signed long>   { enum { value = true }; };\ntemplate<> struct is_arithmetic<unsigned long> { enum { value = true }; };\n\ntemplate<typename T, typename U> struct is_same { enum { value = 0 }; };\ntemplate<typename T> struct is_same<T,T> { enum { value = 1 }; };\n\ntemplate< class T >\nstruct is_void : is_same<void, typename remove_const<T>::type> {};\n\n#if EIGEN_HAS_CXX11\ntemplate<> struct is_arithmetic<signed long long>   { enum { value = true }; };\ntemplate<> struct is_arithmetic<unsigned long long> { enum { value = true }; };\nusing std::is_integral;\n#else\ntemplate<typename T> struct is_integral               { enum { value = false }; };\ntemplate<> struct is_integral<bool>                   { enum { value = true }; };\ntemplate<> struct is_integral<char>                   { enum { value = true }; };\ntemplate<> struct is_integral<signed char>            { enum { value = true }; };\ntemplate<> struct is_integral<unsigned char>          { enum { value = true }; };\ntemplate<> struct is_integral<signed short>           { enum { value = true }; };\ntemplate<> struct is_integral<unsigned short>         { enum { value = true }; };\ntemplate<> struct is_integral<signed int>             { enum { value = true }; };\ntemplate<> struct is_integral<unsigned int>           { enum { value = true }; };\ntemplate<> struct is_integral<signed long>            { enum { value = true }; };\ntemplate<> struct is_integral<unsigned long>          { enum { value = true }; };\n#if EIGEN_COMP_MSVC\ntemplate<> struct is_integral<signed __int64>         { enum { value = true }; };\ntemplate<> struct is_integral<unsigned __int64>       { enum { value = true }; };\n#endif\n#endif\n\n#if EIGEN_HAS_CXX11\nusing std::make_unsigned;\n#else\n// TODO: Possibly improve this implementation of make_unsigned.\n// It is currently used only by\n// template<typename Scalar> struct random_default_impl<Scalar, false, true>.\ntemplate<typename> struct make_unsigned;\ntemplate<> struct make_unsigned<char>             { typedef unsigned char type; };\ntemplate<> struct make_unsigned<signed char>      { typedef unsigned char type; };\ntemplate<> struct make_unsigned<unsigned char>    { typedef unsigned char type; };\ntemplate<> struct make_unsigned<signed short>     { typedef unsigned short type; };\ntemplate<> struct make_unsigned<unsigned short>   { typedef unsigned short type; };\ntemplate<> struct make_unsigned<signed int>       { typedef unsigned int type; };\ntemplate<> struct make_unsigned<unsigned int>     { typedef unsigned int type; };\ntemplate<> struct make_unsigned<signed long>      { typedef unsigned long type; };\ntemplate<> struct make_unsigned<unsigned long>    { typedef unsigned long type; };\n#if EIGEN_COMP_MSVC\ntemplate<> struct make_unsigned<signed __int64>   { typedef unsigned __int64 type; };\ntemplate<> struct make_unsigned<unsigned __int64> { typedef unsigned __int64 type; };\n#endif\n#endif\n\ntemplate <typename T> struct add_const { typedef const T type; };\ntemplate <typename T> struct add_const<T&> { typedef T& type; };\n\ntemplate <typename T> struct is_const { enum { value = 0 }; };\ntemplate <typename T> struct is_const<T const> { enum { value = 1 }; };\n\ntemplate<typename T> struct add_const_on_value_type            { typedef const T type;  };\ntemplate<typename T> struct add_const_on_value_type<T&>        { typedef T const& type; };\ntemplate<typename T> struct add_const_on_value_type<T*>        { typedef T const* type; };\ntemplate<typename T> struct add_const_on_value_type<T* const>  { typedef T const* const type; };\ntemplate<typename T> struct add_const_on_value_type<T const* const>  { typedef T const* const type; };\n\n#if EIGEN_HAS_CXX11\n\nusing std::is_convertible;\n\n#else\n\ntemplate<typename From, typename To>\nstruct is_convertible_impl\n{\nprivate:\n  struct any_conversion\n  {\n    template <typename T> any_conversion(const volatile T&);\n    template <typename T> any_conversion(T&);\n  };\n  struct yes {int a[1];};\n  struct no  {int a[2];};\n\n  template<typename T>\n  static yes test(T, int);\n\n  template<typename T>\n  static no  test(any_conversion, ...);\n\npublic:\n  static typename internal::remove_reference<From>::type* ms_from;\n#ifdef __INTEL_COMPILER\n  #pragma warning push\n  #pragma warning ( disable : 2259 )\n#endif\n  enum { value = sizeof(test<To>(*ms_from, 0))==sizeof(yes) };\n#ifdef __INTEL_COMPILER\n  #pragma warning pop\n#endif\n};\n\ntemplate<typename From, typename To>\nstruct is_convertible\n{\n  enum { value = is_convertible_impl<From,To>::value };\n};\n\ntemplate<typename T>\nstruct is_convertible<T,T&> { enum { value = false }; };\n\ntemplate<typename T>\nstruct is_convertible<const T,const T&> { enum { value = true }; };\n\n#endif\n\n/** \\internal Allows to enable/disable an overload\n  * according to a compile time condition.\n  */\ntemplate<bool Condition, typename T=void> struct enable_if;\n\ntemplate<typename T> struct enable_if<true,T>\n{ typedef T type; };\n\n#if defined(EIGEN_GPU_COMPILE_PHASE)\n#if !defined(__FLT_EPSILON__)\n#define __FLT_EPSILON__ FLT_EPSILON\n#define __DBL_EPSILON__ DBL_EPSILON\n#endif\n\nnamespace device {\n\ntemplate<typename T> struct numeric_limits\n{\n  EIGEN_DEVICE_FUNC\n  static T epsilon() { return 0; }\n  static T (max)() { assert(false && \"Highest not supported for this type\"); }\n  static T (min)() { assert(false && \"Lowest not supported for this type\"); }\n  static T infinity() { assert(false && \"Infinity not supported for this type\"); }\n  static T quiet_NaN() { assert(false && \"quiet_NaN not supported for this type\"); }\n};\ntemplate<> struct numeric_limits<float>\n{\n  EIGEN_DEVICE_FUNC\n  static float epsilon() { return __FLT_EPSILON__; }\n  EIGEN_DEVICE_FUNC\n  static float (max)() {\n  #if defined(EIGEN_CUDA_ARCH)\n    return CUDART_MAX_NORMAL_F;\n  #else\n    return HIPRT_MAX_NORMAL_F;\n  #endif\n  }\n  EIGEN_DEVICE_FUNC\n  static float (min)() { return FLT_MIN; }\n  EIGEN_DEVICE_FUNC\n  static float infinity() {\n  #if defined(EIGEN_CUDA_ARCH)\n    return CUDART_INF_F;\n  #else\n    return HIPRT_INF_F;\n  #endif\n  }\n  EIGEN_DEVICE_FUNC\n  static float quiet_NaN() {\n  #if defined(EIGEN_CUDA_ARCH)\n    return CUDART_NAN_F;\n  #else\n    return HIPRT_NAN_F;\n  #endif\n  }\n};\ntemplate<> struct numeric_limits<double>\n{\n  EIGEN_DEVICE_FUNC\n  static double epsilon() { return __DBL_EPSILON__; }\n  EIGEN_DEVICE_FUNC\n  static double (max)() { return DBL_MAX; }\n  EIGEN_DEVICE_FUNC\n  static double (min)() { return DBL_MIN; }\n  EIGEN_DEVICE_FUNC\n  static double infinity() {\n  #if defined(EIGEN_CUDA_ARCH)\n    return CUDART_INF;\n  #else\n    return HIPRT_INF;\n  #endif\n  }\n  EIGEN_DEVICE_FUNC\n  static double quiet_NaN() {\n  #if defined(EIGEN_CUDA_ARCH)\n    return CUDART_NAN;\n  #else\n    return HIPRT_NAN;\n  #endif\n  }\n};\ntemplate<> struct numeric_limits<int>\n{\n  EIGEN_DEVICE_FUNC\n  static int epsilon() { return 0; }\n  EIGEN_DEVICE_FUNC\n  static int (max)() { return INT_MAX; }\n  EIGEN_DEVICE_FUNC\n  static int (min)() { return INT_MIN; }\n};\ntemplate<> struct numeric_limits<unsigned int>\n{\n  EIGEN_DEVICE_FUNC\n  static unsigned int epsilon() { return 0; }\n  EIGEN_DEVICE_FUNC\n  static unsigned int (max)() { return UINT_MAX; }\n  EIGEN_DEVICE_FUNC\n  static unsigned int (min)() { return 0; }\n};\ntemplate<> struct numeric_limits<long>\n{\n  EIGEN_DEVICE_FUNC\n  static long epsilon() { return 0; }\n  EIGEN_DEVICE_FUNC\n  static long (max)() { return LONG_MAX; }\n  EIGEN_DEVICE_FUNC\n  static long (min)() { return LONG_MIN; }\n};\ntemplate<> struct numeric_limits<unsigned long>\n{\n  EIGEN_DEVICE_FUNC\n  static unsigned long epsilon() { return 0; }\n  EIGEN_DEVICE_FUNC\n  static unsigned long (max)() { return ULONG_MAX; }\n  EIGEN_DEVICE_FUNC\n  static unsigned long (min)() { return 0; }\n};\ntemplate<> struct numeric_limits<long long>\n{\n  EIGEN_DEVICE_FUNC\n  static long long epsilon() { return 0; }\n  EIGEN_DEVICE_FUNC\n  static long long (max)() { return LLONG_MAX; }\n  EIGEN_DEVICE_FUNC\n  static long long (min)() { return LLONG_MIN; }\n};\ntemplate<> struct numeric_limits<unsigned long long>\n{\n  EIGEN_DEVICE_FUNC\n  static unsigned long long epsilon() { return 0; }\n  EIGEN_DEVICE_FUNC\n  static unsigned long long (max)() { return ULLONG_MAX; }\n  EIGEN_DEVICE_FUNC\n  static unsigned long long (min)() { return 0; }\n};\ntemplate<> struct numeric_limits<bool>\n{\n  EIGEN_DEVICE_FUNC\n  static bool epsilon() { return false; }\n  EIGEN_DEVICE_FUNC\n  static bool (max)() { return true; }\n  EIGEN_DEVICE_FUNC\n  static bool (min)() { return false; }\n};\n\n}\n\n#endif\n\n/** \\internal\n  * A base class do disable default copy ctor and copy assignment operator.\n  */\nclass noncopyable\n{\n  EIGEN_DEVICE_FUNC noncopyable(const noncopyable&);\n  EIGEN_DEVICE_FUNC const noncopyable& operator=(const noncopyable&);\nprotected:\n  EIGEN_DEVICE_FUNC noncopyable() {}\n  EIGEN_DEVICE_FUNC ~noncopyable() {}\n};\n\n/** \\internal\n  * Provides access to the number of elements in the object of as a compile-time constant expression.\n  * It \"returns\" Eigen::Dynamic if the size cannot be resolved at compile-time (default).\n  *\n  * Similar to std::tuple_size, but more general.\n  *\n  * It currently supports:\n  *  - any types T defining T::SizeAtCompileTime\n  *  - plain C arrays as T[N]\n  *  - std::array (c++11)\n  *  - some internal types such as SingleRange and AllRange\n  *\n  * The second template parameter eases SFINAE-based specializations.\n  */\ntemplate<typename T, typename EnableIf = void> struct array_size {\n  enum { value = Dynamic };\n};\n\ntemplate<typename T> struct array_size<T,typename internal::enable_if<((T::SizeAtCompileTime&0)==0)>::type> {\n  enum { value = T::SizeAtCompileTime };\n};\n\ntemplate<typename T, int N> struct array_size<const T (&)[N]> {\n  enum { value = N };\n};\ntemplate<typename T, int N> struct array_size<T (&)[N]> {\n  enum { value = N };\n};\n\n#if EIGEN_HAS_CXX11\ntemplate<typename T, std::size_t N> struct array_size<const std::array<T,N> > {\n  enum { value = N };\n};\ntemplate<typename T, std::size_t N> struct array_size<std::array<T,N> > {\n  enum { value = N };\n};\n#endif\n\n/** \\internal\n  * Analogue of the std::size free function.\n  * It returns the size of the container or view \\a x of type \\c T\n  *\n  * It currently supports:\n  *  - any types T defining a member T::size() const\n  *  - plain C arrays as T[N]\n  *\n  */\ntemplate<typename T>\nIndex size(const T& x) { return x.size(); }\n\ntemplate<typename T,std::size_t N>\nIndex size(const T (&) [N]) { return N; }\n\n/** \\internal\n  * Convenient struct to get the result type of a unary or binary functor.\n  *\n  * It supports both the current STL mechanism (using the result_type member) as well as\n  * upcoming next STL generation (using a templated result member).\n  * If none of these members is provided, then the type of the first argument is returned. FIXME, that behavior is a pretty bad hack.\n  */\n#if EIGEN_HAS_STD_RESULT_OF\ntemplate<typename T> struct result_of {\n  typedef typename std::result_of<T>::type type1;\n  typedef typename remove_all<type1>::type type;\n};\n#else\ntemplate<typename T> struct result_of { };\n\nstruct has_none {int a[1];};\nstruct has_std_result_type {int a[2];};\nstruct has_tr1_result {int a[3];};\n\ntemplate<typename Func, typename ArgType, int SizeOf=sizeof(has_none)>\nstruct unary_result_of_select {typedef typename internal::remove_all<ArgType>::type type;};\n\ntemplate<typename Func, typename ArgType>\nstruct unary_result_of_select<Func, ArgType, sizeof(has_std_result_type)> {typedef typename Func::result_type type;};\n\ntemplate<typename Func, typename ArgType>\nstruct unary_result_of_select<Func, ArgType, sizeof(has_tr1_result)> {typedef typename Func::template result<Func(ArgType)>::type type;};\n\ntemplate<typename Func, typename ArgType>\nstruct result_of<Func(ArgType)> {\n    template<typename T>\n    static has_std_result_type    testFunctor(T const *, typename T::result_type const * = 0);\n    template<typename T>\n    static has_tr1_result         testFunctor(T const *, typename T::template result<T(ArgType)>::type const * = 0);\n    static has_none               testFunctor(...);\n\n    // note that the following indirection is needed for gcc-3.3\n    enum {FunctorType = sizeof(testFunctor(static_cast<Func*>(0)))};\n    typedef typename unary_result_of_select<Func, ArgType, FunctorType>::type type;\n};\n\ntemplate<typename Func, typename ArgType0, typename ArgType1, int SizeOf=sizeof(has_none)>\nstruct binary_result_of_select {typedef typename internal::remove_all<ArgType0>::type type;};\n\ntemplate<typename Func, typename ArgType0, typename ArgType1>\nstruct binary_result_of_select<Func, ArgType0, ArgType1, sizeof(has_std_result_type)>\n{typedef typename Func::result_type type;};\n\ntemplate<typename Func, typename ArgType0, typename ArgType1>\nstruct binary_result_of_select<Func, ArgType0, ArgType1, sizeof(has_tr1_result)>\n{typedef typename Func::template result<Func(ArgType0,ArgType1)>::type type;};\n\ntemplate<typename Func, typename ArgType0, typename ArgType1>\nstruct result_of<Func(ArgType0,ArgType1)> {\n    template<typename T>\n    static has_std_result_type    testFunctor(T const *, typename T::result_type const * = 0);\n    template<typename T>\n    static has_tr1_result         testFunctor(T const *, typename T::template result<T(ArgType0,ArgType1)>::type const * = 0);\n    static has_none               testFunctor(...);\n\n    // note that the following indirection is needed for gcc-3.3\n    enum {FunctorType = sizeof(testFunctor(static_cast<Func*>(0)))};\n    typedef typename binary_result_of_select<Func, ArgType0, ArgType1, FunctorType>::type type;\n};\n\ntemplate<typename Func, typename ArgType0, typename ArgType1, typename ArgType2, int SizeOf=sizeof(has_none)>\nstruct ternary_result_of_select {typedef typename internal::remove_all<ArgType0>::type type;};\n\ntemplate<typename Func, typename ArgType0, typename ArgType1, typename ArgType2>\nstruct ternary_result_of_select<Func, ArgType0, ArgType1, ArgType2, sizeof(has_std_result_type)>\n{typedef typename Func::result_type type;};\n\ntemplate<typename Func, typename ArgType0, typename ArgType1, typename ArgType2>\nstruct ternary_result_of_select<Func, ArgType0, ArgType1, ArgType2, sizeof(has_tr1_result)>\n{typedef typename Func::template result<Func(ArgType0,ArgType1,ArgType2)>::type type;};\n\ntemplate<typename Func, typename ArgType0, typename ArgType1, typename ArgType2>\nstruct result_of<Func(ArgType0,ArgType1,ArgType2)> {\n    template<typename T>\n    static has_std_result_type    testFunctor(T const *, typename T::result_type const * = 0);\n    template<typename T>\n    static has_tr1_result         testFunctor(T const *, typename T::template result<T(ArgType0,ArgType1,ArgType2)>::type const * = 0);\n    static has_none               testFunctor(...);\n\n    // note that the following indirection is needed for gcc-3.3\n    enum {FunctorType = sizeof(testFunctor(static_cast<Func*>(0)))};\n    typedef typename ternary_result_of_select<Func, ArgType0, ArgType1, ArgType2, FunctorType>::type type;\n};\n#endif\n\nstruct meta_yes { char a[1]; };\nstruct meta_no  { char a[2]; };\n\n// Check whether T::ReturnType does exist\ntemplate <typename T>\nstruct has_ReturnType\n{\n  template <typename C> static meta_yes testFunctor(C const *, typename C::ReturnType const * = 0);\n  template <typename C> static meta_no  testFunctor(...);\n\n  enum { value = sizeof(testFunctor<T>(static_cast<T*>(0))) == sizeof(meta_yes) };\n};\n\ntemplate<typename T> const T* return_ptr();\n\ntemplate <typename T, typename IndexType=Index>\nstruct has_nullary_operator\n{\n  template <typename C> static meta_yes testFunctor(C const *,typename enable_if<(sizeof(return_ptr<C>()->operator()())>0)>::type * = 0);\n  static meta_no testFunctor(...);\n\n  enum { value = sizeof(testFunctor(static_cast<T*>(0))) == sizeof(meta_yes) };\n};\n\ntemplate <typename T, typename IndexType=Index>\nstruct has_unary_operator\n{\n  template <typename C> static meta_yes testFunctor(C const *,typename enable_if<(sizeof(return_ptr<C>()->operator()(IndexType(0)))>0)>::type * = 0);\n  static meta_no testFunctor(...);\n\n  enum { value = sizeof(testFunctor(static_cast<T*>(0))) == sizeof(meta_yes) };\n};\n\ntemplate <typename T, typename IndexType=Index>\nstruct has_binary_operator\n{\n  template <typename C> static meta_yes testFunctor(C const *,typename enable_if<(sizeof(return_ptr<C>()->operator()(IndexType(0),IndexType(0)))>0)>::type * = 0);\n  static meta_no testFunctor(...);\n\n  enum { value = sizeof(testFunctor(static_cast<T*>(0))) == sizeof(meta_yes) };\n};\n\n/** \\internal In short, it computes int(sqrt(\\a Y)) with \\a Y an integer.\n  * Usage example: \\code meta_sqrt<1023>::ret \\endcode\n  */\ntemplate<int Y,\n         int InfX = 0,\n         int SupX = ((Y==1) ? 1 : Y/2),\n         bool Done = ((SupX-InfX)<=1 ? true : ((SupX*SupX <= Y) && ((SupX+1)*(SupX+1) > Y))) >\n                                // use ?: instead of || just to shut up a stupid gcc 4.3 warning\nclass meta_sqrt\n{\n    enum {\n      MidX = (InfX+SupX)/2,\n      TakeInf = MidX*MidX > Y ? 1 : 0,\n      NewInf = int(TakeInf) ? InfX : int(MidX),\n      NewSup = int(TakeInf) ? int(MidX) : SupX\n    };\n  public:\n    enum { ret = meta_sqrt<Y,NewInf,NewSup>::ret };\n};\n\ntemplate<int Y, int InfX, int SupX>\nclass meta_sqrt<Y, InfX, SupX, true> { public:  enum { ret = (SupX*SupX <= Y) ? SupX : InfX }; };\n\n\n/** \\internal Computes the least common multiple of two positive integer A and B\n  * at compile-time. It implements a naive algorithm testing all multiples of A.\n  * It thus works better if A>=B.\n  */\ntemplate<int A, int B, int K=1, bool Done = ((A*K)%B)==0>\nstruct meta_least_common_multiple\n{\n  enum { ret = meta_least_common_multiple<A,B,K+1>::ret };\n};\ntemplate<int A, int B, int K>\nstruct meta_least_common_multiple<A,B,K,true>\n{\n  enum { ret = A*K };\n};\n\n/** \\internal determines whether the product of two numeric types is allowed and what the return type is */\ntemplate<typename T, typename U> struct scalar_product_traits\n{\n  enum { Defined = 0 };\n};\n\n// FIXME quick workaround around current limitation of result_of\n// template<typename Scalar, typename ArgType0, typename ArgType1>\n// struct result_of<scalar_product_op<Scalar>(ArgType0,ArgType1)> {\n// typedef typename scalar_product_traits<typename remove_all<ArgType0>::type, typename remove_all<ArgType1>::type>::ReturnType type;\n// };\n\n/** \\internal Obtains a POD type suitable to use as storage for an object of a size\n  * of at most Len bytes, aligned as specified by \\c Align.\n  */\ntemplate<unsigned Len, unsigned Align>\nstruct aligned_storage {\n  struct type {\n    EIGEN_ALIGN_TO_BOUNDARY(Align) unsigned char data[Len];\n  };\n};\n\n} // end namespace internal\n\nnamespace numext {\n\n#if defined(EIGEN_GPU_COMPILE_PHASE)\ntemplate<typename T> EIGEN_DEVICE_FUNC   void swap(T &a, T &b) { T tmp = b; b = a; a = tmp; }\n#else\ntemplate<typename T> EIGEN_STRONG_INLINE void swap(T &a, T &b) { std::swap(a,b); }\n#endif\n\n#if defined(EIGEN_GPU_COMPILE_PHASE)\nusing internal::device::numeric_limits;\n#else\nusing std::numeric_limits;\n#endif\n\n// Integer division with rounding up.\n// T is assumed to be an integer type with a>=0, and b>0\ntemplate<typename T>\nEIGEN_DEVICE_FUNC\nT div_ceil(const T &a, const T &b)\n{\n  return (a+b-1) / b;\n}\n\n// The aim of the following functions is to bypass -Wfloat-equal warnings\n// when we really want a strict equality comparison on floating points.\ntemplate<typename X, typename Y> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC\nbool equal_strict(const X& x,const Y& y) { return x == y; }\n\n#if !defined(EIGEN_GPU_COMPILE_PHASE) || (!defined(EIGEN_CUDA_ARCH) && defined(EIGEN_CONSTEXPR_ARE_DEVICE_FUNC))\ntemplate<> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC\nbool equal_strict(const float& x,const float& y) { return std::equal_to<float>()(x,y); }\n\ntemplate<> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC\nbool equal_strict(const double& x,const double& y) { return std::equal_to<double>()(x,y); }\n#endif\n\ntemplate<typename X, typename Y> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC\nbool not_equal_strict(const X& x,const Y& y) { return x != y; }\n\n#if !defined(EIGEN_GPU_COMPILE_PHASE) || (!defined(EIGEN_CUDA_ARCH) && defined(EIGEN_CONSTEXPR_ARE_DEVICE_FUNC))\ntemplate<> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC\nbool not_equal_strict(const float& x,const float& y) { return std::not_equal_to<float>()(x,y); }\n\ntemplate<> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC\nbool not_equal_strict(const double& x,const double& y) { return std::not_equal_to<double>()(x,y); }\n#endif\n\n/** \\internal extract the bits of the float \\a x */\ninline unsigned int as_uint(float x)\n{\n  unsigned int ret;\n  std::memcpy(&ret, &x, sizeof(float));\n  return ret;\n}\n\n} // end namespace numext\n\n} // end namespace Eigen\n\n// Define portable (u)int{32,64} types\n#if EIGEN_HAS_CXX11\n#include <cstdint>\nnamespace Eigen {\nnamespace numext {\ntypedef std::uint8_t  uint8_t;\ntypedef std::int8_t   int8_t;\ntypedef std::uint16_t uint16_t;\ntypedef std::int16_t  int16_t;\ntypedef std::uint32_t uint32_t;\ntypedef std::int32_t  int32_t;\ntypedef std::uint64_t uint64_t;\ntypedef std::int64_t  int64_t;\n}\n}\n#else\n// Without c++11, all compilers able to compile Eigen also\n// provides the C99 stdint.h header file.\n#include <stdint.h>\nnamespace Eigen {\nnamespace numext {\ntypedef ::uint8_t  uint8_t;\ntypedef ::int8_t   int8_t;\ntypedef ::uint16_t uint16_t;\ntypedef ::int16_t  int16_t;\ntypedef ::uint32_t uint32_t;\ntypedef ::int32_t  int32_t;\ntypedef ::uint64_t uint64_t;\ntypedef ::int64_t  int64_t;\n}\n}\n#endif\n\n#endif // EIGEN_META_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/util/NonMPL2.h",
    "content": "#ifdef EIGEN_MPL2_ONLY\n#error Including non-MPL2 code in EIGEN_MPL2_ONLY mode\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/util/ReenableStupidWarnings.h",
    "content": "#ifdef EIGEN_WARNINGS_DISABLED_2\n// \"DisableStupidWarnings.h\" was included twice recursively: Do not reenable warnings yet!\n#  undef EIGEN_WARNINGS_DISABLED_2\n\n#elif defined(EIGEN_WARNINGS_DISABLED)\n#undef EIGEN_WARNINGS_DISABLED\n\n#ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS\n  #ifdef _MSC_VER\n    #pragma warning( pop )\n  #elif defined __INTEL_COMPILER\n    #pragma warning pop\n  #elif defined __clang__\n    #pragma clang diagnostic pop\n  #elif defined __GNUC__  &&  (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))\n    #pragma GCC diagnostic pop\n  #endif\n\n  #if defined __NVCC__\n//    Don't reenable the diagnostic messages, as it turns out these messages need\n//    to be disabled at the point of the template instantiation (i.e the user code)\n//    otherwise they'll be triggered by nvcc.\n//    #pragma diag_default code_is_unreachable\n//    #pragma diag_default initialization_not_reachable\n//    #pragma diag_default 2651\n//    #pragma diag_default 2653\n  #endif\n\n#endif\n\n#endif // EIGEN_WARNINGS_DISABLED\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/util/ReshapedHelper.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2017 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n\n#ifndef EIGEN_RESHAPED_HELPER_H\n#define EIGEN_RESHAPED_HELPER_H\n\nnamespace Eigen {\n\nenum AutoSize_t   { AutoSize };\nconst int AutoOrder = 2;\n\nnamespace internal {\n\ntemplate<typename SizeType,typename OtherSize, int TotalSize>\nstruct get_compiletime_reshape_size {\n  enum { value = get_fixed_value<SizeType>::value };\n};\n\ntemplate<typename SizeType>\nIndex get_runtime_reshape_size(SizeType size, Index /*other*/, Index /*total*/) {\n  return internal::get_runtime_value(size);\n}\n\ntemplate<typename OtherSize, int TotalSize>\nstruct get_compiletime_reshape_size<AutoSize_t,OtherSize,TotalSize> {\n  enum {\n    other_size = get_fixed_value<OtherSize>::value,\n    value = (TotalSize==Dynamic || other_size==Dynamic) ? Dynamic : TotalSize / other_size };\n};\n\ninline Index get_runtime_reshape_size(AutoSize_t /*size*/, Index other, Index total) {\n  return total/other;\n}\n\ntemplate<int Flags, int Order>\nstruct get_compiletime_reshape_order {\n  enum { value = Order == AutoOrder ? Flags & RowMajorBit : Order };\n};\n\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_RESHAPED_HELPER_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/util/StaticAssert.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_STATIC_ASSERT_H\n#define EIGEN_STATIC_ASSERT_H\n\n/* Some notes on Eigen's static assertion mechanism:\n *\n *  - in EIGEN_STATIC_ASSERT(CONDITION,MSG) the parameter CONDITION must be a compile time boolean\n *    expression, and MSG an enum listed in struct internal::static_assertion<true>\n *\n *  - define EIGEN_NO_STATIC_ASSERT to disable them (and save compilation time)\n *    in that case, the static assertion is converted to the following runtime assert:\n *      eigen_assert(CONDITION && \"MSG\")\n *\n *  - currently EIGEN_STATIC_ASSERT can only be used in function scope\n *\n */\n\n#ifndef EIGEN_STATIC_ASSERT\n#ifndef EIGEN_NO_STATIC_ASSERT\n\n  #if EIGEN_MAX_CPP_VER>=11 && (__has_feature(cxx_static_assert) || (defined(__cplusplus) && __cplusplus >= 201103L) || (EIGEN_COMP_MSVC >= 1600))\n\n    // if native static_assert is enabled, let's use it\n    #define EIGEN_STATIC_ASSERT(X,MSG) static_assert(X,#MSG);\n\n  #else // not CXX0X\n\n    namespace Eigen {\n\n    namespace internal {\n\n    template<bool condition>\n    struct static_assertion {};\n\n    template<>\n    struct static_assertion<true>\n    {\n      enum {\n        YOU_TRIED_CALLING_A_VECTOR_METHOD_ON_A_MATRIX=1,\n        YOU_MIXED_VECTORS_OF_DIFFERENT_SIZES=1,\n        YOU_MIXED_MATRICES_OF_DIFFERENT_SIZES=1,\n        THIS_METHOD_IS_ONLY_FOR_VECTORS_OF_A_SPECIFIC_SIZE=1,\n        THIS_METHOD_IS_ONLY_FOR_MATRICES_OF_A_SPECIFIC_SIZE=1,\n        THIS_METHOD_IS_ONLY_FOR_OBJECTS_OF_A_SPECIFIC_SIZE=1,\n        OUT_OF_RANGE_ACCESS=1,\n        YOU_MADE_A_PROGRAMMING_MISTAKE=1,\n        EIGEN_INTERNAL_ERROR_PLEASE_FILE_A_BUG_REPORT=1,\n        EIGEN_INTERNAL_COMPILATION_ERROR_OR_YOU_MADE_A_PROGRAMMING_MISTAKE=1,\n        YOU_CALLED_A_FIXED_SIZE_METHOD_ON_A_DYNAMIC_SIZE_MATRIX_OR_VECTOR=1,\n        YOU_CALLED_A_DYNAMIC_SIZE_METHOD_ON_A_FIXED_SIZE_MATRIX_OR_VECTOR=1,\n        UNALIGNED_LOAD_AND_STORE_OPERATIONS_UNIMPLEMENTED_ON_ALTIVEC=1,\n        THIS_FUNCTION_IS_NOT_FOR_INTEGER_NUMERIC_TYPES=1,\n        FLOATING_POINT_ARGUMENT_PASSED__INTEGER_WAS_EXPECTED=1,\n        NUMERIC_TYPE_MUST_BE_REAL=1,\n        COEFFICIENT_WRITE_ACCESS_TO_SELFADJOINT_NOT_SUPPORTED=1,\n        WRITING_TO_TRIANGULAR_PART_WITH_UNIT_DIAGONAL_IS_NOT_SUPPORTED=1,\n        THIS_METHOD_IS_ONLY_FOR_FIXED_SIZE=1,\n        INVALID_MATRIX_PRODUCT=1,\n        INVALID_VECTOR_VECTOR_PRODUCT__IF_YOU_WANTED_A_DOT_OR_COEFF_WISE_PRODUCT_YOU_MUST_USE_THE_EXPLICIT_FUNCTIONS=1,\n        INVALID_MATRIX_PRODUCT__IF_YOU_WANTED_A_COEFF_WISE_PRODUCT_YOU_MUST_USE_THE_EXPLICIT_FUNCTION=1,\n        YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY=1,\n        THIS_METHOD_IS_ONLY_FOR_COLUMN_MAJOR_MATRICES=1,\n        THIS_METHOD_IS_ONLY_FOR_ROW_MAJOR_MATRICES=1,\n        INVALID_MATRIX_TEMPLATE_PARAMETERS=1,\n        INVALID_MATRIXBASE_TEMPLATE_PARAMETERS=1,\n        BOTH_MATRICES_MUST_HAVE_THE_SAME_STORAGE_ORDER=1,\n        THIS_METHOD_IS_ONLY_FOR_DIAGONAL_MATRIX=1,\n        THE_MATRIX_OR_EXPRESSION_THAT_YOU_PASSED_DOES_NOT_HAVE_THE_EXPECTED_TYPE=1,\n        THIS_METHOD_IS_ONLY_FOR_EXPRESSIONS_WITH_DIRECT_MEMORY_ACCESS_SUCH_AS_MAP_OR_PLAIN_MATRICES=1,\n        YOU_ALREADY_SPECIFIED_THIS_STRIDE=1,\n        INVALID_STORAGE_ORDER_FOR_THIS_VECTOR_EXPRESSION=1,\n        THE_BRACKET_OPERATOR_IS_ONLY_FOR_VECTORS__USE_THE_PARENTHESIS_OPERATOR_INSTEAD=1,\n        PACKET_ACCESS_REQUIRES_TO_HAVE_INNER_STRIDE_FIXED_TO_1=1,\n        THIS_METHOD_IS_ONLY_FOR_SPECIFIC_TRANSFORMATIONS=1,\n        YOU_CANNOT_MIX_ARRAYS_AND_MATRICES=1,\n        YOU_PERFORMED_AN_INVALID_TRANSFORMATION_CONVERSION=1,\n        THIS_EXPRESSION_IS_NOT_A_LVALUE__IT_IS_READ_ONLY=1,\n        YOU_ARE_TRYING_TO_USE_AN_INDEX_BASED_ACCESSOR_ON_AN_EXPRESSION_THAT_DOES_NOT_SUPPORT_THAT=1,\n        THIS_METHOD_IS_ONLY_FOR_1x1_EXPRESSIONS=1,\n        THIS_METHOD_IS_ONLY_FOR_INNER_OR_LAZY_PRODUCTS=1,\n        THIS_METHOD_IS_ONLY_FOR_EXPRESSIONS_OF_BOOL=1,\n        THIS_METHOD_IS_ONLY_FOR_ARRAYS_NOT_MATRICES=1,\n        YOU_PASSED_A_ROW_VECTOR_BUT_A_COLUMN_VECTOR_WAS_EXPECTED=1,\n        YOU_PASSED_A_COLUMN_VECTOR_BUT_A_ROW_VECTOR_WAS_EXPECTED=1,\n        THE_INDEX_TYPE_MUST_BE_A_SIGNED_TYPE=1,\n        THE_STORAGE_ORDER_OF_BOTH_SIDES_MUST_MATCH=1,\n        OBJECT_ALLOCATED_ON_STACK_IS_TOO_BIG=1,\n        IMPLICIT_CONVERSION_TO_SCALAR_IS_FOR_INNER_PRODUCT_ONLY=1,\n        STORAGE_LAYOUT_DOES_NOT_MATCH=1,\n        EIGEN_INTERNAL_ERROR_PLEASE_FILE_A_BUG_REPORT__INVALID_COST_VALUE=1,\n        THIS_COEFFICIENT_ACCESSOR_TAKING_ONE_ACCESS_IS_ONLY_FOR_EXPRESSIONS_ALLOWING_LINEAR_ACCESS=1,\n        MATRIX_FREE_CONJUGATE_GRADIENT_IS_COMPATIBLE_WITH_UPPER_UNION_LOWER_MODE_ONLY=1,\n        THIS_TYPE_IS_NOT_SUPPORTED=1,\n        STORAGE_KIND_MUST_MATCH=1,\n        STORAGE_INDEX_MUST_MATCH=1,\n        CHOLMOD_SUPPORTS_DOUBLE_PRECISION_ONLY=1,\n        SELFADJOINTVIEW_ACCEPTS_UPPER_AND_LOWER_MODE_ONLY=1,\n        INVALID_TEMPLATE_PARAMETER=1,\n        GPU_TENSOR_CONTRACTION_DOES_NOT_SUPPORT_OUTPUT_KERNELS=1\n      };\n    };\n\n    } // end namespace internal\n\n    } // end namespace Eigen\n\n    // Specialized implementation for MSVC to avoid \"conditional\n    // expression is constant\" warnings.  This implementation doesn't\n    // appear to work under GCC, hence the multiple implementations.\n    #if EIGEN_COMP_MSVC\n\n      #define EIGEN_STATIC_ASSERT(CONDITION,MSG) \\\n        {Eigen::internal::static_assertion<bool(CONDITION)>::MSG;}\n\n    #else\n      // In some cases clang interprets bool(CONDITION) as function declaration\n      #define EIGEN_STATIC_ASSERT(CONDITION,MSG) \\\n        if (Eigen::internal::static_assertion<static_cast<bool>(CONDITION)>::MSG) {}\n\n    #endif\n\n  #endif // not CXX0X\n\n#else // EIGEN_NO_STATIC_ASSERT\n\n  #define EIGEN_STATIC_ASSERT(CONDITION,MSG) eigen_assert((CONDITION) && #MSG);\n\n#endif // EIGEN_NO_STATIC_ASSERT\n#endif // EIGEN_STATIC_ASSERT\n\n// static assertion failing if the type \\a TYPE is not a vector type\n#define EIGEN_STATIC_ASSERT_VECTOR_ONLY(TYPE) \\\n  EIGEN_STATIC_ASSERT(TYPE::IsVectorAtCompileTime, \\\n                      YOU_TRIED_CALLING_A_VECTOR_METHOD_ON_A_MATRIX)\n\n// static assertion failing if the type \\a TYPE is not fixed-size\n#define EIGEN_STATIC_ASSERT_FIXED_SIZE(TYPE) \\\n  EIGEN_STATIC_ASSERT(TYPE::SizeAtCompileTime!=Eigen::Dynamic, \\\n                      YOU_CALLED_A_FIXED_SIZE_METHOD_ON_A_DYNAMIC_SIZE_MATRIX_OR_VECTOR)\n\n// static assertion failing if the type \\a TYPE is not dynamic-size\n#define EIGEN_STATIC_ASSERT_DYNAMIC_SIZE(TYPE) \\\n  EIGEN_STATIC_ASSERT(TYPE::SizeAtCompileTime==Eigen::Dynamic, \\\n                      YOU_CALLED_A_DYNAMIC_SIZE_METHOD_ON_A_FIXED_SIZE_MATRIX_OR_VECTOR)\n\n// static assertion failing if the type \\a TYPE is not a vector type of the given size\n#define EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(TYPE, SIZE) \\\n  EIGEN_STATIC_ASSERT(TYPE::IsVectorAtCompileTime && TYPE::SizeAtCompileTime==SIZE, \\\n                      THIS_METHOD_IS_ONLY_FOR_VECTORS_OF_A_SPECIFIC_SIZE)\n\n// static assertion failing if the type \\a TYPE is not a vector type of the given size\n#define EIGEN_STATIC_ASSERT_MATRIX_SPECIFIC_SIZE(TYPE, ROWS, COLS) \\\n  EIGEN_STATIC_ASSERT(TYPE::RowsAtCompileTime==ROWS && TYPE::ColsAtCompileTime==COLS, \\\n                      THIS_METHOD_IS_ONLY_FOR_MATRICES_OF_A_SPECIFIC_SIZE)\n\n// static assertion failing if the two vector expression types are not compatible (same fixed-size or dynamic size)\n#define EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(TYPE0,TYPE1) \\\n  EIGEN_STATIC_ASSERT( \\\n      (int(TYPE0::SizeAtCompileTime)==Eigen::Dynamic \\\n    || int(TYPE1::SizeAtCompileTime)==Eigen::Dynamic \\\n    || int(TYPE0::SizeAtCompileTime)==int(TYPE1::SizeAtCompileTime)),\\\n    YOU_MIXED_VECTORS_OF_DIFFERENT_SIZES)\n\n#define EIGEN_PREDICATE_SAME_MATRIX_SIZE(TYPE0,TYPE1) \\\n     ( \\\n        (int(Eigen::internal::size_of_xpr_at_compile_time<TYPE0>::ret)==0 && int(Eigen::internal::size_of_xpr_at_compile_time<TYPE1>::ret)==0) \\\n    || (\\\n          (int(TYPE0::RowsAtCompileTime)==Eigen::Dynamic \\\n        || int(TYPE1::RowsAtCompileTime)==Eigen::Dynamic \\\n        || int(TYPE0::RowsAtCompileTime)==int(TYPE1::RowsAtCompileTime)) \\\n      &&  (int(TYPE0::ColsAtCompileTime)==Eigen::Dynamic \\\n        || int(TYPE1::ColsAtCompileTime)==Eigen::Dynamic \\\n        || int(TYPE0::ColsAtCompileTime)==int(TYPE1::ColsAtCompileTime))\\\n       ) \\\n     )\n\n#define EIGEN_STATIC_ASSERT_NON_INTEGER(TYPE) \\\n    EIGEN_STATIC_ASSERT(!Eigen::NumTraits<TYPE>::IsInteger, THIS_FUNCTION_IS_NOT_FOR_INTEGER_NUMERIC_TYPES)\n\n\n// static assertion failing if it is guaranteed at compile-time that the two matrix expression types have different sizes\n#define EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(TYPE0,TYPE1) \\\n  EIGEN_STATIC_ASSERT( \\\n     EIGEN_PREDICATE_SAME_MATRIX_SIZE(TYPE0,TYPE1),\\\n    YOU_MIXED_MATRICES_OF_DIFFERENT_SIZES)\n\n#define EIGEN_STATIC_ASSERT_SIZE_1x1(TYPE) \\\n      EIGEN_STATIC_ASSERT((TYPE::RowsAtCompileTime == 1 || TYPE::RowsAtCompileTime == Eigen::Dynamic) && \\\n                          (TYPE::ColsAtCompileTime == 1 || TYPE::ColsAtCompileTime == Eigen::Dynamic), \\\n                          THIS_METHOD_IS_ONLY_FOR_1x1_EXPRESSIONS)\n\n#define EIGEN_STATIC_ASSERT_LVALUE(Derived) \\\n      EIGEN_STATIC_ASSERT(Eigen::internal::is_lvalue<Derived>::value, \\\n                          THIS_EXPRESSION_IS_NOT_A_LVALUE__IT_IS_READ_ONLY)\n\n#define EIGEN_STATIC_ASSERT_ARRAYXPR(Derived) \\\n      EIGEN_STATIC_ASSERT((Eigen::internal::is_same<typename Eigen::internal::traits<Derived>::XprKind, ArrayXpr>::value), \\\n                          THIS_METHOD_IS_ONLY_FOR_ARRAYS_NOT_MATRICES)\n\n#define EIGEN_STATIC_ASSERT_SAME_XPR_KIND(Derived1, Derived2) \\\n      EIGEN_STATIC_ASSERT((Eigen::internal::is_same<typename Eigen::internal::traits<Derived1>::XprKind, \\\n                                             typename Eigen::internal::traits<Derived2>::XprKind \\\n                                            >::value), \\\n                          YOU_CANNOT_MIX_ARRAYS_AND_MATRICES)\n\n// Check that a cost value is positive, and that is stay within a reasonable range\n// TODO this check could be enabled for internal debugging only\n#define EIGEN_INTERNAL_CHECK_COST_VALUE(C) \\\n      EIGEN_STATIC_ASSERT((C)>=0 && (C)<=HugeCost*HugeCost, EIGEN_INTERNAL_ERROR_PLEASE_FILE_A_BUG_REPORT__INVALID_COST_VALUE);\n\n#endif // EIGEN_STATIC_ASSERT_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/util/SymbolicIndex.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2017 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SYMBOLIC_INDEX_H\n#define EIGEN_SYMBOLIC_INDEX_H\n\nnamespace Eigen {\n\n/** \\namespace Eigen::symbolic\n  * \\ingroup Core_Module\n  *\n  * This namespace defines a set of classes and functions to build and evaluate symbolic expressions of scalar type Index.\n  * Here is a simple example:\n  *\n  * \\code\n  * // First step, defines symbols:\n  * struct x_tag {};  static const symbolic::SymbolExpr<x_tag> x;\n  * struct y_tag {};  static const symbolic::SymbolExpr<y_tag> y;\n  * struct z_tag {};  static const symbolic::SymbolExpr<z_tag> z;\n  *\n  * // Defines an expression:\n  * auto expr = (x+3)/y+z;\n  *\n  * // And evaluate it: (c++14)\n  * std::cout << expr.eval(x=6,y=3,z=-13) << \"\\n\";\n  *\n  * // In c++98/11, only one symbol per expression is supported for now:\n  * auto expr98 = (3-x)/2;\n  * std::cout << expr98.eval(x=6) << \"\\n\";\n  * \\endcode\n  *\n  * It is currently only used internally to define and manipulate the Eigen::last and Eigen::lastp1 symbols in Eigen::seq and Eigen::seqN.\n  *\n  */\nnamespace symbolic {\n\ntemplate<typename Tag> class Symbol;\ntemplate<typename Arg0> class NegateExpr;\ntemplate<typename Arg1,typename Arg2> class AddExpr;\ntemplate<typename Arg1,typename Arg2> class ProductExpr;\ntemplate<typename Arg1,typename Arg2> class QuotientExpr;\n\n// A simple wrapper around an integral value to provide the eval method.\n// We could also use a free-function symbolic_eval...\ntemplate<typename IndexType=Index>\nclass ValueExpr {\npublic:\n  ValueExpr(IndexType val) : m_value(val) {}\n  template<typename T>\n  IndexType eval_impl(const T&) const { return m_value; }\nprotected:\n  IndexType m_value;\n};\n\n// Specialization for compile-time value,\n// It is similar to ValueExpr(N) but this version helps the compiler to generate better code.\ntemplate<int N>\nclass ValueExpr<internal::FixedInt<N> > {\npublic:\n  ValueExpr() {}\n  template<typename T>\n  Index eval_impl(const T&) const { return N; }\n};\n\n\n/** \\class BaseExpr\n  * \\ingroup Core_Module\n  * Common base class of any symbolic expressions\n  */\ntemplate<typename Derived>\nclass BaseExpr\n{\npublic:\n  const Derived& derived() const { return *static_cast<const Derived*>(this); }\n\n  /** Evaluate the expression given the \\a values of the symbols.\n    *\n    * \\param values defines the values of the symbols, it can either be a SymbolValue or a std::tuple of SymbolValue\n    *               as constructed by SymbolExpr::operator= operator.\n    *\n    */\n  template<typename T>\n  Index eval(const T& values) const { return derived().eval_impl(values); }\n\n#if EIGEN_HAS_CXX14\n  template<typename... Types>\n  Index eval(Types&&... values) const { return derived().eval_impl(std::make_tuple(values...)); }\n#endif\n\n  NegateExpr<Derived> operator-() const { return NegateExpr<Derived>(derived()); }\n\n  AddExpr<Derived,ValueExpr<> > operator+(Index b) const\n  { return AddExpr<Derived,ValueExpr<> >(derived(),  b); }\n  AddExpr<Derived,ValueExpr<> > operator-(Index a) const\n  { return AddExpr<Derived,ValueExpr<> >(derived(), -a); }\n  ProductExpr<Derived,ValueExpr<> > operator*(Index a) const\n  { return ProductExpr<Derived,ValueExpr<> >(derived(),a); }\n  QuotientExpr<Derived,ValueExpr<> > operator/(Index a) const\n  { return QuotientExpr<Derived,ValueExpr<> >(derived(),a); }\n\n  friend AddExpr<Derived,ValueExpr<> > operator+(Index a, const BaseExpr& b)\n  { return AddExpr<Derived,ValueExpr<> >(b.derived(), a); }\n  friend AddExpr<NegateExpr<Derived>,ValueExpr<> > operator-(Index a, const BaseExpr& b)\n  { return AddExpr<NegateExpr<Derived>,ValueExpr<> >(-b.derived(), a); }\n  friend ProductExpr<ValueExpr<>,Derived> operator*(Index a, const BaseExpr& b)\n  { return ProductExpr<ValueExpr<>,Derived>(a,b.derived()); }\n  friend QuotientExpr<ValueExpr<>,Derived> operator/(Index a, const BaseExpr& b)\n  { return QuotientExpr<ValueExpr<>,Derived>(a,b.derived()); }\n\n  template<int N>\n  AddExpr<Derived,ValueExpr<internal::FixedInt<N> > > operator+(internal::FixedInt<N>) const\n  { return AddExpr<Derived,ValueExpr<internal::FixedInt<N> > >(derived(), ValueExpr<internal::FixedInt<N> >()); }\n  template<int N>\n  AddExpr<Derived,ValueExpr<internal::FixedInt<-N> > > operator-(internal::FixedInt<N>) const\n  { return AddExpr<Derived,ValueExpr<internal::FixedInt<-N> > >(derived(), ValueExpr<internal::FixedInt<-N> >()); }\n  template<int N>\n  ProductExpr<Derived,ValueExpr<internal::FixedInt<N> > > operator*(internal::FixedInt<N>) const\n  { return ProductExpr<Derived,ValueExpr<internal::FixedInt<N> > >(derived(),ValueExpr<internal::FixedInt<N> >()); }\n  template<int N>\n  QuotientExpr<Derived,ValueExpr<internal::FixedInt<N> > > operator/(internal::FixedInt<N>) const\n  { return QuotientExpr<Derived,ValueExpr<internal::FixedInt<N> > >(derived(),ValueExpr<internal::FixedInt<N> >()); }\n\n  template<int N>\n  friend AddExpr<Derived,ValueExpr<internal::FixedInt<N> > > operator+(internal::FixedInt<N>, const BaseExpr& b)\n  { return AddExpr<Derived,ValueExpr<internal::FixedInt<N> > >(b.derived(), ValueExpr<internal::FixedInt<N> >()); }\n  template<int N>\n  friend AddExpr<NegateExpr<Derived>,ValueExpr<internal::FixedInt<N> > > operator-(internal::FixedInt<N>, const BaseExpr& b)\n  { return AddExpr<NegateExpr<Derived>,ValueExpr<internal::FixedInt<N> > >(-b.derived(), ValueExpr<internal::FixedInt<N> >()); }\n  template<int N>\n  friend ProductExpr<ValueExpr<internal::FixedInt<N> >,Derived> operator*(internal::FixedInt<N>, const BaseExpr& b)\n  { return ProductExpr<ValueExpr<internal::FixedInt<N> >,Derived>(ValueExpr<internal::FixedInt<N> >(),b.derived()); }\n  template<int N>\n  friend QuotientExpr<ValueExpr<internal::FixedInt<N> >,Derived> operator/(internal::FixedInt<N>, const BaseExpr& b)\n  { return QuotientExpr<ValueExpr<internal::FixedInt<N> > ,Derived>(ValueExpr<internal::FixedInt<N> >(),b.derived()); }\n\n#if (!EIGEN_HAS_CXX14)\n  template<int N>\n  AddExpr<Derived,ValueExpr<internal::FixedInt<N> > > operator+(internal::FixedInt<N> (*)()) const\n  { return AddExpr<Derived,ValueExpr<internal::FixedInt<N> > >(derived(), ValueExpr<internal::FixedInt<N> >()); }\n  template<int N>\n  AddExpr<Derived,ValueExpr<internal::FixedInt<-N> > > operator-(internal::FixedInt<N> (*)()) const\n  { return AddExpr<Derived,ValueExpr<internal::FixedInt<-N> > >(derived(), ValueExpr<internal::FixedInt<-N> >()); }\n  template<int N>\n  ProductExpr<Derived,ValueExpr<internal::FixedInt<N> > > operator*(internal::FixedInt<N> (*)()) const\n  { return ProductExpr<Derived,ValueExpr<internal::FixedInt<N> > >(derived(),ValueExpr<internal::FixedInt<N> >()); }\n  template<int N>\n  QuotientExpr<Derived,ValueExpr<internal::FixedInt<N> > > operator/(internal::FixedInt<N> (*)()) const\n  { return QuotientExpr<Derived,ValueExpr<internal::FixedInt<N> > >(derived(),ValueExpr<internal::FixedInt<N> >()); }\n\n  template<int N>\n  friend AddExpr<Derived,ValueExpr<internal::FixedInt<N> > > operator+(internal::FixedInt<N> (*)(), const BaseExpr& b)\n  { return AddExpr<Derived,ValueExpr<internal::FixedInt<N> > >(b.derived(), ValueExpr<internal::FixedInt<N> >()); }\n  template<int N>\n  friend AddExpr<NegateExpr<Derived>,ValueExpr<internal::FixedInt<N> > > operator-(internal::FixedInt<N> (*)(), const BaseExpr& b)\n  { return AddExpr<NegateExpr<Derived>,ValueExpr<internal::FixedInt<N> > >(-b.derived(), ValueExpr<internal::FixedInt<N> >()); }\n  template<int N>\n  friend ProductExpr<ValueExpr<internal::FixedInt<N> >,Derived> operator*(internal::FixedInt<N> (*)(), const BaseExpr& b)\n  { return ProductExpr<ValueExpr<internal::FixedInt<N> >,Derived>(ValueExpr<internal::FixedInt<N> >(),b.derived()); }\n  template<int N>\n  friend QuotientExpr<ValueExpr<internal::FixedInt<N> >,Derived> operator/(internal::FixedInt<N> (*)(), const BaseExpr& b)\n  { return QuotientExpr<ValueExpr<internal::FixedInt<N> > ,Derived>(ValueExpr<internal::FixedInt<N> >(),b.derived()); }\n#endif\n\n\n  template<typename OtherDerived>\n  AddExpr<Derived,OtherDerived> operator+(const BaseExpr<OtherDerived> &b) const\n  { return AddExpr<Derived,OtherDerived>(derived(),  b.derived()); }\n\n  template<typename OtherDerived>\n  AddExpr<Derived,NegateExpr<OtherDerived> > operator-(const BaseExpr<OtherDerived> &b) const\n  { return AddExpr<Derived,NegateExpr<OtherDerived> >(derived(), -b.derived()); }\n\n  template<typename OtherDerived>\n  ProductExpr<Derived,OtherDerived> operator*(const BaseExpr<OtherDerived> &b) const\n  { return ProductExpr<Derived,OtherDerived>(derived(), b.derived()); }\n\n  template<typename OtherDerived>\n  QuotientExpr<Derived,OtherDerived> operator/(const BaseExpr<OtherDerived> &b) const\n  { return QuotientExpr<Derived,OtherDerived>(derived(), b.derived()); }\n};\n\ntemplate<typename T>\nstruct is_symbolic {\n  // BaseExpr has no conversion ctor, so we only have to check whether T can be statically cast to its base class BaseExpr<T>.\n  enum { value = internal::is_convertible<T,BaseExpr<T> >::value };\n};\n\n/** Represents the actual value of a symbol identified by its tag\n  *\n  * It is the return type of SymbolValue::operator=, and most of the time this is only way it is used.\n  */\ntemplate<typename Tag>\nclass SymbolValue\n{\npublic:\n  /** Default constructor from the value \\a val */\n  SymbolValue(Index val) : m_value(val) {}\n\n  /** \\returns the stored value of the symbol */\n  Index value() const { return m_value; }\nprotected:\n  Index m_value;\n};\n\n/** Expression of a symbol uniquely identified by the template parameter type \\c tag */\ntemplate<typename tag>\nclass SymbolExpr : public BaseExpr<SymbolExpr<tag> >\n{\npublic:\n  /** Alias to the template parameter \\c tag */\n  typedef tag Tag;\n\n  SymbolExpr() {}\n\n  /** Associate the value \\a val to the given symbol \\c *this, uniquely identified by its \\c Tag.\n    *\n    * The returned object should be passed to ExprBase::eval() to evaluate a given expression with this specified runtime-time value.\n    */\n  SymbolValue<Tag> operator=(Index val) const {\n    return SymbolValue<Tag>(val);\n  }\n\n  Index eval_impl(const SymbolValue<Tag> &values) const { return values.value(); }\n\n#if EIGEN_HAS_CXX14\n  // C++14 versions suitable for multiple symbols\n  template<typename... Types>\n  Index eval_impl(const std::tuple<Types...>& values) const { return std::get<SymbolValue<Tag> >(values).value(); }\n#endif\n};\n\ntemplate<typename Arg0>\nclass NegateExpr : public BaseExpr<NegateExpr<Arg0> >\n{\npublic:\n  NegateExpr(const Arg0& arg0) : m_arg0(arg0) {}\n\n  template<typename T>\n  Index eval_impl(const T& values) const { return -m_arg0.eval_impl(values); }\nprotected:\n  Arg0 m_arg0;\n};\n\ntemplate<typename Arg0, typename Arg1>\nclass AddExpr : public BaseExpr<AddExpr<Arg0,Arg1> >\n{\npublic:\n  AddExpr(const Arg0& arg0, const Arg1& arg1) : m_arg0(arg0), m_arg1(arg1) {}\n\n  template<typename T>\n  Index eval_impl(const T& values) const { return m_arg0.eval_impl(values) + m_arg1.eval_impl(values); }\nprotected:\n  Arg0 m_arg0;\n  Arg1 m_arg1;\n};\n\ntemplate<typename Arg0, typename Arg1>\nclass ProductExpr : public BaseExpr<ProductExpr<Arg0,Arg1> >\n{\npublic:\n  ProductExpr(const Arg0& arg0, const Arg1& arg1) : m_arg0(arg0), m_arg1(arg1) {}\n\n  template<typename T>\n  Index eval_impl(const T& values) const { return m_arg0.eval_impl(values) * m_arg1.eval_impl(values); }\nprotected:\n  Arg0 m_arg0;\n  Arg1 m_arg1;\n};\n\ntemplate<typename Arg0, typename Arg1>\nclass QuotientExpr : public BaseExpr<QuotientExpr<Arg0,Arg1> >\n{\npublic:\n  QuotientExpr(const Arg0& arg0, const Arg1& arg1) : m_arg0(arg0), m_arg1(arg1) {}\n\n  template<typename T>\n  Index eval_impl(const T& values) const { return m_arg0.eval_impl(values) / m_arg1.eval_impl(values); }\nprotected:\n  Arg0 m_arg0;\n  Arg1 m_arg1;\n};\n\n} // end namespace symbolic\n\n} // end namespace Eigen\n\n#endif // EIGEN_SYMBOLIC_INDEX_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Core/util/XprHelper.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_XPRHELPER_H\n#define EIGEN_XPRHELPER_H\n\n// just a workaround because GCC seems to not really like empty structs\n// FIXME: gcc 4.3 generates bad code when strict-aliasing is enabled\n// so currently we simply disable this optimization for gcc 4.3\n#if EIGEN_COMP_GNUC && !EIGEN_GNUC_AT(4,3)\n  #define EIGEN_EMPTY_STRUCT_CTOR(X) \\\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE X() {} \\\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE X(const X& ) {}\n#else\n  #define EIGEN_EMPTY_STRUCT_CTOR(X)\n#endif\n\nnamespace Eigen {\n\nnamespace internal {\n\ntemplate<typename IndexDest, typename IndexSrc>\nEIGEN_DEVICE_FUNC\ninline IndexDest convert_index(const IndexSrc& idx) {\n  // for sizeof(IndexDest)>=sizeof(IndexSrc) compilers should be able to optimize this away:\n  eigen_internal_assert(idx <= NumTraits<IndexDest>::highest() && \"Index value to big for target type\");\n  return IndexDest(idx);\n}\n\n// true if T can be considered as an integral index (i.e., and integral type or enum)\ntemplate<typename T> struct is_valid_index_type\n{\n  enum { value =\n#if EIGEN_HAS_TYPE_TRAITS\n    internal::is_integral<T>::value || std::is_enum<T>::value\n#elif EIGEN_COMP_MSVC\n    internal::is_integral<T>::value || __is_enum(T)\n#else\n    // without C++11, we use is_convertible to Index instead of is_integral in order to treat enums as Index.\n    internal::is_convertible<T,Index>::value && !internal::is_same<T,float>::value && !is_same<T,double>::value\n#endif\n  };\n};\n\n// true if both types are not valid index types\ntemplate<typename RowIndices, typename ColIndices>\nstruct valid_indexed_view_overload {\n  enum { value = !(internal::is_valid_index_type<RowIndices>::value && internal::is_valid_index_type<ColIndices>::value) };\n};\n\n// promote_scalar_arg is an helper used in operation between an expression and a scalar, like:\n//    expression * scalar\n// Its role is to determine how the type T of the scalar operand should be promoted given the scalar type ExprScalar of the given expression.\n// The IsSupported template parameter must be provided by the caller as: internal::has_ReturnType<ScalarBinaryOpTraits<ExprScalar,T,op> >::value using the proper order for ExprScalar and T.\n// Then the logic is as follows:\n//  - if the operation is natively supported as defined by IsSupported, then the scalar type is not promoted, and T is returned.\n//  - otherwise, NumTraits<ExprScalar>::Literal is returned if T is implicitly convertible to NumTraits<ExprScalar>::Literal AND that this does not imply a float to integer conversion.\n//  - otherwise, ExprScalar is returned if T is implicitly convertible to ExprScalar AND that this does not imply a float to integer conversion.\n//  - In all other cases, the promoted type is not defined, and the respective operation is thus invalid and not available (SFINAE).\ntemplate<typename ExprScalar,typename T, bool IsSupported>\nstruct promote_scalar_arg;\n\ntemplate<typename S,typename T>\nstruct promote_scalar_arg<S,T,true>\n{\n  typedef T type;\n};\n\n// Recursively check safe conversion to PromotedType, and then ExprScalar if they are different.\ntemplate<typename ExprScalar,typename T,typename PromotedType,\n  bool ConvertibleToLiteral = internal::is_convertible<T,PromotedType>::value,\n  bool IsSafe = NumTraits<T>::IsInteger || !NumTraits<PromotedType>::IsInteger>\nstruct promote_scalar_arg_unsupported;\n\n// Start recursion with NumTraits<ExprScalar>::Literal\ntemplate<typename S,typename T>\nstruct promote_scalar_arg<S,T,false> : promote_scalar_arg_unsupported<S,T,typename NumTraits<S>::Literal> {};\n\n// We found a match!\ntemplate<typename S,typename T, typename PromotedType>\nstruct promote_scalar_arg_unsupported<S,T,PromotedType,true,true>\n{\n  typedef PromotedType type;\n};\n\n// No match, but no real-to-integer issues, and ExprScalar and current PromotedType are different,\n// so let's try to promote to ExprScalar\ntemplate<typename ExprScalar,typename T, typename PromotedType>\nstruct promote_scalar_arg_unsupported<ExprScalar,T,PromotedType,false,true>\n   : promote_scalar_arg_unsupported<ExprScalar,T,ExprScalar>\n{};\n\n// Unsafe real-to-integer, let's stop.\ntemplate<typename S,typename T, typename PromotedType, bool ConvertibleToLiteral>\nstruct promote_scalar_arg_unsupported<S,T,PromotedType,ConvertibleToLiteral,false> {};\n\n// T is not even convertible to ExprScalar, let's stop.\ntemplate<typename S,typename T>\nstruct promote_scalar_arg_unsupported<S,T,S,false,true> {};\n\n//classes inheriting no_assignment_operator don't generate a default operator=.\nclass no_assignment_operator\n{\n  private:\n    no_assignment_operator& operator=(const no_assignment_operator&);\n  protected:\n    EIGEN_DEFAULT_COPY_CONSTRUCTOR(no_assignment_operator)\n    EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(no_assignment_operator)\n};\n\n/** \\internal return the index type with the largest number of bits */\ntemplate<typename I1, typename I2>\nstruct promote_index_type\n{\n  typedef typename conditional<(sizeof(I1)<sizeof(I2)), I2, I1>::type type;\n};\n\n/** \\internal If the template parameter Value is Dynamic, this class is just a wrapper around a T variable that\n  * can be accessed using value() and setValue().\n  * Otherwise, this class is an empty structure and value() just returns the template parameter Value.\n  */\ntemplate<typename T, int Value> class variable_if_dynamic\n{\n  public:\n    EIGEN_EMPTY_STRUCT_CTOR(variable_if_dynamic)\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit variable_if_dynamic(T v) { EIGEN_ONLY_USED_FOR_DEBUG(v); eigen_assert(v == T(Value)); }\n    EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE T value() { return T(Value); }\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE operator T() const { return T(Value); }\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void setValue(T) {}\n};\n\ntemplate<typename T> class variable_if_dynamic<T, Dynamic>\n{\n    T m_value;\n    EIGEN_DEVICE_FUNC variable_if_dynamic() { eigen_assert(false); }\n  public:\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit variable_if_dynamic(T value) : m_value(value) {}\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T value() const { return m_value; }\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE operator T() const { return m_value; }\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void setValue(T value) { m_value = value; }\n};\n\n/** \\internal like variable_if_dynamic but for DynamicIndex\n  */\ntemplate<typename T, int Value> class variable_if_dynamicindex\n{\n  public:\n    EIGEN_EMPTY_STRUCT_CTOR(variable_if_dynamicindex)\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit variable_if_dynamicindex(T v) { EIGEN_ONLY_USED_FOR_DEBUG(v); eigen_assert(v == T(Value)); }\n    EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE T value() { return T(Value); }\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void setValue(T) {}\n};\n\ntemplate<typename T> class variable_if_dynamicindex<T, DynamicIndex>\n{\n    T m_value;\n    EIGEN_DEVICE_FUNC variable_if_dynamicindex() { eigen_assert(false); }\n  public:\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit variable_if_dynamicindex(T value) : m_value(value) {}\n    EIGEN_DEVICE_FUNC T EIGEN_STRONG_INLINE value() const { return m_value; }\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void setValue(T value) { m_value = value; }\n};\n\ntemplate<typename T> struct functor_traits\n{\n  enum\n  {\n    Cost = 10,\n    PacketAccess = false,\n    IsRepeatable = false\n  };\n};\n\ntemplate<typename T> struct packet_traits;\n\ntemplate<typename T> struct unpacket_traits\n{\n  typedef T type;\n  typedef T half;\n  enum\n  {\n    size = 1,\n    alignment = 1,\n    vectorizable = false,\n    masked_load_available=false,\n    masked_store_available=false\n  };\n};\n\ntemplate<int Size, typename PacketType,\n         bool Stop = Size==Dynamic || (Size%unpacket_traits<PacketType>::size)==0 || is_same<PacketType,typename unpacket_traits<PacketType>::half>::value>\nstruct find_best_packet_helper;\n\ntemplate< int Size, typename PacketType>\nstruct find_best_packet_helper<Size,PacketType,true>\n{\n  typedef PacketType type;\n};\n\ntemplate<int Size, typename PacketType>\nstruct find_best_packet_helper<Size,PacketType,false>\n{\n  typedef typename find_best_packet_helper<Size,typename unpacket_traits<PacketType>::half>::type type;\n};\n\ntemplate<typename T, int Size>\nstruct find_best_packet\n{\n  typedef typename find_best_packet_helper<Size,typename packet_traits<T>::type>::type type;\n};\n\n#if EIGEN_MAX_STATIC_ALIGN_BYTES>0\ntemplate<int ArrayBytes, int AlignmentBytes,\n         bool Match     =  bool((ArrayBytes%AlignmentBytes)==0),\n         bool TryHalf   =  bool(EIGEN_MIN_ALIGN_BYTES<AlignmentBytes) >\nstruct compute_default_alignment_helper\n{\n  enum { value = 0 };\n};\n\ntemplate<int ArrayBytes, int AlignmentBytes, bool TryHalf>\nstruct compute_default_alignment_helper<ArrayBytes, AlignmentBytes, true, TryHalf> // Match\n{\n  enum { value = AlignmentBytes };\n};\n\ntemplate<int ArrayBytes, int AlignmentBytes>\nstruct compute_default_alignment_helper<ArrayBytes, AlignmentBytes, false, true> // Try-half\n{\n  // current packet too large, try with an half-packet\n  enum { value = compute_default_alignment_helper<ArrayBytes, AlignmentBytes/2>::value };\n};\n#else\n// If static alignment is disabled, no need to bother.\n// This also avoids a division by zero in \"bool Match =  bool((ArrayBytes%AlignmentBytes)==0)\"\ntemplate<int ArrayBytes, int AlignmentBytes>\nstruct compute_default_alignment_helper\n{\n  enum { value = 0 };\n};\n#endif\n\ntemplate<typename T, int Size> struct compute_default_alignment {\n  enum { value = compute_default_alignment_helper<Size*sizeof(T),EIGEN_MAX_STATIC_ALIGN_BYTES>::value };\n};\n\ntemplate<typename T> struct compute_default_alignment<T,Dynamic> {\n  enum { value = EIGEN_MAX_ALIGN_BYTES };\n};\n\ntemplate<typename _Scalar, int _Rows, int _Cols,\n         int _Options = AutoAlign |\n                          ( (_Rows==1 && _Cols!=1) ? RowMajor\n                          : (_Cols==1 && _Rows!=1) ? ColMajor\n                          : EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION ),\n         int _MaxRows = _Rows,\n         int _MaxCols = _Cols\n> class make_proper_matrix_type\n{\n    enum {\n      IsColVector = _Cols==1 && _Rows!=1,\n      IsRowVector = _Rows==1 && _Cols!=1,\n      Options = IsColVector ? (_Options | ColMajor) & ~RowMajor\n              : IsRowVector ? (_Options | RowMajor) & ~ColMajor\n              : _Options\n    };\n  public:\n    typedef Matrix<_Scalar, _Rows, _Cols, Options, _MaxRows, _MaxCols> type;\n};\n\ntemplate<typename Scalar, int Rows, int Cols, int Options, int MaxRows, int MaxCols>\nclass compute_matrix_flags\n{\n    enum { row_major_bit = Options&RowMajor ? RowMajorBit : 0 };\n  public:\n    // FIXME currently we still have to handle DirectAccessBit at the expression level to handle DenseCoeffsBase<>\n    // and then propagate this information to the evaluator's flags.\n    // However, I (Gael) think that DirectAccessBit should only matter at the evaluation stage.\n    enum { ret = DirectAccessBit | LvalueBit | NestByRefBit | row_major_bit };\n};\n\ntemplate<int _Rows, int _Cols> struct size_at_compile_time\n{\n  enum { ret = (_Rows==Dynamic || _Cols==Dynamic) ? Dynamic : _Rows * _Cols };\n};\n\ntemplate<typename XprType> struct size_of_xpr_at_compile_time\n{\n  enum { ret = size_at_compile_time<traits<XprType>::RowsAtCompileTime,traits<XprType>::ColsAtCompileTime>::ret };\n};\n\n/* plain_matrix_type : the difference from eval is that plain_matrix_type is always a plain matrix type,\n * whereas eval is a const reference in the case of a matrix\n */\n\ntemplate<typename T, typename StorageKind = typename traits<T>::StorageKind> struct plain_matrix_type;\ntemplate<typename T, typename BaseClassType, int Flags> struct plain_matrix_type_dense;\ntemplate<typename T> struct plain_matrix_type<T,Dense>\n{\n  typedef typename plain_matrix_type_dense<T,typename traits<T>::XprKind, traits<T>::Flags>::type type;\n};\ntemplate<typename T> struct plain_matrix_type<T,DiagonalShape>\n{\n  typedef typename T::PlainObject type;\n};\n\ntemplate<typename T, int Flags> struct plain_matrix_type_dense<T,MatrixXpr,Flags>\n{\n  typedef Matrix<typename traits<T>::Scalar,\n                traits<T>::RowsAtCompileTime,\n                traits<T>::ColsAtCompileTime,\n                AutoAlign | (Flags&RowMajorBit ? RowMajor : ColMajor),\n                traits<T>::MaxRowsAtCompileTime,\n                traits<T>::MaxColsAtCompileTime\n          > type;\n};\n\ntemplate<typename T, int Flags> struct plain_matrix_type_dense<T,ArrayXpr,Flags>\n{\n  typedef Array<typename traits<T>::Scalar,\n                traits<T>::RowsAtCompileTime,\n                traits<T>::ColsAtCompileTime,\n                AutoAlign | (Flags&RowMajorBit ? RowMajor : ColMajor),\n                traits<T>::MaxRowsAtCompileTime,\n                traits<T>::MaxColsAtCompileTime\n          > type;\n};\n\n/* eval : the return type of eval(). For matrices, this is just a const reference\n * in order to avoid a useless copy\n */\n\ntemplate<typename T, typename StorageKind = typename traits<T>::StorageKind> struct eval;\n\ntemplate<typename T> struct eval<T,Dense>\n{\n  typedef typename plain_matrix_type<T>::type type;\n//   typedef typename T::PlainObject type;\n//   typedef T::Matrix<typename traits<T>::Scalar,\n//                 traits<T>::RowsAtCompileTime,\n//                 traits<T>::ColsAtCompileTime,\n//                 AutoAlign | (traits<T>::Flags&RowMajorBit ? RowMajor : ColMajor),\n//                 traits<T>::MaxRowsAtCompileTime,\n//                 traits<T>::MaxColsAtCompileTime\n//           > type;\n};\n\ntemplate<typename T> struct eval<T,DiagonalShape>\n{\n  typedef typename plain_matrix_type<T>::type type;\n};\n\n// for matrices, no need to evaluate, just use a const reference to avoid a useless copy\ntemplate<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>\nstruct eval<Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>, Dense>\n{\n  typedef const Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>& type;\n};\n\ntemplate<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>\nstruct eval<Array<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>, Dense>\n{\n  typedef const Array<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>& type;\n};\n\n\n/* similar to plain_matrix_type, but using the evaluator's Flags */\ntemplate<typename T, typename StorageKind = typename traits<T>::StorageKind> struct plain_object_eval;\n\ntemplate<typename T>\nstruct plain_object_eval<T,Dense>\n{\n  typedef typename plain_matrix_type_dense<T,typename traits<T>::XprKind, evaluator<T>::Flags>::type type;\n};\n\n\n/* plain_matrix_type_column_major : same as plain_matrix_type but guaranteed to be column-major\n */\ntemplate<typename T> struct plain_matrix_type_column_major\n{\n  enum { Rows = traits<T>::RowsAtCompileTime,\n         Cols = traits<T>::ColsAtCompileTime,\n         MaxRows = traits<T>::MaxRowsAtCompileTime,\n         MaxCols = traits<T>::MaxColsAtCompileTime\n  };\n  typedef Matrix<typename traits<T>::Scalar,\n                Rows,\n                Cols,\n                (MaxRows==1&&MaxCols!=1) ? RowMajor : ColMajor,\n                MaxRows,\n                MaxCols\n          > type;\n};\n\n/* plain_matrix_type_row_major : same as plain_matrix_type but guaranteed to be row-major\n */\ntemplate<typename T> struct plain_matrix_type_row_major\n{\n  enum { Rows = traits<T>::RowsAtCompileTime,\n         Cols = traits<T>::ColsAtCompileTime,\n         MaxRows = traits<T>::MaxRowsAtCompileTime,\n         MaxCols = traits<T>::MaxColsAtCompileTime\n  };\n  typedef Matrix<typename traits<T>::Scalar,\n                Rows,\n                Cols,\n                (MaxCols==1&&MaxRows!=1) ? ColMajor : RowMajor,\n                MaxRows,\n                MaxCols\n          > type;\n};\n\n/** \\internal The reference selector for template expressions. The idea is that we don't\n  * need to use references for expressions since they are light weight proxy\n  * objects which should generate no copying overhead. */\ntemplate <typename T>\nstruct ref_selector\n{\n  typedef typename conditional<\n    bool(traits<T>::Flags & NestByRefBit),\n    T const&,\n    const T\n  >::type type;\n  \n  typedef typename conditional<\n    bool(traits<T>::Flags & NestByRefBit),\n    T &,\n    T\n  >::type non_const_type;\n};\n\n/** \\internal Adds the const qualifier on the value-type of T2 if and only if T1 is a const type */\ntemplate<typename T1, typename T2>\nstruct transfer_constness\n{\n  typedef typename conditional<\n    bool(internal::is_const<T1>::value),\n    typename internal::add_const_on_value_type<T2>::type,\n    T2\n  >::type type;\n};\n\n\n// However, we still need a mechanism to detect whether an expression which is evaluated multiple time\n// has to be evaluated into a temporary.\n// That's the purpose of this new nested_eval helper:\n/** \\internal Determines how a given expression should be nested when evaluated multiple times.\n  * For example, when you do a * (b+c), Eigen will determine how the expression b+c should be\n  * evaluated into the bigger product expression. The choice is between nesting the expression b+c as-is, or\n  * evaluating that expression b+c into a temporary variable d, and nest d so that the resulting expression is\n  * a*d. Evaluating can be beneficial for example if every coefficient access in the resulting expression causes\n  * many coefficient accesses in the nested expressions -- as is the case with matrix product for example.\n  *\n  * \\tparam T the type of the expression being nested.\n  * \\tparam n the number of coefficient accesses in the nested expression for each coefficient access in the bigger expression.\n  * \\tparam PlainObject the type of the temporary if needed.\n  */\ntemplate<typename T, int n, typename PlainObject = typename plain_object_eval<T>::type> struct nested_eval\n{\n  enum {\n    ScalarReadCost = NumTraits<typename traits<T>::Scalar>::ReadCost,\n    CoeffReadCost = evaluator<T>::CoeffReadCost,  // NOTE What if an evaluator evaluate itself into a temporary?\n                                                  //      Then CoeffReadCost will be small (e.g., 1) but we still have to evaluate, especially if n>1.\n                                                  //      This situation is already taken care by the EvalBeforeNestingBit flag, which is turned ON\n                                                  //      for all evaluator creating a temporary. This flag is then propagated by the parent evaluators.\n                                                  //      Another solution could be to count the number of temps?\n    NAsInteger = n == Dynamic ? HugeCost : n,\n    CostEval   = (NAsInteger+1) * ScalarReadCost + CoeffReadCost,\n    CostNoEval = NAsInteger * CoeffReadCost,\n    Evaluate = (int(evaluator<T>::Flags) & EvalBeforeNestingBit) || (int(CostEval) < int(CostNoEval))\n  };\n\n  typedef typename conditional<Evaluate, PlainObject, typename ref_selector<T>::type>::type type;\n};\n\ntemplate<typename T>\nEIGEN_DEVICE_FUNC\ninline T* const_cast_ptr(const T* ptr)\n{\n  return const_cast<T*>(ptr);\n}\n\ntemplate<typename Derived, typename XprKind = typename traits<Derived>::XprKind>\nstruct dense_xpr_base\n{\n  /* dense_xpr_base should only ever be used on dense expressions, thus falling either into the MatrixXpr or into the ArrayXpr cases */\n};\n\ntemplate<typename Derived>\nstruct dense_xpr_base<Derived, MatrixXpr>\n{\n  typedef MatrixBase<Derived> type;\n};\n\ntemplate<typename Derived>\nstruct dense_xpr_base<Derived, ArrayXpr>\n{\n  typedef ArrayBase<Derived> type;\n};\n\ntemplate<typename Derived, typename XprKind = typename traits<Derived>::XprKind, typename StorageKind = typename traits<Derived>::StorageKind>\nstruct generic_xpr_base;\n\ntemplate<typename Derived, typename XprKind>\nstruct generic_xpr_base<Derived, XprKind, Dense>\n{\n  typedef typename dense_xpr_base<Derived,XprKind>::type type;\n};\n\ntemplate<typename XprType, typename CastType> struct cast_return_type\n{\n  typedef typename XprType::Scalar CurrentScalarType;\n  typedef typename remove_all<CastType>::type _CastType;\n  typedef typename _CastType::Scalar NewScalarType;\n  typedef typename conditional<is_same<CurrentScalarType,NewScalarType>::value,\n                              const XprType&,CastType>::type type;\n};\n\ntemplate <typename A, typename B> struct promote_storage_type;\n\ntemplate <typename A> struct promote_storage_type<A,A>\n{\n  typedef A ret;\n};\ntemplate <typename A> struct promote_storage_type<A, const A>\n{\n  typedef A ret;\n};\ntemplate <typename A> struct promote_storage_type<const A, A>\n{\n  typedef A ret;\n};\n\n/** \\internal Specify the \"storage kind\" of applying a coefficient-wise\n  * binary operations between two expressions of kinds A and B respectively.\n  * The template parameter Functor permits to specialize the resulting storage kind wrt to\n  * the functor.\n  * The default rules are as follows:\n  * \\code\n  * A      op A      -> A\n  * A      op dense  -> dense\n  * dense  op B      -> dense\n  * sparse op dense  -> sparse\n  * dense  op sparse -> sparse\n  * \\endcode\n  */\ntemplate <typename A, typename B, typename Functor> struct cwise_promote_storage_type;\n\ntemplate <typename A, typename Functor>                   struct cwise_promote_storage_type<A,A,Functor>                                      { typedef A      ret; };\ntemplate <typename Functor>                               struct cwise_promote_storage_type<Dense,Dense,Functor>                              { typedef Dense  ret; };\ntemplate <typename A, typename Functor>                   struct cwise_promote_storage_type<A,Dense,Functor>                                  { typedef Dense  ret; };\ntemplate <typename B, typename Functor>                   struct cwise_promote_storage_type<Dense,B,Functor>                                  { typedef Dense  ret; };\ntemplate <typename Functor>                               struct cwise_promote_storage_type<Sparse,Dense,Functor>                             { typedef Sparse ret; };\ntemplate <typename Functor>                               struct cwise_promote_storage_type<Dense,Sparse,Functor>                             { typedef Sparse ret; };\n\ntemplate <typename LhsKind, typename RhsKind, int LhsOrder, int RhsOrder> struct cwise_promote_storage_order {\n  enum { value = LhsOrder };\n};\n\ntemplate <typename LhsKind, int LhsOrder, int RhsOrder>   struct cwise_promote_storage_order<LhsKind,Sparse,LhsOrder,RhsOrder>                { enum { value = RhsOrder }; };\ntemplate <typename RhsKind, int LhsOrder, int RhsOrder>   struct cwise_promote_storage_order<Sparse,RhsKind,LhsOrder,RhsOrder>                { enum { value = LhsOrder }; };\ntemplate <int Order>                                      struct cwise_promote_storage_order<Sparse,Sparse,Order,Order>                       { enum { value = Order }; };\n\n\n/** \\internal Specify the \"storage kind\" of multiplying an expression of kind A with kind B.\n  * The template parameter ProductTag permits to specialize the resulting storage kind wrt to\n  * some compile-time properties of the product: GemmProduct, GemvProduct, OuterProduct, InnerProduct.\n  * The default rules are as follows:\n  * \\code\n  *  K * K            -> K\n  *  dense * K        -> dense\n  *  K * dense        -> dense\n  *  diag * K         -> K\n  *  K * diag         -> K\n  *  Perm * K         -> K\n  * K * Perm          -> K\n  * \\endcode\n  */\ntemplate <typename A, typename B, int ProductTag> struct product_promote_storage_type;\n\ntemplate <typename A, int ProductTag> struct product_promote_storage_type<A,                  A,                  ProductTag> { typedef A     ret;};\ntemplate <int ProductTag>             struct product_promote_storage_type<Dense,              Dense,              ProductTag> { typedef Dense ret;};\ntemplate <typename A, int ProductTag> struct product_promote_storage_type<A,                  Dense,              ProductTag> { typedef Dense ret; };\ntemplate <typename B, int ProductTag> struct product_promote_storage_type<Dense,              B,                  ProductTag> { typedef Dense ret; };\n\ntemplate <typename A, int ProductTag> struct product_promote_storage_type<A,                  DiagonalShape,      ProductTag> { typedef A ret; };\ntemplate <typename B, int ProductTag> struct product_promote_storage_type<DiagonalShape,      B,                  ProductTag> { typedef B ret; };\ntemplate <int ProductTag>             struct product_promote_storage_type<Dense,              DiagonalShape,      ProductTag> { typedef Dense ret; };\ntemplate <int ProductTag>             struct product_promote_storage_type<DiagonalShape,      Dense,              ProductTag> { typedef Dense ret; };\n\ntemplate <typename A, int ProductTag> struct product_promote_storage_type<A,                  PermutationStorage, ProductTag> { typedef A ret; };\ntemplate <typename B, int ProductTag> struct product_promote_storage_type<PermutationStorage, B,                  ProductTag> { typedef B ret; };\ntemplate <int ProductTag>             struct product_promote_storage_type<Dense,              PermutationStorage, ProductTag> { typedef Dense ret; };\ntemplate <int ProductTag>             struct product_promote_storage_type<PermutationStorage, Dense,              ProductTag> { typedef Dense ret; };\n\n/** \\internal gives the plain matrix or array type to store a row/column/diagonal of a matrix type.\n  * \\tparam Scalar optional parameter allowing to pass a different scalar type than the one of the MatrixType.\n  */\ntemplate<typename ExpressionType, typename Scalar = typename ExpressionType::Scalar>\nstruct plain_row_type\n{\n  typedef Matrix<Scalar, 1, ExpressionType::ColsAtCompileTime,\n                 ExpressionType::PlainObject::Options | RowMajor, 1, ExpressionType::MaxColsAtCompileTime> MatrixRowType;\n  typedef Array<Scalar, 1, ExpressionType::ColsAtCompileTime,\n                 ExpressionType::PlainObject::Options | RowMajor, 1, ExpressionType::MaxColsAtCompileTime> ArrayRowType;\n\n  typedef typename conditional<\n    is_same< typename traits<ExpressionType>::XprKind, MatrixXpr >::value,\n    MatrixRowType,\n    ArrayRowType \n  >::type type;\n};\n\ntemplate<typename ExpressionType, typename Scalar = typename ExpressionType::Scalar>\nstruct plain_col_type\n{\n  typedef Matrix<Scalar, ExpressionType::RowsAtCompileTime, 1,\n                 ExpressionType::PlainObject::Options & ~RowMajor, ExpressionType::MaxRowsAtCompileTime, 1> MatrixColType;\n  typedef Array<Scalar, ExpressionType::RowsAtCompileTime, 1,\n                 ExpressionType::PlainObject::Options & ~RowMajor, ExpressionType::MaxRowsAtCompileTime, 1> ArrayColType;\n\n  typedef typename conditional<\n    is_same< typename traits<ExpressionType>::XprKind, MatrixXpr >::value,\n    MatrixColType,\n    ArrayColType \n  >::type type;\n};\n\ntemplate<typename ExpressionType, typename Scalar = typename ExpressionType::Scalar>\nstruct plain_diag_type\n{\n  enum { diag_size = EIGEN_SIZE_MIN_PREFER_DYNAMIC(ExpressionType::RowsAtCompileTime, ExpressionType::ColsAtCompileTime),\n         max_diag_size = EIGEN_SIZE_MIN_PREFER_FIXED(ExpressionType::MaxRowsAtCompileTime, ExpressionType::MaxColsAtCompileTime)\n  };\n  typedef Matrix<Scalar, diag_size, 1, ExpressionType::PlainObject::Options & ~RowMajor, max_diag_size, 1> MatrixDiagType;\n  typedef Array<Scalar, diag_size, 1, ExpressionType::PlainObject::Options & ~RowMajor, max_diag_size, 1> ArrayDiagType;\n\n  typedef typename conditional<\n    is_same< typename traits<ExpressionType>::XprKind, MatrixXpr >::value,\n    MatrixDiagType,\n    ArrayDiagType \n  >::type type;\n};\n\ntemplate<typename Expr,typename Scalar = typename Expr::Scalar>\nstruct plain_constant_type\n{\n  enum { Options = (traits<Expr>::Flags&RowMajorBit)?RowMajor:0 };\n\n  typedef Array<Scalar,  traits<Expr>::RowsAtCompileTime,   traits<Expr>::ColsAtCompileTime,\n                Options, traits<Expr>::MaxRowsAtCompileTime,traits<Expr>::MaxColsAtCompileTime> array_type;\n\n  typedef Matrix<Scalar,  traits<Expr>::RowsAtCompileTime,   traits<Expr>::ColsAtCompileTime,\n                 Options, traits<Expr>::MaxRowsAtCompileTime,traits<Expr>::MaxColsAtCompileTime> matrix_type;\n\n  typedef CwiseNullaryOp<scalar_constant_op<Scalar>, const typename conditional<is_same< typename traits<Expr>::XprKind, MatrixXpr >::value, matrix_type, array_type>::type > type;\n};\n\ntemplate<typename ExpressionType>\nstruct is_lvalue\n{\n  enum { value = (!bool(is_const<ExpressionType>::value)) &&\n                 bool(traits<ExpressionType>::Flags & LvalueBit) };\n};\n\ntemplate<typename T> struct is_diagonal\n{ enum { ret = false }; };\n\ntemplate<typename T> struct is_diagonal<DiagonalBase<T> >\n{ enum { ret = true }; };\n\ntemplate<typename T> struct is_diagonal<DiagonalWrapper<T> >\n{ enum { ret = true }; };\n\ntemplate<typename T, int S> struct is_diagonal<DiagonalMatrix<T,S> >\n{ enum { ret = true }; };\n\n\ntemplate<typename T> struct is_identity\n{ enum { value = false }; };\n\ntemplate<typename T> struct is_identity<CwiseNullaryOp<internal::scalar_identity_op<typename T::Scalar>, T> >\n{ enum { value = true }; };\n\n\ntemplate<typename S1, typename S2> struct glue_shapes;\ntemplate<> struct glue_shapes<DenseShape,TriangularShape> { typedef TriangularShape type;  };\n\ntemplate<typename T1, typename T2>\nstruct possibly_same_dense {\n  enum { value = has_direct_access<T1>::ret && has_direct_access<T2>::ret && is_same<typename T1::Scalar,typename T2::Scalar>::value };\n};\n\ntemplate<typename T1, typename T2>\nEIGEN_DEVICE_FUNC\nbool is_same_dense(const T1 &mat1, const T2 &mat2, typename enable_if<possibly_same_dense<T1,T2>::value>::type * = 0)\n{\n  return (mat1.data()==mat2.data()) && (mat1.innerStride()==mat2.innerStride()) && (mat1.outerStride()==mat2.outerStride());\n}\n\ntemplate<typename T1, typename T2>\nEIGEN_DEVICE_FUNC\nbool is_same_dense(const T1 &, const T2 &, typename enable_if<!possibly_same_dense<T1,T2>::value>::type * = 0)\n{\n  return false;\n}\n\n// Internal helper defining the cost of a scalar division for the type T.\n// The default heuristic can be specialized for each scalar type and architecture.\ntemplate<typename T,bool Vectorized=false,typename EnableIf = void>\nstruct scalar_div_cost {\n  enum { value = 8*NumTraits<T>::MulCost };\n};\n\ntemplate<typename T,bool Vectorized>\nstruct scalar_div_cost<std::complex<T>, Vectorized> {\n  enum { value = 2*scalar_div_cost<T>::value\n               + 6*NumTraits<T>::MulCost\n               + 3*NumTraits<T>::AddCost\n  };\n};\n\n\ntemplate<bool Vectorized>\nstruct scalar_div_cost<signed long,Vectorized,typename conditional<sizeof(long)==8,void,false_type>::type> { enum { value = 24 }; };\ntemplate<bool Vectorized>\nstruct scalar_div_cost<unsigned long,Vectorized,typename conditional<sizeof(long)==8,void,false_type>::type> { enum { value = 21 }; };\n\n\n#ifdef EIGEN_DEBUG_ASSIGN\nstd::string demangle_traversal(int t)\n{\n  if(t==DefaultTraversal) return \"DefaultTraversal\";\n  if(t==LinearTraversal) return \"LinearTraversal\";\n  if(t==InnerVectorizedTraversal) return \"InnerVectorizedTraversal\";\n  if(t==LinearVectorizedTraversal) return \"LinearVectorizedTraversal\";\n  if(t==SliceVectorizedTraversal) return \"SliceVectorizedTraversal\";\n  return \"?\";\n}\nstd::string demangle_unrolling(int t)\n{\n  if(t==NoUnrolling) return \"NoUnrolling\";\n  if(t==InnerUnrolling) return \"InnerUnrolling\";\n  if(t==CompleteUnrolling) return \"CompleteUnrolling\";\n  return \"?\";\n}\nstd::string demangle_flags(int f)\n{\n  std::string res;\n  if(f&RowMajorBit)                 res += \" | RowMajor\";\n  if(f&PacketAccessBit)             res += \" | Packet\";\n  if(f&LinearAccessBit)             res += \" | Linear\";\n  if(f&LvalueBit)                   res += \" | Lvalue\";\n  if(f&DirectAccessBit)             res += \" | Direct\";\n  if(f&NestByRefBit)                res += \" | NestByRef\";\n  if(f&NoPreferredStorageOrderBit)  res += \" | NoPreferredStorageOrderBit\";\n  \n  return res;\n}\n#endif\n\n} // end namespace internal\n\n\n/** \\class ScalarBinaryOpTraits\n  * \\ingroup Core_Module\n  *\n  * \\brief Determines whether the given binary operation of two numeric types is allowed and what the scalar return type is.\n  *\n  * This class permits to control the scalar return type of any binary operation performed on two different scalar types through (partial) template specializations.\n  *\n  * For instance, let \\c U1, \\c U2 and \\c U3 be three user defined scalar types for which most operations between instances of \\c U1 and \\c U2 returns an \\c U3.\n  * You can let %Eigen knows that by defining:\n    \\code\n    template<typename BinaryOp>\n    struct ScalarBinaryOpTraits<U1,U2,BinaryOp> { typedef U3 ReturnType;  };\n    template<typename BinaryOp>\n    struct ScalarBinaryOpTraits<U2,U1,BinaryOp> { typedef U3 ReturnType;  };\n    \\endcode\n  * You can then explicitly disable some particular operations to get more explicit error messages:\n    \\code\n    template<>\n    struct ScalarBinaryOpTraits<U1,U2,internal::scalar_max_op<U1,U2> > {};\n    \\endcode\n  * Or customize the return type for individual operation:\n    \\code\n    template<>\n    struct ScalarBinaryOpTraits<U1,U2,internal::scalar_sum_op<U1,U2> > { typedef U1 ReturnType; };\n    \\endcode\n  *\n  * By default, the following generic combinations are supported:\n  <table class=\"manual\">\n  <tr><th>ScalarA</th><th>ScalarB</th><th>BinaryOp</th><th>ReturnType</th><th>Note</th></tr>\n  <tr            ><td>\\c T </td><td>\\c T </td><td>\\c * </td><td>\\c T </td><td></td></tr>\n  <tr class=\"alt\"><td>\\c NumTraits<T>::Real </td><td>\\c T </td><td>\\c * </td><td>\\c T </td><td>Only if \\c NumTraits<T>::IsComplex </td></tr>\n  <tr            ><td>\\c T </td><td>\\c NumTraits<T>::Real </td><td>\\c * </td><td>\\c T </td><td>Only if \\c NumTraits<T>::IsComplex </td></tr>\n  </table>\n  *\n  * \\sa CwiseBinaryOp\n  */\ntemplate<typename ScalarA, typename ScalarB, typename BinaryOp=internal::scalar_product_op<ScalarA,ScalarB> >\nstruct ScalarBinaryOpTraits\n#ifndef EIGEN_PARSED_BY_DOXYGEN\n  // for backward compatibility, use the hints given by the (deprecated) internal::scalar_product_traits class.\n  : internal::scalar_product_traits<ScalarA,ScalarB>\n#endif // EIGEN_PARSED_BY_DOXYGEN\n{};\n\ntemplate<typename T, typename BinaryOp>\nstruct ScalarBinaryOpTraits<T,T,BinaryOp>\n{\n  typedef T ReturnType;\n};\n\ntemplate <typename T, typename BinaryOp>\nstruct ScalarBinaryOpTraits<T, typename NumTraits<typename internal::enable_if<NumTraits<T>::IsComplex,T>::type>::Real, BinaryOp>\n{\n  typedef T ReturnType;\n};\ntemplate <typename T, typename BinaryOp>\nstruct ScalarBinaryOpTraits<typename NumTraits<typename internal::enable_if<NumTraits<T>::IsComplex,T>::type>::Real, T, BinaryOp>\n{\n  typedef T ReturnType;\n};\n\n// For Matrix * Permutation\ntemplate<typename T, typename BinaryOp>\nstruct ScalarBinaryOpTraits<T,void,BinaryOp>\n{\n  typedef T ReturnType;\n};\n\n// For Permutation * Matrix\ntemplate<typename T, typename BinaryOp>\nstruct ScalarBinaryOpTraits<void,T,BinaryOp>\n{\n  typedef T ReturnType;\n};\n\n// for Permutation*Permutation\ntemplate<typename BinaryOp>\nstruct ScalarBinaryOpTraits<void,void,BinaryOp>\n{\n  typedef void ReturnType;\n};\n\n// We require Lhs and Rhs to have \"compatible\" scalar types.\n// It is tempting to always allow mixing different types but remember that this is often impossible in the vectorized paths.\n// So allowing mixing different types gives very unexpected errors when enabling vectorization, when the user tries to\n// add together a float matrix and a double matrix.\n#define EIGEN_CHECK_BINARY_COMPATIBILIY(BINOP,LHS,RHS) \\\n  EIGEN_STATIC_ASSERT((Eigen::internal::has_ReturnType<ScalarBinaryOpTraits<LHS, RHS,BINOP> >::value), \\\n    YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)\n    \n} // end namespace Eigen\n\n#endif // EIGEN_XPRHELPER_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Eigenvalues/ComplexEigenSolver.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Claire Maurice\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2010,2012 Jitse Niesen <jitse@maths.leeds.ac.uk>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_COMPLEX_EIGEN_SOLVER_H\n#define EIGEN_COMPLEX_EIGEN_SOLVER_H\n\n#include \"./ComplexSchur.h\"\n\nnamespace Eigen { \n\n/** \\eigenvalues_module \\ingroup Eigenvalues_Module\n  *\n  *\n  * \\class ComplexEigenSolver\n  *\n  * \\brief Computes eigenvalues and eigenvectors of general complex matrices\n  *\n  * \\tparam _MatrixType the type of the matrix of which we are\n  * computing the eigendecomposition; this is expected to be an\n  * instantiation of the Matrix class template.\n  *\n  * The eigenvalues and eigenvectors of a matrix \\f$ A \\f$ are scalars\n  * \\f$ \\lambda \\f$ and vectors \\f$ v \\f$ such that \\f$ Av = \\lambda v\n  * \\f$.  If \\f$ D \\f$ is a diagonal matrix with the eigenvalues on\n  * the diagonal, and \\f$ V \\f$ is a matrix with the eigenvectors as\n  * its columns, then \\f$ A V = V D \\f$. The matrix \\f$ V \\f$ is\n  * almost always invertible, in which case we have \\f$ A = V D V^{-1}\n  * \\f$. This is called the eigendecomposition.\n  *\n  * The main function in this class is compute(), which computes the\n  * eigenvalues and eigenvectors of a given function. The\n  * documentation for that function contains an example showing the\n  * main features of the class.\n  *\n  * \\sa class EigenSolver, class SelfAdjointEigenSolver\n  */\ntemplate<typename _MatrixType> class ComplexEigenSolver\n{\n  public:\n\n    /** \\brief Synonym for the template parameter \\p _MatrixType. */\n    typedef _MatrixType MatrixType;\n\n    enum {\n      RowsAtCompileTime = MatrixType::RowsAtCompileTime,\n      ColsAtCompileTime = MatrixType::ColsAtCompileTime,\n      Options = MatrixType::Options,\n      MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime,\n      MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime\n    };\n\n    /** \\brief Scalar type for matrices of type #MatrixType. */\n    typedef typename MatrixType::Scalar Scalar;\n    typedef typename NumTraits<Scalar>::Real RealScalar;\n    typedef Eigen::Index Index; ///< \\deprecated since Eigen 3.3\n\n    /** \\brief Complex scalar type for #MatrixType.\n      *\n      * This is \\c std::complex<Scalar> if #Scalar is real (e.g.,\n      * \\c float or \\c double) and just \\c Scalar if #Scalar is\n      * complex.\n      */\n    typedef std::complex<RealScalar> ComplexScalar;\n\n    /** \\brief Type for vector of eigenvalues as returned by eigenvalues().\n      *\n      * This is a column vector with entries of type #ComplexScalar.\n      * The length of the vector is the size of #MatrixType.\n      */\n    typedef Matrix<ComplexScalar, ColsAtCompileTime, 1, Options&(~RowMajor), MaxColsAtCompileTime, 1> EigenvalueType;\n\n    /** \\brief Type for matrix of eigenvectors as returned by eigenvectors().\n      *\n      * This is a square matrix with entries of type #ComplexScalar.\n      * The size is the same as the size of #MatrixType.\n      */\n    typedef Matrix<ComplexScalar, RowsAtCompileTime, ColsAtCompileTime, Options, MaxRowsAtCompileTime, MaxColsAtCompileTime> EigenvectorType;\n\n    /** \\brief Default constructor.\n      *\n      * The default constructor is useful in cases in which the user intends to\n      * perform decompositions via compute().\n      */\n    ComplexEigenSolver()\n            : m_eivec(),\n              m_eivalues(),\n              m_schur(),\n              m_isInitialized(false),\n              m_eigenvectorsOk(false),\n              m_matX()\n    {}\n\n    /** \\brief Default Constructor with memory preallocation\n      *\n      * Like the default constructor but with preallocation of the internal data\n      * according to the specified problem \\a size.\n      * \\sa ComplexEigenSolver()\n      */\n    explicit ComplexEigenSolver(Index size)\n            : m_eivec(size, size),\n              m_eivalues(size),\n              m_schur(size),\n              m_isInitialized(false),\n              m_eigenvectorsOk(false),\n              m_matX(size, size)\n    {}\n\n    /** \\brief Constructor; computes eigendecomposition of given matrix.\n      *\n      * \\param[in]  matrix  Square matrix whose eigendecomposition is to be computed.\n      * \\param[in]  computeEigenvectors  If true, both the eigenvectors and the\n      *    eigenvalues are computed; if false, only the eigenvalues are\n      *    computed.\n      *\n      * This constructor calls compute() to compute the eigendecomposition.\n      */\n    template<typename InputType>\n    explicit ComplexEigenSolver(const EigenBase<InputType>& matrix, bool computeEigenvectors = true)\n            : m_eivec(matrix.rows(),matrix.cols()),\n              m_eivalues(matrix.cols()),\n              m_schur(matrix.rows()),\n              m_isInitialized(false),\n              m_eigenvectorsOk(false),\n              m_matX(matrix.rows(),matrix.cols())\n    {\n      compute(matrix.derived(), computeEigenvectors);\n    }\n\n    /** \\brief Returns the eigenvectors of given matrix.\n      *\n      * \\returns  A const reference to the matrix whose columns are the eigenvectors.\n      *\n      * \\pre Either the constructor\n      * ComplexEigenSolver(const MatrixType& matrix, bool) or the member\n      * function compute(const MatrixType& matrix, bool) has been called before\n      * to compute the eigendecomposition of a matrix, and\n      * \\p computeEigenvectors was set to true (the default).\n      *\n      * This function returns a matrix whose columns are the eigenvectors. Column\n      * \\f$ k \\f$ is an eigenvector corresponding to eigenvalue number \\f$ k\n      * \\f$ as returned by eigenvalues().  The eigenvectors are normalized to\n      * have (Euclidean) norm equal to one. The matrix returned by this\n      * function is the matrix \\f$ V \\f$ in the eigendecomposition \\f$ A = V D\n      * V^{-1} \\f$, if it exists.\n      *\n      * Example: \\include ComplexEigenSolver_eigenvectors.cpp\n      * Output: \\verbinclude ComplexEigenSolver_eigenvectors.out\n      */\n    const EigenvectorType& eigenvectors() const\n    {\n      eigen_assert(m_isInitialized && \"ComplexEigenSolver is not initialized.\");\n      eigen_assert(m_eigenvectorsOk && \"The eigenvectors have not been computed together with the eigenvalues.\");\n      return m_eivec;\n    }\n\n    /** \\brief Returns the eigenvalues of given matrix.\n      *\n      * \\returns A const reference to the column vector containing the eigenvalues.\n      *\n      * \\pre Either the constructor\n      * ComplexEigenSolver(const MatrixType& matrix, bool) or the member\n      * function compute(const MatrixType& matrix, bool) has been called before\n      * to compute the eigendecomposition of a matrix.\n      *\n      * This function returns a column vector containing the\n      * eigenvalues. Eigenvalues are repeated according to their\n      * algebraic multiplicity, so there are as many eigenvalues as\n      * rows in the matrix. The eigenvalues are not sorted in any particular\n      * order.\n      *\n      * Example: \\include ComplexEigenSolver_eigenvalues.cpp\n      * Output: \\verbinclude ComplexEigenSolver_eigenvalues.out\n      */\n    const EigenvalueType& eigenvalues() const\n    {\n      eigen_assert(m_isInitialized && \"ComplexEigenSolver is not initialized.\");\n      return m_eivalues;\n    }\n\n    /** \\brief Computes eigendecomposition of given matrix.\n      *\n      * \\param[in]  matrix  Square matrix whose eigendecomposition is to be computed.\n      * \\param[in]  computeEigenvectors  If true, both the eigenvectors and the\n      *    eigenvalues are computed; if false, only the eigenvalues are\n      *    computed.\n      * \\returns    Reference to \\c *this\n      *\n      * This function computes the eigenvalues of the complex matrix \\p matrix.\n      * The eigenvalues() function can be used to retrieve them.  If\n      * \\p computeEigenvectors is true, then the eigenvectors are also computed\n      * and can be retrieved by calling eigenvectors().\n      *\n      * The matrix is first reduced to Schur form using the\n      * ComplexSchur class. The Schur decomposition is then used to\n      * compute the eigenvalues and eigenvectors.\n      *\n      * The cost of the computation is dominated by the cost of the\n      * Schur decomposition, which is \\f$ O(n^3) \\f$ where \\f$ n \\f$\n      * is the size of the matrix.\n      *\n      * Example: \\include ComplexEigenSolver_compute.cpp\n      * Output: \\verbinclude ComplexEigenSolver_compute.out\n      */\n    template<typename InputType>\n    ComplexEigenSolver& compute(const EigenBase<InputType>& matrix, bool computeEigenvectors = true);\n\n    /** \\brief Reports whether previous computation was successful.\n      *\n      * \\returns \\c Success if computation was successful, \\c NoConvergence otherwise.\n      */\n    ComputationInfo info() const\n    {\n      eigen_assert(m_isInitialized && \"ComplexEigenSolver is not initialized.\");\n      return m_schur.info();\n    }\n\n    /** \\brief Sets the maximum number of iterations allowed. */\n    ComplexEigenSolver& setMaxIterations(Index maxIters)\n    {\n      m_schur.setMaxIterations(maxIters);\n      return *this;\n    }\n\n    /** \\brief Returns the maximum number of iterations. */\n    Index getMaxIterations()\n    {\n      return m_schur.getMaxIterations();\n    }\n\n  protected:\n    \n    static void check_template_parameters()\n    {\n      EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar);\n    }\n    \n    EigenvectorType m_eivec;\n    EigenvalueType m_eivalues;\n    ComplexSchur<MatrixType> m_schur;\n    bool m_isInitialized;\n    bool m_eigenvectorsOk;\n    EigenvectorType m_matX;\n\n  private:\n    void doComputeEigenvectors(RealScalar matrixnorm);\n    void sortEigenvalues(bool computeEigenvectors);\n};\n\n\ntemplate<typename MatrixType>\ntemplate<typename InputType>\nComplexEigenSolver<MatrixType>& \nComplexEigenSolver<MatrixType>::compute(const EigenBase<InputType>& matrix, bool computeEigenvectors)\n{\n  check_template_parameters();\n  \n  // this code is inspired from Jampack\n  eigen_assert(matrix.cols() == matrix.rows());\n\n  // Do a complex Schur decomposition, A = U T U^*\n  // The eigenvalues are on the diagonal of T.\n  m_schur.compute(matrix.derived(), computeEigenvectors);\n\n  if(m_schur.info() == Success)\n  {\n    m_eivalues = m_schur.matrixT().diagonal();\n    if(computeEigenvectors)\n      doComputeEigenvectors(m_schur.matrixT().norm());\n    sortEigenvalues(computeEigenvectors);\n  }\n\n  m_isInitialized = true;\n  m_eigenvectorsOk = computeEigenvectors;\n  return *this;\n}\n\n\ntemplate<typename MatrixType>\nvoid ComplexEigenSolver<MatrixType>::doComputeEigenvectors(RealScalar matrixnorm)\n{\n  const Index n = m_eivalues.size();\n\n  matrixnorm = numext::maxi(matrixnorm,(std::numeric_limits<RealScalar>::min)());\n\n  // Compute X such that T = X D X^(-1), where D is the diagonal of T.\n  // The matrix X is unit triangular.\n  m_matX = EigenvectorType::Zero(n, n);\n  for(Index k=n-1 ; k>=0 ; k--)\n  {\n    m_matX.coeffRef(k,k) = ComplexScalar(1.0,0.0);\n    // Compute X(i,k) using the (i,k) entry of the equation X T = D X\n    for(Index i=k-1 ; i>=0 ; i--)\n    {\n      m_matX.coeffRef(i,k) = -m_schur.matrixT().coeff(i,k);\n      if(k-i-1>0)\n        m_matX.coeffRef(i,k) -= (m_schur.matrixT().row(i).segment(i+1,k-i-1) * m_matX.col(k).segment(i+1,k-i-1)).value();\n      ComplexScalar z = m_schur.matrixT().coeff(i,i) - m_schur.matrixT().coeff(k,k);\n      if(z==ComplexScalar(0))\n      {\n        // If the i-th and k-th eigenvalue are equal, then z equals 0.\n        // Use a small value instead, to prevent division by zero.\n        numext::real_ref(z) = NumTraits<RealScalar>::epsilon() * matrixnorm;\n      }\n      m_matX.coeffRef(i,k) = m_matX.coeff(i,k) / z;\n    }\n  }\n\n  // Compute V as V = U X; now A = U T U^* = U X D X^(-1) U^* = V D V^(-1)\n  m_eivec.noalias() = m_schur.matrixU() * m_matX;\n  // .. and normalize the eigenvectors\n  for(Index k=0 ; k<n ; k++)\n  {\n    m_eivec.col(k).normalize();\n  }\n}\n\n\ntemplate<typename MatrixType>\nvoid ComplexEigenSolver<MatrixType>::sortEigenvalues(bool computeEigenvectors)\n{\n  const Index n =  m_eivalues.size();\n  for (Index i=0; i<n; i++)\n  {\n    Index k;\n    m_eivalues.cwiseAbs().tail(n-i).minCoeff(&k);\n    if (k != 0)\n    {\n      k += i;\n      std::swap(m_eivalues[k],m_eivalues[i]);\n      if(computeEigenvectors)\n\tm_eivec.col(i).swap(m_eivec.col(k));\n    }\n  }\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_COMPLEX_EIGEN_SOLVER_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Eigenvalues/ComplexSchur.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Claire Maurice\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2010,2012 Jitse Niesen <jitse@maths.leeds.ac.uk>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_COMPLEX_SCHUR_H\n#define EIGEN_COMPLEX_SCHUR_H\n\n#include \"./HessenbergDecomposition.h\"\n\nnamespace Eigen { \n\nnamespace internal {\ntemplate<typename MatrixType, bool IsComplex> struct complex_schur_reduce_to_hessenberg;\n}\n\n/** \\eigenvalues_module \\ingroup Eigenvalues_Module\n  *\n  *\n  * \\class ComplexSchur\n  *\n  * \\brief Performs a complex Schur decomposition of a real or complex square matrix\n  *\n  * \\tparam _MatrixType the type of the matrix of which we are\n  * computing the Schur decomposition; this is expected to be an\n  * instantiation of the Matrix class template.\n  *\n  * Given a real or complex square matrix A, this class computes the\n  * Schur decomposition: \\f$ A = U T U^*\\f$ where U is a unitary\n  * complex matrix, and T is a complex upper triangular matrix.  The\n  * diagonal of the matrix T corresponds to the eigenvalues of the\n  * matrix A.\n  *\n  * Call the function compute() to compute the Schur decomposition of\n  * a given matrix. Alternatively, you can use the \n  * ComplexSchur(const MatrixType&, bool) constructor which computes\n  * the Schur decomposition at construction time. Once the\n  * decomposition is computed, you can use the matrixU() and matrixT()\n  * functions to retrieve the matrices U and V in the decomposition.\n  *\n  * \\note This code is inspired from Jampack\n  *\n  * \\sa class RealSchur, class EigenSolver, class ComplexEigenSolver\n  */\ntemplate<typename _MatrixType> class ComplexSchur\n{\n  public:\n    typedef _MatrixType MatrixType;\n    enum {\n      RowsAtCompileTime = MatrixType::RowsAtCompileTime,\n      ColsAtCompileTime = MatrixType::ColsAtCompileTime,\n      Options = MatrixType::Options,\n      MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime,\n      MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime\n    };\n\n    /** \\brief Scalar type for matrices of type \\p _MatrixType. */\n    typedef typename MatrixType::Scalar Scalar;\n    typedef typename NumTraits<Scalar>::Real RealScalar;\n    typedef Eigen::Index Index; ///< \\deprecated since Eigen 3.3\n\n    /** \\brief Complex scalar type for \\p _MatrixType. \n      *\n      * This is \\c std::complex<Scalar> if #Scalar is real (e.g.,\n      * \\c float or \\c double) and just \\c Scalar if #Scalar is\n      * complex.\n      */\n    typedef std::complex<RealScalar> ComplexScalar;\n\n    /** \\brief Type for the matrices in the Schur decomposition.\n      *\n      * This is a square matrix with entries of type #ComplexScalar. \n      * The size is the same as the size of \\p _MatrixType.\n      */\n    typedef Matrix<ComplexScalar, RowsAtCompileTime, ColsAtCompileTime, Options, MaxRowsAtCompileTime, MaxColsAtCompileTime> ComplexMatrixType;\n\n    /** \\brief Default constructor.\n      *\n      * \\param [in] size  Positive integer, size of the matrix whose Schur decomposition will be computed.\n      *\n      * The default constructor is useful in cases in which the user\n      * intends to perform decompositions via compute().  The \\p size\n      * parameter is only used as a hint. It is not an error to give a\n      * wrong \\p size, but it may impair performance.\n      *\n      * \\sa compute() for an example.\n      */\n    explicit ComplexSchur(Index size = RowsAtCompileTime==Dynamic ? 1 : RowsAtCompileTime)\n      : m_matT(size,size),\n        m_matU(size,size),\n        m_hess(size),\n        m_isInitialized(false),\n        m_matUisUptodate(false),\n        m_maxIters(-1)\n    {}\n\n    /** \\brief Constructor; computes Schur decomposition of given matrix. \n      * \n      * \\param[in]  matrix    Square matrix whose Schur decomposition is to be computed.\n      * \\param[in]  computeU  If true, both T and U are computed; if false, only T is computed.\n      *\n      * This constructor calls compute() to compute the Schur decomposition.\n      *\n      * \\sa matrixT() and matrixU() for examples.\n      */\n    template<typename InputType>\n    explicit ComplexSchur(const EigenBase<InputType>& matrix, bool computeU = true)\n      : m_matT(matrix.rows(),matrix.cols()),\n        m_matU(matrix.rows(),matrix.cols()),\n        m_hess(matrix.rows()),\n        m_isInitialized(false),\n        m_matUisUptodate(false),\n        m_maxIters(-1)\n    {\n      compute(matrix.derived(), computeU);\n    }\n\n    /** \\brief Returns the unitary matrix in the Schur decomposition. \n      *\n      * \\returns A const reference to the matrix U.\n      *\n      * It is assumed that either the constructor\n      * ComplexSchur(const MatrixType& matrix, bool computeU) or the\n      * member function compute(const MatrixType& matrix, bool computeU)\n      * has been called before to compute the Schur decomposition of a\n      * matrix, and that \\p computeU was set to true (the default\n      * value).\n      *\n      * Example: \\include ComplexSchur_matrixU.cpp\n      * Output: \\verbinclude ComplexSchur_matrixU.out\n      */\n    const ComplexMatrixType& matrixU() const\n    {\n      eigen_assert(m_isInitialized && \"ComplexSchur is not initialized.\");\n      eigen_assert(m_matUisUptodate && \"The matrix U has not been computed during the ComplexSchur decomposition.\");\n      return m_matU;\n    }\n\n    /** \\brief Returns the triangular matrix in the Schur decomposition. \n      *\n      * \\returns A const reference to the matrix T.\n      *\n      * It is assumed that either the constructor\n      * ComplexSchur(const MatrixType& matrix, bool computeU) or the\n      * member function compute(const MatrixType& matrix, bool computeU)\n      * has been called before to compute the Schur decomposition of a\n      * matrix.\n      *\n      * Note that this function returns a plain square matrix. If you want to reference\n      * only the upper triangular part, use:\n      * \\code schur.matrixT().triangularView<Upper>() \\endcode \n      *\n      * Example: \\include ComplexSchur_matrixT.cpp\n      * Output: \\verbinclude ComplexSchur_matrixT.out\n      */\n    const ComplexMatrixType& matrixT() const\n    {\n      eigen_assert(m_isInitialized && \"ComplexSchur is not initialized.\");\n      return m_matT;\n    }\n\n    /** \\brief Computes Schur decomposition of given matrix. \n      * \n      * \\param[in]  matrix  Square matrix whose Schur decomposition is to be computed.\n      * \\param[in]  computeU  If true, both T and U are computed; if false, only T is computed.\n\n      * \\returns    Reference to \\c *this\n      *\n      * The Schur decomposition is computed by first reducing the\n      * matrix to Hessenberg form using the class\n      * HessenbergDecomposition. The Hessenberg matrix is then reduced\n      * to triangular form by performing QR iterations with a single\n      * shift. The cost of computing the Schur decomposition depends\n      * on the number of iterations; as a rough guide, it may be taken\n      * on the number of iterations; as a rough guide, it may be taken\n      * to be \\f$25n^3\\f$ complex flops, or \\f$10n^3\\f$ complex flops\n      * if \\a computeU is false.\n      *\n      * Example: \\include ComplexSchur_compute.cpp\n      * Output: \\verbinclude ComplexSchur_compute.out\n      *\n      * \\sa compute(const MatrixType&, bool, Index)\n      */\n    template<typename InputType>\n    ComplexSchur& compute(const EigenBase<InputType>& matrix, bool computeU = true);\n    \n    /** \\brief Compute Schur decomposition from a given Hessenberg matrix\n     *  \\param[in] matrixH Matrix in Hessenberg form H\n     *  \\param[in] matrixQ orthogonal matrix Q that transform a matrix A to H : A = Q H Q^T\n     *  \\param computeU Computes the matriX U of the Schur vectors\n     * \\return Reference to \\c *this\n     * \n     *  This routine assumes that the matrix is already reduced in Hessenberg form matrixH\n     *  using either the class HessenbergDecomposition or another mean. \n     *  It computes the upper quasi-triangular matrix T of the Schur decomposition of H\n     *  When computeU is true, this routine computes the matrix U such that \n     *  A = U T U^T =  (QZ) T (QZ)^T = Q H Q^T where A is the initial matrix\n     * \n     * NOTE Q is referenced if computeU is true; so, if the initial orthogonal matrix\n     * is not available, the user should give an identity matrix (Q.setIdentity())\n     * \n     * \\sa compute(const MatrixType&, bool)\n     */\n    template<typename HessMatrixType, typename OrthMatrixType>\n    ComplexSchur& computeFromHessenberg(const HessMatrixType& matrixH, const OrthMatrixType& matrixQ,  bool computeU=true);\n\n    /** \\brief Reports whether previous computation was successful.\n      *\n      * \\returns \\c Success if computation was successful, \\c NoConvergence otherwise.\n      */\n    ComputationInfo info() const\n    {\n      eigen_assert(m_isInitialized && \"ComplexSchur is not initialized.\");\n      return m_info;\n    }\n\n    /** \\brief Sets the maximum number of iterations allowed. \n      *\n      * If not specified by the user, the maximum number of iterations is m_maxIterationsPerRow times the size\n      * of the matrix.\n      */\n    ComplexSchur& setMaxIterations(Index maxIters)\n    {\n      m_maxIters = maxIters;\n      return *this;\n    }\n\n    /** \\brief Returns the maximum number of iterations. */\n    Index getMaxIterations()\n    {\n      return m_maxIters;\n    }\n\n    /** \\brief Maximum number of iterations per row.\n      *\n      * If not otherwise specified, the maximum number of iterations is this number times the size of the\n      * matrix. It is currently set to 30.\n      */\n    static const int m_maxIterationsPerRow = 30;\n\n  protected:\n    ComplexMatrixType m_matT, m_matU;\n    HessenbergDecomposition<MatrixType> m_hess;\n    ComputationInfo m_info;\n    bool m_isInitialized;\n    bool m_matUisUptodate;\n    Index m_maxIters;\n\n  private:  \n    bool subdiagonalEntryIsNeglegible(Index i);\n    ComplexScalar computeShift(Index iu, Index iter);\n    void reduceToTriangularForm(bool computeU);\n    friend struct internal::complex_schur_reduce_to_hessenberg<MatrixType, NumTraits<Scalar>::IsComplex>;\n};\n\n/** If m_matT(i+1,i) is neglegible in floating point arithmetic\n  * compared to m_matT(i,i) and m_matT(j,j), then set it to zero and\n  * return true, else return false. */\ntemplate<typename MatrixType>\ninline bool ComplexSchur<MatrixType>::subdiagonalEntryIsNeglegible(Index i)\n{\n  RealScalar d = numext::norm1(m_matT.coeff(i,i)) + numext::norm1(m_matT.coeff(i+1,i+1));\n  RealScalar sd = numext::norm1(m_matT.coeff(i+1,i));\n  if (internal::isMuchSmallerThan(sd, d, NumTraits<RealScalar>::epsilon()))\n  {\n    m_matT.coeffRef(i+1,i) = ComplexScalar(0);\n    return true;\n  }\n  return false;\n}\n\n\n/** Compute the shift in the current QR iteration. */\ntemplate<typename MatrixType>\ntypename ComplexSchur<MatrixType>::ComplexScalar ComplexSchur<MatrixType>::computeShift(Index iu, Index iter)\n{\n  using std::abs;\n  if (iter == 10 || iter == 20) \n  {\n    // exceptional shift, taken from http://www.netlib.org/eispack/comqr.f\n    return abs(numext::real(m_matT.coeff(iu,iu-1))) + abs(numext::real(m_matT.coeff(iu-1,iu-2)));\n  }\n\n  // compute the shift as one of the eigenvalues of t, the 2x2\n  // diagonal block on the bottom of the active submatrix\n  Matrix<ComplexScalar,2,2> t = m_matT.template block<2,2>(iu-1,iu-1);\n  RealScalar normt = t.cwiseAbs().sum();\n  t /= normt;     // the normalization by sf is to avoid under/overflow\n\n  ComplexScalar b = t.coeff(0,1) * t.coeff(1,0);\n  ComplexScalar c = t.coeff(0,0) - t.coeff(1,1);\n  ComplexScalar disc = sqrt(c*c + RealScalar(4)*b);\n  ComplexScalar det = t.coeff(0,0) * t.coeff(1,1) - b;\n  ComplexScalar trace = t.coeff(0,0) + t.coeff(1,1);\n  ComplexScalar eival1 = (trace + disc) / RealScalar(2);\n  ComplexScalar eival2 = (trace - disc) / RealScalar(2);\n  RealScalar eival1_norm = numext::norm1(eival1);\n  RealScalar eival2_norm = numext::norm1(eival2);\n  // A division by zero can only occur if eival1==eival2==0.\n  // In this case, det==0, and all we have to do is checking that eival2_norm!=0\n  if(eival1_norm > eival2_norm)\n    eival2 = det / eival1;\n  else if(eival2_norm!=RealScalar(0))\n    eival1 = det / eival2;\n\n  // choose the eigenvalue closest to the bottom entry of the diagonal\n  if(numext::norm1(eival1-t.coeff(1,1)) < numext::norm1(eival2-t.coeff(1,1)))\n    return normt * eival1;\n  else\n    return normt * eival2;\n}\n\n\ntemplate<typename MatrixType>\ntemplate<typename InputType>\nComplexSchur<MatrixType>& ComplexSchur<MatrixType>::compute(const EigenBase<InputType>& matrix, bool computeU)\n{\n  m_matUisUptodate = false;\n  eigen_assert(matrix.cols() == matrix.rows());\n\n  if(matrix.cols() == 1)\n  {\n    m_matT = matrix.derived().template cast<ComplexScalar>();\n    if(computeU)  m_matU = ComplexMatrixType::Identity(1,1);\n    m_info = Success;\n    m_isInitialized = true;\n    m_matUisUptodate = computeU;\n    return *this;\n  }\n\n  internal::complex_schur_reduce_to_hessenberg<MatrixType, NumTraits<Scalar>::IsComplex>::run(*this, matrix.derived(), computeU);\n  computeFromHessenberg(m_matT, m_matU, computeU);\n  return *this;\n}\n\ntemplate<typename MatrixType>\ntemplate<typename HessMatrixType, typename OrthMatrixType>\nComplexSchur<MatrixType>& ComplexSchur<MatrixType>::computeFromHessenberg(const HessMatrixType& matrixH, const OrthMatrixType& matrixQ, bool computeU)\n{\n  m_matT = matrixH;\n  if(computeU)\n    m_matU = matrixQ;\n  reduceToTriangularForm(computeU);\n  return *this;\n}\nnamespace internal {\n\n/* Reduce given matrix to Hessenberg form */\ntemplate<typename MatrixType, bool IsComplex>\nstruct complex_schur_reduce_to_hessenberg\n{\n  // this is the implementation for the case IsComplex = true\n  static void run(ComplexSchur<MatrixType>& _this, const MatrixType& matrix, bool computeU)\n  {\n    _this.m_hess.compute(matrix);\n    _this.m_matT = _this.m_hess.matrixH();\n    if(computeU)  _this.m_matU = _this.m_hess.matrixQ();\n  }\n};\n\ntemplate<typename MatrixType>\nstruct complex_schur_reduce_to_hessenberg<MatrixType, false>\n{\n  static void run(ComplexSchur<MatrixType>& _this, const MatrixType& matrix, bool computeU)\n  {\n    typedef typename ComplexSchur<MatrixType>::ComplexScalar ComplexScalar;\n\n    // Note: m_hess is over RealScalar; m_matT and m_matU is over ComplexScalar\n    _this.m_hess.compute(matrix);\n    _this.m_matT = _this.m_hess.matrixH().template cast<ComplexScalar>();\n    if(computeU)  \n    {\n      // This may cause an allocation which seems to be avoidable\n      MatrixType Q = _this.m_hess.matrixQ(); \n      _this.m_matU = Q.template cast<ComplexScalar>();\n    }\n  }\n};\n\n} // end namespace internal\n\n// Reduce the Hessenberg matrix m_matT to triangular form by QR iteration.\ntemplate<typename MatrixType>\nvoid ComplexSchur<MatrixType>::reduceToTriangularForm(bool computeU)\n{  \n  Index maxIters = m_maxIters;\n  if (maxIters == -1)\n    maxIters = m_maxIterationsPerRow * m_matT.rows();\n\n  // The matrix m_matT is divided in three parts. \n  // Rows 0,...,il-1 are decoupled from the rest because m_matT(il,il-1) is zero. \n  // Rows il,...,iu is the part we are working on (the active submatrix).\n  // Rows iu+1,...,end are already brought in triangular form.\n  Index iu = m_matT.cols() - 1;\n  Index il;\n  Index iter = 0; // number of iterations we are working on the (iu,iu) element\n  Index totalIter = 0; // number of iterations for whole matrix\n\n  while(true)\n  {\n    // find iu, the bottom row of the active submatrix\n    while(iu > 0)\n    {\n      if(!subdiagonalEntryIsNeglegible(iu-1)) break;\n      iter = 0;\n      --iu;\n    }\n\n    // if iu is zero then we are done; the whole matrix is triangularized\n    if(iu==0) break;\n\n    // if we spent too many iterations, we give up\n    iter++;\n    totalIter++;\n    if(totalIter > maxIters) break;\n\n    // find il, the top row of the active submatrix\n    il = iu-1;\n    while(il > 0 && !subdiagonalEntryIsNeglegible(il-1))\n    {\n      --il;\n    }\n\n    /* perform the QR step using Givens rotations. The first rotation\n       creates a bulge; the (il+2,il) element becomes nonzero. This\n       bulge is chased down to the bottom of the active submatrix. */\n\n    ComplexScalar shift = computeShift(iu, iter);\n    JacobiRotation<ComplexScalar> rot;\n    rot.makeGivens(m_matT.coeff(il,il) - shift, m_matT.coeff(il+1,il));\n    m_matT.rightCols(m_matT.cols()-il).applyOnTheLeft(il, il+1, rot.adjoint());\n    m_matT.topRows((std::min)(il+2,iu)+1).applyOnTheRight(il, il+1, rot);\n    if(computeU) m_matU.applyOnTheRight(il, il+1, rot);\n\n    for(Index i=il+1 ; i<iu ; i++)\n    {\n      rot.makeGivens(m_matT.coeffRef(i,i-1), m_matT.coeffRef(i+1,i-1), &m_matT.coeffRef(i,i-1));\n      m_matT.coeffRef(i+1,i-1) = ComplexScalar(0);\n      m_matT.rightCols(m_matT.cols()-i).applyOnTheLeft(i, i+1, rot.adjoint());\n      m_matT.topRows((std::min)(i+2,iu)+1).applyOnTheRight(i, i+1, rot);\n      if(computeU) m_matU.applyOnTheRight(i, i+1, rot);\n    }\n  }\n\n  if(totalIter <= maxIters)\n    m_info = Success;\n  else\n    m_info = NoConvergence;\n\n  m_isInitialized = true;\n  m_matUisUptodate = computeU;\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_COMPLEX_SCHUR_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Eigenvalues/ComplexSchur_LAPACKE.h",
    "content": "/*\n Copyright (c) 2011, Intel Corporation. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without modification,\n are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n   list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n * Neither the name of Intel Corporation nor the names of its contributors may\n   be used to endorse or promote products derived from this software without\n   specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\n ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n ********************************************************************************\n *   Content : Eigen bindings to LAPACKe\n *    Complex Schur needed to complex unsymmetrical eigenvalues/eigenvectors.\n ********************************************************************************\n*/\n\n#ifndef EIGEN_COMPLEX_SCHUR_LAPACKE_H\n#define EIGEN_COMPLEX_SCHUR_LAPACKE_H\n\nnamespace Eigen { \n\n/** \\internal Specialization for the data types supported by LAPACKe */\n\n#define EIGEN_LAPACKE_SCHUR_COMPLEX(EIGTYPE, LAPACKE_TYPE, LAPACKE_PREFIX, LAPACKE_PREFIX_U, EIGCOLROW, LAPACKE_COLROW) \\\ntemplate<> template<typename InputType> inline \\\nComplexSchur<Matrix<EIGTYPE, Dynamic, Dynamic, EIGCOLROW> >& \\\nComplexSchur<Matrix<EIGTYPE, Dynamic, Dynamic, EIGCOLROW> >::compute(const EigenBase<InputType>& matrix, bool computeU) \\\n{ \\\n  typedef Matrix<EIGTYPE, Dynamic, Dynamic, EIGCOLROW> MatrixType; \\\n  typedef MatrixType::RealScalar RealScalar; \\\n  typedef std::complex<RealScalar> ComplexScalar; \\\n\\\n  eigen_assert(matrix.cols() == matrix.rows()); \\\n\\\n  m_matUisUptodate = false; \\\n  if(matrix.cols() == 1) \\\n  { \\\n    m_matT = matrix.derived().template cast<ComplexScalar>(); \\\n    if(computeU)  m_matU = ComplexMatrixType::Identity(1,1); \\\n      m_info = Success; \\\n      m_isInitialized = true; \\\n      m_matUisUptodate = computeU; \\\n      return *this; \\\n  } \\\n  lapack_int n = internal::convert_index<lapack_int>(matrix.cols()), sdim, info; \\\n  lapack_int matrix_order = LAPACKE_COLROW; \\\n  char jobvs, sort='N'; \\\n  LAPACK_##LAPACKE_PREFIX_U##_SELECT1 select = 0; \\\n  jobvs = (computeU) ? 'V' : 'N'; \\\n  m_matU.resize(n, n); \\\n  lapack_int ldvs  = internal::convert_index<lapack_int>(m_matU.outerStride()); \\\n  m_matT = matrix; \\\n  lapack_int lda = internal::convert_index<lapack_int>(m_matT.outerStride()); \\\n  Matrix<EIGTYPE, Dynamic, Dynamic> w; \\\n  w.resize(n, 1);\\\n  info = LAPACKE_##LAPACKE_PREFIX##gees( matrix_order, jobvs, sort, select, n, (LAPACKE_TYPE*)m_matT.data(), lda, &sdim, (LAPACKE_TYPE*)w.data(), (LAPACKE_TYPE*)m_matU.data(), ldvs ); \\\n  if(info == 0) \\\n    m_info = Success; \\\n  else \\\n    m_info = NoConvergence; \\\n\\\n  m_isInitialized = true; \\\n  m_matUisUptodate = computeU; \\\n  return *this; \\\n\\\n}\n\nEIGEN_LAPACKE_SCHUR_COMPLEX(dcomplex, lapack_complex_double, z, Z, ColMajor, LAPACK_COL_MAJOR)\nEIGEN_LAPACKE_SCHUR_COMPLEX(scomplex, lapack_complex_float,  c, C, ColMajor, LAPACK_COL_MAJOR)\nEIGEN_LAPACKE_SCHUR_COMPLEX(dcomplex, lapack_complex_double, z, Z, RowMajor, LAPACK_ROW_MAJOR)\nEIGEN_LAPACKE_SCHUR_COMPLEX(scomplex, lapack_complex_float,  c, C, RowMajor, LAPACK_ROW_MAJOR)\n\n} // end namespace Eigen\n\n#endif // EIGEN_COMPLEX_SCHUR_LAPACKE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Eigenvalues/EigenSolver.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2010,2012 Jitse Niesen <jitse@maths.leeds.ac.uk>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_EIGENSOLVER_H\n#define EIGEN_EIGENSOLVER_H\n\n#include \"./RealSchur.h\"\n\nnamespace Eigen { \n\n/** \\eigenvalues_module \\ingroup Eigenvalues_Module\n  *\n  *\n  * \\class EigenSolver\n  *\n  * \\brief Computes eigenvalues and eigenvectors of general matrices\n  *\n  * \\tparam _MatrixType the type of the matrix of which we are computing the\n  * eigendecomposition; this is expected to be an instantiation of the Matrix\n  * class template. Currently, only real matrices are supported.\n  *\n  * The eigenvalues and eigenvectors of a matrix \\f$ A \\f$ are scalars\n  * \\f$ \\lambda \\f$ and vectors \\f$ v \\f$ such that \\f$ Av = \\lambda v \\f$.  If\n  * \\f$ D \\f$ is a diagonal matrix with the eigenvalues on the diagonal, and\n  * \\f$ V \\f$ is a matrix with the eigenvectors as its columns, then \\f$ A V =\n  * V D \\f$. The matrix \\f$ V \\f$ is almost always invertible, in which case we\n  * have \\f$ A = V D V^{-1} \\f$. This is called the eigendecomposition.\n  *\n  * The eigenvalues and eigenvectors of a matrix may be complex, even when the\n  * matrix is real. However, we can choose real matrices \\f$ V \\f$ and \\f$ D\n  * \\f$ satisfying \\f$ A V = V D \\f$, just like the eigendecomposition, if the\n  * matrix \\f$ D \\f$ is not required to be diagonal, but if it is allowed to\n  * have blocks of the form\n  * \\f[ \\begin{bmatrix} u & v \\\\ -v & u \\end{bmatrix} \\f]\n  * (where \\f$ u \\f$ and \\f$ v \\f$ are real numbers) on the diagonal.  These\n  * blocks correspond to complex eigenvalue pairs \\f$ u \\pm iv \\f$. We call\n  * this variant of the eigendecomposition the pseudo-eigendecomposition.\n  *\n  * Call the function compute() to compute the eigenvalues and eigenvectors of\n  * a given matrix. Alternatively, you can use the \n  * EigenSolver(const MatrixType&, bool) constructor which computes the\n  * eigenvalues and eigenvectors at construction time. Once the eigenvalue and\n  * eigenvectors are computed, they can be retrieved with the eigenvalues() and\n  * eigenvectors() functions. The pseudoEigenvalueMatrix() and\n  * pseudoEigenvectors() methods allow the construction of the\n  * pseudo-eigendecomposition.\n  *\n  * The documentation for EigenSolver(const MatrixType&, bool) contains an\n  * example of the typical use of this class.\n  *\n  * \\note The implementation is adapted from\n  * <a href=\"http://math.nist.gov/javanumerics/jama/\">JAMA</a> (public domain).\n  * Their code is based on EISPACK.\n  *\n  * \\sa MatrixBase::eigenvalues(), class ComplexEigenSolver, class SelfAdjointEigenSolver\n  */\ntemplate<typename _MatrixType> class EigenSolver\n{\n  public:\n\n    /** \\brief Synonym for the template parameter \\p _MatrixType. */\n    typedef _MatrixType MatrixType;\n\n    enum {\n      RowsAtCompileTime = MatrixType::RowsAtCompileTime,\n      ColsAtCompileTime = MatrixType::ColsAtCompileTime,\n      Options = MatrixType::Options,\n      MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime,\n      MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime\n    };\n\n    /** \\brief Scalar type for matrices of type #MatrixType. */\n    typedef typename MatrixType::Scalar Scalar;\n    typedef typename NumTraits<Scalar>::Real RealScalar;\n    typedef Eigen::Index Index; ///< \\deprecated since Eigen 3.3\n\n    /** \\brief Complex scalar type for #MatrixType. \n      *\n      * This is \\c std::complex<Scalar> if #Scalar is real (e.g.,\n      * \\c float or \\c double) and just \\c Scalar if #Scalar is\n      * complex.\n      */\n    typedef std::complex<RealScalar> ComplexScalar;\n\n    /** \\brief Type for vector of eigenvalues as returned by eigenvalues(). \n      *\n      * This is a column vector with entries of type #ComplexScalar.\n      * The length of the vector is the size of #MatrixType.\n      */\n    typedef Matrix<ComplexScalar, ColsAtCompileTime, 1, Options & ~RowMajor, MaxColsAtCompileTime, 1> EigenvalueType;\n\n    /** \\brief Type for matrix of eigenvectors as returned by eigenvectors(). \n      *\n      * This is a square matrix with entries of type #ComplexScalar. \n      * The size is the same as the size of #MatrixType.\n      */\n    typedef Matrix<ComplexScalar, RowsAtCompileTime, ColsAtCompileTime, Options, MaxRowsAtCompileTime, MaxColsAtCompileTime> EigenvectorsType;\n\n    /** \\brief Default constructor.\n      *\n      * The default constructor is useful in cases in which the user intends to\n      * perform decompositions via EigenSolver::compute(const MatrixType&, bool).\n      *\n      * \\sa compute() for an example.\n      */\n    EigenSolver() : m_eivec(), m_eivalues(), m_isInitialized(false), m_eigenvectorsOk(false), m_realSchur(), m_matT(), m_tmp() {}\n\n    /** \\brief Default constructor with memory preallocation\n      *\n      * Like the default constructor but with preallocation of the internal data\n      * according to the specified problem \\a size.\n      * \\sa EigenSolver()\n      */\n    explicit EigenSolver(Index size)\n      : m_eivec(size, size),\n        m_eivalues(size),\n        m_isInitialized(false),\n        m_eigenvectorsOk(false),\n        m_realSchur(size),\n        m_matT(size, size), \n        m_tmp(size)\n    {}\n\n    /** \\brief Constructor; computes eigendecomposition of given matrix. \n      * \n      * \\param[in]  matrix  Square matrix whose eigendecomposition is to be computed.\n      * \\param[in]  computeEigenvectors  If true, both the eigenvectors and the\n      *    eigenvalues are computed; if false, only the eigenvalues are\n      *    computed. \n      *\n      * This constructor calls compute() to compute the eigenvalues\n      * and eigenvectors.\n      *\n      * Example: \\include EigenSolver_EigenSolver_MatrixType.cpp\n      * Output: \\verbinclude EigenSolver_EigenSolver_MatrixType.out\n      *\n      * \\sa compute()\n      */\n    template<typename InputType>\n    explicit EigenSolver(const EigenBase<InputType>& matrix, bool computeEigenvectors = true)\n      : m_eivec(matrix.rows(), matrix.cols()),\n        m_eivalues(matrix.cols()),\n        m_isInitialized(false),\n        m_eigenvectorsOk(false),\n        m_realSchur(matrix.cols()),\n        m_matT(matrix.rows(), matrix.cols()), \n        m_tmp(matrix.cols())\n    {\n      compute(matrix.derived(), computeEigenvectors);\n    }\n\n    /** \\brief Returns the eigenvectors of given matrix. \n      *\n      * \\returns  %Matrix whose columns are the (possibly complex) eigenvectors.\n      *\n      * \\pre Either the constructor \n      * EigenSolver(const MatrixType&,bool) or the member function\n      * compute(const MatrixType&, bool) has been called before, and\n      * \\p computeEigenvectors was set to true (the default).\n      *\n      * Column \\f$ k \\f$ of the returned matrix is an eigenvector corresponding\n      * to eigenvalue number \\f$ k \\f$ as returned by eigenvalues().  The\n      * eigenvectors are normalized to have (Euclidean) norm equal to one. The\n      * matrix returned by this function is the matrix \\f$ V \\f$ in the\n      * eigendecomposition \\f$ A = V D V^{-1} \\f$, if it exists.\n      *\n      * Example: \\include EigenSolver_eigenvectors.cpp\n      * Output: \\verbinclude EigenSolver_eigenvectors.out\n      *\n      * \\sa eigenvalues(), pseudoEigenvectors()\n      */\n    EigenvectorsType eigenvectors() const;\n\n    /** \\brief Returns the pseudo-eigenvectors of given matrix. \n      *\n      * \\returns  Const reference to matrix whose columns are the pseudo-eigenvectors.\n      *\n      * \\pre Either the constructor \n      * EigenSolver(const MatrixType&,bool) or the member function\n      * compute(const MatrixType&, bool) has been called before, and\n      * \\p computeEigenvectors was set to true (the default).\n      *\n      * The real matrix \\f$ V \\f$ returned by this function and the\n      * block-diagonal matrix \\f$ D \\f$ returned by pseudoEigenvalueMatrix()\n      * satisfy \\f$ AV = VD \\f$.\n      *\n      * Example: \\include EigenSolver_pseudoEigenvectors.cpp\n      * Output: \\verbinclude EigenSolver_pseudoEigenvectors.out\n      *\n      * \\sa pseudoEigenvalueMatrix(), eigenvectors()\n      */\n    const MatrixType& pseudoEigenvectors() const\n    {\n      eigen_assert(m_isInitialized && \"EigenSolver is not initialized.\");\n      eigen_assert(m_eigenvectorsOk && \"The eigenvectors have not been computed together with the eigenvalues.\");\n      return m_eivec;\n    }\n\n    /** \\brief Returns the block-diagonal matrix in the pseudo-eigendecomposition.\n      *\n      * \\returns  A block-diagonal matrix.\n      *\n      * \\pre Either the constructor \n      * EigenSolver(const MatrixType&,bool) or the member function\n      * compute(const MatrixType&, bool) has been called before.\n      *\n      * The matrix \\f$ D \\f$ returned by this function is real and\n      * block-diagonal. The blocks on the diagonal are either 1-by-1 or 2-by-2\n      * blocks of the form\n      * \\f$ \\begin{bmatrix} u & v \\\\ -v & u \\end{bmatrix} \\f$.\n      * These blocks are not sorted in any particular order.\n      * The matrix \\f$ D \\f$ and the matrix \\f$ V \\f$ returned by\n      * pseudoEigenvectors() satisfy \\f$ AV = VD \\f$.\n      *\n      * \\sa pseudoEigenvectors() for an example, eigenvalues()\n      */\n    MatrixType pseudoEigenvalueMatrix() const;\n\n    /** \\brief Returns the eigenvalues of given matrix. \n      *\n      * \\returns A const reference to the column vector containing the eigenvalues.\n      *\n      * \\pre Either the constructor \n      * EigenSolver(const MatrixType&,bool) or the member function\n      * compute(const MatrixType&, bool) has been called before.\n      *\n      * The eigenvalues are repeated according to their algebraic multiplicity,\n      * so there are as many eigenvalues as rows in the matrix. The eigenvalues \n      * are not sorted in any particular order.\n      *\n      * Example: \\include EigenSolver_eigenvalues.cpp\n      * Output: \\verbinclude EigenSolver_eigenvalues.out\n      *\n      * \\sa eigenvectors(), pseudoEigenvalueMatrix(),\n      *     MatrixBase::eigenvalues()\n      */\n    const EigenvalueType& eigenvalues() const\n    {\n      eigen_assert(m_isInitialized && \"EigenSolver is not initialized.\");\n      return m_eivalues;\n    }\n\n    /** \\brief Computes eigendecomposition of given matrix. \n      * \n      * \\param[in]  matrix  Square matrix whose eigendecomposition is to be computed.\n      * \\param[in]  computeEigenvectors  If true, both the eigenvectors and the\n      *    eigenvalues are computed; if false, only the eigenvalues are\n      *    computed. \n      * \\returns    Reference to \\c *this\n      *\n      * This function computes the eigenvalues of the real matrix \\p matrix.\n      * The eigenvalues() function can be used to retrieve them.  If \n      * \\p computeEigenvectors is true, then the eigenvectors are also computed\n      * and can be retrieved by calling eigenvectors().\n      *\n      * The matrix is first reduced to real Schur form using the RealSchur\n      * class. The Schur decomposition is then used to compute the eigenvalues\n      * and eigenvectors.\n      *\n      * The cost of the computation is dominated by the cost of the\n      * Schur decomposition, which is very approximately \\f$ 25n^3 \\f$\n      * (where \\f$ n \\f$ is the size of the matrix) if \\p computeEigenvectors \n      * is true, and \\f$ 10n^3 \\f$ if \\p computeEigenvectors is false.\n      *\n      * This method reuses of the allocated data in the EigenSolver object.\n      *\n      * Example: \\include EigenSolver_compute.cpp\n      * Output: \\verbinclude EigenSolver_compute.out\n      */\n    template<typename InputType>\n    EigenSolver& compute(const EigenBase<InputType>& matrix, bool computeEigenvectors = true);\n\n    /** \\returns NumericalIssue if the input contains INF or NaN values or overflow occurred. Returns Success otherwise. */\n    ComputationInfo info() const\n    {\n      eigen_assert(m_isInitialized && \"EigenSolver is not initialized.\");\n      return m_info;\n    }\n\n    /** \\brief Sets the maximum number of iterations allowed. */\n    EigenSolver& setMaxIterations(Index maxIters)\n    {\n      m_realSchur.setMaxIterations(maxIters);\n      return *this;\n    }\n\n    /** \\brief Returns the maximum number of iterations. */\n    Index getMaxIterations()\n    {\n      return m_realSchur.getMaxIterations();\n    }\n\n  private:\n    void doComputeEigenvectors();\n\n  protected:\n    \n    static void check_template_parameters()\n    {\n      EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar);\n      EIGEN_STATIC_ASSERT(!NumTraits<Scalar>::IsComplex, NUMERIC_TYPE_MUST_BE_REAL);\n    }\n    \n    MatrixType m_eivec;\n    EigenvalueType m_eivalues;\n    bool m_isInitialized;\n    bool m_eigenvectorsOk;\n    ComputationInfo m_info;\n    RealSchur<MatrixType> m_realSchur;\n    MatrixType m_matT;\n\n    typedef Matrix<Scalar, ColsAtCompileTime, 1, Options & ~RowMajor, MaxColsAtCompileTime, 1> ColumnVectorType;\n    ColumnVectorType m_tmp;\n};\n\ntemplate<typename MatrixType>\nMatrixType EigenSolver<MatrixType>::pseudoEigenvalueMatrix() const\n{\n  eigen_assert(m_isInitialized && \"EigenSolver is not initialized.\");\n  const RealScalar precision = RealScalar(2)*NumTraits<RealScalar>::epsilon();\n  Index n = m_eivalues.rows();\n  MatrixType matD = MatrixType::Zero(n,n);\n  for (Index i=0; i<n; ++i)\n  {\n    if (internal::isMuchSmallerThan(numext::imag(m_eivalues.coeff(i)), numext::real(m_eivalues.coeff(i)), precision))\n      matD.coeffRef(i,i) = numext::real(m_eivalues.coeff(i));\n    else\n    {\n      matD.template block<2,2>(i,i) <<  numext::real(m_eivalues.coeff(i)), numext::imag(m_eivalues.coeff(i)),\n                                       -numext::imag(m_eivalues.coeff(i)), numext::real(m_eivalues.coeff(i));\n      ++i;\n    }\n  }\n  return matD;\n}\n\ntemplate<typename MatrixType>\ntypename EigenSolver<MatrixType>::EigenvectorsType EigenSolver<MatrixType>::eigenvectors() const\n{\n  eigen_assert(m_isInitialized && \"EigenSolver is not initialized.\");\n  eigen_assert(m_eigenvectorsOk && \"The eigenvectors have not been computed together with the eigenvalues.\");\n  const RealScalar precision = RealScalar(2)*NumTraits<RealScalar>::epsilon();\n  Index n = m_eivec.cols();\n  EigenvectorsType matV(n,n);\n  for (Index j=0; j<n; ++j)\n  {\n    if (internal::isMuchSmallerThan(numext::imag(m_eivalues.coeff(j)), numext::real(m_eivalues.coeff(j)), precision) || j+1==n)\n    {\n      // we have a real eigen value\n      matV.col(j) = m_eivec.col(j).template cast<ComplexScalar>();\n      matV.col(j).normalize();\n    }\n    else\n    {\n      // we have a pair of complex eigen values\n      for (Index i=0; i<n; ++i)\n      {\n        matV.coeffRef(i,j)   = ComplexScalar(m_eivec.coeff(i,j),  m_eivec.coeff(i,j+1));\n        matV.coeffRef(i,j+1) = ComplexScalar(m_eivec.coeff(i,j), -m_eivec.coeff(i,j+1));\n      }\n      matV.col(j).normalize();\n      matV.col(j+1).normalize();\n      ++j;\n    }\n  }\n  return matV;\n}\n\ntemplate<typename MatrixType>\ntemplate<typename InputType>\nEigenSolver<MatrixType>& \nEigenSolver<MatrixType>::compute(const EigenBase<InputType>& matrix, bool computeEigenvectors)\n{\n  check_template_parameters();\n  \n  using std::sqrt;\n  using std::abs;\n  using numext::isfinite;\n  eigen_assert(matrix.cols() == matrix.rows());\n\n  // Reduce to real Schur form.\n  m_realSchur.compute(matrix.derived(), computeEigenvectors);\n  \n  m_info = m_realSchur.info();\n\n  if (m_info == Success)\n  {\n    m_matT = m_realSchur.matrixT();\n    if (computeEigenvectors)\n      m_eivec = m_realSchur.matrixU();\n  \n    // Compute eigenvalues from matT\n    m_eivalues.resize(matrix.cols());\n    Index i = 0;\n    while (i < matrix.cols()) \n    {\n      if (i == matrix.cols() - 1 || m_matT.coeff(i+1, i) == Scalar(0)) \n      {\n        m_eivalues.coeffRef(i) = m_matT.coeff(i, i);\n        if(!(isfinite)(m_eivalues.coeffRef(i)))\n        {\n          m_isInitialized = true;\n          m_eigenvectorsOk = false;\n          m_info = NumericalIssue;\n          return *this;\n        }\n        ++i;\n      }\n      else\n      {\n        Scalar p = Scalar(0.5) * (m_matT.coeff(i, i) - m_matT.coeff(i+1, i+1));\n        Scalar z;\n        // Compute z = sqrt(abs(p * p + m_matT.coeff(i+1, i) * m_matT.coeff(i, i+1)));\n        // without overflow\n        {\n          Scalar t0 = m_matT.coeff(i+1, i);\n          Scalar t1 = m_matT.coeff(i, i+1);\n          Scalar maxval = numext::maxi<Scalar>(abs(p),numext::maxi<Scalar>(abs(t0),abs(t1)));\n          t0 /= maxval;\n          t1 /= maxval;\n          Scalar p0 = p/maxval;\n          z = maxval * sqrt(abs(p0 * p0 + t0 * t1));\n        }\n        \n        m_eivalues.coeffRef(i)   = ComplexScalar(m_matT.coeff(i+1, i+1) + p, z);\n        m_eivalues.coeffRef(i+1) = ComplexScalar(m_matT.coeff(i+1, i+1) + p, -z);\n        if(!((isfinite)(m_eivalues.coeffRef(i)) && (isfinite)(m_eivalues.coeffRef(i+1))))\n        {\n          m_isInitialized = true;\n          m_eigenvectorsOk = false;\n          m_info = NumericalIssue;\n          return *this;\n        }\n        i += 2;\n      }\n    }\n    \n    // Compute eigenvectors.\n    if (computeEigenvectors)\n      doComputeEigenvectors();\n  }\n\n  m_isInitialized = true;\n  m_eigenvectorsOk = computeEigenvectors;\n\n  return *this;\n}\n\n\ntemplate<typename MatrixType>\nvoid EigenSolver<MatrixType>::doComputeEigenvectors()\n{\n  using std::abs;\n  const Index size = m_eivec.cols();\n  const Scalar eps = NumTraits<Scalar>::epsilon();\n\n  // inefficient! this is already computed in RealSchur\n  Scalar norm(0);\n  for (Index j = 0; j < size; ++j)\n  {\n    norm += m_matT.row(j).segment((std::max)(j-1,Index(0)), size-(std::max)(j-1,Index(0))).cwiseAbs().sum();\n  }\n  \n  // Backsubstitute to find vectors of upper triangular form\n  if (norm == Scalar(0))\n  {\n    return;\n  }\n\n  for (Index n = size-1; n >= 0; n--)\n  {\n    Scalar p = m_eivalues.coeff(n).real();\n    Scalar q = m_eivalues.coeff(n).imag();\n\n    // Scalar vector\n    if (q == Scalar(0))\n    {\n      Scalar lastr(0), lastw(0);\n      Index l = n;\n\n      m_matT.coeffRef(n,n) = Scalar(1);\n      for (Index i = n-1; i >= 0; i--)\n      {\n        Scalar w = m_matT.coeff(i,i) - p;\n        Scalar r = m_matT.row(i).segment(l,n-l+1).dot(m_matT.col(n).segment(l, n-l+1));\n\n        if (m_eivalues.coeff(i).imag() < Scalar(0))\n        {\n          lastw = w;\n          lastr = r;\n        }\n        else\n        {\n          l = i;\n          if (m_eivalues.coeff(i).imag() == Scalar(0))\n          {\n            if (w != Scalar(0))\n              m_matT.coeffRef(i,n) = -r / w;\n            else\n              m_matT.coeffRef(i,n) = -r / (eps * norm);\n          }\n          else // Solve real equations\n          {\n            Scalar x = m_matT.coeff(i,i+1);\n            Scalar y = m_matT.coeff(i+1,i);\n            Scalar denom = (m_eivalues.coeff(i).real() - p) * (m_eivalues.coeff(i).real() - p) + m_eivalues.coeff(i).imag() * m_eivalues.coeff(i).imag();\n            Scalar t = (x * lastr - lastw * r) / denom;\n            m_matT.coeffRef(i,n) = t;\n            if (abs(x) > abs(lastw))\n              m_matT.coeffRef(i+1,n) = (-r - w * t) / x;\n            else\n              m_matT.coeffRef(i+1,n) = (-lastr - y * t) / lastw;\n          }\n\n          // Overflow control\n          Scalar t = abs(m_matT.coeff(i,n));\n          if ((eps * t) * t > Scalar(1))\n            m_matT.col(n).tail(size-i) /= t;\n        }\n      }\n    }\n    else if (q < Scalar(0) && n > 0) // Complex vector\n    {\n      Scalar lastra(0), lastsa(0), lastw(0);\n      Index l = n-1;\n\n      // Last vector component imaginary so matrix is triangular\n      if (abs(m_matT.coeff(n,n-1)) > abs(m_matT.coeff(n-1,n)))\n      {\n        m_matT.coeffRef(n-1,n-1) = q / m_matT.coeff(n,n-1);\n        m_matT.coeffRef(n-1,n) = -(m_matT.coeff(n,n) - p) / m_matT.coeff(n,n-1);\n      }\n      else\n      {\n        ComplexScalar cc = ComplexScalar(Scalar(0),-m_matT.coeff(n-1,n)) / ComplexScalar(m_matT.coeff(n-1,n-1)-p,q);\n        m_matT.coeffRef(n-1,n-1) = numext::real(cc);\n        m_matT.coeffRef(n-1,n) = numext::imag(cc);\n      }\n      m_matT.coeffRef(n,n-1) = Scalar(0);\n      m_matT.coeffRef(n,n) = Scalar(1);\n      for (Index i = n-2; i >= 0; i--)\n      {\n        Scalar ra = m_matT.row(i).segment(l, n-l+1).dot(m_matT.col(n-1).segment(l, n-l+1));\n        Scalar sa = m_matT.row(i).segment(l, n-l+1).dot(m_matT.col(n).segment(l, n-l+1));\n        Scalar w = m_matT.coeff(i,i) - p;\n\n        if (m_eivalues.coeff(i).imag() < Scalar(0))\n        {\n          lastw = w;\n          lastra = ra;\n          lastsa = sa;\n        }\n        else\n        {\n          l = i;\n          if (m_eivalues.coeff(i).imag() == RealScalar(0))\n          {\n            ComplexScalar cc = ComplexScalar(-ra,-sa) / ComplexScalar(w,q);\n            m_matT.coeffRef(i,n-1) = numext::real(cc);\n            m_matT.coeffRef(i,n) = numext::imag(cc);\n          }\n          else\n          {\n            // Solve complex equations\n            Scalar x = m_matT.coeff(i,i+1);\n            Scalar y = m_matT.coeff(i+1,i);\n            Scalar vr = (m_eivalues.coeff(i).real() - p) * (m_eivalues.coeff(i).real() - p) + m_eivalues.coeff(i).imag() * m_eivalues.coeff(i).imag() - q * q;\n            Scalar vi = (m_eivalues.coeff(i).real() - p) * Scalar(2) * q;\n            if ((vr == Scalar(0)) && (vi == Scalar(0)))\n              vr = eps * norm * (abs(w) + abs(q) + abs(x) + abs(y) + abs(lastw));\n\n            ComplexScalar cc = ComplexScalar(x*lastra-lastw*ra+q*sa,x*lastsa-lastw*sa-q*ra) / ComplexScalar(vr,vi);\n            m_matT.coeffRef(i,n-1) = numext::real(cc);\n            m_matT.coeffRef(i,n) = numext::imag(cc);\n            if (abs(x) > (abs(lastw) + abs(q)))\n            {\n              m_matT.coeffRef(i+1,n-1) = (-ra - w * m_matT.coeff(i,n-1) + q * m_matT.coeff(i,n)) / x;\n              m_matT.coeffRef(i+1,n) = (-sa - w * m_matT.coeff(i,n) - q * m_matT.coeff(i,n-1)) / x;\n            }\n            else\n            {\n              cc = ComplexScalar(-lastra-y*m_matT.coeff(i,n-1),-lastsa-y*m_matT.coeff(i,n)) / ComplexScalar(lastw,q);\n              m_matT.coeffRef(i+1,n-1) = numext::real(cc);\n              m_matT.coeffRef(i+1,n) = numext::imag(cc);\n            }\n          }\n\n          // Overflow control\n          Scalar t = numext::maxi<Scalar>(abs(m_matT.coeff(i,n-1)),abs(m_matT.coeff(i,n)));\n          if ((eps * t) * t > Scalar(1))\n            m_matT.block(i, n-1, size-i, 2) /= t;\n\n        }\n      }\n      \n      // We handled a pair of complex conjugate eigenvalues, so need to skip them both\n      n--;\n    }\n    else\n    {\n      eigen_assert(0 && \"Internal bug in EigenSolver (INF or NaN has not been detected)\"); // this should not happen\n    }\n  }\n\n  // Back transformation to get eigenvectors of original matrix\n  for (Index j = size-1; j >= 0; j--)\n  {\n    m_tmp.noalias() = m_eivec.leftCols(j+1) * m_matT.col(j).segment(0, j+1);\n    m_eivec.col(j) = m_tmp;\n  }\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_EIGENSOLVER_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Eigenvalues/GeneralizedEigenSolver.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012-2016 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2010,2012 Jitse Niesen <jitse@maths.leeds.ac.uk>\n// Copyright (C) 2016 Tobias Wood <tobias@spinicist.org.uk>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_GENERALIZEDEIGENSOLVER_H\n#define EIGEN_GENERALIZEDEIGENSOLVER_H\n\n#include \"./RealQZ.h\"\n\nnamespace Eigen { \n\n/** \\eigenvalues_module \\ingroup Eigenvalues_Module\n  *\n  *\n  * \\class GeneralizedEigenSolver\n  *\n  * \\brief Computes the generalized eigenvalues and eigenvectors of a pair of general matrices\n  *\n  * \\tparam _MatrixType the type of the matrices of which we are computing the\n  * eigen-decomposition; this is expected to be an instantiation of the Matrix\n  * class template. Currently, only real matrices are supported.\n  *\n  * The generalized eigenvalues and eigenvectors of a matrix pair \\f$ A \\f$ and \\f$ B \\f$ are scalars\n  * \\f$ \\lambda \\f$ and vectors \\f$ v \\f$ such that \\f$ Av = \\lambda Bv \\f$.  If\n  * \\f$ D \\f$ is a diagonal matrix with the eigenvalues on the diagonal, and\n  * \\f$ V \\f$ is a matrix with the eigenvectors as its columns, then \\f$ A V =\n  * B V D \\f$. The matrix \\f$ V \\f$ is almost always invertible, in which case we\n  * have \\f$ A = B V D V^{-1} \\f$. This is called the generalized eigen-decomposition.\n  *\n  * The generalized eigenvalues and eigenvectors of a matrix pair may be complex, even when the\n  * matrices are real. Moreover, the generalized eigenvalue might be infinite if the matrix B is\n  * singular. To workaround this difficulty, the eigenvalues are provided as a pair of complex \\f$ \\alpha \\f$\n  * and real \\f$ \\beta \\f$ such that: \\f$ \\lambda_i = \\alpha_i / \\beta_i \\f$. If \\f$ \\beta_i \\f$ is (nearly) zero,\n  * then one can consider the well defined left eigenvalue \\f$ \\mu = \\beta_i / \\alpha_i\\f$ such that:\n  * \\f$ \\mu_i A v_i = B v_i \\f$, or even \\f$ \\mu_i u_i^T A  = u_i^T B \\f$ where \\f$ u_i \\f$ is\n  * called the left eigenvector.\n  *\n  * Call the function compute() to compute the generalized eigenvalues and eigenvectors of\n  * a given matrix pair. Alternatively, you can use the\n  * GeneralizedEigenSolver(const MatrixType&, const MatrixType&, bool) constructor which computes the\n  * eigenvalues and eigenvectors at construction time. Once the eigenvalue and\n  * eigenvectors are computed, they can be retrieved with the eigenvalues() and\n  * eigenvectors() functions.\n  *\n  * Here is an usage example of this class:\n  * Example: \\include GeneralizedEigenSolver.cpp\n  * Output: \\verbinclude GeneralizedEigenSolver.out\n  *\n  * \\sa MatrixBase::eigenvalues(), class ComplexEigenSolver, class SelfAdjointEigenSolver\n  */\ntemplate<typename _MatrixType> class GeneralizedEigenSolver\n{\n  public:\n\n    /** \\brief Synonym for the template parameter \\p _MatrixType. */\n    typedef _MatrixType MatrixType;\n\n    enum {\n      RowsAtCompileTime = MatrixType::RowsAtCompileTime,\n      ColsAtCompileTime = MatrixType::ColsAtCompileTime,\n      Options = MatrixType::Options,\n      MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime,\n      MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime\n    };\n\n    /** \\brief Scalar type for matrices of type #MatrixType. */\n    typedef typename MatrixType::Scalar Scalar;\n    typedef typename NumTraits<Scalar>::Real RealScalar;\n    typedef Eigen::Index Index; ///< \\deprecated since Eigen 3.3\n\n    /** \\brief Complex scalar type for #MatrixType. \n      *\n      * This is \\c std::complex<Scalar> if #Scalar is real (e.g.,\n      * \\c float or \\c double) and just \\c Scalar if #Scalar is\n      * complex.\n      */\n    typedef std::complex<RealScalar> ComplexScalar;\n\n    /** \\brief Type for vector of real scalar values eigenvalues as returned by betas().\n      *\n      * This is a column vector with entries of type #Scalar.\n      * The length of the vector is the size of #MatrixType.\n      */\n    typedef Matrix<Scalar, ColsAtCompileTime, 1, Options & ~RowMajor, MaxColsAtCompileTime, 1> VectorType;\n\n    /** \\brief Type for vector of complex scalar values eigenvalues as returned by alphas().\n      *\n      * This is a column vector with entries of type #ComplexScalar.\n      * The length of the vector is the size of #MatrixType.\n      */\n    typedef Matrix<ComplexScalar, ColsAtCompileTime, 1, Options & ~RowMajor, MaxColsAtCompileTime, 1> ComplexVectorType;\n\n    /** \\brief Expression type for the eigenvalues as returned by eigenvalues().\n      */\n    typedef CwiseBinaryOp<internal::scalar_quotient_op<ComplexScalar,Scalar>,ComplexVectorType,VectorType> EigenvalueType;\n\n    /** \\brief Type for matrix of eigenvectors as returned by eigenvectors(). \n      *\n      * This is a square matrix with entries of type #ComplexScalar. \n      * The size is the same as the size of #MatrixType.\n      */\n    typedef Matrix<ComplexScalar, RowsAtCompileTime, ColsAtCompileTime, Options, MaxRowsAtCompileTime, MaxColsAtCompileTime> EigenvectorsType;\n\n    /** \\brief Default constructor.\n      *\n      * The default constructor is useful in cases in which the user intends to\n      * perform decompositions via EigenSolver::compute(const MatrixType&, bool).\n      *\n      * \\sa compute() for an example.\n      */\n    GeneralizedEigenSolver()\n      : m_eivec(),\n        m_alphas(),\n        m_betas(),\n        m_valuesOkay(false),\n        m_vectorsOkay(false),\n        m_realQZ()\n    {}\n\n    /** \\brief Default constructor with memory preallocation\n      *\n      * Like the default constructor but with preallocation of the internal data\n      * according to the specified problem \\a size.\n      * \\sa GeneralizedEigenSolver()\n      */\n    explicit GeneralizedEigenSolver(Index size)\n      : m_eivec(size, size),\n        m_alphas(size),\n        m_betas(size),\n        m_valuesOkay(false),\n        m_vectorsOkay(false),\n        m_realQZ(size),\n        m_tmp(size)\n    {}\n\n    /** \\brief Constructor; computes the generalized eigendecomposition of given matrix pair.\n      * \n      * \\param[in]  A  Square matrix whose eigendecomposition is to be computed.\n      * \\param[in]  B  Square matrix whose eigendecomposition is to be computed.\n      * \\param[in]  computeEigenvectors  If true, both the eigenvectors and the\n      *    eigenvalues are computed; if false, only the eigenvalues are computed.\n      *\n      * This constructor calls compute() to compute the generalized eigenvalues\n      * and eigenvectors.\n      *\n      * \\sa compute()\n      */\n    GeneralizedEigenSolver(const MatrixType& A, const MatrixType& B, bool computeEigenvectors = true)\n      : m_eivec(A.rows(), A.cols()),\n        m_alphas(A.cols()),\n        m_betas(A.cols()),\n        m_valuesOkay(false),\n        m_vectorsOkay(false),\n        m_realQZ(A.cols()),\n        m_tmp(A.cols())\n    {\n      compute(A, B, computeEigenvectors);\n    }\n\n    /* \\brief Returns the computed generalized eigenvectors.\n      *\n      * \\returns  %Matrix whose columns are the (possibly complex) right eigenvectors.\n      * i.e. the eigenvectors that solve (A - l*B)x = 0. The ordering matches the eigenvalues.\n      *\n      * \\pre Either the constructor \n      * GeneralizedEigenSolver(const MatrixType&,const MatrixType&, bool) or the member function\n      * compute(const MatrixType&, const MatrixType& bool) has been called before, and\n      * \\p computeEigenvectors was set to true (the default).\n      *\n      * \\sa eigenvalues()\n      */\n    EigenvectorsType eigenvectors() const {\n      eigen_assert(m_vectorsOkay && \"Eigenvectors for GeneralizedEigenSolver were not calculated.\");\n      return m_eivec;\n    }\n\n    /** \\brief Returns an expression of the computed generalized eigenvalues.\n      *\n      * \\returns An expression of the column vector containing the eigenvalues.\n      *\n      * It is a shortcut for \\code this->alphas().cwiseQuotient(this->betas()); \\endcode\n      * Not that betas might contain zeros. It is therefore not recommended to use this function,\n      * but rather directly deal with the alphas and betas vectors.\n      *\n      * \\pre Either the constructor \n      * GeneralizedEigenSolver(const MatrixType&,const MatrixType&,bool) or the member function\n      * compute(const MatrixType&,const MatrixType&,bool) has been called before.\n      *\n      * The eigenvalues are repeated according to their algebraic multiplicity,\n      * so there are as many eigenvalues as rows in the matrix. The eigenvalues \n      * are not sorted in any particular order.\n      *\n      * \\sa alphas(), betas(), eigenvectors()\n      */\n    EigenvalueType eigenvalues() const\n    {\n      eigen_assert(m_valuesOkay && \"GeneralizedEigenSolver is not initialized.\");\n      return EigenvalueType(m_alphas,m_betas);\n    }\n\n    /** \\returns A const reference to the vectors containing the alpha values\n      *\n      * This vector permits to reconstruct the j-th eigenvalues as alphas(i)/betas(j).\n      *\n      * \\sa betas(), eigenvalues() */\n    ComplexVectorType alphas() const\n    {\n      eigen_assert(m_valuesOkay && \"GeneralizedEigenSolver is not initialized.\");\n      return m_alphas;\n    }\n\n    /** \\returns A const reference to the vectors containing the beta values\n      *\n      * This vector permits to reconstruct the j-th eigenvalues as alphas(i)/betas(j).\n      *\n      * \\sa alphas(), eigenvalues() */\n    VectorType betas() const\n    {\n      eigen_assert(m_valuesOkay && \"GeneralizedEigenSolver is not initialized.\");\n      return m_betas;\n    }\n\n    /** \\brief Computes generalized eigendecomposition of given matrix.\n      * \n      * \\param[in]  A  Square matrix whose eigendecomposition is to be computed.\n      * \\param[in]  B  Square matrix whose eigendecomposition is to be computed.\n      * \\param[in]  computeEigenvectors  If true, both the eigenvectors and the\n      *    eigenvalues are computed; if false, only the eigenvalues are\n      *    computed. \n      * \\returns    Reference to \\c *this\n      *\n      * This function computes the eigenvalues of the real matrix \\p matrix.\n      * The eigenvalues() function can be used to retrieve them.  If \n      * \\p computeEigenvectors is true, then the eigenvectors are also computed\n      * and can be retrieved by calling eigenvectors().\n      *\n      * The matrix is first reduced to real generalized Schur form using the RealQZ\n      * class. The generalized Schur decomposition is then used to compute the eigenvalues\n      * and eigenvectors.\n      *\n      * The cost of the computation is dominated by the cost of the\n      * generalized Schur decomposition.\n      *\n      * This method reuses of the allocated data in the GeneralizedEigenSolver object.\n      */\n    GeneralizedEigenSolver& compute(const MatrixType& A, const MatrixType& B, bool computeEigenvectors = true);\n\n    ComputationInfo info() const\n    {\n      eigen_assert(m_valuesOkay && \"EigenSolver is not initialized.\");\n      return m_realQZ.info();\n    }\n\n    /** Sets the maximal number of iterations allowed.\n    */\n    GeneralizedEigenSolver& setMaxIterations(Index maxIters)\n    {\n      m_realQZ.setMaxIterations(maxIters);\n      return *this;\n    }\n\n  protected:\n    \n    static void check_template_parameters()\n    {\n      EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar);\n      EIGEN_STATIC_ASSERT(!NumTraits<Scalar>::IsComplex, NUMERIC_TYPE_MUST_BE_REAL);\n    }\n    \n    EigenvectorsType m_eivec;\n    ComplexVectorType m_alphas;\n    VectorType m_betas;\n    bool m_valuesOkay, m_vectorsOkay;\n    RealQZ<MatrixType> m_realQZ;\n    ComplexVectorType m_tmp;\n};\n\ntemplate<typename MatrixType>\nGeneralizedEigenSolver<MatrixType>&\nGeneralizedEigenSolver<MatrixType>::compute(const MatrixType& A, const MatrixType& B, bool computeEigenvectors)\n{\n  check_template_parameters();\n  \n  using std::sqrt;\n  using std::abs;\n  eigen_assert(A.cols() == A.rows() && B.cols() == A.rows() && B.cols() == B.rows());\n  Index size = A.cols();\n  m_valuesOkay = false;\n  m_vectorsOkay = false;\n  // Reduce to generalized real Schur form:\n  // A = Q S Z and B = Q T Z\n  m_realQZ.compute(A, B, computeEigenvectors);\n  if (m_realQZ.info() == Success)\n  {\n    // Resize storage\n    m_alphas.resize(size);\n    m_betas.resize(size);\n    if (computeEigenvectors)\n    {\n      m_eivec.resize(size,size);\n      m_tmp.resize(size);\n    }\n\n    // Aliases:\n    Map<VectorType> v(reinterpret_cast<Scalar*>(m_tmp.data()), size);\n    ComplexVectorType &cv = m_tmp;\n    const MatrixType &mS = m_realQZ.matrixS();\n    const MatrixType &mT = m_realQZ.matrixT();\n\n    Index i = 0;\n    while (i < size)\n    {\n      if (i == size - 1 || mS.coeff(i+1, i) == Scalar(0))\n      {\n        // Real eigenvalue\n        m_alphas.coeffRef(i) = mS.diagonal().coeff(i);\n        m_betas.coeffRef(i)  = mT.diagonal().coeff(i);\n        if (computeEigenvectors)\n        {\n          v.setConstant(Scalar(0.0));\n          v.coeffRef(i) = Scalar(1.0);\n          // For singular eigenvalues do nothing more\n          if(abs(m_betas.coeffRef(i)) >= (std::numeric_limits<RealScalar>::min)())\n          {\n            // Non-singular eigenvalue\n            const Scalar alpha = real(m_alphas.coeffRef(i));\n            const Scalar beta = m_betas.coeffRef(i);\n            for (Index j = i-1; j >= 0; j--)\n            {\n              const Index st = j+1;\n              const Index sz = i-j;\n              if (j > 0 && mS.coeff(j, j-1) != Scalar(0))\n              {\n                // 2x2 block\n                Matrix<Scalar, 2, 1> rhs = (alpha*mT.template block<2,Dynamic>(j-1,st,2,sz) - beta*mS.template block<2,Dynamic>(j-1,st,2,sz)) .lazyProduct( v.segment(st,sz) );\n                Matrix<Scalar, 2, 2> lhs = beta * mS.template block<2,2>(j-1,j-1) - alpha * mT.template block<2,2>(j-1,j-1);\n                v.template segment<2>(j-1) = lhs.partialPivLu().solve(rhs);\n                j--;\n              }\n              else\n              {\n                v.coeffRef(j) = -v.segment(st,sz).transpose().cwiseProduct(beta*mS.block(j,st,1,sz) - alpha*mT.block(j,st,1,sz)).sum() / (beta*mS.coeffRef(j,j) - alpha*mT.coeffRef(j,j));\n              }\n            }\n          }\n          m_eivec.col(i).real().noalias() = m_realQZ.matrixZ().transpose() * v;\n          m_eivec.col(i).real().normalize();\n          m_eivec.col(i).imag().setConstant(0);\n        }\n        ++i;\n      }\n      else\n      {\n        // We need to extract the generalized eigenvalues of the pair of a general 2x2 block S and a positive diagonal 2x2 block T\n        // Then taking beta=T_00*T_11, we can avoid any division, and alpha is the eigenvalues of A = (U^-1 * S * U) * diag(T_11,T_00):\n\n        // T =  [a 0]\n        //      [0 b]\n        RealScalar a = mT.diagonal().coeff(i),\n                   b = mT.diagonal().coeff(i+1);\n        const RealScalar beta = m_betas.coeffRef(i) = m_betas.coeffRef(i+1) = a*b;\n\n        // ^^ NOTE: using diagonal()(i) instead of coeff(i,i) workarounds a MSVC bug.\n        Matrix<RealScalar,2,2> S2 = mS.template block<2,2>(i,i) * Matrix<Scalar,2,1>(b,a).asDiagonal();\n\n        Scalar p = Scalar(0.5) * (S2.coeff(0,0) - S2.coeff(1,1));\n        Scalar z = sqrt(abs(p * p + S2.coeff(1,0) * S2.coeff(0,1)));\n        const ComplexScalar alpha = ComplexScalar(S2.coeff(1,1) + p, (beta > 0) ? z : -z);\n        m_alphas.coeffRef(i)   = conj(alpha);\n        m_alphas.coeffRef(i+1) = alpha;\n\n        if (computeEigenvectors) {\n          // Compute eigenvector in position (i+1) and then position (i) is just the conjugate\n          cv.setZero();\n          cv.coeffRef(i+1) = Scalar(1.0);\n          // here, the \"static_cast\" workaound expression template issues.\n          cv.coeffRef(i) = -(static_cast<Scalar>(beta*mS.coeffRef(i,i+1)) - alpha*mT.coeffRef(i,i+1))\n                          / (static_cast<Scalar>(beta*mS.coeffRef(i,i))   - alpha*mT.coeffRef(i,i));\n          for (Index j = i-1; j >= 0; j--)\n          {\n            const Index st = j+1;\n            const Index sz = i+1-j;\n            if (j > 0 && mS.coeff(j, j-1) != Scalar(0))\n            {\n              // 2x2 block\n              Matrix<ComplexScalar, 2, 1> rhs = (alpha*mT.template block<2,Dynamic>(j-1,st,2,sz) - beta*mS.template block<2,Dynamic>(j-1,st,2,sz)) .lazyProduct( cv.segment(st,sz) );\n              Matrix<ComplexScalar, 2, 2> lhs = beta * mS.template block<2,2>(j-1,j-1) - alpha * mT.template block<2,2>(j-1,j-1);\n              cv.template segment<2>(j-1) = lhs.partialPivLu().solve(rhs);\n              j--;\n            } else {\n              cv.coeffRef(j) =  cv.segment(st,sz).transpose().cwiseProduct(beta*mS.block(j,st,1,sz) - alpha*mT.block(j,st,1,sz)).sum()\n                              / (alpha*mT.coeffRef(j,j) - static_cast<Scalar>(beta*mS.coeffRef(j,j)));\n            }\n          }\n          m_eivec.col(i+1).noalias() = (m_realQZ.matrixZ().transpose() * cv);\n          m_eivec.col(i+1).normalize();\n          m_eivec.col(i) = m_eivec.col(i+1).conjugate();\n        }\n        i += 2;\n      }\n    }\n\n    m_valuesOkay = true;\n    m_vectorsOkay = computeEigenvectors;\n  }\n  return *this;\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_GENERALIZEDEIGENSOLVER_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2010 Jitse Niesen <jitse@maths.leeds.ac.uk>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_GENERALIZEDSELFADJOINTEIGENSOLVER_H\n#define EIGEN_GENERALIZEDSELFADJOINTEIGENSOLVER_H\n\n#include \"./Tridiagonalization.h\"\n\nnamespace Eigen { \n\n/** \\eigenvalues_module \\ingroup Eigenvalues_Module\n  *\n  *\n  * \\class GeneralizedSelfAdjointEigenSolver\n  *\n  * \\brief Computes eigenvalues and eigenvectors of the generalized selfadjoint eigen problem\n  *\n  * \\tparam _MatrixType the type of the matrix of which we are computing the\n  * eigendecomposition; this is expected to be an instantiation of the Matrix\n  * class template.\n  *\n  * This class solves the generalized eigenvalue problem\n  * \\f$ Av = \\lambda Bv \\f$. In this case, the matrix \\f$ A \\f$ should be\n  * selfadjoint and the matrix \\f$ B \\f$ should be positive definite.\n  *\n  * Only the \\b lower \\b triangular \\b part of the input matrix is referenced.\n  *\n  * Call the function compute() to compute the eigenvalues and eigenvectors of\n  * a given matrix. Alternatively, you can use the\n  * GeneralizedSelfAdjointEigenSolver(const MatrixType&, const MatrixType&, int)\n  * constructor which computes the eigenvalues and eigenvectors at construction time.\n  * Once the eigenvalue and eigenvectors are computed, they can be retrieved with the eigenvalues()\n  * and eigenvectors() functions.\n  *\n  * The documentation for GeneralizedSelfAdjointEigenSolver(const MatrixType&, const MatrixType&, int)\n  * contains an example of the typical use of this class.\n  *\n  * \\sa class SelfAdjointEigenSolver, class EigenSolver, class ComplexEigenSolver\n  */\ntemplate<typename _MatrixType>\nclass GeneralizedSelfAdjointEigenSolver : public SelfAdjointEigenSolver<_MatrixType>\n{\n    typedef SelfAdjointEigenSolver<_MatrixType> Base;\n  public:\n\n    typedef _MatrixType MatrixType;\n\n    /** \\brief Default constructor for fixed-size matrices.\n      *\n      * The default constructor is useful in cases in which the user intends to\n      * perform decompositions via compute(). This constructor\n      * can only be used if \\p _MatrixType is a fixed-size matrix; use\n      * GeneralizedSelfAdjointEigenSolver(Index) for dynamic-size matrices.\n      */\n    GeneralizedSelfAdjointEigenSolver() : Base() {}\n\n    /** \\brief Constructor, pre-allocates memory for dynamic-size matrices.\n      *\n      * \\param [in]  size  Positive integer, size of the matrix whose\n      * eigenvalues and eigenvectors will be computed.\n      *\n      * This constructor is useful for dynamic-size matrices, when the user\n      * intends to perform decompositions via compute(). The \\p size\n      * parameter is only used as a hint. It is not an error to give a wrong\n      * \\p size, but it may impair performance.\n      *\n      * \\sa compute() for an example\n      */\n    explicit GeneralizedSelfAdjointEigenSolver(Index size)\n        : Base(size)\n    {}\n\n    /** \\brief Constructor; computes generalized eigendecomposition of given matrix pencil.\n      *\n      * \\param[in]  matA  Selfadjoint matrix in matrix pencil.\n      *                   Only the lower triangular part of the matrix is referenced.\n      * \\param[in]  matB  Positive-definite matrix in matrix pencil.\n      *                   Only the lower triangular part of the matrix is referenced.\n      * \\param[in]  options A or-ed set of flags {#ComputeEigenvectors,#EigenvaluesOnly} | {#Ax_lBx,#ABx_lx,#BAx_lx}.\n      *                     Default is #ComputeEigenvectors|#Ax_lBx.\n      *\n      * This constructor calls compute(const MatrixType&, const MatrixType&, int)\n      * to compute the eigenvalues and (if requested) the eigenvectors of the\n      * generalized eigenproblem \\f$ Ax = \\lambda B x \\f$ with \\a matA the\n      * selfadjoint matrix \\f$ A \\f$ and \\a matB the positive definite matrix\n      * \\f$ B \\f$. Each eigenvector \\f$ x \\f$ satisfies the property\n      * \\f$ x^* B x = 1 \\f$. The eigenvectors are computed if\n      * \\a options contains ComputeEigenvectors.\n      *\n      * In addition, the two following variants can be solved via \\p options:\n      * - \\c ABx_lx: \\f$ ABx = \\lambda x \\f$\n      * - \\c BAx_lx: \\f$ BAx = \\lambda x \\f$\n      *\n      * Example: \\include SelfAdjointEigenSolver_SelfAdjointEigenSolver_MatrixType2.cpp\n      * Output: \\verbinclude SelfAdjointEigenSolver_SelfAdjointEigenSolver_MatrixType2.out\n      *\n      * \\sa compute(const MatrixType&, const MatrixType&, int)\n      */\n    GeneralizedSelfAdjointEigenSolver(const MatrixType& matA, const MatrixType& matB,\n                                      int options = ComputeEigenvectors|Ax_lBx)\n      : Base(matA.cols())\n    {\n      compute(matA, matB, options);\n    }\n\n    /** \\brief Computes generalized eigendecomposition of given matrix pencil.\n      *\n      * \\param[in]  matA  Selfadjoint matrix in matrix pencil.\n      *                   Only the lower triangular part of the matrix is referenced.\n      * \\param[in]  matB  Positive-definite matrix in matrix pencil.\n      *                   Only the lower triangular part of the matrix is referenced.\n      * \\param[in]  options A or-ed set of flags {#ComputeEigenvectors,#EigenvaluesOnly} | {#Ax_lBx,#ABx_lx,#BAx_lx}.\n      *                     Default is #ComputeEigenvectors|#Ax_lBx.\n      *\n      * \\returns    Reference to \\c *this\n      *\n      * According to \\p options, this function computes eigenvalues and (if requested)\n      * the eigenvectors of one of the following three generalized eigenproblems:\n      * - \\c Ax_lBx: \\f$ Ax = \\lambda B x \\f$\n      * - \\c ABx_lx: \\f$ ABx = \\lambda x \\f$\n      * - \\c BAx_lx: \\f$ BAx = \\lambda x \\f$\n      * with \\a matA the selfadjoint matrix \\f$ A \\f$ and \\a matB the positive definite\n      * matrix \\f$ B \\f$.\n      * In addition, each eigenvector \\f$ x \\f$ satisfies the property \\f$ x^* B x = 1 \\f$.\n      *\n      * The eigenvalues() function can be used to retrieve\n      * the eigenvalues. If \\p options contains ComputeEigenvectors, then the\n      * eigenvectors are also computed and can be retrieved by calling\n      * eigenvectors().\n      *\n      * The implementation uses LLT to compute the Cholesky decomposition\n      * \\f$ B = LL^* \\f$ and computes the classical eigendecomposition\n      * of the selfadjoint matrix \\f$ L^{-1} A (L^*)^{-1} \\f$ if \\p options contains Ax_lBx\n      * and of \\f$ L^{*} A L \\f$ otherwise. This solves the\n      * generalized eigenproblem, because any solution of the generalized\n      * eigenproblem \\f$ Ax = \\lambda B x \\f$ corresponds to a solution\n      * \\f$ L^{-1} A (L^*)^{-1} (L^* x) = \\lambda (L^* x) \\f$ of the\n      * eigenproblem for \\f$ L^{-1} A (L^*)^{-1} \\f$. Similar statements\n      * can be made for the two other variants.\n      *\n      * Example: \\include SelfAdjointEigenSolver_compute_MatrixType2.cpp\n      * Output: \\verbinclude SelfAdjointEigenSolver_compute_MatrixType2.out\n      *\n      * \\sa GeneralizedSelfAdjointEigenSolver(const MatrixType&, const MatrixType&, int)\n      */\n    GeneralizedSelfAdjointEigenSolver& compute(const MatrixType& matA, const MatrixType& matB,\n                                               int options = ComputeEigenvectors|Ax_lBx);\n\n  protected:\n\n};\n\n\ntemplate<typename MatrixType>\nGeneralizedSelfAdjointEigenSolver<MatrixType>& GeneralizedSelfAdjointEigenSolver<MatrixType>::\ncompute(const MatrixType& matA, const MatrixType& matB, int options)\n{\n  eigen_assert(matA.cols()==matA.rows() && matB.rows()==matA.rows() && matB.cols()==matB.rows());\n  eigen_assert((options&~(EigVecMask|GenEigMask))==0\n          && (options&EigVecMask)!=EigVecMask\n          && ((options&GenEigMask)==0 || (options&GenEigMask)==Ax_lBx\n           || (options&GenEigMask)==ABx_lx || (options&GenEigMask)==BAx_lx)\n          && \"invalid option parameter\");\n\n  bool computeEigVecs = ((options&EigVecMask)==0) || ((options&EigVecMask)==ComputeEigenvectors);\n\n  // Compute the cholesky decomposition of matB = L L' = U'U\n  LLT<MatrixType> cholB(matB);\n\n  int type = (options&GenEigMask);\n  if(type==0)\n    type = Ax_lBx;\n\n  if(type==Ax_lBx)\n  {\n    // compute C = inv(L) A inv(L')\n    MatrixType matC = matA.template selfadjointView<Lower>();\n    cholB.matrixL().template solveInPlace<OnTheLeft>(matC);\n    cholB.matrixU().template solveInPlace<OnTheRight>(matC);\n\n    Base::compute(matC, computeEigVecs ? ComputeEigenvectors : EigenvaluesOnly );\n\n    // transform back the eigen vectors: evecs = inv(U) * evecs\n    if(computeEigVecs)\n      cholB.matrixU().solveInPlace(Base::m_eivec);\n  }\n  else if(type==ABx_lx)\n  {\n    // compute C = L' A L\n    MatrixType matC = matA.template selfadjointView<Lower>();\n    matC = matC * cholB.matrixL();\n    matC = cholB.matrixU() * matC;\n\n    Base::compute(matC, computeEigVecs ? ComputeEigenvectors : EigenvaluesOnly);\n\n    // transform back the eigen vectors: evecs = inv(U) * evecs\n    if(computeEigVecs)\n      cholB.matrixU().solveInPlace(Base::m_eivec);\n  }\n  else if(type==BAx_lx)\n  {\n    // compute C = L' A L\n    MatrixType matC = matA.template selfadjointView<Lower>();\n    matC = matC * cholB.matrixL();\n    matC = cholB.matrixU() * matC;\n\n    Base::compute(matC, computeEigVecs ? ComputeEigenvectors : EigenvaluesOnly);\n\n    // transform back the eigen vectors: evecs = L * evecs\n    if(computeEigVecs)\n      Base::m_eivec = cholB.matrixL() * Base::m_eivec;\n  }\n\n  return *this;\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_GENERALIZEDSELFADJOINTEIGENSOLVER_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Eigenvalues/HessenbergDecomposition.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2010 Jitse Niesen <jitse@maths.leeds.ac.uk>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_HESSENBERGDECOMPOSITION_H\n#define EIGEN_HESSENBERGDECOMPOSITION_H\n\nnamespace Eigen { \n\nnamespace internal {\n  \ntemplate<typename MatrixType> struct HessenbergDecompositionMatrixHReturnType;\ntemplate<typename MatrixType>\nstruct traits<HessenbergDecompositionMatrixHReturnType<MatrixType> >\n{\n  typedef MatrixType ReturnType;\n};\n\n}\n\n/** \\eigenvalues_module \\ingroup Eigenvalues_Module\n  *\n  *\n  * \\class HessenbergDecomposition\n  *\n  * \\brief Reduces a square matrix to Hessenberg form by an orthogonal similarity transformation\n  *\n  * \\tparam _MatrixType the type of the matrix of which we are computing the Hessenberg decomposition\n  *\n  * This class performs an Hessenberg decomposition of a matrix \\f$ A \\f$. In\n  * the real case, the Hessenberg decomposition consists of an orthogonal\n  * matrix \\f$ Q \\f$ and a Hessenberg matrix \\f$ H \\f$ such that \\f$ A = Q H\n  * Q^T \\f$. An orthogonal matrix is a matrix whose inverse equals its\n  * transpose (\\f$ Q^{-1} = Q^T \\f$). A Hessenberg matrix has zeros below the\n  * subdiagonal, so it is almost upper triangular. The Hessenberg decomposition\n  * of a complex matrix is \\f$ A = Q H Q^* \\f$ with \\f$ Q \\f$ unitary (that is,\n  * \\f$ Q^{-1} = Q^* \\f$).\n  *\n  * Call the function compute() to compute the Hessenberg decomposition of a\n  * given matrix. Alternatively, you can use the\n  * HessenbergDecomposition(const MatrixType&) constructor which computes the\n  * Hessenberg decomposition at construction time. Once the decomposition is\n  * computed, you can use the matrixH() and matrixQ() functions to construct\n  * the matrices H and Q in the decomposition.\n  *\n  * The documentation for matrixH() contains an example of the typical use of\n  * this class.\n  *\n  * \\sa class ComplexSchur, class Tridiagonalization, \\ref QR_Module \"QR Module\"\n  */\ntemplate<typename _MatrixType> class HessenbergDecomposition\n{\n  public:\n\n    /** \\brief Synonym for the template parameter \\p _MatrixType. */\n    typedef _MatrixType MatrixType;\n\n    enum {\n      Size = MatrixType::RowsAtCompileTime,\n      SizeMinusOne = Size == Dynamic ? Dynamic : Size - 1,\n      Options = MatrixType::Options,\n      MaxSize = MatrixType::MaxRowsAtCompileTime,\n      MaxSizeMinusOne = MaxSize == Dynamic ? Dynamic : MaxSize - 1\n    };\n\n    /** \\brief Scalar type for matrices of type #MatrixType. */\n    typedef typename MatrixType::Scalar Scalar;\n    typedef Eigen::Index Index; ///< \\deprecated since Eigen 3.3\n\n    /** \\brief Type for vector of Householder coefficients.\n      *\n      * This is column vector with entries of type #Scalar. The length of the\n      * vector is one less than the size of #MatrixType, if it is a fixed-side\n      * type.\n      */\n    typedef Matrix<Scalar, SizeMinusOne, 1, Options & ~RowMajor, MaxSizeMinusOne, 1> CoeffVectorType;\n\n    /** \\brief Return type of matrixQ() */\n    typedef HouseholderSequence<MatrixType,typename internal::remove_all<typename CoeffVectorType::ConjugateReturnType>::type> HouseholderSequenceType;\n    \n    typedef internal::HessenbergDecompositionMatrixHReturnType<MatrixType> MatrixHReturnType;\n\n    /** \\brief Default constructor; the decomposition will be computed later.\n      *\n      * \\param [in] size  The size of the matrix whose Hessenberg decomposition will be computed.\n      *\n      * The default constructor is useful in cases in which the user intends to\n      * perform decompositions via compute().  The \\p size parameter is only\n      * used as a hint. It is not an error to give a wrong \\p size, but it may\n      * impair performance.\n      *\n      * \\sa compute() for an example.\n      */\n    explicit HessenbergDecomposition(Index size = Size==Dynamic ? 2 : Size)\n      : m_matrix(size,size),\n        m_temp(size),\n        m_isInitialized(false)\n    {\n      if(size>1)\n        m_hCoeffs.resize(size-1);\n    }\n\n    /** \\brief Constructor; computes Hessenberg decomposition of given matrix.\n      *\n      * \\param[in]  matrix  Square matrix whose Hessenberg decomposition is to be computed.\n      *\n      * This constructor calls compute() to compute the Hessenberg\n      * decomposition.\n      *\n      * \\sa matrixH() for an example.\n      */\n    template<typename InputType>\n    explicit HessenbergDecomposition(const EigenBase<InputType>& matrix)\n      : m_matrix(matrix.derived()),\n        m_temp(matrix.rows()),\n        m_isInitialized(false)\n    {\n      if(matrix.rows()<2)\n      {\n        m_isInitialized = true;\n        return;\n      }\n      m_hCoeffs.resize(matrix.rows()-1,1);\n      _compute(m_matrix, m_hCoeffs, m_temp);\n      m_isInitialized = true;\n    }\n\n    /** \\brief Computes Hessenberg decomposition of given matrix.\n      *\n      * \\param[in]  matrix  Square matrix whose Hessenberg decomposition is to be computed.\n      * \\returns    Reference to \\c *this\n      *\n      * The Hessenberg decomposition is computed by bringing the columns of the\n      * matrix successively in the required form using Householder reflections\n      * (see, e.g., Algorithm 7.4.2 in Golub \\& Van Loan, <i>%Matrix\n      * Computations</i>). The cost is \\f$ 10n^3/3 \\f$ flops, where \\f$ n \\f$\n      * denotes the size of the given matrix.\n      *\n      * This method reuses of the allocated data in the HessenbergDecomposition\n      * object.\n      *\n      * Example: \\include HessenbergDecomposition_compute.cpp\n      * Output: \\verbinclude HessenbergDecomposition_compute.out\n      */\n    template<typename InputType>\n    HessenbergDecomposition& compute(const EigenBase<InputType>& matrix)\n    {\n      m_matrix = matrix.derived();\n      if(matrix.rows()<2)\n      {\n        m_isInitialized = true;\n        return *this;\n      }\n      m_hCoeffs.resize(matrix.rows()-1,1);\n      _compute(m_matrix, m_hCoeffs, m_temp);\n      m_isInitialized = true;\n      return *this;\n    }\n\n    /** \\brief Returns the Householder coefficients.\n      *\n      * \\returns a const reference to the vector of Householder coefficients\n      *\n      * \\pre Either the constructor HessenbergDecomposition(const MatrixType&)\n      * or the member function compute(const MatrixType&) has been called\n      * before to compute the Hessenberg decomposition of a matrix.\n      *\n      * The Householder coefficients allow the reconstruction of the matrix\n      * \\f$ Q \\f$ in the Hessenberg decomposition from the packed data.\n      *\n      * \\sa packedMatrix(), \\ref Householder_Module \"Householder module\"\n      */\n    const CoeffVectorType& householderCoefficients() const\n    {\n      eigen_assert(m_isInitialized && \"HessenbergDecomposition is not initialized.\");\n      return m_hCoeffs;\n    }\n\n    /** \\brief Returns the internal representation of the decomposition\n      *\n      *\t\\returns a const reference to a matrix with the internal representation\n      *\t         of the decomposition.\n      *\n      * \\pre Either the constructor HessenbergDecomposition(const MatrixType&)\n      * or the member function compute(const MatrixType&) has been called\n      * before to compute the Hessenberg decomposition of a matrix.\n      *\n      * The returned matrix contains the following information:\n      *  - the upper part and lower sub-diagonal represent the Hessenberg matrix H\n      *  - the rest of the lower part contains the Householder vectors that, combined with\n      *    Householder coefficients returned by householderCoefficients(),\n      *    allows to reconstruct the matrix Q as\n      *       \\f$ Q = H_{N-1} \\ldots H_1 H_0 \\f$.\n      *    Here, the matrices \\f$ H_i \\f$ are the Householder transformations\n      *       \\f$ H_i = (I - h_i v_i v_i^T) \\f$\n      *    where \\f$ h_i \\f$ is the \\f$ i \\f$th Householder coefficient and\n      *    \\f$ v_i \\f$ is the Householder vector defined by\n      *       \\f$ v_i = [ 0, \\ldots, 0, 1, M(i+2,i), \\ldots, M(N-1,i) ]^T \\f$\n      *    with M the matrix returned by this function.\n      *\n      * See LAPACK for further details on this packed storage.\n      *\n      * Example: \\include HessenbergDecomposition_packedMatrix.cpp\n      * Output: \\verbinclude HessenbergDecomposition_packedMatrix.out\n      *\n      * \\sa householderCoefficients()\n      */\n    const MatrixType& packedMatrix() const\n    {\n      eigen_assert(m_isInitialized && \"HessenbergDecomposition is not initialized.\");\n      return m_matrix;\n    }\n\n    /** \\brief Reconstructs the orthogonal matrix Q in the decomposition\n      *\n      * \\returns object representing the matrix Q\n      *\n      * \\pre Either the constructor HessenbergDecomposition(const MatrixType&)\n      * or the member function compute(const MatrixType&) has been called\n      * before to compute the Hessenberg decomposition of a matrix.\n      *\n      * This function returns a light-weight object of template class\n      * HouseholderSequence. You can either apply it directly to a matrix or\n      * you can convert it to a matrix of type #MatrixType.\n      *\n      * \\sa matrixH() for an example, class HouseholderSequence\n      */\n    HouseholderSequenceType matrixQ() const\n    {\n      eigen_assert(m_isInitialized && \"HessenbergDecomposition is not initialized.\");\n      return HouseholderSequenceType(m_matrix, m_hCoeffs.conjugate())\n             .setLength(m_matrix.rows() - 1)\n             .setShift(1);\n    }\n\n    /** \\brief Constructs the Hessenberg matrix H in the decomposition\n      *\n      * \\returns expression object representing the matrix H\n      *\n      * \\pre Either the constructor HessenbergDecomposition(const MatrixType&)\n      * or the member function compute(const MatrixType&) has been called\n      * before to compute the Hessenberg decomposition of a matrix.\n      *\n      * The object returned by this function constructs the Hessenberg matrix H\n      * when it is assigned to a matrix or otherwise evaluated. The matrix H is\n      * constructed from the packed matrix as returned by packedMatrix(): The\n      * upper part (including the subdiagonal) of the packed matrix contains\n      * the matrix H. It may sometimes be better to directly use the packed\n      * matrix instead of constructing the matrix H.\n      *\n      * Example: \\include HessenbergDecomposition_matrixH.cpp\n      * Output: \\verbinclude HessenbergDecomposition_matrixH.out\n      *\n      * \\sa matrixQ(), packedMatrix()\n      */\n    MatrixHReturnType matrixH() const\n    {\n      eigen_assert(m_isInitialized && \"HessenbergDecomposition is not initialized.\");\n      return MatrixHReturnType(*this);\n    }\n\n  private:\n\n    typedef Matrix<Scalar, 1, Size, Options | RowMajor, 1, MaxSize> VectorType;\n    typedef typename NumTraits<Scalar>::Real RealScalar;\n    static void _compute(MatrixType& matA, CoeffVectorType& hCoeffs, VectorType& temp);\n\n  protected:\n    MatrixType m_matrix;\n    CoeffVectorType m_hCoeffs;\n    VectorType m_temp;\n    bool m_isInitialized;\n};\n\n/** \\internal\n  * Performs a tridiagonal decomposition of \\a matA in place.\n  *\n  * \\param matA the input selfadjoint matrix\n  * \\param hCoeffs returned Householder coefficients\n  *\n  * The result is written in the lower triangular part of \\a matA.\n  *\n  * Implemented from Golub's \"%Matrix Computations\", algorithm 8.3.1.\n  *\n  * \\sa packedMatrix()\n  */\ntemplate<typename MatrixType>\nvoid HessenbergDecomposition<MatrixType>::_compute(MatrixType& matA, CoeffVectorType& hCoeffs, VectorType& temp)\n{\n  eigen_assert(matA.rows()==matA.cols());\n  Index n = matA.rows();\n  temp.resize(n);\n  for (Index i = 0; i<n-1; ++i)\n  {\n    // let's consider the vector v = i-th column starting at position i+1\n    Index remainingSize = n-i-1;\n    RealScalar beta;\n    Scalar h;\n    matA.col(i).tail(remainingSize).makeHouseholderInPlace(h, beta);\n    matA.col(i).coeffRef(i+1) = beta;\n    hCoeffs.coeffRef(i) = h;\n\n    // Apply similarity transformation to remaining columns,\n    // i.e., compute A = H A H'\n\n    // A = H A\n    matA.bottomRightCorner(remainingSize, remainingSize)\n        .applyHouseholderOnTheLeft(matA.col(i).tail(remainingSize-1), h, &temp.coeffRef(0));\n\n    // A = A H'\n    matA.rightCols(remainingSize)\n        .applyHouseholderOnTheRight(matA.col(i).tail(remainingSize-1), numext::conj(h), &temp.coeffRef(0));\n  }\n}\n\nnamespace internal {\n\n/** \\eigenvalues_module \\ingroup Eigenvalues_Module\n  *\n  *\n  * \\brief Expression type for return value of HessenbergDecomposition::matrixH()\n  *\n  * \\tparam MatrixType type of matrix in the Hessenberg decomposition\n  *\n  * Objects of this type represent the Hessenberg matrix in the Hessenberg\n  * decomposition of some matrix. The object holds a reference to the\n  * HessenbergDecomposition class until the it is assigned or evaluated for\n  * some other reason (the reference should remain valid during the life time\n  * of this object). This class is the return type of\n  * HessenbergDecomposition::matrixH(); there is probably no other use for this\n  * class.\n  */\ntemplate<typename MatrixType> struct HessenbergDecompositionMatrixHReturnType\n: public ReturnByValue<HessenbergDecompositionMatrixHReturnType<MatrixType> >\n{\n  public:\n    /** \\brief Constructor.\n      *\n      * \\param[in] hess  Hessenberg decomposition\n      */\n    HessenbergDecompositionMatrixHReturnType(const HessenbergDecomposition<MatrixType>& hess) : m_hess(hess) { }\n\n    /** \\brief Hessenberg matrix in decomposition.\n      *\n      * \\param[out] result  Hessenberg matrix in decomposition \\p hess which\n      *                     was passed to the constructor\n      */\n    template <typename ResultType>\n    inline void evalTo(ResultType& result) const\n    {\n      result = m_hess.packedMatrix();\n      Index n = result.rows();\n      if (n>2)\n        result.bottomLeftCorner(n-2, n-2).template triangularView<Lower>().setZero();\n    }\n\n    Index rows() const { return m_hess.packedMatrix().rows(); }\n    Index cols() const { return m_hess.packedMatrix().cols(); }\n\n  protected:\n    const HessenbergDecomposition<MatrixType>& m_hess;\n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_HESSENBERGDECOMPOSITION_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2010 Jitse Niesen <jitse@maths.leeds.ac.uk>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_MATRIXBASEEIGENVALUES_H\n#define EIGEN_MATRIXBASEEIGENVALUES_H\n\nnamespace Eigen { \n\nnamespace internal {\n\ntemplate<typename Derived, bool IsComplex>\nstruct eigenvalues_selector\n{\n  // this is the implementation for the case IsComplex = true\n  static inline typename MatrixBase<Derived>::EigenvaluesReturnType const\n  run(const MatrixBase<Derived>& m)\n  {\n    typedef typename Derived::PlainObject PlainObject;\n    PlainObject m_eval(m);\n    return ComplexEigenSolver<PlainObject>(m_eval, false).eigenvalues();\n  }\n};\n\ntemplate<typename Derived>\nstruct eigenvalues_selector<Derived, false>\n{\n  static inline typename MatrixBase<Derived>::EigenvaluesReturnType const\n  run(const MatrixBase<Derived>& m)\n  {\n    typedef typename Derived::PlainObject PlainObject;\n    PlainObject m_eval(m);\n    return EigenSolver<PlainObject>(m_eval, false).eigenvalues();\n  }\n};\n\n} // end namespace internal\n\n/** \\brief Computes the eigenvalues of a matrix \n  * \\returns Column vector containing the eigenvalues.\n  *\n  * \\eigenvalues_module\n  * This function computes the eigenvalues with the help of the EigenSolver\n  * class (for real matrices) or the ComplexEigenSolver class (for complex\n  * matrices). \n  *\n  * The eigenvalues are repeated according to their algebraic multiplicity,\n  * so there are as many eigenvalues as rows in the matrix.\n  *\n  * The SelfAdjointView class provides a better algorithm for selfadjoint\n  * matrices.\n  *\n  * Example: \\include MatrixBase_eigenvalues.cpp\n  * Output: \\verbinclude MatrixBase_eigenvalues.out\n  *\n  * \\sa EigenSolver::eigenvalues(), ComplexEigenSolver::eigenvalues(),\n  *     SelfAdjointView::eigenvalues()\n  */\ntemplate<typename Derived>\ninline typename MatrixBase<Derived>::EigenvaluesReturnType\nMatrixBase<Derived>::eigenvalues() const\n{\n  return internal::eigenvalues_selector<Derived, NumTraits<Scalar>::IsComplex>::run(derived());\n}\n\n/** \\brief Computes the eigenvalues of a matrix\n  * \\returns Column vector containing the eigenvalues.\n  *\n  * \\eigenvalues_module\n  * This function computes the eigenvalues with the help of the\n  * SelfAdjointEigenSolver class.  The eigenvalues are repeated according to\n  * their algebraic multiplicity, so there are as many eigenvalues as rows in\n  * the matrix.\n  *\n  * Example: \\include SelfAdjointView_eigenvalues.cpp\n  * Output: \\verbinclude SelfAdjointView_eigenvalues.out\n  *\n  * \\sa SelfAdjointEigenSolver::eigenvalues(), MatrixBase::eigenvalues()\n  */\ntemplate<typename MatrixType, unsigned int UpLo> \nEIGEN_DEVICE_FUNC inline typename SelfAdjointView<MatrixType, UpLo>::EigenvaluesReturnType\nSelfAdjointView<MatrixType, UpLo>::eigenvalues() const\n{\n  PlainObject thisAsMatrix(*this);\n  return SelfAdjointEigenSolver<PlainObject>(thisAsMatrix, false).eigenvalues();\n}\n\n\n\n/** \\brief Computes the L2 operator norm\n  * \\returns Operator norm of the matrix.\n  *\n  * \\eigenvalues_module\n  * This function computes the L2 operator norm of a matrix, which is also\n  * known as the spectral norm. The norm of a matrix \\f$ A \\f$ is defined to be\n  * \\f[ \\|A\\|_2 = \\max_x \\frac{\\|Ax\\|_2}{\\|x\\|_2} \\f]\n  * where the maximum is over all vectors and the norm on the right is the\n  * Euclidean vector norm. The norm equals the largest singular value, which is\n  * the square root of the largest eigenvalue of the positive semi-definite\n  * matrix \\f$ A^*A \\f$.\n  *\n  * The current implementation uses the eigenvalues of \\f$ A^*A \\f$, as computed\n  * by SelfAdjointView::eigenvalues(), to compute the operator norm of a\n  * matrix.  The SelfAdjointView class provides a better algorithm for\n  * selfadjoint matrices.\n  *\n  * Example: \\include MatrixBase_operatorNorm.cpp\n  * Output: \\verbinclude MatrixBase_operatorNorm.out\n  *\n  * \\sa SelfAdjointView::eigenvalues(), SelfAdjointView::operatorNorm()\n  */\ntemplate<typename Derived>\ninline typename MatrixBase<Derived>::RealScalar\nMatrixBase<Derived>::operatorNorm() const\n{\n  using std::sqrt;\n  typename Derived::PlainObject m_eval(derived());\n  // FIXME if it is really guaranteed that the eigenvalues are already sorted,\n  // then we don't need to compute a maxCoeff() here, comparing the 1st and last ones is enough.\n  return sqrt((m_eval*m_eval.adjoint())\n                 .eval()\n\t\t .template selfadjointView<Lower>()\n\t\t .eigenvalues()\n\t\t .maxCoeff()\n\t\t );\n}\n\n/** \\brief Computes the L2 operator norm\n  * \\returns Operator norm of the matrix.\n  *\n  * \\eigenvalues_module\n  * This function computes the L2 operator norm of a self-adjoint matrix. For a\n  * self-adjoint matrix, the operator norm is the largest eigenvalue.\n  *\n  * The current implementation uses the eigenvalues of the matrix, as computed\n  * by eigenvalues(), to compute the operator norm of the matrix.\n  *\n  * Example: \\include SelfAdjointView_operatorNorm.cpp\n  * Output: \\verbinclude SelfAdjointView_operatorNorm.out\n  *\n  * \\sa eigenvalues(), MatrixBase::operatorNorm()\n  */\ntemplate<typename MatrixType, unsigned int UpLo>\nEIGEN_DEVICE_FUNC inline typename SelfAdjointView<MatrixType, UpLo>::RealScalar\nSelfAdjointView<MatrixType, UpLo>::operatorNorm() const\n{\n  return eigenvalues().cwiseAbs().maxCoeff();\n}\n\n} // end namespace Eigen\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Eigenvalues/RealQZ.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Alexey Korepanov <kaikaikai@yandex.ru>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_REAL_QZ_H\n#define EIGEN_REAL_QZ_H\n\nnamespace Eigen {\n\n  /** \\eigenvalues_module \\ingroup Eigenvalues_Module\n   *\n   *\n   * \\class RealQZ\n   *\n   * \\brief Performs a real QZ decomposition of a pair of square matrices\n   *\n   * \\tparam _MatrixType the type of the matrix of which we are computing the\n   * real QZ decomposition; this is expected to be an instantiation of the\n   * Matrix class template.\n   *\n   * Given a real square matrices A and B, this class computes the real QZ\n   * decomposition: \\f$ A = Q S Z \\f$, \\f$ B = Q T Z \\f$ where Q and Z are\n   * real orthogonal matrixes, T is upper-triangular matrix, and S is upper\n   * quasi-triangular matrix. An orthogonal matrix is a matrix whose\n   * inverse is equal to its transpose, \\f$ U^{-1} = U^T \\f$. A quasi-triangular\n   * matrix is a block-triangular matrix whose diagonal consists of 1-by-1\n   * blocks and 2-by-2 blocks where further reduction is impossible due to\n   * complex eigenvalues. \n   *\n   * The eigenvalues of the pencil \\f$ A - z B \\f$ can be obtained from\n   * 1x1 and 2x2 blocks on the diagonals of S and T.\n   *\n   * Call the function compute() to compute the real QZ decomposition of a\n   * given pair of matrices. Alternatively, you can use the \n   * RealQZ(const MatrixType& B, const MatrixType& B, bool computeQZ)\n   * constructor which computes the real QZ decomposition at construction\n   * time. Once the decomposition is computed, you can use the matrixS(),\n   * matrixT(), matrixQ() and matrixZ() functions to retrieve the matrices\n   * S, T, Q and Z in the decomposition. If computeQZ==false, some time\n   * is saved by not computing matrices Q and Z.\n   *\n   * Example: \\include RealQZ_compute.cpp\n   * Output: \\include RealQZ_compute.out\n   *\n   * \\note The implementation is based on the algorithm in \"Matrix Computations\"\n   * by Gene H. Golub and Charles F. Van Loan, and a paper \"An algorithm for\n   * generalized eigenvalue problems\" by C.B.Moler and G.W.Stewart.\n   *\n   * \\sa class RealSchur, class ComplexSchur, class EigenSolver, class ComplexEigenSolver\n   */\n\n  template<typename _MatrixType> class RealQZ\n  {\n    public:\n      typedef _MatrixType MatrixType;\n      enum {\n        RowsAtCompileTime = MatrixType::RowsAtCompileTime,\n        ColsAtCompileTime = MatrixType::ColsAtCompileTime,\n        Options = MatrixType::Options,\n        MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime,\n        MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime\n      };\n      typedef typename MatrixType::Scalar Scalar;\n      typedef std::complex<typename NumTraits<Scalar>::Real> ComplexScalar;\n      typedef Eigen::Index Index; ///< \\deprecated since Eigen 3.3\n\n      typedef Matrix<ComplexScalar, ColsAtCompileTime, 1, Options & ~RowMajor, MaxColsAtCompileTime, 1> EigenvalueType;\n      typedef Matrix<Scalar, ColsAtCompileTime, 1, Options & ~RowMajor, MaxColsAtCompileTime, 1> ColumnVectorType;\n\n      /** \\brief Default constructor.\n       *\n       * \\param [in] size  Positive integer, size of the matrix whose QZ decomposition will be computed.\n       *\n       * The default constructor is useful in cases in which the user intends to\n       * perform decompositions via compute().  The \\p size parameter is only\n       * used as a hint. It is not an error to give a wrong \\p size, but it may\n       * impair performance.\n       *\n       * \\sa compute() for an example.\n       */\n      explicit RealQZ(Index size = RowsAtCompileTime==Dynamic ? 1 : RowsAtCompileTime) :\n        m_S(size, size),\n        m_T(size, size),\n        m_Q(size, size),\n        m_Z(size, size),\n        m_workspace(size*2),\n        m_maxIters(400),\n        m_isInitialized(false),\n        m_computeQZ(true)\n      {}\n\n      /** \\brief Constructor; computes real QZ decomposition of given matrices\n       * \n       * \\param[in]  A          Matrix A.\n       * \\param[in]  B          Matrix B.\n       * \\param[in]  computeQZ  If false, A and Z are not computed.\n       *\n       * This constructor calls compute() to compute the QZ decomposition.\n       */\n      RealQZ(const MatrixType& A, const MatrixType& B, bool computeQZ = true) :\n        m_S(A.rows(),A.cols()),\n        m_T(A.rows(),A.cols()),\n        m_Q(A.rows(),A.cols()),\n        m_Z(A.rows(),A.cols()),\n        m_workspace(A.rows()*2),\n        m_maxIters(400),\n        m_isInitialized(false),\n        m_computeQZ(true)\n      {\n        compute(A, B, computeQZ);\n      }\n\n      /** \\brief Returns matrix Q in the QZ decomposition. \n       *\n       * \\returns A const reference to the matrix Q.\n       */\n      const MatrixType& matrixQ() const {\n        eigen_assert(m_isInitialized && \"RealQZ is not initialized.\");\n        eigen_assert(m_computeQZ && \"The matrices Q and Z have not been computed during the QZ decomposition.\");\n        return m_Q;\n      }\n\n      /** \\brief Returns matrix Z in the QZ decomposition. \n       *\n       * \\returns A const reference to the matrix Z.\n       */\n      const MatrixType& matrixZ() const {\n        eigen_assert(m_isInitialized && \"RealQZ is not initialized.\");\n        eigen_assert(m_computeQZ && \"The matrices Q and Z have not been computed during the QZ decomposition.\");\n        return m_Z;\n      }\n\n      /** \\brief Returns matrix S in the QZ decomposition. \n       *\n       * \\returns A const reference to the matrix S.\n       */\n      const MatrixType& matrixS() const {\n        eigen_assert(m_isInitialized && \"RealQZ is not initialized.\");\n        return m_S;\n      }\n\n      /** \\brief Returns matrix S in the QZ decomposition. \n       *\n       * \\returns A const reference to the matrix S.\n       */\n      const MatrixType& matrixT() const {\n        eigen_assert(m_isInitialized && \"RealQZ is not initialized.\");\n        return m_T;\n      }\n\n      /** \\brief Computes QZ decomposition of given matrix. \n       * \n       * \\param[in]  A          Matrix A.\n       * \\param[in]  B          Matrix B.\n       * \\param[in]  computeQZ  If false, A and Z are not computed.\n       * \\returns    Reference to \\c *this\n       */\n      RealQZ& compute(const MatrixType& A, const MatrixType& B, bool computeQZ = true);\n\n      /** \\brief Reports whether previous computation was successful.\n       *\n       * \\returns \\c Success if computation was successful, \\c NoConvergence otherwise.\n       */\n      ComputationInfo info() const\n      {\n        eigen_assert(m_isInitialized && \"RealQZ is not initialized.\");\n        return m_info;\n      }\n\n      /** \\brief Returns number of performed QR-like iterations.\n      */\n      Index iterations() const\n      {\n        eigen_assert(m_isInitialized && \"RealQZ is not initialized.\");\n        return m_global_iter;\n      }\n\n      /** Sets the maximal number of iterations allowed to converge to one eigenvalue\n       * or decouple the problem.\n      */\n      RealQZ& setMaxIterations(Index maxIters)\n      {\n        m_maxIters = maxIters;\n        return *this;\n      }\n\n    private:\n\n      MatrixType m_S, m_T, m_Q, m_Z;\n      Matrix<Scalar,Dynamic,1> m_workspace;\n      ComputationInfo m_info;\n      Index m_maxIters;\n      bool m_isInitialized;\n      bool m_computeQZ;\n      Scalar m_normOfT, m_normOfS;\n      Index m_global_iter;\n\n      typedef Matrix<Scalar,3,1> Vector3s;\n      typedef Matrix<Scalar,2,1> Vector2s;\n      typedef Matrix<Scalar,2,2> Matrix2s;\n      typedef JacobiRotation<Scalar> JRs;\n\n      void hessenbergTriangular();\n      void computeNorms();\n      Index findSmallSubdiagEntry(Index iu);\n      Index findSmallDiagEntry(Index f, Index l);\n      void splitOffTwoRows(Index i);\n      void pushDownZero(Index z, Index f, Index l);\n      void step(Index f, Index l, Index iter);\n\n  }; // RealQZ\n\n  /** \\internal Reduces S and T to upper Hessenberg - triangular form */\n  template<typename MatrixType>\n    void RealQZ<MatrixType>::hessenbergTriangular()\n    {\n\n      const Index dim = m_S.cols();\n\n      // perform QR decomposition of T, overwrite T with R, save Q\n      HouseholderQR<MatrixType> qrT(m_T);\n      m_T = qrT.matrixQR();\n      m_T.template triangularView<StrictlyLower>().setZero();\n      m_Q = qrT.householderQ();\n      // overwrite S with Q* S\n      m_S.applyOnTheLeft(m_Q.adjoint());\n      // init Z as Identity\n      if (m_computeQZ)\n        m_Z = MatrixType::Identity(dim,dim);\n      // reduce S to upper Hessenberg with Givens rotations\n      for (Index j=0; j<=dim-3; j++) {\n        for (Index i=dim-1; i>=j+2; i--) {\n          JRs G;\n          // kill S(i,j)\n          if(m_S.coeff(i,j) != 0)\n          {\n            G.makeGivens(m_S.coeff(i-1,j), m_S.coeff(i,j), &m_S.coeffRef(i-1, j));\n            m_S.coeffRef(i,j) = Scalar(0.0);\n            m_S.rightCols(dim-j-1).applyOnTheLeft(i-1,i,G.adjoint());\n            m_T.rightCols(dim-i+1).applyOnTheLeft(i-1,i,G.adjoint());\n            // update Q\n            if (m_computeQZ)\n              m_Q.applyOnTheRight(i-1,i,G);\n          }\n          // kill T(i,i-1)\n          if(m_T.coeff(i,i-1)!=Scalar(0))\n          {\n            G.makeGivens(m_T.coeff(i,i), m_T.coeff(i,i-1), &m_T.coeffRef(i,i));\n            m_T.coeffRef(i,i-1) = Scalar(0.0);\n            m_S.applyOnTheRight(i,i-1,G);\n            m_T.topRows(i).applyOnTheRight(i,i-1,G);\n            // update Z\n            if (m_computeQZ)\n              m_Z.applyOnTheLeft(i,i-1,G.adjoint());\n          }\n        }\n      }\n    }\n\n  /** \\internal Computes vector L1 norms of S and T when in Hessenberg-Triangular form already */\n  template<typename MatrixType>\n    inline void RealQZ<MatrixType>::computeNorms()\n    {\n      const Index size = m_S.cols();\n      m_normOfS = Scalar(0.0);\n      m_normOfT = Scalar(0.0);\n      for (Index j = 0; j < size; ++j)\n      {\n        m_normOfS += m_S.col(j).segment(0, (std::min)(size,j+2)).cwiseAbs().sum();\n        m_normOfT += m_T.row(j).segment(j, size - j).cwiseAbs().sum();\n      }\n    }\n\n\n  /** \\internal Look for single small sub-diagonal element S(res, res-1) and return res (or 0) */\n  template<typename MatrixType>\n    inline Index RealQZ<MatrixType>::findSmallSubdiagEntry(Index iu)\n    {\n      using std::abs;\n      Index res = iu;\n      while (res > 0)\n      {\n        Scalar s = abs(m_S.coeff(res-1,res-1)) + abs(m_S.coeff(res,res));\n        if (s == Scalar(0.0))\n          s = m_normOfS;\n        if (abs(m_S.coeff(res,res-1)) < NumTraits<Scalar>::epsilon() * s)\n          break;\n        res--;\n      }\n      return res;\n    }\n\n  /** \\internal Look for single small diagonal element T(res, res) for res between f and l, and return res (or f-1)  */\n  template<typename MatrixType>\n    inline Index RealQZ<MatrixType>::findSmallDiagEntry(Index f, Index l)\n    {\n      using std::abs;\n      Index res = l;\n      while (res >= f) {\n        if (abs(m_T.coeff(res,res)) <= NumTraits<Scalar>::epsilon() * m_normOfT)\n          break;\n        res--;\n      }\n      return res;\n    }\n\n  /** \\internal decouple 2x2 diagonal block in rows i, i+1 if eigenvalues are real */\n  template<typename MatrixType>\n    inline void RealQZ<MatrixType>::splitOffTwoRows(Index i)\n    {\n      using std::abs;\n      using std::sqrt;\n      const Index dim=m_S.cols();\n      if (abs(m_S.coeff(i+1,i))==Scalar(0))\n        return;\n      Index j = findSmallDiagEntry(i,i+1);\n      if (j==i-1)\n      {\n        // block of (S T^{-1})\n        Matrix2s STi = m_T.template block<2,2>(i,i).template triangularView<Upper>().\n          template solve<OnTheRight>(m_S.template block<2,2>(i,i));\n        Scalar p = Scalar(0.5)*(STi(0,0)-STi(1,1));\n        Scalar q = p*p + STi(1,0)*STi(0,1);\n        if (q>=0) {\n          Scalar z = sqrt(q);\n          // one QR-like iteration for ABi - lambda I\n          // is enough - when we know exact eigenvalue in advance,\n          // convergence is immediate\n          JRs G;\n          if (p>=0)\n            G.makeGivens(p + z, STi(1,0));\n          else\n            G.makeGivens(p - z, STi(1,0));\n          m_S.rightCols(dim-i).applyOnTheLeft(i,i+1,G.adjoint());\n          m_T.rightCols(dim-i).applyOnTheLeft(i,i+1,G.adjoint());\n          // update Q\n          if (m_computeQZ)\n            m_Q.applyOnTheRight(i,i+1,G);\n\n          G.makeGivens(m_T.coeff(i+1,i+1), m_T.coeff(i+1,i));\n          m_S.topRows(i+2).applyOnTheRight(i+1,i,G);\n          m_T.topRows(i+2).applyOnTheRight(i+1,i,G);\n          // update Z\n          if (m_computeQZ)\n            m_Z.applyOnTheLeft(i+1,i,G.adjoint());\n\n          m_S.coeffRef(i+1,i) = Scalar(0.0);\n          m_T.coeffRef(i+1,i) = Scalar(0.0);\n        }\n      }\n      else\n      {\n        pushDownZero(j,i,i+1);\n      }\n    }\n\n  /** \\internal use zero in T(z,z) to zero S(l,l-1), working in block f..l */\n  template<typename MatrixType>\n    inline void RealQZ<MatrixType>::pushDownZero(Index z, Index f, Index l)\n    {\n      JRs G;\n      const Index dim = m_S.cols();\n      for (Index zz=z; zz<l; zz++)\n      {\n        // push 0 down\n        Index firstColS = zz>f ? (zz-1) : zz;\n        G.makeGivens(m_T.coeff(zz, zz+1), m_T.coeff(zz+1, zz+1));\n        m_S.rightCols(dim-firstColS).applyOnTheLeft(zz,zz+1,G.adjoint());\n        m_T.rightCols(dim-zz).applyOnTheLeft(zz,zz+1,G.adjoint());\n        m_T.coeffRef(zz+1,zz+1) = Scalar(0.0);\n        // update Q\n        if (m_computeQZ)\n          m_Q.applyOnTheRight(zz,zz+1,G);\n        // kill S(zz+1, zz-1)\n        if (zz>f)\n        {\n          G.makeGivens(m_S.coeff(zz+1, zz), m_S.coeff(zz+1,zz-1));\n          m_S.topRows(zz+2).applyOnTheRight(zz, zz-1,G);\n          m_T.topRows(zz+1).applyOnTheRight(zz, zz-1,G);\n          m_S.coeffRef(zz+1,zz-1) = Scalar(0.0);\n          // update Z\n          if (m_computeQZ)\n            m_Z.applyOnTheLeft(zz,zz-1,G.adjoint());\n        }\n      }\n      // finally kill S(l,l-1)\n      G.makeGivens(m_S.coeff(l,l), m_S.coeff(l,l-1));\n      m_S.applyOnTheRight(l,l-1,G);\n      m_T.applyOnTheRight(l,l-1,G);\n      m_S.coeffRef(l,l-1)=Scalar(0.0);\n      // update Z\n      if (m_computeQZ)\n        m_Z.applyOnTheLeft(l,l-1,G.adjoint());\n    }\n\n  /** \\internal QR-like iterative step for block f..l */\n  template<typename MatrixType>\n    inline void RealQZ<MatrixType>::step(Index f, Index l, Index iter)\n    {\n      using std::abs;\n      const Index dim = m_S.cols();\n\n      // x, y, z\n      Scalar x, y, z;\n      if (iter==10)\n      {\n        // Wilkinson ad hoc shift\n        const Scalar\n          a11=m_S.coeff(f+0,f+0), a12=m_S.coeff(f+0,f+1),\n          a21=m_S.coeff(f+1,f+0), a22=m_S.coeff(f+1,f+1), a32=m_S.coeff(f+2,f+1),\n          b12=m_T.coeff(f+0,f+1),\n          b11i=Scalar(1.0)/m_T.coeff(f+0,f+0),\n          b22i=Scalar(1.0)/m_T.coeff(f+1,f+1),\n          a87=m_S.coeff(l-1,l-2),\n          a98=m_S.coeff(l-0,l-1),\n          b77i=Scalar(1.0)/m_T.coeff(l-2,l-2),\n          b88i=Scalar(1.0)/m_T.coeff(l-1,l-1);\n        Scalar ss = abs(a87*b77i) + abs(a98*b88i),\n               lpl = Scalar(1.5)*ss,\n               ll = ss*ss;\n        x = ll + a11*a11*b11i*b11i - lpl*a11*b11i + a12*a21*b11i*b22i\n          - a11*a21*b12*b11i*b11i*b22i;\n        y = a11*a21*b11i*b11i - lpl*a21*b11i + a21*a22*b11i*b22i \n          - a21*a21*b12*b11i*b11i*b22i;\n        z = a21*a32*b11i*b22i;\n      }\n      else if (iter==16)\n      {\n        // another exceptional shift\n        x = m_S.coeff(f,f)/m_T.coeff(f,f)-m_S.coeff(l,l)/m_T.coeff(l,l) + m_S.coeff(l,l-1)*m_T.coeff(l-1,l) /\n          (m_T.coeff(l-1,l-1)*m_T.coeff(l,l));\n        y = m_S.coeff(f+1,f)/m_T.coeff(f,f);\n        z = 0;\n      }\n      else if (iter>23 && !(iter%8))\n      {\n        // extremely exceptional shift\n        x = internal::random<Scalar>(-1.0,1.0);\n        y = internal::random<Scalar>(-1.0,1.0);\n        z = internal::random<Scalar>(-1.0,1.0);\n      }\n      else\n      {\n        // Compute the shifts: (x,y,z,0...) = (AB^-1 - l1 I) (AB^-1 - l2 I) e1\n        // where l1 and l2 are the eigenvalues of the 2x2 matrix C = U V^-1 where\n        // U and V are 2x2 bottom right sub matrices of A and B. Thus:\n        //  = AB^-1AB^-1 + l1 l2 I - (l1+l2)(AB^-1)\n        //  = AB^-1AB^-1 + det(M) - tr(M)(AB^-1)\n        // Since we are only interested in having x, y, z with a correct ratio, we have:\n        const Scalar\n          a11 = m_S.coeff(f,f),     a12 = m_S.coeff(f,f+1),\n          a21 = m_S.coeff(f+1,f),   a22 = m_S.coeff(f+1,f+1),\n                                    a32 = m_S.coeff(f+2,f+1),\n\n          a88 = m_S.coeff(l-1,l-1), a89 = m_S.coeff(l-1,l),\n          a98 = m_S.coeff(l,l-1),   a99 = m_S.coeff(l,l),\n\n          b11 = m_T.coeff(f,f),     b12 = m_T.coeff(f,f+1),\n                                    b22 = m_T.coeff(f+1,f+1),\n\n          b88 = m_T.coeff(l-1,l-1), b89 = m_T.coeff(l-1,l),\n                                    b99 = m_T.coeff(l,l);\n\n        x = ( (a88/b88 - a11/b11)*(a99/b99 - a11/b11) - (a89/b99)*(a98/b88) + (a98/b88)*(b89/b99)*(a11/b11) ) * (b11/a21)\n          + a12/b22 - (a11/b11)*(b12/b22);\n        y = (a22/b22-a11/b11) - (a21/b11)*(b12/b22) - (a88/b88-a11/b11) - (a99/b99-a11/b11) + (a98/b88)*(b89/b99);\n        z = a32/b22;\n      }\n\n      JRs G;\n\n      for (Index k=f; k<=l-2; k++)\n      {\n        // variables for Householder reflections\n        Vector2s essential2;\n        Scalar tau, beta;\n\n        Vector3s hr(x,y,z);\n\n        // Q_k to annihilate S(k+1,k-1) and S(k+2,k-1)\n        hr.makeHouseholderInPlace(tau, beta);\n        essential2 = hr.template bottomRows<2>();\n        Index fc=(std::max)(k-1,Index(0));  // first col to update\n        m_S.template middleRows<3>(k).rightCols(dim-fc).applyHouseholderOnTheLeft(essential2, tau, m_workspace.data());\n        m_T.template middleRows<3>(k).rightCols(dim-fc).applyHouseholderOnTheLeft(essential2, tau, m_workspace.data());\n        if (m_computeQZ)\n          m_Q.template middleCols<3>(k).applyHouseholderOnTheRight(essential2, tau, m_workspace.data());\n        if (k>f)\n          m_S.coeffRef(k+2,k-1) = m_S.coeffRef(k+1,k-1) = Scalar(0.0);\n\n        // Z_{k1} to annihilate T(k+2,k+1) and T(k+2,k)\n        hr << m_T.coeff(k+2,k+2),m_T.coeff(k+2,k),m_T.coeff(k+2,k+1);\n        hr.makeHouseholderInPlace(tau, beta);\n        essential2 = hr.template bottomRows<2>();\n        {\n          Index lr = (std::min)(k+4,dim); // last row to update\n          Map<Matrix<Scalar,Dynamic,1> > tmp(m_workspace.data(),lr);\n          // S\n          tmp = m_S.template middleCols<2>(k).topRows(lr) * essential2;\n          tmp += m_S.col(k+2).head(lr);\n          m_S.col(k+2).head(lr) -= tau*tmp;\n          m_S.template middleCols<2>(k).topRows(lr) -= (tau*tmp) * essential2.adjoint();\n          // T\n          tmp = m_T.template middleCols<2>(k).topRows(lr) * essential2;\n          tmp += m_T.col(k+2).head(lr);\n          m_T.col(k+2).head(lr) -= tau*tmp;\n          m_T.template middleCols<2>(k).topRows(lr) -= (tau*tmp) * essential2.adjoint();\n        }\n        if (m_computeQZ)\n        {\n          // Z\n          Map<Matrix<Scalar,1,Dynamic> > tmp(m_workspace.data(),dim);\n          tmp = essential2.adjoint()*(m_Z.template middleRows<2>(k));\n          tmp += m_Z.row(k+2);\n          m_Z.row(k+2) -= tau*tmp;\n          m_Z.template middleRows<2>(k) -= essential2 * (tau*tmp);\n        }\n        m_T.coeffRef(k+2,k) = m_T.coeffRef(k+2,k+1) = Scalar(0.0);\n\n        // Z_{k2} to annihilate T(k+1,k)\n        G.makeGivens(m_T.coeff(k+1,k+1), m_T.coeff(k+1,k));\n        m_S.applyOnTheRight(k+1,k,G);\n        m_T.applyOnTheRight(k+1,k,G);\n        // update Z\n        if (m_computeQZ)\n          m_Z.applyOnTheLeft(k+1,k,G.adjoint());\n        m_T.coeffRef(k+1,k) = Scalar(0.0);\n\n        // update x,y,z\n        x = m_S.coeff(k+1,k);\n        y = m_S.coeff(k+2,k);\n        if (k < l-2)\n          z = m_S.coeff(k+3,k);\n      } // loop over k\n\n      // Q_{n-1} to annihilate y = S(l,l-2)\n      G.makeGivens(x,y);\n      m_S.applyOnTheLeft(l-1,l,G.adjoint());\n      m_T.applyOnTheLeft(l-1,l,G.adjoint());\n      if (m_computeQZ)\n        m_Q.applyOnTheRight(l-1,l,G);\n      m_S.coeffRef(l,l-2) = Scalar(0.0);\n\n      // Z_{n-1} to annihilate T(l,l-1)\n      G.makeGivens(m_T.coeff(l,l),m_T.coeff(l,l-1));\n      m_S.applyOnTheRight(l,l-1,G);\n      m_T.applyOnTheRight(l,l-1,G);\n      if (m_computeQZ)\n        m_Z.applyOnTheLeft(l,l-1,G.adjoint());\n      m_T.coeffRef(l,l-1) = Scalar(0.0);\n    }\n\n  template<typename MatrixType>\n    RealQZ<MatrixType>& RealQZ<MatrixType>::compute(const MatrixType& A_in, const MatrixType& B_in, bool computeQZ)\n    {\n\n      const Index dim = A_in.cols();\n\n      eigen_assert (A_in.rows()==dim && A_in.cols()==dim \n          && B_in.rows()==dim && B_in.cols()==dim \n          && \"Need square matrices of the same dimension\");\n\n      m_isInitialized = true;\n      m_computeQZ = computeQZ;\n      m_S = A_in; m_T = B_in;\n      m_workspace.resize(dim*2);\n      m_global_iter = 0;\n\n      // entrance point: hessenberg triangular decomposition\n      hessenbergTriangular();\n      // compute L1 vector norms of T, S into m_normOfS, m_normOfT\n      computeNorms();\n\n      Index l = dim-1, \n            f, \n            local_iter = 0;\n\n      while (l>0 && local_iter<m_maxIters)\n      {\n        f = findSmallSubdiagEntry(l);\n        // now rows and columns f..l (including) decouple from the rest of the problem\n        if (f>0) m_S.coeffRef(f,f-1) = Scalar(0.0);\n        if (f == l) // One root found\n        {\n          l--;\n          local_iter = 0;\n        }\n        else if (f == l-1) // Two roots found\n        {\n          splitOffTwoRows(f);\n          l -= 2;\n          local_iter = 0;\n        }\n        else // No convergence yet\n        {\n          // if there's zero on diagonal of T, we can isolate an eigenvalue with Givens rotations\n          Index z = findSmallDiagEntry(f,l);\n          if (z>=f)\n          {\n            // zero found\n            pushDownZero(z,f,l);\n          }\n          else\n          {\n            // We are sure now that S.block(f,f, l-f+1,l-f+1) is underuced upper-Hessenberg \n            // and T.block(f,f, l-f+1,l-f+1) is invertible uper-triangular, which allows to\n            // apply a QR-like iteration to rows and columns f..l.\n            step(f,l, local_iter);\n            local_iter++;\n            m_global_iter++;\n          }\n        }\n      }\n      // check if we converged before reaching iterations limit\n      m_info = (local_iter<m_maxIters) ? Success : NoConvergence;\n\n      // For each non triangular 2x2 diagonal block of S,\n      //    reduce the respective 2x2 diagonal block of T to positive diagonal form using 2x2 SVD.\n      // This step is not mandatory for QZ, but it does help further extraction of eigenvalues/eigenvectors,\n      // and is in par with Lapack/Matlab QZ.\n      if(m_info==Success)\n      {\n        for(Index i=0; i<dim-1; ++i)\n        {\n          if(m_S.coeff(i+1, i) != Scalar(0))\n          {\n            JacobiRotation<Scalar> j_left, j_right;\n            internal::real_2x2_jacobi_svd(m_T, i, i+1, &j_left, &j_right);\n\n            // Apply resulting Jacobi rotations\n            m_S.applyOnTheLeft(i,i+1,j_left);\n            m_S.applyOnTheRight(i,i+1,j_right);\n            m_T.applyOnTheLeft(i,i+1,j_left);\n            m_T.applyOnTheRight(i,i+1,j_right);\n            m_T(i+1,i) = m_T(i,i+1) = Scalar(0);\n\n            if(m_computeQZ) {\n              m_Q.applyOnTheRight(i,i+1,j_left.transpose());\n              m_Z.applyOnTheLeft(i,i+1,j_right.transpose());\n            }\n\n            i++;\n          }\n        }\n      }\n\n      return *this;\n    } // end compute\n\n} // end namespace Eigen\n\n#endif //EIGEN_REAL_QZ\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Eigenvalues/RealSchur.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2010,2012 Jitse Niesen <jitse@maths.leeds.ac.uk>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_REAL_SCHUR_H\n#define EIGEN_REAL_SCHUR_H\n\n#include \"./HessenbergDecomposition.h\"\n\nnamespace Eigen { \n\n/** \\eigenvalues_module \\ingroup Eigenvalues_Module\n  *\n  *\n  * \\class RealSchur\n  *\n  * \\brief Performs a real Schur decomposition of a square matrix\n  *\n  * \\tparam _MatrixType the type of the matrix of which we are computing the\n  * real Schur decomposition; this is expected to be an instantiation of the\n  * Matrix class template.\n  *\n  * Given a real square matrix A, this class computes the real Schur\n  * decomposition: \\f$ A = U T U^T \\f$ where U is a real orthogonal matrix and\n  * T is a real quasi-triangular matrix. An orthogonal matrix is a matrix whose\n  * inverse is equal to its transpose, \\f$ U^{-1} = U^T \\f$. A quasi-triangular\n  * matrix is a block-triangular matrix whose diagonal consists of 1-by-1\n  * blocks and 2-by-2 blocks with complex eigenvalues. The eigenvalues of the\n  * blocks on the diagonal of T are the same as the eigenvalues of the matrix\n  * A, and thus the real Schur decomposition is used in EigenSolver to compute\n  * the eigendecomposition of a matrix.\n  *\n  * Call the function compute() to compute the real Schur decomposition of a\n  * given matrix. Alternatively, you can use the RealSchur(const MatrixType&, bool)\n  * constructor which computes the real Schur decomposition at construction\n  * time. Once the decomposition is computed, you can use the matrixU() and\n  * matrixT() functions to retrieve the matrices U and T in the decomposition.\n  *\n  * The documentation of RealSchur(const MatrixType&, bool) contains an example\n  * of the typical use of this class.\n  *\n  * \\note The implementation is adapted from\n  * <a href=\"http://math.nist.gov/javanumerics/jama/\">JAMA</a> (public domain).\n  * Their code is based on EISPACK.\n  *\n  * \\sa class ComplexSchur, class EigenSolver, class ComplexEigenSolver\n  */\ntemplate<typename _MatrixType> class RealSchur\n{\n  public:\n    typedef _MatrixType MatrixType;\n    enum {\n      RowsAtCompileTime = MatrixType::RowsAtCompileTime,\n      ColsAtCompileTime = MatrixType::ColsAtCompileTime,\n      Options = MatrixType::Options,\n      MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime,\n      MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime\n    };\n    typedef typename MatrixType::Scalar Scalar;\n    typedef std::complex<typename NumTraits<Scalar>::Real> ComplexScalar;\n    typedef Eigen::Index Index; ///< \\deprecated since Eigen 3.3\n\n    typedef Matrix<ComplexScalar, ColsAtCompileTime, 1, Options & ~RowMajor, MaxColsAtCompileTime, 1> EigenvalueType;\n    typedef Matrix<Scalar, ColsAtCompileTime, 1, Options & ~RowMajor, MaxColsAtCompileTime, 1> ColumnVectorType;\n\n    /** \\brief Default constructor.\n      *\n      * \\param [in] size  Positive integer, size of the matrix whose Schur decomposition will be computed.\n      *\n      * The default constructor is useful in cases in which the user intends to\n      * perform decompositions via compute().  The \\p size parameter is only\n      * used as a hint. It is not an error to give a wrong \\p size, but it may\n      * impair performance.\n      *\n      * \\sa compute() for an example.\n      */\n    explicit RealSchur(Index size = RowsAtCompileTime==Dynamic ? 1 : RowsAtCompileTime)\n            : m_matT(size, size),\n              m_matU(size, size),\n              m_workspaceVector(size),\n              m_hess(size),\n              m_isInitialized(false),\n              m_matUisUptodate(false),\n              m_maxIters(-1)\n    { }\n\n    /** \\brief Constructor; computes real Schur decomposition of given matrix. \n      * \n      * \\param[in]  matrix    Square matrix whose Schur decomposition is to be computed.\n      * \\param[in]  computeU  If true, both T and U are computed; if false, only T is computed.\n      *\n      * This constructor calls compute() to compute the Schur decomposition.\n      *\n      * Example: \\include RealSchur_RealSchur_MatrixType.cpp\n      * Output: \\verbinclude RealSchur_RealSchur_MatrixType.out\n      */\n    template<typename InputType>\n    explicit RealSchur(const EigenBase<InputType>& matrix, bool computeU = true)\n            : m_matT(matrix.rows(),matrix.cols()),\n              m_matU(matrix.rows(),matrix.cols()),\n              m_workspaceVector(matrix.rows()),\n              m_hess(matrix.rows()),\n              m_isInitialized(false),\n              m_matUisUptodate(false),\n              m_maxIters(-1)\n    {\n      compute(matrix.derived(), computeU);\n    }\n\n    /** \\brief Returns the orthogonal matrix in the Schur decomposition. \n      *\n      * \\returns A const reference to the matrix U.\n      *\n      * \\pre Either the constructor RealSchur(const MatrixType&, bool) or the\n      * member function compute(const MatrixType&, bool) has been called before\n      * to compute the Schur decomposition of a matrix, and \\p computeU was set\n      * to true (the default value).\n      *\n      * \\sa RealSchur(const MatrixType&, bool) for an example\n      */\n    const MatrixType& matrixU() const\n    {\n      eigen_assert(m_isInitialized && \"RealSchur is not initialized.\");\n      eigen_assert(m_matUisUptodate && \"The matrix U has not been computed during the RealSchur decomposition.\");\n      return m_matU;\n    }\n\n    /** \\brief Returns the quasi-triangular matrix in the Schur decomposition. \n      *\n      * \\returns A const reference to the matrix T.\n      *\n      * \\pre Either the constructor RealSchur(const MatrixType&, bool) or the\n      * member function compute(const MatrixType&, bool) has been called before\n      * to compute the Schur decomposition of a matrix.\n      *\n      * \\sa RealSchur(const MatrixType&, bool) for an example\n      */\n    const MatrixType& matrixT() const\n    {\n      eigen_assert(m_isInitialized && \"RealSchur is not initialized.\");\n      return m_matT;\n    }\n  \n    /** \\brief Computes Schur decomposition of given matrix. \n      * \n      * \\param[in]  matrix    Square matrix whose Schur decomposition is to be computed.\n      * \\param[in]  computeU  If true, both T and U are computed; if false, only T is computed.\n      * \\returns    Reference to \\c *this\n      *\n      * The Schur decomposition is computed by first reducing the matrix to\n      * Hessenberg form using the class HessenbergDecomposition. The Hessenberg\n      * matrix is then reduced to triangular form by performing Francis QR\n      * iterations with implicit double shift. The cost of computing the Schur\n      * decomposition depends on the number of iterations; as a rough guide, it\n      * may be taken to be \\f$25n^3\\f$ flops if \\a computeU is true and\n      * \\f$10n^3\\f$ flops if \\a computeU is false.\n      *\n      * Example: \\include RealSchur_compute.cpp\n      * Output: \\verbinclude RealSchur_compute.out\n      *\n      * \\sa compute(const MatrixType&, bool, Index)\n      */\n    template<typename InputType>\n    RealSchur& compute(const EigenBase<InputType>& matrix, bool computeU = true);\n\n    /** \\brief Computes Schur decomposition of a Hessenberg matrix H = Z T Z^T\n     *  \\param[in] matrixH Matrix in Hessenberg form H\n     *  \\param[in] matrixQ orthogonal matrix Q that transform a matrix A to H : A = Q H Q^T\n     *  \\param computeU Computes the matriX U of the Schur vectors\n     * \\return Reference to \\c *this\n     * \n     *  This routine assumes that the matrix is already reduced in Hessenberg form matrixH\n     *  using either the class HessenbergDecomposition or another mean. \n     *  It computes the upper quasi-triangular matrix T of the Schur decomposition of H\n     *  When computeU is true, this routine computes the matrix U such that \n     *  A = U T U^T =  (QZ) T (QZ)^T = Q H Q^T where A is the initial matrix\n     * \n     * NOTE Q is referenced if computeU is true; so, if the initial orthogonal matrix\n     * is not available, the user should give an identity matrix (Q.setIdentity())\n     * \n     * \\sa compute(const MatrixType&, bool)\n     */\n    template<typename HessMatrixType, typename OrthMatrixType>\n    RealSchur& computeFromHessenberg(const HessMatrixType& matrixH, const OrthMatrixType& matrixQ,  bool computeU);\n    /** \\brief Reports whether previous computation was successful.\n      *\n      * \\returns \\c Success if computation was successful, \\c NoConvergence otherwise.\n      */\n    ComputationInfo info() const\n    {\n      eigen_assert(m_isInitialized && \"RealSchur is not initialized.\");\n      return m_info;\n    }\n\n    /** \\brief Sets the maximum number of iterations allowed. \n      *\n      * If not specified by the user, the maximum number of iterations is m_maxIterationsPerRow times the size\n      * of the matrix.\n      */\n    RealSchur& setMaxIterations(Index maxIters)\n    {\n      m_maxIters = maxIters;\n      return *this;\n    }\n\n    /** \\brief Returns the maximum number of iterations. */\n    Index getMaxIterations()\n    {\n      return m_maxIters;\n    }\n\n    /** \\brief Maximum number of iterations per row.\n      *\n      * If not otherwise specified, the maximum number of iterations is this number times the size of the\n      * matrix. It is currently set to 40.\n      */\n    static const int m_maxIterationsPerRow = 40;\n\n  private:\n    \n    MatrixType m_matT;\n    MatrixType m_matU;\n    ColumnVectorType m_workspaceVector;\n    HessenbergDecomposition<MatrixType> m_hess;\n    ComputationInfo m_info;\n    bool m_isInitialized;\n    bool m_matUisUptodate;\n    Index m_maxIters;\n\n    typedef Matrix<Scalar,3,1> Vector3s;\n\n    Scalar computeNormOfT();\n    Index findSmallSubdiagEntry(Index iu, const Scalar& considerAsZero);\n    void splitOffTwoRows(Index iu, bool computeU, const Scalar& exshift);\n    void computeShift(Index iu, Index iter, Scalar& exshift, Vector3s& shiftInfo);\n    void initFrancisQRStep(Index il, Index iu, const Vector3s& shiftInfo, Index& im, Vector3s& firstHouseholderVector);\n    void performFrancisQRStep(Index il, Index im, Index iu, bool computeU, const Vector3s& firstHouseholderVector, Scalar* workspace);\n};\n\n\ntemplate<typename MatrixType>\ntemplate<typename InputType>\nRealSchur<MatrixType>& RealSchur<MatrixType>::compute(const EigenBase<InputType>& matrix, bool computeU)\n{\n  const Scalar considerAsZero = (std::numeric_limits<Scalar>::min)();\n\n  eigen_assert(matrix.cols() == matrix.rows());\n  Index maxIters = m_maxIters;\n  if (maxIters == -1)\n    maxIters = m_maxIterationsPerRow * matrix.rows();\n\n  Scalar scale = matrix.derived().cwiseAbs().maxCoeff();\n  if(scale<considerAsZero)\n  {\n    m_matT.setZero(matrix.rows(),matrix.cols());\n    if(computeU)\n      m_matU.setIdentity(matrix.rows(),matrix.cols());\n    m_info = Success;\n    m_isInitialized = true;\n    m_matUisUptodate = computeU;\n    return *this;\n  }\n\n  // Step 1. Reduce to Hessenberg form\n  m_hess.compute(matrix.derived()/scale);\n\n  // Step 2. Reduce to real Schur form\n  // Note: we copy m_hess.matrixQ() into m_matU here and not in computeFromHessenberg\n  //       to be able to pass our working-space buffer for the Householder to Dense evaluation.\n  m_workspaceVector.resize(matrix.cols());\n  if(computeU)\n    m_hess.matrixQ().evalTo(m_matU, m_workspaceVector);\n  computeFromHessenberg(m_hess.matrixH(), m_matU, computeU);\n\n  m_matT *= scale;\n  \n  return *this;\n}\ntemplate<typename MatrixType>\ntemplate<typename HessMatrixType, typename OrthMatrixType>\nRealSchur<MatrixType>& RealSchur<MatrixType>::computeFromHessenberg(const HessMatrixType& matrixH, const OrthMatrixType& matrixQ,  bool computeU)\n{\n  using std::abs;\n\n  m_matT = matrixH;\n  m_workspaceVector.resize(m_matT.cols());\n  if(computeU && !internal::is_same_dense(m_matU,matrixQ))\n    m_matU = matrixQ;\n  \n  Index maxIters = m_maxIters;\n  if (maxIters == -1)\n    maxIters = m_maxIterationsPerRow * matrixH.rows();\n  Scalar* workspace = &m_workspaceVector.coeffRef(0);\n\n  // The matrix m_matT is divided in three parts. \n  // Rows 0,...,il-1 are decoupled from the rest because m_matT(il,il-1) is zero. \n  // Rows il,...,iu is the part we are working on (the active window).\n  // Rows iu+1,...,end are already brought in triangular form.\n  Index iu = m_matT.cols() - 1;\n  Index iter = 0;      // iteration count for current eigenvalue\n  Index totalIter = 0; // iteration count for whole matrix\n  Scalar exshift(0);   // sum of exceptional shifts\n  Scalar norm = computeNormOfT();\n  // sub-diagonal entries smaller than considerAsZero will be treated as zero.\n  // We use eps^2 to enable more precision in small eigenvalues.\n  Scalar considerAsZero = numext::maxi<Scalar>( norm * numext::abs2(NumTraits<Scalar>::epsilon()),\n                                                (std::numeric_limits<Scalar>::min)() );\n\n  if(norm!=Scalar(0))\n  {\n    while (iu >= 0)\n    {\n      Index il = findSmallSubdiagEntry(iu,considerAsZero);\n\n      // Check for convergence\n      if (il == iu) // One root found\n      {\n        m_matT.coeffRef(iu,iu) = m_matT.coeff(iu,iu) + exshift;\n        if (iu > 0)\n          m_matT.coeffRef(iu, iu-1) = Scalar(0);\n        iu--;\n        iter = 0;\n      }\n      else if (il == iu-1) // Two roots found\n      {\n        splitOffTwoRows(iu, computeU, exshift);\n        iu -= 2;\n        iter = 0;\n      }\n      else // No convergence yet\n      {\n        // The firstHouseholderVector vector has to be initialized to something to get rid of a silly GCC warning (-O1 -Wall -DNDEBUG )\n        Vector3s firstHouseholderVector = Vector3s::Zero(), shiftInfo;\n        computeShift(iu, iter, exshift, shiftInfo);\n        iter = iter + 1;\n        totalIter = totalIter + 1;\n        if (totalIter > maxIters) break;\n        Index im;\n        initFrancisQRStep(il, iu, shiftInfo, im, firstHouseholderVector);\n        performFrancisQRStep(il, im, iu, computeU, firstHouseholderVector, workspace);\n      }\n    }\n  }\n  if(totalIter <= maxIters)\n    m_info = Success;\n  else\n    m_info = NoConvergence;\n\n  m_isInitialized = true;\n  m_matUisUptodate = computeU;\n  return *this;\n}\n\n/** \\internal Computes and returns vector L1 norm of T */\ntemplate<typename MatrixType>\ninline typename MatrixType::Scalar RealSchur<MatrixType>::computeNormOfT()\n{\n  const Index size = m_matT.cols();\n  // FIXME to be efficient the following would requires a triangular reduxion code\n  // Scalar norm = m_matT.upper().cwiseAbs().sum() \n  //               + m_matT.bottomLeftCorner(size-1,size-1).diagonal().cwiseAbs().sum();\n  Scalar norm(0);\n  for (Index j = 0; j < size; ++j)\n    norm += m_matT.col(j).segment(0, (std::min)(size,j+2)).cwiseAbs().sum();\n  return norm;\n}\n\n/** \\internal Look for single small sub-diagonal element and returns its index */\ntemplate<typename MatrixType>\ninline Index RealSchur<MatrixType>::findSmallSubdiagEntry(Index iu, const Scalar& considerAsZero)\n{\n  using std::abs;\n  Index res = iu;\n  while (res > 0)\n  {\n    Scalar s = abs(m_matT.coeff(res-1,res-1)) + abs(m_matT.coeff(res,res));\n\n    s = numext::maxi<Scalar>(s * NumTraits<Scalar>::epsilon(), considerAsZero);\n    \n    if (abs(m_matT.coeff(res,res-1)) <= s)\n      break;\n    res--;\n  }\n  return res;\n}\n\n/** \\internal Update T given that rows iu-1 and iu decouple from the rest. */\ntemplate<typename MatrixType>\ninline void RealSchur<MatrixType>::splitOffTwoRows(Index iu, bool computeU, const Scalar& exshift)\n{\n  using std::sqrt;\n  using std::abs;\n  const Index size = m_matT.cols();\n\n  // The eigenvalues of the 2x2 matrix [a b; c d] are \n  // trace +/- sqrt(discr/4) where discr = tr^2 - 4*det, tr = a + d, det = ad - bc\n  Scalar p = Scalar(0.5) * (m_matT.coeff(iu-1,iu-1) - m_matT.coeff(iu,iu));\n  Scalar q = p * p + m_matT.coeff(iu,iu-1) * m_matT.coeff(iu-1,iu);   // q = tr^2 / 4 - det = discr/4\n  m_matT.coeffRef(iu,iu) += exshift;\n  m_matT.coeffRef(iu-1,iu-1) += exshift;\n\n  if (q >= Scalar(0)) // Two real eigenvalues\n  {\n    Scalar z = sqrt(abs(q));\n    JacobiRotation<Scalar> rot;\n    if (p >= Scalar(0))\n      rot.makeGivens(p + z, m_matT.coeff(iu, iu-1));\n    else\n      rot.makeGivens(p - z, m_matT.coeff(iu, iu-1));\n\n    m_matT.rightCols(size-iu+1).applyOnTheLeft(iu-1, iu, rot.adjoint());\n    m_matT.topRows(iu+1).applyOnTheRight(iu-1, iu, rot);\n    m_matT.coeffRef(iu, iu-1) = Scalar(0); \n    if (computeU)\n      m_matU.applyOnTheRight(iu-1, iu, rot);\n  }\n\n  if (iu > 1) \n    m_matT.coeffRef(iu-1, iu-2) = Scalar(0);\n}\n\n/** \\internal Form shift in shiftInfo, and update exshift if an exceptional shift is performed. */\ntemplate<typename MatrixType>\ninline void RealSchur<MatrixType>::computeShift(Index iu, Index iter, Scalar& exshift, Vector3s& shiftInfo)\n{\n  using std::sqrt;\n  using std::abs;\n  shiftInfo.coeffRef(0) = m_matT.coeff(iu,iu);\n  shiftInfo.coeffRef(1) = m_matT.coeff(iu-1,iu-1);\n  shiftInfo.coeffRef(2) = m_matT.coeff(iu,iu-1) * m_matT.coeff(iu-1,iu);\n\n  // Wilkinson's original ad hoc shift\n  if (iter == 10)\n  {\n    exshift += shiftInfo.coeff(0);\n    for (Index i = 0; i <= iu; ++i)\n      m_matT.coeffRef(i,i) -= shiftInfo.coeff(0);\n    Scalar s = abs(m_matT.coeff(iu,iu-1)) + abs(m_matT.coeff(iu-1,iu-2));\n    shiftInfo.coeffRef(0) = Scalar(0.75) * s;\n    shiftInfo.coeffRef(1) = Scalar(0.75) * s;\n    shiftInfo.coeffRef(2) = Scalar(-0.4375) * s * s;\n  }\n\n  // MATLAB's new ad hoc shift\n  if (iter == 30)\n  {\n    Scalar s = (shiftInfo.coeff(1) - shiftInfo.coeff(0)) / Scalar(2.0);\n    s = s * s + shiftInfo.coeff(2);\n    if (s > Scalar(0))\n    {\n      s = sqrt(s);\n      if (shiftInfo.coeff(1) < shiftInfo.coeff(0))\n        s = -s;\n      s = s + (shiftInfo.coeff(1) - shiftInfo.coeff(0)) / Scalar(2.0);\n      s = shiftInfo.coeff(0) - shiftInfo.coeff(2) / s;\n      exshift += s;\n      for (Index i = 0; i <= iu; ++i)\n        m_matT.coeffRef(i,i) -= s;\n      shiftInfo.setConstant(Scalar(0.964));\n    }\n  }\n}\n\n/** \\internal Compute index im at which Francis QR step starts and the first Householder vector. */\ntemplate<typename MatrixType>\ninline void RealSchur<MatrixType>::initFrancisQRStep(Index il, Index iu, const Vector3s& shiftInfo, Index& im, Vector3s& firstHouseholderVector)\n{\n  using std::abs;\n  Vector3s& v = firstHouseholderVector; // alias to save typing\n\n  for (im = iu-2; im >= il; --im)\n  {\n    const Scalar Tmm = m_matT.coeff(im,im);\n    const Scalar r = shiftInfo.coeff(0) - Tmm;\n    const Scalar s = shiftInfo.coeff(1) - Tmm;\n    v.coeffRef(0) = (r * s - shiftInfo.coeff(2)) / m_matT.coeff(im+1,im) + m_matT.coeff(im,im+1);\n    v.coeffRef(1) = m_matT.coeff(im+1,im+1) - Tmm - r - s;\n    v.coeffRef(2) = m_matT.coeff(im+2,im+1);\n    if (im == il) {\n      break;\n    }\n    const Scalar lhs = m_matT.coeff(im,im-1) * (abs(v.coeff(1)) + abs(v.coeff(2)));\n    const Scalar rhs = v.coeff(0) * (abs(m_matT.coeff(im-1,im-1)) + abs(Tmm) + abs(m_matT.coeff(im+1,im+1)));\n    if (abs(lhs) < NumTraits<Scalar>::epsilon() * rhs)\n      break;\n  }\n}\n\n/** \\internal Perform a Francis QR step involving rows il:iu and columns im:iu. */\ntemplate<typename MatrixType>\ninline void RealSchur<MatrixType>::performFrancisQRStep(Index il, Index im, Index iu, bool computeU, const Vector3s& firstHouseholderVector, Scalar* workspace)\n{\n  eigen_assert(im >= il);\n  eigen_assert(im <= iu-2);\n\n  const Index size = m_matT.cols();\n\n  for (Index k = im; k <= iu-2; ++k)\n  {\n    bool firstIteration = (k == im);\n\n    Vector3s v;\n    if (firstIteration)\n      v = firstHouseholderVector;\n    else\n      v = m_matT.template block<3,1>(k,k-1);\n\n    Scalar tau, beta;\n    Matrix<Scalar, 2, 1> ess;\n    v.makeHouseholder(ess, tau, beta);\n    \n    if (beta != Scalar(0)) // if v is not zero\n    {\n      if (firstIteration && k > il)\n        m_matT.coeffRef(k,k-1) = -m_matT.coeff(k,k-1);\n      else if (!firstIteration)\n        m_matT.coeffRef(k,k-1) = beta;\n\n      // These Householder transformations form the O(n^3) part of the algorithm\n      m_matT.block(k, k, 3, size-k).applyHouseholderOnTheLeft(ess, tau, workspace);\n      m_matT.block(0, k, (std::min)(iu,k+3) + 1, 3).applyHouseholderOnTheRight(ess, tau, workspace);\n      if (computeU)\n        m_matU.block(0, k, size, 3).applyHouseholderOnTheRight(ess, tau, workspace);\n    }\n  }\n\n  Matrix<Scalar, 2, 1> v = m_matT.template block<2,1>(iu-1, iu-2);\n  Scalar tau, beta;\n  Matrix<Scalar, 1, 1> ess;\n  v.makeHouseholder(ess, tau, beta);\n\n  if (beta != Scalar(0)) // if v is not zero\n  {\n    m_matT.coeffRef(iu-1, iu-2) = beta;\n    m_matT.block(iu-1, iu-1, 2, size-iu+1).applyHouseholderOnTheLeft(ess, tau, workspace);\n    m_matT.block(0, iu-1, iu+1, 2).applyHouseholderOnTheRight(ess, tau, workspace);\n    if (computeU)\n      m_matU.block(0, iu-1, size, 2).applyHouseholderOnTheRight(ess, tau, workspace);\n  }\n\n  // clean up pollution due to round-off errors\n  for (Index i = im+2; i <= iu; ++i)\n  {\n    m_matT.coeffRef(i,i-2) = Scalar(0);\n    if (i > im+2)\n      m_matT.coeffRef(i,i-3) = Scalar(0);\n  }\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_REAL_SCHUR_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Eigenvalues/RealSchur_LAPACKE.h",
    "content": "/*\n Copyright (c) 2011, Intel Corporation. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without modification,\n are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n   list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n * Neither the name of Intel Corporation nor the names of its contributors may\n   be used to endorse or promote products derived from this software without\n   specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\n ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n ********************************************************************************\n *   Content : Eigen bindings to LAPACKe\n *    Real Schur needed to real unsymmetrical eigenvalues/eigenvectors.\n ********************************************************************************\n*/\n\n#ifndef EIGEN_REAL_SCHUR_LAPACKE_H\n#define EIGEN_REAL_SCHUR_LAPACKE_H\n\nnamespace Eigen { \n\n/** \\internal Specialization for the data types supported by LAPACKe */\n\n#define EIGEN_LAPACKE_SCHUR_REAL(EIGTYPE, LAPACKE_TYPE, LAPACKE_PREFIX, LAPACKE_PREFIX_U, EIGCOLROW, LAPACKE_COLROW) \\\ntemplate<> template<typename InputType> inline \\\nRealSchur<Matrix<EIGTYPE, Dynamic, Dynamic, EIGCOLROW> >& \\\nRealSchur<Matrix<EIGTYPE, Dynamic, Dynamic, EIGCOLROW> >::compute(const EigenBase<InputType>& matrix, bool computeU) \\\n{ \\\n  eigen_assert(matrix.cols() == matrix.rows()); \\\n\\\n  lapack_int n = internal::convert_index<lapack_int>(matrix.cols()), sdim, info; \\\n  lapack_int matrix_order = LAPACKE_COLROW; \\\n  char jobvs, sort='N'; \\\n  LAPACK_##LAPACKE_PREFIX_U##_SELECT2 select = 0; \\\n  jobvs = (computeU) ? 'V' : 'N'; \\\n  m_matU.resize(n, n); \\\n  lapack_int ldvs  = internal::convert_index<lapack_int>(m_matU.outerStride()); \\\n  m_matT = matrix; \\\n  lapack_int lda = internal::convert_index<lapack_int>(m_matT.outerStride()); \\\n  Matrix<EIGTYPE, Dynamic, Dynamic> wr, wi; \\\n  wr.resize(n, 1); wi.resize(n, 1); \\\n  info = LAPACKE_##LAPACKE_PREFIX##gees( matrix_order, jobvs, sort, select, n, (LAPACKE_TYPE*)m_matT.data(), lda, &sdim, (LAPACKE_TYPE*)wr.data(), (LAPACKE_TYPE*)wi.data(), (LAPACKE_TYPE*)m_matU.data(), ldvs ); \\\n  if(info == 0) \\\n    m_info = Success; \\\n  else \\\n    m_info = NoConvergence; \\\n\\\n  m_isInitialized = true; \\\n  m_matUisUptodate = computeU; \\\n  return *this; \\\n\\\n}\n\nEIGEN_LAPACKE_SCHUR_REAL(double,   double, d, D, ColMajor, LAPACK_COL_MAJOR)\nEIGEN_LAPACKE_SCHUR_REAL(float,    float,  s, S, ColMajor, LAPACK_COL_MAJOR)\nEIGEN_LAPACKE_SCHUR_REAL(double,   double, d, D, RowMajor, LAPACK_ROW_MAJOR)\nEIGEN_LAPACKE_SCHUR_REAL(float,    float,  s, S, RowMajor, LAPACK_ROW_MAJOR)\n\n} // end namespace Eigen\n\n#endif // EIGEN_REAL_SCHUR_LAPACKE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2010 Jitse Niesen <jitse@maths.leeds.ac.uk>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SELFADJOINTEIGENSOLVER_H\n#define EIGEN_SELFADJOINTEIGENSOLVER_H\n\n#include \"./Tridiagonalization.h\"\n\nnamespace Eigen { \n\ntemplate<typename _MatrixType>\nclass GeneralizedSelfAdjointEigenSolver;\n\nnamespace internal {\ntemplate<typename SolverType,int Size,bool IsComplex> struct direct_selfadjoint_eigenvalues;\n\ntemplate<typename MatrixType, typename DiagType, typename SubDiagType>\nEIGEN_DEVICE_FUNC\nComputationInfo computeFromTridiagonal_impl(DiagType& diag, SubDiagType& subdiag, const Index maxIterations, bool computeEigenvectors, MatrixType& eivec);\n}\n\n/** \\eigenvalues_module \\ingroup Eigenvalues_Module\n  *\n  *\n  * \\class SelfAdjointEigenSolver\n  *\n  * \\brief Computes eigenvalues and eigenvectors of selfadjoint matrices\n  *\n  * \\tparam _MatrixType the type of the matrix of which we are computing the\n  * eigendecomposition; this is expected to be an instantiation of the Matrix\n  * class template.\n  *\n  * A matrix \\f$ A \\f$ is selfadjoint if it equals its adjoint. For real\n  * matrices, this means that the matrix is symmetric: it equals its\n  * transpose. This class computes the eigenvalues and eigenvectors of a\n  * selfadjoint matrix. These are the scalars \\f$ \\lambda \\f$ and vectors\n  * \\f$ v \\f$ such that \\f$ Av = \\lambda v \\f$.  The eigenvalues of a\n  * selfadjoint matrix are always real. If \\f$ D \\f$ is a diagonal matrix with\n  * the eigenvalues on the diagonal, and \\f$ V \\f$ is a matrix with the\n  * eigenvectors as its columns, then \\f$ A = V D V^{-1} \\f$ (for selfadjoint\n  * matrices, the matrix \\f$ V \\f$ is always invertible). This is called the\n  * eigendecomposition.\n  *\n  * The algorithm exploits the fact that the matrix is selfadjoint, making it\n  * faster and more accurate than the general purpose eigenvalue algorithms\n  * implemented in EigenSolver and ComplexEigenSolver.\n  *\n  * Only the \\b lower \\b triangular \\b part of the input matrix is referenced.\n  *\n  * Call the function compute() to compute the eigenvalues and eigenvectors of\n  * a given matrix. Alternatively, you can use the\n  * SelfAdjointEigenSolver(const MatrixType&, int) constructor which computes\n  * the eigenvalues and eigenvectors at construction time. Once the eigenvalue\n  * and eigenvectors are computed, they can be retrieved with the eigenvalues()\n  * and eigenvectors() functions.\n  *\n  * The documentation for SelfAdjointEigenSolver(const MatrixType&, int)\n  * contains an example of the typical use of this class.\n  *\n  * To solve the \\em generalized eigenvalue problem \\f$ Av = \\lambda Bv \\f$ and\n  * the likes, see the class GeneralizedSelfAdjointEigenSolver.\n  *\n  * \\sa MatrixBase::eigenvalues(), class EigenSolver, class ComplexEigenSolver\n  */\ntemplate<typename _MatrixType> class SelfAdjointEigenSolver\n{\n  public:\n\n    typedef _MatrixType MatrixType;\n    enum {\n      Size = MatrixType::RowsAtCompileTime,\n      ColsAtCompileTime = MatrixType::ColsAtCompileTime,\n      Options = MatrixType::Options,\n      MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime\n    };\n    \n    /** \\brief Scalar type for matrices of type \\p _MatrixType. */\n    typedef typename MatrixType::Scalar Scalar;\n    typedef Eigen::Index Index; ///< \\deprecated since Eigen 3.3\n    \n    typedef Matrix<Scalar,Size,Size,ColMajor,MaxColsAtCompileTime,MaxColsAtCompileTime> EigenvectorsType;\n\n    /** \\brief Real scalar type for \\p _MatrixType.\n      *\n      * This is just \\c Scalar if #Scalar is real (e.g., \\c float or\n      * \\c double), and the type of the real part of \\c Scalar if #Scalar is\n      * complex.\n      */\n    typedef typename NumTraits<Scalar>::Real RealScalar;\n    \n    friend struct internal::direct_selfadjoint_eigenvalues<SelfAdjointEigenSolver,Size,NumTraits<Scalar>::IsComplex>;\n\n    /** \\brief Type for vector of eigenvalues as returned by eigenvalues().\n      *\n      * This is a column vector with entries of type #RealScalar.\n      * The length of the vector is the size of \\p _MatrixType.\n      */\n    typedef typename internal::plain_col_type<MatrixType, RealScalar>::type RealVectorType;\n    typedef Tridiagonalization<MatrixType> TridiagonalizationType;\n    typedef typename TridiagonalizationType::SubDiagonalType SubDiagonalType;\n\n    /** \\brief Default constructor for fixed-size matrices.\n      *\n      * The default constructor is useful in cases in which the user intends to\n      * perform decompositions via compute(). This constructor\n      * can only be used if \\p _MatrixType is a fixed-size matrix; use\n      * SelfAdjointEigenSolver(Index) for dynamic-size matrices.\n      *\n      * Example: \\include SelfAdjointEigenSolver_SelfAdjointEigenSolver.cpp\n      * Output: \\verbinclude SelfAdjointEigenSolver_SelfAdjointEigenSolver.out\n      */\n    EIGEN_DEVICE_FUNC\n    SelfAdjointEigenSolver()\n        : m_eivec(),\n          m_eivalues(),\n          m_subdiag(),\n          m_info(InvalidInput),\n          m_isInitialized(false),\n          m_eigenvectorsOk(false)\n    { }\n\n    /** \\brief Constructor, pre-allocates memory for dynamic-size matrices.\n      *\n      * \\param [in]  size  Positive integer, size of the matrix whose\n      * eigenvalues and eigenvectors will be computed.\n      *\n      * This constructor is useful for dynamic-size matrices, when the user\n      * intends to perform decompositions via compute(). The \\p size\n      * parameter is only used as a hint. It is not an error to give a wrong\n      * \\p size, but it may impair performance.\n      *\n      * \\sa compute() for an example\n      */\n    EIGEN_DEVICE_FUNC\n    explicit SelfAdjointEigenSolver(Index size)\n        : m_eivec(size, size),\n          m_eivalues(size),\n          m_subdiag(size > 1 ? size - 1 : 1),\n          m_isInitialized(false),\n          m_eigenvectorsOk(false)\n    {}\n\n    /** \\brief Constructor; computes eigendecomposition of given matrix.\n      *\n      * \\param[in]  matrix  Selfadjoint matrix whose eigendecomposition is to\n      *    be computed. Only the lower triangular part of the matrix is referenced.\n      * \\param[in]  options Can be #ComputeEigenvectors (default) or #EigenvaluesOnly.\n      *\n      * This constructor calls compute(const MatrixType&, int) to compute the\n      * eigenvalues of the matrix \\p matrix. The eigenvectors are computed if\n      * \\p options equals #ComputeEigenvectors.\n      *\n      * Example: \\include SelfAdjointEigenSolver_SelfAdjointEigenSolver_MatrixType.cpp\n      * Output: \\verbinclude SelfAdjointEigenSolver_SelfAdjointEigenSolver_MatrixType.out\n      *\n      * \\sa compute(const MatrixType&, int)\n      */\n    template<typename InputType>\n    EIGEN_DEVICE_FUNC\n    explicit SelfAdjointEigenSolver(const EigenBase<InputType>& matrix, int options = ComputeEigenvectors)\n      : m_eivec(matrix.rows(), matrix.cols()),\n        m_eivalues(matrix.cols()),\n        m_subdiag(matrix.rows() > 1 ? matrix.rows() - 1 : 1),\n        m_isInitialized(false),\n        m_eigenvectorsOk(false)\n    {\n      compute(matrix.derived(), options);\n    }\n\n    /** \\brief Computes eigendecomposition of given matrix.\n      *\n      * \\param[in]  matrix  Selfadjoint matrix whose eigendecomposition is to\n      *    be computed. Only the lower triangular part of the matrix is referenced.\n      * \\param[in]  options Can be #ComputeEigenvectors (default) or #EigenvaluesOnly.\n      * \\returns    Reference to \\c *this\n      *\n      * This function computes the eigenvalues of \\p matrix.  The eigenvalues()\n      * function can be used to retrieve them.  If \\p options equals #ComputeEigenvectors,\n      * then the eigenvectors are also computed and can be retrieved by\n      * calling eigenvectors().\n      *\n      * This implementation uses a symmetric QR algorithm. The matrix is first\n      * reduced to tridiagonal form using the Tridiagonalization class. The\n      * tridiagonal matrix is then brought to diagonal form with implicit\n      * symmetric QR steps with Wilkinson shift. Details can be found in\n      * Section 8.3 of Golub \\& Van Loan, <i>%Matrix Computations</i>.\n      *\n      * The cost of the computation is about \\f$ 9n^3 \\f$ if the eigenvectors\n      * are required and \\f$ 4n^3/3 \\f$ if they are not required.\n      *\n      * This method reuses the memory in the SelfAdjointEigenSolver object that\n      * was allocated when the object was constructed, if the size of the\n      * matrix does not change.\n      *\n      * Example: \\include SelfAdjointEigenSolver_compute_MatrixType.cpp\n      * Output: \\verbinclude SelfAdjointEigenSolver_compute_MatrixType.out\n      *\n      * \\sa SelfAdjointEigenSolver(const MatrixType&, int)\n      */\n    template<typename InputType>\n    EIGEN_DEVICE_FUNC\n    SelfAdjointEigenSolver& compute(const EigenBase<InputType>& matrix, int options = ComputeEigenvectors);\n    \n    /** \\brief Computes eigendecomposition of given matrix using a closed-form algorithm\n      *\n      * This is a variant of compute(const MatrixType&, int options) which\n      * directly solves the underlying polynomial equation.\n      * \n      * Currently only 2x2 and 3x3 matrices for which the sizes are known at compile time are supported (e.g., Matrix3d).\n      * \n      * This method is usually significantly faster than the QR iterative algorithm\n      * but it might also be less accurate. It is also worth noting that\n      * for 3x3 matrices it involves trigonometric operations which are\n      * not necessarily available for all scalar types.\n      * \n      * For the 3x3 case, we observed the following worst case relative error regarding the eigenvalues:\n      *   - double: 1e-8\n      *   - float:  1e-3\n      *\n      * \\sa compute(const MatrixType&, int options)\n      */\n    EIGEN_DEVICE_FUNC\n    SelfAdjointEigenSolver& computeDirect(const MatrixType& matrix, int options = ComputeEigenvectors);\n\n    /**\n      *\\brief Computes the eigen decomposition from a tridiagonal symmetric matrix\n      *\n      * \\param[in] diag The vector containing the diagonal of the matrix.\n      * \\param[in] subdiag The subdiagonal of the matrix.\n      * \\param[in] options Can be #ComputeEigenvectors (default) or #EigenvaluesOnly.\n      * \\returns Reference to \\c *this\n      *\n      * This function assumes that the matrix has been reduced to tridiagonal form.\n      *\n      * \\sa compute(const MatrixType&, int) for more information\n      */\n    SelfAdjointEigenSolver& computeFromTridiagonal(const RealVectorType& diag, const SubDiagonalType& subdiag , int options=ComputeEigenvectors);\n\n    /** \\brief Returns the eigenvectors of given matrix.\n      *\n      * \\returns  A const reference to the matrix whose columns are the eigenvectors.\n      *\n      * \\pre The eigenvectors have been computed before.\n      *\n      * Column \\f$ k \\f$ of the returned matrix is an eigenvector corresponding\n      * to eigenvalue number \\f$ k \\f$ as returned by eigenvalues().  The\n      * eigenvectors are normalized to have (Euclidean) norm equal to one. If\n      * this object was used to solve the eigenproblem for the selfadjoint\n      * matrix \\f$ A \\f$, then the matrix returned by this function is the\n      * matrix \\f$ V \\f$ in the eigendecomposition \\f$ A = V D V^{-1} \\f$.\n      *\n      * Example: \\include SelfAdjointEigenSolver_eigenvectors.cpp\n      * Output: \\verbinclude SelfAdjointEigenSolver_eigenvectors.out\n      *\n      * \\sa eigenvalues()\n      */\n    EIGEN_DEVICE_FUNC\n    const EigenvectorsType& eigenvectors() const\n    {\n      eigen_assert(m_isInitialized && \"SelfAdjointEigenSolver is not initialized.\");\n      eigen_assert(m_eigenvectorsOk && \"The eigenvectors have not been computed together with the eigenvalues.\");\n      return m_eivec;\n    }\n\n    /** \\brief Returns the eigenvalues of given matrix.\n      *\n      * \\returns A const reference to the column vector containing the eigenvalues.\n      *\n      * \\pre The eigenvalues have been computed before.\n      *\n      * The eigenvalues are repeated according to their algebraic multiplicity,\n      * so there are as many eigenvalues as rows in the matrix. The eigenvalues\n      * are sorted in increasing order.\n      *\n      * Example: \\include SelfAdjointEigenSolver_eigenvalues.cpp\n      * Output: \\verbinclude SelfAdjointEigenSolver_eigenvalues.out\n      *\n      * \\sa eigenvectors(), MatrixBase::eigenvalues()\n      */\n    EIGEN_DEVICE_FUNC\n    const RealVectorType& eigenvalues() const\n    {\n      eigen_assert(m_isInitialized && \"SelfAdjointEigenSolver is not initialized.\");\n      return m_eivalues;\n    }\n\n    /** \\brief Computes the positive-definite square root of the matrix.\n      *\n      * \\returns the positive-definite square root of the matrix\n      *\n      * \\pre The eigenvalues and eigenvectors of a positive-definite matrix\n      * have been computed before.\n      *\n      * The square root of a positive-definite matrix \\f$ A \\f$ is the\n      * positive-definite matrix whose square equals \\f$ A \\f$. This function\n      * uses the eigendecomposition \\f$ A = V D V^{-1} \\f$ to compute the\n      * square root as \\f$ A^{1/2} = V D^{1/2} V^{-1} \\f$.\n      *\n      * Example: \\include SelfAdjointEigenSolver_operatorSqrt.cpp\n      * Output: \\verbinclude SelfAdjointEigenSolver_operatorSqrt.out\n      *\n      * \\sa operatorInverseSqrt(), <a href=\"unsupported/group__MatrixFunctions__Module.html\">MatrixFunctions Module</a>\n      */\n    EIGEN_DEVICE_FUNC\n    MatrixType operatorSqrt() const\n    {\n      eigen_assert(m_isInitialized && \"SelfAdjointEigenSolver is not initialized.\");\n      eigen_assert(m_eigenvectorsOk && \"The eigenvectors have not been computed together with the eigenvalues.\");\n      return m_eivec * m_eivalues.cwiseSqrt().asDiagonal() * m_eivec.adjoint();\n    }\n\n    /** \\brief Computes the inverse square root of the matrix.\n      *\n      * \\returns the inverse positive-definite square root of the matrix\n      *\n      * \\pre The eigenvalues and eigenvectors of a positive-definite matrix\n      * have been computed before.\n      *\n      * This function uses the eigendecomposition \\f$ A = V D V^{-1} \\f$ to\n      * compute the inverse square root as \\f$ V D^{-1/2} V^{-1} \\f$. This is\n      * cheaper than first computing the square root with operatorSqrt() and\n      * then its inverse with MatrixBase::inverse().\n      *\n      * Example: \\include SelfAdjointEigenSolver_operatorInverseSqrt.cpp\n      * Output: \\verbinclude SelfAdjointEigenSolver_operatorInverseSqrt.out\n      *\n      * \\sa operatorSqrt(), MatrixBase::inverse(), <a href=\"unsupported/group__MatrixFunctions__Module.html\">MatrixFunctions Module</a>\n      */\n    EIGEN_DEVICE_FUNC\n    MatrixType operatorInverseSqrt() const\n    {\n      eigen_assert(m_isInitialized && \"SelfAdjointEigenSolver is not initialized.\");\n      eigen_assert(m_eigenvectorsOk && \"The eigenvectors have not been computed together with the eigenvalues.\");\n      return m_eivec * m_eivalues.cwiseInverse().cwiseSqrt().asDiagonal() * m_eivec.adjoint();\n    }\n\n    /** \\brief Reports whether previous computation was successful.\n      *\n      * \\returns \\c Success if computation was successful, \\c NoConvergence otherwise.\n      */\n    EIGEN_DEVICE_FUNC\n    ComputationInfo info() const\n    {\n      eigen_assert(m_isInitialized && \"SelfAdjointEigenSolver is not initialized.\");\n      return m_info;\n    }\n\n    /** \\brief Maximum number of iterations.\n      *\n      * The algorithm terminates if it does not converge within m_maxIterations * n iterations, where n\n      * denotes the size of the matrix. This value is currently set to 30 (copied from LAPACK).\n      */\n    static const int m_maxIterations = 30;\n\n  protected:\n    static EIGEN_DEVICE_FUNC\n    void check_template_parameters()\n    {\n      EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar);\n    }\n    \n    EigenvectorsType m_eivec;\n    RealVectorType m_eivalues;\n    typename TridiagonalizationType::SubDiagonalType m_subdiag;\n    ComputationInfo m_info;\n    bool m_isInitialized;\n    bool m_eigenvectorsOk;\n};\n\nnamespace internal {\n/** \\internal\n  *\n  * \\eigenvalues_module \\ingroup Eigenvalues_Module\n  *\n  * Performs a QR step on a tridiagonal symmetric matrix represented as a\n  * pair of two vectors \\a diag and \\a subdiag.\n  *\n  * \\param diag the diagonal part of the input selfadjoint tridiagonal matrix\n  * \\param subdiag the sub-diagonal part of the input selfadjoint tridiagonal matrix\n  * \\param start starting index of the submatrix to work on\n  * \\param end last+1 index of the submatrix to work on\n  * \\param matrixQ pointer to the column-major matrix holding the eigenvectors, can be 0\n  * \\param n size of the input matrix\n  *\n  * For compilation efficiency reasons, this procedure does not use eigen expression\n  * for its arguments.\n  *\n  * Implemented from Golub's \"Matrix Computations\", algorithm 8.3.2:\n  * \"implicit symmetric QR step with Wilkinson shift\"\n  */\ntemplate<int StorageOrder,typename RealScalar, typename Scalar, typename Index>\nEIGEN_DEVICE_FUNC\nstatic void tridiagonal_qr_step(RealScalar* diag, RealScalar* subdiag, Index start, Index end, Scalar* matrixQ, Index n);\n}\n\ntemplate<typename MatrixType>\ntemplate<typename InputType>\nEIGEN_DEVICE_FUNC\nSelfAdjointEigenSolver<MatrixType>& SelfAdjointEigenSolver<MatrixType>\n::compute(const EigenBase<InputType>& a_matrix, int options)\n{\n  check_template_parameters();\n  \n  const InputType &matrix(a_matrix.derived());\n  \n  EIGEN_USING_STD_MATH(abs);\n  eigen_assert(matrix.cols() == matrix.rows());\n  eigen_assert((options&~(EigVecMask|GenEigMask))==0\n          && (options&EigVecMask)!=EigVecMask\n          && \"invalid option parameter\");\n  bool computeEigenvectors = (options&ComputeEigenvectors)==ComputeEigenvectors;\n  Index n = matrix.cols();\n  m_eivalues.resize(n,1);\n\n  if(n==1)\n  {\n    m_eivec = matrix;\n    m_eivalues.coeffRef(0,0) = numext::real(m_eivec.coeff(0,0));\n    if(computeEigenvectors)\n      m_eivec.setOnes(n,n);\n    m_info = Success;\n    m_isInitialized = true;\n    m_eigenvectorsOk = computeEigenvectors;\n    return *this;\n  }\n\n  // declare some aliases\n  RealVectorType& diag = m_eivalues;\n  EigenvectorsType& mat = m_eivec;\n\n  // map the matrix coefficients to [-1:1] to avoid over- and underflow.\n  mat = matrix.template triangularView<Lower>();\n  RealScalar scale = mat.cwiseAbs().maxCoeff();\n  if(scale==RealScalar(0)) scale = RealScalar(1);\n  mat.template triangularView<Lower>() /= scale;\n  m_subdiag.resize(n-1);\n  internal::tridiagonalization_inplace(mat, diag, m_subdiag, computeEigenvectors);\n\n  m_info = internal::computeFromTridiagonal_impl(diag, m_subdiag, m_maxIterations, computeEigenvectors, m_eivec);\n  \n  // scale back the eigen values\n  m_eivalues *= scale;\n\n  m_isInitialized = true;\n  m_eigenvectorsOk = computeEigenvectors;\n  return *this;\n}\n\ntemplate<typename MatrixType>\nSelfAdjointEigenSolver<MatrixType>& SelfAdjointEigenSolver<MatrixType>\n::computeFromTridiagonal(const RealVectorType& diag, const SubDiagonalType& subdiag , int options)\n{\n  //TODO : Add an option to scale the values beforehand\n  bool computeEigenvectors = (options&ComputeEigenvectors)==ComputeEigenvectors;\n\n  m_eivalues = diag;\n  m_subdiag = subdiag;\n  if (computeEigenvectors)\n  {\n    m_eivec.setIdentity(diag.size(), diag.size());\n  }\n  m_info = internal::computeFromTridiagonal_impl(m_eivalues, m_subdiag, m_maxIterations, computeEigenvectors, m_eivec);\n\n  m_isInitialized = true;\n  m_eigenvectorsOk = computeEigenvectors;\n  return *this;\n}\n\nnamespace internal {\n/**\n  * \\internal\n  * \\brief Compute the eigendecomposition from a tridiagonal matrix\n  *\n  * \\param[in,out] diag : On input, the diagonal of the matrix, on output the eigenvalues\n  * \\param[in,out] subdiag : The subdiagonal part of the matrix (entries are modified during the decomposition)\n  * \\param[in] maxIterations : the maximum number of iterations\n  * \\param[in] computeEigenvectors : whether the eigenvectors have to be computed or not\n  * \\param[out] eivec : The matrix to store the eigenvectors if computeEigenvectors==true. Must be allocated on input.\n  * \\returns \\c Success or \\c NoConvergence\n  */\ntemplate<typename MatrixType, typename DiagType, typename SubDiagType>\nEIGEN_DEVICE_FUNC\nComputationInfo computeFromTridiagonal_impl(DiagType& diag, SubDiagType& subdiag, const Index maxIterations, bool computeEigenvectors, MatrixType& eivec)\n{\n  EIGEN_USING_STD_MATH(abs);\n\n  ComputationInfo info;\n  typedef typename MatrixType::Scalar Scalar;\n\n  Index n = diag.size();\n  Index end = n-1;\n  Index start = 0;\n  Index iter = 0; // total number of iterations\n  \n  typedef typename DiagType::RealScalar RealScalar;\n  const RealScalar considerAsZero = (std::numeric_limits<RealScalar>::min)();\n  const RealScalar precision = RealScalar(2)*NumTraits<RealScalar>::epsilon();\n  \n  while (end>0)\n  {\n    for (Index i = start; i<end; ++i)\n      if (internal::isMuchSmallerThan(abs(subdiag[i]),(abs(diag[i])+abs(diag[i+1])),precision) || abs(subdiag[i]) <= considerAsZero)\n        subdiag[i] = 0;\n\n    // find the largest unreduced block\n    while (end>0 && subdiag[end-1]==RealScalar(0))\n    {\n      end--;\n    }\n    if (end<=0)\n      break;\n\n    // if we spent too many iterations, we give up\n    iter++;\n    if(iter > maxIterations * n) break;\n\n    start = end - 1;\n    while (start>0 && subdiag[start-1]!=0)\n      start--;\n\n    internal::tridiagonal_qr_step<MatrixType::Flags&RowMajorBit ? RowMajor : ColMajor>(diag.data(), subdiag.data(), start, end, computeEigenvectors ? eivec.data() : (Scalar*)0, n);\n  }\n  if (iter <= maxIterations * n)\n    info = Success;\n  else\n    info = NoConvergence;\n\n  // Sort eigenvalues and corresponding vectors.\n  // TODO make the sort optional ?\n  // TODO use a better sort algorithm !!\n  if (info == Success)\n  {\n    for (Index i = 0; i < n-1; ++i)\n    {\n      Index k;\n      diag.segment(i,n-i).minCoeff(&k);\n      if (k > 0)\n      {\n        numext::swap(diag[i], diag[k+i]);\n        if(computeEigenvectors)\n          eivec.col(i).swap(eivec.col(k+i));\n      }\n    }\n  }\n  return info;\n}\n  \ntemplate<typename SolverType,int Size,bool IsComplex> struct direct_selfadjoint_eigenvalues\n{\n  EIGEN_DEVICE_FUNC\n  static inline void run(SolverType& eig, const typename SolverType::MatrixType& A, int options)\n  { eig.compute(A,options); }\n};\n\ntemplate<typename SolverType> struct direct_selfadjoint_eigenvalues<SolverType,3,false>\n{\n  typedef typename SolverType::MatrixType MatrixType;\n  typedef typename SolverType::RealVectorType VectorType;\n  typedef typename SolverType::Scalar Scalar;\n  typedef typename SolverType::EigenvectorsType EigenvectorsType;\n  \n\n  /** \\internal\n   * Computes the roots of the characteristic polynomial of \\a m.\n   * For numerical stability m.trace() should be near zero and to avoid over- or underflow m should be normalized.\n   */\n  EIGEN_DEVICE_FUNC\n  static inline void computeRoots(const MatrixType& m, VectorType& roots)\n  {\n    EIGEN_USING_STD_MATH(sqrt)\n    EIGEN_USING_STD_MATH(atan2)\n    EIGEN_USING_STD_MATH(cos)\n    EIGEN_USING_STD_MATH(sin)\n    const Scalar s_inv3 = Scalar(1)/Scalar(3);\n    const Scalar s_sqrt3 = sqrt(Scalar(3));\n\n    // The characteristic equation is x^3 - c2*x^2 + c1*x - c0 = 0.  The\n    // eigenvalues are the roots to this equation, all guaranteed to be\n    // real-valued, because the matrix is symmetric.\n    Scalar c0 = m(0,0)*m(1,1)*m(2,2) + Scalar(2)*m(1,0)*m(2,0)*m(2,1) - m(0,0)*m(2,1)*m(2,1) - m(1,1)*m(2,0)*m(2,0) - m(2,2)*m(1,0)*m(1,0);\n    Scalar c1 = m(0,0)*m(1,1) - m(1,0)*m(1,0) + m(0,0)*m(2,2) - m(2,0)*m(2,0) + m(1,1)*m(2,2) - m(2,1)*m(2,1);\n    Scalar c2 = m(0,0) + m(1,1) + m(2,2);\n\n    // Construct the parameters used in classifying the roots of the equation\n    // and in solving the equation for the roots in closed form.\n    Scalar c2_over_3 = c2*s_inv3;\n    Scalar a_over_3 = (c2*c2_over_3 - c1)*s_inv3;\n    a_over_3 = numext::maxi(a_over_3, Scalar(0));\n\n    Scalar half_b = Scalar(0.5)*(c0 + c2_over_3*(Scalar(2)*c2_over_3*c2_over_3 - c1));\n\n    Scalar q = a_over_3*a_over_3*a_over_3 - half_b*half_b;\n    q = numext::maxi(q, Scalar(0));\n\n    // Compute the eigenvalues by solving for the roots of the polynomial.\n    Scalar rho = sqrt(a_over_3);\n    Scalar theta = atan2(sqrt(q),half_b)*s_inv3;  // since sqrt(q) > 0, atan2 is in [0, pi] and theta is in [0, pi/3]\n    Scalar cos_theta = cos(theta);\n    Scalar sin_theta = sin(theta);\n    // roots are already sorted, since cos is monotonically decreasing on [0, pi]\n    roots(0) = c2_over_3 - rho*(cos_theta + s_sqrt3*sin_theta); // == 2*rho*cos(theta+2pi/3)\n    roots(1) = c2_over_3 - rho*(cos_theta - s_sqrt3*sin_theta); // == 2*rho*cos(theta+ pi/3)\n    roots(2) = c2_over_3 + Scalar(2)*rho*cos_theta;\n  }\n\n  EIGEN_DEVICE_FUNC\n  static inline bool extract_kernel(MatrixType& mat, Ref<VectorType> res, Ref<VectorType> representative)\n  {\n    EIGEN_USING_STD_MATH(abs);\n    EIGEN_USING_STD_MATH(sqrt);\n    Index i0;\n    // Find non-zero column i0 (by construction, there must exist a non zero coefficient on the diagonal):\n    mat.diagonal().cwiseAbs().maxCoeff(&i0);\n    // mat.col(i0) is a good candidate for an orthogonal vector to the current eigenvector,\n    // so let's save it:\n    representative = mat.col(i0);\n    Scalar n0, n1;\n    VectorType c0, c1;\n    n0 = (c0 = representative.cross(mat.col((i0+1)%3))).squaredNorm();\n    n1 = (c1 = representative.cross(mat.col((i0+2)%3))).squaredNorm();\n    if(n0>n1) res = c0/sqrt(n0);\n    else      res = c1/sqrt(n1);\n\n    return true;\n  }\n\n  EIGEN_DEVICE_FUNC\n  static inline void run(SolverType& solver, const MatrixType& mat, int options)\n  {\n    eigen_assert(mat.cols() == 3 && mat.cols() == mat.rows());\n    eigen_assert((options&~(EigVecMask|GenEigMask))==0\n            && (options&EigVecMask)!=EigVecMask\n            && \"invalid option parameter\");\n    bool computeEigenvectors = (options&ComputeEigenvectors)==ComputeEigenvectors;\n    \n    EigenvectorsType& eivecs = solver.m_eivec;\n    VectorType& eivals = solver.m_eivalues;\n  \n    // Shift the matrix to the mean eigenvalue and map the matrix coefficients to [-1:1] to avoid over- and underflow.\n    Scalar shift = mat.trace() / Scalar(3);\n    // TODO Avoid this copy. Currently it is necessary to suppress bogus values when determining maxCoeff and for computing the eigenvectors later\n    MatrixType scaledMat = mat.template selfadjointView<Lower>();\n    scaledMat.diagonal().array() -= shift;\n    Scalar scale = scaledMat.cwiseAbs().maxCoeff();\n    if(scale > 0) scaledMat /= scale;   // TODO for scale==0 we could save the remaining operations\n\n    // compute the eigenvalues\n    computeRoots(scaledMat,eivals);\n\n    // compute the eigenvectors\n    if(computeEigenvectors)\n    {\n      if((eivals(2)-eivals(0))<=Eigen::NumTraits<Scalar>::epsilon())\n      {\n        // All three eigenvalues are numerically the same\n        eivecs.setIdentity();\n      }\n      else\n      {\n        MatrixType tmp;\n        tmp = scaledMat;\n\n        // Compute the eigenvector of the most distinct eigenvalue\n        Scalar d0 = eivals(2) - eivals(1);\n        Scalar d1 = eivals(1) - eivals(0);\n        Index k(0), l(2);\n        if(d0 > d1)\n        {\n          numext::swap(k,l);\n          d0 = d1;\n        }\n\n        // Compute the eigenvector of index k\n        {\n          tmp.diagonal().array () -= eivals(k);\n          // By construction, 'tmp' is of rank 2, and its kernel corresponds to the respective eigenvector.\n          extract_kernel(tmp, eivecs.col(k), eivecs.col(l));\n        }\n\n        // Compute eigenvector of index l\n        if(d0<=2*Eigen::NumTraits<Scalar>::epsilon()*d1)\n        {\n          // If d0 is too small, then the two other eigenvalues are numerically the same,\n          // and thus we only have to ortho-normalize the near orthogonal vector we saved above.\n          eivecs.col(l) -= eivecs.col(k).dot(eivecs.col(l))*eivecs.col(l);\n          eivecs.col(l).normalize();\n        }\n        else\n        {\n          tmp = scaledMat;\n          tmp.diagonal().array () -= eivals(l);\n\n          VectorType dummy;\n          extract_kernel(tmp, eivecs.col(l), dummy);\n        }\n\n        // Compute last eigenvector from the other two\n        eivecs.col(1) = eivecs.col(2).cross(eivecs.col(0)).normalized();\n      }\n    }\n\n    // Rescale back to the original size.\n    eivals *= scale;\n    eivals.array() += shift;\n    \n    solver.m_info = Success;\n    solver.m_isInitialized = true;\n    solver.m_eigenvectorsOk = computeEigenvectors;\n  }\n};\n\n// 2x2 direct eigenvalues decomposition, code from Hauke Heibel\ntemplate<typename SolverType> \nstruct direct_selfadjoint_eigenvalues<SolverType,2,false>\n{\n  typedef typename SolverType::MatrixType MatrixType;\n  typedef typename SolverType::RealVectorType VectorType;\n  typedef typename SolverType::Scalar Scalar;\n  typedef typename SolverType::EigenvectorsType EigenvectorsType;\n  \n  EIGEN_DEVICE_FUNC\n  static inline void computeRoots(const MatrixType& m, VectorType& roots)\n  {\n    EIGEN_USING_STD_MATH(sqrt);\n    const Scalar t0 = Scalar(0.5) * sqrt( numext::abs2(m(0,0)-m(1,1)) + Scalar(4)*numext::abs2(m(1,0)));\n    const Scalar t1 = Scalar(0.5) * (m(0,0) + m(1,1));\n    roots(0) = t1 - t0;\n    roots(1) = t1 + t0;\n  }\n  \n  EIGEN_DEVICE_FUNC\n  static inline void run(SolverType& solver, const MatrixType& mat, int options)\n  {\n    EIGEN_USING_STD_MATH(sqrt);\n    EIGEN_USING_STD_MATH(abs);\n    \n    eigen_assert(mat.cols() == 2 && mat.cols() == mat.rows());\n    eigen_assert((options&~(EigVecMask|GenEigMask))==0\n            && (options&EigVecMask)!=EigVecMask\n            && \"invalid option parameter\");\n    bool computeEigenvectors = (options&ComputeEigenvectors)==ComputeEigenvectors;\n    \n    EigenvectorsType& eivecs = solver.m_eivec;\n    VectorType& eivals = solver.m_eivalues;\n  \n    // Shift the matrix to the mean eigenvalue and map the matrix coefficients to [-1:1] to avoid over- and underflow.\n    Scalar shift = mat.trace() / Scalar(2);\n    MatrixType scaledMat = mat;\n    scaledMat.coeffRef(0,1) = mat.coeff(1,0);\n    scaledMat.diagonal().array() -= shift;\n    Scalar scale = scaledMat.cwiseAbs().maxCoeff();\n    if(scale > Scalar(0))\n      scaledMat /= scale;\n\n    // Compute the eigenvalues\n    computeRoots(scaledMat,eivals);\n\n    // compute the eigen vectors\n    if(computeEigenvectors)\n    {\n      if((eivals(1)-eivals(0))<=abs(eivals(1))*Eigen::NumTraits<Scalar>::epsilon())\n      {\n        eivecs.setIdentity();\n      }\n      else\n      {\n        scaledMat.diagonal().array () -= eivals(1);\n        Scalar a2 = numext::abs2(scaledMat(0,0));\n        Scalar c2 = numext::abs2(scaledMat(1,1));\n        Scalar b2 = numext::abs2(scaledMat(1,0));\n        if(a2>c2)\n        {\n          eivecs.col(1) << -scaledMat(1,0), scaledMat(0,0);\n          eivecs.col(1) /= sqrt(a2+b2);\n        }\n        else\n        {\n          eivecs.col(1) << -scaledMat(1,1), scaledMat(1,0);\n          eivecs.col(1) /= sqrt(c2+b2);\n        }\n\n        eivecs.col(0) << eivecs.col(1).unitOrthogonal();\n      }\n    }\n\n    // Rescale back to the original size.\n    eivals *= scale;\n    eivals.array() += shift;\n\n    solver.m_info = Success;\n    solver.m_isInitialized = true;\n    solver.m_eigenvectorsOk = computeEigenvectors;\n  }\n};\n\n}\n\ntemplate<typename MatrixType>\nEIGEN_DEVICE_FUNC\nSelfAdjointEigenSolver<MatrixType>& SelfAdjointEigenSolver<MatrixType>\n::computeDirect(const MatrixType& matrix, int options)\n{\n  internal::direct_selfadjoint_eigenvalues<SelfAdjointEigenSolver,Size,NumTraits<Scalar>::IsComplex>::run(*this,matrix,options);\n  return *this;\n}\n\nnamespace internal {\ntemplate<int StorageOrder,typename RealScalar, typename Scalar, typename Index>\nEIGEN_DEVICE_FUNC\nstatic void tridiagonal_qr_step(RealScalar* diag, RealScalar* subdiag, Index start, Index end, Scalar* matrixQ, Index n)\n{\n  EIGEN_USING_STD_MATH(abs);\n  RealScalar td = (diag[end-1] - diag[end])*RealScalar(0.5);\n  RealScalar e = subdiag[end-1];\n  // Note that thanks to scaling, e^2 or td^2 cannot overflow, however they can still\n  // underflow thus leading to inf/NaN values when using the following commented code:\n//   RealScalar e2 = numext::abs2(subdiag[end-1]);\n//   RealScalar mu = diag[end] - e2 / (td + (td>0 ? 1 : -1) * sqrt(td*td + e2));\n  // This explain the following, somewhat more complicated, version:\n  RealScalar mu = diag[end];\n  if(td==RealScalar(0))\n    mu -= abs(e);\n  else\n  {\n    RealScalar e2 = numext::abs2(subdiag[end-1]);\n    RealScalar h = numext::hypot(td,e);\n    if(e2==RealScalar(0)) mu -= (e / (td + (td>RealScalar(0) ? RealScalar(1) : RealScalar(-1)))) * (e / h);\n    else                  mu -= e2 / (td + (td>RealScalar(0) ? h : -h));\n  }\n  \n  RealScalar x = diag[start] - mu;\n  RealScalar z = subdiag[start];\n  for (Index k = start; k < end; ++k)\n  {\n    JacobiRotation<RealScalar> rot;\n    rot.makeGivens(x, z);\n\n    // do T = G' T G\n    RealScalar sdk = rot.s() * diag[k] + rot.c() * subdiag[k];\n    RealScalar dkp1 = rot.s() * subdiag[k] + rot.c() * diag[k+1];\n\n    diag[k] = rot.c() * (rot.c() * diag[k] - rot.s() * subdiag[k]) - rot.s() * (rot.c() * subdiag[k] - rot.s() * diag[k+1]);\n    diag[k+1] = rot.s() * sdk + rot.c() * dkp1;\n    subdiag[k] = rot.c() * sdk - rot.s() * dkp1;\n    \n\n    if (k > start)\n      subdiag[k - 1] = rot.c() * subdiag[k-1] - rot.s() * z;\n\n    x = subdiag[k];\n\n    if (k < end - 1)\n    {\n      z = -rot.s() * subdiag[k+1];\n      subdiag[k + 1] = rot.c() * subdiag[k+1];\n    }\n    \n    // apply the givens rotation to the unit matrix Q = Q * G\n    if (matrixQ)\n    {\n      // FIXME if StorageOrder == RowMajor this operation is not very efficient\n      Map<Matrix<Scalar,Dynamic,Dynamic,StorageOrder> > q(matrixQ,n,n);\n      q.applyOnTheRight(k,k+1,rot);\n    }\n  }\n}\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_SELFADJOINTEIGENSOLVER_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h",
    "content": "/*\n Copyright (c) 2011, Intel Corporation. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without modification,\n are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n   list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n * Neither the name of Intel Corporation nor the names of its contributors may\n   be used to endorse or promote products derived from this software without\n   specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\n ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n ********************************************************************************\n *   Content : Eigen bindings to LAPACKe\n *    Self-adjoint eigenvalues/eigenvectors.\n ********************************************************************************\n*/\n\n#ifndef EIGEN_SAEIGENSOLVER_LAPACKE_H\n#define EIGEN_SAEIGENSOLVER_LAPACKE_H\n\nnamespace Eigen { \n\n/** \\internal Specialization for the data types supported by LAPACKe */\n\n#define EIGEN_LAPACKE_EIG_SELFADJ_2(EIGTYPE, LAPACKE_TYPE, LAPACKE_RTYPE, LAPACKE_NAME, EIGCOLROW ) \\\ntemplate<> template<typename InputType> inline \\\nSelfAdjointEigenSolver<Matrix<EIGTYPE, Dynamic, Dynamic, EIGCOLROW> >& \\\nSelfAdjointEigenSolver<Matrix<EIGTYPE, Dynamic, Dynamic, EIGCOLROW> >::compute(const EigenBase<InputType>& matrix, int options) \\\n{ \\\n  eigen_assert(matrix.cols() == matrix.rows()); \\\n  eigen_assert((options&~(EigVecMask|GenEigMask))==0 \\\n          && (options&EigVecMask)!=EigVecMask \\\n          && \"invalid option parameter\"); \\\n  bool computeEigenvectors = (options&ComputeEigenvectors)==ComputeEigenvectors; \\\n  lapack_int n = internal::convert_index<lapack_int>(matrix.cols()), lda, info; \\\n  m_eivalues.resize(n,1); \\\n  m_subdiag.resize(n-1); \\\n  m_eivec = matrix; \\\n\\\n  if(n==1) \\\n  { \\\n    m_eivalues.coeffRef(0,0) = numext::real(m_eivec.coeff(0,0)); \\\n    if(computeEigenvectors) m_eivec.setOnes(n,n); \\\n    m_info = Success; \\\n    m_isInitialized = true; \\\n    m_eigenvectorsOk = computeEigenvectors; \\\n    return *this; \\\n  } \\\n\\\n  lda = internal::convert_index<lapack_int>(m_eivec.outerStride()); \\\n  char jobz, uplo='L'/*, range='A'*/; \\\n  jobz = computeEigenvectors ? 'V' : 'N'; \\\n\\\n  info = LAPACKE_##LAPACKE_NAME( LAPACK_COL_MAJOR, jobz, uplo, n, (LAPACKE_TYPE*)m_eivec.data(), lda, (LAPACKE_RTYPE*)m_eivalues.data() ); \\\n  m_info = (info==0) ? Success : NoConvergence; \\\n  m_isInitialized = true; \\\n  m_eigenvectorsOk = computeEigenvectors; \\\n  return *this; \\\n}\n\n#define EIGEN_LAPACKE_EIG_SELFADJ(EIGTYPE, LAPACKE_TYPE, LAPACKE_RTYPE, LAPACKE_NAME )              \\\n        EIGEN_LAPACKE_EIG_SELFADJ_2(EIGTYPE, LAPACKE_TYPE, LAPACKE_RTYPE, LAPACKE_NAME, ColMajor )  \\\n        EIGEN_LAPACKE_EIG_SELFADJ_2(EIGTYPE, LAPACKE_TYPE, LAPACKE_RTYPE, LAPACKE_NAME, RowMajor ) \n\nEIGEN_LAPACKE_EIG_SELFADJ(double,   double,                double, dsyev)\nEIGEN_LAPACKE_EIG_SELFADJ(float,    float,                 float,  ssyev)\nEIGEN_LAPACKE_EIG_SELFADJ(dcomplex, lapack_complex_double, double, zheev)\nEIGEN_LAPACKE_EIG_SELFADJ(scomplex, lapack_complex_float,  float,  cheev)\n\n} // end namespace Eigen\n\n#endif // EIGEN_SAEIGENSOLVER_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Eigenvalues/Tridiagonalization.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2010 Jitse Niesen <jitse@maths.leeds.ac.uk>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_TRIDIAGONALIZATION_H\n#define EIGEN_TRIDIAGONALIZATION_H\n\nnamespace Eigen { \n\nnamespace internal {\n  \ntemplate<typename MatrixType> struct TridiagonalizationMatrixTReturnType;\ntemplate<typename MatrixType>\nstruct traits<TridiagonalizationMatrixTReturnType<MatrixType> >\n  : public traits<typename MatrixType::PlainObject>\n{\n  typedef typename MatrixType::PlainObject ReturnType; // FIXME shall it be a BandMatrix?\n  enum { Flags = 0 };\n};\n\ntemplate<typename MatrixType, typename CoeffVectorType>\nEIGEN_DEVICE_FUNC\nvoid tridiagonalization_inplace(MatrixType& matA, CoeffVectorType& hCoeffs);\n}\n\n/** \\eigenvalues_module \\ingroup Eigenvalues_Module\n  *\n  *\n  * \\class Tridiagonalization\n  *\n  * \\brief Tridiagonal decomposition of a selfadjoint matrix\n  *\n  * \\tparam _MatrixType the type of the matrix of which we are computing the\n  * tridiagonal decomposition; this is expected to be an instantiation of the\n  * Matrix class template.\n  *\n  * This class performs a tridiagonal decomposition of a selfadjoint matrix \\f$ A \\f$ such that:\n  * \\f$ A = Q T Q^* \\f$ where \\f$ Q \\f$ is unitary and \\f$ T \\f$ a real symmetric tridiagonal matrix.\n  *\n  * A tridiagonal matrix is a matrix which has nonzero elements only on the\n  * main diagonal and the first diagonal below and above it. The Hessenberg\n  * decomposition of a selfadjoint matrix is in fact a tridiagonal\n  * decomposition. This class is used in SelfAdjointEigenSolver to compute the\n  * eigenvalues and eigenvectors of a selfadjoint matrix.\n  *\n  * Call the function compute() to compute the tridiagonal decomposition of a\n  * given matrix. Alternatively, you can use the Tridiagonalization(const MatrixType&)\n  * constructor which computes the tridiagonal Schur decomposition at\n  * construction time. Once the decomposition is computed, you can use the\n  * matrixQ() and matrixT() functions to retrieve the matrices Q and T in the\n  * decomposition.\n  *\n  * The documentation of Tridiagonalization(const MatrixType&) contains an\n  * example of the typical use of this class.\n  *\n  * \\sa class HessenbergDecomposition, class SelfAdjointEigenSolver\n  */\ntemplate<typename _MatrixType> class Tridiagonalization\n{\n  public:\n\n    /** \\brief Synonym for the template parameter \\p _MatrixType. */\n    typedef _MatrixType MatrixType;\n\n    typedef typename MatrixType::Scalar Scalar;\n    typedef typename NumTraits<Scalar>::Real RealScalar;\n    typedef Eigen::Index Index; ///< \\deprecated since Eigen 3.3\n\n    enum {\n      Size = MatrixType::RowsAtCompileTime,\n      SizeMinusOne = Size == Dynamic ? Dynamic : (Size > 1 ? Size - 1 : 1),\n      Options = MatrixType::Options,\n      MaxSize = MatrixType::MaxRowsAtCompileTime,\n      MaxSizeMinusOne = MaxSize == Dynamic ? Dynamic : (MaxSize > 1 ? MaxSize - 1 : 1)\n    };\n\n    typedef Matrix<Scalar, SizeMinusOne, 1, Options & ~RowMajor, MaxSizeMinusOne, 1> CoeffVectorType;\n    typedef typename internal::plain_col_type<MatrixType, RealScalar>::type DiagonalType;\n    typedef Matrix<RealScalar, SizeMinusOne, 1, Options & ~RowMajor, MaxSizeMinusOne, 1> SubDiagonalType;\n    typedef typename internal::remove_all<typename MatrixType::RealReturnType>::type MatrixTypeRealView;\n    typedef internal::TridiagonalizationMatrixTReturnType<MatrixTypeRealView> MatrixTReturnType;\n\n    typedef typename internal::conditional<NumTraits<Scalar>::IsComplex,\n              typename internal::add_const_on_value_type<typename Diagonal<const MatrixType>::RealReturnType>::type,\n              const Diagonal<const MatrixType>\n            >::type DiagonalReturnType;\n\n    typedef typename internal::conditional<NumTraits<Scalar>::IsComplex,\n              typename internal::add_const_on_value_type<typename Diagonal<const MatrixType, -1>::RealReturnType>::type,\n              const Diagonal<const MatrixType, -1>\n            >::type SubDiagonalReturnType;\n\n    /** \\brief Return type of matrixQ() */\n    typedef HouseholderSequence<MatrixType,typename internal::remove_all<typename CoeffVectorType::ConjugateReturnType>::type> HouseholderSequenceType;\n\n    /** \\brief Default constructor.\n      *\n      * \\param [in]  size  Positive integer, size of the matrix whose tridiagonal\n      * decomposition will be computed.\n      *\n      * The default constructor is useful in cases in which the user intends to\n      * perform decompositions via compute().  The \\p size parameter is only\n      * used as a hint. It is not an error to give a wrong \\p size, but it may\n      * impair performance.\n      *\n      * \\sa compute() for an example.\n      */\n    explicit Tridiagonalization(Index size = Size==Dynamic ? 2 : Size)\n      : m_matrix(size,size),\n        m_hCoeffs(size > 1 ? size-1 : 1),\n        m_isInitialized(false)\n    {}\n\n    /** \\brief Constructor; computes tridiagonal decomposition of given matrix.\n      *\n      * \\param[in]  matrix  Selfadjoint matrix whose tridiagonal decomposition\n      * is to be computed.\n      *\n      * This constructor calls compute() to compute the tridiagonal decomposition.\n      *\n      * Example: \\include Tridiagonalization_Tridiagonalization_MatrixType.cpp\n      * Output: \\verbinclude Tridiagonalization_Tridiagonalization_MatrixType.out\n      */\n    template<typename InputType>\n    explicit Tridiagonalization(const EigenBase<InputType>& matrix)\n      : m_matrix(matrix.derived()),\n        m_hCoeffs(matrix.cols() > 1 ? matrix.cols()-1 : 1),\n        m_isInitialized(false)\n    {\n      internal::tridiagonalization_inplace(m_matrix, m_hCoeffs);\n      m_isInitialized = true;\n    }\n\n    /** \\brief Computes tridiagonal decomposition of given matrix.\n      *\n      * \\param[in]  matrix  Selfadjoint matrix whose tridiagonal decomposition\n      * is to be computed.\n      * \\returns    Reference to \\c *this\n      *\n      * The tridiagonal decomposition is computed by bringing the columns of\n      * the matrix successively in the required form using Householder\n      * reflections. The cost is \\f$ 4n^3/3 \\f$ flops, where \\f$ n \\f$ denotes\n      * the size of the given matrix.\n      *\n      * This method reuses of the allocated data in the Tridiagonalization\n      * object, if the size of the matrix does not change.\n      *\n      * Example: \\include Tridiagonalization_compute.cpp\n      * Output: \\verbinclude Tridiagonalization_compute.out\n      */\n    template<typename InputType>\n    Tridiagonalization& compute(const EigenBase<InputType>& matrix)\n    {\n      m_matrix = matrix.derived();\n      m_hCoeffs.resize(matrix.rows()-1, 1);\n      internal::tridiagonalization_inplace(m_matrix, m_hCoeffs);\n      m_isInitialized = true;\n      return *this;\n    }\n\n    /** \\brief Returns the Householder coefficients.\n      *\n      * \\returns a const reference to the vector of Householder coefficients\n      *\n      * \\pre Either the constructor Tridiagonalization(const MatrixType&) or\n      * the member function compute(const MatrixType&) has been called before\n      * to compute the tridiagonal decomposition of a matrix.\n      *\n      * The Householder coefficients allow the reconstruction of the matrix\n      * \\f$ Q \\f$ in the tridiagonal decomposition from the packed data.\n      *\n      * Example: \\include Tridiagonalization_householderCoefficients.cpp\n      * Output: \\verbinclude Tridiagonalization_householderCoefficients.out\n      *\n      * \\sa packedMatrix(), \\ref Householder_Module \"Householder module\"\n      */\n    inline CoeffVectorType householderCoefficients() const\n    {\n      eigen_assert(m_isInitialized && \"Tridiagonalization is not initialized.\");\n      return m_hCoeffs;\n    }\n\n    /** \\brief Returns the internal representation of the decomposition\n      *\n      *\t\\returns a const reference to a matrix with the internal representation\n      *\t         of the decomposition.\n      *\n      * \\pre Either the constructor Tridiagonalization(const MatrixType&) or\n      * the member function compute(const MatrixType&) has been called before\n      * to compute the tridiagonal decomposition of a matrix.\n      *\n      * The returned matrix contains the following information:\n      *  - the strict upper triangular part is equal to the input matrix A.\n      *  - the diagonal and lower sub-diagonal represent the real tridiagonal\n      *    symmetric matrix T.\n      *  - the rest of the lower part contains the Householder vectors that,\n      *    combined with Householder coefficients returned by\n      *    householderCoefficients(), allows to reconstruct the matrix Q as\n      *       \\f$ Q = H_{N-1} \\ldots H_1 H_0 \\f$.\n      *    Here, the matrices \\f$ H_i \\f$ are the Householder transformations\n      *       \\f$ H_i = (I - h_i v_i v_i^T) \\f$\n      *    where \\f$ h_i \\f$ is the \\f$ i \\f$th Householder coefficient and\n      *    \\f$ v_i \\f$ is the Householder vector defined by\n      *       \\f$ v_i = [ 0, \\ldots, 0, 1, M(i+2,i), \\ldots, M(N-1,i) ]^T \\f$\n      *    with M the matrix returned by this function.\n      *\n      * See LAPACK for further details on this packed storage.\n      *\n      * Example: \\include Tridiagonalization_packedMatrix.cpp\n      * Output: \\verbinclude Tridiagonalization_packedMatrix.out\n      *\n      * \\sa householderCoefficients()\n      */\n    inline const MatrixType& packedMatrix() const\n    {\n      eigen_assert(m_isInitialized && \"Tridiagonalization is not initialized.\");\n      return m_matrix;\n    }\n\n    /** \\brief Returns the unitary matrix Q in the decomposition\n      *\n      * \\returns object representing the matrix Q\n      *\n      * \\pre Either the constructor Tridiagonalization(const MatrixType&) or\n      * the member function compute(const MatrixType&) has been called before\n      * to compute the tridiagonal decomposition of a matrix.\n      *\n      * This function returns a light-weight object of template class\n      * HouseholderSequence. You can either apply it directly to a matrix or\n      * you can convert it to a matrix of type #MatrixType.\n      *\n      * \\sa Tridiagonalization(const MatrixType&) for an example,\n      *     matrixT(), class HouseholderSequence\n      */\n    HouseholderSequenceType matrixQ() const\n    {\n      eigen_assert(m_isInitialized && \"Tridiagonalization is not initialized.\");\n      return HouseholderSequenceType(m_matrix, m_hCoeffs.conjugate())\n             .setLength(m_matrix.rows() - 1)\n             .setShift(1);\n    }\n\n    /** \\brief Returns an expression of the tridiagonal matrix T in the decomposition\n      *\n      * \\returns expression object representing the matrix T\n      *\n      * \\pre Either the constructor Tridiagonalization(const MatrixType&) or\n      * the member function compute(const MatrixType&) has been called before\n      * to compute the tridiagonal decomposition of a matrix.\n      *\n      * Currently, this function can be used to extract the matrix T from internal\n      * data and copy it to a dense matrix object. In most cases, it may be\n      * sufficient to directly use the packed matrix or the vector expressions\n      * returned by diagonal() and subDiagonal() instead of creating a new\n      * dense copy matrix with this function.\n      *\n      * \\sa Tridiagonalization(const MatrixType&) for an example,\n      * matrixQ(), packedMatrix(), diagonal(), subDiagonal()\n      */\n    MatrixTReturnType matrixT() const\n    {\n      eigen_assert(m_isInitialized && \"Tridiagonalization is not initialized.\");\n      return MatrixTReturnType(m_matrix.real());\n    }\n\n    /** \\brief Returns the diagonal of the tridiagonal matrix T in the decomposition.\n      *\n      * \\returns expression representing the diagonal of T\n      *\n      * \\pre Either the constructor Tridiagonalization(const MatrixType&) or\n      * the member function compute(const MatrixType&) has been called before\n      * to compute the tridiagonal decomposition of a matrix.\n      *\n      * Example: \\include Tridiagonalization_diagonal.cpp\n      * Output: \\verbinclude Tridiagonalization_diagonal.out\n      *\n      * \\sa matrixT(), subDiagonal()\n      */\n    DiagonalReturnType diagonal() const;\n\n    /** \\brief Returns the subdiagonal of the tridiagonal matrix T in the decomposition.\n      *\n      * \\returns expression representing the subdiagonal of T\n      *\n      * \\pre Either the constructor Tridiagonalization(const MatrixType&) or\n      * the member function compute(const MatrixType&) has been called before\n      * to compute the tridiagonal decomposition of a matrix.\n      *\n      * \\sa diagonal() for an example, matrixT()\n      */\n    SubDiagonalReturnType subDiagonal() const;\n\n  protected:\n\n    MatrixType m_matrix;\n    CoeffVectorType m_hCoeffs;\n    bool m_isInitialized;\n};\n\ntemplate<typename MatrixType>\ntypename Tridiagonalization<MatrixType>::DiagonalReturnType\nTridiagonalization<MatrixType>::diagonal() const\n{\n  eigen_assert(m_isInitialized && \"Tridiagonalization is not initialized.\");\n  return m_matrix.diagonal().real();\n}\n\ntemplate<typename MatrixType>\ntypename Tridiagonalization<MatrixType>::SubDiagonalReturnType\nTridiagonalization<MatrixType>::subDiagonal() const\n{\n  eigen_assert(m_isInitialized && \"Tridiagonalization is not initialized.\");\n  return m_matrix.template diagonal<-1>().real();\n}\n\nnamespace internal {\n\n/** \\internal\n  * Performs a tridiagonal decomposition of the selfadjoint matrix \\a matA in-place.\n  *\n  * \\param[in,out] matA On input the selfadjoint matrix. Only the \\b lower triangular part is referenced.\n  *                     On output, the strict upper part is left unchanged, and the lower triangular part\n  *                     represents the T and Q matrices in packed format has detailed below.\n  * \\param[out]    hCoeffs returned Householder coefficients (see below)\n  *\n  * On output, the tridiagonal selfadjoint matrix T is stored in the diagonal\n  * and lower sub-diagonal of the matrix \\a matA.\n  * The unitary matrix Q is represented in a compact way as a product of\n  * Householder reflectors \\f$ H_i \\f$ such that:\n  *       \\f$ Q = H_{N-1} \\ldots H_1 H_0 \\f$.\n  * The Householder reflectors are defined as\n  *       \\f$ H_i = (I - h_i v_i v_i^T) \\f$\n  * where \\f$ h_i = hCoeffs[i]\\f$ is the \\f$ i \\f$th Householder coefficient and\n  * \\f$ v_i \\f$ is the Householder vector defined by\n  *       \\f$ v_i = [ 0, \\ldots, 0, 1, matA(i+2,i), \\ldots, matA(N-1,i) ]^T \\f$.\n  *\n  * Implemented from Golub's \"Matrix Computations\", algorithm 8.3.1.\n  *\n  * \\sa Tridiagonalization::packedMatrix()\n  */\ntemplate<typename MatrixType, typename CoeffVectorType>\nEIGEN_DEVICE_FUNC\nvoid tridiagonalization_inplace(MatrixType& matA, CoeffVectorType& hCoeffs)\n{\n  using numext::conj;\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename MatrixType::RealScalar RealScalar;\n  Index n = matA.rows();\n  eigen_assert(n==matA.cols());\n  eigen_assert(n==hCoeffs.size()+1 || n==1);\n  \n  for (Index i = 0; i<n-1; ++i)\n  {\n    Index remainingSize = n-i-1;\n    RealScalar beta;\n    Scalar h;\n    matA.col(i).tail(remainingSize).makeHouseholderInPlace(h, beta);\n\n    // Apply similarity transformation to remaining columns,\n    // i.e., A = H A H' where H = I - h v v' and v = matA.col(i).tail(n-i-1)\n    matA.col(i).coeffRef(i+1) = 1;\n\n    hCoeffs.tail(n-i-1).noalias() = (matA.bottomRightCorner(remainingSize,remainingSize).template selfadjointView<Lower>()\n                                  * (conj(h) * matA.col(i).tail(remainingSize)));\n\n    hCoeffs.tail(n-i-1) += (conj(h)*RealScalar(-0.5)*(hCoeffs.tail(remainingSize).dot(matA.col(i).tail(remainingSize)))) * matA.col(i).tail(n-i-1);\n\n    matA.bottomRightCorner(remainingSize, remainingSize).template selfadjointView<Lower>()\n      .rankUpdate(matA.col(i).tail(remainingSize), hCoeffs.tail(remainingSize), Scalar(-1));\n\n    matA.col(i).coeffRef(i+1) = beta;\n    hCoeffs.coeffRef(i) = h;\n  }\n}\n\n// forward declaration, implementation at the end of this file\ntemplate<typename MatrixType,\n         int Size=MatrixType::ColsAtCompileTime,\n         bool IsComplex=NumTraits<typename MatrixType::Scalar>::IsComplex>\nstruct tridiagonalization_inplace_selector;\n\n/** \\brief Performs a full tridiagonalization in place\n  *\n  * \\param[in,out]  mat  On input, the selfadjoint matrix whose tridiagonal\n  *    decomposition is to be computed. Only the lower triangular part referenced.\n  *    The rest is left unchanged. On output, the orthogonal matrix Q\n  *    in the decomposition if \\p extractQ is true.\n  * \\param[out]  diag  The diagonal of the tridiagonal matrix T in the\n  *    decomposition.\n  * \\param[out]  subdiag  The subdiagonal of the tridiagonal matrix T in\n  *    the decomposition.\n  * \\param[in]  extractQ  If true, the orthogonal matrix Q in the\n  *    decomposition is computed and stored in \\p mat.\n  *\n  * Computes the tridiagonal decomposition of the selfadjoint matrix \\p mat in place\n  * such that \\f$ mat = Q T Q^* \\f$ where \\f$ Q \\f$ is unitary and \\f$ T \\f$ a real\n  * symmetric tridiagonal matrix.\n  *\n  * The tridiagonal matrix T is passed to the output parameters \\p diag and \\p subdiag. If\n  * \\p extractQ is true, then the orthogonal matrix Q is passed to \\p mat. Otherwise the lower\n  * part of the matrix \\p mat is destroyed.\n  *\n  * The vectors \\p diag and \\p subdiag are not resized. The function\n  * assumes that they are already of the correct size. The length of the\n  * vector \\p diag should equal the number of rows in \\p mat, and the\n  * length of the vector \\p subdiag should be one left.\n  *\n  * This implementation contains an optimized path for 3-by-3 matrices\n  * which is especially useful for plane fitting.\n  *\n  * \\note Currently, it requires two temporary vectors to hold the intermediate\n  * Householder coefficients, and to reconstruct the matrix Q from the Householder\n  * reflectors.\n  *\n  * Example (this uses the same matrix as the example in\n  *    Tridiagonalization::Tridiagonalization(const MatrixType&)):\n  *    \\include Tridiagonalization_decomposeInPlace.cpp\n  * Output: \\verbinclude Tridiagonalization_decomposeInPlace.out\n  *\n  * \\sa class Tridiagonalization\n  */\ntemplate<typename MatrixType, typename DiagonalType, typename SubDiagonalType>\nEIGEN_DEVICE_FUNC\nvoid tridiagonalization_inplace(MatrixType& mat, DiagonalType& diag, SubDiagonalType& subdiag, bool extractQ)\n{\n  eigen_assert(mat.cols()==mat.rows() && diag.size()==mat.rows() && subdiag.size()==mat.rows()-1);\n  tridiagonalization_inplace_selector<MatrixType>::run(mat, diag, subdiag, extractQ);\n}\n\n/** \\internal\n  * General full tridiagonalization\n  */\ntemplate<typename MatrixType, int Size, bool IsComplex>\nstruct tridiagonalization_inplace_selector\n{\n  typedef typename Tridiagonalization<MatrixType>::CoeffVectorType CoeffVectorType;\n  typedef typename Tridiagonalization<MatrixType>::HouseholderSequenceType HouseholderSequenceType;\n  template<typename DiagonalType, typename SubDiagonalType>\n  static EIGEN_DEVICE_FUNC\n  void run(MatrixType& mat, DiagonalType& diag, SubDiagonalType& subdiag, bool extractQ)\n  {\n    CoeffVectorType hCoeffs(mat.cols()-1);\n    tridiagonalization_inplace(mat,hCoeffs);\n    diag = mat.diagonal().real();\n    subdiag = mat.template diagonal<-1>().real();\n    if(extractQ)\n      mat = HouseholderSequenceType(mat, hCoeffs.conjugate())\n            .setLength(mat.rows() - 1)\n            .setShift(1);\n  }\n};\n\n/** \\internal\n  * Specialization for 3x3 real matrices.\n  * Especially useful for plane fitting.\n  */\ntemplate<typename MatrixType>\nstruct tridiagonalization_inplace_selector<MatrixType,3,false>\n{\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename MatrixType::RealScalar RealScalar;\n\n  template<typename DiagonalType, typename SubDiagonalType>\n  static void run(MatrixType& mat, DiagonalType& diag, SubDiagonalType& subdiag, bool extractQ)\n  {\n    using std::sqrt;\n    const RealScalar tol = (std::numeric_limits<RealScalar>::min)();\n    diag[0] = mat(0,0);\n    RealScalar v1norm2 = numext::abs2(mat(2,0));\n    if(v1norm2 <= tol)\n    {\n      diag[1] = mat(1,1);\n      diag[2] = mat(2,2);\n      subdiag[0] = mat(1,0);\n      subdiag[1] = mat(2,1);\n      if (extractQ)\n        mat.setIdentity();\n    }\n    else\n    {\n      RealScalar beta = sqrt(numext::abs2(mat(1,0)) + v1norm2);\n      RealScalar invBeta = RealScalar(1)/beta;\n      Scalar m01 = mat(1,0) * invBeta;\n      Scalar m02 = mat(2,0) * invBeta;\n      Scalar q = RealScalar(2)*m01*mat(2,1) + m02*(mat(2,2) - mat(1,1));\n      diag[1] = mat(1,1) + m02*q;\n      diag[2] = mat(2,2) - m02*q;\n      subdiag[0] = beta;\n      subdiag[1] = mat(2,1) - m01 * q;\n      if (extractQ)\n      {\n        mat << 1,   0,    0,\n               0, m01,  m02,\n               0, m02, -m01;\n      }\n    }\n  }\n};\n\n/** \\internal\n  * Trivial specialization for 1x1 matrices\n  */\ntemplate<typename MatrixType, bool IsComplex>\nstruct tridiagonalization_inplace_selector<MatrixType,1,IsComplex>\n{\n  typedef typename MatrixType::Scalar Scalar;\n\n  template<typename DiagonalType, typename SubDiagonalType>\n  static EIGEN_DEVICE_FUNC\n  void run(MatrixType& mat, DiagonalType& diag, SubDiagonalType&, bool extractQ)\n  {\n    diag(0,0) = numext::real(mat(0,0));\n    if(extractQ)\n      mat(0,0) = Scalar(1);\n  }\n};\n\n/** \\internal\n  * \\eigenvalues_module \\ingroup Eigenvalues_Module\n  *\n  * \\brief Expression type for return value of Tridiagonalization::matrixT()\n  *\n  * \\tparam MatrixType type of underlying dense matrix\n  */\ntemplate<typename MatrixType> struct TridiagonalizationMatrixTReturnType\n: public ReturnByValue<TridiagonalizationMatrixTReturnType<MatrixType> >\n{\n  public:\n    /** \\brief Constructor.\n      *\n      * \\param[in] mat The underlying dense matrix\n      */\n    TridiagonalizationMatrixTReturnType(const MatrixType& mat) : m_matrix(mat) { }\n\n    template <typename ResultType>\n    inline void evalTo(ResultType& result) const\n    {\n      result.setZero();\n      result.template diagonal<1>() = m_matrix.template diagonal<-1>().conjugate();\n      result.diagonal() = m_matrix.diagonal();\n      result.template diagonal<-1>() = m_matrix.template diagonal<-1>();\n    }\n\n    Index rows() const { return m_matrix.rows(); }\n    Index cols() const { return m_matrix.cols(); }\n\n  protected:\n    typename MatrixType::Nested m_matrix;\n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_TRIDIAGONALIZATION_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Geometry/AlignedBox.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_ALIGNEDBOX_H\n#define EIGEN_ALIGNEDBOX_H\n\nnamespace Eigen { \n\n/** \\geometry_module \\ingroup Geometry_Module\n  *\n  *\n  * \\class AlignedBox\n  *\n  * \\brief An axis aligned box\n  *\n  * \\tparam _Scalar the type of the scalar coefficients\n  * \\tparam _AmbientDim the dimension of the ambient space, can be a compile time value or Dynamic.\n  *\n  * This class represents an axis aligned box as a pair of the minimal and maximal corners.\n  * \\warning The result of most methods is undefined when applied to an empty box. You can check for empty boxes using isEmpty().\n  * \\sa alignedboxtypedefs\n  */\ntemplate <typename _Scalar, int _AmbientDim>\nclass AlignedBox\n{\npublic:\nEIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_AmbientDim)\n  enum { AmbientDimAtCompileTime = _AmbientDim };\n  typedef _Scalar                                   Scalar;\n  typedef NumTraits<Scalar>                         ScalarTraits;\n  typedef Eigen::Index                              Index; ///< \\deprecated since Eigen 3.3\n  typedef typename ScalarTraits::Real               RealScalar;\n  typedef typename ScalarTraits::NonInteger         NonInteger;\n  typedef Matrix<Scalar,AmbientDimAtCompileTime,1>  VectorType;\n  typedef CwiseBinaryOp<internal::scalar_sum_op<Scalar>, const VectorType, const VectorType> VectorTypeSum;\n\n  /** Define constants to name the corners of a 1D, 2D or 3D axis aligned bounding box */\n  enum CornerType\n  {\n    /** 1D names @{ */\n    Min=0, Max=1,\n    /** @} */\n\n    /** Identifier for 2D corner @{ */\n    BottomLeft=0, BottomRight=1,\n    TopLeft=2, TopRight=3,\n    /** @} */\n\n    /** Identifier for 3D corner  @{ */\n    BottomLeftFloor=0, BottomRightFloor=1,\n    TopLeftFloor=2, TopRightFloor=3,\n    BottomLeftCeil=4, BottomRightCeil=5,\n    TopLeftCeil=6, TopRightCeil=7\n    /** @} */\n  };\n\n\n  /** Default constructor initializing a null box. */\n  EIGEN_DEVICE_FUNC inline AlignedBox()\n  { if (EIGEN_CONST_CONDITIONAL(AmbientDimAtCompileTime!=Dynamic)) setEmpty(); }\n\n  /** Constructs a null box with \\a _dim the dimension of the ambient space. */\n  EIGEN_DEVICE_FUNC inline explicit AlignedBox(Index _dim) : m_min(_dim), m_max(_dim)\n  { setEmpty(); }\n\n  /** Constructs a box with extremities \\a _min and \\a _max.\n   * \\warning If either component of \\a _min is larger than the same component of \\a _max, the constructed box is empty. */\n  template<typename OtherVectorType1, typename OtherVectorType2>\n  EIGEN_DEVICE_FUNC inline AlignedBox(const OtherVectorType1& _min, const OtherVectorType2& _max) : m_min(_min), m_max(_max) {}\n\n  /** Constructs a box containing a single point \\a p. */\n  template<typename Derived>\n  EIGEN_DEVICE_FUNC inline explicit AlignedBox(const MatrixBase<Derived>& p) : m_min(p), m_max(m_min)\n  { }\n\n  EIGEN_DEVICE_FUNC ~AlignedBox() {}\n\n  /** \\returns the dimension in which the box holds */\n  EIGEN_DEVICE_FUNC inline Index dim() const { return AmbientDimAtCompileTime==Dynamic ? m_min.size() : Index(AmbientDimAtCompileTime); }\n\n  /** \\deprecated use isEmpty() */\n  EIGEN_DEVICE_FUNC inline bool isNull() const { return isEmpty(); }\n\n  /** \\deprecated use setEmpty() */\n  EIGEN_DEVICE_FUNC inline void setNull() { setEmpty(); }\n\n  /** \\returns true if the box is empty.\n   * \\sa setEmpty */\n  EIGEN_DEVICE_FUNC inline bool isEmpty() const { return (m_min.array() > m_max.array()).any(); }\n\n  /** Makes \\c *this an empty box.\n   * \\sa isEmpty */\n  EIGEN_DEVICE_FUNC inline void setEmpty()\n  {\n    m_min.setConstant( ScalarTraits::highest() );\n    m_max.setConstant( ScalarTraits::lowest() );\n  }\n\n  /** \\returns the minimal corner */\n  EIGEN_DEVICE_FUNC inline const VectorType& (min)() const { return m_min; }\n  /** \\returns a non const reference to the minimal corner */\n  EIGEN_DEVICE_FUNC inline VectorType& (min)() { return m_min; }\n  /** \\returns the maximal corner */\n  EIGEN_DEVICE_FUNC inline const VectorType& (max)() const { return m_max; }\n  /** \\returns a non const reference to the maximal corner */\n  EIGEN_DEVICE_FUNC inline VectorType& (max)() { return m_max; }\n\n  /** \\returns the center of the box */\n  EIGEN_DEVICE_FUNC inline const EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(VectorTypeSum, RealScalar, quotient)\n  center() const\n  { return (m_min+m_max)/RealScalar(2); }\n\n  /** \\returns the lengths of the sides of the bounding box.\n    * Note that this function does not get the same\n    * result for integral or floating scalar types: see\n    */\n  EIGEN_DEVICE_FUNC inline const CwiseBinaryOp< internal::scalar_difference_op<Scalar,Scalar>, const VectorType, const VectorType> sizes() const\n  { return m_max - m_min; }\n\n  /** \\returns the volume of the bounding box */\n  EIGEN_DEVICE_FUNC inline Scalar volume() const\n  { return sizes().prod(); }\n\n  /** \\returns an expression for the bounding box diagonal vector\n    * if the length of the diagonal is needed: diagonal().norm()\n    * will provide it.\n    */\n  EIGEN_DEVICE_FUNC inline CwiseBinaryOp< internal::scalar_difference_op<Scalar,Scalar>, const VectorType, const VectorType> diagonal() const\n  { return sizes(); }\n\n  /** \\returns the vertex of the bounding box at the corner defined by\n    * the corner-id corner. It works only for a 1D, 2D or 3D bounding box.\n    * For 1D bounding boxes corners are named by 2 enum constants:\n    * BottomLeft and BottomRight.\n    * For 2D bounding boxes, corners are named by 4 enum constants:\n    * BottomLeft, BottomRight, TopLeft, TopRight.\n    * For 3D bounding boxes, the following names are added:\n    * BottomLeftCeil, BottomRightCeil, TopLeftCeil, TopRightCeil.\n    */\n  EIGEN_DEVICE_FUNC inline VectorType corner(CornerType corner) const\n  {\n    EIGEN_STATIC_ASSERT(_AmbientDim <= 3, THIS_METHOD_IS_ONLY_FOR_VECTORS_OF_A_SPECIFIC_SIZE);\n\n    VectorType res;\n\n    Index mult = 1;\n    for(Index d=0; d<dim(); ++d)\n    {\n      if( mult & corner ) res[d] = m_max[d];\n      else                res[d] = m_min[d];\n      mult *= 2;\n    }\n    return res;\n  }\n\n  /** \\returns a random point inside the bounding box sampled with\n   * a uniform distribution */\n  EIGEN_DEVICE_FUNC inline VectorType sample() const\n  {\n    VectorType r(dim());\n    for(Index d=0; d<dim(); ++d)\n    {\n      if(!ScalarTraits::IsInteger)\n      {\n        r[d] = m_min[d] + (m_max[d]-m_min[d])\n             * internal::random<Scalar>(Scalar(0), Scalar(1));\n      }\n      else\n        r[d] = internal::random(m_min[d], m_max[d]);\n    }\n    return r;\n  }\n\n  /** \\returns true if the point \\a p is inside the box \\c *this. */\n  template<typename Derived>\n  EIGEN_DEVICE_FUNC inline bool contains(const MatrixBase<Derived>& p) const\n  {\n    typename internal::nested_eval<Derived,2>::type p_n(p.derived());\n    return (m_min.array()<=p_n.array()).all() && (p_n.array()<=m_max.array()).all();\n  }\n\n  /** \\returns true if the box \\a b is entirely inside the box \\c *this. */\n  EIGEN_DEVICE_FUNC inline bool contains(const AlignedBox& b) const\n  { return (m_min.array()<=(b.min)().array()).all() && ((b.max)().array()<=m_max.array()).all(); }\n\n  /** \\returns true if the box \\a b is intersecting the box \\c *this.\n   * \\sa intersection, clamp */\n  EIGEN_DEVICE_FUNC inline bool intersects(const AlignedBox& b) const\n  { return (m_min.array()<=(b.max)().array()).all() && ((b.min)().array()<=m_max.array()).all(); }\n\n  /** Extends \\c *this such that it contains the point \\a p and returns a reference to \\c *this.\n   * \\sa extend(const AlignedBox&) */\n  template<typename Derived>\n  EIGEN_DEVICE_FUNC inline AlignedBox& extend(const MatrixBase<Derived>& p)\n  {\n    typename internal::nested_eval<Derived,2>::type p_n(p.derived());\n    m_min = m_min.cwiseMin(p_n);\n    m_max = m_max.cwiseMax(p_n);\n    return *this;\n  }\n\n  /** Extends \\c *this such that it contains the box \\a b and returns a reference to \\c *this.\n   * \\sa merged, extend(const MatrixBase&) */\n  EIGEN_DEVICE_FUNC inline AlignedBox& extend(const AlignedBox& b)\n  {\n    m_min = m_min.cwiseMin(b.m_min);\n    m_max = m_max.cwiseMax(b.m_max);\n    return *this;\n  }\n\n  /** Clamps \\c *this by the box \\a b and returns a reference to \\c *this.\n   * \\note If the boxes don't intersect, the resulting box is empty.\n   * \\sa intersection(), intersects() */\n  EIGEN_DEVICE_FUNC inline AlignedBox& clamp(const AlignedBox& b)\n  {\n    m_min = m_min.cwiseMax(b.m_min);\n    m_max = m_max.cwiseMin(b.m_max);\n    return *this;\n  }\n\n  /** Returns an AlignedBox that is the intersection of \\a b and \\c *this\n   * \\note If the boxes don't intersect, the resulting box is empty.\n   * \\sa intersects(), clamp, contains()  */\n  EIGEN_DEVICE_FUNC inline AlignedBox intersection(const AlignedBox& b) const\n  {return AlignedBox(m_min.cwiseMax(b.m_min), m_max.cwiseMin(b.m_max)); }\n\n  /** Returns an AlignedBox that is the union of \\a b and \\c *this.\n   * \\note Merging with an empty box may result in a box bigger than \\c *this. \n   * \\sa extend(const AlignedBox&) */\n  EIGEN_DEVICE_FUNC inline AlignedBox merged(const AlignedBox& b) const\n  { return AlignedBox(m_min.cwiseMin(b.m_min), m_max.cwiseMax(b.m_max)); }\n\n  /** Translate \\c *this by the vector \\a t and returns a reference to \\c *this. */\n  template<typename Derived>\n  EIGEN_DEVICE_FUNC inline AlignedBox& translate(const MatrixBase<Derived>& a_t)\n  {\n    const typename internal::nested_eval<Derived,2>::type t(a_t.derived());\n    m_min += t;\n    m_max += t;\n    return *this;\n  }\n\n  /** \\returns the squared distance between the point \\a p and the box \\c *this,\n    * and zero if \\a p is inside the box.\n    * \\sa exteriorDistance(const MatrixBase&), squaredExteriorDistance(const AlignedBox&)\n    */\n  template<typename Derived>\n  EIGEN_DEVICE_FUNC inline Scalar squaredExteriorDistance(const MatrixBase<Derived>& p) const;\n\n  /** \\returns the squared distance between the boxes \\a b and \\c *this,\n    * and zero if the boxes intersect.\n    * \\sa exteriorDistance(const AlignedBox&), squaredExteriorDistance(const MatrixBase&)\n    */\n  EIGEN_DEVICE_FUNC inline Scalar squaredExteriorDistance(const AlignedBox& b) const;\n\n  /** \\returns the distance between the point \\a p and the box \\c *this,\n    * and zero if \\a p is inside the box.\n    * \\sa squaredExteriorDistance(const MatrixBase&), exteriorDistance(const AlignedBox&)\n    */\n  template<typename Derived>\n  EIGEN_DEVICE_FUNC inline NonInteger exteriorDistance(const MatrixBase<Derived>& p) const\n  { EIGEN_USING_STD_MATH(sqrt) return sqrt(NonInteger(squaredExteriorDistance(p))); }\n\n  /** \\returns the distance between the boxes \\a b and \\c *this,\n    * and zero if the boxes intersect.\n    * \\sa squaredExteriorDistance(const AlignedBox&), exteriorDistance(const MatrixBase&)\n    */\n  EIGEN_DEVICE_FUNC inline NonInteger exteriorDistance(const AlignedBox& b) const\n  { EIGEN_USING_STD_MATH(sqrt) return sqrt(NonInteger(squaredExteriorDistance(b))); }\n\n  /** \\returns \\c *this with scalar type casted to \\a NewScalarType\n    *\n    * Note that if \\a NewScalarType is equal to the current scalar type of \\c *this\n    * then this function smartly returns a const reference to \\c *this.\n    */\n  template<typename NewScalarType>\n  EIGEN_DEVICE_FUNC inline typename internal::cast_return_type<AlignedBox,\n           AlignedBox<NewScalarType,AmbientDimAtCompileTime> >::type cast() const\n  {\n    return typename internal::cast_return_type<AlignedBox,\n                    AlignedBox<NewScalarType,AmbientDimAtCompileTime> >::type(*this);\n  }\n\n  /** Copy constructor with scalar type conversion */\n  template<typename OtherScalarType>\n  EIGEN_DEVICE_FUNC inline explicit AlignedBox(const AlignedBox<OtherScalarType,AmbientDimAtCompileTime>& other)\n  {\n    m_min = (other.min)().template cast<Scalar>();\n    m_max = (other.max)().template cast<Scalar>();\n  }\n\n  /** \\returns \\c true if \\c *this is approximately equal to \\a other, within the precision\n    * determined by \\a prec.\n    *\n    * \\sa MatrixBase::isApprox() */\n  EIGEN_DEVICE_FUNC bool isApprox(const AlignedBox& other, const RealScalar& prec = ScalarTraits::dummy_precision()) const\n  { return m_min.isApprox(other.m_min, prec) && m_max.isApprox(other.m_max, prec); }\n\nprotected:\n\n  VectorType m_min, m_max;\n};\n\n\n\ntemplate<typename Scalar,int AmbientDim>\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC inline Scalar AlignedBox<Scalar,AmbientDim>::squaredExteriorDistance(const MatrixBase<Derived>& a_p) const\n{\n  typename internal::nested_eval<Derived,2*AmbientDim>::type p(a_p.derived());\n  Scalar dist2(0);\n  Scalar aux;\n  for (Index k=0; k<dim(); ++k)\n  {\n    if( m_min[k] > p[k] )\n    {\n      aux = m_min[k] - p[k];\n      dist2 += aux*aux;\n    }\n    else if( p[k] > m_max[k] )\n    {\n      aux = p[k] - m_max[k];\n      dist2 += aux*aux;\n    }\n  }\n  return dist2;\n}\n\ntemplate<typename Scalar,int AmbientDim>\nEIGEN_DEVICE_FUNC inline Scalar AlignedBox<Scalar,AmbientDim>::squaredExteriorDistance(const AlignedBox& b) const\n{\n  Scalar dist2(0);\n  Scalar aux;\n  for (Index k=0; k<dim(); ++k)\n  {\n    if( m_min[k] > b.m_max[k] )\n    {\n      aux = m_min[k] - b.m_max[k];\n      dist2 += aux*aux;\n    }\n    else if( b.m_min[k] > m_max[k] )\n    {\n      aux = b.m_min[k] - m_max[k];\n      dist2 += aux*aux;\n    }\n  }\n  return dist2;\n}\n\n/** \\defgroup alignedboxtypedefs Global aligned box typedefs\n  *\n  * \\ingroup Geometry_Module\n  *\n  * Eigen defines several typedef shortcuts for most common aligned box types.\n  *\n  * The general patterns are the following:\n  *\n  * \\c AlignedBoxSizeType where \\c Size can be \\c 1, \\c 2,\\c 3,\\c 4 for fixed size boxes or \\c X for dynamic size,\n  * and where \\c Type can be \\c i for integer, \\c f for float, \\c d for double.\n  *\n  * For example, \\c AlignedBox3d is a fixed-size 3x3 aligned box type of doubles, and \\c AlignedBoxXf is a dynamic-size aligned box of floats.\n  *\n  * \\sa class AlignedBox\n  */\n\n#define EIGEN_MAKE_TYPEDEFS(Type, TypeSuffix, Size, SizeSuffix)    \\\n/** \\ingroup alignedboxtypedefs */                                 \\\ntypedef AlignedBox<Type, Size>   AlignedBox##SizeSuffix##TypeSuffix;\n\n#define EIGEN_MAKE_TYPEDEFS_ALL_SIZES(Type, TypeSuffix) \\\nEIGEN_MAKE_TYPEDEFS(Type, TypeSuffix, 1, 1) \\\nEIGEN_MAKE_TYPEDEFS(Type, TypeSuffix, 2, 2) \\\nEIGEN_MAKE_TYPEDEFS(Type, TypeSuffix, 3, 3) \\\nEIGEN_MAKE_TYPEDEFS(Type, TypeSuffix, 4, 4) \\\nEIGEN_MAKE_TYPEDEFS(Type, TypeSuffix, Dynamic, X)\n\nEIGEN_MAKE_TYPEDEFS_ALL_SIZES(int,                  i)\nEIGEN_MAKE_TYPEDEFS_ALL_SIZES(float,                f)\nEIGEN_MAKE_TYPEDEFS_ALL_SIZES(double,               d)\n\n#undef EIGEN_MAKE_TYPEDEFS_ALL_SIZES\n#undef EIGEN_MAKE_TYPEDEFS\n\n} // end namespace Eigen\n\n#endif // EIGEN_ALIGNEDBOX_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Geometry/AngleAxis.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_ANGLEAXIS_H\n#define EIGEN_ANGLEAXIS_H\n\nnamespace Eigen { \n\n/** \\geometry_module \\ingroup Geometry_Module\n  *\n  * \\class AngleAxis\n  *\n  * \\brief Represents a 3D rotation as a rotation angle around an arbitrary 3D axis\n  *\n  * \\param _Scalar the scalar type, i.e., the type of the coefficients.\n  *\n  * \\warning When setting up an AngleAxis object, the axis vector \\b must \\b be \\b normalized.\n  *\n  * The following two typedefs are provided for convenience:\n  * \\li \\c AngleAxisf for \\c float\n  * \\li \\c AngleAxisd for \\c double\n  *\n  * Combined with MatrixBase::Unit{X,Y,Z}, AngleAxis can be used to easily\n  * mimic Euler-angles. Here is an example:\n  * \\include AngleAxis_mimic_euler.cpp\n  * Output: \\verbinclude AngleAxis_mimic_euler.out\n  *\n  * \\note This class is not aimed to be used to store a rotation transformation,\n  * but rather to make easier the creation of other rotation (Quaternion, rotation Matrix)\n  * and transformation objects.\n  *\n  * \\sa class Quaternion, class Transform, MatrixBase::UnitX()\n  */\n\nnamespace internal {\ntemplate<typename _Scalar> struct traits<AngleAxis<_Scalar> >\n{\n  typedef _Scalar Scalar;\n};\n}\n\ntemplate<typename _Scalar>\nclass AngleAxis : public RotationBase<AngleAxis<_Scalar>,3>\n{\n  typedef RotationBase<AngleAxis<_Scalar>,3> Base;\n\npublic:\n\n  using Base::operator*;\n\n  enum { Dim = 3 };\n  /** the scalar type of the coefficients */\n  typedef _Scalar Scalar;\n  typedef Matrix<Scalar,3,3> Matrix3;\n  typedef Matrix<Scalar,3,1> Vector3;\n  typedef Quaternion<Scalar> QuaternionType;\n\nprotected:\n\n  Vector3 m_axis;\n  Scalar m_angle;\n\npublic:\n\n  /** Default constructor without initialization. */\n  EIGEN_DEVICE_FUNC AngleAxis() {}\n  /** Constructs and initialize the angle-axis rotation from an \\a angle in radian\n    * and an \\a axis which \\b must \\b be \\b normalized.\n    *\n    * \\warning If the \\a axis vector is not normalized, then the angle-axis object\n    *          represents an invalid rotation. */\n  template<typename Derived>\n  EIGEN_DEVICE_FUNC \n  inline AngleAxis(const Scalar& angle, const MatrixBase<Derived>& axis) : m_axis(axis), m_angle(angle) {}\n  /** Constructs and initialize the angle-axis rotation from a quaternion \\a q.\n    * This function implicitly normalizes the quaternion \\a q.\n    */\n  template<typename QuatDerived> \n  EIGEN_DEVICE_FUNC inline explicit AngleAxis(const QuaternionBase<QuatDerived>& q) { *this = q; }\n  /** Constructs and initialize the angle-axis rotation from a 3x3 rotation matrix. */\n  template<typename Derived>\n  EIGEN_DEVICE_FUNC inline explicit AngleAxis(const MatrixBase<Derived>& m) { *this = m; }\n\n  /** \\returns the value of the rotation angle in radian */\n  EIGEN_DEVICE_FUNC Scalar angle() const { return m_angle; }\n  /** \\returns a read-write reference to the stored angle in radian */\n  EIGEN_DEVICE_FUNC Scalar& angle() { return m_angle; }\n\n  /** \\returns the rotation axis */\n  EIGEN_DEVICE_FUNC const Vector3& axis() const { return m_axis; }\n  /** \\returns a read-write reference to the stored rotation axis.\n    *\n    * \\warning The rotation axis must remain a \\b unit vector.\n    */\n  EIGEN_DEVICE_FUNC Vector3& axis() { return m_axis; }\n\n  /** Concatenates two rotations */\n  EIGEN_DEVICE_FUNC inline QuaternionType operator* (const AngleAxis& other) const\n  { return QuaternionType(*this) * QuaternionType(other); }\n\n  /** Concatenates two rotations */\n  EIGEN_DEVICE_FUNC inline QuaternionType operator* (const QuaternionType& other) const\n  { return QuaternionType(*this) * other; }\n\n  /** Concatenates two rotations */\n  friend EIGEN_DEVICE_FUNC inline QuaternionType operator* (const QuaternionType& a, const AngleAxis& b)\n  { return a * QuaternionType(b); }\n\n  /** \\returns the inverse rotation, i.e., an angle-axis with opposite rotation angle */\n  EIGEN_DEVICE_FUNC AngleAxis inverse() const\n  { return AngleAxis(-m_angle, m_axis); }\n\n  template<class QuatDerived>\n  EIGEN_DEVICE_FUNC AngleAxis& operator=(const QuaternionBase<QuatDerived>& q);\n  template<typename Derived>\n  EIGEN_DEVICE_FUNC AngleAxis& operator=(const MatrixBase<Derived>& m);\n\n  template<typename Derived>\n  EIGEN_DEVICE_FUNC AngleAxis& fromRotationMatrix(const MatrixBase<Derived>& m);\n  EIGEN_DEVICE_FUNC Matrix3 toRotationMatrix(void) const;\n\n  /** \\returns \\c *this with scalar type casted to \\a NewScalarType\n    *\n    * Note that if \\a NewScalarType is equal to the current scalar type of \\c *this\n    * then this function smartly returns a const reference to \\c *this.\n    */\n  template<typename NewScalarType>\n  EIGEN_DEVICE_FUNC inline typename internal::cast_return_type<AngleAxis,AngleAxis<NewScalarType> >::type cast() const\n  { return typename internal::cast_return_type<AngleAxis,AngleAxis<NewScalarType> >::type(*this); }\n\n  /** Copy constructor with scalar type conversion */\n  template<typename OtherScalarType>\n  EIGEN_DEVICE_FUNC inline explicit AngleAxis(const AngleAxis<OtherScalarType>& other)\n  {\n    m_axis = other.axis().template cast<Scalar>();\n    m_angle = Scalar(other.angle());\n  }\n\n  EIGEN_DEVICE_FUNC static inline const AngleAxis Identity() { return AngleAxis(Scalar(0), Vector3::UnitX()); }\n\n  /** \\returns \\c true if \\c *this is approximately equal to \\a other, within the precision\n    * determined by \\a prec.\n    *\n    * \\sa MatrixBase::isApprox() */\n  EIGEN_DEVICE_FUNC bool isApprox(const AngleAxis& other, const typename NumTraits<Scalar>::Real& prec = NumTraits<Scalar>::dummy_precision()) const\n  { return m_axis.isApprox(other.m_axis, prec) && internal::isApprox(m_angle,other.m_angle, prec); }\n};\n\n/** \\ingroup Geometry_Module\n  * single precision angle-axis type */\ntypedef AngleAxis<float> AngleAxisf;\n/** \\ingroup Geometry_Module\n  * double precision angle-axis type */\ntypedef AngleAxis<double> AngleAxisd;\n\n/** Set \\c *this from a \\b unit quaternion.\n  *\n  * The resulting axis is normalized, and the computed angle is in the [0,pi] range.\n  * \n  * This function implicitly normalizes the quaternion \\a q.\n  */\ntemplate<typename Scalar>\ntemplate<typename QuatDerived>\nEIGEN_DEVICE_FUNC AngleAxis<Scalar>& AngleAxis<Scalar>::operator=(const QuaternionBase<QuatDerived>& q)\n{\n  EIGEN_USING_STD_MATH(atan2)\n  EIGEN_USING_STD_MATH(abs)\n  Scalar n = q.vec().norm();\n  if(n<NumTraits<Scalar>::epsilon())\n    n = q.vec().stableNorm();\n\n  if (n != Scalar(0))\n  {\n    m_angle = Scalar(2)*atan2(n, abs(q.w()));\n    if(q.w() < Scalar(0))\n      n = -n;\n    m_axis  = q.vec() / n;\n  }\n  else\n  {\n    m_angle = Scalar(0);\n    m_axis << Scalar(1), Scalar(0), Scalar(0);\n  }\n  return *this;\n}\n\n/** Set \\c *this from a 3x3 rotation matrix \\a mat.\n  */\ntemplate<typename Scalar>\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC AngleAxis<Scalar>& AngleAxis<Scalar>::operator=(const MatrixBase<Derived>& mat)\n{\n  // Since a direct conversion would not be really faster,\n  // let's use the robust Quaternion implementation:\n  return *this = QuaternionType(mat);\n}\n\n/**\n* \\brief Sets \\c *this from a 3x3 rotation matrix.\n**/\ntemplate<typename Scalar>\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC AngleAxis<Scalar>& AngleAxis<Scalar>::fromRotationMatrix(const MatrixBase<Derived>& mat)\n{\n  return *this = QuaternionType(mat);\n}\n\n/** Constructs and \\returns an equivalent 3x3 rotation matrix.\n  */\ntemplate<typename Scalar>\ntypename AngleAxis<Scalar>::Matrix3\nEIGEN_DEVICE_FUNC AngleAxis<Scalar>::toRotationMatrix(void) const\n{\n  EIGEN_USING_STD_MATH(sin)\n  EIGEN_USING_STD_MATH(cos)\n  Matrix3 res;\n  Vector3 sin_axis  = sin(m_angle) * m_axis;\n  Scalar c = cos(m_angle);\n  Vector3 cos1_axis = (Scalar(1)-c) * m_axis;\n\n  Scalar tmp;\n  tmp = cos1_axis.x() * m_axis.y();\n  res.coeffRef(0,1) = tmp - sin_axis.z();\n  res.coeffRef(1,0) = tmp + sin_axis.z();\n\n  tmp = cos1_axis.x() * m_axis.z();\n  res.coeffRef(0,2) = tmp + sin_axis.y();\n  res.coeffRef(2,0) = tmp - sin_axis.y();\n\n  tmp = cos1_axis.y() * m_axis.z();\n  res.coeffRef(1,2) = tmp - sin_axis.x();\n  res.coeffRef(2,1) = tmp + sin_axis.x();\n\n  res.diagonal() = (cos1_axis.cwiseProduct(m_axis)).array() + c;\n\n  return res;\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_ANGLEAXIS_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Geometry/EulerAngles.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_EULERANGLES_H\n#define EIGEN_EULERANGLES_H\n\nnamespace Eigen { \n\n/** \\geometry_module \\ingroup Geometry_Module\n  *\n  *\n  * \\returns the Euler-angles of the rotation matrix \\c *this using the convention defined by the triplet (\\a a0,\\a a1,\\a a2)\n  *\n  * Each of the three parameters \\a a0,\\a a1,\\a a2 represents the respective rotation axis as an integer in {0,1,2}.\n  * For instance, in:\n  * \\code Vector3f ea = mat.eulerAngles(2, 0, 2); \\endcode\n  * \"2\" represents the z axis and \"0\" the x axis, etc. The returned angles are such that\n  * we have the following equality:\n  * \\code\n  * mat == AngleAxisf(ea[0], Vector3f::UnitZ())\n  *      * AngleAxisf(ea[1], Vector3f::UnitX())\n  *      * AngleAxisf(ea[2], Vector3f::UnitZ()); \\endcode\n  * This corresponds to the right-multiply conventions (with right hand side frames).\n  * \n  * The returned angles are in the ranges [0:pi]x[-pi:pi]x[-pi:pi].\n  * \n  * \\sa class AngleAxis\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC inline Matrix<typename MatrixBase<Derived>::Scalar,3,1>\nMatrixBase<Derived>::eulerAngles(Index a0, Index a1, Index a2) const\n{\n  EIGEN_USING_STD_MATH(atan2)\n  EIGEN_USING_STD_MATH(sin)\n  EIGEN_USING_STD_MATH(cos)\n  /* Implemented from Graphics Gems IV */\n  EIGEN_STATIC_ASSERT_MATRIX_SPECIFIC_SIZE(Derived,3,3)\n\n  Matrix<Scalar,3,1> res;\n  typedef Matrix<typename Derived::Scalar,2,1> Vector2;\n\n  const Index odd = ((a0+1)%3 == a1) ? 0 : 1;\n  const Index i = a0;\n  const Index j = (a0 + 1 + odd)%3;\n  const Index k = (a0 + 2 - odd)%3;\n  \n  if (a0==a2)\n  {\n    res[0] = atan2(coeff(j,i), coeff(k,i));\n    if((odd && res[0]<Scalar(0)) || ((!odd) && res[0]>Scalar(0)))\n    {\n      if(res[0] > Scalar(0)) {\n        res[0] -= Scalar(EIGEN_PI);\n      }\n      else {\n        res[0] += Scalar(EIGEN_PI);\n      }\n      Scalar s2 = Vector2(coeff(j,i), coeff(k,i)).norm();\n      res[1] = -atan2(s2, coeff(i,i));\n    }\n    else\n    {\n      Scalar s2 = Vector2(coeff(j,i), coeff(k,i)).norm();\n      res[1] = atan2(s2, coeff(i,i));\n    }\n    \n    // With a=(0,1,0), we have i=0; j=1; k=2, and after computing the first two angles,\n    // we can compute their respective rotation, and apply its inverse to M. Since the result must\n    // be a rotation around x, we have:\n    //\n    //  c2  s1.s2 c1.s2                   1  0   0 \n    //  0   c1    -s1       *    M    =   0  c3  s3\n    //  -s2 s1.c2 c1.c2                   0 -s3  c3\n    //\n    //  Thus:  m11.c1 - m21.s1 = c3  &   m12.c1 - m22.s1 = s3\n    \n    Scalar s1 = sin(res[0]);\n    Scalar c1 = cos(res[0]);\n    res[2] = atan2(c1*coeff(j,k)-s1*coeff(k,k), c1*coeff(j,j) - s1 * coeff(k,j));\n  } \n  else\n  {\n    res[0] = atan2(coeff(j,k), coeff(k,k));\n    Scalar c2 = Vector2(coeff(i,i), coeff(i,j)).norm();\n    if((odd && res[0]<Scalar(0)) || ((!odd) && res[0]>Scalar(0))) {\n      if(res[0] > Scalar(0)) {\n        res[0] -= Scalar(EIGEN_PI);\n      }\n      else {\n        res[0] += Scalar(EIGEN_PI);\n      }\n      res[1] = atan2(-coeff(i,k), -c2);\n    }\n    else\n      res[1] = atan2(-coeff(i,k), c2);\n    Scalar s1 = sin(res[0]);\n    Scalar c1 = cos(res[0]);\n    res[2] = atan2(s1*coeff(k,i)-c1*coeff(j,i), c1*coeff(j,j) - s1 * coeff(k,j));\n  }\n  if (!odd)\n    res = -res;\n  \n  return res;\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_EULERANGLES_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Geometry/Homogeneous.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009-2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_HOMOGENEOUS_H\n#define EIGEN_HOMOGENEOUS_H\n\nnamespace Eigen { \n\n/** \\geometry_module \\ingroup Geometry_Module\n  *\n  * \\class Homogeneous\n  *\n  * \\brief Expression of one (or a set of) homogeneous vector(s)\n  *\n  * \\param MatrixType the type of the object in which we are making homogeneous\n  *\n  * This class represents an expression of one (or a set of) homogeneous vector(s).\n  * It is the return type of MatrixBase::homogeneous() and most of the time\n  * this is the only way it is used.\n  *\n  * \\sa MatrixBase::homogeneous()\n  */\n\nnamespace internal {\n\ntemplate<typename MatrixType,int Direction>\nstruct traits<Homogeneous<MatrixType,Direction> >\n : traits<MatrixType>\n{\n  typedef typename traits<MatrixType>::StorageKind StorageKind;\n  typedef typename ref_selector<MatrixType>::type MatrixTypeNested;\n  typedef typename remove_reference<MatrixTypeNested>::type _MatrixTypeNested;\n  enum {\n    RowsPlusOne = (MatrixType::RowsAtCompileTime != Dynamic) ?\n                  int(MatrixType::RowsAtCompileTime) + 1 : Dynamic,\n    ColsPlusOne = (MatrixType::ColsAtCompileTime != Dynamic) ?\n                  int(MatrixType::ColsAtCompileTime) + 1 : Dynamic,\n    RowsAtCompileTime = Direction==Vertical  ?  RowsPlusOne : MatrixType::RowsAtCompileTime,\n    ColsAtCompileTime = Direction==Horizontal ? ColsPlusOne : MatrixType::ColsAtCompileTime,\n    MaxRowsAtCompileTime = RowsAtCompileTime,\n    MaxColsAtCompileTime = ColsAtCompileTime,\n    TmpFlags = _MatrixTypeNested::Flags & HereditaryBits,\n    Flags = ColsAtCompileTime==1 ? (TmpFlags & ~RowMajorBit)\n          : RowsAtCompileTime==1 ? (TmpFlags | RowMajorBit)\n          : TmpFlags\n  };\n};\n\ntemplate<typename MatrixType,typename Lhs> struct homogeneous_left_product_impl;\ntemplate<typename MatrixType,typename Rhs> struct homogeneous_right_product_impl;\n\n} // end namespace internal\n\ntemplate<typename MatrixType,int _Direction> class Homogeneous\n  : public MatrixBase<Homogeneous<MatrixType,_Direction> >, internal::no_assignment_operator\n{\n  public:\n\n    typedef MatrixType NestedExpression;\n    enum { Direction = _Direction };\n\n    typedef MatrixBase<Homogeneous> Base;\n    EIGEN_DENSE_PUBLIC_INTERFACE(Homogeneous)\n\n    EIGEN_DEVICE_FUNC explicit inline Homogeneous(const MatrixType& matrix)\n      : m_matrix(matrix)\n    {}\n\n    EIGEN_DEVICE_FUNC inline Index rows() const { return m_matrix.rows() + (int(Direction)==Vertical   ? 1 : 0); }\n    EIGEN_DEVICE_FUNC inline Index cols() const { return m_matrix.cols() + (int(Direction)==Horizontal ? 1 : 0); }\n    \n    EIGEN_DEVICE_FUNC const NestedExpression& nestedExpression() const { return m_matrix; }\n\n    template<typename Rhs>\n    EIGEN_DEVICE_FUNC inline const Product<Homogeneous,Rhs>\n    operator* (const MatrixBase<Rhs>& rhs) const\n    {\n      eigen_assert(int(Direction)==Horizontal);\n      return Product<Homogeneous,Rhs>(*this,rhs.derived());\n    }\n\n    template<typename Lhs> friend\n    EIGEN_DEVICE_FUNC inline const Product<Lhs,Homogeneous>\n    operator* (const MatrixBase<Lhs>& lhs, const Homogeneous& rhs)\n    {\n      eigen_assert(int(Direction)==Vertical);\n      return Product<Lhs,Homogeneous>(lhs.derived(),rhs);\n    }\n\n    template<typename Scalar, int Dim, int Mode, int Options> friend\n    EIGEN_DEVICE_FUNC inline const Product<Transform<Scalar,Dim,Mode,Options>, Homogeneous >\n    operator* (const Transform<Scalar,Dim,Mode,Options>& lhs, const Homogeneous& rhs)\n    {\n      eigen_assert(int(Direction)==Vertical);\n      return Product<Transform<Scalar,Dim,Mode,Options>, Homogeneous>(lhs,rhs);\n    }\n\n    template<typename Func>\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename internal::result_of<Func(Scalar,Scalar)>::type\n    redux(const Func& func) const\n    {\n      return func(m_matrix.redux(func), Scalar(1));\n    }\n\n  protected:\n    typename MatrixType::Nested m_matrix;\n};\n\n/** \\geometry_module \\ingroup Geometry_Module\n  *\n  * \\returns a vector expression that is one longer than the vector argument, with the value 1 symbolically appended as the last coefficient.\n  *\n  * This can be used to convert affine coordinates to homogeneous coordinates.\n  *\n  * \\only_for_vectors\n  *\n  * Example: \\include MatrixBase_homogeneous.cpp\n  * Output: \\verbinclude MatrixBase_homogeneous.out\n  *\n  * \\sa VectorwiseOp::homogeneous(), class Homogeneous\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC inline typename MatrixBase<Derived>::HomogeneousReturnType\nMatrixBase<Derived>::homogeneous() const\n{\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived);\n  return HomogeneousReturnType(derived());\n}\n\n/** \\geometry_module \\ingroup Geometry_Module\n  *\n  * \\returns an expression where the value 1 is symbolically appended as the final coefficient to each column (or row) of the matrix.\n  *\n  * This can be used to convert affine coordinates to homogeneous coordinates.\n  *\n  * Example: \\include VectorwiseOp_homogeneous.cpp\n  * Output: \\verbinclude VectorwiseOp_homogeneous.out\n  *\n  * \\sa MatrixBase::homogeneous(), class Homogeneous */\ntemplate<typename ExpressionType, int Direction>\nEIGEN_DEVICE_FUNC inline Homogeneous<ExpressionType,Direction>\nVectorwiseOp<ExpressionType,Direction>::homogeneous() const\n{\n  return HomogeneousReturnType(_expression());\n}\n\n/** \\geometry_module \\ingroup Geometry_Module\n  *\n  * \\brief homogeneous normalization\n  *\n  * \\returns a vector expression of the N-1 first coefficients of \\c *this divided by that last coefficient.\n  *\n  * This can be used to convert homogeneous coordinates to affine coordinates.\n  *\n  * It is essentially a shortcut for:\n  * \\code\n    this->head(this->size()-1)/this->coeff(this->size()-1);\n    \\endcode\n  *\n  * Example: \\include MatrixBase_hnormalized.cpp\n  * Output: \\verbinclude MatrixBase_hnormalized.out\n  *\n  * \\sa VectorwiseOp::hnormalized() */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC inline const typename MatrixBase<Derived>::HNormalizedReturnType\nMatrixBase<Derived>::hnormalized() const\n{\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived);\n  return ConstStartMinusOne(derived(),0,0,\n    ColsAtCompileTime==1?size()-1:1,\n    ColsAtCompileTime==1?1:size()-1) / coeff(size()-1);\n}\n\n/** \\geometry_module \\ingroup Geometry_Module\n  *\n  * \\brief column or row-wise homogeneous normalization\n  *\n  * \\returns an expression of the first N-1 coefficients of each column (or row) of \\c *this divided by the last coefficient of each column (or row).\n  *\n  * This can be used to convert homogeneous coordinates to affine coordinates.\n  *\n  * It is conceptually equivalent to calling MatrixBase::hnormalized() to each column (or row) of \\c *this.\n  *\n  * Example: \\include DirectionWise_hnormalized.cpp\n  * Output: \\verbinclude DirectionWise_hnormalized.out\n  *\n  * \\sa MatrixBase::hnormalized() */\ntemplate<typename ExpressionType, int Direction>\nEIGEN_DEVICE_FUNC inline const typename VectorwiseOp<ExpressionType,Direction>::HNormalizedReturnType\nVectorwiseOp<ExpressionType,Direction>::hnormalized() const\n{\n  return HNormalized_Block(_expression(),0,0,\n      Direction==Vertical   ? _expression().rows()-1 : _expression().rows(),\n      Direction==Horizontal ? _expression().cols()-1 : _expression().cols()).cwiseQuotient(\n      Replicate<HNormalized_Factors,\n                Direction==Vertical   ? HNormalized_SizeMinusOne : 1,\n                Direction==Horizontal ? HNormalized_SizeMinusOne : 1>\n        (HNormalized_Factors(_expression(),\n          Direction==Vertical    ? _expression().rows()-1:0,\n          Direction==Horizontal  ? _expression().cols()-1:0,\n          Direction==Vertical    ? 1 : _expression().rows(),\n          Direction==Horizontal  ? 1 : _expression().cols()),\n         Direction==Vertical   ? _expression().rows()-1 : 1,\n         Direction==Horizontal ? _expression().cols()-1 : 1));\n}\n\nnamespace internal {\n\ntemplate<typename MatrixOrTransformType>\nstruct take_matrix_for_product\n{\n  typedef MatrixOrTransformType type;\n  EIGEN_DEVICE_FUNC static const type& run(const type &x) { return x; }\n};\n\ntemplate<typename Scalar, int Dim, int Mode,int Options>\nstruct take_matrix_for_product<Transform<Scalar, Dim, Mode, Options> >\n{\n  typedef Transform<Scalar, Dim, Mode, Options> TransformType;\n  typedef typename internal::add_const<typename TransformType::ConstAffinePart>::type type;\n  EIGEN_DEVICE_FUNC static type run (const TransformType& x) { return x.affine(); }\n};\n\ntemplate<typename Scalar, int Dim, int Options>\nstruct take_matrix_for_product<Transform<Scalar, Dim, Projective, Options> >\n{\n  typedef Transform<Scalar, Dim, Projective, Options> TransformType;\n  typedef typename TransformType::MatrixType type;\n  EIGEN_DEVICE_FUNC static const type& run (const TransformType& x) { return x.matrix(); }\n};\n\ntemplate<typename MatrixType,typename Lhs>\nstruct traits<homogeneous_left_product_impl<Homogeneous<MatrixType,Vertical>,Lhs> >\n{\n  typedef typename take_matrix_for_product<Lhs>::type LhsMatrixType;\n  typedef typename remove_all<MatrixType>::type MatrixTypeCleaned;\n  typedef typename remove_all<LhsMatrixType>::type LhsMatrixTypeCleaned;\n  typedef typename make_proper_matrix_type<\n                 typename traits<MatrixTypeCleaned>::Scalar,\n                 LhsMatrixTypeCleaned::RowsAtCompileTime,\n                 MatrixTypeCleaned::ColsAtCompileTime,\n                 MatrixTypeCleaned::PlainObject::Options,\n                 LhsMatrixTypeCleaned::MaxRowsAtCompileTime,\n                 MatrixTypeCleaned::MaxColsAtCompileTime>::type ReturnType;\n};\n\ntemplate<typename MatrixType,typename Lhs>\nstruct homogeneous_left_product_impl<Homogeneous<MatrixType,Vertical>,Lhs>\n  : public ReturnByValue<homogeneous_left_product_impl<Homogeneous<MatrixType,Vertical>,Lhs> >\n{\n  typedef typename traits<homogeneous_left_product_impl>::LhsMatrixType LhsMatrixType;\n  typedef typename remove_all<LhsMatrixType>::type LhsMatrixTypeCleaned;\n  typedef typename remove_all<typename LhsMatrixTypeCleaned::Nested>::type LhsMatrixTypeNested;\n  EIGEN_DEVICE_FUNC homogeneous_left_product_impl(const Lhs& lhs, const MatrixType& rhs)\n    : m_lhs(take_matrix_for_product<Lhs>::run(lhs)),\n      m_rhs(rhs)\n  {}\n\n  EIGEN_DEVICE_FUNC inline Index rows() const { return m_lhs.rows(); }\n  EIGEN_DEVICE_FUNC inline Index cols() const { return m_rhs.cols(); }\n\n  template<typename Dest> EIGEN_DEVICE_FUNC void evalTo(Dest& dst) const\n  {\n    // FIXME investigate how to allow lazy evaluation of this product when possible\n    dst = Block<const LhsMatrixTypeNested,\n              LhsMatrixTypeNested::RowsAtCompileTime,\n              LhsMatrixTypeNested::ColsAtCompileTime==Dynamic?Dynamic:LhsMatrixTypeNested::ColsAtCompileTime-1>\n            (m_lhs,0,0,m_lhs.rows(),m_lhs.cols()-1) * m_rhs;\n    dst += m_lhs.col(m_lhs.cols()-1).rowwise()\n            .template replicate<MatrixType::ColsAtCompileTime>(m_rhs.cols());\n  }\n\n  typename LhsMatrixTypeCleaned::Nested m_lhs;\n  typename MatrixType::Nested m_rhs;\n};\n\ntemplate<typename MatrixType,typename Rhs>\nstruct traits<homogeneous_right_product_impl<Homogeneous<MatrixType,Horizontal>,Rhs> >\n{\n  typedef typename make_proper_matrix_type<typename traits<MatrixType>::Scalar,\n                 MatrixType::RowsAtCompileTime,\n                 Rhs::ColsAtCompileTime,\n                 MatrixType::PlainObject::Options,\n                 MatrixType::MaxRowsAtCompileTime,\n                 Rhs::MaxColsAtCompileTime>::type ReturnType;\n};\n\ntemplate<typename MatrixType,typename Rhs>\nstruct homogeneous_right_product_impl<Homogeneous<MatrixType,Horizontal>,Rhs>\n  : public ReturnByValue<homogeneous_right_product_impl<Homogeneous<MatrixType,Horizontal>,Rhs> >\n{\n  typedef typename remove_all<typename Rhs::Nested>::type RhsNested;\n  EIGEN_DEVICE_FUNC homogeneous_right_product_impl(const MatrixType& lhs, const Rhs& rhs)\n    : m_lhs(lhs), m_rhs(rhs)\n  {}\n\n  EIGEN_DEVICE_FUNC inline Index rows() const { return m_lhs.rows(); }\n  EIGEN_DEVICE_FUNC inline Index cols() const { return m_rhs.cols(); }\n\n  template<typename Dest> EIGEN_DEVICE_FUNC void evalTo(Dest& dst) const\n  {\n    // FIXME investigate how to allow lazy evaluation of this product when possible\n    dst = m_lhs * Block<const RhsNested,\n                        RhsNested::RowsAtCompileTime==Dynamic?Dynamic:RhsNested::RowsAtCompileTime-1,\n                        RhsNested::ColsAtCompileTime>\n            (m_rhs,0,0,m_rhs.rows()-1,m_rhs.cols());\n    dst += m_rhs.row(m_rhs.rows()-1).colwise()\n            .template replicate<MatrixType::RowsAtCompileTime>(m_lhs.rows());\n  }\n\n  typename MatrixType::Nested m_lhs;\n  typename Rhs::Nested m_rhs;\n};\n\ntemplate<typename ArgType,int Direction>\nstruct evaluator_traits<Homogeneous<ArgType,Direction> >\n{\n  typedef typename storage_kind_to_evaluator_kind<typename ArgType::StorageKind>::Kind Kind;\n  typedef HomogeneousShape Shape;  \n};\n\ntemplate<> struct AssignmentKind<DenseShape,HomogeneousShape> { typedef Dense2Dense Kind; };\n\n\ntemplate<typename ArgType,int Direction>\nstruct unary_evaluator<Homogeneous<ArgType,Direction>, IndexBased>\n  : evaluator<typename Homogeneous<ArgType,Direction>::PlainObject >\n{\n  typedef Homogeneous<ArgType,Direction> XprType;\n  typedef typename XprType::PlainObject PlainObject;\n  typedef evaluator<PlainObject> Base;\n\n  EIGEN_DEVICE_FUNC explicit unary_evaluator(const XprType& op)\n    : Base(), m_temp(op)\n  {\n    ::new (static_cast<Base*>(this)) Base(m_temp);\n  }\n\nprotected:\n  PlainObject m_temp;\n};\n\n// dense = homogeneous\ntemplate< typename DstXprType, typename ArgType, typename Scalar>\nstruct Assignment<DstXprType, Homogeneous<ArgType,Vertical>, internal::assign_op<Scalar,typename ArgType::Scalar>, Dense2Dense>\n{\n  typedef Homogeneous<ArgType,Vertical> SrcXprType;\n  EIGEN_DEVICE_FUNC static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op<Scalar,typename ArgType::Scalar> &)\n  {\n    Index dstRows = src.rows();\n    Index dstCols = src.cols();\n    if((dst.rows()!=dstRows) || (dst.cols()!=dstCols))\n      dst.resize(dstRows, dstCols);\n\n    dst.template topRows<ArgType::RowsAtCompileTime>(src.nestedExpression().rows()) = src.nestedExpression();\n    dst.row(dst.rows()-1).setOnes();\n  }\n};\n\n// dense = homogeneous\ntemplate< typename DstXprType, typename ArgType, typename Scalar>\nstruct Assignment<DstXprType, Homogeneous<ArgType,Horizontal>, internal::assign_op<Scalar,typename ArgType::Scalar>, Dense2Dense>\n{\n  typedef Homogeneous<ArgType,Horizontal> SrcXprType;\n  EIGEN_DEVICE_FUNC static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op<Scalar,typename ArgType::Scalar> &)\n  {\n    Index dstRows = src.rows();\n    Index dstCols = src.cols();\n    if((dst.rows()!=dstRows) || (dst.cols()!=dstCols))\n      dst.resize(dstRows, dstCols);\n\n    dst.template leftCols<ArgType::ColsAtCompileTime>(src.nestedExpression().cols()) = src.nestedExpression();\n    dst.col(dst.cols()-1).setOnes();\n  }\n};\n\ntemplate<typename LhsArg, typename Rhs, int ProductTag>\nstruct generic_product_impl<Homogeneous<LhsArg,Horizontal>, Rhs, HomogeneousShape, DenseShape, ProductTag>\n{\n  template<typename Dest>\n  EIGEN_DEVICE_FUNC static void evalTo(Dest& dst, const Homogeneous<LhsArg,Horizontal>& lhs, const Rhs& rhs)\n  {\n    homogeneous_right_product_impl<Homogeneous<LhsArg,Horizontal>, Rhs>(lhs.nestedExpression(), rhs).evalTo(dst);\n  }\n};\n\ntemplate<typename Lhs,typename Rhs>\nstruct homogeneous_right_product_refactoring_helper\n{\n  enum {\n    Dim  = Lhs::ColsAtCompileTime,\n    Rows = Lhs::RowsAtCompileTime\n  };\n  typedef typename Rhs::template ConstNRowsBlockXpr<Dim>::Type          LinearBlockConst;\n  typedef typename remove_const<LinearBlockConst>::type                 LinearBlock;\n  typedef typename Rhs::ConstRowXpr                                     ConstantColumn;\n  typedef Replicate<const ConstantColumn,Rows,1>                        ConstantBlock;\n  typedef Product<Lhs,LinearBlock,LazyProduct>                          LinearProduct;\n  typedef CwiseBinaryOp<internal::scalar_sum_op<typename Lhs::Scalar,typename Rhs::Scalar>, const LinearProduct, const ConstantBlock> Xpr;\n};\n\ntemplate<typename Lhs, typename Rhs, int ProductTag>\nstruct product_evaluator<Product<Lhs, Rhs, LazyProduct>, ProductTag, HomogeneousShape, DenseShape>\n : public evaluator<typename homogeneous_right_product_refactoring_helper<typename Lhs::NestedExpression,Rhs>::Xpr>\n{\n  typedef Product<Lhs, Rhs, LazyProduct> XprType;\n  typedef homogeneous_right_product_refactoring_helper<typename Lhs::NestedExpression,Rhs> helper;\n  typedef typename helper::ConstantBlock ConstantBlock;\n  typedef typename helper::Xpr RefactoredXpr;\n  typedef evaluator<RefactoredXpr> Base;\n  \n  EIGEN_DEVICE_FUNC explicit product_evaluator(const XprType& xpr)\n    : Base(  xpr.lhs().nestedExpression() .lazyProduct(  xpr.rhs().template topRows<helper::Dim>(xpr.lhs().nestedExpression().cols()) )\n            + ConstantBlock(xpr.rhs().row(xpr.rhs().rows()-1),xpr.lhs().rows(), 1) )\n  {}\n};\n\ntemplate<typename Lhs, typename RhsArg, int ProductTag>\nstruct generic_product_impl<Lhs, Homogeneous<RhsArg,Vertical>, DenseShape, HomogeneousShape, ProductTag>\n{\n  template<typename Dest>\n  EIGEN_DEVICE_FUNC static void evalTo(Dest& dst, const Lhs& lhs, const Homogeneous<RhsArg,Vertical>& rhs)\n  {\n    homogeneous_left_product_impl<Homogeneous<RhsArg,Vertical>, Lhs>(lhs, rhs.nestedExpression()).evalTo(dst);\n  }\n};\n\n// TODO: the following specialization is to address a regression from 3.2 to 3.3\n// In the future, this path should be optimized.\ntemplate<typename Lhs, typename RhsArg, int ProductTag>\nstruct generic_product_impl<Lhs, Homogeneous<RhsArg,Vertical>, TriangularShape, HomogeneousShape, ProductTag>\n{\n  template<typename Dest>\n  static void evalTo(Dest& dst, const Lhs& lhs, const Homogeneous<RhsArg,Vertical>& rhs)\n  {\n    dst.noalias() = lhs * rhs.eval();\n  }\n};\n\ntemplate<typename Lhs,typename Rhs>\nstruct homogeneous_left_product_refactoring_helper\n{\n  enum {\n    Dim = Rhs::RowsAtCompileTime,\n    Cols = Rhs::ColsAtCompileTime\n  };\n  typedef typename Lhs::template ConstNColsBlockXpr<Dim>::Type          LinearBlockConst;\n  typedef typename remove_const<LinearBlockConst>::type                 LinearBlock;\n  typedef typename Lhs::ConstColXpr                                     ConstantColumn;\n  typedef Replicate<const ConstantColumn,1,Cols>                        ConstantBlock;\n  typedef Product<LinearBlock,Rhs,LazyProduct>                          LinearProduct;\n  typedef CwiseBinaryOp<internal::scalar_sum_op<typename Lhs::Scalar,typename Rhs::Scalar>, const LinearProduct, const ConstantBlock> Xpr;\n};\n\ntemplate<typename Lhs, typename Rhs, int ProductTag>\nstruct product_evaluator<Product<Lhs, Rhs, LazyProduct>, ProductTag, DenseShape, HomogeneousShape>\n : public evaluator<typename homogeneous_left_product_refactoring_helper<Lhs,typename Rhs::NestedExpression>::Xpr>\n{\n  typedef Product<Lhs, Rhs, LazyProduct> XprType;\n  typedef homogeneous_left_product_refactoring_helper<Lhs,typename Rhs::NestedExpression> helper;\n  typedef typename helper::ConstantBlock ConstantBlock;\n  typedef typename helper::Xpr RefactoredXpr;\n  typedef evaluator<RefactoredXpr> Base;\n  \n  EIGEN_DEVICE_FUNC explicit product_evaluator(const XprType& xpr)\n    : Base(   xpr.lhs().template leftCols<helper::Dim>(xpr.rhs().nestedExpression().rows()) .lazyProduct( xpr.rhs().nestedExpression() )\n            + ConstantBlock(xpr.lhs().col(xpr.lhs().cols()-1),1,xpr.rhs().cols()) )\n  {}\n};\n\ntemplate<typename Scalar, int Dim, int Mode,int Options, typename RhsArg, int ProductTag>\nstruct generic_product_impl<Transform<Scalar,Dim,Mode,Options>, Homogeneous<RhsArg,Vertical>, DenseShape, HomogeneousShape, ProductTag>\n{\n  typedef Transform<Scalar,Dim,Mode,Options> TransformType;\n  template<typename Dest>\n  EIGEN_DEVICE_FUNC static void evalTo(Dest& dst, const TransformType& lhs, const Homogeneous<RhsArg,Vertical>& rhs)\n  {\n    homogeneous_left_product_impl<Homogeneous<RhsArg,Vertical>, TransformType>(lhs, rhs.nestedExpression()).evalTo(dst);\n  }\n};\n\ntemplate<typename ExpressionType, int Side, bool Transposed>\nstruct permutation_matrix_product<ExpressionType, Side, Transposed, HomogeneousShape>\n  : public permutation_matrix_product<ExpressionType, Side, Transposed, DenseShape>\n{};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_HOMOGENEOUS_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Geometry/Hyperplane.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_HYPERPLANE_H\n#define EIGEN_HYPERPLANE_H\n\nnamespace Eigen { \n\n/** \\geometry_module \\ingroup Geometry_Module\n  *\n  * \\class Hyperplane\n  *\n  * \\brief A hyperplane\n  *\n  * A hyperplane is an affine subspace of dimension n-1 in a space of dimension n.\n  * For example, a hyperplane in a plane is a line; a hyperplane in 3-space is a plane.\n  *\n  * \\tparam _Scalar the scalar type, i.e., the type of the coefficients\n  * \\tparam _AmbientDim the dimension of the ambient space, can be a compile time value or Dynamic.\n  *             Notice that the dimension of the hyperplane is _AmbientDim-1.\n  *\n  * This class represents an hyperplane as the zero set of the implicit equation\n  * \\f$ n \\cdot x + d = 0 \\f$ where \\f$ n \\f$ is a unit normal vector of the plane (linear part)\n  * and \\f$ d \\f$ is the distance (offset) to the origin.\n  */\ntemplate <typename _Scalar, int _AmbientDim, int _Options>\nclass Hyperplane\n{\npublic:\n  EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_AmbientDim==Dynamic ? Dynamic : _AmbientDim+1)\n  enum {\n    AmbientDimAtCompileTime = _AmbientDim,\n    Options = _Options\n  };\n  typedef _Scalar Scalar;\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  typedef Eigen::Index Index; ///< \\deprecated since Eigen 3.3\n  typedef Matrix<Scalar,AmbientDimAtCompileTime,1> VectorType;\n  typedef Matrix<Scalar,Index(AmbientDimAtCompileTime)==Dynamic\n                        ? Dynamic\n                        : Index(AmbientDimAtCompileTime)+1,1,Options> Coefficients;\n  typedef Block<Coefficients,AmbientDimAtCompileTime,1> NormalReturnType;\n  typedef const Block<const Coefficients,AmbientDimAtCompileTime,1> ConstNormalReturnType;\n\n  /** Default constructor without initialization */\n  EIGEN_DEVICE_FUNC inline Hyperplane() {}\n  \n  template<int OtherOptions>\n  EIGEN_DEVICE_FUNC Hyperplane(const Hyperplane<Scalar,AmbientDimAtCompileTime,OtherOptions>& other)\n   : m_coeffs(other.coeffs())\n  {}\n\n  /** Constructs a dynamic-size hyperplane with \\a _dim the dimension\n    * of the ambient space */\n  EIGEN_DEVICE_FUNC inline explicit Hyperplane(Index _dim) : m_coeffs(_dim+1) {}\n\n  /** Construct a plane from its normal \\a n and a point \\a e onto the plane.\n    * \\warning the vector normal is assumed to be normalized.\n    */\n  EIGEN_DEVICE_FUNC inline Hyperplane(const VectorType& n, const VectorType& e)\n    : m_coeffs(n.size()+1)\n  {\n    normal() = n;\n    offset() = -n.dot(e);\n  }\n\n  /** Constructs a plane from its normal \\a n and distance to the origin \\a d\n    * such that the algebraic equation of the plane is \\f$ n \\cdot x + d = 0 \\f$.\n    * \\warning the vector normal is assumed to be normalized.\n    */\n  EIGEN_DEVICE_FUNC inline Hyperplane(const VectorType& n, const Scalar& d)\n    : m_coeffs(n.size()+1)\n  {\n    normal() = n;\n    offset() = d;\n  }\n\n  /** Constructs a hyperplane passing through the two points. If the dimension of the ambient space\n    * is greater than 2, then there isn't uniqueness, so an arbitrary choice is made.\n    */\n  EIGEN_DEVICE_FUNC static inline Hyperplane Through(const VectorType& p0, const VectorType& p1)\n  {\n    Hyperplane result(p0.size());\n    result.normal() = (p1 - p0).unitOrthogonal();\n    result.offset() = -p0.dot(result.normal());\n    return result;\n  }\n\n  /** Constructs a hyperplane passing through the three points. The dimension of the ambient space\n    * is required to be exactly 3.\n    */\n  EIGEN_DEVICE_FUNC static inline Hyperplane Through(const VectorType& p0, const VectorType& p1, const VectorType& p2)\n  {\n    EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(VectorType, 3)\n    Hyperplane result(p0.size());\n    VectorType v0(p2 - p0), v1(p1 - p0);\n    result.normal() = v0.cross(v1);\n    RealScalar norm = result.normal().norm();\n    if(norm <= v0.norm() * v1.norm() * NumTraits<RealScalar>::epsilon())\n    {\n      Matrix<Scalar,2,3> m; m << v0.transpose(), v1.transpose();\n      JacobiSVD<Matrix<Scalar,2,3> > svd(m, ComputeFullV);\n      result.normal() = svd.matrixV().col(2);\n    }\n    else\n      result.normal() /= norm;\n    result.offset() = -p0.dot(result.normal());\n    return result;\n  }\n\n  /** Constructs a hyperplane passing through the parametrized line \\a parametrized.\n    * If the dimension of the ambient space is greater than 2, then there isn't uniqueness,\n    * so an arbitrary choice is made.\n    */\n  // FIXME to be consistent with the rest this could be implemented as a static Through function ??\n  EIGEN_DEVICE_FUNC explicit Hyperplane(const ParametrizedLine<Scalar, AmbientDimAtCompileTime>& parametrized)\n  {\n    normal() = parametrized.direction().unitOrthogonal();\n    offset() = -parametrized.origin().dot(normal());\n  }\n\n  EIGEN_DEVICE_FUNC ~Hyperplane() {}\n\n  /** \\returns the dimension in which the plane holds */\n  EIGEN_DEVICE_FUNC inline Index dim() const { return AmbientDimAtCompileTime==Dynamic ? m_coeffs.size()-1 : Index(AmbientDimAtCompileTime); }\n\n  /** normalizes \\c *this */\n  EIGEN_DEVICE_FUNC void normalize(void)\n  {\n    m_coeffs /= normal().norm();\n  }\n\n  /** \\returns the signed distance between the plane \\c *this and a point \\a p.\n    * \\sa absDistance()\n    */\n  EIGEN_DEVICE_FUNC inline Scalar signedDistance(const VectorType& p) const { return normal().dot(p) + offset(); }\n\n  /** \\returns the absolute distance between the plane \\c *this and a point \\a p.\n    * \\sa signedDistance()\n    */\n  EIGEN_DEVICE_FUNC inline Scalar absDistance(const VectorType& p) const { return numext::abs(signedDistance(p)); }\n\n  /** \\returns the projection of a point \\a p onto the plane \\c *this.\n    */\n  EIGEN_DEVICE_FUNC inline VectorType projection(const VectorType& p) const { return p - signedDistance(p) * normal(); }\n\n  /** \\returns a constant reference to the unit normal vector of the plane, which corresponds\n    * to the linear part of the implicit equation.\n    */\n  EIGEN_DEVICE_FUNC inline ConstNormalReturnType normal() const { return ConstNormalReturnType(m_coeffs,0,0,dim(),1); }\n\n  /** \\returns a non-constant reference to the unit normal vector of the plane, which corresponds\n    * to the linear part of the implicit equation.\n    */\n  EIGEN_DEVICE_FUNC inline NormalReturnType normal() { return NormalReturnType(m_coeffs,0,0,dim(),1); }\n\n  /** \\returns the distance to the origin, which is also the \"constant term\" of the implicit equation\n    * \\warning the vector normal is assumed to be normalized.\n    */\n  EIGEN_DEVICE_FUNC inline const Scalar& offset() const { return m_coeffs.coeff(dim()); }\n\n  /** \\returns a non-constant reference to the distance to the origin, which is also the constant part\n    * of the implicit equation */\n  EIGEN_DEVICE_FUNC inline Scalar& offset() { return m_coeffs(dim()); }\n\n  /** \\returns a constant reference to the coefficients c_i of the plane equation:\n    * \\f$ c_0*x_0 + ... + c_{d-1}*x_{d-1} + c_d = 0 \\f$\n    */\n  EIGEN_DEVICE_FUNC inline const Coefficients& coeffs() const { return m_coeffs; }\n\n  /** \\returns a non-constant reference to the coefficients c_i of the plane equation:\n    * \\f$ c_0*x_0 + ... + c_{d-1}*x_{d-1} + c_d = 0 \\f$\n    */\n  EIGEN_DEVICE_FUNC inline Coefficients& coeffs() { return m_coeffs; }\n\n  /** \\returns the intersection of *this with \\a other.\n    *\n    * \\warning The ambient space must be a plane, i.e. have dimension 2, so that \\c *this and \\a other are lines.\n    *\n    * \\note If \\a other is approximately parallel to *this, this method will return any point on *this.\n    */\n  EIGEN_DEVICE_FUNC VectorType intersection(const Hyperplane& other) const\n  {\n    EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(VectorType, 2)\n    Scalar det = coeffs().coeff(0) * other.coeffs().coeff(1) - coeffs().coeff(1) * other.coeffs().coeff(0);\n    // since the line equations ax+by=c are normalized with a^2+b^2=1, the following tests\n    // whether the two lines are approximately parallel.\n    if(internal::isMuchSmallerThan(det, Scalar(1)))\n    {   // special case where the two lines are approximately parallel. Pick any point on the first line.\n        if(numext::abs(coeffs().coeff(1))>numext::abs(coeffs().coeff(0)))\n            return VectorType(coeffs().coeff(1), -coeffs().coeff(2)/coeffs().coeff(1)-coeffs().coeff(0));\n        else\n            return VectorType(-coeffs().coeff(2)/coeffs().coeff(0)-coeffs().coeff(1), coeffs().coeff(0));\n    }\n    else\n    {   // general case\n        Scalar invdet = Scalar(1) / det;\n        return VectorType(invdet*(coeffs().coeff(1)*other.coeffs().coeff(2)-other.coeffs().coeff(1)*coeffs().coeff(2)),\n                          invdet*(other.coeffs().coeff(0)*coeffs().coeff(2)-coeffs().coeff(0)*other.coeffs().coeff(2)));\n    }\n  }\n\n  /** Applies the transformation matrix \\a mat to \\c *this and returns a reference to \\c *this.\n    *\n    * \\param mat the Dim x Dim transformation matrix\n    * \\param traits specifies whether the matrix \\a mat represents an #Isometry\n    *               or a more generic #Affine transformation. The default is #Affine.\n    */\n  template<typename XprType>\n  EIGEN_DEVICE_FUNC inline Hyperplane& transform(const MatrixBase<XprType>& mat, TransformTraits traits = Affine)\n  {\n    if (traits==Affine)\n    {\n      normal() = mat.inverse().transpose() * normal();\n      m_coeffs /= normal().norm();\n    }\n    else if (traits==Isometry)\n      normal() = mat * normal();\n    else\n    {\n      eigen_assert(0 && \"invalid traits value in Hyperplane::transform()\");\n    }\n    return *this;\n  }\n\n  /** Applies the transformation \\a t to \\c *this and returns a reference to \\c *this.\n    *\n    * \\param t the transformation of dimension Dim\n    * \\param traits specifies whether the transformation \\a t represents an #Isometry\n    *               or a more generic #Affine transformation. The default is #Affine.\n    *               Other kind of transformations are not supported.\n    */\n  template<int TrOptions>\n  EIGEN_DEVICE_FUNC inline Hyperplane& transform(const Transform<Scalar,AmbientDimAtCompileTime,Affine,TrOptions>& t,\n                                TransformTraits traits = Affine)\n  {\n    transform(t.linear(), traits);\n    offset() -= normal().dot(t.translation());\n    return *this;\n  }\n\n  /** \\returns \\c *this with scalar type casted to \\a NewScalarType\n    *\n    * Note that if \\a NewScalarType is equal to the current scalar type of \\c *this\n    * then this function smartly returns a const reference to \\c *this.\n    */\n  template<typename NewScalarType>\n  EIGEN_DEVICE_FUNC inline typename internal::cast_return_type<Hyperplane,\n           Hyperplane<NewScalarType,AmbientDimAtCompileTime,Options> >::type cast() const\n  {\n    return typename internal::cast_return_type<Hyperplane,\n                    Hyperplane<NewScalarType,AmbientDimAtCompileTime,Options> >::type(*this);\n  }\n\n  /** Copy constructor with scalar type conversion */\n  template<typename OtherScalarType,int OtherOptions>\n  EIGEN_DEVICE_FUNC inline explicit Hyperplane(const Hyperplane<OtherScalarType,AmbientDimAtCompileTime,OtherOptions>& other)\n  { m_coeffs = other.coeffs().template cast<Scalar>(); }\n\n  /** \\returns \\c true if \\c *this is approximately equal to \\a other, within the precision\n    * determined by \\a prec.\n    *\n    * \\sa MatrixBase::isApprox() */\n  template<int OtherOptions>\n  EIGEN_DEVICE_FUNC bool isApprox(const Hyperplane<Scalar,AmbientDimAtCompileTime,OtherOptions>& other, const typename NumTraits<Scalar>::Real& prec = NumTraits<Scalar>::dummy_precision()) const\n  { return m_coeffs.isApprox(other.m_coeffs, prec); }\n\nprotected:\n\n  Coefficients m_coeffs;\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_HYPERPLANE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Geometry/OrthoMethods.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_ORTHOMETHODS_H\n#define EIGEN_ORTHOMETHODS_H\n\nnamespace Eigen { \n\n/** \\geometry_module \\ingroup Geometry_Module\n  *\n  * \\returns the cross product of \\c *this and \\a other\n  *\n  * Here is a very good explanation of cross-product: http://xkcd.com/199/\n  * \n  * With complex numbers, the cross product is implemented as\n  * \\f$ (\\mathbf{a}+i\\mathbf{b}) \\times (\\mathbf{c}+i\\mathbf{d}) = (\\mathbf{a} \\times \\mathbf{c} - \\mathbf{b} \\times \\mathbf{d}) - i(\\mathbf{a} \\times \\mathbf{d} - \\mathbf{b} \\times \\mathbf{c})\\f$\n  * \n  * \\sa MatrixBase::cross3()\n  */\ntemplate<typename Derived>\ntemplate<typename OtherDerived>\n#ifndef EIGEN_PARSED_BY_DOXYGEN\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ntypename MatrixBase<Derived>::template cross_product_return_type<OtherDerived>::type\n#else\ntypename MatrixBase<Derived>::PlainObject\n#endif\nMatrixBase<Derived>::cross(const MatrixBase<OtherDerived>& other) const\n{\n  EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Derived,3)\n  EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(OtherDerived,3)\n\n  // Note that there is no need for an expression here since the compiler\n  // optimize such a small temporary very well (even within a complex expression)\n  typename internal::nested_eval<Derived,2>::type lhs(derived());\n  typename internal::nested_eval<OtherDerived,2>::type rhs(other.derived());\n  return typename cross_product_return_type<OtherDerived>::type(\n    numext::conj(lhs.coeff(1) * rhs.coeff(2) - lhs.coeff(2) * rhs.coeff(1)),\n    numext::conj(lhs.coeff(2) * rhs.coeff(0) - lhs.coeff(0) * rhs.coeff(2)),\n    numext::conj(lhs.coeff(0) * rhs.coeff(1) - lhs.coeff(1) * rhs.coeff(0))\n  );\n}\n\nnamespace internal {\n\ntemplate< int Arch,typename VectorLhs,typename VectorRhs,\n          typename Scalar = typename VectorLhs::Scalar,\n          bool Vectorizable = bool((VectorLhs::Flags&VectorRhs::Flags)&PacketAccessBit)>\nstruct cross3_impl {\n  EIGEN_DEVICE_FUNC static inline typename internal::plain_matrix_type<VectorLhs>::type\n  run(const VectorLhs& lhs, const VectorRhs& rhs)\n  {\n    return typename internal::plain_matrix_type<VectorLhs>::type(\n      numext::conj(lhs.coeff(1) * rhs.coeff(2) - lhs.coeff(2) * rhs.coeff(1)),\n      numext::conj(lhs.coeff(2) * rhs.coeff(0) - lhs.coeff(0) * rhs.coeff(2)),\n      numext::conj(lhs.coeff(0) * rhs.coeff(1) - lhs.coeff(1) * rhs.coeff(0)),\n      0\n    );\n  }\n};\n\n}\n\n/** \\geometry_module \\ingroup Geometry_Module\n  *\n  * \\returns the cross product of \\c *this and \\a other using only the x, y, and z coefficients\n  *\n  * The size of \\c *this and \\a other must be four. This function is especially useful\n  * when using 4D vectors instead of 3D ones to get advantage of SSE/AltiVec vectorization.\n  *\n  * \\sa MatrixBase::cross()\n  */\ntemplate<typename Derived>\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC inline typename MatrixBase<Derived>::PlainObject\nMatrixBase<Derived>::cross3(const MatrixBase<OtherDerived>& other) const\n{\n  EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Derived,4)\n  EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(OtherDerived,4)\n\n  typedef typename internal::nested_eval<Derived,2>::type DerivedNested;\n  typedef typename internal::nested_eval<OtherDerived,2>::type OtherDerivedNested;\n  DerivedNested lhs(derived());\n  OtherDerivedNested rhs(other.derived());\n\n  return internal::cross3_impl<Architecture::Target,\n                        typename internal::remove_all<DerivedNested>::type,\n                        typename internal::remove_all<OtherDerivedNested>::type>::run(lhs,rhs);\n}\n\n/** \\geometry_module \\ingroup Geometry_Module\n  *\n  * \\returns a matrix expression of the cross product of each column or row\n  * of the referenced expression with the \\a other vector.\n  *\n  * The referenced matrix must have one dimension equal to 3.\n  * The result matrix has the same dimensions than the referenced one.\n  *\n  * \\sa MatrixBase::cross() */\ntemplate<typename ExpressionType, int Direction>\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC \nconst typename VectorwiseOp<ExpressionType,Direction>::CrossReturnType\nVectorwiseOp<ExpressionType,Direction>::cross(const MatrixBase<OtherDerived>& other) const\n{\n  EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(OtherDerived,3)\n  EIGEN_STATIC_ASSERT((internal::is_same<Scalar, typename OtherDerived::Scalar>::value),\n    YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)\n  \n  typename internal::nested_eval<ExpressionType,2>::type mat(_expression());\n  typename internal::nested_eval<OtherDerived,2>::type vec(other.derived());\n\n  CrossReturnType res(_expression().rows(),_expression().cols());\n  if(Direction==Vertical)\n  {\n    eigen_assert(CrossReturnType::RowsAtCompileTime==3 && \"the matrix must have exactly 3 rows\");\n    res.row(0) = (mat.row(1) * vec.coeff(2) - mat.row(2) * vec.coeff(1)).conjugate();\n    res.row(1) = (mat.row(2) * vec.coeff(0) - mat.row(0) * vec.coeff(2)).conjugate();\n    res.row(2) = (mat.row(0) * vec.coeff(1) - mat.row(1) * vec.coeff(0)).conjugate();\n  }\n  else\n  {\n    eigen_assert(CrossReturnType::ColsAtCompileTime==3 && \"the matrix must have exactly 3 columns\");\n    res.col(0) = (mat.col(1) * vec.coeff(2) - mat.col(2) * vec.coeff(1)).conjugate();\n    res.col(1) = (mat.col(2) * vec.coeff(0) - mat.col(0) * vec.coeff(2)).conjugate();\n    res.col(2) = (mat.col(0) * vec.coeff(1) - mat.col(1) * vec.coeff(0)).conjugate();\n  }\n  return res;\n}\n\nnamespace internal {\n\ntemplate<typename Derived, int Size = Derived::SizeAtCompileTime>\nstruct unitOrthogonal_selector\n{\n  typedef typename plain_matrix_type<Derived>::type VectorType;\n  typedef typename traits<Derived>::Scalar Scalar;\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  typedef Matrix<Scalar,2,1> Vector2;\n  EIGEN_DEVICE_FUNC\n  static inline VectorType run(const Derived& src)\n  {\n    VectorType perp = VectorType::Zero(src.size());\n    Index maxi = 0;\n    Index sndi = 0;\n    src.cwiseAbs().maxCoeff(&maxi);\n    if (maxi==0)\n      sndi = 1;\n    RealScalar invnm = RealScalar(1)/(Vector2() << src.coeff(sndi),src.coeff(maxi)).finished().norm();\n    perp.coeffRef(maxi) = -numext::conj(src.coeff(sndi)) * invnm;\n    perp.coeffRef(sndi) =  numext::conj(src.coeff(maxi)) * invnm;\n\n    return perp;\n   }\n};\n\ntemplate<typename Derived>\nstruct unitOrthogonal_selector<Derived,3>\n{\n  typedef typename plain_matrix_type<Derived>::type VectorType;\n  typedef typename traits<Derived>::Scalar Scalar;\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  EIGEN_DEVICE_FUNC\n  static inline VectorType run(const Derived& src)\n  {\n    VectorType perp;\n    /* Let us compute the crossed product of *this with a vector\n     * that is not too close to being colinear to *this.\n     */\n\n    /* unless the x and y coords are both close to zero, we can\n     * simply take ( -y, x, 0 ) and normalize it.\n     */\n    if((!isMuchSmallerThan(src.x(), src.z()))\n    || (!isMuchSmallerThan(src.y(), src.z())))\n    {\n      RealScalar invnm = RealScalar(1)/src.template head<2>().norm();\n      perp.coeffRef(0) = -numext::conj(src.y())*invnm;\n      perp.coeffRef(1) = numext::conj(src.x())*invnm;\n      perp.coeffRef(2) = 0;\n    }\n    /* if both x and y are close to zero, then the vector is close\n     * to the z-axis, so it's far from colinear to the x-axis for instance.\n     * So we take the crossed product with (1,0,0) and normalize it.\n     */\n    else\n    {\n      RealScalar invnm = RealScalar(1)/src.template tail<2>().norm();\n      perp.coeffRef(0) = 0;\n      perp.coeffRef(1) = -numext::conj(src.z())*invnm;\n      perp.coeffRef(2) = numext::conj(src.y())*invnm;\n    }\n\n    return perp;\n   }\n};\n\ntemplate<typename Derived>\nstruct unitOrthogonal_selector<Derived,2>\n{\n  typedef typename plain_matrix_type<Derived>::type VectorType;\n  EIGEN_DEVICE_FUNC\n  static inline VectorType run(const Derived& src)\n  { return VectorType(-numext::conj(src.y()), numext::conj(src.x())).normalized(); }\n};\n\n} // end namespace internal\n\n/** \\geometry_module \\ingroup Geometry_Module\n  *\n  * \\returns a unit vector which is orthogonal to \\c *this\n  *\n  * The size of \\c *this must be at least 2. If the size is exactly 2,\n  * then the returned vector is a counter clock wise rotation of \\c *this, i.e., (-y,x).normalized().\n  *\n  * \\sa cross()\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC typename MatrixBase<Derived>::PlainObject\nMatrixBase<Derived>::unitOrthogonal() const\n{\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)\n  return internal::unitOrthogonal_selector<Derived>::run(derived());\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_ORTHOMETHODS_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Geometry/ParametrizedLine.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_PARAMETRIZEDLINE_H\n#define EIGEN_PARAMETRIZEDLINE_H\n\nnamespace Eigen { \n\n/** \\geometry_module \\ingroup Geometry_Module\n  *\n  * \\class ParametrizedLine\n  *\n  * \\brief A parametrized line\n  *\n  * A parametrized line is defined by an origin point \\f$ \\mathbf{o} \\f$ and a unit\n  * direction vector \\f$ \\mathbf{d} \\f$ such that the line corresponds to\n  * the set \\f$ l(t) = \\mathbf{o} + t \\mathbf{d} \\f$, \\f$ t \\in \\mathbf{R} \\f$.\n  *\n  * \\tparam _Scalar the scalar type, i.e., the type of the coefficients\n  * \\tparam _AmbientDim the dimension of the ambient space, can be a compile time value or Dynamic.\n  */\ntemplate <typename _Scalar, int _AmbientDim, int _Options>\nclass ParametrizedLine\n{\npublic:\n  EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_AmbientDim)\n  enum {\n    AmbientDimAtCompileTime = _AmbientDim,\n    Options = _Options\n  };\n  typedef _Scalar Scalar;\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  typedef Eigen::Index Index; ///< \\deprecated since Eigen 3.3\n  typedef Matrix<Scalar,AmbientDimAtCompileTime,1,Options> VectorType;\n\n  /** Default constructor without initialization */\n  EIGEN_DEVICE_FUNC inline ParametrizedLine() {}\n  \n  template<int OtherOptions>\n  EIGEN_DEVICE_FUNC ParametrizedLine(const ParametrizedLine<Scalar,AmbientDimAtCompileTime,OtherOptions>& other)\n   : m_origin(other.origin()), m_direction(other.direction())\n  {}\n\n  /** Constructs a dynamic-size line with \\a _dim the dimension\n    * of the ambient space */\n  EIGEN_DEVICE_FUNC inline explicit ParametrizedLine(Index _dim) : m_origin(_dim), m_direction(_dim) {}\n\n  /** Initializes a parametrized line of direction \\a direction and origin \\a origin.\n    * \\warning the vector direction is assumed to be normalized.\n    */\n  EIGEN_DEVICE_FUNC ParametrizedLine(const VectorType& origin, const VectorType& direction)\n    : m_origin(origin), m_direction(direction) {}\n\n  template <int OtherOptions>\n  EIGEN_DEVICE_FUNC explicit ParametrizedLine(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane);\n\n  /** Constructs a parametrized line going from \\a p0 to \\a p1. */\n  EIGEN_DEVICE_FUNC static inline ParametrizedLine Through(const VectorType& p0, const VectorType& p1)\n  { return ParametrizedLine(p0, (p1-p0).normalized()); }\n\n  EIGEN_DEVICE_FUNC ~ParametrizedLine() {}\n\n  /** \\returns the dimension in which the line holds */\n  EIGEN_DEVICE_FUNC inline Index dim() const { return m_direction.size(); }\n\n  EIGEN_DEVICE_FUNC const VectorType& origin() const { return m_origin; }\n  EIGEN_DEVICE_FUNC VectorType& origin() { return m_origin; }\n\n  EIGEN_DEVICE_FUNC const VectorType& direction() const { return m_direction; }\n  EIGEN_DEVICE_FUNC VectorType& direction() { return m_direction; }\n\n  /** \\returns the squared distance of a point \\a p to its projection onto the line \\c *this.\n    * \\sa distance()\n    */\n  EIGEN_DEVICE_FUNC RealScalar squaredDistance(const VectorType& p) const\n  {\n    VectorType diff = p - origin();\n    return (diff - direction().dot(diff) * direction()).squaredNorm();\n  }\n  /** \\returns the distance of a point \\a p to its projection onto the line \\c *this.\n    * \\sa squaredDistance()\n    */\n  EIGEN_DEVICE_FUNC RealScalar distance(const VectorType& p) const { EIGEN_USING_STD_MATH(sqrt) return sqrt(squaredDistance(p)); }\n\n  /** \\returns the projection of a point \\a p onto the line \\c *this. */\n  EIGEN_DEVICE_FUNC VectorType projection(const VectorType& p) const\n  { return origin() + direction().dot(p-origin()) * direction(); }\n\n  EIGEN_DEVICE_FUNC VectorType pointAt(const Scalar& t) const;\n  \n  template <int OtherOptions>\n  EIGEN_DEVICE_FUNC Scalar intersectionParameter(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane) const;\n \n  template <int OtherOptions>\n  EIGEN_DEVICE_FUNC Scalar intersection(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane) const;\n  \n  template <int OtherOptions>\n  EIGEN_DEVICE_FUNC VectorType intersectionPoint(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane) const;\n\n  /** Applies the transformation matrix \\a mat to \\c *this and returns a reference to \\c *this.\n    *\n    * \\param mat the Dim x Dim transformation matrix\n    * \\param traits specifies whether the matrix \\a mat represents an #Isometry\n    *               or a more generic #Affine transformation. The default is #Affine.\n    */\n  template<typename XprType>\n  EIGEN_DEVICE_FUNC inline ParametrizedLine& transform(const MatrixBase<XprType>& mat, TransformTraits traits = Affine)\n  {\n    if (traits==Affine)\n      direction() = (mat * direction()).normalized();\n    else if (traits==Isometry)\n      direction() = mat * direction();\n    else\n    {\n      eigen_assert(0 && \"invalid traits value in ParametrizedLine::transform()\");\n    }\n    origin() = mat * origin();\n    return *this;\n  }\n\n  /** Applies the transformation \\a t to \\c *this and returns a reference to \\c *this.\n    *\n    * \\param t the transformation of dimension Dim\n    * \\param traits specifies whether the transformation \\a t represents an #Isometry\n    *               or a more generic #Affine transformation. The default is #Affine.\n    *               Other kind of transformations are not supported.\n    */\n  template<int TrOptions>\n  EIGEN_DEVICE_FUNC inline ParametrizedLine& transform(const Transform<Scalar,AmbientDimAtCompileTime,Affine,TrOptions>& t,\n                                                       TransformTraits traits = Affine)\n  {\n    transform(t.linear(), traits);\n    origin() += t.translation();\n    return *this;\n  }\n\n/** \\returns \\c *this with scalar type casted to \\a NewScalarType\n    *\n    * Note that if \\a NewScalarType is equal to the current scalar type of \\c *this\n    * then this function smartly returns a const reference to \\c *this.\n    */\n  template<typename NewScalarType>\n  EIGEN_DEVICE_FUNC inline typename internal::cast_return_type<ParametrizedLine,\n           ParametrizedLine<NewScalarType,AmbientDimAtCompileTime,Options> >::type cast() const\n  {\n    return typename internal::cast_return_type<ParametrizedLine,\n                    ParametrizedLine<NewScalarType,AmbientDimAtCompileTime,Options> >::type(*this);\n  }\n\n  /** Copy constructor with scalar type conversion */\n  template<typename OtherScalarType,int OtherOptions>\n  EIGEN_DEVICE_FUNC inline explicit ParametrizedLine(const ParametrizedLine<OtherScalarType,AmbientDimAtCompileTime,OtherOptions>& other)\n  {\n    m_origin = other.origin().template cast<Scalar>();\n    m_direction = other.direction().template cast<Scalar>();\n  }\n\n  /** \\returns \\c true if \\c *this is approximately equal to \\a other, within the precision\n    * determined by \\a prec.\n    *\n    * \\sa MatrixBase::isApprox() */\n  EIGEN_DEVICE_FUNC bool isApprox(const ParametrizedLine& other, const typename NumTraits<Scalar>::Real& prec = NumTraits<Scalar>::dummy_precision()) const\n  { return m_origin.isApprox(other.m_origin, prec) && m_direction.isApprox(other.m_direction, prec); }\n\nprotected:\n\n  VectorType m_origin, m_direction;\n};\n\n/** Constructs a parametrized line from a 2D hyperplane\n  *\n  * \\warning the ambient space must have dimension 2 such that the hyperplane actually describes a line\n  */\ntemplate <typename _Scalar, int _AmbientDim, int _Options>\ntemplate <int OtherOptions>\nEIGEN_DEVICE_FUNC inline ParametrizedLine<_Scalar, _AmbientDim,_Options>::ParametrizedLine(const Hyperplane<_Scalar, _AmbientDim,OtherOptions>& hyperplane)\n{\n  EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(VectorType, 2)\n  direction() = hyperplane.normal().unitOrthogonal();\n  origin() = -hyperplane.normal()*hyperplane.offset();\n}\n\n/** \\returns the point at \\a t along this line\n  */\ntemplate <typename _Scalar, int _AmbientDim, int _Options>\nEIGEN_DEVICE_FUNC inline typename ParametrizedLine<_Scalar, _AmbientDim,_Options>::VectorType\nParametrizedLine<_Scalar, _AmbientDim,_Options>::pointAt(const _Scalar& t) const\n{\n  return origin() + (direction()*t); \n}\n\n/** \\returns the parameter value of the intersection between \\c *this and the given \\a hyperplane\n  */\ntemplate <typename _Scalar, int _AmbientDim, int _Options>\ntemplate <int OtherOptions>\nEIGEN_DEVICE_FUNC inline _Scalar ParametrizedLine<_Scalar, _AmbientDim,_Options>::intersectionParameter(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane) const\n{\n  return -(hyperplane.offset()+hyperplane.normal().dot(origin()))\n          / hyperplane.normal().dot(direction());\n}\n\n\n/** \\deprecated use intersectionParameter()\n  * \\returns the parameter value of the intersection between \\c *this and the given \\a hyperplane\n  */\ntemplate <typename _Scalar, int _AmbientDim, int _Options>\ntemplate <int OtherOptions>\nEIGEN_DEVICE_FUNC inline _Scalar ParametrizedLine<_Scalar, _AmbientDim,_Options>::intersection(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane) const\n{\n  return intersectionParameter(hyperplane);\n}\n\n/** \\returns the point of the intersection between \\c *this and the given hyperplane\n  */\ntemplate <typename _Scalar, int _AmbientDim, int _Options>\ntemplate <int OtherOptions>\nEIGEN_DEVICE_FUNC inline typename ParametrizedLine<_Scalar, _AmbientDim,_Options>::VectorType\nParametrizedLine<_Scalar, _AmbientDim,_Options>::intersectionPoint(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane) const\n{\n  return pointAt(intersectionParameter(hyperplane));\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_PARAMETRIZEDLINE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Geometry/Quaternion.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2009 Mathieu Gautier <mathieu.gautier@cea.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_QUATERNION_H\n#define EIGEN_QUATERNION_H\nnamespace Eigen { \n\n\n/***************************************************************************\n* Definition of QuaternionBase<Derived>\n* The implementation is at the end of the file\n***************************************************************************/\n\nnamespace internal {\ntemplate<typename Other,\n         int OtherRows=Other::RowsAtCompileTime,\n         int OtherCols=Other::ColsAtCompileTime>\nstruct quaternionbase_assign_impl;\n}\n\n/** \\geometry_module \\ingroup Geometry_Module\n  * \\class QuaternionBase\n  * \\brief Base class for quaternion expressions\n  * \\tparam Derived derived type (CRTP)\n  * \\sa class Quaternion\n  */\ntemplate<class Derived>\nclass QuaternionBase : public RotationBase<Derived, 3>\n{\n public:\n  typedef RotationBase<Derived, 3> Base;\n\n  using Base::operator*;\n  using Base::derived;\n\n  typedef typename internal::traits<Derived>::Scalar Scalar;\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  typedef typename internal::traits<Derived>::Coefficients Coefficients;\n  typedef typename Coefficients::CoeffReturnType CoeffReturnType;\n  typedef typename internal::conditional<bool(internal::traits<Derived>::Flags&LvalueBit),\n                                        Scalar&, CoeffReturnType>::type NonConstCoeffReturnType;\n\n\n  enum {\n    Flags = Eigen::internal::traits<Derived>::Flags\n  };\n\n // typedef typename Matrix<Scalar,4,1> Coefficients;\n  /** the type of a 3D vector */\n  typedef Matrix<Scalar,3,1> Vector3;\n  /** the equivalent rotation matrix type */\n  typedef Matrix<Scalar,3,3> Matrix3;\n  /** the equivalent angle-axis type */\n  typedef AngleAxis<Scalar> AngleAxisType;\n\n\n\n  /** \\returns the \\c x coefficient */\n  EIGEN_DEVICE_FUNC inline CoeffReturnType x() const { return this->derived().coeffs().coeff(0); }\n  /** \\returns the \\c y coefficient */\n  EIGEN_DEVICE_FUNC inline CoeffReturnType y() const { return this->derived().coeffs().coeff(1); }\n  /** \\returns the \\c z coefficient */\n  EIGEN_DEVICE_FUNC inline CoeffReturnType z() const { return this->derived().coeffs().coeff(2); }\n  /** \\returns the \\c w coefficient */\n  EIGEN_DEVICE_FUNC inline CoeffReturnType w() const { return this->derived().coeffs().coeff(3); }\n\n  /** \\returns a reference to the \\c x coefficient (if Derived is a non-const lvalue) */\n  EIGEN_DEVICE_FUNC inline NonConstCoeffReturnType x() { return this->derived().coeffs().x(); }\n  /** \\returns a reference to the \\c y coefficient (if Derived is a non-const lvalue) */\n  EIGEN_DEVICE_FUNC inline NonConstCoeffReturnType y() { return this->derived().coeffs().y(); }\n  /** \\returns a reference to the \\c z coefficient (if Derived is a non-const lvalue) */\n  EIGEN_DEVICE_FUNC inline NonConstCoeffReturnType z() { return this->derived().coeffs().z(); }\n  /** \\returns a reference to the \\c w coefficient (if Derived is a non-const lvalue) */\n  EIGEN_DEVICE_FUNC inline NonConstCoeffReturnType w() { return this->derived().coeffs().w(); }\n\n  /** \\returns a read-only vector expression of the imaginary part (x,y,z) */\n  EIGEN_DEVICE_FUNC inline const VectorBlock<const Coefficients,3> vec() const { return coeffs().template head<3>(); }\n\n  /** \\returns a vector expression of the imaginary part (x,y,z) */\n  EIGEN_DEVICE_FUNC inline VectorBlock<Coefficients,3> vec() { return coeffs().template head<3>(); }\n\n  /** \\returns a read-only vector expression of the coefficients (x,y,z,w) */\n  EIGEN_DEVICE_FUNC inline const typename internal::traits<Derived>::Coefficients& coeffs() const { return derived().coeffs(); }\n\n  /** \\returns a vector expression of the coefficients (x,y,z,w) */\n  EIGEN_DEVICE_FUNC inline typename internal::traits<Derived>::Coefficients& coeffs() { return derived().coeffs(); }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE QuaternionBase<Derived>& operator=(const QuaternionBase<Derived>& other);\n  template<class OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& operator=(const QuaternionBase<OtherDerived>& other);\n\n// disabled this copy operator as it is giving very strange compilation errors when compiling\n// test_stdvector with GCC 4.4.2. This looks like a GCC bug though, so feel free to re-enable it if it's\n// useful; however notice that we already have the templated operator= above and e.g. in MatrixBase\n// we didn't have to add, in addition to templated operator=, such a non-templated copy operator.\n//  Derived& operator=(const QuaternionBase& other)\n//  { return operator=<Derived>(other); }\n\n  EIGEN_DEVICE_FUNC Derived& operator=(const AngleAxisType& aa);\n  template<class OtherDerived> EIGEN_DEVICE_FUNC Derived& operator=(const MatrixBase<OtherDerived>& m);\n\n  /** \\returns a quaternion representing an identity rotation\n    * \\sa MatrixBase::Identity()\n    */\n  EIGEN_DEVICE_FUNC static inline Quaternion<Scalar> Identity() { return Quaternion<Scalar>(Scalar(1), Scalar(0), Scalar(0), Scalar(0)); }\n\n  /** \\sa QuaternionBase::Identity(), MatrixBase::setIdentity()\n    */\n  EIGEN_DEVICE_FUNC inline QuaternionBase& setIdentity() { coeffs() << Scalar(0), Scalar(0), Scalar(0), Scalar(1); return *this; }\n\n  /** \\returns the squared norm of the quaternion's coefficients\n    * \\sa QuaternionBase::norm(), MatrixBase::squaredNorm()\n    */\n  EIGEN_DEVICE_FUNC inline Scalar squaredNorm() const { return coeffs().squaredNorm(); }\n\n  /** \\returns the norm of the quaternion's coefficients\n    * \\sa QuaternionBase::squaredNorm(), MatrixBase::norm()\n    */\n  EIGEN_DEVICE_FUNC inline Scalar norm() const { return coeffs().norm(); }\n\n  /** Normalizes the quaternion \\c *this\n    * \\sa normalized(), MatrixBase::normalize() */\n  EIGEN_DEVICE_FUNC inline void normalize() { coeffs().normalize(); }\n  /** \\returns a normalized copy of \\c *this\n    * \\sa normalize(), MatrixBase::normalized() */\n  EIGEN_DEVICE_FUNC inline Quaternion<Scalar> normalized() const { return Quaternion<Scalar>(coeffs().normalized()); }\n\n    /** \\returns the dot product of \\c *this and \\a other\n    * Geometrically speaking, the dot product of two unit quaternions\n    * corresponds to the cosine of half the angle between the two rotations.\n    * \\sa angularDistance()\n    */\n  template<class OtherDerived> EIGEN_DEVICE_FUNC inline Scalar dot(const QuaternionBase<OtherDerived>& other) const { return coeffs().dot(other.coeffs()); }\n\n  template<class OtherDerived> EIGEN_DEVICE_FUNC Scalar angularDistance(const QuaternionBase<OtherDerived>& other) const;\n\n  /** \\returns an equivalent 3x3 rotation matrix */\n  EIGEN_DEVICE_FUNC Matrix3 toRotationMatrix() const;\n\n  /** \\returns the quaternion which transform \\a a into \\a b through a rotation */\n  template<typename Derived1, typename Derived2>\n  EIGEN_DEVICE_FUNC Derived& setFromTwoVectors(const MatrixBase<Derived1>& a, const MatrixBase<Derived2>& b);\n\n  template<class OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Quaternion<Scalar> operator* (const QuaternionBase<OtherDerived>& q) const;\n  template<class OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& operator*= (const QuaternionBase<OtherDerived>& q);\n\n  /** \\returns the quaternion describing the inverse rotation */\n  EIGEN_DEVICE_FUNC Quaternion<Scalar> inverse() const;\n\n  /** \\returns the conjugated quaternion */\n  EIGEN_DEVICE_FUNC Quaternion<Scalar> conjugate() const;\n\n  template<class OtherDerived> EIGEN_DEVICE_FUNC Quaternion<Scalar> slerp(const Scalar& t, const QuaternionBase<OtherDerived>& other) const;\n\n  /** \\returns \\c true if \\c *this is approximately equal to \\a other, within the precision\n    * determined by \\a prec.\n    *\n    * \\sa MatrixBase::isApprox() */\n  template<class OtherDerived>\n  EIGEN_DEVICE_FUNC bool isApprox(const QuaternionBase<OtherDerived>& other, const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const\n  { return coeffs().isApprox(other.coeffs(), prec); }\n\n  /** return the result vector of \\a v through the rotation*/\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Vector3 _transformVector(const Vector3& v) const;\n\n  #ifdef EIGEN_PARSED_BY_DOXYGEN\n  /** \\returns \\c *this with scalar type casted to \\a NewScalarType\n    *\n    * Note that if \\a NewScalarType is equal to the current scalar type of \\c *this\n    * then this function smartly returns a const reference to \\c *this.\n    */\n  template<typename NewScalarType>\n  EIGEN_DEVICE_FUNC inline typename internal::cast_return_type<Derived,Quaternion<NewScalarType> >::type cast() const;\n\n  #else\n\n  template<typename NewScalarType>\n  EIGEN_DEVICE_FUNC inline \n  typename internal::enable_if<internal::is_same<Scalar,NewScalarType>::value,const Derived&>::type cast() const\n  {\n    return derived();\n  }\n\n  template<typename NewScalarType>\n  EIGEN_DEVICE_FUNC inline \n  typename internal::enable_if<!internal::is_same<Scalar,NewScalarType>::value,Quaternion<NewScalarType> >::type cast() const\n  {\n    return Quaternion<NewScalarType>(coeffs().template cast<NewScalarType>());\n  }\n  #endif\n\n#ifdef EIGEN_QUATERNIONBASE_PLUGIN\n# include EIGEN_QUATERNIONBASE_PLUGIN\n#endif\nprotected:\n  EIGEN_DEFAULT_COPY_CONSTRUCTOR(QuaternionBase)\n  EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(QuaternionBase)\n};\n\n/***************************************************************************\n* Definition/implementation of Quaternion<Scalar>\n***************************************************************************/\n\n/** \\geometry_module \\ingroup Geometry_Module\n  *\n  * \\class Quaternion\n  *\n  * \\brief The quaternion class used to represent 3D orientations and rotations\n  *\n  * \\tparam _Scalar the scalar type, i.e., the type of the coefficients\n  * \\tparam _Options controls the memory alignment of the coefficients. Can be \\# AutoAlign or \\# DontAlign. Default is AutoAlign.\n  *\n  * This class represents a quaternion \\f$ w+xi+yj+zk \\f$ that is a convenient representation of\n  * orientations and rotations of objects in three dimensions. Compared to other representations\n  * like Euler angles or 3x3 matrices, quaternions offer the following advantages:\n  * \\li \\b compact storage (4 scalars)\n  * \\li \\b efficient to compose (28 flops),\n  * \\li \\b stable spherical interpolation\n  *\n  * The following two typedefs are provided for convenience:\n  * \\li \\c Quaternionf for \\c float\n  * \\li \\c Quaterniond for \\c double\n  *\n  * \\warning Operations interpreting the quaternion as rotation have undefined behavior if the quaternion is not normalized.\n  *\n  * \\sa  class AngleAxis, class Transform\n  */\n\nnamespace internal {\ntemplate<typename _Scalar,int _Options>\nstruct traits<Quaternion<_Scalar,_Options> >\n{\n  typedef Quaternion<_Scalar,_Options> PlainObject;\n  typedef _Scalar Scalar;\n  typedef Matrix<_Scalar,4,1,_Options> Coefficients;\n  enum{\n    Alignment = internal::traits<Coefficients>::Alignment,\n    Flags = LvalueBit\n  };\n};\n}\n\ntemplate<typename _Scalar, int _Options>\nclass Quaternion : public QuaternionBase<Quaternion<_Scalar,_Options> >\n{\npublic:\n  typedef QuaternionBase<Quaternion<_Scalar,_Options> > Base;\n  enum { NeedsAlignment = internal::traits<Quaternion>::Alignment>0 };\n\n  typedef _Scalar Scalar;\n\n  EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Quaternion)\n  using Base::operator*=;\n\n  typedef typename internal::traits<Quaternion>::Coefficients Coefficients;\n  typedef typename Base::AngleAxisType AngleAxisType;\n\n  /** Default constructor leaving the quaternion uninitialized. */\n  EIGEN_DEVICE_FUNC inline Quaternion() {}\n\n  /** Constructs and initializes the quaternion \\f$ w+xi+yj+zk \\f$ from\n    * its four coefficients \\a w, \\a x, \\a y and \\a z.\n    *\n    * \\warning Note the order of the arguments: the real \\a w coefficient first,\n    * while internally the coefficients are stored in the following order:\n    * [\\c x, \\c y, \\c z, \\c w]\n    */\n  EIGEN_DEVICE_FUNC inline Quaternion(const Scalar& w, const Scalar& x, const Scalar& y, const Scalar& z) : m_coeffs(x, y, z, w){}\n\n  /** Constructs and initialize a quaternion from the array data */\n  EIGEN_DEVICE_FUNC explicit inline Quaternion(const Scalar* data) : m_coeffs(data) {}\n\n  /** Copy constructor */\n  template<class Derived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Quaternion(const QuaternionBase<Derived>& other) { this->Base::operator=(other); }\n\n  /** Constructs and initializes a quaternion from the angle-axis \\a aa */\n  EIGEN_DEVICE_FUNC explicit inline Quaternion(const AngleAxisType& aa) { *this = aa; }\n\n  /** Constructs and initializes a quaternion from either:\n    *  - a rotation matrix expression,\n    *  - a 4D vector expression representing quaternion coefficients.\n    */\n  template<typename Derived>\n  EIGEN_DEVICE_FUNC explicit inline Quaternion(const MatrixBase<Derived>& other) { *this = other; }\n\n  /** Explicit copy constructor with scalar conversion */\n  template<typename OtherScalar, int OtherOptions>\n  EIGEN_DEVICE_FUNC explicit inline Quaternion(const Quaternion<OtherScalar, OtherOptions>& other)\n  { m_coeffs = other.coeffs().template cast<Scalar>(); }\n\n#if EIGEN_HAS_RVALUE_REFERENCES\n  // We define a copy constructor, which means we don't get an implicit move constructor or assignment operator.\n  /** Default move constructor */\n  EIGEN_DEVICE_FUNC inline Quaternion(Quaternion&& other) EIGEN_NOEXCEPT_IF(std::is_nothrow_move_constructible<Scalar>::value)\n    : m_coeffs(std::move(other.coeffs()))\n  {}\n\n  /** Default move assignment operator */\n  EIGEN_DEVICE_FUNC Quaternion& operator=(Quaternion&& other) EIGEN_NOEXCEPT_IF(std::is_nothrow_move_assignable<Scalar>::value)\n  {\n    m_coeffs = std::move(other.coeffs());\n    return *this;\n  }\n#endif\n\n  EIGEN_DEVICE_FUNC static Quaternion UnitRandom();\n\n  template<typename Derived1, typename Derived2>\n  EIGEN_DEVICE_FUNC static Quaternion FromTwoVectors(const MatrixBase<Derived1>& a, const MatrixBase<Derived2>& b);\n\n  EIGEN_DEVICE_FUNC inline Coefficients& coeffs() { return m_coeffs;}\n  EIGEN_DEVICE_FUNC inline const Coefficients& coeffs() const { return m_coeffs;}\n\n  EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(bool(NeedsAlignment))\n  \n#ifdef EIGEN_QUATERNION_PLUGIN\n# include EIGEN_QUATERNION_PLUGIN\n#endif\n\nprotected:\n  Coefficients m_coeffs;\n  \n#ifndef EIGEN_PARSED_BY_DOXYGEN\n    static EIGEN_STRONG_INLINE void _check_template_params()\n    {\n      EIGEN_STATIC_ASSERT( (_Options & DontAlign) == _Options,\n        INVALID_MATRIX_TEMPLATE_PARAMETERS)\n    }\n#endif\n};\n\n/** \\ingroup Geometry_Module\n  * single precision quaternion type */\ntypedef Quaternion<float> Quaternionf;\n/** \\ingroup Geometry_Module\n  * double precision quaternion type */\ntypedef Quaternion<double> Quaterniond;\n\n/***************************************************************************\n* Specialization of Map<Quaternion<Scalar>>\n***************************************************************************/\n\nnamespace internal {\n  template<typename _Scalar, int _Options>\n  struct traits<Map<Quaternion<_Scalar>, _Options> > : traits<Quaternion<_Scalar, (int(_Options)&Aligned)==Aligned ? AutoAlign : DontAlign> >\n  {\n    typedef Map<Matrix<_Scalar,4,1>, _Options> Coefficients;\n  };\n}\n\nnamespace internal {\n  template<typename _Scalar, int _Options>\n  struct traits<Map<const Quaternion<_Scalar>, _Options> > : traits<Quaternion<_Scalar, (int(_Options)&Aligned)==Aligned ? AutoAlign : DontAlign> >\n  {\n    typedef Map<const Matrix<_Scalar,4,1>, _Options> Coefficients;\n    typedef traits<Quaternion<_Scalar, (int(_Options)&Aligned)==Aligned ? AutoAlign : DontAlign> > TraitsBase;\n    enum {\n      Flags = TraitsBase::Flags & ~LvalueBit\n    };\n  };\n}\n\n/** \\ingroup Geometry_Module\n  * \\brief Quaternion expression mapping a constant memory buffer\n  *\n  * \\tparam _Scalar the type of the Quaternion coefficients\n  * \\tparam _Options see class Map\n  *\n  * This is a specialization of class Map for Quaternion. This class allows to view\n  * a 4 scalar memory buffer as an Eigen's Quaternion object.\n  *\n  * \\sa class Map, class Quaternion, class QuaternionBase\n  */\ntemplate<typename _Scalar, int _Options>\nclass Map<const Quaternion<_Scalar>, _Options >\n  : public QuaternionBase<Map<const Quaternion<_Scalar>, _Options> >\n{\n  public:\n    typedef QuaternionBase<Map<const Quaternion<_Scalar>, _Options> > Base;\n\n    typedef _Scalar Scalar;\n    typedef typename internal::traits<Map>::Coefficients Coefficients;\n    EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Map)\n    using Base::operator*=;\n\n    /** Constructs a Mapped Quaternion object from the pointer \\a coeffs\n      *\n      * The pointer \\a coeffs must reference the four coefficients of Quaternion in the following order:\n      * \\code *coeffs == {x, y, z, w} \\endcode\n      *\n      * If the template parameter _Options is set to #Aligned, then the pointer coeffs must be aligned. */\n    EIGEN_DEVICE_FUNC explicit EIGEN_STRONG_INLINE Map(const Scalar* coeffs) : m_coeffs(coeffs) {}\n\n    EIGEN_DEVICE_FUNC inline const Coefficients& coeffs() const { return m_coeffs;}\n\n  protected:\n    const Coefficients m_coeffs;\n};\n\n/** \\ingroup Geometry_Module\n  * \\brief Expression of a quaternion from a memory buffer\n  *\n  * \\tparam _Scalar the type of the Quaternion coefficients\n  * \\tparam _Options see class Map\n  *\n  * This is a specialization of class Map for Quaternion. This class allows to view\n  * a 4 scalar memory buffer as an Eigen's  Quaternion object.\n  *\n  * \\sa class Map, class Quaternion, class QuaternionBase\n  */\ntemplate<typename _Scalar, int _Options>\nclass Map<Quaternion<_Scalar>, _Options >\n  : public QuaternionBase<Map<Quaternion<_Scalar>, _Options> >\n{\n  public:\n    typedef QuaternionBase<Map<Quaternion<_Scalar>, _Options> > Base;\n\n    typedef _Scalar Scalar;\n    typedef typename internal::traits<Map>::Coefficients Coefficients;\n    EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Map)\n    using Base::operator*=;\n\n    /** Constructs a Mapped Quaternion object from the pointer \\a coeffs\n      *\n      * The pointer \\a coeffs must reference the four coefficients of Quaternion in the following order:\n      * \\code *coeffs == {x, y, z, w} \\endcode\n      *\n      * If the template parameter _Options is set to #Aligned, then the pointer coeffs must be aligned. */\n    EIGEN_DEVICE_FUNC explicit EIGEN_STRONG_INLINE Map(Scalar* coeffs) : m_coeffs(coeffs) {}\n\n    EIGEN_DEVICE_FUNC inline Coefficients& coeffs() { return m_coeffs; }\n    EIGEN_DEVICE_FUNC inline const Coefficients& coeffs() const { return m_coeffs; }\n\n  protected:\n    Coefficients m_coeffs;\n};\n\n/** \\ingroup Geometry_Module\n  * Map an unaligned array of single precision scalars as a quaternion */\ntypedef Map<Quaternion<float>, 0>         QuaternionMapf;\n/** \\ingroup Geometry_Module\n  * Map an unaligned array of double precision scalars as a quaternion */\ntypedef Map<Quaternion<double>, 0>        QuaternionMapd;\n/** \\ingroup Geometry_Module\n  * Map a 16-byte aligned array of single precision scalars as a quaternion */\ntypedef Map<Quaternion<float>, Aligned>   QuaternionMapAlignedf;\n/** \\ingroup Geometry_Module\n  * Map a 16-byte aligned array of double precision scalars as a quaternion */\ntypedef Map<Quaternion<double>, Aligned>  QuaternionMapAlignedd;\n\n/***************************************************************************\n* Implementation of QuaternionBase methods\n***************************************************************************/\n\n// Generic Quaternion * Quaternion product\n// This product can be specialized for a given architecture via the Arch template argument.\nnamespace internal {\ntemplate<int Arch, class Derived1, class Derived2, typename Scalar> struct quat_product\n{\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Quaternion<Scalar> run(const QuaternionBase<Derived1>& a, const QuaternionBase<Derived2>& b){\n    return Quaternion<Scalar>\n    (\n      a.w() * b.w() - a.x() * b.x() - a.y() * b.y() - a.z() * b.z(),\n      a.w() * b.x() + a.x() * b.w() + a.y() * b.z() - a.z() * b.y(),\n      a.w() * b.y() + a.y() * b.w() + a.z() * b.x() - a.x() * b.z(),\n      a.w() * b.z() + a.z() * b.w() + a.x() * b.y() - a.y() * b.x()\n    );\n  }\n};\n}\n\n/** \\returns the concatenation of two rotations as a quaternion-quaternion product */\ntemplate <class Derived>\ntemplate <class OtherDerived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Quaternion<typename internal::traits<Derived>::Scalar>\nQuaternionBase<Derived>::operator* (const QuaternionBase<OtherDerived>& other) const\n{\n  EIGEN_STATIC_ASSERT((internal::is_same<typename Derived::Scalar, typename OtherDerived::Scalar>::value),\n   YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)\n  return internal::quat_product<Architecture::Target, Derived, OtherDerived,\n                         typename internal::traits<Derived>::Scalar>::run(*this, other);\n}\n\n/** \\sa operator*(Quaternion) */\ntemplate <class Derived>\ntemplate <class OtherDerived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& QuaternionBase<Derived>::operator*= (const QuaternionBase<OtherDerived>& other)\n{\n  derived() = derived() * other.derived();\n  return derived();\n}\n\n/** Rotation of a vector by a quaternion.\n  * \\remarks If the quaternion is used to rotate several points (>1)\n  * then it is much more efficient to first convert it to a 3x3 Matrix.\n  * Comparison of the operation cost for n transformations:\n  *   - Quaternion2:    30n\n  *   - Via a Matrix3: 24 + 15n\n  */\ntemplate <class Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename QuaternionBase<Derived>::Vector3\nQuaternionBase<Derived>::_transformVector(const Vector3& v) const\n{\n    // Note that this algorithm comes from the optimization by hand\n    // of the conversion to a Matrix followed by a Matrix/Vector product.\n    // It appears to be much faster than the common algorithm found\n    // in the literature (30 versus 39 flops). It also requires two\n    // Vector3 as temporaries.\n    Vector3 uv = this->vec().cross(v);\n    uv += uv;\n    return v + this->w() * uv + this->vec().cross(uv);\n}\n\ntemplate<class Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE QuaternionBase<Derived>& QuaternionBase<Derived>::operator=(const QuaternionBase<Derived>& other)\n{\n  coeffs() = other.coeffs();\n  return derived();\n}\n\ntemplate<class Derived>\ntemplate<class OtherDerived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& QuaternionBase<Derived>::operator=(const QuaternionBase<OtherDerived>& other)\n{\n  coeffs() = other.coeffs();\n  return derived();\n}\n\n/** Set \\c *this from an angle-axis \\a aa and returns a reference to \\c *this\n  */\ntemplate<class Derived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& QuaternionBase<Derived>::operator=(const AngleAxisType& aa)\n{\n  EIGEN_USING_STD_MATH(cos)\n  EIGEN_USING_STD_MATH(sin)\n  Scalar ha = Scalar(0.5)*aa.angle(); // Scalar(0.5) to suppress precision loss warnings\n  this->w() = cos(ha);\n  this->vec() = sin(ha) * aa.axis();\n  return derived();\n}\n\n/** Set \\c *this from the expression \\a xpr:\n  *   - if \\a xpr is a 4x1 vector, then \\a xpr is assumed to be a quaternion\n  *   - if \\a xpr is a 3x3 matrix, then \\a xpr is assumed to be rotation matrix\n  *     and \\a xpr is converted to a quaternion\n  */\n\ntemplate<class Derived>\ntemplate<class MatrixDerived>\nEIGEN_DEVICE_FUNC inline Derived& QuaternionBase<Derived>::operator=(const MatrixBase<MatrixDerived>& xpr)\n{\n  EIGEN_STATIC_ASSERT((internal::is_same<typename Derived::Scalar, typename MatrixDerived::Scalar>::value),\n   YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)\n  internal::quaternionbase_assign_impl<MatrixDerived>::run(*this, xpr.derived());\n  return derived();\n}\n\n/** Convert the quaternion to a 3x3 rotation matrix. The quaternion is required to\n  * be normalized, otherwise the result is undefined.\n  */\ntemplate<class Derived>\nEIGEN_DEVICE_FUNC inline typename QuaternionBase<Derived>::Matrix3\nQuaternionBase<Derived>::toRotationMatrix(void) const\n{\n  // NOTE if inlined, then gcc 4.2 and 4.4 get rid of the temporary (not gcc 4.3 !!)\n  // if not inlined then the cost of the return by value is huge ~ +35%,\n  // however, not inlining this function is an order of magnitude slower, so\n  // it has to be inlined, and so the return by value is not an issue\n  Matrix3 res;\n\n  const Scalar tx  = Scalar(2)*this->x();\n  const Scalar ty  = Scalar(2)*this->y();\n  const Scalar tz  = Scalar(2)*this->z();\n  const Scalar twx = tx*this->w();\n  const Scalar twy = ty*this->w();\n  const Scalar twz = tz*this->w();\n  const Scalar txx = tx*this->x();\n  const Scalar txy = ty*this->x();\n  const Scalar txz = tz*this->x();\n  const Scalar tyy = ty*this->y();\n  const Scalar tyz = tz*this->y();\n  const Scalar tzz = tz*this->z();\n\n  res.coeffRef(0,0) = Scalar(1)-(tyy+tzz);\n  res.coeffRef(0,1) = txy-twz;\n  res.coeffRef(0,2) = txz+twy;\n  res.coeffRef(1,0) = txy+twz;\n  res.coeffRef(1,1) = Scalar(1)-(txx+tzz);\n  res.coeffRef(1,2) = tyz-twx;\n  res.coeffRef(2,0) = txz-twy;\n  res.coeffRef(2,1) = tyz+twx;\n  res.coeffRef(2,2) = Scalar(1)-(txx+tyy);\n\n  return res;\n}\n\n/** Sets \\c *this to be a quaternion representing a rotation between\n  * the two arbitrary vectors \\a a and \\a b. In other words, the built\n  * rotation represent a rotation sending the line of direction \\a a\n  * to the line of direction \\a b, both lines passing through the origin.\n  *\n  * \\returns a reference to \\c *this.\n  *\n  * Note that the two input vectors do \\b not have to be normalized, and\n  * do not need to have the same norm.\n  */\ntemplate<class Derived>\ntemplate<typename Derived1, typename Derived2>\nEIGEN_DEVICE_FUNC inline Derived& QuaternionBase<Derived>::setFromTwoVectors(const MatrixBase<Derived1>& a, const MatrixBase<Derived2>& b)\n{\n  EIGEN_USING_STD_MATH(sqrt)\n  Vector3 v0 = a.normalized();\n  Vector3 v1 = b.normalized();\n  Scalar c = v1.dot(v0);\n\n  // if dot == -1, vectors are nearly opposites\n  // => accurately compute the rotation axis by computing the\n  //    intersection of the two planes. This is done by solving:\n  //       x^T v0 = 0\n  //       x^T v1 = 0\n  //    under the constraint:\n  //       ||x|| = 1\n  //    which yields a singular value problem\n  if (c < Scalar(-1)+NumTraits<Scalar>::dummy_precision())\n  {\n    c = numext::maxi(c,Scalar(-1));\n    Matrix<Scalar,2,3> m; m << v0.transpose(), v1.transpose();\n    JacobiSVD<Matrix<Scalar,2,3> > svd(m, ComputeFullV);\n    Vector3 axis = svd.matrixV().col(2);\n\n    Scalar w2 = (Scalar(1)+c)*Scalar(0.5);\n    this->w() = sqrt(w2);\n    this->vec() = axis * sqrt(Scalar(1) - w2);\n    return derived();\n  }\n  Vector3 axis = v0.cross(v1);\n  Scalar s = sqrt((Scalar(1)+c)*Scalar(2));\n  Scalar invs = Scalar(1)/s;\n  this->vec() = axis * invs;\n  this->w() = s * Scalar(0.5);\n\n  return derived();\n}\n\n/** \\returns a random unit quaternion following a uniform distribution law on SO(3)\n  *\n  * \\note The implementation is based on http://planning.cs.uiuc.edu/node198.html\n  */\ntemplate<typename Scalar, int Options>\nEIGEN_DEVICE_FUNC Quaternion<Scalar,Options> Quaternion<Scalar,Options>::UnitRandom()\n{\n  EIGEN_USING_STD_MATH(sqrt)\n  EIGEN_USING_STD_MATH(sin)\n  EIGEN_USING_STD_MATH(cos)\n  const Scalar u1 = internal::random<Scalar>(0, 1),\n               u2 = internal::random<Scalar>(0, 2*EIGEN_PI),\n               u3 = internal::random<Scalar>(0, 2*EIGEN_PI);\n  const Scalar a = sqrt(Scalar(1) - u1),\n               b = sqrt(u1);\n  return Quaternion (a * sin(u2), a * cos(u2), b * sin(u3), b * cos(u3));\n}\n\n\n/** Returns a quaternion representing a rotation between\n  * the two arbitrary vectors \\a a and \\a b. In other words, the built\n  * rotation represent a rotation sending the line of direction \\a a\n  * to the line of direction \\a b, both lines passing through the origin.\n  *\n  * \\returns resulting quaternion\n  *\n  * Note that the two input vectors do \\b not have to be normalized, and\n  * do not need to have the same norm.\n  */\ntemplate<typename Scalar, int Options>\ntemplate<typename Derived1, typename Derived2>\nEIGEN_DEVICE_FUNC Quaternion<Scalar,Options> Quaternion<Scalar,Options>::FromTwoVectors(const MatrixBase<Derived1>& a, const MatrixBase<Derived2>& b)\n{\n    Quaternion quat;\n    quat.setFromTwoVectors(a, b);\n    return quat;\n}\n\n\n/** \\returns the multiplicative inverse of \\c *this\n  * Note that in most cases, i.e., if you simply want the opposite rotation,\n  * and/or the quaternion is normalized, then it is enough to use the conjugate.\n  *\n  * \\sa QuaternionBase::conjugate()\n  */\ntemplate <class Derived>\nEIGEN_DEVICE_FUNC inline Quaternion<typename internal::traits<Derived>::Scalar> QuaternionBase<Derived>::inverse() const\n{\n  // FIXME should this function be called multiplicativeInverse and conjugate() be called inverse() or opposite()  ??\n  Scalar n2 = this->squaredNorm();\n  if (n2 > Scalar(0))\n    return Quaternion<Scalar>(conjugate().coeffs() / n2);\n  else\n  {\n    // return an invalid result to flag the error\n    return Quaternion<Scalar>(Coefficients::Zero());\n  }\n}\n\n// Generic conjugate of a Quaternion\nnamespace internal {\ntemplate<int Arch, class Derived, typename Scalar> struct quat_conj\n{\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Quaternion<Scalar> run(const QuaternionBase<Derived>& q){\n    return Quaternion<Scalar>(q.w(),-q.x(),-q.y(),-q.z());\n  }\n};\n}\n                         \n/** \\returns the conjugate of the \\c *this which is equal to the multiplicative inverse\n  * if the quaternion is normalized.\n  * The conjugate of a quaternion represents the opposite rotation.\n  *\n  * \\sa Quaternion2::inverse()\n  */\ntemplate <class Derived>\nEIGEN_DEVICE_FUNC inline Quaternion<typename internal::traits<Derived>::Scalar>\nQuaternionBase<Derived>::conjugate() const\n{\n  return internal::quat_conj<Architecture::Target, Derived,\n                         typename internal::traits<Derived>::Scalar>::run(*this);\n                         \n}\n\n/** \\returns the angle (in radian) between two rotations\n  * \\sa dot()\n  */\ntemplate <class Derived>\ntemplate <class OtherDerived>\nEIGEN_DEVICE_FUNC inline typename internal::traits<Derived>::Scalar\nQuaternionBase<Derived>::angularDistance(const QuaternionBase<OtherDerived>& other) const\n{\n  EIGEN_USING_STD_MATH(atan2)\n  Quaternion<Scalar> d = (*this) * other.conjugate();\n  return Scalar(2) * atan2( d.vec().norm(), numext::abs(d.w()) );\n}\n\n \n    \n/** \\returns the spherical linear interpolation between the two quaternions\n  * \\c *this and \\a other at the parameter \\a t in [0;1].\n  * \n  * This represents an interpolation for a constant motion between \\c *this and \\a other,\n  * see also http://en.wikipedia.org/wiki/Slerp.\n  */\ntemplate <class Derived>\ntemplate <class OtherDerived>\nEIGEN_DEVICE_FUNC Quaternion<typename internal::traits<Derived>::Scalar>\nQuaternionBase<Derived>::slerp(const Scalar& t, const QuaternionBase<OtherDerived>& other) const\n{\n  EIGEN_USING_STD_MATH(acos)\n  EIGEN_USING_STD_MATH(sin)\n  const Scalar one = Scalar(1) - NumTraits<Scalar>::epsilon();\n  Scalar d = this->dot(other);\n  Scalar absD = numext::abs(d);\n\n  Scalar scale0;\n  Scalar scale1;\n\n  if(absD>=one)\n  {\n    scale0 = Scalar(1) - t;\n    scale1 = t;\n  }\n  else\n  {\n    // theta is the angle between the 2 quaternions\n    Scalar theta = acos(absD);\n    Scalar sinTheta = sin(theta);\n\n    scale0 = sin( ( Scalar(1) - t ) * theta) / sinTheta;\n    scale1 = sin( ( t * theta) ) / sinTheta;\n  }\n  if(d<Scalar(0)) scale1 = -scale1;\n\n  return Quaternion<Scalar>(scale0 * coeffs() + scale1 * other.coeffs());\n}\n\nnamespace internal {\n\n// set from a rotation matrix\ntemplate<typename Other>\nstruct quaternionbase_assign_impl<Other,3,3>\n{\n  typedef typename Other::Scalar Scalar;\n  template<class Derived> EIGEN_DEVICE_FUNC static inline void run(QuaternionBase<Derived>& q, const Other& a_mat)\n  {\n    const typename internal::nested_eval<Other,2>::type mat(a_mat);\n    EIGEN_USING_STD_MATH(sqrt)\n    // This algorithm comes from  \"Quaternion Calculus and Fast Animation\",\n    // Ken Shoemake, 1987 SIGGRAPH course notes\n    Scalar t = mat.trace();\n    if (t > Scalar(0))\n    {\n      t = sqrt(t + Scalar(1.0));\n      q.w() = Scalar(0.5)*t;\n      t = Scalar(0.5)/t;\n      q.x() = (mat.coeff(2,1) - mat.coeff(1,2)) * t;\n      q.y() = (mat.coeff(0,2) - mat.coeff(2,0)) * t;\n      q.z() = (mat.coeff(1,0) - mat.coeff(0,1)) * t;\n    }\n    else\n    {\n      Index i = 0;\n      if (mat.coeff(1,1) > mat.coeff(0,0))\n        i = 1;\n      if (mat.coeff(2,2) > mat.coeff(i,i))\n        i = 2;\n      Index j = (i+1)%3;\n      Index k = (j+1)%3;\n\n      t = sqrt(mat.coeff(i,i)-mat.coeff(j,j)-mat.coeff(k,k) + Scalar(1.0));\n      q.coeffs().coeffRef(i) = Scalar(0.5) * t;\n      t = Scalar(0.5)/t;\n      q.w() = (mat.coeff(k,j)-mat.coeff(j,k))*t;\n      q.coeffs().coeffRef(j) = (mat.coeff(j,i)+mat.coeff(i,j))*t;\n      q.coeffs().coeffRef(k) = (mat.coeff(k,i)+mat.coeff(i,k))*t;\n    }\n  }\n};\n\n// set from a vector of coefficients assumed to be a quaternion\ntemplate<typename Other>\nstruct quaternionbase_assign_impl<Other,4,1>\n{\n  typedef typename Other::Scalar Scalar;\n  template<class Derived> EIGEN_DEVICE_FUNC static inline void run(QuaternionBase<Derived>& q, const Other& vec)\n  {\n    q.coeffs() = vec;\n  }\n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_QUATERNION_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Geometry/Rotation2D.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_ROTATION2D_H\n#define EIGEN_ROTATION2D_H\n\nnamespace Eigen { \n\n/** \\geometry_module \\ingroup Geometry_Module\n  *\n  * \\class Rotation2D\n  *\n  * \\brief Represents a rotation/orientation in a 2 dimensional space.\n  *\n  * \\tparam _Scalar the scalar type, i.e., the type of the coefficients\n  *\n  * This class is equivalent to a single scalar representing a counter clock wise rotation\n  * as a single angle in radian. It provides some additional features such as the automatic\n  * conversion from/to a 2x2 rotation matrix. Moreover this class aims to provide a similar\n  * interface to Quaternion in order to facilitate the writing of generic algorithms\n  * dealing with rotations.\n  *\n  * \\sa class Quaternion, class Transform\n  */\n\nnamespace internal {\n\ntemplate<typename _Scalar> struct traits<Rotation2D<_Scalar> >\n{\n  typedef _Scalar Scalar;\n};\n} // end namespace internal\n\ntemplate<typename _Scalar>\nclass Rotation2D : public RotationBase<Rotation2D<_Scalar>,2>\n{\n  typedef RotationBase<Rotation2D<_Scalar>,2> Base;\n\npublic:\n\n  using Base::operator*;\n\n  enum { Dim = 2 };\n  /** the scalar type of the coefficients */\n  typedef _Scalar Scalar;\n  typedef Matrix<Scalar,2,1> Vector2;\n  typedef Matrix<Scalar,2,2> Matrix2;\n\nprotected:\n\n  Scalar m_angle;\n\npublic:\n\n  /** Construct a 2D counter clock wise rotation from the angle \\a a in radian. */\n  EIGEN_DEVICE_FUNC explicit inline Rotation2D(const Scalar& a) : m_angle(a) {}\n  \n  /** Default constructor wihtout initialization. The represented rotation is undefined. */\n  EIGEN_DEVICE_FUNC Rotation2D() {}\n\n  /** Construct a 2D rotation from a 2x2 rotation matrix \\a mat.\n    *\n    * \\sa fromRotationMatrix()\n    */\n  template<typename Derived>\n  EIGEN_DEVICE_FUNC explicit Rotation2D(const MatrixBase<Derived>& m)\n  {\n    fromRotationMatrix(m.derived());\n  }\n\n  /** \\returns the rotation angle */\n  EIGEN_DEVICE_FUNC inline Scalar angle() const { return m_angle; }\n\n  /** \\returns a read-write reference to the rotation angle */\n  EIGEN_DEVICE_FUNC inline Scalar& angle() { return m_angle; }\n  \n  /** \\returns the rotation angle in [0,2pi] */\n  EIGEN_DEVICE_FUNC inline Scalar smallestPositiveAngle() const {\n    Scalar tmp = numext::fmod(m_angle,Scalar(2*EIGEN_PI));\n    return tmp<Scalar(0) ? tmp + Scalar(2*EIGEN_PI) : tmp;\n  }\n  \n  /** \\returns the rotation angle in [-pi,pi] */\n  EIGEN_DEVICE_FUNC inline Scalar smallestAngle() const {\n    Scalar tmp = numext::fmod(m_angle,Scalar(2*EIGEN_PI));\n    if(tmp>Scalar(EIGEN_PI))       tmp -= Scalar(2*EIGEN_PI);\n    else if(tmp<-Scalar(EIGEN_PI)) tmp += Scalar(2*EIGEN_PI);\n    return tmp;\n  }\n\n  /** \\returns the inverse rotation */\n  EIGEN_DEVICE_FUNC inline Rotation2D inverse() const { return Rotation2D(-m_angle); }\n\n  /** Concatenates two rotations */\n  EIGEN_DEVICE_FUNC inline Rotation2D operator*(const Rotation2D& other) const\n  { return Rotation2D(m_angle + other.m_angle); }\n\n  /** Concatenates two rotations */\n  EIGEN_DEVICE_FUNC inline Rotation2D& operator*=(const Rotation2D& other)\n  { m_angle += other.m_angle; return *this; }\n\n  /** Applies the rotation to a 2D vector */\n  EIGEN_DEVICE_FUNC Vector2 operator* (const Vector2& vec) const\n  { return toRotationMatrix() * vec; }\n  \n  template<typename Derived>\n  EIGEN_DEVICE_FUNC Rotation2D& fromRotationMatrix(const MatrixBase<Derived>& m);\n  EIGEN_DEVICE_FUNC Matrix2 toRotationMatrix() const;\n\n  /** Set \\c *this from a 2x2 rotation matrix \\a mat.\n    * In other words, this function extract the rotation angle from the rotation matrix.\n    *\n    * This method is an alias for fromRotationMatrix()\n    *\n    * \\sa fromRotationMatrix()\n    */\n  template<typename Derived>\n  EIGEN_DEVICE_FUNC Rotation2D& operator=(const  MatrixBase<Derived>& m)\n  { return fromRotationMatrix(m.derived()); }\n\n  /** \\returns the spherical interpolation between \\c *this and \\a other using\n    * parameter \\a t. It is in fact equivalent to a linear interpolation.\n    */\n  EIGEN_DEVICE_FUNC inline Rotation2D slerp(const Scalar& t, const Rotation2D& other) const\n  {\n    Scalar dist = Rotation2D(other.m_angle-m_angle).smallestAngle();\n    return Rotation2D(m_angle + dist*t);\n  }\n\n  /** \\returns \\c *this with scalar type casted to \\a NewScalarType\n    *\n    * Note that if \\a NewScalarType is equal to the current scalar type of \\c *this\n    * then this function smartly returns a const reference to \\c *this.\n    */\n  template<typename NewScalarType>\n  EIGEN_DEVICE_FUNC inline typename internal::cast_return_type<Rotation2D,Rotation2D<NewScalarType> >::type cast() const\n  { return typename internal::cast_return_type<Rotation2D,Rotation2D<NewScalarType> >::type(*this); }\n\n  /** Copy constructor with scalar type conversion */\n  template<typename OtherScalarType>\n  EIGEN_DEVICE_FUNC inline explicit Rotation2D(const Rotation2D<OtherScalarType>& other)\n  {\n    m_angle = Scalar(other.angle());\n  }\n\n  EIGEN_DEVICE_FUNC static inline Rotation2D Identity() { return Rotation2D(0); }\n\n  /** \\returns \\c true if \\c *this is approximately equal to \\a other, within the precision\n    * determined by \\a prec.\n    *\n    * \\sa MatrixBase::isApprox() */\n  EIGEN_DEVICE_FUNC bool isApprox(const Rotation2D& other, const typename NumTraits<Scalar>::Real& prec = NumTraits<Scalar>::dummy_precision()) const\n  { return internal::isApprox(m_angle,other.m_angle, prec); }\n  \n};\n\n/** \\ingroup Geometry_Module\n  * single precision 2D rotation type */\ntypedef Rotation2D<float> Rotation2Df;\n/** \\ingroup Geometry_Module\n  * double precision 2D rotation type */\ntypedef Rotation2D<double> Rotation2Dd;\n\n/** Set \\c *this from a 2x2 rotation matrix \\a mat.\n  * In other words, this function extract the rotation angle\n  * from the rotation matrix.\n  */\ntemplate<typename Scalar>\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC Rotation2D<Scalar>& Rotation2D<Scalar>::fromRotationMatrix(const MatrixBase<Derived>& mat)\n{\n  EIGEN_USING_STD_MATH(atan2)\n  EIGEN_STATIC_ASSERT(Derived::RowsAtCompileTime==2 && Derived::ColsAtCompileTime==2,YOU_MADE_A_PROGRAMMING_MISTAKE)\n  m_angle = atan2(mat.coeff(1,0), mat.coeff(0,0));\n  return *this;\n}\n\n/** Constructs and \\returns an equivalent 2x2 rotation matrix.\n  */\ntemplate<typename Scalar>\ntypename Rotation2D<Scalar>::Matrix2\nEIGEN_DEVICE_FUNC Rotation2D<Scalar>::toRotationMatrix(void) const\n{\n  EIGEN_USING_STD_MATH(sin)\n  EIGEN_USING_STD_MATH(cos)\n  Scalar sinA = sin(m_angle);\n  Scalar cosA = cos(m_angle);\n  return (Matrix2() << cosA, -sinA, sinA, cosA).finished();\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_ROTATION2D_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Geometry/RotationBase.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_ROTATIONBASE_H\n#define EIGEN_ROTATIONBASE_H\n\nnamespace Eigen { \n\n// forward declaration\nnamespace internal {\ntemplate<typename RotationDerived, typename MatrixType, bool IsVector=MatrixType::IsVectorAtCompileTime>\nstruct rotation_base_generic_product_selector;\n}\n\n/** \\class RotationBase\n  *\n  * \\brief Common base class for compact rotation representations\n  *\n  * \\tparam Derived is the derived type, i.e., a rotation type\n  * \\tparam _Dim the dimension of the space\n  */\ntemplate<typename Derived, int _Dim>\nclass RotationBase\n{\n  public:\n    enum { Dim = _Dim };\n    /** the scalar type of the coefficients */\n    typedef typename internal::traits<Derived>::Scalar Scalar;\n\n    /** corresponding linear transformation matrix type */\n    typedef Matrix<Scalar,Dim,Dim> RotationMatrixType;\n    typedef Matrix<Scalar,Dim,1> VectorType;\n\n  public:\n    EIGEN_DEVICE_FUNC inline const Derived& derived() const { return *static_cast<const Derived*>(this); }\n    EIGEN_DEVICE_FUNC inline Derived& derived() { return *static_cast<Derived*>(this); }\n\n    /** \\returns an equivalent rotation matrix */\n    EIGEN_DEVICE_FUNC inline RotationMatrixType toRotationMatrix() const { return derived().toRotationMatrix(); }\n\n    /** \\returns an equivalent rotation matrix \n      * This function is added to be conform with the Transform class' naming scheme.\n      */\n    EIGEN_DEVICE_FUNC inline RotationMatrixType matrix() const { return derived().toRotationMatrix(); }\n\n    /** \\returns the inverse rotation */\n    EIGEN_DEVICE_FUNC inline Derived inverse() const { return derived().inverse(); }\n\n    /** \\returns the concatenation of the rotation \\c *this with a translation \\a t */\n    EIGEN_DEVICE_FUNC inline Transform<Scalar,Dim,Isometry> operator*(const Translation<Scalar,Dim>& t) const\n    { return Transform<Scalar,Dim,Isometry>(*this) * t; }\n\n    /** \\returns the concatenation of the rotation \\c *this with a uniform scaling \\a s */\n    EIGEN_DEVICE_FUNC inline RotationMatrixType operator*(const UniformScaling<Scalar>& s) const\n    { return toRotationMatrix() * s.factor(); }\n\n    /** \\returns the concatenation of the rotation \\c *this with a generic expression \\a e\n      * \\a e can be:\n      *  - a DimxDim linear transformation matrix\n      *  - a DimxDim diagonal matrix (axis aligned scaling)\n      *  - a vector of size Dim\n      */\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename internal::rotation_base_generic_product_selector<Derived,OtherDerived,OtherDerived::IsVectorAtCompileTime>::ReturnType\n    operator*(const EigenBase<OtherDerived>& e) const\n    { return internal::rotation_base_generic_product_selector<Derived,OtherDerived>::run(derived(), e.derived()); }\n\n    /** \\returns the concatenation of a linear transformation \\a l with the rotation \\a r */\n    template<typename OtherDerived> friend\n    EIGEN_DEVICE_FUNC inline RotationMatrixType operator*(const EigenBase<OtherDerived>& l, const Derived& r)\n    { return l.derived() * r.toRotationMatrix(); }\n\n    /** \\returns the concatenation of a scaling \\a l with the rotation \\a r */\n    EIGEN_DEVICE_FUNC friend inline Transform<Scalar,Dim,Affine> operator*(const DiagonalMatrix<Scalar,Dim>& l, const Derived& r)\n    { \n      Transform<Scalar,Dim,Affine> res(r);\n      res.linear().applyOnTheLeft(l);\n      return res;\n    }\n\n    /** \\returns the concatenation of the rotation \\c *this with a transformation \\a t */\n    template<int Mode, int Options>\n    EIGEN_DEVICE_FUNC inline Transform<Scalar,Dim,Mode> operator*(const Transform<Scalar,Dim,Mode,Options>& t) const\n    { return toRotationMatrix() * t; }\n\n    template<typename OtherVectorType>\n    EIGEN_DEVICE_FUNC inline VectorType _transformVector(const OtherVectorType& v) const\n    { return toRotationMatrix() * v; }\n};\n\nnamespace internal {\n\n// implementation of the generic product rotation * matrix\ntemplate<typename RotationDerived, typename MatrixType>\nstruct rotation_base_generic_product_selector<RotationDerived,MatrixType,false>\n{\n  enum { Dim = RotationDerived::Dim };\n  typedef Matrix<typename RotationDerived::Scalar,Dim,Dim> ReturnType;\n  EIGEN_DEVICE_FUNC static inline ReturnType run(const RotationDerived& r, const MatrixType& m)\n  { return r.toRotationMatrix() * m; }\n};\n\ntemplate<typename RotationDerived, typename Scalar, int Dim, int MaxDim>\nstruct rotation_base_generic_product_selector< RotationDerived, DiagonalMatrix<Scalar,Dim,MaxDim>, false >\n{\n  typedef Transform<Scalar,Dim,Affine> ReturnType;\n  EIGEN_DEVICE_FUNC static inline ReturnType run(const RotationDerived& r, const DiagonalMatrix<Scalar,Dim,MaxDim>& m)\n  {\n    ReturnType res(r);\n    res.linear() *= m;\n    return res;\n  }\n};\n\ntemplate<typename RotationDerived,typename OtherVectorType>\nstruct rotation_base_generic_product_selector<RotationDerived,OtherVectorType,true>\n{\n  enum { Dim = RotationDerived::Dim };\n  typedef Matrix<typename RotationDerived::Scalar,Dim,1> ReturnType;\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE ReturnType run(const RotationDerived& r, const OtherVectorType& v)\n  {\n    return r._transformVector(v);\n  }\n};\n\n} // end namespace internal\n\n/** \\geometry_module\n  *\n  * \\brief Constructs a Dim x Dim rotation matrix from the rotation \\a r\n  */\ntemplate<typename _Scalar, int _Rows, int _Cols, int _Storage, int _MaxRows, int _MaxCols>\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC Matrix<_Scalar, _Rows, _Cols, _Storage, _MaxRows, _MaxCols>\n::Matrix(const RotationBase<OtherDerived,ColsAtCompileTime>& r)\n{\n  EIGEN_STATIC_ASSERT_MATRIX_SPECIFIC_SIZE(Matrix,int(OtherDerived::Dim),int(OtherDerived::Dim))\n  *this = r.toRotationMatrix();\n}\n\n/** \\geometry_module\n  *\n  * \\brief Set a Dim x Dim rotation matrix from the rotation \\a r\n  */\ntemplate<typename _Scalar, int _Rows, int _Cols, int _Storage, int _MaxRows, int _MaxCols>\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC Matrix<_Scalar, _Rows, _Cols, _Storage, _MaxRows, _MaxCols>&\nMatrix<_Scalar, _Rows, _Cols, _Storage, _MaxRows, _MaxCols>\n::operator=(const RotationBase<OtherDerived,ColsAtCompileTime>& r)\n{\n  EIGEN_STATIC_ASSERT_MATRIX_SPECIFIC_SIZE(Matrix,int(OtherDerived::Dim),int(OtherDerived::Dim))\n  return *this = r.toRotationMatrix();\n}\n\nnamespace internal {\n\n/** \\internal\n  *\n  * Helper function to return an arbitrary rotation object to a rotation matrix.\n  *\n  * \\tparam Scalar the numeric type of the matrix coefficients\n  * \\tparam Dim the dimension of the current space\n  *\n  * It returns a Dim x Dim fixed size matrix.\n  *\n  * Default specializations are provided for:\n  *   - any scalar type (2D),\n  *   - any matrix expression,\n  *   - any type based on RotationBase (e.g., Quaternion, AngleAxis, Rotation2D)\n  *\n  * Currently toRotationMatrix is only used by Transform.\n  *\n  * \\sa class Transform, class Rotation2D, class Quaternion, class AngleAxis\n  */\ntemplate<typename Scalar, int Dim>\nEIGEN_DEVICE_FUNC static inline Matrix<Scalar,2,2> toRotationMatrix(const Scalar& s)\n{\n  EIGEN_STATIC_ASSERT(Dim==2,YOU_MADE_A_PROGRAMMING_MISTAKE)\n  return Rotation2D<Scalar>(s).toRotationMatrix();\n}\n\ntemplate<typename Scalar, int Dim, typename OtherDerived>\nEIGEN_DEVICE_FUNC static inline Matrix<Scalar,Dim,Dim> toRotationMatrix(const RotationBase<OtherDerived,Dim>& r)\n{\n  return r.toRotationMatrix();\n}\n\ntemplate<typename Scalar, int Dim, typename OtherDerived>\nEIGEN_DEVICE_FUNC static inline const MatrixBase<OtherDerived>& toRotationMatrix(const MatrixBase<OtherDerived>& mat)\n{\n  EIGEN_STATIC_ASSERT(OtherDerived::RowsAtCompileTime==Dim && OtherDerived::ColsAtCompileTime==Dim,\n    YOU_MADE_A_PROGRAMMING_MISTAKE)\n  return mat;\n}\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_ROTATIONBASE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Geometry/Scaling.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SCALING_H\n#define EIGEN_SCALING_H\n\nnamespace Eigen { \n\n/** \\geometry_module \\ingroup Geometry_Module\n  *\n  * \\class Scaling\n  *\n  * \\brief Represents a generic uniform scaling transformation\n  *\n  * \\tparam _Scalar the scalar type, i.e., the type of the coefficients.\n  *\n  * This class represent a uniform scaling transformation. It is the return\n  * type of Scaling(Scalar), and most of the time this is the only way it\n  * is used. In particular, this class is not aimed to be used to store a scaling transformation,\n  * but rather to make easier the constructions and updates of Transform objects.\n  *\n  * To represent an axis aligned scaling, use the DiagonalMatrix class.\n  *\n  * \\sa Scaling(), class DiagonalMatrix, MatrixBase::asDiagonal(), class Translation, class Transform\n  */\n\nnamespace internal\n{\n  // This helper helps nvcc+MSVC to properly parse this file.\n  // See bug 1412.\n  template <typename Scalar, int Dim, int Mode>\n  struct uniformscaling_times_affine_returntype\n  {\n    enum\n    {\n      NewMode = int(Mode) == int(Isometry) ? Affine : Mode\n    };\n    typedef Transform <Scalar, Dim, NewMode> type;\n  };\n}\n\ntemplate<typename _Scalar>\nclass UniformScaling\n{\npublic:\n  /** the scalar type of the coefficients */\n  typedef _Scalar Scalar;\n\nprotected:\n\n  Scalar m_factor;\n\npublic:\n\n  /** Default constructor without initialization. */\n  UniformScaling() {}\n  /** Constructs and initialize a uniform scaling transformation */\n  explicit inline UniformScaling(const Scalar& s) : m_factor(s) {}\n\n  inline const Scalar& factor() const { return m_factor; }\n  inline Scalar& factor() { return m_factor; }\n\n  /** Concatenates two uniform scaling */\n  inline UniformScaling operator* (const UniformScaling& other) const\n  { return UniformScaling(m_factor * other.factor()); }\n\n  /** Concatenates a uniform scaling and a translation */\n  template<int Dim>\n  inline Transform<Scalar,Dim,Affine> operator* (const Translation<Scalar,Dim>& t) const;\n\n  /** Concatenates a uniform scaling and an affine transformation */\n  template<int Dim, int Mode, int Options>\n  inline typename\n\tinternal::uniformscaling_times_affine_returntype<Scalar,Dim,Mode>::type\n\toperator* (const Transform<Scalar, Dim, Mode, Options>& t) const\n  {\n    typename internal::uniformscaling_times_affine_returntype<Scalar,Dim,Mode>::type res = t;\n    res.prescale(factor());\n    return res;\n  }\n\n  /** Concatenates a uniform scaling and a linear transformation matrix */\n  // TODO returns an expression\n  template<typename Derived>\n  inline typename Eigen::internal::plain_matrix_type<Derived>::type operator* (const MatrixBase<Derived>& other) const\n  { return other * m_factor; }\n\n  template<typename Derived,int Dim>\n  inline Matrix<Scalar,Dim,Dim> operator*(const RotationBase<Derived,Dim>& r) const\n  { return r.toRotationMatrix() * m_factor; }\n\n  /** \\returns the inverse scaling */\n  inline UniformScaling inverse() const\n  { return UniformScaling(Scalar(1)/m_factor); }\n\n  /** \\returns \\c *this with scalar type casted to \\a NewScalarType\n    *\n    * Note that if \\a NewScalarType is equal to the current scalar type of \\c *this\n    * then this function smartly returns a const reference to \\c *this.\n    */\n  template<typename NewScalarType>\n  inline UniformScaling<NewScalarType> cast() const\n  { return UniformScaling<NewScalarType>(NewScalarType(m_factor)); }\n\n  /** Copy constructor with scalar type conversion */\n  template<typename OtherScalarType>\n  inline explicit UniformScaling(const UniformScaling<OtherScalarType>& other)\n  { m_factor = Scalar(other.factor()); }\n\n  /** \\returns \\c true if \\c *this is approximately equal to \\a other, within the precision\n    * determined by \\a prec.\n    *\n    * \\sa MatrixBase::isApprox() */\n  bool isApprox(const UniformScaling& other, const typename NumTraits<Scalar>::Real& prec = NumTraits<Scalar>::dummy_precision()) const\n  { return internal::isApprox(m_factor, other.factor(), prec); }\n\n};\n\n/** \\addtogroup Geometry_Module */\n//@{\n\n/** Concatenates a linear transformation matrix and a uniform scaling\n  * \\relates UniformScaling\n  */\n// NOTE this operator is defined in MatrixBase and not as a friend function\n// of UniformScaling to fix an internal crash of Intel's ICC\ntemplate<typename Derived,typename Scalar>\nEIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(Derived,Scalar,product)\noperator*(const MatrixBase<Derived>& matrix, const UniformScaling<Scalar>& s)\n{ return matrix.derived() * s.factor(); }\n\n/** Constructs a uniform scaling from scale factor \\a s */\ninline UniformScaling<float> Scaling(float s) { return UniformScaling<float>(s); }\n/** Constructs a uniform scaling from scale factor \\a s */\ninline UniformScaling<double> Scaling(double s) { return UniformScaling<double>(s); }\n/** Constructs a uniform scaling from scale factor \\a s */\ntemplate<typename RealScalar>\ninline UniformScaling<std::complex<RealScalar> > Scaling(const std::complex<RealScalar>& s)\n{ return UniformScaling<std::complex<RealScalar> >(s); }\n\n/** Constructs a 2D axis aligned scaling */\ntemplate<typename Scalar>\ninline DiagonalMatrix<Scalar,2> Scaling(const Scalar& sx, const Scalar& sy)\n{ return DiagonalMatrix<Scalar,2>(sx, sy); }\n/** Constructs a 3D axis aligned scaling */\ntemplate<typename Scalar>\ninline DiagonalMatrix<Scalar,3> Scaling(const Scalar& sx, const Scalar& sy, const Scalar& sz)\n{ return DiagonalMatrix<Scalar,3>(sx, sy, sz); }\n\n/** Constructs an axis aligned scaling expression from vector expression \\a coeffs\n  * This is an alias for coeffs.asDiagonal()\n  */\ntemplate<typename Derived>\ninline const DiagonalWrapper<const Derived> Scaling(const MatrixBase<Derived>& coeffs)\n{ return coeffs.asDiagonal(); }\n\n/** \\deprecated */\ntypedef DiagonalMatrix<float, 2> AlignedScaling2f;\n/** \\deprecated */\ntypedef DiagonalMatrix<double,2> AlignedScaling2d;\n/** \\deprecated */\ntypedef DiagonalMatrix<float, 3> AlignedScaling3f;\n/** \\deprecated */\ntypedef DiagonalMatrix<double,3> AlignedScaling3d;\n//@}\n\ntemplate<typename Scalar>\ntemplate<int Dim>\ninline Transform<Scalar,Dim,Affine>\nUniformScaling<Scalar>::operator* (const Translation<Scalar,Dim>& t) const\n{\n  Transform<Scalar,Dim,Affine> res;\n  res.matrix().setZero();\n  res.linear().diagonal().fill(factor());\n  res.translation() = factor() * t.vector();\n  res(Dim,Dim) = Scalar(1);\n  return res;\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_SCALING_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Geometry/Transform.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2010 Hauke Heibel <hauke.heibel@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_TRANSFORM_H\n#define EIGEN_TRANSFORM_H\n\nnamespace Eigen { \n\nnamespace internal {\n\ntemplate<typename Transform>\nstruct transform_traits\n{\n  enum\n  {\n    Dim = Transform::Dim,\n    HDim = Transform::HDim,\n    Mode = Transform::Mode,\n    IsProjective = (int(Mode)==int(Projective))\n  };\n};\n\ntemplate< typename TransformType,\n          typename MatrixType,\n          int Case = transform_traits<TransformType>::IsProjective ? 0\n                   : int(MatrixType::RowsAtCompileTime) == int(transform_traits<TransformType>::HDim) ? 1\n                   : 2,\n          int RhsCols = MatrixType::ColsAtCompileTime>\nstruct transform_right_product_impl;\n\ntemplate< typename Other,\n          int Mode,\n          int Options,\n          int Dim,\n          int HDim,\n          int OtherRows=Other::RowsAtCompileTime,\n          int OtherCols=Other::ColsAtCompileTime>\nstruct transform_left_product_impl;\n\ntemplate< typename Lhs,\n          typename Rhs,\n          bool AnyProjective = \n            transform_traits<Lhs>::IsProjective ||\n            transform_traits<Rhs>::IsProjective>\nstruct transform_transform_product_impl;\n\ntemplate< typename Other,\n          int Mode,\n          int Options,\n          int Dim,\n          int HDim,\n          int OtherRows=Other::RowsAtCompileTime,\n          int OtherCols=Other::ColsAtCompileTime>\nstruct transform_construct_from_matrix;\n\ntemplate<typename TransformType> struct transform_take_affine_part;\n\ntemplate<typename _Scalar, int _Dim, int _Mode, int _Options>\nstruct traits<Transform<_Scalar,_Dim,_Mode,_Options> >\n{\n  typedef _Scalar Scalar;\n  typedef Eigen::Index StorageIndex;\n  typedef Dense StorageKind;\n  enum {\n    Dim1 = _Dim==Dynamic ? _Dim : _Dim + 1,\n    RowsAtCompileTime = _Mode==Projective ? Dim1 : _Dim,\n    ColsAtCompileTime = Dim1,\n    MaxRowsAtCompileTime = RowsAtCompileTime,\n    MaxColsAtCompileTime = ColsAtCompileTime,\n    Flags = 0\n  };\n};\n\ntemplate<int Mode> struct transform_make_affine;\n\n} // end namespace internal\n\n/** \\geometry_module \\ingroup Geometry_Module\n  *\n  * \\class Transform\n  *\n  * \\brief Represents an homogeneous transformation in a N dimensional space\n  *\n  * \\tparam _Scalar the scalar type, i.e., the type of the coefficients\n  * \\tparam _Dim the dimension of the space\n  * \\tparam _Mode the type of the transformation. Can be:\n  *              - #Affine: the transformation is stored as a (Dim+1)^2 matrix,\n  *                         where the last row is assumed to be [0 ... 0 1].\n  *              - #AffineCompact: the transformation is stored as a (Dim)x(Dim+1) matrix.\n  *              - #Projective: the transformation is stored as a (Dim+1)^2 matrix\n  *                             without any assumption.\n  *              - #Isometry: same as #Affine with the additional assumption that\n  *                           the linear part represents a rotation. This assumption is exploited\n  *                           to speed up some functions such as inverse() and rotation().\n  * \\tparam _Options has the same meaning as in class Matrix. It allows to specify DontAlign and/or RowMajor.\n  *                  These Options are passed directly to the underlying matrix type.\n  *\n  * The homography is internally represented and stored by a matrix which\n  * is available through the matrix() method. To understand the behavior of\n  * this class you have to think a Transform object as its internal\n  * matrix representation. The chosen convention is right multiply:\n  *\n  * \\code v' = T * v \\endcode\n  *\n  * Therefore, an affine transformation matrix M is shaped like this:\n  *\n  * \\f$ \\left( \\begin{array}{cc}\n  * linear & translation\\\\\n  * 0 ... 0 & 1\n  * \\end{array} \\right) \\f$\n  *\n  * Note that for a projective transformation the last row can be anything,\n  * and then the interpretation of different parts might be slightly different.\n  *\n  * However, unlike a plain matrix, the Transform class provides many features\n  * simplifying both its assembly and usage. In particular, it can be composed\n  * with any other transformations (Transform,Translation,RotationBase,DiagonalMatrix)\n  * and can be directly used to transform implicit homogeneous vectors. All these\n  * operations are handled via the operator*. For the composition of transformations,\n  * its principle consists to first convert the right/left hand sides of the product\n  * to a compatible (Dim+1)^2 matrix and then perform a pure matrix product.\n  * Of course, internally, operator* tries to perform the minimal number of operations\n  * according to the nature of each terms. Likewise, when applying the transform\n  * to points, the latters are automatically promoted to homogeneous vectors\n  * before doing the matrix product. The conventions to homogeneous representations\n  * are performed as follow:\n  *\n  * \\b Translation t (Dim)x(1):\n  * \\f$ \\left( \\begin{array}{cc}\n  * I & t \\\\\n  * 0\\,...\\,0 & 1\n  * \\end{array} \\right) \\f$\n  *\n  * \\b Rotation R (Dim)x(Dim):\n  * \\f$ \\left( \\begin{array}{cc}\n  * R & 0\\\\\n  * 0\\,...\\,0 & 1\n  * \\end{array} \\right) \\f$\n  *<!--\n  * \\b Linear \\b Matrix L (Dim)x(Dim):\n  * \\f$ \\left( \\begin{array}{cc}\n  * L & 0\\\\\n  * 0\\,...\\,0 & 1\n  * \\end{array} \\right) \\f$\n  *\n  * \\b Affine \\b Matrix A (Dim)x(Dim+1):\n  * \\f$ \\left( \\begin{array}{c}\n  * A\\\\\n  * 0\\,...\\,0\\,1\n  * \\end{array} \\right) \\f$\n  *-->\n  * \\b Scaling \\b DiagonalMatrix S (Dim)x(Dim):\n  * \\f$ \\left( \\begin{array}{cc}\n  * S & 0\\\\\n  * 0\\,...\\,0 & 1\n  * \\end{array} \\right) \\f$\n  *\n  * \\b Column \\b point v (Dim)x(1):\n  * \\f$ \\left( \\begin{array}{c}\n  * v\\\\\n  * 1\n  * \\end{array} \\right) \\f$\n  *\n  * \\b Set \\b of \\b column \\b points V1...Vn (Dim)x(n):\n  * \\f$ \\left( \\begin{array}{ccc}\n  * v_1 & ... & v_n\\\\\n  * 1 & ... & 1\n  * \\end{array} \\right) \\f$\n  *\n  * The concatenation of a Transform object with any kind of other transformation\n  * always returns a Transform object.\n  *\n  * A little exception to the \"as pure matrix product\" rule is the case of the\n  * transformation of non homogeneous vectors by an affine transformation. In\n  * that case the last matrix row can be ignored, and the product returns non\n  * homogeneous vectors.\n  *\n  * Since, for instance, a Dim x Dim matrix is interpreted as a linear transformation,\n  * it is not possible to directly transform Dim vectors stored in a Dim x Dim matrix.\n  * The solution is either to use a Dim x Dynamic matrix or explicitly request a\n  * vector transformation by making the vector homogeneous:\n  * \\code\n  * m' = T * m.colwise().homogeneous();\n  * \\endcode\n  * Note that there is zero overhead.\n  *\n  * Conversion methods from/to Qt's QMatrix and QTransform are available if the\n  * preprocessor token EIGEN_QT_SUPPORT is defined.\n  *\n  * This class can be extended with the help of the plugin mechanism described on the page\n  * \\ref TopicCustomizing_Plugins by defining the preprocessor symbol \\c EIGEN_TRANSFORM_PLUGIN.\n  *\n  * \\sa class Matrix, class Quaternion\n  */\ntemplate<typename _Scalar, int _Dim, int _Mode, int _Options>\nclass Transform\n{\npublic:\n  EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_Dim==Dynamic ? Dynamic : (_Dim+1)*(_Dim+1))\n  enum {\n    Mode = _Mode,\n    Options = _Options,\n    Dim = _Dim,     ///< space dimension in which the transformation holds\n    HDim = _Dim+1,  ///< size of a respective homogeneous vector\n    Rows = int(Mode)==(AffineCompact) ? Dim : HDim\n  };\n  /** the scalar type of the coefficients */\n  typedef _Scalar Scalar;\n  typedef Eigen::Index StorageIndex;\n  typedef Eigen::Index Index; ///< \\deprecated since Eigen 3.3\n  /** type of the matrix used to represent the transformation */\n  typedef typename internal::make_proper_matrix_type<Scalar,Rows,HDim,Options>::type MatrixType;\n  /** constified MatrixType */\n  typedef const MatrixType ConstMatrixType;\n  /** type of the matrix used to represent the linear part of the transformation */\n  typedef Matrix<Scalar,Dim,Dim,Options> LinearMatrixType;\n  /** type of read/write reference to the linear part of the transformation */\n  typedef Block<MatrixType,Dim,Dim,int(Mode)==(AffineCompact) && (Options&RowMajor)==0> LinearPart;\n  /** type of read reference to the linear part of the transformation */\n  typedef const Block<ConstMatrixType,Dim,Dim,int(Mode)==(AffineCompact) && (Options&RowMajor)==0> ConstLinearPart;\n  /** type of read/write reference to the affine part of the transformation */\n  typedef typename internal::conditional<int(Mode)==int(AffineCompact),\n                              MatrixType&,\n                              Block<MatrixType,Dim,HDim> >::type AffinePart;\n  /** type of read reference to the affine part of the transformation */\n  typedef typename internal::conditional<int(Mode)==int(AffineCompact),\n                              const MatrixType&,\n                              const Block<const MatrixType,Dim,HDim> >::type ConstAffinePart;\n  /** type of a vector */\n  typedef Matrix<Scalar,Dim,1> VectorType;\n  /** type of a read/write reference to the translation part of the rotation */\n  typedef Block<MatrixType,Dim,1,!(internal::traits<MatrixType>::Flags & RowMajorBit)> TranslationPart;\n  /** type of a read reference to the translation part of the rotation */\n  typedef const Block<ConstMatrixType,Dim,1,!(internal::traits<MatrixType>::Flags & RowMajorBit)> ConstTranslationPart;\n  /** corresponding translation type */\n  typedef Translation<Scalar,Dim> TranslationType;\n  \n  // this intermediate enum is needed to avoid an ICE with gcc 3.4 and 4.0\n  enum { TransformTimeDiagonalMode = ((Mode==int(Isometry))?Affine:int(Mode)) };\n  /** The return type of the product between a diagonal matrix and a transform */\n  typedef Transform<Scalar,Dim,TransformTimeDiagonalMode> TransformTimeDiagonalReturnType;\n\nprotected:\n\n  MatrixType m_matrix;\n\npublic:\n\n  /** Default constructor without initialization of the meaningful coefficients.\n    * If Mode==Affine or Mode==Isometry, then the last row is set to [0 ... 0 1] */\n  EIGEN_DEVICE_FUNC inline Transform()\n  {\n    check_template_params();\n    internal::transform_make_affine<(int(Mode)==Affine || int(Mode)==Isometry) ? Affine : AffineCompact>::run(m_matrix);\n  }\n\n  EIGEN_DEVICE_FUNC inline Transform(const Transform& other)\n  {\n    check_template_params();\n    m_matrix = other.m_matrix;\n  }\n\n  EIGEN_DEVICE_FUNC inline explicit Transform(const TranslationType& t)\n  {\n    check_template_params();\n    *this = t;\n  }\n  EIGEN_DEVICE_FUNC inline explicit Transform(const UniformScaling<Scalar>& s)\n  {\n    check_template_params();\n    *this = s;\n  }\n  template<typename Derived>\n  EIGEN_DEVICE_FUNC inline explicit Transform(const RotationBase<Derived, Dim>& r)\n  {\n    check_template_params();\n    *this = r;\n  }\n\n  EIGEN_DEVICE_FUNC inline Transform& operator=(const Transform& other)\n  { m_matrix = other.m_matrix; return *this; }\n\n  typedef internal::transform_take_affine_part<Transform> take_affine_part;\n\n  /** Constructs and initializes a transformation from a Dim^2 or a (Dim+1)^2 matrix. */\n  template<typename OtherDerived>\n  EIGEN_DEVICE_FUNC inline explicit Transform(const EigenBase<OtherDerived>& other)\n  {\n    EIGEN_STATIC_ASSERT((internal::is_same<Scalar,typename OtherDerived::Scalar>::value),\n      YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY);\n\n    check_template_params();\n    internal::transform_construct_from_matrix<OtherDerived,Mode,Options,Dim,HDim>::run(this, other.derived());\n  }\n\n  /** Set \\c *this from a Dim^2 or (Dim+1)^2 matrix. */\n  template<typename OtherDerived>\n  EIGEN_DEVICE_FUNC inline Transform& operator=(const EigenBase<OtherDerived>& other)\n  {\n    EIGEN_STATIC_ASSERT((internal::is_same<Scalar,typename OtherDerived::Scalar>::value),\n      YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY);\n\n    internal::transform_construct_from_matrix<OtherDerived,Mode,Options,Dim,HDim>::run(this, other.derived());\n    return *this;\n  }\n  \n  template<int OtherOptions>\n  EIGEN_DEVICE_FUNC inline Transform(const Transform<Scalar,Dim,Mode,OtherOptions>& other)\n  {\n    check_template_params();\n    // only the options change, we can directly copy the matrices\n    m_matrix = other.matrix();\n  }\n\n  template<int OtherMode,int OtherOptions>\n  EIGEN_DEVICE_FUNC inline Transform(const Transform<Scalar,Dim,OtherMode,OtherOptions>& other)\n  {\n    check_template_params();\n    // prevent conversions as:\n    // Affine | AffineCompact | Isometry = Projective\n    EIGEN_STATIC_ASSERT(EIGEN_IMPLIES(OtherMode==int(Projective), Mode==int(Projective)),\n                        YOU_PERFORMED_AN_INVALID_TRANSFORMATION_CONVERSION)\n\n    // prevent conversions as:\n    // Isometry = Affine | AffineCompact\n    EIGEN_STATIC_ASSERT(EIGEN_IMPLIES(OtherMode==int(Affine)||OtherMode==int(AffineCompact), Mode!=int(Isometry)),\n                        YOU_PERFORMED_AN_INVALID_TRANSFORMATION_CONVERSION)\n\n    enum { ModeIsAffineCompact = Mode == int(AffineCompact),\n           OtherModeIsAffineCompact = OtherMode == int(AffineCompact)\n    };\n\n    if(EIGEN_CONST_CONDITIONAL(ModeIsAffineCompact == OtherModeIsAffineCompact))\n    {\n      // We need the block expression because the code is compiled for all\n      // combinations of transformations and will trigger a compile time error\n      // if one tries to assign the matrices directly\n      m_matrix.template block<Dim,Dim+1>(0,0) = other.matrix().template block<Dim,Dim+1>(0,0);\n      makeAffine();\n    }\n    else if(EIGEN_CONST_CONDITIONAL(OtherModeIsAffineCompact))\n    {\n      typedef typename Transform<Scalar,Dim,OtherMode,OtherOptions>::MatrixType OtherMatrixType;\n      internal::transform_construct_from_matrix<OtherMatrixType,Mode,Options,Dim,HDim>::run(this, other.matrix());\n    }\n    else\n    {\n      // here we know that Mode == AffineCompact and OtherMode != AffineCompact.\n      // if OtherMode were Projective, the static assert above would already have caught it.\n      // So the only possibility is that OtherMode == Affine\n      linear() = other.linear();\n      translation() = other.translation();\n    }\n  }\n\n  template<typename OtherDerived>\n  EIGEN_DEVICE_FUNC Transform(const ReturnByValue<OtherDerived>& other)\n  {\n    check_template_params();\n    other.evalTo(*this);\n  }\n\n  template<typename OtherDerived>\n  EIGEN_DEVICE_FUNC Transform& operator=(const ReturnByValue<OtherDerived>& other)\n  {\n    other.evalTo(*this);\n    return *this;\n  }\n\n  #ifdef EIGEN_QT_SUPPORT\n  inline Transform(const QMatrix& other);\n  inline Transform& operator=(const QMatrix& other);\n  inline QMatrix toQMatrix(void) const;\n  inline Transform(const QTransform& other);\n  inline Transform& operator=(const QTransform& other);\n  inline QTransform toQTransform(void) const;\n  #endif\n  \n  EIGEN_DEVICE_FUNC Index rows() const { return int(Mode)==int(Projective) ? m_matrix.cols() : (m_matrix.cols()-1); }\n  EIGEN_DEVICE_FUNC Index cols() const { return m_matrix.cols(); }\n\n  /** shortcut for m_matrix(row,col);\n    * \\sa MatrixBase::operator(Index,Index) const */\n  EIGEN_DEVICE_FUNC inline Scalar operator() (Index row, Index col) const { return m_matrix(row,col); }\n  /** shortcut for m_matrix(row,col);\n    * \\sa MatrixBase::operator(Index,Index) */\n  EIGEN_DEVICE_FUNC inline Scalar& operator() (Index row, Index col) { return m_matrix(row,col); }\n\n  /** \\returns a read-only expression of the transformation matrix */\n  EIGEN_DEVICE_FUNC inline const MatrixType& matrix() const { return m_matrix; }\n  /** \\returns a writable expression of the transformation matrix */\n  EIGEN_DEVICE_FUNC inline MatrixType& matrix() { return m_matrix; }\n\n  /** \\returns a read-only expression of the linear part of the transformation */\n  EIGEN_DEVICE_FUNC inline ConstLinearPart linear() const { return ConstLinearPart(m_matrix,0,0); }\n  /** \\returns a writable expression of the linear part of the transformation */\n  EIGEN_DEVICE_FUNC inline LinearPart linear() { return LinearPart(m_matrix,0,0); }\n\n  /** \\returns a read-only expression of the Dim x HDim affine part of the transformation */\n  EIGEN_DEVICE_FUNC inline ConstAffinePart affine() const { return take_affine_part::run(m_matrix); }\n  /** \\returns a writable expression of the Dim x HDim affine part of the transformation */\n  EIGEN_DEVICE_FUNC inline AffinePart affine() { return take_affine_part::run(m_matrix); }\n\n  /** \\returns a read-only expression of the translation vector of the transformation */\n  EIGEN_DEVICE_FUNC inline ConstTranslationPart translation() const { return ConstTranslationPart(m_matrix,0,Dim); }\n  /** \\returns a writable expression of the translation vector of the transformation */\n  EIGEN_DEVICE_FUNC inline TranslationPart translation() { return TranslationPart(m_matrix,0,Dim); }\n\n  /** \\returns an expression of the product between the transform \\c *this and a matrix expression \\a other.\n    *\n    * The right-hand-side \\a other can be either:\n    * \\li an homogeneous vector of size Dim+1,\n    * \\li a set of homogeneous vectors of size Dim+1 x N,\n    * \\li a transformation matrix of size Dim+1 x Dim+1.\n    *\n    * Moreover, if \\c *this represents an affine transformation (i.e., Mode!=Projective), then \\a other can also be:\n    * \\li a point of size Dim (computes: \\code this->linear() * other + this->translation()\\endcode),\n    * \\li a set of N points as a Dim x N matrix (computes: \\code (this->linear() * other).colwise() + this->translation()\\endcode),\n    *\n    * In all cases, the return type is a matrix or vector of same sizes as the right-hand-side \\a other.\n    *\n    * If you want to interpret \\a other as a linear or affine transformation, then first convert it to a Transform<> type,\n    * or do your own cooking.\n    *\n    * Finally, if you want to apply Affine transformations to vectors, then explicitly apply the linear part only:\n    * \\code\n    * Affine3f A;\n    * Vector3f v1, v2;\n    * v2 = A.linear() * v1;\n    * \\endcode\n    *\n    */\n  // note: this function is defined here because some compilers cannot find the respective declaration\n  template<typename OtherDerived>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename internal::transform_right_product_impl<Transform, OtherDerived>::ResultType\n  operator * (const EigenBase<OtherDerived> &other) const\n  { return internal::transform_right_product_impl<Transform, OtherDerived>::run(*this,other.derived()); }\n\n  /** \\returns the product expression of a transformation matrix \\a a times a transform \\a b\n    *\n    * The left hand side \\a other can be either:\n    * \\li a linear transformation matrix of size Dim x Dim,\n    * \\li an affine transformation matrix of size Dim x Dim+1,\n    * \\li a general transformation matrix of size Dim+1 x Dim+1.\n    */\n  template<typename OtherDerived> friend\n  EIGEN_DEVICE_FUNC inline const typename internal::transform_left_product_impl<OtherDerived,Mode,Options,_Dim,_Dim+1>::ResultType\n    operator * (const EigenBase<OtherDerived> &a, const Transform &b)\n  { return internal::transform_left_product_impl<OtherDerived,Mode,Options,Dim,HDim>::run(a.derived(),b); }\n\n  /** \\returns The product expression of a transform \\a a times a diagonal matrix \\a b\n    *\n    * The rhs diagonal matrix is interpreted as an affine scaling transformation. The\n    * product results in a Transform of the same type (mode) as the lhs only if the lhs \n    * mode is no isometry. In that case, the returned transform is an affinity.\n    */\n  template<typename DiagonalDerived>\n  EIGEN_DEVICE_FUNC inline const TransformTimeDiagonalReturnType\n    operator * (const DiagonalBase<DiagonalDerived> &b) const\n  {\n    TransformTimeDiagonalReturnType res(*this);\n    res.linearExt() *= b;\n    return res;\n  }\n\n  /** \\returns The product expression of a diagonal matrix \\a a times a transform \\a b\n    *\n    * The lhs diagonal matrix is interpreted as an affine scaling transformation. The\n    * product results in a Transform of the same type (mode) as the lhs only if the lhs \n    * mode is no isometry. In that case, the returned transform is an affinity.\n    */\n  template<typename DiagonalDerived>\n  EIGEN_DEVICE_FUNC friend inline TransformTimeDiagonalReturnType\n    operator * (const DiagonalBase<DiagonalDerived> &a, const Transform &b)\n  {\n    TransformTimeDiagonalReturnType res;\n    res.linear().noalias() = a*b.linear();\n    res.translation().noalias() = a*b.translation();\n    if (EIGEN_CONST_CONDITIONAL(Mode!=int(AffineCompact)))\n      res.matrix().row(Dim) = b.matrix().row(Dim);\n    return res;\n  }\n\n  template<typename OtherDerived>\n  EIGEN_DEVICE_FUNC inline Transform& operator*=(const EigenBase<OtherDerived>& other) { return *this = *this * other; }\n\n  /** Concatenates two transformations */\n  EIGEN_DEVICE_FUNC inline const Transform operator * (const Transform& other) const\n  {\n    return internal::transform_transform_product_impl<Transform,Transform>::run(*this,other);\n  }\n  \n  #if EIGEN_COMP_ICC\nprivate:\n  // this intermediate structure permits to workaround a bug in ICC 11:\n  //   error: template instantiation resulted in unexpected function type of \"Eigen::Transform<double, 3, 32, 0>\n  //             (const Eigen::Transform<double, 3, 2, 0> &) const\"\n  //  (the meaning of a name may have changed since the template declaration -- the type of the template is:\n  // \"Eigen::internal::transform_transform_product_impl<Eigen::Transform<double, 3, 32, 0>,\n  //     Eigen::Transform<double, 3, Mode, Options>, <expression>>::ResultType (const Eigen::Transform<double, 3, Mode, Options> &) const\")\n  // \n  template<int OtherMode,int OtherOptions> struct icc_11_workaround\n  {\n    typedef internal::transform_transform_product_impl<Transform,Transform<Scalar,Dim,OtherMode,OtherOptions> > ProductType;\n    typedef typename ProductType::ResultType ResultType;\n  };\n  \npublic:\n  /** Concatenates two different transformations */\n  template<int OtherMode,int OtherOptions>\n  inline typename icc_11_workaround<OtherMode,OtherOptions>::ResultType\n    operator * (const Transform<Scalar,Dim,OtherMode,OtherOptions>& other) const\n  {\n    typedef typename icc_11_workaround<OtherMode,OtherOptions>::ProductType ProductType;\n    return ProductType::run(*this,other);\n  }\n  #else\n  /** Concatenates two different transformations */\n  template<int OtherMode,int OtherOptions>\n  EIGEN_DEVICE_FUNC inline typename internal::transform_transform_product_impl<Transform,Transform<Scalar,Dim,OtherMode,OtherOptions> >::ResultType\n    operator * (const Transform<Scalar,Dim,OtherMode,OtherOptions>& other) const\n  {\n    return internal::transform_transform_product_impl<Transform,Transform<Scalar,Dim,OtherMode,OtherOptions> >::run(*this,other);\n  }\n  #endif\n\n  /** \\sa MatrixBase::setIdentity() */\n  EIGEN_DEVICE_FUNC void setIdentity() { m_matrix.setIdentity(); }\n\n  /**\n   * \\brief Returns an identity transformation.\n   * \\todo In the future this function should be returning a Transform expression.\n   */\n  EIGEN_DEVICE_FUNC static const Transform Identity()\n  {\n    return Transform(MatrixType::Identity());\n  }\n\n  template<typename OtherDerived>\n  EIGEN_DEVICE_FUNC \n  inline Transform& scale(const MatrixBase<OtherDerived> &other);\n\n  template<typename OtherDerived>\n  EIGEN_DEVICE_FUNC\n  inline Transform& prescale(const MatrixBase<OtherDerived> &other);\n\n  EIGEN_DEVICE_FUNC inline Transform& scale(const Scalar& s);\n  EIGEN_DEVICE_FUNC inline Transform& prescale(const Scalar& s);\n\n  template<typename OtherDerived>\n  EIGEN_DEVICE_FUNC\n  inline Transform& translate(const MatrixBase<OtherDerived> &other);\n\n  template<typename OtherDerived>\n  EIGEN_DEVICE_FUNC\n  inline Transform& pretranslate(const MatrixBase<OtherDerived> &other);\n\n  template<typename RotationType>\n  EIGEN_DEVICE_FUNC\n  inline Transform& rotate(const RotationType& rotation);\n\n  template<typename RotationType>\n  EIGEN_DEVICE_FUNC\n  inline Transform& prerotate(const RotationType& rotation);\n\n  EIGEN_DEVICE_FUNC Transform& shear(const Scalar& sx, const Scalar& sy);\n  EIGEN_DEVICE_FUNC Transform& preshear(const Scalar& sx, const Scalar& sy);\n\n  EIGEN_DEVICE_FUNC inline Transform& operator=(const TranslationType& t);\n  \n  EIGEN_DEVICE_FUNC\n  inline Transform& operator*=(const TranslationType& t) { return translate(t.vector()); }\n  \n  EIGEN_DEVICE_FUNC inline Transform operator*(const TranslationType& t) const;\n\n  EIGEN_DEVICE_FUNC \n  inline Transform& operator=(const UniformScaling<Scalar>& t);\n  \n  EIGEN_DEVICE_FUNC\n  inline Transform& operator*=(const UniformScaling<Scalar>& s) { return scale(s.factor()); }\n  \n  EIGEN_DEVICE_FUNC\n  inline TransformTimeDiagonalReturnType operator*(const UniformScaling<Scalar>& s) const\n  {\n    TransformTimeDiagonalReturnType res = *this;\n    res.scale(s.factor());\n    return res;\n  }\n\n  EIGEN_DEVICE_FUNC\n  inline Transform& operator*=(const DiagonalMatrix<Scalar,Dim>& s) { linearExt() *= s; return *this; }\n\n  template<typename Derived>\n  EIGEN_DEVICE_FUNC inline Transform& operator=(const RotationBase<Derived,Dim>& r);\n  template<typename Derived>\n  EIGEN_DEVICE_FUNC inline Transform& operator*=(const RotationBase<Derived,Dim>& r) { return rotate(r.toRotationMatrix()); }\n  template<typename Derived>\n  EIGEN_DEVICE_FUNC inline Transform operator*(const RotationBase<Derived,Dim>& r) const;\n\n  typedef typename internal::conditional<int(Mode)==Isometry,ConstLinearPart,const LinearMatrixType>::type RotationReturnType;\n  EIGEN_DEVICE_FUNC RotationReturnType rotation() const;\n\n  template<typename RotationMatrixType, typename ScalingMatrixType>\n  EIGEN_DEVICE_FUNC\n  void computeRotationScaling(RotationMatrixType *rotation, ScalingMatrixType *scaling) const;\n  template<typename ScalingMatrixType, typename RotationMatrixType>\n  EIGEN_DEVICE_FUNC\n  void computeScalingRotation(ScalingMatrixType *scaling, RotationMatrixType *rotation) const;\n\n  template<typename PositionDerived, typename OrientationType, typename ScaleDerived>\n  EIGEN_DEVICE_FUNC\n  Transform& fromPositionOrientationScale(const MatrixBase<PositionDerived> &position,\n    const OrientationType& orientation, const MatrixBase<ScaleDerived> &scale);\n\n  EIGEN_DEVICE_FUNC\n  inline Transform inverse(TransformTraits traits = (TransformTraits)Mode) const;\n\n  /** \\returns a const pointer to the column major internal matrix */\n  EIGEN_DEVICE_FUNC const Scalar* data() const { return m_matrix.data(); }\n  /** \\returns a non-const pointer to the column major internal matrix */\n  EIGEN_DEVICE_FUNC Scalar* data() { return m_matrix.data(); }\n\n  /** \\returns \\c *this with scalar type casted to \\a NewScalarType\n    *\n    * Note that if \\a NewScalarType is equal to the current scalar type of \\c *this\n    * then this function smartly returns a const reference to \\c *this.\n    */\n  template<typename NewScalarType>\n  EIGEN_DEVICE_FUNC inline typename internal::cast_return_type<Transform,Transform<NewScalarType,Dim,Mode,Options> >::type cast() const\n  { return typename internal::cast_return_type<Transform,Transform<NewScalarType,Dim,Mode,Options> >::type(*this); }\n\n  /** Copy constructor with scalar type conversion */\n  template<typename OtherScalarType>\n  EIGEN_DEVICE_FUNC inline explicit Transform(const Transform<OtherScalarType,Dim,Mode,Options>& other)\n  {\n    check_template_params();\n    m_matrix = other.matrix().template cast<Scalar>();\n  }\n\n  /** \\returns \\c true if \\c *this is approximately equal to \\a other, within the precision\n    * determined by \\a prec.\n    *\n    * \\sa MatrixBase::isApprox() */\n  EIGEN_DEVICE_FUNC bool isApprox(const Transform& other, const typename NumTraits<Scalar>::Real& prec = NumTraits<Scalar>::dummy_precision()) const\n  { return m_matrix.isApprox(other.m_matrix, prec); }\n\n  /** Sets the last row to [0 ... 0 1]\n    */\n  EIGEN_DEVICE_FUNC void makeAffine()\n  {\n    internal::transform_make_affine<int(Mode)>::run(m_matrix);\n  }\n\n  /** \\internal\n    * \\returns the Dim x Dim linear part if the transformation is affine,\n    *          and the HDim x Dim part for projective transformations.\n    */\n  EIGEN_DEVICE_FUNC inline Block<MatrixType,int(Mode)==int(Projective)?HDim:Dim,Dim> linearExt()\n  { return m_matrix.template block<int(Mode)==int(Projective)?HDim:Dim,Dim>(0,0); }\n  /** \\internal\n    * \\returns the Dim x Dim linear part if the transformation is affine,\n    *          and the HDim x Dim part for projective transformations.\n    */\n  EIGEN_DEVICE_FUNC inline const Block<MatrixType,int(Mode)==int(Projective)?HDim:Dim,Dim> linearExt() const\n  { return m_matrix.template block<int(Mode)==int(Projective)?HDim:Dim,Dim>(0,0); }\n\n  /** \\internal\n    * \\returns the translation part if the transformation is affine,\n    *          and the last column for projective transformations.\n    */\n  EIGEN_DEVICE_FUNC inline Block<MatrixType,int(Mode)==int(Projective)?HDim:Dim,1> translationExt()\n  { return m_matrix.template block<int(Mode)==int(Projective)?HDim:Dim,1>(0,Dim); }\n  /** \\internal\n    * \\returns the translation part if the transformation is affine,\n    *          and the last column for projective transformations.\n    */\n  EIGEN_DEVICE_FUNC inline const Block<MatrixType,int(Mode)==int(Projective)?HDim:Dim,1> translationExt() const\n  { return m_matrix.template block<int(Mode)==int(Projective)?HDim:Dim,1>(0,Dim); }\n\n\n  #ifdef EIGEN_TRANSFORM_PLUGIN\n  #include EIGEN_TRANSFORM_PLUGIN\n  #endif\n  \nprotected:\n  #ifndef EIGEN_PARSED_BY_DOXYGEN\n    EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void check_template_params()\n    {\n      EIGEN_STATIC_ASSERT((Options & (DontAlign|RowMajor)) == Options, INVALID_MATRIX_TEMPLATE_PARAMETERS)\n    }\n  #endif\n\n};\n\n/** \\ingroup Geometry_Module */\ntypedef Transform<float,2,Isometry> Isometry2f;\n/** \\ingroup Geometry_Module */\ntypedef Transform<float,3,Isometry> Isometry3f;\n/** \\ingroup Geometry_Module */\ntypedef Transform<double,2,Isometry> Isometry2d;\n/** \\ingroup Geometry_Module */\ntypedef Transform<double,3,Isometry> Isometry3d;\n\n/** \\ingroup Geometry_Module */\ntypedef Transform<float,2,Affine> Affine2f;\n/** \\ingroup Geometry_Module */\ntypedef Transform<float,3,Affine> Affine3f;\n/** \\ingroup Geometry_Module */\ntypedef Transform<double,2,Affine> Affine2d;\n/** \\ingroup Geometry_Module */\ntypedef Transform<double,3,Affine> Affine3d;\n\n/** \\ingroup Geometry_Module */\ntypedef Transform<float,2,AffineCompact> AffineCompact2f;\n/** \\ingroup Geometry_Module */\ntypedef Transform<float,3,AffineCompact> AffineCompact3f;\n/** \\ingroup Geometry_Module */\ntypedef Transform<double,2,AffineCompact> AffineCompact2d;\n/** \\ingroup Geometry_Module */\ntypedef Transform<double,3,AffineCompact> AffineCompact3d;\n\n/** \\ingroup Geometry_Module */\ntypedef Transform<float,2,Projective> Projective2f;\n/** \\ingroup Geometry_Module */\ntypedef Transform<float,3,Projective> Projective3f;\n/** \\ingroup Geometry_Module */\ntypedef Transform<double,2,Projective> Projective2d;\n/** \\ingroup Geometry_Module */\ntypedef Transform<double,3,Projective> Projective3d;\n\n/**************************\n*** Optional QT support ***\n**************************/\n\n#ifdef EIGEN_QT_SUPPORT\n/** Initializes \\c *this from a QMatrix assuming the dimension is 2.\n  *\n  * This function is available only if the token EIGEN_QT_SUPPORT is defined.\n  */\ntemplate<typename Scalar, int Dim, int Mode,int Options>\nTransform<Scalar,Dim,Mode,Options>::Transform(const QMatrix& other)\n{\n  check_template_params();\n  *this = other;\n}\n\n/** Set \\c *this from a QMatrix assuming the dimension is 2.\n  *\n  * This function is available only if the token EIGEN_QT_SUPPORT is defined.\n  */\ntemplate<typename Scalar, int Dim, int Mode,int Options>\nTransform<Scalar,Dim,Mode,Options>& Transform<Scalar,Dim,Mode,Options>::operator=(const QMatrix& other)\n{\n  EIGEN_STATIC_ASSERT(Dim==2, YOU_MADE_A_PROGRAMMING_MISTAKE)\n  if (EIGEN_CONST_CONDITIONAL(Mode == int(AffineCompact)))\n    m_matrix << other.m11(), other.m21(), other.dx(),\n                other.m12(), other.m22(), other.dy();\n  else\n    m_matrix << other.m11(), other.m21(), other.dx(),\n                other.m12(), other.m22(), other.dy(),\n                0, 0, 1;\n  return *this;\n}\n\n/** \\returns a QMatrix from \\c *this assuming the dimension is 2.\n  *\n  * \\warning this conversion might loss data if \\c *this is not affine\n  *\n  * This function is available only if the token EIGEN_QT_SUPPORT is defined.\n  */\ntemplate<typename Scalar, int Dim, int Mode, int Options>\nQMatrix Transform<Scalar,Dim,Mode,Options>::toQMatrix(void) const\n{\n  check_template_params();\n  EIGEN_STATIC_ASSERT(Dim==2, YOU_MADE_A_PROGRAMMING_MISTAKE)\n  return QMatrix(m_matrix.coeff(0,0), m_matrix.coeff(1,0),\n                 m_matrix.coeff(0,1), m_matrix.coeff(1,1),\n                 m_matrix.coeff(0,2), m_matrix.coeff(1,2));\n}\n\n/** Initializes \\c *this from a QTransform assuming the dimension is 2.\n  *\n  * This function is available only if the token EIGEN_QT_SUPPORT is defined.\n  */\ntemplate<typename Scalar, int Dim, int Mode,int Options>\nTransform<Scalar,Dim,Mode,Options>::Transform(const QTransform& other)\n{\n  check_template_params();\n  *this = other;\n}\n\n/** Set \\c *this from a QTransform assuming the dimension is 2.\n  *\n  * This function is available only if the token EIGEN_QT_SUPPORT is defined.\n  */\ntemplate<typename Scalar, int Dim, int Mode, int Options>\nTransform<Scalar,Dim,Mode,Options>& Transform<Scalar,Dim,Mode,Options>::operator=(const QTransform& other)\n{\n  check_template_params();\n  EIGEN_STATIC_ASSERT(Dim==2, YOU_MADE_A_PROGRAMMING_MISTAKE)\n  if (EIGEN_CONST_CONDITIONAL(Mode == int(AffineCompact)))\n    m_matrix << other.m11(), other.m21(), other.dx(),\n                other.m12(), other.m22(), other.dy();\n  else\n    m_matrix << other.m11(), other.m21(), other.dx(),\n                other.m12(), other.m22(), other.dy(),\n                other.m13(), other.m23(), other.m33();\n  return *this;\n}\n\n/** \\returns a QTransform from \\c *this assuming the dimension is 2.\n  *\n  * This function is available only if the token EIGEN_QT_SUPPORT is defined.\n  */\ntemplate<typename Scalar, int Dim, int Mode, int Options>\nQTransform Transform<Scalar,Dim,Mode,Options>::toQTransform(void) const\n{\n  EIGEN_STATIC_ASSERT(Dim==2, YOU_MADE_A_PROGRAMMING_MISTAKE)\n  if (EIGEN_CONST_CONDITIONAL(Mode == int(AffineCompact)))\n    return QTransform(m_matrix.coeff(0,0), m_matrix.coeff(1,0),\n                      m_matrix.coeff(0,1), m_matrix.coeff(1,1),\n                      m_matrix.coeff(0,2), m_matrix.coeff(1,2));\n  else\n    return QTransform(m_matrix.coeff(0,0), m_matrix.coeff(1,0), m_matrix.coeff(2,0),\n                      m_matrix.coeff(0,1), m_matrix.coeff(1,1), m_matrix.coeff(2,1),\n                      m_matrix.coeff(0,2), m_matrix.coeff(1,2), m_matrix.coeff(2,2));\n}\n#endif\n\n/*********************\n*** Procedural API ***\n*********************/\n\n/** Applies on the right the non uniform scale transformation represented\n  * by the vector \\a other to \\c *this and returns a reference to \\c *this.\n  * \\sa prescale()\n  */\ntemplate<typename Scalar, int Dim, int Mode, int Options>\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC Transform<Scalar,Dim,Mode,Options>&\nTransform<Scalar,Dim,Mode,Options>::scale(const MatrixBase<OtherDerived> &other)\n{\n  EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(OtherDerived,int(Dim))\n  EIGEN_STATIC_ASSERT(Mode!=int(Isometry), THIS_METHOD_IS_ONLY_FOR_SPECIFIC_TRANSFORMATIONS)\n  linearExt().noalias() = (linearExt() * other.asDiagonal());\n  return *this;\n}\n\n/** Applies on the right a uniform scale of a factor \\a c to \\c *this\n  * and returns a reference to \\c *this.\n  * \\sa prescale(Scalar)\n  */\ntemplate<typename Scalar, int Dim, int Mode, int Options>\nEIGEN_DEVICE_FUNC inline Transform<Scalar,Dim,Mode,Options>& Transform<Scalar,Dim,Mode,Options>::scale(const Scalar& s)\n{\n  EIGEN_STATIC_ASSERT(Mode!=int(Isometry), THIS_METHOD_IS_ONLY_FOR_SPECIFIC_TRANSFORMATIONS)\n  linearExt() *= s;\n  return *this;\n}\n\n/** Applies on the left the non uniform scale transformation represented\n  * by the vector \\a other to \\c *this and returns a reference to \\c *this.\n  * \\sa scale()\n  */\ntemplate<typename Scalar, int Dim, int Mode, int Options>\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC Transform<Scalar,Dim,Mode,Options>&\nTransform<Scalar,Dim,Mode,Options>::prescale(const MatrixBase<OtherDerived> &other)\n{\n  EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(OtherDerived,int(Dim))\n  EIGEN_STATIC_ASSERT(Mode!=int(Isometry), THIS_METHOD_IS_ONLY_FOR_SPECIFIC_TRANSFORMATIONS)\n  affine().noalias() = (other.asDiagonal() * affine());\n  return *this;\n}\n\n/** Applies on the left a uniform scale of a factor \\a c to \\c *this\n  * and returns a reference to \\c *this.\n  * \\sa scale(Scalar)\n  */\ntemplate<typename Scalar, int Dim, int Mode, int Options>\nEIGEN_DEVICE_FUNC inline Transform<Scalar,Dim,Mode,Options>& Transform<Scalar,Dim,Mode,Options>::prescale(const Scalar& s)\n{\n  EIGEN_STATIC_ASSERT(Mode!=int(Isometry), THIS_METHOD_IS_ONLY_FOR_SPECIFIC_TRANSFORMATIONS)\n  m_matrix.template topRows<Dim>() *= s;\n  return *this;\n}\n\n/** Applies on the right the translation matrix represented by the vector \\a other\n  * to \\c *this and returns a reference to \\c *this.\n  * \\sa pretranslate()\n  */\ntemplate<typename Scalar, int Dim, int Mode, int Options>\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC Transform<Scalar,Dim,Mode,Options>&\nTransform<Scalar,Dim,Mode,Options>::translate(const MatrixBase<OtherDerived> &other)\n{\n  EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(OtherDerived,int(Dim))\n  translationExt() += linearExt() * other;\n  return *this;\n}\n\n/** Applies on the left the translation matrix represented by the vector \\a other\n  * to \\c *this and returns a reference to \\c *this.\n  * \\sa translate()\n  */\ntemplate<typename Scalar, int Dim, int Mode, int Options>\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC Transform<Scalar,Dim,Mode,Options>&\nTransform<Scalar,Dim,Mode,Options>::pretranslate(const MatrixBase<OtherDerived> &other)\n{\n  EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(OtherDerived,int(Dim))\n  if(EIGEN_CONST_CONDITIONAL(int(Mode)==int(Projective)))\n    affine() += other * m_matrix.row(Dim);\n  else\n    translation() += other;\n  return *this;\n}\n\n/** Applies on the right the rotation represented by the rotation \\a rotation\n  * to \\c *this and returns a reference to \\c *this.\n  *\n  * The template parameter \\a RotationType is the type of the rotation which\n  * must be known by internal::toRotationMatrix<>.\n  *\n  * Natively supported types includes:\n  *   - any scalar (2D),\n  *   - a Dim x Dim matrix expression,\n  *   - a Quaternion (3D),\n  *   - a AngleAxis (3D)\n  *\n  * This mechanism is easily extendable to support user types such as Euler angles,\n  * or a pair of Quaternion for 4D rotations.\n  *\n  * \\sa rotate(Scalar), class Quaternion, class AngleAxis, prerotate(RotationType)\n  */\ntemplate<typename Scalar, int Dim, int Mode, int Options>\ntemplate<typename RotationType>\nEIGEN_DEVICE_FUNC Transform<Scalar,Dim,Mode,Options>&\nTransform<Scalar,Dim,Mode,Options>::rotate(const RotationType& rotation)\n{\n  linearExt() *= internal::toRotationMatrix<Scalar,Dim>(rotation);\n  return *this;\n}\n\n/** Applies on the left the rotation represented by the rotation \\a rotation\n  * to \\c *this and returns a reference to \\c *this.\n  *\n  * See rotate() for further details.\n  *\n  * \\sa rotate()\n  */\ntemplate<typename Scalar, int Dim, int Mode, int Options>\ntemplate<typename RotationType>\nEIGEN_DEVICE_FUNC Transform<Scalar,Dim,Mode,Options>&\nTransform<Scalar,Dim,Mode,Options>::prerotate(const RotationType& rotation)\n{\n  m_matrix.template block<Dim,HDim>(0,0) = internal::toRotationMatrix<Scalar,Dim>(rotation)\n                                         * m_matrix.template block<Dim,HDim>(0,0);\n  return *this;\n}\n\n/** Applies on the right the shear transformation represented\n  * by the vector \\a other to \\c *this and returns a reference to \\c *this.\n  * \\warning 2D only.\n  * \\sa preshear()\n  */\ntemplate<typename Scalar, int Dim, int Mode, int Options>\nEIGEN_DEVICE_FUNC Transform<Scalar,Dim,Mode,Options>&\nTransform<Scalar,Dim,Mode,Options>::shear(const Scalar& sx, const Scalar& sy)\n{\n  EIGEN_STATIC_ASSERT(int(Dim)==2, YOU_MADE_A_PROGRAMMING_MISTAKE)\n  EIGEN_STATIC_ASSERT(Mode!=int(Isometry), THIS_METHOD_IS_ONLY_FOR_SPECIFIC_TRANSFORMATIONS)\n  VectorType tmp = linear().col(0)*sy + linear().col(1);\n  linear() << linear().col(0) + linear().col(1)*sx, tmp;\n  return *this;\n}\n\n/** Applies on the left the shear transformation represented\n  * by the vector \\a other to \\c *this and returns a reference to \\c *this.\n  * \\warning 2D only.\n  * \\sa shear()\n  */\ntemplate<typename Scalar, int Dim, int Mode, int Options>\nEIGEN_DEVICE_FUNC Transform<Scalar,Dim,Mode,Options>&\nTransform<Scalar,Dim,Mode,Options>::preshear(const Scalar& sx, const Scalar& sy)\n{\n  EIGEN_STATIC_ASSERT(int(Dim)==2, YOU_MADE_A_PROGRAMMING_MISTAKE)\n  EIGEN_STATIC_ASSERT(Mode!=int(Isometry), THIS_METHOD_IS_ONLY_FOR_SPECIFIC_TRANSFORMATIONS)\n  m_matrix.template block<Dim,HDim>(0,0) = LinearMatrixType(1, sx, sy, 1) * m_matrix.template block<Dim,HDim>(0,0);\n  return *this;\n}\n\n/******************************************************\n*** Scaling, Translation and Rotation compatibility ***\n******************************************************/\n\ntemplate<typename Scalar, int Dim, int Mode, int Options>\nEIGEN_DEVICE_FUNC inline Transform<Scalar,Dim,Mode,Options>& Transform<Scalar,Dim,Mode,Options>::operator=(const TranslationType& t)\n{\n  linear().setIdentity();\n  translation() = t.vector();\n  makeAffine();\n  return *this;\n}\n\ntemplate<typename Scalar, int Dim, int Mode, int Options>\nEIGEN_DEVICE_FUNC inline Transform<Scalar,Dim,Mode,Options> Transform<Scalar,Dim,Mode,Options>::operator*(const TranslationType& t) const\n{\n  Transform res = *this;\n  res.translate(t.vector());\n  return res;\n}\n\ntemplate<typename Scalar, int Dim, int Mode, int Options>\nEIGEN_DEVICE_FUNC inline Transform<Scalar,Dim,Mode,Options>& Transform<Scalar,Dim,Mode,Options>::operator=(const UniformScaling<Scalar>& s)\n{\n  m_matrix.setZero();\n  linear().diagonal().fill(s.factor());\n  makeAffine();\n  return *this;\n}\n\ntemplate<typename Scalar, int Dim, int Mode, int Options>\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC inline Transform<Scalar,Dim,Mode,Options>& Transform<Scalar,Dim,Mode,Options>::operator=(const RotationBase<Derived,Dim>& r)\n{\n  linear() = internal::toRotationMatrix<Scalar,Dim>(r);\n  translation().setZero();\n  makeAffine();\n  return *this;\n}\n\ntemplate<typename Scalar, int Dim, int Mode, int Options>\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC inline Transform<Scalar,Dim,Mode,Options> Transform<Scalar,Dim,Mode,Options>::operator*(const RotationBase<Derived,Dim>& r) const\n{\n  Transform res = *this;\n  res.rotate(r.derived());\n  return res;\n}\n\n/************************\n*** Special functions ***\n************************/\n\nnamespace internal {\ntemplate<int Mode> struct transform_rotation_impl {\n  template<typename TransformType>\n  EIGEN_DEVICE_FUNC static inline\n  const typename TransformType::LinearMatrixType run(const TransformType& t)\n  {\n    typedef typename TransformType::LinearMatrixType LinearMatrixType; \n    LinearMatrixType result;\n    t.computeRotationScaling(&result, (LinearMatrixType*)0);\n    return result;\n  }\n};\ntemplate<> struct transform_rotation_impl<Isometry> {\n  template<typename TransformType>\n  EIGEN_DEVICE_FUNC static inline\n  typename TransformType::ConstLinearPart run(const TransformType& t)\n  {\n    return t.linear();\n  }\n};\n}\n/** \\returns the rotation part of the transformation\n  *\n  * If Mode==Isometry, then this method is an alias for linear(),\n  * otherwise it calls computeRotationScaling() to extract the rotation\n  * through a SVD decomposition.\n  *\n  * \\svd_module\n  *\n  * \\sa computeRotationScaling(), computeScalingRotation(), class SVD\n  */\ntemplate<typename Scalar, int Dim, int Mode, int Options>\nEIGEN_DEVICE_FUNC\ntypename Transform<Scalar,Dim,Mode,Options>::RotationReturnType\nTransform<Scalar,Dim,Mode,Options>::rotation() const\n{\n  return internal::transform_rotation_impl<Mode>::run(*this);\n}\n\n\n/** decomposes the linear part of the transformation as a product rotation x scaling, the scaling being\n  * not necessarily positive.\n  *\n  * If either pointer is zero, the corresponding computation is skipped.\n  *\n  *\n  *\n  * \\svd_module\n  *\n  * \\sa computeScalingRotation(), rotation(), class SVD\n  */\ntemplate<typename Scalar, int Dim, int Mode, int Options>\ntemplate<typename RotationMatrixType, typename ScalingMatrixType>\nEIGEN_DEVICE_FUNC void Transform<Scalar,Dim,Mode,Options>::computeRotationScaling(RotationMatrixType *rotation, ScalingMatrixType *scaling) const\n{\n  JacobiSVD<LinearMatrixType> svd(linear(), ComputeFullU | ComputeFullV);\n\n  Scalar x = (svd.matrixU() * svd.matrixV().adjoint()).determinant(); // so x has absolute value 1\n  VectorType sv(svd.singularValues());\n  sv.coeffRef(0) *= x;\n  if(scaling) *scaling = svd.matrixV() * sv.asDiagonal() * svd.matrixV().adjoint();\n  if(rotation)\n  {\n    LinearMatrixType m(svd.matrixU());\n    m.col(0) /= x;\n    *rotation = m * svd.matrixV().adjoint();\n  }\n}\n\n/** decomposes the linear part of the transformation as a product scaling x rotation, the scaling being\n  * not necessarily positive.\n  *\n  * If either pointer is zero, the corresponding computation is skipped.\n  *\n  *\n  *\n  * \\svd_module\n  *\n  * \\sa computeRotationScaling(), rotation(), class SVD\n  */\ntemplate<typename Scalar, int Dim, int Mode, int Options>\ntemplate<typename ScalingMatrixType, typename RotationMatrixType>\nEIGEN_DEVICE_FUNC void Transform<Scalar,Dim,Mode,Options>::computeScalingRotation(ScalingMatrixType *scaling, RotationMatrixType *rotation) const\n{\n  JacobiSVD<LinearMatrixType> svd(linear(), ComputeFullU | ComputeFullV);\n\n  Scalar x = (svd.matrixU() * svd.matrixV().adjoint()).determinant(); // so x has absolute value 1\n  VectorType sv(svd.singularValues());\n  sv.coeffRef(0) *= x;\n  if(scaling) *scaling = svd.matrixU() * sv.asDiagonal() * svd.matrixU().adjoint();\n  if(rotation)\n  {\n    LinearMatrixType m(svd.matrixU());\n    m.col(0) /= x;\n    *rotation = m * svd.matrixV().adjoint();\n  }\n}\n\n/** Convenient method to set \\c *this from a position, orientation and scale\n  * of a 3D object.\n  */\ntemplate<typename Scalar, int Dim, int Mode, int Options>\ntemplate<typename PositionDerived, typename OrientationType, typename ScaleDerived>\nEIGEN_DEVICE_FUNC Transform<Scalar,Dim,Mode,Options>&\nTransform<Scalar,Dim,Mode,Options>::fromPositionOrientationScale(const MatrixBase<PositionDerived> &position,\n  const OrientationType& orientation, const MatrixBase<ScaleDerived> &scale)\n{\n  linear() = internal::toRotationMatrix<Scalar,Dim>(orientation);\n  linear() *= scale.asDiagonal();\n  translation() = position;\n  makeAffine();\n  return *this;\n}\n\nnamespace internal {\n\ntemplate<int Mode>\nstruct transform_make_affine\n{\n  template<typename MatrixType>\n  EIGEN_DEVICE_FUNC static void run(MatrixType &mat)\n  {\n    static const int Dim = MatrixType::ColsAtCompileTime-1;\n    mat.template block<1,Dim>(Dim,0).setZero();\n    mat.coeffRef(Dim,Dim) = typename MatrixType::Scalar(1);\n  }\n};\n\ntemplate<>\nstruct transform_make_affine<AffineCompact>\n{\n  template<typename MatrixType> EIGEN_DEVICE_FUNC static void run(MatrixType &) { }\n};\n    \n// selector needed to avoid taking the inverse of a 3x4 matrix\ntemplate<typename TransformType, int Mode=TransformType::Mode>\nstruct projective_transform_inverse\n{\n  EIGEN_DEVICE_FUNC static inline void run(const TransformType&, TransformType&)\n  {}\n};\n\ntemplate<typename TransformType>\nstruct projective_transform_inverse<TransformType, Projective>\n{\n  EIGEN_DEVICE_FUNC static inline void run(const TransformType& m, TransformType& res)\n  {\n    res.matrix() = m.matrix().inverse();\n  }\n};\n\n} // end namespace internal\n\n\n/**\n  *\n  * \\returns the inverse transformation according to some given knowledge\n  * on \\c *this.\n  *\n  * \\param hint allows to optimize the inversion process when the transformation\n  * is known to be not a general transformation (optional). The possible values are:\n  *  - #Projective if the transformation is not necessarily affine, i.e., if the\n  *    last row is not guaranteed to be [0 ... 0 1]\n  *  - #Affine if the last row can be assumed to be [0 ... 0 1]\n  *  - #Isometry if the transformation is only a concatenations of translations\n  *    and rotations.\n  *  The default is the template class parameter \\c Mode.\n  *\n  * \\warning unless \\a traits is always set to NoShear or NoScaling, this function\n  * requires the generic inverse method of MatrixBase defined in the LU module. If\n  * you forget to include this module, then you will get hard to debug linking errors.\n  *\n  * \\sa MatrixBase::inverse()\n  */\ntemplate<typename Scalar, int Dim, int Mode, int Options>\nEIGEN_DEVICE_FUNC Transform<Scalar,Dim,Mode,Options>\nTransform<Scalar,Dim,Mode,Options>::inverse(TransformTraits hint) const\n{\n  Transform res;\n  if (hint == Projective)\n  {\n    internal::projective_transform_inverse<Transform>::run(*this, res);\n  }\n  else\n  {\n    if (hint == Isometry)\n    {\n      res.matrix().template topLeftCorner<Dim,Dim>() = linear().transpose();\n    }\n    else if(hint&Affine)\n    {\n      res.matrix().template topLeftCorner<Dim,Dim>() = linear().inverse();\n    }\n    else\n    {\n      eigen_assert(false && \"Invalid transform traits in Transform::Inverse\");\n    }\n    // translation and remaining parts\n    res.matrix().template topRightCorner<Dim,1>()\n      = - res.matrix().template topLeftCorner<Dim,Dim>() * translation();\n    res.makeAffine(); // we do need this, because in the beginning res is uninitialized\n  }\n  return res;\n}\n\nnamespace internal {\n\n/*****************************************************\n*** Specializations of take affine part            ***\n*****************************************************/\n\ntemplate<typename TransformType> struct transform_take_affine_part {\n  typedef typename TransformType::MatrixType MatrixType;\n  typedef typename TransformType::AffinePart AffinePart;\n  typedef typename TransformType::ConstAffinePart ConstAffinePart;\n  static inline AffinePart run(MatrixType& m)\n  { return m.template block<TransformType::Dim,TransformType::HDim>(0,0); }\n  static inline ConstAffinePart run(const MatrixType& m)\n  { return m.template block<TransformType::Dim,TransformType::HDim>(0,0); }\n};\n\ntemplate<typename Scalar, int Dim, int Options>\nstruct transform_take_affine_part<Transform<Scalar,Dim,AffineCompact, Options> > {\n  typedef typename Transform<Scalar,Dim,AffineCompact,Options>::MatrixType MatrixType;\n  static inline MatrixType& run(MatrixType& m) { return m; }\n  static inline const MatrixType& run(const MatrixType& m) { return m; }\n};\n\n/*****************************************************\n*** Specializations of construct from matrix       ***\n*****************************************************/\n\ntemplate<typename Other, int Mode, int Options, int Dim, int HDim>\nstruct transform_construct_from_matrix<Other, Mode,Options,Dim,HDim, Dim,Dim>\n{\n  static inline void run(Transform<typename Other::Scalar,Dim,Mode,Options> *transform, const Other& other)\n  {\n    transform->linear() = other;\n    transform->translation().setZero();\n    transform->makeAffine();\n  }\n};\n\ntemplate<typename Other, int Mode, int Options, int Dim, int HDim>\nstruct transform_construct_from_matrix<Other, Mode,Options,Dim,HDim, Dim,HDim>\n{\n  static inline void run(Transform<typename Other::Scalar,Dim,Mode,Options> *transform, const Other& other)\n  {\n    transform->affine() = other;\n    transform->makeAffine();\n  }\n};\n\ntemplate<typename Other, int Mode, int Options, int Dim, int HDim>\nstruct transform_construct_from_matrix<Other, Mode,Options,Dim,HDim, HDim,HDim>\n{\n  static inline void run(Transform<typename Other::Scalar,Dim,Mode,Options> *transform, const Other& other)\n  { transform->matrix() = other; }\n};\n\ntemplate<typename Other, int Options, int Dim, int HDim>\nstruct transform_construct_from_matrix<Other, AffineCompact,Options,Dim,HDim, HDim,HDim>\n{\n  static inline void run(Transform<typename Other::Scalar,Dim,AffineCompact,Options> *transform, const Other& other)\n  { transform->matrix() = other.template block<Dim,HDim>(0,0); }\n};\n\n/**********************************************************\n***   Specializations of operator* with rhs EigenBase   ***\n**********************************************************/\n\ntemplate<int LhsMode,int RhsMode>\nstruct transform_product_result\n{\n  enum \n  { \n    Mode =\n      (LhsMode == (int)Projective    || RhsMode == (int)Projective    ) ? Projective :\n      (LhsMode == (int)Affine        || RhsMode == (int)Affine        ) ? Affine :\n      (LhsMode == (int)AffineCompact || RhsMode == (int)AffineCompact ) ? AffineCompact :\n      (LhsMode == (int)Isometry      || RhsMode == (int)Isometry      ) ? Isometry : Projective\n  };\n};\n\ntemplate< typename TransformType, typename MatrixType, int RhsCols>\nstruct transform_right_product_impl< TransformType, MatrixType, 0, RhsCols>\n{\n  typedef typename MatrixType::PlainObject ResultType;\n\n  static EIGEN_STRONG_INLINE ResultType run(const TransformType& T, const MatrixType& other)\n  {\n    return T.matrix() * other;\n  }\n};\n\ntemplate< typename TransformType, typename MatrixType, int RhsCols>\nstruct transform_right_product_impl< TransformType, MatrixType, 1, RhsCols>\n{\n  enum { \n    Dim = TransformType::Dim, \n    HDim = TransformType::HDim,\n    OtherRows = MatrixType::RowsAtCompileTime,\n    OtherCols = MatrixType::ColsAtCompileTime\n  };\n\n  typedef typename MatrixType::PlainObject ResultType;\n\n  static EIGEN_STRONG_INLINE ResultType run(const TransformType& T, const MatrixType& other)\n  {\n    EIGEN_STATIC_ASSERT(OtherRows==HDim, YOU_MIXED_MATRICES_OF_DIFFERENT_SIZES);\n\n    typedef Block<ResultType, Dim, OtherCols, int(MatrixType::RowsAtCompileTime)==Dim> TopLeftLhs;\n\n    ResultType res(other.rows(),other.cols());\n    TopLeftLhs(res, 0, 0, Dim, other.cols()).noalias() = T.affine() * other;\n    res.row(OtherRows-1) = other.row(OtherRows-1);\n    \n    return res;\n  }\n};\n\ntemplate< typename TransformType, typename MatrixType, int RhsCols>\nstruct transform_right_product_impl< TransformType, MatrixType, 2, RhsCols>\n{\n  enum { \n    Dim = TransformType::Dim, \n    HDim = TransformType::HDim,\n    OtherRows = MatrixType::RowsAtCompileTime,\n    OtherCols = MatrixType::ColsAtCompileTime\n  };\n\n  typedef typename MatrixType::PlainObject ResultType;\n\n  static EIGEN_STRONG_INLINE ResultType run(const TransformType& T, const MatrixType& other)\n  {\n    EIGEN_STATIC_ASSERT(OtherRows==Dim, YOU_MIXED_MATRICES_OF_DIFFERENT_SIZES);\n\n    typedef Block<ResultType, Dim, OtherCols, true> TopLeftLhs;\n    ResultType res(Replicate<typename TransformType::ConstTranslationPart, 1, OtherCols>(T.translation(),1,other.cols()));\n    TopLeftLhs(res, 0, 0, Dim, other.cols()).noalias() += T.linear() * other;\n\n    return res;\n  }\n};\n\ntemplate< typename TransformType, typename MatrixType >\nstruct transform_right_product_impl< TransformType, MatrixType, 2, 1> // rhs is a vector of size Dim\n{\n  typedef typename TransformType::MatrixType TransformMatrix;\n  enum {\n    Dim = TransformType::Dim,\n    HDim = TransformType::HDim,\n    OtherRows = MatrixType::RowsAtCompileTime,\n    WorkingRows = EIGEN_PLAIN_ENUM_MIN(TransformMatrix::RowsAtCompileTime,HDim)\n  };\n\n  typedef typename MatrixType::PlainObject ResultType;\n\n  static EIGEN_STRONG_INLINE ResultType run(const TransformType& T, const MatrixType& other)\n  {\n    EIGEN_STATIC_ASSERT(OtherRows==Dim, YOU_MIXED_MATRICES_OF_DIFFERENT_SIZES);\n\n    Matrix<typename ResultType::Scalar, Dim+1, 1> rhs;\n    rhs.template head<Dim>() = other; rhs[Dim] = typename ResultType::Scalar(1);\n    Matrix<typename ResultType::Scalar, WorkingRows, 1> res(T.matrix() * rhs);\n    return res.template head<Dim>();\n  }\n};\n\n/**********************************************************\n***   Specializations of operator* with lhs EigenBase   ***\n**********************************************************/\n\n// generic HDim x HDim matrix * T => Projective\ntemplate<typename Other,int Mode, int Options, int Dim, int HDim>\nstruct transform_left_product_impl<Other,Mode,Options,Dim,HDim, HDim,HDim>\n{\n  typedef Transform<typename Other::Scalar,Dim,Mode,Options> TransformType;\n  typedef typename TransformType::MatrixType MatrixType;\n  typedef Transform<typename Other::Scalar,Dim,Projective,Options> ResultType;\n  static ResultType run(const Other& other,const TransformType& tr)\n  { return ResultType(other * tr.matrix()); }\n};\n\n// generic HDim x HDim matrix * AffineCompact => Projective\ntemplate<typename Other, int Options, int Dim, int HDim>\nstruct transform_left_product_impl<Other,AffineCompact,Options,Dim,HDim, HDim,HDim>\n{\n  typedef Transform<typename Other::Scalar,Dim,AffineCompact,Options> TransformType;\n  typedef typename TransformType::MatrixType MatrixType;\n  typedef Transform<typename Other::Scalar,Dim,Projective,Options> ResultType;\n  static ResultType run(const Other& other,const TransformType& tr)\n  {\n    ResultType res;\n    res.matrix().noalias() = other.template block<HDim,Dim>(0,0) * tr.matrix();\n    res.matrix().col(Dim) += other.col(Dim);\n    return res;\n  }\n};\n\n// affine matrix * T\ntemplate<typename Other,int Mode, int Options, int Dim, int HDim>\nstruct transform_left_product_impl<Other,Mode,Options,Dim,HDim, Dim,HDim>\n{\n  typedef Transform<typename Other::Scalar,Dim,Mode,Options> TransformType;\n  typedef typename TransformType::MatrixType MatrixType;\n  typedef TransformType ResultType;\n  static ResultType run(const Other& other,const TransformType& tr)\n  {\n    ResultType res;\n    res.affine().noalias() = other * tr.matrix();\n    res.matrix().row(Dim) = tr.matrix().row(Dim);\n    return res;\n  }\n};\n\n// affine matrix * AffineCompact\ntemplate<typename Other, int Options, int Dim, int HDim>\nstruct transform_left_product_impl<Other,AffineCompact,Options,Dim,HDim, Dim,HDim>\n{\n  typedef Transform<typename Other::Scalar,Dim,AffineCompact,Options> TransformType;\n  typedef typename TransformType::MatrixType MatrixType;\n  typedef TransformType ResultType;\n  static ResultType run(const Other& other,const TransformType& tr)\n  {\n    ResultType res;\n    res.matrix().noalias() = other.template block<Dim,Dim>(0,0) * tr.matrix();\n    res.translation() += other.col(Dim);\n    return res;\n  }\n};\n\n// linear matrix * T\ntemplate<typename Other,int Mode, int Options, int Dim, int HDim>\nstruct transform_left_product_impl<Other,Mode,Options,Dim,HDim, Dim,Dim>\n{\n  typedef Transform<typename Other::Scalar,Dim,Mode,Options> TransformType;\n  typedef typename TransformType::MatrixType MatrixType;\n  typedef TransformType ResultType;\n  static ResultType run(const Other& other, const TransformType& tr)\n  {\n    TransformType res;\n    if(Mode!=int(AffineCompact))\n      res.matrix().row(Dim) = tr.matrix().row(Dim);\n    res.matrix().template topRows<Dim>().noalias()\n      = other * tr.matrix().template topRows<Dim>();\n    return res;\n  }\n};\n\n/**********************************************************\n*** Specializations of operator* with another Transform ***\n**********************************************************/\n\ntemplate<typename Scalar, int Dim, int LhsMode, int LhsOptions, int RhsMode, int RhsOptions>\nstruct transform_transform_product_impl<Transform<Scalar,Dim,LhsMode,LhsOptions>,Transform<Scalar,Dim,RhsMode,RhsOptions>,false >\n{\n  enum { ResultMode = transform_product_result<LhsMode,RhsMode>::Mode };\n  typedef Transform<Scalar,Dim,LhsMode,LhsOptions> Lhs;\n  typedef Transform<Scalar,Dim,RhsMode,RhsOptions> Rhs;\n  typedef Transform<Scalar,Dim,ResultMode,LhsOptions> ResultType;\n  static ResultType run(const Lhs& lhs, const Rhs& rhs)\n  {\n    ResultType res;\n    res.linear() = lhs.linear() * rhs.linear();\n    res.translation() = lhs.linear() * rhs.translation() + lhs.translation();\n    res.makeAffine();\n    return res;\n  }\n};\n\ntemplate<typename Scalar, int Dim, int LhsMode, int LhsOptions, int RhsMode, int RhsOptions>\nstruct transform_transform_product_impl<Transform<Scalar,Dim,LhsMode,LhsOptions>,Transform<Scalar,Dim,RhsMode,RhsOptions>,true >\n{\n  typedef Transform<Scalar,Dim,LhsMode,LhsOptions> Lhs;\n  typedef Transform<Scalar,Dim,RhsMode,RhsOptions> Rhs;\n  typedef Transform<Scalar,Dim,Projective> ResultType;\n  static ResultType run(const Lhs& lhs, const Rhs& rhs)\n  {\n    return ResultType( lhs.matrix() * rhs.matrix() );\n  }\n};\n\ntemplate<typename Scalar, int Dim, int LhsOptions, int RhsOptions>\nstruct transform_transform_product_impl<Transform<Scalar,Dim,AffineCompact,LhsOptions>,Transform<Scalar,Dim,Projective,RhsOptions>,true >\n{\n  typedef Transform<Scalar,Dim,AffineCompact,LhsOptions> Lhs;\n  typedef Transform<Scalar,Dim,Projective,RhsOptions> Rhs;\n  typedef Transform<Scalar,Dim,Projective> ResultType;\n  static ResultType run(const Lhs& lhs, const Rhs& rhs)\n  {\n    ResultType res;\n    res.matrix().template topRows<Dim>() = lhs.matrix() * rhs.matrix();\n    res.matrix().row(Dim) = rhs.matrix().row(Dim);\n    return res;\n  }\n};\n\ntemplate<typename Scalar, int Dim, int LhsOptions, int RhsOptions>\nstruct transform_transform_product_impl<Transform<Scalar,Dim,Projective,LhsOptions>,Transform<Scalar,Dim,AffineCompact,RhsOptions>,true >\n{\n  typedef Transform<Scalar,Dim,Projective,LhsOptions> Lhs;\n  typedef Transform<Scalar,Dim,AffineCompact,RhsOptions> Rhs;\n  typedef Transform<Scalar,Dim,Projective> ResultType;\n  static ResultType run(const Lhs& lhs, const Rhs& rhs)\n  {\n    ResultType res(lhs.matrix().template leftCols<Dim>() * rhs.matrix());\n    res.matrix().col(Dim) += lhs.matrix().col(Dim);\n    return res;\n  }\n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_TRANSFORM_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Geometry/Translation.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_TRANSLATION_H\n#define EIGEN_TRANSLATION_H\n\nnamespace Eigen { \n\n/** \\geometry_module \\ingroup Geometry_Module\n  *\n  * \\class Translation\n  *\n  * \\brief Represents a translation transformation\n  *\n  * \\tparam _Scalar the scalar type, i.e., the type of the coefficients.\n  * \\tparam _Dim the  dimension of the space, can be a compile time value or Dynamic\n  *\n  * \\note This class is not aimed to be used to store a translation transformation,\n  * but rather to make easier the constructions and updates of Transform objects.\n  *\n  * \\sa class Scaling, class Transform\n  */\ntemplate<typename _Scalar, int _Dim>\nclass Translation\n{\npublic:\n  EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_Dim)\n  /** dimension of the space */\n  enum { Dim = _Dim };\n  /** the scalar type of the coefficients */\n  typedef _Scalar Scalar;\n  /** corresponding vector type */\n  typedef Matrix<Scalar,Dim,1> VectorType;\n  /** corresponding linear transformation matrix type */\n  typedef Matrix<Scalar,Dim,Dim> LinearMatrixType;\n  /** corresponding affine transformation type */\n  typedef Transform<Scalar,Dim,Affine> AffineTransformType;\n  /** corresponding isometric transformation type */\n  typedef Transform<Scalar,Dim,Isometry> IsometryTransformType;\n\nprotected:\n\n  VectorType m_coeffs;\n\npublic:\n\n  /** Default constructor without initialization. */\n  EIGEN_DEVICE_FUNC Translation() {}\n  /**  */\n  EIGEN_DEVICE_FUNC inline Translation(const Scalar& sx, const Scalar& sy)\n  {\n    eigen_assert(Dim==2);\n    m_coeffs.x() = sx;\n    m_coeffs.y() = sy;\n  }\n  /**  */\n  EIGEN_DEVICE_FUNC inline Translation(const Scalar& sx, const Scalar& sy, const Scalar& sz)\n  {\n    eigen_assert(Dim==3);\n    m_coeffs.x() = sx;\n    m_coeffs.y() = sy;\n    m_coeffs.z() = sz;\n  }\n  /** Constructs and initialize the translation transformation from a vector of translation coefficients */\n  EIGEN_DEVICE_FUNC explicit inline Translation(const VectorType& vector) : m_coeffs(vector) {}\n\n  /** \\brief Returns the x-translation by value. **/\n  EIGEN_DEVICE_FUNC inline Scalar x() const { return m_coeffs.x(); }\n  /** \\brief Returns the y-translation by value. **/\n  EIGEN_DEVICE_FUNC inline Scalar y() const { return m_coeffs.y(); }\n  /** \\brief Returns the z-translation by value. **/\n  EIGEN_DEVICE_FUNC inline Scalar z() const { return m_coeffs.z(); }\n\n  /** \\brief Returns the x-translation as a reference. **/\n  EIGEN_DEVICE_FUNC inline Scalar& x() { return m_coeffs.x(); }\n  /** \\brief Returns the y-translation as a reference. **/\n  EIGEN_DEVICE_FUNC inline Scalar& y() { return m_coeffs.y(); }\n  /** \\brief Returns the z-translation as a reference. **/\n  EIGEN_DEVICE_FUNC inline Scalar& z() { return m_coeffs.z(); }\n\n  EIGEN_DEVICE_FUNC const VectorType& vector() const { return m_coeffs; }\n  EIGEN_DEVICE_FUNC VectorType& vector() { return m_coeffs; }\n\n  EIGEN_DEVICE_FUNC const VectorType& translation() const { return m_coeffs; }\n  EIGEN_DEVICE_FUNC VectorType& translation() { return m_coeffs; }\n\n  /** Concatenates two translation */\n  EIGEN_DEVICE_FUNC inline Translation operator* (const Translation& other) const\n  { return Translation(m_coeffs + other.m_coeffs); }\n\n  /** Concatenates a translation and a uniform scaling */\n  EIGEN_DEVICE_FUNC inline AffineTransformType operator* (const UniformScaling<Scalar>& other) const;\n\n  /** Concatenates a translation and a linear transformation */\n  template<typename OtherDerived>\n  EIGEN_DEVICE_FUNC inline AffineTransformType operator* (const EigenBase<OtherDerived>& linear) const;\n\n  /** Concatenates a translation and a rotation */\n  template<typename Derived>\n  EIGEN_DEVICE_FUNC inline IsometryTransformType operator*(const RotationBase<Derived,Dim>& r) const\n  { return *this * IsometryTransformType(r); }\n\n  /** \\returns the concatenation of a linear transformation \\a l with the translation \\a t */\n  // its a nightmare to define a templated friend function outside its declaration\n  template<typename OtherDerived> friend\n  EIGEN_DEVICE_FUNC inline AffineTransformType operator*(const EigenBase<OtherDerived>& linear, const Translation& t)\n  {\n    AffineTransformType res;\n    res.matrix().setZero();\n    res.linear() = linear.derived();\n    res.translation() = linear.derived() * t.m_coeffs;\n    res.matrix().row(Dim).setZero();\n    res(Dim,Dim) = Scalar(1);\n    return res;\n  }\n\n  /** Concatenates a translation and a transformation */\n  template<int Mode, int Options>\n  EIGEN_DEVICE_FUNC inline Transform<Scalar,Dim,Mode> operator* (const Transform<Scalar,Dim,Mode,Options>& t) const\n  {\n    Transform<Scalar,Dim,Mode> res = t;\n    res.pretranslate(m_coeffs);\n    return res;\n  }\n\n  /** Applies translation to vector */\n  template<typename Derived>\n  inline typename internal::enable_if<Derived::IsVectorAtCompileTime,VectorType>::type\n  operator* (const MatrixBase<Derived>& vec) const\n  { return m_coeffs + vec.derived(); }\n\n  /** \\returns the inverse translation (opposite) */\n  Translation inverse() const { return Translation(-m_coeffs); }\n\n  static const Translation Identity() { return Translation(VectorType::Zero()); }\n\n  /** \\returns \\c *this with scalar type casted to \\a NewScalarType\n    *\n    * Note that if \\a NewScalarType is equal to the current scalar type of \\c *this\n    * then this function smartly returns a const reference to \\c *this.\n    */\n  template<typename NewScalarType>\n  EIGEN_DEVICE_FUNC inline typename internal::cast_return_type<Translation,Translation<NewScalarType,Dim> >::type cast() const\n  { return typename internal::cast_return_type<Translation,Translation<NewScalarType,Dim> >::type(*this); }\n\n  /** Copy constructor with scalar type conversion */\n  template<typename OtherScalarType>\n  EIGEN_DEVICE_FUNC inline explicit Translation(const Translation<OtherScalarType,Dim>& other)\n  { m_coeffs = other.vector().template cast<Scalar>(); }\n\n  /** \\returns \\c true if \\c *this is approximately equal to \\a other, within the precision\n    * determined by \\a prec.\n    *\n    * \\sa MatrixBase::isApprox() */\n  EIGEN_DEVICE_FUNC bool isApprox(const Translation& other, const typename NumTraits<Scalar>::Real& prec = NumTraits<Scalar>::dummy_precision()) const\n  { return m_coeffs.isApprox(other.m_coeffs, prec); }\n\n};\n\n/** \\addtogroup Geometry_Module */\n//@{\ntypedef Translation<float, 2> Translation2f;\ntypedef Translation<double,2> Translation2d;\ntypedef Translation<float, 3> Translation3f;\ntypedef Translation<double,3> Translation3d;\n//@}\n\ntemplate<typename Scalar, int Dim>\nEIGEN_DEVICE_FUNC inline typename Translation<Scalar,Dim>::AffineTransformType\nTranslation<Scalar,Dim>::operator* (const UniformScaling<Scalar>& other) const\n{\n  AffineTransformType res;\n  res.matrix().setZero();\n  res.linear().diagonal().fill(other.factor());\n  res.translation() = m_coeffs;\n  res(Dim,Dim) = Scalar(1);\n  return res;\n}\n\ntemplate<typename Scalar, int Dim>\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC inline typename Translation<Scalar,Dim>::AffineTransformType\nTranslation<Scalar,Dim>::operator* (const EigenBase<OtherDerived>& linear) const\n{\n  AffineTransformType res;\n  res.matrix().setZero();\n  res.linear() = linear.derived();\n  res.translation() = m_coeffs;\n  res.matrix().row(Dim).setZero();\n  res(Dim,Dim) = Scalar(1);\n  return res;\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_TRANSLATION_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Geometry/Umeyama.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Hauke Heibel <hauke.heibel@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_UMEYAMA_H\n#define EIGEN_UMEYAMA_H\n\n// This file requires the user to include \n// * Eigen/Core\n// * Eigen/LU \n// * Eigen/SVD\n// * Eigen/Array\n\nnamespace Eigen { \n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\n\n// These helpers are required since it allows to use mixed types as parameters\n// for the Umeyama. The problem with mixed parameters is that the return type\n// cannot trivially be deduced when float and double types are mixed.\nnamespace internal {\n\n// Compile time return type deduction for different MatrixBase types.\n// Different means here different alignment and parameters but the same underlying\n// real scalar type.\ntemplate<typename MatrixType, typename OtherMatrixType>\nstruct umeyama_transform_matrix_type\n{\n  enum {\n    MinRowsAtCompileTime = EIGEN_SIZE_MIN_PREFER_DYNAMIC(MatrixType::RowsAtCompileTime, OtherMatrixType::RowsAtCompileTime),\n\n    // When possible we want to choose some small fixed size value since the result\n    // is likely to fit on the stack. So here, EIGEN_SIZE_MIN_PREFER_DYNAMIC is not what we want.\n    HomogeneousDimension = int(MinRowsAtCompileTime) == Dynamic ? Dynamic : int(MinRowsAtCompileTime)+1\n  };\n\n  typedef Matrix<typename traits<MatrixType>::Scalar,\n    HomogeneousDimension,\n    HomogeneousDimension,\n    AutoAlign | (traits<MatrixType>::Flags & RowMajorBit ? RowMajor : ColMajor),\n    HomogeneousDimension,\n    HomogeneousDimension\n  > type;\n};\n\n}\n\n#endif\n\n/**\n* \\geometry_module \\ingroup Geometry_Module\n*\n* \\brief Returns the transformation between two point sets.\n*\n* The algorithm is based on:\n* \"Least-squares estimation of transformation parameters between two point patterns\",\n* Shinji Umeyama, PAMI 1991, DOI: 10.1109/34.88573\n*\n* It estimates parameters \\f$ c, \\mathbf{R}, \\f$ and \\f$ \\mathbf{t} \\f$ such that\n* \\f{align*}\n*   \\frac{1}{n} \\sum_{i=1}^n \\vert\\vert y_i - (c\\mathbf{R}x_i + \\mathbf{t}) \\vert\\vert_2^2\n* \\f}\n* is minimized.\n*\n* The algorithm is based on the analysis of the covariance matrix\n* \\f$ \\Sigma_{\\mathbf{x}\\mathbf{y}} \\in \\mathbb{R}^{d \\times d} \\f$\n* of the input point sets \\f$ \\mathbf{x} \\f$ and \\f$ \\mathbf{y} \\f$ where \n* \\f$d\\f$ is corresponding to the dimension (which is typically small).\n* The analysis is involving the SVD having a complexity of \\f$O(d^3)\\f$\n* though the actual computational effort lies in the covariance\n* matrix computation which has an asymptotic lower bound of \\f$O(dm)\\f$ when \n* the input point sets have dimension \\f$d \\times m\\f$.\n*\n* Currently the method is working only for floating point matrices.\n*\n* \\todo Should the return type of umeyama() become a Transform?\n*\n* \\param src Source points \\f$ \\mathbf{x} = \\left( x_1, \\hdots, x_n \\right) \\f$.\n* \\param dst Destination points \\f$ \\mathbf{y} = \\left( y_1, \\hdots, y_n \\right) \\f$.\n* \\param with_scaling Sets \\f$ c=1 \\f$ when <code>false</code> is passed.\n* \\return The homogeneous transformation \n* \\f{align*}\n*   T = \\begin{bmatrix} c\\mathbf{R} & \\mathbf{t} \\\\ \\mathbf{0} & 1 \\end{bmatrix}\n* \\f}\n* minimizing the residual above. This transformation is always returned as an \n* Eigen::Matrix.\n*/\ntemplate <typename Derived, typename OtherDerived>\ntypename internal::umeyama_transform_matrix_type<Derived, OtherDerived>::type\numeyama(const MatrixBase<Derived>& src, const MatrixBase<OtherDerived>& dst, bool with_scaling = true)\n{\n  typedef typename internal::umeyama_transform_matrix_type<Derived, OtherDerived>::type TransformationMatrixType;\n  typedef typename internal::traits<TransformationMatrixType>::Scalar Scalar;\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n\n  EIGEN_STATIC_ASSERT(!NumTraits<Scalar>::IsComplex, NUMERIC_TYPE_MUST_BE_REAL)\n  EIGEN_STATIC_ASSERT((internal::is_same<Scalar, typename internal::traits<OtherDerived>::Scalar>::value),\n    YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)\n\n  enum { Dimension = EIGEN_SIZE_MIN_PREFER_DYNAMIC(Derived::RowsAtCompileTime, OtherDerived::RowsAtCompileTime) };\n\n  typedef Matrix<Scalar, Dimension, 1> VectorType;\n  typedef Matrix<Scalar, Dimension, Dimension> MatrixType;\n  typedef typename internal::plain_matrix_type_row_major<Derived>::type RowMajorMatrixType;\n\n  const Index m = src.rows(); // dimension\n  const Index n = src.cols(); // number of measurements\n\n  // required for demeaning ...\n  const RealScalar one_over_n = RealScalar(1) / static_cast<RealScalar>(n);\n\n  // computation of mean\n  const VectorType src_mean = src.rowwise().sum() * one_over_n;\n  const VectorType dst_mean = dst.rowwise().sum() * one_over_n;\n\n  // demeaning of src and dst points\n  const RowMajorMatrixType src_demean = src.colwise() - src_mean;\n  const RowMajorMatrixType dst_demean = dst.colwise() - dst_mean;\n\n  // Eq. (36)-(37)\n  const Scalar src_var = src_demean.rowwise().squaredNorm().sum() * one_over_n;\n\n  // Eq. (38)\n  const MatrixType sigma = one_over_n * dst_demean * src_demean.transpose();\n\n  JacobiSVD<MatrixType> svd(sigma, ComputeFullU | ComputeFullV);\n\n  // Initialize the resulting transformation with an identity matrix...\n  TransformationMatrixType Rt = TransformationMatrixType::Identity(m+1,m+1);\n\n  // Eq. (39)\n  VectorType S = VectorType::Ones(m);\n\n  if  ( svd.matrixU().determinant() * svd.matrixV().determinant() < 0 )\n    S(m-1) = -1;\n\n  // Eq. (40) and (43)\n  Rt.block(0,0,m,m).noalias() = svd.matrixU() * S.asDiagonal() * svd.matrixV().transpose();\n\n  if (with_scaling)\n  {\n    // Eq. (42)\n    const Scalar c = Scalar(1)/src_var * svd.singularValues().dot(S);\n\n    // Eq. (41)\n    Rt.col(m).head(m) = dst_mean;\n    Rt.col(m).head(m).noalias() -= c*Rt.topLeftCorner(m,m)*src_mean;\n    Rt.block(0,0,m,m) *= c;\n  }\n  else\n  {\n    Rt.col(m).head(m) = dst_mean;\n    Rt.col(m).head(m).noalias() -= Rt.topLeftCorner(m,m)*src_mean;\n  }\n\n  return Rt;\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_UMEYAMA_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Geometry/arch/Geometry_SSE.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Rohit Garg <rpg.314@gmail.com>\n// Copyright (C) 2009-2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_GEOMETRY_SSE_H\n#define EIGEN_GEOMETRY_SSE_H\n\nnamespace Eigen { \n\nnamespace internal {\n\ntemplate<class Derived, class OtherDerived>\nstruct quat_product<Architecture::SSE, Derived, OtherDerived, float>\n{\n  enum {\n    AAlignment = traits<Derived>::Alignment,\n    BAlignment = traits<OtherDerived>::Alignment,\n    ResAlignment = traits<Quaternion<float> >::Alignment\n  };\n  static inline Quaternion<float> run(const QuaternionBase<Derived>& _a, const QuaternionBase<OtherDerived>& _b)\n  {\n    evaluator<typename Derived::Coefficients> ae(_a.coeffs());\n    evaluator<typename OtherDerived::Coefficients> be(_b.coeffs());\n    Quaternion<float> res;\n    const Packet4f mask = _mm_setr_ps(0.f,0.f,0.f,-0.f);\n    Packet4f a = ae.template packet<AAlignment,Packet4f>(0);\n    Packet4f b = be.template packet<BAlignment,Packet4f>(0);\n    Packet4f s1 = pmul(vec4f_swizzle1(a,1,2,0,2),vec4f_swizzle1(b,2,0,1,2));\n    Packet4f s2 = pmul(vec4f_swizzle1(a,3,3,3,1),vec4f_swizzle1(b,0,1,2,1));\n    pstoret<float,Packet4f,ResAlignment>(\n              &res.x(),\n              padd(psub(pmul(a,vec4f_swizzle1(b,3,3,3,3)),\n                                    pmul(vec4f_swizzle1(a,2,0,1,0),\n                                               vec4f_swizzle1(b,1,2,0,0))),\n                         pxor(mask,padd(s1,s2))));\n    \n    return res;\n  }\n};\n\ntemplate<class Derived>\nstruct quat_conj<Architecture::SSE, Derived, float>\n{\n  enum {\n    ResAlignment = traits<Quaternion<float> >::Alignment\n  };\n  static inline Quaternion<float> run(const QuaternionBase<Derived>& q)\n  {\n    evaluator<typename Derived::Coefficients> qe(q.coeffs());\n    Quaternion<float> res;\n    const Packet4f mask = _mm_setr_ps(-0.f,-0.f,-0.f,0.f);\n    pstoret<float,Packet4f,ResAlignment>(&res.x(), pxor(mask, qe.template packet<traits<Derived>::Alignment,Packet4f>(0)));\n    return res;\n  }\n};\n\n\ntemplate<typename VectorLhs,typename VectorRhs>\nstruct cross3_impl<Architecture::SSE,VectorLhs,VectorRhs,float,true>\n{\n  enum {\n    ResAlignment = traits<typename plain_matrix_type<VectorLhs>::type>::Alignment\n  };\n  static inline typename plain_matrix_type<VectorLhs>::type\n  run(const VectorLhs& lhs, const VectorRhs& rhs)\n  {\n    evaluator<VectorLhs> lhs_eval(lhs);\n    evaluator<VectorRhs> rhs_eval(rhs);\n    Packet4f a = lhs_eval.template packet<traits<VectorLhs>::Alignment,Packet4f>(0);\n    Packet4f b = rhs_eval.template packet<traits<VectorRhs>::Alignment,Packet4f>(0);\n    Packet4f mul1 = pmul(vec4f_swizzle1(a,1,2,0,3),vec4f_swizzle1(b,2,0,1,3));\n    Packet4f mul2 = pmul(vec4f_swizzle1(a,2,0,1,3),vec4f_swizzle1(b,1,2,0,3));\n    typename plain_matrix_type<VectorLhs>::type res;\n    pstoret<float,Packet4f,ResAlignment>(&res.x(),psub(mul1,mul2));\n    return res;\n  }\n};\n\n\n\n\ntemplate<class Derived, class OtherDerived>\nstruct quat_product<Architecture::SSE, Derived, OtherDerived, double>\n{\n  enum {\n    BAlignment = traits<OtherDerived>::Alignment,\n    ResAlignment = traits<Quaternion<double> >::Alignment\n  };\n\n  static inline Quaternion<double> run(const QuaternionBase<Derived>& _a, const QuaternionBase<OtherDerived>& _b)\n  {\n  const Packet2d mask = _mm_castsi128_pd(_mm_set_epi32(0x0,0x0,0x80000000,0x0));\n\n  Quaternion<double> res;\n\n  evaluator<typename Derived::Coefficients> ae(_a.coeffs());\n  evaluator<typename OtherDerived::Coefficients> be(_b.coeffs());\n\n  const double* a = _a.coeffs().data();\n  Packet2d b_xy = be.template packet<BAlignment,Packet2d>(0);\n  Packet2d b_zw = be.template packet<BAlignment,Packet2d>(2);\n  Packet2d a_xx = pset1<Packet2d>(a[0]);\n  Packet2d a_yy = pset1<Packet2d>(a[1]);\n  Packet2d a_zz = pset1<Packet2d>(a[2]);\n  Packet2d a_ww = pset1<Packet2d>(a[3]);\n\n  // two temporaries:\n  Packet2d t1, t2;\n\n  /*\n   * t1 = ww*xy + yy*zw\n   * t2 = zz*xy - xx*zw\n   * res.xy = t1 +/- swap(t2)\n   */\n  t1 = padd(pmul(a_ww, b_xy), pmul(a_yy, b_zw));\n  t2 = psub(pmul(a_zz, b_xy), pmul(a_xx, b_zw));\n#ifdef EIGEN_VECTORIZE_SSE3\n  EIGEN_UNUSED_VARIABLE(mask)\n  pstoret<double,Packet2d,ResAlignment>(&res.x(), _mm_addsub_pd(t1, preverse(t2)));\n#else\n  pstoret<double,Packet2d,ResAlignment>(&res.x(), padd(t1, pxor(mask,preverse(t2))));\n#endif\n  \n  /*\n   * t1 = ww*zw - yy*xy\n   * t2 = zz*zw + xx*xy\n   * res.zw = t1 -/+ swap(t2) = swap( swap(t1) +/- t2)\n   */\n  t1 = psub(pmul(a_ww, b_zw), pmul(a_yy, b_xy));\n  t2 = padd(pmul(a_zz, b_zw), pmul(a_xx, b_xy));\n#ifdef EIGEN_VECTORIZE_SSE3\n  EIGEN_UNUSED_VARIABLE(mask)\n  pstoret<double,Packet2d,ResAlignment>(&res.z(), preverse(_mm_addsub_pd(preverse(t1), t2)));\n#else\n  pstoret<double,Packet2d,ResAlignment>(&res.z(), psub(t1, pxor(mask,preverse(t2))));\n#endif\n\n  return res;\n}\n};\n\ntemplate<class Derived>\nstruct quat_conj<Architecture::SSE, Derived, double>\n{\n  enum {\n    ResAlignment = traits<Quaternion<double> >::Alignment\n  };\n  static inline Quaternion<double> run(const QuaternionBase<Derived>& q)\n  {\n    evaluator<typename Derived::Coefficients> qe(q.coeffs());\n    Quaternion<double> res;\n    const Packet2d mask0 = _mm_setr_pd(-0.,-0.);\n    const Packet2d mask2 = _mm_setr_pd(-0.,0.);\n    pstoret<double,Packet2d,ResAlignment>(&res.x(), pxor(mask0, qe.template packet<traits<Derived>::Alignment,Packet2d>(0)));\n    pstoret<double,Packet2d,ResAlignment>(&res.z(), pxor(mask2, qe.template packet<traits<Derived>::Alignment,Packet2d>(2)));\n    return res;\n  }\n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_GEOMETRY_SSE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Householder/BlockHouseholder.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010 Vincent Lejeune\n// Copyright (C) 2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_BLOCK_HOUSEHOLDER_H\n#define EIGEN_BLOCK_HOUSEHOLDER_H\n\n// This file contains some helper function to deal with block householder reflectors\n\nnamespace Eigen { \n\nnamespace internal {\n  \n/** \\internal */\n// template<typename TriangularFactorType,typename VectorsType,typename CoeffsType>\n// void make_block_householder_triangular_factor(TriangularFactorType& triFactor, const VectorsType& vectors, const CoeffsType& hCoeffs)\n// {\n//   typedef typename VectorsType::Scalar Scalar;\n//   const Index nbVecs = vectors.cols();\n//   eigen_assert(triFactor.rows() == nbVecs && triFactor.cols() == nbVecs && vectors.rows()>=nbVecs);\n// \n//   for(Index i = 0; i < nbVecs; i++)\n//   {\n//     Index rs = vectors.rows() - i;\n//     // Warning, note that hCoeffs may alias with vectors.\n//     // It is then necessary to copy it before modifying vectors(i,i). \n//     typename CoeffsType::Scalar h = hCoeffs(i);\n//     // This hack permits to pass trough nested Block<> and Transpose<> expressions.\n//     Scalar *Vii_ptr = const_cast<Scalar*>(vectors.data() + vectors.outerStride()*i + vectors.innerStride()*i);\n//     Scalar Vii = *Vii_ptr;\n//     *Vii_ptr = Scalar(1);\n//     triFactor.col(i).head(i).noalias() = -h * vectors.block(i, 0, rs, i).adjoint()\n//                                        * vectors.col(i).tail(rs);\n//     *Vii_ptr = Vii;\n//     // FIXME add .noalias() once the triangular product can work inplace\n//     triFactor.col(i).head(i) = triFactor.block(0,0,i,i).template triangularView<Upper>()\n//                              * triFactor.col(i).head(i);\n//     triFactor(i,i) = hCoeffs(i);\n//   }\n// }\n\n/** \\internal */\n// This variant avoid modifications in vectors\ntemplate<typename TriangularFactorType,typename VectorsType,typename CoeffsType>\nvoid make_block_householder_triangular_factor(TriangularFactorType& triFactor, const VectorsType& vectors, const CoeffsType& hCoeffs)\n{\n  const Index nbVecs = vectors.cols();\n  eigen_assert(triFactor.rows() == nbVecs && triFactor.cols() == nbVecs && vectors.rows()>=nbVecs);\n\n  for(Index i = nbVecs-1; i >=0 ; --i)\n  {\n    Index rs = vectors.rows() - i - 1;\n    Index rt = nbVecs-i-1;\n\n    if(rt>0)\n    {\n      triFactor.row(i).tail(rt).noalias() = -hCoeffs(i) * vectors.col(i).tail(rs).adjoint()\n                                                        * vectors.bottomRightCorner(rs, rt).template triangularView<UnitLower>();\n            \n      // FIXME use the following line with .noalias() once the triangular product can work inplace\n      // triFactor.row(i).tail(rt) = triFactor.row(i).tail(rt) * triFactor.bottomRightCorner(rt,rt).template triangularView<Upper>();\n      for(Index j=nbVecs-1; j>i; --j)\n      {\n        typename TriangularFactorType::Scalar z = triFactor(i,j);\n        triFactor(i,j) = z * triFactor(j,j);\n        if(nbVecs-j-1>0)\n          triFactor.row(i).tail(nbVecs-j-1) += z * triFactor.row(j).tail(nbVecs-j-1);\n      }\n      \n    }\n    triFactor(i,i) = hCoeffs(i);\n  }\n}\n\n/** \\internal\n  * if forward then perform   mat = H0 * H1 * H2 * mat\n  * otherwise perform         mat = H2 * H1 * H0 * mat\n  */\ntemplate<typename MatrixType,typename VectorsType,typename CoeffsType>\nvoid apply_block_householder_on_the_left(MatrixType& mat, const VectorsType& vectors, const CoeffsType& hCoeffs, bool forward)\n{\n  enum { TFactorSize = MatrixType::ColsAtCompileTime };\n  Index nbVecs = vectors.cols();\n  Matrix<typename MatrixType::Scalar, TFactorSize, TFactorSize, RowMajor> T(nbVecs,nbVecs);\n  \n  if(forward) make_block_householder_triangular_factor(T, vectors, hCoeffs);\n  else        make_block_householder_triangular_factor(T, vectors, hCoeffs.conjugate());  \n  const TriangularView<const VectorsType, UnitLower> V(vectors);\n\n  // A -= V T V^* A\n  Matrix<typename MatrixType::Scalar,VectorsType::ColsAtCompileTime,MatrixType::ColsAtCompileTime,\n         (VectorsType::MaxColsAtCompileTime==1 && MatrixType::MaxColsAtCompileTime!=1)?RowMajor:ColMajor,\n         VectorsType::MaxColsAtCompileTime,MatrixType::MaxColsAtCompileTime> tmp = V.adjoint() * mat;\n  // FIXME add .noalias() once the triangular product can work inplace\n  if(forward) tmp = T.template triangularView<Upper>()           * tmp;\n  else        tmp = T.template triangularView<Upper>().adjoint() * tmp;\n  mat.noalias() -= V * tmp;\n}\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_BLOCK_HOUSEHOLDER_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Householder/Householder.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_HOUSEHOLDER_H\n#define EIGEN_HOUSEHOLDER_H\n\nnamespace Eigen { \n\nnamespace internal {\ntemplate<int n> struct decrement_size\n{\n  enum {\n    ret = n==Dynamic ? n : n-1\n  };\n};\n}\n\n/** Computes the elementary reflector H such that:\n  * \\f$ H *this = [ beta 0 ... 0]^T \\f$\n  * where the transformation H is:\n  * \\f$ H = I - tau v v^*\\f$\n  * and the vector v is:\n  * \\f$ v^T = [1 essential^T] \\f$\n  *\n  * The essential part of the vector \\c v is stored in *this.\n  * \n  * On output:\n  * \\param tau the scaling factor of the Householder transformation\n  * \\param beta the result of H * \\c *this\n  *\n  * \\sa MatrixBase::makeHouseholder(), MatrixBase::applyHouseholderOnTheLeft(),\n  *     MatrixBase::applyHouseholderOnTheRight()\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC\nvoid MatrixBase<Derived>::makeHouseholderInPlace(Scalar& tau, RealScalar& beta)\n{\n  VectorBlock<Derived, internal::decrement_size<Base::SizeAtCompileTime>::ret> essentialPart(derived(), 1, size()-1);\n  makeHouseholder(essentialPart, tau, beta);\n}\n\n/** Computes the elementary reflector H such that:\n  * \\f$ H *this = [ beta 0 ... 0]^T \\f$\n  * where the transformation H is:\n  * \\f$ H = I - tau v v^*\\f$\n  * and the vector v is:\n  * \\f$ v^T = [1 essential^T] \\f$\n  *\n  * On output:\n  * \\param essential the essential part of the vector \\c v\n  * \\param tau the scaling factor of the Householder transformation\n  * \\param beta the result of H * \\c *this\n  *\n  * \\sa MatrixBase::makeHouseholderInPlace(), MatrixBase::applyHouseholderOnTheLeft(),\n  *     MatrixBase::applyHouseholderOnTheRight()\n  */\ntemplate<typename Derived>\ntemplate<typename EssentialPart>\nEIGEN_DEVICE_FUNC\nvoid MatrixBase<Derived>::makeHouseholder(\n  EssentialPart& essential,\n  Scalar& tau,\n  RealScalar& beta) const\n{\n  using std::sqrt;\n  using numext::conj;\n  \n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(EssentialPart)\n  VectorBlock<const Derived, EssentialPart::SizeAtCompileTime> tail(derived(), 1, size()-1);\n  \n  RealScalar tailSqNorm = size()==1 ? RealScalar(0) : tail.squaredNorm();\n  Scalar c0 = coeff(0);\n  const RealScalar tol = (std::numeric_limits<RealScalar>::min)();\n\n  if(tailSqNorm <= tol && numext::abs2(numext::imag(c0))<=tol)\n  {\n    tau = RealScalar(0);\n    beta = numext::real(c0);\n    essential.setZero();\n  }\n  else\n  {\n    beta = sqrt(numext::abs2(c0) + tailSqNorm);\n    if (numext::real(c0)>=RealScalar(0))\n      beta = -beta;\n    essential = tail / (c0 - beta);\n    tau = conj((beta - c0) / beta);\n  }\n}\n\n/** Apply the elementary reflector H given by\n  * \\f$ H = I - tau v v^*\\f$\n  * with\n  * \\f$ v^T = [1 essential^T] \\f$\n  * from the left to a vector or matrix.\n  *\n  * On input:\n  * \\param essential the essential part of the vector \\c v\n  * \\param tau the scaling factor of the Householder transformation\n  * \\param workspace a pointer to working space with at least\n  *                  this->cols() entries\n  *\n  * \\sa MatrixBase::makeHouseholder(), MatrixBase::makeHouseholderInPlace(), \n  *     MatrixBase::applyHouseholderOnTheRight()\n  */\ntemplate<typename Derived>\ntemplate<typename EssentialPart>\nEIGEN_DEVICE_FUNC\nvoid MatrixBase<Derived>::applyHouseholderOnTheLeft(\n  const EssentialPart& essential,\n  const Scalar& tau,\n  Scalar* workspace)\n{\n  if(rows() == 1)\n  {\n    *this *= Scalar(1)-tau;\n  }\n  else if(tau!=Scalar(0))\n  {\n    Map<typename internal::plain_row_type<PlainObject>::type> tmp(workspace,cols());\n    Block<Derived, EssentialPart::SizeAtCompileTime, Derived::ColsAtCompileTime> bottom(derived(), 1, 0, rows()-1, cols());\n    tmp.noalias() = essential.adjoint() * bottom;\n    tmp += this->row(0);\n    this->row(0) -= tau * tmp;\n    bottom.noalias() -= tau * essential * tmp;\n  }\n}\n\n/** Apply the elementary reflector H given by\n  * \\f$ H = I - tau v v^*\\f$\n  * with\n  * \\f$ v^T = [1 essential^T] \\f$\n  * from the right to a vector or matrix.\n  *\n  * On input:\n  * \\param essential the essential part of the vector \\c v\n  * \\param tau the scaling factor of the Householder transformation\n  * \\param workspace a pointer to working space with at least\n  *                  this->rows() entries\n  *\n  * \\sa MatrixBase::makeHouseholder(), MatrixBase::makeHouseholderInPlace(), \n  *     MatrixBase::applyHouseholderOnTheLeft()\n  */\ntemplate<typename Derived>\ntemplate<typename EssentialPart>\nEIGEN_DEVICE_FUNC\nvoid MatrixBase<Derived>::applyHouseholderOnTheRight(\n  const EssentialPart& essential,\n  const Scalar& tau,\n  Scalar* workspace)\n{\n  if(cols() == 1)\n  {\n    *this *= Scalar(1)-tau;\n  }\n  else if(tau!=Scalar(0))\n  {\n    Map<typename internal::plain_col_type<PlainObject>::type> tmp(workspace,rows());\n    Block<Derived, Derived::RowsAtCompileTime, EssentialPart::SizeAtCompileTime> right(derived(), 0, 1, rows(), cols()-1);\n    tmp.noalias() = right * essential;\n    tmp += this->col(0);\n    this->col(0) -= tau * tmp;\n    right.noalias() -= tau * tmp * essential.adjoint();\n  }\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_HOUSEHOLDER_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Householder/HouseholderSequence.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2010 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_HOUSEHOLDER_SEQUENCE_H\n#define EIGEN_HOUSEHOLDER_SEQUENCE_H\n\nnamespace Eigen { \n\n/** \\ingroup Householder_Module\n  * \\householder_module\n  * \\class HouseholderSequence\n  * \\brief Sequence of Householder reflections acting on subspaces with decreasing size\n  * \\tparam VectorsType type of matrix containing the Householder vectors\n  * \\tparam CoeffsType  type of vector containing the Householder coefficients\n  * \\tparam Side        either OnTheLeft (the default) or OnTheRight\n  *\n  * This class represents a product sequence of Householder reflections where the first Householder reflection\n  * acts on the whole space, the second Householder reflection leaves the one-dimensional subspace spanned by\n  * the first unit vector invariant, the third Householder reflection leaves the two-dimensional subspace\n  * spanned by the first two unit vectors invariant, and so on up to the last reflection which leaves all but\n  * one dimensions invariant and acts only on the last dimension. Such sequences of Householder reflections\n  * are used in several algorithms to zero out certain parts of a matrix. Indeed, the methods\n  * HessenbergDecomposition::matrixQ(), Tridiagonalization::matrixQ(), HouseholderQR::householderQ(),\n  * and ColPivHouseholderQR::householderQ() all return a %HouseholderSequence.\n  *\n  * More precisely, the class %HouseholderSequence represents an \\f$ n \\times n \\f$ matrix \\f$ H \\f$ of the\n  * form \\f$ H = \\prod_{i=0}^{n-1} H_i \\f$ where the i-th Householder reflection is \\f$ H_i = I - h_i v_i\n  * v_i^* \\f$. The i-th Householder coefficient \\f$ h_i \\f$ is a scalar and the i-th Householder vector \\f$\n  * v_i \\f$ is a vector of the form\n  * \\f[ \n  * v_i = [\\underbrace{0, \\ldots, 0}_{i-1\\mbox{ zeros}}, 1, \\underbrace{*, \\ldots,*}_{n-i\\mbox{ arbitrary entries}} ]. \n  * \\f]\n  * The last \\f$ n-i \\f$ entries of \\f$ v_i \\f$ are called the essential part of the Householder vector.\n  *\n  * Typical usages are listed below, where H is a HouseholderSequence:\n  * \\code\n  * A.applyOnTheRight(H);             // A = A * H\n  * A.applyOnTheLeft(H);              // A = H * A\n  * A.applyOnTheRight(H.adjoint());   // A = A * H^*\n  * A.applyOnTheLeft(H.adjoint());    // A = H^* * A\n  * MatrixXd Q = H;                   // conversion to a dense matrix\n  * \\endcode\n  * In addition to the adjoint, you can also apply the inverse (=adjoint), the transpose, and the conjugate operators.\n  *\n  * See the documentation for HouseholderSequence(const VectorsType&, const CoeffsType&) for an example.\n  *\n  * \\sa MatrixBase::applyOnTheLeft(), MatrixBase::applyOnTheRight()\n  */\n\nnamespace internal {\n\ntemplate<typename VectorsType, typename CoeffsType, int Side>\nstruct traits<HouseholderSequence<VectorsType,CoeffsType,Side> >\n{\n  typedef typename VectorsType::Scalar Scalar;\n  typedef typename VectorsType::StorageIndex StorageIndex;\n  typedef typename VectorsType::StorageKind StorageKind;\n  enum {\n    RowsAtCompileTime = Side==OnTheLeft ? traits<VectorsType>::RowsAtCompileTime\n                                        : traits<VectorsType>::ColsAtCompileTime,\n    ColsAtCompileTime = RowsAtCompileTime,\n    MaxRowsAtCompileTime = Side==OnTheLeft ? traits<VectorsType>::MaxRowsAtCompileTime\n                                           : traits<VectorsType>::MaxColsAtCompileTime,\n    MaxColsAtCompileTime = MaxRowsAtCompileTime,\n    Flags = 0\n  };\n};\n\nstruct HouseholderSequenceShape {};\n\ntemplate<typename VectorsType, typename CoeffsType, int Side>\nstruct evaluator_traits<HouseholderSequence<VectorsType,CoeffsType,Side> >\n  : public evaluator_traits_base<HouseholderSequence<VectorsType,CoeffsType,Side> >\n{\n  typedef HouseholderSequenceShape Shape;\n};\n\ntemplate<typename VectorsType, typename CoeffsType, int Side>\nstruct hseq_side_dependent_impl\n{\n  typedef Block<const VectorsType, Dynamic, 1> EssentialVectorType;\n  typedef HouseholderSequence<VectorsType, CoeffsType, OnTheLeft> HouseholderSequenceType;\n  static EIGEN_DEVICE_FUNC inline const EssentialVectorType essentialVector(const HouseholderSequenceType& h, Index k)\n  {\n    Index start = k+1+h.m_shift;\n    return Block<const VectorsType,Dynamic,1>(h.m_vectors, start, k, h.rows()-start, 1);\n  }\n};\n\ntemplate<typename VectorsType, typename CoeffsType>\nstruct hseq_side_dependent_impl<VectorsType, CoeffsType, OnTheRight>\n{\n  typedef Transpose<Block<const VectorsType, 1, Dynamic> > EssentialVectorType;\n  typedef HouseholderSequence<VectorsType, CoeffsType, OnTheRight> HouseholderSequenceType;\n  static inline const EssentialVectorType essentialVector(const HouseholderSequenceType& h, Index k)\n  {\n    Index start = k+1+h.m_shift;\n    return Block<const VectorsType,1,Dynamic>(h.m_vectors, k, start, 1, h.rows()-start).transpose();\n  }\n};\n\ntemplate<typename OtherScalarType, typename MatrixType> struct matrix_type_times_scalar_type\n{\n  typedef typename ScalarBinaryOpTraits<OtherScalarType, typename MatrixType::Scalar>::ReturnType\n    ResultScalar;\n  typedef Matrix<ResultScalar, MatrixType::RowsAtCompileTime, MatrixType::ColsAtCompileTime,\n                 0, MatrixType::MaxRowsAtCompileTime, MatrixType::MaxColsAtCompileTime> Type;\n};\n\n} // end namespace internal\n\ntemplate<typename VectorsType, typename CoeffsType, int Side> class HouseholderSequence\n  : public EigenBase<HouseholderSequence<VectorsType,CoeffsType,Side> >\n{\n    typedef typename internal::hseq_side_dependent_impl<VectorsType,CoeffsType,Side>::EssentialVectorType EssentialVectorType;\n  \n  public:\n    enum {\n      RowsAtCompileTime = internal::traits<HouseholderSequence>::RowsAtCompileTime,\n      ColsAtCompileTime = internal::traits<HouseholderSequence>::ColsAtCompileTime,\n      MaxRowsAtCompileTime = internal::traits<HouseholderSequence>::MaxRowsAtCompileTime,\n      MaxColsAtCompileTime = internal::traits<HouseholderSequence>::MaxColsAtCompileTime\n    };\n    typedef typename internal::traits<HouseholderSequence>::Scalar Scalar;\n\n    typedef HouseholderSequence<\n      typename internal::conditional<NumTraits<Scalar>::IsComplex,\n        typename internal::remove_all<typename VectorsType::ConjugateReturnType>::type,\n        VectorsType>::type,\n      typename internal::conditional<NumTraits<Scalar>::IsComplex,\n        typename internal::remove_all<typename CoeffsType::ConjugateReturnType>::type,\n        CoeffsType>::type,\n      Side\n    > ConjugateReturnType;\n\n    typedef HouseholderSequence<\n      VectorsType,\n      typename internal::conditional<NumTraits<Scalar>::IsComplex,\n        typename internal::remove_all<typename CoeffsType::ConjugateReturnType>::type,\n        CoeffsType>::type,\n      Side\n    > AdjointReturnType;\n\n    typedef HouseholderSequence<\n      typename internal::conditional<NumTraits<Scalar>::IsComplex,\n        typename internal::remove_all<typename VectorsType::ConjugateReturnType>::type,\n        VectorsType>::type,\n      CoeffsType,\n      Side\n    > TransposeReturnType;\n\n    typedef HouseholderSequence<\n      typename internal::add_const<VectorsType>::type,\n      typename internal::add_const<CoeffsType>::type,\n      Side\n    > ConstHouseholderSequence;\n\n    /** \\brief Constructor.\n      * \\param[in]  v      %Matrix containing the essential parts of the Householder vectors\n      * \\param[in]  h      Vector containing the Householder coefficients\n      *\n      * Constructs the Householder sequence with coefficients given by \\p h and vectors given by \\p v. The\n      * i-th Householder coefficient \\f$ h_i \\f$ is given by \\p h(i) and the essential part of the i-th\n      * Householder vector \\f$ v_i \\f$ is given by \\p v(k,i) with \\p k > \\p i (the subdiagonal part of the\n      * i-th column). If \\p v has fewer columns than rows, then the Householder sequence contains as many\n      * Householder reflections as there are columns.\n      *\n      * \\note The %HouseholderSequence object stores \\p v and \\p h by reference.\n      *\n      * Example: \\include HouseholderSequence_HouseholderSequence.cpp\n      * Output: \\verbinclude HouseholderSequence_HouseholderSequence.out\n      *\n      * \\sa setLength(), setShift()\n      */\n    EIGEN_DEVICE_FUNC\n    HouseholderSequence(const VectorsType& v, const CoeffsType& h)\n      : m_vectors(v), m_coeffs(h), m_reverse(false), m_length(v.diagonalSize()),\n        m_shift(0)\n    {\n    }\n\n    /** \\brief Copy constructor. */\n    EIGEN_DEVICE_FUNC\n    HouseholderSequence(const HouseholderSequence& other)\n      : m_vectors(other.m_vectors),\n        m_coeffs(other.m_coeffs),\n        m_reverse(other.m_reverse),\n        m_length(other.m_length),\n        m_shift(other.m_shift)\n    {\n    }\n\n    /** \\brief Number of rows of transformation viewed as a matrix.\n      * \\returns Number of rows \n      * \\details This equals the dimension of the space that the transformation acts on.\n      */\n    EIGEN_DEVICE_FUNC\n    Index rows() const { return Side==OnTheLeft ? m_vectors.rows() : m_vectors.cols(); }\n\n    /** \\brief Number of columns of transformation viewed as a matrix.\n      * \\returns Number of columns\n      * \\details This equals the dimension of the space that the transformation acts on.\n      */\n    EIGEN_DEVICE_FUNC\n    Index cols() const { return rows(); }\n\n    /** \\brief Essential part of a Householder vector.\n      * \\param[in]  k  Index of Householder reflection\n      * \\returns    Vector containing non-trivial entries of k-th Householder vector\n      *\n      * This function returns the essential part of the Householder vector \\f$ v_i \\f$. This is a vector of\n      * length \\f$ n-i \\f$ containing the last \\f$ n-i \\f$ entries of the vector\n      * \\f[ \n      * v_i = [\\underbrace{0, \\ldots, 0}_{i-1\\mbox{ zeros}}, 1, \\underbrace{*, \\ldots,*}_{n-i\\mbox{ arbitrary entries}} ]. \n      * \\f]\n      * The index \\f$ i \\f$ equals \\p k + shift(), corresponding to the k-th column of the matrix \\p v\n      * passed to the constructor.\n      *\n      * \\sa setShift(), shift()\n      */\n    EIGEN_DEVICE_FUNC\n    const EssentialVectorType essentialVector(Index k) const\n    {\n      eigen_assert(k >= 0 && k < m_length);\n      return internal::hseq_side_dependent_impl<VectorsType,CoeffsType,Side>::essentialVector(*this, k);\n    }\n\n    /** \\brief %Transpose of the Householder sequence. */\n    TransposeReturnType transpose() const\n    {\n      return TransposeReturnType(m_vectors.conjugate(), m_coeffs)\n              .setReverseFlag(!m_reverse)\n              .setLength(m_length)\n              .setShift(m_shift);\n    }\n\n    /** \\brief Complex conjugate of the Householder sequence. */\n    ConjugateReturnType conjugate() const\n    {\n      return ConjugateReturnType(m_vectors.conjugate(), m_coeffs.conjugate())\n             .setReverseFlag(m_reverse)\n             .setLength(m_length)\n             .setShift(m_shift);\n    }\n\n    /** \\returns an expression of the complex conjugate of \\c *this if Cond==true,\n     *           returns \\c *this otherwise.\n     */\n    template<bool Cond>\n    EIGEN_DEVICE_FUNC\n    inline typename internal::conditional<Cond,ConjugateReturnType,ConstHouseholderSequence>::type\n    conjugateIf() const\n    {\n      typedef typename internal::conditional<Cond,ConjugateReturnType,ConstHouseholderSequence>::type ReturnType;\n      return ReturnType(m_vectors.template conjugateIf<Cond>(), m_coeffs.template conjugateIf<Cond>());\n    }\n\n    /** \\brief Adjoint (conjugate transpose) of the Householder sequence. */\n    AdjointReturnType adjoint() const\n    {\n      return AdjointReturnType(m_vectors, m_coeffs.conjugate())\n              .setReverseFlag(!m_reverse)\n              .setLength(m_length)\n              .setShift(m_shift);\n    }\n\n    /** \\brief Inverse of the Householder sequence (equals the adjoint). */\n    AdjointReturnType inverse() const { return adjoint(); }\n\n    /** \\internal */\n    template<typename DestType>\n    inline EIGEN_DEVICE_FUNC\n    void evalTo(DestType& dst) const\n    {\n      Matrix<Scalar, DestType::RowsAtCompileTime, 1,\n             AutoAlign|ColMajor, DestType::MaxRowsAtCompileTime, 1> workspace(rows());\n      evalTo(dst, workspace);\n    }\n\n    /** \\internal */\n    template<typename Dest, typename Workspace>\n    EIGEN_DEVICE_FUNC\n    void evalTo(Dest& dst, Workspace& workspace) const\n    {\n      workspace.resize(rows());\n      Index vecs = m_length;\n      if(internal::is_same_dense(dst,m_vectors))\n      {\n        // in-place\n        dst.diagonal().setOnes();\n        dst.template triangularView<StrictlyUpper>().setZero();\n        for(Index k = vecs-1; k >= 0; --k)\n        {\n          Index cornerSize = rows() - k - m_shift;\n          if(m_reverse)\n            dst.bottomRightCorner(cornerSize, cornerSize)\n               .applyHouseholderOnTheRight(essentialVector(k), m_coeffs.coeff(k), workspace.data());\n          else\n            dst.bottomRightCorner(cornerSize, cornerSize)\n               .applyHouseholderOnTheLeft(essentialVector(k), m_coeffs.coeff(k), workspace.data());\n\n          // clear the off diagonal vector\n          dst.col(k).tail(rows()-k-1).setZero();\n        }\n        // clear the remaining columns if needed\n        for(Index k = 0; k<cols()-vecs ; ++k)\n          dst.col(k).tail(rows()-k-1).setZero();\n      }\n      else if(m_length>BlockSize)\n      {\n        dst.setIdentity(rows(), rows());\n        if(m_reverse)\n          applyThisOnTheLeft(dst,workspace,true);\n        else\n          applyThisOnTheLeft(dst,workspace,true);\n      }\n      else\n      {\n        dst.setIdentity(rows(), rows());\n        for(Index k = vecs-1; k >= 0; --k)\n        {\n          Index cornerSize = rows() - k - m_shift;\n          if(m_reverse)\n            dst.bottomRightCorner(cornerSize, cornerSize)\n               .applyHouseholderOnTheRight(essentialVector(k), m_coeffs.coeff(k), workspace.data());\n          else\n            dst.bottomRightCorner(cornerSize, cornerSize)\n               .applyHouseholderOnTheLeft(essentialVector(k), m_coeffs.coeff(k), workspace.data());\n        }\n      }\n    }\n\n    /** \\internal */\n    template<typename Dest> inline void applyThisOnTheRight(Dest& dst) const\n    {\n      Matrix<Scalar,1,Dest::RowsAtCompileTime,RowMajor,1,Dest::MaxRowsAtCompileTime> workspace(dst.rows());\n      applyThisOnTheRight(dst, workspace);\n    }\n\n    /** \\internal */\n    template<typename Dest, typename Workspace>\n    inline void applyThisOnTheRight(Dest& dst, Workspace& workspace) const\n    {\n      workspace.resize(dst.rows());\n      for(Index k = 0; k < m_length; ++k)\n      {\n        Index actual_k = m_reverse ? m_length-k-1 : k;\n        dst.rightCols(rows()-m_shift-actual_k)\n           .applyHouseholderOnTheRight(essentialVector(actual_k), m_coeffs.coeff(actual_k), workspace.data());\n      }\n    }\n\n    /** \\internal */\n    template<typename Dest> inline void applyThisOnTheLeft(Dest& dst, bool inputIsIdentity = false) const\n    {\n      Matrix<Scalar,1,Dest::ColsAtCompileTime,RowMajor,1,Dest::MaxColsAtCompileTime> workspace;\n      applyThisOnTheLeft(dst, workspace, inputIsIdentity);\n    }\n\n    /** \\internal */\n    template<typename Dest, typename Workspace>\n    inline void applyThisOnTheLeft(Dest& dst, Workspace& workspace, bool inputIsIdentity = false) const\n    {\n      if(inputIsIdentity && m_reverse)\n        inputIsIdentity = false;\n      // if the entries are large enough, then apply the reflectors by block\n      if(m_length>=BlockSize && dst.cols()>1)\n      {\n        // Make sure we have at least 2 useful blocks, otherwise it is point-less:\n        Index blockSize = m_length<Index(2*BlockSize) ? (m_length+1)/2 : Index(BlockSize);\n        for(Index i = 0; i < m_length; i+=blockSize)\n        {\n          Index end = m_reverse ? (std::min)(m_length,i+blockSize) : m_length-i;\n          Index k = m_reverse ? i : (std::max)(Index(0),end-blockSize);\n          Index bs = end-k;\n          Index start = k + m_shift;\n          \n          typedef Block<typename internal::remove_all<VectorsType>::type,Dynamic,Dynamic> SubVectorsType;\n          SubVectorsType sub_vecs1(m_vectors.const_cast_derived(), Side==OnTheRight ? k : start,\n                                                                   Side==OnTheRight ? start : k,\n                                                                   Side==OnTheRight ? bs : m_vectors.rows()-start,\n                                                                   Side==OnTheRight ? m_vectors.cols()-start : bs);\n          typename internal::conditional<Side==OnTheRight, Transpose<SubVectorsType>, SubVectorsType&>::type sub_vecs(sub_vecs1);\n\n          Index dstStart = dst.rows()-rows()+m_shift+k;\n          Index dstRows  = rows()-m_shift-k;\n          Block<Dest,Dynamic,Dynamic> sub_dst(dst,\n                                              dstStart,\n                                              inputIsIdentity ? dstStart : 0,\n                                              dstRows,\n                                              inputIsIdentity ? dstRows : dst.cols());\n          apply_block_householder_on_the_left(sub_dst, sub_vecs, m_coeffs.segment(k, bs), !m_reverse);\n        }\n      }\n      else\n      {\n        workspace.resize(dst.cols());\n        for(Index k = 0; k < m_length; ++k)\n        {\n          Index actual_k = m_reverse ? k : m_length-k-1;\n          Index dstStart = rows()-m_shift-actual_k;\n          dst.bottomRightCorner(dstStart, inputIsIdentity ? dstStart : dst.cols())\n            .applyHouseholderOnTheLeft(essentialVector(actual_k), m_coeffs.coeff(actual_k), workspace.data());\n        }\n      }\n    }\n\n    /** \\brief Computes the product of a Householder sequence with a matrix.\n      * \\param[in]  other  %Matrix being multiplied.\n      * \\returns    Expression object representing the product.\n      *\n      * This function computes \\f$ HM \\f$ where \\f$ H \\f$ is the Householder sequence represented by \\p *this\n      * and \\f$ M \\f$ is the matrix \\p other.\n      */\n    template<typename OtherDerived>\n    typename internal::matrix_type_times_scalar_type<Scalar, OtherDerived>::Type operator*(const MatrixBase<OtherDerived>& other) const\n    {\n      typename internal::matrix_type_times_scalar_type<Scalar, OtherDerived>::Type\n        res(other.template cast<typename internal::matrix_type_times_scalar_type<Scalar,OtherDerived>::ResultScalar>());\n      applyThisOnTheLeft(res, internal::is_identity<OtherDerived>::value && res.rows()==res.cols());\n      return res;\n    }\n\n    template<typename _VectorsType, typename _CoeffsType, int _Side> friend struct internal::hseq_side_dependent_impl;\n\n    /** \\brief Sets the length of the Householder sequence.\n      * \\param [in]  length  New value for the length.\n      *\n      * By default, the length \\f$ n \\f$ of the Householder sequence \\f$ H = H_0 H_1 \\ldots H_{n-1} \\f$ is set\n      * to the number of columns of the matrix \\p v passed to the constructor, or the number of rows if that\n      * is smaller. After this function is called, the length equals \\p length.\n      *\n      * \\sa length()\n      */\n    EIGEN_DEVICE_FUNC\n    HouseholderSequence& setLength(Index length)\n    {\n      m_length = length;\n      return *this;\n    }\n\n    /** \\brief Sets the shift of the Householder sequence.\n      * \\param [in]  shift  New value for the shift.\n      *\n      * By default, a %HouseholderSequence object represents \\f$ H = H_0 H_1 \\ldots H_{n-1} \\f$ and the i-th\n      * column of the matrix \\p v passed to the constructor corresponds to the i-th Householder\n      * reflection. After this function is called, the object represents \\f$ H = H_{\\mathrm{shift}}\n      * H_{\\mathrm{shift}+1} \\ldots H_{n-1} \\f$ and the i-th column of \\p v corresponds to the (shift+i)-th\n      * Householder reflection.\n      *\n      * \\sa shift()\n      */\n    EIGEN_DEVICE_FUNC\n    HouseholderSequence& setShift(Index shift)\n    {\n      m_shift = shift;\n      return *this;\n    }\n\n    EIGEN_DEVICE_FUNC\n    Index length() const { return m_length; }  /**< \\brief Returns the length of the Householder sequence. */\n\n    EIGEN_DEVICE_FUNC\n    Index shift() const { return m_shift; }    /**< \\brief Returns the shift of the Householder sequence. */\n\n    /* Necessary for .adjoint() and .conjugate() */\n    template <typename VectorsType2, typename CoeffsType2, int Side2> friend class HouseholderSequence;\n\n  protected:\n\n    /** \\internal\n      * \\brief Sets the reverse flag.\n      * \\param [in]  reverse  New value of the reverse flag.\n      *\n      * By default, the reverse flag is not set. If the reverse flag is set, then this object represents\n      * \\f$ H^r = H_{n-1} \\ldots H_1 H_0 \\f$ instead of \\f$ H = H_0 H_1 \\ldots H_{n-1} \\f$.\n      * \\note For real valued HouseholderSequence this is equivalent to transposing \\f$ H \\f$.\n      *\n      * \\sa reverseFlag(), transpose(), adjoint()\n      */\n    HouseholderSequence& setReverseFlag(bool reverse)\n    {\n      m_reverse = reverse;\n      return *this;\n    }\n\n    bool reverseFlag() const { return m_reverse; }     /**< \\internal \\brief Returns the reverse flag. */\n\n    typename VectorsType::Nested m_vectors;\n    typename CoeffsType::Nested m_coeffs;\n    bool m_reverse;\n    Index m_length;\n    Index m_shift;\n    enum { BlockSize = 48 };\n};\n\n/** \\brief Computes the product of a matrix with a Householder sequence.\n  * \\param[in]  other  %Matrix being multiplied.\n  * \\param[in]  h      %HouseholderSequence being multiplied.\n  * \\returns    Expression object representing the product.\n  *\n  * This function computes \\f$ MH \\f$ where \\f$ M \\f$ is the matrix \\p other and \\f$ H \\f$ is the\n  * Householder sequence represented by \\p h.\n  */\ntemplate<typename OtherDerived, typename VectorsType, typename CoeffsType, int Side>\ntypename internal::matrix_type_times_scalar_type<typename VectorsType::Scalar,OtherDerived>::Type operator*(const MatrixBase<OtherDerived>& other, const HouseholderSequence<VectorsType,CoeffsType,Side>& h)\n{\n  typename internal::matrix_type_times_scalar_type<typename VectorsType::Scalar,OtherDerived>::Type\n    res(other.template cast<typename internal::matrix_type_times_scalar_type<typename VectorsType::Scalar,OtherDerived>::ResultScalar>());\n  h.applyThisOnTheRight(res);\n  return res;\n}\n\n/** \\ingroup Householder_Module \\householder_module\n  * \\brief Convenience function for constructing a Householder sequence. \n  * \\returns A HouseholderSequence constructed from the specified arguments.\n  */\ntemplate<typename VectorsType, typename CoeffsType>\nHouseholderSequence<VectorsType,CoeffsType> householderSequence(const VectorsType& v, const CoeffsType& h)\n{\n  return HouseholderSequence<VectorsType,CoeffsType,OnTheLeft>(v, h);\n}\n\n/** \\ingroup Householder_Module \\householder_module\n  * \\brief Convenience function for constructing a Householder sequence. \n  * \\returns A HouseholderSequence constructed from the specified arguments.\n  * \\details This function differs from householderSequence() in that the template argument \\p OnTheSide of\n  * the constructed HouseholderSequence is set to OnTheRight, instead of the default OnTheLeft.\n  */\ntemplate<typename VectorsType, typename CoeffsType>\nHouseholderSequence<VectorsType,CoeffsType,OnTheRight> rightHouseholderSequence(const VectorsType& v, const CoeffsType& h)\n{\n  return HouseholderSequence<VectorsType,CoeffsType,OnTheRight>(v, h);\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_HOUSEHOLDER_SEQUENCE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2011-2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_BASIC_PRECONDITIONERS_H\n#define EIGEN_BASIC_PRECONDITIONERS_H\n\nnamespace Eigen { \n\n/** \\ingroup IterativeLinearSolvers_Module\n  * \\brief A preconditioner based on the digonal entries\n  *\n  * This class allows to approximately solve for A.x = b problems assuming A is a diagonal matrix.\n  * In other words, this preconditioner neglects all off diagonal entries and, in Eigen's language, solves for:\n    \\code\n    A.diagonal().asDiagonal() . x = b\n    \\endcode\n  *\n  * \\tparam _Scalar the type of the scalar.\n  *\n  * \\implsparsesolverconcept\n  *\n  * This preconditioner is suitable for both selfadjoint and general problems.\n  * The diagonal entries are pre-inverted and stored into a dense vector.\n  *\n  * \\note A variant that has yet to be implemented would attempt to preserve the norm of each column.\n  *\n  * \\sa class LeastSquareDiagonalPreconditioner, class ConjugateGradient\n  */\ntemplate <typename _Scalar>\nclass DiagonalPreconditioner\n{\n    typedef _Scalar Scalar;\n    typedef Matrix<Scalar,Dynamic,1> Vector;\n  public:\n    typedef typename Vector::StorageIndex StorageIndex;\n    enum {\n      ColsAtCompileTime = Dynamic,\n      MaxColsAtCompileTime = Dynamic\n    };\n\n    DiagonalPreconditioner() : m_isInitialized(false) {}\n\n    template<typename MatType>\n    explicit DiagonalPreconditioner(const MatType& mat) : m_invdiag(mat.cols())\n    {\n      compute(mat);\n    }\n\n    Index rows() const { return m_invdiag.size(); }\n    Index cols() const { return m_invdiag.size(); }\n    \n    template<typename MatType>\n    DiagonalPreconditioner& analyzePattern(const MatType& )\n    {\n      return *this;\n    }\n    \n    template<typename MatType>\n    DiagonalPreconditioner& factorize(const MatType& mat)\n    {\n      m_invdiag.resize(mat.cols());\n      for(int j=0; j<mat.outerSize(); ++j)\n      {\n        typename MatType::InnerIterator it(mat,j);\n        while(it && it.index()!=j) ++it;\n        if(it && it.index()==j && it.value()!=Scalar(0))\n          m_invdiag(j) = Scalar(1)/it.value();\n        else\n          m_invdiag(j) = Scalar(1);\n      }\n      m_isInitialized = true;\n      return *this;\n    }\n    \n    template<typename MatType>\n    DiagonalPreconditioner& compute(const MatType& mat)\n    {\n      return factorize(mat);\n    }\n\n    /** \\internal */\n    template<typename Rhs, typename Dest>\n    void _solve_impl(const Rhs& b, Dest& x) const\n    {\n      x = m_invdiag.array() * b.array() ;\n    }\n\n    template<typename Rhs> inline const Solve<DiagonalPreconditioner, Rhs>\n    solve(const MatrixBase<Rhs>& b) const\n    {\n      eigen_assert(m_isInitialized && \"DiagonalPreconditioner is not initialized.\");\n      eigen_assert(m_invdiag.size()==b.rows()\n                && \"DiagonalPreconditioner::solve(): invalid number of rows of the right hand side matrix b\");\n      return Solve<DiagonalPreconditioner, Rhs>(*this, b.derived());\n    }\n    \n    ComputationInfo info() { return Success; }\n\n  protected:\n    Vector m_invdiag;\n    bool m_isInitialized;\n};\n\n/** \\ingroup IterativeLinearSolvers_Module\n  * \\brief Jacobi preconditioner for LeastSquaresConjugateGradient\n  *\n  * This class allows to approximately solve for A' A x  = A' b problems assuming A' A is a diagonal matrix.\n  * In other words, this preconditioner neglects all off diagonal entries and, in Eigen's language, solves for:\n    \\code\n    (A.adjoint() * A).diagonal().asDiagonal() * x = b\n    \\endcode\n  *\n  * \\tparam _Scalar the type of the scalar.\n  *\n  * \\implsparsesolverconcept\n  *\n  * The diagonal entries are pre-inverted and stored into a dense vector.\n  * \n  * \\sa class LeastSquaresConjugateGradient, class DiagonalPreconditioner\n  */\ntemplate <typename _Scalar>\nclass LeastSquareDiagonalPreconditioner : public DiagonalPreconditioner<_Scalar>\n{\n    typedef _Scalar Scalar;\n    typedef typename NumTraits<Scalar>::Real RealScalar;\n    typedef DiagonalPreconditioner<_Scalar> Base;\n    using Base::m_invdiag;\n  public:\n\n    LeastSquareDiagonalPreconditioner() : Base() {}\n\n    template<typename MatType>\n    explicit LeastSquareDiagonalPreconditioner(const MatType& mat) : Base()\n    {\n      compute(mat);\n    }\n\n    template<typename MatType>\n    LeastSquareDiagonalPreconditioner& analyzePattern(const MatType& )\n    {\n      return *this;\n    }\n    \n    template<typename MatType>\n    LeastSquareDiagonalPreconditioner& factorize(const MatType& mat)\n    {\n      // Compute the inverse squared-norm of each column of mat\n      m_invdiag.resize(mat.cols());\n      if(MatType::IsRowMajor)\n      {\n        m_invdiag.setZero();\n        for(Index j=0; j<mat.outerSize(); ++j)\n        {\n          for(typename MatType::InnerIterator it(mat,j); it; ++it)\n            m_invdiag(it.index()) += numext::abs2(it.value());\n        }\n        for(Index j=0; j<mat.cols(); ++j)\n          if(numext::real(m_invdiag(j))>RealScalar(0))\n            m_invdiag(j) = RealScalar(1)/numext::real(m_invdiag(j));\n      }\n      else\n      {\n        for(Index j=0; j<mat.outerSize(); ++j)\n        {\n          RealScalar sum = mat.col(j).squaredNorm();\n          if(sum>RealScalar(0))\n            m_invdiag(j) = RealScalar(1)/sum;\n          else\n            m_invdiag(j) = RealScalar(1);\n        }\n      }\n      Base::m_isInitialized = true;\n      return *this;\n    }\n    \n    template<typename MatType>\n    LeastSquareDiagonalPreconditioner& compute(const MatType& mat)\n    {\n      return factorize(mat);\n    }\n    \n    ComputationInfo info() { return Success; }\n\n  protected:\n};\n\n/** \\ingroup IterativeLinearSolvers_Module\n  * \\brief A naive preconditioner which approximates any matrix as the identity matrix\n  *\n  * \\implsparsesolverconcept\n  *\n  * \\sa class DiagonalPreconditioner\n  */\nclass IdentityPreconditioner\n{\n  public:\n\n    IdentityPreconditioner() {}\n\n    template<typename MatrixType>\n    explicit IdentityPreconditioner(const MatrixType& ) {}\n    \n    template<typename MatrixType>\n    IdentityPreconditioner& analyzePattern(const MatrixType& ) { return *this; }\n    \n    template<typename MatrixType>\n    IdentityPreconditioner& factorize(const MatrixType& ) { return *this; }\n\n    template<typename MatrixType>\n    IdentityPreconditioner& compute(const MatrixType& ) { return *this; }\n    \n    template<typename Rhs>\n    inline const Rhs& solve(const Rhs& b) const { return b; }\n    \n    ComputationInfo info() { return Success; }\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_BASIC_PRECONDITIONERS_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/IterativeLinearSolvers/BiCGSTAB.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2011-2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2012 Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_BICGSTAB_H\n#define EIGEN_BICGSTAB_H\n\nnamespace Eigen { \n\nnamespace internal {\n\n/** \\internal Low-level bi conjugate gradient stabilized algorithm\n  * \\param mat The matrix A\n  * \\param rhs The right hand side vector b\n  * \\param x On input and initial solution, on output the computed solution.\n  * \\param precond A preconditioner being able to efficiently solve for an\n  *                approximation of Ax=b (regardless of b)\n  * \\param iters On input the max number of iteration, on output the number of performed iterations.\n  * \\param tol_error On input the tolerance error, on output an estimation of the relative error.\n  * \\return false in the case of numerical issue, for example a break down of BiCGSTAB. \n  */\ntemplate<typename MatrixType, typename Rhs, typename Dest, typename Preconditioner>\nbool bicgstab(const MatrixType& mat, const Rhs& rhs, Dest& x,\n              const Preconditioner& precond, Index& iters,\n              typename Dest::RealScalar& tol_error)\n{\n  using std::sqrt;\n  using std::abs;\n  typedef typename Dest::RealScalar RealScalar;\n  typedef typename Dest::Scalar Scalar;\n  typedef Matrix<Scalar,Dynamic,1> VectorType;\n  RealScalar tol = tol_error;\n  Index maxIters = iters;\n\n  Index n = mat.cols();\n  VectorType r  = rhs - mat * x;\n  VectorType r0 = r;\n  \n  RealScalar r0_sqnorm = r0.squaredNorm();\n  RealScalar rhs_sqnorm = rhs.squaredNorm();\n  if(rhs_sqnorm == 0)\n  {\n    x.setZero();\n    return true;\n  }\n  Scalar rho    = 1;\n  Scalar alpha  = 1;\n  Scalar w      = 1;\n  \n  VectorType v = VectorType::Zero(n), p = VectorType::Zero(n);\n  VectorType y(n),  z(n);\n  VectorType kt(n), ks(n);\n\n  VectorType s(n), t(n);\n\n  RealScalar tol2 = tol*tol*rhs_sqnorm;\n  RealScalar eps2 = NumTraits<Scalar>::epsilon()*NumTraits<Scalar>::epsilon();\n  Index i = 0;\n  Index restarts = 0;\n\n  while ( r.squaredNorm() > tol2 && i<maxIters )\n  {\n    Scalar rho_old = rho;\n\n    rho = r0.dot(r);\n    if (abs(rho) < eps2*r0_sqnorm)\n    {\n      // The new residual vector became too orthogonal to the arbitrarily chosen direction r0\n      // Let's restart with a new r0:\n      r  = rhs - mat * x;\n      r0 = r;\n      rho = r0_sqnorm = r.squaredNorm();\n      if(restarts++ == 0)\n        i = 0;\n    }\n    Scalar beta = (rho/rho_old) * (alpha / w);\n    p = r + beta * (p - w * v);\n    \n    y = precond.solve(p);\n    \n    v.noalias() = mat * y;\n\n    alpha = rho / r0.dot(v);\n    s = r - alpha * v;\n\n    z = precond.solve(s);\n    t.noalias() = mat * z;\n\n    RealScalar tmp = t.squaredNorm();\n    if(tmp>RealScalar(0))\n      w = t.dot(s) / tmp;\n    else\n      w = Scalar(0);\n    x += alpha * y + w * z;\n    r = s - w * t;\n    ++i;\n  }\n  tol_error = sqrt(r.squaredNorm()/rhs_sqnorm);\n  iters = i;\n  return true; \n}\n\n}\n\ntemplate< typename _MatrixType,\n          typename _Preconditioner = DiagonalPreconditioner<typename _MatrixType::Scalar> >\nclass BiCGSTAB;\n\nnamespace internal {\n\ntemplate< typename _MatrixType, typename _Preconditioner>\nstruct traits<BiCGSTAB<_MatrixType,_Preconditioner> >\n{\n  typedef _MatrixType MatrixType;\n  typedef _Preconditioner Preconditioner;\n};\n\n}\n\n/** \\ingroup IterativeLinearSolvers_Module\n  * \\brief A bi conjugate gradient stabilized solver for sparse square problems\n  *\n  * This class allows to solve for A.x = b sparse linear problems using a bi conjugate gradient\n  * stabilized algorithm. The vectors x and b can be either dense or sparse.\n  *\n  * \\tparam _MatrixType the type of the sparse matrix A, can be a dense or a sparse matrix.\n  * \\tparam _Preconditioner the type of the preconditioner. Default is DiagonalPreconditioner\n  *\n  * \\implsparsesolverconcept\n  *\n  * The maximal number of iterations and tolerance value can be controlled via the setMaxIterations()\n  * and setTolerance() methods. The defaults are the size of the problem for the maximal number of iterations\n  * and NumTraits<Scalar>::epsilon() for the tolerance.\n  * \n  * The tolerance corresponds to the relative residual error: |Ax-b|/|b|\n  * \n  * \\b Performance: when using sparse matrices, best performance is achied for a row-major sparse matrix format.\n  * Moreover, in this case multi-threading can be exploited if the user code is compiled with OpenMP enabled.\n  * See \\ref TopicMultiThreading for details.\n  * \n  * This class can be used as the direct solver classes. Here is a typical usage example:\n  * \\include BiCGSTAB_simple.cpp\n  * \n  * By default the iterations start with x=0 as an initial guess of the solution.\n  * One can control the start using the solveWithGuess() method.\n  * \n  * BiCGSTAB can also be used in a matrix-free context, see the following \\link MatrixfreeSolverExample example \\endlink.\n  *\n  * \\sa class SimplicialCholesky, DiagonalPreconditioner, IdentityPreconditioner\n  */\ntemplate< typename _MatrixType, typename _Preconditioner>\nclass BiCGSTAB : public IterativeSolverBase<BiCGSTAB<_MatrixType,_Preconditioner> >\n{\n  typedef IterativeSolverBase<BiCGSTAB> Base;\n  using Base::matrix;\n  using Base::m_error;\n  using Base::m_iterations;\n  using Base::m_info;\n  using Base::m_isInitialized;\npublic:\n  typedef _MatrixType MatrixType;\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename MatrixType::RealScalar RealScalar;\n  typedef _Preconditioner Preconditioner;\n\npublic:\n\n  /** Default constructor. */\n  BiCGSTAB() : Base() {}\n\n  /** Initialize the solver with matrix \\a A for further \\c Ax=b solving.\n    * \n    * This constructor is a shortcut for the default constructor followed\n    * by a call to compute().\n    * \n    * \\warning this class stores a reference to the matrix A as well as some\n    * precomputed values that depend on it. Therefore, if \\a A is changed\n    * this class becomes invalid. Call compute() to update it with the new\n    * matrix A, or modify a copy of A.\n    */\n  template<typename MatrixDerived>\n  explicit BiCGSTAB(const EigenBase<MatrixDerived>& A) : Base(A.derived()) {}\n\n  ~BiCGSTAB() {}\n\n  /** \\internal */\n  template<typename Rhs,typename Dest>\n  void _solve_vector_with_guess_impl(const Rhs& b, Dest& x) const\n  {    \n    m_iterations = Base::maxIterations();\n    m_error = Base::m_tolerance;\n    \n    bool ret = internal::bicgstab(matrix(), b, x, Base::m_preconditioner, m_iterations, m_error);\n\n    m_info = (!ret) ? NumericalIssue\n           : m_error <= Base::m_tolerance ? Success\n           : NoConvergence;\n  }\n\nprotected:\n\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_BICGSTAB_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2011-2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CONJUGATE_GRADIENT_H\n#define EIGEN_CONJUGATE_GRADIENT_H\n\nnamespace Eigen { \n\nnamespace internal {\n\n/** \\internal Low-level conjugate gradient algorithm\n  * \\param mat The matrix A\n  * \\param rhs The right hand side vector b\n  * \\param x On input and initial solution, on output the computed solution.\n  * \\param precond A preconditioner being able to efficiently solve for an\n  *                approximation of Ax=b (regardless of b)\n  * \\param iters On input the max number of iteration, on output the number of performed iterations.\n  * \\param tol_error On input the tolerance error, on output an estimation of the relative error.\n  */\ntemplate<typename MatrixType, typename Rhs, typename Dest, typename Preconditioner>\nEIGEN_DONT_INLINE\nvoid conjugate_gradient(const MatrixType& mat, const Rhs& rhs, Dest& x,\n                        const Preconditioner& precond, Index& iters,\n                        typename Dest::RealScalar& tol_error)\n{\n  using std::sqrt;\n  using std::abs;\n  typedef typename Dest::RealScalar RealScalar;\n  typedef typename Dest::Scalar Scalar;\n  typedef Matrix<Scalar,Dynamic,1> VectorType;\n  \n  RealScalar tol = tol_error;\n  Index maxIters = iters;\n  \n  Index n = mat.cols();\n\n  VectorType residual = rhs - mat * x; //initial residual\n\n  RealScalar rhsNorm2 = rhs.squaredNorm();\n  if(rhsNorm2 == 0) \n  {\n    x.setZero();\n    iters = 0;\n    tol_error = 0;\n    return;\n  }\n  const RealScalar considerAsZero = (std::numeric_limits<RealScalar>::min)();\n  RealScalar threshold = numext::maxi(RealScalar(tol*tol*rhsNorm2),considerAsZero);\n  RealScalar residualNorm2 = residual.squaredNorm();\n  if (residualNorm2 < threshold)\n  {\n    iters = 0;\n    tol_error = sqrt(residualNorm2 / rhsNorm2);\n    return;\n  }\n\n  VectorType p(n);\n  p = precond.solve(residual);      // initial search direction\n\n  VectorType z(n), tmp(n);\n  RealScalar absNew = numext::real(residual.dot(p));  // the square of the absolute value of r scaled by invM\n  Index i = 0;\n  while(i < maxIters)\n  {\n    tmp.noalias() = mat * p;                    // the bottleneck of the algorithm\n\n    Scalar alpha = absNew / p.dot(tmp);         // the amount we travel on dir\n    x += alpha * p;                             // update solution\n    residual -= alpha * tmp;                    // update residual\n    \n    residualNorm2 = residual.squaredNorm();\n    if(residualNorm2 < threshold)\n      break;\n    \n    z = precond.solve(residual);                // approximately solve for \"A z = residual\"\n\n    RealScalar absOld = absNew;\n    absNew = numext::real(residual.dot(z));     // update the absolute value of r\n    RealScalar beta = absNew / absOld;          // calculate the Gram-Schmidt value used to create the new search direction\n    p = z + beta * p;                           // update search direction\n    i++;\n  }\n  tol_error = sqrt(residualNorm2 / rhsNorm2);\n  iters = i;\n}\n\n}\n\ntemplate< typename _MatrixType, int _UpLo=Lower,\n          typename _Preconditioner = DiagonalPreconditioner<typename _MatrixType::Scalar> >\nclass ConjugateGradient;\n\nnamespace internal {\n\ntemplate< typename _MatrixType, int _UpLo, typename _Preconditioner>\nstruct traits<ConjugateGradient<_MatrixType,_UpLo,_Preconditioner> >\n{\n  typedef _MatrixType MatrixType;\n  typedef _Preconditioner Preconditioner;\n};\n\n}\n\n/** \\ingroup IterativeLinearSolvers_Module\n  * \\brief A conjugate gradient solver for sparse (or dense) self-adjoint problems\n  *\n  * This class allows to solve for A.x = b linear problems using an iterative conjugate gradient algorithm.\n  * The matrix A must be selfadjoint. The matrix A and the vectors x and b can be either dense or sparse.\n  *\n  * \\tparam _MatrixType the type of the matrix A, can be a dense or a sparse matrix.\n  * \\tparam _UpLo the triangular part that will be used for the computations. It can be Lower,\n  *               \\c Upper, or \\c Lower|Upper in which the full matrix entries will be considered.\n  *               Default is \\c Lower, best performance is \\c Lower|Upper.\n  * \\tparam _Preconditioner the type of the preconditioner. Default is DiagonalPreconditioner\n  *\n  * \\implsparsesolverconcept\n  *\n  * The maximal number of iterations and tolerance value can be controlled via the setMaxIterations()\n  * and setTolerance() methods. The defaults are the size of the problem for the maximal number of iterations\n  * and NumTraits<Scalar>::epsilon() for the tolerance.\n  * \n  * The tolerance corresponds to the relative residual error: |Ax-b|/|b|\n  * \n  * \\b Performance: Even though the default value of \\c _UpLo is \\c Lower, significantly higher performance is\n  * achieved when using a complete matrix and \\b Lower|Upper as the \\a _UpLo template parameter. Moreover, in this\n  * case multi-threading can be exploited if the user code is compiled with OpenMP enabled.\n  * See \\ref TopicMultiThreading for details.\n  * \n  * This class can be used as the direct solver classes. Here is a typical usage example:\n    \\code\n    int n = 10000;\n    VectorXd x(n), b(n);\n    SparseMatrix<double> A(n,n);\n    // fill A and b\n    ConjugateGradient<SparseMatrix<double>, Lower|Upper> cg;\n    cg.compute(A);\n    x = cg.solve(b);\n    std::cout << \"#iterations:     \" << cg.iterations() << std::endl;\n    std::cout << \"estimated error: \" << cg.error()      << std::endl;\n    // update b, and solve again\n    x = cg.solve(b);\n    \\endcode\n  * \n  * By default the iterations start with x=0 as an initial guess of the solution.\n  * One can control the start using the solveWithGuess() method.\n  * \n  * ConjugateGradient can also be used in a matrix-free context, see the following \\link MatrixfreeSolverExample example \\endlink.\n  *\n  * \\sa class LeastSquaresConjugateGradient, class SimplicialCholesky, DiagonalPreconditioner, IdentityPreconditioner\n  */\ntemplate< typename _MatrixType, int _UpLo, typename _Preconditioner>\nclass ConjugateGradient : public IterativeSolverBase<ConjugateGradient<_MatrixType,_UpLo,_Preconditioner> >\n{\n  typedef IterativeSolverBase<ConjugateGradient> Base;\n  using Base::matrix;\n  using Base::m_error;\n  using Base::m_iterations;\n  using Base::m_info;\n  using Base::m_isInitialized;\npublic:\n  typedef _MatrixType MatrixType;\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename MatrixType::RealScalar RealScalar;\n  typedef _Preconditioner Preconditioner;\n\n  enum {\n    UpLo = _UpLo\n  };\n\npublic:\n\n  /** Default constructor. */\n  ConjugateGradient() : Base() {}\n\n  /** Initialize the solver with matrix \\a A for further \\c Ax=b solving.\n    * \n    * This constructor is a shortcut for the default constructor followed\n    * by a call to compute().\n    * \n    * \\warning this class stores a reference to the matrix A as well as some\n    * precomputed values that depend on it. Therefore, if \\a A is changed\n    * this class becomes invalid. Call compute() to update it with the new\n    * matrix A, or modify a copy of A.\n    */\n  template<typename MatrixDerived>\n  explicit ConjugateGradient(const EigenBase<MatrixDerived>& A) : Base(A.derived()) {}\n\n  ~ConjugateGradient() {}\n\n  /** \\internal */\n  template<typename Rhs,typename Dest>\n  void _solve_vector_with_guess_impl(const Rhs& b, Dest& x) const\n  {\n    typedef typename Base::MatrixWrapper MatrixWrapper;\n    typedef typename Base::ActualMatrixType ActualMatrixType;\n    enum {\n      TransposeInput  =   (!MatrixWrapper::MatrixFree)\n                      &&  (UpLo==(Lower|Upper))\n                      &&  (!MatrixType::IsRowMajor)\n                      &&  (!NumTraits<Scalar>::IsComplex)\n    };\n    typedef typename internal::conditional<TransposeInput,Transpose<const ActualMatrixType>, ActualMatrixType const&>::type RowMajorWrapper;\n    EIGEN_STATIC_ASSERT(EIGEN_IMPLIES(MatrixWrapper::MatrixFree,UpLo==(Lower|Upper)),MATRIX_FREE_CONJUGATE_GRADIENT_IS_COMPATIBLE_WITH_UPPER_UNION_LOWER_MODE_ONLY);\n    typedef typename internal::conditional<UpLo==(Lower|Upper),\n                                           RowMajorWrapper,\n                                           typename MatrixWrapper::template ConstSelfAdjointViewReturnType<UpLo>::Type\n                                          >::type SelfAdjointWrapper;\n\n    m_iterations = Base::maxIterations();\n    m_error = Base::m_tolerance;\n\n    RowMajorWrapper row_mat(matrix());\n    internal::conjugate_gradient(SelfAdjointWrapper(row_mat), b, x, Base::m_preconditioner, m_iterations, m_error);\n    m_info = m_error <= Base::m_tolerance ? Success : NoConvergence;\n  }\n\nprotected:\n\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_CONJUGATE_GRADIENT_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/IterativeLinearSolvers/IncompleteCholesky.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>\n// Copyright (C) 2015 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_INCOMPLETE_CHOlESKY_H\n#define EIGEN_INCOMPLETE_CHOlESKY_H\n\n#include <vector>\n#include <list>\n\nnamespace Eigen {  \n/** \n  * \\brief Modified Incomplete Cholesky with dual threshold\n  *\n  * References : C-J. Lin and J. J. Moré, Incomplete Cholesky Factorizations with\n  *              Limited memory, SIAM J. Sci. Comput.  21(1), pp. 24-45, 1999\n  *\n  * \\tparam Scalar the scalar type of the input matrices\n  * \\tparam _UpLo The triangular part that will be used for the computations. It can be Lower\n    *               or Upper. Default is Lower.\n  * \\tparam _OrderingType The ordering method to use, either AMDOrdering<> or NaturalOrdering<>. Default is AMDOrdering<int>,\n  *                       unless EIGEN_MPL2_ONLY is defined, in which case the default is NaturalOrdering<int>.\n  *\n  * \\implsparsesolverconcept\n  *\n  * It performs the following incomplete factorization: \\f$ S P A P' S \\approx L L' \\f$\n  * where L is a lower triangular factor, S is a diagonal scaling matrix, and P is a\n  * fill-in reducing permutation as computed by the ordering method.\n  *\n  * \\b Shifting \\b strategy: Let \\f$ B = S P A P' S \\f$  be the scaled matrix on which the factorization is carried out,\n  * and \\f$ \\beta \\f$ be the minimum value of the diagonal. If \\f$ \\beta > 0 \\f$ then, the factorization is directly performed\n  * on the matrix B. Otherwise, the factorization is performed on the shifted matrix \\f$ B + (\\sigma+|\\beta| I \\f$ where\n  * \\f$ \\sigma \\f$ is the initial shift value as returned and set by setInitialShift() method. The default value is \\f$ \\sigma = 10^{-3} \\f$.\n  * If the factorization fails, then the shift in doubled until it succeed or a maximum of ten attempts. If it still fails, as returned by\n  * the info() method, then you can either increase the initial shift, or better use another preconditioning technique.\n  *\n  */\ntemplate <typename Scalar, int _UpLo = Lower, typename _OrderingType = AMDOrdering<int> >\nclass IncompleteCholesky : public SparseSolverBase<IncompleteCholesky<Scalar,_UpLo,_OrderingType> >\n{\n  protected:\n    typedef SparseSolverBase<IncompleteCholesky<Scalar,_UpLo,_OrderingType> > Base;\n    using Base::m_isInitialized;\n  public:\n    typedef typename NumTraits<Scalar>::Real RealScalar; \n    typedef _OrderingType OrderingType;\n    typedef typename OrderingType::PermutationType PermutationType;\n    typedef typename PermutationType::StorageIndex StorageIndex; \n    typedef SparseMatrix<Scalar,ColMajor,StorageIndex> FactorType;\n    typedef Matrix<Scalar,Dynamic,1> VectorSx;\n    typedef Matrix<RealScalar,Dynamic,1> VectorRx;\n    typedef Matrix<StorageIndex,Dynamic, 1> VectorIx;\n    typedef std::vector<std::list<StorageIndex> > VectorList; \n    enum { UpLo = _UpLo };\n    enum {\n      ColsAtCompileTime = Dynamic,\n      MaxColsAtCompileTime = Dynamic\n    };\n  public:\n\n    /** Default constructor leaving the object in a partly non-initialized stage.\n      *\n      * You must call compute() or the pair analyzePattern()/factorize() to make it valid.\n      *\n      * \\sa IncompleteCholesky(const MatrixType&)\n      */\n    IncompleteCholesky() : m_initialShift(1e-3),m_analysisIsOk(false),m_factorizationIsOk(false) {}\n    \n    /** Constructor computing the incomplete factorization for the given matrix \\a matrix.\n      */\n    template<typename MatrixType>\n    IncompleteCholesky(const MatrixType& matrix) : m_initialShift(1e-3),m_analysisIsOk(false),m_factorizationIsOk(false)\n    {\n      compute(matrix);\n    }\n    \n    /** \\returns number of rows of the factored matrix */\n    Index rows() const { return m_L.rows(); }\n    \n    /** \\returns number of columns of the factored matrix */\n    Index cols() const { return m_L.cols(); }\n    \n\n    /** \\brief Reports whether previous computation was successful.\n      *\n      * It triggers an assertion if \\c *this has not been initialized through the respective constructor,\n      * or a call to compute() or analyzePattern().\n      *\n      * \\returns \\c Success if computation was successful,\n      *          \\c NumericalIssue if the matrix appears to be negative.\n      */\n    ComputationInfo info() const\n    {\n      eigen_assert(m_isInitialized && \"IncompleteCholesky is not initialized.\");\n      return m_info;\n    }\n    \n    /** \\brief Set the initial shift parameter \\f$ \\sigma \\f$.\n      */\n    void setInitialShift(RealScalar shift) { m_initialShift = shift; }\n    \n    /** \\brief Computes the fill reducing permutation vector using the sparsity pattern of \\a mat\n      */\n    template<typename MatrixType>\n    void analyzePattern(const MatrixType& mat)\n    {\n      OrderingType ord; \n      PermutationType pinv;\n      ord(mat.template selfadjointView<UpLo>(), pinv); \n      if(pinv.size()>0) m_perm = pinv.inverse();\n      else              m_perm.resize(0);\n      m_L.resize(mat.rows(), mat.cols());\n      m_analysisIsOk = true;\n      m_isInitialized = true;\n      m_info = Success;\n    }\n    \n    /** \\brief Performs the numerical factorization of the input matrix \\a mat\n      *\n      * The method analyzePattern() or compute() must have been called beforehand\n      * with a matrix having the same pattern.\n      *\n      * \\sa compute(), analyzePattern()\n      */\n    template<typename MatrixType>\n    void factorize(const MatrixType& mat);\n    \n    /** Computes or re-computes the incomplete Cholesky factorization of the input matrix \\a mat\n      *\n      * It is a shortcut for a sequential call to the analyzePattern() and factorize() methods.\n      *\n      * \\sa analyzePattern(), factorize()\n      */\n    template<typename MatrixType>\n    void compute(const MatrixType& mat)\n    {\n      analyzePattern(mat);\n      factorize(mat);\n    }\n    \n    // internal\n    template<typename Rhs, typename Dest>\n    void _solve_impl(const Rhs& b, Dest& x) const\n    {\n      eigen_assert(m_factorizationIsOk && \"factorize() should be called first\");\n      if (m_perm.rows() == b.rows())  x = m_perm * b;\n      else                            x = b;\n      x = m_scale.asDiagonal() * x;\n      x = m_L.template triangularView<Lower>().solve(x);\n      x = m_L.adjoint().template triangularView<Upper>().solve(x);\n      x = m_scale.asDiagonal() * x;\n      if (m_perm.rows() == b.rows())\n        x = m_perm.inverse() * x;\n    }\n\n    /** \\returns the sparse lower triangular factor L */\n    const FactorType& matrixL() const { eigen_assert(\"m_factorizationIsOk\"); return m_L; }\n\n    /** \\returns a vector representing the scaling factor S */\n    const VectorRx& scalingS() const { eigen_assert(\"m_factorizationIsOk\"); return m_scale; }\n\n    /** \\returns the fill-in reducing permutation P (can be empty for a natural ordering) */\n    const PermutationType& permutationP() const { eigen_assert(\"m_analysisIsOk\"); return m_perm; }\n\n  protected:\n    FactorType m_L;              // The lower part stored in CSC\n    VectorRx m_scale;            // The vector for scaling the matrix \n    RealScalar m_initialShift;   // The initial shift parameter\n    bool m_analysisIsOk; \n    bool m_factorizationIsOk; \n    ComputationInfo m_info;\n    PermutationType m_perm; \n\n  private:\n    inline void updateList(Ref<const VectorIx> colPtr, Ref<VectorIx> rowIdx, Ref<VectorSx> vals, const Index& col, const Index& jk, VectorIx& firstElt, VectorList& listCol); \n}; \n\n// Based on the following paper:\n//   C-J. Lin and J. J. Moré, Incomplete Cholesky Factorizations with\n//   Limited memory, SIAM J. Sci. Comput.  21(1), pp. 24-45, 1999\n//   http://ftp.mcs.anl.gov/pub/tech_reports/reports/P682.pdf\ntemplate<typename Scalar, int _UpLo, typename OrderingType>\ntemplate<typename _MatrixType>\nvoid IncompleteCholesky<Scalar,_UpLo, OrderingType>::factorize(const _MatrixType& mat)\n{\n  using std::sqrt;\n  eigen_assert(m_analysisIsOk && \"analyzePattern() should be called first\"); \n    \n  // Dropping strategy : Keep only the p largest elements per column, where p is the number of elements in the column of the original matrix. Other strategies will be added\n  \n  // Apply the fill-reducing permutation computed in analyzePattern()\n  if (m_perm.rows() == mat.rows() ) // To detect the null permutation\n  {\n    // The temporary is needed to make sure that the diagonal entry is properly sorted\n    FactorType tmp(mat.rows(), mat.cols());\n    tmp = mat.template selfadjointView<_UpLo>().twistedBy(m_perm);\n    m_L.template selfadjointView<Lower>() = tmp.template selfadjointView<Lower>();\n  }\n  else\n  {\n    m_L.template selfadjointView<Lower>() = mat.template selfadjointView<_UpLo>();\n  }\n  \n  Index n = m_L.cols(); \n  Index nnz = m_L.nonZeros();\n  Map<VectorSx> vals(m_L.valuePtr(), nnz);         //values\n  Map<VectorIx> rowIdx(m_L.innerIndexPtr(), nnz);  //Row indices\n  Map<VectorIx> colPtr( m_L.outerIndexPtr(), n+1); // Pointer to the beginning of each row\n  VectorIx firstElt(n-1); // for each j, points to the next entry in vals that will be used in the factorization\n  VectorList listCol(n);  // listCol(j) is a linked list of columns to update column j\n  VectorSx col_vals(n);   // Store a  nonzero values in each column\n  VectorIx col_irow(n);   // Row indices of nonzero elements in each column\n  VectorIx col_pattern(n);\n  col_pattern.fill(-1);\n  StorageIndex col_nnz;\n  \n  \n  // Computes the scaling factors \n  m_scale.resize(n);\n  m_scale.setZero();\n  for (Index j = 0; j < n; j++)\n    for (Index k = colPtr[j]; k < colPtr[j+1]; k++)\n    {\n      m_scale(j) += numext::abs2(vals(k));\n      if(rowIdx[k]!=j)\n        m_scale(rowIdx[k]) += numext::abs2(vals(k));\n    }\n  \n  m_scale = m_scale.cwiseSqrt().cwiseSqrt();\n\n  for (Index j = 0; j < n; ++j)\n    if(m_scale(j)>(std::numeric_limits<RealScalar>::min)())\n      m_scale(j) = RealScalar(1)/m_scale(j);\n    else\n      m_scale(j) = 1;\n\n  // TODO disable scaling if not needed, i.e., if it is roughly uniform? (this will make solve() faster)\n  \n  // Scale and compute the shift for the matrix \n  RealScalar mindiag = NumTraits<RealScalar>::highest();\n  for (Index j = 0; j < n; j++)\n  {\n    for (Index k = colPtr[j]; k < colPtr[j+1]; k++)\n      vals[k] *= (m_scale(j)*m_scale(rowIdx[k]));\n    eigen_internal_assert(rowIdx[colPtr[j]]==j && \"IncompleteCholesky: only the lower triangular part must be stored\");\n    mindiag = numext::mini(numext::real(vals[colPtr[j]]), mindiag);\n  }\n\n  FactorType L_save = m_L;\n  \n  RealScalar shift = 0;\n  if(mindiag <= RealScalar(0.))\n    shift = m_initialShift - mindiag;\n\n  m_info = NumericalIssue;\n\n  // Try to perform the incomplete factorization using the current shift\n  int iter = 0;\n  do\n  {\n    // Apply the shift to the diagonal elements of the matrix\n    for (Index j = 0; j < n; j++)\n      vals[colPtr[j]] += shift;\n\n    // jki version of the Cholesky factorization\n    Index j=0;\n    for (; j < n; ++j)\n    {\n      // Left-looking factorization of the j-th column\n      // First, load the j-th column into col_vals\n      Scalar diag = vals[colPtr[j]];  // It is assumed that only the lower part is stored\n      col_nnz = 0;\n      for (Index i = colPtr[j] + 1; i < colPtr[j+1]; i++)\n      {\n        StorageIndex l = rowIdx[i];\n        col_vals(col_nnz) = vals[i];\n        col_irow(col_nnz) = l;\n        col_pattern(l) = col_nnz;\n        col_nnz++;\n      }\n      {\n        typename std::list<StorageIndex>::iterator k;\n        // Browse all previous columns that will update column j\n        for(k = listCol[j].begin(); k != listCol[j].end(); k++)\n        {\n          Index jk = firstElt(*k); // First element to use in the column\n          eigen_internal_assert(rowIdx[jk]==j);\n          Scalar v_j_jk = numext::conj(vals[jk]);\n\n          jk += 1;\n          for (Index i = jk; i < colPtr[*k+1]; i++)\n          {\n            StorageIndex l = rowIdx[i];\n            if(col_pattern[l]<0)\n            {\n              col_vals(col_nnz) = vals[i] * v_j_jk;\n              col_irow[col_nnz] = l;\n              col_pattern(l) = col_nnz;\n              col_nnz++;\n            }\n            else\n              col_vals(col_pattern[l]) -= vals[i] * v_j_jk;\n          }\n          updateList(colPtr,rowIdx,vals, *k, jk, firstElt, listCol);\n        }\n      }\n\n      // Scale the current column\n      if(numext::real(diag) <= 0)\n      {\n        if(++iter>=10)\n          return;\n\n        // increase shift\n        shift = numext::maxi(m_initialShift,RealScalar(2)*shift);\n        // restore m_L, col_pattern, and listCol\n        vals = Map<const VectorSx>(L_save.valuePtr(), nnz);\n        rowIdx = Map<const VectorIx>(L_save.innerIndexPtr(), nnz);\n        colPtr = Map<const VectorIx>(L_save.outerIndexPtr(), n+1);\n        col_pattern.fill(-1);\n        for(Index i=0; i<n; ++i)\n          listCol[i].clear();\n\n        break;\n      }\n\n      RealScalar rdiag = sqrt(numext::real(diag));\n      vals[colPtr[j]] = rdiag;\n      for (Index k = 0; k<col_nnz; ++k)\n      {\n        Index i = col_irow[k];\n        //Scale\n        col_vals(k) /= rdiag;\n        //Update the remaining diagonals with col_vals\n        vals[colPtr[i]] -= numext::abs2(col_vals(k));\n      }\n      // Select the largest p elements\n      // p is the original number of elements in the column (without the diagonal)\n      Index p = colPtr[j+1] - colPtr[j] - 1 ;\n      Ref<VectorSx> cvals = col_vals.head(col_nnz);\n      Ref<VectorIx> cirow = col_irow.head(col_nnz);\n      internal::QuickSplit(cvals,cirow, p);\n      // Insert the largest p elements in the matrix\n      Index cpt = 0;\n      for (Index i = colPtr[j]+1; i < colPtr[j+1]; i++)\n      {\n        vals[i] = col_vals(cpt);\n        rowIdx[i] = col_irow(cpt);\n        // restore col_pattern:\n        col_pattern(col_irow(cpt)) = -1;\n        cpt++;\n      }\n      // Get the first smallest row index and put it after the diagonal element\n      Index jk = colPtr(j)+1;\n      updateList(colPtr,rowIdx,vals,j,jk,firstElt,listCol);\n    }\n\n    if(j==n)\n    {\n      m_factorizationIsOk = true;\n      m_info = Success;\n    }\n  } while(m_info!=Success);\n}\n\ntemplate<typename Scalar, int _UpLo, typename OrderingType>\ninline void IncompleteCholesky<Scalar,_UpLo, OrderingType>::updateList(Ref<const VectorIx> colPtr, Ref<VectorIx> rowIdx, Ref<VectorSx> vals, const Index& col, const Index& jk, VectorIx& firstElt, VectorList& listCol)\n{\n  if (jk < colPtr(col+1) )\n  {\n    Index p = colPtr(col+1) - jk;\n    Index minpos; \n    rowIdx.segment(jk,p).minCoeff(&minpos);\n    minpos += jk;\n    if (rowIdx(minpos) != rowIdx(jk))\n    {\n      //Swap\n      std::swap(rowIdx(jk),rowIdx(minpos));\n      std::swap(vals(jk),vals(minpos));\n    }\n    firstElt(col) = internal::convert_index<StorageIndex,Index>(jk);\n    listCol[rowIdx(jk)].push_back(internal::convert_index<StorageIndex,Index>(col));\n  }\n}\n\n} // end namespace Eigen \n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/IterativeLinearSolvers/IncompleteLUT.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>\n// Copyright (C) 2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_INCOMPLETE_LUT_H\n#define EIGEN_INCOMPLETE_LUT_H\n\n\nnamespace Eigen { \n\nnamespace internal {\n    \n/** \\internal\n  * Compute a quick-sort split of a vector \n  * On output, the vector row is permuted such that its elements satisfy\n  * abs(row(i)) >= abs(row(ncut)) if i<ncut\n  * abs(row(i)) <= abs(row(ncut)) if i>ncut \n  * \\param row The vector of values\n  * \\param ind The array of index for the elements in @p row\n  * \\param ncut  The number of largest elements to keep\n  **/ \ntemplate <typename VectorV, typename VectorI>\nIndex QuickSplit(VectorV &row, VectorI &ind, Index ncut)\n{\n  typedef typename VectorV::RealScalar RealScalar;\n  using std::swap;\n  using std::abs;\n  Index mid;\n  Index n = row.size(); /* length of the vector */\n  Index first, last ;\n  \n  ncut--; /* to fit the zero-based indices */\n  first = 0; \n  last = n-1; \n  if (ncut < first || ncut > last ) return 0;\n  \n  do {\n    mid = first; \n    RealScalar abskey = abs(row(mid)); \n    for (Index j = first + 1; j <= last; j++) {\n      if ( abs(row(j)) > abskey) {\n        ++mid;\n        swap(row(mid), row(j));\n        swap(ind(mid), ind(j));\n      }\n    }\n    /* Interchange for the pivot element */\n    swap(row(mid), row(first));\n    swap(ind(mid), ind(first));\n    \n    if (mid > ncut) last = mid - 1;\n    else if (mid < ncut ) first = mid + 1; \n  } while (mid != ncut );\n  \n  return 0; /* mid is equal to ncut */ \n}\n\n}// end namespace internal\n\n/** \\ingroup IterativeLinearSolvers_Module\n  * \\class IncompleteLUT\n  * \\brief Incomplete LU factorization with dual-threshold strategy\n  *\n  * \\implsparsesolverconcept\n  *\n  * During the numerical factorization, two dropping rules are used :\n  *  1) any element whose magnitude is less than some tolerance is dropped.\n  *    This tolerance is obtained by multiplying the input tolerance @p droptol \n  *    by the average magnitude of all the original elements in the current row.\n  *  2) After the elimination of the row, only the @p fill largest elements in \n  *    the L part and the @p fill largest elements in the U part are kept \n  *    (in addition to the diagonal element ). Note that @p fill is computed from \n  *    the input parameter @p fillfactor which is used the ratio to control the fill_in \n  *    relatively to the initial number of nonzero elements.\n  * \n  * The two extreme cases are when @p droptol=0 (to keep all the @p fill*2 largest elements)\n  * and when @p fill=n/2 with @p droptol being different to zero. \n  * \n  * References : Yousef Saad, ILUT: A dual threshold incomplete LU factorization, \n  *              Numerical Linear Algebra with Applications, 1(4), pp 387-402, 1994.\n  * \n  * NOTE : The following implementation is derived from the ILUT implementation\n  * in the SPARSKIT package, Copyright (C) 2005, the Regents of the University of Minnesota \n  *  released under the terms of the GNU LGPL: \n  *    http://www-users.cs.umn.edu/~saad/software/SPARSKIT/README\n  * However, Yousef Saad gave us permission to relicense his ILUT code to MPL2.\n  * See the Eigen mailing list archive, thread: ILUT, date: July 8, 2012:\n  *   http://listengine.tuxfamily.org/lists.tuxfamily.org/eigen/2012/07/msg00064.html\n  * alternatively, on GMANE:\n  *   http://comments.gmane.org/gmane.comp.lib.eigen/3302\n  */\ntemplate <typename _Scalar, typename _StorageIndex = int>\nclass IncompleteLUT : public SparseSolverBase<IncompleteLUT<_Scalar, _StorageIndex> >\n{\n  protected:\n    typedef SparseSolverBase<IncompleteLUT> Base;\n    using Base::m_isInitialized;\n  public:\n    typedef _Scalar Scalar;\n    typedef _StorageIndex StorageIndex;\n    typedef typename NumTraits<Scalar>::Real RealScalar;\n    typedef Matrix<Scalar,Dynamic,1> Vector;\n    typedef Matrix<StorageIndex,Dynamic,1> VectorI;\n    typedef SparseMatrix<Scalar,RowMajor,StorageIndex> FactorType;\n\n    enum {\n      ColsAtCompileTime = Dynamic,\n      MaxColsAtCompileTime = Dynamic\n    };\n\n  public:\n    \n    IncompleteLUT()\n      : m_droptol(NumTraits<Scalar>::dummy_precision()), m_fillfactor(10),\n        m_analysisIsOk(false), m_factorizationIsOk(false)\n    {}\n    \n    template<typename MatrixType>\n    explicit IncompleteLUT(const MatrixType& mat, const RealScalar& droptol=NumTraits<Scalar>::dummy_precision(), int fillfactor = 10)\n      : m_droptol(droptol),m_fillfactor(fillfactor),\n        m_analysisIsOk(false),m_factorizationIsOk(false)\n    {\n      eigen_assert(fillfactor != 0);\n      compute(mat); \n    }\n    \n    Index rows() const { return m_lu.rows(); }\n    \n    Index cols() const { return m_lu.cols(); }\n\n    /** \\brief Reports whether previous computation was successful.\n      *\n      * \\returns \\c Success if computation was successful,\n      *          \\c NumericalIssue if the matrix.appears to be negative.\n      */\n    ComputationInfo info() const\n    {\n      eigen_assert(m_isInitialized && \"IncompleteLUT is not initialized.\");\n      return m_info;\n    }\n    \n    template<typename MatrixType>\n    void analyzePattern(const MatrixType& amat);\n    \n    template<typename MatrixType>\n    void factorize(const MatrixType& amat);\n    \n    /**\n      * Compute an incomplete LU factorization with dual threshold on the matrix mat\n      * No pivoting is done in this version\n      * \n      **/\n    template<typename MatrixType>\n    IncompleteLUT& compute(const MatrixType& amat)\n    {\n      analyzePattern(amat); \n      factorize(amat);\n      return *this;\n    }\n\n    void setDroptol(const RealScalar& droptol); \n    void setFillfactor(int fillfactor); \n    \n    template<typename Rhs, typename Dest>\n    void _solve_impl(const Rhs& b, Dest& x) const\n    {\n      x = m_Pinv * b;\n      x = m_lu.template triangularView<UnitLower>().solve(x);\n      x = m_lu.template triangularView<Upper>().solve(x);\n      x = m_P * x; \n    }\n\nprotected:\n\n    /** keeps off-diagonal entries; drops diagonal entries */\n    struct keep_diag {\n      inline bool operator() (const Index& row, const Index& col, const Scalar&) const\n      {\n        return row!=col;\n      }\n    };\n\nprotected:\n\n    FactorType m_lu;\n    RealScalar m_droptol;\n    int m_fillfactor;\n    bool m_analysisIsOk;\n    bool m_factorizationIsOk;\n    ComputationInfo m_info;\n    PermutationMatrix<Dynamic,Dynamic,StorageIndex> m_P;     // Fill-reducing permutation\n    PermutationMatrix<Dynamic,Dynamic,StorageIndex> m_Pinv;  // Inverse permutation\n};\n\n/**\n * Set control parameter droptol\n *  \\param droptol   Drop any element whose magnitude is less than this tolerance \n **/ \ntemplate<typename Scalar, typename StorageIndex>\nvoid IncompleteLUT<Scalar,StorageIndex>::setDroptol(const RealScalar& droptol)\n{\n  this->m_droptol = droptol;   \n}\n\n/**\n * Set control parameter fillfactor\n * \\param fillfactor  This is used to compute the  number @p fill_in of largest elements to keep on each row. \n **/ \ntemplate<typename Scalar, typename StorageIndex>\nvoid IncompleteLUT<Scalar,StorageIndex>::setFillfactor(int fillfactor)\n{\n  this->m_fillfactor = fillfactor;   \n}\n\ntemplate <typename Scalar, typename StorageIndex>\ntemplate<typename _MatrixType>\nvoid IncompleteLUT<Scalar,StorageIndex>::analyzePattern(const _MatrixType& amat)\n{\n  // Compute the Fill-reducing permutation\n  // Since ILUT does not perform any numerical pivoting,\n  // it is highly preferable to keep the diagonal through symmetric permutations.\n  // To this end, let's symmetrize the pattern and perform AMD on it.\n  SparseMatrix<Scalar,ColMajor, StorageIndex> mat1 = amat;\n  SparseMatrix<Scalar,ColMajor, StorageIndex> mat2 = amat.transpose();\n  // FIXME for a matrix with nearly symmetric pattern, mat2+mat1 is the appropriate choice.\n  //       on the other hand for a really non-symmetric pattern, mat2*mat1 should be preferred...\n  SparseMatrix<Scalar,ColMajor, StorageIndex> AtA = mat2 + mat1;\n  AMDOrdering<StorageIndex> ordering;\n  ordering(AtA,m_P);\n  m_Pinv  = m_P.inverse(); // cache the inverse permutation\n  m_analysisIsOk = true;\n  m_factorizationIsOk = false;\n  m_isInitialized = true;\n}\n\ntemplate <typename Scalar, typename StorageIndex>\ntemplate<typename _MatrixType>\nvoid IncompleteLUT<Scalar,StorageIndex>::factorize(const _MatrixType& amat)\n{\n  using std::sqrt;\n  using std::swap;\n  using std::abs;\n  using internal::convert_index;\n\n  eigen_assert((amat.rows() == amat.cols()) && \"The factorization should be done on a square matrix\");\n  Index n = amat.cols();  // Size of the matrix\n  m_lu.resize(n,n);\n  // Declare Working vectors and variables\n  Vector u(n) ;     // real values of the row -- maximum size is n --\n  VectorI ju(n);   // column position of the values in u -- maximum size  is n\n  VectorI jr(n);   // Indicate the position of the nonzero elements in the vector u -- A zero location is indicated by -1\n\n  // Apply the fill-reducing permutation\n  eigen_assert(m_analysisIsOk && \"You must first call analyzePattern()\");\n  SparseMatrix<Scalar,RowMajor, StorageIndex> mat;\n  mat = amat.twistedBy(m_Pinv);\n\n  // Initialization\n  jr.fill(-1);\n  ju.fill(0);\n  u.fill(0);\n\n  // number of largest elements to keep in each row:\n  Index fill_in = (amat.nonZeros()*m_fillfactor)/n + 1;\n  if (fill_in > n) fill_in = n;\n\n  // number of largest nonzero elements to keep in the L and the U part of the current row:\n  Index nnzL = fill_in/2;\n  Index nnzU = nnzL;\n  m_lu.reserve(n * (nnzL + nnzU + 1));\n\n  // global loop over the rows of the sparse matrix\n  for (Index ii = 0; ii < n; ii++)\n  {\n    // 1 - copy the lower and the upper part of the row i of mat in the working vector u\n\n    Index sizeu = 1; // number of nonzero elements in the upper part of the current row\n    Index sizel = 0; // number of nonzero elements in the lower part of the current row\n    ju(ii)    = convert_index<StorageIndex>(ii);\n    u(ii)     = 0;\n    jr(ii)    = convert_index<StorageIndex>(ii);\n    RealScalar rownorm = 0;\n\n    typename FactorType::InnerIterator j_it(mat, ii); // Iterate through the current row ii\n    for (; j_it; ++j_it)\n    {\n      Index k = j_it.index();\n      if (k < ii)\n      {\n        // copy the lower part\n        ju(sizel) = convert_index<StorageIndex>(k);\n        u(sizel) = j_it.value();\n        jr(k) = convert_index<StorageIndex>(sizel);\n        ++sizel;\n      }\n      else if (k == ii)\n      {\n        u(ii) = j_it.value();\n      }\n      else\n      {\n        // copy the upper part\n        Index jpos = ii + sizeu;\n        ju(jpos) = convert_index<StorageIndex>(k);\n        u(jpos) = j_it.value();\n        jr(k) = convert_index<StorageIndex>(jpos);\n        ++sizeu;\n      }\n      rownorm += numext::abs2(j_it.value());\n    }\n\n    // 2 - detect possible zero row\n    if(rownorm==0)\n    {\n      m_info = NumericalIssue;\n      return;\n    }\n    // Take the 2-norm of the current row as a relative tolerance\n    rownorm = sqrt(rownorm);\n\n    // 3 - eliminate the previous nonzero rows\n    Index jj = 0;\n    Index len = 0;\n    while (jj < sizel)\n    {\n      // In order to eliminate in the correct order,\n      // we must select first the smallest column index among  ju(jj:sizel)\n      Index k;\n      Index minrow = ju.segment(jj,sizel-jj).minCoeff(&k); // k is relative to the segment\n      k += jj;\n      if (minrow != ju(jj))\n      {\n        // swap the two locations\n        Index j = ju(jj);\n        swap(ju(jj), ju(k));\n        jr(minrow) = convert_index<StorageIndex>(jj);\n        jr(j) = convert_index<StorageIndex>(k);\n        swap(u(jj), u(k));\n      }\n      // Reset this location\n      jr(minrow) = -1;\n\n      // Start elimination\n      typename FactorType::InnerIterator ki_it(m_lu, minrow);\n      while (ki_it && ki_it.index() < minrow) ++ki_it;\n      eigen_internal_assert(ki_it && ki_it.col()==minrow);\n      Scalar fact = u(jj) / ki_it.value();\n\n      // drop too small elements\n      if(abs(fact) <= m_droptol)\n      {\n        jj++;\n        continue;\n      }\n\n      // linear combination of the current row ii and the row minrow\n      ++ki_it;\n      for (; ki_it; ++ki_it)\n      {\n        Scalar prod = fact * ki_it.value();\n        Index j     = ki_it.index();\n        Index jpos  = jr(j);\n        if (jpos == -1) // fill-in element\n        {\n          Index newpos;\n          if (j >= ii) // dealing with the upper part\n          {\n            newpos = ii + sizeu;\n            sizeu++;\n            eigen_internal_assert(sizeu<=n);\n          }\n          else // dealing with the lower part\n          {\n            newpos = sizel;\n            sizel++;\n            eigen_internal_assert(sizel<=ii);\n          }\n          ju(newpos) = convert_index<StorageIndex>(j);\n          u(newpos) = -prod;\n          jr(j) = convert_index<StorageIndex>(newpos);\n        }\n        else\n          u(jpos) -= prod;\n      }\n      // store the pivot element\n      u(len)  = fact;\n      ju(len) = convert_index<StorageIndex>(minrow);\n      ++len;\n\n      jj++;\n    } // end of the elimination on the row ii\n\n    // reset the upper part of the pointer jr to zero\n    for(Index k = 0; k <sizeu; k++) jr(ju(ii+k)) = -1;\n\n    // 4 - partially sort and insert the elements in the m_lu matrix\n\n    // sort the L-part of the row\n    sizel = len;\n    len = (std::min)(sizel, nnzL);\n    typename Vector::SegmentReturnType ul(u.segment(0, sizel));\n    typename VectorI::SegmentReturnType jul(ju.segment(0, sizel));\n    internal::QuickSplit(ul, jul, len);\n\n    // store the largest m_fill elements of the L part\n    m_lu.startVec(ii);\n    for(Index k = 0; k < len; k++)\n      m_lu.insertBackByOuterInnerUnordered(ii,ju(k)) = u(k);\n\n    // store the diagonal element\n    // apply a shifting rule to avoid zero pivots (we are doing an incomplete factorization)\n    if (u(ii) == Scalar(0))\n      u(ii) = sqrt(m_droptol) * rownorm;\n    m_lu.insertBackByOuterInnerUnordered(ii, ii) = u(ii);\n\n    // sort the U-part of the row\n    // apply the dropping rule first\n    len = 0;\n    for(Index k = 1; k < sizeu; k++)\n    {\n      if(abs(u(ii+k)) > m_droptol * rownorm )\n      {\n        ++len;\n        u(ii + len)  = u(ii + k);\n        ju(ii + len) = ju(ii + k);\n      }\n    }\n    sizeu = len + 1; // +1 to take into account the diagonal element\n    len = (std::min)(sizeu, nnzU);\n    typename Vector::SegmentReturnType uu(u.segment(ii+1, sizeu-1));\n    typename VectorI::SegmentReturnType juu(ju.segment(ii+1, sizeu-1));\n    internal::QuickSplit(uu, juu, len);\n\n    // store the largest elements of the U part\n    for(Index k = ii + 1; k < ii + len; k++)\n      m_lu.insertBackByOuterInnerUnordered(ii,ju(k)) = u(k);\n  }\n  m_lu.finalize();\n  m_lu.makeCompressed();\n\n  m_factorizationIsOk = true;\n  m_info = Success;\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_INCOMPLETE_LUT_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2011-2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_ITERATIVE_SOLVER_BASE_H\n#define EIGEN_ITERATIVE_SOLVER_BASE_H\n\nnamespace Eigen { \n\nnamespace internal {\n\ntemplate<typename MatrixType>\nstruct is_ref_compatible_impl\n{\nprivate:\n  template <typename T0>\n  struct any_conversion\n  {\n    template <typename T> any_conversion(const volatile T&);\n    template <typename T> any_conversion(T&);\n  };\n  struct yes {int a[1];};\n  struct no  {int a[2];};\n\n  template<typename T>\n  static yes test(const Ref<const T>&, int);\n  template<typename T>\n  static no  test(any_conversion<T>, ...);\n\npublic:\n  static MatrixType ms_from;\n  enum { value = sizeof(test<MatrixType>(ms_from, 0))==sizeof(yes) };\n};\n\ntemplate<typename MatrixType>\nstruct is_ref_compatible\n{\n  enum { value = is_ref_compatible_impl<typename remove_all<MatrixType>::type>::value };\n};\n\ntemplate<typename MatrixType, bool MatrixFree = !internal::is_ref_compatible<MatrixType>::value>\nclass generic_matrix_wrapper;\n\n// We have an explicit matrix at hand, compatible with Ref<>\ntemplate<typename MatrixType>\nclass generic_matrix_wrapper<MatrixType,false>\n{\npublic:\n  typedef Ref<const MatrixType> ActualMatrixType;\n  template<int UpLo> struct ConstSelfAdjointViewReturnType {\n    typedef typename ActualMatrixType::template ConstSelfAdjointViewReturnType<UpLo>::Type Type;\n  };\n\n  enum {\n    MatrixFree = false\n  };\n\n  generic_matrix_wrapper()\n    : m_dummy(0,0), m_matrix(m_dummy)\n  {}\n\n  template<typename InputType>\n  generic_matrix_wrapper(const InputType &mat)\n    : m_matrix(mat)\n  {}\n\n  const ActualMatrixType& matrix() const\n  {\n    return m_matrix;\n  }\n\n  template<typename MatrixDerived>\n  void grab(const EigenBase<MatrixDerived> &mat)\n  {\n    m_matrix.~Ref<const MatrixType>();\n    ::new (&m_matrix) Ref<const MatrixType>(mat.derived());\n  }\n\n  void grab(const Ref<const MatrixType> &mat)\n  {\n    if(&(mat.derived()) != &m_matrix)\n    {\n      m_matrix.~Ref<const MatrixType>();\n      ::new (&m_matrix) Ref<const MatrixType>(mat);\n    }\n  }\n\nprotected:\n  MatrixType m_dummy; // used to default initialize the Ref<> object\n  ActualMatrixType m_matrix;\n};\n\n// MatrixType is not compatible with Ref<> -> matrix-free wrapper\ntemplate<typename MatrixType>\nclass generic_matrix_wrapper<MatrixType,true>\n{\npublic:\n  typedef MatrixType ActualMatrixType;\n  template<int UpLo> struct ConstSelfAdjointViewReturnType\n  {\n    typedef ActualMatrixType Type;\n  };\n\n  enum {\n    MatrixFree = true\n  };\n\n  generic_matrix_wrapper()\n    : mp_matrix(0)\n  {}\n\n  generic_matrix_wrapper(const MatrixType &mat)\n    : mp_matrix(&mat)\n  {}\n\n  const ActualMatrixType& matrix() const\n  {\n    return *mp_matrix;\n  }\n\n  void grab(const MatrixType &mat)\n  {\n    mp_matrix = &mat;\n  }\n\nprotected:\n  const ActualMatrixType *mp_matrix;\n};\n\n}\n\n/** \\ingroup IterativeLinearSolvers_Module\n  * \\brief Base class for linear iterative solvers\n  *\n  * \\sa class SimplicialCholesky, DiagonalPreconditioner, IdentityPreconditioner\n  */\ntemplate< typename Derived>\nclass IterativeSolverBase : public SparseSolverBase<Derived>\n{\nprotected:\n  typedef SparseSolverBase<Derived> Base;\n  using Base::m_isInitialized;\n  \npublic:\n  typedef typename internal::traits<Derived>::MatrixType MatrixType;\n  typedef typename internal::traits<Derived>::Preconditioner Preconditioner;\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename MatrixType::StorageIndex StorageIndex;\n  typedef typename MatrixType::RealScalar RealScalar;\n\n  enum {\n    ColsAtCompileTime = MatrixType::ColsAtCompileTime,\n    MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime\n  };\n\npublic:\n\n  using Base::derived;\n\n  /** Default constructor. */\n  IterativeSolverBase()\n  {\n    init();\n  }\n\n  /** Initialize the solver with matrix \\a A for further \\c Ax=b solving.\n    * \n    * This constructor is a shortcut for the default constructor followed\n    * by a call to compute().\n    * \n    * \\warning this class stores a reference to the matrix A as well as some\n    * precomputed values that depend on it. Therefore, if \\a A is changed\n    * this class becomes invalid. Call compute() to update it with the new\n    * matrix A, or modify a copy of A.\n    */\n  template<typename MatrixDerived>\n  explicit IterativeSolverBase(const EigenBase<MatrixDerived>& A)\n    : m_matrixWrapper(A.derived())\n  {\n    init();\n    compute(matrix());\n  }\n\n  ~IterativeSolverBase() {}\n  \n  /** Initializes the iterative solver for the sparsity pattern of the matrix \\a A for further solving \\c Ax=b problems.\n    *\n    * Currently, this function mostly calls analyzePattern on the preconditioner. In the future\n    * we might, for instance, implement column reordering for faster matrix vector products.\n    */\n  template<typename MatrixDerived>\n  Derived& analyzePattern(const EigenBase<MatrixDerived>& A)\n  {\n    grab(A.derived());\n    m_preconditioner.analyzePattern(matrix());\n    m_isInitialized = true;\n    m_analysisIsOk = true;\n    m_info = m_preconditioner.info();\n    return derived();\n  }\n  \n  /** Initializes the iterative solver with the numerical values of the matrix \\a A for further solving \\c Ax=b problems.\n    *\n    * Currently, this function mostly calls factorize on the preconditioner.\n    *\n    * \\warning this class stores a reference to the matrix A as well as some\n    * precomputed values that depend on it. Therefore, if \\a A is changed\n    * this class becomes invalid. Call compute() to update it with the new\n    * matrix A, or modify a copy of A.\n    */\n  template<typename MatrixDerived>\n  Derived& factorize(const EigenBase<MatrixDerived>& A)\n  {\n    eigen_assert(m_analysisIsOk && \"You must first call analyzePattern()\"); \n    grab(A.derived());\n    m_preconditioner.factorize(matrix());\n    m_factorizationIsOk = true;\n    m_info = m_preconditioner.info();\n    return derived();\n  }\n\n  /** Initializes the iterative solver with the matrix \\a A for further solving \\c Ax=b problems.\n    *\n    * Currently, this function mostly initializes/computes the preconditioner. In the future\n    * we might, for instance, implement column reordering for faster matrix vector products.\n    *\n    * \\warning this class stores a reference to the matrix A as well as some\n    * precomputed values that depend on it. Therefore, if \\a A is changed\n    * this class becomes invalid. Call compute() to update it with the new\n    * matrix A, or modify a copy of A.\n    */\n  template<typename MatrixDerived>\n  Derived& compute(const EigenBase<MatrixDerived>& A)\n  {\n    grab(A.derived());\n    m_preconditioner.compute(matrix());\n    m_isInitialized = true;\n    m_analysisIsOk = true;\n    m_factorizationIsOk = true;\n    m_info = m_preconditioner.info();\n    return derived();\n  }\n\n  /** \\internal */\n  Index rows() const { return matrix().rows(); }\n\n  /** \\internal */\n  Index cols() const { return matrix().cols(); }\n\n  /** \\returns the tolerance threshold used by the stopping criteria.\n    * \\sa setTolerance()\n    */\n  RealScalar tolerance() const { return m_tolerance; }\n  \n  /** Sets the tolerance threshold used by the stopping criteria.\n    *\n    * This value is used as an upper bound to the relative residual error: |Ax-b|/|b|.\n    * The default value is the machine precision given by NumTraits<Scalar>::epsilon()\n    */\n  Derived& setTolerance(const RealScalar& tolerance)\n  {\n    m_tolerance = tolerance;\n    return derived();\n  }\n\n  /** \\returns a read-write reference to the preconditioner for custom configuration. */\n  Preconditioner& preconditioner() { return m_preconditioner; }\n  \n  /** \\returns a read-only reference to the preconditioner. */\n  const Preconditioner& preconditioner() const { return m_preconditioner; }\n\n  /** \\returns the max number of iterations.\n    * It is either the value set by setMaxIterations or, by default,\n    * twice the number of columns of the matrix.\n    */\n  Index maxIterations() const\n  {\n    return (m_maxIterations<0) ? 2*matrix().cols() : m_maxIterations;\n  }\n  \n  /** Sets the max number of iterations.\n    * Default is twice the number of columns of the matrix.\n    */\n  Derived& setMaxIterations(Index maxIters)\n  {\n    m_maxIterations = maxIters;\n    return derived();\n  }\n\n  /** \\returns the number of iterations performed during the last solve */\n  Index iterations() const\n  {\n    eigen_assert(m_isInitialized && \"ConjugateGradient is not initialized.\");\n    return m_iterations;\n  }\n\n  /** \\returns the tolerance error reached during the last solve.\n    * It is a close approximation of the true relative residual error |Ax-b|/|b|.\n    */\n  RealScalar error() const\n  {\n    eigen_assert(m_isInitialized && \"ConjugateGradient is not initialized.\");\n    return m_error;\n  }\n\n  /** \\returns the solution x of \\f$ A x = b \\f$ using the current decomposition of A\n    * and \\a x0 as an initial solution.\n    *\n    * \\sa solve(), compute()\n    */\n  template<typename Rhs,typename Guess>\n  inline const SolveWithGuess<Derived, Rhs, Guess>\n  solveWithGuess(const MatrixBase<Rhs>& b, const Guess& x0) const\n  {\n    eigen_assert(m_isInitialized && \"Solver is not initialized.\");\n    eigen_assert(derived().rows()==b.rows() && \"solve(): invalid number of rows of the right hand side matrix b\");\n    return SolveWithGuess<Derived, Rhs, Guess>(derived(), b.derived(), x0);\n  }\n\n  /** \\returns Success if the iterations converged, and NoConvergence otherwise. */\n  ComputationInfo info() const\n  {\n    eigen_assert(m_isInitialized && \"IterativeSolverBase is not initialized.\");\n    return m_info;\n  }\n  \n  /** \\internal */\n  template<typename Rhs, typename DestDerived>\n  void _solve_with_guess_impl(const Rhs& b, SparseMatrixBase<DestDerived> &aDest) const\n  {\n    eigen_assert(rows()==b.rows());\n    \n    Index rhsCols = b.cols();\n    Index size = b.rows();\n    DestDerived& dest(aDest.derived());\n    typedef typename DestDerived::Scalar DestScalar;\n    Eigen::Matrix<DestScalar,Dynamic,1> tb(size);\n    Eigen::Matrix<DestScalar,Dynamic,1> tx(cols());\n    // We do not directly fill dest because sparse expressions have to be free of aliasing issue.\n    // For non square least-square problems, b and dest might not have the same size whereas they might alias each-other.\n    typename DestDerived::PlainObject tmp(cols(),rhsCols);\n    ComputationInfo global_info = Success;\n    for(Index k=0; k<rhsCols; ++k)\n    {\n      tb = b.col(k);\n      tx = dest.col(k);\n      derived()._solve_vector_with_guess_impl(tb,tx);\n      tmp.col(k) = tx.sparseView(0);\n\n      // The call to _solve_vector_with_guess_impl updates m_info, so if it failed for a previous column\n      // we need to restore it to the worst value.\n      if(m_info==NumericalIssue)\n        global_info = NumericalIssue;\n      else if(m_info==NoConvergence)\n        global_info = NoConvergence;\n    }\n    m_info = global_info;\n    dest.swap(tmp);\n  }\n\n  template<typename Rhs, typename DestDerived>\n  typename internal::enable_if<Rhs::ColsAtCompileTime!=1 && DestDerived::ColsAtCompileTime!=1>::type\n  _solve_with_guess_impl(const Rhs& b, MatrixBase<DestDerived> &aDest) const\n  {\n    eigen_assert(rows()==b.rows());\n    \n    Index rhsCols = b.cols();\n    DestDerived& dest(aDest.derived());\n    ComputationInfo global_info = Success;\n    for(Index k=0; k<rhsCols; ++k)\n    {\n      typename DestDerived::ColXpr xk(dest,k);\n      typename Rhs::ConstColXpr bk(b,k);\n      derived()._solve_vector_with_guess_impl(bk,xk);\n\n      // The call to _solve_vector_with_guess updates m_info, so if it failed for a previous column\n      // we need to restore it to the worst value.\n      if(m_info==NumericalIssue)\n        global_info = NumericalIssue;\n      else if(m_info==NoConvergence)\n        global_info = NoConvergence;\n    }\n    m_info = global_info;\n  }\n\n  template<typename Rhs, typename DestDerived>\n  typename internal::enable_if<Rhs::ColsAtCompileTime==1 || DestDerived::ColsAtCompileTime==1>::type\n  _solve_with_guess_impl(const Rhs& b, MatrixBase<DestDerived> &dest) const\n  {\n    derived()._solve_vector_with_guess_impl(b,dest.derived());\n  }\n\n  /** \\internal default initial guess = 0 */\n  template<typename Rhs,typename Dest>\n  void _solve_impl(const Rhs& b, Dest& x) const\n  {\n    x.setZero();\n    derived()._solve_with_guess_impl(b,x);\n  }\n\nprotected:\n  void init()\n  {\n    m_isInitialized = false;\n    m_analysisIsOk = false;\n    m_factorizationIsOk = false;\n    m_maxIterations = -1;\n    m_tolerance = NumTraits<Scalar>::epsilon();\n  }\n\n  typedef internal::generic_matrix_wrapper<MatrixType> MatrixWrapper;\n  typedef typename MatrixWrapper::ActualMatrixType ActualMatrixType;\n\n  const ActualMatrixType& matrix() const\n  {\n    return m_matrixWrapper.matrix();\n  }\n  \n  template<typename InputType>\n  void grab(const InputType &A)\n  {\n    m_matrixWrapper.grab(A);\n  }\n  \n  MatrixWrapper m_matrixWrapper;\n  Preconditioner m_preconditioner;\n\n  Index m_maxIterations;\n  RealScalar m_tolerance;\n  \n  mutable RealScalar m_error;\n  mutable Index m_iterations;\n  mutable ComputationInfo m_info;\n  mutable bool m_analysisIsOk, m_factorizationIsOk;\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_ITERATIVE_SOLVER_BASE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_LEAST_SQUARE_CONJUGATE_GRADIENT_H\n#define EIGEN_LEAST_SQUARE_CONJUGATE_GRADIENT_H\n\nnamespace Eigen { \n\nnamespace internal {\n\n/** \\internal Low-level conjugate gradient algorithm for least-square problems\n  * \\param mat The matrix A\n  * \\param rhs The right hand side vector b\n  * \\param x On input and initial solution, on output the computed solution.\n  * \\param precond A preconditioner being able to efficiently solve for an\n  *                approximation of A'Ax=b (regardless of b)\n  * \\param iters On input the max number of iteration, on output the number of performed iterations.\n  * \\param tol_error On input the tolerance error, on output an estimation of the relative error.\n  */\ntemplate<typename MatrixType, typename Rhs, typename Dest, typename Preconditioner>\nEIGEN_DONT_INLINE\nvoid least_square_conjugate_gradient(const MatrixType& mat, const Rhs& rhs, Dest& x,\n                                     const Preconditioner& precond, Index& iters,\n                                     typename Dest::RealScalar& tol_error)\n{\n  using std::sqrt;\n  using std::abs;\n  typedef typename Dest::RealScalar RealScalar;\n  typedef typename Dest::Scalar Scalar;\n  typedef Matrix<Scalar,Dynamic,1> VectorType;\n  \n  RealScalar tol = tol_error;\n  Index maxIters = iters;\n  \n  Index m = mat.rows(), n = mat.cols();\n\n  VectorType residual        = rhs - mat * x;\n  VectorType normal_residual = mat.adjoint() * residual;\n\n  RealScalar rhsNorm2 = (mat.adjoint()*rhs).squaredNorm();\n  if(rhsNorm2 == 0) \n  {\n    x.setZero();\n    iters = 0;\n    tol_error = 0;\n    return;\n  }\n  RealScalar threshold = tol*tol*rhsNorm2;\n  RealScalar residualNorm2 = normal_residual.squaredNorm();\n  if (residualNorm2 < threshold)\n  {\n    iters = 0;\n    tol_error = sqrt(residualNorm2 / rhsNorm2);\n    return;\n  }\n  \n  VectorType p(n);\n  p = precond.solve(normal_residual);                         // initial search direction\n\n  VectorType z(n), tmp(m);\n  RealScalar absNew = numext::real(normal_residual.dot(p));  // the square of the absolute value of r scaled by invM\n  Index i = 0;\n  while(i < maxIters)\n  {\n    tmp.noalias() = mat * p;\n\n    Scalar alpha = absNew / tmp.squaredNorm();      // the amount we travel on dir\n    x += alpha * p;                                 // update solution\n    residual -= alpha * tmp;                        // update residual\n    normal_residual = mat.adjoint() * residual;     // update residual of the normal equation\n    \n    residualNorm2 = normal_residual.squaredNorm();\n    if(residualNorm2 < threshold)\n      break;\n    \n    z = precond.solve(normal_residual);             // approximately solve for \"A'A z = normal_residual\"\n\n    RealScalar absOld = absNew;\n    absNew = numext::real(normal_residual.dot(z));  // update the absolute value of r\n    RealScalar beta = absNew / absOld;              // calculate the Gram-Schmidt value used to create the new search direction\n    p = z + beta * p;                               // update search direction\n    i++;\n  }\n  tol_error = sqrt(residualNorm2 / rhsNorm2);\n  iters = i;\n}\n\n}\n\ntemplate< typename _MatrixType,\n          typename _Preconditioner = LeastSquareDiagonalPreconditioner<typename _MatrixType::Scalar> >\nclass LeastSquaresConjugateGradient;\n\nnamespace internal {\n\ntemplate< typename _MatrixType, typename _Preconditioner>\nstruct traits<LeastSquaresConjugateGradient<_MatrixType,_Preconditioner> >\n{\n  typedef _MatrixType MatrixType;\n  typedef _Preconditioner Preconditioner;\n};\n\n}\n\n/** \\ingroup IterativeLinearSolvers_Module\n  * \\brief A conjugate gradient solver for sparse (or dense) least-square problems\n  *\n  * This class allows to solve for A x = b linear problems using an iterative conjugate gradient algorithm.\n  * The matrix A can be non symmetric and rectangular, but the matrix A' A should be positive-definite to guaranty stability.\n  * Otherwise, the SparseLU or SparseQR classes might be preferable.\n  * The matrix A and the vectors x and b can be either dense or sparse.\n  *\n  * \\tparam _MatrixType the type of the matrix A, can be a dense or a sparse matrix.\n  * \\tparam _Preconditioner the type of the preconditioner. Default is LeastSquareDiagonalPreconditioner\n  *\n  * \\implsparsesolverconcept\n  * \n  * The maximal number of iterations and tolerance value can be controlled via the setMaxIterations()\n  * and setTolerance() methods. The defaults are the size of the problem for the maximal number of iterations\n  * and NumTraits<Scalar>::epsilon() for the tolerance.\n  * \n  * This class can be used as the direct solver classes. Here is a typical usage example:\n    \\code\n    int m=1000000, n = 10000;\n    VectorXd x(n), b(m);\n    SparseMatrix<double> A(m,n);\n    // fill A and b\n    LeastSquaresConjugateGradient<SparseMatrix<double> > lscg;\n    lscg.compute(A);\n    x = lscg.solve(b);\n    std::cout << \"#iterations:     \" << lscg.iterations() << std::endl;\n    std::cout << \"estimated error: \" << lscg.error()      << std::endl;\n    // update b, and solve again\n    x = lscg.solve(b);\n    \\endcode\n  * \n  * By default the iterations start with x=0 as an initial guess of the solution.\n  * One can control the start using the solveWithGuess() method.\n  * \n  * \\sa class ConjugateGradient, SparseLU, SparseQR\n  */\ntemplate< typename _MatrixType, typename _Preconditioner>\nclass LeastSquaresConjugateGradient : public IterativeSolverBase<LeastSquaresConjugateGradient<_MatrixType,_Preconditioner> >\n{\n  typedef IterativeSolverBase<LeastSquaresConjugateGradient> Base;\n  using Base::matrix;\n  using Base::m_error;\n  using Base::m_iterations;\n  using Base::m_info;\n  using Base::m_isInitialized;\npublic:\n  typedef _MatrixType MatrixType;\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename MatrixType::RealScalar RealScalar;\n  typedef _Preconditioner Preconditioner;\n\npublic:\n\n  /** Default constructor. */\n  LeastSquaresConjugateGradient() : Base() {}\n\n  /** Initialize the solver with matrix \\a A for further \\c Ax=b solving.\n    * \n    * This constructor is a shortcut for the default constructor followed\n    * by a call to compute().\n    * \n    * \\warning this class stores a reference to the matrix A as well as some\n    * precomputed values that depend on it. Therefore, if \\a A is changed\n    * this class becomes invalid. Call compute() to update it with the new\n    * matrix A, or modify a copy of A.\n    */\n  template<typename MatrixDerived>\n  explicit LeastSquaresConjugateGradient(const EigenBase<MatrixDerived>& A) : Base(A.derived()) {}\n\n  ~LeastSquaresConjugateGradient() {}\n\n  /** \\internal */\n  template<typename Rhs,typename Dest>\n  void _solve_vector_with_guess_impl(const Rhs& b, Dest& x) const\n  {\n    m_iterations = Base::maxIterations();\n    m_error = Base::m_tolerance;\n\n    internal::least_square_conjugate_gradient(matrix(), b, x, Base::m_preconditioner, m_iterations, m_error);\n    m_info = m_error <= Base::m_tolerance ? Success : NoConvergence;\n  }\n\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_LEAST_SQUARE_CONJUGATE_GRADIENT_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/IterativeLinearSolvers/SolveWithGuess.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SOLVEWITHGUESS_H\n#define EIGEN_SOLVEWITHGUESS_H\n\nnamespace Eigen {\n\ntemplate<typename Decomposition, typename RhsType, typename GuessType> class SolveWithGuess;\n  \n/** \\class SolveWithGuess\n  * \\ingroup IterativeLinearSolvers_Module\n  *\n  * \\brief Pseudo expression representing a solving operation\n  *\n  * \\tparam Decomposition the type of the matrix or decomposion object\n  * \\tparam Rhstype the type of the right-hand side\n  *\n  * This class represents an expression of A.solve(B)\n  * and most of the time this is the only way it is used.\n  *\n  */\nnamespace internal {\n\n\ntemplate<typename Decomposition, typename RhsType, typename GuessType>\nstruct traits<SolveWithGuess<Decomposition, RhsType, GuessType> >\n  : traits<Solve<Decomposition,RhsType> >\n{};\n\n}\n\n\ntemplate<typename Decomposition, typename RhsType, typename GuessType>\nclass SolveWithGuess : public internal::generic_xpr_base<SolveWithGuess<Decomposition,RhsType,GuessType>, MatrixXpr, typename internal::traits<RhsType>::StorageKind>::type\n{\npublic:\n  typedef typename internal::traits<SolveWithGuess>::Scalar Scalar;\n  typedef typename internal::traits<SolveWithGuess>::PlainObject PlainObject;\n  typedef typename internal::generic_xpr_base<SolveWithGuess<Decomposition,RhsType,GuessType>, MatrixXpr, typename internal::traits<RhsType>::StorageKind>::type Base;\n  typedef typename internal::ref_selector<SolveWithGuess>::type Nested;\n  \n  SolveWithGuess(const Decomposition &dec, const RhsType &rhs, const GuessType &guess)\n    : m_dec(dec), m_rhs(rhs), m_guess(guess)\n  {}\n  \n  EIGEN_DEVICE_FUNC Index rows() const { return m_dec.cols(); }\n  EIGEN_DEVICE_FUNC Index cols() const { return m_rhs.cols(); }\n\n  EIGEN_DEVICE_FUNC const Decomposition& dec()   const { return m_dec; }\n  EIGEN_DEVICE_FUNC const RhsType&       rhs()   const { return m_rhs; }\n  EIGEN_DEVICE_FUNC const GuessType&     guess() const { return m_guess; }\n\nprotected:\n  const Decomposition &m_dec;\n  const RhsType       &m_rhs;\n  const GuessType     &m_guess;\n  \nprivate:\n  Scalar coeff(Index row, Index col) const;\n  Scalar coeff(Index i) const;\n};\n\nnamespace internal {\n\n// Evaluator of SolveWithGuess -> eval into a temporary\ntemplate<typename Decomposition, typename RhsType, typename GuessType>\nstruct evaluator<SolveWithGuess<Decomposition,RhsType, GuessType> >\n  : public evaluator<typename SolveWithGuess<Decomposition,RhsType,GuessType>::PlainObject>\n{\n  typedef SolveWithGuess<Decomposition,RhsType,GuessType> SolveType;\n  typedef typename SolveType::PlainObject PlainObject;\n  typedef evaluator<PlainObject> Base;\n\n  evaluator(const SolveType& solve)\n    : m_result(solve.rows(), solve.cols())\n  {\n    ::new (static_cast<Base*>(this)) Base(m_result);\n    m_result = solve.guess();\n    solve.dec()._solve_with_guess_impl(solve.rhs(), m_result);\n  }\n  \nprotected:  \n  PlainObject m_result;\n};\n\n// Specialization for \"dst = dec.solveWithGuess(rhs)\"\n// NOTE we need to specialize it for Dense2Dense to avoid ambiguous specialization error and a Sparse2Sparse specialization must exist somewhere\ntemplate<typename DstXprType, typename DecType, typename RhsType, typename GuessType, typename Scalar>\nstruct Assignment<DstXprType, SolveWithGuess<DecType,RhsType,GuessType>, internal::assign_op<Scalar,Scalar>, Dense2Dense>\n{\n  typedef SolveWithGuess<DecType,RhsType,GuessType> SrcXprType;\n  static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op<Scalar,Scalar> &)\n  {\n    Index dstRows = src.rows();\n    Index dstCols = src.cols();\n    if((dst.rows()!=dstRows) || (dst.cols()!=dstCols))\n      dst.resize(dstRows, dstCols);\n\n    dst = src.guess();\n    src.dec()._solve_with_guess_impl(src.rhs(), dst/*, src.guess()*/);\n  }\n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_SOLVEWITHGUESS_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/Jacobi/Jacobi.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_JACOBI_H\n#define EIGEN_JACOBI_H\n\nnamespace Eigen {\n\n/** \\ingroup Jacobi_Module\n  * \\jacobi_module\n  * \\class JacobiRotation\n  * \\brief Rotation given by a cosine-sine pair.\n  *\n  * This class represents a Jacobi or Givens rotation.\n  * This is a 2D rotation in the plane \\c J of angle \\f$ \\theta \\f$ defined by\n  * its cosine \\c c and sine \\c s as follow:\n  * \\f$ J = \\left ( \\begin{array}{cc} c & \\overline s \\\\ -s  & \\overline c \\end{array} \\right ) \\f$\n  *\n  * You can apply the respective counter-clockwise rotation to a column vector \\c v by\n  * applying its adjoint on the left: \\f$ v = J^* v \\f$ that translates to the following Eigen code:\n  * \\code\n  * v.applyOnTheLeft(J.adjoint());\n  * \\endcode\n  *\n  * \\sa MatrixBase::applyOnTheLeft(), MatrixBase::applyOnTheRight()\n  */\ntemplate<typename Scalar> class JacobiRotation\n{\n  public:\n    typedef typename NumTraits<Scalar>::Real RealScalar;\n\n    /** Default constructor without any initialization. */\n    EIGEN_DEVICE_FUNC\n    JacobiRotation() {}\n\n    /** Construct a planar rotation from a cosine-sine pair (\\a c, \\c s). */\n    EIGEN_DEVICE_FUNC\n    JacobiRotation(const Scalar& c, const Scalar& s) : m_c(c), m_s(s) {}\n\n    EIGEN_DEVICE_FUNC Scalar& c() { return m_c; }\n    EIGEN_DEVICE_FUNC Scalar c() const { return m_c; }\n    EIGEN_DEVICE_FUNC Scalar& s() { return m_s; }\n    EIGEN_DEVICE_FUNC Scalar s() const { return m_s; }\n\n    /** Concatenates two planar rotation */\n    EIGEN_DEVICE_FUNC\n    JacobiRotation operator*(const JacobiRotation& other)\n    {\n      using numext::conj;\n      return JacobiRotation(m_c * other.m_c - conj(m_s) * other.m_s,\n                            conj(m_c * conj(other.m_s) + conj(m_s) * conj(other.m_c)));\n    }\n\n    /** Returns the transposed transformation */\n    EIGEN_DEVICE_FUNC\n    JacobiRotation transpose() const { using numext::conj; return JacobiRotation(m_c, -conj(m_s)); }\n\n    /** Returns the adjoint transformation */\n    EIGEN_DEVICE_FUNC\n    JacobiRotation adjoint() const { using numext::conj; return JacobiRotation(conj(m_c), -m_s); }\n\n    template<typename Derived>\n    EIGEN_DEVICE_FUNC\n    bool makeJacobi(const MatrixBase<Derived>&, Index p, Index q);\n    EIGEN_DEVICE_FUNC\n    bool makeJacobi(const RealScalar& x, const Scalar& y, const RealScalar& z);\n\n    EIGEN_DEVICE_FUNC\n    void makeGivens(const Scalar& p, const Scalar& q, Scalar* r=0);\n\n  protected:\n    EIGEN_DEVICE_FUNC\n    void makeGivens(const Scalar& p, const Scalar& q, Scalar* r, internal::true_type);\n    EIGEN_DEVICE_FUNC\n    void makeGivens(const Scalar& p, const Scalar& q, Scalar* r, internal::false_type);\n\n    Scalar m_c, m_s;\n};\n\n/** Makes \\c *this as a Jacobi rotation \\a J such that applying \\a J on both the right and left sides of the selfadjoint 2x2 matrix\n  * \\f$ B = \\left ( \\begin{array}{cc} x & y \\\\ \\overline y & z \\end{array} \\right )\\f$ yields a diagonal matrix \\f$ A = J^* B J \\f$\n  *\n  * \\sa MatrixBase::makeJacobi(const MatrixBase<Derived>&, Index, Index), MatrixBase::applyOnTheLeft(), MatrixBase::applyOnTheRight()\n  */\ntemplate<typename Scalar>\nEIGEN_DEVICE_FUNC\nbool JacobiRotation<Scalar>::makeJacobi(const RealScalar& x, const Scalar& y, const RealScalar& z)\n{\n  using std::sqrt;\n  using std::abs;\n\n  RealScalar deno = RealScalar(2)*abs(y);\n  if(deno < (std::numeric_limits<RealScalar>::min)())\n  {\n    m_c = Scalar(1);\n    m_s = Scalar(0);\n    return false;\n  }\n  else\n  {\n    RealScalar tau = (x-z)/deno;\n    RealScalar w = sqrt(numext::abs2(tau) + RealScalar(1));\n    RealScalar t;\n    if(tau>RealScalar(0))\n    {\n      t = RealScalar(1) / (tau + w);\n    }\n    else\n    {\n      t = RealScalar(1) / (tau - w);\n    }\n    RealScalar sign_t = t > RealScalar(0) ? RealScalar(1) : RealScalar(-1);\n    RealScalar n = RealScalar(1) / sqrt(numext::abs2(t)+RealScalar(1));\n    m_s = - sign_t * (numext::conj(y) / abs(y)) * abs(t) * n;\n    m_c = n;\n    return true;\n  }\n}\n\n/** Makes \\c *this as a Jacobi rotation \\c J such that applying \\a J on both the right and left sides of the 2x2 selfadjoint matrix\n  * \\f$ B = \\left ( \\begin{array}{cc} \\text{this}_{pp} & \\text{this}_{pq} \\\\ (\\text{this}_{pq})^* & \\text{this}_{qq} \\end{array} \\right )\\f$ yields\n  * a diagonal matrix \\f$ A = J^* B J \\f$\n  *\n  * Example: \\include Jacobi_makeJacobi.cpp\n  * Output: \\verbinclude Jacobi_makeJacobi.out\n  *\n  * \\sa JacobiRotation::makeJacobi(RealScalar, Scalar, RealScalar), MatrixBase::applyOnTheLeft(), MatrixBase::applyOnTheRight()\n  */\ntemplate<typename Scalar>\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC\ninline bool JacobiRotation<Scalar>::makeJacobi(const MatrixBase<Derived>& m, Index p, Index q)\n{\n  return makeJacobi(numext::real(m.coeff(p,p)), m.coeff(p,q), numext::real(m.coeff(q,q)));\n}\n\n/** Makes \\c *this as a Givens rotation \\c G such that applying \\f$ G^* \\f$ to the left of the vector\n  * \\f$ V = \\left ( \\begin{array}{c} p \\\\ q \\end{array} \\right )\\f$ yields:\n  * \\f$ G^* V = \\left ( \\begin{array}{c} r \\\\ 0 \\end{array} \\right )\\f$.\n  *\n  * The value of \\a r is returned if \\a r is not null (the default is null).\n  * Also note that G is built such that the cosine is always real.\n  *\n  * Example: \\include Jacobi_makeGivens.cpp\n  * Output: \\verbinclude Jacobi_makeGivens.out\n  *\n  * This function implements the continuous Givens rotation generation algorithm\n  * found in Anderson (2000), Discontinuous Plane Rotations and the Symmetric Eigenvalue Problem.\n  * LAPACK Working Note 150, University of Tennessee, UT-CS-00-454, December 4, 2000.\n  *\n  * \\sa MatrixBase::applyOnTheLeft(), MatrixBase::applyOnTheRight()\n  */\ntemplate<typename Scalar>\nEIGEN_DEVICE_FUNC\nvoid JacobiRotation<Scalar>::makeGivens(const Scalar& p, const Scalar& q, Scalar* r)\n{\n  makeGivens(p, q, r, typename internal::conditional<NumTraits<Scalar>::IsComplex, internal::true_type, internal::false_type>::type());\n}\n\n\n// specialization for complexes\ntemplate<typename Scalar>\nEIGEN_DEVICE_FUNC\nvoid JacobiRotation<Scalar>::makeGivens(const Scalar& p, const Scalar& q, Scalar* r, internal::true_type)\n{\n  using std::sqrt;\n  using std::abs;\n  using numext::conj;\n\n  if(q==Scalar(0))\n  {\n    m_c = numext::real(p)<0 ? Scalar(-1) : Scalar(1);\n    m_s = 0;\n    if(r) *r = m_c * p;\n  }\n  else if(p==Scalar(0))\n  {\n    m_c = 0;\n    m_s = -q/abs(q);\n    if(r) *r = abs(q);\n  }\n  else\n  {\n    RealScalar p1 = numext::norm1(p);\n    RealScalar q1 = numext::norm1(q);\n    if(p1>=q1)\n    {\n      Scalar ps = p / p1;\n      RealScalar p2 = numext::abs2(ps);\n      Scalar qs = q / p1;\n      RealScalar q2 = numext::abs2(qs);\n\n      RealScalar u = sqrt(RealScalar(1) + q2/p2);\n      if(numext::real(p)<RealScalar(0))\n        u = -u;\n\n      m_c = Scalar(1)/u;\n      m_s = -qs*conj(ps)*(m_c/p2);\n      if(r) *r = p * u;\n    }\n    else\n    {\n      Scalar ps = p / q1;\n      RealScalar p2 = numext::abs2(ps);\n      Scalar qs = q / q1;\n      RealScalar q2 = numext::abs2(qs);\n\n      RealScalar u = q1 * sqrt(p2 + q2);\n      if(numext::real(p)<RealScalar(0))\n        u = -u;\n\n      p1 = abs(p);\n      ps = p/p1;\n      m_c = p1/u;\n      m_s = -conj(ps) * (q/u);\n      if(r) *r = ps * u;\n    }\n  }\n}\n\n// specialization for reals\ntemplate<typename Scalar>\nEIGEN_DEVICE_FUNC\nvoid JacobiRotation<Scalar>::makeGivens(const Scalar& p, const Scalar& q, Scalar* r, internal::false_type)\n{\n  using std::sqrt;\n  using std::abs;\n  if(q==Scalar(0))\n  {\n    m_c = p<Scalar(0) ? Scalar(-1) : Scalar(1);\n    m_s = Scalar(0);\n    if(r) *r = abs(p);\n  }\n  else if(p==Scalar(0))\n  {\n    m_c = Scalar(0);\n    m_s = q<Scalar(0) ? Scalar(1) : Scalar(-1);\n    if(r) *r = abs(q);\n  }\n  else if(abs(p) > abs(q))\n  {\n    Scalar t = q/p;\n    Scalar u = sqrt(Scalar(1) + numext::abs2(t));\n    if(p<Scalar(0))\n      u = -u;\n    m_c = Scalar(1)/u;\n    m_s = -t * m_c;\n    if(r) *r = p * u;\n  }\n  else\n  {\n    Scalar t = p/q;\n    Scalar u = sqrt(Scalar(1) + numext::abs2(t));\n    if(q<Scalar(0))\n      u = -u;\n    m_s = -Scalar(1)/u;\n    m_c = -t * m_s;\n    if(r) *r = q * u;\n  }\n\n}\n\n/****************************************************************************************\n*   Implementation of MatrixBase methods\n****************************************************************************************/\n\nnamespace internal {\n/** \\jacobi_module\n  * Applies the clock wise 2D rotation \\a j to the set of 2D vectors of coordinates \\a x and \\a y:\n  * \\f$ \\left ( \\begin{array}{cc} x \\\\ y \\end{array} \\right )  =  J \\left ( \\begin{array}{cc} x \\\\ y \\end{array} \\right ) \\f$\n  *\n  * \\sa MatrixBase::applyOnTheLeft(), MatrixBase::applyOnTheRight()\n  */\ntemplate<typename VectorX, typename VectorY, typename OtherScalar>\nEIGEN_DEVICE_FUNC\nvoid apply_rotation_in_the_plane(DenseBase<VectorX>& xpr_x, DenseBase<VectorY>& xpr_y, const JacobiRotation<OtherScalar>& j);\n}\n\n/** \\jacobi_module\n  * Applies the rotation in the plane \\a j to the rows \\a p and \\a q of \\c *this, i.e., it computes B = J * B,\n  * with \\f$ B = \\left ( \\begin{array}{cc} \\text{*this.row}(p) \\\\ \\text{*this.row}(q) \\end{array} \\right ) \\f$.\n  *\n  * \\sa class JacobiRotation, MatrixBase::applyOnTheRight(), internal::apply_rotation_in_the_plane()\n  */\ntemplate<typename Derived>\ntemplate<typename OtherScalar>\nEIGEN_DEVICE_FUNC\ninline void MatrixBase<Derived>::applyOnTheLeft(Index p, Index q, const JacobiRotation<OtherScalar>& j)\n{\n  RowXpr x(this->row(p));\n  RowXpr y(this->row(q));\n  internal::apply_rotation_in_the_plane(x, y, j);\n}\n\n/** \\ingroup Jacobi_Module\n  * Applies the rotation in the plane \\a j to the columns \\a p and \\a q of \\c *this, i.e., it computes B = B * J\n  * with \\f$ B = \\left ( \\begin{array}{cc} \\text{*this.col}(p) & \\text{*this.col}(q) \\end{array} \\right ) \\f$.\n  *\n  * \\sa class JacobiRotation, MatrixBase::applyOnTheLeft(), internal::apply_rotation_in_the_plane()\n  */\ntemplate<typename Derived>\ntemplate<typename OtherScalar>\nEIGEN_DEVICE_FUNC\ninline void MatrixBase<Derived>::applyOnTheRight(Index p, Index q, const JacobiRotation<OtherScalar>& j)\n{\n  ColXpr x(this->col(p));\n  ColXpr y(this->col(q));\n  internal::apply_rotation_in_the_plane(x, y, j.transpose());\n}\n\nnamespace internal {\n\ntemplate<typename Scalar, typename OtherScalar,\n         int SizeAtCompileTime, int MinAlignment, bool Vectorizable>\nstruct apply_rotation_in_the_plane_selector\n{\n  static EIGEN_DEVICE_FUNC\n  inline void run(Scalar *x, Index incrx, Scalar *y, Index incry, Index size, OtherScalar c, OtherScalar s)\n  {\n    for(Index i=0; i<size; ++i)\n    {\n      Scalar xi = *x;\n      Scalar yi = *y;\n      *x =  c * xi + numext::conj(s) * yi;\n      *y = -s * xi + numext::conj(c) * yi;\n      x += incrx;\n      y += incry;\n    }\n  }\n};\n\ntemplate<typename Scalar, typename OtherScalar,\n         int SizeAtCompileTime, int MinAlignment>\nstruct apply_rotation_in_the_plane_selector<Scalar,OtherScalar,SizeAtCompileTime,MinAlignment,true /* vectorizable */>\n{\n  static inline void run(Scalar *x, Index incrx, Scalar *y, Index incry, Index size, OtherScalar c, OtherScalar s)\n  {\n    enum {\n      PacketSize = packet_traits<Scalar>::size,\n      OtherPacketSize = packet_traits<OtherScalar>::size\n    };\n    typedef typename packet_traits<Scalar>::type Packet;\n    typedef typename packet_traits<OtherScalar>::type OtherPacket;\n\n    /*** dynamic-size vectorized paths ***/\n    if(SizeAtCompileTime == Dynamic && ((incrx==1 && incry==1) || PacketSize == 1))\n    {\n      // both vectors are sequentially stored in memory => vectorization\n      enum { Peeling = 2 };\n\n      Index alignedStart = internal::first_default_aligned(y, size);\n      Index alignedEnd = alignedStart + ((size-alignedStart)/PacketSize)*PacketSize;\n\n      const OtherPacket pc = pset1<OtherPacket>(c);\n      const OtherPacket ps = pset1<OtherPacket>(s);\n      conj_helper<OtherPacket,Packet,NumTraits<OtherScalar>::IsComplex,false> pcj;\n      conj_helper<OtherPacket,Packet,false,false> pm;\n\n      for(Index i=0; i<alignedStart; ++i)\n      {\n        Scalar xi = x[i];\n        Scalar yi = y[i];\n        x[i] =  c * xi + numext::conj(s) * yi;\n        y[i] = -s * xi + numext::conj(c) * yi;\n      }\n\n      Scalar* EIGEN_RESTRICT px = x + alignedStart;\n      Scalar* EIGEN_RESTRICT py = y + alignedStart;\n\n      if(internal::first_default_aligned(x, size)==alignedStart)\n      {\n        for(Index i=alignedStart; i<alignedEnd; i+=PacketSize)\n        {\n          Packet xi = pload<Packet>(px);\n          Packet yi = pload<Packet>(py);\n          pstore(px, padd(pm.pmul(pc,xi),pcj.pmul(ps,yi)));\n          pstore(py, psub(pcj.pmul(pc,yi),pm.pmul(ps,xi)));\n          px += PacketSize;\n          py += PacketSize;\n        }\n      }\n      else\n      {\n        Index peelingEnd = alignedStart + ((size-alignedStart)/(Peeling*PacketSize))*(Peeling*PacketSize);\n        for(Index i=alignedStart; i<peelingEnd; i+=Peeling*PacketSize)\n        {\n          Packet xi   = ploadu<Packet>(px);\n          Packet xi1  = ploadu<Packet>(px+PacketSize);\n          Packet yi   = pload <Packet>(py);\n          Packet yi1  = pload <Packet>(py+PacketSize);\n          pstoreu(px, padd(pm.pmul(pc,xi),pcj.pmul(ps,yi)));\n          pstoreu(px+PacketSize, padd(pm.pmul(pc,xi1),pcj.pmul(ps,yi1)));\n          pstore (py, psub(pcj.pmul(pc,yi),pm.pmul(ps,xi)));\n          pstore (py+PacketSize, psub(pcj.pmul(pc,yi1),pm.pmul(ps,xi1)));\n          px += Peeling*PacketSize;\n          py += Peeling*PacketSize;\n        }\n        if(alignedEnd!=peelingEnd)\n        {\n          Packet xi = ploadu<Packet>(x+peelingEnd);\n          Packet yi = pload <Packet>(y+peelingEnd);\n          pstoreu(x+peelingEnd, padd(pm.pmul(pc,xi),pcj.pmul(ps,yi)));\n          pstore (y+peelingEnd, psub(pcj.pmul(pc,yi),pm.pmul(ps,xi)));\n        }\n      }\n\n      for(Index i=alignedEnd; i<size; ++i)\n      {\n        Scalar xi = x[i];\n        Scalar yi = y[i];\n        x[i] =  c * xi + numext::conj(s) * yi;\n        y[i] = -s * xi + numext::conj(c) * yi;\n      }\n    }\n\n    /*** fixed-size vectorized path ***/\n    else if(SizeAtCompileTime != Dynamic && MinAlignment>0) // FIXME should be compared to the required alignment\n    {\n      const OtherPacket pc = pset1<OtherPacket>(c);\n      const OtherPacket ps = pset1<OtherPacket>(s);\n      conj_helper<OtherPacket,Packet,NumTraits<OtherPacket>::IsComplex,false> pcj;\n      conj_helper<OtherPacket,Packet,false,false> pm;\n      Scalar* EIGEN_RESTRICT px = x;\n      Scalar* EIGEN_RESTRICT py = y;\n      for(Index i=0; i<size; i+=PacketSize)\n      {\n        Packet xi = pload<Packet>(px);\n        Packet yi = pload<Packet>(py);\n        pstore(px, padd(pm.pmul(pc,xi),pcj.pmul(ps,yi)));\n        pstore(py, psub(pcj.pmul(pc,yi),pm.pmul(ps,xi)));\n        px += PacketSize;\n        py += PacketSize;\n      }\n    }\n\n    /*** non-vectorized path ***/\n    else\n    {\n      apply_rotation_in_the_plane_selector<Scalar,OtherScalar,SizeAtCompileTime,MinAlignment,false>::run(x,incrx,y,incry,size,c,s);\n    }\n  }\n};\n\ntemplate<typename VectorX, typename VectorY, typename OtherScalar>\nEIGEN_DEVICE_FUNC\nvoid /*EIGEN_DONT_INLINE*/ apply_rotation_in_the_plane(DenseBase<VectorX>& xpr_x, DenseBase<VectorY>& xpr_y, const JacobiRotation<OtherScalar>& j)\n{\n  typedef typename VectorX::Scalar Scalar;\n  const bool Vectorizable =    (VectorX::Flags & VectorY::Flags & PacketAccessBit)\n                            && (int(packet_traits<Scalar>::size) == int(packet_traits<OtherScalar>::size));\n\n  eigen_assert(xpr_x.size() == xpr_y.size());\n  Index size = xpr_x.size();\n  Index incrx = xpr_x.derived().innerStride();\n  Index incry = xpr_y.derived().innerStride();\n\n  Scalar* EIGEN_RESTRICT x = &xpr_x.derived().coeffRef(0);\n  Scalar* EIGEN_RESTRICT y = &xpr_y.derived().coeffRef(0);\n\n  OtherScalar c = j.c();\n  OtherScalar s = j.s();\n  if (c==OtherScalar(1) && s==OtherScalar(0))\n    return;\n\n  apply_rotation_in_the_plane_selector<\n    Scalar,OtherScalar,\n    VectorX::SizeAtCompileTime,\n    EIGEN_PLAIN_ENUM_MIN(evaluator<VectorX>::Alignment, evaluator<VectorY>::Alignment),\n    Vectorizable>::run(x,incrx,y,incry,size,c,s);\n}\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_JACOBI_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/KLUSupport/KLUSupport.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2017 Kyle Macfarlan <kyle.macfarlan@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_KLUSUPPORT_H\n#define EIGEN_KLUSUPPORT_H\n\nnamespace Eigen {\n\n/* TODO extract L, extract U, compute det, etc... */\n\n/** \\ingroup KLUSupport_Module\n  * \\brief A sparse LU factorization and solver based on KLU\n  *\n  * This class allows to solve for A.X = B sparse linear problems via a LU factorization\n  * using the KLU library. The sparse matrix A must be squared and full rank.\n  * The vectors or matrices X and B can be either dense or sparse.\n  *\n  * \\warning The input matrix A should be in a \\b compressed and \\b column-major form.\n  * Otherwise an expensive copy will be made. You can call the inexpensive makeCompressed() to get a compressed matrix.\n  * \\tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<>\n  *\n  * \\implsparsesolverconcept\n  *\n  * \\sa \\ref TutorialSparseSolverConcept, class UmfPackLU, class SparseLU\n  */\n\n\ninline int klu_solve(klu_symbolic *Symbolic, klu_numeric *Numeric, Index ldim, Index nrhs, double B [ ], klu_common *Common, double) {\n   return klu_solve(Symbolic, Numeric, internal::convert_index<int>(ldim), internal::convert_index<int>(nrhs), B, Common);\n}\n\ninline int klu_solve(klu_symbolic *Symbolic, klu_numeric *Numeric, Index ldim, Index nrhs, std::complex<double>B[], klu_common *Common, std::complex<double>) {\n   return klu_z_solve(Symbolic, Numeric, internal::convert_index<int>(ldim), internal::convert_index<int>(nrhs), &numext::real_ref(B[0]), Common);\n}\n\ninline int klu_tsolve(klu_symbolic *Symbolic, klu_numeric *Numeric, Index ldim, Index nrhs, double B[], klu_common *Common, double) {\n   return klu_tsolve(Symbolic, Numeric, internal::convert_index<int>(ldim), internal::convert_index<int>(nrhs), B, Common);\n}\n\ninline int klu_tsolve(klu_symbolic *Symbolic, klu_numeric *Numeric, Index ldim, Index nrhs, std::complex<double>B[], klu_common *Common, std::complex<double>) {\n   return klu_z_tsolve(Symbolic, Numeric, internal::convert_index<int>(ldim), internal::convert_index<int>(nrhs), &numext::real_ref(B[0]), 0, Common);\n}\n\ninline klu_numeric* klu_factor(int Ap [ ], int Ai [ ], double Ax [ ], klu_symbolic *Symbolic, klu_common *Common, double) {\n   return klu_factor(Ap, Ai, Ax, Symbolic, Common);\n}\n\ninline klu_numeric* klu_factor(int Ap[], int Ai[], std::complex<double> Ax[], klu_symbolic *Symbolic, klu_common *Common, std::complex<double>) {\n   return klu_z_factor(Ap, Ai, &numext::real_ref(Ax[0]), Symbolic, Common);\n}\n\n\ntemplate<typename _MatrixType>\nclass KLU : public SparseSolverBase<KLU<_MatrixType> >\n{\n  protected:\n    typedef SparseSolverBase<KLU<_MatrixType> > Base;\n    using Base::m_isInitialized;\n  public:\n    using Base::_solve_impl;\n    typedef _MatrixType MatrixType;\n    typedef typename MatrixType::Scalar Scalar;\n    typedef typename MatrixType::RealScalar RealScalar;\n    typedef typename MatrixType::StorageIndex StorageIndex;\n    typedef Matrix<Scalar,Dynamic,1> Vector;\n    typedef Matrix<int, 1, MatrixType::ColsAtCompileTime> IntRowVectorType;\n    typedef Matrix<int, MatrixType::RowsAtCompileTime, 1> IntColVectorType;\n    typedef SparseMatrix<Scalar> LUMatrixType;\n    typedef SparseMatrix<Scalar,ColMajor,int> KLUMatrixType;\n    typedef Ref<const KLUMatrixType, StandardCompressedFormat> KLUMatrixRef;\n    enum {\n      ColsAtCompileTime = MatrixType::ColsAtCompileTime,\n      MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime\n    };\n\n  public:\n\n    KLU()\n      : m_dummy(0,0), mp_matrix(m_dummy)\n    {\n      init();\n    }\n\n    template<typename InputMatrixType>\n    explicit KLU(const InputMatrixType& matrix)\n      : mp_matrix(matrix)\n    {\n      init();\n      compute(matrix);\n    }\n\n    ~KLU()\n    {\n      if(m_symbolic) klu_free_symbolic(&m_symbolic,&m_common);\n      if(m_numeric)  klu_free_numeric(&m_numeric,&m_common);\n    }\n\n    inline Index rows() const { return mp_matrix.rows(); }\n    inline Index cols() const { return mp_matrix.cols(); }\n\n    /** \\brief Reports whether previous computation was successful.\n      *\n      * \\returns \\c Success if computation was successful,\n      *          \\c NumericalIssue if the matrix.appears to be negative.\n      */\n    ComputationInfo info() const\n    {\n      eigen_assert(m_isInitialized && \"Decomposition is not initialized.\");\n      return m_info;\n    }\n#if 0 // not implemented yet\n    inline const LUMatrixType& matrixL() const\n    {\n      if (m_extractedDataAreDirty) extractData();\n      return m_l;\n    }\n\n    inline const LUMatrixType& matrixU() const\n    {\n      if (m_extractedDataAreDirty) extractData();\n      return m_u;\n    }\n\n    inline const IntColVectorType& permutationP() const\n    {\n      if (m_extractedDataAreDirty) extractData();\n      return m_p;\n    }\n\n    inline const IntRowVectorType& permutationQ() const\n    {\n      if (m_extractedDataAreDirty) extractData();\n      return m_q;\n    }\n#endif\n    /** Computes the sparse Cholesky decomposition of \\a matrix\n     *  Note that the matrix should be column-major, and in compressed format for best performance.\n     *  \\sa SparseMatrix::makeCompressed().\n     */\n    template<typename InputMatrixType>\n    void compute(const InputMatrixType& matrix)\n    {\n      if(m_symbolic) klu_free_symbolic(&m_symbolic, &m_common);\n      if(m_numeric)  klu_free_numeric(&m_numeric, &m_common);\n      grab(matrix.derived());\n      analyzePattern_impl();\n      factorize_impl();\n    }\n\n    /** Performs a symbolic decomposition on the sparcity of \\a matrix.\n      *\n      * This function is particularly useful when solving for several problems having the same structure.\n      *\n      * \\sa factorize(), compute()\n      */\n    template<typename InputMatrixType>\n    void analyzePattern(const InputMatrixType& matrix)\n    {\n      if(m_symbolic) klu_free_symbolic(&m_symbolic, &m_common);\n      if(m_numeric)  klu_free_numeric(&m_numeric, &m_common);\n\n      grab(matrix.derived());\n\n      analyzePattern_impl();\n    }\n\n\n    /** Provides access to the control settings array used by KLU.\n      *\n      * See KLU documentation for details.\n      */\n    inline const klu_common& kluCommon() const\n    {\n      return m_common;\n    }\n\n    /** Provides access to the control settings array used by UmfPack.\n      *\n      * If this array contains NaN's, the default values are used.\n      *\n      * See KLU documentation for details.\n      */\n    inline klu_common& kluCommon()\n    {\n      return m_common;\n    }\n\n    /** Performs a numeric decomposition of \\a matrix\n      *\n      * The given matrix must has the same sparcity than the matrix on which the pattern anylysis has been performed.\n      *\n      * \\sa analyzePattern(), compute()\n      */\n    template<typename InputMatrixType>\n    void factorize(const InputMatrixType& matrix)\n    {\n      eigen_assert(m_analysisIsOk && \"KLU: you must first call analyzePattern()\");\n      if(m_numeric)\n        klu_free_numeric(&m_numeric,&m_common);\n\n      grab(matrix.derived());\n\n      factorize_impl();\n    }\n\n    /** \\internal */\n    template<typename BDerived,typename XDerived>\n    bool _solve_impl(const MatrixBase<BDerived> &b, MatrixBase<XDerived> &x) const;\n\n#if 0 // not implemented yet\n    Scalar determinant() const;\n\n    void extractData() const;\n#endif\n\n  protected:\n\n    void init()\n    {\n      m_info                  = InvalidInput;\n      m_isInitialized         = false;\n      m_numeric               = 0;\n      m_symbolic              = 0;\n      m_extractedDataAreDirty = true;\n\n      klu_defaults(&m_common);\n    }\n\n    void analyzePattern_impl()\n    {\n      m_info = InvalidInput;\n      m_analysisIsOk = false;\n      m_factorizationIsOk = false;\n      m_symbolic = klu_analyze(internal::convert_index<int>(mp_matrix.rows()),\n                                     const_cast<StorageIndex*>(mp_matrix.outerIndexPtr()), const_cast<StorageIndex*>(mp_matrix.innerIndexPtr()),\n                                     &m_common);\n      if (m_symbolic) {\n         m_isInitialized = true;\n         m_info = Success;\n         m_analysisIsOk = true;\n         m_extractedDataAreDirty = true;\n      }\n    }\n\n    void factorize_impl()\n    {\n\n      m_numeric = klu_factor(const_cast<StorageIndex*>(mp_matrix.outerIndexPtr()), const_cast<StorageIndex*>(mp_matrix.innerIndexPtr()), const_cast<Scalar*>(mp_matrix.valuePtr()),\n                                    m_symbolic, &m_common, Scalar());\n                                         \n\n      m_info = m_numeric ? Success : NumericalIssue;\n      m_factorizationIsOk = m_numeric ? 1 : 0;\n      m_extractedDataAreDirty = true;\n    }\n\n    template<typename MatrixDerived>\n    void grab(const EigenBase<MatrixDerived> &A)\n    {\n      mp_matrix.~KLUMatrixRef();\n      ::new (&mp_matrix) KLUMatrixRef(A.derived());\n    }\n\n    void grab(const KLUMatrixRef &A)\n    {\n      if(&(A.derived()) != &mp_matrix)\n      {\n        mp_matrix.~KLUMatrixRef();\n        ::new (&mp_matrix) KLUMatrixRef(A);\n      }\n    }\n\n    // cached data to reduce reallocation, etc.\n#if 0 // not implemented yet\n    mutable LUMatrixType m_l;\n    mutable LUMatrixType m_u;\n    mutable IntColVectorType m_p;\n    mutable IntRowVectorType m_q;\n#endif\n\n    KLUMatrixType m_dummy;\n    KLUMatrixRef mp_matrix;\n\n    klu_numeric* m_numeric;\n    klu_symbolic* m_symbolic;\n    klu_common m_common;\n    mutable ComputationInfo m_info;\n    int m_factorizationIsOk;\n    int m_analysisIsOk;\n    mutable bool m_extractedDataAreDirty;\n\n  private:\n    KLU(const KLU& ) { }\n};\n\n#if 0 // not implemented yet\ntemplate<typename MatrixType>\nvoid KLU<MatrixType>::extractData() const\n{\n  if (m_extractedDataAreDirty)\n  {\n     eigen_assert(false && \"KLU: extractData Not Yet Implemented\");\n\n    // get size of the data\n    int lnz, unz, rows, cols, nz_udiag;\n    umfpack_get_lunz(&lnz, &unz, &rows, &cols, &nz_udiag, m_numeric, Scalar());\n\n    // allocate data\n    m_l.resize(rows,(std::min)(rows,cols));\n    m_l.resizeNonZeros(lnz);\n\n    m_u.resize((std::min)(rows,cols),cols);\n    m_u.resizeNonZeros(unz);\n\n    m_p.resize(rows);\n    m_q.resize(cols);\n\n    // extract\n    umfpack_get_numeric(m_l.outerIndexPtr(), m_l.innerIndexPtr(), m_l.valuePtr(),\n                        m_u.outerIndexPtr(), m_u.innerIndexPtr(), m_u.valuePtr(),\n                        m_p.data(), m_q.data(), 0, 0, 0, m_numeric);\n\n    m_extractedDataAreDirty = false;\n  }\n}\n\ntemplate<typename MatrixType>\ntypename KLU<MatrixType>::Scalar KLU<MatrixType>::determinant() const\n{\n  eigen_assert(false && \"KLU: extractData Not Yet Implemented\");\n  return Scalar();\n}\n#endif\n\ntemplate<typename MatrixType>\ntemplate<typename BDerived,typename XDerived>\nbool KLU<MatrixType>::_solve_impl(const MatrixBase<BDerived> &b, MatrixBase<XDerived> &x) const\n{\n  Index rhsCols = b.cols();\n  EIGEN_STATIC_ASSERT((XDerived::Flags&RowMajorBit)==0, THIS_METHOD_IS_ONLY_FOR_COLUMN_MAJOR_MATRICES);\n  eigen_assert(m_factorizationIsOk && \"The decomposition is not in a valid state for solving, you must first call either compute() or analyzePattern()/factorize()\");\n\n  x = b;\n  int info = klu_solve(m_symbolic, m_numeric, b.rows(), rhsCols, x.const_cast_derived().data(), const_cast<klu_common*>(&m_common), Scalar());\n\n  m_info = info!=0 ? Success : NumericalIssue;\n  return true;\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_KLUSUPPORT_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/LU/Determinant.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_DETERMINANT_H\n#define EIGEN_DETERMINANT_H\n\nnamespace Eigen { \n\nnamespace internal {\n\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC\ninline const typename Derived::Scalar bruteforce_det3_helper\n(const MatrixBase<Derived>& matrix, int a, int b, int c)\n{\n  return matrix.coeff(0,a)\n         * (matrix.coeff(1,b) * matrix.coeff(2,c) - matrix.coeff(1,c) * matrix.coeff(2,b));\n}\n\ntemplate<typename Derived,\n         int DeterminantType = Derived::RowsAtCompileTime\n> struct determinant_impl\n{\n  static inline typename traits<Derived>::Scalar run(const Derived& m)\n  {\n    if(Derived::ColsAtCompileTime==Dynamic && m.rows()==0)\n      return typename traits<Derived>::Scalar(1);\n    return m.partialPivLu().determinant();\n  }\n};\n\ntemplate<typename Derived> struct determinant_impl<Derived, 1>\n{\n  static inline EIGEN_DEVICE_FUNC\n  typename traits<Derived>::Scalar run(const Derived& m)\n  {\n    return m.coeff(0,0);\n  }\n};\n\ntemplate<typename Derived> struct determinant_impl<Derived, 2>\n{\n  static inline EIGEN_DEVICE_FUNC\n  typename traits<Derived>::Scalar run(const Derived& m)\n  {\n    return m.coeff(0,0) * m.coeff(1,1) - m.coeff(1,0) * m.coeff(0,1);\n  }\n};\n\ntemplate<typename Derived> struct determinant_impl<Derived, 3>\n{\n  static inline EIGEN_DEVICE_FUNC\n  typename traits<Derived>::Scalar run(const Derived& m)\n  {\n    return bruteforce_det3_helper(m,0,1,2)\n          - bruteforce_det3_helper(m,1,0,2)\n          + bruteforce_det3_helper(m,2,0,1);\n  }\n};\n\ntemplate<typename Derived> struct determinant_impl<Derived, 4>\n{\n  typedef typename traits<Derived>::Scalar Scalar;\n  static EIGEN_DEVICE_FUNC\n  Scalar run(const Derived& m)\n  {\n    Scalar d2_01 = det2(m, 0, 1);\n    Scalar d2_02 = det2(m, 0, 2);\n    Scalar d2_03 = det2(m, 0, 3);\n    Scalar d2_12 = det2(m, 1, 2);\n    Scalar d2_13 = det2(m, 1, 3);\n    Scalar d2_23 = det2(m, 2, 3);\n    Scalar d3_0 = det3(m, 1,d2_23, 2,d2_13, 3,d2_12);\n    Scalar d3_1 = det3(m, 0,d2_23, 2,d2_03, 3,d2_02);\n    Scalar d3_2 = det3(m, 0,d2_13, 1,d2_03, 3,d2_01);\n    Scalar d3_3 = det3(m, 0,d2_12, 1,d2_02, 2,d2_01);\n    return internal::pmadd(-m(0,3),d3_0, m(1,3)*d3_1) +\n           internal::pmadd(-m(2,3),d3_2, m(3,3)*d3_3);\n  }\nprotected:\n  static EIGEN_DEVICE_FUNC\n  Scalar det2(const Derived& m, Index i0, Index i1)\n  {\n    return m(i0,0) * m(i1,1) - m(i1,0) * m(i0,1);\n  }\n\n  static EIGEN_DEVICE_FUNC\n  Scalar det3(const Derived& m, Index i0, const Scalar& d0, Index i1, const Scalar& d1, Index i2, const Scalar& d2)\n  {\n    return internal::pmadd(m(i0,2), d0, internal::pmadd(-m(i1,2), d1, m(i2,2)*d2));\n  }\n};\n\n} // end namespace internal\n\n/** \\lu_module\n  *\n  * \\returns the determinant of this matrix\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC\ninline typename internal::traits<Derived>::Scalar MatrixBase<Derived>::determinant() const\n{\n  eigen_assert(rows() == cols());\n  typedef typename internal::nested_eval<Derived,Base::RowsAtCompileTime>::type Nested;\n  return internal::determinant_impl<typename internal::remove_all<Nested>::type>::run(derived());\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_DETERMINANT_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/LU/FullPivLU.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2009 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_LU_H\n#define EIGEN_LU_H\n\nnamespace Eigen {\n\nnamespace internal {\ntemplate<typename _MatrixType> struct traits<FullPivLU<_MatrixType> >\n : traits<_MatrixType>\n{\n  typedef MatrixXpr XprKind;\n  typedef SolverStorage StorageKind;\n  typedef int StorageIndex;\n  enum { Flags = 0 };\n};\n\n} // end namespace internal\n\n/** \\ingroup LU_Module\n  *\n  * \\class FullPivLU\n  *\n  * \\brief LU decomposition of a matrix with complete pivoting, and related features\n  *\n  * \\tparam _MatrixType the type of the matrix of which we are computing the LU decomposition\n  *\n  * This class represents a LU decomposition of any matrix, with complete pivoting: the matrix A is\n  * decomposed as \\f$ A = P^{-1} L U Q^{-1} \\f$ where L is unit-lower-triangular, U is\n  * upper-triangular, and P and Q are permutation matrices. This is a rank-revealing LU\n  * decomposition. The eigenvalues (diagonal coefficients) of U are sorted in such a way that any\n  * zeros are at the end.\n  *\n  * This decomposition provides the generic approach to solving systems of linear equations, computing\n  * the rank, invertibility, inverse, kernel, and determinant.\n  *\n  * This LU decomposition is very stable and well tested with large matrices. However there are use cases where the SVD\n  * decomposition is inherently more stable and/or flexible. For example, when computing the kernel of a matrix,\n  * working with the SVD allows to select the smallest singular values of the matrix, something that\n  * the LU decomposition doesn't see.\n  *\n  * The data of the LU decomposition can be directly accessed through the methods matrixLU(),\n  * permutationP(), permutationQ().\n  *\n  * As an example, here is how the original matrix can be retrieved:\n  * \\include class_FullPivLU.cpp\n  * Output: \\verbinclude class_FullPivLU.out\n  *\n  * This class supports the \\link InplaceDecomposition inplace decomposition \\endlink mechanism.\n  *\n  * \\sa MatrixBase::fullPivLu(), MatrixBase::determinant(), MatrixBase::inverse()\n  */\ntemplate<typename _MatrixType> class FullPivLU\n  : public SolverBase<FullPivLU<_MatrixType> >\n{\n  public:\n    typedef _MatrixType MatrixType;\n    typedef SolverBase<FullPivLU> Base;\n    friend class SolverBase<FullPivLU>;\n\n    EIGEN_GENERIC_PUBLIC_INTERFACE(FullPivLU)\n    enum {\n      MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime,\n      MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime\n    };\n    typedef typename internal::plain_row_type<MatrixType, StorageIndex>::type IntRowVectorType;\n    typedef typename internal::plain_col_type<MatrixType, StorageIndex>::type IntColVectorType;\n    typedef PermutationMatrix<ColsAtCompileTime, MaxColsAtCompileTime> PermutationQType;\n    typedef PermutationMatrix<RowsAtCompileTime, MaxRowsAtCompileTime> PermutationPType;\n    typedef typename MatrixType::PlainObject PlainObject;\n\n    /**\n      * \\brief Default Constructor.\n      *\n      * The default constructor is useful in cases in which the user intends to\n      * perform decompositions via LU::compute(const MatrixType&).\n      */\n    FullPivLU();\n\n    /** \\brief Default Constructor with memory preallocation\n      *\n      * Like the default constructor but with preallocation of the internal data\n      * according to the specified problem \\a size.\n      * \\sa FullPivLU()\n      */\n    FullPivLU(Index rows, Index cols);\n\n    /** Constructor.\n      *\n      * \\param matrix the matrix of which to compute the LU decomposition.\n      *               It is required to be nonzero.\n      */\n    template<typename InputType>\n    explicit FullPivLU(const EigenBase<InputType>& matrix);\n\n    /** \\brief Constructs a LU factorization from a given matrix\n      *\n      * This overloaded constructor is provided for \\link InplaceDecomposition inplace decomposition \\endlink when \\c MatrixType is a Eigen::Ref.\n      *\n      * \\sa FullPivLU(const EigenBase&)\n      */\n    template<typename InputType>\n    explicit FullPivLU(EigenBase<InputType>& matrix);\n\n    /** Computes the LU decomposition of the given matrix.\n      *\n      * \\param matrix the matrix of which to compute the LU decomposition.\n      *               It is required to be nonzero.\n      *\n      * \\returns a reference to *this\n      */\n    template<typename InputType>\n    FullPivLU& compute(const EigenBase<InputType>& matrix) {\n      m_lu = matrix.derived();\n      computeInPlace();\n      return *this;\n    }\n\n    /** \\returns the LU decomposition matrix: the upper-triangular part is U, the\n      * unit-lower-triangular part is L (at least for square matrices; in the non-square\n      * case, special care is needed, see the documentation of class FullPivLU).\n      *\n      * \\sa matrixL(), matrixU()\n      */\n    inline const MatrixType& matrixLU() const\n    {\n      eigen_assert(m_isInitialized && \"LU is not initialized.\");\n      return m_lu;\n    }\n\n    /** \\returns the number of nonzero pivots in the LU decomposition.\n      * Here nonzero is meant in the exact sense, not in a fuzzy sense.\n      * So that notion isn't really intrinsically interesting, but it is\n      * still useful when implementing algorithms.\n      *\n      * \\sa rank()\n      */\n    inline Index nonzeroPivots() const\n    {\n      eigen_assert(m_isInitialized && \"LU is not initialized.\");\n      return m_nonzero_pivots;\n    }\n\n    /** \\returns the absolute value of the biggest pivot, i.e. the biggest\n      *          diagonal coefficient of U.\n      */\n    RealScalar maxPivot() const { return m_maxpivot; }\n\n    /** \\returns the permutation matrix P\n      *\n      * \\sa permutationQ()\n      */\n    EIGEN_DEVICE_FUNC inline const PermutationPType& permutationP() const\n    {\n      eigen_assert(m_isInitialized && \"LU is not initialized.\");\n      return m_p;\n    }\n\n    /** \\returns the permutation matrix Q\n      *\n      * \\sa permutationP()\n      */\n    inline const PermutationQType& permutationQ() const\n    {\n      eigen_assert(m_isInitialized && \"LU is not initialized.\");\n      return m_q;\n    }\n\n    /** \\returns the kernel of the matrix, also called its null-space. The columns of the returned matrix\n      * will form a basis of the kernel.\n      *\n      * \\note If the kernel has dimension zero, then the returned matrix is a column-vector filled with zeros.\n      *\n      * \\note This method has to determine which pivots should be considered nonzero.\n      *       For that, it uses the threshold value that you can control by calling\n      *       setThreshold(const RealScalar&).\n      *\n      * Example: \\include FullPivLU_kernel.cpp\n      * Output: \\verbinclude FullPivLU_kernel.out\n      *\n      * \\sa image()\n      */\n    inline const internal::kernel_retval<FullPivLU> kernel() const\n    {\n      eigen_assert(m_isInitialized && \"LU is not initialized.\");\n      return internal::kernel_retval<FullPivLU>(*this);\n    }\n\n    /** \\returns the image of the matrix, also called its column-space. The columns of the returned matrix\n      * will form a basis of the image (column-space).\n      *\n      * \\param originalMatrix the original matrix, of which *this is the LU decomposition.\n      *                       The reason why it is needed to pass it here, is that this allows\n      *                       a large optimization, as otherwise this method would need to reconstruct it\n      *                       from the LU decomposition.\n      *\n      * \\note If the image has dimension zero, then the returned matrix is a column-vector filled with zeros.\n      *\n      * \\note This method has to determine which pivots should be considered nonzero.\n      *       For that, it uses the threshold value that you can control by calling\n      *       setThreshold(const RealScalar&).\n      *\n      * Example: \\include FullPivLU_image.cpp\n      * Output: \\verbinclude FullPivLU_image.out\n      *\n      * \\sa kernel()\n      */\n    inline const internal::image_retval<FullPivLU>\n      image(const MatrixType& originalMatrix) const\n    {\n      eigen_assert(m_isInitialized && \"LU is not initialized.\");\n      return internal::image_retval<FullPivLU>(*this, originalMatrix);\n    }\n\n    #ifdef EIGEN_PARSED_BY_DOXYGEN\n    /** \\return a solution x to the equation Ax=b, where A is the matrix of which\n      * *this is the LU decomposition.\n      *\n      * \\param b the right-hand-side of the equation to solve. Can be a vector or a matrix,\n      *          the only requirement in order for the equation to make sense is that\n      *          b.rows()==A.rows(), where A is the matrix of which *this is the LU decomposition.\n      *\n      * \\returns a solution.\n      *\n      * \\note_about_checking_solutions\n      *\n      * \\note_about_arbitrary_choice_of_solution\n      * \\note_about_using_kernel_to_study_multiple_solutions\n      *\n      * Example: \\include FullPivLU_solve.cpp\n      * Output: \\verbinclude FullPivLU_solve.out\n      *\n      * \\sa TriangularView::solve(), kernel(), inverse()\n      */\n    template<typename Rhs>\n    inline const Solve<FullPivLU, Rhs>\n    solve(const MatrixBase<Rhs>& b) const;\n    #endif\n\n    /** \\returns an estimate of the reciprocal condition number of the matrix of which \\c *this is\n        the LU decomposition.\n      */\n    inline RealScalar rcond() const\n    {\n      eigen_assert(m_isInitialized && \"PartialPivLU is not initialized.\");\n      return internal::rcond_estimate_helper(m_l1_norm, *this);\n    }\n\n    /** \\returns the determinant of the matrix of which\n      * *this is the LU decomposition. It has only linear complexity\n      * (that is, O(n) where n is the dimension of the square matrix)\n      * as the LU decomposition has already been computed.\n      *\n      * \\note This is only for square matrices.\n      *\n      * \\note For fixed-size matrices of size up to 4, MatrixBase::determinant() offers\n      *       optimized paths.\n      *\n      * \\warning a determinant can be very big or small, so for matrices\n      * of large enough dimension, there is a risk of overflow/underflow.\n      *\n      * \\sa MatrixBase::determinant()\n      */\n    typename internal::traits<MatrixType>::Scalar determinant() const;\n\n    /** Allows to prescribe a threshold to be used by certain methods, such as rank(),\n      * who need to determine when pivots are to be considered nonzero. This is not used for the\n      * LU decomposition itself.\n      *\n      * When it needs to get the threshold value, Eigen calls threshold(). By default, this\n      * uses a formula to automatically determine a reasonable threshold.\n      * Once you have called the present method setThreshold(const RealScalar&),\n      * your value is used instead.\n      *\n      * \\param threshold The new value to use as the threshold.\n      *\n      * A pivot will be considered nonzero if its absolute value is strictly greater than\n      *  \\f$ \\vert pivot \\vert \\leqslant threshold \\times \\vert maxpivot \\vert \\f$\n      * where maxpivot is the biggest pivot.\n      *\n      * If you want to come back to the default behavior, call setThreshold(Default_t)\n      */\n    FullPivLU& setThreshold(const RealScalar& threshold)\n    {\n      m_usePrescribedThreshold = true;\n      m_prescribedThreshold = threshold;\n      return *this;\n    }\n\n    /** Allows to come back to the default behavior, letting Eigen use its default formula for\n      * determining the threshold.\n      *\n      * You should pass the special object Eigen::Default as parameter here.\n      * \\code lu.setThreshold(Eigen::Default); \\endcode\n      *\n      * See the documentation of setThreshold(const RealScalar&).\n      */\n    FullPivLU& setThreshold(Default_t)\n    {\n      m_usePrescribedThreshold = false;\n      return *this;\n    }\n\n    /** Returns the threshold that will be used by certain methods such as rank().\n      *\n      * See the documentation of setThreshold(const RealScalar&).\n      */\n    RealScalar threshold() const\n    {\n      eigen_assert(m_isInitialized || m_usePrescribedThreshold);\n      return m_usePrescribedThreshold ? m_prescribedThreshold\n      // this formula comes from experimenting (see \"LU precision tuning\" thread on the list)\n      // and turns out to be identical to Higham's formula used already in LDLt.\n          : NumTraits<Scalar>::epsilon() * RealScalar(m_lu.diagonalSize());\n    }\n\n    /** \\returns the rank of the matrix of which *this is the LU decomposition.\n      *\n      * \\note This method has to determine which pivots should be considered nonzero.\n      *       For that, it uses the threshold value that you can control by calling\n      *       setThreshold(const RealScalar&).\n      */\n    inline Index rank() const\n    {\n      using std::abs;\n      eigen_assert(m_isInitialized && \"LU is not initialized.\");\n      RealScalar premultiplied_threshold = abs(m_maxpivot) * threshold();\n      Index result = 0;\n      for(Index i = 0; i < m_nonzero_pivots; ++i)\n        result += (abs(m_lu.coeff(i,i)) > premultiplied_threshold);\n      return result;\n    }\n\n    /** \\returns the dimension of the kernel of the matrix of which *this is the LU decomposition.\n      *\n      * \\note This method has to determine which pivots should be considered nonzero.\n      *       For that, it uses the threshold value that you can control by calling\n      *       setThreshold(const RealScalar&).\n      */\n    inline Index dimensionOfKernel() const\n    {\n      eigen_assert(m_isInitialized && \"LU is not initialized.\");\n      return cols() - rank();\n    }\n\n    /** \\returns true if the matrix of which *this is the LU decomposition represents an injective\n      *          linear map, i.e. has trivial kernel; false otherwise.\n      *\n      * \\note This method has to determine which pivots should be considered nonzero.\n      *       For that, it uses the threshold value that you can control by calling\n      *       setThreshold(const RealScalar&).\n      */\n    inline bool isInjective() const\n    {\n      eigen_assert(m_isInitialized && \"LU is not initialized.\");\n      return rank() == cols();\n    }\n\n    /** \\returns true if the matrix of which *this is the LU decomposition represents a surjective\n      *          linear map; false otherwise.\n      *\n      * \\note This method has to determine which pivots should be considered nonzero.\n      *       For that, it uses the threshold value that you can control by calling\n      *       setThreshold(const RealScalar&).\n      */\n    inline bool isSurjective() const\n    {\n      eigen_assert(m_isInitialized && \"LU is not initialized.\");\n      return rank() == rows();\n    }\n\n    /** \\returns true if the matrix of which *this is the LU decomposition is invertible.\n      *\n      * \\note This method has to determine which pivots should be considered nonzero.\n      *       For that, it uses the threshold value that you can control by calling\n      *       setThreshold(const RealScalar&).\n      */\n    inline bool isInvertible() const\n    {\n      eigen_assert(m_isInitialized && \"LU is not initialized.\");\n      return isInjective() && (m_lu.rows() == m_lu.cols());\n    }\n\n    /** \\returns the inverse of the matrix of which *this is the LU decomposition.\n      *\n      * \\note If this matrix is not invertible, the returned matrix has undefined coefficients.\n      *       Use isInvertible() to first determine whether this matrix is invertible.\n      *\n      * \\sa MatrixBase::inverse()\n      */\n    inline const Inverse<FullPivLU> inverse() const\n    {\n      eigen_assert(m_isInitialized && \"LU is not initialized.\");\n      eigen_assert(m_lu.rows() == m_lu.cols() && \"You can't take the inverse of a non-square matrix!\");\n      return Inverse<FullPivLU>(*this);\n    }\n\n    MatrixType reconstructedMatrix() const;\n\n    EIGEN_DEVICE_FUNC inline Index rows() const { return m_lu.rows(); }\n    EIGEN_DEVICE_FUNC inline Index cols() const { return m_lu.cols(); }\n\n    #ifndef EIGEN_PARSED_BY_DOXYGEN\n    template<typename RhsType, typename DstType>\n    void _solve_impl(const RhsType &rhs, DstType &dst) const;\n\n    template<bool Conjugate, typename RhsType, typename DstType>\n    void _solve_impl_transposed(const RhsType &rhs, DstType &dst) const;\n    #endif\n\n  protected:\n\n    static void check_template_parameters()\n    {\n      EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar);\n    }\n\n    void computeInPlace();\n\n    MatrixType m_lu;\n    PermutationPType m_p;\n    PermutationQType m_q;\n    IntColVectorType m_rowsTranspositions;\n    IntRowVectorType m_colsTranspositions;\n    Index m_nonzero_pivots;\n    RealScalar m_l1_norm;\n    RealScalar m_maxpivot, m_prescribedThreshold;\n    signed char m_det_pq;\n    bool m_isInitialized, m_usePrescribedThreshold;\n};\n\ntemplate<typename MatrixType>\nFullPivLU<MatrixType>::FullPivLU()\n  : m_isInitialized(false), m_usePrescribedThreshold(false)\n{\n}\n\ntemplate<typename MatrixType>\nFullPivLU<MatrixType>::FullPivLU(Index rows, Index cols)\n  : m_lu(rows, cols),\n    m_p(rows),\n    m_q(cols),\n    m_rowsTranspositions(rows),\n    m_colsTranspositions(cols),\n    m_isInitialized(false),\n    m_usePrescribedThreshold(false)\n{\n}\n\ntemplate<typename MatrixType>\ntemplate<typename InputType>\nFullPivLU<MatrixType>::FullPivLU(const EigenBase<InputType>& matrix)\n  : m_lu(matrix.rows(), matrix.cols()),\n    m_p(matrix.rows()),\n    m_q(matrix.cols()),\n    m_rowsTranspositions(matrix.rows()),\n    m_colsTranspositions(matrix.cols()),\n    m_isInitialized(false),\n    m_usePrescribedThreshold(false)\n{\n  compute(matrix.derived());\n}\n\ntemplate<typename MatrixType>\ntemplate<typename InputType>\nFullPivLU<MatrixType>::FullPivLU(EigenBase<InputType>& matrix)\n  : m_lu(matrix.derived()),\n    m_p(matrix.rows()),\n    m_q(matrix.cols()),\n    m_rowsTranspositions(matrix.rows()),\n    m_colsTranspositions(matrix.cols()),\n    m_isInitialized(false),\n    m_usePrescribedThreshold(false)\n{\n  computeInPlace();\n}\n\ntemplate<typename MatrixType>\nvoid FullPivLU<MatrixType>::computeInPlace()\n{\n  check_template_parameters();\n\n  // the permutations are stored as int indices, so just to be sure:\n  eigen_assert(m_lu.rows()<=NumTraits<int>::highest() && m_lu.cols()<=NumTraits<int>::highest());\n\n  m_l1_norm = m_lu.cwiseAbs().colwise().sum().maxCoeff();\n\n  const Index size = m_lu.diagonalSize();\n  const Index rows = m_lu.rows();\n  const Index cols = m_lu.cols();\n\n  // will store the transpositions, before we accumulate them at the end.\n  // can't accumulate on-the-fly because that will be done in reverse order for the rows.\n  m_rowsTranspositions.resize(m_lu.rows());\n  m_colsTranspositions.resize(m_lu.cols());\n  Index number_of_transpositions = 0; // number of NONTRIVIAL transpositions, i.e. m_rowsTranspositions[i]!=i\n\n  m_nonzero_pivots = size; // the generic case is that in which all pivots are nonzero (invertible case)\n  m_maxpivot = RealScalar(0);\n\n  for(Index k = 0; k < size; ++k)\n  {\n    // First, we need to find the pivot.\n\n    // biggest coefficient in the remaining bottom-right corner (starting at row k, col k)\n    Index row_of_biggest_in_corner, col_of_biggest_in_corner;\n    typedef internal::scalar_score_coeff_op<Scalar> Scoring;\n    typedef typename Scoring::result_type Score;\n    Score biggest_in_corner;\n    biggest_in_corner = m_lu.bottomRightCorner(rows-k, cols-k)\n                        .unaryExpr(Scoring())\n                        .maxCoeff(&row_of_biggest_in_corner, &col_of_biggest_in_corner);\n    row_of_biggest_in_corner += k; // correct the values! since they were computed in the corner,\n    col_of_biggest_in_corner += k; // need to add k to them.\n\n    if(biggest_in_corner==Score(0))\n    {\n      // before exiting, make sure to initialize the still uninitialized transpositions\n      // in a sane state without destroying what we already have.\n      m_nonzero_pivots = k;\n      for(Index i = k; i < size; ++i)\n      {\n        m_rowsTranspositions.coeffRef(i) = internal::convert_index<StorageIndex>(i);\n        m_colsTranspositions.coeffRef(i) = internal::convert_index<StorageIndex>(i);\n      }\n      break;\n    }\n\n    RealScalar abs_pivot = internal::abs_knowing_score<Scalar>()(m_lu(row_of_biggest_in_corner, col_of_biggest_in_corner), biggest_in_corner);\n    if(abs_pivot > m_maxpivot) m_maxpivot = abs_pivot;\n\n    // Now that we've found the pivot, we need to apply the row/col swaps to\n    // bring it to the location (k,k).\n\n    m_rowsTranspositions.coeffRef(k) = internal::convert_index<StorageIndex>(row_of_biggest_in_corner);\n    m_colsTranspositions.coeffRef(k) = internal::convert_index<StorageIndex>(col_of_biggest_in_corner);\n    if(k != row_of_biggest_in_corner) {\n      m_lu.row(k).swap(m_lu.row(row_of_biggest_in_corner));\n      ++number_of_transpositions;\n    }\n    if(k != col_of_biggest_in_corner) {\n      m_lu.col(k).swap(m_lu.col(col_of_biggest_in_corner));\n      ++number_of_transpositions;\n    }\n\n    // Now that the pivot is at the right location, we update the remaining\n    // bottom-right corner by Gaussian elimination.\n\n    if(k<rows-1)\n      m_lu.col(k).tail(rows-k-1) /= m_lu.coeff(k,k);\n    if(k<size-1)\n      m_lu.block(k+1,k+1,rows-k-1,cols-k-1).noalias() -= m_lu.col(k).tail(rows-k-1) * m_lu.row(k).tail(cols-k-1);\n  }\n\n  // the main loop is over, we still have to accumulate the transpositions to find the\n  // permutations P and Q\n\n  m_p.setIdentity(rows);\n  for(Index k = size-1; k >= 0; --k)\n    m_p.applyTranspositionOnTheRight(k, m_rowsTranspositions.coeff(k));\n\n  m_q.setIdentity(cols);\n  for(Index k = 0; k < size; ++k)\n    m_q.applyTranspositionOnTheRight(k, m_colsTranspositions.coeff(k));\n\n  m_det_pq = (number_of_transpositions%2) ? -1 : 1;\n\n  m_isInitialized = true;\n}\n\ntemplate<typename MatrixType>\ntypename internal::traits<MatrixType>::Scalar FullPivLU<MatrixType>::determinant() const\n{\n  eigen_assert(m_isInitialized && \"LU is not initialized.\");\n  eigen_assert(m_lu.rows() == m_lu.cols() && \"You can't take the determinant of a non-square matrix!\");\n  return Scalar(m_det_pq) * Scalar(m_lu.diagonal().prod());\n}\n\n/** \\returns the matrix represented by the decomposition,\n * i.e., it returns the product: \\f$ P^{-1} L U Q^{-1} \\f$.\n * This function is provided for debug purposes. */\ntemplate<typename MatrixType>\nMatrixType FullPivLU<MatrixType>::reconstructedMatrix() const\n{\n  eigen_assert(m_isInitialized && \"LU is not initialized.\");\n  const Index smalldim = (std::min)(m_lu.rows(), m_lu.cols());\n  // LU\n  MatrixType res(m_lu.rows(),m_lu.cols());\n  // FIXME the .toDenseMatrix() should not be needed...\n  res = m_lu.leftCols(smalldim)\n            .template triangularView<UnitLower>().toDenseMatrix()\n      * m_lu.topRows(smalldim)\n            .template triangularView<Upper>().toDenseMatrix();\n\n  // P^{-1}(LU)\n  res = m_p.inverse() * res;\n\n  // (P^{-1}LU)Q^{-1}\n  res = res * m_q.inverse();\n\n  return res;\n}\n\n/********* Implementation of kernel() **************************************************/\n\nnamespace internal {\ntemplate<typename _MatrixType>\nstruct kernel_retval<FullPivLU<_MatrixType> >\n  : kernel_retval_base<FullPivLU<_MatrixType> >\n{\n  EIGEN_MAKE_KERNEL_HELPERS(FullPivLU<_MatrixType>)\n\n  enum { MaxSmallDimAtCompileTime = EIGEN_SIZE_MIN_PREFER_FIXED(\n            MatrixType::MaxColsAtCompileTime,\n            MatrixType::MaxRowsAtCompileTime)\n  };\n\n  template<typename Dest> void evalTo(Dest& dst) const\n  {\n    using std::abs;\n    const Index cols = dec().matrixLU().cols(), dimker = cols - rank();\n    if(dimker == 0)\n    {\n      // The Kernel is just {0}, so it doesn't have a basis properly speaking, but let's\n      // avoid crashing/asserting as that depends on floating point calculations. Let's\n      // just return a single column vector filled with zeros.\n      dst.setZero();\n      return;\n    }\n\n    /* Let us use the following lemma:\n      *\n      * Lemma: If the matrix A has the LU decomposition PAQ = LU,\n      * then Ker A = Q(Ker U).\n      *\n      * Proof: trivial: just keep in mind that P, Q, L are invertible.\n      */\n\n    /* Thus, all we need to do is to compute Ker U, and then apply Q.\n      *\n      * U is upper triangular, with eigenvalues sorted so that any zeros appear at the end.\n      * Thus, the diagonal of U ends with exactly\n      * dimKer zero's. Let us use that to construct dimKer linearly\n      * independent vectors in Ker U.\n      */\n\n    Matrix<Index, Dynamic, 1, 0, MaxSmallDimAtCompileTime, 1> pivots(rank());\n    RealScalar premultiplied_threshold = dec().maxPivot() * dec().threshold();\n    Index p = 0;\n    for(Index i = 0; i < dec().nonzeroPivots(); ++i)\n      if(abs(dec().matrixLU().coeff(i,i)) > premultiplied_threshold)\n        pivots.coeffRef(p++) = i;\n    eigen_internal_assert(p == rank());\n\n    // we construct a temporaty trapezoid matrix m, by taking the U matrix and\n    // permuting the rows and cols to bring the nonnegligible pivots to the top of\n    // the main diagonal. We need that to be able to apply our triangular solvers.\n    // FIXME when we get triangularView-for-rectangular-matrices, this can be simplified\n    Matrix<typename MatrixType::Scalar, Dynamic, Dynamic, MatrixType::Options,\n           MaxSmallDimAtCompileTime, MatrixType::MaxColsAtCompileTime>\n      m(dec().matrixLU().block(0, 0, rank(), cols));\n    for(Index i = 0; i < rank(); ++i)\n    {\n      if(i) m.row(i).head(i).setZero();\n      m.row(i).tail(cols-i) = dec().matrixLU().row(pivots.coeff(i)).tail(cols-i);\n    }\n    m.block(0, 0, rank(), rank());\n    m.block(0, 0, rank(), rank()).template triangularView<StrictlyLower>().setZero();\n    for(Index i = 0; i < rank(); ++i)\n      m.col(i).swap(m.col(pivots.coeff(i)));\n\n    // ok, we have our trapezoid matrix, we can apply the triangular solver.\n    // notice that the math behind this suggests that we should apply this to the\n    // negative of the RHS, but for performance we just put the negative sign elsewhere, see below.\n    m.topLeftCorner(rank(), rank())\n     .template triangularView<Upper>().solveInPlace(\n        m.topRightCorner(rank(), dimker)\n      );\n\n    // now we must undo the column permutation that we had applied!\n    for(Index i = rank()-1; i >= 0; --i)\n      m.col(i).swap(m.col(pivots.coeff(i)));\n\n    // see the negative sign in the next line, that's what we were talking about above.\n    for(Index i = 0; i < rank(); ++i) dst.row(dec().permutationQ().indices().coeff(i)) = -m.row(i).tail(dimker);\n    for(Index i = rank(); i < cols; ++i) dst.row(dec().permutationQ().indices().coeff(i)).setZero();\n    for(Index k = 0; k < dimker; ++k) dst.coeffRef(dec().permutationQ().indices().coeff(rank()+k), k) = Scalar(1);\n  }\n};\n\n/***** Implementation of image() *****************************************************/\n\ntemplate<typename _MatrixType>\nstruct image_retval<FullPivLU<_MatrixType> >\n  : image_retval_base<FullPivLU<_MatrixType> >\n{\n  EIGEN_MAKE_IMAGE_HELPERS(FullPivLU<_MatrixType>)\n\n  enum { MaxSmallDimAtCompileTime = EIGEN_SIZE_MIN_PREFER_FIXED(\n            MatrixType::MaxColsAtCompileTime,\n            MatrixType::MaxRowsAtCompileTime)\n  };\n\n  template<typename Dest> void evalTo(Dest& dst) const\n  {\n    using std::abs;\n    if(rank() == 0)\n    {\n      // The Image is just {0}, so it doesn't have a basis properly speaking, but let's\n      // avoid crashing/asserting as that depends on floating point calculations. Let's\n      // just return a single column vector filled with zeros.\n      dst.setZero();\n      return;\n    }\n\n    Matrix<Index, Dynamic, 1, 0, MaxSmallDimAtCompileTime, 1> pivots(rank());\n    RealScalar premultiplied_threshold = dec().maxPivot() * dec().threshold();\n    Index p = 0;\n    for(Index i = 0; i < dec().nonzeroPivots(); ++i)\n      if(abs(dec().matrixLU().coeff(i,i)) > premultiplied_threshold)\n        pivots.coeffRef(p++) = i;\n    eigen_internal_assert(p == rank());\n\n    for(Index i = 0; i < rank(); ++i)\n      dst.col(i) = originalMatrix().col(dec().permutationQ().indices().coeff(pivots.coeff(i)));\n  }\n};\n\n/***** Implementation of solve() *****************************************************/\n\n} // end namespace internal\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\ntemplate<typename _MatrixType>\ntemplate<typename RhsType, typename DstType>\nvoid FullPivLU<_MatrixType>::_solve_impl(const RhsType &rhs, DstType &dst) const\n{\n  /* The decomposition PAQ = LU can be rewritten as A = P^{-1} L U Q^{-1}.\n  * So we proceed as follows:\n  * Step 1: compute c = P * rhs.\n  * Step 2: replace c by the solution x to Lx = c. Exists because L is invertible.\n  * Step 3: replace c by the solution x to Ux = c. May or may not exist.\n  * Step 4: result = Q * c;\n  */\n\n  const Index rows = this->rows(),\n              cols = this->cols(),\n              nonzero_pivots = this->rank();\n  const Index smalldim = (std::min)(rows, cols);\n\n  if(nonzero_pivots == 0)\n  {\n    dst.setZero();\n    return;\n  }\n\n  typename RhsType::PlainObject c(rhs.rows(), rhs.cols());\n\n  // Step 1\n  c = permutationP() * rhs;\n\n  // Step 2\n  m_lu.topLeftCorner(smalldim,smalldim)\n      .template triangularView<UnitLower>()\n      .solveInPlace(c.topRows(smalldim));\n  if(rows>cols)\n    c.bottomRows(rows-cols) -= m_lu.bottomRows(rows-cols) * c.topRows(cols);\n\n  // Step 3\n  m_lu.topLeftCorner(nonzero_pivots, nonzero_pivots)\n      .template triangularView<Upper>()\n      .solveInPlace(c.topRows(nonzero_pivots));\n\n  // Step 4\n  for(Index i = 0; i < nonzero_pivots; ++i)\n    dst.row(permutationQ().indices().coeff(i)) = c.row(i);\n  for(Index i = nonzero_pivots; i < m_lu.cols(); ++i)\n    dst.row(permutationQ().indices().coeff(i)).setZero();\n}\n\ntemplate<typename _MatrixType>\ntemplate<bool Conjugate, typename RhsType, typename DstType>\nvoid FullPivLU<_MatrixType>::_solve_impl_transposed(const RhsType &rhs, DstType &dst) const\n{\n  /* The decomposition PAQ = LU can be rewritten as A = P^{-1} L U Q^{-1},\n   * and since permutations are real and unitary, we can write this\n   * as   A^T = Q U^T L^T P,\n   * So we proceed as follows:\n   * Step 1: compute c = Q^T rhs.\n   * Step 2: replace c by the solution x to U^T x = c. May or may not exist.\n   * Step 3: replace c by the solution x to L^T x = c.\n   * Step 4: result = P^T c.\n   * If Conjugate is true, replace \"^T\" by \"^*\" above.\n   */\n\n  const Index rows = this->rows(), cols = this->cols(),\n    nonzero_pivots = this->rank();\n  const Index smalldim = (std::min)(rows, cols);\n\n  if(nonzero_pivots == 0)\n  {\n    dst.setZero();\n    return;\n  }\n\n  typename RhsType::PlainObject c(rhs.rows(), rhs.cols());\n\n  // Step 1\n  c = permutationQ().inverse() * rhs;\n\n  // Step 2\n  m_lu.topLeftCorner(nonzero_pivots, nonzero_pivots)\n      .template triangularView<Upper>()\n      .transpose()\n      .template conjugateIf<Conjugate>()\n      .solveInPlace(c.topRows(nonzero_pivots));\n\n  // Step 3\n  m_lu.topLeftCorner(smalldim, smalldim)\n      .template triangularView<UnitLower>()\n      .transpose()\n      .template conjugateIf<Conjugate>()\n      .solveInPlace(c.topRows(smalldim));\n\n  // Step 4\n  PermutationPType invp = permutationP().inverse().eval();\n  for(Index i = 0; i < smalldim; ++i)\n    dst.row(invp.indices().coeff(i)) = c.row(i);\n  for(Index i = smalldim; i < rows; ++i)\n    dst.row(invp.indices().coeff(i)).setZero();\n}\n\n#endif\n\nnamespace internal {\n\n\n/***** Implementation of inverse() *****************************************************/\ntemplate<typename DstXprType, typename MatrixType>\nstruct Assignment<DstXprType, Inverse<FullPivLU<MatrixType> >, internal::assign_op<typename DstXprType::Scalar,typename FullPivLU<MatrixType>::Scalar>, Dense2Dense>\n{\n  typedef FullPivLU<MatrixType> LuType;\n  typedef Inverse<LuType> SrcXprType;\n  static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op<typename DstXprType::Scalar,typename MatrixType::Scalar> &)\n  {\n    dst = src.nestedExpression().solve(MatrixType::Identity(src.rows(), src.cols()));\n  }\n};\n} // end namespace internal\n\n/******* MatrixBase methods *****************************************************************/\n\n/** \\lu_module\n  *\n  * \\return the full-pivoting LU decomposition of \\c *this.\n  *\n  * \\sa class FullPivLU\n  */\ntemplate<typename Derived>\ninline const FullPivLU<typename MatrixBase<Derived>::PlainObject>\nMatrixBase<Derived>::fullPivLu() const\n{\n  return FullPivLU<PlainObject>(eval());\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_LU_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/LU/InverseImpl.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2010 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_INVERSE_IMPL_H\n#define EIGEN_INVERSE_IMPL_H\n\nnamespace Eigen { \n\nnamespace internal {\n\n/**********************************\n*** General case implementation ***\n**********************************/\n\ntemplate<typename MatrixType, typename ResultType, int Size = MatrixType::RowsAtCompileTime>\nstruct compute_inverse\n{\n  EIGEN_DEVICE_FUNC\n  static inline void run(const MatrixType& matrix, ResultType& result)\n  {\n    result = matrix.partialPivLu().inverse();\n  }\n};\n\ntemplate<typename MatrixType, typename ResultType, int Size = MatrixType::RowsAtCompileTime>\nstruct compute_inverse_and_det_with_check { /* nothing! general case not supported. */ };\n\n/****************************\n*** Size 1 implementation ***\n****************************/\n\ntemplate<typename MatrixType, typename ResultType>\nstruct compute_inverse<MatrixType, ResultType, 1>\n{\n  EIGEN_DEVICE_FUNC\n  static inline void run(const MatrixType& matrix, ResultType& result)\n  {\n    typedef typename MatrixType::Scalar Scalar;\n    internal::evaluator<MatrixType> matrixEval(matrix);\n    result.coeffRef(0,0) = Scalar(1) / matrixEval.coeff(0,0);\n  }\n};\n\ntemplate<typename MatrixType, typename ResultType>\nstruct compute_inverse_and_det_with_check<MatrixType, ResultType, 1>\n{\n  EIGEN_DEVICE_FUNC\n  static inline void run(\n    const MatrixType& matrix,\n    const typename MatrixType::RealScalar& absDeterminantThreshold,\n    ResultType& result,\n    typename ResultType::Scalar& determinant,\n    bool& invertible\n  )\n  {\n    using std::abs;\n    determinant = matrix.coeff(0,0);\n    invertible = abs(determinant) > absDeterminantThreshold;\n    if(invertible) result.coeffRef(0,0) = typename ResultType::Scalar(1) / determinant;\n  }\n};\n\n/****************************\n*** Size 2 implementation ***\n****************************/\n\ntemplate<typename MatrixType, typename ResultType>\nEIGEN_DEVICE_FUNC \ninline void compute_inverse_size2_helper(\n    const MatrixType& matrix, const typename ResultType::Scalar& invdet,\n    ResultType& result)\n{\n  result.coeffRef(0,0) =  matrix.coeff(1,1) * invdet;\n  result.coeffRef(1,0) = -matrix.coeff(1,0) * invdet;\n  result.coeffRef(0,1) = -matrix.coeff(0,1) * invdet;\n  result.coeffRef(1,1) =  matrix.coeff(0,0) * invdet;\n}\n\ntemplate<typename MatrixType, typename ResultType>\nstruct compute_inverse<MatrixType, ResultType, 2>\n{\n  EIGEN_DEVICE_FUNC\n  static inline void run(const MatrixType& matrix, ResultType& result)\n  {\n    typedef typename ResultType::Scalar Scalar;\n    const Scalar invdet = typename MatrixType::Scalar(1) / matrix.determinant();\n    compute_inverse_size2_helper(matrix, invdet, result);\n  }\n};\n\ntemplate<typename MatrixType, typename ResultType>\nstruct compute_inverse_and_det_with_check<MatrixType, ResultType, 2>\n{\n  EIGEN_DEVICE_FUNC\n  static inline void run(\n    const MatrixType& matrix,\n    const typename MatrixType::RealScalar& absDeterminantThreshold,\n    ResultType& inverse,\n    typename ResultType::Scalar& determinant,\n    bool& invertible\n  )\n  {\n    using std::abs;\n    typedef typename ResultType::Scalar Scalar;\n    determinant = matrix.determinant();\n    invertible = abs(determinant) > absDeterminantThreshold;\n    if(!invertible) return;\n    const Scalar invdet = Scalar(1) / determinant;\n    compute_inverse_size2_helper(matrix, invdet, inverse);\n  }\n};\n\n/****************************\n*** Size 3 implementation ***\n****************************/\n\ntemplate<typename MatrixType, int i, int j>\nEIGEN_DEVICE_FUNC \ninline typename MatrixType::Scalar cofactor_3x3(const MatrixType& m)\n{\n  enum {\n    i1 = (i+1) % 3,\n    i2 = (i+2) % 3,\n    j1 = (j+1) % 3,\n    j2 = (j+2) % 3\n  };\n  return m.coeff(i1, j1) * m.coeff(i2, j2)\n       - m.coeff(i1, j2) * m.coeff(i2, j1);\n}\n\ntemplate<typename MatrixType, typename ResultType>\nEIGEN_DEVICE_FUNC\ninline void compute_inverse_size3_helper(\n    const MatrixType& matrix,\n    const typename ResultType::Scalar& invdet,\n    const Matrix<typename ResultType::Scalar,3,1>& cofactors_col0,\n    ResultType& result)\n{\n  result.row(0) = cofactors_col0 * invdet;\n  result.coeffRef(1,0) =  cofactor_3x3<MatrixType,0,1>(matrix) * invdet;\n  result.coeffRef(1,1) =  cofactor_3x3<MatrixType,1,1>(matrix) * invdet;\n  result.coeffRef(1,2) =  cofactor_3x3<MatrixType,2,1>(matrix) * invdet;\n  result.coeffRef(2,0) =  cofactor_3x3<MatrixType,0,2>(matrix) * invdet;\n  result.coeffRef(2,1) =  cofactor_3x3<MatrixType,1,2>(matrix) * invdet;\n  result.coeffRef(2,2) =  cofactor_3x3<MatrixType,2,2>(matrix) * invdet;\n}\n\ntemplate<typename MatrixType, typename ResultType>\nstruct compute_inverse<MatrixType, ResultType, 3>\n{\n  EIGEN_DEVICE_FUNC\n  static inline void run(const MatrixType& matrix, ResultType& result)\n  {\n    typedef typename ResultType::Scalar Scalar;\n    Matrix<typename MatrixType::Scalar,3,1> cofactors_col0;\n    cofactors_col0.coeffRef(0) =  cofactor_3x3<MatrixType,0,0>(matrix);\n    cofactors_col0.coeffRef(1) =  cofactor_3x3<MatrixType,1,0>(matrix);\n    cofactors_col0.coeffRef(2) =  cofactor_3x3<MatrixType,2,0>(matrix);\n    const Scalar det = (cofactors_col0.cwiseProduct(matrix.col(0))).sum();\n    const Scalar invdet = Scalar(1) / det;\n    compute_inverse_size3_helper(matrix, invdet, cofactors_col0, result);\n  }\n};\n\ntemplate<typename MatrixType, typename ResultType>\nstruct compute_inverse_and_det_with_check<MatrixType, ResultType, 3>\n{\n  EIGEN_DEVICE_FUNC\n  static inline void run(\n    const MatrixType& matrix,\n    const typename MatrixType::RealScalar& absDeterminantThreshold,\n    ResultType& inverse,\n    typename ResultType::Scalar& determinant,\n    bool& invertible\n  )\n  {\n    using std::abs;\n    typedef typename ResultType::Scalar Scalar;\n    Matrix<Scalar,3,1> cofactors_col0;\n    cofactors_col0.coeffRef(0) =  cofactor_3x3<MatrixType,0,0>(matrix);\n    cofactors_col0.coeffRef(1) =  cofactor_3x3<MatrixType,1,0>(matrix);\n    cofactors_col0.coeffRef(2) =  cofactor_3x3<MatrixType,2,0>(matrix);\n    determinant = (cofactors_col0.cwiseProduct(matrix.col(0))).sum();\n    invertible = abs(determinant) > absDeterminantThreshold;\n    if(!invertible) return;\n    const Scalar invdet = Scalar(1) / determinant;\n    compute_inverse_size3_helper(matrix, invdet, cofactors_col0, inverse);\n  }\n};\n\n/****************************\n*** Size 4 implementation ***\n****************************/\n\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC \ninline const typename Derived::Scalar general_det3_helper\n(const MatrixBase<Derived>& matrix, int i1, int i2, int i3, int j1, int j2, int j3)\n{\n  return matrix.coeff(i1,j1)\n         * (matrix.coeff(i2,j2) * matrix.coeff(i3,j3) - matrix.coeff(i2,j3) * matrix.coeff(i3,j2));\n}\n\ntemplate<typename MatrixType, int i, int j>\nEIGEN_DEVICE_FUNC \ninline typename MatrixType::Scalar cofactor_4x4(const MatrixType& matrix)\n{\n  enum {\n    i1 = (i+1) % 4,\n    i2 = (i+2) % 4,\n    i3 = (i+3) % 4,\n    j1 = (j+1) % 4,\n    j2 = (j+2) % 4,\n    j3 = (j+3) % 4\n  };\n  return general_det3_helper(matrix, i1, i2, i3, j1, j2, j3)\n       + general_det3_helper(matrix, i2, i3, i1, j1, j2, j3)\n       + general_det3_helper(matrix, i3, i1, i2, j1, j2, j3);\n}\n\ntemplate<int Arch, typename Scalar, typename MatrixType, typename ResultType>\nstruct compute_inverse_size4\n{\n  EIGEN_DEVICE_FUNC\n  static void run(const MatrixType& matrix, ResultType& result)\n  {\n    result.coeffRef(0,0) =  cofactor_4x4<MatrixType,0,0>(matrix);\n    result.coeffRef(1,0) = -cofactor_4x4<MatrixType,0,1>(matrix);\n    result.coeffRef(2,0) =  cofactor_4x4<MatrixType,0,2>(matrix);\n    result.coeffRef(3,0) = -cofactor_4x4<MatrixType,0,3>(matrix);\n    result.coeffRef(0,2) =  cofactor_4x4<MatrixType,2,0>(matrix);\n    result.coeffRef(1,2) = -cofactor_4x4<MatrixType,2,1>(matrix);\n    result.coeffRef(2,2) =  cofactor_4x4<MatrixType,2,2>(matrix);\n    result.coeffRef(3,2) = -cofactor_4x4<MatrixType,2,3>(matrix);\n    result.coeffRef(0,1) = -cofactor_4x4<MatrixType,1,0>(matrix);\n    result.coeffRef(1,1) =  cofactor_4x4<MatrixType,1,1>(matrix);\n    result.coeffRef(2,1) = -cofactor_4x4<MatrixType,1,2>(matrix);\n    result.coeffRef(3,1) =  cofactor_4x4<MatrixType,1,3>(matrix);\n    result.coeffRef(0,3) = -cofactor_4x4<MatrixType,3,0>(matrix);\n    result.coeffRef(1,3) =  cofactor_4x4<MatrixType,3,1>(matrix);\n    result.coeffRef(2,3) = -cofactor_4x4<MatrixType,3,2>(matrix);\n    result.coeffRef(3,3) =  cofactor_4x4<MatrixType,3,3>(matrix);\n    result /= (matrix.col(0).cwiseProduct(result.row(0).transpose())).sum();\n  }\n};\n\ntemplate<typename MatrixType, typename ResultType>\nstruct compute_inverse<MatrixType, ResultType, 4>\n : compute_inverse_size4<Architecture::Target, typename MatrixType::Scalar,\n                            MatrixType, ResultType>\n{\n};\n\ntemplate<typename MatrixType, typename ResultType>\nstruct compute_inverse_and_det_with_check<MatrixType, ResultType, 4>\n{\n  EIGEN_DEVICE_FUNC\n  static inline void run(\n    const MatrixType& matrix,\n    const typename MatrixType::RealScalar& absDeterminantThreshold,\n    ResultType& inverse,\n    typename ResultType::Scalar& determinant,\n    bool& invertible\n  )\n  {\n    using std::abs;\n    determinant = matrix.determinant();\n    invertible = abs(determinant) > absDeterminantThreshold;\n    if(invertible) compute_inverse<MatrixType, ResultType>::run(matrix, inverse);\n  }\n};\n\n/*************************\n*** MatrixBase methods ***\n*************************/\n\n} // end namespace internal\n\nnamespace internal {\n\n// Specialization for \"dense = dense_xpr.inverse()\"\ntemplate<typename DstXprType, typename XprType>\nstruct Assignment<DstXprType, Inverse<XprType>, internal::assign_op<typename DstXprType::Scalar,typename XprType::Scalar>, Dense2Dense>\n{\n  typedef Inverse<XprType> SrcXprType;\n  EIGEN_DEVICE_FUNC\n  static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op<typename DstXprType::Scalar,typename XprType::Scalar> &)\n  {\n    Index dstRows = src.rows();\n    Index dstCols = src.cols();\n    if((dst.rows()!=dstRows) || (dst.cols()!=dstCols))\n      dst.resize(dstRows, dstCols);\n    \n    const int Size = EIGEN_PLAIN_ENUM_MIN(XprType::ColsAtCompileTime,DstXprType::ColsAtCompileTime);\n    EIGEN_ONLY_USED_FOR_DEBUG(Size);\n    eigen_assert(( (Size<=1) || (Size>4) || (extract_data(src.nestedExpression())!=extract_data(dst)))\n              && \"Aliasing problem detected in inverse(), you need to do inverse().eval() here.\");\n\n    typedef typename internal::nested_eval<XprType,XprType::ColsAtCompileTime>::type  ActualXprType;\n    typedef typename internal::remove_all<ActualXprType>::type                        ActualXprTypeCleanded;\n    \n    ActualXprType actual_xpr(src.nestedExpression());\n    \n    compute_inverse<ActualXprTypeCleanded, DstXprType>::run(actual_xpr, dst);\n  }\n};\n\n  \n} // end namespace internal\n\n/** \\lu_module\n  *\n  * \\returns the matrix inverse of this matrix.\n  *\n  * For small fixed sizes up to 4x4, this method uses cofactors.\n  * In the general case, this method uses class PartialPivLU.\n  *\n  * \\note This matrix must be invertible, otherwise the result is undefined. If you need an\n  * invertibility check, do the following:\n  * \\li for fixed sizes up to 4x4, use computeInverseAndDetWithCheck().\n  * \\li for the general case, use class FullPivLU.\n  *\n  * Example: \\include MatrixBase_inverse.cpp\n  * Output: \\verbinclude MatrixBase_inverse.out\n  *\n  * \\sa computeInverseAndDetWithCheck()\n  */\ntemplate<typename Derived>\nEIGEN_DEVICE_FUNC\ninline const Inverse<Derived> MatrixBase<Derived>::inverse() const\n{\n  EIGEN_STATIC_ASSERT(!NumTraits<Scalar>::IsInteger,THIS_FUNCTION_IS_NOT_FOR_INTEGER_NUMERIC_TYPES)\n  eigen_assert(rows() == cols());\n  return Inverse<Derived>(derived());\n}\n\n/** \\lu_module\n  *\n  * Computation of matrix inverse and determinant, with invertibility check.\n  *\n  * This is only for fixed-size square matrices of size up to 4x4.\n  *\n  * \\param inverse Reference to the matrix in which to store the inverse.\n  * \\param determinant Reference to the variable in which to store the determinant.\n  * \\param invertible Reference to the bool variable in which to store whether the matrix is invertible.\n  * \\param absDeterminantThreshold Optional parameter controlling the invertibility check.\n  *                                The matrix will be declared invertible if the absolute value of its\n  *                                determinant is greater than this threshold.\n  *\n  * Example: \\include MatrixBase_computeInverseAndDetWithCheck.cpp\n  * Output: \\verbinclude MatrixBase_computeInverseAndDetWithCheck.out\n  *\n  * \\sa inverse(), computeInverseWithCheck()\n  */\ntemplate<typename Derived>\ntemplate<typename ResultType>\ninline void MatrixBase<Derived>::computeInverseAndDetWithCheck(\n    ResultType& inverse,\n    typename ResultType::Scalar& determinant,\n    bool& invertible,\n    const RealScalar& absDeterminantThreshold\n  ) const\n{\n  // i'd love to put some static assertions there, but SFINAE means that they have no effect...\n  eigen_assert(rows() == cols());\n  // for 2x2, it's worth giving a chance to avoid evaluating.\n  // for larger sizes, evaluating has negligible cost and limits code size.\n  typedef typename internal::conditional<\n    RowsAtCompileTime == 2,\n    typename internal::remove_all<typename internal::nested_eval<Derived, 2>::type>::type,\n    PlainObject\n  >::type MatrixType;\n  internal::compute_inverse_and_det_with_check<MatrixType, ResultType>::run\n    (derived(), absDeterminantThreshold, inverse, determinant, invertible);\n}\n\n/** \\lu_module\n  *\n  * Computation of matrix inverse, with invertibility check.\n  *\n  * This is only for fixed-size square matrices of size up to 4x4.\n  *\n  * \\param inverse Reference to the matrix in which to store the inverse.\n  * \\param invertible Reference to the bool variable in which to store whether the matrix is invertible.\n  * \\param absDeterminantThreshold Optional parameter controlling the invertibility check.\n  *                                The matrix will be declared invertible if the absolute value of its\n  *                                determinant is greater than this threshold.\n  *\n  * Example: \\include MatrixBase_computeInverseWithCheck.cpp\n  * Output: \\verbinclude MatrixBase_computeInverseWithCheck.out\n  *\n  * \\sa inverse(), computeInverseAndDetWithCheck()\n  */\ntemplate<typename Derived>\ntemplate<typename ResultType>\ninline void MatrixBase<Derived>::computeInverseWithCheck(\n    ResultType& inverse,\n    bool& invertible,\n    const RealScalar& absDeterminantThreshold\n  ) const\n{\n  Scalar determinant;\n  // i'd love to put some static assertions there, but SFINAE means that they have no effect...\n  eigen_assert(rows() == cols());\n  computeInverseAndDetWithCheck(inverse,determinant,invertible,absDeterminantThreshold);\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_INVERSE_IMPL_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/LU/PartialPivLU.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2009 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_PARTIALLU_H\n#define EIGEN_PARTIALLU_H\n\nnamespace Eigen {\n\nnamespace internal {\ntemplate<typename _MatrixType> struct traits<PartialPivLU<_MatrixType> >\n : traits<_MatrixType>\n{\n  typedef MatrixXpr XprKind;\n  typedef SolverStorage StorageKind;\n  typedef int StorageIndex;\n  typedef traits<_MatrixType> BaseTraits;\n  enum {\n    Flags = BaseTraits::Flags & RowMajorBit,\n    CoeffReadCost = Dynamic\n  };\n};\n\ntemplate<typename T,typename Derived>\nstruct enable_if_ref;\n// {\n//   typedef Derived type;\n// };\n\ntemplate<typename T,typename Derived>\nstruct enable_if_ref<Ref<T>,Derived> {\n  typedef Derived type;\n};\n\n} // end namespace internal\n\n/** \\ingroup LU_Module\n  *\n  * \\class PartialPivLU\n  *\n  * \\brief LU decomposition of a matrix with partial pivoting, and related features\n  *\n  * \\tparam _MatrixType the type of the matrix of which we are computing the LU decomposition\n  *\n  * This class represents a LU decomposition of a \\b square \\b invertible matrix, with partial pivoting: the matrix A\n  * is decomposed as A = PLU where L is unit-lower-triangular, U is upper-triangular, and P\n  * is a permutation matrix.\n  *\n  * Typically, partial pivoting LU decomposition is only considered numerically stable for square invertible\n  * matrices. Thus LAPACK's dgesv and dgesvx require the matrix to be square and invertible. The present class\n  * does the same. It will assert that the matrix is square, but it won't (actually it can't) check that the\n  * matrix is invertible: it is your task to check that you only use this decomposition on invertible matrices.\n  *\n  * The guaranteed safe alternative, working for all matrices, is the full pivoting LU decomposition, provided\n  * by class FullPivLU.\n  *\n  * This is \\b not a rank-revealing LU decomposition. Many features are intentionally absent from this class,\n  * such as rank computation. If you need these features, use class FullPivLU.\n  *\n  * This LU decomposition is suitable to invert invertible matrices. It is what MatrixBase::inverse() uses\n  * in the general case.\n  * On the other hand, it is \\b not suitable to determine whether a given matrix is invertible.\n  *\n  * The data of the LU decomposition can be directly accessed through the methods matrixLU(), permutationP().\n  *\n  * This class supports the \\link InplaceDecomposition inplace decomposition \\endlink mechanism.\n  * \n  * \\sa MatrixBase::partialPivLu(), MatrixBase::determinant(), MatrixBase::inverse(), MatrixBase::computeInverse(), class FullPivLU\n  */\ntemplate<typename _MatrixType> class PartialPivLU\n  : public SolverBase<PartialPivLU<_MatrixType> >\n{\n  public:\n\n    typedef _MatrixType MatrixType;\n    typedef SolverBase<PartialPivLU> Base;\n    friend class SolverBase<PartialPivLU>;\n\n    EIGEN_GENERIC_PUBLIC_INTERFACE(PartialPivLU)\n    enum {\n      MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime,\n      MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime\n    };\n    typedef PermutationMatrix<RowsAtCompileTime, MaxRowsAtCompileTime> PermutationType;\n    typedef Transpositions<RowsAtCompileTime, MaxRowsAtCompileTime> TranspositionType;\n    typedef typename MatrixType::PlainObject PlainObject;\n\n    /**\n      * \\brief Default Constructor.\n      *\n      * The default constructor is useful in cases in which the user intends to\n      * perform decompositions via PartialPivLU::compute(const MatrixType&).\n      */\n    PartialPivLU();\n\n    /** \\brief Default Constructor with memory preallocation\n      *\n      * Like the default constructor but with preallocation of the internal data\n      * according to the specified problem \\a size.\n      * \\sa PartialPivLU()\n      */\n    explicit PartialPivLU(Index size);\n\n    /** Constructor.\n      *\n      * \\param matrix the matrix of which to compute the LU decomposition.\n      *\n      * \\warning The matrix should have full rank (e.g. if it's square, it should be invertible).\n      * If you need to deal with non-full rank, use class FullPivLU instead.\n      */\n    template<typename InputType>\n    explicit PartialPivLU(const EigenBase<InputType>& matrix);\n\n    /** Constructor for \\link InplaceDecomposition inplace decomposition \\endlink\n      *\n      * \\param matrix the matrix of which to compute the LU decomposition.\n      *\n      * \\warning The matrix should have full rank (e.g. if it's square, it should be invertible).\n      * If you need to deal with non-full rank, use class FullPivLU instead.\n      */\n    template<typename InputType>\n    explicit PartialPivLU(EigenBase<InputType>& matrix);\n\n    template<typename InputType>\n    PartialPivLU& compute(const EigenBase<InputType>& matrix) {\n      m_lu = matrix.derived();\n      compute();\n      return *this;\n    }\n\n    /** \\returns the LU decomposition matrix: the upper-triangular part is U, the\n      * unit-lower-triangular part is L (at least for square matrices; in the non-square\n      * case, special care is needed, see the documentation of class FullPivLU).\n      *\n      * \\sa matrixL(), matrixU()\n      */\n    inline const MatrixType& matrixLU() const\n    {\n      eigen_assert(m_isInitialized && \"PartialPivLU is not initialized.\");\n      return m_lu;\n    }\n\n    /** \\returns the permutation matrix P.\n      */\n    inline const PermutationType& permutationP() const\n    {\n      eigen_assert(m_isInitialized && \"PartialPivLU is not initialized.\");\n      return m_p;\n    }\n\n    #ifdef EIGEN_PARSED_BY_DOXYGEN\n    /** This method returns the solution x to the equation Ax=b, where A is the matrix of which\n      * *this is the LU decomposition.\n      *\n      * \\param b the right-hand-side of the equation to solve. Can be a vector or a matrix,\n      *          the only requirement in order for the equation to make sense is that\n      *          b.rows()==A.rows(), where A is the matrix of which *this is the LU decomposition.\n      *\n      * \\returns the solution.\n      *\n      * Example: \\include PartialPivLU_solve.cpp\n      * Output: \\verbinclude PartialPivLU_solve.out\n      *\n      * Since this PartialPivLU class assumes anyway that the matrix A is invertible, the solution\n      * theoretically exists and is unique regardless of b.\n      *\n      * \\sa TriangularView::solve(), inverse(), computeInverse()\n      */\n    template<typename Rhs>\n    inline const Solve<PartialPivLU, Rhs>\n    solve(const MatrixBase<Rhs>& b) const;\n    #endif\n\n    /** \\returns an estimate of the reciprocal condition number of the matrix of which \\c *this is\n        the LU decomposition.\n      */\n    inline RealScalar rcond() const\n    {\n      eigen_assert(m_isInitialized && \"PartialPivLU is not initialized.\");\n      return internal::rcond_estimate_helper(m_l1_norm, *this);\n    }\n\n    /** \\returns the inverse of the matrix of which *this is the LU decomposition.\n      *\n      * \\warning The matrix being decomposed here is assumed to be invertible. If you need to check for\n      *          invertibility, use class FullPivLU instead.\n      *\n      * \\sa MatrixBase::inverse(), LU::inverse()\n      */\n    inline const Inverse<PartialPivLU> inverse() const\n    {\n      eigen_assert(m_isInitialized && \"PartialPivLU is not initialized.\");\n      return Inverse<PartialPivLU>(*this);\n    }\n\n    /** \\returns the determinant of the matrix of which\n      * *this is the LU decomposition. It has only linear complexity\n      * (that is, O(n) where n is the dimension of the square matrix)\n      * as the LU decomposition has already been computed.\n      *\n      * \\note For fixed-size matrices of size up to 4, MatrixBase::determinant() offers\n      *       optimized paths.\n      *\n      * \\warning a determinant can be very big or small, so for matrices\n      * of large enough dimension, there is a risk of overflow/underflow.\n      *\n      * \\sa MatrixBase::determinant()\n      */\n    Scalar determinant() const;\n\n    MatrixType reconstructedMatrix() const;\n\n    inline Index rows() const { return m_lu.rows(); }\n    inline Index cols() const { return m_lu.cols(); }\n\n    #ifndef EIGEN_PARSED_BY_DOXYGEN\n    template<typename RhsType, typename DstType>\n    EIGEN_DEVICE_FUNC\n    void _solve_impl(const RhsType &rhs, DstType &dst) const {\n     /* The decomposition PA = LU can be rewritten as A = P^{-1} L U.\n      * So we proceed as follows:\n      * Step 1: compute c = Pb.\n      * Step 2: replace c by the solution x to Lx = c.\n      * Step 3: replace c by the solution x to Ux = c.\n      */\n\n      // Step 1\n      dst = permutationP() * rhs;\n\n      // Step 2\n      m_lu.template triangularView<UnitLower>().solveInPlace(dst);\n\n      // Step 3\n      m_lu.template triangularView<Upper>().solveInPlace(dst);\n    }\n\n    template<bool Conjugate, typename RhsType, typename DstType>\n    EIGEN_DEVICE_FUNC\n    void _solve_impl_transposed(const RhsType &rhs, DstType &dst) const {\n     /* The decomposition PA = LU can be rewritten as A^T = U^T L^T P.\n      * So we proceed as follows:\n      * Step 1: compute c as the solution to L^T c = b\n      * Step 2: replace c by the solution x to U^T x = c.\n      * Step 3: update  c = P^-1 c.\n      */\n\n      eigen_assert(rhs.rows() == m_lu.cols());\n\n      // Step 1\n      dst = m_lu.template triangularView<Upper>().transpose()\n                .template conjugateIf<Conjugate>().solve(rhs);\n      // Step 2\n      m_lu.template triangularView<UnitLower>().transpose()\n          .template conjugateIf<Conjugate>().solveInPlace(dst);\n      // Step 3\n      dst = permutationP().transpose() * dst;\n    }\n    #endif\n\n  protected:\n\n    static void check_template_parameters()\n    {\n      EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar);\n    }\n\n    void compute();\n\n    MatrixType m_lu;\n    PermutationType m_p;\n    TranspositionType m_rowsTranspositions;\n    RealScalar m_l1_norm;\n    signed char m_det_p;\n    bool m_isInitialized;\n};\n\ntemplate<typename MatrixType>\nPartialPivLU<MatrixType>::PartialPivLU()\n  : m_lu(),\n    m_p(),\n    m_rowsTranspositions(),\n    m_l1_norm(0),\n    m_det_p(0),\n    m_isInitialized(false)\n{\n}\n\ntemplate<typename MatrixType>\nPartialPivLU<MatrixType>::PartialPivLU(Index size)\n  : m_lu(size, size),\n    m_p(size),\n    m_rowsTranspositions(size),\n    m_l1_norm(0),\n    m_det_p(0),\n    m_isInitialized(false)\n{\n}\n\ntemplate<typename MatrixType>\ntemplate<typename InputType>\nPartialPivLU<MatrixType>::PartialPivLU(const EigenBase<InputType>& matrix)\n  : m_lu(matrix.rows(),matrix.cols()),\n    m_p(matrix.rows()),\n    m_rowsTranspositions(matrix.rows()),\n    m_l1_norm(0),\n    m_det_p(0),\n    m_isInitialized(false)\n{\n  compute(matrix.derived());\n}\n\ntemplate<typename MatrixType>\ntemplate<typename InputType>\nPartialPivLU<MatrixType>::PartialPivLU(EigenBase<InputType>& matrix)\n  : m_lu(matrix.derived()),\n    m_p(matrix.rows()),\n    m_rowsTranspositions(matrix.rows()),\n    m_l1_norm(0),\n    m_det_p(0),\n    m_isInitialized(false)\n{\n  compute();\n}\n\nnamespace internal {\n\n/** \\internal This is the blocked version of fullpivlu_unblocked() */\ntemplate<typename Scalar, int StorageOrder, typename PivIndex, int SizeAtCompileTime=Dynamic>\nstruct partial_lu_impl\n{\n  static const int UnBlockedBound = 16;\n  static const bool UnBlockedAtCompileTime = SizeAtCompileTime!=Dynamic && SizeAtCompileTime<=UnBlockedBound;\n  static const int ActualSizeAtCompileTime = UnBlockedAtCompileTime ? SizeAtCompileTime : Dynamic;\n  // Remaining rows and columns at compile-time:\n  static const int RRows = SizeAtCompileTime==2 ? 1 : Dynamic;\n  static const int RCols = SizeAtCompileTime==2 ? 1 : Dynamic;\n  typedef Matrix<Scalar, ActualSizeAtCompileTime, ActualSizeAtCompileTime, StorageOrder> MatrixType;\n  typedef Ref<MatrixType> MatrixTypeRef;\n  typedef Ref<Matrix<Scalar, Dynamic, Dynamic, StorageOrder> > BlockType;\n  typedef typename MatrixType::RealScalar RealScalar;\n\n  /** \\internal performs the LU decomposition in-place of the matrix \\a lu\n    * using an unblocked algorithm.\n    *\n    * In addition, this function returns the row transpositions in the\n    * vector \\a row_transpositions which must have a size equal to the number\n    * of columns of the matrix \\a lu, and an integer \\a nb_transpositions\n    * which returns the actual number of transpositions.\n    *\n    * \\returns The index of the first pivot which is exactly zero if any, or a negative number otherwise.\n    */\n  static Index unblocked_lu(MatrixTypeRef& lu, PivIndex* row_transpositions, PivIndex& nb_transpositions)\n  {\n    typedef scalar_score_coeff_op<Scalar> Scoring;\n    typedef typename Scoring::result_type Score;\n    const Index rows = lu.rows();\n    const Index cols = lu.cols();\n    const Index size = (std::min)(rows,cols);\n    // For small compile-time matrices it is worth processing the last row separately:\n    //  speedup: +100% for 2x2, +10% for others.\n    const Index endk = UnBlockedAtCompileTime ? size-1 : size;\n    nb_transpositions = 0;\n    Index first_zero_pivot = -1;\n    for(Index k = 0; k < endk; ++k)\n    {\n      int rrows = internal::convert_index<int>(rows-k-1);\n      int rcols = internal::convert_index<int>(cols-k-1);\n\n      Index row_of_biggest_in_col;\n      Score biggest_in_corner\n        = lu.col(k).tail(rows-k).unaryExpr(Scoring()).maxCoeff(&row_of_biggest_in_col);\n      row_of_biggest_in_col += k;\n\n      row_transpositions[k] = PivIndex(row_of_biggest_in_col);\n\n      if(biggest_in_corner != Score(0))\n      {\n        if(k != row_of_biggest_in_col)\n        {\n          lu.row(k).swap(lu.row(row_of_biggest_in_col));\n          ++nb_transpositions;\n        }\n\n        lu.col(k).tail(fix<RRows>(rrows)) /= lu.coeff(k,k);\n      }\n      else if(first_zero_pivot==-1)\n      {\n        // the pivot is exactly zero, we record the index of the first pivot which is exactly 0,\n        // and continue the factorization such we still have A = PLU\n        first_zero_pivot = k;\n      }\n\n      if(k<rows-1)\n        lu.bottomRightCorner(fix<RRows>(rrows),fix<RCols>(rcols)).noalias() -= lu.col(k).tail(fix<RRows>(rrows)) * lu.row(k).tail(fix<RCols>(rcols));\n    }\n\n    // special handling of the last entry\n    if(UnBlockedAtCompileTime)\n    {\n      Index k = endk;\n      row_transpositions[k] = PivIndex(k);\n      if (Scoring()(lu(k, k)) == Score(0) && first_zero_pivot == -1)\n        first_zero_pivot = k;\n    }\n\n    return first_zero_pivot;\n  }\n\n  /** \\internal performs the LU decomposition in-place of the matrix represented\n    * by the variables \\a rows, \\a cols, \\a lu_data, and \\a lu_stride using a\n    * recursive, blocked algorithm.\n    *\n    * In addition, this function returns the row transpositions in the\n    * vector \\a row_transpositions which must have a size equal to the number\n    * of columns of the matrix \\a lu, and an integer \\a nb_transpositions\n    * which returns the actual number of transpositions.\n    *\n    * \\returns The index of the first pivot which is exactly zero if any, or a negative number otherwise.\n    *\n    * \\note This very low level interface using pointers, etc. is to:\n    *   1 - reduce the number of instantiations to the strict minimum\n    *   2 - avoid infinite recursion of the instantiations with Block<Block<Block<...> > >\n    */\n  static Index blocked_lu(Index rows, Index cols, Scalar* lu_data, Index luStride, PivIndex* row_transpositions, PivIndex& nb_transpositions, Index maxBlockSize=256)\n  {\n    MatrixTypeRef lu = MatrixType::Map(lu_data,rows, cols, OuterStride<>(luStride));\n\n    const Index size = (std::min)(rows,cols);\n\n    // if the matrix is too small, no blocking:\n    if(UnBlockedAtCompileTime || size<=UnBlockedBound)\n    {\n      return unblocked_lu(lu, row_transpositions, nb_transpositions);\n    }\n\n    // automatically adjust the number of subdivisions to the size\n    // of the matrix so that there is enough sub blocks:\n    Index blockSize;\n    {\n      blockSize = size/8;\n      blockSize = (blockSize/16)*16;\n      blockSize = (std::min)((std::max)(blockSize,Index(8)), maxBlockSize);\n    }\n\n    nb_transpositions = 0;\n    Index first_zero_pivot = -1;\n    for(Index k = 0; k < size; k+=blockSize)\n    {\n      Index bs = (std::min)(size-k,blockSize); // actual size of the block\n      Index trows = rows - k - bs; // trailing rows\n      Index tsize = size - k - bs; // trailing size\n\n      // partition the matrix:\n      //                          A00 | A01 | A02\n      // lu  = A_0 | A_1 | A_2 =  A10 | A11 | A12\n      //                          A20 | A21 | A22\n      BlockType A_0 = lu.block(0,0,rows,k);\n      BlockType A_2 = lu.block(0,k+bs,rows,tsize);\n      BlockType A11 = lu.block(k,k,bs,bs);\n      BlockType A12 = lu.block(k,k+bs,bs,tsize);\n      BlockType A21 = lu.block(k+bs,k,trows,bs);\n      BlockType A22 = lu.block(k+bs,k+bs,trows,tsize);\n\n      PivIndex nb_transpositions_in_panel;\n      // recursively call the blocked LU algorithm on [A11^T A21^T]^T\n      // with a very small blocking size:\n      Index ret = blocked_lu(trows+bs, bs, &lu.coeffRef(k,k), luStride,\n                   row_transpositions+k, nb_transpositions_in_panel, 16);\n      if(ret>=0 && first_zero_pivot==-1)\n        first_zero_pivot = k+ret;\n\n      nb_transpositions += nb_transpositions_in_panel;\n      // update permutations and apply them to A_0\n      for(Index i=k; i<k+bs; ++i)\n      {\n        Index piv = (row_transpositions[i] += internal::convert_index<PivIndex>(k));\n        A_0.row(i).swap(A_0.row(piv));\n      }\n\n      if(trows)\n      {\n        // apply permutations to A_2\n        for(Index i=k;i<k+bs; ++i)\n          A_2.row(i).swap(A_2.row(row_transpositions[i]));\n\n        // A12 = A11^-1 A12\n        A11.template triangularView<UnitLower>().solveInPlace(A12);\n\n        A22.noalias() -= A21 * A12;\n      }\n    }\n    return first_zero_pivot;\n  }\n};\n\n/** \\internal performs the LU decomposition with partial pivoting in-place.\n  */\ntemplate<typename MatrixType, typename TranspositionType>\nvoid partial_lu_inplace(MatrixType& lu, TranspositionType& row_transpositions, typename TranspositionType::StorageIndex& nb_transpositions)\n{\n  eigen_assert(lu.cols() == row_transpositions.size());\n  eigen_assert((&row_transpositions.coeffRef(1)-&row_transpositions.coeffRef(0)) == 1);\n\n  partial_lu_impl\n    < typename MatrixType::Scalar, MatrixType::Flags&RowMajorBit?RowMajor:ColMajor,\n      typename TranspositionType::StorageIndex,\n      EIGEN_SIZE_MIN_PREFER_FIXED(MatrixType::RowsAtCompileTime,MatrixType::ColsAtCompileTime)>\n    ::blocked_lu(lu.rows(), lu.cols(), &lu.coeffRef(0,0), lu.outerStride(), &row_transpositions.coeffRef(0), nb_transpositions);\n}\n\n} // end namespace internal\n\ntemplate<typename MatrixType>\nvoid PartialPivLU<MatrixType>::compute()\n{\n  check_template_parameters();\n\n  // the row permutation is stored as int indices, so just to be sure:\n  eigen_assert(m_lu.rows()<NumTraits<int>::highest());\n\n  if(m_lu.cols()>0)\n    m_l1_norm = m_lu.cwiseAbs().colwise().sum().maxCoeff();\n  else\n    m_l1_norm = RealScalar(0);\n\n  eigen_assert(m_lu.rows() == m_lu.cols() && \"PartialPivLU is only for square (and moreover invertible) matrices\");\n  const Index size = m_lu.rows();\n\n  m_rowsTranspositions.resize(size);\n\n  typename TranspositionType::StorageIndex nb_transpositions;\n  internal::partial_lu_inplace(m_lu, m_rowsTranspositions, nb_transpositions);\n  m_det_p = (nb_transpositions%2) ? -1 : 1;\n\n  m_p = m_rowsTranspositions;\n\n  m_isInitialized = true;\n}\n\ntemplate<typename MatrixType>\ntypename PartialPivLU<MatrixType>::Scalar PartialPivLU<MatrixType>::determinant() const\n{\n  eigen_assert(m_isInitialized && \"PartialPivLU is not initialized.\");\n  return Scalar(m_det_p) * m_lu.diagonal().prod();\n}\n\n/** \\returns the matrix represented by the decomposition,\n * i.e., it returns the product: P^{-1} L U.\n * This function is provided for debug purpose. */\ntemplate<typename MatrixType>\nMatrixType PartialPivLU<MatrixType>::reconstructedMatrix() const\n{\n  eigen_assert(m_isInitialized && \"LU is not initialized.\");\n  // LU\n  MatrixType res = m_lu.template triangularView<UnitLower>().toDenseMatrix()\n                 * m_lu.template triangularView<Upper>();\n\n  // P^{-1}(LU)\n  res = m_p.inverse() * res;\n\n  return res;\n}\n\n/***** Implementation details *****************************************************/\n\nnamespace internal {\n\n/***** Implementation of inverse() *****************************************************/\ntemplate<typename DstXprType, typename MatrixType>\nstruct Assignment<DstXprType, Inverse<PartialPivLU<MatrixType> >, internal::assign_op<typename DstXprType::Scalar,typename PartialPivLU<MatrixType>::Scalar>, Dense2Dense>\n{\n  typedef PartialPivLU<MatrixType> LuType;\n  typedef Inverse<LuType> SrcXprType;\n  static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op<typename DstXprType::Scalar,typename LuType::Scalar> &)\n  {\n    dst = src.nestedExpression().solve(MatrixType::Identity(src.rows(), src.cols()));\n  }\n};\n} // end namespace internal\n\n/******** MatrixBase methods *******/\n\n/** \\lu_module\n  *\n  * \\return the partial-pivoting LU decomposition of \\c *this.\n  *\n  * \\sa class PartialPivLU\n  */\ntemplate<typename Derived>\ninline const PartialPivLU<typename MatrixBase<Derived>::PlainObject>\nMatrixBase<Derived>::partialPivLu() const\n{\n  return PartialPivLU<PlainObject>(eval());\n}\n\n/** \\lu_module\n  *\n  * Synonym of partialPivLu().\n  *\n  * \\return the partial-pivoting LU decomposition of \\c *this.\n  *\n  * \\sa class PartialPivLU\n  */\ntemplate<typename Derived>\ninline const PartialPivLU<typename MatrixBase<Derived>::PlainObject>\nMatrixBase<Derived>::lu() const\n{\n  return PartialPivLU<PlainObject>(eval());\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_PARTIALLU_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/LU/PartialPivLU_LAPACKE.h",
    "content": "/*\n Copyright (c) 2011, Intel Corporation. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without modification,\n are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n   list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n * Neither the name of Intel Corporation nor the names of its contributors may\n   be used to endorse or promote products derived from this software without\n   specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\n ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n ********************************************************************************\n *   Content : Eigen bindings to LAPACKe\n *     LU decomposition with partial pivoting based on LAPACKE_?getrf function.\n ********************************************************************************\n*/\n\n#ifndef EIGEN_PARTIALLU_LAPACK_H\n#define EIGEN_PARTIALLU_LAPACK_H\n\nnamespace Eigen { \n\nnamespace internal {\n\n/** \\internal Specialization for the data types supported by LAPACKe */\n\n#define EIGEN_LAPACKE_LU_PARTPIV(EIGTYPE, LAPACKE_TYPE, LAPACKE_PREFIX) \\\ntemplate<int StorageOrder> \\\nstruct partial_lu_impl<EIGTYPE, StorageOrder, lapack_int> \\\n{ \\\n  /* \\internal performs the LU decomposition in-place of the matrix represented */ \\\n  static lapack_int blocked_lu(Index rows, Index cols, EIGTYPE* lu_data, Index luStride, lapack_int* row_transpositions, lapack_int& nb_transpositions, lapack_int maxBlockSize=256) \\\n  { \\\n    EIGEN_UNUSED_VARIABLE(maxBlockSize);\\\n    lapack_int matrix_order, first_zero_pivot; \\\n    lapack_int m, n, lda, *ipiv, info; \\\n    EIGTYPE* a; \\\n/* Set up parameters for ?getrf */ \\\n    matrix_order = StorageOrder==RowMajor ? LAPACK_ROW_MAJOR : LAPACK_COL_MAJOR; \\\n    lda = convert_index<lapack_int>(luStride); \\\n    a = lu_data; \\\n    ipiv = row_transpositions; \\\n    m = convert_index<lapack_int>(rows); \\\n    n = convert_index<lapack_int>(cols); \\\n    nb_transpositions = 0; \\\n\\\n    info = LAPACKE_##LAPACKE_PREFIX##getrf( matrix_order, m, n, (LAPACKE_TYPE*)a, lda, ipiv ); \\\n\\\n    for(int i=0;i<m;i++) { ipiv[i]--; if (ipiv[i]!=i) nb_transpositions++; } \\\n\\\n    eigen_assert(info >= 0); \\\n/* something should be done with nb_transpositions */ \\\n\\\n    first_zero_pivot = info; \\\n    return first_zero_pivot; \\\n  } \\\n};\n\nEIGEN_LAPACKE_LU_PARTPIV(double, double, d)\nEIGEN_LAPACKE_LU_PARTPIV(float, float, s)\nEIGEN_LAPACKE_LU_PARTPIV(dcomplex, lapack_complex_double, z)\nEIGEN_LAPACKE_LU_PARTPIV(scomplex, lapack_complex_float,  c)\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_PARTIALLU_LAPACK_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/LU/arch/Inverse_SSE.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2001 Intel Corporation\n// Copyright (C) 2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n// The SSE code for the 4x4 float and double matrix inverse in this file\n// comes from the following Intel's library:\n// http://software.intel.com/en-us/articles/optimized-matrix-library-for-use-with-the-intel-pentiumr-4-processors-sse2-instructions/\n//\n// Here is the respective copyright and license statement:\n//\n//   Copyright (c) 2001 Intel Corporation.\n//\n// Permition is granted to use, copy, distribute and prepare derivative works\n// of this library for any purpose and without fee, provided, that the above\n// copyright notice and this statement appear in all copies.\n// Intel makes no representations about the suitability of this software for\n// any purpose, and specifically disclaims all warranties.\n// See LEGAL.TXT for all the legal information.\n\n#ifndef EIGEN_INVERSE_SSE_H\n#define EIGEN_INVERSE_SSE_H\n\nnamespace Eigen { \n\nnamespace internal {\n\ntemplate<typename MatrixType, typename ResultType>\nstruct compute_inverse_size4<Architecture::SSE, float, MatrixType, ResultType>\n{\n  enum {\n    MatrixAlignment     = traits<MatrixType>::Alignment,\n    ResultAlignment     = traits<ResultType>::Alignment,\n    StorageOrdersMatch  = (MatrixType::Flags&RowMajorBit) == (ResultType::Flags&RowMajorBit)\n  };\n  typedef typename conditional<(MatrixType::Flags&LinearAccessBit),MatrixType const &,typename MatrixType::PlainObject>::type ActualMatrixType;\n  \n  static void run(const MatrixType& mat, ResultType& result)\n  {\n    ActualMatrixType matrix(mat);\n    const Packet4f p4f_sign_PNNP = _mm_castsi128_ps(_mm_set_epi32(0x00000000, 0x80000000, 0x80000000, 0x00000000));\n\n    // Load the full matrix into registers\n    __m128 _L1 = matrix.template packet<MatrixAlignment>( 0);\n    __m128 _L2 = matrix.template packet<MatrixAlignment>( 4);\n    __m128 _L3 = matrix.template packet<MatrixAlignment>( 8);\n    __m128 _L4 = matrix.template packet<MatrixAlignment>(12);\n\n    // The inverse is calculated using \"Divide and Conquer\" technique. The\n    // original matrix is divide into four 2x2 sub-matrices. Since each\n    // register holds four matrix element, the smaller matrices are\n    // represented as a registers. Hence we get a better locality of the\n    // calculations.\n\n    __m128 A, B, C, D; // the four sub-matrices\n    if(!StorageOrdersMatch)\n    {\n      A = _mm_unpacklo_ps(_L1, _L2);\n      B = _mm_unpacklo_ps(_L3, _L4);\n      C = _mm_unpackhi_ps(_L1, _L2);\n      D = _mm_unpackhi_ps(_L3, _L4);\n    }\n    else\n    {\n      A = _mm_movelh_ps(_L1, _L2);\n      B = _mm_movehl_ps(_L2, _L1);\n      C = _mm_movelh_ps(_L3, _L4);\n      D = _mm_movehl_ps(_L4, _L3);\n    }\n\n    __m128 iA, iB, iC, iD,                 // partial inverse of the sub-matrices\n            DC, AB;\n    __m128 dA, dB, dC, dD;                 // determinant of the sub-matrices\n    __m128 det, d, d1, d2;\n    __m128 rd;                             // reciprocal of the determinant\n\n    //  AB = A# * B\n    AB = _mm_mul_ps(_mm_shuffle_ps(A,A,0x0F), B);\n    AB = _mm_sub_ps(AB,_mm_mul_ps(_mm_shuffle_ps(A,A,0xA5), _mm_shuffle_ps(B,B,0x4E)));\n    //  DC = D# * C\n    DC = _mm_mul_ps(_mm_shuffle_ps(D,D,0x0F), C);\n    DC = _mm_sub_ps(DC,_mm_mul_ps(_mm_shuffle_ps(D,D,0xA5), _mm_shuffle_ps(C,C,0x4E)));\n\n    //  dA = |A|\n    dA = _mm_mul_ps(_mm_shuffle_ps(A, A, 0x5F),A);\n    dA = _mm_sub_ss(dA, _mm_movehl_ps(dA,dA));\n    //  dB = |B|\n    dB = _mm_mul_ps(_mm_shuffle_ps(B, B, 0x5F),B);\n    dB = _mm_sub_ss(dB, _mm_movehl_ps(dB,dB));\n\n    //  dC = |C|\n    dC = _mm_mul_ps(_mm_shuffle_ps(C, C, 0x5F),C);\n    dC = _mm_sub_ss(dC, _mm_movehl_ps(dC,dC));\n    //  dD = |D|\n    dD = _mm_mul_ps(_mm_shuffle_ps(D, D, 0x5F),D);\n    dD = _mm_sub_ss(dD, _mm_movehl_ps(dD,dD));\n\n    //  d = trace(AB*DC) = trace(A#*B*D#*C)\n    d = _mm_mul_ps(_mm_shuffle_ps(DC,DC,0xD8),AB);\n\n    //  iD = C*A#*B\n    iD = _mm_mul_ps(_mm_shuffle_ps(C,C,0xA0), _mm_movelh_ps(AB,AB));\n    iD = _mm_add_ps(iD,_mm_mul_ps(_mm_shuffle_ps(C,C,0xF5), _mm_movehl_ps(AB,AB)));\n    //  iA = B*D#*C\n    iA = _mm_mul_ps(_mm_shuffle_ps(B,B,0xA0), _mm_movelh_ps(DC,DC));\n    iA = _mm_add_ps(iA,_mm_mul_ps(_mm_shuffle_ps(B,B,0xF5), _mm_movehl_ps(DC,DC)));\n\n    //  d = trace(AB*DC) = trace(A#*B*D#*C) [continue]\n    d  = _mm_add_ps(d, _mm_movehl_ps(d, d));\n    d  = _mm_add_ss(d, _mm_shuffle_ps(d, d, 1));\n    d1 = _mm_mul_ss(dA,dD);\n    d2 = _mm_mul_ss(dB,dC);\n\n    //  iD = D*|A| - C*A#*B\n    iD = _mm_sub_ps(_mm_mul_ps(D,_mm_shuffle_ps(dA,dA,0)), iD);\n\n    //  iA = A*|D| - B*D#*C;\n    iA = _mm_sub_ps(_mm_mul_ps(A,_mm_shuffle_ps(dD,dD,0)), iA);\n\n    //  det = |A|*|D| + |B|*|C| - trace(A#*B*D#*C)\n    det = _mm_sub_ss(_mm_add_ss(d1,d2),d);\n    rd  = _mm_div_ss(_mm_set_ss(1.0f), det);\n\n//     #ifdef ZERO_SINGULAR\n//         rd = _mm_and_ps(_mm_cmpneq_ss(det,_mm_setzero_ps()), rd);\n//     #endif\n\n    //  iB = D * (A#B)# = D*B#*A\n    iB = _mm_mul_ps(D, _mm_shuffle_ps(AB,AB,0x33));\n    iB = _mm_sub_ps(iB, _mm_mul_ps(_mm_shuffle_ps(D,D,0xB1), _mm_shuffle_ps(AB,AB,0x66)));\n    //  iC = A * (D#C)# = A*C#*D\n    iC = _mm_mul_ps(A, _mm_shuffle_ps(DC,DC,0x33));\n    iC = _mm_sub_ps(iC, _mm_mul_ps(_mm_shuffle_ps(A,A,0xB1), _mm_shuffle_ps(DC,DC,0x66)));\n\n    rd = _mm_shuffle_ps(rd,rd,0);\n    rd = _mm_xor_ps(rd, p4f_sign_PNNP);\n\n    //  iB = C*|B| - D*B#*A\n    iB = _mm_sub_ps(_mm_mul_ps(C,_mm_shuffle_ps(dB,dB,0)), iB);\n\n    //  iC = B*|C| - A*C#*D;\n    iC = _mm_sub_ps(_mm_mul_ps(B,_mm_shuffle_ps(dC,dC,0)), iC);\n\n    //  iX = iX / det\n    iA = _mm_mul_ps(rd,iA);\n    iB = _mm_mul_ps(rd,iB);\n    iC = _mm_mul_ps(rd,iC);\n    iD = _mm_mul_ps(rd,iD);\n\n    Index res_stride = result.outerStride();\n    float* res = result.data();\n    pstoret<float, Packet4f, ResultAlignment>(res+0,            _mm_shuffle_ps(iA,iB,0x77));\n    pstoret<float, Packet4f, ResultAlignment>(res+res_stride,   _mm_shuffle_ps(iA,iB,0x22));\n    pstoret<float, Packet4f, ResultAlignment>(res+2*res_stride, _mm_shuffle_ps(iC,iD,0x77));\n    pstoret<float, Packet4f, ResultAlignment>(res+3*res_stride, _mm_shuffle_ps(iC,iD,0x22));\n  }\n\n};\n\ntemplate<typename MatrixType, typename ResultType>\nstruct compute_inverse_size4<Architecture::SSE, double, MatrixType, ResultType>\n{\n  enum {\n    MatrixAlignment     = traits<MatrixType>::Alignment,\n    ResultAlignment     = traits<ResultType>::Alignment,\n    StorageOrdersMatch  = (MatrixType::Flags&RowMajorBit) == (ResultType::Flags&RowMajorBit)\n  };\n  typedef typename conditional<(MatrixType::Flags&LinearAccessBit),MatrixType const &,typename MatrixType::PlainObject>::type ActualMatrixType;\n  \n  static void run(const MatrixType& mat, ResultType& result)\n  {\n    ActualMatrixType matrix(mat);\n    const __m128d _Sign_NP = _mm_castsi128_pd(_mm_set_epi32(0x0,0x0,0x80000000,0x0));\n    const __m128d _Sign_PN = _mm_castsi128_pd(_mm_set_epi32(0x80000000,0x0,0x0,0x0));\n\n    // The inverse is calculated using \"Divide and Conquer\" technique. The\n    // original matrix is divide into four 2x2 sub-matrices. Since each\n    // register of the matrix holds two elements, the smaller matrices are\n    // consisted of two registers. Hence we get a better locality of the\n    // calculations.\n\n    // the four sub-matrices\n    __m128d A1, A2, B1, B2, C1, C2, D1, D2;\n    \n    if(StorageOrdersMatch)\n    {\n      A1 = matrix.template packet<MatrixAlignment>( 0); B1 = matrix.template packet<MatrixAlignment>( 2);\n      A2 = matrix.template packet<MatrixAlignment>( 4); B2 = matrix.template packet<MatrixAlignment>( 6);\n      C1 = matrix.template packet<MatrixAlignment>( 8); D1 = matrix.template packet<MatrixAlignment>(10);\n      C2 = matrix.template packet<MatrixAlignment>(12); D2 = matrix.template packet<MatrixAlignment>(14);\n    }\n    else\n    {\n      __m128d tmp;\n      A1 = matrix.template packet<MatrixAlignment>( 0); C1 = matrix.template packet<MatrixAlignment>( 2);\n      A2 = matrix.template packet<MatrixAlignment>( 4); C2 = matrix.template packet<MatrixAlignment>( 6);\n      tmp = A1;\n      A1 = _mm_unpacklo_pd(A1,A2);\n      A2 = _mm_unpackhi_pd(tmp,A2);\n      tmp = C1;\n      C1 = _mm_unpacklo_pd(C1,C2);\n      C2 = _mm_unpackhi_pd(tmp,C2);\n      \n      B1 = matrix.template packet<MatrixAlignment>( 8); D1 = matrix.template packet<MatrixAlignment>(10);\n      B2 = matrix.template packet<MatrixAlignment>(12); D2 = matrix.template packet<MatrixAlignment>(14);\n      tmp = B1;\n      B1 = _mm_unpacklo_pd(B1,B2);\n      B2 = _mm_unpackhi_pd(tmp,B2);\n      tmp = D1;\n      D1 = _mm_unpacklo_pd(D1,D2);\n      D2 = _mm_unpackhi_pd(tmp,D2);\n    }\n    \n    __m128d iA1, iA2, iB1, iB2, iC1, iC2, iD1, iD2,     // partial invese of the sub-matrices\n            DC1, DC2, AB1, AB2;\n    __m128d dA, dB, dC, dD;     // determinant of the sub-matrices\n    __m128d det, d1, d2, rd;\n\n    //  dA = |A|\n    dA = _mm_shuffle_pd(A2, A2, 1);\n    dA = _mm_mul_pd(A1, dA);\n    dA = _mm_sub_sd(dA, _mm_shuffle_pd(dA,dA,3));\n    //  dB = |B|\n    dB = _mm_shuffle_pd(B2, B2, 1);\n    dB = _mm_mul_pd(B1, dB);\n    dB = _mm_sub_sd(dB, _mm_shuffle_pd(dB,dB,3));\n\n    //  AB = A# * B\n    AB1 = _mm_mul_pd(B1, _mm_shuffle_pd(A2,A2,3));\n    AB2 = _mm_mul_pd(B2, _mm_shuffle_pd(A1,A1,0));\n    AB1 = _mm_sub_pd(AB1, _mm_mul_pd(B2, _mm_shuffle_pd(A1,A1,3)));\n    AB2 = _mm_sub_pd(AB2, _mm_mul_pd(B1, _mm_shuffle_pd(A2,A2,0)));\n\n    //  dC = |C|\n    dC = _mm_shuffle_pd(C2, C2, 1);\n    dC = _mm_mul_pd(C1, dC);\n    dC = _mm_sub_sd(dC, _mm_shuffle_pd(dC,dC,3));\n    //  dD = |D|\n    dD = _mm_shuffle_pd(D2, D2, 1);\n    dD = _mm_mul_pd(D1, dD);\n    dD = _mm_sub_sd(dD, _mm_shuffle_pd(dD,dD,3));\n\n    //  DC = D# * C\n    DC1 = _mm_mul_pd(C1, _mm_shuffle_pd(D2,D2,3));\n    DC2 = _mm_mul_pd(C2, _mm_shuffle_pd(D1,D1,0));\n    DC1 = _mm_sub_pd(DC1, _mm_mul_pd(C2, _mm_shuffle_pd(D1,D1,3)));\n    DC2 = _mm_sub_pd(DC2, _mm_mul_pd(C1, _mm_shuffle_pd(D2,D2,0)));\n\n    //  rd = trace(AB*DC) = trace(A#*B*D#*C)\n    d1 = _mm_mul_pd(AB1, _mm_shuffle_pd(DC1, DC2, 0));\n    d2 = _mm_mul_pd(AB2, _mm_shuffle_pd(DC1, DC2, 3));\n    rd = _mm_add_pd(d1, d2);\n    rd = _mm_add_sd(rd, _mm_shuffle_pd(rd, rd,3));\n\n    //  iD = C*A#*B\n    iD1 = _mm_mul_pd(AB1, _mm_shuffle_pd(C1,C1,0));\n    iD2 = _mm_mul_pd(AB1, _mm_shuffle_pd(C2,C2,0));\n    iD1 = _mm_add_pd(iD1, _mm_mul_pd(AB2, _mm_shuffle_pd(C1,C1,3)));\n    iD2 = _mm_add_pd(iD2, _mm_mul_pd(AB2, _mm_shuffle_pd(C2,C2,3)));\n\n    //  iA = B*D#*C\n    iA1 = _mm_mul_pd(DC1, _mm_shuffle_pd(B1,B1,0));\n    iA2 = _mm_mul_pd(DC1, _mm_shuffle_pd(B2,B2,0));\n    iA1 = _mm_add_pd(iA1, _mm_mul_pd(DC2, _mm_shuffle_pd(B1,B1,3)));\n    iA2 = _mm_add_pd(iA2, _mm_mul_pd(DC2, _mm_shuffle_pd(B2,B2,3)));\n\n    //  iD = D*|A| - C*A#*B\n    dA = _mm_shuffle_pd(dA,dA,0);\n    iD1 = _mm_sub_pd(_mm_mul_pd(D1, dA), iD1);\n    iD2 = _mm_sub_pd(_mm_mul_pd(D2, dA), iD2);\n\n    //  iA = A*|D| - B*D#*C;\n    dD = _mm_shuffle_pd(dD,dD,0);\n    iA1 = _mm_sub_pd(_mm_mul_pd(A1, dD), iA1);\n    iA2 = _mm_sub_pd(_mm_mul_pd(A2, dD), iA2);\n\n    d1 = _mm_mul_sd(dA, dD);\n    d2 = _mm_mul_sd(dB, dC);\n\n    //  iB = D * (A#B)# = D*B#*A\n    iB1 = _mm_mul_pd(D1, _mm_shuffle_pd(AB2,AB1,1));\n    iB2 = _mm_mul_pd(D2, _mm_shuffle_pd(AB2,AB1,1));\n    iB1 = _mm_sub_pd(iB1, _mm_mul_pd(_mm_shuffle_pd(D1,D1,1), _mm_shuffle_pd(AB2,AB1,2)));\n    iB2 = _mm_sub_pd(iB2, _mm_mul_pd(_mm_shuffle_pd(D2,D2,1), _mm_shuffle_pd(AB2,AB1,2)));\n\n    //  det = |A|*|D| + |B|*|C| - trace(A#*B*D#*C)\n    det = _mm_add_sd(d1, d2);\n    det = _mm_sub_sd(det, rd);\n\n    //  iC = A * (D#C)# = A*C#*D\n    iC1 = _mm_mul_pd(A1, _mm_shuffle_pd(DC2,DC1,1));\n    iC2 = _mm_mul_pd(A2, _mm_shuffle_pd(DC2,DC1,1));\n    iC1 = _mm_sub_pd(iC1, _mm_mul_pd(_mm_shuffle_pd(A1,A1,1), _mm_shuffle_pd(DC2,DC1,2)));\n    iC2 = _mm_sub_pd(iC2, _mm_mul_pd(_mm_shuffle_pd(A2,A2,1), _mm_shuffle_pd(DC2,DC1,2)));\n\n    rd = _mm_div_sd(_mm_set_sd(1.0), det);\n//     #ifdef ZERO_SINGULAR\n//         rd = _mm_and_pd(_mm_cmpneq_sd(det,_mm_setzero_pd()), rd);\n//     #endif\n    rd = _mm_shuffle_pd(rd,rd,0);\n\n    //  iB = C*|B| - D*B#*A\n    dB = _mm_shuffle_pd(dB,dB,0);\n    iB1 = _mm_sub_pd(_mm_mul_pd(C1, dB), iB1);\n    iB2 = _mm_sub_pd(_mm_mul_pd(C2, dB), iB2);\n\n    d1 = _mm_xor_pd(rd, _Sign_PN);\n    d2 = _mm_xor_pd(rd, _Sign_NP);\n\n    //  iC = B*|C| - A*C#*D;\n    dC = _mm_shuffle_pd(dC,dC,0);\n    iC1 = _mm_sub_pd(_mm_mul_pd(B1, dC), iC1);\n    iC2 = _mm_sub_pd(_mm_mul_pd(B2, dC), iC2);\n\n    Index res_stride = result.outerStride();\n    double* res = result.data();\n    pstoret<double, Packet2d, ResultAlignment>(res+0,             _mm_mul_pd(_mm_shuffle_pd(iA2, iA1, 3), d1));\n    pstoret<double, Packet2d, ResultAlignment>(res+res_stride,    _mm_mul_pd(_mm_shuffle_pd(iA2, iA1, 0), d2));\n    pstoret<double, Packet2d, ResultAlignment>(res+2,             _mm_mul_pd(_mm_shuffle_pd(iB2, iB1, 3), d1));\n    pstoret<double, Packet2d, ResultAlignment>(res+res_stride+2,  _mm_mul_pd(_mm_shuffle_pd(iB2, iB1, 0), d2));\n    pstoret<double, Packet2d, ResultAlignment>(res+2*res_stride,  _mm_mul_pd(_mm_shuffle_pd(iC2, iC1, 3), d1));\n    pstoret<double, Packet2d, ResultAlignment>(res+3*res_stride,  _mm_mul_pd(_mm_shuffle_pd(iC2, iC1, 0), d2));\n    pstoret<double, Packet2d, ResultAlignment>(res+2*res_stride+2,_mm_mul_pd(_mm_shuffle_pd(iD2, iD1, 3), d1));\n    pstoret<double, Packet2d, ResultAlignment>(res+3*res_stride+2,_mm_mul_pd(_mm_shuffle_pd(iD2, iD1, 0), d2));\n  }\n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_INVERSE_SSE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/MetisSupport/MetisSupport.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n#ifndef METIS_SUPPORT_H\n#define METIS_SUPPORT_H\n\nnamespace Eigen {\n/**\n * Get the fill-reducing ordering from the METIS package\n * \n * If A is the original matrix and Ap is the permuted matrix, \n * the fill-reducing permutation is defined as follows :\n * Row (column) i of A is the matperm(i) row (column) of Ap. \n * WARNING: As computed by METIS, this corresponds to the vector iperm (instead of perm)\n */\ntemplate <typename StorageIndex>\nclass MetisOrdering\n{\npublic:\n  typedef PermutationMatrix<Dynamic,Dynamic,StorageIndex> PermutationType;\n  typedef Matrix<StorageIndex,Dynamic,1> IndexVector; \n  \n  template <typename MatrixType>\n  void get_symmetrized_graph(const MatrixType& A)\n  {\n    Index m = A.cols(); \n    eigen_assert((A.rows() == A.cols()) && \"ONLY FOR SQUARED MATRICES\");\n    // Get the transpose of the input matrix \n    MatrixType At = A.transpose(); \n    // Get the number of nonzeros elements in each row/col of At+A\n    Index TotNz = 0; \n    IndexVector visited(m); \n    visited.setConstant(-1); \n    for (StorageIndex j = 0; j < m; j++)\n    {\n      // Compute the union structure of of A(j,:) and At(j,:)\n      visited(j) = j; // Do not include the diagonal element\n      // Get the nonzeros in row/column j of A\n      for (typename MatrixType::InnerIterator it(A, j); it; ++it)\n      {\n        Index idx = it.index(); // Get the row index (for column major) or column index (for row major)\n        if (visited(idx) != j ) \n        {\n          visited(idx) = j; \n          ++TotNz; \n        }\n      }\n      //Get the nonzeros in row/column j of At\n      for (typename MatrixType::InnerIterator it(At, j); it; ++it)\n      {\n        Index idx = it.index(); \n        if(visited(idx) != j)\n        {\n          visited(idx) = j; \n          ++TotNz; \n        }\n      }\n    }\n    // Reserve place for A + At\n    m_indexPtr.resize(m+1);\n    m_innerIndices.resize(TotNz); \n\n    // Now compute the real adjacency list of each column/row \n    visited.setConstant(-1); \n    StorageIndex CurNz = 0; \n    for (StorageIndex j = 0; j < m; j++)\n    {\n      m_indexPtr(j) = CurNz; \n      \n      visited(j) = j; // Do not include the diagonal element\n      // Add the pattern of row/column j of A to A+At\n      for (typename MatrixType::InnerIterator it(A,j); it; ++it)\n      {\n        StorageIndex idx = it.index(); // Get the row index (for column major) or column index (for row major)\n        if (visited(idx) != j ) \n        {\n          visited(idx) = j; \n          m_innerIndices(CurNz) = idx; \n          CurNz++; \n        }\n      }\n      //Add the pattern of row/column j of At to A+At\n      for (typename MatrixType::InnerIterator it(At, j); it; ++it)\n      {\n        StorageIndex idx = it.index(); \n        if(visited(idx) != j)\n        {\n          visited(idx) = j; \n          m_innerIndices(CurNz) = idx; \n          ++CurNz; \n        }\n      }\n    }\n    m_indexPtr(m) = CurNz;    \n  }\n  \n  template <typename MatrixType>\n  void operator() (const MatrixType& A, PermutationType& matperm)\n  {\n     StorageIndex m = internal::convert_index<StorageIndex>(A.cols()); // must be StorageIndex, because it is passed by address to METIS\n     IndexVector perm(m),iperm(m); \n    // First, symmetrize the matrix graph. \n     get_symmetrized_graph(A); \n     int output_error;\n     \n     // Call the fill-reducing routine from METIS \n     output_error = METIS_NodeND(&m, m_indexPtr.data(), m_innerIndices.data(), NULL, NULL, perm.data(), iperm.data());\n     \n    if(output_error != METIS_OK) \n    {\n      //FIXME The ordering interface should define a class of possible errors \n     std::cerr << \"ERROR WHILE CALLING THE METIS PACKAGE \\n\"; \n     return; \n    }\n    \n    // Get the fill-reducing permutation \n    //NOTE:  If Ap is the permuted matrix then perm and iperm vectors are defined as follows \n    // Row (column) i of Ap is the perm(i) row(column) of A, and row (column) i of A is the iperm(i) row(column) of Ap\n    \n     matperm.resize(m);\n     for (int j = 0; j < m; j++)\n       matperm.indices()(iperm(j)) = j;\n   \n  }\n  \n  protected:\n    IndexVector m_indexPtr; // Pointer to the adjacenccy list of each row/column\n    IndexVector m_innerIndices; // Adjacency list \n};\n\n}// end namespace eigen \n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/OrderingMethods/Amd.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n/*\nNOTE: this routine has been adapted from the CSparse library:\n\nCopyright (c) 2006, Timothy A. Davis.\nhttp://www.suitesparse.com\n\nThe author of CSparse, Timothy A. Davis., has executed a license with Google LLC\nto permit distribution of this code and derivative works as part of Eigen under\nthe Mozilla Public License v. 2.0, as stated at the top of this file.\n*/\n\n#ifndef EIGEN_SPARSE_AMD_H\n#define EIGEN_SPARSE_AMD_H\n\nnamespace Eigen { \n\nnamespace internal {\n  \ntemplate<typename T> inline T amd_flip(const T& i) { return -i-2; }\ntemplate<typename T> inline T amd_unflip(const T& i) { return i<0 ? amd_flip(i) : i; }\ntemplate<typename T0, typename T1> inline bool amd_marked(const T0* w, const T1& j) { return w[j]<0; }\ntemplate<typename T0, typename T1> inline void amd_mark(const T0* w, const T1& j) { return w[j] = amd_flip(w[j]); }\n\n/* clear w */\ntemplate<typename StorageIndex>\nstatic StorageIndex cs_wclear (StorageIndex mark, StorageIndex lemax, StorageIndex *w, StorageIndex n)\n{\n  StorageIndex k;\n  if(mark < 2 || (mark + lemax < 0))\n  {\n    for(k = 0; k < n; k++)\n      if(w[k] != 0)\n        w[k] = 1;\n    mark = 2;\n  }\n  return (mark);     /* at this point, w[0..n-1] < mark holds */\n}\n\n/* depth-first search and postorder of a tree rooted at node j */\ntemplate<typename StorageIndex>\nStorageIndex cs_tdfs(StorageIndex j, StorageIndex k, StorageIndex *head, const StorageIndex *next, StorageIndex *post, StorageIndex *stack)\n{\n  StorageIndex i, p, top = 0;\n  if(!head || !next || !post || !stack) return (-1);    /* check inputs */\n  stack[0] = j;                 /* place j on the stack */\n  while (top >= 0)                /* while (stack is not empty) */\n  {\n    p = stack[top];           /* p = top of stack */\n    i = head[p];              /* i = youngest child of p */\n    if(i == -1)\n    {\n      top--;                 /* p has no unordered children left */\n      post[k++] = p;        /* node p is the kth postordered node */\n    }\n    else\n    {\n      head[p] = next[i];   /* remove i from children of p */\n      stack[++top] = i;     /* start dfs on child node i */\n    }\n  }\n  return k;\n}\n\n\n/** \\internal\n  * \\ingroup OrderingMethods_Module \n  * Approximate minimum degree ordering algorithm.\n  *\n  * \\param[in] C the input selfadjoint matrix stored in compressed column major format.\n  * \\param[out] perm the permutation P reducing the fill-in of the input matrix \\a C\n  *\n  * Note that the input matrix \\a C must be complete, that is both the upper and lower parts have to be stored, as well as the diagonal entries.\n  * On exit the values of C are destroyed */\ntemplate<typename Scalar, typename StorageIndex>\nvoid minimum_degree_ordering(SparseMatrix<Scalar,ColMajor,StorageIndex>& C, PermutationMatrix<Dynamic,Dynamic,StorageIndex>& perm)\n{\n  using std::sqrt;\n  \n  StorageIndex d, dk, dext, lemax = 0, e, elenk, eln, i, j, k, k1,\n                k2, k3, jlast, ln, dense, nzmax, mindeg = 0, nvi, nvj, nvk, mark, wnvi,\n                ok, nel = 0, p, p1, p2, p3, p4, pj, pk, pk1, pk2, pn, q, t, h;\n  \n  StorageIndex n = StorageIndex(C.cols());\n  dense = std::max<StorageIndex> (16, StorageIndex(10 * sqrt(double(n))));   /* find dense threshold */\n  dense = (std::min)(n-2, dense);\n  \n  StorageIndex cnz = StorageIndex(C.nonZeros());\n  perm.resize(n+1);\n  t = cnz + cnz/5 + 2*n;                 /* add elbow room to C */\n  C.resizeNonZeros(t);\n  \n  // get workspace\n  ei_declare_aligned_stack_constructed_variable(StorageIndex,W,8*(n+1),0);\n  StorageIndex* len     = W;\n  StorageIndex* nv      = W +   (n+1);\n  StorageIndex* next    = W + 2*(n+1);\n  StorageIndex* head    = W + 3*(n+1);\n  StorageIndex* elen    = W + 4*(n+1);\n  StorageIndex* degree  = W + 5*(n+1);\n  StorageIndex* w       = W + 6*(n+1);\n  StorageIndex* hhead   = W + 7*(n+1);\n  StorageIndex* last    = perm.indices().data();                              /* use P as workspace for last */\n  \n  /* --- Initialize quotient graph ---------------------------------------- */\n  StorageIndex* Cp = C.outerIndexPtr();\n  StorageIndex* Ci = C.innerIndexPtr();\n  for(k = 0; k < n; k++)\n    len[k] = Cp[k+1] - Cp[k];\n  len[n] = 0;\n  nzmax = t;\n  \n  for(i = 0; i <= n; i++)\n  {\n    head[i]   = -1;                     // degree list i is empty\n    last[i]   = -1;\n    next[i]   = -1;\n    hhead[i]  = -1;                     // hash list i is empty \n    nv[i]     = 1;                      // node i is just one node\n    w[i]      = 1;                      // node i is alive\n    elen[i]   = 0;                      // Ek of node i is empty\n    degree[i] = len[i];                 // degree of node i\n  }\n  mark = internal::cs_wclear<StorageIndex>(0, 0, w, n);         /* clear w */\n  \n  /* --- Initialize degree lists ------------------------------------------ */\n  for(i = 0; i < n; i++)\n  {\n    bool has_diag = false;\n    for(p = Cp[i]; p<Cp[i+1]; ++p)\n      if(Ci[p]==i)\n      {\n        has_diag = true;\n        break;\n      }\n   \n    d = degree[i];\n    if(d == 1 && has_diag)           /* node i is empty */\n    {\n      elen[i] = -2;                 /* element i is dead */\n      nel++;\n      Cp[i] = -1;                   /* i is a root of assembly tree */\n      w[i] = 0;\n    }\n    else if(d > dense || !has_diag)  /* node i is dense or has no structural diagonal element */\n    {\n      nv[i] = 0;                    /* absorb i into element n */\n      elen[i] = -1;                 /* node i is dead */\n      nel++;\n      Cp[i] = amd_flip (n);\n      nv[n]++;\n    }\n    else\n    {\n      if(head[d] != -1) last[head[d]] = i;\n      next[i] = head[d];           /* put node i in degree list d */\n      head[d] = i;\n    }\n  }\n  \n  elen[n] = -2;                         /* n is a dead element */\n  Cp[n] = -1;                           /* n is a root of assembly tree */\n  w[n] = 0;                             /* n is a dead element */\n  \n  while (nel < n)                         /* while (selecting pivots) do */\n  {\n    /* --- Select node of minimum approximate degree -------------------- */\n    for(k = -1; mindeg < n && (k = head[mindeg]) == -1; mindeg++) {}\n    if(next[k] != -1) last[next[k]] = -1;\n    head[mindeg] = next[k];          /* remove k from degree list */\n    elenk = elen[k];                  /* elenk = |Ek| */\n    nvk = nv[k];                      /* # of nodes k represents */\n    nel += nvk;                        /* nv[k] nodes of A eliminated */\n    \n    /* --- Garbage collection ------------------------------------------- */\n    if(elenk > 0 && cnz + mindeg >= nzmax)\n    {\n      for(j = 0; j < n; j++)\n      {\n        if((p = Cp[j]) >= 0)      /* j is a live node or element */\n        {\n          Cp[j] = Ci[p];          /* save first entry of object */\n          Ci[p] = amd_flip (j);    /* first entry is now amd_flip(j) */\n        }\n      }\n      for(q = 0, p = 0; p < cnz; ) /* scan all of memory */\n      {\n        if((j = amd_flip (Ci[p++])) >= 0)  /* found object j */\n        {\n          Ci[q] = Cp[j];       /* restore first entry of object */\n          Cp[j] = q++;          /* new pointer to object j */\n          for(k3 = 0; k3 < len[j]-1; k3++) Ci[q++] = Ci[p++];\n        }\n      }\n      cnz = q;                       /* Ci[cnz...nzmax-1] now free */\n    }\n    \n    /* --- Construct new element ---------------------------------------- */\n    dk = 0;\n    nv[k] = -nvk;                     /* flag k as in Lk */\n    p = Cp[k];\n    pk1 = (elenk == 0) ? p : cnz;      /* do in place if elen[k] == 0 */\n    pk2 = pk1;\n    for(k1 = 1; k1 <= elenk + 1; k1++)\n    {\n      if(k1 > elenk)\n      {\n        e = k;                     /* search the nodes in k */\n        pj = p;                    /* list of nodes starts at Ci[pj]*/\n        ln = len[k] - elenk;      /* length of list of nodes in k */\n      }\n      else\n      {\n        e = Ci[p++];              /* search the nodes in e */\n        pj = Cp[e];\n        ln = len[e];              /* length of list of nodes in e */\n      }\n      for(k2 = 1; k2 <= ln; k2++)\n      {\n        i = Ci[pj++];\n        if((nvi = nv[i]) <= 0) continue; /* node i dead, or seen */\n        dk += nvi;                 /* degree[Lk] += size of node i */\n        nv[i] = -nvi;             /* negate nv[i] to denote i in Lk*/\n        Ci[pk2++] = i;            /* place i in Lk */\n        if(next[i] != -1) last[next[i]] = last[i];\n        if(last[i] != -1)         /* remove i from degree list */\n        {\n          next[last[i]] = next[i];\n        }\n        else\n        {\n          head[degree[i]] = next[i];\n        }\n      }\n      if(e != k)\n      {\n        Cp[e] = amd_flip (k);      /* absorb e into k */\n        w[e] = 0;                 /* e is now a dead element */\n      }\n    }\n    if(elenk != 0) cnz = pk2;         /* Ci[cnz...nzmax] is free */\n    degree[k] = dk;                   /* external degree of k - |Lk\\i| */\n    Cp[k] = pk1;                      /* element k is in Ci[pk1..pk2-1] */\n    len[k] = pk2 - pk1;\n    elen[k] = -2;                     /* k is now an element */\n    \n    /* --- Find set differences ----------------------------------------- */\n    mark = internal::cs_wclear<StorageIndex>(mark, lemax, w, n);  /* clear w if necessary */\n    for(pk = pk1; pk < pk2; pk++)    /* scan 1: find |Le\\Lk| */\n    {\n      i = Ci[pk];\n      if((eln = elen[i]) <= 0) continue;/* skip if elen[i] empty */\n      nvi = -nv[i];                      /* nv[i] was negated */\n      wnvi = mark - nvi;\n      for(p = Cp[i]; p <= Cp[i] + eln - 1; p++)  /* scan Ei */\n      {\n        e = Ci[p];\n        if(w[e] >= mark)\n        {\n          w[e] -= nvi;          /* decrement |Le\\Lk| */\n        }\n        else if(w[e] != 0)        /* ensure e is a live element */\n        {\n          w[e] = degree[e] + wnvi; /* 1st time e seen in scan 1 */\n        }\n      }\n    }\n    \n    /* --- Degree update ------------------------------------------------ */\n    for(pk = pk1; pk < pk2; pk++)    /* scan2: degree update */\n    {\n      i = Ci[pk];                   /* consider node i in Lk */\n      p1 = Cp[i];\n      p2 = p1 + elen[i] - 1;\n      pn = p1;\n      for(h = 0, d = 0, p = p1; p <= p2; p++)    /* scan Ei */\n      {\n        e = Ci[p];\n        if(w[e] != 0)             /* e is an unabsorbed element */\n        {\n          dext = w[e] - mark;   /* dext = |Le\\Lk| */\n          if(dext > 0)\n          {\n            d += dext;         /* sum up the set differences */\n            Ci[pn++] = e;     /* keep e in Ei */\n            h += e;            /* compute the hash of node i */\n          }\n          else\n          {\n            Cp[e] = amd_flip (k);  /* aggressive absorb. e->k */\n            w[e] = 0;             /* e is a dead element */\n          }\n        }\n      }\n      elen[i] = pn - p1 + 1;        /* elen[i] = |Ei| */\n      p3 = pn;\n      p4 = p1 + len[i];\n      for(p = p2 + 1; p < p4; p++) /* prune edges in Ai */\n      {\n        j = Ci[p];\n        if((nvj = nv[j]) <= 0) continue; /* node j dead or in Lk */\n        d += nvj;                  /* degree(i) += |j| */\n        Ci[pn++] = j;             /* place j in node list of i */\n        h += j;                    /* compute hash for node i */\n      }\n      if(d == 0)                     /* check for mass elimination */\n      {\n        Cp[i] = amd_flip (k);      /* absorb i into k */\n        nvi = -nv[i];\n        dk -= nvi;                 /* |Lk| -= |i| */\n        nvk += nvi;                /* |k| += nv[i] */\n        nel += nvi;\n        nv[i] = 0;\n        elen[i] = -1;             /* node i is dead */\n      }\n      else\n      {\n        degree[i] = std::min<StorageIndex> (degree[i], d);   /* update degree(i) */\n        Ci[pn] = Ci[p3];         /* move first node to end */\n        Ci[p3] = Ci[p1];         /* move 1st el. to end of Ei */\n        Ci[p1] = k;               /* add k as 1st element in of Ei */\n        len[i] = pn - p1 + 1;     /* new len of adj. list of node i */\n        h %= n;                    /* finalize hash of i */\n        next[i] = hhead[h];      /* place i in hash bucket */\n        hhead[h] = i;\n        last[i] = h;      /* save hash of i in last[i] */\n      }\n    }                                   /* scan2 is done */\n    degree[k] = dk;                   /* finalize |Lk| */\n    lemax = std::max<StorageIndex>(lemax, dk);\n    mark = internal::cs_wclear<StorageIndex>(mark+lemax, lemax, w, n);    /* clear w */\n    \n    /* --- Supernode detection ------------------------------------------ */\n    for(pk = pk1; pk < pk2; pk++)\n    {\n      i = Ci[pk];\n      if(nv[i] >= 0) continue;         /* skip if i is dead */\n      h = last[i];                      /* scan hash bucket of node i */\n      i = hhead[h];\n      hhead[h] = -1;                    /* hash bucket will be empty */\n      for(; i != -1 && next[i] != -1; i = next[i], mark++)\n      {\n        ln = len[i];\n        eln = elen[i];\n        for(p = Cp[i]+1; p <= Cp[i] + ln-1; p++) w[Ci[p]] = mark;\n        jlast = i;\n        for(j = next[i]; j != -1; ) /* compare i with all j */\n        {\n          ok = (len[j] == ln) && (elen[j] == eln);\n          for(p = Cp[j] + 1; ok && p <= Cp[j] + ln - 1; p++)\n          {\n            if(w[Ci[p]] != mark) ok = 0;    /* compare i and j*/\n          }\n          if(ok)                     /* i and j are identical */\n          {\n            Cp[j] = amd_flip (i);  /* absorb j into i */\n            nv[i] += nv[j];\n            nv[j] = 0;\n            elen[j] = -1;         /* node j is dead */\n            j = next[j];          /* delete j from hash bucket */\n            next[jlast] = j;\n          }\n          else\n          {\n            jlast = j;             /* j and i are different */\n            j = next[j];\n          }\n        }\n      }\n    }\n    \n    /* --- Finalize new element------------------------------------------ */\n    for(p = pk1, pk = pk1; pk < pk2; pk++)   /* finalize Lk */\n    {\n      i = Ci[pk];\n      if((nvi = -nv[i]) <= 0) continue;/* skip if i is dead */\n      nv[i] = nvi;                      /* restore nv[i] */\n      d = degree[i] + dk - nvi;         /* compute external degree(i) */\n      d = std::min<StorageIndex> (d, n - nel - nvi);\n      if(head[d] != -1) last[head[d]] = i;\n      next[i] = head[d];               /* put i back in degree list */\n      last[i] = -1;\n      head[d] = i;\n      mindeg = std::min<StorageIndex> (mindeg, d);       /* find new minimum degree */\n      degree[i] = d;\n      Ci[p++] = i;                      /* place i in Lk */\n    }\n    nv[k] = nvk;                      /* # nodes absorbed into k */\n    if((len[k] = p-pk1) == 0)         /* length of adj list of element k*/\n    {\n      Cp[k] = -1;                   /* k is a root of the tree */\n      w[k] = 0;                     /* k is now a dead element */\n    }\n    if(elenk != 0) cnz = p;           /* free unused space in Lk */\n  }\n  \n  /* --- Postordering ----------------------------------------------------- */\n  for(i = 0; i < n; i++) Cp[i] = amd_flip (Cp[i]);/* fix assembly tree */\n  for(j = 0; j <= n; j++) head[j] = -1;\n  for(j = n; j >= 0; j--)              /* place unordered nodes in lists */\n  {\n    if(nv[j] > 0) continue;          /* skip if j is an element */\n    next[j] = head[Cp[j]];          /* place j in list of its parent */\n    head[Cp[j]] = j;\n  }\n  for(e = n; e >= 0; e--)              /* place elements in lists */\n  {\n    if(nv[e] <= 0) continue;         /* skip unless e is an element */\n    if(Cp[e] != -1)\n    {\n      next[e] = head[Cp[e]];      /* place e in list of its parent */\n      head[Cp[e]] = e;\n    }\n  }\n  for(k = 0, i = 0; i <= n; i++)       /* postorder the assembly tree */\n  {\n    if(Cp[i] == -1) k = internal::cs_tdfs<StorageIndex>(i, k, head, next, perm.indices().data(), w);\n  }\n  \n  perm.indices().conservativeResize(n);\n}\n\n} // namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_SPARSE_AMD_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/OrderingMethods/Eigen_Colamd.h",
    "content": "// // This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Desire Nuentsa Wakam <desire.nuentsa_wakam@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n// This file is modified from the colamd/symamd library. The copyright is below\n\n//   The authors of the code itself are Stefan I. Larimore and Timothy A.\n//   Davis (davis@cise.ufl.edu), University of Florida.  The algorithm was\n//   developed in collaboration with John Gilbert, Xerox PARC, and Esmond\n//   Ng, Oak Ridge National Laboratory.\n//\n//     Date:\n//\n//   September 8, 2003.  Version 2.3.\n//\n//     Acknowledgements:\n//\n//   This work was supported by the National Science Foundation, under\n//   grants DMS-9504974 and DMS-9803599.\n//\n//     Notice:\n//\n//   Copyright (c) 1998-2003 by the University of Florida.\n//   All Rights Reserved.\n//\n//   THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY\n//   EXPRESSED OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.\n//\n//   Permission is hereby granted to use, copy, modify, and/or distribute\n//   this program, provided that the Copyright, this License, and the\n//   Availability of the original version is retained on all copies and made\n//   accessible to the end-user of any code or package that includes COLAMD\n//   or any modified version of COLAMD.\n//\n//     Availability:\n//\n//   The colamd/symamd library is available at\n//\n//       http://www.suitesparse.com\n\n\n#ifndef EIGEN_COLAMD_H\n#define EIGEN_COLAMD_H\n\nnamespace internal {\n\nnamespace Colamd {\n\n/* Ensure that debugging is turned off: */\n#ifndef COLAMD_NDEBUG\n#define COLAMD_NDEBUG\n#endif /* NDEBUG */\n\n\n/* ========================================================================== */\n/* === Knob and statistics definitions ====================================== */\n/* ========================================================================== */\n\n/* size of the knobs [ ] array.  Only knobs [0..1] are currently used. */\nconst int NKnobs = 20;\n\n/* number of output statistics.  Only stats [0..6] are currently used. */\nconst int NStats = 20;\n\n/* Indices into knobs and stats array. */\nenum KnobsStatsIndex {\n  /* knobs [0] and stats [0]: dense row knob and output statistic. */\n  DenseRow = 0,\n\n  /* knobs [1] and stats [1]: dense column knob and output statistic. */\n  DenseCol = 1,\n\n  /* stats [2]: memory defragmentation count output statistic */\n  DefragCount = 2,\n\n  /* stats [3]: colamd status:  zero OK, > 0 warning or notice, < 0 error */\n  Status = 3,\n\n  /* stats [4..6]: error info, or info on jumbled columns */\n  Info1 = 4,\n  Info2 = 5,\n  Info3 = 6\n};\n\n/* error codes returned in stats [3]: */\nenum Status {\n  Ok = 0,\n  OkButJumbled = 1,\n  ErrorANotPresent = -1,\n  ErrorPNotPresent = -2,\n  ErrorNrowNegative = -3,\n  ErrorNcolNegative = -4,\n  ErrorNnzNegative = -5,\n  ErrorP0Nonzero = -6,\n  ErrorATooSmall = -7,\n  ErrorColLengthNegative = -8,\n  ErrorRowIndexOutOfBounds = -9,\n  ErrorOutOfMemory = -10,\n  ErrorInternalError = -999\n};\n/* ========================================================================== */\n/* === Definitions ========================================================== */\n/* ========================================================================== */\n\ntemplate <typename IndexType>\nIndexType ones_complement(const IndexType r) {\n  return (-(r)-1);\n}\n\n/* -------------------------------------------------------------------------- */\nconst int Empty = -1;\n\n/* Row and column status */\nenum RowColumnStatus {\n  Alive = 0,\n  Dead = -1\n};\n\n/* Column status */\nenum ColumnStatus {\n  DeadPrincipal = -1,\n  DeadNonPrincipal = -2\n};\n\n/* ========================================================================== */\n/* === Colamd reporting mechanism =========================================== */\n/* ========================================================================== */\n\n// == Row and Column structures ==\ntemplate <typename IndexType>\nstruct ColStructure\n{\n  IndexType start ;   /* index for A of first row in this column, or Dead */\n  /* if column is dead */\n  IndexType length ;  /* number of rows in this column */\n  union\n  {\n    IndexType thickness ; /* number of original columns represented by this */\n    /* col, if the column is alive */\n    IndexType parent ;  /* parent in parent tree super-column structure, if */\n    /* the column is dead */\n  } shared1 ;\n  union\n  {\n    IndexType score ; /* the score used to maintain heap, if col is alive */\n    IndexType order ; /* pivot ordering of this column, if col is dead */\n  } shared2 ;\n  union\n  {\n    IndexType headhash ;  /* head of a hash bucket, if col is at the head of */\n    /* a degree list */\n    IndexType hash ;  /* hash value, if col is not in a degree list */\n    IndexType prev ;  /* previous column in degree list, if col is in a */\n    /* degree list (but not at the head of a degree list) */\n  } shared3 ;\n  union\n  {\n    IndexType degree_next ; /* next column, if col is in a degree list */\n    IndexType hash_next ;   /* next column, if col is in a hash list */\n  } shared4 ;\n\n  inline bool is_dead() const { return start < Alive; }\n\n  inline bool is_alive() const { return start >= Alive; }\n\n  inline bool is_dead_principal() const { return start == DeadPrincipal; }\n\n  inline void kill_principal() { start = DeadPrincipal; }\n\n  inline void kill_non_principal() { start = DeadNonPrincipal; }\n\n};\n\ntemplate <typename IndexType>\nstruct RowStructure\n{\n  IndexType start ;   /* index for A of first col in this row */\n  IndexType length ;  /* number of principal columns in this row */\n  union\n  {\n    IndexType degree ;  /* number of principal & non-principal columns in row */\n    IndexType p ;   /* used as a row pointer in init_rows_cols () */\n  } shared1 ;\n  union\n  {\n    IndexType mark ;  /* for computing set differences and marking dead rows*/\n    IndexType first_column ;/* first column in row (used in garbage collection) */\n  } shared2 ;\n\n  inline bool is_dead() const { return shared2.mark < Alive; }\n\n  inline bool is_alive() const { return shared2.mark >= Alive; }\n\n  inline void kill() { shared2.mark = Dead; }\n\n};\n\n/* ========================================================================== */\n/* === Colamd recommended memory size ======================================= */\n/* ========================================================================== */\n\n/*\n  The recommended length Alen of the array A passed to colamd is given by\n  the COLAMD_RECOMMENDED (nnz, n_row, n_col) macro.  It returns -1 if any\n  argument is negative.  2*nnz space is required for the row and column\n  indices of the matrix. colamd_c (n_col) + colamd_r (n_row) space is\n  required for the Col and Row arrays, respectively, which are internal to\n  colamd.  An additional n_col space is the minimal amount of \"elbow room\",\n  and nnz/5 more space is recommended for run time efficiency.\n\n  This macro is not needed when using symamd.\n\n  Explicit typecast to IndexType added Sept. 23, 2002, COLAMD version 2.2, to avoid\n  gcc -pedantic warning messages.\n*/\ntemplate <typename IndexType>\ninline IndexType colamd_c(IndexType n_col)\n{ return IndexType( ((n_col) + 1) * sizeof (ColStructure<IndexType>) / sizeof (IndexType) ) ; }\n\ntemplate <typename IndexType>\ninline IndexType  colamd_r(IndexType n_row)\n{ return IndexType(((n_row) + 1) * sizeof (RowStructure<IndexType>) / sizeof (IndexType)); }\n\n// Prototypes of non-user callable routines\ntemplate <typename IndexType>\nstatic IndexType init_rows_cols (IndexType n_row, IndexType n_col, RowStructure<IndexType> Row [], ColStructure<IndexType> col [], IndexType A [], IndexType p [], IndexType stats[NStats] );\n\ntemplate <typename IndexType>\nstatic void init_scoring (IndexType n_row, IndexType n_col, RowStructure<IndexType> Row [], ColStructure<IndexType> Col [], IndexType A [], IndexType head [], double knobs[NKnobs], IndexType *p_n_row2, IndexType *p_n_col2, IndexType *p_max_deg);\n\ntemplate <typename IndexType>\nstatic IndexType find_ordering (IndexType n_row, IndexType n_col, IndexType Alen, RowStructure<IndexType> Row [], ColStructure<IndexType> Col [], IndexType A [], IndexType head [], IndexType n_col2, IndexType max_deg, IndexType pfree);\n\ntemplate <typename IndexType>\nstatic void order_children (IndexType n_col, ColStructure<IndexType> Col [], IndexType p []);\n\ntemplate <typename IndexType>\nstatic void detect_super_cols (ColStructure<IndexType> Col [], IndexType A [], IndexType head [], IndexType row_start, IndexType row_length ) ;\n\ntemplate <typename IndexType>\nstatic IndexType garbage_collection (IndexType n_row, IndexType n_col, RowStructure<IndexType> Row [], ColStructure<IndexType> Col [], IndexType A [], IndexType *pfree) ;\n\ntemplate <typename IndexType>\nstatic inline  IndexType clear_mark (IndexType n_row, RowStructure<IndexType> Row [] ) ;\n\n/* === No debugging ========================================================= */\n\n#define COLAMD_DEBUG0(params) ;\n#define COLAMD_DEBUG1(params) ;\n#define COLAMD_DEBUG2(params) ;\n#define COLAMD_DEBUG3(params) ;\n#define COLAMD_DEBUG4(params) ;\n\n#define COLAMD_ASSERT(expression) ((void) 0)\n\n\n/**\n * \\brief Returns the recommended value of Alen\n *\n * Returns recommended value of Alen for use by colamd.\n * Returns -1 if any input argument is negative.\n * The use of this routine or macro is optional.\n * Note that the macro uses its arguments   more than once,\n * so be careful for side effects, if you pass expressions as arguments to COLAMD_RECOMMENDED.\n *\n * \\param nnz nonzeros in A\n * \\param n_row number of rows in A\n * \\param n_col number of columns in A\n * \\return recommended value of Alen for use by colamd\n */\ntemplate <typename IndexType>\ninline IndexType recommended ( IndexType nnz, IndexType n_row, IndexType n_col)\n{\n  if ((nnz) < 0 || (n_row) < 0 || (n_col) < 0)\n    return (-1);\n  else\n    return (2 * (nnz) + colamd_c (n_col) + colamd_r (n_row) + (n_col) + ((nnz) / 5));\n}\n\n/**\n * \\brief set default parameters  The use of this routine is optional.\n *\n * Colamd: rows with more than (knobs [DenseRow] * n_col)\n * entries are removed prior to ordering.  Columns with more than\n * (knobs [DenseCol] * n_row) entries are removed prior to\n * ordering, and placed last in the output column ordering.\n *\n * DenseRow and DenseCol are defined as 0 and 1,\n * respectively, in colamd.h.  Default values of these two knobs\n * are both 0.5.  Currently, only knobs [0] and knobs [1] are\n * used, but future versions may use more knobs.  If so, they will\n * be properly set to their defaults by the future version of\n * colamd_set_defaults, so that the code that calls colamd will\n * not need to change, assuming that you either use\n * colamd_set_defaults, or pass a (double *) NULL pointer as the\n * knobs array to colamd or symamd.\n *\n * \\param knobs parameter settings for colamd\n */\n\nstatic inline void set_defaults(double knobs[NKnobs])\n{\n  /* === Local variables ================================================== */\n\n  int i ;\n\n  if (!knobs)\n  {\n    return ;      /* no knobs to initialize */\n  }\n  for (i = 0 ; i < NKnobs ; i++)\n  {\n    knobs [i] = 0 ;\n  }\n  knobs [Colamd::DenseRow] = 0.5 ;  /* ignore rows over 50% dense */\n  knobs [Colamd::DenseCol] = 0.5 ;  /* ignore columns over 50% dense */\n}\n\n/**\n * \\brief  Computes a column ordering using the column approximate minimum degree ordering\n *\n * Computes a column ordering (Q) of A such that P(AQ)=LU or\n * (AQ)'AQ=LL' have less fill-in and require fewer floating point\n * operations than factorizing the unpermuted matrix A or A'A,\n * respectively.\n *\n *\n * \\param n_row number of rows in A\n * \\param n_col number of columns in A\n * \\param Alen, size of the array A\n * \\param A row indices of the matrix, of size ALen\n * \\param p column pointers of A, of size n_col+1\n * \\param knobs parameter settings for colamd\n * \\param stats colamd output statistics and error codes\n */\ntemplate <typename IndexType>\nstatic bool compute_ordering(IndexType n_row, IndexType n_col, IndexType Alen, IndexType *A, IndexType *p, double knobs[NKnobs], IndexType stats[NStats])\n{\n  /* === Local variables ================================================== */\n\n  IndexType i ;     /* loop index */\n  IndexType nnz ;     /* nonzeros in A */\n  IndexType Row_size ;    /* size of Row [], in integers */\n  IndexType Col_size ;    /* size of Col [], in integers */\n  IndexType need ;      /* minimum required length of A */\n  Colamd::RowStructure<IndexType> *Row ;   /* pointer into A of Row [0..n_row] array */\n  Colamd::ColStructure<IndexType> *Col ;   /* pointer into A of Col [0..n_col] array */\n  IndexType n_col2 ;    /* number of non-dense, non-empty columns */\n  IndexType n_row2 ;    /* number of non-dense, non-empty rows */\n  IndexType ngarbage ;    /* number of garbage collections performed */\n  IndexType max_deg ;   /* maximum row degree */\n  double default_knobs [NKnobs] ; /* default knobs array */\n\n\n  /* === Check the input arguments ======================================== */\n\n  if (!stats)\n  {\n    COLAMD_DEBUG0 ((\"colamd: stats not present\\n\")) ;\n    return (false) ;\n  }\n  for (i = 0 ; i < NStats ; i++)\n  {\n    stats [i] = 0 ;\n  }\n  stats [Colamd::Status] = Colamd::Ok ;\n  stats [Colamd::Info1] = -1 ;\n  stats [Colamd::Info2] = -1 ;\n\n  if (!A)   /* A is not present */\n  {\n    stats [Colamd::Status] = Colamd::ErrorANotPresent ;\n    COLAMD_DEBUG0 ((\"colamd: A not present\\n\")) ;\n    return (false) ;\n  }\n\n  if (!p)   /* p is not present */\n  {\n    stats [Colamd::Status] = Colamd::ErrorPNotPresent ;\n    COLAMD_DEBUG0 ((\"colamd: p not present\\n\")) ;\n    return (false) ;\n  }\n\n  if (n_row < 0)  /* n_row must be >= 0 */\n  {\n    stats [Colamd::Status] = Colamd::ErrorNrowNegative ;\n    stats [Colamd::Info1] = n_row ;\n    COLAMD_DEBUG0 ((\"colamd: nrow negative %d\\n\", n_row)) ;\n    return (false) ;\n  }\n\n  if (n_col < 0)  /* n_col must be >= 0 */\n  {\n    stats [Colamd::Status] = Colamd::ErrorNcolNegative ;\n    stats [Colamd::Info1] = n_col ;\n    COLAMD_DEBUG0 ((\"colamd: ncol negative %d\\n\", n_col)) ;\n    return (false) ;\n  }\n\n  nnz = p [n_col] ;\n  if (nnz < 0)  /* nnz must be >= 0 */\n  {\n    stats [Colamd::Status] = Colamd::ErrorNnzNegative ;\n    stats [Colamd::Info1] = nnz ;\n    COLAMD_DEBUG0 ((\"colamd: number of entries negative %d\\n\", nnz)) ;\n    return (false) ;\n  }\n\n  if (p [0] != 0)\n  {\n    stats [Colamd::Status] = Colamd::ErrorP0Nonzero ;\n    stats [Colamd::Info1] = p [0] ;\n    COLAMD_DEBUG0 ((\"colamd: p[0] not zero %d\\n\", p [0])) ;\n    return (false) ;\n  }\n\n  /* === If no knobs, set default knobs =================================== */\n\n  if (!knobs)\n  {\n    set_defaults (default_knobs) ;\n    knobs = default_knobs ;\n  }\n\n  /* === Allocate the Row and Col arrays from array A ===================== */\n\n  Col_size = colamd_c (n_col) ;\n  Row_size = colamd_r (n_row) ;\n  need = 2*nnz + n_col + Col_size + Row_size ;\n\n  if (need > Alen)\n  {\n    /* not enough space in array A to perform the ordering */\n    stats [Colamd::Status] = Colamd::ErrorATooSmall ;\n    stats [Colamd::Info1] = need ;\n    stats [Colamd::Info2] = Alen ;\n    COLAMD_DEBUG0 ((\"colamd: Need Alen >= %d, given only Alen = %d\\n\", need,Alen));\n    return (false) ;\n  }\n\n  Alen -= Col_size + Row_size ;\n  Col = (ColStructure<IndexType> *) &A [Alen] ;\n  Row = (RowStructure<IndexType> *) &A [Alen + Col_size] ;\n\n  /* === Construct the row and column data structures ===================== */\n\n  if (!Colamd::init_rows_cols (n_row, n_col, Row, Col, A, p, stats))\n  {\n    /* input matrix is invalid */\n    COLAMD_DEBUG0 ((\"colamd: Matrix invalid\\n\")) ;\n    return (false) ;\n  }\n\n  /* === Initialize scores, kill dense rows/columns ======================= */\n\n  Colamd::init_scoring (n_row, n_col, Row, Col, A, p, knobs,\n\t\t&n_row2, &n_col2, &max_deg) ;\n\n  /* === Order the supercolumns =========================================== */\n\n  ngarbage = Colamd::find_ordering (n_row, n_col, Alen, Row, Col, A, p,\n\t\t\t    n_col2, max_deg, 2*nnz) ;\n\n  /* === Order the non-principal columns ================================== */\n\n  Colamd::order_children (n_col, Col, p) ;\n\n  /* === Return statistics in stats ======================================= */\n\n  stats [Colamd::DenseRow] = n_row - n_row2 ;\n  stats [Colamd::DenseCol] = n_col - n_col2 ;\n  stats [Colamd::DefragCount] = ngarbage ;\n  COLAMD_DEBUG0 ((\"colamd: done.\\n\")) ;\n  return (true) ;\n}\n\n/* ========================================================================== */\n/* === NON-USER-CALLABLE ROUTINES: ========================================== */\n/* ========================================================================== */\n\n/* There are no user-callable routines beyond this point in the file */\n\n/* ========================================================================== */\n/* === init_rows_cols ======================================================= */\n/* ========================================================================== */\n\n/*\n  Takes the column form of the matrix in A and creates the row form of the\n  matrix.  Also, row and column attributes are stored in the Col and Row\n  structs.  If the columns are un-sorted or contain duplicate row indices,\n  this routine will also sort and remove duplicate row indices from the\n  column form of the matrix.  Returns false if the matrix is invalid,\n  true otherwise.  Not user-callable.\n*/\ntemplate <typename IndexType>\nstatic IndexType init_rows_cols  /* returns true if OK, or false otherwise */\n  (\n    /* === Parameters ======================================================= */\n\n    IndexType n_row,      /* number of rows of A */\n    IndexType n_col,      /* number of columns of A */\n    RowStructure<IndexType> Row [],    /* of size n_row+1 */\n    ColStructure<IndexType> Col [],    /* of size n_col+1 */\n    IndexType A [],     /* row indices of A, of size Alen */\n    IndexType p [],     /* pointers to columns in A, of size n_col+1 */\n    IndexType stats [NStats]  /* colamd statistics */\n    )\n{\n  /* === Local variables ================================================== */\n\n  IndexType col ;     /* a column index */\n  IndexType row ;     /* a row index */\n  IndexType *cp ;     /* a column pointer */\n  IndexType *cp_end ;   /* a pointer to the end of a column */\n  IndexType *rp ;     /* a row pointer */\n  IndexType *rp_end ;   /* a pointer to the end of a row */\n  IndexType last_row ;    /* previous row */\n\n  /* === Initialize columns, and check column pointers ==================== */\n\n  for (col = 0 ; col < n_col ; col++)\n  {\n    Col [col].start = p [col] ;\n    Col [col].length = p [col+1] - p [col] ;\n\n    if ((Col [col].length) < 0) // extra parentheses to work-around gcc bug 10200\n    {\n      /* column pointers must be non-decreasing */\n      stats [Colamd::Status] = Colamd::ErrorColLengthNegative ;\n      stats [Colamd::Info1] = col ;\n      stats [Colamd::Info2] = Col [col].length ;\n      COLAMD_DEBUG0 ((\"colamd: col %d length %d < 0\\n\", col, Col [col].length)) ;\n      return (false) ;\n    }\n\n    Col [col].shared1.thickness = 1 ;\n    Col [col].shared2.score = 0 ;\n    Col [col].shared3.prev = Empty ;\n    Col [col].shared4.degree_next = Empty ;\n  }\n\n  /* p [0..n_col] no longer needed, used as \"head\" in subsequent routines */\n\n  /* === Scan columns, compute row degrees, and check row indices ========= */\n\n  stats [Info3] = 0 ;  /* number of duplicate or unsorted row indices*/\n\n  for (row = 0 ; row < n_row ; row++)\n  {\n    Row [row].length = 0 ;\n    Row [row].shared2.mark = -1 ;\n  }\n\n  for (col = 0 ; col < n_col ; col++)\n  {\n    last_row = -1 ;\n\n    cp = &A [p [col]] ;\n    cp_end = &A [p [col+1]] ;\n\n    while (cp < cp_end)\n    {\n      row = *cp++ ;\n\n      /* make sure row indices within range */\n      if (row < 0 || row >= n_row)\n      {\n\tstats [Colamd::Status] = Colamd::ErrorRowIndexOutOfBounds ;\n\tstats [Colamd::Info1] = col ;\n\tstats [Colamd::Info2] = row ;\n\tstats [Colamd::Info3] = n_row ;\n\tCOLAMD_DEBUG0 ((\"colamd: row %d col %d out of bounds\\n\", row, col)) ;\n\treturn (false) ;\n      }\n\n      if (row <= last_row || Row [row].shared2.mark == col)\n      {\n\t/* row index are unsorted or repeated (or both), thus col */\n\t/* is jumbled.  This is a notice, not an error condition. */\n\tstats [Colamd::Status] = Colamd::OkButJumbled ;\n\tstats [Colamd::Info1] = col ;\n\tstats [Colamd::Info2] = row ;\n\t(stats [Colamd::Info3]) ++ ;\n\tCOLAMD_DEBUG1 ((\"colamd: row %d col %d unsorted/duplicate\\n\",row,col));\n      }\n\n      if (Row [row].shared2.mark != col)\n      {\n\tRow [row].length++ ;\n      }\n      else\n      {\n\t/* this is a repeated entry in the column, */\n\t/* it will be removed */\n\tCol [col].length-- ;\n      }\n\n      /* mark the row as having been seen in this column */\n      Row [row].shared2.mark = col ;\n\n      last_row = row ;\n    }\n  }\n\n  /* === Compute row pointers ============================================= */\n\n  /* row form of the matrix starts directly after the column */\n  /* form of matrix in A */\n  Row [0].start = p [n_col] ;\n  Row [0].shared1.p = Row [0].start ;\n  Row [0].shared2.mark = -1 ;\n  for (row = 1 ; row < n_row ; row++)\n  {\n    Row [row].start = Row [row-1].start + Row [row-1].length ;\n    Row [row].shared1.p = Row [row].start ;\n    Row [row].shared2.mark = -1 ;\n  }\n\n  /* === Create row form ================================================== */\n\n  if (stats [Status] == OkButJumbled)\n  {\n    /* if cols jumbled, watch for repeated row indices */\n    for (col = 0 ; col < n_col ; col++)\n    {\n      cp = &A [p [col]] ;\n      cp_end = &A [p [col+1]] ;\n      while (cp < cp_end)\n      {\n\trow = *cp++ ;\n\tif (Row [row].shared2.mark != col)\n\t{\n\t  A [(Row [row].shared1.p)++] = col ;\n\t  Row [row].shared2.mark = col ;\n\t}\n      }\n    }\n  }\n  else\n  {\n    /* if cols not jumbled, we don't need the mark (this is faster) */\n    for (col = 0 ; col < n_col ; col++)\n    {\n      cp = &A [p [col]] ;\n      cp_end = &A [p [col+1]] ;\n      while (cp < cp_end)\n      {\n\tA [(Row [*cp++].shared1.p)++] = col ;\n      }\n    }\n  }\n\n  /* === Clear the row marks and set row degrees ========================== */\n\n  for (row = 0 ; row < n_row ; row++)\n  {\n    Row [row].shared2.mark = 0 ;\n    Row [row].shared1.degree = Row [row].length ;\n  }\n\n  /* === See if we need to re-create columns ============================== */\n\n  if (stats [Status] == OkButJumbled)\n  {\n    COLAMD_DEBUG0 ((\"colamd: reconstructing column form, matrix jumbled\\n\")) ;\n\n\n    /* === Compute col pointers ========================================= */\n\n    /* col form of the matrix starts at A [0]. */\n    /* Note, we may have a gap between the col form and the row */\n    /* form if there were duplicate entries, if so, it will be */\n    /* removed upon the first garbage collection */\n    Col [0].start = 0 ;\n    p [0] = Col [0].start ;\n    for (col = 1 ; col < n_col ; col++)\n    {\n      /* note that the lengths here are for pruned columns, i.e. */\n      /* no duplicate row indices will exist for these columns */\n      Col [col].start = Col [col-1].start + Col [col-1].length ;\n      p [col] = Col [col].start ;\n    }\n\n    /* === Re-create col form =========================================== */\n\n    for (row = 0 ; row < n_row ; row++)\n    {\n      rp = &A [Row [row].start] ;\n      rp_end = rp + Row [row].length ;\n      while (rp < rp_end)\n      {\n\tA [(p [*rp++])++] = row ;\n      }\n    }\n  }\n\n  /* === Done.  Matrix is not (or no longer) jumbled ====================== */\n\n  return (true) ;\n}\n\n\n/* ========================================================================== */\n/* === init_scoring ========================================================= */\n/* ========================================================================== */\n\n/*\n  Kills dense or empty columns and rows, calculates an initial score for\n  each column, and places all columns in the degree lists.  Not user-callable.\n*/\ntemplate <typename IndexType>\nstatic void init_scoring\n  (\n    /* === Parameters ======================================================= */\n\n    IndexType n_row,      /* number of rows of A */\n    IndexType n_col,      /* number of columns of A */\n    RowStructure<IndexType> Row [],    /* of size n_row+1 */\n    ColStructure<IndexType> Col [],    /* of size n_col+1 */\n    IndexType A [],     /* column form and row form of A */\n    IndexType head [],    /* of size n_col+1 */\n    double knobs [NKnobs],/* parameters */\n    IndexType *p_n_row2,    /* number of non-dense, non-empty rows */\n    IndexType *p_n_col2,    /* number of non-dense, non-empty columns */\n    IndexType *p_max_deg    /* maximum row degree */\n    )\n{\n  /* === Local variables ================================================== */\n\n  IndexType c ;     /* a column index */\n  IndexType r, row ;    /* a row index */\n  IndexType *cp ;     /* a column pointer */\n  IndexType deg ;     /* degree of a row or column */\n  IndexType *cp_end ;   /* a pointer to the end of a column */\n  IndexType *new_cp ;   /* new column pointer */\n  IndexType col_length ;    /* length of pruned column */\n  IndexType score ;     /* current column score */\n  IndexType n_col2 ;    /* number of non-dense, non-empty columns */\n  IndexType n_row2 ;    /* number of non-dense, non-empty rows */\n  IndexType dense_row_count ; /* remove rows with more entries than this */\n  IndexType dense_col_count ; /* remove cols with more entries than this */\n  IndexType min_score ;   /* smallest column score */\n  IndexType max_deg ;   /* maximum row degree */\n  IndexType next_col ;    /* Used to add to degree list.*/\n\n\n  /* === Extract knobs ==================================================== */\n\n  dense_row_count = numext::maxi(IndexType(0), numext::mini(IndexType(knobs [Colamd::DenseRow] * n_col), n_col)) ;\n  dense_col_count = numext::maxi(IndexType(0), numext::mini(IndexType(knobs [Colamd::DenseCol] * n_row), n_row)) ;\n  COLAMD_DEBUG1 ((\"colamd: densecount: %d %d\\n\", dense_row_count, dense_col_count)) ;\n  max_deg = 0 ;\n  n_col2 = n_col ;\n  n_row2 = n_row ;\n\n  /* === Kill empty columns =============================================== */\n\n  /* Put the empty columns at the end in their natural order, so that LU */\n  /* factorization can proceed as far as possible. */\n  for (c = n_col-1 ; c >= 0 ; c--)\n  {\n    deg = Col [c].length ;\n    if (deg == 0)\n    {\n      /* this is a empty column, kill and order it last */\n      Col [c].shared2.order = --n_col2 ;\n      Col[c].kill_principal() ;\n    }\n  }\n  COLAMD_DEBUG1 ((\"colamd: null columns killed: %d\\n\", n_col - n_col2)) ;\n\n  /* === Kill dense columns =============================================== */\n\n  /* Put the dense columns at the end, in their natural order */\n  for (c = n_col-1 ; c >= 0 ; c--)\n  {\n    /* skip any dead columns */\n    if (Col[c].is_dead())\n    {\n      continue ;\n    }\n    deg = Col [c].length ;\n    if (deg > dense_col_count)\n    {\n      /* this is a dense column, kill and order it last */\n      Col [c].shared2.order = --n_col2 ;\n      /* decrement the row degrees */\n      cp = &A [Col [c].start] ;\n      cp_end = cp + Col [c].length ;\n      while (cp < cp_end)\n      {\n\tRow [*cp++].shared1.degree-- ;\n      }\n      Col[c].kill_principal() ;\n    }\n  }\n  COLAMD_DEBUG1 ((\"colamd: Dense and null columns killed: %d\\n\", n_col - n_col2)) ;\n\n  /* === Kill dense and empty rows ======================================== */\n\n  for (r = 0 ; r < n_row ; r++)\n  {\n    deg = Row [r].shared1.degree ;\n    COLAMD_ASSERT (deg >= 0 && deg <= n_col) ;\n    if (deg > dense_row_count || deg == 0)\n    {\n      /* kill a dense or empty row */\n      Row[r].kill() ;\n      --n_row2 ;\n    }\n    else\n    {\n      /* keep track of max degree of remaining rows */\n      max_deg = numext::maxi(max_deg, deg) ;\n    }\n  }\n  COLAMD_DEBUG1 ((\"colamd: Dense and null rows killed: %d\\n\", n_row - n_row2)) ;\n\n  /* === Compute initial column scores ==================================== */\n\n  /* At this point the row degrees are accurate.  They reflect the number */\n  /* of \"live\" (non-dense) columns in each row.  No empty rows exist. */\n  /* Some \"live\" columns may contain only dead rows, however.  These are */\n  /* pruned in the code below. */\n\n  /* now find the initial matlab score for each column */\n  for (c = n_col-1 ; c >= 0 ; c--)\n  {\n    /* skip dead column */\n    if (Col[c].is_dead())\n    {\n      continue ;\n    }\n    score = 0 ;\n    cp = &A [Col [c].start] ;\n    new_cp = cp ;\n    cp_end = cp + Col [c].length ;\n    while (cp < cp_end)\n    {\n      /* get a row */\n      row = *cp++ ;\n      /* skip if dead */\n      if (Row[row].is_dead())\n      {\n\tcontinue ;\n      }\n      /* compact the column */\n      *new_cp++ = row ;\n      /* add row's external degree */\n      score += Row [row].shared1.degree - 1 ;\n      /* guard against integer overflow */\n      score = numext::mini(score, n_col) ;\n    }\n    /* determine pruned column length */\n    col_length = (IndexType) (new_cp - &A [Col [c].start]) ;\n    if (col_length == 0)\n    {\n      /* a newly-made null column (all rows in this col are \"dense\" */\n      /* and have already been killed) */\n      COLAMD_DEBUG2 ((\"Newly null killed: %d\\n\", c)) ;\n      Col [c].shared2.order = --n_col2 ;\n      Col[c].kill_principal() ;\n    }\n    else\n    {\n      /* set column length and set score */\n      COLAMD_ASSERT (score >= 0) ;\n      COLAMD_ASSERT (score <= n_col) ;\n      Col [c].length = col_length ;\n      Col [c].shared2.score = score ;\n    }\n  }\n  COLAMD_DEBUG1 ((\"colamd: Dense, null, and newly-null columns killed: %d\\n\",\n\t\t  n_col-n_col2)) ;\n\n  /* At this point, all empty rows and columns are dead.  All live columns */\n  /* are \"clean\" (containing no dead rows) and simplicial (no supercolumns */\n  /* yet).  Rows may contain dead columns, but all live rows contain at */\n  /* least one live column. */\n\n  /* === Initialize degree lists ========================================== */\n\n\n  /* clear the hash buckets */\n  for (c = 0 ; c <= n_col ; c++)\n  {\n    head [c] = Empty ;\n  }\n  min_score = n_col ;\n  /* place in reverse order, so low column indices are at the front */\n  /* of the lists.  This is to encourage natural tie-breaking */\n  for (c = n_col-1 ; c >= 0 ; c--)\n  {\n    /* only add principal columns to degree lists */\n    if (Col[c].is_alive())\n    {\n      COLAMD_DEBUG4 ((\"place %d score %d minscore %d ncol %d\\n\",\n\t\t      c, Col [c].shared2.score, min_score, n_col)) ;\n\n      /* === Add columns score to DList =============================== */\n\n      score = Col [c].shared2.score ;\n\n      COLAMD_ASSERT (min_score >= 0) ;\n      COLAMD_ASSERT (min_score <= n_col) ;\n      COLAMD_ASSERT (score >= 0) ;\n      COLAMD_ASSERT (score <= n_col) ;\n      COLAMD_ASSERT (head [score] >= Empty) ;\n\n      /* now add this column to dList at proper score location */\n      next_col = head [score] ;\n      Col [c].shared3.prev = Empty ;\n      Col [c].shared4.degree_next = next_col ;\n\n      /* if there already was a column with the same score, set its */\n      /* previous pointer to this new column */\n      if (next_col != Empty)\n      {\n\tCol [next_col].shared3.prev = c ;\n      }\n      head [score] = c ;\n\n      /* see if this score is less than current min */\n      min_score = numext::mini(min_score, score) ;\n\n\n    }\n  }\n\n\n  /* === Return number of remaining columns, and max row degree =========== */\n\n  *p_n_col2 = n_col2 ;\n  *p_n_row2 = n_row2 ;\n  *p_max_deg = max_deg ;\n}\n\n\n/* ========================================================================== */\n/* === find_ordering ======================================================== */\n/* ========================================================================== */\n\n/*\n  Order the principal columns of the supercolumn form of the matrix\n  (no supercolumns on input).  Uses a minimum approximate column minimum\n  degree ordering method.  Not user-callable.\n*/\ntemplate <typename IndexType>\nstatic IndexType find_ordering /* return the number of garbage collections */\n  (\n    /* === Parameters ======================================================= */\n\n    IndexType n_row,      /* number of rows of A */\n    IndexType n_col,      /* number of columns of A */\n    IndexType Alen,     /* size of A, 2*nnz + n_col or larger */\n    RowStructure<IndexType> Row [],    /* of size n_row+1 */\n    ColStructure<IndexType> Col [],    /* of size n_col+1 */\n    IndexType A [],     /* column form and row form of A */\n    IndexType head [],    /* of size n_col+1 */\n    IndexType n_col2,     /* Remaining columns to order */\n    IndexType max_deg,    /* Maximum row degree */\n    IndexType pfree     /* index of first free slot (2*nnz on entry) */\n    )\n{\n  /* === Local variables ================================================== */\n\n  IndexType k ;     /* current pivot ordering step */\n  IndexType pivot_col ;   /* current pivot column */\n  IndexType *cp ;     /* a column pointer */\n  IndexType *rp ;     /* a row pointer */\n  IndexType pivot_row ;   /* current pivot row */\n  IndexType *new_cp ;   /* modified column pointer */\n  IndexType *new_rp ;   /* modified row pointer */\n  IndexType pivot_row_start ; /* pointer to start of pivot row */\n  IndexType pivot_row_degree ;  /* number of columns in pivot row */\n  IndexType pivot_row_length ;  /* number of supercolumns in pivot row */\n  IndexType pivot_col_score ; /* score of pivot column */\n  IndexType needed_memory ;   /* free space needed for pivot row */\n  IndexType *cp_end ;   /* pointer to the end of a column */\n  IndexType *rp_end ;   /* pointer to the end of a row */\n  IndexType row ;     /* a row index */\n  IndexType col ;     /* a column index */\n  IndexType max_score ;   /* maximum possible score */\n  IndexType cur_score ;   /* score of current column */\n  unsigned int hash ;   /* hash value for supernode detection */\n  IndexType head_column ;   /* head of hash bucket */\n  IndexType first_col ;   /* first column in hash bucket */\n  IndexType tag_mark ;    /* marker value for mark array */\n  IndexType row_mark ;    /* Row [row].shared2.mark */\n  IndexType set_difference ;  /* set difference size of row with pivot row */\n  IndexType min_score ;   /* smallest column score */\n  IndexType col_thickness ;   /* \"thickness\" (no. of columns in a supercol) */\n  IndexType max_mark ;    /* maximum value of tag_mark */\n  IndexType pivot_col_thickness ; /* number of columns represented by pivot col */\n  IndexType prev_col ;    /* Used by Dlist operations. */\n  IndexType next_col ;    /* Used by Dlist operations. */\n  IndexType ngarbage ;    /* number of garbage collections performed */\n\n\n  /* === Initialization and clear mark ==================================== */\n\n  max_mark = INT_MAX - n_col ;  /* INT_MAX defined in <limits.h> */\n  tag_mark = Colamd::clear_mark (n_row, Row) ;\n  min_score = 0 ;\n  ngarbage = 0 ;\n  COLAMD_DEBUG1 ((\"colamd: Ordering, n_col2=%d\\n\", n_col2)) ;\n\n  /* === Order the columns ================================================ */\n\n  for (k = 0 ; k < n_col2 ; /* 'k' is incremented below */)\n  {\n\n    /* === Select pivot column, and order it ============================ */\n\n    /* make sure degree list isn't empty */\n    COLAMD_ASSERT (min_score >= 0) ;\n    COLAMD_ASSERT (min_score <= n_col) ;\n    COLAMD_ASSERT (head [min_score] >= Empty) ;\n\n    /* get pivot column from head of minimum degree list */\n    while (min_score < n_col && head [min_score] == Empty)\n    {\n      min_score++ ;\n    }\n    pivot_col = head [min_score] ;\n    COLAMD_ASSERT (pivot_col >= 0 && pivot_col <= n_col) ;\n    next_col = Col [pivot_col].shared4.degree_next ;\n    head [min_score] = next_col ;\n    if (next_col != Empty)\n    {\n      Col [next_col].shared3.prev = Empty ;\n    }\n\n    COLAMD_ASSERT (Col[pivot_col].is_alive()) ;\n    COLAMD_DEBUG3 ((\"Pivot col: %d\\n\", pivot_col)) ;\n\n    /* remember score for defrag check */\n    pivot_col_score = Col [pivot_col].shared2.score ;\n\n    /* the pivot column is the kth column in the pivot order */\n    Col [pivot_col].shared2.order = k ;\n\n    /* increment order count by column thickness */\n    pivot_col_thickness = Col [pivot_col].shared1.thickness ;\n    k += pivot_col_thickness ;\n    COLAMD_ASSERT (pivot_col_thickness > 0) ;\n\n    /* === Garbage_collection, if necessary ============================= */\n\n    needed_memory = numext::mini(pivot_col_score, n_col - k) ;\n    if (pfree + needed_memory >= Alen)\n    {\n      pfree = Colamd::garbage_collection (n_row, n_col, Row, Col, A, &A [pfree]) ;\n      ngarbage++ ;\n      /* after garbage collection we will have enough */\n      COLAMD_ASSERT (pfree + needed_memory < Alen) ;\n      /* garbage collection has wiped out the Row[].shared2.mark array */\n      tag_mark = Colamd::clear_mark (n_row, Row) ;\n\n    }\n\n    /* === Compute pivot row pattern ==================================== */\n\n    /* get starting location for this new merged row */\n    pivot_row_start = pfree ;\n\n    /* initialize new row counts to zero */\n    pivot_row_degree = 0 ;\n\n    /* tag pivot column as having been visited so it isn't included */\n    /* in merged pivot row */\n    Col [pivot_col].shared1.thickness = -pivot_col_thickness ;\n\n    /* pivot row is the union of all rows in the pivot column pattern */\n    cp = &A [Col [pivot_col].start] ;\n    cp_end = cp + Col [pivot_col].length ;\n    while (cp < cp_end)\n    {\n      /* get a row */\n      row = *cp++ ;\n      COLAMD_DEBUG4 ((\"Pivot col pattern %d %d\\n\", Row[row].is_alive(), row)) ;\n      /* skip if row is dead */\n      if (Row[row].is_dead())\n      {\n\tcontinue ;\n      }\n      rp = &A [Row [row].start] ;\n      rp_end = rp + Row [row].length ;\n      while (rp < rp_end)\n      {\n\t/* get a column */\n\tcol = *rp++ ;\n\t/* add the column, if alive and untagged */\n\tcol_thickness = Col [col].shared1.thickness ;\n\tif (col_thickness > 0 && Col[col].is_alive())\n\t{\n\t  /* tag column in pivot row */\n\t  Col [col].shared1.thickness = -col_thickness ;\n\t  COLAMD_ASSERT (pfree < Alen) ;\n\t  /* place column in pivot row */\n\t  A [pfree++] = col ;\n\t  pivot_row_degree += col_thickness ;\n\t}\n      }\n    }\n\n    /* clear tag on pivot column */\n    Col [pivot_col].shared1.thickness = pivot_col_thickness ;\n    max_deg = numext::maxi(max_deg, pivot_row_degree) ;\n\n\n    /* === Kill all rows used to construct pivot row ==================== */\n\n    /* also kill pivot row, temporarily */\n    cp = &A [Col [pivot_col].start] ;\n    cp_end = cp + Col [pivot_col].length ;\n    while (cp < cp_end)\n    {\n      /* may be killing an already dead row */\n      row = *cp++ ;\n      COLAMD_DEBUG3 ((\"Kill row in pivot col: %d\\n\", row)) ;\n      Row[row].kill() ;\n    }\n\n    /* === Select a row index to use as the new pivot row =============== */\n\n    pivot_row_length = pfree - pivot_row_start ;\n    if (pivot_row_length > 0)\n    {\n      /* pick the \"pivot\" row arbitrarily (first row in col) */\n      pivot_row = A [Col [pivot_col].start] ;\n      COLAMD_DEBUG3 ((\"Pivotal row is %d\\n\", pivot_row)) ;\n    }\n    else\n    {\n      /* there is no pivot row, since it is of zero length */\n      pivot_row = Empty ;\n      COLAMD_ASSERT (pivot_row_length == 0) ;\n    }\n    COLAMD_ASSERT (Col [pivot_col].length > 0 || pivot_row_length == 0) ;\n\n    /* === Approximate degree computation =============================== */\n\n    /* Here begins the computation of the approximate degree.  The column */\n    /* score is the sum of the pivot row \"length\", plus the size of the */\n    /* set differences of each row in the column minus the pattern of the */\n    /* pivot row itself.  The column (\"thickness\") itself is also */\n    /* excluded from the column score (we thus use an approximate */\n    /* external degree). */\n\n    /* The time taken by the following code (compute set differences, and */\n    /* add them up) is proportional to the size of the data structure */\n    /* being scanned - that is, the sum of the sizes of each column in */\n    /* the pivot row.  Thus, the amortized time to compute a column score */\n    /* is proportional to the size of that column (where size, in this */\n    /* context, is the column \"length\", or the number of row indices */\n    /* in that column).  The number of row indices in a column is */\n    /* monotonically non-decreasing, from the length of the original */\n    /* column on input to colamd. */\n\n    /* === Compute set differences ====================================== */\n\n    COLAMD_DEBUG3 ((\"** Computing set differences phase. **\\n\")) ;\n\n    /* pivot row is currently dead - it will be revived later. */\n\n    COLAMD_DEBUG3 ((\"Pivot row: \")) ;\n    /* for each column in pivot row */\n    rp = &A [pivot_row_start] ;\n    rp_end = rp + pivot_row_length ;\n    while (rp < rp_end)\n    {\n      col = *rp++ ;\n      COLAMD_ASSERT (Col[col].is_alive() && col != pivot_col) ;\n      COLAMD_DEBUG3 ((\"Col: %d\\n\", col)) ;\n\n      /* clear tags used to construct pivot row pattern */\n      col_thickness = -Col [col].shared1.thickness ;\n      COLAMD_ASSERT (col_thickness > 0) ;\n      Col [col].shared1.thickness = col_thickness ;\n\n      /* === Remove column from degree list =========================== */\n\n      cur_score = Col [col].shared2.score ;\n      prev_col = Col [col].shared3.prev ;\n      next_col = Col [col].shared4.degree_next ;\n      COLAMD_ASSERT (cur_score >= 0) ;\n      COLAMD_ASSERT (cur_score <= n_col) ;\n      COLAMD_ASSERT (cur_score >= Empty) ;\n      if (prev_col == Empty)\n      {\n\thead [cur_score] = next_col ;\n      }\n      else\n      {\n\tCol [prev_col].shared4.degree_next = next_col ;\n      }\n      if (next_col != Empty)\n      {\n\tCol [next_col].shared3.prev = prev_col ;\n      }\n\n      /* === Scan the column ========================================== */\n\n      cp = &A [Col [col].start] ;\n      cp_end = cp + Col [col].length ;\n      while (cp < cp_end)\n      {\n\t/* get a row */\n\trow = *cp++ ;\n\t/* skip if dead */\n\tif (Row[row].is_dead())\n\t{\n\t  continue ;\n\t}\n  row_mark = Row [row].shared2.mark ;\n\tCOLAMD_ASSERT (row != pivot_row) ;\n\tset_difference = row_mark - tag_mark ;\n\t/* check if the row has been seen yet */\n\tif (set_difference < 0)\n\t{\n\t  COLAMD_ASSERT (Row [row].shared1.degree <= max_deg) ;\n\t  set_difference = Row [row].shared1.degree ;\n\t}\n\t/* subtract column thickness from this row's set difference */\n\tset_difference -= col_thickness ;\n\tCOLAMD_ASSERT (set_difference >= 0) ;\n\t/* absorb this row if the set difference becomes zero */\n\tif (set_difference == 0)\n\t{\n\t  COLAMD_DEBUG3 ((\"aggressive absorption. Row: %d\\n\", row)) ;\n\t  Row[row].kill() ;\n\t}\n\telse\n\t{\n\t  /* save the new mark */\n\t  Row [row].shared2.mark = set_difference + tag_mark ;\n\t}\n      }\n    }\n\n\n    /* === Add up set differences for each column ======================= */\n\n    COLAMD_DEBUG3 ((\"** Adding set differences phase. **\\n\")) ;\n\n    /* for each column in pivot row */\n    rp = &A [pivot_row_start] ;\n    rp_end = rp + pivot_row_length ;\n    while (rp < rp_end)\n    {\n      /* get a column */\n      col = *rp++ ;\n      COLAMD_ASSERT (Col[col].is_alive() && col != pivot_col) ;\n      hash = 0 ;\n      cur_score = 0 ;\n      cp = &A [Col [col].start] ;\n      /* compact the column */\n      new_cp = cp ;\n      cp_end = cp + Col [col].length ;\n\n      COLAMD_DEBUG4 ((\"Adding set diffs for Col: %d.\\n\", col)) ;\n\n      while (cp < cp_end)\n      {\n\t/* get a row */\n\trow = *cp++ ;\n\tCOLAMD_ASSERT(row >= 0 && row < n_row) ;\n\t/* skip if dead */\n\tif (Row [row].is_dead())\n\t{\n\t  continue ;\n\t}\n  row_mark = Row [row].shared2.mark ;\n\tCOLAMD_ASSERT (row_mark > tag_mark) ;\n\t/* compact the column */\n\t*new_cp++ = row ;\n\t/* compute hash function */\n\thash += row ;\n\t/* add set difference */\n\tcur_score += row_mark - tag_mark ;\n\t/* integer overflow... */\n\tcur_score = numext::mini(cur_score, n_col) ;\n      }\n\n      /* recompute the column's length */\n      Col [col].length = (IndexType) (new_cp - &A [Col [col].start]) ;\n\n      /* === Further mass elimination ================================= */\n\n      if (Col [col].length == 0)\n      {\n\tCOLAMD_DEBUG4 ((\"further mass elimination. Col: %d\\n\", col)) ;\n\t/* nothing left but the pivot row in this column */\n\tCol[col].kill_principal() ;\n\tpivot_row_degree -= Col [col].shared1.thickness ;\n\tCOLAMD_ASSERT (pivot_row_degree >= 0) ;\n\t/* order it */\n\tCol [col].shared2.order = k ;\n\t/* increment order count by column thickness */\n\tk += Col [col].shared1.thickness ;\n      }\n      else\n      {\n\t/* === Prepare for supercolumn detection ==================== */\n\n\tCOLAMD_DEBUG4 ((\"Preparing supercol detection for Col: %d.\\n\", col)) ;\n\n\t/* save score so far */\n\tCol [col].shared2.score = cur_score ;\n\n\t/* add column to hash table, for supercolumn detection */\n\thash %= n_col + 1 ;\n\n\tCOLAMD_DEBUG4 ((\" Hash = %d, n_col = %d.\\n\", hash, n_col)) ;\n\tCOLAMD_ASSERT (hash <= n_col) ;\n\n\thead_column = head [hash] ;\n\tif (head_column > Empty)\n\t{\n\t  /* degree list \"hash\" is non-empty, use prev (shared3) of */\n\t  /* first column in degree list as head of hash bucket */\n\t  first_col = Col [head_column].shared3.headhash ;\n\t  Col [head_column].shared3.headhash = col ;\n\t}\n\telse\n\t{\n\t  /* degree list \"hash\" is empty, use head as hash bucket */\n\t  first_col = - (head_column + 2) ;\n\t  head [hash] = - (col + 2) ;\n\t}\n\tCol [col].shared4.hash_next = first_col ;\n\n\t/* save hash function in Col [col].shared3.hash */\n\tCol [col].shared3.hash = (IndexType) hash ;\n\tCOLAMD_ASSERT (Col[col].is_alive()) ;\n      }\n    }\n\n    /* The approximate external column degree is now computed.  */\n\n    /* === Supercolumn detection ======================================== */\n\n    COLAMD_DEBUG3 ((\"** Supercolumn detection phase. **\\n\")) ;\n\n    Colamd::detect_super_cols (Col, A, head, pivot_row_start, pivot_row_length) ;\n\n    /* === Kill the pivotal column ====================================== */\n\n    Col[pivot_col].kill_principal() ;\n\n    /* === Clear mark =================================================== */\n\n    tag_mark += (max_deg + 1) ;\n    if (tag_mark >= max_mark)\n    {\n      COLAMD_DEBUG2 ((\"clearing tag_mark\\n\")) ;\n      tag_mark = Colamd::clear_mark (n_row, Row) ;\n    }\n\n    /* === Finalize the new pivot row, and column scores ================ */\n\n    COLAMD_DEBUG3 ((\"** Finalize scores phase. **\\n\")) ;\n\n    /* for each column in pivot row */\n    rp = &A [pivot_row_start] ;\n    /* compact the pivot row */\n    new_rp = rp ;\n    rp_end = rp + pivot_row_length ;\n    while (rp < rp_end)\n    {\n      col = *rp++ ;\n      /* skip dead columns */\n      if (Col[col].is_dead())\n      {\n\tcontinue ;\n      }\n      *new_rp++ = col ;\n      /* add new pivot row to column */\n      A [Col [col].start + (Col [col].length++)] = pivot_row ;\n\n      /* retrieve score so far and add on pivot row's degree. */\n      /* (we wait until here for this in case the pivot */\n      /* row's degree was reduced due to mass elimination). */\n      cur_score = Col [col].shared2.score + pivot_row_degree ;\n\n      /* calculate the max possible score as the number of */\n      /* external columns minus the 'k' value minus the */\n      /* columns thickness */\n      max_score = n_col - k - Col [col].shared1.thickness ;\n\n      /* make the score the external degree of the union-of-rows */\n      cur_score -= Col [col].shared1.thickness ;\n\n      /* make sure score is less or equal than the max score */\n      cur_score = numext::mini(cur_score, max_score) ;\n      COLAMD_ASSERT (cur_score >= 0) ;\n\n      /* store updated score */\n      Col [col].shared2.score = cur_score ;\n\n      /* === Place column back in degree list ========================= */\n\n      COLAMD_ASSERT (min_score >= 0) ;\n      COLAMD_ASSERT (min_score <= n_col) ;\n      COLAMD_ASSERT (cur_score >= 0) ;\n      COLAMD_ASSERT (cur_score <= n_col) ;\n      COLAMD_ASSERT (head [cur_score] >= Empty) ;\n      next_col = head [cur_score] ;\n      Col [col].shared4.degree_next = next_col ;\n      Col [col].shared3.prev = Empty ;\n      if (next_col != Empty)\n      {\n\tCol [next_col].shared3.prev = col ;\n      }\n      head [cur_score] = col ;\n\n      /* see if this score is less than current min */\n      min_score = numext::mini(min_score, cur_score) ;\n\n    }\n\n    /* === Resurrect the new pivot row ================================== */\n\n    if (pivot_row_degree > 0)\n    {\n      /* update pivot row length to reflect any cols that were killed */\n      /* during super-col detection and mass elimination */\n      Row [pivot_row].start  = pivot_row_start ;\n      Row [pivot_row].length = (IndexType) (new_rp - &A[pivot_row_start]) ;\n      Row [pivot_row].shared1.degree = pivot_row_degree ;\n      Row [pivot_row].shared2.mark = 0 ;\n      /* pivot row is no longer dead */\n    }\n  }\n\n  /* === All principal columns have now been ordered ====================== */\n\n  return (ngarbage) ;\n}\n\n\n/* ========================================================================== */\n/* === order_children ======================================================= */\n/* ========================================================================== */\n\n/*\n  The find_ordering routine has ordered all of the principal columns (the\n  representatives of the supercolumns).  The non-principal columns have not\n  yet been ordered.  This routine orders those columns by walking up the\n  parent tree (a column is a child of the column which absorbed it).  The\n  final permutation vector is then placed in p [0 ... n_col-1], with p [0]\n  being the first column, and p [n_col-1] being the last.  It doesn't look\n  like it at first glance, but be assured that this routine takes time linear\n  in the number of columns.  Although not immediately obvious, the time\n  taken by this routine is O (n_col), that is, linear in the number of\n  columns.  Not user-callable.\n*/\ntemplate <typename IndexType>\nstatic inline  void order_children\n(\n  /* === Parameters ======================================================= */\n\n  IndexType n_col,      /* number of columns of A */\n  ColStructure<IndexType> Col [],    /* of size n_col+1 */\n  IndexType p []      /* p [0 ... n_col-1] is the column permutation*/\n  )\n{\n  /* === Local variables ================================================== */\n\n  IndexType i ;     /* loop counter for all columns */\n  IndexType c ;     /* column index */\n  IndexType parent ;    /* index of column's parent */\n  IndexType order ;     /* column's order */\n\n  /* === Order each non-principal column ================================== */\n\n  for (i = 0 ; i < n_col ; i++)\n  {\n    /* find an un-ordered non-principal column */\n    COLAMD_ASSERT (col_is_dead(Col, i)) ;\n    if (!Col[i].is_dead_principal() && Col [i].shared2.order == Empty)\n    {\n      parent = i ;\n      /* once found, find its principal parent */\n      do\n      {\n\tparent = Col [parent].shared1.parent ;\n      } while (!Col[parent].is_dead_principal()) ;\n\n      /* now, order all un-ordered non-principal columns along path */\n      /* to this parent.  collapse tree at the same time */\n      c = i ;\n      /* get order of parent */\n      order = Col [parent].shared2.order ;\n\n      do\n      {\n\tCOLAMD_ASSERT (Col [c].shared2.order == Empty) ;\n\n\t/* order this column */\n\tCol [c].shared2.order = order++ ;\n\t/* collaps tree */\n\tCol [c].shared1.parent = parent ;\n\n\t/* get immediate parent of this column */\n\tc = Col [c].shared1.parent ;\n\n\t/* continue until we hit an ordered column.  There are */\n\t/* guaranteed not to be anymore unordered columns */\n\t/* above an ordered column */\n      } while (Col [c].shared2.order == Empty) ;\n\n      /* re-order the super_col parent to largest order for this group */\n      Col [parent].shared2.order = order ;\n    }\n  }\n\n  /* === Generate the permutation ========================================= */\n\n  for (c = 0 ; c < n_col ; c++)\n  {\n    p [Col [c].shared2.order] = c ;\n  }\n}\n\n\n/* ========================================================================== */\n/* === detect_super_cols ==================================================== */\n/* ========================================================================== */\n\n/*\n  Detects supercolumns by finding matches between columns in the hash buckets.\n  Check amongst columns in the set A [row_start ... row_start + row_length-1].\n  The columns under consideration are currently *not* in the degree lists,\n  and have already been placed in the hash buckets.\n\n  The hash bucket for columns whose hash function is equal to h is stored\n  as follows:\n\n  if head [h] is >= 0, then head [h] contains a degree list, so:\n\n  head [h] is the first column in degree bucket h.\n  Col [head [h]].headhash gives the first column in hash bucket h.\n\n  otherwise, the degree list is empty, and:\n\n  -(head [h] + 2) is the first column in hash bucket h.\n\n  For a column c in a hash bucket, Col [c].shared3.prev is NOT a \"previous\n  column\" pointer.  Col [c].shared3.hash is used instead as the hash number\n  for that column.  The value of Col [c].shared4.hash_next is the next column\n  in the same hash bucket.\n\n  Assuming no, or \"few\" hash collisions, the time taken by this routine is\n  linear in the sum of the sizes (lengths) of each column whose score has\n  just been computed in the approximate degree computation.\n  Not user-callable.\n*/\ntemplate <typename IndexType>\nstatic void detect_super_cols\n(\n  /* === Parameters ======================================================= */\n\n  ColStructure<IndexType> Col [],    /* of size n_col+1 */\n  IndexType A [],     /* row indices of A */\n  IndexType head [],    /* head of degree lists and hash buckets */\n  IndexType row_start,    /* pointer to set of columns to check */\n  IndexType row_length    /* number of columns to check */\n)\n{\n  /* === Local variables ================================================== */\n\n  IndexType hash ;      /* hash value for a column */\n  IndexType *rp ;     /* pointer to a row */\n  IndexType c ;     /* a column index */\n  IndexType super_c ;   /* column index of the column to absorb into */\n  IndexType *cp1 ;      /* column pointer for column super_c */\n  IndexType *cp2 ;      /* column pointer for column c */\n  IndexType length ;    /* length of column super_c */\n  IndexType prev_c ;    /* column preceding c in hash bucket */\n  IndexType i ;     /* loop counter */\n  IndexType *rp_end ;   /* pointer to the end of the row */\n  IndexType col ;     /* a column index in the row to check */\n  IndexType head_column ;   /* first column in hash bucket or degree list */\n  IndexType first_col ;   /* first column in hash bucket */\n\n  /* === Consider each column in the row ================================== */\n\n  rp = &A [row_start] ;\n  rp_end = rp + row_length ;\n  while (rp < rp_end)\n  {\n    col = *rp++ ;\n    if (Col[col].is_dead())\n    {\n      continue ;\n    }\n\n    /* get hash number for this column */\n    hash = Col [col].shared3.hash ;\n    COLAMD_ASSERT (hash <= n_col) ;\n\n    /* === Get the first column in this hash bucket ===================== */\n\n    head_column = head [hash] ;\n    if (head_column > Empty)\n    {\n      first_col = Col [head_column].shared3.headhash ;\n    }\n    else\n    {\n      first_col = - (head_column + 2) ;\n    }\n\n    /* === Consider each column in the hash bucket ====================== */\n\n    for (super_c = first_col ; super_c != Empty ;\n\t super_c = Col [super_c].shared4.hash_next)\n    {\n      COLAMD_ASSERT (Col [super_c].is_alive()) ;\n      COLAMD_ASSERT (Col [super_c].shared3.hash == hash) ;\n      length = Col [super_c].length ;\n\n      /* prev_c is the column preceding column c in the hash bucket */\n      prev_c = super_c ;\n\n      /* === Compare super_c with all columns after it ================ */\n\n      for (c = Col [super_c].shared4.hash_next ;\n\t   c != Empty ; c = Col [c].shared4.hash_next)\n      {\n\tCOLAMD_ASSERT (c != super_c) ;\n\tCOLAMD_ASSERT (Col[c].is_alive()) ;\n\tCOLAMD_ASSERT (Col [c].shared3.hash == hash) ;\n\n\t/* not identical if lengths or scores are different */\n\tif (Col [c].length != length ||\n\t    Col [c].shared2.score != Col [super_c].shared2.score)\n\t{\n\t  prev_c = c ;\n\t  continue ;\n\t}\n\n\t/* compare the two columns */\n\tcp1 = &A [Col [super_c].start] ;\n\tcp2 = &A [Col [c].start] ;\n\n\tfor (i = 0 ; i < length ; i++)\n\t{\n\t  /* the columns are \"clean\" (no dead rows) */\n\t  COLAMD_ASSERT ( cp1->is_alive() );\n\t  COLAMD_ASSERT ( cp2->is_alive() );\n\t  /* row indices will same order for both supercols, */\n\t  /* no gather scatter necessary */\n\t  if (*cp1++ != *cp2++)\n\t  {\n\t    break ;\n\t  }\n\t}\n\n\t/* the two columns are different if the for-loop \"broke\" */\n\tif (i != length)\n\t{\n\t  prev_c = c ;\n\t  continue ;\n\t}\n\n\t/* === Got it!  two columns are identical =================== */\n\n\tCOLAMD_ASSERT (Col [c].shared2.score == Col [super_c].shared2.score) ;\n\n\tCol [super_c].shared1.thickness += Col [c].shared1.thickness ;\n\tCol [c].shared1.parent = super_c ;\n\tCol[c].kill_non_principal() ;\n\t/* order c later, in order_children() */\n\tCol [c].shared2.order = Empty ;\n\t/* remove c from hash bucket */\n\tCol [prev_c].shared4.hash_next = Col [c].shared4.hash_next ;\n      }\n    }\n\n    /* === Empty this hash bucket ======================================= */\n\n    if (head_column > Empty)\n    {\n      /* corresponding degree list \"hash\" is not empty */\n      Col [head_column].shared3.headhash = Empty ;\n    }\n    else\n    {\n      /* corresponding degree list \"hash\" is empty */\n      head [hash] = Empty ;\n    }\n  }\n}\n\n\n/* ========================================================================== */\n/* === garbage_collection =================================================== */\n/* ========================================================================== */\n\n/*\n  Defragments and compacts columns and rows in the workspace A.  Used when\n  all available memory has been used while performing row merging.  Returns\n  the index of the first free position in A, after garbage collection.  The\n  time taken by this routine is linear is the size of the array A, which is\n  itself linear in the number of nonzeros in the input matrix.\n  Not user-callable.\n*/\ntemplate <typename IndexType>\nstatic IndexType garbage_collection  /* returns the new value of pfree */\n  (\n    /* === Parameters ======================================================= */\n\n    IndexType n_row,      /* number of rows */\n    IndexType n_col,      /* number of columns */\n    RowStructure<IndexType> Row [],    /* row info */\n    ColStructure<IndexType> Col [],    /* column info */\n    IndexType A [],     /* A [0 ... Alen-1] holds the matrix */\n    IndexType *pfree      /* &A [0] ... pfree is in use */\n    )\n{\n  /* === Local variables ================================================== */\n\n  IndexType *psrc ;     /* source pointer */\n  IndexType *pdest ;    /* destination pointer */\n  IndexType j ;     /* counter */\n  IndexType r ;     /* a row index */\n  IndexType c ;     /* a column index */\n  IndexType length ;    /* length of a row or column */\n\n  /* === Defragment the columns =========================================== */\n\n  pdest = &A[0] ;\n  for (c = 0 ; c < n_col ; c++)\n  {\n    if (Col[c].is_alive())\n    {\n      psrc = &A [Col [c].start] ;\n\n      /* move and compact the column */\n      COLAMD_ASSERT (pdest <= psrc) ;\n      Col [c].start = (IndexType) (pdest - &A [0]) ;\n      length = Col [c].length ;\n      for (j = 0 ; j < length ; j++)\n      {\n\tr = *psrc++ ;\n\tif (Row[r].is_alive())\n\t{\n\t  *pdest++ = r ;\n\t}\n      }\n      Col [c].length = (IndexType) (pdest - &A [Col [c].start]) ;\n    }\n  }\n\n  /* === Prepare to defragment the rows =================================== */\n\n  for (r = 0 ; r < n_row ; r++)\n  {\n    if (Row[r].is_alive())\n    {\n      if (Row [r].length == 0)\n      {\n        /* this row is of zero length.  cannot compact it, so kill it */\n        COLAMD_DEBUG3 ((\"Defrag row kill\\n\")) ;\n        Row[r].kill() ;\n      }\n      else\n      {\n        /* save first column index in Row [r].shared2.first_column */\n        psrc = &A [Row [r].start] ;\n        Row [r].shared2.first_column = *psrc ;\n        COLAMD_ASSERT (Row[r].is_alive()) ;\n        /* flag the start of the row with the one's complement of row */\n        *psrc = ones_complement(r) ;\n\n      }\n    }\n  }\n\n  /* === Defragment the rows ============================================== */\n\n  psrc = pdest ;\n  while (psrc < pfree)\n  {\n    /* find a negative number ... the start of a row */\n    if (*psrc++ < 0)\n    {\n      psrc-- ;\n      /* get the row index */\n      r = ones_complement(*psrc) ;\n      COLAMD_ASSERT (r >= 0 && r < n_row) ;\n      /* restore first column index */\n      *psrc = Row [r].shared2.first_column ;\n      COLAMD_ASSERT (Row[r].is_alive()) ;\n\n      /* move and compact the row */\n      COLAMD_ASSERT (pdest <= psrc) ;\n      Row [r].start = (IndexType) (pdest - &A [0]) ;\n      length = Row [r].length ;\n      for (j = 0 ; j < length ; j++)\n      {\n\tc = *psrc++ ;\n\tif (Col[c].is_alive())\n\t{\n\t  *pdest++ = c ;\n\t}\n      }\n      Row [r].length = (IndexType) (pdest - &A [Row [r].start]) ;\n\n    }\n  }\n  /* ensure we found all the rows */\n  COLAMD_ASSERT (debug_rows == 0) ;\n\n  /* === Return the new value of pfree ==================================== */\n\n  return ((IndexType) (pdest - &A [0])) ;\n}\n\n\n/* ========================================================================== */\n/* === clear_mark =========================================================== */\n/* ========================================================================== */\n\n/*\n  Clears the Row [].shared2.mark array, and returns the new tag_mark.\n  Return value is the new tag_mark.  Not user-callable.\n*/\ntemplate <typename IndexType>\nstatic inline  IndexType clear_mark  /* return the new value for tag_mark */\n  (\n      /* === Parameters ======================================================= */\n\n    IndexType n_row,    /* number of rows in A */\n    RowStructure<IndexType> Row [] /* Row [0 ... n_row-1].shared2.mark is set to zero */\n    )\n{\n  /* === Local variables ================================================== */\n\n  IndexType r ;\n\n  for (r = 0 ; r < n_row ; r++)\n  {\n    if (Row[r].is_alive())\n    {\n      Row [r].shared2.mark = 0 ;\n    }\n  }\n  return (1) ;\n}\n\n} // namespace Colamd\n\n} // namespace internal\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/OrderingMethods/Ordering.h",
    "content": " \n// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012  Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_ORDERING_H\n#define EIGEN_ORDERING_H\n\nnamespace Eigen {\n  \n#include \"Eigen_Colamd.h\"\n\nnamespace internal {\n    \n/** \\internal\n  * \\ingroup OrderingMethods_Module\n  * \\param[in] A the input non-symmetric matrix\n  * \\param[out] symmat the symmetric pattern A^T+A from the input matrix \\a A.\n  * FIXME: The values should not be considered here\n  */\ntemplate<typename MatrixType> \nvoid ordering_helper_at_plus_a(const MatrixType& A, MatrixType& symmat)\n{\n  MatrixType C;\n  C = A.transpose(); // NOTE: Could be  costly\n  for (int i = 0; i < C.rows(); i++) \n  {\n      for (typename MatrixType::InnerIterator it(C, i); it; ++it)\n        it.valueRef() = typename MatrixType::Scalar(0);\n  }\n  symmat = C + A;\n}\n    \n}\n\n/** \\ingroup OrderingMethods_Module\n  * \\class AMDOrdering\n  *\n  * Functor computing the \\em approximate \\em minimum \\em degree ordering\n  * If the matrix is not structurally symmetric, an ordering of A^T+A is computed\n  * \\tparam  StorageIndex The type of indices of the matrix \n  * \\sa COLAMDOrdering\n  */\ntemplate <typename StorageIndex>\nclass AMDOrdering\n{\n  public:\n    typedef PermutationMatrix<Dynamic, Dynamic, StorageIndex> PermutationType;\n    \n    /** Compute the permutation vector from a sparse matrix\n     * This routine is much faster if the input matrix is column-major     \n     */\n    template <typename MatrixType>\n    void operator()(const MatrixType& mat, PermutationType& perm)\n    {\n      // Compute the symmetric pattern\n      SparseMatrix<typename MatrixType::Scalar, ColMajor, StorageIndex> symm;\n      internal::ordering_helper_at_plus_a(mat,symm); \n    \n      // Call the AMD routine \n      //m_mat.prune(keep_diag());\n      internal::minimum_degree_ordering(symm, perm);\n    }\n    \n    /** Compute the permutation with a selfadjoint matrix */\n    template <typename SrcType, unsigned int SrcUpLo> \n    void operator()(const SparseSelfAdjointView<SrcType, SrcUpLo>& mat, PermutationType& perm)\n    { \n      SparseMatrix<typename SrcType::Scalar, ColMajor, StorageIndex> C; C = mat;\n      \n      // Call the AMD routine \n      // m_mat.prune(keep_diag()); //Remove the diagonal elements \n      internal::minimum_degree_ordering(C, perm);\n    }\n};\n\n/** \\ingroup OrderingMethods_Module\n  * \\class NaturalOrdering\n  *\n  * Functor computing the natural ordering (identity)\n  * \n  * \\note Returns an empty permutation matrix\n  * \\tparam  StorageIndex The type of indices of the matrix \n  */\ntemplate <typename StorageIndex>\nclass NaturalOrdering\n{\n  public:\n    typedef PermutationMatrix<Dynamic, Dynamic, StorageIndex> PermutationType;\n    \n    /** Compute the permutation vector from a column-major sparse matrix */\n    template <typename MatrixType>\n    void operator()(const MatrixType& /*mat*/, PermutationType& perm)\n    {\n      perm.resize(0); \n    }\n    \n};\n\n/** \\ingroup OrderingMethods_Module\n  * \\class COLAMDOrdering\n  *\n  * \\tparam  StorageIndex The type of indices of the matrix \n  * \n  * Functor computing the \\em column \\em approximate \\em minimum \\em degree ordering \n  * The matrix should be in column-major and \\b compressed format (see SparseMatrix::makeCompressed()).\n  */\ntemplate<typename StorageIndex>\nclass COLAMDOrdering\n{\n  public:\n    typedef PermutationMatrix<Dynamic, Dynamic, StorageIndex> PermutationType; \n    typedef Matrix<StorageIndex, Dynamic, 1> IndexVector;\n    \n    /** Compute the permutation vector \\a perm form the sparse matrix \\a mat\n      * \\warning The input sparse matrix \\a mat must be in compressed mode (see SparseMatrix::makeCompressed()).\n      */\n    template <typename MatrixType>\n    void operator() (const MatrixType& mat, PermutationType& perm)\n    {\n      eigen_assert(mat.isCompressed() && \"COLAMDOrdering requires a sparse matrix in compressed mode. Call .makeCompressed() before passing it to COLAMDOrdering\");\n      \n      StorageIndex m = StorageIndex(mat.rows());\n      StorageIndex n = StorageIndex(mat.cols());\n      StorageIndex nnz = StorageIndex(mat.nonZeros());\n      // Get the recommended value of Alen to be used by colamd\n      StorageIndex Alen = internal::Colamd::recommended(nnz, m, n); \n      // Set the default parameters\n      double knobs [internal::Colamd::NKnobs]; \n      StorageIndex stats [internal::Colamd::NStats];\n      internal::Colamd::set_defaults(knobs);\n      \n      IndexVector p(n+1), A(Alen); \n      for(StorageIndex i=0; i <= n; i++)   p(i) = mat.outerIndexPtr()[i];\n      for(StorageIndex i=0; i < nnz; i++)  A(i) = mat.innerIndexPtr()[i];\n      // Call Colamd routine to compute the ordering \n      StorageIndex info = internal::Colamd::compute_ordering(m, n, Alen, A.data(), p.data(), knobs, stats); \n      EIGEN_UNUSED_VARIABLE(info);\n      eigen_assert( info && \"COLAMD failed \" );\n      \n      perm.resize(n);\n      for (StorageIndex i = 0; i < n; i++) perm.indices()(p(i)) = i;\n    }\n};\n\n} // end namespace Eigen\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/PaStiXSupport/PaStiXSupport.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_PASTIXSUPPORT_H\n#define EIGEN_PASTIXSUPPORT_H\n\nnamespace Eigen { \n\n#if defined(DCOMPLEX)\n  #define PASTIX_COMPLEX  COMPLEX\n  #define PASTIX_DCOMPLEX DCOMPLEX\n#else\n  #define PASTIX_COMPLEX  std::complex<float>\n  #define PASTIX_DCOMPLEX std::complex<double>\n#endif\n\n/** \\ingroup PaStiXSupport_Module\n  * \\brief Interface to the PaStix solver\n  * \n  * This class is used to solve the linear systems A.X = B via the PaStix library. \n  * The matrix can be either real or complex, symmetric or not.\n  *\n  * \\sa TutorialSparseDirectSolvers\n  */\ntemplate<typename _MatrixType, bool IsStrSym = false> class PastixLU;\ntemplate<typename _MatrixType, int Options> class PastixLLT;\ntemplate<typename _MatrixType, int Options> class PastixLDLT;\n\nnamespace internal\n{\n    \n  template<class Pastix> struct pastix_traits;\n\n  template<typename _MatrixType>\n  struct pastix_traits< PastixLU<_MatrixType> >\n  {\n    typedef _MatrixType MatrixType;\n    typedef typename _MatrixType::Scalar Scalar;\n    typedef typename _MatrixType::RealScalar RealScalar;\n    typedef typename _MatrixType::StorageIndex StorageIndex;\n  };\n\n  template<typename _MatrixType, int Options>\n  struct pastix_traits< PastixLLT<_MatrixType,Options> >\n  {\n    typedef _MatrixType MatrixType;\n    typedef typename _MatrixType::Scalar Scalar;\n    typedef typename _MatrixType::RealScalar RealScalar;\n    typedef typename _MatrixType::StorageIndex StorageIndex;\n  };\n\n  template<typename _MatrixType, int Options>\n  struct pastix_traits< PastixLDLT<_MatrixType,Options> >\n  {\n    typedef _MatrixType MatrixType;\n    typedef typename _MatrixType::Scalar Scalar;\n    typedef typename _MatrixType::RealScalar RealScalar;\n    typedef typename _MatrixType::StorageIndex StorageIndex;\n  };\n  \n  inline void eigen_pastix(pastix_data_t **pastix_data, int pastix_comm, int n, int *ptr, int *idx, float *vals, int *perm, int * invp, float *x, int nbrhs, int *iparm, double *dparm)\n  {\n    if (n == 0) { ptr = NULL; idx = NULL; vals = NULL; }\n    if (nbrhs == 0) {x = NULL; nbrhs=1;}\n    s_pastix(pastix_data, pastix_comm, n, ptr, idx, vals, perm, invp, x, nbrhs, iparm, dparm); \n  }\n  \n  inline void eigen_pastix(pastix_data_t **pastix_data, int pastix_comm, int n, int *ptr, int *idx, double *vals, int *perm, int * invp, double *x, int nbrhs, int *iparm, double *dparm)\n  {\n    if (n == 0) { ptr = NULL; idx = NULL; vals = NULL; }\n    if (nbrhs == 0) {x = NULL; nbrhs=1;}\n    d_pastix(pastix_data, pastix_comm, n, ptr, idx, vals, perm, invp, x, nbrhs, iparm, dparm); \n  }\n  \n  inline void eigen_pastix(pastix_data_t **pastix_data, int pastix_comm, int n, int *ptr, int *idx, std::complex<float> *vals, int *perm, int * invp, std::complex<float> *x, int nbrhs, int *iparm, double *dparm)\n  {\n    if (n == 0) { ptr = NULL; idx = NULL; vals = NULL; }\n    if (nbrhs == 0) {x = NULL; nbrhs=1;}\n    c_pastix(pastix_data, pastix_comm, n, ptr, idx, reinterpret_cast<PASTIX_COMPLEX*>(vals), perm, invp, reinterpret_cast<PASTIX_COMPLEX*>(x), nbrhs, iparm, dparm); \n  }\n  \n  inline void eigen_pastix(pastix_data_t **pastix_data, int pastix_comm, int n, int *ptr, int *idx, std::complex<double> *vals, int *perm, int * invp, std::complex<double> *x, int nbrhs, int *iparm, double *dparm)\n  {\n    if (n == 0) { ptr = NULL; idx = NULL; vals = NULL; }\n    if (nbrhs == 0) {x = NULL; nbrhs=1;}\n    z_pastix(pastix_data, pastix_comm, n, ptr, idx, reinterpret_cast<PASTIX_DCOMPLEX*>(vals), perm, invp, reinterpret_cast<PASTIX_DCOMPLEX*>(x), nbrhs, iparm, dparm); \n  }\n\n  // Convert the matrix  to Fortran-style Numbering\n  template <typename MatrixType>\n  void c_to_fortran_numbering (MatrixType& mat)\n  {\n    if ( !(mat.outerIndexPtr()[0]) ) \n    { \n      int i;\n      for(i = 0; i <= mat.rows(); ++i)\n        ++mat.outerIndexPtr()[i];\n      for(i = 0; i < mat.nonZeros(); ++i)\n        ++mat.innerIndexPtr()[i];\n    }\n  }\n  \n  // Convert to C-style Numbering\n  template <typename MatrixType>\n  void fortran_to_c_numbering (MatrixType& mat)\n  {\n    // Check the Numbering\n    if ( mat.outerIndexPtr()[0] == 1 ) \n    { // Convert to C-style numbering\n      int i;\n      for(i = 0; i <= mat.rows(); ++i)\n        --mat.outerIndexPtr()[i];\n      for(i = 0; i < mat.nonZeros(); ++i)\n        --mat.innerIndexPtr()[i];\n    }\n  }\n}\n\n// This is the base class to interface with PaStiX functions. \n// Users should not used this class directly. \ntemplate <class Derived>\nclass PastixBase : public SparseSolverBase<Derived>\n{\n  protected:\n    typedef SparseSolverBase<Derived> Base;\n    using Base::derived;\n    using Base::m_isInitialized;\n  public:\n    using Base::_solve_impl;\n    \n    typedef typename internal::pastix_traits<Derived>::MatrixType _MatrixType;\n    typedef _MatrixType MatrixType;\n    typedef typename MatrixType::Scalar Scalar;\n    typedef typename MatrixType::RealScalar RealScalar;\n    typedef typename MatrixType::StorageIndex StorageIndex;\n    typedef Matrix<Scalar,Dynamic,1> Vector;\n    typedef SparseMatrix<Scalar, ColMajor> ColSpMatrix;\n    enum {\n      ColsAtCompileTime = MatrixType::ColsAtCompileTime,\n      MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime\n    };\n    \n  public:\n    \n    PastixBase() : m_initisOk(false), m_analysisIsOk(false), m_factorizationIsOk(false), m_pastixdata(0), m_size(0)\n    {\n      init();\n    }\n    \n    ~PastixBase() \n    {\n      clean();\n    }\n    \n    template<typename Rhs,typename Dest>\n    bool _solve_impl(const MatrixBase<Rhs> &b, MatrixBase<Dest> &x) const;\n    \n    /** Returns a reference to the integer vector IPARM of PaStiX parameters\n      * to modify the default parameters. \n      * The statistics related to the different phases of factorization and solve are saved here as well\n      * \\sa analyzePattern() factorize()\n      */\n    Array<StorageIndex,IPARM_SIZE,1>& iparm()\n    {\n      return m_iparm; \n    }\n    \n    /** Return a reference to a particular index parameter of the IPARM vector \n     * \\sa iparm()\n     */\n    \n    int& iparm(int idxparam)\n    {\n      return m_iparm(idxparam);\n    }\n    \n     /** Returns a reference to the double vector DPARM of PaStiX parameters \n      * The statistics related to the different phases of factorization and solve are saved here as well\n      * \\sa analyzePattern() factorize()\n      */\n    Array<double,DPARM_SIZE,1>& dparm()\n    {\n      return m_dparm; \n    }\n    \n    \n    /** Return a reference to a particular index parameter of the DPARM vector \n     * \\sa dparm()\n     */\n    double& dparm(int idxparam)\n    {\n      return m_dparm(idxparam);\n    }\n    \n    inline Index cols() const { return m_size; }\n    inline Index rows() const { return m_size; }\n    \n     /** \\brief Reports whether previous computation was successful.\n      *\n      * \\returns \\c Success if computation was successful,\n      *          \\c NumericalIssue if the PaStiX reports a problem\n      *          \\c InvalidInput if the input matrix is invalid\n      *\n      * \\sa iparm()          \n      */\n    ComputationInfo info() const\n    {\n      eigen_assert(m_isInitialized && \"Decomposition is not initialized.\");\n      return m_info;\n    }\n    \n  protected:\n\n    // Initialize the Pastix data structure, check the matrix\n    void init(); \n    \n    // Compute the ordering and the symbolic factorization\n    void analyzePattern(ColSpMatrix& mat);\n    \n    // Compute the numerical factorization\n    void factorize(ColSpMatrix& mat);\n    \n    // Free all the data allocated by Pastix\n    void clean()\n    {\n      eigen_assert(m_initisOk && \"The Pastix structure should be allocated first\"); \n      m_iparm(IPARM_START_TASK) = API_TASK_CLEAN;\n      m_iparm(IPARM_END_TASK) = API_TASK_CLEAN;\n      internal::eigen_pastix(&m_pastixdata, MPI_COMM_WORLD, 0, 0, 0, (Scalar*)0,\n                             m_perm.data(), m_invp.data(), 0, 0, m_iparm.data(), m_dparm.data());\n    }\n    \n    void compute(ColSpMatrix& mat);\n    \n    int m_initisOk; \n    int m_analysisIsOk;\n    int m_factorizationIsOk;\n    mutable ComputationInfo m_info; \n    mutable pastix_data_t *m_pastixdata; // Data structure for pastix\n    mutable int m_comm; // The MPI communicator identifier\n    mutable Array<int,IPARM_SIZE,1> m_iparm; // integer vector for the input parameters\n    mutable Array<double,DPARM_SIZE,1> m_dparm; // Scalar vector for the input parameters\n    mutable Matrix<StorageIndex,Dynamic,1> m_perm;  // Permutation vector\n    mutable Matrix<StorageIndex,Dynamic,1> m_invp;  // Inverse permutation vector\n    mutable int m_size; // Size of the matrix \n}; \n\n /** Initialize the PaStiX data structure. \n   *A first call to this function fills iparm and dparm with the default PaStiX parameters\n   * \\sa iparm() dparm()\n   */\ntemplate <class Derived>\nvoid PastixBase<Derived>::init()\n{\n  m_size = 0; \n  m_iparm.setZero(IPARM_SIZE);\n  m_dparm.setZero(DPARM_SIZE);\n  \n  m_iparm(IPARM_MODIFY_PARAMETER) = API_NO;\n  pastix(&m_pastixdata, MPI_COMM_WORLD,\n         0, 0, 0, 0,\n         0, 0, 0, 1, m_iparm.data(), m_dparm.data());\n  \n  m_iparm[IPARM_MATRIX_VERIFICATION] = API_NO;\n  m_iparm[IPARM_VERBOSE]             = API_VERBOSE_NOT;\n  m_iparm[IPARM_ORDERING]            = API_ORDER_SCOTCH;\n  m_iparm[IPARM_INCOMPLETE]          = API_NO;\n  m_iparm[IPARM_OOC_LIMIT]           = 2000;\n  m_iparm[IPARM_RHS_MAKING]          = API_RHS_B;\n  m_iparm(IPARM_MATRIX_VERIFICATION) = API_NO;\n  \n  m_iparm(IPARM_START_TASK) = API_TASK_INIT;\n  m_iparm(IPARM_END_TASK) = API_TASK_INIT;\n  internal::eigen_pastix(&m_pastixdata, MPI_COMM_WORLD, 0, 0, 0, (Scalar*)0,\n                         0, 0, 0, 0, m_iparm.data(), m_dparm.data());\n  \n  // Check the returned error\n  if(m_iparm(IPARM_ERROR_NUMBER)) {\n    m_info = InvalidInput;\n    m_initisOk = false;\n  }\n  else { \n    m_info = Success;\n    m_initisOk = true;\n  }\n}\n\ntemplate <class Derived>\nvoid PastixBase<Derived>::compute(ColSpMatrix& mat)\n{\n  eigen_assert(mat.rows() == mat.cols() && \"The input matrix should be squared\");\n  \n  analyzePattern(mat);  \n  factorize(mat);\n  \n  m_iparm(IPARM_MATRIX_VERIFICATION) = API_NO;\n}\n\n\ntemplate <class Derived>\nvoid PastixBase<Derived>::analyzePattern(ColSpMatrix& mat)\n{                         \n  eigen_assert(m_initisOk && \"The initialization of PaSTiX failed\");\n  \n  // clean previous calls\n  if(m_size>0)\n    clean();\n  \n  m_size = internal::convert_index<int>(mat.rows());\n  m_perm.resize(m_size);\n  m_invp.resize(m_size);\n  \n  m_iparm(IPARM_START_TASK) = API_TASK_ORDERING;\n  m_iparm(IPARM_END_TASK) = API_TASK_ANALYSE;\n  internal::eigen_pastix(&m_pastixdata, MPI_COMM_WORLD, m_size, mat.outerIndexPtr(), mat.innerIndexPtr(),\n               mat.valuePtr(), m_perm.data(), m_invp.data(), 0, 0, m_iparm.data(), m_dparm.data());\n  \n  // Check the returned error\n  if(m_iparm(IPARM_ERROR_NUMBER))\n  {\n    m_info = NumericalIssue;\n    m_analysisIsOk = false;\n  }\n  else\n  { \n    m_info = Success;\n    m_analysisIsOk = true;\n  }\n}\n\ntemplate <class Derived>\nvoid PastixBase<Derived>::factorize(ColSpMatrix& mat)\n{\n//   if(&m_cpyMat != &mat) m_cpyMat = mat;\n  eigen_assert(m_analysisIsOk && \"The analysis phase should be called before the factorization phase\");\n  m_iparm(IPARM_START_TASK) = API_TASK_NUMFACT;\n  m_iparm(IPARM_END_TASK) = API_TASK_NUMFACT;\n  m_size = internal::convert_index<int>(mat.rows());\n  \n  internal::eigen_pastix(&m_pastixdata, MPI_COMM_WORLD, m_size, mat.outerIndexPtr(), mat.innerIndexPtr(),\n               mat.valuePtr(), m_perm.data(), m_invp.data(), 0, 0, m_iparm.data(), m_dparm.data());\n  \n  // Check the returned error\n  if(m_iparm(IPARM_ERROR_NUMBER))\n  {\n    m_info = NumericalIssue;\n    m_factorizationIsOk = false;\n    m_isInitialized = false;\n  }\n  else\n  {\n    m_info = Success;\n    m_factorizationIsOk = true;\n    m_isInitialized = true;\n  }\n}\n\n/* Solve the system */\ntemplate<typename Base>\ntemplate<typename Rhs,typename Dest>\nbool PastixBase<Base>::_solve_impl(const MatrixBase<Rhs> &b, MatrixBase<Dest> &x) const\n{\n  eigen_assert(m_isInitialized && \"The matrix should be factorized first\");\n  EIGEN_STATIC_ASSERT((Dest::Flags&RowMajorBit)==0,\n                     THIS_METHOD_IS_ONLY_FOR_COLUMN_MAJOR_MATRICES);\n  int rhs = 1;\n  \n  x = b; /* on return, x is overwritten by the computed solution */\n  \n  for (int i = 0; i < b.cols(); i++){\n    m_iparm[IPARM_START_TASK]          = API_TASK_SOLVE;\n    m_iparm[IPARM_END_TASK]            = API_TASK_REFINE;\n  \n    internal::eigen_pastix(&m_pastixdata, MPI_COMM_WORLD, internal::convert_index<int>(x.rows()), 0, 0, 0,\n                           m_perm.data(), m_invp.data(), &x(0, i), rhs, m_iparm.data(), m_dparm.data());\n  }\n  \n  // Check the returned error\n  m_info = m_iparm(IPARM_ERROR_NUMBER)==0 ? Success : NumericalIssue;\n  \n  return m_iparm(IPARM_ERROR_NUMBER)==0;\n}\n\n/** \\ingroup PaStiXSupport_Module\n  * \\class PastixLU\n  * \\brief Sparse direct LU solver based on PaStiX library\n  * \n  * This class is used to solve the linear systems A.X = B with a supernodal LU \n  * factorization in the PaStiX library. The matrix A should be squared and nonsingular\n  * PaStiX requires that the matrix A has a symmetric structural pattern. \n  * This interface can symmetrize the input matrix otherwise. \n  * The vectors or matrices X and B can be either dense or sparse.\n  * \n  * \\tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<>\n  * \\tparam IsStrSym Indicates if the input matrix has a symmetric pattern, default is false\n  * NOTE : Note that if the analysis and factorization phase are called separately, \n  * the input matrix will be symmetrized at each call, hence it is advised to \n  * symmetrize the matrix in a end-user program and set \\p IsStrSym to true\n  *\n  * \\implsparsesolverconcept\n  *\n  * \\sa \\ref TutorialSparseSolverConcept, class SparseLU\n  * \n  */\ntemplate<typename _MatrixType, bool IsStrSym>\nclass PastixLU : public PastixBase< PastixLU<_MatrixType> >\n{\n  public:\n    typedef _MatrixType MatrixType;\n    typedef PastixBase<PastixLU<MatrixType> > Base;\n    typedef typename Base::ColSpMatrix ColSpMatrix;\n    typedef typename MatrixType::StorageIndex StorageIndex;\n    \n  public:\n    PastixLU() : Base()\n    {\n      init();\n    }\n    \n    explicit PastixLU(const MatrixType& matrix):Base()\n    {\n      init();\n      compute(matrix);\n    }\n    /** Compute the LU supernodal factorization of \\p matrix. \n      * iparm and dparm can be used to tune the PaStiX parameters. \n      * see the PaStiX user's manual\n      * \\sa analyzePattern() factorize()\n      */\n    void compute (const MatrixType& matrix)\n    {\n      m_structureIsUptodate = false;\n      ColSpMatrix temp;\n      grabMatrix(matrix, temp);\n      Base::compute(temp);\n    }\n    /** Compute the LU symbolic factorization of \\p matrix using its sparsity pattern. \n      * Several ordering methods can be used at this step. See the PaStiX user's manual. \n      * The result of this operation can be used with successive matrices having the same pattern as \\p matrix\n      * \\sa factorize()\n      */\n    void analyzePattern(const MatrixType& matrix)\n    {\n      m_structureIsUptodate = false;\n      ColSpMatrix temp;\n      grabMatrix(matrix, temp);\n      Base::analyzePattern(temp);\n    }\n\n    /** Compute the LU supernodal factorization of \\p matrix\n      * WARNING The matrix \\p matrix should have the same structural pattern \n      * as the same used in the analysis phase.\n      * \\sa analyzePattern()\n      */ \n    void factorize(const MatrixType& matrix)\n    {\n      ColSpMatrix temp;\n      grabMatrix(matrix, temp);\n      Base::factorize(temp);\n    }\n  protected:\n    \n    void init()\n    {\n      m_structureIsUptodate = false;\n      m_iparm(IPARM_SYM) = API_SYM_NO;\n      m_iparm(IPARM_FACTORIZATION) = API_FACT_LU;\n    }\n    \n    void grabMatrix(const MatrixType& matrix, ColSpMatrix& out)\n    {\n      if(IsStrSym)\n        out = matrix;\n      else\n      {\n        if(!m_structureIsUptodate)\n        {\n          // update the transposed structure\n          m_transposedStructure = matrix.transpose();\n          \n          // Set the elements of the matrix to zero \n          for (Index j=0; j<m_transposedStructure.outerSize(); ++j) \n            for(typename ColSpMatrix::InnerIterator it(m_transposedStructure, j); it; ++it)\n              it.valueRef() = 0.0;\n\n          m_structureIsUptodate = true;\n        }\n        \n        out = m_transposedStructure + matrix;\n      }\n      internal::c_to_fortran_numbering(out);\n    }\n    \n    using Base::m_iparm;\n    using Base::m_dparm;\n    \n    ColSpMatrix m_transposedStructure;\n    bool m_structureIsUptodate;\n};\n\n/** \\ingroup PaStiXSupport_Module\n  * \\class PastixLLT\n  * \\brief A sparse direct supernodal Cholesky (LLT) factorization and solver based on the PaStiX library\n  * \n  * This class is used to solve the linear systems A.X = B via a LL^T supernodal Cholesky factorization\n  * available in the PaStiX library. The matrix A should be symmetric and positive definite\n  * WARNING Selfadjoint complex matrices are not supported in the current version of PaStiX\n  * The vectors or matrices X and B can be either dense or sparse\n  * \n  * \\tparam MatrixType the type of the sparse matrix A, it must be a SparseMatrix<>\n  * \\tparam UpLo The part of the matrix to use : Lower or Upper. The default is Lower as required by PaStiX\n  *\n  * \\implsparsesolverconcept\n  *\n  * \\sa \\ref TutorialSparseSolverConcept, class SimplicialLLT\n  */\ntemplate<typename _MatrixType, int _UpLo>\nclass PastixLLT : public PastixBase< PastixLLT<_MatrixType, _UpLo> >\n{\n  public:\n    typedef _MatrixType MatrixType;\n    typedef PastixBase<PastixLLT<MatrixType, _UpLo> > Base;\n    typedef typename Base::ColSpMatrix ColSpMatrix;\n    \n  public:\n    enum { UpLo = _UpLo };\n    PastixLLT() : Base()\n    {\n      init();\n    }\n    \n    explicit PastixLLT(const MatrixType& matrix):Base()\n    {\n      init();\n      compute(matrix);\n    }\n\n    /** Compute the L factor of the LL^T supernodal factorization of \\p matrix \n      * \\sa analyzePattern() factorize()\n      */\n    void compute (const MatrixType& matrix)\n    {\n      ColSpMatrix temp;\n      grabMatrix(matrix, temp);\n      Base::compute(temp);\n    }\n\n     /** Compute the LL^T symbolic factorization of \\p matrix using its sparsity pattern\n      * The result of this operation can be used with successive matrices having the same pattern as \\p matrix\n      * \\sa factorize()\n      */\n    void analyzePattern(const MatrixType& matrix)\n    {\n      ColSpMatrix temp;\n      grabMatrix(matrix, temp);\n      Base::analyzePattern(temp);\n    }\n      /** Compute the LL^T supernodal numerical factorization of \\p matrix \n        * \\sa analyzePattern()\n        */\n    void factorize(const MatrixType& matrix)\n    {\n      ColSpMatrix temp;\n      grabMatrix(matrix, temp);\n      Base::factorize(temp);\n    }\n  protected:\n    using Base::m_iparm;\n    \n    void init()\n    {\n      m_iparm(IPARM_SYM) = API_SYM_YES;\n      m_iparm(IPARM_FACTORIZATION) = API_FACT_LLT;\n    }\n    \n    void grabMatrix(const MatrixType& matrix, ColSpMatrix& out)\n    {\n      out.resize(matrix.rows(), matrix.cols());\n      // Pastix supports only lower, column-major matrices \n      out.template selfadjointView<Lower>() = matrix.template selfadjointView<UpLo>();\n      internal::c_to_fortran_numbering(out);\n    }\n};\n\n/** \\ingroup PaStiXSupport_Module\n  * \\class PastixLDLT\n  * \\brief A sparse direct supernodal Cholesky (LLT) factorization and solver based on the PaStiX library\n  * \n  * This class is used to solve the linear systems A.X = B via a LDL^T supernodal Cholesky factorization\n  * available in the PaStiX library. The matrix A should be symmetric and positive definite\n  * WARNING Selfadjoint complex matrices are not supported in the current version of PaStiX\n  * The vectors or matrices X and B can be either dense or sparse\n  * \n  * \\tparam MatrixType the type of the sparse matrix A, it must be a SparseMatrix<>\n  * \\tparam UpLo The part of the matrix to use : Lower or Upper. The default is Lower as required by PaStiX\n  *\n  * \\implsparsesolverconcept\n  *\n  * \\sa \\ref TutorialSparseSolverConcept, class SimplicialLDLT\n  */\ntemplate<typename _MatrixType, int _UpLo>\nclass PastixLDLT : public PastixBase< PastixLDLT<_MatrixType, _UpLo> >\n{\n  public:\n    typedef _MatrixType MatrixType;\n    typedef PastixBase<PastixLDLT<MatrixType, _UpLo> > Base; \n    typedef typename Base::ColSpMatrix ColSpMatrix;\n    \n  public:\n    enum { UpLo = _UpLo };\n    PastixLDLT():Base()\n    {\n      init();\n    }\n    \n    explicit PastixLDLT(const MatrixType& matrix):Base()\n    {\n      init();\n      compute(matrix);\n    }\n\n    /** Compute the L and D factors of the LDL^T factorization of \\p matrix \n      * \\sa analyzePattern() factorize()\n      */\n    void compute (const MatrixType& matrix)\n    {\n      ColSpMatrix temp;\n      grabMatrix(matrix, temp);\n      Base::compute(temp);\n    }\n\n    /** Compute the LDL^T symbolic factorization of \\p matrix using its sparsity pattern\n      * The result of this operation can be used with successive matrices having the same pattern as \\p matrix\n      * \\sa factorize()\n      */\n    void analyzePattern(const MatrixType& matrix)\n    { \n      ColSpMatrix temp;\n      grabMatrix(matrix, temp);\n      Base::analyzePattern(temp);\n    }\n    /** Compute the LDL^T supernodal numerical factorization of \\p matrix \n      * \n      */\n    void factorize(const MatrixType& matrix)\n    {\n      ColSpMatrix temp;\n      grabMatrix(matrix, temp);\n      Base::factorize(temp);\n    }\n\n  protected:\n    using Base::m_iparm;\n    \n    void init()\n    {\n      m_iparm(IPARM_SYM) = API_SYM_YES;\n      m_iparm(IPARM_FACTORIZATION) = API_FACT_LDLT;\n    }\n    \n    void grabMatrix(const MatrixType& matrix, ColSpMatrix& out)\n    {\n      // Pastix supports only lower, column-major matrices \n      out.resize(matrix.rows(), matrix.cols());\n      out.template selfadjointView<Lower>() = matrix.template selfadjointView<UpLo>();\n      internal::c_to_fortran_numbering(out);\n    }\n};\n\n} // end namespace Eigen\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/PardisoSupport/PardisoSupport.h",
    "content": "/*\n Copyright (c) 2011, Intel Corporation. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without modification,\n are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n   list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n * Neither the name of Intel Corporation nor the names of its contributors may\n   be used to endorse or promote products derived from this software without\n   specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\n ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n ********************************************************************************\n *   Content : Eigen bindings to Intel(R) MKL PARDISO\n ********************************************************************************\n*/\n\n#ifndef EIGEN_PARDISOSUPPORT_H\n#define EIGEN_PARDISOSUPPORT_H\n\nnamespace Eigen { \n\ntemplate<typename _MatrixType> class PardisoLU;\ntemplate<typename _MatrixType, int Options=Upper> class PardisoLLT;\ntemplate<typename _MatrixType, int Options=Upper> class PardisoLDLT;\n\nnamespace internal\n{\n  template<typename IndexType>\n  struct pardiso_run_selector\n  {\n    static IndexType run( _MKL_DSS_HANDLE_t pt, IndexType maxfct, IndexType mnum, IndexType type, IndexType phase, IndexType n, void *a,\n                      IndexType *ia, IndexType *ja, IndexType *perm, IndexType nrhs, IndexType *iparm, IndexType msglvl, void *b, void *x)\n    {\n      IndexType error = 0;\n      ::pardiso(pt, &maxfct, &mnum, &type, &phase, &n, a, ia, ja, perm, &nrhs, iparm, &msglvl, b, x, &error);\n      return error;\n    }\n  };\n  template<>\n  struct pardiso_run_selector<long long int>\n  {\n    typedef long long int IndexType;\n    static IndexType run( _MKL_DSS_HANDLE_t pt, IndexType maxfct, IndexType mnum, IndexType type, IndexType phase, IndexType n, void *a,\n                      IndexType *ia, IndexType *ja, IndexType *perm, IndexType nrhs, IndexType *iparm, IndexType msglvl, void *b, void *x)\n    {\n      IndexType error = 0;\n      ::pardiso_64(pt, &maxfct, &mnum, &type, &phase, &n, a, ia, ja, perm, &nrhs, iparm, &msglvl, b, x, &error);\n      return error;\n    }\n  };\n\n  template<class Pardiso> struct pardiso_traits;\n\n  template<typename _MatrixType>\n  struct pardiso_traits< PardisoLU<_MatrixType> >\n  {\n    typedef _MatrixType MatrixType;\n    typedef typename _MatrixType::Scalar Scalar;\n    typedef typename _MatrixType::RealScalar RealScalar;\n    typedef typename _MatrixType::StorageIndex StorageIndex;\n  };\n\n  template<typename _MatrixType, int Options>\n  struct pardiso_traits< PardisoLLT<_MatrixType, Options> >\n  {\n    typedef _MatrixType MatrixType;\n    typedef typename _MatrixType::Scalar Scalar;\n    typedef typename _MatrixType::RealScalar RealScalar;\n    typedef typename _MatrixType::StorageIndex StorageIndex;\n  };\n\n  template<typename _MatrixType, int Options>\n  struct pardiso_traits< PardisoLDLT<_MatrixType, Options> >\n  {\n    typedef _MatrixType MatrixType;\n    typedef typename _MatrixType::Scalar Scalar;\n    typedef typename _MatrixType::RealScalar RealScalar;\n    typedef typename _MatrixType::StorageIndex StorageIndex;    \n  };\n\n} // end namespace internal\n\ntemplate<class Derived>\nclass PardisoImpl : public SparseSolverBase<Derived>\n{\n  protected:\n    typedef SparseSolverBase<Derived> Base;\n    using Base::derived;\n    using Base::m_isInitialized;\n    \n    typedef internal::pardiso_traits<Derived> Traits;\n  public:\n    using Base::_solve_impl;\n    \n    typedef typename Traits::MatrixType MatrixType;\n    typedef typename Traits::Scalar Scalar;\n    typedef typename Traits::RealScalar RealScalar;\n    typedef typename Traits::StorageIndex StorageIndex;\n    typedef SparseMatrix<Scalar,RowMajor,StorageIndex> SparseMatrixType;\n    typedef Matrix<Scalar,Dynamic,1> VectorType;\n    typedef Matrix<StorageIndex, 1, MatrixType::ColsAtCompileTime> IntRowVectorType;\n    typedef Matrix<StorageIndex, MatrixType::RowsAtCompileTime, 1> IntColVectorType;\n    typedef Array<StorageIndex,64,1,DontAlign> ParameterType;\n    enum {\n      ScalarIsComplex = NumTraits<Scalar>::IsComplex,\n      ColsAtCompileTime = Dynamic,\n      MaxColsAtCompileTime = Dynamic\n    };\n\n    PardisoImpl()\n      : m_analysisIsOk(false), m_factorizationIsOk(false)\n    {\n      eigen_assert((sizeof(StorageIndex) >= sizeof(_INTEGER_t) && sizeof(StorageIndex) <= 8) && \"Non-supported index type\");\n      m_iparm.setZero();\n      m_msglvl = 0; // No output\n      m_isInitialized = false;\n    }\n\n    ~PardisoImpl()\n    {\n      pardisoRelease();\n    }\n\n    inline Index cols() const { return m_size; }\n    inline Index rows() const { return m_size; }\n  \n    /** \\brief Reports whether previous computation was successful.\n      *\n      * \\returns \\c Success if computation was successful,\n      *          \\c NumericalIssue if the matrix appears to be negative.\n      */\n    ComputationInfo info() const\n    {\n      eigen_assert(m_isInitialized && \"Decomposition is not initialized.\");\n      return m_info;\n    }\n\n    /** \\warning for advanced usage only.\n      * \\returns a reference to the parameter array controlling PARDISO.\n      * See the PARDISO manual to know how to use it. */\n    ParameterType& pardisoParameterArray()\n    {\n      return m_iparm;\n    }\n    \n    /** Performs a symbolic decomposition on the sparcity of \\a matrix.\n      *\n      * This function is particularly useful when solving for several problems having the same structure.\n      * \n      * \\sa factorize()\n      */\n    Derived& analyzePattern(const MatrixType& matrix);\n    \n    /** Performs a numeric decomposition of \\a matrix\n      *\n      * The given matrix must has the same sparcity than the matrix on which the symbolic decomposition has been performed.\n      *\n      * \\sa analyzePattern()\n      */\n    Derived& factorize(const MatrixType& matrix);\n\n    Derived& compute(const MatrixType& matrix);\n\n    template<typename Rhs,typename Dest>\n    void _solve_impl(const MatrixBase<Rhs> &b, MatrixBase<Dest> &dest) const;\n\n  protected:\n    void pardisoRelease()\n    {\n      if(m_isInitialized) // Factorization ran at least once\n      {\n        internal::pardiso_run_selector<StorageIndex>::run(m_pt, 1, 1, m_type, -1, internal::convert_index<StorageIndex>(m_size),0, 0, 0, m_perm.data(), 0,\n                                                          m_iparm.data(), m_msglvl, NULL, NULL);\n        m_isInitialized = false;\n      }\n    }\n\n    void pardisoInit(int type)\n    {\n      m_type = type;\n      bool symmetric = std::abs(m_type) < 10;\n      m_iparm[0] = 1;   // No solver default\n      m_iparm[1] = 2;   // use Metis for the ordering\n      m_iparm[2] = 0;   // Reserved. Set to zero. (??Numbers of processors, value of OMP_NUM_THREADS??)\n      m_iparm[3] = 0;   // No iterative-direct algorithm\n      m_iparm[4] = 0;   // No user fill-in reducing permutation\n      m_iparm[5] = 0;   // Write solution into x, b is left unchanged\n      m_iparm[6] = 0;   // Not in use\n      m_iparm[7] = 2;   // Max numbers of iterative refinement steps\n      m_iparm[8] = 0;   // Not in use\n      m_iparm[9] = 13;  // Perturb the pivot elements with 1E-13\n      m_iparm[10] = symmetric ? 0 : 1; // Use nonsymmetric permutation and scaling MPS\n      m_iparm[11] = 0;  // Not in use\n      m_iparm[12] = symmetric ? 0 : 1;  // Maximum weighted matching algorithm is switched-off (default for symmetric).\n                                        // Try m_iparm[12] = 1 in case of inappropriate accuracy\n      m_iparm[13] = 0;  // Output: Number of perturbed pivots\n      m_iparm[14] = 0;  // Not in use\n      m_iparm[15] = 0;  // Not in use\n      m_iparm[16] = 0;  // Not in use\n      m_iparm[17] = -1; // Output: Number of nonzeros in the factor LU\n      m_iparm[18] = -1; // Output: Mflops for LU factorization\n      m_iparm[19] = 0;  // Output: Numbers of CG Iterations\n      \n      m_iparm[20] = 0;  // 1x1 pivoting\n      m_iparm[26] = 0;  // No matrix checker\n      m_iparm[27] = (sizeof(RealScalar) == 4) ? 1 : 0;\n      m_iparm[34] = 1;  // C indexing\n      m_iparm[36] = 0;  // CSR\n      m_iparm[59] = 0;  // 0 - In-Core ; 1 - Automatic switch between In-Core and Out-of-Core modes ; 2 - Out-of-Core\n      \n      memset(m_pt, 0, sizeof(m_pt));\n    }\n\n  protected:\n    // cached data to reduce reallocation, etc.\n    \n    void manageErrorCode(Index error) const\n    {\n      switch(error)\n      {\n        case 0:\n          m_info = Success;\n          break;\n        case -4:\n        case -7:\n          m_info = NumericalIssue;\n          break;\n        default:\n          m_info = InvalidInput;\n      }\n    }\n\n    mutable SparseMatrixType m_matrix;\n    mutable ComputationInfo m_info;\n    bool m_analysisIsOk, m_factorizationIsOk;\n    StorageIndex m_type, m_msglvl;\n    mutable void *m_pt[64];\n    mutable ParameterType m_iparm;\n    mutable IntColVectorType m_perm;\n    Index m_size;\n    \n};\n\ntemplate<class Derived>\nDerived& PardisoImpl<Derived>::compute(const MatrixType& a)\n{\n  m_size = a.rows();\n  eigen_assert(a.rows() == a.cols());\n\n  pardisoRelease();\n  m_perm.setZero(m_size);\n  derived().getMatrix(a);\n  \n  Index error;\n  error = internal::pardiso_run_selector<StorageIndex>::run(m_pt, 1, 1, m_type, 12, internal::convert_index<StorageIndex>(m_size),\n                                                            m_matrix.valuePtr(), m_matrix.outerIndexPtr(), m_matrix.innerIndexPtr(),\n                                                            m_perm.data(), 0, m_iparm.data(), m_msglvl, NULL, NULL);\n  manageErrorCode(error);\n  m_analysisIsOk = true;\n  m_factorizationIsOk = true;\n  m_isInitialized = true;\n  return derived();\n}\n\ntemplate<class Derived>\nDerived& PardisoImpl<Derived>::analyzePattern(const MatrixType& a)\n{\n  m_size = a.rows();\n  eigen_assert(m_size == a.cols());\n\n  pardisoRelease();\n  m_perm.setZero(m_size);\n  derived().getMatrix(a);\n  \n  Index error;\n  error = internal::pardiso_run_selector<StorageIndex>::run(m_pt, 1, 1, m_type, 11, internal::convert_index<StorageIndex>(m_size),\n                                                            m_matrix.valuePtr(), m_matrix.outerIndexPtr(), m_matrix.innerIndexPtr(),\n                                                            m_perm.data(), 0, m_iparm.data(), m_msglvl, NULL, NULL);\n  \n  manageErrorCode(error);\n  m_analysisIsOk = true;\n  m_factorizationIsOk = false;\n  m_isInitialized = true;\n  return derived();\n}\n\ntemplate<class Derived>\nDerived& PardisoImpl<Derived>::factorize(const MatrixType& a)\n{\n  eigen_assert(m_analysisIsOk && \"You must first call analyzePattern()\");\n  eigen_assert(m_size == a.rows() && m_size == a.cols());\n  \n  derived().getMatrix(a);\n\n  Index error;\n  error = internal::pardiso_run_selector<StorageIndex>::run(m_pt, 1, 1, m_type, 22, internal::convert_index<StorageIndex>(m_size),\n                                                            m_matrix.valuePtr(), m_matrix.outerIndexPtr(), m_matrix.innerIndexPtr(),\n                                                            m_perm.data(), 0, m_iparm.data(), m_msglvl, NULL, NULL);\n  \n  manageErrorCode(error);\n  m_factorizationIsOk = true;\n  return derived();\n}\n\ntemplate<class Derived>\ntemplate<typename BDerived,typename XDerived>\nvoid PardisoImpl<Derived>::_solve_impl(const MatrixBase<BDerived> &b, MatrixBase<XDerived>& x) const\n{\n  if(m_iparm[0] == 0) // Factorization was not computed\n  {\n    m_info = InvalidInput;\n    return;\n  }\n\n  //Index n = m_matrix.rows();\n  Index nrhs = Index(b.cols());\n  eigen_assert(m_size==b.rows());\n  eigen_assert(((MatrixBase<BDerived>::Flags & RowMajorBit) == 0 || nrhs == 1) && \"Row-major right hand sides are not supported\");\n  eigen_assert(((MatrixBase<XDerived>::Flags & RowMajorBit) == 0 || nrhs == 1) && \"Row-major matrices of unknowns are not supported\");\n  eigen_assert(((nrhs == 1) || b.outerStride() == b.rows()));\n\n\n//  switch (transposed) {\n//    case SvNoTrans    : m_iparm[11] = 0 ; break;\n//    case SvTranspose  : m_iparm[11] = 2 ; break;\n//    case SvAdjoint    : m_iparm[11] = 1 ; break;\n//    default:\n//      //std::cerr << \"Eigen: transposition  option \\\"\" << transposed << \"\\\" not supported by the PARDISO backend\\n\";\n//      m_iparm[11] = 0;\n//  }\n\n  Scalar* rhs_ptr = const_cast<Scalar*>(b.derived().data());\n  Matrix<Scalar,Dynamic,Dynamic,ColMajor> tmp;\n  \n  // Pardiso cannot solve in-place\n  if(rhs_ptr == x.derived().data())\n  {\n    tmp = b;\n    rhs_ptr = tmp.data();\n  }\n  \n  Index error;\n  error = internal::pardiso_run_selector<StorageIndex>::run(m_pt, 1, 1, m_type, 33, internal::convert_index<StorageIndex>(m_size),\n                                                            m_matrix.valuePtr(), m_matrix.outerIndexPtr(), m_matrix.innerIndexPtr(),\n                                                            m_perm.data(), internal::convert_index<StorageIndex>(nrhs), m_iparm.data(), m_msglvl,\n                                                            rhs_ptr, x.derived().data());\n\n  manageErrorCode(error);\n}\n\n\n/** \\ingroup PardisoSupport_Module\n  * \\class PardisoLU\n  * \\brief A sparse direct LU factorization and solver based on the PARDISO library\n  *\n  * This class allows to solve for A.X = B sparse linear problems via a direct LU factorization\n  * using the Intel MKL PARDISO library. The sparse matrix A must be squared and invertible.\n  * The vectors or matrices X and B can be either dense or sparse.\n  *\n  * By default, it runs in in-core mode. To enable PARDISO's out-of-core feature, set:\n  * \\code solver.pardisoParameterArray()[59] = 1; \\endcode\n  *\n  * \\tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<>\n  *\n  * \\implsparsesolverconcept\n  *\n  * \\sa \\ref TutorialSparseSolverConcept, class SparseLU\n  */\ntemplate<typename MatrixType>\nclass PardisoLU : public PardisoImpl< PardisoLU<MatrixType> >\n{\n  protected:\n    typedef PardisoImpl<PardisoLU> Base;\n    using Base::pardisoInit;\n    using Base::m_matrix;\n    friend class PardisoImpl< PardisoLU<MatrixType> >;\n\n  public:\n\n    typedef typename Base::Scalar Scalar;\n    typedef typename Base::RealScalar RealScalar;\n\n    using Base::compute;\n    using Base::solve;\n\n    PardisoLU()\n      : Base()\n    {\n      pardisoInit(Base::ScalarIsComplex ? 13 : 11);\n    }\n\n    explicit PardisoLU(const MatrixType& matrix)\n      : Base()\n    {\n      pardisoInit(Base::ScalarIsComplex ? 13 : 11);\n      compute(matrix);\n    }\n  protected:\n    void getMatrix(const MatrixType& matrix)\n    {\n      m_matrix = matrix;\n      m_matrix.makeCompressed();\n    }\n};\n\n/** \\ingroup PardisoSupport_Module\n  * \\class PardisoLLT\n  * \\brief A sparse direct Cholesky (LLT) factorization and solver based on the PARDISO library\n  *\n  * This class allows to solve for A.X = B sparse linear problems via a LL^T Cholesky factorization\n  * using the Intel MKL PARDISO library. The sparse matrix A must be selfajoint and positive definite.\n  * The vectors or matrices X and B can be either dense or sparse.\n  *\n  * By default, it runs in in-core mode. To enable PARDISO's out-of-core feature, set:\n  * \\code solver.pardisoParameterArray()[59] = 1; \\endcode\n  *\n  * \\tparam MatrixType the type of the sparse matrix A, it must be a SparseMatrix<>\n  * \\tparam UpLo can be any bitwise combination of Upper, Lower. The default is Upper, meaning only the upper triangular part has to be used.\n  *         Upper|Lower can be used to tell both triangular parts can be used as input.\n  *\n  * \\implsparsesolverconcept\n  *\n  * \\sa \\ref TutorialSparseSolverConcept, class SimplicialLLT\n  */\ntemplate<typename MatrixType, int _UpLo>\nclass PardisoLLT : public PardisoImpl< PardisoLLT<MatrixType,_UpLo> >\n{\n  protected:\n    typedef PardisoImpl< PardisoLLT<MatrixType,_UpLo> > Base;\n    using Base::pardisoInit;\n    using Base::m_matrix;\n    friend class PardisoImpl< PardisoLLT<MatrixType,_UpLo> >;\n\n  public:\n\n    typedef typename Base::Scalar Scalar;\n    typedef typename Base::RealScalar RealScalar;\n    typedef typename Base::StorageIndex StorageIndex;\n    enum { UpLo = _UpLo };\n    using Base::compute;\n\n    PardisoLLT()\n      : Base()\n    {\n      pardisoInit(Base::ScalarIsComplex ? 4 : 2);\n    }\n\n    explicit PardisoLLT(const MatrixType& matrix)\n      : Base()\n    {\n      pardisoInit(Base::ScalarIsComplex ? 4 : 2);\n      compute(matrix);\n    }\n    \n  protected:\n    \n    void getMatrix(const MatrixType& matrix)\n    {\n      // PARDISO supports only upper, row-major matrices\n      PermutationMatrix<Dynamic,Dynamic,StorageIndex> p_null;\n      m_matrix.resize(matrix.rows(), matrix.cols());\n      m_matrix.template selfadjointView<Upper>() = matrix.template selfadjointView<UpLo>().twistedBy(p_null);\n      m_matrix.makeCompressed();\n    }\n};\n\n/** \\ingroup PardisoSupport_Module\n  * \\class PardisoLDLT\n  * \\brief A sparse direct Cholesky (LDLT) factorization and solver based on the PARDISO library\n  *\n  * This class allows to solve for A.X = B sparse linear problems via a LDL^T Cholesky factorization\n  * using the Intel MKL PARDISO library. The sparse matrix A is assumed to be selfajoint and positive definite.\n  * For complex matrices, A can also be symmetric only, see the \\a Options template parameter.\n  * The vectors or matrices X and B can be either dense or sparse.\n  *\n  * By default, it runs in in-core mode. To enable PARDISO's out-of-core feature, set:\n  * \\code solver.pardisoParameterArray()[59] = 1; \\endcode\n  *\n  * \\tparam MatrixType the type of the sparse matrix A, it must be a SparseMatrix<>\n  * \\tparam Options can be any bitwise combination of Upper, Lower, and Symmetric. The default is Upper, meaning only the upper triangular part has to be used.\n  *         Symmetric can be used for symmetric, non-selfadjoint complex matrices, the default being to assume a selfadjoint matrix.\n  *         Upper|Lower can be used to tell both triangular parts can be used as input.\n  *\n  * \\implsparsesolverconcept\n  *\n  * \\sa \\ref TutorialSparseSolverConcept, class SimplicialLDLT\n  */\ntemplate<typename MatrixType, int Options>\nclass PardisoLDLT : public PardisoImpl< PardisoLDLT<MatrixType,Options> >\n{\n  protected:\n    typedef PardisoImpl< PardisoLDLT<MatrixType,Options> > Base;\n    using Base::pardisoInit;\n    using Base::m_matrix;\n    friend class PardisoImpl< PardisoLDLT<MatrixType,Options> >;\n\n  public:\n\n    typedef typename Base::Scalar Scalar;\n    typedef typename Base::RealScalar RealScalar;\n    typedef typename Base::StorageIndex StorageIndex;\n    using Base::compute;\n    enum { UpLo = Options&(Upper|Lower) };\n\n    PardisoLDLT()\n      : Base()\n    {\n      pardisoInit(Base::ScalarIsComplex ? ( bool(Options&Symmetric) ? 6 : -4 ) : -2);\n    }\n\n    explicit PardisoLDLT(const MatrixType& matrix)\n      : Base()\n    {\n      pardisoInit(Base::ScalarIsComplex ? ( bool(Options&Symmetric) ? 6 : -4 ) : -2);\n      compute(matrix);\n    }\n    \n    void getMatrix(const MatrixType& matrix)\n    {\n      // PARDISO supports only upper, row-major matrices\n      PermutationMatrix<Dynamic,Dynamic,StorageIndex> p_null;\n      m_matrix.resize(matrix.rows(), matrix.cols());\n      m_matrix.template selfadjointView<Upper>() = matrix.template selfadjointView<UpLo>().twistedBy(p_null);\n      m_matrix.makeCompressed();\n    }\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_PARDISOSUPPORT_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/QR/ColPivHouseholderQR.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_COLPIVOTINGHOUSEHOLDERQR_H\n#define EIGEN_COLPIVOTINGHOUSEHOLDERQR_H\n\nnamespace Eigen {\n\nnamespace internal {\ntemplate<typename _MatrixType> struct traits<ColPivHouseholderQR<_MatrixType> >\n : traits<_MatrixType>\n{\n  typedef MatrixXpr XprKind;\n  typedef SolverStorage StorageKind;\n  typedef int StorageIndex;\n  enum { Flags = 0 };\n};\n\n} // end namespace internal\n\n/** \\ingroup QR_Module\n  *\n  * \\class ColPivHouseholderQR\n  *\n  * \\brief Householder rank-revealing QR decomposition of a matrix with column-pivoting\n  *\n  * \\tparam _MatrixType the type of the matrix of which we are computing the QR decomposition\n  *\n  * This class performs a rank-revealing QR decomposition of a matrix \\b A into matrices \\b P, \\b Q and \\b R\n  * such that\n  * \\f[\n  *  \\mathbf{A} \\, \\mathbf{P} = \\mathbf{Q} \\, \\mathbf{R}\n  * \\f]\n  * by using Householder transformations. Here, \\b P is a permutation matrix, \\b Q a unitary matrix and \\b R an\n  * upper triangular matrix.\n  *\n  * This decomposition performs column pivoting in order to be rank-revealing and improve\n  * numerical stability. It is slower than HouseholderQR, and faster than FullPivHouseholderQR.\n  *\n  * This class supports the \\link InplaceDecomposition inplace decomposition \\endlink mechanism.\n  * \n  * \\sa MatrixBase::colPivHouseholderQr()\n  */\ntemplate<typename _MatrixType> class ColPivHouseholderQR\n        : public SolverBase<ColPivHouseholderQR<_MatrixType> >\n{\n  public:\n\n    typedef _MatrixType MatrixType;\n    typedef SolverBase<ColPivHouseholderQR> Base;\n    friend class SolverBase<ColPivHouseholderQR>;\n\n    EIGEN_GENERIC_PUBLIC_INTERFACE(ColPivHouseholderQR)\n    enum {\n      MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime,\n      MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime\n    };\n    typedef typename internal::plain_diag_type<MatrixType>::type HCoeffsType;\n    typedef PermutationMatrix<ColsAtCompileTime, MaxColsAtCompileTime> PermutationType;\n    typedef typename internal::plain_row_type<MatrixType, Index>::type IntRowVectorType;\n    typedef typename internal::plain_row_type<MatrixType>::type RowVectorType;\n    typedef typename internal::plain_row_type<MatrixType, RealScalar>::type RealRowVectorType;\n    typedef HouseholderSequence<MatrixType,typename internal::remove_all<typename HCoeffsType::ConjugateReturnType>::type> HouseholderSequenceType;\n    typedef typename MatrixType::PlainObject PlainObject;\n\n  private:\n\n    typedef typename PermutationType::StorageIndex PermIndexType;\n\n  public:\n\n    /**\n    * \\brief Default Constructor.\n    *\n    * The default constructor is useful in cases in which the user intends to\n    * perform decompositions via ColPivHouseholderQR::compute(const MatrixType&).\n    */\n    ColPivHouseholderQR()\n      : m_qr(),\n        m_hCoeffs(),\n        m_colsPermutation(),\n        m_colsTranspositions(),\n        m_temp(),\n        m_colNormsUpdated(),\n        m_colNormsDirect(),\n        m_isInitialized(false),\n        m_usePrescribedThreshold(false) {}\n\n    /** \\brief Default Constructor with memory preallocation\n      *\n      * Like the default constructor but with preallocation of the internal data\n      * according to the specified problem \\a size.\n      * \\sa ColPivHouseholderQR()\n      */\n    ColPivHouseholderQR(Index rows, Index cols)\n      : m_qr(rows, cols),\n        m_hCoeffs((std::min)(rows,cols)),\n        m_colsPermutation(PermIndexType(cols)),\n        m_colsTranspositions(cols),\n        m_temp(cols),\n        m_colNormsUpdated(cols),\n        m_colNormsDirect(cols),\n        m_isInitialized(false),\n        m_usePrescribedThreshold(false) {}\n\n    /** \\brief Constructs a QR factorization from a given matrix\n      *\n      * This constructor computes the QR factorization of the matrix \\a matrix by calling\n      * the method compute(). It is a short cut for:\n      *\n      * \\code\n      * ColPivHouseholderQR<MatrixType> qr(matrix.rows(), matrix.cols());\n      * qr.compute(matrix);\n      * \\endcode\n      *\n      * \\sa compute()\n      */\n    template<typename InputType>\n    explicit ColPivHouseholderQR(const EigenBase<InputType>& matrix)\n      : m_qr(matrix.rows(), matrix.cols()),\n        m_hCoeffs((std::min)(matrix.rows(),matrix.cols())),\n        m_colsPermutation(PermIndexType(matrix.cols())),\n        m_colsTranspositions(matrix.cols()),\n        m_temp(matrix.cols()),\n        m_colNormsUpdated(matrix.cols()),\n        m_colNormsDirect(matrix.cols()),\n        m_isInitialized(false),\n        m_usePrescribedThreshold(false)\n    {\n      compute(matrix.derived());\n    }\n\n    /** \\brief Constructs a QR factorization from a given matrix\n      *\n      * This overloaded constructor is provided for \\link InplaceDecomposition inplace decomposition \\endlink when \\c MatrixType is a Eigen::Ref.\n      *\n      * \\sa ColPivHouseholderQR(const EigenBase&)\n      */\n    template<typename InputType>\n    explicit ColPivHouseholderQR(EigenBase<InputType>& matrix)\n      : m_qr(matrix.derived()),\n        m_hCoeffs((std::min)(matrix.rows(),matrix.cols())),\n        m_colsPermutation(PermIndexType(matrix.cols())),\n        m_colsTranspositions(matrix.cols()),\n        m_temp(matrix.cols()),\n        m_colNormsUpdated(matrix.cols()),\n        m_colNormsDirect(matrix.cols()),\n        m_isInitialized(false),\n        m_usePrescribedThreshold(false)\n    {\n      computeInPlace();\n    }\n\n    #ifdef EIGEN_PARSED_BY_DOXYGEN\n    /** This method finds a solution x to the equation Ax=b, where A is the matrix of which\n      * *this is the QR decomposition, if any exists.\n      *\n      * \\param b the right-hand-side of the equation to solve.\n      *\n      * \\returns a solution.\n      *\n      * \\note_about_checking_solutions\n      *\n      * \\note_about_arbitrary_choice_of_solution\n      *\n      * Example: \\include ColPivHouseholderQR_solve.cpp\n      * Output: \\verbinclude ColPivHouseholderQR_solve.out\n      */\n    template<typename Rhs>\n    inline const Solve<ColPivHouseholderQR, Rhs>\n    solve(const MatrixBase<Rhs>& b) const;\n    #endif\n\n    HouseholderSequenceType householderQ() const;\n    HouseholderSequenceType matrixQ() const\n    {\n      return householderQ();\n    }\n\n    /** \\returns a reference to the matrix where the Householder QR decomposition is stored\n      */\n    const MatrixType& matrixQR() const\n    {\n      eigen_assert(m_isInitialized && \"ColPivHouseholderQR is not initialized.\");\n      return m_qr;\n    }\n\n    /** \\returns a reference to the matrix where the result Householder QR is stored\n     * \\warning The strict lower part of this matrix contains internal values.\n     * Only the upper triangular part should be referenced. To get it, use\n     * \\code matrixR().template triangularView<Upper>() \\endcode\n     * For rank-deficient matrices, use\n     * \\code\n     * matrixR().topLeftCorner(rank(), rank()).template triangularView<Upper>()\n     * \\endcode\n     */\n    const MatrixType& matrixR() const\n    {\n      eigen_assert(m_isInitialized && \"ColPivHouseholderQR is not initialized.\");\n      return m_qr;\n    }\n\n    template<typename InputType>\n    ColPivHouseholderQR& compute(const EigenBase<InputType>& matrix);\n\n    /** \\returns a const reference to the column permutation matrix */\n    const PermutationType& colsPermutation() const\n    {\n      eigen_assert(m_isInitialized && \"ColPivHouseholderQR is not initialized.\");\n      return m_colsPermutation;\n    }\n\n    /** \\returns the absolute value of the determinant of the matrix of which\n      * *this is the QR decomposition. It has only linear complexity\n      * (that is, O(n) where n is the dimension of the square matrix)\n      * as the QR decomposition has already been computed.\n      *\n      * \\note This is only for square matrices.\n      *\n      * \\warning a determinant can be very big or small, so for matrices\n      * of large enough dimension, there is a risk of overflow/underflow.\n      * One way to work around that is to use logAbsDeterminant() instead.\n      *\n      * \\sa logAbsDeterminant(), MatrixBase::determinant()\n      */\n    typename MatrixType::RealScalar absDeterminant() const;\n\n    /** \\returns the natural log of the absolute value of the determinant of the matrix of which\n      * *this is the QR decomposition. It has only linear complexity\n      * (that is, O(n) where n is the dimension of the square matrix)\n      * as the QR decomposition has already been computed.\n      *\n      * \\note This is only for square matrices.\n      *\n      * \\note This method is useful to work around the risk of overflow/underflow that's inherent\n      * to determinant computation.\n      *\n      * \\sa absDeterminant(), MatrixBase::determinant()\n      */\n    typename MatrixType::RealScalar logAbsDeterminant() const;\n\n    /** \\returns the rank of the matrix of which *this is the QR decomposition.\n      *\n      * \\note This method has to determine which pivots should be considered nonzero.\n      *       For that, it uses the threshold value that you can control by calling\n      *       setThreshold(const RealScalar&).\n      */\n    inline Index rank() const\n    {\n      using std::abs;\n      eigen_assert(m_isInitialized && \"ColPivHouseholderQR is not initialized.\");\n      RealScalar premultiplied_threshold = abs(m_maxpivot) * threshold();\n      Index result = 0;\n      for(Index i = 0; i < m_nonzero_pivots; ++i)\n        result += (abs(m_qr.coeff(i,i)) > premultiplied_threshold);\n      return result;\n    }\n\n    /** \\returns the dimension of the kernel of the matrix of which *this is the QR decomposition.\n      *\n      * \\note This method has to determine which pivots should be considered nonzero.\n      *       For that, it uses the threshold value that you can control by calling\n      *       setThreshold(const RealScalar&).\n      */\n    inline Index dimensionOfKernel() const\n    {\n      eigen_assert(m_isInitialized && \"ColPivHouseholderQR is not initialized.\");\n      return cols() - rank();\n    }\n\n    /** \\returns true if the matrix of which *this is the QR decomposition represents an injective\n      *          linear map, i.e. has trivial kernel; false otherwise.\n      *\n      * \\note This method has to determine which pivots should be considered nonzero.\n      *       For that, it uses the threshold value that you can control by calling\n      *       setThreshold(const RealScalar&).\n      */\n    inline bool isInjective() const\n    {\n      eigen_assert(m_isInitialized && \"ColPivHouseholderQR is not initialized.\");\n      return rank() == cols();\n    }\n\n    /** \\returns true if the matrix of which *this is the QR decomposition represents a surjective\n      *          linear map; false otherwise.\n      *\n      * \\note This method has to determine which pivots should be considered nonzero.\n      *       For that, it uses the threshold value that you can control by calling\n      *       setThreshold(const RealScalar&).\n      */\n    inline bool isSurjective() const\n    {\n      eigen_assert(m_isInitialized && \"ColPivHouseholderQR is not initialized.\");\n      return rank() == rows();\n    }\n\n    /** \\returns true if the matrix of which *this is the QR decomposition is invertible.\n      *\n      * \\note This method has to determine which pivots should be considered nonzero.\n      *       For that, it uses the threshold value that you can control by calling\n      *       setThreshold(const RealScalar&).\n      */\n    inline bool isInvertible() const\n    {\n      eigen_assert(m_isInitialized && \"ColPivHouseholderQR is not initialized.\");\n      return isInjective() && isSurjective();\n    }\n\n    /** \\returns the inverse of the matrix of which *this is the QR decomposition.\n      *\n      * \\note If this matrix is not invertible, the returned matrix has undefined coefficients.\n      *       Use isInvertible() to first determine whether this matrix is invertible.\n      */\n    inline const Inverse<ColPivHouseholderQR> inverse() const\n    {\n      eigen_assert(m_isInitialized && \"ColPivHouseholderQR is not initialized.\");\n      return Inverse<ColPivHouseholderQR>(*this);\n    }\n\n    inline Index rows() const { return m_qr.rows(); }\n    inline Index cols() const { return m_qr.cols(); }\n\n    /** \\returns a const reference to the vector of Householder coefficients used to represent the factor \\c Q.\n      *\n      * For advanced uses only.\n      */\n    const HCoeffsType& hCoeffs() const { return m_hCoeffs; }\n\n    /** Allows to prescribe a threshold to be used by certain methods, such as rank(),\n      * who need to determine when pivots are to be considered nonzero. This is not used for the\n      * QR decomposition itself.\n      *\n      * When it needs to get the threshold value, Eigen calls threshold(). By default, this\n      * uses a formula to automatically determine a reasonable threshold.\n      * Once you have called the present method setThreshold(const RealScalar&),\n      * your value is used instead.\n      *\n      * \\param threshold The new value to use as the threshold.\n      *\n      * A pivot will be considered nonzero if its absolute value is strictly greater than\n      *  \\f$ \\vert pivot \\vert \\leqslant threshold \\times \\vert maxpivot \\vert \\f$\n      * where maxpivot is the biggest pivot.\n      *\n      * If you want to come back to the default behavior, call setThreshold(Default_t)\n      */\n    ColPivHouseholderQR& setThreshold(const RealScalar& threshold)\n    {\n      m_usePrescribedThreshold = true;\n      m_prescribedThreshold = threshold;\n      return *this;\n    }\n\n    /** Allows to come back to the default behavior, letting Eigen use its default formula for\n      * determining the threshold.\n      *\n      * You should pass the special object Eigen::Default as parameter here.\n      * \\code qr.setThreshold(Eigen::Default); \\endcode\n      *\n      * See the documentation of setThreshold(const RealScalar&).\n      */\n    ColPivHouseholderQR& setThreshold(Default_t)\n    {\n      m_usePrescribedThreshold = false;\n      return *this;\n    }\n\n    /** Returns the threshold that will be used by certain methods such as rank().\n      *\n      * See the documentation of setThreshold(const RealScalar&).\n      */\n    RealScalar threshold() const\n    {\n      eigen_assert(m_isInitialized || m_usePrescribedThreshold);\n      return m_usePrescribedThreshold ? m_prescribedThreshold\n      // this formula comes from experimenting (see \"LU precision tuning\" thread on the list)\n      // and turns out to be identical to Higham's formula used already in LDLt.\n                                      : NumTraits<Scalar>::epsilon() * RealScalar(m_qr.diagonalSize());\n    }\n\n    /** \\returns the number of nonzero pivots in the QR decomposition.\n      * Here nonzero is meant in the exact sense, not in a fuzzy sense.\n      * So that notion isn't really intrinsically interesting, but it is\n      * still useful when implementing algorithms.\n      *\n      * \\sa rank()\n      */\n    inline Index nonzeroPivots() const\n    {\n      eigen_assert(m_isInitialized && \"ColPivHouseholderQR is not initialized.\");\n      return m_nonzero_pivots;\n    }\n\n    /** \\returns the absolute value of the biggest pivot, i.e. the biggest\n      *          diagonal coefficient of R.\n      */\n    RealScalar maxPivot() const { return m_maxpivot; }\n\n    /** \\brief Reports whether the QR factorization was successful.\n      *\n      * \\note This function always returns \\c Success. It is provided for compatibility\n      * with other factorization routines.\n      * \\returns \\c Success\n      */\n    ComputationInfo info() const\n    {\n      eigen_assert(m_isInitialized && \"Decomposition is not initialized.\");\n      return Success;\n    }\n\n    #ifndef EIGEN_PARSED_BY_DOXYGEN\n    template<typename RhsType, typename DstType>\n    void _solve_impl(const RhsType &rhs, DstType &dst) const;\n\n    template<bool Conjugate, typename RhsType, typename DstType>\n    void _solve_impl_transposed(const RhsType &rhs, DstType &dst) const;\n    #endif\n\n  protected:\n\n    friend class CompleteOrthogonalDecomposition<MatrixType>;\n\n    static void check_template_parameters()\n    {\n      EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar);\n    }\n\n    void computeInPlace();\n\n    MatrixType m_qr;\n    HCoeffsType m_hCoeffs;\n    PermutationType m_colsPermutation;\n    IntRowVectorType m_colsTranspositions;\n    RowVectorType m_temp;\n    RealRowVectorType m_colNormsUpdated;\n    RealRowVectorType m_colNormsDirect;\n    bool m_isInitialized, m_usePrescribedThreshold;\n    RealScalar m_prescribedThreshold, m_maxpivot;\n    Index m_nonzero_pivots;\n    Index m_det_pq;\n};\n\ntemplate<typename MatrixType>\ntypename MatrixType::RealScalar ColPivHouseholderQR<MatrixType>::absDeterminant() const\n{\n  using std::abs;\n  eigen_assert(m_isInitialized && \"ColPivHouseholderQR is not initialized.\");\n  eigen_assert(m_qr.rows() == m_qr.cols() && \"You can't take the determinant of a non-square matrix!\");\n  return abs(m_qr.diagonal().prod());\n}\n\ntemplate<typename MatrixType>\ntypename MatrixType::RealScalar ColPivHouseholderQR<MatrixType>::logAbsDeterminant() const\n{\n  eigen_assert(m_isInitialized && \"ColPivHouseholderQR is not initialized.\");\n  eigen_assert(m_qr.rows() == m_qr.cols() && \"You can't take the determinant of a non-square matrix!\");\n  return m_qr.diagonal().cwiseAbs().array().log().sum();\n}\n\n/** Performs the QR factorization of the given matrix \\a matrix. The result of\n  * the factorization is stored into \\c *this, and a reference to \\c *this\n  * is returned.\n  *\n  * \\sa class ColPivHouseholderQR, ColPivHouseholderQR(const MatrixType&)\n  */\ntemplate<typename MatrixType>\ntemplate<typename InputType>\nColPivHouseholderQR<MatrixType>& ColPivHouseholderQR<MatrixType>::compute(const EigenBase<InputType>& matrix)\n{\n  m_qr = matrix.derived();\n  computeInPlace();\n  return *this;\n}\n\ntemplate<typename MatrixType>\nvoid ColPivHouseholderQR<MatrixType>::computeInPlace()\n{\n  check_template_parameters();\n\n  // the column permutation is stored as int indices, so just to be sure:\n  eigen_assert(m_qr.cols()<=NumTraits<int>::highest());\n\n  using std::abs;\n\n  Index rows = m_qr.rows();\n  Index cols = m_qr.cols();\n  Index size = m_qr.diagonalSize();\n\n  m_hCoeffs.resize(size);\n\n  m_temp.resize(cols);\n\n  m_colsTranspositions.resize(m_qr.cols());\n  Index number_of_transpositions = 0;\n\n  m_colNormsUpdated.resize(cols);\n  m_colNormsDirect.resize(cols);\n  for (Index k = 0; k < cols; ++k) {\n    // colNormsDirect(k) caches the most recent directly computed norm of\n    // column k.\n    m_colNormsDirect.coeffRef(k) = m_qr.col(k).norm();\n    m_colNormsUpdated.coeffRef(k) = m_colNormsDirect.coeffRef(k);\n  }\n\n  RealScalar threshold_helper =  numext::abs2<RealScalar>(m_colNormsUpdated.maxCoeff() * NumTraits<RealScalar>::epsilon()) / RealScalar(rows);\n  RealScalar norm_downdate_threshold = numext::sqrt(NumTraits<RealScalar>::epsilon());\n\n  m_nonzero_pivots = size; // the generic case is that in which all pivots are nonzero (invertible case)\n  m_maxpivot = RealScalar(0);\n\n  for(Index k = 0; k < size; ++k)\n  {\n    // first, we look up in our table m_colNormsUpdated which column has the biggest norm\n    Index biggest_col_index;\n    RealScalar biggest_col_sq_norm = numext::abs2(m_colNormsUpdated.tail(cols-k).maxCoeff(&biggest_col_index));\n    biggest_col_index += k;\n\n    // Track the number of meaningful pivots but do not stop the decomposition to make\n    // sure that the initial matrix is properly reproduced. See bug 941.\n    if(m_nonzero_pivots==size && biggest_col_sq_norm < threshold_helper * RealScalar(rows-k))\n      m_nonzero_pivots = k;\n\n    // apply the transposition to the columns\n    m_colsTranspositions.coeffRef(k) = biggest_col_index;\n    if(k != biggest_col_index) {\n      m_qr.col(k).swap(m_qr.col(biggest_col_index));\n      std::swap(m_colNormsUpdated.coeffRef(k), m_colNormsUpdated.coeffRef(biggest_col_index));\n      std::swap(m_colNormsDirect.coeffRef(k), m_colNormsDirect.coeffRef(biggest_col_index));\n      ++number_of_transpositions;\n    }\n\n    // generate the householder vector, store it below the diagonal\n    RealScalar beta;\n    m_qr.col(k).tail(rows-k).makeHouseholderInPlace(m_hCoeffs.coeffRef(k), beta);\n\n    // apply the householder transformation to the diagonal coefficient\n    m_qr.coeffRef(k,k) = beta;\n\n    // remember the maximum absolute value of diagonal coefficients\n    if(abs(beta) > m_maxpivot) m_maxpivot = abs(beta);\n\n    // apply the householder transformation\n    m_qr.bottomRightCorner(rows-k, cols-k-1)\n        .applyHouseholderOnTheLeft(m_qr.col(k).tail(rows-k-1), m_hCoeffs.coeffRef(k), &m_temp.coeffRef(k+1));\n\n    // update our table of norms of the columns\n    for (Index j = k + 1; j < cols; ++j) {\n      // The following implements the stable norm downgrade step discussed in\n      // http://www.netlib.org/lapack/lawnspdf/lawn176.pdf\n      // and used in LAPACK routines xGEQPF and xGEQP3.\n      // See lines 278-297 in http://www.netlib.org/lapack/explore-html/dc/df4/sgeqpf_8f_source.html\n      if (m_colNormsUpdated.coeffRef(j) != RealScalar(0)) {\n        RealScalar temp = abs(m_qr.coeffRef(k, j)) / m_colNormsUpdated.coeffRef(j);\n        temp = (RealScalar(1) + temp) * (RealScalar(1) - temp);\n        temp = temp <  RealScalar(0) ? RealScalar(0) : temp;\n        RealScalar temp2 = temp * numext::abs2<RealScalar>(m_colNormsUpdated.coeffRef(j) /\n                                                           m_colNormsDirect.coeffRef(j));\n        if (temp2 <= norm_downdate_threshold) {\n          // The updated norm has become too inaccurate so re-compute the column\n          // norm directly.\n          m_colNormsDirect.coeffRef(j) = m_qr.col(j).tail(rows - k - 1).norm();\n          m_colNormsUpdated.coeffRef(j) = m_colNormsDirect.coeffRef(j);\n        } else {\n          m_colNormsUpdated.coeffRef(j) *= numext::sqrt(temp);\n        }\n      }\n    }\n  }\n\n  m_colsPermutation.setIdentity(PermIndexType(cols));\n  for(PermIndexType k = 0; k < size/*m_nonzero_pivots*/; ++k)\n    m_colsPermutation.applyTranspositionOnTheRight(k, PermIndexType(m_colsTranspositions.coeff(k)));\n\n  m_det_pq = (number_of_transpositions%2) ? -1 : 1;\n  m_isInitialized = true;\n}\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\ntemplate<typename _MatrixType>\ntemplate<typename RhsType, typename DstType>\nvoid ColPivHouseholderQR<_MatrixType>::_solve_impl(const RhsType &rhs, DstType &dst) const\n{\n  const Index nonzero_pivots = nonzeroPivots();\n\n  if(nonzero_pivots == 0)\n  {\n    dst.setZero();\n    return;\n  }\n\n  typename RhsType::PlainObject c(rhs);\n\n  c.applyOnTheLeft(householderQ().setLength(nonzero_pivots).adjoint() );\n\n  m_qr.topLeftCorner(nonzero_pivots, nonzero_pivots)\n      .template triangularView<Upper>()\n      .solveInPlace(c.topRows(nonzero_pivots));\n\n  for(Index i = 0; i < nonzero_pivots; ++i) dst.row(m_colsPermutation.indices().coeff(i)) = c.row(i);\n  for(Index i = nonzero_pivots; i < cols(); ++i) dst.row(m_colsPermutation.indices().coeff(i)).setZero();\n}\n\ntemplate<typename _MatrixType>\ntemplate<bool Conjugate, typename RhsType, typename DstType>\nvoid ColPivHouseholderQR<_MatrixType>::_solve_impl_transposed(const RhsType &rhs, DstType &dst) const\n{\n  const Index nonzero_pivots = nonzeroPivots();\n\n  if(nonzero_pivots == 0)\n  {\n    dst.setZero();\n    return;\n  }\n\n  typename RhsType::PlainObject c(m_colsPermutation.transpose()*rhs);\n\n  m_qr.topLeftCorner(nonzero_pivots, nonzero_pivots)\n        .template triangularView<Upper>()\n        .transpose().template conjugateIf<Conjugate>()\n        .solveInPlace(c.topRows(nonzero_pivots));\n\n  dst.topRows(nonzero_pivots) = c.topRows(nonzero_pivots);\n  dst.bottomRows(rows()-nonzero_pivots).setZero();\n\n  dst.applyOnTheLeft(householderQ().setLength(nonzero_pivots).template conjugateIf<!Conjugate>() );\n}\n#endif\n\nnamespace internal {\n\ntemplate<typename DstXprType, typename MatrixType>\nstruct Assignment<DstXprType, Inverse<ColPivHouseholderQR<MatrixType> >, internal::assign_op<typename DstXprType::Scalar,typename ColPivHouseholderQR<MatrixType>::Scalar>, Dense2Dense>\n{\n  typedef ColPivHouseholderQR<MatrixType> QrType;\n  typedef Inverse<QrType> SrcXprType;\n  static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op<typename DstXprType::Scalar,typename QrType::Scalar> &)\n  {\n    dst = src.nestedExpression().solve(MatrixType::Identity(src.rows(), src.cols()));\n  }\n};\n\n} // end namespace internal\n\n/** \\returns the matrix Q as a sequence of householder transformations.\n  * You can extract the meaningful part only by using:\n  * \\code qr.householderQ().setLength(qr.nonzeroPivots()) \\endcode*/\ntemplate<typename MatrixType>\ntypename ColPivHouseholderQR<MatrixType>::HouseholderSequenceType ColPivHouseholderQR<MatrixType>\n  ::householderQ() const\n{\n  eigen_assert(m_isInitialized && \"ColPivHouseholderQR is not initialized.\");\n  return HouseholderSequenceType(m_qr, m_hCoeffs.conjugate());\n}\n\n/** \\return the column-pivoting Householder QR decomposition of \\c *this.\n  *\n  * \\sa class ColPivHouseholderQR\n  */\ntemplate<typename Derived>\nconst ColPivHouseholderQR<typename MatrixBase<Derived>::PlainObject>\nMatrixBase<Derived>::colPivHouseholderQr() const\n{\n  return ColPivHouseholderQR<PlainObject>(eval());\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_COLPIVOTINGHOUSEHOLDERQR_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/QR/ColPivHouseholderQR_LAPACKE.h",
    "content": "/*\n Copyright (c) 2011, Intel Corporation. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without modification,\n are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n   list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n * Neither the name of Intel Corporation nor the names of its contributors may\n   be used to endorse or promote products derived from this software without\n   specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\n ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n ********************************************************************************\n *   Content : Eigen bindings to LAPACKe\n *    Householder QR decomposition of a matrix with column pivoting based on\n *    LAPACKE_?geqp3 function.\n ********************************************************************************\n*/\n\n#ifndef EIGEN_COLPIVOTINGHOUSEHOLDERQR_LAPACKE_H\n#define EIGEN_COLPIVOTINGHOUSEHOLDERQR_LAPACKE_H\n\nnamespace Eigen { \n\n/** \\internal Specialization for the data types supported by LAPACKe */\n\n#define EIGEN_LAPACKE_QR_COLPIV(EIGTYPE, LAPACKE_TYPE, LAPACKE_PREFIX, EIGCOLROW, LAPACKE_COLROW) \\\ntemplate<> template<typename InputType> inline \\\nColPivHouseholderQR<Matrix<EIGTYPE, Dynamic, Dynamic, EIGCOLROW, Dynamic, Dynamic> >& \\\nColPivHouseholderQR<Matrix<EIGTYPE, Dynamic, Dynamic, EIGCOLROW, Dynamic, Dynamic> >::compute( \\\n              const EigenBase<InputType>& matrix) \\\n\\\n{ \\\n  using std::abs; \\\n  typedef Matrix<EIGTYPE, Dynamic, Dynamic, EIGCOLROW, Dynamic, Dynamic> MatrixType; \\\n  typedef MatrixType::RealScalar RealScalar; \\\n  Index rows = matrix.rows();\\\n  Index cols = matrix.cols();\\\n\\\n  m_qr = matrix;\\\n  Index size = m_qr.diagonalSize();\\\n  m_hCoeffs.resize(size);\\\n\\\n  m_colsTranspositions.resize(cols);\\\n  /*Index number_of_transpositions = 0;*/ \\\n\\\n  m_nonzero_pivots = 0; \\\n  m_maxpivot = RealScalar(0);\\\n  m_colsPermutation.resize(cols); \\\n  m_colsPermutation.indices().setZero(); \\\n\\\n  lapack_int lda = internal::convert_index<lapack_int,Index>(m_qr.outerStride()); \\\n  lapack_int matrix_order = LAPACKE_COLROW; \\\n  LAPACKE_##LAPACKE_PREFIX##geqp3( matrix_order, internal::convert_index<lapack_int,Index>(rows), internal::convert_index<lapack_int,Index>(cols), \\\n                              (LAPACKE_TYPE*)m_qr.data(), lda, (lapack_int*)m_colsPermutation.indices().data(), (LAPACKE_TYPE*)m_hCoeffs.data()); \\\n  m_isInitialized = true; \\\n  m_maxpivot=m_qr.diagonal().cwiseAbs().maxCoeff(); \\\n  m_hCoeffs.adjointInPlace(); \\\n  RealScalar premultiplied_threshold = abs(m_maxpivot) * threshold(); \\\n  lapack_int *perm = m_colsPermutation.indices().data(); \\\n  for(Index i=0;i<size;i++) { \\\n    m_nonzero_pivots += (abs(m_qr.coeff(i,i)) > premultiplied_threshold);\\\n  } \\\n  for(Index i=0;i<cols;i++) perm[i]--;\\\n\\\n  /*m_det_pq = (number_of_transpositions%2) ? -1 : 1;  // TODO: It's not needed now; fix upon availability in Eigen */ \\\n\\\n  return *this; \\\n}\n\nEIGEN_LAPACKE_QR_COLPIV(double,   double,        d, ColMajor, LAPACK_COL_MAJOR)\nEIGEN_LAPACKE_QR_COLPIV(float,    float,         s, ColMajor, LAPACK_COL_MAJOR)\nEIGEN_LAPACKE_QR_COLPIV(dcomplex, lapack_complex_double, z, ColMajor, LAPACK_COL_MAJOR)\nEIGEN_LAPACKE_QR_COLPIV(scomplex, lapack_complex_float,  c, ColMajor, LAPACK_COL_MAJOR)\n\nEIGEN_LAPACKE_QR_COLPIV(double,   double,        d, RowMajor, LAPACK_ROW_MAJOR)\nEIGEN_LAPACKE_QR_COLPIV(float,    float,         s, RowMajor, LAPACK_ROW_MAJOR)\nEIGEN_LAPACKE_QR_COLPIV(dcomplex, lapack_complex_double, z, RowMajor, LAPACK_ROW_MAJOR)\nEIGEN_LAPACKE_QR_COLPIV(scomplex, lapack_complex_float,  c, RowMajor, LAPACK_ROW_MAJOR)\n\n} // end namespace Eigen\n\n#endif // EIGEN_COLPIVOTINGHOUSEHOLDERQR_LAPACKE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/QR/CompleteOrthogonalDecomposition.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Rasmus Munk Larsen <rmlarsen@google.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_COMPLETEORTHOGONALDECOMPOSITION_H\n#define EIGEN_COMPLETEORTHOGONALDECOMPOSITION_H\n\nnamespace Eigen {\n\nnamespace internal {\ntemplate <typename _MatrixType>\nstruct traits<CompleteOrthogonalDecomposition<_MatrixType> >\n    : traits<_MatrixType> {\n  typedef MatrixXpr XprKind;\n  typedef SolverStorage StorageKind;\n  typedef int StorageIndex;\n  enum { Flags = 0 };\n};\n\n}  // end namespace internal\n\n/** \\ingroup QR_Module\n  *\n  * \\class CompleteOrthogonalDecomposition\n  *\n  * \\brief Complete orthogonal decomposition (COD) of a matrix.\n  *\n  * \\param MatrixType the type of the matrix of which we are computing the COD.\n  *\n  * This class performs a rank-revealing complete orthogonal decomposition of a\n  * matrix  \\b A into matrices \\b P, \\b Q, \\b T, and \\b Z such that\n  * \\f[\n  *  \\mathbf{A} \\, \\mathbf{P} = \\mathbf{Q} \\,\n  *                     \\begin{bmatrix} \\mathbf{T} &  \\mathbf{0} \\\\\n  *                                     \\mathbf{0} & \\mathbf{0} \\end{bmatrix} \\, \\mathbf{Z}\n  * \\f]\n  * by using Householder transformations. Here, \\b P is a permutation matrix,\n  * \\b Q and \\b Z are unitary matrices and \\b T an upper triangular matrix of\n  * size rank-by-rank. \\b A may be rank deficient.\n  *\n  * This class supports the \\link InplaceDecomposition inplace decomposition \\endlink mechanism.\n  * \n  * \\sa MatrixBase::completeOrthogonalDecomposition()\n  */\ntemplate <typename _MatrixType> class CompleteOrthogonalDecomposition\n          : public SolverBase<CompleteOrthogonalDecomposition<_MatrixType> >\n{\n public:\n  typedef _MatrixType MatrixType;\n  typedef SolverBase<CompleteOrthogonalDecomposition> Base;\n\n  template<typename Derived>\n  friend struct internal::solve_assertion;\n\n  EIGEN_GENERIC_PUBLIC_INTERFACE(CompleteOrthogonalDecomposition)\n  enum {\n    MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime,\n    MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime\n  };\n  typedef typename internal::plain_diag_type<MatrixType>::type HCoeffsType;\n  typedef PermutationMatrix<ColsAtCompileTime, MaxColsAtCompileTime>\n      PermutationType;\n  typedef typename internal::plain_row_type<MatrixType, Index>::type\n      IntRowVectorType;\n  typedef typename internal::plain_row_type<MatrixType>::type RowVectorType;\n  typedef typename internal::plain_row_type<MatrixType, RealScalar>::type\n      RealRowVectorType;\n  typedef HouseholderSequence<\n      MatrixType, typename internal::remove_all<\n                      typename HCoeffsType::ConjugateReturnType>::type>\n      HouseholderSequenceType;\n  typedef typename MatrixType::PlainObject PlainObject;\n\n private:\n  typedef typename PermutationType::Index PermIndexType;\n\n public:\n  /**\n   * \\brief Default Constructor.\n   *\n   * The default constructor is useful in cases in which the user intends to\n   * perform decompositions via\n   * \\c CompleteOrthogonalDecomposition::compute(const* MatrixType&).\n   */\n  CompleteOrthogonalDecomposition() : m_cpqr(), m_zCoeffs(), m_temp() {}\n\n  /** \\brief Default Constructor with memory preallocation\n   *\n   * Like the default constructor but with preallocation of the internal data\n   * according to the specified problem \\a size.\n   * \\sa CompleteOrthogonalDecomposition()\n   */\n  CompleteOrthogonalDecomposition(Index rows, Index cols)\n      : m_cpqr(rows, cols), m_zCoeffs((std::min)(rows, cols)), m_temp(cols) {}\n\n  /** \\brief Constructs a complete orthogonal decomposition from a given\n   * matrix.\n   *\n   * This constructor computes the complete orthogonal decomposition of the\n   * matrix \\a matrix by calling the method compute(). The default\n   * threshold for rank determination will be used. It is a short cut for:\n   *\n   * \\code\n   * CompleteOrthogonalDecomposition<MatrixType> cod(matrix.rows(),\n   *                                                 matrix.cols());\n   * cod.setThreshold(Default);\n   * cod.compute(matrix);\n   * \\endcode\n   *\n   * \\sa compute()\n   */\n  template <typename InputType>\n  explicit CompleteOrthogonalDecomposition(const EigenBase<InputType>& matrix)\n      : m_cpqr(matrix.rows(), matrix.cols()),\n        m_zCoeffs((std::min)(matrix.rows(), matrix.cols())),\n        m_temp(matrix.cols())\n  {\n    compute(matrix.derived());\n  }\n\n  /** \\brief Constructs a complete orthogonal decomposition from a given matrix\n    *\n    * This overloaded constructor is provided for \\link InplaceDecomposition inplace decomposition \\endlink when \\c MatrixType is a Eigen::Ref.\n    *\n    * \\sa CompleteOrthogonalDecomposition(const EigenBase&)\n    */\n  template<typename InputType>\n  explicit CompleteOrthogonalDecomposition(EigenBase<InputType>& matrix)\n    : m_cpqr(matrix.derived()),\n      m_zCoeffs((std::min)(matrix.rows(), matrix.cols())),\n      m_temp(matrix.cols())\n  {\n    computeInPlace();\n  } \n\n  #ifdef EIGEN_PARSED_BY_DOXYGEN\n  /** This method computes the minimum-norm solution X to a least squares\n   * problem \\f[\\mathrm{minimize} \\|A X - B\\|, \\f] where \\b A is the matrix of\n   * which \\c *this is the complete orthogonal decomposition.\n   *\n   * \\param b the right-hand sides of the problem to solve.\n   *\n   * \\returns a solution.\n   *\n   */\n  template <typename Rhs>\n  inline const Solve<CompleteOrthogonalDecomposition, Rhs> solve(\n      const MatrixBase<Rhs>& b) const;\n  #endif\n\n  HouseholderSequenceType householderQ(void) const;\n  HouseholderSequenceType matrixQ(void) const { return m_cpqr.householderQ(); }\n\n  /** \\returns the matrix \\b Z.\n   */\n  MatrixType matrixZ() const {\n    MatrixType Z = MatrixType::Identity(m_cpqr.cols(), m_cpqr.cols());\n    applyZOnTheLeftInPlace<false>(Z);\n    return Z;\n  }\n\n  /** \\returns a reference to the matrix where the complete orthogonal\n   * decomposition is stored\n   */\n  const MatrixType& matrixQTZ() const { return m_cpqr.matrixQR(); }\n\n  /** \\returns a reference to the matrix where the complete orthogonal\n   * decomposition is stored.\n   * \\warning The strict lower part and \\code cols() - rank() \\endcode right\n   * columns of this matrix contains internal values.\n   * Only the upper triangular part should be referenced. To get it, use\n   * \\code matrixT().template triangularView<Upper>() \\endcode\n   * For rank-deficient matrices, use\n   * \\code\n   * matrixR().topLeftCorner(rank(), rank()).template triangularView<Upper>()\n   * \\endcode\n   */\n  const MatrixType& matrixT() const { return m_cpqr.matrixQR(); }\n\n  template <typename InputType>\n  CompleteOrthogonalDecomposition& compute(const EigenBase<InputType>& matrix) {\n    // Compute the column pivoted QR factorization A P = Q R.\n    m_cpqr.compute(matrix);\n    computeInPlace();\n    return *this;\n  }\n\n  /** \\returns a const reference to the column permutation matrix */\n  const PermutationType& colsPermutation() const {\n    return m_cpqr.colsPermutation();\n  }\n\n  /** \\returns the absolute value of the determinant of the matrix of which\n   * *this is the complete orthogonal decomposition. It has only linear\n   * complexity (that is, O(n) where n is the dimension of the square matrix)\n   * as the complete orthogonal decomposition has already been computed.\n   *\n   * \\note This is only for square matrices.\n   *\n   * \\warning a determinant can be very big or small, so for matrices\n   * of large enough dimension, there is a risk of overflow/underflow.\n   * One way to work around that is to use logAbsDeterminant() instead.\n   *\n   * \\sa logAbsDeterminant(), MatrixBase::determinant()\n   */\n  typename MatrixType::RealScalar absDeterminant() const;\n\n  /** \\returns the natural log of the absolute value of the determinant of the\n   * matrix of which *this is the complete orthogonal decomposition. It has\n   * only linear complexity (that is, O(n) where n is the dimension of the\n   * square matrix) as the complete orthogonal decomposition has already been\n   * computed.\n   *\n   * \\note This is only for square matrices.\n   *\n   * \\note This method is useful to work around the risk of overflow/underflow\n   * that's inherent to determinant computation.\n   *\n   * \\sa absDeterminant(), MatrixBase::determinant()\n   */\n  typename MatrixType::RealScalar logAbsDeterminant() const;\n\n  /** \\returns the rank of the matrix of which *this is the complete orthogonal\n   * decomposition.\n   *\n   * \\note This method has to determine which pivots should be considered\n   * nonzero. For that, it uses the threshold value that you can control by\n   * calling setThreshold(const RealScalar&).\n   */\n  inline Index rank() const { return m_cpqr.rank(); }\n\n  /** \\returns the dimension of the kernel of the matrix of which *this is the\n   * complete orthogonal decomposition.\n   *\n   * \\note This method has to determine which pivots should be considered\n   * nonzero. For that, it uses the threshold value that you can control by\n   * calling setThreshold(const RealScalar&).\n   */\n  inline Index dimensionOfKernel() const { return m_cpqr.dimensionOfKernel(); }\n\n  /** \\returns true if the matrix of which *this is the decomposition represents\n   * an injective linear map, i.e. has trivial kernel; false otherwise.\n   *\n   * \\note This method has to determine which pivots should be considered\n   * nonzero. For that, it uses the threshold value that you can control by\n   * calling setThreshold(const RealScalar&).\n   */\n  inline bool isInjective() const { return m_cpqr.isInjective(); }\n\n  /** \\returns true if the matrix of which *this is the decomposition represents\n   * a surjective linear map; false otherwise.\n   *\n   * \\note This method has to determine which pivots should be considered\n   * nonzero. For that, it uses the threshold value that you can control by\n   * calling setThreshold(const RealScalar&).\n   */\n  inline bool isSurjective() const { return m_cpqr.isSurjective(); }\n\n  /** \\returns true if the matrix of which *this is the complete orthogonal\n   * decomposition is invertible.\n   *\n   * \\note This method has to determine which pivots should be considered\n   * nonzero. For that, it uses the threshold value that you can control by\n   * calling setThreshold(const RealScalar&).\n   */\n  inline bool isInvertible() const { return m_cpqr.isInvertible(); }\n\n  /** \\returns the pseudo-inverse of the matrix of which *this is the complete\n   * orthogonal decomposition.\n   * \\warning: Do not compute \\c this->pseudoInverse()*rhs to solve a linear systems.\n   * It is more efficient and numerically stable to call \\c this->solve(rhs).\n   */\n  inline const Inverse<CompleteOrthogonalDecomposition> pseudoInverse() const\n  {\n    eigen_assert(m_cpqr.m_isInitialized && \"CompleteOrthogonalDecomposition is not initialized.\");\n    return Inverse<CompleteOrthogonalDecomposition>(*this);\n  }\n\n  inline Index rows() const { return m_cpqr.rows(); }\n  inline Index cols() const { return m_cpqr.cols(); }\n\n  /** \\returns a const reference to the vector of Householder coefficients used\n   * to represent the factor \\c Q.\n   *\n   * For advanced uses only.\n   */\n  inline const HCoeffsType& hCoeffs() const { return m_cpqr.hCoeffs(); }\n\n  /** \\returns a const reference to the vector of Householder coefficients\n   * used to represent the factor \\c Z.\n   *\n   * For advanced uses only.\n   */\n  const HCoeffsType& zCoeffs() const { return m_zCoeffs; }\n\n  /** Allows to prescribe a threshold to be used by certain methods, such as\n   * rank(), who need to determine when pivots are to be considered nonzero.\n   * Most be called before calling compute().\n   *\n   * When it needs to get the threshold value, Eigen calls threshold(). By\n   * default, this uses a formula to automatically determine a reasonable\n   * threshold. Once you have called the present method\n   * setThreshold(const RealScalar&), your value is used instead.\n   *\n   * \\param threshold The new value to use as the threshold.\n   *\n   * A pivot will be considered nonzero if its absolute value is strictly\n   * greater than\n   *  \\f$ \\vert pivot \\vert \\leqslant threshold \\times \\vert maxpivot \\vert \\f$\n   * where maxpivot is the biggest pivot.\n   *\n   * If you want to come back to the default behavior, call\n   * setThreshold(Default_t)\n   */\n  CompleteOrthogonalDecomposition& setThreshold(const RealScalar& threshold) {\n    m_cpqr.setThreshold(threshold);\n    return *this;\n  }\n\n  /** Allows to come back to the default behavior, letting Eigen use its default\n   * formula for determining the threshold.\n   *\n   * You should pass the special object Eigen::Default as parameter here.\n   * \\code qr.setThreshold(Eigen::Default); \\endcode\n   *\n   * See the documentation of setThreshold(const RealScalar&).\n   */\n  CompleteOrthogonalDecomposition& setThreshold(Default_t) {\n    m_cpqr.setThreshold(Default);\n    return *this;\n  }\n\n  /** Returns the threshold that will be used by certain methods such as rank().\n   *\n   * See the documentation of setThreshold(const RealScalar&).\n   */\n  RealScalar threshold() const { return m_cpqr.threshold(); }\n\n  /** \\returns the number of nonzero pivots in the complete orthogonal\n   * decomposition. Here nonzero is meant in the exact sense, not in a\n   * fuzzy sense. So that notion isn't really intrinsically interesting,\n   * but it is still useful when implementing algorithms.\n   *\n   * \\sa rank()\n   */\n  inline Index nonzeroPivots() const { return m_cpqr.nonzeroPivots(); }\n\n  /** \\returns the absolute value of the biggest pivot, i.e. the biggest\n   *          diagonal coefficient of R.\n   */\n  inline RealScalar maxPivot() const { return m_cpqr.maxPivot(); }\n\n  /** \\brief Reports whether the complete orthogonal decomposition was\n   * successful.\n   *\n   * \\note This function always returns \\c Success. It is provided for\n   * compatibility\n   * with other factorization routines.\n   * \\returns \\c Success\n   */\n  ComputationInfo info() const {\n    eigen_assert(m_cpqr.m_isInitialized && \"Decomposition is not initialized.\");\n    return Success;\n  }\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\n  template <typename RhsType, typename DstType>\n  void _solve_impl(const RhsType& rhs, DstType& dst) const;\n\n  template<bool Conjugate, typename RhsType, typename DstType>\n  void _solve_impl_transposed(const RhsType &rhs, DstType &dst) const;\n#endif\n\n protected:\n  static void check_template_parameters() {\n    EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar);\n  }\n\n  template<bool Transpose_, typename Rhs>\n  void _check_solve_assertion(const Rhs& b) const {\n      EIGEN_ONLY_USED_FOR_DEBUG(b);\n      eigen_assert(m_cpqr.m_isInitialized && \"CompleteOrthogonalDecomposition is not initialized.\");\n      eigen_assert((Transpose_?derived().cols():derived().rows())==b.rows() && \"CompleteOrthogonalDecomposition::solve(): invalid number of rows of the right hand side matrix b\");\n  }\n\n  void computeInPlace();\n\n  /** Overwrites \\b rhs with \\f$ \\mathbf{Z} * \\mathbf{rhs} \\f$ or\n   *  \\f$ \\mathbf{\\overline Z} * \\mathbf{rhs} \\f$ if \\c Conjugate \n   *  is set to \\c true.\n   */\n  template <bool Conjugate, typename Rhs>\n  void applyZOnTheLeftInPlace(Rhs& rhs) const;\n\n  /** Overwrites \\b rhs with \\f$ \\mathbf{Z}^* * \\mathbf{rhs} \\f$.\n   */\n  template <typename Rhs>\n  void applyZAdjointOnTheLeftInPlace(Rhs& rhs) const;\n\n  ColPivHouseholderQR<MatrixType> m_cpqr;\n  HCoeffsType m_zCoeffs;\n  RowVectorType m_temp;\n};\n\ntemplate <typename MatrixType>\ntypename MatrixType::RealScalar\nCompleteOrthogonalDecomposition<MatrixType>::absDeterminant() const {\n  return m_cpqr.absDeterminant();\n}\n\ntemplate <typename MatrixType>\ntypename MatrixType::RealScalar\nCompleteOrthogonalDecomposition<MatrixType>::logAbsDeterminant() const {\n  return m_cpqr.logAbsDeterminant();\n}\n\n/** Performs the complete orthogonal decomposition of the given matrix \\a\n * matrix. The result of the factorization is stored into \\c *this, and a\n * reference to \\c *this is returned.\n *\n * \\sa class CompleteOrthogonalDecomposition,\n * CompleteOrthogonalDecomposition(const MatrixType&)\n */\ntemplate <typename MatrixType>\nvoid CompleteOrthogonalDecomposition<MatrixType>::computeInPlace()\n{\n  check_template_parameters();\n\n  // the column permutation is stored as int indices, so just to be sure:\n  eigen_assert(m_cpqr.cols() <= NumTraits<int>::highest());\n\n  const Index rank = m_cpqr.rank();\n  const Index cols = m_cpqr.cols();\n  const Index rows = m_cpqr.rows();\n  m_zCoeffs.resize((std::min)(rows, cols));\n  m_temp.resize(cols);\n\n  if (rank < cols) {\n    // We have reduced the (permuted) matrix to the form\n    //   [R11 R12]\n    //   [ 0  R22]\n    // where R11 is r-by-r (r = rank) upper triangular, R12 is\n    // r-by-(n-r), and R22 is empty or the norm of R22 is negligible.\n    // We now compute the complete orthogonal decomposition by applying\n    // Householder transformations from the right to the upper trapezoidal\n    // matrix X = [R11 R12] to zero out R12 and obtain the factorization\n    // [R11 R12] = [T11 0] * Z, where T11 is r-by-r upper triangular and\n    // Z = Z(0) * Z(1) ... Z(r-1) is an n-by-n orthogonal matrix.\n    // We store the data representing Z in R12 and m_zCoeffs.\n    for (Index k = rank - 1; k >= 0; --k) {\n      if (k != rank - 1) {\n        // Given the API for Householder reflectors, it is more convenient if\n        // we swap the leading parts of columns k and r-1 (zero-based) to form\n        // the matrix X_k = [X(0:k, k), X(0:k, r:n)]\n        m_cpqr.m_qr.col(k).head(k + 1).swap(\n            m_cpqr.m_qr.col(rank - 1).head(k + 1));\n      }\n      // Construct Householder reflector Z(k) to zero out the last row of X_k,\n      // i.e. choose Z(k) such that\n      // [X(k, k), X(k, r:n)] * Z(k) = [beta, 0, .., 0].\n      RealScalar beta;\n      m_cpqr.m_qr.row(k)\n          .tail(cols - rank + 1)\n          .makeHouseholderInPlace(m_zCoeffs(k), beta);\n      m_cpqr.m_qr(k, rank - 1) = beta;\n      if (k > 0) {\n        // Apply Z(k) to the first k rows of X_k\n        m_cpqr.m_qr.topRightCorner(k, cols - rank + 1)\n            .applyHouseholderOnTheRight(\n                m_cpqr.m_qr.row(k).tail(cols - rank).adjoint(), m_zCoeffs(k),\n                &m_temp(0));\n      }\n      if (k != rank - 1) {\n        // Swap X(0:k,k) back to its proper location.\n        m_cpqr.m_qr.col(k).head(k + 1).swap(\n            m_cpqr.m_qr.col(rank - 1).head(k + 1));\n      }\n    }\n  }\n}\n\ntemplate <typename MatrixType>\ntemplate <bool Conjugate, typename Rhs>\nvoid CompleteOrthogonalDecomposition<MatrixType>::applyZOnTheLeftInPlace(\n    Rhs& rhs) const {\n  const Index cols = this->cols();\n  const Index nrhs = rhs.cols();\n  const Index rank = this->rank();\n  Matrix<typename Rhs::Scalar, Dynamic, 1> temp((std::max)(cols, nrhs));\n  for (Index k = rank-1; k >= 0; --k) {\n    if (k != rank - 1) {\n      rhs.row(k).swap(rhs.row(rank - 1));\n    }\n    rhs.middleRows(rank - 1, cols - rank + 1)\n        .applyHouseholderOnTheLeft(\n            matrixQTZ().row(k).tail(cols - rank).transpose().template conjugateIf<!Conjugate>(), zCoeffs().template conjugateIf<Conjugate>()(k),\n            &temp(0));\n    if (k != rank - 1) {\n      rhs.row(k).swap(rhs.row(rank - 1));\n    }\n  }\n}\n\ntemplate <typename MatrixType>\ntemplate <typename Rhs>\nvoid CompleteOrthogonalDecomposition<MatrixType>::applyZAdjointOnTheLeftInPlace(\n    Rhs& rhs) const {\n  const Index cols = this->cols();\n  const Index nrhs = rhs.cols();\n  const Index rank = this->rank();\n  Matrix<typename Rhs::Scalar, Dynamic, 1> temp((std::max)(cols, nrhs));\n  for (Index k = 0; k < rank; ++k) {\n    if (k != rank - 1) {\n      rhs.row(k).swap(rhs.row(rank - 1));\n    }\n    rhs.middleRows(rank - 1, cols - rank + 1)\n        .applyHouseholderOnTheLeft(\n            matrixQTZ().row(k).tail(cols - rank).adjoint(), zCoeffs()(k),\n            &temp(0));\n    if (k != rank - 1) {\n      rhs.row(k).swap(rhs.row(rank - 1));\n    }\n  }\n}\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\ntemplate <typename _MatrixType>\ntemplate <typename RhsType, typename DstType>\nvoid CompleteOrthogonalDecomposition<_MatrixType>::_solve_impl(\n    const RhsType& rhs, DstType& dst) const {\n  const Index rank = this->rank();\n  if (rank == 0) {\n    dst.setZero();\n    return;\n  }\n\n  // Compute c = Q^* * rhs\n  typename RhsType::PlainObject c(rhs);\n  c.applyOnTheLeft(matrixQ().setLength(rank).adjoint());\n\n  // Solve T z = c(1:rank, :)\n  dst.topRows(rank) = matrixT()\n                          .topLeftCorner(rank, rank)\n                          .template triangularView<Upper>()\n                          .solve(c.topRows(rank));\n\n  const Index cols = this->cols();\n  if (rank < cols) {\n    // Compute y = Z^* * [ z ]\n    //                   [ 0 ]\n    dst.bottomRows(cols - rank).setZero();\n    applyZAdjointOnTheLeftInPlace(dst);\n  }\n\n  // Undo permutation to get x = P^{-1} * y.\n  dst = colsPermutation() * dst;\n}\n\ntemplate<typename _MatrixType>\ntemplate<bool Conjugate, typename RhsType, typename DstType>\nvoid CompleteOrthogonalDecomposition<_MatrixType>::_solve_impl_transposed(const RhsType &rhs, DstType &dst) const\n{\n  const Index rank = this->rank();\n\n  if (rank == 0) {\n    dst.setZero();\n    return;\n  }\n\n  typename RhsType::PlainObject c(colsPermutation().transpose()*rhs);\n\n  if (rank < cols()) {\n    applyZOnTheLeftInPlace<!Conjugate>(c);\n  }\n\n  matrixT().topLeftCorner(rank, rank)\n           .template triangularView<Upper>()\n           .transpose().template conjugateIf<Conjugate>()\n           .solveInPlace(c.topRows(rank));\n\n  dst.topRows(rank) = c.topRows(rank);\n  dst.bottomRows(rows()-rank).setZero();\n\n  dst.applyOnTheLeft(householderQ().setLength(rank).template conjugateIf<!Conjugate>() );\n}\n#endif\n\nnamespace internal {\n\ntemplate<typename MatrixType>\nstruct traits<Inverse<CompleteOrthogonalDecomposition<MatrixType> > >\n  : traits<typename Transpose<typename MatrixType::PlainObject>::PlainObject>\n{\n  enum { Flags = 0 };\n};\n\ntemplate<typename DstXprType, typename MatrixType>\nstruct Assignment<DstXprType, Inverse<CompleteOrthogonalDecomposition<MatrixType> >, internal::assign_op<typename DstXprType::Scalar,typename CompleteOrthogonalDecomposition<MatrixType>::Scalar>, Dense2Dense>\n{\n  typedef CompleteOrthogonalDecomposition<MatrixType> CodType;\n  typedef Inverse<CodType> SrcXprType;\n  static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op<typename DstXprType::Scalar,typename CodType::Scalar> &)\n  {\n    typedef Matrix<typename CodType::Scalar, CodType::RowsAtCompileTime, CodType::RowsAtCompileTime, 0, CodType::MaxRowsAtCompileTime, CodType::MaxRowsAtCompileTime> IdentityMatrixType;\n    dst = src.nestedExpression().solve(IdentityMatrixType::Identity(src.cols(), src.cols()));\n  }\n};\n\n} // end namespace internal\n\n/** \\returns the matrix Q as a sequence of householder transformations */\ntemplate <typename MatrixType>\ntypename CompleteOrthogonalDecomposition<MatrixType>::HouseholderSequenceType\nCompleteOrthogonalDecomposition<MatrixType>::householderQ() const {\n  return m_cpqr.householderQ();\n}\n\n/** \\return the complete orthogonal decomposition of \\c *this.\n  *\n  * \\sa class CompleteOrthogonalDecomposition\n  */\ntemplate <typename Derived>\nconst CompleteOrthogonalDecomposition<typename MatrixBase<Derived>::PlainObject>\nMatrixBase<Derived>::completeOrthogonalDecomposition() const {\n  return CompleteOrthogonalDecomposition<PlainObject>(eval());\n}\n\n}  // end namespace Eigen\n\n#endif  // EIGEN_COMPLETEORTHOGONALDECOMPOSITION_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/QR/FullPivHouseholderQR.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_FULLPIVOTINGHOUSEHOLDERQR_H\n#define EIGEN_FULLPIVOTINGHOUSEHOLDERQR_H\n\nnamespace Eigen { \n\nnamespace internal {\n\ntemplate<typename _MatrixType> struct traits<FullPivHouseholderQR<_MatrixType> >\n : traits<_MatrixType>\n{\n  typedef MatrixXpr XprKind;\n  typedef SolverStorage StorageKind;\n  typedef int StorageIndex;\n  enum { Flags = 0 };\n};\n\ntemplate<typename MatrixType> struct FullPivHouseholderQRMatrixQReturnType;\n\ntemplate<typename MatrixType>\nstruct traits<FullPivHouseholderQRMatrixQReturnType<MatrixType> >\n{\n  typedef typename MatrixType::PlainObject ReturnType;\n};\n\n} // end namespace internal\n\n/** \\ingroup QR_Module\n  *\n  * \\class FullPivHouseholderQR\n  *\n  * \\brief Householder rank-revealing QR decomposition of a matrix with full pivoting\n  *\n  * \\tparam _MatrixType the type of the matrix of which we are computing the QR decomposition\n  *\n  * This class performs a rank-revealing QR decomposition of a matrix \\b A into matrices \\b P, \\b P', \\b Q and \\b R\n  * such that \n  * \\f[\n  *  \\mathbf{P} \\, \\mathbf{A} \\, \\mathbf{P}' = \\mathbf{Q} \\, \\mathbf{R}\n  * \\f]\n  * by using Householder transformations. Here, \\b P and \\b P' are permutation matrices, \\b Q a unitary matrix \n  * and \\b R an upper triangular matrix.\n  *\n  * This decomposition performs a very prudent full pivoting in order to be rank-revealing and achieve optimal\n  * numerical stability. The trade-off is that it is slower than HouseholderQR and ColPivHouseholderQR.\n  *\n  * This class supports the \\link InplaceDecomposition inplace decomposition \\endlink mechanism.\n  * \n  * \\sa MatrixBase::fullPivHouseholderQr()\n  */\ntemplate<typename _MatrixType> class FullPivHouseholderQR\n        : public SolverBase<FullPivHouseholderQR<_MatrixType> >\n{\n  public:\n\n    typedef _MatrixType MatrixType;\n    typedef SolverBase<FullPivHouseholderQR> Base;\n    friend class SolverBase<FullPivHouseholderQR>;\n\n    EIGEN_GENERIC_PUBLIC_INTERFACE(FullPivHouseholderQR)\n    enum {\n      MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime,\n      MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime\n    };\n    typedef internal::FullPivHouseholderQRMatrixQReturnType<MatrixType> MatrixQReturnType;\n    typedef typename internal::plain_diag_type<MatrixType>::type HCoeffsType;\n    typedef Matrix<StorageIndex, 1,\n                   EIGEN_SIZE_MIN_PREFER_DYNAMIC(ColsAtCompileTime,RowsAtCompileTime), RowMajor, 1,\n                   EIGEN_SIZE_MIN_PREFER_FIXED(MaxColsAtCompileTime,MaxRowsAtCompileTime)> IntDiagSizeVectorType;\n    typedef PermutationMatrix<ColsAtCompileTime, MaxColsAtCompileTime> PermutationType;\n    typedef typename internal::plain_row_type<MatrixType>::type RowVectorType;\n    typedef typename internal::plain_col_type<MatrixType>::type ColVectorType;\n    typedef typename MatrixType::PlainObject PlainObject;\n\n    /** \\brief Default Constructor.\n      *\n      * The default constructor is useful in cases in which the user intends to\n      * perform decompositions via FullPivHouseholderQR::compute(const MatrixType&).\n      */\n    FullPivHouseholderQR()\n      : m_qr(),\n        m_hCoeffs(),\n        m_rows_transpositions(),\n        m_cols_transpositions(),\n        m_cols_permutation(),\n        m_temp(),\n        m_isInitialized(false),\n        m_usePrescribedThreshold(false) {}\n\n    /** \\brief Default Constructor with memory preallocation\n      *\n      * Like the default constructor but with preallocation of the internal data\n      * according to the specified problem \\a size.\n      * \\sa FullPivHouseholderQR()\n      */\n    FullPivHouseholderQR(Index rows, Index cols)\n      : m_qr(rows, cols),\n        m_hCoeffs((std::min)(rows,cols)),\n        m_rows_transpositions((std::min)(rows,cols)),\n        m_cols_transpositions((std::min)(rows,cols)),\n        m_cols_permutation(cols),\n        m_temp(cols),\n        m_isInitialized(false),\n        m_usePrescribedThreshold(false) {}\n\n    /** \\brief Constructs a QR factorization from a given matrix\n      *\n      * This constructor computes the QR factorization of the matrix \\a matrix by calling\n      * the method compute(). It is a short cut for:\n      * \n      * \\code\n      * FullPivHouseholderQR<MatrixType> qr(matrix.rows(), matrix.cols());\n      * qr.compute(matrix);\n      * \\endcode\n      * \n      * \\sa compute()\n      */\n    template<typename InputType>\n    explicit FullPivHouseholderQR(const EigenBase<InputType>& matrix)\n      : m_qr(matrix.rows(), matrix.cols()),\n        m_hCoeffs((std::min)(matrix.rows(), matrix.cols())),\n        m_rows_transpositions((std::min)(matrix.rows(), matrix.cols())),\n        m_cols_transpositions((std::min)(matrix.rows(), matrix.cols())),\n        m_cols_permutation(matrix.cols()),\n        m_temp(matrix.cols()),\n        m_isInitialized(false),\n        m_usePrescribedThreshold(false)\n    {\n      compute(matrix.derived());\n    }\n\n    /** \\brief Constructs a QR factorization from a given matrix\n      *\n      * This overloaded constructor is provided for \\link InplaceDecomposition inplace decomposition \\endlink when \\c MatrixType is a Eigen::Ref.\n      *\n      * \\sa FullPivHouseholderQR(const EigenBase&)\n      */\n    template<typename InputType>\n    explicit FullPivHouseholderQR(EigenBase<InputType>& matrix)\n      : m_qr(matrix.derived()),\n        m_hCoeffs((std::min)(matrix.rows(), matrix.cols())),\n        m_rows_transpositions((std::min)(matrix.rows(), matrix.cols())),\n        m_cols_transpositions((std::min)(matrix.rows(), matrix.cols())),\n        m_cols_permutation(matrix.cols()),\n        m_temp(matrix.cols()),\n        m_isInitialized(false),\n        m_usePrescribedThreshold(false)\n    {\n      computeInPlace();\n    }\n\n    #ifdef EIGEN_PARSED_BY_DOXYGEN\n    /** This method finds a solution x to the equation Ax=b, where A is the matrix of which\n      * \\c *this is the QR decomposition.\n      *\n      * \\param b the right-hand-side of the equation to solve.\n      *\n      * \\returns the exact or least-square solution if the rank is greater or equal to the number of columns of A,\n      * and an arbitrary solution otherwise.\n      *\n      * \\note_about_checking_solutions\n      *\n      * \\note_about_arbitrary_choice_of_solution\n      *\n      * Example: \\include FullPivHouseholderQR_solve.cpp\n      * Output: \\verbinclude FullPivHouseholderQR_solve.out\n      */\n    template<typename Rhs>\n    inline const Solve<FullPivHouseholderQR, Rhs>\n    solve(const MatrixBase<Rhs>& b) const;\n    #endif\n\n    /** \\returns Expression object representing the matrix Q\n      */\n    MatrixQReturnType matrixQ(void) const;\n\n    /** \\returns a reference to the matrix where the Householder QR decomposition is stored\n      */\n    const MatrixType& matrixQR() const\n    {\n      eigen_assert(m_isInitialized && \"FullPivHouseholderQR is not initialized.\");\n      return m_qr;\n    }\n\n    template<typename InputType>\n    FullPivHouseholderQR& compute(const EigenBase<InputType>& matrix);\n\n    /** \\returns a const reference to the column permutation matrix */\n    const PermutationType& colsPermutation() const\n    {\n      eigen_assert(m_isInitialized && \"FullPivHouseholderQR is not initialized.\");\n      return m_cols_permutation;\n    }\n\n    /** \\returns a const reference to the vector of indices representing the rows transpositions */\n    const IntDiagSizeVectorType& rowsTranspositions() const\n    {\n      eigen_assert(m_isInitialized && \"FullPivHouseholderQR is not initialized.\");\n      return m_rows_transpositions;\n    }\n\n    /** \\returns the absolute value of the determinant of the matrix of which\n      * *this is the QR decomposition. It has only linear complexity\n      * (that is, O(n) where n is the dimension of the square matrix)\n      * as the QR decomposition has already been computed.\n      *\n      * \\note This is only for square matrices.\n      *\n      * \\warning a determinant can be very big or small, so for matrices\n      * of large enough dimension, there is a risk of overflow/underflow.\n      * One way to work around that is to use logAbsDeterminant() instead.\n      *\n      * \\sa logAbsDeterminant(), MatrixBase::determinant()\n      */\n    typename MatrixType::RealScalar absDeterminant() const;\n\n    /** \\returns the natural log of the absolute value of the determinant of the matrix of which\n      * *this is the QR decomposition. It has only linear complexity\n      * (that is, O(n) where n is the dimension of the square matrix)\n      * as the QR decomposition has already been computed.\n      *\n      * \\note This is only for square matrices.\n      *\n      * \\note This method is useful to work around the risk of overflow/underflow that's inherent\n      * to determinant computation.\n      *\n      * \\sa absDeterminant(), MatrixBase::determinant()\n      */\n    typename MatrixType::RealScalar logAbsDeterminant() const;\n\n    /** \\returns the rank of the matrix of which *this is the QR decomposition.\n      *\n      * \\note This method has to determine which pivots should be considered nonzero.\n      *       For that, it uses the threshold value that you can control by calling\n      *       setThreshold(const RealScalar&).\n      */\n    inline Index rank() const\n    {\n      using std::abs;\n      eigen_assert(m_isInitialized && \"FullPivHouseholderQR is not initialized.\");\n      RealScalar premultiplied_threshold = abs(m_maxpivot) * threshold();\n      Index result = 0;\n      for(Index i = 0; i < m_nonzero_pivots; ++i)\n        result += (abs(m_qr.coeff(i,i)) > premultiplied_threshold);\n      return result;\n    }\n\n    /** \\returns the dimension of the kernel of the matrix of which *this is the QR decomposition.\n      *\n      * \\note This method has to determine which pivots should be considered nonzero.\n      *       For that, it uses the threshold value that you can control by calling\n      *       setThreshold(const RealScalar&).\n      */\n    inline Index dimensionOfKernel() const\n    {\n      eigen_assert(m_isInitialized && \"FullPivHouseholderQR is not initialized.\");\n      return cols() - rank();\n    }\n\n    /** \\returns true if the matrix of which *this is the QR decomposition represents an injective\n      *          linear map, i.e. has trivial kernel; false otherwise.\n      *\n      * \\note This method has to determine which pivots should be considered nonzero.\n      *       For that, it uses the threshold value that you can control by calling\n      *       setThreshold(const RealScalar&).\n      */\n    inline bool isInjective() const\n    {\n      eigen_assert(m_isInitialized && \"FullPivHouseholderQR is not initialized.\");\n      return rank() == cols();\n    }\n\n    /** \\returns true if the matrix of which *this is the QR decomposition represents a surjective\n      *          linear map; false otherwise.\n      *\n      * \\note This method has to determine which pivots should be considered nonzero.\n      *       For that, it uses the threshold value that you can control by calling\n      *       setThreshold(const RealScalar&).\n      */\n    inline bool isSurjective() const\n    {\n      eigen_assert(m_isInitialized && \"FullPivHouseholderQR is not initialized.\");\n      return rank() == rows();\n    }\n\n    /** \\returns true if the matrix of which *this is the QR decomposition is invertible.\n      *\n      * \\note This method has to determine which pivots should be considered nonzero.\n      *       For that, it uses the threshold value that you can control by calling\n      *       setThreshold(const RealScalar&).\n      */\n    inline bool isInvertible() const\n    {\n      eigen_assert(m_isInitialized && \"FullPivHouseholderQR is not initialized.\");\n      return isInjective() && isSurjective();\n    }\n\n    /** \\returns the inverse of the matrix of which *this is the QR decomposition.\n      *\n      * \\note If this matrix is not invertible, the returned matrix has undefined coefficients.\n      *       Use isInvertible() to first determine whether this matrix is invertible.\n      */\n    inline const Inverse<FullPivHouseholderQR> inverse() const\n    {\n      eigen_assert(m_isInitialized && \"FullPivHouseholderQR is not initialized.\");\n      return Inverse<FullPivHouseholderQR>(*this);\n    }\n\n    inline Index rows() const { return m_qr.rows(); }\n    inline Index cols() const { return m_qr.cols(); }\n    \n    /** \\returns a const reference to the vector of Householder coefficients used to represent the factor \\c Q.\n      * \n      * For advanced uses only.\n      */\n    const HCoeffsType& hCoeffs() const { return m_hCoeffs; }\n\n    /** Allows to prescribe a threshold to be used by certain methods, such as rank(),\n      * who need to determine when pivots are to be considered nonzero. This is not used for the\n      * QR decomposition itself.\n      *\n      * When it needs to get the threshold value, Eigen calls threshold(). By default, this\n      * uses a formula to automatically determine a reasonable threshold.\n      * Once you have called the present method setThreshold(const RealScalar&),\n      * your value is used instead.\n      *\n      * \\param threshold The new value to use as the threshold.\n      *\n      * A pivot will be considered nonzero if its absolute value is strictly greater than\n      *  \\f$ \\vert pivot \\vert \\leqslant threshold \\times \\vert maxpivot \\vert \\f$\n      * where maxpivot is the biggest pivot.\n      *\n      * If you want to come back to the default behavior, call setThreshold(Default_t)\n      */\n    FullPivHouseholderQR& setThreshold(const RealScalar& threshold)\n    {\n      m_usePrescribedThreshold = true;\n      m_prescribedThreshold = threshold;\n      return *this;\n    }\n\n    /** Allows to come back to the default behavior, letting Eigen use its default formula for\n      * determining the threshold.\n      *\n      * You should pass the special object Eigen::Default as parameter here.\n      * \\code qr.setThreshold(Eigen::Default); \\endcode\n      *\n      * See the documentation of setThreshold(const RealScalar&).\n      */\n    FullPivHouseholderQR& setThreshold(Default_t)\n    {\n      m_usePrescribedThreshold = false;\n      return *this;\n    }\n\n    /** Returns the threshold that will be used by certain methods such as rank().\n      *\n      * See the documentation of setThreshold(const RealScalar&).\n      */\n    RealScalar threshold() const\n    {\n      eigen_assert(m_isInitialized || m_usePrescribedThreshold);\n      return m_usePrescribedThreshold ? m_prescribedThreshold\n      // this formula comes from experimenting (see \"LU precision tuning\" thread on the list)\n      // and turns out to be identical to Higham's formula used already in LDLt.\n                                      : NumTraits<Scalar>::epsilon() * RealScalar(m_qr.diagonalSize());\n    }\n\n    /** \\returns the number of nonzero pivots in the QR decomposition.\n      * Here nonzero is meant in the exact sense, not in a fuzzy sense.\n      * So that notion isn't really intrinsically interesting, but it is\n      * still useful when implementing algorithms.\n      *\n      * \\sa rank()\n      */\n    inline Index nonzeroPivots() const\n    {\n      eigen_assert(m_isInitialized && \"LU is not initialized.\");\n      return m_nonzero_pivots;\n    }\n\n    /** \\returns the absolute value of the biggest pivot, i.e. the biggest\n      *          diagonal coefficient of U.\n      */\n    RealScalar maxPivot() const { return m_maxpivot; }\n\n    #ifndef EIGEN_PARSED_BY_DOXYGEN\n    template<typename RhsType, typename DstType>\n    void _solve_impl(const RhsType &rhs, DstType &dst) const;\n\n    template<bool Conjugate, typename RhsType, typename DstType>\n    void _solve_impl_transposed(const RhsType &rhs, DstType &dst) const;\n    #endif\n\n  protected:\n\n    static void check_template_parameters()\n    {\n      EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar);\n    }\n\n    void computeInPlace();\n\n    MatrixType m_qr;\n    HCoeffsType m_hCoeffs;\n    IntDiagSizeVectorType m_rows_transpositions;\n    IntDiagSizeVectorType m_cols_transpositions;\n    PermutationType m_cols_permutation;\n    RowVectorType m_temp;\n    bool m_isInitialized, m_usePrescribedThreshold;\n    RealScalar m_prescribedThreshold, m_maxpivot;\n    Index m_nonzero_pivots;\n    RealScalar m_precision;\n    Index m_det_pq;\n};\n\ntemplate<typename MatrixType>\ntypename MatrixType::RealScalar FullPivHouseholderQR<MatrixType>::absDeterminant() const\n{\n  using std::abs;\n  eigen_assert(m_isInitialized && \"FullPivHouseholderQR is not initialized.\");\n  eigen_assert(m_qr.rows() == m_qr.cols() && \"You can't take the determinant of a non-square matrix!\");\n  return abs(m_qr.diagonal().prod());\n}\n\ntemplate<typename MatrixType>\ntypename MatrixType::RealScalar FullPivHouseholderQR<MatrixType>::logAbsDeterminant() const\n{\n  eigen_assert(m_isInitialized && \"FullPivHouseholderQR is not initialized.\");\n  eigen_assert(m_qr.rows() == m_qr.cols() && \"You can't take the determinant of a non-square matrix!\");\n  return m_qr.diagonal().cwiseAbs().array().log().sum();\n}\n\n/** Performs the QR factorization of the given matrix \\a matrix. The result of\n  * the factorization is stored into \\c *this, and a reference to \\c *this\n  * is returned.\n  *\n  * \\sa class FullPivHouseholderQR, FullPivHouseholderQR(const MatrixType&)\n  */\ntemplate<typename MatrixType>\ntemplate<typename InputType>\nFullPivHouseholderQR<MatrixType>& FullPivHouseholderQR<MatrixType>::compute(const EigenBase<InputType>& matrix)\n{\n  m_qr = matrix.derived();\n  computeInPlace();\n  return *this;\n}\n\ntemplate<typename MatrixType>\nvoid FullPivHouseholderQR<MatrixType>::computeInPlace()\n{\n  check_template_parameters();\n\n  using std::abs;\n  Index rows = m_qr.rows();\n  Index cols = m_qr.cols();\n  Index size = (std::min)(rows,cols);\n\n  \n  m_hCoeffs.resize(size);\n\n  m_temp.resize(cols);\n\n  m_precision = NumTraits<Scalar>::epsilon() * RealScalar(size);\n\n  m_rows_transpositions.resize(size);\n  m_cols_transpositions.resize(size);\n  Index number_of_transpositions = 0;\n\n  RealScalar biggest(0);\n\n  m_nonzero_pivots = size; // the generic case is that in which all pivots are nonzero (invertible case)\n  m_maxpivot = RealScalar(0);\n\n  for (Index k = 0; k < size; ++k)\n  {\n    Index row_of_biggest_in_corner, col_of_biggest_in_corner;\n    typedef internal::scalar_score_coeff_op<Scalar> Scoring;\n    typedef typename Scoring::result_type Score;\n\n    Score score = m_qr.bottomRightCorner(rows-k, cols-k)\n                      .unaryExpr(Scoring())\n                      .maxCoeff(&row_of_biggest_in_corner, &col_of_biggest_in_corner);\n    row_of_biggest_in_corner += k;\n    col_of_biggest_in_corner += k;\n    RealScalar biggest_in_corner = internal::abs_knowing_score<Scalar>()(m_qr(row_of_biggest_in_corner, col_of_biggest_in_corner), score);\n    if(k==0) biggest = biggest_in_corner;\n\n    // if the corner is negligible, then we have less than full rank, and we can finish early\n    if(internal::isMuchSmallerThan(biggest_in_corner, biggest, m_precision))\n    {\n      m_nonzero_pivots = k;\n      for(Index i = k; i < size; i++)\n      {\n        m_rows_transpositions.coeffRef(i) = internal::convert_index<StorageIndex>(i);\n        m_cols_transpositions.coeffRef(i) = internal::convert_index<StorageIndex>(i);\n        m_hCoeffs.coeffRef(i) = Scalar(0);\n      }\n      break;\n    }\n\n    m_rows_transpositions.coeffRef(k) = internal::convert_index<StorageIndex>(row_of_biggest_in_corner);\n    m_cols_transpositions.coeffRef(k) = internal::convert_index<StorageIndex>(col_of_biggest_in_corner);\n    if(k != row_of_biggest_in_corner) {\n      m_qr.row(k).tail(cols-k).swap(m_qr.row(row_of_biggest_in_corner).tail(cols-k));\n      ++number_of_transpositions;\n    }\n    if(k != col_of_biggest_in_corner) {\n      m_qr.col(k).swap(m_qr.col(col_of_biggest_in_corner));\n      ++number_of_transpositions;\n    }\n\n    RealScalar beta;\n    m_qr.col(k).tail(rows-k).makeHouseholderInPlace(m_hCoeffs.coeffRef(k), beta);\n    m_qr.coeffRef(k,k) = beta;\n\n    // remember the maximum absolute value of diagonal coefficients\n    if(abs(beta) > m_maxpivot) m_maxpivot = abs(beta);\n\n    m_qr.bottomRightCorner(rows-k, cols-k-1)\n        .applyHouseholderOnTheLeft(m_qr.col(k).tail(rows-k-1), m_hCoeffs.coeffRef(k), &m_temp.coeffRef(k+1));\n  }\n\n  m_cols_permutation.setIdentity(cols);\n  for(Index k = 0; k < size; ++k)\n    m_cols_permutation.applyTranspositionOnTheRight(k, m_cols_transpositions.coeff(k));\n\n  m_det_pq = (number_of_transpositions%2) ? -1 : 1;\n  m_isInitialized = true;\n}\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\ntemplate<typename _MatrixType>\ntemplate<typename RhsType, typename DstType>\nvoid FullPivHouseholderQR<_MatrixType>::_solve_impl(const RhsType &rhs, DstType &dst) const\n{\n  const Index l_rank = rank();\n\n  // FIXME introduce nonzeroPivots() and use it here. and more generally,\n  // make the same improvements in this dec as in FullPivLU.\n  if(l_rank==0)\n  {\n    dst.setZero();\n    return;\n  }\n\n  typename RhsType::PlainObject c(rhs);\n\n  Matrix<typename RhsType::Scalar,1,RhsType::ColsAtCompileTime> temp(rhs.cols());\n  for (Index k = 0; k < l_rank; ++k)\n  {\n    Index remainingSize = rows()-k;\n    c.row(k).swap(c.row(m_rows_transpositions.coeff(k)));\n    c.bottomRightCorner(remainingSize, rhs.cols())\n      .applyHouseholderOnTheLeft(m_qr.col(k).tail(remainingSize-1),\n                               m_hCoeffs.coeff(k), &temp.coeffRef(0));\n  }\n\n  m_qr.topLeftCorner(l_rank, l_rank)\n      .template triangularView<Upper>()\n      .solveInPlace(c.topRows(l_rank));\n\n  for(Index i = 0; i < l_rank; ++i) dst.row(m_cols_permutation.indices().coeff(i)) = c.row(i);\n  for(Index i = l_rank; i < cols(); ++i) dst.row(m_cols_permutation.indices().coeff(i)).setZero();\n}\n\ntemplate<typename _MatrixType>\ntemplate<bool Conjugate, typename RhsType, typename DstType>\nvoid FullPivHouseholderQR<_MatrixType>::_solve_impl_transposed(const RhsType &rhs, DstType &dst) const\n{\n  const Index l_rank = rank();\n\n  if(l_rank == 0)\n  {\n    dst.setZero();\n    return;\n  }\n\n  typename RhsType::PlainObject c(m_cols_permutation.transpose()*rhs);\n\n  m_qr.topLeftCorner(l_rank, l_rank)\n         .template triangularView<Upper>()\n         .transpose().template conjugateIf<Conjugate>()\n         .solveInPlace(c.topRows(l_rank));\n\n  dst.topRows(l_rank) = c.topRows(l_rank);\n  dst.bottomRows(rows()-l_rank).setZero();\n\n  Matrix<Scalar, 1, DstType::ColsAtCompileTime> temp(dst.cols());\n  const Index size = (std::min)(rows(), cols());\n  for (Index k = size-1; k >= 0; --k)\n  {\n    Index remainingSize = rows()-k;\n\n    dst.bottomRightCorner(remainingSize, dst.cols())\n       .applyHouseholderOnTheLeft(m_qr.col(k).tail(remainingSize-1).template conjugateIf<!Conjugate>(),\n                                  m_hCoeffs.template conjugateIf<Conjugate>().coeff(k), &temp.coeffRef(0));\n\n    dst.row(k).swap(dst.row(m_rows_transpositions.coeff(k)));\n  }\n}\n#endif\n\nnamespace internal {\n  \ntemplate<typename DstXprType, typename MatrixType>\nstruct Assignment<DstXprType, Inverse<FullPivHouseholderQR<MatrixType> >, internal::assign_op<typename DstXprType::Scalar,typename FullPivHouseholderQR<MatrixType>::Scalar>, Dense2Dense>\n{\n  typedef FullPivHouseholderQR<MatrixType> QrType;\n  typedef Inverse<QrType> SrcXprType;\n  static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op<typename DstXprType::Scalar,typename QrType::Scalar> &)\n  {    \n    dst = src.nestedExpression().solve(MatrixType::Identity(src.rows(), src.cols()));\n  }\n};\n\n/** \\ingroup QR_Module\n  *\n  * \\brief Expression type for return value of FullPivHouseholderQR::matrixQ()\n  *\n  * \\tparam MatrixType type of underlying dense matrix\n  */\ntemplate<typename MatrixType> struct FullPivHouseholderQRMatrixQReturnType\n  : public ReturnByValue<FullPivHouseholderQRMatrixQReturnType<MatrixType> >\n{\npublic:\n  typedef typename FullPivHouseholderQR<MatrixType>::IntDiagSizeVectorType IntDiagSizeVectorType;\n  typedef typename internal::plain_diag_type<MatrixType>::type HCoeffsType;\n  typedef Matrix<typename MatrixType::Scalar, 1, MatrixType::RowsAtCompileTime, RowMajor, 1,\n                 MatrixType::MaxRowsAtCompileTime> WorkVectorType;\n\n  FullPivHouseholderQRMatrixQReturnType(const MatrixType&       qr,\n                                        const HCoeffsType&      hCoeffs,\n                                        const IntDiagSizeVectorType& rowsTranspositions)\n    : m_qr(qr),\n      m_hCoeffs(hCoeffs),\n      m_rowsTranspositions(rowsTranspositions)\n  {}\n\n  template <typename ResultType>\n  void evalTo(ResultType& result) const\n  {\n    const Index rows = m_qr.rows();\n    WorkVectorType workspace(rows);\n    evalTo(result, workspace);\n  }\n\n  template <typename ResultType>\n  void evalTo(ResultType& result, WorkVectorType& workspace) const\n  {\n    using numext::conj;\n    // compute the product H'_0 H'_1 ... H'_n-1,\n    // where H_k is the k-th Householder transformation I - h_k v_k v_k'\n    // and v_k is the k-th Householder vector [1,m_qr(k+1,k), m_qr(k+2,k), ...]\n    const Index rows = m_qr.rows();\n    const Index cols = m_qr.cols();\n    const Index size = (std::min)(rows, cols);\n    workspace.resize(rows);\n    result.setIdentity(rows, rows);\n    for (Index k = size-1; k >= 0; k--)\n    {\n      result.block(k, k, rows-k, rows-k)\n            .applyHouseholderOnTheLeft(m_qr.col(k).tail(rows-k-1), conj(m_hCoeffs.coeff(k)), &workspace.coeffRef(k));\n      result.row(k).swap(result.row(m_rowsTranspositions.coeff(k)));\n    }\n  }\n\n  Index rows() const { return m_qr.rows(); }\n  Index cols() const { return m_qr.rows(); }\n\nprotected:\n  typename MatrixType::Nested m_qr;\n  typename HCoeffsType::Nested m_hCoeffs;\n  typename IntDiagSizeVectorType::Nested m_rowsTranspositions;\n};\n\n// template<typename MatrixType>\n// struct evaluator<FullPivHouseholderQRMatrixQReturnType<MatrixType> >\n//  : public evaluator<ReturnByValue<FullPivHouseholderQRMatrixQReturnType<MatrixType> > >\n// {};\n\n} // end namespace internal\n\ntemplate<typename MatrixType>\ninline typename FullPivHouseholderQR<MatrixType>::MatrixQReturnType FullPivHouseholderQR<MatrixType>::matrixQ() const\n{\n  eigen_assert(m_isInitialized && \"FullPivHouseholderQR is not initialized.\");\n  return MatrixQReturnType(m_qr, m_hCoeffs, m_rows_transpositions);\n}\n\n/** \\return the full-pivoting Householder QR decomposition of \\c *this.\n  *\n  * \\sa class FullPivHouseholderQR\n  */\ntemplate<typename Derived>\nconst FullPivHouseholderQR<typename MatrixBase<Derived>::PlainObject>\nMatrixBase<Derived>::fullPivHouseholderQr() const\n{\n  return FullPivHouseholderQR<PlainObject>(eval());\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_FULLPIVOTINGHOUSEHOLDERQR_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/QR/HouseholderQR.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2010 Vincent Lejeune\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_QR_H\n#define EIGEN_QR_H\n\nnamespace Eigen { \n\nnamespace internal {\ntemplate<typename _MatrixType> struct traits<HouseholderQR<_MatrixType> >\n : traits<_MatrixType>\n{\n  typedef MatrixXpr XprKind;\n  typedef SolverStorage StorageKind;\n  typedef int StorageIndex;\n  enum { Flags = 0 };\n};\n\n} // end namespace internal\n\n/** \\ingroup QR_Module\n  *\n  *\n  * \\class HouseholderQR\n  *\n  * \\brief Householder QR decomposition of a matrix\n  *\n  * \\tparam _MatrixType the type of the matrix of which we are computing the QR decomposition\n  *\n  * This class performs a QR decomposition of a matrix \\b A into matrices \\b Q and \\b R\n  * such that \n  * \\f[\n  *  \\mathbf{A} = \\mathbf{Q} \\, \\mathbf{R}\n  * \\f]\n  * by using Householder transformations. Here, \\b Q a unitary matrix and \\b R an upper triangular matrix.\n  * The result is stored in a compact way compatible with LAPACK.\n  *\n  * Note that no pivoting is performed. This is \\b not a rank-revealing decomposition.\n  * If you want that feature, use FullPivHouseholderQR or ColPivHouseholderQR instead.\n  *\n  * This Householder QR decomposition is faster, but less numerically stable and less feature-full than\n  * FullPivHouseholderQR or ColPivHouseholderQR.\n  *\n  * This class supports the \\link InplaceDecomposition inplace decomposition \\endlink mechanism.\n  *\n  * \\sa MatrixBase::householderQr()\n  */\ntemplate<typename _MatrixType> class HouseholderQR\n        : public SolverBase<HouseholderQR<_MatrixType> >\n{\n  public:\n\n    typedef _MatrixType MatrixType;\n    typedef SolverBase<HouseholderQR> Base;\n    friend class SolverBase<HouseholderQR>;\n\n    EIGEN_GENERIC_PUBLIC_INTERFACE(HouseholderQR)\n    enum {\n      MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime,\n      MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime\n    };\n    typedef Matrix<Scalar, RowsAtCompileTime, RowsAtCompileTime, (MatrixType::Flags&RowMajorBit) ? RowMajor : ColMajor, MaxRowsAtCompileTime, MaxRowsAtCompileTime> MatrixQType;\n    typedef typename internal::plain_diag_type<MatrixType>::type HCoeffsType;\n    typedef typename internal::plain_row_type<MatrixType>::type RowVectorType;\n    typedef HouseholderSequence<MatrixType,typename internal::remove_all<typename HCoeffsType::ConjugateReturnType>::type> HouseholderSequenceType;\n\n    /**\n      * \\brief Default Constructor.\n      *\n      * The default constructor is useful in cases in which the user intends to\n      * perform decompositions via HouseholderQR::compute(const MatrixType&).\n      */\n    HouseholderQR() : m_qr(), m_hCoeffs(), m_temp(), m_isInitialized(false) {}\n\n    /** \\brief Default Constructor with memory preallocation\n      *\n      * Like the default constructor but with preallocation of the internal data\n      * according to the specified problem \\a size.\n      * \\sa HouseholderQR()\n      */\n    HouseholderQR(Index rows, Index cols)\n      : m_qr(rows, cols),\n        m_hCoeffs((std::min)(rows,cols)),\n        m_temp(cols),\n        m_isInitialized(false) {}\n\n    /** \\brief Constructs a QR factorization from a given matrix\n      *\n      * This constructor computes the QR factorization of the matrix \\a matrix by calling\n      * the method compute(). It is a short cut for:\n      * \n      * \\code\n      * HouseholderQR<MatrixType> qr(matrix.rows(), matrix.cols());\n      * qr.compute(matrix);\n      * \\endcode\n      * \n      * \\sa compute()\n      */\n    template<typename InputType>\n    explicit HouseholderQR(const EigenBase<InputType>& matrix)\n      : m_qr(matrix.rows(), matrix.cols()),\n        m_hCoeffs((std::min)(matrix.rows(),matrix.cols())),\n        m_temp(matrix.cols()),\n        m_isInitialized(false)\n    {\n      compute(matrix.derived());\n    }\n\n\n    /** \\brief Constructs a QR factorization from a given matrix\n      *\n      * This overloaded constructor is provided for \\link InplaceDecomposition inplace decomposition \\endlink when\n      * \\c MatrixType is a Eigen::Ref.\n      *\n      * \\sa HouseholderQR(const EigenBase&)\n      */\n    template<typename InputType>\n    explicit HouseholderQR(EigenBase<InputType>& matrix)\n      : m_qr(matrix.derived()),\n        m_hCoeffs((std::min)(matrix.rows(),matrix.cols())),\n        m_temp(matrix.cols()),\n        m_isInitialized(false)\n    {\n      computeInPlace();\n    }\n\n    #ifdef EIGEN_PARSED_BY_DOXYGEN\n    /** This method finds a solution x to the equation Ax=b, where A is the matrix of which\n      * *this is the QR decomposition, if any exists.\n      *\n      * \\param b the right-hand-side of the equation to solve.\n      *\n      * \\returns a solution.\n      *\n      * \\note_about_checking_solutions\n      *\n      * \\note_about_arbitrary_choice_of_solution\n      *\n      * Example: \\include HouseholderQR_solve.cpp\n      * Output: \\verbinclude HouseholderQR_solve.out\n      */\n    template<typename Rhs>\n    inline const Solve<HouseholderQR, Rhs>\n    solve(const MatrixBase<Rhs>& b) const;\n    #endif\n\n    /** This method returns an expression of the unitary matrix Q as a sequence of Householder transformations.\n      *\n      * The returned expression can directly be used to perform matrix products. It can also be assigned to a dense Matrix object.\n      * Here is an example showing how to recover the full or thin matrix Q, as well as how to perform matrix products using operator*:\n      *\n      * Example: \\include HouseholderQR_householderQ.cpp\n      * Output: \\verbinclude HouseholderQR_householderQ.out\n      */\n    HouseholderSequenceType householderQ() const\n    {\n      eigen_assert(m_isInitialized && \"HouseholderQR is not initialized.\");\n      return HouseholderSequenceType(m_qr, m_hCoeffs.conjugate());\n    }\n\n    /** \\returns a reference to the matrix where the Householder QR decomposition is stored\n      * in a LAPACK-compatible way.\n      */\n    const MatrixType& matrixQR() const\n    {\n        eigen_assert(m_isInitialized && \"HouseholderQR is not initialized.\");\n        return m_qr;\n    }\n\n    template<typename InputType>\n    HouseholderQR& compute(const EigenBase<InputType>& matrix) {\n      m_qr = matrix.derived();\n      computeInPlace();\n      return *this;\n    }\n\n    /** \\returns the absolute value of the determinant of the matrix of which\n      * *this is the QR decomposition. It has only linear complexity\n      * (that is, O(n) where n is the dimension of the square matrix)\n      * as the QR decomposition has already been computed.\n      *\n      * \\note This is only for square matrices.\n      *\n      * \\warning a determinant can be very big or small, so for matrices\n      * of large enough dimension, there is a risk of overflow/underflow.\n      * One way to work around that is to use logAbsDeterminant() instead.\n      *\n      * \\sa logAbsDeterminant(), MatrixBase::determinant()\n      */\n    typename MatrixType::RealScalar absDeterminant() const;\n\n    /** \\returns the natural log of the absolute value of the determinant of the matrix of which\n      * *this is the QR decomposition. It has only linear complexity\n      * (that is, O(n) where n is the dimension of the square matrix)\n      * as the QR decomposition has already been computed.\n      *\n      * \\note This is only for square matrices.\n      *\n      * \\note This method is useful to work around the risk of overflow/underflow that's inherent\n      * to determinant computation.\n      *\n      * \\sa absDeterminant(), MatrixBase::determinant()\n      */\n    typename MatrixType::RealScalar logAbsDeterminant() const;\n\n    inline Index rows() const { return m_qr.rows(); }\n    inline Index cols() const { return m_qr.cols(); }\n\n    /** \\returns a const reference to the vector of Householder coefficients used to represent the factor \\c Q.\n      * \n      * For advanced uses only.\n      */\n    const HCoeffsType& hCoeffs() const { return m_hCoeffs; }\n\n    #ifndef EIGEN_PARSED_BY_DOXYGEN\n    template<typename RhsType, typename DstType>\n    void _solve_impl(const RhsType &rhs, DstType &dst) const;\n\n    template<bool Conjugate, typename RhsType, typename DstType>\n    void _solve_impl_transposed(const RhsType &rhs, DstType &dst) const;\n    #endif\n\n  protected:\n\n    static void check_template_parameters()\n    {\n      EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar);\n    }\n\n    void computeInPlace();\n\n    MatrixType m_qr;\n    HCoeffsType m_hCoeffs;\n    RowVectorType m_temp;\n    bool m_isInitialized;\n};\n\ntemplate<typename MatrixType>\ntypename MatrixType::RealScalar HouseholderQR<MatrixType>::absDeterminant() const\n{\n  using std::abs;\n  eigen_assert(m_isInitialized && \"HouseholderQR is not initialized.\");\n  eigen_assert(m_qr.rows() == m_qr.cols() && \"You can't take the determinant of a non-square matrix!\");\n  return abs(m_qr.diagonal().prod());\n}\n\ntemplate<typename MatrixType>\ntypename MatrixType::RealScalar HouseholderQR<MatrixType>::logAbsDeterminant() const\n{\n  eigen_assert(m_isInitialized && \"HouseholderQR is not initialized.\");\n  eigen_assert(m_qr.rows() == m_qr.cols() && \"You can't take the determinant of a non-square matrix!\");\n  return m_qr.diagonal().cwiseAbs().array().log().sum();\n}\n\nnamespace internal {\n\n/** \\internal */\ntemplate<typename MatrixQR, typename HCoeffs>\nvoid householder_qr_inplace_unblocked(MatrixQR& mat, HCoeffs& hCoeffs, typename MatrixQR::Scalar* tempData = 0)\n{\n  typedef typename MatrixQR::Scalar Scalar;\n  typedef typename MatrixQR::RealScalar RealScalar;\n  Index rows = mat.rows();\n  Index cols = mat.cols();\n  Index size = (std::min)(rows,cols);\n\n  eigen_assert(hCoeffs.size() == size);\n\n  typedef Matrix<Scalar,MatrixQR::ColsAtCompileTime,1> TempType;\n  TempType tempVector;\n  if(tempData==0)\n  {\n    tempVector.resize(cols);\n    tempData = tempVector.data();\n  }\n\n  for(Index k = 0; k < size; ++k)\n  {\n    Index remainingRows = rows - k;\n    Index remainingCols = cols - k - 1;\n\n    RealScalar beta;\n    mat.col(k).tail(remainingRows).makeHouseholderInPlace(hCoeffs.coeffRef(k), beta);\n    mat.coeffRef(k,k) = beta;\n\n    // apply H to remaining part of m_qr from the left\n    mat.bottomRightCorner(remainingRows, remainingCols)\n        .applyHouseholderOnTheLeft(mat.col(k).tail(remainingRows-1), hCoeffs.coeffRef(k), tempData+k+1);\n  }\n}\n\n/** \\internal */\ntemplate<typename MatrixQR, typename HCoeffs,\n  typename MatrixQRScalar = typename MatrixQR::Scalar,\n  bool InnerStrideIsOne = (MatrixQR::InnerStrideAtCompileTime == 1 && HCoeffs::InnerStrideAtCompileTime == 1)>\nstruct householder_qr_inplace_blocked\n{\n  // This is specialized for LAPACK-supported Scalar types in HouseholderQR_LAPACKE.h\n  static void run(MatrixQR& mat, HCoeffs& hCoeffs, Index maxBlockSize=32,\n      typename MatrixQR::Scalar* tempData = 0)\n  {\n    typedef typename MatrixQR::Scalar Scalar;\n    typedef Block<MatrixQR,Dynamic,Dynamic> BlockType;\n\n    Index rows = mat.rows();\n    Index cols = mat.cols();\n    Index size = (std::min)(rows, cols);\n\n    typedef Matrix<Scalar,Dynamic,1,ColMajor,MatrixQR::MaxColsAtCompileTime,1> TempType;\n    TempType tempVector;\n    if(tempData==0)\n    {\n      tempVector.resize(cols);\n      tempData = tempVector.data();\n    }\n\n    Index blockSize = (std::min)(maxBlockSize,size);\n\n    Index k = 0;\n    for (k = 0; k < size; k += blockSize)\n    {\n      Index bs = (std::min)(size-k,blockSize);  // actual size of the block\n      Index tcols = cols - k - bs;              // trailing columns\n      Index brows = rows-k;                     // rows of the block\n\n      // partition the matrix:\n      //        A00 | A01 | A02\n      // mat  = A10 | A11 | A12\n      //        A20 | A21 | A22\n      // and performs the qr dec of [A11^T A12^T]^T\n      // and update [A21^T A22^T]^T using level 3 operations.\n      // Finally, the algorithm continue on A22\n\n      BlockType A11_21 = mat.block(k,k,brows,bs);\n      Block<HCoeffs,Dynamic,1> hCoeffsSegment = hCoeffs.segment(k,bs);\n\n      householder_qr_inplace_unblocked(A11_21, hCoeffsSegment, tempData);\n\n      if(tcols)\n      {\n        BlockType A21_22 = mat.block(k,k+bs,brows,tcols);\n        apply_block_householder_on_the_left(A21_22,A11_21,hCoeffsSegment, false); // false == backward\n      }\n    }\n  }\n};\n\n} // end namespace internal\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\ntemplate<typename _MatrixType>\ntemplate<typename RhsType, typename DstType>\nvoid HouseholderQR<_MatrixType>::_solve_impl(const RhsType &rhs, DstType &dst) const\n{\n  const Index rank = (std::min)(rows(), cols());\n\n  typename RhsType::PlainObject c(rhs);\n\n  c.applyOnTheLeft(householderQ().setLength(rank).adjoint() );\n\n  m_qr.topLeftCorner(rank, rank)\n      .template triangularView<Upper>()\n      .solveInPlace(c.topRows(rank));\n\n  dst.topRows(rank) = c.topRows(rank);\n  dst.bottomRows(cols()-rank).setZero();\n}\n\ntemplate<typename _MatrixType>\ntemplate<bool Conjugate, typename RhsType, typename DstType>\nvoid HouseholderQR<_MatrixType>::_solve_impl_transposed(const RhsType &rhs, DstType &dst) const\n{\n  const Index rank = (std::min)(rows(), cols());\n\n  typename RhsType::PlainObject c(rhs);\n\n  m_qr.topLeftCorner(rank, rank)\n      .template triangularView<Upper>()\n      .transpose().template conjugateIf<Conjugate>()\n      .solveInPlace(c.topRows(rank));\n\n  dst.topRows(rank) = c.topRows(rank);\n  dst.bottomRows(rows()-rank).setZero();\n\n  dst.applyOnTheLeft(householderQ().setLength(rank).template conjugateIf<!Conjugate>() );\n}\n#endif\n\n/** Performs the QR factorization of the given matrix \\a matrix. The result of\n  * the factorization is stored into \\c *this, and a reference to \\c *this\n  * is returned.\n  *\n  * \\sa class HouseholderQR, HouseholderQR(const MatrixType&)\n  */\ntemplate<typename MatrixType>\nvoid HouseholderQR<MatrixType>::computeInPlace()\n{\n  check_template_parameters();\n  \n  Index rows = m_qr.rows();\n  Index cols = m_qr.cols();\n  Index size = (std::min)(rows,cols);\n\n  m_hCoeffs.resize(size);\n\n  m_temp.resize(cols);\n\n  internal::householder_qr_inplace_blocked<MatrixType, HCoeffsType>::run(m_qr, m_hCoeffs, 48, m_temp.data());\n\n  m_isInitialized = true;\n}\n\n/** \\return the Householder QR decomposition of \\c *this.\n  *\n  * \\sa class HouseholderQR\n  */\ntemplate<typename Derived>\nconst HouseholderQR<typename MatrixBase<Derived>::PlainObject>\nMatrixBase<Derived>::householderQr() const\n{\n  return HouseholderQR<PlainObject>(eval());\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_QR_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/QR/HouseholderQR_LAPACKE.h",
    "content": "/*\n Copyright (c) 2011, Intel Corporation. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without modification,\n are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n   list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n * Neither the name of Intel Corporation nor the names of its contributors may\n   be used to endorse or promote products derived from this software without\n   specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\n ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n ********************************************************************************\n *   Content : Eigen bindings to LAPACKe\n *    Householder QR decomposition of a matrix w/o pivoting based on\n *    LAPACKE_?geqrf function.\n ********************************************************************************\n*/\n\n#ifndef EIGEN_QR_LAPACKE_H\n#define EIGEN_QR_LAPACKE_H\n\nnamespace Eigen { \n\nnamespace internal {\n\n/** \\internal Specialization for the data types supported by LAPACKe */\n\n#define EIGEN_LAPACKE_QR_NOPIV(EIGTYPE, LAPACKE_TYPE, LAPACKE_PREFIX) \\\ntemplate<typename MatrixQR, typename HCoeffs> \\\nstruct householder_qr_inplace_blocked<MatrixQR, HCoeffs, EIGTYPE, true> \\\n{ \\\n  static void run(MatrixQR& mat, HCoeffs& hCoeffs, Index = 32, \\\n      typename MatrixQR::Scalar* = 0) \\\n  { \\\n    lapack_int m = (lapack_int) mat.rows(); \\\n    lapack_int n = (lapack_int) mat.cols(); \\\n    lapack_int lda = (lapack_int) mat.outerStride(); \\\n    lapack_int matrix_order = (MatrixQR::IsRowMajor) ? LAPACK_ROW_MAJOR : LAPACK_COL_MAJOR; \\\n    LAPACKE_##LAPACKE_PREFIX##geqrf( matrix_order, m, n, (LAPACKE_TYPE*)mat.data(), lda, (LAPACKE_TYPE*)hCoeffs.data()); \\\n    hCoeffs.adjointInPlace(); \\\n  } \\\n};\n\nEIGEN_LAPACKE_QR_NOPIV(double, double, d)\nEIGEN_LAPACKE_QR_NOPIV(float, float, s)\nEIGEN_LAPACKE_QR_NOPIV(dcomplex, lapack_complex_double, z)\nEIGEN_LAPACKE_QR_NOPIV(scomplex, lapack_complex_float, c)\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_QR_LAPACKE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Desire Nuentsa <desire.nuentsa_wakam@inria.fr>\n// Copyright (C) 2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SUITESPARSEQRSUPPORT_H\n#define EIGEN_SUITESPARSEQRSUPPORT_H\n\nnamespace Eigen {\n  \n  template<typename MatrixType> class SPQR; \n  template<typename SPQRType> struct SPQRMatrixQReturnType; \n  template<typename SPQRType> struct SPQRMatrixQTransposeReturnType; \n  template <typename SPQRType, typename Derived> struct SPQR_QProduct;\n  namespace internal {\n    template <typename SPQRType> struct traits<SPQRMatrixQReturnType<SPQRType> >\n    {\n      typedef typename SPQRType::MatrixType ReturnType;\n    };\n    template <typename SPQRType> struct traits<SPQRMatrixQTransposeReturnType<SPQRType> >\n    {\n      typedef typename SPQRType::MatrixType ReturnType;\n    };\n    template <typename SPQRType, typename Derived> struct traits<SPQR_QProduct<SPQRType, Derived> >\n    {\n      typedef typename Derived::PlainObject ReturnType;\n    };\n  } // End namespace internal\n  \n/**\n  * \\ingroup SPQRSupport_Module\n  * \\class SPQR\n  * \\brief Sparse QR factorization based on SuiteSparseQR library\n  *\n  * This class is used to perform a multithreaded and multifrontal rank-revealing QR decomposition\n  * of sparse matrices. The result is then used to solve linear leasts_square systems.\n  * Clearly, a QR factorization is returned such that A*P = Q*R where :\n  *\n  * P is the column permutation. Use colsPermutation() to get it.\n  *\n  * Q is the orthogonal matrix represented as Householder reflectors.\n  * Use matrixQ() to get an expression and matrixQ().transpose() to get the transpose.\n  * You can then apply it to a vector.\n  *\n  * R is the sparse triangular factor. Use matrixQR() to get it as SparseMatrix.\n  * NOTE : The Index type of R is always SuiteSparse_long. You can get it with SPQR::Index\n  *\n  * \\tparam _MatrixType The type of the sparse matrix A, must be a column-major SparseMatrix<>\n  *\n  * \\implsparsesolverconcept\n  *\n  *\n  */\ntemplate<typename _MatrixType>\nclass SPQR : public SparseSolverBase<SPQR<_MatrixType> >\n{\n  protected:\n    typedef SparseSolverBase<SPQR<_MatrixType> > Base;\n    using Base::m_isInitialized;\n  public:\n    typedef typename _MatrixType::Scalar Scalar;\n    typedef typename _MatrixType::RealScalar RealScalar;\n    typedef SuiteSparse_long StorageIndex ;\n    typedef SparseMatrix<Scalar, ColMajor, StorageIndex> MatrixType;\n    typedef Map<PermutationMatrix<Dynamic, Dynamic, StorageIndex> > PermutationType;\n    enum {\n      ColsAtCompileTime = Dynamic,\n      MaxColsAtCompileTime = Dynamic\n    };\n  public:\n    SPQR() \n      : m_analysisIsOk(false),\n        m_factorizationIsOk(false),\n        m_isRUpToDate(false),\n        m_ordering(SPQR_ORDERING_DEFAULT),\n        m_allow_tol(SPQR_DEFAULT_TOL),\n        m_tolerance (NumTraits<Scalar>::epsilon()),\n        m_cR(0),\n        m_E(0),\n        m_H(0),\n        m_HPinv(0),\n        m_HTau(0),\n        m_useDefaultThreshold(true)\n    { \n      cholmod_l_start(&m_cc);\n    }\n    \n    explicit SPQR(const _MatrixType& matrix)\n      : m_analysisIsOk(false),\n        m_factorizationIsOk(false),\n        m_isRUpToDate(false),\n        m_ordering(SPQR_ORDERING_DEFAULT),\n        m_allow_tol(SPQR_DEFAULT_TOL),\n        m_tolerance (NumTraits<Scalar>::epsilon()),\n        m_cR(0),\n        m_E(0),\n        m_H(0),\n        m_HPinv(0),\n        m_HTau(0),\n        m_useDefaultThreshold(true)\n    {\n      cholmod_l_start(&m_cc);\n      compute(matrix);\n    }\n    \n    ~SPQR()\n    {\n      SPQR_free();\n      cholmod_l_finish(&m_cc);\n    }\n    void SPQR_free()\n    {\n      cholmod_l_free_sparse(&m_H, &m_cc);\n      cholmod_l_free_sparse(&m_cR, &m_cc);\n      cholmod_l_free_dense(&m_HTau, &m_cc);\n      std::free(m_E);\n      std::free(m_HPinv);\n    }\n\n    void compute(const _MatrixType& matrix)\n    {\n      if(m_isInitialized) SPQR_free();\n\n      MatrixType mat(matrix);\n      \n      /* Compute the default threshold as in MatLab, see:\n       * Tim Davis, \"Algorithm 915, SuiteSparseQR: Multifrontal Multithreaded Rank-Revealing\n       * Sparse QR Factorization, ACM Trans. on Math. Soft. 38(1), 2011, Page 8:3 \n       */\n      RealScalar pivotThreshold = m_tolerance;\n      if(m_useDefaultThreshold) \n      {\n        RealScalar max2Norm = 0.0;\n        for (int j = 0; j < mat.cols(); j++) max2Norm = numext::maxi(max2Norm, mat.col(j).norm());\n        if(max2Norm==RealScalar(0))\n          max2Norm = RealScalar(1);\n        pivotThreshold = 20 * (mat.rows() + mat.cols()) * max2Norm * NumTraits<RealScalar>::epsilon();\n      }\n      cholmod_sparse A; \n      A = viewAsCholmod(mat);\n      m_rows = matrix.rows();\n      Index col = matrix.cols();\n      m_rank = SuiteSparseQR<Scalar>(m_ordering, pivotThreshold, col, &A, \n                             &m_cR, &m_E, &m_H, &m_HPinv, &m_HTau, &m_cc);\n\n      if (!m_cR)\n      {\n        m_info = NumericalIssue;\n        m_isInitialized = false;\n        return;\n      }\n      m_info = Success;\n      m_isInitialized = true;\n      m_isRUpToDate = false;\n    }\n    /** \n     * Get the number of rows of the input matrix and the Q matrix\n     */\n    inline Index rows() const {return m_rows; }\n    \n    /** \n     * Get the number of columns of the input matrix. \n     */\n    inline Index cols() const { return m_cR->ncol; }\n    \n    template<typename Rhs, typename Dest>\n    void _solve_impl(const MatrixBase<Rhs> &b, MatrixBase<Dest> &dest) const\n    {\n      eigen_assert(m_isInitialized && \" The QR factorization should be computed first, call compute()\");\n      eigen_assert(b.cols()==1 && \"This method is for vectors only\");\n\n      //Compute Q^T * b\n      typename Dest::PlainObject y, y2;\n      y = matrixQ().transpose() * b;\n      \n      // Solves with the triangular matrix R\n      Index rk = this->rank();\n      y2 = y;\n      y.resize((std::max)(cols(),Index(y.rows())),y.cols());\n      y.topRows(rk) = this->matrixR().topLeftCorner(rk, rk).template triangularView<Upper>().solve(y2.topRows(rk));\n\n      // Apply the column permutation \n      // colsPermutation() performs a copy of the permutation,\n      // so let's apply it manually:\n      for(Index i = 0; i < rk; ++i) dest.row(m_E[i]) = y.row(i);\n      for(Index i = rk; i < cols(); ++i) dest.row(m_E[i]).setZero();\n      \n//       y.bottomRows(y.rows()-rk).setZero();\n//       dest = colsPermutation() * y.topRows(cols());\n      \n      m_info = Success;\n    }\n    \n    /** \\returns the sparse triangular factor R. It is a sparse matrix\n     */\n    const MatrixType matrixR() const\n    {\n      eigen_assert(m_isInitialized && \" The QR factorization should be computed first, call compute()\");\n      if(!m_isRUpToDate) {\n        m_R = viewAsEigen<Scalar,ColMajor, typename MatrixType::StorageIndex>(*m_cR);\n        m_isRUpToDate = true;\n      }\n      return m_R;\n    }\n    /// Get an expression of the matrix Q\n    SPQRMatrixQReturnType<SPQR> matrixQ() const\n    {\n      return SPQRMatrixQReturnType<SPQR>(*this);\n    }\n    /// Get the permutation that was applied to columns of A\n    PermutationType colsPermutation() const\n    { \n      eigen_assert(m_isInitialized && \"Decomposition is not initialized.\");\n      return PermutationType(m_E, m_cR->ncol);\n    }\n    /**\n     * Gets the rank of the matrix. \n     * It should be equal to matrixQR().cols if the matrix is full-rank\n     */\n    Index rank() const\n    {\n      eigen_assert(m_isInitialized && \"Decomposition is not initialized.\");\n      return m_cc.SPQR_istat[4];\n    }\n    /// Set the fill-reducing ordering method to be used\n    void setSPQROrdering(int ord) { m_ordering = ord;}\n    /// Set the tolerance tol to treat columns with 2-norm < =tol as zero\n    void setPivotThreshold(const RealScalar& tol)\n    {\n      m_useDefaultThreshold = false;\n      m_tolerance = tol;\n    }\n    \n    /** \\returns a pointer to the SPQR workspace */\n    cholmod_common *cholmodCommon() const { return &m_cc; }\n    \n    \n    /** \\brief Reports whether previous computation was successful.\n      *\n      * \\returns \\c Success if computation was successful,\n      *          \\c NumericalIssue if the sparse QR can not be computed\n      */\n    ComputationInfo info() const\n    {\n      eigen_assert(m_isInitialized && \"Decomposition is not initialized.\");\n      return m_info;\n    }\n  protected:\n    bool m_analysisIsOk;\n    bool m_factorizationIsOk;\n    mutable bool m_isRUpToDate;\n    mutable ComputationInfo m_info;\n    int m_ordering; // Ordering method to use, see SPQR's manual\n    int m_allow_tol; // Allow to use some tolerance during numerical factorization.\n    RealScalar m_tolerance; // treat columns with 2-norm below this tolerance as zero\n    mutable cholmod_sparse *m_cR; // The sparse R factor in cholmod format\n    mutable MatrixType m_R; // The sparse matrix R in Eigen format\n    mutable StorageIndex *m_E; // The permutation applied to columns\n    mutable cholmod_sparse *m_H;  //The householder vectors\n    mutable StorageIndex *m_HPinv; // The row permutation of H\n    mutable cholmod_dense *m_HTau; // The Householder coefficients\n    mutable Index m_rank; // The rank of the matrix\n    mutable cholmod_common m_cc; // Workspace and parameters\n    bool m_useDefaultThreshold;     // Use default threshold\n    Index m_rows;\n    template<typename ,typename > friend struct SPQR_QProduct;\n};\n\ntemplate <typename SPQRType, typename Derived>\nstruct SPQR_QProduct : ReturnByValue<SPQR_QProduct<SPQRType,Derived> >\n{\n  typedef typename SPQRType::Scalar Scalar;\n  typedef typename SPQRType::StorageIndex StorageIndex;\n  //Define the constructor to get reference to argument types\n  SPQR_QProduct(const SPQRType& spqr, const Derived& other, bool transpose) : m_spqr(spqr),m_other(other),m_transpose(transpose) {}\n  \n  inline Index rows() const { return m_transpose ? m_spqr.rows() : m_spqr.cols(); }\n  inline Index cols() const { return m_other.cols(); }\n  // Assign to a vector\n  template<typename ResType>\n  void evalTo(ResType& res) const\n  {\n    cholmod_dense y_cd;\n    cholmod_dense *x_cd; \n    int method = m_transpose ? SPQR_QTX : SPQR_QX; \n    cholmod_common *cc = m_spqr.cholmodCommon();\n    y_cd = viewAsCholmod(m_other.const_cast_derived());\n    x_cd = SuiteSparseQR_qmult<Scalar>(method, m_spqr.m_H, m_spqr.m_HTau, m_spqr.m_HPinv, &y_cd, cc);\n    res = Matrix<Scalar,ResType::RowsAtCompileTime,ResType::ColsAtCompileTime>::Map(reinterpret_cast<Scalar*>(x_cd->x), x_cd->nrow, x_cd->ncol);\n    cholmod_l_free_dense(&x_cd, cc);\n  }\n  const SPQRType& m_spqr; \n  const Derived& m_other; \n  bool m_transpose; \n  \n};\ntemplate<typename SPQRType>\nstruct SPQRMatrixQReturnType{\n  \n  SPQRMatrixQReturnType(const SPQRType& spqr) : m_spqr(spqr) {}\n  template<typename Derived>\n  SPQR_QProduct<SPQRType, Derived> operator*(const MatrixBase<Derived>& other)\n  {\n    return SPQR_QProduct<SPQRType,Derived>(m_spqr,other.derived(),false);\n  }\n  SPQRMatrixQTransposeReturnType<SPQRType> adjoint() const\n  {\n    return SPQRMatrixQTransposeReturnType<SPQRType>(m_spqr);\n  }\n  // To use for operations with the transpose of Q\n  SPQRMatrixQTransposeReturnType<SPQRType> transpose() const\n  {\n    return SPQRMatrixQTransposeReturnType<SPQRType>(m_spqr);\n  }\n  const SPQRType& m_spqr;\n};\n\ntemplate<typename SPQRType>\nstruct SPQRMatrixQTransposeReturnType{\n  SPQRMatrixQTransposeReturnType(const SPQRType& spqr) : m_spqr(spqr) {}\n  template<typename Derived>\n  SPQR_QProduct<SPQRType,Derived> operator*(const MatrixBase<Derived>& other)\n  {\n    return SPQR_QProduct<SPQRType,Derived>(m_spqr,other.derived(), true);\n  }\n  const SPQRType& m_spqr;\n};\n\n}// End namespace Eigen\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SVD/BDCSVD.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n// \n// We used the \"A Divide-And-Conquer Algorithm for the Bidiagonal SVD\"\n// research report written by Ming Gu and Stanley C.Eisenstat\n// The code variable names correspond to the names they used in their \n// report\n//\n// Copyright (C) 2013 Gauthier Brun <brun.gauthier@gmail.com>\n// Copyright (C) 2013 Nicolas Carre <nicolas.carre@ensimag.fr>\n// Copyright (C) 2013 Jean Ceccato <jean.ceccato@ensimag.fr>\n// Copyright (C) 2013 Pierre Zoppitelli <pierre.zoppitelli@ensimag.fr>\n// Copyright (C) 2013 Jitse Niesen <jitse@maths.leeds.ac.uk>\n// Copyright (C) 2014-2017 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_BDCSVD_H\n#define EIGEN_BDCSVD_H\n// #define EIGEN_BDCSVD_DEBUG_VERBOSE\n// #define EIGEN_BDCSVD_SANITY_CHECKS\n\n#ifdef EIGEN_BDCSVD_SANITY_CHECKS\n#undef eigen_internal_assert\n#define eigen_internal_assert(X) assert(X);\n#endif\n\nnamespace Eigen {\n\n#ifdef EIGEN_BDCSVD_DEBUG_VERBOSE\nIOFormat bdcsvdfmt(8, 0, \", \", \"\\n\", \"  [\", \"]\");\n#endif\n  \ntemplate<typename _MatrixType> class BDCSVD;\n\nnamespace internal {\n\ntemplate<typename _MatrixType> \nstruct traits<BDCSVD<_MatrixType> >\n        : traits<_MatrixType>\n{\n  typedef _MatrixType MatrixType;\n};  \n\n} // end namespace internal\n  \n  \n/** \\ingroup SVD_Module\n *\n *\n * \\class BDCSVD\n *\n * \\brief class Bidiagonal Divide and Conquer SVD\n *\n * \\tparam _MatrixType the type of the matrix of which we are computing the SVD decomposition\n *\n * This class first reduces the input matrix to bi-diagonal form using class UpperBidiagonalization,\n * and then performs a divide-and-conquer diagonalization. Small blocks are diagonalized using class JacobiSVD.\n * You can control the switching size with the setSwitchSize() method, default is 16.\n * For small matrice (<16), it is thus preferable to directly use JacobiSVD. For larger ones, BDCSVD is highly\n * recommended and can several order of magnitude faster.\n *\n * \\warning this algorithm is unlikely to provide accurate result when compiled with unsafe math optimizations.\n * For instance, this concerns Intel's compiler (ICC), which performs such optimization by default unless\n * you compile with the \\c -fp-model \\c precise option. Likewise, the \\c -ffast-math option of GCC or clang will\n * significantly degrade the accuracy.\n *\n * \\sa class JacobiSVD\n */\ntemplate<typename _MatrixType> \nclass BDCSVD : public SVDBase<BDCSVD<_MatrixType> >\n{\n  typedef SVDBase<BDCSVD> Base;\n    \npublic:\n  using Base::rows;\n  using Base::cols;\n  using Base::computeU;\n  using Base::computeV;\n  \n  typedef _MatrixType MatrixType;\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename NumTraits<typename MatrixType::Scalar>::Real RealScalar;\n  typedef typename NumTraits<RealScalar>::Literal Literal;\n  enum {\n    RowsAtCompileTime = MatrixType::RowsAtCompileTime, \n    ColsAtCompileTime = MatrixType::ColsAtCompileTime, \n    DiagSizeAtCompileTime = EIGEN_SIZE_MIN_PREFER_DYNAMIC(RowsAtCompileTime, ColsAtCompileTime), \n    MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime, \n    MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime, \n    MaxDiagSizeAtCompileTime = EIGEN_SIZE_MIN_PREFER_FIXED(MaxRowsAtCompileTime, MaxColsAtCompileTime), \n    MatrixOptions = MatrixType::Options\n  };\n\n  typedef typename Base::MatrixUType MatrixUType;\n  typedef typename Base::MatrixVType MatrixVType;\n  typedef typename Base::SingularValuesType SingularValuesType;\n  \n  typedef Matrix<Scalar, Dynamic, Dynamic, ColMajor> MatrixX;\n  typedef Matrix<RealScalar, Dynamic, Dynamic, ColMajor> MatrixXr;\n  typedef Matrix<RealScalar, Dynamic, 1> VectorType;\n  typedef Array<RealScalar, Dynamic, 1> ArrayXr;\n  typedef Array<Index,1,Dynamic> ArrayXi;\n  typedef Ref<ArrayXr> ArrayRef;\n  typedef Ref<ArrayXi> IndicesRef;\n\n  /** \\brief Default Constructor.\n   *\n   * The default constructor is useful in cases in which the user intends to\n   * perform decompositions via BDCSVD::compute(const MatrixType&).\n   */\n  BDCSVD() : m_algoswap(16), m_isTranspose(false), m_compU(false), m_compV(false), m_numIters(0)\n  {}\n\n\n  /** \\brief Default Constructor with memory preallocation\n   *\n   * Like the default constructor but with preallocation of the internal data\n   * according to the specified problem size.\n   * \\sa BDCSVD()\n   */\n  BDCSVD(Index rows, Index cols, unsigned int computationOptions = 0)\n    : m_algoswap(16), m_numIters(0)\n  {\n    allocate(rows, cols, computationOptions);\n  }\n\n  /** \\brief Constructor performing the decomposition of given matrix.\n   *\n   * \\param matrix the matrix to decompose\n   * \\param computationOptions optional parameter allowing to specify if you want full or thin U or V unitaries to be computed.\n   *                           By default, none is computed. This is a bit - field, the possible bits are #ComputeFullU, #ComputeThinU, \n   *                           #ComputeFullV, #ComputeThinV.\n   *\n   * Thin unitaries are only available if your matrix type has a Dynamic number of columns (for example MatrixXf). They also are not\n   * available with the (non - default) FullPivHouseholderQR preconditioner.\n   */\n  BDCSVD(const MatrixType& matrix, unsigned int computationOptions = 0)\n    : m_algoswap(16), m_numIters(0)\n  {\n    compute(matrix, computationOptions);\n  }\n\n  ~BDCSVD() \n  {\n  }\n  \n  /** \\brief Method performing the decomposition of given matrix using custom options.\n   *\n   * \\param matrix the matrix to decompose\n   * \\param computationOptions optional parameter allowing to specify if you want full or thin U or V unitaries to be computed.\n   *                           By default, none is computed. This is a bit - field, the possible bits are #ComputeFullU, #ComputeThinU, \n   *                           #ComputeFullV, #ComputeThinV.\n   *\n   * Thin unitaries are only available if your matrix type has a Dynamic number of columns (for example MatrixXf). They also are not\n   * available with the (non - default) FullPivHouseholderQR preconditioner.\n   */\n  BDCSVD& compute(const MatrixType& matrix, unsigned int computationOptions);\n\n  /** \\brief Method performing the decomposition of given matrix using current options.\n   *\n   * \\param matrix the matrix to decompose\n   *\n   * This method uses the current \\a computationOptions, as already passed to the constructor or to compute(const MatrixType&, unsigned int).\n   */\n  BDCSVD& compute(const MatrixType& matrix)\n  {\n    return compute(matrix, this->m_computationOptions);\n  }\n\n  void setSwitchSize(int s) \n  {\n    eigen_assert(s>3 && \"BDCSVD the size of the algo switch has to be greater than 3\");\n    m_algoswap = s;\n  }\n \nprivate:\n  void allocate(Index rows, Index cols, unsigned int computationOptions);\n  void divide(Index firstCol, Index lastCol, Index firstRowW, Index firstColW, Index shift);\n  void computeSVDofM(Index firstCol, Index n, MatrixXr& U, VectorType& singVals, MatrixXr& V);\n  void computeSingVals(const ArrayRef& col0, const ArrayRef& diag, const IndicesRef& perm, VectorType& singVals, ArrayRef shifts, ArrayRef mus);\n  void perturbCol0(const ArrayRef& col0, const ArrayRef& diag, const IndicesRef& perm, const VectorType& singVals, const ArrayRef& shifts, const ArrayRef& mus, ArrayRef zhat);\n  void computeSingVecs(const ArrayRef& zhat, const ArrayRef& diag, const IndicesRef& perm, const VectorType& singVals, const ArrayRef& shifts, const ArrayRef& mus, MatrixXr& U, MatrixXr& V);\n  void deflation43(Index firstCol, Index shift, Index i, Index size);\n  void deflation44(Index firstColu , Index firstColm, Index firstRowW, Index firstColW, Index i, Index j, Index size);\n  void deflation(Index firstCol, Index lastCol, Index k, Index firstRowW, Index firstColW, Index shift);\n  template<typename HouseholderU, typename HouseholderV, typename NaiveU, typename NaiveV>\n  void copyUV(const HouseholderU &householderU, const HouseholderV &householderV, const NaiveU &naiveU, const NaiveV &naivev);\n  void structured_update(Block<MatrixXr,Dynamic,Dynamic> A, const MatrixXr &B, Index n1);\n  static RealScalar secularEq(RealScalar x, const ArrayRef& col0, const ArrayRef& diag, const IndicesRef &perm, const ArrayRef& diagShifted, RealScalar shift);\n\nprotected:\n  MatrixXr m_naiveU, m_naiveV;\n  MatrixXr m_computed;\n  Index m_nRec;\n  ArrayXr m_workspace;\n  ArrayXi m_workspaceI;\n  int m_algoswap;\n  bool m_isTranspose, m_compU, m_compV;\n  \n  using Base::m_singularValues;\n  using Base::m_diagSize;\n  using Base::m_computeFullU;\n  using Base::m_computeFullV;\n  using Base::m_computeThinU;\n  using Base::m_computeThinV;\n  using Base::m_matrixU;\n  using Base::m_matrixV;\n  using Base::m_isInitialized;\n  using Base::m_nonzeroSingularValues;\n\npublic:  \n  int m_numIters;\n}; //end class BDCSVD\n\n\n// Method to allocate and initialize matrix and attributes\ntemplate<typename MatrixType>\nvoid BDCSVD<MatrixType>::allocate(Eigen::Index rows, Eigen::Index cols, unsigned int computationOptions)\n{\n  m_isTranspose = (cols > rows);\n\n  if (Base::allocate(rows, cols, computationOptions))\n    return;\n  \n  m_computed = MatrixXr::Zero(m_diagSize + 1, m_diagSize );\n  m_compU = computeV();\n  m_compV = computeU();\n  if (m_isTranspose)\n    std::swap(m_compU, m_compV);\n  \n  if (m_compU) m_naiveU = MatrixXr::Zero(m_diagSize + 1, m_diagSize + 1 );\n  else         m_naiveU = MatrixXr::Zero(2, m_diagSize + 1 );\n  \n  if (m_compV) m_naiveV = MatrixXr::Zero(m_diagSize, m_diagSize);\n  \n  m_workspace.resize((m_diagSize+1)*(m_diagSize+1)*3);\n  m_workspaceI.resize(3*m_diagSize);\n}// end allocate\n\ntemplate<typename MatrixType>\nBDCSVD<MatrixType>& BDCSVD<MatrixType>::compute(const MatrixType& matrix, unsigned int computationOptions) \n{\n#ifdef EIGEN_BDCSVD_DEBUG_VERBOSE\n  std::cout << \"\\n\\n\\n======================================================================================================================\\n\\n\\n\";\n#endif\n  allocate(matrix.rows(), matrix.cols(), computationOptions);\n  using std::abs;\n\n  const RealScalar considerZero = (std::numeric_limits<RealScalar>::min)();\n  \n  //**** step -1 - If the problem is too small, directly falls back to JacobiSVD and return\n  if(matrix.cols() < m_algoswap)\n  {\n    // FIXME this line involves temporaries\n    JacobiSVD<MatrixType> jsvd(matrix,computationOptions);\n    if(computeU()) m_matrixU = jsvd.matrixU();\n    if(computeV()) m_matrixV = jsvd.matrixV();\n    m_singularValues = jsvd.singularValues();\n    m_nonzeroSingularValues = jsvd.nonzeroSingularValues();\n    m_isInitialized = true;\n    return *this;\n  }\n  \n  //**** step 0 - Copy the input matrix and apply scaling to reduce over/under-flows\n  RealScalar scale = matrix.cwiseAbs().maxCoeff();\n  if(scale==Literal(0)) scale = Literal(1);\n  MatrixX copy;\n  if (m_isTranspose) copy = matrix.adjoint()/scale;\n  else               copy = matrix/scale;\n  \n  //**** step 1 - Bidiagonalization\n  // FIXME this line involves temporaries\n  internal::UpperBidiagonalization<MatrixX> bid(copy);\n\n  //**** step 2 - Divide & Conquer\n  m_naiveU.setZero();\n  m_naiveV.setZero();\n  // FIXME this line involves a temporary matrix\n  m_computed.topRows(m_diagSize) = bid.bidiagonal().toDenseMatrix().transpose();\n  m_computed.template bottomRows<1>().setZero();\n  divide(0, m_diagSize - 1, 0, 0, 0);\n\n  //**** step 3 - Copy singular values and vectors\n  for (int i=0; i<m_diagSize; i++)\n  {\n    RealScalar a = abs(m_computed.coeff(i, i));\n    m_singularValues.coeffRef(i) = a * scale;\n    if (a<considerZero)\n    {\n      m_nonzeroSingularValues = i;\n      m_singularValues.tail(m_diagSize - i - 1).setZero();\n      break;\n    }\n    else if (i == m_diagSize - 1)\n    {\n      m_nonzeroSingularValues = i + 1;\n      break;\n    }\n  }\n\n#ifdef EIGEN_BDCSVD_DEBUG_VERBOSE\n//   std::cout << \"m_naiveU\\n\" << m_naiveU << \"\\n\\n\";\n//   std::cout << \"m_naiveV\\n\" << m_naiveV << \"\\n\\n\";\n#endif\n  if(m_isTranspose) copyUV(bid.householderV(), bid.householderU(), m_naiveV, m_naiveU);\n  else              copyUV(bid.householderU(), bid.householderV(), m_naiveU, m_naiveV);\n\n  m_isInitialized = true;\n  return *this;\n}// end compute\n\n\ntemplate<typename MatrixType>\ntemplate<typename HouseholderU, typename HouseholderV, typename NaiveU, typename NaiveV>\nvoid BDCSVD<MatrixType>::copyUV(const HouseholderU &householderU, const HouseholderV &householderV, const NaiveU &naiveU, const NaiveV &naiveV)\n{\n  // Note exchange of U and V: m_matrixU is set from m_naiveV and vice versa\n  if (computeU())\n  {\n    Index Ucols = m_computeThinU ? m_diagSize : householderU.cols();\n    m_matrixU = MatrixX::Identity(householderU.cols(), Ucols);\n    m_matrixU.topLeftCorner(m_diagSize, m_diagSize) = naiveV.template cast<Scalar>().topLeftCorner(m_diagSize, m_diagSize);\n    householderU.applyThisOnTheLeft(m_matrixU); // FIXME this line involves a temporary buffer\n  }\n  if (computeV())\n  {\n    Index Vcols = m_computeThinV ? m_diagSize : householderV.cols();\n    m_matrixV = MatrixX::Identity(householderV.cols(), Vcols);\n    m_matrixV.topLeftCorner(m_diagSize, m_diagSize) = naiveU.template cast<Scalar>().topLeftCorner(m_diagSize, m_diagSize);\n    householderV.applyThisOnTheLeft(m_matrixV); // FIXME this line involves a temporary buffer\n  }\n}\n\n/** \\internal\n  * Performs A = A * B exploiting the special structure of the matrix A. Splitting A as:\n  *  A = [A1]\n  *      [A2]\n  * such that A1.rows()==n1, then we assume that at least half of the columns of A1 and A2 are zeros.\n  * We can thus pack them prior to the the matrix product. However, this is only worth the effort if the matrix is large\n  * enough.\n  */\ntemplate<typename MatrixType>\nvoid BDCSVD<MatrixType>::structured_update(Block<MatrixXr,Dynamic,Dynamic> A, const MatrixXr &B, Index n1)\n{\n  Index n = A.rows();\n  if(n>100)\n  {\n    // If the matrices are large enough, let's exploit the sparse structure of A by\n    // splitting it in half (wrt n1), and packing the non-zero columns.\n    Index n2 = n - n1;\n    Map<MatrixXr> A1(m_workspace.data()      , n1, n);\n    Map<MatrixXr> A2(m_workspace.data()+ n1*n, n2, n);\n    Map<MatrixXr> B1(m_workspace.data()+  n*n, n,  n);\n    Map<MatrixXr> B2(m_workspace.data()+2*n*n, n,  n);\n    Index k1=0, k2=0;\n    for(Index j=0; j<n; ++j)\n    {\n      if( (A.col(j).head(n1).array()!=Literal(0)).any() )\n      {\n        A1.col(k1) = A.col(j).head(n1);\n        B1.row(k1) = B.row(j);\n        ++k1;\n      }\n      if( (A.col(j).tail(n2).array()!=Literal(0)).any() )\n      {\n        A2.col(k2) = A.col(j).tail(n2);\n        B2.row(k2) = B.row(j);\n        ++k2;\n      }\n    }\n  \n    A.topRows(n1).noalias()    = A1.leftCols(k1) * B1.topRows(k1);\n    A.bottomRows(n2).noalias() = A2.leftCols(k2) * B2.topRows(k2);\n  }\n  else\n  {\n    Map<MatrixXr,Aligned> tmp(m_workspace.data(),n,n);\n    tmp.noalias() = A*B;\n    A = tmp;\n  }\n}\n\n// The divide algorithm is done \"in place\", we are always working on subsets of the same matrix. The divide methods takes as argument the \n// place of the submatrix we are currently working on.\n\n//@param firstCol : The Index of the first column of the submatrix of m_computed and for m_naiveU;\n//@param lastCol : The Index of the last column of the submatrix of m_computed and for m_naiveU; \n// lastCol + 1 - firstCol is the size of the submatrix.\n//@param firstRowW : The Index of the first row of the matrix W that we are to change. (see the reference paper section 1 for more information on W)\n//@param firstRowW : Same as firstRowW with the column.\n//@param shift : Each time one takes the left submatrix, one must add 1 to the shift. Why? Because! We actually want the last column of the U submatrix \n// to become the first column (*coeff) and to shift all the other columns to the right. There are more details on the reference paper.\ntemplate<typename MatrixType>\nvoid BDCSVD<MatrixType>::divide (Eigen::Index firstCol, Eigen::Index lastCol, Eigen::Index firstRowW, Eigen::Index firstColW, Eigen::Index shift)\n{\n  // requires rows = cols + 1;\n  using std::pow;\n  using std::sqrt;\n  using std::abs;\n  const Index n = lastCol - firstCol + 1;\n  const Index k = n/2;\n  const RealScalar considerZero = (std::numeric_limits<RealScalar>::min)();\n  RealScalar alphaK;\n  RealScalar betaK; \n  RealScalar r0; \n  RealScalar lambda, phi, c0, s0;\n  VectorType l, f;\n  // We use the other algorithm which is more efficient for small \n  // matrices.\n  if (n < m_algoswap)\n  {\n    // FIXME this line involves temporaries\n    JacobiSVD<MatrixXr> b(m_computed.block(firstCol, firstCol, n + 1, n), ComputeFullU | (m_compV ? ComputeFullV : 0));\n    if (m_compU)\n      m_naiveU.block(firstCol, firstCol, n + 1, n + 1).real() = b.matrixU();\n    else \n    {\n      m_naiveU.row(0).segment(firstCol, n + 1).real() = b.matrixU().row(0);\n      m_naiveU.row(1).segment(firstCol, n + 1).real() = b.matrixU().row(n);\n    }\n    if (m_compV) m_naiveV.block(firstRowW, firstColW, n, n).real() = b.matrixV();\n    m_computed.block(firstCol + shift, firstCol + shift, n + 1, n).setZero();\n    m_computed.diagonal().segment(firstCol + shift, n) = b.singularValues().head(n);\n    return;\n  }\n  // We use the divide and conquer algorithm\n  alphaK =  m_computed(firstCol + k, firstCol + k);\n  betaK = m_computed(firstCol + k + 1, firstCol + k);\n  // The divide must be done in that order in order to have good results. Divide change the data inside the submatrices\n  // and the divide of the right submatrice reads one column of the left submatrice. That's why we need to treat the \n  // right submatrix before the left one. \n  divide(k + 1 + firstCol, lastCol, k + 1 + firstRowW, k + 1 + firstColW, shift);\n  divide(firstCol, k - 1 + firstCol, firstRowW, firstColW + 1, shift + 1);\n\n  if (m_compU)\n  {\n    lambda = m_naiveU(firstCol + k, firstCol + k);\n    phi = m_naiveU(firstCol + k + 1, lastCol + 1);\n  } \n  else \n  {\n    lambda = m_naiveU(1, firstCol + k);\n    phi = m_naiveU(0, lastCol + 1);\n  }\n  r0 = sqrt((abs(alphaK * lambda) * abs(alphaK * lambda)) + abs(betaK * phi) * abs(betaK * phi));\n  if (m_compU)\n  {\n    l = m_naiveU.row(firstCol + k).segment(firstCol, k);\n    f = m_naiveU.row(firstCol + k + 1).segment(firstCol + k + 1, n - k - 1);\n  } \n  else \n  {\n    l = m_naiveU.row(1).segment(firstCol, k);\n    f = m_naiveU.row(0).segment(firstCol + k + 1, n - k - 1);\n  }\n  if (m_compV) m_naiveV(firstRowW+k, firstColW) = Literal(1);\n  if (r0<considerZero)\n  {\n    c0 = Literal(1);\n    s0 = Literal(0);\n  }\n  else\n  {\n    c0 = alphaK * lambda / r0;\n    s0 = betaK * phi / r0;\n  }\n  \n#ifdef EIGEN_BDCSVD_SANITY_CHECKS\n  assert(m_naiveU.allFinite());\n  assert(m_naiveV.allFinite());\n  assert(m_computed.allFinite());\n#endif\n  \n  if (m_compU)\n  {\n    MatrixXr q1 (m_naiveU.col(firstCol + k).segment(firstCol, k + 1));     \n    // we shiftW Q1 to the right\n    for (Index i = firstCol + k - 1; i >= firstCol; i--) \n      m_naiveU.col(i + 1).segment(firstCol, k + 1) = m_naiveU.col(i).segment(firstCol, k + 1);\n    // we shift q1 at the left with a factor c0\n    m_naiveU.col(firstCol).segment( firstCol, k + 1) = (q1 * c0);\n    // last column = q1 * - s0\n    m_naiveU.col(lastCol + 1).segment(firstCol, k + 1) = (q1 * ( - s0));\n    // first column = q2 * s0\n    m_naiveU.col(firstCol).segment(firstCol + k + 1, n - k) = m_naiveU.col(lastCol + 1).segment(firstCol + k + 1, n - k) * s0; \n    // q2 *= c0\n    m_naiveU.col(lastCol + 1).segment(firstCol + k + 1, n - k) *= c0;\n  } \n  else \n  {\n    RealScalar q1 = m_naiveU(0, firstCol + k);\n    // we shift Q1 to the right\n    for (Index i = firstCol + k - 1; i >= firstCol; i--) \n      m_naiveU(0, i + 1) = m_naiveU(0, i);\n    // we shift q1 at the left with a factor c0\n    m_naiveU(0, firstCol) = (q1 * c0);\n    // last column = q1 * - s0\n    m_naiveU(0, lastCol + 1) = (q1 * ( - s0));\n    // first column = q2 * s0\n    m_naiveU(1, firstCol) = m_naiveU(1, lastCol + 1) *s0; \n    // q2 *= c0\n    m_naiveU(1, lastCol + 1) *= c0;\n    m_naiveU.row(1).segment(firstCol + 1, k).setZero();\n    m_naiveU.row(0).segment(firstCol + k + 1, n - k - 1).setZero();\n  }\n  \n#ifdef EIGEN_BDCSVD_SANITY_CHECKS\n  assert(m_naiveU.allFinite());\n  assert(m_naiveV.allFinite());\n  assert(m_computed.allFinite());\n#endif\n  \n  m_computed(firstCol + shift, firstCol + shift) = r0;\n  m_computed.col(firstCol + shift).segment(firstCol + shift + 1, k) = alphaK * l.transpose().real();\n  m_computed.col(firstCol + shift).segment(firstCol + shift + k + 1, n - k - 1) = betaK * f.transpose().real();\n\n#ifdef EIGEN_BDCSVD_DEBUG_VERBOSE\n  ArrayXr tmp1 = (m_computed.block(firstCol+shift, firstCol+shift, n, n)).jacobiSvd().singularValues();\n#endif\n  // Second part: try to deflate singular values in combined matrix\n  deflation(firstCol, lastCol, k, firstRowW, firstColW, shift);\n#ifdef EIGEN_BDCSVD_DEBUG_VERBOSE\n  ArrayXr tmp2 = (m_computed.block(firstCol+shift, firstCol+shift, n, n)).jacobiSvd().singularValues();\n  std::cout << \"\\n\\nj1 = \" << tmp1.transpose().format(bdcsvdfmt) << \"\\n\";\n  std::cout << \"j2 = \" << tmp2.transpose().format(bdcsvdfmt) << \"\\n\\n\";\n  std::cout << \"err:      \" << ((tmp1-tmp2).abs()>1e-12*tmp2.abs()).transpose() << \"\\n\";\n  static int count = 0;\n  std::cout << \"# \" << ++count << \"\\n\\n\";\n  assert((tmp1-tmp2).matrix().norm() < 1e-14*tmp2.matrix().norm());\n//   assert(count<681);\n//   assert(((tmp1-tmp2).abs()<1e-13*tmp2.abs()).all());\n#endif\n  \n  // Third part: compute SVD of combined matrix\n  MatrixXr UofSVD, VofSVD;\n  VectorType singVals;\n  computeSVDofM(firstCol + shift, n, UofSVD, singVals, VofSVD);\n  \n#ifdef EIGEN_BDCSVD_SANITY_CHECKS\n  assert(UofSVD.allFinite());\n  assert(VofSVD.allFinite());\n#endif\n  \n  if (m_compU)\n    structured_update(m_naiveU.block(firstCol, firstCol, n + 1, n + 1), UofSVD, (n+2)/2);\n  else\n  {\n    Map<Matrix<RealScalar,2,Dynamic>,Aligned> tmp(m_workspace.data(),2,n+1);\n    tmp.noalias() = m_naiveU.middleCols(firstCol, n+1) * UofSVD;\n    m_naiveU.middleCols(firstCol, n + 1) = tmp;\n  }\n  \n  if (m_compV)  structured_update(m_naiveV.block(firstRowW, firstColW, n, n), VofSVD, (n+1)/2);\n  \n#ifdef EIGEN_BDCSVD_SANITY_CHECKS\n  assert(m_naiveU.allFinite());\n  assert(m_naiveV.allFinite());\n  assert(m_computed.allFinite());\n#endif\n  \n  m_computed.block(firstCol + shift, firstCol + shift, n, n).setZero();\n  m_computed.block(firstCol + shift, firstCol + shift, n, n).diagonal() = singVals;\n}// end divide\n\n// Compute SVD of m_computed.block(firstCol, firstCol, n + 1, n); this block only has non-zeros in\n// the first column and on the diagonal and has undergone deflation, so diagonal is in increasing\n// order except for possibly the (0,0) entry. The computed SVD is stored U, singVals and V, except\n// that if m_compV is false, then V is not computed. Singular values are sorted in decreasing order.\n//\n// TODO Opportunities for optimization: better root finding algo, better stopping criterion, better\n// handling of round-off errors, be consistent in ordering\n// For instance, to solve the secular equation using FMM, see http://www.stat.uchicago.edu/~lekheng/courses/302/classics/greengard-rokhlin.pdf\ntemplate <typename MatrixType>\nvoid BDCSVD<MatrixType>::computeSVDofM(Eigen::Index firstCol, Eigen::Index n, MatrixXr& U, VectorType& singVals, MatrixXr& V)\n{\n  const RealScalar considerZero = (std::numeric_limits<RealScalar>::min)();\n  using std::abs;\n  ArrayRef col0 = m_computed.col(firstCol).segment(firstCol, n);\n  m_workspace.head(n) =  m_computed.block(firstCol, firstCol, n, n).diagonal();\n  ArrayRef diag = m_workspace.head(n);\n  diag(0) = Literal(0);\n\n  // Allocate space for singular values and vectors\n  singVals.resize(n);\n  U.resize(n+1, n+1);\n  if (m_compV) V.resize(n, n);\n\n#ifdef EIGEN_BDCSVD_DEBUG_VERBOSE\n  if (col0.hasNaN() || diag.hasNaN())\n    std::cout << \"\\n\\nHAS NAN\\n\\n\";\n#endif\n  \n  // Many singular values might have been deflated, the zero ones have been moved to the end,\n  // but others are interleaved and we must ignore them at this stage.\n  // To this end, let's compute a permutation skipping them:\n  Index actual_n = n;\n  while(actual_n>1 && diag(actual_n-1)==Literal(0)) {--actual_n; eigen_internal_assert(col0(actual_n)==Literal(0)); }\n  Index m = 0; // size of the deflated problem\n  for(Index k=0;k<actual_n;++k)\n    if(abs(col0(k))>considerZero)\n      m_workspaceI(m++) = k;\n  Map<ArrayXi> perm(m_workspaceI.data(),m);\n  \n  Map<ArrayXr> shifts(m_workspace.data()+1*n, n);\n  Map<ArrayXr> mus(m_workspace.data()+2*n, n);\n  Map<ArrayXr> zhat(m_workspace.data()+3*n, n);\n\n#ifdef EIGEN_BDCSVD_DEBUG_VERBOSE\n  std::cout << \"computeSVDofM using:\\n\";\n  std::cout << \"  z: \" << col0.transpose() << \"\\n\";\n  std::cout << \"  d: \" << diag.transpose() << \"\\n\";\n#endif\n  \n  // Compute singVals, shifts, and mus\n  computeSingVals(col0, diag, perm, singVals, shifts, mus);\n  \n#ifdef EIGEN_BDCSVD_DEBUG_VERBOSE\n  std::cout << \"  j:        \" << (m_computed.block(firstCol, firstCol, n, n)).jacobiSvd().singularValues().transpose().reverse() << \"\\n\\n\";\n  std::cout << \"  sing-val: \" << singVals.transpose() << \"\\n\";\n  std::cout << \"  mu:       \" << mus.transpose() << \"\\n\";\n  std::cout << \"  shift:    \" << shifts.transpose() << \"\\n\";\n  \n  {\n    std::cout << \"\\n\\n    mus:    \" << mus.head(actual_n).transpose() << \"\\n\\n\";\n    std::cout << \"    check1 (expect0) : \" << ((singVals.array()-(shifts+mus)) / singVals.array()).head(actual_n).transpose() << \"\\n\\n\";\n    assert((((singVals.array()-(shifts+mus)) / singVals.array()).head(actual_n) >= 0).all());\n    std::cout << \"    check2 (>0)      : \" << ((singVals.array()-diag) / singVals.array()).head(actual_n).transpose() << \"\\n\\n\";\n    assert((((singVals.array()-diag) / singVals.array()).head(actual_n) >= 0).all());\n  }\n#endif\n  \n#ifdef EIGEN_BDCSVD_SANITY_CHECKS\n  assert(singVals.allFinite());\n  assert(mus.allFinite());\n  assert(shifts.allFinite());\n#endif\n  \n  // Compute zhat\n  perturbCol0(col0, diag, perm, singVals, shifts, mus, zhat);\n#ifdef  EIGEN_BDCSVD_DEBUG_VERBOSE\n  std::cout << \"  zhat: \" << zhat.transpose() << \"\\n\";\n#endif\n  \n#ifdef EIGEN_BDCSVD_SANITY_CHECKS\n  assert(zhat.allFinite());\n#endif\n  \n  computeSingVecs(zhat, diag, perm, singVals, shifts, mus, U, V);\n  \n#ifdef  EIGEN_BDCSVD_DEBUG_VERBOSE\n  std::cout << \"U^T U: \" << (U.transpose() * U - MatrixXr(MatrixXr::Identity(U.cols(),U.cols()))).norm() << \"\\n\";\n  std::cout << \"V^T V: \" << (V.transpose() * V - MatrixXr(MatrixXr::Identity(V.cols(),V.cols()))).norm() << \"\\n\";\n#endif\n  \n#ifdef EIGEN_BDCSVD_SANITY_CHECKS\n  assert(m_naiveU.allFinite());\n  assert(m_naiveV.allFinite());\n  assert(m_computed.allFinite());\n  assert(U.allFinite());\n  assert(V.allFinite());\n//   assert((U.transpose() * U - MatrixXr(MatrixXr::Identity(U.cols(),U.cols()))).norm() < 100*NumTraits<RealScalar>::epsilon() * n);\n//   assert((V.transpose() * V - MatrixXr(MatrixXr::Identity(V.cols(),V.cols()))).norm() < 100*NumTraits<RealScalar>::epsilon() * n);\n#endif\n  \n  // Because of deflation, the singular values might not be completely sorted.\n  // Fortunately, reordering them is a O(n) problem\n  for(Index i=0; i<actual_n-1; ++i)\n  {\n    if(singVals(i)>singVals(i+1))\n    {\n      using std::swap;\n      swap(singVals(i),singVals(i+1));\n      U.col(i).swap(U.col(i+1));\n      if(m_compV) V.col(i).swap(V.col(i+1));\n    }\n  }\n\n#ifdef EIGEN_BDCSVD_SANITY_CHECKS\n  {\n    bool singular_values_sorted = (((singVals.segment(1,actual_n-1)-singVals.head(actual_n-1))).array() >= 0).all();\n    if(!singular_values_sorted)\n      std::cout << \"Singular values are not sorted: \" << singVals.segment(1,actual_n).transpose() << \"\\n\";\n    assert(singular_values_sorted);\n  }\n#endif\n  \n  // Reverse order so that singular values in increased order\n  // Because of deflation, the zeros singular-values are already at the end\n  singVals.head(actual_n).reverseInPlace();\n  U.leftCols(actual_n).rowwise().reverseInPlace();\n  if (m_compV) V.leftCols(actual_n).rowwise().reverseInPlace();\n  \n#ifdef EIGEN_BDCSVD_DEBUG_VERBOSE\n  JacobiSVD<MatrixXr> jsvd(m_computed.block(firstCol, firstCol, n, n) );\n  std::cout << \"  * j:        \" << jsvd.singularValues().transpose() << \"\\n\\n\";\n  std::cout << \"  * sing-val: \" << singVals.transpose() << \"\\n\";\n//   std::cout << \"  * err:      \" << ((jsvd.singularValues()-singVals)>1e-13*singVals.norm()).transpose() << \"\\n\";\n#endif\n}\n\ntemplate <typename MatrixType>\ntypename BDCSVD<MatrixType>::RealScalar BDCSVD<MatrixType>::secularEq(RealScalar mu, const ArrayRef& col0, const ArrayRef& diag, const IndicesRef &perm, const ArrayRef& diagShifted, RealScalar shift)\n{\n  Index m = perm.size();\n  RealScalar res = Literal(1);\n  for(Index i=0; i<m; ++i)\n  {\n    Index j = perm(i);\n    // The following expression could be rewritten to involve only a single division,\n    // but this would make the expression more sensitive to overflow.\n    res += (col0(j) / (diagShifted(j) - mu)) * (col0(j) / (diag(j) + shift + mu));\n  }\n  return res;\n\n}\n\ntemplate <typename MatrixType>\nvoid BDCSVD<MatrixType>::computeSingVals(const ArrayRef& col0, const ArrayRef& diag, const IndicesRef &perm,\n                                         VectorType& singVals, ArrayRef shifts, ArrayRef mus)\n{\n  using std::abs;\n  using std::swap;\n  using std::sqrt;\n\n  Index n = col0.size();\n  Index actual_n = n;\n  // Note that here actual_n is computed based on col0(i)==0 instead of diag(i)==0 as above\n  // because 1) we have diag(i)==0 => col0(i)==0 and 2) if col0(i)==0, then diag(i) is already a singular value.\n  while(actual_n>1 && col0(actual_n-1)==Literal(0)) --actual_n;\n\n  for (Index k = 0; k < n; ++k)\n  {\n    if (col0(k) == Literal(0) || actual_n==1)\n    {\n      // if col0(k) == 0, then entry is deflated, so singular value is on diagonal\n      // if actual_n==1, then the deflated problem is already diagonalized\n      singVals(k) = k==0 ? col0(0) : diag(k);\n      mus(k) = Literal(0);\n      shifts(k) = k==0 ? col0(0) : diag(k);\n      continue;\n    } \n\n    // otherwise, use secular equation to find singular value\n    RealScalar left = diag(k);\n    RealScalar right; // was: = (k != actual_n-1) ? diag(k+1) : (diag(actual_n-1) + col0.matrix().norm());\n    if(k==actual_n-1)\n      right = (diag(actual_n-1) + col0.matrix().norm());\n    else\n    {\n      // Skip deflated singular values,\n      // recall that at this stage we assume that z[j]!=0 and all entries for which z[j]==0 have been put aside.\n      // This should be equivalent to using perm[]\n      Index l = k+1;\n      while(col0(l)==Literal(0)) { ++l; eigen_internal_assert(l<actual_n); }\n      right = diag(l);\n    }\n\n    // first decide whether it's closer to the left end or the right end\n    RealScalar mid = left + (right-left) / Literal(2);\n    RealScalar fMid = secularEq(mid, col0, diag, perm, diag, Literal(0));\n#ifdef EIGEN_BDCSVD_DEBUG_VERBOSE\n    std::cout << \"right-left = \" << right-left << \"\\n\";\n//     std::cout << \"fMid = \" << fMid << \" \" << secularEq(mid-left, col0, diag, perm, ArrayXr(diag-left), left)\n//                            << \" \" << secularEq(mid-right, col0, diag, perm, ArrayXr(diag-right), right)   << \"\\n\";\n    std::cout << \"     = \" << secularEq(left+RealScalar(0.000001)*(right-left), col0, diag, perm, diag, 0)\n              << \" \"       << secularEq(left+RealScalar(0.1)     *(right-left), col0, diag, perm, diag, 0)\n              << \" \"       << secularEq(left+RealScalar(0.2)     *(right-left), col0, diag, perm, diag, 0)\n              << \" \"       << secularEq(left+RealScalar(0.3)     *(right-left), col0, diag, perm, diag, 0)\n              << \" \"       << secularEq(left+RealScalar(0.4)     *(right-left), col0, diag, perm, diag, 0)\n              << \" \"       << secularEq(left+RealScalar(0.49)    *(right-left), col0, diag, perm, diag, 0)\n              << \" \"       << secularEq(left+RealScalar(0.5)     *(right-left), col0, diag, perm, diag, 0)\n              << \" \"       << secularEq(left+RealScalar(0.51)    *(right-left), col0, diag, perm, diag, 0)\n              << \" \"       << secularEq(left+RealScalar(0.6)     *(right-left), col0, diag, perm, diag, 0)\n              << \" \"       << secularEq(left+RealScalar(0.7)     *(right-left), col0, diag, perm, diag, 0)\n              << \" \"       << secularEq(left+RealScalar(0.8)     *(right-left), col0, diag, perm, diag, 0)\n              << \" \"       << secularEq(left+RealScalar(0.9)     *(right-left), col0, diag, perm, diag, 0)\n              << \" \"       << secularEq(left+RealScalar(0.999999)*(right-left), col0, diag, perm, diag, 0) << \"\\n\";\n#endif\n    RealScalar shift = (k == actual_n-1 || fMid > Literal(0)) ? left : right;\n    \n    // measure everything relative to shift\n    Map<ArrayXr> diagShifted(m_workspace.data()+4*n, n);\n    diagShifted = diag - shift;\n\n    if(k!=actual_n-1)\n    {\n      // check that after the shift, f(mid) is still negative:\n      RealScalar midShifted = (right - left) / RealScalar(2);\n      if(shift==right)\n        midShifted = -midShifted;\n      RealScalar fMidShifted = secularEq(midShifted, col0, diag, perm, diagShifted, shift);\n      if(fMidShifted>0)\n      {\n        // fMid was erroneous, fix it:\n        shift =  fMidShifted > Literal(0) ? left : right;\n        diagShifted = diag - shift;\n      }\n    }\n    \n    // initial guess\n    RealScalar muPrev, muCur;\n    if (shift == left)\n    {\n      muPrev = (right - left) * RealScalar(0.1);\n      if (k == actual_n-1) muCur = right - left;\n      else                 muCur = (right - left) * RealScalar(0.5);\n    }\n    else\n    {\n      muPrev = -(right - left) * RealScalar(0.1);\n      muCur = -(right - left) * RealScalar(0.5);\n    }\n\n    RealScalar fPrev = secularEq(muPrev, col0, diag, perm, diagShifted, shift);\n    RealScalar fCur = secularEq(muCur, col0, diag, perm, diagShifted, shift);\n    if (abs(fPrev) < abs(fCur))\n    {\n      swap(fPrev, fCur);\n      swap(muPrev, muCur);\n    }\n\n    // rational interpolation: fit a function of the form a / mu + b through the two previous\n    // iterates and use its zero to compute the next iterate\n    bool useBisection = fPrev*fCur>Literal(0);\n    while (fCur!=Literal(0) && abs(muCur - muPrev) > Literal(8) * NumTraits<RealScalar>::epsilon() * numext::maxi<RealScalar>(abs(muCur), abs(muPrev)) && abs(fCur - fPrev)>NumTraits<RealScalar>::epsilon() && !useBisection)\n    {\n      ++m_numIters;\n\n      // Find a and b such that the function f(mu) = a / mu + b matches the current and previous samples.\n      RealScalar a = (fCur - fPrev) / (Literal(1)/muCur - Literal(1)/muPrev);\n      RealScalar b = fCur - a / muCur;\n      // And find mu such that f(mu)==0:\n      RealScalar muZero = -a/b;\n      RealScalar fZero = secularEq(muZero, col0, diag, perm, diagShifted, shift);\n\n#ifdef EIGEN_BDCSVD_SANITY_CHECKS\n      assert((numext::isfinite)(fZero));\n#endif\n      \n      muPrev = muCur;\n      fPrev = fCur;\n      muCur = muZero;\n      fCur = fZero;\n      \n      if (shift == left  && (muCur < Literal(0) || muCur > right - left)) useBisection = true;\n      if (shift == right && (muCur < -(right - left) || muCur > Literal(0))) useBisection = true;\n      if (abs(fCur)>abs(fPrev)) useBisection = true;\n    }\n\n    // fall back on bisection method if rational interpolation did not work\n    if (useBisection)\n    {\n#ifdef  EIGEN_BDCSVD_DEBUG_VERBOSE\n      std::cout << \"useBisection for k = \" << k << \", actual_n = \" << actual_n << \"\\n\";\n#endif\n      RealScalar leftShifted, rightShifted;\n      if (shift == left)\n      {\n        // to avoid overflow, we must have mu > max(real_min, |z(k)|/sqrt(real_max)),\n        // the factor 2 is to be more conservative\n        leftShifted = numext::maxi<RealScalar>( (std::numeric_limits<RealScalar>::min)(), Literal(2) * abs(col0(k)) / sqrt((std::numeric_limits<RealScalar>::max)()) );\n\n        // check that we did it right:\n        eigen_internal_assert( (numext::isfinite)( (col0(k)/leftShifted)*(col0(k)/(diag(k)+shift+leftShifted)) ) );\n        // I don't understand why the case k==0 would be special there:\n        // if (k == 0) rightShifted = right - left; else\n        rightShifted = (k==actual_n-1) ? right : ((right - left) * RealScalar(0.51)); // theoretically we can take 0.5, but let's be safe\n      }\n      else\n      {\n        leftShifted = -(right - left) * RealScalar(0.51);\n        if(k+1<n)\n          rightShifted = -numext::maxi<RealScalar>( (std::numeric_limits<RealScalar>::min)(), abs(col0(k+1)) / sqrt((std::numeric_limits<RealScalar>::max)()) );\n        else\n          rightShifted = -(std::numeric_limits<RealScalar>::min)();\n      }\n\n      RealScalar fLeft = secularEq(leftShifted, col0, diag, perm, diagShifted, shift);\n      eigen_internal_assert(fLeft<Literal(0));\n\n#if defined EIGEN_INTERNAL_DEBUGGING || defined EIGEN_BDCSVD_SANITY_CHECKS\n      RealScalar fRight = secularEq(rightShifted, col0, diag, perm, diagShifted, shift);\n#endif\n\n#ifdef EIGEN_BDCSVD_SANITY_CHECKS\n      if(!(numext::isfinite)(fLeft))\n        std::cout << \"f(\" << leftShifted << \") =\" << fLeft << \" ; \" << left << \" \" << shift << \" \" << right << \"\\n\";\n      assert((numext::isfinite)(fLeft));\n\n      if(!(numext::isfinite)(fRight))\n        std::cout << \"f(\" << rightShifted << \") =\" << fRight << \" ; \" << left << \" \" << shift << \" \" << right << \"\\n\";\n      // assert((numext::isfinite)(fRight));\n#endif\n    \n#ifdef  EIGEN_BDCSVD_DEBUG_VERBOSE\n      if(!(fLeft * fRight<0))\n      {\n        std::cout << \"f(leftShifted) using  leftShifted=\" << leftShifted << \" ;  diagShifted(1:10):\" << diagShifted.head(10).transpose()  << \"\\n ; \"\n                  << \"left==shift=\" << bool(left==shift) << \" ; left-shift = \" << (left-shift) << \"\\n\";\n        std::cout << \"k=\" << k << \", \" <<  fLeft << \" * \" << fRight << \" == \" << fLeft * fRight << \"  ;  \"\n                  << \"[\" << left << \" .. \" << right << \"] -> [\" << leftShifted << \" \" << rightShifted << \"], shift=\" << shift\n                  << \" ,  f(right)=\" << secularEq(0,     col0, diag, perm, diagShifted, shift)\n                           << \" == \" << secularEq(right, col0, diag, perm, diag, 0) << \" == \" << fRight << \"\\n\";\n      }\n#endif\n      eigen_internal_assert(fLeft * fRight < Literal(0));\n\n      if(fLeft<Literal(0))\n      {\n        while (rightShifted - leftShifted > Literal(2) * NumTraits<RealScalar>::epsilon() * numext::maxi<RealScalar>(abs(leftShifted), abs(rightShifted)))\n        {\n          RealScalar midShifted = (leftShifted + rightShifted) / Literal(2);\n          fMid = secularEq(midShifted, col0, diag, perm, diagShifted, shift);\n          eigen_internal_assert((numext::isfinite)(fMid));\n\n          if (fLeft * fMid < Literal(0))\n          {\n            rightShifted = midShifted;\n          }\n          else\n          {\n            leftShifted = midShifted;\n            fLeft = fMid;\n          }\n        }\n        muCur = (leftShifted + rightShifted) / Literal(2);\n      }\n      else \n      {\n        // We have a problem as shifting on the left or right give either a positive or negative value\n        // at the middle of [left,right]...\n        // Instead fo abbording or entering an infinite loop,\n        // let's just use the middle as the estimated zero-crossing:\n        muCur = (right - left) * RealScalar(0.5);\n        if(shift == right)\n          muCur = -muCur;\n      }\n    }\n      \n    singVals[k] = shift + muCur;\n    shifts[k] = shift;\n    mus[k] = muCur;\n\n#ifdef  EIGEN_BDCSVD_DEBUG_VERBOSE\n    if(k+1<n)\n      std::cout << \"found \" << singVals[k] << \" == \" << shift << \" + \" << muCur << \" from \" << diag(k) << \" .. \"  << diag(k+1) << \"\\n\";\n#endif\n#ifdef EIGEN_BDCSVD_SANITY_CHECKS\n    assert(k==0 || singVals[k]>=singVals[k-1]);\n    assert(singVals[k]>=diag(k));\n#endif\n\n    // perturb singular value slightly if it equals diagonal entry to avoid division by zero later\n    // (deflation is supposed to avoid this from happening)\n    // - this does no seem to be necessary anymore -\n//     if (singVals[k] == left) singVals[k] *= 1 + NumTraits<RealScalar>::epsilon();\n//     if (singVals[k] == right) singVals[k] *= 1 - NumTraits<RealScalar>::epsilon();\n  }\n}\n\n\n// zhat is perturbation of col0 for which singular vectors can be computed stably (see Section 3.1)\ntemplate <typename MatrixType>\nvoid BDCSVD<MatrixType>::perturbCol0\n   (const ArrayRef& col0, const ArrayRef& diag, const IndicesRef &perm, const VectorType& singVals,\n    const ArrayRef& shifts, const ArrayRef& mus, ArrayRef zhat)\n{\n  using std::sqrt;\n  Index n = col0.size();\n  Index m = perm.size();\n  if(m==0)\n  {\n    zhat.setZero();\n    return;\n  }\n  Index lastIdx = perm(m-1);\n  // The offset permits to skip deflated entries while computing zhat\n  for (Index k = 0; k < n; ++k)\n  {\n    if (col0(k) == Literal(0)) // deflated\n      zhat(k) = Literal(0);\n    else\n    {\n      // see equation (3.6)\n      RealScalar dk = diag(k);\n      RealScalar prod = (singVals(lastIdx) + dk) * (mus(lastIdx) + (shifts(lastIdx) - dk));\n#ifdef EIGEN_BDCSVD_SANITY_CHECKS\n      if(prod<0) {\n        std::cout << \"k = \" << k << \" ;  z(k)=\" << col0(k) << \", diag(k)=\" << dk << \"\\n\";\n        std::cout << \"prod = \" << \"(\" << singVals(lastIdx) << \" + \" << dk << \") * (\" << mus(lastIdx) << \" + (\" << shifts(lastIdx) << \" - \" << dk << \"))\" << \"\\n\";\n        std::cout << \"     = \" << singVals(lastIdx) + dk << \" * \" << mus(lastIdx) + (shifts(lastIdx) - dk) <<  \"\\n\";\n      }\n      assert(prod>=0);\n#endif\n\n      for(Index l = 0; l<m; ++l)\n      {\n        Index i = perm(l);\n        if(i!=k)\n        {\n#ifdef EIGEN_BDCSVD_SANITY_CHECKS\n          if(i>=k && (l==0 || l-1>=m))\n          {\n            std::cout << \"Error in perturbCol0\\n\";\n            std::cout << \"  \" << k << \"/\" << n << \" \"  << l << \"/\" << m << \" \" << i << \"/\" << n << \" ; \" << col0(k) << \" \" << diag(k) << \" \"  <<  \"\\n\";\n            std::cout << \"  \" <<diag(i) << \"\\n\";\n            Index j = (i<k /*|| l==0*/) ? i : perm(l-1);\n            std::cout << \"  \" << \"j=\" << j << \"\\n\";\n          }\n#endif\n          Index j = i<k ? i : perm(l-1);\n#ifdef EIGEN_BDCSVD_SANITY_CHECKS\n          if(!(dk!=Literal(0) || diag(i)!=Literal(0)))\n          {\n            std::cout << \"k=\" << k << \", i=\" << i << \", l=\" << l << \", perm.size()=\" << perm.size() << \"\\n\";\n          }\n          assert(dk!=Literal(0) || diag(i)!=Literal(0));\n#endif\n          prod *= ((singVals(j)+dk) / ((diag(i)+dk))) * ((mus(j)+(shifts(j)-dk)) / ((diag(i)-dk)));\n#ifdef EIGEN_BDCSVD_SANITY_CHECKS\n          assert(prod>=0);\n#endif\n#ifdef EIGEN_BDCSVD_DEBUG_VERBOSE\n          if(i!=k && numext::abs(((singVals(j)+dk)*(mus(j)+(shifts(j)-dk)))/((diag(i)+dk)*(diag(i)-dk)) - 1) > 0.9 )\n            std::cout << \"     \" << ((singVals(j)+dk)*(mus(j)+(shifts(j)-dk)))/((diag(i)+dk)*(diag(i)-dk)) << \" == (\" << (singVals(j)+dk) << \" * \" << (mus(j)+(shifts(j)-dk))\n                       << \") / (\" << (diag(i)+dk) << \" * \" << (diag(i)-dk) << \")\\n\";\n#endif\n        }\n      }\n#ifdef EIGEN_BDCSVD_DEBUG_VERBOSE\n      std::cout << \"zhat(\" << k << \") =  sqrt( \" << prod << \")  ;  \" << (singVals(lastIdx) + dk) << \" * \" << mus(lastIdx) + shifts(lastIdx) << \" - \" << dk << \"\\n\";\n#endif\n      RealScalar tmp = sqrt(prod);\n#ifdef EIGEN_BDCSVD_SANITY_CHECKS\n      assert((numext::isfinite)(tmp));\n#endif\n      zhat(k) = col0(k) > Literal(0) ? RealScalar(tmp) : RealScalar(-tmp);\n    }\n  }\n}\n\n// compute singular vectors\ntemplate <typename MatrixType>\nvoid BDCSVD<MatrixType>::computeSingVecs\n   (const ArrayRef& zhat, const ArrayRef& diag, const IndicesRef &perm, const VectorType& singVals,\n    const ArrayRef& shifts, const ArrayRef& mus, MatrixXr& U, MatrixXr& V)\n{\n  Index n = zhat.size();\n  Index m = perm.size();\n  \n  for (Index k = 0; k < n; ++k)\n  {\n    if (zhat(k) == Literal(0))\n    {\n      U.col(k) = VectorType::Unit(n+1, k);\n      if (m_compV) V.col(k) = VectorType::Unit(n, k);\n    }\n    else\n    {\n      U.col(k).setZero();\n      for(Index l=0;l<m;++l)\n      {\n        Index i = perm(l);\n        U(i,k) = zhat(i)/(((diag(i) - shifts(k)) - mus(k)) )/( (diag(i) + singVals[k]));\n      }\n      U(n,k) = Literal(0);\n      U.col(k).normalize();\n    \n      if (m_compV)\n      {\n        V.col(k).setZero();\n        for(Index l=1;l<m;++l)\n        {\n          Index i = perm(l);\n          V(i,k) = diag(i) * zhat(i) / (((diag(i) - shifts(k)) - mus(k)) )/( (diag(i) + singVals[k]));\n        }\n        V(0,k) = Literal(-1);\n        V.col(k).normalize();\n      }\n    }\n  }\n  U.col(n) = VectorType::Unit(n+1, n);\n}\n\n\n// page 12_13\n// i >= 1, di almost null and zi non null.\n// We use a rotation to zero out zi applied to the left of M\ntemplate <typename MatrixType>\nvoid BDCSVD<MatrixType>::deflation43(Eigen::Index firstCol, Eigen::Index shift, Eigen::Index i, Eigen::Index size)\n{\n  using std::abs;\n  using std::sqrt;\n  using std::pow;\n  Index start = firstCol + shift;\n  RealScalar c = m_computed(start, start);\n  RealScalar s = m_computed(start+i, start);\n  RealScalar r = numext::hypot(c,s);\n  if (r == Literal(0))\n  {\n    m_computed(start+i, start+i) = Literal(0);\n    return;\n  }\n  m_computed(start,start) = r;  \n  m_computed(start+i, start) = Literal(0);\n  m_computed(start+i, start+i) = Literal(0);\n  \n  JacobiRotation<RealScalar> J(c/r,-s/r);\n  if (m_compU)  m_naiveU.middleRows(firstCol, size+1).applyOnTheRight(firstCol, firstCol+i, J);\n  else          m_naiveU.applyOnTheRight(firstCol, firstCol+i, J);\n}// end deflation 43\n\n\n// page 13\n// i,j >= 1, i!=j and |di - dj| < epsilon * norm2(M)\n// We apply two rotations to have zj = 0;\n// TODO deflation44 is still broken and not properly tested\ntemplate <typename MatrixType>\nvoid BDCSVD<MatrixType>::deflation44(Eigen::Index firstColu , Eigen::Index firstColm, Eigen::Index firstRowW, Eigen::Index firstColW, Eigen::Index i, Eigen::Index j, Eigen::Index size)\n{\n  using std::abs;\n  using std::sqrt;\n  using std::conj;\n  using std::pow;\n  RealScalar c = m_computed(firstColm+i, firstColm);\n  RealScalar s = m_computed(firstColm+j, firstColm);\n  RealScalar r = sqrt(numext::abs2(c) + numext::abs2(s));\n#ifdef  EIGEN_BDCSVD_DEBUG_VERBOSE\n  std::cout << \"deflation 4.4: \" << i << \",\" << j << \" -> \" << c << \" \" << s << \" \" << r << \" ; \"\n    << m_computed(firstColm + i-1, firstColm)  << \" \"\n    << m_computed(firstColm + i, firstColm)  << \" \"\n    << m_computed(firstColm + i+1, firstColm) << \" \"\n    << m_computed(firstColm + i+2, firstColm) << \"\\n\";\n  std::cout << m_computed(firstColm + i-1, firstColm + i-1)  << \" \"\n    << m_computed(firstColm + i, firstColm+i)  << \" \"\n    << m_computed(firstColm + i+1, firstColm+i+1) << \" \"\n    << m_computed(firstColm + i+2, firstColm+i+2) << \"\\n\";\n#endif\n  if (r==Literal(0))\n  {\n    m_computed(firstColm + i, firstColm + i) = m_computed(firstColm + j, firstColm + j);\n    return;\n  }\n  c/=r;\n  s/=r;\n  m_computed(firstColm + i, firstColm) = r;\n  m_computed(firstColm + j, firstColm + j) = m_computed(firstColm + i, firstColm + i);\n  m_computed(firstColm + j, firstColm) = Literal(0);\n\n  JacobiRotation<RealScalar> J(c,-s);\n  if (m_compU)  m_naiveU.middleRows(firstColu, size+1).applyOnTheRight(firstColu + i, firstColu + j, J);\n  else          m_naiveU.applyOnTheRight(firstColu+i, firstColu+j, J);\n  if (m_compV)  m_naiveV.middleRows(firstRowW, size).applyOnTheRight(firstColW + i, firstColW + j, J);\n}// end deflation 44\n\n\n// acts on block from (firstCol+shift, firstCol+shift) to (lastCol+shift, lastCol+shift) [inclusive]\ntemplate <typename MatrixType>\nvoid BDCSVD<MatrixType>::deflation(Eigen::Index firstCol, Eigen::Index lastCol, Eigen::Index k, Eigen::Index firstRowW, Eigen::Index firstColW, Eigen::Index shift)\n{\n  using std::sqrt;\n  using std::abs;\n  const Index length = lastCol + 1 - firstCol;\n  \n  Block<MatrixXr,Dynamic,1> col0(m_computed, firstCol+shift, firstCol+shift, length, 1);\n  Diagonal<MatrixXr> fulldiag(m_computed);\n  VectorBlock<Diagonal<MatrixXr>,Dynamic> diag(fulldiag, firstCol+shift, length);\n  \n  const RealScalar considerZero = (std::numeric_limits<RealScalar>::min)();\n  RealScalar maxDiag = diag.tail((std::max)(Index(1),length-1)).cwiseAbs().maxCoeff();\n  RealScalar epsilon_strict = numext::maxi<RealScalar>(considerZero,NumTraits<RealScalar>::epsilon() * maxDiag);\n  RealScalar epsilon_coarse = Literal(8) * NumTraits<RealScalar>::epsilon() * numext::maxi<RealScalar>(col0.cwiseAbs().maxCoeff(), maxDiag);\n  \n#ifdef EIGEN_BDCSVD_SANITY_CHECKS\n  assert(m_naiveU.allFinite());\n  assert(m_naiveV.allFinite());\n  assert(m_computed.allFinite());\n#endif\n\n#ifdef  EIGEN_BDCSVD_DEBUG_VERBOSE  \n  std::cout << \"\\ndeflate:\" << diag.head(k+1).transpose() << \"  |  \" << diag.segment(k+1,length-k-1).transpose() << \"\\n\";\n#endif\n  \n  //condition 4.1\n  if (diag(0) < epsilon_coarse)\n  { \n#ifdef  EIGEN_BDCSVD_DEBUG_VERBOSE\n    std::cout << \"deflation 4.1, because \" << diag(0) << \" < \" << epsilon_coarse << \"\\n\";\n#endif\n    diag(0) = epsilon_coarse;\n  }\n\n  //condition 4.2\n  for (Index i=1;i<length;++i)\n    if (abs(col0(i)) < epsilon_strict)\n    {\n#ifdef  EIGEN_BDCSVD_DEBUG_VERBOSE\n      std::cout << \"deflation 4.2, set z(\" << i << \") to zero because \" << abs(col0(i)) << \" < \" << epsilon_strict << \"  (diag(\" << i << \")=\" << diag(i) << \")\\n\";\n#endif\n      col0(i) = Literal(0);\n    }\n\n  //condition 4.3\n  for (Index i=1;i<length; i++)\n    if (diag(i) < epsilon_coarse)\n    {\n#ifdef  EIGEN_BDCSVD_DEBUG_VERBOSE\n      std::cout << \"deflation 4.3, cancel z(\" << i << \")=\" << col0(i) << \" because diag(\" << i << \")=\" << diag(i) << \" < \" << epsilon_coarse << \"\\n\";\n#endif\n      deflation43(firstCol, shift, i, length);\n    }\n\n#ifdef EIGEN_BDCSVD_SANITY_CHECKS\n  assert(m_naiveU.allFinite());\n  assert(m_naiveV.allFinite());\n  assert(m_computed.allFinite());\n#endif\n#ifdef EIGEN_BDCSVD_DEBUG_VERBOSE\n  std::cout << \"to be sorted: \" << diag.transpose() << \"\\n\\n\";\n  std::cout << \"            : \" << col0.transpose() << \"\\n\\n\";\n#endif\n  {\n    // Check for total deflation\n    // If we have a total deflation, then we have to consider col0(0)==diag(0) as a singular value during sorting\n    bool total_deflation = (col0.tail(length-1).array()<considerZero).all();\n    \n    // Sort the diagonal entries, since diag(1:k-1) and diag(k:length) are already sorted, let's do a sorted merge.\n    // First, compute the respective permutation.\n    Index *permutation = m_workspaceI.data();\n    {\n      permutation[0] = 0;\n      Index p = 1;\n      \n      // Move deflated diagonal entries at the end.\n      for(Index i=1; i<length; ++i)\n        if(abs(diag(i))<considerZero)\n          permutation[p++] = i;\n        \n      Index i=1, j=k+1;\n      for( ; p < length; ++p)\n      {\n             if (i > k)             permutation[p] = j++;\n        else if (j >= length)       permutation[p] = i++;\n        else if (diag(i) < diag(j)) permutation[p] = j++;\n        else                        permutation[p] = i++;\n      }\n    }\n    \n    // If we have a total deflation, then we have to insert diag(0) at the right place\n    if(total_deflation)\n    {\n      for(Index i=1; i<length; ++i)\n      {\n        Index pi = permutation[i];\n        if(abs(diag(pi))<considerZero || diag(0)<diag(pi))\n          permutation[i-1] = permutation[i];\n        else\n        {\n          permutation[i-1] = 0;\n          break;\n        }\n      }\n    }\n    \n    // Current index of each col, and current column of each index\n    Index *realInd = m_workspaceI.data()+length;\n    Index *realCol = m_workspaceI.data()+2*length;\n    \n    for(int pos = 0; pos< length; pos++)\n    {\n      realCol[pos] = pos;\n      realInd[pos] = pos;\n    }\n    \n    for(Index i = total_deflation?0:1; i < length; i++)\n    {\n      const Index pi = permutation[length - (total_deflation ? i+1 : i)];\n      const Index J = realCol[pi];\n      \n      using std::swap;\n      // swap diagonal and first column entries:\n      swap(diag(i), diag(J));\n      if(i!=0 && J!=0) swap(col0(i), col0(J));\n\n      // change columns\n      if (m_compU) m_naiveU.col(firstCol+i).segment(firstCol, length + 1).swap(m_naiveU.col(firstCol+J).segment(firstCol, length + 1));\n      else         m_naiveU.col(firstCol+i).segment(0, 2)                .swap(m_naiveU.col(firstCol+J).segment(0, 2));\n      if (m_compV) m_naiveV.col(firstColW + i).segment(firstRowW, length).swap(m_naiveV.col(firstColW + J).segment(firstRowW, length));\n\n      //update real pos\n      const Index realI = realInd[i];\n      realCol[realI] = J;\n      realCol[pi] = i;\n      realInd[J] = realI;\n      realInd[i] = pi;\n    }\n  }\n#ifdef EIGEN_BDCSVD_DEBUG_VERBOSE\n  std::cout << \"sorted: \" << diag.transpose().format(bdcsvdfmt) << \"\\n\";\n  std::cout << \"      : \" << col0.transpose() << \"\\n\\n\";\n#endif\n    \n  //condition 4.4\n  {\n    Index i = length-1;\n    while(i>0 && (abs(diag(i))<considerZero || abs(col0(i))<considerZero)) --i;\n    for(; i>1;--i)\n       if( (diag(i) - diag(i-1)) < NumTraits<RealScalar>::epsilon()*maxDiag )\n      {\n#ifdef EIGEN_BDCSVD_DEBUG_VERBOSE\n        std::cout << \"deflation 4.4 with i = \" << i << \" because \" << diag(i) << \" - \" << diag(i-1) << \" == \" << (diag(i) - diag(i-1)) << \" < \" << NumTraits<RealScalar>::epsilon()*/*diag(i)*/maxDiag << \"\\n\";\n#endif\n        eigen_internal_assert(abs(diag(i) - diag(i-1))<epsilon_coarse && \" diagonal entries are not properly sorted\");\n        deflation44(firstCol, firstCol + shift, firstRowW, firstColW, i-1, i, length);\n      }\n  }\n  \n#ifdef EIGEN_BDCSVD_SANITY_CHECKS\n  for(Index j=2;j<length;++j)\n    assert(diag(j-1)<=diag(j) || abs(diag(j))<considerZero);\n#endif\n  \n#ifdef EIGEN_BDCSVD_SANITY_CHECKS\n  assert(m_naiveU.allFinite());\n  assert(m_naiveV.allFinite());\n  assert(m_computed.allFinite());\n#endif\n}//end deflation\n\n#if !defined(EIGEN_GPUCC)\n/** \\svd_module\n  *\n  * \\return the singular value decomposition of \\c *this computed by Divide & Conquer algorithm\n  *\n  * \\sa class BDCSVD\n  */\ntemplate<typename Derived>\nBDCSVD<typename MatrixBase<Derived>::PlainObject>\nMatrixBase<Derived>::bdcSvd(unsigned int computationOptions) const\n{\n  return BDCSVD<PlainObject>(*this, computationOptions);\n}\n#endif\n\n} // end namespace Eigen\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SVD/JacobiSVD.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009-2010 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2013-2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_JACOBISVD_H\n#define EIGEN_JACOBISVD_H\n\nnamespace Eigen { \n\nnamespace internal {\n// forward declaration (needed by ICC)\n// the empty body is required by MSVC\ntemplate<typename MatrixType, int QRPreconditioner,\n         bool IsComplex = NumTraits<typename MatrixType::Scalar>::IsComplex>\nstruct svd_precondition_2x2_block_to_be_real {};\n\n/*** QR preconditioners (R-SVD)\n ***\n *** Their role is to reduce the problem of computing the SVD to the case of a square matrix.\n *** This approach, known as R-SVD, is an optimization for rectangular-enough matrices, and is a requirement for\n *** JacobiSVD which by itself is only able to work on square matrices.\n ***/\n\nenum { PreconditionIfMoreColsThanRows, PreconditionIfMoreRowsThanCols };\n\ntemplate<typename MatrixType, int QRPreconditioner, int Case>\nstruct qr_preconditioner_should_do_anything\n{\n  enum { a = MatrixType::RowsAtCompileTime != Dynamic &&\n             MatrixType::ColsAtCompileTime != Dynamic &&\n             MatrixType::ColsAtCompileTime <= MatrixType::RowsAtCompileTime,\n         b = MatrixType::RowsAtCompileTime != Dynamic &&\n             MatrixType::ColsAtCompileTime != Dynamic &&\n             MatrixType::RowsAtCompileTime <= MatrixType::ColsAtCompileTime,\n         ret = !( (QRPreconditioner == NoQRPreconditioner) ||\n                  (Case == PreconditionIfMoreColsThanRows && bool(a)) ||\n                  (Case == PreconditionIfMoreRowsThanCols && bool(b)) )\n  };\n};\n\ntemplate<typename MatrixType, int QRPreconditioner, int Case,\n         bool DoAnything = qr_preconditioner_should_do_anything<MatrixType, QRPreconditioner, Case>::ret\n> struct qr_preconditioner_impl {};\n\ntemplate<typename MatrixType, int QRPreconditioner, int Case>\nclass qr_preconditioner_impl<MatrixType, QRPreconditioner, Case, false>\n{\npublic:\n  void allocate(const JacobiSVD<MatrixType, QRPreconditioner>&) {}\n  bool run(JacobiSVD<MatrixType, QRPreconditioner>&, const MatrixType&)\n  {\n    return false;\n  }\n};\n\n/*** preconditioner using FullPivHouseholderQR ***/\n\ntemplate<typename MatrixType>\nclass qr_preconditioner_impl<MatrixType, FullPivHouseholderQRPreconditioner, PreconditionIfMoreRowsThanCols, true>\n{\npublic:\n  typedef typename MatrixType::Scalar Scalar;\n  enum\n  {\n    RowsAtCompileTime = MatrixType::RowsAtCompileTime,\n    MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime\n  };\n  typedef Matrix<Scalar, 1, RowsAtCompileTime, RowMajor, 1, MaxRowsAtCompileTime> WorkspaceType;\n\n  void allocate(const JacobiSVD<MatrixType, FullPivHouseholderQRPreconditioner>& svd)\n  {\n    if (svd.rows() != m_qr.rows() || svd.cols() != m_qr.cols())\n    {\n      m_qr.~QRType();\n      ::new (&m_qr) QRType(svd.rows(), svd.cols());\n    }\n    if (svd.m_computeFullU) m_workspace.resize(svd.rows());\n  }\n\n  bool run(JacobiSVD<MatrixType, FullPivHouseholderQRPreconditioner>& svd, const MatrixType& matrix)\n  {\n    if(matrix.rows() > matrix.cols())\n    {\n      m_qr.compute(matrix);\n      svd.m_workMatrix = m_qr.matrixQR().block(0,0,matrix.cols(),matrix.cols()).template triangularView<Upper>();\n      if(svd.m_computeFullU) m_qr.matrixQ().evalTo(svd.m_matrixU, m_workspace);\n      if(svd.computeV()) svd.m_matrixV = m_qr.colsPermutation();\n      return true;\n    }\n    return false;\n  }\nprivate:\n  typedef FullPivHouseholderQR<MatrixType> QRType;\n  QRType m_qr;\n  WorkspaceType m_workspace;\n};\n\ntemplate<typename MatrixType>\nclass qr_preconditioner_impl<MatrixType, FullPivHouseholderQRPreconditioner, PreconditionIfMoreColsThanRows, true>\n{\npublic:\n  typedef typename MatrixType::Scalar Scalar;\n  enum\n  {\n    RowsAtCompileTime = MatrixType::RowsAtCompileTime,\n    ColsAtCompileTime = MatrixType::ColsAtCompileTime,\n    MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime,\n    MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime,\n    TrOptions = RowsAtCompileTime==1 ? (MatrixType::Options & ~(RowMajor))\n              : ColsAtCompileTime==1 ? (MatrixType::Options |   RowMajor)\n              : MatrixType::Options\n  };\n  typedef Matrix<Scalar, ColsAtCompileTime, RowsAtCompileTime, TrOptions, MaxColsAtCompileTime, MaxRowsAtCompileTime>\n          TransposeTypeWithSameStorageOrder;\n\n  void allocate(const JacobiSVD<MatrixType, FullPivHouseholderQRPreconditioner>& svd)\n  {\n    if (svd.cols() != m_qr.rows() || svd.rows() != m_qr.cols())\n    {\n      m_qr.~QRType();\n      ::new (&m_qr) QRType(svd.cols(), svd.rows());\n    }\n    m_adjoint.resize(svd.cols(), svd.rows());\n    if (svd.m_computeFullV) m_workspace.resize(svd.cols());\n  }\n\n  bool run(JacobiSVD<MatrixType, FullPivHouseholderQRPreconditioner>& svd, const MatrixType& matrix)\n  {\n    if(matrix.cols() > matrix.rows())\n    {\n      m_adjoint = matrix.adjoint();\n      m_qr.compute(m_adjoint);\n      svd.m_workMatrix = m_qr.matrixQR().block(0,0,matrix.rows(),matrix.rows()).template triangularView<Upper>().adjoint();\n      if(svd.m_computeFullV) m_qr.matrixQ().evalTo(svd.m_matrixV, m_workspace);\n      if(svd.computeU()) svd.m_matrixU = m_qr.colsPermutation();\n      return true;\n    }\n    else return false;\n  }\nprivate:\n  typedef FullPivHouseholderQR<TransposeTypeWithSameStorageOrder> QRType;\n  QRType m_qr;\n  TransposeTypeWithSameStorageOrder m_adjoint;\n  typename internal::plain_row_type<MatrixType>::type m_workspace;\n};\n\n/*** preconditioner using ColPivHouseholderQR ***/\n\ntemplate<typename MatrixType>\nclass qr_preconditioner_impl<MatrixType, ColPivHouseholderQRPreconditioner, PreconditionIfMoreRowsThanCols, true>\n{\npublic:\n  void allocate(const JacobiSVD<MatrixType, ColPivHouseholderQRPreconditioner>& svd)\n  {\n    if (svd.rows() != m_qr.rows() || svd.cols() != m_qr.cols())\n    {\n      m_qr.~QRType();\n      ::new (&m_qr) QRType(svd.rows(), svd.cols());\n    }\n    if (svd.m_computeFullU) m_workspace.resize(svd.rows());\n    else if (svd.m_computeThinU) m_workspace.resize(svd.cols());\n  }\n\n  bool run(JacobiSVD<MatrixType, ColPivHouseholderQRPreconditioner>& svd, const MatrixType& matrix)\n  {\n    if(matrix.rows() > matrix.cols())\n    {\n      m_qr.compute(matrix);\n      svd.m_workMatrix = m_qr.matrixQR().block(0,0,matrix.cols(),matrix.cols()).template triangularView<Upper>();\n      if(svd.m_computeFullU) m_qr.householderQ().evalTo(svd.m_matrixU, m_workspace);\n      else if(svd.m_computeThinU)\n      {\n        svd.m_matrixU.setIdentity(matrix.rows(), matrix.cols());\n        m_qr.householderQ().applyThisOnTheLeft(svd.m_matrixU, m_workspace);\n      }\n      if(svd.computeV()) svd.m_matrixV = m_qr.colsPermutation();\n      return true;\n    }\n    return false;\n  }\n\nprivate:\n  typedef ColPivHouseholderQR<MatrixType> QRType;\n  QRType m_qr;\n  typename internal::plain_col_type<MatrixType>::type m_workspace;\n};\n\ntemplate<typename MatrixType>\nclass qr_preconditioner_impl<MatrixType, ColPivHouseholderQRPreconditioner, PreconditionIfMoreColsThanRows, true>\n{\npublic:\n  typedef typename MatrixType::Scalar Scalar;\n  enum\n  {\n    RowsAtCompileTime = MatrixType::RowsAtCompileTime,\n    ColsAtCompileTime = MatrixType::ColsAtCompileTime,\n    MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime,\n    MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime,\n    TrOptions = RowsAtCompileTime==1 ? (MatrixType::Options & ~(RowMajor))\n              : ColsAtCompileTime==1 ? (MatrixType::Options |   RowMajor)\n              : MatrixType::Options\n  };\n\n  typedef Matrix<Scalar, ColsAtCompileTime, RowsAtCompileTime, TrOptions, MaxColsAtCompileTime, MaxRowsAtCompileTime>\n          TransposeTypeWithSameStorageOrder;\n\n  void allocate(const JacobiSVD<MatrixType, ColPivHouseholderQRPreconditioner>& svd)\n  {\n    if (svd.cols() != m_qr.rows() || svd.rows() != m_qr.cols())\n    {\n      m_qr.~QRType();\n      ::new (&m_qr) QRType(svd.cols(), svd.rows());\n    }\n    if (svd.m_computeFullV) m_workspace.resize(svd.cols());\n    else if (svd.m_computeThinV) m_workspace.resize(svd.rows());\n    m_adjoint.resize(svd.cols(), svd.rows());\n  }\n\n  bool run(JacobiSVD<MatrixType, ColPivHouseholderQRPreconditioner>& svd, const MatrixType& matrix)\n  {\n    if(matrix.cols() > matrix.rows())\n    {\n      m_adjoint = matrix.adjoint();\n      m_qr.compute(m_adjoint);\n\n      svd.m_workMatrix = m_qr.matrixQR().block(0,0,matrix.rows(),matrix.rows()).template triangularView<Upper>().adjoint();\n      if(svd.m_computeFullV) m_qr.householderQ().evalTo(svd.m_matrixV, m_workspace);\n      else if(svd.m_computeThinV)\n      {\n        svd.m_matrixV.setIdentity(matrix.cols(), matrix.rows());\n        m_qr.householderQ().applyThisOnTheLeft(svd.m_matrixV, m_workspace);\n      }\n      if(svd.computeU()) svd.m_matrixU = m_qr.colsPermutation();\n      return true;\n    }\n    else return false;\n  }\n\nprivate:\n  typedef ColPivHouseholderQR<TransposeTypeWithSameStorageOrder> QRType;\n  QRType m_qr;\n  TransposeTypeWithSameStorageOrder m_adjoint;\n  typename internal::plain_row_type<MatrixType>::type m_workspace;\n};\n\n/*** preconditioner using HouseholderQR ***/\n\ntemplate<typename MatrixType>\nclass qr_preconditioner_impl<MatrixType, HouseholderQRPreconditioner, PreconditionIfMoreRowsThanCols, true>\n{\npublic:\n  void allocate(const JacobiSVD<MatrixType, HouseholderQRPreconditioner>& svd)\n  {\n    if (svd.rows() != m_qr.rows() || svd.cols() != m_qr.cols())\n    {\n      m_qr.~QRType();\n      ::new (&m_qr) QRType(svd.rows(), svd.cols());\n    }\n    if (svd.m_computeFullU) m_workspace.resize(svd.rows());\n    else if (svd.m_computeThinU) m_workspace.resize(svd.cols());\n  }\n\n  bool run(JacobiSVD<MatrixType, HouseholderQRPreconditioner>& svd, const MatrixType& matrix)\n  {\n    if(matrix.rows() > matrix.cols())\n    {\n      m_qr.compute(matrix);\n      svd.m_workMatrix = m_qr.matrixQR().block(0,0,matrix.cols(),matrix.cols()).template triangularView<Upper>();\n      if(svd.m_computeFullU) m_qr.householderQ().evalTo(svd.m_matrixU, m_workspace);\n      else if(svd.m_computeThinU)\n      {\n        svd.m_matrixU.setIdentity(matrix.rows(), matrix.cols());\n        m_qr.householderQ().applyThisOnTheLeft(svd.m_matrixU, m_workspace);\n      }\n      if(svd.computeV()) svd.m_matrixV.setIdentity(matrix.cols(), matrix.cols());\n      return true;\n    }\n    return false;\n  }\nprivate:\n  typedef HouseholderQR<MatrixType> QRType;\n  QRType m_qr;\n  typename internal::plain_col_type<MatrixType>::type m_workspace;\n};\n\ntemplate<typename MatrixType>\nclass qr_preconditioner_impl<MatrixType, HouseholderQRPreconditioner, PreconditionIfMoreColsThanRows, true>\n{\npublic:\n  typedef typename MatrixType::Scalar Scalar;\n  enum\n  {\n    RowsAtCompileTime = MatrixType::RowsAtCompileTime,\n    ColsAtCompileTime = MatrixType::ColsAtCompileTime,\n    MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime,\n    MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime,\n    Options = MatrixType::Options\n  };\n\n  typedef Matrix<Scalar, ColsAtCompileTime, RowsAtCompileTime, Options, MaxColsAtCompileTime, MaxRowsAtCompileTime>\n          TransposeTypeWithSameStorageOrder;\n\n  void allocate(const JacobiSVD<MatrixType, HouseholderQRPreconditioner>& svd)\n  {\n    if (svd.cols() != m_qr.rows() || svd.rows() != m_qr.cols())\n    {\n      m_qr.~QRType();\n      ::new (&m_qr) QRType(svd.cols(), svd.rows());\n    }\n    if (svd.m_computeFullV) m_workspace.resize(svd.cols());\n    else if (svd.m_computeThinV) m_workspace.resize(svd.rows());\n    m_adjoint.resize(svd.cols(), svd.rows());\n  }\n\n  bool run(JacobiSVD<MatrixType, HouseholderQRPreconditioner>& svd, const MatrixType& matrix)\n  {\n    if(matrix.cols() > matrix.rows())\n    {\n      m_adjoint = matrix.adjoint();\n      m_qr.compute(m_adjoint);\n\n      svd.m_workMatrix = m_qr.matrixQR().block(0,0,matrix.rows(),matrix.rows()).template triangularView<Upper>().adjoint();\n      if(svd.m_computeFullV) m_qr.householderQ().evalTo(svd.m_matrixV, m_workspace);\n      else if(svd.m_computeThinV)\n      {\n        svd.m_matrixV.setIdentity(matrix.cols(), matrix.rows());\n        m_qr.householderQ().applyThisOnTheLeft(svd.m_matrixV, m_workspace);\n      }\n      if(svd.computeU()) svd.m_matrixU.setIdentity(matrix.rows(), matrix.rows());\n      return true;\n    }\n    else return false;\n  }\n\nprivate:\n  typedef HouseholderQR<TransposeTypeWithSameStorageOrder> QRType;\n  QRType m_qr;\n  TransposeTypeWithSameStorageOrder m_adjoint;\n  typename internal::plain_row_type<MatrixType>::type m_workspace;\n};\n\n/*** 2x2 SVD implementation\n ***\n *** JacobiSVD consists in performing a series of 2x2 SVD subproblems\n ***/\n\ntemplate<typename MatrixType, int QRPreconditioner>\nstruct svd_precondition_2x2_block_to_be_real<MatrixType, QRPreconditioner, false>\n{\n  typedef JacobiSVD<MatrixType, QRPreconditioner> SVD;\n  typedef typename MatrixType::RealScalar RealScalar;\n  static bool run(typename SVD::WorkMatrixType&, SVD&, Index, Index, RealScalar&) { return true; }\n};\n\ntemplate<typename MatrixType, int QRPreconditioner>\nstruct svd_precondition_2x2_block_to_be_real<MatrixType, QRPreconditioner, true>\n{\n  typedef JacobiSVD<MatrixType, QRPreconditioner> SVD;\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename MatrixType::RealScalar RealScalar;\n  static bool run(typename SVD::WorkMatrixType& work_matrix, SVD& svd, Index p, Index q, RealScalar& maxDiagEntry)\n  {\n    using std::sqrt;\n    using std::abs;\n    Scalar z;\n    JacobiRotation<Scalar> rot;\n    RealScalar n = sqrt(numext::abs2(work_matrix.coeff(p,p)) + numext::abs2(work_matrix.coeff(q,p)));\n\n    const RealScalar considerAsZero = (std::numeric_limits<RealScalar>::min)();\n    const RealScalar precision = NumTraits<Scalar>::epsilon();\n\n    if(n==0)\n    {\n      // make sure first column is zero\n      work_matrix.coeffRef(p,p) = work_matrix.coeffRef(q,p) = Scalar(0);\n\n      if(abs(numext::imag(work_matrix.coeff(p,q)))>considerAsZero)\n      {\n        // work_matrix.coeff(p,q) can be zero if work_matrix.coeff(q,p) is not zero but small enough to underflow when computing n\n        z = abs(work_matrix.coeff(p,q)) / work_matrix.coeff(p,q);\n        work_matrix.row(p) *= z;\n        if(svd.computeU()) svd.m_matrixU.col(p) *= conj(z);\n      }\n      if(abs(numext::imag(work_matrix.coeff(q,q)))>considerAsZero)\n      {\n        z = abs(work_matrix.coeff(q,q)) / work_matrix.coeff(q,q);\n        work_matrix.row(q) *= z;\n        if(svd.computeU()) svd.m_matrixU.col(q) *= conj(z);\n      }\n      // otherwise the second row is already zero, so we have nothing to do.\n    }\n    else\n    {\n      rot.c() = conj(work_matrix.coeff(p,p)) / n;\n      rot.s() = work_matrix.coeff(q,p) / n;\n      work_matrix.applyOnTheLeft(p,q,rot);\n      if(svd.computeU()) svd.m_matrixU.applyOnTheRight(p,q,rot.adjoint());\n      if(abs(numext::imag(work_matrix.coeff(p,q)))>considerAsZero)\n      {\n        z = abs(work_matrix.coeff(p,q)) / work_matrix.coeff(p,q);\n        work_matrix.col(q) *= z;\n        if(svd.computeV()) svd.m_matrixV.col(q) *= z;\n      }\n      if(abs(numext::imag(work_matrix.coeff(q,q)))>considerAsZero)\n      {\n        z = abs(work_matrix.coeff(q,q)) / work_matrix.coeff(q,q);\n        work_matrix.row(q) *= z;\n        if(svd.computeU()) svd.m_matrixU.col(q) *= conj(z);\n      }\n    }\n\n    // update largest diagonal entry\n    maxDiagEntry = numext::maxi<RealScalar>(maxDiagEntry,numext::maxi<RealScalar>(abs(work_matrix.coeff(p,p)), abs(work_matrix.coeff(q,q))));\n    // and check whether the 2x2 block is already diagonal\n    RealScalar threshold = numext::maxi<RealScalar>(considerAsZero, precision * maxDiagEntry);\n    return abs(work_matrix.coeff(p,q))>threshold || abs(work_matrix.coeff(q,p)) > threshold;\n  }\n};\n\ntemplate<typename _MatrixType, int QRPreconditioner> \nstruct traits<JacobiSVD<_MatrixType,QRPreconditioner> >\n        : traits<_MatrixType>\n{\n  typedef _MatrixType MatrixType;\n};\n\n} // end namespace internal\n\n/** \\ingroup SVD_Module\n  *\n  *\n  * \\class JacobiSVD\n  *\n  * \\brief Two-sided Jacobi SVD decomposition of a rectangular matrix\n  *\n  * \\tparam _MatrixType the type of the matrix of which we are computing the SVD decomposition\n  * \\tparam QRPreconditioner this optional parameter allows to specify the type of QR decomposition that will be used internally\n  *                        for the R-SVD step for non-square matrices. See discussion of possible values below.\n  *\n  * SVD decomposition consists in decomposing any n-by-p matrix \\a A as a product\n  *   \\f[ A = U S V^* \\f]\n  * where \\a U is a n-by-n unitary, \\a V is a p-by-p unitary, and \\a S is a n-by-p real positive matrix which is zero outside of its main diagonal;\n  * the diagonal entries of S are known as the \\em singular \\em values of \\a A and the columns of \\a U and \\a V are known as the left\n  * and right \\em singular \\em vectors of \\a A respectively.\n  *\n  * Singular values are always sorted in decreasing order.\n  *\n  * This JacobiSVD decomposition computes only the singular values by default. If you want \\a U or \\a V, you need to ask for them explicitly.\n  *\n  * You can ask for only \\em thin \\a U or \\a V to be computed, meaning the following. In case of a rectangular n-by-p matrix, letting \\a m be the\n  * smaller value among \\a n and \\a p, there are only \\a m singular vectors; the remaining columns of \\a U and \\a V do not correspond to actual\n  * singular vectors. Asking for \\em thin \\a U or \\a V means asking for only their \\a m first columns to be formed. So \\a U is then a n-by-m matrix,\n  * and \\a V is then a p-by-m matrix. Notice that thin \\a U and \\a V are all you need for (least squares) solving.\n  *\n  * Here's an example demonstrating basic usage:\n  * \\include JacobiSVD_basic.cpp\n  * Output: \\verbinclude JacobiSVD_basic.out\n  *\n  * This JacobiSVD class is a two-sided Jacobi R-SVD decomposition, ensuring optimal reliability and accuracy. The downside is that it's slower than\n  * bidiagonalizing SVD algorithms for large square matrices; however its complexity is still \\f$ O(n^2p) \\f$ where \\a n is the smaller dimension and\n  * \\a p is the greater dimension, meaning that it is still of the same order of complexity as the faster bidiagonalizing R-SVD algorithms.\n  * In particular, like any R-SVD, it takes advantage of non-squareness in that its complexity is only linear in the greater dimension.\n  *\n  * If the input matrix has inf or nan coefficients, the result of the computation is undefined, but the computation is guaranteed to\n  * terminate in finite (and reasonable) time.\n  *\n  * The possible values for QRPreconditioner are:\n  * \\li ColPivHouseholderQRPreconditioner is the default. In practice it's very safe. It uses column-pivoting QR.\n  * \\li FullPivHouseholderQRPreconditioner, is the safest and slowest. It uses full-pivoting QR.\n  *     Contrary to other QRs, it doesn't allow computing thin unitaries.\n  * \\li HouseholderQRPreconditioner is the fastest, and less safe and accurate than the pivoting variants. It uses non-pivoting QR.\n  *     This is very similar in safety and accuracy to the bidiagonalization process used by bidiagonalizing SVD algorithms (since bidiagonalization\n  *     is inherently non-pivoting). However the resulting SVD is still more reliable than bidiagonalizing SVDs because the Jacobi-based iterarive\n  *     process is more reliable than the optimized bidiagonal SVD iterations.\n  * \\li NoQRPreconditioner allows not to use a QR preconditioner at all. This is useful if you know that you will only be computing\n  *     JacobiSVD decompositions of square matrices. Non-square matrices require a QR preconditioner. Using this option will result in\n  *     faster compilation and smaller executable code. It won't significantly speed up computation, since JacobiSVD is always checking\n  *     if QR preconditioning is needed before applying it anyway.\n  *\n  * \\sa MatrixBase::jacobiSvd()\n  */\ntemplate<typename _MatrixType, int QRPreconditioner> class JacobiSVD\n : public SVDBase<JacobiSVD<_MatrixType,QRPreconditioner> >\n{\n    typedef SVDBase<JacobiSVD> Base;\n  public:\n\n    typedef _MatrixType MatrixType;\n    typedef typename MatrixType::Scalar Scalar;\n    typedef typename NumTraits<typename MatrixType::Scalar>::Real RealScalar;\n    enum {\n      RowsAtCompileTime = MatrixType::RowsAtCompileTime,\n      ColsAtCompileTime = MatrixType::ColsAtCompileTime,\n      DiagSizeAtCompileTime = EIGEN_SIZE_MIN_PREFER_DYNAMIC(RowsAtCompileTime,ColsAtCompileTime),\n      MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime,\n      MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime,\n      MaxDiagSizeAtCompileTime = EIGEN_SIZE_MIN_PREFER_FIXED(MaxRowsAtCompileTime,MaxColsAtCompileTime),\n      MatrixOptions = MatrixType::Options\n    };\n\n    typedef typename Base::MatrixUType MatrixUType;\n    typedef typename Base::MatrixVType MatrixVType;\n    typedef typename Base::SingularValuesType SingularValuesType;\n    \n    typedef typename internal::plain_row_type<MatrixType>::type RowType;\n    typedef typename internal::plain_col_type<MatrixType>::type ColType;\n    typedef Matrix<Scalar, DiagSizeAtCompileTime, DiagSizeAtCompileTime,\n                   MatrixOptions, MaxDiagSizeAtCompileTime, MaxDiagSizeAtCompileTime>\n            WorkMatrixType;\n\n    /** \\brief Default Constructor.\n      *\n      * The default constructor is useful in cases in which the user intends to\n      * perform decompositions via JacobiSVD::compute(const MatrixType&).\n      */\n    JacobiSVD()\n    {}\n\n\n    /** \\brief Default Constructor with memory preallocation\n      *\n      * Like the default constructor but with preallocation of the internal data\n      * according to the specified problem size.\n      * \\sa JacobiSVD()\n      */\n    JacobiSVD(Index rows, Index cols, unsigned int computationOptions = 0)\n    {\n      allocate(rows, cols, computationOptions);\n    }\n\n    /** \\brief Constructor performing the decomposition of given matrix.\n     *\n     * \\param matrix the matrix to decompose\n     * \\param computationOptions optional parameter allowing to specify if you want full or thin U or V unitaries to be computed.\n     *                           By default, none is computed. This is a bit-field, the possible bits are #ComputeFullU, #ComputeThinU,\n     *                           #ComputeFullV, #ComputeThinV.\n     *\n     * Thin unitaries are only available if your matrix type has a Dynamic number of columns (for example MatrixXf). They also are not\n     * available with the (non-default) FullPivHouseholderQR preconditioner.\n     */\n    explicit JacobiSVD(const MatrixType& matrix, unsigned int computationOptions = 0)\n    {\n      compute(matrix, computationOptions);\n    }\n\n    /** \\brief Method performing the decomposition of given matrix using custom options.\n     *\n     * \\param matrix the matrix to decompose\n     * \\param computationOptions optional parameter allowing to specify if you want full or thin U or V unitaries to be computed.\n     *                           By default, none is computed. This is a bit-field, the possible bits are #ComputeFullU, #ComputeThinU,\n     *                           #ComputeFullV, #ComputeThinV.\n     *\n     * Thin unitaries are only available if your matrix type has a Dynamic number of columns (for example MatrixXf). They also are not\n     * available with the (non-default) FullPivHouseholderQR preconditioner.\n     */\n    JacobiSVD& compute(const MatrixType& matrix, unsigned int computationOptions);\n\n    /** \\brief Method performing the decomposition of given matrix using current options.\n     *\n     * \\param matrix the matrix to decompose\n     *\n     * This method uses the current \\a computationOptions, as already passed to the constructor or to compute(const MatrixType&, unsigned int).\n     */\n    JacobiSVD& compute(const MatrixType& matrix)\n    {\n      return compute(matrix, m_computationOptions);\n    }\n\n    using Base::computeU;\n    using Base::computeV;\n    using Base::rows;\n    using Base::cols;\n    using Base::rank;\n\n  private:\n    void allocate(Index rows, Index cols, unsigned int computationOptions);\n\n  protected:\n    using Base::m_matrixU;\n    using Base::m_matrixV;\n    using Base::m_singularValues;\n    using Base::m_isInitialized;\n    using Base::m_isAllocated;\n    using Base::m_usePrescribedThreshold;\n    using Base::m_computeFullU;\n    using Base::m_computeThinU;\n    using Base::m_computeFullV;\n    using Base::m_computeThinV;\n    using Base::m_computationOptions;\n    using Base::m_nonzeroSingularValues;\n    using Base::m_rows;\n    using Base::m_cols;\n    using Base::m_diagSize;\n    using Base::m_prescribedThreshold;\n    WorkMatrixType m_workMatrix;\n\n    template<typename __MatrixType, int _QRPreconditioner, bool _IsComplex>\n    friend struct internal::svd_precondition_2x2_block_to_be_real;\n    template<typename __MatrixType, int _QRPreconditioner, int _Case, bool _DoAnything>\n    friend struct internal::qr_preconditioner_impl;\n\n    internal::qr_preconditioner_impl<MatrixType, QRPreconditioner, internal::PreconditionIfMoreColsThanRows> m_qr_precond_morecols;\n    internal::qr_preconditioner_impl<MatrixType, QRPreconditioner, internal::PreconditionIfMoreRowsThanCols> m_qr_precond_morerows;\n    MatrixType m_scaledMatrix;\n};\n\ntemplate<typename MatrixType, int QRPreconditioner>\nvoid JacobiSVD<MatrixType, QRPreconditioner>::allocate(Eigen::Index rows, Eigen::Index cols, unsigned int computationOptions)\n{\n  eigen_assert(rows >= 0 && cols >= 0);\n\n  if (m_isAllocated &&\n      rows == m_rows &&\n      cols == m_cols &&\n      computationOptions == m_computationOptions)\n  {\n    return;\n  }\n\n  m_rows = rows;\n  m_cols = cols;\n  m_isInitialized = false;\n  m_isAllocated = true;\n  m_computationOptions = computationOptions;\n  m_computeFullU = (computationOptions & ComputeFullU) != 0;\n  m_computeThinU = (computationOptions & ComputeThinU) != 0;\n  m_computeFullV = (computationOptions & ComputeFullV) != 0;\n  m_computeThinV = (computationOptions & ComputeThinV) != 0;\n  eigen_assert(!(m_computeFullU && m_computeThinU) && \"JacobiSVD: you can't ask for both full and thin U\");\n  eigen_assert(!(m_computeFullV && m_computeThinV) && \"JacobiSVD: you can't ask for both full and thin V\");\n  eigen_assert(EIGEN_IMPLIES(m_computeThinU || m_computeThinV, MatrixType::ColsAtCompileTime==Dynamic) &&\n              \"JacobiSVD: thin U and V are only available when your matrix has a dynamic number of columns.\");\n  if (QRPreconditioner == FullPivHouseholderQRPreconditioner)\n  {\n      eigen_assert(!(m_computeThinU || m_computeThinV) &&\n              \"JacobiSVD: can't compute thin U or thin V with the FullPivHouseholderQR preconditioner. \"\n              \"Use the ColPivHouseholderQR preconditioner instead.\");\n  }\n  m_diagSize = (std::min)(m_rows, m_cols);\n  m_singularValues.resize(m_diagSize);\n  if(RowsAtCompileTime==Dynamic)\n    m_matrixU.resize(m_rows, m_computeFullU ? m_rows\n                            : m_computeThinU ? m_diagSize\n                            : 0);\n  if(ColsAtCompileTime==Dynamic)\n    m_matrixV.resize(m_cols, m_computeFullV ? m_cols\n                            : m_computeThinV ? m_diagSize\n                            : 0);\n  m_workMatrix.resize(m_diagSize, m_diagSize);\n  \n  if(m_cols>m_rows)   m_qr_precond_morecols.allocate(*this);\n  if(m_rows>m_cols)   m_qr_precond_morerows.allocate(*this);\n  if(m_rows!=m_cols)  m_scaledMatrix.resize(rows,cols);\n}\n\ntemplate<typename MatrixType, int QRPreconditioner>\nJacobiSVD<MatrixType, QRPreconditioner>&\nJacobiSVD<MatrixType, QRPreconditioner>::compute(const MatrixType& matrix, unsigned int computationOptions)\n{\n  using std::abs;\n  allocate(matrix.rows(), matrix.cols(), computationOptions);\n\n  // currently we stop when we reach precision 2*epsilon as the last bit of precision can require an unreasonable number of iterations,\n  // only worsening the precision of U and V as we accumulate more rotations\n  const RealScalar precision = RealScalar(2) * NumTraits<Scalar>::epsilon();\n\n  // limit for denormal numbers to be considered zero in order to avoid infinite loops (see bug 286)\n  const RealScalar considerAsZero = (std::numeric_limits<RealScalar>::min)();\n\n  // Scaling factor to reduce over/under-flows\n  RealScalar scale = matrix.cwiseAbs().maxCoeff();\n  if(scale==RealScalar(0)) scale = RealScalar(1);\n  \n  /*** step 1. The R-SVD step: we use a QR decomposition to reduce to the case of a square matrix */\n\n  if(m_rows!=m_cols)\n  {\n    m_scaledMatrix = matrix / scale;\n    m_qr_precond_morecols.run(*this, m_scaledMatrix);\n    m_qr_precond_morerows.run(*this, m_scaledMatrix);\n  }\n  else\n  {\n    m_workMatrix = matrix.block(0,0,m_diagSize,m_diagSize) / scale;\n    if(m_computeFullU) m_matrixU.setIdentity(m_rows,m_rows);\n    if(m_computeThinU) m_matrixU.setIdentity(m_rows,m_diagSize);\n    if(m_computeFullV) m_matrixV.setIdentity(m_cols,m_cols);\n    if(m_computeThinV) m_matrixV.setIdentity(m_cols, m_diagSize);\n  }\n\n  /*** step 2. The main Jacobi SVD iteration. ***/\n  RealScalar maxDiagEntry = m_workMatrix.cwiseAbs().diagonal().maxCoeff();\n\n  bool finished = false;\n  while(!finished)\n  {\n    finished = true;\n\n    // do a sweep: for all index pairs (p,q), perform SVD of the corresponding 2x2 sub-matrix\n\n    for(Index p = 1; p < m_diagSize; ++p)\n    {\n      for(Index q = 0; q < p; ++q)\n      {\n        // if this 2x2 sub-matrix is not diagonal already...\n        // notice that this comparison will evaluate to false if any NaN is involved, ensuring that NaN's don't\n        // keep us iterating forever. Similarly, small denormal numbers are considered zero.\n        RealScalar threshold = numext::maxi<RealScalar>(considerAsZero, precision * maxDiagEntry);\n        if(abs(m_workMatrix.coeff(p,q))>threshold || abs(m_workMatrix.coeff(q,p)) > threshold)\n        {\n          finished = false;\n          // perform SVD decomposition of 2x2 sub-matrix corresponding to indices p,q to make it diagonal\n          // the complex to real operation returns true if the updated 2x2 block is not already diagonal\n          if(internal::svd_precondition_2x2_block_to_be_real<MatrixType, QRPreconditioner>::run(m_workMatrix, *this, p, q, maxDiagEntry))\n          {\n            JacobiRotation<RealScalar> j_left, j_right;\n            internal::real_2x2_jacobi_svd(m_workMatrix, p, q, &j_left, &j_right);\n\n            // accumulate resulting Jacobi rotations\n            m_workMatrix.applyOnTheLeft(p,q,j_left);\n            if(computeU()) m_matrixU.applyOnTheRight(p,q,j_left.transpose());\n\n            m_workMatrix.applyOnTheRight(p,q,j_right);\n            if(computeV()) m_matrixV.applyOnTheRight(p,q,j_right);\n\n            // keep track of the largest diagonal coefficient\n            maxDiagEntry = numext::maxi<RealScalar>(maxDiagEntry,numext::maxi<RealScalar>(abs(m_workMatrix.coeff(p,p)), abs(m_workMatrix.coeff(q,q))));\n          }\n        }\n      }\n    }\n  }\n\n  /*** step 3. The work matrix is now diagonal, so ensure it's positive so its diagonal entries are the singular values ***/\n\n  for(Index i = 0; i < m_diagSize; ++i)\n  {\n    // For a complex matrix, some diagonal coefficients might note have been\n    // treated by svd_precondition_2x2_block_to_be_real, and the imaginary part\n    // of some diagonal entry might not be null.\n    if(NumTraits<Scalar>::IsComplex && abs(numext::imag(m_workMatrix.coeff(i,i)))>considerAsZero)\n    {\n      RealScalar a = abs(m_workMatrix.coeff(i,i));\n      m_singularValues.coeffRef(i) = abs(a);\n      if(computeU()) m_matrixU.col(i) *= m_workMatrix.coeff(i,i)/a;\n    }\n    else\n    {\n      // m_workMatrix.coeff(i,i) is already real, no difficulty:\n      RealScalar a = numext::real(m_workMatrix.coeff(i,i));\n      m_singularValues.coeffRef(i) = abs(a);\n      if(computeU() && (a<RealScalar(0))) m_matrixU.col(i) = -m_matrixU.col(i);\n    }\n  }\n  \n  m_singularValues *= scale;\n\n  /*** step 4. Sort singular values in descending order and compute the number of nonzero singular values ***/\n\n  m_nonzeroSingularValues = m_diagSize;\n  for(Index i = 0; i < m_diagSize; i++)\n  {\n    Index pos;\n    RealScalar maxRemainingSingularValue = m_singularValues.tail(m_diagSize-i).maxCoeff(&pos);\n    if(maxRemainingSingularValue == RealScalar(0))\n    {\n      m_nonzeroSingularValues = i;\n      break;\n    }\n    if(pos)\n    {\n      pos += i;\n      std::swap(m_singularValues.coeffRef(i), m_singularValues.coeffRef(pos));\n      if(computeU()) m_matrixU.col(pos).swap(m_matrixU.col(i));\n      if(computeV()) m_matrixV.col(pos).swap(m_matrixV.col(i));\n    }\n  }\n\n  m_isInitialized = true;\n  return *this;\n}\n\n/** \\svd_module\n  *\n  * \\return the singular value decomposition of \\c *this computed by two-sided\n  * Jacobi transformations.\n  *\n  * \\sa class JacobiSVD\n  */\ntemplate<typename Derived>\nJacobiSVD<typename MatrixBase<Derived>::PlainObject>\nMatrixBase<Derived>::jacobiSvd(unsigned int computationOptions) const\n{\n  return JacobiSVD<PlainObject>(*this, computationOptions);\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_JACOBISVD_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SVD/JacobiSVD_LAPACKE.h",
    "content": "/*\n Copyright (c) 2011, Intel Corporation. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without modification,\n are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n   list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n * Neither the name of Intel Corporation nor the names of its contributors may\n   be used to endorse or promote products derived from this software without\n   specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\n ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n ********************************************************************************\n *   Content : Eigen bindings to LAPACKe\n *    Singular Value Decomposition - SVD.\n ********************************************************************************\n*/\n\n#ifndef EIGEN_JACOBISVD_LAPACKE_H\n#define EIGEN_JACOBISVD_LAPACKE_H\n\nnamespace Eigen { \n\n/** \\internal Specialization for the data types supported by LAPACKe */\n\n#define EIGEN_LAPACKE_SVD(EIGTYPE, LAPACKE_TYPE, LAPACKE_RTYPE, LAPACKE_PREFIX, EIGCOLROW, LAPACKE_COLROW) \\\ntemplate<> inline \\\nJacobiSVD<Matrix<EIGTYPE, Dynamic, Dynamic, EIGCOLROW, Dynamic, Dynamic>, ColPivHouseholderQRPreconditioner>& \\\nJacobiSVD<Matrix<EIGTYPE, Dynamic, Dynamic, EIGCOLROW, Dynamic, Dynamic>, ColPivHouseholderQRPreconditioner>::compute(const Matrix<EIGTYPE, Dynamic, Dynamic, EIGCOLROW, Dynamic, Dynamic>& matrix, unsigned int computationOptions) \\\n{ \\\n  typedef Matrix<EIGTYPE, Dynamic, Dynamic, EIGCOLROW, Dynamic, Dynamic> MatrixType; \\\n  /*typedef MatrixType::Scalar Scalar;*/ \\\n  /*typedef MatrixType::RealScalar RealScalar;*/ \\\n  allocate(matrix.rows(), matrix.cols(), computationOptions); \\\n\\\n  /*const RealScalar precision = RealScalar(2) * NumTraits<Scalar>::epsilon();*/ \\\n  m_nonzeroSingularValues = m_diagSize; \\\n\\\n  lapack_int lda = internal::convert_index<lapack_int>(matrix.outerStride()), ldu, ldvt; \\\n  lapack_int matrix_order = LAPACKE_COLROW; \\\n  char jobu, jobvt; \\\n  LAPACKE_TYPE *u, *vt, dummy; \\\n  jobu  = (m_computeFullU) ? 'A' : (m_computeThinU) ? 'S' : 'N'; \\\n  jobvt = (m_computeFullV) ? 'A' : (m_computeThinV) ? 'S' : 'N'; \\\n  if (computeU()) { \\\n    ldu  = internal::convert_index<lapack_int>(m_matrixU.outerStride()); \\\n    u    = (LAPACKE_TYPE*)m_matrixU.data(); \\\n  } else { ldu=1; u=&dummy; }\\\n  MatrixType localV; \\\n  lapack_int vt_rows = (m_computeFullV) ? internal::convert_index<lapack_int>(m_cols) : (m_computeThinV) ? internal::convert_index<lapack_int>(m_diagSize) : 1; \\\n  if (computeV()) { \\\n    localV.resize(vt_rows, m_cols); \\\n    ldvt  = internal::convert_index<lapack_int>(localV.outerStride()); \\\n    vt   = (LAPACKE_TYPE*)localV.data(); \\\n  } else { ldvt=1; vt=&dummy; }\\\n  Matrix<LAPACKE_RTYPE, Dynamic, Dynamic> superb; superb.resize(m_diagSize, 1); \\\n  MatrixType m_temp; m_temp = matrix; \\\n  LAPACKE_##LAPACKE_PREFIX##gesvd( matrix_order, jobu, jobvt, internal::convert_index<lapack_int>(m_rows), internal::convert_index<lapack_int>(m_cols), (LAPACKE_TYPE*)m_temp.data(), lda, (LAPACKE_RTYPE*)m_singularValues.data(), u, ldu, vt, ldvt, superb.data()); \\\n  if (computeV()) m_matrixV = localV.adjoint(); \\\n /* for(int i=0;i<m_diagSize;i++) if (m_singularValues.coeffRef(i) < precision) { m_nonzeroSingularValues--; m_singularValues.coeffRef(i)=RealScalar(0);}*/ \\\n  m_isInitialized = true; \\\n  return *this; \\\n}\n\nEIGEN_LAPACKE_SVD(double,   double,                double, d, ColMajor, LAPACK_COL_MAJOR)\nEIGEN_LAPACKE_SVD(float,    float,                 float , s, ColMajor, LAPACK_COL_MAJOR)\nEIGEN_LAPACKE_SVD(dcomplex, lapack_complex_double, double, z, ColMajor, LAPACK_COL_MAJOR)\nEIGEN_LAPACKE_SVD(scomplex, lapack_complex_float,  float , c, ColMajor, LAPACK_COL_MAJOR)\n\nEIGEN_LAPACKE_SVD(double,   double,                double, d, RowMajor, LAPACK_ROW_MAJOR)\nEIGEN_LAPACKE_SVD(float,    float,                 float , s, RowMajor, LAPACK_ROW_MAJOR)\nEIGEN_LAPACKE_SVD(dcomplex, lapack_complex_double, double, z, RowMajor, LAPACK_ROW_MAJOR)\nEIGEN_LAPACKE_SVD(scomplex, lapack_complex_float,  float , c, RowMajor, LAPACK_ROW_MAJOR)\n\n} // end namespace Eigen\n\n#endif // EIGEN_JACOBISVD_LAPACKE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SVD/SVDBase.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009-2010 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// Copyright (C) 2013 Gauthier Brun <brun.gauthier@gmail.com>\n// Copyright (C) 2013 Nicolas Carre <nicolas.carre@ensimag.fr>\n// Copyright (C) 2013 Jean Ceccato <jean.ceccato@ensimag.fr>\n// Copyright (C) 2013 Pierre Zoppitelli <pierre.zoppitelli@ensimag.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SVDBASE_H\n#define EIGEN_SVDBASE_H\n\nnamespace Eigen {\n\nnamespace internal {\ntemplate<typename Derived> struct traits<SVDBase<Derived> >\n : traits<Derived>\n{\n  typedef MatrixXpr XprKind;\n  typedef SolverStorage StorageKind;\n  typedef int StorageIndex;\n  enum { Flags = 0 };\n};\n}\n\n/** \\ingroup SVD_Module\n *\n *\n * \\class SVDBase\n *\n * \\brief Base class of SVD algorithms\n *\n * \\tparam Derived the type of the actual SVD decomposition\n *\n * SVD decomposition consists in decomposing any n-by-p matrix \\a A as a product\n *   \\f[ A = U S V^* \\f]\n * where \\a U is a n-by-n unitary, \\a V is a p-by-p unitary, and \\a S is a n-by-p real positive matrix which is zero outside of its main diagonal;\n * the diagonal entries of S are known as the \\em singular \\em values of \\a A and the columns of \\a U and \\a V are known as the left\n * and right \\em singular \\em vectors of \\a A respectively.\n *\n * Singular values are always sorted in decreasing order.\n *\n * \n * You can ask for only \\em thin \\a U or \\a V to be computed, meaning the following. In case of a rectangular n-by-p matrix, letting \\a m be the\n * smaller value among \\a n and \\a p, there are only \\a m singular vectors; the remaining columns of \\a U and \\a V do not correspond to actual\n * singular vectors. Asking for \\em thin \\a U or \\a V means asking for only their \\a m first columns to be formed. So \\a U is then a n-by-m matrix,\n * and \\a V is then a p-by-m matrix. Notice that thin \\a U and \\a V are all you need for (least squares) solving.\n *  \n * If the input matrix has inf or nan coefficients, the result of the computation is undefined, but the computation is guaranteed to\n * terminate in finite (and reasonable) time.\n * \\sa class BDCSVD, class JacobiSVD\n */\ntemplate<typename Derived> class SVDBase\n : public SolverBase<SVDBase<Derived> >\n{\npublic: \n   \n  template<typename Derived_>\n  friend struct internal::solve_assertion;\n\n  typedef typename internal::traits<Derived>::MatrixType MatrixType;\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename NumTraits<typename MatrixType::Scalar>::Real RealScalar;\n  typedef typename Eigen::internal::traits<SVDBase>::StorageIndex StorageIndex;\n  typedef Eigen::Index Index; ///< \\deprecated since Eigen 3.3\n  enum {\n    RowsAtCompileTime = MatrixType::RowsAtCompileTime,\n    ColsAtCompileTime = MatrixType::ColsAtCompileTime,\n    DiagSizeAtCompileTime = EIGEN_SIZE_MIN_PREFER_DYNAMIC(RowsAtCompileTime,ColsAtCompileTime),\n    MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime,\n    MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime,\n    MaxDiagSizeAtCompileTime = EIGEN_SIZE_MIN_PREFER_FIXED(MaxRowsAtCompileTime,MaxColsAtCompileTime),\n    MatrixOptions = MatrixType::Options\n  };\n\n  typedef Matrix<Scalar, RowsAtCompileTime, RowsAtCompileTime, MatrixOptions, MaxRowsAtCompileTime, MaxRowsAtCompileTime> MatrixUType;\n  typedef Matrix<Scalar, ColsAtCompileTime, ColsAtCompileTime, MatrixOptions, MaxColsAtCompileTime, MaxColsAtCompileTime> MatrixVType;\n  typedef typename internal::plain_diag_type<MatrixType, RealScalar>::type SingularValuesType;\n  \n  Derived& derived() { return *static_cast<Derived*>(this); }\n  const Derived& derived() const { return *static_cast<const Derived*>(this); }\n\n  /** \\returns the \\a U matrix.\n   *\n   * For the SVD decomposition of a n-by-p matrix, letting \\a m be the minimum of \\a n and \\a p,\n   * the U matrix is n-by-n if you asked for \\link Eigen::ComputeFullU ComputeFullU \\endlink, and is n-by-m if you asked for \\link Eigen::ComputeThinU ComputeThinU \\endlink.\n   *\n   * The \\a m first columns of \\a U are the left singular vectors of the matrix being decomposed.\n   *\n   * This method asserts that you asked for \\a U to be computed.\n   */\n  const MatrixUType& matrixU() const\n  {\n    eigen_assert(m_isInitialized && \"SVD is not initialized.\");\n    eigen_assert(computeU() && \"This SVD decomposition didn't compute U. Did you ask for it?\");\n    return m_matrixU;\n  }\n\n  /** \\returns the \\a V matrix.\n   *\n   * For the SVD decomposition of a n-by-p matrix, letting \\a m be the minimum of \\a n and \\a p,\n   * the V matrix is p-by-p if you asked for \\link Eigen::ComputeFullV ComputeFullV \\endlink, and is p-by-m if you asked for \\link Eigen::ComputeThinV ComputeThinV \\endlink.\n   *\n   * The \\a m first columns of \\a V are the right singular vectors of the matrix being decomposed.\n   *\n   * This method asserts that you asked for \\a V to be computed.\n   */\n  const MatrixVType& matrixV() const\n  {\n    eigen_assert(m_isInitialized && \"SVD is not initialized.\");\n    eigen_assert(computeV() && \"This SVD decomposition didn't compute V. Did you ask for it?\");\n    return m_matrixV;\n  }\n\n  /** \\returns the vector of singular values.\n   *\n   * For the SVD decomposition of a n-by-p matrix, letting \\a m be the minimum of \\a n and \\a p, the\n   * returned vector has size \\a m.  Singular values are always sorted in decreasing order.\n   */\n  const SingularValuesType& singularValues() const\n  {\n    eigen_assert(m_isInitialized && \"SVD is not initialized.\");\n    return m_singularValues;\n  }\n\n  /** \\returns the number of singular values that are not exactly 0 */\n  Index nonzeroSingularValues() const\n  {\n    eigen_assert(m_isInitialized && \"SVD is not initialized.\");\n    return m_nonzeroSingularValues;\n  }\n  \n  /** \\returns the rank of the matrix of which \\c *this is the SVD.\n    *\n    * \\note This method has to determine which singular values should be considered nonzero.\n    *       For that, it uses the threshold value that you can control by calling\n    *       setThreshold(const RealScalar&).\n    */\n  inline Index rank() const\n  {\n    using std::abs;\n    eigen_assert(m_isInitialized && \"JacobiSVD is not initialized.\");\n    if(m_singularValues.size()==0) return 0;\n    RealScalar premultiplied_threshold = numext::maxi<RealScalar>(m_singularValues.coeff(0) * threshold(), (std::numeric_limits<RealScalar>::min)());\n    Index i = m_nonzeroSingularValues-1;\n    while(i>=0 && m_singularValues.coeff(i) < premultiplied_threshold) --i;\n    return i+1;\n  }\n  \n  /** Allows to prescribe a threshold to be used by certain methods, such as rank() and solve(),\n    * which need to determine when singular values are to be considered nonzero.\n    * This is not used for the SVD decomposition itself.\n    *\n    * When it needs to get the threshold value, Eigen calls threshold().\n    * The default is \\c NumTraits<Scalar>::epsilon()\n    *\n    * \\param threshold The new value to use as the threshold.\n    *\n    * A singular value will be considered nonzero if its value is strictly greater than\n    *  \\f$ \\vert singular value \\vert \\leqslant threshold \\times \\vert max singular value \\vert \\f$.\n    *\n    * If you want to come back to the default behavior, call setThreshold(Default_t)\n    */\n  Derived& setThreshold(const RealScalar& threshold)\n  {\n    m_usePrescribedThreshold = true;\n    m_prescribedThreshold = threshold;\n    return derived();\n  }\n\n  /** Allows to come back to the default behavior, letting Eigen use its default formula for\n    * determining the threshold.\n    *\n    * You should pass the special object Eigen::Default as parameter here.\n    * \\code svd.setThreshold(Eigen::Default); \\endcode\n    *\n    * See the documentation of setThreshold(const RealScalar&).\n    */\n  Derived& setThreshold(Default_t)\n  {\n    m_usePrescribedThreshold = false;\n    return derived();\n  }\n\n  /** Returns the threshold that will be used by certain methods such as rank().\n    *\n    * See the documentation of setThreshold(const RealScalar&).\n    */\n  RealScalar threshold() const\n  {\n    eigen_assert(m_isInitialized || m_usePrescribedThreshold);\n    // this temporary is needed to workaround a MSVC issue\n    Index diagSize = (std::max<Index>)(1,m_diagSize);\n    return m_usePrescribedThreshold ? m_prescribedThreshold\n                                    : RealScalar(diagSize)*NumTraits<Scalar>::epsilon();\n  }\n\n  /** \\returns true if \\a U (full or thin) is asked for in this SVD decomposition */\n  inline bool computeU() const { return m_computeFullU || m_computeThinU; }\n  /** \\returns true if \\a V (full or thin) is asked for in this SVD decomposition */\n  inline bool computeV() const { return m_computeFullV || m_computeThinV; }\n\n  inline Index rows() const { return m_rows; }\n  inline Index cols() const { return m_cols; }\n  \n  #ifdef EIGEN_PARSED_BY_DOXYGEN\n  /** \\returns a (least squares) solution of \\f$ A x = b \\f$ using the current SVD decomposition of A.\n    *\n    * \\param b the right-hand-side of the equation to solve.\n    *\n    * \\note Solving requires both U and V to be computed. Thin U and V are enough, there is no need for full U or V.\n    *\n    * \\note SVD solving is implicitly least-squares. Thus, this method serves both purposes of exact solving and least-squares solving.\n    * In other words, the returned solution is guaranteed to minimize the Euclidean norm \\f$ \\Vert A x - b \\Vert \\f$.\n    */\n  template<typename Rhs>\n  inline const Solve<Derived, Rhs>\n  solve(const MatrixBase<Rhs>& b) const;\n  #endif\n\n  #ifndef EIGEN_PARSED_BY_DOXYGEN\n  template<typename RhsType, typename DstType>\n  void _solve_impl(const RhsType &rhs, DstType &dst) const;\n\n  template<bool Conjugate, typename RhsType, typename DstType>\n  void _solve_impl_transposed(const RhsType &rhs, DstType &dst) const;\n  #endif\n\nprotected:\n  \n  static void check_template_parameters()\n  {\n    EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar);\n  }\n\n  template<bool Transpose_, typename Rhs>\n  void _check_solve_assertion(const Rhs& b) const {\n      EIGEN_ONLY_USED_FOR_DEBUG(b);\n      eigen_assert(m_isInitialized && \"SVD is not initialized.\");\n      eigen_assert(computeU() && computeV() && \"SVDBase::solve(): Both unitaries U and V are required to be computed (thin unitaries suffice).\");\n      eigen_assert((Transpose_?cols():rows())==b.rows() && \"SVDBase::solve(): invalid number of rows of the right hand side matrix b\");\n  }\n  \n  // return true if already allocated\n  bool allocate(Index rows, Index cols, unsigned int computationOptions) ;\n\n  MatrixUType m_matrixU;\n  MatrixVType m_matrixV;\n  SingularValuesType m_singularValues;\n  bool m_isInitialized, m_isAllocated, m_usePrescribedThreshold;\n  bool m_computeFullU, m_computeThinU;\n  bool m_computeFullV, m_computeThinV;\n  unsigned int m_computationOptions;\n  Index m_nonzeroSingularValues, m_rows, m_cols, m_diagSize;\n  RealScalar m_prescribedThreshold;\n\n  /** \\brief Default Constructor.\n   *\n   * Default constructor of SVDBase\n   */\n  SVDBase()\n    : m_isInitialized(false),\n      m_isAllocated(false),\n      m_usePrescribedThreshold(false),\n      m_computeFullU(false),\n      m_computeThinU(false),\n      m_computeFullV(false),\n      m_computeThinV(false),\n      m_computationOptions(0),\n      m_rows(-1), m_cols(-1), m_diagSize(0)\n  {\n    check_template_parameters();\n  }\n\n\n};\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\ntemplate<typename Derived>\ntemplate<typename RhsType, typename DstType>\nvoid SVDBase<Derived>::_solve_impl(const RhsType &rhs, DstType &dst) const\n{\n  // A = U S V^*\n  // So A^{-1} = V S^{-1} U^*\n\n  Matrix<typename RhsType::Scalar, Dynamic, RhsType::ColsAtCompileTime, 0, MatrixType::MaxRowsAtCompileTime, RhsType::MaxColsAtCompileTime> tmp;\n  Index l_rank = rank();\n  tmp.noalias() =  m_matrixU.leftCols(l_rank).adjoint() * rhs;\n  tmp = m_singularValues.head(l_rank).asDiagonal().inverse() * tmp;\n  dst = m_matrixV.leftCols(l_rank) * tmp;\n}\n\ntemplate<typename Derived>\ntemplate<bool Conjugate, typename RhsType, typename DstType>\nvoid SVDBase<Derived>::_solve_impl_transposed(const RhsType &rhs, DstType &dst) const\n{\n  // A = U S V^*\n  // So  A^{-*} = U S^{-1} V^*\n  // And A^{-T} = U_conj S^{-1} V^T\n  Matrix<typename RhsType::Scalar, Dynamic, RhsType::ColsAtCompileTime, 0, MatrixType::MaxRowsAtCompileTime, RhsType::MaxColsAtCompileTime> tmp;\n  Index l_rank = rank();\n\n  tmp.noalias() =  m_matrixV.leftCols(l_rank).transpose().template conjugateIf<Conjugate>() * rhs;\n  tmp = m_singularValues.head(l_rank).asDiagonal().inverse() * tmp;\n  dst = m_matrixU.template conjugateIf<!Conjugate>().leftCols(l_rank) * tmp;\n}\n#endif\n\ntemplate<typename MatrixType>\nbool SVDBase<MatrixType>::allocate(Index rows, Index cols, unsigned int computationOptions)\n{\n  eigen_assert(rows >= 0 && cols >= 0);\n\n  if (m_isAllocated &&\n      rows == m_rows &&\n      cols == m_cols &&\n      computationOptions == m_computationOptions)\n  {\n    return true;\n  }\n\n  m_rows = rows;\n  m_cols = cols;\n  m_isInitialized = false;\n  m_isAllocated = true;\n  m_computationOptions = computationOptions;\n  m_computeFullU = (computationOptions & ComputeFullU) != 0;\n  m_computeThinU = (computationOptions & ComputeThinU) != 0;\n  m_computeFullV = (computationOptions & ComputeFullV) != 0;\n  m_computeThinV = (computationOptions & ComputeThinV) != 0;\n  eigen_assert(!(m_computeFullU && m_computeThinU) && \"SVDBase: you can't ask for both full and thin U\");\n  eigen_assert(!(m_computeFullV && m_computeThinV) && \"SVDBase: you can't ask for both full and thin V\");\n  eigen_assert(EIGEN_IMPLIES(m_computeThinU || m_computeThinV, MatrixType::ColsAtCompileTime==Dynamic) &&\n\t       \"SVDBase: thin U and V are only available when your matrix has a dynamic number of columns.\");\n\n  m_diagSize = (std::min)(m_rows, m_cols);\n  m_singularValues.resize(m_diagSize);\n  if(RowsAtCompileTime==Dynamic)\n    m_matrixU.resize(m_rows, m_computeFullU ? m_rows : m_computeThinU ? m_diagSize : 0);\n  if(ColsAtCompileTime==Dynamic)\n    m_matrixV.resize(m_cols, m_computeFullV ? m_cols : m_computeThinV ? m_diagSize : 0);\n\n  return false;\n}\n\n}// end namespace\n\n#endif // EIGEN_SVDBASE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SVD/UpperBidiagonalization.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2013-2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_BIDIAGONALIZATION_H\n#define EIGEN_BIDIAGONALIZATION_H\n\nnamespace Eigen { \n\nnamespace internal {\n// UpperBidiagonalization will probably be replaced by a Bidiagonalization class, don't want to make it stable API.\n// At the same time, it's useful to keep for now as it's about the only thing that is testing the BandMatrix class.\n\ntemplate<typename _MatrixType> class UpperBidiagonalization\n{\n  public:\n\n    typedef _MatrixType MatrixType;\n    enum {\n      RowsAtCompileTime = MatrixType::RowsAtCompileTime,\n      ColsAtCompileTime = MatrixType::ColsAtCompileTime,\n      ColsAtCompileTimeMinusOne = internal::decrement_size<ColsAtCompileTime>::ret\n    };\n    typedef typename MatrixType::Scalar Scalar;\n    typedef typename MatrixType::RealScalar RealScalar;\n    typedef Eigen::Index Index; ///< \\deprecated since Eigen 3.3\n    typedef Matrix<Scalar, 1, ColsAtCompileTime> RowVectorType;\n    typedef Matrix<Scalar, RowsAtCompileTime, 1> ColVectorType;\n    typedef BandMatrix<RealScalar, ColsAtCompileTime, ColsAtCompileTime, 1, 0, RowMajor> BidiagonalType;\n    typedef Matrix<Scalar, ColsAtCompileTime, 1> DiagVectorType;\n    typedef Matrix<Scalar, ColsAtCompileTimeMinusOne, 1> SuperDiagVectorType;\n    typedef HouseholderSequence<\n              const MatrixType,\n              const typename internal::remove_all<typename Diagonal<const MatrixType,0>::ConjugateReturnType>::type\n            > HouseholderUSequenceType;\n    typedef HouseholderSequence<\n              const typename internal::remove_all<typename MatrixType::ConjugateReturnType>::type,\n              Diagonal<const MatrixType,1>,\n              OnTheRight\n            > HouseholderVSequenceType;\n    \n    /**\n    * \\brief Default Constructor.\n    *\n    * The default constructor is useful in cases in which the user intends to\n    * perform decompositions via Bidiagonalization::compute(const MatrixType&).\n    */\n    UpperBidiagonalization() : m_householder(), m_bidiagonal(), m_isInitialized(false) {}\n\n    explicit UpperBidiagonalization(const MatrixType& matrix)\n      : m_householder(matrix.rows(), matrix.cols()),\n        m_bidiagonal(matrix.cols(), matrix.cols()),\n        m_isInitialized(false)\n    {\n      compute(matrix);\n    }\n    \n    UpperBidiagonalization& compute(const MatrixType& matrix);\n    UpperBidiagonalization& computeUnblocked(const MatrixType& matrix);\n    \n    const MatrixType& householder() const { return m_householder; }\n    const BidiagonalType& bidiagonal() const { return m_bidiagonal; }\n    \n    const HouseholderUSequenceType householderU() const\n    {\n      eigen_assert(m_isInitialized && \"UpperBidiagonalization is not initialized.\");\n      return HouseholderUSequenceType(m_householder, m_householder.diagonal().conjugate());\n    }\n\n    const HouseholderVSequenceType householderV() // const here gives nasty errors and i'm lazy\n    {\n      eigen_assert(m_isInitialized && \"UpperBidiagonalization is not initialized.\");\n      return HouseholderVSequenceType(m_householder.conjugate(), m_householder.const_derived().template diagonal<1>())\n             .setLength(m_householder.cols()-1)\n             .setShift(1);\n    }\n    \n  protected:\n    MatrixType m_householder;\n    BidiagonalType m_bidiagonal;\n    bool m_isInitialized;\n};\n\n// Standard upper bidiagonalization without fancy optimizations\n// This version should be faster for small matrix size\ntemplate<typename MatrixType>\nvoid upperbidiagonalization_inplace_unblocked(MatrixType& mat,\n                                              typename MatrixType::RealScalar *diagonal,\n                                              typename MatrixType::RealScalar *upper_diagonal,\n                                              typename MatrixType::Scalar* tempData = 0)\n{\n  typedef typename MatrixType::Scalar Scalar;\n\n  Index rows = mat.rows();\n  Index cols = mat.cols();\n\n  typedef Matrix<Scalar,Dynamic,1,ColMajor,MatrixType::MaxRowsAtCompileTime,1> TempType;\n  TempType tempVector;\n  if(tempData==0)\n  {\n    tempVector.resize(rows);\n    tempData = tempVector.data();\n  }\n\n  for (Index k = 0; /* breaks at k==cols-1 below */ ; ++k)\n  {\n    Index remainingRows = rows - k;\n    Index remainingCols = cols - k - 1;\n\n    // construct left householder transform in-place in A\n    mat.col(k).tail(remainingRows)\n       .makeHouseholderInPlace(mat.coeffRef(k,k), diagonal[k]);\n    // apply householder transform to remaining part of A on the left\n    mat.bottomRightCorner(remainingRows, remainingCols)\n       .applyHouseholderOnTheLeft(mat.col(k).tail(remainingRows-1), mat.coeff(k,k), tempData);\n\n    if(k == cols-1) break;\n\n    // construct right householder transform in-place in mat\n    mat.row(k).tail(remainingCols)\n       .makeHouseholderInPlace(mat.coeffRef(k,k+1), upper_diagonal[k]);\n    // apply householder transform to remaining part of mat on the left\n    mat.bottomRightCorner(remainingRows-1, remainingCols)\n       .applyHouseholderOnTheRight(mat.row(k).tail(remainingCols-1).adjoint(), mat.coeff(k,k+1), tempData);\n  }\n}\n\n/** \\internal\n  * Helper routine for the block reduction to upper bidiagonal form.\n  *\n  * Let's partition the matrix A:\n  * \n  *      | A00 A01 |\n  *  A = |         |\n  *      | A10 A11 |\n  *\n  * This function reduces to bidiagonal form the left \\c rows x \\a blockSize vertical panel [A00/A10]\n  * and the \\a blockSize x \\c cols horizontal panel [A00 A01] of the matrix \\a A. The bottom-right block A11\n  * is updated using matrix-matrix products:\n  *   A22 -= V * Y^T - X * U^T\n  * where V and U contains the left and right Householder vectors. U and V are stored in A10, and A01\n  * respectively, and the update matrices X and Y are computed during the reduction.\n  * \n  */\ntemplate<typename MatrixType>\nvoid upperbidiagonalization_blocked_helper(MatrixType& A,\n                                           typename MatrixType::RealScalar *diagonal,\n                                           typename MatrixType::RealScalar *upper_diagonal,\n                                           Index bs,\n                                           Ref<Matrix<typename MatrixType::Scalar, Dynamic, Dynamic,\n                                                      traits<MatrixType>::Flags & RowMajorBit> > X,\n                                           Ref<Matrix<typename MatrixType::Scalar, Dynamic, Dynamic,\n                                                      traits<MatrixType>::Flags & RowMajorBit> > Y)\n{\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename MatrixType::RealScalar RealScalar;\n  typedef typename NumTraits<RealScalar>::Literal Literal;\n  enum { StorageOrder = traits<MatrixType>::Flags & RowMajorBit };\n  typedef InnerStride<int(StorageOrder) == int(ColMajor) ? 1 : Dynamic> ColInnerStride;\n  typedef InnerStride<int(StorageOrder) == int(ColMajor) ? Dynamic : 1> RowInnerStride;\n  typedef Ref<Matrix<Scalar, Dynamic, 1>, 0, ColInnerStride>    SubColumnType;\n  typedef Ref<Matrix<Scalar, 1, Dynamic>, 0, RowInnerStride>    SubRowType;\n  typedef Ref<Matrix<Scalar, Dynamic, Dynamic, StorageOrder > > SubMatType;\n  \n  Index brows = A.rows();\n  Index bcols = A.cols();\n\n  Scalar tau_u, tau_u_prev(0), tau_v;\n\n  for(Index k = 0; k < bs; ++k)\n  {\n    Index remainingRows = brows - k;\n    Index remainingCols = bcols - k - 1;\n\n    SubMatType X_k1( X.block(k,0, remainingRows,k) );\n    SubMatType V_k1( A.block(k,0, remainingRows,k) );\n\n    // 1 - update the k-th column of A\n    SubColumnType v_k = A.col(k).tail(remainingRows);\n          v_k -= V_k1 * Y.row(k).head(k).adjoint();\n    if(k) v_k -= X_k1 * A.col(k).head(k);\n    \n    // 2 - construct left Householder transform in-place\n    v_k.makeHouseholderInPlace(tau_v, diagonal[k]);\n       \n    if(k+1<bcols)\n    {\n      SubMatType Y_k  ( Y.block(k+1,0, remainingCols, k+1) );\n      SubMatType U_k1 ( A.block(0,k+1, k,remainingCols) );\n      \n      // this eases the application of Householder transforAions\n      // A(k,k) will store tau_v later\n      A(k,k) = Scalar(1);\n\n      // 3 - Compute y_k^T = tau_v * ( A^T*v_k - Y_k-1*V_k-1^T*v_k - U_k-1*X_k-1^T*v_k )\n      {\n        SubColumnType y_k( Y.col(k).tail(remainingCols) );\n        \n        // let's use the beginning of column k of Y as a temporary vector\n        SubColumnType tmp( Y.col(k).head(k) );\n        y_k.noalias()  = A.block(k,k+1, remainingRows,remainingCols).adjoint() * v_k; // bottleneck\n        tmp.noalias()  = V_k1.adjoint()  * v_k;\n        y_k.noalias() -= Y_k.leftCols(k) * tmp;\n        tmp.noalias()  = X_k1.adjoint()  * v_k;\n        y_k.noalias() -= U_k1.adjoint()  * tmp;\n        y_k *= numext::conj(tau_v);\n      }\n\n      // 4 - update k-th row of A (it will become u_k)\n      SubRowType u_k( A.row(k).tail(remainingCols) );\n      u_k = u_k.conjugate();\n      {\n        u_k -= Y_k * A.row(k).head(k+1).adjoint();\n        if(k) u_k -= U_k1.adjoint() * X.row(k).head(k).adjoint();\n      }\n\n      // 5 - construct right Householder transform in-place\n      u_k.makeHouseholderInPlace(tau_u, upper_diagonal[k]);\n\n      // this eases the application of Householder transformations\n      // A(k,k+1) will store tau_u later\n      A(k,k+1) = Scalar(1);\n\n      // 6 - Compute x_k = tau_u * ( A*u_k - X_k-1*U_k-1^T*u_k - V_k*Y_k^T*u_k )\n      {\n        SubColumnType x_k ( X.col(k).tail(remainingRows-1) );\n        \n        // let's use the beginning of column k of X as a temporary vectors\n        // note that tmp0 and tmp1 overlaps\n        SubColumnType tmp0 ( X.col(k).head(k) ),\n                      tmp1 ( X.col(k).head(k+1) );\n                    \n        x_k.noalias()   = A.block(k+1,k+1, remainingRows-1,remainingCols) * u_k.transpose(); // bottleneck\n        tmp0.noalias()  = U_k1 * u_k.transpose();\n        x_k.noalias()  -= X_k1.bottomRows(remainingRows-1) * tmp0;\n        tmp1.noalias()  = Y_k.adjoint() * u_k.transpose();\n        x_k.noalias()  -= A.block(k+1,0, remainingRows-1,k+1) * tmp1;\n        x_k *= numext::conj(tau_u);\n        tau_u = numext::conj(tau_u);\n        u_k = u_k.conjugate();\n      }\n\n      if(k>0) A.coeffRef(k-1,k) = tau_u_prev;\n      tau_u_prev = tau_u;\n    }\n    else\n      A.coeffRef(k-1,k) = tau_u_prev;\n\n    A.coeffRef(k,k) = tau_v;\n  }\n  \n  if(bs<bcols)\n    A.coeffRef(bs-1,bs) = tau_u_prev;\n\n  // update A22\n  if(bcols>bs && brows>bs)\n  {\n    SubMatType A11( A.bottomRightCorner(brows-bs,bcols-bs) );\n    SubMatType A10( A.block(bs,0, brows-bs,bs) );\n    SubMatType A01( A.block(0,bs, bs,bcols-bs) );\n    Scalar tmp = A01(bs-1,0);\n    A01(bs-1,0) = Literal(1);\n    A11.noalias() -= A10 * Y.topLeftCorner(bcols,bs).bottomRows(bcols-bs).adjoint();\n    A11.noalias() -= X.topLeftCorner(brows,bs).bottomRows(brows-bs) * A01;\n    A01(bs-1,0) = tmp;\n  }\n}\n\n/** \\internal\n  *\n  * Implementation of a block-bidiagonal reduction.\n  * It is based on the following paper:\n  *   The Design of a Parallel Dense Linear Algebra Software Library: Reduction to Hessenberg, Tridiagonal, and Bidiagonal Form.\n  *   by Jaeyoung Choi, Jack J. Dongarra, David W. Walker. (1995)\n  *   section 3.3\n  */\ntemplate<typename MatrixType, typename BidiagType>\nvoid upperbidiagonalization_inplace_blocked(MatrixType& A, BidiagType& bidiagonal,\n                                            Index maxBlockSize=32,\n                                            typename MatrixType::Scalar* /*tempData*/ = 0)\n{\n  typedef typename MatrixType::Scalar Scalar;\n  typedef Block<MatrixType,Dynamic,Dynamic> BlockType;\n\n  Index rows = A.rows();\n  Index cols = A.cols();\n  Index size = (std::min)(rows, cols);\n\n  // X and Y are work space\n  enum { StorageOrder = traits<MatrixType>::Flags & RowMajorBit };\n  Matrix<Scalar,\n         MatrixType::RowsAtCompileTime,\n         Dynamic,\n         StorageOrder,\n         MatrixType::MaxRowsAtCompileTime> X(rows,maxBlockSize);\n  Matrix<Scalar,\n         MatrixType::ColsAtCompileTime,\n         Dynamic,\n         StorageOrder,\n         MatrixType::MaxColsAtCompileTime> Y(cols,maxBlockSize);\n  Index blockSize = (std::min)(maxBlockSize,size);\n\n  Index k = 0;\n  for(k = 0; k < size; k += blockSize)\n  {\n    Index bs = (std::min)(size-k,blockSize);  // actual size of the block\n    Index brows = rows - k;                   // rows of the block\n    Index bcols = cols - k;                   // columns of the block\n\n    // partition the matrix A:\n    // \n    //      | A00 A01 A02 |\n    //      |             |\n    // A  = | A10 A11 A12 |\n    //      |             |\n    //      | A20 A21 A22 |\n    //\n    // where A11 is a bs x bs diagonal block,\n    // and let:\n    //      | A11 A12 |\n    //  B = |         |\n    //      | A21 A22 |\n\n    BlockType B = A.block(k,k,brows,bcols);\n    \n    // This stage performs the bidiagonalization of A11, A21, A12, and updating of A22.\n    // Finally, the algorithm continue on the updated A22.\n    //\n    // However, if B is too small, or A22 empty, then let's use an unblocked strategy\n    if(k+bs==cols || bcols<48) // somewhat arbitrary threshold\n    {\n      upperbidiagonalization_inplace_unblocked(B,\n                                               &(bidiagonal.template diagonal<0>().coeffRef(k)),\n                                               &(bidiagonal.template diagonal<1>().coeffRef(k)),\n                                               X.data()\n                                              );\n      break; // We're done\n    }\n    else\n    {\n      upperbidiagonalization_blocked_helper<BlockType>( B,\n                                                        &(bidiagonal.template diagonal<0>().coeffRef(k)),\n                                                        &(bidiagonal.template diagonal<1>().coeffRef(k)),\n                                                        bs,\n                                                        X.topLeftCorner(brows,bs),\n                                                        Y.topLeftCorner(bcols,bs)\n                                                      );\n    }\n  }\n}\n\ntemplate<typename _MatrixType>\nUpperBidiagonalization<_MatrixType>& UpperBidiagonalization<_MatrixType>::computeUnblocked(const _MatrixType& matrix)\n{\n  Index rows = matrix.rows();\n  Index cols = matrix.cols();\n  EIGEN_ONLY_USED_FOR_DEBUG(cols);\n\n  eigen_assert(rows >= cols && \"UpperBidiagonalization is only for Arices satisfying rows>=cols.\");\n\n  m_householder = matrix;\n\n  ColVectorType temp(rows);\n\n  upperbidiagonalization_inplace_unblocked(m_householder,\n                                           &(m_bidiagonal.template diagonal<0>().coeffRef(0)),\n                                           &(m_bidiagonal.template diagonal<1>().coeffRef(0)),\n                                           temp.data());\n\n  m_isInitialized = true;\n  return *this;\n}\n\ntemplate<typename _MatrixType>\nUpperBidiagonalization<_MatrixType>& UpperBidiagonalization<_MatrixType>::compute(const _MatrixType& matrix)\n{\n  Index rows = matrix.rows();\n  Index cols = matrix.cols();\n  EIGEN_ONLY_USED_FOR_DEBUG(rows);\n  EIGEN_ONLY_USED_FOR_DEBUG(cols);\n\n  eigen_assert(rows >= cols && \"UpperBidiagonalization is only for Arices satisfying rows>=cols.\");\n\n  m_householder = matrix;\n  upperbidiagonalization_inplace_blocked(m_householder, m_bidiagonal);\n            \n  m_isInitialized = true;\n  return *this;\n}\n\n#if 0\n/** \\return the Householder QR decomposition of \\c *this.\n  *\n  * \\sa class Bidiagonalization\n  */\ntemplate<typename Derived>\nconst UpperBidiagonalization<typename MatrixBase<Derived>::PlainObject>\nMatrixBase<Derived>::bidiagonalization() const\n{\n  return UpperBidiagonalization<PlainObject>(eval());\n}\n#endif\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_BIDIAGONALIZATION_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseCholesky/SimplicialCholesky.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2012 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SIMPLICIAL_CHOLESKY_H\n#define EIGEN_SIMPLICIAL_CHOLESKY_H\n\nnamespace Eigen { \n\nenum SimplicialCholeskyMode {\n  SimplicialCholeskyLLT,\n  SimplicialCholeskyLDLT\n};\n\nnamespace internal {\n  template<typename CholMatrixType, typename InputMatrixType>\n  struct simplicial_cholesky_grab_input {\n    typedef CholMatrixType const * ConstCholMatrixPtr;\n    static void run(const InputMatrixType& input, ConstCholMatrixPtr &pmat, CholMatrixType &tmp)\n    {\n      tmp = input;\n      pmat = &tmp;\n    }\n  };\n  \n  template<typename MatrixType>\n  struct simplicial_cholesky_grab_input<MatrixType,MatrixType> {\n    typedef MatrixType const * ConstMatrixPtr;\n    static void run(const MatrixType& input, ConstMatrixPtr &pmat, MatrixType &/*tmp*/)\n    {\n      pmat = &input;\n    }\n  };\n} // end namespace internal\n\n/** \\ingroup SparseCholesky_Module\n  * \\brief A base class for direct sparse Cholesky factorizations\n  *\n  * This is a base class for LL^T and LDL^T Cholesky factorizations of sparse matrices that are\n  * selfadjoint and positive definite. These factorizations allow for solving A.X = B where\n  * X and B can be either dense or sparse.\n  * \n  * In order to reduce the fill-in, a symmetric permutation P is applied prior to the factorization\n  * such that the factorized matrix is P A P^-1.\n  *\n  * \\tparam Derived the type of the derived class, that is the actual factorization type.\n  *\n  */\ntemplate<typename Derived>\nclass SimplicialCholeskyBase : public SparseSolverBase<Derived>\n{\n    typedef SparseSolverBase<Derived> Base;\n    using Base::m_isInitialized;\n    \n  public:\n    typedef typename internal::traits<Derived>::MatrixType MatrixType;\n    typedef typename internal::traits<Derived>::OrderingType OrderingType;\n    enum { UpLo = internal::traits<Derived>::UpLo };\n    typedef typename MatrixType::Scalar Scalar;\n    typedef typename MatrixType::RealScalar RealScalar;\n    typedef typename MatrixType::StorageIndex StorageIndex;\n    typedef SparseMatrix<Scalar,ColMajor,StorageIndex> CholMatrixType;\n    typedef CholMatrixType const * ConstCholMatrixPtr;\n    typedef Matrix<Scalar,Dynamic,1> VectorType;\n    typedef Matrix<StorageIndex,Dynamic,1> VectorI;\n\n    enum {\n      ColsAtCompileTime = MatrixType::ColsAtCompileTime,\n      MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime\n    };\n\n  public:\n    \n    using Base::derived;\n\n    /** Default constructor */\n    SimplicialCholeskyBase()\n      : m_info(Success),\n        m_factorizationIsOk(false),\n        m_analysisIsOk(false),\n        m_shiftOffset(0),\n        m_shiftScale(1)\n    {}\n\n    explicit SimplicialCholeskyBase(const MatrixType& matrix)\n      : m_info(Success),\n        m_factorizationIsOk(false),\n        m_analysisIsOk(false),\n        m_shiftOffset(0),\n        m_shiftScale(1)\n    {\n      derived().compute(matrix);\n    }\n\n    ~SimplicialCholeskyBase()\n    {\n    }\n\n    Derived& derived() { return *static_cast<Derived*>(this); }\n    const Derived& derived() const { return *static_cast<const Derived*>(this); }\n    \n    inline Index cols() const { return m_matrix.cols(); }\n    inline Index rows() const { return m_matrix.rows(); }\n    \n    /** \\brief Reports whether previous computation was successful.\n      *\n      * \\returns \\c Success if computation was successful,\n      *          \\c NumericalIssue if the matrix.appears to be negative.\n      */\n    ComputationInfo info() const\n    {\n      eigen_assert(m_isInitialized && \"Decomposition is not initialized.\");\n      return m_info;\n    }\n    \n    /** \\returns the permutation P\n      * \\sa permutationPinv() */\n    const PermutationMatrix<Dynamic,Dynamic,StorageIndex>& permutationP() const\n    { return m_P; }\n    \n    /** \\returns the inverse P^-1 of the permutation P\n      * \\sa permutationP() */\n    const PermutationMatrix<Dynamic,Dynamic,StorageIndex>& permutationPinv() const\n    { return m_Pinv; }\n\n    /** Sets the shift parameters that will be used to adjust the diagonal coefficients during the numerical factorization.\n      *\n      * During the numerical factorization, the diagonal coefficients are transformed by the following linear model:\\n\n      * \\c d_ii = \\a offset + \\a scale * \\c d_ii\n      *\n      * The default is the identity transformation with \\a offset=0, and \\a scale=1.\n      *\n      * \\returns a reference to \\c *this.\n      */\n    Derived& setShift(const RealScalar& offset, const RealScalar& scale = 1)\n    {\n      m_shiftOffset = offset;\n      m_shiftScale = scale;\n      return derived();\n    }\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\n    /** \\internal */\n    template<typename Stream>\n    void dumpMemory(Stream& s)\n    {\n      int total = 0;\n      s << \"  L:        \" << ((total+=(m_matrix.cols()+1) * sizeof(int) + m_matrix.nonZeros()*(sizeof(int)+sizeof(Scalar))) >> 20) << \"Mb\" << \"\\n\";\n      s << \"  diag:     \" << ((total+=m_diag.size() * sizeof(Scalar)) >> 20) << \"Mb\" << \"\\n\";\n      s << \"  tree:     \" << ((total+=m_parent.size() * sizeof(int)) >> 20) << \"Mb\" << \"\\n\";\n      s << \"  nonzeros: \" << ((total+=m_nonZerosPerCol.size() * sizeof(int)) >> 20) << \"Mb\" << \"\\n\";\n      s << \"  perm:     \" << ((total+=m_P.size() * sizeof(int)) >> 20) << \"Mb\" << \"\\n\";\n      s << \"  perm^-1:  \" << ((total+=m_Pinv.size() * sizeof(int)) >> 20) << \"Mb\" << \"\\n\";\n      s << \"  TOTAL:    \" << (total>> 20) << \"Mb\" << \"\\n\";\n    }\n\n    /** \\internal */\n    template<typename Rhs,typename Dest>\n    void _solve_impl(const MatrixBase<Rhs> &b, MatrixBase<Dest> &dest) const\n    {\n      eigen_assert(m_factorizationIsOk && \"The decomposition is not in a valid state for solving, you must first call either compute() or symbolic()/numeric()\");\n      eigen_assert(m_matrix.rows()==b.rows());\n\n      if(m_info!=Success)\n        return;\n\n      if(m_P.size()>0)\n        dest = m_P * b;\n      else\n        dest = b;\n\n      if(m_matrix.nonZeros()>0) // otherwise L==I\n        derived().matrixL().solveInPlace(dest);\n\n      if(m_diag.size()>0)\n        dest = m_diag.asDiagonal().inverse() * dest;\n\n      if (m_matrix.nonZeros()>0) // otherwise U==I\n        derived().matrixU().solveInPlace(dest);\n\n      if(m_P.size()>0)\n        dest = m_Pinv * dest;\n    }\n    \n    template<typename Rhs,typename Dest>\n    void _solve_impl(const SparseMatrixBase<Rhs> &b, SparseMatrixBase<Dest> &dest) const\n    {\n      internal::solve_sparse_through_dense_panels(derived(), b, dest);\n    }\n\n#endif // EIGEN_PARSED_BY_DOXYGEN\n\n  protected:\n    \n    /** Computes the sparse Cholesky decomposition of \\a matrix */\n    template<bool DoLDLT>\n    void compute(const MatrixType& matrix)\n    {\n      eigen_assert(matrix.rows()==matrix.cols());\n      Index size = matrix.cols();\n      CholMatrixType tmp(size,size);\n      ConstCholMatrixPtr pmat;\n      ordering(matrix, pmat, tmp);\n      analyzePattern_preordered(*pmat, DoLDLT);\n      factorize_preordered<DoLDLT>(*pmat);\n    }\n    \n    template<bool DoLDLT>\n    void factorize(const MatrixType& a)\n    {\n      eigen_assert(a.rows()==a.cols());\n      Index size = a.cols();\n      CholMatrixType tmp(size,size);\n      ConstCholMatrixPtr pmat;\n      \n      if(m_P.size()==0 && (UpLo&Upper)==Upper)\n      {\n        // If there is no ordering, try to directly use the input matrix without any copy\n        internal::simplicial_cholesky_grab_input<CholMatrixType,MatrixType>::run(a, pmat, tmp);\n      }\n      else\n      {\n        tmp.template selfadjointView<Upper>() = a.template selfadjointView<UpLo>().twistedBy(m_P);\n        pmat = &tmp;\n      }\n      \n      factorize_preordered<DoLDLT>(*pmat);\n    }\n\n    template<bool DoLDLT>\n    void factorize_preordered(const CholMatrixType& a);\n\n    void analyzePattern(const MatrixType& a, bool doLDLT)\n    {\n      eigen_assert(a.rows()==a.cols());\n      Index size = a.cols();\n      CholMatrixType tmp(size,size);\n      ConstCholMatrixPtr pmat;\n      ordering(a, pmat, tmp);\n      analyzePattern_preordered(*pmat,doLDLT);\n    }\n    void analyzePattern_preordered(const CholMatrixType& a, bool doLDLT);\n    \n    void ordering(const MatrixType& a, ConstCholMatrixPtr &pmat, CholMatrixType& ap);\n\n    /** keeps off-diagonal entries; drops diagonal entries */\n    struct keep_diag {\n      inline bool operator() (const Index& row, const Index& col, const Scalar&) const\n      {\n        return row!=col;\n      }\n    };\n\n    mutable ComputationInfo m_info;\n    bool m_factorizationIsOk;\n    bool m_analysisIsOk;\n    \n    CholMatrixType m_matrix;\n    VectorType m_diag;                                // the diagonal coefficients (LDLT mode)\n    VectorI m_parent;                                 // elimination tree\n    VectorI m_nonZerosPerCol;\n    PermutationMatrix<Dynamic,Dynamic,StorageIndex> m_P;     // the permutation\n    PermutationMatrix<Dynamic,Dynamic,StorageIndex> m_Pinv;  // the inverse permutation\n\n    RealScalar m_shiftOffset;\n    RealScalar m_shiftScale;\n};\n\ntemplate<typename _MatrixType, int _UpLo = Lower, typename _Ordering = AMDOrdering<typename _MatrixType::StorageIndex> > class SimplicialLLT;\ntemplate<typename _MatrixType, int _UpLo = Lower, typename _Ordering = AMDOrdering<typename _MatrixType::StorageIndex> > class SimplicialLDLT;\ntemplate<typename _MatrixType, int _UpLo = Lower, typename _Ordering = AMDOrdering<typename _MatrixType::StorageIndex> > class SimplicialCholesky;\n\nnamespace internal {\n\ntemplate<typename _MatrixType, int _UpLo, typename _Ordering> struct traits<SimplicialLLT<_MatrixType,_UpLo,_Ordering> >\n{\n  typedef _MatrixType MatrixType;\n  typedef _Ordering OrderingType;\n  enum { UpLo = _UpLo };\n  typedef typename MatrixType::Scalar                         Scalar;\n  typedef typename MatrixType::StorageIndex                   StorageIndex;\n  typedef SparseMatrix<Scalar, ColMajor, StorageIndex>        CholMatrixType;\n  typedef TriangularView<const CholMatrixType, Eigen::Lower>  MatrixL;\n  typedef TriangularView<const typename CholMatrixType::AdjointReturnType, Eigen::Upper>   MatrixU;\n  static inline MatrixL getL(const MatrixType& m) { return MatrixL(m); }\n  static inline MatrixU getU(const MatrixType& m) { return MatrixU(m.adjoint()); }\n};\n\ntemplate<typename _MatrixType,int _UpLo, typename _Ordering> struct traits<SimplicialLDLT<_MatrixType,_UpLo,_Ordering> >\n{\n  typedef _MatrixType MatrixType;\n  typedef _Ordering OrderingType;\n  enum { UpLo = _UpLo };\n  typedef typename MatrixType::Scalar                             Scalar;\n  typedef typename MatrixType::StorageIndex                       StorageIndex;\n  typedef SparseMatrix<Scalar, ColMajor, StorageIndex>            CholMatrixType;\n  typedef TriangularView<const CholMatrixType, Eigen::UnitLower>  MatrixL;\n  typedef TriangularView<const typename CholMatrixType::AdjointReturnType, Eigen::UnitUpper> MatrixU;\n  static inline MatrixL getL(const MatrixType& m) { return MatrixL(m); }\n  static inline MatrixU getU(const MatrixType& m) { return MatrixU(m.adjoint()); }\n};\n\ntemplate<typename _MatrixType, int _UpLo, typename _Ordering> struct traits<SimplicialCholesky<_MatrixType,_UpLo,_Ordering> >\n{\n  typedef _MatrixType MatrixType;\n  typedef _Ordering OrderingType;\n  enum { UpLo = _UpLo };\n};\n\n}\n\n/** \\ingroup SparseCholesky_Module\n  * \\class SimplicialLLT\n  * \\brief A direct sparse LLT Cholesky factorizations\n  *\n  * This class provides a LL^T Cholesky factorizations of sparse matrices that are\n  * selfadjoint and positive definite. The factorization allows for solving A.X = B where\n  * X and B can be either dense or sparse.\n  * \n  * In order to reduce the fill-in, a symmetric permutation P is applied prior to the factorization\n  * such that the factorized matrix is P A P^-1.\n  *\n  * \\tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<>\n  * \\tparam _UpLo the triangular part that will be used for the computations. It can be Lower\n  *               or Upper. Default is Lower.\n  * \\tparam _Ordering The ordering method to use, either AMDOrdering<> or NaturalOrdering<>. Default is AMDOrdering<>\n  *\n  * \\implsparsesolverconcept\n  *\n  * \\sa class SimplicialLDLT, class AMDOrdering, class NaturalOrdering\n  */\ntemplate<typename _MatrixType, int _UpLo, typename _Ordering>\n    class SimplicialLLT : public SimplicialCholeskyBase<SimplicialLLT<_MatrixType,_UpLo,_Ordering> >\n{\npublic:\n    typedef _MatrixType MatrixType;\n    enum { UpLo = _UpLo };\n    typedef SimplicialCholeskyBase<SimplicialLLT> Base;\n    typedef typename MatrixType::Scalar Scalar;\n    typedef typename MatrixType::RealScalar RealScalar;\n    typedef typename MatrixType::StorageIndex StorageIndex;\n    typedef SparseMatrix<Scalar,ColMajor,Index> CholMatrixType;\n    typedef Matrix<Scalar,Dynamic,1> VectorType;\n    typedef internal::traits<SimplicialLLT> Traits;\n    typedef typename Traits::MatrixL  MatrixL;\n    typedef typename Traits::MatrixU  MatrixU;\npublic:\n    /** Default constructor */\n    SimplicialLLT() : Base() {}\n    /** Constructs and performs the LLT factorization of \\a matrix */\n    explicit SimplicialLLT(const MatrixType& matrix)\n        : Base(matrix) {}\n\n    /** \\returns an expression of the factor L */\n    inline const MatrixL matrixL() const {\n        eigen_assert(Base::m_factorizationIsOk && \"Simplicial LLT not factorized\");\n        return Traits::getL(Base::m_matrix);\n    }\n\n    /** \\returns an expression of the factor U (= L^*) */\n    inline const MatrixU matrixU() const {\n        eigen_assert(Base::m_factorizationIsOk && \"Simplicial LLT not factorized\");\n        return Traits::getU(Base::m_matrix);\n    }\n    \n    /** Computes the sparse Cholesky decomposition of \\a matrix */\n    SimplicialLLT& compute(const MatrixType& matrix)\n    {\n      Base::template compute<false>(matrix);\n      return *this;\n    }\n\n    /** Performs a symbolic decomposition on the sparcity of \\a matrix.\n      *\n      * This function is particularly useful when solving for several problems having the same structure.\n      *\n      * \\sa factorize()\n      */\n    void analyzePattern(const MatrixType& a)\n    {\n      Base::analyzePattern(a, false);\n    }\n\n    /** Performs a numeric decomposition of \\a matrix\n      *\n      * The given matrix must has the same sparcity than the matrix on which the symbolic decomposition has been performed.\n      *\n      * \\sa analyzePattern()\n      */\n    void factorize(const MatrixType& a)\n    {\n      Base::template factorize<false>(a);\n    }\n\n    /** \\returns the determinant of the underlying matrix from the current factorization */\n    Scalar determinant() const\n    {\n      Scalar detL = Base::m_matrix.diagonal().prod();\n      return numext::abs2(detL);\n    }\n};\n\n/** \\ingroup SparseCholesky_Module\n  * \\class SimplicialLDLT\n  * \\brief A direct sparse LDLT Cholesky factorizations without square root.\n  *\n  * This class provides a LDL^T Cholesky factorizations without square root of sparse matrices that are\n  * selfadjoint and positive definite. The factorization allows for solving A.X = B where\n  * X and B can be either dense or sparse.\n  * \n  * In order to reduce the fill-in, a symmetric permutation P is applied prior to the factorization\n  * such that the factorized matrix is P A P^-1.\n  *\n  * \\tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<>\n  * \\tparam _UpLo the triangular part that will be used for the computations. It can be Lower\n  *               or Upper. Default is Lower.\n  * \\tparam _Ordering The ordering method to use, either AMDOrdering<> or NaturalOrdering<>. Default is AMDOrdering<>\n  *\n  * \\implsparsesolverconcept\n  *\n  * \\sa class SimplicialLLT, class AMDOrdering, class NaturalOrdering\n  */\ntemplate<typename _MatrixType, int _UpLo, typename _Ordering>\n    class SimplicialLDLT : public SimplicialCholeskyBase<SimplicialLDLT<_MatrixType,_UpLo,_Ordering> >\n{\npublic:\n    typedef _MatrixType MatrixType;\n    enum { UpLo = _UpLo };\n    typedef SimplicialCholeskyBase<SimplicialLDLT> Base;\n    typedef typename MatrixType::Scalar Scalar;\n    typedef typename MatrixType::RealScalar RealScalar;\n    typedef typename MatrixType::StorageIndex StorageIndex;\n    typedef SparseMatrix<Scalar,ColMajor,StorageIndex> CholMatrixType;\n    typedef Matrix<Scalar,Dynamic,1> VectorType;\n    typedef internal::traits<SimplicialLDLT> Traits;\n    typedef typename Traits::MatrixL  MatrixL;\n    typedef typename Traits::MatrixU  MatrixU;\npublic:\n    /** Default constructor */\n    SimplicialLDLT() : Base() {}\n\n    /** Constructs and performs the LLT factorization of \\a matrix */\n    explicit SimplicialLDLT(const MatrixType& matrix)\n        : Base(matrix) {}\n\n    /** \\returns a vector expression of the diagonal D */\n    inline const VectorType vectorD() const {\n        eigen_assert(Base::m_factorizationIsOk && \"Simplicial LDLT not factorized\");\n        return Base::m_diag;\n    }\n    /** \\returns an expression of the factor L */\n    inline const MatrixL matrixL() const {\n        eigen_assert(Base::m_factorizationIsOk && \"Simplicial LDLT not factorized\");\n        return Traits::getL(Base::m_matrix);\n    }\n\n    /** \\returns an expression of the factor U (= L^*) */\n    inline const MatrixU matrixU() const {\n        eigen_assert(Base::m_factorizationIsOk && \"Simplicial LDLT not factorized\");\n        return Traits::getU(Base::m_matrix);\n    }\n\n    /** Computes the sparse Cholesky decomposition of \\a matrix */\n    SimplicialLDLT& compute(const MatrixType& matrix)\n    {\n      Base::template compute<true>(matrix);\n      return *this;\n    }\n    \n    /** Performs a symbolic decomposition on the sparcity of \\a matrix.\n      *\n      * This function is particularly useful when solving for several problems having the same structure.\n      *\n      * \\sa factorize()\n      */\n    void analyzePattern(const MatrixType& a)\n    {\n      Base::analyzePattern(a, true);\n    }\n\n    /** Performs a numeric decomposition of \\a matrix\n      *\n      * The given matrix must has the same sparcity than the matrix on which the symbolic decomposition has been performed.\n      *\n      * \\sa analyzePattern()\n      */\n    void factorize(const MatrixType& a)\n    {\n      Base::template factorize<true>(a);\n    }\n\n    /** \\returns the determinant of the underlying matrix from the current factorization */\n    Scalar determinant() const\n    {\n      return Base::m_diag.prod();\n    }\n};\n\n/** \\deprecated use SimplicialLDLT or class SimplicialLLT\n  * \\ingroup SparseCholesky_Module\n  * \\class SimplicialCholesky\n  *\n  * \\sa class SimplicialLDLT, class SimplicialLLT\n  */\ntemplate<typename _MatrixType, int _UpLo, typename _Ordering>\n    class SimplicialCholesky : public SimplicialCholeskyBase<SimplicialCholesky<_MatrixType,_UpLo,_Ordering> >\n{\npublic:\n    typedef _MatrixType MatrixType;\n    enum { UpLo = _UpLo };\n    typedef SimplicialCholeskyBase<SimplicialCholesky> Base;\n    typedef typename MatrixType::Scalar Scalar;\n    typedef typename MatrixType::RealScalar RealScalar;\n    typedef typename MatrixType::StorageIndex StorageIndex;\n    typedef SparseMatrix<Scalar,ColMajor,StorageIndex> CholMatrixType;\n    typedef Matrix<Scalar,Dynamic,1> VectorType;\n    typedef internal::traits<SimplicialCholesky> Traits;\n    typedef internal::traits<SimplicialLDLT<MatrixType,UpLo> > LDLTTraits;\n    typedef internal::traits<SimplicialLLT<MatrixType,UpLo>  > LLTTraits;\n  public:\n    SimplicialCholesky() : Base(), m_LDLT(true) {}\n\n    explicit SimplicialCholesky(const MatrixType& matrix)\n      : Base(), m_LDLT(true)\n    {\n      compute(matrix);\n    }\n\n    SimplicialCholesky& setMode(SimplicialCholeskyMode mode)\n    {\n      switch(mode)\n      {\n      case SimplicialCholeskyLLT:\n        m_LDLT = false;\n        break;\n      case SimplicialCholeskyLDLT:\n        m_LDLT = true;\n        break;\n      default:\n        break;\n      }\n\n      return *this;\n    }\n\n    inline const VectorType vectorD() const {\n        eigen_assert(Base::m_factorizationIsOk && \"Simplicial Cholesky not factorized\");\n        return Base::m_diag;\n    }\n    inline const CholMatrixType rawMatrix() const {\n        eigen_assert(Base::m_factorizationIsOk && \"Simplicial Cholesky not factorized\");\n        return Base::m_matrix;\n    }\n    \n    /** Computes the sparse Cholesky decomposition of \\a matrix */\n    SimplicialCholesky& compute(const MatrixType& matrix)\n    {\n      if(m_LDLT)\n        Base::template compute<true>(matrix);\n      else\n        Base::template compute<false>(matrix);\n      return *this;\n    }\n\n    /** Performs a symbolic decomposition on the sparcity of \\a matrix.\n      *\n      * This function is particularly useful when solving for several problems having the same structure.\n      *\n      * \\sa factorize()\n      */\n    void analyzePattern(const MatrixType& a)\n    {\n      Base::analyzePattern(a, m_LDLT);\n    }\n\n    /** Performs a numeric decomposition of \\a matrix\n      *\n      * The given matrix must has the same sparcity than the matrix on which the symbolic decomposition has been performed.\n      *\n      * \\sa analyzePattern()\n      */\n    void factorize(const MatrixType& a)\n    {\n      if(m_LDLT)\n        Base::template factorize<true>(a);\n      else\n        Base::template factorize<false>(a);\n    }\n\n    /** \\internal */\n    template<typename Rhs,typename Dest>\n    void _solve_impl(const MatrixBase<Rhs> &b, MatrixBase<Dest> &dest) const\n    {\n      eigen_assert(Base::m_factorizationIsOk && \"The decomposition is not in a valid state for solving, you must first call either compute() or symbolic()/numeric()\");\n      eigen_assert(Base::m_matrix.rows()==b.rows());\n\n      if(Base::m_info!=Success)\n        return;\n\n      if(Base::m_P.size()>0)\n        dest = Base::m_P * b;\n      else\n        dest = b;\n\n      if(Base::m_matrix.nonZeros()>0) // otherwise L==I\n      {\n        if(m_LDLT)\n          LDLTTraits::getL(Base::m_matrix).solveInPlace(dest);\n        else\n          LLTTraits::getL(Base::m_matrix).solveInPlace(dest);\n      }\n\n      if(Base::m_diag.size()>0)\n        dest = Base::m_diag.real().asDiagonal().inverse() * dest;\n\n      if (Base::m_matrix.nonZeros()>0) // otherwise I==I\n      {\n        if(m_LDLT)\n          LDLTTraits::getU(Base::m_matrix).solveInPlace(dest);\n        else\n          LLTTraits::getU(Base::m_matrix).solveInPlace(dest);\n      }\n\n      if(Base::m_P.size()>0)\n        dest = Base::m_Pinv * dest;\n    }\n    \n    /** \\internal */\n    template<typename Rhs,typename Dest>\n    void _solve_impl(const SparseMatrixBase<Rhs> &b, SparseMatrixBase<Dest> &dest) const\n    {\n      internal::solve_sparse_through_dense_panels(*this, b, dest);\n    }\n    \n    Scalar determinant() const\n    {\n      if(m_LDLT)\n      {\n        return Base::m_diag.prod();\n      }\n      else\n      {\n        Scalar detL = Diagonal<const CholMatrixType>(Base::m_matrix).prod();\n        return numext::abs2(detL);\n      }\n    }\n    \n  protected:\n    bool m_LDLT;\n};\n\ntemplate<typename Derived>\nvoid SimplicialCholeskyBase<Derived>::ordering(const MatrixType& a, ConstCholMatrixPtr &pmat, CholMatrixType& ap)\n{\n  eigen_assert(a.rows()==a.cols());\n  const Index size = a.rows();\n  pmat = &ap;\n  // Note that ordering methods compute the inverse permutation\n  if(!internal::is_same<OrderingType,NaturalOrdering<Index> >::value)\n  {\n    {\n      CholMatrixType C;\n      C = a.template selfadjointView<UpLo>();\n      \n      OrderingType ordering;\n      ordering(C,m_Pinv);\n    }\n\n    if(m_Pinv.size()>0) m_P = m_Pinv.inverse();\n    else                m_P.resize(0);\n    \n    ap.resize(size,size);\n    ap.template selfadjointView<Upper>() = a.template selfadjointView<UpLo>().twistedBy(m_P);\n  }\n  else\n  {\n    m_Pinv.resize(0);\n    m_P.resize(0);\n    if(int(UpLo)==int(Lower) || MatrixType::IsRowMajor)\n    {\n      // we have to transpose the lower part to to the upper one\n      ap.resize(size,size);\n      ap.template selfadjointView<Upper>() = a.template selfadjointView<UpLo>();\n    }\n    else\n      internal::simplicial_cholesky_grab_input<CholMatrixType,MatrixType>::run(a, pmat, ap);\n  }  \n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_SIMPLICIAL_CHOLESKY_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseCholesky/SimplicialCholesky_impl.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2012 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n/*\nNOTE: these functions have been adapted from the LDL library:\n\nLDL Copyright (c) 2005 by Timothy A. Davis.  All Rights Reserved.\n\nThe author of LDL, Timothy A. Davis., has executed a license with Google LLC\nto permit distribution of this code and derivative works as part of Eigen under\nthe Mozilla Public License v. 2.0, as stated at the top of this file.\n */\n\n#ifndef EIGEN_SIMPLICIAL_CHOLESKY_IMPL_H\n#define EIGEN_SIMPLICIAL_CHOLESKY_IMPL_H\n\nnamespace Eigen {\n\ntemplate<typename Derived>\nvoid SimplicialCholeskyBase<Derived>::analyzePattern_preordered(const CholMatrixType& ap, bool doLDLT)\n{\n  const StorageIndex size = StorageIndex(ap.rows());\n  m_matrix.resize(size, size);\n  m_parent.resize(size);\n  m_nonZerosPerCol.resize(size);\n\n  ei_declare_aligned_stack_constructed_variable(StorageIndex, tags, size, 0);\n\n  for(StorageIndex k = 0; k < size; ++k)\n  {\n    /* L(k,:) pattern: all nodes reachable in etree from nz in A(0:k-1,k) */\n    m_parent[k] = -1;             /* parent of k is not yet known */\n    tags[k] = k;                  /* mark node k as visited */\n    m_nonZerosPerCol[k] = 0;      /* count of nonzeros in column k of L */\n    for(typename CholMatrixType::InnerIterator it(ap,k); it; ++it)\n    {\n      StorageIndex i = it.index();\n      if(i < k)\n      {\n        /* follow path from i to root of etree, stop at flagged node */\n        for(; tags[i] != k; i = m_parent[i])\n        {\n          /* find parent of i if not yet determined */\n          if (m_parent[i] == -1)\n            m_parent[i] = k;\n          m_nonZerosPerCol[i]++;        /* L (k,i) is nonzero */\n          tags[i] = k;                  /* mark i as visited */\n        }\n      }\n    }\n  }\n\n  /* construct Lp index array from m_nonZerosPerCol column counts */\n  StorageIndex* Lp = m_matrix.outerIndexPtr();\n  Lp[0] = 0;\n  for(StorageIndex k = 0; k < size; ++k)\n    Lp[k+1] = Lp[k] + m_nonZerosPerCol[k] + (doLDLT ? 0 : 1);\n\n  m_matrix.resizeNonZeros(Lp[size]);\n\n  m_isInitialized     = true;\n  m_info              = Success;\n  m_analysisIsOk      = true;\n  m_factorizationIsOk = false;\n}\n\n\ntemplate<typename Derived>\ntemplate<bool DoLDLT>\nvoid SimplicialCholeskyBase<Derived>::factorize_preordered(const CholMatrixType& ap)\n{\n  using std::sqrt;\n\n  eigen_assert(m_analysisIsOk && \"You must first call analyzePattern()\");\n  eigen_assert(ap.rows()==ap.cols());\n  eigen_assert(m_parent.size()==ap.rows());\n  eigen_assert(m_nonZerosPerCol.size()==ap.rows());\n\n  const StorageIndex size = StorageIndex(ap.rows());\n  const StorageIndex* Lp = m_matrix.outerIndexPtr();\n  StorageIndex* Li = m_matrix.innerIndexPtr();\n  Scalar* Lx = m_matrix.valuePtr();\n\n  ei_declare_aligned_stack_constructed_variable(Scalar, y, size, 0);\n  ei_declare_aligned_stack_constructed_variable(StorageIndex,  pattern, size, 0);\n  ei_declare_aligned_stack_constructed_variable(StorageIndex,  tags, size, 0);\n\n  bool ok = true;\n  m_diag.resize(DoLDLT ? size : 0);\n\n  for(StorageIndex k = 0; k < size; ++k)\n  {\n    // compute nonzero pattern of kth row of L, in topological order\n    y[k] = Scalar(0);                     // Y(0:k) is now all zero\n    StorageIndex top = size;               // stack for pattern is empty\n    tags[k] = k;                    // mark node k as visited\n    m_nonZerosPerCol[k] = 0;        // count of nonzeros in column k of L\n    for(typename CholMatrixType::InnerIterator it(ap,k); it; ++it)\n    {\n      StorageIndex i = it.index();\n      if(i <= k)\n      {\n        y[i] += numext::conj(it.value());            /* scatter A(i,k) into Y (sum duplicates) */\n        Index len;\n        for(len = 0; tags[i] != k; i = m_parent[i])\n        {\n          pattern[len++] = i;     /* L(k,i) is nonzero */\n          tags[i] = k;            /* mark i as visited */\n        }\n        while(len > 0)\n          pattern[--top] = pattern[--len];\n      }\n    }\n\n    /* compute numerical values kth row of L (a sparse triangular solve) */\n\n    RealScalar d = numext::real(y[k]) * m_shiftScale + m_shiftOffset;    // get D(k,k), apply the shift function, and clear Y(k)\n    y[k] = Scalar(0);\n    for(; top < size; ++top)\n    {\n      Index i = pattern[top];       /* pattern[top:n-1] is pattern of L(:,k) */\n      Scalar yi = y[i];             /* get and clear Y(i) */\n      y[i] = Scalar(0);\n\n      /* the nonzero entry L(k,i) */\n      Scalar l_ki;\n      if(DoLDLT)\n        l_ki = yi / numext::real(m_diag[i]);\n      else\n        yi = l_ki = yi / Lx[Lp[i]];\n\n      Index p2 = Lp[i] + m_nonZerosPerCol[i];\n      Index p;\n      for(p = Lp[i] + (DoLDLT ? 0 : 1); p < p2; ++p)\n        y[Li[p]] -= numext::conj(Lx[p]) * yi;\n      d -= numext::real(l_ki * numext::conj(yi));\n      Li[p] = k;                          /* store L(k,i) in column form of L */\n      Lx[p] = l_ki;\n      ++m_nonZerosPerCol[i];              /* increment count of nonzeros in col i */\n    }\n    if(DoLDLT)\n    {\n      m_diag[k] = d;\n      if(d == RealScalar(0))\n      {\n        ok = false;                         /* failure, D(k,k) is zero */\n        break;\n      }\n    }\n    else\n    {\n      Index p = Lp[k] + m_nonZerosPerCol[k]++;\n      Li[p] = k ;                /* store L(k,k) = sqrt (d) in column k */\n      if(d <= RealScalar(0)) {\n        ok = false;              /* failure, matrix is not positive definite */\n        break;\n      }\n      Lx[p] = sqrt(d) ;\n    }\n  }\n\n  m_info = ok ? Success : NumericalIssue;\n  m_factorizationIsOk = true;\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_SIMPLICIAL_CHOLESKY_IMPL_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseCore/AmbiVector.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_AMBIVECTOR_H\n#define EIGEN_AMBIVECTOR_H\n\nnamespace Eigen { \n\nnamespace internal {\n\n/** \\internal\n  * Hybrid sparse/dense vector class designed for intensive read-write operations.\n  *\n  * See BasicSparseLLT and SparseProduct for usage examples.\n  */\ntemplate<typename _Scalar, typename _StorageIndex>\nclass AmbiVector\n{\n  public:\n    typedef _Scalar Scalar;\n    typedef _StorageIndex StorageIndex;\n    typedef typename NumTraits<Scalar>::Real RealScalar;\n\n    explicit AmbiVector(Index size)\n      : m_buffer(0), m_zero(0), m_size(0), m_end(0), m_allocatedSize(0), m_allocatedElements(0), m_mode(-1)\n    {\n      resize(size);\n    }\n\n    void init(double estimatedDensity);\n    void init(int mode);\n\n    Index nonZeros() const;\n\n    /** Specifies a sub-vector to work on */\n    void setBounds(Index start, Index end) { m_start = convert_index(start); m_end = convert_index(end); }\n\n    void setZero();\n\n    void restart();\n    Scalar& coeffRef(Index i);\n    Scalar& coeff(Index i);\n\n    class Iterator;\n\n    ~AmbiVector() { delete[] m_buffer; }\n\n    void resize(Index size)\n    {\n      if (m_allocatedSize < size)\n        reallocate(size);\n      m_size = convert_index(size);\n    }\n\n    StorageIndex size() const { return m_size; }\n\n  protected:\n    StorageIndex convert_index(Index idx)\n    {\n      return internal::convert_index<StorageIndex>(idx);\n    }\n\n    void reallocate(Index size)\n    {\n      // if the size of the matrix is not too large, let's allocate a bit more than needed such\n      // that we can handle dense vector even in sparse mode.\n      delete[] m_buffer;\n      if (size<1000)\n      {\n        Index allocSize = (size * sizeof(ListEl) + sizeof(Scalar) - 1)/sizeof(Scalar);\n        m_allocatedElements = convert_index((allocSize*sizeof(Scalar))/sizeof(ListEl));\n        m_buffer = new Scalar[allocSize];\n      }\n      else\n      {\n        m_allocatedElements = convert_index((size*sizeof(Scalar))/sizeof(ListEl));\n        m_buffer = new Scalar[size];\n      }\n      m_size = convert_index(size);\n      m_start = 0;\n      m_end = m_size;\n    }\n\n    void reallocateSparse()\n    {\n      Index copyElements = m_allocatedElements;\n      m_allocatedElements = (std::min)(StorageIndex(m_allocatedElements*1.5),m_size);\n      Index allocSize = m_allocatedElements * sizeof(ListEl);\n      allocSize = (allocSize + sizeof(Scalar) - 1)/sizeof(Scalar);\n      Scalar* newBuffer = new Scalar[allocSize];\n      std::memcpy(newBuffer,  m_buffer,  copyElements * sizeof(ListEl));\n      delete[] m_buffer;\n      m_buffer = newBuffer;\n    }\n\n  protected:\n    // element type of the linked list\n    struct ListEl\n    {\n      StorageIndex next;\n      StorageIndex index;\n      Scalar value;\n    };\n\n    // used to store data in both mode\n    Scalar* m_buffer;\n    Scalar m_zero;\n    StorageIndex m_size;\n    StorageIndex m_start;\n    StorageIndex m_end;\n    StorageIndex m_allocatedSize;\n    StorageIndex m_allocatedElements;\n    StorageIndex m_mode;\n\n    // linked list mode\n    StorageIndex m_llStart;\n    StorageIndex m_llCurrent;\n    StorageIndex m_llSize;\n};\n\n/** \\returns the number of non zeros in the current sub vector */\ntemplate<typename _Scalar,typename _StorageIndex>\nIndex AmbiVector<_Scalar,_StorageIndex>::nonZeros() const\n{\n  if (m_mode==IsSparse)\n    return m_llSize;\n  else\n    return m_end - m_start;\n}\n\ntemplate<typename _Scalar,typename _StorageIndex>\nvoid AmbiVector<_Scalar,_StorageIndex>::init(double estimatedDensity)\n{\n  if (estimatedDensity>0.1)\n    init(IsDense);\n  else\n    init(IsSparse);\n}\n\ntemplate<typename _Scalar,typename _StorageIndex>\nvoid AmbiVector<_Scalar,_StorageIndex>::init(int mode)\n{\n  m_mode = mode;\n  // This is only necessary in sparse mode, but we set these unconditionally to avoid some maybe-uninitialized warnings\n  // if (m_mode==IsSparse)\n  {\n    m_llSize = 0;\n    m_llStart = -1;\n  }\n}\n\n/** Must be called whenever we might perform a write access\n  * with an index smaller than the previous one.\n  *\n  * Don't worry, this function is extremely cheap.\n  */\ntemplate<typename _Scalar,typename _StorageIndex>\nvoid AmbiVector<_Scalar,_StorageIndex>::restart()\n{\n  m_llCurrent = m_llStart;\n}\n\n/** Set all coefficients of current subvector to zero */\ntemplate<typename _Scalar,typename _StorageIndex>\nvoid AmbiVector<_Scalar,_StorageIndex>::setZero()\n{\n  if (m_mode==IsDense)\n  {\n    for (Index i=m_start; i<m_end; ++i)\n      m_buffer[i] = Scalar(0);\n  }\n  else\n  {\n    eigen_assert(m_mode==IsSparse);\n    m_llSize = 0;\n    m_llStart = -1;\n  }\n}\n\ntemplate<typename _Scalar,typename _StorageIndex>\n_Scalar& AmbiVector<_Scalar,_StorageIndex>::coeffRef(Index i)\n{\n  if (m_mode==IsDense)\n    return m_buffer[i];\n  else\n  {\n    ListEl* EIGEN_RESTRICT llElements = reinterpret_cast<ListEl*>(m_buffer);\n    // TODO factorize the following code to reduce code generation\n    eigen_assert(m_mode==IsSparse);\n    if (m_llSize==0)\n    {\n      // this is the first element\n      m_llStart = 0;\n      m_llCurrent = 0;\n      ++m_llSize;\n      llElements[0].value = Scalar(0);\n      llElements[0].index = convert_index(i);\n      llElements[0].next = -1;\n      return llElements[0].value;\n    }\n    else if (i<llElements[m_llStart].index)\n    {\n      // this is going to be the new first element of the list\n      ListEl& el = llElements[m_llSize];\n      el.value = Scalar(0);\n      el.index = convert_index(i);\n      el.next = m_llStart;\n      m_llStart = m_llSize;\n      ++m_llSize;\n      m_llCurrent = m_llStart;\n      return el.value;\n    }\n    else\n    {\n      StorageIndex nextel = llElements[m_llCurrent].next;\n      eigen_assert(i>=llElements[m_llCurrent].index && \"you must call restart() before inserting an element with lower or equal index\");\n      while (nextel >= 0 && llElements[nextel].index<=i)\n      {\n        m_llCurrent = nextel;\n        nextel = llElements[nextel].next;\n      }\n\n      if (llElements[m_llCurrent].index==i)\n      {\n        // the coefficient already exists and we found it !\n        return llElements[m_llCurrent].value;\n      }\n      else\n      {\n        if (m_llSize>=m_allocatedElements)\n        {\n          reallocateSparse();\n          llElements = reinterpret_cast<ListEl*>(m_buffer);\n        }\n        eigen_internal_assert(m_llSize<m_allocatedElements && \"internal error: overflow in sparse mode\");\n        // let's insert a new coefficient\n        ListEl& el = llElements[m_llSize];\n        el.value = Scalar(0);\n        el.index = convert_index(i);\n        el.next = llElements[m_llCurrent].next;\n        llElements[m_llCurrent].next = m_llSize;\n        ++m_llSize;\n        return el.value;\n      }\n    }\n  }\n}\n\ntemplate<typename _Scalar,typename _StorageIndex>\n_Scalar& AmbiVector<_Scalar,_StorageIndex>::coeff(Index i)\n{\n  if (m_mode==IsDense)\n    return m_buffer[i];\n  else\n  {\n    ListEl* EIGEN_RESTRICT llElements = reinterpret_cast<ListEl*>(m_buffer);\n    eigen_assert(m_mode==IsSparse);\n    if ((m_llSize==0) || (i<llElements[m_llStart].index))\n    {\n      return m_zero;\n    }\n    else\n    {\n      Index elid = m_llStart;\n      while (elid >= 0 && llElements[elid].index<i)\n        elid = llElements[elid].next;\n\n      if (llElements[elid].index==i)\n        return llElements[m_llCurrent].value;\n      else\n        return m_zero;\n    }\n  }\n}\n\n/** Iterator over the nonzero coefficients */\ntemplate<typename _Scalar,typename _StorageIndex>\nclass AmbiVector<_Scalar,_StorageIndex>::Iterator\n{\n  public:\n    typedef _Scalar Scalar;\n    typedef typename NumTraits<Scalar>::Real RealScalar;\n\n    /** Default constructor\n      * \\param vec the vector on which we iterate\n      * \\param epsilon the minimal value used to prune zero coefficients.\n      * In practice, all coefficients having a magnitude smaller than \\a epsilon\n      * are skipped.\n      */\n    explicit Iterator(const AmbiVector& vec, const RealScalar& epsilon = 0)\n      : m_vector(vec)\n    {\n      using std::abs;\n      m_epsilon = epsilon;\n      m_isDense = m_vector.m_mode==IsDense;\n      if (m_isDense)\n      {\n        m_currentEl = 0;   // this is to avoid a compilation warning\n        m_cachedValue = 0; // this is to avoid a compilation warning\n        m_cachedIndex = m_vector.m_start-1;\n        ++(*this);\n      }\n      else\n      {\n        ListEl* EIGEN_RESTRICT llElements = reinterpret_cast<ListEl*>(m_vector.m_buffer);\n        m_currentEl = m_vector.m_llStart;\n        while (m_currentEl>=0 && abs(llElements[m_currentEl].value)<=m_epsilon)\n          m_currentEl = llElements[m_currentEl].next;\n        if (m_currentEl<0)\n        {\n          m_cachedValue = 0; // this is to avoid a compilation warning\n          m_cachedIndex = -1;\n        }\n        else\n        {\n          m_cachedIndex = llElements[m_currentEl].index;\n          m_cachedValue = llElements[m_currentEl].value;\n        }\n      }\n    }\n\n    StorageIndex index() const { return m_cachedIndex; }\n    Scalar value() const { return m_cachedValue; }\n\n    operator bool() const { return m_cachedIndex>=0; }\n\n    Iterator& operator++()\n    {\n      using std::abs;\n      if (m_isDense)\n      {\n        do {\n          ++m_cachedIndex;\n        } while (m_cachedIndex<m_vector.m_end && abs(m_vector.m_buffer[m_cachedIndex])<=m_epsilon);\n        if (m_cachedIndex<m_vector.m_end)\n          m_cachedValue = m_vector.m_buffer[m_cachedIndex];\n        else\n          m_cachedIndex=-1;\n      }\n      else\n      {\n        ListEl* EIGEN_RESTRICT llElements = reinterpret_cast<ListEl*>(m_vector.m_buffer);\n        do {\n          m_currentEl = llElements[m_currentEl].next;\n        } while (m_currentEl>=0 && abs(llElements[m_currentEl].value)<=m_epsilon);\n        if (m_currentEl<0)\n        {\n          m_cachedIndex = -1;\n        }\n        else\n        {\n          m_cachedIndex = llElements[m_currentEl].index;\n          m_cachedValue = llElements[m_currentEl].value;\n        }\n      }\n      return *this;\n    }\n\n  protected:\n    const AmbiVector& m_vector; // the target vector\n    StorageIndex m_currentEl;   // the current element in sparse/linked-list mode\n    RealScalar m_epsilon;       // epsilon used to prune zero coefficients\n    StorageIndex m_cachedIndex; // current coordinate\n    Scalar m_cachedValue;       // current value\n    bool m_isDense;             // mode of the vector\n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_AMBIVECTOR_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseCore/CompressedStorage.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_COMPRESSED_STORAGE_H\n#define EIGEN_COMPRESSED_STORAGE_H\n\nnamespace Eigen { \n\nnamespace internal {\n\n/** \\internal\n  * Stores a sparse set of values as a list of values and a list of indices.\n  *\n  */\ntemplate<typename _Scalar,typename _StorageIndex>\nclass CompressedStorage\n{\n  public:\n\n    typedef _Scalar Scalar;\n    typedef _StorageIndex StorageIndex;\n\n  protected:\n\n    typedef typename NumTraits<Scalar>::Real RealScalar;\n\n  public:\n\n    CompressedStorage()\n      : m_values(0), m_indices(0), m_size(0), m_allocatedSize(0)\n    {}\n\n    explicit CompressedStorage(Index size)\n      : m_values(0), m_indices(0), m_size(0), m_allocatedSize(0)\n    {\n      resize(size);\n    }\n\n    CompressedStorage(const CompressedStorage& other)\n      : m_values(0), m_indices(0), m_size(0), m_allocatedSize(0)\n    {\n      *this = other;\n    }\n\n    CompressedStorage& operator=(const CompressedStorage& other)\n    {\n      resize(other.size());\n      if(other.size()>0)\n      {\n        internal::smart_copy(other.m_values,  other.m_values  + m_size, m_values);\n        internal::smart_copy(other.m_indices, other.m_indices + m_size, m_indices);\n      }\n      return *this;\n    }\n\n    void swap(CompressedStorage& other)\n    {\n      std::swap(m_values, other.m_values);\n      std::swap(m_indices, other.m_indices);\n      std::swap(m_size, other.m_size);\n      std::swap(m_allocatedSize, other.m_allocatedSize);\n    }\n\n    ~CompressedStorage()\n    {\n      delete[] m_values;\n      delete[] m_indices;\n    }\n\n    void reserve(Index size)\n    {\n      Index newAllocatedSize = m_size + size;\n      if (newAllocatedSize > m_allocatedSize)\n        reallocate(newAllocatedSize);\n    }\n\n    void squeeze()\n    {\n      if (m_allocatedSize>m_size)\n        reallocate(m_size);\n    }\n\n    void resize(Index size, double reserveSizeFactor = 0)\n    {\n      if (m_allocatedSize<size)\n      {\n        Index realloc_size = (std::min<Index>)(NumTraits<StorageIndex>::highest(),  size + Index(reserveSizeFactor*double(size)));\n        if(realloc_size<size)\n          internal::throw_std_bad_alloc();\n        reallocate(realloc_size);\n      }\n      m_size = size;\n    }\n\n    void append(const Scalar& v, Index i)\n    {\n      Index id = m_size;\n      resize(m_size+1, 1);\n      m_values[id] = v;\n      m_indices[id] = internal::convert_index<StorageIndex>(i);\n    }\n\n    inline Index size() const { return m_size; }\n    inline Index allocatedSize() const { return m_allocatedSize; }\n    inline void clear() { m_size = 0; }\n\n    const Scalar* valuePtr() const { return m_values; }\n    Scalar* valuePtr() { return m_values; }\n    const StorageIndex* indexPtr() const { return m_indices; }\n    StorageIndex* indexPtr() { return m_indices; }\n\n    inline Scalar& value(Index i) { eigen_internal_assert(m_values!=0); return m_values[i]; }\n    inline const Scalar& value(Index i) const { eigen_internal_assert(m_values!=0); return m_values[i]; }\n\n    inline StorageIndex& index(Index i) { eigen_internal_assert(m_indices!=0); return m_indices[i]; }\n    inline const StorageIndex& index(Index i) const { eigen_internal_assert(m_indices!=0); return m_indices[i]; }\n\n    /** \\returns the largest \\c k such that for all \\c j in [0,k) index[\\c j]\\<\\a key */\n    inline Index searchLowerIndex(Index key) const\n    {\n      return searchLowerIndex(0, m_size, key);\n    }\n\n    /** \\returns the largest \\c k in [start,end) such that for all \\c j in [start,k) index[\\c j]\\<\\a key */\n    inline Index searchLowerIndex(Index start, Index end, Index key) const\n    {\n      while(end>start)\n      {\n        Index mid = (end+start)>>1;\n        if (m_indices[mid]<key)\n          start = mid+1;\n        else\n          end = mid;\n      }\n      return start;\n    }\n\n    /** \\returns the stored value at index \\a key\n      * If the value does not exist, then the value \\a defaultValue is returned without any insertion. */\n    inline Scalar at(Index key, const Scalar& defaultValue = Scalar(0)) const\n    {\n      if (m_size==0)\n        return defaultValue;\n      else if (key==m_indices[m_size-1])\n        return m_values[m_size-1];\n      // ^^  optimization: let's first check if it is the last coefficient\n      // (very common in high level algorithms)\n      const Index id = searchLowerIndex(0,m_size-1,key);\n      return ((id<m_size) && (m_indices[id]==key)) ? m_values[id] : defaultValue;\n    }\n\n    /** Like at(), but the search is performed in the range [start,end) */\n    inline Scalar atInRange(Index start, Index end, Index key, const Scalar &defaultValue = Scalar(0)) const\n    {\n      if (start>=end)\n        return defaultValue;\n      else if (end>start && key==m_indices[end-1])\n        return m_values[end-1];\n      // ^^  optimization: let's first check if it is the last coefficient\n      // (very common in high level algorithms)\n      const Index id = searchLowerIndex(start,end-1,key);\n      return ((id<end) && (m_indices[id]==key)) ? m_values[id] : defaultValue;\n    }\n\n    /** \\returns a reference to the value at index \\a key\n      * If the value does not exist, then the value \\a defaultValue is inserted\n      * such that the keys are sorted. */\n    inline Scalar& atWithInsertion(Index key, const Scalar& defaultValue = Scalar(0))\n    {\n      Index id = searchLowerIndex(0,m_size,key);\n      if (id>=m_size || m_indices[id]!=key)\n      {\n        if (m_allocatedSize<m_size+1)\n        {\n          m_allocatedSize = 2*(m_size+1);\n          internal::scoped_array<Scalar> newValues(m_allocatedSize);\n          internal::scoped_array<StorageIndex> newIndices(m_allocatedSize);\n\n          // copy first chunk\n          internal::smart_copy(m_values,  m_values +id, newValues.ptr());\n          internal::smart_copy(m_indices, m_indices+id, newIndices.ptr());\n\n          // copy the rest\n          if(m_size>id)\n          {\n            internal::smart_copy(m_values +id,  m_values +m_size, newValues.ptr() +id+1);\n            internal::smart_copy(m_indices+id,  m_indices+m_size, newIndices.ptr()+id+1);\n          }\n          std::swap(m_values,newValues.ptr());\n          std::swap(m_indices,newIndices.ptr());\n        }\n        else if(m_size>id)\n        {\n          internal::smart_memmove(m_values +id, m_values +m_size, m_values +id+1);\n          internal::smart_memmove(m_indices+id, m_indices+m_size, m_indices+id+1);\n        }\n        m_size++;\n        m_indices[id] = internal::convert_index<StorageIndex>(key);\n        m_values[id] = defaultValue;\n      }\n      return m_values[id];\n    }\n\n    void moveChunk(Index from, Index to, Index chunkSize)\n    {\n      eigen_internal_assert(to+chunkSize <= m_size);\n      if(to>from && from+chunkSize>to)\n      {\n        // move backward\n        internal::smart_memmove(m_values+from,  m_values+from+chunkSize,  m_values+to);\n        internal::smart_memmove(m_indices+from, m_indices+from+chunkSize, m_indices+to);\n      }\n      else\n      {\n        internal::smart_copy(m_values+from,  m_values+from+chunkSize,  m_values+to);\n        internal::smart_copy(m_indices+from, m_indices+from+chunkSize, m_indices+to);\n      }\n    }\n\n    void prune(const Scalar& reference, const RealScalar& epsilon = NumTraits<RealScalar>::dummy_precision())\n    {\n      Index k = 0;\n      Index n = size();\n      for (Index i=0; i<n; ++i)\n      {\n        if (!internal::isMuchSmallerThan(value(i), reference, epsilon))\n        {\n          value(k) = value(i);\n          index(k) = index(i);\n          ++k;\n        }\n      }\n      resize(k,0);\n    }\n\n  protected:\n\n    inline void reallocate(Index size)\n    {\n      #ifdef EIGEN_SPARSE_COMPRESSED_STORAGE_REALLOCATE_PLUGIN\n        EIGEN_SPARSE_COMPRESSED_STORAGE_REALLOCATE_PLUGIN\n      #endif\n      eigen_internal_assert(size!=m_allocatedSize);\n      internal::scoped_array<Scalar> newValues(size);\n      internal::scoped_array<StorageIndex> newIndices(size);\n      Index copySize = (std::min)(size, m_size);\n      if (copySize>0) {\n        internal::smart_copy(m_values, m_values+copySize, newValues.ptr());\n        internal::smart_copy(m_indices, m_indices+copySize, newIndices.ptr());\n      }\n      std::swap(m_values,newValues.ptr());\n      std::swap(m_indices,newIndices.ptr());\n      m_allocatedSize = size;\n    }\n\n  protected:\n    Scalar* m_values;\n    StorageIndex* m_indices;\n    Index m_size;\n    Index m_allocatedSize;\n\n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_COMPRESSED_STORAGE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseCore/ConservativeSparseSparseProduct.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2015 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CONSERVATIVESPARSESPARSEPRODUCT_H\n#define EIGEN_CONSERVATIVESPARSESPARSEPRODUCT_H\n\nnamespace Eigen { \n\nnamespace internal {\n\ntemplate<typename Lhs, typename Rhs, typename ResultType>\nstatic void conservative_sparse_sparse_product_impl(const Lhs& lhs, const Rhs& rhs, ResultType& res, bool sortedInsertion = false)\n{\n  typedef typename remove_all<Lhs>::type::Scalar LhsScalar;\n  typedef typename remove_all<Rhs>::type::Scalar RhsScalar;\n  typedef typename remove_all<ResultType>::type::Scalar ResScalar;\n\n  // make sure to call innerSize/outerSize since we fake the storage order.\n  Index rows = lhs.innerSize();\n  Index cols = rhs.outerSize();\n  eigen_assert(lhs.outerSize() == rhs.innerSize());\n  \n  ei_declare_aligned_stack_constructed_variable(bool,   mask,     rows, 0);\n  ei_declare_aligned_stack_constructed_variable(ResScalar, values,   rows, 0);\n  ei_declare_aligned_stack_constructed_variable(Index,  indices,  rows, 0);\n  \n  std::memset(mask,0,sizeof(bool)*rows);\n\n  evaluator<Lhs> lhsEval(lhs);\n  evaluator<Rhs> rhsEval(rhs);\n  \n  // estimate the number of non zero entries\n  // given a rhs column containing Y non zeros, we assume that the respective Y columns\n  // of the lhs differs in average of one non zeros, thus the number of non zeros for\n  // the product of a rhs column with the lhs is X+Y where X is the average number of non zero\n  // per column of the lhs.\n  // Therefore, we have nnz(lhs*rhs) = nnz(lhs) + nnz(rhs)\n  Index estimated_nnz_prod = lhsEval.nonZerosEstimate() + rhsEval.nonZerosEstimate();\n\n  res.setZero();\n  res.reserve(Index(estimated_nnz_prod));\n  // we compute each column of the result, one after the other\n  for (Index j=0; j<cols; ++j)\n  {\n\n    res.startVec(j);\n    Index nnz = 0;\n    for (typename evaluator<Rhs>::InnerIterator rhsIt(rhsEval, j); rhsIt; ++rhsIt)\n    {\n      RhsScalar y = rhsIt.value();\n      Index k = rhsIt.index();\n      for (typename evaluator<Lhs>::InnerIterator lhsIt(lhsEval, k); lhsIt; ++lhsIt)\n      {\n        Index i = lhsIt.index();\n        LhsScalar x = lhsIt.value();\n        if(!mask[i])\n        {\n          mask[i] = true;\n          values[i] = x * y;\n          indices[nnz] = i;\n          ++nnz;\n        }\n        else\n          values[i] += x * y;\n      }\n    }\n    if(!sortedInsertion)\n    {\n      // unordered insertion\n      for(Index k=0; k<nnz; ++k)\n      {\n        Index i = indices[k];\n        res.insertBackByOuterInnerUnordered(j,i) = values[i];\n        mask[i] = false;\n      }\n    }\n    else\n    {\n      // alternative ordered insertion code:\n      const Index t200 = rows/11; // 11 == (log2(200)*1.39)\n      const Index t = (rows*100)/139;\n\n      // FIXME reserve nnz non zeros\n      // FIXME implement faster sorting algorithms for very small nnz\n      // if the result is sparse enough => use a quick sort\n      // otherwise => loop through the entire vector\n      // In order to avoid to perform an expensive log2 when the\n      // result is clearly very sparse we use a linear bound up to 200.\n      if((nnz<200 && nnz<t200) || nnz * numext::log2(int(nnz)) < t)\n      {\n        if(nnz>1) std::sort(indices,indices+nnz);\n        for(Index k=0; k<nnz; ++k)\n        {\n          Index i = indices[k];\n          res.insertBackByOuterInner(j,i) = values[i];\n          mask[i] = false;\n        }\n      }\n      else\n      {\n        // dense path\n        for(Index i=0; i<rows; ++i)\n        {\n          if(mask[i])\n          {\n            mask[i] = false;\n            res.insertBackByOuterInner(j,i) = values[i];\n          }\n        }\n      }\n    }\n  }\n  res.finalize();\n}\n\n\n} // end namespace internal\n\nnamespace internal {\n\ntemplate<typename Lhs, typename Rhs, typename ResultType,\n  int LhsStorageOrder = (traits<Lhs>::Flags&RowMajorBit) ? RowMajor : ColMajor,\n  int RhsStorageOrder = (traits<Rhs>::Flags&RowMajorBit) ? RowMajor : ColMajor,\n  int ResStorageOrder = (traits<ResultType>::Flags&RowMajorBit) ? RowMajor : ColMajor>\nstruct conservative_sparse_sparse_product_selector;\n\ntemplate<typename Lhs, typename Rhs, typename ResultType>\nstruct conservative_sparse_sparse_product_selector<Lhs,Rhs,ResultType,ColMajor,ColMajor,ColMajor>\n{\n  typedef typename remove_all<Lhs>::type LhsCleaned;\n  typedef typename LhsCleaned::Scalar Scalar;\n\n  static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res)\n  {\n    typedef SparseMatrix<typename ResultType::Scalar,RowMajor,typename ResultType::StorageIndex> RowMajorMatrix;\n    typedef SparseMatrix<typename ResultType::Scalar,ColMajor,typename ResultType::StorageIndex> ColMajorMatrixAux;\n    typedef typename sparse_eval<ColMajorMatrixAux,ResultType::RowsAtCompileTime,ResultType::ColsAtCompileTime,ColMajorMatrixAux::Flags>::type ColMajorMatrix;\n    \n    // If the result is tall and thin (in the extreme case a column vector)\n    // then it is faster to sort the coefficients inplace instead of transposing twice.\n    // FIXME, the following heuristic is probably not very good.\n    if(lhs.rows()>rhs.cols())\n    {\n      ColMajorMatrix resCol(lhs.rows(),rhs.cols());\n      // perform sorted insertion\n      internal::conservative_sparse_sparse_product_impl<Lhs,Rhs,ColMajorMatrix>(lhs, rhs, resCol, true);\n      res = resCol.markAsRValue();\n    }\n    else\n    {\n      ColMajorMatrixAux resCol(lhs.rows(),rhs.cols());\n      // ressort to transpose to sort the entries\n      internal::conservative_sparse_sparse_product_impl<Lhs,Rhs,ColMajorMatrixAux>(lhs, rhs, resCol, false);\n      RowMajorMatrix resRow(resCol);\n      res = resRow.markAsRValue();\n    }\n  }\n};\n\ntemplate<typename Lhs, typename Rhs, typename ResultType>\nstruct conservative_sparse_sparse_product_selector<Lhs,Rhs,ResultType,RowMajor,ColMajor,ColMajor>\n{\n  static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res)\n  {\n    typedef SparseMatrix<typename Rhs::Scalar,RowMajor,typename ResultType::StorageIndex> RowMajorRhs;\n    typedef SparseMatrix<typename ResultType::Scalar,RowMajor,typename ResultType::StorageIndex> RowMajorRes;\n    RowMajorRhs rhsRow = rhs;\n    RowMajorRes resRow(lhs.rows(), rhs.cols());\n    internal::conservative_sparse_sparse_product_impl<RowMajorRhs,Lhs,RowMajorRes>(rhsRow, lhs, resRow);\n    res = resRow;\n  }\n};\n\ntemplate<typename Lhs, typename Rhs, typename ResultType>\nstruct conservative_sparse_sparse_product_selector<Lhs,Rhs,ResultType,ColMajor,RowMajor,ColMajor>\n{\n  static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res)\n  {\n    typedef SparseMatrix<typename Lhs::Scalar,RowMajor,typename ResultType::StorageIndex> RowMajorLhs;\n    typedef SparseMatrix<typename ResultType::Scalar,RowMajor,typename ResultType::StorageIndex> RowMajorRes;\n    RowMajorLhs lhsRow = lhs;\n    RowMajorRes resRow(lhs.rows(), rhs.cols());\n    internal::conservative_sparse_sparse_product_impl<Rhs,RowMajorLhs,RowMajorRes>(rhs, lhsRow, resRow);\n    res = resRow;\n  }\n};\n\ntemplate<typename Lhs, typename Rhs, typename ResultType>\nstruct conservative_sparse_sparse_product_selector<Lhs,Rhs,ResultType,RowMajor,RowMajor,ColMajor>\n{\n  static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res)\n  {\n    typedef SparseMatrix<typename ResultType::Scalar,RowMajor,typename ResultType::StorageIndex> RowMajorMatrix;\n    RowMajorMatrix resRow(lhs.rows(), rhs.cols());\n    internal::conservative_sparse_sparse_product_impl<Rhs,Lhs,RowMajorMatrix>(rhs, lhs, resRow);\n    res = resRow;\n  }\n};\n\n\ntemplate<typename Lhs, typename Rhs, typename ResultType>\nstruct conservative_sparse_sparse_product_selector<Lhs,Rhs,ResultType,ColMajor,ColMajor,RowMajor>\n{\n  typedef typename traits<typename remove_all<Lhs>::type>::Scalar Scalar;\n\n  static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res)\n  {\n    typedef SparseMatrix<typename ResultType::Scalar,ColMajor,typename ResultType::StorageIndex> ColMajorMatrix;\n    ColMajorMatrix resCol(lhs.rows(), rhs.cols());\n    internal::conservative_sparse_sparse_product_impl<Lhs,Rhs,ColMajorMatrix>(lhs, rhs, resCol);\n    res = resCol;\n  }\n};\n\ntemplate<typename Lhs, typename Rhs, typename ResultType>\nstruct conservative_sparse_sparse_product_selector<Lhs,Rhs,ResultType,RowMajor,ColMajor,RowMajor>\n{\n  static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res)\n  {\n    typedef SparseMatrix<typename Lhs::Scalar,ColMajor,typename ResultType::StorageIndex> ColMajorLhs;\n    typedef SparseMatrix<typename ResultType::Scalar,ColMajor,typename ResultType::StorageIndex> ColMajorRes;\n    ColMajorLhs lhsCol = lhs;\n    ColMajorRes resCol(lhs.rows(), rhs.cols());\n    internal::conservative_sparse_sparse_product_impl<ColMajorLhs,Rhs,ColMajorRes>(lhsCol, rhs, resCol);\n    res = resCol;\n  }\n};\n\ntemplate<typename Lhs, typename Rhs, typename ResultType>\nstruct conservative_sparse_sparse_product_selector<Lhs,Rhs,ResultType,ColMajor,RowMajor,RowMajor>\n{\n  static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res)\n  {\n    typedef SparseMatrix<typename Rhs::Scalar,ColMajor,typename ResultType::StorageIndex> ColMajorRhs;\n    typedef SparseMatrix<typename ResultType::Scalar,ColMajor,typename ResultType::StorageIndex> ColMajorRes;\n    ColMajorRhs rhsCol = rhs;\n    ColMajorRes resCol(lhs.rows(), rhs.cols());\n    internal::conservative_sparse_sparse_product_impl<Lhs,ColMajorRhs,ColMajorRes>(lhs, rhsCol, resCol);\n    res = resCol;\n  }\n};\n\ntemplate<typename Lhs, typename Rhs, typename ResultType>\nstruct conservative_sparse_sparse_product_selector<Lhs,Rhs,ResultType,RowMajor,RowMajor,RowMajor>\n{\n  static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res)\n  {\n    typedef SparseMatrix<typename ResultType::Scalar,RowMajor,typename ResultType::StorageIndex> RowMajorMatrix;\n    typedef SparseMatrix<typename ResultType::Scalar,ColMajor,typename ResultType::StorageIndex> ColMajorMatrix;\n    RowMajorMatrix resRow(lhs.rows(),rhs.cols());\n    internal::conservative_sparse_sparse_product_impl<Rhs,Lhs,RowMajorMatrix>(rhs, lhs, resRow);\n    // sort the non zeros:\n    ColMajorMatrix resCol(resRow);\n    res = resCol;\n  }\n};\n\n} // end namespace internal\n\n\nnamespace internal {\n\ntemplate<typename Lhs, typename Rhs, typename ResultType>\nstatic void sparse_sparse_to_dense_product_impl(const Lhs& lhs, const Rhs& rhs, ResultType& res)\n{\n  typedef typename remove_all<Lhs>::type::Scalar LhsScalar;\n  typedef typename remove_all<Rhs>::type::Scalar RhsScalar;\n  Index cols = rhs.outerSize();\n  eigen_assert(lhs.outerSize() == rhs.innerSize());\n\n  evaluator<Lhs> lhsEval(lhs);\n  evaluator<Rhs> rhsEval(rhs);\n\n  for (Index j=0; j<cols; ++j)\n  {\n    for (typename evaluator<Rhs>::InnerIterator rhsIt(rhsEval, j); rhsIt; ++rhsIt)\n    {\n      RhsScalar y = rhsIt.value();\n      Index k = rhsIt.index();\n      for (typename evaluator<Lhs>::InnerIterator lhsIt(lhsEval, k); lhsIt; ++lhsIt)\n      {\n        Index i = lhsIt.index();\n        LhsScalar x = lhsIt.value();\n        res.coeffRef(i,j) += x * y;\n      }\n    }\n  }\n}\n\n\n} // end namespace internal\n\nnamespace internal {\n\ntemplate<typename Lhs, typename Rhs, typename ResultType,\n  int LhsStorageOrder = (traits<Lhs>::Flags&RowMajorBit) ? RowMajor : ColMajor,\n  int RhsStorageOrder = (traits<Rhs>::Flags&RowMajorBit) ? RowMajor : ColMajor>\nstruct sparse_sparse_to_dense_product_selector;\n\ntemplate<typename Lhs, typename Rhs, typename ResultType>\nstruct sparse_sparse_to_dense_product_selector<Lhs,Rhs,ResultType,ColMajor,ColMajor>\n{\n  static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res)\n  {\n    internal::sparse_sparse_to_dense_product_impl<Lhs,Rhs,ResultType>(lhs, rhs, res);\n  }\n};\n\ntemplate<typename Lhs, typename Rhs, typename ResultType>\nstruct sparse_sparse_to_dense_product_selector<Lhs,Rhs,ResultType,RowMajor,ColMajor>\n{\n  static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res)\n  {\n    typedef SparseMatrix<typename Lhs::Scalar,ColMajor,typename ResultType::StorageIndex> ColMajorLhs;\n    ColMajorLhs lhsCol(lhs);\n    internal::sparse_sparse_to_dense_product_impl<ColMajorLhs,Rhs,ResultType>(lhsCol, rhs, res);\n  }\n};\n\ntemplate<typename Lhs, typename Rhs, typename ResultType>\nstruct sparse_sparse_to_dense_product_selector<Lhs,Rhs,ResultType,ColMajor,RowMajor>\n{\n  static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res)\n  {\n    typedef SparseMatrix<typename Rhs::Scalar,ColMajor,typename ResultType::StorageIndex> ColMajorRhs;\n    ColMajorRhs rhsCol(rhs);\n    internal::sparse_sparse_to_dense_product_impl<Lhs,ColMajorRhs,ResultType>(lhs, rhsCol, res);\n  }\n};\n\ntemplate<typename Lhs, typename Rhs, typename ResultType>\nstruct sparse_sparse_to_dense_product_selector<Lhs,Rhs,ResultType,RowMajor,RowMajor>\n{\n  static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res)\n  {\n    Transpose<ResultType> trRes(res);\n    internal::sparse_sparse_to_dense_product_impl<Rhs,Lhs,Transpose<ResultType> >(rhs, lhs, trRes);\n  }\n};\n\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_CONSERVATIVESPARSESPARSEPRODUCT_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseCore/MappedSparseMatrix.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_MAPPED_SPARSEMATRIX_H\n#define EIGEN_MAPPED_SPARSEMATRIX_H\n\nnamespace Eigen {\n\n/** \\deprecated Use Map<SparseMatrix<> >\n  * \\class MappedSparseMatrix\n  *\n  * \\brief Sparse matrix\n  *\n  * \\param _Scalar the scalar type, i.e. the type of the coefficients\n  *\n  * See http://www.netlib.org/linalg/html_templates/node91.html for details on the storage scheme.\n  *\n  */\nnamespace internal {\ntemplate<typename _Scalar, int _Flags, typename _StorageIndex>\nstruct traits<MappedSparseMatrix<_Scalar, _Flags, _StorageIndex> > : traits<SparseMatrix<_Scalar, _Flags, _StorageIndex> >\n{};\n} // end namespace internal\n\ntemplate<typename _Scalar, int _Flags, typename _StorageIndex>\nclass MappedSparseMatrix\n  : public Map<SparseMatrix<_Scalar, _Flags, _StorageIndex> >\n{\n    typedef Map<SparseMatrix<_Scalar, _Flags, _StorageIndex> > Base;\n\n  public:\n    \n    typedef typename Base::StorageIndex StorageIndex;\n    typedef typename Base::Scalar Scalar;\n\n    inline MappedSparseMatrix(Index rows, Index cols, Index nnz, StorageIndex* outerIndexPtr, StorageIndex* innerIndexPtr, Scalar* valuePtr, StorageIndex* innerNonZeroPtr = 0)\n      : Base(rows, cols, nnz, outerIndexPtr, innerIndexPtr, valuePtr, innerNonZeroPtr)\n    {}\n\n    /** Empty destructor */\n    inline ~MappedSparseMatrix() {}\n};\n\nnamespace internal {\n\ntemplate<typename _Scalar, int _Options, typename _StorageIndex>\nstruct evaluator<MappedSparseMatrix<_Scalar,_Options,_StorageIndex> >\n  : evaluator<SparseCompressedBase<MappedSparseMatrix<_Scalar,_Options,_StorageIndex> > >\n{\n  typedef MappedSparseMatrix<_Scalar,_Options,_StorageIndex> XprType;\n  typedef evaluator<SparseCompressedBase<XprType> > Base;\n  \n  evaluator() : Base() {}\n  explicit evaluator(const XprType &mat) : Base(mat) {}\n};\n\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_MAPPED_SPARSEMATRIX_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseCore/SparseAssign.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPARSEASSIGN_H\n#define EIGEN_SPARSEASSIGN_H\n\nnamespace Eigen { \n\ntemplate<typename Derived>    \ntemplate<typename OtherDerived>\nDerived& SparseMatrixBase<Derived>::operator=(const EigenBase<OtherDerived> &other)\n{\n  internal::call_assignment_no_alias(derived(), other.derived());\n  return derived();\n}\n\ntemplate<typename Derived>\ntemplate<typename OtherDerived>\nDerived& SparseMatrixBase<Derived>::operator=(const ReturnByValue<OtherDerived>& other)\n{\n  // TODO use the evaluator mechanism\n  other.evalTo(derived());\n  return derived();\n}\n\ntemplate<typename Derived>\ntemplate<typename OtherDerived>\ninline Derived& SparseMatrixBase<Derived>::operator=(const SparseMatrixBase<OtherDerived>& other)\n{\n  // by default sparse evaluation do not alias, so we can safely bypass the generic call_assignment routine\n  internal::Assignment<Derived,OtherDerived,internal::assign_op<Scalar,typename OtherDerived::Scalar> >\n          ::run(derived(), other.derived(), internal::assign_op<Scalar,typename OtherDerived::Scalar>());\n  return derived();\n}\n\ntemplate<typename Derived>\ninline Derived& SparseMatrixBase<Derived>::operator=(const Derived& other)\n{\n  internal::call_assignment_no_alias(derived(), other.derived());\n  return derived();\n}\n\nnamespace internal {\n\ntemplate<>\nstruct storage_kind_to_evaluator_kind<Sparse> {\n  typedef IteratorBased Kind;\n};\n\ntemplate<>\nstruct storage_kind_to_shape<Sparse> {\n  typedef SparseShape Shape;\n};\n\nstruct Sparse2Sparse {};\nstruct Sparse2Dense  {};\n\ntemplate<> struct AssignmentKind<SparseShape, SparseShape>           { typedef Sparse2Sparse Kind; };\ntemplate<> struct AssignmentKind<SparseShape, SparseTriangularShape> { typedef Sparse2Sparse Kind; };\ntemplate<> struct AssignmentKind<DenseShape,  SparseShape>           { typedef Sparse2Dense  Kind; };\ntemplate<> struct AssignmentKind<DenseShape,  SparseTriangularShape> { typedef Sparse2Dense  Kind; };\n\n\ntemplate<typename DstXprType, typename SrcXprType>\nvoid assign_sparse_to_sparse(DstXprType &dst, const SrcXprType &src)\n{\n  typedef typename DstXprType::Scalar Scalar;\n  typedef internal::evaluator<DstXprType> DstEvaluatorType;\n  typedef internal::evaluator<SrcXprType> SrcEvaluatorType;\n\n  SrcEvaluatorType srcEvaluator(src);\n\n  const bool transpose = (DstEvaluatorType::Flags & RowMajorBit) != (SrcEvaluatorType::Flags & RowMajorBit);\n  const Index outerEvaluationSize = (SrcEvaluatorType::Flags&RowMajorBit) ? src.rows() : src.cols();\n  if ((!transpose) && src.isRValue())\n  {\n    // eval without temporary\n    dst.resize(src.rows(), src.cols());\n    dst.setZero();\n    dst.reserve((std::min)(src.rows()*src.cols(), (std::max)(src.rows(),src.cols())*2));\n    for (Index j=0; j<outerEvaluationSize; ++j)\n    {\n      dst.startVec(j);\n      for (typename SrcEvaluatorType::InnerIterator it(srcEvaluator, j); it; ++it)\n      {\n        Scalar v = it.value();\n        dst.insertBackByOuterInner(j,it.index()) = v;\n      }\n    }\n    dst.finalize();\n  }\n  else\n  {\n    // eval through a temporary\n    eigen_assert(( ((internal::traits<DstXprType>::SupportedAccessPatterns & OuterRandomAccessPattern)==OuterRandomAccessPattern) ||\n              (!((DstEvaluatorType::Flags & RowMajorBit) != (SrcEvaluatorType::Flags & RowMajorBit)))) &&\n              \"the transpose operation is supposed to be handled in SparseMatrix::operator=\");\n\n    enum { Flip = (DstEvaluatorType::Flags & RowMajorBit) != (SrcEvaluatorType::Flags & RowMajorBit) };\n\n    \n    DstXprType temp(src.rows(), src.cols());\n\n    temp.reserve((std::min)(src.rows()*src.cols(), (std::max)(src.rows(),src.cols())*2));\n    for (Index j=0; j<outerEvaluationSize; ++j)\n    {\n      temp.startVec(j);\n      for (typename SrcEvaluatorType::InnerIterator it(srcEvaluator, j); it; ++it)\n      {\n        Scalar v = it.value();\n        temp.insertBackByOuterInner(Flip?it.index():j,Flip?j:it.index()) = v;\n      }\n    }\n    temp.finalize();\n\n    dst = temp.markAsRValue();\n  }\n}\n\n// Generic Sparse to Sparse assignment\ntemplate< typename DstXprType, typename SrcXprType, typename Functor>\nstruct Assignment<DstXprType, SrcXprType, Functor, Sparse2Sparse>\n{\n  static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op<typename DstXprType::Scalar,typename SrcXprType::Scalar> &/*func*/)\n  {\n    assign_sparse_to_sparse(dst.derived(), src.derived());\n  }\n};\n\n// Generic Sparse to Dense assignment\ntemplate< typename DstXprType, typename SrcXprType, typename Functor, typename Weak>\nstruct Assignment<DstXprType, SrcXprType, Functor, Sparse2Dense, Weak>\n{\n  static void run(DstXprType &dst, const SrcXprType &src, const Functor &func)\n  {\n    if(internal::is_same<Functor,internal::assign_op<typename DstXprType::Scalar,typename SrcXprType::Scalar> >::value)\n      dst.setZero();\n    \n    internal::evaluator<SrcXprType> srcEval(src);\n    resize_if_allowed(dst, src, func);\n    internal::evaluator<DstXprType> dstEval(dst);\n    \n    const Index outerEvaluationSize = (internal::evaluator<SrcXprType>::Flags&RowMajorBit) ? src.rows() : src.cols();\n    for (Index j=0; j<outerEvaluationSize; ++j)\n      for (typename internal::evaluator<SrcXprType>::InnerIterator i(srcEval,j); i; ++i)\n        func.assignCoeff(dstEval.coeffRef(i.row(),i.col()), i.value());\n  }\n};\n\n// Specialization for dense ?= dense +/- sparse and dense ?= sparse +/- dense\ntemplate<typename DstXprType, typename Func1, typename Func2>\nstruct assignment_from_dense_op_sparse\n{\n  template<typename SrcXprType, typename InitialFunc>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  void run(DstXprType &dst, const SrcXprType &src, const InitialFunc& /*func*/)\n  {\n    #ifdef EIGEN_SPARSE_ASSIGNMENT_FROM_DENSE_OP_SPARSE_PLUGIN\n    EIGEN_SPARSE_ASSIGNMENT_FROM_DENSE_OP_SPARSE_PLUGIN\n    #endif\n\n    call_assignment_no_alias(dst, src.lhs(), Func1());\n    call_assignment_no_alias(dst, src.rhs(), Func2());\n  }\n\n  // Specialization for dense1 = sparse + dense2; -> dense1 = dense2; dense1 += sparse;\n  template<typename Lhs, typename Rhs, typename Scalar>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  typename internal::enable_if<internal::is_same<typename internal::evaluator_traits<Rhs>::Shape,DenseShape>::value>::type\n  run(DstXprType &dst, const CwiseBinaryOp<internal::scalar_sum_op<Scalar,Scalar>, const Lhs, const Rhs> &src,\n      const internal::assign_op<typename DstXprType::Scalar,Scalar>& /*func*/)\n  {\n    #ifdef EIGEN_SPARSE_ASSIGNMENT_FROM_SPARSE_ADD_DENSE_PLUGIN\n    EIGEN_SPARSE_ASSIGNMENT_FROM_SPARSE_ADD_DENSE_PLUGIN\n    #endif\n\n    // Apply the dense matrix first, then the sparse one.\n    call_assignment_no_alias(dst, src.rhs(), Func1());\n    call_assignment_no_alias(dst, src.lhs(), Func2());\n  }\n\n  // Specialization for dense1 = sparse - dense2; -> dense1 = -dense2; dense1 += sparse;\n  template<typename Lhs, typename Rhs, typename Scalar>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  typename internal::enable_if<internal::is_same<typename internal::evaluator_traits<Rhs>::Shape,DenseShape>::value>::type\n  run(DstXprType &dst, const CwiseBinaryOp<internal::scalar_difference_op<Scalar,Scalar>, const Lhs, const Rhs> &src,\n      const internal::assign_op<typename DstXprType::Scalar,Scalar>& /*func*/)\n  {\n    #ifdef EIGEN_SPARSE_ASSIGNMENT_FROM_SPARSE_SUB_DENSE_PLUGIN\n    EIGEN_SPARSE_ASSIGNMENT_FROM_SPARSE_SUB_DENSE_PLUGIN\n    #endif\n\n    // Apply the dense matrix first, then the sparse one.\n    call_assignment_no_alias(dst, -src.rhs(), Func1());\n    call_assignment_no_alias(dst,  src.lhs(), add_assign_op<typename DstXprType::Scalar,typename Lhs::Scalar>());\n  }\n};\n\n#define EIGEN_CATCH_ASSIGN_DENSE_OP_SPARSE(ASSIGN_OP,BINOP,ASSIGN_OP2) \\\n  template< typename DstXprType, typename Lhs, typename Rhs, typename Scalar> \\\n  struct Assignment<DstXprType, CwiseBinaryOp<internal::BINOP<Scalar,Scalar>, const Lhs, const Rhs>, internal::ASSIGN_OP<typename DstXprType::Scalar,Scalar>, \\\n                    Sparse2Dense, \\\n                    typename internal::enable_if<   internal::is_same<typename internal::evaluator_traits<Lhs>::Shape,DenseShape>::value \\\n                                                 || internal::is_same<typename internal::evaluator_traits<Rhs>::Shape,DenseShape>::value>::type> \\\n    : assignment_from_dense_op_sparse<DstXprType, internal::ASSIGN_OP<typename DstXprType::Scalar,typename Lhs::Scalar>, internal::ASSIGN_OP2<typename DstXprType::Scalar,typename Rhs::Scalar> > \\\n  {}\n\nEIGEN_CATCH_ASSIGN_DENSE_OP_SPARSE(assign_op,    scalar_sum_op,add_assign_op);\nEIGEN_CATCH_ASSIGN_DENSE_OP_SPARSE(add_assign_op,scalar_sum_op,add_assign_op);\nEIGEN_CATCH_ASSIGN_DENSE_OP_SPARSE(sub_assign_op,scalar_sum_op,sub_assign_op);\n\nEIGEN_CATCH_ASSIGN_DENSE_OP_SPARSE(assign_op,    scalar_difference_op,sub_assign_op);\nEIGEN_CATCH_ASSIGN_DENSE_OP_SPARSE(add_assign_op,scalar_difference_op,sub_assign_op);\nEIGEN_CATCH_ASSIGN_DENSE_OP_SPARSE(sub_assign_op,scalar_difference_op,add_assign_op);\n\n\n// Specialization for \"dst = dec.solve(rhs)\"\n// NOTE we need to specialize it for Sparse2Sparse to avoid ambiguous specialization error\ntemplate<typename DstXprType, typename DecType, typename RhsType, typename Scalar>\nstruct Assignment<DstXprType, Solve<DecType,RhsType>, internal::assign_op<Scalar,Scalar>, Sparse2Sparse>\n{\n  typedef Solve<DecType,RhsType> SrcXprType;\n  static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op<Scalar,Scalar> &)\n  {\n    Index dstRows = src.rows();\n    Index dstCols = src.cols();\n    if((dst.rows()!=dstRows) || (dst.cols()!=dstCols))\n      dst.resize(dstRows, dstCols);\n\n    src.dec()._solve_impl(src.rhs(), dst);\n  }\n};\n\nstruct Diagonal2Sparse {};\n\ntemplate<> struct AssignmentKind<SparseShape,DiagonalShape> { typedef Diagonal2Sparse Kind; };\n\ntemplate< typename DstXprType, typename SrcXprType, typename Functor>\nstruct Assignment<DstXprType, SrcXprType, Functor, Diagonal2Sparse>\n{\n  typedef typename DstXprType::StorageIndex StorageIndex;\n  typedef typename DstXprType::Scalar Scalar;\n\n  template<int Options, typename AssignFunc>\n  static void run(SparseMatrix<Scalar,Options,StorageIndex> &dst, const SrcXprType &src, const AssignFunc &func)\n  { dst.assignDiagonal(src.diagonal(), func); }\n  \n  template<typename DstDerived>\n  static void run(SparseMatrixBase<DstDerived> &dst, const SrcXprType &src, const internal::assign_op<typename DstXprType::Scalar,typename SrcXprType::Scalar> &/*func*/)\n  { dst.derived().diagonal() = src.diagonal(); }\n  \n  template<typename DstDerived>\n  static void run(SparseMatrixBase<DstDerived> &dst, const SrcXprType &src, const internal::add_assign_op<typename DstXprType::Scalar,typename SrcXprType::Scalar> &/*func*/)\n  { dst.derived().diagonal() += src.diagonal(); }\n  \n  template<typename DstDerived>\n  static void run(SparseMatrixBase<DstDerived> &dst, const SrcXprType &src, const internal::sub_assign_op<typename DstXprType::Scalar,typename SrcXprType::Scalar> &/*func*/)\n  { dst.derived().diagonal() -= src.diagonal(); }\n};\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_SPARSEASSIGN_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseCore/SparseBlock.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPARSE_BLOCK_H\n#define EIGEN_SPARSE_BLOCK_H\n\nnamespace Eigen {\n\n// Subset of columns or rows\ntemplate<typename XprType, int BlockRows, int BlockCols>\nclass BlockImpl<XprType,BlockRows,BlockCols,true,Sparse>\n  : public SparseMatrixBase<Block<XprType,BlockRows,BlockCols,true> >\n{\n    typedef typename internal::remove_all<typename XprType::Nested>::type _MatrixTypeNested;\n    typedef Block<XprType, BlockRows, BlockCols, true> BlockType;\npublic:\n    enum { IsRowMajor = internal::traits<BlockType>::IsRowMajor };\nprotected:\n    enum { OuterSize = IsRowMajor ? BlockRows : BlockCols };\n    typedef SparseMatrixBase<BlockType> Base;\n    using Base::convert_index;\npublic:\n    EIGEN_SPARSE_PUBLIC_INTERFACE(BlockType)\n\n    inline BlockImpl(XprType& xpr, Index i)\n      : m_matrix(xpr), m_outerStart(convert_index(i)), m_outerSize(OuterSize)\n    {}\n\n    inline BlockImpl(XprType& xpr, Index startRow, Index startCol, Index blockRows, Index blockCols)\n      : m_matrix(xpr), m_outerStart(convert_index(IsRowMajor ? startRow : startCol)), m_outerSize(convert_index(IsRowMajor ? blockRows : blockCols))\n    {}\n\n    EIGEN_STRONG_INLINE Index rows() const { return IsRowMajor ? m_outerSize.value() : m_matrix.rows(); }\n    EIGEN_STRONG_INLINE Index cols() const { return IsRowMajor ? m_matrix.cols() : m_outerSize.value(); }\n\n    Index nonZeros() const\n    {\n      typedef internal::evaluator<XprType> EvaluatorType;\n      EvaluatorType matEval(m_matrix);\n      Index nnz = 0;\n      Index end = m_outerStart + m_outerSize.value();\n      for(Index j=m_outerStart; j<end; ++j)\n        for(typename EvaluatorType::InnerIterator it(matEval, j); it; ++it)\n          ++nnz;\n      return nnz;\n    }\n\n    inline const Scalar coeff(Index row, Index col) const\n    {\n      return m_matrix.coeff(row + (IsRowMajor ? m_outerStart : 0), col + (IsRowMajor ? 0 :  m_outerStart));\n    }\n\n    inline const Scalar coeff(Index index) const\n    {\n      return m_matrix.coeff(IsRowMajor ? m_outerStart : index, IsRowMajor ? index :  m_outerStart);\n    }\n\n    inline const XprType& nestedExpression() const { return m_matrix; }\n    inline XprType& nestedExpression() { return m_matrix; }\n    Index startRow() const { return IsRowMajor ? m_outerStart : 0; }\n    Index startCol() const { return IsRowMajor ? 0 : m_outerStart; }\n    Index blockRows() const { return IsRowMajor ? m_outerSize.value() : m_matrix.rows(); }\n    Index blockCols() const { return IsRowMajor ? m_matrix.cols() : m_outerSize.value(); }\n\n  protected:\n\n    typename internal::ref_selector<XprType>::non_const_type m_matrix;\n    Index m_outerStart;\n    const internal::variable_if_dynamic<Index, OuterSize> m_outerSize;\n\n  protected:\n    // Disable assignment with clear error message.\n    // Note that simply removing operator= yields compilation errors with ICC+MSVC\n    template<typename T>\n    BlockImpl& operator=(const T&)\n    {\n      EIGEN_STATIC_ASSERT(sizeof(T)==0, THIS_SPARSE_BLOCK_SUBEXPRESSION_IS_READ_ONLY);\n      return *this;\n    }\n};\n\n\n/***************************************************************************\n* specialization for SparseMatrix\n***************************************************************************/\n\nnamespace internal {\n\ntemplate<typename SparseMatrixType, int BlockRows, int BlockCols>\nclass sparse_matrix_block_impl\n  : public SparseCompressedBase<Block<SparseMatrixType,BlockRows,BlockCols,true> >\n{\n    typedef typename internal::remove_all<typename SparseMatrixType::Nested>::type _MatrixTypeNested;\n    typedef Block<SparseMatrixType, BlockRows, BlockCols, true> BlockType;\n    typedef SparseCompressedBase<Block<SparseMatrixType,BlockRows,BlockCols,true> > Base;\n    using Base::convert_index;\npublic:\n    enum { IsRowMajor = internal::traits<BlockType>::IsRowMajor };\n    EIGEN_SPARSE_PUBLIC_INTERFACE(BlockType)\nprotected:\n    typedef typename Base::IndexVector IndexVector;\n    enum { OuterSize = IsRowMajor ? BlockRows : BlockCols };\npublic:\n\n    inline sparse_matrix_block_impl(SparseMatrixType& xpr, Index i)\n      : m_matrix(xpr), m_outerStart(convert_index(i)), m_outerSize(OuterSize)\n    {}\n\n    inline sparse_matrix_block_impl(SparseMatrixType& xpr, Index startRow, Index startCol, Index blockRows, Index blockCols)\n      : m_matrix(xpr), m_outerStart(convert_index(IsRowMajor ? startRow : startCol)), m_outerSize(convert_index(IsRowMajor ? blockRows : blockCols))\n    {}\n\n    template<typename OtherDerived>\n    inline BlockType& operator=(const SparseMatrixBase<OtherDerived>& other)\n    {\n      typedef typename internal::remove_all<typename SparseMatrixType::Nested>::type _NestedMatrixType;\n      _NestedMatrixType& matrix = m_matrix;\n      // This assignment is slow if this vector set is not empty\n      // and/or it is not at the end of the nonzeros of the underlying matrix.\n\n      // 1 - eval to a temporary to avoid transposition and/or aliasing issues\n      Ref<const SparseMatrix<Scalar, IsRowMajor ? RowMajor : ColMajor, StorageIndex> > tmp(other.derived());\n      eigen_internal_assert(tmp.outerSize()==m_outerSize.value());\n\n      // 2 - let's check whether there is enough allocated memory\n      Index nnz           = tmp.nonZeros();\n      Index start         = m_outerStart==0 ? 0 : m_matrix.outerIndexPtr()[m_outerStart]; // starting position of the current block\n      Index end           = m_matrix.outerIndexPtr()[m_outerStart+m_outerSize.value()]; // ending position of the current block\n      Index block_size    = end - start;                                                // available room in the current block\n      Index tail_size     = m_matrix.outerIndexPtr()[m_matrix.outerSize()] - end;\n\n      Index free_size     = m_matrix.isCompressed()\n                          ? Index(matrix.data().allocatedSize()) + block_size\n                          : block_size;\n\n      Index tmp_start = tmp.outerIndexPtr()[0];\n\n      bool update_trailing_pointers = false;\n      if(nnz>free_size)\n      {\n        // realloc manually to reduce copies\n        typename SparseMatrixType::Storage newdata(m_matrix.data().allocatedSize() - block_size + nnz);\n\n        internal::smart_copy(m_matrix.valuePtr(),       m_matrix.valuePtr() + start,      newdata.valuePtr());\n        internal::smart_copy(m_matrix.innerIndexPtr(),  m_matrix.innerIndexPtr() + start, newdata.indexPtr());\n\n        internal::smart_copy(tmp.valuePtr() + tmp_start,      tmp.valuePtr() + tmp_start + nnz,       newdata.valuePtr() + start);\n        internal::smart_copy(tmp.innerIndexPtr() + tmp_start, tmp.innerIndexPtr() + tmp_start + nnz,  newdata.indexPtr() + start);\n\n        internal::smart_copy(matrix.valuePtr()+end,       matrix.valuePtr()+end + tail_size,      newdata.valuePtr()+start+nnz);\n        internal::smart_copy(matrix.innerIndexPtr()+end,  matrix.innerIndexPtr()+end + tail_size, newdata.indexPtr()+start+nnz);\n\n        newdata.resize(m_matrix.outerIndexPtr()[m_matrix.outerSize()] - block_size + nnz);\n\n        matrix.data().swap(newdata);\n\n        update_trailing_pointers = true;\n      }\n      else\n      {\n        if(m_matrix.isCompressed() && nnz!=block_size)\n        {\n          // no need to realloc, simply copy the tail at its respective position and insert tmp\n          matrix.data().resize(start + nnz + tail_size);\n\n          internal::smart_memmove(matrix.valuePtr()+end,      matrix.valuePtr() + end+tail_size,      matrix.valuePtr() + start+nnz);\n          internal::smart_memmove(matrix.innerIndexPtr()+end, matrix.innerIndexPtr() + end+tail_size, matrix.innerIndexPtr() + start+nnz);\n\n          update_trailing_pointers = true;\n        }\n\n        internal::smart_copy(tmp.valuePtr() + tmp_start,      tmp.valuePtr() + tmp_start + nnz,       matrix.valuePtr() + start);\n        internal::smart_copy(tmp.innerIndexPtr() + tmp_start, tmp.innerIndexPtr() + tmp_start + nnz,  matrix.innerIndexPtr() + start);\n      }\n\n      // update outer index pointers and innerNonZeros\n      if(IsVectorAtCompileTime)\n      {\n        if(!m_matrix.isCompressed())\n          matrix.innerNonZeroPtr()[m_outerStart] = StorageIndex(nnz);\n        matrix.outerIndexPtr()[m_outerStart] = StorageIndex(start);\n      }\n      else\n      {\n        StorageIndex p = StorageIndex(start);\n        for(Index k=0; k<m_outerSize.value(); ++k)\n        {\n          StorageIndex nnz_k = internal::convert_index<StorageIndex>(tmp.innerVector(k).nonZeros());\n          if(!m_matrix.isCompressed())\n            matrix.innerNonZeroPtr()[m_outerStart+k] = nnz_k;\n          matrix.outerIndexPtr()[m_outerStart+k] = p;\n          p += nnz_k;\n        }\n      }\n\n      if(update_trailing_pointers)\n      {\n        StorageIndex offset = internal::convert_index<StorageIndex>(nnz - block_size);\n        for(Index k = m_outerStart + m_outerSize.value(); k<=matrix.outerSize(); ++k)\n        {\n          matrix.outerIndexPtr()[k] += offset;\n        }\n      }\n\n      return derived();\n    }\n\n    inline BlockType& operator=(const BlockType& other)\n    {\n      return operator=<BlockType>(other);\n    }\n\n    inline const Scalar* valuePtr() const\n    { return m_matrix.valuePtr(); }\n    inline Scalar* valuePtr()\n    { return m_matrix.valuePtr(); }\n\n    inline const StorageIndex* innerIndexPtr() const\n    { return m_matrix.innerIndexPtr(); }\n    inline StorageIndex* innerIndexPtr()\n    { return m_matrix.innerIndexPtr(); }\n\n    inline const StorageIndex* outerIndexPtr() const\n    { return m_matrix.outerIndexPtr() + m_outerStart; }\n    inline StorageIndex* outerIndexPtr()\n    { return m_matrix.outerIndexPtr() + m_outerStart; }\n\n    inline const StorageIndex* innerNonZeroPtr() const\n    { return isCompressed() ? 0 : (m_matrix.innerNonZeroPtr()+m_outerStart); }\n    inline StorageIndex* innerNonZeroPtr()\n    { return isCompressed() ? 0 : (m_matrix.innerNonZeroPtr()+m_outerStart); }\n\n    bool isCompressed() const { return m_matrix.innerNonZeroPtr()==0; }\n\n    inline Scalar& coeffRef(Index row, Index col)\n    {\n      return m_matrix.coeffRef(row + (IsRowMajor ? m_outerStart : 0), col + (IsRowMajor ? 0 :  m_outerStart));\n    }\n\n    inline const Scalar coeff(Index row, Index col) const\n    {\n      return m_matrix.coeff(row + (IsRowMajor ? m_outerStart : 0), col + (IsRowMajor ? 0 :  m_outerStart));\n    }\n\n    inline const Scalar coeff(Index index) const\n    {\n      return m_matrix.coeff(IsRowMajor ? m_outerStart : index, IsRowMajor ? index :  m_outerStart);\n    }\n\n    const Scalar& lastCoeff() const\n    {\n      EIGEN_STATIC_ASSERT_VECTOR_ONLY(sparse_matrix_block_impl);\n      eigen_assert(Base::nonZeros()>0);\n      if(m_matrix.isCompressed())\n        return m_matrix.valuePtr()[m_matrix.outerIndexPtr()[m_outerStart+1]-1];\n      else\n        return m_matrix.valuePtr()[m_matrix.outerIndexPtr()[m_outerStart]+m_matrix.innerNonZeroPtr()[m_outerStart]-1];\n    }\n\n    EIGEN_STRONG_INLINE Index rows() const { return IsRowMajor ? m_outerSize.value() : m_matrix.rows(); }\n    EIGEN_STRONG_INLINE Index cols() const { return IsRowMajor ? m_matrix.cols() : m_outerSize.value(); }\n\n    inline const SparseMatrixType& nestedExpression() const { return m_matrix; }\n    inline SparseMatrixType& nestedExpression() { return m_matrix; }\n    Index startRow() const { return IsRowMajor ? m_outerStart : 0; }\n    Index startCol() const { return IsRowMajor ? 0 : m_outerStart; }\n    Index blockRows() const { return IsRowMajor ? m_outerSize.value() : m_matrix.rows(); }\n    Index blockCols() const { return IsRowMajor ? m_matrix.cols() : m_outerSize.value(); }\n\n  protected:\n\n    typename internal::ref_selector<SparseMatrixType>::non_const_type m_matrix;\n    Index m_outerStart;\n    const internal::variable_if_dynamic<Index, OuterSize> m_outerSize;\n\n};\n\n} // namespace internal\n\ntemplate<typename _Scalar, int _Options, typename _StorageIndex, int BlockRows, int BlockCols>\nclass BlockImpl<SparseMatrix<_Scalar, _Options, _StorageIndex>,BlockRows,BlockCols,true,Sparse>\n  : public internal::sparse_matrix_block_impl<SparseMatrix<_Scalar, _Options, _StorageIndex>,BlockRows,BlockCols>\n{\npublic:\n  typedef _StorageIndex StorageIndex;\n  typedef SparseMatrix<_Scalar, _Options, _StorageIndex> SparseMatrixType;\n  typedef internal::sparse_matrix_block_impl<SparseMatrixType,BlockRows,BlockCols> Base;\n  inline BlockImpl(SparseMatrixType& xpr, Index i)\n    : Base(xpr, i)\n  {}\n\n  inline BlockImpl(SparseMatrixType& xpr, Index startRow, Index startCol, Index blockRows, Index blockCols)\n    : Base(xpr, startRow, startCol, blockRows, blockCols)\n  {}\n\n  using Base::operator=;\n};\n\ntemplate<typename _Scalar, int _Options, typename _StorageIndex, int BlockRows, int BlockCols>\nclass BlockImpl<const SparseMatrix<_Scalar, _Options, _StorageIndex>,BlockRows,BlockCols,true,Sparse>\n  : public internal::sparse_matrix_block_impl<const SparseMatrix<_Scalar, _Options, _StorageIndex>,BlockRows,BlockCols>\n{\npublic:\n  typedef _StorageIndex StorageIndex;\n  typedef const SparseMatrix<_Scalar, _Options, _StorageIndex> SparseMatrixType;\n  typedef internal::sparse_matrix_block_impl<SparseMatrixType,BlockRows,BlockCols> Base;\n  inline BlockImpl(SparseMatrixType& xpr, Index i)\n    : Base(xpr, i)\n  {}\n\n  inline BlockImpl(SparseMatrixType& xpr, Index startRow, Index startCol, Index blockRows, Index blockCols)\n    : Base(xpr, startRow, startCol, blockRows, blockCols)\n  {}\n\n  using Base::operator=;\nprivate:\n  template<typename Derived> BlockImpl(const SparseMatrixBase<Derived>& xpr, Index i);\n  template<typename Derived> BlockImpl(const SparseMatrixBase<Derived>& xpr);\n};\n\n//----------\n\n/** Generic implementation of sparse Block expression.\n  * Real-only.\n  */\ntemplate<typename XprType, int BlockRows, int BlockCols, bool InnerPanel>\nclass BlockImpl<XprType,BlockRows,BlockCols,InnerPanel,Sparse>\n  : public SparseMatrixBase<Block<XprType,BlockRows,BlockCols,InnerPanel> >, internal::no_assignment_operator\n{\n    typedef Block<XprType, BlockRows, BlockCols, InnerPanel> BlockType;\n    typedef SparseMatrixBase<BlockType> Base;\n    using Base::convert_index;\npublic:\n    enum { IsRowMajor = internal::traits<BlockType>::IsRowMajor };\n    EIGEN_SPARSE_PUBLIC_INTERFACE(BlockType)\n\n    typedef typename internal::remove_all<typename XprType::Nested>::type _MatrixTypeNested;\n\n    /** Column or Row constructor\n      */\n    inline BlockImpl(XprType& xpr, Index i)\n      : m_matrix(xpr),\n        m_startRow( (BlockRows==1) && (BlockCols==XprType::ColsAtCompileTime) ? convert_index(i) : 0),\n        m_startCol( (BlockRows==XprType::RowsAtCompileTime) && (BlockCols==1) ? convert_index(i) : 0),\n        m_blockRows(BlockRows==1 ? 1 : xpr.rows()),\n        m_blockCols(BlockCols==1 ? 1 : xpr.cols())\n    {}\n\n    /** Dynamic-size constructor\n      */\n    inline BlockImpl(XprType& xpr, Index startRow, Index startCol, Index blockRows, Index blockCols)\n      : m_matrix(xpr), m_startRow(convert_index(startRow)), m_startCol(convert_index(startCol)), m_blockRows(convert_index(blockRows)), m_blockCols(convert_index(blockCols))\n    {}\n\n    inline Index rows() const { return m_blockRows.value(); }\n    inline Index cols() const { return m_blockCols.value(); }\n\n    inline Scalar& coeffRef(Index row, Index col)\n    {\n      return m_matrix.coeffRef(row + m_startRow.value(), col + m_startCol.value());\n    }\n\n    inline const Scalar coeff(Index row, Index col) const\n    {\n      return m_matrix.coeff(row + m_startRow.value(), col + m_startCol.value());\n    }\n\n    inline Scalar& coeffRef(Index index)\n    {\n      return m_matrix.coeffRef(m_startRow.value() + (RowsAtCompileTime == 1 ? 0 : index),\n                               m_startCol.value() + (RowsAtCompileTime == 1 ? index : 0));\n    }\n\n    inline const Scalar coeff(Index index) const\n    {\n      return m_matrix.coeff(m_startRow.value() + (RowsAtCompileTime == 1 ? 0 : index),\n                            m_startCol.value() + (RowsAtCompileTime == 1 ? index : 0));\n    }\n\n    inline const XprType& nestedExpression() const { return m_matrix; }\n    inline XprType& nestedExpression() { return m_matrix; }\n    Index startRow() const { return m_startRow.value(); }\n    Index startCol() const { return m_startCol.value(); }\n    Index blockRows() const { return m_blockRows.value(); }\n    Index blockCols() const { return m_blockCols.value(); }\n\n  protected:\n//     friend class internal::GenericSparseBlockInnerIteratorImpl<XprType,BlockRows,BlockCols,InnerPanel>;\n    friend struct internal::unary_evaluator<Block<XprType,BlockRows,BlockCols,InnerPanel>, internal::IteratorBased, Scalar >;\n\n    Index nonZeros() const { return Dynamic; }\n\n    typename internal::ref_selector<XprType>::non_const_type m_matrix;\n    const internal::variable_if_dynamic<Index, XprType::RowsAtCompileTime == 1 ? 0 : Dynamic> m_startRow;\n    const internal::variable_if_dynamic<Index, XprType::ColsAtCompileTime == 1 ? 0 : Dynamic> m_startCol;\n    const internal::variable_if_dynamic<Index, RowsAtCompileTime> m_blockRows;\n    const internal::variable_if_dynamic<Index, ColsAtCompileTime> m_blockCols;\n\n  protected:\n    // Disable assignment with clear error message.\n    // Note that simply removing operator= yields compilation errors with ICC+MSVC\n    template<typename T>\n    BlockImpl& operator=(const T&)\n    {\n      EIGEN_STATIC_ASSERT(sizeof(T)==0, THIS_SPARSE_BLOCK_SUBEXPRESSION_IS_READ_ONLY);\n      return *this;\n    }\n\n};\n\nnamespace internal {\n\ntemplate<typename ArgType, int BlockRows, int BlockCols, bool InnerPanel>\nstruct unary_evaluator<Block<ArgType,BlockRows,BlockCols,InnerPanel>, IteratorBased >\n : public evaluator_base<Block<ArgType,BlockRows,BlockCols,InnerPanel> >\n{\n    class InnerVectorInnerIterator;\n    class OuterVectorInnerIterator;\n  public:\n    typedef Block<ArgType,BlockRows,BlockCols,InnerPanel> XprType;\n    typedef typename XprType::StorageIndex StorageIndex;\n    typedef typename XprType::Scalar Scalar;\n\n    enum {\n      IsRowMajor = XprType::IsRowMajor,\n\n      OuterVector =  (BlockCols==1 && ArgType::IsRowMajor)\n                    | // FIXME | instead of || to please GCC 4.4.0 stupid warning \"suggest parentheses around &&\".\n                      // revert to || as soon as not needed anymore.\n                     (BlockRows==1 && !ArgType::IsRowMajor),\n\n      CoeffReadCost = evaluator<ArgType>::CoeffReadCost,\n      Flags = XprType::Flags\n    };\n\n    typedef typename internal::conditional<OuterVector,OuterVectorInnerIterator,InnerVectorInnerIterator>::type InnerIterator;\n\n    explicit unary_evaluator(const XprType& op)\n      : m_argImpl(op.nestedExpression()), m_block(op)\n    {}\n\n    inline Index nonZerosEstimate() const {\n      Index nnz = m_block.nonZeros();\n      if(nnz<0)\n        return m_argImpl.nonZerosEstimate() * m_block.size() / m_block.nestedExpression().size();\n      return nnz;\n    }\n\n  protected:\n    typedef typename evaluator<ArgType>::InnerIterator EvalIterator;\n\n    evaluator<ArgType> m_argImpl;\n    const XprType &m_block;\n};\n\ntemplate<typename ArgType, int BlockRows, int BlockCols, bool InnerPanel>\nclass unary_evaluator<Block<ArgType,BlockRows,BlockCols,InnerPanel>, IteratorBased>::InnerVectorInnerIterator\n : public EvalIterator\n{\n  // NOTE MSVC fails to compile if we don't explicitely \"import\" IsRowMajor from unary_evaluator\n  //      because the base class EvalIterator has a private IsRowMajor enum too. (bug #1786)\n  // NOTE We cannot call it IsRowMajor because it would shadow unary_evaluator::IsRowMajor\n  enum { XprIsRowMajor = unary_evaluator::IsRowMajor };\n  const XprType& m_block;\n  Index m_end;\npublic:\n\n  EIGEN_STRONG_INLINE InnerVectorInnerIterator(const unary_evaluator& aEval, Index outer)\n    : EvalIterator(aEval.m_argImpl, outer + (XprIsRowMajor ? aEval.m_block.startRow() : aEval.m_block.startCol())),\n      m_block(aEval.m_block),\n      m_end(XprIsRowMajor ? aEval.m_block.startCol()+aEval.m_block.blockCols() : aEval.m_block.startRow()+aEval.m_block.blockRows())\n  {\n    while( (EvalIterator::operator bool()) && (EvalIterator::index() < (XprIsRowMajor ? m_block.startCol() : m_block.startRow())) )\n      EvalIterator::operator++();\n  }\n\n  inline StorageIndex index() const { return EvalIterator::index() - convert_index<StorageIndex>(XprIsRowMajor ? m_block.startCol() : m_block.startRow()); }\n  inline Index outer()  const { return EvalIterator::outer() - (XprIsRowMajor ? m_block.startRow() : m_block.startCol()); }\n  inline Index row()    const { return EvalIterator::row()   - m_block.startRow(); }\n  inline Index col()    const { return EvalIterator::col()   - m_block.startCol(); }\n\n  inline operator bool() const { return EvalIterator::operator bool() && EvalIterator::index() < m_end; }\n};\n\ntemplate<typename ArgType, int BlockRows, int BlockCols, bool InnerPanel>\nclass unary_evaluator<Block<ArgType,BlockRows,BlockCols,InnerPanel>, IteratorBased>::OuterVectorInnerIterator\n{\n  // NOTE see above\n  enum { XprIsRowMajor = unary_evaluator::IsRowMajor };\n  const unary_evaluator& m_eval;\n  Index m_outerPos;\n  const Index m_innerIndex;\n  Index m_end;\n  EvalIterator m_it;\npublic:\n\n  EIGEN_STRONG_INLINE OuterVectorInnerIterator(const unary_evaluator& aEval, Index outer)\n    : m_eval(aEval),\n      m_outerPos( (XprIsRowMajor ? aEval.m_block.startCol() : aEval.m_block.startRow()) ),\n      m_innerIndex(XprIsRowMajor ? aEval.m_block.startRow() : aEval.m_block.startCol()),\n      m_end(XprIsRowMajor ? aEval.m_block.startCol()+aEval.m_block.blockCols() : aEval.m_block.startRow()+aEval.m_block.blockRows()),\n      m_it(m_eval.m_argImpl, m_outerPos)\n  {\n    EIGEN_UNUSED_VARIABLE(outer);\n    eigen_assert(outer==0);\n\n    while(m_it && m_it.index() < m_innerIndex) ++m_it;\n    if((!m_it) || (m_it.index()!=m_innerIndex))\n      ++(*this);\n  }\n\n  inline StorageIndex index() const { return convert_index<StorageIndex>(m_outerPos - (XprIsRowMajor ? m_eval.m_block.startCol() : m_eval.m_block.startRow())); }\n  inline Index outer()  const { return 0; }\n  inline Index row()    const { return XprIsRowMajor ? 0 : index(); }\n  inline Index col()    const { return XprIsRowMajor ? index() : 0; }\n\n  inline Scalar value() const { return m_it.value(); }\n  inline Scalar& valueRef() { return m_it.valueRef(); }\n\n  inline OuterVectorInnerIterator& operator++()\n  {\n    // search next non-zero entry\n    while(++m_outerPos<m_end)\n    {\n      // Restart iterator at the next inner-vector:\n      m_it.~EvalIterator();\n      ::new (&m_it) EvalIterator(m_eval.m_argImpl, m_outerPos);\n      // search for the key m_innerIndex in the current outer-vector\n      while(m_it && m_it.index() < m_innerIndex) ++m_it;\n      if(m_it && m_it.index()==m_innerIndex) break;\n    }\n    return *this;\n  }\n\n  inline operator bool() const { return m_outerPos < m_end; }\n};\n\ntemplate<typename _Scalar, int _Options, typename _StorageIndex, int BlockRows, int BlockCols>\nstruct unary_evaluator<Block<SparseMatrix<_Scalar, _Options, _StorageIndex>,BlockRows,BlockCols,true>, IteratorBased>\n  : evaluator<SparseCompressedBase<Block<SparseMatrix<_Scalar, _Options, _StorageIndex>,BlockRows,BlockCols,true> > >\n{\n  typedef Block<SparseMatrix<_Scalar, _Options, _StorageIndex>,BlockRows,BlockCols,true> XprType;\n  typedef evaluator<SparseCompressedBase<XprType> > Base;\n  explicit unary_evaluator(const XprType &xpr) : Base(xpr) {}\n};\n\ntemplate<typename _Scalar, int _Options, typename _StorageIndex, int BlockRows, int BlockCols>\nstruct unary_evaluator<Block<const SparseMatrix<_Scalar, _Options, _StorageIndex>,BlockRows,BlockCols,true>, IteratorBased>\n  : evaluator<SparseCompressedBase<Block<const SparseMatrix<_Scalar, _Options, _StorageIndex>,BlockRows,BlockCols,true> > >\n{\n  typedef Block<const SparseMatrix<_Scalar, _Options, _StorageIndex>,BlockRows,BlockCols,true> XprType;\n  typedef evaluator<SparseCompressedBase<XprType> > Base;\n  explicit unary_evaluator(const XprType &xpr) : Base(xpr) {}\n};\n\n} // end namespace internal\n\n\n} // end namespace Eigen\n\n#endif // EIGEN_SPARSE_BLOCK_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseCore/SparseColEtree.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n\n/* \n \n * NOTE: This file is the modified version of sp_coletree.c file in SuperLU \n \n * -- SuperLU routine (version 3.1) --\n * Univ. of California Berkeley, Xerox Palo Alto Research Center,\n * and Lawrence Berkeley National Lab.\n * August 1, 2008\n *\n * Copyright (c) 1994 by Xerox Corporation.  All rights reserved.\n *\n * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY\n * EXPRESSED OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.\n *\n * Permission is hereby granted to use or copy this program for any\n * purpose, provided the above notices are retained on all copies.\n * Permission to modify the code and to distribute modified code is\n * granted, provided the above notices are retained, and a notice that\n * the code was modified is included with the above copyright notice.\n */\n#ifndef SPARSE_COLETREE_H\n#define SPARSE_COLETREE_H\n\nnamespace Eigen {\n\nnamespace internal {\n\n/** Find the root of the tree/set containing the vertex i : Use Path halving */ \ntemplate<typename Index, typename IndexVector>\nIndex etree_find (Index i, IndexVector& pp)\n{\n  Index p = pp(i); // Parent \n  Index gp = pp(p); // Grand parent \n  while (gp != p) \n  {\n    pp(i) = gp; // Parent pointer on find path is changed to former grand parent\n    i = gp; \n    p = pp(i);\n    gp = pp(p);\n  }\n  return p; \n}\n\n/** Compute the column elimination tree of a sparse matrix\n  * \\param mat The matrix in column-major format. \n  * \\param parent The elimination tree\n  * \\param firstRowElt The column index of the first element in each row\n  * \\param perm The permutation to apply to the column of \\b mat\n  */\ntemplate <typename MatrixType, typename IndexVector>\nint coletree(const MatrixType& mat, IndexVector& parent, IndexVector& firstRowElt, typename MatrixType::StorageIndex *perm=0)\n{\n  typedef typename MatrixType::StorageIndex StorageIndex;\n  StorageIndex nc = convert_index<StorageIndex>(mat.cols()); // Number of columns\n  StorageIndex m = convert_index<StorageIndex>(mat.rows());\n  StorageIndex diagSize = (std::min)(nc,m);\n  IndexVector root(nc); // root of subtree of etree \n  root.setZero();\n  IndexVector pp(nc); // disjoint sets \n  pp.setZero(); // Initialize disjoint sets \n  parent.resize(mat.cols());\n  //Compute first nonzero column in each row \n  firstRowElt.resize(m);\n  firstRowElt.setConstant(nc);\n  firstRowElt.segment(0, diagSize).setLinSpaced(diagSize, 0, diagSize-1);\n  bool found_diag;\n  for (StorageIndex col = 0; col < nc; col++)\n  {\n    StorageIndex pcol = col;\n    if(perm) pcol  = perm[col];\n    for (typename MatrixType::InnerIterator it(mat, pcol); it; ++it)\n    { \n      Index row = it.row();\n      firstRowElt(row) = (std::min)(firstRowElt(row), col);\n    }\n  }\n  /* Compute etree by Liu's algorithm for symmetric matrices,\n          except use (firstRowElt[r],c) in place of an edge (r,c) of A.\n    Thus each row clique in A'*A is replaced by a star\n    centered at its first vertex, which has the same fill. */\n  StorageIndex rset, cset, rroot;\n  for (StorageIndex col = 0; col < nc; col++) \n  {\n    found_diag = col>=m;\n    pp(col) = col; \n    cset = col; \n    root(cset) = col; \n    parent(col) = nc; \n    /* The diagonal element is treated here even if it does not exist in the matrix\n     * hence the loop is executed once more */ \n    StorageIndex pcol = col;\n    if(perm) pcol  = perm[col];\n    for (typename MatrixType::InnerIterator it(mat, pcol); it||!found_diag; ++it)\n    { //  A sequence of interleaved find and union is performed \n      Index i = col;\n      if(it) i = it.index();\n      if (i == col) found_diag = true;\n      \n      StorageIndex row = firstRowElt(i);\n      if (row >= col) continue; \n      rset = internal::etree_find(row, pp); // Find the name of the set containing row\n      rroot = root(rset);\n      if (rroot != col) \n      {\n        parent(rroot) = col; \n        pp(cset) = rset; \n        cset = rset; \n        root(cset) = col; \n      }\n    }\n  }\n  return 0;  \n}\n\n/** \n  * Depth-first search from vertex n.  No recursion.\n  * This routine was contributed by Cédric Doucet, CEDRAT Group, Meylan, France.\n*/\ntemplate <typename IndexVector>\nvoid nr_etdfs (typename IndexVector::Scalar n, IndexVector& parent, IndexVector& first_kid, IndexVector& next_kid, IndexVector& post, typename IndexVector::Scalar postnum)\n{\n  typedef typename IndexVector::Scalar StorageIndex;\n  StorageIndex current = n, first, next;\n  while (postnum != n) \n  {\n    // No kid for the current node\n    first = first_kid(current);\n    \n    // no kid for the current node\n    if (first == -1) \n    {\n      // Numbering this node because it has no kid \n      post(current) = postnum++;\n      \n      // looking for the next kid \n      next = next_kid(current); \n      while (next == -1) \n      {\n        // No more kids : back to the parent node\n        current = parent(current); \n        // numbering the parent node \n        post(current) = postnum++;\n        \n        // Get the next kid \n        next = next_kid(current); \n      }\n      // stopping criterion \n      if (postnum == n+1) return; \n      \n      // Updating current node \n      current = next; \n    }\n    else \n    {\n      current = first; \n    }\n  }\n}\n\n\n/**\n  * \\brief Post order a tree \n  * \\param n the number of nodes\n  * \\param parent Input tree\n  * \\param post postordered tree\n  */\ntemplate <typename IndexVector>\nvoid treePostorder(typename IndexVector::Scalar n, IndexVector& parent, IndexVector& post)\n{\n  typedef typename IndexVector::Scalar StorageIndex;\n  IndexVector first_kid, next_kid; // Linked list of children \n  StorageIndex postnum; \n  // Allocate storage for working arrays and results \n  first_kid.resize(n+1); \n  next_kid.setZero(n+1);\n  post.setZero(n+1);\n  \n  // Set up structure describing children\n  first_kid.setConstant(-1); \n  for (StorageIndex v = n-1; v >= 0; v--) \n  {\n    StorageIndex dad = parent(v);\n    next_kid(v) = first_kid(dad); \n    first_kid(dad) = v; \n  }\n  \n  // Depth-first search from dummy root vertex #n\n  postnum = 0; \n  internal::nr_etdfs(n, parent, first_kid, next_kid, post, postnum);\n}\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // SPARSE_COLETREE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseCore/SparseCompressedBase.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPARSE_COMPRESSED_BASE_H\n#define EIGEN_SPARSE_COMPRESSED_BASE_H\n\nnamespace Eigen { \n\ntemplate<typename Derived> class SparseCompressedBase;\n  \nnamespace internal {\n\ntemplate<typename Derived>\nstruct traits<SparseCompressedBase<Derived> > : traits<Derived>\n{};\n\n} // end namespace internal\n\n/** \\ingroup SparseCore_Module\n  * \\class SparseCompressedBase\n  * \\brief Common base class for sparse [compressed]-{row|column}-storage format.\n  *\n  * This class defines the common interface for all derived classes implementing the compressed sparse storage format, such as:\n  *  - SparseMatrix\n  *  - Ref<SparseMatrixType,Options>\n  *  - Map<SparseMatrixType>\n  *\n  */\ntemplate<typename Derived>\nclass SparseCompressedBase\n  : public SparseMatrixBase<Derived>\n{\n  public:\n    typedef SparseMatrixBase<Derived> Base;\n    EIGEN_SPARSE_PUBLIC_INTERFACE(SparseCompressedBase)\n    using Base::operator=;\n    using Base::IsRowMajor;\n    \n    class InnerIterator;\n    class ReverseInnerIterator;\n    \n  protected:\n    typedef typename Base::IndexVector IndexVector;\n    Eigen::Map<IndexVector> innerNonZeros() { return Eigen::Map<IndexVector>(innerNonZeroPtr(), isCompressed()?0:derived().outerSize()); }\n    const  Eigen::Map<const IndexVector> innerNonZeros() const { return Eigen::Map<const IndexVector>(innerNonZeroPtr(), isCompressed()?0:derived().outerSize()); }\n        \n  public:\n    \n    /** \\returns the number of non zero coefficients */\n    inline Index nonZeros() const\n    {\n      if(Derived::IsVectorAtCompileTime && outerIndexPtr()==0)\n        return derived().nonZeros();\n      else if(isCompressed())\n        return outerIndexPtr()[derived().outerSize()]-outerIndexPtr()[0];\n      else if(derived().outerSize()==0)\n        return 0;\n      else\n        return innerNonZeros().sum();\n    }\n    \n    /** \\returns a const pointer to the array of values.\n      * This function is aimed at interoperability with other libraries.\n      * \\sa innerIndexPtr(), outerIndexPtr() */\n    inline const Scalar* valuePtr() const { return derived().valuePtr(); }\n    /** \\returns a non-const pointer to the array of values.\n      * This function is aimed at interoperability with other libraries.\n      * \\sa innerIndexPtr(), outerIndexPtr() */\n    inline Scalar* valuePtr() { return derived().valuePtr(); }\n\n    /** \\returns a const pointer to the array of inner indices.\n      * This function is aimed at interoperability with other libraries.\n      * \\sa valuePtr(), outerIndexPtr() */\n    inline const StorageIndex* innerIndexPtr() const { return derived().innerIndexPtr(); }\n    /** \\returns a non-const pointer to the array of inner indices.\n      * This function is aimed at interoperability with other libraries.\n      * \\sa valuePtr(), outerIndexPtr() */\n    inline StorageIndex* innerIndexPtr() { return derived().innerIndexPtr(); }\n\n    /** \\returns a const pointer to the array of the starting positions of the inner vectors.\n      * This function is aimed at interoperability with other libraries.\n      * \\warning it returns the null pointer 0 for SparseVector\n      * \\sa valuePtr(), innerIndexPtr() */\n    inline const StorageIndex* outerIndexPtr() const { return derived().outerIndexPtr(); }\n    /** \\returns a non-const pointer to the array of the starting positions of the inner vectors.\n      * This function is aimed at interoperability with other libraries.\n      * \\warning it returns the null pointer 0 for SparseVector\n      * \\sa valuePtr(), innerIndexPtr() */\n    inline StorageIndex* outerIndexPtr() { return derived().outerIndexPtr(); }\n\n    /** \\returns a const pointer to the array of the number of non zeros of the inner vectors.\n      * This function is aimed at interoperability with other libraries.\n      * \\warning it returns the null pointer 0 in compressed mode */\n    inline const StorageIndex* innerNonZeroPtr() const { return derived().innerNonZeroPtr(); }\n    /** \\returns a non-const pointer to the array of the number of non zeros of the inner vectors.\n      * This function is aimed at interoperability with other libraries.\n      * \\warning it returns the null pointer 0 in compressed mode */\n    inline StorageIndex* innerNonZeroPtr() { return derived().innerNonZeroPtr(); }\n    \n    /** \\returns whether \\c *this is in compressed form. */\n    inline bool isCompressed() const { return innerNonZeroPtr()==0; }\n\n    /** \\returns a read-only view of the stored coefficients as a 1D array expression.\n      *\n      * \\warning this method is for \\b compressed \\b storage \\b only, and it will trigger an assertion otherwise.\n      *\n      * \\sa valuePtr(), isCompressed() */\n    const Map<const Array<Scalar,Dynamic,1> > coeffs() const { eigen_assert(isCompressed()); return Array<Scalar,Dynamic,1>::Map(valuePtr(),nonZeros()); }\n\n    /** \\returns a read-write view of the stored coefficients as a 1D array expression\n      *\n      * \\warning this method is for \\b compressed \\b storage \\b only, and it will trigger an assertion otherwise.\n      *\n      * Here is an example:\n      * \\include SparseMatrix_coeffs.cpp\n      * and the output is:\n      * \\include SparseMatrix_coeffs.out\n      *\n      * \\sa valuePtr(), isCompressed() */\n    Map<Array<Scalar,Dynamic,1> > coeffs() { eigen_assert(isCompressed()); return Array<Scalar,Dynamic,1>::Map(valuePtr(),nonZeros()); }\n\n  protected:\n    /** Default constructor. Do nothing. */\n    SparseCompressedBase() {}\n\n    /** \\internal return the index of the coeff at (row,col) or just before if it does not exist.\n      * This is an analogue of std::lower_bound.\n      */\n    internal::LowerBoundIndex lower_bound(Index row, Index col) const\n    {\n      eigen_internal_assert(row>=0 && row<this->rows() && col>=0 && col<this->cols());\n\n      const Index outer = Derived::IsRowMajor ? row : col;\n      const Index inner = Derived::IsRowMajor ? col : row;\n\n      Index start = this->outerIndexPtr()[outer];\n      Index end = this->isCompressed() ? this->outerIndexPtr()[outer+1] : this->outerIndexPtr()[outer] + this->innerNonZeroPtr()[outer];\n      eigen_assert(end>=start && \"you are using a non finalized sparse matrix or written coefficient does not exist\");\n      internal::LowerBoundIndex p;\n      p.value = std::lower_bound(this->innerIndexPtr()+start, this->innerIndexPtr()+end,inner) - this->innerIndexPtr();\n      p.found = (p.value<end) && (this->innerIndexPtr()[p.value]==inner);\n      return p;\n    }\n\n    friend struct internal::evaluator<SparseCompressedBase<Derived> >;\n\n  private:\n    template<typename OtherDerived> explicit SparseCompressedBase(const SparseCompressedBase<OtherDerived>&);\n};\n\ntemplate<typename Derived>\nclass SparseCompressedBase<Derived>::InnerIterator\n{\n  public:\n    InnerIterator()\n      : m_values(0), m_indices(0), m_outer(0), m_id(0), m_end(0)\n    {}\n\n    InnerIterator(const InnerIterator& other)\n      : m_values(other.m_values), m_indices(other.m_indices), m_outer(other.m_outer), m_id(other.m_id), m_end(other.m_end)\n    {}\n\n    InnerIterator& operator=(const InnerIterator& other)\n    {\n      m_values = other.m_values;\n      m_indices = other.m_indices;\n      const_cast<OuterType&>(m_outer).setValue(other.m_outer.value());\n      m_id = other.m_id;\n      m_end = other.m_end;\n      return *this;\n    }\n\n    InnerIterator(const SparseCompressedBase& mat, Index outer)\n      : m_values(mat.valuePtr()), m_indices(mat.innerIndexPtr()), m_outer(outer)\n    {\n      if(Derived::IsVectorAtCompileTime && mat.outerIndexPtr()==0)\n      {\n        m_id = 0;\n        m_end = mat.nonZeros();\n      }\n      else\n      {\n        m_id = mat.outerIndexPtr()[outer];\n        if(mat.isCompressed())\n          m_end = mat.outerIndexPtr()[outer+1];\n        else\n          m_end = m_id + mat.innerNonZeroPtr()[outer];\n      }\n    }\n\n    explicit InnerIterator(const SparseCompressedBase& mat)\n      : m_values(mat.valuePtr()), m_indices(mat.innerIndexPtr()), m_outer(0), m_id(0), m_end(mat.nonZeros())\n    {\n      EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived);\n    }\n\n    explicit InnerIterator(const internal::CompressedStorage<Scalar,StorageIndex>& data)\n      : m_values(data.valuePtr()), m_indices(data.indexPtr()), m_outer(0), m_id(0), m_end(data.size())\n    {\n      EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived);\n    }\n\n    inline InnerIterator& operator++() { m_id++; return *this; }\n    inline InnerIterator& operator+=(Index i) { m_id += i ; return *this; }\n\n    inline InnerIterator operator+(Index i) \n    { \n        InnerIterator result = *this;\n        result += i;\n        return result;\n    }\n\n    inline const Scalar& value() const { return m_values[m_id]; }\n    inline Scalar& valueRef() { return const_cast<Scalar&>(m_values[m_id]); }\n\n    inline StorageIndex index() const { return m_indices[m_id]; }\n    inline Index outer() const { return m_outer.value(); }\n    inline Index row() const { return IsRowMajor ? m_outer.value() : index(); }\n    inline Index col() const { return IsRowMajor ? index() : m_outer.value(); }\n\n    inline operator bool() const { return (m_id < m_end); }\n\n  protected:\n    const Scalar* m_values;\n    const StorageIndex* m_indices;\n    typedef internal::variable_if_dynamic<Index,Derived::IsVectorAtCompileTime?0:Dynamic> OuterType;\n    const OuterType m_outer;\n    Index m_id;\n    Index m_end;\n  private:\n    // If you get here, then you're not using the right InnerIterator type, e.g.:\n    //   SparseMatrix<double,RowMajor> A;\n    //   SparseMatrix<double>::InnerIterator it(A,0);\n    template<typename T> InnerIterator(const SparseMatrixBase<T>&, Index outer);\n};\n\ntemplate<typename Derived>\nclass SparseCompressedBase<Derived>::ReverseInnerIterator\n{\n  public:\n    ReverseInnerIterator(const SparseCompressedBase& mat, Index outer)\n      : m_values(mat.valuePtr()), m_indices(mat.innerIndexPtr()), m_outer(outer)\n    {\n      if(Derived::IsVectorAtCompileTime && mat.outerIndexPtr()==0)\n      {\n        m_start = 0;\n        m_id = mat.nonZeros();\n      }\n      else\n      {\n        m_start = mat.outerIndexPtr()[outer];\n        if(mat.isCompressed())\n          m_id = mat.outerIndexPtr()[outer+1];\n        else\n          m_id = m_start + mat.innerNonZeroPtr()[outer];\n      }\n    }\n\n    explicit ReverseInnerIterator(const SparseCompressedBase& mat)\n      : m_values(mat.valuePtr()), m_indices(mat.innerIndexPtr()), m_outer(0), m_start(0), m_id(mat.nonZeros())\n    {\n      EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived);\n    }\n\n    explicit ReverseInnerIterator(const internal::CompressedStorage<Scalar,StorageIndex>& data)\n      : m_values(data.valuePtr()), m_indices(data.indexPtr()), m_outer(0), m_start(0), m_id(data.size())\n    {\n      EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived);\n    }\n\n    inline ReverseInnerIterator& operator--() { --m_id; return *this; }\n    inline ReverseInnerIterator& operator-=(Index i) { m_id -= i; return *this; }\n\n    inline ReverseInnerIterator operator-(Index i) \n    {\n        ReverseInnerIterator result = *this;\n        result -= i;\n        return result;\n    }\n\n    inline const Scalar& value() const { return m_values[m_id-1]; }\n    inline Scalar& valueRef() { return const_cast<Scalar&>(m_values[m_id-1]); }\n\n    inline StorageIndex index() const { return m_indices[m_id-1]; }\n    inline Index outer() const { return m_outer.value(); }\n    inline Index row() const { return IsRowMajor ? m_outer.value() : index(); }\n    inline Index col() const { return IsRowMajor ? index() : m_outer.value(); }\n\n    inline operator bool() const { return (m_id > m_start); }\n\n  protected:\n    const Scalar* m_values;\n    const StorageIndex* m_indices;\n    typedef internal::variable_if_dynamic<Index,Derived::IsVectorAtCompileTime?0:Dynamic> OuterType;\n    const OuterType m_outer;\n    Index m_start;\n    Index m_id;\n};\n\nnamespace internal {\n\ntemplate<typename Derived>\nstruct evaluator<SparseCompressedBase<Derived> >\n  : evaluator_base<Derived>\n{\n  typedef typename Derived::Scalar Scalar;\n  typedef typename Derived::InnerIterator InnerIterator;\n  \n  enum {\n    CoeffReadCost = NumTraits<Scalar>::ReadCost,\n    Flags = Derived::Flags\n  };\n  \n  evaluator() : m_matrix(0), m_zero(0)\n  {\n    EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);\n  }\n  explicit evaluator(const Derived &mat) : m_matrix(&mat), m_zero(0)\n  {\n    EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);\n  }\n  \n  inline Index nonZerosEstimate() const {\n    return m_matrix->nonZeros();\n  }\n  \n  operator Derived&() { return m_matrix->const_cast_derived(); }\n  operator const Derived&() const { return *m_matrix; }\n  \n  typedef typename DenseCoeffsBase<Derived,ReadOnlyAccessors>::CoeffReturnType CoeffReturnType;\n  const Scalar& coeff(Index row, Index col) const\n  {\n    Index p = find(row,col);\n\n    if(p==Dynamic)\n      return m_zero;\n    else\n      return m_matrix->const_cast_derived().valuePtr()[p];\n  }\n\n  Scalar& coeffRef(Index row, Index col)\n  {\n    Index p = find(row,col);\n    eigen_assert(p!=Dynamic && \"written coefficient does not exist\");\n    return m_matrix->const_cast_derived().valuePtr()[p];\n  }\n\nprotected:\n\n  Index find(Index row, Index col) const\n  {\n    internal::LowerBoundIndex p = m_matrix->lower_bound(row,col);\n    return p.found ? p.value : Dynamic;\n  }\n\n  const Derived *m_matrix;\n  const Scalar m_zero;\n};\n\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_SPARSE_COMPRESSED_BASE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseCore/SparseCwiseBinaryOp.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPARSE_CWISE_BINARY_OP_H\n#define EIGEN_SPARSE_CWISE_BINARY_OP_H\n\nnamespace Eigen { \n\n// Here we have to handle 3 cases:\n//  1 - sparse op dense\n//  2 - dense op sparse\n//  3 - sparse op sparse\n// We also need to implement a 4th iterator for:\n//  4 - dense op dense\n// Finally, we also need to distinguish between the product and other operations :\n//                configuration      returned mode\n//  1 - sparse op dense    product      sparse\n//                         generic      dense\n//  2 - dense op sparse    product      sparse\n//                         generic      dense\n//  3 - sparse op sparse   product      sparse\n//                         generic      sparse\n//  4 - dense op dense     product      dense\n//                         generic      dense\n//\n// TODO to ease compiler job, we could specialize product/quotient with a scalar\n//      and fallback to cwise-unary evaluator using bind1st_op and bind2nd_op.\n\ntemplate<typename BinaryOp, typename Lhs, typename Rhs>\nclass CwiseBinaryOpImpl<BinaryOp, Lhs, Rhs, Sparse>\n  : public SparseMatrixBase<CwiseBinaryOp<BinaryOp, Lhs, Rhs> >\n{\n  public:\n    typedef CwiseBinaryOp<BinaryOp, Lhs, Rhs> Derived;\n    typedef SparseMatrixBase<Derived> Base;\n    EIGEN_SPARSE_PUBLIC_INTERFACE(Derived)\n    CwiseBinaryOpImpl()\n    {\n      EIGEN_STATIC_ASSERT((\n                (!internal::is_same<typename internal::traits<Lhs>::StorageKind,\n                                    typename internal::traits<Rhs>::StorageKind>::value)\n            ||  ((internal::evaluator<Lhs>::Flags&RowMajorBit) == (internal::evaluator<Rhs>::Flags&RowMajorBit))),\n            THE_STORAGE_ORDER_OF_BOTH_SIDES_MUST_MATCH);\n    }\n};\n\nnamespace internal {\n\n  \n// Generic \"sparse OP sparse\"\ntemplate<typename XprType> struct binary_sparse_evaluator;\n\ntemplate<typename BinaryOp, typename Lhs, typename Rhs>\nstruct binary_evaluator<CwiseBinaryOp<BinaryOp, Lhs, Rhs>, IteratorBased, IteratorBased>\n  : evaluator_base<CwiseBinaryOp<BinaryOp, Lhs, Rhs> >\n{\nprotected:\n  typedef typename evaluator<Lhs>::InnerIterator  LhsIterator;\n  typedef typename evaluator<Rhs>::InnerIterator  RhsIterator;\n  typedef CwiseBinaryOp<BinaryOp, Lhs, Rhs> XprType;\n  typedef typename traits<XprType>::Scalar Scalar;\n  typedef typename XprType::StorageIndex StorageIndex;\npublic:\n\n  class InnerIterator\n  {\n  public:\n    \n    EIGEN_STRONG_INLINE InnerIterator(const binary_evaluator& aEval, Index outer)\n      : m_lhsIter(aEval.m_lhsImpl,outer), m_rhsIter(aEval.m_rhsImpl,outer), m_functor(aEval.m_functor)\n    {\n      this->operator++();\n    }\n\n    EIGEN_STRONG_INLINE InnerIterator& operator++()\n    {\n      if (m_lhsIter && m_rhsIter && (m_lhsIter.index() == m_rhsIter.index()))\n      {\n        m_id = m_lhsIter.index();\n        m_value = m_functor(m_lhsIter.value(), m_rhsIter.value());\n        ++m_lhsIter;\n        ++m_rhsIter;\n      }\n      else if (m_lhsIter && (!m_rhsIter || (m_lhsIter.index() < m_rhsIter.index())))\n      {\n        m_id = m_lhsIter.index();\n        m_value = m_functor(m_lhsIter.value(), Scalar(0));\n        ++m_lhsIter;\n      }\n      else if (m_rhsIter && (!m_lhsIter || (m_lhsIter.index() > m_rhsIter.index())))\n      {\n        m_id = m_rhsIter.index();\n        m_value = m_functor(Scalar(0), m_rhsIter.value());\n        ++m_rhsIter;\n      }\n      else\n      {\n        m_value = Scalar(0); // this is to avoid a compilation warning\n        m_id = -1;\n      }\n      return *this;\n    }\n\n    EIGEN_STRONG_INLINE Scalar value() const { return m_value; }\n\n    EIGEN_STRONG_INLINE StorageIndex index() const { return m_id; }\n    EIGEN_STRONG_INLINE Index outer() const { return m_lhsIter.outer(); }\n    EIGEN_STRONG_INLINE Index row() const { return Lhs::IsRowMajor ? m_lhsIter.row() : index(); }\n    EIGEN_STRONG_INLINE Index col() const { return Lhs::IsRowMajor ? index() : m_lhsIter.col(); }\n\n    EIGEN_STRONG_INLINE operator bool() const { return m_id>=0; }\n\n  protected:\n    LhsIterator m_lhsIter;\n    RhsIterator m_rhsIter;\n    const BinaryOp& m_functor;\n    Scalar m_value;\n    StorageIndex m_id;\n  };\n  \n  \n  enum {\n    CoeffReadCost = evaluator<Lhs>::CoeffReadCost + evaluator<Rhs>::CoeffReadCost + functor_traits<BinaryOp>::Cost,\n    Flags = XprType::Flags\n  };\n  \n  explicit binary_evaluator(const XprType& xpr)\n    : m_functor(xpr.functor()),\n      m_lhsImpl(xpr.lhs()), \n      m_rhsImpl(xpr.rhs())  \n  {\n    EIGEN_INTERNAL_CHECK_COST_VALUE(functor_traits<BinaryOp>::Cost);\n    EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);\n  }\n  \n  inline Index nonZerosEstimate() const {\n    return m_lhsImpl.nonZerosEstimate() + m_rhsImpl.nonZerosEstimate();\n  }\n\nprotected:\n  const BinaryOp m_functor;\n  evaluator<Lhs> m_lhsImpl;\n  evaluator<Rhs> m_rhsImpl;\n};\n\n// dense op sparse\ntemplate<typename BinaryOp, typename Lhs, typename Rhs>\nstruct binary_evaluator<CwiseBinaryOp<BinaryOp, Lhs, Rhs>, IndexBased, IteratorBased>\n  : evaluator_base<CwiseBinaryOp<BinaryOp, Lhs, Rhs> >\n{\nprotected:\n  typedef typename evaluator<Rhs>::InnerIterator  RhsIterator;\n  typedef CwiseBinaryOp<BinaryOp, Lhs, Rhs> XprType;\n  typedef typename traits<XprType>::Scalar Scalar;\n  typedef typename XprType::StorageIndex StorageIndex;\npublic:\n\n  class InnerIterator\n  {\n    enum { IsRowMajor = (int(Rhs::Flags)&RowMajorBit)==RowMajorBit };\n  public:\n\n    EIGEN_STRONG_INLINE InnerIterator(const binary_evaluator& aEval, Index outer)\n      : m_lhsEval(aEval.m_lhsImpl), m_rhsIter(aEval.m_rhsImpl,outer), m_functor(aEval.m_functor), m_value(0), m_id(-1), m_innerSize(aEval.m_expr.rhs().innerSize())\n    {\n      this->operator++();\n    }\n\n    EIGEN_STRONG_INLINE InnerIterator& operator++()\n    {\n      ++m_id;\n      if(m_id<m_innerSize)\n      {\n        Scalar lhsVal = m_lhsEval.coeff(IsRowMajor?m_rhsIter.outer():m_id,\n                                        IsRowMajor?m_id:m_rhsIter.outer());\n        if(m_rhsIter && m_rhsIter.index()==m_id)\n        {\n          m_value = m_functor(lhsVal, m_rhsIter.value());\n          ++m_rhsIter;\n        }\n        else\n          m_value = m_functor(lhsVal, Scalar(0));\n      }\n\n      return *this;\n    }\n\n    EIGEN_STRONG_INLINE Scalar value() const { eigen_internal_assert(m_id<m_innerSize); return m_value; }\n\n    EIGEN_STRONG_INLINE StorageIndex index() const { return m_id; }\n    EIGEN_STRONG_INLINE Index outer() const { return m_rhsIter.outer(); }\n    EIGEN_STRONG_INLINE Index row() const { return IsRowMajor ? m_rhsIter.outer() : m_id; }\n    EIGEN_STRONG_INLINE Index col() const { return IsRowMajor ? m_id : m_rhsIter.outer(); }\n\n    EIGEN_STRONG_INLINE operator bool() const { return m_id<m_innerSize; }\n\n  protected:\n    const evaluator<Lhs> &m_lhsEval;\n    RhsIterator m_rhsIter;\n    const BinaryOp& m_functor;\n    Scalar m_value;\n    StorageIndex m_id;\n    StorageIndex m_innerSize;\n  };\n\n\n  enum {\n    CoeffReadCost = evaluator<Lhs>::CoeffReadCost + evaluator<Rhs>::CoeffReadCost + functor_traits<BinaryOp>::Cost,\n    Flags = XprType::Flags\n  };\n\n  explicit binary_evaluator(const XprType& xpr)\n    : m_functor(xpr.functor()),\n      m_lhsImpl(xpr.lhs()),\n      m_rhsImpl(xpr.rhs()),\n      m_expr(xpr)\n  {\n    EIGEN_INTERNAL_CHECK_COST_VALUE(functor_traits<BinaryOp>::Cost);\n    EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);\n  }\n\n  inline Index nonZerosEstimate() const {\n    return m_expr.size();\n  }\n\nprotected:\n  const BinaryOp m_functor;\n  evaluator<Lhs> m_lhsImpl;\n  evaluator<Rhs> m_rhsImpl;\n  const XprType &m_expr;\n};\n\n// sparse op dense\ntemplate<typename BinaryOp, typename Lhs, typename Rhs>\nstruct binary_evaluator<CwiseBinaryOp<BinaryOp, Lhs, Rhs>, IteratorBased, IndexBased>\n  : evaluator_base<CwiseBinaryOp<BinaryOp, Lhs, Rhs> >\n{\nprotected:\n  typedef typename evaluator<Lhs>::InnerIterator  LhsIterator;\n  typedef CwiseBinaryOp<BinaryOp, Lhs, Rhs> XprType;\n  typedef typename traits<XprType>::Scalar Scalar;\n  typedef typename XprType::StorageIndex StorageIndex;\npublic:\n\n  class InnerIterator\n  {\n    enum { IsRowMajor = (int(Lhs::Flags)&RowMajorBit)==RowMajorBit };\n  public:\n\n    EIGEN_STRONG_INLINE InnerIterator(const binary_evaluator& aEval, Index outer)\n      : m_lhsIter(aEval.m_lhsImpl,outer), m_rhsEval(aEval.m_rhsImpl), m_functor(aEval.m_functor), m_value(0), m_id(-1), m_innerSize(aEval.m_expr.lhs().innerSize())\n    {\n      this->operator++();\n    }\n\n    EIGEN_STRONG_INLINE InnerIterator& operator++()\n    {\n      ++m_id;\n      if(m_id<m_innerSize)\n      {\n        Scalar rhsVal = m_rhsEval.coeff(IsRowMajor?m_lhsIter.outer():m_id,\n                                        IsRowMajor?m_id:m_lhsIter.outer());\n        if(m_lhsIter && m_lhsIter.index()==m_id)\n        {\n          m_value = m_functor(m_lhsIter.value(), rhsVal);\n          ++m_lhsIter;\n        }\n        else\n          m_value = m_functor(Scalar(0),rhsVal);\n      }\n\n      return *this;\n    }\n\n    EIGEN_STRONG_INLINE Scalar value() const { eigen_internal_assert(m_id<m_innerSize); return m_value; }\n\n    EIGEN_STRONG_INLINE StorageIndex index() const { return m_id; }\n    EIGEN_STRONG_INLINE Index outer() const { return m_lhsIter.outer(); }\n    EIGEN_STRONG_INLINE Index row() const { return IsRowMajor ? m_lhsIter.outer() : m_id; }\n    EIGEN_STRONG_INLINE Index col() const { return IsRowMajor ? m_id : m_lhsIter.outer(); }\n\n    EIGEN_STRONG_INLINE operator bool() const { return m_id<m_innerSize; }\n\n  protected:\n    LhsIterator m_lhsIter;\n    const evaluator<Rhs> &m_rhsEval;\n    const BinaryOp& m_functor;\n    Scalar m_value;\n    StorageIndex m_id;\n    StorageIndex m_innerSize;\n  };\n\n\n  enum {\n    CoeffReadCost = evaluator<Lhs>::CoeffReadCost + evaluator<Rhs>::CoeffReadCost + functor_traits<BinaryOp>::Cost,\n    Flags = XprType::Flags\n  };\n\n  explicit binary_evaluator(const XprType& xpr)\n    : m_functor(xpr.functor()),\n      m_lhsImpl(xpr.lhs()),\n      m_rhsImpl(xpr.rhs()),\n      m_expr(xpr)\n  {\n    EIGEN_INTERNAL_CHECK_COST_VALUE(functor_traits<BinaryOp>::Cost);\n    EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);\n  }\n\n  inline Index nonZerosEstimate() const {\n    return m_expr.size();\n  }\n\nprotected:\n  const BinaryOp m_functor;\n  evaluator<Lhs> m_lhsImpl;\n  evaluator<Rhs> m_rhsImpl;\n  const XprType &m_expr;\n};\n\ntemplate<typename T,\n         typename LhsKind   = typename evaluator_traits<typename T::Lhs>::Kind,\n         typename RhsKind   = typename evaluator_traits<typename T::Rhs>::Kind,\n         typename LhsScalar = typename traits<typename T::Lhs>::Scalar,\n         typename RhsScalar = typename traits<typename T::Rhs>::Scalar> struct sparse_conjunction_evaluator;\n\n// \"sparse .* sparse\"\ntemplate<typename T1, typename T2, typename Lhs, typename Rhs>\nstruct binary_evaluator<CwiseBinaryOp<scalar_product_op<T1,T2>, Lhs, Rhs>, IteratorBased, IteratorBased>\n  : sparse_conjunction_evaluator<CwiseBinaryOp<scalar_product_op<T1,T2>, Lhs, Rhs> >\n{\n  typedef CwiseBinaryOp<scalar_product_op<T1,T2>, Lhs, Rhs> XprType;\n  typedef sparse_conjunction_evaluator<XprType> Base;\n  explicit binary_evaluator(const XprType& xpr) : Base(xpr) {}\n};\n// \"dense .* sparse\"\ntemplate<typename T1, typename T2, typename Lhs, typename Rhs>\nstruct binary_evaluator<CwiseBinaryOp<scalar_product_op<T1,T2>, Lhs, Rhs>, IndexBased, IteratorBased>\n  : sparse_conjunction_evaluator<CwiseBinaryOp<scalar_product_op<T1,T2>, Lhs, Rhs> >\n{\n  typedef CwiseBinaryOp<scalar_product_op<T1,T2>, Lhs, Rhs> XprType;\n  typedef sparse_conjunction_evaluator<XprType> Base;\n  explicit binary_evaluator(const XprType& xpr) : Base(xpr) {}\n};\n// \"sparse .* dense\"\ntemplate<typename T1, typename T2, typename Lhs, typename Rhs>\nstruct binary_evaluator<CwiseBinaryOp<scalar_product_op<T1,T2>, Lhs, Rhs>, IteratorBased, IndexBased>\n  : sparse_conjunction_evaluator<CwiseBinaryOp<scalar_product_op<T1,T2>, Lhs, Rhs> >\n{\n  typedef CwiseBinaryOp<scalar_product_op<T1,T2>, Lhs, Rhs> XprType;\n  typedef sparse_conjunction_evaluator<XprType> Base;\n  explicit binary_evaluator(const XprType& xpr) : Base(xpr) {}\n};\n\n// \"sparse ./ dense\"\ntemplate<typename T1, typename T2, typename Lhs, typename Rhs>\nstruct binary_evaluator<CwiseBinaryOp<scalar_quotient_op<T1,T2>, Lhs, Rhs>, IteratorBased, IndexBased>\n  : sparse_conjunction_evaluator<CwiseBinaryOp<scalar_quotient_op<T1,T2>, Lhs, Rhs> >\n{\n  typedef CwiseBinaryOp<scalar_quotient_op<T1,T2>, Lhs, Rhs> XprType;\n  typedef sparse_conjunction_evaluator<XprType> Base;\n  explicit binary_evaluator(const XprType& xpr) : Base(xpr) {}\n};\n\n// \"sparse && sparse\"\ntemplate<typename Lhs, typename Rhs>\nstruct binary_evaluator<CwiseBinaryOp<scalar_boolean_and_op, Lhs, Rhs>, IteratorBased, IteratorBased>\n  : sparse_conjunction_evaluator<CwiseBinaryOp<scalar_boolean_and_op, Lhs, Rhs> >\n{\n  typedef CwiseBinaryOp<scalar_boolean_and_op, Lhs, Rhs> XprType;\n  typedef sparse_conjunction_evaluator<XprType> Base;\n  explicit binary_evaluator(const XprType& xpr) : Base(xpr) {}\n};\n// \"dense && sparse\"\ntemplate<typename Lhs, typename Rhs>\nstruct binary_evaluator<CwiseBinaryOp<scalar_boolean_and_op, Lhs, Rhs>, IndexBased, IteratorBased>\n  : sparse_conjunction_evaluator<CwiseBinaryOp<scalar_boolean_and_op, Lhs, Rhs> >\n{\n  typedef CwiseBinaryOp<scalar_boolean_and_op, Lhs, Rhs> XprType;\n  typedef sparse_conjunction_evaluator<XprType> Base;\n  explicit binary_evaluator(const XprType& xpr) : Base(xpr) {}\n};\n// \"sparse && dense\"\ntemplate<typename Lhs, typename Rhs>\nstruct binary_evaluator<CwiseBinaryOp<scalar_boolean_and_op, Lhs, Rhs>, IteratorBased, IndexBased>\n  : sparse_conjunction_evaluator<CwiseBinaryOp<scalar_boolean_and_op, Lhs, Rhs> >\n{\n  typedef CwiseBinaryOp<scalar_boolean_and_op, Lhs, Rhs> XprType;\n  typedef sparse_conjunction_evaluator<XprType> Base;\n  explicit binary_evaluator(const XprType& xpr) : Base(xpr) {}\n};\n\n// \"sparse ^ sparse\"\ntemplate<typename XprType>\nstruct sparse_conjunction_evaluator<XprType, IteratorBased, IteratorBased>\n  : evaluator_base<XprType>\n{\nprotected:\n  typedef typename XprType::Functor BinaryOp;\n  typedef typename XprType::Lhs LhsArg;\n  typedef typename XprType::Rhs RhsArg;\n  typedef typename evaluator<LhsArg>::InnerIterator  LhsIterator;\n  typedef typename evaluator<RhsArg>::InnerIterator  RhsIterator;\n  typedef typename XprType::StorageIndex StorageIndex;\n  typedef typename traits<XprType>::Scalar Scalar;\npublic:\n\n  class InnerIterator\n  {\n  public:\n    \n    EIGEN_STRONG_INLINE InnerIterator(const sparse_conjunction_evaluator& aEval, Index outer)\n      : m_lhsIter(aEval.m_lhsImpl,outer), m_rhsIter(aEval.m_rhsImpl,outer), m_functor(aEval.m_functor)\n    {\n      while (m_lhsIter && m_rhsIter && (m_lhsIter.index() != m_rhsIter.index()))\n      {\n        if (m_lhsIter.index() < m_rhsIter.index())\n          ++m_lhsIter;\n        else\n          ++m_rhsIter;\n      }\n    }\n\n    EIGEN_STRONG_INLINE InnerIterator& operator++()\n    {\n      ++m_lhsIter;\n      ++m_rhsIter;\n      while (m_lhsIter && m_rhsIter && (m_lhsIter.index() != m_rhsIter.index()))\n      {\n        if (m_lhsIter.index() < m_rhsIter.index())\n          ++m_lhsIter;\n        else\n          ++m_rhsIter;\n      }\n      return *this;\n    }\n    \n    EIGEN_STRONG_INLINE Scalar value() const { return m_functor(m_lhsIter.value(), m_rhsIter.value()); }\n\n    EIGEN_STRONG_INLINE StorageIndex index() const { return m_lhsIter.index(); }\n    EIGEN_STRONG_INLINE Index outer() const { return m_lhsIter.outer(); }\n    EIGEN_STRONG_INLINE Index row() const { return m_lhsIter.row(); }\n    EIGEN_STRONG_INLINE Index col() const { return m_lhsIter.col(); }\n\n    EIGEN_STRONG_INLINE operator bool() const { return (m_lhsIter && m_rhsIter); }\n\n  protected:\n    LhsIterator m_lhsIter;\n    RhsIterator m_rhsIter;\n    const BinaryOp& m_functor;\n  };\n  \n  \n  enum {\n    CoeffReadCost = evaluator<LhsArg>::CoeffReadCost + evaluator<RhsArg>::CoeffReadCost + functor_traits<BinaryOp>::Cost,\n    Flags = XprType::Flags\n  };\n  \n  explicit sparse_conjunction_evaluator(const XprType& xpr)\n    : m_functor(xpr.functor()),\n      m_lhsImpl(xpr.lhs()), \n      m_rhsImpl(xpr.rhs())  \n  {\n    EIGEN_INTERNAL_CHECK_COST_VALUE(functor_traits<BinaryOp>::Cost);\n    EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);\n  }\n  \n  inline Index nonZerosEstimate() const {\n    return (std::min)(m_lhsImpl.nonZerosEstimate(), m_rhsImpl.nonZerosEstimate());\n  }\n\nprotected:\n  const BinaryOp m_functor;\n  evaluator<LhsArg> m_lhsImpl;\n  evaluator<RhsArg> m_rhsImpl;\n};\n\n// \"dense ^ sparse\"\ntemplate<typename XprType>\nstruct sparse_conjunction_evaluator<XprType, IndexBased, IteratorBased>\n  : evaluator_base<XprType>\n{\nprotected:\n  typedef typename XprType::Functor BinaryOp;\n  typedef typename XprType::Lhs LhsArg;\n  typedef typename XprType::Rhs RhsArg;\n  typedef evaluator<LhsArg> LhsEvaluator;\n  typedef typename evaluator<RhsArg>::InnerIterator  RhsIterator;\n  typedef typename XprType::StorageIndex StorageIndex;\n  typedef typename traits<XprType>::Scalar Scalar;\npublic:\n\n  class InnerIterator\n  {\n    enum { IsRowMajor = (int(RhsArg::Flags)&RowMajorBit)==RowMajorBit };\n\n  public:\n    \n    EIGEN_STRONG_INLINE InnerIterator(const sparse_conjunction_evaluator& aEval, Index outer)\n      : m_lhsEval(aEval.m_lhsImpl), m_rhsIter(aEval.m_rhsImpl,outer), m_functor(aEval.m_functor), m_outer(outer)\n    {}\n\n    EIGEN_STRONG_INLINE InnerIterator& operator++()\n    {\n      ++m_rhsIter;\n      return *this;\n    }\n\n    EIGEN_STRONG_INLINE Scalar value() const\n    { return m_functor(m_lhsEval.coeff(IsRowMajor?m_outer:m_rhsIter.index(),IsRowMajor?m_rhsIter.index():m_outer), m_rhsIter.value()); }\n\n    EIGEN_STRONG_INLINE StorageIndex index() const { return m_rhsIter.index(); }\n    EIGEN_STRONG_INLINE Index outer() const { return m_rhsIter.outer(); }\n    EIGEN_STRONG_INLINE Index row() const { return m_rhsIter.row(); }\n    EIGEN_STRONG_INLINE Index col() const { return m_rhsIter.col(); }\n\n    EIGEN_STRONG_INLINE operator bool() const { return m_rhsIter; }\n    \n  protected:\n    const LhsEvaluator &m_lhsEval;\n    RhsIterator m_rhsIter;\n    const BinaryOp& m_functor;\n    const Index m_outer;\n  };\n  \n  \n  enum {\n    CoeffReadCost = evaluator<LhsArg>::CoeffReadCost + evaluator<RhsArg>::CoeffReadCost + functor_traits<BinaryOp>::Cost,\n    Flags = XprType::Flags\n  };\n  \n  explicit sparse_conjunction_evaluator(const XprType& xpr)\n    : m_functor(xpr.functor()),\n      m_lhsImpl(xpr.lhs()), \n      m_rhsImpl(xpr.rhs())  \n  {\n    EIGEN_INTERNAL_CHECK_COST_VALUE(functor_traits<BinaryOp>::Cost);\n    EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);\n  }\n  \n  inline Index nonZerosEstimate() const {\n    return m_rhsImpl.nonZerosEstimate();\n  }\n\nprotected:\n  const BinaryOp m_functor;\n  evaluator<LhsArg> m_lhsImpl;\n  evaluator<RhsArg> m_rhsImpl;\n};\n\n// \"sparse ^ dense\"\ntemplate<typename XprType>\nstruct sparse_conjunction_evaluator<XprType, IteratorBased, IndexBased>\n  : evaluator_base<XprType>\n{\nprotected:\n  typedef typename XprType::Functor BinaryOp;\n  typedef typename XprType::Lhs LhsArg;\n  typedef typename XprType::Rhs RhsArg;\n  typedef typename evaluator<LhsArg>::InnerIterator LhsIterator;\n  typedef evaluator<RhsArg> RhsEvaluator;\n  typedef typename XprType::StorageIndex StorageIndex;\n  typedef typename traits<XprType>::Scalar Scalar;\npublic:\n\n  class InnerIterator\n  {\n    enum { IsRowMajor = (int(LhsArg::Flags)&RowMajorBit)==RowMajorBit };\n\n  public:\n    \n    EIGEN_STRONG_INLINE InnerIterator(const sparse_conjunction_evaluator& aEval, Index outer)\n      : m_lhsIter(aEval.m_lhsImpl,outer), m_rhsEval(aEval.m_rhsImpl), m_functor(aEval.m_functor), m_outer(outer)\n    {}\n\n    EIGEN_STRONG_INLINE InnerIterator& operator++()\n    {\n      ++m_lhsIter;\n      return *this;\n    }\n\n    EIGEN_STRONG_INLINE Scalar value() const\n    { return m_functor(m_lhsIter.value(),\n                       m_rhsEval.coeff(IsRowMajor?m_outer:m_lhsIter.index(),IsRowMajor?m_lhsIter.index():m_outer)); }\n\n    EIGEN_STRONG_INLINE StorageIndex index() const { return m_lhsIter.index(); }\n    EIGEN_STRONG_INLINE Index outer() const { return m_lhsIter.outer(); }\n    EIGEN_STRONG_INLINE Index row() const { return m_lhsIter.row(); }\n    EIGEN_STRONG_INLINE Index col() const { return m_lhsIter.col(); }\n\n    EIGEN_STRONG_INLINE operator bool() const { return m_lhsIter; }\n    \n  protected:\n    LhsIterator m_lhsIter;\n    const evaluator<RhsArg> &m_rhsEval;\n    const BinaryOp& m_functor;\n    const Index m_outer;\n  };\n  \n  \n  enum {\n    CoeffReadCost = evaluator<LhsArg>::CoeffReadCost + evaluator<RhsArg>::CoeffReadCost + functor_traits<BinaryOp>::Cost,\n    Flags = XprType::Flags\n  };\n  \n  explicit sparse_conjunction_evaluator(const XprType& xpr)\n    : m_functor(xpr.functor()),\n      m_lhsImpl(xpr.lhs()), \n      m_rhsImpl(xpr.rhs())  \n  {\n    EIGEN_INTERNAL_CHECK_COST_VALUE(functor_traits<BinaryOp>::Cost);\n    EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);\n  }\n  \n  inline Index nonZerosEstimate() const {\n    return m_lhsImpl.nonZerosEstimate();\n  }\n\nprotected:\n  const BinaryOp m_functor;\n  evaluator<LhsArg> m_lhsImpl;\n  evaluator<RhsArg> m_rhsImpl;\n};\n\n}\n\n/***************************************************************************\n* Implementation of SparseMatrixBase and SparseCwise functions/operators\n***************************************************************************/\n\ntemplate<typename Derived>\ntemplate<typename OtherDerived>\nDerived& SparseMatrixBase<Derived>::operator+=(const EigenBase<OtherDerived> &other)\n{\n  call_assignment(derived(), other.derived(), internal::add_assign_op<Scalar,typename OtherDerived::Scalar>());\n  return derived();\n}\n\ntemplate<typename Derived>\ntemplate<typename OtherDerived>\nDerived& SparseMatrixBase<Derived>::operator-=(const EigenBase<OtherDerived> &other)\n{\n  call_assignment(derived(), other.derived(), internal::assign_op<Scalar,typename OtherDerived::Scalar>());\n  return derived();\n}\n\ntemplate<typename Derived>\ntemplate<typename OtherDerived>\nEIGEN_STRONG_INLINE Derived &\nSparseMatrixBase<Derived>::operator-=(const SparseMatrixBase<OtherDerived> &other)\n{\n  return derived() = derived() - other.derived();\n}\n\ntemplate<typename Derived>\ntemplate<typename OtherDerived>\nEIGEN_STRONG_INLINE Derived &\nSparseMatrixBase<Derived>::operator+=(const SparseMatrixBase<OtherDerived>& other)\n{\n  return derived() = derived() + other.derived();\n}\n\ntemplate<typename Derived>\ntemplate<typename OtherDerived>\nDerived& SparseMatrixBase<Derived>::operator+=(const DiagonalBase<OtherDerived>& other)\n{\n  call_assignment_no_alias(derived(), other.derived(), internal::add_assign_op<Scalar,typename OtherDerived::Scalar>());\n  return derived();\n}\n\ntemplate<typename Derived>\ntemplate<typename OtherDerived>\nDerived& SparseMatrixBase<Derived>::operator-=(const DiagonalBase<OtherDerived>& other)\n{\n  call_assignment_no_alias(derived(), other.derived(), internal::sub_assign_op<Scalar,typename OtherDerived::Scalar>());\n  return derived();\n}\n    \ntemplate<typename Derived>\ntemplate<typename OtherDerived>\nEIGEN_STRONG_INLINE const typename SparseMatrixBase<Derived>::template CwiseProductDenseReturnType<OtherDerived>::Type\nSparseMatrixBase<Derived>::cwiseProduct(const MatrixBase<OtherDerived> &other) const\n{\n  return typename CwiseProductDenseReturnType<OtherDerived>::Type(derived(), other.derived());\n}\n\ntemplate<typename DenseDerived, typename SparseDerived>\nEIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_sum_op<typename DenseDerived::Scalar,typename SparseDerived::Scalar>, const DenseDerived, const SparseDerived>\noperator+(const MatrixBase<DenseDerived> &a, const SparseMatrixBase<SparseDerived> &b)\n{\n  return CwiseBinaryOp<internal::scalar_sum_op<typename DenseDerived::Scalar,typename SparseDerived::Scalar>, const DenseDerived, const SparseDerived>(a.derived(), b.derived());\n}\n\ntemplate<typename SparseDerived, typename DenseDerived>\nEIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_sum_op<typename SparseDerived::Scalar,typename DenseDerived::Scalar>, const SparseDerived, const DenseDerived>\noperator+(const SparseMatrixBase<SparseDerived> &a, const MatrixBase<DenseDerived> &b)\n{\n  return CwiseBinaryOp<internal::scalar_sum_op<typename SparseDerived::Scalar,typename DenseDerived::Scalar>, const SparseDerived, const DenseDerived>(a.derived(), b.derived());\n}\n\ntemplate<typename DenseDerived, typename SparseDerived>\nEIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_difference_op<typename DenseDerived::Scalar,typename SparseDerived::Scalar>, const DenseDerived, const SparseDerived>\noperator-(const MatrixBase<DenseDerived> &a, const SparseMatrixBase<SparseDerived> &b)\n{\n  return CwiseBinaryOp<internal::scalar_difference_op<typename DenseDerived::Scalar,typename SparseDerived::Scalar>, const DenseDerived, const SparseDerived>(a.derived(), b.derived());\n}\n\ntemplate<typename SparseDerived, typename DenseDerived>\nEIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_difference_op<typename SparseDerived::Scalar,typename DenseDerived::Scalar>, const SparseDerived, const DenseDerived>\noperator-(const SparseMatrixBase<SparseDerived> &a, const MatrixBase<DenseDerived> &b)\n{\n  return CwiseBinaryOp<internal::scalar_difference_op<typename SparseDerived::Scalar,typename DenseDerived::Scalar>, const SparseDerived, const DenseDerived>(a.derived(), b.derived());\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_SPARSE_CWISE_BINARY_OP_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseCore/SparseCwiseUnaryOp.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2015 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPARSE_CWISE_UNARY_OP_H\n#define EIGEN_SPARSE_CWISE_UNARY_OP_H\n\nnamespace Eigen { \n\nnamespace internal {\n  \ntemplate<typename UnaryOp, typename ArgType>\nstruct unary_evaluator<CwiseUnaryOp<UnaryOp,ArgType>, IteratorBased>\n  : public evaluator_base<CwiseUnaryOp<UnaryOp,ArgType> >\n{\n  public:\n    typedef CwiseUnaryOp<UnaryOp, ArgType> XprType;\n\n    class InnerIterator;\n    \n    enum {\n      CoeffReadCost = evaluator<ArgType>::CoeffReadCost + functor_traits<UnaryOp>::Cost,\n      Flags = XprType::Flags\n    };\n    \n    explicit unary_evaluator(const XprType& op) : m_functor(op.functor()), m_argImpl(op.nestedExpression())\n    {\n      EIGEN_INTERNAL_CHECK_COST_VALUE(functor_traits<UnaryOp>::Cost);\n      EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);\n    }\n    \n    inline Index nonZerosEstimate() const {\n      return m_argImpl.nonZerosEstimate();\n    }\n\n  protected:\n    typedef typename evaluator<ArgType>::InnerIterator        EvalIterator;\n    \n    const UnaryOp m_functor;\n    evaluator<ArgType> m_argImpl;\n};\n\ntemplate<typename UnaryOp, typename ArgType>\nclass unary_evaluator<CwiseUnaryOp<UnaryOp,ArgType>, IteratorBased>::InnerIterator\n    : public unary_evaluator<CwiseUnaryOp<UnaryOp,ArgType>, IteratorBased>::EvalIterator\n{\n  protected:\n    typedef typename XprType::Scalar Scalar;\n    typedef typename unary_evaluator<CwiseUnaryOp<UnaryOp,ArgType>, IteratorBased>::EvalIterator Base;\n  public:\n\n    EIGEN_STRONG_INLINE InnerIterator(const unary_evaluator& unaryOp, Index outer)\n      : Base(unaryOp.m_argImpl,outer), m_functor(unaryOp.m_functor)\n    {}\n\n    EIGEN_STRONG_INLINE InnerIterator& operator++()\n    { Base::operator++(); return *this; }\n\n    EIGEN_STRONG_INLINE Scalar value() const { return m_functor(Base::value()); }\n\n  protected:\n    const UnaryOp m_functor;\n  private:\n    Scalar& valueRef();\n};\n\ntemplate<typename ViewOp, typename ArgType>\nstruct unary_evaluator<CwiseUnaryView<ViewOp,ArgType>, IteratorBased>\n  : public evaluator_base<CwiseUnaryView<ViewOp,ArgType> >\n{\n  public:\n    typedef CwiseUnaryView<ViewOp, ArgType> XprType;\n\n    class InnerIterator;\n    \n    enum {\n      CoeffReadCost = evaluator<ArgType>::CoeffReadCost + functor_traits<ViewOp>::Cost,\n      Flags = XprType::Flags\n    };\n    \n    explicit unary_evaluator(const XprType& op) : m_functor(op.functor()), m_argImpl(op.nestedExpression())\n    {\n      EIGEN_INTERNAL_CHECK_COST_VALUE(functor_traits<ViewOp>::Cost);\n      EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);\n    }\n\n  protected:\n    typedef typename evaluator<ArgType>::InnerIterator        EvalIterator;\n    \n    const ViewOp m_functor;\n    evaluator<ArgType> m_argImpl;\n};\n\ntemplate<typename ViewOp, typename ArgType>\nclass unary_evaluator<CwiseUnaryView<ViewOp,ArgType>, IteratorBased>::InnerIterator\n    : public unary_evaluator<CwiseUnaryView<ViewOp,ArgType>, IteratorBased>::EvalIterator\n{\n  protected:\n    typedef typename XprType::Scalar Scalar;\n    typedef typename unary_evaluator<CwiseUnaryView<ViewOp,ArgType>, IteratorBased>::EvalIterator Base;\n  public:\n\n    EIGEN_STRONG_INLINE InnerIterator(const unary_evaluator& unaryOp, Index outer)\n      : Base(unaryOp.m_argImpl,outer), m_functor(unaryOp.m_functor)\n    {}\n\n    EIGEN_STRONG_INLINE InnerIterator& operator++()\n    { Base::operator++(); return *this; }\n\n    EIGEN_STRONG_INLINE Scalar value() const { return m_functor(Base::value()); }\n    EIGEN_STRONG_INLINE Scalar& valueRef() { return m_functor(Base::valueRef()); }\n\n  protected:\n    const ViewOp m_functor;\n};\n\n} // end namespace internal\n\ntemplate<typename Derived>\nEIGEN_STRONG_INLINE Derived&\nSparseMatrixBase<Derived>::operator*=(const Scalar& other)\n{\n  typedef typename internal::evaluator<Derived>::InnerIterator EvalIterator;\n  internal::evaluator<Derived> thisEval(derived());\n  for (Index j=0; j<outerSize(); ++j)\n    for (EvalIterator i(thisEval,j); i; ++i)\n      i.valueRef() *= other;\n  return derived();\n}\n\ntemplate<typename Derived>\nEIGEN_STRONG_INLINE Derived&\nSparseMatrixBase<Derived>::operator/=(const Scalar& other)\n{\n  typedef typename internal::evaluator<Derived>::InnerIterator EvalIterator;\n  internal::evaluator<Derived> thisEval(derived());\n  for (Index j=0; j<outerSize(); ++j)\n    for (EvalIterator i(thisEval,j); i; ++i)\n      i.valueRef() /= other;\n  return derived();\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_SPARSE_CWISE_UNARY_OP_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseCore/SparseDenseProduct.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2015 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPARSEDENSEPRODUCT_H\n#define EIGEN_SPARSEDENSEPRODUCT_H\n\nnamespace Eigen { \n\nnamespace internal {\n\ntemplate <> struct product_promote_storage_type<Sparse,Dense, OuterProduct> { typedef Sparse ret; };\ntemplate <> struct product_promote_storage_type<Dense,Sparse, OuterProduct> { typedef Sparse ret; };\n\ntemplate<typename SparseLhsType, typename DenseRhsType, typename DenseResType,\n         typename AlphaType,\n         int LhsStorageOrder = ((SparseLhsType::Flags&RowMajorBit)==RowMajorBit) ? RowMajor : ColMajor,\n         bool ColPerCol = ((DenseRhsType::Flags&RowMajorBit)==0) || DenseRhsType::ColsAtCompileTime==1>\nstruct sparse_time_dense_product_impl;\n\ntemplate<typename SparseLhsType, typename DenseRhsType, typename DenseResType>\nstruct sparse_time_dense_product_impl<SparseLhsType,DenseRhsType,DenseResType, typename DenseResType::Scalar, RowMajor, true>\n{\n  typedef typename internal::remove_all<SparseLhsType>::type Lhs;\n  typedef typename internal::remove_all<DenseRhsType>::type Rhs;\n  typedef typename internal::remove_all<DenseResType>::type Res;\n  typedef typename evaluator<Lhs>::InnerIterator LhsInnerIterator;\n  typedef evaluator<Lhs> LhsEval;\n  static void run(const SparseLhsType& lhs, const DenseRhsType& rhs, DenseResType& res, const typename Res::Scalar& alpha)\n  {\n    LhsEval lhsEval(lhs);\n    \n    Index n = lhs.outerSize();\n#ifdef EIGEN_HAS_OPENMP\n    Eigen::initParallel();\n    Index threads = Eigen::nbThreads();\n#endif\n    \n    for(Index c=0; c<rhs.cols(); ++c)\n    {\n#ifdef EIGEN_HAS_OPENMP\n      // This 20000 threshold has been found experimentally on 2D and 3D Poisson problems.\n      // It basically represents the minimal amount of work to be done to be worth it.\n      if(threads>1 && lhsEval.nonZerosEstimate() > 20000)\n      {\n        #pragma omp parallel for schedule(dynamic,(n+threads*4-1)/(threads*4)) num_threads(threads)\n        for(Index i=0; i<n; ++i)\n          processRow(lhsEval,rhs,res,alpha,i,c);\n      }\n      else\n#endif\n      {\n        for(Index i=0; i<n; ++i)\n          processRow(lhsEval,rhs,res,alpha,i,c);\n      }\n    }\n  }\n  \n  static void processRow(const LhsEval& lhsEval, const DenseRhsType& rhs, DenseResType& res, const typename Res::Scalar& alpha, Index i, Index col)\n  {\n    typename Res::Scalar tmp(0);\n    for(LhsInnerIterator it(lhsEval,i); it ;++it)\n      tmp += it.value() * rhs.coeff(it.index(),col);\n    res.coeffRef(i,col) += alpha * tmp;\n  }\n  \n};\n\n// FIXME: what is the purpose of the following specialization? Is it for the BlockedSparse format?\n// -> let's disable it for now as it is conflicting with generic scalar*matrix and matrix*scalar operators\n// template<typename T1, typename T2/*, int _Options, typename _StrideType*/>\n// struct ScalarBinaryOpTraits<T1, Ref<T2/*, _Options, _StrideType*/> >\n// {\n//   enum {\n//     Defined = 1\n//   };\n//   typedef typename CwiseUnaryOp<scalar_multiple2_op<T1, typename T2::Scalar>, T2>::PlainObject ReturnType;\n// };\n\ntemplate<typename SparseLhsType, typename DenseRhsType, typename DenseResType, typename AlphaType>\nstruct sparse_time_dense_product_impl<SparseLhsType,DenseRhsType,DenseResType, AlphaType, ColMajor, true>\n{\n  typedef typename internal::remove_all<SparseLhsType>::type Lhs;\n  typedef typename internal::remove_all<DenseRhsType>::type Rhs;\n  typedef typename internal::remove_all<DenseResType>::type Res;\n  typedef evaluator<Lhs> LhsEval;\n  typedef typename LhsEval::InnerIterator LhsInnerIterator;\n  static void run(const SparseLhsType& lhs, const DenseRhsType& rhs, DenseResType& res, const AlphaType& alpha)\n  {\n    LhsEval lhsEval(lhs);\n    for(Index c=0; c<rhs.cols(); ++c)\n    {\n      for(Index j=0; j<lhs.outerSize(); ++j)\n      {\n//        typename Res::Scalar rhs_j = alpha * rhs.coeff(j,c);\n        typename ScalarBinaryOpTraits<AlphaType, typename Rhs::Scalar>::ReturnType rhs_j(alpha * rhs.coeff(j,c));\n        for(LhsInnerIterator it(lhsEval,j); it ;++it)\n          res.coeffRef(it.index(),c) += it.value() * rhs_j;\n      }\n    }\n  }\n};\n\ntemplate<typename SparseLhsType, typename DenseRhsType, typename DenseResType>\nstruct sparse_time_dense_product_impl<SparseLhsType,DenseRhsType,DenseResType, typename DenseResType::Scalar, RowMajor, false>\n{\n  typedef typename internal::remove_all<SparseLhsType>::type Lhs;\n  typedef typename internal::remove_all<DenseRhsType>::type Rhs;\n  typedef typename internal::remove_all<DenseResType>::type Res;\n  typedef evaluator<Lhs> LhsEval;\n  typedef typename LhsEval::InnerIterator LhsInnerIterator;\n  static void run(const SparseLhsType& lhs, const DenseRhsType& rhs, DenseResType& res, const typename Res::Scalar& alpha)\n  {\n    Index n = lhs.rows();\n    LhsEval lhsEval(lhs);\n\n#ifdef EIGEN_HAS_OPENMP\n    Eigen::initParallel();\n    Index threads = Eigen::nbThreads();\n    // This 20000 threshold has been found experimentally on 2D and 3D Poisson problems.\n    // It basically represents the minimal amount of work to be done to be worth it.\n    if(threads>1 && lhsEval.nonZerosEstimate()*rhs.cols() > 20000)\n    {\n      #pragma omp parallel for schedule(dynamic,(n+threads*4-1)/(threads*4)) num_threads(threads)\n      for(Index i=0; i<n; ++i)\n        processRow(lhsEval,rhs,res,alpha,i);\n    }\n    else\n#endif\n    {\n      for(Index i=0; i<n; ++i)\n        processRow(lhsEval, rhs, res, alpha, i);\n    }\n  }\n\n  static void processRow(const LhsEval& lhsEval, const DenseRhsType& rhs, Res& res, const typename Res::Scalar& alpha, Index i)\n  {\n    typename Res::RowXpr res_i(res.row(i));\n    for(LhsInnerIterator it(lhsEval,i); it ;++it)\n      res_i += (alpha*it.value()) * rhs.row(it.index());\n  }\n};\n\ntemplate<typename SparseLhsType, typename DenseRhsType, typename DenseResType>\nstruct sparse_time_dense_product_impl<SparseLhsType,DenseRhsType,DenseResType, typename DenseResType::Scalar, ColMajor, false>\n{\n  typedef typename internal::remove_all<SparseLhsType>::type Lhs;\n  typedef typename internal::remove_all<DenseRhsType>::type Rhs;\n  typedef typename internal::remove_all<DenseResType>::type Res;\n  typedef typename evaluator<Lhs>::InnerIterator LhsInnerIterator;\n  static void run(const SparseLhsType& lhs, const DenseRhsType& rhs, DenseResType& res, const typename Res::Scalar& alpha)\n  {\n    evaluator<Lhs> lhsEval(lhs);\n    for(Index j=0; j<lhs.outerSize(); ++j)\n    {\n      typename Rhs::ConstRowXpr rhs_j(rhs.row(j));\n      for(LhsInnerIterator it(lhsEval,j); it ;++it)\n        res.row(it.index()) += (alpha*it.value()) * rhs_j;\n    }\n  }\n};\n\ntemplate<typename SparseLhsType, typename DenseRhsType, typename DenseResType,typename AlphaType>\ninline void sparse_time_dense_product(const SparseLhsType& lhs, const DenseRhsType& rhs, DenseResType& res, const AlphaType& alpha)\n{\n  sparse_time_dense_product_impl<SparseLhsType,DenseRhsType,DenseResType, AlphaType>::run(lhs, rhs, res, alpha);\n}\n\n} // end namespace internal\n\nnamespace internal {\n\ntemplate<typename Lhs, typename Rhs, int ProductType>\nstruct generic_product_impl<Lhs, Rhs, SparseShape, DenseShape, ProductType>\n : generic_product_impl_base<Lhs,Rhs,generic_product_impl<Lhs,Rhs,SparseShape,DenseShape,ProductType> >\n{\n  typedef typename Product<Lhs,Rhs>::Scalar Scalar;\n  \n  template<typename Dest>\n  static void scaleAndAddTo(Dest& dst, const Lhs& lhs, const Rhs& rhs, const Scalar& alpha)\n  {\n    typedef typename nested_eval<Lhs,((Rhs::Flags&RowMajorBit)==0) ? 1 : Rhs::ColsAtCompileTime>::type LhsNested;\n    typedef typename nested_eval<Rhs,((Lhs::Flags&RowMajorBit)==0) ? 1 : Dynamic>::type RhsNested;\n    LhsNested lhsNested(lhs);\n    RhsNested rhsNested(rhs);\n    internal::sparse_time_dense_product(lhsNested, rhsNested, dst, alpha);\n  }\n};\n\ntemplate<typename Lhs, typename Rhs, int ProductType>\nstruct generic_product_impl<Lhs, Rhs, SparseTriangularShape, DenseShape, ProductType>\n  : generic_product_impl<Lhs, Rhs, SparseShape, DenseShape, ProductType>\n{};\n\ntemplate<typename Lhs, typename Rhs, int ProductType>\nstruct generic_product_impl<Lhs, Rhs, DenseShape, SparseShape, ProductType>\n  : generic_product_impl_base<Lhs,Rhs,generic_product_impl<Lhs,Rhs,DenseShape,SparseShape,ProductType> >\n{\n  typedef typename Product<Lhs,Rhs>::Scalar Scalar;\n  \n  template<typename Dst>\n  static void scaleAndAddTo(Dst& dst, const Lhs& lhs, const Rhs& rhs, const Scalar& alpha)\n  {\n    typedef typename nested_eval<Lhs,((Rhs::Flags&RowMajorBit)==0) ? Dynamic : 1>::type LhsNested;\n    typedef typename nested_eval<Rhs,((Lhs::Flags&RowMajorBit)==RowMajorBit) ? 1 : Lhs::RowsAtCompileTime>::type RhsNested;\n    LhsNested lhsNested(lhs);\n    RhsNested rhsNested(rhs);\n    \n    // transpose everything\n    Transpose<Dst> dstT(dst);\n    internal::sparse_time_dense_product(rhsNested.transpose(), lhsNested.transpose(), dstT, alpha);\n  }\n};\n\ntemplate<typename Lhs, typename Rhs, int ProductType>\nstruct generic_product_impl<Lhs, Rhs, DenseShape, SparseTriangularShape, ProductType>\n  : generic_product_impl<Lhs, Rhs, DenseShape, SparseShape, ProductType>\n{};\n\ntemplate<typename LhsT, typename RhsT, bool NeedToTranspose>\nstruct sparse_dense_outer_product_evaluator\n{\nprotected:\n  typedef typename conditional<NeedToTranspose,RhsT,LhsT>::type Lhs1;\n  typedef typename conditional<NeedToTranspose,LhsT,RhsT>::type ActualRhs;\n  typedef Product<LhsT,RhsT,DefaultProduct> ProdXprType;\n  \n  // if the actual left-hand side is a dense vector,\n  // then build a sparse-view so that we can seamlessly iterate over it.\n  typedef typename conditional<is_same<typename internal::traits<Lhs1>::StorageKind,Sparse>::value,\n            Lhs1, SparseView<Lhs1> >::type ActualLhs;\n  typedef typename conditional<is_same<typename internal::traits<Lhs1>::StorageKind,Sparse>::value,\n            Lhs1 const&, SparseView<Lhs1> >::type LhsArg;\n            \n  typedef evaluator<ActualLhs> LhsEval;\n  typedef evaluator<ActualRhs> RhsEval;\n  typedef typename evaluator<ActualLhs>::InnerIterator LhsIterator;\n  typedef typename ProdXprType::Scalar Scalar;\n  \npublic:\n  enum {\n    Flags = NeedToTranspose ? RowMajorBit : 0,\n    CoeffReadCost = HugeCost\n  };\n  \n  class InnerIterator : public LhsIterator\n  {\n  public:\n    InnerIterator(const sparse_dense_outer_product_evaluator &xprEval, Index outer)\n      : LhsIterator(xprEval.m_lhsXprImpl, 0),\n        m_outer(outer),\n        m_empty(false),\n        m_factor(get(xprEval.m_rhsXprImpl, outer, typename internal::traits<ActualRhs>::StorageKind() ))\n    {}\n    \n    EIGEN_STRONG_INLINE Index outer() const { return m_outer; }\n    EIGEN_STRONG_INLINE Index row()   const { return NeedToTranspose ? m_outer : LhsIterator::index(); }\n    EIGEN_STRONG_INLINE Index col()   const { return NeedToTranspose ? LhsIterator::index() : m_outer; }\n\n    EIGEN_STRONG_INLINE Scalar value() const { return LhsIterator::value() * m_factor; }\n    EIGEN_STRONG_INLINE operator bool() const { return LhsIterator::operator bool() && (!m_empty); }\n    \n  protected:\n    Scalar get(const RhsEval &rhs, Index outer, Dense = Dense()) const\n    {\n      return rhs.coeff(outer);\n    }\n    \n    Scalar get(const RhsEval &rhs, Index outer, Sparse = Sparse())\n    {\n      typename RhsEval::InnerIterator it(rhs, outer);\n      if (it && it.index()==0 && it.value()!=Scalar(0))\n        return it.value();\n      m_empty = true;\n      return Scalar(0);\n    }\n    \n    Index m_outer;\n    bool m_empty;\n    Scalar m_factor;\n  };\n  \n  sparse_dense_outer_product_evaluator(const Lhs1 &lhs, const ActualRhs &rhs)\n     : m_lhs(lhs), m_lhsXprImpl(m_lhs), m_rhsXprImpl(rhs)\n  {\n    EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);\n  }\n  \n  // transpose case\n  sparse_dense_outer_product_evaluator(const ActualRhs &rhs, const Lhs1 &lhs)\n     : m_lhs(lhs), m_lhsXprImpl(m_lhs), m_rhsXprImpl(rhs)\n  {\n    EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);\n  }\n    \nprotected:\n  const LhsArg m_lhs;\n  evaluator<ActualLhs> m_lhsXprImpl;\n  evaluator<ActualRhs> m_rhsXprImpl;\n};\n\n// sparse * dense outer product\ntemplate<typename Lhs, typename Rhs>\nstruct product_evaluator<Product<Lhs, Rhs, DefaultProduct>, OuterProduct, SparseShape, DenseShape>\n  : sparse_dense_outer_product_evaluator<Lhs,Rhs, Lhs::IsRowMajor>\n{\n  typedef sparse_dense_outer_product_evaluator<Lhs,Rhs, Lhs::IsRowMajor> Base;\n  \n  typedef Product<Lhs, Rhs> XprType;\n  typedef typename XprType::PlainObject PlainObject;\n\n  explicit product_evaluator(const XprType& xpr)\n    : Base(xpr.lhs(), xpr.rhs())\n  {}\n  \n};\n\ntemplate<typename Lhs, typename Rhs>\nstruct product_evaluator<Product<Lhs, Rhs, DefaultProduct>, OuterProduct, DenseShape, SparseShape>\n  : sparse_dense_outer_product_evaluator<Lhs,Rhs, Rhs::IsRowMajor>\n{\n  typedef sparse_dense_outer_product_evaluator<Lhs,Rhs, Rhs::IsRowMajor> Base;\n  \n  typedef Product<Lhs, Rhs> XprType;\n  typedef typename XprType::PlainObject PlainObject;\n\n  explicit product_evaluator(const XprType& xpr)\n    : Base(xpr.lhs(), xpr.rhs())\n  {}\n  \n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_SPARSEDENSEPRODUCT_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseCore/SparseDiagonalProduct.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009-2015 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPARSE_DIAGONAL_PRODUCT_H\n#define EIGEN_SPARSE_DIAGONAL_PRODUCT_H\n\nnamespace Eigen { \n\n// The product of a diagonal matrix with a sparse matrix can be easily\n// implemented using expression template.\n// We have two consider very different cases:\n// 1 - diag * row-major sparse\n//     => each inner vector <=> scalar * sparse vector product\n//     => so we can reuse CwiseUnaryOp::InnerIterator\n// 2 - diag * col-major sparse\n//     => each inner vector <=> densevector * sparse vector cwise product\n//     => again, we can reuse specialization of CwiseBinaryOp::InnerIterator\n//        for that particular case\n// The two other cases are symmetric.\n\nnamespace internal {\n\nenum {\n  SDP_AsScalarProduct,\n  SDP_AsCwiseProduct\n};\n  \ntemplate<typename SparseXprType, typename DiagonalCoeffType, int SDP_Tag>\nstruct sparse_diagonal_product_evaluator;\n\ntemplate<typename Lhs, typename Rhs, int ProductTag>\nstruct product_evaluator<Product<Lhs, Rhs, DefaultProduct>, ProductTag, DiagonalShape, SparseShape>\n  : public sparse_diagonal_product_evaluator<Rhs, typename Lhs::DiagonalVectorType, Rhs::Flags&RowMajorBit?SDP_AsScalarProduct:SDP_AsCwiseProduct>\n{\n  typedef Product<Lhs, Rhs, DefaultProduct> XprType;\n  enum { CoeffReadCost = HugeCost, Flags = Rhs::Flags&RowMajorBit, Alignment = 0 }; // FIXME CoeffReadCost & Flags\n  \n  typedef sparse_diagonal_product_evaluator<Rhs, typename Lhs::DiagonalVectorType, Rhs::Flags&RowMajorBit?SDP_AsScalarProduct:SDP_AsCwiseProduct> Base;\n  explicit product_evaluator(const XprType& xpr) : Base(xpr.rhs(), xpr.lhs().diagonal()) {}\n};\n\ntemplate<typename Lhs, typename Rhs, int ProductTag>\nstruct product_evaluator<Product<Lhs, Rhs, DefaultProduct>, ProductTag, SparseShape, DiagonalShape>\n  : public sparse_diagonal_product_evaluator<Lhs, Transpose<const typename Rhs::DiagonalVectorType>, Lhs::Flags&RowMajorBit?SDP_AsCwiseProduct:SDP_AsScalarProduct>\n{\n  typedef Product<Lhs, Rhs, DefaultProduct> XprType;\n  enum { CoeffReadCost = HugeCost, Flags = Lhs::Flags&RowMajorBit, Alignment = 0 }; // FIXME CoeffReadCost & Flags\n  \n  typedef sparse_diagonal_product_evaluator<Lhs, Transpose<const typename Rhs::DiagonalVectorType>, Lhs::Flags&RowMajorBit?SDP_AsCwiseProduct:SDP_AsScalarProduct> Base;\n  explicit product_evaluator(const XprType& xpr) : Base(xpr.lhs(), xpr.rhs().diagonal().transpose()) {}\n};\n\ntemplate<typename SparseXprType, typename DiagonalCoeffType>\nstruct sparse_diagonal_product_evaluator<SparseXprType, DiagonalCoeffType, SDP_AsScalarProduct>\n{\nprotected:\n  typedef typename evaluator<SparseXprType>::InnerIterator SparseXprInnerIterator;\n  typedef typename SparseXprType::Scalar Scalar;\n  \npublic:\n  class InnerIterator : public SparseXprInnerIterator\n  {\n  public:\n    InnerIterator(const sparse_diagonal_product_evaluator &xprEval, Index outer)\n      : SparseXprInnerIterator(xprEval.m_sparseXprImpl, outer),\n        m_coeff(xprEval.m_diagCoeffImpl.coeff(outer))\n    {}\n    \n    EIGEN_STRONG_INLINE Scalar value() const { return m_coeff * SparseXprInnerIterator::value(); }\n  protected:\n    typename DiagonalCoeffType::Scalar m_coeff;\n  };\n  \n  sparse_diagonal_product_evaluator(const SparseXprType &sparseXpr, const DiagonalCoeffType &diagCoeff)\n    : m_sparseXprImpl(sparseXpr), m_diagCoeffImpl(diagCoeff)\n  {}\n\n  Index nonZerosEstimate() const { return m_sparseXprImpl.nonZerosEstimate(); }\n    \nprotected:\n  evaluator<SparseXprType> m_sparseXprImpl;\n  evaluator<DiagonalCoeffType> m_diagCoeffImpl;\n};\n\n\ntemplate<typename SparseXprType, typename DiagCoeffType>\nstruct sparse_diagonal_product_evaluator<SparseXprType, DiagCoeffType, SDP_AsCwiseProduct>\n{\n  typedef typename SparseXprType::Scalar Scalar;\n  typedef typename SparseXprType::StorageIndex StorageIndex;\n  \n  typedef typename nested_eval<DiagCoeffType,SparseXprType::IsRowMajor ? SparseXprType::RowsAtCompileTime\n                                                                       : SparseXprType::ColsAtCompileTime>::type DiagCoeffNested;\n  \n  class InnerIterator\n  {\n    typedef typename evaluator<SparseXprType>::InnerIterator SparseXprIter;\n  public:\n    InnerIterator(const sparse_diagonal_product_evaluator &xprEval, Index outer)\n      : m_sparseIter(xprEval.m_sparseXprEval, outer), m_diagCoeffNested(xprEval.m_diagCoeffNested)\n    {}\n    \n    inline Scalar value() const { return m_sparseIter.value() * m_diagCoeffNested.coeff(index()); }\n    inline StorageIndex index() const  { return m_sparseIter.index(); }\n    inline Index outer() const  { return m_sparseIter.outer(); }\n    inline Index col() const    { return SparseXprType::IsRowMajor ? m_sparseIter.index() : m_sparseIter.outer(); }\n    inline Index row() const    { return SparseXprType::IsRowMajor ? m_sparseIter.outer() : m_sparseIter.index(); }\n    \n    EIGEN_STRONG_INLINE InnerIterator& operator++() { ++m_sparseIter; return *this; }\n    inline operator bool() const  { return m_sparseIter; }\n    \n  protected:\n    SparseXprIter m_sparseIter;\n    DiagCoeffNested m_diagCoeffNested;\n  };\n  \n  sparse_diagonal_product_evaluator(const SparseXprType &sparseXpr, const DiagCoeffType &diagCoeff)\n    : m_sparseXprEval(sparseXpr), m_diagCoeffNested(diagCoeff)\n  {}\n\n  Index nonZerosEstimate() const { return m_sparseXprEval.nonZerosEstimate(); }\n    \nprotected:\n  evaluator<SparseXprType> m_sparseXprEval;\n  DiagCoeffNested m_diagCoeffNested;\n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_SPARSE_DIAGONAL_PRODUCT_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseCore/SparseDot.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPARSE_DOT_H\n#define EIGEN_SPARSE_DOT_H\n\nnamespace Eigen { \n\ntemplate<typename Derived>\ntemplate<typename OtherDerived>\ntypename internal::traits<Derived>::Scalar\nSparseMatrixBase<Derived>::dot(const MatrixBase<OtherDerived>& other) const\n{\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)\n  EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(Derived,OtherDerived)\n  EIGEN_STATIC_ASSERT((internal::is_same<Scalar, typename OtherDerived::Scalar>::value),\n    YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)\n\n  eigen_assert(size() == other.size());\n  eigen_assert(other.size()>0 && \"you are using a non initialized vector\");\n\n  internal::evaluator<Derived> thisEval(derived());\n  typename internal::evaluator<Derived>::InnerIterator i(thisEval, 0);\n  Scalar res(0);\n  while (i)\n  {\n    res += numext::conj(i.value()) * other.coeff(i.index());\n    ++i;\n  }\n  return res;\n}\n\ntemplate<typename Derived>\ntemplate<typename OtherDerived>\ntypename internal::traits<Derived>::Scalar\nSparseMatrixBase<Derived>::dot(const SparseMatrixBase<OtherDerived>& other) const\n{\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)\n  EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(Derived,OtherDerived)\n  EIGEN_STATIC_ASSERT((internal::is_same<Scalar, typename OtherDerived::Scalar>::value),\n    YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)\n\n  eigen_assert(size() == other.size());\n\n  internal::evaluator<Derived> thisEval(derived());\n  typename internal::evaluator<Derived>::InnerIterator i(thisEval, 0);\n  \n  internal::evaluator<OtherDerived>  otherEval(other.derived());\n  typename internal::evaluator<OtherDerived>::InnerIterator j(otherEval, 0);\n\n  Scalar res(0);\n  while (i && j)\n  {\n    if (i.index()==j.index())\n    {\n      res += numext::conj(i.value()) * j.value();\n      ++i; ++j;\n    }\n    else if (i.index()<j.index())\n      ++i;\n    else\n      ++j;\n  }\n  return res;\n}\n\ntemplate<typename Derived>\ninline typename NumTraits<typename internal::traits<Derived>::Scalar>::Real\nSparseMatrixBase<Derived>::squaredNorm() const\n{\n  return numext::real((*this).cwiseAbs2().sum());\n}\n\ntemplate<typename Derived>\ninline typename NumTraits<typename internal::traits<Derived>::Scalar>::Real\nSparseMatrixBase<Derived>::norm() const\n{\n  using std::sqrt;\n  return sqrt(squaredNorm());\n}\n\ntemplate<typename Derived>\ninline typename NumTraits<typename internal::traits<Derived>::Scalar>::Real\nSparseMatrixBase<Derived>::blueNorm() const\n{\n  return internal::blueNorm_impl(*this);\n}\n} // end namespace Eigen\n\n#endif // EIGEN_SPARSE_DOT_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseCore/SparseFuzzy.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPARSE_FUZZY_H\n#define EIGEN_SPARSE_FUZZY_H\n\nnamespace Eigen {\n  \ntemplate<typename Derived>\ntemplate<typename OtherDerived>\nbool SparseMatrixBase<Derived>::isApprox(const SparseMatrixBase<OtherDerived>& other, const RealScalar &prec) const\n{\n  const typename internal::nested_eval<Derived,2,PlainObject>::type actualA(derived());\n  typename internal::conditional<bool(IsRowMajor)==bool(OtherDerived::IsRowMajor),\n    const typename internal::nested_eval<OtherDerived,2,PlainObject>::type,\n    const PlainObject>::type actualB(other.derived());\n\n  return (actualA - actualB).squaredNorm() <= prec * prec * numext::mini(actualA.squaredNorm(), actualB.squaredNorm());\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_SPARSE_FUZZY_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseCore/SparseMap.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPARSE_MAP_H\n#define EIGEN_SPARSE_MAP_H\n\nnamespace Eigen {\n\nnamespace internal {\n\ntemplate<typename MatScalar, int MatOptions, typename MatIndex, int Options, typename StrideType>\nstruct traits<Map<SparseMatrix<MatScalar,MatOptions,MatIndex>, Options, StrideType> >\n  : public traits<SparseMatrix<MatScalar,MatOptions,MatIndex> >\n{\n  typedef SparseMatrix<MatScalar,MatOptions,MatIndex> PlainObjectType;\n  typedef traits<PlainObjectType> TraitsBase;\n  enum {\n    Flags = TraitsBase::Flags & (~NestByRefBit)\n  };\n};\n\ntemplate<typename MatScalar, int MatOptions, typename MatIndex, int Options, typename StrideType>\nstruct traits<Map<const SparseMatrix<MatScalar,MatOptions,MatIndex>, Options, StrideType> >\n  : public traits<SparseMatrix<MatScalar,MatOptions,MatIndex> >\n{\n  typedef SparseMatrix<MatScalar,MatOptions,MatIndex> PlainObjectType;\n  typedef traits<PlainObjectType> TraitsBase;\n  enum {\n    Flags = TraitsBase::Flags & (~ (NestByRefBit | LvalueBit))\n  };\n};\n\n} // end namespace internal\n\ntemplate<typename Derived,\n         int Level = internal::accessors_level<Derived>::has_write_access ? WriteAccessors : ReadOnlyAccessors\n> class SparseMapBase;\n\n/** \\ingroup SparseCore_Module\n  * class SparseMapBase\n  * \\brief Common base class for Map and Ref instance of sparse matrix and vector.\n  */\ntemplate<typename Derived>\nclass SparseMapBase<Derived,ReadOnlyAccessors>\n  : public SparseCompressedBase<Derived>\n{\n  public:\n    typedef SparseCompressedBase<Derived> Base;\n    typedef typename Base::Scalar Scalar;\n    typedef typename Base::StorageIndex StorageIndex;\n    enum { IsRowMajor = Base::IsRowMajor };\n    using Base::operator=;\n  protected:\n    \n    typedef typename internal::conditional<\n                         bool(internal::is_lvalue<Derived>::value),\n                         Scalar *, const Scalar *>::type ScalarPointer;\n    typedef typename internal::conditional<\n                         bool(internal::is_lvalue<Derived>::value),\n                         StorageIndex *, const StorageIndex *>::type IndexPointer;\n\n    Index   m_outerSize;\n    Index   m_innerSize;\n    Array<StorageIndex,2,1>  m_zero_nnz;\n    IndexPointer  m_outerIndex;\n    IndexPointer  m_innerIndices;\n    ScalarPointer m_values;\n    IndexPointer  m_innerNonZeros;\n\n  public:\n\n    /** \\copydoc SparseMatrixBase::rows() */\n    inline Index rows() const { return IsRowMajor ? m_outerSize : m_innerSize; }\n    /** \\copydoc SparseMatrixBase::cols() */\n    inline Index cols() const { return IsRowMajor ? m_innerSize : m_outerSize; }\n    /** \\copydoc SparseMatrixBase::innerSize() */\n    inline Index innerSize() const { return m_innerSize; }\n    /** \\copydoc SparseMatrixBase::outerSize() */\n    inline Index outerSize() const { return m_outerSize; }\n    /** \\copydoc SparseCompressedBase::nonZeros */\n    inline Index nonZeros() const { return m_zero_nnz[1]; }\n    \n    /** \\copydoc SparseCompressedBase::isCompressed */\n    bool isCompressed() const { return m_innerNonZeros==0; }\n\n    //----------------------------------------\n    // direct access interface\n    /** \\copydoc SparseMatrix::valuePtr */\n    inline const Scalar* valuePtr() const { return m_values; }\n    /** \\copydoc SparseMatrix::innerIndexPtr */\n    inline const StorageIndex* innerIndexPtr() const { return m_innerIndices; }\n    /** \\copydoc SparseMatrix::outerIndexPtr */\n    inline const StorageIndex* outerIndexPtr() const { return m_outerIndex; }\n    /** \\copydoc SparseMatrix::innerNonZeroPtr */\n    inline const StorageIndex* innerNonZeroPtr() const { return m_innerNonZeros; }\n    //----------------------------------------\n\n    /** \\copydoc SparseMatrix::coeff */\n    inline Scalar coeff(Index row, Index col) const\n    {\n      const Index outer = IsRowMajor ? row : col;\n      const Index inner = IsRowMajor ? col : row;\n\n      Index start = m_outerIndex[outer];\n      Index end = isCompressed() ? m_outerIndex[outer+1] : start + m_innerNonZeros[outer];\n      if (start==end)\n        return Scalar(0);\n      else if (end>0 && inner==m_innerIndices[end-1])\n        return m_values[end-1];\n      // ^^  optimization: let's first check if it is the last coefficient\n      // (very common in high level algorithms)\n\n      const StorageIndex* r = std::lower_bound(&m_innerIndices[start],&m_innerIndices[end-1],inner);\n      const Index id = r-&m_innerIndices[0];\n      return ((*r==inner) && (id<end)) ? m_values[id] : Scalar(0);\n    }\n\n    inline SparseMapBase(Index rows, Index cols, Index nnz, IndexPointer outerIndexPtr, IndexPointer innerIndexPtr,\n                              ScalarPointer valuePtr, IndexPointer innerNonZerosPtr = 0)\n      : m_outerSize(IsRowMajor?rows:cols), m_innerSize(IsRowMajor?cols:rows), m_zero_nnz(0,internal::convert_index<StorageIndex>(nnz)), m_outerIndex(outerIndexPtr),\n        m_innerIndices(innerIndexPtr), m_values(valuePtr), m_innerNonZeros(innerNonZerosPtr)\n    {}\n\n    // for vectors\n    inline SparseMapBase(Index size, Index nnz, IndexPointer innerIndexPtr, ScalarPointer valuePtr)\n      : m_outerSize(1), m_innerSize(size), m_zero_nnz(0,internal::convert_index<StorageIndex>(nnz)), m_outerIndex(m_zero_nnz.data()),\n        m_innerIndices(innerIndexPtr), m_values(valuePtr), m_innerNonZeros(0)\n    {}\n\n    /** Empty destructor */\n    inline ~SparseMapBase() {}\n\n  protected:\n    inline SparseMapBase() {}\n};\n\n/** \\ingroup SparseCore_Module\n  * class SparseMapBase\n  * \\brief Common base class for writable Map and Ref instance of sparse matrix and vector.\n  */\ntemplate<typename Derived>\nclass SparseMapBase<Derived,WriteAccessors>\n  : public SparseMapBase<Derived,ReadOnlyAccessors>\n{\n    typedef MapBase<Derived, ReadOnlyAccessors> ReadOnlyMapBase;\n    \n  public:\n    typedef SparseMapBase<Derived, ReadOnlyAccessors> Base;\n    typedef typename Base::Scalar Scalar;\n    typedef typename Base::StorageIndex StorageIndex;\n    enum { IsRowMajor = Base::IsRowMajor };\n    \n    using Base::operator=;\n\n  public:\n    \n    //----------------------------------------\n    // direct access interface\n    using Base::valuePtr;\n    using Base::innerIndexPtr;\n    using Base::outerIndexPtr;\n    using Base::innerNonZeroPtr;\n    /** \\copydoc SparseMatrix::valuePtr */\n    inline Scalar* valuePtr()              { return Base::m_values; }\n    /** \\copydoc SparseMatrix::innerIndexPtr */\n    inline StorageIndex* innerIndexPtr()   { return Base::m_innerIndices; }\n    /** \\copydoc SparseMatrix::outerIndexPtr */\n    inline StorageIndex* outerIndexPtr()   { return Base::m_outerIndex; }\n    /** \\copydoc SparseMatrix::innerNonZeroPtr */\n    inline StorageIndex* innerNonZeroPtr() { return Base::m_innerNonZeros; }\n    //----------------------------------------\n\n    /** \\copydoc SparseMatrix::coeffRef */\n    inline Scalar& coeffRef(Index row, Index col)\n    {\n      const Index outer = IsRowMajor ? row : col;\n      const Index inner = IsRowMajor ? col : row;\n\n      Index start = Base::m_outerIndex[outer];\n      Index end = Base::isCompressed() ? Base::m_outerIndex[outer+1] : start + Base::m_innerNonZeros[outer];\n      eigen_assert(end>=start && \"you probably called coeffRef on a non finalized matrix\");\n      eigen_assert(end>start && \"coeffRef cannot be called on a zero coefficient\");\n      StorageIndex* r = std::lower_bound(&Base::m_innerIndices[start],&Base::m_innerIndices[end],inner);\n      const Index id = r - &Base::m_innerIndices[0];\n      eigen_assert((*r==inner) && (id<end) && \"coeffRef cannot be called on a zero coefficient\");\n      return const_cast<Scalar*>(Base::m_values)[id];\n    }\n    \n    inline SparseMapBase(Index rows, Index cols, Index nnz, StorageIndex* outerIndexPtr, StorageIndex* innerIndexPtr,\n                         Scalar* valuePtr, StorageIndex* innerNonZerosPtr = 0)\n      : Base(rows, cols, nnz, outerIndexPtr, innerIndexPtr, valuePtr, innerNonZerosPtr)\n    {}\n\n    // for vectors\n    inline SparseMapBase(Index size, Index nnz, StorageIndex* innerIndexPtr, Scalar* valuePtr)\n      : Base(size, nnz, innerIndexPtr, valuePtr)\n    {}\n\n    /** Empty destructor */\n    inline ~SparseMapBase() {}\n\n  protected:\n    inline SparseMapBase() {}\n};\n\n/** \\ingroup SparseCore_Module\n  *\n  * \\brief Specialization of class Map for SparseMatrix-like storage.\n  *\n  * \\tparam SparseMatrixType the equivalent sparse matrix type of the referenced data, it must be a template instance of class SparseMatrix.\n  *\n  * \\sa class Map, class SparseMatrix, class Ref<SparseMatrixType,Options>\n  */\n#ifndef EIGEN_PARSED_BY_DOXYGEN\ntemplate<typename MatScalar, int MatOptions, typename MatIndex, int Options, typename StrideType>\nclass Map<SparseMatrix<MatScalar,MatOptions,MatIndex>, Options, StrideType>\n  : public SparseMapBase<Map<SparseMatrix<MatScalar,MatOptions,MatIndex>, Options, StrideType> >\n#else\ntemplate<typename SparseMatrixType>\nclass Map<SparseMatrixType>\n  : public SparseMapBase<Derived,WriteAccessors>\n#endif\n{\n  public:\n    typedef SparseMapBase<Map> Base;\n    EIGEN_SPARSE_PUBLIC_INTERFACE(Map)\n    enum { IsRowMajor = Base::IsRowMajor };\n\n  public:\n\n    /** Constructs a read-write Map to a sparse matrix of size \\a rows x \\a cols, containing \\a nnz non-zero coefficients,\n      * stored as a sparse format as defined by the pointers \\a outerIndexPtr, \\a innerIndexPtr, and \\a valuePtr.\n      * If the optional parameter \\a innerNonZerosPtr is the null pointer, then a standard compressed format is assumed.\n      *\n      * This constructor is available only if \\c SparseMatrixType is non-const.\n      *\n      * More details on the expected storage schemes are given in the \\ref TutorialSparse \"manual pages\".\n      */\n    inline Map(Index rows, Index cols, Index nnz, StorageIndex* outerIndexPtr,\n               StorageIndex* innerIndexPtr, Scalar* valuePtr, StorageIndex* innerNonZerosPtr = 0)\n      : Base(rows, cols, nnz, outerIndexPtr, innerIndexPtr, valuePtr, innerNonZerosPtr)\n    {}\n#ifndef EIGEN_PARSED_BY_DOXYGEN\n    /** Empty destructor */\n    inline ~Map() {}\n};\n\ntemplate<typename MatScalar, int MatOptions, typename MatIndex, int Options, typename StrideType>\nclass Map<const SparseMatrix<MatScalar,MatOptions,MatIndex>, Options, StrideType>\n  : public SparseMapBase<Map<const SparseMatrix<MatScalar,MatOptions,MatIndex>, Options, StrideType> >\n{\n  public:\n    typedef SparseMapBase<Map> Base;\n    EIGEN_SPARSE_PUBLIC_INTERFACE(Map)\n    enum { IsRowMajor = Base::IsRowMajor };\n\n  public:\n#endif\n    /** This is the const version of the above constructor.\n      *\n      * This constructor is available only if \\c SparseMatrixType is const, e.g.:\n      * \\code Map<const SparseMatrix<double> >  \\endcode\n      */\n    inline Map(Index rows, Index cols, Index nnz, const StorageIndex* outerIndexPtr,\n               const StorageIndex* innerIndexPtr, const Scalar* valuePtr, const StorageIndex* innerNonZerosPtr = 0)\n      : Base(rows, cols, nnz, outerIndexPtr, innerIndexPtr, valuePtr, innerNonZerosPtr)\n    {}\n\n    /** Empty destructor */\n    inline ~Map() {}\n};\n\nnamespace internal {\n\ntemplate<typename MatScalar, int MatOptions, typename MatIndex, int Options, typename StrideType>\nstruct evaluator<Map<SparseMatrix<MatScalar,MatOptions,MatIndex>, Options, StrideType> >\n  : evaluator<SparseCompressedBase<Map<SparseMatrix<MatScalar,MatOptions,MatIndex>, Options, StrideType> > >\n{\n  typedef evaluator<SparseCompressedBase<Map<SparseMatrix<MatScalar,MatOptions,MatIndex>, Options, StrideType> > > Base;\n  typedef Map<SparseMatrix<MatScalar,MatOptions,MatIndex>, Options, StrideType> XprType;  \n  evaluator() : Base() {}\n  explicit evaluator(const XprType &mat) : Base(mat) {}\n};\n\ntemplate<typename MatScalar, int MatOptions, typename MatIndex, int Options, typename StrideType>\nstruct evaluator<Map<const SparseMatrix<MatScalar,MatOptions,MatIndex>, Options, StrideType> >\n  : evaluator<SparseCompressedBase<Map<const SparseMatrix<MatScalar,MatOptions,MatIndex>, Options, StrideType> > >\n{\n  typedef evaluator<SparseCompressedBase<Map<const SparseMatrix<MatScalar,MatOptions,MatIndex>, Options, StrideType> > > Base;\n  typedef Map<const SparseMatrix<MatScalar,MatOptions,MatIndex>, Options, StrideType> XprType;  \n  evaluator() : Base() {}\n  explicit evaluator(const XprType &mat) : Base(mat) {}\n};\n\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_SPARSE_MAP_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseCore/SparseMatrix.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPARSEMATRIX_H\n#define EIGEN_SPARSEMATRIX_H\n\nnamespace Eigen { \n\n/** \\ingroup SparseCore_Module\n  *\n  * \\class SparseMatrix\n  *\n  * \\brief A versatible sparse matrix representation\n  *\n  * This class implements a more versatile variants of the common \\em compressed row/column storage format.\n  * Each colmun's (resp. row) non zeros are stored as a pair of value with associated row (resp. colmiun) index.\n  * All the non zeros are stored in a single large buffer. Unlike the \\em compressed format, there might be extra\n  * space in between the nonzeros of two successive colmuns (resp. rows) such that insertion of new non-zero\n  * can be done with limited memory reallocation and copies.\n  *\n  * A call to the function makeCompressed() turns the matrix into the standard \\em compressed format\n  * compatible with many library.\n  *\n  * More details on this storage sceheme are given in the \\ref TutorialSparse \"manual pages\".\n  *\n  * \\tparam _Scalar the scalar type, i.e. the type of the coefficients\n  * \\tparam _Options Union of bit flags controlling the storage scheme. Currently the only possibility\n  *                 is ColMajor or RowMajor. The default is 0 which means column-major.\n  * \\tparam _StorageIndex the type of the indices. It has to be a \\b signed type (e.g., short, int, std::ptrdiff_t). Default is \\c int.\n  *\n  * \\warning In %Eigen 3.2, the undocumented type \\c SparseMatrix::Index was improperly defined as the storage index type (e.g., int),\n  *          whereas it is now (starting from %Eigen 3.3) deprecated and always defined as Eigen::Index.\n  *          Codes making use of \\c SparseMatrix::Index, might thus likely have to be changed to use \\c SparseMatrix::StorageIndex instead.\n  *\n  * This class can be extended with the help of the plugin mechanism described on the page\n  * \\ref TopicCustomizing_Plugins by defining the preprocessor symbol \\c EIGEN_SPARSEMATRIX_PLUGIN.\n  */\n\nnamespace internal {\ntemplate<typename _Scalar, int _Options, typename _StorageIndex>\nstruct traits<SparseMatrix<_Scalar, _Options, _StorageIndex> >\n{\n  typedef _Scalar Scalar;\n  typedef _StorageIndex StorageIndex;\n  typedef Sparse StorageKind;\n  typedef MatrixXpr XprKind;\n  enum {\n    RowsAtCompileTime = Dynamic,\n    ColsAtCompileTime = Dynamic,\n    MaxRowsAtCompileTime = Dynamic,\n    MaxColsAtCompileTime = Dynamic,\n    Flags = _Options | NestByRefBit | LvalueBit | CompressedAccessBit,\n    SupportedAccessPatterns = InnerRandomAccessPattern\n  };\n};\n\ntemplate<typename _Scalar, int _Options, typename _StorageIndex, int DiagIndex>\nstruct traits<Diagonal<SparseMatrix<_Scalar, _Options, _StorageIndex>, DiagIndex> >\n{\n  typedef SparseMatrix<_Scalar, _Options, _StorageIndex> MatrixType;\n  typedef typename ref_selector<MatrixType>::type MatrixTypeNested;\n  typedef typename remove_reference<MatrixTypeNested>::type _MatrixTypeNested;\n\n  typedef _Scalar Scalar;\n  typedef Dense StorageKind;\n  typedef _StorageIndex StorageIndex;\n  typedef MatrixXpr XprKind;\n\n  enum {\n    RowsAtCompileTime = Dynamic,\n    ColsAtCompileTime = 1,\n    MaxRowsAtCompileTime = Dynamic,\n    MaxColsAtCompileTime = 1,\n    Flags = LvalueBit\n  };\n};\n\ntemplate<typename _Scalar, int _Options, typename _StorageIndex, int DiagIndex>\nstruct traits<Diagonal<const SparseMatrix<_Scalar, _Options, _StorageIndex>, DiagIndex> >\n : public traits<Diagonal<SparseMatrix<_Scalar, _Options, _StorageIndex>, DiagIndex> >\n{\n  enum {\n    Flags = 0\n  };\n};\n\n} // end namespace internal\n\ntemplate<typename _Scalar, int _Options, typename _StorageIndex>\nclass SparseMatrix\n  : public SparseCompressedBase<SparseMatrix<_Scalar, _Options, _StorageIndex> >\n{\n    typedef SparseCompressedBase<SparseMatrix> Base;\n    using Base::convert_index;\n    friend class SparseVector<_Scalar,0,_StorageIndex>;\n    template<typename, typename, typename, typename, typename>\n    friend struct internal::Assignment;\n  public:\n    using Base::isCompressed;\n    using Base::nonZeros;\n    EIGEN_SPARSE_PUBLIC_INTERFACE(SparseMatrix)\n    using Base::operator+=;\n    using Base::operator-=;\n\n    typedef MappedSparseMatrix<Scalar,Flags> Map;\n    typedef Diagonal<SparseMatrix> DiagonalReturnType;\n    typedef Diagonal<const SparseMatrix> ConstDiagonalReturnType;\n    typedef typename Base::InnerIterator InnerIterator;\n    typedef typename Base::ReverseInnerIterator ReverseInnerIterator;\n    \n\n    using Base::IsRowMajor;\n    typedef internal::CompressedStorage<Scalar,StorageIndex> Storage;\n    enum {\n      Options = _Options\n    };\n\n    typedef typename Base::IndexVector IndexVector;\n    typedef typename Base::ScalarVector ScalarVector;\n  protected:\n    typedef SparseMatrix<Scalar,(Flags&~RowMajorBit)|(IsRowMajor?RowMajorBit:0)> TransposedSparseMatrix;\n\n    Index m_outerSize;\n    Index m_innerSize;\n    StorageIndex* m_outerIndex;\n    StorageIndex* m_innerNonZeros;     // optional, if null then the data is compressed\n    Storage m_data;\n\n  public:\n    \n    /** \\returns the number of rows of the matrix */\n    inline Index rows() const { return IsRowMajor ? m_outerSize : m_innerSize; }\n    /** \\returns the number of columns of the matrix */\n    inline Index cols() const { return IsRowMajor ? m_innerSize : m_outerSize; }\n\n    /** \\returns the number of rows (resp. columns) of the matrix if the storage order column major (resp. row major) */\n    inline Index innerSize() const { return m_innerSize; }\n    /** \\returns the number of columns (resp. rows) of the matrix if the storage order column major (resp. row major) */\n    inline Index outerSize() const { return m_outerSize; }\n    \n    /** \\returns a const pointer to the array of values.\n      * This function is aimed at interoperability with other libraries.\n      * \\sa innerIndexPtr(), outerIndexPtr() */\n    inline const Scalar* valuePtr() const { return m_data.valuePtr(); }\n    /** \\returns a non-const pointer to the array of values.\n      * This function is aimed at interoperability with other libraries.\n      * \\sa innerIndexPtr(), outerIndexPtr() */\n    inline Scalar* valuePtr() { return m_data.valuePtr(); }\n\n    /** \\returns a const pointer to the array of inner indices.\n      * This function is aimed at interoperability with other libraries.\n      * \\sa valuePtr(), outerIndexPtr() */\n    inline const StorageIndex* innerIndexPtr() const { return m_data.indexPtr(); }\n    /** \\returns a non-const pointer to the array of inner indices.\n      * This function is aimed at interoperability with other libraries.\n      * \\sa valuePtr(), outerIndexPtr() */\n    inline StorageIndex* innerIndexPtr() { return m_data.indexPtr(); }\n\n    /** \\returns a const pointer to the array of the starting positions of the inner vectors.\n      * This function is aimed at interoperability with other libraries.\n      * \\sa valuePtr(), innerIndexPtr() */\n    inline const StorageIndex* outerIndexPtr() const { return m_outerIndex; }\n    /** \\returns a non-const pointer to the array of the starting positions of the inner vectors.\n      * This function is aimed at interoperability with other libraries.\n      * \\sa valuePtr(), innerIndexPtr() */\n    inline StorageIndex* outerIndexPtr() { return m_outerIndex; }\n\n    /** \\returns a const pointer to the array of the number of non zeros of the inner vectors.\n      * This function is aimed at interoperability with other libraries.\n      * \\warning it returns the null pointer 0 in compressed mode */\n    inline const StorageIndex* innerNonZeroPtr() const { return m_innerNonZeros; }\n    /** \\returns a non-const pointer to the array of the number of non zeros of the inner vectors.\n      * This function is aimed at interoperability with other libraries.\n      * \\warning it returns the null pointer 0 in compressed mode */\n    inline StorageIndex* innerNonZeroPtr() { return m_innerNonZeros; }\n\n    /** \\internal */\n    inline Storage& data() { return m_data; }\n    /** \\internal */\n    inline const Storage& data() const { return m_data; }\n\n    /** \\returns the value of the matrix at position \\a i, \\a j\n      * This function returns Scalar(0) if the element is an explicit \\em zero */\n    inline Scalar coeff(Index row, Index col) const\n    {\n      eigen_assert(row>=0 && row<rows() && col>=0 && col<cols());\n      \n      const Index outer = IsRowMajor ? row : col;\n      const Index inner = IsRowMajor ? col : row;\n      Index end = m_innerNonZeros ? m_outerIndex[outer] + m_innerNonZeros[outer] : m_outerIndex[outer+1];\n      return m_data.atInRange(m_outerIndex[outer], end, StorageIndex(inner));\n    }\n\n    /** \\returns a non-const reference to the value of the matrix at position \\a i, \\a j\n      *\n      * If the element does not exist then it is inserted via the insert(Index,Index) function\n      * which itself turns the matrix into a non compressed form if that was not the case.\n      *\n      * This is a O(log(nnz_j)) operation (binary search) plus the cost of insert(Index,Index)\n      * function if the element does not already exist.\n      */\n    inline Scalar& coeffRef(Index row, Index col)\n    {\n      eigen_assert(row>=0 && row<rows() && col>=0 && col<cols());\n      \n      const Index outer = IsRowMajor ? row : col;\n      const Index inner = IsRowMajor ? col : row;\n\n      Index start = m_outerIndex[outer];\n      Index end = m_innerNonZeros ? m_outerIndex[outer] + m_innerNonZeros[outer] : m_outerIndex[outer+1];\n      eigen_assert(end>=start && \"you probably called coeffRef on a non finalized matrix\");\n      if(end<=start)\n        return insert(row,col);\n      const Index p = m_data.searchLowerIndex(start,end-1,StorageIndex(inner));\n      if((p<end) && (m_data.index(p)==inner))\n        return m_data.value(p);\n      else\n        return insert(row,col);\n    }\n\n    /** \\returns a reference to a novel non zero coefficient with coordinates \\a row x \\a col.\n      * The non zero coefficient must \\b not already exist.\n      *\n      * If the matrix \\c *this is in compressed mode, then \\c *this is turned into uncompressed\n      * mode while reserving room for 2 x this->innerSize() non zeros if reserve(Index) has not been called earlier.\n      * In this case, the insertion procedure is optimized for a \\e sequential insertion mode where elements are assumed to be\n      * inserted by increasing outer-indices.\n      * \n      * If that's not the case, then it is strongly recommended to either use a triplet-list to assemble the matrix, or to first\n      * call reserve(const SizesType &) to reserve the appropriate number of non-zero elements per inner vector.\n      *\n      * Assuming memory has been appropriately reserved, this function performs a sorted insertion in O(1)\n      * if the elements of each inner vector are inserted in increasing inner index order, and in O(nnz_j) for a random insertion.\n      *\n      */\n    Scalar& insert(Index row, Index col);\n\n  public:\n\n    /** Removes all non zeros but keep allocated memory\n      *\n      * This function does not free the currently allocated memory. To release as much as memory as possible,\n      * call \\code mat.data().squeeze(); \\endcode after resizing it.\n      * \n      * \\sa resize(Index,Index), data()\n      */\n    inline void setZero()\n    {\n      m_data.clear();\n      memset(m_outerIndex, 0, (m_outerSize+1)*sizeof(StorageIndex));\n      if(m_innerNonZeros)\n        memset(m_innerNonZeros, 0, (m_outerSize)*sizeof(StorageIndex));\n    }\n\n    /** Preallocates \\a reserveSize non zeros.\n      *\n      * Precondition: the matrix must be in compressed mode. */\n    inline void reserve(Index reserveSize)\n    {\n      eigen_assert(isCompressed() && \"This function does not make sense in non compressed mode.\");\n      m_data.reserve(reserveSize);\n    }\n    \n    #ifdef EIGEN_PARSED_BY_DOXYGEN\n    /** Preallocates \\a reserveSize[\\c j] non zeros for each column (resp. row) \\c j.\n      *\n      * This function turns the matrix in non-compressed mode.\n      * \n      * The type \\c SizesType must expose the following interface:\n        \\code\n        typedef value_type;\n        const value_type& operator[](i) const;\n        \\endcode\n      * for \\c i in the [0,this->outerSize()[ range.\n      * Typical choices include std::vector<int>, Eigen::VectorXi, Eigen::VectorXi::Constant, etc.\n      */\n    template<class SizesType>\n    inline void reserve(const SizesType& reserveSizes);\n    #else\n    template<class SizesType>\n    inline void reserve(const SizesType& reserveSizes, const typename SizesType::value_type& enableif =\n    #if (!EIGEN_COMP_MSVC) || (EIGEN_COMP_MSVC>=1500) // MSVC 2005 fails to compile with this typename\n        typename\n    #endif\n        SizesType::value_type())\n    {\n      EIGEN_UNUSED_VARIABLE(enableif);\n      reserveInnerVectors(reserveSizes);\n    }\n    #endif // EIGEN_PARSED_BY_DOXYGEN\n  protected:\n    template<class SizesType>\n    inline void reserveInnerVectors(const SizesType& reserveSizes)\n    {\n      if(isCompressed())\n      {\n        Index totalReserveSize = 0;\n        // turn the matrix into non-compressed mode\n        m_innerNonZeros = static_cast<StorageIndex*>(std::malloc(m_outerSize * sizeof(StorageIndex)));\n        if (!m_innerNonZeros) internal::throw_std_bad_alloc();\n        \n        // temporarily use m_innerSizes to hold the new starting points.\n        StorageIndex* newOuterIndex = m_innerNonZeros;\n        \n        StorageIndex count = 0;\n        for(Index j=0; j<m_outerSize; ++j)\n        {\n          newOuterIndex[j] = count;\n          count += reserveSizes[j] + (m_outerIndex[j+1]-m_outerIndex[j]);\n          totalReserveSize += reserveSizes[j];\n        }\n        m_data.reserve(totalReserveSize);\n        StorageIndex previousOuterIndex = m_outerIndex[m_outerSize];\n        for(Index j=m_outerSize-1; j>=0; --j)\n        {\n          StorageIndex innerNNZ = previousOuterIndex - m_outerIndex[j];\n          for(Index i=innerNNZ-1; i>=0; --i)\n          {\n            m_data.index(newOuterIndex[j]+i) = m_data.index(m_outerIndex[j]+i);\n            m_data.value(newOuterIndex[j]+i) = m_data.value(m_outerIndex[j]+i);\n          }\n          previousOuterIndex = m_outerIndex[j];\n          m_outerIndex[j] = newOuterIndex[j];\n          m_innerNonZeros[j] = innerNNZ;\n        }\n        m_outerIndex[m_outerSize] = m_outerIndex[m_outerSize-1] + m_innerNonZeros[m_outerSize-1] + reserveSizes[m_outerSize-1];\n        \n        m_data.resize(m_outerIndex[m_outerSize]);\n      }\n      else\n      {\n        StorageIndex* newOuterIndex = static_cast<StorageIndex*>(std::malloc((m_outerSize+1)*sizeof(StorageIndex)));\n        if (!newOuterIndex) internal::throw_std_bad_alloc();\n        \n        StorageIndex count = 0;\n        for(Index j=0; j<m_outerSize; ++j)\n        {\n          newOuterIndex[j] = count;\n          StorageIndex alreadyReserved = (m_outerIndex[j+1]-m_outerIndex[j]) - m_innerNonZeros[j];\n          StorageIndex toReserve = std::max<StorageIndex>(reserveSizes[j], alreadyReserved);\n          count += toReserve + m_innerNonZeros[j];\n        }\n        newOuterIndex[m_outerSize] = count;\n        \n        m_data.resize(count);\n        for(Index j=m_outerSize-1; j>=0; --j)\n        {\n          Index offset = newOuterIndex[j] - m_outerIndex[j];\n          if(offset>0)\n          {\n            StorageIndex innerNNZ = m_innerNonZeros[j];\n            for(Index i=innerNNZ-1; i>=0; --i)\n            {\n              m_data.index(newOuterIndex[j]+i) = m_data.index(m_outerIndex[j]+i);\n              m_data.value(newOuterIndex[j]+i) = m_data.value(m_outerIndex[j]+i);\n            }\n          }\n        }\n        \n        std::swap(m_outerIndex, newOuterIndex);\n        std::free(newOuterIndex);\n      }\n      \n    }\n  public:\n\n    //--- low level purely coherent filling ---\n\n    /** \\internal\n      * \\returns a reference to the non zero coefficient at position \\a row, \\a col assuming that:\n      * - the nonzero does not already exist\n      * - the new coefficient is the last one according to the storage order\n      *\n      * Before filling a given inner vector you must call the statVec(Index) function.\n      *\n      * After an insertion session, you should call the finalize() function.\n      *\n      * \\sa insert, insertBackByOuterInner, startVec */\n    inline Scalar& insertBack(Index row, Index col)\n    {\n      return insertBackByOuterInner(IsRowMajor?row:col, IsRowMajor?col:row);\n    }\n\n    /** \\internal\n      * \\sa insertBack, startVec */\n    inline Scalar& insertBackByOuterInner(Index outer, Index inner)\n    {\n      eigen_assert(Index(m_outerIndex[outer+1]) == m_data.size() && \"Invalid ordered insertion (invalid outer index)\");\n      eigen_assert( (m_outerIndex[outer+1]-m_outerIndex[outer]==0 || m_data.index(m_data.size()-1)<inner) && \"Invalid ordered insertion (invalid inner index)\");\n      Index p = m_outerIndex[outer+1];\n      ++m_outerIndex[outer+1];\n      m_data.append(Scalar(0), inner);\n      return m_data.value(p);\n    }\n\n    /** \\internal\n      * \\warning use it only if you know what you are doing */\n    inline Scalar& insertBackByOuterInnerUnordered(Index outer, Index inner)\n    {\n      Index p = m_outerIndex[outer+1];\n      ++m_outerIndex[outer+1];\n      m_data.append(Scalar(0), inner);\n      return m_data.value(p);\n    }\n\n    /** \\internal\n      * \\sa insertBack, insertBackByOuterInner */\n    inline void startVec(Index outer)\n    {\n      eigen_assert(m_outerIndex[outer]==Index(m_data.size()) && \"You must call startVec for each inner vector sequentially\");\n      eigen_assert(m_outerIndex[outer+1]==0 && \"You must call startVec for each inner vector sequentially\");\n      m_outerIndex[outer+1] = m_outerIndex[outer];\n    }\n\n    /** \\internal\n      * Must be called after inserting a set of non zero entries using the low level compressed API.\n      */\n    inline void finalize()\n    {\n      if(isCompressed())\n      {\n        StorageIndex size = internal::convert_index<StorageIndex>(m_data.size());\n        Index i = m_outerSize;\n        // find the last filled column\n        while (i>=0 && m_outerIndex[i]==0)\n          --i;\n        ++i;\n        while (i<=m_outerSize)\n        {\n          m_outerIndex[i] = size;\n          ++i;\n        }\n      }\n    }\n\n    //---\n\n    template<typename InputIterators>\n    void setFromTriplets(const InputIterators& begin, const InputIterators& end);\n\n    template<typename InputIterators,typename DupFunctor>\n    void setFromTriplets(const InputIterators& begin, const InputIterators& end, DupFunctor dup_func);\n\n    void sumupDuplicates() { collapseDuplicates(internal::scalar_sum_op<Scalar,Scalar>()); }\n\n    template<typename DupFunctor>\n    void collapseDuplicates(DupFunctor dup_func = DupFunctor());\n\n    //---\n    \n    /** \\internal\n      * same as insert(Index,Index) except that the indices are given relative to the storage order */\n    Scalar& insertByOuterInner(Index j, Index i)\n    {\n      return insert(IsRowMajor ? j : i, IsRowMajor ? i : j);\n    }\n\n    /** Turns the matrix into the \\em compressed format.\n      */\n    void makeCompressed()\n    {\n      if(isCompressed())\n        return;\n      \n      eigen_internal_assert(m_outerIndex!=0 && m_outerSize>0);\n      \n      Index oldStart = m_outerIndex[1];\n      m_outerIndex[1] = m_innerNonZeros[0];\n      for(Index j=1; j<m_outerSize; ++j)\n      {\n        Index nextOldStart = m_outerIndex[j+1];\n        Index offset = oldStart - m_outerIndex[j];\n        if(offset>0)\n        {\n          for(Index k=0; k<m_innerNonZeros[j]; ++k)\n          {\n            m_data.index(m_outerIndex[j]+k) = m_data.index(oldStart+k);\n            m_data.value(m_outerIndex[j]+k) = m_data.value(oldStart+k);\n          }\n        }\n        m_outerIndex[j+1] = m_outerIndex[j] + m_innerNonZeros[j];\n        oldStart = nextOldStart;\n      }\n      std::free(m_innerNonZeros);\n      m_innerNonZeros = 0;\n      m_data.resize(m_outerIndex[m_outerSize]);\n      m_data.squeeze();\n    }\n\n    /** Turns the matrix into the uncompressed mode */\n    void uncompress()\n    {\n      if(m_innerNonZeros != 0)\n        return; \n      m_innerNonZeros = static_cast<StorageIndex*>(std::malloc(m_outerSize * sizeof(StorageIndex)));\n      for (Index i = 0; i < m_outerSize; i++)\n      {\n        m_innerNonZeros[i] = m_outerIndex[i+1] - m_outerIndex[i]; \n      }\n    }\n\n    /** Suppresses all nonzeros which are \\b much \\b smaller \\b than \\a reference under the tolerance \\a epsilon */\n    void prune(const Scalar& reference, const RealScalar& epsilon = NumTraits<RealScalar>::dummy_precision())\n    {\n      prune(default_prunning_func(reference,epsilon));\n    }\n    \n    /** Turns the matrix into compressed format, and suppresses all nonzeros which do not satisfy the predicate \\a keep.\n      * The functor type \\a KeepFunc must implement the following function:\n      * \\code\n      * bool operator() (const Index& row, const Index& col, const Scalar& value) const;\n      * \\endcode\n      * \\sa prune(Scalar,RealScalar)\n      */\n    template<typename KeepFunc>\n    void prune(const KeepFunc& keep = KeepFunc())\n    {\n      // TODO optimize the uncompressed mode to avoid moving and allocating the data twice\n      makeCompressed();\n\n      StorageIndex k = 0;\n      for(Index j=0; j<m_outerSize; ++j)\n      {\n        Index previousStart = m_outerIndex[j];\n        m_outerIndex[j] = k;\n        Index end = m_outerIndex[j+1];\n        for(Index i=previousStart; i<end; ++i)\n        {\n          if(keep(IsRowMajor?j:m_data.index(i), IsRowMajor?m_data.index(i):j, m_data.value(i)))\n          {\n            m_data.value(k) = m_data.value(i);\n            m_data.index(k) = m_data.index(i);\n            ++k;\n          }\n        }\n      }\n      m_outerIndex[m_outerSize] = k;\n      m_data.resize(k,0);\n    }\n\n    /** Resizes the matrix to a \\a rows x \\a cols matrix leaving old values untouched.\n      *\n      * If the sizes of the matrix are decreased, then the matrix is turned to \\b uncompressed-mode\n      * and the storage of the out of bounds coefficients is kept and reserved.\n      * Call makeCompressed() to pack the entries and squeeze extra memory.\n      *\n      * \\sa reserve(), setZero(), makeCompressed()\n      */\n    void conservativeResize(Index rows, Index cols) \n    {\n      // No change\n      if (this->rows() == rows && this->cols() == cols) return;\n      \n      // If one dimension is null, then there is nothing to be preserved\n      if(rows==0 || cols==0) return resize(rows,cols);\n\n      Index innerChange = IsRowMajor ? cols - this->cols() : rows - this->rows();\n      Index outerChange = IsRowMajor ? rows - this->rows() : cols - this->cols();\n      StorageIndex newInnerSize = convert_index(IsRowMajor ? cols : rows);\n\n      // Deals with inner non zeros\n      if (m_innerNonZeros)\n      {\n        // Resize m_innerNonZeros\n        StorageIndex *newInnerNonZeros = static_cast<StorageIndex*>(std::realloc(m_innerNonZeros, (m_outerSize + outerChange) * sizeof(StorageIndex)));\n        if (!newInnerNonZeros) internal::throw_std_bad_alloc();\n        m_innerNonZeros = newInnerNonZeros;\n        \n        for(Index i=m_outerSize; i<m_outerSize+outerChange; i++)          \n          m_innerNonZeros[i] = 0;\n      } \n      else if (innerChange < 0) \n      {\n        // Inner size decreased: allocate a new m_innerNonZeros\n        m_innerNonZeros = static_cast<StorageIndex*>(std::malloc((m_outerSize+outerChange+1) * sizeof(StorageIndex)));\n        if (!m_innerNonZeros) internal::throw_std_bad_alloc();\n        for(Index i = 0; i < m_outerSize; i++)\n          m_innerNonZeros[i] = m_outerIndex[i+1] - m_outerIndex[i];\n      }\n      \n      // Change the m_innerNonZeros in case of a decrease of inner size\n      if (m_innerNonZeros && innerChange < 0)\n      {\n        for(Index i = 0; i < m_outerSize + (std::min)(outerChange, Index(0)); i++)\n        {\n          StorageIndex &n = m_innerNonZeros[i];\n          StorageIndex start = m_outerIndex[i];\n          while (n > 0 && m_data.index(start+n-1) >= newInnerSize) --n; \n        }\n      }\n      \n      m_innerSize = newInnerSize;\n\n      // Re-allocate outer index structure if necessary\n      if (outerChange == 0)\n        return;\n          \n      StorageIndex *newOuterIndex = static_cast<StorageIndex*>(std::realloc(m_outerIndex, (m_outerSize + outerChange + 1) * sizeof(StorageIndex)));\n      if (!newOuterIndex) internal::throw_std_bad_alloc();\n      m_outerIndex = newOuterIndex;\n      if (outerChange > 0)\n      {\n        StorageIndex lastIdx = m_outerSize == 0 ? 0 : m_outerIndex[m_outerSize];\n        for(Index i=m_outerSize; i<m_outerSize+outerChange+1; i++)          \n          m_outerIndex[i] = lastIdx; \n      }\n      m_outerSize += outerChange;\n    }\n    \n    /** Resizes the matrix to a \\a rows x \\a cols matrix and initializes it to zero.\n      * \n      * This function does not free the currently allocated memory. To release as much as memory as possible,\n      * call \\code mat.data().squeeze(); \\endcode after resizing it.\n      * \n      * \\sa reserve(), setZero()\n      */\n    void resize(Index rows, Index cols)\n    {\n      const Index outerSize = IsRowMajor ? rows : cols;\n      m_innerSize = IsRowMajor ? cols : rows;\n      m_data.clear();\n      if (m_outerSize != outerSize || m_outerSize==0)\n      {\n        std::free(m_outerIndex);\n        m_outerIndex = static_cast<StorageIndex*>(std::malloc((outerSize + 1) * sizeof(StorageIndex)));\n        if (!m_outerIndex) internal::throw_std_bad_alloc();\n        \n        m_outerSize = outerSize;\n      }\n      if(m_innerNonZeros)\n      {\n        std::free(m_innerNonZeros);\n        m_innerNonZeros = 0;\n      }\n      memset(m_outerIndex, 0, (m_outerSize+1)*sizeof(StorageIndex));\n    }\n\n    /** \\internal\n      * Resize the nonzero vector to \\a size */\n    void resizeNonZeros(Index size)\n    {\n      m_data.resize(size);\n    }\n\n    /** \\returns a const expression of the diagonal coefficients. */\n    const ConstDiagonalReturnType diagonal() const { return ConstDiagonalReturnType(*this); }\n    \n    /** \\returns a read-write expression of the diagonal coefficients.\n      * \\warning If the diagonal entries are written, then all diagonal\n      * entries \\b must already exist, otherwise an assertion will be raised.\n      */\n    DiagonalReturnType diagonal() { return DiagonalReturnType(*this); }\n\n    /** Default constructor yielding an empty \\c 0 \\c x \\c 0 matrix */\n    inline SparseMatrix()\n      : m_outerSize(-1), m_innerSize(0), m_outerIndex(0), m_innerNonZeros(0)\n    {\n      check_template_parameters();\n      resize(0, 0);\n    }\n\n    /** Constructs a \\a rows \\c x \\a cols empty matrix */\n    inline SparseMatrix(Index rows, Index cols)\n      : m_outerSize(0), m_innerSize(0), m_outerIndex(0), m_innerNonZeros(0)\n    {\n      check_template_parameters();\n      resize(rows, cols);\n    }\n\n    /** Constructs a sparse matrix from the sparse expression \\a other */\n    template<typename OtherDerived>\n    inline SparseMatrix(const SparseMatrixBase<OtherDerived>& other)\n      : m_outerSize(0), m_innerSize(0), m_outerIndex(0), m_innerNonZeros(0)\n    {\n      EIGEN_STATIC_ASSERT((internal::is_same<Scalar, typename OtherDerived::Scalar>::value),\n        YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)\n      check_template_parameters();\n      const bool needToTranspose = (Flags & RowMajorBit) != (internal::evaluator<OtherDerived>::Flags & RowMajorBit);\n      if (needToTranspose)\n        *this = other.derived();\n      else\n      {\n        #ifdef EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN\n          EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN\n        #endif\n        internal::call_assignment_no_alias(*this, other.derived());\n      }\n    }\n    \n    /** Constructs a sparse matrix from the sparse selfadjoint view \\a other */\n    template<typename OtherDerived, unsigned int UpLo>\n    inline SparseMatrix(const SparseSelfAdjointView<OtherDerived, UpLo>& other)\n      : m_outerSize(0), m_innerSize(0), m_outerIndex(0), m_innerNonZeros(0)\n    {\n      check_template_parameters();\n      Base::operator=(other);\n    }\n\n    /** Copy constructor (it performs a deep copy) */\n    inline SparseMatrix(const SparseMatrix& other)\n      : Base(), m_outerSize(0), m_innerSize(0), m_outerIndex(0), m_innerNonZeros(0)\n    {\n      check_template_parameters();\n      *this = other.derived();\n    }\n\n    /** \\brief Copy constructor with in-place evaluation */\n    template<typename OtherDerived>\n    SparseMatrix(const ReturnByValue<OtherDerived>& other)\n      : Base(), m_outerSize(0), m_innerSize(0), m_outerIndex(0), m_innerNonZeros(0)\n    {\n      check_template_parameters();\n      initAssignment(other);\n      other.evalTo(*this);\n    }\n    \n    /** \\brief Copy constructor with in-place evaluation */\n    template<typename OtherDerived>\n    explicit SparseMatrix(const DiagonalBase<OtherDerived>& other)\n      : Base(), m_outerSize(0), m_innerSize(0), m_outerIndex(0), m_innerNonZeros(0)\n    {\n      check_template_parameters();\n      *this = other.derived();\n    }\n\n    /** Swaps the content of two sparse matrices of the same type.\n      * This is a fast operation that simply swaps the underlying pointers and parameters. */\n    inline void swap(SparseMatrix& other)\n    {\n      //EIGEN_DBG_SPARSE(std::cout << \"SparseMatrix:: swap\\n\");\n      std::swap(m_outerIndex, other.m_outerIndex);\n      std::swap(m_innerSize, other.m_innerSize);\n      std::swap(m_outerSize, other.m_outerSize);\n      std::swap(m_innerNonZeros, other.m_innerNonZeros);\n      m_data.swap(other.m_data);\n    }\n\n    /** Sets *this to the identity matrix.\n      * This function also turns the matrix into compressed mode, and drop any reserved memory. */\n    inline void setIdentity()\n    {\n      eigen_assert(rows() == cols() && \"ONLY FOR SQUARED MATRICES\");\n      this->m_data.resize(rows());\n      Eigen::Map<IndexVector>(this->m_data.indexPtr(), rows()).setLinSpaced(0, StorageIndex(rows()-1));\n      Eigen::Map<ScalarVector>(this->m_data.valuePtr(), rows()).setOnes();\n      Eigen::Map<IndexVector>(this->m_outerIndex, rows()+1).setLinSpaced(0, StorageIndex(rows()));\n      std::free(m_innerNonZeros);\n      m_innerNonZeros = 0;\n    }\n    inline SparseMatrix& operator=(const SparseMatrix& other)\n    {\n      if (other.isRValue())\n      {\n        swap(other.const_cast_derived());\n      }\n      else if(this!=&other)\n      {\n        #ifdef EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN\n          EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN\n        #endif\n        initAssignment(other);\n        if(other.isCompressed())\n        {\n          internal::smart_copy(other.m_outerIndex, other.m_outerIndex + m_outerSize + 1, m_outerIndex);\n          m_data = other.m_data;\n        }\n        else\n        {\n          Base::operator=(other);\n        }\n      }\n      return *this;\n    }\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\n    template<typename OtherDerived>\n    inline SparseMatrix& operator=(const EigenBase<OtherDerived>& other)\n    { return Base::operator=(other.derived()); }\n#endif // EIGEN_PARSED_BY_DOXYGEN\n\n    template<typename OtherDerived>\n    EIGEN_DONT_INLINE SparseMatrix& operator=(const SparseMatrixBase<OtherDerived>& other);\n\n    friend std::ostream & operator << (std::ostream & s, const SparseMatrix& m)\n    {\n      EIGEN_DBG_SPARSE(\n        s << \"Nonzero entries:\\n\";\n        if(m.isCompressed())\n        {\n          for (Index i=0; i<m.nonZeros(); ++i)\n            s << \"(\" << m.m_data.value(i) << \",\" << m.m_data.index(i) << \") \";\n        }\n        else\n        {\n          for (Index i=0; i<m.outerSize(); ++i)\n          {\n            Index p = m.m_outerIndex[i];\n            Index pe = m.m_outerIndex[i]+m.m_innerNonZeros[i];\n            Index k=p;\n            for (; k<pe; ++k) {\n              s << \"(\" << m.m_data.value(k) << \",\" << m.m_data.index(k) << \") \";\n            }\n            for (; k<m.m_outerIndex[i+1]; ++k) {\n              s << \"(_,_) \";\n            }\n          }\n        }\n        s << std::endl;\n        s << std::endl;\n        s << \"Outer pointers:\\n\";\n        for (Index i=0; i<m.outerSize(); ++i) {\n          s << m.m_outerIndex[i] << \" \";\n        }\n        s << \" $\" << std::endl;\n        if(!m.isCompressed())\n        {\n          s << \"Inner non zeros:\\n\";\n          for (Index i=0; i<m.outerSize(); ++i) {\n            s << m.m_innerNonZeros[i] << \" \";\n          }\n          s << \" $\" << std::endl;\n        }\n        s << std::endl;\n      );\n      s << static_cast<const SparseMatrixBase<SparseMatrix>&>(m);\n      return s;\n    }\n\n    /** Destructor */\n    inline ~SparseMatrix()\n    {\n      std::free(m_outerIndex);\n      std::free(m_innerNonZeros);\n    }\n\n    /** Overloaded for performance */\n    Scalar sum() const;\n    \n#   ifdef EIGEN_SPARSEMATRIX_PLUGIN\n#     include EIGEN_SPARSEMATRIX_PLUGIN\n#   endif\n\nprotected:\n\n    template<typename Other>\n    void initAssignment(const Other& other)\n    {\n      resize(other.rows(), other.cols());\n      if(m_innerNonZeros)\n      {\n        std::free(m_innerNonZeros);\n        m_innerNonZeros = 0;\n      }\n    }\n\n    /** \\internal\n      * \\sa insert(Index,Index) */\n    EIGEN_DONT_INLINE Scalar& insertCompressed(Index row, Index col);\n\n    /** \\internal\n      * A vector object that is equal to 0 everywhere but v at the position i */\n    class SingletonVector\n    {\n        StorageIndex m_index;\n        StorageIndex m_value;\n      public:\n        typedef StorageIndex value_type;\n        SingletonVector(Index i, Index v)\n          : m_index(convert_index(i)), m_value(convert_index(v))\n        {}\n\n        StorageIndex operator[](Index i) const { return i==m_index ? m_value : 0; }\n    };\n\n    /** \\internal\n      * \\sa insert(Index,Index) */\n    EIGEN_DONT_INLINE Scalar& insertUncompressed(Index row, Index col);\n\npublic:\n    /** \\internal\n      * \\sa insert(Index,Index) */\n    EIGEN_STRONG_INLINE Scalar& insertBackUncompressed(Index row, Index col)\n    {\n      const Index outer = IsRowMajor ? row : col;\n      const Index inner = IsRowMajor ? col : row;\n\n      eigen_assert(!isCompressed());\n      eigen_assert(m_innerNonZeros[outer]<=(m_outerIndex[outer+1] - m_outerIndex[outer]));\n\n      Index p = m_outerIndex[outer] + m_innerNonZeros[outer]++;\n      m_data.index(p) = convert_index(inner);\n      return (m_data.value(p) = Scalar(0));\n    }\nprotected:\n    struct IndexPosPair {\n      IndexPosPair(Index a_i, Index a_p) : i(a_i), p(a_p) {}\n      Index i;\n      Index p;\n    };\n\n    /** \\internal assign \\a diagXpr to the diagonal of \\c *this\n      * There are different strategies:\n      *   1 - if *this is overwritten (Func==assign_op) or *this is empty, then we can work treat *this as a dense vector expression.\n      *   2 - otherwise, for each diagonal coeff,\n      *     2.a - if it already exists, then we update it,\n      *     2.b - otherwise, if *this is uncompressed and that the current inner-vector has empty room for at least 1 element, then we perform an in-place insertion.\n      *     2.c - otherwise, we'll have to reallocate and copy everything, so instead of doing so for each new element, it is recorded in a std::vector.\n      *   3 - at the end, if some entries failed to be inserted in-place, then we alloc a new buffer, copy each chunk at the right position, and insert the new elements.\n      * \n      * TODO: some piece of code could be isolated and reused for a general in-place update strategy.\n      * TODO: if we start to defer the insertion of some elements (i.e., case 2.c executed once),\n      *       then it *might* be better to disable case 2.b since they will have to be copied anyway.\n      */\n    template<typename DiagXpr, typename Func>\n    void assignDiagonal(const DiagXpr diagXpr, const Func& assignFunc)\n    {\n      Index n = diagXpr.size();\n\n      const bool overwrite = internal::is_same<Func, internal::assign_op<Scalar,Scalar> >::value;\n      if(overwrite)\n      {\n        if((this->rows()!=n) || (this->cols()!=n))\n          this->resize(n, n);\n      }\n\n      if(m_data.size()==0 || overwrite)\n      {\n        typedef Array<StorageIndex,Dynamic,1> ArrayXI;  \n        this->makeCompressed();\n        this->resizeNonZeros(n);\n        Eigen::Map<ArrayXI>(this->innerIndexPtr(), n).setLinSpaced(0,StorageIndex(n)-1);\n        Eigen::Map<ArrayXI>(this->outerIndexPtr(), n+1).setLinSpaced(0,StorageIndex(n));\n        Eigen::Map<Array<Scalar,Dynamic,1> > values = this->coeffs();\n        values.setZero();\n        internal::call_assignment_no_alias(values, diagXpr, assignFunc);\n      }\n      else\n      {\n        bool isComp = isCompressed();\n        internal::evaluator<DiagXpr> diaEval(diagXpr);\n        std::vector<IndexPosPair> newEntries;\n\n        // 1 - try in-place update and record insertion failures\n        for(Index i = 0; i<n; ++i)\n        {\n          internal::LowerBoundIndex lb = this->lower_bound(i,i);\n          Index p = lb.value;\n          if(lb.found)\n          {\n            // the coeff already exists\n            assignFunc.assignCoeff(m_data.value(p), diaEval.coeff(i));\n          }\n          else if((!isComp) && m_innerNonZeros[i] < (m_outerIndex[i+1]-m_outerIndex[i]))\n          {\n            // non compressed mode with local room for inserting one element\n            m_data.moveChunk(p, p+1, m_outerIndex[i]+m_innerNonZeros[i]-p);\n            m_innerNonZeros[i]++;\n            m_data.value(p) = Scalar(0);\n            m_data.index(p) = StorageIndex(i);\n            assignFunc.assignCoeff(m_data.value(p), diaEval.coeff(i));\n          }\n          else\n          {\n            // defer insertion\n            newEntries.push_back(IndexPosPair(i,p));\n          }\n        }\n        // 2 - insert deferred entries\n        Index n_entries = Index(newEntries.size());\n        if(n_entries>0)\n        {\n          Storage newData(m_data.size()+n_entries);\n          Index prev_p = 0;\n          Index prev_i = 0;\n          for(Index k=0; k<n_entries;++k)\n          {\n            Index i = newEntries[k].i;\n            Index p = newEntries[k].p;\n            internal::smart_copy(m_data.valuePtr()+prev_p, m_data.valuePtr()+p, newData.valuePtr()+prev_p+k);\n            internal::smart_copy(m_data.indexPtr()+prev_p, m_data.indexPtr()+p, newData.indexPtr()+prev_p+k);\n            for(Index j=prev_i;j<i;++j)\n              m_outerIndex[j+1] += k;\n            if(!isComp)\n              m_innerNonZeros[i]++;\n            prev_p = p;\n            prev_i = i;\n            newData.value(p+k) = Scalar(0);\n            newData.index(p+k) = StorageIndex(i);\n            assignFunc.assignCoeff(newData.value(p+k), diaEval.coeff(i));\n          }\n          {\n            internal::smart_copy(m_data.valuePtr()+prev_p, m_data.valuePtr()+m_data.size(), newData.valuePtr()+prev_p+n_entries);\n            internal::smart_copy(m_data.indexPtr()+prev_p, m_data.indexPtr()+m_data.size(), newData.indexPtr()+prev_p+n_entries);\n            for(Index j=prev_i+1;j<=m_outerSize;++j)\n              m_outerIndex[j] += n_entries;\n          }\n          m_data.swap(newData);\n        }\n      }\n    }\n\nprivate:\n  static void check_template_parameters()\n  {\n    EIGEN_STATIC_ASSERT(NumTraits<StorageIndex>::IsSigned,THE_INDEX_TYPE_MUST_BE_A_SIGNED_TYPE);\n    EIGEN_STATIC_ASSERT((Options&(ColMajor|RowMajor))==Options,INVALID_MATRIX_TEMPLATE_PARAMETERS);\n  }\n\n  struct default_prunning_func {\n    default_prunning_func(const Scalar& ref, const RealScalar& eps) : reference(ref), epsilon(eps) {}\n    inline bool operator() (const Index&, const Index&, const Scalar& value) const\n    {\n      return !internal::isMuchSmallerThan(value, reference, epsilon);\n    }\n    Scalar reference;\n    RealScalar epsilon;\n  };\n};\n\nnamespace internal {\n\ntemplate<typename InputIterator, typename SparseMatrixType, typename DupFunctor>\nvoid set_from_triplets(const InputIterator& begin, const InputIterator& end, SparseMatrixType& mat, DupFunctor dup_func)\n{\n  enum { IsRowMajor = SparseMatrixType::IsRowMajor };\n  typedef typename SparseMatrixType::Scalar Scalar;\n  typedef typename SparseMatrixType::StorageIndex StorageIndex;\n  SparseMatrix<Scalar,IsRowMajor?ColMajor:RowMajor,StorageIndex> trMat(mat.rows(),mat.cols());\n\n  if(begin!=end)\n  {\n    // pass 1: count the nnz per inner-vector\n    typename SparseMatrixType::IndexVector wi(trMat.outerSize());\n    wi.setZero();\n    for(InputIterator it(begin); it!=end; ++it)\n    {\n      eigen_assert(it->row()>=0 && it->row()<mat.rows() && it->col()>=0 && it->col()<mat.cols());\n      wi(IsRowMajor ? it->col() : it->row())++;\n    }\n\n    // pass 2: insert all the elements into trMat\n    trMat.reserve(wi);\n    for(InputIterator it(begin); it!=end; ++it)\n      trMat.insertBackUncompressed(it->row(),it->col()) = it->value();\n\n    // pass 3:\n    trMat.collapseDuplicates(dup_func);\n  }\n\n  // pass 4: transposed copy -> implicit sorting\n  mat = trMat;\n}\n\n}\n\n\n/** Fill the matrix \\c *this with the list of \\em triplets defined by the iterator range \\a begin - \\a end.\n  *\n  * A \\em triplet is a tuple (i,j,value) defining a non-zero element.\n  * The input list of triplets does not have to be sorted, and can contains duplicated elements.\n  * In any case, the result is a \\b sorted and \\b compressed sparse matrix where the duplicates have been summed up.\n  * This is a \\em O(n) operation, with \\em n the number of triplet elements.\n  * The initial contents of \\c *this is destroyed.\n  * The matrix \\c *this must be properly resized beforehand using the SparseMatrix(Index,Index) constructor,\n  * or the resize(Index,Index) method. The sizes are not extracted from the triplet list.\n  *\n  * The \\a InputIterators value_type must provide the following interface:\n  * \\code\n  * Scalar value() const; // the value\n  * Scalar row() const;   // the row index i\n  * Scalar col() const;   // the column index j\n  * \\endcode\n  * See for instance the Eigen::Triplet template class.\n  *\n  * Here is a typical usage example:\n  * \\code\n    typedef Triplet<double> T;\n    std::vector<T> tripletList;\n    triplets.reserve(estimation_of_entries);\n    for(...)\n    {\n      // ...\n      tripletList.push_back(T(i,j,v_ij));\n    }\n    SparseMatrixType m(rows,cols);\n    m.setFromTriplets(tripletList.begin(), tripletList.end());\n    // m is ready to go!\n  * \\endcode\n  *\n  * \\warning The list of triplets is read multiple times (at least twice). Therefore, it is not recommended to define\n  * an abstract iterator over a complex data-structure that would be expensive to evaluate. The triplets should rather\n  * be explicitly stored into a std::vector for instance.\n  */\ntemplate<typename Scalar, int _Options, typename _StorageIndex>\ntemplate<typename InputIterators>\nvoid SparseMatrix<Scalar,_Options,_StorageIndex>::setFromTriplets(const InputIterators& begin, const InputIterators& end)\n{\n  internal::set_from_triplets<InputIterators, SparseMatrix<Scalar,_Options,_StorageIndex> >(begin, end, *this, internal::scalar_sum_op<Scalar,Scalar>());\n}\n\n/** The same as setFromTriplets but when duplicates are met the functor \\a dup_func is applied:\n  * \\code\n  * value = dup_func(OldValue, NewValue)\n  * \\endcode \n  * Here is a C++11 example keeping the latest entry only:\n  * \\code\n  * mat.setFromTriplets(triplets.begin(), triplets.end(), [] (const Scalar&,const Scalar &b) { return b; });\n  * \\endcode\n  */\ntemplate<typename Scalar, int _Options, typename _StorageIndex>\ntemplate<typename InputIterators,typename DupFunctor>\nvoid SparseMatrix<Scalar,_Options,_StorageIndex>::setFromTriplets(const InputIterators& begin, const InputIterators& end, DupFunctor dup_func)\n{\n  internal::set_from_triplets<InputIterators, SparseMatrix<Scalar,_Options,_StorageIndex>, DupFunctor>(begin, end, *this, dup_func);\n}\n\n/** \\internal */\ntemplate<typename Scalar, int _Options, typename _StorageIndex>\ntemplate<typename DupFunctor>\nvoid SparseMatrix<Scalar,_Options,_StorageIndex>::collapseDuplicates(DupFunctor dup_func)\n{\n  eigen_assert(!isCompressed());\n  // TODO, in practice we should be able to use m_innerNonZeros for that task\n  IndexVector wi(innerSize());\n  wi.fill(-1);\n  StorageIndex count = 0;\n  // for each inner-vector, wi[inner_index] will hold the position of first element into the index/value buffers\n  for(Index j=0; j<outerSize(); ++j)\n  {\n    StorageIndex start   = count;\n    Index oldEnd  = m_outerIndex[j]+m_innerNonZeros[j];\n    for(Index k=m_outerIndex[j]; k<oldEnd; ++k)\n    {\n      Index i = m_data.index(k);\n      if(wi(i)>=start)\n      {\n        // we already meet this entry => accumulate it\n        m_data.value(wi(i)) = dup_func(m_data.value(wi(i)), m_data.value(k));\n      }\n      else\n      {\n        m_data.value(count) = m_data.value(k);\n        m_data.index(count) = m_data.index(k);\n        wi(i) = count;\n        ++count;\n      }\n    }\n    m_outerIndex[j] = start;\n  }\n  m_outerIndex[m_outerSize] = count;\n\n  // turn the matrix into compressed form\n  std::free(m_innerNonZeros);\n  m_innerNonZeros = 0;\n  m_data.resize(m_outerIndex[m_outerSize]);\n}\n\ntemplate<typename Scalar, int _Options, typename _StorageIndex>\ntemplate<typename OtherDerived>\nEIGEN_DONT_INLINE SparseMatrix<Scalar,_Options,_StorageIndex>& SparseMatrix<Scalar,_Options,_StorageIndex>::operator=(const SparseMatrixBase<OtherDerived>& other)\n{\n  EIGEN_STATIC_ASSERT((internal::is_same<Scalar, typename OtherDerived::Scalar>::value),\n        YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)\n\n  #ifdef EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN\n    EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN\n  #endif\n      \n  const bool needToTranspose = (Flags & RowMajorBit) != (internal::evaluator<OtherDerived>::Flags & RowMajorBit);\n  if (needToTranspose)\n  {\n    #ifdef EIGEN_SPARSE_TRANSPOSED_COPY_PLUGIN\n      EIGEN_SPARSE_TRANSPOSED_COPY_PLUGIN\n    #endif\n    // two passes algorithm:\n    //  1 - compute the number of coeffs per dest inner vector\n    //  2 - do the actual copy/eval\n    // Since each coeff of the rhs has to be evaluated twice, let's evaluate it if needed\n    typedef typename internal::nested_eval<OtherDerived,2,typename internal::plain_matrix_type<OtherDerived>::type >::type OtherCopy;\n    typedef typename internal::remove_all<OtherCopy>::type _OtherCopy;\n    typedef internal::evaluator<_OtherCopy> OtherCopyEval;\n    OtherCopy otherCopy(other.derived());\n    OtherCopyEval otherCopyEval(otherCopy);\n\n    SparseMatrix dest(other.rows(),other.cols());\n    Eigen::Map<IndexVector> (dest.m_outerIndex,dest.outerSize()).setZero();\n\n    // pass 1\n    // FIXME the above copy could be merged with that pass\n    for (Index j=0; j<otherCopy.outerSize(); ++j)\n      for (typename OtherCopyEval::InnerIterator it(otherCopyEval, j); it; ++it)\n        ++dest.m_outerIndex[it.index()];\n\n    // prefix sum\n    StorageIndex count = 0;\n    IndexVector positions(dest.outerSize());\n    for (Index j=0; j<dest.outerSize(); ++j)\n    {\n      StorageIndex tmp = dest.m_outerIndex[j];\n      dest.m_outerIndex[j] = count;\n      positions[j] = count;\n      count += tmp;\n    }\n    dest.m_outerIndex[dest.outerSize()] = count;\n    // alloc\n    dest.m_data.resize(count);\n    // pass 2\n    for (StorageIndex j=0; j<otherCopy.outerSize(); ++j)\n    {\n      for (typename OtherCopyEval::InnerIterator it(otherCopyEval, j); it; ++it)\n      {\n        Index pos = positions[it.index()]++;\n        dest.m_data.index(pos) = j;\n        dest.m_data.value(pos) = it.value();\n      }\n    }\n    this->swap(dest);\n    return *this;\n  }\n  else\n  {\n    if(other.isRValue())\n    {\n      initAssignment(other.derived());\n    }\n    // there is no special optimization\n    return Base::operator=(other.derived());\n  }\n}\n\ntemplate<typename _Scalar, int _Options, typename _StorageIndex>\ntypename SparseMatrix<_Scalar,_Options,_StorageIndex>::Scalar& SparseMatrix<_Scalar,_Options,_StorageIndex>::insert(Index row, Index col)\n{\n  eigen_assert(row>=0 && row<rows() && col>=0 && col<cols());\n  \n  const Index outer = IsRowMajor ? row : col;\n  const Index inner = IsRowMajor ? col : row;\n  \n  if(isCompressed())\n  {\n    if(nonZeros()==0)\n    {\n      // reserve space if not already done\n      if(m_data.allocatedSize()==0)\n        m_data.reserve(2*m_innerSize);\n      \n      // turn the matrix into non-compressed mode\n      m_innerNonZeros = static_cast<StorageIndex*>(std::malloc(m_outerSize * sizeof(StorageIndex)));\n      if(!m_innerNonZeros) internal::throw_std_bad_alloc();\n      \n      memset(m_innerNonZeros, 0, (m_outerSize)*sizeof(StorageIndex));\n      \n      // pack all inner-vectors to the end of the pre-allocated space\n      // and allocate the entire free-space to the first inner-vector\n      StorageIndex end = convert_index(m_data.allocatedSize());\n      for(Index j=1; j<=m_outerSize; ++j)\n        m_outerIndex[j] = end;\n    }\n    else\n    {\n      // turn the matrix into non-compressed mode\n      m_innerNonZeros = static_cast<StorageIndex*>(std::malloc(m_outerSize * sizeof(StorageIndex)));\n      if(!m_innerNonZeros) internal::throw_std_bad_alloc();\n      for(Index j=0; j<m_outerSize; ++j)\n        m_innerNonZeros[j] = m_outerIndex[j+1]-m_outerIndex[j];\n    }\n  }\n  \n  // check whether we can do a fast \"push back\" insertion\n  Index data_end = m_data.allocatedSize();\n  \n  // First case: we are filling a new inner vector which is packed at the end.\n  // We assume that all remaining inner-vectors are also empty and packed to the end.\n  if(m_outerIndex[outer]==data_end)\n  {\n    eigen_internal_assert(m_innerNonZeros[outer]==0);\n    \n    // pack previous empty inner-vectors to end of the used-space\n    // and allocate the entire free-space to the current inner-vector.\n    StorageIndex p = convert_index(m_data.size());\n    Index j = outer;\n    while(j>=0 && m_innerNonZeros[j]==0)\n      m_outerIndex[j--] = p;\n    \n    // push back the new element\n    ++m_innerNonZeros[outer];\n    m_data.append(Scalar(0), inner);\n    \n    // check for reallocation\n    if(data_end != m_data.allocatedSize())\n    {\n      // m_data has been reallocated\n      //  -> move remaining inner-vectors back to the end of the free-space\n      //     so that the entire free-space is allocated to the current inner-vector.\n      eigen_internal_assert(data_end < m_data.allocatedSize());\n      StorageIndex new_end = convert_index(m_data.allocatedSize());\n      for(Index k=outer+1; k<=m_outerSize; ++k)\n        if(m_outerIndex[k]==data_end)\n          m_outerIndex[k] = new_end;\n    }\n    return m_data.value(p);\n  }\n  \n  // Second case: the next inner-vector is packed to the end\n  // and the current inner-vector end match the used-space.\n  if(m_outerIndex[outer+1]==data_end && m_outerIndex[outer]+m_innerNonZeros[outer]==m_data.size())\n  {\n    eigen_internal_assert(outer+1==m_outerSize || m_innerNonZeros[outer+1]==0);\n    \n    // add space for the new element\n    ++m_innerNonZeros[outer];\n    m_data.resize(m_data.size()+1);\n    \n    // check for reallocation\n    if(data_end != m_data.allocatedSize())\n    {\n      // m_data has been reallocated\n      //  -> move remaining inner-vectors back to the end of the free-space\n      //     so that the entire free-space is allocated to the current inner-vector.\n      eigen_internal_assert(data_end < m_data.allocatedSize());\n      StorageIndex new_end = convert_index(m_data.allocatedSize());\n      for(Index k=outer+1; k<=m_outerSize; ++k)\n        if(m_outerIndex[k]==data_end)\n          m_outerIndex[k] = new_end;\n    }\n    \n    // and insert it at the right position (sorted insertion)\n    Index startId = m_outerIndex[outer];\n    Index p = m_outerIndex[outer]+m_innerNonZeros[outer]-1;\n    while ( (p > startId) && (m_data.index(p-1) > inner) )\n    {\n      m_data.index(p) = m_data.index(p-1);\n      m_data.value(p) = m_data.value(p-1);\n      --p;\n    }\n    \n    m_data.index(p) = convert_index(inner);\n    return (m_data.value(p) = Scalar(0));\n  }\n  \n  if(m_data.size() != m_data.allocatedSize())\n  {\n    // make sure the matrix is compatible to random un-compressed insertion:\n    m_data.resize(m_data.allocatedSize());\n    this->reserveInnerVectors(Array<StorageIndex,Dynamic,1>::Constant(m_outerSize, 2));\n  }\n  \n  return insertUncompressed(row,col);\n}\n    \ntemplate<typename _Scalar, int _Options, typename _StorageIndex>\nEIGEN_DONT_INLINE typename SparseMatrix<_Scalar,_Options,_StorageIndex>::Scalar& SparseMatrix<_Scalar,_Options,_StorageIndex>::insertUncompressed(Index row, Index col)\n{\n  eigen_assert(!isCompressed());\n\n  const Index outer = IsRowMajor ? row : col;\n  const StorageIndex inner = convert_index(IsRowMajor ? col : row);\n\n  Index room = m_outerIndex[outer+1] - m_outerIndex[outer];\n  StorageIndex innerNNZ = m_innerNonZeros[outer];\n  if(innerNNZ>=room)\n  {\n    // this inner vector is full, we need to reallocate the whole buffer :(\n    reserve(SingletonVector(outer,std::max<StorageIndex>(2,innerNNZ)));\n  }\n\n  Index startId = m_outerIndex[outer];\n  Index p = startId + m_innerNonZeros[outer];\n  while ( (p > startId) && (m_data.index(p-1) > inner) )\n  {\n    m_data.index(p) = m_data.index(p-1);\n    m_data.value(p) = m_data.value(p-1);\n    --p;\n  }\n  eigen_assert((p<=startId || m_data.index(p-1)!=inner) && \"you cannot insert an element that already exists, you must call coeffRef to this end\");\n\n  m_innerNonZeros[outer]++;\n\n  m_data.index(p) = inner;\n  return (m_data.value(p) = Scalar(0));\n}\n\ntemplate<typename _Scalar, int _Options, typename _StorageIndex>\nEIGEN_DONT_INLINE typename SparseMatrix<_Scalar,_Options,_StorageIndex>::Scalar& SparseMatrix<_Scalar,_Options,_StorageIndex>::insertCompressed(Index row, Index col)\n{\n  eigen_assert(isCompressed());\n\n  const Index outer = IsRowMajor ? row : col;\n  const Index inner = IsRowMajor ? col : row;\n\n  Index previousOuter = outer;\n  if (m_outerIndex[outer+1]==0)\n  {\n    // we start a new inner vector\n    while (previousOuter>=0 && m_outerIndex[previousOuter]==0)\n    {\n      m_outerIndex[previousOuter] = convert_index(m_data.size());\n      --previousOuter;\n    }\n    m_outerIndex[outer+1] = m_outerIndex[outer];\n  }\n\n  // here we have to handle the tricky case where the outerIndex array\n  // starts with: [ 0 0 0 0 0 1 ...] and we are inserted in, e.g.,\n  // the 2nd inner vector...\n  bool isLastVec = (!(previousOuter==-1 && m_data.size()!=0))\n                && (std::size_t(m_outerIndex[outer+1]) == m_data.size());\n\n  std::size_t startId = m_outerIndex[outer];\n  // FIXME let's make sure sizeof(long int) == sizeof(std::size_t)\n  std::size_t p = m_outerIndex[outer+1];\n  ++m_outerIndex[outer+1];\n\n  double reallocRatio = 1;\n  if (m_data.allocatedSize()<=m_data.size())\n  {\n    // if there is no preallocated memory, let's reserve a minimum of 32 elements\n    if (m_data.size()==0)\n    {\n      m_data.reserve(32);\n    }\n    else\n    {\n      // we need to reallocate the data, to reduce multiple reallocations\n      // we use a smart resize algorithm based on the current filling ratio\n      // in addition, we use double to avoid integers overflows\n      double nnzEstimate = double(m_outerIndex[outer])*double(m_outerSize)/double(outer+1);\n      reallocRatio = (nnzEstimate-double(m_data.size()))/double(m_data.size());\n      // furthermore we bound the realloc ratio to:\n      //   1) reduce multiple minor realloc when the matrix is almost filled\n      //   2) avoid to allocate too much memory when the matrix is almost empty\n      reallocRatio = (std::min)((std::max)(reallocRatio,1.5),8.);\n    }\n  }\n  m_data.resize(m_data.size()+1,reallocRatio);\n\n  if (!isLastVec)\n  {\n    if (previousOuter==-1)\n    {\n      // oops wrong guess.\n      // let's correct the outer offsets\n      for (Index k=0; k<=(outer+1); ++k)\n        m_outerIndex[k] = 0;\n      Index k=outer+1;\n      while(m_outerIndex[k]==0)\n        m_outerIndex[k++] = 1;\n      while (k<=m_outerSize && m_outerIndex[k]!=0)\n        m_outerIndex[k++]++;\n      p = 0;\n      --k;\n      k = m_outerIndex[k]-1;\n      while (k>0)\n      {\n        m_data.index(k) = m_data.index(k-1);\n        m_data.value(k) = m_data.value(k-1);\n        k--;\n      }\n    }\n    else\n    {\n      // we are not inserting into the last inner vec\n      // update outer indices:\n      Index j = outer+2;\n      while (j<=m_outerSize && m_outerIndex[j]!=0)\n        m_outerIndex[j++]++;\n      --j;\n      // shift data of last vecs:\n      Index k = m_outerIndex[j]-1;\n      while (k>=Index(p))\n      {\n        m_data.index(k) = m_data.index(k-1);\n        m_data.value(k) = m_data.value(k-1);\n        k--;\n      }\n    }\n  }\n\n  while ( (p > startId) && (m_data.index(p-1) > inner) )\n  {\n    m_data.index(p) = m_data.index(p-1);\n    m_data.value(p) = m_data.value(p-1);\n    --p;\n  }\n\n  m_data.index(p) = inner;\n  return (m_data.value(p) = Scalar(0));\n}\n\nnamespace internal {\n\ntemplate<typename _Scalar, int _Options, typename _StorageIndex>\nstruct evaluator<SparseMatrix<_Scalar,_Options,_StorageIndex> >\n  : evaluator<SparseCompressedBase<SparseMatrix<_Scalar,_Options,_StorageIndex> > >\n{\n  typedef evaluator<SparseCompressedBase<SparseMatrix<_Scalar,_Options,_StorageIndex> > > Base;\n  typedef SparseMatrix<_Scalar,_Options,_StorageIndex> SparseMatrixType;\n  evaluator() : Base() {}\n  explicit evaluator(const SparseMatrixType &mat) : Base(mat) {}\n};\n\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_SPARSEMATRIX_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseCore/SparseMatrixBase.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPARSEMATRIXBASE_H\n#define EIGEN_SPARSEMATRIXBASE_H\n\nnamespace Eigen { \n\n/** \\ingroup SparseCore_Module\n  *\n  * \\class SparseMatrixBase\n  *\n  * \\brief Base class of any sparse matrices or sparse expressions\n  *\n  * \\tparam Derived is the derived type, e.g. a sparse matrix type, or an expression, etc.\n  *\n  * This class can be extended with the help of the plugin mechanism described on the page\n  * \\ref TopicCustomizing_Plugins by defining the preprocessor symbol \\c EIGEN_SPARSEMATRIXBASE_PLUGIN.\n  */\ntemplate<typename Derived> class SparseMatrixBase\n  : public EigenBase<Derived>\n{\n  public:\n\n    typedef typename internal::traits<Derived>::Scalar Scalar;\n    \n    /** The numeric type of the expression' coefficients, e.g. float, double, int or std::complex<float>, etc.\n      *\n      * It is an alias for the Scalar type */\n    typedef Scalar value_type;\n    \n    typedef typename internal::packet_traits<Scalar>::type PacketScalar;\n    typedef typename internal::traits<Derived>::StorageKind StorageKind;\n\n    /** The integer type used to \\b store indices within a SparseMatrix.\n      * For a \\c SparseMatrix<Scalar,Options,IndexType> it an alias of the third template parameter \\c IndexType. */\n    typedef typename internal::traits<Derived>::StorageIndex StorageIndex;\n\n    typedef typename internal::add_const_on_value_type_if_arithmetic<\n                         typename internal::packet_traits<Scalar>::type\n                     >::type PacketReturnType;\n\n    typedef SparseMatrixBase StorageBaseType;\n\n    typedef Matrix<StorageIndex,Dynamic,1> IndexVector;\n    typedef Matrix<Scalar,Dynamic,1> ScalarVector;\n    \n    template<typename OtherDerived>\n    Derived& operator=(const EigenBase<OtherDerived> &other);\n\n    enum {\n\n      RowsAtCompileTime = internal::traits<Derived>::RowsAtCompileTime,\n        /**< The number of rows at compile-time. This is just a copy of the value provided\n          * by the \\a Derived type. If a value is not known at compile-time,\n          * it is set to the \\a Dynamic constant.\n          * \\sa MatrixBase::rows(), MatrixBase::cols(), ColsAtCompileTime, SizeAtCompileTime */\n\n      ColsAtCompileTime = internal::traits<Derived>::ColsAtCompileTime,\n        /**< The number of columns at compile-time. This is just a copy of the value provided\n          * by the \\a Derived type. If a value is not known at compile-time,\n          * it is set to the \\a Dynamic constant.\n          * \\sa MatrixBase::rows(), MatrixBase::cols(), RowsAtCompileTime, SizeAtCompileTime */\n\n\n      SizeAtCompileTime = (internal::size_at_compile_time<internal::traits<Derived>::RowsAtCompileTime,\n                                                   internal::traits<Derived>::ColsAtCompileTime>::ret),\n        /**< This is equal to the number of coefficients, i.e. the number of\n          * rows times the number of columns, or to \\a Dynamic if this is not\n          * known at compile-time. \\sa RowsAtCompileTime, ColsAtCompileTime */\n\n      MaxRowsAtCompileTime = RowsAtCompileTime,\n      MaxColsAtCompileTime = ColsAtCompileTime,\n\n      MaxSizeAtCompileTime = (internal::size_at_compile_time<MaxRowsAtCompileTime,\n                                                      MaxColsAtCompileTime>::ret),\n\n      IsVectorAtCompileTime = RowsAtCompileTime == 1 || ColsAtCompileTime == 1,\n        /**< This is set to true if either the number of rows or the number of\n          * columns is known at compile-time to be equal to 1. Indeed, in that case,\n          * we are dealing with a column-vector (if there is only one column) or with\n          * a row-vector (if there is only one row). */\n\n      NumDimensions = int(MaxSizeAtCompileTime) == 1 ? 0 : bool(IsVectorAtCompileTime) ? 1 : 2,\n        /**< This value is equal to Tensor::NumDimensions, i.e. 0 for scalars, 1 for vectors,\n         * and 2 for matrices.\n         */\n\n      Flags = internal::traits<Derived>::Flags,\n        /**< This stores expression \\ref flags flags which may or may not be inherited by new expressions\n          * constructed from this one. See the \\ref flags \"list of flags\".\n          */\n\n      IsRowMajor = Flags&RowMajorBit ? 1 : 0,\n      \n      InnerSizeAtCompileTime = int(IsVectorAtCompileTime) ? int(SizeAtCompileTime)\n                             : int(IsRowMajor) ? int(ColsAtCompileTime) : int(RowsAtCompileTime),\n\n      #ifndef EIGEN_PARSED_BY_DOXYGEN\n      _HasDirectAccess = (int(Flags)&DirectAccessBit) ? 1 : 0 // workaround sunCC\n      #endif\n    };\n\n    /** \\internal the return type of MatrixBase::adjoint() */\n    typedef typename internal::conditional<NumTraits<Scalar>::IsComplex,\n                        CwiseUnaryOp<internal::scalar_conjugate_op<Scalar>, Eigen::Transpose<const Derived> >,\n                        Transpose<const Derived>\n                     >::type AdjointReturnType;\n    typedef Transpose<Derived> TransposeReturnType;\n    typedef typename internal::add_const<Transpose<const Derived> >::type ConstTransposeReturnType;\n\n    // FIXME storage order do not match evaluator storage order\n    typedef SparseMatrix<Scalar, Flags&RowMajorBit ? RowMajor : ColMajor, StorageIndex> PlainObject;\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\n    /** This is the \"real scalar\" type; if the \\a Scalar type is already real numbers\n      * (e.g. int, float or double) then \\a RealScalar is just the same as \\a Scalar. If\n      * \\a Scalar is \\a std::complex<T> then RealScalar is \\a T.\n      *\n      * \\sa class NumTraits\n      */\n    typedef typename NumTraits<Scalar>::Real RealScalar;\n\n    /** \\internal the return type of coeff()\n      */\n    typedef typename internal::conditional<_HasDirectAccess, const Scalar&, Scalar>::type CoeffReturnType;\n\n    /** \\internal Represents a matrix with all coefficients equal to one another*/\n    typedef CwiseNullaryOp<internal::scalar_constant_op<Scalar>,Matrix<Scalar,Dynamic,Dynamic> > ConstantReturnType;\n\n    /** type of the equivalent dense matrix */\n    typedef Matrix<Scalar,RowsAtCompileTime,ColsAtCompileTime> DenseMatrixType;\n    /** type of the equivalent square matrix */\n    typedef Matrix<Scalar,EIGEN_SIZE_MAX(RowsAtCompileTime,ColsAtCompileTime),\n                          EIGEN_SIZE_MAX(RowsAtCompileTime,ColsAtCompileTime)> SquareMatrixType;\n\n    inline const Derived& derived() const { return *static_cast<const Derived*>(this); }\n    inline Derived& derived() { return *static_cast<Derived*>(this); }\n    inline Derived& const_cast_derived() const\n    { return *static_cast<Derived*>(const_cast<SparseMatrixBase*>(this)); }\n\n    typedef EigenBase<Derived> Base;\n\n#endif // not EIGEN_PARSED_BY_DOXYGEN\n\n#define EIGEN_CURRENT_STORAGE_BASE_CLASS Eigen::SparseMatrixBase\n#ifdef EIGEN_PARSED_BY_DOXYGEN\n#define EIGEN_DOC_UNARY_ADDONS(METHOD,OP)           /** <p>This method does not change the sparsity of \\c *this: the OP is applied to explicitly stored coefficients only. \\sa SparseCompressedBase::coeffs() </p> */\n#define EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL      /** <p> \\warning This method returns a read-only expression for any sparse matrices. \\sa \\ref TutorialSparse_SubMatrices \"Sparse block operations\" </p> */\n#define EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(COND) /** <p> \\warning This method returns a read-write expression for COND sparse matrices only. Otherwise, the returned expression is read-only. \\sa \\ref TutorialSparse_SubMatrices \"Sparse block operations\" </p> */\n#else\n#define EIGEN_DOC_UNARY_ADDONS(X,Y)\n#define EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL\n#define EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(COND)\n#endif\n#   include \"../plugins/CommonCwiseUnaryOps.h\"\n#   include \"../plugins/CommonCwiseBinaryOps.h\"\n#   include \"../plugins/MatrixCwiseUnaryOps.h\"\n#   include \"../plugins/MatrixCwiseBinaryOps.h\"\n#   include \"../plugins/BlockMethods.h\"\n#   ifdef EIGEN_SPARSEMATRIXBASE_PLUGIN\n#     include EIGEN_SPARSEMATRIXBASE_PLUGIN\n#   endif\n#undef EIGEN_CURRENT_STORAGE_BASE_CLASS\n#undef EIGEN_DOC_UNARY_ADDONS\n#undef EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL\n#undef EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF\n\n    /** \\returns the number of rows. \\sa cols() */\n    inline Index rows() const { return derived().rows(); }\n    /** \\returns the number of columns. \\sa rows() */\n    inline Index cols() const { return derived().cols(); }\n    /** \\returns the number of coefficients, which is \\a rows()*cols().\n      * \\sa rows(), cols(). */\n    inline Index size() const { return rows() * cols(); }\n    /** \\returns true if either the number of rows or the number of columns is equal to 1.\n      * In other words, this function returns\n      * \\code rows()==1 || cols()==1 \\endcode\n      * \\sa rows(), cols(), IsVectorAtCompileTime. */\n    inline bool isVector() const { return rows()==1 || cols()==1; }\n    /** \\returns the size of the storage major dimension,\n      * i.e., the number of columns for a columns major matrix, and the number of rows otherwise */\n    Index outerSize() const { return (int(Flags)&RowMajorBit) ? this->rows() : this->cols(); }\n    /** \\returns the size of the inner dimension according to the storage order,\n      * i.e., the number of rows for a columns major matrix, and the number of cols otherwise */\n    Index innerSize() const { return (int(Flags)&RowMajorBit) ? this->cols() : this->rows(); }\n\n    bool isRValue() const { return m_isRValue; }\n    Derived& markAsRValue() { m_isRValue = true; return derived(); }\n\n    SparseMatrixBase() : m_isRValue(false) { /* TODO check flags */ }\n\n    \n    template<typename OtherDerived>\n    Derived& operator=(const ReturnByValue<OtherDerived>& other);\n\n    template<typename OtherDerived>\n    inline Derived& operator=(const SparseMatrixBase<OtherDerived>& other);\n\n    inline Derived& operator=(const Derived& other);\n\n  protected:\n\n    template<typename OtherDerived>\n    inline Derived& assign(const OtherDerived& other);\n\n    template<typename OtherDerived>\n    inline void assignGeneric(const OtherDerived& other);\n\n  public:\n\n    friend std::ostream & operator << (std::ostream & s, const SparseMatrixBase& m)\n    {\n      typedef typename Derived::Nested Nested;\n      typedef typename internal::remove_all<Nested>::type NestedCleaned;\n\n      if (Flags&RowMajorBit)\n      {\n        Nested nm(m.derived());\n        internal::evaluator<NestedCleaned> thisEval(nm);\n        for (Index row=0; row<nm.outerSize(); ++row)\n        {\n          Index col = 0;\n          for (typename internal::evaluator<NestedCleaned>::InnerIterator it(thisEval, row); it; ++it)\n          {\n            for ( ; col<it.index(); ++col)\n              s << \"0 \";\n            s << it.value() << \" \";\n            ++col;\n          }\n          for ( ; col<m.cols(); ++col)\n            s << \"0 \";\n          s << std::endl;\n        }\n      }\n      else\n      {\n        Nested nm(m.derived());\n        internal::evaluator<NestedCleaned> thisEval(nm);\n        if (m.cols() == 1) {\n          Index row = 0;\n          for (typename internal::evaluator<NestedCleaned>::InnerIterator it(thisEval, 0); it; ++it)\n          {\n            for ( ; row<it.index(); ++row)\n              s << \"0\" << std::endl;\n            s << it.value() << std::endl;\n            ++row;\n          }\n          for ( ; row<m.rows(); ++row)\n            s << \"0\" << std::endl;\n        }\n        else\n        {\n          SparseMatrix<Scalar, RowMajorBit, StorageIndex> trans = m;\n          s << static_cast<const SparseMatrixBase<SparseMatrix<Scalar, RowMajorBit, StorageIndex> >&>(trans);\n        }\n      }\n      return s;\n    }\n\n    template<typename OtherDerived>\n    Derived& operator+=(const SparseMatrixBase<OtherDerived>& other);\n    template<typename OtherDerived>\n    Derived& operator-=(const SparseMatrixBase<OtherDerived>& other);\n    \n    template<typename OtherDerived>\n    Derived& operator+=(const DiagonalBase<OtherDerived>& other);\n    template<typename OtherDerived>\n    Derived& operator-=(const DiagonalBase<OtherDerived>& other);\n\n    template<typename OtherDerived>\n    Derived& operator+=(const EigenBase<OtherDerived> &other);\n    template<typename OtherDerived>\n    Derived& operator-=(const EigenBase<OtherDerived> &other);\n\n    Derived& operator*=(const Scalar& other);\n    Derived& operator/=(const Scalar& other);\n\n    template<typename OtherDerived> struct CwiseProductDenseReturnType {\n      typedef CwiseBinaryOp<internal::scalar_product_op<typename ScalarBinaryOpTraits<\n                                                          typename internal::traits<Derived>::Scalar,\n                                                          typename internal::traits<OtherDerived>::Scalar\n                                                        >::ReturnType>,\n                            const Derived,\n                            const OtherDerived\n                          > Type;\n    };\n\n    template<typename OtherDerived>\n    EIGEN_STRONG_INLINE const typename CwiseProductDenseReturnType<OtherDerived>::Type\n    cwiseProduct(const MatrixBase<OtherDerived> &other) const;\n\n    // sparse * diagonal\n    template<typename OtherDerived>\n    const Product<Derived,OtherDerived>\n    operator*(const DiagonalBase<OtherDerived> &other) const\n    { return Product<Derived,OtherDerived>(derived(), other.derived()); }\n\n    // diagonal * sparse\n    template<typename OtherDerived> friend\n    const Product<OtherDerived,Derived>\n    operator*(const DiagonalBase<OtherDerived> &lhs, const SparseMatrixBase& rhs)\n    { return Product<OtherDerived,Derived>(lhs.derived(), rhs.derived()); }\n    \n    // sparse * sparse\n    template<typename OtherDerived>\n    const Product<Derived,OtherDerived,AliasFreeProduct>\n    operator*(const SparseMatrixBase<OtherDerived> &other) const;\n    \n    // sparse * dense\n    template<typename OtherDerived>\n    const Product<Derived,OtherDerived>\n    operator*(const MatrixBase<OtherDerived> &other) const\n    { return Product<Derived,OtherDerived>(derived(), other.derived()); }\n    \n    // dense * sparse\n    template<typename OtherDerived> friend\n    const Product<OtherDerived,Derived>\n    operator*(const MatrixBase<OtherDerived> &lhs, const SparseMatrixBase& rhs)\n    { return Product<OtherDerived,Derived>(lhs.derived(), rhs.derived()); }\n    \n     /** \\returns an expression of P H P^-1 where H is the matrix represented by \\c *this */\n    SparseSymmetricPermutationProduct<Derived,Upper|Lower> twistedBy(const PermutationMatrix<Dynamic,Dynamic,StorageIndex>& perm) const\n    {\n      return SparseSymmetricPermutationProduct<Derived,Upper|Lower>(derived(), perm);\n    }\n\n    template<typename OtherDerived>\n    Derived& operator*=(const SparseMatrixBase<OtherDerived>& other);\n\n    template<int Mode>\n    inline const TriangularView<const Derived, Mode> triangularView() const;\n    \n    template<unsigned int UpLo> struct SelfAdjointViewReturnType { typedef SparseSelfAdjointView<Derived, UpLo> Type; };\n    template<unsigned int UpLo> struct ConstSelfAdjointViewReturnType { typedef const SparseSelfAdjointView<const Derived, UpLo> Type; };\n\n    template<unsigned int UpLo> inline \n    typename ConstSelfAdjointViewReturnType<UpLo>::Type selfadjointView() const;\n    template<unsigned int UpLo> inline\n    typename SelfAdjointViewReturnType<UpLo>::Type selfadjointView();\n\n    template<typename OtherDerived> Scalar dot(const MatrixBase<OtherDerived>& other) const;\n    template<typename OtherDerived> Scalar dot(const SparseMatrixBase<OtherDerived>& other) const;\n    RealScalar squaredNorm() const;\n    RealScalar norm()  const;\n    RealScalar blueNorm() const;\n\n    TransposeReturnType transpose() { return TransposeReturnType(derived()); }\n    const ConstTransposeReturnType transpose() const { return ConstTransposeReturnType(derived()); }\n    const AdjointReturnType adjoint() const { return AdjointReturnType(transpose()); }\n\n    DenseMatrixType toDense() const\n    {\n      return DenseMatrixType(derived());\n    }\n\n    template<typename OtherDerived>\n    bool isApprox(const SparseMatrixBase<OtherDerived>& other,\n                  const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const;\n\n    template<typename OtherDerived>\n    bool isApprox(const MatrixBase<OtherDerived>& other,\n                  const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const\n    { return toDense().isApprox(other,prec); }\n\n    /** \\returns the matrix or vector obtained by evaluating this expression.\n      *\n      * Notice that in the case of a plain matrix or vector (not an expression) this function just returns\n      * a const reference, in order to avoid a useless copy.\n      */\n    inline const typename internal::eval<Derived>::type eval() const\n    { return typename internal::eval<Derived>::type(derived()); }\n\n    Scalar sum() const;\n    \n    inline const SparseView<Derived>\n    pruned(const Scalar& reference = Scalar(0), const RealScalar& epsilon = NumTraits<Scalar>::dummy_precision()) const;\n\n  protected:\n\n    bool m_isRValue;\n\n    static inline StorageIndex convert_index(const Index idx) {\n      return internal::convert_index<StorageIndex>(idx);\n    }\n  private:\n    template<typename Dest> void evalTo(Dest &) const;\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_SPARSEMATRIXBASE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseCore/SparsePermutation.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPARSE_PERMUTATION_H\n#define EIGEN_SPARSE_PERMUTATION_H\n\n// This file implements sparse * permutation products\n\nnamespace Eigen { \n\nnamespace internal {\n\ntemplate<typename ExpressionType, int Side, bool Transposed>\nstruct permutation_matrix_product<ExpressionType, Side, Transposed, SparseShape>\n{\n    typedef typename nested_eval<ExpressionType, 1>::type MatrixType;\n    typedef typename remove_all<MatrixType>::type MatrixTypeCleaned;\n\n    typedef typename MatrixTypeCleaned::Scalar Scalar;\n    typedef typename MatrixTypeCleaned::StorageIndex StorageIndex;\n\n    enum {\n      SrcStorageOrder = MatrixTypeCleaned::Flags&RowMajorBit ? RowMajor : ColMajor,\n      MoveOuter = SrcStorageOrder==RowMajor ? Side==OnTheLeft : Side==OnTheRight\n    };\n    \n    typedef typename internal::conditional<MoveOuter,\n        SparseMatrix<Scalar,SrcStorageOrder,StorageIndex>,\n        SparseMatrix<Scalar,int(SrcStorageOrder)==RowMajor?ColMajor:RowMajor,StorageIndex> >::type ReturnType;\n\n    template<typename Dest,typename PermutationType>\n    static inline void run(Dest& dst, const PermutationType& perm, const ExpressionType& xpr)\n    {\n      MatrixType mat(xpr);\n      if(MoveOuter)\n      {\n        SparseMatrix<Scalar,SrcStorageOrder,StorageIndex> tmp(mat.rows(), mat.cols());\n        Matrix<StorageIndex,Dynamic,1> sizes(mat.outerSize());\n        for(Index j=0; j<mat.outerSize(); ++j)\n        {\n          Index jp = perm.indices().coeff(j);\n          sizes[((Side==OnTheLeft) ^ Transposed) ? jp : j] = StorageIndex(mat.innerVector(((Side==OnTheRight) ^ Transposed) ? jp : j).nonZeros());\n        }\n        tmp.reserve(sizes);\n        for(Index j=0; j<mat.outerSize(); ++j)\n        {\n          Index jp = perm.indices().coeff(j);\n          Index jsrc = ((Side==OnTheRight) ^ Transposed) ? jp : j;\n          Index jdst = ((Side==OnTheLeft) ^ Transposed) ? jp : j;\n          for(typename MatrixTypeCleaned::InnerIterator it(mat,jsrc); it; ++it)\n            tmp.insertByOuterInner(jdst,it.index()) = it.value();\n        }\n        dst = tmp;\n      }\n      else\n      {\n        SparseMatrix<Scalar,int(SrcStorageOrder)==RowMajor?ColMajor:RowMajor,StorageIndex> tmp(mat.rows(), mat.cols());\n        Matrix<StorageIndex,Dynamic,1> sizes(tmp.outerSize());\n        sizes.setZero();\n        PermutationMatrix<Dynamic,Dynamic,StorageIndex> perm_cpy;\n        if((Side==OnTheLeft) ^ Transposed)\n          perm_cpy = perm;\n        else\n          perm_cpy = perm.transpose();\n\n        for(Index j=0; j<mat.outerSize(); ++j)\n          for(typename MatrixTypeCleaned::InnerIterator it(mat,j); it; ++it)\n            sizes[perm_cpy.indices().coeff(it.index())]++;\n        tmp.reserve(sizes);\n        for(Index j=0; j<mat.outerSize(); ++j)\n          for(typename MatrixTypeCleaned::InnerIterator it(mat,j); it; ++it)\n            tmp.insertByOuterInner(perm_cpy.indices().coeff(it.index()),j) = it.value();\n        dst = tmp;\n      }\n    }\n};\n\n}\n\nnamespace internal {\n\ntemplate <int ProductTag> struct product_promote_storage_type<Sparse,             PermutationStorage, ProductTag> { typedef Sparse ret; };\ntemplate <int ProductTag> struct product_promote_storage_type<PermutationStorage, Sparse,             ProductTag> { typedef Sparse ret; };\n\n// TODO, the following two overloads are only needed to define the right temporary type through \n// typename traits<permutation_sparse_matrix_product<Rhs,Lhs,OnTheRight,false> >::ReturnType\n// whereas it should be correctly handled by traits<Product<> >::PlainObject\n\ntemplate<typename Lhs, typename Rhs, int ProductTag>\nstruct product_evaluator<Product<Lhs, Rhs, AliasFreeProduct>, ProductTag, PermutationShape, SparseShape>\n  : public evaluator<typename permutation_matrix_product<Rhs,OnTheLeft,false,SparseShape>::ReturnType>\n{\n  typedef Product<Lhs, Rhs, AliasFreeProduct> XprType;\n  typedef typename permutation_matrix_product<Rhs,OnTheLeft,false,SparseShape>::ReturnType PlainObject;\n  typedef evaluator<PlainObject> Base;\n\n  enum {\n    Flags = Base::Flags | EvalBeforeNestingBit\n  };\n\n  explicit product_evaluator(const XprType& xpr)\n    : m_result(xpr.rows(), xpr.cols())\n  {\n    ::new (static_cast<Base*>(this)) Base(m_result);\n    generic_product_impl<Lhs, Rhs, PermutationShape, SparseShape, ProductTag>::evalTo(m_result, xpr.lhs(), xpr.rhs());\n  }\n\nprotected:\n  PlainObject m_result;\n};\n\ntemplate<typename Lhs, typename Rhs, int ProductTag>\nstruct product_evaluator<Product<Lhs, Rhs, AliasFreeProduct>, ProductTag, SparseShape, PermutationShape >\n  : public evaluator<typename permutation_matrix_product<Lhs,OnTheRight,false,SparseShape>::ReturnType>\n{\n  typedef Product<Lhs, Rhs, AliasFreeProduct> XprType;\n  typedef typename permutation_matrix_product<Lhs,OnTheRight,false,SparseShape>::ReturnType PlainObject;\n  typedef evaluator<PlainObject> Base;\n\n  enum {\n    Flags = Base::Flags | EvalBeforeNestingBit\n  };\n\n  explicit product_evaluator(const XprType& xpr)\n    : m_result(xpr.rows(), xpr.cols())\n  {\n    ::new (static_cast<Base*>(this)) Base(m_result);\n    generic_product_impl<Lhs, Rhs, SparseShape, PermutationShape, ProductTag>::evalTo(m_result, xpr.lhs(), xpr.rhs());\n  }\n\nprotected:\n  PlainObject m_result;\n};\n\n} // end namespace internal\n\n/** \\returns the matrix with the permutation applied to the columns\n  */\ntemplate<typename SparseDerived, typename PermDerived>\ninline const Product<SparseDerived, PermDerived, AliasFreeProduct>\noperator*(const SparseMatrixBase<SparseDerived>& matrix, const PermutationBase<PermDerived>& perm)\n{ return Product<SparseDerived, PermDerived, AliasFreeProduct>(matrix.derived(), perm.derived()); }\n\n/** \\returns the matrix with the permutation applied to the rows\n  */\ntemplate<typename SparseDerived, typename PermDerived>\ninline const Product<PermDerived, SparseDerived, AliasFreeProduct>\noperator*( const PermutationBase<PermDerived>& perm, const SparseMatrixBase<SparseDerived>& matrix)\n{ return  Product<PermDerived, SparseDerived, AliasFreeProduct>(perm.derived(), matrix.derived()); }\n\n\n/** \\returns the matrix with the inverse permutation applied to the columns.\n  */\ntemplate<typename SparseDerived, typename PermutationType>\ninline const Product<SparseDerived, Inverse<PermutationType>, AliasFreeProduct>\noperator*(const SparseMatrixBase<SparseDerived>& matrix, const InverseImpl<PermutationType, PermutationStorage>& tperm)\n{\n  return Product<SparseDerived, Inverse<PermutationType>, AliasFreeProduct>(matrix.derived(), tperm.derived());\n}\n\n/** \\returns the matrix with the inverse permutation applied to the rows.\n  */\ntemplate<typename SparseDerived, typename PermutationType>\ninline const Product<Inverse<PermutationType>, SparseDerived, AliasFreeProduct>\noperator*(const InverseImpl<PermutationType,PermutationStorage>& tperm, const SparseMatrixBase<SparseDerived>& matrix)\n{\n  return Product<Inverse<PermutationType>, SparseDerived, AliasFreeProduct>(tperm.derived(), matrix.derived());\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_SPARSE_SELFADJOINTVIEW_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseCore/SparseProduct.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2015 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPARSEPRODUCT_H\n#define EIGEN_SPARSEPRODUCT_H\n\nnamespace Eigen { \n\n/** \\returns an expression of the product of two sparse matrices.\n  * By default a conservative product preserving the symbolic non zeros is performed.\n  * The automatic pruning of the small values can be achieved by calling the pruned() function\n  * in which case a totally different product algorithm is employed:\n  * \\code\n  * C = (A*B).pruned();             // suppress numerical zeros (exact)\n  * C = (A*B).pruned(ref);\n  * C = (A*B).pruned(ref,epsilon);\n  * \\endcode\n  * where \\c ref is a meaningful non zero reference value.\n  * */\ntemplate<typename Derived>\ntemplate<typename OtherDerived>\ninline const Product<Derived,OtherDerived,AliasFreeProduct>\nSparseMatrixBase<Derived>::operator*(const SparseMatrixBase<OtherDerived> &other) const\n{\n  return Product<Derived,OtherDerived,AliasFreeProduct>(derived(), other.derived());\n}\n\nnamespace internal {\n\n// sparse * sparse\ntemplate<typename Lhs, typename Rhs, int ProductType>\nstruct generic_product_impl<Lhs, Rhs, SparseShape, SparseShape, ProductType>\n{\n  template<typename Dest>\n  static void evalTo(Dest& dst, const Lhs& lhs, const Rhs& rhs)\n  {\n    evalTo(dst, lhs, rhs, typename evaluator_traits<Dest>::Shape());\n  }\n\n  // dense += sparse * sparse\n  template<typename Dest,typename ActualLhs>\n  static void addTo(Dest& dst, const ActualLhs& lhs, const Rhs& rhs, typename enable_if<is_same<typename evaluator_traits<Dest>::Shape,DenseShape>::value,int*>::type* = 0)\n  {\n    typedef typename nested_eval<ActualLhs,Dynamic>::type LhsNested;\n    typedef typename nested_eval<Rhs,Dynamic>::type RhsNested;\n    LhsNested lhsNested(lhs);\n    RhsNested rhsNested(rhs);\n    internal::sparse_sparse_to_dense_product_selector<typename remove_all<LhsNested>::type,\n                                                      typename remove_all<RhsNested>::type, Dest>::run(lhsNested,rhsNested,dst);\n  }\n\n  // dense -= sparse * sparse\n  template<typename Dest>\n  static void subTo(Dest& dst, const Lhs& lhs, const Rhs& rhs, typename enable_if<is_same<typename evaluator_traits<Dest>::Shape,DenseShape>::value,int*>::type* = 0)\n  {\n    addTo(dst, -lhs, rhs);\n  }\n\nprotected:\n\n  // sparse = sparse * sparse\n  template<typename Dest>\n  static void evalTo(Dest& dst, const Lhs& lhs, const Rhs& rhs, SparseShape)\n  {\n    typedef typename nested_eval<Lhs,Dynamic>::type LhsNested;\n    typedef typename nested_eval<Rhs,Dynamic>::type RhsNested;\n    LhsNested lhsNested(lhs);\n    RhsNested rhsNested(rhs);\n    internal::conservative_sparse_sparse_product_selector<typename remove_all<LhsNested>::type,\n                                                          typename remove_all<RhsNested>::type, Dest>::run(lhsNested,rhsNested,dst);\n  }\n\n  // dense = sparse * sparse\n  template<typename Dest>\n  static void evalTo(Dest& dst, const Lhs& lhs, const Rhs& rhs, DenseShape)\n  {\n    dst.setZero();\n    addTo(dst, lhs, rhs);\n  }\n};\n\n// sparse * sparse-triangular\ntemplate<typename Lhs, typename Rhs, int ProductType>\nstruct generic_product_impl<Lhs, Rhs, SparseShape, SparseTriangularShape, ProductType>\n : public generic_product_impl<Lhs, Rhs, SparseShape, SparseShape, ProductType>\n{};\n\n// sparse-triangular * sparse\ntemplate<typename Lhs, typename Rhs, int ProductType>\nstruct generic_product_impl<Lhs, Rhs, SparseTriangularShape, SparseShape, ProductType>\n : public generic_product_impl<Lhs, Rhs, SparseShape, SparseShape, ProductType>\n{};\n\n// dense = sparse-product (can be sparse*sparse, sparse*perm, etc.)\ntemplate< typename DstXprType, typename Lhs, typename Rhs>\nstruct Assignment<DstXprType, Product<Lhs,Rhs,AliasFreeProduct>, internal::assign_op<typename DstXprType::Scalar,typename Product<Lhs,Rhs,AliasFreeProduct>::Scalar>, Sparse2Dense>\n{\n  typedef Product<Lhs,Rhs,AliasFreeProduct> SrcXprType;\n  static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op<typename DstXprType::Scalar,typename SrcXprType::Scalar> &)\n  {\n    Index dstRows = src.rows();\n    Index dstCols = src.cols();\n    if((dst.rows()!=dstRows) || (dst.cols()!=dstCols))\n      dst.resize(dstRows, dstCols);\n    \n    generic_product_impl<Lhs, Rhs>::evalTo(dst,src.lhs(),src.rhs());\n  }\n};\n\n// dense += sparse-product (can be sparse*sparse, sparse*perm, etc.)\ntemplate< typename DstXprType, typename Lhs, typename Rhs>\nstruct Assignment<DstXprType, Product<Lhs,Rhs,AliasFreeProduct>, internal::add_assign_op<typename DstXprType::Scalar,typename Product<Lhs,Rhs,AliasFreeProduct>::Scalar>, Sparse2Dense>\n{\n  typedef Product<Lhs,Rhs,AliasFreeProduct> SrcXprType;\n  static void run(DstXprType &dst, const SrcXprType &src, const internal::add_assign_op<typename DstXprType::Scalar,typename SrcXprType::Scalar> &)\n  {\n    generic_product_impl<Lhs, Rhs>::addTo(dst,src.lhs(),src.rhs());\n  }\n};\n\n// dense -= sparse-product (can be sparse*sparse, sparse*perm, etc.)\ntemplate< typename DstXprType, typename Lhs, typename Rhs>\nstruct Assignment<DstXprType, Product<Lhs,Rhs,AliasFreeProduct>, internal::sub_assign_op<typename DstXprType::Scalar,typename Product<Lhs,Rhs,AliasFreeProduct>::Scalar>, Sparse2Dense>\n{\n  typedef Product<Lhs,Rhs,AliasFreeProduct> SrcXprType;\n  static void run(DstXprType &dst, const SrcXprType &src, const internal::sub_assign_op<typename DstXprType::Scalar,typename SrcXprType::Scalar> &)\n  {\n    generic_product_impl<Lhs, Rhs>::subTo(dst,src.lhs(),src.rhs());\n  }\n};\n\ntemplate<typename Lhs, typename Rhs, int Options>\nstruct unary_evaluator<SparseView<Product<Lhs, Rhs, Options> >, IteratorBased>\n : public evaluator<typename Product<Lhs, Rhs, DefaultProduct>::PlainObject>\n{\n  typedef SparseView<Product<Lhs, Rhs, Options> > XprType;\n  typedef typename XprType::PlainObject PlainObject;\n  typedef evaluator<PlainObject> Base;\n\n  explicit unary_evaluator(const XprType& xpr)\n    : m_result(xpr.rows(), xpr.cols())\n  {\n    using std::abs;\n    ::new (static_cast<Base*>(this)) Base(m_result);\n    typedef typename nested_eval<Lhs,Dynamic>::type LhsNested;\n    typedef typename nested_eval<Rhs,Dynamic>::type RhsNested;\n    LhsNested lhsNested(xpr.nestedExpression().lhs());\n    RhsNested rhsNested(xpr.nestedExpression().rhs());\n\n    internal::sparse_sparse_product_with_pruning_selector<typename remove_all<LhsNested>::type,\n                                                          typename remove_all<RhsNested>::type, PlainObject>::run(lhsNested,rhsNested,m_result,\n                                                                                                                  abs(xpr.reference())*xpr.epsilon());\n  }\n\nprotected:\n  PlainObject m_result;\n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_SPARSEPRODUCT_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseCore/SparseRedux.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPARSEREDUX_H\n#define EIGEN_SPARSEREDUX_H\n\nnamespace Eigen { \n\ntemplate<typename Derived>\ntypename internal::traits<Derived>::Scalar\nSparseMatrixBase<Derived>::sum() const\n{\n  eigen_assert(rows()>0 && cols()>0 && \"you are using a non initialized matrix\");\n  Scalar res(0);\n  internal::evaluator<Derived> thisEval(derived());\n  for (Index j=0; j<outerSize(); ++j)\n    for (typename internal::evaluator<Derived>::InnerIterator iter(thisEval,j); iter; ++iter)\n      res += iter.value();\n  return res;\n}\n\ntemplate<typename _Scalar, int _Options, typename _Index>\ntypename internal::traits<SparseMatrix<_Scalar,_Options,_Index> >::Scalar\nSparseMatrix<_Scalar,_Options,_Index>::sum() const\n{\n  eigen_assert(rows()>0 && cols()>0 && \"you are using a non initialized matrix\");\n  if(this->isCompressed())\n    return Matrix<Scalar,1,Dynamic>::Map(m_data.valuePtr(), m_data.size()).sum();\n  else\n    return Base::sum();\n}\n\ntemplate<typename _Scalar, int _Options, typename _Index>\ntypename internal::traits<SparseVector<_Scalar,_Options, _Index> >::Scalar\nSparseVector<_Scalar,_Options,_Index>::sum() const\n{\n  eigen_assert(rows()>0 && cols()>0 && \"you are using a non initialized matrix\");\n  return Matrix<Scalar,1,Dynamic>::Map(m_data.valuePtr(), m_data.size()).sum();\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_SPARSEREDUX_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseCore/SparseRef.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPARSE_REF_H\n#define EIGEN_SPARSE_REF_H\n\nnamespace Eigen {\n\nenum {\n  StandardCompressedFormat = 2 /**< used by Ref<SparseMatrix> to specify whether the input storage must be in standard compressed form */\n};\n  \nnamespace internal {\n\ntemplate<typename Derived> class SparseRefBase;\n\ntemplate<typename MatScalar, int MatOptions, typename MatIndex, int _Options, typename _StrideType>\nstruct traits<Ref<SparseMatrix<MatScalar,MatOptions,MatIndex>, _Options, _StrideType> >\n  : public traits<SparseMatrix<MatScalar,MatOptions,MatIndex> >\n{\n  typedef SparseMatrix<MatScalar,MatOptions,MatIndex> PlainObjectType;\n  enum {\n    Options = _Options,\n    Flags = traits<PlainObjectType>::Flags | CompressedAccessBit | NestByRefBit\n  };\n\n  template<typename Derived> struct match {\n    enum {\n      StorageOrderMatch = PlainObjectType::IsVectorAtCompileTime || Derived::IsVectorAtCompileTime || ((PlainObjectType::Flags&RowMajorBit)==(Derived::Flags&RowMajorBit)),\n      MatchAtCompileTime = (Derived::Flags&CompressedAccessBit) && StorageOrderMatch\n    };\n    typedef typename internal::conditional<MatchAtCompileTime,internal::true_type,internal::false_type>::type type;\n  };\n  \n};\n\ntemplate<typename MatScalar, int MatOptions, typename MatIndex, int _Options, typename _StrideType>\nstruct traits<Ref<const SparseMatrix<MatScalar,MatOptions,MatIndex>, _Options, _StrideType> >\n  : public traits<Ref<SparseMatrix<MatScalar,MatOptions,MatIndex>, _Options, _StrideType> >\n{\n  enum {\n    Flags = (traits<SparseMatrix<MatScalar,MatOptions,MatIndex> >::Flags | CompressedAccessBit | NestByRefBit) & ~LvalueBit\n  };\n};\n\ntemplate<typename MatScalar, int MatOptions, typename MatIndex, int _Options, typename _StrideType>\nstruct traits<Ref<SparseVector<MatScalar,MatOptions,MatIndex>, _Options, _StrideType> >\n  : public traits<SparseVector<MatScalar,MatOptions,MatIndex> >\n{\n  typedef SparseVector<MatScalar,MatOptions,MatIndex> PlainObjectType;\n  enum {\n    Options = _Options,\n    Flags = traits<PlainObjectType>::Flags | CompressedAccessBit | NestByRefBit\n  };\n\n  template<typename Derived> struct match {\n    enum {\n      MatchAtCompileTime = (Derived::Flags&CompressedAccessBit) && Derived::IsVectorAtCompileTime\n    };\n    typedef typename internal::conditional<MatchAtCompileTime,internal::true_type,internal::false_type>::type type;\n  };\n\n};\n\ntemplate<typename MatScalar, int MatOptions, typename MatIndex, int _Options, typename _StrideType>\nstruct traits<Ref<const SparseVector<MatScalar,MatOptions,MatIndex>, _Options, _StrideType> >\n  : public traits<Ref<SparseVector<MatScalar,MatOptions,MatIndex>, _Options, _StrideType> >\n{\n  enum {\n    Flags = (traits<SparseVector<MatScalar,MatOptions,MatIndex> >::Flags | CompressedAccessBit | NestByRefBit) & ~LvalueBit\n  };\n};\n\ntemplate<typename Derived>\nstruct traits<SparseRefBase<Derived> > : public traits<Derived> {};\n\ntemplate<typename Derived> class SparseRefBase\n  : public SparseMapBase<Derived>\n{\npublic:\n\n  typedef SparseMapBase<Derived> Base;\n  EIGEN_SPARSE_PUBLIC_INTERFACE(SparseRefBase)\n\n  SparseRefBase()\n    : Base(RowsAtCompileTime==Dynamic?0:RowsAtCompileTime,ColsAtCompileTime==Dynamic?0:ColsAtCompileTime, 0, 0, 0, 0, 0)\n  {}\n  \nprotected:\n\n  template<typename Expression>\n  void construct(Expression& expr)\n  {\n    if(expr.outerIndexPtr()==0)\n      ::new (static_cast<Base*>(this)) Base(expr.size(), expr.nonZeros(), expr.innerIndexPtr(), expr.valuePtr());\n    else\n      ::new (static_cast<Base*>(this)) Base(expr.rows(), expr.cols(), expr.nonZeros(), expr.outerIndexPtr(), expr.innerIndexPtr(), expr.valuePtr(), expr.innerNonZeroPtr());\n  }\n};\n\n} // namespace internal\n\n\n/** \n  * \\ingroup SparseCore_Module\n  *\n  * \\brief A sparse matrix expression referencing an existing sparse expression\n  *\n  * \\tparam SparseMatrixType the equivalent sparse matrix type of the referenced data, it must be a template instance of class SparseMatrix.\n  * \\tparam Options specifies whether the a standard compressed format is required \\c Options is  \\c #StandardCompressedFormat, or \\c 0.\n  *                The default is \\c 0.\n  *\n  * \\sa class Ref\n  */\n#ifndef EIGEN_PARSED_BY_DOXYGEN\ntemplate<typename MatScalar, int MatOptions, typename MatIndex, int Options, typename StrideType>\nclass Ref<SparseMatrix<MatScalar,MatOptions,MatIndex>, Options, StrideType >\n  : public internal::SparseRefBase<Ref<SparseMatrix<MatScalar,MatOptions,MatIndex>, Options, StrideType > >\n#else\ntemplate<typename SparseMatrixType, int Options>\nclass Ref<SparseMatrixType, Options>\n  : public SparseMapBase<Derived,WriteAccessors> // yes, that's weird to use Derived here, but that works!\n#endif\n{\n    typedef SparseMatrix<MatScalar,MatOptions,MatIndex> PlainObjectType;\n    typedef internal::traits<Ref> Traits;\n    template<int OtherOptions>\n    inline Ref(const SparseMatrix<MatScalar,OtherOptions,MatIndex>& expr);\n    template<int OtherOptions>\n    inline Ref(const MappedSparseMatrix<MatScalar,OtherOptions,MatIndex>& expr);\n  public:\n\n    typedef internal::SparseRefBase<Ref> Base;\n    EIGEN_SPARSE_PUBLIC_INTERFACE(Ref)\n\n\n    #ifndef EIGEN_PARSED_BY_DOXYGEN\n    template<int OtherOptions>\n    inline Ref(SparseMatrix<MatScalar,OtherOptions,MatIndex>& expr)\n    {\n      EIGEN_STATIC_ASSERT(bool(Traits::template match<SparseMatrix<MatScalar,OtherOptions,MatIndex> >::MatchAtCompileTime), STORAGE_LAYOUT_DOES_NOT_MATCH);\n      eigen_assert( ((Options & int(StandardCompressedFormat))==0) || (expr.isCompressed()) );\n      Base::construct(expr.derived());\n    }\n    \n    template<int OtherOptions>\n    inline Ref(MappedSparseMatrix<MatScalar,OtherOptions,MatIndex>& expr)\n    {\n      EIGEN_STATIC_ASSERT(bool(Traits::template match<SparseMatrix<MatScalar,OtherOptions,MatIndex> >::MatchAtCompileTime), STORAGE_LAYOUT_DOES_NOT_MATCH);\n      eigen_assert( ((Options & int(StandardCompressedFormat))==0) || (expr.isCompressed()) );\n      Base::construct(expr.derived());\n    }\n    \n    template<typename Derived>\n    inline Ref(const SparseCompressedBase<Derived>& expr)\n    #else\n    /** Implicit constructor from any sparse expression (2D matrix or 1D vector) */\n    template<typename Derived>\n    inline Ref(SparseCompressedBase<Derived>& expr)\n    #endif\n    {\n      EIGEN_STATIC_ASSERT(bool(internal::is_lvalue<Derived>::value), THIS_EXPRESSION_IS_NOT_A_LVALUE__IT_IS_READ_ONLY);\n      EIGEN_STATIC_ASSERT(bool(Traits::template match<Derived>::MatchAtCompileTime), STORAGE_LAYOUT_DOES_NOT_MATCH);\n      eigen_assert( ((Options & int(StandardCompressedFormat))==0) || (expr.isCompressed()) );\n      Base::construct(expr.const_cast_derived());\n    }\n};\n\n// this is the const ref version\ntemplate<typename MatScalar, int MatOptions, typename MatIndex, int Options, typename StrideType>\nclass Ref<const SparseMatrix<MatScalar,MatOptions,MatIndex>, Options, StrideType>\n  : public internal::SparseRefBase<Ref<const SparseMatrix<MatScalar,MatOptions,MatIndex>, Options, StrideType> >\n{\n    typedef SparseMatrix<MatScalar,MatOptions,MatIndex> TPlainObjectType;\n    typedef internal::traits<Ref> Traits;\n  public:\n\n    typedef internal::SparseRefBase<Ref> Base;\n    EIGEN_SPARSE_PUBLIC_INTERFACE(Ref)\n\n    template<typename Derived>\n    inline Ref(const SparseMatrixBase<Derived>& expr) : m_hasCopy(false)\n    {\n      construct(expr.derived(), typename Traits::template match<Derived>::type());\n    }\n\n    inline Ref(const Ref& other) : Base(other), m_hasCopy(false) {\n      // copy constructor shall not copy the m_object, to avoid unnecessary malloc and copy\n    }\n\n    template<typename OtherRef>\n    inline Ref(const RefBase<OtherRef>& other) : m_hasCopy(false) {\n      construct(other.derived(), typename Traits::template match<OtherRef>::type());\n    }\n\n    ~Ref() {\n      if(m_hasCopy) {\n        TPlainObjectType* obj = reinterpret_cast<TPlainObjectType*>(&m_storage);\n        obj->~TPlainObjectType();\n      }\n    }\n\n  protected:\n\n    template<typename Expression>\n    void construct(const Expression& expr,internal::true_type)\n    {\n      if((Options & int(StandardCompressedFormat)) && (!expr.isCompressed()))\n      {\n        TPlainObjectType* obj = reinterpret_cast<TPlainObjectType*>(&m_storage);\n        ::new (obj) TPlainObjectType(expr);\n        m_hasCopy = true;\n        Base::construct(*obj);\n      }\n      else\n      {\n        Base::construct(expr);\n      }\n    }\n\n    template<typename Expression>\n    void construct(const Expression& expr, internal::false_type)\n    {\n      TPlainObjectType* obj = reinterpret_cast<TPlainObjectType*>(&m_storage);\n      ::new (obj) TPlainObjectType(expr);\n      m_hasCopy = true;\n      Base::construct(*obj);\n    }\n\n  protected:\n    typename internal::aligned_storage<sizeof(TPlainObjectType), EIGEN_ALIGNOF(TPlainObjectType)>::type m_storage;\n    bool m_hasCopy;\n};\n\n\n\n/**\n  * \\ingroup SparseCore_Module\n  *\n  * \\brief A sparse vector expression referencing an existing sparse vector expression\n  *\n  * \\tparam SparseVectorType the equivalent sparse vector type of the referenced data, it must be a template instance of class SparseVector.\n  *\n  * \\sa class Ref\n  */\n#ifndef EIGEN_PARSED_BY_DOXYGEN\ntemplate<typename MatScalar, int MatOptions, typename MatIndex, int Options, typename StrideType>\nclass Ref<SparseVector<MatScalar,MatOptions,MatIndex>, Options, StrideType >\n  : public internal::SparseRefBase<Ref<SparseVector<MatScalar,MatOptions,MatIndex>, Options, StrideType > >\n#else\ntemplate<typename SparseVectorType>\nclass Ref<SparseVectorType>\n  : public SparseMapBase<Derived,WriteAccessors>\n#endif\n{\n    typedef SparseVector<MatScalar,MatOptions,MatIndex> PlainObjectType;\n    typedef internal::traits<Ref> Traits;\n    template<int OtherOptions>\n    inline Ref(const SparseVector<MatScalar,OtherOptions,MatIndex>& expr);\n  public:\n\n    typedef internal::SparseRefBase<Ref> Base;\n    EIGEN_SPARSE_PUBLIC_INTERFACE(Ref)\n\n    #ifndef EIGEN_PARSED_BY_DOXYGEN\n    template<int OtherOptions>\n    inline Ref(SparseVector<MatScalar,OtherOptions,MatIndex>& expr)\n    {\n      EIGEN_STATIC_ASSERT(bool(Traits::template match<SparseVector<MatScalar,OtherOptions,MatIndex> >::MatchAtCompileTime), STORAGE_LAYOUT_DOES_NOT_MATCH);\n      Base::construct(expr.derived());\n    }\n\n    template<typename Derived>\n    inline Ref(const SparseCompressedBase<Derived>& expr)\n    #else\n    /** Implicit constructor from any 1D sparse vector expression */\n    template<typename Derived>\n    inline Ref(SparseCompressedBase<Derived>& expr)\n    #endif\n    {\n      EIGEN_STATIC_ASSERT(bool(internal::is_lvalue<Derived>::value), THIS_EXPRESSION_IS_NOT_A_LVALUE__IT_IS_READ_ONLY);\n      EIGEN_STATIC_ASSERT(bool(Traits::template match<Derived>::MatchAtCompileTime), STORAGE_LAYOUT_DOES_NOT_MATCH);\n      Base::construct(expr.const_cast_derived());\n    }\n};\n\n// this is the const ref version\ntemplate<typename MatScalar, int MatOptions, typename MatIndex, int Options, typename StrideType>\nclass Ref<const SparseVector<MatScalar,MatOptions,MatIndex>, Options, StrideType>\n  : public internal::SparseRefBase<Ref<const SparseVector<MatScalar,MatOptions,MatIndex>, Options, StrideType> >\n{\n    typedef SparseVector<MatScalar,MatOptions,MatIndex> TPlainObjectType;\n    typedef internal::traits<Ref> Traits;\n  public:\n\n    typedef internal::SparseRefBase<Ref> Base;\n    EIGEN_SPARSE_PUBLIC_INTERFACE(Ref)\n\n    template<typename Derived>\n    inline Ref(const SparseMatrixBase<Derived>& expr) : m_hasCopy(false)\n    {\n      construct(expr.derived(), typename Traits::template match<Derived>::type());\n    }\n\n    inline Ref(const Ref& other) : Base(other), m_hasCopy(false) {\n      // copy constructor shall not copy the m_object, to avoid unnecessary malloc and copy\n    }\n\n    template<typename OtherRef>\n    inline Ref(const RefBase<OtherRef>& other) : m_hasCopy(false) {\n      construct(other.derived(), typename Traits::template match<OtherRef>::type());\n    }\n\n    ~Ref() {\n      if(m_hasCopy) {\n        TPlainObjectType* obj = reinterpret_cast<TPlainObjectType*>(&m_storage);\n        obj->~TPlainObjectType();\n      }\n    }\n\n  protected:\n\n    template<typename Expression>\n    void construct(const Expression& expr,internal::true_type)\n    {\n      Base::construct(expr);\n    }\n\n    template<typename Expression>\n    void construct(const Expression& expr, internal::false_type)\n    {\n      TPlainObjectType* obj = reinterpret_cast<TPlainObjectType*>(&m_storage);\n      ::new (obj) TPlainObjectType(expr);\n      m_hasCopy = true;\n      Base::construct(*obj);\n    }\n\n  protected:\n    typename internal::aligned_storage<sizeof(TPlainObjectType), EIGEN_ALIGNOF(TPlainObjectType)>::type m_storage;\n    bool m_hasCopy;\n};\n\nnamespace internal {\n\n// FIXME shall we introduce a general evaluatior_ref that we can specialize for any sparse object once, and thus remove this copy-pasta thing...\n\ntemplate<typename MatScalar, int MatOptions, typename MatIndex, int Options, typename StrideType>\nstruct evaluator<Ref<SparseMatrix<MatScalar,MatOptions,MatIndex>, Options, StrideType> >\n  : evaluator<SparseCompressedBase<Ref<SparseMatrix<MatScalar,MatOptions,MatIndex>, Options, StrideType> > >\n{\n  typedef evaluator<SparseCompressedBase<Ref<SparseMatrix<MatScalar,MatOptions,MatIndex>, Options, StrideType> > > Base;\n  typedef Ref<SparseMatrix<MatScalar,MatOptions,MatIndex>, Options, StrideType> XprType;  \n  evaluator() : Base() {}\n  explicit evaluator(const XprType &mat) : Base(mat) {}\n};\n\ntemplate<typename MatScalar, int MatOptions, typename MatIndex, int Options, typename StrideType>\nstruct evaluator<Ref<const SparseMatrix<MatScalar,MatOptions,MatIndex>, Options, StrideType> >\n  : evaluator<SparseCompressedBase<Ref<const SparseMatrix<MatScalar,MatOptions,MatIndex>, Options, StrideType> > >\n{\n  typedef evaluator<SparseCompressedBase<Ref<const SparseMatrix<MatScalar,MatOptions,MatIndex>, Options, StrideType> > > Base;\n  typedef Ref<const SparseMatrix<MatScalar,MatOptions,MatIndex>, Options, StrideType> XprType;  \n  evaluator() : Base() {}\n  explicit evaluator(const XprType &mat) : Base(mat) {}\n};\n\ntemplate<typename MatScalar, int MatOptions, typename MatIndex, int Options, typename StrideType>\nstruct evaluator<Ref<SparseVector<MatScalar,MatOptions,MatIndex>, Options, StrideType> >\n  : evaluator<SparseCompressedBase<Ref<SparseVector<MatScalar,MatOptions,MatIndex>, Options, StrideType> > >\n{\n  typedef evaluator<SparseCompressedBase<Ref<SparseVector<MatScalar,MatOptions,MatIndex>, Options, StrideType> > > Base;\n  typedef Ref<SparseVector<MatScalar,MatOptions,MatIndex>, Options, StrideType> XprType;\n  evaluator() : Base() {}\n  explicit evaluator(const XprType &mat) : Base(mat) {}\n};\n\ntemplate<typename MatScalar, int MatOptions, typename MatIndex, int Options, typename StrideType>\nstruct evaluator<Ref<const SparseVector<MatScalar,MatOptions,MatIndex>, Options, StrideType> >\n  : evaluator<SparseCompressedBase<Ref<const SparseVector<MatScalar,MatOptions,MatIndex>, Options, StrideType> > >\n{\n  typedef evaluator<SparseCompressedBase<Ref<const SparseVector<MatScalar,MatOptions,MatIndex>, Options, StrideType> > > Base;\n  typedef Ref<const SparseVector<MatScalar,MatOptions,MatIndex>, Options, StrideType> XprType;\n  evaluator() : Base() {}\n  explicit evaluator(const XprType &mat) : Base(mat) {}\n};\n\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_SPARSE_REF_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseCore/SparseSelfAdjointView.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009-2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPARSE_SELFADJOINTVIEW_H\n#define EIGEN_SPARSE_SELFADJOINTVIEW_H\n\nnamespace Eigen { \n  \n/** \\ingroup SparseCore_Module\n  * \\class SparseSelfAdjointView\n  *\n  * \\brief Pseudo expression to manipulate a triangular sparse matrix as a selfadjoint matrix.\n  *\n  * \\param MatrixType the type of the dense matrix storing the coefficients\n  * \\param Mode can be either \\c #Lower or \\c #Upper\n  *\n  * This class is an expression of a sefladjoint matrix from a triangular part of a matrix\n  * with given dense storage of the coefficients. It is the return type of MatrixBase::selfadjointView()\n  * and most of the time this is the only way that it is used.\n  *\n  * \\sa SparseMatrixBase::selfadjointView()\n  */\nnamespace internal {\n  \ntemplate<typename MatrixType, unsigned int Mode>\nstruct traits<SparseSelfAdjointView<MatrixType,Mode> > : traits<MatrixType> {\n};\n\ntemplate<int SrcMode,int DstMode,typename MatrixType,int DestOrder>\nvoid permute_symm_to_symm(const MatrixType& mat, SparseMatrix<typename MatrixType::Scalar,DestOrder,typename MatrixType::StorageIndex>& _dest, const typename MatrixType::StorageIndex* perm = 0);\n\ntemplate<int Mode,typename MatrixType,int DestOrder>\nvoid permute_symm_to_fullsymm(const MatrixType& mat, SparseMatrix<typename MatrixType::Scalar,DestOrder,typename MatrixType::StorageIndex>& _dest, const typename MatrixType::StorageIndex* perm = 0);\n\n}\n\ntemplate<typename MatrixType, unsigned int _Mode> class SparseSelfAdjointView\n  : public EigenBase<SparseSelfAdjointView<MatrixType,_Mode> >\n{\n  public:\n    \n    enum {\n      Mode = _Mode,\n      TransposeMode = ((Mode & Upper) ? Lower : 0) | ((Mode & Lower) ? Upper : 0),\n      RowsAtCompileTime = internal::traits<SparseSelfAdjointView>::RowsAtCompileTime,\n      ColsAtCompileTime = internal::traits<SparseSelfAdjointView>::ColsAtCompileTime\n    };\n\n    typedef EigenBase<SparseSelfAdjointView> Base;\n    typedef typename MatrixType::Scalar Scalar;\n    typedef typename MatrixType::StorageIndex StorageIndex;\n    typedef Matrix<StorageIndex,Dynamic,1> VectorI;\n    typedef typename internal::ref_selector<MatrixType>::non_const_type MatrixTypeNested;\n    typedef typename internal::remove_all<MatrixTypeNested>::type _MatrixTypeNested;\n    \n    explicit inline SparseSelfAdjointView(MatrixType& matrix) : m_matrix(matrix)\n    {\n      eigen_assert(rows()==cols() && \"SelfAdjointView is only for squared matrices\");\n    }\n\n    inline Index rows() const { return m_matrix.rows(); }\n    inline Index cols() const { return m_matrix.cols(); }\n\n    /** \\internal \\returns a reference to the nested matrix */\n    const _MatrixTypeNested& matrix() const { return m_matrix; }\n    typename internal::remove_reference<MatrixTypeNested>::type& matrix() { return m_matrix; }\n\n    /** \\returns an expression of the matrix product between a sparse self-adjoint matrix \\c *this and a sparse matrix \\a rhs.\n      *\n      * Note that there is no algorithmic advantage of performing such a product compared to a general sparse-sparse matrix product.\n      * Indeed, the SparseSelfadjointView operand is first copied into a temporary SparseMatrix before computing the product.\n      */\n    template<typename OtherDerived>\n    Product<SparseSelfAdjointView, OtherDerived>\n    operator*(const SparseMatrixBase<OtherDerived>& rhs) const\n    {\n      return Product<SparseSelfAdjointView, OtherDerived>(*this, rhs.derived());\n    }\n\n    /** \\returns an expression of the matrix product between a sparse matrix \\a lhs and a sparse self-adjoint matrix \\a rhs.\n      *\n      * Note that there is no algorithmic advantage of performing such a product compared to a general sparse-sparse matrix product.\n      * Indeed, the SparseSelfadjointView operand is first copied into a temporary SparseMatrix before computing the product.\n      */\n    template<typename OtherDerived> friend\n    Product<OtherDerived, SparseSelfAdjointView>\n    operator*(const SparseMatrixBase<OtherDerived>& lhs, const SparseSelfAdjointView& rhs)\n    {\n      return Product<OtherDerived, SparseSelfAdjointView>(lhs.derived(), rhs);\n    }\n    \n    /** Efficient sparse self-adjoint matrix times dense vector/matrix product */\n    template<typename OtherDerived>\n    Product<SparseSelfAdjointView,OtherDerived>\n    operator*(const MatrixBase<OtherDerived>& rhs) const\n    {\n      return Product<SparseSelfAdjointView,OtherDerived>(*this, rhs.derived());\n    }\n\n    /** Efficient dense vector/matrix times sparse self-adjoint matrix product */\n    template<typename OtherDerived> friend\n    Product<OtherDerived,SparseSelfAdjointView>\n    operator*(const MatrixBase<OtherDerived>& lhs, const SparseSelfAdjointView& rhs)\n    {\n      return Product<OtherDerived,SparseSelfAdjointView>(lhs.derived(), rhs);\n    }\n\n    /** Perform a symmetric rank K update of the selfadjoint matrix \\c *this:\n      * \\f$ this = this + \\alpha ( u u^* ) \\f$ where \\a u is a vector or matrix.\n      *\n      * \\returns a reference to \\c *this\n      *\n      * To perform \\f$ this = this + \\alpha ( u^* u ) \\f$ you can simply\n      * call this function with u.adjoint().\n      */\n    template<typename DerivedU>\n    SparseSelfAdjointView& rankUpdate(const SparseMatrixBase<DerivedU>& u, const Scalar& alpha = Scalar(1));\n    \n    /** \\returns an expression of P H P^-1 */\n    // TODO implement twists in a more evaluator friendly fashion\n    SparseSymmetricPermutationProduct<_MatrixTypeNested,Mode> twistedBy(const PermutationMatrix<Dynamic,Dynamic,StorageIndex>& perm) const\n    {\n      return SparseSymmetricPermutationProduct<_MatrixTypeNested,Mode>(m_matrix, perm);\n    }\n\n    template<typename SrcMatrixType,int SrcMode>\n    SparseSelfAdjointView& operator=(const SparseSymmetricPermutationProduct<SrcMatrixType,SrcMode>& permutedMatrix)\n    {\n      internal::call_assignment_no_alias_no_transpose(*this, permutedMatrix);\n      return *this;\n    }\n\n    SparseSelfAdjointView& operator=(const SparseSelfAdjointView& src)\n    {\n      PermutationMatrix<Dynamic,Dynamic,StorageIndex> pnull;\n      return *this = src.twistedBy(pnull);\n    }\n\n    template<typename SrcMatrixType,unsigned int SrcMode>\n    SparseSelfAdjointView& operator=(const SparseSelfAdjointView<SrcMatrixType,SrcMode>& src)\n    {\n      PermutationMatrix<Dynamic,Dynamic,StorageIndex> pnull;\n      return *this = src.twistedBy(pnull);\n    }\n    \n    void resize(Index rows, Index cols)\n    {\n      EIGEN_ONLY_USED_FOR_DEBUG(rows);\n      EIGEN_ONLY_USED_FOR_DEBUG(cols);\n      eigen_assert(rows == this->rows() && cols == this->cols()\n                && \"SparseSelfadjointView::resize() does not actually allow to resize.\");\n    }\n    \n  protected:\n\n    MatrixTypeNested m_matrix;\n    //mutable VectorI m_countPerRow;\n    //mutable VectorI m_countPerCol;\n  private:\n    template<typename Dest> void evalTo(Dest &) const;\n};\n\n/***************************************************************************\n* Implementation of SparseMatrixBase methods\n***************************************************************************/\n\ntemplate<typename Derived>\ntemplate<unsigned int UpLo>\ntypename SparseMatrixBase<Derived>::template ConstSelfAdjointViewReturnType<UpLo>::Type SparseMatrixBase<Derived>::selfadjointView() const\n{\n  return SparseSelfAdjointView<const Derived, UpLo>(derived());\n}\n\ntemplate<typename Derived>\ntemplate<unsigned int UpLo>\ntypename SparseMatrixBase<Derived>::template SelfAdjointViewReturnType<UpLo>::Type SparseMatrixBase<Derived>::selfadjointView()\n{\n  return SparseSelfAdjointView<Derived, UpLo>(derived());\n}\n\n/***************************************************************************\n* Implementation of SparseSelfAdjointView methods\n***************************************************************************/\n\ntemplate<typename MatrixType, unsigned int Mode>\ntemplate<typename DerivedU>\nSparseSelfAdjointView<MatrixType,Mode>&\nSparseSelfAdjointView<MatrixType,Mode>::rankUpdate(const SparseMatrixBase<DerivedU>& u, const Scalar& alpha)\n{\n  SparseMatrix<Scalar,(MatrixType::Flags&RowMajorBit)?RowMajor:ColMajor> tmp = u * u.adjoint();\n  if(alpha==Scalar(0))\n    m_matrix = tmp.template triangularView<Mode>();\n  else\n    m_matrix += alpha * tmp.template triangularView<Mode>();\n\n  return *this;\n}\n\nnamespace internal {\n  \n// TODO currently a selfadjoint expression has the form SelfAdjointView<.,.>\n//      in the future selfadjoint-ness should be defined by the expression traits\n//      such that Transpose<SelfAdjointView<.,.> > is valid. (currently TriangularBase::transpose() is overloaded to make it work)\ntemplate<typename MatrixType, unsigned int Mode>\nstruct evaluator_traits<SparseSelfAdjointView<MatrixType,Mode> >\n{\n  typedef typename storage_kind_to_evaluator_kind<typename MatrixType::StorageKind>::Kind Kind;\n  typedef SparseSelfAdjointShape Shape;\n};\n\nstruct SparseSelfAdjoint2Sparse {};\n\ntemplate<> struct AssignmentKind<SparseShape,SparseSelfAdjointShape> { typedef SparseSelfAdjoint2Sparse Kind; };\ntemplate<> struct AssignmentKind<SparseSelfAdjointShape,SparseShape> { typedef Sparse2Sparse Kind; };\n\ntemplate< typename DstXprType, typename SrcXprType, typename Functor>\nstruct Assignment<DstXprType, SrcXprType, Functor, SparseSelfAdjoint2Sparse>\n{\n  typedef typename DstXprType::StorageIndex StorageIndex;\n  typedef internal::assign_op<typename DstXprType::Scalar,typename SrcXprType::Scalar> AssignOpType;\n\n  template<typename DestScalar,int StorageOrder>\n  static void run(SparseMatrix<DestScalar,StorageOrder,StorageIndex> &dst, const SrcXprType &src, const AssignOpType&/*func*/)\n  {\n    internal::permute_symm_to_fullsymm<SrcXprType::Mode>(src.matrix(), dst);\n  }\n\n  // FIXME: the handling of += and -= in sparse matrices should be cleanup so that next two overloads could be reduced to:\n  template<typename DestScalar,int StorageOrder,typename AssignFunc>\n  static void run(SparseMatrix<DestScalar,StorageOrder,StorageIndex> &dst, const SrcXprType &src, const AssignFunc& func)\n  {\n    SparseMatrix<DestScalar,StorageOrder,StorageIndex> tmp(src.rows(),src.cols());\n    run(tmp, src, AssignOpType());\n    call_assignment_no_alias_no_transpose(dst, tmp, func);\n  }\n\n  template<typename DestScalar,int StorageOrder>\n  static void run(SparseMatrix<DestScalar,StorageOrder,StorageIndex> &dst, const SrcXprType &src,\n                  const internal::add_assign_op<typename DstXprType::Scalar,typename SrcXprType::Scalar>& /* func */)\n  {\n    SparseMatrix<DestScalar,StorageOrder,StorageIndex> tmp(src.rows(),src.cols());\n    run(tmp, src, AssignOpType());\n    dst += tmp;\n  }\n\n  template<typename DestScalar,int StorageOrder>\n  static void run(SparseMatrix<DestScalar,StorageOrder,StorageIndex> &dst, const SrcXprType &src,\n                  const internal::sub_assign_op<typename DstXprType::Scalar,typename SrcXprType::Scalar>& /* func */)\n  {\n    SparseMatrix<DestScalar,StorageOrder,StorageIndex> tmp(src.rows(),src.cols());\n    run(tmp, src, AssignOpType());\n    dst -= tmp;\n  }\n  \n  template<typename DestScalar>\n  static void run(DynamicSparseMatrix<DestScalar,ColMajor,StorageIndex>& dst, const SrcXprType &src, const AssignOpType&/*func*/)\n  {\n    // TODO directly evaluate into dst;\n    SparseMatrix<DestScalar,ColMajor,StorageIndex> tmp(dst.rows(),dst.cols());\n    internal::permute_symm_to_fullsymm<SrcXprType::Mode>(src.matrix(), tmp);\n    dst = tmp;\n  }\n};\n\n} // end namespace internal\n\n/***************************************************************************\n* Implementation of sparse self-adjoint time dense matrix\n***************************************************************************/\n\nnamespace internal {\n\ntemplate<int Mode, typename SparseLhsType, typename DenseRhsType, typename DenseResType, typename AlphaType>\ninline void sparse_selfadjoint_time_dense_product(const SparseLhsType& lhs, const DenseRhsType& rhs, DenseResType& res, const AlphaType& alpha)\n{\n  EIGEN_ONLY_USED_FOR_DEBUG(alpha);\n  \n  typedef typename internal::nested_eval<SparseLhsType,DenseRhsType::MaxColsAtCompileTime>::type SparseLhsTypeNested;\n  typedef typename internal::remove_all<SparseLhsTypeNested>::type SparseLhsTypeNestedCleaned;\n  typedef evaluator<SparseLhsTypeNestedCleaned> LhsEval;\n  typedef typename LhsEval::InnerIterator LhsIterator;\n  typedef typename SparseLhsType::Scalar LhsScalar;\n  \n  enum {\n    LhsIsRowMajor = (LhsEval::Flags&RowMajorBit)==RowMajorBit,\n    ProcessFirstHalf =\n              ((Mode&(Upper|Lower))==(Upper|Lower))\n          || ( (Mode&Upper) && !LhsIsRowMajor)\n          || ( (Mode&Lower) && LhsIsRowMajor),\n    ProcessSecondHalf = !ProcessFirstHalf\n  };\n  \n  SparseLhsTypeNested lhs_nested(lhs);\n  LhsEval lhsEval(lhs_nested);\n\n  // work on one column at once\n  for (Index k=0; k<rhs.cols(); ++k)\n  {\n    for (Index j=0; j<lhs.outerSize(); ++j)\n    {\n      LhsIterator i(lhsEval,j);\n      // handle diagonal coeff\n      if (ProcessSecondHalf)\n      {\n        while (i && i.index()<j) ++i;\n        if(i && i.index()==j)\n        {\n          res.coeffRef(j,k) += alpha * i.value() * rhs.coeff(j,k);\n          ++i;\n        }\n      }\n\n      // premultiplied rhs for scatters\n      typename ScalarBinaryOpTraits<AlphaType, typename DenseRhsType::Scalar>::ReturnType rhs_j(alpha*rhs(j,k));\n      // accumulator for partial scalar product\n      typename DenseResType::Scalar res_j(0);\n      for(; (ProcessFirstHalf ? i && i.index() < j : i) ; ++i)\n      {\n        LhsScalar lhs_ij = i.value();\n        if(!LhsIsRowMajor) lhs_ij = numext::conj(lhs_ij);\n        res_j += lhs_ij * rhs.coeff(i.index(),k);\n        res(i.index(),k) += numext::conj(lhs_ij) * rhs_j;\n      }\n      res.coeffRef(j,k) += alpha * res_j;\n\n      // handle diagonal coeff\n      if (ProcessFirstHalf && i && (i.index()==j))\n        res.coeffRef(j,k) += alpha * i.value() * rhs.coeff(j,k);\n    }\n  }\n}\n\n\ntemplate<typename LhsView, typename Rhs, int ProductType>\nstruct generic_product_impl<LhsView, Rhs, SparseSelfAdjointShape, DenseShape, ProductType>\n: generic_product_impl_base<LhsView, Rhs, generic_product_impl<LhsView, Rhs, SparseSelfAdjointShape, DenseShape, ProductType> >\n{\n  template<typename Dest>\n  static void scaleAndAddTo(Dest& dst, const LhsView& lhsView, const Rhs& rhs, const typename Dest::Scalar& alpha)\n  {\n    typedef typename LhsView::_MatrixTypeNested Lhs;\n    typedef typename nested_eval<Lhs,Dynamic>::type LhsNested;\n    typedef typename nested_eval<Rhs,Dynamic>::type RhsNested;\n    LhsNested lhsNested(lhsView.matrix());\n    RhsNested rhsNested(rhs);\n    \n    internal::sparse_selfadjoint_time_dense_product<LhsView::Mode>(lhsNested, rhsNested, dst, alpha);\n  }\n};\n\ntemplate<typename Lhs, typename RhsView, int ProductType>\nstruct generic_product_impl<Lhs, RhsView, DenseShape, SparseSelfAdjointShape, ProductType>\n: generic_product_impl_base<Lhs, RhsView, generic_product_impl<Lhs, RhsView, DenseShape, SparseSelfAdjointShape, ProductType> >\n{\n  template<typename Dest>\n  static void scaleAndAddTo(Dest& dst, const Lhs& lhs, const RhsView& rhsView, const typename Dest::Scalar& alpha)\n  {\n    typedef typename RhsView::_MatrixTypeNested Rhs;\n    typedef typename nested_eval<Lhs,Dynamic>::type LhsNested;\n    typedef typename nested_eval<Rhs,Dynamic>::type RhsNested;\n    LhsNested lhsNested(lhs);\n    RhsNested rhsNested(rhsView.matrix());\n    \n    // transpose everything\n    Transpose<Dest> dstT(dst);\n    internal::sparse_selfadjoint_time_dense_product<RhsView::TransposeMode>(rhsNested.transpose(), lhsNested.transpose(), dstT, alpha);\n  }\n};\n\n// NOTE: these two overloads are needed to evaluate the sparse selfadjoint view into a full sparse matrix\n// TODO: maybe the copy could be handled by generic_product_impl so that these overloads would not be needed anymore\n\ntemplate<typename LhsView, typename Rhs, int ProductTag>\nstruct product_evaluator<Product<LhsView, Rhs, DefaultProduct>, ProductTag, SparseSelfAdjointShape, SparseShape>\n  : public evaluator<typename Product<typename Rhs::PlainObject, Rhs, DefaultProduct>::PlainObject>\n{\n  typedef Product<LhsView, Rhs, DefaultProduct> XprType;\n  typedef typename XprType::PlainObject PlainObject;\n  typedef evaluator<PlainObject> Base;\n\n  product_evaluator(const XprType& xpr)\n    : m_lhs(xpr.lhs()), m_result(xpr.rows(), xpr.cols())\n  {\n    ::new (static_cast<Base*>(this)) Base(m_result);\n    generic_product_impl<typename Rhs::PlainObject, Rhs, SparseShape, SparseShape, ProductTag>::evalTo(m_result, m_lhs, xpr.rhs());\n  }\n  \nprotected:\n  typename Rhs::PlainObject m_lhs;\n  PlainObject m_result;\n};\n\ntemplate<typename Lhs, typename RhsView, int ProductTag>\nstruct product_evaluator<Product<Lhs, RhsView, DefaultProduct>, ProductTag, SparseShape, SparseSelfAdjointShape>\n  : public evaluator<typename Product<Lhs, typename Lhs::PlainObject, DefaultProduct>::PlainObject>\n{\n  typedef Product<Lhs, RhsView, DefaultProduct> XprType;\n  typedef typename XprType::PlainObject PlainObject;\n  typedef evaluator<PlainObject> Base;\n\n  product_evaluator(const XprType& xpr)\n    : m_rhs(xpr.rhs()), m_result(xpr.rows(), xpr.cols())\n  {\n    ::new (static_cast<Base*>(this)) Base(m_result);\n    generic_product_impl<Lhs, typename Lhs::PlainObject, SparseShape, SparseShape, ProductTag>::evalTo(m_result, xpr.lhs(), m_rhs);\n  }\n  \nprotected:\n  typename Lhs::PlainObject m_rhs;\n  PlainObject m_result;\n};\n\n} // namespace internal\n\n/***************************************************************************\n* Implementation of symmetric copies and permutations\n***************************************************************************/\nnamespace internal {\n\ntemplate<int Mode,typename MatrixType,int DestOrder>\nvoid permute_symm_to_fullsymm(const MatrixType& mat, SparseMatrix<typename MatrixType::Scalar,DestOrder,typename MatrixType::StorageIndex>& _dest, const typename MatrixType::StorageIndex* perm)\n{\n  typedef typename MatrixType::StorageIndex StorageIndex;\n  typedef typename MatrixType::Scalar Scalar;\n  typedef SparseMatrix<Scalar,DestOrder,StorageIndex> Dest;\n  typedef Matrix<StorageIndex,Dynamic,1> VectorI;\n  typedef evaluator<MatrixType> MatEval;\n  typedef typename evaluator<MatrixType>::InnerIterator MatIterator;\n  \n  MatEval matEval(mat);\n  Dest& dest(_dest.derived());\n  enum {\n    StorageOrderMatch = int(Dest::IsRowMajor) == int(MatrixType::IsRowMajor)\n  };\n  \n  Index size = mat.rows();\n  VectorI count;\n  count.resize(size);\n  count.setZero();\n  dest.resize(size,size);\n  for(Index j = 0; j<size; ++j)\n  {\n    Index jp = perm ? perm[j] : j;\n    for(MatIterator it(matEval,j); it; ++it)\n    {\n      Index i = it.index();\n      Index r = it.row();\n      Index c = it.col();\n      Index ip = perm ? perm[i] : i;\n      if(Mode==(Upper|Lower))\n        count[StorageOrderMatch ? jp : ip]++;\n      else if(r==c)\n        count[ip]++;\n      else if(( Mode==Lower && r>c) || ( Mode==Upper && r<c))\n      {\n        count[ip]++;\n        count[jp]++;\n      }\n    }\n  }\n  Index nnz = count.sum();\n  \n  // reserve space\n  dest.resizeNonZeros(nnz);\n  dest.outerIndexPtr()[0] = 0;\n  for(Index j=0; j<size; ++j)\n    dest.outerIndexPtr()[j+1] = dest.outerIndexPtr()[j] + count[j];\n  for(Index j=0; j<size; ++j)\n    count[j] = dest.outerIndexPtr()[j];\n  \n  // copy data\n  for(StorageIndex j = 0; j<size; ++j)\n  {\n    for(MatIterator it(matEval,j); it; ++it)\n    {\n      StorageIndex i = internal::convert_index<StorageIndex>(it.index());\n      Index r = it.row();\n      Index c = it.col();\n      \n      StorageIndex jp = perm ? perm[j] : j;\n      StorageIndex ip = perm ? perm[i] : i;\n      \n      if(Mode==(Upper|Lower))\n      {\n        Index k = count[StorageOrderMatch ? jp : ip]++;\n        dest.innerIndexPtr()[k] = StorageOrderMatch ? ip : jp;\n        dest.valuePtr()[k] = it.value();\n      }\n      else if(r==c)\n      {\n        Index k = count[ip]++;\n        dest.innerIndexPtr()[k] = ip;\n        dest.valuePtr()[k] = it.value();\n      }\n      else if(( (Mode&Lower)==Lower && r>c) || ( (Mode&Upper)==Upper && r<c))\n      {\n        if(!StorageOrderMatch)\n          std::swap(ip,jp);\n        Index k = count[jp]++;\n        dest.innerIndexPtr()[k] = ip;\n        dest.valuePtr()[k] = it.value();\n        k = count[ip]++;\n        dest.innerIndexPtr()[k] = jp;\n        dest.valuePtr()[k] = numext::conj(it.value());\n      }\n    }\n  }\n}\n\ntemplate<int _SrcMode,int _DstMode,typename MatrixType,int DstOrder>\nvoid permute_symm_to_symm(const MatrixType& mat, SparseMatrix<typename MatrixType::Scalar,DstOrder,typename MatrixType::StorageIndex>& _dest, const typename MatrixType::StorageIndex* perm)\n{\n  typedef typename MatrixType::StorageIndex StorageIndex;\n  typedef typename MatrixType::Scalar Scalar;\n  SparseMatrix<Scalar,DstOrder,StorageIndex>& dest(_dest.derived());\n  typedef Matrix<StorageIndex,Dynamic,1> VectorI;\n  typedef evaluator<MatrixType> MatEval;\n  typedef typename evaluator<MatrixType>::InnerIterator MatIterator;\n\n  enum {\n    SrcOrder = MatrixType::IsRowMajor ? RowMajor : ColMajor,\n    StorageOrderMatch = int(SrcOrder) == int(DstOrder),\n    DstMode = DstOrder==RowMajor ? (_DstMode==Upper ? Lower : Upper) : _DstMode,\n    SrcMode = SrcOrder==RowMajor ? (_SrcMode==Upper ? Lower : Upper) : _SrcMode\n  };\n\n  MatEval matEval(mat);\n  \n  Index size = mat.rows();\n  VectorI count(size);\n  count.setZero();\n  dest.resize(size,size);\n  for(StorageIndex j = 0; j<size; ++j)\n  {\n    StorageIndex jp = perm ? perm[j] : j;\n    for(MatIterator it(matEval,j); it; ++it)\n    {\n      StorageIndex i = it.index();\n      if((int(SrcMode)==int(Lower) && i<j) || (int(SrcMode)==int(Upper) && i>j))\n        continue;\n                  \n      StorageIndex ip = perm ? perm[i] : i;\n      count[int(DstMode)==int(Lower) ? (std::min)(ip,jp) : (std::max)(ip,jp)]++;\n    }\n  }\n  dest.outerIndexPtr()[0] = 0;\n  for(Index j=0; j<size; ++j)\n    dest.outerIndexPtr()[j+1] = dest.outerIndexPtr()[j] + count[j];\n  dest.resizeNonZeros(dest.outerIndexPtr()[size]);\n  for(Index j=0; j<size; ++j)\n    count[j] = dest.outerIndexPtr()[j];\n  \n  for(StorageIndex j = 0; j<size; ++j)\n  {\n    \n    for(MatIterator it(matEval,j); it; ++it)\n    {\n      StorageIndex i = it.index();\n      if((int(SrcMode)==int(Lower) && i<j) || (int(SrcMode)==int(Upper) && i>j))\n        continue;\n                  \n      StorageIndex jp = perm ? perm[j] : j;\n      StorageIndex ip = perm? perm[i] : i;\n      \n      Index k = count[int(DstMode)==int(Lower) ? (std::min)(ip,jp) : (std::max)(ip,jp)]++;\n      dest.innerIndexPtr()[k] = int(DstMode)==int(Lower) ? (std::max)(ip,jp) : (std::min)(ip,jp);\n      \n      if(!StorageOrderMatch) std::swap(ip,jp);\n      if( ((int(DstMode)==int(Lower) && ip<jp) || (int(DstMode)==int(Upper) && ip>jp)))\n        dest.valuePtr()[k] = numext::conj(it.value());\n      else\n        dest.valuePtr()[k] = it.value();\n    }\n  }\n}\n\n}\n\n// TODO implement twists in a more evaluator friendly fashion\n\nnamespace internal {\n\ntemplate<typename MatrixType, int Mode>\nstruct traits<SparseSymmetricPermutationProduct<MatrixType,Mode> > : traits<MatrixType> {\n};\n\n}\n\ntemplate<typename MatrixType,int Mode>\nclass SparseSymmetricPermutationProduct\n  : public EigenBase<SparseSymmetricPermutationProduct<MatrixType,Mode> >\n{\n  public:\n    typedef typename MatrixType::Scalar Scalar;\n    typedef typename MatrixType::StorageIndex StorageIndex;\n    enum {\n      RowsAtCompileTime = internal::traits<SparseSymmetricPermutationProduct>::RowsAtCompileTime,\n      ColsAtCompileTime = internal::traits<SparseSymmetricPermutationProduct>::ColsAtCompileTime\n    };\n  protected:\n    typedef PermutationMatrix<Dynamic,Dynamic,StorageIndex> Perm;\n  public:\n    typedef Matrix<StorageIndex,Dynamic,1> VectorI;\n    typedef typename MatrixType::Nested MatrixTypeNested;\n    typedef typename internal::remove_all<MatrixTypeNested>::type NestedExpression;\n    \n    SparseSymmetricPermutationProduct(const MatrixType& mat, const Perm& perm)\n      : m_matrix(mat), m_perm(perm)\n    {}\n    \n    inline Index rows() const { return m_matrix.rows(); }\n    inline Index cols() const { return m_matrix.cols(); }\n        \n    const NestedExpression& matrix() const { return m_matrix; }\n    const Perm& perm() const { return m_perm; }\n    \n  protected:\n    MatrixTypeNested m_matrix;\n    const Perm& m_perm;\n\n};\n\nnamespace internal {\n  \ntemplate<typename DstXprType, typename MatrixType, int Mode, typename Scalar>\nstruct Assignment<DstXprType, SparseSymmetricPermutationProduct<MatrixType,Mode>, internal::assign_op<Scalar,typename MatrixType::Scalar>, Sparse2Sparse>\n{\n  typedef SparseSymmetricPermutationProduct<MatrixType,Mode> SrcXprType;\n  typedef typename DstXprType::StorageIndex DstIndex;\n  template<int Options>\n  static void run(SparseMatrix<Scalar,Options,DstIndex> &dst, const SrcXprType &src, const internal::assign_op<Scalar,typename MatrixType::Scalar> &)\n  {\n    // internal::permute_symm_to_fullsymm<Mode>(m_matrix,_dest,m_perm.indices().data());\n    SparseMatrix<Scalar,(Options&RowMajor)==RowMajor ? ColMajor : RowMajor, DstIndex> tmp;\n    internal::permute_symm_to_fullsymm<Mode>(src.matrix(),tmp,src.perm().indices().data());\n    dst = tmp;\n  }\n  \n  template<typename DestType,unsigned int DestMode>\n  static void run(SparseSelfAdjointView<DestType,DestMode>& dst, const SrcXprType &src, const internal::assign_op<Scalar,typename MatrixType::Scalar> &)\n  {\n    internal::permute_symm_to_symm<Mode,DestMode>(src.matrix(),dst.matrix(),src.perm().indices().data());\n  }\n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_SPARSE_SELFADJOINTVIEW_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseCore/SparseSolverBase.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPARSESOLVERBASE_H\n#define EIGEN_SPARSESOLVERBASE_H\n\nnamespace Eigen { \n\nnamespace internal {\n\n  /** \\internal\n  * Helper functions to solve with a sparse right-hand-side and result.\n  * The rhs is decomposed into small vertical panels which are solved through dense temporaries.\n  */\ntemplate<typename Decomposition, typename Rhs, typename Dest>\ntypename enable_if<Rhs::ColsAtCompileTime!=1 && Dest::ColsAtCompileTime!=1>::type\nsolve_sparse_through_dense_panels(const Decomposition &dec, const Rhs& rhs, Dest &dest)\n{\n  EIGEN_STATIC_ASSERT((Dest::Flags&RowMajorBit)==0,THIS_METHOD_IS_ONLY_FOR_COLUMN_MAJOR_MATRICES);\n  typedef typename Dest::Scalar DestScalar;\n  // we process the sparse rhs per block of NbColsAtOnce columns temporarily stored into a dense matrix.\n  static const Index NbColsAtOnce = 4;\n  Index rhsCols = rhs.cols();\n  Index size = rhs.rows();\n  // the temporary matrices do not need more columns than NbColsAtOnce:\n  Index tmpCols = (std::min)(rhsCols, NbColsAtOnce); \n  Eigen::Matrix<DestScalar,Dynamic,Dynamic> tmp(size,tmpCols);\n  Eigen::Matrix<DestScalar,Dynamic,Dynamic> tmpX(size,tmpCols);\n  for(Index k=0; k<rhsCols; k+=NbColsAtOnce)\n  {\n    Index actualCols = std::min<Index>(rhsCols-k, NbColsAtOnce);\n    tmp.leftCols(actualCols) = rhs.middleCols(k,actualCols);\n    tmpX.leftCols(actualCols) = dec.solve(tmp.leftCols(actualCols));\n    dest.middleCols(k,actualCols) = tmpX.leftCols(actualCols).sparseView();\n  }\n}\n\n// Overload for vector as rhs\ntemplate<typename Decomposition, typename Rhs, typename Dest>\ntypename enable_if<Rhs::ColsAtCompileTime==1 || Dest::ColsAtCompileTime==1>::type\nsolve_sparse_through_dense_panels(const Decomposition &dec, const Rhs& rhs, Dest &dest)\n{\n  typedef typename Dest::Scalar DestScalar;\n  Index size = rhs.rows();\n  Eigen::Matrix<DestScalar,Dynamic,1> rhs_dense(rhs);\n  Eigen::Matrix<DestScalar,Dynamic,1> dest_dense(size);\n  dest_dense = dec.solve(rhs_dense);\n  dest = dest_dense.sparseView();\n}\n\n} // end namespace internal\n\n/** \\class SparseSolverBase\n  * \\ingroup SparseCore_Module\n  * \\brief A base class for sparse solvers\n  *\n  * \\tparam Derived the actual type of the solver.\n  *\n  */\ntemplate<typename Derived>\nclass SparseSolverBase : internal::noncopyable\n{\n  public:\n\n    /** Default constructor */\n    SparseSolverBase()\n      : m_isInitialized(false)\n    {}\n\n    ~SparseSolverBase()\n    {}\n\n    Derived& derived() { return *static_cast<Derived*>(this); }\n    const Derived& derived() const { return *static_cast<const Derived*>(this); }\n    \n    /** \\returns an expression of the solution x of \\f$ A x = b \\f$ using the current decomposition of A.\n      *\n      * \\sa compute()\n      */\n    template<typename Rhs>\n    inline const Solve<Derived, Rhs>\n    solve(const MatrixBase<Rhs>& b) const\n    {\n      eigen_assert(m_isInitialized && \"Solver is not initialized.\");\n      eigen_assert(derived().rows()==b.rows() && \"solve(): invalid number of rows of the right hand side matrix b\");\n      return Solve<Derived, Rhs>(derived(), b.derived());\n    }\n    \n    /** \\returns an expression of the solution x of \\f$ A x = b \\f$ using the current decomposition of A.\n      *\n      * \\sa compute()\n      */\n    template<typename Rhs>\n    inline const Solve<Derived, Rhs>\n    solve(const SparseMatrixBase<Rhs>& b) const\n    {\n      eigen_assert(m_isInitialized && \"Solver is not initialized.\");\n      eigen_assert(derived().rows()==b.rows() && \"solve(): invalid number of rows of the right hand side matrix b\");\n      return Solve<Derived, Rhs>(derived(), b.derived());\n    }\n    \n    #ifndef EIGEN_PARSED_BY_DOXYGEN\n    /** \\internal default implementation of solving with a sparse rhs */\n    template<typename Rhs,typename Dest>\n    void _solve_impl(const SparseMatrixBase<Rhs> &b, SparseMatrixBase<Dest> &dest) const\n    {\n      internal::solve_sparse_through_dense_panels(derived(), b.derived(), dest.derived());\n    }\n    #endif // EIGEN_PARSED_BY_DOXYGEN\n\n  protected:\n    \n    mutable bool m_isInitialized;\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_SPARSESOLVERBASE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseCore/SparseSparseProductWithPruning.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPARSESPARSEPRODUCTWITHPRUNING_H\n#define EIGEN_SPARSESPARSEPRODUCTWITHPRUNING_H\n\nnamespace Eigen { \n\nnamespace internal {\n\n\n// perform a pseudo in-place sparse * sparse product assuming all matrices are col major\ntemplate<typename Lhs, typename Rhs, typename ResultType>\nstatic void sparse_sparse_product_with_pruning_impl(const Lhs& lhs, const Rhs& rhs, ResultType& res, const typename ResultType::RealScalar& tolerance)\n{\n  // return sparse_sparse_product_with_pruning_impl2(lhs,rhs,res);\n\n  typedef typename remove_all<Rhs>::type::Scalar RhsScalar;\n  typedef typename remove_all<ResultType>::type::Scalar ResScalar;\n  typedef typename remove_all<Lhs>::type::StorageIndex StorageIndex;\n\n  // make sure to call innerSize/outerSize since we fake the storage order.\n  Index rows = lhs.innerSize();\n  Index cols = rhs.outerSize();\n  //Index size = lhs.outerSize();\n  eigen_assert(lhs.outerSize() == rhs.innerSize());\n\n  // allocate a temporary buffer\n  AmbiVector<ResScalar,StorageIndex> tempVector(rows);\n\n  // mimics a resizeByInnerOuter:\n  if(ResultType::IsRowMajor)\n    res.resize(cols, rows);\n  else\n    res.resize(rows, cols);\n  \n  evaluator<Lhs> lhsEval(lhs);\n  evaluator<Rhs> rhsEval(rhs);\n  \n  // estimate the number of non zero entries\n  // given a rhs column containing Y non zeros, we assume that the respective Y columns\n  // of the lhs differs in average of one non zeros, thus the number of non zeros for\n  // the product of a rhs column with the lhs is X+Y where X is the average number of non zero\n  // per column of the lhs.\n  // Therefore, we have nnz(lhs*rhs) = nnz(lhs) + nnz(rhs)\n  Index estimated_nnz_prod = lhsEval.nonZerosEstimate() + rhsEval.nonZerosEstimate();\n\n  res.reserve(estimated_nnz_prod);\n  double ratioColRes = double(estimated_nnz_prod)/(double(lhs.rows())*double(rhs.cols()));\n  for (Index j=0; j<cols; ++j)\n  {\n    // FIXME:\n    //double ratioColRes = (double(rhs.innerVector(j).nonZeros()) + double(lhs.nonZeros())/double(lhs.cols()))/double(lhs.rows());\n    // let's do a more accurate determination of the nnz ratio for the current column j of res\n    tempVector.init(ratioColRes);\n    tempVector.setZero();\n    for (typename evaluator<Rhs>::InnerIterator rhsIt(rhsEval, j); rhsIt; ++rhsIt)\n    {\n      // FIXME should be written like this: tmp += rhsIt.value() * lhs.col(rhsIt.index())\n      tempVector.restart();\n      RhsScalar x = rhsIt.value();\n      for (typename evaluator<Lhs>::InnerIterator lhsIt(lhsEval, rhsIt.index()); lhsIt; ++lhsIt)\n      {\n        tempVector.coeffRef(lhsIt.index()) += lhsIt.value() * x;\n      }\n    }\n    res.startVec(j);\n    for (typename AmbiVector<ResScalar,StorageIndex>::Iterator it(tempVector,tolerance); it; ++it)\n      res.insertBackByOuterInner(j,it.index()) = it.value();\n  }\n  res.finalize();\n}\n\ntemplate<typename Lhs, typename Rhs, typename ResultType,\n  int LhsStorageOrder = traits<Lhs>::Flags&RowMajorBit,\n  int RhsStorageOrder = traits<Rhs>::Flags&RowMajorBit,\n  int ResStorageOrder = traits<ResultType>::Flags&RowMajorBit>\nstruct sparse_sparse_product_with_pruning_selector;\n\ntemplate<typename Lhs, typename Rhs, typename ResultType>\nstruct sparse_sparse_product_with_pruning_selector<Lhs,Rhs,ResultType,ColMajor,ColMajor,ColMajor>\n{\n  typedef typename ResultType::RealScalar RealScalar;\n\n  static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res, const RealScalar& tolerance)\n  {\n    typename remove_all<ResultType>::type _res(res.rows(), res.cols());\n    internal::sparse_sparse_product_with_pruning_impl<Lhs,Rhs,ResultType>(lhs, rhs, _res, tolerance);\n    res.swap(_res);\n  }\n};\n\ntemplate<typename Lhs, typename Rhs, typename ResultType>\nstruct sparse_sparse_product_with_pruning_selector<Lhs,Rhs,ResultType,ColMajor,ColMajor,RowMajor>\n{\n  typedef typename ResultType::RealScalar RealScalar;\n  static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res, const RealScalar& tolerance)\n  {\n    // we need a col-major matrix to hold the result\n    typedef SparseMatrix<typename ResultType::Scalar,ColMajor,typename ResultType::StorageIndex> SparseTemporaryType;\n    SparseTemporaryType _res(res.rows(), res.cols());\n    internal::sparse_sparse_product_with_pruning_impl<Lhs,Rhs,SparseTemporaryType>(lhs, rhs, _res, tolerance);\n    res = _res;\n  }\n};\n\ntemplate<typename Lhs, typename Rhs, typename ResultType>\nstruct sparse_sparse_product_with_pruning_selector<Lhs,Rhs,ResultType,RowMajor,RowMajor,RowMajor>\n{\n  typedef typename ResultType::RealScalar RealScalar;\n  static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res, const RealScalar& tolerance)\n  {\n    // let's transpose the product to get a column x column product\n    typename remove_all<ResultType>::type _res(res.rows(), res.cols());\n    internal::sparse_sparse_product_with_pruning_impl<Rhs,Lhs,ResultType>(rhs, lhs, _res, tolerance);\n    res.swap(_res);\n  }\n};\n\ntemplate<typename Lhs, typename Rhs, typename ResultType>\nstruct sparse_sparse_product_with_pruning_selector<Lhs,Rhs,ResultType,RowMajor,RowMajor,ColMajor>\n{\n  typedef typename ResultType::RealScalar RealScalar;\n  static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res, const RealScalar& tolerance)\n  {\n    typedef SparseMatrix<typename Lhs::Scalar,ColMajor,typename Lhs::StorageIndex> ColMajorMatrixLhs;\n    typedef SparseMatrix<typename Rhs::Scalar,ColMajor,typename Lhs::StorageIndex> ColMajorMatrixRhs;\n    ColMajorMatrixLhs colLhs(lhs);\n    ColMajorMatrixRhs colRhs(rhs);\n    internal::sparse_sparse_product_with_pruning_impl<ColMajorMatrixLhs,ColMajorMatrixRhs,ResultType>(colLhs, colRhs, res, tolerance);\n\n    // let's transpose the product to get a column x column product\n//     typedef SparseMatrix<typename ResultType::Scalar> SparseTemporaryType;\n//     SparseTemporaryType _res(res.cols(), res.rows());\n//     sparse_sparse_product_with_pruning_impl<Rhs,Lhs,SparseTemporaryType>(rhs, lhs, _res);\n//     res = _res.transpose();\n  }\n};\n\ntemplate<typename Lhs, typename Rhs, typename ResultType>\nstruct sparse_sparse_product_with_pruning_selector<Lhs,Rhs,ResultType,ColMajor,RowMajor,RowMajor>\n{\n  typedef typename ResultType::RealScalar RealScalar;\n  static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res, const RealScalar& tolerance)\n  {\n    typedef SparseMatrix<typename Lhs::Scalar,RowMajor,typename Lhs::StorageIndex> RowMajorMatrixLhs;\n    RowMajorMatrixLhs rowLhs(lhs);\n    sparse_sparse_product_with_pruning_selector<RowMajorMatrixLhs,Rhs,ResultType,RowMajor,RowMajor>(rowLhs,rhs,res,tolerance);\n  }\n};\n\ntemplate<typename Lhs, typename Rhs, typename ResultType>\nstruct sparse_sparse_product_with_pruning_selector<Lhs,Rhs,ResultType,RowMajor,ColMajor,RowMajor>\n{\n  typedef typename ResultType::RealScalar RealScalar;\n  static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res, const RealScalar& tolerance)\n  {\n    typedef SparseMatrix<typename Rhs::Scalar,RowMajor,typename Lhs::StorageIndex> RowMajorMatrixRhs;\n    RowMajorMatrixRhs rowRhs(rhs);\n    sparse_sparse_product_with_pruning_selector<Lhs,RowMajorMatrixRhs,ResultType,RowMajor,RowMajor,RowMajor>(lhs,rowRhs,res,tolerance);\n  }\n};\n\ntemplate<typename Lhs, typename Rhs, typename ResultType>\nstruct sparse_sparse_product_with_pruning_selector<Lhs,Rhs,ResultType,ColMajor,RowMajor,ColMajor>\n{\n  typedef typename ResultType::RealScalar RealScalar;\n  static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res, const RealScalar& tolerance)\n  {\n    typedef SparseMatrix<typename Rhs::Scalar,ColMajor,typename Lhs::StorageIndex> ColMajorMatrixRhs;\n    ColMajorMatrixRhs colRhs(rhs);\n    internal::sparse_sparse_product_with_pruning_impl<Lhs,ColMajorMatrixRhs,ResultType>(lhs, colRhs, res, tolerance);\n  }\n};\n\ntemplate<typename Lhs, typename Rhs, typename ResultType>\nstruct sparse_sparse_product_with_pruning_selector<Lhs,Rhs,ResultType,RowMajor,ColMajor,ColMajor>\n{\n  typedef typename ResultType::RealScalar RealScalar;\n  static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res, const RealScalar& tolerance)\n  {\n    typedef SparseMatrix<typename Lhs::Scalar,ColMajor,typename Lhs::StorageIndex> ColMajorMatrixLhs;\n    ColMajorMatrixLhs colLhs(lhs);\n    internal::sparse_sparse_product_with_pruning_impl<ColMajorMatrixLhs,Rhs,ResultType>(colLhs, rhs, res, tolerance);\n  }\n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_SPARSESPARSEPRODUCTWITHPRUNING_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseCore/SparseTranspose.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2015 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPARSETRANSPOSE_H\n#define EIGEN_SPARSETRANSPOSE_H\n\nnamespace Eigen { \n\nnamespace internal {\n  template<typename MatrixType,int CompressedAccess=int(MatrixType::Flags&CompressedAccessBit)>\n  class SparseTransposeImpl\n    : public SparseMatrixBase<Transpose<MatrixType> >\n  {};\n  \n  template<typename MatrixType>\n  class SparseTransposeImpl<MatrixType,CompressedAccessBit>\n    : public SparseCompressedBase<Transpose<MatrixType> >\n  {\n    typedef SparseCompressedBase<Transpose<MatrixType> > Base;\n  public:\n    using Base::derived;\n    typedef typename Base::Scalar Scalar;\n    typedef typename Base::StorageIndex StorageIndex;\n\n    inline Index nonZeros() const { return derived().nestedExpression().nonZeros(); }\n    \n    inline const Scalar* valuePtr() const { return derived().nestedExpression().valuePtr(); }\n    inline const StorageIndex* innerIndexPtr() const { return derived().nestedExpression().innerIndexPtr(); }\n    inline const StorageIndex* outerIndexPtr() const { return derived().nestedExpression().outerIndexPtr(); }\n    inline const StorageIndex* innerNonZeroPtr() const { return derived().nestedExpression().innerNonZeroPtr(); }\n\n    inline Scalar* valuePtr() { return derived().nestedExpression().valuePtr(); }\n    inline StorageIndex* innerIndexPtr() { return derived().nestedExpression().innerIndexPtr(); }\n    inline StorageIndex* outerIndexPtr() { return derived().nestedExpression().outerIndexPtr(); }\n    inline StorageIndex* innerNonZeroPtr() { return derived().nestedExpression().innerNonZeroPtr(); }\n  };\n}\n  \ntemplate<typename MatrixType> class TransposeImpl<MatrixType,Sparse>\n  : public internal::SparseTransposeImpl<MatrixType>\n{\n  protected:\n    typedef internal::SparseTransposeImpl<MatrixType> Base;\n};\n\nnamespace internal {\n  \ntemplate<typename ArgType>\nstruct unary_evaluator<Transpose<ArgType>, IteratorBased>\n  : public evaluator_base<Transpose<ArgType> >\n{\n    typedef typename evaluator<ArgType>::InnerIterator        EvalIterator;\n  public:\n    typedef Transpose<ArgType> XprType;\n    \n    inline Index nonZerosEstimate() const {\n      return m_argImpl.nonZerosEstimate();\n    }\n\n    class InnerIterator : public EvalIterator\n    {\n    public:\n      EIGEN_STRONG_INLINE InnerIterator(const unary_evaluator& unaryOp, Index outer)\n        : EvalIterator(unaryOp.m_argImpl,outer)\n      {}\n      \n      Index row() const { return EvalIterator::col(); }\n      Index col() const { return EvalIterator::row(); }\n    };\n    \n    enum {\n      CoeffReadCost = evaluator<ArgType>::CoeffReadCost,\n      Flags = XprType::Flags\n    };\n    \n    explicit unary_evaluator(const XprType& op) :m_argImpl(op.nestedExpression()) {}\n\n  protected:\n    evaluator<ArgType> m_argImpl;\n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_SPARSETRANSPOSE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseCore/SparseTriangularView.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009-2015 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2012 Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPARSE_TRIANGULARVIEW_H\n#define EIGEN_SPARSE_TRIANGULARVIEW_H\n\nnamespace Eigen {\n\n/** \\ingroup SparseCore_Module\n  *\n  * \\brief Base class for a triangular part in a \\b sparse matrix\n  *\n  * This class is an abstract base class of class TriangularView, and objects of type TriangularViewImpl cannot be instantiated.\n  * It extends class TriangularView with additional methods which are available for sparse expressions only.\n  *\n  * \\sa class TriangularView, SparseMatrixBase::triangularView()\n  */\ntemplate<typename MatrixType, unsigned int Mode> class TriangularViewImpl<MatrixType,Mode,Sparse>\n  : public SparseMatrixBase<TriangularView<MatrixType,Mode> >\n{\n    enum { SkipFirst = ((Mode&Lower) && !(MatrixType::Flags&RowMajorBit))\n                    || ((Mode&Upper) &&  (MatrixType::Flags&RowMajorBit)),\n           SkipLast = !SkipFirst,\n           SkipDiag = (Mode&ZeroDiag) ? 1 : 0,\n           HasUnitDiag = (Mode&UnitDiag) ? 1 : 0\n    };\n    \n    typedef TriangularView<MatrixType,Mode> TriangularViewType;\n    \n  protected:\n    // dummy solve function to make TriangularView happy.\n    void solve() const;\n\n    typedef SparseMatrixBase<TriangularViewType> Base;\n  public:\n    \n    EIGEN_SPARSE_PUBLIC_INTERFACE(TriangularViewType)\n    \n    typedef typename MatrixType::Nested MatrixTypeNested;\n    typedef typename internal::remove_reference<MatrixTypeNested>::type MatrixTypeNestedNonRef;\n    typedef typename internal::remove_all<MatrixTypeNested>::type MatrixTypeNestedCleaned;\n\n    template<typename RhsType, typename DstType>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE void _solve_impl(const RhsType &rhs, DstType &dst) const {\n      if(!(internal::is_same<RhsType,DstType>::value && internal::extract_data(dst) == internal::extract_data(rhs)))\n        dst = rhs;\n      this->solveInPlace(dst);\n    }\n\n    /** Applies the inverse of \\c *this to the dense vector or matrix \\a other, \"in-place\" */\n    template<typename OtherDerived> void solveInPlace(MatrixBase<OtherDerived>& other) const;\n\n    /** Applies the inverse of \\c *this to the sparse vector or matrix \\a other, \"in-place\" */\n    template<typename OtherDerived> void solveInPlace(SparseMatrixBase<OtherDerived>& other) const;\n  \n};\n\nnamespace internal {\n\ntemplate<typename ArgType, unsigned int Mode>\nstruct unary_evaluator<TriangularView<ArgType,Mode>, IteratorBased>\n : evaluator_base<TriangularView<ArgType,Mode> >\n{\n  typedef TriangularView<ArgType,Mode> XprType;\n  \nprotected:\n  \n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::StorageIndex StorageIndex;\n  typedef typename evaluator<ArgType>::InnerIterator EvalIterator;\n  \n  enum { SkipFirst = ((Mode&Lower) && !(ArgType::Flags&RowMajorBit))\n                    || ((Mode&Upper) &&  (ArgType::Flags&RowMajorBit)),\n         SkipLast = !SkipFirst,\n         SkipDiag = (Mode&ZeroDiag) ? 1 : 0,\n         HasUnitDiag = (Mode&UnitDiag) ? 1 : 0\n  };\n  \npublic:\n  \n  enum {\n    CoeffReadCost = evaluator<ArgType>::CoeffReadCost,\n    Flags = XprType::Flags\n  };\n    \n  explicit unary_evaluator(const XprType &xpr) : m_argImpl(xpr.nestedExpression()), m_arg(xpr.nestedExpression()) {}\n  \n  inline Index nonZerosEstimate() const {\n    return m_argImpl.nonZerosEstimate();\n  }\n  \n  class InnerIterator : public EvalIterator\n  {\n      typedef EvalIterator Base;\n    public:\n\n      EIGEN_STRONG_INLINE InnerIterator(const unary_evaluator& xprEval, Index outer)\n        : Base(xprEval.m_argImpl,outer), m_returnOne(false), m_containsDiag(Base::outer()<xprEval.m_arg.innerSize())\n      {\n        if(SkipFirst)\n        {\n          while((*this) && ((HasUnitDiag||SkipDiag)  ? this->index()<=outer : this->index()<outer))\n            Base::operator++();\n          if(HasUnitDiag)\n            m_returnOne = m_containsDiag;\n        }\n        else if(HasUnitDiag && ((!Base::operator bool()) || Base::index()>=Base::outer()))\n        {\n          if((!SkipFirst) && Base::operator bool())\n            Base::operator++();\n          m_returnOne = m_containsDiag;\n        }\n      }\n\n      EIGEN_STRONG_INLINE InnerIterator& operator++()\n      {\n        if(HasUnitDiag && m_returnOne)\n          m_returnOne = false;\n        else\n        {\n          Base::operator++();\n          if(HasUnitDiag && (!SkipFirst) && ((!Base::operator bool()) || Base::index()>=Base::outer()))\n          {\n            if((!SkipFirst) && Base::operator bool())\n              Base::operator++();\n            m_returnOne = m_containsDiag;\n          }\n        }\n        return *this;\n      }\n      \n      EIGEN_STRONG_INLINE operator bool() const\n      {\n        if(HasUnitDiag && m_returnOne)\n          return true;\n        if(SkipFirst) return  Base::operator bool();\n        else\n        {\n          if (SkipDiag) return (Base::operator bool() && this->index() < this->outer());\n          else return (Base::operator bool() && this->index() <= this->outer());\n        }\n      }\n\n//       inline Index row() const { return (ArgType::Flags&RowMajorBit ? Base::outer() : this->index()); }\n//       inline Index col() const { return (ArgType::Flags&RowMajorBit ? this->index() : Base::outer()); }\n      inline StorageIndex index() const\n      {\n        if(HasUnitDiag && m_returnOne)  return internal::convert_index<StorageIndex>(Base::outer());\n        else                            return Base::index();\n      }\n      inline Scalar value() const\n      {\n        if(HasUnitDiag && m_returnOne)  return Scalar(1);\n        else                            return Base::value();\n      }\n\n    protected:\n      bool m_returnOne;\n      bool m_containsDiag;\n    private:\n      Scalar& valueRef();\n  };\n  \nprotected:\n  evaluator<ArgType> m_argImpl;\n  const ArgType& m_arg;\n};\n\n} // end namespace internal\n\ntemplate<typename Derived>\ntemplate<int Mode>\ninline const TriangularView<const Derived, Mode>\nSparseMatrixBase<Derived>::triangularView() const\n{\n  return TriangularView<const Derived, Mode>(derived());\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_SPARSE_TRIANGULARVIEW_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseCore/SparseUtil.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPARSEUTIL_H\n#define EIGEN_SPARSEUTIL_H\n\nnamespace Eigen { \n\n#ifdef NDEBUG\n#define EIGEN_DBG_SPARSE(X)\n#else\n#define EIGEN_DBG_SPARSE(X) X\n#endif\n\n#define EIGEN_SPARSE_INHERIT_ASSIGNMENT_OPERATOR(Derived, Op) \\\ntemplate<typename OtherDerived> \\\nEIGEN_STRONG_INLINE Derived& operator Op(const Eigen::SparseMatrixBase<OtherDerived>& other) \\\n{ \\\n  return Base::operator Op(other.derived()); \\\n} \\\nEIGEN_STRONG_INLINE Derived& operator Op(const Derived& other) \\\n{ \\\n  return Base::operator Op(other); \\\n}\n\n#define EIGEN_SPARSE_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Derived, Op) \\\ntemplate<typename Other> \\\nEIGEN_STRONG_INLINE Derived& operator Op(const Other& scalar) \\\n{ \\\n  return Base::operator Op(scalar); \\\n}\n\n#define EIGEN_SPARSE_INHERIT_ASSIGNMENT_OPERATORS(Derived) \\\nEIGEN_SPARSE_INHERIT_ASSIGNMENT_OPERATOR(Derived, =)\n\n\n#define EIGEN_SPARSE_PUBLIC_INTERFACE(Derived) \\\n  EIGEN_GENERIC_PUBLIC_INTERFACE(Derived)\n\n  \nconst int CoherentAccessPattern     = 0x1;\nconst int InnerRandomAccessPattern  = 0x2 | CoherentAccessPattern;\nconst int OuterRandomAccessPattern  = 0x4 | CoherentAccessPattern;\nconst int RandomAccessPattern       = 0x8 | OuterRandomAccessPattern | InnerRandomAccessPattern;\n\ntemplate<typename _Scalar, int _Flags = 0, typename _StorageIndex = int>  class SparseMatrix;\ntemplate<typename _Scalar, int _Flags = 0, typename _StorageIndex = int>  class DynamicSparseMatrix;\ntemplate<typename _Scalar, int _Flags = 0, typename _StorageIndex = int>  class SparseVector;\ntemplate<typename _Scalar, int _Flags = 0, typename _StorageIndex = int>  class MappedSparseMatrix;\n\ntemplate<typename MatrixType, unsigned int UpLo>  class SparseSelfAdjointView;\ntemplate<typename Lhs, typename Rhs>              class SparseDiagonalProduct;\ntemplate<typename MatrixType> class SparseView;\n\ntemplate<typename Lhs, typename Rhs>        class SparseSparseProduct;\ntemplate<typename Lhs, typename Rhs>        class SparseTimeDenseProduct;\ntemplate<typename Lhs, typename Rhs>        class DenseTimeSparseProduct;\ntemplate<typename Lhs, typename Rhs, bool Transpose> class SparseDenseOuterProduct;\n\ntemplate<typename Lhs, typename Rhs> struct SparseSparseProductReturnType;\ntemplate<typename Lhs, typename Rhs,\n         int InnerSize = EIGEN_SIZE_MIN_PREFER_FIXED(internal::traits<Lhs>::ColsAtCompileTime,internal::traits<Rhs>::RowsAtCompileTime)> struct DenseSparseProductReturnType;\n         \ntemplate<typename Lhs, typename Rhs,\n         int InnerSize = EIGEN_SIZE_MIN_PREFER_FIXED(internal::traits<Lhs>::ColsAtCompileTime,internal::traits<Rhs>::RowsAtCompileTime)> struct SparseDenseProductReturnType;\ntemplate<typename MatrixType,int UpLo> class SparseSymmetricPermutationProduct;\n\nnamespace internal {\n\ntemplate<typename T,int Rows,int Cols,int Flags> struct sparse_eval;\n\ntemplate<typename T> struct eval<T,Sparse>\n  : sparse_eval<T, traits<T>::RowsAtCompileTime,traits<T>::ColsAtCompileTime,traits<T>::Flags>\n{};\n\ntemplate<typename T,int Cols,int Flags> struct sparse_eval<T,1,Cols,Flags> {\n    typedef typename traits<T>::Scalar _Scalar;\n    typedef typename traits<T>::StorageIndex _StorageIndex;\n  public:\n    typedef SparseVector<_Scalar, RowMajor, _StorageIndex> type;\n};\n\ntemplate<typename T,int Rows,int Flags> struct sparse_eval<T,Rows,1,Flags> {\n    typedef typename traits<T>::Scalar _Scalar;\n    typedef typename traits<T>::StorageIndex _StorageIndex;\n  public:\n    typedef SparseVector<_Scalar, ColMajor, _StorageIndex> type;\n};\n\n// TODO this seems almost identical to plain_matrix_type<T, Sparse>\ntemplate<typename T,int Rows,int Cols,int Flags> struct sparse_eval {\n    typedef typename traits<T>::Scalar _Scalar;\n    typedef typename traits<T>::StorageIndex _StorageIndex;\n    enum { _Options = ((Flags&RowMajorBit)==RowMajorBit) ? RowMajor : ColMajor };\n  public:\n    typedef SparseMatrix<_Scalar, _Options, _StorageIndex> type;\n};\n\ntemplate<typename T,int Flags> struct sparse_eval<T,1,1,Flags> {\n    typedef typename traits<T>::Scalar _Scalar;\n  public:\n    typedef Matrix<_Scalar, 1, 1> type;\n};\n\ntemplate<typename T> struct plain_matrix_type<T,Sparse>\n{\n  typedef typename traits<T>::Scalar _Scalar;\n  typedef typename traits<T>::StorageIndex _StorageIndex;\n  enum { _Options = ((evaluator<T>::Flags&RowMajorBit)==RowMajorBit) ? RowMajor : ColMajor };\n  public:\n    typedef SparseMatrix<_Scalar, _Options, _StorageIndex> type;\n};\n\ntemplate<typename T>\nstruct plain_object_eval<T,Sparse>\n  : sparse_eval<T, traits<T>::RowsAtCompileTime,traits<T>::ColsAtCompileTime, evaluator<T>::Flags>\n{};\n\ntemplate<typename Decomposition, typename RhsType>\nstruct solve_traits<Decomposition,RhsType,Sparse>\n{\n  typedef typename sparse_eval<RhsType, RhsType::RowsAtCompileTime, RhsType::ColsAtCompileTime,traits<RhsType>::Flags>::type PlainObject;\n};\n\ntemplate<typename Derived>\nstruct generic_xpr_base<Derived, MatrixXpr, Sparse>\n{\n  typedef SparseMatrixBase<Derived> type;\n};\n\nstruct SparseTriangularShape  { static std::string debugName() { return \"SparseTriangularShape\"; } };\nstruct SparseSelfAdjointShape { static std::string debugName() { return \"SparseSelfAdjointShape\"; } };\n\ntemplate<> struct glue_shapes<SparseShape,SelfAdjointShape> { typedef SparseSelfAdjointShape type;  };\ntemplate<> struct glue_shapes<SparseShape,TriangularShape > { typedef SparseTriangularShape  type;  };\n\n// return type of SparseCompressedBase::lower_bound;\nstruct LowerBoundIndex {\n  LowerBoundIndex() : value(-1), found(false) {}\n  LowerBoundIndex(Index val, bool ok) : value(val), found(ok) {}\n  Index value;\n  bool found;\n};\n\n} // end namespace internal\n\n/** \\ingroup SparseCore_Module\n  *\n  * \\class Triplet\n  *\n  * \\brief A small structure to hold a non zero as a triplet (i,j,value).\n  *\n  * \\sa SparseMatrix::setFromTriplets()\n  */\ntemplate<typename Scalar, typename StorageIndex=typename SparseMatrix<Scalar>::StorageIndex >\nclass Triplet\n{\npublic:\n  Triplet() : m_row(0), m_col(0), m_value(0) {}\n\n  Triplet(const StorageIndex& i, const StorageIndex& j, const Scalar& v = Scalar(0))\n    : m_row(i), m_col(j), m_value(v)\n  {}\n\n  /** \\returns the row index of the element */\n  const StorageIndex& row() const { return m_row; }\n\n  /** \\returns the column index of the element */\n  const StorageIndex& col() const { return m_col; }\n\n  /** \\returns the value of the element */\n  const Scalar& value() const { return m_value; }\nprotected:\n  StorageIndex m_row, m_col;\n  Scalar m_value;\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_SPARSEUTIL_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseCore/SparseVector.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2015 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPARSEVECTOR_H\n#define EIGEN_SPARSEVECTOR_H\n\nnamespace Eigen { \n\n/** \\ingroup SparseCore_Module\n  * \\class SparseVector\n  *\n  * \\brief a sparse vector class\n  *\n  * \\tparam _Scalar the scalar type, i.e. the type of the coefficients\n  *\n  * See http://www.netlib.org/linalg/html_templates/node91.html for details on the storage scheme.\n  *\n  * This class can be extended with the help of the plugin mechanism described on the page\n  * \\ref TopicCustomizing_Plugins by defining the preprocessor symbol \\c EIGEN_SPARSEVECTOR_PLUGIN.\n  */\n\nnamespace internal {\ntemplate<typename _Scalar, int _Options, typename _StorageIndex>\nstruct traits<SparseVector<_Scalar, _Options, _StorageIndex> >\n{\n  typedef _Scalar Scalar;\n  typedef _StorageIndex StorageIndex;\n  typedef Sparse StorageKind;\n  typedef MatrixXpr XprKind;\n  enum {\n    IsColVector = (_Options & RowMajorBit) ? 0 : 1,\n\n    RowsAtCompileTime = IsColVector ? Dynamic : 1,\n    ColsAtCompileTime = IsColVector ? 1 : Dynamic,\n    MaxRowsAtCompileTime = RowsAtCompileTime,\n    MaxColsAtCompileTime = ColsAtCompileTime,\n    Flags = _Options | NestByRefBit | LvalueBit | (IsColVector ? 0 : RowMajorBit) | CompressedAccessBit,\n    SupportedAccessPatterns = InnerRandomAccessPattern\n  };\n};\n\n// Sparse-Vector-Assignment kinds:\nenum {\n  SVA_RuntimeSwitch,\n  SVA_Inner,\n  SVA_Outer\n};\n\ntemplate< typename Dest, typename Src,\n          int AssignmentKind = !bool(Src::IsVectorAtCompileTime) ? SVA_RuntimeSwitch\n                             : Src::InnerSizeAtCompileTime==1 ? SVA_Outer\n                             : SVA_Inner>\nstruct sparse_vector_assign_selector;\n\n}\n\ntemplate<typename _Scalar, int _Options, typename _StorageIndex>\nclass SparseVector\n  : public SparseCompressedBase<SparseVector<_Scalar, _Options, _StorageIndex> >\n{\n    typedef SparseCompressedBase<SparseVector> Base;\n    using Base::convert_index;\n  public:\n    EIGEN_SPARSE_PUBLIC_INTERFACE(SparseVector)\n    EIGEN_SPARSE_INHERIT_ASSIGNMENT_OPERATOR(SparseVector, +=)\n    EIGEN_SPARSE_INHERIT_ASSIGNMENT_OPERATOR(SparseVector, -=)\n    \n    typedef internal::CompressedStorage<Scalar,StorageIndex> Storage;\n    enum { IsColVector = internal::traits<SparseVector>::IsColVector };\n    \n    enum {\n      Options = _Options\n    };\n    \n    EIGEN_STRONG_INLINE Index rows() const { return IsColVector ? m_size : 1; }\n    EIGEN_STRONG_INLINE Index cols() const { return IsColVector ? 1 : m_size; }\n    EIGEN_STRONG_INLINE Index innerSize() const { return m_size; }\n    EIGEN_STRONG_INLINE Index outerSize() const { return 1; }\n\n    EIGEN_STRONG_INLINE const Scalar* valuePtr() const { return m_data.valuePtr(); }\n    EIGEN_STRONG_INLINE Scalar* valuePtr() { return m_data.valuePtr(); }\n\n    EIGEN_STRONG_INLINE const StorageIndex* innerIndexPtr() const { return m_data.indexPtr(); }\n    EIGEN_STRONG_INLINE StorageIndex* innerIndexPtr() { return m_data.indexPtr(); }\n\n    inline const StorageIndex* outerIndexPtr() const { return 0; }\n    inline StorageIndex* outerIndexPtr() { return 0; }\n    inline const StorageIndex* innerNonZeroPtr() const { return 0; }\n    inline StorageIndex* innerNonZeroPtr() { return 0; }\n    \n    /** \\internal */\n    inline Storage& data() { return m_data; }\n    /** \\internal */\n    inline const Storage& data() const { return m_data; }\n\n    inline Scalar coeff(Index row, Index col) const\n    {\n      eigen_assert(IsColVector ? (col==0 && row>=0 && row<m_size) : (row==0 && col>=0 && col<m_size));\n      return coeff(IsColVector ? row : col);\n    }\n    inline Scalar coeff(Index i) const\n    {\n      eigen_assert(i>=0 && i<m_size);\n      return m_data.at(StorageIndex(i));\n    }\n\n    inline Scalar& coeffRef(Index row, Index col)\n    {\n      eigen_assert(IsColVector ? (col==0 && row>=0 && row<m_size) : (row==0 && col>=0 && col<m_size));\n      return coeffRef(IsColVector ? row : col);\n    }\n\n    /** \\returns a reference to the coefficient value at given index \\a i\n      * This operation involes a log(rho*size) binary search. If the coefficient does not\n      * exist yet, then a sorted insertion into a sequential buffer is performed.\n      *\n      * This insertion might be very costly if the number of nonzeros above \\a i is large.\n      */\n    inline Scalar& coeffRef(Index i)\n    {\n      eigen_assert(i>=0 && i<m_size);\n\n      return m_data.atWithInsertion(StorageIndex(i));\n    }\n\n  public:\n\n    typedef typename Base::InnerIterator InnerIterator;\n    typedef typename Base::ReverseInnerIterator ReverseInnerIterator;\n\n    inline void setZero() { m_data.clear(); }\n\n    /** \\returns the number of non zero coefficients */\n    inline Index nonZeros() const  { return m_data.size(); }\n\n    inline void startVec(Index outer)\n    {\n      EIGEN_UNUSED_VARIABLE(outer);\n      eigen_assert(outer==0);\n    }\n\n    inline Scalar& insertBackByOuterInner(Index outer, Index inner)\n    {\n      EIGEN_UNUSED_VARIABLE(outer);\n      eigen_assert(outer==0);\n      return insertBack(inner);\n    }\n    inline Scalar& insertBack(Index i)\n    {\n      m_data.append(0, i);\n      return m_data.value(m_data.size()-1);\n    }\n    \n    Scalar& insertBackByOuterInnerUnordered(Index outer, Index inner)\n    {\n      EIGEN_UNUSED_VARIABLE(outer);\n      eigen_assert(outer==0);\n      return insertBackUnordered(inner);\n    }\n    inline Scalar& insertBackUnordered(Index i)\n    {\n      m_data.append(0, i);\n      return m_data.value(m_data.size()-1);\n    }\n\n    inline Scalar& insert(Index row, Index col)\n    {\n      eigen_assert(IsColVector ? (col==0 && row>=0 && row<m_size) : (row==0 && col>=0 && col<m_size));\n      \n      Index inner = IsColVector ? row : col;\n      Index outer = IsColVector ? col : row;\n      EIGEN_ONLY_USED_FOR_DEBUG(outer);\n      eigen_assert(outer==0);\n      return insert(inner);\n    }\n    Scalar& insert(Index i)\n    {\n      eigen_assert(i>=0 && i<m_size);\n      \n      Index startId = 0;\n      Index p = Index(m_data.size()) - 1;\n      // TODO smart realloc\n      m_data.resize(p+2,1);\n\n      while ( (p >= startId) && (m_data.index(p) > i) )\n      {\n        m_data.index(p+1) = m_data.index(p);\n        m_data.value(p+1) = m_data.value(p);\n        --p;\n      }\n      m_data.index(p+1) = convert_index(i);\n      m_data.value(p+1) = 0;\n      return m_data.value(p+1);\n    }\n\n    /**\n      */\n    inline void reserve(Index reserveSize) { m_data.reserve(reserveSize); }\n\n\n    inline void finalize() {}\n\n    /** \\copydoc SparseMatrix::prune(const Scalar&,const RealScalar&) */\n    void prune(const Scalar& reference, const RealScalar& epsilon = NumTraits<RealScalar>::dummy_precision())\n    {\n      m_data.prune(reference,epsilon);\n    }\n\n    /** Resizes the sparse vector to \\a rows x \\a cols\n      *\n      * This method is provided for compatibility with matrices.\n      * For a column vector, \\a cols must be equal to 1.\n      * For a row vector, \\a rows must be equal to 1.\n      *\n      * \\sa resize(Index)\n      */\n    void resize(Index rows, Index cols)\n    {\n      eigen_assert((IsColVector ? cols : rows)==1 && \"Outer dimension must equal 1\");\n      resize(IsColVector ? rows : cols);\n    }\n\n    /** Resizes the sparse vector to \\a newSize\n      * This method deletes all entries, thus leaving an empty sparse vector\n      *\n      * \\sa  conservativeResize(), setZero() */\n    void resize(Index newSize)\n    {\n      m_size = newSize;\n      m_data.clear();\n    }\n\n    /** Resizes the sparse vector to \\a newSize, while leaving old values untouched.\n      *\n      * If the size of the vector is decreased, then the storage of the out-of bounds coefficients is kept and reserved.\n      * Call .data().squeeze() to free extra memory.\n      *\n      * \\sa reserve(), setZero()\n      */\n    void conservativeResize(Index newSize)\n    {\n      if (newSize < m_size)\n      {\n        Index i = 0;\n        while (i<m_data.size() && m_data.index(i)<newSize) ++i;\n        m_data.resize(i);\n      }\n      m_size = newSize;\n    }\n\n    void resizeNonZeros(Index size) { m_data.resize(size); }\n\n    inline SparseVector() : m_size(0) { check_template_parameters(); resize(0); }\n\n    explicit inline SparseVector(Index size) : m_size(0) { check_template_parameters(); resize(size); }\n\n    inline SparseVector(Index rows, Index cols) : m_size(0) { check_template_parameters(); resize(rows,cols); }\n\n    template<typename OtherDerived>\n    inline SparseVector(const SparseMatrixBase<OtherDerived>& other)\n      : m_size(0)\n    {\n      #ifdef EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN\n        EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN\n      #endif\n      check_template_parameters();\n      *this = other.derived();\n    }\n\n    inline SparseVector(const SparseVector& other)\n      : Base(other), m_size(0)\n    {\n      check_template_parameters();\n      *this = other.derived();\n    }\n\n    /** Swaps the values of \\c *this and \\a other.\n      * Overloaded for performance: this version performs a \\em shallow swap by swapping pointers and attributes only.\n      * \\sa SparseMatrixBase::swap()\n      */\n    inline void swap(SparseVector& other)\n    {\n      std::swap(m_size, other.m_size);\n      m_data.swap(other.m_data);\n    }\n\n    template<int OtherOptions>\n    inline void swap(SparseMatrix<Scalar,OtherOptions,StorageIndex>& other)\n    {\n      eigen_assert(other.outerSize()==1);\n      std::swap(m_size, other.m_innerSize);\n      m_data.swap(other.m_data);\n    }\n\n    inline SparseVector& operator=(const SparseVector& other)\n    {\n      if (other.isRValue())\n      {\n        swap(other.const_cast_derived());\n      }\n      else\n      {\n        resize(other.size());\n        m_data = other.m_data;\n      }\n      return *this;\n    }\n\n    template<typename OtherDerived>\n    inline SparseVector& operator=(const SparseMatrixBase<OtherDerived>& other)\n    {\n      SparseVector tmp(other.size());\n      internal::sparse_vector_assign_selector<SparseVector,OtherDerived>::run(tmp,other.derived());\n      this->swap(tmp);\n      return *this;\n    }\n\n    #ifndef EIGEN_PARSED_BY_DOXYGEN\n    template<typename Lhs, typename Rhs>\n    inline SparseVector& operator=(const SparseSparseProduct<Lhs,Rhs>& product)\n    {\n      return Base::operator=(product);\n    }\n    #endif\n\n    friend std::ostream & operator << (std::ostream & s, const SparseVector& m)\n    {\n      for (Index i=0; i<m.nonZeros(); ++i)\n        s << \"(\" << m.m_data.value(i) << \",\" << m.m_data.index(i) << \") \";\n      s << std::endl;\n      return s;\n    }\n\n    /** Destructor */\n    inline ~SparseVector() {}\n\n    /** Overloaded for performance */\n    Scalar sum() const;\n\n  public:\n\n    /** \\internal \\deprecated use setZero() and reserve() */\n    EIGEN_DEPRECATED void startFill(Index reserve)\n    {\n      setZero();\n      m_data.reserve(reserve);\n    }\n\n    /** \\internal \\deprecated use insertBack(Index,Index) */\n    EIGEN_DEPRECATED Scalar& fill(Index r, Index c)\n    {\n      eigen_assert(r==0 || c==0);\n      return fill(IsColVector ? r : c);\n    }\n\n    /** \\internal \\deprecated use insertBack(Index) */\n    EIGEN_DEPRECATED Scalar& fill(Index i)\n    {\n      m_data.append(0, i);\n      return m_data.value(m_data.size()-1);\n    }\n\n    /** \\internal \\deprecated use insert(Index,Index) */\n    EIGEN_DEPRECATED Scalar& fillrand(Index r, Index c)\n    {\n      eigen_assert(r==0 || c==0);\n      return fillrand(IsColVector ? r : c);\n    }\n\n    /** \\internal \\deprecated use insert(Index) */\n    EIGEN_DEPRECATED Scalar& fillrand(Index i)\n    {\n      return insert(i);\n    }\n\n    /** \\internal \\deprecated use finalize() */\n    EIGEN_DEPRECATED void endFill() {}\n    \n    // These two functions were here in the 3.1 release, so let's keep them in case some code rely on them.\n    /** \\internal \\deprecated use data() */\n    EIGEN_DEPRECATED Storage& _data() { return m_data; }\n    /** \\internal \\deprecated use data() */\n    EIGEN_DEPRECATED const Storage& _data() const { return m_data; }\n    \n#   ifdef EIGEN_SPARSEVECTOR_PLUGIN\n#     include EIGEN_SPARSEVECTOR_PLUGIN\n#   endif\n\nprotected:\n  \n    static void check_template_parameters()\n    {\n      EIGEN_STATIC_ASSERT(NumTraits<StorageIndex>::IsSigned,THE_INDEX_TYPE_MUST_BE_A_SIGNED_TYPE);\n      EIGEN_STATIC_ASSERT((_Options&(ColMajor|RowMajor))==Options,INVALID_MATRIX_TEMPLATE_PARAMETERS);\n    }\n    \n    Storage m_data;\n    Index m_size;\n};\n\nnamespace internal {\n\ntemplate<typename _Scalar, int _Options, typename _Index>\nstruct evaluator<SparseVector<_Scalar,_Options,_Index> >\n  : evaluator_base<SparseVector<_Scalar,_Options,_Index> >\n{\n  typedef SparseVector<_Scalar,_Options,_Index> SparseVectorType;\n  typedef evaluator_base<SparseVectorType> Base;\n  typedef typename SparseVectorType::InnerIterator InnerIterator;\n  typedef typename SparseVectorType::ReverseInnerIterator ReverseInnerIterator;\n  \n  enum {\n    CoeffReadCost = NumTraits<_Scalar>::ReadCost,\n    Flags = SparseVectorType::Flags\n  };\n\n  evaluator() : Base() {}\n  \n  explicit evaluator(const SparseVectorType &mat) : m_matrix(&mat)\n  {\n    EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);\n  }\n  \n  inline Index nonZerosEstimate() const {\n    return m_matrix->nonZeros();\n  }\n  \n  operator SparseVectorType&() { return m_matrix->const_cast_derived(); }\n  operator const SparseVectorType&() const { return *m_matrix; }\n  \n  const SparseVectorType *m_matrix;\n};\n\ntemplate< typename Dest, typename Src>\nstruct sparse_vector_assign_selector<Dest,Src,SVA_Inner> {\n  static void run(Dest& dst, const Src& src) {\n    eigen_internal_assert(src.innerSize()==src.size());\n    typedef internal::evaluator<Src> SrcEvaluatorType;\n    SrcEvaluatorType srcEval(src);\n    for(typename SrcEvaluatorType::InnerIterator it(srcEval, 0); it; ++it)\n      dst.insert(it.index()) = it.value();\n  }\n};\n\ntemplate< typename Dest, typename Src>\nstruct sparse_vector_assign_selector<Dest,Src,SVA_Outer> {\n  static void run(Dest& dst, const Src& src) {\n    eigen_internal_assert(src.outerSize()==src.size());\n    typedef internal::evaluator<Src> SrcEvaluatorType;\n    SrcEvaluatorType srcEval(src);\n    for(Index i=0; i<src.size(); ++i)\n    {\n      typename SrcEvaluatorType::InnerIterator it(srcEval, i);\n      if(it)\n        dst.insert(i) = it.value();\n    }\n  }\n};\n\ntemplate< typename Dest, typename Src>\nstruct sparse_vector_assign_selector<Dest,Src,SVA_RuntimeSwitch> {\n  static void run(Dest& dst, const Src& src) {\n    if(src.outerSize()==1)  sparse_vector_assign_selector<Dest,Src,SVA_Inner>::run(dst, src);\n    else                    sparse_vector_assign_selector<Dest,Src,SVA_Outer>::run(dst, src);\n  }\n};\n\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_SPARSEVECTOR_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseCore/SparseView.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2011-2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2010 Daniel Lowengrub <lowdanie@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPARSEVIEW_H\n#define EIGEN_SPARSEVIEW_H\n\nnamespace Eigen { \n\nnamespace internal {\n\ntemplate<typename MatrixType>\nstruct traits<SparseView<MatrixType> > : traits<MatrixType>\n{\n  typedef typename MatrixType::StorageIndex StorageIndex;\n  typedef Sparse StorageKind;\n  enum {\n    Flags = int(traits<MatrixType>::Flags) & (RowMajorBit)\n  };\n};\n\n} // end namespace internal\n\n/** \\ingroup SparseCore_Module\n  * \\class SparseView\n  *\n  * \\brief Expression of a dense or sparse matrix with zero or too small values removed\n  *\n  * \\tparam MatrixType the type of the object of which we are removing the small entries\n  *\n  * This class represents an expression of a given dense or sparse matrix with\n  * entries smaller than \\c reference * \\c epsilon are removed.\n  * It is the return type of MatrixBase::sparseView() and SparseMatrixBase::pruned()\n  * and most of the time this is the only way it is used.\n  *\n  * \\sa MatrixBase::sparseView(), SparseMatrixBase::pruned()\n  */\ntemplate<typename MatrixType>\nclass SparseView : public SparseMatrixBase<SparseView<MatrixType> >\n{\n  typedef typename MatrixType::Nested MatrixTypeNested;\n  typedef typename internal::remove_all<MatrixTypeNested>::type _MatrixTypeNested;\n  typedef SparseMatrixBase<SparseView > Base;\npublic:\n  EIGEN_SPARSE_PUBLIC_INTERFACE(SparseView)\n  typedef typename internal::remove_all<MatrixType>::type NestedExpression;\n\n  explicit SparseView(const MatrixType& mat, const Scalar& reference = Scalar(0),\n                      const RealScalar &epsilon = NumTraits<Scalar>::dummy_precision())\n    : m_matrix(mat), m_reference(reference), m_epsilon(epsilon) {}\n\n  inline Index rows() const { return m_matrix.rows(); }\n  inline Index cols() const { return m_matrix.cols(); }\n\n  inline Index innerSize() const { return m_matrix.innerSize(); }\n  inline Index outerSize() const { return m_matrix.outerSize(); }\n  \n  /** \\returns the nested expression */\n  const typename internal::remove_all<MatrixTypeNested>::type&\n  nestedExpression() const { return m_matrix; }\n  \n  Scalar reference() const { return m_reference; }\n  RealScalar epsilon() const { return m_epsilon; }\n  \nprotected:\n  MatrixTypeNested m_matrix;\n  Scalar m_reference;\n  RealScalar m_epsilon;\n};\n\nnamespace internal {\n\n// TODO find a way to unify the two following variants\n// This is tricky because implementing an inner iterator on top of an IndexBased evaluator is\n// not easy because the evaluators do not expose the sizes of the underlying expression.\n  \ntemplate<typename ArgType>\nstruct unary_evaluator<SparseView<ArgType>, IteratorBased>\n  : public evaluator_base<SparseView<ArgType> >\n{\n    typedef typename evaluator<ArgType>::InnerIterator EvalIterator;\n  public:\n    typedef SparseView<ArgType> XprType;\n    \n    class InnerIterator : public EvalIterator\n    {\n      protected:\n        typedef typename XprType::Scalar Scalar;\n      public:\n\n        EIGEN_STRONG_INLINE InnerIterator(const unary_evaluator& sve, Index outer)\n          : EvalIterator(sve.m_argImpl,outer), m_view(sve.m_view)\n        {\n          incrementToNonZero();\n        }\n\n        EIGEN_STRONG_INLINE InnerIterator& operator++()\n        {\n          EvalIterator::operator++();\n          incrementToNonZero();\n          return *this;\n        }\n\n        using EvalIterator::value;\n\n      protected:\n        const XprType &m_view;\n\n      private:\n        void incrementToNonZero()\n        {\n          while((bool(*this)) && internal::isMuchSmallerThan(value(), m_view.reference(), m_view.epsilon()))\n          {\n            EvalIterator::operator++();\n          }\n        }\n    };\n    \n    enum {\n      CoeffReadCost = evaluator<ArgType>::CoeffReadCost,\n      Flags = XprType::Flags\n    };\n    \n    explicit unary_evaluator(const XprType& xpr) : m_argImpl(xpr.nestedExpression()), m_view(xpr) {}\n\n  protected:\n    evaluator<ArgType> m_argImpl;\n    const XprType &m_view;\n};\n\ntemplate<typename ArgType>\nstruct unary_evaluator<SparseView<ArgType>, IndexBased>\n  : public evaluator_base<SparseView<ArgType> >\n{\n  public:\n    typedef SparseView<ArgType> XprType;\n  protected:\n    enum { IsRowMajor = (XprType::Flags&RowMajorBit)==RowMajorBit };\n    typedef typename XprType::Scalar Scalar;\n    typedef typename XprType::StorageIndex StorageIndex;\n  public:\n    \n    class InnerIterator\n    {\n      public:\n\n        EIGEN_STRONG_INLINE InnerIterator(const unary_evaluator& sve, Index outer)\n          : m_sve(sve), m_inner(0), m_outer(outer), m_end(sve.m_view.innerSize())\n        {\n          incrementToNonZero();\n        }\n\n        EIGEN_STRONG_INLINE InnerIterator& operator++()\n        {\n          m_inner++;\n          incrementToNonZero();\n          return *this;\n        }\n\n        EIGEN_STRONG_INLINE Scalar value() const\n        {\n          return (IsRowMajor) ? m_sve.m_argImpl.coeff(m_outer, m_inner)\n                              : m_sve.m_argImpl.coeff(m_inner, m_outer);\n        }\n\n        EIGEN_STRONG_INLINE StorageIndex index() const { return m_inner; }\n        inline Index row() const { return IsRowMajor ? m_outer : index(); }\n        inline Index col() const { return IsRowMajor ? index() : m_outer; }\n\n        EIGEN_STRONG_INLINE operator bool() const { return m_inner < m_end && m_inner>=0; }\n\n      protected:\n        const unary_evaluator &m_sve;\n        Index m_inner;\n        const Index m_outer;\n        const Index m_end;\n\n      private:\n        void incrementToNonZero()\n        {\n          while((bool(*this)) && internal::isMuchSmallerThan(value(), m_sve.m_view.reference(), m_sve.m_view.epsilon()))\n          {\n            m_inner++;\n          }\n        }\n    };\n    \n    enum {\n      CoeffReadCost = evaluator<ArgType>::CoeffReadCost,\n      Flags = XprType::Flags\n    };\n    \n    explicit unary_evaluator(const XprType& xpr) : m_argImpl(xpr.nestedExpression()), m_view(xpr) {}\n\n  protected:\n    evaluator<ArgType> m_argImpl;\n    const XprType &m_view;\n};\n\n} // end namespace internal\n\n/** \\ingroup SparseCore_Module\n  *\n  * \\returns a sparse expression of the dense expression \\c *this with values smaller than\n  * \\a reference * \\a epsilon removed.\n  *\n  * This method is typically used when prototyping to convert a quickly assembled dense Matrix \\c D to a SparseMatrix \\c S:\n  * \\code\n  * MatrixXd D(n,m);\n  * SparseMatrix<double> S;\n  * S = D.sparseView();             // suppress numerical zeros (exact)\n  * S = D.sparseView(reference);\n  * S = D.sparseView(reference,epsilon);\n  * \\endcode\n  * where \\a reference is a meaningful non zero reference value,\n  * and \\a epsilon is a tolerance factor defaulting to NumTraits<Scalar>::dummy_precision().\n  *\n  * \\sa SparseMatrixBase::pruned(), class SparseView */\ntemplate<typename Derived>\nconst SparseView<Derived> MatrixBase<Derived>::sparseView(const Scalar& reference,\n                                                          const typename NumTraits<Scalar>::Real& epsilon) const\n{\n  return SparseView<Derived>(derived(), reference, epsilon);\n}\n\n/** \\returns an expression of \\c *this with values smaller than\n  * \\a reference * \\a epsilon removed.\n  *\n  * This method is typically used in conjunction with the product of two sparse matrices\n  * to automatically prune the smallest values as follows:\n  * \\code\n  * C = (A*B).pruned();             // suppress numerical zeros (exact)\n  * C = (A*B).pruned(ref);\n  * C = (A*B).pruned(ref,epsilon);\n  * \\endcode\n  * where \\c ref is a meaningful non zero reference value.\n  * */\ntemplate<typename Derived>\nconst SparseView<Derived>\nSparseMatrixBase<Derived>::pruned(const Scalar& reference,\n                                  const RealScalar& epsilon) const\n{\n  return SparseView<Derived>(derived(), reference, epsilon);\n}\n\n} // end namespace Eigen\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseCore/TriangularSolver.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPARSETRIANGULARSOLVER_H\n#define EIGEN_SPARSETRIANGULARSOLVER_H\n\nnamespace Eigen { \n\nnamespace internal {\n\ntemplate<typename Lhs, typename Rhs, int Mode,\n  int UpLo = (Mode & Lower)\n           ? Lower\n           : (Mode & Upper)\n           ? Upper\n           : -1,\n  int StorageOrder = int(traits<Lhs>::Flags) & RowMajorBit>\nstruct sparse_solve_triangular_selector;\n\n// forward substitution, row-major\ntemplate<typename Lhs, typename Rhs, int Mode>\nstruct sparse_solve_triangular_selector<Lhs,Rhs,Mode,Lower,RowMajor>\n{\n  typedef typename Rhs::Scalar Scalar;\n  typedef evaluator<Lhs> LhsEval;\n  typedef typename evaluator<Lhs>::InnerIterator LhsIterator;\n  static void run(const Lhs& lhs, Rhs& other)\n  {\n    LhsEval lhsEval(lhs);\n    for(Index col=0 ; col<other.cols() ; ++col)\n    {\n      for(Index i=0; i<lhs.rows(); ++i)\n      {\n        Scalar tmp = other.coeff(i,col);\n        Scalar lastVal(0);\n        Index lastIndex = 0;\n        for(LhsIterator it(lhsEval, i); it; ++it)\n        {\n          lastVal = it.value();\n          lastIndex = it.index();\n          if(lastIndex==i)\n            break;\n          tmp -= lastVal * other.coeff(lastIndex,col);\n        }\n        if (Mode & UnitDiag)\n          other.coeffRef(i,col) = tmp;\n        else\n        {\n          eigen_assert(lastIndex==i);\n          other.coeffRef(i,col) = tmp/lastVal;\n        }\n      }\n    }\n  }\n};\n\n// backward substitution, row-major\ntemplate<typename Lhs, typename Rhs, int Mode>\nstruct sparse_solve_triangular_selector<Lhs,Rhs,Mode,Upper,RowMajor>\n{\n  typedef typename Rhs::Scalar Scalar;\n  typedef evaluator<Lhs> LhsEval;\n  typedef typename evaluator<Lhs>::InnerIterator LhsIterator;\n  static void run(const Lhs& lhs, Rhs& other)\n  {\n    LhsEval lhsEval(lhs);\n    for(Index col=0 ; col<other.cols() ; ++col)\n    {\n      for(Index i=lhs.rows()-1 ; i>=0 ; --i)\n      {\n        Scalar tmp = other.coeff(i,col);\n        Scalar l_ii(0);\n        LhsIterator it(lhsEval, i);\n        while(it && it.index()<i)\n          ++it;\n        if(!(Mode & UnitDiag))\n        {\n          eigen_assert(it && it.index()==i);\n          l_ii = it.value();\n          ++it;\n        }\n        else if (it && it.index() == i)\n          ++it;\n        for(; it; ++it)\n        {\n          tmp -= it.value() * other.coeff(it.index(),col);\n        }\n\n        if (Mode & UnitDiag)  other.coeffRef(i,col) = tmp;\n        else                  other.coeffRef(i,col) = tmp/l_ii;\n      }\n    }\n  }\n};\n\n// forward substitution, col-major\ntemplate<typename Lhs, typename Rhs, int Mode>\nstruct sparse_solve_triangular_selector<Lhs,Rhs,Mode,Lower,ColMajor>\n{\n  typedef typename Rhs::Scalar Scalar;\n  typedef evaluator<Lhs> LhsEval;\n  typedef typename evaluator<Lhs>::InnerIterator LhsIterator;\n  static void run(const Lhs& lhs, Rhs& other)\n  {\n    LhsEval lhsEval(lhs);\n    for(Index col=0 ; col<other.cols() ; ++col)\n    {\n      for(Index i=0; i<lhs.cols(); ++i)\n      {\n        Scalar& tmp = other.coeffRef(i,col);\n        if (tmp!=Scalar(0)) // optimization when other is actually sparse\n        {\n          LhsIterator it(lhsEval, i);\n          while(it && it.index()<i)\n            ++it;\n          if(!(Mode & UnitDiag))\n          {\n            eigen_assert(it && it.index()==i);\n            tmp /= it.value();\n          }\n          if (it && it.index()==i)\n            ++it;\n          for(; it; ++it)\n            other.coeffRef(it.index(), col) -= tmp * it.value();\n        }\n      }\n    }\n  }\n};\n\n// backward substitution, col-major\ntemplate<typename Lhs, typename Rhs, int Mode>\nstruct sparse_solve_triangular_selector<Lhs,Rhs,Mode,Upper,ColMajor>\n{\n  typedef typename Rhs::Scalar Scalar;\n  typedef evaluator<Lhs> LhsEval;\n  typedef typename evaluator<Lhs>::InnerIterator LhsIterator;\n  static void run(const Lhs& lhs, Rhs& other)\n  {\n    LhsEval lhsEval(lhs);\n    for(Index col=0 ; col<other.cols() ; ++col)\n    {\n      for(Index i=lhs.cols()-1; i>=0; --i)\n      {\n        Scalar& tmp = other.coeffRef(i,col);\n        if (tmp!=Scalar(0)) // optimization when other is actually sparse\n        {\n          if(!(Mode & UnitDiag))\n          {\n            // TODO replace this by a binary search. make sure the binary search is safe for partially sorted elements\n            LhsIterator it(lhsEval, i);\n            while(it && it.index()!=i)\n              ++it;\n            eigen_assert(it && it.index()==i);\n            other.coeffRef(i,col) /= it.value();\n          }\n          LhsIterator it(lhsEval, i);\n          for(; it && it.index()<i; ++it)\n            other.coeffRef(it.index(), col) -= tmp * it.value();\n        }\n      }\n    }\n  }\n};\n\n} // end namespace internal\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\n\ntemplate<typename ExpressionType,unsigned int Mode>\ntemplate<typename OtherDerived>\nvoid TriangularViewImpl<ExpressionType,Mode,Sparse>::solveInPlace(MatrixBase<OtherDerived>& other) const\n{\n  eigen_assert(derived().cols() == derived().rows() && derived().cols() == other.rows());\n  eigen_assert((!(Mode & ZeroDiag)) && bool(Mode & (Upper|Lower)));\n\n  enum { copy = internal::traits<OtherDerived>::Flags & RowMajorBit };\n\n  typedef typename internal::conditional<copy,\n    typename internal::plain_matrix_type_column_major<OtherDerived>::type, OtherDerived&>::type OtherCopy;\n  OtherCopy otherCopy(other.derived());\n\n  internal::sparse_solve_triangular_selector<ExpressionType, typename internal::remove_reference<OtherCopy>::type, Mode>::run(derived().nestedExpression(), otherCopy);\n\n  if (copy)\n    other = otherCopy;\n}\n#endif\n\n// pure sparse path\n\nnamespace internal {\n\ntemplate<typename Lhs, typename Rhs, int Mode,\n  int UpLo = (Mode & Lower)\n           ? Lower\n           : (Mode & Upper)\n           ? Upper\n           : -1,\n  int StorageOrder = int(Lhs::Flags) & (RowMajorBit)>\nstruct sparse_solve_triangular_sparse_selector;\n\n// forward substitution, col-major\ntemplate<typename Lhs, typename Rhs, int Mode, int UpLo>\nstruct sparse_solve_triangular_sparse_selector<Lhs,Rhs,Mode,UpLo,ColMajor>\n{\n  typedef typename Rhs::Scalar Scalar;\n  typedef typename promote_index_type<typename traits<Lhs>::StorageIndex,\n                                      typename traits<Rhs>::StorageIndex>::type StorageIndex;\n  static void run(const Lhs& lhs, Rhs& other)\n  {\n    const bool IsLower = (UpLo==Lower);\n    AmbiVector<Scalar,StorageIndex> tempVector(other.rows()*2);\n    tempVector.setBounds(0,other.rows());\n\n    Rhs res(other.rows(), other.cols());\n    res.reserve(other.nonZeros());\n\n    for(Index col=0 ; col<other.cols() ; ++col)\n    {\n      // FIXME estimate number of non zeros\n      tempVector.init(.99/*float(other.col(col).nonZeros())/float(other.rows())*/);\n      tempVector.setZero();\n      tempVector.restart();\n      for (typename Rhs::InnerIterator rhsIt(other, col); rhsIt; ++rhsIt)\n      {\n        tempVector.coeffRef(rhsIt.index()) = rhsIt.value();\n      }\n\n      for(Index i=IsLower?0:lhs.cols()-1;\n          IsLower?i<lhs.cols():i>=0;\n          i+=IsLower?1:-1)\n      {\n        tempVector.restart();\n        Scalar& ci = tempVector.coeffRef(i);\n        if (ci!=Scalar(0))\n        {\n          // find\n          typename Lhs::InnerIterator it(lhs, i);\n          if(!(Mode & UnitDiag))\n          {\n            if (IsLower)\n            {\n              eigen_assert(it.index()==i);\n              ci /= it.value();\n            }\n            else\n              ci /= lhs.coeff(i,i);\n          }\n          tempVector.restart();\n          if (IsLower)\n          {\n            if (it.index()==i)\n              ++it;\n            for(; it; ++it)\n              tempVector.coeffRef(it.index()) -= ci * it.value();\n          }\n          else\n          {\n            for(; it && it.index()<i; ++it)\n              tempVector.coeffRef(it.index()) -= ci * it.value();\n          }\n        }\n      }\n\n\n      Index count = 0;\n      // FIXME compute a reference value to filter zeros\n      for (typename AmbiVector<Scalar,StorageIndex>::Iterator it(tempVector/*,1e-12*/); it; ++it)\n      {\n        ++ count;\n//         std::cerr << \"fill \" << it.index() << \", \" << col << \"\\n\";\n//         std::cout << it.value() << \"  \";\n        // FIXME use insertBack\n        res.insert(it.index(), col) = it.value();\n      }\n//       std::cout << \"tempVector.nonZeros() == \" << int(count) << \" / \" << (other.rows()) << \"\\n\";\n    }\n    res.finalize();\n    other = res.markAsRValue();\n  }\n};\n\n} // end namespace internal\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\ntemplate<typename ExpressionType,unsigned int Mode>\ntemplate<typename OtherDerived>\nvoid TriangularViewImpl<ExpressionType,Mode,Sparse>::solveInPlace(SparseMatrixBase<OtherDerived>& other) const\n{\n  eigen_assert(derived().cols() == derived().rows() && derived().cols() == other.rows());\n  eigen_assert( (!(Mode & ZeroDiag)) && bool(Mode & (Upper|Lower)));\n\n//   enum { copy = internal::traits<OtherDerived>::Flags & RowMajorBit };\n\n//   typedef typename internal::conditional<copy,\n//     typename internal::plain_matrix_type_column_major<OtherDerived>::type, OtherDerived&>::type OtherCopy;\n//   OtherCopy otherCopy(other.derived());\n\n  internal::sparse_solve_triangular_sparse_selector<ExpressionType, OtherDerived, Mode>::run(derived().nestedExpression(), other.derived());\n\n//   if (copy)\n//     other = otherCopy;\n}\n#endif\n\n} // end namespace Eigen\n\n#endif // EIGEN_SPARSETRIANGULARSOLVER_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseLU/SparseLU.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>\n// Copyright (C) 2012-2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n\n#ifndef EIGEN_SPARSE_LU_H\n#define EIGEN_SPARSE_LU_H\n\nnamespace Eigen {\n\ntemplate <typename _MatrixType, typename _OrderingType = COLAMDOrdering<typename _MatrixType::StorageIndex> > class SparseLU;\ntemplate <typename MappedSparseMatrixType> struct SparseLUMatrixLReturnType;\ntemplate <typename MatrixLType, typename MatrixUType> struct SparseLUMatrixUReturnType;\n\n/** \\ingroup SparseLU_Module\n  * \\class SparseLU\n  * \n  * \\brief Sparse supernodal LU factorization for general matrices\n  * \n  * This class implements the supernodal LU factorization for general matrices.\n  * It uses the main techniques from the sequential SuperLU package \n  * (http://crd-legacy.lbl.gov/~xiaoye/SuperLU/). It handles transparently real \n  * and complex arithmetic with single and double precision, depending on the \n  * scalar type of your input matrix. \n  * The code has been optimized to provide BLAS-3 operations during supernode-panel updates. \n  * It benefits directly from the built-in high-performant Eigen BLAS routines. \n  * Moreover, when the size of a supernode is very small, the BLAS calls are avoided to \n  * enable a better optimization from the compiler. For best performance, \n  * you should compile it with NDEBUG flag to avoid the numerous bounds checking on vectors. \n  * \n  * An important parameter of this class is the ordering method. It is used to reorder the columns \n  * (and eventually the rows) of the matrix to reduce the number of new elements that are created during \n  * numerical factorization. The cheapest method available is COLAMD. \n  * See  \\link OrderingMethods_Module the OrderingMethods module \\endlink for the list of \n  * built-in and external ordering methods. \n  *\n  * Simple example with key steps \n  * \\code\n  * VectorXd x(n), b(n);\n  * SparseMatrix<double> A;\n  * SparseLU<SparseMatrix<double>, COLAMDOrdering<int> >   solver;\n  * // fill A and b;\n  * // Compute the ordering permutation vector from the structural pattern of A\n  * solver.analyzePattern(A); \n  * // Compute the numerical factorization \n  * solver.factorize(A); \n  * //Use the factors to solve the linear system \n  * x = solver.solve(b); \n  * \\endcode\n  * \n  * \\warning The input matrix A should be in a \\b compressed and \\b column-major form.\n  * Otherwise an expensive copy will be made. You can call the inexpensive makeCompressed() to get a compressed matrix.\n  * \n  * \\note Unlike the initial SuperLU implementation, there is no step to equilibrate the matrix. \n  * For badly scaled matrices, this step can be useful to reduce the pivoting during factorization. \n  * If this is the case for your matrices, you can try the basic scaling method at\n  *  \"unsupported/Eigen/src/IterativeSolvers/Scaling.h\"\n  * \n  * \\tparam _MatrixType The type of the sparse matrix. It must be a column-major SparseMatrix<>\n  * \\tparam _OrderingType The ordering method to use, either AMD, COLAMD or METIS. Default is COLMAD\n  *\n  * \\implsparsesolverconcept\n  * \n  * \\sa \\ref TutorialSparseSolverConcept\n  * \\sa \\ref OrderingMethods_Module\n  */\ntemplate <typename _MatrixType, typename _OrderingType>\nclass SparseLU : public SparseSolverBase<SparseLU<_MatrixType,_OrderingType> >, public internal::SparseLUImpl<typename _MatrixType::Scalar, typename _MatrixType::StorageIndex>\n{\n  protected:\n    typedef SparseSolverBase<SparseLU<_MatrixType,_OrderingType> > APIBase;\n    using APIBase::m_isInitialized;\n  public:\n    using APIBase::_solve_impl;\n    \n    typedef _MatrixType MatrixType; \n    typedef _OrderingType OrderingType;\n    typedef typename MatrixType::Scalar Scalar; \n    typedef typename MatrixType::RealScalar RealScalar; \n    typedef typename MatrixType::StorageIndex StorageIndex;\n    typedef SparseMatrix<Scalar,ColMajor,StorageIndex> NCMatrix;\n    typedef internal::MappedSuperNodalMatrix<Scalar, StorageIndex> SCMatrix;\n    typedef Matrix<Scalar,Dynamic,1> ScalarVector;\n    typedef Matrix<StorageIndex,Dynamic,1> IndexVector;\n    typedef PermutationMatrix<Dynamic, Dynamic, StorageIndex> PermutationType;\n    typedef internal::SparseLUImpl<Scalar, StorageIndex> Base;\n\n    enum {\n      ColsAtCompileTime = MatrixType::ColsAtCompileTime,\n      MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime\n    };\n    \n  public:\n    SparseLU():m_lastError(\"\"),m_Ustore(0,0,0,0,0,0),m_symmetricmode(false),m_diagpivotthresh(1.0),m_detPermR(1)\n    {\n      initperfvalues(); \n    }\n    explicit SparseLU(const MatrixType& matrix)\n      : m_lastError(\"\"),m_Ustore(0,0,0,0,0,0),m_symmetricmode(false),m_diagpivotthresh(1.0),m_detPermR(1)\n    {\n      initperfvalues(); \n      compute(matrix);\n    }\n    \n    ~SparseLU()\n    {\n      // Free all explicit dynamic pointers \n    }\n    \n    void analyzePattern (const MatrixType& matrix);\n    void factorize (const MatrixType& matrix);\n    void simplicialfactorize(const MatrixType& matrix);\n    \n    /**\n      * Compute the symbolic and numeric factorization of the input sparse matrix.\n      * The input matrix should be in column-major storage. \n      */\n    void compute (const MatrixType& matrix)\n    {\n      // Analyze \n      analyzePattern(matrix); \n      //Factorize\n      factorize(matrix);\n    } \n    \n    inline Index rows() const { return m_mat.rows(); }\n    inline Index cols() const { return m_mat.cols(); }\n    /** Indicate that the pattern of the input matrix is symmetric */\n    void isSymmetric(bool sym)\n    {\n      m_symmetricmode = sym;\n    }\n    \n    /** \\returns an expression of the matrix L, internally stored as supernodes\n      * The only operation available with this expression is the triangular solve\n      * \\code\n      * y = b; matrixL().solveInPlace(y);\n      * \\endcode\n      */\n    SparseLUMatrixLReturnType<SCMatrix> matrixL() const\n    {\n      return SparseLUMatrixLReturnType<SCMatrix>(m_Lstore);\n    }\n    /** \\returns an expression of the matrix U,\n      * The only operation available with this expression is the triangular solve\n      * \\code\n      * y = b; matrixU().solveInPlace(y);\n      * \\endcode\n      */\n    SparseLUMatrixUReturnType<SCMatrix,MappedSparseMatrix<Scalar,ColMajor,StorageIndex> > matrixU() const\n    {\n      return SparseLUMatrixUReturnType<SCMatrix, MappedSparseMatrix<Scalar,ColMajor,StorageIndex> >(m_Lstore, m_Ustore);\n    }\n\n    /**\n      * \\returns a reference to the row matrix permutation \\f$ P_r \\f$ such that \\f$P_r A P_c^T = L U\\f$\n      * \\sa colsPermutation()\n      */\n    inline const PermutationType& rowsPermutation() const\n    {\n      return m_perm_r;\n    }\n    /**\n      * \\returns a reference to the column matrix permutation\\f$ P_c^T \\f$ such that \\f$P_r A P_c^T = L U\\f$\n      * \\sa rowsPermutation()\n      */\n    inline const PermutationType& colsPermutation() const\n    {\n      return m_perm_c;\n    }\n    /** Set the threshold used for a diagonal entry to be an acceptable pivot. */\n    void setPivotThreshold(const RealScalar& thresh)\n    {\n      m_diagpivotthresh = thresh; \n    }\n\n#ifdef EIGEN_PARSED_BY_DOXYGEN\n    /** \\returns the solution X of \\f$ A X = B \\f$ using the current decomposition of A.\n      *\n      * \\warning the destination matrix X in X = this->solve(B) must be colmun-major.\n      *\n      * \\sa compute()\n      */\n    template<typename Rhs>\n    inline const Solve<SparseLU, Rhs> solve(const MatrixBase<Rhs>& B) const;\n#endif // EIGEN_PARSED_BY_DOXYGEN\n    \n    /** \\brief Reports whether previous computation was successful.\n      *\n      * \\returns \\c Success if computation was successful,\n      *          \\c NumericalIssue if the LU factorization reports a problem, zero diagonal for instance\n      *          \\c InvalidInput if the input matrix is invalid\n      *\n      * \\sa iparm()          \n      */\n    ComputationInfo info() const\n    {\n      eigen_assert(m_isInitialized && \"Decomposition is not initialized.\");\n      return m_info;\n    }\n    \n    /**\n      * \\returns A string describing the type of error\n      */\n    std::string lastErrorMessage() const\n    {\n      return m_lastError; \n    }\n\n    template<typename Rhs, typename Dest>\n    bool _solve_impl(const MatrixBase<Rhs> &B, MatrixBase<Dest> &X_base) const\n    {\n      Dest& X(X_base.derived());\n      eigen_assert(m_factorizationIsOk && \"The matrix should be factorized first\");\n      EIGEN_STATIC_ASSERT((Dest::Flags&RowMajorBit)==0,\n                        THIS_METHOD_IS_ONLY_FOR_COLUMN_MAJOR_MATRICES);\n      \n      // Permute the right hand side to form X = Pr*B\n      // on return, X is overwritten by the computed solution\n      X.resize(B.rows(),B.cols());\n\n      // this ugly const_cast_derived() helps to detect aliasing when applying the permutations\n      for(Index j = 0; j < B.cols(); ++j)\n        X.col(j) = rowsPermutation() * B.const_cast_derived().col(j);\n      \n      //Forward substitution with L\n      this->matrixL().solveInPlace(X);\n      this->matrixU().solveInPlace(X);\n      \n      // Permute back the solution \n      for (Index j = 0; j < B.cols(); ++j)\n        X.col(j) = colsPermutation().inverse() * X.col(j);\n      \n      return true; \n    }\n    \n    /**\n      * \\returns the absolute value of the determinant of the matrix of which\n      * *this is the QR decomposition.\n      *\n      * \\warning a determinant can be very big or small, so for matrices\n      * of large enough dimension, there is a risk of overflow/underflow.\n      * One way to work around that is to use logAbsDeterminant() instead.\n      *\n      * \\sa logAbsDeterminant(), signDeterminant()\n      */\n    Scalar absDeterminant()\n    {\n      using std::abs;\n      eigen_assert(m_factorizationIsOk && \"The matrix should be factorized first.\");\n      // Initialize with the determinant of the row matrix\n      Scalar det = Scalar(1.);\n      // Note that the diagonal blocks of U are stored in supernodes,\n      // which are available in the  L part :)\n      for (Index j = 0; j < this->cols(); ++j)\n      {\n        for (typename SCMatrix::InnerIterator it(m_Lstore, j); it; ++it)\n        {\n          if(it.index() == j)\n          {\n            det *= abs(it.value());\n            break;\n          }\n        }\n      }\n      return det;\n    }\n\n    /** \\returns the natural log of the absolute value of the determinant of the matrix\n      * of which **this is the QR decomposition\n      *\n      * \\note This method is useful to work around the risk of overflow/underflow that's\n      * inherent to the determinant computation.\n      *\n      * \\sa absDeterminant(), signDeterminant()\n      */\n    Scalar logAbsDeterminant() const\n    {\n      using std::log;\n      using std::abs;\n\n      eigen_assert(m_factorizationIsOk && \"The matrix should be factorized first.\");\n      Scalar det = Scalar(0.);\n      for (Index j = 0; j < this->cols(); ++j)\n      {\n        for (typename SCMatrix::InnerIterator it(m_Lstore, j); it; ++it)\n        {\n          if(it.row() < j) continue;\n          if(it.row() == j)\n          {\n            det += log(abs(it.value()));\n            break;\n          }\n        }\n      }\n      return det;\n    }\n\n    /** \\returns A number representing the sign of the determinant\n      *\n      * \\sa absDeterminant(), logAbsDeterminant()\n      */\n    Scalar signDeterminant()\n    {\n      eigen_assert(m_factorizationIsOk && \"The matrix should be factorized first.\");\n      // Initialize with the determinant of the row matrix\n      Index det = 1;\n      // Note that the diagonal blocks of U are stored in supernodes,\n      // which are available in the  L part :)\n      for (Index j = 0; j < this->cols(); ++j)\n      {\n        for (typename SCMatrix::InnerIterator it(m_Lstore, j); it; ++it)\n        {\n          if(it.index() == j)\n          {\n            if(it.value()<0)\n              det = -det;\n            else if(it.value()==0)\n              return 0;\n            break;\n          }\n        }\n      }\n      return det * m_detPermR * m_detPermC;\n    }\n    \n    /** \\returns The determinant of the matrix.\n      *\n      * \\sa absDeterminant(), logAbsDeterminant()\n      */\n    Scalar determinant()\n    {\n      eigen_assert(m_factorizationIsOk && \"The matrix should be factorized first.\");\n      // Initialize with the determinant of the row matrix\n      Scalar det = Scalar(1.);\n      // Note that the diagonal blocks of U are stored in supernodes,\n      // which are available in the  L part :)\n      for (Index j = 0; j < this->cols(); ++j)\n      {\n        for (typename SCMatrix::InnerIterator it(m_Lstore, j); it; ++it)\n        {\n          if(it.index() == j)\n          {\n            det *= it.value();\n            break;\n          }\n        }\n      }\n      return (m_detPermR * m_detPermC) > 0 ? det : -det;\n    }\n\n  protected:\n    // Functions \n    void initperfvalues()\n    {\n      m_perfv.panel_size = 16;\n      m_perfv.relax = 1; \n      m_perfv.maxsuper = 128; \n      m_perfv.rowblk = 16; \n      m_perfv.colblk = 8; \n      m_perfv.fillfactor = 20;  \n    }\n      \n    // Variables \n    mutable ComputationInfo m_info;\n    bool m_factorizationIsOk;\n    bool m_analysisIsOk;\n    std::string m_lastError;\n    NCMatrix m_mat; // The input (permuted ) matrix \n    SCMatrix m_Lstore; // The lower triangular matrix (supernodal)\n    MappedSparseMatrix<Scalar,ColMajor,StorageIndex> m_Ustore; // The upper triangular matrix\n    PermutationType m_perm_c; // Column permutation \n    PermutationType m_perm_r ; // Row permutation\n    IndexVector m_etree; // Column elimination tree \n    \n    typename Base::GlobalLU_t m_glu; \n                               \n    // SparseLU options \n    bool m_symmetricmode;\n    // values for performance \n    internal::perfvalues m_perfv;\n    RealScalar m_diagpivotthresh; // Specifies the threshold used for a diagonal entry to be an acceptable pivot\n    Index m_nnzL, m_nnzU; // Nonzeros in L and U factors\n    Index m_detPermR, m_detPermC; // Determinants of the permutation matrices\n  private:\n    // Disable copy constructor \n    SparseLU (const SparseLU& );\n  \n}; // End class SparseLU\n\n\n\n// Functions needed by the anaysis phase\n/** \n  * Compute the column permutation to minimize the fill-in\n  * \n  *  - Apply this permutation to the input matrix - \n  * \n  *  - Compute the column elimination tree on the permuted matrix \n  * \n  *  - Postorder the elimination tree and the column permutation\n  * \n  */\ntemplate <typename MatrixType, typename OrderingType>\nvoid SparseLU<MatrixType, OrderingType>::analyzePattern(const MatrixType& mat)\n{\n  \n  //TODO  It is possible as in SuperLU to compute row and columns scaling vectors to equilibrate the matrix mat.\n  \n  // Firstly, copy the whole input matrix. \n  m_mat = mat;\n  \n  // Compute fill-in ordering\n  OrderingType ord; \n  ord(m_mat,m_perm_c);\n  \n  // Apply the permutation to the column of the input  matrix\n  if (m_perm_c.size())\n  {\n    m_mat.uncompress(); //NOTE: The effect of this command is only to create the InnerNonzeros pointers. FIXME : This vector is filled but not subsequently used.  \n    // Then, permute only the column pointers\n    ei_declare_aligned_stack_constructed_variable(StorageIndex,outerIndexPtr,mat.cols()+1,mat.isCompressed()?const_cast<StorageIndex*>(mat.outerIndexPtr()):0);\n    \n    // If the input matrix 'mat' is uncompressed, then the outer-indices do not match the ones of m_mat, and a copy is thus needed.\n    if(!mat.isCompressed()) \n      IndexVector::Map(outerIndexPtr, mat.cols()+1) = IndexVector::Map(m_mat.outerIndexPtr(),mat.cols()+1);\n    \n    // Apply the permutation and compute the nnz per column.\n    for (Index i = 0; i < mat.cols(); i++)\n    {\n      m_mat.outerIndexPtr()[m_perm_c.indices()(i)] = outerIndexPtr[i];\n      m_mat.innerNonZeroPtr()[m_perm_c.indices()(i)] = outerIndexPtr[i+1] - outerIndexPtr[i];\n    }\n  }\n  \n  // Compute the column elimination tree of the permuted matrix \n  IndexVector firstRowElt;\n  internal::coletree(m_mat, m_etree,firstRowElt); \n     \n  // In symmetric mode, do not do postorder here\n  if (!m_symmetricmode) {\n    IndexVector post, iwork; \n    // Post order etree\n    internal::treePostorder(StorageIndex(m_mat.cols()), m_etree, post); \n      \n   \n    // Renumber etree in postorder \n    Index m = m_mat.cols(); \n    iwork.resize(m+1);\n    for (Index i = 0; i < m; ++i) iwork(post(i)) = post(m_etree(i));\n    m_etree = iwork;\n    \n    // Postmultiply A*Pc by post, i.e reorder the matrix according to the postorder of the etree\n    PermutationType post_perm(m); \n    for (Index i = 0; i < m; i++) \n      post_perm.indices()(i) = post(i); \n        \n    // Combine the two permutations : postorder the permutation for future use\n    if(m_perm_c.size()) {\n      m_perm_c = post_perm * m_perm_c;\n    }\n    \n  } // end postordering \n  \n  m_analysisIsOk = true; \n}\n\n// Functions needed by the numerical factorization phase\n\n\n/** \n  *  - Numerical factorization \n  *  - Interleaved with the symbolic factorization \n  * On exit,  info is \n  * \n  *    = 0: successful factorization\n  * \n  *    > 0: if info = i, and i is\n  * \n  *       <= A->ncol: U(i,i) is exactly zero. The factorization has\n  *          been completed, but the factor U is exactly singular,\n  *          and division by zero will occur if it is used to solve a\n  *          system of equations.\n  * \n  *       > A->ncol: number of bytes allocated when memory allocation\n  *         failure occurred, plus A->ncol. If lwork = -1, it is\n  *         the estimated amount of space needed, plus A->ncol.  \n  */\ntemplate <typename MatrixType, typename OrderingType>\nvoid SparseLU<MatrixType, OrderingType>::factorize(const MatrixType& matrix)\n{\n  using internal::emptyIdxLU;\n  eigen_assert(m_analysisIsOk && \"analyzePattern() should be called first\"); \n  eigen_assert((matrix.rows() == matrix.cols()) && \"Only for squared matrices\");\n  \n  m_isInitialized = true;\n  \n  // Apply the column permutation computed in analyzepattern()\n  //   m_mat = matrix * m_perm_c.inverse(); \n  m_mat = matrix;\n  if (m_perm_c.size()) \n  {\n    m_mat.uncompress(); //NOTE: The effect of this command is only to create the InnerNonzeros pointers.\n    //Then, permute only the column pointers\n    const StorageIndex * outerIndexPtr;\n    if (matrix.isCompressed()) outerIndexPtr = matrix.outerIndexPtr();\n    else\n    {\n      StorageIndex* outerIndexPtr_t = new StorageIndex[matrix.cols()+1];\n      for(Index i = 0; i <= matrix.cols(); i++) outerIndexPtr_t[i] = m_mat.outerIndexPtr()[i];\n      outerIndexPtr = outerIndexPtr_t;\n    }\n    for (Index i = 0; i < matrix.cols(); i++)\n    {\n      m_mat.outerIndexPtr()[m_perm_c.indices()(i)] = outerIndexPtr[i];\n      m_mat.innerNonZeroPtr()[m_perm_c.indices()(i)] = outerIndexPtr[i+1] - outerIndexPtr[i];\n    }\n    if(!matrix.isCompressed()) delete[] outerIndexPtr;\n  } \n  else \n  { //FIXME This should not be needed if the empty permutation is handled transparently\n    m_perm_c.resize(matrix.cols());\n    for(StorageIndex i = 0; i < matrix.cols(); ++i) m_perm_c.indices()(i) = i;\n  }\n  \n  Index m = m_mat.rows();\n  Index n = m_mat.cols();\n  Index nnz = m_mat.nonZeros();\n  Index maxpanel = m_perfv.panel_size * m;\n  // Allocate working storage common to the factor routines\n  Index lwork = 0;\n  Index info = Base::memInit(m, n, nnz, lwork, m_perfv.fillfactor, m_perfv.panel_size, m_glu); \n  if (info) \n  {\n    m_lastError = \"UNABLE TO ALLOCATE WORKING MEMORY\\n\\n\" ;\n    m_factorizationIsOk = false;\n    return ; \n  }\n  \n  // Set up pointers for integer working arrays \n  IndexVector segrep(m); segrep.setZero();\n  IndexVector parent(m); parent.setZero();\n  IndexVector xplore(m); xplore.setZero();\n  IndexVector repfnz(maxpanel);\n  IndexVector panel_lsub(maxpanel);\n  IndexVector xprune(n); xprune.setZero();\n  IndexVector marker(m*internal::LUNoMarker); marker.setZero();\n  \n  repfnz.setConstant(-1); \n  panel_lsub.setConstant(-1);\n  \n  // Set up pointers for scalar working arrays \n  ScalarVector dense; \n  dense.setZero(maxpanel);\n  ScalarVector tempv; \n  tempv.setZero(internal::LUnumTempV(m, m_perfv.panel_size, m_perfv.maxsuper, /*m_perfv.rowblk*/m) );\n  \n  // Compute the inverse of perm_c\n  PermutationType iperm_c(m_perm_c.inverse()); \n  \n  // Identify initial relaxed snodes\n  IndexVector relax_end(n);\n  if ( m_symmetricmode == true ) \n    Base::heap_relax_snode(n, m_etree, m_perfv.relax, marker, relax_end);\n  else\n    Base::relax_snode(n, m_etree, m_perfv.relax, marker, relax_end);\n  \n  \n  m_perm_r.resize(m); \n  m_perm_r.indices().setConstant(-1);\n  marker.setConstant(-1);\n  m_detPermR = 1; // Record the determinant of the row permutation\n  \n  m_glu.supno(0) = emptyIdxLU; m_glu.xsup.setConstant(0);\n  m_glu.xsup(0) = m_glu.xlsub(0) = m_glu.xusub(0) = m_glu.xlusup(0) = Index(0);\n  \n  // Work on one 'panel' at a time. A panel is one of the following :\n  //  (a) a relaxed supernode at the bottom of the etree, or\n  //  (b) panel_size contiguous columns, <panel_size> defined by the user\n  Index jcol; \n  IndexVector panel_histo(n);\n  Index pivrow; // Pivotal row number in the original row matrix\n  Index nseg1; // Number of segments in U-column above panel row jcol\n  Index nseg; // Number of segments in each U-column \n  Index irep; \n  Index i, k, jj; \n  for (jcol = 0; jcol < n; )\n  {\n    // Adjust panel size so that a panel won't overlap with the next relaxed snode. \n    Index panel_size = m_perfv.panel_size; // upper bound on panel width\n    for (k = jcol + 1; k < (std::min)(jcol+panel_size, n); k++)\n    {\n      if (relax_end(k) != emptyIdxLU) \n      {\n        panel_size = k - jcol; \n        break; \n      }\n    }\n    if (k == n) \n      panel_size = n - jcol; \n      \n    // Symbolic outer factorization on a panel of columns \n    Base::panel_dfs(m, panel_size, jcol, m_mat, m_perm_r.indices(), nseg1, dense, panel_lsub, segrep, repfnz, xprune, marker, parent, xplore, m_glu); \n    \n    // Numeric sup-panel updates in topological order \n    Base::panel_bmod(m, panel_size, jcol, nseg1, dense, tempv, segrep, repfnz, m_glu); \n    \n    // Sparse LU within the panel, and below the panel diagonal \n    for ( jj = jcol; jj< jcol + panel_size; jj++) \n    {\n      k = (jj - jcol) * m; // Column index for w-wide arrays \n      \n      nseg = nseg1; // begin after all the panel segments\n      //Depth-first-search for the current column\n      VectorBlock<IndexVector> panel_lsubk(panel_lsub, k, m);\n      VectorBlock<IndexVector> repfnz_k(repfnz, k, m); \n      info = Base::column_dfs(m, jj, m_perm_r.indices(), m_perfv.maxsuper, nseg, panel_lsubk, segrep, repfnz_k, xprune, marker, parent, xplore, m_glu); \n      if ( info ) \n      {\n        m_lastError =  \"UNABLE TO EXPAND MEMORY IN COLUMN_DFS() \";\n        m_info = NumericalIssue; \n        m_factorizationIsOk = false; \n        return; \n      }\n      // Numeric updates to this column \n      VectorBlock<ScalarVector> dense_k(dense, k, m); \n      VectorBlock<IndexVector> segrep_k(segrep, nseg1, m-nseg1); \n      info = Base::column_bmod(jj, (nseg - nseg1), dense_k, tempv, segrep_k, repfnz_k, jcol, m_glu); \n      if ( info ) \n      {\n        m_lastError = \"UNABLE TO EXPAND MEMORY IN COLUMN_BMOD() \";\n        m_info = NumericalIssue; \n        m_factorizationIsOk = false; \n        return; \n      }\n      \n      // Copy the U-segments to ucol(*)\n      info = Base::copy_to_ucol(jj, nseg, segrep, repfnz_k ,m_perm_r.indices(), dense_k, m_glu); \n      if ( info ) \n      {\n        m_lastError = \"UNABLE TO EXPAND MEMORY IN COPY_TO_UCOL() \";\n        m_info = NumericalIssue; \n        m_factorizationIsOk = false; \n        return; \n      }\n      \n      // Form the L-segment \n      info = Base::pivotL(jj, m_diagpivotthresh, m_perm_r.indices(), iperm_c.indices(), pivrow, m_glu);\n      if ( info ) \n      {\n        m_lastError = \"THE MATRIX IS STRUCTURALLY SINGULAR ... ZERO COLUMN AT \";\n        std::ostringstream returnInfo;\n        returnInfo << info; \n        m_lastError += returnInfo.str();\n        m_info = NumericalIssue; \n        m_factorizationIsOk = false; \n        return; \n      }\n      \n      // Update the determinant of the row permutation matrix\n      // FIXME: the following test is not correct, we should probably take iperm_c into account and pivrow is not directly the row pivot.\n      if (pivrow != jj) m_detPermR = -m_detPermR;\n\n      // Prune columns (0:jj-1) using column jj\n      Base::pruneL(jj, m_perm_r.indices(), pivrow, nseg, segrep, repfnz_k, xprune, m_glu); \n      \n      // Reset repfnz for this column \n      for (i = 0; i < nseg; i++)\n      {\n        irep = segrep(i); \n        repfnz_k(irep) = emptyIdxLU; \n      }\n    } // end SparseLU within the panel  \n    jcol += panel_size;  // Move to the next panel\n  } // end for -- end elimination \n  \n  m_detPermR = m_perm_r.determinant();\n  m_detPermC = m_perm_c.determinant();\n  \n  // Count the number of nonzeros in factors \n  Base::countnz(n, m_nnzL, m_nnzU, m_glu); \n  // Apply permutation  to the L subscripts \n  Base::fixupL(n, m_perm_r.indices(), m_glu);\n  \n  // Create supernode matrix L \n  m_Lstore.setInfos(m, n, m_glu.lusup, m_glu.xlusup, m_glu.lsub, m_glu.xlsub, m_glu.supno, m_glu.xsup); \n  // Create the column major upper sparse matrix  U; \n  new (&m_Ustore) MappedSparseMatrix<Scalar, ColMajor, StorageIndex> ( m, n, m_nnzU, m_glu.xusub.data(), m_glu.usub.data(), m_glu.ucol.data() );\n  \n  m_info = Success;\n  m_factorizationIsOk = true;\n}\n\ntemplate<typename MappedSupernodalType>\nstruct SparseLUMatrixLReturnType : internal::no_assignment_operator\n{\n  typedef typename MappedSupernodalType::Scalar Scalar;\n  explicit SparseLUMatrixLReturnType(const MappedSupernodalType& mapL) : m_mapL(mapL)\n  { }\n  Index rows() const { return m_mapL.rows(); }\n  Index cols() const { return m_mapL.cols(); }\n  template<typename Dest>\n  void solveInPlace( MatrixBase<Dest> &X) const\n  {\n    m_mapL.solveInPlace(X);\n  }\n  const MappedSupernodalType& m_mapL;\n};\n\ntemplate<typename MatrixLType, typename MatrixUType>\nstruct SparseLUMatrixUReturnType : internal::no_assignment_operator\n{\n  typedef typename MatrixLType::Scalar Scalar;\n  SparseLUMatrixUReturnType(const MatrixLType& mapL, const MatrixUType& mapU)\n  : m_mapL(mapL),m_mapU(mapU)\n  { }\n  Index rows() const { return m_mapL.rows(); }\n  Index cols() const { return m_mapL.cols(); }\n\n  template<typename Dest>   void solveInPlace(MatrixBase<Dest> &X) const\n  {\n    Index nrhs = X.cols();\n    Index n    = X.rows();\n    // Backward solve with U\n    for (Index k = m_mapL.nsuper(); k >= 0; k--)\n    {\n      Index fsupc = m_mapL.supToCol()[k];\n      Index lda = m_mapL.colIndexPtr()[fsupc+1] - m_mapL.colIndexPtr()[fsupc]; // leading dimension\n      Index nsupc = m_mapL.supToCol()[k+1] - fsupc;\n      Index luptr = m_mapL.colIndexPtr()[fsupc];\n\n      if (nsupc == 1)\n      {\n        for (Index j = 0; j < nrhs; j++)\n        {\n          X(fsupc, j) /= m_mapL.valuePtr()[luptr];\n        }\n      }\n      else\n      {\n        // FIXME: the following lines should use Block expressions and not Map!\n        Map<const Matrix<Scalar,Dynamic,Dynamic, ColMajor>, 0, OuterStride<> > A( &(m_mapL.valuePtr()[luptr]), nsupc, nsupc, OuterStride<>(lda) );\n        Map< Matrix<Scalar,Dynamic,Dest::ColsAtCompileTime, ColMajor>, 0, OuterStride<> > U (&(X.coeffRef(fsupc,0)), nsupc, nrhs, OuterStride<>(n) );\n        U = A.template triangularView<Upper>().solve(U);\n      }\n\n      for (Index j = 0; j < nrhs; ++j)\n      {\n        for (Index jcol = fsupc; jcol < fsupc + nsupc; jcol++)\n        {\n          typename MatrixUType::InnerIterator it(m_mapU, jcol);\n          for ( ; it; ++it)\n          {\n            Index irow = it.index();\n            X(irow, j) -= X(jcol, j) * it.value();\n          }\n        }\n      }\n    } // End For U-solve\n  }\n  const MatrixLType& m_mapL;\n  const MatrixUType& m_mapU;\n};\n\n} // End namespace Eigen \n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseLU/SparseLUImpl.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n#ifndef SPARSELU_IMPL_H\n#define SPARSELU_IMPL_H\n\nnamespace Eigen {\nnamespace internal {\n  \n/** \\ingroup SparseLU_Module\n  * \\class SparseLUImpl\n  * Base class for sparseLU\n  */\ntemplate <typename Scalar, typename StorageIndex>\nclass SparseLUImpl\n{\n  public:\n    typedef Matrix<Scalar,Dynamic,1> ScalarVector;\n    typedef Matrix<StorageIndex,Dynamic,1> IndexVector; \n    typedef Matrix<Scalar,Dynamic,Dynamic,ColMajor> ScalarMatrix;\n    typedef Map<ScalarMatrix, 0,  OuterStride<> > MappedMatrixBlock;\n    typedef typename ScalarVector::RealScalar RealScalar; \n    typedef Ref<Matrix<Scalar,Dynamic,1> > BlockScalarVector;\n    typedef Ref<Matrix<StorageIndex,Dynamic,1> > BlockIndexVector;\n    typedef LU_GlobalLU_t<IndexVector, ScalarVector> GlobalLU_t; \n    typedef SparseMatrix<Scalar,ColMajor,StorageIndex> MatrixType; \n    \n  protected:\n     template <typename VectorType>\n     Index expand(VectorType& vec, Index& length, Index nbElts, Index keep_prev, Index& num_expansions);\n     Index memInit(Index m, Index n, Index annz, Index lwork, Index fillratio, Index panel_size,  GlobalLU_t& glu); \n     template <typename VectorType>\n     Index memXpand(VectorType& vec, Index& maxlen, Index nbElts, MemType memtype, Index& num_expansions);\n     void heap_relax_snode (const Index n, IndexVector& et, const Index relax_columns, IndexVector& descendants, IndexVector& relax_end); \n     void relax_snode (const Index n, IndexVector& et, const Index relax_columns, IndexVector& descendants, IndexVector& relax_end); \n     Index snode_dfs(const Index jcol, const Index kcol,const MatrixType& mat,  IndexVector& xprune, IndexVector& marker, GlobalLU_t& glu); \n     Index snode_bmod (const Index jcol, const Index fsupc, ScalarVector& dense, GlobalLU_t& glu);\n     Index pivotL(const Index jcol, const RealScalar& diagpivotthresh, IndexVector& perm_r, IndexVector& iperm_c, Index& pivrow, GlobalLU_t& glu);\n     template <typename Traits>\n     void dfs_kernel(const StorageIndex jj, IndexVector& perm_r,\n                    Index& nseg, IndexVector& panel_lsub, IndexVector& segrep,\n                    Ref<IndexVector> repfnz_col, IndexVector& xprune, Ref<IndexVector> marker, IndexVector& parent,\n                    IndexVector& xplore, GlobalLU_t& glu, Index& nextl_col, Index krow, Traits& traits);\n     void panel_dfs(const Index m, const Index w, const Index jcol, MatrixType& A, IndexVector& perm_r, Index& nseg, ScalarVector& dense, IndexVector& panel_lsub, IndexVector& segrep, IndexVector& repfnz, IndexVector& xprune, IndexVector& marker, IndexVector& parent, IndexVector& xplore, GlobalLU_t& glu);\n    \n     void panel_bmod(const Index m, const Index w, const Index jcol, const Index nseg, ScalarVector& dense, ScalarVector& tempv, IndexVector& segrep, IndexVector& repfnz, GlobalLU_t& glu);\n     Index column_dfs(const Index m, const Index jcol, IndexVector& perm_r, Index maxsuper, Index& nseg,  BlockIndexVector lsub_col, IndexVector& segrep, BlockIndexVector repfnz, IndexVector& xprune, IndexVector& marker, IndexVector& parent, IndexVector& xplore, GlobalLU_t& glu);\n     Index column_bmod(const Index jcol, const Index nseg, BlockScalarVector dense, ScalarVector& tempv, BlockIndexVector segrep, BlockIndexVector repfnz, Index fpanelc, GlobalLU_t& glu); \n     Index copy_to_ucol(const Index jcol, const Index nseg, IndexVector& segrep, BlockIndexVector repfnz ,IndexVector& perm_r, BlockScalarVector dense, GlobalLU_t& glu); \n     void pruneL(const Index jcol, const IndexVector& perm_r, const Index pivrow, const Index nseg, const IndexVector& segrep, BlockIndexVector repfnz, IndexVector& xprune, GlobalLU_t& glu);\n     void countnz(const Index n, Index& nnzL, Index& nnzU, GlobalLU_t& glu); \n     void fixupL(const Index n, const IndexVector& perm_r, GlobalLU_t& glu); \n     \n     template<typename , typename >\n     friend struct column_dfs_traits;\n}; \n\n} // end namespace internal\n} // namespace Eigen\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseLU/SparseLU_Memory.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n/* \n \n * NOTE: This file is the modified version of [s,d,c,z]memory.c files in SuperLU \n \n * -- SuperLU routine (version 3.1) --\n * Univ. of California Berkeley, Xerox Palo Alto Research Center,\n * and Lawrence Berkeley National Lab.\n * August 1, 2008\n *\n * Copyright (c) 1994 by Xerox Corporation.  All rights reserved.\n *\n * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY\n * EXPRESSED OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.\n *\n * Permission is hereby granted to use or copy this program for any\n * purpose, provided the above notices are retained on all copies.\n * Permission to modify the code and to distribute modified code is\n * granted, provided the above notices are retained, and a notice that\n * the code was modified is included with the above copyright notice.\n */\n\n#ifndef EIGEN_SPARSELU_MEMORY\n#define EIGEN_SPARSELU_MEMORY\n\nnamespace Eigen {\nnamespace internal {\n  \nenum { LUNoMarker = 3 };\nenum {emptyIdxLU = -1};\ninline Index LUnumTempV(Index& m, Index& w, Index& t, Index& b)\n{\n  return (std::max)(m, (t+b)*w);\n}\n\ntemplate< typename Scalar>\ninline Index LUTempSpace(Index&m, Index& w)\n{\n  return (2*w + 4 + LUNoMarker) * m * sizeof(Index) + (w + 1) * m * sizeof(Scalar);\n}\n\n\n\n\n/** \n  * Expand the existing storage to accommodate more fill-ins\n  * \\param vec Valid pointer to the vector to allocate or expand\n  * \\param[in,out] length  At input, contain the current length of the vector that is to be increased. At output, length of the newly allocated vector\n  * \\param[in] nbElts Current number of elements in the factors\n  * \\param keep_prev  1: use length  and do not expand the vector; 0: compute new_len and expand\n  * \\param[in,out] num_expansions Number of times the memory has been expanded\n  */\ntemplate <typename Scalar, typename StorageIndex>\ntemplate <typename VectorType>\nIndex  SparseLUImpl<Scalar,StorageIndex>::expand(VectorType& vec, Index& length, Index nbElts, Index keep_prev, Index& num_expansions) \n{\n  \n  float alpha = 1.5; // Ratio of the memory increase \n  Index new_len; // New size of the allocated memory\n  \n  if(num_expansions == 0 || keep_prev) \n    new_len = length ; // First time allocate requested\n  else \n    new_len = (std::max)(length+1,Index(alpha * length));\n  \n  VectorType old_vec; // Temporary vector to hold the previous values   \n  if (nbElts > 0 )\n    old_vec = vec.segment(0,nbElts); \n  \n  //Allocate or expand the current vector\n#ifdef EIGEN_EXCEPTIONS\n  try\n#endif\n  {\n    vec.resize(new_len); \n  }\n#ifdef EIGEN_EXCEPTIONS\n  catch(std::bad_alloc& )\n#else\n  if(!vec.size())\n#endif\n  {\n    if (!num_expansions)\n    {\n      // First time to allocate from LUMemInit()\n      // Let LUMemInit() deals with it.\n      return -1;\n    }\n    if (keep_prev)\n    {\n      // In this case, the memory length should not not be reduced\n      return new_len;\n    }\n    else \n    {\n      // Reduce the size and increase again \n      Index tries = 0; // Number of attempts\n      do \n      {\n        alpha = (alpha + 1)/2;\n        new_len = (std::max)(length+1,Index(alpha * length));\n#ifdef EIGEN_EXCEPTIONS\n        try\n#endif\n        {\n          vec.resize(new_len); \n        }\n#ifdef EIGEN_EXCEPTIONS\n        catch(std::bad_alloc& )\n#else\n        if (!vec.size())\n#endif\n        {\n          tries += 1; \n          if ( tries > 10) return new_len; \n        }\n      } while (!vec.size());\n    }\n  }\n  //Copy the previous values to the newly allocated space \n  if (nbElts > 0)\n    vec.segment(0, nbElts) = old_vec;   \n   \n  \n  length  = new_len;\n  if(num_expansions) ++num_expansions;\n  return 0; \n}\n\n/**\n * \\brief  Allocate various working space for the numerical factorization phase.\n * \\param m number of rows of the input matrix \n * \\param n number of columns \n * \\param annz number of initial nonzeros in the matrix \n * \\param lwork  if lwork=-1, this routine returns an estimated size of the required memory\n * \\param glu persistent data to facilitate multiple factors : will be deleted later ??\n * \\param fillratio estimated ratio of fill in the factors\n * \\param panel_size Size of a panel\n * \\return an estimated size of the required memory if lwork = -1; otherwise, return the size of actually allocated memory when allocation failed, and 0 on success\n * \\note Unlike SuperLU, this routine does not support successive factorization with the same pattern and the same row permutation\n */\ntemplate <typename Scalar, typename StorageIndex>\nIndex SparseLUImpl<Scalar,StorageIndex>::memInit(Index m, Index n, Index annz, Index lwork, Index fillratio, Index panel_size,  GlobalLU_t& glu)\n{\n  Index& num_expansions = glu.num_expansions; //No memory expansions so far\n  num_expansions = 0;\n  glu.nzumax = glu.nzlumax = (std::min)(fillratio * (annz+1) / n, m) * n; // estimated number of nonzeros in U \n  glu.nzlmax = (std::max)(Index(4), fillratio) * (annz+1) / 4; // estimated  nnz in L factor\n  // Return the estimated size to the user if necessary\n  Index tempSpace;\n  tempSpace = (2*panel_size + 4 + LUNoMarker) * m * sizeof(Index) + (panel_size + 1) * m * sizeof(Scalar);\n  if (lwork == emptyIdxLU) \n  {\n    Index estimated_size;\n    estimated_size = (5 * n + 5) * sizeof(Index)  + tempSpace\n                    + (glu.nzlmax + glu.nzumax) * sizeof(Index) + (glu.nzlumax+glu.nzumax) *  sizeof(Scalar) + n; \n    return estimated_size;\n  }\n  \n  // Setup the required space \n  \n  // First allocate Integer pointers for L\\U factors\n  glu.xsup.resize(n+1);\n  glu.supno.resize(n+1);\n  glu.xlsub.resize(n+1);\n  glu.xlusup.resize(n+1);\n  glu.xusub.resize(n+1);\n\n  // Reserve memory for L/U factors\n  do \n  {\n    if(     (expand<ScalarVector>(glu.lusup, glu.nzlumax, 0, 0, num_expansions)<0)\n        ||  (expand<ScalarVector>(glu.ucol,  glu.nzumax,  0, 0, num_expansions)<0)\n        ||  (expand<IndexVector> (glu.lsub,  glu.nzlmax,  0, 0, num_expansions)<0)\n        ||  (expand<IndexVector> (glu.usub,  glu.nzumax,  0, 1, num_expansions)<0) )\n    {\n      //Reduce the estimated size and retry\n      glu.nzlumax /= 2;\n      glu.nzumax /= 2;\n      glu.nzlmax /= 2;\n      if (glu.nzlumax < annz ) return glu.nzlumax; \n    }\n  } while (!glu.lusup.size() || !glu.ucol.size() || !glu.lsub.size() || !glu.usub.size());\n  \n  ++num_expansions;\n  return 0;\n  \n} // end LuMemInit\n\n/** \n * \\brief Expand the existing storage \n * \\param vec vector to expand \n * \\param[in,out] maxlen On input, previous size of vec (Number of elements to copy ). on output, new size\n * \\param nbElts current number of elements in the vector.\n * \\param memtype Type of the element to expand\n * \\param num_expansions Number of expansions \n * \\return 0 on success, > 0 size of the memory allocated so far\n */\ntemplate <typename Scalar, typename StorageIndex>\ntemplate <typename VectorType>\nIndex SparseLUImpl<Scalar,StorageIndex>::memXpand(VectorType& vec, Index& maxlen, Index nbElts, MemType memtype, Index& num_expansions)\n{\n  Index failed_size; \n  if (memtype == USUB)\n     failed_size = this->expand<VectorType>(vec, maxlen, nbElts, 1, num_expansions);\n  else\n    failed_size = this->expand<VectorType>(vec, maxlen, nbElts, 0, num_expansions);\n\n  if (failed_size)\n    return failed_size; \n  \n  return 0 ;  \n}\n\n} // end namespace internal\n\n} // end namespace Eigen\n#endif // EIGEN_SPARSELU_MEMORY\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseLU/SparseLU_Structs.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n/* \n * NOTE: This file comes from a partly modified version of files slu_[s,d,c,z]defs.h\n * -- SuperLU routine (version 4.1) --\n * Univ. of California Berkeley, Xerox Palo Alto Research Center,\n * and Lawrence Berkeley National Lab.\n * November, 2010\n * \n * Global data structures used in LU factorization -\n * \n *   nsuper: #supernodes = nsuper + 1, numbered [0, nsuper].\n *   (xsup,supno): supno[i] is the supernode no to which i belongs;\n *  xsup(s) points to the beginning of the s-th supernode.\n *  e.g.   supno 0 1 2 2 3 3 3 4 4 4 4 4   (n=12)\n *          xsup 0 1 2 4 7 12\n *  Note: dfs will be performed on supernode rep. relative to the new \n *        row pivoting ordering\n *\n *   (xlsub,lsub): lsub[*] contains the compressed subscript of\n *  rectangular supernodes; xlsub[j] points to the starting\n *  location of the j-th column in lsub[*]. Note that xlsub \n *  is indexed by column.\n *  Storage: original row subscripts\n *\n *      During the course of sparse LU factorization, we also use\n *  (xlsub,lsub) for the purpose of symmetric pruning. For each\n *  supernode {s,s+1,...,t=s+r} with first column s and last\n *  column t, the subscript set\n *    lsub[j], j=xlsub[s], .., xlsub[s+1]-1\n *  is the structure of column s (i.e. structure of this supernode).\n *  It is used for the storage of numerical values.\n *  Furthermore,\n *    lsub[j], j=xlsub[t], .., xlsub[t+1]-1\n *  is the structure of the last column t of this supernode.\n *  It is for the purpose of symmetric pruning. Therefore, the\n *  structural subscripts can be rearranged without making physical\n *  interchanges among the numerical values.\n *\n *  However, if the supernode has only one column, then we\n *  only keep one set of subscripts. For any subscript interchange\n *  performed, similar interchange must be done on the numerical\n *  values.\n *\n *  The last column structures (for pruning) will be removed\n *  after the numercial LU factorization phase.\n *\n *   (xlusup,lusup): lusup[*] contains the numerical values of the\n *  rectangular supernodes; xlusup[j] points to the starting\n *  location of the j-th column in storage vector lusup[*]\n *  Note: xlusup is indexed by column.\n *  Each rectangular supernode is stored by column-major\n *  scheme, consistent with Fortran 2-dim array storage.\n *\n *   (xusub,ucol,usub): ucol[*] stores the numerical values of\n *  U-columns outside the rectangular supernodes. The row\n *  subscript of nonzero ucol[k] is stored in usub[k].\n *  xusub[i] points to the starting location of column i in ucol.\n *  Storage: new row subscripts; that is subscripts of PA.\n */\n\n#ifndef EIGEN_LU_STRUCTS\n#define EIGEN_LU_STRUCTS\nnamespace Eigen {\nnamespace internal {\n  \ntypedef enum {LUSUP, UCOL, LSUB, USUB, LLVL, ULVL} MemType; \n\ntemplate <typename IndexVector, typename ScalarVector>\nstruct LU_GlobalLU_t {\n  typedef typename IndexVector::Scalar StorageIndex; \n  IndexVector xsup; //First supernode column ... xsup(s) points to the beginning of the s-th supernode\n  IndexVector supno; // Supernode number corresponding to this column (column to supernode mapping)\n  ScalarVector  lusup; // nonzero values of L ordered by columns \n  IndexVector lsub; // Compressed row indices of L rectangular supernodes. \n  IndexVector xlusup; // pointers to the beginning of each column in lusup\n  IndexVector xlsub; // pointers to the beginning of each column in lsub\n  Index   nzlmax; // Current max size of lsub\n  Index   nzlumax; // Current max size of lusup\n  ScalarVector  ucol; // nonzero values of U ordered by columns \n  IndexVector usub; // row indices of U columns in ucol\n  IndexVector xusub; // Pointers to the beginning of each column of U in ucol \n  Index   nzumax; // Current max size of ucol\n  Index   n; // Number of columns in the matrix  \n  Index   num_expansions; \n};\n\n// Values to set for performance\nstruct perfvalues {\n  Index panel_size; // a panel consists of at most <panel_size> consecutive columns\n  Index relax; // To control degree of relaxing supernodes. If the number of nodes (columns) \n                // in a subtree of the elimination tree is less than relax, this subtree is considered \n                // as one supernode regardless of the row structures of those columns\n  Index maxsuper; // The maximum size for a supernode in complete LU\n  Index rowblk; // The minimum row dimension for 2-D blocking to be used;\n  Index colblk; // The minimum column dimension for 2-D blocking to be used;\n  Index fillfactor; // The estimated fills factors for L and U, compared with A\n}; \n\n} // end namespace internal\n\n} // end namespace Eigen\n#endif // EIGEN_LU_STRUCTS\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>\n// Copyright (C) 2012 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPARSELU_SUPERNODAL_MATRIX_H\n#define EIGEN_SPARSELU_SUPERNODAL_MATRIX_H\n\nnamespace Eigen {\nnamespace internal {\n\n/** \\ingroup SparseLU_Module\n * \\brief a class to manipulate the L supernodal factor from the SparseLU factorization\n * \n * This class  contain the data to easily store \n * and manipulate the supernodes during the factorization and solution phase of Sparse LU. \n * Only the lower triangular matrix has supernodes.\n * \n * NOTE : This class corresponds to the SCformat structure in SuperLU\n * \n */\n/* TODO\n * InnerIterator as for sparsematrix \n * SuperInnerIterator to iterate through all supernodes \n * Function for triangular solve\n */\ntemplate <typename _Scalar, typename _StorageIndex>\nclass MappedSuperNodalMatrix\n{\n  public:\n    typedef _Scalar Scalar; \n    typedef _StorageIndex StorageIndex;\n    typedef Matrix<StorageIndex,Dynamic,1> IndexVector;\n    typedef Matrix<Scalar,Dynamic,1> ScalarVector;\n  public:\n    MappedSuperNodalMatrix()\n    {\n      \n    }\n    MappedSuperNodalMatrix(Index m, Index n,  ScalarVector& nzval, IndexVector& nzval_colptr, IndexVector& rowind,\n             IndexVector& rowind_colptr, IndexVector& col_to_sup, IndexVector& sup_to_col )\n    {\n      setInfos(m, n, nzval, nzval_colptr, rowind, rowind_colptr, col_to_sup, sup_to_col);\n    }\n    \n    ~MappedSuperNodalMatrix()\n    {\n      \n    }\n    /**\n     * Set appropriate pointers for the lower triangular supernodal matrix\n     * These infos are available at the end of the numerical factorization\n     * FIXME This class will be modified such that it can be use in the course \n     * of the factorization.\n     */\n    void setInfos(Index m, Index n, ScalarVector& nzval, IndexVector& nzval_colptr, IndexVector& rowind,\n             IndexVector& rowind_colptr, IndexVector& col_to_sup, IndexVector& sup_to_col )\n    {\n      m_row = m;\n      m_col = n; \n      m_nzval = nzval.data(); \n      m_nzval_colptr = nzval_colptr.data(); \n      m_rowind = rowind.data(); \n      m_rowind_colptr = rowind_colptr.data(); \n      m_nsuper = col_to_sup(n); \n      m_col_to_sup = col_to_sup.data(); \n      m_sup_to_col = sup_to_col.data(); \n    }\n    \n    /**\n     * Number of rows\n     */\n    Index rows() const { return m_row; }\n    \n    /**\n     * Number of columns\n     */\n    Index cols() const { return m_col; }\n    \n    /**\n     * Return the array of nonzero values packed by column\n     * \n     * The size is nnz\n     */\n    Scalar* valuePtr() {  return m_nzval; }\n    \n    const Scalar* valuePtr() const \n    {\n      return m_nzval; \n    }\n    /**\n     * Return the pointers to the beginning of each column in \\ref valuePtr()\n     */\n    StorageIndex* colIndexPtr()\n    {\n      return m_nzval_colptr; \n    }\n    \n    const StorageIndex* colIndexPtr() const\n    {\n      return m_nzval_colptr; \n    }\n    \n    /**\n     * Return the array of compressed row indices of all supernodes\n     */\n    StorageIndex* rowIndex()  { return m_rowind; }\n    \n    const StorageIndex* rowIndex() const\n    {\n      return m_rowind; \n    }\n    \n    /**\n     * Return the location in \\em rowvaluePtr() which starts each column\n     */\n    StorageIndex* rowIndexPtr() { return m_rowind_colptr; }\n    \n    const StorageIndex* rowIndexPtr() const\n    {\n      return m_rowind_colptr; \n    }\n    \n    /** \n     * Return the array of column-to-supernode mapping \n     */\n    StorageIndex* colToSup()  { return m_col_to_sup; }\n    \n    const StorageIndex* colToSup() const\n    {\n      return m_col_to_sup;       \n    }\n    /**\n     * Return the array of supernode-to-column mapping\n     */\n    StorageIndex* supToCol() { return m_sup_to_col; }\n    \n    const StorageIndex* supToCol() const\n    {\n      return m_sup_to_col;\n    }\n    \n    /**\n     * Return the number of supernodes\n     */\n    Index nsuper() const\n    {\n      return m_nsuper; \n    }\n    \n    class InnerIterator; \n    template<typename Dest>\n    void solveInPlace( MatrixBase<Dest>&X) const;\n    \n      \n      \n    \n  protected:\n    Index m_row; // Number of rows\n    Index m_col; // Number of columns\n    Index m_nsuper; // Number of supernodes\n    Scalar* m_nzval; //array of nonzero values packed by column\n    StorageIndex* m_nzval_colptr; //nzval_colptr[j] Stores the location in nzval[] which starts column j\n    StorageIndex* m_rowind; // Array of compressed row indices of rectangular supernodes\n    StorageIndex* m_rowind_colptr; //rowind_colptr[j] stores the location in rowind[] which starts column j\n    StorageIndex* m_col_to_sup; // col_to_sup[j] is the supernode number to which column j belongs\n    StorageIndex* m_sup_to_col; //sup_to_col[s] points to the starting column of the s-th supernode\n    \n  private :\n};\n\n/**\n  * \\brief InnerIterator class to iterate over nonzero values of the current column in the supernodal matrix L\n  * \n  */\ntemplate<typename Scalar, typename StorageIndex>\nclass MappedSuperNodalMatrix<Scalar,StorageIndex>::InnerIterator\n{\n  public:\n     InnerIterator(const MappedSuperNodalMatrix& mat, Index outer)\n      : m_matrix(mat),\n        m_outer(outer),\n        m_supno(mat.colToSup()[outer]),\n        m_idval(mat.colIndexPtr()[outer]),\n        m_startidval(m_idval),\n        m_endidval(mat.colIndexPtr()[outer+1]),\n        m_idrow(mat.rowIndexPtr()[mat.supToCol()[mat.colToSup()[outer]]]),\n        m_endidrow(mat.rowIndexPtr()[mat.supToCol()[mat.colToSup()[outer]]+1])\n    {}\n    inline InnerIterator& operator++()\n    { \n      m_idval++; \n      m_idrow++;\n      return *this;\n    }\n    inline Scalar value() const { return m_matrix.valuePtr()[m_idval]; }\n    \n    inline Scalar& valueRef() { return const_cast<Scalar&>(m_matrix.valuePtr()[m_idval]); }\n    \n    inline Index index() const { return m_matrix.rowIndex()[m_idrow]; }\n    inline Index row() const { return index(); }\n    inline Index col() const { return m_outer; }\n    \n    inline Index supIndex() const { return m_supno; }\n    \n    inline operator bool() const \n    { \n      return ( (m_idval < m_endidval) && (m_idval >= m_startidval)\n                && (m_idrow < m_endidrow) );\n    }\n    \n  protected:\n    const MappedSuperNodalMatrix& m_matrix; // Supernodal lower triangular matrix \n    const Index m_outer;                    // Current column \n    const Index m_supno;                    // Current SuperNode number\n    Index m_idval;                          // Index to browse the values in the current column\n    const Index m_startidval;               // Start of the column value\n    const Index m_endidval;                 // End of the column value\n    Index m_idrow;                          // Index to browse the row indices \n    Index m_endidrow;                       // End index of row indices of the current column\n};\n\n/**\n * \\brief Solve with the supernode triangular matrix\n * \n */\ntemplate<typename Scalar, typename Index_>\ntemplate<typename Dest>\nvoid MappedSuperNodalMatrix<Scalar,Index_>::solveInPlace( MatrixBase<Dest>&X) const\n{\n    /* Explicit type conversion as the Index type of MatrixBase<Dest> may be wider than Index */\n//    eigen_assert(X.rows() <= NumTraits<Index>::highest());\n//    eigen_assert(X.cols() <= NumTraits<Index>::highest());\n    Index n    = int(X.rows());\n    Index nrhs = Index(X.cols());\n    const Scalar * Lval = valuePtr();                 // Nonzero values \n    Matrix<Scalar,Dynamic,Dest::ColsAtCompileTime, ColMajor> work(n, nrhs);     // working vector\n    work.setZero();\n    for (Index k = 0; k <= nsuper(); k ++)\n    {\n      Index fsupc = supToCol()[k];                    // First column of the current supernode \n      Index istart = rowIndexPtr()[fsupc];            // Pointer index to the subscript of the current column\n      Index nsupr = rowIndexPtr()[fsupc+1] - istart;  // Number of rows in the current supernode\n      Index nsupc = supToCol()[k+1] - fsupc;          // Number of columns in the current supernode\n      Index nrow = nsupr - nsupc;                     // Number of rows in the non-diagonal part of the supernode\n      Index irow;                                     //Current index row\n      \n      if (nsupc == 1 )\n      {\n        for (Index j = 0; j < nrhs; j++)\n        {\n          InnerIterator it(*this, fsupc);\n          ++it; // Skip the diagonal element\n          for (; it; ++it)\n          {\n            irow = it.row();\n            X(irow, j) -= X(fsupc, j) * it.value();\n          }\n        }\n      }\n      else\n      {\n        // The supernode has more than one column \n        Index luptr = colIndexPtr()[fsupc]; \n        Index lda = colIndexPtr()[fsupc+1] - luptr;\n        \n        // Triangular solve \n        Map<const Matrix<Scalar,Dynamic,Dynamic, ColMajor>, 0, OuterStride<> > A( &(Lval[luptr]), nsupc, nsupc, OuterStride<>(lda) );\n        Map< Matrix<Scalar,Dynamic,Dest::ColsAtCompileTime, ColMajor>, 0, OuterStride<> > U (&(X(fsupc,0)), nsupc, nrhs, OuterStride<>(n) );\n        U = A.template triangularView<UnitLower>().solve(U); \n        \n        // Matrix-vector product \n        new (&A) Map<const Matrix<Scalar,Dynamic,Dynamic, ColMajor>, 0, OuterStride<> > ( &(Lval[luptr+nsupc]), nrow, nsupc, OuterStride<>(lda) );\n        work.topRows(nrow).noalias() = A * U;\n        \n        //Begin Scatter \n        for (Index j = 0; j < nrhs; j++)\n        {\n          Index iptr = istart + nsupc; \n          for (Index i = 0; i < nrow; i++)\n          {\n            irow = rowIndex()[iptr]; \n            X(irow, j) -= work(i, j); // Scatter operation\n            work(i, j) = Scalar(0); \n            iptr++;\n          }\n        }\n      }\n    } \n}\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_SPARSELU_MATRIX_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseLU/SparseLU_Utils.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n\n#ifndef EIGEN_SPARSELU_UTILS_H\n#define EIGEN_SPARSELU_UTILS_H\n\nnamespace Eigen {\nnamespace internal {\n\n/**\n * \\brief Count Nonzero elements in the factors\n */\ntemplate <typename Scalar, typename StorageIndex>\nvoid SparseLUImpl<Scalar,StorageIndex>::countnz(const Index n, Index& nnzL, Index& nnzU, GlobalLU_t& glu)\n{\n nnzL = 0; \n nnzU = (glu.xusub)(n); \n Index nsuper = (glu.supno)(n); \n Index jlen; \n Index i, j, fsupc;\n if (n <= 0 ) return; \n // For each supernode\n for (i = 0; i <= nsuper; i++)\n {\n   fsupc = glu.xsup(i); \n   jlen = glu.xlsub(fsupc+1) - glu.xlsub(fsupc); \n   \n   for (j = fsupc; j < glu.xsup(i+1); j++)\n   {\n     nnzL += jlen; \n     nnzU += j - fsupc + 1; \n     jlen--; \n   }\n }\n}\n\n/**\n * \\brief Fix up the data storage lsub for L-subscripts. \n * \n * It removes the subscripts sets for structural pruning, \n * and applies permutation to the remaining subscripts\n * \n */\ntemplate <typename Scalar, typename StorageIndex>\nvoid SparseLUImpl<Scalar,StorageIndex>::fixupL(const Index n, const IndexVector& perm_r, GlobalLU_t& glu)\n{\n  Index fsupc, i, j, k, jstart; \n  \n  StorageIndex nextl = 0; \n  Index nsuper = (glu.supno)(n); \n  \n  // For each supernode \n  for (i = 0; i <= nsuper; i++)\n  {\n    fsupc = glu.xsup(i); \n    jstart = glu.xlsub(fsupc); \n    glu.xlsub(fsupc) = nextl; \n    for (j = jstart; j < glu.xlsub(fsupc + 1); j++)\n    {\n      glu.lsub(nextl) = perm_r(glu.lsub(j)); // Now indexed into P*A\n      nextl++;\n    }\n    for (k = fsupc+1; k < glu.xsup(i+1); k++)\n      glu.xlsub(k) = nextl; // other columns in supernode i\n  }\n  \n  glu.xlsub(n) = nextl; \n}\n\n} // end namespace internal\n\n} // end namespace Eigen\n#endif // EIGEN_SPARSELU_UTILS_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseLU/SparseLU_column_bmod.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>\n// Copyright (C) 2012 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n/* \n \n * NOTE: This file is the modified version of xcolumn_bmod.c file in SuperLU \n \n * -- SuperLU routine (version 3.0) --\n * Univ. of California Berkeley, Xerox Palo Alto Research Center,\n * and Lawrence Berkeley National Lab.\n * October 15, 2003\n *\n * Copyright (c) 1994 by Xerox Corporation.  All rights reserved.\n *\n * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY\n * EXPRESSED OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.\n *\n * Permission is hereby granted to use or copy this program for any\n * purpose, provided the above notices are retained on all copies.\n * Permission to modify the code and to distribute modified code is\n * granted, provided the above notices are retained, and a notice that\n * the code was modified is included with the above copyright notice.\n */\n#ifndef SPARSELU_COLUMN_BMOD_H\n#define SPARSELU_COLUMN_BMOD_H\n\nnamespace Eigen {\n\nnamespace internal {\n/**\n * \\brief Performs numeric block updates (sup-col) in topological order\n * \n * \\param jcol current column to update\n * \\param nseg Number of segments in the U part\n * \\param dense Store the full representation of the column\n * \\param tempv working array \n * \\param segrep segment representative ...\n * \\param repfnz ??? First nonzero column in each row ???  ...\n * \\param fpanelc First column in the current panel\n * \\param glu Global LU data. \n * \\return 0 - successful return \n *         > 0 - number of bytes allocated when run out of space\n * \n */\ntemplate <typename Scalar, typename StorageIndex>\nIndex SparseLUImpl<Scalar,StorageIndex>::column_bmod(const Index jcol, const Index nseg, BlockScalarVector dense, ScalarVector& tempv,\n                                                     BlockIndexVector segrep, BlockIndexVector repfnz, Index fpanelc, GlobalLU_t& glu)\n{\n  Index  jsupno, k, ksub, krep, ksupno; \n  Index lptr, nrow, isub, irow, nextlu, new_next, ufirst; \n  Index fsupc, nsupc, nsupr, luptr, kfnz, no_zeros; \n  /* krep = representative of current k-th supernode\n    * fsupc =  first supernodal column\n    * nsupc = number of columns in a supernode\n    * nsupr = number of rows in a supernode\n    * luptr = location of supernodal LU-block in storage\n    * kfnz = first nonz in the k-th supernodal segment\n    * no_zeros = no lf leading zeros in a supernodal U-segment\n    */\n  \n  jsupno = glu.supno(jcol);\n  // For each nonzero supernode segment of U[*,j] in topological order \n  k = nseg - 1; \n  Index d_fsupc; // distance between the first column of the current panel and the \n               // first column of the current snode\n  Index fst_col; // First column within small LU update\n  Index segsize; \n  for (ksub = 0; ksub < nseg; ksub++)\n  {\n    krep = segrep(k); k--; \n    ksupno = glu.supno(krep); \n    if (jsupno != ksupno )\n    {\n      // outside the rectangular supernode \n      fsupc = glu.xsup(ksupno); \n      fst_col = (std::max)(fsupc, fpanelc); \n      \n      // Distance from the current supernode to the current panel; \n      // d_fsupc = 0 if fsupc > fpanelc\n      d_fsupc = fst_col - fsupc; \n      \n      luptr = glu.xlusup(fst_col) + d_fsupc; \n      lptr = glu.xlsub(fsupc) + d_fsupc; \n      \n      kfnz = repfnz(krep); \n      kfnz = (std::max)(kfnz, fpanelc); \n      \n      segsize = krep - kfnz + 1; \n      nsupc = krep - fst_col + 1; \n      nsupr = glu.xlsub(fsupc+1) - glu.xlsub(fsupc); \n      nrow = nsupr - d_fsupc - nsupc;\n      Index lda = glu.xlusup(fst_col+1) - glu.xlusup(fst_col);\n      \n      \n      // Perform a triangular solver and block update, \n      // then scatter the result of sup-col update to dense\n      no_zeros = kfnz - fst_col; \n      if(segsize==1)\n        LU_kernel_bmod<1>::run(segsize, dense, tempv, glu.lusup, luptr, lda, nrow, glu.lsub, lptr, no_zeros);\n      else\n        LU_kernel_bmod<Dynamic>::run(segsize, dense, tempv, glu.lusup, luptr, lda, nrow, glu.lsub, lptr, no_zeros);\n    } // end if jsupno \n  } // end for each segment\n  \n  // Process the supernodal portion of  L\\U[*,j]\n  nextlu = glu.xlusup(jcol); \n  fsupc = glu.xsup(jsupno);\n  \n  // copy the SPA dense into L\\U[*,j]\n  Index mem; \n  new_next = nextlu + glu.xlsub(fsupc + 1) - glu.xlsub(fsupc); \n  Index offset = internal::first_multiple<Index>(new_next, internal::packet_traits<Scalar>::size) - new_next;\n  if(offset)\n    new_next += offset;\n  while (new_next > glu.nzlumax )\n  {\n    mem = memXpand<ScalarVector>(glu.lusup, glu.nzlumax, nextlu, LUSUP, glu.num_expansions);  \n    if (mem) return mem; \n  }\n  \n  for (isub = glu.xlsub(fsupc); isub < glu.xlsub(fsupc+1); isub++)\n  {\n    irow = glu.lsub(isub);\n    glu.lusup(nextlu) = dense(irow);\n    dense(irow) = Scalar(0.0); \n    ++nextlu; \n  }\n  \n  if(offset)\n  {\n    glu.lusup.segment(nextlu,offset).setZero();\n    nextlu += offset;\n  }\n  glu.xlusup(jcol + 1) = StorageIndex(nextlu);  // close L\\U(*,jcol); \n  \n  /* For more updates within the panel (also within the current supernode),\n   * should start from the first column of the panel, or the first column\n   * of the supernode, whichever is bigger. There are two cases:\n   *  1) fsupc < fpanelc, then fst_col <-- fpanelc\n   *  2) fsupc >= fpanelc, then fst_col <-- fsupc\n   */\n  fst_col = (std::max)(fsupc, fpanelc); \n  \n  if (fst_col  < jcol)\n  {\n    // Distance between the current supernode and the current panel\n    // d_fsupc = 0 if fsupc >= fpanelc\n    d_fsupc = fst_col - fsupc; \n    \n    lptr = glu.xlsub(fsupc) + d_fsupc; \n    luptr = glu.xlusup(fst_col) + d_fsupc; \n    nsupr = glu.xlsub(fsupc+1) - glu.xlsub(fsupc); // leading dimension\n    nsupc = jcol - fst_col; // excluding jcol \n    nrow = nsupr - d_fsupc - nsupc; \n    \n    // points to the beginning of jcol in snode L\\U(jsupno) \n    ufirst = glu.xlusup(jcol) + d_fsupc; \n    Index lda = glu.xlusup(jcol+1) - glu.xlusup(jcol);\n    MappedMatrixBlock A( &(glu.lusup.data()[luptr]), nsupc, nsupc, OuterStride<>(lda) );\n    VectorBlock<ScalarVector> u(glu.lusup, ufirst, nsupc); \n    u = A.template triangularView<UnitLower>().solve(u); \n    \n    new (&A) MappedMatrixBlock ( &(glu.lusup.data()[luptr+nsupc]), nrow, nsupc, OuterStride<>(lda) );\n    VectorBlock<ScalarVector> l(glu.lusup, ufirst+nsupc, nrow); \n    l.noalias() -= A * u;\n    \n  } // End if fst_col\n  return 0; \n}\n\n} // end namespace internal\n} // end namespace Eigen\n\n#endif // SPARSELU_COLUMN_BMOD_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseLU/SparseLU_column_dfs.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n/* \n \n * NOTE: This file is the modified version of [s,d,c,z]column_dfs.c file in SuperLU \n \n * -- SuperLU routine (version 2.0) --\n * Univ. of California Berkeley, Xerox Palo Alto Research Center,\n * and Lawrence Berkeley National Lab.\n * November 15, 1997\n *\n * Copyright (c) 1994 by Xerox Corporation.  All rights reserved.\n *\n * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY\n * EXPRESSED OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.\n *\n * Permission is hereby granted to use or copy this program for any\n * purpose, provided the above notices are retained on all copies.\n * Permission to modify the code and to distribute modified code is\n * granted, provided the above notices are retained, and a notice that\n * the code was modified is included with the above copyright notice.\n */\n#ifndef SPARSELU_COLUMN_DFS_H\n#define SPARSELU_COLUMN_DFS_H\n\ntemplate <typename Scalar, typename StorageIndex> class SparseLUImpl;\nnamespace Eigen {\n\nnamespace internal {\n\ntemplate<typename IndexVector, typename ScalarVector>\nstruct column_dfs_traits : no_assignment_operator\n{\n  typedef typename ScalarVector::Scalar Scalar;\n  typedef typename IndexVector::Scalar StorageIndex;\n  column_dfs_traits(Index jcol, Index& jsuper, typename SparseLUImpl<Scalar, StorageIndex>::GlobalLU_t& glu, SparseLUImpl<Scalar, StorageIndex>& luImpl)\n   : m_jcol(jcol), m_jsuper_ref(jsuper), m_glu(glu), m_luImpl(luImpl)\n {}\n  bool update_segrep(Index /*krep*/, Index /*jj*/)\n  {\n    return true;\n  }\n  void mem_expand(IndexVector& lsub, Index& nextl, Index chmark)\n  {\n    if (nextl >= m_glu.nzlmax)\n      m_luImpl.memXpand(lsub, m_glu.nzlmax, nextl, LSUB, m_glu.num_expansions); \n    if (chmark != (m_jcol-1)) m_jsuper_ref = emptyIdxLU;\n  }\n  enum { ExpandMem = true };\n  \n  Index m_jcol;\n  Index& m_jsuper_ref;\n  typename SparseLUImpl<Scalar, StorageIndex>::GlobalLU_t& m_glu;\n  SparseLUImpl<Scalar, StorageIndex>& m_luImpl;\n};\n\n\n/**\n * \\brief Performs a symbolic factorization on column jcol and decide the supernode boundary\n * \n * A supernode representative is the last column of a supernode.\n * The nonzeros in U[*,j] are segments that end at supernodes representatives. \n * The routine returns a list of the supernodal representatives \n * in topological order of the dfs that generates them. \n * The location of the first nonzero in each supernodal segment \n * (supernodal entry location) is also returned. \n * \n * \\param m number of rows in the matrix\n * \\param jcol Current column \n * \\param perm_r Row permutation\n * \\param maxsuper  Maximum number of column allowed in a supernode\n * \\param [in,out] nseg Number of segments in current U[*,j] - new segments appended\n * \\param lsub_col defines the rhs vector to start the dfs\n * \\param [in,out] segrep Segment representatives - new segments appended \n * \\param repfnz  First nonzero location in each row\n * \\param xprune \n * \\param marker  marker[i] == jj, if i was visited during dfs of current column jj;\n * \\param parent\n * \\param xplore working array\n * \\param glu global LU data \n * \\return 0 success\n *         > 0 number of bytes allocated when run out of space\n * \n */\ntemplate <typename Scalar, typename StorageIndex>\nIndex SparseLUImpl<Scalar,StorageIndex>::column_dfs(const Index m, const Index jcol, IndexVector& perm_r, Index maxsuper, Index& nseg,\n                                                    BlockIndexVector lsub_col, IndexVector& segrep, BlockIndexVector repfnz, IndexVector& xprune,\n                                                    IndexVector& marker, IndexVector& parent, IndexVector& xplore, GlobalLU_t& glu)\n{\n  \n  Index jsuper = glu.supno(jcol); \n  Index nextl = glu.xlsub(jcol); \n  VectorBlock<IndexVector> marker2(marker, 2*m, m); \n  \n  \n  column_dfs_traits<IndexVector, ScalarVector> traits(jcol, jsuper, glu, *this);\n  \n  // For each nonzero in A(*,jcol) do dfs \n  for (Index k = 0; ((k < m) ? lsub_col[k] != emptyIdxLU : false) ; k++)\n  {\n    Index krow = lsub_col(k); \n    lsub_col(k) = emptyIdxLU; \n    Index kmark = marker2(krow); \n    \n    // krow was visited before, go to the next nonz; \n    if (kmark == jcol) continue;\n    \n    dfs_kernel(StorageIndex(jcol), perm_r, nseg, glu.lsub, segrep, repfnz, xprune, marker2, parent,\n                   xplore, glu, nextl, krow, traits);\n  } // for each nonzero ... \n  \n  Index fsupc;\n  StorageIndex nsuper = glu.supno(jcol);\n  StorageIndex jcolp1 = StorageIndex(jcol) + 1;\n  Index jcolm1 = jcol - 1;\n  \n  // check to see if j belongs in the same supernode as j-1\n  if ( jcol == 0 )\n  { // Do nothing for column 0 \n    nsuper = glu.supno(0) = 0 ;\n  }\n  else \n  {\n    fsupc = glu.xsup(nsuper); \n    StorageIndex jptr = glu.xlsub(jcol); // Not yet compressed\n    StorageIndex jm1ptr = glu.xlsub(jcolm1); \n    \n    // Use supernodes of type T2 : see SuperLU paper\n    if ( (nextl-jptr != jptr-jm1ptr-1) ) jsuper = emptyIdxLU;\n    \n    // Make sure the number of columns in a supernode doesn't\n    // exceed threshold\n    if ( (jcol - fsupc) >= maxsuper) jsuper = emptyIdxLU; \n    \n    /* If jcol starts a new supernode, reclaim storage space in\n     * glu.lsub from previous supernode. Note we only store \n     * the subscript set of the first and last columns of \n     * a supernode. (first for num values, last for pruning)\n     */\n    if (jsuper == emptyIdxLU)\n    { // starts a new supernode \n      if ( (fsupc < jcolm1-1) ) \n      { // >= 3 columns in nsuper\n        StorageIndex ito = glu.xlsub(fsupc+1);\n        glu.xlsub(jcolm1) = ito; \n        StorageIndex istop = ito + jptr - jm1ptr; \n        xprune(jcolm1) = istop; // initialize xprune(jcol-1)\n        glu.xlsub(jcol) = istop; \n        \n        for (StorageIndex ifrom = jm1ptr; ifrom < nextl; ++ifrom, ++ito)\n          glu.lsub(ito) = glu.lsub(ifrom); \n        nextl = ito;  // = istop + length(jcol)\n      }\n      nsuper++; \n      glu.supno(jcol) = nsuper; \n    } // if a new supernode \n  } // end else:  jcol > 0\n  \n  // Tidy up the pointers before exit\n  glu.xsup(nsuper+1) = jcolp1; \n  glu.supno(jcolp1) = nsuper; \n  xprune(jcol) = StorageIndex(nextl);  // Initialize upper bound for pruning\n  glu.xlsub(jcolp1) = StorageIndex(nextl); \n  \n  return 0; \n}\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseLU/SparseLU_copy_to_ucol.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n/* \n \n * NOTE: This file is the modified version of [s,d,c,z]copy_to_ucol.c file in SuperLU \n \n * -- SuperLU routine (version 2.0) --\n * Univ. of California Berkeley, Xerox Palo Alto Research Center,\n * and Lawrence Berkeley National Lab.\n * November 15, 1997\n *\n * Copyright (c) 1994 by Xerox Corporation.  All rights reserved.\n *\n * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY\n * EXPRESSED OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.\n *\n * Permission is hereby granted to use or copy this program for any\n * purpose, provided the above notices are retained on all copies.\n * Permission to modify the code and to distribute modified code is\n * granted, provided the above notices are retained, and a notice that\n * the code was modified is included with the above copyright notice.\n */\n#ifndef SPARSELU_COPY_TO_UCOL_H\n#define SPARSELU_COPY_TO_UCOL_H\n\nnamespace Eigen {\nnamespace internal {\n\n/**\n * \\brief Performs numeric block updates (sup-col) in topological order\n * \n * \\param jcol current column to update\n * \\param nseg Number of segments in the U part\n * \\param segrep segment representative ...\n * \\param repfnz First nonzero column in each row  ...\n * \\param perm_r Row permutation \n * \\param dense Store the full representation of the column\n * \\param glu Global LU data. \n * \\return 0 - successful return \n *         > 0 - number of bytes allocated when run out of space\n * \n */\ntemplate <typename Scalar, typename StorageIndex>\nIndex SparseLUImpl<Scalar,StorageIndex>::copy_to_ucol(const Index jcol, const Index nseg, IndexVector& segrep,\n                                                      BlockIndexVector repfnz ,IndexVector& perm_r, BlockScalarVector dense, GlobalLU_t& glu)\n{  \n  Index ksub, krep, ksupno; \n    \n  Index jsupno = glu.supno(jcol);\n  \n  // For each nonzero supernode segment of U[*,j] in topological order \n  Index k = nseg - 1, i; \n  StorageIndex nextu = glu.xusub(jcol); \n  Index kfnz, isub, segsize; \n  Index new_next,irow; \n  Index fsupc, mem; \n  for (ksub = 0; ksub < nseg; ksub++)\n  {\n    krep = segrep(k); k--; \n    ksupno = glu.supno(krep); \n    if (jsupno != ksupno ) // should go into ucol(); \n    {\n      kfnz = repfnz(krep); \n      if (kfnz != emptyIdxLU)\n      { // Nonzero U-segment \n        fsupc = glu.xsup(ksupno); \n        isub = glu.xlsub(fsupc) + kfnz - fsupc; \n        segsize = krep - kfnz + 1; \n        new_next = nextu + segsize; \n        while (new_next > glu.nzumax) \n        {\n          mem = memXpand<ScalarVector>(glu.ucol, glu.nzumax, nextu, UCOL, glu.num_expansions); \n          if (mem) return mem; \n          mem = memXpand<IndexVector>(glu.usub, glu.nzumax, nextu, USUB, glu.num_expansions); \n          if (mem) return mem; \n          \n        }\n        \n        for (i = 0; i < segsize; i++)\n        {\n          irow = glu.lsub(isub); \n          glu.usub(nextu) = perm_r(irow); // Unlike the L part, the U part is stored in its final order\n          glu.ucol(nextu) = dense(irow); \n          dense(irow) = Scalar(0.0); \n          nextu++;\n          isub++;\n        }\n        \n      } // end nonzero U-segment \n      \n    } // end if jsupno \n    \n  } // end for each segment\n  glu.xusub(jcol + 1) = nextu; // close U(*,jcol)\n  return 0; \n}\n\n} // namespace internal\n} // end namespace Eigen\n\n#endif // SPARSELU_COPY_TO_UCOL_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseLU/SparseLU_gemm_kernel.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPARSELU_GEMM_KERNEL_H\n#define EIGEN_SPARSELU_GEMM_KERNEL_H\n\nnamespace Eigen {\n\nnamespace internal {\n\n\n/** \\internal\n  * A general matrix-matrix product kernel optimized for the SparseLU factorization.\n  *  - A, B, and C must be column major\n  *  - lda and ldc must be multiples of the respective packet size\n  *  - C must have the same alignment as A\n  */\ntemplate<typename Scalar>\nEIGEN_DONT_INLINE\nvoid sparselu_gemm(Index m, Index n, Index d, const Scalar* A, Index lda, const Scalar* B, Index ldb, Scalar* C, Index ldc)\n{\n  using namespace Eigen::internal;\n  \n  typedef typename packet_traits<Scalar>::type Packet;\n  enum {\n    NumberOfRegisters = EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS,\n    PacketSize = packet_traits<Scalar>::size,\n    PM = 8,                             // peeling in M\n    RN = 2,                             // register blocking\n    RK = NumberOfRegisters>=16 ? 4 : 2, // register blocking\n    BM = 4096/sizeof(Scalar),           // number of rows of A-C per chunk\n    SM = PM*PacketSize                  // step along M\n  };\n  Index d_end = (d/RK)*RK;    // number of columns of A (rows of B) suitable for full register blocking\n  Index n_end = (n/RN)*RN;    // number of columns of B-C suitable for processing RN columns at once\n  Index i0 = internal::first_default_aligned(A,m);\n  \n  eigen_internal_assert(((lda%PacketSize)==0) && ((ldc%PacketSize)==0) && (i0==internal::first_default_aligned(C,m)));\n  \n  // handle the non aligned rows of A and C without any optimization:\n  for(Index i=0; i<i0; ++i)\n  {\n    for(Index j=0; j<n; ++j)\n    {\n      Scalar c = C[i+j*ldc];\n      for(Index k=0; k<d; ++k)\n        c += B[k+j*ldb] * A[i+k*lda];\n      C[i+j*ldc] = c;\n    }\n  }\n  // process the remaining rows per chunk of BM rows\n  for(Index ib=i0; ib<m; ib+=BM)\n  {\n    Index actual_b = std::min<Index>(BM, m-ib);                 // actual number of rows\n    Index actual_b_end1 = (actual_b/SM)*SM;                   // actual number of rows suitable for peeling\n    Index actual_b_end2 = (actual_b/PacketSize)*PacketSize;   // actual number of rows suitable for vectorization\n    \n    // Let's process two columns of B-C at once\n    for(Index j=0; j<n_end; j+=RN)\n    {\n      const Scalar* Bc0 = B+(j+0)*ldb;\n      const Scalar* Bc1 = B+(j+1)*ldb;\n      \n      for(Index k=0; k<d_end; k+=RK)\n      {\n        \n        // load and expand a RN x RK block of B\n        Packet b00, b10, b20, b30, b01, b11, b21, b31;\n                  { b00 = pset1<Packet>(Bc0[0]); }\n                  { b10 = pset1<Packet>(Bc0[1]); }\n        if(RK==4) { b20 = pset1<Packet>(Bc0[2]); }\n        if(RK==4) { b30 = pset1<Packet>(Bc0[3]); }\n                  { b01 = pset1<Packet>(Bc1[0]); }\n                  { b11 = pset1<Packet>(Bc1[1]); }\n        if(RK==4) { b21 = pset1<Packet>(Bc1[2]); }\n        if(RK==4) { b31 = pset1<Packet>(Bc1[3]); }\n        \n        Packet a0, a1, a2, a3, c0, c1, t0, t1;\n        \n        const Scalar* A0 = A+ib+(k+0)*lda;\n        const Scalar* A1 = A+ib+(k+1)*lda;\n        const Scalar* A2 = A+ib+(k+2)*lda;\n        const Scalar* A3 = A+ib+(k+3)*lda;\n        \n        Scalar* C0 = C+ib+(j+0)*ldc;\n        Scalar* C1 = C+ib+(j+1)*ldc;\n        \n                  a0 = pload<Packet>(A0);\n                  a1 = pload<Packet>(A1);\n        if(RK==4)\n        {\n          a2 = pload<Packet>(A2);\n          a3 = pload<Packet>(A3);\n        }\n        else\n        {\n          // workaround \"may be used uninitialized in this function\" warning\n          a2 = a3 = a0;\n        }\n        \n#define KMADD(c, a, b, tmp) {tmp = b; tmp = pmul(a,tmp); c = padd(c,tmp);}\n#define WORK(I)  \\\n                     c0 = pload<Packet>(C0+i+(I)*PacketSize);    \\\n                     c1 = pload<Packet>(C1+i+(I)*PacketSize);    \\\n                     KMADD(c0, a0, b00, t0)                      \\\n                     KMADD(c1, a0, b01, t1)                      \\\n                     a0 = pload<Packet>(A0+i+(I+1)*PacketSize);  \\\n                     KMADD(c0, a1, b10, t0)                      \\\n                     KMADD(c1, a1, b11, t1)                      \\\n                     a1 = pload<Packet>(A1+i+(I+1)*PacketSize);  \\\n          if(RK==4){ KMADD(c0, a2, b20, t0)                     }\\\n          if(RK==4){ KMADD(c1, a2, b21, t1)                     }\\\n          if(RK==4){ a2 = pload<Packet>(A2+i+(I+1)*PacketSize); }\\\n          if(RK==4){ KMADD(c0, a3, b30, t0)                     }\\\n          if(RK==4){ KMADD(c1, a3, b31, t1)                     }\\\n          if(RK==4){ a3 = pload<Packet>(A3+i+(I+1)*PacketSize); }\\\n                     pstore(C0+i+(I)*PacketSize, c0);            \\\n                     pstore(C1+i+(I)*PacketSize, c1)\n        \n        // process rows of A' - C' with aggressive vectorization and peeling \n        for(Index i=0; i<actual_b_end1; i+=PacketSize*8)\n        {\n          EIGEN_ASM_COMMENT(\"SPARSELU_GEMML_KERNEL1\");\n                    prefetch((A0+i+(5)*PacketSize));\n                    prefetch((A1+i+(5)*PacketSize));\n          if(RK==4) prefetch((A2+i+(5)*PacketSize));\n          if(RK==4) prefetch((A3+i+(5)*PacketSize));\n\n          WORK(0);\n          WORK(1);\n          WORK(2);\n          WORK(3);\n          WORK(4);\n          WORK(5);\n          WORK(6);\n          WORK(7);\n        }\n        // process the remaining rows with vectorization only\n        for(Index i=actual_b_end1; i<actual_b_end2; i+=PacketSize)\n        {\n          WORK(0);\n        }\n#undef WORK\n        // process the remaining rows without vectorization\n        for(Index i=actual_b_end2; i<actual_b; ++i)\n        {\n          if(RK==4)\n          {\n            C0[i] += A0[i]*Bc0[0]+A1[i]*Bc0[1]+A2[i]*Bc0[2]+A3[i]*Bc0[3];\n            C1[i] += A0[i]*Bc1[0]+A1[i]*Bc1[1]+A2[i]*Bc1[2]+A3[i]*Bc1[3];\n          }\n          else\n          {\n            C0[i] += A0[i]*Bc0[0]+A1[i]*Bc0[1];\n            C1[i] += A0[i]*Bc1[0]+A1[i]*Bc1[1];\n          }\n        }\n        \n        Bc0 += RK;\n        Bc1 += RK;\n      } // peeled loop on k\n    } // peeled loop on the columns j\n    // process the last column (we now perform a matrix-vector product)\n    if((n-n_end)>0)\n    {\n      const Scalar* Bc0 = B+(n-1)*ldb;\n      \n      for(Index k=0; k<d_end; k+=RK)\n      {\n        \n        // load and expand a 1 x RK block of B\n        Packet b00, b10, b20, b30;\n                  b00 = pset1<Packet>(Bc0[0]);\n                  b10 = pset1<Packet>(Bc0[1]);\n        if(RK==4) b20 = pset1<Packet>(Bc0[2]);\n        if(RK==4) b30 = pset1<Packet>(Bc0[3]);\n        \n        Packet a0, a1, a2, a3, c0, t0/*, t1*/;\n        \n        const Scalar* A0 = A+ib+(k+0)*lda;\n        const Scalar* A1 = A+ib+(k+1)*lda;\n        const Scalar* A2 = A+ib+(k+2)*lda;\n        const Scalar* A3 = A+ib+(k+3)*lda;\n        \n        Scalar* C0 = C+ib+(n_end)*ldc;\n        \n                  a0 = pload<Packet>(A0);\n                  a1 = pload<Packet>(A1);\n        if(RK==4)\n        {\n          a2 = pload<Packet>(A2);\n          a3 = pload<Packet>(A3);\n        }\n        else\n        {\n          // workaround \"may be used uninitialized in this function\" warning\n          a2 = a3 = a0;\n        }\n        \n#define WORK(I) \\\n                   c0 = pload<Packet>(C0+i+(I)*PacketSize);     \\\n                   KMADD(c0, a0, b00, t0)                       \\\n                   a0 = pload<Packet>(A0+i+(I+1)*PacketSize);   \\\n                   KMADD(c0, a1, b10, t0)                       \\\n                   a1 = pload<Packet>(A1+i+(I+1)*PacketSize);   \\\n        if(RK==4){ KMADD(c0, a2, b20, t0)                      }\\\n        if(RK==4){ a2 = pload<Packet>(A2+i+(I+1)*PacketSize);  }\\\n        if(RK==4){ KMADD(c0, a3, b30, t0)                      }\\\n        if(RK==4){ a3 = pload<Packet>(A3+i+(I+1)*PacketSize);  }\\\n                   pstore(C0+i+(I)*PacketSize, c0);\n        \n        // aggressive vectorization and peeling\n        for(Index i=0; i<actual_b_end1; i+=PacketSize*8)\n        {\n          EIGEN_ASM_COMMENT(\"SPARSELU_GEMML_KERNEL2\");\n          WORK(0);\n          WORK(1);\n          WORK(2);\n          WORK(3);\n          WORK(4);\n          WORK(5);\n          WORK(6);\n          WORK(7);\n        }\n        // vectorization only\n        for(Index i=actual_b_end1; i<actual_b_end2; i+=PacketSize)\n        {\n          WORK(0);\n        }\n        // remaining scalars\n        for(Index i=actual_b_end2; i<actual_b; ++i)\n        {\n          if(RK==4) \n            C0[i] += A0[i]*Bc0[0]+A1[i]*Bc0[1]+A2[i]*Bc0[2]+A3[i]*Bc0[3];\n          else\n            C0[i] += A0[i]*Bc0[0]+A1[i]*Bc0[1];\n        }\n        \n        Bc0 += RK;\n#undef WORK\n      }\n    }\n    \n    // process the last columns of A, corresponding to the last rows of B\n    Index rd = d-d_end;\n    if(rd>0)\n    {\n      for(Index j=0; j<n; ++j)\n      {\n        enum {\n          Alignment = PacketSize>1 ? Aligned : 0\n        };\n        typedef Map<Matrix<Scalar,Dynamic,1>, Alignment > MapVector;\n        typedef Map<const Matrix<Scalar,Dynamic,1>, Alignment > ConstMapVector;\n        if(rd==1)       MapVector(C+j*ldc+ib,actual_b) += B[0+d_end+j*ldb] * ConstMapVector(A+(d_end+0)*lda+ib, actual_b);\n        \n        else if(rd==2)  MapVector(C+j*ldc+ib,actual_b) += B[0+d_end+j*ldb] * ConstMapVector(A+(d_end+0)*lda+ib, actual_b)\n                                                        + B[1+d_end+j*ldb] * ConstMapVector(A+(d_end+1)*lda+ib, actual_b);\n        \n        else            MapVector(C+j*ldc+ib,actual_b) += B[0+d_end+j*ldb] * ConstMapVector(A+(d_end+0)*lda+ib, actual_b)\n                                                        + B[1+d_end+j*ldb] * ConstMapVector(A+(d_end+1)*lda+ib, actual_b)\n                                                        + B[2+d_end+j*ldb] * ConstMapVector(A+(d_end+2)*lda+ib, actual_b);\n      }\n    }\n  \n  } // blocking on the rows of A and C\n}\n#undef KMADD\n\n} // namespace internal\n\n} // namespace Eigen\n\n#endif // EIGEN_SPARSELU_GEMM_KERNEL_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n/* This file is a modified version of heap_relax_snode.c file in SuperLU\n * -- SuperLU routine (version 3.0) --\n * Univ. of California Berkeley, Xerox Palo Alto Research Center,\n * and Lawrence Berkeley National Lab.\n * October 15, 2003\n *\n * Copyright (c) 1994 by Xerox Corporation.  All rights reserved.\n *\n * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY\n * EXPRESSED OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.\n *\n * Permission is hereby granted to use or copy this program for any\n * purpose, provided the above notices are retained on all copies.\n * Permission to modify the code and to distribute modified code is\n * granted, provided the above notices are retained, and a notice that\n * the code was modified is included with the above copyright notice.\n */\n\n#ifndef SPARSELU_HEAP_RELAX_SNODE_H\n#define SPARSELU_HEAP_RELAX_SNODE_H\n\nnamespace Eigen {\nnamespace internal {\n\n/** \n * \\brief Identify the initial relaxed supernodes\n * \n * This routine applied to a symmetric elimination tree. \n * It assumes that the matrix has been reordered according to the postorder of the etree\n * \\param n The number of columns\n * \\param et elimination tree \n * \\param relax_columns Maximum number of columns allowed in a relaxed snode \n * \\param descendants Number of descendants of each node in the etree\n * \\param relax_end last column in a supernode\n */\ntemplate <typename Scalar, typename StorageIndex>\nvoid SparseLUImpl<Scalar,StorageIndex>::heap_relax_snode (const Index n, IndexVector& et, const Index relax_columns, IndexVector& descendants, IndexVector& relax_end)\n{\n  \n  // The etree may not be postordered, but its heap ordered  \n  IndexVector post;\n  internal::treePostorder(StorageIndex(n), et, post); // Post order etree\n  IndexVector inv_post(n+1); \n  for (StorageIndex i = 0; i < n+1; ++i) inv_post(post(i)) = i; // inv_post = post.inverse()???\n  \n  // Renumber etree in postorder \n  IndexVector iwork(n);\n  IndexVector et_save(n+1);\n  for (Index i = 0; i < n; ++i)\n  {\n    iwork(post(i)) = post(et(i));\n  }\n  et_save = et; // Save the original etree\n  et = iwork; \n  \n  // compute the number of descendants of each node in the etree\n  relax_end.setConstant(emptyIdxLU);\n  Index j, parent; \n  descendants.setZero();\n  for (j = 0; j < n; j++) \n  {\n    parent = et(j);\n    if (parent != n) // not the dummy root\n      descendants(parent) += descendants(j) + 1;\n  }\n  // Identify the relaxed supernodes by postorder traversal of the etree\n  Index snode_start; // beginning of a snode \n  StorageIndex k;\n  Index nsuper_et_post = 0; // Number of relaxed snodes in postordered etree \n  Index nsuper_et = 0; // Number of relaxed snodes in the original etree \n  StorageIndex l; \n  for (j = 0; j < n; )\n  {\n    parent = et(j);\n    snode_start = j; \n    while ( parent != n && descendants(parent) < relax_columns ) \n    {\n      j = parent; \n      parent = et(j);\n    }\n    // Found a supernode in postordered etree, j is the last column \n    ++nsuper_et_post;\n    k = StorageIndex(n);\n    for (Index i = snode_start; i <= j; ++i)\n      k = (std::min)(k, inv_post(i));\n    l = inv_post(j);\n    if ( (l - k) == (j - snode_start) )  // Same number of columns in the snode\n    {\n      // This is also a supernode in the original etree\n      relax_end(k) = l; // Record last column \n      ++nsuper_et; \n    }\n    else \n    {\n      for (Index i = snode_start; i <= j; ++i) \n      {\n        l = inv_post(i);\n        if (descendants(i) == 0) \n        {\n          relax_end(l) = l;\n          ++nsuper_et;\n        }\n      }\n    }\n    j++;\n    // Search for a new leaf\n    while (descendants(j) != 0 && j < n) j++;\n  } // End postorder traversal of the etree\n  \n  // Recover the original etree\n  et = et_save; \n}\n\n} // end namespace internal\n\n} // end namespace Eigen\n#endif // SPARSELU_HEAP_RELAX_SNODE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseLU/SparseLU_kernel_bmod.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>\n// Copyright (C) 2012 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef SPARSELU_KERNEL_BMOD_H\n#define SPARSELU_KERNEL_BMOD_H\n\nnamespace Eigen {\nnamespace internal {\n  \ntemplate <int SegSizeAtCompileTime> struct LU_kernel_bmod\n{\n  /** \\internal\n    * \\brief Performs numeric block updates from a given supernode to a single column\n    *\n    * \\param segsize Size of the segment (and blocks ) to use for updates\n    * \\param[in,out] dense Packed values of the original matrix\n    * \\param tempv temporary vector to use for updates\n    * \\param lusup array containing the supernodes\n    * \\param lda Leading dimension in the supernode\n    * \\param nrow Number of rows in the rectangular part of the supernode\n    * \\param lsub compressed row subscripts of supernodes\n    * \\param lptr pointer to the first column of the current supernode in lsub\n    * \\param no_zeros Number of nonzeros elements before the diagonal part of the supernode\n    */\n  template <typename BlockScalarVector, typename ScalarVector, typename IndexVector>\n  static EIGEN_DONT_INLINE void run(const Index segsize, BlockScalarVector& dense, ScalarVector& tempv, ScalarVector& lusup, Index& luptr, const Index lda,\n                                    const Index nrow, IndexVector& lsub, const Index lptr, const Index no_zeros);\n};\n\ntemplate <int SegSizeAtCompileTime>\ntemplate <typename BlockScalarVector, typename ScalarVector, typename IndexVector>\nEIGEN_DONT_INLINE void LU_kernel_bmod<SegSizeAtCompileTime>::run(const Index segsize, BlockScalarVector& dense, ScalarVector& tempv, ScalarVector& lusup, Index& luptr, const Index lda,\n                                                                  const Index nrow, IndexVector& lsub, const Index lptr, const Index no_zeros)\n{\n  typedef typename ScalarVector::Scalar Scalar;\n  // First, copy U[*,j] segment from dense(*) to tempv(*)\n  // The result of triangular solve is in tempv[*]; \n    // The result of matric-vector update is in dense[*]\n  Index isub = lptr + no_zeros; \n  Index i;\n  Index irow;\n  for (i = 0; i < ((SegSizeAtCompileTime==Dynamic)?segsize:SegSizeAtCompileTime); i++)\n  {\n    irow = lsub(isub); \n    tempv(i) = dense(irow); \n    ++isub; \n  }\n  // Dense triangular solve -- start effective triangle\n  luptr += lda * no_zeros + no_zeros; \n  // Form Eigen matrix and vector \n  Map<Matrix<Scalar,SegSizeAtCompileTime,SegSizeAtCompileTime, ColMajor>, 0, OuterStride<> > A( &(lusup.data()[luptr]), segsize, segsize, OuterStride<>(lda) );\n  Map<Matrix<Scalar,SegSizeAtCompileTime,1> > u(tempv.data(), segsize);\n  \n  u = A.template triangularView<UnitLower>().solve(u); \n  \n  // Dense matrix-vector product y <-- B*x \n  luptr += segsize;\n  const Index PacketSize = internal::packet_traits<Scalar>::size;\n  Index ldl = internal::first_multiple(nrow, PacketSize);\n  Map<Matrix<Scalar,Dynamic,SegSizeAtCompileTime, ColMajor>, 0, OuterStride<> > B( &(lusup.data()[luptr]), nrow, segsize, OuterStride<>(lda) );\n  Index aligned_offset = internal::first_default_aligned(tempv.data()+segsize, PacketSize);\n  Index aligned_with_B_offset = (PacketSize-internal::first_default_aligned(B.data(), PacketSize))%PacketSize;\n  Map<Matrix<Scalar,Dynamic,1>, 0, OuterStride<> > l(tempv.data()+segsize+aligned_offset+aligned_with_B_offset, nrow, OuterStride<>(ldl) );\n  \n  l.setZero();\n  internal::sparselu_gemm<Scalar>(l.rows(), l.cols(), B.cols(), B.data(), B.outerStride(), u.data(), u.outerStride(), l.data(), l.outerStride());\n  \n  // Scatter tempv[] into SPA dense[] as a temporary storage \n  isub = lptr + no_zeros;\n  for (i = 0; i < ((SegSizeAtCompileTime==Dynamic)?segsize:SegSizeAtCompileTime); i++)\n  {\n    irow = lsub(isub++); \n    dense(irow) = tempv(i);\n  }\n  \n  // Scatter l into SPA dense[]\n  for (i = 0; i < nrow; i++)\n  {\n    irow = lsub(isub++); \n    dense(irow) -= l(i);\n  } \n}\n\ntemplate <> struct LU_kernel_bmod<1>\n{\n  template <typename BlockScalarVector, typename ScalarVector, typename IndexVector>\n  static EIGEN_DONT_INLINE void run(const Index /*segsize*/, BlockScalarVector& dense, ScalarVector& /*tempv*/, ScalarVector& lusup, Index& luptr,\n                                    const Index lda, const Index nrow, IndexVector& lsub, const Index lptr, const Index no_zeros);\n};\n\n\ntemplate <typename BlockScalarVector, typename ScalarVector, typename IndexVector>\nEIGEN_DONT_INLINE void LU_kernel_bmod<1>::run(const Index /*segsize*/, BlockScalarVector& dense, ScalarVector& /*tempv*/, ScalarVector& lusup, Index& luptr,\n                                              const Index lda, const Index nrow, IndexVector& lsub, const Index lptr, const Index no_zeros)\n{\n  typedef typename ScalarVector::Scalar Scalar;\n  typedef typename IndexVector::Scalar StorageIndex;\n  Scalar f = dense(lsub(lptr + no_zeros));\n  luptr += lda * no_zeros + no_zeros + 1;\n  const Scalar* a(lusup.data() + luptr);\n  const StorageIndex*  irow(lsub.data()+lptr + no_zeros + 1);\n  Index i = 0;\n  for (; i+1 < nrow; i+=2)\n  {\n    Index i0 = *(irow++);\n    Index i1 = *(irow++);\n    Scalar a0 = *(a++);\n    Scalar a1 = *(a++);\n    Scalar d0 = dense.coeff(i0);\n    Scalar d1 = dense.coeff(i1);\n    d0 -= f*a0;\n    d1 -= f*a1;\n    dense.coeffRef(i0) = d0;\n    dense.coeffRef(i1) = d1;\n  }\n  if(i<nrow)\n    dense.coeffRef(*(irow++)) -= f * *(a++);\n}\n\n} // end namespace internal\n\n} // end namespace Eigen\n#endif // SPARSELU_KERNEL_BMOD_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseLU/SparseLU_panel_bmod.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>\n// Copyright (C) 2012 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n/* \n \n * NOTE: This file is the modified version of [s,d,c,z]panel_bmod.c file in SuperLU \n \n * -- SuperLU routine (version 3.0) --\n * Univ. of California Berkeley, Xerox Palo Alto Research Center,\n * and Lawrence Berkeley National Lab.\n * October 15, 2003\n *\n * Copyright (c) 1994 by Xerox Corporation.  All rights reserved.\n *\n * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY\n * EXPRESSED OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.\n *\n * Permission is hereby granted to use or copy this program for any\n * purpose, provided the above notices are retained on all copies.\n * Permission to modify the code and to distribute modified code is\n * granted, provided the above notices are retained, and a notice that\n * the code was modified is included with the above copyright notice.\n */\n#ifndef SPARSELU_PANEL_BMOD_H\n#define SPARSELU_PANEL_BMOD_H\n\nnamespace Eigen {\nnamespace internal {\n\n/**\n * \\brief Performs numeric block updates (sup-panel) in topological order.\n * \n * Before entering this routine, the original nonzeros in the panel\n * were already copied into the spa[m,w]\n * \n * \\param m number of rows in the matrix\n * \\param w Panel size\n * \\param jcol Starting  column of the panel\n * \\param nseg Number of segments in the U part\n * \\param dense Store the full representation of the panel \n * \\param tempv working array \n * \\param segrep segment representative... first row in the segment\n * \\param repfnz First nonzero rows\n * \\param glu Global LU data. \n * \n * \n */\ntemplate <typename Scalar, typename StorageIndex>\nvoid SparseLUImpl<Scalar,StorageIndex>::panel_bmod(const Index m, const Index w, const Index jcol, \n                                            const Index nseg, ScalarVector& dense, ScalarVector& tempv,\n                                            IndexVector& segrep, IndexVector& repfnz, GlobalLU_t& glu)\n{\n  \n  Index ksub,jj,nextl_col; \n  Index fsupc, nsupc, nsupr, nrow; \n  Index krep, kfnz; \n  Index lptr; // points to the row subscripts of a supernode \n  Index luptr; // ...\n  Index segsize,no_zeros ; \n  // For each nonz supernode segment of U[*,j] in topological order\n  Index k = nseg - 1; \n  const Index PacketSize = internal::packet_traits<Scalar>::size;\n  \n  for (ksub = 0; ksub < nseg; ksub++)\n  { // For each updating supernode\n    /* krep = representative of current k-th supernode\n     * fsupc =  first supernodal column\n     * nsupc = number of columns in a supernode\n     * nsupr = number of rows in a supernode\n     */\n    krep = segrep(k); k--; \n    fsupc = glu.xsup(glu.supno(krep)); \n    nsupc = krep - fsupc + 1; \n    nsupr = glu.xlsub(fsupc+1) - glu.xlsub(fsupc); \n    nrow = nsupr - nsupc; \n    lptr = glu.xlsub(fsupc); \n    \n    // loop over the panel columns to detect the actual number of columns and rows\n    Index u_rows = 0;\n    Index u_cols = 0;\n    for (jj = jcol; jj < jcol + w; jj++)\n    {\n      nextl_col = (jj-jcol) * m; \n      VectorBlock<IndexVector> repfnz_col(repfnz, nextl_col, m); // First nonzero column index for each row\n      \n      kfnz = repfnz_col(krep); \n      if ( kfnz == emptyIdxLU ) \n        continue; // skip any zero segment\n      \n      segsize = krep - kfnz + 1;\n      u_cols++;\n      u_rows = (std::max)(segsize,u_rows);\n    }\n    \n    if(nsupc >= 2)\n    { \n      Index ldu = internal::first_multiple<Index>(u_rows, PacketSize);\n      Map<ScalarMatrix, Aligned,  OuterStride<> > U(tempv.data(), u_rows, u_cols, OuterStride<>(ldu));\n      \n      // gather U\n      Index u_col = 0;\n      for (jj = jcol; jj < jcol + w; jj++)\n      {\n        nextl_col = (jj-jcol) * m; \n        VectorBlock<IndexVector> repfnz_col(repfnz, nextl_col, m); // First nonzero column index for each row\n        VectorBlock<ScalarVector> dense_col(dense, nextl_col, m); // Scatter/gather entire matrix column from/to here\n        \n        kfnz = repfnz_col(krep); \n        if ( kfnz == emptyIdxLU ) \n          continue; // skip any zero segment\n        \n        segsize = krep - kfnz + 1;\n        luptr = glu.xlusup(fsupc);    \n        no_zeros = kfnz - fsupc; \n        \n        Index isub = lptr + no_zeros;\n        Index off = u_rows-segsize;\n        for (Index i = 0; i < off; i++) U(i,u_col) = 0;\n        for (Index i = 0; i < segsize; i++)\n        {\n          Index irow = glu.lsub(isub); \n          U(i+off,u_col) = dense_col(irow); \n          ++isub; \n        }\n        u_col++;\n      }\n      // solve U = A^-1 U\n      luptr = glu.xlusup(fsupc);\n      Index lda = glu.xlusup(fsupc+1) - glu.xlusup(fsupc);\n      no_zeros = (krep - u_rows + 1) - fsupc;\n      luptr += lda * no_zeros + no_zeros;\n      MappedMatrixBlock A(glu.lusup.data()+luptr, u_rows, u_rows, OuterStride<>(lda) );\n      U = A.template triangularView<UnitLower>().solve(U);\n      \n      // update\n      luptr += u_rows;\n      MappedMatrixBlock B(glu.lusup.data()+luptr, nrow, u_rows, OuterStride<>(lda) );\n      eigen_assert(tempv.size()>w*ldu + nrow*w + 1);\n      \n      Index ldl = internal::first_multiple<Index>(nrow, PacketSize);\n      Index offset = (PacketSize-internal::first_default_aligned(B.data(), PacketSize)) % PacketSize;\n      MappedMatrixBlock L(tempv.data()+w*ldu+offset, nrow, u_cols, OuterStride<>(ldl));\n      \n      L.setZero();\n      internal::sparselu_gemm<Scalar>(L.rows(), L.cols(), B.cols(), B.data(), B.outerStride(), U.data(), U.outerStride(), L.data(), L.outerStride());\n      \n      // scatter U and L\n      u_col = 0;\n      for (jj = jcol; jj < jcol + w; jj++)\n      {\n        nextl_col = (jj-jcol) * m; \n        VectorBlock<IndexVector> repfnz_col(repfnz, nextl_col, m); // First nonzero column index for each row\n        VectorBlock<ScalarVector> dense_col(dense, nextl_col, m); // Scatter/gather entire matrix column from/to here\n        \n        kfnz = repfnz_col(krep); \n        if ( kfnz == emptyIdxLU ) \n          continue; // skip any zero segment\n        \n        segsize = krep - kfnz + 1;\n        no_zeros = kfnz - fsupc; \n        Index isub = lptr + no_zeros;\n        \n        Index off = u_rows-segsize;\n        for (Index i = 0; i < segsize; i++)\n        {\n          Index irow = glu.lsub(isub++); \n          dense_col(irow) = U.coeff(i+off,u_col);\n          U.coeffRef(i+off,u_col) = 0;\n        }\n        \n        // Scatter l into SPA dense[]\n        for (Index i = 0; i < nrow; i++)\n        {\n          Index irow = glu.lsub(isub++); \n          dense_col(irow) -= L.coeff(i,u_col);\n          L.coeffRef(i,u_col) = 0;\n        }\n        u_col++;\n      }\n    }\n    else // level 2 only\n    {\n      // Sequence through each column in the panel\n      for (jj = jcol; jj < jcol + w; jj++)\n      {\n        nextl_col = (jj-jcol) * m; \n        VectorBlock<IndexVector> repfnz_col(repfnz, nextl_col, m); // First nonzero column index for each row\n        VectorBlock<ScalarVector> dense_col(dense, nextl_col, m); // Scatter/gather entire matrix column from/to here\n        \n        kfnz = repfnz_col(krep); \n        if ( kfnz == emptyIdxLU ) \n          continue; // skip any zero segment\n        \n        segsize = krep - kfnz + 1;\n        luptr = glu.xlusup(fsupc);\n        \n        Index lda = glu.xlusup(fsupc+1)-glu.xlusup(fsupc);// nsupr\n        \n        // Perform a trianglar solve and block update, \n        // then scatter the result of sup-col update to dense[]\n        no_zeros = kfnz - fsupc; \n              if(segsize==1)  LU_kernel_bmod<1>::run(segsize, dense_col, tempv, glu.lusup, luptr, lda, nrow, glu.lsub, lptr, no_zeros);\n        else  if(segsize==2)  LU_kernel_bmod<2>::run(segsize, dense_col, tempv, glu.lusup, luptr, lda, nrow, glu.lsub, lptr, no_zeros);\n        else  if(segsize==3)  LU_kernel_bmod<3>::run(segsize, dense_col, tempv, glu.lusup, luptr, lda, nrow, glu.lsub, lptr, no_zeros);\n        else                  LU_kernel_bmod<Dynamic>::run(segsize, dense_col, tempv, glu.lusup, luptr, lda, nrow, glu.lsub, lptr, no_zeros); \n      } // End for each column in the panel \n    }\n    \n  } // End for each updating supernode\n} // end panel bmod\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // SPARSELU_PANEL_BMOD_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseLU/SparseLU_panel_dfs.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n/* \n \n * NOTE: This file is the modified version of [s,d,c,z]panel_dfs.c file in SuperLU \n \n * -- SuperLU routine (version 2.0) --\n * Univ. of California Berkeley, Xerox Palo Alto Research Center,\n * and Lawrence Berkeley National Lab.\n * November 15, 1997\n *\n * Copyright (c) 1994 by Xerox Corporation.  All rights reserved.\n *\n * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY\n * EXPRESSED OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.\n *\n * Permission is hereby granted to use or copy this program for any\n * purpose, provided the above notices are retained on all copies.\n * Permission to modify the code and to distribute modified code is\n * granted, provided the above notices are retained, and a notice that\n * the code was modified is included with the above copyright notice.\n */\n#ifndef SPARSELU_PANEL_DFS_H\n#define SPARSELU_PANEL_DFS_H\n\nnamespace Eigen {\n\nnamespace internal {\n  \ntemplate<typename IndexVector>\nstruct panel_dfs_traits\n{\n  typedef typename IndexVector::Scalar StorageIndex;\n  panel_dfs_traits(Index jcol, StorageIndex* marker)\n    : m_jcol(jcol), m_marker(marker)\n  {}\n  bool update_segrep(Index krep, StorageIndex jj)\n  {\n    if(m_marker[krep]<m_jcol)\n    {\n      m_marker[krep] = jj; \n      return true;\n    }\n    return false;\n  }\n  void mem_expand(IndexVector& /*glu.lsub*/, Index /*nextl*/, Index /*chmark*/) {}\n  enum { ExpandMem = false };\n  Index m_jcol;\n  StorageIndex* m_marker;\n};\n\n\ntemplate <typename Scalar, typename StorageIndex>\ntemplate <typename Traits>\nvoid SparseLUImpl<Scalar,StorageIndex>::dfs_kernel(const StorageIndex jj, IndexVector& perm_r,\n                   Index& nseg, IndexVector& panel_lsub, IndexVector& segrep,\n                   Ref<IndexVector> repfnz_col, IndexVector& xprune, Ref<IndexVector> marker, IndexVector& parent,\n                   IndexVector& xplore, GlobalLU_t& glu,\n                   Index& nextl_col, Index krow, Traits& traits\n                  )\n{\n  \n  StorageIndex kmark = marker(krow);\n      \n  // For each unmarked krow of jj\n  marker(krow) = jj; \n  StorageIndex kperm = perm_r(krow); \n  if (kperm == emptyIdxLU ) {\n    // krow is in L : place it in structure of L(*, jj)\n    panel_lsub(nextl_col++) = StorageIndex(krow);  // krow is indexed into A\n    \n    traits.mem_expand(panel_lsub, nextl_col, kmark);\n  }\n  else \n  {\n    // krow is in U : if its supernode-representative krep\n    // has been explored, update repfnz(*)\n    // krep = supernode representative of the current row\n    StorageIndex krep = glu.xsup(glu.supno(kperm)+1) - 1; \n    // First nonzero element in the current column:\n    StorageIndex myfnz = repfnz_col(krep); \n    \n    if (myfnz != emptyIdxLU )\n    {\n      // Representative visited before\n      if (myfnz > kperm ) repfnz_col(krep) = kperm; \n      \n    }\n    else \n    {\n      // Otherwise, perform dfs starting at krep\n      StorageIndex oldrep = emptyIdxLU; \n      parent(krep) = oldrep; \n      repfnz_col(krep) = kperm; \n      StorageIndex xdfs =  glu.xlsub(krep); \n      Index maxdfs = xprune(krep); \n      \n      StorageIndex kpar;\n      do \n      {\n        // For each unmarked kchild of krep\n        while (xdfs < maxdfs) \n        {\n          StorageIndex kchild = glu.lsub(xdfs); \n          xdfs++; \n          StorageIndex chmark = marker(kchild); \n          \n          if (chmark != jj ) \n          {\n            marker(kchild) = jj; \n            StorageIndex chperm = perm_r(kchild); \n            \n            if (chperm == emptyIdxLU) \n            {\n              // case kchild is in L: place it in L(*, j)\n              panel_lsub(nextl_col++) = kchild;\n              traits.mem_expand(panel_lsub, nextl_col, chmark);\n            }\n            else\n            {\n              // case kchild is in U :\n              // chrep = its supernode-rep. If its rep has been explored, \n              // update its repfnz(*)\n              StorageIndex chrep = glu.xsup(glu.supno(chperm)+1) - 1; \n              myfnz = repfnz_col(chrep); \n              \n              if (myfnz != emptyIdxLU) \n              { // Visited before \n                if (myfnz > chperm) \n                  repfnz_col(chrep) = chperm; \n              }\n              else \n              { // Cont. dfs at snode-rep of kchild\n                xplore(krep) = xdfs; \n                oldrep = krep; \n                krep = chrep; // Go deeper down G(L)\n                parent(krep) = oldrep; \n                repfnz_col(krep) = chperm; \n                xdfs = glu.xlsub(krep); \n                maxdfs = xprune(krep); \n                \n              } // end if myfnz != -1\n            } // end if chperm == -1 \n                \n          } // end if chmark !=jj\n        } // end while xdfs < maxdfs\n        \n        // krow has no more unexplored nbrs :\n        //    Place snode-rep krep in postorder DFS, if this \n        //    segment is seen for the first time. (Note that \n        //    \"repfnz(krep)\" may change later.)\n        //    Baktrack dfs to its parent\n        if(traits.update_segrep(krep,jj))\n        //if (marker1(krep) < jcol )\n        {\n          segrep(nseg) = krep; \n          ++nseg; \n          //marker1(krep) = jj; \n        }\n        \n        kpar = parent(krep); // Pop recursion, mimic recursion \n        if (kpar == emptyIdxLU) \n          break; // dfs done \n        krep = kpar; \n        xdfs = xplore(krep); \n        maxdfs = xprune(krep); \n\n      } while (kpar != emptyIdxLU); // Do until empty stack \n      \n    } // end if (myfnz = -1)\n\n  } // end if (kperm == -1)   \n}\n\n/**\n * \\brief Performs a symbolic factorization on a panel of columns [jcol, jcol+w)\n * \n * A supernode representative is the last column of a supernode.\n * The nonzeros in U[*,j] are segments that end at supernodes representatives\n * \n * The routine returns a list of the supernodal representatives \n * in topological order of the dfs that generates them. This list is \n * a superset of the topological order of each individual column within \n * the panel.\n * The location of the first nonzero in each supernodal segment \n * (supernodal entry location) is also returned. Each column has \n * a separate list for this purpose. \n * \n * Two markers arrays are used for dfs :\n *    marker[i] == jj, if i was visited during dfs of current column jj;\n *    marker1[i] >= jcol, if i was visited by earlier columns in this panel; \n * \n * \\param[in] m number of rows in the matrix\n * \\param[in] w Panel size\n * \\param[in] jcol Starting  column of the panel\n * \\param[in] A Input matrix in column-major storage\n * \\param[in] perm_r Row permutation\n * \\param[out] nseg Number of U segments\n * \\param[out] dense Accumulate the column vectors of the panel\n * \\param[out] panel_lsub Subscripts of the row in the panel \n * \\param[out] segrep Segment representative i.e first nonzero row of each segment\n * \\param[out] repfnz First nonzero location in each row\n * \\param[out] xprune The pruned elimination tree\n * \\param[out] marker work vector\n * \\param  parent The elimination tree\n * \\param xplore work vector\n * \\param glu The global data structure\n * \n */\n\ntemplate <typename Scalar, typename StorageIndex>\nvoid SparseLUImpl<Scalar,StorageIndex>::panel_dfs(const Index m, const Index w, const Index jcol, MatrixType& A, IndexVector& perm_r, Index& nseg, ScalarVector& dense, IndexVector& panel_lsub, IndexVector& segrep, IndexVector& repfnz, IndexVector& xprune, IndexVector& marker, IndexVector& parent, IndexVector& xplore, GlobalLU_t& glu)\n{\n  Index nextl_col; // Next available position in panel_lsub[*,jj] \n  \n  // Initialize pointers \n  VectorBlock<IndexVector> marker1(marker, m, m); \n  nseg = 0; \n  \n  panel_dfs_traits<IndexVector> traits(jcol, marker1.data());\n  \n  // For each column in the panel \n  for (StorageIndex jj = StorageIndex(jcol); jj < jcol + w; jj++) \n  {\n    nextl_col = (jj - jcol) * m; \n    \n    VectorBlock<IndexVector> repfnz_col(repfnz, nextl_col, m); // First nonzero location in each row\n    VectorBlock<ScalarVector> dense_col(dense,nextl_col, m); // Accumulate a column vector here\n    \n    \n    // For each nnz in A[*, jj] do depth first search\n    for (typename MatrixType::InnerIterator it(A, jj); it; ++it)\n    {\n      Index krow = it.row(); \n      dense_col(krow) = it.value();\n      \n      StorageIndex kmark = marker(krow); \n      if (kmark == jj) \n        continue; // krow visited before, go to the next nonzero\n      \n      dfs_kernel(jj, perm_r, nseg, panel_lsub, segrep, repfnz_col, xprune, marker, parent,\n                   xplore, glu, nextl_col, krow, traits);\n    }// end for nonzeros in column jj\n    \n  } // end for column jj\n}\n\n} // end namespace internal\n} // end namespace Eigen\n\n#endif // SPARSELU_PANEL_DFS_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseLU/SparseLU_pivotL.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n/* \n \n * NOTE: This file is the modified version of xpivotL.c file in SuperLU \n \n * -- SuperLU routine (version 3.0) --\n * Univ. of California Berkeley, Xerox Palo Alto Research Center,\n * and Lawrence Berkeley National Lab.\n * October 15, 2003\n *\n * Copyright (c) 1994 by Xerox Corporation.  All rights reserved.\n *\n * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY\n * EXPRESSED OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.\n *\n * Permission is hereby granted to use or copy this program for any\n * purpose, provided the above notices are retained on all copies.\n * Permission to modify the code and to distribute modified code is\n * granted, provided the above notices are retained, and a notice that\n * the code was modified is included with the above copyright notice.\n */\n#ifndef SPARSELU_PIVOTL_H\n#define SPARSELU_PIVOTL_H\n\nnamespace Eigen {\nnamespace internal {\n  \n/**\n * \\brief Performs the numerical pivotin on the current column of L, and the CDIV operation.\n * \n * Pivot policy :\n * (1) Compute thresh = u * max_(i>=j) abs(A_ij);\n * (2) IF user specifies pivot row k and abs(A_kj) >= thresh THEN\n *           pivot row = k;\n *       ELSE IF abs(A_jj) >= thresh THEN\n *           pivot row = j;\n *       ELSE\n *           pivot row = m;\n * \n *   Note: If you absolutely want to use a given pivot order, then set u=0.0.\n * \n * \\param jcol The current column of L\n * \\param diagpivotthresh diagonal pivoting threshold\n * \\param[in,out] perm_r Row permutation (threshold pivoting)\n * \\param[in] iperm_c column permutation - used to finf diagonal of Pc*A*Pc'\n * \\param[out] pivrow  The pivot row\n * \\param glu Global LU data\n * \\return 0 if success, i > 0 if U(i,i) is exactly zero \n * \n */\ntemplate <typename Scalar, typename StorageIndex>\nIndex SparseLUImpl<Scalar,StorageIndex>::pivotL(const Index jcol, const RealScalar& diagpivotthresh, IndexVector& perm_r, IndexVector& iperm_c, Index& pivrow, GlobalLU_t& glu)\n{\n  \n  Index fsupc = (glu.xsup)((glu.supno)(jcol)); // First column in the supernode containing the column jcol\n  Index nsupc = jcol - fsupc; // Number of columns in the supernode portion, excluding jcol; nsupc >=0\n  Index lptr = glu.xlsub(fsupc); // pointer to the starting location of the row subscripts for this supernode portion\n  Index nsupr = glu.xlsub(fsupc+1) - lptr; // Number of rows in the supernode\n  Index lda = glu.xlusup(fsupc+1) - glu.xlusup(fsupc); // leading dimension\n  Scalar* lu_sup_ptr = &(glu.lusup.data()[glu.xlusup(fsupc)]); // Start of the current supernode\n  Scalar* lu_col_ptr = &(glu.lusup.data()[glu.xlusup(jcol)]); // Start of jcol in the supernode\n  StorageIndex* lsub_ptr = &(glu.lsub.data()[lptr]); // Start of row indices of the supernode\n  \n  // Determine the largest abs numerical value for partial pivoting \n  Index diagind = iperm_c(jcol); // diagonal index \n  RealScalar pivmax(-1.0);\n  Index pivptr = nsupc; \n  Index diag = emptyIdxLU; \n  RealScalar rtemp;\n  Index isub, icol, itemp, k; \n  for (isub = nsupc; isub < nsupr; ++isub) {\n    using std::abs;\n    rtemp = abs(lu_col_ptr[isub]);\n    if (rtemp > pivmax) {\n      pivmax = rtemp; \n      pivptr = isub;\n    } \n    if (lsub_ptr[isub] == diagind) diag = isub;\n  }\n  \n  // Test for singularity\n  if ( pivmax <= RealScalar(0.0) ) {\n    // if pivmax == -1, the column is structurally empty, otherwise it is only numerically zero\n    pivrow = pivmax < RealScalar(0.0) ? diagind : lsub_ptr[pivptr];\n    perm_r(pivrow) = StorageIndex(jcol);\n    return (jcol+1);\n  }\n  \n  RealScalar thresh = diagpivotthresh * pivmax; \n  \n  // Choose appropriate pivotal element \n  \n  {\n    // Test if the diagonal element can be used as a pivot (given the threshold value)\n    if (diag >= 0 ) \n    {\n      // Diagonal element exists\n      using std::abs;\n      rtemp = abs(lu_col_ptr[diag]);\n      if (rtemp != RealScalar(0.0) && rtemp >= thresh) pivptr = diag;\n    }\n    pivrow = lsub_ptr[pivptr];\n  }\n  \n  // Record pivot row\n  perm_r(pivrow) = StorageIndex(jcol);\n  // Interchange row subscripts\n  if (pivptr != nsupc )\n  {\n    std::swap( lsub_ptr[pivptr], lsub_ptr[nsupc] );\n    // Interchange numerical values as well, for the two rows in the whole snode\n    // such that L is indexed the same way as A\n    for (icol = 0; icol <= nsupc; icol++)\n    {\n      itemp = pivptr + icol * lda; \n      std::swap(lu_sup_ptr[itemp], lu_sup_ptr[nsupc + icol * lda]);\n    }\n  }\n  // cdiv operations\n  Scalar temp = Scalar(1.0) / lu_col_ptr[nsupc];\n  for (k = nsupc+1; k < nsupr; k++)\n    lu_col_ptr[k] *= temp; \n  return 0;\n}\n\n} // end namespace internal\n} // end namespace Eigen\n\n#endif // SPARSELU_PIVOTL_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseLU/SparseLU_pruneL.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n/* \n \n * NOTE: This file is the modified version of [s,d,c,z]pruneL.c file in SuperLU \n \n * -- SuperLU routine (version 2.0) --\n * Univ. of California Berkeley, Xerox Palo Alto Research Center,\n * and Lawrence Berkeley National Lab.\n * November 15, 1997\n *\n * Copyright (c) 1994 by Xerox Corporation.  All rights reserved.\n *\n * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY\n * EXPRESSED OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.\n *\n * Permission is hereby granted to use or copy this program for any\n * purpose, provided the above notices are retained on all copies.\n * Permission to modify the code and to distribute modified code is\n * granted, provided the above notices are retained, and a notice that\n * the code was modified is included with the above copyright notice.\n */\n#ifndef SPARSELU_PRUNEL_H\n#define SPARSELU_PRUNEL_H\n\nnamespace Eigen {\nnamespace internal {\n\n/**\n * \\brief Prunes the L-structure.\n *\n * It prunes the L-structure  of supernodes whose L-structure contains the current pivot row \"pivrow\"\n * \n * \n * \\param jcol The current column of L\n * \\param[in] perm_r Row permutation\n * \\param[out] pivrow  The pivot row\n * \\param nseg Number of segments\n * \\param segrep \n * \\param repfnz\n * \\param[out] xprune \n * \\param glu Global LU data\n * \n */\ntemplate <typename Scalar, typename StorageIndex>\nvoid SparseLUImpl<Scalar,StorageIndex>::pruneL(const Index jcol, const IndexVector& perm_r, const Index pivrow, const Index nseg,\n                                               const IndexVector& segrep, BlockIndexVector repfnz, IndexVector& xprune, GlobalLU_t& glu)\n{\n  // For each supernode-rep irep in U(*,j]\n  Index jsupno = glu.supno(jcol); \n  Index i,irep,irep1; \n  bool movnum, do_prune = false; \n  Index kmin = 0, kmax = 0, minloc, maxloc,krow; \n  for (i = 0; i < nseg; i++)\n  {\n    irep = segrep(i); \n    irep1 = irep + 1; \n    do_prune = false; \n    \n    // Don't prune with a zero U-segment \n    if (repfnz(irep) == emptyIdxLU) continue; \n    \n    // If a snode overlaps with the next panel, then the U-segment\n    // is fragmented into two parts -- irep and irep1. We should let \n    // pruning occur at the rep-column in irep1s snode. \n    if (glu.supno(irep) == glu.supno(irep1) ) continue; // don't prune \n    \n    // If it has not been pruned & it has a nonz in row L(pivrow,i)\n    if (glu.supno(irep) != jsupno )\n    {\n      if ( xprune (irep) >= glu.xlsub(irep1) )\n      {\n        kmin = glu.xlsub(irep);\n        kmax = glu.xlsub(irep1) - 1; \n        for (krow = kmin; krow <= kmax; krow++)\n        {\n          if (glu.lsub(krow) == pivrow) \n          {\n            do_prune = true; \n            break; \n          }\n        }\n      }\n      \n      if (do_prune) \n      {\n        // do a quicksort-type partition\n        // movnum=true means that the num values have to be exchanged\n        movnum = false; \n        if (irep == glu.xsup(glu.supno(irep)) ) // Snode of size 1 \n          movnum = true; \n        \n        while (kmin <= kmax)\n        {\n          if (perm_r(glu.lsub(kmax)) == emptyIdxLU)\n            kmax--; \n          else if ( perm_r(glu.lsub(kmin)) != emptyIdxLU)\n            kmin++;\n          else \n          {\n            // kmin below pivrow (not yet pivoted), and kmax\n            // above pivrow: interchange the two suscripts\n            std::swap(glu.lsub(kmin), glu.lsub(kmax)); \n            \n            // If the supernode has only one column, then we \n            // only keep one set of subscripts. For any subscript\n            // intercnahge performed, similar interchange must be \n            // done on the numerical values. \n            if (movnum) \n            {\n              minloc = glu.xlusup(irep) + ( kmin - glu.xlsub(irep) ); \n              maxloc = glu.xlusup(irep) + ( kmax - glu.xlsub(irep) ); \n              std::swap(glu.lusup(minloc), glu.lusup(maxloc)); \n            }\n            kmin++;\n            kmax--;\n          }\n        } // end while \n        \n        xprune(irep) = StorageIndex(kmin);  //Pruning \n      } // end if do_prune \n    } // end pruning \n  } // End for each U-segment\n}\n\n} // end namespace internal\n} // end namespace Eigen\n\n#endif // SPARSELU_PRUNEL_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseLU/SparseLU_relax_snode.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n/* This file is a modified version of heap_relax_snode.c file in SuperLU\n * -- SuperLU routine (version 3.0) --\n * Univ. of California Berkeley, Xerox Palo Alto Research Center,\n * and Lawrence Berkeley National Lab.\n * October 15, 2003\n *\n * Copyright (c) 1994 by Xerox Corporation.  All rights reserved.\n *\n * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY\n * EXPRESSED OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.\n *\n * Permission is hereby granted to use or copy this program for any\n * purpose, provided the above notices are retained on all copies.\n * Permission to modify the code and to distribute modified code is\n * granted, provided the above notices are retained, and a notice that\n * the code was modified is included with the above copyright notice.\n */\n\n#ifndef SPARSELU_RELAX_SNODE_H\n#define SPARSELU_RELAX_SNODE_H\n\nnamespace Eigen {\n\nnamespace internal {\n \n/** \n * \\brief Identify the initial relaxed supernodes\n * \n * This routine is applied to a column elimination tree. \n * It assumes that the matrix has been reordered according to the postorder of the etree\n * \\param n  the number of columns\n * \\param et elimination tree \n * \\param relax_columns Maximum number of columns allowed in a relaxed snode \n * \\param descendants Number of descendants of each node in the etree\n * \\param relax_end last column in a supernode\n */\ntemplate <typename Scalar, typename StorageIndex>\nvoid SparseLUImpl<Scalar,StorageIndex>::relax_snode (const Index n, IndexVector& et, const Index relax_columns, IndexVector& descendants, IndexVector& relax_end)\n{\n  \n  // compute the number of descendants of each node in the etree\n  Index parent; \n  relax_end.setConstant(emptyIdxLU);\n  descendants.setZero();\n  for (Index j = 0; j < n; j++) \n  {\n    parent = et(j);\n    if (parent != n) // not the dummy root\n      descendants(parent) += descendants(j) + 1;\n  }\n  // Identify the relaxed supernodes by postorder traversal of the etree\n  Index snode_start; // beginning of a snode \n  for (Index j = 0; j < n; )\n  {\n    parent = et(j);\n    snode_start = j; \n    while ( parent != n && descendants(parent) < relax_columns ) \n    {\n      j = parent; \n      parent = et(j);\n    }\n    // Found a supernode in postordered etree, j is the last column \n    relax_end(snode_start) = StorageIndex(j); // Record last column\n    j++;\n    // Search for a new leaf\n    while (descendants(j) != 0 && j < n) j++;\n  } // End postorder traversal of the etree\n  \n}\n\n} // end namespace internal\n\n} // end namespace Eigen\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SparseQR/SparseQR.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012-2013 Desire Nuentsa <desire.nuentsa_wakam@inria.fr>\n// Copyright (C) 2012-2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPARSE_QR_H\n#define EIGEN_SPARSE_QR_H\n\nnamespace Eigen {\n\ntemplate<typename MatrixType, typename OrderingType> class SparseQR;\ntemplate<typename SparseQRType> struct SparseQRMatrixQReturnType;\ntemplate<typename SparseQRType> struct SparseQRMatrixQTransposeReturnType;\ntemplate<typename SparseQRType, typename Derived> struct SparseQR_QProduct;\nnamespace internal {\n  template <typename SparseQRType> struct traits<SparseQRMatrixQReturnType<SparseQRType> >\n  {\n    typedef typename SparseQRType::MatrixType ReturnType;\n    typedef typename ReturnType::StorageIndex StorageIndex;\n    typedef typename ReturnType::StorageKind StorageKind;\n    enum {\n      RowsAtCompileTime = Dynamic,\n      ColsAtCompileTime = Dynamic\n    };\n  };\n  template <typename SparseQRType> struct traits<SparseQRMatrixQTransposeReturnType<SparseQRType> >\n  {\n    typedef typename SparseQRType::MatrixType ReturnType;\n  };\n  template <typename SparseQRType, typename Derived> struct traits<SparseQR_QProduct<SparseQRType, Derived> >\n  {\n    typedef typename Derived::PlainObject ReturnType;\n  };\n} // End namespace internal\n\n/**\n  * \\ingroup SparseQR_Module\n  * \\class SparseQR\n  * \\brief Sparse left-looking QR factorization with numerical column pivoting\n  * \n  * This class implements a left-looking QR decomposition of sparse matrices\n  * with numerical column pivoting.\n  * When a column has a norm less than a given tolerance\n  * it is implicitly permuted to the end. The QR factorization thus obtained is \n  * given by A*P = Q*R where R is upper triangular or trapezoidal. \n  * \n  * P is the column permutation which is the product of the fill-reducing and the\n  * numerical permutations. Use colsPermutation() to get it.\n  * \n  * Q is the orthogonal matrix represented as products of Householder reflectors. \n  * Use matrixQ() to get an expression and matrixQ().adjoint() to get the adjoint.\n  * You can then apply it to a vector.\n  * \n  * R is the sparse triangular or trapezoidal matrix. The later occurs when A is rank-deficient.\n  * matrixR().topLeftCorner(rank(), rank()) always returns a triangular factor of full rank.\n  * \n  * \\tparam _MatrixType The type of the sparse matrix A, must be a column-major SparseMatrix<>\n  * \\tparam _OrderingType The fill-reducing ordering method. See the \\link OrderingMethods_Module \n  *  OrderingMethods \\endlink module for the list of built-in and external ordering methods.\n  * \n  * \\implsparsesolverconcept\n  *\n  * The numerical pivoting strategy and default threshold are the same as in SuiteSparse QR, and\n  * detailed in the following paper:\n  * <i>\n  * Tim Davis, \"Algorithm 915, SuiteSparseQR: Multifrontal Multithreaded Rank-Revealing\n  * Sparse QR Factorization, ACM Trans. on Math. Soft. 38(1), 2011.\n  * </i>\n  * Even though it is qualified as \"rank-revealing\", this strategy might fail for some \n  * rank deficient problems. When this class is used to solve linear or least-square problems\n  * it is thus strongly recommended to check the accuracy of the computed solution. If it\n  * failed, it usually helps to increase the threshold with setPivotThreshold.\n  * \n  * \\warning The input sparse matrix A must be in compressed mode (see SparseMatrix::makeCompressed()).\n  * \\warning For complex matrices matrixQ().transpose() will actually return the adjoint matrix.\n  * \n  */\ntemplate<typename _MatrixType, typename _OrderingType>\nclass SparseQR : public SparseSolverBase<SparseQR<_MatrixType,_OrderingType> >\n{\n  protected:\n    typedef SparseSolverBase<SparseQR<_MatrixType,_OrderingType> > Base;\n    using Base::m_isInitialized;\n  public:\n    using Base::_solve_impl;\n    typedef _MatrixType MatrixType;\n    typedef _OrderingType OrderingType;\n    typedef typename MatrixType::Scalar Scalar;\n    typedef typename MatrixType::RealScalar RealScalar;\n    typedef typename MatrixType::StorageIndex StorageIndex;\n    typedef SparseMatrix<Scalar,ColMajor,StorageIndex> QRMatrixType;\n    typedef Matrix<StorageIndex, Dynamic, 1> IndexVector;\n    typedef Matrix<Scalar, Dynamic, 1> ScalarVector;\n    typedef PermutationMatrix<Dynamic, Dynamic, StorageIndex> PermutationType;\n\n    enum {\n      ColsAtCompileTime = MatrixType::ColsAtCompileTime,\n      MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime\n    };\n    \n  public:\n    SparseQR () :  m_analysisIsok(false), m_lastError(\"\"), m_useDefaultThreshold(true),m_isQSorted(false),m_isEtreeOk(false)\n    { }\n    \n    /** Construct a QR factorization of the matrix \\a mat.\n      * \n      * \\warning The matrix \\a mat must be in compressed mode (see SparseMatrix::makeCompressed()).\n      * \n      * \\sa compute()\n      */\n    explicit SparseQR(const MatrixType& mat) : m_analysisIsok(false), m_lastError(\"\"), m_useDefaultThreshold(true),m_isQSorted(false),m_isEtreeOk(false)\n    {\n      compute(mat);\n    }\n    \n    /** Computes the QR factorization of the sparse matrix \\a mat.\n      * \n      * \\warning The matrix \\a mat must be in compressed mode (see SparseMatrix::makeCompressed()).\n      * \n      * \\sa analyzePattern(), factorize()\n      */\n    void compute(const MatrixType& mat)\n    {\n      analyzePattern(mat);\n      factorize(mat);\n    }\n    void analyzePattern(const MatrixType& mat);\n    void factorize(const MatrixType& mat);\n    \n    /** \\returns the number of rows of the represented matrix. \n      */\n    inline Index rows() const { return m_pmat.rows(); }\n    \n    /** \\returns the number of columns of the represented matrix. \n      */\n    inline Index cols() const { return m_pmat.cols();}\n    \n    /** \\returns a const reference to the \\b sparse upper triangular matrix R of the QR factorization.\n      * \\warning The entries of the returned matrix are not sorted. This means that using it in algorithms\n      *          expecting sorted entries will fail. This include random coefficient accesses (SpaseMatrix::coeff()),\n      *          and coefficient-wise operations. Matrix products and triangular solves are fine though.\n      *\n      * To sort the entries, you can assign it to a row-major matrix, and if a column-major matrix\n      * is required, you can copy it again:\n      * \\code\n      * SparseMatrix<double>          R  = qr.matrixR();  // column-major, not sorted!\n      * SparseMatrix<double,RowMajor> Rr = qr.matrixR();  // row-major, sorted\n      * SparseMatrix<double>          Rc = Rr;            // column-major, sorted\n      * \\endcode\n      */\n    const QRMatrixType& matrixR() const { return m_R; }\n    \n    /** \\returns the number of non linearly dependent columns as determined by the pivoting threshold.\n      *\n      * \\sa setPivotThreshold()\n      */\n    Index rank() const\n    {\n      eigen_assert(m_isInitialized && \"The factorization should be called first, use compute()\");\n      return m_nonzeropivots; \n    }\n    \n    /** \\returns an expression of the matrix Q as products of sparse Householder reflectors.\n    * The common usage of this function is to apply it to a dense matrix or vector\n    * \\code\n    * VectorXd B1, B2;\n    * // Initialize B1\n    * B2 = matrixQ() * B1;\n    * \\endcode\n    *\n    * To get a plain SparseMatrix representation of Q:\n    * \\code\n    * SparseMatrix<double> Q;\n    * Q = SparseQR<SparseMatrix<double> >(A).matrixQ();\n    * \\endcode\n    * Internally, this call simply performs a sparse product between the matrix Q\n    * and a sparse identity matrix. However, due to the fact that the sparse\n    * reflectors are stored unsorted, two transpositions are needed to sort\n    * them before performing the product.\n    */\n    SparseQRMatrixQReturnType<SparseQR> matrixQ() const \n    { return SparseQRMatrixQReturnType<SparseQR>(*this); }\n    \n    /** \\returns a const reference to the column permutation P that was applied to A such that A*P = Q*R\n      * It is the combination of the fill-in reducing permutation and numerical column pivoting.\n      */\n    const PermutationType& colsPermutation() const\n    { \n      eigen_assert(m_isInitialized && \"Decomposition is not initialized.\");\n      return m_outputPerm_c;\n    }\n    \n    /** \\returns A string describing the type of error.\n      * This method is provided to ease debugging, not to handle errors.\n      */\n    std::string lastErrorMessage() const { return m_lastError; }\n    \n    /** \\internal */\n    template<typename Rhs, typename Dest>\n    bool _solve_impl(const MatrixBase<Rhs> &B, MatrixBase<Dest> &dest) const\n    {\n      eigen_assert(m_isInitialized && \"The factorization should be called first, use compute()\");\n      eigen_assert(this->rows() == B.rows() && \"SparseQR::solve() : invalid number of rows in the right hand side matrix\");\n\n      Index rank = this->rank();\n      \n      // Compute Q^* * b;\n      typename Dest::PlainObject y, b;\n      y = this->matrixQ().adjoint() * B;\n      b = y;\n      \n      // Solve with the triangular matrix R\n      y.resize((std::max<Index>)(cols(),y.rows()),y.cols());\n      y.topRows(rank) = this->matrixR().topLeftCorner(rank, rank).template triangularView<Upper>().solve(b.topRows(rank));\n      y.bottomRows(y.rows()-rank).setZero();\n      \n      // Apply the column permutation\n      if (m_perm_c.size())  dest = colsPermutation() * y.topRows(cols());\n      else                  dest = y.topRows(cols());\n      \n      m_info = Success;\n      return true;\n    }\n\n    /** Sets the threshold that is used to determine linearly dependent columns during the factorization.\n      *\n      * In practice, if during the factorization the norm of the column that has to be eliminated is below\n      * this threshold, then the entire column is treated as zero, and it is moved at the end.\n      */\n    void setPivotThreshold(const RealScalar& threshold)\n    {\n      m_useDefaultThreshold = false;\n      m_threshold = threshold;\n    }\n    \n    /** \\returns the solution X of \\f$ A X = B \\f$ using the current decomposition of A.\n      *\n      * \\sa compute()\n      */\n    template<typename Rhs>\n    inline const Solve<SparseQR, Rhs> solve(const MatrixBase<Rhs>& B) const \n    {\n      eigen_assert(m_isInitialized && \"The factorization should be called first, use compute()\");\n      eigen_assert(this->rows() == B.rows() && \"SparseQR::solve() : invalid number of rows in the right hand side matrix\");\n      return Solve<SparseQR, Rhs>(*this, B.derived());\n    }\n    template<typename Rhs>\n    inline const Solve<SparseQR, Rhs> solve(const SparseMatrixBase<Rhs>& B) const\n    {\n          eigen_assert(m_isInitialized && \"The factorization should be called first, use compute()\");\n          eigen_assert(this->rows() == B.rows() && \"SparseQR::solve() : invalid number of rows in the right hand side matrix\");\n          return Solve<SparseQR, Rhs>(*this, B.derived());\n    }\n    \n    /** \\brief Reports whether previous computation was successful.\n      *\n      * \\returns \\c Success if computation was successful,\n      *          \\c NumericalIssue if the QR factorization reports a numerical problem\n      *          \\c InvalidInput if the input matrix is invalid\n      *\n      * \\sa iparm()          \n      */\n    ComputationInfo info() const\n    {\n      eigen_assert(m_isInitialized && \"Decomposition is not initialized.\");\n      return m_info;\n    }\n\n\n    /** \\internal */\n    inline void _sort_matrix_Q()\n    {\n      if(this->m_isQSorted) return;\n      // The matrix Q is sorted during the transposition\n      SparseMatrix<Scalar, RowMajor, Index> mQrm(this->m_Q);\n      this->m_Q = mQrm;\n      this->m_isQSorted = true;\n    }\n\n    \n  protected:\n    bool m_analysisIsok;\n    bool m_factorizationIsok;\n    mutable ComputationInfo m_info;\n    std::string m_lastError;\n    QRMatrixType m_pmat;            // Temporary matrix\n    QRMatrixType m_R;               // The triangular factor matrix\n    QRMatrixType m_Q;               // The orthogonal reflectors\n    ScalarVector m_hcoeffs;         // The Householder coefficients\n    PermutationType m_perm_c;       // Fill-reducing  Column  permutation\n    PermutationType m_pivotperm;    // The permutation for rank revealing\n    PermutationType m_outputPerm_c; // The final column permutation\n    RealScalar m_threshold;         // Threshold to determine null Householder reflections\n    bool m_useDefaultThreshold;     // Use default threshold\n    Index m_nonzeropivots;          // Number of non zero pivots found\n    IndexVector m_etree;            // Column elimination tree\n    IndexVector m_firstRowElt;      // First element in each row\n    bool m_isQSorted;               // whether Q is sorted or not\n    bool m_isEtreeOk;               // whether the elimination tree match the initial input matrix\n    \n    template <typename, typename > friend struct SparseQR_QProduct;\n    \n};\n\n/** \\brief Preprocessing step of a QR factorization \n  * \n  * \\warning The matrix \\a mat must be in compressed mode (see SparseMatrix::makeCompressed()).\n  * \n  * In this step, the fill-reducing permutation is computed and applied to the columns of A\n  * and the column elimination tree is computed as well. Only the sparsity pattern of \\a mat is exploited.\n  * \n  * \\note In this step it is assumed that there is no empty row in the matrix \\a mat.\n  */\ntemplate <typename MatrixType, typename OrderingType>\nvoid SparseQR<MatrixType,OrderingType>::analyzePattern(const MatrixType& mat)\n{\n  eigen_assert(mat.isCompressed() && \"SparseQR requires a sparse matrix in compressed mode. Call .makeCompressed() before passing it to SparseQR\");\n  // Copy to a column major matrix if the input is rowmajor\n  typename internal::conditional<MatrixType::IsRowMajor,QRMatrixType,const MatrixType&>::type matCpy(mat);\n  // Compute the column fill reducing ordering\n  OrderingType ord; \n  ord(matCpy, m_perm_c); \n  Index n = mat.cols();\n  Index m = mat.rows();\n  Index diagSize = (std::min)(m,n);\n  \n  if (!m_perm_c.size())\n  {\n    m_perm_c.resize(n);\n    m_perm_c.indices().setLinSpaced(n, 0,StorageIndex(n-1));\n  }\n  \n  // Compute the column elimination tree of the permuted matrix\n  m_outputPerm_c = m_perm_c.inverse();\n  internal::coletree(matCpy, m_etree, m_firstRowElt, m_outputPerm_c.indices().data());\n  m_isEtreeOk = true;\n  \n  m_R.resize(m, n);\n  m_Q.resize(m, diagSize);\n  \n  // Allocate space for nonzero elements: rough estimation\n  m_R.reserve(2*mat.nonZeros()); //FIXME Get a more accurate estimation through symbolic factorization with the etree\n  m_Q.reserve(2*mat.nonZeros());\n  m_hcoeffs.resize(diagSize);\n  m_analysisIsok = true;\n}\n\n/** \\brief Performs the numerical QR factorization of the input matrix\n  * \n  * The function SparseQR::analyzePattern(const MatrixType&) must have been called beforehand with\n  * a matrix having the same sparsity pattern than \\a mat.\n  * \n  * \\param mat The sparse column-major matrix\n  */\ntemplate <typename MatrixType, typename OrderingType>\nvoid SparseQR<MatrixType,OrderingType>::factorize(const MatrixType& mat)\n{\n  using std::abs;\n  \n  eigen_assert(m_analysisIsok && \"analyzePattern() should be called before this step\");\n  StorageIndex m = StorageIndex(mat.rows());\n  StorageIndex n = StorageIndex(mat.cols());\n  StorageIndex diagSize = (std::min)(m,n);\n  IndexVector mark((std::max)(m,n)); mark.setConstant(-1);  // Record the visited nodes\n  IndexVector Ridx(n), Qidx(m);                             // Store temporarily the row indexes for the current column of R and Q\n  Index nzcolR, nzcolQ;                                     // Number of nonzero for the current column of R and Q\n  ScalarVector tval(m);                                     // The dense vector used to compute the current column\n  RealScalar pivotThreshold = m_threshold;\n  \n  m_R.setZero();\n  m_Q.setZero();\n  m_pmat = mat;\n  if(!m_isEtreeOk)\n  {\n    m_outputPerm_c = m_perm_c.inverse();\n    internal::coletree(m_pmat, m_etree, m_firstRowElt, m_outputPerm_c.indices().data());\n    m_isEtreeOk = true;\n  }\n\n  m_pmat.uncompress(); // To have the innerNonZeroPtr allocated\n  \n  // Apply the fill-in reducing permutation lazily:\n  {\n    // If the input is row major, copy the original column indices,\n    // otherwise directly use the input matrix\n    // \n    IndexVector originalOuterIndicesCpy;\n    const StorageIndex *originalOuterIndices = mat.outerIndexPtr();\n    if(MatrixType::IsRowMajor)\n    {\n      originalOuterIndicesCpy = IndexVector::Map(m_pmat.outerIndexPtr(),n+1);\n      originalOuterIndices = originalOuterIndicesCpy.data();\n    }\n    \n    for (int i = 0; i < n; i++)\n    {\n      Index p = m_perm_c.size() ? m_perm_c.indices()(i) : i;\n      m_pmat.outerIndexPtr()[p] = originalOuterIndices[i]; \n      m_pmat.innerNonZeroPtr()[p] = originalOuterIndices[i+1] - originalOuterIndices[i]; \n    }\n  }\n  \n  /* Compute the default threshold as in MatLab, see:\n   * Tim Davis, \"Algorithm 915, SuiteSparseQR: Multifrontal Multithreaded Rank-Revealing\n   * Sparse QR Factorization, ACM Trans. on Math. Soft. 38(1), 2011, Page 8:3 \n   */\n  if(m_useDefaultThreshold) \n  {\n    RealScalar max2Norm = 0.0;\n    for (int j = 0; j < n; j++) max2Norm = numext::maxi(max2Norm, m_pmat.col(j).norm());\n    if(max2Norm==RealScalar(0))\n      max2Norm = RealScalar(1);\n    pivotThreshold = 20 * (m + n) * max2Norm * NumTraits<RealScalar>::epsilon();\n  }\n  \n  // Initialize the numerical permutation\n  m_pivotperm.setIdentity(n);\n  \n  StorageIndex nonzeroCol = 0; // Record the number of valid pivots\n  m_Q.startVec(0);\n\n  // Left looking rank-revealing QR factorization: compute a column of R and Q at a time\n  for (StorageIndex col = 0; col < n; ++col)\n  {\n    mark.setConstant(-1);\n    m_R.startVec(col);\n    mark(nonzeroCol) = col;\n    Qidx(0) = nonzeroCol;\n    nzcolR = 0; nzcolQ = 1;\n    bool found_diag = nonzeroCol>=m;\n    tval.setZero(); \n    \n    // Symbolic factorization: find the nonzero locations of the column k of the factors R and Q, i.e.,\n    // all the nodes (with indexes lower than rank) reachable through the column elimination tree (etree) rooted at node k.\n    // Note: if the diagonal entry does not exist, then its contribution must be explicitly added,\n    // thus the trick with found_diag that permits to do one more iteration on the diagonal element if this one has not been found.\n    for (typename QRMatrixType::InnerIterator itp(m_pmat, col); itp || !found_diag; ++itp)\n    {\n      StorageIndex curIdx = nonzeroCol;\n      if(itp) curIdx = StorageIndex(itp.row());\n      if(curIdx == nonzeroCol) found_diag = true;\n      \n      // Get the nonzeros indexes of the current column of R\n      StorageIndex st = m_firstRowElt(curIdx); // The traversal of the etree starts here\n      if (st < 0 )\n      {\n        m_lastError = \"Empty row found during numerical factorization\";\n        m_info = InvalidInput;\n        return;\n      }\n\n      // Traverse the etree \n      Index bi = nzcolR;\n      for (; mark(st) != col; st = m_etree(st))\n      {\n        Ridx(nzcolR) = st;  // Add this row to the list,\n        mark(st) = col;     // and mark this row as visited\n        nzcolR++;\n      }\n\n      // Reverse the list to get the topological ordering\n      Index nt = nzcolR-bi;\n      for(Index i = 0; i < nt/2; i++) std::swap(Ridx(bi+i), Ridx(nzcolR-i-1));\n       \n      // Copy the current (curIdx,pcol) value of the input matrix\n      if(itp) tval(curIdx) = itp.value();\n      else    tval(curIdx) = Scalar(0);\n      \n      // Compute the pattern of Q(:,k)\n      if(curIdx > nonzeroCol && mark(curIdx) != col ) \n      {\n        Qidx(nzcolQ) = curIdx;  // Add this row to the pattern of Q,\n        mark(curIdx) = col;     // and mark it as visited\n        nzcolQ++;\n      }\n    }\n\n    // Browse all the indexes of R(:,col) in reverse order\n    for (Index i = nzcolR-1; i >= 0; i--)\n    {\n      Index curIdx = Ridx(i);\n      \n      // Apply the curIdx-th householder vector to the current column (temporarily stored into tval)\n      Scalar tdot(0);\n      \n      // First compute q' * tval\n      tdot = m_Q.col(curIdx).dot(tval);\n\n      tdot *= m_hcoeffs(curIdx);\n      \n      // Then update tval = tval - q * tau\n      // FIXME: tval -= tdot * m_Q.col(curIdx) should amount to the same (need to check/add support for efficient \"dense ?= sparse\")\n      for (typename QRMatrixType::InnerIterator itq(m_Q, curIdx); itq; ++itq)\n        tval(itq.row()) -= itq.value() * tdot;\n\n      // Detect fill-in for the current column of Q\n      if(m_etree(Ridx(i)) == nonzeroCol)\n      {\n        for (typename QRMatrixType::InnerIterator itq(m_Q, curIdx); itq; ++itq)\n        {\n          StorageIndex iQ = StorageIndex(itq.row());\n          if (mark(iQ) != col)\n          {\n            Qidx(nzcolQ++) = iQ;  // Add this row to the pattern of Q,\n            mark(iQ) = col;       // and mark it as visited\n          }\n        }\n      }\n    } // End update current column\n    \n    Scalar tau = RealScalar(0);\n    RealScalar beta = 0;\n    \n    if(nonzeroCol < diagSize)\n    {\n      // Compute the Householder reflection that eliminate the current column\n      // FIXME this step should call the Householder module.\n      Scalar c0 = nzcolQ ? tval(Qidx(0)) : Scalar(0);\n      \n      // First, the squared norm of Q((col+1):m, col)\n      RealScalar sqrNorm = 0.;\n      for (Index itq = 1; itq < nzcolQ; ++itq) sqrNorm += numext::abs2(tval(Qidx(itq)));\n      if(sqrNorm == RealScalar(0) && numext::imag(c0) == RealScalar(0))\n      {\n        beta = numext::real(c0);\n        tval(Qidx(0)) = 1;\n      }\n      else\n      {\n        using std::sqrt;\n        beta = sqrt(numext::abs2(c0) + sqrNorm);\n        if(numext::real(c0) >= RealScalar(0))\n          beta = -beta;\n        tval(Qidx(0)) = 1;\n        for (Index itq = 1; itq < nzcolQ; ++itq)\n          tval(Qidx(itq)) /= (c0 - beta);\n        tau = numext::conj((beta-c0) / beta);\n          \n      }\n    }\n\n    // Insert values in R\n    for (Index  i = nzcolR-1; i >= 0; i--)\n    {\n      Index curIdx = Ridx(i);\n      if(curIdx < nonzeroCol) \n      {\n        m_R.insertBackByOuterInnerUnordered(col, curIdx) = tval(curIdx);\n        tval(curIdx) = Scalar(0.);\n      }\n    }\n\n    if(nonzeroCol < diagSize && abs(beta) >= pivotThreshold)\n    {\n      m_R.insertBackByOuterInner(col, nonzeroCol) = beta;\n      // The householder coefficient\n      m_hcoeffs(nonzeroCol) = tau;\n      // Record the householder reflections\n      for (Index itq = 0; itq < nzcolQ; ++itq)\n      {\n        Index iQ = Qidx(itq);\n        m_Q.insertBackByOuterInnerUnordered(nonzeroCol,iQ) = tval(iQ);\n        tval(iQ) = Scalar(0.);\n      }\n      nonzeroCol++;\n      if(nonzeroCol<diagSize)\n        m_Q.startVec(nonzeroCol);\n    }\n    else\n    {\n      // Zero pivot found: move implicitly this column to the end\n      for (Index j = nonzeroCol; j < n-1; j++) \n        std::swap(m_pivotperm.indices()(j), m_pivotperm.indices()[j+1]);\n      \n      // Recompute the column elimination tree\n      internal::coletree(m_pmat, m_etree, m_firstRowElt, m_pivotperm.indices().data());\n      m_isEtreeOk = false;\n    }\n  }\n  \n  m_hcoeffs.tail(diagSize-nonzeroCol).setZero();\n  \n  // Finalize the column pointers of the sparse matrices R and Q\n  m_Q.finalize();\n  m_Q.makeCompressed();\n  m_R.finalize();\n  m_R.makeCompressed();\n  m_isQSorted = false;\n\n  m_nonzeropivots = nonzeroCol;\n  \n  if(nonzeroCol<n)\n  {\n    // Permute the triangular factor to put the 'dead' columns to the end\n    QRMatrixType tempR(m_R);\n    m_R = tempR * m_pivotperm;\n    \n    // Update the column permutation\n    m_outputPerm_c = m_outputPerm_c * m_pivotperm;\n  }\n  \n  m_isInitialized = true; \n  m_factorizationIsok = true;\n  m_info = Success;\n}\n\ntemplate <typename SparseQRType, typename Derived>\nstruct SparseQR_QProduct : ReturnByValue<SparseQR_QProduct<SparseQRType, Derived> >\n{\n  typedef typename SparseQRType::QRMatrixType MatrixType;\n  typedef typename SparseQRType::Scalar Scalar;\n  // Get the references \n  SparseQR_QProduct(const SparseQRType& qr, const Derived& other, bool transpose) : \n  m_qr(qr),m_other(other),m_transpose(transpose) {}\n  inline Index rows() const { return m_qr.matrixQ().rows(); }\n  inline Index cols() const { return m_other.cols(); }\n  \n  // Assign to a vector\n  template<typename DesType>\n  void evalTo(DesType& res) const\n  {\n    Index m = m_qr.rows();\n    Index n = m_qr.cols();\n    Index diagSize = (std::min)(m,n);\n    res = m_other;\n    if (m_transpose)\n    {\n      eigen_assert(m_qr.m_Q.rows() == m_other.rows() && \"Non conforming object sizes\");\n      //Compute res = Q' * other column by column\n      for(Index j = 0; j < res.cols(); j++){\n        for (Index k = 0; k < diagSize; k++)\n        {\n          Scalar tau = Scalar(0);\n          tau = m_qr.m_Q.col(k).dot(res.col(j));\n          if(tau==Scalar(0)) continue;\n          tau = tau * m_qr.m_hcoeffs(k);\n          res.col(j) -= tau * m_qr.m_Q.col(k);\n        }\n      }\n    }\n    else\n    {\n      eigen_assert(m_qr.matrixQ().cols() == m_other.rows() && \"Non conforming object sizes\");\n\n      res.conservativeResize(rows(), cols());\n\n      // Compute res = Q * other column by column\n      for(Index j = 0; j < res.cols(); j++)\n      {\n        Index start_k = internal::is_identity<Derived>::value ? numext::mini(j,diagSize-1) : diagSize-1;\n        for (Index k = start_k; k >=0; k--)\n        {\n          Scalar tau = Scalar(0);\n          tau = m_qr.m_Q.col(k).dot(res.col(j));\n          if(tau==Scalar(0)) continue;\n          tau = tau * numext::conj(m_qr.m_hcoeffs(k));\n          res.col(j) -= tau * m_qr.m_Q.col(k);\n        }\n      }\n    }\n  }\n  \n  const SparseQRType& m_qr;\n  const Derived& m_other;\n  bool m_transpose; // TODO this actually means adjoint\n};\n\ntemplate<typename SparseQRType>\nstruct SparseQRMatrixQReturnType : public EigenBase<SparseQRMatrixQReturnType<SparseQRType> >\n{  \n  typedef typename SparseQRType::Scalar Scalar;\n  typedef Matrix<Scalar,Dynamic,Dynamic> DenseMatrix;\n  enum {\n    RowsAtCompileTime = Dynamic,\n    ColsAtCompileTime = Dynamic\n  };\n  explicit SparseQRMatrixQReturnType(const SparseQRType& qr) : m_qr(qr) {}\n  template<typename Derived>\n  SparseQR_QProduct<SparseQRType, Derived> operator*(const MatrixBase<Derived>& other)\n  {\n    return SparseQR_QProduct<SparseQRType,Derived>(m_qr,other.derived(),false);\n  }\n  // To use for operations with the adjoint of Q\n  SparseQRMatrixQTransposeReturnType<SparseQRType> adjoint() const\n  {\n    return SparseQRMatrixQTransposeReturnType<SparseQRType>(m_qr);\n  }\n  inline Index rows() const { return m_qr.rows(); }\n  inline Index cols() const { return m_qr.rows(); }\n  // To use for operations with the transpose of Q FIXME this is the same as adjoint at the moment\n  SparseQRMatrixQTransposeReturnType<SparseQRType> transpose() const\n  {\n    return SparseQRMatrixQTransposeReturnType<SparseQRType>(m_qr);\n  }\n  const SparseQRType& m_qr;\n};\n\n// TODO this actually represents the adjoint of Q\ntemplate<typename SparseQRType>\nstruct SparseQRMatrixQTransposeReturnType\n{\n  explicit SparseQRMatrixQTransposeReturnType(const SparseQRType& qr) : m_qr(qr) {}\n  template<typename Derived>\n  SparseQR_QProduct<SparseQRType,Derived> operator*(const MatrixBase<Derived>& other)\n  {\n    return SparseQR_QProduct<SparseQRType,Derived>(m_qr,other.derived(), true);\n  }\n  const SparseQRType& m_qr;\n};\n\nnamespace internal {\n  \ntemplate<typename SparseQRType>\nstruct evaluator_traits<SparseQRMatrixQReturnType<SparseQRType> >\n{\n  typedef typename SparseQRType::MatrixType MatrixType;\n  typedef typename storage_kind_to_evaluator_kind<typename MatrixType::StorageKind>::Kind Kind;\n  typedef SparseShape Shape;\n};\n\ntemplate< typename DstXprType, typename SparseQRType>\nstruct Assignment<DstXprType, SparseQRMatrixQReturnType<SparseQRType>, internal::assign_op<typename DstXprType::Scalar,typename DstXprType::Scalar>, Sparse2Sparse>\n{\n  typedef SparseQRMatrixQReturnType<SparseQRType> SrcXprType;\n  typedef typename DstXprType::Scalar Scalar;\n  typedef typename DstXprType::StorageIndex StorageIndex;\n  static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op<Scalar,Scalar> &/*func*/)\n  {\n    typename DstXprType::PlainObject idMat(src.rows(), src.cols());\n    idMat.setIdentity();\n    // Sort the sparse householder reflectors if needed\n    const_cast<SparseQRType *>(&src.m_qr)->_sort_matrix_Q();\n    dst = SparseQR_QProduct<SparseQRType, DstXprType>(src.m_qr, idMat, false);\n  }\n};\n\ntemplate< typename DstXprType, typename SparseQRType>\nstruct Assignment<DstXprType, SparseQRMatrixQReturnType<SparseQRType>, internal::assign_op<typename DstXprType::Scalar,typename DstXprType::Scalar>, Sparse2Dense>\n{\n  typedef SparseQRMatrixQReturnType<SparseQRType> SrcXprType;\n  typedef typename DstXprType::Scalar Scalar;\n  typedef typename DstXprType::StorageIndex StorageIndex;\n  static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op<Scalar,Scalar> &/*func*/)\n  {\n    dst = src.m_qr.matrixQ() * DstXprType::Identity(src.m_qr.rows(), src.m_qr.rows());\n  }\n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/StlSupport/StdDeque.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2009 Hauke Heibel <hauke.heibel@googlemail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_STDDEQUE_H\n#define EIGEN_STDDEQUE_H\n\n#include \"details.h\"\n\n/**\n * This section contains a convenience MACRO which allows an easy specialization of\n * std::deque such that for data types with alignment issues the correct allocator\n * is used automatically.\n */\n#define EIGEN_DEFINE_STL_DEQUE_SPECIALIZATION(...) \\\nnamespace std \\\n{ \\\n  template<> \\\n  class deque<__VA_ARGS__, std::allocator<__VA_ARGS__> >           \\\n    : public deque<__VA_ARGS__, EIGEN_ALIGNED_ALLOCATOR<__VA_ARGS__> > \\\n  { \\\n    typedef deque<__VA_ARGS__, EIGEN_ALIGNED_ALLOCATOR<__VA_ARGS__> > deque_base; \\\n  public: \\\n    typedef __VA_ARGS__ value_type; \\\n    typedef deque_base::allocator_type allocator_type; \\\n    typedef deque_base::size_type size_type;  \\\n    typedef deque_base::iterator iterator;  \\\n    explicit deque(const allocator_type& a = allocator_type()) : deque_base(a) {}  \\\n    template<typename InputIterator> \\\n    deque(InputIterator first, InputIterator last, const allocator_type& a = allocator_type()) : deque_base(first, last, a) {} \\\n    deque(const deque& c) : deque_base(c) {}  \\\n    explicit deque(size_type num, const value_type& val = value_type()) : deque_base(num, val) {} \\\n    deque(iterator start_, iterator end_) : deque_base(start_, end_) {}  \\\n    deque& operator=(const deque& x) {  \\\n      deque_base::operator=(x);  \\\n      return *this;  \\\n    } \\\n  }; \\\n}\n\n// check whether we really need the std::deque specialization\n#if !EIGEN_HAS_CXX11_CONTAINERS && !(defined(_GLIBCXX_DEQUE) && (!EIGEN_GNUC_AT_LEAST(4,1))) /* Note that before gcc-4.1 we already have: std::deque::resize(size_type,const T&). */\n\nnamespace std {\n\n#define EIGEN_STD_DEQUE_SPECIALIZATION_BODY \\\n  public:  \\\n    typedef T value_type; \\\n    typedef typename deque_base::allocator_type allocator_type; \\\n    typedef typename deque_base::size_type size_type;  \\\n    typedef typename deque_base::iterator iterator;  \\\n    typedef typename deque_base::const_iterator const_iterator;  \\\n    explicit deque(const allocator_type& a = allocator_type()) : deque_base(a) {}  \\\n    template<typename InputIterator> \\\n    deque(InputIterator first, InputIterator last, const allocator_type& a = allocator_type()) \\\n    : deque_base(first, last, a) {} \\\n    deque(const deque& c) : deque_base(c) {}  \\\n    explicit deque(size_type num, const value_type& val = value_type()) : deque_base(num, val) {} \\\n    deque(iterator start_, iterator end_) : deque_base(start_, end_) {}  \\\n    deque& operator=(const deque& x) {  \\\n      deque_base::operator=(x);  \\\n      return *this;  \\\n    }\n\n  template<typename T>\n  class deque<T,EIGEN_ALIGNED_ALLOCATOR<T> >\n    : public deque<EIGEN_WORKAROUND_MSVC_STL_SUPPORT(T),\n                   Eigen::aligned_allocator_indirection<EIGEN_WORKAROUND_MSVC_STL_SUPPORT(T)> >\n{\n  typedef deque<EIGEN_WORKAROUND_MSVC_STL_SUPPORT(T),\n                Eigen::aligned_allocator_indirection<EIGEN_WORKAROUND_MSVC_STL_SUPPORT(T)> > deque_base;\n  EIGEN_STD_DEQUE_SPECIALIZATION_BODY\n\n  void resize(size_type new_size)\n  { resize(new_size, T()); }\n\n#if defined(_DEQUE_)\n  // workaround MSVC std::deque implementation\n  void resize(size_type new_size, const value_type& x)\n  {\n    if (deque_base::size() < new_size)\n      deque_base::_Insert_n(deque_base::end(), new_size - deque_base::size(), x);\n    else if (new_size < deque_base::size())\n      deque_base::erase(deque_base::begin() + new_size, deque_base::end());\n  }\n  void push_back(const value_type& x)\n  { deque_base::push_back(x); } \n  void push_front(const value_type& x)\n  { deque_base::push_front(x); }\n  using deque_base::insert;  \n  iterator insert(const_iterator position, const value_type& x)\n  { return deque_base::insert(position,x); }\n  void insert(const_iterator position, size_type new_size, const value_type& x)\n  { deque_base::insert(position, new_size, x); }\n#elif defined(_GLIBCXX_DEQUE) && EIGEN_GNUC_AT_LEAST(4,2)\n  // workaround GCC std::deque implementation\n  void resize(size_type new_size, const value_type& x)\n  {\n    if (new_size < deque_base::size())\n      deque_base::_M_erase_at_end(this->_M_impl._M_start + new_size);\n    else\n      deque_base::insert(deque_base::end(), new_size - deque_base::size(), x);\n  }\n#else\n  // either GCC 4.1 or non-GCC\n  // default implementation which should always work.\n  void resize(size_type new_size, const value_type& x)\n  {\n    if (new_size < deque_base::size())\n      deque_base::erase(deque_base::begin() + new_size, deque_base::end());\n    else if (new_size > deque_base::size())\n      deque_base::insert(deque_base::end(), new_size - deque_base::size(), x);\n  }\n#endif\n  };\n}\n\n#endif // check whether specialization is actually required\n\n#endif // EIGEN_STDDEQUE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/StlSupport/StdList.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Hauke Heibel <hauke.heibel@googlemail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_STDLIST_H\n#define EIGEN_STDLIST_H\n\n#include \"details.h\"\n\n/**\n * This section contains a convenience MACRO which allows an easy specialization of\n * std::list such that for data types with alignment issues the correct allocator\n * is used automatically.\n */\n#define EIGEN_DEFINE_STL_LIST_SPECIALIZATION(...) \\\nnamespace std \\\n{ \\\n  template<> \\\n  class list<__VA_ARGS__, std::allocator<__VA_ARGS__> >           \\\n    : public list<__VA_ARGS__, EIGEN_ALIGNED_ALLOCATOR<__VA_ARGS__> > \\\n  { \\\n    typedef list<__VA_ARGS__, EIGEN_ALIGNED_ALLOCATOR<__VA_ARGS__> > list_base; \\\n  public: \\\n    typedef __VA_ARGS__ value_type; \\\n    typedef list_base::allocator_type allocator_type; \\\n    typedef list_base::size_type size_type;  \\\n    typedef list_base::iterator iterator;  \\\n    explicit list(const allocator_type& a = allocator_type()) : list_base(a) {}  \\\n    template<typename InputIterator> \\\n    list(InputIterator first, InputIterator last, const allocator_type& a = allocator_type()) : list_base(first, last, a) {} \\\n    list(const list& c) : list_base(c) {}  \\\n    explicit list(size_type num, const value_type& val = value_type()) : list_base(num, val) {} \\\n    list(iterator start_, iterator end_) : list_base(start_, end_) {}  \\\n    list& operator=(const list& x) {  \\\n      list_base::operator=(x);  \\\n      return *this;  \\\n    } \\\n  }; \\\n}\n\n// check whether we really need the std::list specialization\n#if !EIGEN_HAS_CXX11_CONTAINERS && !(defined(_GLIBCXX_LIST) && (!EIGEN_GNUC_AT_LEAST(4,1))) /* Note that before gcc-4.1 we already have: std::list::resize(size_type,const T&). */\n\nnamespace std\n{\n\n#define EIGEN_STD_LIST_SPECIALIZATION_BODY \\\n  public:  \\\n    typedef T value_type; \\\n    typedef typename list_base::allocator_type allocator_type; \\\n    typedef typename list_base::size_type size_type;  \\\n    typedef typename list_base::iterator iterator;  \\\n    typedef typename list_base::const_iterator const_iterator;  \\\n    explicit list(const allocator_type& a = allocator_type()) : list_base(a) {}  \\\n    template<typename InputIterator> \\\n    list(InputIterator first, InputIterator last, const allocator_type& a = allocator_type()) \\\n    : list_base(first, last, a) {} \\\n    list(const list& c) : list_base(c) {}  \\\n    explicit list(size_type num, const value_type& val = value_type()) : list_base(num, val) {} \\\n    list(iterator start_, iterator end_) : list_base(start_, end_) {}  \\\n    list& operator=(const list& x) {  \\\n    list_base::operator=(x);  \\\n    return *this; \\\n  }\n\n  template<typename T>\n  class list<T,EIGEN_ALIGNED_ALLOCATOR<T> >\n    : public list<EIGEN_WORKAROUND_MSVC_STL_SUPPORT(T),\n                  Eigen::aligned_allocator_indirection<EIGEN_WORKAROUND_MSVC_STL_SUPPORT(T)> >\n  {\n    typedef list<EIGEN_WORKAROUND_MSVC_STL_SUPPORT(T),\n                 Eigen::aligned_allocator_indirection<EIGEN_WORKAROUND_MSVC_STL_SUPPORT(T)> > list_base;\n    EIGEN_STD_LIST_SPECIALIZATION_BODY\n\n    void resize(size_type new_size)\n    { resize(new_size, T()); }\n\n    void resize(size_type new_size, const value_type& x)\n    {\n      if (list_base::size() < new_size)\n        list_base::insert(list_base::end(), new_size - list_base::size(), x);\n      else\n        while (new_size < list_base::size()) list_base::pop_back();\n    }\n\n#if defined(_LIST_)\n    // workaround MSVC std::list implementation\n    void push_back(const value_type& x)\n    { list_base::push_back(x); } \n    using list_base::insert;  \n    iterator insert(const_iterator position, const value_type& x)\n    { return list_base::insert(position,x); }\n    void insert(const_iterator position, size_type new_size, const value_type& x)\n    { list_base::insert(position, new_size, x); }\n#endif\n  };\n}\n\n#endif // check whether specialization is actually required\n\n#endif // EIGEN_STDLIST_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/StlSupport/StdVector.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2009 Hauke Heibel <hauke.heibel@googlemail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_STDVECTOR_H\n#define EIGEN_STDVECTOR_H\n\n#include \"details.h\"\n\n/**\n * This section contains a convenience MACRO which allows an easy specialization of\n * std::vector such that for data types with alignment issues the correct allocator\n * is used automatically.\n */\n#define EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(...) \\\nnamespace std \\\n{ \\\n  template<> \\\n  class vector<__VA_ARGS__, std::allocator<__VA_ARGS__> >  \\\n    : public vector<__VA_ARGS__, EIGEN_ALIGNED_ALLOCATOR<__VA_ARGS__> > \\\n  { \\\n    typedef vector<__VA_ARGS__, EIGEN_ALIGNED_ALLOCATOR<__VA_ARGS__> > vector_base; \\\n  public: \\\n    typedef __VA_ARGS__ value_type; \\\n    typedef vector_base::allocator_type allocator_type; \\\n    typedef vector_base::size_type size_type;  \\\n    typedef vector_base::iterator iterator;  \\\n    explicit vector(const allocator_type& a = allocator_type()) : vector_base(a) {}  \\\n    template<typename InputIterator> \\\n    vector(InputIterator first, InputIterator last, const allocator_type& a = allocator_type()) : vector_base(first, last, a) {} \\\n    vector(const vector& c) : vector_base(c) {}  \\\n    explicit vector(size_type num, const value_type& val = value_type()) : vector_base(num, val) {} \\\n    vector(iterator start_, iterator end_) : vector_base(start_, end_) {}  \\\n    vector& operator=(const vector& x) {  \\\n      vector_base::operator=(x);  \\\n      return *this;  \\\n    } \\\n  }; \\\n}\n\n// Don't specialize if containers are implemented according to C++11\n#if !EIGEN_HAS_CXX11_CONTAINERS\n\nnamespace std {\n\n#define EIGEN_STD_VECTOR_SPECIALIZATION_BODY \\\n  public:  \\\n    typedef T value_type; \\\n    typedef typename vector_base::allocator_type allocator_type; \\\n    typedef typename vector_base::size_type size_type;  \\\n    typedef typename vector_base::iterator iterator;  \\\n    typedef typename vector_base::const_iterator const_iterator;  \\\n    explicit vector(const allocator_type& a = allocator_type()) : vector_base(a) {}  \\\n    template<typename InputIterator> \\\n    vector(InputIterator first, InputIterator last, const allocator_type& a = allocator_type()) \\\n    : vector_base(first, last, a) {} \\\n    vector(const vector& c) : vector_base(c) {}  \\\n    explicit vector(size_type num, const value_type& val = value_type()) : vector_base(num, val) {} \\\n    vector(iterator start_, iterator end_) : vector_base(start_, end_) {}  \\\n    vector& operator=(const vector& x) {  \\\n      vector_base::operator=(x);  \\\n      return *this;  \\\n    }\n\n  template<typename T>\n  class vector<T,EIGEN_ALIGNED_ALLOCATOR<T> >\n    : public vector<EIGEN_WORKAROUND_MSVC_STL_SUPPORT(T),\n                    Eigen::aligned_allocator_indirection<EIGEN_WORKAROUND_MSVC_STL_SUPPORT(T)> >\n{\n  typedef vector<EIGEN_WORKAROUND_MSVC_STL_SUPPORT(T),\n                 Eigen::aligned_allocator_indirection<EIGEN_WORKAROUND_MSVC_STL_SUPPORT(T)> > vector_base;\n  EIGEN_STD_VECTOR_SPECIALIZATION_BODY\n\n  void resize(size_type new_size)\n  { resize(new_size, T()); }\n\n#if defined(_VECTOR_)\n  // workaround MSVC std::vector implementation\n  void resize(size_type new_size, const value_type& x)\n  {\n    if (vector_base::size() < new_size)\n      vector_base::_Insert_n(vector_base::end(), new_size - vector_base::size(), x);\n    else if (new_size < vector_base::size())\n      vector_base::erase(vector_base::begin() + new_size, vector_base::end());\n  }\n  void push_back(const value_type& x)\n  { vector_base::push_back(x); } \n  using vector_base::insert;  \n  iterator insert(const_iterator position, const value_type& x)\n  { return vector_base::insert(position,x); }\n  void insert(const_iterator position, size_type new_size, const value_type& x)\n  { vector_base::insert(position, new_size, x); }\n#elif defined(_GLIBCXX_VECTOR) && (!(EIGEN_GNUC_AT_LEAST(4,1)))\n  /* Note that before gcc-4.1 we already have: std::vector::resize(size_type,const T&).\n   * However, this specialization is still needed to make the above EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION trick to work. */\n  void resize(size_type new_size, const value_type& x)\n  {\n    vector_base::resize(new_size,x);\n  }\n#elif defined(_GLIBCXX_VECTOR) && EIGEN_GNUC_AT_LEAST(4,2)\n  // workaround GCC std::vector implementation\n  void resize(size_type new_size, const value_type& x)\n  {\n    if (new_size < vector_base::size())\n      vector_base::_M_erase_at_end(this->_M_impl._M_start + new_size);\n    else\n      vector_base::insert(vector_base::end(), new_size - vector_base::size(), x);\n  }\n#else\n  // either GCC 4.1 or non-GCC\n  // default implementation which should always work.\n  void resize(size_type new_size, const value_type& x)\n  {\n    if (new_size < vector_base::size())\n      vector_base::erase(vector_base::begin() + new_size, vector_base::end());\n    else if (new_size > vector_base::size())\n      vector_base::insert(vector_base::end(), new_size - vector_base::size(), x);\n  }\n#endif\n  };\n}\n#endif // !EIGEN_HAS_CXX11_CONTAINERS\n\n\n#endif // EIGEN_STDVECTOR_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/StlSupport/details.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2009 Hauke Heibel <hauke.heibel@googlemail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_STL_DETAILS_H\n#define EIGEN_STL_DETAILS_H\n\n#ifndef EIGEN_ALIGNED_ALLOCATOR\n  #define EIGEN_ALIGNED_ALLOCATOR Eigen::aligned_allocator\n#endif\n\nnamespace Eigen {\n\n  // This one is needed to prevent reimplementing the whole std::vector.\n  template <class T>\n  class aligned_allocator_indirection : public EIGEN_ALIGNED_ALLOCATOR<T>\n  {\n  public:\n    typedef std::size_t     size_type;\n    typedef std::ptrdiff_t  difference_type;\n    typedef T*              pointer;\n    typedef const T*        const_pointer;\n    typedef T&              reference;\n    typedef const T&        const_reference;\n    typedef T               value_type;\n\n    template<class U>\n    struct rebind\n    {\n      typedef aligned_allocator_indirection<U> other;\n    };\n\n    aligned_allocator_indirection() {}\n    aligned_allocator_indirection(const aligned_allocator_indirection& ) : EIGEN_ALIGNED_ALLOCATOR<T>() {}\n    aligned_allocator_indirection(const EIGEN_ALIGNED_ALLOCATOR<T>& ) {}\n    template<class U>\n    aligned_allocator_indirection(const aligned_allocator_indirection<U>& ) {}\n    template<class U>\n    aligned_allocator_indirection(const EIGEN_ALIGNED_ALLOCATOR<U>& ) {}\n    ~aligned_allocator_indirection() {}\n  };\n\n#if EIGEN_COMP_MSVC\n\n  // sometimes, MSVC detects, at compile time, that the argument x\n  // in std::vector::resize(size_t s,T x) won't be aligned and generate an error\n  // even if this function is never called. Whence this little wrapper.\n#define EIGEN_WORKAROUND_MSVC_STL_SUPPORT(T) \\\n  typename Eigen::internal::conditional< \\\n    Eigen::internal::is_arithmetic<T>::value, \\\n    T, \\\n    Eigen::internal::workaround_msvc_stl_support<T> \\\n  >::type\n\n  namespace internal {\n  template<typename T> struct workaround_msvc_stl_support : public T\n  {\n    inline workaround_msvc_stl_support() : T() {}\n    inline workaround_msvc_stl_support(const T& other) : T(other) {}\n    inline operator T& () { return *static_cast<T*>(this); }\n    inline operator const T& () const { return *static_cast<const T*>(this); }\n    template<typename OtherT>\n    inline T& operator=(const OtherT& other)\n    { T::operator=(other); return *this; }\n    inline workaround_msvc_stl_support& operator=(const workaround_msvc_stl_support& other)\n    { T::operator=(other); return *this; }\n  };\n  }\n\n#else\n\n#define EIGEN_WORKAROUND_MSVC_STL_SUPPORT(T) T\n\n#endif\n\n}\n\n#endif // EIGEN_STL_DETAILS_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/SuperLUSupport/SuperLUSupport.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2015 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SUPERLUSUPPORT_H\n#define EIGEN_SUPERLUSUPPORT_H\n\nnamespace Eigen {\n\n#if defined(SUPERLU_MAJOR_VERSION) && (SUPERLU_MAJOR_VERSION >= 5)\n#define DECL_GSSVX(PREFIX,FLOATTYPE,KEYTYPE)\t\t\\\n    extern \"C\" {                                                                                          \\\n      extern void PREFIX##gssvx(superlu_options_t *, SuperMatrix *, int *, int *, int *,                  \\\n                                char *, FLOATTYPE *, FLOATTYPE *, SuperMatrix *, SuperMatrix *,           \\\n                                void *, int, SuperMatrix *, SuperMatrix *,                                \\\n                                FLOATTYPE *, FLOATTYPE *, FLOATTYPE *, FLOATTYPE *,                       \\\n                                GlobalLU_t *, mem_usage_t *, SuperLUStat_t *, int *);                     \\\n    }                                                                                                     \\\n    inline float SuperLU_gssvx(superlu_options_t *options, SuperMatrix *A,                                \\\n         int *perm_c, int *perm_r, int *etree, char *equed,                                               \\\n         FLOATTYPE *R, FLOATTYPE *C, SuperMatrix *L,                                                      \\\n         SuperMatrix *U, void *work, int lwork,                                                           \\\n         SuperMatrix *B, SuperMatrix *X,                                                                  \\\n         FLOATTYPE *recip_pivot_growth,                                                                   \\\n         FLOATTYPE *rcond, FLOATTYPE *ferr, FLOATTYPE *berr,                                              \\\n         SuperLUStat_t *stats, int *info, KEYTYPE) {                                                      \\\n    mem_usage_t mem_usage;                                                                                \\\n    GlobalLU_t gLU;                                                                                       \\\n    PREFIX##gssvx(options, A, perm_c, perm_r, etree, equed, R, C, L,                                      \\\n         U, work, lwork, B, X, recip_pivot_growth, rcond,                                                 \\\n         ferr, berr, &gLU, &mem_usage, stats, info);                                                      \\\n    return mem_usage.for_lu; /* bytes used by the factor storage */                                       \\\n  }\n#else // version < 5.0\n#define DECL_GSSVX(PREFIX,FLOATTYPE,KEYTYPE)\t\t\\\n    extern \"C\" {                                                                                          \\\n      extern void PREFIX##gssvx(superlu_options_t *, SuperMatrix *, int *, int *, int *,                  \\\n                                char *, FLOATTYPE *, FLOATTYPE *, SuperMatrix *, SuperMatrix *,           \\\n                                void *, int, SuperMatrix *, SuperMatrix *,                                \\\n                                FLOATTYPE *, FLOATTYPE *, FLOATTYPE *, FLOATTYPE *,                       \\\n                                mem_usage_t *, SuperLUStat_t *, int *);                                   \\\n    }                                                                                                     \\\n    inline float SuperLU_gssvx(superlu_options_t *options, SuperMatrix *A,                                \\\n         int *perm_c, int *perm_r, int *etree, char *equed,                                               \\\n         FLOATTYPE *R, FLOATTYPE *C, SuperMatrix *L,                                                      \\\n         SuperMatrix *U, void *work, int lwork,                                                           \\\n         SuperMatrix *B, SuperMatrix *X,                                                                  \\\n         FLOATTYPE *recip_pivot_growth,                                                                   \\\n         FLOATTYPE *rcond, FLOATTYPE *ferr, FLOATTYPE *berr,                                              \\\n         SuperLUStat_t *stats, int *info, KEYTYPE) {                                                      \\\n    mem_usage_t mem_usage;                                                                                \\\n    PREFIX##gssvx(options, A, perm_c, perm_r, etree, equed, R, C, L,                                      \\\n         U, work, lwork, B, X, recip_pivot_growth, rcond,                                                 \\\n         ferr, berr, &mem_usage, stats, info);                                                            \\\n    return mem_usage.for_lu; /* bytes used by the factor storage */                                       \\\n  }\n#endif\n\nDECL_GSSVX(s,float,float)\nDECL_GSSVX(c,float,std::complex<float>)\nDECL_GSSVX(d,double,double)\nDECL_GSSVX(z,double,std::complex<double>)\n\n#ifdef MILU_ALPHA\n#define EIGEN_SUPERLU_HAS_ILU\n#endif\n\n#ifdef EIGEN_SUPERLU_HAS_ILU\n\n// similarly for the incomplete factorization using gsisx\n#define DECL_GSISX(PREFIX,FLOATTYPE,KEYTYPE)                                                    \\\n    extern \"C\" {                                                                                \\\n      extern void PREFIX##gsisx(superlu_options_t *, SuperMatrix *, int *, int *, int *,        \\\n                         char *, FLOATTYPE *, FLOATTYPE *, SuperMatrix *, SuperMatrix *,        \\\n                         void *, int, SuperMatrix *, SuperMatrix *, FLOATTYPE *, FLOATTYPE *,   \\\n                         mem_usage_t *, SuperLUStat_t *, int *);                        \\\n    }                                                                                           \\\n    inline float SuperLU_gsisx(superlu_options_t *options, SuperMatrix *A,                      \\\n         int *perm_c, int *perm_r, int *etree, char *equed,                                     \\\n         FLOATTYPE *R, FLOATTYPE *C, SuperMatrix *L,                                            \\\n         SuperMatrix *U, void *work, int lwork,                                                 \\\n         SuperMatrix *B, SuperMatrix *X,                                                        \\\n         FLOATTYPE *recip_pivot_growth,                                                         \\\n         FLOATTYPE *rcond,                                                                      \\\n         SuperLUStat_t *stats, int *info, KEYTYPE) {                                            \\\n    mem_usage_t mem_usage;                                                              \\\n    PREFIX##gsisx(options, A, perm_c, perm_r, etree, equed, R, C, L,                            \\\n         U, work, lwork, B, X, recip_pivot_growth, rcond,                                       \\\n         &mem_usage, stats, info);                                                              \\\n    return mem_usage.for_lu; /* bytes used by the factor storage */                             \\\n  }\n\nDECL_GSISX(s,float,float)\nDECL_GSISX(c,float,std::complex<float>)\nDECL_GSISX(d,double,double)\nDECL_GSISX(z,double,std::complex<double>)\n\n#endif\n\ntemplate<typename MatrixType>\nstruct SluMatrixMapHelper;\n\n/** \\internal\n  *\n  * A wrapper class for SuperLU matrices. It supports only compressed sparse matrices\n  * and dense matrices. Supernodal and other fancy format are not supported by this wrapper.\n  *\n  * This wrapper class mainly aims to avoids the need of dynamic allocation of the storage structure.\n  */\nstruct SluMatrix : SuperMatrix\n{\n  SluMatrix()\n  {\n    Store = &storage;\n  }\n\n  SluMatrix(const SluMatrix& other)\n    : SuperMatrix(other)\n  {\n    Store = &storage;\n    storage = other.storage;\n  }\n\n  SluMatrix& operator=(const SluMatrix& other)\n  {\n    SuperMatrix::operator=(static_cast<const SuperMatrix&>(other));\n    Store = &storage;\n    storage = other.storage;\n    return *this;\n  }\n\n  struct\n  {\n    union {int nnz;int lda;};\n    void *values;\n    int *innerInd;\n    int *outerInd;\n  } storage;\n\n  void setStorageType(Stype_t t)\n  {\n    Stype = t;\n    if (t==SLU_NC || t==SLU_NR || t==SLU_DN)\n      Store = &storage;\n    else\n    {\n      eigen_assert(false && \"storage type not supported\");\n      Store = 0;\n    }\n  }\n\n  template<typename Scalar>\n  void setScalarType()\n  {\n    if (internal::is_same<Scalar,float>::value)\n      Dtype = SLU_S;\n    else if (internal::is_same<Scalar,double>::value)\n      Dtype = SLU_D;\n    else if (internal::is_same<Scalar,std::complex<float> >::value)\n      Dtype = SLU_C;\n    else if (internal::is_same<Scalar,std::complex<double> >::value)\n      Dtype = SLU_Z;\n    else\n    {\n      eigen_assert(false && \"Scalar type not supported by SuperLU\");\n    }\n  }\n\n  template<typename MatrixType>\n  static SluMatrix Map(MatrixBase<MatrixType>& _mat)\n  {\n    MatrixType& mat(_mat.derived());\n    eigen_assert( ((MatrixType::Flags&RowMajorBit)!=RowMajorBit) && \"row-major dense matrices are not supported by SuperLU\");\n    SluMatrix res;\n    res.setStorageType(SLU_DN);\n    res.setScalarType<typename MatrixType::Scalar>();\n    res.Mtype     = SLU_GE;\n\n    res.nrow      = internal::convert_index<int>(mat.rows());\n    res.ncol      = internal::convert_index<int>(mat.cols());\n\n    res.storage.lda       = internal::convert_index<int>(MatrixType::IsVectorAtCompileTime ? mat.size() : mat.outerStride());\n    res.storage.values    = (void*)(mat.data());\n    return res;\n  }\n\n  template<typename MatrixType>\n  static SluMatrix Map(SparseMatrixBase<MatrixType>& a_mat)\n  {\n    MatrixType &mat(a_mat.derived());\n    SluMatrix res;\n    if ((MatrixType::Flags&RowMajorBit)==RowMajorBit)\n    {\n      res.setStorageType(SLU_NR);\n      res.nrow      = internal::convert_index<int>(mat.cols());\n      res.ncol      = internal::convert_index<int>(mat.rows());\n    }\n    else\n    {\n      res.setStorageType(SLU_NC);\n      res.nrow      = internal::convert_index<int>(mat.rows());\n      res.ncol      = internal::convert_index<int>(mat.cols());\n    }\n\n    res.Mtype       = SLU_GE;\n\n    res.storage.nnz       = internal::convert_index<int>(mat.nonZeros());\n    res.storage.values    = mat.valuePtr();\n    res.storage.innerInd  = mat.innerIndexPtr();\n    res.storage.outerInd  = mat.outerIndexPtr();\n\n    res.setScalarType<typename MatrixType::Scalar>();\n\n    // FIXME the following is not very accurate\n    if (MatrixType::Flags & Upper)\n      res.Mtype = SLU_TRU;\n    if (MatrixType::Flags & Lower)\n      res.Mtype = SLU_TRL;\n\n    eigen_assert(((MatrixType::Flags & SelfAdjoint)==0) && \"SelfAdjoint matrix shape not supported by SuperLU\");\n\n    return res;\n  }\n};\n\ntemplate<typename Scalar, int Rows, int Cols, int Options, int MRows, int MCols>\nstruct SluMatrixMapHelper<Matrix<Scalar,Rows,Cols,Options,MRows,MCols> >\n{\n  typedef Matrix<Scalar,Rows,Cols,Options,MRows,MCols> MatrixType;\n  static void run(MatrixType& mat, SluMatrix& res)\n  {\n    eigen_assert( ((Options&RowMajor)!=RowMajor) && \"row-major dense matrices is not supported by SuperLU\");\n    res.setStorageType(SLU_DN);\n    res.setScalarType<Scalar>();\n    res.Mtype     = SLU_GE;\n\n    res.nrow      = mat.rows();\n    res.ncol      = mat.cols();\n\n    res.storage.lda       = mat.outerStride();\n    res.storage.values    = mat.data();\n  }\n};\n\ntemplate<typename Derived>\nstruct SluMatrixMapHelper<SparseMatrixBase<Derived> >\n{\n  typedef Derived MatrixType;\n  static void run(MatrixType& mat, SluMatrix& res)\n  {\n    if ((MatrixType::Flags&RowMajorBit)==RowMajorBit)\n    {\n      res.setStorageType(SLU_NR);\n      res.nrow      = mat.cols();\n      res.ncol      = mat.rows();\n    }\n    else\n    {\n      res.setStorageType(SLU_NC);\n      res.nrow      = mat.rows();\n      res.ncol      = mat.cols();\n    }\n\n    res.Mtype       = SLU_GE;\n\n    res.storage.nnz       = mat.nonZeros();\n    res.storage.values    = mat.valuePtr();\n    res.storage.innerInd  = mat.innerIndexPtr();\n    res.storage.outerInd  = mat.outerIndexPtr();\n\n    res.setScalarType<typename MatrixType::Scalar>();\n\n    // FIXME the following is not very accurate\n    if (MatrixType::Flags & Upper)\n      res.Mtype = SLU_TRU;\n    if (MatrixType::Flags & Lower)\n      res.Mtype = SLU_TRL;\n\n    eigen_assert(((MatrixType::Flags & SelfAdjoint)==0) && \"SelfAdjoint matrix shape not supported by SuperLU\");\n  }\n};\n\nnamespace internal {\n\ntemplate<typename MatrixType>\nSluMatrix asSluMatrix(MatrixType& mat)\n{\n  return SluMatrix::Map(mat);\n}\n\n/** View a Super LU matrix as an Eigen expression */\ntemplate<typename Scalar, int Flags, typename Index>\nMappedSparseMatrix<Scalar,Flags,Index> map_superlu(SluMatrix& sluMat)\n{\n  eigen_assert(((Flags&RowMajor)==RowMajor && sluMat.Stype == SLU_NR)\n         || ((Flags&ColMajor)==ColMajor && sluMat.Stype == SLU_NC));\n\n  Index outerSize = (Flags&RowMajor)==RowMajor ? sluMat.ncol : sluMat.nrow;\n\n  return MappedSparseMatrix<Scalar,Flags,Index>(\n    sluMat.nrow, sluMat.ncol, sluMat.storage.outerInd[outerSize],\n    sluMat.storage.outerInd, sluMat.storage.innerInd, reinterpret_cast<Scalar*>(sluMat.storage.values) );\n}\n\n} // end namespace internal\n\n/** \\ingroup SuperLUSupport_Module\n  * \\class SuperLUBase\n  * \\brief The base class for the direct and incomplete LU factorization of SuperLU\n  */\ntemplate<typename _MatrixType, typename Derived>\nclass SuperLUBase : public SparseSolverBase<Derived>\n{\n  protected:\n    typedef SparseSolverBase<Derived> Base;\n    using Base::derived;\n    using Base::m_isInitialized;\n  public:\n    typedef _MatrixType MatrixType;\n    typedef typename MatrixType::Scalar Scalar;\n    typedef typename MatrixType::RealScalar RealScalar;\n    typedef typename MatrixType::StorageIndex StorageIndex;\n    typedef Matrix<Scalar,Dynamic,1> Vector;\n    typedef Matrix<int, 1, MatrixType::ColsAtCompileTime> IntRowVectorType;\n    typedef Matrix<int, MatrixType::RowsAtCompileTime, 1> IntColVectorType;    \n    typedef Map<PermutationMatrix<Dynamic,Dynamic,int> > PermutationMap;\n    typedef SparseMatrix<Scalar> LUMatrixType;\n    enum {\n      ColsAtCompileTime = MatrixType::ColsAtCompileTime,\n      MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime\n    };\n\n  public:\n\n    SuperLUBase() {}\n\n    ~SuperLUBase()\n    {\n      clearFactors();\n    }\n    \n    inline Index rows() const { return m_matrix.rows(); }\n    inline Index cols() const { return m_matrix.cols(); }\n    \n    /** \\returns a reference to the Super LU option object to configure the  Super LU algorithms. */\n    inline superlu_options_t& options() { return m_sluOptions; }\n    \n    /** \\brief Reports whether previous computation was successful.\n      *\n      * \\returns \\c Success if computation was successful,\n      *          \\c NumericalIssue if the matrix.appears to be negative.\n      */\n    ComputationInfo info() const\n    {\n      eigen_assert(m_isInitialized && \"Decomposition is not initialized.\");\n      return m_info;\n    }\n\n    /** Computes the sparse Cholesky decomposition of \\a matrix */\n    void compute(const MatrixType& matrix)\n    {\n      derived().analyzePattern(matrix);\n      derived().factorize(matrix);\n    }\n\n    /** Performs a symbolic decomposition on the sparcity of \\a matrix.\n      *\n      * This function is particularly useful when solving for several problems having the same structure.\n      * \n      * \\sa factorize()\n      */\n    void analyzePattern(const MatrixType& /*matrix*/)\n    {\n      m_isInitialized = true;\n      m_info = Success;\n      m_analysisIsOk = true;\n      m_factorizationIsOk = false;\n    }\n    \n    template<typename Stream>\n    void dumpMemory(Stream& /*s*/)\n    {}\n    \n  protected:\n    \n    void initFactorization(const MatrixType& a)\n    {\n      set_default_options(&this->m_sluOptions);\n      \n      const Index size = a.rows();\n      m_matrix = a;\n\n      m_sluA = internal::asSluMatrix(m_matrix);\n      clearFactors();\n\n      m_p.resize(size);\n      m_q.resize(size);\n      m_sluRscale.resize(size);\n      m_sluCscale.resize(size);\n      m_sluEtree.resize(size);\n\n      // set empty B and X\n      m_sluB.setStorageType(SLU_DN);\n      m_sluB.setScalarType<Scalar>();\n      m_sluB.Mtype          = SLU_GE;\n      m_sluB.storage.values = 0;\n      m_sluB.nrow           = 0;\n      m_sluB.ncol           = 0;\n      m_sluB.storage.lda    = internal::convert_index<int>(size);\n      m_sluX                = m_sluB;\n      \n      m_extractedDataAreDirty = true;\n    }\n    \n    void init()\n    {\n      m_info = InvalidInput;\n      m_isInitialized = false;\n      m_sluL.Store = 0;\n      m_sluU.Store = 0;\n    }\n    \n    void extractData() const;\n\n    void clearFactors()\n    {\n      if(m_sluL.Store)\n        Destroy_SuperNode_Matrix(&m_sluL);\n      if(m_sluU.Store)\n        Destroy_CompCol_Matrix(&m_sluU);\n\n      m_sluL.Store = 0;\n      m_sluU.Store = 0;\n\n      memset(&m_sluL,0,sizeof m_sluL);\n      memset(&m_sluU,0,sizeof m_sluU);\n    }\n\n    // cached data to reduce reallocation, etc.\n    mutable LUMatrixType m_l;\n    mutable LUMatrixType m_u;\n    mutable IntColVectorType m_p;\n    mutable IntRowVectorType m_q;\n\n    mutable LUMatrixType m_matrix;  // copy of the factorized matrix\n    mutable SluMatrix m_sluA;\n    mutable SuperMatrix m_sluL, m_sluU;\n    mutable SluMatrix m_sluB, m_sluX;\n    mutable SuperLUStat_t m_sluStat;\n    mutable superlu_options_t m_sluOptions;\n    mutable std::vector<int> m_sluEtree;\n    mutable Matrix<RealScalar,Dynamic,1> m_sluRscale, m_sluCscale;\n    mutable Matrix<RealScalar,Dynamic,1> m_sluFerr, m_sluBerr;\n    mutable char m_sluEqued;\n\n    mutable ComputationInfo m_info;\n    int m_factorizationIsOk;\n    int m_analysisIsOk;\n    mutable bool m_extractedDataAreDirty;\n    \n  private:\n    SuperLUBase(SuperLUBase& ) { }\n};\n\n\n/** \\ingroup SuperLUSupport_Module\n  * \\class SuperLU\n  * \\brief A sparse direct LU factorization and solver based on the SuperLU library\n  *\n  * This class allows to solve for A.X = B sparse linear problems via a direct LU factorization\n  * using the SuperLU library. The sparse matrix A must be squared and invertible. The vectors or matrices\n  * X and B can be either dense or sparse.\n  *\n  * \\tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<>\n  *\n  * \\warning This class is only for the 4.x versions of SuperLU. The 3.x and 5.x versions are not supported.\n  *\n  * \\implsparsesolverconcept\n  *\n  * \\sa \\ref TutorialSparseSolverConcept, class SparseLU\n  */\ntemplate<typename _MatrixType>\nclass SuperLU : public SuperLUBase<_MatrixType,SuperLU<_MatrixType> >\n{\n  public:\n    typedef SuperLUBase<_MatrixType,SuperLU> Base;\n    typedef _MatrixType MatrixType;\n    typedef typename Base::Scalar Scalar;\n    typedef typename Base::RealScalar RealScalar;\n    typedef typename Base::StorageIndex StorageIndex;\n    typedef typename Base::IntRowVectorType IntRowVectorType;\n    typedef typename Base::IntColVectorType IntColVectorType;   \n    typedef typename Base::PermutationMap PermutationMap;\n    typedef typename Base::LUMatrixType LUMatrixType;\n    typedef TriangularView<LUMatrixType, Lower|UnitDiag>  LMatrixType;\n    typedef TriangularView<LUMatrixType,  Upper>          UMatrixType;\n\n  public:\n    using Base::_solve_impl;\n\n    SuperLU() : Base() { init(); }\n\n    explicit SuperLU(const MatrixType& matrix) : Base()\n    {\n      init();\n      Base::compute(matrix);\n    }\n\n    ~SuperLU()\n    {\n    }\n    \n    /** Performs a symbolic decomposition on the sparcity of \\a matrix.\n      *\n      * This function is particularly useful when solving for several problems having the same structure.\n      * \n      * \\sa factorize()\n      */\n    void analyzePattern(const MatrixType& matrix)\n    {\n      m_info = InvalidInput;\n      m_isInitialized = false;\n      Base::analyzePattern(matrix);\n    }\n    \n    /** Performs a numeric decomposition of \\a matrix\n      *\n      * The given matrix must has the same sparcity than the matrix on which the symbolic decomposition has been performed.\n      *\n      * \\sa analyzePattern()\n      */\n    void factorize(const MatrixType& matrix);\n    \n    /** \\internal */\n    template<typename Rhs,typename Dest>\n    void _solve_impl(const MatrixBase<Rhs> &b, MatrixBase<Dest> &dest) const;\n    \n    inline const LMatrixType& matrixL() const\n    {\n      if (m_extractedDataAreDirty) this->extractData();\n      return m_l;\n    }\n\n    inline const UMatrixType& matrixU() const\n    {\n      if (m_extractedDataAreDirty) this->extractData();\n      return m_u;\n    }\n\n    inline const IntColVectorType& permutationP() const\n    {\n      if (m_extractedDataAreDirty) this->extractData();\n      return m_p;\n    }\n\n    inline const IntRowVectorType& permutationQ() const\n    {\n      if (m_extractedDataAreDirty) this->extractData();\n      return m_q;\n    }\n    \n    Scalar determinant() const;\n    \n  protected:\n    \n    using Base::m_matrix;\n    using Base::m_sluOptions;\n    using Base::m_sluA;\n    using Base::m_sluB;\n    using Base::m_sluX;\n    using Base::m_p;\n    using Base::m_q;\n    using Base::m_sluEtree;\n    using Base::m_sluEqued;\n    using Base::m_sluRscale;\n    using Base::m_sluCscale;\n    using Base::m_sluL;\n    using Base::m_sluU;\n    using Base::m_sluStat;\n    using Base::m_sluFerr;\n    using Base::m_sluBerr;\n    using Base::m_l;\n    using Base::m_u;\n    \n    using Base::m_analysisIsOk;\n    using Base::m_factorizationIsOk;\n    using Base::m_extractedDataAreDirty;\n    using Base::m_isInitialized;\n    using Base::m_info;\n    \n    void init()\n    {\n      Base::init();\n      \n      set_default_options(&this->m_sluOptions);\n      m_sluOptions.PrintStat        = NO;\n      m_sluOptions.ConditionNumber  = NO;\n      m_sluOptions.Trans            = NOTRANS;\n      m_sluOptions.ColPerm          = COLAMD;\n    }\n    \n    \n  private:\n    SuperLU(SuperLU& ) { }\n};\n\ntemplate<typename MatrixType>\nvoid SuperLU<MatrixType>::factorize(const MatrixType& a)\n{\n  eigen_assert(m_analysisIsOk && \"You must first call analyzePattern()\");\n  if(!m_analysisIsOk)\n  {\n    m_info = InvalidInput;\n    return;\n  }\n  \n  this->initFactorization(a);\n  \n  m_sluOptions.ColPerm = COLAMD;\n  int info = 0;\n  RealScalar recip_pivot_growth, rcond;\n  RealScalar ferr, berr;\n\n  StatInit(&m_sluStat);\n  SuperLU_gssvx(&m_sluOptions, &m_sluA, m_q.data(), m_p.data(), &m_sluEtree[0],\n                &m_sluEqued, &m_sluRscale[0], &m_sluCscale[0],\n                &m_sluL, &m_sluU,\n                NULL, 0,\n                &m_sluB, &m_sluX,\n                &recip_pivot_growth, &rcond,\n                &ferr, &berr,\n                &m_sluStat, &info, Scalar());\n  StatFree(&m_sluStat);\n\n  m_extractedDataAreDirty = true;\n\n  // FIXME how to better check for errors ???\n  m_info = info == 0 ? Success : NumericalIssue;\n  m_factorizationIsOk = true;\n}\n\ntemplate<typename MatrixType>\ntemplate<typename Rhs,typename Dest>\nvoid SuperLU<MatrixType>::_solve_impl(const MatrixBase<Rhs> &b, MatrixBase<Dest>& x) const\n{\n  eigen_assert(m_factorizationIsOk && \"The decomposition is not in a valid state for solving, you must first call either compute() or analyzePattern()/factorize()\");\n\n  const Index size = m_matrix.rows();\n  const Index rhsCols = b.cols();\n  eigen_assert(size==b.rows());\n\n  m_sluOptions.Trans = NOTRANS;\n  m_sluOptions.Fact = FACTORED;\n  m_sluOptions.IterRefine = NOREFINE;\n  \n\n  m_sluFerr.resize(rhsCols);\n  m_sluBerr.resize(rhsCols);\n  \n  Ref<const Matrix<typename Rhs::Scalar,Dynamic,Dynamic,ColMajor> > b_ref(b);\n  Ref<const Matrix<typename Dest::Scalar,Dynamic,Dynamic,ColMajor> > x_ref(x);\n  \n  m_sluB = SluMatrix::Map(b_ref.const_cast_derived());\n  m_sluX = SluMatrix::Map(x_ref.const_cast_derived());\n  \n  typename Rhs::PlainObject b_cpy;\n  if(m_sluEqued!='N')\n  {\n    b_cpy = b;\n    m_sluB = SluMatrix::Map(b_cpy.const_cast_derived());  \n  }\n\n  StatInit(&m_sluStat);\n  int info = 0;\n  RealScalar recip_pivot_growth, rcond;\n  SuperLU_gssvx(&m_sluOptions, &m_sluA,\n                m_q.data(), m_p.data(),\n                &m_sluEtree[0], &m_sluEqued,\n                &m_sluRscale[0], &m_sluCscale[0],\n                &m_sluL, &m_sluU,\n                NULL, 0,\n                &m_sluB, &m_sluX,\n                &recip_pivot_growth, &rcond,\n                &m_sluFerr[0], &m_sluBerr[0],\n                &m_sluStat, &info, Scalar());\n  StatFree(&m_sluStat);\n  \n  if(x.derived().data() != x_ref.data())\n    x = x_ref;\n  \n  m_info = info==0 ? Success : NumericalIssue;\n}\n\n// the code of this extractData() function has been adapted from the SuperLU's Matlab support code,\n//\n//  Copyright (c) 1994 by Xerox Corporation.  All rights reserved.\n//\n//  THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY\n//  EXPRESSED OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.\n//\ntemplate<typename MatrixType, typename Derived>\nvoid SuperLUBase<MatrixType,Derived>::extractData() const\n{\n  eigen_assert(m_factorizationIsOk && \"The decomposition is not in a valid state for extracting factors, you must first call either compute() or analyzePattern()/factorize()\");\n  if (m_extractedDataAreDirty)\n  {\n    int         upper;\n    int         fsupc, istart, nsupr;\n    int         lastl = 0, lastu = 0;\n    SCformat    *Lstore = static_cast<SCformat*>(m_sluL.Store);\n    NCformat    *Ustore = static_cast<NCformat*>(m_sluU.Store);\n    Scalar      *SNptr;\n\n    const Index size = m_matrix.rows();\n    m_l.resize(size,size);\n    m_l.resizeNonZeros(Lstore->nnz);\n    m_u.resize(size,size);\n    m_u.resizeNonZeros(Ustore->nnz);\n\n    int* Lcol = m_l.outerIndexPtr();\n    int* Lrow = m_l.innerIndexPtr();\n    Scalar* Lval = m_l.valuePtr();\n\n    int* Ucol = m_u.outerIndexPtr();\n    int* Urow = m_u.innerIndexPtr();\n    Scalar* Uval = m_u.valuePtr();\n\n    Ucol[0] = 0;\n    Ucol[0] = 0;\n\n    /* for each supernode */\n    for (int k = 0; k <= Lstore->nsuper; ++k)\n    {\n      fsupc   = L_FST_SUPC(k);\n      istart  = L_SUB_START(fsupc);\n      nsupr   = L_SUB_START(fsupc+1) - istart;\n      upper   = 1;\n\n      /* for each column in the supernode */\n      for (int j = fsupc; j < L_FST_SUPC(k+1); ++j)\n      {\n        SNptr = &((Scalar*)Lstore->nzval)[L_NZ_START(j)];\n\n        /* Extract U */\n        for (int i = U_NZ_START(j); i < U_NZ_START(j+1); ++i)\n        {\n          Uval[lastu] = ((Scalar*)Ustore->nzval)[i];\n          /* Matlab doesn't like explicit zero. */\n          if (Uval[lastu] != 0.0)\n            Urow[lastu++] = U_SUB(i);\n        }\n        for (int i = 0; i < upper; ++i)\n        {\n          /* upper triangle in the supernode */\n          Uval[lastu] = SNptr[i];\n          /* Matlab doesn't like explicit zero. */\n          if (Uval[lastu] != 0.0)\n            Urow[lastu++] = L_SUB(istart+i);\n        }\n        Ucol[j+1] = lastu;\n\n        /* Extract L */\n        Lval[lastl] = 1.0; /* unit diagonal */\n        Lrow[lastl++] = L_SUB(istart + upper - 1);\n        for (int i = upper; i < nsupr; ++i)\n        {\n          Lval[lastl] = SNptr[i];\n          /* Matlab doesn't like explicit zero. */\n          if (Lval[lastl] != 0.0)\n            Lrow[lastl++] = L_SUB(istart+i);\n        }\n        Lcol[j+1] = lastl;\n\n        ++upper;\n      } /* for j ... */\n\n    } /* for k ... */\n\n    // squeeze the matrices :\n    m_l.resizeNonZeros(lastl);\n    m_u.resizeNonZeros(lastu);\n\n    m_extractedDataAreDirty = false;\n  }\n}\n\ntemplate<typename MatrixType>\ntypename SuperLU<MatrixType>::Scalar SuperLU<MatrixType>::determinant() const\n{\n  eigen_assert(m_factorizationIsOk && \"The decomposition is not in a valid state for computing the determinant, you must first call either compute() or analyzePattern()/factorize()\");\n  \n  if (m_extractedDataAreDirty)\n    this->extractData();\n\n  Scalar det = Scalar(1);\n  for (int j=0; j<m_u.cols(); ++j)\n  {\n    if (m_u.outerIndexPtr()[j+1]-m_u.outerIndexPtr()[j] > 0)\n    {\n      int lastId = m_u.outerIndexPtr()[j+1]-1;\n      eigen_assert(m_u.innerIndexPtr()[lastId]<=j);\n      if (m_u.innerIndexPtr()[lastId]==j)\n        det *= m_u.valuePtr()[lastId];\n    }\n  }\n  if(PermutationMap(m_p.data(),m_p.size()).determinant()*PermutationMap(m_q.data(),m_q.size()).determinant()<0)\n    det = -det;\n  if(m_sluEqued!='N')\n    return det/m_sluRscale.prod()/m_sluCscale.prod();\n  else\n    return det;\n}\n\n#ifdef EIGEN_PARSED_BY_DOXYGEN\n#define EIGEN_SUPERLU_HAS_ILU\n#endif\n\n#ifdef EIGEN_SUPERLU_HAS_ILU\n\n/** \\ingroup SuperLUSupport_Module\n  * \\class SuperILU\n  * \\brief A sparse direct \\b incomplete LU factorization and solver based on the SuperLU library\n  *\n  * This class allows to solve for an approximate solution of A.X = B sparse linear problems via an incomplete LU factorization\n  * using the SuperLU library. This class is aimed to be used as a preconditioner of the iterative linear solvers.\n  *\n  * \\warning This class is only for the 4.x versions of SuperLU. The 3.x and 5.x versions are not supported.\n  *\n  * \\tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<>\n  *\n  * \\implsparsesolverconcept\n  *\n  * \\sa \\ref TutorialSparseSolverConcept, class IncompleteLUT, class ConjugateGradient, class BiCGSTAB\n  */\n\ntemplate<typename _MatrixType>\nclass SuperILU : public SuperLUBase<_MatrixType,SuperILU<_MatrixType> >\n{\n  public:\n    typedef SuperLUBase<_MatrixType,SuperILU> Base;\n    typedef _MatrixType MatrixType;\n    typedef typename Base::Scalar Scalar;\n    typedef typename Base::RealScalar RealScalar;\n\n  public:\n    using Base::_solve_impl;\n\n    SuperILU() : Base() { init(); }\n\n    SuperILU(const MatrixType& matrix) : Base()\n    {\n      init();\n      Base::compute(matrix);\n    }\n\n    ~SuperILU()\n    {\n    }\n    \n    /** Performs a symbolic decomposition on the sparcity of \\a matrix.\n      *\n      * This function is particularly useful when solving for several problems having the same structure.\n      * \n      * \\sa factorize()\n      */\n    void analyzePattern(const MatrixType& matrix)\n    {\n      Base::analyzePattern(matrix);\n    }\n    \n    /** Performs a numeric decomposition of \\a matrix\n      *\n      * The given matrix must has the same sparcity than the matrix on which the symbolic decomposition has been performed.\n      *\n      * \\sa analyzePattern()\n      */\n    void factorize(const MatrixType& matrix);\n    \n    #ifndef EIGEN_PARSED_BY_DOXYGEN\n    /** \\internal */\n    template<typename Rhs,typename Dest>\n    void _solve_impl(const MatrixBase<Rhs> &b, MatrixBase<Dest> &dest) const;\n    #endif // EIGEN_PARSED_BY_DOXYGEN\n    \n  protected:\n    \n    using Base::m_matrix;\n    using Base::m_sluOptions;\n    using Base::m_sluA;\n    using Base::m_sluB;\n    using Base::m_sluX;\n    using Base::m_p;\n    using Base::m_q;\n    using Base::m_sluEtree;\n    using Base::m_sluEqued;\n    using Base::m_sluRscale;\n    using Base::m_sluCscale;\n    using Base::m_sluL;\n    using Base::m_sluU;\n    using Base::m_sluStat;\n    using Base::m_sluFerr;\n    using Base::m_sluBerr;\n    using Base::m_l;\n    using Base::m_u;\n    \n    using Base::m_analysisIsOk;\n    using Base::m_factorizationIsOk;\n    using Base::m_extractedDataAreDirty;\n    using Base::m_isInitialized;\n    using Base::m_info;\n\n    void init()\n    {\n      Base::init();\n      \n      ilu_set_default_options(&m_sluOptions);\n      m_sluOptions.PrintStat        = NO;\n      m_sluOptions.ConditionNumber  = NO;\n      m_sluOptions.Trans            = NOTRANS;\n      m_sluOptions.ColPerm          = MMD_AT_PLUS_A;\n      \n      // no attempt to preserve column sum\n      m_sluOptions.ILU_MILU = SILU;\n      // only basic ILU(k) support -- no direct control over memory consumption\n      // better to use ILU_DropRule = DROP_BASIC | DROP_AREA\n      // and set ILU_FillFactor to max memory growth\n      m_sluOptions.ILU_DropRule = DROP_BASIC;\n      m_sluOptions.ILU_DropTol = NumTraits<Scalar>::dummy_precision()*10;\n    }\n    \n  private:\n    SuperILU(SuperILU& ) { }\n};\n\ntemplate<typename MatrixType>\nvoid SuperILU<MatrixType>::factorize(const MatrixType& a)\n{\n  eigen_assert(m_analysisIsOk && \"You must first call analyzePattern()\");\n  if(!m_analysisIsOk)\n  {\n    m_info = InvalidInput;\n    return;\n  }\n  \n  this->initFactorization(a);\n\n  int info = 0;\n  RealScalar recip_pivot_growth, rcond;\n\n  StatInit(&m_sluStat);\n  SuperLU_gsisx(&m_sluOptions, &m_sluA, m_q.data(), m_p.data(), &m_sluEtree[0],\n                &m_sluEqued, &m_sluRscale[0], &m_sluCscale[0],\n                &m_sluL, &m_sluU,\n                NULL, 0,\n                &m_sluB, &m_sluX,\n                &recip_pivot_growth, &rcond,\n                &m_sluStat, &info, Scalar());\n  StatFree(&m_sluStat);\n\n  // FIXME how to better check for errors ???\n  m_info = info == 0 ? Success : NumericalIssue;\n  m_factorizationIsOk = true;\n}\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\ntemplate<typename MatrixType>\ntemplate<typename Rhs,typename Dest>\nvoid SuperILU<MatrixType>::_solve_impl(const MatrixBase<Rhs> &b, MatrixBase<Dest>& x) const\n{\n  eigen_assert(m_factorizationIsOk && \"The decomposition is not in a valid state for solving, you must first call either compute() or analyzePattern()/factorize()\");\n\n  const int size = m_matrix.rows();\n  const int rhsCols = b.cols();\n  eigen_assert(size==b.rows());\n\n  m_sluOptions.Trans = NOTRANS;\n  m_sluOptions.Fact = FACTORED;\n  m_sluOptions.IterRefine = NOREFINE;\n\n  m_sluFerr.resize(rhsCols);\n  m_sluBerr.resize(rhsCols);\n  \n  Ref<const Matrix<typename Rhs::Scalar,Dynamic,Dynamic,ColMajor> > b_ref(b);\n  Ref<const Matrix<typename Dest::Scalar,Dynamic,Dynamic,ColMajor> > x_ref(x);\n  \n  m_sluB = SluMatrix::Map(b_ref.const_cast_derived());\n  m_sluX = SluMatrix::Map(x_ref.const_cast_derived());\n\n  typename Rhs::PlainObject b_cpy;\n  if(m_sluEqued!='N')\n  {\n    b_cpy = b;\n    m_sluB = SluMatrix::Map(b_cpy.const_cast_derived());  \n  }\n  \n  int info = 0;\n  RealScalar recip_pivot_growth, rcond;\n\n  StatInit(&m_sluStat);\n  SuperLU_gsisx(&m_sluOptions, &m_sluA,\n                m_q.data(), m_p.data(),\n                &m_sluEtree[0], &m_sluEqued,\n                &m_sluRscale[0], &m_sluCscale[0],\n                &m_sluL, &m_sluU,\n                NULL, 0,\n                &m_sluB, &m_sluX,\n                &recip_pivot_growth, &rcond,\n                &m_sluStat, &info, Scalar());\n  StatFree(&m_sluStat);\n  \n  if(x.derived().data() != x_ref.data())\n    x = x_ref;\n\n  m_info = info==0 ? Success : NumericalIssue;\n}\n#endif\n\n#endif\n\n} // end namespace Eigen\n\n#endif // EIGEN_SUPERLUSUPPORT_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/UmfPackSupport/UmfPackSupport.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2011 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_UMFPACKSUPPORT_H\n#define EIGEN_UMFPACKSUPPORT_H\n\n// for compatibility with super old version of umfpack,\n// not sure this is really needed, but this is harmless.\n#ifndef SuiteSparse_long\n#ifdef UF_long\n#define SuiteSparse_long UF_long\n#else\n#error neither SuiteSparse_long nor UF_long are defined\n#endif\n#endif\n\nnamespace Eigen {\n\n/* TODO extract L, extract U, compute det, etc... */\n\n// generic double/complex<double> wrapper functions:\n\n\n // Defaults\ninline void umfpack_defaults(double control[UMFPACK_CONTROL], double, int)\n{ umfpack_di_defaults(control); }\n\ninline void umfpack_defaults(double control[UMFPACK_CONTROL], std::complex<double>, int)\n{ umfpack_zi_defaults(control); }\n\ninline void umfpack_defaults(double control[UMFPACK_CONTROL], double, SuiteSparse_long)\n{ umfpack_dl_defaults(control); }\n\ninline void umfpack_defaults(double control[UMFPACK_CONTROL], std::complex<double>, SuiteSparse_long)\n{ umfpack_zl_defaults(control); }\n\n// Report info\ninline void umfpack_report_info(double control[UMFPACK_CONTROL], double info[UMFPACK_INFO], double, int)\n{ umfpack_di_report_info(control, info);}\n\ninline void umfpack_report_info(double control[UMFPACK_CONTROL], double info[UMFPACK_INFO], std::complex<double>, int)\n{ umfpack_zi_report_info(control, info);}\n\ninline void umfpack_report_info(double control[UMFPACK_CONTROL], double info[UMFPACK_INFO], double, SuiteSparse_long)\n{ umfpack_dl_report_info(control, info);}\n\ninline void umfpack_report_info(double control[UMFPACK_CONTROL], double info[UMFPACK_INFO], std::complex<double>, SuiteSparse_long)\n{ umfpack_zl_report_info(control, info);}\n\n// Report status\ninline void umfpack_report_status(double control[UMFPACK_CONTROL], int status, double, int)\n{ umfpack_di_report_status(control, status);}\n\ninline void umfpack_report_status(double control[UMFPACK_CONTROL], int status, std::complex<double>, int)\n{ umfpack_zi_report_status(control, status);}\n\ninline void umfpack_report_status(double control[UMFPACK_CONTROL], int status, double, SuiteSparse_long)\n{ umfpack_dl_report_status(control, status);}\n\ninline void umfpack_report_status(double control[UMFPACK_CONTROL], int status, std::complex<double>, SuiteSparse_long)\n{ umfpack_zl_report_status(control, status);}\n\n// report control\ninline void umfpack_report_control(double control[UMFPACK_CONTROL], double, int)\n{ umfpack_di_report_control(control);}\n\ninline void umfpack_report_control(double control[UMFPACK_CONTROL], std::complex<double>, int)\n{ umfpack_zi_report_control(control);}\n\ninline void umfpack_report_control(double control[UMFPACK_CONTROL], double, SuiteSparse_long)\n{ umfpack_dl_report_control(control);}\n\ninline void umfpack_report_control(double control[UMFPACK_CONTROL], std::complex<double>, SuiteSparse_long)\n{ umfpack_zl_report_control(control);}\n\n// Free numeric\ninline void umfpack_free_numeric(void **Numeric, double, int)\n{ umfpack_di_free_numeric(Numeric); *Numeric = 0; }\n\ninline void umfpack_free_numeric(void **Numeric, std::complex<double>, int)\n{ umfpack_zi_free_numeric(Numeric); *Numeric = 0; }\n\ninline void umfpack_free_numeric(void **Numeric, double, SuiteSparse_long)\n{ umfpack_dl_free_numeric(Numeric); *Numeric = 0; }\n\ninline void umfpack_free_numeric(void **Numeric, std::complex<double>, SuiteSparse_long)\n{ umfpack_zl_free_numeric(Numeric); *Numeric = 0; }\n\n// Free symbolic\ninline void umfpack_free_symbolic(void **Symbolic, double, int)\n{ umfpack_di_free_symbolic(Symbolic); *Symbolic = 0; }\n\ninline void umfpack_free_symbolic(void **Symbolic, std::complex<double>, int)\n{ umfpack_zi_free_symbolic(Symbolic); *Symbolic = 0; }\n\ninline void umfpack_free_symbolic(void **Symbolic, double, SuiteSparse_long)\n{ umfpack_dl_free_symbolic(Symbolic); *Symbolic = 0; }\n\ninline void umfpack_free_symbolic(void **Symbolic, std::complex<double>, SuiteSparse_long)\n{ umfpack_zl_free_symbolic(Symbolic); *Symbolic = 0; }\n\n// Symbolic\ninline int umfpack_symbolic(int n_row,int n_col,\n                            const int Ap[], const int Ai[], const double Ax[], void **Symbolic,\n                            const double Control [UMFPACK_CONTROL], double Info [UMFPACK_INFO])\n{\n  return umfpack_di_symbolic(n_row,n_col,Ap,Ai,Ax,Symbolic,Control,Info);\n}\n\ninline int umfpack_symbolic(int n_row,int n_col,\n                            const int Ap[], const int Ai[], const std::complex<double> Ax[], void **Symbolic,\n                            const double Control [UMFPACK_CONTROL], double Info [UMFPACK_INFO])\n{\n  return umfpack_zi_symbolic(n_row,n_col,Ap,Ai,&numext::real_ref(Ax[0]),0,Symbolic,Control,Info);\n}\ninline SuiteSparse_long umfpack_symbolic( SuiteSparse_long n_row,SuiteSparse_long n_col,\n                                          const SuiteSparse_long Ap[], const SuiteSparse_long Ai[], const double Ax[], void **Symbolic,\n                                          const double Control [UMFPACK_CONTROL], double Info [UMFPACK_INFO])\n{\n  return umfpack_dl_symbolic(n_row,n_col,Ap,Ai,Ax,Symbolic,Control,Info);\n}\n\ninline SuiteSparse_long umfpack_symbolic( SuiteSparse_long n_row,SuiteSparse_long n_col,\n                                          const SuiteSparse_long Ap[], const SuiteSparse_long Ai[], const std::complex<double> Ax[], void **Symbolic,\n                                          const double Control [UMFPACK_CONTROL], double Info [UMFPACK_INFO])\n{\n  return umfpack_zl_symbolic(n_row,n_col,Ap,Ai,&numext::real_ref(Ax[0]),0,Symbolic,Control,Info);\n}\n\n// Numeric\ninline int umfpack_numeric( const int Ap[], const int Ai[], const double Ax[],\n                            void *Symbolic, void **Numeric,\n                            const double Control[UMFPACK_CONTROL],double Info [UMFPACK_INFO])\n{\n  return umfpack_di_numeric(Ap,Ai,Ax,Symbolic,Numeric,Control,Info);\n}\n\ninline int umfpack_numeric( const int Ap[], const int Ai[], const std::complex<double> Ax[],\n                            void *Symbolic, void **Numeric,\n                            const double Control[UMFPACK_CONTROL],double Info [UMFPACK_INFO])\n{\n  return umfpack_zi_numeric(Ap,Ai,&numext::real_ref(Ax[0]),0,Symbolic,Numeric,Control,Info);\n}\ninline SuiteSparse_long umfpack_numeric(const SuiteSparse_long Ap[], const SuiteSparse_long Ai[], const double Ax[],\n                                        void *Symbolic, void **Numeric,\n                                        const double Control[UMFPACK_CONTROL],double Info [UMFPACK_INFO])\n{\n  return umfpack_dl_numeric(Ap,Ai,Ax,Symbolic,Numeric,Control,Info);\n}\n\ninline SuiteSparse_long umfpack_numeric(const SuiteSparse_long Ap[], const SuiteSparse_long Ai[], const std::complex<double> Ax[],\n                                        void *Symbolic, void **Numeric,\n                                        const double Control[UMFPACK_CONTROL],double Info [UMFPACK_INFO])\n{\n  return umfpack_zl_numeric(Ap,Ai,&numext::real_ref(Ax[0]),0,Symbolic,Numeric,Control,Info);\n}\n\n// solve\ninline int umfpack_solve( int sys, const int Ap[], const int Ai[], const double Ax[],\n                          double X[], const double B[], void *Numeric,\n                          const double Control[UMFPACK_CONTROL], double Info[UMFPACK_INFO])\n{\n  return umfpack_di_solve(sys,Ap,Ai,Ax,X,B,Numeric,Control,Info);\n}\n\ninline int umfpack_solve( int sys, const int Ap[], const int Ai[], const std::complex<double> Ax[],\n                          std::complex<double> X[], const std::complex<double> B[], void *Numeric,\n                          const double Control[UMFPACK_CONTROL], double Info[UMFPACK_INFO])\n{\n  return umfpack_zi_solve(sys,Ap,Ai,&numext::real_ref(Ax[0]),0,&numext::real_ref(X[0]),0,&numext::real_ref(B[0]),0,Numeric,Control,Info);\n}\n\ninline SuiteSparse_long umfpack_solve(int sys, const SuiteSparse_long Ap[], const SuiteSparse_long Ai[], const double Ax[],\n                                      double X[], const double B[], void *Numeric,\n                                      const double Control[UMFPACK_CONTROL], double Info[UMFPACK_INFO])\n{\n  return umfpack_dl_solve(sys,Ap,Ai,Ax,X,B,Numeric,Control,Info);\n}\n\ninline SuiteSparse_long umfpack_solve(int sys, const SuiteSparse_long Ap[], const SuiteSparse_long Ai[], const std::complex<double> Ax[],\n                                      std::complex<double> X[], const std::complex<double> B[], void *Numeric,\n                                      const double Control[UMFPACK_CONTROL], double Info[UMFPACK_INFO])\n{\n  return umfpack_zl_solve(sys,Ap,Ai,&numext::real_ref(Ax[0]),0,&numext::real_ref(X[0]),0,&numext::real_ref(B[0]),0,Numeric,Control,Info);\n}\n\n// Get Lunz\ninline int umfpack_get_lunz(int *lnz, int *unz, int *n_row, int *n_col, int *nz_udiag, void *Numeric, double)\n{\n  return umfpack_di_get_lunz(lnz,unz,n_row,n_col,nz_udiag,Numeric);\n}\n\ninline int umfpack_get_lunz(int *lnz, int *unz, int *n_row, int *n_col, int *nz_udiag, void *Numeric, std::complex<double>)\n{\n  return umfpack_zi_get_lunz(lnz,unz,n_row,n_col,nz_udiag,Numeric);\n}\n\ninline SuiteSparse_long umfpack_get_lunz( SuiteSparse_long *lnz, SuiteSparse_long *unz, SuiteSparse_long *n_row, SuiteSparse_long *n_col,\n                                          SuiteSparse_long *nz_udiag, void *Numeric, double)\n{\n  return umfpack_dl_get_lunz(lnz,unz,n_row,n_col,nz_udiag,Numeric);\n}\n\ninline SuiteSparse_long umfpack_get_lunz( SuiteSparse_long *lnz, SuiteSparse_long *unz, SuiteSparse_long *n_row, SuiteSparse_long *n_col,\n                                          SuiteSparse_long *nz_udiag, void *Numeric, std::complex<double>)\n{\n  return umfpack_zl_get_lunz(lnz,unz,n_row,n_col,nz_udiag,Numeric);\n}\n\n// Get Numeric\ninline int umfpack_get_numeric(int Lp[], int Lj[], double Lx[], int Up[], int Ui[], double Ux[],\n                               int P[], int Q[], double Dx[], int *do_recip, double Rs[], void *Numeric)\n{\n  return umfpack_di_get_numeric(Lp,Lj,Lx,Up,Ui,Ux,P,Q,Dx,do_recip,Rs,Numeric);\n}\n\ninline int umfpack_get_numeric(int Lp[], int Lj[], std::complex<double> Lx[], int Up[], int Ui[], std::complex<double> Ux[],\n                               int P[], int Q[], std::complex<double> Dx[], int *do_recip, double Rs[], void *Numeric)\n{\n  double& lx0_real = numext::real_ref(Lx[0]);\n  double& ux0_real = numext::real_ref(Ux[0]);\n  double& dx0_real = numext::real_ref(Dx[0]);\n  return umfpack_zi_get_numeric(Lp,Lj,Lx?&lx0_real:0,0,Up,Ui,Ux?&ux0_real:0,0,P,Q,\n                                Dx?&dx0_real:0,0,do_recip,Rs,Numeric);\n}\ninline SuiteSparse_long umfpack_get_numeric(SuiteSparse_long Lp[], SuiteSparse_long Lj[], double Lx[], SuiteSparse_long Up[], SuiteSparse_long Ui[], double Ux[],\n                                            SuiteSparse_long P[], SuiteSparse_long Q[], double Dx[], SuiteSparse_long *do_recip, double Rs[], void *Numeric)\n{\n  return umfpack_dl_get_numeric(Lp,Lj,Lx,Up,Ui,Ux,P,Q,Dx,do_recip,Rs,Numeric);\n}\n\ninline SuiteSparse_long umfpack_get_numeric(SuiteSparse_long Lp[], SuiteSparse_long Lj[], std::complex<double> Lx[], SuiteSparse_long Up[], SuiteSparse_long Ui[], std::complex<double> Ux[],\n                                            SuiteSparse_long P[], SuiteSparse_long Q[], std::complex<double> Dx[], SuiteSparse_long *do_recip, double Rs[], void *Numeric)\n{\n  double& lx0_real = numext::real_ref(Lx[0]);\n  double& ux0_real = numext::real_ref(Ux[0]);\n  double& dx0_real = numext::real_ref(Dx[0]);\n  return umfpack_zl_get_numeric(Lp,Lj,Lx?&lx0_real:0,0,Up,Ui,Ux?&ux0_real:0,0,P,Q,\n                                Dx?&dx0_real:0,0,do_recip,Rs,Numeric);\n}\n\n// Get Determinant\ninline int umfpack_get_determinant(double *Mx, double *Ex, void *NumericHandle, double User_Info [UMFPACK_INFO], int)\n{\n  return umfpack_di_get_determinant(Mx,Ex,NumericHandle,User_Info);\n}\n\ninline int umfpack_get_determinant(std::complex<double> *Mx, double *Ex, void *NumericHandle, double User_Info [UMFPACK_INFO], int)\n{\n  double& mx_real = numext::real_ref(*Mx);\n  return umfpack_zi_get_determinant(&mx_real,0,Ex,NumericHandle,User_Info);\n}\n\ninline SuiteSparse_long umfpack_get_determinant(double *Mx, double *Ex, void *NumericHandle, double User_Info [UMFPACK_INFO], SuiteSparse_long)\n{\n  return umfpack_dl_get_determinant(Mx,Ex,NumericHandle,User_Info);\n}\n\ninline SuiteSparse_long umfpack_get_determinant(std::complex<double> *Mx, double *Ex, void *NumericHandle, double User_Info [UMFPACK_INFO], SuiteSparse_long)\n{\n  double& mx_real = numext::real_ref(*Mx);\n  return umfpack_zl_get_determinant(&mx_real,0,Ex,NumericHandle,User_Info);\n}\n\n\n/** \\ingroup UmfPackSupport_Module\n  * \\brief A sparse LU factorization and solver based on UmfPack\n  *\n  * This class allows to solve for A.X = B sparse linear problems via a LU factorization\n  * using the UmfPack library. The sparse matrix A must be squared and full rank.\n  * The vectors or matrices X and B can be either dense or sparse.\n  *\n  * \\warning The input matrix A should be in a \\b compressed and \\b column-major form.\n  * Otherwise an expensive copy will be made. You can call the inexpensive makeCompressed() to get a compressed matrix.\n  * \\tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<>\n  *\n  * \\implsparsesolverconcept\n  *\n  * \\sa \\ref TutorialSparseSolverConcept, class SparseLU\n  */\ntemplate<typename _MatrixType>\nclass UmfPackLU : public SparseSolverBase<UmfPackLU<_MatrixType> >\n{\n  protected:\n    typedef SparseSolverBase<UmfPackLU<_MatrixType> > Base;\n    using Base::m_isInitialized;\n  public:\n    using Base::_solve_impl;\n    typedef _MatrixType MatrixType;\n    typedef typename MatrixType::Scalar Scalar;\n    typedef typename MatrixType::RealScalar RealScalar;\n    typedef typename MatrixType::StorageIndex StorageIndex;\n    typedef Matrix<Scalar,Dynamic,1> Vector;\n    typedef Matrix<int, 1, MatrixType::ColsAtCompileTime> IntRowVectorType;\n    typedef Matrix<int, MatrixType::RowsAtCompileTime, 1> IntColVectorType;\n    typedef SparseMatrix<Scalar> LUMatrixType;\n    typedef SparseMatrix<Scalar,ColMajor,StorageIndex> UmfpackMatrixType;\n    typedef Ref<const UmfpackMatrixType, StandardCompressedFormat> UmfpackMatrixRef;\n    enum {\n      ColsAtCompileTime = MatrixType::ColsAtCompileTime,\n      MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime\n    };\n\n  public:\n\n    typedef Array<double, UMFPACK_CONTROL, 1> UmfpackControl;\n    typedef Array<double, UMFPACK_INFO, 1> UmfpackInfo;\n\n    UmfPackLU()\n      : m_dummy(0,0), mp_matrix(m_dummy)\n    {\n      init();\n    }\n\n    template<typename InputMatrixType>\n    explicit UmfPackLU(const InputMatrixType& matrix)\n      : mp_matrix(matrix)\n    {\n      init();\n      compute(matrix);\n    }\n\n    ~UmfPackLU()\n    {\n      if(m_symbolic) umfpack_free_symbolic(&m_symbolic,Scalar(), StorageIndex());\n      if(m_numeric)  umfpack_free_numeric(&m_numeric,Scalar(), StorageIndex());\n    }\n\n    inline Index rows() const { return mp_matrix.rows(); }\n    inline Index cols() const { return mp_matrix.cols(); }\n\n    /** \\brief Reports whether previous computation was successful.\n      *\n      * \\returns \\c Success if computation was successful,\n      *          \\c NumericalIssue if the matrix.appears to be negative.\n      */\n    ComputationInfo info() const\n    {\n      eigen_assert(m_isInitialized && \"Decomposition is not initialized.\");\n      return m_info;\n    }\n\n    inline const LUMatrixType& matrixL() const\n    {\n      if (m_extractedDataAreDirty) extractData();\n      return m_l;\n    }\n\n    inline const LUMatrixType& matrixU() const\n    {\n      if (m_extractedDataAreDirty) extractData();\n      return m_u;\n    }\n\n    inline const IntColVectorType& permutationP() const\n    {\n      if (m_extractedDataAreDirty) extractData();\n      return m_p;\n    }\n\n    inline const IntRowVectorType& permutationQ() const\n    {\n      if (m_extractedDataAreDirty) extractData();\n      return m_q;\n    }\n\n    /** Computes the sparse Cholesky decomposition of \\a matrix\n     *  Note that the matrix should be column-major, and in compressed format for best performance.\n     *  \\sa SparseMatrix::makeCompressed().\n     */\n    template<typename InputMatrixType>\n    void compute(const InputMatrixType& matrix)\n    {\n      if(m_symbolic) umfpack_free_symbolic(&m_symbolic,Scalar(),StorageIndex());\n      if(m_numeric)  umfpack_free_numeric(&m_numeric,Scalar(),StorageIndex());\n      grab(matrix.derived());\n      analyzePattern_impl();\n      factorize_impl();\n    }\n\n    /** Performs a symbolic decomposition on the sparcity of \\a matrix.\n      *\n      * This function is particularly useful when solving for several problems having the same structure.\n      *\n      * \\sa factorize(), compute()\n      */\n    template<typename InputMatrixType>\n    void analyzePattern(const InputMatrixType& matrix)\n    {\n      if(m_symbolic) umfpack_free_symbolic(&m_symbolic,Scalar(),StorageIndex());\n      if(m_numeric)  umfpack_free_numeric(&m_numeric,Scalar(),StorageIndex());\n\n      grab(matrix.derived());\n\n      analyzePattern_impl();\n    }\n\n    /** Provides the return status code returned by UmfPack during the numeric\n      * factorization.\n      *\n      * \\sa factorize(), compute()\n      */\n    inline int umfpackFactorizeReturncode() const\n    {\n      eigen_assert(m_numeric && \"UmfPackLU: you must first call factorize()\");\n      return m_fact_errorCode;\n    }\n\n    /** Provides access to the control settings array used by UmfPack.\n      *\n      * If this array contains NaN's, the default values are used.\n      *\n      * See UMFPACK documentation for details.\n      */\n    inline const UmfpackControl& umfpackControl() const\n    {\n      return m_control;\n    }\n\n    /** Provides access to the control settings array used by UmfPack.\n      *\n      * If this array contains NaN's, the default values are used.\n      *\n      * See UMFPACK documentation for details.\n      */\n    inline UmfpackControl& umfpackControl()\n    {\n      return m_control;\n    }\n\n    /** Performs a numeric decomposition of \\a matrix\n      *\n      * The given matrix must has the same sparcity than the matrix on which the pattern anylysis has been performed.\n      *\n      * \\sa analyzePattern(), compute()\n      */\n    template<typename InputMatrixType>\n    void factorize(const InputMatrixType& matrix)\n    {\n      eigen_assert(m_analysisIsOk && \"UmfPackLU: you must first call analyzePattern()\");\n      if(m_numeric)\n        umfpack_free_numeric(&m_numeric,Scalar(),StorageIndex());\n\n      grab(matrix.derived());\n\n      factorize_impl();\n    }\n\n    /** Prints the current UmfPack control settings.\n      *\n      * \\sa umfpackControl()\n      */\n    void printUmfpackControl()\n    {\n      umfpack_report_control(m_control.data(), Scalar(),StorageIndex());\n    }\n\n    /** Prints statistics collected by UmfPack.\n      *\n      * \\sa analyzePattern(), compute()\n      */\n    void printUmfpackInfo()\n    {\n      eigen_assert(m_analysisIsOk && \"UmfPackLU: you must first call analyzePattern()\");\n      umfpack_report_info(m_control.data(), m_umfpackInfo.data(), Scalar(),StorageIndex());\n    }\n\n    /** Prints the status of the previous factorization operation performed by UmfPack (symbolic or numerical factorization).\n      *\n      * \\sa analyzePattern(), compute()\n      */\n    void printUmfpackStatus() {\n      eigen_assert(m_analysisIsOk && \"UmfPackLU: you must first call analyzePattern()\");\n      umfpack_report_status(m_control.data(), m_fact_errorCode, Scalar(),StorageIndex());\n    }\n\n    /** \\internal */\n    template<typename BDerived,typename XDerived>\n    bool _solve_impl(const MatrixBase<BDerived> &b, MatrixBase<XDerived> &x) const;\n\n    Scalar determinant() const;\n\n    void extractData() const;\n\n  protected:\n\n    void init()\n    {\n      m_info                  = InvalidInput;\n      m_isInitialized         = false;\n      m_numeric               = 0;\n      m_symbolic              = 0;\n      m_extractedDataAreDirty = true;\n\n      umfpack_defaults(m_control.data(), Scalar(),StorageIndex());\n    }\n\n    void analyzePattern_impl()\n    {\n      m_fact_errorCode = umfpack_symbolic(internal::convert_index<StorageIndex>(mp_matrix.rows()),\n                                          internal::convert_index<StorageIndex>(mp_matrix.cols()),\n                                          mp_matrix.outerIndexPtr(), mp_matrix.innerIndexPtr(), mp_matrix.valuePtr(),\n                                          &m_symbolic, m_control.data(), m_umfpackInfo.data());\n\n      m_isInitialized = true;\n      m_info = m_fact_errorCode ? InvalidInput : Success;\n      m_analysisIsOk = true;\n      m_factorizationIsOk = false;\n      m_extractedDataAreDirty = true;\n    }\n\n    void factorize_impl()\n    {\n\n      m_fact_errorCode = umfpack_numeric(mp_matrix.outerIndexPtr(), mp_matrix.innerIndexPtr(), mp_matrix.valuePtr(),\n                                         m_symbolic, &m_numeric, m_control.data(), m_umfpackInfo.data());\n\n      m_info = m_fact_errorCode == UMFPACK_OK ? Success : NumericalIssue;\n      m_factorizationIsOk = true;\n      m_extractedDataAreDirty = true;\n    }\n\n    template<typename MatrixDerived>\n    void grab(const EigenBase<MatrixDerived> &A)\n    {\n      mp_matrix.~UmfpackMatrixRef();\n      ::new (&mp_matrix) UmfpackMatrixRef(A.derived());\n    }\n\n    void grab(const UmfpackMatrixRef &A)\n    {\n      if(&(A.derived()) != &mp_matrix)\n      {\n        mp_matrix.~UmfpackMatrixRef();\n        ::new (&mp_matrix) UmfpackMatrixRef(A);\n      }\n    }\n\n    // cached data to reduce reallocation, etc.\n    mutable LUMatrixType m_l;\n    StorageIndex m_fact_errorCode;\n    UmfpackControl m_control;\n    mutable UmfpackInfo m_umfpackInfo;\n\n    mutable LUMatrixType m_u;\n    mutable IntColVectorType m_p;\n    mutable IntRowVectorType m_q;\n\n    UmfpackMatrixType m_dummy;\n    UmfpackMatrixRef mp_matrix;\n\n    void* m_numeric;\n    void* m_symbolic;\n\n    mutable ComputationInfo m_info;\n    int m_factorizationIsOk;\n    int m_analysisIsOk;\n    mutable bool m_extractedDataAreDirty;\n\n  private:\n    UmfPackLU(const UmfPackLU& ) { }\n};\n\n\ntemplate<typename MatrixType>\nvoid UmfPackLU<MatrixType>::extractData() const\n{\n  if (m_extractedDataAreDirty)\n  {\n    // get size of the data\n    StorageIndex lnz, unz, rows, cols, nz_udiag;\n    umfpack_get_lunz(&lnz, &unz, &rows, &cols, &nz_udiag, m_numeric, Scalar());\n\n    // allocate data\n    m_l.resize(rows,(std::min)(rows,cols));\n    m_l.resizeNonZeros(lnz);\n\n    m_u.resize((std::min)(rows,cols),cols);\n    m_u.resizeNonZeros(unz);\n\n    m_p.resize(rows);\n    m_q.resize(cols);\n\n    // extract\n    umfpack_get_numeric(m_l.outerIndexPtr(), m_l.innerIndexPtr(), m_l.valuePtr(),\n                        m_u.outerIndexPtr(), m_u.innerIndexPtr(), m_u.valuePtr(),\n                        m_p.data(), m_q.data(), 0, 0, 0, m_numeric);\n\n    m_extractedDataAreDirty = false;\n  }\n}\n\ntemplate<typename MatrixType>\ntypename UmfPackLU<MatrixType>::Scalar UmfPackLU<MatrixType>::determinant() const\n{\n  Scalar det;\n  umfpack_get_determinant(&det, 0, m_numeric, 0, StorageIndex());\n  return det;\n}\n\ntemplate<typename MatrixType>\ntemplate<typename BDerived,typename XDerived>\nbool UmfPackLU<MatrixType>::_solve_impl(const MatrixBase<BDerived> &b, MatrixBase<XDerived> &x) const\n{\n  Index rhsCols = b.cols();\n  eigen_assert((BDerived::Flags&RowMajorBit)==0 && \"UmfPackLU backend does not support non col-major rhs yet\");\n  eigen_assert((XDerived::Flags&RowMajorBit)==0 && \"UmfPackLU backend does not support non col-major result yet\");\n  eigen_assert(b.derived().data() != x.derived().data() && \" Umfpack does not support inplace solve\");\n\n  Scalar* x_ptr = 0;\n  Matrix<Scalar,Dynamic,1> x_tmp;\n  if(x.innerStride()!=1)\n  {\n    x_tmp.resize(x.rows());\n    x_ptr = x_tmp.data();\n  }\n  for (int j=0; j<rhsCols; ++j)\n  {\n    if(x.innerStride()==1)\n      x_ptr = &x.col(j).coeffRef(0);\n    StorageIndex errorCode = umfpack_solve(UMFPACK_A,\n                                mp_matrix.outerIndexPtr(), mp_matrix.innerIndexPtr(), mp_matrix.valuePtr(),\n                                x_ptr, &b.const_cast_derived().col(j).coeffRef(0),\n                                m_numeric, m_control.data(), m_umfpackInfo.data());\n    if(x.innerStride()!=1)\n      x.col(j) = x_tmp;\n    if (errorCode!=0)\n      return false;\n  }\n\n  return true;\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_UMFPACKSUPPORT_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/misc/Image.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_MISC_IMAGE_H\n#define EIGEN_MISC_IMAGE_H\n\nnamespace Eigen { \n\nnamespace internal {\n\n/** \\class image_retval_base\n  *\n  */\ntemplate<typename DecompositionType>\nstruct traits<image_retval_base<DecompositionType> >\n{\n  typedef typename DecompositionType::MatrixType MatrixType;\n  typedef Matrix<\n    typename MatrixType::Scalar,\n    MatrixType::RowsAtCompileTime, // the image is a subspace of the destination space, whose\n                                   // dimension is the number of rows of the original matrix\n    Dynamic,                       // we don't know at compile time the dimension of the image (the rank)\n    MatrixType::Options,\n    MatrixType::MaxRowsAtCompileTime, // the image matrix will consist of columns from the original matrix,\n    MatrixType::MaxColsAtCompileTime  // so it has the same number of rows and at most as many columns.\n  > ReturnType;\n};\n\ntemplate<typename _DecompositionType> struct image_retval_base\n : public ReturnByValue<image_retval_base<_DecompositionType> >\n{\n  typedef _DecompositionType DecompositionType;\n  typedef typename DecompositionType::MatrixType MatrixType;\n  typedef ReturnByValue<image_retval_base> Base;\n\n  image_retval_base(const DecompositionType& dec, const MatrixType& originalMatrix)\n    : m_dec(dec), m_rank(dec.rank()),\n      m_cols(m_rank == 0 ? 1 : m_rank),\n      m_originalMatrix(originalMatrix)\n  {}\n\n  inline Index rows() const { return m_dec.rows(); }\n  inline Index cols() const { return m_cols; }\n  inline Index rank() const { return m_rank; }\n  inline const DecompositionType& dec() const { return m_dec; }\n  inline const MatrixType& originalMatrix() const { return m_originalMatrix; }\n\n  template<typename Dest> inline void evalTo(Dest& dst) const\n  {\n    static_cast<const image_retval<DecompositionType>*>(this)->evalTo(dst);\n  }\n\n  protected:\n    const DecompositionType& m_dec;\n    Index m_rank, m_cols;\n    const MatrixType& m_originalMatrix;\n};\n\n} // end namespace internal\n\n#define EIGEN_MAKE_IMAGE_HELPERS(DecompositionType) \\\n  typedef typename DecompositionType::MatrixType MatrixType; \\\n  typedef typename MatrixType::Scalar Scalar; \\\n  typedef typename MatrixType::RealScalar RealScalar; \\\n  typedef Eigen::internal::image_retval_base<DecompositionType> Base; \\\n  using Base::dec; \\\n  using Base::originalMatrix; \\\n  using Base::rank; \\\n  using Base::rows; \\\n  using Base::cols; \\\n  image_retval(const DecompositionType& dec, const MatrixType& originalMatrix) \\\n    : Base(dec, originalMatrix) {}\n\n} // end namespace Eigen\n\n#endif // EIGEN_MISC_IMAGE_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/misc/Kernel.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_MISC_KERNEL_H\n#define EIGEN_MISC_KERNEL_H\n\nnamespace Eigen { \n\nnamespace internal {\n\n/** \\class kernel_retval_base\n  *\n  */\ntemplate<typename DecompositionType>\nstruct traits<kernel_retval_base<DecompositionType> >\n{\n  typedef typename DecompositionType::MatrixType MatrixType;\n  typedef Matrix<\n    typename MatrixType::Scalar,\n    MatrixType::ColsAtCompileTime, // the number of rows in the \"kernel matrix\"\n                                   // is the number of cols of the original matrix\n                                   // so that the product \"matrix * kernel = zero\" makes sense\n    Dynamic,                       // we don't know at compile-time the dimension of the kernel\n    MatrixType::Options,\n    MatrixType::MaxColsAtCompileTime, // see explanation for 2nd template parameter\n    MatrixType::MaxColsAtCompileTime // the kernel is a subspace of the domain space,\n                                     // whose dimension is the number of columns of the original matrix\n  > ReturnType;\n};\n\ntemplate<typename _DecompositionType> struct kernel_retval_base\n : public ReturnByValue<kernel_retval_base<_DecompositionType> >\n{\n  typedef _DecompositionType DecompositionType;\n  typedef ReturnByValue<kernel_retval_base> Base;\n\n  explicit kernel_retval_base(const DecompositionType& dec)\n    : m_dec(dec),\n      m_rank(dec.rank()),\n      m_cols(m_rank==dec.cols() ? 1 : dec.cols() - m_rank)\n  {}\n\n  inline Index rows() const { return m_dec.cols(); }\n  inline Index cols() const { return m_cols; }\n  inline Index rank() const { return m_rank; }\n  inline const DecompositionType& dec() const { return m_dec; }\n\n  template<typename Dest> inline void evalTo(Dest& dst) const\n  {\n    static_cast<const kernel_retval<DecompositionType>*>(this)->evalTo(dst);\n  }\n\n  protected:\n    const DecompositionType& m_dec;\n    Index m_rank, m_cols;\n};\n\n} // end namespace internal\n\n#define EIGEN_MAKE_KERNEL_HELPERS(DecompositionType) \\\n  typedef typename DecompositionType::MatrixType MatrixType; \\\n  typedef typename MatrixType::Scalar Scalar; \\\n  typedef typename MatrixType::RealScalar RealScalar; \\\n  typedef Eigen::internal::kernel_retval_base<DecompositionType> Base; \\\n  using Base::dec; \\\n  using Base::rank; \\\n  using Base::rows; \\\n  using Base::cols; \\\n  kernel_retval(const DecompositionType& dec) : Base(dec) {}\n\n} // end namespace Eigen\n\n#endif // EIGEN_MISC_KERNEL_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/misc/RealSvd2x2.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009-2010 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2013-2016 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_REALSVD2X2_H\n#define EIGEN_REALSVD2X2_H\n\nnamespace Eigen {\n\nnamespace internal {\n\ntemplate<typename MatrixType, typename RealScalar, typename Index>\nvoid real_2x2_jacobi_svd(const MatrixType& matrix, Index p, Index q,\n                         JacobiRotation<RealScalar> *j_left,\n                         JacobiRotation<RealScalar> *j_right)\n{\n  using std::sqrt;\n  using std::abs;\n  Matrix<RealScalar,2,2> m;\n  m << numext::real(matrix.coeff(p,p)), numext::real(matrix.coeff(p,q)),\n       numext::real(matrix.coeff(q,p)), numext::real(matrix.coeff(q,q));\n  JacobiRotation<RealScalar> rot1;\n  RealScalar t = m.coeff(0,0) + m.coeff(1,1);\n  RealScalar d = m.coeff(1,0) - m.coeff(0,1);\n\n  if(abs(d) < (std::numeric_limits<RealScalar>::min)())\n  {\n    rot1.s() = RealScalar(0);\n    rot1.c() = RealScalar(1);\n  }\n  else\n  {\n    // If d!=0, then t/d cannot overflow because the magnitude of the\n    // entries forming d are not too small compared to the ones forming t.\n    RealScalar u = t / d;\n    RealScalar tmp = sqrt(RealScalar(1) + numext::abs2(u));\n    rot1.s() = RealScalar(1) / tmp;\n    rot1.c() = u / tmp;\n  }\n  m.applyOnTheLeft(0,1,rot1);\n  j_right->makeJacobi(m,0,1);\n  *j_left = rot1 * j_right->transpose();\n}\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_REALSVD2X2_H\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/misc/blas.h",
    "content": "#ifndef BLAS_H\n#define BLAS_H\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif\n\n#define BLASFUNC(FUNC) FUNC##_\n\n#ifdef __WIN64__\ntypedef long long BLASLONG;\ntypedef unsigned long long BLASULONG;\n#else\ntypedef long BLASLONG;\ntypedef unsigned long BLASULONG;\n#endif\n\nint    BLASFUNC(xerbla)(const char *, int *info, int);\n\nfloat  BLASFUNC(sdot)  (int *, float  *, int *, float  *, int *);\nfloat  BLASFUNC(sdsdot)(int *, float  *,        float  *, int *, float  *, int *);\n\ndouble BLASFUNC(dsdot) (int *, float  *, int *, float  *, int *);\ndouble BLASFUNC(ddot)  (int *, double *, int *, double *, int *);\ndouble BLASFUNC(qdot)  (int *, double *, int *, double *, int *);\n\nint  BLASFUNC(cdotuw)  (int *, float  *, int *, float  *, int *, float*);\nint  BLASFUNC(cdotcw)  (int *, float  *, int *, float  *, int *, float*);\nint  BLASFUNC(zdotuw)  (int *, double  *, int *, double  *, int *, double*);\nint  BLASFUNC(zdotcw)  (int *, double  *, int *, double  *, int *, double*);\n\nint    BLASFUNC(saxpy) (const int *, const float  *, const float  *, const int *, float  *, const int *);\nint    BLASFUNC(daxpy) (const int *, const double *, const double *, const int *, double *, const int *);\nint    BLASFUNC(qaxpy) (const int *, const double *, const double *, const int *, double *, const int *);\nint    BLASFUNC(caxpy) (const int *, const float  *, const float  *, const int *, float  *, const int *);\nint    BLASFUNC(zaxpy) (const int *, const double *, const double *, const int *, double *, const int *);\nint    BLASFUNC(xaxpy) (const int *, const double *, const double *, const int *, double *, const int *);\nint    BLASFUNC(caxpyc)(const int *, const float  *, const float  *, const int *, float  *, const int *);\nint    BLASFUNC(zaxpyc)(const int *, const double *, const double *, const int *, double *, const int *);\nint    BLASFUNC(xaxpyc)(const int *, const double *, const double *, const int *, double *, const int *);\n\nint    BLASFUNC(scopy) (int *, float  *, int *, float  *, int *);\nint    BLASFUNC(dcopy) (int *, double *, int *, double *, int *);\nint    BLASFUNC(qcopy) (int *, double *, int *, double *, int *);\nint    BLASFUNC(ccopy) (int *, float  *, int *, float  *, int *);\nint    BLASFUNC(zcopy) (int *, double *, int *, double *, int *);\nint    BLASFUNC(xcopy) (int *, double *, int *, double *, int *);\n\nint    BLASFUNC(sswap) (int *, float  *, int *, float  *, int *);\nint    BLASFUNC(dswap) (int *, double *, int *, double *, int *);\nint    BLASFUNC(qswap) (int *, double *, int *, double *, int *);\nint    BLASFUNC(cswap) (int *, float  *, int *, float  *, int *);\nint    BLASFUNC(zswap) (int *, double *, int *, double *, int *);\nint    BLASFUNC(xswap) (int *, double *, int *, double *, int *);\n\nfloat  BLASFUNC(sasum) (int *, float  *, int *);\nfloat  BLASFUNC(scasum)(int *, float  *, int *);\ndouble BLASFUNC(dasum) (int *, double *, int *);\ndouble BLASFUNC(qasum) (int *, double *, int *);\ndouble BLASFUNC(dzasum)(int *, double *, int *);\ndouble BLASFUNC(qxasum)(int *, double *, int *);\n\nint    BLASFUNC(isamax)(int *, float  *, int *);\nint    BLASFUNC(idamax)(int *, double *, int *);\nint    BLASFUNC(iqamax)(int *, double *, int *);\nint    BLASFUNC(icamax)(int *, float  *, int *);\nint    BLASFUNC(izamax)(int *, double *, int *);\nint    BLASFUNC(ixamax)(int *, double *, int *);\n\nint    BLASFUNC(ismax) (int *, float  *, int *);\nint    BLASFUNC(idmax) (int *, double *, int *);\nint    BLASFUNC(iqmax) (int *, double *, int *);\nint    BLASFUNC(icmax) (int *, float  *, int *);\nint    BLASFUNC(izmax) (int *, double *, int *);\nint    BLASFUNC(ixmax) (int *, double *, int *);\n\nint    BLASFUNC(isamin)(int *, float  *, int *);\nint    BLASFUNC(idamin)(int *, double *, int *);\nint    BLASFUNC(iqamin)(int *, double *, int *);\nint    BLASFUNC(icamin)(int *, float  *, int *);\nint    BLASFUNC(izamin)(int *, double *, int *);\nint    BLASFUNC(ixamin)(int *, double *, int *);\n\nint    BLASFUNC(ismin)(int *, float  *, int *);\nint    BLASFUNC(idmin)(int *, double *, int *);\nint    BLASFUNC(iqmin)(int *, double *, int *);\nint    BLASFUNC(icmin)(int *, float  *, int *);\nint    BLASFUNC(izmin)(int *, double *, int *);\nint    BLASFUNC(ixmin)(int *, double *, int *);\n\nfloat  BLASFUNC(samax) (int *, float  *, int *);\ndouble BLASFUNC(damax) (int *, double *, int *);\ndouble BLASFUNC(qamax) (int *, double *, int *);\nfloat  BLASFUNC(scamax)(int *, float  *, int *);\ndouble BLASFUNC(dzamax)(int *, double *, int *);\ndouble BLASFUNC(qxamax)(int *, double *, int *);\n\nfloat  BLASFUNC(samin) (int *, float  *, int *);\ndouble BLASFUNC(damin) (int *, double *, int *);\ndouble BLASFUNC(qamin) (int *, double *, int *);\nfloat  BLASFUNC(scamin)(int *, float  *, int *);\ndouble BLASFUNC(dzamin)(int *, double *, int *);\ndouble BLASFUNC(qxamin)(int *, double *, int *);\n\nfloat  BLASFUNC(smax)  (int *, float  *, int *);\ndouble BLASFUNC(dmax)  (int *, double *, int *);\ndouble BLASFUNC(qmax)  (int *, double *, int *);\nfloat  BLASFUNC(scmax) (int *, float  *, int *);\ndouble BLASFUNC(dzmax) (int *, double *, int *);\ndouble BLASFUNC(qxmax) (int *, double *, int *);\n\nfloat  BLASFUNC(smin)  (int *, float  *, int *);\ndouble BLASFUNC(dmin)  (int *, double *, int *);\ndouble BLASFUNC(qmin)  (int *, double *, int *);\nfloat  BLASFUNC(scmin) (int *, float  *, int *);\ndouble BLASFUNC(dzmin) (int *, double *, int *);\ndouble BLASFUNC(qxmin) (int *, double *, int *);\n\nint    BLASFUNC(sscal) (int *,  float  *, float  *, int *);\nint    BLASFUNC(dscal) (int *,  double *, double *, int *);\nint    BLASFUNC(qscal) (int *,  double *, double *, int *);\nint    BLASFUNC(cscal) (int *,  float  *, float  *, int *);\nint    BLASFUNC(zscal) (int *,  double *, double *, int *);\nint    BLASFUNC(xscal) (int *,  double *, double *, int *);\nint    BLASFUNC(csscal)(int *,  float  *, float  *, int *);\nint    BLASFUNC(zdscal)(int *,  double *, double *, int *);\nint    BLASFUNC(xqscal)(int *,  double *, double *, int *);\n\nfloat  BLASFUNC(snrm2) (int *, float  *, int *);\nfloat  BLASFUNC(scnrm2)(int *, float  *, int *);\n\ndouble BLASFUNC(dnrm2) (int *, double *, int *);\ndouble BLASFUNC(qnrm2) (int *, double *, int *);\ndouble BLASFUNC(dznrm2)(int *, double *, int *);\ndouble BLASFUNC(qxnrm2)(int *, double *, int *);\n\nint    BLASFUNC(srot)  (int *, float  *, int *, float  *, int *, float  *, float  *);\nint    BLASFUNC(drot)  (int *, double *, int *, double *, int *, double *, double *);\nint    BLASFUNC(qrot)  (int *, double *, int *, double *, int *, double *, double *);\nint    BLASFUNC(csrot) (int *, float  *, int *, float  *, int *, float  *, float  *);\nint    BLASFUNC(zdrot) (int *, double *, int *, double *, int *, double *, double *);\nint    BLASFUNC(xqrot) (int *, double *, int *, double *, int *, double *, double *);\n\nint    BLASFUNC(srotg) (float  *, float  *, float  *, float  *);\nint    BLASFUNC(drotg) (double *, double *, double *, double *);\nint    BLASFUNC(qrotg) (double *, double *, double *, double *);\nint    BLASFUNC(crotg) (float  *, float  *, float  *, float  *);\nint    BLASFUNC(zrotg) (double *, double *, double *, double *);\nint    BLASFUNC(xrotg) (double *, double *, double *, double *);\n\nint    BLASFUNC(srotmg)(float  *, float  *, float  *, float  *, float  *);\nint    BLASFUNC(drotmg)(double *, double *, double *, double *, double *);\n\nint    BLASFUNC(srotm) (int *, float  *, int *, float  *, int *, float  *);\nint    BLASFUNC(drotm) (int *, double *, int *, double *, int *, double *);\nint    BLASFUNC(qrotm) (int *, double *, int *, double *, int *, double *);\n\n/* Level 2 routines */\n\nint BLASFUNC(sger)(int *,    int *, float *,  float *, int *,\n\t\t   float *,  int *, float *,  int *);\nint BLASFUNC(dger)(int *,    int *, double *, double *, int *,\n\t\t   double *, int *, double *, int *);\nint BLASFUNC(qger)(int *,    int *, double *, double *, int *,\n\t\t   double *, int *, double *, int *);\nint BLASFUNC(cgeru)(int *,    int *, float *,  float *, int *,\n\t\t    float *,  int *, float *,  int *);\nint BLASFUNC(cgerc)(int *,    int *, float *,  float *, int *,\n\t\t    float *,  int *, float *,  int *);\nint BLASFUNC(zgeru)(int *,    int *, double *, double *, int *,\n\t\t    double *, int *, double *, int *);\nint BLASFUNC(zgerc)(int *,    int *, double *, double *, int *,\n\t\t    double *, int *, double *, int *);\nint BLASFUNC(xgeru)(int *,    int *, double *, double *, int *,\n\t\t    double *, int *, double *, int *);\nint BLASFUNC(xgerc)(int *,    int *, double *, double *, int *,\n\t\t    double *, int *, double *, int *);\n\nint BLASFUNC(sgemv)(const char *, const int *, const int *, const float  *, const float  *, const int *, const float  *, const int *, const float  *, float  *, const int *);\nint BLASFUNC(dgemv)(const char *, const int *, const int *, const double *, const double *, const int *, const double *, const int *, const double *, double *, const int *);\nint BLASFUNC(qgemv)(const char *, const int *, const int *, const double *, const double *, const int *, const double *, const int *, const double *, double *, const int *);\nint BLASFUNC(cgemv)(const char *, const int *, const int *, const float  *, const float  *, const int *, const float  *, const int *, const float  *, float  *, const int *);\nint BLASFUNC(zgemv)(const char *, const int *, const int *, const double *, const double *, const int *, const double *, const int *, const double *, double *, const int *);\nint BLASFUNC(xgemv)(const char *, const int *, const int *, const double *, const double *, const int *, const double *, const int *, const double *, double *, const int *);\n\nint BLASFUNC(strsv) (const char *, const char *, const char *, const int *, const float  *, const int *, float  *, const int *);\nint BLASFUNC(dtrsv) (const char *, const char *, const char *, const int *, const double *, const int *, double *, const int *);\nint BLASFUNC(qtrsv) (const char *, const char *, const char *, const int *, const double *, const int *, double *, const int *);\nint BLASFUNC(ctrsv) (const char *, const char *, const char *, const int *, const float  *, const int *, float  *, const int *);\nint BLASFUNC(ztrsv) (const char *, const char *, const char *, const int *, const double *, const int *, double *, const int *);\nint BLASFUNC(xtrsv) (const char *, const char *, const char *, const int *, const double *, const int *, double *, const int *);\n\nint BLASFUNC(stpsv) (char *, char *, char *, int *, float  *, float  *, int *);\nint BLASFUNC(dtpsv) (char *, char *, char *, int *, double *, double *, int *);\nint BLASFUNC(qtpsv) (char *, char *, char *, int *, double *, double *, int *);\nint BLASFUNC(ctpsv) (char *, char *, char *, int *, float  *, float  *, int *);\nint BLASFUNC(ztpsv) (char *, char *, char *, int *, double *, double *, int *);\nint BLASFUNC(xtpsv) (char *, char *, char *, int *, double *, double *, int *);\n\nint BLASFUNC(strmv) (const char *, const char *, const char *, const int *, const float  *, const int *, float  *, const int *);\nint BLASFUNC(dtrmv) (const char *, const char *, const char *, const int *, const double *, const int *, double *, const int *);\nint BLASFUNC(qtrmv) (const char *, const char *, const char *, const int *, const double *, const int *, double *, const int *);\nint BLASFUNC(ctrmv) (const char *, const char *, const char *, const int *, const float  *, const int *, float  *, const int *);\nint BLASFUNC(ztrmv) (const char *, const char *, const char *, const int *, const double *, const int *, double *, const int *);\nint BLASFUNC(xtrmv) (const char *, const char *, const char *, const int *, const double *, const int *, double *, const int *);\n\nint BLASFUNC(stpmv) (char *, char *, char *, int *, float  *, float  *, int *);\nint BLASFUNC(dtpmv) (char *, char *, char *, int *, double *, double *, int *);\nint BLASFUNC(qtpmv) (char *, char *, char *, int *, double *, double *, int *);\nint BLASFUNC(ctpmv) (char *, char *, char *, int *, float  *, float  *, int *);\nint BLASFUNC(ztpmv) (char *, char *, char *, int *, double *, double *, int *);\nint BLASFUNC(xtpmv) (char *, char *, char *, int *, double *, double *, int *);\n\nint BLASFUNC(stbmv) (char *, char *, char *, int *, int *, float  *, int *, float  *, int *);\nint BLASFUNC(dtbmv) (char *, char *, char *, int *, int *, double *, int *, double *, int *);\nint BLASFUNC(qtbmv) (char *, char *, char *, int *, int *, double *, int *, double *, int *);\nint BLASFUNC(ctbmv) (char *, char *, char *, int *, int *, float  *, int *, float  *, int *);\nint BLASFUNC(ztbmv) (char *, char *, char *, int *, int *, double *, int *, double *, int *);\nint BLASFUNC(xtbmv) (char *, char *, char *, int *, int *, double *, int *, double *, int *);\n\nint BLASFUNC(stbsv) (char *, char *, char *, int *, int *, float  *, int *, float  *, int *);\nint BLASFUNC(dtbsv) (char *, char *, char *, int *, int *, double *, int *, double *, int *);\nint BLASFUNC(qtbsv) (char *, char *, char *, int *, int *, double *, int *, double *, int *);\nint BLASFUNC(ctbsv) (char *, char *, char *, int *, int *, float  *, int *, float  *, int *);\nint BLASFUNC(ztbsv) (char *, char *, char *, int *, int *, double *, int *, double *, int *);\nint BLASFUNC(xtbsv) (char *, char *, char *, int *, int *, double *, int *, double *, int *);\n\nint BLASFUNC(ssymv) (const char *, const int *, const float  *, const float  *, const int *, const float  *, const int *, const float  *, float  *, const int *);\nint BLASFUNC(dsymv) (const char *, const int *, const double *, const double *, const int *, const double *, const int *, const double *, double *, const int *);\nint BLASFUNC(qsymv) (const char *, const int *, const double *, const double *, const int *, const double *, const int *, const double *, double *, const int *);\n\nint BLASFUNC(sspmv) (char *, int *, float  *, float *,\n\t\t     float  *, int *, float *, float *, int *);\nint BLASFUNC(dspmv) (char *, int *, double  *, double *,\n\t\t     double  *, int *, double *, double *, int *);\nint BLASFUNC(qspmv) (char *, int *, double  *, double *,\n\t\t     double  *, int *, double *, double *, int *);\n\nint BLASFUNC(ssyr) (const char *, const int *, const float   *, const float  *, const int *, float  *, const int *);\nint BLASFUNC(dsyr) (const char *, const int *, const double  *, const double *, const int *, double *, const int *);\nint BLASFUNC(qsyr) (const char *, const int *, const double  *, const double *, const int *, double *, const int *);\n\nint BLASFUNC(ssyr2) (const char *, const int *, const float   *, const float  *, const int *, const float  *, const int *, float  *, const int *);\nint BLASFUNC(dsyr2) (const char *, const int *, const double  *, const double *, const int *, const double *, const int *, double *, const int *);\nint BLASFUNC(qsyr2) (const char *, const int *, const double  *, const double *, const int *, const double *, const int *, double *, const int *);\nint BLASFUNC(csyr2) (const char *, const int *, const float   *, const float  *, const int *, const float  *, const int *, float  *, const int *);\nint BLASFUNC(zsyr2) (const char *, const int *, const double  *, const double *, const int *, const double *, const int *, double *, const int *);\nint BLASFUNC(xsyr2) (const char *, const int *, const double  *, const double *, const int *, const double *, const int *, double *, const int *);\n\nint BLASFUNC(sspr) (char *, int *, float   *, float  *, int *,\n\t\t    float  *);\nint BLASFUNC(dspr) (char *, int *, double  *, double *, int *,\n\t\t    double *);\nint BLASFUNC(qspr) (char *, int *, double  *, double *, int *,\n\t\t    double *);\n\nint BLASFUNC(sspr2) (char *, int *, float   *,\n\t\t     float  *, int *, float  *, int *, float  *);\nint BLASFUNC(dspr2) (char *, int *, double  *,\n\t\t     double *, int *, double *, int *, double *);\nint BLASFUNC(qspr2) (char *, int *, double  *,\n\t\t     double *, int *, double *, int *, double *);\nint BLASFUNC(cspr2) (char *, int *, float   *,\n\t\t     float  *, int *, float  *, int *, float  *);\nint BLASFUNC(zspr2) (char *, int *, double  *,\n\t\t     double *, int *, double *, int *, double *);\nint BLASFUNC(xspr2) (char *, int *, double  *,\n\t\t     double *, int *, double *, int *, double *);\n\nint BLASFUNC(cher) (char *, int *, float   *, float  *, int *,\n\t\t    float  *, int *);\nint BLASFUNC(zher) (char *, int *, double  *, double *, int *,\n\t\t    double *, int *);\nint BLASFUNC(xher) (char *, int *, double  *, double *, int *,\n\t\t    double *, int *);\n\nint BLASFUNC(chpr) (char *, int *, float   *, float  *, int *, float  *);\nint BLASFUNC(zhpr) (char *, int *, double  *, double *, int *, double *);\nint BLASFUNC(xhpr) (char *, int *, double  *, double *, int *, double *);\n\nint BLASFUNC(cher2) (char *, int *, float   *,\n\t\t     float  *, int *, float  *, int *, float  *, int *);\nint BLASFUNC(zher2) (char *, int *, double  *,\n\t\t     double *, int *, double *, int *, double *, int *);\nint BLASFUNC(xher2) (char *, int *, double  *,\n\t\t     double *, int *, double *, int *, double *, int *);\n\nint BLASFUNC(chpr2) (char *, int *, float   *,\n\t\t     float  *, int *, float  *, int *, float  *);\nint BLASFUNC(zhpr2) (char *, int *, double  *,\n\t\t     double *, int *, double *, int *, double *);\nint BLASFUNC(xhpr2) (char *, int *, double  *,\n\t\t     double *, int *, double *, int *, double *);\n\nint BLASFUNC(chemv) (const char *, const int *, const float  *, const float  *, const int *, const float  *, const int *, const float  *, float  *, const int *);\nint BLASFUNC(zhemv) (const char *, const int *, const double *, const double *, const int *, const double *, const int *, const double *, double *, const int *);\nint BLASFUNC(xhemv) (const char *, const int *, const double *, const double *, const int *, const double *, const int *, const double *, double *, const int *);\n\nint BLASFUNC(chpmv) (char *, int *, float  *, float *,\n\t\t     float  *, int *, float *, float *, int *);\nint BLASFUNC(zhpmv) (char *, int *, double  *, double *,\n\t\t     double  *, int *, double *, double *, int *);\nint BLASFUNC(xhpmv) (char *, int *, double  *, double *,\n\t\t     double  *, int *, double *, double *, int *);\n\nint BLASFUNC(snorm)(char *, int *, int *, float  *, int *);\nint BLASFUNC(dnorm)(char *, int *, int *, double *, int *);\nint BLASFUNC(cnorm)(char *, int *, int *, float  *, int *);\nint BLASFUNC(znorm)(char *, int *, int *, double *, int *);\n\nint BLASFUNC(sgbmv)(char *, int *, int *, int *, int *, float  *, float  *, int *,\n\t\t    float  *, int *, float  *, float  *, int *);\nint BLASFUNC(dgbmv)(char *, int *, int *, int *, int *, double *, double *, int *,\n\t\t    double *, int *, double *, double *, int *);\nint BLASFUNC(qgbmv)(char *, int *, int *, int *, int *, double *, double *, int *,\n\t\t    double *, int *, double *, double *, int *);\nint BLASFUNC(cgbmv)(char *, int *, int *, int *, int *, float  *, float  *, int *,\n\t\t    float  *, int *, float  *, float  *, int *);\nint BLASFUNC(zgbmv)(char *, int *, int *, int *, int *, double *, double *, int *,\n\t\t    double *, int *, double *, double *, int *);\nint BLASFUNC(xgbmv)(char *, int *, int *, int *, int *, double *, double *, int *,\n\t\t    double *, int *, double *, double *, int *);\n\nint BLASFUNC(ssbmv)(char *, int *, int *, float  *, float  *, int *,\n\t\t    float  *, int *, float  *, float  *, int *);\nint BLASFUNC(dsbmv)(char *, int *, int *, double *, double *, int *,\n\t\t    double *, int *, double *, double *, int *);\nint BLASFUNC(qsbmv)(char *, int *, int *, double *, double *, int *,\n\t\t    double *, int *, double *, double *, int *);\nint BLASFUNC(csbmv)(char *, int *, int *, float  *, float  *, int *,\n\t\t    float  *, int *, float  *, float  *, int *);\nint BLASFUNC(zsbmv)(char *, int *, int *, double *, double *, int *,\n\t\t    double *, int *, double *, double *, int *);\nint BLASFUNC(xsbmv)(char *, int *, int *, double *, double *, int *,\n\t\t    double *, int *, double *, double *, int *);\n\nint BLASFUNC(chbmv)(char *, int *, int *, float  *, float  *, int *,\n\t\t    float  *, int *, float  *, float  *, int *);\nint BLASFUNC(zhbmv)(char *, int *, int *, double *, double *, int *,\n\t\t    double *, int *, double *, double *, int *);\nint BLASFUNC(xhbmv)(char *, int *, int *, double *, double *, int *,\n\t\t    double *, int *, double *, double *, int *);\n\n/* Level 3 routines */\n\nint BLASFUNC(sgemm)(const char *, const char *, const int *, const int *, const int *, const float  *, const float  *, const int *, const float  *, const int *, const float  *, float  *, const int *);\nint BLASFUNC(dgemm)(const char *, const char *, const int *, const int *, const int *, const double *, const double *, const int *, const double *, const int *, const double *, double *, const int *);\nint BLASFUNC(qgemm)(const char *, const char *, const int *, const int *, const int *, const double *, const double *, const int *, const double *, const int *, const double *, double *, const int *);\nint BLASFUNC(cgemm)(const char *, const char *, const int *, const int *, const int *, const float  *, const float  *, const int *, const float  *, const int *, const float  *, float  *, const int *);\nint BLASFUNC(zgemm)(const char *, const char *, const int *, const int *, const int *, const double *, const double *, const int *, const double *, const int *, const double *, double *, const int *);\nint BLASFUNC(xgemm)(const char *, const char *, const int *, const int *, const int *, const double *, const double *, const int *, const double *, const int *, const double *, double *, const int *);\n\nint BLASFUNC(cgemm3m)(char *, char *, int *, int *, int *, float *,\n\t   float  *, int *, float  *, int *, float  *, float  *, int *);\nint BLASFUNC(zgemm3m)(char *, char *, int *, int *, int *, double *,\n\t   double *, int *, double *, int *, double *, double *, int *);\nint BLASFUNC(xgemm3m)(char *, char *, int *, int *, int *, double *,\n\t   double *, int *, double *, int *, double *, double *, int *);\n\nint BLASFUNC(sge2mm)(char *, char *, char *, int *, int *,\n\t\t     float *, float  *, int *, float  *, int *,\n\t\t     float *, float  *, int *);\nint BLASFUNC(dge2mm)(char *, char *, char *, int *, int *,\n\t\t     double *, double  *, int *, double  *, int *,\n\t\t     double *, double  *, int *);\nint BLASFUNC(cge2mm)(char *, char *, char *, int *, int *,\n\t\t     float *, float  *, int *, float  *, int *,\n\t\t     float *, float  *, int *);\nint BLASFUNC(zge2mm)(char *, char *, char *, int *, int *,\n\t\t     double *, double  *, int *, double  *, int *,\n\t\t     double *, double  *, int *);\n\nint BLASFUNC(strsm)(const char *, const char *, const char *, const char *, const int *, const int *, const float *,  const float *,  const int *, float *,  const int *);\nint BLASFUNC(dtrsm)(const char *, const char *, const char *, const char *, const int *, const int *, const double *, const double *, const int *, double *, const int *);\nint BLASFUNC(qtrsm)(const char *, const char *, const char *, const char *, const int *, const int *, const double *, const double *, const int *, double *, const int *);\nint BLASFUNC(ctrsm)(const char *, const char *, const char *, const char *, const int *, const int *, const float *,  const float *,  const int *, float *,  const int *);\nint BLASFUNC(ztrsm)(const char *, const char *, const char *, const char *, const int *, const int *, const double *, const double *, const int *, double *, const int *);\nint BLASFUNC(xtrsm)(const char *, const char *, const char *, const char *, const int *, const int *, const double *, const double *, const int *, double *, const int *);\n\nint BLASFUNC(strmm)(const char *, const char *, const char *, const char *, const int *, const int *, const float *,  const float *,  const int *, float *,  const int *);\nint BLASFUNC(dtrmm)(const char *, const char *, const char *, const char *, const int *, const int *, const double *, const double *, const int *, double *, const int *);\nint BLASFUNC(qtrmm)(const char *, const char *, const char *, const char *, const int *, const int *, const double *, const double *, const int *, double *, const int *);\nint BLASFUNC(ctrmm)(const char *, const char *, const char *, const char *, const int *, const int *, const float *,  const float *,  const int *, float *,  const int *);\nint BLASFUNC(ztrmm)(const char *, const char *, const char *, const char *, const int *, const int *, const double *, const double *, const int *, double *, const int *);\nint BLASFUNC(xtrmm)(const char *, const char *, const char *, const char *, const int *, const int *, const double *, const double *, const int *, double *, const int *);\n\nint BLASFUNC(ssymm)(const char *, const char *, const int *, const int *, const float  *, const float  *, const int *, const float  *, const int *, const float  *, float  *, const int *);\nint BLASFUNC(dsymm)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, const double *, const int *, const double *, double *, const int *);\nint BLASFUNC(qsymm)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, const double *, const int *, const double *, double *, const int *);\nint BLASFUNC(csymm)(const char *, const char *, const int *, const int *, const float  *, const float  *, const int *, const float  *, const int *, const float  *, float  *, const int *);\nint BLASFUNC(zsymm)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, const double *, const int *, const double *, double *, const int *);\nint BLASFUNC(xsymm)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, const double *, const int *, const double *, double *, const int *);\n\nint BLASFUNC(csymm3m)(char *, char *, int *, int *, float  *, float  *, int *, float  *, int *, float  *, float  *, int *);\nint BLASFUNC(zsymm3m)(char *, char *, int *, int *, double *, double *, int *, double *, int *, double *, double *, int *);\nint BLASFUNC(xsymm3m)(char *, char *, int *, int *, double *, double *, int *, double *, int *, double *, double *, int *);\n\nint BLASFUNC(ssyrk)(const char *, const char *, const int *, const int *, const float  *, const float  *, const int *, const float  *, float  *, const int *);\nint BLASFUNC(dsyrk)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, const double *, double *, const int *);\nint BLASFUNC(qsyrk)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, const double *, double *, const int *);\nint BLASFUNC(csyrk)(const char *, const char *, const int *, const int *, const float  *, const float  *, const int *, const float  *, float  *, const int *);\nint BLASFUNC(zsyrk)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, const double *, double *, const int *);\nint BLASFUNC(xsyrk)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, const double *, double *, const int *);\n\nint BLASFUNC(ssyr2k)(const char *, const char *, const int *, const int *, const float  *, const float  *, const int *, const float *, const int *, const float  *, float  *, const int *);\nint BLASFUNC(dsyr2k)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, const double*, const int *, const double *, double *, const int *);\nint BLASFUNC(qsyr2k)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, const double*, const int *, const double *, double *, const int *);\nint BLASFUNC(csyr2k)(const char *, const char *, const int *, const int *, const float  *, const float  *, const int *, const float *, const int *, const float  *, float  *, const int *);\nint BLASFUNC(zsyr2k)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, const double*, const int *, const double *, double *, const int *);\nint BLASFUNC(xsyr2k)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, const double*, const int *, const double *, double *, const int *);\n\nint BLASFUNC(chemm)(const char *, const char *, const int *, const int *, const float  *, const float  *, const int *, const float  *, const int *, const float  *, float  *, const int *);\nint BLASFUNC(zhemm)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, const double *, const int *, const double *, double *, const int *);\nint BLASFUNC(xhemm)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, const double *, const int *, const double *, double *, const int *);\n\nint BLASFUNC(chemm3m)(char *, char *, int *, int *, float  *, float  *, int *,\n\t   float  *, int *, float  *, float  *, int *);\nint BLASFUNC(zhemm3m)(char *, char *, int *, int *, double *, double *, int *,\n\t   double *, int *, double *, double *, int *);\nint BLASFUNC(xhemm3m)(char *, char *, int *, int *, double *, double *, int *,\n\t   double *, int *, double *, double *, int *);\n\nint BLASFUNC(cherk)(const char *, const char *, const int *, const int *, const float  *, const float  *, const int *, const float  *, float  *, const int *);\nint BLASFUNC(zherk)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, const double *, double *, const int *);\nint BLASFUNC(xherk)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, const double *, double *, const int *);\n\nint BLASFUNC(cher2k)(const char *, const char *, const int *, const int *, const float  *, const float  *, const int *, const float  *, const int *, const float  *, float  *, const int *);\nint BLASFUNC(zher2k)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, const double *, const int *, const double *, double *, const int *);\nint BLASFUNC(xher2k)(const char *, const char *, const int *, const int *, const double *, const double *, const int *, const double *, const int *, const double *, double *, const int *);\nint BLASFUNC(cher2m)(const char *, const char *, const char *, const int *, const int *, const float  *, const float  *, const int *, const float *, const int *, const float  *, float  *, const int *);\nint BLASFUNC(zher2m)(const char *, const char *, const char *, const int *, const int *, const double *, const double *, const int *, const double*, const int *, const double *, double *, const int *);\nint BLASFUNC(xher2m)(const char *, const char *, const char *, const int *, const int *, const double *, const double *, const int *, const double*, const int *, const double *, double *, const int *);\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/misc/lapack.h",
    "content": "#ifndef LAPACK_H\n#define LAPACK_H\n\n#include \"blas.h\"\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif\n\nint BLASFUNC(csymv) (const char *, const int *, const float  *, const float  *, const int *, const float  *, const int *, const float  *, float  *, const int *);\nint BLASFUNC(zsymv) (const char *, const int *, const double *, const double *, const int *, const double *, const int *, const double *, double *, const int *);\nint BLASFUNC(xsymv) (const char *, const int *, const double *, const double *, const int *, const double *, const int *, const double *, double *, const int *);\n\n\nint BLASFUNC(cspmv) (char *, int *, float  *, float *,\n         float  *, int *, float *, float *, int *);\nint BLASFUNC(zspmv) (char *, int *, double  *, double *,\n         double  *, int *, double *, double *, int *);\nint BLASFUNC(xspmv) (char *, int *, double  *, double *,\n         double  *, int *, double *, double *, int *);\n\nint BLASFUNC(csyr) (char *, int *, float   *, float  *, int *,\n        float  *, int *);\nint BLASFUNC(zsyr) (char *, int *, double  *, double *, int *,\n        double *, int *);\nint BLASFUNC(xsyr) (char *, int *, double  *, double *, int *,\n        double *, int *);\n\nint BLASFUNC(cspr) (char *, int *, float   *, float  *, int *,\n        float  *);\nint BLASFUNC(zspr) (char *, int *, double  *, double *, int *,\n        double *);\nint BLASFUNC(xspr) (char *, int *, double  *, double *, int *,\n        double *);\n\nint BLASFUNC(sgemt)(char *, int *, int *, float  *, float  *, int *,\n        float  *, int *);\nint BLASFUNC(dgemt)(char *, int *, int *, double *, double *, int *,\n        double *, int *);\nint BLASFUNC(cgemt)(char *, int *, int *, float  *, float  *, int *,\n        float  *, int *);\nint BLASFUNC(zgemt)(char *, int *, int *, double *, double *, int *,\n        double *, int *);\n\nint BLASFUNC(sgema)(char *, char *, int *, int *, float  *,\n        float  *, int *, float *, float  *, int *, float *, int *);\nint BLASFUNC(dgema)(char *, char *, int *, int *, double *,\n        double *, int *, double*, double *, int *, double*, int *);\nint BLASFUNC(cgema)(char *, char *, int *, int *, float  *,\n        float  *, int *, float *, float  *, int *, float *, int *);\nint BLASFUNC(zgema)(char *, char *, int *, int *, double *,\n        double *, int *, double*, double *, int *, double*, int *);\n\nint BLASFUNC(sgems)(char *, char *, int *, int *, float  *,\n        float  *, int *, float *, float  *, int *, float *, int *);\nint BLASFUNC(dgems)(char *, char *, int *, int *, double *,\n        double *, int *, double*, double *, int *, double*, int *);\nint BLASFUNC(cgems)(char *, char *, int *, int *, float  *,\n        float  *, int *, float *, float  *, int *, float *, int *);\nint BLASFUNC(zgems)(char *, char *, int *, int *, double *,\n        double *, int *, double*, double *, int *, double*, int *);\n\nint BLASFUNC(sgetf2)(int *, int *, float  *, int *, int *, int *);\nint BLASFUNC(dgetf2)(int *, int *, double *, int *, int *, int *);\nint BLASFUNC(qgetf2)(int *, int *, double *, int *, int *, int *);\nint BLASFUNC(cgetf2)(int *, int *, float  *, int *, int *, int *);\nint BLASFUNC(zgetf2)(int *, int *, double *, int *, int *, int *);\nint BLASFUNC(xgetf2)(int *, int *, double *, int *, int *, int *);\n\nint BLASFUNC(sgetrf)(int *, int *, float  *, int *, int *, int *);\nint BLASFUNC(dgetrf)(int *, int *, double *, int *, int *, int *);\nint BLASFUNC(qgetrf)(int *, int *, double *, int *, int *, int *);\nint BLASFUNC(cgetrf)(int *, int *, float  *, int *, int *, int *);\nint BLASFUNC(zgetrf)(int *, int *, double *, int *, int *, int *);\nint BLASFUNC(xgetrf)(int *, int *, double *, int *, int *, int *);\n\nint BLASFUNC(slaswp)(int *, float  *, int *, int *, int *, int *, int *);\nint BLASFUNC(dlaswp)(int *, double *, int *, int *, int *, int *, int *);\nint BLASFUNC(qlaswp)(int *, double *, int *, int *, int *, int *, int *);\nint BLASFUNC(claswp)(int *, float  *, int *, int *, int *, int *, int *);\nint BLASFUNC(zlaswp)(int *, double *, int *, int *, int *, int *, int *);\nint BLASFUNC(xlaswp)(int *, double *, int *, int *, int *, int *, int *);\n\nint BLASFUNC(sgetrs)(char *, int *, int *, float  *, int *, int *, float  *, int *, int *);\nint BLASFUNC(dgetrs)(char *, int *, int *, double *, int *, int *, double *, int *, int *);\nint BLASFUNC(qgetrs)(char *, int *, int *, double *, int *, int *, double *, int *, int *);\nint BLASFUNC(cgetrs)(char *, int *, int *, float  *, int *, int *, float  *, int *, int *);\nint BLASFUNC(zgetrs)(char *, int *, int *, double *, int *, int *, double *, int *, int *);\nint BLASFUNC(xgetrs)(char *, int *, int *, double *, int *, int *, double *, int *, int *);\n\nint BLASFUNC(sgesv)(int *, int *, float  *, int *, int *, float *, int *, int *);\nint BLASFUNC(dgesv)(int *, int *, double *, int *, int *, double*, int *, int *);\nint BLASFUNC(qgesv)(int *, int *, double *, int *, int *, double*, int *, int *);\nint BLASFUNC(cgesv)(int *, int *, float  *, int *, int *, float *, int *, int *);\nint BLASFUNC(zgesv)(int *, int *, double *, int *, int *, double*, int *, int *);\nint BLASFUNC(xgesv)(int *, int *, double *, int *, int *, double*, int *, int *);\n\nint BLASFUNC(spotf2)(char *, int *, float  *, int *, int *);\nint BLASFUNC(dpotf2)(char *, int *, double *, int *, int *);\nint BLASFUNC(qpotf2)(char *, int *, double *, int *, int *);\nint BLASFUNC(cpotf2)(char *, int *, float  *, int *, int *);\nint BLASFUNC(zpotf2)(char *, int *, double *, int *, int *);\nint BLASFUNC(xpotf2)(char *, int *, double *, int *, int *);\n\nint BLASFUNC(spotrf)(char *, int *, float  *, int *, int *);\nint BLASFUNC(dpotrf)(char *, int *, double *, int *, int *);\nint BLASFUNC(qpotrf)(char *, int *, double *, int *, int *);\nint BLASFUNC(cpotrf)(char *, int *, float  *, int *, int *);\nint BLASFUNC(zpotrf)(char *, int *, double *, int *, int *);\nint BLASFUNC(xpotrf)(char *, int *, double *, int *, int *);\n\nint BLASFUNC(slauu2)(char *, int *, float  *, int *, int *);\nint BLASFUNC(dlauu2)(char *, int *, double *, int *, int *);\nint BLASFUNC(qlauu2)(char *, int *, double *, int *, int *);\nint BLASFUNC(clauu2)(char *, int *, float  *, int *, int *);\nint BLASFUNC(zlauu2)(char *, int *, double *, int *, int *);\nint BLASFUNC(xlauu2)(char *, int *, double *, int *, int *);\n\nint BLASFUNC(slauum)(char *, int *, float  *, int *, int *);\nint BLASFUNC(dlauum)(char *, int *, double *, int *, int *);\nint BLASFUNC(qlauum)(char *, int *, double *, int *, int *);\nint BLASFUNC(clauum)(char *, int *, float  *, int *, int *);\nint BLASFUNC(zlauum)(char *, int *, double *, int *, int *);\nint BLASFUNC(xlauum)(char *, int *, double *, int *, int *);\n\nint BLASFUNC(strti2)(char *, char *, int *, float  *, int *, int *);\nint BLASFUNC(dtrti2)(char *, char *, int *, double *, int *, int *);\nint BLASFUNC(qtrti2)(char *, char *, int *, double *, int *, int *);\nint BLASFUNC(ctrti2)(char *, char *, int *, float  *, int *, int *);\nint BLASFUNC(ztrti2)(char *, char *, int *, double *, int *, int *);\nint BLASFUNC(xtrti2)(char *, char *, int *, double *, int *, int *);\n\nint BLASFUNC(strtri)(char *, char *, int *, float  *, int *, int *);\nint BLASFUNC(dtrtri)(char *, char *, int *, double *, int *, int *);\nint BLASFUNC(qtrtri)(char *, char *, int *, double *, int *, int *);\nint BLASFUNC(ctrtri)(char *, char *, int *, float  *, int *, int *);\nint BLASFUNC(ztrtri)(char *, char *, int *, double *, int *, int *);\nint BLASFUNC(xtrtri)(char *, char *, int *, double *, int *, int *);\n\nint BLASFUNC(spotri)(char *, int *, float  *, int *, int *);\nint BLASFUNC(dpotri)(char *, int *, double *, int *, int *);\nint BLASFUNC(qpotri)(char *, int *, double *, int *, int *);\nint BLASFUNC(cpotri)(char *, int *, float  *, int *, int *);\nint BLASFUNC(zpotri)(char *, int *, double *, int *, int *);\nint BLASFUNC(xpotri)(char *, int *, double *, int *, int *);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/misc/lapacke.h",
    "content": "/*****************************************************************************\n  Copyright (c) 2010, Intel Corp.\n  All rights reserved.\n\n  Redistribution and use in source and binary forms, with or without\n  modification, are permitted provided that the following conditions are met:\n\n    * Redistributions of source code must retain the above copyright notice,\n      this list of conditions and the following disclaimer.\n    * Redistributions in binary form must reproduce the above copyright\n      notice, this list of conditions and the following disclaimer in the\n      documentation and/or other materials provided with the distribution.\n    * Neither the name of Intel Corporation nor the names of its contributors\n      may be used to endorse or promote products derived from this software\n      without specific prior written permission.\n\n  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\n  THE POSSIBILITY OF SUCH DAMAGE.\n******************************************************************************\n* Contents: Native C interface to LAPACK\n* Author: Intel Corporation\n* Generated November, 2011\n*****************************************************************************/\n\n#ifndef _MKL_LAPACKE_H_\n\n#ifndef _LAPACKE_H_\n#define _LAPACKE_H_\n\n/*\n*  Turn on HAVE_LAPACK_CONFIG_H to redefine C-LAPACK datatypes\n*/\n#ifdef HAVE_LAPACK_CONFIG_H\n#include \"lapacke_config.h\"\n#endif\n\n#include <stdlib.h>\n\n#ifndef lapack_int\n#define lapack_int     int\n#endif\n\n#ifndef lapack_logical\n#define lapack_logical lapack_int\n#endif\n\n/* Complex types are structures equivalent to the\n* Fortran complex types COMPLEX(4) and COMPLEX(8).\n*\n* One can also redefine the types with his own types\n* for example by including in the code definitions like\n*\n* #define lapack_complex_float std::complex<float>\n* #define lapack_complex_double std::complex<double>\n*\n* or define these types in the command line:\n*\n* -Dlapack_complex_float=\"std::complex<float>\"\n* -Dlapack_complex_double=\"std::complex<double>\"\n*/\n\n#ifndef LAPACK_COMPLEX_CUSTOM\n\n/* Complex type (single precision) */\n#ifndef lapack_complex_float\n#include <complex.h>\n#define lapack_complex_float    float _Complex\n#endif\n\n#ifndef lapack_complex_float_real\n#define lapack_complex_float_real(z)       (creal(z))\n#endif\n\n#ifndef lapack_complex_float_imag\n#define lapack_complex_float_imag(z)       (cimag(z))\n#endif\n\nlapack_complex_float lapack_make_complex_float( float re, float im );\n\n/* Complex type (double precision) */\n#ifndef lapack_complex_double\n#include <complex.h>\n#define lapack_complex_double   double _Complex\n#endif\n\n#ifndef lapack_complex_double_real\n#define lapack_complex_double_real(z)      (creal(z))\n#endif\n\n#ifndef lapack_complex_double_imag\n#define lapack_complex_double_imag(z)       (cimag(z))\n#endif\n\nlapack_complex_double lapack_make_complex_double( double re, double im );\n\n#endif\n\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n#ifndef LAPACKE_malloc\n#define LAPACKE_malloc( size ) malloc( size )\n#endif\n#ifndef LAPACKE_free\n#define LAPACKE_free( p )      free( p )\n#endif\n\n#define LAPACK_C2INT( x ) (lapack_int)(*((float*)&x ))\n#define LAPACK_Z2INT( x ) (lapack_int)(*((double*)&x ))\n\n#define LAPACK_ROW_MAJOR               101\n#define LAPACK_COL_MAJOR               102\n\n#define LAPACK_WORK_MEMORY_ERROR       -1010\n#define LAPACK_TRANSPOSE_MEMORY_ERROR  -1011\n\n/* Callback logical functions of one, two, or three arguments are used\n*  to select eigenvalues to sort to the top left of the Schur form.\n*  The value is selected if function returns TRUE (non-zero). */\n\ntypedef lapack_logical (*LAPACK_S_SELECT2) ( const float*, const float* );\ntypedef lapack_logical (*LAPACK_S_SELECT3)\n    ( const float*, const float*, const float* );\ntypedef lapack_logical (*LAPACK_D_SELECT2) ( const double*, const double* );\ntypedef lapack_logical (*LAPACK_D_SELECT3)\n    ( const double*, const double*, const double* );\n\ntypedef lapack_logical (*LAPACK_C_SELECT1) ( const lapack_complex_float* );\ntypedef lapack_logical (*LAPACK_C_SELECT2)\n    ( const lapack_complex_float*, const lapack_complex_float* );\ntypedef lapack_logical (*LAPACK_Z_SELECT1) ( const lapack_complex_double* );\ntypedef lapack_logical (*LAPACK_Z_SELECT2)\n    ( const lapack_complex_double*, const lapack_complex_double* );\n\n#include \"lapacke_mangling.h\"\n\n#define LAPACK_lsame LAPACK_GLOBAL(lsame,LSAME)\nlapack_logical LAPACK_lsame( char* ca,  char* cb,\n                              lapack_int lca, lapack_int lcb );\n\n/* C-LAPACK function prototypes */\n\nlapack_int LAPACKE_sbdsdc( int matrix_order, char uplo, char compq,\n                           lapack_int n, float* d, float* e, float* u,\n                           lapack_int ldu, float* vt, lapack_int ldvt, float* q,\n                           lapack_int* iq );\nlapack_int LAPACKE_dbdsdc( int matrix_order, char uplo, char compq,\n                           lapack_int n, double* d, double* e, double* u,\n                           lapack_int ldu, double* vt, lapack_int ldvt,\n                           double* q, lapack_int* iq );\n\nlapack_int LAPACKE_sbdsqr( int matrix_order, char uplo, lapack_int n,\n                           lapack_int ncvt, lapack_int nru, lapack_int ncc,\n                           float* d, float* e, float* vt, lapack_int ldvt,\n                           float* u, lapack_int ldu, float* c, lapack_int ldc );\nlapack_int LAPACKE_dbdsqr( int matrix_order, char uplo, lapack_int n,\n                           lapack_int ncvt, lapack_int nru, lapack_int ncc,\n                           double* d, double* e, double* vt, lapack_int ldvt,\n                           double* u, lapack_int ldu, double* c,\n                           lapack_int ldc );\nlapack_int LAPACKE_cbdsqr( int matrix_order, char uplo, lapack_int n,\n                           lapack_int ncvt, lapack_int nru, lapack_int ncc,\n                           float* d, float* e, lapack_complex_float* vt,\n                           lapack_int ldvt, lapack_complex_float* u,\n                           lapack_int ldu, lapack_complex_float* c,\n                           lapack_int ldc );\nlapack_int LAPACKE_zbdsqr( int matrix_order, char uplo, lapack_int n,\n                           lapack_int ncvt, lapack_int nru, lapack_int ncc,\n                           double* d, double* e, lapack_complex_double* vt,\n                           lapack_int ldvt, lapack_complex_double* u,\n                           lapack_int ldu, lapack_complex_double* c,\n                           lapack_int ldc );\n\nlapack_int LAPACKE_sdisna( char job, lapack_int m, lapack_int n, const float* d,\n                           float* sep );\nlapack_int LAPACKE_ddisna( char job, lapack_int m, lapack_int n,\n                           const double* d, double* sep );\n\nlapack_int LAPACKE_sgbbrd( int matrix_order, char vect, lapack_int m,\n                           lapack_int n, lapack_int ncc, lapack_int kl,\n                           lapack_int ku, float* ab, lapack_int ldab, float* d,\n                           float* e, float* q, lapack_int ldq, float* pt,\n                           lapack_int ldpt, float* c, lapack_int ldc );\nlapack_int LAPACKE_dgbbrd( int matrix_order, char vect, lapack_int m,\n                           lapack_int n, lapack_int ncc, lapack_int kl,\n                           lapack_int ku, double* ab, lapack_int ldab,\n                           double* d, double* e, double* q, lapack_int ldq,\n                           double* pt, lapack_int ldpt, double* c,\n                           lapack_int ldc );\nlapack_int LAPACKE_cgbbrd( int matrix_order, char vect, lapack_int m,\n                           lapack_int n, lapack_int ncc, lapack_int kl,\n                           lapack_int ku, lapack_complex_float* ab,\n                           lapack_int ldab, float* d, float* e,\n                           lapack_complex_float* q, lapack_int ldq,\n                           lapack_complex_float* pt, lapack_int ldpt,\n                           lapack_complex_float* c, lapack_int ldc );\nlapack_int LAPACKE_zgbbrd( int matrix_order, char vect, lapack_int m,\n                           lapack_int n, lapack_int ncc, lapack_int kl,\n                           lapack_int ku, lapack_complex_double* ab,\n                           lapack_int ldab, double* d, double* e,\n                           lapack_complex_double* q, lapack_int ldq,\n                           lapack_complex_double* pt, lapack_int ldpt,\n                           lapack_complex_double* c, lapack_int ldc );\n\nlapack_int LAPACKE_sgbcon( int matrix_order, char norm, lapack_int n,\n                           lapack_int kl, lapack_int ku, const float* ab,\n                           lapack_int ldab, const lapack_int* ipiv, float anorm,\n                           float* rcond );\nlapack_int LAPACKE_dgbcon( int matrix_order, char norm, lapack_int n,\n                           lapack_int kl, lapack_int ku, const double* ab,\n                           lapack_int ldab, const lapack_int* ipiv,\n                           double anorm, double* rcond );\nlapack_int LAPACKE_cgbcon( int matrix_order, char norm, lapack_int n,\n                           lapack_int kl, lapack_int ku,\n                           const lapack_complex_float* ab, lapack_int ldab,\n                           const lapack_int* ipiv, float anorm, float* rcond );\nlapack_int LAPACKE_zgbcon( int matrix_order, char norm, lapack_int n,\n                           lapack_int kl, lapack_int ku,\n                           const lapack_complex_double* ab, lapack_int ldab,\n                           const lapack_int* ipiv, double anorm,\n                           double* rcond );\n\nlapack_int LAPACKE_sgbequ( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int kl, lapack_int ku, const float* ab,\n                           lapack_int ldab, float* r, float* c, float* rowcnd,\n                           float* colcnd, float* amax );\nlapack_int LAPACKE_dgbequ( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int kl, lapack_int ku, const double* ab,\n                           lapack_int ldab, double* r, double* c,\n                           double* rowcnd, double* colcnd, double* amax );\nlapack_int LAPACKE_cgbequ( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int kl, lapack_int ku,\n                           const lapack_complex_float* ab, lapack_int ldab,\n                           float* r, float* c, float* rowcnd, float* colcnd,\n                           float* amax );\nlapack_int LAPACKE_zgbequ( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int kl, lapack_int ku,\n                           const lapack_complex_double* ab, lapack_int ldab,\n                           double* r, double* c, double* rowcnd, double* colcnd,\n                           double* amax );\n\nlapack_int LAPACKE_sgbequb( int matrix_order, lapack_int m, lapack_int n,\n                            lapack_int kl, lapack_int ku, const float* ab,\n                            lapack_int ldab, float* r, float* c, float* rowcnd,\n                            float* colcnd, float* amax );\nlapack_int LAPACKE_dgbequb( int matrix_order, lapack_int m, lapack_int n,\n                            lapack_int kl, lapack_int ku, const double* ab,\n                            lapack_int ldab, double* r, double* c,\n                            double* rowcnd, double* colcnd, double* amax );\nlapack_int LAPACKE_cgbequb( int matrix_order, lapack_int m, lapack_int n,\n                            lapack_int kl, lapack_int ku,\n                            const lapack_complex_float* ab, lapack_int ldab,\n                            float* r, float* c, float* rowcnd, float* colcnd,\n                            float* amax );\nlapack_int LAPACKE_zgbequb( int matrix_order, lapack_int m, lapack_int n,\n                            lapack_int kl, lapack_int ku,\n                            const lapack_complex_double* ab, lapack_int ldab,\n                            double* r, double* c, double* rowcnd,\n                            double* colcnd, double* amax );\n\nlapack_int LAPACKE_sgbrfs( int matrix_order, char trans, lapack_int n,\n                           lapack_int kl, lapack_int ku, lapack_int nrhs,\n                           const float* ab, lapack_int ldab, const float* afb,\n                           lapack_int ldafb, const lapack_int* ipiv,\n                           const float* b, lapack_int ldb, float* x,\n                           lapack_int ldx, float* ferr, float* berr );\nlapack_int LAPACKE_dgbrfs( int matrix_order, char trans, lapack_int n,\n                           lapack_int kl, lapack_int ku, lapack_int nrhs,\n                           const double* ab, lapack_int ldab, const double* afb,\n                           lapack_int ldafb, const lapack_int* ipiv,\n                           const double* b, lapack_int ldb, double* x,\n                           lapack_int ldx, double* ferr, double* berr );\nlapack_int LAPACKE_cgbrfs( int matrix_order, char trans, lapack_int n,\n                           lapack_int kl, lapack_int ku, lapack_int nrhs,\n                           const lapack_complex_float* ab, lapack_int ldab,\n                           const lapack_complex_float* afb, lapack_int ldafb,\n                           const lapack_int* ipiv,\n                           const lapack_complex_float* b, lapack_int ldb,\n                           lapack_complex_float* x, lapack_int ldx, float* ferr,\n                           float* berr );\nlapack_int LAPACKE_zgbrfs( int matrix_order, char trans, lapack_int n,\n                           lapack_int kl, lapack_int ku, lapack_int nrhs,\n                           const lapack_complex_double* ab, lapack_int ldab,\n                           const lapack_complex_double* afb, lapack_int ldafb,\n                           const lapack_int* ipiv,\n                           const lapack_complex_double* b, lapack_int ldb,\n                           lapack_complex_double* x, lapack_int ldx,\n                           double* ferr, double* berr );\n\nlapack_int LAPACKE_sgbrfsx( int matrix_order, char trans, char equed,\n                            lapack_int n, lapack_int kl, lapack_int ku,\n                            lapack_int nrhs, const float* ab, lapack_int ldab,\n                            const float* afb, lapack_int ldafb,\n                            const lapack_int* ipiv, const float* r,\n                            const float* c, const float* b, lapack_int ldb,\n                            float* x, lapack_int ldx, float* rcond, float* berr,\n                            lapack_int n_err_bnds, float* err_bnds_norm,\n                            float* err_bnds_comp, lapack_int nparams,\n                            float* params );\nlapack_int LAPACKE_dgbrfsx( int matrix_order, char trans, char equed,\n                            lapack_int n, lapack_int kl, lapack_int ku,\n                            lapack_int nrhs, const double* ab, lapack_int ldab,\n                            const double* afb, lapack_int ldafb,\n                            const lapack_int* ipiv, const double* r,\n                            const double* c, const double* b, lapack_int ldb,\n                            double* x, lapack_int ldx, double* rcond,\n                            double* berr, lapack_int n_err_bnds,\n                            double* err_bnds_norm, double* err_bnds_comp,\n                            lapack_int nparams, double* params );\nlapack_int LAPACKE_cgbrfsx( int matrix_order, char trans, char equed,\n                            lapack_int n, lapack_int kl, lapack_int ku,\n                            lapack_int nrhs, const lapack_complex_float* ab,\n                            lapack_int ldab, const lapack_complex_float* afb,\n                            lapack_int ldafb, const lapack_int* ipiv,\n                            const float* r, const float* c,\n                            const lapack_complex_float* b, lapack_int ldb,\n                            lapack_complex_float* x, lapack_int ldx,\n                            float* rcond, float* berr, lapack_int n_err_bnds,\n                            float* err_bnds_norm, float* err_bnds_comp,\n                            lapack_int nparams, float* params );\nlapack_int LAPACKE_zgbrfsx( int matrix_order, char trans, char equed,\n                            lapack_int n, lapack_int kl, lapack_int ku,\n                            lapack_int nrhs, const lapack_complex_double* ab,\n                            lapack_int ldab, const lapack_complex_double* afb,\n                            lapack_int ldafb, const lapack_int* ipiv,\n                            const double* r, const double* c,\n                            const lapack_complex_double* b, lapack_int ldb,\n                            lapack_complex_double* x, lapack_int ldx,\n                            double* rcond, double* berr, lapack_int n_err_bnds,\n                            double* err_bnds_norm, double* err_bnds_comp,\n                            lapack_int nparams, double* params );\n\nlapack_int LAPACKE_sgbsv( int matrix_order, lapack_int n, lapack_int kl,\n                          lapack_int ku, lapack_int nrhs, float* ab,\n                          lapack_int ldab, lapack_int* ipiv, float* b,\n                          lapack_int ldb );\nlapack_int LAPACKE_dgbsv( int matrix_order, lapack_int n, lapack_int kl,\n                          lapack_int ku, lapack_int nrhs, double* ab,\n                          lapack_int ldab, lapack_int* ipiv, double* b,\n                          lapack_int ldb );\nlapack_int LAPACKE_cgbsv( int matrix_order, lapack_int n, lapack_int kl,\n                          lapack_int ku, lapack_int nrhs,\n                          lapack_complex_float* ab, lapack_int ldab,\n                          lapack_int* ipiv, lapack_complex_float* b,\n                          lapack_int ldb );\nlapack_int LAPACKE_zgbsv( int matrix_order, lapack_int n, lapack_int kl,\n                          lapack_int ku, lapack_int nrhs,\n                          lapack_complex_double* ab, lapack_int ldab,\n                          lapack_int* ipiv, lapack_complex_double* b,\n                          lapack_int ldb );\n\nlapack_int LAPACKE_sgbsvx( int matrix_order, char fact, char trans,\n                           lapack_int n, lapack_int kl, lapack_int ku,\n                           lapack_int nrhs, float* ab, lapack_int ldab,\n                           float* afb, lapack_int ldafb, lapack_int* ipiv,\n                           char* equed, float* r, float* c, float* b,\n                           lapack_int ldb, float* x, lapack_int ldx,\n                           float* rcond, float* ferr, float* berr,\n                           float* rpivot );\nlapack_int LAPACKE_dgbsvx( int matrix_order, char fact, char trans,\n                           lapack_int n, lapack_int kl, lapack_int ku,\n                           lapack_int nrhs, double* ab, lapack_int ldab,\n                           double* afb, lapack_int ldafb, lapack_int* ipiv,\n                           char* equed, double* r, double* c, double* b,\n                           lapack_int ldb, double* x, lapack_int ldx,\n                           double* rcond, double* ferr, double* berr,\n                           double* rpivot );\nlapack_int LAPACKE_cgbsvx( int matrix_order, char fact, char trans,\n                           lapack_int n, lapack_int kl, lapack_int ku,\n                           lapack_int nrhs, lapack_complex_float* ab,\n                           lapack_int ldab, lapack_complex_float* afb,\n                           lapack_int ldafb, lapack_int* ipiv, char* equed,\n                           float* r, float* c, lapack_complex_float* b,\n                           lapack_int ldb, lapack_complex_float* x,\n                           lapack_int ldx, float* rcond, float* ferr,\n                           float* berr, float* rpivot );\nlapack_int LAPACKE_zgbsvx( int matrix_order, char fact, char trans,\n                           lapack_int n, lapack_int kl, lapack_int ku,\n                           lapack_int nrhs, lapack_complex_double* ab,\n                           lapack_int ldab, lapack_complex_double* afb,\n                           lapack_int ldafb, lapack_int* ipiv, char* equed,\n                           double* r, double* c, lapack_complex_double* b,\n                           lapack_int ldb, lapack_complex_double* x,\n                           lapack_int ldx, double* rcond, double* ferr,\n                           double* berr, double* rpivot );\n\nlapack_int LAPACKE_sgbsvxx( int matrix_order, char fact, char trans,\n                            lapack_int n, lapack_int kl, lapack_int ku,\n                            lapack_int nrhs, float* ab, lapack_int ldab,\n                            float* afb, lapack_int ldafb, lapack_int* ipiv,\n                            char* equed, float* r, float* c, float* b,\n                            lapack_int ldb, float* x, lapack_int ldx,\n                            float* rcond, float* rpvgrw, float* berr,\n                            lapack_int n_err_bnds, float* err_bnds_norm,\n                            float* err_bnds_comp, lapack_int nparams,\n                            float* params );\nlapack_int LAPACKE_dgbsvxx( int matrix_order, char fact, char trans,\n                            lapack_int n, lapack_int kl, lapack_int ku,\n                            lapack_int nrhs, double* ab, lapack_int ldab,\n                            double* afb, lapack_int ldafb, lapack_int* ipiv,\n                            char* equed, double* r, double* c, double* b,\n                            lapack_int ldb, double* x, lapack_int ldx,\n                            double* rcond, double* rpvgrw, double* berr,\n                            lapack_int n_err_bnds, double* err_bnds_norm,\n                            double* err_bnds_comp, lapack_int nparams,\n                            double* params );\nlapack_int LAPACKE_cgbsvxx( int matrix_order, char fact, char trans,\n                            lapack_int n, lapack_int kl, lapack_int ku,\n                            lapack_int nrhs, lapack_complex_float* ab,\n                            lapack_int ldab, lapack_complex_float* afb,\n                            lapack_int ldafb, lapack_int* ipiv, char* equed,\n                            float* r, float* c, lapack_complex_float* b,\n                            lapack_int ldb, lapack_complex_float* x,\n                            lapack_int ldx, float* rcond, float* rpvgrw,\n                            float* berr, lapack_int n_err_bnds,\n                            float* err_bnds_norm, float* err_bnds_comp,\n                            lapack_int nparams, float* params );\nlapack_int LAPACKE_zgbsvxx( int matrix_order, char fact, char trans,\n                            lapack_int n, lapack_int kl, lapack_int ku,\n                            lapack_int nrhs, lapack_complex_double* ab,\n                            lapack_int ldab, lapack_complex_double* afb,\n                            lapack_int ldafb, lapack_int* ipiv, char* equed,\n                            double* r, double* c, lapack_complex_double* b,\n                            lapack_int ldb, lapack_complex_double* x,\n                            lapack_int ldx, double* rcond, double* rpvgrw,\n                            double* berr, lapack_int n_err_bnds,\n                            double* err_bnds_norm, double* err_bnds_comp,\n                            lapack_int nparams, double* params );\n\nlapack_int LAPACKE_sgbtrf( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int kl, lapack_int ku, float* ab,\n                           lapack_int ldab, lapack_int* ipiv );\nlapack_int LAPACKE_dgbtrf( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int kl, lapack_int ku, double* ab,\n                           lapack_int ldab, lapack_int* ipiv );\nlapack_int LAPACKE_cgbtrf( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int kl, lapack_int ku,\n                           lapack_complex_float* ab, lapack_int ldab,\n                           lapack_int* ipiv );\nlapack_int LAPACKE_zgbtrf( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int kl, lapack_int ku,\n                           lapack_complex_double* ab, lapack_int ldab,\n                           lapack_int* ipiv );\n\nlapack_int LAPACKE_sgbtrs( int matrix_order, char trans, lapack_int n,\n                           lapack_int kl, lapack_int ku, lapack_int nrhs,\n                           const float* ab, lapack_int ldab,\n                           const lapack_int* ipiv, float* b, lapack_int ldb );\nlapack_int LAPACKE_dgbtrs( int matrix_order, char trans, lapack_int n,\n                           lapack_int kl, lapack_int ku, lapack_int nrhs,\n                           const double* ab, lapack_int ldab,\n                           const lapack_int* ipiv, double* b, lapack_int ldb );\nlapack_int LAPACKE_cgbtrs( int matrix_order, char trans, lapack_int n,\n                           lapack_int kl, lapack_int ku, lapack_int nrhs,\n                           const lapack_complex_float* ab, lapack_int ldab,\n                           const lapack_int* ipiv, lapack_complex_float* b,\n                           lapack_int ldb );\nlapack_int LAPACKE_zgbtrs( int matrix_order, char trans, lapack_int n,\n                           lapack_int kl, lapack_int ku, lapack_int nrhs,\n                           const lapack_complex_double* ab, lapack_int ldab,\n                           const lapack_int* ipiv, lapack_complex_double* b,\n                           lapack_int ldb );\n\nlapack_int LAPACKE_sgebak( int matrix_order, char job, char side, lapack_int n,\n                           lapack_int ilo, lapack_int ihi, const float* scale,\n                           lapack_int m, float* v, lapack_int ldv );\nlapack_int LAPACKE_dgebak( int matrix_order, char job, char side, lapack_int n,\n                           lapack_int ilo, lapack_int ihi, const double* scale,\n                           lapack_int m, double* v, lapack_int ldv );\nlapack_int LAPACKE_cgebak( int matrix_order, char job, char side, lapack_int n,\n                           lapack_int ilo, lapack_int ihi, const float* scale,\n                           lapack_int m, lapack_complex_float* v,\n                           lapack_int ldv );\nlapack_int LAPACKE_zgebak( int matrix_order, char job, char side, lapack_int n,\n                           lapack_int ilo, lapack_int ihi, const double* scale,\n                           lapack_int m, lapack_complex_double* v,\n                           lapack_int ldv );\n\nlapack_int LAPACKE_sgebal( int matrix_order, char job, lapack_int n, float* a,\n                           lapack_int lda, lapack_int* ilo, lapack_int* ihi,\n                           float* scale );\nlapack_int LAPACKE_dgebal( int matrix_order, char job, lapack_int n, double* a,\n                           lapack_int lda, lapack_int* ilo, lapack_int* ihi,\n                           double* scale );\nlapack_int LAPACKE_cgebal( int matrix_order, char job, lapack_int n,\n                           lapack_complex_float* a, lapack_int lda,\n                           lapack_int* ilo, lapack_int* ihi, float* scale );\nlapack_int LAPACKE_zgebal( int matrix_order, char job, lapack_int n,\n                           lapack_complex_double* a, lapack_int lda,\n                           lapack_int* ilo, lapack_int* ihi, double* scale );\n\nlapack_int LAPACKE_sgebrd( int matrix_order, lapack_int m, lapack_int n,\n                           float* a, lapack_int lda, float* d, float* e,\n                           float* tauq, float* taup );\nlapack_int LAPACKE_dgebrd( int matrix_order, lapack_int m, lapack_int n,\n                           double* a, lapack_int lda, double* d, double* e,\n                           double* tauq, double* taup );\nlapack_int LAPACKE_cgebrd( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_complex_float* a, lapack_int lda, float* d,\n                           float* e, lapack_complex_float* tauq,\n                           lapack_complex_float* taup );\nlapack_int LAPACKE_zgebrd( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_complex_double* a, lapack_int lda, double* d,\n                           double* e, lapack_complex_double* tauq,\n                           lapack_complex_double* taup );\n\nlapack_int LAPACKE_sgecon( int matrix_order, char norm, lapack_int n,\n                           const float* a, lapack_int lda, float anorm,\n                           float* rcond );\nlapack_int LAPACKE_dgecon( int matrix_order, char norm, lapack_int n,\n                           const double* a, lapack_int lda, double anorm,\n                           double* rcond );\nlapack_int LAPACKE_cgecon( int matrix_order, char norm, lapack_int n,\n                           const lapack_complex_float* a, lapack_int lda,\n                           float anorm, float* rcond );\nlapack_int LAPACKE_zgecon( int matrix_order, char norm, lapack_int n,\n                           const lapack_complex_double* a, lapack_int lda,\n                           double anorm, double* rcond );\n\nlapack_int LAPACKE_sgeequ( int matrix_order, lapack_int m, lapack_int n,\n                           const float* a, lapack_int lda, float* r, float* c,\n                           float* rowcnd, float* colcnd, float* amax );\nlapack_int LAPACKE_dgeequ( int matrix_order, lapack_int m, lapack_int n,\n                           const double* a, lapack_int lda, double* r,\n                           double* c, double* rowcnd, double* colcnd,\n                           double* amax );\nlapack_int LAPACKE_cgeequ( int matrix_order, lapack_int m, lapack_int n,\n                           const lapack_complex_float* a, lapack_int lda,\n                           float* r, float* c, float* rowcnd, float* colcnd,\n                           float* amax );\nlapack_int LAPACKE_zgeequ( int matrix_order, lapack_int m, lapack_int n,\n                           const lapack_complex_double* a, lapack_int lda,\n                           double* r, double* c, double* rowcnd, double* colcnd,\n                           double* amax );\n\nlapack_int LAPACKE_sgeequb( int matrix_order, lapack_int m, lapack_int n,\n                            const float* a, lapack_int lda, float* r, float* c,\n                            float* rowcnd, float* colcnd, float* amax );\nlapack_int LAPACKE_dgeequb( int matrix_order, lapack_int m, lapack_int n,\n                            const double* a, lapack_int lda, double* r,\n                            double* c, double* rowcnd, double* colcnd,\n                            double* amax );\nlapack_int LAPACKE_cgeequb( int matrix_order, lapack_int m, lapack_int n,\n                            const lapack_complex_float* a, lapack_int lda,\n                            float* r, float* c, float* rowcnd, float* colcnd,\n                            float* amax );\nlapack_int LAPACKE_zgeequb( int matrix_order, lapack_int m, lapack_int n,\n                            const lapack_complex_double* a, lapack_int lda,\n                            double* r, double* c, double* rowcnd,\n                            double* colcnd, double* amax );\n\nlapack_int LAPACKE_sgees( int matrix_order, char jobvs, char sort,\n                          LAPACK_S_SELECT2 select, lapack_int n, float* a,\n                          lapack_int lda, lapack_int* sdim, float* wr,\n                          float* wi, float* vs, lapack_int ldvs );\nlapack_int LAPACKE_dgees( int matrix_order, char jobvs, char sort,\n                          LAPACK_D_SELECT2 select, lapack_int n, double* a,\n                          lapack_int lda, lapack_int* sdim, double* wr,\n                          double* wi, double* vs, lapack_int ldvs );\nlapack_int LAPACKE_cgees( int matrix_order, char jobvs, char sort,\n                          LAPACK_C_SELECT1 select, lapack_int n,\n                          lapack_complex_float* a, lapack_int lda,\n                          lapack_int* sdim, lapack_complex_float* w,\n                          lapack_complex_float* vs, lapack_int ldvs );\nlapack_int LAPACKE_zgees( int matrix_order, char jobvs, char sort,\n                          LAPACK_Z_SELECT1 select, lapack_int n,\n                          lapack_complex_double* a, lapack_int lda,\n                          lapack_int* sdim, lapack_complex_double* w,\n                          lapack_complex_double* vs, lapack_int ldvs );\n\nlapack_int LAPACKE_sgeesx( int matrix_order, char jobvs, char sort,\n                           LAPACK_S_SELECT2 select, char sense, lapack_int n,\n                           float* a, lapack_int lda, lapack_int* sdim,\n                           float* wr, float* wi, float* vs, lapack_int ldvs,\n                           float* rconde, float* rcondv );\nlapack_int LAPACKE_dgeesx( int matrix_order, char jobvs, char sort,\n                           LAPACK_D_SELECT2 select, char sense, lapack_int n,\n                           double* a, lapack_int lda, lapack_int* sdim,\n                           double* wr, double* wi, double* vs, lapack_int ldvs,\n                           double* rconde, double* rcondv );\nlapack_int LAPACKE_cgeesx( int matrix_order, char jobvs, char sort,\n                           LAPACK_C_SELECT1 select, char sense, lapack_int n,\n                           lapack_complex_float* a, lapack_int lda,\n                           lapack_int* sdim, lapack_complex_float* w,\n                           lapack_complex_float* vs, lapack_int ldvs,\n                           float* rconde, float* rcondv );\nlapack_int LAPACKE_zgeesx( int matrix_order, char jobvs, char sort,\n                           LAPACK_Z_SELECT1 select, char sense, lapack_int n,\n                           lapack_complex_double* a, lapack_int lda,\n                           lapack_int* sdim, lapack_complex_double* w,\n                           lapack_complex_double* vs, lapack_int ldvs,\n                           double* rconde, double* rcondv );\n\nlapack_int LAPACKE_sgeev( int matrix_order, char jobvl, char jobvr,\n                          lapack_int n, float* a, lapack_int lda, float* wr,\n                          float* wi, float* vl, lapack_int ldvl, float* vr,\n                          lapack_int ldvr );\nlapack_int LAPACKE_dgeev( int matrix_order, char jobvl, char jobvr,\n                          lapack_int n, double* a, lapack_int lda, double* wr,\n                          double* wi, double* vl, lapack_int ldvl, double* vr,\n                          lapack_int ldvr );\nlapack_int LAPACKE_cgeev( int matrix_order, char jobvl, char jobvr,\n                          lapack_int n, lapack_complex_float* a, lapack_int lda,\n                          lapack_complex_float* w, lapack_complex_float* vl,\n                          lapack_int ldvl, lapack_complex_float* vr,\n                          lapack_int ldvr );\nlapack_int LAPACKE_zgeev( int matrix_order, char jobvl, char jobvr,\n                          lapack_int n, lapack_complex_double* a,\n                          lapack_int lda, lapack_complex_double* w,\n                          lapack_complex_double* vl, lapack_int ldvl,\n                          lapack_complex_double* vr, lapack_int ldvr );\n\nlapack_int LAPACKE_sgeevx( int matrix_order, char balanc, char jobvl,\n                           char jobvr, char sense, lapack_int n, float* a,\n                           lapack_int lda, float* wr, float* wi, float* vl,\n                           lapack_int ldvl, float* vr, lapack_int ldvr,\n                           lapack_int* ilo, lapack_int* ihi, float* scale,\n                           float* abnrm, float* rconde, float* rcondv );\nlapack_int LAPACKE_dgeevx( int matrix_order, char balanc, char jobvl,\n                           char jobvr, char sense, lapack_int n, double* a,\n                           lapack_int lda, double* wr, double* wi, double* vl,\n                           lapack_int ldvl, double* vr, lapack_int ldvr,\n                           lapack_int* ilo, lapack_int* ihi, double* scale,\n                           double* abnrm, double* rconde, double* rcondv );\nlapack_int LAPACKE_cgeevx( int matrix_order, char balanc, char jobvl,\n                           char jobvr, char sense, lapack_int n,\n                           lapack_complex_float* a, lapack_int lda,\n                           lapack_complex_float* w, lapack_complex_float* vl,\n                           lapack_int ldvl, lapack_complex_float* vr,\n                           lapack_int ldvr, lapack_int* ilo, lapack_int* ihi,\n                           float* scale, float* abnrm, float* rconde,\n                           float* rcondv );\nlapack_int LAPACKE_zgeevx( int matrix_order, char balanc, char jobvl,\n                           char jobvr, char sense, lapack_int n,\n                           lapack_complex_double* a, lapack_int lda,\n                           lapack_complex_double* w, lapack_complex_double* vl,\n                           lapack_int ldvl, lapack_complex_double* vr,\n                           lapack_int ldvr, lapack_int* ilo, lapack_int* ihi,\n                           double* scale, double* abnrm, double* rconde,\n                           double* rcondv );\n\nlapack_int LAPACKE_sgehrd( int matrix_order, lapack_int n, lapack_int ilo,\n                           lapack_int ihi, float* a, lapack_int lda,\n                           float* tau );\nlapack_int LAPACKE_dgehrd( int matrix_order, lapack_int n, lapack_int ilo,\n                           lapack_int ihi, double* a, lapack_int lda,\n                           double* tau );\nlapack_int LAPACKE_cgehrd( int matrix_order, lapack_int n, lapack_int ilo,\n                           lapack_int ihi, lapack_complex_float* a,\n                           lapack_int lda, lapack_complex_float* tau );\nlapack_int LAPACKE_zgehrd( int matrix_order, lapack_int n, lapack_int ilo,\n                           lapack_int ihi, lapack_complex_double* a,\n                           lapack_int lda, lapack_complex_double* tau );\n\nlapack_int LAPACKE_sgejsv( int matrix_order, char joba, char jobu, char jobv,\n                           char jobr, char jobt, char jobp, lapack_int m,\n                           lapack_int n, float* a, lapack_int lda, float* sva,\n                           float* u, lapack_int ldu, float* v, lapack_int ldv,\n                           float* stat, lapack_int* istat );\nlapack_int LAPACKE_dgejsv( int matrix_order, char joba, char jobu, char jobv,\n                           char jobr, char jobt, char jobp, lapack_int m,\n                           lapack_int n, double* a, lapack_int lda, double* sva,\n                           double* u, lapack_int ldu, double* v, lapack_int ldv,\n                           double* stat, lapack_int* istat );\n\nlapack_int LAPACKE_sgelq2( int matrix_order, lapack_int m, lapack_int n,\n                           float* a, lapack_int lda, float* tau );\nlapack_int LAPACKE_dgelq2( int matrix_order, lapack_int m, lapack_int n,\n                           double* a, lapack_int lda, double* tau );\nlapack_int LAPACKE_cgelq2( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_complex_float* a, lapack_int lda,\n                           lapack_complex_float* tau );\nlapack_int LAPACKE_zgelq2( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_complex_double* a, lapack_int lda,\n                           lapack_complex_double* tau );\n\nlapack_int LAPACKE_sgelqf( int matrix_order, lapack_int m, lapack_int n,\n                           float* a, lapack_int lda, float* tau );\nlapack_int LAPACKE_dgelqf( int matrix_order, lapack_int m, lapack_int n,\n                           double* a, lapack_int lda, double* tau );\nlapack_int LAPACKE_cgelqf( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_complex_float* a, lapack_int lda,\n                           lapack_complex_float* tau );\nlapack_int LAPACKE_zgelqf( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_complex_double* a, lapack_int lda,\n                           lapack_complex_double* tau );\n\nlapack_int LAPACKE_sgels( int matrix_order, char trans, lapack_int m,\n                          lapack_int n, lapack_int nrhs, float* a,\n                          lapack_int lda, float* b, lapack_int ldb );\nlapack_int LAPACKE_dgels( int matrix_order, char trans, lapack_int m,\n                          lapack_int n, lapack_int nrhs, double* a,\n                          lapack_int lda, double* b, lapack_int ldb );\nlapack_int LAPACKE_cgels( int matrix_order, char trans, lapack_int m,\n                          lapack_int n, lapack_int nrhs,\n                          lapack_complex_float* a, lapack_int lda,\n                          lapack_complex_float* b, lapack_int ldb );\nlapack_int LAPACKE_zgels( int matrix_order, char trans, lapack_int m,\n                          lapack_int n, lapack_int nrhs,\n                          lapack_complex_double* a, lapack_int lda,\n                          lapack_complex_double* b, lapack_int ldb );\n\nlapack_int LAPACKE_sgelsd( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int nrhs, float* a, lapack_int lda, float* b,\n                           lapack_int ldb, float* s, float rcond,\n                           lapack_int* rank );\nlapack_int LAPACKE_dgelsd( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int nrhs, double* a, lapack_int lda,\n                           double* b, lapack_int ldb, double* s, double rcond,\n                           lapack_int* rank );\nlapack_int LAPACKE_cgelsd( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int nrhs, lapack_complex_float* a,\n                           lapack_int lda, lapack_complex_float* b,\n                           lapack_int ldb, float* s, float rcond,\n                           lapack_int* rank );\nlapack_int LAPACKE_zgelsd( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int nrhs, lapack_complex_double* a,\n                           lapack_int lda, lapack_complex_double* b,\n                           lapack_int ldb, double* s, double rcond,\n                           lapack_int* rank );\n\nlapack_int LAPACKE_sgelss( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int nrhs, float* a, lapack_int lda, float* b,\n                           lapack_int ldb, float* s, float rcond,\n                           lapack_int* rank );\nlapack_int LAPACKE_dgelss( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int nrhs, double* a, lapack_int lda,\n                           double* b, lapack_int ldb, double* s, double rcond,\n                           lapack_int* rank );\nlapack_int LAPACKE_cgelss( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int nrhs, lapack_complex_float* a,\n                           lapack_int lda, lapack_complex_float* b,\n                           lapack_int ldb, float* s, float rcond,\n                           lapack_int* rank );\nlapack_int LAPACKE_zgelss( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int nrhs, lapack_complex_double* a,\n                           lapack_int lda, lapack_complex_double* b,\n                           lapack_int ldb, double* s, double rcond,\n                           lapack_int* rank );\n\nlapack_int LAPACKE_sgelsy( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int nrhs, float* a, lapack_int lda, float* b,\n                           lapack_int ldb, lapack_int* jpvt, float rcond,\n                           lapack_int* rank );\nlapack_int LAPACKE_dgelsy( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int nrhs, double* a, lapack_int lda,\n                           double* b, lapack_int ldb, lapack_int* jpvt,\n                           double rcond, lapack_int* rank );\nlapack_int LAPACKE_cgelsy( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int nrhs, lapack_complex_float* a,\n                           lapack_int lda, lapack_complex_float* b,\n                           lapack_int ldb, lapack_int* jpvt, float rcond,\n                           lapack_int* rank );\nlapack_int LAPACKE_zgelsy( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int nrhs, lapack_complex_double* a,\n                           lapack_int lda, lapack_complex_double* b,\n                           lapack_int ldb, lapack_int* jpvt, double rcond,\n                           lapack_int* rank );\n\nlapack_int LAPACKE_sgeqlf( int matrix_order, lapack_int m, lapack_int n,\n                           float* a, lapack_int lda, float* tau );\nlapack_int LAPACKE_dgeqlf( int matrix_order, lapack_int m, lapack_int n,\n                           double* a, lapack_int lda, double* tau );\nlapack_int LAPACKE_cgeqlf( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_complex_float* a, lapack_int lda,\n                           lapack_complex_float* tau );\nlapack_int LAPACKE_zgeqlf( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_complex_double* a, lapack_int lda,\n                           lapack_complex_double* tau );\n\nlapack_int LAPACKE_sgeqp3( int matrix_order, lapack_int m, lapack_int n,\n                           float* a, lapack_int lda, lapack_int* jpvt,\n                           float* tau );\nlapack_int LAPACKE_dgeqp3( int matrix_order, lapack_int m, lapack_int n,\n                           double* a, lapack_int lda, lapack_int* jpvt,\n                           double* tau );\nlapack_int LAPACKE_cgeqp3( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_complex_float* a, lapack_int lda,\n                           lapack_int* jpvt, lapack_complex_float* tau );\nlapack_int LAPACKE_zgeqp3( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_complex_double* a, lapack_int lda,\n                           lapack_int* jpvt, lapack_complex_double* tau );\n\nlapack_int LAPACKE_sgeqpf( int matrix_order, lapack_int m, lapack_int n,\n                           float* a, lapack_int lda, lapack_int* jpvt,\n                           float* tau );\nlapack_int LAPACKE_dgeqpf( int matrix_order, lapack_int m, lapack_int n,\n                           double* a, lapack_int lda, lapack_int* jpvt,\n                           double* tau );\nlapack_int LAPACKE_cgeqpf( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_complex_float* a, lapack_int lda,\n                           lapack_int* jpvt, lapack_complex_float* tau );\nlapack_int LAPACKE_zgeqpf( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_complex_double* a, lapack_int lda,\n                           lapack_int* jpvt, lapack_complex_double* tau );\n\nlapack_int LAPACKE_sgeqr2( int matrix_order, lapack_int m, lapack_int n,\n                           float* a, lapack_int lda, float* tau );\nlapack_int LAPACKE_dgeqr2( int matrix_order, lapack_int m, lapack_int n,\n                           double* a, lapack_int lda, double* tau );\nlapack_int LAPACKE_cgeqr2( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_complex_float* a, lapack_int lda,\n                           lapack_complex_float* tau );\nlapack_int LAPACKE_zgeqr2( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_complex_double* a, lapack_int lda,\n                           lapack_complex_double* tau );\n\nlapack_int LAPACKE_sgeqrf( int matrix_order, lapack_int m, lapack_int n,\n                           float* a, lapack_int lda, float* tau );\nlapack_int LAPACKE_dgeqrf( int matrix_order, lapack_int m, lapack_int n,\n                           double* a, lapack_int lda, double* tau );\nlapack_int LAPACKE_cgeqrf( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_complex_float* a, lapack_int lda,\n                           lapack_complex_float* tau );\nlapack_int LAPACKE_zgeqrf( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_complex_double* a, lapack_int lda,\n                           lapack_complex_double* tau );\n\nlapack_int LAPACKE_sgeqrfp( int matrix_order, lapack_int m, lapack_int n,\n                            float* a, lapack_int lda, float* tau );\nlapack_int LAPACKE_dgeqrfp( int matrix_order, lapack_int m, lapack_int n,\n                            double* a, lapack_int lda, double* tau );\nlapack_int LAPACKE_cgeqrfp( int matrix_order, lapack_int m, lapack_int n,\n                            lapack_complex_float* a, lapack_int lda,\n                            lapack_complex_float* tau );\nlapack_int LAPACKE_zgeqrfp( int matrix_order, lapack_int m, lapack_int n,\n                            lapack_complex_double* a, lapack_int lda,\n                            lapack_complex_double* tau );\n\nlapack_int LAPACKE_sgerfs( int matrix_order, char trans, lapack_int n,\n                           lapack_int nrhs, const float* a, lapack_int lda,\n                           const float* af, lapack_int ldaf,\n                           const lapack_int* ipiv, const float* b,\n                           lapack_int ldb, float* x, lapack_int ldx,\n                           float* ferr, float* berr );\nlapack_int LAPACKE_dgerfs( int matrix_order, char trans, lapack_int n,\n                           lapack_int nrhs, const double* a, lapack_int lda,\n                           const double* af, lapack_int ldaf,\n                           const lapack_int* ipiv, const double* b,\n                           lapack_int ldb, double* x, lapack_int ldx,\n                           double* ferr, double* berr );\nlapack_int LAPACKE_cgerfs( int matrix_order, char trans, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_float* a,\n                           lapack_int lda, const lapack_complex_float* af,\n                           lapack_int ldaf, const lapack_int* ipiv,\n                           const lapack_complex_float* b, lapack_int ldb,\n                           lapack_complex_float* x, lapack_int ldx, float* ferr,\n                           float* berr );\nlapack_int LAPACKE_zgerfs( int matrix_order, char trans, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_double* a,\n                           lapack_int lda, const lapack_complex_double* af,\n                           lapack_int ldaf, const lapack_int* ipiv,\n                           const lapack_complex_double* b, lapack_int ldb,\n                           lapack_complex_double* x, lapack_int ldx,\n                           double* ferr, double* berr );\n\nlapack_int LAPACKE_sgerfsx( int matrix_order, char trans, char equed,\n                            lapack_int n, lapack_int nrhs, const float* a,\n                            lapack_int lda, const float* af, lapack_int ldaf,\n                            const lapack_int* ipiv, const float* r,\n                            const float* c, const float* b, lapack_int ldb,\n                            float* x, lapack_int ldx, float* rcond, float* berr,\n                            lapack_int n_err_bnds, float* err_bnds_norm,\n                            float* err_bnds_comp, lapack_int nparams,\n                            float* params );\nlapack_int LAPACKE_dgerfsx( int matrix_order, char trans, char equed,\n                            lapack_int n, lapack_int nrhs, const double* a,\n                            lapack_int lda, const double* af, lapack_int ldaf,\n                            const lapack_int* ipiv, const double* r,\n                            const double* c, const double* b, lapack_int ldb,\n                            double* x, lapack_int ldx, double* rcond,\n                            double* berr, lapack_int n_err_bnds,\n                            double* err_bnds_norm, double* err_bnds_comp,\n                            lapack_int nparams, double* params );\nlapack_int LAPACKE_cgerfsx( int matrix_order, char trans, char equed,\n                            lapack_int n, lapack_int nrhs,\n                            const lapack_complex_float* a, lapack_int lda,\n                            const lapack_complex_float* af, lapack_int ldaf,\n                            const lapack_int* ipiv, const float* r,\n                            const float* c, const lapack_complex_float* b,\n                            lapack_int ldb, lapack_complex_float* x,\n                            lapack_int ldx, float* rcond, float* berr,\n                            lapack_int n_err_bnds, float* err_bnds_norm,\n                            float* err_bnds_comp, lapack_int nparams,\n                            float* params );\nlapack_int LAPACKE_zgerfsx( int matrix_order, char trans, char equed,\n                            lapack_int n, lapack_int nrhs,\n                            const lapack_complex_double* a, lapack_int lda,\n                            const lapack_complex_double* af, lapack_int ldaf,\n                            const lapack_int* ipiv, const double* r,\n                            const double* c, const lapack_complex_double* b,\n                            lapack_int ldb, lapack_complex_double* x,\n                            lapack_int ldx, double* rcond, double* berr,\n                            lapack_int n_err_bnds, double* err_bnds_norm,\n                            double* err_bnds_comp, lapack_int nparams,\n                            double* params );\n\nlapack_int LAPACKE_sgerqf( int matrix_order, lapack_int m, lapack_int n,\n                           float* a, lapack_int lda, float* tau );\nlapack_int LAPACKE_dgerqf( int matrix_order, lapack_int m, lapack_int n,\n                           double* a, lapack_int lda, double* tau );\nlapack_int LAPACKE_cgerqf( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_complex_float* a, lapack_int lda,\n                           lapack_complex_float* tau );\nlapack_int LAPACKE_zgerqf( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_complex_double* a, lapack_int lda,\n                           lapack_complex_double* tau );\n\nlapack_int LAPACKE_sgesdd( int matrix_order, char jobz, lapack_int m,\n                           lapack_int n, float* a, lapack_int lda, float* s,\n                           float* u, lapack_int ldu, float* vt,\n                           lapack_int ldvt );\nlapack_int LAPACKE_dgesdd( int matrix_order, char jobz, lapack_int m,\n                           lapack_int n, double* a, lapack_int lda, double* s,\n                           double* u, lapack_int ldu, double* vt,\n                           lapack_int ldvt );\nlapack_int LAPACKE_cgesdd( int matrix_order, char jobz, lapack_int m,\n                           lapack_int n, lapack_complex_float* a,\n                           lapack_int lda, float* s, lapack_complex_float* u,\n                           lapack_int ldu, lapack_complex_float* vt,\n                           lapack_int ldvt );\nlapack_int LAPACKE_zgesdd( int matrix_order, char jobz, lapack_int m,\n                           lapack_int n, lapack_complex_double* a,\n                           lapack_int lda, double* s, lapack_complex_double* u,\n                           lapack_int ldu, lapack_complex_double* vt,\n                           lapack_int ldvt );\n\nlapack_int LAPACKE_sgesv( int matrix_order, lapack_int n, lapack_int nrhs,\n                          float* a, lapack_int lda, lapack_int* ipiv, float* b,\n                          lapack_int ldb );\nlapack_int LAPACKE_dgesv( int matrix_order, lapack_int n, lapack_int nrhs,\n                          double* a, lapack_int lda, lapack_int* ipiv,\n                          double* b, lapack_int ldb );\nlapack_int LAPACKE_cgesv( int matrix_order, lapack_int n, lapack_int nrhs,\n                          lapack_complex_float* a, lapack_int lda,\n                          lapack_int* ipiv, lapack_complex_float* b,\n                          lapack_int ldb );\nlapack_int LAPACKE_zgesv( int matrix_order, lapack_int n, lapack_int nrhs,\n                          lapack_complex_double* a, lapack_int lda,\n                          lapack_int* ipiv, lapack_complex_double* b,\n                          lapack_int ldb );\nlapack_int LAPACKE_dsgesv( int matrix_order, lapack_int n, lapack_int nrhs,\n                           double* a, lapack_int lda, lapack_int* ipiv,\n                           double* b, lapack_int ldb, double* x, lapack_int ldx,\n                           lapack_int* iter );\nlapack_int LAPACKE_zcgesv( int matrix_order, lapack_int n, lapack_int nrhs,\n                           lapack_complex_double* a, lapack_int lda,\n                           lapack_int* ipiv, lapack_complex_double* b,\n                           lapack_int ldb, lapack_complex_double* x,\n                           lapack_int ldx, lapack_int* iter );\n\nlapack_int LAPACKE_sgesvd( int matrix_order, char jobu, char jobvt,\n                           lapack_int m, lapack_int n, float* a, lapack_int lda,\n                           float* s, float* u, lapack_int ldu, float* vt,\n                           lapack_int ldvt, float* superb );\nlapack_int LAPACKE_dgesvd( int matrix_order, char jobu, char jobvt,\n                           lapack_int m, lapack_int n, double* a,\n                           lapack_int lda, double* s, double* u, lapack_int ldu,\n                           double* vt, lapack_int ldvt, double* superb );\nlapack_int LAPACKE_cgesvd( int matrix_order, char jobu, char jobvt,\n                           lapack_int m, lapack_int n, lapack_complex_float* a,\n                           lapack_int lda, float* s, lapack_complex_float* u,\n                           lapack_int ldu, lapack_complex_float* vt,\n                           lapack_int ldvt, float* superb );\nlapack_int LAPACKE_zgesvd( int matrix_order, char jobu, char jobvt,\n                           lapack_int m, lapack_int n, lapack_complex_double* a,\n                           lapack_int lda, double* s, lapack_complex_double* u,\n                           lapack_int ldu, lapack_complex_double* vt,\n                           lapack_int ldvt, double* superb );\n\nlapack_int LAPACKE_sgesvj( int matrix_order, char joba, char jobu, char jobv,\n                           lapack_int m, lapack_int n, float* a, lapack_int lda,\n                           float* sva, lapack_int mv, float* v, lapack_int ldv,\n                           float* stat );\nlapack_int LAPACKE_dgesvj( int matrix_order, char joba, char jobu, char jobv,\n                           lapack_int m, lapack_int n, double* a,\n                           lapack_int lda, double* sva, lapack_int mv,\n                           double* v, lapack_int ldv, double* stat );\n\nlapack_int LAPACKE_sgesvx( int matrix_order, char fact, char trans,\n                           lapack_int n, lapack_int nrhs, float* a,\n                           lapack_int lda, float* af, lapack_int ldaf,\n                           lapack_int* ipiv, char* equed, float* r, float* c,\n                           float* b, lapack_int ldb, float* x, lapack_int ldx,\n                           float* rcond, float* ferr, float* berr,\n                           float* rpivot );\nlapack_int LAPACKE_dgesvx( int matrix_order, char fact, char trans,\n                           lapack_int n, lapack_int nrhs, double* a,\n                           lapack_int lda, double* af, lapack_int ldaf,\n                           lapack_int* ipiv, char* equed, double* r, double* c,\n                           double* b, lapack_int ldb, double* x, lapack_int ldx,\n                           double* rcond, double* ferr, double* berr,\n                           double* rpivot );\nlapack_int LAPACKE_cgesvx( int matrix_order, char fact, char trans,\n                           lapack_int n, lapack_int nrhs,\n                           lapack_complex_float* a, lapack_int lda,\n                           lapack_complex_float* af, lapack_int ldaf,\n                           lapack_int* ipiv, char* equed, float* r, float* c,\n                           lapack_complex_float* b, lapack_int ldb,\n                           lapack_complex_float* x, lapack_int ldx,\n                           float* rcond, float* ferr, float* berr,\n                           float* rpivot );\nlapack_int LAPACKE_zgesvx( int matrix_order, char fact, char trans,\n                           lapack_int n, lapack_int nrhs,\n                           lapack_complex_double* a, lapack_int lda,\n                           lapack_complex_double* af, lapack_int ldaf,\n                           lapack_int* ipiv, char* equed, double* r, double* c,\n                           lapack_complex_double* b, lapack_int ldb,\n                           lapack_complex_double* x, lapack_int ldx,\n                           double* rcond, double* ferr, double* berr,\n                           double* rpivot );\n\nlapack_int LAPACKE_sgesvxx( int matrix_order, char fact, char trans,\n                            lapack_int n, lapack_int nrhs, float* a,\n                            lapack_int lda, float* af, lapack_int ldaf,\n                            lapack_int* ipiv, char* equed, float* r, float* c,\n                            float* b, lapack_int ldb, float* x, lapack_int ldx,\n                            float* rcond, float* rpvgrw, float* berr,\n                            lapack_int n_err_bnds, float* err_bnds_norm,\n                            float* err_bnds_comp, lapack_int nparams,\n                            float* params );\nlapack_int LAPACKE_dgesvxx( int matrix_order, char fact, char trans,\n                            lapack_int n, lapack_int nrhs, double* a,\n                            lapack_int lda, double* af, lapack_int ldaf,\n                            lapack_int* ipiv, char* equed, double* r, double* c,\n                            double* b, lapack_int ldb, double* x,\n                            lapack_int ldx, double* rcond, double* rpvgrw,\n                            double* berr, lapack_int n_err_bnds,\n                            double* err_bnds_norm, double* err_bnds_comp,\n                            lapack_int nparams, double* params );\nlapack_int LAPACKE_cgesvxx( int matrix_order, char fact, char trans,\n                            lapack_int n, lapack_int nrhs,\n                            lapack_complex_float* a, lapack_int lda,\n                            lapack_complex_float* af, lapack_int ldaf,\n                            lapack_int* ipiv, char* equed, float* r, float* c,\n                            lapack_complex_float* b, lapack_int ldb,\n                            lapack_complex_float* x, lapack_int ldx,\n                            float* rcond, float* rpvgrw, float* berr,\n                            lapack_int n_err_bnds, float* err_bnds_norm,\n                            float* err_bnds_comp, lapack_int nparams,\n                            float* params );\nlapack_int LAPACKE_zgesvxx( int matrix_order, char fact, char trans,\n                            lapack_int n, lapack_int nrhs,\n                            lapack_complex_double* a, lapack_int lda,\n                            lapack_complex_double* af, lapack_int ldaf,\n                            lapack_int* ipiv, char* equed, double* r, double* c,\n                            lapack_complex_double* b, lapack_int ldb,\n                            lapack_complex_double* x, lapack_int ldx,\n                            double* rcond, double* rpvgrw, double* berr,\n                            lapack_int n_err_bnds, double* err_bnds_norm,\n                            double* err_bnds_comp, lapack_int nparams,\n                            double* params );\n\nlapack_int LAPACKE_sgetf2( int matrix_order, lapack_int m, lapack_int n,\n                           float* a, lapack_int lda, lapack_int* ipiv );\nlapack_int LAPACKE_dgetf2( int matrix_order, lapack_int m, lapack_int n,\n                           double* a, lapack_int lda, lapack_int* ipiv );\nlapack_int LAPACKE_cgetf2( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_complex_float* a, lapack_int lda,\n                           lapack_int* ipiv );\nlapack_int LAPACKE_zgetf2( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_complex_double* a, lapack_int lda,\n                           lapack_int* ipiv );\n\nlapack_int LAPACKE_sgetrf( int matrix_order, lapack_int m, lapack_int n,\n                           float* a, lapack_int lda, lapack_int* ipiv );\nlapack_int LAPACKE_dgetrf( int matrix_order, lapack_int m, lapack_int n,\n                           double* a, lapack_int lda, lapack_int* ipiv );\nlapack_int LAPACKE_cgetrf( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_complex_float* a, lapack_int lda,\n                           lapack_int* ipiv );\nlapack_int LAPACKE_zgetrf( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_complex_double* a, lapack_int lda,\n                           lapack_int* ipiv );\n\nlapack_int LAPACKE_sgetri( int matrix_order, lapack_int n, float* a,\n                           lapack_int lda, const lapack_int* ipiv );\nlapack_int LAPACKE_dgetri( int matrix_order, lapack_int n, double* a,\n                           lapack_int lda, const lapack_int* ipiv );\nlapack_int LAPACKE_cgetri( int matrix_order, lapack_int n,\n                           lapack_complex_float* a, lapack_int lda,\n                           const lapack_int* ipiv );\nlapack_int LAPACKE_zgetri( int matrix_order, lapack_int n,\n                           lapack_complex_double* a, lapack_int lda,\n                           const lapack_int* ipiv );\n\nlapack_int LAPACKE_sgetrs( int matrix_order, char trans, lapack_int n,\n                           lapack_int nrhs, const float* a, lapack_int lda,\n                           const lapack_int* ipiv, float* b, lapack_int ldb );\nlapack_int LAPACKE_dgetrs( int matrix_order, char trans, lapack_int n,\n                           lapack_int nrhs, const double* a, lapack_int lda,\n                           const lapack_int* ipiv, double* b, lapack_int ldb );\nlapack_int LAPACKE_cgetrs( int matrix_order, char trans, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_float* a,\n                           lapack_int lda, const lapack_int* ipiv,\n                           lapack_complex_float* b, lapack_int ldb );\nlapack_int LAPACKE_zgetrs( int matrix_order, char trans, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_double* a,\n                           lapack_int lda, const lapack_int* ipiv,\n                           lapack_complex_double* b, lapack_int ldb );\n\nlapack_int LAPACKE_sggbak( int matrix_order, char job, char side, lapack_int n,\n                           lapack_int ilo, lapack_int ihi, const float* lscale,\n                           const float* rscale, lapack_int m, float* v,\n                           lapack_int ldv );\nlapack_int LAPACKE_dggbak( int matrix_order, char job, char side, lapack_int n,\n                           lapack_int ilo, lapack_int ihi, const double* lscale,\n                           const double* rscale, lapack_int m, double* v,\n                           lapack_int ldv );\nlapack_int LAPACKE_cggbak( int matrix_order, char job, char side, lapack_int n,\n                           lapack_int ilo, lapack_int ihi, const float* lscale,\n                           const float* rscale, lapack_int m,\n                           lapack_complex_float* v, lapack_int ldv );\nlapack_int LAPACKE_zggbak( int matrix_order, char job, char side, lapack_int n,\n                           lapack_int ilo, lapack_int ihi, const double* lscale,\n                           const double* rscale, lapack_int m,\n                           lapack_complex_double* v, lapack_int ldv );\n\nlapack_int LAPACKE_sggbal( int matrix_order, char job, lapack_int n, float* a,\n                           lapack_int lda, float* b, lapack_int ldb,\n                           lapack_int* ilo, lapack_int* ihi, float* lscale,\n                           float* rscale );\nlapack_int LAPACKE_dggbal( int matrix_order, char job, lapack_int n, double* a,\n                           lapack_int lda, double* b, lapack_int ldb,\n                           lapack_int* ilo, lapack_int* ihi, double* lscale,\n                           double* rscale );\nlapack_int LAPACKE_cggbal( int matrix_order, char job, lapack_int n,\n                           lapack_complex_float* a, lapack_int lda,\n                           lapack_complex_float* b, lapack_int ldb,\n                           lapack_int* ilo, lapack_int* ihi, float* lscale,\n                           float* rscale );\nlapack_int LAPACKE_zggbal( int matrix_order, char job, lapack_int n,\n                           lapack_complex_double* a, lapack_int lda,\n                           lapack_complex_double* b, lapack_int ldb,\n                           lapack_int* ilo, lapack_int* ihi, double* lscale,\n                           double* rscale );\n\nlapack_int LAPACKE_sgges( int matrix_order, char jobvsl, char jobvsr, char sort,\n                          LAPACK_S_SELECT3 selctg, lapack_int n, float* a,\n                          lapack_int lda, float* b, lapack_int ldb,\n                          lapack_int* sdim, float* alphar, float* alphai,\n                          float* beta, float* vsl, lapack_int ldvsl, float* vsr,\n                          lapack_int ldvsr );\nlapack_int LAPACKE_dgges( int matrix_order, char jobvsl, char jobvsr, char sort,\n                          LAPACK_D_SELECT3 selctg, lapack_int n, double* a,\n                          lapack_int lda, double* b, lapack_int ldb,\n                          lapack_int* sdim, double* alphar, double* alphai,\n                          double* beta, double* vsl, lapack_int ldvsl,\n                          double* vsr, lapack_int ldvsr );\nlapack_int LAPACKE_cgges( int matrix_order, char jobvsl, char jobvsr, char sort,\n                          LAPACK_C_SELECT2 selctg, lapack_int n,\n                          lapack_complex_float* a, lapack_int lda,\n                          lapack_complex_float* b, lapack_int ldb,\n                          lapack_int* sdim, lapack_complex_float* alpha,\n                          lapack_complex_float* beta, lapack_complex_float* vsl,\n                          lapack_int ldvsl, lapack_complex_float* vsr,\n                          lapack_int ldvsr );\nlapack_int LAPACKE_zgges( int matrix_order, char jobvsl, char jobvsr, char sort,\n                          LAPACK_Z_SELECT2 selctg, lapack_int n,\n                          lapack_complex_double* a, lapack_int lda,\n                          lapack_complex_double* b, lapack_int ldb,\n                          lapack_int* sdim, lapack_complex_double* alpha,\n                          lapack_complex_double* beta,\n                          lapack_complex_double* vsl, lapack_int ldvsl,\n                          lapack_complex_double* vsr, lapack_int ldvsr );\n\nlapack_int LAPACKE_sggesx( int matrix_order, char jobvsl, char jobvsr,\n                           char sort, LAPACK_S_SELECT3 selctg, char sense,\n                           lapack_int n, float* a, lapack_int lda, float* b,\n                           lapack_int ldb, lapack_int* sdim, float* alphar,\n                           float* alphai, float* beta, float* vsl,\n                           lapack_int ldvsl, float* vsr, lapack_int ldvsr,\n                           float* rconde, float* rcondv );\nlapack_int LAPACKE_dggesx( int matrix_order, char jobvsl, char jobvsr,\n                           char sort, LAPACK_D_SELECT3 selctg, char sense,\n                           lapack_int n, double* a, lapack_int lda, double* b,\n                           lapack_int ldb, lapack_int* sdim, double* alphar,\n                           double* alphai, double* beta, double* vsl,\n                           lapack_int ldvsl, double* vsr, lapack_int ldvsr,\n                           double* rconde, double* rcondv );\nlapack_int LAPACKE_cggesx( int matrix_order, char jobvsl, char jobvsr,\n                           char sort, LAPACK_C_SELECT2 selctg, char sense,\n                           lapack_int n, lapack_complex_float* a,\n                           lapack_int lda, lapack_complex_float* b,\n                           lapack_int ldb, lapack_int* sdim,\n                           lapack_complex_float* alpha,\n                           lapack_complex_float* beta,\n                           lapack_complex_float* vsl, lapack_int ldvsl,\n                           lapack_complex_float* vsr, lapack_int ldvsr,\n                           float* rconde, float* rcondv );\nlapack_int LAPACKE_zggesx( int matrix_order, char jobvsl, char jobvsr,\n                           char sort, LAPACK_Z_SELECT2 selctg, char sense,\n                           lapack_int n, lapack_complex_double* a,\n                           lapack_int lda, lapack_complex_double* b,\n                           lapack_int ldb, lapack_int* sdim,\n                           lapack_complex_double* alpha,\n                           lapack_complex_double* beta,\n                           lapack_complex_double* vsl, lapack_int ldvsl,\n                           lapack_complex_double* vsr, lapack_int ldvsr,\n                           double* rconde, double* rcondv );\n\nlapack_int LAPACKE_sggev( int matrix_order, char jobvl, char jobvr,\n                          lapack_int n, float* a, lapack_int lda, float* b,\n                          lapack_int ldb, float* alphar, float* alphai,\n                          float* beta, float* vl, lapack_int ldvl, float* vr,\n                          lapack_int ldvr );\nlapack_int LAPACKE_dggev( int matrix_order, char jobvl, char jobvr,\n                          lapack_int n, double* a, lapack_int lda, double* b,\n                          lapack_int ldb, double* alphar, double* alphai,\n                          double* beta, double* vl, lapack_int ldvl, double* vr,\n                          lapack_int ldvr );\nlapack_int LAPACKE_cggev( int matrix_order, char jobvl, char jobvr,\n                          lapack_int n, lapack_complex_float* a, lapack_int lda,\n                          lapack_complex_float* b, lapack_int ldb,\n                          lapack_complex_float* alpha,\n                          lapack_complex_float* beta, lapack_complex_float* vl,\n                          lapack_int ldvl, lapack_complex_float* vr,\n                          lapack_int ldvr );\nlapack_int LAPACKE_zggev( int matrix_order, char jobvl, char jobvr,\n                          lapack_int n, lapack_complex_double* a,\n                          lapack_int lda, lapack_complex_double* b,\n                          lapack_int ldb, lapack_complex_double* alpha,\n                          lapack_complex_double* beta,\n                          lapack_complex_double* vl, lapack_int ldvl,\n                          lapack_complex_double* vr, lapack_int ldvr );\n\nlapack_int LAPACKE_sggevx( int matrix_order, char balanc, char jobvl,\n                           char jobvr, char sense, lapack_int n, float* a,\n                           lapack_int lda, float* b, lapack_int ldb,\n                           float* alphar, float* alphai, float* beta, float* vl,\n                           lapack_int ldvl, float* vr, lapack_int ldvr,\n                           lapack_int* ilo, lapack_int* ihi, float* lscale,\n                           float* rscale, float* abnrm, float* bbnrm,\n                           float* rconde, float* rcondv );\nlapack_int LAPACKE_dggevx( int matrix_order, char balanc, char jobvl,\n                           char jobvr, char sense, lapack_int n, double* a,\n                           lapack_int lda, double* b, lapack_int ldb,\n                           double* alphar, double* alphai, double* beta,\n                           double* vl, lapack_int ldvl, double* vr,\n                           lapack_int ldvr, lapack_int* ilo, lapack_int* ihi,\n                           double* lscale, double* rscale, double* abnrm,\n                           double* bbnrm, double* rconde, double* rcondv );\nlapack_int LAPACKE_cggevx( int matrix_order, char balanc, char jobvl,\n                           char jobvr, char sense, lapack_int n,\n                           lapack_complex_float* a, lapack_int lda,\n                           lapack_complex_float* b, lapack_int ldb,\n                           lapack_complex_float* alpha,\n                           lapack_complex_float* beta, lapack_complex_float* vl,\n                           lapack_int ldvl, lapack_complex_float* vr,\n                           lapack_int ldvr, lapack_int* ilo, lapack_int* ihi,\n                           float* lscale, float* rscale, float* abnrm,\n                           float* bbnrm, float* rconde, float* rcondv );\nlapack_int LAPACKE_zggevx( int matrix_order, char balanc, char jobvl,\n                           char jobvr, char sense, lapack_int n,\n                           lapack_complex_double* a, lapack_int lda,\n                           lapack_complex_double* b, lapack_int ldb,\n                           lapack_complex_double* alpha,\n                           lapack_complex_double* beta,\n                           lapack_complex_double* vl, lapack_int ldvl,\n                           lapack_complex_double* vr, lapack_int ldvr,\n                           lapack_int* ilo, lapack_int* ihi, double* lscale,\n                           double* rscale, double* abnrm, double* bbnrm,\n                           double* rconde, double* rcondv );\n\nlapack_int LAPACKE_sggglm( int matrix_order, lapack_int n, lapack_int m,\n                           lapack_int p, float* a, lapack_int lda, float* b,\n                           lapack_int ldb, float* d, float* x, float* y );\nlapack_int LAPACKE_dggglm( int matrix_order, lapack_int n, lapack_int m,\n                           lapack_int p, double* a, lapack_int lda, double* b,\n                           lapack_int ldb, double* d, double* x, double* y );\nlapack_int LAPACKE_cggglm( int matrix_order, lapack_int n, lapack_int m,\n                           lapack_int p, lapack_complex_float* a,\n                           lapack_int lda, lapack_complex_float* b,\n                           lapack_int ldb, lapack_complex_float* d,\n                           lapack_complex_float* x, lapack_complex_float* y );\nlapack_int LAPACKE_zggglm( int matrix_order, lapack_int n, lapack_int m,\n                           lapack_int p, lapack_complex_double* a,\n                           lapack_int lda, lapack_complex_double* b,\n                           lapack_int ldb, lapack_complex_double* d,\n                           lapack_complex_double* x, lapack_complex_double* y );\n\nlapack_int LAPACKE_sgghrd( int matrix_order, char compq, char compz,\n                           lapack_int n, lapack_int ilo, lapack_int ihi,\n                           float* a, lapack_int lda, float* b, lapack_int ldb,\n                           float* q, lapack_int ldq, float* z, lapack_int ldz );\nlapack_int LAPACKE_dgghrd( int matrix_order, char compq, char compz,\n                           lapack_int n, lapack_int ilo, lapack_int ihi,\n                           double* a, lapack_int lda, double* b, lapack_int ldb,\n                           double* q, lapack_int ldq, double* z,\n                           lapack_int ldz );\nlapack_int LAPACKE_cgghrd( int matrix_order, char compq, char compz,\n                           lapack_int n, lapack_int ilo, lapack_int ihi,\n                           lapack_complex_float* a, lapack_int lda,\n                           lapack_complex_float* b, lapack_int ldb,\n                           lapack_complex_float* q, lapack_int ldq,\n                           lapack_complex_float* z, lapack_int ldz );\nlapack_int LAPACKE_zgghrd( int matrix_order, char compq, char compz,\n                           lapack_int n, lapack_int ilo, lapack_int ihi,\n                           lapack_complex_double* a, lapack_int lda,\n                           lapack_complex_double* b, lapack_int ldb,\n                           lapack_complex_double* q, lapack_int ldq,\n                           lapack_complex_double* z, lapack_int ldz );\n\nlapack_int LAPACKE_sgglse( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int p, float* a, lapack_int lda, float* b,\n                           lapack_int ldb, float* c, float* d, float* x );\nlapack_int LAPACKE_dgglse( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int p, double* a, lapack_int lda, double* b,\n                           lapack_int ldb, double* c, double* d, double* x );\nlapack_int LAPACKE_cgglse( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int p, lapack_complex_float* a,\n                           lapack_int lda, lapack_complex_float* b,\n                           lapack_int ldb, lapack_complex_float* c,\n                           lapack_complex_float* d, lapack_complex_float* x );\nlapack_int LAPACKE_zgglse( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int p, lapack_complex_double* a,\n                           lapack_int lda, lapack_complex_double* b,\n                           lapack_int ldb, lapack_complex_double* c,\n                           lapack_complex_double* d, lapack_complex_double* x );\n\nlapack_int LAPACKE_sggqrf( int matrix_order, lapack_int n, lapack_int m,\n                           lapack_int p, float* a, lapack_int lda, float* taua,\n                           float* b, lapack_int ldb, float* taub );\nlapack_int LAPACKE_dggqrf( int matrix_order, lapack_int n, lapack_int m,\n                           lapack_int p, double* a, lapack_int lda,\n                           double* taua, double* b, lapack_int ldb,\n                           double* taub );\nlapack_int LAPACKE_cggqrf( int matrix_order, lapack_int n, lapack_int m,\n                           lapack_int p, lapack_complex_float* a,\n                           lapack_int lda, lapack_complex_float* taua,\n                           lapack_complex_float* b, lapack_int ldb,\n                           lapack_complex_float* taub );\nlapack_int LAPACKE_zggqrf( int matrix_order, lapack_int n, lapack_int m,\n                           lapack_int p, lapack_complex_double* a,\n                           lapack_int lda, lapack_complex_double* taua,\n                           lapack_complex_double* b, lapack_int ldb,\n                           lapack_complex_double* taub );\n\nlapack_int LAPACKE_sggrqf( int matrix_order, lapack_int m, lapack_int p,\n                           lapack_int n, float* a, lapack_int lda, float* taua,\n                           float* b, lapack_int ldb, float* taub );\nlapack_int LAPACKE_dggrqf( int matrix_order, lapack_int m, lapack_int p,\n                           lapack_int n, double* a, lapack_int lda,\n                           double* taua, double* b, lapack_int ldb,\n                           double* taub );\nlapack_int LAPACKE_cggrqf( int matrix_order, lapack_int m, lapack_int p,\n                           lapack_int n, lapack_complex_float* a,\n                           lapack_int lda, lapack_complex_float* taua,\n                           lapack_complex_float* b, lapack_int ldb,\n                           lapack_complex_float* taub );\nlapack_int LAPACKE_zggrqf( int matrix_order, lapack_int m, lapack_int p,\n                           lapack_int n, lapack_complex_double* a,\n                           lapack_int lda, lapack_complex_double* taua,\n                           lapack_complex_double* b, lapack_int ldb,\n                           lapack_complex_double* taub );\n\nlapack_int LAPACKE_sggsvd( int matrix_order, char jobu, char jobv, char jobq,\n                           lapack_int m, lapack_int n, lapack_int p,\n                           lapack_int* k, lapack_int* l, float* a,\n                           lapack_int lda, float* b, lapack_int ldb,\n                           float* alpha, float* beta, float* u, lapack_int ldu,\n                           float* v, lapack_int ldv, float* q, lapack_int ldq,\n                           lapack_int* iwork );\nlapack_int LAPACKE_dggsvd( int matrix_order, char jobu, char jobv, char jobq,\n                           lapack_int m, lapack_int n, lapack_int p,\n                           lapack_int* k, lapack_int* l, double* a,\n                           lapack_int lda, double* b, lapack_int ldb,\n                           double* alpha, double* beta, double* u,\n                           lapack_int ldu, double* v, lapack_int ldv, double* q,\n                           lapack_int ldq, lapack_int* iwork );\nlapack_int LAPACKE_cggsvd( int matrix_order, char jobu, char jobv, char jobq,\n                           lapack_int m, lapack_int n, lapack_int p,\n                           lapack_int* k, lapack_int* l,\n                           lapack_complex_float* a, lapack_int lda,\n                           lapack_complex_float* b, lapack_int ldb,\n                           float* alpha, float* beta, lapack_complex_float* u,\n                           lapack_int ldu, lapack_complex_float* v,\n                           lapack_int ldv, lapack_complex_float* q,\n                           lapack_int ldq, lapack_int* iwork );\nlapack_int LAPACKE_zggsvd( int matrix_order, char jobu, char jobv, char jobq,\n                           lapack_int m, lapack_int n, lapack_int p,\n                           lapack_int* k, lapack_int* l,\n                           lapack_complex_double* a, lapack_int lda,\n                           lapack_complex_double* b, lapack_int ldb,\n                           double* alpha, double* beta,\n                           lapack_complex_double* u, lapack_int ldu,\n                           lapack_complex_double* v, lapack_int ldv,\n                           lapack_complex_double* q, lapack_int ldq,\n                           lapack_int* iwork );\n\nlapack_int LAPACKE_sggsvp( int matrix_order, char jobu, char jobv, char jobq,\n                           lapack_int m, lapack_int p, lapack_int n, float* a,\n                           lapack_int lda, float* b, lapack_int ldb, float tola,\n                           float tolb, lapack_int* k, lapack_int* l, float* u,\n                           lapack_int ldu, float* v, lapack_int ldv, float* q,\n                           lapack_int ldq );\nlapack_int LAPACKE_dggsvp( int matrix_order, char jobu, char jobv, char jobq,\n                           lapack_int m, lapack_int p, lapack_int n, double* a,\n                           lapack_int lda, double* b, lapack_int ldb,\n                           double tola, double tolb, lapack_int* k,\n                           lapack_int* l, double* u, lapack_int ldu, double* v,\n                           lapack_int ldv, double* q, lapack_int ldq );\nlapack_int LAPACKE_cggsvp( int matrix_order, char jobu, char jobv, char jobq,\n                           lapack_int m, lapack_int p, lapack_int n,\n                           lapack_complex_float* a, lapack_int lda,\n                           lapack_complex_float* b, lapack_int ldb, float tola,\n                           float tolb, lapack_int* k, lapack_int* l,\n                           lapack_complex_float* u, lapack_int ldu,\n                           lapack_complex_float* v, lapack_int ldv,\n                           lapack_complex_float* q, lapack_int ldq );\nlapack_int LAPACKE_zggsvp( int matrix_order, char jobu, char jobv, char jobq,\n                           lapack_int m, lapack_int p, lapack_int n,\n                           lapack_complex_double* a, lapack_int lda,\n                           lapack_complex_double* b, lapack_int ldb,\n                           double tola, double tolb, lapack_int* k,\n                           lapack_int* l, lapack_complex_double* u,\n                           lapack_int ldu, lapack_complex_double* v,\n                           lapack_int ldv, lapack_complex_double* q,\n                           lapack_int ldq );\n\nlapack_int LAPACKE_sgtcon( char norm, lapack_int n, const float* dl,\n                           const float* d, const float* du, const float* du2,\n                           const lapack_int* ipiv, float anorm, float* rcond );\nlapack_int LAPACKE_dgtcon( char norm, lapack_int n, const double* dl,\n                           const double* d, const double* du, const double* du2,\n                           const lapack_int* ipiv, double anorm,\n                           double* rcond );\nlapack_int LAPACKE_cgtcon( char norm, lapack_int n,\n                           const lapack_complex_float* dl,\n                           const lapack_complex_float* d,\n                           const lapack_complex_float* du,\n                           const lapack_complex_float* du2,\n                           const lapack_int* ipiv, float anorm, float* rcond );\nlapack_int LAPACKE_zgtcon( char norm, lapack_int n,\n                           const lapack_complex_double* dl,\n                           const lapack_complex_double* d,\n                           const lapack_complex_double* du,\n                           const lapack_complex_double* du2,\n                           const lapack_int* ipiv, double anorm,\n                           double* rcond );\n\nlapack_int LAPACKE_sgtrfs( int matrix_order, char trans, lapack_int n,\n                           lapack_int nrhs, const float* dl, const float* d,\n                           const float* du, const float* dlf, const float* df,\n                           const float* duf, const float* du2,\n                           const lapack_int* ipiv, const float* b,\n                           lapack_int ldb, float* x, lapack_int ldx,\n                           float* ferr, float* berr );\nlapack_int LAPACKE_dgtrfs( int matrix_order, char trans, lapack_int n,\n                           lapack_int nrhs, const double* dl, const double* d,\n                           const double* du, const double* dlf,\n                           const double* df, const double* duf,\n                           const double* du2, const lapack_int* ipiv,\n                           const double* b, lapack_int ldb, double* x,\n                           lapack_int ldx, double* ferr, double* berr );\nlapack_int LAPACKE_cgtrfs( int matrix_order, char trans, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_float* dl,\n                           const lapack_complex_float* d,\n                           const lapack_complex_float* du,\n                           const lapack_complex_float* dlf,\n                           const lapack_complex_float* df,\n                           const lapack_complex_float* duf,\n                           const lapack_complex_float* du2,\n                           const lapack_int* ipiv,\n                           const lapack_complex_float* b, lapack_int ldb,\n                           lapack_complex_float* x, lapack_int ldx, float* ferr,\n                           float* berr );\nlapack_int LAPACKE_zgtrfs( int matrix_order, char trans, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_double* dl,\n                           const lapack_complex_double* d,\n                           const lapack_complex_double* du,\n                           const lapack_complex_double* dlf,\n                           const lapack_complex_double* df,\n                           const lapack_complex_double* duf,\n                           const lapack_complex_double* du2,\n                           const lapack_int* ipiv,\n                           const lapack_complex_double* b, lapack_int ldb,\n                           lapack_complex_double* x, lapack_int ldx,\n                           double* ferr, double* berr );\n\nlapack_int LAPACKE_sgtsv( int matrix_order, lapack_int n, lapack_int nrhs,\n                          float* dl, float* d, float* du, float* b,\n                          lapack_int ldb );\nlapack_int LAPACKE_dgtsv( int matrix_order, lapack_int n, lapack_int nrhs,\n                          double* dl, double* d, double* du, double* b,\n                          lapack_int ldb );\nlapack_int LAPACKE_cgtsv( int matrix_order, lapack_int n, lapack_int nrhs,\n                          lapack_complex_float* dl, lapack_complex_float* d,\n                          lapack_complex_float* du, lapack_complex_float* b,\n                          lapack_int ldb );\nlapack_int LAPACKE_zgtsv( int matrix_order, lapack_int n, lapack_int nrhs,\n                          lapack_complex_double* dl, lapack_complex_double* d,\n                          lapack_complex_double* du, lapack_complex_double* b,\n                          lapack_int ldb );\n\nlapack_int LAPACKE_sgtsvx( int matrix_order, char fact, char trans,\n                           lapack_int n, lapack_int nrhs, const float* dl,\n                           const float* d, const float* du, float* dlf,\n                           float* df, float* duf, float* du2, lapack_int* ipiv,\n                           const float* b, lapack_int ldb, float* x,\n                           lapack_int ldx, float* rcond, float* ferr,\n                           float* berr );\nlapack_int LAPACKE_dgtsvx( int matrix_order, char fact, char trans,\n                           lapack_int n, lapack_int nrhs, const double* dl,\n                           const double* d, const double* du, double* dlf,\n                           double* df, double* duf, double* du2,\n                           lapack_int* ipiv, const double* b, lapack_int ldb,\n                           double* x, lapack_int ldx, double* rcond,\n                           double* ferr, double* berr );\nlapack_int LAPACKE_cgtsvx( int matrix_order, char fact, char trans,\n                           lapack_int n, lapack_int nrhs,\n                           const lapack_complex_float* dl,\n                           const lapack_complex_float* d,\n                           const lapack_complex_float* du,\n                           lapack_complex_float* dlf, lapack_complex_float* df,\n                           lapack_complex_float* duf, lapack_complex_float* du2,\n                           lapack_int* ipiv, const lapack_complex_float* b,\n                           lapack_int ldb, lapack_complex_float* x,\n                           lapack_int ldx, float* rcond, float* ferr,\n                           float* berr );\nlapack_int LAPACKE_zgtsvx( int matrix_order, char fact, char trans,\n                           lapack_int n, lapack_int nrhs,\n                           const lapack_complex_double* dl,\n                           const lapack_complex_double* d,\n                           const lapack_complex_double* du,\n                           lapack_complex_double* dlf,\n                           lapack_complex_double* df,\n                           lapack_complex_double* duf,\n                           lapack_complex_double* du2, lapack_int* ipiv,\n                           const lapack_complex_double* b, lapack_int ldb,\n                           lapack_complex_double* x, lapack_int ldx,\n                           double* rcond, double* ferr, double* berr );\n\nlapack_int LAPACKE_sgttrf( lapack_int n, float* dl, float* d, float* du,\n                           float* du2, lapack_int* ipiv );\nlapack_int LAPACKE_dgttrf( lapack_int n, double* dl, double* d, double* du,\n                           double* du2, lapack_int* ipiv );\nlapack_int LAPACKE_cgttrf( lapack_int n, lapack_complex_float* dl,\n                           lapack_complex_float* d, lapack_complex_float* du,\n                           lapack_complex_float* du2, lapack_int* ipiv );\nlapack_int LAPACKE_zgttrf( lapack_int n, lapack_complex_double* dl,\n                           lapack_complex_double* d, lapack_complex_double* du,\n                           lapack_complex_double* du2, lapack_int* ipiv );\n\nlapack_int LAPACKE_sgttrs( int matrix_order, char trans, lapack_int n,\n                           lapack_int nrhs, const float* dl, const float* d,\n                           const float* du, const float* du2,\n                           const lapack_int* ipiv, float* b, lapack_int ldb );\nlapack_int LAPACKE_dgttrs( int matrix_order, char trans, lapack_int n,\n                           lapack_int nrhs, const double* dl, const double* d,\n                           const double* du, const double* du2,\n                           const lapack_int* ipiv, double* b, lapack_int ldb );\nlapack_int LAPACKE_cgttrs( int matrix_order, char trans, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_float* dl,\n                           const lapack_complex_float* d,\n                           const lapack_complex_float* du,\n                           const lapack_complex_float* du2,\n                           const lapack_int* ipiv, lapack_complex_float* b,\n                           lapack_int ldb );\nlapack_int LAPACKE_zgttrs( int matrix_order, char trans, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_double* dl,\n                           const lapack_complex_double* d,\n                           const lapack_complex_double* du,\n                           const lapack_complex_double* du2,\n                           const lapack_int* ipiv, lapack_complex_double* b,\n                           lapack_int ldb );\n\nlapack_int LAPACKE_chbev( int matrix_order, char jobz, char uplo, lapack_int n,\n                          lapack_int kd, lapack_complex_float* ab,\n                          lapack_int ldab, float* w, lapack_complex_float* z,\n                          lapack_int ldz );\nlapack_int LAPACKE_zhbev( int matrix_order, char jobz, char uplo, lapack_int n,\n                          lapack_int kd, lapack_complex_double* ab,\n                          lapack_int ldab, double* w, lapack_complex_double* z,\n                          lapack_int ldz );\n\nlapack_int LAPACKE_chbevd( int matrix_order, char jobz, char uplo, lapack_int n,\n                           lapack_int kd, lapack_complex_float* ab,\n                           lapack_int ldab, float* w, lapack_complex_float* z,\n                           lapack_int ldz );\nlapack_int LAPACKE_zhbevd( int matrix_order, char jobz, char uplo, lapack_int n,\n                           lapack_int kd, lapack_complex_double* ab,\n                           lapack_int ldab, double* w, lapack_complex_double* z,\n                           lapack_int ldz );\n\nlapack_int LAPACKE_chbevx( int matrix_order, char jobz, char range, char uplo,\n                           lapack_int n, lapack_int kd,\n                           lapack_complex_float* ab, lapack_int ldab,\n                           lapack_complex_float* q, lapack_int ldq, float vl,\n                           float vu, lapack_int il, lapack_int iu, float abstol,\n                           lapack_int* m, float* w, lapack_complex_float* z,\n                           lapack_int ldz, lapack_int* ifail );\nlapack_int LAPACKE_zhbevx( int matrix_order, char jobz, char range, char uplo,\n                           lapack_int n, lapack_int kd,\n                           lapack_complex_double* ab, lapack_int ldab,\n                           lapack_complex_double* q, lapack_int ldq, double vl,\n                           double vu, lapack_int il, lapack_int iu,\n                           double abstol, lapack_int* m, double* w,\n                           lapack_complex_double* z, lapack_int ldz,\n                           lapack_int* ifail );\n\nlapack_int LAPACKE_chbgst( int matrix_order, char vect, char uplo, lapack_int n,\n                           lapack_int ka, lapack_int kb,\n                           lapack_complex_float* ab, lapack_int ldab,\n                           const lapack_complex_float* bb, lapack_int ldbb,\n                           lapack_complex_float* x, lapack_int ldx );\nlapack_int LAPACKE_zhbgst( int matrix_order, char vect, char uplo, lapack_int n,\n                           lapack_int ka, lapack_int kb,\n                           lapack_complex_double* ab, lapack_int ldab,\n                           const lapack_complex_double* bb, lapack_int ldbb,\n                           lapack_complex_double* x, lapack_int ldx );\n\nlapack_int LAPACKE_chbgv( int matrix_order, char jobz, char uplo, lapack_int n,\n                          lapack_int ka, lapack_int kb,\n                          lapack_complex_float* ab, lapack_int ldab,\n                          lapack_complex_float* bb, lapack_int ldbb, float* w,\n                          lapack_complex_float* z, lapack_int ldz );\nlapack_int LAPACKE_zhbgv( int matrix_order, char jobz, char uplo, lapack_int n,\n                          lapack_int ka, lapack_int kb,\n                          lapack_complex_double* ab, lapack_int ldab,\n                          lapack_complex_double* bb, lapack_int ldbb, double* w,\n                          lapack_complex_double* z, lapack_int ldz );\n\nlapack_int LAPACKE_chbgvd( int matrix_order, char jobz, char uplo, lapack_int n,\n                           lapack_int ka, lapack_int kb,\n                           lapack_complex_float* ab, lapack_int ldab,\n                           lapack_complex_float* bb, lapack_int ldbb, float* w,\n                           lapack_complex_float* z, lapack_int ldz );\nlapack_int LAPACKE_zhbgvd( int matrix_order, char jobz, char uplo, lapack_int n,\n                           lapack_int ka, lapack_int kb,\n                           lapack_complex_double* ab, lapack_int ldab,\n                           lapack_complex_double* bb, lapack_int ldbb,\n                           double* w, lapack_complex_double* z,\n                           lapack_int ldz );\n\nlapack_int LAPACKE_chbgvx( int matrix_order, char jobz, char range, char uplo,\n                           lapack_int n, lapack_int ka, lapack_int kb,\n                           lapack_complex_float* ab, lapack_int ldab,\n                           lapack_complex_float* bb, lapack_int ldbb,\n                           lapack_complex_float* q, lapack_int ldq, float vl,\n                           float vu, lapack_int il, lapack_int iu, float abstol,\n                           lapack_int* m, float* w, lapack_complex_float* z,\n                           lapack_int ldz, lapack_int* ifail );\nlapack_int LAPACKE_zhbgvx( int matrix_order, char jobz, char range, char uplo,\n                           lapack_int n, lapack_int ka, lapack_int kb,\n                           lapack_complex_double* ab, lapack_int ldab,\n                           lapack_complex_double* bb, lapack_int ldbb,\n                           lapack_complex_double* q, lapack_int ldq, double vl,\n                           double vu, lapack_int il, lapack_int iu,\n                           double abstol, lapack_int* m, double* w,\n                           lapack_complex_double* z, lapack_int ldz,\n                           lapack_int* ifail );\n\nlapack_int LAPACKE_chbtrd( int matrix_order, char vect, char uplo, lapack_int n,\n                           lapack_int kd, lapack_complex_float* ab,\n                           lapack_int ldab, float* d, float* e,\n                           lapack_complex_float* q, lapack_int ldq );\nlapack_int LAPACKE_zhbtrd( int matrix_order, char vect, char uplo, lapack_int n,\n                           lapack_int kd, lapack_complex_double* ab,\n                           lapack_int ldab, double* d, double* e,\n                           lapack_complex_double* q, lapack_int ldq );\n\nlapack_int LAPACKE_checon( int matrix_order, char uplo, lapack_int n,\n                           const lapack_complex_float* a, lapack_int lda,\n                           const lapack_int* ipiv, float anorm, float* rcond );\nlapack_int LAPACKE_zhecon( int matrix_order, char uplo, lapack_int n,\n                           const lapack_complex_double* a, lapack_int lda,\n                           const lapack_int* ipiv, double anorm,\n                           double* rcond );\n\nlapack_int LAPACKE_cheequb( int matrix_order, char uplo, lapack_int n,\n                            const lapack_complex_float* a, lapack_int lda,\n                            float* s, float* scond, float* amax );\nlapack_int LAPACKE_zheequb( int matrix_order, char uplo, lapack_int n,\n                            const lapack_complex_double* a, lapack_int lda,\n                            double* s, double* scond, double* amax );\n\nlapack_int LAPACKE_cheev( int matrix_order, char jobz, char uplo, lapack_int n,\n                          lapack_complex_float* a, lapack_int lda, float* w );\nlapack_int LAPACKE_zheev( int matrix_order, char jobz, char uplo, lapack_int n,\n                          lapack_complex_double* a, lapack_int lda, double* w );\n\nlapack_int LAPACKE_cheevd( int matrix_order, char jobz, char uplo, lapack_int n,\n                           lapack_complex_float* a, lapack_int lda, float* w );\nlapack_int LAPACKE_zheevd( int matrix_order, char jobz, char uplo, lapack_int n,\n                           lapack_complex_double* a, lapack_int lda,\n                           double* w );\n\nlapack_int LAPACKE_cheevr( int matrix_order, char jobz, char range, char uplo,\n                           lapack_int n, lapack_complex_float* a,\n                           lapack_int lda, float vl, float vu, lapack_int il,\n                           lapack_int iu, float abstol, lapack_int* m, float* w,\n                           lapack_complex_float* z, lapack_int ldz,\n                           lapack_int* isuppz );\nlapack_int LAPACKE_zheevr( int matrix_order, char jobz, char range, char uplo,\n                           lapack_int n, lapack_complex_double* a,\n                           lapack_int lda, double vl, double vu, lapack_int il,\n                           lapack_int iu, double abstol, lapack_int* m,\n                           double* w, lapack_complex_double* z, lapack_int ldz,\n                           lapack_int* isuppz );\n\nlapack_int LAPACKE_cheevx( int matrix_order, char jobz, char range, char uplo,\n                           lapack_int n, lapack_complex_float* a,\n                           lapack_int lda, float vl, float vu, lapack_int il,\n                           lapack_int iu, float abstol, lapack_int* m, float* w,\n                           lapack_complex_float* z, lapack_int ldz,\n                           lapack_int* ifail );\nlapack_int LAPACKE_zheevx( int matrix_order, char jobz, char range, char uplo,\n                           lapack_int n, lapack_complex_double* a,\n                           lapack_int lda, double vl, double vu, lapack_int il,\n                           lapack_int iu, double abstol, lapack_int* m,\n                           double* w, lapack_complex_double* z, lapack_int ldz,\n                           lapack_int* ifail );\n\nlapack_int LAPACKE_chegst( int matrix_order, lapack_int itype, char uplo,\n                           lapack_int n, lapack_complex_float* a,\n                           lapack_int lda, const lapack_complex_float* b,\n                           lapack_int ldb );\nlapack_int LAPACKE_zhegst( int matrix_order, lapack_int itype, char uplo,\n                           lapack_int n, lapack_complex_double* a,\n                           lapack_int lda, const lapack_complex_double* b,\n                           lapack_int ldb );\n\nlapack_int LAPACKE_chegv( int matrix_order, lapack_int itype, char jobz,\n                          char uplo, lapack_int n, lapack_complex_float* a,\n                          lapack_int lda, lapack_complex_float* b,\n                          lapack_int ldb, float* w );\nlapack_int LAPACKE_zhegv( int matrix_order, lapack_int itype, char jobz,\n                          char uplo, lapack_int n, lapack_complex_double* a,\n                          lapack_int lda, lapack_complex_double* b,\n                          lapack_int ldb, double* w );\n\nlapack_int LAPACKE_chegvd( int matrix_order, lapack_int itype, char jobz,\n                           char uplo, lapack_int n, lapack_complex_float* a,\n                           lapack_int lda, lapack_complex_float* b,\n                           lapack_int ldb, float* w );\nlapack_int LAPACKE_zhegvd( int matrix_order, lapack_int itype, char jobz,\n                           char uplo, lapack_int n, lapack_complex_double* a,\n                           lapack_int lda, lapack_complex_double* b,\n                           lapack_int ldb, double* w );\n\nlapack_int LAPACKE_chegvx( int matrix_order, lapack_int itype, char jobz,\n                           char range, char uplo, lapack_int n,\n                           lapack_complex_float* a, lapack_int lda,\n                           lapack_complex_float* b, lapack_int ldb, float vl,\n                           float vu, lapack_int il, lapack_int iu, float abstol,\n                           lapack_int* m, float* w, lapack_complex_float* z,\n                           lapack_int ldz, lapack_int* ifail );\nlapack_int LAPACKE_zhegvx( int matrix_order, lapack_int itype, char jobz,\n                           char range, char uplo, lapack_int n,\n                           lapack_complex_double* a, lapack_int lda,\n                           lapack_complex_double* b, lapack_int ldb, double vl,\n                           double vu, lapack_int il, lapack_int iu,\n                           double abstol, lapack_int* m, double* w,\n                           lapack_complex_double* z, lapack_int ldz,\n                           lapack_int* ifail );\n\nlapack_int LAPACKE_cherfs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_float* a,\n                           lapack_int lda, const lapack_complex_float* af,\n                           lapack_int ldaf, const lapack_int* ipiv,\n                           const lapack_complex_float* b, lapack_int ldb,\n                           lapack_complex_float* x, lapack_int ldx, float* ferr,\n                           float* berr );\nlapack_int LAPACKE_zherfs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_double* a,\n                           lapack_int lda, const lapack_complex_double* af,\n                           lapack_int ldaf, const lapack_int* ipiv,\n                           const lapack_complex_double* b, lapack_int ldb,\n                           lapack_complex_double* x, lapack_int ldx,\n                           double* ferr, double* berr );\n\nlapack_int LAPACKE_cherfsx( int matrix_order, char uplo, char equed,\n                            lapack_int n, lapack_int nrhs,\n                            const lapack_complex_float* a, lapack_int lda,\n                            const lapack_complex_float* af, lapack_int ldaf,\n                            const lapack_int* ipiv, const float* s,\n                            const lapack_complex_float* b, lapack_int ldb,\n                            lapack_complex_float* x, lapack_int ldx,\n                            float* rcond, float* berr, lapack_int n_err_bnds,\n                            float* err_bnds_norm, float* err_bnds_comp,\n                            lapack_int nparams, float* params );\nlapack_int LAPACKE_zherfsx( int matrix_order, char uplo, char equed,\n                            lapack_int n, lapack_int nrhs,\n                            const lapack_complex_double* a, lapack_int lda,\n                            const lapack_complex_double* af, lapack_int ldaf,\n                            const lapack_int* ipiv, const double* s,\n                            const lapack_complex_double* b, lapack_int ldb,\n                            lapack_complex_double* x, lapack_int ldx,\n                            double* rcond, double* berr, lapack_int n_err_bnds,\n                            double* err_bnds_norm, double* err_bnds_comp,\n                            lapack_int nparams, double* params );\n\nlapack_int LAPACKE_chesv( int matrix_order, char uplo, lapack_int n,\n                          lapack_int nrhs, lapack_complex_float* a,\n                          lapack_int lda, lapack_int* ipiv,\n                          lapack_complex_float* b, lapack_int ldb );\nlapack_int LAPACKE_zhesv( int matrix_order, char uplo, lapack_int n,\n                          lapack_int nrhs, lapack_complex_double* a,\n                          lapack_int lda, lapack_int* ipiv,\n                          lapack_complex_double* b, lapack_int ldb );\n\nlapack_int LAPACKE_chesvx( int matrix_order, char fact, char uplo, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_float* a,\n                           lapack_int lda, lapack_complex_float* af,\n                           lapack_int ldaf, lapack_int* ipiv,\n                           const lapack_complex_float* b, lapack_int ldb,\n                           lapack_complex_float* x, lapack_int ldx,\n                           float* rcond, float* ferr, float* berr );\nlapack_int LAPACKE_zhesvx( int matrix_order, char fact, char uplo, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_double* a,\n                           lapack_int lda, lapack_complex_double* af,\n                           lapack_int ldaf, lapack_int* ipiv,\n                           const lapack_complex_double* b, lapack_int ldb,\n                           lapack_complex_double* x, lapack_int ldx,\n                           double* rcond, double* ferr, double* berr );\n\nlapack_int LAPACKE_chesvxx( int matrix_order, char fact, char uplo,\n                            lapack_int n, lapack_int nrhs,\n                            lapack_complex_float* a, lapack_int lda,\n                            lapack_complex_float* af, lapack_int ldaf,\n                            lapack_int* ipiv, char* equed, float* s,\n                            lapack_complex_float* b, lapack_int ldb,\n                            lapack_complex_float* x, lapack_int ldx,\n                            float* rcond, float* rpvgrw, float* berr,\n                            lapack_int n_err_bnds, float* err_bnds_norm,\n                            float* err_bnds_comp, lapack_int nparams,\n                            float* params );\nlapack_int LAPACKE_zhesvxx( int matrix_order, char fact, char uplo,\n                            lapack_int n, lapack_int nrhs,\n                            lapack_complex_double* a, lapack_int lda,\n                            lapack_complex_double* af, lapack_int ldaf,\n                            lapack_int* ipiv, char* equed, double* s,\n                            lapack_complex_double* b, lapack_int ldb,\n                            lapack_complex_double* x, lapack_int ldx,\n                            double* rcond, double* rpvgrw, double* berr,\n                            lapack_int n_err_bnds, double* err_bnds_norm,\n                            double* err_bnds_comp, lapack_int nparams,\n                            double* params );\n\nlapack_int LAPACKE_chetrd( int matrix_order, char uplo, lapack_int n,\n                           lapack_complex_float* a, lapack_int lda, float* d,\n                           float* e, lapack_complex_float* tau );\nlapack_int LAPACKE_zhetrd( int matrix_order, char uplo, lapack_int n,\n                           lapack_complex_double* a, lapack_int lda, double* d,\n                           double* e, lapack_complex_double* tau );\n\nlapack_int LAPACKE_chetrf( int matrix_order, char uplo, lapack_int n,\n                           lapack_complex_float* a, lapack_int lda,\n                           lapack_int* ipiv );\nlapack_int LAPACKE_zhetrf( int matrix_order, char uplo, lapack_int n,\n                           lapack_complex_double* a, lapack_int lda,\n                           lapack_int* ipiv );\n\nlapack_int LAPACKE_chetri( int matrix_order, char uplo, lapack_int n,\n                           lapack_complex_float* a, lapack_int lda,\n                           const lapack_int* ipiv );\nlapack_int LAPACKE_zhetri( int matrix_order, char uplo, lapack_int n,\n                           lapack_complex_double* a, lapack_int lda,\n                           const lapack_int* ipiv );\n\nlapack_int LAPACKE_chetrs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_float* a,\n                           lapack_int lda, const lapack_int* ipiv,\n                           lapack_complex_float* b, lapack_int ldb );\nlapack_int LAPACKE_zhetrs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_double* a,\n                           lapack_int lda, const lapack_int* ipiv,\n                           lapack_complex_double* b, lapack_int ldb );\n\nlapack_int LAPACKE_chfrk( int matrix_order, char transr, char uplo, char trans,\n                          lapack_int n, lapack_int k, float alpha,\n                          const lapack_complex_float* a, lapack_int lda,\n                          float beta, lapack_complex_float* c );\nlapack_int LAPACKE_zhfrk( int matrix_order, char transr, char uplo, char trans,\n                          lapack_int n, lapack_int k, double alpha,\n                          const lapack_complex_double* a, lapack_int lda,\n                          double beta, lapack_complex_double* c );\n\nlapack_int LAPACKE_shgeqz( int matrix_order, char job, char compq, char compz,\n                           lapack_int n, lapack_int ilo, lapack_int ihi,\n                           float* h, lapack_int ldh, float* t, lapack_int ldt,\n                           float* alphar, float* alphai, float* beta, float* q,\n                           lapack_int ldq, float* z, lapack_int ldz );\nlapack_int LAPACKE_dhgeqz( int matrix_order, char job, char compq, char compz,\n                           lapack_int n, lapack_int ilo, lapack_int ihi,\n                           double* h, lapack_int ldh, double* t, lapack_int ldt,\n                           double* alphar, double* alphai, double* beta,\n                           double* q, lapack_int ldq, double* z,\n                           lapack_int ldz );\nlapack_int LAPACKE_chgeqz( int matrix_order, char job, char compq, char compz,\n                           lapack_int n, lapack_int ilo, lapack_int ihi,\n                           lapack_complex_float* h, lapack_int ldh,\n                           lapack_complex_float* t, lapack_int ldt,\n                           lapack_complex_float* alpha,\n                           lapack_complex_float* beta, lapack_complex_float* q,\n                           lapack_int ldq, lapack_complex_float* z,\n                           lapack_int ldz );\nlapack_int LAPACKE_zhgeqz( int matrix_order, char job, char compq, char compz,\n                           lapack_int n, lapack_int ilo, lapack_int ihi,\n                           lapack_complex_double* h, lapack_int ldh,\n                           lapack_complex_double* t, lapack_int ldt,\n                           lapack_complex_double* alpha,\n                           lapack_complex_double* beta,\n                           lapack_complex_double* q, lapack_int ldq,\n                           lapack_complex_double* z, lapack_int ldz );\n\nlapack_int LAPACKE_chpcon( int matrix_order, char uplo, lapack_int n,\n                           const lapack_complex_float* ap,\n                           const lapack_int* ipiv, float anorm, float* rcond );\nlapack_int LAPACKE_zhpcon( int matrix_order, char uplo, lapack_int n,\n                           const lapack_complex_double* ap,\n                           const lapack_int* ipiv, double anorm,\n                           double* rcond );\n\nlapack_int LAPACKE_chpev( int matrix_order, char jobz, char uplo, lapack_int n,\n                          lapack_complex_float* ap, float* w,\n                          lapack_complex_float* z, lapack_int ldz );\nlapack_int LAPACKE_zhpev( int matrix_order, char jobz, char uplo, lapack_int n,\n                          lapack_complex_double* ap, double* w,\n                          lapack_complex_double* z, lapack_int ldz );\n\nlapack_int LAPACKE_chpevd( int matrix_order, char jobz, char uplo, lapack_int n,\n                           lapack_complex_float* ap, float* w,\n                           lapack_complex_float* z, lapack_int ldz );\nlapack_int LAPACKE_zhpevd( int matrix_order, char jobz, char uplo, lapack_int n,\n                           lapack_complex_double* ap, double* w,\n                           lapack_complex_double* z, lapack_int ldz );\n\nlapack_int LAPACKE_chpevx( int matrix_order, char jobz, char range, char uplo,\n                           lapack_int n, lapack_complex_float* ap, float vl,\n                           float vu, lapack_int il, lapack_int iu, float abstol,\n                           lapack_int* m, float* w, lapack_complex_float* z,\n                           lapack_int ldz, lapack_int* ifail );\nlapack_int LAPACKE_zhpevx( int matrix_order, char jobz, char range, char uplo,\n                           lapack_int n, lapack_complex_double* ap, double vl,\n                           double vu, lapack_int il, lapack_int iu,\n                           double abstol, lapack_int* m, double* w,\n                           lapack_complex_double* z, lapack_int ldz,\n                           lapack_int* ifail );\n\nlapack_int LAPACKE_chpgst( int matrix_order, lapack_int itype, char uplo,\n                           lapack_int n, lapack_complex_float* ap,\n                           const lapack_complex_float* bp );\nlapack_int LAPACKE_zhpgst( int matrix_order, lapack_int itype, char uplo,\n                           lapack_int n, lapack_complex_double* ap,\n                           const lapack_complex_double* bp );\n\nlapack_int LAPACKE_chpgv( int matrix_order, lapack_int itype, char jobz,\n                          char uplo, lapack_int n, lapack_complex_float* ap,\n                          lapack_complex_float* bp, float* w,\n                          lapack_complex_float* z, lapack_int ldz );\nlapack_int LAPACKE_zhpgv( int matrix_order, lapack_int itype, char jobz,\n                          char uplo, lapack_int n, lapack_complex_double* ap,\n                          lapack_complex_double* bp, double* w,\n                          lapack_complex_double* z, lapack_int ldz );\n\nlapack_int LAPACKE_chpgvd( int matrix_order, lapack_int itype, char jobz,\n                           char uplo, lapack_int n, lapack_complex_float* ap,\n                           lapack_complex_float* bp, float* w,\n                           lapack_complex_float* z, lapack_int ldz );\nlapack_int LAPACKE_zhpgvd( int matrix_order, lapack_int itype, char jobz,\n                           char uplo, lapack_int n, lapack_complex_double* ap,\n                           lapack_complex_double* bp, double* w,\n                           lapack_complex_double* z, lapack_int ldz );\n\nlapack_int LAPACKE_chpgvx( int matrix_order, lapack_int itype, char jobz,\n                           char range, char uplo, lapack_int n,\n                           lapack_complex_float* ap, lapack_complex_float* bp,\n                           float vl, float vu, lapack_int il, lapack_int iu,\n                           float abstol, lapack_int* m, float* w,\n                           lapack_complex_float* z, lapack_int ldz,\n                           lapack_int* ifail );\nlapack_int LAPACKE_zhpgvx( int matrix_order, lapack_int itype, char jobz,\n                           char range, char uplo, lapack_int n,\n                           lapack_complex_double* ap, lapack_complex_double* bp,\n                           double vl, double vu, lapack_int il, lapack_int iu,\n                           double abstol, lapack_int* m, double* w,\n                           lapack_complex_double* z, lapack_int ldz,\n                           lapack_int* ifail );\n\nlapack_int LAPACKE_chprfs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_float* ap,\n                           const lapack_complex_float* afp,\n                           const lapack_int* ipiv,\n                           const lapack_complex_float* b, lapack_int ldb,\n                           lapack_complex_float* x, lapack_int ldx, float* ferr,\n                           float* berr );\nlapack_int LAPACKE_zhprfs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_double* ap,\n                           const lapack_complex_double* afp,\n                           const lapack_int* ipiv,\n                           const lapack_complex_double* b, lapack_int ldb,\n                           lapack_complex_double* x, lapack_int ldx,\n                           double* ferr, double* berr );\n\nlapack_int LAPACKE_chpsv( int matrix_order, char uplo, lapack_int n,\n                          lapack_int nrhs, lapack_complex_float* ap,\n                          lapack_int* ipiv, lapack_complex_float* b,\n                          lapack_int ldb );\nlapack_int LAPACKE_zhpsv( int matrix_order, char uplo, lapack_int n,\n                          lapack_int nrhs, lapack_complex_double* ap,\n                          lapack_int* ipiv, lapack_complex_double* b,\n                          lapack_int ldb );\n\nlapack_int LAPACKE_chpsvx( int matrix_order, char fact, char uplo, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_float* ap,\n                           lapack_complex_float* afp, lapack_int* ipiv,\n                           const lapack_complex_float* b, lapack_int ldb,\n                           lapack_complex_float* x, lapack_int ldx,\n                           float* rcond, float* ferr, float* berr );\nlapack_int LAPACKE_zhpsvx( int matrix_order, char fact, char uplo, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_double* ap,\n                           lapack_complex_double* afp, lapack_int* ipiv,\n                           const lapack_complex_double* b, lapack_int ldb,\n                           lapack_complex_double* x, lapack_int ldx,\n                           double* rcond, double* ferr, double* berr );\n\nlapack_int LAPACKE_chptrd( int matrix_order, char uplo, lapack_int n,\n                           lapack_complex_float* ap, float* d, float* e,\n                           lapack_complex_float* tau );\nlapack_int LAPACKE_zhptrd( int matrix_order, char uplo, lapack_int n,\n                           lapack_complex_double* ap, double* d, double* e,\n                           lapack_complex_double* tau );\n\nlapack_int LAPACKE_chptrf( int matrix_order, char uplo, lapack_int n,\n                           lapack_complex_float* ap, lapack_int* ipiv );\nlapack_int LAPACKE_zhptrf( int matrix_order, char uplo, lapack_int n,\n                           lapack_complex_double* ap, lapack_int* ipiv );\n\nlapack_int LAPACKE_chptri( int matrix_order, char uplo, lapack_int n,\n                           lapack_complex_float* ap, const lapack_int* ipiv );\nlapack_int LAPACKE_zhptri( int matrix_order, char uplo, lapack_int n,\n                           lapack_complex_double* ap, const lapack_int* ipiv );\n\nlapack_int LAPACKE_chptrs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_float* ap,\n                           const lapack_int* ipiv, lapack_complex_float* b,\n                           lapack_int ldb );\nlapack_int LAPACKE_zhptrs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_double* ap,\n                           const lapack_int* ipiv, lapack_complex_double* b,\n                           lapack_int ldb );\n\nlapack_int LAPACKE_shsein( int matrix_order, char job, char eigsrc, char initv,\n                           lapack_logical* select, lapack_int n, const float* h,\n                           lapack_int ldh, float* wr, const float* wi,\n                           float* vl, lapack_int ldvl, float* vr,\n                           lapack_int ldvr, lapack_int mm, lapack_int* m,\n                           lapack_int* ifaill, lapack_int* ifailr );\nlapack_int LAPACKE_dhsein( int matrix_order, char job, char eigsrc, char initv,\n                           lapack_logical* select, lapack_int n,\n                           const double* h, lapack_int ldh, double* wr,\n                           const double* wi, double* vl, lapack_int ldvl,\n                           double* vr, lapack_int ldvr, lapack_int mm,\n                           lapack_int* m, lapack_int* ifaill,\n                           lapack_int* ifailr );\nlapack_int LAPACKE_chsein( int matrix_order, char job, char eigsrc, char initv,\n                           const lapack_logical* select, lapack_int n,\n                           const lapack_complex_float* h, lapack_int ldh,\n                           lapack_complex_float* w, lapack_complex_float* vl,\n                           lapack_int ldvl, lapack_complex_float* vr,\n                           lapack_int ldvr, lapack_int mm, lapack_int* m,\n                           lapack_int* ifaill, lapack_int* ifailr );\nlapack_int LAPACKE_zhsein( int matrix_order, char job, char eigsrc, char initv,\n                           const lapack_logical* select, lapack_int n,\n                           const lapack_complex_double* h, lapack_int ldh,\n                           lapack_complex_double* w, lapack_complex_double* vl,\n                           lapack_int ldvl, lapack_complex_double* vr,\n                           lapack_int ldvr, lapack_int mm, lapack_int* m,\n                           lapack_int* ifaill, lapack_int* ifailr );\n\nlapack_int LAPACKE_shseqr( int matrix_order, char job, char compz, lapack_int n,\n                           lapack_int ilo, lapack_int ihi, float* h,\n                           lapack_int ldh, float* wr, float* wi, float* z,\n                           lapack_int ldz );\nlapack_int LAPACKE_dhseqr( int matrix_order, char job, char compz, lapack_int n,\n                           lapack_int ilo, lapack_int ihi, double* h,\n                           lapack_int ldh, double* wr, double* wi, double* z,\n                           lapack_int ldz );\nlapack_int LAPACKE_chseqr( int matrix_order, char job, char compz, lapack_int n,\n                           lapack_int ilo, lapack_int ihi,\n                           lapack_complex_float* h, lapack_int ldh,\n                           lapack_complex_float* w, lapack_complex_float* z,\n                           lapack_int ldz );\nlapack_int LAPACKE_zhseqr( int matrix_order, char job, char compz, lapack_int n,\n                           lapack_int ilo, lapack_int ihi,\n                           lapack_complex_double* h, lapack_int ldh,\n                           lapack_complex_double* w, lapack_complex_double* z,\n                           lapack_int ldz );\n\nlapack_int LAPACKE_clacgv( lapack_int n, lapack_complex_float* x,\n                           lapack_int incx );\nlapack_int LAPACKE_zlacgv( lapack_int n, lapack_complex_double* x,\n                           lapack_int incx );\n\nlapack_int LAPACKE_slacpy( int matrix_order, char uplo, lapack_int m,\n                           lapack_int n, const float* a, lapack_int lda, float* b,\n                           lapack_int ldb );\nlapack_int LAPACKE_dlacpy( int matrix_order, char uplo, lapack_int m,\n                           lapack_int n, const double* a, lapack_int lda, double* b,\n                           lapack_int ldb );\nlapack_int LAPACKE_clacpy( int matrix_order, char uplo, lapack_int m,\n                           lapack_int n, const lapack_complex_float* a,\n                           lapack_int lda, lapack_complex_float* b,\n                           lapack_int ldb );\nlapack_int LAPACKE_zlacpy( int matrix_order, char uplo, lapack_int m,\n                           lapack_int n, const lapack_complex_double* a,\n                           lapack_int lda, lapack_complex_double* b,\n                           lapack_int ldb );\n\nlapack_int LAPACKE_zlag2c( int matrix_order, lapack_int m, lapack_int n,\n                           const lapack_complex_double* a, lapack_int lda,\n                           lapack_complex_float* sa, lapack_int ldsa );\n\nlapack_int LAPACKE_slag2d( int matrix_order, lapack_int m, lapack_int n,\n                           const float* sa, lapack_int ldsa, double* a,\n                           lapack_int lda );\n\nlapack_int LAPACKE_dlag2s( int matrix_order, lapack_int m, lapack_int n,\n                           const double* a, lapack_int lda, float* sa,\n                           lapack_int ldsa );\n\nlapack_int LAPACKE_clag2z( int matrix_order, lapack_int m, lapack_int n,\n                           const lapack_complex_float* sa, lapack_int ldsa,\n                           lapack_complex_double* a, lapack_int lda );\n\nlapack_int LAPACKE_slagge( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int kl, lapack_int ku, const float* d,\n                           float* a, lapack_int lda, lapack_int* iseed );\nlapack_int LAPACKE_dlagge( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int kl, lapack_int ku, const double* d,\n                           double* a, lapack_int lda, lapack_int* iseed );\nlapack_int LAPACKE_clagge( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int kl, lapack_int ku, const float* d,\n                           lapack_complex_float* a, lapack_int lda,\n                           lapack_int* iseed );\nlapack_int LAPACKE_zlagge( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int kl, lapack_int ku, const double* d,\n                           lapack_complex_double* a, lapack_int lda,\n                           lapack_int* iseed );\n\nfloat LAPACKE_slamch( char cmach );\ndouble LAPACKE_dlamch( char cmach );\n\nfloat LAPACKE_slange( int matrix_order, char norm, lapack_int m,\n                           lapack_int n, const float* a, lapack_int lda );\ndouble LAPACKE_dlange( int matrix_order, char norm, lapack_int m,\n                           lapack_int n, const double* a, lapack_int lda );\nfloat LAPACKE_clange( int matrix_order, char norm, lapack_int m,\n                           lapack_int n, const lapack_complex_float* a,\n                           lapack_int lda );\ndouble LAPACKE_zlange( int matrix_order, char norm, lapack_int m,\n                           lapack_int n, const lapack_complex_double* a,\n                           lapack_int lda );\n\nfloat LAPACKE_clanhe( int matrix_order, char norm, char uplo, lapack_int n,\n                           const lapack_complex_float* a, lapack_int lda );\ndouble LAPACKE_zlanhe( int matrix_order, char norm, char uplo, lapack_int n,\n                           const lapack_complex_double* a, lapack_int lda );\n\nfloat LAPACKE_slansy( int matrix_order, char norm, char uplo, lapack_int n,\n                           const float* a, lapack_int lda );\ndouble LAPACKE_dlansy( int matrix_order, char norm, char uplo, lapack_int n,\n                           const double* a, lapack_int lda );\nfloat LAPACKE_clansy( int matrix_order, char norm, char uplo, lapack_int n,\n                           const lapack_complex_float* a, lapack_int lda );\ndouble LAPACKE_zlansy( int matrix_order, char norm, char uplo, lapack_int n,\n                           const lapack_complex_double* a, lapack_int lda );\n\nfloat LAPACKE_slantr( int matrix_order, char norm, char uplo, char diag,\n                           lapack_int m, lapack_int n, const float* a,\n                           lapack_int lda );\ndouble LAPACKE_dlantr( int matrix_order, char norm, char uplo, char diag,\n                           lapack_int m, lapack_int n, const double* a,\n                           lapack_int lda );\nfloat LAPACKE_clantr( int matrix_order, char norm, char uplo, char diag,\n                           lapack_int m, lapack_int n, const lapack_complex_float* a,\n                           lapack_int lda );\ndouble LAPACKE_zlantr( int matrix_order, char norm, char uplo, char diag,\n                           lapack_int m, lapack_int n, const lapack_complex_double* a,\n                           lapack_int lda );\n\n\nlapack_int LAPACKE_slarfb( int matrix_order, char side, char trans, char direct,\n                           char storev, lapack_int m, lapack_int n,\n                           lapack_int k, const float* v, lapack_int ldv,\n                           const float* t, lapack_int ldt, float* c,\n                           lapack_int ldc );\nlapack_int LAPACKE_dlarfb( int matrix_order, char side, char trans, char direct,\n                           char storev, lapack_int m, lapack_int n,\n                           lapack_int k, const double* v, lapack_int ldv,\n                           const double* t, lapack_int ldt, double* c,\n                           lapack_int ldc );\nlapack_int LAPACKE_clarfb( int matrix_order, char side, char trans, char direct,\n                           char storev, lapack_int m, lapack_int n,\n                           lapack_int k, const lapack_complex_float* v,\n                           lapack_int ldv, const lapack_complex_float* t,\n                           lapack_int ldt, lapack_complex_float* c,\n                           lapack_int ldc );\nlapack_int LAPACKE_zlarfb( int matrix_order, char side, char trans, char direct,\n                           char storev, lapack_int m, lapack_int n,\n                           lapack_int k, const lapack_complex_double* v,\n                           lapack_int ldv, const lapack_complex_double* t,\n                           lapack_int ldt, lapack_complex_double* c,\n                           lapack_int ldc );\n\nlapack_int LAPACKE_slarfg( lapack_int n, float* alpha, float* x,\n                           lapack_int incx, float* tau );\nlapack_int LAPACKE_dlarfg( lapack_int n, double* alpha, double* x,\n                           lapack_int incx, double* tau );\nlapack_int LAPACKE_clarfg( lapack_int n, lapack_complex_float* alpha,\n                           lapack_complex_float* x, lapack_int incx,\n                           lapack_complex_float* tau );\nlapack_int LAPACKE_zlarfg( lapack_int n, lapack_complex_double* alpha,\n                           lapack_complex_double* x, lapack_int incx,\n                           lapack_complex_double* tau );\n\nlapack_int LAPACKE_slarft( int matrix_order, char direct, char storev,\n                           lapack_int n, lapack_int k, const float* v,\n                           lapack_int ldv, const float* tau, float* t,\n                           lapack_int ldt );\nlapack_int LAPACKE_dlarft( int matrix_order, char direct, char storev,\n                           lapack_int n, lapack_int k, const double* v,\n                           lapack_int ldv, const double* tau, double* t,\n                           lapack_int ldt );\nlapack_int LAPACKE_clarft( int matrix_order, char direct, char storev,\n                           lapack_int n, lapack_int k,\n                           const lapack_complex_float* v, lapack_int ldv,\n                           const lapack_complex_float* tau,\n                           lapack_complex_float* t, lapack_int ldt );\nlapack_int LAPACKE_zlarft( int matrix_order, char direct, char storev,\n                           lapack_int n, lapack_int k,\n                           const lapack_complex_double* v, lapack_int ldv,\n                           const lapack_complex_double* tau,\n                           lapack_complex_double* t, lapack_int ldt );\n\nlapack_int LAPACKE_slarfx( int matrix_order, char side, lapack_int m,\n                           lapack_int n, const float* v, float tau, float* c,\n                           lapack_int ldc, float* work );\nlapack_int LAPACKE_dlarfx( int matrix_order, char side, lapack_int m,\n                           lapack_int n, const double* v, double tau, double* c,\n                           lapack_int ldc, double* work );\nlapack_int LAPACKE_clarfx( int matrix_order, char side, lapack_int m,\n                           lapack_int n, const lapack_complex_float* v,\n                           lapack_complex_float tau, lapack_complex_float* c,\n                           lapack_int ldc, lapack_complex_float* work );\nlapack_int LAPACKE_zlarfx( int matrix_order, char side, lapack_int m,\n                           lapack_int n, const lapack_complex_double* v,\n                           lapack_complex_double tau, lapack_complex_double* c,\n                           lapack_int ldc, lapack_complex_double* work );\n\nlapack_int LAPACKE_slarnv( lapack_int idist, lapack_int* iseed, lapack_int n,\n                           float* x );\nlapack_int LAPACKE_dlarnv( lapack_int idist, lapack_int* iseed, lapack_int n,\n                           double* x );\nlapack_int LAPACKE_clarnv( lapack_int idist, lapack_int* iseed, lapack_int n,\n                           lapack_complex_float* x );\nlapack_int LAPACKE_zlarnv( lapack_int idist, lapack_int* iseed, lapack_int n,\n                           lapack_complex_double* x );\n\nlapack_int LAPACKE_slaset( int matrix_order, char uplo, lapack_int m,\n                           lapack_int n, float alpha, float beta, float* a,\n                           lapack_int lda );\nlapack_int LAPACKE_dlaset( int matrix_order, char uplo, lapack_int m,\n                           lapack_int n, double alpha, double beta, double* a,\n                           lapack_int lda );\nlapack_int LAPACKE_claset( int matrix_order, char uplo, lapack_int m,\n                           lapack_int n, lapack_complex_float alpha,\n                           lapack_complex_float beta, lapack_complex_float* a,\n                           lapack_int lda );\nlapack_int LAPACKE_zlaset( int matrix_order, char uplo, lapack_int m,\n                           lapack_int n, lapack_complex_double alpha,\n                           lapack_complex_double beta, lapack_complex_double* a,\n                           lapack_int lda );\n\nlapack_int LAPACKE_slasrt( char id, lapack_int n, float* d );\nlapack_int LAPACKE_dlasrt( char id, lapack_int n, double* d );\n\nlapack_int LAPACKE_slaswp( int matrix_order, lapack_int n, float* a,\n                           lapack_int lda, lapack_int k1, lapack_int k2,\n                           const lapack_int* ipiv, lapack_int incx );\nlapack_int LAPACKE_dlaswp( int matrix_order, lapack_int n, double* a,\n                           lapack_int lda, lapack_int k1, lapack_int k2,\n                           const lapack_int* ipiv, lapack_int incx );\nlapack_int LAPACKE_claswp( int matrix_order, lapack_int n,\n                           lapack_complex_float* a, lapack_int lda,\n                           lapack_int k1, lapack_int k2, const lapack_int* ipiv,\n                           lapack_int incx );\nlapack_int LAPACKE_zlaswp( int matrix_order, lapack_int n,\n                           lapack_complex_double* a, lapack_int lda,\n                           lapack_int k1, lapack_int k2, const lapack_int* ipiv,\n                           lapack_int incx );\n\nlapack_int LAPACKE_slatms( int matrix_order, lapack_int m, lapack_int n,\n                           char dist, lapack_int* iseed, char sym, float* d,\n                           lapack_int mode, float cond, float dmax,\n                           lapack_int kl, lapack_int ku, char pack, float* a,\n                           lapack_int lda );\nlapack_int LAPACKE_dlatms( int matrix_order, lapack_int m, lapack_int n,\n                           char dist, lapack_int* iseed, char sym, double* d,\n                           lapack_int mode, double cond, double dmax,\n                           lapack_int kl, lapack_int ku, char pack, double* a,\n                           lapack_int lda );\nlapack_int LAPACKE_clatms( int matrix_order, lapack_int m, lapack_int n,\n                           char dist, lapack_int* iseed, char sym, float* d,\n                           lapack_int mode, float cond, float dmax,\n                           lapack_int kl, lapack_int ku, char pack,\n                           lapack_complex_float* a, lapack_int lda );\nlapack_int LAPACKE_zlatms( int matrix_order, lapack_int m, lapack_int n,\n                           char dist, lapack_int* iseed, char sym, double* d,\n                           lapack_int mode, double cond, double dmax,\n                           lapack_int kl, lapack_int ku, char pack,\n                           lapack_complex_double* a, lapack_int lda );\n\nlapack_int LAPACKE_slauum( int matrix_order, char uplo, lapack_int n, float* a,\n                           lapack_int lda );\nlapack_int LAPACKE_dlauum( int matrix_order, char uplo, lapack_int n, double* a,\n                           lapack_int lda );\nlapack_int LAPACKE_clauum( int matrix_order, char uplo, lapack_int n,\n                           lapack_complex_float* a, lapack_int lda );\nlapack_int LAPACKE_zlauum( int matrix_order, char uplo, lapack_int n,\n                           lapack_complex_double* a, lapack_int lda );\n\nlapack_int LAPACKE_sopgtr( int matrix_order, char uplo, lapack_int n,\n                           const float* ap, const float* tau, float* q,\n                           lapack_int ldq );\nlapack_int LAPACKE_dopgtr( int matrix_order, char uplo, lapack_int n,\n                           const double* ap, const double* tau, double* q,\n                           lapack_int ldq );\n\nlapack_int LAPACKE_sopmtr( int matrix_order, char side, char uplo, char trans,\n                           lapack_int m, lapack_int n, const float* ap,\n                           const float* tau, float* c, lapack_int ldc );\nlapack_int LAPACKE_dopmtr( int matrix_order, char side, char uplo, char trans,\n                           lapack_int m, lapack_int n, const double* ap,\n                           const double* tau, double* c, lapack_int ldc );\n\nlapack_int LAPACKE_sorgbr( int matrix_order, char vect, lapack_int m,\n                           lapack_int n, lapack_int k, float* a, lapack_int lda,\n                           const float* tau );\nlapack_int LAPACKE_dorgbr( int matrix_order, char vect, lapack_int m,\n                           lapack_int n, lapack_int k, double* a,\n                           lapack_int lda, const double* tau );\n\nlapack_int LAPACKE_sorghr( int matrix_order, lapack_int n, lapack_int ilo,\n                           lapack_int ihi, float* a, lapack_int lda,\n                           const float* tau );\nlapack_int LAPACKE_dorghr( int matrix_order, lapack_int n, lapack_int ilo,\n                           lapack_int ihi, double* a, lapack_int lda,\n                           const double* tau );\n\nlapack_int LAPACKE_sorglq( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int k, float* a, lapack_int lda,\n                           const float* tau );\nlapack_int LAPACKE_dorglq( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int k, double* a, lapack_int lda,\n                           const double* tau );\n\nlapack_int LAPACKE_sorgql( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int k, float* a, lapack_int lda,\n                           const float* tau );\nlapack_int LAPACKE_dorgql( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int k, double* a, lapack_int lda,\n                           const double* tau );\n\nlapack_int LAPACKE_sorgqr( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int k, float* a, lapack_int lda,\n                           const float* tau );\nlapack_int LAPACKE_dorgqr( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int k, double* a, lapack_int lda,\n                           const double* tau );\n\nlapack_int LAPACKE_sorgrq( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int k, float* a, lapack_int lda,\n                           const float* tau );\nlapack_int LAPACKE_dorgrq( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int k, double* a, lapack_int lda,\n                           const double* tau );\n\nlapack_int LAPACKE_sorgtr( int matrix_order, char uplo, lapack_int n, float* a,\n                           lapack_int lda, const float* tau );\nlapack_int LAPACKE_dorgtr( int matrix_order, char uplo, lapack_int n, double* a,\n                           lapack_int lda, const double* tau );\n\nlapack_int LAPACKE_sormbr( int matrix_order, char vect, char side, char trans,\n                           lapack_int m, lapack_int n, lapack_int k,\n                           const float* a, lapack_int lda, const float* tau,\n                           float* c, lapack_int ldc );\nlapack_int LAPACKE_dormbr( int matrix_order, char vect, char side, char trans,\n                           lapack_int m, lapack_int n, lapack_int k,\n                           const double* a, lapack_int lda, const double* tau,\n                           double* c, lapack_int ldc );\n\nlapack_int LAPACKE_sormhr( int matrix_order, char side, char trans,\n                           lapack_int m, lapack_int n, lapack_int ilo,\n                           lapack_int ihi, const float* a, lapack_int lda,\n                           const float* tau, float* c, lapack_int ldc );\nlapack_int LAPACKE_dormhr( int matrix_order, char side, char trans,\n                           lapack_int m, lapack_int n, lapack_int ilo,\n                           lapack_int ihi, const double* a, lapack_int lda,\n                           const double* tau, double* c, lapack_int ldc );\n\nlapack_int LAPACKE_sormlq( int matrix_order, char side, char trans,\n                           lapack_int m, lapack_int n, lapack_int k,\n                           const float* a, lapack_int lda, const float* tau,\n                           float* c, lapack_int ldc );\nlapack_int LAPACKE_dormlq( int matrix_order, char side, char trans,\n                           lapack_int m, lapack_int n, lapack_int k,\n                           const double* a, lapack_int lda, const double* tau,\n                           double* c, lapack_int ldc );\n\nlapack_int LAPACKE_sormql( int matrix_order, char side, char trans,\n                           lapack_int m, lapack_int n, lapack_int k,\n                           const float* a, lapack_int lda, const float* tau,\n                           float* c, lapack_int ldc );\nlapack_int LAPACKE_dormql( int matrix_order, char side, char trans,\n                           lapack_int m, lapack_int n, lapack_int k,\n                           const double* a, lapack_int lda, const double* tau,\n                           double* c, lapack_int ldc );\n\nlapack_int LAPACKE_sormqr( int matrix_order, char side, char trans,\n                           lapack_int m, lapack_int n, lapack_int k,\n                           const float* a, lapack_int lda, const float* tau,\n                           float* c, lapack_int ldc );\nlapack_int LAPACKE_dormqr( int matrix_order, char side, char trans,\n                           lapack_int m, lapack_int n, lapack_int k,\n                           const double* a, lapack_int lda, const double* tau,\n                           double* c, lapack_int ldc );\n\nlapack_int LAPACKE_sormrq( int matrix_order, char side, char trans,\n                           lapack_int m, lapack_int n, lapack_int k,\n                           const float* a, lapack_int lda, const float* tau,\n                           float* c, lapack_int ldc );\nlapack_int LAPACKE_dormrq( int matrix_order, char side, char trans,\n                           lapack_int m, lapack_int n, lapack_int k,\n                           const double* a, lapack_int lda, const double* tau,\n                           double* c, lapack_int ldc );\n\nlapack_int LAPACKE_sormrz( int matrix_order, char side, char trans,\n                           lapack_int m, lapack_int n, lapack_int k,\n                           lapack_int l, const float* a, lapack_int lda,\n                           const float* tau, float* c, lapack_int ldc );\nlapack_int LAPACKE_dormrz( int matrix_order, char side, char trans,\n                           lapack_int m, lapack_int n, lapack_int k,\n                           lapack_int l, const double* a, lapack_int lda,\n                           const double* tau, double* c, lapack_int ldc );\n\nlapack_int LAPACKE_sormtr( int matrix_order, char side, char uplo, char trans,\n                           lapack_int m, lapack_int n, const float* a,\n                           lapack_int lda, const float* tau, float* c,\n                           lapack_int ldc );\nlapack_int LAPACKE_dormtr( int matrix_order, char side, char uplo, char trans,\n                           lapack_int m, lapack_int n, const double* a,\n                           lapack_int lda, const double* tau, double* c,\n                           lapack_int ldc );\n\nlapack_int LAPACKE_spbcon( int matrix_order, char uplo, lapack_int n,\n                           lapack_int kd, const float* ab, lapack_int ldab,\n                           float anorm, float* rcond );\nlapack_int LAPACKE_dpbcon( int matrix_order, char uplo, lapack_int n,\n                           lapack_int kd, const double* ab, lapack_int ldab,\n                           double anorm, double* rcond );\nlapack_int LAPACKE_cpbcon( int matrix_order, char uplo, lapack_int n,\n                           lapack_int kd, const lapack_complex_float* ab,\n                           lapack_int ldab, float anorm, float* rcond );\nlapack_int LAPACKE_zpbcon( int matrix_order, char uplo, lapack_int n,\n                           lapack_int kd, const lapack_complex_double* ab,\n                           lapack_int ldab, double anorm, double* rcond );\n\nlapack_int LAPACKE_spbequ( int matrix_order, char uplo, lapack_int n,\n                           lapack_int kd, const float* ab, lapack_int ldab,\n                           float* s, float* scond, float* amax );\nlapack_int LAPACKE_dpbequ( int matrix_order, char uplo, lapack_int n,\n                           lapack_int kd, const double* ab, lapack_int ldab,\n                           double* s, double* scond, double* amax );\nlapack_int LAPACKE_cpbequ( int matrix_order, char uplo, lapack_int n,\n                           lapack_int kd, const lapack_complex_float* ab,\n                           lapack_int ldab, float* s, float* scond,\n                           float* amax );\nlapack_int LAPACKE_zpbequ( int matrix_order, char uplo, lapack_int n,\n                           lapack_int kd, const lapack_complex_double* ab,\n                           lapack_int ldab, double* s, double* scond,\n                           double* amax );\n\nlapack_int LAPACKE_spbrfs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int kd, lapack_int nrhs, const float* ab,\n                           lapack_int ldab, const float* afb, lapack_int ldafb,\n                           const float* b, lapack_int ldb, float* x,\n                           lapack_int ldx, float* ferr, float* berr );\nlapack_int LAPACKE_dpbrfs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int kd, lapack_int nrhs, const double* ab,\n                           lapack_int ldab, const double* afb, lapack_int ldafb,\n                           const double* b, lapack_int ldb, double* x,\n                           lapack_int ldx, double* ferr, double* berr );\nlapack_int LAPACKE_cpbrfs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int kd, lapack_int nrhs,\n                           const lapack_complex_float* ab, lapack_int ldab,\n                           const lapack_complex_float* afb, lapack_int ldafb,\n                           const lapack_complex_float* b, lapack_int ldb,\n                           lapack_complex_float* x, lapack_int ldx, float* ferr,\n                           float* berr );\nlapack_int LAPACKE_zpbrfs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int kd, lapack_int nrhs,\n                           const lapack_complex_double* ab, lapack_int ldab,\n                           const lapack_complex_double* afb, lapack_int ldafb,\n                           const lapack_complex_double* b, lapack_int ldb,\n                           lapack_complex_double* x, lapack_int ldx,\n                           double* ferr, double* berr );\n\nlapack_int LAPACKE_spbstf( int matrix_order, char uplo, lapack_int n,\n                           lapack_int kb, float* bb, lapack_int ldbb );\nlapack_int LAPACKE_dpbstf( int matrix_order, char uplo, lapack_int n,\n                           lapack_int kb, double* bb, lapack_int ldbb );\nlapack_int LAPACKE_cpbstf( int matrix_order, char uplo, lapack_int n,\n                           lapack_int kb, lapack_complex_float* bb,\n                           lapack_int ldbb );\nlapack_int LAPACKE_zpbstf( int matrix_order, char uplo, lapack_int n,\n                           lapack_int kb, lapack_complex_double* bb,\n                           lapack_int ldbb );\n\nlapack_int LAPACKE_spbsv( int matrix_order, char uplo, lapack_int n,\n                          lapack_int kd, lapack_int nrhs, float* ab,\n                          lapack_int ldab, float* b, lapack_int ldb );\nlapack_int LAPACKE_dpbsv( int matrix_order, char uplo, lapack_int n,\n                          lapack_int kd, lapack_int nrhs, double* ab,\n                          lapack_int ldab, double* b, lapack_int ldb );\nlapack_int LAPACKE_cpbsv( int matrix_order, char uplo, lapack_int n,\n                          lapack_int kd, lapack_int nrhs,\n                          lapack_complex_float* ab, lapack_int ldab,\n                          lapack_complex_float* b, lapack_int ldb );\nlapack_int LAPACKE_zpbsv( int matrix_order, char uplo, lapack_int n,\n                          lapack_int kd, lapack_int nrhs,\n                          lapack_complex_double* ab, lapack_int ldab,\n                          lapack_complex_double* b, lapack_int ldb );\n\nlapack_int LAPACKE_spbsvx( int matrix_order, char fact, char uplo, lapack_int n,\n                           lapack_int kd, lapack_int nrhs, float* ab,\n                           lapack_int ldab, float* afb, lapack_int ldafb,\n                           char* equed, float* s, float* b, lapack_int ldb,\n                           float* x, lapack_int ldx, float* rcond, float* ferr,\n                           float* berr );\nlapack_int LAPACKE_dpbsvx( int matrix_order, char fact, char uplo, lapack_int n,\n                           lapack_int kd, lapack_int nrhs, double* ab,\n                           lapack_int ldab, double* afb, lapack_int ldafb,\n                           char* equed, double* s, double* b, lapack_int ldb,\n                           double* x, lapack_int ldx, double* rcond,\n                           double* ferr, double* berr );\nlapack_int LAPACKE_cpbsvx( int matrix_order, char fact, char uplo, lapack_int n,\n                           lapack_int kd, lapack_int nrhs,\n                           lapack_complex_float* ab, lapack_int ldab,\n                           lapack_complex_float* afb, lapack_int ldafb,\n                           char* equed, float* s, lapack_complex_float* b,\n                           lapack_int ldb, lapack_complex_float* x,\n                           lapack_int ldx, float* rcond, float* ferr,\n                           float* berr );\nlapack_int LAPACKE_zpbsvx( int matrix_order, char fact, char uplo, lapack_int n,\n                           lapack_int kd, lapack_int nrhs,\n                           lapack_complex_double* ab, lapack_int ldab,\n                           lapack_complex_double* afb, lapack_int ldafb,\n                           char* equed, double* s, lapack_complex_double* b,\n                           lapack_int ldb, lapack_complex_double* x,\n                           lapack_int ldx, double* rcond, double* ferr,\n                           double* berr );\n\nlapack_int LAPACKE_spbtrf( int matrix_order, char uplo, lapack_int n,\n                           lapack_int kd, float* ab, lapack_int ldab );\nlapack_int LAPACKE_dpbtrf( int matrix_order, char uplo, lapack_int n,\n                           lapack_int kd, double* ab, lapack_int ldab );\nlapack_int LAPACKE_cpbtrf( int matrix_order, char uplo, lapack_int n,\n                           lapack_int kd, lapack_complex_float* ab,\n                           lapack_int ldab );\nlapack_int LAPACKE_zpbtrf( int matrix_order, char uplo, lapack_int n,\n                           lapack_int kd, lapack_complex_double* ab,\n                           lapack_int ldab );\n\nlapack_int LAPACKE_spbtrs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int kd, lapack_int nrhs, const float* ab,\n                           lapack_int ldab, float* b, lapack_int ldb );\nlapack_int LAPACKE_dpbtrs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int kd, lapack_int nrhs, const double* ab,\n                           lapack_int ldab, double* b, lapack_int ldb );\nlapack_int LAPACKE_cpbtrs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int kd, lapack_int nrhs,\n                           const lapack_complex_float* ab, lapack_int ldab,\n                           lapack_complex_float* b, lapack_int ldb );\nlapack_int LAPACKE_zpbtrs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int kd, lapack_int nrhs,\n                           const lapack_complex_double* ab, lapack_int ldab,\n                           lapack_complex_double* b, lapack_int ldb );\n\nlapack_int LAPACKE_spftrf( int matrix_order, char transr, char uplo,\n                           lapack_int n, float* a );\nlapack_int LAPACKE_dpftrf( int matrix_order, char transr, char uplo,\n                           lapack_int n, double* a );\nlapack_int LAPACKE_cpftrf( int matrix_order, char transr, char uplo,\n                           lapack_int n, lapack_complex_float* a );\nlapack_int LAPACKE_zpftrf( int matrix_order, char transr, char uplo,\n                           lapack_int n, lapack_complex_double* a );\n\nlapack_int LAPACKE_spftri( int matrix_order, char transr, char uplo,\n                           lapack_int n, float* a );\nlapack_int LAPACKE_dpftri( int matrix_order, char transr, char uplo,\n                           lapack_int n, double* a );\nlapack_int LAPACKE_cpftri( int matrix_order, char transr, char uplo,\n                           lapack_int n, lapack_complex_float* a );\nlapack_int LAPACKE_zpftri( int matrix_order, char transr, char uplo,\n                           lapack_int n, lapack_complex_double* a );\n\nlapack_int LAPACKE_spftrs( int matrix_order, char transr, char uplo,\n                           lapack_int n, lapack_int nrhs, const float* a,\n                           float* b, lapack_int ldb );\nlapack_int LAPACKE_dpftrs( int matrix_order, char transr, char uplo,\n                           lapack_int n, lapack_int nrhs, const double* a,\n                           double* b, lapack_int ldb );\nlapack_int LAPACKE_cpftrs( int matrix_order, char transr, char uplo,\n                           lapack_int n, lapack_int nrhs,\n                           const lapack_complex_float* a,\n                           lapack_complex_float* b, lapack_int ldb );\nlapack_int LAPACKE_zpftrs( int matrix_order, char transr, char uplo,\n                           lapack_int n, lapack_int nrhs,\n                           const lapack_complex_double* a,\n                           lapack_complex_double* b, lapack_int ldb );\n\nlapack_int LAPACKE_spocon( int matrix_order, char uplo, lapack_int n,\n                           const float* a, lapack_int lda, float anorm,\n                           float* rcond );\nlapack_int LAPACKE_dpocon( int matrix_order, char uplo, lapack_int n,\n                           const double* a, lapack_int lda, double anorm,\n                           double* rcond );\nlapack_int LAPACKE_cpocon( int matrix_order, char uplo, lapack_int n,\n                           const lapack_complex_float* a, lapack_int lda,\n                           float anorm, float* rcond );\nlapack_int LAPACKE_zpocon( int matrix_order, char uplo, lapack_int n,\n                           const lapack_complex_double* a, lapack_int lda,\n                           double anorm, double* rcond );\n\nlapack_int LAPACKE_spoequ( int matrix_order, lapack_int n, const float* a,\n                           lapack_int lda, float* s, float* scond,\n                           float* amax );\nlapack_int LAPACKE_dpoequ( int matrix_order, lapack_int n, const double* a,\n                           lapack_int lda, double* s, double* scond,\n                           double* amax );\nlapack_int LAPACKE_cpoequ( int matrix_order, lapack_int n,\n                           const lapack_complex_float* a, lapack_int lda,\n                           float* s, float* scond, float* amax );\nlapack_int LAPACKE_zpoequ( int matrix_order, lapack_int n,\n                           const lapack_complex_double* a, lapack_int lda,\n                           double* s, double* scond, double* amax );\n\nlapack_int LAPACKE_spoequb( int matrix_order, lapack_int n, const float* a,\n                            lapack_int lda, float* s, float* scond,\n                            float* amax );\nlapack_int LAPACKE_dpoequb( int matrix_order, lapack_int n, const double* a,\n                            lapack_int lda, double* s, double* scond,\n                            double* amax );\nlapack_int LAPACKE_cpoequb( int matrix_order, lapack_int n,\n                            const lapack_complex_float* a, lapack_int lda,\n                            float* s, float* scond, float* amax );\nlapack_int LAPACKE_zpoequb( int matrix_order, lapack_int n,\n                            const lapack_complex_double* a, lapack_int lda,\n                            double* s, double* scond, double* amax );\n\nlapack_int LAPACKE_sporfs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const float* a, lapack_int lda,\n                           const float* af, lapack_int ldaf, const float* b,\n                           lapack_int ldb, float* x, lapack_int ldx,\n                           float* ferr, float* berr );\nlapack_int LAPACKE_dporfs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const double* a, lapack_int lda,\n                           const double* af, lapack_int ldaf, const double* b,\n                           lapack_int ldb, double* x, lapack_int ldx,\n                           double* ferr, double* berr );\nlapack_int LAPACKE_cporfs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_float* a,\n                           lapack_int lda, const lapack_complex_float* af,\n                           lapack_int ldaf, const lapack_complex_float* b,\n                           lapack_int ldb, lapack_complex_float* x,\n                           lapack_int ldx, float* ferr, float* berr );\nlapack_int LAPACKE_zporfs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_double* a,\n                           lapack_int lda, const lapack_complex_double* af,\n                           lapack_int ldaf, const lapack_complex_double* b,\n                           lapack_int ldb, lapack_complex_double* x,\n                           lapack_int ldx, double* ferr, double* berr );\n\nlapack_int LAPACKE_sporfsx( int matrix_order, char uplo, char equed,\n                            lapack_int n, lapack_int nrhs, const float* a,\n                            lapack_int lda, const float* af, lapack_int ldaf,\n                            const float* s, const float* b, lapack_int ldb,\n                            float* x, lapack_int ldx, float* rcond, float* berr,\n                            lapack_int n_err_bnds, float* err_bnds_norm,\n                            float* err_bnds_comp, lapack_int nparams,\n                            float* params );\nlapack_int LAPACKE_dporfsx( int matrix_order, char uplo, char equed,\n                            lapack_int n, lapack_int nrhs, const double* a,\n                            lapack_int lda, const double* af, lapack_int ldaf,\n                            const double* s, const double* b, lapack_int ldb,\n                            double* x, lapack_int ldx, double* rcond,\n                            double* berr, lapack_int n_err_bnds,\n                            double* err_bnds_norm, double* err_bnds_comp,\n                            lapack_int nparams, double* params );\nlapack_int LAPACKE_cporfsx( int matrix_order, char uplo, char equed,\n                            lapack_int n, lapack_int nrhs,\n                            const lapack_complex_float* a, lapack_int lda,\n                            const lapack_complex_float* af, lapack_int ldaf,\n                            const float* s, const lapack_complex_float* b,\n                            lapack_int ldb, lapack_complex_float* x,\n                            lapack_int ldx, float* rcond, float* berr,\n                            lapack_int n_err_bnds, float* err_bnds_norm,\n                            float* err_bnds_comp, lapack_int nparams,\n                            float* params );\nlapack_int LAPACKE_zporfsx( int matrix_order, char uplo, char equed,\n                            lapack_int n, lapack_int nrhs,\n                            const lapack_complex_double* a, lapack_int lda,\n                            const lapack_complex_double* af, lapack_int ldaf,\n                            const double* s, const lapack_complex_double* b,\n                            lapack_int ldb, lapack_complex_double* x,\n                            lapack_int ldx, double* rcond, double* berr,\n                            lapack_int n_err_bnds, double* err_bnds_norm,\n                            double* err_bnds_comp, lapack_int nparams,\n                            double* params );\n\nlapack_int LAPACKE_sposv( int matrix_order, char uplo, lapack_int n,\n                          lapack_int nrhs, float* a, lapack_int lda, float* b,\n                          lapack_int ldb );\nlapack_int LAPACKE_dposv( int matrix_order, char uplo, lapack_int n,\n                          lapack_int nrhs, double* a, lapack_int lda, double* b,\n                          lapack_int ldb );\nlapack_int LAPACKE_cposv( int matrix_order, char uplo, lapack_int n,\n                          lapack_int nrhs, lapack_complex_float* a,\n                          lapack_int lda, lapack_complex_float* b,\n                          lapack_int ldb );\nlapack_int LAPACKE_zposv( int matrix_order, char uplo, lapack_int n,\n                          lapack_int nrhs, lapack_complex_double* a,\n                          lapack_int lda, lapack_complex_double* b,\n                          lapack_int ldb );\nlapack_int LAPACKE_dsposv( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, double* a, lapack_int lda,\n                           double* b, lapack_int ldb, double* x, lapack_int ldx,\n                           lapack_int* iter );\nlapack_int LAPACKE_zcposv( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, lapack_complex_double* a,\n                           lapack_int lda, lapack_complex_double* b,\n                           lapack_int ldb, lapack_complex_double* x,\n                           lapack_int ldx, lapack_int* iter );\n\nlapack_int LAPACKE_sposvx( int matrix_order, char fact, char uplo, lapack_int n,\n                           lapack_int nrhs, float* a, lapack_int lda, float* af,\n                           lapack_int ldaf, char* equed, float* s, float* b,\n                           lapack_int ldb, float* x, lapack_int ldx,\n                           float* rcond, float* ferr, float* berr );\nlapack_int LAPACKE_dposvx( int matrix_order, char fact, char uplo, lapack_int n,\n                           lapack_int nrhs, double* a, lapack_int lda,\n                           double* af, lapack_int ldaf, char* equed, double* s,\n                           double* b, lapack_int ldb, double* x, lapack_int ldx,\n                           double* rcond, double* ferr, double* berr );\nlapack_int LAPACKE_cposvx( int matrix_order, char fact, char uplo, lapack_int n,\n                           lapack_int nrhs, lapack_complex_float* a,\n                           lapack_int lda, lapack_complex_float* af,\n                           lapack_int ldaf, char* equed, float* s,\n                           lapack_complex_float* b, lapack_int ldb,\n                           lapack_complex_float* x, lapack_int ldx,\n                           float* rcond, float* ferr, float* berr );\nlapack_int LAPACKE_zposvx( int matrix_order, char fact, char uplo, lapack_int n,\n                           lapack_int nrhs, lapack_complex_double* a,\n                           lapack_int lda, lapack_complex_double* af,\n                           lapack_int ldaf, char* equed, double* s,\n                           lapack_complex_double* b, lapack_int ldb,\n                           lapack_complex_double* x, lapack_int ldx,\n                           double* rcond, double* ferr, double* berr );\n\nlapack_int LAPACKE_sposvxx( int matrix_order, char fact, char uplo,\n                            lapack_int n, lapack_int nrhs, float* a,\n                            lapack_int lda, float* af, lapack_int ldaf,\n                            char* equed, float* s, float* b, lapack_int ldb,\n                            float* x, lapack_int ldx, float* rcond,\n                            float* rpvgrw, float* berr, lapack_int n_err_bnds,\n                            float* err_bnds_norm, float* err_bnds_comp,\n                            lapack_int nparams, float* params );\nlapack_int LAPACKE_dposvxx( int matrix_order, char fact, char uplo,\n                            lapack_int n, lapack_int nrhs, double* a,\n                            lapack_int lda, double* af, lapack_int ldaf,\n                            char* equed, double* s, double* b, lapack_int ldb,\n                            double* x, lapack_int ldx, double* rcond,\n                            double* rpvgrw, double* berr, lapack_int n_err_bnds,\n                            double* err_bnds_norm, double* err_bnds_comp,\n                            lapack_int nparams, double* params );\nlapack_int LAPACKE_cposvxx( int matrix_order, char fact, char uplo,\n                            lapack_int n, lapack_int nrhs,\n                            lapack_complex_float* a, lapack_int lda,\n                            lapack_complex_float* af, lapack_int ldaf,\n                            char* equed, float* s, lapack_complex_float* b,\n                            lapack_int ldb, lapack_complex_float* x,\n                            lapack_int ldx, float* rcond, float* rpvgrw,\n                            float* berr, lapack_int n_err_bnds,\n                            float* err_bnds_norm, float* err_bnds_comp,\n                            lapack_int nparams, float* params );\nlapack_int LAPACKE_zposvxx( int matrix_order, char fact, char uplo,\n                            lapack_int n, lapack_int nrhs,\n                            lapack_complex_double* a, lapack_int lda,\n                            lapack_complex_double* af, lapack_int ldaf,\n                            char* equed, double* s, lapack_complex_double* b,\n                            lapack_int ldb, lapack_complex_double* x,\n                            lapack_int ldx, double* rcond, double* rpvgrw,\n                            double* berr, lapack_int n_err_bnds,\n                            double* err_bnds_norm, double* err_bnds_comp,\n                            lapack_int nparams, double* params );\n\nlapack_int LAPACKE_spotrf( int matrix_order, char uplo, lapack_int n, float* a,\n                           lapack_int lda );\nlapack_int LAPACKE_dpotrf( int matrix_order, char uplo, lapack_int n, double* a,\n                           lapack_int lda );\nlapack_int LAPACKE_cpotrf( int matrix_order, char uplo, lapack_int n,\n                           lapack_complex_float* a, lapack_int lda );\nlapack_int LAPACKE_zpotrf( int matrix_order, char uplo, lapack_int n,\n                           lapack_complex_double* a, lapack_int lda );\n\nlapack_int LAPACKE_spotri( int matrix_order, char uplo, lapack_int n, float* a,\n                           lapack_int lda );\nlapack_int LAPACKE_dpotri( int matrix_order, char uplo, lapack_int n, double* a,\n                           lapack_int lda );\nlapack_int LAPACKE_cpotri( int matrix_order, char uplo, lapack_int n,\n                           lapack_complex_float* a, lapack_int lda );\nlapack_int LAPACKE_zpotri( int matrix_order, char uplo, lapack_int n,\n                           lapack_complex_double* a, lapack_int lda );\n\nlapack_int LAPACKE_spotrs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const float* a, lapack_int lda,\n                           float* b, lapack_int ldb );\nlapack_int LAPACKE_dpotrs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const double* a, lapack_int lda,\n                           double* b, lapack_int ldb );\nlapack_int LAPACKE_cpotrs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_float* a,\n                           lapack_int lda, lapack_complex_float* b,\n                           lapack_int ldb );\nlapack_int LAPACKE_zpotrs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_double* a,\n                           lapack_int lda, lapack_complex_double* b,\n                           lapack_int ldb );\n\nlapack_int LAPACKE_sppcon( int matrix_order, char uplo, lapack_int n,\n                           const float* ap, float anorm, float* rcond );\nlapack_int LAPACKE_dppcon( int matrix_order, char uplo, lapack_int n,\n                           const double* ap, double anorm, double* rcond );\nlapack_int LAPACKE_cppcon( int matrix_order, char uplo, lapack_int n,\n                           const lapack_complex_float* ap, float anorm,\n                           float* rcond );\nlapack_int LAPACKE_zppcon( int matrix_order, char uplo, lapack_int n,\n                           const lapack_complex_double* ap, double anorm,\n                           double* rcond );\n\nlapack_int LAPACKE_sppequ( int matrix_order, char uplo, lapack_int n,\n                           const float* ap, float* s, float* scond,\n                           float* amax );\nlapack_int LAPACKE_dppequ( int matrix_order, char uplo, lapack_int n,\n                           const double* ap, double* s, double* scond,\n                           double* amax );\nlapack_int LAPACKE_cppequ( int matrix_order, char uplo, lapack_int n,\n                           const lapack_complex_float* ap, float* s,\n                           float* scond, float* amax );\nlapack_int LAPACKE_zppequ( int matrix_order, char uplo, lapack_int n,\n                           const lapack_complex_double* ap, double* s,\n                           double* scond, double* amax );\n\nlapack_int LAPACKE_spprfs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const float* ap, const float* afp,\n                           const float* b, lapack_int ldb, float* x,\n                           lapack_int ldx, float* ferr, float* berr );\nlapack_int LAPACKE_dpprfs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const double* ap, const double* afp,\n                           const double* b, lapack_int ldb, double* x,\n                           lapack_int ldx, double* ferr, double* berr );\nlapack_int LAPACKE_cpprfs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_float* ap,\n                           const lapack_complex_float* afp,\n                           const lapack_complex_float* b, lapack_int ldb,\n                           lapack_complex_float* x, lapack_int ldx, float* ferr,\n                           float* berr );\nlapack_int LAPACKE_zpprfs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_double* ap,\n                           const lapack_complex_double* afp,\n                           const lapack_complex_double* b, lapack_int ldb,\n                           lapack_complex_double* x, lapack_int ldx,\n                           double* ferr, double* berr );\n\nlapack_int LAPACKE_sppsv( int matrix_order, char uplo, lapack_int n,\n                          lapack_int nrhs, float* ap, float* b,\n                          lapack_int ldb );\nlapack_int LAPACKE_dppsv( int matrix_order, char uplo, lapack_int n,\n                          lapack_int nrhs, double* ap, double* b,\n                          lapack_int ldb );\nlapack_int LAPACKE_cppsv( int matrix_order, char uplo, lapack_int n,\n                          lapack_int nrhs, lapack_complex_float* ap,\n                          lapack_complex_float* b, lapack_int ldb );\nlapack_int LAPACKE_zppsv( int matrix_order, char uplo, lapack_int n,\n                          lapack_int nrhs, lapack_complex_double* ap,\n                          lapack_complex_double* b, lapack_int ldb );\n\nlapack_int LAPACKE_sppsvx( int matrix_order, char fact, char uplo, lapack_int n,\n                           lapack_int nrhs, float* ap, float* afp, char* equed,\n                           float* s, float* b, lapack_int ldb, float* x,\n                           lapack_int ldx, float* rcond, float* ferr,\n                           float* berr );\nlapack_int LAPACKE_dppsvx( int matrix_order, char fact, char uplo, lapack_int n,\n                           lapack_int nrhs, double* ap, double* afp,\n                           char* equed, double* s, double* b, lapack_int ldb,\n                           double* x, lapack_int ldx, double* rcond,\n                           double* ferr, double* berr );\nlapack_int LAPACKE_cppsvx( int matrix_order, char fact, char uplo, lapack_int n,\n                           lapack_int nrhs, lapack_complex_float* ap,\n                           lapack_complex_float* afp, char* equed, float* s,\n                           lapack_complex_float* b, lapack_int ldb,\n                           lapack_complex_float* x, lapack_int ldx,\n                           float* rcond, float* ferr, float* berr );\nlapack_int LAPACKE_zppsvx( int matrix_order, char fact, char uplo, lapack_int n,\n                           lapack_int nrhs, lapack_complex_double* ap,\n                           lapack_complex_double* afp, char* equed, double* s,\n                           lapack_complex_double* b, lapack_int ldb,\n                           lapack_complex_double* x, lapack_int ldx,\n                           double* rcond, double* ferr, double* berr );\n\nlapack_int LAPACKE_spptrf( int matrix_order, char uplo, lapack_int n,\n                           float* ap );\nlapack_int LAPACKE_dpptrf( int matrix_order, char uplo, lapack_int n,\n                           double* ap );\nlapack_int LAPACKE_cpptrf( int matrix_order, char uplo, lapack_int n,\n                           lapack_complex_float* ap );\nlapack_int LAPACKE_zpptrf( int matrix_order, char uplo, lapack_int n,\n                           lapack_complex_double* ap );\n\nlapack_int LAPACKE_spptri( int matrix_order, char uplo, lapack_int n,\n                           float* ap );\nlapack_int LAPACKE_dpptri( int matrix_order, char uplo, lapack_int n,\n                           double* ap );\nlapack_int LAPACKE_cpptri( int matrix_order, char uplo, lapack_int n,\n                           lapack_complex_float* ap );\nlapack_int LAPACKE_zpptri( int matrix_order, char uplo, lapack_int n,\n                           lapack_complex_double* ap );\n\nlapack_int LAPACKE_spptrs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const float* ap, float* b,\n                           lapack_int ldb );\nlapack_int LAPACKE_dpptrs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const double* ap, double* b,\n                           lapack_int ldb );\nlapack_int LAPACKE_cpptrs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_float* ap,\n                           lapack_complex_float* b, lapack_int ldb );\nlapack_int LAPACKE_zpptrs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_double* ap,\n                           lapack_complex_double* b, lapack_int ldb );\n\nlapack_int LAPACKE_spstrf( int matrix_order, char uplo, lapack_int n, float* a,\n                           lapack_int lda, lapack_int* piv, lapack_int* rank,\n                           float tol );\nlapack_int LAPACKE_dpstrf( int matrix_order, char uplo, lapack_int n, double* a,\n                           lapack_int lda, lapack_int* piv, lapack_int* rank,\n                           double tol );\nlapack_int LAPACKE_cpstrf( int matrix_order, char uplo, lapack_int n,\n                           lapack_complex_float* a, lapack_int lda,\n                           lapack_int* piv, lapack_int* rank, float tol );\nlapack_int LAPACKE_zpstrf( int matrix_order, char uplo, lapack_int n,\n                           lapack_complex_double* a, lapack_int lda,\n                           lapack_int* piv, lapack_int* rank, double tol );\n\nlapack_int LAPACKE_sptcon( lapack_int n, const float* d, const float* e,\n                           float anorm, float* rcond );\nlapack_int LAPACKE_dptcon( lapack_int n, const double* d, const double* e,\n                           double anorm, double* rcond );\nlapack_int LAPACKE_cptcon( lapack_int n, const float* d,\n                           const lapack_complex_float* e, float anorm,\n                           float* rcond );\nlapack_int LAPACKE_zptcon( lapack_int n, const double* d,\n                           const lapack_complex_double* e, double anorm,\n                           double* rcond );\n\nlapack_int LAPACKE_spteqr( int matrix_order, char compz, lapack_int n, float* d,\n                           float* e, float* z, lapack_int ldz );\nlapack_int LAPACKE_dpteqr( int matrix_order, char compz, lapack_int n,\n                           double* d, double* e, double* z, lapack_int ldz );\nlapack_int LAPACKE_cpteqr( int matrix_order, char compz, lapack_int n, float* d,\n                           float* e, lapack_complex_float* z, lapack_int ldz );\nlapack_int LAPACKE_zpteqr( int matrix_order, char compz, lapack_int n,\n                           double* d, double* e, lapack_complex_double* z,\n                           lapack_int ldz );\n\nlapack_int LAPACKE_sptrfs( int matrix_order, lapack_int n, lapack_int nrhs,\n                           const float* d, const float* e, const float* df,\n                           const float* ef, const float* b, lapack_int ldb,\n                           float* x, lapack_int ldx, float* ferr, float* berr );\nlapack_int LAPACKE_dptrfs( int matrix_order, lapack_int n, lapack_int nrhs,\n                           const double* d, const double* e, const double* df,\n                           const double* ef, const double* b, lapack_int ldb,\n                           double* x, lapack_int ldx, double* ferr,\n                           double* berr );\nlapack_int LAPACKE_cptrfs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const float* d,\n                           const lapack_complex_float* e, const float* df,\n                           const lapack_complex_float* ef,\n                           const lapack_complex_float* b, lapack_int ldb,\n                           lapack_complex_float* x, lapack_int ldx, float* ferr,\n                           float* berr );\nlapack_int LAPACKE_zptrfs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const double* d,\n                           const lapack_complex_double* e, const double* df,\n                           const lapack_complex_double* ef,\n                           const lapack_complex_double* b, lapack_int ldb,\n                           lapack_complex_double* x, lapack_int ldx,\n                           double* ferr, double* berr );\n\nlapack_int LAPACKE_sptsv( int matrix_order, lapack_int n, lapack_int nrhs,\n                          float* d, float* e, float* b, lapack_int ldb );\nlapack_int LAPACKE_dptsv( int matrix_order, lapack_int n, lapack_int nrhs,\n                          double* d, double* e, double* b, lapack_int ldb );\nlapack_int LAPACKE_cptsv( int matrix_order, lapack_int n, lapack_int nrhs,\n                          float* d, lapack_complex_float* e,\n                          lapack_complex_float* b, lapack_int ldb );\nlapack_int LAPACKE_zptsv( int matrix_order, lapack_int n, lapack_int nrhs,\n                          double* d, lapack_complex_double* e,\n                          lapack_complex_double* b, lapack_int ldb );\n\nlapack_int LAPACKE_sptsvx( int matrix_order, char fact, lapack_int n,\n                           lapack_int nrhs, const float* d, const float* e,\n                           float* df, float* ef, const float* b, lapack_int ldb,\n                           float* x, lapack_int ldx, float* rcond, float* ferr,\n                           float* berr );\nlapack_int LAPACKE_dptsvx( int matrix_order, char fact, lapack_int n,\n                           lapack_int nrhs, const double* d, const double* e,\n                           double* df, double* ef, const double* b,\n                           lapack_int ldb, double* x, lapack_int ldx,\n                           double* rcond, double* ferr, double* berr );\nlapack_int LAPACKE_cptsvx( int matrix_order, char fact, lapack_int n,\n                           lapack_int nrhs, const float* d,\n                           const lapack_complex_float* e, float* df,\n                           lapack_complex_float* ef,\n                           const lapack_complex_float* b, lapack_int ldb,\n                           lapack_complex_float* x, lapack_int ldx,\n                           float* rcond, float* ferr, float* berr );\nlapack_int LAPACKE_zptsvx( int matrix_order, char fact, lapack_int n,\n                           lapack_int nrhs, const double* d,\n                           const lapack_complex_double* e, double* df,\n                           lapack_complex_double* ef,\n                           const lapack_complex_double* b, lapack_int ldb,\n                           lapack_complex_double* x, lapack_int ldx,\n                           double* rcond, double* ferr, double* berr );\n\nlapack_int LAPACKE_spttrf( lapack_int n, float* d, float* e );\nlapack_int LAPACKE_dpttrf( lapack_int n, double* d, double* e );\nlapack_int LAPACKE_cpttrf( lapack_int n, float* d, lapack_complex_float* e );\nlapack_int LAPACKE_zpttrf( lapack_int n, double* d, lapack_complex_double* e );\n\nlapack_int LAPACKE_spttrs( int matrix_order, lapack_int n, lapack_int nrhs,\n                           const float* d, const float* e, float* b,\n                           lapack_int ldb );\nlapack_int LAPACKE_dpttrs( int matrix_order, lapack_int n, lapack_int nrhs,\n                           const double* d, const double* e, double* b,\n                           lapack_int ldb );\nlapack_int LAPACKE_cpttrs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const float* d,\n                           const lapack_complex_float* e,\n                           lapack_complex_float* b, lapack_int ldb );\nlapack_int LAPACKE_zpttrs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const double* d,\n                           const lapack_complex_double* e,\n                           lapack_complex_double* b, lapack_int ldb );\n\nlapack_int LAPACKE_ssbev( int matrix_order, char jobz, char uplo, lapack_int n,\n                          lapack_int kd, float* ab, lapack_int ldab, float* w,\n                          float* z, lapack_int ldz );\nlapack_int LAPACKE_dsbev( int matrix_order, char jobz, char uplo, lapack_int n,\n                          lapack_int kd, double* ab, lapack_int ldab, double* w,\n                          double* z, lapack_int ldz );\n\nlapack_int LAPACKE_ssbevd( int matrix_order, char jobz, char uplo, lapack_int n,\n                           lapack_int kd, float* ab, lapack_int ldab, float* w,\n                           float* z, lapack_int ldz );\nlapack_int LAPACKE_dsbevd( int matrix_order, char jobz, char uplo, lapack_int n,\n                           lapack_int kd, double* ab, lapack_int ldab,\n                           double* w, double* z, lapack_int ldz );\n\nlapack_int LAPACKE_ssbevx( int matrix_order, char jobz, char range, char uplo,\n                           lapack_int n, lapack_int kd, float* ab,\n                           lapack_int ldab, float* q, lapack_int ldq, float vl,\n                           float vu, lapack_int il, lapack_int iu, float abstol,\n                           lapack_int* m, float* w, float* z, lapack_int ldz,\n                           lapack_int* ifail );\nlapack_int LAPACKE_dsbevx( int matrix_order, char jobz, char range, char uplo,\n                           lapack_int n, lapack_int kd, double* ab,\n                           lapack_int ldab, double* q, lapack_int ldq,\n                           double vl, double vu, lapack_int il, lapack_int iu,\n                           double abstol, lapack_int* m, double* w, double* z,\n                           lapack_int ldz, lapack_int* ifail );\n\nlapack_int LAPACKE_ssbgst( int matrix_order, char vect, char uplo, lapack_int n,\n                           lapack_int ka, lapack_int kb, float* ab,\n                           lapack_int ldab, const float* bb, lapack_int ldbb,\n                           float* x, lapack_int ldx );\nlapack_int LAPACKE_dsbgst( int matrix_order, char vect, char uplo, lapack_int n,\n                           lapack_int ka, lapack_int kb, double* ab,\n                           lapack_int ldab, const double* bb, lapack_int ldbb,\n                           double* x, lapack_int ldx );\n\nlapack_int LAPACKE_ssbgv( int matrix_order, char jobz, char uplo, lapack_int n,\n                          lapack_int ka, lapack_int kb, float* ab,\n                          lapack_int ldab, float* bb, lapack_int ldbb, float* w,\n                          float* z, lapack_int ldz );\nlapack_int LAPACKE_dsbgv( int matrix_order, char jobz, char uplo, lapack_int n,\n                          lapack_int ka, lapack_int kb, double* ab,\n                          lapack_int ldab, double* bb, lapack_int ldbb,\n                          double* w, double* z, lapack_int ldz );\n\nlapack_int LAPACKE_ssbgvd( int matrix_order, char jobz, char uplo, lapack_int n,\n                           lapack_int ka, lapack_int kb, float* ab,\n                           lapack_int ldab, float* bb, lapack_int ldbb,\n                           float* w, float* z, lapack_int ldz );\nlapack_int LAPACKE_dsbgvd( int matrix_order, char jobz, char uplo, lapack_int n,\n                           lapack_int ka, lapack_int kb, double* ab,\n                           lapack_int ldab, double* bb, lapack_int ldbb,\n                           double* w, double* z, lapack_int ldz );\n\nlapack_int LAPACKE_ssbgvx( int matrix_order, char jobz, char range, char uplo,\n                           lapack_int n, lapack_int ka, lapack_int kb,\n                           float* ab, lapack_int ldab, float* bb,\n                           lapack_int ldbb, float* q, lapack_int ldq, float vl,\n                           float vu, lapack_int il, lapack_int iu, float abstol,\n                           lapack_int* m, float* w, float* z, lapack_int ldz,\n                           lapack_int* ifail );\nlapack_int LAPACKE_dsbgvx( int matrix_order, char jobz, char range, char uplo,\n                           lapack_int n, lapack_int ka, lapack_int kb,\n                           double* ab, lapack_int ldab, double* bb,\n                           lapack_int ldbb, double* q, lapack_int ldq,\n                           double vl, double vu, lapack_int il, lapack_int iu,\n                           double abstol, lapack_int* m, double* w, double* z,\n                           lapack_int ldz, lapack_int* ifail );\n\nlapack_int LAPACKE_ssbtrd( int matrix_order, char vect, char uplo, lapack_int n,\n                           lapack_int kd, float* ab, lapack_int ldab, float* d,\n                           float* e, float* q, lapack_int ldq );\nlapack_int LAPACKE_dsbtrd( int matrix_order, char vect, char uplo, lapack_int n,\n                           lapack_int kd, double* ab, lapack_int ldab,\n                           double* d, double* e, double* q, lapack_int ldq );\n\nlapack_int LAPACKE_ssfrk( int matrix_order, char transr, char uplo, char trans,\n                          lapack_int n, lapack_int k, float alpha,\n                          const float* a, lapack_int lda, float beta,\n                          float* c );\nlapack_int LAPACKE_dsfrk( int matrix_order, char transr, char uplo, char trans,\n                          lapack_int n, lapack_int k, double alpha,\n                          const double* a, lapack_int lda, double beta,\n                          double* c );\n\nlapack_int LAPACKE_sspcon( int matrix_order, char uplo, lapack_int n,\n                           const float* ap, const lapack_int* ipiv, float anorm,\n                           float* rcond );\nlapack_int LAPACKE_dspcon( int matrix_order, char uplo, lapack_int n,\n                           const double* ap, const lapack_int* ipiv,\n                           double anorm, double* rcond );\nlapack_int LAPACKE_cspcon( int matrix_order, char uplo, lapack_int n,\n                           const lapack_complex_float* ap,\n                           const lapack_int* ipiv, float anorm, float* rcond );\nlapack_int LAPACKE_zspcon( int matrix_order, char uplo, lapack_int n,\n                           const lapack_complex_double* ap,\n                           const lapack_int* ipiv, double anorm,\n                           double* rcond );\n\nlapack_int LAPACKE_sspev( int matrix_order, char jobz, char uplo, lapack_int n,\n                          float* ap, float* w, float* z, lapack_int ldz );\nlapack_int LAPACKE_dspev( int matrix_order, char jobz, char uplo, lapack_int n,\n                          double* ap, double* w, double* z, lapack_int ldz );\n\nlapack_int LAPACKE_sspevd( int matrix_order, char jobz, char uplo, lapack_int n,\n                           float* ap, float* w, float* z, lapack_int ldz );\nlapack_int LAPACKE_dspevd( int matrix_order, char jobz, char uplo, lapack_int n,\n                           double* ap, double* w, double* z, lapack_int ldz );\n\nlapack_int LAPACKE_sspevx( int matrix_order, char jobz, char range, char uplo,\n                           lapack_int n, float* ap, float vl, float vu,\n                           lapack_int il, lapack_int iu, float abstol,\n                           lapack_int* m, float* w, float* z, lapack_int ldz,\n                           lapack_int* ifail );\nlapack_int LAPACKE_dspevx( int matrix_order, char jobz, char range, char uplo,\n                           lapack_int n, double* ap, double vl, double vu,\n                           lapack_int il, lapack_int iu, double abstol,\n                           lapack_int* m, double* w, double* z, lapack_int ldz,\n                           lapack_int* ifail );\n\nlapack_int LAPACKE_sspgst( int matrix_order, lapack_int itype, char uplo,\n                           lapack_int n, float* ap, const float* bp );\nlapack_int LAPACKE_dspgst( int matrix_order, lapack_int itype, char uplo,\n                           lapack_int n, double* ap, const double* bp );\n\nlapack_int LAPACKE_sspgv( int matrix_order, lapack_int itype, char jobz,\n                          char uplo, lapack_int n, float* ap, float* bp,\n                          float* w, float* z, lapack_int ldz );\nlapack_int LAPACKE_dspgv( int matrix_order, lapack_int itype, char jobz,\n                          char uplo, lapack_int n, double* ap, double* bp,\n                          double* w, double* z, lapack_int ldz );\n\nlapack_int LAPACKE_sspgvd( int matrix_order, lapack_int itype, char jobz,\n                           char uplo, lapack_int n, float* ap, float* bp,\n                           float* w, float* z, lapack_int ldz );\nlapack_int LAPACKE_dspgvd( int matrix_order, lapack_int itype, char jobz,\n                           char uplo, lapack_int n, double* ap, double* bp,\n                           double* w, double* z, lapack_int ldz );\n\nlapack_int LAPACKE_sspgvx( int matrix_order, lapack_int itype, char jobz,\n                           char range, char uplo, lapack_int n, float* ap,\n                           float* bp, float vl, float vu, lapack_int il,\n                           lapack_int iu, float abstol, lapack_int* m, float* w,\n                           float* z, lapack_int ldz, lapack_int* ifail );\nlapack_int LAPACKE_dspgvx( int matrix_order, lapack_int itype, char jobz,\n                           char range, char uplo, lapack_int n, double* ap,\n                           double* bp, double vl, double vu, lapack_int il,\n                           lapack_int iu, double abstol, lapack_int* m,\n                           double* w, double* z, lapack_int ldz,\n                           lapack_int* ifail );\n\nlapack_int LAPACKE_ssprfs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const float* ap, const float* afp,\n                           const lapack_int* ipiv, const float* b,\n                           lapack_int ldb, float* x, lapack_int ldx,\n                           float* ferr, float* berr );\nlapack_int LAPACKE_dsprfs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const double* ap, const double* afp,\n                           const lapack_int* ipiv, const double* b,\n                           lapack_int ldb, double* x, lapack_int ldx,\n                           double* ferr, double* berr );\nlapack_int LAPACKE_csprfs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_float* ap,\n                           const lapack_complex_float* afp,\n                           const lapack_int* ipiv,\n                           const lapack_complex_float* b, lapack_int ldb,\n                           lapack_complex_float* x, lapack_int ldx, float* ferr,\n                           float* berr );\nlapack_int LAPACKE_zsprfs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_double* ap,\n                           const lapack_complex_double* afp,\n                           const lapack_int* ipiv,\n                           const lapack_complex_double* b, lapack_int ldb,\n                           lapack_complex_double* x, lapack_int ldx,\n                           double* ferr, double* berr );\n\nlapack_int LAPACKE_sspsv( int matrix_order, char uplo, lapack_int n,\n                          lapack_int nrhs, float* ap, lapack_int* ipiv,\n                          float* b, lapack_int ldb );\nlapack_int LAPACKE_dspsv( int matrix_order, char uplo, lapack_int n,\n                          lapack_int nrhs, double* ap, lapack_int* ipiv,\n                          double* b, lapack_int ldb );\nlapack_int LAPACKE_cspsv( int matrix_order, char uplo, lapack_int n,\n                          lapack_int nrhs, lapack_complex_float* ap,\n                          lapack_int* ipiv, lapack_complex_float* b,\n                          lapack_int ldb );\nlapack_int LAPACKE_zspsv( int matrix_order, char uplo, lapack_int n,\n                          lapack_int nrhs, lapack_complex_double* ap,\n                          lapack_int* ipiv, lapack_complex_double* b,\n                          lapack_int ldb );\n\nlapack_int LAPACKE_sspsvx( int matrix_order, char fact, char uplo, lapack_int n,\n                           lapack_int nrhs, const float* ap, float* afp,\n                           lapack_int* ipiv, const float* b, lapack_int ldb,\n                           float* x, lapack_int ldx, float* rcond, float* ferr,\n                           float* berr );\nlapack_int LAPACKE_dspsvx( int matrix_order, char fact, char uplo, lapack_int n,\n                           lapack_int nrhs, const double* ap, double* afp,\n                           lapack_int* ipiv, const double* b, lapack_int ldb,\n                           double* x, lapack_int ldx, double* rcond,\n                           double* ferr, double* berr );\nlapack_int LAPACKE_cspsvx( int matrix_order, char fact, char uplo, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_float* ap,\n                           lapack_complex_float* afp, lapack_int* ipiv,\n                           const lapack_complex_float* b, lapack_int ldb,\n                           lapack_complex_float* x, lapack_int ldx,\n                           float* rcond, float* ferr, float* berr );\nlapack_int LAPACKE_zspsvx( int matrix_order, char fact, char uplo, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_double* ap,\n                           lapack_complex_double* afp, lapack_int* ipiv,\n                           const lapack_complex_double* b, lapack_int ldb,\n                           lapack_complex_double* x, lapack_int ldx,\n                           double* rcond, double* ferr, double* berr );\n\nlapack_int LAPACKE_ssptrd( int matrix_order, char uplo, lapack_int n, float* ap,\n                           float* d, float* e, float* tau );\nlapack_int LAPACKE_dsptrd( int matrix_order, char uplo, lapack_int n,\n                           double* ap, double* d, double* e, double* tau );\n\nlapack_int LAPACKE_ssptrf( int matrix_order, char uplo, lapack_int n, float* ap,\n                           lapack_int* ipiv );\nlapack_int LAPACKE_dsptrf( int matrix_order, char uplo, lapack_int n,\n                           double* ap, lapack_int* ipiv );\nlapack_int LAPACKE_csptrf( int matrix_order, char uplo, lapack_int n,\n                           lapack_complex_float* ap, lapack_int* ipiv );\nlapack_int LAPACKE_zsptrf( int matrix_order, char uplo, lapack_int n,\n                           lapack_complex_double* ap, lapack_int* ipiv );\n\nlapack_int LAPACKE_ssptri( int matrix_order, char uplo, lapack_int n, float* ap,\n                           const lapack_int* ipiv );\nlapack_int LAPACKE_dsptri( int matrix_order, char uplo, lapack_int n,\n                           double* ap, const lapack_int* ipiv );\nlapack_int LAPACKE_csptri( int matrix_order, char uplo, lapack_int n,\n                           lapack_complex_float* ap, const lapack_int* ipiv );\nlapack_int LAPACKE_zsptri( int matrix_order, char uplo, lapack_int n,\n                           lapack_complex_double* ap, const lapack_int* ipiv );\n\nlapack_int LAPACKE_ssptrs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const float* ap,\n                           const lapack_int* ipiv, float* b, lapack_int ldb );\nlapack_int LAPACKE_dsptrs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const double* ap,\n                           const lapack_int* ipiv, double* b, lapack_int ldb );\nlapack_int LAPACKE_csptrs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_float* ap,\n                           const lapack_int* ipiv, lapack_complex_float* b,\n                           lapack_int ldb );\nlapack_int LAPACKE_zsptrs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_double* ap,\n                           const lapack_int* ipiv, lapack_complex_double* b,\n                           lapack_int ldb );\n\nlapack_int LAPACKE_sstebz( char range, char order, lapack_int n, float vl,\n                           float vu, lapack_int il, lapack_int iu, float abstol,\n                           const float* d, const float* e, lapack_int* m,\n                           lapack_int* nsplit, float* w, lapack_int* iblock,\n                           lapack_int* isplit );\nlapack_int LAPACKE_dstebz( char range, char order, lapack_int n, double vl,\n                           double vu, lapack_int il, lapack_int iu,\n                           double abstol, const double* d, const double* e,\n                           lapack_int* m, lapack_int* nsplit, double* w,\n                           lapack_int* iblock, lapack_int* isplit );\n\nlapack_int LAPACKE_sstedc( int matrix_order, char compz, lapack_int n, float* d,\n                           float* e, float* z, lapack_int ldz );\nlapack_int LAPACKE_dstedc( int matrix_order, char compz, lapack_int n,\n                           double* d, double* e, double* z, lapack_int ldz );\nlapack_int LAPACKE_cstedc( int matrix_order, char compz, lapack_int n, float* d,\n                           float* e, lapack_complex_float* z, lapack_int ldz );\nlapack_int LAPACKE_zstedc( int matrix_order, char compz, lapack_int n,\n                           double* d, double* e, lapack_complex_double* z,\n                           lapack_int ldz );\n\nlapack_int LAPACKE_sstegr( int matrix_order, char jobz, char range,\n                           lapack_int n, float* d, float* e, float vl, float vu,\n                           lapack_int il, lapack_int iu, float abstol,\n                           lapack_int* m, float* w, float* z, lapack_int ldz,\n                           lapack_int* isuppz );\nlapack_int LAPACKE_dstegr( int matrix_order, char jobz, char range,\n                           lapack_int n, double* d, double* e, double vl,\n                           double vu, lapack_int il, lapack_int iu,\n                           double abstol, lapack_int* m, double* w, double* z,\n                           lapack_int ldz, lapack_int* isuppz );\nlapack_int LAPACKE_cstegr( int matrix_order, char jobz, char range,\n                           lapack_int n, float* d, float* e, float vl, float vu,\n                           lapack_int il, lapack_int iu, float abstol,\n                           lapack_int* m, float* w, lapack_complex_float* z,\n                           lapack_int ldz, lapack_int* isuppz );\nlapack_int LAPACKE_zstegr( int matrix_order, char jobz, char range,\n                           lapack_int n, double* d, double* e, double vl,\n                           double vu, lapack_int il, lapack_int iu,\n                           double abstol, lapack_int* m, double* w,\n                           lapack_complex_double* z, lapack_int ldz,\n                           lapack_int* isuppz );\n\nlapack_int LAPACKE_sstein( int matrix_order, lapack_int n, const float* d,\n                           const float* e, lapack_int m, const float* w,\n                           const lapack_int* iblock, const lapack_int* isplit,\n                           float* z, lapack_int ldz, lapack_int* ifailv );\nlapack_int LAPACKE_dstein( int matrix_order, lapack_int n, const double* d,\n                           const double* e, lapack_int m, const double* w,\n                           const lapack_int* iblock, const lapack_int* isplit,\n                           double* z, lapack_int ldz, lapack_int* ifailv );\nlapack_int LAPACKE_cstein( int matrix_order, lapack_int n, const float* d,\n                           const float* e, lapack_int m, const float* w,\n                           const lapack_int* iblock, const lapack_int* isplit,\n                           lapack_complex_float* z, lapack_int ldz,\n                           lapack_int* ifailv );\nlapack_int LAPACKE_zstein( int matrix_order, lapack_int n, const double* d,\n                           const double* e, lapack_int m, const double* w,\n                           const lapack_int* iblock, const lapack_int* isplit,\n                           lapack_complex_double* z, lapack_int ldz,\n                           lapack_int* ifailv );\n\nlapack_int LAPACKE_sstemr( int matrix_order, char jobz, char range,\n                           lapack_int n, float* d, float* e, float vl, float vu,\n                           lapack_int il, lapack_int iu, lapack_int* m,\n                           float* w, float* z, lapack_int ldz, lapack_int nzc,\n                           lapack_int* isuppz, lapack_logical* tryrac );\nlapack_int LAPACKE_dstemr( int matrix_order, char jobz, char range,\n                           lapack_int n, double* d, double* e, double vl,\n                           double vu, lapack_int il, lapack_int iu,\n                           lapack_int* m, double* w, double* z, lapack_int ldz,\n                           lapack_int nzc, lapack_int* isuppz,\n                           lapack_logical* tryrac );\nlapack_int LAPACKE_cstemr( int matrix_order, char jobz, char range,\n                           lapack_int n, float* d, float* e, float vl, float vu,\n                           lapack_int il, lapack_int iu, lapack_int* m,\n                           float* w, lapack_complex_float* z, lapack_int ldz,\n                           lapack_int nzc, lapack_int* isuppz,\n                           lapack_logical* tryrac );\nlapack_int LAPACKE_zstemr( int matrix_order, char jobz, char range,\n                           lapack_int n, double* d, double* e, double vl,\n                           double vu, lapack_int il, lapack_int iu,\n                           lapack_int* m, double* w, lapack_complex_double* z,\n                           lapack_int ldz, lapack_int nzc, lapack_int* isuppz,\n                           lapack_logical* tryrac );\n\nlapack_int LAPACKE_ssteqr( int matrix_order, char compz, lapack_int n, float* d,\n                           float* e, float* z, lapack_int ldz );\nlapack_int LAPACKE_dsteqr( int matrix_order, char compz, lapack_int n,\n                           double* d, double* e, double* z, lapack_int ldz );\nlapack_int LAPACKE_csteqr( int matrix_order, char compz, lapack_int n, float* d,\n                           float* e, lapack_complex_float* z, lapack_int ldz );\nlapack_int LAPACKE_zsteqr( int matrix_order, char compz, lapack_int n,\n                           double* d, double* e, lapack_complex_double* z,\n                           lapack_int ldz );\n\nlapack_int LAPACKE_ssterf( lapack_int n, float* d, float* e );\nlapack_int LAPACKE_dsterf( lapack_int n, double* d, double* e );\n\nlapack_int LAPACKE_sstev( int matrix_order, char jobz, lapack_int n, float* d,\n                          float* e, float* z, lapack_int ldz );\nlapack_int LAPACKE_dstev( int matrix_order, char jobz, lapack_int n, double* d,\n                          double* e, double* z, lapack_int ldz );\n\nlapack_int LAPACKE_sstevd( int matrix_order, char jobz, lapack_int n, float* d,\n                           float* e, float* z, lapack_int ldz );\nlapack_int LAPACKE_dstevd( int matrix_order, char jobz, lapack_int n, double* d,\n                           double* e, double* z, lapack_int ldz );\n\nlapack_int LAPACKE_sstevr( int matrix_order, char jobz, char range,\n                           lapack_int n, float* d, float* e, float vl, float vu,\n                           lapack_int il, lapack_int iu, float abstol,\n                           lapack_int* m, float* w, float* z, lapack_int ldz,\n                           lapack_int* isuppz );\nlapack_int LAPACKE_dstevr( int matrix_order, char jobz, char range,\n                           lapack_int n, double* d, double* e, double vl,\n                           double vu, lapack_int il, lapack_int iu,\n                           double abstol, lapack_int* m, double* w, double* z,\n                           lapack_int ldz, lapack_int* isuppz );\n\nlapack_int LAPACKE_sstevx( int matrix_order, char jobz, char range,\n                           lapack_int n, float* d, float* e, float vl, float vu,\n                           lapack_int il, lapack_int iu, float abstol,\n                           lapack_int* m, float* w, float* z, lapack_int ldz,\n                           lapack_int* ifail );\nlapack_int LAPACKE_dstevx( int matrix_order, char jobz, char range,\n                           lapack_int n, double* d, double* e, double vl,\n                           double vu, lapack_int il, lapack_int iu,\n                           double abstol, lapack_int* m, double* w, double* z,\n                           lapack_int ldz, lapack_int* ifail );\n\nlapack_int LAPACKE_ssycon( int matrix_order, char uplo, lapack_int n,\n                           const float* a, lapack_int lda,\n                           const lapack_int* ipiv, float anorm, float* rcond );\nlapack_int LAPACKE_dsycon( int matrix_order, char uplo, lapack_int n,\n                           const double* a, lapack_int lda,\n                           const lapack_int* ipiv, double anorm,\n                           double* rcond );\nlapack_int LAPACKE_csycon( int matrix_order, char uplo, lapack_int n,\n                           const lapack_complex_float* a, lapack_int lda,\n                           const lapack_int* ipiv, float anorm, float* rcond );\nlapack_int LAPACKE_zsycon( int matrix_order, char uplo, lapack_int n,\n                           const lapack_complex_double* a, lapack_int lda,\n                           const lapack_int* ipiv, double anorm,\n                           double* rcond );\n\nlapack_int LAPACKE_ssyequb( int matrix_order, char uplo, lapack_int n,\n                            const float* a, lapack_int lda, float* s,\n                            float* scond, float* amax );\nlapack_int LAPACKE_dsyequb( int matrix_order, char uplo, lapack_int n,\n                            const double* a, lapack_int lda, double* s,\n                            double* scond, double* amax );\nlapack_int LAPACKE_csyequb( int matrix_order, char uplo, lapack_int n,\n                            const lapack_complex_float* a, lapack_int lda,\n                            float* s, float* scond, float* amax );\nlapack_int LAPACKE_zsyequb( int matrix_order, char uplo, lapack_int n,\n                            const lapack_complex_double* a, lapack_int lda,\n                            double* s, double* scond, double* amax );\n\nlapack_int LAPACKE_ssyev( int matrix_order, char jobz, char uplo, lapack_int n,\n                          float* a, lapack_int lda, float* w );\nlapack_int LAPACKE_dsyev( int matrix_order, char jobz, char uplo, lapack_int n,\n                          double* a, lapack_int lda, double* w );\n\nlapack_int LAPACKE_ssyevd( int matrix_order, char jobz, char uplo, lapack_int n,\n                           float* a, lapack_int lda, float* w );\nlapack_int LAPACKE_dsyevd( int matrix_order, char jobz, char uplo, lapack_int n,\n                           double* a, lapack_int lda, double* w );\n\nlapack_int LAPACKE_ssyevr( int matrix_order, char jobz, char range, char uplo,\n                           lapack_int n, float* a, lapack_int lda, float vl,\n                           float vu, lapack_int il, lapack_int iu, float abstol,\n                           lapack_int* m, float* w, float* z, lapack_int ldz,\n                           lapack_int* isuppz );\nlapack_int LAPACKE_dsyevr( int matrix_order, char jobz, char range, char uplo,\n                           lapack_int n, double* a, lapack_int lda, double vl,\n                           double vu, lapack_int il, lapack_int iu,\n                           double abstol, lapack_int* m, double* w, double* z,\n                           lapack_int ldz, lapack_int* isuppz );\n\nlapack_int LAPACKE_ssyevx( int matrix_order, char jobz, char range, char uplo,\n                           lapack_int n, float* a, lapack_int lda, float vl,\n                           float vu, lapack_int il, lapack_int iu, float abstol,\n                           lapack_int* m, float* w, float* z, lapack_int ldz,\n                           lapack_int* ifail );\nlapack_int LAPACKE_dsyevx( int matrix_order, char jobz, char range, char uplo,\n                           lapack_int n, double* a, lapack_int lda, double vl,\n                           double vu, lapack_int il, lapack_int iu,\n                           double abstol, lapack_int* m, double* w, double* z,\n                           lapack_int ldz, lapack_int* ifail );\n\nlapack_int LAPACKE_ssygst( int matrix_order, lapack_int itype, char uplo,\n                           lapack_int n, float* a, lapack_int lda,\n                           const float* b, lapack_int ldb );\nlapack_int LAPACKE_dsygst( int matrix_order, lapack_int itype, char uplo,\n                           lapack_int n, double* a, lapack_int lda,\n                           const double* b, lapack_int ldb );\n\nlapack_int LAPACKE_ssygv( int matrix_order, lapack_int itype, char jobz,\n                          char uplo, lapack_int n, float* a, lapack_int lda,\n                          float* b, lapack_int ldb, float* w );\nlapack_int LAPACKE_dsygv( int matrix_order, lapack_int itype, char jobz,\n                          char uplo, lapack_int n, double* a, lapack_int lda,\n                          double* b, lapack_int ldb, double* w );\n\nlapack_int LAPACKE_ssygvd( int matrix_order, lapack_int itype, char jobz,\n                           char uplo, lapack_int n, float* a, lapack_int lda,\n                           float* b, lapack_int ldb, float* w );\nlapack_int LAPACKE_dsygvd( int matrix_order, lapack_int itype, char jobz,\n                           char uplo, lapack_int n, double* a, lapack_int lda,\n                           double* b, lapack_int ldb, double* w );\n\nlapack_int LAPACKE_ssygvx( int matrix_order, lapack_int itype, char jobz,\n                           char range, char uplo, lapack_int n, float* a,\n                           lapack_int lda, float* b, lapack_int ldb, float vl,\n                           float vu, lapack_int il, lapack_int iu, float abstol,\n                           lapack_int* m, float* w, float* z, lapack_int ldz,\n                           lapack_int* ifail );\nlapack_int LAPACKE_dsygvx( int matrix_order, lapack_int itype, char jobz,\n                           char range, char uplo, lapack_int n, double* a,\n                           lapack_int lda, double* b, lapack_int ldb, double vl,\n                           double vu, lapack_int il, lapack_int iu,\n                           double abstol, lapack_int* m, double* w, double* z,\n                           lapack_int ldz, lapack_int* ifail );\n\nlapack_int LAPACKE_ssyrfs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const float* a, lapack_int lda,\n                           const float* af, lapack_int ldaf,\n                           const lapack_int* ipiv, const float* b,\n                           lapack_int ldb, float* x, lapack_int ldx,\n                           float* ferr, float* berr );\nlapack_int LAPACKE_dsyrfs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const double* a, lapack_int lda,\n                           const double* af, lapack_int ldaf,\n                           const lapack_int* ipiv, const double* b,\n                           lapack_int ldb, double* x, lapack_int ldx,\n                           double* ferr, double* berr );\nlapack_int LAPACKE_csyrfs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_float* a,\n                           lapack_int lda, const lapack_complex_float* af,\n                           lapack_int ldaf, const lapack_int* ipiv,\n                           const lapack_complex_float* b, lapack_int ldb,\n                           lapack_complex_float* x, lapack_int ldx, float* ferr,\n                           float* berr );\nlapack_int LAPACKE_zsyrfs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_double* a,\n                           lapack_int lda, const lapack_complex_double* af,\n                           lapack_int ldaf, const lapack_int* ipiv,\n                           const lapack_complex_double* b, lapack_int ldb,\n                           lapack_complex_double* x, lapack_int ldx,\n                           double* ferr, double* berr );\n\nlapack_int LAPACKE_ssyrfsx( int matrix_order, char uplo, char equed,\n                            lapack_int n, lapack_int nrhs, const float* a,\n                            lapack_int lda, const float* af, lapack_int ldaf,\n                            const lapack_int* ipiv, const float* s,\n                            const float* b, lapack_int ldb, float* x,\n                            lapack_int ldx, float* rcond, float* berr,\n                            lapack_int n_err_bnds, float* err_bnds_norm,\n                            float* err_bnds_comp, lapack_int nparams,\n                            float* params );\nlapack_int LAPACKE_dsyrfsx( int matrix_order, char uplo, char equed,\n                            lapack_int n, lapack_int nrhs, const double* a,\n                            lapack_int lda, const double* af, lapack_int ldaf,\n                            const lapack_int* ipiv, const double* s,\n                            const double* b, lapack_int ldb, double* x,\n                            lapack_int ldx, double* rcond, double* berr,\n                            lapack_int n_err_bnds, double* err_bnds_norm,\n                            double* err_bnds_comp, lapack_int nparams,\n                            double* params );\nlapack_int LAPACKE_csyrfsx( int matrix_order, char uplo, char equed,\n                            lapack_int n, lapack_int nrhs,\n                            const lapack_complex_float* a, lapack_int lda,\n                            const lapack_complex_float* af, lapack_int ldaf,\n                            const lapack_int* ipiv, const float* s,\n                            const lapack_complex_float* b, lapack_int ldb,\n                            lapack_complex_float* x, lapack_int ldx,\n                            float* rcond, float* berr, lapack_int n_err_bnds,\n                            float* err_bnds_norm, float* err_bnds_comp,\n                            lapack_int nparams, float* params );\nlapack_int LAPACKE_zsyrfsx( int matrix_order, char uplo, char equed,\n                            lapack_int n, lapack_int nrhs,\n                            const lapack_complex_double* a, lapack_int lda,\n                            const lapack_complex_double* af, lapack_int ldaf,\n                            const lapack_int* ipiv, const double* s,\n                            const lapack_complex_double* b, lapack_int ldb,\n                            lapack_complex_double* x, lapack_int ldx,\n                            double* rcond, double* berr, lapack_int n_err_bnds,\n                            double* err_bnds_norm, double* err_bnds_comp,\n                            lapack_int nparams, double* params );\n\nlapack_int LAPACKE_ssysv( int matrix_order, char uplo, lapack_int n,\n                          lapack_int nrhs, float* a, lapack_int lda,\n                          lapack_int* ipiv, float* b, lapack_int ldb );\nlapack_int LAPACKE_dsysv( int matrix_order, char uplo, lapack_int n,\n                          lapack_int nrhs, double* a, lapack_int lda,\n                          lapack_int* ipiv, double* b, lapack_int ldb );\nlapack_int LAPACKE_csysv( int matrix_order, char uplo, lapack_int n,\n                          lapack_int nrhs, lapack_complex_float* a,\n                          lapack_int lda, lapack_int* ipiv,\n                          lapack_complex_float* b, lapack_int ldb );\nlapack_int LAPACKE_zsysv( int matrix_order, char uplo, lapack_int n,\n                          lapack_int nrhs, lapack_complex_double* a,\n                          lapack_int lda, lapack_int* ipiv,\n                          lapack_complex_double* b, lapack_int ldb );\n\nlapack_int LAPACKE_ssysvx( int matrix_order, char fact, char uplo, lapack_int n,\n                           lapack_int nrhs, const float* a, lapack_int lda,\n                           float* af, lapack_int ldaf, lapack_int* ipiv,\n                           const float* b, lapack_int ldb, float* x,\n                           lapack_int ldx, float* rcond, float* ferr,\n                           float* berr );\nlapack_int LAPACKE_dsysvx( int matrix_order, char fact, char uplo, lapack_int n,\n                           lapack_int nrhs, const double* a, lapack_int lda,\n                           double* af, lapack_int ldaf, lapack_int* ipiv,\n                           const double* b, lapack_int ldb, double* x,\n                           lapack_int ldx, double* rcond, double* ferr,\n                           double* berr );\nlapack_int LAPACKE_csysvx( int matrix_order, char fact, char uplo, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_float* a,\n                           lapack_int lda, lapack_complex_float* af,\n                           lapack_int ldaf, lapack_int* ipiv,\n                           const lapack_complex_float* b, lapack_int ldb,\n                           lapack_complex_float* x, lapack_int ldx,\n                           float* rcond, float* ferr, float* berr );\nlapack_int LAPACKE_zsysvx( int matrix_order, char fact, char uplo, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_double* a,\n                           lapack_int lda, lapack_complex_double* af,\n                           lapack_int ldaf, lapack_int* ipiv,\n                           const lapack_complex_double* b, lapack_int ldb,\n                           lapack_complex_double* x, lapack_int ldx,\n                           double* rcond, double* ferr, double* berr );\n\nlapack_int LAPACKE_ssysvxx( int matrix_order, char fact, char uplo,\n                            lapack_int n, lapack_int nrhs, float* a,\n                            lapack_int lda, float* af, lapack_int ldaf,\n                            lapack_int* ipiv, char* equed, float* s, float* b,\n                            lapack_int ldb, float* x, lapack_int ldx,\n                            float* rcond, float* rpvgrw, float* berr,\n                            lapack_int n_err_bnds, float* err_bnds_norm,\n                            float* err_bnds_comp, lapack_int nparams,\n                            float* params );\nlapack_int LAPACKE_dsysvxx( int matrix_order, char fact, char uplo,\n                            lapack_int n, lapack_int nrhs, double* a,\n                            lapack_int lda, double* af, lapack_int ldaf,\n                            lapack_int* ipiv, char* equed, double* s, double* b,\n                            lapack_int ldb, double* x, lapack_int ldx,\n                            double* rcond, double* rpvgrw, double* berr,\n                            lapack_int n_err_bnds, double* err_bnds_norm,\n                            double* err_bnds_comp, lapack_int nparams,\n                            double* params );\nlapack_int LAPACKE_csysvxx( int matrix_order, char fact, char uplo,\n                            lapack_int n, lapack_int nrhs,\n                            lapack_complex_float* a, lapack_int lda,\n                            lapack_complex_float* af, lapack_int ldaf,\n                            lapack_int* ipiv, char* equed, float* s,\n                            lapack_complex_float* b, lapack_int ldb,\n                            lapack_complex_float* x, lapack_int ldx,\n                            float* rcond, float* rpvgrw, float* berr,\n                            lapack_int n_err_bnds, float* err_bnds_norm,\n                            float* err_bnds_comp, lapack_int nparams,\n                            float* params );\nlapack_int LAPACKE_zsysvxx( int matrix_order, char fact, char uplo,\n                            lapack_int n, lapack_int nrhs,\n                            lapack_complex_double* a, lapack_int lda,\n                            lapack_complex_double* af, lapack_int ldaf,\n                            lapack_int* ipiv, char* equed, double* s,\n                            lapack_complex_double* b, lapack_int ldb,\n                            lapack_complex_double* x, lapack_int ldx,\n                            double* rcond, double* rpvgrw, double* berr,\n                            lapack_int n_err_bnds, double* err_bnds_norm,\n                            double* err_bnds_comp, lapack_int nparams,\n                            double* params );\n\nlapack_int LAPACKE_ssytrd( int matrix_order, char uplo, lapack_int n, float* a,\n                           lapack_int lda, float* d, float* e, float* tau );\nlapack_int LAPACKE_dsytrd( int matrix_order, char uplo, lapack_int n, double* a,\n                           lapack_int lda, double* d, double* e, double* tau );\n\nlapack_int LAPACKE_ssytrf( int matrix_order, char uplo, lapack_int n, float* a,\n                           lapack_int lda, lapack_int* ipiv );\nlapack_int LAPACKE_dsytrf( int matrix_order, char uplo, lapack_int n, double* a,\n                           lapack_int lda, lapack_int* ipiv );\nlapack_int LAPACKE_csytrf( int matrix_order, char uplo, lapack_int n,\n                           lapack_complex_float* a, lapack_int lda,\n                           lapack_int* ipiv );\nlapack_int LAPACKE_zsytrf( int matrix_order, char uplo, lapack_int n,\n                           lapack_complex_double* a, lapack_int lda,\n                           lapack_int* ipiv );\n\nlapack_int LAPACKE_ssytri( int matrix_order, char uplo, lapack_int n, float* a,\n                           lapack_int lda, const lapack_int* ipiv );\nlapack_int LAPACKE_dsytri( int matrix_order, char uplo, lapack_int n, double* a,\n                           lapack_int lda, const lapack_int* ipiv );\nlapack_int LAPACKE_csytri( int matrix_order, char uplo, lapack_int n,\n                           lapack_complex_float* a, lapack_int lda,\n                           const lapack_int* ipiv );\nlapack_int LAPACKE_zsytri( int matrix_order, char uplo, lapack_int n,\n                           lapack_complex_double* a, lapack_int lda,\n                           const lapack_int* ipiv );\n\nlapack_int LAPACKE_ssytrs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const float* a, lapack_int lda,\n                           const lapack_int* ipiv, float* b, lapack_int ldb );\nlapack_int LAPACKE_dsytrs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const double* a, lapack_int lda,\n                           const lapack_int* ipiv, double* b, lapack_int ldb );\nlapack_int LAPACKE_csytrs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_float* a,\n                           lapack_int lda, const lapack_int* ipiv,\n                           lapack_complex_float* b, lapack_int ldb );\nlapack_int LAPACKE_zsytrs( int matrix_order, char uplo, lapack_int n,\n                           lapack_int nrhs, const lapack_complex_double* a,\n                           lapack_int lda, const lapack_int* ipiv,\n                           lapack_complex_double* b, lapack_int ldb );\n\nlapack_int LAPACKE_stbcon( int matrix_order, char norm, char uplo, char diag,\n                           lapack_int n, lapack_int kd, const float* ab,\n                           lapack_int ldab, float* rcond );\nlapack_int LAPACKE_dtbcon( int matrix_order, char norm, char uplo, char diag,\n                           lapack_int n, lapack_int kd, const double* ab,\n                           lapack_int ldab, double* rcond );\nlapack_int LAPACKE_ctbcon( int matrix_order, char norm, char uplo, char diag,\n                           lapack_int n, lapack_int kd,\n                           const lapack_complex_float* ab, lapack_int ldab,\n                           float* rcond );\nlapack_int LAPACKE_ztbcon( int matrix_order, char norm, char uplo, char diag,\n                           lapack_int n, lapack_int kd,\n                           const lapack_complex_double* ab, lapack_int ldab,\n                           double* rcond );\n\nlapack_int LAPACKE_stbrfs( int matrix_order, char uplo, char trans, char diag,\n                           lapack_int n, lapack_int kd, lapack_int nrhs,\n                           const float* ab, lapack_int ldab, const float* b,\n                           lapack_int ldb, const float* x, lapack_int ldx,\n                           float* ferr, float* berr );\nlapack_int LAPACKE_dtbrfs( int matrix_order, char uplo, char trans, char diag,\n                           lapack_int n, lapack_int kd, lapack_int nrhs,\n                           const double* ab, lapack_int ldab, const double* b,\n                           lapack_int ldb, const double* x, lapack_int ldx,\n                           double* ferr, double* berr );\nlapack_int LAPACKE_ctbrfs( int matrix_order, char uplo, char trans, char diag,\n                           lapack_int n, lapack_int kd, lapack_int nrhs,\n                           const lapack_complex_float* ab, lapack_int ldab,\n                           const lapack_complex_float* b, lapack_int ldb,\n                           const lapack_complex_float* x, lapack_int ldx,\n                           float* ferr, float* berr );\nlapack_int LAPACKE_ztbrfs( int matrix_order, char uplo, char trans, char diag,\n                           lapack_int n, lapack_int kd, lapack_int nrhs,\n                           const lapack_complex_double* ab, lapack_int ldab,\n                           const lapack_complex_double* b, lapack_int ldb,\n                           const lapack_complex_double* x, lapack_int ldx,\n                           double* ferr, double* berr );\n\nlapack_int LAPACKE_stbtrs( int matrix_order, char uplo, char trans, char diag,\n                           lapack_int n, lapack_int kd, lapack_int nrhs,\n                           const float* ab, lapack_int ldab, float* b,\n                           lapack_int ldb );\nlapack_int LAPACKE_dtbtrs( int matrix_order, char uplo, char trans, char diag,\n                           lapack_int n, lapack_int kd, lapack_int nrhs,\n                           const double* ab, lapack_int ldab, double* b,\n                           lapack_int ldb );\nlapack_int LAPACKE_ctbtrs( int matrix_order, char uplo, char trans, char diag,\n                           lapack_int n, lapack_int kd, lapack_int nrhs,\n                           const lapack_complex_float* ab, lapack_int ldab,\n                           lapack_complex_float* b, lapack_int ldb );\nlapack_int LAPACKE_ztbtrs( int matrix_order, char uplo, char trans, char diag,\n                           lapack_int n, lapack_int kd, lapack_int nrhs,\n                           const lapack_complex_double* ab, lapack_int ldab,\n                           lapack_complex_double* b, lapack_int ldb );\n\nlapack_int LAPACKE_stfsm( int matrix_order, char transr, char side, char uplo,\n                          char trans, char diag, lapack_int m, lapack_int n,\n                          float alpha, const float* a, float* b,\n                          lapack_int ldb );\nlapack_int LAPACKE_dtfsm( int matrix_order, char transr, char side, char uplo,\n                          char trans, char diag, lapack_int m, lapack_int n,\n                          double alpha, const double* a, double* b,\n                          lapack_int ldb );\nlapack_int LAPACKE_ctfsm( int matrix_order, char transr, char side, char uplo,\n                          char trans, char diag, lapack_int m, lapack_int n,\n                          lapack_complex_float alpha,\n                          const lapack_complex_float* a,\n                          lapack_complex_float* b, lapack_int ldb );\nlapack_int LAPACKE_ztfsm( int matrix_order, char transr, char side, char uplo,\n                          char trans, char diag, lapack_int m, lapack_int n,\n                          lapack_complex_double alpha,\n                          const lapack_complex_double* a,\n                          lapack_complex_double* b, lapack_int ldb );\n\nlapack_int LAPACKE_stftri( int matrix_order, char transr, char uplo, char diag,\n                           lapack_int n, float* a );\nlapack_int LAPACKE_dtftri( int matrix_order, char transr, char uplo, char diag,\n                           lapack_int n, double* a );\nlapack_int LAPACKE_ctftri( int matrix_order, char transr, char uplo, char diag,\n                           lapack_int n, lapack_complex_float* a );\nlapack_int LAPACKE_ztftri( int matrix_order, char transr, char uplo, char diag,\n                           lapack_int n, lapack_complex_double* a );\n\nlapack_int LAPACKE_stfttp( int matrix_order, char transr, char uplo,\n                           lapack_int n, const float* arf, float* ap );\nlapack_int LAPACKE_dtfttp( int matrix_order, char transr, char uplo,\n                           lapack_int n, const double* arf, double* ap );\nlapack_int LAPACKE_ctfttp( int matrix_order, char transr, char uplo,\n                           lapack_int n, const lapack_complex_float* arf,\n                           lapack_complex_float* ap );\nlapack_int LAPACKE_ztfttp( int matrix_order, char transr, char uplo,\n                           lapack_int n, const lapack_complex_double* arf,\n                           lapack_complex_double* ap );\n\nlapack_int LAPACKE_stfttr( int matrix_order, char transr, char uplo,\n                           lapack_int n, const float* arf, float* a,\n                           lapack_int lda );\nlapack_int LAPACKE_dtfttr( int matrix_order, char transr, char uplo,\n                           lapack_int n, const double* arf, double* a,\n                           lapack_int lda );\nlapack_int LAPACKE_ctfttr( int matrix_order, char transr, char uplo,\n                           lapack_int n, const lapack_complex_float* arf,\n                           lapack_complex_float* a, lapack_int lda );\nlapack_int LAPACKE_ztfttr( int matrix_order, char transr, char uplo,\n                           lapack_int n, const lapack_complex_double* arf,\n                           lapack_complex_double* a, lapack_int lda );\n\nlapack_int LAPACKE_stgevc( int matrix_order, char side, char howmny,\n                           const lapack_logical* select, lapack_int n,\n                           const float* s, lapack_int lds, const float* p,\n                           lapack_int ldp, float* vl, lapack_int ldvl,\n                           float* vr, lapack_int ldvr, lapack_int mm,\n                           lapack_int* m );\nlapack_int LAPACKE_dtgevc( int matrix_order, char side, char howmny,\n                           const lapack_logical* select, lapack_int n,\n                           const double* s, lapack_int lds, const double* p,\n                           lapack_int ldp, double* vl, lapack_int ldvl,\n                           double* vr, lapack_int ldvr, lapack_int mm,\n                           lapack_int* m );\nlapack_int LAPACKE_ctgevc( int matrix_order, char side, char howmny,\n                           const lapack_logical* select, lapack_int n,\n                           const lapack_complex_float* s, lapack_int lds,\n                           const lapack_complex_float* p, lapack_int ldp,\n                           lapack_complex_float* vl, lapack_int ldvl,\n                           lapack_complex_float* vr, lapack_int ldvr,\n                           lapack_int mm, lapack_int* m );\nlapack_int LAPACKE_ztgevc( int matrix_order, char side, char howmny,\n                           const lapack_logical* select, lapack_int n,\n                           const lapack_complex_double* s, lapack_int lds,\n                           const lapack_complex_double* p, lapack_int ldp,\n                           lapack_complex_double* vl, lapack_int ldvl,\n                           lapack_complex_double* vr, lapack_int ldvr,\n                           lapack_int mm, lapack_int* m );\n\nlapack_int LAPACKE_stgexc( int matrix_order, lapack_logical wantq,\n                           lapack_logical wantz, lapack_int n, float* a,\n                           lapack_int lda, float* b, lapack_int ldb, float* q,\n                           lapack_int ldq, float* z, lapack_int ldz,\n                           lapack_int* ifst, lapack_int* ilst );\nlapack_int LAPACKE_dtgexc( int matrix_order, lapack_logical wantq,\n                           lapack_logical wantz, lapack_int n, double* a,\n                           lapack_int lda, double* b, lapack_int ldb, double* q,\n                           lapack_int ldq, double* z, lapack_int ldz,\n                           lapack_int* ifst, lapack_int* ilst );\nlapack_int LAPACKE_ctgexc( int matrix_order, lapack_logical wantq,\n                           lapack_logical wantz, lapack_int n,\n                           lapack_complex_float* a, lapack_int lda,\n                           lapack_complex_float* b, lapack_int ldb,\n                           lapack_complex_float* q, lapack_int ldq,\n                           lapack_complex_float* z, lapack_int ldz,\n                           lapack_int ifst, lapack_int ilst );\nlapack_int LAPACKE_ztgexc( int matrix_order, lapack_logical wantq,\n                           lapack_logical wantz, lapack_int n,\n                           lapack_complex_double* a, lapack_int lda,\n                           lapack_complex_double* b, lapack_int ldb,\n                           lapack_complex_double* q, lapack_int ldq,\n                           lapack_complex_double* z, lapack_int ldz,\n                           lapack_int ifst, lapack_int ilst );\n\nlapack_int LAPACKE_stgsen( int matrix_order, lapack_int ijob,\n                           lapack_logical wantq, lapack_logical wantz,\n                           const lapack_logical* select, lapack_int n, float* a,\n                           lapack_int lda, float* b, lapack_int ldb,\n                           float* alphar, float* alphai, float* beta, float* q,\n                           lapack_int ldq, float* z, lapack_int ldz,\n                           lapack_int* m, float* pl, float* pr, float* dif );\nlapack_int LAPACKE_dtgsen( int matrix_order, lapack_int ijob,\n                           lapack_logical wantq, lapack_logical wantz,\n                           const lapack_logical* select, lapack_int n,\n                           double* a, lapack_int lda, double* b, lapack_int ldb,\n                           double* alphar, double* alphai, double* beta,\n                           double* q, lapack_int ldq, double* z, lapack_int ldz,\n                           lapack_int* m, double* pl, double* pr, double* dif );\nlapack_int LAPACKE_ctgsen( int matrix_order, lapack_int ijob,\n                           lapack_logical wantq, lapack_logical wantz,\n                           const lapack_logical* select, lapack_int n,\n                           lapack_complex_float* a, lapack_int lda,\n                           lapack_complex_float* b, lapack_int ldb,\n                           lapack_complex_float* alpha,\n                           lapack_complex_float* beta, lapack_complex_float* q,\n                           lapack_int ldq, lapack_complex_float* z,\n                           lapack_int ldz, lapack_int* m, float* pl, float* pr,\n                           float* dif );\nlapack_int LAPACKE_ztgsen( int matrix_order, lapack_int ijob,\n                           lapack_logical wantq, lapack_logical wantz,\n                           const lapack_logical* select, lapack_int n,\n                           lapack_complex_double* a, lapack_int lda,\n                           lapack_complex_double* b, lapack_int ldb,\n                           lapack_complex_double* alpha,\n                           lapack_complex_double* beta,\n                           lapack_complex_double* q, lapack_int ldq,\n                           lapack_complex_double* z, lapack_int ldz,\n                           lapack_int* m, double* pl, double* pr, double* dif );\n\nlapack_int LAPACKE_stgsja( int matrix_order, char jobu, char jobv, char jobq,\n                           lapack_int m, lapack_int p, lapack_int n,\n                           lapack_int k, lapack_int l, float* a, lapack_int lda,\n                           float* b, lapack_int ldb, float tola, float tolb,\n                           float* alpha, float* beta, float* u, lapack_int ldu,\n                           float* v, lapack_int ldv, float* q, lapack_int ldq,\n                           lapack_int* ncycle );\nlapack_int LAPACKE_dtgsja( int matrix_order, char jobu, char jobv, char jobq,\n                           lapack_int m, lapack_int p, lapack_int n,\n                           lapack_int k, lapack_int l, double* a,\n                           lapack_int lda, double* b, lapack_int ldb,\n                           double tola, double tolb, double* alpha,\n                           double* beta, double* u, lapack_int ldu, double* v,\n                           lapack_int ldv, double* q, lapack_int ldq,\n                           lapack_int* ncycle );\nlapack_int LAPACKE_ctgsja( int matrix_order, char jobu, char jobv, char jobq,\n                           lapack_int m, lapack_int p, lapack_int n,\n                           lapack_int k, lapack_int l, lapack_complex_float* a,\n                           lapack_int lda, lapack_complex_float* b,\n                           lapack_int ldb, float tola, float tolb, float* alpha,\n                           float* beta, lapack_complex_float* u, lapack_int ldu,\n                           lapack_complex_float* v, lapack_int ldv,\n                           lapack_complex_float* q, lapack_int ldq,\n                           lapack_int* ncycle );\nlapack_int LAPACKE_ztgsja( int matrix_order, char jobu, char jobv, char jobq,\n                           lapack_int m, lapack_int p, lapack_int n,\n                           lapack_int k, lapack_int l, lapack_complex_double* a,\n                           lapack_int lda, lapack_complex_double* b,\n                           lapack_int ldb, double tola, double tolb,\n                           double* alpha, double* beta,\n                           lapack_complex_double* u, lapack_int ldu,\n                           lapack_complex_double* v, lapack_int ldv,\n                           lapack_complex_double* q, lapack_int ldq,\n                           lapack_int* ncycle );\n\nlapack_int LAPACKE_stgsna( int matrix_order, char job, char howmny,\n                           const lapack_logical* select, lapack_int n,\n                           const float* a, lapack_int lda, const float* b,\n                           lapack_int ldb, const float* vl, lapack_int ldvl,\n                           const float* vr, lapack_int ldvr, float* s,\n                           float* dif, lapack_int mm, lapack_int* m );\nlapack_int LAPACKE_dtgsna( int matrix_order, char job, char howmny,\n                           const lapack_logical* select, lapack_int n,\n                           const double* a, lapack_int lda, const double* b,\n                           lapack_int ldb, const double* vl, lapack_int ldvl,\n                           const double* vr, lapack_int ldvr, double* s,\n                           double* dif, lapack_int mm, lapack_int* m );\nlapack_int LAPACKE_ctgsna( int matrix_order, char job, char howmny,\n                           const lapack_logical* select, lapack_int n,\n                           const lapack_complex_float* a, lapack_int lda,\n                           const lapack_complex_float* b, lapack_int ldb,\n                           const lapack_complex_float* vl, lapack_int ldvl,\n                           const lapack_complex_float* vr, lapack_int ldvr,\n                           float* s, float* dif, lapack_int mm, lapack_int* m );\nlapack_int LAPACKE_ztgsna( int matrix_order, char job, char howmny,\n                           const lapack_logical* select, lapack_int n,\n                           const lapack_complex_double* a, lapack_int lda,\n                           const lapack_complex_double* b, lapack_int ldb,\n                           const lapack_complex_double* vl, lapack_int ldvl,\n                           const lapack_complex_double* vr, lapack_int ldvr,\n                           double* s, double* dif, lapack_int mm,\n                           lapack_int* m );\n\nlapack_int LAPACKE_stgsyl( int matrix_order, char trans, lapack_int ijob,\n                           lapack_int m, lapack_int n, const float* a,\n                           lapack_int lda, const float* b, lapack_int ldb,\n                           float* c, lapack_int ldc, const float* d,\n                           lapack_int ldd, const float* e, lapack_int lde,\n                           float* f, lapack_int ldf, float* scale, float* dif );\nlapack_int LAPACKE_dtgsyl( int matrix_order, char trans, lapack_int ijob,\n                           lapack_int m, lapack_int n, const double* a,\n                           lapack_int lda, const double* b, lapack_int ldb,\n                           double* c, lapack_int ldc, const double* d,\n                           lapack_int ldd, const double* e, lapack_int lde,\n                           double* f, lapack_int ldf, double* scale,\n                           double* dif );\nlapack_int LAPACKE_ctgsyl( int matrix_order, char trans, lapack_int ijob,\n                           lapack_int m, lapack_int n,\n                           const lapack_complex_float* a, lapack_int lda,\n                           const lapack_complex_float* b, lapack_int ldb,\n                           lapack_complex_float* c, lapack_int ldc,\n                           const lapack_complex_float* d, lapack_int ldd,\n                           const lapack_complex_float* e, lapack_int lde,\n                           lapack_complex_float* f, lapack_int ldf,\n                           float* scale, float* dif );\nlapack_int LAPACKE_ztgsyl( int matrix_order, char trans, lapack_int ijob,\n                           lapack_int m, lapack_int n,\n                           const lapack_complex_double* a, lapack_int lda,\n                           const lapack_complex_double* b, lapack_int ldb,\n                           lapack_complex_double* c, lapack_int ldc,\n                           const lapack_complex_double* d, lapack_int ldd,\n                           const lapack_complex_double* e, lapack_int lde,\n                           lapack_complex_double* f, lapack_int ldf,\n                           double* scale, double* dif );\n\nlapack_int LAPACKE_stpcon( int matrix_order, char norm, char uplo, char diag,\n                           lapack_int n, const float* ap, float* rcond );\nlapack_int LAPACKE_dtpcon( int matrix_order, char norm, char uplo, char diag,\n                           lapack_int n, const double* ap, double* rcond );\nlapack_int LAPACKE_ctpcon( int matrix_order, char norm, char uplo, char diag,\n                           lapack_int n, const lapack_complex_float* ap,\n                           float* rcond );\nlapack_int LAPACKE_ztpcon( int matrix_order, char norm, char uplo, char diag,\n                           lapack_int n, const lapack_complex_double* ap,\n                           double* rcond );\n\nlapack_int LAPACKE_stprfs( int matrix_order, char uplo, char trans, char diag,\n                           lapack_int n, lapack_int nrhs, const float* ap,\n                           const float* b, lapack_int ldb, const float* x,\n                           lapack_int ldx, float* ferr, float* berr );\nlapack_int LAPACKE_dtprfs( int matrix_order, char uplo, char trans, char diag,\n                           lapack_int n, lapack_int nrhs, const double* ap,\n                           const double* b, lapack_int ldb, const double* x,\n                           lapack_int ldx, double* ferr, double* berr );\nlapack_int LAPACKE_ctprfs( int matrix_order, char uplo, char trans, char diag,\n                           lapack_int n, lapack_int nrhs,\n                           const lapack_complex_float* ap,\n                           const lapack_complex_float* b, lapack_int ldb,\n                           const lapack_complex_float* x, lapack_int ldx,\n                           float* ferr, float* berr );\nlapack_int LAPACKE_ztprfs( int matrix_order, char uplo, char trans, char diag,\n                           lapack_int n, lapack_int nrhs,\n                           const lapack_complex_double* ap,\n                           const lapack_complex_double* b, lapack_int ldb,\n                           const lapack_complex_double* x, lapack_int ldx,\n                           double* ferr, double* berr );\n\nlapack_int LAPACKE_stptri( int matrix_order, char uplo, char diag, lapack_int n,\n                           float* ap );\nlapack_int LAPACKE_dtptri( int matrix_order, char uplo, char diag, lapack_int n,\n                           double* ap );\nlapack_int LAPACKE_ctptri( int matrix_order, char uplo, char diag, lapack_int n,\n                           lapack_complex_float* ap );\nlapack_int LAPACKE_ztptri( int matrix_order, char uplo, char diag, lapack_int n,\n                           lapack_complex_double* ap );\n\nlapack_int LAPACKE_stptrs( int matrix_order, char uplo, char trans, char diag,\n                           lapack_int n, lapack_int nrhs, const float* ap,\n                           float* b, lapack_int ldb );\nlapack_int LAPACKE_dtptrs( int matrix_order, char uplo, char trans, char diag,\n                           lapack_int n, lapack_int nrhs, const double* ap,\n                           double* b, lapack_int ldb );\nlapack_int LAPACKE_ctptrs( int matrix_order, char uplo, char trans, char diag,\n                           lapack_int n, lapack_int nrhs,\n                           const lapack_complex_float* ap,\n                           lapack_complex_float* b, lapack_int ldb );\nlapack_int LAPACKE_ztptrs( int matrix_order, char uplo, char trans, char diag,\n                           lapack_int n, lapack_int nrhs,\n                           const lapack_complex_double* ap,\n                           lapack_complex_double* b, lapack_int ldb );\n\nlapack_int LAPACKE_stpttf( int matrix_order, char transr, char uplo,\n                           lapack_int n, const float* ap, float* arf );\nlapack_int LAPACKE_dtpttf( int matrix_order, char transr, char uplo,\n                           lapack_int n, const double* ap, double* arf );\nlapack_int LAPACKE_ctpttf( int matrix_order, char transr, char uplo,\n                           lapack_int n, const lapack_complex_float* ap,\n                           lapack_complex_float* arf );\nlapack_int LAPACKE_ztpttf( int matrix_order, char transr, char uplo,\n                           lapack_int n, const lapack_complex_double* ap,\n                           lapack_complex_double* arf );\n\nlapack_int LAPACKE_stpttr( int matrix_order, char uplo, lapack_int n,\n                           const float* ap, float* a, lapack_int lda );\nlapack_int LAPACKE_dtpttr( int matrix_order, char uplo, lapack_int n,\n                           const double* ap, double* a, lapack_int lda );\nlapack_int LAPACKE_ctpttr( int matrix_order, char uplo, lapack_int n,\n                           const lapack_complex_float* ap,\n                           lapack_complex_float* a, lapack_int lda );\nlapack_int LAPACKE_ztpttr( int matrix_order, char uplo, lapack_int n,\n                           const lapack_complex_double* ap,\n                           lapack_complex_double* a, lapack_int lda );\n\nlapack_int LAPACKE_strcon( int matrix_order, char norm, char uplo, char diag,\n                           lapack_int n, const float* a, lapack_int lda,\n                           float* rcond );\nlapack_int LAPACKE_dtrcon( int matrix_order, char norm, char uplo, char diag,\n                           lapack_int n, const double* a, lapack_int lda,\n                           double* rcond );\nlapack_int LAPACKE_ctrcon( int matrix_order, char norm, char uplo, char diag,\n                           lapack_int n, const lapack_complex_float* a,\n                           lapack_int lda, float* rcond );\nlapack_int LAPACKE_ztrcon( int matrix_order, char norm, char uplo, char diag,\n                           lapack_int n, const lapack_complex_double* a,\n                           lapack_int lda, double* rcond );\n\nlapack_int LAPACKE_strevc( int matrix_order, char side, char howmny,\n                           lapack_logical* select, lapack_int n, const float* t,\n                           lapack_int ldt, float* vl, lapack_int ldvl,\n                           float* vr, lapack_int ldvr, lapack_int mm,\n                           lapack_int* m );\nlapack_int LAPACKE_dtrevc( int matrix_order, char side, char howmny,\n                           lapack_logical* select, lapack_int n,\n                           const double* t, lapack_int ldt, double* vl,\n                           lapack_int ldvl, double* vr, lapack_int ldvr,\n                           lapack_int mm, lapack_int* m );\nlapack_int LAPACKE_ctrevc( int matrix_order, char side, char howmny,\n                           const lapack_logical* select, lapack_int n,\n                           lapack_complex_float* t, lapack_int ldt,\n                           lapack_complex_float* vl, lapack_int ldvl,\n                           lapack_complex_float* vr, lapack_int ldvr,\n                           lapack_int mm, lapack_int* m );\nlapack_int LAPACKE_ztrevc( int matrix_order, char side, char howmny,\n                           const lapack_logical* select, lapack_int n,\n                           lapack_complex_double* t, lapack_int ldt,\n                           lapack_complex_double* vl, lapack_int ldvl,\n                           lapack_complex_double* vr, lapack_int ldvr,\n                           lapack_int mm, lapack_int* m );\n\nlapack_int LAPACKE_strexc( int matrix_order, char compq, lapack_int n, float* t,\n                           lapack_int ldt, float* q, lapack_int ldq,\n                           lapack_int* ifst, lapack_int* ilst );\nlapack_int LAPACKE_dtrexc( int matrix_order, char compq, lapack_int n,\n                           double* t, lapack_int ldt, double* q, lapack_int ldq,\n                           lapack_int* ifst, lapack_int* ilst );\nlapack_int LAPACKE_ctrexc( int matrix_order, char compq, lapack_int n,\n                           lapack_complex_float* t, lapack_int ldt,\n                           lapack_complex_float* q, lapack_int ldq,\n                           lapack_int ifst, lapack_int ilst );\nlapack_int LAPACKE_ztrexc( int matrix_order, char compq, lapack_int n,\n                           lapack_complex_double* t, lapack_int ldt,\n                           lapack_complex_double* q, lapack_int ldq,\n                           lapack_int ifst, lapack_int ilst );\n\nlapack_int LAPACKE_strrfs( int matrix_order, char uplo, char trans, char diag,\n                           lapack_int n, lapack_int nrhs, const float* a,\n                           lapack_int lda, const float* b, lapack_int ldb,\n                           const float* x, lapack_int ldx, float* ferr,\n                           float* berr );\nlapack_int LAPACKE_dtrrfs( int matrix_order, char uplo, char trans, char diag,\n                           lapack_int n, lapack_int nrhs, const double* a,\n                           lapack_int lda, const double* b, lapack_int ldb,\n                           const double* x, lapack_int ldx, double* ferr,\n                           double* berr );\nlapack_int LAPACKE_ctrrfs( int matrix_order, char uplo, char trans, char diag,\n                           lapack_int n, lapack_int nrhs,\n                           const lapack_complex_float* a, lapack_int lda,\n                           const lapack_complex_float* b, lapack_int ldb,\n                           const lapack_complex_float* x, lapack_int ldx,\n                           float* ferr, float* berr );\nlapack_int LAPACKE_ztrrfs( int matrix_order, char uplo, char trans, char diag,\n                           lapack_int n, lapack_int nrhs,\n                           const lapack_complex_double* a, lapack_int lda,\n                           const lapack_complex_double* b, lapack_int ldb,\n                           const lapack_complex_double* x, lapack_int ldx,\n                           double* ferr, double* berr );\n\nlapack_int LAPACKE_strsen( int matrix_order, char job, char compq,\n                           const lapack_logical* select, lapack_int n, float* t,\n                           lapack_int ldt, float* q, lapack_int ldq, float* wr,\n                           float* wi, lapack_int* m, float* s, float* sep );\nlapack_int LAPACKE_dtrsen( int matrix_order, char job, char compq,\n                           const lapack_logical* select, lapack_int n,\n                           double* t, lapack_int ldt, double* q, lapack_int ldq,\n                           double* wr, double* wi, lapack_int* m, double* s,\n                           double* sep );\nlapack_int LAPACKE_ctrsen( int matrix_order, char job, char compq,\n                           const lapack_logical* select, lapack_int n,\n                           lapack_complex_float* t, lapack_int ldt,\n                           lapack_complex_float* q, lapack_int ldq,\n                           lapack_complex_float* w, lapack_int* m, float* s,\n                           float* sep );\nlapack_int LAPACKE_ztrsen( int matrix_order, char job, char compq,\n                           const lapack_logical* select, lapack_int n,\n                           lapack_complex_double* t, lapack_int ldt,\n                           lapack_complex_double* q, lapack_int ldq,\n                           lapack_complex_double* w, lapack_int* m, double* s,\n                           double* sep );\n\nlapack_int LAPACKE_strsna( int matrix_order, char job, char howmny,\n                           const lapack_logical* select, lapack_int n,\n                           const float* t, lapack_int ldt, const float* vl,\n                           lapack_int ldvl, const float* vr, lapack_int ldvr,\n                           float* s, float* sep, lapack_int mm, lapack_int* m );\nlapack_int LAPACKE_dtrsna( int matrix_order, char job, char howmny,\n                           const lapack_logical* select, lapack_int n,\n                           const double* t, lapack_int ldt, const double* vl,\n                           lapack_int ldvl, const double* vr, lapack_int ldvr,\n                           double* s, double* sep, lapack_int mm,\n                           lapack_int* m );\nlapack_int LAPACKE_ctrsna( int matrix_order, char job, char howmny,\n                           const lapack_logical* select, lapack_int n,\n                           const lapack_complex_float* t, lapack_int ldt,\n                           const lapack_complex_float* vl, lapack_int ldvl,\n                           const lapack_complex_float* vr, lapack_int ldvr,\n                           float* s, float* sep, lapack_int mm, lapack_int* m );\nlapack_int LAPACKE_ztrsna( int matrix_order, char job, char howmny,\n                           const lapack_logical* select, lapack_int n,\n                           const lapack_complex_double* t, lapack_int ldt,\n                           const lapack_complex_double* vl, lapack_int ldvl,\n                           const lapack_complex_double* vr, lapack_int ldvr,\n                           double* s, double* sep, lapack_int mm,\n                           lapack_int* m );\n\nlapack_int LAPACKE_strsyl( int matrix_order, char trana, char tranb,\n                           lapack_int isgn, lapack_int m, lapack_int n,\n                           const float* a, lapack_int lda, const float* b,\n                           lapack_int ldb, float* c, lapack_int ldc,\n                           float* scale );\nlapack_int LAPACKE_dtrsyl( int matrix_order, char trana, char tranb,\n                           lapack_int isgn, lapack_int m, lapack_int n,\n                           const double* a, lapack_int lda, const double* b,\n                           lapack_int ldb, double* c, lapack_int ldc,\n                           double* scale );\nlapack_int LAPACKE_ctrsyl( int matrix_order, char trana, char tranb,\n                           lapack_int isgn, lapack_int m, lapack_int n,\n                           const lapack_complex_float* a, lapack_int lda,\n                           const lapack_complex_float* b, lapack_int ldb,\n                           lapack_complex_float* c, lapack_int ldc,\n                           float* scale );\nlapack_int LAPACKE_ztrsyl( int matrix_order, char trana, char tranb,\n                           lapack_int isgn, lapack_int m, lapack_int n,\n                           const lapack_complex_double* a, lapack_int lda,\n                           const lapack_complex_double* b, lapack_int ldb,\n                           lapack_complex_double* c, lapack_int ldc,\n                           double* scale );\n\nlapack_int LAPACKE_strtri( int matrix_order, char uplo, char diag, lapack_int n,\n                           float* a, lapack_int lda );\nlapack_int LAPACKE_dtrtri( int matrix_order, char uplo, char diag, lapack_int n,\n                           double* a, lapack_int lda );\nlapack_int LAPACKE_ctrtri( int matrix_order, char uplo, char diag, lapack_int n,\n                           lapack_complex_float* a, lapack_int lda );\nlapack_int LAPACKE_ztrtri( int matrix_order, char uplo, char diag, lapack_int n,\n                           lapack_complex_double* a, lapack_int lda );\n\nlapack_int LAPACKE_strtrs( int matrix_order, char uplo, char trans, char diag,\n                           lapack_int n, lapack_int nrhs, const float* a,\n                           lapack_int lda, float* b, lapack_int ldb );\nlapack_int LAPACKE_dtrtrs( int matrix_order, char uplo, char trans, char diag,\n                           lapack_int n, lapack_int nrhs, const double* a,\n                           lapack_int lda, double* b, lapack_int ldb );\nlapack_int LAPACKE_ctrtrs( int matrix_order, char uplo, char trans, char diag,\n                           lapack_int n, lapack_int nrhs,\n                           const lapack_complex_float* a, lapack_int lda,\n                           lapack_complex_float* b, lapack_int ldb );\nlapack_int LAPACKE_ztrtrs( int matrix_order, char uplo, char trans, char diag,\n                           lapack_int n, lapack_int nrhs,\n                           const lapack_complex_double* a, lapack_int lda,\n                           lapack_complex_double* b, lapack_int ldb );\n\nlapack_int LAPACKE_strttf( int matrix_order, char transr, char uplo,\n                           lapack_int n, const float* a, lapack_int lda,\n                           float* arf );\nlapack_int LAPACKE_dtrttf( int matrix_order, char transr, char uplo,\n                           lapack_int n, const double* a, lapack_int lda,\n                           double* arf );\nlapack_int LAPACKE_ctrttf( int matrix_order, char transr, char uplo,\n                           lapack_int n, const lapack_complex_float* a,\n                           lapack_int lda, lapack_complex_float* arf );\nlapack_int LAPACKE_ztrttf( int matrix_order, char transr, char uplo,\n                           lapack_int n, const lapack_complex_double* a,\n                           lapack_int lda, lapack_complex_double* arf );\n\nlapack_int LAPACKE_strttp( int matrix_order, char uplo, lapack_int n,\n                           const float* a, lapack_int lda, float* ap );\nlapack_int LAPACKE_dtrttp( int matrix_order, char uplo, lapack_int n,\n                           const double* a, lapack_int lda, double* ap );\nlapack_int LAPACKE_ctrttp( int matrix_order, char uplo, lapack_int n,\n                           const lapack_complex_float* a, lapack_int lda,\n                           lapack_complex_float* ap );\nlapack_int LAPACKE_ztrttp( int matrix_order, char uplo, lapack_int n,\n                           const lapack_complex_double* a, lapack_int lda,\n                           lapack_complex_double* ap );\n\nlapack_int LAPACKE_stzrzf( int matrix_order, lapack_int m, lapack_int n,\n                           float* a, lapack_int lda, float* tau );\nlapack_int LAPACKE_dtzrzf( int matrix_order, lapack_int m, lapack_int n,\n                           double* a, lapack_int lda, double* tau );\nlapack_int LAPACKE_ctzrzf( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_complex_float* a, lapack_int lda,\n                           lapack_complex_float* tau );\nlapack_int LAPACKE_ztzrzf( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_complex_double* a, lapack_int lda,\n                           lapack_complex_double* tau );\n\nlapack_int LAPACKE_cungbr( int matrix_order, char vect, lapack_int m,\n                           lapack_int n, lapack_int k, lapack_complex_float* a,\n                           lapack_int lda, const lapack_complex_float* tau );\nlapack_int LAPACKE_zungbr( int matrix_order, char vect, lapack_int m,\n                           lapack_int n, lapack_int k, lapack_complex_double* a,\n                           lapack_int lda, const lapack_complex_double* tau );\n\nlapack_int LAPACKE_cunghr( int matrix_order, lapack_int n, lapack_int ilo,\n                           lapack_int ihi, lapack_complex_float* a,\n                           lapack_int lda, const lapack_complex_float* tau );\nlapack_int LAPACKE_zunghr( int matrix_order, lapack_int n, lapack_int ilo,\n                           lapack_int ihi, lapack_complex_double* a,\n                           lapack_int lda, const lapack_complex_double* tau );\n\nlapack_int LAPACKE_cunglq( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int k, lapack_complex_float* a,\n                           lapack_int lda, const lapack_complex_float* tau );\nlapack_int LAPACKE_zunglq( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int k, lapack_complex_double* a,\n                           lapack_int lda, const lapack_complex_double* tau );\n\nlapack_int LAPACKE_cungql( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int k, lapack_complex_float* a,\n                           lapack_int lda, const lapack_complex_float* tau );\nlapack_int LAPACKE_zungql( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int k, lapack_complex_double* a,\n                           lapack_int lda, const lapack_complex_double* tau );\n\nlapack_int LAPACKE_cungqr( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int k, lapack_complex_float* a,\n                           lapack_int lda, const lapack_complex_float* tau );\nlapack_int LAPACKE_zungqr( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int k, lapack_complex_double* a,\n                           lapack_int lda, const lapack_complex_double* tau );\n\nlapack_int LAPACKE_cungrq( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int k, lapack_complex_float* a,\n                           lapack_int lda, const lapack_complex_float* tau );\nlapack_int LAPACKE_zungrq( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int k, lapack_complex_double* a,\n                           lapack_int lda, const lapack_complex_double* tau );\n\nlapack_int LAPACKE_cungtr( int matrix_order, char uplo, lapack_int n,\n                           lapack_complex_float* a, lapack_int lda,\n                           const lapack_complex_float* tau );\nlapack_int LAPACKE_zungtr( int matrix_order, char uplo, lapack_int n,\n                           lapack_complex_double* a, lapack_int lda,\n                           const lapack_complex_double* tau );\n\nlapack_int LAPACKE_cunmbr( int matrix_order, char vect, char side, char trans,\n                           lapack_int m, lapack_int n, lapack_int k,\n                           const lapack_complex_float* a, lapack_int lda,\n                           const lapack_complex_float* tau,\n                           lapack_complex_float* c, lapack_int ldc );\nlapack_int LAPACKE_zunmbr( int matrix_order, char vect, char side, char trans,\n                           lapack_int m, lapack_int n, lapack_int k,\n                           const lapack_complex_double* a, lapack_int lda,\n                           const lapack_complex_double* tau,\n                           lapack_complex_double* c, lapack_int ldc );\n\nlapack_int LAPACKE_cunmhr( int matrix_order, char side, char trans,\n                           lapack_int m, lapack_int n, lapack_int ilo,\n                           lapack_int ihi, const lapack_complex_float* a,\n                           lapack_int lda, const lapack_complex_float* tau,\n                           lapack_complex_float* c, lapack_int ldc );\nlapack_int LAPACKE_zunmhr( int matrix_order, char side, char trans,\n                           lapack_int m, lapack_int n, lapack_int ilo,\n                           lapack_int ihi, const lapack_complex_double* a,\n                           lapack_int lda, const lapack_complex_double* tau,\n                           lapack_complex_double* c, lapack_int ldc );\n\nlapack_int LAPACKE_cunmlq( int matrix_order, char side, char trans,\n                           lapack_int m, lapack_int n, lapack_int k,\n                           const lapack_complex_float* a, lapack_int lda,\n                           const lapack_complex_float* tau,\n                           lapack_complex_float* c, lapack_int ldc );\nlapack_int LAPACKE_zunmlq( int matrix_order, char side, char trans,\n                           lapack_int m, lapack_int n, lapack_int k,\n                           const lapack_complex_double* a, lapack_int lda,\n                           const lapack_complex_double* tau,\n                           lapack_complex_double* c, lapack_int ldc );\n\nlapack_int LAPACKE_cunmql( int matrix_order, char side, char trans,\n                           lapack_int m, lapack_int n, lapack_int k,\n                           const lapack_complex_float* a, lapack_int lda,\n                           const lapack_complex_float* tau,\n                           lapack_complex_float* c, lapack_int ldc );\nlapack_int LAPACKE_zunmql( int matrix_order, char side, char trans,\n                           lapack_int m, lapack_int n, lapack_int k,\n                           const lapack_complex_double* a, lapack_int lda,\n                           const lapack_complex_double* tau,\n                           lapack_complex_double* c, lapack_int ldc );\n\nlapack_int LAPACKE_cunmqr( int matrix_order, char side, char trans,\n                           lapack_int m, lapack_int n, lapack_int k,\n                           const lapack_complex_float* a, lapack_int lda,\n                           const lapack_complex_float* tau,\n                           lapack_complex_float* c, lapack_int ldc );\nlapack_int LAPACKE_zunmqr( int matrix_order, char side, char trans,\n                           lapack_int m, lapack_int n, lapack_int k,\n                           const lapack_complex_double* a, lapack_int lda,\n                           const lapack_complex_double* tau,\n                           lapack_complex_double* c, lapack_int ldc );\n\nlapack_int LAPACKE_cunmrq( int matrix_order, char side, char trans,\n                           lapack_int m, lapack_int n, lapack_int k,\n                           const lapack_complex_float* a, lapack_int lda,\n                           const lapack_complex_float* tau,\n                           lapack_complex_float* c, lapack_int ldc );\nlapack_int LAPACKE_zunmrq( int matrix_order, char side, char trans,\n                           lapack_int m, lapack_int n, lapack_int k,\n                           const lapack_complex_double* a, lapack_int lda,\n                           const lapack_complex_double* tau,\n                           lapack_complex_double* c, lapack_int ldc );\n\nlapack_int LAPACKE_cunmrz( int matrix_order, char side, char trans,\n                           lapack_int m, lapack_int n, lapack_int k,\n                           lapack_int l, const lapack_complex_float* a,\n                           lapack_int lda, const lapack_complex_float* tau,\n                           lapack_complex_float* c, lapack_int ldc );\nlapack_int LAPACKE_zunmrz( int matrix_order, char side, char trans,\n                           lapack_int m, lapack_int n, lapack_int k,\n                           lapack_int l, const lapack_complex_double* a,\n                           lapack_int lda, const lapack_complex_double* tau,\n                           lapack_complex_double* c, lapack_int ldc );\n\nlapack_int LAPACKE_cunmtr( int matrix_order, char side, char uplo, char trans,\n                           lapack_int m, lapack_int n,\n                           const lapack_complex_float* a, lapack_int lda,\n                           const lapack_complex_float* tau,\n                           lapack_complex_float* c, lapack_int ldc );\nlapack_int LAPACKE_zunmtr( int matrix_order, char side, char uplo, char trans,\n                           lapack_int m, lapack_int n,\n                           const lapack_complex_double* a, lapack_int lda,\n                           const lapack_complex_double* tau,\n                           lapack_complex_double* c, lapack_int ldc );\n\nlapack_int LAPACKE_cupgtr( int matrix_order, char uplo, lapack_int n,\n                           const lapack_complex_float* ap,\n                           const lapack_complex_float* tau,\n                           lapack_complex_float* q, lapack_int ldq );\nlapack_int LAPACKE_zupgtr( int matrix_order, char uplo, lapack_int n,\n                           const lapack_complex_double* ap,\n                           const lapack_complex_double* tau,\n                           lapack_complex_double* q, lapack_int ldq );\n\nlapack_int LAPACKE_cupmtr( int matrix_order, char side, char uplo, char trans,\n                           lapack_int m, lapack_int n,\n                           const lapack_complex_float* ap,\n                           const lapack_complex_float* tau,\n                           lapack_complex_float* c, lapack_int ldc );\nlapack_int LAPACKE_zupmtr( int matrix_order, char side, char uplo, char trans,\n                           lapack_int m, lapack_int n,\n                           const lapack_complex_double* ap,\n                           const lapack_complex_double* tau,\n                           lapack_complex_double* c, lapack_int ldc );\n\nlapack_int LAPACKE_sbdsdc_work( int matrix_order, char uplo, char compq,\n                                lapack_int n, float* d, float* e, float* u,\n                                lapack_int ldu, float* vt, lapack_int ldvt,\n                                float* q, lapack_int* iq, float* work,\n                                lapack_int* iwork );\nlapack_int LAPACKE_dbdsdc_work( int matrix_order, char uplo, char compq,\n                                lapack_int n, double* d, double* e, double* u,\n                                lapack_int ldu, double* vt, lapack_int ldvt,\n                                double* q, lapack_int* iq, double* work,\n                                lapack_int* iwork );\n\nlapack_int LAPACKE_sbdsqr_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int ncvt, lapack_int nru, lapack_int ncc,\n                                float* d, float* e, float* vt, lapack_int ldvt,\n                                float* u, lapack_int ldu, float* c,\n                                lapack_int ldc, float* work );\nlapack_int LAPACKE_dbdsqr_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int ncvt, lapack_int nru, lapack_int ncc,\n                                double* d, double* e, double* vt,\n                                lapack_int ldvt, double* u, lapack_int ldu,\n                                double* c, lapack_int ldc, double* work );\nlapack_int LAPACKE_cbdsqr_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int ncvt, lapack_int nru, lapack_int ncc,\n                                float* d, float* e, lapack_complex_float* vt,\n                                lapack_int ldvt, lapack_complex_float* u,\n                                lapack_int ldu, lapack_complex_float* c,\n                                lapack_int ldc, float* work );\nlapack_int LAPACKE_zbdsqr_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int ncvt, lapack_int nru, lapack_int ncc,\n                                double* d, double* e, lapack_complex_double* vt,\n                                lapack_int ldvt, lapack_complex_double* u,\n                                lapack_int ldu, lapack_complex_double* c,\n                                lapack_int ldc, double* work );\n\nlapack_int LAPACKE_sdisna_work( char job, lapack_int m, lapack_int n,\n                                const float* d, float* sep );\nlapack_int LAPACKE_ddisna_work( char job, lapack_int m, lapack_int n,\n                                const double* d, double* sep );\n\nlapack_int LAPACKE_sgbbrd_work( int matrix_order, char vect, lapack_int m,\n                                lapack_int n, lapack_int ncc, lapack_int kl,\n                                lapack_int ku, float* ab, lapack_int ldab,\n                                float* d, float* e, float* q, lapack_int ldq,\n                                float* pt, lapack_int ldpt, float* c,\n                                lapack_int ldc, float* work );\nlapack_int LAPACKE_dgbbrd_work( int matrix_order, char vect, lapack_int m,\n                                lapack_int n, lapack_int ncc, lapack_int kl,\n                                lapack_int ku, double* ab, lapack_int ldab,\n                                double* d, double* e, double* q, lapack_int ldq,\n                                double* pt, lapack_int ldpt, double* c,\n                                lapack_int ldc, double* work );\nlapack_int LAPACKE_cgbbrd_work( int matrix_order, char vect, lapack_int m,\n                                lapack_int n, lapack_int ncc, lapack_int kl,\n                                lapack_int ku, lapack_complex_float* ab,\n                                lapack_int ldab, float* d, float* e,\n                                lapack_complex_float* q, lapack_int ldq,\n                                lapack_complex_float* pt, lapack_int ldpt,\n                                lapack_complex_float* c, lapack_int ldc,\n                                lapack_complex_float* work, float* rwork );\nlapack_int LAPACKE_zgbbrd_work( int matrix_order, char vect, lapack_int m,\n                                lapack_int n, lapack_int ncc, lapack_int kl,\n                                lapack_int ku, lapack_complex_double* ab,\n                                lapack_int ldab, double* d, double* e,\n                                lapack_complex_double* q, lapack_int ldq,\n                                lapack_complex_double* pt, lapack_int ldpt,\n                                lapack_complex_double* c, lapack_int ldc,\n                                lapack_complex_double* work, double* rwork );\n\nlapack_int LAPACKE_sgbcon_work( int matrix_order, char norm, lapack_int n,\n                                lapack_int kl, lapack_int ku, const float* ab,\n                                lapack_int ldab, const lapack_int* ipiv,\n                                float anorm, float* rcond, float* work,\n                                lapack_int* iwork );\nlapack_int LAPACKE_dgbcon_work( int matrix_order, char norm, lapack_int n,\n                                lapack_int kl, lapack_int ku, const double* ab,\n                                lapack_int ldab, const lapack_int* ipiv,\n                                double anorm, double* rcond, double* work,\n                                lapack_int* iwork );\nlapack_int LAPACKE_cgbcon_work( int matrix_order, char norm, lapack_int n,\n                                lapack_int kl, lapack_int ku,\n                                const lapack_complex_float* ab, lapack_int ldab,\n                                const lapack_int* ipiv, float anorm,\n                                float* rcond, lapack_complex_float* work,\n                                float* rwork );\nlapack_int LAPACKE_zgbcon_work( int matrix_order, char norm, lapack_int n,\n                                lapack_int kl, lapack_int ku,\n                                const lapack_complex_double* ab,\n                                lapack_int ldab, const lapack_int* ipiv,\n                                double anorm, double* rcond,\n                                lapack_complex_double* work, double* rwork );\n\nlapack_int LAPACKE_sgbequ_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int kl, lapack_int ku, const float* ab,\n                                lapack_int ldab, float* r, float* c,\n                                float* rowcnd, float* colcnd, float* amax );\nlapack_int LAPACKE_dgbequ_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int kl, lapack_int ku, const double* ab,\n                                lapack_int ldab, double* r, double* c,\n                                double* rowcnd, double* colcnd, double* amax );\nlapack_int LAPACKE_cgbequ_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int kl, lapack_int ku,\n                                const lapack_complex_float* ab, lapack_int ldab,\n                                float* r, float* c, float* rowcnd,\n                                float* colcnd, float* amax );\nlapack_int LAPACKE_zgbequ_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int kl, lapack_int ku,\n                                const lapack_complex_double* ab,\n                                lapack_int ldab, double* r, double* c,\n                                double* rowcnd, double* colcnd, double* amax );\n\nlapack_int LAPACKE_sgbequb_work( int matrix_order, lapack_int m, lapack_int n,\n                                 lapack_int kl, lapack_int ku, const float* ab,\n                                 lapack_int ldab, float* r, float* c,\n                                 float* rowcnd, float* colcnd, float* amax );\nlapack_int LAPACKE_dgbequb_work( int matrix_order, lapack_int m, lapack_int n,\n                                 lapack_int kl, lapack_int ku, const double* ab,\n                                 lapack_int ldab, double* r, double* c,\n                                 double* rowcnd, double* colcnd, double* amax );\nlapack_int LAPACKE_cgbequb_work( int matrix_order, lapack_int m, lapack_int n,\n                                 lapack_int kl, lapack_int ku,\n                                 const lapack_complex_float* ab,\n                                 lapack_int ldab, float* r, float* c,\n                                 float* rowcnd, float* colcnd, float* amax );\nlapack_int LAPACKE_zgbequb_work( int matrix_order, lapack_int m, lapack_int n,\n                                 lapack_int kl, lapack_int ku,\n                                 const lapack_complex_double* ab,\n                                 lapack_int ldab, double* r, double* c,\n                                 double* rowcnd, double* colcnd, double* amax );\n\nlapack_int LAPACKE_sgbrfs_work( int matrix_order, char trans, lapack_int n,\n                                lapack_int kl, lapack_int ku, lapack_int nrhs,\n                                const float* ab, lapack_int ldab,\n                                const float* afb, lapack_int ldafb,\n                                const lapack_int* ipiv, const float* b,\n                                lapack_int ldb, float* x, lapack_int ldx,\n                                float* ferr, float* berr, float* work,\n                                lapack_int* iwork );\nlapack_int LAPACKE_dgbrfs_work( int matrix_order, char trans, lapack_int n,\n                                lapack_int kl, lapack_int ku, lapack_int nrhs,\n                                const double* ab, lapack_int ldab,\n                                const double* afb, lapack_int ldafb,\n                                const lapack_int* ipiv, const double* b,\n                                lapack_int ldb, double* x, lapack_int ldx,\n                                double* ferr, double* berr, double* work,\n                                lapack_int* iwork );\nlapack_int LAPACKE_cgbrfs_work( int matrix_order, char trans, lapack_int n,\n                                lapack_int kl, lapack_int ku, lapack_int nrhs,\n                                const lapack_complex_float* ab, lapack_int ldab,\n                                const lapack_complex_float* afb,\n                                lapack_int ldafb, const lapack_int* ipiv,\n                                const lapack_complex_float* b, lapack_int ldb,\n                                lapack_complex_float* x, lapack_int ldx,\n                                float* ferr, float* berr,\n                                lapack_complex_float* work, float* rwork );\nlapack_int LAPACKE_zgbrfs_work( int matrix_order, char trans, lapack_int n,\n                                lapack_int kl, lapack_int ku, lapack_int nrhs,\n                                const lapack_complex_double* ab,\n                                lapack_int ldab,\n                                const lapack_complex_double* afb,\n                                lapack_int ldafb, const lapack_int* ipiv,\n                                const lapack_complex_double* b, lapack_int ldb,\n                                lapack_complex_double* x, lapack_int ldx,\n                                double* ferr, double* berr,\n                                lapack_complex_double* work, double* rwork );\n\nlapack_int LAPACKE_sgbrfsx_work( int matrix_order, char trans, char equed,\n                                 lapack_int n, lapack_int kl, lapack_int ku,\n                                 lapack_int nrhs, const float* ab,\n                                 lapack_int ldab, const float* afb,\n                                 lapack_int ldafb, const lapack_int* ipiv,\n                                 const float* r, const float* c, const float* b,\n                                 lapack_int ldb, float* x, lapack_int ldx,\n                                 float* rcond, float* berr,\n                                 lapack_int n_err_bnds, float* err_bnds_norm,\n                                 float* err_bnds_comp, lapack_int nparams,\n                                 float* params, float* work,\n                                 lapack_int* iwork );\nlapack_int LAPACKE_dgbrfsx_work( int matrix_order, char trans, char equed,\n                                 lapack_int n, lapack_int kl, lapack_int ku,\n                                 lapack_int nrhs, const double* ab,\n                                 lapack_int ldab, const double* afb,\n                                 lapack_int ldafb, const lapack_int* ipiv,\n                                 const double* r, const double* c,\n                                 const double* b, lapack_int ldb, double* x,\n                                 lapack_int ldx, double* rcond, double* berr,\n                                 lapack_int n_err_bnds, double* err_bnds_norm,\n                                 double* err_bnds_comp, lapack_int nparams,\n                                 double* params, double* work,\n                                 lapack_int* iwork );\nlapack_int LAPACKE_cgbrfsx_work( int matrix_order, char trans, char equed,\n                                 lapack_int n, lapack_int kl, lapack_int ku,\n                                 lapack_int nrhs,\n                                 const lapack_complex_float* ab,\n                                 lapack_int ldab,\n                                 const lapack_complex_float* afb,\n                                 lapack_int ldafb, const lapack_int* ipiv,\n                                 const float* r, const float* c,\n                                 const lapack_complex_float* b, lapack_int ldb,\n                                 lapack_complex_float* x, lapack_int ldx,\n                                 float* rcond, float* berr,\n                                 lapack_int n_err_bnds, float* err_bnds_norm,\n                                 float* err_bnds_comp, lapack_int nparams,\n                                 float* params, lapack_complex_float* work,\n                                 float* rwork );\nlapack_int LAPACKE_zgbrfsx_work( int matrix_order, char trans, char equed,\n                                 lapack_int n, lapack_int kl, lapack_int ku,\n                                 lapack_int nrhs,\n                                 const lapack_complex_double* ab,\n                                 lapack_int ldab,\n                                 const lapack_complex_double* afb,\n                                 lapack_int ldafb, const lapack_int* ipiv,\n                                 const double* r, const double* c,\n                                 const lapack_complex_double* b, lapack_int ldb,\n                                 lapack_complex_double* x, lapack_int ldx,\n                                 double* rcond, double* berr,\n                                 lapack_int n_err_bnds, double* err_bnds_norm,\n                                 double* err_bnds_comp, lapack_int nparams,\n                                 double* params, lapack_complex_double* work,\n                                 double* rwork );\n\nlapack_int LAPACKE_sgbsv_work( int matrix_order, lapack_int n, lapack_int kl,\n                               lapack_int ku, lapack_int nrhs, float* ab,\n                               lapack_int ldab, lapack_int* ipiv, float* b,\n                               lapack_int ldb );\nlapack_int LAPACKE_dgbsv_work( int matrix_order, lapack_int n, lapack_int kl,\n                               lapack_int ku, lapack_int nrhs, double* ab,\n                               lapack_int ldab, lapack_int* ipiv, double* b,\n                               lapack_int ldb );\nlapack_int LAPACKE_cgbsv_work( int matrix_order, lapack_int n, lapack_int kl,\n                               lapack_int ku, lapack_int nrhs,\n                               lapack_complex_float* ab, lapack_int ldab,\n                               lapack_int* ipiv, lapack_complex_float* b,\n                               lapack_int ldb );\nlapack_int LAPACKE_zgbsv_work( int matrix_order, lapack_int n, lapack_int kl,\n                               lapack_int ku, lapack_int nrhs,\n                               lapack_complex_double* ab, lapack_int ldab,\n                               lapack_int* ipiv, lapack_complex_double* b,\n                               lapack_int ldb );\n\nlapack_int LAPACKE_sgbsvx_work( int matrix_order, char fact, char trans,\n                                lapack_int n, lapack_int kl, lapack_int ku,\n                                lapack_int nrhs, float* ab, lapack_int ldab,\n                                float* afb, lapack_int ldafb, lapack_int* ipiv,\n                                char* equed, float* r, float* c, float* b,\n                                lapack_int ldb, float* x, lapack_int ldx,\n                                float* rcond, float* ferr, float* berr,\n                                float* work, lapack_int* iwork );\nlapack_int LAPACKE_dgbsvx_work( int matrix_order, char fact, char trans,\n                                lapack_int n, lapack_int kl, lapack_int ku,\n                                lapack_int nrhs, double* ab, lapack_int ldab,\n                                double* afb, lapack_int ldafb, lapack_int* ipiv,\n                                char* equed, double* r, double* c, double* b,\n                                lapack_int ldb, double* x, lapack_int ldx,\n                                double* rcond, double* ferr, double* berr,\n                                double* work, lapack_int* iwork );\nlapack_int LAPACKE_cgbsvx_work( int matrix_order, char fact, char trans,\n                                lapack_int n, lapack_int kl, lapack_int ku,\n                                lapack_int nrhs, lapack_complex_float* ab,\n                                lapack_int ldab, lapack_complex_float* afb,\n                                lapack_int ldafb, lapack_int* ipiv, char* equed,\n                                float* r, float* c, lapack_complex_float* b,\n                                lapack_int ldb, lapack_complex_float* x,\n                                lapack_int ldx, float* rcond, float* ferr,\n                                float* berr, lapack_complex_float* work,\n                                float* rwork );\nlapack_int LAPACKE_zgbsvx_work( int matrix_order, char fact, char trans,\n                                lapack_int n, lapack_int kl, lapack_int ku,\n                                lapack_int nrhs, lapack_complex_double* ab,\n                                lapack_int ldab, lapack_complex_double* afb,\n                                lapack_int ldafb, lapack_int* ipiv, char* equed,\n                                double* r, double* c, lapack_complex_double* b,\n                                lapack_int ldb, lapack_complex_double* x,\n                                lapack_int ldx, double* rcond, double* ferr,\n                                double* berr, lapack_complex_double* work,\n                                double* rwork );\n\nlapack_int LAPACKE_sgbsvxx_work( int matrix_order, char fact, char trans,\n                                 lapack_int n, lapack_int kl, lapack_int ku,\n                                 lapack_int nrhs, float* ab, lapack_int ldab,\n                                 float* afb, lapack_int ldafb, lapack_int* ipiv,\n                                 char* equed, float* r, float* c, float* b,\n                                 lapack_int ldb, float* x, lapack_int ldx,\n                                 float* rcond, float* rpvgrw, float* berr,\n                                 lapack_int n_err_bnds, float* err_bnds_norm,\n                                 float* err_bnds_comp, lapack_int nparams,\n                                 float* params, float* work,\n                                 lapack_int* iwork );\nlapack_int LAPACKE_dgbsvxx_work( int matrix_order, char fact, char trans,\n                                 lapack_int n, lapack_int kl, lapack_int ku,\n                                 lapack_int nrhs, double* ab, lapack_int ldab,\n                                 double* afb, lapack_int ldafb,\n                                 lapack_int* ipiv, char* equed, double* r,\n                                 double* c, double* b, lapack_int ldb,\n                                 double* x, lapack_int ldx, double* rcond,\n                                 double* rpvgrw, double* berr,\n                                 lapack_int n_err_bnds, double* err_bnds_norm,\n                                 double* err_bnds_comp, lapack_int nparams,\n                                 double* params, double* work,\n                                 lapack_int* iwork );\nlapack_int LAPACKE_cgbsvxx_work( int matrix_order, char fact, char trans,\n                                 lapack_int n, lapack_int kl, lapack_int ku,\n                                 lapack_int nrhs, lapack_complex_float* ab,\n                                 lapack_int ldab, lapack_complex_float* afb,\n                                 lapack_int ldafb, lapack_int* ipiv,\n                                 char* equed, float* r, float* c,\n                                 lapack_complex_float* b, lapack_int ldb,\n                                 lapack_complex_float* x, lapack_int ldx,\n                                 float* rcond, float* rpvgrw, float* berr,\n                                 lapack_int n_err_bnds, float* err_bnds_norm,\n                                 float* err_bnds_comp, lapack_int nparams,\n                                 float* params, lapack_complex_float* work,\n                                 float* rwork );\nlapack_int LAPACKE_zgbsvxx_work( int matrix_order, char fact, char trans,\n                                 lapack_int n, lapack_int kl, lapack_int ku,\n                                 lapack_int nrhs, lapack_complex_double* ab,\n                                 lapack_int ldab, lapack_complex_double* afb,\n                                 lapack_int ldafb, lapack_int* ipiv,\n                                 char* equed, double* r, double* c,\n                                 lapack_complex_double* b, lapack_int ldb,\n                                 lapack_complex_double* x, lapack_int ldx,\n                                 double* rcond, double* rpvgrw, double* berr,\n                                 lapack_int n_err_bnds, double* err_bnds_norm,\n                                 double* err_bnds_comp, lapack_int nparams,\n                                 double* params, lapack_complex_double* work,\n                                 double* rwork );\n\nlapack_int LAPACKE_sgbtrf_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int kl, lapack_int ku, float* ab,\n                                lapack_int ldab, lapack_int* ipiv );\nlapack_int LAPACKE_dgbtrf_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int kl, lapack_int ku, double* ab,\n                                lapack_int ldab, lapack_int* ipiv );\nlapack_int LAPACKE_cgbtrf_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int kl, lapack_int ku,\n                                lapack_complex_float* ab, lapack_int ldab,\n                                lapack_int* ipiv );\nlapack_int LAPACKE_zgbtrf_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int kl, lapack_int ku,\n                                lapack_complex_double* ab, lapack_int ldab,\n                                lapack_int* ipiv );\n\nlapack_int LAPACKE_sgbtrs_work( int matrix_order, char trans, lapack_int n,\n                                lapack_int kl, lapack_int ku, lapack_int nrhs,\n                                const float* ab, lapack_int ldab,\n                                const lapack_int* ipiv, float* b,\n                                lapack_int ldb );\nlapack_int LAPACKE_dgbtrs_work( int matrix_order, char trans, lapack_int n,\n                                lapack_int kl, lapack_int ku, lapack_int nrhs,\n                                const double* ab, lapack_int ldab,\n                                const lapack_int* ipiv, double* b,\n                                lapack_int ldb );\nlapack_int LAPACKE_cgbtrs_work( int matrix_order, char trans, lapack_int n,\n                                lapack_int kl, lapack_int ku, lapack_int nrhs,\n                                const lapack_complex_float* ab, lapack_int ldab,\n                                const lapack_int* ipiv, lapack_complex_float* b,\n                                lapack_int ldb );\nlapack_int LAPACKE_zgbtrs_work( int matrix_order, char trans, lapack_int n,\n                                lapack_int kl, lapack_int ku, lapack_int nrhs,\n                                const lapack_complex_double* ab,\n                                lapack_int ldab, const lapack_int* ipiv,\n                                lapack_complex_double* b, lapack_int ldb );\n\nlapack_int LAPACKE_sgebak_work( int matrix_order, char job, char side,\n                                lapack_int n, lapack_int ilo, lapack_int ihi,\n                                const float* scale, lapack_int m, float* v,\n                                lapack_int ldv );\nlapack_int LAPACKE_dgebak_work( int matrix_order, char job, char side,\n                                lapack_int n, lapack_int ilo, lapack_int ihi,\n                                const double* scale, lapack_int m, double* v,\n                                lapack_int ldv );\nlapack_int LAPACKE_cgebak_work( int matrix_order, char job, char side,\n                                lapack_int n, lapack_int ilo, lapack_int ihi,\n                                const float* scale, lapack_int m,\n                                lapack_complex_float* v, lapack_int ldv );\nlapack_int LAPACKE_zgebak_work( int matrix_order, char job, char side,\n                                lapack_int n, lapack_int ilo, lapack_int ihi,\n                                const double* scale, lapack_int m,\n                                lapack_complex_double* v, lapack_int ldv );\n\nlapack_int LAPACKE_sgebal_work( int matrix_order, char job, lapack_int n,\n                                float* a, lapack_int lda, lapack_int* ilo,\n                                lapack_int* ihi, float* scale );\nlapack_int LAPACKE_dgebal_work( int matrix_order, char job, lapack_int n,\n                                double* a, lapack_int lda, lapack_int* ilo,\n                                lapack_int* ihi, double* scale );\nlapack_int LAPACKE_cgebal_work( int matrix_order, char job, lapack_int n,\n                                lapack_complex_float* a, lapack_int lda,\n                                lapack_int* ilo, lapack_int* ihi,\n                                float* scale );\nlapack_int LAPACKE_zgebal_work( int matrix_order, char job, lapack_int n,\n                                lapack_complex_double* a, lapack_int lda,\n                                lapack_int* ilo, lapack_int* ihi,\n                                double* scale );\n\nlapack_int LAPACKE_sgebrd_work( int matrix_order, lapack_int m, lapack_int n,\n                                float* a, lapack_int lda, float* d, float* e,\n                                float* tauq, float* taup, float* work,\n                                lapack_int lwork );\nlapack_int LAPACKE_dgebrd_work( int matrix_order, lapack_int m, lapack_int n,\n                                double* a, lapack_int lda, double* d, double* e,\n                                double* tauq, double* taup, double* work,\n                                lapack_int lwork );\nlapack_int LAPACKE_cgebrd_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_complex_float* a, lapack_int lda,\n                                float* d, float* e, lapack_complex_float* tauq,\n                                lapack_complex_float* taup,\n                                lapack_complex_float* work, lapack_int lwork );\nlapack_int LAPACKE_zgebrd_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_complex_double* a, lapack_int lda,\n                                double* d, double* e,\n                                lapack_complex_double* tauq,\n                                lapack_complex_double* taup,\n                                lapack_complex_double* work, lapack_int lwork );\n\nlapack_int LAPACKE_sgecon_work( int matrix_order, char norm, lapack_int n,\n                                const float* a, lapack_int lda, float anorm,\n                                float* rcond, float* work, lapack_int* iwork );\nlapack_int LAPACKE_dgecon_work( int matrix_order, char norm, lapack_int n,\n                                const double* a, lapack_int lda, double anorm,\n                                double* rcond, double* work,\n                                lapack_int* iwork );\nlapack_int LAPACKE_cgecon_work( int matrix_order, char norm, lapack_int n,\n                                const lapack_complex_float* a, lapack_int lda,\n                                float anorm, float* rcond,\n                                lapack_complex_float* work, float* rwork );\nlapack_int LAPACKE_zgecon_work( int matrix_order, char norm, lapack_int n,\n                                const lapack_complex_double* a, lapack_int lda,\n                                double anorm, double* rcond,\n                                lapack_complex_double* work, double* rwork );\n\nlapack_int LAPACKE_sgeequ_work( int matrix_order, lapack_int m, lapack_int n,\n                                const float* a, lapack_int lda, float* r,\n                                float* c, float* rowcnd, float* colcnd,\n                                float* amax );\nlapack_int LAPACKE_dgeequ_work( int matrix_order, lapack_int m, lapack_int n,\n                                const double* a, lapack_int lda, double* r,\n                                double* c, double* rowcnd, double* colcnd,\n                                double* amax );\nlapack_int LAPACKE_cgeequ_work( int matrix_order, lapack_int m, lapack_int n,\n                                const lapack_complex_float* a, lapack_int lda,\n                                float* r, float* c, float* rowcnd,\n                                float* colcnd, float* amax );\nlapack_int LAPACKE_zgeequ_work( int matrix_order, lapack_int m, lapack_int n,\n                                const lapack_complex_double* a, lapack_int lda,\n                                double* r, double* c, double* rowcnd,\n                                double* colcnd, double* amax );\n\nlapack_int LAPACKE_sgeequb_work( int matrix_order, lapack_int m, lapack_int n,\n                                 const float* a, lapack_int lda, float* r,\n                                 float* c, float* rowcnd, float* colcnd,\n                                 float* amax );\nlapack_int LAPACKE_dgeequb_work( int matrix_order, lapack_int m, lapack_int n,\n                                 const double* a, lapack_int lda, double* r,\n                                 double* c, double* rowcnd, double* colcnd,\n                                 double* amax );\nlapack_int LAPACKE_cgeequb_work( int matrix_order, lapack_int m, lapack_int n,\n                                 const lapack_complex_float* a, lapack_int lda,\n                                 float* r, float* c, float* rowcnd,\n                                 float* colcnd, float* amax );\nlapack_int LAPACKE_zgeequb_work( int matrix_order, lapack_int m, lapack_int n,\n                                 const lapack_complex_double* a, lapack_int lda,\n                                 double* r, double* c, double* rowcnd,\n                                 double* colcnd, double* amax );\n\nlapack_int LAPACKE_sgees_work( int matrix_order, char jobvs, char sort,\n                               LAPACK_S_SELECT2 select, lapack_int n, float* a,\n                               lapack_int lda, lapack_int* sdim, float* wr,\n                               float* wi, float* vs, lapack_int ldvs,\n                               float* work, lapack_int lwork,\n                               lapack_logical* bwork );\nlapack_int LAPACKE_dgees_work( int matrix_order, char jobvs, char sort,\n                               LAPACK_D_SELECT2 select, lapack_int n, double* a,\n                               lapack_int lda, lapack_int* sdim, double* wr,\n                               double* wi, double* vs, lapack_int ldvs,\n                               double* work, lapack_int lwork,\n                               lapack_logical* bwork );\nlapack_int LAPACKE_cgees_work( int matrix_order, char jobvs, char sort,\n                               LAPACK_C_SELECT1 select, lapack_int n,\n                               lapack_complex_float* a, lapack_int lda,\n                               lapack_int* sdim, lapack_complex_float* w,\n                               lapack_complex_float* vs, lapack_int ldvs,\n                               lapack_complex_float* work, lapack_int lwork,\n                               float* rwork, lapack_logical* bwork );\nlapack_int LAPACKE_zgees_work( int matrix_order, char jobvs, char sort,\n                               LAPACK_Z_SELECT1 select, lapack_int n,\n                               lapack_complex_double* a, lapack_int lda,\n                               lapack_int* sdim, lapack_complex_double* w,\n                               lapack_complex_double* vs, lapack_int ldvs,\n                               lapack_complex_double* work, lapack_int lwork,\n                               double* rwork, lapack_logical* bwork );\n\nlapack_int LAPACKE_sgeesx_work( int matrix_order, char jobvs, char sort,\n                                LAPACK_S_SELECT2 select, char sense,\n                                lapack_int n, float* a, lapack_int lda,\n                                lapack_int* sdim, float* wr, float* wi,\n                                float* vs, lapack_int ldvs, float* rconde,\n                                float* rcondv, float* work, lapack_int lwork,\n                                lapack_int* iwork, lapack_int liwork,\n                                lapack_logical* bwork );\nlapack_int LAPACKE_dgeesx_work( int matrix_order, char jobvs, char sort,\n                                LAPACK_D_SELECT2 select, char sense,\n                                lapack_int n, double* a, lapack_int lda,\n                                lapack_int* sdim, double* wr, double* wi,\n                                double* vs, lapack_int ldvs, double* rconde,\n                                double* rcondv, double* work, lapack_int lwork,\n                                lapack_int* iwork, lapack_int liwork,\n                                lapack_logical* bwork );\nlapack_int LAPACKE_cgeesx_work( int matrix_order, char jobvs, char sort,\n                                LAPACK_C_SELECT1 select, char sense,\n                                lapack_int n, lapack_complex_float* a,\n                                lapack_int lda, lapack_int* sdim,\n                                lapack_complex_float* w,\n                                lapack_complex_float* vs, lapack_int ldvs,\n                                float* rconde, float* rcondv,\n                                lapack_complex_float* work, lapack_int lwork,\n                                float* rwork, lapack_logical* bwork );\nlapack_int LAPACKE_zgeesx_work( int matrix_order, char jobvs, char sort,\n                                LAPACK_Z_SELECT1 select, char sense,\n                                lapack_int n, lapack_complex_double* a,\n                                lapack_int lda, lapack_int* sdim,\n                                lapack_complex_double* w,\n                                lapack_complex_double* vs, lapack_int ldvs,\n                                double* rconde, double* rcondv,\n                                lapack_complex_double* work, lapack_int lwork,\n                                double* rwork, lapack_logical* bwork );\n\nlapack_int LAPACKE_sgeev_work( int matrix_order, char jobvl, char jobvr,\n                               lapack_int n, float* a, lapack_int lda,\n                               float* wr, float* wi, float* vl, lapack_int ldvl,\n                               float* vr, lapack_int ldvr, float* work,\n                               lapack_int lwork );\nlapack_int LAPACKE_dgeev_work( int matrix_order, char jobvl, char jobvr,\n                               lapack_int n, double* a, lapack_int lda,\n                               double* wr, double* wi, double* vl,\n                               lapack_int ldvl, double* vr, lapack_int ldvr,\n                               double* work, lapack_int lwork );\nlapack_int LAPACKE_cgeev_work( int matrix_order, char jobvl, char jobvr,\n                               lapack_int n, lapack_complex_float* a,\n                               lapack_int lda, lapack_complex_float* w,\n                               lapack_complex_float* vl, lapack_int ldvl,\n                               lapack_complex_float* vr, lapack_int ldvr,\n                               lapack_complex_float* work, lapack_int lwork,\n                               float* rwork );\nlapack_int LAPACKE_zgeev_work( int matrix_order, char jobvl, char jobvr,\n                               lapack_int n, lapack_complex_double* a,\n                               lapack_int lda, lapack_complex_double* w,\n                               lapack_complex_double* vl, lapack_int ldvl,\n                               lapack_complex_double* vr, lapack_int ldvr,\n                               lapack_complex_double* work, lapack_int lwork,\n                               double* rwork );\n\nlapack_int LAPACKE_sgeevx_work( int matrix_order, char balanc, char jobvl,\n                                char jobvr, char sense, lapack_int n, float* a,\n                                lapack_int lda, float* wr, float* wi, float* vl,\n                                lapack_int ldvl, float* vr, lapack_int ldvr,\n                                lapack_int* ilo, lapack_int* ihi, float* scale,\n                                float* abnrm, float* rconde, float* rcondv,\n                                float* work, lapack_int lwork,\n                                lapack_int* iwork );\nlapack_int LAPACKE_dgeevx_work( int matrix_order, char balanc, char jobvl,\n                                char jobvr, char sense, lapack_int n, double* a,\n                                lapack_int lda, double* wr, double* wi,\n                                double* vl, lapack_int ldvl, double* vr,\n                                lapack_int ldvr, lapack_int* ilo,\n                                lapack_int* ihi, double* scale, double* abnrm,\n                                double* rconde, double* rcondv, double* work,\n                                lapack_int lwork, lapack_int* iwork );\nlapack_int LAPACKE_cgeevx_work( int matrix_order, char balanc, char jobvl,\n                                char jobvr, char sense, lapack_int n,\n                                lapack_complex_float* a, lapack_int lda,\n                                lapack_complex_float* w,\n                                lapack_complex_float* vl, lapack_int ldvl,\n                                lapack_complex_float* vr, lapack_int ldvr,\n                                lapack_int* ilo, lapack_int* ihi, float* scale,\n                                float* abnrm, float* rconde, float* rcondv,\n                                lapack_complex_float* work, lapack_int lwork,\n                                float* rwork );\nlapack_int LAPACKE_zgeevx_work( int matrix_order, char balanc, char jobvl,\n                                char jobvr, char sense, lapack_int n,\n                                lapack_complex_double* a, lapack_int lda,\n                                lapack_complex_double* w,\n                                lapack_complex_double* vl, lapack_int ldvl,\n                                lapack_complex_double* vr, lapack_int ldvr,\n                                lapack_int* ilo, lapack_int* ihi, double* scale,\n                                double* abnrm, double* rconde, double* rcondv,\n                                lapack_complex_double* work, lapack_int lwork,\n                                double* rwork );\n\nlapack_int LAPACKE_sgehrd_work( int matrix_order, lapack_int n, lapack_int ilo,\n                                lapack_int ihi, float* a, lapack_int lda,\n                                float* tau, float* work, lapack_int lwork );\nlapack_int LAPACKE_dgehrd_work( int matrix_order, lapack_int n, lapack_int ilo,\n                                lapack_int ihi, double* a, lapack_int lda,\n                                double* tau, double* work, lapack_int lwork );\nlapack_int LAPACKE_cgehrd_work( int matrix_order, lapack_int n, lapack_int ilo,\n                                lapack_int ihi, lapack_complex_float* a,\n                                lapack_int lda, lapack_complex_float* tau,\n                                lapack_complex_float* work, lapack_int lwork );\nlapack_int LAPACKE_zgehrd_work( int matrix_order, lapack_int n, lapack_int ilo,\n                                lapack_int ihi, lapack_complex_double* a,\n                                lapack_int lda, lapack_complex_double* tau,\n                                lapack_complex_double* work, lapack_int lwork );\n\nlapack_int LAPACKE_sgejsv_work( int matrix_order, char joba, char jobu,\n                                char jobv, char jobr, char jobt, char jobp,\n                                lapack_int m, lapack_int n, float* a,\n                                lapack_int lda, float* sva, float* u,\n                                lapack_int ldu, float* v, lapack_int ldv,\n                                float* work, lapack_int lwork,\n                                lapack_int* iwork );\nlapack_int LAPACKE_dgejsv_work( int matrix_order, char joba, char jobu,\n                                char jobv, char jobr, char jobt, char jobp,\n                                lapack_int m, lapack_int n, double* a,\n                                lapack_int lda, double* sva, double* u,\n                                lapack_int ldu, double* v, lapack_int ldv,\n                                double* work, lapack_int lwork,\n                                lapack_int* iwork );\n\nlapack_int LAPACKE_sgelq2_work( int matrix_order, lapack_int m, lapack_int n,\n                                float* a, lapack_int lda, float* tau,\n                                float* work );\nlapack_int LAPACKE_dgelq2_work( int matrix_order, lapack_int m, lapack_int n,\n                                double* a, lapack_int lda, double* tau,\n                                double* work );\nlapack_int LAPACKE_cgelq2_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_complex_float* a, lapack_int lda,\n                                lapack_complex_float* tau,\n                                lapack_complex_float* work );\nlapack_int LAPACKE_zgelq2_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_complex_double* a, lapack_int lda,\n                                lapack_complex_double* tau,\n                                lapack_complex_double* work );\n\nlapack_int LAPACKE_sgelqf_work( int matrix_order, lapack_int m, lapack_int n,\n                                float* a, lapack_int lda, float* tau,\n                                float* work, lapack_int lwork );\nlapack_int LAPACKE_dgelqf_work( int matrix_order, lapack_int m, lapack_int n,\n                                double* a, lapack_int lda, double* tau,\n                                double* work, lapack_int lwork );\nlapack_int LAPACKE_cgelqf_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_complex_float* a, lapack_int lda,\n                                lapack_complex_float* tau,\n                                lapack_complex_float* work, lapack_int lwork );\nlapack_int LAPACKE_zgelqf_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_complex_double* a, lapack_int lda,\n                                lapack_complex_double* tau,\n                                lapack_complex_double* work, lapack_int lwork );\n\nlapack_int LAPACKE_sgels_work( int matrix_order, char trans, lapack_int m,\n                               lapack_int n, lapack_int nrhs, float* a,\n                               lapack_int lda, float* b, lapack_int ldb,\n                               float* work, lapack_int lwork );\nlapack_int LAPACKE_dgels_work( int matrix_order, char trans, lapack_int m,\n                               lapack_int n, lapack_int nrhs, double* a,\n                               lapack_int lda, double* b, lapack_int ldb,\n                               double* work, lapack_int lwork );\nlapack_int LAPACKE_cgels_work( int matrix_order, char trans, lapack_int m,\n                               lapack_int n, lapack_int nrhs,\n                               lapack_complex_float* a, lapack_int lda,\n                               lapack_complex_float* b, lapack_int ldb,\n                               lapack_complex_float* work, lapack_int lwork );\nlapack_int LAPACKE_zgels_work( int matrix_order, char trans, lapack_int m,\n                               lapack_int n, lapack_int nrhs,\n                               lapack_complex_double* a, lapack_int lda,\n                               lapack_complex_double* b, lapack_int ldb,\n                               lapack_complex_double* work, lapack_int lwork );\n\nlapack_int LAPACKE_sgelsd_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int nrhs, float* a, lapack_int lda,\n                                float* b, lapack_int ldb, float* s, float rcond,\n                                lapack_int* rank, float* work, lapack_int lwork,\n                                lapack_int* iwork );\nlapack_int LAPACKE_dgelsd_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int nrhs, double* a, lapack_int lda,\n                                double* b, lapack_int ldb, double* s,\n                                double rcond, lapack_int* rank, double* work,\n                                lapack_int lwork, lapack_int* iwork );\nlapack_int LAPACKE_cgelsd_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int nrhs, lapack_complex_float* a,\n                                lapack_int lda, lapack_complex_float* b,\n                                lapack_int ldb, float* s, float rcond,\n                                lapack_int* rank, lapack_complex_float* work,\n                                lapack_int lwork, float* rwork,\n                                lapack_int* iwork );\nlapack_int LAPACKE_zgelsd_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int nrhs, lapack_complex_double* a,\n                                lapack_int lda, lapack_complex_double* b,\n                                lapack_int ldb, double* s, double rcond,\n                                lapack_int* rank, lapack_complex_double* work,\n                                lapack_int lwork, double* rwork,\n                                lapack_int* iwork );\n\nlapack_int LAPACKE_sgelss_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int nrhs, float* a, lapack_int lda,\n                                float* b, lapack_int ldb, float* s, float rcond,\n                                lapack_int* rank, float* work,\n                                lapack_int lwork );\nlapack_int LAPACKE_dgelss_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int nrhs, double* a, lapack_int lda,\n                                double* b, lapack_int ldb, double* s,\n                                double rcond, lapack_int* rank, double* work,\n                                lapack_int lwork );\nlapack_int LAPACKE_cgelss_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int nrhs, lapack_complex_float* a,\n                                lapack_int lda, lapack_complex_float* b,\n                                lapack_int ldb, float* s, float rcond,\n                                lapack_int* rank, lapack_complex_float* work,\n                                lapack_int lwork, float* rwork );\nlapack_int LAPACKE_zgelss_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int nrhs, lapack_complex_double* a,\n                                lapack_int lda, lapack_complex_double* b,\n                                lapack_int ldb, double* s, double rcond,\n                                lapack_int* rank, lapack_complex_double* work,\n                                lapack_int lwork, double* rwork );\n\nlapack_int LAPACKE_sgelsy_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int nrhs, float* a, lapack_int lda,\n                                float* b, lapack_int ldb, lapack_int* jpvt,\n                                float rcond, lapack_int* rank, float* work,\n                                lapack_int lwork );\nlapack_int LAPACKE_dgelsy_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int nrhs, double* a, lapack_int lda,\n                                double* b, lapack_int ldb, lapack_int* jpvt,\n                                double rcond, lapack_int* rank, double* work,\n                                lapack_int lwork );\nlapack_int LAPACKE_cgelsy_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int nrhs, lapack_complex_float* a,\n                                lapack_int lda, lapack_complex_float* b,\n                                lapack_int ldb, lapack_int* jpvt, float rcond,\n                                lapack_int* rank, lapack_complex_float* work,\n                                lapack_int lwork, float* rwork );\nlapack_int LAPACKE_zgelsy_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int nrhs, lapack_complex_double* a,\n                                lapack_int lda, lapack_complex_double* b,\n                                lapack_int ldb, lapack_int* jpvt, double rcond,\n                                lapack_int* rank, lapack_complex_double* work,\n                                lapack_int lwork, double* rwork );\n\nlapack_int LAPACKE_sgeqlf_work( int matrix_order, lapack_int m, lapack_int n,\n                                float* a, lapack_int lda, float* tau,\n                                float* work, lapack_int lwork );\nlapack_int LAPACKE_dgeqlf_work( int matrix_order, lapack_int m, lapack_int n,\n                                double* a, lapack_int lda, double* tau,\n                                double* work, lapack_int lwork );\nlapack_int LAPACKE_cgeqlf_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_complex_float* a, lapack_int lda,\n                                lapack_complex_float* tau,\n                                lapack_complex_float* work, lapack_int lwork );\nlapack_int LAPACKE_zgeqlf_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_complex_double* a, lapack_int lda,\n                                lapack_complex_double* tau,\n                                lapack_complex_double* work, lapack_int lwork );\n\nlapack_int LAPACKE_sgeqp3_work( int matrix_order, lapack_int m, lapack_int n,\n                                float* a, lapack_int lda, lapack_int* jpvt,\n                                float* tau, float* work, lapack_int lwork );\nlapack_int LAPACKE_dgeqp3_work( int matrix_order, lapack_int m, lapack_int n,\n                                double* a, lapack_int lda, lapack_int* jpvt,\n                                double* tau, double* work, lapack_int lwork );\nlapack_int LAPACKE_cgeqp3_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_complex_float* a, lapack_int lda,\n                                lapack_int* jpvt, lapack_complex_float* tau,\n                                lapack_complex_float* work, lapack_int lwork,\n                                float* rwork );\nlapack_int LAPACKE_zgeqp3_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_complex_double* a, lapack_int lda,\n                                lapack_int* jpvt, lapack_complex_double* tau,\n                                lapack_complex_double* work, lapack_int lwork,\n                                double* rwork );\n\nlapack_int LAPACKE_sgeqpf_work( int matrix_order, lapack_int m, lapack_int n,\n                                float* a, lapack_int lda, lapack_int* jpvt,\n                                float* tau, float* work );\nlapack_int LAPACKE_dgeqpf_work( int matrix_order, lapack_int m, lapack_int n,\n                                double* a, lapack_int lda, lapack_int* jpvt,\n                                double* tau, double* work );\nlapack_int LAPACKE_cgeqpf_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_complex_float* a, lapack_int lda,\n                                lapack_int* jpvt, lapack_complex_float* tau,\n                                lapack_complex_float* work, float* rwork );\nlapack_int LAPACKE_zgeqpf_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_complex_double* a, lapack_int lda,\n                                lapack_int* jpvt, lapack_complex_double* tau,\n                                lapack_complex_double* work, double* rwork );\n\nlapack_int LAPACKE_sgeqr2_work( int matrix_order, lapack_int m, lapack_int n,\n                                float* a, lapack_int lda, float* tau,\n                                float* work );\nlapack_int LAPACKE_dgeqr2_work( int matrix_order, lapack_int m, lapack_int n,\n                                double* a, lapack_int lda, double* tau,\n                                double* work );\nlapack_int LAPACKE_cgeqr2_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_complex_float* a, lapack_int lda,\n                                lapack_complex_float* tau,\n                                lapack_complex_float* work );\nlapack_int LAPACKE_zgeqr2_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_complex_double* a, lapack_int lda,\n                                lapack_complex_double* tau,\n                                lapack_complex_double* work );\n\nlapack_int LAPACKE_sgeqrf_work( int matrix_order, lapack_int m, lapack_int n,\n                                float* a, lapack_int lda, float* tau,\n                                float* work, lapack_int lwork );\nlapack_int LAPACKE_dgeqrf_work( int matrix_order, lapack_int m, lapack_int n,\n                                double* a, lapack_int lda, double* tau,\n                                double* work, lapack_int lwork );\nlapack_int LAPACKE_cgeqrf_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_complex_float* a, lapack_int lda,\n                                lapack_complex_float* tau,\n                                lapack_complex_float* work, lapack_int lwork );\nlapack_int LAPACKE_zgeqrf_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_complex_double* a, lapack_int lda,\n                                lapack_complex_double* tau,\n                                lapack_complex_double* work, lapack_int lwork );\n\nlapack_int LAPACKE_sgeqrfp_work( int matrix_order, lapack_int m, lapack_int n,\n                                 float* a, lapack_int lda, float* tau,\n                                 float* work, lapack_int lwork );\nlapack_int LAPACKE_dgeqrfp_work( int matrix_order, lapack_int m, lapack_int n,\n                                 double* a, lapack_int lda, double* tau,\n                                 double* work, lapack_int lwork );\nlapack_int LAPACKE_cgeqrfp_work( int matrix_order, lapack_int m, lapack_int n,\n                                 lapack_complex_float* a, lapack_int lda,\n                                 lapack_complex_float* tau,\n                                 lapack_complex_float* work, lapack_int lwork );\nlapack_int LAPACKE_zgeqrfp_work( int matrix_order, lapack_int m, lapack_int n,\n                                 lapack_complex_double* a, lapack_int lda,\n                                 lapack_complex_double* tau,\n                                 lapack_complex_double* work,\n                                 lapack_int lwork );\n\nlapack_int LAPACKE_sgerfs_work( int matrix_order, char trans, lapack_int n,\n                                lapack_int nrhs, const float* a, lapack_int lda,\n                                const float* af, lapack_int ldaf,\n                                const lapack_int* ipiv, const float* b,\n                                lapack_int ldb, float* x, lapack_int ldx,\n                                float* ferr, float* berr, float* work,\n                                lapack_int* iwork );\nlapack_int LAPACKE_dgerfs_work( int matrix_order, char trans, lapack_int n,\n                                lapack_int nrhs, const double* a,\n                                lapack_int lda, const double* af,\n                                lapack_int ldaf, const lapack_int* ipiv,\n                                const double* b, lapack_int ldb, double* x,\n                                lapack_int ldx, double* ferr, double* berr,\n                                double* work, lapack_int* iwork );\nlapack_int LAPACKE_cgerfs_work( int matrix_order, char trans, lapack_int n,\n                                lapack_int nrhs, const lapack_complex_float* a,\n                                lapack_int lda, const lapack_complex_float* af,\n                                lapack_int ldaf, const lapack_int* ipiv,\n                                const lapack_complex_float* b, lapack_int ldb,\n                                lapack_complex_float* x, lapack_int ldx,\n                                float* ferr, float* berr,\n                                lapack_complex_float* work, float* rwork );\nlapack_int LAPACKE_zgerfs_work( int matrix_order, char trans, lapack_int n,\n                                lapack_int nrhs, const lapack_complex_double* a,\n                                lapack_int lda, const lapack_complex_double* af,\n                                lapack_int ldaf, const lapack_int* ipiv,\n                                const lapack_complex_double* b, lapack_int ldb,\n                                lapack_complex_double* x, lapack_int ldx,\n                                double* ferr, double* berr,\n                                lapack_complex_double* work, double* rwork );\n\nlapack_int LAPACKE_sgerfsx_work( int matrix_order, char trans, char equed,\n                                 lapack_int n, lapack_int nrhs, const float* a,\n                                 lapack_int lda, const float* af,\n                                 lapack_int ldaf, const lapack_int* ipiv,\n                                 const float* r, const float* c, const float* b,\n                                 lapack_int ldb, float* x, lapack_int ldx,\n                                 float* rcond, float* berr,\n                                 lapack_int n_err_bnds, float* err_bnds_norm,\n                                 float* err_bnds_comp, lapack_int nparams,\n                                 float* params, float* work,\n                                 lapack_int* iwork );\nlapack_int LAPACKE_dgerfsx_work( int matrix_order, char trans, char equed,\n                                 lapack_int n, lapack_int nrhs, const double* a,\n                                 lapack_int lda, const double* af,\n                                 lapack_int ldaf, const lapack_int* ipiv,\n                                 const double* r, const double* c,\n                                 const double* b, lapack_int ldb, double* x,\n                                 lapack_int ldx, double* rcond, double* berr,\n                                 lapack_int n_err_bnds, double* err_bnds_norm,\n                                 double* err_bnds_comp, lapack_int nparams,\n                                 double* params, double* work,\n                                 lapack_int* iwork );\nlapack_int LAPACKE_cgerfsx_work( int matrix_order, char trans, char equed,\n                                 lapack_int n, lapack_int nrhs,\n                                 const lapack_complex_float* a, lapack_int lda,\n                                 const lapack_complex_float* af,\n                                 lapack_int ldaf, const lapack_int* ipiv,\n                                 const float* r, const float* c,\n                                 const lapack_complex_float* b, lapack_int ldb,\n                                 lapack_complex_float* x, lapack_int ldx,\n                                 float* rcond, float* berr,\n                                 lapack_int n_err_bnds, float* err_bnds_norm,\n                                 float* err_bnds_comp, lapack_int nparams,\n                                 float* params, lapack_complex_float* work,\n                                 float* rwork );\nlapack_int LAPACKE_zgerfsx_work( int matrix_order, char trans, char equed,\n                                 lapack_int n, lapack_int nrhs,\n                                 const lapack_complex_double* a, lapack_int lda,\n                                 const lapack_complex_double* af,\n                                 lapack_int ldaf, const lapack_int* ipiv,\n                                 const double* r, const double* c,\n                                 const lapack_complex_double* b, lapack_int ldb,\n                                 lapack_complex_double* x, lapack_int ldx,\n                                 double* rcond, double* berr,\n                                 lapack_int n_err_bnds, double* err_bnds_norm,\n                                 double* err_bnds_comp, lapack_int nparams,\n                                 double* params, lapack_complex_double* work,\n                                 double* rwork );\n\nlapack_int LAPACKE_sgerqf_work( int matrix_order, lapack_int m, lapack_int n,\n                                float* a, lapack_int lda, float* tau,\n                                float* work, lapack_int lwork );\nlapack_int LAPACKE_dgerqf_work( int matrix_order, lapack_int m, lapack_int n,\n                                double* a, lapack_int lda, double* tau,\n                                double* work, lapack_int lwork );\nlapack_int LAPACKE_cgerqf_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_complex_float* a, lapack_int lda,\n                                lapack_complex_float* tau,\n                                lapack_complex_float* work, lapack_int lwork );\nlapack_int LAPACKE_zgerqf_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_complex_double* a, lapack_int lda,\n                                lapack_complex_double* tau,\n                                lapack_complex_double* work, lapack_int lwork );\n\nlapack_int LAPACKE_sgesdd_work( int matrix_order, char jobz, lapack_int m,\n                                lapack_int n, float* a, lapack_int lda,\n                                float* s, float* u, lapack_int ldu, float* vt,\n                                lapack_int ldvt, float* work, lapack_int lwork,\n                                lapack_int* iwork );\nlapack_int LAPACKE_dgesdd_work( int matrix_order, char jobz, lapack_int m,\n                                lapack_int n, double* a, lapack_int lda,\n                                double* s, double* u, lapack_int ldu,\n                                double* vt, lapack_int ldvt, double* work,\n                                lapack_int lwork, lapack_int* iwork );\nlapack_int LAPACKE_cgesdd_work( int matrix_order, char jobz, lapack_int m,\n                                lapack_int n, lapack_complex_float* a,\n                                lapack_int lda, float* s,\n                                lapack_complex_float* u, lapack_int ldu,\n                                lapack_complex_float* vt, lapack_int ldvt,\n                                lapack_complex_float* work, lapack_int lwork,\n                                float* rwork, lapack_int* iwork );\nlapack_int LAPACKE_zgesdd_work( int matrix_order, char jobz, lapack_int m,\n                                lapack_int n, lapack_complex_double* a,\n                                lapack_int lda, double* s,\n                                lapack_complex_double* u, lapack_int ldu,\n                                lapack_complex_double* vt, lapack_int ldvt,\n                                lapack_complex_double* work, lapack_int lwork,\n                                double* rwork, lapack_int* iwork );\n\nlapack_int LAPACKE_sgesv_work( int matrix_order, lapack_int n, lapack_int nrhs,\n                               float* a, lapack_int lda, lapack_int* ipiv,\n                               float* b, lapack_int ldb );\nlapack_int LAPACKE_dgesv_work( int matrix_order, lapack_int n, lapack_int nrhs,\n                               double* a, lapack_int lda, lapack_int* ipiv,\n                               double* b, lapack_int ldb );\nlapack_int LAPACKE_cgesv_work( int matrix_order, lapack_int n, lapack_int nrhs,\n                               lapack_complex_float* a, lapack_int lda,\n                               lapack_int* ipiv, lapack_complex_float* b,\n                               lapack_int ldb );\nlapack_int LAPACKE_zgesv_work( int matrix_order, lapack_int n, lapack_int nrhs,\n                               lapack_complex_double* a, lapack_int lda,\n                               lapack_int* ipiv, lapack_complex_double* b,\n                               lapack_int ldb );\nlapack_int LAPACKE_dsgesv_work( int matrix_order, lapack_int n, lapack_int nrhs,\n                                double* a, lapack_int lda, lapack_int* ipiv,\n                                double* b, lapack_int ldb, double* x,\n                                lapack_int ldx, double* work, float* swork,\n                                lapack_int* iter );\nlapack_int LAPACKE_zcgesv_work( int matrix_order, lapack_int n, lapack_int nrhs,\n                                lapack_complex_double* a, lapack_int lda,\n                                lapack_int* ipiv, lapack_complex_double* b,\n                                lapack_int ldb, lapack_complex_double* x,\n                                lapack_int ldx, lapack_complex_double* work,\n                                lapack_complex_float* swork, double* rwork,\n                                lapack_int* iter );\n\nlapack_int LAPACKE_sgesvd_work( int matrix_order, char jobu, char jobvt,\n                                lapack_int m, lapack_int n, float* a,\n                                lapack_int lda, float* s, float* u,\n                                lapack_int ldu, float* vt, lapack_int ldvt,\n                                float* work, lapack_int lwork );\nlapack_int LAPACKE_dgesvd_work( int matrix_order, char jobu, char jobvt,\n                                lapack_int m, lapack_int n, double* a,\n                                lapack_int lda, double* s, double* u,\n                                lapack_int ldu, double* vt, lapack_int ldvt,\n                                double* work, lapack_int lwork );\nlapack_int LAPACKE_cgesvd_work( int matrix_order, char jobu, char jobvt,\n                                lapack_int m, lapack_int n,\n                                lapack_complex_float* a, lapack_int lda,\n                                float* s, lapack_complex_float* u,\n                                lapack_int ldu, lapack_complex_float* vt,\n                                lapack_int ldvt, lapack_complex_float* work,\n                                lapack_int lwork, float* rwork );\nlapack_int LAPACKE_zgesvd_work( int matrix_order, char jobu, char jobvt,\n                                lapack_int m, lapack_int n,\n                                lapack_complex_double* a, lapack_int lda,\n                                double* s, lapack_complex_double* u,\n                                lapack_int ldu, lapack_complex_double* vt,\n                                lapack_int ldvt, lapack_complex_double* work,\n                                lapack_int lwork, double* rwork );\n\nlapack_int LAPACKE_sgesvj_work( int matrix_order, char joba, char jobu,\n                                char jobv, lapack_int m, lapack_int n, float* a,\n                                lapack_int lda, float* sva, lapack_int mv,\n                                float* v, lapack_int ldv, float* work,\n                                lapack_int lwork );\nlapack_int LAPACKE_dgesvj_work( int matrix_order, char joba, char jobu,\n                                char jobv, lapack_int m, lapack_int n,\n                                double* a, lapack_int lda, double* sva,\n                                lapack_int mv, double* v, lapack_int ldv,\n                                double* work, lapack_int lwork );\n\nlapack_int LAPACKE_sgesvx_work( int matrix_order, char fact, char trans,\n                                lapack_int n, lapack_int nrhs, float* a,\n                                lapack_int lda, float* af, lapack_int ldaf,\n                                lapack_int* ipiv, char* equed, float* r,\n                                float* c, float* b, lapack_int ldb, float* x,\n                                lapack_int ldx, float* rcond, float* ferr,\n                                float* berr, float* work, lapack_int* iwork );\nlapack_int LAPACKE_dgesvx_work( int matrix_order, char fact, char trans,\n                                lapack_int n, lapack_int nrhs, double* a,\n                                lapack_int lda, double* af, lapack_int ldaf,\n                                lapack_int* ipiv, char* equed, double* r,\n                                double* c, double* b, lapack_int ldb, double* x,\n                                lapack_int ldx, double* rcond, double* ferr,\n                                double* berr, double* work, lapack_int* iwork );\nlapack_int LAPACKE_cgesvx_work( int matrix_order, char fact, char trans,\n                                lapack_int n, lapack_int nrhs,\n                                lapack_complex_float* a, lapack_int lda,\n                                lapack_complex_float* af, lapack_int ldaf,\n                                lapack_int* ipiv, char* equed, float* r,\n                                float* c, lapack_complex_float* b,\n                                lapack_int ldb, lapack_complex_float* x,\n                                lapack_int ldx, float* rcond, float* ferr,\n                                float* berr, lapack_complex_float* work,\n                                float* rwork );\nlapack_int LAPACKE_zgesvx_work( int matrix_order, char fact, char trans,\n                                lapack_int n, lapack_int nrhs,\n                                lapack_complex_double* a, lapack_int lda,\n                                lapack_complex_double* af, lapack_int ldaf,\n                                lapack_int* ipiv, char* equed, double* r,\n                                double* c, lapack_complex_double* b,\n                                lapack_int ldb, lapack_complex_double* x,\n                                lapack_int ldx, double* rcond, double* ferr,\n                                double* berr, lapack_complex_double* work,\n                                double* rwork );\n\nlapack_int LAPACKE_sgesvxx_work( int matrix_order, char fact, char trans,\n                                 lapack_int n, lapack_int nrhs, float* a,\n                                 lapack_int lda, float* af, lapack_int ldaf,\n                                 lapack_int* ipiv, char* equed, float* r,\n                                 float* c, float* b, lapack_int ldb, float* x,\n                                 lapack_int ldx, float* rcond, float* rpvgrw,\n                                 float* berr, lapack_int n_err_bnds,\n                                 float* err_bnds_norm, float* err_bnds_comp,\n                                 lapack_int nparams, float* params, float* work,\n                                 lapack_int* iwork );\nlapack_int LAPACKE_dgesvxx_work( int matrix_order, char fact, char trans,\n                                 lapack_int n, lapack_int nrhs, double* a,\n                                 lapack_int lda, double* af, lapack_int ldaf,\n                                 lapack_int* ipiv, char* equed, double* r,\n                                 double* c, double* b, lapack_int ldb,\n                                 double* x, lapack_int ldx, double* rcond,\n                                 double* rpvgrw, double* berr,\n                                 lapack_int n_err_bnds, double* err_bnds_norm,\n                                 double* err_bnds_comp, lapack_int nparams,\n                                 double* params, double* work,\n                                 lapack_int* iwork );\nlapack_int LAPACKE_cgesvxx_work( int matrix_order, char fact, char trans,\n                                 lapack_int n, lapack_int nrhs,\n                                 lapack_complex_float* a, lapack_int lda,\n                                 lapack_complex_float* af, lapack_int ldaf,\n                                 lapack_int* ipiv, char* equed, float* r,\n                                 float* c, lapack_complex_float* b,\n                                 lapack_int ldb, lapack_complex_float* x,\n                                 lapack_int ldx, float* rcond, float* rpvgrw,\n                                 float* berr, lapack_int n_err_bnds,\n                                 float* err_bnds_norm, float* err_bnds_comp,\n                                 lapack_int nparams, float* params,\n                                 lapack_complex_float* work, float* rwork );\nlapack_int LAPACKE_zgesvxx_work( int matrix_order, char fact, char trans,\n                                 lapack_int n, lapack_int nrhs,\n                                 lapack_complex_double* a, lapack_int lda,\n                                 lapack_complex_double* af, lapack_int ldaf,\n                                 lapack_int* ipiv, char* equed, double* r,\n                                 double* c, lapack_complex_double* b,\n                                 lapack_int ldb, lapack_complex_double* x,\n                                 lapack_int ldx, double* rcond, double* rpvgrw,\n                                 double* berr, lapack_int n_err_bnds,\n                                 double* err_bnds_norm, double* err_bnds_comp,\n                                 lapack_int nparams, double* params,\n                                 lapack_complex_double* work, double* rwork );\n\nlapack_int LAPACKE_sgetf2_work( int matrix_order, lapack_int m, lapack_int n,\n                                float* a, lapack_int lda, lapack_int* ipiv );\nlapack_int LAPACKE_dgetf2_work( int matrix_order, lapack_int m, lapack_int n,\n                                double* a, lapack_int lda, lapack_int* ipiv );\nlapack_int LAPACKE_cgetf2_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_complex_float* a, lapack_int lda,\n                                lapack_int* ipiv );\nlapack_int LAPACKE_zgetf2_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_complex_double* a, lapack_int lda,\n                                lapack_int* ipiv );\n\nlapack_int LAPACKE_sgetrf_work( int matrix_order, lapack_int m, lapack_int n,\n                                float* a, lapack_int lda, lapack_int* ipiv );\nlapack_int LAPACKE_dgetrf_work( int matrix_order, lapack_int m, lapack_int n,\n                                double* a, lapack_int lda, lapack_int* ipiv );\nlapack_int LAPACKE_cgetrf_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_complex_float* a, lapack_int lda,\n                                lapack_int* ipiv );\nlapack_int LAPACKE_zgetrf_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_complex_double* a, lapack_int lda,\n                                lapack_int* ipiv );\n\nlapack_int LAPACKE_sgetri_work( int matrix_order, lapack_int n, float* a,\n                                lapack_int lda, const lapack_int* ipiv,\n                                float* work, lapack_int lwork );\nlapack_int LAPACKE_dgetri_work( int matrix_order, lapack_int n, double* a,\n                                lapack_int lda, const lapack_int* ipiv,\n                                double* work, lapack_int lwork );\nlapack_int LAPACKE_cgetri_work( int matrix_order, lapack_int n,\n                                lapack_complex_float* a, lapack_int lda,\n                                const lapack_int* ipiv,\n                                lapack_complex_float* work, lapack_int lwork );\nlapack_int LAPACKE_zgetri_work( int matrix_order, lapack_int n,\n                                lapack_complex_double* a, lapack_int lda,\n                                const lapack_int* ipiv,\n                                lapack_complex_double* work, lapack_int lwork );\n\nlapack_int LAPACKE_sgetrs_work( int matrix_order, char trans, lapack_int n,\n                                lapack_int nrhs, const float* a, lapack_int lda,\n                                const lapack_int* ipiv, float* b,\n                                lapack_int ldb );\nlapack_int LAPACKE_dgetrs_work( int matrix_order, char trans, lapack_int n,\n                                lapack_int nrhs, const double* a,\n                                lapack_int lda, const lapack_int* ipiv,\n                                double* b, lapack_int ldb );\nlapack_int LAPACKE_cgetrs_work( int matrix_order, char trans, lapack_int n,\n                                lapack_int nrhs, const lapack_complex_float* a,\n                                lapack_int lda, const lapack_int* ipiv,\n                                lapack_complex_float* b, lapack_int ldb );\nlapack_int LAPACKE_zgetrs_work( int matrix_order, char trans, lapack_int n,\n                                lapack_int nrhs, const lapack_complex_double* a,\n                                lapack_int lda, const lapack_int* ipiv,\n                                lapack_complex_double* b, lapack_int ldb );\n\nlapack_int LAPACKE_sggbak_work( int matrix_order, char job, char side,\n                                lapack_int n, lapack_int ilo, lapack_int ihi,\n                                const float* lscale, const float* rscale,\n                                lapack_int m, float* v, lapack_int ldv );\nlapack_int LAPACKE_dggbak_work( int matrix_order, char job, char side,\n                                lapack_int n, lapack_int ilo, lapack_int ihi,\n                                const double* lscale, const double* rscale,\n                                lapack_int m, double* v, lapack_int ldv );\nlapack_int LAPACKE_cggbak_work( int matrix_order, char job, char side,\n                                lapack_int n, lapack_int ilo, lapack_int ihi,\n                                const float* lscale, const float* rscale,\n                                lapack_int m, lapack_complex_float* v,\n                                lapack_int ldv );\nlapack_int LAPACKE_zggbak_work( int matrix_order, char job, char side,\n                                lapack_int n, lapack_int ilo, lapack_int ihi,\n                                const double* lscale, const double* rscale,\n                                lapack_int m, lapack_complex_double* v,\n                                lapack_int ldv );\n\nlapack_int LAPACKE_sggbal_work( int matrix_order, char job, lapack_int n,\n                                float* a, lapack_int lda, float* b,\n                                lapack_int ldb, lapack_int* ilo,\n                                lapack_int* ihi, float* lscale, float* rscale,\n                                float* work );\nlapack_int LAPACKE_dggbal_work( int matrix_order, char job, lapack_int n,\n                                double* a, lapack_int lda, double* b,\n                                lapack_int ldb, lapack_int* ilo,\n                                lapack_int* ihi, double* lscale, double* rscale,\n                                double* work );\nlapack_int LAPACKE_cggbal_work( int matrix_order, char job, lapack_int n,\n                                lapack_complex_float* a, lapack_int lda,\n                                lapack_complex_float* b, lapack_int ldb,\n                                lapack_int* ilo, lapack_int* ihi, float* lscale,\n                                float* rscale, float* work );\nlapack_int LAPACKE_zggbal_work( int matrix_order, char job, lapack_int n,\n                                lapack_complex_double* a, lapack_int lda,\n                                lapack_complex_double* b, lapack_int ldb,\n                                lapack_int* ilo, lapack_int* ihi,\n                                double* lscale, double* rscale, double* work );\n\nlapack_int LAPACKE_sgges_work( int matrix_order, char jobvsl, char jobvsr,\n                               char sort, LAPACK_S_SELECT3 selctg, lapack_int n,\n                               float* a, lapack_int lda, float* b,\n                               lapack_int ldb, lapack_int* sdim, float* alphar,\n                               float* alphai, float* beta, float* vsl,\n                               lapack_int ldvsl, float* vsr, lapack_int ldvsr,\n                               float* work, lapack_int lwork,\n                               lapack_logical* bwork );\nlapack_int LAPACKE_dgges_work( int matrix_order, char jobvsl, char jobvsr,\n                               char sort, LAPACK_D_SELECT3 selctg, lapack_int n,\n                               double* a, lapack_int lda, double* b,\n                               lapack_int ldb, lapack_int* sdim, double* alphar,\n                               double* alphai, double* beta, double* vsl,\n                               lapack_int ldvsl, double* vsr, lapack_int ldvsr,\n                               double* work, lapack_int lwork,\n                               lapack_logical* bwork );\nlapack_int LAPACKE_cgges_work( int matrix_order, char jobvsl, char jobvsr,\n                               char sort, LAPACK_C_SELECT2 selctg, lapack_int n,\n                               lapack_complex_float* a, lapack_int lda,\n                               lapack_complex_float* b, lapack_int ldb,\n                               lapack_int* sdim, lapack_complex_float* alpha,\n                               lapack_complex_float* beta,\n                               lapack_complex_float* vsl, lapack_int ldvsl,\n                               lapack_complex_float* vsr, lapack_int ldvsr,\n                               lapack_complex_float* work, lapack_int lwork,\n                               float* rwork, lapack_logical* bwork );\nlapack_int LAPACKE_zgges_work( int matrix_order, char jobvsl, char jobvsr,\n                               char sort, LAPACK_Z_SELECT2 selctg, lapack_int n,\n                               lapack_complex_double* a, lapack_int lda,\n                               lapack_complex_double* b, lapack_int ldb,\n                               lapack_int* sdim, lapack_complex_double* alpha,\n                               lapack_complex_double* beta,\n                               lapack_complex_double* vsl, lapack_int ldvsl,\n                               lapack_complex_double* vsr, lapack_int ldvsr,\n                               lapack_complex_double* work, lapack_int lwork,\n                               double* rwork, lapack_logical* bwork );\n\nlapack_int LAPACKE_sggesx_work( int matrix_order, char jobvsl, char jobvsr,\n                                char sort, LAPACK_S_SELECT3 selctg, char sense,\n                                lapack_int n, float* a, lapack_int lda,\n                                float* b, lapack_int ldb, lapack_int* sdim,\n                                float* alphar, float* alphai, float* beta,\n                                float* vsl, lapack_int ldvsl, float* vsr,\n                                lapack_int ldvsr, float* rconde, float* rcondv,\n                                float* work, lapack_int lwork,\n                                lapack_int* iwork, lapack_int liwork,\n                                lapack_logical* bwork );\nlapack_int LAPACKE_dggesx_work( int matrix_order, char jobvsl, char jobvsr,\n                                char sort, LAPACK_D_SELECT3 selctg, char sense,\n                                lapack_int n, double* a, lapack_int lda,\n                                double* b, lapack_int ldb, lapack_int* sdim,\n                                double* alphar, double* alphai, double* beta,\n                                double* vsl, lapack_int ldvsl, double* vsr,\n                                lapack_int ldvsr, double* rconde,\n                                double* rcondv, double* work, lapack_int lwork,\n                                lapack_int* iwork, lapack_int liwork,\n                                lapack_logical* bwork );\nlapack_int LAPACKE_cggesx_work( int matrix_order, char jobvsl, char jobvsr,\n                                char sort, LAPACK_C_SELECT2 selctg, char sense,\n                                lapack_int n, lapack_complex_float* a,\n                                lapack_int lda, lapack_complex_float* b,\n                                lapack_int ldb, lapack_int* sdim,\n                                lapack_complex_float* alpha,\n                                lapack_complex_float* beta,\n                                lapack_complex_float* vsl, lapack_int ldvsl,\n                                lapack_complex_float* vsr, lapack_int ldvsr,\n                                float* rconde, float* rcondv,\n                                lapack_complex_float* work, lapack_int lwork,\n                                float* rwork, lapack_int* iwork,\n                                lapack_int liwork, lapack_logical* bwork );\nlapack_int LAPACKE_zggesx_work( int matrix_order, char jobvsl, char jobvsr,\n                                char sort, LAPACK_Z_SELECT2 selctg, char sense,\n                                lapack_int n, lapack_complex_double* a,\n                                lapack_int lda, lapack_complex_double* b,\n                                lapack_int ldb, lapack_int* sdim,\n                                lapack_complex_double* alpha,\n                                lapack_complex_double* beta,\n                                lapack_complex_double* vsl, lapack_int ldvsl,\n                                lapack_complex_double* vsr, lapack_int ldvsr,\n                                double* rconde, double* rcondv,\n                                lapack_complex_double* work, lapack_int lwork,\n                                double* rwork, lapack_int* iwork,\n                                lapack_int liwork, lapack_logical* bwork );\n\nlapack_int LAPACKE_sggev_work( int matrix_order, char jobvl, char jobvr,\n                               lapack_int n, float* a, lapack_int lda, float* b,\n                               lapack_int ldb, float* alphar, float* alphai,\n                               float* beta, float* vl, lapack_int ldvl,\n                               float* vr, lapack_int ldvr, float* work,\n                               lapack_int lwork );\nlapack_int LAPACKE_dggev_work( int matrix_order, char jobvl, char jobvr,\n                               lapack_int n, double* a, lapack_int lda,\n                               double* b, lapack_int ldb, double* alphar,\n                               double* alphai, double* beta, double* vl,\n                               lapack_int ldvl, double* vr, lapack_int ldvr,\n                               double* work, lapack_int lwork );\nlapack_int LAPACKE_cggev_work( int matrix_order, char jobvl, char jobvr,\n                               lapack_int n, lapack_complex_float* a,\n                               lapack_int lda, lapack_complex_float* b,\n                               lapack_int ldb, lapack_complex_float* alpha,\n                               lapack_complex_float* beta,\n                               lapack_complex_float* vl, lapack_int ldvl,\n                               lapack_complex_float* vr, lapack_int ldvr,\n                               lapack_complex_float* work, lapack_int lwork,\n                               float* rwork );\nlapack_int LAPACKE_zggev_work( int matrix_order, char jobvl, char jobvr,\n                               lapack_int n, lapack_complex_double* a,\n                               lapack_int lda, lapack_complex_double* b,\n                               lapack_int ldb, lapack_complex_double* alpha,\n                               lapack_complex_double* beta,\n                               lapack_complex_double* vl, lapack_int ldvl,\n                               lapack_complex_double* vr, lapack_int ldvr,\n                               lapack_complex_double* work, lapack_int lwork,\n                               double* rwork );\n\nlapack_int LAPACKE_sggevx_work( int matrix_order, char balanc, char jobvl,\n                                char jobvr, char sense, lapack_int n, float* a,\n                                lapack_int lda, float* b, lapack_int ldb,\n                                float* alphar, float* alphai, float* beta,\n                                float* vl, lapack_int ldvl, float* vr,\n                                lapack_int ldvr, lapack_int* ilo,\n                                lapack_int* ihi, float* lscale, float* rscale,\n                                float* abnrm, float* bbnrm, float* rconde,\n                                float* rcondv, float* work, lapack_int lwork,\n                                lapack_int* iwork, lapack_logical* bwork );\nlapack_int LAPACKE_dggevx_work( int matrix_order, char balanc, char jobvl,\n                                char jobvr, char sense, lapack_int n, double* a,\n                                lapack_int lda, double* b, lapack_int ldb,\n                                double* alphar, double* alphai, double* beta,\n                                double* vl, lapack_int ldvl, double* vr,\n                                lapack_int ldvr, lapack_int* ilo,\n                                lapack_int* ihi, double* lscale, double* rscale,\n                                double* abnrm, double* bbnrm, double* rconde,\n                                double* rcondv, double* work, lapack_int lwork,\n                                lapack_int* iwork, lapack_logical* bwork );\nlapack_int LAPACKE_cggevx_work( int matrix_order, char balanc, char jobvl,\n                                char jobvr, char sense, lapack_int n,\n                                lapack_complex_float* a, lapack_int lda,\n                                lapack_complex_float* b, lapack_int ldb,\n                                lapack_complex_float* alpha,\n                                lapack_complex_float* beta,\n                                lapack_complex_float* vl, lapack_int ldvl,\n                                lapack_complex_float* vr, lapack_int ldvr,\n                                lapack_int* ilo, lapack_int* ihi, float* lscale,\n                                float* rscale, float* abnrm, float* bbnrm,\n                                float* rconde, float* rcondv,\n                                lapack_complex_float* work, lapack_int lwork,\n                                float* rwork, lapack_int* iwork,\n                                lapack_logical* bwork );\nlapack_int LAPACKE_zggevx_work( int matrix_order, char balanc, char jobvl,\n                                char jobvr, char sense, lapack_int n,\n                                lapack_complex_double* a, lapack_int lda,\n                                lapack_complex_double* b, lapack_int ldb,\n                                lapack_complex_double* alpha,\n                                lapack_complex_double* beta,\n                                lapack_complex_double* vl, lapack_int ldvl,\n                                lapack_complex_double* vr, lapack_int ldvr,\n                                lapack_int* ilo, lapack_int* ihi,\n                                double* lscale, double* rscale, double* abnrm,\n                                double* bbnrm, double* rconde, double* rcondv,\n                                lapack_complex_double* work, lapack_int lwork,\n                                double* rwork, lapack_int* iwork,\n                                lapack_logical* bwork );\n\nlapack_int LAPACKE_sggglm_work( int matrix_order, lapack_int n, lapack_int m,\n                                lapack_int p, float* a, lapack_int lda,\n                                float* b, lapack_int ldb, float* d, float* x,\n                                float* y, float* work, lapack_int lwork );\nlapack_int LAPACKE_dggglm_work( int matrix_order, lapack_int n, lapack_int m,\n                                lapack_int p, double* a, lapack_int lda,\n                                double* b, lapack_int ldb, double* d, double* x,\n                                double* y, double* work, lapack_int lwork );\nlapack_int LAPACKE_cggglm_work( int matrix_order, lapack_int n, lapack_int m,\n                                lapack_int p, lapack_complex_float* a,\n                                lapack_int lda, lapack_complex_float* b,\n                                lapack_int ldb, lapack_complex_float* d,\n                                lapack_complex_float* x,\n                                lapack_complex_float* y,\n                                lapack_complex_float* work, lapack_int lwork );\nlapack_int LAPACKE_zggglm_work( int matrix_order, lapack_int n, lapack_int m,\n                                lapack_int p, lapack_complex_double* a,\n                                lapack_int lda, lapack_complex_double* b,\n                                lapack_int ldb, lapack_complex_double* d,\n                                lapack_complex_double* x,\n                                lapack_complex_double* y,\n                                lapack_complex_double* work, lapack_int lwork );\n\nlapack_int LAPACKE_sgghrd_work( int matrix_order, char compq, char compz,\n                                lapack_int n, lapack_int ilo, lapack_int ihi,\n                                float* a, lapack_int lda, float* b,\n                                lapack_int ldb, float* q, lapack_int ldq,\n                                float* z, lapack_int ldz );\nlapack_int LAPACKE_dgghrd_work( int matrix_order, char compq, char compz,\n                                lapack_int n, lapack_int ilo, lapack_int ihi,\n                                double* a, lapack_int lda, double* b,\n                                lapack_int ldb, double* q, lapack_int ldq,\n                                double* z, lapack_int ldz );\nlapack_int LAPACKE_cgghrd_work( int matrix_order, char compq, char compz,\n                                lapack_int n, lapack_int ilo, lapack_int ihi,\n                                lapack_complex_float* a, lapack_int lda,\n                                lapack_complex_float* b, lapack_int ldb,\n                                lapack_complex_float* q, lapack_int ldq,\n                                lapack_complex_float* z, lapack_int ldz );\nlapack_int LAPACKE_zgghrd_work( int matrix_order, char compq, char compz,\n                                lapack_int n, lapack_int ilo, lapack_int ihi,\n                                lapack_complex_double* a, lapack_int lda,\n                                lapack_complex_double* b, lapack_int ldb,\n                                lapack_complex_double* q, lapack_int ldq,\n                                lapack_complex_double* z, lapack_int ldz );\n\nlapack_int LAPACKE_sgglse_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int p, float* a, lapack_int lda,\n                                float* b, lapack_int ldb, float* c, float* d,\n                                float* x, float* work, lapack_int lwork );\nlapack_int LAPACKE_dgglse_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int p, double* a, lapack_int lda,\n                                double* b, lapack_int ldb, double* c, double* d,\n                                double* x, double* work, lapack_int lwork );\nlapack_int LAPACKE_cgglse_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int p, lapack_complex_float* a,\n                                lapack_int lda, lapack_complex_float* b,\n                                lapack_int ldb, lapack_complex_float* c,\n                                lapack_complex_float* d,\n                                lapack_complex_float* x,\n                                lapack_complex_float* work, lapack_int lwork );\nlapack_int LAPACKE_zgglse_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int p, lapack_complex_double* a,\n                                lapack_int lda, lapack_complex_double* b,\n                                lapack_int ldb, lapack_complex_double* c,\n                                lapack_complex_double* d,\n                                lapack_complex_double* x,\n                                lapack_complex_double* work, lapack_int lwork );\n\nlapack_int LAPACKE_sggqrf_work( int matrix_order, lapack_int n, lapack_int m,\n                                lapack_int p, float* a, lapack_int lda,\n                                float* taua, float* b, lapack_int ldb,\n                                float* taub, float* work, lapack_int lwork );\nlapack_int LAPACKE_dggqrf_work( int matrix_order, lapack_int n, lapack_int m,\n                                lapack_int p, double* a, lapack_int lda,\n                                double* taua, double* b, lapack_int ldb,\n                                double* taub, double* work, lapack_int lwork );\nlapack_int LAPACKE_cggqrf_work( int matrix_order, lapack_int n, lapack_int m,\n                                lapack_int p, lapack_complex_float* a,\n                                lapack_int lda, lapack_complex_float* taua,\n                                lapack_complex_float* b, lapack_int ldb,\n                                lapack_complex_float* taub,\n                                lapack_complex_float* work, lapack_int lwork );\nlapack_int LAPACKE_zggqrf_work( int matrix_order, lapack_int n, lapack_int m,\n                                lapack_int p, lapack_complex_double* a,\n                                lapack_int lda, lapack_complex_double* taua,\n                                lapack_complex_double* b, lapack_int ldb,\n                                lapack_complex_double* taub,\n                                lapack_complex_double* work, lapack_int lwork );\n\nlapack_int LAPACKE_sggrqf_work( int matrix_order, lapack_int m, lapack_int p,\n                                lapack_int n, float* a, lapack_int lda,\n                                float* taua, float* b, lapack_int ldb,\n                                float* taub, float* work, lapack_int lwork );\nlapack_int LAPACKE_dggrqf_work( int matrix_order, lapack_int m, lapack_int p,\n                                lapack_int n, double* a, lapack_int lda,\n                                double* taua, double* b, lapack_int ldb,\n                                double* taub, double* work, lapack_int lwork );\nlapack_int LAPACKE_cggrqf_work( int matrix_order, lapack_int m, lapack_int p,\n                                lapack_int n, lapack_complex_float* a,\n                                lapack_int lda, lapack_complex_float* taua,\n                                lapack_complex_float* b, lapack_int ldb,\n                                lapack_complex_float* taub,\n                                lapack_complex_float* work, lapack_int lwork );\nlapack_int LAPACKE_zggrqf_work( int matrix_order, lapack_int m, lapack_int p,\n                                lapack_int n, lapack_complex_double* a,\n                                lapack_int lda, lapack_complex_double* taua,\n                                lapack_complex_double* b, lapack_int ldb,\n                                lapack_complex_double* taub,\n                                lapack_complex_double* work, lapack_int lwork );\n\nlapack_int LAPACKE_sggsvd_work( int matrix_order, char jobu, char jobv,\n                                char jobq, lapack_int m, lapack_int n,\n                                lapack_int p, lapack_int* k, lapack_int* l,\n                                float* a, lapack_int lda, float* b,\n                                lapack_int ldb, float* alpha, float* beta,\n                                float* u, lapack_int ldu, float* v,\n                                lapack_int ldv, float* q, lapack_int ldq,\n                                float* work, lapack_int* iwork );\nlapack_int LAPACKE_dggsvd_work( int matrix_order, char jobu, char jobv,\n                                char jobq, lapack_int m, lapack_int n,\n                                lapack_int p, lapack_int* k, lapack_int* l,\n                                double* a, lapack_int lda, double* b,\n                                lapack_int ldb, double* alpha, double* beta,\n                                double* u, lapack_int ldu, double* v,\n                                lapack_int ldv, double* q, lapack_int ldq,\n                                double* work, lapack_int* iwork );\nlapack_int LAPACKE_cggsvd_work( int matrix_order, char jobu, char jobv,\n                                char jobq, lapack_int m, lapack_int n,\n                                lapack_int p, lapack_int* k, lapack_int* l,\n                                lapack_complex_float* a, lapack_int lda,\n                                lapack_complex_float* b, lapack_int ldb,\n                                float* alpha, float* beta,\n                                lapack_complex_float* u, lapack_int ldu,\n                                lapack_complex_float* v, lapack_int ldv,\n                                lapack_complex_float* q, lapack_int ldq,\n                                lapack_complex_float* work, float* rwork,\n                                lapack_int* iwork );\nlapack_int LAPACKE_zggsvd_work( int matrix_order, char jobu, char jobv,\n                                char jobq, lapack_int m, lapack_int n,\n                                lapack_int p, lapack_int* k, lapack_int* l,\n                                lapack_complex_double* a, lapack_int lda,\n                                lapack_complex_double* b, lapack_int ldb,\n                                double* alpha, double* beta,\n                                lapack_complex_double* u, lapack_int ldu,\n                                lapack_complex_double* v, lapack_int ldv,\n                                lapack_complex_double* q, lapack_int ldq,\n                                lapack_complex_double* work, double* rwork,\n                                lapack_int* iwork );\n\nlapack_int LAPACKE_sggsvp_work( int matrix_order, char jobu, char jobv,\n                                char jobq, lapack_int m, lapack_int p,\n                                lapack_int n, float* a, lapack_int lda,\n                                float* b, lapack_int ldb, float tola,\n                                float tolb, lapack_int* k, lapack_int* l,\n                                float* u, lapack_int ldu, float* v,\n                                lapack_int ldv, float* q, lapack_int ldq,\n                                lapack_int* iwork, float* tau, float* work );\nlapack_int LAPACKE_dggsvp_work( int matrix_order, char jobu, char jobv,\n                                char jobq, lapack_int m, lapack_int p,\n                                lapack_int n, double* a, lapack_int lda,\n                                double* b, lapack_int ldb, double tola,\n                                double tolb, lapack_int* k, lapack_int* l,\n                                double* u, lapack_int ldu, double* v,\n                                lapack_int ldv, double* q, lapack_int ldq,\n                                lapack_int* iwork, double* tau, double* work );\nlapack_int LAPACKE_cggsvp_work( int matrix_order, char jobu, char jobv,\n                                char jobq, lapack_int m, lapack_int p,\n                                lapack_int n, lapack_complex_float* a,\n                                lapack_int lda, lapack_complex_float* b,\n                                lapack_int ldb, float tola, float tolb,\n                                lapack_int* k, lapack_int* l,\n                                lapack_complex_float* u, lapack_int ldu,\n                                lapack_complex_float* v, lapack_int ldv,\n                                lapack_complex_float* q, lapack_int ldq,\n                                lapack_int* iwork, float* rwork,\n                                lapack_complex_float* tau,\n                                lapack_complex_float* work );\nlapack_int LAPACKE_zggsvp_work( int matrix_order, char jobu, char jobv,\n                                char jobq, lapack_int m, lapack_int p,\n                                lapack_int n, lapack_complex_double* a,\n                                lapack_int lda, lapack_complex_double* b,\n                                lapack_int ldb, double tola, double tolb,\n                                lapack_int* k, lapack_int* l,\n                                lapack_complex_double* u, lapack_int ldu,\n                                lapack_complex_double* v, lapack_int ldv,\n                                lapack_complex_double* q, lapack_int ldq,\n                                lapack_int* iwork, double* rwork,\n                                lapack_complex_double* tau,\n                                lapack_complex_double* work );\n\nlapack_int LAPACKE_sgtcon_work( char norm, lapack_int n, const float* dl,\n                                const float* d, const float* du,\n                                const float* du2, const lapack_int* ipiv,\n                                float anorm, float* rcond, float* work,\n                                lapack_int* iwork );\nlapack_int LAPACKE_dgtcon_work( char norm, lapack_int n, const double* dl,\n                                const double* d, const double* du,\n                                const double* du2, const lapack_int* ipiv,\n                                double anorm, double* rcond, double* work,\n                                lapack_int* iwork );\nlapack_int LAPACKE_cgtcon_work( char norm, lapack_int n,\n                                const lapack_complex_float* dl,\n                                const lapack_complex_float* d,\n                                const lapack_complex_float* du,\n                                const lapack_complex_float* du2,\n                                const lapack_int* ipiv, float anorm,\n                                float* rcond, lapack_complex_float* work );\nlapack_int LAPACKE_zgtcon_work( char norm, lapack_int n,\n                                const lapack_complex_double* dl,\n                                const lapack_complex_double* d,\n                                const lapack_complex_double* du,\n                                const lapack_complex_double* du2,\n                                const lapack_int* ipiv, double anorm,\n                                double* rcond, lapack_complex_double* work );\n\nlapack_int LAPACKE_sgtrfs_work( int matrix_order, char trans, lapack_int n,\n                                lapack_int nrhs, const float* dl,\n                                const float* d, const float* du,\n                                const float* dlf, const float* df,\n                                const float* duf, const float* du2,\n                                const lapack_int* ipiv, const float* b,\n                                lapack_int ldb, float* x, lapack_int ldx,\n                                float* ferr, float* berr, float* work,\n                                lapack_int* iwork );\nlapack_int LAPACKE_dgtrfs_work( int matrix_order, char trans, lapack_int n,\n                                lapack_int nrhs, const double* dl,\n                                const double* d, const double* du,\n                                const double* dlf, const double* df,\n                                const double* duf, const double* du2,\n                                const lapack_int* ipiv, const double* b,\n                                lapack_int ldb, double* x, lapack_int ldx,\n                                double* ferr, double* berr, double* work,\n                                lapack_int* iwork );\nlapack_int LAPACKE_cgtrfs_work( int matrix_order, char trans, lapack_int n,\n                                lapack_int nrhs, const lapack_complex_float* dl,\n                                const lapack_complex_float* d,\n                                const lapack_complex_float* du,\n                                const lapack_complex_float* dlf,\n                                const lapack_complex_float* df,\n                                const lapack_complex_float* duf,\n                                const lapack_complex_float* du2,\n                                const lapack_int* ipiv,\n                                const lapack_complex_float* b, lapack_int ldb,\n                                lapack_complex_float* x, lapack_int ldx,\n                                float* ferr, float* berr,\n                                lapack_complex_float* work, float* rwork );\nlapack_int LAPACKE_zgtrfs_work( int matrix_order, char trans, lapack_int n,\n                                lapack_int nrhs,\n                                const lapack_complex_double* dl,\n                                const lapack_complex_double* d,\n                                const lapack_complex_double* du,\n                                const lapack_complex_double* dlf,\n                                const lapack_complex_double* df,\n                                const lapack_complex_double* duf,\n                                const lapack_complex_double* du2,\n                                const lapack_int* ipiv,\n                                const lapack_complex_double* b, lapack_int ldb,\n                                lapack_complex_double* x, lapack_int ldx,\n                                double* ferr, double* berr,\n                                lapack_complex_double* work, double* rwork );\n\nlapack_int LAPACKE_sgtsv_work( int matrix_order, lapack_int n, lapack_int nrhs,\n                               float* dl, float* d, float* du, float* b,\n                               lapack_int ldb );\nlapack_int LAPACKE_dgtsv_work( int matrix_order, lapack_int n, lapack_int nrhs,\n                               double* dl, double* d, double* du, double* b,\n                               lapack_int ldb );\nlapack_int LAPACKE_cgtsv_work( int matrix_order, lapack_int n, lapack_int nrhs,\n                               lapack_complex_float* dl,\n                               lapack_complex_float* d,\n                               lapack_complex_float* du,\n                               lapack_complex_float* b, lapack_int ldb );\nlapack_int LAPACKE_zgtsv_work( int matrix_order, lapack_int n, lapack_int nrhs,\n                               lapack_complex_double* dl,\n                               lapack_complex_double* d,\n                               lapack_complex_double* du,\n                               lapack_complex_double* b, lapack_int ldb );\n\nlapack_int LAPACKE_sgtsvx_work( int matrix_order, char fact, char trans,\n                                lapack_int n, lapack_int nrhs, const float* dl,\n                                const float* d, const float* du, float* dlf,\n                                float* df, float* duf, float* du2,\n                                lapack_int* ipiv, const float* b,\n                                lapack_int ldb, float* x, lapack_int ldx,\n                                float* rcond, float* ferr, float* berr,\n                                float* work, lapack_int* iwork );\nlapack_int LAPACKE_dgtsvx_work( int matrix_order, char fact, char trans,\n                                lapack_int n, lapack_int nrhs, const double* dl,\n                                const double* d, const double* du, double* dlf,\n                                double* df, double* duf, double* du2,\n                                lapack_int* ipiv, const double* b,\n                                lapack_int ldb, double* x, lapack_int ldx,\n                                double* rcond, double* ferr, double* berr,\n                                double* work, lapack_int* iwork );\nlapack_int LAPACKE_cgtsvx_work( int matrix_order, char fact, char trans,\n                                lapack_int n, lapack_int nrhs,\n                                const lapack_complex_float* dl,\n                                const lapack_complex_float* d,\n                                const lapack_complex_float* du,\n                                lapack_complex_float* dlf,\n                                lapack_complex_float* df,\n                                lapack_complex_float* duf,\n                                lapack_complex_float* du2, lapack_int* ipiv,\n                                const lapack_complex_float* b, lapack_int ldb,\n                                lapack_complex_float* x, lapack_int ldx,\n                                float* rcond, float* ferr, float* berr,\n                                lapack_complex_float* work, float* rwork );\nlapack_int LAPACKE_zgtsvx_work( int matrix_order, char fact, char trans,\n                                lapack_int n, lapack_int nrhs,\n                                const lapack_complex_double* dl,\n                                const lapack_complex_double* d,\n                                const lapack_complex_double* du,\n                                lapack_complex_double* dlf,\n                                lapack_complex_double* df,\n                                lapack_complex_double* duf,\n                                lapack_complex_double* du2, lapack_int* ipiv,\n                                const lapack_complex_double* b, lapack_int ldb,\n                                lapack_complex_double* x, lapack_int ldx,\n                                double* rcond, double* ferr, double* berr,\n                                lapack_complex_double* work, double* rwork );\n\nlapack_int LAPACKE_sgttrf_work( lapack_int n, float* dl, float* d, float* du,\n                                float* du2, lapack_int* ipiv );\nlapack_int LAPACKE_dgttrf_work( lapack_int n, double* dl, double* d, double* du,\n                                double* du2, lapack_int* ipiv );\nlapack_int LAPACKE_cgttrf_work( lapack_int n, lapack_complex_float* dl,\n                                lapack_complex_float* d,\n                                lapack_complex_float* du,\n                                lapack_complex_float* du2, lapack_int* ipiv );\nlapack_int LAPACKE_zgttrf_work( lapack_int n, lapack_complex_double* dl,\n                                lapack_complex_double* d,\n                                lapack_complex_double* du,\n                                lapack_complex_double* du2, lapack_int* ipiv );\n\nlapack_int LAPACKE_sgttrs_work( int matrix_order, char trans, lapack_int n,\n                                lapack_int nrhs, const float* dl,\n                                const float* d, const float* du,\n                                const float* du2, const lapack_int* ipiv,\n                                float* b, lapack_int ldb );\nlapack_int LAPACKE_dgttrs_work( int matrix_order, char trans, lapack_int n,\n                                lapack_int nrhs, const double* dl,\n                                const double* d, const double* du,\n                                const double* du2, const lapack_int* ipiv,\n                                double* b, lapack_int ldb );\nlapack_int LAPACKE_cgttrs_work( int matrix_order, char trans, lapack_int n,\n                                lapack_int nrhs, const lapack_complex_float* dl,\n                                const lapack_complex_float* d,\n                                const lapack_complex_float* du,\n                                const lapack_complex_float* du2,\n                                const lapack_int* ipiv, lapack_complex_float* b,\n                                lapack_int ldb );\nlapack_int LAPACKE_zgttrs_work( int matrix_order, char trans, lapack_int n,\n                                lapack_int nrhs,\n                                const lapack_complex_double* dl,\n                                const lapack_complex_double* d,\n                                const lapack_complex_double* du,\n                                const lapack_complex_double* du2,\n                                const lapack_int* ipiv,\n                                lapack_complex_double* b, lapack_int ldb );\n\nlapack_int LAPACKE_chbev_work( int matrix_order, char jobz, char uplo,\n                               lapack_int n, lapack_int kd,\n                               lapack_complex_float* ab, lapack_int ldab,\n                               float* w, lapack_complex_float* z,\n                               lapack_int ldz, lapack_complex_float* work,\n                               float* rwork );\nlapack_int LAPACKE_zhbev_work( int matrix_order, char jobz, char uplo,\n                               lapack_int n, lapack_int kd,\n                               lapack_complex_double* ab, lapack_int ldab,\n                               double* w, lapack_complex_double* z,\n                               lapack_int ldz, lapack_complex_double* work,\n                               double* rwork );\n\nlapack_int LAPACKE_chbevd_work( int matrix_order, char jobz, char uplo,\n                                lapack_int n, lapack_int kd,\n                                lapack_complex_float* ab, lapack_int ldab,\n                                float* w, lapack_complex_float* z,\n                                lapack_int ldz, lapack_complex_float* work,\n                                lapack_int lwork, float* rwork,\n                                lapack_int lrwork, lapack_int* iwork,\n                                lapack_int liwork );\nlapack_int LAPACKE_zhbevd_work( int matrix_order, char jobz, char uplo,\n                                lapack_int n, lapack_int kd,\n                                lapack_complex_double* ab, lapack_int ldab,\n                                double* w, lapack_complex_double* z,\n                                lapack_int ldz, lapack_complex_double* work,\n                                lapack_int lwork, double* rwork,\n                                lapack_int lrwork, lapack_int* iwork,\n                                lapack_int liwork );\n\nlapack_int LAPACKE_chbevx_work( int matrix_order, char jobz, char range,\n                                char uplo, lapack_int n, lapack_int kd,\n                                lapack_complex_float* ab, lapack_int ldab,\n                                lapack_complex_float* q, lapack_int ldq,\n                                float vl, float vu, lapack_int il,\n                                lapack_int iu, float abstol, lapack_int* m,\n                                float* w, lapack_complex_float* z,\n                                lapack_int ldz, lapack_complex_float* work,\n                                float* rwork, lapack_int* iwork,\n                                lapack_int* ifail );\nlapack_int LAPACKE_zhbevx_work( int matrix_order, char jobz, char range,\n                                char uplo, lapack_int n, lapack_int kd,\n                                lapack_complex_double* ab, lapack_int ldab,\n                                lapack_complex_double* q, lapack_int ldq,\n                                double vl, double vu, lapack_int il,\n                                lapack_int iu, double abstol, lapack_int* m,\n                                double* w, lapack_complex_double* z,\n                                lapack_int ldz, lapack_complex_double* work,\n                                double* rwork, lapack_int* iwork,\n                                lapack_int* ifail );\n\nlapack_int LAPACKE_chbgst_work( int matrix_order, char vect, char uplo,\n                                lapack_int n, lapack_int ka, lapack_int kb,\n                                lapack_complex_float* ab, lapack_int ldab,\n                                const lapack_complex_float* bb, lapack_int ldbb,\n                                lapack_complex_float* x, lapack_int ldx,\n                                lapack_complex_float* work, float* rwork );\nlapack_int LAPACKE_zhbgst_work( int matrix_order, char vect, char uplo,\n                                lapack_int n, lapack_int ka, lapack_int kb,\n                                lapack_complex_double* ab, lapack_int ldab,\n                                const lapack_complex_double* bb,\n                                lapack_int ldbb, lapack_complex_double* x,\n                                lapack_int ldx, lapack_complex_double* work,\n                                double* rwork );\n\nlapack_int LAPACKE_chbgv_work( int matrix_order, char jobz, char uplo,\n                               lapack_int n, lapack_int ka, lapack_int kb,\n                               lapack_complex_float* ab, lapack_int ldab,\n                               lapack_complex_float* bb, lapack_int ldbb,\n                               float* w, lapack_complex_float* z,\n                               lapack_int ldz, lapack_complex_float* work,\n                               float* rwork );\nlapack_int LAPACKE_zhbgv_work( int matrix_order, char jobz, char uplo,\n                               lapack_int n, lapack_int ka, lapack_int kb,\n                               lapack_complex_double* ab, lapack_int ldab,\n                               lapack_complex_double* bb, lapack_int ldbb,\n                               double* w, lapack_complex_double* z,\n                               lapack_int ldz, lapack_complex_double* work,\n                               double* rwork );\n\nlapack_int LAPACKE_chbgvd_work( int matrix_order, char jobz, char uplo,\n                                lapack_int n, lapack_int ka, lapack_int kb,\n                                lapack_complex_float* ab, lapack_int ldab,\n                                lapack_complex_float* bb, lapack_int ldbb,\n                                float* w, lapack_complex_float* z,\n                                lapack_int ldz, lapack_complex_float* work,\n                                lapack_int lwork, float* rwork,\n                                lapack_int lrwork, lapack_int* iwork,\n                                lapack_int liwork );\nlapack_int LAPACKE_zhbgvd_work( int matrix_order, char jobz, char uplo,\n                                lapack_int n, lapack_int ka, lapack_int kb,\n                                lapack_complex_double* ab, lapack_int ldab,\n                                lapack_complex_double* bb, lapack_int ldbb,\n                                double* w, lapack_complex_double* z,\n                                lapack_int ldz, lapack_complex_double* work,\n                                lapack_int lwork, double* rwork,\n                                lapack_int lrwork, lapack_int* iwork,\n                                lapack_int liwork );\n\nlapack_int LAPACKE_chbgvx_work( int matrix_order, char jobz, char range,\n                                char uplo, lapack_int n, lapack_int ka,\n                                lapack_int kb, lapack_complex_float* ab,\n                                lapack_int ldab, lapack_complex_float* bb,\n                                lapack_int ldbb, lapack_complex_float* q,\n                                lapack_int ldq, float vl, float vu,\n                                lapack_int il, lapack_int iu, float abstol,\n                                lapack_int* m, float* w,\n                                lapack_complex_float* z, lapack_int ldz,\n                                lapack_complex_float* work, float* rwork,\n                                lapack_int* iwork, lapack_int* ifail );\nlapack_int LAPACKE_zhbgvx_work( int matrix_order, char jobz, char range,\n                                char uplo, lapack_int n, lapack_int ka,\n                                lapack_int kb, lapack_complex_double* ab,\n                                lapack_int ldab, lapack_complex_double* bb,\n                                lapack_int ldbb, lapack_complex_double* q,\n                                lapack_int ldq, double vl, double vu,\n                                lapack_int il, lapack_int iu, double abstol,\n                                lapack_int* m, double* w,\n                                lapack_complex_double* z, lapack_int ldz,\n                                lapack_complex_double* work, double* rwork,\n                                lapack_int* iwork, lapack_int* ifail );\n\nlapack_int LAPACKE_chbtrd_work( int matrix_order, char vect, char uplo,\n                                lapack_int n, lapack_int kd,\n                                lapack_complex_float* ab, lapack_int ldab,\n                                float* d, float* e, lapack_complex_float* q,\n                                lapack_int ldq, lapack_complex_float* work );\nlapack_int LAPACKE_zhbtrd_work( int matrix_order, char vect, char uplo,\n                                lapack_int n, lapack_int kd,\n                                lapack_complex_double* ab, lapack_int ldab,\n                                double* d, double* e, lapack_complex_double* q,\n                                lapack_int ldq, lapack_complex_double* work );\n\nlapack_int LAPACKE_checon_work( int matrix_order, char uplo, lapack_int n,\n                                const lapack_complex_float* a, lapack_int lda,\n                                const lapack_int* ipiv, float anorm,\n                                float* rcond, lapack_complex_float* work );\nlapack_int LAPACKE_zhecon_work( int matrix_order, char uplo, lapack_int n,\n                                const lapack_complex_double* a, lapack_int lda,\n                                const lapack_int* ipiv, double anorm,\n                                double* rcond, lapack_complex_double* work );\n\nlapack_int LAPACKE_cheequb_work( int matrix_order, char uplo, lapack_int n,\n                                 const lapack_complex_float* a, lapack_int lda,\n                                 float* s, float* scond, float* amax,\n                                 lapack_complex_float* work );\nlapack_int LAPACKE_zheequb_work( int matrix_order, char uplo, lapack_int n,\n                                 const lapack_complex_double* a, lapack_int lda,\n                                 double* s, double* scond, double* amax,\n                                 lapack_complex_double* work );\n\nlapack_int LAPACKE_cheev_work( int matrix_order, char jobz, char uplo,\n                               lapack_int n, lapack_complex_float* a,\n                               lapack_int lda, float* w,\n                               lapack_complex_float* work, lapack_int lwork,\n                               float* rwork );\nlapack_int LAPACKE_zheev_work( int matrix_order, char jobz, char uplo,\n                               lapack_int n, lapack_complex_double* a,\n                               lapack_int lda, double* w,\n                               lapack_complex_double* work, lapack_int lwork,\n                               double* rwork );\n\nlapack_int LAPACKE_cheevd_work( int matrix_order, char jobz, char uplo,\n                                lapack_int n, lapack_complex_float* a,\n                                lapack_int lda, float* w,\n                                lapack_complex_float* work, lapack_int lwork,\n                                float* rwork, lapack_int lrwork,\n                                lapack_int* iwork, lapack_int liwork );\nlapack_int LAPACKE_zheevd_work( int matrix_order, char jobz, char uplo,\n                                lapack_int n, lapack_complex_double* a,\n                                lapack_int lda, double* w,\n                                lapack_complex_double* work, lapack_int lwork,\n                                double* rwork, lapack_int lrwork,\n                                lapack_int* iwork, lapack_int liwork );\n\nlapack_int LAPACKE_cheevr_work( int matrix_order, char jobz, char range,\n                                char uplo, lapack_int n,\n                                lapack_complex_float* a, lapack_int lda,\n                                float vl, float vu, lapack_int il,\n                                lapack_int iu, float abstol, lapack_int* m,\n                                float* w, lapack_complex_float* z,\n                                lapack_int ldz, lapack_int* isuppz,\n                                lapack_complex_float* work, lapack_int lwork,\n                                float* rwork, lapack_int lrwork,\n                                lapack_int* iwork, lapack_int liwork );\nlapack_int LAPACKE_zheevr_work( int matrix_order, char jobz, char range,\n                                char uplo, lapack_int n,\n                                lapack_complex_double* a, lapack_int lda,\n                                double vl, double vu, lapack_int il,\n                                lapack_int iu, double abstol, lapack_int* m,\n                                double* w, lapack_complex_double* z,\n                                lapack_int ldz, lapack_int* isuppz,\n                                lapack_complex_double* work, lapack_int lwork,\n                                double* rwork, lapack_int lrwork,\n                                lapack_int* iwork, lapack_int liwork );\n\nlapack_int LAPACKE_cheevx_work( int matrix_order, char jobz, char range,\n                                char uplo, lapack_int n,\n                                lapack_complex_float* a, lapack_int lda,\n                                float vl, float vu, lapack_int il,\n                                lapack_int iu, float abstol, lapack_int* m,\n                                float* w, lapack_complex_float* z,\n                                lapack_int ldz, lapack_complex_float* work,\n                                lapack_int lwork, float* rwork,\n                                lapack_int* iwork, lapack_int* ifail );\nlapack_int LAPACKE_zheevx_work( int matrix_order, char jobz, char range,\n                                char uplo, lapack_int n,\n                                lapack_complex_double* a, lapack_int lda,\n                                double vl, double vu, lapack_int il,\n                                lapack_int iu, double abstol, lapack_int* m,\n                                double* w, lapack_complex_double* z,\n                                lapack_int ldz, lapack_complex_double* work,\n                                lapack_int lwork, double* rwork,\n                                lapack_int* iwork, lapack_int* ifail );\n\nlapack_int LAPACKE_chegst_work( int matrix_order, lapack_int itype, char uplo,\n                                lapack_int n, lapack_complex_float* a,\n                                lapack_int lda, const lapack_complex_float* b,\n                                lapack_int ldb );\nlapack_int LAPACKE_zhegst_work( int matrix_order, lapack_int itype, char uplo,\n                                lapack_int n, lapack_complex_double* a,\n                                lapack_int lda, const lapack_complex_double* b,\n                                lapack_int ldb );\n\nlapack_int LAPACKE_chegv_work( int matrix_order, lapack_int itype, char jobz,\n                               char uplo, lapack_int n, lapack_complex_float* a,\n                               lapack_int lda, lapack_complex_float* b,\n                               lapack_int ldb, float* w,\n                               lapack_complex_float* work, lapack_int lwork,\n                               float* rwork );\nlapack_int LAPACKE_zhegv_work( int matrix_order, lapack_int itype, char jobz,\n                               char uplo, lapack_int n,\n                               lapack_complex_double* a, lapack_int lda,\n                               lapack_complex_double* b, lapack_int ldb,\n                               double* w, lapack_complex_double* work,\n                               lapack_int lwork, double* rwork );\n\nlapack_int LAPACKE_chegvd_work( int matrix_order, lapack_int itype, char jobz,\n                                char uplo, lapack_int n,\n                                lapack_complex_float* a, lapack_int lda,\n                                lapack_complex_float* b, lapack_int ldb,\n                                float* w, lapack_complex_float* work,\n                                lapack_int lwork, float* rwork,\n                                lapack_int lrwork, lapack_int* iwork,\n                                lapack_int liwork );\nlapack_int LAPACKE_zhegvd_work( int matrix_order, lapack_int itype, char jobz,\n                                char uplo, lapack_int n,\n                                lapack_complex_double* a, lapack_int lda,\n                                lapack_complex_double* b, lapack_int ldb,\n                                double* w, lapack_complex_double* work,\n                                lapack_int lwork, double* rwork,\n                                lapack_int lrwork, lapack_int* iwork,\n                                lapack_int liwork );\n\nlapack_int LAPACKE_chegvx_work( int matrix_order, lapack_int itype, char jobz,\n                                char range, char uplo, lapack_int n,\n                                lapack_complex_float* a, lapack_int lda,\n                                lapack_complex_float* b, lapack_int ldb,\n                                float vl, float vu, lapack_int il,\n                                lapack_int iu, float abstol, lapack_int* m,\n                                float* w, lapack_complex_float* z,\n                                lapack_int ldz, lapack_complex_float* work,\n                                lapack_int lwork, float* rwork,\n                                lapack_int* iwork, lapack_int* ifail );\nlapack_int LAPACKE_zhegvx_work( int matrix_order, lapack_int itype, char jobz,\n                                char range, char uplo, lapack_int n,\n                                lapack_complex_double* a, lapack_int lda,\n                                lapack_complex_double* b, lapack_int ldb,\n                                double vl, double vu, lapack_int il,\n                                lapack_int iu, double abstol, lapack_int* m,\n                                double* w, lapack_complex_double* z,\n                                lapack_int ldz, lapack_complex_double* work,\n                                lapack_int lwork, double* rwork,\n                                lapack_int* iwork, lapack_int* ifail );\n\nlapack_int LAPACKE_cherfs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, const lapack_complex_float* a,\n                                lapack_int lda, const lapack_complex_float* af,\n                                lapack_int ldaf, const lapack_int* ipiv,\n                                const lapack_complex_float* b, lapack_int ldb,\n                                lapack_complex_float* x, lapack_int ldx,\n                                float* ferr, float* berr,\n                                lapack_complex_float* work, float* rwork );\nlapack_int LAPACKE_zherfs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, const lapack_complex_double* a,\n                                lapack_int lda, const lapack_complex_double* af,\n                                lapack_int ldaf, const lapack_int* ipiv,\n                                const lapack_complex_double* b, lapack_int ldb,\n                                lapack_complex_double* x, lapack_int ldx,\n                                double* ferr, double* berr,\n                                lapack_complex_double* work, double* rwork );\n\nlapack_int LAPACKE_cherfsx_work( int matrix_order, char uplo, char equed,\n                                 lapack_int n, lapack_int nrhs,\n                                 const lapack_complex_float* a, lapack_int lda,\n                                 const lapack_complex_float* af,\n                                 lapack_int ldaf, const lapack_int* ipiv,\n                                 const float* s, const lapack_complex_float* b,\n                                 lapack_int ldb, lapack_complex_float* x,\n                                 lapack_int ldx, float* rcond, float* berr,\n                                 lapack_int n_err_bnds, float* err_bnds_norm,\n                                 float* err_bnds_comp, lapack_int nparams,\n                                 float* params, lapack_complex_float* work,\n                                 float* rwork );\nlapack_int LAPACKE_zherfsx_work( int matrix_order, char uplo, char equed,\n                                 lapack_int n, lapack_int nrhs,\n                                 const lapack_complex_double* a, lapack_int lda,\n                                 const lapack_complex_double* af,\n                                 lapack_int ldaf, const lapack_int* ipiv,\n                                 const double* s,\n                                 const lapack_complex_double* b, lapack_int ldb,\n                                 lapack_complex_double* x, lapack_int ldx,\n                                 double* rcond, double* berr,\n                                 lapack_int n_err_bnds, double* err_bnds_norm,\n                                 double* err_bnds_comp, lapack_int nparams,\n                                 double* params, lapack_complex_double* work,\n                                 double* rwork );\n\nlapack_int LAPACKE_chesv_work( int matrix_order, char uplo, lapack_int n,\n                               lapack_int nrhs, lapack_complex_float* a,\n                               lapack_int lda, lapack_int* ipiv,\n                               lapack_complex_float* b, lapack_int ldb,\n                               lapack_complex_float* work, lapack_int lwork );\nlapack_int LAPACKE_zhesv_work( int matrix_order, char uplo, lapack_int n,\n                               lapack_int nrhs, lapack_complex_double* a,\n                               lapack_int lda, lapack_int* ipiv,\n                               lapack_complex_double* b, lapack_int ldb,\n                               lapack_complex_double* work, lapack_int lwork );\n\nlapack_int LAPACKE_chesvx_work( int matrix_order, char fact, char uplo,\n                                lapack_int n, lapack_int nrhs,\n                                const lapack_complex_float* a, lapack_int lda,\n                                lapack_complex_float* af, lapack_int ldaf,\n                                lapack_int* ipiv, const lapack_complex_float* b,\n                                lapack_int ldb, lapack_complex_float* x,\n                                lapack_int ldx, float* rcond, float* ferr,\n                                float* berr, lapack_complex_float* work,\n                                lapack_int lwork, float* rwork );\nlapack_int LAPACKE_zhesvx_work( int matrix_order, char fact, char uplo,\n                                lapack_int n, lapack_int nrhs,\n                                const lapack_complex_double* a, lapack_int lda,\n                                lapack_complex_double* af, lapack_int ldaf,\n                                lapack_int* ipiv,\n                                const lapack_complex_double* b, lapack_int ldb,\n                                lapack_complex_double* x, lapack_int ldx,\n                                double* rcond, double* ferr, double* berr,\n                                lapack_complex_double* work, lapack_int lwork,\n                                double* rwork );\n\nlapack_int LAPACKE_chesvxx_work( int matrix_order, char fact, char uplo,\n                                 lapack_int n, lapack_int nrhs,\n                                 lapack_complex_float* a, lapack_int lda,\n                                 lapack_complex_float* af, lapack_int ldaf,\n                                 lapack_int* ipiv, char* equed, float* s,\n                                 lapack_complex_float* b, lapack_int ldb,\n                                 lapack_complex_float* x, lapack_int ldx,\n                                 float* rcond, float* rpvgrw, float* berr,\n                                 lapack_int n_err_bnds, float* err_bnds_norm,\n                                 float* err_bnds_comp, lapack_int nparams,\n                                 float* params, lapack_complex_float* work,\n                                 float* rwork );\nlapack_int LAPACKE_zhesvxx_work( int matrix_order, char fact, char uplo,\n                                 lapack_int n, lapack_int nrhs,\n                                 lapack_complex_double* a, lapack_int lda,\n                                 lapack_complex_double* af, lapack_int ldaf,\n                                 lapack_int* ipiv, char* equed, double* s,\n                                 lapack_complex_double* b, lapack_int ldb,\n                                 lapack_complex_double* x, lapack_int ldx,\n                                 double* rcond, double* rpvgrw, double* berr,\n                                 lapack_int n_err_bnds, double* err_bnds_norm,\n                                 double* err_bnds_comp, lapack_int nparams,\n                                 double* params, lapack_complex_double* work,\n                                 double* rwork );\n\nlapack_int LAPACKE_chetrd_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_complex_float* a, lapack_int lda,\n                                float* d, float* e, lapack_complex_float* tau,\n                                lapack_complex_float* work, lapack_int lwork );\nlapack_int LAPACKE_zhetrd_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_complex_double* a, lapack_int lda,\n                                double* d, double* e,\n                                lapack_complex_double* tau,\n                                lapack_complex_double* work, lapack_int lwork );\n\nlapack_int LAPACKE_chetrf_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_complex_float* a, lapack_int lda,\n                                lapack_int* ipiv, lapack_complex_float* work,\n                                lapack_int lwork );\nlapack_int LAPACKE_zhetrf_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_complex_double* a, lapack_int lda,\n                                lapack_int* ipiv, lapack_complex_double* work,\n                                lapack_int lwork );\n\nlapack_int LAPACKE_chetri_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_complex_float* a, lapack_int lda,\n                                const lapack_int* ipiv,\n                                lapack_complex_float* work );\nlapack_int LAPACKE_zhetri_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_complex_double* a, lapack_int lda,\n                                const lapack_int* ipiv,\n                                lapack_complex_double* work );\n\nlapack_int LAPACKE_chetrs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, const lapack_complex_float* a,\n                                lapack_int lda, const lapack_int* ipiv,\n                                lapack_complex_float* b, lapack_int ldb );\nlapack_int LAPACKE_zhetrs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, const lapack_complex_double* a,\n                                lapack_int lda, const lapack_int* ipiv,\n                                lapack_complex_double* b, lapack_int ldb );\n\nlapack_int LAPACKE_chfrk_work( int matrix_order, char transr, char uplo,\n                               char trans, lapack_int n, lapack_int k,\n                               float alpha, const lapack_complex_float* a,\n                               lapack_int lda, float beta,\n                               lapack_complex_float* c );\nlapack_int LAPACKE_zhfrk_work( int matrix_order, char transr, char uplo,\n                               char trans, lapack_int n, lapack_int k,\n                               double alpha, const lapack_complex_double* a,\n                               lapack_int lda, double beta,\n                               lapack_complex_double* c );\n\nlapack_int LAPACKE_shgeqz_work( int matrix_order, char job, char compq,\n                                char compz, lapack_int n, lapack_int ilo,\n                                lapack_int ihi, float* h, lapack_int ldh,\n                                float* t, lapack_int ldt, float* alphar,\n                                float* alphai, float* beta, float* q,\n                                lapack_int ldq, float* z, lapack_int ldz,\n                                float* work, lapack_int lwork );\nlapack_int LAPACKE_dhgeqz_work( int matrix_order, char job, char compq,\n                                char compz, lapack_int n, lapack_int ilo,\n                                lapack_int ihi, double* h, lapack_int ldh,\n                                double* t, lapack_int ldt, double* alphar,\n                                double* alphai, double* beta, double* q,\n                                lapack_int ldq, double* z, lapack_int ldz,\n                                double* work, lapack_int lwork );\nlapack_int LAPACKE_chgeqz_work( int matrix_order, char job, char compq,\n                                char compz, lapack_int n, lapack_int ilo,\n                                lapack_int ihi, lapack_complex_float* h,\n                                lapack_int ldh, lapack_complex_float* t,\n                                lapack_int ldt, lapack_complex_float* alpha,\n                                lapack_complex_float* beta,\n                                lapack_complex_float* q, lapack_int ldq,\n                                lapack_complex_float* z, lapack_int ldz,\n                                lapack_complex_float* work, lapack_int lwork,\n                                float* rwork );\nlapack_int LAPACKE_zhgeqz_work( int matrix_order, char job, char compq,\n                                char compz, lapack_int n, lapack_int ilo,\n                                lapack_int ihi, lapack_complex_double* h,\n                                lapack_int ldh, lapack_complex_double* t,\n                                lapack_int ldt, lapack_complex_double* alpha,\n                                lapack_complex_double* beta,\n                                lapack_complex_double* q, lapack_int ldq,\n                                lapack_complex_double* z, lapack_int ldz,\n                                lapack_complex_double* work, lapack_int lwork,\n                                double* rwork );\n\nlapack_int LAPACKE_chpcon_work( int matrix_order, char uplo, lapack_int n,\n                                const lapack_complex_float* ap,\n                                const lapack_int* ipiv, float anorm,\n                                float* rcond, lapack_complex_float* work );\nlapack_int LAPACKE_zhpcon_work( int matrix_order, char uplo, lapack_int n,\n                                const lapack_complex_double* ap,\n                                const lapack_int* ipiv, double anorm,\n                                double* rcond, lapack_complex_double* work );\n\nlapack_int LAPACKE_chpev_work( int matrix_order, char jobz, char uplo,\n                               lapack_int n, lapack_complex_float* ap, float* w,\n                               lapack_complex_float* z, lapack_int ldz,\n                               lapack_complex_float* work, float* rwork );\nlapack_int LAPACKE_zhpev_work( int matrix_order, char jobz, char uplo,\n                               lapack_int n, lapack_complex_double* ap,\n                               double* w, lapack_complex_double* z,\n                               lapack_int ldz, lapack_complex_double* work,\n                               double* rwork );\n\nlapack_int LAPACKE_chpevd_work( int matrix_order, char jobz, char uplo,\n                                lapack_int n, lapack_complex_float* ap,\n                                float* w, lapack_complex_float* z,\n                                lapack_int ldz, lapack_complex_float* work,\n                                lapack_int lwork, float* rwork,\n                                lapack_int lrwork, lapack_int* iwork,\n                                lapack_int liwork );\nlapack_int LAPACKE_zhpevd_work( int matrix_order, char jobz, char uplo,\n                                lapack_int n, lapack_complex_double* ap,\n                                double* w, lapack_complex_double* z,\n                                lapack_int ldz, lapack_complex_double* work,\n                                lapack_int lwork, double* rwork,\n                                lapack_int lrwork, lapack_int* iwork,\n                                lapack_int liwork );\n\nlapack_int LAPACKE_chpevx_work( int matrix_order, char jobz, char range,\n                                char uplo, lapack_int n,\n                                lapack_complex_float* ap, float vl, float vu,\n                                lapack_int il, lapack_int iu, float abstol,\n                                lapack_int* m, float* w,\n                                lapack_complex_float* z, lapack_int ldz,\n                                lapack_complex_float* work, float* rwork,\n                                lapack_int* iwork, lapack_int* ifail );\nlapack_int LAPACKE_zhpevx_work( int matrix_order, char jobz, char range,\n                                char uplo, lapack_int n,\n                                lapack_complex_double* ap, double vl, double vu,\n                                lapack_int il, lapack_int iu, double abstol,\n                                lapack_int* m, double* w,\n                                lapack_complex_double* z, lapack_int ldz,\n                                lapack_complex_double* work, double* rwork,\n                                lapack_int* iwork, lapack_int* ifail );\n\nlapack_int LAPACKE_chpgst_work( int matrix_order, lapack_int itype, char uplo,\n                                lapack_int n, lapack_complex_float* ap,\n                                const lapack_complex_float* bp );\nlapack_int LAPACKE_zhpgst_work( int matrix_order, lapack_int itype, char uplo,\n                                lapack_int n, lapack_complex_double* ap,\n                                const lapack_complex_double* bp );\n\nlapack_int LAPACKE_chpgv_work( int matrix_order, lapack_int itype, char jobz,\n                               char uplo, lapack_int n,\n                               lapack_complex_float* ap,\n                               lapack_complex_float* bp, float* w,\n                               lapack_complex_float* z, lapack_int ldz,\n                               lapack_complex_float* work, float* rwork );\nlapack_int LAPACKE_zhpgv_work( int matrix_order, lapack_int itype, char jobz,\n                               char uplo, lapack_int n,\n                               lapack_complex_double* ap,\n                               lapack_complex_double* bp, double* w,\n                               lapack_complex_double* z, lapack_int ldz,\n                               lapack_complex_double* work, double* rwork );\n\nlapack_int LAPACKE_chpgvd_work( int matrix_order, lapack_int itype, char jobz,\n                                char uplo, lapack_int n,\n                                lapack_complex_float* ap,\n                                lapack_complex_float* bp, float* w,\n                                lapack_complex_float* z, lapack_int ldz,\n                                lapack_complex_float* work, lapack_int lwork,\n                                float* rwork, lapack_int lrwork,\n                                lapack_int* iwork, lapack_int liwork );\nlapack_int LAPACKE_zhpgvd_work( int matrix_order, lapack_int itype, char jobz,\n                                char uplo, lapack_int n,\n                                lapack_complex_double* ap,\n                                lapack_complex_double* bp, double* w,\n                                lapack_complex_double* z, lapack_int ldz,\n                                lapack_complex_double* work, lapack_int lwork,\n                                double* rwork, lapack_int lrwork,\n                                lapack_int* iwork, lapack_int liwork );\n\nlapack_int LAPACKE_chpgvx_work( int matrix_order, lapack_int itype, char jobz,\n                                char range, char uplo, lapack_int n,\n                                lapack_complex_float* ap,\n                                lapack_complex_float* bp, float vl, float vu,\n                                lapack_int il, lapack_int iu, float abstol,\n                                lapack_int* m, float* w,\n                                lapack_complex_float* z, lapack_int ldz,\n                                lapack_complex_float* work, float* rwork,\n                                lapack_int* iwork, lapack_int* ifail );\nlapack_int LAPACKE_zhpgvx_work( int matrix_order, lapack_int itype, char jobz,\n                                char range, char uplo, lapack_int n,\n                                lapack_complex_double* ap,\n                                lapack_complex_double* bp, double vl, double vu,\n                                lapack_int il, lapack_int iu, double abstol,\n                                lapack_int* m, double* w,\n                                lapack_complex_double* z, lapack_int ldz,\n                                lapack_complex_double* work, double* rwork,\n                                lapack_int* iwork, lapack_int* ifail );\n\nlapack_int LAPACKE_chprfs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, const lapack_complex_float* ap,\n                                const lapack_complex_float* afp,\n                                const lapack_int* ipiv,\n                                const lapack_complex_float* b, lapack_int ldb,\n                                lapack_complex_float* x, lapack_int ldx,\n                                float* ferr, float* berr,\n                                lapack_complex_float* work, float* rwork );\nlapack_int LAPACKE_zhprfs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs,\n                                const lapack_complex_double* ap,\n                                const lapack_complex_double* afp,\n                                const lapack_int* ipiv,\n                                const lapack_complex_double* b, lapack_int ldb,\n                                lapack_complex_double* x, lapack_int ldx,\n                                double* ferr, double* berr,\n                                lapack_complex_double* work, double* rwork );\n\nlapack_int LAPACKE_chpsv_work( int matrix_order, char uplo, lapack_int n,\n                               lapack_int nrhs, lapack_complex_float* ap,\n                               lapack_int* ipiv, lapack_complex_float* b,\n                               lapack_int ldb );\nlapack_int LAPACKE_zhpsv_work( int matrix_order, char uplo, lapack_int n,\n                               lapack_int nrhs, lapack_complex_double* ap,\n                               lapack_int* ipiv, lapack_complex_double* b,\n                               lapack_int ldb );\n\nlapack_int LAPACKE_chpsvx_work( int matrix_order, char fact, char uplo,\n                                lapack_int n, lapack_int nrhs,\n                                const lapack_complex_float* ap,\n                                lapack_complex_float* afp, lapack_int* ipiv,\n                                const lapack_complex_float* b, lapack_int ldb,\n                                lapack_complex_float* x, lapack_int ldx,\n                                float* rcond, float* ferr, float* berr,\n                                lapack_complex_float* work, float* rwork );\nlapack_int LAPACKE_zhpsvx_work( int matrix_order, char fact, char uplo,\n                                lapack_int n, lapack_int nrhs,\n                                const lapack_complex_double* ap,\n                                lapack_complex_double* afp, lapack_int* ipiv,\n                                const lapack_complex_double* b, lapack_int ldb,\n                                lapack_complex_double* x, lapack_int ldx,\n                                double* rcond, double* ferr, double* berr,\n                                lapack_complex_double* work, double* rwork );\n\nlapack_int LAPACKE_chptrd_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_complex_float* ap, float* d, float* e,\n                                lapack_complex_float* tau );\nlapack_int LAPACKE_zhptrd_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_complex_double* ap, double* d, double* e,\n                                lapack_complex_double* tau );\n\nlapack_int LAPACKE_chptrf_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_complex_float* ap, lapack_int* ipiv );\nlapack_int LAPACKE_zhptrf_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_complex_double* ap, lapack_int* ipiv );\n\nlapack_int LAPACKE_chptri_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_complex_float* ap,\n                                const lapack_int* ipiv,\n                                lapack_complex_float* work );\nlapack_int LAPACKE_zhptri_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_complex_double* ap,\n                                const lapack_int* ipiv,\n                                lapack_complex_double* work );\n\nlapack_int LAPACKE_chptrs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, const lapack_complex_float* ap,\n                                const lapack_int* ipiv, lapack_complex_float* b,\n                                lapack_int ldb );\nlapack_int LAPACKE_zhptrs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs,\n                                const lapack_complex_double* ap,\n                                const lapack_int* ipiv,\n                                lapack_complex_double* b, lapack_int ldb );\n\nlapack_int LAPACKE_shsein_work( int matrix_order, char job, char eigsrc,\n                                char initv, lapack_logical* select,\n                                lapack_int n, const float* h, lapack_int ldh,\n                                float* wr, const float* wi, float* vl,\n                                lapack_int ldvl, float* vr, lapack_int ldvr,\n                                lapack_int mm, lapack_int* m, float* work,\n                                lapack_int* ifaill, lapack_int* ifailr );\nlapack_int LAPACKE_dhsein_work( int matrix_order, char job, char eigsrc,\n                                char initv, lapack_logical* select,\n                                lapack_int n, const double* h, lapack_int ldh,\n                                double* wr, const double* wi, double* vl,\n                                lapack_int ldvl, double* vr, lapack_int ldvr,\n                                lapack_int mm, lapack_int* m, double* work,\n                                lapack_int* ifaill, lapack_int* ifailr );\nlapack_int LAPACKE_chsein_work( int matrix_order, char job, char eigsrc,\n                                char initv, const lapack_logical* select,\n                                lapack_int n, const lapack_complex_float* h,\n                                lapack_int ldh, lapack_complex_float* w,\n                                lapack_complex_float* vl, lapack_int ldvl,\n                                lapack_complex_float* vr, lapack_int ldvr,\n                                lapack_int mm, lapack_int* m,\n                                lapack_complex_float* work, float* rwork,\n                                lapack_int* ifaill, lapack_int* ifailr );\nlapack_int LAPACKE_zhsein_work( int matrix_order, char job, char eigsrc,\n                                char initv, const lapack_logical* select,\n                                lapack_int n, const lapack_complex_double* h,\n                                lapack_int ldh, lapack_complex_double* w,\n                                lapack_complex_double* vl, lapack_int ldvl,\n                                lapack_complex_double* vr, lapack_int ldvr,\n                                lapack_int mm, lapack_int* m,\n                                lapack_complex_double* work, double* rwork,\n                                lapack_int* ifaill, lapack_int* ifailr );\n\nlapack_int LAPACKE_shseqr_work( int matrix_order, char job, char compz,\n                                lapack_int n, lapack_int ilo, lapack_int ihi,\n                                float* h, lapack_int ldh, float* wr, float* wi,\n                                float* z, lapack_int ldz, float* work,\n                                lapack_int lwork );\nlapack_int LAPACKE_dhseqr_work( int matrix_order, char job, char compz,\n                                lapack_int n, lapack_int ilo, lapack_int ihi,\n                                double* h, lapack_int ldh, double* wr,\n                                double* wi, double* z, lapack_int ldz,\n                                double* work, lapack_int lwork );\nlapack_int LAPACKE_chseqr_work( int matrix_order, char job, char compz,\n                                lapack_int n, lapack_int ilo, lapack_int ihi,\n                                lapack_complex_float* h, lapack_int ldh,\n                                lapack_complex_float* w,\n                                lapack_complex_float* z, lapack_int ldz,\n                                lapack_complex_float* work, lapack_int lwork );\nlapack_int LAPACKE_zhseqr_work( int matrix_order, char job, char compz,\n                                lapack_int n, lapack_int ilo, lapack_int ihi,\n                                lapack_complex_double* h, lapack_int ldh,\n                                lapack_complex_double* w,\n                                lapack_complex_double* z, lapack_int ldz,\n                                lapack_complex_double* work, lapack_int lwork );\n\nlapack_int LAPACKE_clacgv_work( lapack_int n, lapack_complex_float* x,\n                                lapack_int incx );\nlapack_int LAPACKE_zlacgv_work( lapack_int n, lapack_complex_double* x,\n                                lapack_int incx );\n\nlapack_int LAPACKE_slacpy_work( int matrix_order, char uplo, lapack_int m,\n                                lapack_int n, const float* a, lapack_int lda,\n                                float* b, lapack_int ldb );\nlapack_int LAPACKE_dlacpy_work( int matrix_order, char uplo, lapack_int m,\n                                lapack_int n, const double* a, lapack_int lda,\n                                double* b, lapack_int ldb );\nlapack_int LAPACKE_clacpy_work( int matrix_order, char uplo, lapack_int m,\n                                lapack_int n, const lapack_complex_float* a,\n                                lapack_int lda, lapack_complex_float* b,\n                                lapack_int ldb );\nlapack_int LAPACKE_zlacpy_work( int matrix_order, char uplo, lapack_int m,\n                                lapack_int n, const lapack_complex_double* a,\n                                lapack_int lda, lapack_complex_double* b,\n                                lapack_int ldb );\n\nlapack_int LAPACKE_zlag2c_work( int matrix_order, lapack_int m, lapack_int n,\n                                const lapack_complex_double* a, lapack_int lda,\n                                lapack_complex_float* sa, lapack_int ldsa );\n\nlapack_int LAPACKE_slag2d_work( int matrix_order, lapack_int m, lapack_int n,\n                                const float* sa, lapack_int ldsa, double* a,\n                                lapack_int lda );\n\nlapack_int LAPACKE_dlag2s_work( int matrix_order, lapack_int m, lapack_int n,\n                                const double* a, lapack_int lda, float* sa,\n                                lapack_int ldsa );\n\nlapack_int LAPACKE_clag2z_work( int matrix_order, lapack_int m, lapack_int n,\n                                const lapack_complex_float* sa, lapack_int ldsa,\n                                lapack_complex_double* a, lapack_int lda );\n\nlapack_int LAPACKE_slagge_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int kl, lapack_int ku, const float* d,\n                                float* a, lapack_int lda, lapack_int* iseed,\n                                float* work );\nlapack_int LAPACKE_dlagge_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int kl, lapack_int ku, const double* d,\n                                double* a, lapack_int lda, lapack_int* iseed,\n                                double* work );\nlapack_int LAPACKE_clagge_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int kl, lapack_int ku, const float* d,\n                                lapack_complex_float* a, lapack_int lda,\n                                lapack_int* iseed, lapack_complex_float* work );\nlapack_int LAPACKE_zlagge_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int kl, lapack_int ku, const double* d,\n                                lapack_complex_double* a, lapack_int lda,\n                                lapack_int* iseed,\n                                lapack_complex_double* work );\n                                \nlapack_int LAPACKE_claghe_work( int matrix_order, lapack_int n, lapack_int k,\n                                const float* d, lapack_complex_float* a,\n                                lapack_int lda, lapack_int* iseed,\n                                lapack_complex_float* work );\nlapack_int LAPACKE_zlaghe_work( int matrix_order, lapack_int n, lapack_int k,\n                                const double* d, lapack_complex_double* a,\n                                lapack_int lda, lapack_int* iseed,\n                                lapack_complex_double* work );\n\nlapack_int LAPACKE_slagsy_work( int matrix_order, lapack_int n, lapack_int k,\n                                const float* d, float* a, lapack_int lda,\n                                lapack_int* iseed, float* work );\nlapack_int LAPACKE_dlagsy_work( int matrix_order, lapack_int n, lapack_int k,\n                                const double* d, double* a, lapack_int lda,\n                                lapack_int* iseed, double* work );\nlapack_int LAPACKE_clagsy_work( int matrix_order, lapack_int n, lapack_int k,\n                                const float* d, lapack_complex_float* a,\n                                lapack_int lda, lapack_int* iseed,\n                                lapack_complex_float* work );\nlapack_int LAPACKE_zlagsy_work( int matrix_order, lapack_int n, lapack_int k,\n                                const double* d, lapack_complex_double* a,\n                                lapack_int lda, lapack_int* iseed,\n                                lapack_complex_double* work );\n\nlapack_int LAPACKE_slapmr_work( int matrix_order, lapack_logical forwrd,\n                                lapack_int m, lapack_int n, float* x,\n                                lapack_int ldx, lapack_int* k );\nlapack_int LAPACKE_dlapmr_work( int matrix_order, lapack_logical forwrd,\n                                lapack_int m, lapack_int n, double* x,\n                                lapack_int ldx, lapack_int* k );\nlapack_int LAPACKE_clapmr_work( int matrix_order, lapack_logical forwrd,\n                                lapack_int m, lapack_int n,\n                                lapack_complex_float* x, lapack_int ldx,\n                                lapack_int* k );\nlapack_int LAPACKE_zlapmr_work( int matrix_order, lapack_logical forwrd,\n                                lapack_int m, lapack_int n,\n                                lapack_complex_double* x, lapack_int ldx,\n                                lapack_int* k );\n\nlapack_int LAPACKE_slartgp_work( float f, float g, float* cs, float* sn,\n                                 float* r );\nlapack_int LAPACKE_dlartgp_work( double f, double g, double* cs, double* sn,\n                                 double* r );\n\nlapack_int LAPACKE_slartgs_work( float x, float y, float sigma, float* cs,\n                                 float* sn );\nlapack_int LAPACKE_dlartgs_work( double x, double y, double sigma, double* cs,\n                                 double* sn );\n                                \nfloat LAPACKE_slapy2_work( float x, float y );\ndouble LAPACKE_dlapy2_work( double x, double y );\n\nfloat LAPACKE_slapy3_work( float x, float y, float z );\ndouble LAPACKE_dlapy3_work( double x, double y, double z );\n\nfloat LAPACKE_slamch_work( char cmach );\ndouble LAPACKE_dlamch_work( char cmach );\n\nfloat LAPACKE_slange_work( int matrix_order, char norm, lapack_int m,\n                                lapack_int n, const float* a, lapack_int lda,\n                                float* work );\ndouble LAPACKE_dlange_work( int matrix_order, char norm, lapack_int m,\n                                lapack_int n, const double* a, lapack_int lda,\n                                double* work );\nfloat LAPACKE_clange_work( int matrix_order, char norm, lapack_int m,\n                                lapack_int n, const lapack_complex_float* a,\n                                lapack_int lda, float* work );\ndouble LAPACKE_zlange_work( int matrix_order, char norm, lapack_int m,\n                                lapack_int n, const lapack_complex_double* a,\n                                lapack_int lda, double* work );\n\nfloat LAPACKE_clanhe_work( int matrix_order, char norm, char uplo,\n                                lapack_int n, const lapack_complex_float* a,\n                                lapack_int lda, float* work );\ndouble LAPACKE_zlanhe_work( int matrix_order, char norm, char uplo,\n                                lapack_int n, const lapack_complex_double* a,\n                                lapack_int lda, double* work );\n\nfloat LAPACKE_slansy_work( int matrix_order, char norm, char uplo,\n                                lapack_int n, const float* a, lapack_int lda,\n                                float* work );\ndouble LAPACKE_dlansy_work( int matrix_order, char norm, char uplo,\n                                lapack_int n, const double* a, lapack_int lda,\n                                double* work );\nfloat LAPACKE_clansy_work( int matrix_order, char norm, char uplo,\n                                lapack_int n, const lapack_complex_float* a,\n                                lapack_int lda, float* work );\ndouble LAPACKE_zlansy_work( int matrix_order, char norm, char uplo,\n                                lapack_int n, const lapack_complex_double* a,\n                                lapack_int lda, double* work );\n\nfloat LAPACKE_slantr_work( int matrix_order, char norm, char uplo,\n                                char diag, lapack_int m, lapack_int n, const float* a,\n                                lapack_int lda, float* work );\ndouble LAPACKE_dlantr_work( int matrix_order, char norm, char uplo,\n                                char diag, lapack_int m, lapack_int n,\n                                const double* a, lapack_int lda, double* work );\nfloat LAPACKE_clantr_work( int matrix_order, char norm, char uplo,\n                                char diag, lapack_int m, lapack_int n,\n                                const lapack_complex_float* a, lapack_int lda,\n                                float* work );\ndouble LAPACKE_zlantr_work( int matrix_order, char norm, char uplo,\n                                char diag, lapack_int m, lapack_int n,\n                                const lapack_complex_double* a, lapack_int lda,\n                                double* work );\n\nlapack_int LAPACKE_slarfb_work( int matrix_order, char side, char trans,\n                                char direct, char storev, lapack_int m,\n                                lapack_int n, lapack_int k, const float* v,\n                                lapack_int ldv, const float* t, lapack_int ldt,\n                                float* c, lapack_int ldc, float* work,\n                                lapack_int ldwork );\nlapack_int LAPACKE_dlarfb_work( int matrix_order, char side, char trans,\n                                char direct, char storev, lapack_int m,\n                                lapack_int n, lapack_int k, const double* v,\n                                lapack_int ldv, const double* t, lapack_int ldt,\n                                double* c, lapack_int ldc, double* work,\n                                lapack_int ldwork );\nlapack_int LAPACKE_clarfb_work( int matrix_order, char side, char trans,\n                                char direct, char storev, lapack_int m,\n                                lapack_int n, lapack_int k,\n                                const lapack_complex_float* v, lapack_int ldv,\n                                const lapack_complex_float* t, lapack_int ldt,\n                                lapack_complex_float* c, lapack_int ldc,\n                                lapack_complex_float* work, lapack_int ldwork );\nlapack_int LAPACKE_zlarfb_work( int matrix_order, char side, char trans,\n                                char direct, char storev, lapack_int m,\n                                lapack_int n, lapack_int k,\n                                const lapack_complex_double* v, lapack_int ldv,\n                                const lapack_complex_double* t, lapack_int ldt,\n                                lapack_complex_double* c, lapack_int ldc,\n                                lapack_complex_double* work,\n                                lapack_int ldwork );\n\nlapack_int LAPACKE_slarfg_work( lapack_int n, float* alpha, float* x,\n                                lapack_int incx, float* tau );\nlapack_int LAPACKE_dlarfg_work( lapack_int n, double* alpha, double* x,\n                                lapack_int incx, double* tau );\nlapack_int LAPACKE_clarfg_work( lapack_int n, lapack_complex_float* alpha,\n                                lapack_complex_float* x, lapack_int incx,\n                                lapack_complex_float* tau );\nlapack_int LAPACKE_zlarfg_work( lapack_int n, lapack_complex_double* alpha,\n                                lapack_complex_double* x, lapack_int incx,\n                                lapack_complex_double* tau );\n\nlapack_int LAPACKE_slarft_work( int matrix_order, char direct, char storev,\n                                lapack_int n, lapack_int k, const float* v,\n                                lapack_int ldv, const float* tau, float* t,\n                                lapack_int ldt );\nlapack_int LAPACKE_dlarft_work( int matrix_order, char direct, char storev,\n                                lapack_int n, lapack_int k, const double* v,\n                                lapack_int ldv, const double* tau, double* t,\n                                lapack_int ldt );\nlapack_int LAPACKE_clarft_work( int matrix_order, char direct, char storev,\n                                lapack_int n, lapack_int k,\n                                const lapack_complex_float* v, lapack_int ldv,\n                                const lapack_complex_float* tau,\n                                lapack_complex_float* t, lapack_int ldt );\nlapack_int LAPACKE_zlarft_work( int matrix_order, char direct, char storev,\n                                lapack_int n, lapack_int k,\n                                const lapack_complex_double* v, lapack_int ldv,\n                                const lapack_complex_double* tau,\n                                lapack_complex_double* t, lapack_int ldt );\n\nlapack_int LAPACKE_slarfx_work( int matrix_order, char side, lapack_int m,\n                                lapack_int n, const float* v, float tau,\n                                float* c, lapack_int ldc, float* work );\nlapack_int LAPACKE_dlarfx_work( int matrix_order, char side, lapack_int m,\n                                lapack_int n, const double* v, double tau,\n                                double* c, lapack_int ldc, double* work );\nlapack_int LAPACKE_clarfx_work( int matrix_order, char side, lapack_int m,\n                                lapack_int n, const lapack_complex_float* v,\n                                lapack_complex_float tau,\n                                lapack_complex_float* c, lapack_int ldc,\n                                lapack_complex_float* work );\nlapack_int LAPACKE_zlarfx_work( int matrix_order, char side, lapack_int m,\n                                lapack_int n, const lapack_complex_double* v,\n                                lapack_complex_double tau,\n                                lapack_complex_double* c, lapack_int ldc,\n                                lapack_complex_double* work );\n\nlapack_int LAPACKE_slarnv_work( lapack_int idist, lapack_int* iseed,\n                                lapack_int n, float* x );\nlapack_int LAPACKE_dlarnv_work( lapack_int idist, lapack_int* iseed,\n                                lapack_int n, double* x );\nlapack_int LAPACKE_clarnv_work( lapack_int idist, lapack_int* iseed,\n                                lapack_int n, lapack_complex_float* x );\nlapack_int LAPACKE_zlarnv_work( lapack_int idist, lapack_int* iseed,\n                                lapack_int n, lapack_complex_double* x );\n\nlapack_int LAPACKE_slaset_work( int matrix_order, char uplo, lapack_int m,\n                                lapack_int n, float alpha, float beta, float* a,\n                                lapack_int lda );\nlapack_int LAPACKE_dlaset_work( int matrix_order, char uplo, lapack_int m,\n                                lapack_int n, double alpha, double beta,\n                                double* a, lapack_int lda );\nlapack_int LAPACKE_claset_work( int matrix_order, char uplo, lapack_int m,\n                                lapack_int n, lapack_complex_float alpha,\n                                lapack_complex_float beta,\n                                lapack_complex_float* a, lapack_int lda );\nlapack_int LAPACKE_zlaset_work( int matrix_order, char uplo, lapack_int m,\n                                lapack_int n, lapack_complex_double alpha,\n                                lapack_complex_double beta,\n                                lapack_complex_double* a, lapack_int lda );\n\nlapack_int LAPACKE_slasrt_work( char id, lapack_int n, float* d );\nlapack_int LAPACKE_dlasrt_work( char id, lapack_int n, double* d );\n\nlapack_int LAPACKE_slaswp_work( int matrix_order, lapack_int n, float* a,\n                                lapack_int lda, lapack_int k1, lapack_int k2,\n                                const lapack_int* ipiv, lapack_int incx );\nlapack_int LAPACKE_dlaswp_work( int matrix_order, lapack_int n, double* a,\n                                lapack_int lda, lapack_int k1, lapack_int k2,\n                                const lapack_int* ipiv, lapack_int incx );\nlapack_int LAPACKE_claswp_work( int matrix_order, lapack_int n,\n                                lapack_complex_float* a, lapack_int lda,\n                                lapack_int k1, lapack_int k2,\n                                const lapack_int* ipiv, lapack_int incx );\nlapack_int LAPACKE_zlaswp_work( int matrix_order, lapack_int n,\n                                lapack_complex_double* a, lapack_int lda,\n                                lapack_int k1, lapack_int k2,\n                                const lapack_int* ipiv, lapack_int incx );\n\nlapack_int LAPACKE_slatms_work( int matrix_order, lapack_int m, lapack_int n,\n                                char dist, lapack_int* iseed, char sym,\n                                float* d, lapack_int mode, float cond,\n                                float dmax, lapack_int kl, lapack_int ku,\n                                char pack, float* a, lapack_int lda,\n                                float* work );\nlapack_int LAPACKE_dlatms_work( int matrix_order, lapack_int m, lapack_int n,\n                                char dist, lapack_int* iseed, char sym,\n                                double* d, lapack_int mode, double cond,\n                                double dmax, lapack_int kl, lapack_int ku,\n                                char pack, double* a, lapack_int lda,\n                                double* work );\nlapack_int LAPACKE_clatms_work( int matrix_order, lapack_int m, lapack_int n,\n                                char dist, lapack_int* iseed, char sym,\n                                float* d, lapack_int mode, float cond,\n                                float dmax, lapack_int kl, lapack_int ku,\n                                char pack, lapack_complex_float* a,\n                                lapack_int lda, lapack_complex_float* work );\nlapack_int LAPACKE_zlatms_work( int matrix_order, lapack_int m, lapack_int n,\n                                char dist, lapack_int* iseed, char sym,\n                                double* d, lapack_int mode, double cond,\n                                double dmax, lapack_int kl, lapack_int ku,\n                                char pack, lapack_complex_double* a,\n                                lapack_int lda, lapack_complex_double* work );\n\nlapack_int LAPACKE_slauum_work( int matrix_order, char uplo, lapack_int n,\n                                float* a, lapack_int lda );\nlapack_int LAPACKE_dlauum_work( int matrix_order, char uplo, lapack_int n,\n                                double* a, lapack_int lda );\nlapack_int LAPACKE_clauum_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_complex_float* a, lapack_int lda );\nlapack_int LAPACKE_zlauum_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_complex_double* a, lapack_int lda );\n\nlapack_int LAPACKE_sopgtr_work( int matrix_order, char uplo, lapack_int n,\n                                const float* ap, const float* tau, float* q,\n                                lapack_int ldq, float* work );\nlapack_int LAPACKE_dopgtr_work( int matrix_order, char uplo, lapack_int n,\n                                const double* ap, const double* tau, double* q,\n                                lapack_int ldq, double* work );\n\nlapack_int LAPACKE_sopmtr_work( int matrix_order, char side, char uplo,\n                                char trans, lapack_int m, lapack_int n,\n                                const float* ap, const float* tau, float* c,\n                                lapack_int ldc, float* work );\nlapack_int LAPACKE_dopmtr_work( int matrix_order, char side, char uplo,\n                                char trans, lapack_int m, lapack_int n,\n                                const double* ap, const double* tau, double* c,\n                                lapack_int ldc, double* work );\n\nlapack_int LAPACKE_sorgbr_work( int matrix_order, char vect, lapack_int m,\n                                lapack_int n, lapack_int k, float* a,\n                                lapack_int lda, const float* tau, float* work,\n                                lapack_int lwork );\nlapack_int LAPACKE_dorgbr_work( int matrix_order, char vect, lapack_int m,\n                                lapack_int n, lapack_int k, double* a,\n                                lapack_int lda, const double* tau, double* work,\n                                lapack_int lwork );\n\nlapack_int LAPACKE_sorghr_work( int matrix_order, lapack_int n, lapack_int ilo,\n                                lapack_int ihi, float* a, lapack_int lda,\n                                const float* tau, float* work,\n                                lapack_int lwork );\nlapack_int LAPACKE_dorghr_work( int matrix_order, lapack_int n, lapack_int ilo,\n                                lapack_int ihi, double* a, lapack_int lda,\n                                const double* tau, double* work,\n                                lapack_int lwork );\n\nlapack_int LAPACKE_sorglq_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int k, float* a, lapack_int lda,\n                                const float* tau, float* work,\n                                lapack_int lwork );\nlapack_int LAPACKE_dorglq_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int k, double* a, lapack_int lda,\n                                const double* tau, double* work,\n                                lapack_int lwork );\n\nlapack_int LAPACKE_sorgql_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int k, float* a, lapack_int lda,\n                                const float* tau, float* work,\n                                lapack_int lwork );\nlapack_int LAPACKE_dorgql_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int k, double* a, lapack_int lda,\n                                const double* tau, double* work,\n                                lapack_int lwork );\n\nlapack_int LAPACKE_sorgqr_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int k, float* a, lapack_int lda,\n                                const float* tau, float* work,\n                                lapack_int lwork );\nlapack_int LAPACKE_dorgqr_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int k, double* a, lapack_int lda,\n                                const double* tau, double* work,\n                                lapack_int lwork );\n\nlapack_int LAPACKE_sorgrq_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int k, float* a, lapack_int lda,\n                                const float* tau, float* work,\n                                lapack_int lwork );\nlapack_int LAPACKE_dorgrq_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int k, double* a, lapack_int lda,\n                                const double* tau, double* work,\n                                lapack_int lwork );\n\nlapack_int LAPACKE_sorgtr_work( int matrix_order, char uplo, lapack_int n,\n                                float* a, lapack_int lda, const float* tau,\n                                float* work, lapack_int lwork );\nlapack_int LAPACKE_dorgtr_work( int matrix_order, char uplo, lapack_int n,\n                                double* a, lapack_int lda, const double* tau,\n                                double* work, lapack_int lwork );\n\nlapack_int LAPACKE_sormbr_work( int matrix_order, char vect, char side,\n                                char trans, lapack_int m, lapack_int n,\n                                lapack_int k, const float* a, lapack_int lda,\n                                const float* tau, float* c, lapack_int ldc,\n                                float* work, lapack_int lwork );\nlapack_int LAPACKE_dormbr_work( int matrix_order, char vect, char side,\n                                char trans, lapack_int m, lapack_int n,\n                                lapack_int k, const double* a, lapack_int lda,\n                                const double* tau, double* c, lapack_int ldc,\n                                double* work, lapack_int lwork );\n\nlapack_int LAPACKE_sormhr_work( int matrix_order, char side, char trans,\n                                lapack_int m, lapack_int n, lapack_int ilo,\n                                lapack_int ihi, const float* a, lapack_int lda,\n                                const float* tau, float* c, lapack_int ldc,\n                                float* work, lapack_int lwork );\nlapack_int LAPACKE_dormhr_work( int matrix_order, char side, char trans,\n                                lapack_int m, lapack_int n, lapack_int ilo,\n                                lapack_int ihi, const double* a, lapack_int lda,\n                                const double* tau, double* c, lapack_int ldc,\n                                double* work, lapack_int lwork );\n\nlapack_int LAPACKE_sormlq_work( int matrix_order, char side, char trans,\n                                lapack_int m, lapack_int n, lapack_int k,\n                                const float* a, lapack_int lda,\n                                const float* tau, float* c, lapack_int ldc,\n                                float* work, lapack_int lwork );\nlapack_int LAPACKE_dormlq_work( int matrix_order, char side, char trans,\n                                lapack_int m, lapack_int n, lapack_int k,\n                                const double* a, lapack_int lda,\n                                const double* tau, double* c, lapack_int ldc,\n                                double* work, lapack_int lwork );\n\nlapack_int LAPACKE_sormql_work( int matrix_order, char side, char trans,\n                                lapack_int m, lapack_int n, lapack_int k,\n                                const float* a, lapack_int lda,\n                                const float* tau, float* c, lapack_int ldc,\n                                float* work, lapack_int lwork );\nlapack_int LAPACKE_dormql_work( int matrix_order, char side, char trans,\n                                lapack_int m, lapack_int n, lapack_int k,\n                                const double* a, lapack_int lda,\n                                const double* tau, double* c, lapack_int ldc,\n                                double* work, lapack_int lwork );\n\nlapack_int LAPACKE_sormqr_work( int matrix_order, char side, char trans,\n                                lapack_int m, lapack_int n, lapack_int k,\n                                const float* a, lapack_int lda,\n                                const float* tau, float* c, lapack_int ldc,\n                                float* work, lapack_int lwork );\nlapack_int LAPACKE_dormqr_work( int matrix_order, char side, char trans,\n                                lapack_int m, lapack_int n, lapack_int k,\n                                const double* a, lapack_int lda,\n                                const double* tau, double* c, lapack_int ldc,\n                                double* work, lapack_int lwork );\n\nlapack_int LAPACKE_sormrq_work( int matrix_order, char side, char trans,\n                                lapack_int m, lapack_int n, lapack_int k,\n                                const float* a, lapack_int lda,\n                                const float* tau, float* c, lapack_int ldc,\n                                float* work, lapack_int lwork );\nlapack_int LAPACKE_dormrq_work( int matrix_order, char side, char trans,\n                                lapack_int m, lapack_int n, lapack_int k,\n                                const double* a, lapack_int lda,\n                                const double* tau, double* c, lapack_int ldc,\n                                double* work, lapack_int lwork );\n\nlapack_int LAPACKE_sormrz_work( int matrix_order, char side, char trans,\n                                lapack_int m, lapack_int n, lapack_int k,\n                                lapack_int l, const float* a, lapack_int lda,\n                                const float* tau, float* c, lapack_int ldc,\n                                float* work, lapack_int lwork );\nlapack_int LAPACKE_dormrz_work( int matrix_order, char side, char trans,\n                                lapack_int m, lapack_int n, lapack_int k,\n                                lapack_int l, const double* a, lapack_int lda,\n                                const double* tau, double* c, lapack_int ldc,\n                                double* work, lapack_int lwork );\n\nlapack_int LAPACKE_sormtr_work( int matrix_order, char side, char uplo,\n                                char trans, lapack_int m, lapack_int n,\n                                const float* a, lapack_int lda,\n                                const float* tau, float* c, lapack_int ldc,\n                                float* work, lapack_int lwork );\nlapack_int LAPACKE_dormtr_work( int matrix_order, char side, char uplo,\n                                char trans, lapack_int m, lapack_int n,\n                                const double* a, lapack_int lda,\n                                const double* tau, double* c, lapack_int ldc,\n                                double* work, lapack_int lwork );\n\nlapack_int LAPACKE_spbcon_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int kd, const float* ab, lapack_int ldab,\n                                float anorm, float* rcond, float* work,\n                                lapack_int* iwork );\nlapack_int LAPACKE_dpbcon_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int kd, const double* ab,\n                                lapack_int ldab, double anorm, double* rcond,\n                                double* work, lapack_int* iwork );\nlapack_int LAPACKE_cpbcon_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int kd, const lapack_complex_float* ab,\n                                lapack_int ldab, float anorm, float* rcond,\n                                lapack_complex_float* work, float* rwork );\nlapack_int LAPACKE_zpbcon_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int kd, const lapack_complex_double* ab,\n                                lapack_int ldab, double anorm, double* rcond,\n                                lapack_complex_double* work, double* rwork );\n\nlapack_int LAPACKE_spbequ_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int kd, const float* ab, lapack_int ldab,\n                                float* s, float* scond, float* amax );\nlapack_int LAPACKE_dpbequ_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int kd, const double* ab,\n                                lapack_int ldab, double* s, double* scond,\n                                double* amax );\nlapack_int LAPACKE_cpbequ_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int kd, const lapack_complex_float* ab,\n                                lapack_int ldab, float* s, float* scond,\n                                float* amax );\nlapack_int LAPACKE_zpbequ_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int kd, const lapack_complex_double* ab,\n                                lapack_int ldab, double* s, double* scond,\n                                double* amax );\n\nlapack_int LAPACKE_spbrfs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int kd, lapack_int nrhs, const float* ab,\n                                lapack_int ldab, const float* afb,\n                                lapack_int ldafb, const float* b,\n                                lapack_int ldb, float* x, lapack_int ldx,\n                                float* ferr, float* berr, float* work,\n                                lapack_int* iwork );\nlapack_int LAPACKE_dpbrfs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int kd, lapack_int nrhs,\n                                const double* ab, lapack_int ldab,\n                                const double* afb, lapack_int ldafb,\n                                const double* b, lapack_int ldb, double* x,\n                                lapack_int ldx, double* ferr, double* berr,\n                                double* work, lapack_int* iwork );\nlapack_int LAPACKE_cpbrfs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int kd, lapack_int nrhs,\n                                const lapack_complex_float* ab, lapack_int ldab,\n                                const lapack_complex_float* afb,\n                                lapack_int ldafb, const lapack_complex_float* b,\n                                lapack_int ldb, lapack_complex_float* x,\n                                lapack_int ldx, float* ferr, float* berr,\n                                lapack_complex_float* work, float* rwork );\nlapack_int LAPACKE_zpbrfs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int kd, lapack_int nrhs,\n                                const lapack_complex_double* ab,\n                                lapack_int ldab,\n                                const lapack_complex_double* afb,\n                                lapack_int ldafb,\n                                const lapack_complex_double* b, lapack_int ldb,\n                                lapack_complex_double* x, lapack_int ldx,\n                                double* ferr, double* berr,\n                                lapack_complex_double* work, double* rwork );\n\nlapack_int LAPACKE_spbstf_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int kb, float* bb, lapack_int ldbb );\nlapack_int LAPACKE_dpbstf_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int kb, double* bb, lapack_int ldbb );\nlapack_int LAPACKE_cpbstf_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int kb, lapack_complex_float* bb,\n                                lapack_int ldbb );\nlapack_int LAPACKE_zpbstf_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int kb, lapack_complex_double* bb,\n                                lapack_int ldbb );\n\nlapack_int LAPACKE_spbsv_work( int matrix_order, char uplo, lapack_int n,\n                               lapack_int kd, lapack_int nrhs, float* ab,\n                               lapack_int ldab, float* b, lapack_int ldb );\nlapack_int LAPACKE_dpbsv_work( int matrix_order, char uplo, lapack_int n,\n                               lapack_int kd, lapack_int nrhs, double* ab,\n                               lapack_int ldab, double* b, lapack_int ldb );\nlapack_int LAPACKE_cpbsv_work( int matrix_order, char uplo, lapack_int n,\n                               lapack_int kd, lapack_int nrhs,\n                               lapack_complex_float* ab, lapack_int ldab,\n                               lapack_complex_float* b, lapack_int ldb );\nlapack_int LAPACKE_zpbsv_work( int matrix_order, char uplo, lapack_int n,\n                               lapack_int kd, lapack_int nrhs,\n                               lapack_complex_double* ab, lapack_int ldab,\n                               lapack_complex_double* b, lapack_int ldb );\n\nlapack_int LAPACKE_spbsvx_work( int matrix_order, char fact, char uplo,\n                                lapack_int n, lapack_int kd, lapack_int nrhs,\n                                float* ab, lapack_int ldab, float* afb,\n                                lapack_int ldafb, char* equed, float* s,\n                                float* b, lapack_int ldb, float* x,\n                                lapack_int ldx, float* rcond, float* ferr,\n                                float* berr, float* work, lapack_int* iwork );\nlapack_int LAPACKE_dpbsvx_work( int matrix_order, char fact, char uplo,\n                                lapack_int n, lapack_int kd, lapack_int nrhs,\n                                double* ab, lapack_int ldab, double* afb,\n                                lapack_int ldafb, char* equed, double* s,\n                                double* b, lapack_int ldb, double* x,\n                                lapack_int ldx, double* rcond, double* ferr,\n                                double* berr, double* work, lapack_int* iwork );\nlapack_int LAPACKE_cpbsvx_work( int matrix_order, char fact, char uplo,\n                                lapack_int n, lapack_int kd, lapack_int nrhs,\n                                lapack_complex_float* ab, lapack_int ldab,\n                                lapack_complex_float* afb, lapack_int ldafb,\n                                char* equed, float* s, lapack_complex_float* b,\n                                lapack_int ldb, lapack_complex_float* x,\n                                lapack_int ldx, float* rcond, float* ferr,\n                                float* berr, lapack_complex_float* work,\n                                float* rwork );\nlapack_int LAPACKE_zpbsvx_work( int matrix_order, char fact, char uplo,\n                                lapack_int n, lapack_int kd, lapack_int nrhs,\n                                lapack_complex_double* ab, lapack_int ldab,\n                                lapack_complex_double* afb, lapack_int ldafb,\n                                char* equed, double* s,\n                                lapack_complex_double* b, lapack_int ldb,\n                                lapack_complex_double* x, lapack_int ldx,\n                                double* rcond, double* ferr, double* berr,\n                                lapack_complex_double* work, double* rwork );\n\nlapack_int LAPACKE_spbtrf_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int kd, float* ab, lapack_int ldab );\nlapack_int LAPACKE_dpbtrf_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int kd, double* ab, lapack_int ldab );\nlapack_int LAPACKE_cpbtrf_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int kd, lapack_complex_float* ab,\n                                lapack_int ldab );\nlapack_int LAPACKE_zpbtrf_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int kd, lapack_complex_double* ab,\n                                lapack_int ldab );\n\nlapack_int LAPACKE_spbtrs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int kd, lapack_int nrhs, const float* ab,\n                                lapack_int ldab, float* b, lapack_int ldb );\nlapack_int LAPACKE_dpbtrs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int kd, lapack_int nrhs,\n                                const double* ab, lapack_int ldab, double* b,\n                                lapack_int ldb );\nlapack_int LAPACKE_cpbtrs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int kd, lapack_int nrhs,\n                                const lapack_complex_float* ab, lapack_int ldab,\n                                lapack_complex_float* b, lapack_int ldb );\nlapack_int LAPACKE_zpbtrs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int kd, lapack_int nrhs,\n                                const lapack_complex_double* ab,\n                                lapack_int ldab, lapack_complex_double* b,\n                                lapack_int ldb );\n\nlapack_int LAPACKE_spftrf_work( int matrix_order, char transr, char uplo,\n                                lapack_int n, float* a );\nlapack_int LAPACKE_dpftrf_work( int matrix_order, char transr, char uplo,\n                                lapack_int n, double* a );\nlapack_int LAPACKE_cpftrf_work( int matrix_order, char transr, char uplo,\n                                lapack_int n, lapack_complex_float* a );\nlapack_int LAPACKE_zpftrf_work( int matrix_order, char transr, char uplo,\n                                lapack_int n, lapack_complex_double* a );\n\nlapack_int LAPACKE_spftri_work( int matrix_order, char transr, char uplo,\n                                lapack_int n, float* a );\nlapack_int LAPACKE_dpftri_work( int matrix_order, char transr, char uplo,\n                                lapack_int n, double* a );\nlapack_int LAPACKE_cpftri_work( int matrix_order, char transr, char uplo,\n                                lapack_int n, lapack_complex_float* a );\nlapack_int LAPACKE_zpftri_work( int matrix_order, char transr, char uplo,\n                                lapack_int n, lapack_complex_double* a );\n\nlapack_int LAPACKE_spftrs_work( int matrix_order, char transr, char uplo,\n                                lapack_int n, lapack_int nrhs, const float* a,\n                                float* b, lapack_int ldb );\nlapack_int LAPACKE_dpftrs_work( int matrix_order, char transr, char uplo,\n                                lapack_int n, lapack_int nrhs, const double* a,\n                                double* b, lapack_int ldb );\nlapack_int LAPACKE_cpftrs_work( int matrix_order, char transr, char uplo,\n                                lapack_int n, lapack_int nrhs,\n                                const lapack_complex_float* a,\n                                lapack_complex_float* b, lapack_int ldb );\nlapack_int LAPACKE_zpftrs_work( int matrix_order, char transr, char uplo,\n                                lapack_int n, lapack_int nrhs,\n                                const lapack_complex_double* a,\n                                lapack_complex_double* b, lapack_int ldb );\n\nlapack_int LAPACKE_spocon_work( int matrix_order, char uplo, lapack_int n,\n                                const float* a, lapack_int lda, float anorm,\n                                float* rcond, float* work, lapack_int* iwork );\nlapack_int LAPACKE_dpocon_work( int matrix_order, char uplo, lapack_int n,\n                                const double* a, lapack_int lda, double anorm,\n                                double* rcond, double* work,\n                                lapack_int* iwork );\nlapack_int LAPACKE_cpocon_work( int matrix_order, char uplo, lapack_int n,\n                                const lapack_complex_float* a, lapack_int lda,\n                                float anorm, float* rcond,\n                                lapack_complex_float* work, float* rwork );\nlapack_int LAPACKE_zpocon_work( int matrix_order, char uplo, lapack_int n,\n                                const lapack_complex_double* a, lapack_int lda,\n                                double anorm, double* rcond,\n                                lapack_complex_double* work, double* rwork );\n\nlapack_int LAPACKE_spoequ_work( int matrix_order, lapack_int n, const float* a,\n                                lapack_int lda, float* s, float* scond,\n                                float* amax );\nlapack_int LAPACKE_dpoequ_work( int matrix_order, lapack_int n, const double* a,\n                                lapack_int lda, double* s, double* scond,\n                                double* amax );\nlapack_int LAPACKE_cpoequ_work( int matrix_order, lapack_int n,\n                                const lapack_complex_float* a, lapack_int lda,\n                                float* s, float* scond, float* amax );\nlapack_int LAPACKE_zpoequ_work( int matrix_order, lapack_int n,\n                                const lapack_complex_double* a, lapack_int lda,\n                                double* s, double* scond, double* amax );\n\nlapack_int LAPACKE_spoequb_work( int matrix_order, lapack_int n, const float* a,\n                                 lapack_int lda, float* s, float* scond,\n                                 float* amax );\nlapack_int LAPACKE_dpoequb_work( int matrix_order, lapack_int n,\n                                 const double* a, lapack_int lda, double* s,\n                                 double* scond, double* amax );\nlapack_int LAPACKE_cpoequb_work( int matrix_order, lapack_int n,\n                                 const lapack_complex_float* a, lapack_int lda,\n                                 float* s, float* scond, float* amax );\nlapack_int LAPACKE_zpoequb_work( int matrix_order, lapack_int n,\n                                 const lapack_complex_double* a, lapack_int lda,\n                                 double* s, double* scond, double* amax );\n\nlapack_int LAPACKE_sporfs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, const float* a, lapack_int lda,\n                                const float* af, lapack_int ldaf,\n                                const float* b, lapack_int ldb, float* x,\n                                lapack_int ldx, float* ferr, float* berr,\n                                float* work, lapack_int* iwork );\nlapack_int LAPACKE_dporfs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, const double* a,\n                                lapack_int lda, const double* af,\n                                lapack_int ldaf, const double* b,\n                                lapack_int ldb, double* x, lapack_int ldx,\n                                double* ferr, double* berr, double* work,\n                                lapack_int* iwork );\nlapack_int LAPACKE_cporfs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, const lapack_complex_float* a,\n                                lapack_int lda, const lapack_complex_float* af,\n                                lapack_int ldaf, const lapack_complex_float* b,\n                                lapack_int ldb, lapack_complex_float* x,\n                                lapack_int ldx, float* ferr, float* berr,\n                                lapack_complex_float* work, float* rwork );\nlapack_int LAPACKE_zporfs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, const lapack_complex_double* a,\n                                lapack_int lda, const lapack_complex_double* af,\n                                lapack_int ldaf, const lapack_complex_double* b,\n                                lapack_int ldb, lapack_complex_double* x,\n                                lapack_int ldx, double* ferr, double* berr,\n                                lapack_complex_double* work, double* rwork );\n\nlapack_int LAPACKE_sporfsx_work( int matrix_order, char uplo, char equed,\n                                 lapack_int n, lapack_int nrhs, const float* a,\n                                 lapack_int lda, const float* af,\n                                 lapack_int ldaf, const float* s,\n                                 const float* b, lapack_int ldb, float* x,\n                                 lapack_int ldx, float* rcond, float* berr,\n                                 lapack_int n_err_bnds, float* err_bnds_norm,\n                                 float* err_bnds_comp, lapack_int nparams,\n                                 float* params, float* work,\n                                 lapack_int* iwork );\nlapack_int LAPACKE_dporfsx_work( int matrix_order, char uplo, char equed,\n                                 lapack_int n, lapack_int nrhs, const double* a,\n                                 lapack_int lda, const double* af,\n                                 lapack_int ldaf, const double* s,\n                                 const double* b, lapack_int ldb, double* x,\n                                 lapack_int ldx, double* rcond, double* berr,\n                                 lapack_int n_err_bnds, double* err_bnds_norm,\n                                 double* err_bnds_comp, lapack_int nparams,\n                                 double* params, double* work,\n                                 lapack_int* iwork );\nlapack_int LAPACKE_cporfsx_work( int matrix_order, char uplo, char equed,\n                                 lapack_int n, lapack_int nrhs,\n                                 const lapack_complex_float* a, lapack_int lda,\n                                 const lapack_complex_float* af,\n                                 lapack_int ldaf, const float* s,\n                                 const lapack_complex_float* b, lapack_int ldb,\n                                 lapack_complex_float* x, lapack_int ldx,\n                                 float* rcond, float* berr,\n                                 lapack_int n_err_bnds, float* err_bnds_norm,\n                                 float* err_bnds_comp, lapack_int nparams,\n                                 float* params, lapack_complex_float* work,\n                                 float* rwork );\nlapack_int LAPACKE_zporfsx_work( int matrix_order, char uplo, char equed,\n                                 lapack_int n, lapack_int nrhs,\n                                 const lapack_complex_double* a, lapack_int lda,\n                                 const lapack_complex_double* af,\n                                 lapack_int ldaf, const double* s,\n                                 const lapack_complex_double* b, lapack_int ldb,\n                                 lapack_complex_double* x, lapack_int ldx,\n                                 double* rcond, double* berr,\n                                 lapack_int n_err_bnds, double* err_bnds_norm,\n                                 double* err_bnds_comp, lapack_int nparams,\n                                 double* params, lapack_complex_double* work,\n                                 double* rwork );\n\nlapack_int LAPACKE_sposv_work( int matrix_order, char uplo, lapack_int n,\n                               lapack_int nrhs, float* a, lapack_int lda,\n                               float* b, lapack_int ldb );\nlapack_int LAPACKE_dposv_work( int matrix_order, char uplo, lapack_int n,\n                               lapack_int nrhs, double* a, lapack_int lda,\n                               double* b, lapack_int ldb );\nlapack_int LAPACKE_cposv_work( int matrix_order, char uplo, lapack_int n,\n                               lapack_int nrhs, lapack_complex_float* a,\n                               lapack_int lda, lapack_complex_float* b,\n                               lapack_int ldb );\nlapack_int LAPACKE_zposv_work( int matrix_order, char uplo, lapack_int n,\n                               lapack_int nrhs, lapack_complex_double* a,\n                               lapack_int lda, lapack_complex_double* b,\n                               lapack_int ldb );\nlapack_int LAPACKE_dsposv_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, double* a, lapack_int lda,\n                                double* b, lapack_int ldb, double* x,\n                                lapack_int ldx, double* work, float* swork,\n                                lapack_int* iter );\nlapack_int LAPACKE_zcposv_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, lapack_complex_double* a,\n                                lapack_int lda, lapack_complex_double* b,\n                                lapack_int ldb, lapack_complex_double* x,\n                                lapack_int ldx, lapack_complex_double* work,\n                                lapack_complex_float* swork, double* rwork,\n                                lapack_int* iter );\n\nlapack_int LAPACKE_sposvx_work( int matrix_order, char fact, char uplo,\n                                lapack_int n, lapack_int nrhs, float* a,\n                                lapack_int lda, float* af, lapack_int ldaf,\n                                char* equed, float* s, float* b, lapack_int ldb,\n                                float* x, lapack_int ldx, float* rcond,\n                                float* ferr, float* berr, float* work,\n                                lapack_int* iwork );\nlapack_int LAPACKE_dposvx_work( int matrix_order, char fact, char uplo,\n                                lapack_int n, lapack_int nrhs, double* a,\n                                lapack_int lda, double* af, lapack_int ldaf,\n                                char* equed, double* s, double* b,\n                                lapack_int ldb, double* x, lapack_int ldx,\n                                double* rcond, double* ferr, double* berr,\n                                double* work, lapack_int* iwork );\nlapack_int LAPACKE_cposvx_work( int matrix_order, char fact, char uplo,\n                                lapack_int n, lapack_int nrhs,\n                                lapack_complex_float* a, lapack_int lda,\n                                lapack_complex_float* af, lapack_int ldaf,\n                                char* equed, float* s, lapack_complex_float* b,\n                                lapack_int ldb, lapack_complex_float* x,\n                                lapack_int ldx, float* rcond, float* ferr,\n                                float* berr, lapack_complex_float* work,\n                                float* rwork );\nlapack_int LAPACKE_zposvx_work( int matrix_order, char fact, char uplo,\n                                lapack_int n, lapack_int nrhs,\n                                lapack_complex_double* a, lapack_int lda,\n                                lapack_complex_double* af, lapack_int ldaf,\n                                char* equed, double* s,\n                                lapack_complex_double* b, lapack_int ldb,\n                                lapack_complex_double* x, lapack_int ldx,\n                                double* rcond, double* ferr, double* berr,\n                                lapack_complex_double* work, double* rwork );\n\nlapack_int LAPACKE_sposvxx_work( int matrix_order, char fact, char uplo,\n                                 lapack_int n, lapack_int nrhs, float* a,\n                                 lapack_int lda, float* af, lapack_int ldaf,\n                                 char* equed, float* s, float* b,\n                                 lapack_int ldb, float* x, lapack_int ldx,\n                                 float* rcond, float* rpvgrw, float* berr,\n                                 lapack_int n_err_bnds, float* err_bnds_norm,\n                                 float* err_bnds_comp, lapack_int nparams,\n                                 float* params, float* work,\n                                 lapack_int* iwork );\nlapack_int LAPACKE_dposvxx_work( int matrix_order, char fact, char uplo,\n                                 lapack_int n, lapack_int nrhs, double* a,\n                                 lapack_int lda, double* af, lapack_int ldaf,\n                                 char* equed, double* s, double* b,\n                                 lapack_int ldb, double* x, lapack_int ldx,\n                                 double* rcond, double* rpvgrw, double* berr,\n                                 lapack_int n_err_bnds, double* err_bnds_norm,\n                                 double* err_bnds_comp, lapack_int nparams,\n                                 double* params, double* work,\n                                 lapack_int* iwork );\nlapack_int LAPACKE_cposvxx_work( int matrix_order, char fact, char uplo,\n                                 lapack_int n, lapack_int nrhs,\n                                 lapack_complex_float* a, lapack_int lda,\n                                 lapack_complex_float* af, lapack_int ldaf,\n                                 char* equed, float* s, lapack_complex_float* b,\n                                 lapack_int ldb, lapack_complex_float* x,\n                                 lapack_int ldx, float* rcond, float* rpvgrw,\n                                 float* berr, lapack_int n_err_bnds,\n                                 float* err_bnds_norm, float* err_bnds_comp,\n                                 lapack_int nparams, float* params,\n                                 lapack_complex_float* work, float* rwork );\nlapack_int LAPACKE_zposvxx_work( int matrix_order, char fact, char uplo,\n                                 lapack_int n, lapack_int nrhs,\n                                 lapack_complex_double* a, lapack_int lda,\n                                 lapack_complex_double* af, lapack_int ldaf,\n                                 char* equed, double* s,\n                                 lapack_complex_double* b, lapack_int ldb,\n                                 lapack_complex_double* x, lapack_int ldx,\n                                 double* rcond, double* rpvgrw, double* berr,\n                                 lapack_int n_err_bnds, double* err_bnds_norm,\n                                 double* err_bnds_comp, lapack_int nparams,\n                                 double* params, lapack_complex_double* work,\n                                 double* rwork );\n\nlapack_int LAPACKE_spotrf_work( int matrix_order, char uplo, lapack_int n,\n                                float* a, lapack_int lda );\nlapack_int LAPACKE_dpotrf_work( int matrix_order, char uplo, lapack_int n,\n                                double* a, lapack_int lda );\nlapack_int LAPACKE_cpotrf_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_complex_float* a, lapack_int lda );\nlapack_int LAPACKE_zpotrf_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_complex_double* a, lapack_int lda );\n\nlapack_int LAPACKE_spotri_work( int matrix_order, char uplo, lapack_int n,\n                                float* a, lapack_int lda );\nlapack_int LAPACKE_dpotri_work( int matrix_order, char uplo, lapack_int n,\n                                double* a, lapack_int lda );\nlapack_int LAPACKE_cpotri_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_complex_float* a, lapack_int lda );\nlapack_int LAPACKE_zpotri_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_complex_double* a, lapack_int lda );\n\nlapack_int LAPACKE_spotrs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, const float* a, lapack_int lda,\n                                float* b, lapack_int ldb );\nlapack_int LAPACKE_dpotrs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, const double* a,\n                                lapack_int lda, double* b, lapack_int ldb );\nlapack_int LAPACKE_cpotrs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, const lapack_complex_float* a,\n                                lapack_int lda, lapack_complex_float* b,\n                                lapack_int ldb );\nlapack_int LAPACKE_zpotrs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, const lapack_complex_double* a,\n                                lapack_int lda, lapack_complex_double* b,\n                                lapack_int ldb );\n\nlapack_int LAPACKE_sppcon_work( int matrix_order, char uplo, lapack_int n,\n                                const float* ap, float anorm, float* rcond,\n                                float* work, lapack_int* iwork );\nlapack_int LAPACKE_dppcon_work( int matrix_order, char uplo, lapack_int n,\n                                const double* ap, double anorm, double* rcond,\n                                double* work, lapack_int* iwork );\nlapack_int LAPACKE_cppcon_work( int matrix_order, char uplo, lapack_int n,\n                                const lapack_complex_float* ap, float anorm,\n                                float* rcond, lapack_complex_float* work,\n                                float* rwork );\nlapack_int LAPACKE_zppcon_work( int matrix_order, char uplo, lapack_int n,\n                                const lapack_complex_double* ap, double anorm,\n                                double* rcond, lapack_complex_double* work,\n                                double* rwork );\n\nlapack_int LAPACKE_sppequ_work( int matrix_order, char uplo, lapack_int n,\n                                const float* ap, float* s, float* scond,\n                                float* amax );\nlapack_int LAPACKE_dppequ_work( int matrix_order, char uplo, lapack_int n,\n                                const double* ap, double* s, double* scond,\n                                double* amax );\nlapack_int LAPACKE_cppequ_work( int matrix_order, char uplo, lapack_int n,\n                                const lapack_complex_float* ap, float* s,\n                                float* scond, float* amax );\nlapack_int LAPACKE_zppequ_work( int matrix_order, char uplo, lapack_int n,\n                                const lapack_complex_double* ap, double* s,\n                                double* scond, double* amax );\n\nlapack_int LAPACKE_spprfs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, const float* ap,\n                                const float* afp, const float* b,\n                                lapack_int ldb, float* x, lapack_int ldx,\n                                float* ferr, float* berr, float* work,\n                                lapack_int* iwork );\nlapack_int LAPACKE_dpprfs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, const double* ap,\n                                const double* afp, const double* b,\n                                lapack_int ldb, double* x, lapack_int ldx,\n                                double* ferr, double* berr, double* work,\n                                lapack_int* iwork );\nlapack_int LAPACKE_cpprfs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, const lapack_complex_float* ap,\n                                const lapack_complex_float* afp,\n                                const lapack_complex_float* b, lapack_int ldb,\n                                lapack_complex_float* x, lapack_int ldx,\n                                float* ferr, float* berr,\n                                lapack_complex_float* work, float* rwork );\nlapack_int LAPACKE_zpprfs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs,\n                                const lapack_complex_double* ap,\n                                const lapack_complex_double* afp,\n                                const lapack_complex_double* b, lapack_int ldb,\n                                lapack_complex_double* x, lapack_int ldx,\n                                double* ferr, double* berr,\n                                lapack_complex_double* work, double* rwork );\n\nlapack_int LAPACKE_sppsv_work( int matrix_order, char uplo, lapack_int n,\n                               lapack_int nrhs, float* ap, float* b,\n                               lapack_int ldb );\nlapack_int LAPACKE_dppsv_work( int matrix_order, char uplo, lapack_int n,\n                               lapack_int nrhs, double* ap, double* b,\n                               lapack_int ldb );\nlapack_int LAPACKE_cppsv_work( int matrix_order, char uplo, lapack_int n,\n                               lapack_int nrhs, lapack_complex_float* ap,\n                               lapack_complex_float* b, lapack_int ldb );\nlapack_int LAPACKE_zppsv_work( int matrix_order, char uplo, lapack_int n,\n                               lapack_int nrhs, lapack_complex_double* ap,\n                               lapack_complex_double* b, lapack_int ldb );\n\nlapack_int LAPACKE_sppsvx_work( int matrix_order, char fact, char uplo,\n                                lapack_int n, lapack_int nrhs, float* ap,\n                                float* afp, char* equed, float* s, float* b,\n                                lapack_int ldb, float* x, lapack_int ldx,\n                                float* rcond, float* ferr, float* berr,\n                                float* work, lapack_int* iwork );\nlapack_int LAPACKE_dppsvx_work( int matrix_order, char fact, char uplo,\n                                lapack_int n, lapack_int nrhs, double* ap,\n                                double* afp, char* equed, double* s, double* b,\n                                lapack_int ldb, double* x, lapack_int ldx,\n                                double* rcond, double* ferr, double* berr,\n                                double* work, lapack_int* iwork );\nlapack_int LAPACKE_cppsvx_work( int matrix_order, char fact, char uplo,\n                                lapack_int n, lapack_int nrhs,\n                                lapack_complex_float* ap,\n                                lapack_complex_float* afp, char* equed,\n                                float* s, lapack_complex_float* b,\n                                lapack_int ldb, lapack_complex_float* x,\n                                lapack_int ldx, float* rcond, float* ferr,\n                                float* berr, lapack_complex_float* work,\n                                float* rwork );\nlapack_int LAPACKE_zppsvx_work( int matrix_order, char fact, char uplo,\n                                lapack_int n, lapack_int nrhs,\n                                lapack_complex_double* ap,\n                                lapack_complex_double* afp, char* equed,\n                                double* s, lapack_complex_double* b,\n                                lapack_int ldb, lapack_complex_double* x,\n                                lapack_int ldx, double* rcond, double* ferr,\n                                double* berr, lapack_complex_double* work,\n                                double* rwork );\n\nlapack_int LAPACKE_spptrf_work( int matrix_order, char uplo, lapack_int n,\n                                float* ap );\nlapack_int LAPACKE_dpptrf_work( int matrix_order, char uplo, lapack_int n,\n                                double* ap );\nlapack_int LAPACKE_cpptrf_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_complex_float* ap );\nlapack_int LAPACKE_zpptrf_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_complex_double* ap );\n\nlapack_int LAPACKE_spptri_work( int matrix_order, char uplo, lapack_int n,\n                                float* ap );\nlapack_int LAPACKE_dpptri_work( int matrix_order, char uplo, lapack_int n,\n                                double* ap );\nlapack_int LAPACKE_cpptri_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_complex_float* ap );\nlapack_int LAPACKE_zpptri_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_complex_double* ap );\n\nlapack_int LAPACKE_spptrs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, const float* ap, float* b,\n                                lapack_int ldb );\nlapack_int LAPACKE_dpptrs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, const double* ap, double* b,\n                                lapack_int ldb );\nlapack_int LAPACKE_cpptrs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, const lapack_complex_float* ap,\n                                lapack_complex_float* b, lapack_int ldb );\nlapack_int LAPACKE_zpptrs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs,\n                                const lapack_complex_double* ap,\n                                lapack_complex_double* b, lapack_int ldb );\n\nlapack_int LAPACKE_spstrf_work( int matrix_order, char uplo, lapack_int n,\n                                float* a, lapack_int lda, lapack_int* piv,\n                                lapack_int* rank, float tol, float* work );\nlapack_int LAPACKE_dpstrf_work( int matrix_order, char uplo, lapack_int n,\n                                double* a, lapack_int lda, lapack_int* piv,\n                                lapack_int* rank, double tol, double* work );\nlapack_int LAPACKE_cpstrf_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_complex_float* a, lapack_int lda,\n                                lapack_int* piv, lapack_int* rank, float tol,\n                                float* work );\nlapack_int LAPACKE_zpstrf_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_complex_double* a, lapack_int lda,\n                                lapack_int* piv, lapack_int* rank, double tol,\n                                double* work );\n\nlapack_int LAPACKE_sptcon_work( lapack_int n, const float* d, const float* e,\n                                float anorm, float* rcond, float* work );\nlapack_int LAPACKE_dptcon_work( lapack_int n, const double* d, const double* e,\n                                double anorm, double* rcond, double* work );\nlapack_int LAPACKE_cptcon_work( lapack_int n, const float* d,\n                                const lapack_complex_float* e, float anorm,\n                                float* rcond, float* work );\nlapack_int LAPACKE_zptcon_work( lapack_int n, const double* d,\n                                const lapack_complex_double* e, double anorm,\n                                double* rcond, double* work );\n\nlapack_int LAPACKE_spteqr_work( int matrix_order, char compz, lapack_int n,\n                                float* d, float* e, float* z, lapack_int ldz,\n                                float* work );\nlapack_int LAPACKE_dpteqr_work( int matrix_order, char compz, lapack_int n,\n                                double* d, double* e, double* z, lapack_int ldz,\n                                double* work );\nlapack_int LAPACKE_cpteqr_work( int matrix_order, char compz, lapack_int n,\n                                float* d, float* e, lapack_complex_float* z,\n                                lapack_int ldz, float* work );\nlapack_int LAPACKE_zpteqr_work( int matrix_order, char compz, lapack_int n,\n                                double* d, double* e, lapack_complex_double* z,\n                                lapack_int ldz, double* work );\n\nlapack_int LAPACKE_sptrfs_work( int matrix_order, lapack_int n, lapack_int nrhs,\n                                const float* d, const float* e, const float* df,\n                                const float* ef, const float* b, lapack_int ldb,\n                                float* x, lapack_int ldx, float* ferr,\n                                float* berr, float* work );\nlapack_int LAPACKE_dptrfs_work( int matrix_order, lapack_int n, lapack_int nrhs,\n                                const double* d, const double* e,\n                                const double* df, const double* ef,\n                                const double* b, lapack_int ldb, double* x,\n                                lapack_int ldx, double* ferr, double* berr,\n                                double* work );\nlapack_int LAPACKE_cptrfs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, const float* d,\n                                const lapack_complex_float* e, const float* df,\n                                const lapack_complex_float* ef,\n                                const lapack_complex_float* b, lapack_int ldb,\n                                lapack_complex_float* x, lapack_int ldx,\n                                float* ferr, float* berr,\n                                lapack_complex_float* work, float* rwork );\nlapack_int LAPACKE_zptrfs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, const double* d,\n                                const lapack_complex_double* e,\n                                const double* df,\n                                const lapack_complex_double* ef,\n                                const lapack_complex_double* b, lapack_int ldb,\n                                lapack_complex_double* x, lapack_int ldx,\n                                double* ferr, double* berr,\n                                lapack_complex_double* work, double* rwork );\n\nlapack_int LAPACKE_sptsv_work( int matrix_order, lapack_int n, lapack_int nrhs,\n                               float* d, float* e, float* b, lapack_int ldb );\nlapack_int LAPACKE_dptsv_work( int matrix_order, lapack_int n, lapack_int nrhs,\n                               double* d, double* e, double* b,\n                               lapack_int ldb );\nlapack_int LAPACKE_cptsv_work( int matrix_order, lapack_int n, lapack_int nrhs,\n                               float* d, lapack_complex_float* e,\n                               lapack_complex_float* b, lapack_int ldb );\nlapack_int LAPACKE_zptsv_work( int matrix_order, lapack_int n, lapack_int nrhs,\n                               double* d, lapack_complex_double* e,\n                               lapack_complex_double* b, lapack_int ldb );\n\nlapack_int LAPACKE_sptsvx_work( int matrix_order, char fact, lapack_int n,\n                                lapack_int nrhs, const float* d, const float* e,\n                                float* df, float* ef, const float* b,\n                                lapack_int ldb, float* x, lapack_int ldx,\n                                float* rcond, float* ferr, float* berr,\n                                float* work );\nlapack_int LAPACKE_dptsvx_work( int matrix_order, char fact, lapack_int n,\n                                lapack_int nrhs, const double* d,\n                                const double* e, double* df, double* ef,\n                                const double* b, lapack_int ldb, double* x,\n                                lapack_int ldx, double* rcond, double* ferr,\n                                double* berr, double* work );\nlapack_int LAPACKE_cptsvx_work( int matrix_order, char fact, lapack_int n,\n                                lapack_int nrhs, const float* d,\n                                const lapack_complex_float* e, float* df,\n                                lapack_complex_float* ef,\n                                const lapack_complex_float* b, lapack_int ldb,\n                                lapack_complex_float* x, lapack_int ldx,\n                                float* rcond, float* ferr, float* berr,\n                                lapack_complex_float* work, float* rwork );\nlapack_int LAPACKE_zptsvx_work( int matrix_order, char fact, lapack_int n,\n                                lapack_int nrhs, const double* d,\n                                const lapack_complex_double* e, double* df,\n                                lapack_complex_double* ef,\n                                const lapack_complex_double* b, lapack_int ldb,\n                                lapack_complex_double* x, lapack_int ldx,\n                                double* rcond, double* ferr, double* berr,\n                                lapack_complex_double* work, double* rwork );\n\nlapack_int LAPACKE_spttrf_work( lapack_int n, float* d, float* e );\nlapack_int LAPACKE_dpttrf_work( lapack_int n, double* d, double* e );\nlapack_int LAPACKE_cpttrf_work( lapack_int n, float* d,\n                                lapack_complex_float* e );\nlapack_int LAPACKE_zpttrf_work( lapack_int n, double* d,\n                                lapack_complex_double* e );\n\nlapack_int LAPACKE_spttrs_work( int matrix_order, lapack_int n, lapack_int nrhs,\n                                const float* d, const float* e, float* b,\n                                lapack_int ldb );\nlapack_int LAPACKE_dpttrs_work( int matrix_order, lapack_int n, lapack_int nrhs,\n                                const double* d, const double* e, double* b,\n                                lapack_int ldb );\nlapack_int LAPACKE_cpttrs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, const float* d,\n                                const lapack_complex_float* e,\n                                lapack_complex_float* b, lapack_int ldb );\nlapack_int LAPACKE_zpttrs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, const double* d,\n                                const lapack_complex_double* e,\n                                lapack_complex_double* b, lapack_int ldb );\n\nlapack_int LAPACKE_ssbev_work( int matrix_order, char jobz, char uplo,\n                               lapack_int n, lapack_int kd, float* ab,\n                               lapack_int ldab, float* w, float* z,\n                               lapack_int ldz, float* work );\nlapack_int LAPACKE_dsbev_work( int matrix_order, char jobz, char uplo,\n                               lapack_int n, lapack_int kd, double* ab,\n                               lapack_int ldab, double* w, double* z,\n                               lapack_int ldz, double* work );\n\nlapack_int LAPACKE_ssbevd_work( int matrix_order, char jobz, char uplo,\n                                lapack_int n, lapack_int kd, float* ab,\n                                lapack_int ldab, float* w, float* z,\n                                lapack_int ldz, float* work, lapack_int lwork,\n                                lapack_int* iwork, lapack_int liwork );\nlapack_int LAPACKE_dsbevd_work( int matrix_order, char jobz, char uplo,\n                                lapack_int n, lapack_int kd, double* ab,\n                                lapack_int ldab, double* w, double* z,\n                                lapack_int ldz, double* work, lapack_int lwork,\n                                lapack_int* iwork, lapack_int liwork );\n\nlapack_int LAPACKE_ssbevx_work( int matrix_order, char jobz, char range,\n                                char uplo, lapack_int n, lapack_int kd,\n                                float* ab, lapack_int ldab, float* q,\n                                lapack_int ldq, float vl, float vu,\n                                lapack_int il, lapack_int iu, float abstol,\n                                lapack_int* m, float* w, float* z,\n                                lapack_int ldz, float* work, lapack_int* iwork,\n                                lapack_int* ifail );\nlapack_int LAPACKE_dsbevx_work( int matrix_order, char jobz, char range,\n                                char uplo, lapack_int n, lapack_int kd,\n                                double* ab, lapack_int ldab, double* q,\n                                lapack_int ldq, double vl, double vu,\n                                lapack_int il, lapack_int iu, double abstol,\n                                lapack_int* m, double* w, double* z,\n                                lapack_int ldz, double* work, lapack_int* iwork,\n                                lapack_int* ifail );\n\nlapack_int LAPACKE_ssbgst_work( int matrix_order, char vect, char uplo,\n                                lapack_int n, lapack_int ka, lapack_int kb,\n                                float* ab, lapack_int ldab, const float* bb,\n                                lapack_int ldbb, float* x, lapack_int ldx,\n                                float* work );\nlapack_int LAPACKE_dsbgst_work( int matrix_order, char vect, char uplo,\n                                lapack_int n, lapack_int ka, lapack_int kb,\n                                double* ab, lapack_int ldab, const double* bb,\n                                lapack_int ldbb, double* x, lapack_int ldx,\n                                double* work );\n\nlapack_int LAPACKE_ssbgv_work( int matrix_order, char jobz, char uplo,\n                               lapack_int n, lapack_int ka, lapack_int kb,\n                               float* ab, lapack_int ldab, float* bb,\n                               lapack_int ldbb, float* w, float* z,\n                               lapack_int ldz, float* work );\nlapack_int LAPACKE_dsbgv_work( int matrix_order, char jobz, char uplo,\n                               lapack_int n, lapack_int ka, lapack_int kb,\n                               double* ab, lapack_int ldab, double* bb,\n                               lapack_int ldbb, double* w, double* z,\n                               lapack_int ldz, double* work );\n\nlapack_int LAPACKE_ssbgvd_work( int matrix_order, char jobz, char uplo,\n                                lapack_int n, lapack_int ka, lapack_int kb,\n                                float* ab, lapack_int ldab, float* bb,\n                                lapack_int ldbb, float* w, float* z,\n                                lapack_int ldz, float* work, lapack_int lwork,\n                                lapack_int* iwork, lapack_int liwork );\nlapack_int LAPACKE_dsbgvd_work( int matrix_order, char jobz, char uplo,\n                                lapack_int n, lapack_int ka, lapack_int kb,\n                                double* ab, lapack_int ldab, double* bb,\n                                lapack_int ldbb, double* w, double* z,\n                                lapack_int ldz, double* work, lapack_int lwork,\n                                lapack_int* iwork, lapack_int liwork );\n\nlapack_int LAPACKE_ssbgvx_work( int matrix_order, char jobz, char range,\n                                char uplo, lapack_int n, lapack_int ka,\n                                lapack_int kb, float* ab, lapack_int ldab,\n                                float* bb, lapack_int ldbb, float* q,\n                                lapack_int ldq, float vl, float vu,\n                                lapack_int il, lapack_int iu, float abstol,\n                                lapack_int* m, float* w, float* z,\n                                lapack_int ldz, float* work, lapack_int* iwork,\n                                lapack_int* ifail );\nlapack_int LAPACKE_dsbgvx_work( int matrix_order, char jobz, char range,\n                                char uplo, lapack_int n, lapack_int ka,\n                                lapack_int kb, double* ab, lapack_int ldab,\n                                double* bb, lapack_int ldbb, double* q,\n                                lapack_int ldq, double vl, double vu,\n                                lapack_int il, lapack_int iu, double abstol,\n                                lapack_int* m, double* w, double* z,\n                                lapack_int ldz, double* work, lapack_int* iwork,\n                                lapack_int* ifail );\n\nlapack_int LAPACKE_ssbtrd_work( int matrix_order, char vect, char uplo,\n                                lapack_int n, lapack_int kd, float* ab,\n                                lapack_int ldab, float* d, float* e, float* q,\n                                lapack_int ldq, float* work );\nlapack_int LAPACKE_dsbtrd_work( int matrix_order, char vect, char uplo,\n                                lapack_int n, lapack_int kd, double* ab,\n                                lapack_int ldab, double* d, double* e,\n                                double* q, lapack_int ldq, double* work );\n\nlapack_int LAPACKE_ssfrk_work( int matrix_order, char transr, char uplo,\n                               char trans, lapack_int n, lapack_int k,\n                               float alpha, const float* a, lapack_int lda,\n                               float beta, float* c );\nlapack_int LAPACKE_dsfrk_work( int matrix_order, char transr, char uplo,\n                               char trans, lapack_int n, lapack_int k,\n                               double alpha, const double* a, lapack_int lda,\n                               double beta, double* c );\n\nlapack_int LAPACKE_sspcon_work( int matrix_order, char uplo, lapack_int n,\n                                const float* ap, const lapack_int* ipiv,\n                                float anorm, float* rcond, float* work,\n                                lapack_int* iwork );\nlapack_int LAPACKE_dspcon_work( int matrix_order, char uplo, lapack_int n,\n                                const double* ap, const lapack_int* ipiv,\n                                double anorm, double* rcond, double* work,\n                                lapack_int* iwork );\nlapack_int LAPACKE_cspcon_work( int matrix_order, char uplo, lapack_int n,\n                                const lapack_complex_float* ap,\n                                const lapack_int* ipiv, float anorm,\n                                float* rcond, lapack_complex_float* work );\nlapack_int LAPACKE_zspcon_work( int matrix_order, char uplo, lapack_int n,\n                                const lapack_complex_double* ap,\n                                const lapack_int* ipiv, double anorm,\n                                double* rcond, lapack_complex_double* work );\n\nlapack_int LAPACKE_sspev_work( int matrix_order, char jobz, char uplo,\n                               lapack_int n, float* ap, float* w, float* z,\n                               lapack_int ldz, float* work );\nlapack_int LAPACKE_dspev_work( int matrix_order, char jobz, char uplo,\n                               lapack_int n, double* ap, double* w, double* z,\n                               lapack_int ldz, double* work );\n\nlapack_int LAPACKE_sspevd_work( int matrix_order, char jobz, char uplo,\n                                lapack_int n, float* ap, float* w, float* z,\n                                lapack_int ldz, float* work, lapack_int lwork,\n                                lapack_int* iwork, lapack_int liwork );\nlapack_int LAPACKE_dspevd_work( int matrix_order, char jobz, char uplo,\n                                lapack_int n, double* ap, double* w, double* z,\n                                lapack_int ldz, double* work, lapack_int lwork,\n                                lapack_int* iwork, lapack_int liwork );\n\nlapack_int LAPACKE_sspevx_work( int matrix_order, char jobz, char range,\n                                char uplo, lapack_int n, float* ap, float vl,\n                                float vu, lapack_int il, lapack_int iu,\n                                float abstol, lapack_int* m, float* w, float* z,\n                                lapack_int ldz, float* work, lapack_int* iwork,\n                                lapack_int* ifail );\nlapack_int LAPACKE_dspevx_work( int matrix_order, char jobz, char range,\n                                char uplo, lapack_int n, double* ap, double vl,\n                                double vu, lapack_int il, lapack_int iu,\n                                double abstol, lapack_int* m, double* w,\n                                double* z, lapack_int ldz, double* work,\n                                lapack_int* iwork, lapack_int* ifail );\n\nlapack_int LAPACKE_sspgst_work( int matrix_order, lapack_int itype, char uplo,\n                                lapack_int n, float* ap, const float* bp );\nlapack_int LAPACKE_dspgst_work( int matrix_order, lapack_int itype, char uplo,\n                                lapack_int n, double* ap, const double* bp );\n\nlapack_int LAPACKE_sspgv_work( int matrix_order, lapack_int itype, char jobz,\n                               char uplo, lapack_int n, float* ap, float* bp,\n                               float* w, float* z, lapack_int ldz,\n                               float* work );\nlapack_int LAPACKE_dspgv_work( int matrix_order, lapack_int itype, char jobz,\n                               char uplo, lapack_int n, double* ap, double* bp,\n                               double* w, double* z, lapack_int ldz,\n                               double* work );\n\nlapack_int LAPACKE_sspgvd_work( int matrix_order, lapack_int itype, char jobz,\n                                char uplo, lapack_int n, float* ap, float* bp,\n                                float* w, float* z, lapack_int ldz, float* work,\n                                lapack_int lwork, lapack_int* iwork,\n                                lapack_int liwork );\nlapack_int LAPACKE_dspgvd_work( int matrix_order, lapack_int itype, char jobz,\n                                char uplo, lapack_int n, double* ap, double* bp,\n                                double* w, double* z, lapack_int ldz,\n                                double* work, lapack_int lwork,\n                                lapack_int* iwork, lapack_int liwork );\n\nlapack_int LAPACKE_sspgvx_work( int matrix_order, lapack_int itype, char jobz,\n                                char range, char uplo, lapack_int n, float* ap,\n                                float* bp, float vl, float vu, lapack_int il,\n                                lapack_int iu, float abstol, lapack_int* m,\n                                float* w, float* z, lapack_int ldz, float* work,\n                                lapack_int* iwork, lapack_int* ifail );\nlapack_int LAPACKE_dspgvx_work( int matrix_order, lapack_int itype, char jobz,\n                                char range, char uplo, lapack_int n, double* ap,\n                                double* bp, double vl, double vu, lapack_int il,\n                                lapack_int iu, double abstol, lapack_int* m,\n                                double* w, double* z, lapack_int ldz,\n                                double* work, lapack_int* iwork,\n                                lapack_int* ifail );\n\nlapack_int LAPACKE_ssprfs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, const float* ap,\n                                const float* afp, const lapack_int* ipiv,\n                                const float* b, lapack_int ldb, float* x,\n                                lapack_int ldx, float* ferr, float* berr,\n                                float* work, lapack_int* iwork );\nlapack_int LAPACKE_dsprfs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, const double* ap,\n                                const double* afp, const lapack_int* ipiv,\n                                const double* b, lapack_int ldb, double* x,\n                                lapack_int ldx, double* ferr, double* berr,\n                                double* work, lapack_int* iwork );\nlapack_int LAPACKE_csprfs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, const lapack_complex_float* ap,\n                                const lapack_complex_float* afp,\n                                const lapack_int* ipiv,\n                                const lapack_complex_float* b, lapack_int ldb,\n                                lapack_complex_float* x, lapack_int ldx,\n                                float* ferr, float* berr,\n                                lapack_complex_float* work, float* rwork );\nlapack_int LAPACKE_zsprfs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs,\n                                const lapack_complex_double* ap,\n                                const lapack_complex_double* afp,\n                                const lapack_int* ipiv,\n                                const lapack_complex_double* b, lapack_int ldb,\n                                lapack_complex_double* x, lapack_int ldx,\n                                double* ferr, double* berr,\n                                lapack_complex_double* work, double* rwork );\n\nlapack_int LAPACKE_sspsv_work( int matrix_order, char uplo, lapack_int n,\n                               lapack_int nrhs, float* ap, lapack_int* ipiv,\n                               float* b, lapack_int ldb );\nlapack_int LAPACKE_dspsv_work( int matrix_order, char uplo, lapack_int n,\n                               lapack_int nrhs, double* ap, lapack_int* ipiv,\n                               double* b, lapack_int ldb );\nlapack_int LAPACKE_cspsv_work( int matrix_order, char uplo, lapack_int n,\n                               lapack_int nrhs, lapack_complex_float* ap,\n                               lapack_int* ipiv, lapack_complex_float* b,\n                               lapack_int ldb );\nlapack_int LAPACKE_zspsv_work( int matrix_order, char uplo, lapack_int n,\n                               lapack_int nrhs, lapack_complex_double* ap,\n                               lapack_int* ipiv, lapack_complex_double* b,\n                               lapack_int ldb );\n\nlapack_int LAPACKE_sspsvx_work( int matrix_order, char fact, char uplo,\n                                lapack_int n, lapack_int nrhs, const float* ap,\n                                float* afp, lapack_int* ipiv, const float* b,\n                                lapack_int ldb, float* x, lapack_int ldx,\n                                float* rcond, float* ferr, float* berr,\n                                float* work, lapack_int* iwork );\nlapack_int LAPACKE_dspsvx_work( int matrix_order, char fact, char uplo,\n                                lapack_int n, lapack_int nrhs, const double* ap,\n                                double* afp, lapack_int* ipiv, const double* b,\n                                lapack_int ldb, double* x, lapack_int ldx,\n                                double* rcond, double* ferr, double* berr,\n                                double* work, lapack_int* iwork );\nlapack_int LAPACKE_cspsvx_work( int matrix_order, char fact, char uplo,\n                                lapack_int n, lapack_int nrhs,\n                                const lapack_complex_float* ap,\n                                lapack_complex_float* afp, lapack_int* ipiv,\n                                const lapack_complex_float* b, lapack_int ldb,\n                                lapack_complex_float* x, lapack_int ldx,\n                                float* rcond, float* ferr, float* berr,\n                                lapack_complex_float* work, float* rwork );\nlapack_int LAPACKE_zspsvx_work( int matrix_order, char fact, char uplo,\n                                lapack_int n, lapack_int nrhs,\n                                const lapack_complex_double* ap,\n                                lapack_complex_double* afp, lapack_int* ipiv,\n                                const lapack_complex_double* b, lapack_int ldb,\n                                lapack_complex_double* x, lapack_int ldx,\n                                double* rcond, double* ferr, double* berr,\n                                lapack_complex_double* work, double* rwork );\n\nlapack_int LAPACKE_ssptrd_work( int matrix_order, char uplo, lapack_int n,\n                                float* ap, float* d, float* e, float* tau );\nlapack_int LAPACKE_dsptrd_work( int matrix_order, char uplo, lapack_int n,\n                                double* ap, double* d, double* e, double* tau );\n\nlapack_int LAPACKE_ssptrf_work( int matrix_order, char uplo, lapack_int n,\n                                float* ap, lapack_int* ipiv );\nlapack_int LAPACKE_dsptrf_work( int matrix_order, char uplo, lapack_int n,\n                                double* ap, lapack_int* ipiv );\nlapack_int LAPACKE_csptrf_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_complex_float* ap, lapack_int* ipiv );\nlapack_int LAPACKE_zsptrf_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_complex_double* ap, lapack_int* ipiv );\n\nlapack_int LAPACKE_ssptri_work( int matrix_order, char uplo, lapack_int n,\n                                float* ap, const lapack_int* ipiv,\n                                float* work );\nlapack_int LAPACKE_dsptri_work( int matrix_order, char uplo, lapack_int n,\n                                double* ap, const lapack_int* ipiv,\n                                double* work );\nlapack_int LAPACKE_csptri_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_complex_float* ap,\n                                const lapack_int* ipiv,\n                                lapack_complex_float* work );\nlapack_int LAPACKE_zsptri_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_complex_double* ap,\n                                const lapack_int* ipiv,\n                                lapack_complex_double* work );\n\nlapack_int LAPACKE_ssptrs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, const float* ap,\n                                const lapack_int* ipiv, float* b,\n                                lapack_int ldb );\nlapack_int LAPACKE_dsptrs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, const double* ap,\n                                const lapack_int* ipiv, double* b,\n                                lapack_int ldb );\nlapack_int LAPACKE_csptrs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, const lapack_complex_float* ap,\n                                const lapack_int* ipiv, lapack_complex_float* b,\n                                lapack_int ldb );\nlapack_int LAPACKE_zsptrs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs,\n                                const lapack_complex_double* ap,\n                                const lapack_int* ipiv,\n                                lapack_complex_double* b, lapack_int ldb );\n\nlapack_int LAPACKE_sstebz_work( char range, char order, lapack_int n, float vl,\n                                float vu, lapack_int il, lapack_int iu,\n                                float abstol, const float* d, const float* e,\n                                lapack_int* m, lapack_int* nsplit, float* w,\n                                lapack_int* iblock, lapack_int* isplit,\n                                float* work, lapack_int* iwork );\nlapack_int LAPACKE_dstebz_work( char range, char order, lapack_int n, double vl,\n                                double vu, lapack_int il, lapack_int iu,\n                                double abstol, const double* d, const double* e,\n                                lapack_int* m, lapack_int* nsplit, double* w,\n                                lapack_int* iblock, lapack_int* isplit,\n                                double* work, lapack_int* iwork );\n\nlapack_int LAPACKE_sstedc_work( int matrix_order, char compz, lapack_int n,\n                                float* d, float* e, float* z, lapack_int ldz,\n                                float* work, lapack_int lwork,\n                                lapack_int* iwork, lapack_int liwork );\nlapack_int LAPACKE_dstedc_work( int matrix_order, char compz, lapack_int n,\n                                double* d, double* e, double* z, lapack_int ldz,\n                                double* work, lapack_int lwork,\n                                lapack_int* iwork, lapack_int liwork );\nlapack_int LAPACKE_cstedc_work( int matrix_order, char compz, lapack_int n,\n                                float* d, float* e, lapack_complex_float* z,\n                                lapack_int ldz, lapack_complex_float* work,\n                                lapack_int lwork, float* rwork,\n                                lapack_int lrwork, lapack_int* iwork,\n                                lapack_int liwork );\nlapack_int LAPACKE_zstedc_work( int matrix_order, char compz, lapack_int n,\n                                double* d, double* e, lapack_complex_double* z,\n                                lapack_int ldz, lapack_complex_double* work,\n                                lapack_int lwork, double* rwork,\n                                lapack_int lrwork, lapack_int* iwork,\n                                lapack_int liwork );\n\nlapack_int LAPACKE_sstegr_work( int matrix_order, char jobz, char range,\n                                lapack_int n, float* d, float* e, float vl,\n                                float vu, lapack_int il, lapack_int iu,\n                                float abstol, lapack_int* m, float* w, float* z,\n                                lapack_int ldz, lapack_int* isuppz, float* work,\n                                lapack_int lwork, lapack_int* iwork,\n                                lapack_int liwork );\nlapack_int LAPACKE_dstegr_work( int matrix_order, char jobz, char range,\n                                lapack_int n, double* d, double* e, double vl,\n                                double vu, lapack_int il, lapack_int iu,\n                                double abstol, lapack_int* m, double* w,\n                                double* z, lapack_int ldz, lapack_int* isuppz,\n                                double* work, lapack_int lwork,\n                                lapack_int* iwork, lapack_int liwork );\nlapack_int LAPACKE_cstegr_work( int matrix_order, char jobz, char range,\n                                lapack_int n, float* d, float* e, float vl,\n                                float vu, lapack_int il, lapack_int iu,\n                                float abstol, lapack_int* m, float* w,\n                                lapack_complex_float* z, lapack_int ldz,\n                                lapack_int* isuppz, float* work,\n                                lapack_int lwork, lapack_int* iwork,\n                                lapack_int liwork );\nlapack_int LAPACKE_zstegr_work( int matrix_order, char jobz, char range,\n                                lapack_int n, double* d, double* e, double vl,\n                                double vu, lapack_int il, lapack_int iu,\n                                double abstol, lapack_int* m, double* w,\n                                lapack_complex_double* z, lapack_int ldz,\n                                lapack_int* isuppz, double* work,\n                                lapack_int lwork, lapack_int* iwork,\n                                lapack_int liwork );\n\nlapack_int LAPACKE_sstein_work( int matrix_order, lapack_int n, const float* d,\n                                const float* e, lapack_int m, const float* w,\n                                const lapack_int* iblock,\n                                const lapack_int* isplit, float* z,\n                                lapack_int ldz, float* work, lapack_int* iwork,\n                                lapack_int* ifailv );\nlapack_int LAPACKE_dstein_work( int matrix_order, lapack_int n, const double* d,\n                                const double* e, lapack_int m, const double* w,\n                                const lapack_int* iblock,\n                                const lapack_int* isplit, double* z,\n                                lapack_int ldz, double* work, lapack_int* iwork,\n                                lapack_int* ifailv );\nlapack_int LAPACKE_cstein_work( int matrix_order, lapack_int n, const float* d,\n                                const float* e, lapack_int m, const float* w,\n                                const lapack_int* iblock,\n                                const lapack_int* isplit,\n                                lapack_complex_float* z, lapack_int ldz,\n                                float* work, lapack_int* iwork,\n                                lapack_int* ifailv );\nlapack_int LAPACKE_zstein_work( int matrix_order, lapack_int n, const double* d,\n                                const double* e, lapack_int m, const double* w,\n                                const lapack_int* iblock,\n                                const lapack_int* isplit,\n                                lapack_complex_double* z, lapack_int ldz,\n                                double* work, lapack_int* iwork,\n                                lapack_int* ifailv );\n\nlapack_int LAPACKE_sstemr_work( int matrix_order, char jobz, char range,\n                                lapack_int n, float* d, float* e, float vl,\n                                float vu, lapack_int il, lapack_int iu,\n                                lapack_int* m, float* w, float* z,\n                                lapack_int ldz, lapack_int nzc,\n                                lapack_int* isuppz, lapack_logical* tryrac,\n                                float* work, lapack_int lwork,\n                                lapack_int* iwork, lapack_int liwork );\nlapack_int LAPACKE_dstemr_work( int matrix_order, char jobz, char range,\n                                lapack_int n, double* d, double* e, double vl,\n                                double vu, lapack_int il, lapack_int iu,\n                                lapack_int* m, double* w, double* z,\n                                lapack_int ldz, lapack_int nzc,\n                                lapack_int* isuppz, lapack_logical* tryrac,\n                                double* work, lapack_int lwork,\n                                lapack_int* iwork, lapack_int liwork );\nlapack_int LAPACKE_cstemr_work( int matrix_order, char jobz, char range,\n                                lapack_int n, float* d, float* e, float vl,\n                                float vu, lapack_int il, lapack_int iu,\n                                lapack_int* m, float* w,\n                                lapack_complex_float* z, lapack_int ldz,\n                                lapack_int nzc, lapack_int* isuppz,\n                                lapack_logical* tryrac, float* work,\n                                lapack_int lwork, lapack_int* iwork,\n                                lapack_int liwork );\nlapack_int LAPACKE_zstemr_work( int matrix_order, char jobz, char range,\n                                lapack_int n, double* d, double* e, double vl,\n                                double vu, lapack_int il, lapack_int iu,\n                                lapack_int* m, double* w,\n                                lapack_complex_double* z, lapack_int ldz,\n                                lapack_int nzc, lapack_int* isuppz,\n                                lapack_logical* tryrac, double* work,\n                                lapack_int lwork, lapack_int* iwork,\n                                lapack_int liwork );\n\nlapack_int LAPACKE_ssteqr_work( int matrix_order, char compz, lapack_int n,\n                                float* d, float* e, float* z, lapack_int ldz,\n                                float* work );\nlapack_int LAPACKE_dsteqr_work( int matrix_order, char compz, lapack_int n,\n                                double* d, double* e, double* z, lapack_int ldz,\n                                double* work );\nlapack_int LAPACKE_csteqr_work( int matrix_order, char compz, lapack_int n,\n                                float* d, float* e, lapack_complex_float* z,\n                                lapack_int ldz, float* work );\nlapack_int LAPACKE_zsteqr_work( int matrix_order, char compz, lapack_int n,\n                                double* d, double* e, lapack_complex_double* z,\n                                lapack_int ldz, double* work );\n\nlapack_int LAPACKE_ssterf_work( lapack_int n, float* d, float* e );\nlapack_int LAPACKE_dsterf_work( lapack_int n, double* d, double* e );\n\nlapack_int LAPACKE_sstev_work( int matrix_order, char jobz, lapack_int n,\n                               float* d, float* e, float* z, lapack_int ldz,\n                               float* work );\nlapack_int LAPACKE_dstev_work( int matrix_order, char jobz, lapack_int n,\n                               double* d, double* e, double* z, lapack_int ldz,\n                               double* work );\n\nlapack_int LAPACKE_sstevd_work( int matrix_order, char jobz, lapack_int n,\n                                float* d, float* e, float* z, lapack_int ldz,\n                                float* work, lapack_int lwork,\n                                lapack_int* iwork, lapack_int liwork );\nlapack_int LAPACKE_dstevd_work( int matrix_order, char jobz, lapack_int n,\n                                double* d, double* e, double* z, lapack_int ldz,\n                                double* work, lapack_int lwork,\n                                lapack_int* iwork, lapack_int liwork );\n\nlapack_int LAPACKE_sstevr_work( int matrix_order, char jobz, char range,\n                                lapack_int n, float* d, float* e, float vl,\n                                float vu, lapack_int il, lapack_int iu,\n                                float abstol, lapack_int* m, float* w, float* z,\n                                lapack_int ldz, lapack_int* isuppz, float* work,\n                                lapack_int lwork, lapack_int* iwork,\n                                lapack_int liwork );\nlapack_int LAPACKE_dstevr_work( int matrix_order, char jobz, char range,\n                                lapack_int n, double* d, double* e, double vl,\n                                double vu, lapack_int il, lapack_int iu,\n                                double abstol, lapack_int* m, double* w,\n                                double* z, lapack_int ldz, lapack_int* isuppz,\n                                double* work, lapack_int lwork,\n                                lapack_int* iwork, lapack_int liwork );\n\nlapack_int LAPACKE_sstevx_work( int matrix_order, char jobz, char range,\n                                lapack_int n, float* d, float* e, float vl,\n                                float vu, lapack_int il, lapack_int iu,\n                                float abstol, lapack_int* m, float* w, float* z,\n                                lapack_int ldz, float* work, lapack_int* iwork,\n                                lapack_int* ifail );\nlapack_int LAPACKE_dstevx_work( int matrix_order, char jobz, char range,\n                                lapack_int n, double* d, double* e, double vl,\n                                double vu, lapack_int il, lapack_int iu,\n                                double abstol, lapack_int* m, double* w,\n                                double* z, lapack_int ldz, double* work,\n                                lapack_int* iwork, lapack_int* ifail );\n\nlapack_int LAPACKE_ssycon_work( int matrix_order, char uplo, lapack_int n,\n                                const float* a, lapack_int lda,\n                                const lapack_int* ipiv, float anorm,\n                                float* rcond, float* work, lapack_int* iwork );\nlapack_int LAPACKE_dsycon_work( int matrix_order, char uplo, lapack_int n,\n                                const double* a, lapack_int lda,\n                                const lapack_int* ipiv, double anorm,\n                                double* rcond, double* work,\n                                lapack_int* iwork );\nlapack_int LAPACKE_csycon_work( int matrix_order, char uplo, lapack_int n,\n                                const lapack_complex_float* a, lapack_int lda,\n                                const lapack_int* ipiv, float anorm,\n                                float* rcond, lapack_complex_float* work );\nlapack_int LAPACKE_zsycon_work( int matrix_order, char uplo, lapack_int n,\n                                const lapack_complex_double* a, lapack_int lda,\n                                const lapack_int* ipiv, double anorm,\n                                double* rcond, lapack_complex_double* work );\n\nlapack_int LAPACKE_ssyequb_work( int matrix_order, char uplo, lapack_int n,\n                                 const float* a, lapack_int lda, float* s,\n                                 float* scond, float* amax, float* work );\nlapack_int LAPACKE_dsyequb_work( int matrix_order, char uplo, lapack_int n,\n                                 const double* a, lapack_int lda, double* s,\n                                 double* scond, double* amax, double* work );\nlapack_int LAPACKE_csyequb_work( int matrix_order, char uplo, lapack_int n,\n                                 const lapack_complex_float* a, lapack_int lda,\n                                 float* s, float* scond, float* amax,\n                                 lapack_complex_float* work );\nlapack_int LAPACKE_zsyequb_work( int matrix_order, char uplo, lapack_int n,\n                                 const lapack_complex_double* a, lapack_int lda,\n                                 double* s, double* scond, double* amax,\n                                 lapack_complex_double* work );\n\nlapack_int LAPACKE_ssyev_work( int matrix_order, char jobz, char uplo,\n                               lapack_int n, float* a, lapack_int lda, float* w,\n                               float* work, lapack_int lwork );\nlapack_int LAPACKE_dsyev_work( int matrix_order, char jobz, char uplo,\n                               lapack_int n, double* a, lapack_int lda,\n                               double* w, double* work, lapack_int lwork );\n\nlapack_int LAPACKE_ssyevd_work( int matrix_order, char jobz, char uplo,\n                                lapack_int n, float* a, lapack_int lda,\n                                float* w, float* work, lapack_int lwork,\n                                lapack_int* iwork, lapack_int liwork );\nlapack_int LAPACKE_dsyevd_work( int matrix_order, char jobz, char uplo,\n                                lapack_int n, double* a, lapack_int lda,\n                                double* w, double* work, lapack_int lwork,\n                                lapack_int* iwork, lapack_int liwork );\n\nlapack_int LAPACKE_ssyevr_work( int matrix_order, char jobz, char range,\n                                char uplo, lapack_int n, float* a,\n                                lapack_int lda, float vl, float vu,\n                                lapack_int il, lapack_int iu, float abstol,\n                                lapack_int* m, float* w, float* z,\n                                lapack_int ldz, lapack_int* isuppz, float* work,\n                                lapack_int lwork, lapack_int* iwork,\n                                lapack_int liwork );\nlapack_int LAPACKE_dsyevr_work( int matrix_order, char jobz, char range,\n                                char uplo, lapack_int n, double* a,\n                                lapack_int lda, double vl, double vu,\n                                lapack_int il, lapack_int iu, double abstol,\n                                lapack_int* m, double* w, double* z,\n                                lapack_int ldz, lapack_int* isuppz,\n                                double* work, lapack_int lwork,\n                                lapack_int* iwork, lapack_int liwork );\n\nlapack_int LAPACKE_ssyevx_work( int matrix_order, char jobz, char range,\n                                char uplo, lapack_int n, float* a,\n                                lapack_int lda, float vl, float vu,\n                                lapack_int il, lapack_int iu, float abstol,\n                                lapack_int* m, float* w, float* z,\n                                lapack_int ldz, float* work, lapack_int lwork,\n                                lapack_int* iwork, lapack_int* ifail );\nlapack_int LAPACKE_dsyevx_work( int matrix_order, char jobz, char range,\n                                char uplo, lapack_int n, double* a,\n                                lapack_int lda, double vl, double vu,\n                                lapack_int il, lapack_int iu, double abstol,\n                                lapack_int* m, double* w, double* z,\n                                lapack_int ldz, double* work, lapack_int lwork,\n                                lapack_int* iwork, lapack_int* ifail );\n\nlapack_int LAPACKE_ssygst_work( int matrix_order, lapack_int itype, char uplo,\n                                lapack_int n, float* a, lapack_int lda,\n                                const float* b, lapack_int ldb );\nlapack_int LAPACKE_dsygst_work( int matrix_order, lapack_int itype, char uplo,\n                                lapack_int n, double* a, lapack_int lda,\n                                const double* b, lapack_int ldb );\n\nlapack_int LAPACKE_ssygv_work( int matrix_order, lapack_int itype, char jobz,\n                               char uplo, lapack_int n, float* a,\n                               lapack_int lda, float* b, lapack_int ldb,\n                               float* w, float* work, lapack_int lwork );\nlapack_int LAPACKE_dsygv_work( int matrix_order, lapack_int itype, char jobz,\n                               char uplo, lapack_int n, double* a,\n                               lapack_int lda, double* b, lapack_int ldb,\n                               double* w, double* work, lapack_int lwork );\n\nlapack_int LAPACKE_ssygvd_work( int matrix_order, lapack_int itype, char jobz,\n                                char uplo, lapack_int n, float* a,\n                                lapack_int lda, float* b, lapack_int ldb,\n                                float* w, float* work, lapack_int lwork,\n                                lapack_int* iwork, lapack_int liwork );\nlapack_int LAPACKE_dsygvd_work( int matrix_order, lapack_int itype, char jobz,\n                                char uplo, lapack_int n, double* a,\n                                lapack_int lda, double* b, lapack_int ldb,\n                                double* w, double* work, lapack_int lwork,\n                                lapack_int* iwork, lapack_int liwork );\n\nlapack_int LAPACKE_ssygvx_work( int matrix_order, lapack_int itype, char jobz,\n                                char range, char uplo, lapack_int n, float* a,\n                                lapack_int lda, float* b, lapack_int ldb,\n                                float vl, float vu, lapack_int il,\n                                lapack_int iu, float abstol, lapack_int* m,\n                                float* w, float* z, lapack_int ldz, float* work,\n                                lapack_int lwork, lapack_int* iwork,\n                                lapack_int* ifail );\nlapack_int LAPACKE_dsygvx_work( int matrix_order, lapack_int itype, char jobz,\n                                char range, char uplo, lapack_int n, double* a,\n                                lapack_int lda, double* b, lapack_int ldb,\n                                double vl, double vu, lapack_int il,\n                                lapack_int iu, double abstol, lapack_int* m,\n                                double* w, double* z, lapack_int ldz,\n                                double* work, lapack_int lwork,\n                                lapack_int* iwork, lapack_int* ifail );\n\nlapack_int LAPACKE_ssyrfs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, const float* a, lapack_int lda,\n                                const float* af, lapack_int ldaf,\n                                const lapack_int* ipiv, const float* b,\n                                lapack_int ldb, float* x, lapack_int ldx,\n                                float* ferr, float* berr, float* work,\n                                lapack_int* iwork );\nlapack_int LAPACKE_dsyrfs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, const double* a,\n                                lapack_int lda, const double* af,\n                                lapack_int ldaf, const lapack_int* ipiv,\n                                const double* b, lapack_int ldb, double* x,\n                                lapack_int ldx, double* ferr, double* berr,\n                                double* work, lapack_int* iwork );\nlapack_int LAPACKE_csyrfs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, const lapack_complex_float* a,\n                                lapack_int lda, const lapack_complex_float* af,\n                                lapack_int ldaf, const lapack_int* ipiv,\n                                const lapack_complex_float* b, lapack_int ldb,\n                                lapack_complex_float* x, lapack_int ldx,\n                                float* ferr, float* berr,\n                                lapack_complex_float* work, float* rwork );\nlapack_int LAPACKE_zsyrfs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, const lapack_complex_double* a,\n                                lapack_int lda, const lapack_complex_double* af,\n                                lapack_int ldaf, const lapack_int* ipiv,\n                                const lapack_complex_double* b, lapack_int ldb,\n                                lapack_complex_double* x, lapack_int ldx,\n                                double* ferr, double* berr,\n                                lapack_complex_double* work, double* rwork );\n\nlapack_int LAPACKE_ssyrfsx_work( int matrix_order, char uplo, char equed,\n                                 lapack_int n, lapack_int nrhs, const float* a,\n                                 lapack_int lda, const float* af,\n                                 lapack_int ldaf, const lapack_int* ipiv,\n                                 const float* s, const float* b, lapack_int ldb,\n                                 float* x, lapack_int ldx, float* rcond,\n                                 float* berr, lapack_int n_err_bnds,\n                                 float* err_bnds_norm, float* err_bnds_comp,\n                                 lapack_int nparams, float* params, float* work,\n                                 lapack_int* iwork );\nlapack_int LAPACKE_dsyrfsx_work( int matrix_order, char uplo, char equed,\n                                 lapack_int n, lapack_int nrhs, const double* a,\n                                 lapack_int lda, const double* af,\n                                 lapack_int ldaf, const lapack_int* ipiv,\n                                 const double* s, const double* b,\n                                 lapack_int ldb, double* x, lapack_int ldx,\n                                 double* rcond, double* berr,\n                                 lapack_int n_err_bnds, double* err_bnds_norm,\n                                 double* err_bnds_comp, lapack_int nparams,\n                                 double* params, double* work,\n                                 lapack_int* iwork );\nlapack_int LAPACKE_csyrfsx_work( int matrix_order, char uplo, char equed,\n                                 lapack_int n, lapack_int nrhs,\n                                 const lapack_complex_float* a, lapack_int lda,\n                                 const lapack_complex_float* af,\n                                 lapack_int ldaf, const lapack_int* ipiv,\n                                 const float* s, const lapack_complex_float* b,\n                                 lapack_int ldb, lapack_complex_float* x,\n                                 lapack_int ldx, float* rcond, float* berr,\n                                 lapack_int n_err_bnds, float* err_bnds_norm,\n                                 float* err_bnds_comp, lapack_int nparams,\n                                 float* params, lapack_complex_float* work,\n                                 float* rwork );\nlapack_int LAPACKE_zsyrfsx_work( int matrix_order, char uplo, char equed,\n                                 lapack_int n, lapack_int nrhs,\n                                 const lapack_complex_double* a, lapack_int lda,\n                                 const lapack_complex_double* af,\n                                 lapack_int ldaf, const lapack_int* ipiv,\n                                 const double* s,\n                                 const lapack_complex_double* b, lapack_int ldb,\n                                 lapack_complex_double* x, lapack_int ldx,\n                                 double* rcond, double* berr,\n                                 lapack_int n_err_bnds, double* err_bnds_norm,\n                                 double* err_bnds_comp, lapack_int nparams,\n                                 double* params, lapack_complex_double* work,\n                                 double* rwork );\n\nlapack_int LAPACKE_ssysv_work( int matrix_order, char uplo, lapack_int n,\n                               lapack_int nrhs, float* a, lapack_int lda,\n                               lapack_int* ipiv, float* b, lapack_int ldb,\n                               float* work, lapack_int lwork );\nlapack_int LAPACKE_dsysv_work( int matrix_order, char uplo, lapack_int n,\n                               lapack_int nrhs, double* a, lapack_int lda,\n                               lapack_int* ipiv, double* b, lapack_int ldb,\n                               double* work, lapack_int lwork );\nlapack_int LAPACKE_csysv_work( int matrix_order, char uplo, lapack_int n,\n                               lapack_int nrhs, lapack_complex_float* a,\n                               lapack_int lda, lapack_int* ipiv,\n                               lapack_complex_float* b, lapack_int ldb,\n                               lapack_complex_float* work, lapack_int lwork );\nlapack_int LAPACKE_zsysv_work( int matrix_order, char uplo, lapack_int n,\n                               lapack_int nrhs, lapack_complex_double* a,\n                               lapack_int lda, lapack_int* ipiv,\n                               lapack_complex_double* b, lapack_int ldb,\n                               lapack_complex_double* work, lapack_int lwork );\n\nlapack_int LAPACKE_ssysvx_work( int matrix_order, char fact, char uplo,\n                                lapack_int n, lapack_int nrhs, const float* a,\n                                lapack_int lda, float* af, lapack_int ldaf,\n                                lapack_int* ipiv, const float* b,\n                                lapack_int ldb, float* x, lapack_int ldx,\n                                float* rcond, float* ferr, float* berr,\n                                float* work, lapack_int lwork,\n                                lapack_int* iwork );\nlapack_int LAPACKE_dsysvx_work( int matrix_order, char fact, char uplo,\n                                lapack_int n, lapack_int nrhs, const double* a,\n                                lapack_int lda, double* af, lapack_int ldaf,\n                                lapack_int* ipiv, const double* b,\n                                lapack_int ldb, double* x, lapack_int ldx,\n                                double* rcond, double* ferr, double* berr,\n                                double* work, lapack_int lwork,\n                                lapack_int* iwork );\nlapack_int LAPACKE_csysvx_work( int matrix_order, char fact, char uplo,\n                                lapack_int n, lapack_int nrhs,\n                                const lapack_complex_float* a, lapack_int lda,\n                                lapack_complex_float* af, lapack_int ldaf,\n                                lapack_int* ipiv, const lapack_complex_float* b,\n                                lapack_int ldb, lapack_complex_float* x,\n                                lapack_int ldx, float* rcond, float* ferr,\n                                float* berr, lapack_complex_float* work,\n                                lapack_int lwork, float* rwork );\nlapack_int LAPACKE_zsysvx_work( int matrix_order, char fact, char uplo,\n                                lapack_int n, lapack_int nrhs,\n                                const lapack_complex_double* a, lapack_int lda,\n                                lapack_complex_double* af, lapack_int ldaf,\n                                lapack_int* ipiv,\n                                const lapack_complex_double* b, lapack_int ldb,\n                                lapack_complex_double* x, lapack_int ldx,\n                                double* rcond, double* ferr, double* berr,\n                                lapack_complex_double* work, lapack_int lwork,\n                                double* rwork );\n\nlapack_int LAPACKE_ssysvxx_work( int matrix_order, char fact, char uplo,\n                                 lapack_int n, lapack_int nrhs, float* a,\n                                 lapack_int lda, float* af, lapack_int ldaf,\n                                 lapack_int* ipiv, char* equed, float* s,\n                                 float* b, lapack_int ldb, float* x,\n                                 lapack_int ldx, float* rcond, float* rpvgrw,\n                                 float* berr, lapack_int n_err_bnds,\n                                 float* err_bnds_norm, float* err_bnds_comp,\n                                 lapack_int nparams, float* params, float* work,\n                                 lapack_int* iwork );\nlapack_int LAPACKE_dsysvxx_work( int matrix_order, char fact, char uplo,\n                                 lapack_int n, lapack_int nrhs, double* a,\n                                 lapack_int lda, double* af, lapack_int ldaf,\n                                 lapack_int* ipiv, char* equed, double* s,\n                                 double* b, lapack_int ldb, double* x,\n                                 lapack_int ldx, double* rcond, double* rpvgrw,\n                                 double* berr, lapack_int n_err_bnds,\n                                 double* err_bnds_norm, double* err_bnds_comp,\n                                 lapack_int nparams, double* params,\n                                 double* work, lapack_int* iwork );\nlapack_int LAPACKE_csysvxx_work( int matrix_order, char fact, char uplo,\n                                 lapack_int n, lapack_int nrhs,\n                                 lapack_complex_float* a, lapack_int lda,\n                                 lapack_complex_float* af, lapack_int ldaf,\n                                 lapack_int* ipiv, char* equed, float* s,\n                                 lapack_complex_float* b, lapack_int ldb,\n                                 lapack_complex_float* x, lapack_int ldx,\n                                 float* rcond, float* rpvgrw, float* berr,\n                                 lapack_int n_err_bnds, float* err_bnds_norm,\n                                 float* err_bnds_comp, lapack_int nparams,\n                                 float* params, lapack_complex_float* work,\n                                 float* rwork );\nlapack_int LAPACKE_zsysvxx_work( int matrix_order, char fact, char uplo,\n                                 lapack_int n, lapack_int nrhs,\n                                 lapack_complex_double* a, lapack_int lda,\n                                 lapack_complex_double* af, lapack_int ldaf,\n                                 lapack_int* ipiv, char* equed, double* s,\n                                 lapack_complex_double* b, lapack_int ldb,\n                                 lapack_complex_double* x, lapack_int ldx,\n                                 double* rcond, double* rpvgrw, double* berr,\n                                 lapack_int n_err_bnds, double* err_bnds_norm,\n                                 double* err_bnds_comp, lapack_int nparams,\n                                 double* params, lapack_complex_double* work,\n                                 double* rwork );\n\nlapack_int LAPACKE_ssytrd_work( int matrix_order, char uplo, lapack_int n,\n                                float* a, lapack_int lda, float* d, float* e,\n                                float* tau, float* work, lapack_int lwork );\nlapack_int LAPACKE_dsytrd_work( int matrix_order, char uplo, lapack_int n,\n                                double* a, lapack_int lda, double* d, double* e,\n                                double* tau, double* work, lapack_int lwork );\n\nlapack_int LAPACKE_ssytrf_work( int matrix_order, char uplo, lapack_int n,\n                                float* a, lapack_int lda, lapack_int* ipiv,\n                                float* work, lapack_int lwork );\nlapack_int LAPACKE_dsytrf_work( int matrix_order, char uplo, lapack_int n,\n                                double* a, lapack_int lda, lapack_int* ipiv,\n                                double* work, lapack_int lwork );\nlapack_int LAPACKE_csytrf_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_complex_float* a, lapack_int lda,\n                                lapack_int* ipiv, lapack_complex_float* work,\n                                lapack_int lwork );\nlapack_int LAPACKE_zsytrf_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_complex_double* a, lapack_int lda,\n                                lapack_int* ipiv, lapack_complex_double* work,\n                                lapack_int lwork );\n\nlapack_int LAPACKE_ssytri_work( int matrix_order, char uplo, lapack_int n,\n                                float* a, lapack_int lda,\n                                const lapack_int* ipiv, float* work );\nlapack_int LAPACKE_dsytri_work( int matrix_order, char uplo, lapack_int n,\n                                double* a, lapack_int lda,\n                                const lapack_int* ipiv, double* work );\nlapack_int LAPACKE_csytri_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_complex_float* a, lapack_int lda,\n                                const lapack_int* ipiv,\n                                lapack_complex_float* work );\nlapack_int LAPACKE_zsytri_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_complex_double* a, lapack_int lda,\n                                const lapack_int* ipiv,\n                                lapack_complex_double* work );\n\nlapack_int LAPACKE_ssytrs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, const float* a, lapack_int lda,\n                                const lapack_int* ipiv, float* b,\n                                lapack_int ldb );\nlapack_int LAPACKE_dsytrs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, const double* a,\n                                lapack_int lda, const lapack_int* ipiv,\n                                double* b, lapack_int ldb );\nlapack_int LAPACKE_csytrs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, const lapack_complex_float* a,\n                                lapack_int lda, const lapack_int* ipiv,\n                                lapack_complex_float* b, lapack_int ldb );\nlapack_int LAPACKE_zsytrs_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_int nrhs, const lapack_complex_double* a,\n                                lapack_int lda, const lapack_int* ipiv,\n                                lapack_complex_double* b, lapack_int ldb );\n\nlapack_int LAPACKE_stbcon_work( int matrix_order, char norm, char uplo,\n                                char diag, lapack_int n, lapack_int kd,\n                                const float* ab, lapack_int ldab, float* rcond,\n                                float* work, lapack_int* iwork );\nlapack_int LAPACKE_dtbcon_work( int matrix_order, char norm, char uplo,\n                                char diag, lapack_int n, lapack_int kd,\n                                const double* ab, lapack_int ldab,\n                                double* rcond, double* work,\n                                lapack_int* iwork );\nlapack_int LAPACKE_ctbcon_work( int matrix_order, char norm, char uplo,\n                                char diag, lapack_int n, lapack_int kd,\n                                const lapack_complex_float* ab, lapack_int ldab,\n                                float* rcond, lapack_complex_float* work,\n                                float* rwork );\nlapack_int LAPACKE_ztbcon_work( int matrix_order, char norm, char uplo,\n                                char diag, lapack_int n, lapack_int kd,\n                                const lapack_complex_double* ab,\n                                lapack_int ldab, double* rcond,\n                                lapack_complex_double* work, double* rwork );\n\nlapack_int LAPACKE_stbrfs_work( int matrix_order, char uplo, char trans,\n                                char diag, lapack_int n, lapack_int kd,\n                                lapack_int nrhs, const float* ab,\n                                lapack_int ldab, const float* b, lapack_int ldb,\n                                const float* x, lapack_int ldx, float* ferr,\n                                float* berr, float* work, lapack_int* iwork );\nlapack_int LAPACKE_dtbrfs_work( int matrix_order, char uplo, char trans,\n                                char diag, lapack_int n, lapack_int kd,\n                                lapack_int nrhs, const double* ab,\n                                lapack_int ldab, const double* b,\n                                lapack_int ldb, const double* x, lapack_int ldx,\n                                double* ferr, double* berr, double* work,\n                                lapack_int* iwork );\nlapack_int LAPACKE_ctbrfs_work( int matrix_order, char uplo, char trans,\n                                char diag, lapack_int n, lapack_int kd,\n                                lapack_int nrhs, const lapack_complex_float* ab,\n                                lapack_int ldab, const lapack_complex_float* b,\n                                lapack_int ldb, const lapack_complex_float* x,\n                                lapack_int ldx, float* ferr, float* berr,\n                                lapack_complex_float* work, float* rwork );\nlapack_int LAPACKE_ztbrfs_work( int matrix_order, char uplo, char trans,\n                                char diag, lapack_int n, lapack_int kd,\n                                lapack_int nrhs,\n                                const lapack_complex_double* ab,\n                                lapack_int ldab, const lapack_complex_double* b,\n                                lapack_int ldb, const lapack_complex_double* x,\n                                lapack_int ldx, double* ferr, double* berr,\n                                lapack_complex_double* work, double* rwork );\n\nlapack_int LAPACKE_stbtrs_work( int matrix_order, char uplo, char trans,\n                                char diag, lapack_int n, lapack_int kd,\n                                lapack_int nrhs, const float* ab,\n                                lapack_int ldab, float* b, lapack_int ldb );\nlapack_int LAPACKE_dtbtrs_work( int matrix_order, char uplo, char trans,\n                                char diag, lapack_int n, lapack_int kd,\n                                lapack_int nrhs, const double* ab,\n                                lapack_int ldab, double* b, lapack_int ldb );\nlapack_int LAPACKE_ctbtrs_work( int matrix_order, char uplo, char trans,\n                                char diag, lapack_int n, lapack_int kd,\n                                lapack_int nrhs, const lapack_complex_float* ab,\n                                lapack_int ldab, lapack_complex_float* b,\n                                lapack_int ldb );\nlapack_int LAPACKE_ztbtrs_work( int matrix_order, char uplo, char trans,\n                                char diag, lapack_int n, lapack_int kd,\n                                lapack_int nrhs,\n                                const lapack_complex_double* ab,\n                                lapack_int ldab, lapack_complex_double* b,\n                                lapack_int ldb );\n\nlapack_int LAPACKE_stfsm_work( int matrix_order, char transr, char side,\n                               char uplo, char trans, char diag, lapack_int m,\n                               lapack_int n, float alpha, const float* a,\n                               float* b, lapack_int ldb );\nlapack_int LAPACKE_dtfsm_work( int matrix_order, char transr, char side,\n                               char uplo, char trans, char diag, lapack_int m,\n                               lapack_int n, double alpha, const double* a,\n                               double* b, lapack_int ldb );\nlapack_int LAPACKE_ctfsm_work( int matrix_order, char transr, char side,\n                               char uplo, char trans, char diag, lapack_int m,\n                               lapack_int n, lapack_complex_float alpha,\n                               const lapack_complex_float* a,\n                               lapack_complex_float* b, lapack_int ldb );\nlapack_int LAPACKE_ztfsm_work( int matrix_order, char transr, char side,\n                               char uplo, char trans, char diag, lapack_int m,\n                               lapack_int n, lapack_complex_double alpha,\n                               const lapack_complex_double* a,\n                               lapack_complex_double* b, lapack_int ldb );\n\nlapack_int LAPACKE_stftri_work( int matrix_order, char transr, char uplo,\n                                char diag, lapack_int n, float* a );\nlapack_int LAPACKE_dtftri_work( int matrix_order, char transr, char uplo,\n                                char diag, lapack_int n, double* a );\nlapack_int LAPACKE_ctftri_work( int matrix_order, char transr, char uplo,\n                                char diag, lapack_int n,\n                                lapack_complex_float* a );\nlapack_int LAPACKE_ztftri_work( int matrix_order, char transr, char uplo,\n                                char diag, lapack_int n,\n                                lapack_complex_double* a );\n\nlapack_int LAPACKE_stfttp_work( int matrix_order, char transr, char uplo,\n                                lapack_int n, const float* arf, float* ap );\nlapack_int LAPACKE_dtfttp_work( int matrix_order, char transr, char uplo,\n                                lapack_int n, const double* arf, double* ap );\nlapack_int LAPACKE_ctfttp_work( int matrix_order, char transr, char uplo,\n                                lapack_int n, const lapack_complex_float* arf,\n                                lapack_complex_float* ap );\nlapack_int LAPACKE_ztfttp_work( int matrix_order, char transr, char uplo,\n                                lapack_int n, const lapack_complex_double* arf,\n                                lapack_complex_double* ap );\n\nlapack_int LAPACKE_stfttr_work( int matrix_order, char transr, char uplo,\n                                lapack_int n, const float* arf, float* a,\n                                lapack_int lda );\nlapack_int LAPACKE_dtfttr_work( int matrix_order, char transr, char uplo,\n                                lapack_int n, const double* arf, double* a,\n                                lapack_int lda );\nlapack_int LAPACKE_ctfttr_work( int matrix_order, char transr, char uplo,\n                                lapack_int n, const lapack_complex_float* arf,\n                                lapack_complex_float* a, lapack_int lda );\nlapack_int LAPACKE_ztfttr_work( int matrix_order, char transr, char uplo,\n                                lapack_int n, const lapack_complex_double* arf,\n                                lapack_complex_double* a, lapack_int lda );\n\nlapack_int LAPACKE_stgevc_work( int matrix_order, char side, char howmny,\n                                const lapack_logical* select, lapack_int n,\n                                const float* s, lapack_int lds, const float* p,\n                                lapack_int ldp, float* vl, lapack_int ldvl,\n                                float* vr, lapack_int ldvr, lapack_int mm,\n                                lapack_int* m, float* work );\nlapack_int LAPACKE_dtgevc_work( int matrix_order, char side, char howmny,\n                                const lapack_logical* select, lapack_int n,\n                                const double* s, lapack_int lds,\n                                const double* p, lapack_int ldp, double* vl,\n                                lapack_int ldvl, double* vr, lapack_int ldvr,\n                                lapack_int mm, lapack_int* m, double* work );\nlapack_int LAPACKE_ctgevc_work( int matrix_order, char side, char howmny,\n                                const lapack_logical* select, lapack_int n,\n                                const lapack_complex_float* s, lapack_int lds,\n                                const lapack_complex_float* p, lapack_int ldp,\n                                lapack_complex_float* vl, lapack_int ldvl,\n                                lapack_complex_float* vr, lapack_int ldvr,\n                                lapack_int mm, lapack_int* m,\n                                lapack_complex_float* work, float* rwork );\nlapack_int LAPACKE_ztgevc_work( int matrix_order, char side, char howmny,\n                                const lapack_logical* select, lapack_int n,\n                                const lapack_complex_double* s, lapack_int lds,\n                                const lapack_complex_double* p, lapack_int ldp,\n                                lapack_complex_double* vl, lapack_int ldvl,\n                                lapack_complex_double* vr, lapack_int ldvr,\n                                lapack_int mm, lapack_int* m,\n                                lapack_complex_double* work, double* rwork );\n\nlapack_int LAPACKE_stgexc_work( int matrix_order, lapack_logical wantq,\n                                lapack_logical wantz, lapack_int n, float* a,\n                                lapack_int lda, float* b, lapack_int ldb,\n                                float* q, lapack_int ldq, float* z,\n                                lapack_int ldz, lapack_int* ifst,\n                                lapack_int* ilst, float* work,\n                                lapack_int lwork );\nlapack_int LAPACKE_dtgexc_work( int matrix_order, lapack_logical wantq,\n                                lapack_logical wantz, lapack_int n, double* a,\n                                lapack_int lda, double* b, lapack_int ldb,\n                                double* q, lapack_int ldq, double* z,\n                                lapack_int ldz, lapack_int* ifst,\n                                lapack_int* ilst, double* work,\n                                lapack_int lwork );\nlapack_int LAPACKE_ctgexc_work( int matrix_order, lapack_logical wantq,\n                                lapack_logical wantz, lapack_int n,\n                                lapack_complex_float* a, lapack_int lda,\n                                lapack_complex_float* b, lapack_int ldb,\n                                lapack_complex_float* q, lapack_int ldq,\n                                lapack_complex_float* z, lapack_int ldz,\n                                lapack_int ifst, lapack_int ilst );\nlapack_int LAPACKE_ztgexc_work( int matrix_order, lapack_logical wantq,\n                                lapack_logical wantz, lapack_int n,\n                                lapack_complex_double* a, lapack_int lda,\n                                lapack_complex_double* b, lapack_int ldb,\n                                lapack_complex_double* q, lapack_int ldq,\n                                lapack_complex_double* z, lapack_int ldz,\n                                lapack_int ifst, lapack_int ilst );\n\nlapack_int LAPACKE_stgsen_work( int matrix_order, lapack_int ijob,\n                                lapack_logical wantq, lapack_logical wantz,\n                                const lapack_logical* select, lapack_int n,\n                                float* a, lapack_int lda, float* b,\n                                lapack_int ldb, float* alphar, float* alphai,\n                                float* beta, float* q, lapack_int ldq, float* z,\n                                lapack_int ldz, lapack_int* m, float* pl,\n                                float* pr, float* dif, float* work,\n                                lapack_int lwork, lapack_int* iwork,\n                                lapack_int liwork );\nlapack_int LAPACKE_dtgsen_work( int matrix_order, lapack_int ijob,\n                                lapack_logical wantq, lapack_logical wantz,\n                                const lapack_logical* select, lapack_int n,\n                                double* a, lapack_int lda, double* b,\n                                lapack_int ldb, double* alphar, double* alphai,\n                                double* beta, double* q, lapack_int ldq,\n                                double* z, lapack_int ldz, lapack_int* m,\n                                double* pl, double* pr, double* dif,\n                                double* work, lapack_int lwork,\n                                lapack_int* iwork, lapack_int liwork );\nlapack_int LAPACKE_ctgsen_work( int matrix_order, lapack_int ijob,\n                                lapack_logical wantq, lapack_logical wantz,\n                                const lapack_logical* select, lapack_int n,\n                                lapack_complex_float* a, lapack_int lda,\n                                lapack_complex_float* b, lapack_int ldb,\n                                lapack_complex_float* alpha,\n                                lapack_complex_float* beta,\n                                lapack_complex_float* q, lapack_int ldq,\n                                lapack_complex_float* z, lapack_int ldz,\n                                lapack_int* m, float* pl, float* pr, float* dif,\n                                lapack_complex_float* work, lapack_int lwork,\n                                lapack_int* iwork, lapack_int liwork );\nlapack_int LAPACKE_ztgsen_work( int matrix_order, lapack_int ijob,\n                                lapack_logical wantq, lapack_logical wantz,\n                                const lapack_logical* select, lapack_int n,\n                                lapack_complex_double* a, lapack_int lda,\n                                lapack_complex_double* b, lapack_int ldb,\n                                lapack_complex_double* alpha,\n                                lapack_complex_double* beta,\n                                lapack_complex_double* q, lapack_int ldq,\n                                lapack_complex_double* z, lapack_int ldz,\n                                lapack_int* m, double* pl, double* pr,\n                                double* dif, lapack_complex_double* work,\n                                lapack_int lwork, lapack_int* iwork,\n                                lapack_int liwork );\n\nlapack_int LAPACKE_stgsja_work( int matrix_order, char jobu, char jobv,\n                                char jobq, lapack_int m, lapack_int p,\n                                lapack_int n, lapack_int k, lapack_int l,\n                                float* a, lapack_int lda, float* b,\n                                lapack_int ldb, float tola, float tolb,\n                                float* alpha, float* beta, float* u,\n                                lapack_int ldu, float* v, lapack_int ldv,\n                                float* q, lapack_int ldq, float* work,\n                                lapack_int* ncycle );\nlapack_int LAPACKE_dtgsja_work( int matrix_order, char jobu, char jobv,\n                                char jobq, lapack_int m, lapack_int p,\n                                lapack_int n, lapack_int k, lapack_int l,\n                                double* a, lapack_int lda, double* b,\n                                lapack_int ldb, double tola, double tolb,\n                                double* alpha, double* beta, double* u,\n                                lapack_int ldu, double* v, lapack_int ldv,\n                                double* q, lapack_int ldq, double* work,\n                                lapack_int* ncycle );\nlapack_int LAPACKE_ctgsja_work( int matrix_order, char jobu, char jobv,\n                                char jobq, lapack_int m, lapack_int p,\n                                lapack_int n, lapack_int k, lapack_int l,\n                                lapack_complex_float* a, lapack_int lda,\n                                lapack_complex_float* b, lapack_int ldb,\n                                float tola, float tolb, float* alpha,\n                                float* beta, lapack_complex_float* u,\n                                lapack_int ldu, lapack_complex_float* v,\n                                lapack_int ldv, lapack_complex_float* q,\n                                lapack_int ldq, lapack_complex_float* work,\n                                lapack_int* ncycle );\nlapack_int LAPACKE_ztgsja_work( int matrix_order, char jobu, char jobv,\n                                char jobq, lapack_int m, lapack_int p,\n                                lapack_int n, lapack_int k, lapack_int l,\n                                lapack_complex_double* a, lapack_int lda,\n                                lapack_complex_double* b, lapack_int ldb,\n                                double tola, double tolb, double* alpha,\n                                double* beta, lapack_complex_double* u,\n                                lapack_int ldu, lapack_complex_double* v,\n                                lapack_int ldv, lapack_complex_double* q,\n                                lapack_int ldq, lapack_complex_double* work,\n                                lapack_int* ncycle );\n\nlapack_int LAPACKE_stgsna_work( int matrix_order, char job, char howmny,\n                                const lapack_logical* select, lapack_int n,\n                                const float* a, lapack_int lda, const float* b,\n                                lapack_int ldb, const float* vl,\n                                lapack_int ldvl, const float* vr,\n                                lapack_int ldvr, float* s, float* dif,\n                                lapack_int mm, lapack_int* m, float* work,\n                                lapack_int lwork, lapack_int* iwork );\nlapack_int LAPACKE_dtgsna_work( int matrix_order, char job, char howmny,\n                                const lapack_logical* select, lapack_int n,\n                                const double* a, lapack_int lda,\n                                const double* b, lapack_int ldb,\n                                const double* vl, lapack_int ldvl,\n                                const double* vr, lapack_int ldvr, double* s,\n                                double* dif, lapack_int mm, lapack_int* m,\n                                double* work, lapack_int lwork,\n                                lapack_int* iwork );\nlapack_int LAPACKE_ctgsna_work( int matrix_order, char job, char howmny,\n                                const lapack_logical* select, lapack_int n,\n                                const lapack_complex_float* a, lapack_int lda,\n                                const lapack_complex_float* b, lapack_int ldb,\n                                const lapack_complex_float* vl, lapack_int ldvl,\n                                const lapack_complex_float* vr, lapack_int ldvr,\n                                float* s, float* dif, lapack_int mm,\n                                lapack_int* m, lapack_complex_float* work,\n                                lapack_int lwork, lapack_int* iwork );\nlapack_int LAPACKE_ztgsna_work( int matrix_order, char job, char howmny,\n                                const lapack_logical* select, lapack_int n,\n                                const lapack_complex_double* a, lapack_int lda,\n                                const lapack_complex_double* b, lapack_int ldb,\n                                const lapack_complex_double* vl,\n                                lapack_int ldvl,\n                                const lapack_complex_double* vr,\n                                lapack_int ldvr, double* s, double* dif,\n                                lapack_int mm, lapack_int* m,\n                                lapack_complex_double* work, lapack_int lwork,\n                                lapack_int* iwork );\n\nlapack_int LAPACKE_stgsyl_work( int matrix_order, char trans, lapack_int ijob,\n                                lapack_int m, lapack_int n, const float* a,\n                                lapack_int lda, const float* b, lapack_int ldb,\n                                float* c, lapack_int ldc, const float* d,\n                                lapack_int ldd, const float* e, lapack_int lde,\n                                float* f, lapack_int ldf, float* scale,\n                                float* dif, float* work, lapack_int lwork,\n                                lapack_int* iwork );\nlapack_int LAPACKE_dtgsyl_work( int matrix_order, char trans, lapack_int ijob,\n                                lapack_int m, lapack_int n, const double* a,\n                                lapack_int lda, const double* b, lapack_int ldb,\n                                double* c, lapack_int ldc, const double* d,\n                                lapack_int ldd, const double* e, lapack_int lde,\n                                double* f, lapack_int ldf, double* scale,\n                                double* dif, double* work, lapack_int lwork,\n                                lapack_int* iwork );\nlapack_int LAPACKE_ctgsyl_work( int matrix_order, char trans, lapack_int ijob,\n                                lapack_int m, lapack_int n,\n                                const lapack_complex_float* a, lapack_int lda,\n                                const lapack_complex_float* b, lapack_int ldb,\n                                lapack_complex_float* c, lapack_int ldc,\n                                const lapack_complex_float* d, lapack_int ldd,\n                                const lapack_complex_float* e, lapack_int lde,\n                                lapack_complex_float* f, lapack_int ldf,\n                                float* scale, float* dif,\n                                lapack_complex_float* work, lapack_int lwork,\n                                lapack_int* iwork );\nlapack_int LAPACKE_ztgsyl_work( int matrix_order, char trans, lapack_int ijob,\n                                lapack_int m, lapack_int n,\n                                const lapack_complex_double* a, lapack_int lda,\n                                const lapack_complex_double* b, lapack_int ldb,\n                                lapack_complex_double* c, lapack_int ldc,\n                                const lapack_complex_double* d, lapack_int ldd,\n                                const lapack_complex_double* e, lapack_int lde,\n                                lapack_complex_double* f, lapack_int ldf,\n                                double* scale, double* dif,\n                                lapack_complex_double* work, lapack_int lwork,\n                                lapack_int* iwork );\n\nlapack_int LAPACKE_stpcon_work( int matrix_order, char norm, char uplo,\n                                char diag, lapack_int n, const float* ap,\n                                float* rcond, float* work, lapack_int* iwork );\nlapack_int LAPACKE_dtpcon_work( int matrix_order, char norm, char uplo,\n                                char diag, lapack_int n, const double* ap,\n                                double* rcond, double* work,\n                                lapack_int* iwork );\nlapack_int LAPACKE_ctpcon_work( int matrix_order, char norm, char uplo,\n                                char diag, lapack_int n,\n                                const lapack_complex_float* ap, float* rcond,\n                                lapack_complex_float* work, float* rwork );\nlapack_int LAPACKE_ztpcon_work( int matrix_order, char norm, char uplo,\n                                char diag, lapack_int n,\n                                const lapack_complex_double* ap, double* rcond,\n                                lapack_complex_double* work, double* rwork );\n\nlapack_int LAPACKE_stprfs_work( int matrix_order, char uplo, char trans,\n                                char diag, lapack_int n, lapack_int nrhs,\n                                const float* ap, const float* b, lapack_int ldb,\n                                const float* x, lapack_int ldx, float* ferr,\n                                float* berr, float* work, lapack_int* iwork );\nlapack_int LAPACKE_dtprfs_work( int matrix_order, char uplo, char trans,\n                                char diag, lapack_int n, lapack_int nrhs,\n                                const double* ap, const double* b,\n                                lapack_int ldb, const double* x, lapack_int ldx,\n                                double* ferr, double* berr, double* work,\n                                lapack_int* iwork );\nlapack_int LAPACKE_ctprfs_work( int matrix_order, char uplo, char trans,\n                                char diag, lapack_int n, lapack_int nrhs,\n                                const lapack_complex_float* ap,\n                                const lapack_complex_float* b, lapack_int ldb,\n                                const lapack_complex_float* x, lapack_int ldx,\n                                float* ferr, float* berr,\n                                lapack_complex_float* work, float* rwork );\nlapack_int LAPACKE_ztprfs_work( int matrix_order, char uplo, char trans,\n                                char diag, lapack_int n, lapack_int nrhs,\n                                const lapack_complex_double* ap,\n                                const lapack_complex_double* b, lapack_int ldb,\n                                const lapack_complex_double* x, lapack_int ldx,\n                                double* ferr, double* berr,\n                                lapack_complex_double* work, double* rwork );\n\nlapack_int LAPACKE_stptri_work( int matrix_order, char uplo, char diag,\n                                lapack_int n, float* ap );\nlapack_int LAPACKE_dtptri_work( int matrix_order, char uplo, char diag,\n                                lapack_int n, double* ap );\nlapack_int LAPACKE_ctptri_work( int matrix_order, char uplo, char diag,\n                                lapack_int n, lapack_complex_float* ap );\nlapack_int LAPACKE_ztptri_work( int matrix_order, char uplo, char diag,\n                                lapack_int n, lapack_complex_double* ap );\n\nlapack_int LAPACKE_stptrs_work( int matrix_order, char uplo, char trans,\n                                char diag, lapack_int n, lapack_int nrhs,\n                                const float* ap, float* b, lapack_int ldb );\nlapack_int LAPACKE_dtptrs_work( int matrix_order, char uplo, char trans,\n                                char diag, lapack_int n, lapack_int nrhs,\n                                const double* ap, double* b, lapack_int ldb );\nlapack_int LAPACKE_ctptrs_work( int matrix_order, char uplo, char trans,\n                                char diag, lapack_int n, lapack_int nrhs,\n                                const lapack_complex_float* ap,\n                                lapack_complex_float* b, lapack_int ldb );\nlapack_int LAPACKE_ztptrs_work( int matrix_order, char uplo, char trans,\n                                char diag, lapack_int n, lapack_int nrhs,\n                                const lapack_complex_double* ap,\n                                lapack_complex_double* b, lapack_int ldb );\n\nlapack_int LAPACKE_stpttf_work( int matrix_order, char transr, char uplo,\n                                lapack_int n, const float* ap, float* arf );\nlapack_int LAPACKE_dtpttf_work( int matrix_order, char transr, char uplo,\n                                lapack_int n, const double* ap, double* arf );\nlapack_int LAPACKE_ctpttf_work( int matrix_order, char transr, char uplo,\n                                lapack_int n, const lapack_complex_float* ap,\n                                lapack_complex_float* arf );\nlapack_int LAPACKE_ztpttf_work( int matrix_order, char transr, char uplo,\n                                lapack_int n, const lapack_complex_double* ap,\n                                lapack_complex_double* arf );\n\nlapack_int LAPACKE_stpttr_work( int matrix_order, char uplo, lapack_int n,\n                                const float* ap, float* a, lapack_int lda );\nlapack_int LAPACKE_dtpttr_work( int matrix_order, char uplo, lapack_int n,\n                                const double* ap, double* a, lapack_int lda );\nlapack_int LAPACKE_ctpttr_work( int matrix_order, char uplo, lapack_int n,\n                                const lapack_complex_float* ap,\n                                lapack_complex_float* a, lapack_int lda );\nlapack_int LAPACKE_ztpttr_work( int matrix_order, char uplo, lapack_int n,\n                                const lapack_complex_double* ap,\n                                lapack_complex_double* a, lapack_int lda );\n\nlapack_int LAPACKE_strcon_work( int matrix_order, char norm, char uplo,\n                                char diag, lapack_int n, const float* a,\n                                lapack_int lda, float* rcond, float* work,\n                                lapack_int* iwork );\nlapack_int LAPACKE_dtrcon_work( int matrix_order, char norm, char uplo,\n                                char diag, lapack_int n, const double* a,\n                                lapack_int lda, double* rcond, double* work,\n                                lapack_int* iwork );\nlapack_int LAPACKE_ctrcon_work( int matrix_order, char norm, char uplo,\n                                char diag, lapack_int n,\n                                const lapack_complex_float* a, lapack_int lda,\n                                float* rcond, lapack_complex_float* work,\n                                float* rwork );\nlapack_int LAPACKE_ztrcon_work( int matrix_order, char norm, char uplo,\n                                char diag, lapack_int n,\n                                const lapack_complex_double* a, lapack_int lda,\n                                double* rcond, lapack_complex_double* work,\n                                double* rwork );\n\nlapack_int LAPACKE_strevc_work( int matrix_order, char side, char howmny,\n                                lapack_logical* select, lapack_int n,\n                                const float* t, lapack_int ldt, float* vl,\n                                lapack_int ldvl, float* vr, lapack_int ldvr,\n                                lapack_int mm, lapack_int* m, float* work );\nlapack_int LAPACKE_dtrevc_work( int matrix_order, char side, char howmny,\n                                lapack_logical* select, lapack_int n,\n                                const double* t, lapack_int ldt, double* vl,\n                                lapack_int ldvl, double* vr, lapack_int ldvr,\n                                lapack_int mm, lapack_int* m, double* work );\nlapack_int LAPACKE_ctrevc_work( int matrix_order, char side, char howmny,\n                                const lapack_logical* select, lapack_int n,\n                                lapack_complex_float* t, lapack_int ldt,\n                                lapack_complex_float* vl, lapack_int ldvl,\n                                lapack_complex_float* vr, lapack_int ldvr,\n                                lapack_int mm, lapack_int* m,\n                                lapack_complex_float* work, float* rwork );\nlapack_int LAPACKE_ztrevc_work( int matrix_order, char side, char howmny,\n                                const lapack_logical* select, lapack_int n,\n                                lapack_complex_double* t, lapack_int ldt,\n                                lapack_complex_double* vl, lapack_int ldvl,\n                                lapack_complex_double* vr, lapack_int ldvr,\n                                lapack_int mm, lapack_int* m,\n                                lapack_complex_double* work, double* rwork );\n\nlapack_int LAPACKE_strexc_work( int matrix_order, char compq, lapack_int n,\n                                float* t, lapack_int ldt, float* q,\n                                lapack_int ldq, lapack_int* ifst,\n                                lapack_int* ilst, float* work );\nlapack_int LAPACKE_dtrexc_work( int matrix_order, char compq, lapack_int n,\n                                double* t, lapack_int ldt, double* q,\n                                lapack_int ldq, lapack_int* ifst,\n                                lapack_int* ilst, double* work );\nlapack_int LAPACKE_ctrexc_work( int matrix_order, char compq, lapack_int n,\n                                lapack_complex_float* t, lapack_int ldt,\n                                lapack_complex_float* q, lapack_int ldq,\n                                lapack_int ifst, lapack_int ilst );\nlapack_int LAPACKE_ztrexc_work( int matrix_order, char compq, lapack_int n,\n                                lapack_complex_double* t, lapack_int ldt,\n                                lapack_complex_double* q, lapack_int ldq,\n                                lapack_int ifst, lapack_int ilst );\n\nlapack_int LAPACKE_strrfs_work( int matrix_order, char uplo, char trans,\n                                char diag, lapack_int n, lapack_int nrhs,\n                                const float* a, lapack_int lda, const float* b,\n                                lapack_int ldb, const float* x, lapack_int ldx,\n                                float* ferr, float* berr, float* work,\n                                lapack_int* iwork );\nlapack_int LAPACKE_dtrrfs_work( int matrix_order, char uplo, char trans,\n                                char diag, lapack_int n, lapack_int nrhs,\n                                const double* a, lapack_int lda,\n                                const double* b, lapack_int ldb,\n                                const double* x, lapack_int ldx, double* ferr,\n                                double* berr, double* work, lapack_int* iwork );\nlapack_int LAPACKE_ctrrfs_work( int matrix_order, char uplo, char trans,\n                                char diag, lapack_int n, lapack_int nrhs,\n                                const lapack_complex_float* a, lapack_int lda,\n                                const lapack_complex_float* b, lapack_int ldb,\n                                const lapack_complex_float* x, lapack_int ldx,\n                                float* ferr, float* berr,\n                                lapack_complex_float* work, float* rwork );\nlapack_int LAPACKE_ztrrfs_work( int matrix_order, char uplo, char trans,\n                                char diag, lapack_int n, lapack_int nrhs,\n                                const lapack_complex_double* a, lapack_int lda,\n                                const lapack_complex_double* b, lapack_int ldb,\n                                const lapack_complex_double* x, lapack_int ldx,\n                                double* ferr, double* berr,\n                                lapack_complex_double* work, double* rwork );\n\nlapack_int LAPACKE_strsen_work( int matrix_order, char job, char compq,\n                                const lapack_logical* select, lapack_int n,\n                                float* t, lapack_int ldt, float* q,\n                                lapack_int ldq, float* wr, float* wi,\n                                lapack_int* m, float* s, float* sep,\n                                float* work, lapack_int lwork,\n                                lapack_int* iwork, lapack_int liwork );\nlapack_int LAPACKE_dtrsen_work( int matrix_order, char job, char compq,\n                                const lapack_logical* select, lapack_int n,\n                                double* t, lapack_int ldt, double* q,\n                                lapack_int ldq, double* wr, double* wi,\n                                lapack_int* m, double* s, double* sep,\n                                double* work, lapack_int lwork,\n                                lapack_int* iwork, lapack_int liwork );\nlapack_int LAPACKE_ctrsen_work( int matrix_order, char job, char compq,\n                                const lapack_logical* select, lapack_int n,\n                                lapack_complex_float* t, lapack_int ldt,\n                                lapack_complex_float* q, lapack_int ldq,\n                                lapack_complex_float* w, lapack_int* m,\n                                float* s, float* sep,\n                                lapack_complex_float* work, lapack_int lwork );\nlapack_int LAPACKE_ztrsen_work( int matrix_order, char job, char compq,\n                                const lapack_logical* select, lapack_int n,\n                                lapack_complex_double* t, lapack_int ldt,\n                                lapack_complex_double* q, lapack_int ldq,\n                                lapack_complex_double* w, lapack_int* m,\n                                double* s, double* sep,\n                                lapack_complex_double* work, lapack_int lwork );\n\nlapack_int LAPACKE_strsna_work( int matrix_order, char job, char howmny,\n                                const lapack_logical* select, lapack_int n,\n                                const float* t, lapack_int ldt, const float* vl,\n                                lapack_int ldvl, const float* vr,\n                                lapack_int ldvr, float* s, float* sep,\n                                lapack_int mm, lapack_int* m, float* work,\n                                lapack_int ldwork, lapack_int* iwork );\nlapack_int LAPACKE_dtrsna_work( int matrix_order, char job, char howmny,\n                                const lapack_logical* select, lapack_int n,\n                                const double* t, lapack_int ldt,\n                                const double* vl, lapack_int ldvl,\n                                const double* vr, lapack_int ldvr, double* s,\n                                double* sep, lapack_int mm, lapack_int* m,\n                                double* work, lapack_int ldwork,\n                                lapack_int* iwork );\nlapack_int LAPACKE_ctrsna_work( int matrix_order, char job, char howmny,\n                                const lapack_logical* select, lapack_int n,\n                                const lapack_complex_float* t, lapack_int ldt,\n                                const lapack_complex_float* vl, lapack_int ldvl,\n                                const lapack_complex_float* vr, lapack_int ldvr,\n                                float* s, float* sep, lapack_int mm,\n                                lapack_int* m, lapack_complex_float* work,\n                                lapack_int ldwork, float* rwork );\nlapack_int LAPACKE_ztrsna_work( int matrix_order, char job, char howmny,\n                                const lapack_logical* select, lapack_int n,\n                                const lapack_complex_double* t, lapack_int ldt,\n                                const lapack_complex_double* vl,\n                                lapack_int ldvl,\n                                const lapack_complex_double* vr,\n                                lapack_int ldvr, double* s, double* sep,\n                                lapack_int mm, lapack_int* m,\n                                lapack_complex_double* work, lapack_int ldwork,\n                                double* rwork );\n\nlapack_int LAPACKE_strsyl_work( int matrix_order, char trana, char tranb,\n                                lapack_int isgn, lapack_int m, lapack_int n,\n                                const float* a, lapack_int lda, const float* b,\n                                lapack_int ldb, float* c, lapack_int ldc,\n                                float* scale );\nlapack_int LAPACKE_dtrsyl_work( int matrix_order, char trana, char tranb,\n                                lapack_int isgn, lapack_int m, lapack_int n,\n                                const double* a, lapack_int lda,\n                                const double* b, lapack_int ldb, double* c,\n                                lapack_int ldc, double* scale );\nlapack_int LAPACKE_ctrsyl_work( int matrix_order, char trana, char tranb,\n                                lapack_int isgn, lapack_int m, lapack_int n,\n                                const lapack_complex_float* a, lapack_int lda,\n                                const lapack_complex_float* b, lapack_int ldb,\n                                lapack_complex_float* c, lapack_int ldc,\n                                float* scale );\nlapack_int LAPACKE_ztrsyl_work( int matrix_order, char trana, char tranb,\n                                lapack_int isgn, lapack_int m, lapack_int n,\n                                const lapack_complex_double* a, lapack_int lda,\n                                const lapack_complex_double* b, lapack_int ldb,\n                                lapack_complex_double* c, lapack_int ldc,\n                                double* scale );\n\nlapack_int LAPACKE_strtri_work( int matrix_order, char uplo, char diag,\n                                lapack_int n, float* a, lapack_int lda );\nlapack_int LAPACKE_dtrtri_work( int matrix_order, char uplo, char diag,\n                                lapack_int n, double* a, lapack_int lda );\nlapack_int LAPACKE_ctrtri_work( int matrix_order, char uplo, char diag,\n                                lapack_int n, lapack_complex_float* a,\n                                lapack_int lda );\nlapack_int LAPACKE_ztrtri_work( int matrix_order, char uplo, char diag,\n                                lapack_int n, lapack_complex_double* a,\n                                lapack_int lda );\n\nlapack_int LAPACKE_strtrs_work( int matrix_order, char uplo, char trans,\n                                char diag, lapack_int n, lapack_int nrhs,\n                                const float* a, lapack_int lda, float* b,\n                                lapack_int ldb );\nlapack_int LAPACKE_dtrtrs_work( int matrix_order, char uplo, char trans,\n                                char diag, lapack_int n, lapack_int nrhs,\n                                const double* a, lapack_int lda, double* b,\n                                lapack_int ldb );\nlapack_int LAPACKE_ctrtrs_work( int matrix_order, char uplo, char trans,\n                                char diag, lapack_int n, lapack_int nrhs,\n                                const lapack_complex_float* a, lapack_int lda,\n                                lapack_complex_float* b, lapack_int ldb );\nlapack_int LAPACKE_ztrtrs_work( int matrix_order, char uplo, char trans,\n                                char diag, lapack_int n, lapack_int nrhs,\n                                const lapack_complex_double* a, lapack_int lda,\n                                lapack_complex_double* b, lapack_int ldb );\n\nlapack_int LAPACKE_strttf_work( int matrix_order, char transr, char uplo,\n                                lapack_int n, const float* a, lapack_int lda,\n                                float* arf );\nlapack_int LAPACKE_dtrttf_work( int matrix_order, char transr, char uplo,\n                                lapack_int n, const double* a, lapack_int lda,\n                                double* arf );\nlapack_int LAPACKE_ctrttf_work( int matrix_order, char transr, char uplo,\n                                lapack_int n, const lapack_complex_float* a,\n                                lapack_int lda, lapack_complex_float* arf );\nlapack_int LAPACKE_ztrttf_work( int matrix_order, char transr, char uplo,\n                                lapack_int n, const lapack_complex_double* a,\n                                lapack_int lda, lapack_complex_double* arf );\n\nlapack_int LAPACKE_strttp_work( int matrix_order, char uplo, lapack_int n,\n                                const float* a, lapack_int lda, float* ap );\nlapack_int LAPACKE_dtrttp_work( int matrix_order, char uplo, lapack_int n,\n                                const double* a, lapack_int lda, double* ap );\nlapack_int LAPACKE_ctrttp_work( int matrix_order, char uplo, lapack_int n,\n                                const lapack_complex_float* a, lapack_int lda,\n                                lapack_complex_float* ap );\nlapack_int LAPACKE_ztrttp_work( int matrix_order, char uplo, lapack_int n,\n                                const lapack_complex_double* a, lapack_int lda,\n                                lapack_complex_double* ap );\n\nlapack_int LAPACKE_stzrzf_work( int matrix_order, lapack_int m, lapack_int n,\n                                float* a, lapack_int lda, float* tau,\n                                float* work, lapack_int lwork );\nlapack_int LAPACKE_dtzrzf_work( int matrix_order, lapack_int m, lapack_int n,\n                                double* a, lapack_int lda, double* tau,\n                                double* work, lapack_int lwork );\nlapack_int LAPACKE_ctzrzf_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_complex_float* a, lapack_int lda,\n                                lapack_complex_float* tau,\n                                lapack_complex_float* work, lapack_int lwork );\nlapack_int LAPACKE_ztzrzf_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_complex_double* a, lapack_int lda,\n                                lapack_complex_double* tau,\n                                lapack_complex_double* work, lapack_int lwork );\n\nlapack_int LAPACKE_cungbr_work( int matrix_order, char vect, lapack_int m,\n                                lapack_int n, lapack_int k,\n                                lapack_complex_float* a, lapack_int lda,\n                                const lapack_complex_float* tau,\n                                lapack_complex_float* work, lapack_int lwork );\nlapack_int LAPACKE_zungbr_work( int matrix_order, char vect, lapack_int m,\n                                lapack_int n, lapack_int k,\n                                lapack_complex_double* a, lapack_int lda,\n                                const lapack_complex_double* tau,\n                                lapack_complex_double* work, lapack_int lwork );\n\nlapack_int LAPACKE_cunghr_work( int matrix_order, lapack_int n, lapack_int ilo,\n                                lapack_int ihi, lapack_complex_float* a,\n                                lapack_int lda, const lapack_complex_float* tau,\n                                lapack_complex_float* work, lapack_int lwork );\nlapack_int LAPACKE_zunghr_work( int matrix_order, lapack_int n, lapack_int ilo,\n                                lapack_int ihi, lapack_complex_double* a,\n                                lapack_int lda,\n                                const lapack_complex_double* tau,\n                                lapack_complex_double* work, lapack_int lwork );\n\nlapack_int LAPACKE_cunglq_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int k, lapack_complex_float* a,\n                                lapack_int lda, const lapack_complex_float* tau,\n                                lapack_complex_float* work, lapack_int lwork );\nlapack_int LAPACKE_zunglq_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int k, lapack_complex_double* a,\n                                lapack_int lda,\n                                const lapack_complex_double* tau,\n                                lapack_complex_double* work, lapack_int lwork );\n\nlapack_int LAPACKE_cungql_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int k, lapack_complex_float* a,\n                                lapack_int lda, const lapack_complex_float* tau,\n                                lapack_complex_float* work, lapack_int lwork );\nlapack_int LAPACKE_zungql_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int k, lapack_complex_double* a,\n                                lapack_int lda,\n                                const lapack_complex_double* tau,\n                                lapack_complex_double* work, lapack_int lwork );\n\nlapack_int LAPACKE_cungqr_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int k, lapack_complex_float* a,\n                                lapack_int lda, const lapack_complex_float* tau,\n                                lapack_complex_float* work, lapack_int lwork );\nlapack_int LAPACKE_zungqr_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int k, lapack_complex_double* a,\n                                lapack_int lda,\n                                const lapack_complex_double* tau,\n                                lapack_complex_double* work, lapack_int lwork );\n\nlapack_int LAPACKE_cungrq_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int k, lapack_complex_float* a,\n                                lapack_int lda, const lapack_complex_float* tau,\n                                lapack_complex_float* work, lapack_int lwork );\nlapack_int LAPACKE_zungrq_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int k, lapack_complex_double* a,\n                                lapack_int lda,\n                                const lapack_complex_double* tau,\n                                lapack_complex_double* work, lapack_int lwork );\n\nlapack_int LAPACKE_cungtr_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_complex_float* a, lapack_int lda,\n                                const lapack_complex_float* tau,\n                                lapack_complex_float* work, lapack_int lwork );\nlapack_int LAPACKE_zungtr_work( int matrix_order, char uplo, lapack_int n,\n                                lapack_complex_double* a, lapack_int lda,\n                                const lapack_complex_double* tau,\n                                lapack_complex_double* work, lapack_int lwork );\n\nlapack_int LAPACKE_cunmbr_work( int matrix_order, char vect, char side,\n                                char trans, lapack_int m, lapack_int n,\n                                lapack_int k, const lapack_complex_float* a,\n                                lapack_int lda, const lapack_complex_float* tau,\n                                lapack_complex_float* c, lapack_int ldc,\n                                lapack_complex_float* work, lapack_int lwork );\nlapack_int LAPACKE_zunmbr_work( int matrix_order, char vect, char side,\n                                char trans, lapack_int m, lapack_int n,\n                                lapack_int k, const lapack_complex_double* a,\n                                lapack_int lda,\n                                const lapack_complex_double* tau,\n                                lapack_complex_double* c, lapack_int ldc,\n                                lapack_complex_double* work, lapack_int lwork );\n\nlapack_int LAPACKE_cunmhr_work( int matrix_order, char side, char trans,\n                                lapack_int m, lapack_int n, lapack_int ilo,\n                                lapack_int ihi, const lapack_complex_float* a,\n                                lapack_int lda, const lapack_complex_float* tau,\n                                lapack_complex_float* c, lapack_int ldc,\n                                lapack_complex_float* work, lapack_int lwork );\nlapack_int LAPACKE_zunmhr_work( int matrix_order, char side, char trans,\n                                lapack_int m, lapack_int n, lapack_int ilo,\n                                lapack_int ihi, const lapack_complex_double* a,\n                                lapack_int lda,\n                                const lapack_complex_double* tau,\n                                lapack_complex_double* c, lapack_int ldc,\n                                lapack_complex_double* work, lapack_int lwork );\n\nlapack_int LAPACKE_cunmlq_work( int matrix_order, char side, char trans,\n                                lapack_int m, lapack_int n, lapack_int k,\n                                const lapack_complex_float* a, lapack_int lda,\n                                const lapack_complex_float* tau,\n                                lapack_complex_float* c, lapack_int ldc,\n                                lapack_complex_float* work, lapack_int lwork );\nlapack_int LAPACKE_zunmlq_work( int matrix_order, char side, char trans,\n                                lapack_int m, lapack_int n, lapack_int k,\n                                const lapack_complex_double* a, lapack_int lda,\n                                const lapack_complex_double* tau,\n                                lapack_complex_double* c, lapack_int ldc,\n                                lapack_complex_double* work, lapack_int lwork );\n\nlapack_int LAPACKE_cunmql_work( int matrix_order, char side, char trans,\n                                lapack_int m, lapack_int n, lapack_int k,\n                                const lapack_complex_float* a, lapack_int lda,\n                                const lapack_complex_float* tau,\n                                lapack_complex_float* c, lapack_int ldc,\n                                lapack_complex_float* work, lapack_int lwork );\nlapack_int LAPACKE_zunmql_work( int matrix_order, char side, char trans,\n                                lapack_int m, lapack_int n, lapack_int k,\n                                const lapack_complex_double* a, lapack_int lda,\n                                const lapack_complex_double* tau,\n                                lapack_complex_double* c, lapack_int ldc,\n                                lapack_complex_double* work, lapack_int lwork );\n\nlapack_int LAPACKE_cunmqr_work( int matrix_order, char side, char trans,\n                                lapack_int m, lapack_int n, lapack_int k,\n                                const lapack_complex_float* a, lapack_int lda,\n                                const lapack_complex_float* tau,\n                                lapack_complex_float* c, lapack_int ldc,\n                                lapack_complex_float* work, lapack_int lwork );\nlapack_int LAPACKE_zunmqr_work( int matrix_order, char side, char trans,\n                                lapack_int m, lapack_int n, lapack_int k,\n                                const lapack_complex_double* a, lapack_int lda,\n                                const lapack_complex_double* tau,\n                                lapack_complex_double* c, lapack_int ldc,\n                                lapack_complex_double* work, lapack_int lwork );\n\nlapack_int LAPACKE_cunmrq_work( int matrix_order, char side, char trans,\n                                lapack_int m, lapack_int n, lapack_int k,\n                                const lapack_complex_float* a, lapack_int lda,\n                                const lapack_complex_float* tau,\n                                lapack_complex_float* c, lapack_int ldc,\n                                lapack_complex_float* work, lapack_int lwork );\nlapack_int LAPACKE_zunmrq_work( int matrix_order, char side, char trans,\n                                lapack_int m, lapack_int n, lapack_int k,\n                                const lapack_complex_double* a, lapack_int lda,\n                                const lapack_complex_double* tau,\n                                lapack_complex_double* c, lapack_int ldc,\n                                lapack_complex_double* work, lapack_int lwork );\n\nlapack_int LAPACKE_cunmrz_work( int matrix_order, char side, char trans,\n                                lapack_int m, lapack_int n, lapack_int k,\n                                lapack_int l, const lapack_complex_float* a,\n                                lapack_int lda, const lapack_complex_float* tau,\n                                lapack_complex_float* c, lapack_int ldc,\n                                lapack_complex_float* work, lapack_int lwork );\nlapack_int LAPACKE_zunmrz_work( int matrix_order, char side, char trans,\n                                lapack_int m, lapack_int n, lapack_int k,\n                                lapack_int l, const lapack_complex_double* a,\n                                lapack_int lda,\n                                const lapack_complex_double* tau,\n                                lapack_complex_double* c, lapack_int ldc,\n                                lapack_complex_double* work, lapack_int lwork );\n\nlapack_int LAPACKE_cunmtr_work( int matrix_order, char side, char uplo,\n                                char trans, lapack_int m, lapack_int n,\n                                const lapack_complex_float* a, lapack_int lda,\n                                const lapack_complex_float* tau,\n                                lapack_complex_float* c, lapack_int ldc,\n                                lapack_complex_float* work, lapack_int lwork );\nlapack_int LAPACKE_zunmtr_work( int matrix_order, char side, char uplo,\n                                char trans, lapack_int m, lapack_int n,\n                                const lapack_complex_double* a, lapack_int lda,\n                                const lapack_complex_double* tau,\n                                lapack_complex_double* c, lapack_int ldc,\n                                lapack_complex_double* work, lapack_int lwork );\n\nlapack_int LAPACKE_cupgtr_work( int matrix_order, char uplo, lapack_int n,\n                                const lapack_complex_float* ap,\n                                const lapack_complex_float* tau,\n                                lapack_complex_float* q, lapack_int ldq,\n                                lapack_complex_float* work );\nlapack_int LAPACKE_zupgtr_work( int matrix_order, char uplo, lapack_int n,\n                                const lapack_complex_double* ap,\n                                const lapack_complex_double* tau,\n                                lapack_complex_double* q, lapack_int ldq,\n                                lapack_complex_double* work );\n\nlapack_int LAPACKE_cupmtr_work( int matrix_order, char side, char uplo,\n                                char trans, lapack_int m, lapack_int n,\n                                const lapack_complex_float* ap,\n                                const lapack_complex_float* tau,\n                                lapack_complex_float* c, lapack_int ldc,\n                                lapack_complex_float* work );\nlapack_int LAPACKE_zupmtr_work( int matrix_order, char side, char uplo,\n                                char trans, lapack_int m, lapack_int n,\n                                const lapack_complex_double* ap,\n                                const lapack_complex_double* tau,\n                                lapack_complex_double* c, lapack_int ldc,\n                                lapack_complex_double* work );\n\nlapack_int LAPACKE_claghe( int matrix_order, lapack_int n, lapack_int k,\n                           const float* d, lapack_complex_float* a,\n                           lapack_int lda, lapack_int* iseed );\nlapack_int LAPACKE_zlaghe( int matrix_order, lapack_int n, lapack_int k,\n                           const double* d, lapack_complex_double* a,\n                           lapack_int lda, lapack_int* iseed );\n\nlapack_int LAPACKE_slagsy( int matrix_order, lapack_int n, lapack_int k,\n                           const float* d, float* a, lapack_int lda,\n                           lapack_int* iseed );\nlapack_int LAPACKE_dlagsy( int matrix_order, lapack_int n, lapack_int k,\n                           const double* d, double* a, lapack_int lda,\n                           lapack_int* iseed );\nlapack_int LAPACKE_clagsy( int matrix_order, lapack_int n, lapack_int k,\n                           const float* d, lapack_complex_float* a,\n                           lapack_int lda, lapack_int* iseed );\nlapack_int LAPACKE_zlagsy( int matrix_order, lapack_int n, lapack_int k,\n                           const double* d, lapack_complex_double* a,\n                           lapack_int lda, lapack_int* iseed );\n\nlapack_int LAPACKE_slapmr( int matrix_order, lapack_logical forwrd,\n                           lapack_int m, lapack_int n, float* x, lapack_int ldx,\n                           lapack_int* k );\nlapack_int LAPACKE_dlapmr( int matrix_order, lapack_logical forwrd,\n                           lapack_int m, lapack_int n, double* x,\n                           lapack_int ldx, lapack_int* k );\nlapack_int LAPACKE_clapmr( int matrix_order, lapack_logical forwrd,\n                           lapack_int m, lapack_int n, lapack_complex_float* x,\n                           lapack_int ldx, lapack_int* k );\nlapack_int LAPACKE_zlapmr( int matrix_order, lapack_logical forwrd,\n                           lapack_int m, lapack_int n, lapack_complex_double* x,\n                           lapack_int ldx, lapack_int* k );\n\n\nfloat LAPACKE_slapy2( float x, float y );\ndouble LAPACKE_dlapy2( double x, double y );\n\nfloat LAPACKE_slapy3( float x, float y, float z );\ndouble LAPACKE_dlapy3( double x, double y, double z );\n\nlapack_int LAPACKE_slartgp( float f, float g, float* cs, float* sn, float* r );\nlapack_int LAPACKE_dlartgp( double f, double g, double* cs, double* sn,\n                            double* r );\n\nlapack_int LAPACKE_slartgs( float x, float y, float sigma, float* cs,\n                            float* sn );\nlapack_int LAPACKE_dlartgs( double x, double y, double sigma, double* cs,\n                            double* sn );\n\n\n//LAPACK 3.3.0\nlapack_int LAPACKE_cbbcsd( int matrix_order, char jobu1, char jobu2,\n                           char jobv1t, char jobv2t, char trans, lapack_int m,\n                           lapack_int p, lapack_int q, float* theta, float* phi,\n                           lapack_complex_float* u1, lapack_int ldu1,\n                           lapack_complex_float* u2, lapack_int ldu2,\n                           lapack_complex_float* v1t, lapack_int ldv1t,\n                           lapack_complex_float* v2t, lapack_int ldv2t,\n                           float* b11d, float* b11e, float* b12d, float* b12e,\n                           float* b21d, float* b21e, float* b22d, float* b22e );\nlapack_int LAPACKE_cbbcsd_work( int matrix_order, char jobu1, char jobu2,\n                                char jobv1t, char jobv2t, char trans,\n                                lapack_int m, lapack_int p, lapack_int q,\n                                float* theta, float* phi,\n                                lapack_complex_float* u1, lapack_int ldu1,\n                                lapack_complex_float* u2, lapack_int ldu2,\n                                lapack_complex_float* v1t, lapack_int ldv1t,\n                                lapack_complex_float* v2t, lapack_int ldv2t,\n                                float* b11d, float* b11e, float* b12d,\n                                float* b12e, float* b21d, float* b21e,\n                                float* b22d, float* b22e, float* rwork,\n                                lapack_int lrwork );\nlapack_int LAPACKE_cheswapr( int matrix_order, char uplo, lapack_int n,\n                             lapack_complex_float* a, lapack_int i1,\n                             lapack_int i2 );\nlapack_int LAPACKE_cheswapr_work( int matrix_order, char uplo, lapack_int n,\n                                  lapack_complex_float* a, lapack_int i1,\n                                  lapack_int i2 );\nlapack_int LAPACKE_chetri2( int matrix_order, char uplo, lapack_int n,\n                            lapack_complex_float* a, lapack_int lda,\n                            const lapack_int* ipiv );\nlapack_int LAPACKE_chetri2_work( int matrix_order, char uplo, lapack_int n,\n                                 lapack_complex_float* a, lapack_int lda,\n                                 const lapack_int* ipiv,\n                                 lapack_complex_float* work, lapack_int lwork );\nlapack_int LAPACKE_chetri2x( int matrix_order, char uplo, lapack_int n,\n                             lapack_complex_float* a, lapack_int lda,\n                             const lapack_int* ipiv, lapack_int nb );\nlapack_int LAPACKE_chetri2x_work( int matrix_order, char uplo, lapack_int n,\n                                  lapack_complex_float* a, lapack_int lda,\n                                  const lapack_int* ipiv,\n                                  lapack_complex_float* work, lapack_int nb );\nlapack_int LAPACKE_chetrs2( int matrix_order, char uplo, lapack_int n,\n                            lapack_int nrhs, const lapack_complex_float* a,\n                            lapack_int lda, const lapack_int* ipiv,\n                            lapack_complex_float* b, lapack_int ldb );\nlapack_int LAPACKE_chetrs2_work( int matrix_order, char uplo, lapack_int n,\n                                 lapack_int nrhs, const lapack_complex_float* a,\n                                 lapack_int lda, const lapack_int* ipiv,\n                                 lapack_complex_float* b, lapack_int ldb,\n                                 lapack_complex_float* work );\nlapack_int LAPACKE_csyconv( int matrix_order, char uplo, char way, lapack_int n,\n                            lapack_complex_float* a, lapack_int lda,\n                            const lapack_int* ipiv );\nlapack_int LAPACKE_csyconv_work( int matrix_order, char uplo, char way,\n                                 lapack_int n, lapack_complex_float* a,\n                                 lapack_int lda, const lapack_int* ipiv,\n                                 lapack_complex_float* work );\nlapack_int LAPACKE_csyswapr( int matrix_order, char uplo, lapack_int n,\n                             lapack_complex_float* a, lapack_int i1,\n                             lapack_int i2 );\nlapack_int LAPACKE_csyswapr_work( int matrix_order, char uplo, lapack_int n,\n                                  lapack_complex_float* a, lapack_int i1,\n                                  lapack_int i2 );\nlapack_int LAPACKE_csytri2( int matrix_order, char uplo, lapack_int n,\n                            lapack_complex_float* a, lapack_int lda,\n                            const lapack_int* ipiv );\nlapack_int LAPACKE_csytri2_work( int matrix_order, char uplo, lapack_int n,\n                                 lapack_complex_float* a, lapack_int lda,\n                                 const lapack_int* ipiv,\n                                 lapack_complex_float* work, lapack_int lwork );\nlapack_int LAPACKE_csytri2x( int matrix_order, char uplo, lapack_int n,\n                             lapack_complex_float* a, lapack_int lda,\n                             const lapack_int* ipiv, lapack_int nb );\nlapack_int LAPACKE_csytri2x_work( int matrix_order, char uplo, lapack_int n,\n                                  lapack_complex_float* a, lapack_int lda,\n                                  const lapack_int* ipiv,\n                                  lapack_complex_float* work, lapack_int nb );\nlapack_int LAPACKE_csytrs2( int matrix_order, char uplo, lapack_int n,\n                            lapack_int nrhs, const lapack_complex_float* a,\n                            lapack_int lda, const lapack_int* ipiv,\n                            lapack_complex_float* b, lapack_int ldb );\nlapack_int LAPACKE_csytrs2_work( int matrix_order, char uplo, lapack_int n,\n                                 lapack_int nrhs, const lapack_complex_float* a,\n                                 lapack_int lda, const lapack_int* ipiv,\n                                 lapack_complex_float* b, lapack_int ldb,\n                                 lapack_complex_float* work );\nlapack_int LAPACKE_cunbdb( int matrix_order, char trans, char signs,\n                           lapack_int m, lapack_int p, lapack_int q,\n                           lapack_complex_float* x11, lapack_int ldx11,\n                           lapack_complex_float* x12, lapack_int ldx12,\n                           lapack_complex_float* x21, lapack_int ldx21,\n                           lapack_complex_float* x22, lapack_int ldx22,\n                           float* theta, float* phi,\n                           lapack_complex_float* taup1,\n                           lapack_complex_float* taup2,\n                           lapack_complex_float* tauq1,\n                           lapack_complex_float* tauq2 );\nlapack_int LAPACKE_cunbdb_work( int matrix_order, char trans, char signs,\n                                lapack_int m, lapack_int p, lapack_int q,\n                                lapack_complex_float* x11, lapack_int ldx11,\n                                lapack_complex_float* x12, lapack_int ldx12,\n                                lapack_complex_float* x21, lapack_int ldx21,\n                                lapack_complex_float* x22, lapack_int ldx22,\n                                float* theta, float* phi,\n                                lapack_complex_float* taup1,\n                                lapack_complex_float* taup2,\n                                lapack_complex_float* tauq1,\n                                lapack_complex_float* tauq2,\n                                lapack_complex_float* work, lapack_int lwork );\nlapack_int LAPACKE_cuncsd( int matrix_order, char jobu1, char jobu2,\n                           char jobv1t, char jobv2t, char trans, char signs,\n                           lapack_int m, lapack_int p, lapack_int q,\n                           lapack_complex_float* x11, lapack_int ldx11,\n                           lapack_complex_float* x12, lapack_int ldx12,\n                           lapack_complex_float* x21, lapack_int ldx21,\n                           lapack_complex_float* x22, lapack_int ldx22,\n                           float* theta, lapack_complex_float* u1,\n                           lapack_int ldu1, lapack_complex_float* u2,\n                           lapack_int ldu2, lapack_complex_float* v1t,\n                           lapack_int ldv1t, lapack_complex_float* v2t,\n                           lapack_int ldv2t );\nlapack_int LAPACKE_cuncsd_work( int matrix_order, char jobu1, char jobu2,\n                                char jobv1t, char jobv2t, char trans,\n                                char signs, lapack_int m, lapack_int p,\n                                lapack_int q, lapack_complex_float* x11,\n                                lapack_int ldx11, lapack_complex_float* x12,\n                                lapack_int ldx12, lapack_complex_float* x21,\n                                lapack_int ldx21, lapack_complex_float* x22,\n                                lapack_int ldx22, float* theta,\n                                lapack_complex_float* u1, lapack_int ldu1,\n                                lapack_complex_float* u2, lapack_int ldu2,\n                                lapack_complex_float* v1t, lapack_int ldv1t,\n                                lapack_complex_float* v2t, lapack_int ldv2t,\n                                lapack_complex_float* work, lapack_int lwork,\n                                float* rwork, lapack_int lrwork,\n                                lapack_int* iwork );\nlapack_int LAPACKE_dbbcsd( int matrix_order, char jobu1, char jobu2,\n                           char jobv1t, char jobv2t, char trans, lapack_int m,\n                           lapack_int p, lapack_int q, double* theta,\n                           double* phi, double* u1, lapack_int ldu1, double* u2,\n                           lapack_int ldu2, double* v1t, lapack_int ldv1t,\n                           double* v2t, lapack_int ldv2t, double* b11d,\n                           double* b11e, double* b12d, double* b12e,\n                           double* b21d, double* b21e, double* b22d,\n                           double* b22e );\nlapack_int LAPACKE_dbbcsd_work( int matrix_order, char jobu1, char jobu2,\n                                char jobv1t, char jobv2t, char trans,\n                                lapack_int m, lapack_int p, lapack_int q,\n                                double* theta, double* phi, double* u1,\n                                lapack_int ldu1, double* u2, lapack_int ldu2,\n                                double* v1t, lapack_int ldv1t, double* v2t,\n                                lapack_int ldv2t, double* b11d, double* b11e,\n                                double* b12d, double* b12e, double* b21d,\n                                double* b21e, double* b22d, double* b22e,\n                                double* work, lapack_int lwork );\nlapack_int LAPACKE_dorbdb( int matrix_order, char trans, char signs,\n                           lapack_int m, lapack_int p, lapack_int q,\n                           double* x11, lapack_int ldx11, double* x12,\n                           lapack_int ldx12, double* x21, lapack_int ldx21,\n                           double* x22, lapack_int ldx22, double* theta,\n                           double* phi, double* taup1, double* taup2,\n                           double* tauq1, double* tauq2 );\nlapack_int LAPACKE_dorbdb_work( int matrix_order, char trans, char signs,\n                                lapack_int m, lapack_int p, lapack_int q,\n                                double* x11, lapack_int ldx11, double* x12,\n                                lapack_int ldx12, double* x21, lapack_int ldx21,\n                                double* x22, lapack_int ldx22, double* theta,\n                                double* phi, double* taup1, double* taup2,\n                                double* tauq1, double* tauq2, double* work,\n                                lapack_int lwork );\nlapack_int LAPACKE_dorcsd( int matrix_order, char jobu1, char jobu2,\n                           char jobv1t, char jobv2t, char trans, char signs,\n                           lapack_int m, lapack_int p, lapack_int q,\n                           double* x11, lapack_int ldx11, double* x12,\n                           lapack_int ldx12, double* x21, lapack_int ldx21,\n                           double* x22, lapack_int ldx22, double* theta,\n                           double* u1, lapack_int ldu1, double* u2,\n                           lapack_int ldu2, double* v1t, lapack_int ldv1t,\n                           double* v2t, lapack_int ldv2t );\nlapack_int LAPACKE_dorcsd_work( int matrix_order, char jobu1, char jobu2,\n                                char jobv1t, char jobv2t, char trans,\n                                char signs, lapack_int m, lapack_int p,\n                                lapack_int q, double* x11, lapack_int ldx11,\n                                double* x12, lapack_int ldx12, double* x21,\n                                lapack_int ldx21, double* x22, lapack_int ldx22,\n                                double* theta, double* u1, lapack_int ldu1,\n                                double* u2, lapack_int ldu2, double* v1t,\n                                lapack_int ldv1t, double* v2t, lapack_int ldv2t,\n                                double* work, lapack_int lwork,\n                                lapack_int* iwork );\nlapack_int LAPACKE_dsyconv( int matrix_order, char uplo, char way, lapack_int n,\n                            double* a, lapack_int lda, const lapack_int* ipiv );\nlapack_int LAPACKE_dsyconv_work( int matrix_order, char uplo, char way,\n                                 lapack_int n, double* a, lapack_int lda,\n                                 const lapack_int* ipiv, double* work );\nlapack_int LAPACKE_dsyswapr( int matrix_order, char uplo, lapack_int n,\n                             double* a, lapack_int i1, lapack_int i2 );\nlapack_int LAPACKE_dsyswapr_work( int matrix_order, char uplo, lapack_int n,\n                                  double* a, lapack_int i1, lapack_int i2 );\nlapack_int LAPACKE_dsytri2( int matrix_order, char uplo, lapack_int n,\n                            double* a, lapack_int lda, const lapack_int* ipiv );\nlapack_int LAPACKE_dsytri2_work( int matrix_order, char uplo, lapack_int n,\n                                 double* a, lapack_int lda,\n                                 const lapack_int* ipiv,\n                                 lapack_complex_double* work, lapack_int lwork );\nlapack_int LAPACKE_dsytri2x( int matrix_order, char uplo, lapack_int n,\n                             double* a, lapack_int lda, const lapack_int* ipiv,\n                             lapack_int nb );\nlapack_int LAPACKE_dsytri2x_work( int matrix_order, char uplo, lapack_int n,\n                                  double* a, lapack_int lda,\n                                  const lapack_int* ipiv, double* work,\n                                  lapack_int nb );\nlapack_int LAPACKE_dsytrs2( int matrix_order, char uplo, lapack_int n,\n                            lapack_int nrhs, const double* a, lapack_int lda,\n                            const lapack_int* ipiv, double* b, lapack_int ldb );\nlapack_int LAPACKE_dsytrs2_work( int matrix_order, char uplo, lapack_int n,\n                                 lapack_int nrhs, const double* a,\n                                 lapack_int lda, const lapack_int* ipiv,\n                                 double* b, lapack_int ldb, double* work );\nlapack_int LAPACKE_sbbcsd( int matrix_order, char jobu1, char jobu2,\n                           char jobv1t, char jobv2t, char trans, lapack_int m,\n                           lapack_int p, lapack_int q, float* theta, float* phi,\n                           float* u1, lapack_int ldu1, float* u2,\n                           lapack_int ldu2, float* v1t, lapack_int ldv1t,\n                           float* v2t, lapack_int ldv2t, float* b11d,\n                           float* b11e, float* b12d, float* b12e, float* b21d,\n                           float* b21e, float* b22d, float* b22e );\nlapack_int LAPACKE_sbbcsd_work( int matrix_order, char jobu1, char jobu2,\n                                char jobv1t, char jobv2t, char trans,\n                                lapack_int m, lapack_int p, lapack_int q,\n                                float* theta, float* phi, float* u1,\n                                lapack_int ldu1, float* u2, lapack_int ldu2,\n                                float* v1t, lapack_int ldv1t, float* v2t,\n                                lapack_int ldv2t, float* b11d, float* b11e,\n                                float* b12d, float* b12e, float* b21d,\n                                float* b21e, float* b22d, float* b22e,\n                                float* work, lapack_int lwork );\nlapack_int LAPACKE_sorbdb( int matrix_order, char trans, char signs,\n                           lapack_int m, lapack_int p, lapack_int q, float* x11,\n                           lapack_int ldx11, float* x12, lapack_int ldx12,\n                           float* x21, lapack_int ldx21, float* x22,\n                           lapack_int ldx22, float* theta, float* phi,\n                           float* taup1, float* taup2, float* tauq1,\n                           float* tauq2 );\nlapack_int LAPACKE_sorbdb_work( int matrix_order, char trans, char signs,\n                                lapack_int m, lapack_int p, lapack_int q,\n                                float* x11, lapack_int ldx11, float* x12,\n                                lapack_int ldx12, float* x21, lapack_int ldx21,\n                                float* x22, lapack_int ldx22, float* theta,\n                                float* phi, float* taup1, float* taup2,\n                                float* tauq1, float* tauq2, float* work,\n                                lapack_int lwork );\nlapack_int LAPACKE_sorcsd( int matrix_order, char jobu1, char jobu2,\n                           char jobv1t, char jobv2t, char trans, char signs,\n                           lapack_int m, lapack_int p, lapack_int q, float* x11,\n                           lapack_int ldx11, float* x12, lapack_int ldx12,\n                           float* x21, lapack_int ldx21, float* x22,\n                           lapack_int ldx22, float* theta, float* u1,\n                           lapack_int ldu1, float* u2, lapack_int ldu2,\n                           float* v1t, lapack_int ldv1t, float* v2t,\n                           lapack_int ldv2t );\nlapack_int LAPACKE_sorcsd_work( int matrix_order, char jobu1, char jobu2,\n                                char jobv1t, char jobv2t, char trans,\n                                char signs, lapack_int m, lapack_int p,\n                                lapack_int q, float* x11, lapack_int ldx11,\n                                float* x12, lapack_int ldx12, float* x21,\n                                lapack_int ldx21, float* x22, lapack_int ldx22,\n                                float* theta, float* u1, lapack_int ldu1,\n                                float* u2, lapack_int ldu2, float* v1t,\n                                lapack_int ldv1t, float* v2t, lapack_int ldv2t,\n                                float* work, lapack_int lwork,\n                                lapack_int* iwork );\nlapack_int LAPACKE_ssyconv( int matrix_order, char uplo, char way, lapack_int n,\n                            float* a, lapack_int lda, const lapack_int* ipiv );\nlapack_int LAPACKE_ssyconv_work( int matrix_order, char uplo, char way,\n                                 lapack_int n, float* a, lapack_int lda,\n                                 const lapack_int* ipiv, float* work );\nlapack_int LAPACKE_ssyswapr( int matrix_order, char uplo, lapack_int n,\n                             float* a, lapack_int i1, lapack_int i2 );\nlapack_int LAPACKE_ssyswapr_work( int matrix_order, char uplo, lapack_int n,\n                                  float* a, lapack_int i1, lapack_int i2 );\nlapack_int LAPACKE_ssytri2( int matrix_order, char uplo, lapack_int n, float* a,\n                            lapack_int lda, const lapack_int* ipiv );\nlapack_int LAPACKE_ssytri2_work( int matrix_order, char uplo, lapack_int n,\n                                 float* a, lapack_int lda,\n                                 const lapack_int* ipiv,\n                                 lapack_complex_float* work, lapack_int lwork );\nlapack_int LAPACKE_ssytri2x( int matrix_order, char uplo, lapack_int n,\n                             float* a, lapack_int lda, const lapack_int* ipiv,\n                             lapack_int nb );\nlapack_int LAPACKE_ssytri2x_work( int matrix_order, char uplo, lapack_int n,\n                                  float* a, lapack_int lda,\n                                  const lapack_int* ipiv, float* work,\n                                  lapack_int nb );\nlapack_int LAPACKE_ssytrs2( int matrix_order, char uplo, lapack_int n,\n                            lapack_int nrhs, const float* a, lapack_int lda,\n                            const lapack_int* ipiv, float* b, lapack_int ldb );\nlapack_int LAPACKE_ssytrs2_work( int matrix_order, char uplo, lapack_int n,\n                                 lapack_int nrhs, const float* a,\n                                 lapack_int lda, const lapack_int* ipiv,\n                                 float* b, lapack_int ldb, float* work );\nlapack_int LAPACKE_zbbcsd( int matrix_order, char jobu1, char jobu2,\n                           char jobv1t, char jobv2t, char trans, lapack_int m,\n                           lapack_int p, lapack_int q, double* theta,\n                           double* phi, lapack_complex_double* u1,\n                           lapack_int ldu1, lapack_complex_double* u2,\n                           lapack_int ldu2, lapack_complex_double* v1t,\n                           lapack_int ldv1t, lapack_complex_double* v2t,\n                           lapack_int ldv2t, double* b11d, double* b11e,\n                           double* b12d, double* b12e, double* b21d,\n                           double* b21e, double* b22d, double* b22e );\nlapack_int LAPACKE_zbbcsd_work( int matrix_order, char jobu1, char jobu2,\n                                char jobv1t, char jobv2t, char trans,\n                                lapack_int m, lapack_int p, lapack_int q,\n                                double* theta, double* phi,\n                                lapack_complex_double* u1, lapack_int ldu1,\n                                lapack_complex_double* u2, lapack_int ldu2,\n                                lapack_complex_double* v1t, lapack_int ldv1t,\n                                lapack_complex_double* v2t, lapack_int ldv2t,\n                                double* b11d, double* b11e, double* b12d,\n                                double* b12e, double* b21d, double* b21e,\n                                double* b22d, double* b22e, double* rwork,\n                                lapack_int lrwork );\nlapack_int LAPACKE_zheswapr( int matrix_order, char uplo, lapack_int n,\n                             lapack_complex_double* a, lapack_int i1,\n                             lapack_int i2 );\nlapack_int LAPACKE_zheswapr_work( int matrix_order, char uplo, lapack_int n,\n                                  lapack_complex_double* a, lapack_int i1,\n                                  lapack_int i2 );\nlapack_int LAPACKE_zhetri2( int matrix_order, char uplo, lapack_int n,\n                            lapack_complex_double* a, lapack_int lda,\n                            const lapack_int* ipiv );\nlapack_int LAPACKE_zhetri2_work( int matrix_order, char uplo, lapack_int n,\n                                 lapack_complex_double* a, lapack_int lda,\n                                 const lapack_int* ipiv,\n                                 lapack_complex_double* work, lapack_int lwork );\nlapack_int LAPACKE_zhetri2x( int matrix_order, char uplo, lapack_int n,\n                             lapack_complex_double* a, lapack_int lda,\n                             const lapack_int* ipiv, lapack_int nb );\nlapack_int LAPACKE_zhetri2x_work( int matrix_order, char uplo, lapack_int n,\n                                  lapack_complex_double* a, lapack_int lda,\n                                  const lapack_int* ipiv,\n                                  lapack_complex_double* work, lapack_int nb );\nlapack_int LAPACKE_zhetrs2( int matrix_order, char uplo, lapack_int n,\n                            lapack_int nrhs, const lapack_complex_double* a,\n                            lapack_int lda, const lapack_int* ipiv,\n                            lapack_complex_double* b, lapack_int ldb );\nlapack_int LAPACKE_zhetrs2_work( int matrix_order, char uplo, lapack_int n,\n                                 lapack_int nrhs, const lapack_complex_double* a,\n                                 lapack_int lda, const lapack_int* ipiv,\n                                 lapack_complex_double* b, lapack_int ldb,\n                                 lapack_complex_double* work );\nlapack_int LAPACKE_zsyconv( int matrix_order, char uplo, char way, lapack_int n,\n                            lapack_complex_double* a, lapack_int lda,\n                            const lapack_int* ipiv );\nlapack_int LAPACKE_zsyconv_work( int matrix_order, char uplo, char way,\n                                 lapack_int n, lapack_complex_double* a,\n                                 lapack_int lda, const lapack_int* ipiv,\n                                 lapack_complex_double* work );\nlapack_int LAPACKE_zsyswapr( int matrix_order, char uplo, lapack_int n,\n                             lapack_complex_double* a, lapack_int i1,\n                             lapack_int i2 );\nlapack_int LAPACKE_zsyswapr_work( int matrix_order, char uplo, lapack_int n,\n                                  lapack_complex_double* a, lapack_int i1,\n                                  lapack_int i2 );\nlapack_int LAPACKE_zsytri2( int matrix_order, char uplo, lapack_int n,\n                            lapack_complex_double* a, lapack_int lda,\n                            const lapack_int* ipiv );\nlapack_int LAPACKE_zsytri2_work( int matrix_order, char uplo, lapack_int n,\n                                 lapack_complex_double* a, lapack_int lda,\n                                 const lapack_int* ipiv,\n                                 lapack_complex_double* work, lapack_int lwork );\nlapack_int LAPACKE_zsytri2x( int matrix_order, char uplo, lapack_int n,\n                             lapack_complex_double* a, lapack_int lda,\n                             const lapack_int* ipiv, lapack_int nb );\nlapack_int LAPACKE_zsytri2x_work( int matrix_order, char uplo, lapack_int n,\n                                  lapack_complex_double* a, lapack_int lda,\n                                  const lapack_int* ipiv,\n                                  lapack_complex_double* work, lapack_int nb );\nlapack_int LAPACKE_zsytrs2( int matrix_order, char uplo, lapack_int n,\n                            lapack_int nrhs, const lapack_complex_double* a,\n                            lapack_int lda, const lapack_int* ipiv,\n                            lapack_complex_double* b, lapack_int ldb );\nlapack_int LAPACKE_zsytrs2_work( int matrix_order, char uplo, lapack_int n,\n                                 lapack_int nrhs, const lapack_complex_double* a,\n                                 lapack_int lda, const lapack_int* ipiv,\n                                 lapack_complex_double* b, lapack_int ldb,\n                                 lapack_complex_double* work );\nlapack_int LAPACKE_zunbdb( int matrix_order, char trans, char signs,\n                           lapack_int m, lapack_int p, lapack_int q,\n                           lapack_complex_double* x11, lapack_int ldx11,\n                           lapack_complex_double* x12, lapack_int ldx12,\n                           lapack_complex_double* x21, lapack_int ldx21,\n                           lapack_complex_double* x22, lapack_int ldx22,\n                           double* theta, double* phi,\n                           lapack_complex_double* taup1,\n                           lapack_complex_double* taup2,\n                           lapack_complex_double* tauq1,\n                           lapack_complex_double* tauq2 );\nlapack_int LAPACKE_zunbdb_work( int matrix_order, char trans, char signs,\n                                lapack_int m, lapack_int p, lapack_int q,\n                                lapack_complex_double* x11, lapack_int ldx11,\n                                lapack_complex_double* x12, lapack_int ldx12,\n                                lapack_complex_double* x21, lapack_int ldx21,\n                                lapack_complex_double* x22, lapack_int ldx22,\n                                double* theta, double* phi,\n                                lapack_complex_double* taup1,\n                                lapack_complex_double* taup2,\n                                lapack_complex_double* tauq1,\n                                lapack_complex_double* tauq2,\n                                lapack_complex_double* work, lapack_int lwork );\nlapack_int LAPACKE_zuncsd( int matrix_order, char jobu1, char jobu2,\n                           char jobv1t, char jobv2t, char trans, char signs,\n                           lapack_int m, lapack_int p, lapack_int q,\n                           lapack_complex_double* x11, lapack_int ldx11,\n                           lapack_complex_double* x12, lapack_int ldx12,\n                           lapack_complex_double* x21, lapack_int ldx21,\n                           lapack_complex_double* x22, lapack_int ldx22,\n                           double* theta, lapack_complex_double* u1,\n                           lapack_int ldu1, lapack_complex_double* u2,\n                           lapack_int ldu2, lapack_complex_double* v1t,\n                           lapack_int ldv1t, lapack_complex_double* v2t,\n                           lapack_int ldv2t );\nlapack_int LAPACKE_zuncsd_work( int matrix_order, char jobu1, char jobu2,\n                                char jobv1t, char jobv2t, char trans,\n                                char signs, lapack_int m, lapack_int p,\n                                lapack_int q, lapack_complex_double* x11,\n                                lapack_int ldx11, lapack_complex_double* x12,\n                                lapack_int ldx12, lapack_complex_double* x21,\n                                lapack_int ldx21, lapack_complex_double* x22,\n                                lapack_int ldx22, double* theta,\n                                lapack_complex_double* u1, lapack_int ldu1,\n                                lapack_complex_double* u2, lapack_int ldu2,\n                                lapack_complex_double* v1t, lapack_int ldv1t,\n                                lapack_complex_double* v2t, lapack_int ldv2t,\n                                lapack_complex_double* work, lapack_int lwork,\n                                double* rwork, lapack_int lrwork,\n                                lapack_int* iwork );\n//LAPACK 3.4.0\nlapack_int LAPACKE_sgemqrt( int matrix_order, char side, char trans,\n                            lapack_int m, lapack_int n, lapack_int k,\n                            lapack_int nb, const float* v, lapack_int ldv,\n                            const float* t, lapack_int ldt, float* c,\n                            lapack_int ldc );\nlapack_int LAPACKE_dgemqrt( int matrix_order, char side, char trans,\n                            lapack_int m, lapack_int n, lapack_int k,\n                            lapack_int nb, const double* v, lapack_int ldv,\n                            const double* t, lapack_int ldt, double* c,\n                            lapack_int ldc );\nlapack_int LAPACKE_cgemqrt( int matrix_order, char side, char trans,\n                            lapack_int m, lapack_int n, lapack_int k,\n                            lapack_int nb, const lapack_complex_float* v,\n                            lapack_int ldv, const lapack_complex_float* t,\n                            lapack_int ldt, lapack_complex_float* c,\n                            lapack_int ldc );\nlapack_int LAPACKE_zgemqrt( int matrix_order, char side, char trans,\n                            lapack_int m, lapack_int n, lapack_int k,\n                            lapack_int nb, const lapack_complex_double* v,\n                            lapack_int ldv, const lapack_complex_double* t,\n                            lapack_int ldt, lapack_complex_double* c,\n                            lapack_int ldc );\n\nlapack_int LAPACKE_sgeqrt( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int nb, float* a, lapack_int lda, float* t,\n                           lapack_int ldt );\nlapack_int LAPACKE_dgeqrt( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int nb, double* a, lapack_int lda, double* t,\n                           lapack_int ldt );\nlapack_int LAPACKE_cgeqrt( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int nb, lapack_complex_float* a,\n                           lapack_int lda, lapack_complex_float* t,\n                           lapack_int ldt );\nlapack_int LAPACKE_zgeqrt( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int nb, lapack_complex_double* a,\n                           lapack_int lda, lapack_complex_double* t,\n                           lapack_int ldt );\n\nlapack_int LAPACKE_sgeqrt2( int matrix_order, lapack_int m, lapack_int n,\n                            float* a, lapack_int lda, float* t,\n                            lapack_int ldt );\nlapack_int LAPACKE_dgeqrt2( int matrix_order, lapack_int m, lapack_int n,\n                            double* a, lapack_int lda, double* t,\n                            lapack_int ldt );\nlapack_int LAPACKE_cgeqrt2( int matrix_order, lapack_int m, lapack_int n,\n                            lapack_complex_float* a, lapack_int lda,\n                            lapack_complex_float* t, lapack_int ldt );\nlapack_int LAPACKE_zgeqrt2( int matrix_order, lapack_int m, lapack_int n,\n                            lapack_complex_double* a, lapack_int lda,\n                            lapack_complex_double* t, lapack_int ldt );\n\nlapack_int LAPACKE_sgeqrt3( int matrix_order, lapack_int m, lapack_int n,\n                            float* a, lapack_int lda, float* t,\n                            lapack_int ldt );\nlapack_int LAPACKE_dgeqrt3( int matrix_order, lapack_int m, lapack_int n,\n                            double* a, lapack_int lda, double* t,\n                            lapack_int ldt );\nlapack_int LAPACKE_cgeqrt3( int matrix_order, lapack_int m, lapack_int n,\n                            lapack_complex_float* a, lapack_int lda,\n                            lapack_complex_float* t, lapack_int ldt );\nlapack_int LAPACKE_zgeqrt3( int matrix_order, lapack_int m, lapack_int n,\n                            lapack_complex_double* a, lapack_int lda,\n                            lapack_complex_double* t, lapack_int ldt );\n\nlapack_int LAPACKE_stpmqrt( int matrix_order, char side, char trans,\n                            lapack_int m, lapack_int n, lapack_int k,\n                            lapack_int l, lapack_int nb, const float* v,\n                            lapack_int ldv, const float* t, lapack_int ldt,\n                            float* a, lapack_int lda, float* b,\n                            lapack_int ldb );\nlapack_int LAPACKE_dtpmqrt( int matrix_order, char side, char trans,\n                            lapack_int m, lapack_int n, lapack_int k,\n                            lapack_int l, lapack_int nb, const double* v,\n                            lapack_int ldv, const double* t, lapack_int ldt,\n                            double* a, lapack_int lda, double* b,\n                            lapack_int ldb );\nlapack_int LAPACKE_ctpmqrt( int matrix_order, char side, char trans,\n                            lapack_int m, lapack_int n, lapack_int k,\n                            lapack_int l, lapack_int nb,\n                            const lapack_complex_float* v, lapack_int ldv,\n                            const lapack_complex_float* t, lapack_int ldt,\n                            lapack_complex_float* a, lapack_int lda,\n                            lapack_complex_float* b, lapack_int ldb );\nlapack_int LAPACKE_ztpmqrt( int matrix_order, char side, char trans,\n                            lapack_int m, lapack_int n, lapack_int k,\n                            lapack_int l, lapack_int nb,\n                            const lapack_complex_double* v, lapack_int ldv,\n                            const lapack_complex_double* t, lapack_int ldt,\n                            lapack_complex_double* a, lapack_int lda,\n                            lapack_complex_double* b, lapack_int ldb );\n\nlapack_int LAPACKE_dtpqrt( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int l, lapack_int nb, double* a,\n                           lapack_int lda, double* b, lapack_int ldb, double* t,\n                           lapack_int ldt );\nlapack_int LAPACKE_ctpqrt( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int l, lapack_int nb, lapack_complex_float* a,\n                           lapack_int lda, lapack_complex_float* t,\n                           lapack_complex_float* b, lapack_int ldb,\n                           lapack_int ldt );\nlapack_int LAPACKE_ztpqrt( int matrix_order, lapack_int m, lapack_int n,\n                           lapack_int l, lapack_int nb,\n                           lapack_complex_double* a, lapack_int lda,\n                           lapack_complex_double* b, lapack_int ldb,\n                           lapack_complex_double* t, lapack_int ldt );\n\nlapack_int LAPACKE_stpqrt2( int matrix_order, lapack_int m, lapack_int n,\n                            float* a, lapack_int lda, float* b, lapack_int ldb,\n                            float* t, lapack_int ldt );\nlapack_int LAPACKE_dtpqrt2( int matrix_order, lapack_int m, lapack_int n,\n                            double* a, lapack_int lda, double* b,\n                            lapack_int ldb, double* t, lapack_int ldt );\nlapack_int LAPACKE_ctpqrt2( int matrix_order, lapack_int m, lapack_int n,\n                            lapack_complex_float* a, lapack_int lda,\n                            lapack_complex_float* b, lapack_int ldb,\n                            lapack_complex_float* t, lapack_int ldt );\nlapack_int LAPACKE_ztpqrt2( int matrix_order, lapack_int m, lapack_int n,\n                            lapack_complex_double* a, lapack_int lda,\n                            lapack_complex_double* b, lapack_int ldb,\n                            lapack_complex_double* t, lapack_int ldt );\n\nlapack_int LAPACKE_stprfb( int matrix_order, char side, char trans, char direct,\n                           char storev, lapack_int m, lapack_int n,\n                           lapack_int k, lapack_int l, const float* v,\n                           lapack_int ldv, const float* t, lapack_int ldt,\n                           float* a, lapack_int lda, float* b, lapack_int ldb,\n                           lapack_int myldwork );\nlapack_int LAPACKE_dtprfb( int matrix_order, char side, char trans, char direct,\n                           char storev, lapack_int m, lapack_int n,\n                           lapack_int k, lapack_int l, const double* v,\n                           lapack_int ldv, const double* t, lapack_int ldt,\n                           double* a, lapack_int lda, double* b, lapack_int ldb,\n                           lapack_int myldwork );\nlapack_int LAPACKE_ctprfb( int matrix_order, char side, char trans, char direct,\n                           char storev, lapack_int m, lapack_int n,\n                           lapack_int k, lapack_int l,\n                           const lapack_complex_float* v, lapack_int ldv,\n                           const lapack_complex_float* t, lapack_int ldt,\n                           lapack_complex_float* a, lapack_int lda,\n                           lapack_complex_float* b, lapack_int ldb,\n                           lapack_int myldwork );\nlapack_int LAPACKE_ztprfb( int matrix_order, char side, char trans, char direct,\n                           char storev, lapack_int m, lapack_int n,\n                           lapack_int k, lapack_int l,\n                           const lapack_complex_double* v, lapack_int ldv,\n                           const lapack_complex_double* t, lapack_int ldt,\n                           lapack_complex_double* a, lapack_int lda,\n                           lapack_complex_double* b, lapack_int ldb,\n                           lapack_int myldwork );\n\nlapack_int LAPACKE_sgemqrt_work( int matrix_order, char side, char trans,\n                                 lapack_int m, lapack_int n, lapack_int k,\n                                 lapack_int nb, const float* v, lapack_int ldv,\n                                 const float* t, lapack_int ldt, float* c,\n                                 lapack_int ldc, float* work );\nlapack_int LAPACKE_dgemqrt_work( int matrix_order, char side, char trans,\n                                 lapack_int m, lapack_int n, lapack_int k,\n                                 lapack_int nb, const double* v, lapack_int ldv,\n                                 const double* t, lapack_int ldt, double* c,\n                                 lapack_int ldc, double* work );\nlapack_int LAPACKE_cgemqrt_work( int matrix_order, char side, char trans,\n                                 lapack_int m, lapack_int n, lapack_int k,\n                                 lapack_int nb, const lapack_complex_float* v,\n                                 lapack_int ldv, const lapack_complex_float* t,\n                                 lapack_int ldt, lapack_complex_float* c,\n                                 lapack_int ldc, lapack_complex_float* work );\nlapack_int LAPACKE_zgemqrt_work( int matrix_order, char side, char trans,\n                                 lapack_int m, lapack_int n, lapack_int k,\n                                 lapack_int nb, const lapack_complex_double* v,\n                                 lapack_int ldv, const lapack_complex_double* t,\n                                 lapack_int ldt, lapack_complex_double* c,\n                                 lapack_int ldc, lapack_complex_double* work );\n\nlapack_int LAPACKE_sgeqrt_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int nb, float* a, lapack_int lda,\n                                float* t, lapack_int ldt, float* work );\nlapack_int LAPACKE_dgeqrt_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int nb, double* a, lapack_int lda,\n                                double* t, lapack_int ldt, double* work );\nlapack_int LAPACKE_cgeqrt_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int nb, lapack_complex_float* a,\n                                lapack_int lda, lapack_complex_float* t,\n                                lapack_int ldt, lapack_complex_float* work );\nlapack_int LAPACKE_zgeqrt_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int nb, lapack_complex_double* a,\n                                lapack_int lda, lapack_complex_double* t,\n                                lapack_int ldt, lapack_complex_double* work );\n\nlapack_int LAPACKE_sgeqrt2_work( int matrix_order, lapack_int m, lapack_int n,\n                                 float* a, lapack_int lda, float* t,\n                                 lapack_int ldt );\nlapack_int LAPACKE_dgeqrt2_work( int matrix_order, lapack_int m, lapack_int n,\n                                 double* a, lapack_int lda, double* t,\n                                 lapack_int ldt );\nlapack_int LAPACKE_cgeqrt2_work( int matrix_order, lapack_int m, lapack_int n,\n                                 lapack_complex_float* a, lapack_int lda,\n                                 lapack_complex_float* t, lapack_int ldt );\nlapack_int LAPACKE_zgeqrt2_work( int matrix_order, lapack_int m, lapack_int n,\n                                 lapack_complex_double* a, lapack_int lda,\n                                 lapack_complex_double* t, lapack_int ldt );\n\nlapack_int LAPACKE_sgeqrt3_work( int matrix_order, lapack_int m, lapack_int n,\n                                 float* a, lapack_int lda, float* t,\n                                 lapack_int ldt );\nlapack_int LAPACKE_dgeqrt3_work( int matrix_order, lapack_int m, lapack_int n,\n                                 double* a, lapack_int lda, double* t,\n                                 lapack_int ldt );\nlapack_int LAPACKE_cgeqrt3_work( int matrix_order, lapack_int m, lapack_int n,\n                                 lapack_complex_float* a, lapack_int lda,\n                                 lapack_complex_float* t, lapack_int ldt );\nlapack_int LAPACKE_zgeqrt3_work( int matrix_order, lapack_int m, lapack_int n,\n                                 lapack_complex_double* a, lapack_int lda,\n                                 lapack_complex_double* t, lapack_int ldt );\n\nlapack_int LAPACKE_stpmqrt_work( int matrix_order, char side, char trans,\n                                 lapack_int m, lapack_int n, lapack_int k,\n                                 lapack_int l, lapack_int nb, const float* v,\n                                 lapack_int ldv, const float* t, lapack_int ldt,\n                                 float* a, lapack_int lda, float* b,\n                                 lapack_int ldb, float* work );\nlapack_int LAPACKE_dtpmqrt_work( int matrix_order, char side, char trans,\n                                 lapack_int m, lapack_int n, lapack_int k,\n                                 lapack_int l, lapack_int nb, const double* v,\n                                 lapack_int ldv, const double* t,\n                                 lapack_int ldt, double* a, lapack_int lda,\n                                 double* b, lapack_int ldb, double* work );\nlapack_int LAPACKE_ctpmqrt_work( int matrix_order, char side, char trans,\n                                 lapack_int m, lapack_int n, lapack_int k,\n                                 lapack_int l, lapack_int nb,\n                                 const lapack_complex_float* v, lapack_int ldv,\n                                 const lapack_complex_float* t, lapack_int ldt,\n                                 lapack_complex_float* a, lapack_int lda,\n                                 lapack_complex_float* b, lapack_int ldb,\n                                 lapack_complex_float* work );\nlapack_int LAPACKE_ztpmqrt_work( int matrix_order, char side, char trans,\n                                 lapack_int m, lapack_int n, lapack_int k,\n                                 lapack_int l, lapack_int nb,\n                                 const lapack_complex_double* v, lapack_int ldv,\n                                 const lapack_complex_double* t, lapack_int ldt,\n                                 lapack_complex_double* a, lapack_int lda,\n                                 lapack_complex_double* b, lapack_int ldb,\n                                 lapack_complex_double* work );\n\nlapack_int LAPACKE_dtpqrt_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int l, lapack_int nb, double* a,\n                                lapack_int lda, double* b, lapack_int ldb,\n                                double* t, lapack_int ldt, double* work );\nlapack_int LAPACKE_ctpqrt_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int l, lapack_int nb,\n                                lapack_complex_float* a, lapack_int lda,\n                                lapack_complex_float* t,\n                                lapack_complex_float* b, lapack_int ldb,\n                                lapack_int ldt, lapack_complex_float* work );\nlapack_int LAPACKE_ztpqrt_work( int matrix_order, lapack_int m, lapack_int n,\n                                lapack_int l, lapack_int nb,\n                                lapack_complex_double* a, lapack_int lda,\n                                lapack_complex_double* b, lapack_int ldb,\n                                lapack_complex_double* t, lapack_int ldt,\n                                lapack_complex_double* work );\n\nlapack_int LAPACKE_stpqrt2_work( int matrix_order, lapack_int m, lapack_int n,\n                                 float* a, lapack_int lda, float* b,\n                                 lapack_int ldb, float* t, lapack_int ldt );\nlapack_int LAPACKE_dtpqrt2_work( int matrix_order, lapack_int m, lapack_int n,\n                                 double* a, lapack_int lda, double* b,\n                                 lapack_int ldb, double* t, lapack_int ldt );\nlapack_int LAPACKE_ctpqrt2_work( int matrix_order, lapack_int m, lapack_int n,\n                                 lapack_complex_float* a, lapack_int lda,\n                                 lapack_complex_float* b, lapack_int ldb,\n                                 lapack_complex_float* t, lapack_int ldt );\nlapack_int LAPACKE_ztpqrt2_work( int matrix_order, lapack_int m, lapack_int n,\n                                 lapack_complex_double* a, lapack_int lda,\n                                 lapack_complex_double* b, lapack_int ldb,\n                                 lapack_complex_double* t, lapack_int ldt );\n\nlapack_int LAPACKE_stprfb_work( int matrix_order, char side, char trans,\n                                char direct, char storev, lapack_int m,\n                                lapack_int n, lapack_int k, lapack_int l,\n                                const float* v, lapack_int ldv, const float* t,\n                                lapack_int ldt, float* a, lapack_int lda,\n                                float* b, lapack_int ldb, const float* mywork,\n                                lapack_int myldwork );\nlapack_int LAPACKE_dtprfb_work( int matrix_order, char side, char trans,\n                                char direct, char storev, lapack_int m,\n                                lapack_int n, lapack_int k, lapack_int l,\n                                const double* v, lapack_int ldv,\n                                const double* t, lapack_int ldt, double* a,\n                                lapack_int lda, double* b, lapack_int ldb,\n                                const double* mywork, lapack_int myldwork );\nlapack_int LAPACKE_ctprfb_work( int matrix_order, char side, char trans,\n                                char direct, char storev, lapack_int m,\n                                lapack_int n, lapack_int k, lapack_int l,\n                                const lapack_complex_float* v, lapack_int ldv,\n                                const lapack_complex_float* t, lapack_int ldt,\n                                lapack_complex_float* a, lapack_int lda,\n                                lapack_complex_float* b, lapack_int ldb,\n                                const float* mywork, lapack_int myldwork );\nlapack_int LAPACKE_ztprfb_work( int matrix_order, char side, char trans,\n                                char direct, char storev, lapack_int m,\n                                lapack_int n, lapack_int k, lapack_int l,\n                                const lapack_complex_double* v, lapack_int ldv,\n                                const lapack_complex_double* t, lapack_int ldt,\n                                lapack_complex_double* a, lapack_int lda,\n                                lapack_complex_double* b, lapack_int ldb,\n                                const double* mywork, lapack_int myldwork );\n//LAPACK 3.X.X\nlapack_int LAPACKE_csyr( int matrix_order, char uplo, lapack_int n,\n                             lapack_complex_float alpha,\n                             const lapack_complex_float* x, lapack_int incx,\n                             lapack_complex_float* a, lapack_int lda );\nlapack_int LAPACKE_zsyr( int matrix_order, char uplo, lapack_int n,\n                             lapack_complex_double alpha,\n                             const lapack_complex_double* x, lapack_int incx,\n                             lapack_complex_double* a, lapack_int lda );\n\nlapack_int LAPACKE_csyr_work( int matrix_order, char uplo, lapack_int n,\n                                  lapack_complex_float alpha,\n                                  const lapack_complex_float* x,\n                                  lapack_int incx, lapack_complex_float* a,\n                                  lapack_int lda );\nlapack_int LAPACKE_zsyr_work( int matrix_order, char uplo, lapack_int n,\n                                  lapack_complex_double alpha,\n                                  const lapack_complex_double* x,\n                                  lapack_int incx, lapack_complex_double* a,\n                                  lapack_int lda );\n\n\n\n#define LAPACK_sgetrf LAPACK_GLOBAL(sgetrf,SGETRF)\n#define LAPACK_dgetrf LAPACK_GLOBAL(dgetrf,DGETRF)\n#define LAPACK_cgetrf LAPACK_GLOBAL(cgetrf,CGETRF)\n#define LAPACK_zgetrf LAPACK_GLOBAL(zgetrf,ZGETRF)\n#define LAPACK_sgbtrf LAPACK_GLOBAL(sgbtrf,SGBTRF)\n#define LAPACK_dgbtrf LAPACK_GLOBAL(dgbtrf,DGBTRF)\n#define LAPACK_cgbtrf LAPACK_GLOBAL(cgbtrf,CGBTRF)\n#define LAPACK_zgbtrf LAPACK_GLOBAL(zgbtrf,ZGBTRF)\n#define LAPACK_sgttrf LAPACK_GLOBAL(sgttrf,SGTTRF)\n#define LAPACK_dgttrf LAPACK_GLOBAL(dgttrf,DGTTRF)\n#define LAPACK_cgttrf LAPACK_GLOBAL(cgttrf,CGTTRF)\n#define LAPACK_zgttrf LAPACK_GLOBAL(zgttrf,ZGTTRF)\n#define LAPACK_spotrf LAPACK_GLOBAL(spotrf,SPOTRF)\n#define LAPACK_dpotrf LAPACK_GLOBAL(dpotrf,DPOTRF)\n#define LAPACK_cpotrf LAPACK_GLOBAL(cpotrf,CPOTRF)\n#define LAPACK_zpotrf LAPACK_GLOBAL(zpotrf,ZPOTRF)\n#define LAPACK_dpstrf LAPACK_GLOBAL(dpstrf,DPSTRF)\n#define LAPACK_spstrf LAPACK_GLOBAL(spstrf,SPSTRF)\n#define LAPACK_zpstrf LAPACK_GLOBAL(zpstrf,ZPSTRF)\n#define LAPACK_cpstrf LAPACK_GLOBAL(cpstrf,CPSTRF)\n#define LAPACK_dpftrf LAPACK_GLOBAL(dpftrf,DPFTRF)\n#define LAPACK_spftrf LAPACK_GLOBAL(spftrf,SPFTRF)\n#define LAPACK_zpftrf LAPACK_GLOBAL(zpftrf,ZPFTRF)\n#define LAPACK_cpftrf LAPACK_GLOBAL(cpftrf,CPFTRF)\n#define LAPACK_spptrf LAPACK_GLOBAL(spptrf,SPPTRF)\n#define LAPACK_dpptrf LAPACK_GLOBAL(dpptrf,DPPTRF)\n#define LAPACK_cpptrf LAPACK_GLOBAL(cpptrf,CPPTRF)\n#define LAPACK_zpptrf LAPACK_GLOBAL(zpptrf,ZPPTRF)\n#define LAPACK_spbtrf LAPACK_GLOBAL(spbtrf,SPBTRF)\n#define LAPACK_dpbtrf LAPACK_GLOBAL(dpbtrf,DPBTRF)\n#define LAPACK_cpbtrf LAPACK_GLOBAL(cpbtrf,CPBTRF)\n#define LAPACK_zpbtrf LAPACK_GLOBAL(zpbtrf,ZPBTRF)\n#define LAPACK_spttrf LAPACK_GLOBAL(spttrf,SPTTRF)\n#define LAPACK_dpttrf LAPACK_GLOBAL(dpttrf,DPTTRF)\n#define LAPACK_cpttrf LAPACK_GLOBAL(cpttrf,CPTTRF)\n#define LAPACK_zpttrf LAPACK_GLOBAL(zpttrf,ZPTTRF)\n#define LAPACK_ssytrf LAPACK_GLOBAL(ssytrf,SSYTRF)\n#define LAPACK_dsytrf LAPACK_GLOBAL(dsytrf,DSYTRF)\n#define LAPACK_csytrf LAPACK_GLOBAL(csytrf,CSYTRF)\n#define LAPACK_zsytrf LAPACK_GLOBAL(zsytrf,ZSYTRF)\n#define LAPACK_chetrf LAPACK_GLOBAL(chetrf,CHETRF)\n#define LAPACK_zhetrf LAPACK_GLOBAL(zhetrf,ZHETRF)\n#define LAPACK_ssptrf LAPACK_GLOBAL(ssptrf,SSPTRF)\n#define LAPACK_dsptrf LAPACK_GLOBAL(dsptrf,DSPTRF)\n#define LAPACK_csptrf LAPACK_GLOBAL(csptrf,CSPTRF)\n#define LAPACK_zsptrf LAPACK_GLOBAL(zsptrf,ZSPTRF)\n#define LAPACK_chptrf LAPACK_GLOBAL(chptrf,CHPTRF)\n#define LAPACK_zhptrf LAPACK_GLOBAL(zhptrf,ZHPTRF)\n#define LAPACK_sgetrs LAPACK_GLOBAL(sgetrs,SGETRS)\n#define LAPACK_dgetrs LAPACK_GLOBAL(dgetrs,DGETRS)\n#define LAPACK_cgetrs LAPACK_GLOBAL(cgetrs,CGETRS)\n#define LAPACK_zgetrs LAPACK_GLOBAL(zgetrs,ZGETRS)\n#define LAPACK_sgbtrs LAPACK_GLOBAL(sgbtrs,SGBTRS)\n#define LAPACK_dgbtrs LAPACK_GLOBAL(dgbtrs,DGBTRS)\n#define LAPACK_cgbtrs LAPACK_GLOBAL(cgbtrs,CGBTRS)\n#define LAPACK_zgbtrs LAPACK_GLOBAL(zgbtrs,ZGBTRS)\n#define LAPACK_sgttrs LAPACK_GLOBAL(sgttrs,SGTTRS)\n#define LAPACK_dgttrs LAPACK_GLOBAL(dgttrs,DGTTRS)\n#define LAPACK_cgttrs LAPACK_GLOBAL(cgttrs,CGTTRS)\n#define LAPACK_zgttrs LAPACK_GLOBAL(zgttrs,ZGTTRS)\n#define LAPACK_spotrs LAPACK_GLOBAL(spotrs,SPOTRS)\n#define LAPACK_dpotrs LAPACK_GLOBAL(dpotrs,DPOTRS)\n#define LAPACK_cpotrs LAPACK_GLOBAL(cpotrs,CPOTRS)\n#define LAPACK_zpotrs LAPACK_GLOBAL(zpotrs,ZPOTRS)\n#define LAPACK_dpftrs LAPACK_GLOBAL(dpftrs,DPFTRS)\n#define LAPACK_spftrs LAPACK_GLOBAL(spftrs,SPFTRS)\n#define LAPACK_zpftrs LAPACK_GLOBAL(zpftrs,ZPFTRS)\n#define LAPACK_cpftrs LAPACK_GLOBAL(cpftrs,CPFTRS)\n#define LAPACK_spptrs LAPACK_GLOBAL(spptrs,SPPTRS)\n#define LAPACK_dpptrs LAPACK_GLOBAL(dpptrs,DPPTRS)\n#define LAPACK_cpptrs LAPACK_GLOBAL(cpptrs,CPPTRS)\n#define LAPACK_zpptrs LAPACK_GLOBAL(zpptrs,ZPPTRS)\n#define LAPACK_spbtrs LAPACK_GLOBAL(spbtrs,SPBTRS)\n#define LAPACK_dpbtrs LAPACK_GLOBAL(dpbtrs,DPBTRS)\n#define LAPACK_cpbtrs LAPACK_GLOBAL(cpbtrs,CPBTRS)\n#define LAPACK_zpbtrs LAPACK_GLOBAL(zpbtrs,ZPBTRS)\n#define LAPACK_spttrs LAPACK_GLOBAL(spttrs,SPTTRS)\n#define LAPACK_dpttrs LAPACK_GLOBAL(dpttrs,DPTTRS)\n#define LAPACK_cpttrs LAPACK_GLOBAL(cpttrs,CPTTRS)\n#define LAPACK_zpttrs LAPACK_GLOBAL(zpttrs,ZPTTRS)\n#define LAPACK_ssytrs LAPACK_GLOBAL(ssytrs,SSYTRS)\n#define LAPACK_dsytrs LAPACK_GLOBAL(dsytrs,DSYTRS)\n#define LAPACK_csytrs LAPACK_GLOBAL(csytrs,CSYTRS)\n#define LAPACK_zsytrs LAPACK_GLOBAL(zsytrs,ZSYTRS)\n#define LAPACK_chetrs LAPACK_GLOBAL(chetrs,CHETRS)\n#define LAPACK_zhetrs LAPACK_GLOBAL(zhetrs,ZHETRS)\n#define LAPACK_ssptrs LAPACK_GLOBAL(ssptrs,SSPTRS)\n#define LAPACK_dsptrs LAPACK_GLOBAL(dsptrs,DSPTRS)\n#define LAPACK_csptrs LAPACK_GLOBAL(csptrs,CSPTRS)\n#define LAPACK_zsptrs LAPACK_GLOBAL(zsptrs,ZSPTRS)\n#define LAPACK_chptrs LAPACK_GLOBAL(chptrs,CHPTRS)\n#define LAPACK_zhptrs LAPACK_GLOBAL(zhptrs,ZHPTRS)\n#define LAPACK_strtrs LAPACK_GLOBAL(strtrs,STRTRS)\n#define LAPACK_dtrtrs LAPACK_GLOBAL(dtrtrs,DTRTRS)\n#define LAPACK_ctrtrs LAPACK_GLOBAL(ctrtrs,CTRTRS)\n#define LAPACK_ztrtrs LAPACK_GLOBAL(ztrtrs,ZTRTRS)\n#define LAPACK_stptrs LAPACK_GLOBAL(stptrs,STPTRS)\n#define LAPACK_dtptrs LAPACK_GLOBAL(dtptrs,DTPTRS)\n#define LAPACK_ctptrs LAPACK_GLOBAL(ctptrs,CTPTRS)\n#define LAPACK_ztptrs LAPACK_GLOBAL(ztptrs,ZTPTRS)\n#define LAPACK_stbtrs LAPACK_GLOBAL(stbtrs,STBTRS)\n#define LAPACK_dtbtrs LAPACK_GLOBAL(dtbtrs,DTBTRS)\n#define LAPACK_ctbtrs LAPACK_GLOBAL(ctbtrs,CTBTRS)\n#define LAPACK_ztbtrs LAPACK_GLOBAL(ztbtrs,ZTBTRS)\n#define LAPACK_sgecon LAPACK_GLOBAL(sgecon,SGECON)\n#define LAPACK_dgecon LAPACK_GLOBAL(dgecon,DGECON)\n#define LAPACK_cgecon LAPACK_GLOBAL(cgecon,CGECON)\n#define LAPACK_zgecon LAPACK_GLOBAL(zgecon,ZGECON)\n#define LAPACK_sgbcon LAPACK_GLOBAL(sgbcon,SGBCON)\n#define LAPACK_dgbcon LAPACK_GLOBAL(dgbcon,DGBCON)\n#define LAPACK_cgbcon LAPACK_GLOBAL(cgbcon,CGBCON)\n#define LAPACK_zgbcon LAPACK_GLOBAL(zgbcon,ZGBCON)\n#define LAPACK_sgtcon LAPACK_GLOBAL(sgtcon,SGTCON)\n#define LAPACK_dgtcon LAPACK_GLOBAL(dgtcon,DGTCON)\n#define LAPACK_cgtcon LAPACK_GLOBAL(cgtcon,CGTCON)\n#define LAPACK_zgtcon LAPACK_GLOBAL(zgtcon,ZGTCON)\n#define LAPACK_spocon LAPACK_GLOBAL(spocon,SPOCON)\n#define LAPACK_dpocon LAPACK_GLOBAL(dpocon,DPOCON)\n#define LAPACK_cpocon LAPACK_GLOBAL(cpocon,CPOCON)\n#define LAPACK_zpocon LAPACK_GLOBAL(zpocon,ZPOCON)\n#define LAPACK_sppcon LAPACK_GLOBAL(sppcon,SPPCON)\n#define LAPACK_dppcon LAPACK_GLOBAL(dppcon,DPPCON)\n#define LAPACK_cppcon LAPACK_GLOBAL(cppcon,CPPCON)\n#define LAPACK_zppcon LAPACK_GLOBAL(zppcon,ZPPCON)\n#define LAPACK_spbcon LAPACK_GLOBAL(spbcon,SPBCON)\n#define LAPACK_dpbcon LAPACK_GLOBAL(dpbcon,DPBCON)\n#define LAPACK_cpbcon LAPACK_GLOBAL(cpbcon,CPBCON)\n#define LAPACK_zpbcon LAPACK_GLOBAL(zpbcon,ZPBCON)\n#define LAPACK_sptcon LAPACK_GLOBAL(sptcon,SPTCON)\n#define LAPACK_dptcon LAPACK_GLOBAL(dptcon,DPTCON)\n#define LAPACK_cptcon LAPACK_GLOBAL(cptcon,CPTCON)\n#define LAPACK_zptcon LAPACK_GLOBAL(zptcon,ZPTCON)\n#define LAPACK_ssycon LAPACK_GLOBAL(ssycon,SSYCON)\n#define LAPACK_dsycon LAPACK_GLOBAL(dsycon,DSYCON)\n#define LAPACK_csycon LAPACK_GLOBAL(csycon,CSYCON)\n#define LAPACK_zsycon LAPACK_GLOBAL(zsycon,ZSYCON)\n#define LAPACK_checon LAPACK_GLOBAL(checon,CHECON)\n#define LAPACK_zhecon LAPACK_GLOBAL(zhecon,ZHECON)\n#define LAPACK_sspcon LAPACK_GLOBAL(sspcon,SSPCON)\n#define LAPACK_dspcon LAPACK_GLOBAL(dspcon,DSPCON)\n#define LAPACK_cspcon LAPACK_GLOBAL(cspcon,CSPCON)\n#define LAPACK_zspcon LAPACK_GLOBAL(zspcon,ZSPCON)\n#define LAPACK_chpcon LAPACK_GLOBAL(chpcon,CHPCON)\n#define LAPACK_zhpcon LAPACK_GLOBAL(zhpcon,ZHPCON)\n#define LAPACK_strcon LAPACK_GLOBAL(strcon,STRCON)\n#define LAPACK_dtrcon LAPACK_GLOBAL(dtrcon,DTRCON)\n#define LAPACK_ctrcon LAPACK_GLOBAL(ctrcon,CTRCON)\n#define LAPACK_ztrcon LAPACK_GLOBAL(ztrcon,ZTRCON)\n#define LAPACK_stpcon LAPACK_GLOBAL(stpcon,STPCON)\n#define LAPACK_dtpcon LAPACK_GLOBAL(dtpcon,DTPCON)\n#define LAPACK_ctpcon LAPACK_GLOBAL(ctpcon,CTPCON)\n#define LAPACK_ztpcon LAPACK_GLOBAL(ztpcon,ZTPCON)\n#define LAPACK_stbcon LAPACK_GLOBAL(stbcon,STBCON)\n#define LAPACK_dtbcon LAPACK_GLOBAL(dtbcon,DTBCON)\n#define LAPACK_ctbcon LAPACK_GLOBAL(ctbcon,CTBCON)\n#define LAPACK_ztbcon LAPACK_GLOBAL(ztbcon,ZTBCON)\n#define LAPACK_sgerfs LAPACK_GLOBAL(sgerfs,SGERFS)\n#define LAPACK_dgerfs LAPACK_GLOBAL(dgerfs,DGERFS)\n#define LAPACK_cgerfs LAPACK_GLOBAL(cgerfs,CGERFS)\n#define LAPACK_zgerfs LAPACK_GLOBAL(zgerfs,ZGERFS)\n#define LAPACK_dgerfsx LAPACK_GLOBAL(dgerfsx,DGERFSX)\n#define LAPACK_sgerfsx LAPACK_GLOBAL(sgerfsx,SGERFSX)\n#define LAPACK_zgerfsx LAPACK_GLOBAL(zgerfsx,ZGERFSX)\n#define LAPACK_cgerfsx LAPACK_GLOBAL(cgerfsx,CGERFSX)\n#define LAPACK_sgbrfs LAPACK_GLOBAL(sgbrfs,SGBRFS)\n#define LAPACK_dgbrfs LAPACK_GLOBAL(dgbrfs,DGBRFS)\n#define LAPACK_cgbrfs LAPACK_GLOBAL(cgbrfs,CGBRFS)\n#define LAPACK_zgbrfs LAPACK_GLOBAL(zgbrfs,ZGBRFS)\n#define LAPACK_dgbrfsx LAPACK_GLOBAL(dgbrfsx,DGBRFSX)\n#define LAPACK_sgbrfsx LAPACK_GLOBAL(sgbrfsx,SGBRFSX)\n#define LAPACK_zgbrfsx LAPACK_GLOBAL(zgbrfsx,ZGBRFSX)\n#define LAPACK_cgbrfsx LAPACK_GLOBAL(cgbrfsx,CGBRFSX)\n#define LAPACK_sgtrfs LAPACK_GLOBAL(sgtrfs,SGTRFS)\n#define LAPACK_dgtrfs LAPACK_GLOBAL(dgtrfs,DGTRFS)\n#define LAPACK_cgtrfs LAPACK_GLOBAL(cgtrfs,CGTRFS)\n#define LAPACK_zgtrfs LAPACK_GLOBAL(zgtrfs,ZGTRFS)\n#define LAPACK_sporfs LAPACK_GLOBAL(sporfs,SPORFS)\n#define LAPACK_dporfs LAPACK_GLOBAL(dporfs,DPORFS)\n#define LAPACK_cporfs LAPACK_GLOBAL(cporfs,CPORFS)\n#define LAPACK_zporfs LAPACK_GLOBAL(zporfs,ZPORFS)\n#define LAPACK_dporfsx LAPACK_GLOBAL(dporfsx,DPORFSX)\n#define LAPACK_sporfsx LAPACK_GLOBAL(sporfsx,SPORFSX)\n#define LAPACK_zporfsx LAPACK_GLOBAL(zporfsx,ZPORFSX)\n#define LAPACK_cporfsx LAPACK_GLOBAL(cporfsx,CPORFSX)\n#define LAPACK_spprfs LAPACK_GLOBAL(spprfs,SPPRFS)\n#define LAPACK_dpprfs LAPACK_GLOBAL(dpprfs,DPPRFS)\n#define LAPACK_cpprfs LAPACK_GLOBAL(cpprfs,CPPRFS)\n#define LAPACK_zpprfs LAPACK_GLOBAL(zpprfs,ZPPRFS)\n#define LAPACK_spbrfs LAPACK_GLOBAL(spbrfs,SPBRFS)\n#define LAPACK_dpbrfs LAPACK_GLOBAL(dpbrfs,DPBRFS)\n#define LAPACK_cpbrfs LAPACK_GLOBAL(cpbrfs,CPBRFS)\n#define LAPACK_zpbrfs LAPACK_GLOBAL(zpbrfs,ZPBRFS)\n#define LAPACK_sptrfs LAPACK_GLOBAL(sptrfs,SPTRFS)\n#define LAPACK_dptrfs LAPACK_GLOBAL(dptrfs,DPTRFS)\n#define LAPACK_cptrfs LAPACK_GLOBAL(cptrfs,CPTRFS)\n#define LAPACK_zptrfs LAPACK_GLOBAL(zptrfs,ZPTRFS)\n#define LAPACK_ssyrfs LAPACK_GLOBAL(ssyrfs,SSYRFS)\n#define LAPACK_dsyrfs LAPACK_GLOBAL(dsyrfs,DSYRFS)\n#define LAPACK_csyrfs LAPACK_GLOBAL(csyrfs,CSYRFS)\n#define LAPACK_zsyrfs LAPACK_GLOBAL(zsyrfs,ZSYRFS)\n#define LAPACK_dsyrfsx LAPACK_GLOBAL(dsyrfsx,DSYRFSX)\n#define LAPACK_ssyrfsx LAPACK_GLOBAL(ssyrfsx,SSYRFSX)\n#define LAPACK_zsyrfsx LAPACK_GLOBAL(zsyrfsx,ZSYRFSX)\n#define LAPACK_csyrfsx LAPACK_GLOBAL(csyrfsx,CSYRFSX)\n#define LAPACK_cherfs LAPACK_GLOBAL(cherfs,CHERFS)\n#define LAPACK_zherfs LAPACK_GLOBAL(zherfs,ZHERFS)\n#define LAPACK_zherfsx LAPACK_GLOBAL(zherfsx,ZHERFSX)\n#define LAPACK_cherfsx LAPACK_GLOBAL(cherfsx,CHERFSX)\n#define LAPACK_ssprfs LAPACK_GLOBAL(ssprfs,SSPRFS)\n#define LAPACK_dsprfs LAPACK_GLOBAL(dsprfs,DSPRFS)\n#define LAPACK_csprfs LAPACK_GLOBAL(csprfs,CSPRFS)\n#define LAPACK_zsprfs LAPACK_GLOBAL(zsprfs,ZSPRFS)\n#define LAPACK_chprfs LAPACK_GLOBAL(chprfs,CHPRFS)\n#define LAPACK_zhprfs LAPACK_GLOBAL(zhprfs,ZHPRFS)\n#define LAPACK_strrfs LAPACK_GLOBAL(strrfs,STRRFS)\n#define LAPACK_dtrrfs LAPACK_GLOBAL(dtrrfs,DTRRFS)\n#define LAPACK_ctrrfs LAPACK_GLOBAL(ctrrfs,CTRRFS)\n#define LAPACK_ztrrfs LAPACK_GLOBAL(ztrrfs,ZTRRFS)\n#define LAPACK_stprfs LAPACK_GLOBAL(stprfs,STPRFS)\n#define LAPACK_dtprfs LAPACK_GLOBAL(dtprfs,DTPRFS)\n#define LAPACK_ctprfs LAPACK_GLOBAL(ctprfs,CTPRFS)\n#define LAPACK_ztprfs LAPACK_GLOBAL(ztprfs,ZTPRFS)\n#define LAPACK_stbrfs LAPACK_GLOBAL(stbrfs,STBRFS)\n#define LAPACK_dtbrfs LAPACK_GLOBAL(dtbrfs,DTBRFS)\n#define LAPACK_ctbrfs LAPACK_GLOBAL(ctbrfs,CTBRFS)\n#define LAPACK_ztbrfs LAPACK_GLOBAL(ztbrfs,ZTBRFS)\n#define LAPACK_sgetri LAPACK_GLOBAL(sgetri,SGETRI)\n#define LAPACK_dgetri LAPACK_GLOBAL(dgetri,DGETRI)\n#define LAPACK_cgetri LAPACK_GLOBAL(cgetri,CGETRI)\n#define LAPACK_zgetri LAPACK_GLOBAL(zgetri,ZGETRI)\n#define LAPACK_spotri LAPACK_GLOBAL(spotri,SPOTRI)\n#define LAPACK_dpotri LAPACK_GLOBAL(dpotri,DPOTRI)\n#define LAPACK_cpotri LAPACK_GLOBAL(cpotri,CPOTRI)\n#define LAPACK_zpotri LAPACK_GLOBAL(zpotri,ZPOTRI)\n#define LAPACK_dpftri LAPACK_GLOBAL(dpftri,DPFTRI)\n#define LAPACK_spftri LAPACK_GLOBAL(spftri,SPFTRI)\n#define LAPACK_zpftri LAPACK_GLOBAL(zpftri,ZPFTRI)\n#define LAPACK_cpftri LAPACK_GLOBAL(cpftri,CPFTRI)\n#define LAPACK_spptri LAPACK_GLOBAL(spptri,SPPTRI)\n#define LAPACK_dpptri LAPACK_GLOBAL(dpptri,DPPTRI)\n#define LAPACK_cpptri LAPACK_GLOBAL(cpptri,CPPTRI)\n#define LAPACK_zpptri LAPACK_GLOBAL(zpptri,ZPPTRI)\n#define LAPACK_ssytri LAPACK_GLOBAL(ssytri,SSYTRI)\n#define LAPACK_dsytri LAPACK_GLOBAL(dsytri,DSYTRI)\n#define LAPACK_csytri LAPACK_GLOBAL(csytri,CSYTRI)\n#define LAPACK_zsytri LAPACK_GLOBAL(zsytri,ZSYTRI)\n#define LAPACK_chetri LAPACK_GLOBAL(chetri,CHETRI)\n#define LAPACK_zhetri LAPACK_GLOBAL(zhetri,ZHETRI)\n#define LAPACK_ssptri LAPACK_GLOBAL(ssptri,SSPTRI)\n#define LAPACK_dsptri LAPACK_GLOBAL(dsptri,DSPTRI)\n#define LAPACK_csptri LAPACK_GLOBAL(csptri,CSPTRI)\n#define LAPACK_zsptri LAPACK_GLOBAL(zsptri,ZSPTRI)\n#define LAPACK_chptri LAPACK_GLOBAL(chptri,CHPTRI)\n#define LAPACK_zhptri LAPACK_GLOBAL(zhptri,ZHPTRI)\n#define LAPACK_strtri LAPACK_GLOBAL(strtri,STRTRI)\n#define LAPACK_dtrtri LAPACK_GLOBAL(dtrtri,DTRTRI)\n#define LAPACK_ctrtri LAPACK_GLOBAL(ctrtri,CTRTRI)\n#define LAPACK_ztrtri LAPACK_GLOBAL(ztrtri,ZTRTRI)\n#define LAPACK_dtftri LAPACK_GLOBAL(dtftri,DTFTRI)\n#define LAPACK_stftri LAPACK_GLOBAL(stftri,STFTRI)\n#define LAPACK_ztftri LAPACK_GLOBAL(ztftri,ZTFTRI)\n#define LAPACK_ctftri LAPACK_GLOBAL(ctftri,CTFTRI)\n#define LAPACK_stptri LAPACK_GLOBAL(stptri,STPTRI)\n#define LAPACK_dtptri LAPACK_GLOBAL(dtptri,DTPTRI)\n#define LAPACK_ctptri LAPACK_GLOBAL(ctptri,CTPTRI)\n#define LAPACK_ztptri LAPACK_GLOBAL(ztptri,ZTPTRI)\n#define LAPACK_sgeequ LAPACK_GLOBAL(sgeequ,SGEEQU)\n#define LAPACK_dgeequ LAPACK_GLOBAL(dgeequ,DGEEQU)\n#define LAPACK_cgeequ LAPACK_GLOBAL(cgeequ,CGEEQU)\n#define LAPACK_zgeequ LAPACK_GLOBAL(zgeequ,ZGEEQU)\n#define LAPACK_dgeequb LAPACK_GLOBAL(dgeequb,DGEEQUB)\n#define LAPACK_sgeequb LAPACK_GLOBAL(sgeequb,SGEEQUB)\n#define LAPACK_zgeequb LAPACK_GLOBAL(zgeequb,ZGEEQUB)\n#define LAPACK_cgeequb LAPACK_GLOBAL(cgeequb,CGEEQUB)\n#define LAPACK_sgbequ LAPACK_GLOBAL(sgbequ,SGBEQU)\n#define LAPACK_dgbequ LAPACK_GLOBAL(dgbequ,DGBEQU)\n#define LAPACK_cgbequ LAPACK_GLOBAL(cgbequ,CGBEQU)\n#define LAPACK_zgbequ LAPACK_GLOBAL(zgbequ,ZGBEQU)\n#define LAPACK_dgbequb LAPACK_GLOBAL(dgbequb,DGBEQUB)\n#define LAPACK_sgbequb LAPACK_GLOBAL(sgbequb,SGBEQUB)\n#define LAPACK_zgbequb LAPACK_GLOBAL(zgbequb,ZGBEQUB)\n#define LAPACK_cgbequb LAPACK_GLOBAL(cgbequb,CGBEQUB)\n#define LAPACK_spoequ LAPACK_GLOBAL(spoequ,SPOEQU)\n#define LAPACK_dpoequ LAPACK_GLOBAL(dpoequ,DPOEQU)\n#define LAPACK_cpoequ LAPACK_GLOBAL(cpoequ,CPOEQU)\n#define LAPACK_zpoequ LAPACK_GLOBAL(zpoequ,ZPOEQU)\n#define LAPACK_dpoequb LAPACK_GLOBAL(dpoequb,DPOEQUB)\n#define LAPACK_spoequb LAPACK_GLOBAL(spoequb,SPOEQUB)\n#define LAPACK_zpoequb LAPACK_GLOBAL(zpoequb,ZPOEQUB)\n#define LAPACK_cpoequb LAPACK_GLOBAL(cpoequb,CPOEQUB)\n#define LAPACK_sppequ LAPACK_GLOBAL(sppequ,SPPEQU)\n#define LAPACK_dppequ LAPACK_GLOBAL(dppequ,DPPEQU)\n#define LAPACK_cppequ LAPACK_GLOBAL(cppequ,CPPEQU)\n#define LAPACK_zppequ LAPACK_GLOBAL(zppequ,ZPPEQU)\n#define LAPACK_spbequ LAPACK_GLOBAL(spbequ,SPBEQU)\n#define LAPACK_dpbequ LAPACK_GLOBAL(dpbequ,DPBEQU)\n#define LAPACK_cpbequ LAPACK_GLOBAL(cpbequ,CPBEQU)\n#define LAPACK_zpbequ LAPACK_GLOBAL(zpbequ,ZPBEQU)\n#define LAPACK_dsyequb LAPACK_GLOBAL(dsyequb,DSYEQUB)\n#define LAPACK_ssyequb LAPACK_GLOBAL(ssyequb,SSYEQUB)\n#define LAPACK_zsyequb LAPACK_GLOBAL(zsyequb,ZSYEQUB)\n#define LAPACK_csyequb LAPACK_GLOBAL(csyequb,CSYEQUB)\n#define LAPACK_zheequb LAPACK_GLOBAL(zheequb,ZHEEQUB)\n#define LAPACK_cheequb LAPACK_GLOBAL(cheequb,CHEEQUB)\n#define LAPACK_sgesv LAPACK_GLOBAL(sgesv,SGESV)\n#define LAPACK_dgesv LAPACK_GLOBAL(dgesv,DGESV)\n#define LAPACK_cgesv LAPACK_GLOBAL(cgesv,CGESV)\n#define LAPACK_zgesv LAPACK_GLOBAL(zgesv,ZGESV)\n#define LAPACK_dsgesv LAPACK_GLOBAL(dsgesv,DSGESV)\n#define LAPACK_zcgesv LAPACK_GLOBAL(zcgesv,ZCGESV)\n#define LAPACK_sgesvx LAPACK_GLOBAL(sgesvx,SGESVX)\n#define LAPACK_dgesvx LAPACK_GLOBAL(dgesvx,DGESVX)\n#define LAPACK_cgesvx LAPACK_GLOBAL(cgesvx,CGESVX)\n#define LAPACK_zgesvx LAPACK_GLOBAL(zgesvx,ZGESVX)\n#define LAPACK_dgesvxx LAPACK_GLOBAL(dgesvxx,DGESVXX)\n#define LAPACK_sgesvxx LAPACK_GLOBAL(sgesvxx,SGESVXX)\n#define LAPACK_zgesvxx LAPACK_GLOBAL(zgesvxx,ZGESVXX)\n#define LAPACK_cgesvxx LAPACK_GLOBAL(cgesvxx,CGESVXX)\n#define LAPACK_sgbsv LAPACK_GLOBAL(sgbsv,SGBSV)\n#define LAPACK_dgbsv LAPACK_GLOBAL(dgbsv,DGBSV)\n#define LAPACK_cgbsv LAPACK_GLOBAL(cgbsv,CGBSV)\n#define LAPACK_zgbsv LAPACK_GLOBAL(zgbsv,ZGBSV)\n#define LAPACK_sgbsvx LAPACK_GLOBAL(sgbsvx,SGBSVX)\n#define LAPACK_dgbsvx LAPACK_GLOBAL(dgbsvx,DGBSVX)\n#define LAPACK_cgbsvx LAPACK_GLOBAL(cgbsvx,CGBSVX)\n#define LAPACK_zgbsvx LAPACK_GLOBAL(zgbsvx,ZGBSVX)\n#define LAPACK_dgbsvxx LAPACK_GLOBAL(dgbsvxx,DGBSVXX)\n#define LAPACK_sgbsvxx LAPACK_GLOBAL(sgbsvxx,SGBSVXX)\n#define LAPACK_zgbsvxx LAPACK_GLOBAL(zgbsvxx,ZGBSVXX)\n#define LAPACK_cgbsvxx LAPACK_GLOBAL(cgbsvxx,CGBSVXX)\n#define LAPACK_sgtsv LAPACK_GLOBAL(sgtsv,SGTSV)\n#define LAPACK_dgtsv LAPACK_GLOBAL(dgtsv,DGTSV)\n#define LAPACK_cgtsv LAPACK_GLOBAL(cgtsv,CGTSV)\n#define LAPACK_zgtsv LAPACK_GLOBAL(zgtsv,ZGTSV)\n#define LAPACK_sgtsvx LAPACK_GLOBAL(sgtsvx,SGTSVX)\n#define LAPACK_dgtsvx LAPACK_GLOBAL(dgtsvx,DGTSVX)\n#define LAPACK_cgtsvx LAPACK_GLOBAL(cgtsvx,CGTSVX)\n#define LAPACK_zgtsvx LAPACK_GLOBAL(zgtsvx,ZGTSVX)\n#define LAPACK_sposv LAPACK_GLOBAL(sposv,SPOSV)\n#define LAPACK_dposv LAPACK_GLOBAL(dposv,DPOSV)\n#define LAPACK_cposv LAPACK_GLOBAL(cposv,CPOSV)\n#define LAPACK_zposv LAPACK_GLOBAL(zposv,ZPOSV)\n#define LAPACK_dsposv LAPACK_GLOBAL(dsposv,DSPOSV)\n#define LAPACK_zcposv LAPACK_GLOBAL(zcposv,ZCPOSV)\n#define LAPACK_sposvx LAPACK_GLOBAL(sposvx,SPOSVX)\n#define LAPACK_dposvx LAPACK_GLOBAL(dposvx,DPOSVX)\n#define LAPACK_cposvx LAPACK_GLOBAL(cposvx,CPOSVX)\n#define LAPACK_zposvx LAPACK_GLOBAL(zposvx,ZPOSVX)\n#define LAPACK_dposvxx LAPACK_GLOBAL(dposvxx,DPOSVXX)\n#define LAPACK_sposvxx LAPACK_GLOBAL(sposvxx,SPOSVXX)\n#define LAPACK_zposvxx LAPACK_GLOBAL(zposvxx,ZPOSVXX)\n#define LAPACK_cposvxx LAPACK_GLOBAL(cposvxx,CPOSVXX)\n#define LAPACK_sppsv LAPACK_GLOBAL(sppsv,SPPSV)\n#define LAPACK_dppsv LAPACK_GLOBAL(dppsv,DPPSV)\n#define LAPACK_cppsv LAPACK_GLOBAL(cppsv,CPPSV)\n#define LAPACK_zppsv LAPACK_GLOBAL(zppsv,ZPPSV)\n#define LAPACK_sppsvx LAPACK_GLOBAL(sppsvx,SPPSVX)\n#define LAPACK_dppsvx LAPACK_GLOBAL(dppsvx,DPPSVX)\n#define LAPACK_cppsvx LAPACK_GLOBAL(cppsvx,CPPSVX)\n#define LAPACK_zppsvx LAPACK_GLOBAL(zppsvx,ZPPSVX)\n#define LAPACK_spbsv LAPACK_GLOBAL(spbsv,SPBSV)\n#define LAPACK_dpbsv LAPACK_GLOBAL(dpbsv,DPBSV)\n#define LAPACK_cpbsv LAPACK_GLOBAL(cpbsv,CPBSV)\n#define LAPACK_zpbsv LAPACK_GLOBAL(zpbsv,ZPBSV)\n#define LAPACK_spbsvx LAPACK_GLOBAL(spbsvx,SPBSVX)\n#define LAPACK_dpbsvx LAPACK_GLOBAL(dpbsvx,DPBSVX)\n#define LAPACK_cpbsvx LAPACK_GLOBAL(cpbsvx,CPBSVX)\n#define LAPACK_zpbsvx LAPACK_GLOBAL(zpbsvx,ZPBSVX)\n#define LAPACK_sptsv LAPACK_GLOBAL(sptsv,SPTSV)\n#define LAPACK_dptsv LAPACK_GLOBAL(dptsv,DPTSV)\n#define LAPACK_cptsv LAPACK_GLOBAL(cptsv,CPTSV)\n#define LAPACK_zptsv LAPACK_GLOBAL(zptsv,ZPTSV)\n#define LAPACK_sptsvx LAPACK_GLOBAL(sptsvx,SPTSVX)\n#define LAPACK_dptsvx LAPACK_GLOBAL(dptsvx,DPTSVX)\n#define LAPACK_cptsvx LAPACK_GLOBAL(cptsvx,CPTSVX)\n#define LAPACK_zptsvx LAPACK_GLOBAL(zptsvx,ZPTSVX)\n#define LAPACK_ssysv LAPACK_GLOBAL(ssysv,SSYSV)\n#define LAPACK_dsysv LAPACK_GLOBAL(dsysv,DSYSV)\n#define LAPACK_csysv LAPACK_GLOBAL(csysv,CSYSV)\n#define LAPACK_zsysv LAPACK_GLOBAL(zsysv,ZSYSV)\n#define LAPACK_ssysvx LAPACK_GLOBAL(ssysvx,SSYSVX)\n#define LAPACK_dsysvx LAPACK_GLOBAL(dsysvx,DSYSVX)\n#define LAPACK_csysvx LAPACK_GLOBAL(csysvx,CSYSVX)\n#define LAPACK_zsysvx LAPACK_GLOBAL(zsysvx,ZSYSVX)\n#define LAPACK_dsysvxx LAPACK_GLOBAL(dsysvxx,DSYSVXX)\n#define LAPACK_ssysvxx LAPACK_GLOBAL(ssysvxx,SSYSVXX)\n#define LAPACK_zsysvxx LAPACK_GLOBAL(zsysvxx,ZSYSVXX)\n#define LAPACK_csysvxx LAPACK_GLOBAL(csysvxx,CSYSVXX)\n#define LAPACK_chesv LAPACK_GLOBAL(chesv,CHESV)\n#define LAPACK_zhesv LAPACK_GLOBAL(zhesv,ZHESV)\n#define LAPACK_chesvx LAPACK_GLOBAL(chesvx,CHESVX)\n#define LAPACK_zhesvx LAPACK_GLOBAL(zhesvx,ZHESVX)\n#define LAPACK_zhesvxx LAPACK_GLOBAL(zhesvxx,ZHESVXX)\n#define LAPACK_chesvxx LAPACK_GLOBAL(chesvxx,CHESVXX)\n#define LAPACK_sspsv LAPACK_GLOBAL(sspsv,SSPSV)\n#define LAPACK_dspsv LAPACK_GLOBAL(dspsv,DSPSV)\n#define LAPACK_cspsv LAPACK_GLOBAL(cspsv,CSPSV)\n#define LAPACK_zspsv LAPACK_GLOBAL(zspsv,ZSPSV)\n#define LAPACK_sspsvx LAPACK_GLOBAL(sspsvx,SSPSVX)\n#define LAPACK_dspsvx LAPACK_GLOBAL(dspsvx,DSPSVX)\n#define LAPACK_cspsvx LAPACK_GLOBAL(cspsvx,CSPSVX)\n#define LAPACK_zspsvx LAPACK_GLOBAL(zspsvx,ZSPSVX)\n#define LAPACK_chpsv LAPACK_GLOBAL(chpsv,CHPSV)\n#define LAPACK_zhpsv LAPACK_GLOBAL(zhpsv,ZHPSV)\n#define LAPACK_chpsvx LAPACK_GLOBAL(chpsvx,CHPSVX)\n#define LAPACK_zhpsvx LAPACK_GLOBAL(zhpsvx,ZHPSVX)\n#define LAPACK_sgeqrf LAPACK_GLOBAL(sgeqrf,SGEQRF)\n#define LAPACK_dgeqrf LAPACK_GLOBAL(dgeqrf,DGEQRF)\n#define LAPACK_cgeqrf LAPACK_GLOBAL(cgeqrf,CGEQRF)\n#define LAPACK_zgeqrf LAPACK_GLOBAL(zgeqrf,ZGEQRF)\n#define LAPACK_sgeqpf LAPACK_GLOBAL(sgeqpf,SGEQPF)\n#define LAPACK_dgeqpf LAPACK_GLOBAL(dgeqpf,DGEQPF)\n#define LAPACK_cgeqpf LAPACK_GLOBAL(cgeqpf,CGEQPF)\n#define LAPACK_zgeqpf LAPACK_GLOBAL(zgeqpf,ZGEQPF)\n#define LAPACK_sgeqp3 LAPACK_GLOBAL(sgeqp3,SGEQP3)\n#define LAPACK_dgeqp3 LAPACK_GLOBAL(dgeqp3,DGEQP3)\n#define LAPACK_cgeqp3 LAPACK_GLOBAL(cgeqp3,CGEQP3)\n#define LAPACK_zgeqp3 LAPACK_GLOBAL(zgeqp3,ZGEQP3)\n#define LAPACK_sorgqr LAPACK_GLOBAL(sorgqr,SORGQR)\n#define LAPACK_dorgqr LAPACK_GLOBAL(dorgqr,DORGQR)\n#define LAPACK_sormqr LAPACK_GLOBAL(sormqr,SORMQR)\n#define LAPACK_dormqr LAPACK_GLOBAL(dormqr,DORMQR)\n#define LAPACK_cungqr LAPACK_GLOBAL(cungqr,CUNGQR)\n#define LAPACK_zungqr LAPACK_GLOBAL(zungqr,ZUNGQR)\n#define LAPACK_cunmqr LAPACK_GLOBAL(cunmqr,CUNMQR)\n#define LAPACK_zunmqr LAPACK_GLOBAL(zunmqr,ZUNMQR)\n#define LAPACK_sgelqf LAPACK_GLOBAL(sgelqf,SGELQF)\n#define LAPACK_dgelqf LAPACK_GLOBAL(dgelqf,DGELQF)\n#define LAPACK_cgelqf LAPACK_GLOBAL(cgelqf,CGELQF)\n#define LAPACK_zgelqf LAPACK_GLOBAL(zgelqf,ZGELQF)\n#define LAPACK_sorglq LAPACK_GLOBAL(sorglq,SORGLQ)\n#define LAPACK_dorglq LAPACK_GLOBAL(dorglq,DORGLQ)\n#define LAPACK_sormlq LAPACK_GLOBAL(sormlq,SORMLQ)\n#define LAPACK_dormlq LAPACK_GLOBAL(dormlq,DORMLQ)\n#define LAPACK_cunglq LAPACK_GLOBAL(cunglq,CUNGLQ)\n#define LAPACK_zunglq LAPACK_GLOBAL(zunglq,ZUNGLQ)\n#define LAPACK_cunmlq LAPACK_GLOBAL(cunmlq,CUNMLQ)\n#define LAPACK_zunmlq LAPACK_GLOBAL(zunmlq,ZUNMLQ)\n#define LAPACK_sgeqlf LAPACK_GLOBAL(sgeqlf,SGEQLF)\n#define LAPACK_dgeqlf LAPACK_GLOBAL(dgeqlf,DGEQLF)\n#define LAPACK_cgeqlf LAPACK_GLOBAL(cgeqlf,CGEQLF)\n#define LAPACK_zgeqlf LAPACK_GLOBAL(zgeqlf,ZGEQLF)\n#define LAPACK_sorgql LAPACK_GLOBAL(sorgql,SORGQL)\n#define LAPACK_dorgql LAPACK_GLOBAL(dorgql,DORGQL)\n#define LAPACK_cungql LAPACK_GLOBAL(cungql,CUNGQL)\n#define LAPACK_zungql LAPACK_GLOBAL(zungql,ZUNGQL)\n#define LAPACK_sormql LAPACK_GLOBAL(sormql,SORMQL)\n#define LAPACK_dormql LAPACK_GLOBAL(dormql,DORMQL)\n#define LAPACK_cunmql LAPACK_GLOBAL(cunmql,CUNMQL)\n#define LAPACK_zunmql LAPACK_GLOBAL(zunmql,ZUNMQL)\n#define LAPACK_sgerqf LAPACK_GLOBAL(sgerqf,SGERQF)\n#define LAPACK_dgerqf LAPACK_GLOBAL(dgerqf,DGERQF)\n#define LAPACK_cgerqf LAPACK_GLOBAL(cgerqf,CGERQF)\n#define LAPACK_zgerqf LAPACK_GLOBAL(zgerqf,ZGERQF)\n#define LAPACK_sorgrq LAPACK_GLOBAL(sorgrq,SORGRQ)\n#define LAPACK_dorgrq LAPACK_GLOBAL(dorgrq,DORGRQ)\n#define LAPACK_cungrq LAPACK_GLOBAL(cungrq,CUNGRQ)\n#define LAPACK_zungrq LAPACK_GLOBAL(zungrq,ZUNGRQ)\n#define LAPACK_sormrq LAPACK_GLOBAL(sormrq,SORMRQ)\n#define LAPACK_dormrq LAPACK_GLOBAL(dormrq,DORMRQ)\n#define LAPACK_cunmrq LAPACK_GLOBAL(cunmrq,CUNMRQ)\n#define LAPACK_zunmrq LAPACK_GLOBAL(zunmrq,ZUNMRQ)\n#define LAPACK_stzrzf LAPACK_GLOBAL(stzrzf,STZRZF)\n#define LAPACK_dtzrzf LAPACK_GLOBAL(dtzrzf,DTZRZF)\n#define LAPACK_ctzrzf LAPACK_GLOBAL(ctzrzf,CTZRZF)\n#define LAPACK_ztzrzf LAPACK_GLOBAL(ztzrzf,ZTZRZF)\n#define LAPACK_sormrz LAPACK_GLOBAL(sormrz,SORMRZ)\n#define LAPACK_dormrz LAPACK_GLOBAL(dormrz,DORMRZ)\n#define LAPACK_cunmrz LAPACK_GLOBAL(cunmrz,CUNMRZ)\n#define LAPACK_zunmrz LAPACK_GLOBAL(zunmrz,ZUNMRZ)\n#define LAPACK_sggqrf LAPACK_GLOBAL(sggqrf,SGGQRF)\n#define LAPACK_dggqrf LAPACK_GLOBAL(dggqrf,DGGQRF)\n#define LAPACK_cggqrf LAPACK_GLOBAL(cggqrf,CGGQRF)\n#define LAPACK_zggqrf LAPACK_GLOBAL(zggqrf,ZGGQRF)\n#define LAPACK_sggrqf LAPACK_GLOBAL(sggrqf,SGGRQF)\n#define LAPACK_dggrqf LAPACK_GLOBAL(dggrqf,DGGRQF)\n#define LAPACK_cggrqf LAPACK_GLOBAL(cggrqf,CGGRQF)\n#define LAPACK_zggrqf LAPACK_GLOBAL(zggrqf,ZGGRQF)\n#define LAPACK_sgebrd LAPACK_GLOBAL(sgebrd,SGEBRD)\n#define LAPACK_dgebrd LAPACK_GLOBAL(dgebrd,DGEBRD)\n#define LAPACK_cgebrd LAPACK_GLOBAL(cgebrd,CGEBRD)\n#define LAPACK_zgebrd LAPACK_GLOBAL(zgebrd,ZGEBRD)\n#define LAPACK_sgbbrd LAPACK_GLOBAL(sgbbrd,SGBBRD)\n#define LAPACK_dgbbrd LAPACK_GLOBAL(dgbbrd,DGBBRD)\n#define LAPACK_cgbbrd LAPACK_GLOBAL(cgbbrd,CGBBRD)\n#define LAPACK_zgbbrd LAPACK_GLOBAL(zgbbrd,ZGBBRD)\n#define LAPACK_sorgbr LAPACK_GLOBAL(sorgbr,SORGBR)\n#define LAPACK_dorgbr LAPACK_GLOBAL(dorgbr,DORGBR)\n#define LAPACK_sormbr LAPACK_GLOBAL(sormbr,SORMBR)\n#define LAPACK_dormbr LAPACK_GLOBAL(dormbr,DORMBR)\n#define LAPACK_cungbr LAPACK_GLOBAL(cungbr,CUNGBR)\n#define LAPACK_zungbr LAPACK_GLOBAL(zungbr,ZUNGBR)\n#define LAPACK_cunmbr LAPACK_GLOBAL(cunmbr,CUNMBR)\n#define LAPACK_zunmbr LAPACK_GLOBAL(zunmbr,ZUNMBR)\n#define LAPACK_sbdsqr LAPACK_GLOBAL(sbdsqr,SBDSQR)\n#define LAPACK_dbdsqr LAPACK_GLOBAL(dbdsqr,DBDSQR)\n#define LAPACK_cbdsqr LAPACK_GLOBAL(cbdsqr,CBDSQR)\n#define LAPACK_zbdsqr LAPACK_GLOBAL(zbdsqr,ZBDSQR)\n#define LAPACK_sbdsdc LAPACK_GLOBAL(sbdsdc,SBDSDC)\n#define LAPACK_dbdsdc LAPACK_GLOBAL(dbdsdc,DBDSDC)\n#define LAPACK_ssytrd LAPACK_GLOBAL(ssytrd,SSYTRD)\n#define LAPACK_dsytrd LAPACK_GLOBAL(dsytrd,DSYTRD)\n#define LAPACK_sorgtr LAPACK_GLOBAL(sorgtr,SORGTR)\n#define LAPACK_dorgtr LAPACK_GLOBAL(dorgtr,DORGTR)\n#define LAPACK_sormtr LAPACK_GLOBAL(sormtr,SORMTR)\n#define LAPACK_dormtr LAPACK_GLOBAL(dormtr,DORMTR)\n#define LAPACK_chetrd LAPACK_GLOBAL(chetrd,CHETRD)\n#define LAPACK_zhetrd LAPACK_GLOBAL(zhetrd,ZHETRD)\n#define LAPACK_cungtr LAPACK_GLOBAL(cungtr,CUNGTR)\n#define LAPACK_zungtr LAPACK_GLOBAL(zungtr,ZUNGTR)\n#define LAPACK_cunmtr LAPACK_GLOBAL(cunmtr,CUNMTR)\n#define LAPACK_zunmtr LAPACK_GLOBAL(zunmtr,ZUNMTR)\n#define LAPACK_ssptrd LAPACK_GLOBAL(ssptrd,SSPTRD)\n#define LAPACK_dsptrd LAPACK_GLOBAL(dsptrd,DSPTRD)\n#define LAPACK_sopgtr LAPACK_GLOBAL(sopgtr,SOPGTR)\n#define LAPACK_dopgtr LAPACK_GLOBAL(dopgtr,DOPGTR)\n#define LAPACK_sopmtr LAPACK_GLOBAL(sopmtr,SOPMTR)\n#define LAPACK_dopmtr LAPACK_GLOBAL(dopmtr,DOPMTR)\n#define LAPACK_chptrd LAPACK_GLOBAL(chptrd,CHPTRD)\n#define LAPACK_zhptrd LAPACK_GLOBAL(zhptrd,ZHPTRD)\n#define LAPACK_cupgtr LAPACK_GLOBAL(cupgtr,CUPGTR)\n#define LAPACK_zupgtr LAPACK_GLOBAL(zupgtr,ZUPGTR)\n#define LAPACK_cupmtr LAPACK_GLOBAL(cupmtr,CUPMTR)\n#define LAPACK_zupmtr LAPACK_GLOBAL(zupmtr,ZUPMTR)\n#define LAPACK_ssbtrd LAPACK_GLOBAL(ssbtrd,SSBTRD)\n#define LAPACK_dsbtrd LAPACK_GLOBAL(dsbtrd,DSBTRD)\n#define LAPACK_chbtrd LAPACK_GLOBAL(chbtrd,CHBTRD)\n#define LAPACK_zhbtrd LAPACK_GLOBAL(zhbtrd,ZHBTRD)\n#define LAPACK_ssterf LAPACK_GLOBAL(ssterf,SSTERF)\n#define LAPACK_dsterf LAPACK_GLOBAL(dsterf,DSTERF)\n#define LAPACK_ssteqr LAPACK_GLOBAL(ssteqr,SSTEQR)\n#define LAPACK_dsteqr LAPACK_GLOBAL(dsteqr,DSTEQR)\n#define LAPACK_csteqr LAPACK_GLOBAL(csteqr,CSTEQR)\n#define LAPACK_zsteqr LAPACK_GLOBAL(zsteqr,ZSTEQR)\n#define LAPACK_sstemr LAPACK_GLOBAL(sstemr,SSTEMR)\n#define LAPACK_dstemr LAPACK_GLOBAL(dstemr,DSTEMR)\n#define LAPACK_cstemr LAPACK_GLOBAL(cstemr,CSTEMR)\n#define LAPACK_zstemr LAPACK_GLOBAL(zstemr,ZSTEMR)\n#define LAPACK_sstedc LAPACK_GLOBAL(sstedc,SSTEDC)\n#define LAPACK_dstedc LAPACK_GLOBAL(dstedc,DSTEDC)\n#define LAPACK_cstedc LAPACK_GLOBAL(cstedc,CSTEDC)\n#define LAPACK_zstedc LAPACK_GLOBAL(zstedc,ZSTEDC)\n#define LAPACK_sstegr LAPACK_GLOBAL(sstegr,SSTEGR)\n#define LAPACK_dstegr LAPACK_GLOBAL(dstegr,DSTEGR)\n#define LAPACK_cstegr LAPACK_GLOBAL(cstegr,CSTEGR)\n#define LAPACK_zstegr LAPACK_GLOBAL(zstegr,ZSTEGR)\n#define LAPACK_spteqr LAPACK_GLOBAL(spteqr,SPTEQR)\n#define LAPACK_dpteqr LAPACK_GLOBAL(dpteqr,DPTEQR)\n#define LAPACK_cpteqr LAPACK_GLOBAL(cpteqr,CPTEQR)\n#define LAPACK_zpteqr LAPACK_GLOBAL(zpteqr,ZPTEQR)\n#define LAPACK_sstebz LAPACK_GLOBAL(sstebz,SSTEBZ)\n#define LAPACK_dstebz LAPACK_GLOBAL(dstebz,DSTEBZ)\n#define LAPACK_sstein LAPACK_GLOBAL(sstein,SSTEIN)\n#define LAPACK_dstein LAPACK_GLOBAL(dstein,DSTEIN)\n#define LAPACK_cstein LAPACK_GLOBAL(cstein,CSTEIN)\n#define LAPACK_zstein LAPACK_GLOBAL(zstein,ZSTEIN)\n#define LAPACK_sdisna LAPACK_GLOBAL(sdisna,SDISNA)\n#define LAPACK_ddisna LAPACK_GLOBAL(ddisna,DDISNA)\n#define LAPACK_ssygst LAPACK_GLOBAL(ssygst,SSYGST)\n#define LAPACK_dsygst LAPACK_GLOBAL(dsygst,DSYGST)\n#define LAPACK_chegst LAPACK_GLOBAL(chegst,CHEGST)\n#define LAPACK_zhegst LAPACK_GLOBAL(zhegst,ZHEGST)\n#define LAPACK_sspgst LAPACK_GLOBAL(sspgst,SSPGST)\n#define LAPACK_dspgst LAPACK_GLOBAL(dspgst,DSPGST)\n#define LAPACK_chpgst LAPACK_GLOBAL(chpgst,CHPGST)\n#define LAPACK_zhpgst LAPACK_GLOBAL(zhpgst,ZHPGST)\n#define LAPACK_ssbgst LAPACK_GLOBAL(ssbgst,SSBGST)\n#define LAPACK_dsbgst LAPACK_GLOBAL(dsbgst,DSBGST)\n#define LAPACK_chbgst LAPACK_GLOBAL(chbgst,CHBGST)\n#define LAPACK_zhbgst LAPACK_GLOBAL(zhbgst,ZHBGST)\n#define LAPACK_spbstf LAPACK_GLOBAL(spbstf,SPBSTF)\n#define LAPACK_dpbstf LAPACK_GLOBAL(dpbstf,DPBSTF)\n#define LAPACK_cpbstf LAPACK_GLOBAL(cpbstf,CPBSTF)\n#define LAPACK_zpbstf LAPACK_GLOBAL(zpbstf,ZPBSTF)\n#define LAPACK_sgehrd LAPACK_GLOBAL(sgehrd,SGEHRD)\n#define LAPACK_dgehrd LAPACK_GLOBAL(dgehrd,DGEHRD)\n#define LAPACK_cgehrd LAPACK_GLOBAL(cgehrd,CGEHRD)\n#define LAPACK_zgehrd LAPACK_GLOBAL(zgehrd,ZGEHRD)\n#define LAPACK_sorghr LAPACK_GLOBAL(sorghr,SORGHR)\n#define LAPACK_dorghr LAPACK_GLOBAL(dorghr,DORGHR)\n#define LAPACK_sormhr LAPACK_GLOBAL(sormhr,SORMHR)\n#define LAPACK_dormhr LAPACK_GLOBAL(dormhr,DORMHR)\n#define LAPACK_cunghr LAPACK_GLOBAL(cunghr,CUNGHR)\n#define LAPACK_zunghr LAPACK_GLOBAL(zunghr,ZUNGHR)\n#define LAPACK_cunmhr LAPACK_GLOBAL(cunmhr,CUNMHR)\n#define LAPACK_zunmhr LAPACK_GLOBAL(zunmhr,ZUNMHR)\n#define LAPACK_sgebal LAPACK_GLOBAL(sgebal,SGEBAL)\n#define LAPACK_dgebal LAPACK_GLOBAL(dgebal,DGEBAL)\n#define LAPACK_cgebal LAPACK_GLOBAL(cgebal,CGEBAL)\n#define LAPACK_zgebal LAPACK_GLOBAL(zgebal,ZGEBAL)\n#define LAPACK_sgebak LAPACK_GLOBAL(sgebak,SGEBAK)\n#define LAPACK_dgebak LAPACK_GLOBAL(dgebak,DGEBAK)\n#define LAPACK_cgebak LAPACK_GLOBAL(cgebak,CGEBAK)\n#define LAPACK_zgebak LAPACK_GLOBAL(zgebak,ZGEBAK)\n#define LAPACK_shseqr LAPACK_GLOBAL(shseqr,SHSEQR)\n#define LAPACK_dhseqr LAPACK_GLOBAL(dhseqr,DHSEQR)\n#define LAPACK_chseqr LAPACK_GLOBAL(chseqr,CHSEQR)\n#define LAPACK_zhseqr LAPACK_GLOBAL(zhseqr,ZHSEQR)\n#define LAPACK_shsein LAPACK_GLOBAL(shsein,SHSEIN)\n#define LAPACK_dhsein LAPACK_GLOBAL(dhsein,DHSEIN)\n#define LAPACK_chsein LAPACK_GLOBAL(chsein,CHSEIN)\n#define LAPACK_zhsein LAPACK_GLOBAL(zhsein,ZHSEIN)\n#define LAPACK_strevc LAPACK_GLOBAL(strevc,STREVC)\n#define LAPACK_dtrevc LAPACK_GLOBAL(dtrevc,DTREVC)\n#define LAPACK_ctrevc LAPACK_GLOBAL(ctrevc,CTREVC)\n#define LAPACK_ztrevc LAPACK_GLOBAL(ztrevc,ZTREVC)\n#define LAPACK_strsna LAPACK_GLOBAL(strsna,STRSNA)\n#define LAPACK_dtrsna LAPACK_GLOBAL(dtrsna,DTRSNA)\n#define LAPACK_ctrsna LAPACK_GLOBAL(ctrsna,CTRSNA)\n#define LAPACK_ztrsna LAPACK_GLOBAL(ztrsna,ZTRSNA)\n#define LAPACK_strexc LAPACK_GLOBAL(strexc,STREXC)\n#define LAPACK_dtrexc LAPACK_GLOBAL(dtrexc,DTREXC)\n#define LAPACK_ctrexc LAPACK_GLOBAL(ctrexc,CTREXC)\n#define LAPACK_ztrexc LAPACK_GLOBAL(ztrexc,ZTREXC)\n#define LAPACK_strsen LAPACK_GLOBAL(strsen,STRSEN)\n#define LAPACK_dtrsen LAPACK_GLOBAL(dtrsen,DTRSEN)\n#define LAPACK_ctrsen LAPACK_GLOBAL(ctrsen,CTRSEN)\n#define LAPACK_ztrsen LAPACK_GLOBAL(ztrsen,ZTRSEN)\n#define LAPACK_strsyl LAPACK_GLOBAL(strsyl,STRSYL)\n#define LAPACK_dtrsyl LAPACK_GLOBAL(dtrsyl,DTRSYL)\n#define LAPACK_ctrsyl LAPACK_GLOBAL(ctrsyl,CTRSYL)\n#define LAPACK_ztrsyl LAPACK_GLOBAL(ztrsyl,ZTRSYL)\n#define LAPACK_sgghrd LAPACK_GLOBAL(sgghrd,SGGHRD)\n#define LAPACK_dgghrd LAPACK_GLOBAL(dgghrd,DGGHRD)\n#define LAPACK_cgghrd LAPACK_GLOBAL(cgghrd,CGGHRD)\n#define LAPACK_zgghrd LAPACK_GLOBAL(zgghrd,ZGGHRD)\n#define LAPACK_sggbal LAPACK_GLOBAL(sggbal,SGGBAL)\n#define LAPACK_dggbal LAPACK_GLOBAL(dggbal,DGGBAL)\n#define LAPACK_cggbal LAPACK_GLOBAL(cggbal,CGGBAL)\n#define LAPACK_zggbal LAPACK_GLOBAL(zggbal,ZGGBAL)\n#define LAPACK_sggbak LAPACK_GLOBAL(sggbak,SGGBAK)\n#define LAPACK_dggbak LAPACK_GLOBAL(dggbak,DGGBAK)\n#define LAPACK_cggbak LAPACK_GLOBAL(cggbak,CGGBAK)\n#define LAPACK_zggbak LAPACK_GLOBAL(zggbak,ZGGBAK)\n#define LAPACK_shgeqz LAPACK_GLOBAL(shgeqz,SHGEQZ)\n#define LAPACK_dhgeqz LAPACK_GLOBAL(dhgeqz,DHGEQZ)\n#define LAPACK_chgeqz LAPACK_GLOBAL(chgeqz,CHGEQZ)\n#define LAPACK_zhgeqz LAPACK_GLOBAL(zhgeqz,ZHGEQZ)\n#define LAPACK_stgevc LAPACK_GLOBAL(stgevc,STGEVC)\n#define LAPACK_dtgevc LAPACK_GLOBAL(dtgevc,DTGEVC)\n#define LAPACK_ctgevc LAPACK_GLOBAL(ctgevc,CTGEVC)\n#define LAPACK_ztgevc LAPACK_GLOBAL(ztgevc,ZTGEVC)\n#define LAPACK_stgexc LAPACK_GLOBAL(stgexc,STGEXC)\n#define LAPACK_dtgexc LAPACK_GLOBAL(dtgexc,DTGEXC)\n#define LAPACK_ctgexc LAPACK_GLOBAL(ctgexc,CTGEXC)\n#define LAPACK_ztgexc LAPACK_GLOBAL(ztgexc,ZTGEXC)\n#define LAPACK_stgsen LAPACK_GLOBAL(stgsen,STGSEN)\n#define LAPACK_dtgsen LAPACK_GLOBAL(dtgsen,DTGSEN)\n#define LAPACK_ctgsen LAPACK_GLOBAL(ctgsen,CTGSEN)\n#define LAPACK_ztgsen LAPACK_GLOBAL(ztgsen,ZTGSEN)\n#define LAPACK_stgsyl LAPACK_GLOBAL(stgsyl,STGSYL)\n#define LAPACK_dtgsyl LAPACK_GLOBAL(dtgsyl,DTGSYL)\n#define LAPACK_ctgsyl LAPACK_GLOBAL(ctgsyl,CTGSYL)\n#define LAPACK_ztgsyl LAPACK_GLOBAL(ztgsyl,ZTGSYL)\n#define LAPACK_stgsna LAPACK_GLOBAL(stgsna,STGSNA)\n#define LAPACK_dtgsna LAPACK_GLOBAL(dtgsna,DTGSNA)\n#define LAPACK_ctgsna LAPACK_GLOBAL(ctgsna,CTGSNA)\n#define LAPACK_ztgsna LAPACK_GLOBAL(ztgsna,ZTGSNA)\n#define LAPACK_sggsvp LAPACK_GLOBAL(sggsvp,SGGSVP)\n#define LAPACK_dggsvp LAPACK_GLOBAL(dggsvp,DGGSVP)\n#define LAPACK_cggsvp LAPACK_GLOBAL(cggsvp,CGGSVP)\n#define LAPACK_zggsvp LAPACK_GLOBAL(zggsvp,ZGGSVP)\n#define LAPACK_stgsja LAPACK_GLOBAL(stgsja,STGSJA)\n#define LAPACK_dtgsja LAPACK_GLOBAL(dtgsja,DTGSJA)\n#define LAPACK_ctgsja LAPACK_GLOBAL(ctgsja,CTGSJA)\n#define LAPACK_ztgsja LAPACK_GLOBAL(ztgsja,ZTGSJA)\n#define LAPACK_sgels LAPACK_GLOBAL(sgels,SGELS)\n#define LAPACK_dgels LAPACK_GLOBAL(dgels,DGELS)\n#define LAPACK_cgels LAPACK_GLOBAL(cgels,CGELS)\n#define LAPACK_zgels LAPACK_GLOBAL(zgels,ZGELS)\n#define LAPACK_sgelsy LAPACK_GLOBAL(sgelsy,SGELSY)\n#define LAPACK_dgelsy LAPACK_GLOBAL(dgelsy,DGELSY)\n#define LAPACK_cgelsy LAPACK_GLOBAL(cgelsy,CGELSY)\n#define LAPACK_zgelsy LAPACK_GLOBAL(zgelsy,ZGELSY)\n#define LAPACK_sgelss LAPACK_GLOBAL(sgelss,SGELSS)\n#define LAPACK_dgelss LAPACK_GLOBAL(dgelss,DGELSS)\n#define LAPACK_cgelss LAPACK_GLOBAL(cgelss,CGELSS)\n#define LAPACK_zgelss LAPACK_GLOBAL(zgelss,ZGELSS)\n#define LAPACK_sgelsd LAPACK_GLOBAL(sgelsd,SGELSD)\n#define LAPACK_dgelsd LAPACK_GLOBAL(dgelsd,DGELSD)\n#define LAPACK_cgelsd LAPACK_GLOBAL(cgelsd,CGELSD)\n#define LAPACK_zgelsd LAPACK_GLOBAL(zgelsd,ZGELSD)\n#define LAPACK_sgglse LAPACK_GLOBAL(sgglse,SGGLSE)\n#define LAPACK_dgglse LAPACK_GLOBAL(dgglse,DGGLSE)\n#define LAPACK_cgglse LAPACK_GLOBAL(cgglse,CGGLSE)\n#define LAPACK_zgglse LAPACK_GLOBAL(zgglse,ZGGLSE)\n#define LAPACK_sggglm LAPACK_GLOBAL(sggglm,SGGGLM)\n#define LAPACK_dggglm LAPACK_GLOBAL(dggglm,DGGGLM)\n#define LAPACK_cggglm LAPACK_GLOBAL(cggglm,CGGGLM)\n#define LAPACK_zggglm LAPACK_GLOBAL(zggglm,ZGGGLM)\n#define LAPACK_ssyev LAPACK_GLOBAL(ssyev,SSYEV)\n#define LAPACK_dsyev LAPACK_GLOBAL(dsyev,DSYEV)\n#define LAPACK_cheev LAPACK_GLOBAL(cheev,CHEEV)\n#define LAPACK_zheev LAPACK_GLOBAL(zheev,ZHEEV)\n#define LAPACK_ssyevd LAPACK_GLOBAL(ssyevd,SSYEVD)\n#define LAPACK_dsyevd LAPACK_GLOBAL(dsyevd,DSYEVD)\n#define LAPACK_cheevd LAPACK_GLOBAL(cheevd,CHEEVD)\n#define LAPACK_zheevd LAPACK_GLOBAL(zheevd,ZHEEVD)\n#define LAPACK_ssyevx LAPACK_GLOBAL(ssyevx,SSYEVX)\n#define LAPACK_dsyevx LAPACK_GLOBAL(dsyevx,DSYEVX)\n#define LAPACK_cheevx LAPACK_GLOBAL(cheevx,CHEEVX)\n#define LAPACK_zheevx LAPACK_GLOBAL(zheevx,ZHEEVX)\n#define LAPACK_ssyevr LAPACK_GLOBAL(ssyevr,SSYEVR)\n#define LAPACK_dsyevr LAPACK_GLOBAL(dsyevr,DSYEVR)\n#define LAPACK_cheevr LAPACK_GLOBAL(cheevr,CHEEVR)\n#define LAPACK_zheevr LAPACK_GLOBAL(zheevr,ZHEEVR)\n#define LAPACK_sspev LAPACK_GLOBAL(sspev,SSPEV)\n#define LAPACK_dspev LAPACK_GLOBAL(dspev,DSPEV)\n#define LAPACK_chpev LAPACK_GLOBAL(chpev,CHPEV)\n#define LAPACK_zhpev LAPACK_GLOBAL(zhpev,ZHPEV)\n#define LAPACK_sspevd LAPACK_GLOBAL(sspevd,SSPEVD)\n#define LAPACK_dspevd LAPACK_GLOBAL(dspevd,DSPEVD)\n#define LAPACK_chpevd LAPACK_GLOBAL(chpevd,CHPEVD)\n#define LAPACK_zhpevd LAPACK_GLOBAL(zhpevd,ZHPEVD)\n#define LAPACK_sspevx LAPACK_GLOBAL(sspevx,SSPEVX)\n#define LAPACK_dspevx LAPACK_GLOBAL(dspevx,DSPEVX)\n#define LAPACK_chpevx LAPACK_GLOBAL(chpevx,CHPEVX)\n#define LAPACK_zhpevx LAPACK_GLOBAL(zhpevx,ZHPEVX)\n#define LAPACK_ssbev LAPACK_GLOBAL(ssbev,SSBEV)\n#define LAPACK_dsbev LAPACK_GLOBAL(dsbev,DSBEV)\n#define LAPACK_chbev LAPACK_GLOBAL(chbev,CHBEV)\n#define LAPACK_zhbev LAPACK_GLOBAL(zhbev,ZHBEV)\n#define LAPACK_ssbevd LAPACK_GLOBAL(ssbevd,SSBEVD)\n#define LAPACK_dsbevd LAPACK_GLOBAL(dsbevd,DSBEVD)\n#define LAPACK_chbevd LAPACK_GLOBAL(chbevd,CHBEVD)\n#define LAPACK_zhbevd LAPACK_GLOBAL(zhbevd,ZHBEVD)\n#define LAPACK_ssbevx LAPACK_GLOBAL(ssbevx,SSBEVX)\n#define LAPACK_dsbevx LAPACK_GLOBAL(dsbevx,DSBEVX)\n#define LAPACK_chbevx LAPACK_GLOBAL(chbevx,CHBEVX)\n#define LAPACK_zhbevx LAPACK_GLOBAL(zhbevx,ZHBEVX)\n#define LAPACK_sstev LAPACK_GLOBAL(sstev,SSTEV)\n#define LAPACK_dstev LAPACK_GLOBAL(dstev,DSTEV)\n#define LAPACK_sstevd LAPACK_GLOBAL(sstevd,SSTEVD)\n#define LAPACK_dstevd LAPACK_GLOBAL(dstevd,DSTEVD)\n#define LAPACK_sstevx LAPACK_GLOBAL(sstevx,SSTEVX)\n#define LAPACK_dstevx LAPACK_GLOBAL(dstevx,DSTEVX)\n#define LAPACK_sstevr LAPACK_GLOBAL(sstevr,SSTEVR)\n#define LAPACK_dstevr LAPACK_GLOBAL(dstevr,DSTEVR)\n#define LAPACK_sgees LAPACK_GLOBAL(sgees,SGEES)\n#define LAPACK_dgees LAPACK_GLOBAL(dgees,DGEES)\n#define LAPACK_cgees LAPACK_GLOBAL(cgees,CGEES)\n#define LAPACK_zgees LAPACK_GLOBAL(zgees,ZGEES)\n#define LAPACK_sgeesx LAPACK_GLOBAL(sgeesx,SGEESX)\n#define LAPACK_dgeesx LAPACK_GLOBAL(dgeesx,DGEESX)\n#define LAPACK_cgeesx LAPACK_GLOBAL(cgeesx,CGEESX)\n#define LAPACK_zgeesx LAPACK_GLOBAL(zgeesx,ZGEESX)\n#define LAPACK_sgeev LAPACK_GLOBAL(sgeev,SGEEV)\n#define LAPACK_dgeev LAPACK_GLOBAL(dgeev,DGEEV)\n#define LAPACK_cgeev LAPACK_GLOBAL(cgeev,CGEEV)\n#define LAPACK_zgeev LAPACK_GLOBAL(zgeev,ZGEEV)\n#define LAPACK_sgeevx LAPACK_GLOBAL(sgeevx,SGEEVX)\n#define LAPACK_dgeevx LAPACK_GLOBAL(dgeevx,DGEEVX)\n#define LAPACK_cgeevx LAPACK_GLOBAL(cgeevx,CGEEVX)\n#define LAPACK_zgeevx LAPACK_GLOBAL(zgeevx,ZGEEVX)\n#define LAPACK_sgesvd LAPACK_GLOBAL(sgesvd,SGESVD)\n#define LAPACK_dgesvd LAPACK_GLOBAL(dgesvd,DGESVD)\n#define LAPACK_cgesvd LAPACK_GLOBAL(cgesvd,CGESVD)\n#define LAPACK_zgesvd LAPACK_GLOBAL(zgesvd,ZGESVD)\n#define LAPACK_sgesdd LAPACK_GLOBAL(sgesdd,SGESDD)\n#define LAPACK_dgesdd LAPACK_GLOBAL(dgesdd,DGESDD)\n#define LAPACK_cgesdd LAPACK_GLOBAL(cgesdd,CGESDD)\n#define LAPACK_zgesdd LAPACK_GLOBAL(zgesdd,ZGESDD)\n#define LAPACK_dgejsv LAPACK_GLOBAL(dgejsv,DGEJSV)\n#define LAPACK_sgejsv LAPACK_GLOBAL(sgejsv,SGEJSV)\n#define LAPACK_dgesvj LAPACK_GLOBAL(dgesvj,DGESVJ)\n#define LAPACK_sgesvj LAPACK_GLOBAL(sgesvj,SGESVJ)\n#define LAPACK_sggsvd LAPACK_GLOBAL(sggsvd,SGGSVD)\n#define LAPACK_dggsvd LAPACK_GLOBAL(dggsvd,DGGSVD)\n#define LAPACK_cggsvd LAPACK_GLOBAL(cggsvd,CGGSVD)\n#define LAPACK_zggsvd LAPACK_GLOBAL(zggsvd,ZGGSVD)\n#define LAPACK_ssygv LAPACK_GLOBAL(ssygv,SSYGV)\n#define LAPACK_dsygv LAPACK_GLOBAL(dsygv,DSYGV)\n#define LAPACK_chegv LAPACK_GLOBAL(chegv,CHEGV)\n#define LAPACK_zhegv LAPACK_GLOBAL(zhegv,ZHEGV)\n#define LAPACK_ssygvd LAPACK_GLOBAL(ssygvd,SSYGVD)\n#define LAPACK_dsygvd LAPACK_GLOBAL(dsygvd,DSYGVD)\n#define LAPACK_chegvd LAPACK_GLOBAL(chegvd,CHEGVD)\n#define LAPACK_zhegvd LAPACK_GLOBAL(zhegvd,ZHEGVD)\n#define LAPACK_ssygvx LAPACK_GLOBAL(ssygvx,SSYGVX)\n#define LAPACK_dsygvx LAPACK_GLOBAL(dsygvx,DSYGVX)\n#define LAPACK_chegvx LAPACK_GLOBAL(chegvx,CHEGVX)\n#define LAPACK_zhegvx LAPACK_GLOBAL(zhegvx,ZHEGVX)\n#define LAPACK_sspgv LAPACK_GLOBAL(sspgv,SSPGV)\n#define LAPACK_dspgv LAPACK_GLOBAL(dspgv,DSPGV)\n#define LAPACK_chpgv LAPACK_GLOBAL(chpgv,CHPGV)\n#define LAPACK_zhpgv LAPACK_GLOBAL(zhpgv,ZHPGV)\n#define LAPACK_sspgvd LAPACK_GLOBAL(sspgvd,SSPGVD)\n#define LAPACK_dspgvd LAPACK_GLOBAL(dspgvd,DSPGVD)\n#define LAPACK_chpgvd LAPACK_GLOBAL(chpgvd,CHPGVD)\n#define LAPACK_zhpgvd LAPACK_GLOBAL(zhpgvd,ZHPGVD)\n#define LAPACK_sspgvx LAPACK_GLOBAL(sspgvx,SSPGVX)\n#define LAPACK_dspgvx LAPACK_GLOBAL(dspgvx,DSPGVX)\n#define LAPACK_chpgvx LAPACK_GLOBAL(chpgvx,CHPGVX)\n#define LAPACK_zhpgvx LAPACK_GLOBAL(zhpgvx,ZHPGVX)\n#define LAPACK_ssbgv LAPACK_GLOBAL(ssbgv,SSBGV)\n#define LAPACK_dsbgv LAPACK_GLOBAL(dsbgv,DSBGV)\n#define LAPACK_chbgv LAPACK_GLOBAL(chbgv,CHBGV)\n#define LAPACK_zhbgv LAPACK_GLOBAL(zhbgv,ZHBGV)\n#define LAPACK_ssbgvd LAPACK_GLOBAL(ssbgvd,SSBGVD)\n#define LAPACK_dsbgvd LAPACK_GLOBAL(dsbgvd,DSBGVD)\n#define LAPACK_chbgvd LAPACK_GLOBAL(chbgvd,CHBGVD)\n#define LAPACK_zhbgvd LAPACK_GLOBAL(zhbgvd,ZHBGVD)\n#define LAPACK_ssbgvx LAPACK_GLOBAL(ssbgvx,SSBGVX)\n#define LAPACK_dsbgvx LAPACK_GLOBAL(dsbgvx,DSBGVX)\n#define LAPACK_chbgvx LAPACK_GLOBAL(chbgvx,CHBGVX)\n#define LAPACK_zhbgvx LAPACK_GLOBAL(zhbgvx,ZHBGVX)\n#define LAPACK_sgges LAPACK_GLOBAL(sgges,SGGES)\n#define LAPACK_dgges LAPACK_GLOBAL(dgges,DGGES)\n#define LAPACK_cgges LAPACK_GLOBAL(cgges,CGGES)\n#define LAPACK_zgges LAPACK_GLOBAL(zgges,ZGGES)\n#define LAPACK_sggesx LAPACK_GLOBAL(sggesx,SGGESX)\n#define LAPACK_dggesx LAPACK_GLOBAL(dggesx,DGGESX)\n#define LAPACK_cggesx LAPACK_GLOBAL(cggesx,CGGESX)\n#define LAPACK_zggesx LAPACK_GLOBAL(zggesx,ZGGESX)\n#define LAPACK_sggev LAPACK_GLOBAL(sggev,SGGEV)\n#define LAPACK_dggev LAPACK_GLOBAL(dggev,DGGEV)\n#define LAPACK_cggev LAPACK_GLOBAL(cggev,CGGEV)\n#define LAPACK_zggev LAPACK_GLOBAL(zggev,ZGGEV)\n#define LAPACK_sggevx LAPACK_GLOBAL(sggevx,SGGEVX)\n#define LAPACK_dggevx LAPACK_GLOBAL(dggevx,DGGEVX)\n#define LAPACK_cggevx LAPACK_GLOBAL(cggevx,CGGEVX)\n#define LAPACK_zggevx LAPACK_GLOBAL(zggevx,ZGGEVX)\n#define LAPACK_dsfrk LAPACK_GLOBAL(dsfrk,DSFRK)\n#define LAPACK_ssfrk LAPACK_GLOBAL(ssfrk,SSFRK)\n#define LAPACK_zhfrk LAPACK_GLOBAL(zhfrk,ZHFRK)\n#define LAPACK_chfrk LAPACK_GLOBAL(chfrk,CHFRK)\n#define LAPACK_dtfsm LAPACK_GLOBAL(dtfsm,DTFSM)\n#define LAPACK_stfsm LAPACK_GLOBAL(stfsm,STFSM)\n#define LAPACK_ztfsm LAPACK_GLOBAL(ztfsm,ZTFSM)\n#define LAPACK_ctfsm LAPACK_GLOBAL(ctfsm,CTFSM)\n#define LAPACK_dtfttp LAPACK_GLOBAL(dtfttp,DTFTTP)\n#define LAPACK_stfttp LAPACK_GLOBAL(stfttp,STFTTP)\n#define LAPACK_ztfttp LAPACK_GLOBAL(ztfttp,ZTFTTP)\n#define LAPACK_ctfttp LAPACK_GLOBAL(ctfttp,CTFTTP)\n#define LAPACK_dtfttr LAPACK_GLOBAL(dtfttr,DTFTTR)\n#define LAPACK_stfttr LAPACK_GLOBAL(stfttr,STFTTR)\n#define LAPACK_ztfttr LAPACK_GLOBAL(ztfttr,ZTFTTR)\n#define LAPACK_ctfttr LAPACK_GLOBAL(ctfttr,CTFTTR)\n#define LAPACK_dtpttf LAPACK_GLOBAL(dtpttf,DTPTTF)\n#define LAPACK_stpttf LAPACK_GLOBAL(stpttf,STPTTF)\n#define LAPACK_ztpttf LAPACK_GLOBAL(ztpttf,ZTPTTF)\n#define LAPACK_ctpttf LAPACK_GLOBAL(ctpttf,CTPTTF)\n#define LAPACK_dtpttr LAPACK_GLOBAL(dtpttr,DTPTTR)\n#define LAPACK_stpttr LAPACK_GLOBAL(stpttr,STPTTR)\n#define LAPACK_ztpttr LAPACK_GLOBAL(ztpttr,ZTPTTR)\n#define LAPACK_ctpttr LAPACK_GLOBAL(ctpttr,CTPTTR)\n#define LAPACK_dtrttf LAPACK_GLOBAL(dtrttf,DTRTTF)\n#define LAPACK_strttf LAPACK_GLOBAL(strttf,STRTTF)\n#define LAPACK_ztrttf LAPACK_GLOBAL(ztrttf,ZTRTTF)\n#define LAPACK_ctrttf LAPACK_GLOBAL(ctrttf,CTRTTF)\n#define LAPACK_dtrttp LAPACK_GLOBAL(dtrttp,DTRTTP)\n#define LAPACK_strttp LAPACK_GLOBAL(strttp,STRTTP)\n#define LAPACK_ztrttp LAPACK_GLOBAL(ztrttp,ZTRTTP)\n#define LAPACK_ctrttp LAPACK_GLOBAL(ctrttp,CTRTTP)\n#define LAPACK_sgeqrfp LAPACK_GLOBAL(sgeqrfp,SGEQRFP)\n#define LAPACK_dgeqrfp LAPACK_GLOBAL(dgeqrfp,DGEQRFP)\n#define LAPACK_cgeqrfp LAPACK_GLOBAL(cgeqrfp,CGEQRFP)\n#define LAPACK_zgeqrfp LAPACK_GLOBAL(zgeqrfp,ZGEQRFP)\n#define LAPACK_clacgv LAPACK_GLOBAL(clacgv,CLACGV)\n#define LAPACK_zlacgv LAPACK_GLOBAL(zlacgv,ZLACGV)\n#define LAPACK_slarnv LAPACK_GLOBAL(slarnv,SLARNV)\n#define LAPACK_dlarnv LAPACK_GLOBAL(dlarnv,DLARNV)\n#define LAPACK_clarnv LAPACK_GLOBAL(clarnv,CLARNV)\n#define LAPACK_zlarnv LAPACK_GLOBAL(zlarnv,ZLARNV)\n#define LAPACK_sgeqr2 LAPACK_GLOBAL(sgeqr2,SGEQR2)\n#define LAPACK_dgeqr2 LAPACK_GLOBAL(dgeqr2,DGEQR2)\n#define LAPACK_cgeqr2 LAPACK_GLOBAL(cgeqr2,CGEQR2)\n#define LAPACK_zgeqr2 LAPACK_GLOBAL(zgeqr2,ZGEQR2)\n#define LAPACK_slacpy LAPACK_GLOBAL(slacpy,SLACPY)\n#define LAPACK_dlacpy LAPACK_GLOBAL(dlacpy,DLACPY)\n#define LAPACK_clacpy LAPACK_GLOBAL(clacpy,CLACPY)\n#define LAPACK_zlacpy LAPACK_GLOBAL(zlacpy,ZLACPY)\n#define LAPACK_sgetf2 LAPACK_GLOBAL(sgetf2,SGETF2)\n#define LAPACK_dgetf2 LAPACK_GLOBAL(dgetf2,DGETF2)\n#define LAPACK_cgetf2 LAPACK_GLOBAL(cgetf2,CGETF2)\n#define LAPACK_zgetf2 LAPACK_GLOBAL(zgetf2,ZGETF2)\n#define LAPACK_slaswp LAPACK_GLOBAL(slaswp,SLASWP)\n#define LAPACK_dlaswp LAPACK_GLOBAL(dlaswp,DLASWP)\n#define LAPACK_claswp LAPACK_GLOBAL(claswp,CLASWP)\n#define LAPACK_zlaswp LAPACK_GLOBAL(zlaswp,ZLASWP)\n#define LAPACK_slange LAPACK_GLOBAL(slange,SLANGE)\n#define LAPACK_dlange LAPACK_GLOBAL(dlange,DLANGE)\n#define LAPACK_clange LAPACK_GLOBAL(clange,CLANGE)\n#define LAPACK_zlange LAPACK_GLOBAL(zlange,ZLANGE)\n#define LAPACK_clanhe LAPACK_GLOBAL(clanhe,CLANHE)\n#define LAPACK_zlanhe LAPACK_GLOBAL(zlanhe,ZLANHE)\n#define LAPACK_slansy LAPACK_GLOBAL(slansy,SLANSY)\n#define LAPACK_dlansy LAPACK_GLOBAL(dlansy,DLANSY)\n#define LAPACK_clansy LAPACK_GLOBAL(clansy,CLANSY)\n#define LAPACK_zlansy LAPACK_GLOBAL(zlansy,ZLANSY)\n#define LAPACK_slantr LAPACK_GLOBAL(slantr,SLANTR)\n#define LAPACK_dlantr LAPACK_GLOBAL(dlantr,DLANTR)\n#define LAPACK_clantr LAPACK_GLOBAL(clantr,CLANTR)\n#define LAPACK_zlantr LAPACK_GLOBAL(zlantr,ZLANTR)\n#define LAPACK_slamch LAPACK_GLOBAL(slamch,SLAMCH)\n#define LAPACK_dlamch LAPACK_GLOBAL(dlamch,DLAMCH)\n#define LAPACK_sgelq2 LAPACK_GLOBAL(sgelq2,SGELQ2)\n#define LAPACK_dgelq2 LAPACK_GLOBAL(dgelq2,DGELQ2)\n#define LAPACK_cgelq2 LAPACK_GLOBAL(cgelq2,CGELQ2)\n#define LAPACK_zgelq2 LAPACK_GLOBAL(zgelq2,ZGELQ2)\n#define LAPACK_slarfb LAPACK_GLOBAL(slarfb,SLARFB)\n#define LAPACK_dlarfb LAPACK_GLOBAL(dlarfb,DLARFB)\n#define LAPACK_clarfb LAPACK_GLOBAL(clarfb,CLARFB)\n#define LAPACK_zlarfb LAPACK_GLOBAL(zlarfb,ZLARFB)\n#define LAPACK_slarfg LAPACK_GLOBAL(slarfg,SLARFG)\n#define LAPACK_dlarfg LAPACK_GLOBAL(dlarfg,DLARFG)\n#define LAPACK_clarfg LAPACK_GLOBAL(clarfg,CLARFG)\n#define LAPACK_zlarfg LAPACK_GLOBAL(zlarfg,ZLARFG)\n#define LAPACK_slarft LAPACK_GLOBAL(slarft,SLARFT)\n#define LAPACK_dlarft LAPACK_GLOBAL(dlarft,DLARFT)\n#define LAPACK_clarft LAPACK_GLOBAL(clarft,CLARFT)\n#define LAPACK_zlarft LAPACK_GLOBAL(zlarft,ZLARFT)\n#define LAPACK_slarfx LAPACK_GLOBAL(slarfx,SLARFX)\n#define LAPACK_dlarfx LAPACK_GLOBAL(dlarfx,DLARFX)\n#define LAPACK_clarfx LAPACK_GLOBAL(clarfx,CLARFX)\n#define LAPACK_zlarfx LAPACK_GLOBAL(zlarfx,ZLARFX)\n#define LAPACK_slatms LAPACK_GLOBAL(slatms,SLATMS)\n#define LAPACK_dlatms LAPACK_GLOBAL(dlatms,DLATMS)\n#define LAPACK_clatms LAPACK_GLOBAL(clatms,CLATMS)\n#define LAPACK_zlatms LAPACK_GLOBAL(zlatms,ZLATMS)\n#define LAPACK_slag2d LAPACK_GLOBAL(slag2d,SLAG2D)\n#define LAPACK_dlag2s LAPACK_GLOBAL(dlag2s,DLAG2S)\n#define LAPACK_clag2z LAPACK_GLOBAL(clag2z,CLAG2Z)\n#define LAPACK_zlag2c LAPACK_GLOBAL(zlag2c,ZLAG2C)\n#define LAPACK_slauum LAPACK_GLOBAL(slauum,SLAUUM)\n#define LAPACK_dlauum LAPACK_GLOBAL(dlauum,DLAUUM)\n#define LAPACK_clauum LAPACK_GLOBAL(clauum,CLAUUM)\n#define LAPACK_zlauum LAPACK_GLOBAL(zlauum,ZLAUUM)\n#define LAPACK_slagge LAPACK_GLOBAL(slagge,SLAGGE)\n#define LAPACK_dlagge LAPACK_GLOBAL(dlagge,DLAGGE)\n#define LAPACK_clagge LAPACK_GLOBAL(clagge,CLAGGE)\n#define LAPACK_zlagge LAPACK_GLOBAL(zlagge,ZLAGGE)\n#define LAPACK_slaset LAPACK_GLOBAL(slaset,SLASET)\n#define LAPACK_dlaset LAPACK_GLOBAL(dlaset,DLASET)\n#define LAPACK_claset LAPACK_GLOBAL(claset,CLASET)\n#define LAPACK_zlaset LAPACK_GLOBAL(zlaset,ZLASET)\n#define LAPACK_slasrt LAPACK_GLOBAL(slasrt,SLASRT)\n#define LAPACK_dlasrt LAPACK_GLOBAL(dlasrt,DLASRT)\n#define LAPACK_slagsy LAPACK_GLOBAL(slagsy,SLAGSY)\n#define LAPACK_dlagsy LAPACK_GLOBAL(dlagsy,DLAGSY)\n#define LAPACK_clagsy LAPACK_GLOBAL(clagsy,CLAGSY)\n#define LAPACK_zlagsy LAPACK_GLOBAL(zlagsy,ZLAGSY)\n#define LAPACK_claghe LAPACK_GLOBAL(claghe,CLAGHE)\n#define LAPACK_zlaghe LAPACK_GLOBAL(zlaghe,ZLAGHE)\n#define LAPACK_slapmr LAPACK_GLOBAL(slapmr,SLAPMR)\n#define LAPACK_dlapmr LAPACK_GLOBAL(dlapmr,DLAPMR)\n#define LAPACK_clapmr LAPACK_GLOBAL(clapmr,CLAPMR)\n#define LAPACK_zlapmr LAPACK_GLOBAL(zlapmr,ZLAPMR)\n#define LAPACK_slapy2 LAPACK_GLOBAL(slapy2,SLAPY2)\n#define LAPACK_dlapy2 LAPACK_GLOBAL(dlapy2,DLAPY2)\n#define LAPACK_slapy3 LAPACK_GLOBAL(slapy3,SLAPY3)\n#define LAPACK_dlapy3 LAPACK_GLOBAL(dlapy3,DLAPY3)\n#define LAPACK_slartgp LAPACK_GLOBAL(slartgp,SLARTGP)\n#define LAPACK_dlartgp LAPACK_GLOBAL(dlartgp,DLARTGP)\n#define LAPACK_slartgs LAPACK_GLOBAL(slartgs,SLARTGS)\n#define LAPACK_dlartgs LAPACK_GLOBAL(dlartgs,DLARTGS)\n// LAPACK 3.3.0\n#define LAPACK_cbbcsd LAPACK_GLOBAL(cbbcsd,CBBCSD)\n#define LAPACK_cheswapr LAPACK_GLOBAL(cheswapr,CHESWAPR)\n#define LAPACK_chetri2 LAPACK_GLOBAL(chetri2,CHETRI2)\n#define LAPACK_chetri2x LAPACK_GLOBAL(chetri2x,CHETRI2X)\n#define LAPACK_chetrs2 LAPACK_GLOBAL(chetrs2,CHETRS2)\n#define LAPACK_csyconv LAPACK_GLOBAL(csyconv,CSYCONV)\n#define LAPACK_csyswapr LAPACK_GLOBAL(csyswapr,CSYSWAPR)\n#define LAPACK_csytri2 LAPACK_GLOBAL(csytri2,CSYTRI2)\n#define LAPACK_csytri2x LAPACK_GLOBAL(csytri2x,CSYTRI2X)\n#define LAPACK_csytrs2 LAPACK_GLOBAL(csytrs2,CSYTRS2)\n#define LAPACK_cunbdb LAPACK_GLOBAL(cunbdb,CUNBDB)\n#define LAPACK_cuncsd LAPACK_GLOBAL(cuncsd,CUNCSD)\n#define LAPACK_dbbcsd LAPACK_GLOBAL(dbbcsd,DBBCSD)\n#define LAPACK_dorbdb LAPACK_GLOBAL(dorbdb,DORBDB)\n#define LAPACK_dorcsd LAPACK_GLOBAL(dorcsd,DORCSD)\n#define LAPACK_dsyconv LAPACK_GLOBAL(dsyconv,DSYCONV)\n#define LAPACK_dsyswapr LAPACK_GLOBAL(dsyswapr,DSYSWAPR)\n#define LAPACK_dsytri2 LAPACK_GLOBAL(dsytri2,DSYTRI2)\n#define LAPACK_dsytri2x LAPACK_GLOBAL(dsytri2x,DSYTRI2X)\n#define LAPACK_dsytrs2 LAPACK_GLOBAL(dsytrs2,DSYTRS2)\n#define LAPACK_sbbcsd LAPACK_GLOBAL(sbbcsd,SBBCSD)\n#define LAPACK_sorbdb LAPACK_GLOBAL(sorbdb,SORBDB)\n#define LAPACK_sorcsd LAPACK_GLOBAL(sorcsd,SORCSD)\n#define LAPACK_ssyconv LAPACK_GLOBAL(ssyconv,SSYCONV)\n#define LAPACK_ssyswapr LAPACK_GLOBAL(ssyswapr,SSYSWAPR)\n#define LAPACK_ssytri2 LAPACK_GLOBAL(ssytri2,SSYTRI2)\n#define LAPACK_ssytri2x LAPACK_GLOBAL(ssytri2x,SSYTRI2X)\n#define LAPACK_ssytrs2 LAPACK_GLOBAL(ssytrs2,SSYTRS2)\n#define LAPACK_zbbcsd LAPACK_GLOBAL(zbbcsd,ZBBCSD)\n#define LAPACK_zheswapr LAPACK_GLOBAL(zheswapr,ZHESWAPR)\n#define LAPACK_zhetri2 LAPACK_GLOBAL(zhetri2,ZHETRI2)\n#define LAPACK_zhetri2x LAPACK_GLOBAL(zhetri2x,ZHETRI2X)\n#define LAPACK_zhetrs2 LAPACK_GLOBAL(zhetrs2,ZHETRS2)\n#define LAPACK_zsyconv LAPACK_GLOBAL(zsyconv,ZSYCONV)\n#define LAPACK_zsyswapr LAPACK_GLOBAL(zsyswapr,ZSYSWAPR)\n#define LAPACK_zsytri2 LAPACK_GLOBAL(zsytri2,ZSYTRI2)\n#define LAPACK_zsytri2x LAPACK_GLOBAL(zsytri2x,ZSYTRI2X)\n#define LAPACK_zsytrs2 LAPACK_GLOBAL(zsytrs2,ZSYTRS2)\n#define LAPACK_zunbdb LAPACK_GLOBAL(zunbdb,ZUNBDB)\n#define LAPACK_zuncsd LAPACK_GLOBAL(zuncsd,ZUNCSD)\n// LAPACK 3.4.0\n#define LAPACK_sgemqrt LAPACK_GLOBAL(sgemqrt,SGEMQRT)\n#define LAPACK_dgemqrt LAPACK_GLOBAL(dgemqrt,DGEMQRT)\n#define LAPACK_cgemqrt LAPACK_GLOBAL(cgemqrt,CGEMQRT)\n#define LAPACK_zgemqrt LAPACK_GLOBAL(zgemqrt,ZGEMQRT)\n#define LAPACK_sgeqrt LAPACK_GLOBAL(sgeqrt,SGEQRT)\n#define LAPACK_dgeqrt LAPACK_GLOBAL(dgeqrt,DGEQRT)\n#define LAPACK_cgeqrt LAPACK_GLOBAL(cgeqrt,CGEQRT)\n#define LAPACK_zgeqrt LAPACK_GLOBAL(zgeqrt,ZGEQRT)\n#define LAPACK_sgeqrt2 LAPACK_GLOBAL(sgeqrt2,SGEQRT2)\n#define LAPACK_dgeqrt2 LAPACK_GLOBAL(dgeqrt2,DGEQRT2)\n#define LAPACK_cgeqrt2 LAPACK_GLOBAL(cgeqrt2,CGEQRT2)\n#define LAPACK_zgeqrt2 LAPACK_GLOBAL(zgeqrt2,ZGEQRT2)\n#define LAPACK_sgeqrt3 LAPACK_GLOBAL(sgeqrt3,SGEQRT3)\n#define LAPACK_dgeqrt3 LAPACK_GLOBAL(dgeqrt3,DGEQRT3)\n#define LAPACK_cgeqrt3 LAPACK_GLOBAL(cgeqrt3,CGEQRT3)\n#define LAPACK_zgeqrt3 LAPACK_GLOBAL(zgeqrt3,ZGEQRT3)\n#define LAPACK_stpmqrt LAPACK_GLOBAL(stpmqrt,STPMQRT)\n#define LAPACK_dtpmqrt LAPACK_GLOBAL(dtpmqrt,DTPMQRT)\n#define LAPACK_ctpmqrt LAPACK_GLOBAL(ctpmqrt,CTPMQRT)\n#define LAPACK_ztpmqrt LAPACK_GLOBAL(ztpmqrt,ZTPMQRT)\n#define LAPACK_dtpqrt LAPACK_GLOBAL(dtpqrt,DTPQRT)\n#define LAPACK_ctpqrt LAPACK_GLOBAL(ctpqrt,CTPQRT)\n#define LAPACK_ztpqrt LAPACK_GLOBAL(ztpqrt,ZTPQRT)\n#define LAPACK_stpqrt2 LAPACK_GLOBAL(stpqrt2,STPQRT2)\n#define LAPACK_dtpqrt2 LAPACK_GLOBAL(dtpqrt2,DTPQRT2)\n#define LAPACK_ctpqrt2 LAPACK_GLOBAL(ctpqrt2,CTPQRT2)\n#define LAPACK_ztpqrt2 LAPACK_GLOBAL(ztpqrt2,ZTPQRT2)\n#define LAPACK_stprfb LAPACK_GLOBAL(stprfb,STPRFB)\n#define LAPACK_dtprfb LAPACK_GLOBAL(dtprfb,DTPRFB)\n#define LAPACK_ctprfb LAPACK_GLOBAL(ctprfb,CTPRFB)\n#define LAPACK_ztprfb LAPACK_GLOBAL(ztprfb,ZTPRFB)\n// LAPACK 3.X.X\n#define LAPACK_csyr LAPACK_GLOBAL(csyr,CSYR)\n#define LAPACK_zsyr LAPACK_GLOBAL(zsyr,ZSYR)\n\n\nvoid LAPACK_sgetrf( lapack_int* m, lapack_int* n, float* a, lapack_int* lda,\n                    lapack_int* ipiv, lapack_int *info );\nvoid LAPACK_dgetrf( lapack_int* m, lapack_int* n, double* a, lapack_int* lda,\n                    lapack_int* ipiv, lapack_int *info );\nvoid LAPACK_cgetrf( lapack_int* m, lapack_int* n, lapack_complex_float* a,\n                    lapack_int* lda, lapack_int* ipiv, lapack_int *info );\nvoid LAPACK_zgetrf( lapack_int* m, lapack_int* n, lapack_complex_double* a,\n                    lapack_int* lda, lapack_int* ipiv, lapack_int *info );\nvoid LAPACK_sgbtrf( lapack_int* m, lapack_int* n, lapack_int* kl,\n                    lapack_int* ku, float* ab, lapack_int* ldab,\n                    lapack_int* ipiv, lapack_int *info );\nvoid LAPACK_dgbtrf( lapack_int* m, lapack_int* n, lapack_int* kl,\n                    lapack_int* ku, double* ab, lapack_int* ldab,\n                    lapack_int* ipiv, lapack_int *info );\nvoid LAPACK_cgbtrf( lapack_int* m, lapack_int* n, lapack_int* kl,\n                    lapack_int* ku, lapack_complex_float* ab, lapack_int* ldab,\n                    lapack_int* ipiv, lapack_int *info );\nvoid LAPACK_zgbtrf( lapack_int* m, lapack_int* n, lapack_int* kl,\n                    lapack_int* ku, lapack_complex_double* ab, lapack_int* ldab,\n                    lapack_int* ipiv, lapack_int *info );\nvoid LAPACK_sgttrf( lapack_int* n, float* dl, float* d, float* du, float* du2,\n                    lapack_int* ipiv, lapack_int *info );\nvoid LAPACK_dgttrf( lapack_int* n, double* dl, double* d, double* du,\n                    double* du2, lapack_int* ipiv, lapack_int *info );\nvoid LAPACK_cgttrf( lapack_int* n, lapack_complex_float* dl,\n                    lapack_complex_float* d, lapack_complex_float* du,\n                    lapack_complex_float* du2, lapack_int* ipiv,\n                    lapack_int *info );\nvoid LAPACK_zgttrf( lapack_int* n, lapack_complex_double* dl,\n                    lapack_complex_double* d, lapack_complex_double* du,\n                    lapack_complex_double* du2, lapack_int* ipiv,\n                    lapack_int *info );\nvoid LAPACK_spotrf( char* uplo, lapack_int* n, float* a, lapack_int* lda,\n                    lapack_int *info );\nvoid LAPACK_dpotrf( char* uplo, lapack_int* n, double* a, lapack_int* lda,\n                    lapack_int *info );\nvoid LAPACK_cpotrf( char* uplo, lapack_int* n, lapack_complex_float* a,\n                    lapack_int* lda, lapack_int *info );\nvoid LAPACK_zpotrf( char* uplo, lapack_int* n, lapack_complex_double* a,\n                    lapack_int* lda, lapack_int *info );\nvoid LAPACK_dpstrf( char* uplo, lapack_int* n, double* a, lapack_int* lda,\n                    lapack_int* piv, lapack_int* rank, double* tol,\n                    double* work, lapack_int *info );\nvoid LAPACK_spstrf( char* uplo, lapack_int* n, float* a, lapack_int* lda,\n                    lapack_int* piv, lapack_int* rank, float* tol, float* work,\n                    lapack_int *info );\nvoid LAPACK_zpstrf( char* uplo, lapack_int* n, lapack_complex_double* a,\n                    lapack_int* lda, lapack_int* piv, lapack_int* rank,\n                    double* tol, double* work, lapack_int *info );\nvoid LAPACK_cpstrf( char* uplo, lapack_int* n, lapack_complex_float* a,\n                    lapack_int* lda, lapack_int* piv, lapack_int* rank,\n                    float* tol, float* work, lapack_int *info );\nvoid LAPACK_dpftrf( char* transr, char* uplo, lapack_int* n, double* a,\n                    lapack_int *info );\nvoid LAPACK_spftrf( char* transr, char* uplo, lapack_int* n, float* a,\n                    lapack_int *info );\nvoid LAPACK_zpftrf( char* transr, char* uplo, lapack_int* n,\n                    lapack_complex_double* a, lapack_int *info );\nvoid LAPACK_cpftrf( char* transr, char* uplo, lapack_int* n,\n                    lapack_complex_float* a, lapack_int *info );\nvoid LAPACK_spptrf( char* uplo, lapack_int* n, float* ap, lapack_int *info );\nvoid LAPACK_dpptrf( char* uplo, lapack_int* n, double* ap, lapack_int *info );\nvoid LAPACK_cpptrf( char* uplo, lapack_int* n, lapack_complex_float* ap,\n                    lapack_int *info );\nvoid LAPACK_zpptrf( char* uplo, lapack_int* n, lapack_complex_double* ap,\n                    lapack_int *info );\nvoid LAPACK_spbtrf( char* uplo, lapack_int* n, lapack_int* kd, float* ab,\n                    lapack_int* ldab, lapack_int *info );\nvoid LAPACK_dpbtrf( char* uplo, lapack_int* n, lapack_int* kd, double* ab,\n                    lapack_int* ldab, lapack_int *info );\nvoid LAPACK_cpbtrf( char* uplo, lapack_int* n, lapack_int* kd,\n                    lapack_complex_float* ab, lapack_int* ldab,\n                    lapack_int *info );\nvoid LAPACK_zpbtrf( char* uplo, lapack_int* n, lapack_int* kd,\n                    lapack_complex_double* ab, lapack_int* ldab,\n                    lapack_int *info );\nvoid LAPACK_spttrf( lapack_int* n, float* d, float* e, lapack_int *info );\nvoid LAPACK_dpttrf( lapack_int* n, double* d, double* e, lapack_int *info );\nvoid LAPACK_cpttrf( lapack_int* n, float* d, lapack_complex_float* e,\n                    lapack_int *info );\nvoid LAPACK_zpttrf( lapack_int* n, double* d, lapack_complex_double* e,\n                    lapack_int *info );\nvoid LAPACK_ssytrf( char* uplo, lapack_int* n, float* a, lapack_int* lda,\n                    lapack_int* ipiv, float* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_dsytrf( char* uplo, lapack_int* n, double* a, lapack_int* lda,\n                    lapack_int* ipiv, double* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_csytrf( char* uplo, lapack_int* n, lapack_complex_float* a,\n                    lapack_int* lda, lapack_int* ipiv,\n                    lapack_complex_float* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_zsytrf( char* uplo, lapack_int* n, lapack_complex_double* a,\n                    lapack_int* lda, lapack_int* ipiv,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_chetrf( char* uplo, lapack_int* n, lapack_complex_float* a,\n                    lapack_int* lda, lapack_int* ipiv,\n                    lapack_complex_float* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_zhetrf( char* uplo, lapack_int* n, lapack_complex_double* a,\n                    lapack_int* lda, lapack_int* ipiv,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_ssptrf( char* uplo, lapack_int* n, float* ap, lapack_int* ipiv,\n                    lapack_int *info );\nvoid LAPACK_dsptrf( char* uplo, lapack_int* n, double* ap, lapack_int* ipiv,\n                    lapack_int *info );\nvoid LAPACK_csptrf( char* uplo, lapack_int* n, lapack_complex_float* ap,\n                    lapack_int* ipiv, lapack_int *info );\nvoid LAPACK_zsptrf( char* uplo, lapack_int* n, lapack_complex_double* ap,\n                    lapack_int* ipiv, lapack_int *info );\nvoid LAPACK_chptrf( char* uplo, lapack_int* n, lapack_complex_float* ap,\n                    lapack_int* ipiv, lapack_int *info );\nvoid LAPACK_zhptrf( char* uplo, lapack_int* n, lapack_complex_double* ap,\n                    lapack_int* ipiv, lapack_int *info );\nvoid LAPACK_sgetrs( char* trans, lapack_int* n, lapack_int* nrhs,\n                    const float* a, lapack_int* lda, const lapack_int* ipiv,\n                    float* b, lapack_int* ldb, lapack_int *info );\nvoid LAPACK_dgetrs( char* trans, lapack_int* n, lapack_int* nrhs,\n                    const double* a, lapack_int* lda, const lapack_int* ipiv,\n                    double* b, lapack_int* ldb, lapack_int *info );\nvoid LAPACK_cgetrs( char* trans, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_float* a, lapack_int* lda,\n                    const lapack_int* ipiv, lapack_complex_float* b,\n                    lapack_int* ldb, lapack_int *info );\nvoid LAPACK_zgetrs( char* trans, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_double* a, lapack_int* lda,\n                    const lapack_int* ipiv, lapack_complex_double* b,\n                    lapack_int* ldb, lapack_int *info );\nvoid LAPACK_sgbtrs( char* trans, lapack_int* n, lapack_int* kl, lapack_int* ku,\n                    lapack_int* nrhs, const float* ab, lapack_int* ldab,\n                    const lapack_int* ipiv, float* b, lapack_int* ldb,\n                    lapack_int *info );\nvoid LAPACK_dgbtrs( char* trans, lapack_int* n, lapack_int* kl, lapack_int* ku,\n                    lapack_int* nrhs, const double* ab, lapack_int* ldab,\n                    const lapack_int* ipiv, double* b, lapack_int* ldb,\n                    lapack_int *info );\nvoid LAPACK_cgbtrs( char* trans, lapack_int* n, lapack_int* kl, lapack_int* ku,\n                    lapack_int* nrhs, const lapack_complex_float* ab,\n                    lapack_int* ldab, const lapack_int* ipiv,\n                    lapack_complex_float* b, lapack_int* ldb,\n                    lapack_int *info );\nvoid LAPACK_zgbtrs( char* trans, lapack_int* n, lapack_int* kl, lapack_int* ku,\n                    lapack_int* nrhs, const lapack_complex_double* ab,\n                    lapack_int* ldab, const lapack_int* ipiv,\n                    lapack_complex_double* b, lapack_int* ldb,\n                    lapack_int *info );\nvoid LAPACK_sgttrs( char* trans, lapack_int* n, lapack_int* nrhs,\n                    const float* dl, const float* d, const float* du,\n                    const float* du2, const lapack_int* ipiv, float* b,\n                    lapack_int* ldb, lapack_int *info );\nvoid LAPACK_dgttrs( char* trans, lapack_int* n, lapack_int* nrhs,\n                    const double* dl, const double* d, const double* du,\n                    const double* du2, const lapack_int* ipiv, double* b,\n                    lapack_int* ldb, lapack_int *info );\nvoid LAPACK_cgttrs( char* trans, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_float* dl,\n                    const lapack_complex_float* d,\n                    const lapack_complex_float* du,\n                    const lapack_complex_float* du2, const lapack_int* ipiv,\n                    lapack_complex_float* b, lapack_int* ldb,\n                    lapack_int *info );\nvoid LAPACK_zgttrs( char* trans, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_double* dl,\n                    const lapack_complex_double* d,\n                    const lapack_complex_double* du,\n                    const lapack_complex_double* du2, const lapack_int* ipiv,\n                    lapack_complex_double* b, lapack_int* ldb,\n                    lapack_int *info );\nvoid LAPACK_spotrs( char* uplo, lapack_int* n, lapack_int* nrhs, const float* a,\n                    lapack_int* lda, float* b, lapack_int* ldb,\n                    lapack_int *info );\nvoid LAPACK_dpotrs( char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const double* a, lapack_int* lda, double* b,\n                    lapack_int* ldb, lapack_int *info );\nvoid LAPACK_cpotrs( char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_float* a, lapack_int* lda,\n                    lapack_complex_float* b, lapack_int* ldb,\n                    lapack_int *info );\nvoid LAPACK_zpotrs( char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_double* a, lapack_int* lda,\n                    lapack_complex_double* b, lapack_int* ldb,\n                    lapack_int *info );\nvoid LAPACK_dpftrs( char* transr, char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const double* a, double* b, lapack_int* ldb,\n                    lapack_int *info );\nvoid LAPACK_spftrs( char* transr, char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const float* a, float* b, lapack_int* ldb,\n                    lapack_int *info );\nvoid LAPACK_zpftrs( char* transr, char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_double* a, lapack_complex_double* b,\n                    lapack_int* ldb, lapack_int *info );\nvoid LAPACK_cpftrs( char* transr, char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_float* a, lapack_complex_float* b,\n                    lapack_int* ldb, lapack_int *info );\nvoid LAPACK_spptrs( char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const float* ap, float* b, lapack_int* ldb,\n                    lapack_int *info );\nvoid LAPACK_dpptrs( char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const double* ap, double* b, lapack_int* ldb,\n                    lapack_int *info );\nvoid LAPACK_cpptrs( char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_float* ap, lapack_complex_float* b,\n                    lapack_int* ldb, lapack_int *info );\nvoid LAPACK_zpptrs( char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_double* ap, lapack_complex_double* b,\n                    lapack_int* ldb, lapack_int *info );\nvoid LAPACK_spbtrs( char* uplo, lapack_int* n, lapack_int* kd, lapack_int* nrhs,\n                    const float* ab, lapack_int* ldab, float* b,\n                    lapack_int* ldb, lapack_int *info );\nvoid LAPACK_dpbtrs( char* uplo, lapack_int* n, lapack_int* kd, lapack_int* nrhs,\n                    const double* ab, lapack_int* ldab, double* b,\n                    lapack_int* ldb, lapack_int *info );\nvoid LAPACK_cpbtrs( char* uplo, lapack_int* n, lapack_int* kd, lapack_int* nrhs,\n                    const lapack_complex_float* ab, lapack_int* ldab,\n                    lapack_complex_float* b, lapack_int* ldb,\n                    lapack_int *info );\nvoid LAPACK_zpbtrs( char* uplo, lapack_int* n, lapack_int* kd, lapack_int* nrhs,\n                    const lapack_complex_double* ab, lapack_int* ldab,\n                    lapack_complex_double* b, lapack_int* ldb,\n                    lapack_int *info );\nvoid LAPACK_spttrs( lapack_int* n, lapack_int* nrhs, const float* d,\n                    const float* e, float* b, lapack_int* ldb,\n                    lapack_int *info );\nvoid LAPACK_dpttrs( lapack_int* n, lapack_int* nrhs, const double* d,\n                    const double* e, double* b, lapack_int* ldb,\n                    lapack_int *info );\nvoid LAPACK_cpttrs( char* uplo, lapack_int* n, lapack_int* nrhs, const float* d,\n                    const lapack_complex_float* e, lapack_complex_float* b,\n                    lapack_int* ldb, lapack_int *info );\nvoid LAPACK_zpttrs( char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const double* d, const lapack_complex_double* e,\n                    lapack_complex_double* b, lapack_int* ldb,\n                    lapack_int *info );\nvoid LAPACK_ssytrs( char* uplo, lapack_int* n, lapack_int* nrhs, const float* a,\n                    lapack_int* lda, const lapack_int* ipiv, float* b,\n                    lapack_int* ldb, lapack_int *info );\nvoid LAPACK_dsytrs( char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const double* a, lapack_int* lda, const lapack_int* ipiv,\n                    double* b, lapack_int* ldb, lapack_int *info );\nvoid LAPACK_csytrs( char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_float* a, lapack_int* lda,\n                    const lapack_int* ipiv, lapack_complex_float* b,\n                    lapack_int* ldb, lapack_int *info );\nvoid LAPACK_zsytrs( char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_double* a, lapack_int* lda,\n                    const lapack_int* ipiv, lapack_complex_double* b,\n                    lapack_int* ldb, lapack_int *info );\nvoid LAPACK_chetrs( char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_float* a, lapack_int* lda,\n                    const lapack_int* ipiv, lapack_complex_float* b,\n                    lapack_int* ldb, lapack_int *info );\nvoid LAPACK_zhetrs( char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_double* a, lapack_int* lda,\n                    const lapack_int* ipiv, lapack_complex_double* b,\n                    lapack_int* ldb, lapack_int *info );\nvoid LAPACK_ssptrs( char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const float* ap, const lapack_int* ipiv, float* b,\n                    lapack_int* ldb, lapack_int *info );\nvoid LAPACK_dsptrs( char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const double* ap, const lapack_int* ipiv, double* b,\n                    lapack_int* ldb, lapack_int *info );\nvoid LAPACK_csptrs( char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_float* ap, const lapack_int* ipiv,\n                    lapack_complex_float* b, lapack_int* ldb,\n                    lapack_int *info );\nvoid LAPACK_zsptrs( char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_double* ap, const lapack_int* ipiv,\n                    lapack_complex_double* b, lapack_int* ldb,\n                    lapack_int *info );\nvoid LAPACK_chptrs( char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_float* ap, const lapack_int* ipiv,\n                    lapack_complex_float* b, lapack_int* ldb,\n                    lapack_int *info );\nvoid LAPACK_zhptrs( char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_double* ap, const lapack_int* ipiv,\n                    lapack_complex_double* b, lapack_int* ldb,\n                    lapack_int *info );\nvoid LAPACK_strtrs( char* uplo, char* trans, char* diag, lapack_int* n,\n                    lapack_int* nrhs, const float* a, lapack_int* lda, float* b,\n                    lapack_int* ldb, lapack_int *info );\nvoid LAPACK_dtrtrs( char* uplo, char* trans, char* diag, lapack_int* n,\n                    lapack_int* nrhs, const double* a, lapack_int* lda,\n                    double* b, lapack_int* ldb, lapack_int *info );\nvoid LAPACK_ctrtrs( char* uplo, char* trans, char* diag, lapack_int* n,\n                    lapack_int* nrhs, const lapack_complex_float* a,\n                    lapack_int* lda, lapack_complex_float* b, lapack_int* ldb,\n                    lapack_int *info );\nvoid LAPACK_ztrtrs( char* uplo, char* trans, char* diag, lapack_int* n,\n                    lapack_int* nrhs, const lapack_complex_double* a,\n                    lapack_int* lda, lapack_complex_double* b, lapack_int* ldb,\n                    lapack_int *info );\nvoid LAPACK_stptrs( char* uplo, char* trans, char* diag, lapack_int* n,\n                    lapack_int* nrhs, const float* ap, float* b,\n                    lapack_int* ldb, lapack_int *info );\nvoid LAPACK_dtptrs( char* uplo, char* trans, char* diag, lapack_int* n,\n                    lapack_int* nrhs, const double* ap, double* b,\n                    lapack_int* ldb, lapack_int *info );\nvoid LAPACK_ctptrs( char* uplo, char* trans, char* diag, lapack_int* n,\n                    lapack_int* nrhs, const lapack_complex_float* ap,\n                    lapack_complex_float* b, lapack_int* ldb,\n                    lapack_int *info );\nvoid LAPACK_ztptrs( char* uplo, char* trans, char* diag, lapack_int* n,\n                    lapack_int* nrhs, const lapack_complex_double* ap,\n                    lapack_complex_double* b, lapack_int* ldb,\n                    lapack_int *info );\nvoid LAPACK_stbtrs( char* uplo, char* trans, char* diag, lapack_int* n,\n                    lapack_int* kd, lapack_int* nrhs, const float* ab,\n                    lapack_int* ldab, float* b, lapack_int* ldb,\n                    lapack_int *info );\nvoid LAPACK_dtbtrs( char* uplo, char* trans, char* diag, lapack_int* n,\n                    lapack_int* kd, lapack_int* nrhs, const double* ab,\n                    lapack_int* ldab, double* b, lapack_int* ldb,\n                    lapack_int *info );\nvoid LAPACK_ctbtrs( char* uplo, char* trans, char* diag, lapack_int* n,\n                    lapack_int* kd, lapack_int* nrhs,\n                    const lapack_complex_float* ab, lapack_int* ldab,\n                    lapack_complex_float* b, lapack_int* ldb,\n                    lapack_int *info );\nvoid LAPACK_ztbtrs( char* uplo, char* trans, char* diag, lapack_int* n,\n                    lapack_int* kd, lapack_int* nrhs,\n                    const lapack_complex_double* ab, lapack_int* ldab,\n                    lapack_complex_double* b, lapack_int* ldb,\n                    lapack_int *info );\nvoid LAPACK_sgecon( char* norm, lapack_int* n, const float* a, lapack_int* lda,\n                    float* anorm, float* rcond, float* work, lapack_int* iwork,\n                    lapack_int *info );\nvoid LAPACK_dgecon( char* norm, lapack_int* n, const double* a, lapack_int* lda,\n                    double* anorm, double* rcond, double* work,\n                    lapack_int* iwork, lapack_int *info );\nvoid LAPACK_cgecon( char* norm, lapack_int* n, const lapack_complex_float* a,\n                    lapack_int* lda, float* anorm, float* rcond,\n                    lapack_complex_float* work, float* rwork,\n                    lapack_int *info );\nvoid LAPACK_zgecon( char* norm, lapack_int* n, const lapack_complex_double* a,\n                    lapack_int* lda, double* anorm, double* rcond,\n                    lapack_complex_double* work, double* rwork,\n                    lapack_int *info );\nvoid LAPACK_sgbcon( char* norm, lapack_int* n, lapack_int* kl, lapack_int* ku,\n                    const float* ab, lapack_int* ldab, const lapack_int* ipiv,\n                    float* anorm, float* rcond, float* work, lapack_int* iwork,\n                    lapack_int *info );\nvoid LAPACK_dgbcon( char* norm, lapack_int* n, lapack_int* kl, lapack_int* ku,\n                    const double* ab, lapack_int* ldab, const lapack_int* ipiv,\n                    double* anorm, double* rcond, double* work,\n                    lapack_int* iwork, lapack_int *info );\nvoid LAPACK_cgbcon( char* norm, lapack_int* n, lapack_int* kl, lapack_int* ku,\n                    const lapack_complex_float* ab, lapack_int* ldab,\n                    const lapack_int* ipiv, float* anorm, float* rcond,\n                    lapack_complex_float* work, float* rwork,\n                    lapack_int *info );\nvoid LAPACK_zgbcon( char* norm, lapack_int* n, lapack_int* kl, lapack_int* ku,\n                    const lapack_complex_double* ab, lapack_int* ldab,\n                    const lapack_int* ipiv, double* anorm, double* rcond,\n                    lapack_complex_double* work, double* rwork,\n                    lapack_int *info );\nvoid LAPACK_sgtcon( char* norm, lapack_int* n, const float* dl, const float* d,\n                    const float* du, const float* du2, const lapack_int* ipiv,\n                    float* anorm, float* rcond, float* work, lapack_int* iwork,\n                    lapack_int *info );\nvoid LAPACK_dgtcon( char* norm, lapack_int* n, const double* dl,\n                    const double* d, const double* du, const double* du2,\n                    const lapack_int* ipiv, double* anorm, double* rcond,\n                    double* work, lapack_int* iwork, lapack_int *info );\nvoid LAPACK_cgtcon( char* norm, lapack_int* n, const lapack_complex_float* dl,\n                    const lapack_complex_float* d,\n                    const lapack_complex_float* du,\n                    const lapack_complex_float* du2, const lapack_int* ipiv,\n                    float* anorm, float* rcond, lapack_complex_float* work,\n                    lapack_int *info );\nvoid LAPACK_zgtcon( char* norm, lapack_int* n, const lapack_complex_double* dl,\n                    const lapack_complex_double* d,\n                    const lapack_complex_double* du,\n                    const lapack_complex_double* du2, const lapack_int* ipiv,\n                    double* anorm, double* rcond, lapack_complex_double* work,\n                    lapack_int *info );\nvoid LAPACK_spocon( char* uplo, lapack_int* n, const float* a, lapack_int* lda,\n                    float* anorm, float* rcond, float* work, lapack_int* iwork,\n                    lapack_int *info );\nvoid LAPACK_dpocon( char* uplo, lapack_int* n, const double* a, lapack_int* lda,\n                    double* anorm, double* rcond, double* work,\n                    lapack_int* iwork, lapack_int *info );\nvoid LAPACK_cpocon( char* uplo, lapack_int* n, const lapack_complex_float* a,\n                    lapack_int* lda, float* anorm, float* rcond,\n                    lapack_complex_float* work, float* rwork,\n                    lapack_int *info );\nvoid LAPACK_zpocon( char* uplo, lapack_int* n, const lapack_complex_double* a,\n                    lapack_int* lda, double* anorm, double* rcond,\n                    lapack_complex_double* work, double* rwork,\n                    lapack_int *info );\nvoid LAPACK_sppcon( char* uplo, lapack_int* n, const float* ap, float* anorm,\n                    float* rcond, float* work, lapack_int* iwork,\n                    lapack_int *info );\nvoid LAPACK_dppcon( char* uplo, lapack_int* n, const double* ap, double* anorm,\n                    double* rcond, double* work, lapack_int* iwork,\n                    lapack_int *info );\nvoid LAPACK_cppcon( char* uplo, lapack_int* n, const lapack_complex_float* ap,\n                    float* anorm, float* rcond, lapack_complex_float* work,\n                    float* rwork, lapack_int *info );\nvoid LAPACK_zppcon( char* uplo, lapack_int* n, const lapack_complex_double* ap,\n                    double* anorm, double* rcond, lapack_complex_double* work,\n                    double* rwork, lapack_int *info );\nvoid LAPACK_spbcon( char* uplo, lapack_int* n, lapack_int* kd, const float* ab,\n                    lapack_int* ldab, float* anorm, float* rcond, float* work,\n                    lapack_int* iwork, lapack_int *info );\nvoid LAPACK_dpbcon( char* uplo, lapack_int* n, lapack_int* kd, const double* ab,\n                    lapack_int* ldab, double* anorm, double* rcond,\n                    double* work, lapack_int* iwork, lapack_int *info );\nvoid LAPACK_cpbcon( char* uplo, lapack_int* n, lapack_int* kd,\n                    const lapack_complex_float* ab, lapack_int* ldab,\n                    float* anorm, float* rcond, lapack_complex_float* work,\n                    float* rwork, lapack_int *info );\nvoid LAPACK_zpbcon( char* uplo, lapack_int* n, lapack_int* kd,\n                    const lapack_complex_double* ab, lapack_int* ldab,\n                    double* anorm, double* rcond, lapack_complex_double* work,\n                    double* rwork, lapack_int *info );\nvoid LAPACK_sptcon( lapack_int* n, const float* d, const float* e, float* anorm,\n                    float* rcond, float* work, lapack_int *info );\nvoid LAPACK_dptcon( lapack_int* n, const double* d, const double* e,\n                    double* anorm, double* rcond, double* work,\n                    lapack_int *info );\nvoid LAPACK_cptcon( lapack_int* n, const float* d,\n                    const lapack_complex_float* e, float* anorm, float* rcond,\n                    float* work, lapack_int *info );\nvoid LAPACK_zptcon( lapack_int* n, const double* d,\n                    const lapack_complex_double* e, double* anorm,\n                    double* rcond, double* work, lapack_int *info );\nvoid LAPACK_ssycon( char* uplo, lapack_int* n, const float* a, lapack_int* lda,\n                    const lapack_int* ipiv, float* anorm, float* rcond,\n                    float* work, lapack_int* iwork, lapack_int *info );\nvoid LAPACK_dsycon( char* uplo, lapack_int* n, const double* a, lapack_int* lda,\n                    const lapack_int* ipiv, double* anorm, double* rcond,\n                    double* work, lapack_int* iwork, lapack_int *info );\nvoid LAPACK_csycon( char* uplo, lapack_int* n, const lapack_complex_float* a,\n                    lapack_int* lda, const lapack_int* ipiv, float* anorm,\n                    float* rcond, lapack_complex_float* work,\n                    lapack_int *info );\nvoid LAPACK_zsycon( char* uplo, lapack_int* n, const lapack_complex_double* a,\n                    lapack_int* lda, const lapack_int* ipiv, double* anorm,\n                    double* rcond, lapack_complex_double* work,\n                    lapack_int *info );\nvoid LAPACK_checon( char* uplo, lapack_int* n, const lapack_complex_float* a,\n                    lapack_int* lda, const lapack_int* ipiv, float* anorm,\n                    float* rcond, lapack_complex_float* work,\n                    lapack_int *info );\nvoid LAPACK_zhecon( char* uplo, lapack_int* n, const lapack_complex_double* a,\n                    lapack_int* lda, const lapack_int* ipiv, double* anorm,\n                    double* rcond, lapack_complex_double* work,\n                    lapack_int *info );\nvoid LAPACK_sspcon( char* uplo, lapack_int* n, const float* ap,\n                    const lapack_int* ipiv, float* anorm, float* rcond,\n                    float* work, lapack_int* iwork, lapack_int *info );\nvoid LAPACK_dspcon( char* uplo, lapack_int* n, const double* ap,\n                    const lapack_int* ipiv, double* anorm, double* rcond,\n                    double* work, lapack_int* iwork, lapack_int *info );\nvoid LAPACK_cspcon( char* uplo, lapack_int* n, const lapack_complex_float* ap,\n                    const lapack_int* ipiv, float* anorm, float* rcond,\n                    lapack_complex_float* work, lapack_int *info );\nvoid LAPACK_zspcon( char* uplo, lapack_int* n, const lapack_complex_double* ap,\n                    const lapack_int* ipiv, double* anorm, double* rcond,\n                    lapack_complex_double* work, lapack_int *info );\nvoid LAPACK_chpcon( char* uplo, lapack_int* n, const lapack_complex_float* ap,\n                    const lapack_int* ipiv, float* anorm, float* rcond,\n                    lapack_complex_float* work, lapack_int *info );\nvoid LAPACK_zhpcon( char* uplo, lapack_int* n, const lapack_complex_double* ap,\n                    const lapack_int* ipiv, double* anorm, double* rcond,\n                    lapack_complex_double* work, lapack_int *info );\nvoid LAPACK_strcon( char* norm, char* uplo, char* diag, lapack_int* n,\n                    const float* a, lapack_int* lda, float* rcond, float* work,\n                    lapack_int* iwork, lapack_int *info );\nvoid LAPACK_dtrcon( char* norm, char* uplo, char* diag, lapack_int* n,\n                    const double* a, lapack_int* lda, double* rcond,\n                    double* work, lapack_int* iwork, lapack_int *info );\nvoid LAPACK_ctrcon( char* norm, char* uplo, char* diag, lapack_int* n,\n                    const lapack_complex_float* a, lapack_int* lda,\n                    float* rcond, lapack_complex_float* work, float* rwork,\n                    lapack_int *info );\nvoid LAPACK_ztrcon( char* norm, char* uplo, char* diag, lapack_int* n,\n                    const lapack_complex_double* a, lapack_int* lda,\n                    double* rcond, lapack_complex_double* work, double* rwork,\n                    lapack_int *info );\nvoid LAPACK_stpcon( char* norm, char* uplo, char* diag, lapack_int* n,\n                    const float* ap, float* rcond, float* work,\n                    lapack_int* iwork, lapack_int *info );\nvoid LAPACK_dtpcon( char* norm, char* uplo, char* diag, lapack_int* n,\n                    const double* ap, double* rcond, double* work,\n                    lapack_int* iwork, lapack_int *info );\nvoid LAPACK_ctpcon( char* norm, char* uplo, char* diag, lapack_int* n,\n                    const lapack_complex_float* ap, float* rcond,\n                    lapack_complex_float* work, float* rwork,\n                    lapack_int *info );\nvoid LAPACK_ztpcon( char* norm, char* uplo, char* diag, lapack_int* n,\n                    const lapack_complex_double* ap, double* rcond,\n                    lapack_complex_double* work, double* rwork,\n                    lapack_int *info );\nvoid LAPACK_stbcon( char* norm, char* uplo, char* diag, lapack_int* n,\n                    lapack_int* kd, const float* ab, lapack_int* ldab,\n                    float* rcond, float* work, lapack_int* iwork,\n                    lapack_int *info );\nvoid LAPACK_dtbcon( char* norm, char* uplo, char* diag, lapack_int* n,\n                    lapack_int* kd, const double* ab, lapack_int* ldab,\n                    double* rcond, double* work, lapack_int* iwork,\n                    lapack_int *info );\nvoid LAPACK_ctbcon( char* norm, char* uplo, char* diag, lapack_int* n,\n                    lapack_int* kd, const lapack_complex_float* ab,\n                    lapack_int* ldab, float* rcond, lapack_complex_float* work,\n                    float* rwork, lapack_int *info );\nvoid LAPACK_ztbcon( char* norm, char* uplo, char* diag, lapack_int* n,\n                    lapack_int* kd, const lapack_complex_double* ab,\n                    lapack_int* ldab, double* rcond,\n                    lapack_complex_double* work, double* rwork,\n                    lapack_int *info );\nvoid LAPACK_sgerfs( char* trans, lapack_int* n, lapack_int* nrhs,\n                    const float* a, lapack_int* lda, const float* af,\n                    lapack_int* ldaf, const lapack_int* ipiv, const float* b,\n                    lapack_int* ldb, float* x, lapack_int* ldx, float* ferr,\n                    float* berr, float* work, lapack_int* iwork,\n                    lapack_int *info );\nvoid LAPACK_dgerfs( char* trans, lapack_int* n, lapack_int* nrhs,\n                    const double* a, lapack_int* lda, const double* af,\n                    lapack_int* ldaf, const lapack_int* ipiv, const double* b,\n                    lapack_int* ldb, double* x, lapack_int* ldx, double* ferr,\n                    double* berr, double* work, lapack_int* iwork,\n                    lapack_int *info );\nvoid LAPACK_cgerfs( char* trans, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_float* a, lapack_int* lda,\n                    const lapack_complex_float* af, lapack_int* ldaf,\n                    const lapack_int* ipiv, const lapack_complex_float* b,\n                    lapack_int* ldb, lapack_complex_float* x, lapack_int* ldx,\n                    float* ferr, float* berr, lapack_complex_float* work,\n                    float* rwork, lapack_int *info );\nvoid LAPACK_zgerfs( char* trans, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_double* a, lapack_int* lda,\n                    const lapack_complex_double* af, lapack_int* ldaf,\n                    const lapack_int* ipiv, const lapack_complex_double* b,\n                    lapack_int* ldb, lapack_complex_double* x, lapack_int* ldx,\n                    double* ferr, double* berr, lapack_complex_double* work,\n                    double* rwork, lapack_int *info );\nvoid LAPACK_dgerfsx( char* trans, char* equed, lapack_int* n, lapack_int* nrhs,\n                     const double* a, lapack_int* lda, const double* af,\n                     lapack_int* ldaf, const lapack_int* ipiv, const double* r,\n                     const double* c, const double* b, lapack_int* ldb,\n                     double* x, lapack_int* ldx, double* rcond, double* berr,\n                     lapack_int* n_err_bnds, double* err_bnds_norm,\n                     double* err_bnds_comp, lapack_int* nparams, double* params,\n                     double* work, lapack_int* iwork, lapack_int *info );\nvoid LAPACK_sgerfsx( char* trans, char* equed, lapack_int* n, lapack_int* nrhs,\n                     const float* a, lapack_int* lda, const float* af,\n                     lapack_int* ldaf, const lapack_int* ipiv, const float* r,\n                     const float* c, const float* b, lapack_int* ldb, float* x,\n                     lapack_int* ldx, float* rcond, float* berr,\n                     lapack_int* n_err_bnds, float* err_bnds_norm,\n                     float* err_bnds_comp, lapack_int* nparams, float* params,\n                     float* work, lapack_int* iwork, lapack_int *info );\nvoid LAPACK_zgerfsx( char* trans, char* equed, lapack_int* n, lapack_int* nrhs,\n                     const lapack_complex_double* a, lapack_int* lda,\n                     const lapack_complex_double* af, lapack_int* ldaf,\n                     const lapack_int* ipiv, const double* r, const double* c,\n                     const lapack_complex_double* b, lapack_int* ldb,\n                     lapack_complex_double* x, lapack_int* ldx, double* rcond,\n                     double* berr, lapack_int* n_err_bnds,\n                     double* err_bnds_norm, double* err_bnds_comp,\n                     lapack_int* nparams, double* params,\n                     lapack_complex_double* work, double* rwork,\n                     lapack_int *info );\nvoid LAPACK_cgerfsx( char* trans, char* equed, lapack_int* n, lapack_int* nrhs,\n                     const lapack_complex_float* a, lapack_int* lda,\n                     const lapack_complex_float* af, lapack_int* ldaf,\n                     const lapack_int* ipiv, const float* r, const float* c,\n                     const lapack_complex_float* b, lapack_int* ldb,\n                     lapack_complex_float* x, lapack_int* ldx, float* rcond,\n                     float* berr, lapack_int* n_err_bnds, float* err_bnds_norm,\n                     float* err_bnds_comp, lapack_int* nparams, float* params,\n                     lapack_complex_float* work, float* rwork,\n                     lapack_int *info );\nvoid LAPACK_sgbrfs( char* trans, lapack_int* n, lapack_int* kl, lapack_int* ku,\n                    lapack_int* nrhs, const float* ab, lapack_int* ldab,\n                    const float* afb, lapack_int* ldafb, const lapack_int* ipiv,\n                    const float* b, lapack_int* ldb, float* x, lapack_int* ldx,\n                    float* ferr, float* berr, float* work, lapack_int* iwork,\n                    lapack_int *info );\nvoid LAPACK_dgbrfs( char* trans, lapack_int* n, lapack_int* kl, lapack_int* ku,\n                    lapack_int* nrhs, const double* ab, lapack_int* ldab,\n                    const double* afb, lapack_int* ldafb,\n                    const lapack_int* ipiv, const double* b, lapack_int* ldb,\n                    double* x, lapack_int* ldx, double* ferr, double* berr,\n                    double* work, lapack_int* iwork, lapack_int *info );\nvoid LAPACK_cgbrfs( char* trans, lapack_int* n, lapack_int* kl, lapack_int* ku,\n                    lapack_int* nrhs, const lapack_complex_float* ab,\n                    lapack_int* ldab, const lapack_complex_float* afb,\n                    lapack_int* ldafb, const lapack_int* ipiv,\n                    const lapack_complex_float* b, lapack_int* ldb,\n                    lapack_complex_float* x, lapack_int* ldx, float* ferr,\n                    float* berr, lapack_complex_float* work, float* rwork,\n                    lapack_int *info );\nvoid LAPACK_zgbrfs( char* trans, lapack_int* n, lapack_int* kl, lapack_int* ku,\n                    lapack_int* nrhs, const lapack_complex_double* ab,\n                    lapack_int* ldab, const lapack_complex_double* afb,\n                    lapack_int* ldafb, const lapack_int* ipiv,\n                    const lapack_complex_double* b, lapack_int* ldb,\n                    lapack_complex_double* x, lapack_int* ldx, double* ferr,\n                    double* berr, lapack_complex_double* work, double* rwork,\n                    lapack_int *info );\nvoid LAPACK_dgbrfsx( char* trans, char* equed, lapack_int* n, lapack_int* kl,\n                     lapack_int* ku, lapack_int* nrhs, const double* ab,\n                     lapack_int* ldab, const double* afb, lapack_int* ldafb,\n                     const lapack_int* ipiv, const double* r, const double* c,\n                     const double* b, lapack_int* ldb, double* x,\n                     lapack_int* ldx, double* rcond, double* berr,\n                     lapack_int* n_err_bnds, double* err_bnds_norm,\n                     double* err_bnds_comp, lapack_int* nparams, double* params,\n                     double* work, lapack_int* iwork, lapack_int *info );\nvoid LAPACK_sgbrfsx( char* trans, char* equed, lapack_int* n, lapack_int* kl,\n                     lapack_int* ku, lapack_int* nrhs, const float* ab,\n                     lapack_int* ldab, const float* afb, lapack_int* ldafb,\n                     const lapack_int* ipiv, const float* r, const float* c,\n                     const float* b, lapack_int* ldb, float* x, lapack_int* ldx,\n                     float* rcond, float* berr, lapack_int* n_err_bnds,\n                     float* err_bnds_norm, float* err_bnds_comp,\n                     lapack_int* nparams, float* params, float* work,\n                     lapack_int* iwork, lapack_int *info );\nvoid LAPACK_zgbrfsx( char* trans, char* equed, lapack_int* n, lapack_int* kl,\n                     lapack_int* ku, lapack_int* nrhs,\n                     const lapack_complex_double* ab, lapack_int* ldab,\n                     const lapack_complex_double* afb, lapack_int* ldafb,\n                     const lapack_int* ipiv, const double* r, const double* c,\n                     const lapack_complex_double* b, lapack_int* ldb,\n                     lapack_complex_double* x, lapack_int* ldx, double* rcond,\n                     double* berr, lapack_int* n_err_bnds,\n                     double* err_bnds_norm, double* err_bnds_comp,\n                     lapack_int* nparams, double* params,\n                     lapack_complex_double* work, double* rwork,\n                     lapack_int *info );\nvoid LAPACK_cgbrfsx( char* trans, char* equed, lapack_int* n, lapack_int* kl,\n                     lapack_int* ku, lapack_int* nrhs,\n                     const lapack_complex_float* ab, lapack_int* ldab,\n                     const lapack_complex_float* afb, lapack_int* ldafb,\n                     const lapack_int* ipiv, const float* r, const float* c,\n                     const lapack_complex_float* b, lapack_int* ldb,\n                     lapack_complex_float* x, lapack_int* ldx, float* rcond,\n                     float* berr, lapack_int* n_err_bnds, float* err_bnds_norm,\n                     float* err_bnds_comp, lapack_int* nparams, float* params,\n                     lapack_complex_float* work, float* rwork,\n                     lapack_int *info );\nvoid LAPACK_sgtrfs( char* trans, lapack_int* n, lapack_int* nrhs,\n                    const float* dl, const float* d, const float* du,\n                    const float* dlf, const float* df, const float* duf,\n                    const float* du2, const lapack_int* ipiv, const float* b,\n                    lapack_int* ldb, float* x, lapack_int* ldx, float* ferr,\n                    float* berr, float* work, lapack_int* iwork,\n                    lapack_int *info );\nvoid LAPACK_dgtrfs( char* trans, lapack_int* n, lapack_int* nrhs,\n                    const double* dl, const double* d, const double* du,\n                    const double* dlf, const double* df, const double* duf,\n                    const double* du2, const lapack_int* ipiv, const double* b,\n                    lapack_int* ldb, double* x, lapack_int* ldx, double* ferr,\n                    double* berr, double* work, lapack_int* iwork,\n                    lapack_int *info );\nvoid LAPACK_cgtrfs( char* trans, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_float* dl,\n                    const lapack_complex_float* d,\n                    const lapack_complex_float* du,\n                    const lapack_complex_float* dlf,\n                    const lapack_complex_float* df,\n                    const lapack_complex_float* duf,\n                    const lapack_complex_float* du2, const lapack_int* ipiv,\n                    const lapack_complex_float* b, lapack_int* ldb,\n                    lapack_complex_float* x, lapack_int* ldx, float* ferr,\n                    float* berr, lapack_complex_float* work, float* rwork,\n                    lapack_int *info );\nvoid LAPACK_zgtrfs( char* trans, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_double* dl,\n                    const lapack_complex_double* d,\n                    const lapack_complex_double* du,\n                    const lapack_complex_double* dlf,\n                    const lapack_complex_double* df,\n                    const lapack_complex_double* duf,\n                    const lapack_complex_double* du2, const lapack_int* ipiv,\n                    const lapack_complex_double* b, lapack_int* ldb,\n                    lapack_complex_double* x, lapack_int* ldx, double* ferr,\n                    double* berr, lapack_complex_double* work, double* rwork,\n                    lapack_int *info );\nvoid LAPACK_sporfs( char* uplo, lapack_int* n, lapack_int* nrhs, const float* a,\n                    lapack_int* lda, const float* af, lapack_int* ldaf,\n                    const float* b, lapack_int* ldb, float* x, lapack_int* ldx,\n                    float* ferr, float* berr, float* work, lapack_int* iwork,\n                    lapack_int *info );\nvoid LAPACK_dporfs( char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const double* a, lapack_int* lda, const double* af,\n                    lapack_int* ldaf, const double* b, lapack_int* ldb,\n                    double* x, lapack_int* ldx, double* ferr, double* berr,\n                    double* work, lapack_int* iwork, lapack_int *info );\nvoid LAPACK_cporfs( char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_float* a, lapack_int* lda,\n                    const lapack_complex_float* af, lapack_int* ldaf,\n                    const lapack_complex_float* b, lapack_int* ldb,\n                    lapack_complex_float* x, lapack_int* ldx, float* ferr,\n                    float* berr, lapack_complex_float* work, float* rwork,\n                    lapack_int *info );\nvoid LAPACK_zporfs( char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_double* a, lapack_int* lda,\n                    const lapack_complex_double* af, lapack_int* ldaf,\n                    const lapack_complex_double* b, lapack_int* ldb,\n                    lapack_complex_double* x, lapack_int* ldx, double* ferr,\n                    double* berr, lapack_complex_double* work, double* rwork,\n                    lapack_int *info );\nvoid LAPACK_dporfsx( char* uplo, char* equed, lapack_int* n, lapack_int* nrhs,\n                     const double* a, lapack_int* lda, const double* af,\n                     lapack_int* ldaf, const double* s, const double* b,\n                     lapack_int* ldb, double* x, lapack_int* ldx, double* rcond,\n                     double* berr, lapack_int* n_err_bnds,\n                     double* err_bnds_norm, double* err_bnds_comp,\n                     lapack_int* nparams, double* params, double* work,\n                     lapack_int* iwork, lapack_int *info );\nvoid LAPACK_sporfsx( char* uplo, char* equed, lapack_int* n, lapack_int* nrhs,\n                     const float* a, lapack_int* lda, const float* af,\n                     lapack_int* ldaf, const float* s, const float* b,\n                     lapack_int* ldb, float* x, lapack_int* ldx, float* rcond,\n                     float* berr, lapack_int* n_err_bnds, float* err_bnds_norm,\n                     float* err_bnds_comp, lapack_int* nparams, float* params,\n                     float* work, lapack_int* iwork, lapack_int *info );\nvoid LAPACK_zporfsx( char* uplo, char* equed, lapack_int* n, lapack_int* nrhs,\n                     const lapack_complex_double* a, lapack_int* lda,\n                     const lapack_complex_double* af, lapack_int* ldaf,\n                     const double* s, const lapack_complex_double* b,\n                     lapack_int* ldb, lapack_complex_double* x, lapack_int* ldx,\n                     double* rcond, double* berr, lapack_int* n_err_bnds,\n                     double* err_bnds_norm, double* err_bnds_comp,\n                     lapack_int* nparams, double* params,\n                     lapack_complex_double* work, double* rwork,\n                     lapack_int *info );\nvoid LAPACK_cporfsx( char* uplo, char* equed, lapack_int* n, lapack_int* nrhs,\n                     const lapack_complex_float* a, lapack_int* lda,\n                     const lapack_complex_float* af, lapack_int* ldaf,\n                     const float* s, const lapack_complex_float* b,\n                     lapack_int* ldb, lapack_complex_float* x, lapack_int* ldx,\n                     float* rcond, float* berr, lapack_int* n_err_bnds,\n                     float* err_bnds_norm, float* err_bnds_comp,\n                     lapack_int* nparams, float* params,\n                     lapack_complex_float* work, float* rwork,\n                     lapack_int *info );\nvoid LAPACK_spprfs( char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const float* ap, const float* afp, const float* b,\n                    lapack_int* ldb, float* x, lapack_int* ldx, float* ferr,\n                    float* berr, float* work, lapack_int* iwork,\n                    lapack_int *info );\nvoid LAPACK_dpprfs( char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const double* ap, const double* afp, const double* b,\n                    lapack_int* ldb, double* x, lapack_int* ldx, double* ferr,\n                    double* berr, double* work, lapack_int* iwork,\n                    lapack_int *info );\nvoid LAPACK_cpprfs( char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_float* ap,\n                    const lapack_complex_float* afp,\n                    const lapack_complex_float* b, lapack_int* ldb,\n                    lapack_complex_float* x, lapack_int* ldx, float* ferr,\n                    float* berr, lapack_complex_float* work, float* rwork,\n                    lapack_int *info );\nvoid LAPACK_zpprfs( char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_double* ap,\n                    const lapack_complex_double* afp,\n                    const lapack_complex_double* b, lapack_int* ldb,\n                    lapack_complex_double* x, lapack_int* ldx, double* ferr,\n                    double* berr, lapack_complex_double* work, double* rwork,\n                    lapack_int *info );\nvoid LAPACK_spbrfs( char* uplo, lapack_int* n, lapack_int* kd, lapack_int* nrhs,\n                    const float* ab, lapack_int* ldab, const float* afb,\n                    lapack_int* ldafb, const float* b, lapack_int* ldb,\n                    float* x, lapack_int* ldx, float* ferr, float* berr,\n                    float* work, lapack_int* iwork, lapack_int *info );\nvoid LAPACK_dpbrfs( char* uplo, lapack_int* n, lapack_int* kd, lapack_int* nrhs,\n                    const double* ab, lapack_int* ldab, const double* afb,\n                    lapack_int* ldafb, const double* b, lapack_int* ldb,\n                    double* x, lapack_int* ldx, double* ferr, double* berr,\n                    double* work, lapack_int* iwork, lapack_int *info );\nvoid LAPACK_cpbrfs( char* uplo, lapack_int* n, lapack_int* kd, lapack_int* nrhs,\n                    const lapack_complex_float* ab, lapack_int* ldab,\n                    const lapack_complex_float* afb, lapack_int* ldafb,\n                    const lapack_complex_float* b, lapack_int* ldb,\n                    lapack_complex_float* x, lapack_int* ldx, float* ferr,\n                    float* berr, lapack_complex_float* work, float* rwork,\n                    lapack_int *info );\nvoid LAPACK_zpbrfs( char* uplo, lapack_int* n, lapack_int* kd, lapack_int* nrhs,\n                    const lapack_complex_double* ab, lapack_int* ldab,\n                    const lapack_complex_double* afb, lapack_int* ldafb,\n                    const lapack_complex_double* b, lapack_int* ldb,\n                    lapack_complex_double* x, lapack_int* ldx, double* ferr,\n                    double* berr, lapack_complex_double* work, double* rwork,\n                    lapack_int *info );\nvoid LAPACK_sptrfs( lapack_int* n, lapack_int* nrhs, const float* d,\n                    const float* e, const float* df, const float* ef,\n                    const float* b, lapack_int* ldb, float* x, lapack_int* ldx,\n                    float* ferr, float* berr, float* work, lapack_int *info );\nvoid LAPACK_dptrfs( lapack_int* n, lapack_int* nrhs, const double* d,\n                    const double* e, const double* df, const double* ef,\n                    const double* b, lapack_int* ldb, double* x,\n                    lapack_int* ldx, double* ferr, double* berr, double* work,\n                    lapack_int *info );\nvoid LAPACK_cptrfs( char* uplo, lapack_int* n, lapack_int* nrhs, const float* d,\n                    const lapack_complex_float* e, const float* df,\n                    const lapack_complex_float* ef,\n                    const lapack_complex_float* b, lapack_int* ldb,\n                    lapack_complex_float* x, lapack_int* ldx, float* ferr,\n                    float* berr, lapack_complex_float* work, float* rwork,\n                    lapack_int *info );\nvoid LAPACK_zptrfs( char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const double* d, const lapack_complex_double* e,\n                    const double* df, const lapack_complex_double* ef,\n                    const lapack_complex_double* b, lapack_int* ldb,\n                    lapack_complex_double* x, lapack_int* ldx, double* ferr,\n                    double* berr, lapack_complex_double* work, double* rwork,\n                    lapack_int *info );\nvoid LAPACK_ssyrfs( char* uplo, lapack_int* n, lapack_int* nrhs, const float* a,\n                    lapack_int* lda, const float* af, lapack_int* ldaf,\n                    const lapack_int* ipiv, const float* b, lapack_int* ldb,\n                    float* x, lapack_int* ldx, float* ferr, float* berr,\n                    float* work, lapack_int* iwork, lapack_int *info );\nvoid LAPACK_dsyrfs( char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const double* a, lapack_int* lda, const double* af,\n                    lapack_int* ldaf, const lapack_int* ipiv, const double* b,\n                    lapack_int* ldb, double* x, lapack_int* ldx, double* ferr,\n                    double* berr, double* work, lapack_int* iwork,\n                    lapack_int *info );\nvoid LAPACK_csyrfs( char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_float* a, lapack_int* lda,\n                    const lapack_complex_float* af, lapack_int* ldaf,\n                    const lapack_int* ipiv, const lapack_complex_float* b,\n                    lapack_int* ldb, lapack_complex_float* x, lapack_int* ldx,\n                    float* ferr, float* berr, lapack_complex_float* work,\n                    float* rwork, lapack_int *info );\nvoid LAPACK_zsyrfs( char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_double* a, lapack_int* lda,\n                    const lapack_complex_double* af, lapack_int* ldaf,\n                    const lapack_int* ipiv, const lapack_complex_double* b,\n                    lapack_int* ldb, lapack_complex_double* x, lapack_int* ldx,\n                    double* ferr, double* berr, lapack_complex_double* work,\n                    double* rwork, lapack_int *info );\nvoid LAPACK_dsyrfsx( char* uplo, char* equed, lapack_int* n, lapack_int* nrhs,\n                     const double* a, lapack_int* lda, const double* af,\n                     lapack_int* ldaf, const lapack_int* ipiv, const double* s,\n                     const double* b, lapack_int* ldb, double* x,\n                     lapack_int* ldx, double* rcond, double* berr,\n                     lapack_int* n_err_bnds, double* err_bnds_norm,\n                     double* err_bnds_comp, lapack_int* nparams, double* params,\n                     double* work, lapack_int* iwork, lapack_int *info );\nvoid LAPACK_ssyrfsx( char* uplo, char* equed, lapack_int* n, lapack_int* nrhs,\n                     const float* a, lapack_int* lda, const float* af,\n                     lapack_int* ldaf, const lapack_int* ipiv, const float* s,\n                     const float* b, lapack_int* ldb, float* x, lapack_int* ldx,\n                     float* rcond, float* berr, lapack_int* n_err_bnds,\n                     float* err_bnds_norm, float* err_bnds_comp,\n                     lapack_int* nparams, float* params, float* work,\n                     lapack_int* iwork, lapack_int *info );\nvoid LAPACK_zsyrfsx( char* uplo, char* equed, lapack_int* n, lapack_int* nrhs,\n                     const lapack_complex_double* a, lapack_int* lda,\n                     const lapack_complex_double* af, lapack_int* ldaf,\n                     const lapack_int* ipiv, const double* s,\n                     const lapack_complex_double* b, lapack_int* ldb,\n                     lapack_complex_double* x, lapack_int* ldx, double* rcond,\n                     double* berr, lapack_int* n_err_bnds,\n                     double* err_bnds_norm, double* err_bnds_comp,\n                     lapack_int* nparams, double* params,\n                     lapack_complex_double* work, double* rwork,\n                     lapack_int *info );\nvoid LAPACK_csyrfsx( char* uplo, char* equed, lapack_int* n, lapack_int* nrhs,\n                     const lapack_complex_float* a, lapack_int* lda,\n                     const lapack_complex_float* af, lapack_int* ldaf,\n                     const lapack_int* ipiv, const float* s,\n                     const lapack_complex_float* b, lapack_int* ldb,\n                     lapack_complex_float* x, lapack_int* ldx, float* rcond,\n                     float* berr, lapack_int* n_err_bnds, float* err_bnds_norm,\n                     float* err_bnds_comp, lapack_int* nparams, float* params,\n                     lapack_complex_float* work, float* rwork,\n                     lapack_int *info );\nvoid LAPACK_cherfs( char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_float* a, lapack_int* lda,\n                    const lapack_complex_float* af, lapack_int* ldaf,\n                    const lapack_int* ipiv, const lapack_complex_float* b,\n                    lapack_int* ldb, lapack_complex_float* x, lapack_int* ldx,\n                    float* ferr, float* berr, lapack_complex_float* work,\n                    float* rwork, lapack_int *info );\nvoid LAPACK_zherfs( char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_double* a, lapack_int* lda,\n                    const lapack_complex_double* af, lapack_int* ldaf,\n                    const lapack_int* ipiv, const lapack_complex_double* b,\n                    lapack_int* ldb, lapack_complex_double* x, lapack_int* ldx,\n                    double* ferr, double* berr, lapack_complex_double* work,\n                    double* rwork, lapack_int *info );\nvoid LAPACK_zherfsx( char* uplo, char* equed, lapack_int* n, lapack_int* nrhs,\n                     const lapack_complex_double* a, lapack_int* lda,\n                     const lapack_complex_double* af, lapack_int* ldaf,\n                     const lapack_int* ipiv, const double* s,\n                     const lapack_complex_double* b, lapack_int* ldb,\n                     lapack_complex_double* x, lapack_int* ldx, double* rcond,\n                     double* berr, lapack_int* n_err_bnds,\n                     double* err_bnds_norm, double* err_bnds_comp,\n                     lapack_int* nparams, double* params,\n                     lapack_complex_double* work, double* rwork,\n                     lapack_int *info );\nvoid LAPACK_cherfsx( char* uplo, char* equed, lapack_int* n, lapack_int* nrhs,\n                     const lapack_complex_float* a, lapack_int* lda,\n                     const lapack_complex_float* af, lapack_int* ldaf,\n                     const lapack_int* ipiv, const float* s,\n                     const lapack_complex_float* b, lapack_int* ldb,\n                     lapack_complex_float* x, lapack_int* ldx, float* rcond,\n                     float* berr, lapack_int* n_err_bnds, float* err_bnds_norm,\n                     float* err_bnds_comp, lapack_int* nparams, float* params,\n                     lapack_complex_float* work, float* rwork,\n                     lapack_int *info );\nvoid LAPACK_ssprfs( char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const float* ap, const float* afp, const lapack_int* ipiv,\n                    const float* b, lapack_int* ldb, float* x, lapack_int* ldx,\n                    float* ferr, float* berr, float* work, lapack_int* iwork,\n                    lapack_int *info );\nvoid LAPACK_dsprfs( char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const double* ap, const double* afp, const lapack_int* ipiv,\n                    const double* b, lapack_int* ldb, double* x,\n                    lapack_int* ldx, double* ferr, double* berr, double* work,\n                    lapack_int* iwork, lapack_int *info );\nvoid LAPACK_csprfs( char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_float* ap,\n                    const lapack_complex_float* afp, const lapack_int* ipiv,\n                    const lapack_complex_float* b, lapack_int* ldb,\n                    lapack_complex_float* x, lapack_int* ldx, float* ferr,\n                    float* berr, lapack_complex_float* work, float* rwork,\n                    lapack_int *info );\nvoid LAPACK_zsprfs( char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_double* ap,\n                    const lapack_complex_double* afp, const lapack_int* ipiv,\n                    const lapack_complex_double* b, lapack_int* ldb,\n                    lapack_complex_double* x, lapack_int* ldx, double* ferr,\n                    double* berr, lapack_complex_double* work, double* rwork,\n                    lapack_int *info );\nvoid LAPACK_chprfs( char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_float* ap,\n                    const lapack_complex_float* afp, const lapack_int* ipiv,\n                    const lapack_complex_float* b, lapack_int* ldb,\n                    lapack_complex_float* x, lapack_int* ldx, float* ferr,\n                    float* berr, lapack_complex_float* work, float* rwork,\n                    lapack_int *info );\nvoid LAPACK_zhprfs( char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_double* ap,\n                    const lapack_complex_double* afp, const lapack_int* ipiv,\n                    const lapack_complex_double* b, lapack_int* ldb,\n                    lapack_complex_double* x, lapack_int* ldx, double* ferr,\n                    double* berr, lapack_complex_double* work, double* rwork,\n                    lapack_int *info );\nvoid LAPACK_strrfs( char* uplo, char* trans, char* diag, lapack_int* n,\n                    lapack_int* nrhs, const float* a, lapack_int* lda,\n                    const float* b, lapack_int* ldb, const float* x,\n                    lapack_int* ldx, float* ferr, float* berr, float* work,\n                    lapack_int* iwork, lapack_int *info );\nvoid LAPACK_dtrrfs( char* uplo, char* trans, char* diag, lapack_int* n,\n                    lapack_int* nrhs, const double* a, lapack_int* lda,\n                    const double* b, lapack_int* ldb, const double* x,\n                    lapack_int* ldx, double* ferr, double* berr, double* work,\n                    lapack_int* iwork, lapack_int *info );\nvoid LAPACK_ctrrfs( char* uplo, char* trans, char* diag, lapack_int* n,\n                    lapack_int* nrhs, const lapack_complex_float* a,\n                    lapack_int* lda, const lapack_complex_float* b,\n                    lapack_int* ldb, const lapack_complex_float* x,\n                    lapack_int* ldx, float* ferr, float* berr,\n                    lapack_complex_float* work, float* rwork,\n                    lapack_int *info );\nvoid LAPACK_ztrrfs( char* uplo, char* trans, char* diag, lapack_int* n,\n                    lapack_int* nrhs, const lapack_complex_double* a,\n                    lapack_int* lda, const lapack_complex_double* b,\n                    lapack_int* ldb, const lapack_complex_double* x,\n                    lapack_int* ldx, double* ferr, double* berr,\n                    lapack_complex_double* work, double* rwork,\n                    lapack_int *info );\nvoid LAPACK_stprfs( char* uplo, char* trans, char* diag, lapack_int* n,\n                    lapack_int* nrhs, const float* ap, const float* b,\n                    lapack_int* ldb, const float* x, lapack_int* ldx,\n                    float* ferr, float* berr, float* work, lapack_int* iwork,\n                    lapack_int *info );\nvoid LAPACK_dtprfs( char* uplo, char* trans, char* diag, lapack_int* n,\n                    lapack_int* nrhs, const double* ap, const double* b,\n                    lapack_int* ldb, const double* x, lapack_int* ldx,\n                    double* ferr, double* berr, double* work, lapack_int* iwork,\n                    lapack_int *info );\nvoid LAPACK_ctprfs( char* uplo, char* trans, char* diag, lapack_int* n,\n                    lapack_int* nrhs, const lapack_complex_float* ap,\n                    const lapack_complex_float* b, lapack_int* ldb,\n                    const lapack_complex_float* x, lapack_int* ldx, float* ferr,\n                    float* berr, lapack_complex_float* work, float* rwork,\n                    lapack_int *info );\nvoid LAPACK_ztprfs( char* uplo, char* trans, char* diag, lapack_int* n,\n                    lapack_int* nrhs, const lapack_complex_double* ap,\n                    const lapack_complex_double* b, lapack_int* ldb,\n                    const lapack_complex_double* x, lapack_int* ldx,\n                    double* ferr, double* berr, lapack_complex_double* work,\n                    double* rwork, lapack_int *info );\nvoid LAPACK_stbrfs( char* uplo, char* trans, char* diag, lapack_int* n,\n                    lapack_int* kd, lapack_int* nrhs, const float* ab,\n                    lapack_int* ldab, const float* b, lapack_int* ldb,\n                    const float* x, lapack_int* ldx, float* ferr, float* berr,\n                    float* work, lapack_int* iwork, lapack_int *info );\nvoid LAPACK_dtbrfs( char* uplo, char* trans, char* diag, lapack_int* n,\n                    lapack_int* kd, lapack_int* nrhs, const double* ab,\n                    lapack_int* ldab, const double* b, lapack_int* ldb,\n                    const double* x, lapack_int* ldx, double* ferr,\n                    double* berr, double* work, lapack_int* iwork,\n                    lapack_int *info );\nvoid LAPACK_ctbrfs( char* uplo, char* trans, char* diag, lapack_int* n,\n                    lapack_int* kd, lapack_int* nrhs,\n                    const lapack_complex_float* ab, lapack_int* ldab,\n                    const lapack_complex_float* b, lapack_int* ldb,\n                    const lapack_complex_float* x, lapack_int* ldx, float* ferr,\n                    float* berr, lapack_complex_float* work, float* rwork,\n                    lapack_int *info );\nvoid LAPACK_ztbrfs( char* uplo, char* trans, char* diag, lapack_int* n,\n                    lapack_int* kd, lapack_int* nrhs,\n                    const lapack_complex_double* ab, lapack_int* ldab,\n                    const lapack_complex_double* b, lapack_int* ldb,\n                    const lapack_complex_double* x, lapack_int* ldx,\n                    double* ferr, double* berr, lapack_complex_double* work,\n                    double* rwork, lapack_int *info );\nvoid LAPACK_sgetri( lapack_int* n, float* a, lapack_int* lda,\n                    const lapack_int* ipiv, float* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_dgetri( lapack_int* n, double* a, lapack_int* lda,\n                    const lapack_int* ipiv, double* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_cgetri( lapack_int* n, lapack_complex_float* a, lapack_int* lda,\n                    const lapack_int* ipiv, lapack_complex_float* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_zgetri( lapack_int* n, lapack_complex_double* a, lapack_int* lda,\n                    const lapack_int* ipiv, lapack_complex_double* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_spotri( char* uplo, lapack_int* n, float* a, lapack_int* lda,\n                    lapack_int *info );\nvoid LAPACK_dpotri( char* uplo, lapack_int* n, double* a, lapack_int* lda,\n                    lapack_int *info );\nvoid LAPACK_cpotri( char* uplo, lapack_int* n, lapack_complex_float* a,\n                    lapack_int* lda, lapack_int *info );\nvoid LAPACK_zpotri( char* uplo, lapack_int* n, lapack_complex_double* a,\n                    lapack_int* lda, lapack_int *info );\nvoid LAPACK_dpftri( char* transr, char* uplo, lapack_int* n, double* a,\n                    lapack_int *info );\nvoid LAPACK_spftri( char* transr, char* uplo, lapack_int* n, float* a,\n                    lapack_int *info );\nvoid LAPACK_zpftri( char* transr, char* uplo, lapack_int* n,\n                    lapack_complex_double* a, lapack_int *info );\nvoid LAPACK_cpftri( char* transr, char* uplo, lapack_int* n,\n                    lapack_complex_float* a, lapack_int *info );\nvoid LAPACK_spptri( char* uplo, lapack_int* n, float* ap, lapack_int *info );\nvoid LAPACK_dpptri( char* uplo, lapack_int* n, double* ap, lapack_int *info );\nvoid LAPACK_cpptri( char* uplo, lapack_int* n, lapack_complex_float* ap,\n                    lapack_int *info );\nvoid LAPACK_zpptri( char* uplo, lapack_int* n, lapack_complex_double* ap,\n                    lapack_int *info );\nvoid LAPACK_ssytri( char* uplo, lapack_int* n, float* a, lapack_int* lda,\n                    const lapack_int* ipiv, float* work, lapack_int *info );\nvoid LAPACK_dsytri( char* uplo, lapack_int* n, double* a, lapack_int* lda,\n                    const lapack_int* ipiv, double* work, lapack_int *info );\nvoid LAPACK_csytri( char* uplo, lapack_int* n, lapack_complex_float* a,\n                    lapack_int* lda, const lapack_int* ipiv,\n                    lapack_complex_float* work, lapack_int *info );\nvoid LAPACK_zsytri( char* uplo, lapack_int* n, lapack_complex_double* a,\n                    lapack_int* lda, const lapack_int* ipiv,\n                    lapack_complex_double* work, lapack_int *info );\nvoid LAPACK_chetri( char* uplo, lapack_int* n, lapack_complex_float* a,\n                    lapack_int* lda, const lapack_int* ipiv,\n                    lapack_complex_float* work, lapack_int *info );\nvoid LAPACK_zhetri( char* uplo, lapack_int* n, lapack_complex_double* a,\n                    lapack_int* lda, const lapack_int* ipiv,\n                    lapack_complex_double* work, lapack_int *info );\nvoid LAPACK_ssptri( char* uplo, lapack_int* n, float* ap,\n                    const lapack_int* ipiv, float* work, lapack_int *info );\nvoid LAPACK_dsptri( char* uplo, lapack_int* n, double* ap,\n                    const lapack_int* ipiv, double* work, lapack_int *info );\nvoid LAPACK_csptri( char* uplo, lapack_int* n, lapack_complex_float* ap,\n                    const lapack_int* ipiv, lapack_complex_float* work,\n                    lapack_int *info );\nvoid LAPACK_zsptri( char* uplo, lapack_int* n, lapack_complex_double* ap,\n                    const lapack_int* ipiv, lapack_complex_double* work,\n                    lapack_int *info );\nvoid LAPACK_chptri( char* uplo, lapack_int* n, lapack_complex_float* ap,\n                    const lapack_int* ipiv, lapack_complex_float* work,\n                    lapack_int *info );\nvoid LAPACK_zhptri( char* uplo, lapack_int* n, lapack_complex_double* ap,\n                    const lapack_int* ipiv, lapack_complex_double* work,\n                    lapack_int *info );\nvoid LAPACK_strtri( char* uplo, char* diag, lapack_int* n, float* a,\n                    lapack_int* lda, lapack_int *info );\nvoid LAPACK_dtrtri( char* uplo, char* diag, lapack_int* n, double* a,\n                    lapack_int* lda, lapack_int *info );\nvoid LAPACK_ctrtri( char* uplo, char* diag, lapack_int* n,\n                    lapack_complex_float* a, lapack_int* lda,\n                    lapack_int *info );\nvoid LAPACK_ztrtri( char* uplo, char* diag, lapack_int* n,\n                    lapack_complex_double* a, lapack_int* lda,\n                    lapack_int *info );\nvoid LAPACK_dtftri( char* transr, char* uplo, char* diag, lapack_int* n,\n                    double* a, lapack_int *info );\nvoid LAPACK_stftri( char* transr, char* uplo, char* diag, lapack_int* n,\n                    float* a, lapack_int *info );\nvoid LAPACK_ztftri( char* transr, char* uplo, char* diag, lapack_int* n,\n                    lapack_complex_double* a, lapack_int *info );\nvoid LAPACK_ctftri( char* transr, char* uplo, char* diag, lapack_int* n,\n                    lapack_complex_float* a, lapack_int *info );\nvoid LAPACK_stptri( char* uplo, char* diag, lapack_int* n, float* ap,\n                    lapack_int *info );\nvoid LAPACK_dtptri( char* uplo, char* diag, lapack_int* n, double* ap,\n                    lapack_int *info );\nvoid LAPACK_ctptri( char* uplo, char* diag, lapack_int* n,\n                    lapack_complex_float* ap, lapack_int *info );\nvoid LAPACK_ztptri( char* uplo, char* diag, lapack_int* n,\n                    lapack_complex_double* ap, lapack_int *info );\nvoid LAPACK_sgeequ( lapack_int* m, lapack_int* n, const float* a,\n                    lapack_int* lda, float* r, float* c, float* rowcnd,\n                    float* colcnd, float* amax, lapack_int *info );\nvoid LAPACK_dgeequ( lapack_int* m, lapack_int* n, const double* a,\n                    lapack_int* lda, double* r, double* c, double* rowcnd,\n                    double* colcnd, double* amax, lapack_int *info );\nvoid LAPACK_cgeequ( lapack_int* m, lapack_int* n, const lapack_complex_float* a,\n                    lapack_int* lda, float* r, float* c, float* rowcnd,\n                    float* colcnd, float* amax, lapack_int *info );\nvoid LAPACK_zgeequ( lapack_int* m, lapack_int* n,\n                    const lapack_complex_double* a, lapack_int* lda, double* r,\n                    double* c, double* rowcnd, double* colcnd, double* amax,\n                    lapack_int *info );\nvoid LAPACK_dgeequb( lapack_int* m, lapack_int* n, const double* a,\n                     lapack_int* lda, double* r, double* c, double* rowcnd,\n                     double* colcnd, double* amax, lapack_int *info );\nvoid LAPACK_sgeequb( lapack_int* m, lapack_int* n, const float* a,\n                     lapack_int* lda, float* r, float* c, float* rowcnd,\n                     float* colcnd, float* amax, lapack_int *info );\nvoid LAPACK_zgeequb( lapack_int* m, lapack_int* n,\n                     const lapack_complex_double* a, lapack_int* lda, double* r,\n                     double* c, double* rowcnd, double* colcnd, double* amax,\n                     lapack_int *info );\nvoid LAPACK_cgeequb( lapack_int* m, lapack_int* n,\n                     const lapack_complex_float* a, lapack_int* lda, float* r,\n                     float* c, float* rowcnd, float* colcnd, float* amax,\n                     lapack_int *info );\nvoid LAPACK_sgbequ( lapack_int* m, lapack_int* n, lapack_int* kl,\n                    lapack_int* ku, const float* ab, lapack_int* ldab, float* r,\n                    float* c, float* rowcnd, float* colcnd, float* amax,\n                    lapack_int *info );\nvoid LAPACK_dgbequ( lapack_int* m, lapack_int* n, lapack_int* kl,\n                    lapack_int* ku, const double* ab, lapack_int* ldab,\n                    double* r, double* c, double* rowcnd, double* colcnd,\n                    double* amax, lapack_int *info );\nvoid LAPACK_cgbequ( lapack_int* m, lapack_int* n, lapack_int* kl,\n                    lapack_int* ku, const lapack_complex_float* ab,\n                    lapack_int* ldab, float* r, float* c, float* rowcnd,\n                    float* colcnd, float* amax, lapack_int *info );\nvoid LAPACK_zgbequ( lapack_int* m, lapack_int* n, lapack_int* kl,\n                    lapack_int* ku, const lapack_complex_double* ab,\n                    lapack_int* ldab, double* r, double* c, double* rowcnd,\n                    double* colcnd, double* amax, lapack_int *info );\nvoid LAPACK_dgbequb( lapack_int* m, lapack_int* n, lapack_int* kl,\n                     lapack_int* ku, const double* ab, lapack_int* ldab,\n                     double* r, double* c, double* rowcnd, double* colcnd,\n                     double* amax, lapack_int *info );\nvoid LAPACK_sgbequb( lapack_int* m, lapack_int* n, lapack_int* kl,\n                     lapack_int* ku, const float* ab, lapack_int* ldab,\n                     float* r, float* c, float* rowcnd, float* colcnd,\n                     float* amax, lapack_int *info );\nvoid LAPACK_zgbequb( lapack_int* m, lapack_int* n, lapack_int* kl,\n                     lapack_int* ku, const lapack_complex_double* ab,\n                     lapack_int* ldab, double* r, double* c, double* rowcnd,\n                     double* colcnd, double* amax, lapack_int *info );\nvoid LAPACK_cgbequb( lapack_int* m, lapack_int* n, lapack_int* kl,\n                     lapack_int* ku, const lapack_complex_float* ab,\n                     lapack_int* ldab, float* r, float* c, float* rowcnd,\n                     float* colcnd, float* amax, lapack_int *info );\nvoid LAPACK_spoequ( lapack_int* n, const float* a, lapack_int* lda, float* s,\n                    float* scond, float* amax, lapack_int *info );\nvoid LAPACK_dpoequ( lapack_int* n, const double* a, lapack_int* lda, double* s,\n                    double* scond, double* amax, lapack_int *info );\nvoid LAPACK_cpoequ( lapack_int* n, const lapack_complex_float* a,\n                    lapack_int* lda, float* s, float* scond, float* amax,\n                    lapack_int *info );\nvoid LAPACK_zpoequ( lapack_int* n, const lapack_complex_double* a,\n                    lapack_int* lda, double* s, double* scond, double* amax,\n                    lapack_int *info );\nvoid LAPACK_dpoequb( lapack_int* n, const double* a, lapack_int* lda, double* s,\n                     double* scond, double* amax, lapack_int *info );\nvoid LAPACK_spoequb( lapack_int* n, const float* a, lapack_int* lda, float* s,\n                     float* scond, float* amax, lapack_int *info );\nvoid LAPACK_zpoequb( lapack_int* n, const lapack_complex_double* a,\n                     lapack_int* lda, double* s, double* scond, double* amax,\n                     lapack_int *info );\nvoid LAPACK_cpoequb( lapack_int* n, const lapack_complex_float* a,\n                     lapack_int* lda, float* s, float* scond, float* amax,\n                     lapack_int *info );\nvoid LAPACK_sppequ( char* uplo, lapack_int* n, const float* ap, float* s,\n                    float* scond, float* amax, lapack_int *info );\nvoid LAPACK_dppequ( char* uplo, lapack_int* n, const double* ap, double* s,\n                    double* scond, double* amax, lapack_int *info );\nvoid LAPACK_cppequ( char* uplo, lapack_int* n, const lapack_complex_float* ap,\n                    float* s, float* scond, float* amax, lapack_int *info );\nvoid LAPACK_zppequ( char* uplo, lapack_int* n, const lapack_complex_double* ap,\n                    double* s, double* scond, double* amax, lapack_int *info );\nvoid LAPACK_spbequ( char* uplo, lapack_int* n, lapack_int* kd, const float* ab,\n                    lapack_int* ldab, float* s, float* scond, float* amax,\n                    lapack_int *info );\nvoid LAPACK_dpbequ( char* uplo, lapack_int* n, lapack_int* kd, const double* ab,\n                    lapack_int* ldab, double* s, double* scond, double* amax,\n                    lapack_int *info );\nvoid LAPACK_cpbequ( char* uplo, lapack_int* n, lapack_int* kd,\n                    const lapack_complex_float* ab, lapack_int* ldab, float* s,\n                    float* scond, float* amax, lapack_int *info );\nvoid LAPACK_zpbequ( char* uplo, lapack_int* n, lapack_int* kd,\n                    const lapack_complex_double* ab, lapack_int* ldab,\n                    double* s, double* scond, double* amax, lapack_int *info );\nvoid LAPACK_dsyequb( char* uplo, lapack_int* n, const double* a,\n                     lapack_int* lda, double* s, double* scond, double* amax,\n                     double* work, lapack_int *info );\nvoid LAPACK_ssyequb( char* uplo, lapack_int* n, const float* a, lapack_int* lda,\n                     float* s, float* scond, float* amax, float* work,\n                     lapack_int *info );\nvoid LAPACK_zsyequb( char* uplo, lapack_int* n, const lapack_complex_double* a,\n                     lapack_int* lda, double* s, double* scond, double* amax,\n                     lapack_complex_double* work, lapack_int *info );\nvoid LAPACK_csyequb( char* uplo, lapack_int* n, const lapack_complex_float* a,\n                     lapack_int* lda, float* s, float* scond, float* amax,\n                     lapack_complex_float* work, lapack_int *info );\nvoid LAPACK_zheequb( char* uplo, lapack_int* n, const lapack_complex_double* a,\n                     lapack_int* lda, double* s, double* scond, double* amax,\n                     lapack_complex_double* work, lapack_int *info );\nvoid LAPACK_cheequb( char* uplo, lapack_int* n, const lapack_complex_float* a,\n                     lapack_int* lda, float* s, float* scond, float* amax,\n                     lapack_complex_float* work, lapack_int *info );\nvoid LAPACK_sgesv( lapack_int* n, lapack_int* nrhs, float* a, lapack_int* lda,\n                   lapack_int* ipiv, float* b, lapack_int* ldb,\n                   lapack_int *info );\nvoid LAPACK_dgesv( lapack_int* n, lapack_int* nrhs, double* a, lapack_int* lda,\n                   lapack_int* ipiv, double* b, lapack_int* ldb,\n                   lapack_int *info );\nvoid LAPACK_cgesv( lapack_int* n, lapack_int* nrhs, lapack_complex_float* a,\n                   lapack_int* lda, lapack_int* ipiv, lapack_complex_float* b,\n                   lapack_int* ldb, lapack_int *info );\nvoid LAPACK_zgesv( lapack_int* n, lapack_int* nrhs, lapack_complex_double* a,\n                   lapack_int* lda, lapack_int* ipiv, lapack_complex_double* b,\n                   lapack_int* ldb, lapack_int *info );\nvoid LAPACK_dsgesv( lapack_int* n, lapack_int* nrhs, double* a, lapack_int* lda,\n                    lapack_int* ipiv, double* b, lapack_int* ldb, double* x,\n                    lapack_int* ldx, double* work, float* swork,\n                    lapack_int* iter, lapack_int *info );\nvoid LAPACK_zcgesv( lapack_int* n, lapack_int* nrhs, lapack_complex_double* a,\n                    lapack_int* lda, lapack_int* ipiv, lapack_complex_double* b,\n                    lapack_int* ldb, lapack_complex_double* x, lapack_int* ldx,\n                    lapack_complex_double* work, lapack_complex_float* swork,\n                    double* rwork, lapack_int* iter, lapack_int *info );\nvoid LAPACK_sgesvx( char* fact, char* trans, lapack_int* n, lapack_int* nrhs,\n                    float* a, lapack_int* lda, float* af, lapack_int* ldaf,\n                    lapack_int* ipiv, char* equed, float* r, float* c, float* b,\n                    lapack_int* ldb, float* x, lapack_int* ldx, float* rcond,\n                    float* ferr, float* berr, float* work, lapack_int* iwork,\n                    lapack_int *info );\nvoid LAPACK_dgesvx( char* fact, char* trans, lapack_int* n, lapack_int* nrhs,\n                    double* a, lapack_int* lda, double* af, lapack_int* ldaf,\n                    lapack_int* ipiv, char* equed, double* r, double* c,\n                    double* b, lapack_int* ldb, double* x, lapack_int* ldx,\n                    double* rcond, double* ferr, double* berr, double* work,\n                    lapack_int* iwork, lapack_int *info );\nvoid LAPACK_cgesvx( char* fact, char* trans, lapack_int* n, lapack_int* nrhs,\n                    lapack_complex_float* a, lapack_int* lda,\n                    lapack_complex_float* af, lapack_int* ldaf,\n                    lapack_int* ipiv, char* equed, float* r, float* c,\n                    lapack_complex_float* b, lapack_int* ldb,\n                    lapack_complex_float* x, lapack_int* ldx, float* rcond,\n                    float* ferr, float* berr, lapack_complex_float* work,\n                    float* rwork, lapack_int *info );\nvoid LAPACK_zgesvx( char* fact, char* trans, lapack_int* n, lapack_int* nrhs,\n                    lapack_complex_double* a, lapack_int* lda,\n                    lapack_complex_double* af, lapack_int* ldaf,\n                    lapack_int* ipiv, char* equed, double* r, double* c,\n                    lapack_complex_double* b, lapack_int* ldb,\n                    lapack_complex_double* x, lapack_int* ldx, double* rcond,\n                    double* ferr, double* berr, lapack_complex_double* work,\n                    double* rwork, lapack_int *info );\nvoid LAPACK_dgesvxx( char* fact, char* trans, lapack_int* n, lapack_int* nrhs,\n                     double* a, lapack_int* lda, double* af, lapack_int* ldaf,\n                     lapack_int* ipiv, char* equed, double* r, double* c,\n                     double* b, lapack_int* ldb, double* x, lapack_int* ldx,\n                     double* rcond, double* rpvgrw, double* berr,\n                     lapack_int* n_err_bnds, double* err_bnds_norm,\n                     double* err_bnds_comp, lapack_int* nparams, double* params,\n                     double* work, lapack_int* iwork, lapack_int *info );\nvoid LAPACK_sgesvxx( char* fact, char* trans, lapack_int* n, lapack_int* nrhs,\n                     float* a, lapack_int* lda, float* af, lapack_int* ldaf,\n                     lapack_int* ipiv, char* equed, float* r, float* c,\n                     float* b, lapack_int* ldb, float* x, lapack_int* ldx,\n                     float* rcond, float* rpvgrw, float* berr,\n                     lapack_int* n_err_bnds, float* err_bnds_norm,\n                     float* err_bnds_comp, lapack_int* nparams, float* params,\n                     float* work, lapack_int* iwork, lapack_int *info );\nvoid LAPACK_zgesvxx( char* fact, char* trans, lapack_int* n, lapack_int* nrhs,\n                     lapack_complex_double* a, lapack_int* lda,\n                     lapack_complex_double* af, lapack_int* ldaf,\n                     lapack_int* ipiv, char* equed, double* r, double* c,\n                     lapack_complex_double* b, lapack_int* ldb,\n                     lapack_complex_double* x, lapack_int* ldx, double* rcond,\n                     double* rpvgrw, double* berr, lapack_int* n_err_bnds,\n                     double* err_bnds_norm, double* err_bnds_comp,\n                     lapack_int* nparams, double* params,\n                     lapack_complex_double* work, double* rwork,\n                     lapack_int *info );\nvoid LAPACK_cgesvxx( char* fact, char* trans, lapack_int* n, lapack_int* nrhs,\n                     lapack_complex_float* a, lapack_int* lda,\n                     lapack_complex_float* af, lapack_int* ldaf,\n                     lapack_int* ipiv, char* equed, float* r, float* c,\n                     lapack_complex_float* b, lapack_int* ldb,\n                     lapack_complex_float* x, lapack_int* ldx, float* rcond,\n                     float* rpvgrw, float* berr, lapack_int* n_err_bnds,\n                     float* err_bnds_norm, float* err_bnds_comp,\n                     lapack_int* nparams, float* params,\n                     lapack_complex_float* work, float* rwork,\n                     lapack_int *info );\nvoid LAPACK_sgbsv( lapack_int* n, lapack_int* kl, lapack_int* ku,\n                   lapack_int* nrhs, float* ab, lapack_int* ldab,\n                   lapack_int* ipiv, float* b, lapack_int* ldb,\n                   lapack_int *info );\nvoid LAPACK_dgbsv( lapack_int* n, lapack_int* kl, lapack_int* ku,\n                   lapack_int* nrhs, double* ab, lapack_int* ldab,\n                   lapack_int* ipiv, double* b, lapack_int* ldb,\n                   lapack_int *info );\nvoid LAPACK_cgbsv( lapack_int* n, lapack_int* kl, lapack_int* ku,\n                   lapack_int* nrhs, lapack_complex_float* ab, lapack_int* ldab,\n                   lapack_int* ipiv, lapack_complex_float* b, lapack_int* ldb,\n                   lapack_int *info );\nvoid LAPACK_zgbsv( lapack_int* n, lapack_int* kl, lapack_int* ku,\n                   lapack_int* nrhs, lapack_complex_double* ab,\n                   lapack_int* ldab, lapack_int* ipiv, lapack_complex_double* b,\n                   lapack_int* ldb, lapack_int *info );\nvoid LAPACK_sgbsvx( char* fact, char* trans, lapack_int* n, lapack_int* kl,\n                    lapack_int* ku, lapack_int* nrhs, float* ab,\n                    lapack_int* ldab, float* afb, lapack_int* ldafb,\n                    lapack_int* ipiv, char* equed, float* r, float* c, float* b,\n                    lapack_int* ldb, float* x, lapack_int* ldx, float* rcond,\n                    float* ferr, float* berr, float* work, lapack_int* iwork,\n                    lapack_int *info );\nvoid LAPACK_dgbsvx( char* fact, char* trans, lapack_int* n, lapack_int* kl,\n                    lapack_int* ku, lapack_int* nrhs, double* ab,\n                    lapack_int* ldab, double* afb, lapack_int* ldafb,\n                    lapack_int* ipiv, char* equed, double* r, double* c,\n                    double* b, lapack_int* ldb, double* x, lapack_int* ldx,\n                    double* rcond, double* ferr, double* berr, double* work,\n                    lapack_int* iwork, lapack_int *info );\nvoid LAPACK_cgbsvx( char* fact, char* trans, lapack_int* n, lapack_int* kl,\n                    lapack_int* ku, lapack_int* nrhs, lapack_complex_float* ab,\n                    lapack_int* ldab, lapack_complex_float* afb,\n                    lapack_int* ldafb, lapack_int* ipiv, char* equed, float* r,\n                    float* c, lapack_complex_float* b, lapack_int* ldb,\n                    lapack_complex_float* x, lapack_int* ldx, float* rcond,\n                    float* ferr, float* berr, lapack_complex_float* work,\n                    float* rwork, lapack_int *info );\nvoid LAPACK_zgbsvx( char* fact, char* trans, lapack_int* n, lapack_int* kl,\n                    lapack_int* ku, lapack_int* nrhs, lapack_complex_double* ab,\n                    lapack_int* ldab, lapack_complex_double* afb,\n                    lapack_int* ldafb, lapack_int* ipiv, char* equed, double* r,\n                    double* c, lapack_complex_double* b, lapack_int* ldb,\n                    lapack_complex_double* x, lapack_int* ldx, double* rcond,\n                    double* ferr, double* berr, lapack_complex_double* work,\n                    double* rwork, lapack_int *info );\nvoid LAPACK_dgbsvxx( char* fact, char* trans, lapack_int* n, lapack_int* kl,\n                     lapack_int* ku, lapack_int* nrhs, double* ab,\n                     lapack_int* ldab, double* afb, lapack_int* ldafb,\n                     lapack_int* ipiv, char* equed, double* r, double* c,\n                     double* b, lapack_int* ldb, double* x, lapack_int* ldx,\n                     double* rcond, double* rpvgrw, double* berr,\n                     lapack_int* n_err_bnds, double* err_bnds_norm,\n                     double* err_bnds_comp, lapack_int* nparams, double* params,\n                     double* work, lapack_int* iwork, lapack_int *info );\nvoid LAPACK_sgbsvxx( char* fact, char* trans, lapack_int* n, lapack_int* kl,\n                     lapack_int* ku, lapack_int* nrhs, float* ab,\n                     lapack_int* ldab, float* afb, lapack_int* ldafb,\n                     lapack_int* ipiv, char* equed, float* r, float* c,\n                     float* b, lapack_int* ldb, float* x, lapack_int* ldx,\n                     float* rcond, float* rpvgrw, float* berr,\n                     lapack_int* n_err_bnds, float* err_bnds_norm,\n                     float* err_bnds_comp, lapack_int* nparams, float* params,\n                     float* work, lapack_int* iwork, lapack_int *info );\nvoid LAPACK_zgbsvxx( char* fact, char* trans, lapack_int* n, lapack_int* kl,\n                     lapack_int* ku, lapack_int* nrhs,\n                     lapack_complex_double* ab, lapack_int* ldab,\n                     lapack_complex_double* afb, lapack_int* ldafb,\n                     lapack_int* ipiv, char* equed, double* r, double* c,\n                     lapack_complex_double* b, lapack_int* ldb,\n                     lapack_complex_double* x, lapack_int* ldx, double* rcond,\n                     double* rpvgrw, double* berr, lapack_int* n_err_bnds,\n                     double* err_bnds_norm, double* err_bnds_comp,\n                     lapack_int* nparams, double* params,\n                     lapack_complex_double* work, double* rwork,\n                     lapack_int *info );\nvoid LAPACK_cgbsvxx( char* fact, char* trans, lapack_int* n, lapack_int* kl,\n                     lapack_int* ku, lapack_int* nrhs, lapack_complex_float* ab,\n                     lapack_int* ldab, lapack_complex_float* afb,\n                     lapack_int* ldafb, lapack_int* ipiv, char* equed, float* r,\n                     float* c, lapack_complex_float* b, lapack_int* ldb,\n                     lapack_complex_float* x, lapack_int* ldx, float* rcond,\n                     float* rpvgrw, float* berr, lapack_int* n_err_bnds,\n                     float* err_bnds_norm, float* err_bnds_comp,\n                     lapack_int* nparams, float* params,\n                     lapack_complex_float* work, float* rwork,\n                     lapack_int *info );\nvoid LAPACK_sgtsv( lapack_int* n, lapack_int* nrhs, float* dl, float* d,\n                   float* du, float* b, lapack_int* ldb, lapack_int *info );\nvoid LAPACK_dgtsv( lapack_int* n, lapack_int* nrhs, double* dl, double* d,\n                   double* du, double* b, lapack_int* ldb, lapack_int *info );\nvoid LAPACK_cgtsv( lapack_int* n, lapack_int* nrhs, lapack_complex_float* dl,\n                   lapack_complex_float* d, lapack_complex_float* du,\n                   lapack_complex_float* b, lapack_int* ldb, lapack_int *info );\nvoid LAPACK_zgtsv( lapack_int* n, lapack_int* nrhs, lapack_complex_double* dl,\n                   lapack_complex_double* d, lapack_complex_double* du,\n                   lapack_complex_double* b, lapack_int* ldb,\n                   lapack_int *info );\nvoid LAPACK_sgtsvx( char* fact, char* trans, lapack_int* n, lapack_int* nrhs,\n                    const float* dl, const float* d, const float* du,\n                    float* dlf, float* df, float* duf, float* du2,\n                    lapack_int* ipiv, const float* b, lapack_int* ldb, float* x,\n                    lapack_int* ldx, float* rcond, float* ferr, float* berr,\n                    float* work, lapack_int* iwork, lapack_int *info );\nvoid LAPACK_dgtsvx( char* fact, char* trans, lapack_int* n, lapack_int* nrhs,\n                    const double* dl, const double* d, const double* du,\n                    double* dlf, double* df, double* duf, double* du2,\n                    lapack_int* ipiv, const double* b, lapack_int* ldb,\n                    double* x, lapack_int* ldx, double* rcond, double* ferr,\n                    double* berr, double* work, lapack_int* iwork,\n                    lapack_int *info );\nvoid LAPACK_cgtsvx( char* fact, char* trans, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_float* dl,\n                    const lapack_complex_float* d,\n                    const lapack_complex_float* du, lapack_complex_float* dlf,\n                    lapack_complex_float* df, lapack_complex_float* duf,\n                    lapack_complex_float* du2, lapack_int* ipiv,\n                    const lapack_complex_float* b, lapack_int* ldb,\n                    lapack_complex_float* x, lapack_int* ldx, float* rcond,\n                    float* ferr, float* berr, lapack_complex_float* work,\n                    float* rwork, lapack_int *info );\nvoid LAPACK_zgtsvx( char* fact, char* trans, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_double* dl,\n                    const lapack_complex_double* d,\n                    const lapack_complex_double* du, lapack_complex_double* dlf,\n                    lapack_complex_double* df, lapack_complex_double* duf,\n                    lapack_complex_double* du2, lapack_int* ipiv,\n                    const lapack_complex_double* b, lapack_int* ldb,\n                    lapack_complex_double* x, lapack_int* ldx, double* rcond,\n                    double* ferr, double* berr, lapack_complex_double* work,\n                    double* rwork, lapack_int *info );\nvoid LAPACK_sposv( char* uplo, lapack_int* n, lapack_int* nrhs, float* a,\n                   lapack_int* lda, float* b, lapack_int* ldb,\n                   lapack_int *info );\nvoid LAPACK_dposv( char* uplo, lapack_int* n, lapack_int* nrhs, double* a,\n                   lapack_int* lda, double* b, lapack_int* ldb,\n                   lapack_int *info );\nvoid LAPACK_cposv( char* uplo, lapack_int* n, lapack_int* nrhs,\n                   lapack_complex_float* a, lapack_int* lda,\n                   lapack_complex_float* b, lapack_int* ldb, lapack_int *info );\nvoid LAPACK_zposv( char* uplo, lapack_int* n, lapack_int* nrhs,\n                   lapack_complex_double* a, lapack_int* lda,\n                   lapack_complex_double* b, lapack_int* ldb,\n                   lapack_int *info );\nvoid LAPACK_dsposv( char* uplo, lapack_int* n, lapack_int* nrhs, double* a,\n                    lapack_int* lda, double* b, lapack_int* ldb, double* x,\n                    lapack_int* ldx, double* work, float* swork,\n                    lapack_int* iter, lapack_int *info );\nvoid LAPACK_zcposv( char* uplo, lapack_int* n, lapack_int* nrhs,\n                    lapack_complex_double* a, lapack_int* lda,\n                    lapack_complex_double* b, lapack_int* ldb,\n                    lapack_complex_double* x, lapack_int* ldx,\n                    lapack_complex_double* work, lapack_complex_float* swork,\n                    double* rwork, lapack_int* iter, lapack_int *info );\nvoid LAPACK_sposvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs,\n                    float* a, lapack_int* lda, float* af, lapack_int* ldaf,\n                    char* equed, float* s, float* b, lapack_int* ldb, float* x,\n                    lapack_int* ldx, float* rcond, float* ferr, float* berr,\n                    float* work, lapack_int* iwork, lapack_int *info );\nvoid LAPACK_dposvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs,\n                    double* a, lapack_int* lda, double* af, lapack_int* ldaf,\n                    char* equed, double* s, double* b, lapack_int* ldb,\n                    double* x, lapack_int* ldx, double* rcond, double* ferr,\n                    double* berr, double* work, lapack_int* iwork,\n                    lapack_int *info );\nvoid LAPACK_cposvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs,\n                    lapack_complex_float* a, lapack_int* lda,\n                    lapack_complex_float* af, lapack_int* ldaf, char* equed,\n                    float* s, lapack_complex_float* b, lapack_int* ldb,\n                    lapack_complex_float* x, lapack_int* ldx, float* rcond,\n                    float* ferr, float* berr, lapack_complex_float* work,\n                    float* rwork, lapack_int *info );\nvoid LAPACK_zposvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs,\n                    lapack_complex_double* a, lapack_int* lda,\n                    lapack_complex_double* af, lapack_int* ldaf, char* equed,\n                    double* s, lapack_complex_double* b, lapack_int* ldb,\n                    lapack_complex_double* x, lapack_int* ldx, double* rcond,\n                    double* ferr, double* berr, lapack_complex_double* work,\n                    double* rwork, lapack_int *info );\nvoid LAPACK_dposvxx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs,\n                     double* a, lapack_int* lda, double* af, lapack_int* ldaf,\n                     char* equed, double* s, double* b, lapack_int* ldb,\n                     double* x, lapack_int* ldx, double* rcond, double* rpvgrw,\n                     double* berr, lapack_int* n_err_bnds,\n                     double* err_bnds_norm, double* err_bnds_comp,\n                     lapack_int* nparams, double* params, double* work,\n                     lapack_int* iwork, lapack_int *info );\nvoid LAPACK_sposvxx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs,\n                     float* a, lapack_int* lda, float* af, lapack_int* ldaf,\n                     char* equed, float* s, float* b, lapack_int* ldb, float* x,\n                     lapack_int* ldx, float* rcond, float* rpvgrw, float* berr,\n                     lapack_int* n_err_bnds, float* err_bnds_norm,\n                     float* err_bnds_comp, lapack_int* nparams, float* params,\n                     float* work, lapack_int* iwork, lapack_int *info );\nvoid LAPACK_zposvxx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs,\n                     lapack_complex_double* a, lapack_int* lda,\n                     lapack_complex_double* af, lapack_int* ldaf, char* equed,\n                     double* s, lapack_complex_double* b, lapack_int* ldb,\n                     lapack_complex_double* x, lapack_int* ldx, double* rcond,\n                     double* rpvgrw, double* berr, lapack_int* n_err_bnds,\n                     double* err_bnds_norm, double* err_bnds_comp,\n                     lapack_int* nparams, double* params,\n                     lapack_complex_double* work, double* rwork,\n                     lapack_int *info );\nvoid LAPACK_cposvxx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs,\n                     lapack_complex_float* a, lapack_int* lda,\n                     lapack_complex_float* af, lapack_int* ldaf, char* equed,\n                     float* s, lapack_complex_float* b, lapack_int* ldb,\n                     lapack_complex_float* x, lapack_int* ldx, float* rcond,\n                     float* rpvgrw, float* berr, lapack_int* n_err_bnds,\n                     float* err_bnds_norm, float* err_bnds_comp,\n                     lapack_int* nparams, float* params,\n                     lapack_complex_float* work, float* rwork,\n                     lapack_int *info );\nvoid LAPACK_sppsv( char* uplo, lapack_int* n, lapack_int* nrhs, float* ap,\n                   float* b, lapack_int* ldb, lapack_int *info );\nvoid LAPACK_dppsv( char* uplo, lapack_int* n, lapack_int* nrhs, double* ap,\n                   double* b, lapack_int* ldb, lapack_int *info );\nvoid LAPACK_cppsv( char* uplo, lapack_int* n, lapack_int* nrhs,\n                   lapack_complex_float* ap, lapack_complex_float* b,\n                   lapack_int* ldb, lapack_int *info );\nvoid LAPACK_zppsv( char* uplo, lapack_int* n, lapack_int* nrhs,\n                   lapack_complex_double* ap, lapack_complex_double* b,\n                   lapack_int* ldb, lapack_int *info );\nvoid LAPACK_sppsvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs,\n                    float* ap, float* afp, char* equed, float* s, float* b,\n                    lapack_int* ldb, float* x, lapack_int* ldx, float* rcond,\n                    float* ferr, float* berr, float* work, lapack_int* iwork,\n                    lapack_int *info );\nvoid LAPACK_dppsvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs,\n                    double* ap, double* afp, char* equed, double* s, double* b,\n                    lapack_int* ldb, double* x, lapack_int* ldx, double* rcond,\n                    double* ferr, double* berr, double* work, lapack_int* iwork,\n                    lapack_int *info );\nvoid LAPACK_cppsvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs,\n                    lapack_complex_float* ap, lapack_complex_float* afp,\n                    char* equed, float* s, lapack_complex_float* b,\n                    lapack_int* ldb, lapack_complex_float* x, lapack_int* ldx,\n                    float* rcond, float* ferr, float* berr,\n                    lapack_complex_float* work, float* rwork,\n                    lapack_int *info );\nvoid LAPACK_zppsvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs,\n                    lapack_complex_double* ap, lapack_complex_double* afp,\n                    char* equed, double* s, lapack_complex_double* b,\n                    lapack_int* ldb, lapack_complex_double* x, lapack_int* ldx,\n                    double* rcond, double* ferr, double* berr,\n                    lapack_complex_double* work, double* rwork,\n                    lapack_int *info );\nvoid LAPACK_spbsv( char* uplo, lapack_int* n, lapack_int* kd, lapack_int* nrhs,\n                   float* ab, lapack_int* ldab, float* b, lapack_int* ldb,\n                   lapack_int *info );\nvoid LAPACK_dpbsv( char* uplo, lapack_int* n, lapack_int* kd, lapack_int* nrhs,\n                   double* ab, lapack_int* ldab, double* b, lapack_int* ldb,\n                   lapack_int *info );\nvoid LAPACK_cpbsv( char* uplo, lapack_int* n, lapack_int* kd, lapack_int* nrhs,\n                   lapack_complex_float* ab, lapack_int* ldab,\n                   lapack_complex_float* b, lapack_int* ldb, lapack_int *info );\nvoid LAPACK_zpbsv( char* uplo, lapack_int* n, lapack_int* kd, lapack_int* nrhs,\n                   lapack_complex_double* ab, lapack_int* ldab,\n                   lapack_complex_double* b, lapack_int* ldb,\n                   lapack_int *info );\nvoid LAPACK_spbsvx( char* fact, char* uplo, lapack_int* n, lapack_int* kd,\n                    lapack_int* nrhs, float* ab, lapack_int* ldab, float* afb,\n                    lapack_int* ldafb, char* equed, float* s, float* b,\n                    lapack_int* ldb, float* x, lapack_int* ldx, float* rcond,\n                    float* ferr, float* berr, float* work, lapack_int* iwork,\n                    lapack_int *info );\nvoid LAPACK_dpbsvx( char* fact, char* uplo, lapack_int* n, lapack_int* kd,\n                    lapack_int* nrhs, double* ab, lapack_int* ldab, double* afb,\n                    lapack_int* ldafb, char* equed, double* s, double* b,\n                    lapack_int* ldb, double* x, lapack_int* ldx, double* rcond,\n                    double* ferr, double* berr, double* work, lapack_int* iwork,\n                    lapack_int *info );\nvoid LAPACK_cpbsvx( char* fact, char* uplo, lapack_int* n, lapack_int* kd,\n                    lapack_int* nrhs, lapack_complex_float* ab,\n                    lapack_int* ldab, lapack_complex_float* afb,\n                    lapack_int* ldafb, char* equed, float* s,\n                    lapack_complex_float* b, lapack_int* ldb,\n                    lapack_complex_float* x, lapack_int* ldx, float* rcond,\n                    float* ferr, float* berr, lapack_complex_float* work,\n                    float* rwork, lapack_int *info );\nvoid LAPACK_zpbsvx( char* fact, char* uplo, lapack_int* n, lapack_int* kd,\n                    lapack_int* nrhs, lapack_complex_double* ab,\n                    lapack_int* ldab, lapack_complex_double* afb,\n                    lapack_int* ldafb, char* equed, double* s,\n                    lapack_complex_double* b, lapack_int* ldb,\n                    lapack_complex_double* x, lapack_int* ldx, double* rcond,\n                    double* ferr, double* berr, lapack_complex_double* work,\n                    double* rwork, lapack_int *info );\nvoid LAPACK_sptsv( lapack_int* n, lapack_int* nrhs, float* d, float* e,\n                   float* b, lapack_int* ldb, lapack_int *info );\nvoid LAPACK_dptsv( lapack_int* n, lapack_int* nrhs, double* d, double* e,\n                   double* b, lapack_int* ldb, lapack_int *info );\nvoid LAPACK_cptsv( lapack_int* n, lapack_int* nrhs, float* d,\n                   lapack_complex_float* e, lapack_complex_float* b,\n                   lapack_int* ldb, lapack_int *info );\nvoid LAPACK_zptsv( lapack_int* n, lapack_int* nrhs, double* d,\n                   lapack_complex_double* e, lapack_complex_double* b,\n                   lapack_int* ldb, lapack_int *info );\nvoid LAPACK_sptsvx( char* fact, lapack_int* n, lapack_int* nrhs, const float* d,\n                    const float* e, float* df, float* ef, const float* b,\n                    lapack_int* ldb, float* x, lapack_int* ldx, float* rcond,\n                    float* ferr, float* berr, float* work, lapack_int *info );\nvoid LAPACK_dptsvx( char* fact, lapack_int* n, lapack_int* nrhs,\n                    const double* d, const double* e, double* df, double* ef,\n                    const double* b, lapack_int* ldb, double* x,\n                    lapack_int* ldx, double* rcond, double* ferr, double* berr,\n                    double* work, lapack_int *info );\nvoid LAPACK_cptsvx( char* fact, lapack_int* n, lapack_int* nrhs, const float* d,\n                    const lapack_complex_float* e, float* df,\n                    lapack_complex_float* ef, const lapack_complex_float* b,\n                    lapack_int* ldb, lapack_complex_float* x, lapack_int* ldx,\n                    float* rcond, float* ferr, float* berr,\n                    lapack_complex_float* work, float* rwork,\n                    lapack_int *info );\nvoid LAPACK_zptsvx( char* fact, lapack_int* n, lapack_int* nrhs,\n                    const double* d, const lapack_complex_double* e, double* df,\n                    lapack_complex_double* ef, const lapack_complex_double* b,\n                    lapack_int* ldb, lapack_complex_double* x, lapack_int* ldx,\n                    double* rcond, double* ferr, double* berr,\n                    lapack_complex_double* work, double* rwork,\n                    lapack_int *info );\nvoid LAPACK_ssysv( char* uplo, lapack_int* n, lapack_int* nrhs, float* a,\n                   lapack_int* lda, lapack_int* ipiv, float* b, lapack_int* ldb,\n                   float* work, lapack_int* lwork, lapack_int *info );\nvoid LAPACK_dsysv( char* uplo, lapack_int* n, lapack_int* nrhs, double* a,\n                   lapack_int* lda, lapack_int* ipiv, double* b,\n                   lapack_int* ldb, double* work, lapack_int* lwork,\n                   lapack_int *info );\nvoid LAPACK_csysv( char* uplo, lapack_int* n, lapack_int* nrhs,\n                   lapack_complex_float* a, lapack_int* lda, lapack_int* ipiv,\n                   lapack_complex_float* b, lapack_int* ldb,\n                   lapack_complex_float* work, lapack_int* lwork,\n                   lapack_int *info );\nvoid LAPACK_zsysv( char* uplo, lapack_int* n, lapack_int* nrhs,\n                   lapack_complex_double* a, lapack_int* lda, lapack_int* ipiv,\n                   lapack_complex_double* b, lapack_int* ldb,\n                   lapack_complex_double* work, lapack_int* lwork,\n                   lapack_int *info );\nvoid LAPACK_ssysvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const float* a, lapack_int* lda, float* af,\n                    lapack_int* ldaf, lapack_int* ipiv, const float* b,\n                    lapack_int* ldb, float* x, lapack_int* ldx, float* rcond,\n                    float* ferr, float* berr, float* work, lapack_int* lwork,\n                    lapack_int* iwork, lapack_int *info );\nvoid LAPACK_dsysvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const double* a, lapack_int* lda, double* af,\n                    lapack_int* ldaf, lapack_int* ipiv, const double* b,\n                    lapack_int* ldb, double* x, lapack_int* ldx, double* rcond,\n                    double* ferr, double* berr, double* work, lapack_int* lwork,\n                    lapack_int* iwork, lapack_int *info );\nvoid LAPACK_csysvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_float* a, lapack_int* lda,\n                    lapack_complex_float* af, lapack_int* ldaf,\n                    lapack_int* ipiv, const lapack_complex_float* b,\n                    lapack_int* ldb, lapack_complex_float* x, lapack_int* ldx,\n                    float* rcond, float* ferr, float* berr,\n                    lapack_complex_float* work, lapack_int* lwork, float* rwork,\n                    lapack_int *info );\nvoid LAPACK_zsysvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_double* a, lapack_int* lda,\n                    lapack_complex_double* af, lapack_int* ldaf,\n                    lapack_int* ipiv, const lapack_complex_double* b,\n                    lapack_int* ldb, lapack_complex_double* x, lapack_int* ldx,\n                    double* rcond, double* ferr, double* berr,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    double* rwork, lapack_int *info );\nvoid LAPACK_dsysvxx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs,\n                     double* a, lapack_int* lda, double* af, lapack_int* ldaf,\n                     lapack_int* ipiv, char* equed, double* s, double* b,\n                     lapack_int* ldb, double* x, lapack_int* ldx, double* rcond,\n                     double* rpvgrw, double* berr, lapack_int* n_err_bnds,\n                     double* err_bnds_norm, double* err_bnds_comp,\n                     lapack_int* nparams, double* params, double* work,\n                     lapack_int* iwork, lapack_int *info );\nvoid LAPACK_ssysvxx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs,\n                     float* a, lapack_int* lda, float* af, lapack_int* ldaf,\n                     lapack_int* ipiv, char* equed, float* s, float* b,\n                     lapack_int* ldb, float* x, lapack_int* ldx, float* rcond,\n                     float* rpvgrw, float* berr, lapack_int* n_err_bnds,\n                     float* err_bnds_norm, float* err_bnds_comp,\n                     lapack_int* nparams, float* params, float* work,\n                     lapack_int* iwork, lapack_int *info );\nvoid LAPACK_zsysvxx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs,\n                     lapack_complex_double* a, lapack_int* lda,\n                     lapack_complex_double* af, lapack_int* ldaf,\n                     lapack_int* ipiv, char* equed, double* s,\n                     lapack_complex_double* b, lapack_int* ldb,\n                     lapack_complex_double* x, lapack_int* ldx, double* rcond,\n                     double* rpvgrw, double* berr, lapack_int* n_err_bnds,\n                     double* err_bnds_norm, double* err_bnds_comp,\n                     lapack_int* nparams, double* params,\n                     lapack_complex_double* work, double* rwork,\n                     lapack_int *info );\nvoid LAPACK_csysvxx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs,\n                     lapack_complex_float* a, lapack_int* lda,\n                     lapack_complex_float* af, lapack_int* ldaf,\n                     lapack_int* ipiv, char* equed, float* s,\n                     lapack_complex_float* b, lapack_int* ldb,\n                     lapack_complex_float* x, lapack_int* ldx, float* rcond,\n                     float* rpvgrw, float* berr, lapack_int* n_err_bnds,\n                     float* err_bnds_norm, float* err_bnds_comp,\n                     lapack_int* nparams, float* params,\n                     lapack_complex_float* work, float* rwork,\n                     lapack_int *info );\nvoid LAPACK_chesv( char* uplo, lapack_int* n, lapack_int* nrhs,\n                   lapack_complex_float* a, lapack_int* lda, lapack_int* ipiv,\n                   lapack_complex_float* b, lapack_int* ldb,\n                   lapack_complex_float* work, lapack_int* lwork,\n                   lapack_int *info );\nvoid LAPACK_zhesv( char* uplo, lapack_int* n, lapack_int* nrhs,\n                   lapack_complex_double* a, lapack_int* lda, lapack_int* ipiv,\n                   lapack_complex_double* b, lapack_int* ldb,\n                   lapack_complex_double* work, lapack_int* lwork,\n                   lapack_int *info );\nvoid LAPACK_chesvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_float* a, lapack_int* lda,\n                    lapack_complex_float* af, lapack_int* ldaf,\n                    lapack_int* ipiv, const lapack_complex_float* b,\n                    lapack_int* ldb, lapack_complex_float* x, lapack_int* ldx,\n                    float* rcond, float* ferr, float* berr,\n                    lapack_complex_float* work, lapack_int* lwork, float* rwork,\n                    lapack_int *info );\nvoid LAPACK_zhesvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_double* a, lapack_int* lda,\n                    lapack_complex_double* af, lapack_int* ldaf,\n                    lapack_int* ipiv, const lapack_complex_double* b,\n                    lapack_int* ldb, lapack_complex_double* x, lapack_int* ldx,\n                    double* rcond, double* ferr, double* berr,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    double* rwork, lapack_int *info );\nvoid LAPACK_zhesvxx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs,\n                     lapack_complex_double* a, lapack_int* lda,\n                     lapack_complex_double* af, lapack_int* ldaf,\n                     lapack_int* ipiv, char* equed, double* s,\n                     lapack_complex_double* b, lapack_int* ldb,\n                     lapack_complex_double* x, lapack_int* ldx, double* rcond,\n                     double* rpvgrw, double* berr, lapack_int* n_err_bnds,\n                     double* err_bnds_norm, double* err_bnds_comp,\n                     lapack_int* nparams, double* params,\n                     lapack_complex_double* work, double* rwork,\n                     lapack_int *info );\nvoid LAPACK_chesvxx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs,\n                     lapack_complex_float* a, lapack_int* lda,\n                     lapack_complex_float* af, lapack_int* ldaf,\n                     lapack_int* ipiv, char* equed, float* s,\n                     lapack_complex_float* b, lapack_int* ldb,\n                     lapack_complex_float* x, lapack_int* ldx, float* rcond,\n                     float* rpvgrw, float* berr, lapack_int* n_err_bnds,\n                     float* err_bnds_norm, float* err_bnds_comp,\n                     lapack_int* nparams, float* params,\n                     lapack_complex_float* work, float* rwork,\n                     lapack_int *info );\nvoid LAPACK_sspsv( char* uplo, lapack_int* n, lapack_int* nrhs, float* ap,\n                   lapack_int* ipiv, float* b, lapack_int* ldb,\n                   lapack_int *info );\nvoid LAPACK_dspsv( char* uplo, lapack_int* n, lapack_int* nrhs, double* ap,\n                   lapack_int* ipiv, double* b, lapack_int* ldb,\n                   lapack_int *info );\nvoid LAPACK_cspsv( char* uplo, lapack_int* n, lapack_int* nrhs,\n                   lapack_complex_float* ap, lapack_int* ipiv,\n                   lapack_complex_float* b, lapack_int* ldb, lapack_int *info );\nvoid LAPACK_zspsv( char* uplo, lapack_int* n, lapack_int* nrhs,\n                   lapack_complex_double* ap, lapack_int* ipiv,\n                   lapack_complex_double* b, lapack_int* ldb,\n                   lapack_int *info );\nvoid LAPACK_sspsvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const float* ap, float* afp, lapack_int* ipiv,\n                    const float* b, lapack_int* ldb, float* x, lapack_int* ldx,\n                    float* rcond, float* ferr, float* berr, float* work,\n                    lapack_int* iwork, lapack_int *info );\nvoid LAPACK_dspsvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const double* ap, double* afp, lapack_int* ipiv,\n                    const double* b, lapack_int* ldb, double* x,\n                    lapack_int* ldx, double* rcond, double* ferr, double* berr,\n                    double* work, lapack_int* iwork, lapack_int *info );\nvoid LAPACK_cspsvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_float* ap, lapack_complex_float* afp,\n                    lapack_int* ipiv, const lapack_complex_float* b,\n                    lapack_int* ldb, lapack_complex_float* x, lapack_int* ldx,\n                    float* rcond, float* ferr, float* berr,\n                    lapack_complex_float* work, float* rwork,\n                    lapack_int *info );\nvoid LAPACK_zspsvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_double* ap, lapack_complex_double* afp,\n                    lapack_int* ipiv, const lapack_complex_double* b,\n                    lapack_int* ldb, lapack_complex_double* x, lapack_int* ldx,\n                    double* rcond, double* ferr, double* berr,\n                    lapack_complex_double* work, double* rwork,\n                    lapack_int *info );\nvoid LAPACK_chpsv( char* uplo, lapack_int* n, lapack_int* nrhs,\n                   lapack_complex_float* ap, lapack_int* ipiv,\n                   lapack_complex_float* b, lapack_int* ldb, lapack_int *info );\nvoid LAPACK_zhpsv( char* uplo, lapack_int* n, lapack_int* nrhs,\n                   lapack_complex_double* ap, lapack_int* ipiv,\n                   lapack_complex_double* b, lapack_int* ldb,\n                   lapack_int *info );\nvoid LAPACK_chpsvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_float* ap, lapack_complex_float* afp,\n                    lapack_int* ipiv, const lapack_complex_float* b,\n                    lapack_int* ldb, lapack_complex_float* x, lapack_int* ldx,\n                    float* rcond, float* ferr, float* berr,\n                    lapack_complex_float* work, float* rwork,\n                    lapack_int *info );\nvoid LAPACK_zhpsvx( char* fact, char* uplo, lapack_int* n, lapack_int* nrhs,\n                    const lapack_complex_double* ap, lapack_complex_double* afp,\n                    lapack_int* ipiv, const lapack_complex_double* b,\n                    lapack_int* ldb, lapack_complex_double* x, lapack_int* ldx,\n                    double* rcond, double* ferr, double* berr,\n                    lapack_complex_double* work, double* rwork,\n                    lapack_int *info );\nvoid LAPACK_sgeqrf( lapack_int* m, lapack_int* n, float* a, lapack_int* lda,\n                    float* tau, float* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_dgeqrf( lapack_int* m, lapack_int* n, double* a, lapack_int* lda,\n                    double* tau, double* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_cgeqrf( lapack_int* m, lapack_int* n, lapack_complex_float* a,\n                    lapack_int* lda, lapack_complex_float* tau,\n                    lapack_complex_float* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_zgeqrf( lapack_int* m, lapack_int* n, lapack_complex_double* a,\n                    lapack_int* lda, lapack_complex_double* tau,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_sgeqpf( lapack_int* m, lapack_int* n, float* a, lapack_int* lda,\n                    lapack_int* jpvt, float* tau, float* work,\n                    lapack_int *info );\nvoid LAPACK_dgeqpf( lapack_int* m, lapack_int* n, double* a, lapack_int* lda,\n                    lapack_int* jpvt, double* tau, double* work,\n                    lapack_int *info );\nvoid LAPACK_cgeqpf( lapack_int* m, lapack_int* n, lapack_complex_float* a,\n                    lapack_int* lda, lapack_int* jpvt,\n                    lapack_complex_float* tau, lapack_complex_float* work,\n                    float* rwork, lapack_int *info );\nvoid LAPACK_zgeqpf( lapack_int* m, lapack_int* n, lapack_complex_double* a,\n                    lapack_int* lda, lapack_int* jpvt,\n                    lapack_complex_double* tau, lapack_complex_double* work,\n                    double* rwork, lapack_int *info );\nvoid LAPACK_sgeqp3( lapack_int* m, lapack_int* n, float* a, lapack_int* lda,\n                    lapack_int* jpvt, float* tau, float* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_dgeqp3( lapack_int* m, lapack_int* n, double* a, lapack_int* lda,\n                    lapack_int* jpvt, double* tau, double* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_cgeqp3( lapack_int* m, lapack_int* n, lapack_complex_float* a,\n                    lapack_int* lda, lapack_int* jpvt,\n                    lapack_complex_float* tau, lapack_complex_float* work,\n                    lapack_int* lwork, float* rwork, lapack_int *info );\nvoid LAPACK_zgeqp3( lapack_int* m, lapack_int* n, lapack_complex_double* a,\n                    lapack_int* lda, lapack_int* jpvt,\n                    lapack_complex_double* tau, lapack_complex_double* work,\n                    lapack_int* lwork, double* rwork, lapack_int *info );\nvoid LAPACK_sorgqr( lapack_int* m, lapack_int* n, lapack_int* k, float* a,\n                    lapack_int* lda, const float* tau, float* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_dorgqr( lapack_int* m, lapack_int* n, lapack_int* k, double* a,\n                    lapack_int* lda, const double* tau, double* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_sormqr( char* side, char* trans, lapack_int* m, lapack_int* n,\n                    lapack_int* k, const float* a, lapack_int* lda,\n                    const float* tau, float* c, lapack_int* ldc, float* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_dormqr( char* side, char* trans, lapack_int* m, lapack_int* n,\n                    lapack_int* k, const double* a, lapack_int* lda,\n                    const double* tau, double* c, lapack_int* ldc, double* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_cungqr( lapack_int* m, lapack_int* n, lapack_int* k,\n                    lapack_complex_float* a, lapack_int* lda,\n                    const lapack_complex_float* tau, lapack_complex_float* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_zungqr( lapack_int* m, lapack_int* n, lapack_int* k,\n                    lapack_complex_double* a, lapack_int* lda,\n                    const lapack_complex_double* tau,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_cunmqr( char* side, char* trans, lapack_int* m, lapack_int* n,\n                    lapack_int* k, const lapack_complex_float* a,\n                    lapack_int* lda, const lapack_complex_float* tau,\n                    lapack_complex_float* c, lapack_int* ldc,\n                    lapack_complex_float* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_zunmqr( char* side, char* trans, lapack_int* m, lapack_int* n,\n                    lapack_int* k, const lapack_complex_double* a,\n                    lapack_int* lda, const lapack_complex_double* tau,\n                    lapack_complex_double* c, lapack_int* ldc,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_sgelqf( lapack_int* m, lapack_int* n, float* a, lapack_int* lda,\n                    float* tau, float* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_dgelqf( lapack_int* m, lapack_int* n, double* a, lapack_int* lda,\n                    double* tau, double* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_cgelqf( lapack_int* m, lapack_int* n, lapack_complex_float* a,\n                    lapack_int* lda, lapack_complex_float* tau,\n                    lapack_complex_float* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_zgelqf( lapack_int* m, lapack_int* n, lapack_complex_double* a,\n                    lapack_int* lda, lapack_complex_double* tau,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_sorglq( lapack_int* m, lapack_int* n, lapack_int* k, float* a,\n                    lapack_int* lda, const float* tau, float* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_dorglq( lapack_int* m, lapack_int* n, lapack_int* k, double* a,\n                    lapack_int* lda, const double* tau, double* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_sormlq( char* side, char* trans, lapack_int* m, lapack_int* n,\n                    lapack_int* k, const float* a, lapack_int* lda,\n                    const float* tau, float* c, lapack_int* ldc, float* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_dormlq( char* side, char* trans, lapack_int* m, lapack_int* n,\n                    lapack_int* k, const double* a, lapack_int* lda,\n                    const double* tau, double* c, lapack_int* ldc, double* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_cunglq( lapack_int* m, lapack_int* n, lapack_int* k,\n                    lapack_complex_float* a, lapack_int* lda,\n                    const lapack_complex_float* tau, lapack_complex_float* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_zunglq( lapack_int* m, lapack_int* n, lapack_int* k,\n                    lapack_complex_double* a, lapack_int* lda,\n                    const lapack_complex_double* tau,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_cunmlq( char* side, char* trans, lapack_int* m, lapack_int* n,\n                    lapack_int* k, const lapack_complex_float* a,\n                    lapack_int* lda, const lapack_complex_float* tau,\n                    lapack_complex_float* c, lapack_int* ldc,\n                    lapack_complex_float* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_zunmlq( char* side, char* trans, lapack_int* m, lapack_int* n,\n                    lapack_int* k, const lapack_complex_double* a,\n                    lapack_int* lda, const lapack_complex_double* tau,\n                    lapack_complex_double* c, lapack_int* ldc,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_sgeqlf( lapack_int* m, lapack_int* n, float* a, lapack_int* lda,\n                    float* tau, float* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_dgeqlf( lapack_int* m, lapack_int* n, double* a, lapack_int* lda,\n                    double* tau, double* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_cgeqlf( lapack_int* m, lapack_int* n, lapack_complex_float* a,\n                    lapack_int* lda, lapack_complex_float* tau,\n                    lapack_complex_float* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_zgeqlf( lapack_int* m, lapack_int* n, lapack_complex_double* a,\n                    lapack_int* lda, lapack_complex_double* tau,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_sorgql( lapack_int* m, lapack_int* n, lapack_int* k, float* a,\n                    lapack_int* lda, const float* tau, float* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_dorgql( lapack_int* m, lapack_int* n, lapack_int* k, double* a,\n                    lapack_int* lda, const double* tau, double* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_cungql( lapack_int* m, lapack_int* n, lapack_int* k,\n                    lapack_complex_float* a, lapack_int* lda,\n                    const lapack_complex_float* tau, lapack_complex_float* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_zungql( lapack_int* m, lapack_int* n, lapack_int* k,\n                    lapack_complex_double* a, lapack_int* lda,\n                    const lapack_complex_double* tau,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_sormql( char* side, char* trans, lapack_int* m, lapack_int* n,\n                    lapack_int* k, const float* a, lapack_int* lda,\n                    const float* tau, float* c, lapack_int* ldc, float* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_dormql( char* side, char* trans, lapack_int* m, lapack_int* n,\n                    lapack_int* k, const double* a, lapack_int* lda,\n                    const double* tau, double* c, lapack_int* ldc, double* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_cunmql( char* side, char* trans, lapack_int* m, lapack_int* n,\n                    lapack_int* k, const lapack_complex_float* a,\n                    lapack_int* lda, const lapack_complex_float* tau,\n                    lapack_complex_float* c, lapack_int* ldc,\n                    lapack_complex_float* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_zunmql( char* side, char* trans, lapack_int* m, lapack_int* n,\n                    lapack_int* k, const lapack_complex_double* a,\n                    lapack_int* lda, const lapack_complex_double* tau,\n                    lapack_complex_double* c, lapack_int* ldc,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_sgerqf( lapack_int* m, lapack_int* n, float* a, lapack_int* lda,\n                    float* tau, float* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_dgerqf( lapack_int* m, lapack_int* n, double* a, lapack_int* lda,\n                    double* tau, double* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_cgerqf( lapack_int* m, lapack_int* n, lapack_complex_float* a,\n                    lapack_int* lda, lapack_complex_float* tau,\n                    lapack_complex_float* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_zgerqf( lapack_int* m, lapack_int* n, lapack_complex_double* a,\n                    lapack_int* lda, lapack_complex_double* tau,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_sorgrq( lapack_int* m, lapack_int* n, lapack_int* k, float* a,\n                    lapack_int* lda, const float* tau, float* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_dorgrq( lapack_int* m, lapack_int* n, lapack_int* k, double* a,\n                    lapack_int* lda, const double* tau, double* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_cungrq( lapack_int* m, lapack_int* n, lapack_int* k,\n                    lapack_complex_float* a, lapack_int* lda,\n                    const lapack_complex_float* tau, lapack_complex_float* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_zungrq( lapack_int* m, lapack_int* n, lapack_int* k,\n                    lapack_complex_double* a, lapack_int* lda,\n                    const lapack_complex_double* tau,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_sormrq( char* side, char* trans, lapack_int* m, lapack_int* n,\n                    lapack_int* k, const float* a, lapack_int* lda,\n                    const float* tau, float* c, lapack_int* ldc, float* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_dormrq( char* side, char* trans, lapack_int* m, lapack_int* n,\n                    lapack_int* k, const double* a, lapack_int* lda,\n                    const double* tau, double* c, lapack_int* ldc, double* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_cunmrq( char* side, char* trans, lapack_int* m, lapack_int* n,\n                    lapack_int* k, const lapack_complex_float* a,\n                    lapack_int* lda, const lapack_complex_float* tau,\n                    lapack_complex_float* c, lapack_int* ldc,\n                    lapack_complex_float* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_zunmrq( char* side, char* trans, lapack_int* m, lapack_int* n,\n                    lapack_int* k, const lapack_complex_double* a,\n                    lapack_int* lda, const lapack_complex_double* tau,\n                    lapack_complex_double* c, lapack_int* ldc,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_stzrzf( lapack_int* m, lapack_int* n, float* a, lapack_int* lda,\n                    float* tau, float* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_dtzrzf( lapack_int* m, lapack_int* n, double* a, lapack_int* lda,\n                    double* tau, double* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_ctzrzf( lapack_int* m, lapack_int* n, lapack_complex_float* a,\n                    lapack_int* lda, lapack_complex_float* tau,\n                    lapack_complex_float* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_ztzrzf( lapack_int* m, lapack_int* n, lapack_complex_double* a,\n                    lapack_int* lda, lapack_complex_double* tau,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_sormrz( char* side, char* trans, lapack_int* m, lapack_int* n,\n                    lapack_int* k, lapack_int* l, const float* a,\n                    lapack_int* lda, const float* tau, float* c,\n                    lapack_int* ldc, float* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_dormrz( char* side, char* trans, lapack_int* m, lapack_int* n,\n                    lapack_int* k, lapack_int* l, const double* a,\n                    lapack_int* lda, const double* tau, double* c,\n                    lapack_int* ldc, double* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_cunmrz( char* side, char* trans, lapack_int* m, lapack_int* n,\n                    lapack_int* k, lapack_int* l, const lapack_complex_float* a,\n                    lapack_int* lda, const lapack_complex_float* tau,\n                    lapack_complex_float* c, lapack_int* ldc,\n                    lapack_complex_float* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_zunmrz( char* side, char* trans, lapack_int* m, lapack_int* n,\n                    lapack_int* k, lapack_int* l,\n                    const lapack_complex_double* a, lapack_int* lda,\n                    const lapack_complex_double* tau, lapack_complex_double* c,\n                    lapack_int* ldc, lapack_complex_double* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_sggqrf( lapack_int* n, lapack_int* m, lapack_int* p, float* a,\n                    lapack_int* lda, float* taua, float* b, lapack_int* ldb,\n                    float* taub, float* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_dggqrf( lapack_int* n, lapack_int* m, lapack_int* p, double* a,\n                    lapack_int* lda, double* taua, double* b, lapack_int* ldb,\n                    double* taub, double* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_cggqrf( lapack_int* n, lapack_int* m, lapack_int* p,\n                    lapack_complex_float* a, lapack_int* lda,\n                    lapack_complex_float* taua, lapack_complex_float* b,\n                    lapack_int* ldb, lapack_complex_float* taub,\n                    lapack_complex_float* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_zggqrf( lapack_int* n, lapack_int* m, lapack_int* p,\n                    lapack_complex_double* a, lapack_int* lda,\n                    lapack_complex_double* taua, lapack_complex_double* b,\n                    lapack_int* ldb, lapack_complex_double* taub,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_sggrqf( lapack_int* m, lapack_int* p, lapack_int* n, float* a,\n                    lapack_int* lda, float* taua, float* b, lapack_int* ldb,\n                    float* taub, float* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_dggrqf( lapack_int* m, lapack_int* p, lapack_int* n, double* a,\n                    lapack_int* lda, double* taua, double* b, lapack_int* ldb,\n                    double* taub, double* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_cggrqf( lapack_int* m, lapack_int* p, lapack_int* n,\n                    lapack_complex_float* a, lapack_int* lda,\n                    lapack_complex_float* taua, lapack_complex_float* b,\n                    lapack_int* ldb, lapack_complex_float* taub,\n                    lapack_complex_float* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_zggrqf( lapack_int* m, lapack_int* p, lapack_int* n,\n                    lapack_complex_double* a, lapack_int* lda,\n                    lapack_complex_double* taua, lapack_complex_double* b,\n                    lapack_int* ldb, lapack_complex_double* taub,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_sgebrd( lapack_int* m, lapack_int* n, float* a, lapack_int* lda,\n                    float* d, float* e, float* tauq, float* taup, float* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_dgebrd( lapack_int* m, lapack_int* n, double* a, lapack_int* lda,\n                    double* d, double* e, double* tauq, double* taup,\n                    double* work, lapack_int* lwork, lapack_int *info );\nvoid LAPACK_cgebrd( lapack_int* m, lapack_int* n, lapack_complex_float* a,\n                    lapack_int* lda, float* d, float* e,\n                    lapack_complex_float* tauq, lapack_complex_float* taup,\n                    lapack_complex_float* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_zgebrd( lapack_int* m, lapack_int* n, lapack_complex_double* a,\n                    lapack_int* lda, double* d, double* e,\n                    lapack_complex_double* tauq, lapack_complex_double* taup,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_sgbbrd( char* vect, lapack_int* m, lapack_int* n, lapack_int* ncc,\n                    lapack_int* kl, lapack_int* ku, float* ab, lapack_int* ldab,\n                    float* d, float* e, float* q, lapack_int* ldq, float* pt,\n                    lapack_int* ldpt, float* c, lapack_int* ldc, float* work,\n                    lapack_int *info );\nvoid LAPACK_dgbbrd( char* vect, lapack_int* m, lapack_int* n, lapack_int* ncc,\n                    lapack_int* kl, lapack_int* ku, double* ab,\n                    lapack_int* ldab, double* d, double* e, double* q,\n                    lapack_int* ldq, double* pt, lapack_int* ldpt, double* c,\n                    lapack_int* ldc, double* work, lapack_int *info );\nvoid LAPACK_cgbbrd( char* vect, lapack_int* m, lapack_int* n, lapack_int* ncc,\n                    lapack_int* kl, lapack_int* ku, lapack_complex_float* ab,\n                    lapack_int* ldab, float* d, float* e,\n                    lapack_complex_float* q, lapack_int* ldq,\n                    lapack_complex_float* pt, lapack_int* ldpt,\n                    lapack_complex_float* c, lapack_int* ldc,\n                    lapack_complex_float* work, float* rwork,\n                    lapack_int *info );\nvoid LAPACK_zgbbrd( char* vect, lapack_int* m, lapack_int* n, lapack_int* ncc,\n                    lapack_int* kl, lapack_int* ku, lapack_complex_double* ab,\n                    lapack_int* ldab, double* d, double* e,\n                    lapack_complex_double* q, lapack_int* ldq,\n                    lapack_complex_double* pt, lapack_int* ldpt,\n                    lapack_complex_double* c, lapack_int* ldc,\n                    lapack_complex_double* work, double* rwork,\n                    lapack_int *info );\nvoid LAPACK_sorgbr( char* vect, lapack_int* m, lapack_int* n, lapack_int* k,\n                    float* a, lapack_int* lda, const float* tau, float* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_dorgbr( char* vect, lapack_int* m, lapack_int* n, lapack_int* k,\n                    double* a, lapack_int* lda, const double* tau, double* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_sormbr( char* vect, char* side, char* trans, lapack_int* m,\n                    lapack_int* n, lapack_int* k, const float* a,\n                    lapack_int* lda, const float* tau, float* c,\n                    lapack_int* ldc, float* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_dormbr( char* vect, char* side, char* trans, lapack_int* m,\n                    lapack_int* n, lapack_int* k, const double* a,\n                    lapack_int* lda, const double* tau, double* c,\n                    lapack_int* ldc, double* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_cungbr( char* vect, lapack_int* m, lapack_int* n, lapack_int* k,\n                    lapack_complex_float* a, lapack_int* lda,\n                    const lapack_complex_float* tau, lapack_complex_float* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_zungbr( char* vect, lapack_int* m, lapack_int* n, lapack_int* k,\n                    lapack_complex_double* a, lapack_int* lda,\n                    const lapack_complex_double* tau,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_cunmbr( char* vect, char* side, char* trans, lapack_int* m,\n                    lapack_int* n, lapack_int* k, const lapack_complex_float* a,\n                    lapack_int* lda, const lapack_complex_float* tau,\n                    lapack_complex_float* c, lapack_int* ldc,\n                    lapack_complex_float* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_zunmbr( char* vect, char* side, char* trans, lapack_int* m,\n                    lapack_int* n, lapack_int* k,\n                    const lapack_complex_double* a, lapack_int* lda,\n                    const lapack_complex_double* tau, lapack_complex_double* c,\n                    lapack_int* ldc, lapack_complex_double* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_sbdsqr( char* uplo, lapack_int* n, lapack_int* ncvt,\n                    lapack_int* nru, lapack_int* ncc, float* d, float* e,\n                    float* vt, lapack_int* ldvt, float* u, lapack_int* ldu,\n                    float* c, lapack_int* ldc, float* work, lapack_int *info );\nvoid LAPACK_dbdsqr( char* uplo, lapack_int* n, lapack_int* ncvt,\n                    lapack_int* nru, lapack_int* ncc, double* d, double* e,\n                    double* vt, lapack_int* ldvt, double* u, lapack_int* ldu,\n                    double* c, lapack_int* ldc, double* work,\n                    lapack_int *info );\nvoid LAPACK_cbdsqr( char* uplo, lapack_int* n, lapack_int* ncvt,\n                    lapack_int* nru, lapack_int* ncc, float* d, float* e,\n                    lapack_complex_float* vt, lapack_int* ldvt,\n                    lapack_complex_float* u, lapack_int* ldu,\n                    lapack_complex_float* c, lapack_int* ldc, float* work,\n                    lapack_int *info );\nvoid LAPACK_zbdsqr( char* uplo, lapack_int* n, lapack_int* ncvt,\n                    lapack_int* nru, lapack_int* ncc, double* d, double* e,\n                    lapack_complex_double* vt, lapack_int* ldvt,\n                    lapack_complex_double* u, lapack_int* ldu,\n                    lapack_complex_double* c, lapack_int* ldc, double* work,\n                    lapack_int *info );\nvoid LAPACK_sbdsdc( char* uplo, char* compq, lapack_int* n, float* d, float* e,\n                    float* u, lapack_int* ldu, float* vt, lapack_int* ldvt,\n                    float* q, lapack_int* iq, float* work, lapack_int* iwork,\n                    lapack_int *info );\nvoid LAPACK_dbdsdc( char* uplo, char* compq, lapack_int* n, double* d,\n                    double* e, double* u, lapack_int* ldu, double* vt,\n                    lapack_int* ldvt, double* q, lapack_int* iq, double* work,\n                    lapack_int* iwork, lapack_int *info );\nvoid LAPACK_ssytrd( char* uplo, lapack_int* n, float* a, lapack_int* lda,\n                    float* d, float* e, float* tau, float* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_dsytrd( char* uplo, lapack_int* n, double* a, lapack_int* lda,\n                    double* d, double* e, double* tau, double* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_sorgtr( char* uplo, lapack_int* n, float* a, lapack_int* lda,\n                    const float* tau, float* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_dorgtr( char* uplo, lapack_int* n, double* a, lapack_int* lda,\n                    const double* tau, double* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_sormtr( char* side, char* uplo, char* trans, lapack_int* m,\n                    lapack_int* n, const float* a, lapack_int* lda,\n                    const float* tau, float* c, lapack_int* ldc, float* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_dormtr( char* side, char* uplo, char* trans, lapack_int* m,\n                    lapack_int* n, const double* a, lapack_int* lda,\n                    const double* tau, double* c, lapack_int* ldc, double* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_chetrd( char* uplo, lapack_int* n, lapack_complex_float* a,\n                    lapack_int* lda, float* d, float* e,\n                    lapack_complex_float* tau, lapack_complex_float* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_zhetrd( char* uplo, lapack_int* n, lapack_complex_double* a,\n                    lapack_int* lda, double* d, double* e,\n                    lapack_complex_double* tau, lapack_complex_double* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_cungtr( char* uplo, lapack_int* n, lapack_complex_float* a,\n                    lapack_int* lda, const lapack_complex_float* tau,\n                    lapack_complex_float* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_zungtr( char* uplo, lapack_int* n, lapack_complex_double* a,\n                    lapack_int* lda, const lapack_complex_double* tau,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_cunmtr( char* side, char* uplo, char* trans, lapack_int* m,\n                    lapack_int* n, const lapack_complex_float* a,\n                    lapack_int* lda, const lapack_complex_float* tau,\n                    lapack_complex_float* c, lapack_int* ldc,\n                    lapack_complex_float* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_zunmtr( char* side, char* uplo, char* trans, lapack_int* m,\n                    lapack_int* n, const lapack_complex_double* a,\n                    lapack_int* lda, const lapack_complex_double* tau,\n                    lapack_complex_double* c, lapack_int* ldc,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_ssptrd( char* uplo, lapack_int* n, float* ap, float* d, float* e,\n                    float* tau, lapack_int *info );\nvoid LAPACK_dsptrd( char* uplo, lapack_int* n, double* ap, double* d, double* e,\n                    double* tau, lapack_int *info );\nvoid LAPACK_sopgtr( char* uplo, lapack_int* n, const float* ap,\n                    const float* tau, float* q, lapack_int* ldq, float* work,\n                    lapack_int *info );\nvoid LAPACK_dopgtr( char* uplo, lapack_int* n, const double* ap,\n                    const double* tau, double* q, lapack_int* ldq, double* work,\n                    lapack_int *info );\nvoid LAPACK_sopmtr( char* side, char* uplo, char* trans, lapack_int* m,\n                    lapack_int* n, const float* ap, const float* tau, float* c,\n                    lapack_int* ldc, float* work, lapack_int *info );\nvoid LAPACK_dopmtr( char* side, char* uplo, char* trans, lapack_int* m,\n                    lapack_int* n, const double* ap, const double* tau,\n                    double* c, lapack_int* ldc, double* work,\n                    lapack_int *info );\nvoid LAPACK_chptrd( char* uplo, lapack_int* n, lapack_complex_float* ap,\n                    float* d, float* e, lapack_complex_float* tau,\n                    lapack_int *info );\nvoid LAPACK_zhptrd( char* uplo, lapack_int* n, lapack_complex_double* ap,\n                    double* d, double* e, lapack_complex_double* tau,\n                    lapack_int *info );\nvoid LAPACK_cupgtr( char* uplo, lapack_int* n, const lapack_complex_float* ap,\n                    const lapack_complex_float* tau, lapack_complex_float* q,\n                    lapack_int* ldq, lapack_complex_float* work,\n                    lapack_int *info );\nvoid LAPACK_zupgtr( char* uplo, lapack_int* n, const lapack_complex_double* ap,\n                    const lapack_complex_double* tau, lapack_complex_double* q,\n                    lapack_int* ldq, lapack_complex_double* work,\n                    lapack_int *info );\nvoid LAPACK_cupmtr( char* side, char* uplo, char* trans, lapack_int* m,\n                    lapack_int* n, const lapack_complex_float* ap,\n                    const lapack_complex_float* tau, lapack_complex_float* c,\n                    lapack_int* ldc, lapack_complex_float* work,\n                    lapack_int *info );\nvoid LAPACK_zupmtr( char* side, char* uplo, char* trans, lapack_int* m,\n                    lapack_int* n, const lapack_complex_double* ap,\n                    const lapack_complex_double* tau, lapack_complex_double* c,\n                    lapack_int* ldc, lapack_complex_double* work,\n                    lapack_int *info );\nvoid LAPACK_ssbtrd( char* vect, char* uplo, lapack_int* n, lapack_int* kd,\n                    float* ab, lapack_int* ldab, float* d, float* e, float* q,\n                    lapack_int* ldq, float* work, lapack_int *info );\nvoid LAPACK_dsbtrd( char* vect, char* uplo, lapack_int* n, lapack_int* kd,\n                    double* ab, lapack_int* ldab, double* d, double* e,\n                    double* q, lapack_int* ldq, double* work,\n                    lapack_int *info );\nvoid LAPACK_chbtrd( char* vect, char* uplo, lapack_int* n, lapack_int* kd,\n                    lapack_complex_float* ab, lapack_int* ldab, float* d,\n                    float* e, lapack_complex_float* q, lapack_int* ldq,\n                    lapack_complex_float* work, lapack_int *info );\nvoid LAPACK_zhbtrd( char* vect, char* uplo, lapack_int* n, lapack_int* kd,\n                    lapack_complex_double* ab, lapack_int* ldab, double* d,\n                    double* e, lapack_complex_double* q, lapack_int* ldq,\n                    lapack_complex_double* work, lapack_int *info );\nvoid LAPACK_ssterf( lapack_int* n, float* d, float* e, lapack_int *info );\nvoid LAPACK_dsterf( lapack_int* n, double* d, double* e, lapack_int *info );\nvoid LAPACK_ssteqr( char* compz, lapack_int* n, float* d, float* e, float* z,\n                    lapack_int* ldz, float* work, lapack_int *info );\nvoid LAPACK_dsteqr( char* compz, lapack_int* n, double* d, double* e, double* z,\n                    lapack_int* ldz, double* work, lapack_int *info );\nvoid LAPACK_csteqr( char* compz, lapack_int* n, float* d, float* e,\n                    lapack_complex_float* z, lapack_int* ldz, float* work,\n                    lapack_int *info );\nvoid LAPACK_zsteqr( char* compz, lapack_int* n, double* d, double* e,\n                    lapack_complex_double* z, lapack_int* ldz, double* work,\n                    lapack_int *info );\nvoid LAPACK_sstemr( char* jobz, char* range, lapack_int* n, float* d, float* e,\n                    float* vl, float* vu, lapack_int* il, lapack_int* iu,\n                    lapack_int* m, float* w, float* z, lapack_int* ldz,\n                    lapack_int* nzc, lapack_int* isuppz, lapack_logical* tryrac,\n                    float* work, lapack_int* lwork, lapack_int* iwork,\n                    lapack_int* liwork, lapack_int *info );\nvoid LAPACK_dstemr( char* jobz, char* range, lapack_int* n, double* d,\n                    double* e, double* vl, double* vu, lapack_int* il,\n                    lapack_int* iu, lapack_int* m, double* w, double* z,\n                    lapack_int* ldz, lapack_int* nzc, lapack_int* isuppz,\n                    lapack_logical* tryrac, double* work, lapack_int* lwork,\n                    lapack_int* iwork, lapack_int* liwork, lapack_int *info );\nvoid LAPACK_cstemr( char* jobz, char* range, lapack_int* n, float* d, float* e,\n                    float* vl, float* vu, lapack_int* il, lapack_int* iu,\n                    lapack_int* m, float* w, lapack_complex_float* z,\n                    lapack_int* ldz, lapack_int* nzc, lapack_int* isuppz,\n                    lapack_logical* tryrac, float* work, lapack_int* lwork,\n                    lapack_int* iwork, lapack_int* liwork, lapack_int *info );\nvoid LAPACK_zstemr( char* jobz, char* range, lapack_int* n, double* d,\n                    double* e, double* vl, double* vu, lapack_int* il,\n                    lapack_int* iu, lapack_int* m, double* w,\n                    lapack_complex_double* z, lapack_int* ldz, lapack_int* nzc,\n                    lapack_int* isuppz, lapack_logical* tryrac, double* work,\n                    lapack_int* lwork, lapack_int* iwork, lapack_int* liwork,\n                    lapack_int *info );\nvoid LAPACK_sstedc( char* compz, lapack_int* n, float* d, float* e, float* z,\n                    lapack_int* ldz, float* work, lapack_int* lwork,\n                    lapack_int* iwork, lapack_int* liwork, lapack_int *info );\nvoid LAPACK_dstedc( char* compz, lapack_int* n, double* d, double* e, double* z,\n                    lapack_int* ldz, double* work, lapack_int* lwork,\n                    lapack_int* iwork, lapack_int* liwork, lapack_int *info );\nvoid LAPACK_cstedc( char* compz, lapack_int* n, float* d, float* e,\n                    lapack_complex_float* z, lapack_int* ldz,\n                    lapack_complex_float* work, lapack_int* lwork, float* rwork,\n                    lapack_int* lrwork, lapack_int* iwork, lapack_int* liwork,\n                    lapack_int *info );\nvoid LAPACK_zstedc( char* compz, lapack_int* n, double* d, double* e,\n                    lapack_complex_double* z, lapack_int* ldz,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    double* rwork, lapack_int* lrwork, lapack_int* iwork,\n                    lapack_int* liwork, lapack_int *info );\nvoid LAPACK_sstegr( char* jobz, char* range, lapack_int* n, float* d, float* e,\n                    float* vl, float* vu, lapack_int* il, lapack_int* iu,\n                    float* abstol, lapack_int* m, float* w, float* z,\n                    lapack_int* ldz, lapack_int* isuppz, float* work,\n                    lapack_int* lwork, lapack_int* iwork, lapack_int* liwork,\n                    lapack_int *info );\nvoid LAPACK_dstegr( char* jobz, char* range, lapack_int* n, double* d,\n                    double* e, double* vl, double* vu, lapack_int* il,\n                    lapack_int* iu, double* abstol, lapack_int* m, double* w,\n                    double* z, lapack_int* ldz, lapack_int* isuppz,\n                    double* work, lapack_int* lwork, lapack_int* iwork,\n                    lapack_int* liwork, lapack_int *info );\nvoid LAPACK_cstegr( char* jobz, char* range, lapack_int* n, float* d, float* e,\n                    float* vl, float* vu, lapack_int* il, lapack_int* iu,\n                    float* abstol, lapack_int* m, float* w,\n                    lapack_complex_float* z, lapack_int* ldz,\n                    lapack_int* isuppz, float* work, lapack_int* lwork,\n                    lapack_int* iwork, lapack_int* liwork, lapack_int *info );\nvoid LAPACK_zstegr( char* jobz, char* range, lapack_int* n, double* d,\n                    double* e, double* vl, double* vu, lapack_int* il,\n                    lapack_int* iu, double* abstol, lapack_int* m, double* w,\n                    lapack_complex_double* z, lapack_int* ldz,\n                    lapack_int* isuppz, double* work, lapack_int* lwork,\n                    lapack_int* iwork, lapack_int* liwork, lapack_int *info );\nvoid LAPACK_spteqr( char* compz, lapack_int* n, float* d, float* e, float* z,\n                    lapack_int* ldz, float* work, lapack_int *info );\nvoid LAPACK_dpteqr( char* compz, lapack_int* n, double* d, double* e, double* z,\n                    lapack_int* ldz, double* work, lapack_int *info );\nvoid LAPACK_cpteqr( char* compz, lapack_int* n, float* d, float* e,\n                    lapack_complex_float* z, lapack_int* ldz, float* work,\n                    lapack_int *info );\nvoid LAPACK_zpteqr( char* compz, lapack_int* n, double* d, double* e,\n                    lapack_complex_double* z, lapack_int* ldz, double* work,\n                    lapack_int *info );\nvoid LAPACK_sstebz( char* range, char* order, lapack_int* n, float* vl,\n                    float* vu, lapack_int* il, lapack_int* iu, float* abstol,\n                    const float* d, const float* e, lapack_int* m,\n                    lapack_int* nsplit, float* w, lapack_int* iblock,\n                    lapack_int* isplit, float* work, lapack_int* iwork,\n                    lapack_int *info );\nvoid LAPACK_dstebz( char* range, char* order, lapack_int* n, double* vl,\n                    double* vu, lapack_int* il, lapack_int* iu, double* abstol,\n                    const double* d, const double* e, lapack_int* m,\n                    lapack_int* nsplit, double* w, lapack_int* iblock,\n                    lapack_int* isplit, double* work, lapack_int* iwork,\n                    lapack_int *info );\nvoid LAPACK_sstein( lapack_int* n, const float* d, const float* e,\n                    lapack_int* m, const float* w, const lapack_int* iblock,\n                    const lapack_int* isplit, float* z, lapack_int* ldz,\n                    float* work, lapack_int* iwork, lapack_int* ifailv,\n                    lapack_int *info );\nvoid LAPACK_dstein( lapack_int* n, const double* d, const double* e,\n                    lapack_int* m, const double* w, const lapack_int* iblock,\n                    const lapack_int* isplit, double* z, lapack_int* ldz,\n                    double* work, lapack_int* iwork, lapack_int* ifailv,\n                    lapack_int *info );\nvoid LAPACK_cstein( lapack_int* n, const float* d, const float* e,\n                    lapack_int* m, const float* w, const lapack_int* iblock,\n                    const lapack_int* isplit, lapack_complex_float* z,\n                    lapack_int* ldz, float* work, lapack_int* iwork,\n                    lapack_int* ifailv, lapack_int *info );\nvoid LAPACK_zstein( lapack_int* n, const double* d, const double* e,\n                    lapack_int* m, const double* w, const lapack_int* iblock,\n                    const lapack_int* isplit, lapack_complex_double* z,\n                    lapack_int* ldz, double* work, lapack_int* iwork,\n                    lapack_int* ifailv, lapack_int *info );\nvoid LAPACK_sdisna( char* job, lapack_int* m, lapack_int* n, const float* d,\n                    float* sep, lapack_int *info );\nvoid LAPACK_ddisna( char* job, lapack_int* m, lapack_int* n, const double* d,\n                    double* sep, lapack_int *info );\nvoid LAPACK_ssygst( lapack_int* itype, char* uplo, lapack_int* n, float* a,\n                    lapack_int* lda, const float* b, lapack_int* ldb,\n                    lapack_int *info );\nvoid LAPACK_dsygst( lapack_int* itype, char* uplo, lapack_int* n, double* a,\n                    lapack_int* lda, const double* b, lapack_int* ldb,\n                    lapack_int *info );\nvoid LAPACK_chegst( lapack_int* itype, char* uplo, lapack_int* n,\n                    lapack_complex_float* a, lapack_int* lda,\n                    const lapack_complex_float* b, lapack_int* ldb,\n                    lapack_int *info );\nvoid LAPACK_zhegst( lapack_int* itype, char* uplo, lapack_int* n,\n                    lapack_complex_double* a, lapack_int* lda,\n                    const lapack_complex_double* b, lapack_int* ldb,\n                    lapack_int *info );\nvoid LAPACK_sspgst( lapack_int* itype, char* uplo, lapack_int* n, float* ap,\n                    const float* bp, lapack_int *info );\nvoid LAPACK_dspgst( lapack_int* itype, char* uplo, lapack_int* n, double* ap,\n                    const double* bp, lapack_int *info );\nvoid LAPACK_chpgst( lapack_int* itype, char* uplo, lapack_int* n,\n                    lapack_complex_float* ap, const lapack_complex_float* bp,\n                    lapack_int *info );\nvoid LAPACK_zhpgst( lapack_int* itype, char* uplo, lapack_int* n,\n                    lapack_complex_double* ap, const lapack_complex_double* bp,\n                    lapack_int *info );\nvoid LAPACK_ssbgst( char* vect, char* uplo, lapack_int* n, lapack_int* ka,\n                    lapack_int* kb, float* ab, lapack_int* ldab,\n                    const float* bb, lapack_int* ldbb, float* x,\n                    lapack_int* ldx, float* work, lapack_int *info );\nvoid LAPACK_dsbgst( char* vect, char* uplo, lapack_int* n, lapack_int* ka,\n                    lapack_int* kb, double* ab, lapack_int* ldab,\n                    const double* bb, lapack_int* ldbb, double* x,\n                    lapack_int* ldx, double* work, lapack_int *info );\nvoid LAPACK_chbgst( char* vect, char* uplo, lapack_int* n, lapack_int* ka,\n                    lapack_int* kb, lapack_complex_float* ab, lapack_int* ldab,\n                    const lapack_complex_float* bb, lapack_int* ldbb,\n                    lapack_complex_float* x, lapack_int* ldx,\n                    lapack_complex_float* work, float* rwork,\n                    lapack_int *info );\nvoid LAPACK_zhbgst( char* vect, char* uplo, lapack_int* n, lapack_int* ka,\n                    lapack_int* kb, lapack_complex_double* ab, lapack_int* ldab,\n                    const lapack_complex_double* bb, lapack_int* ldbb,\n                    lapack_complex_double* x, lapack_int* ldx,\n                    lapack_complex_double* work, double* rwork,\n                    lapack_int *info );\nvoid LAPACK_spbstf( char* uplo, lapack_int* n, lapack_int* kb, float* bb,\n                    lapack_int* ldbb, lapack_int *info );\nvoid LAPACK_dpbstf( char* uplo, lapack_int* n, lapack_int* kb, double* bb,\n                    lapack_int* ldbb, lapack_int *info );\nvoid LAPACK_cpbstf( char* uplo, lapack_int* n, lapack_int* kb,\n                    lapack_complex_float* bb, lapack_int* ldbb,\n                    lapack_int *info );\nvoid LAPACK_zpbstf( char* uplo, lapack_int* n, lapack_int* kb,\n                    lapack_complex_double* bb, lapack_int* ldbb,\n                    lapack_int *info );\nvoid LAPACK_sgehrd( lapack_int* n, lapack_int* ilo, lapack_int* ihi, float* a,\n                    lapack_int* lda, float* tau, float* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_dgehrd( lapack_int* n, lapack_int* ilo, lapack_int* ihi, double* a,\n                    lapack_int* lda, double* tau, double* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_cgehrd( lapack_int* n, lapack_int* ilo, lapack_int* ihi,\n                    lapack_complex_float* a, lapack_int* lda,\n                    lapack_complex_float* tau, lapack_complex_float* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_zgehrd( lapack_int* n, lapack_int* ilo, lapack_int* ihi,\n                    lapack_complex_double* a, lapack_int* lda,\n                    lapack_complex_double* tau, lapack_complex_double* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_sorghr( lapack_int* n, lapack_int* ilo, lapack_int* ihi, float* a,\n                    lapack_int* lda, const float* tau, float* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_dorghr( lapack_int* n, lapack_int* ilo, lapack_int* ihi, double* a,\n                    lapack_int* lda, const double* tau, double* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_sormhr( char* side, char* trans, lapack_int* m, lapack_int* n,\n                    lapack_int* ilo, lapack_int* ihi, const float* a,\n                    lapack_int* lda, const float* tau, float* c,\n                    lapack_int* ldc, float* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_dormhr( char* side, char* trans, lapack_int* m, lapack_int* n,\n                    lapack_int* ilo, lapack_int* ihi, const double* a,\n                    lapack_int* lda, const double* tau, double* c,\n                    lapack_int* ldc, double* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_cunghr( lapack_int* n, lapack_int* ilo, lapack_int* ihi,\n                    lapack_complex_float* a, lapack_int* lda,\n                    const lapack_complex_float* tau, lapack_complex_float* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_zunghr( lapack_int* n, lapack_int* ilo, lapack_int* ihi,\n                    lapack_complex_double* a, lapack_int* lda,\n                    const lapack_complex_double* tau,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_cunmhr( char* side, char* trans, lapack_int* m, lapack_int* n,\n                    lapack_int* ilo, lapack_int* ihi,\n                    const lapack_complex_float* a, lapack_int* lda,\n                    const lapack_complex_float* tau, lapack_complex_float* c,\n                    lapack_int* ldc, lapack_complex_float* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_zunmhr( char* side, char* trans, lapack_int* m, lapack_int* n,\n                    lapack_int* ilo, lapack_int* ihi,\n                    const lapack_complex_double* a, lapack_int* lda,\n                    const lapack_complex_double* tau, lapack_complex_double* c,\n                    lapack_int* ldc, lapack_complex_double* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_sgebal( char* job, lapack_int* n, float* a, lapack_int* lda,\n                    lapack_int* ilo, lapack_int* ihi, float* scale,\n                    lapack_int *info );\nvoid LAPACK_dgebal( char* job, lapack_int* n, double* a, lapack_int* lda,\n                    lapack_int* ilo, lapack_int* ihi, double* scale,\n                    lapack_int *info );\nvoid LAPACK_cgebal( char* job, lapack_int* n, lapack_complex_float* a,\n                    lapack_int* lda, lapack_int* ilo, lapack_int* ihi,\n                    float* scale, lapack_int *info );\nvoid LAPACK_zgebal( char* job, lapack_int* n, lapack_complex_double* a,\n                    lapack_int* lda, lapack_int* ilo, lapack_int* ihi,\n                    double* scale, lapack_int *info );\nvoid LAPACK_sgebak( char* job, char* side, lapack_int* n, lapack_int* ilo,\n                    lapack_int* ihi, const float* scale, lapack_int* m,\n                    float* v, lapack_int* ldv, lapack_int *info );\nvoid LAPACK_dgebak( char* job, char* side, lapack_int* n, lapack_int* ilo,\n                    lapack_int* ihi, const double* scale, lapack_int* m,\n                    double* v, lapack_int* ldv, lapack_int *info );\nvoid LAPACK_cgebak( char* job, char* side, lapack_int* n, lapack_int* ilo,\n                    lapack_int* ihi, const float* scale, lapack_int* m,\n                    lapack_complex_float* v, lapack_int* ldv,\n                    lapack_int *info );\nvoid LAPACK_zgebak( char* job, char* side, lapack_int* n, lapack_int* ilo,\n                    lapack_int* ihi, const double* scale, lapack_int* m,\n                    lapack_complex_double* v, lapack_int* ldv,\n                    lapack_int *info );\nvoid LAPACK_shseqr( char* job, char* compz, lapack_int* n, lapack_int* ilo,\n                    lapack_int* ihi, float* h, lapack_int* ldh, float* wr,\n                    float* wi, float* z, lapack_int* ldz, float* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_dhseqr( char* job, char* compz, lapack_int* n, lapack_int* ilo,\n                    lapack_int* ihi, double* h, lapack_int* ldh, double* wr,\n                    double* wi, double* z, lapack_int* ldz, double* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_chseqr( char* job, char* compz, lapack_int* n, lapack_int* ilo,\n                    lapack_int* ihi, lapack_complex_float* h, lapack_int* ldh,\n                    lapack_complex_float* w, lapack_complex_float* z,\n                    lapack_int* ldz, lapack_complex_float* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_zhseqr( char* job, char* compz, lapack_int* n, lapack_int* ilo,\n                    lapack_int* ihi, lapack_complex_double* h, lapack_int* ldh,\n                    lapack_complex_double* w, lapack_complex_double* z,\n                    lapack_int* ldz, lapack_complex_double* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_shsein( char* job, char* eigsrc, char* initv,\n                    lapack_logical* select, lapack_int* n, const float* h,\n                    lapack_int* ldh, float* wr, const float* wi, float* vl,\n                    lapack_int* ldvl, float* vr, lapack_int* ldvr,\n                    lapack_int* mm, lapack_int* m, float* work,\n                    lapack_int* ifaill, lapack_int* ifailr, lapack_int *info );\nvoid LAPACK_dhsein( char* job, char* eigsrc, char* initv,\n                    lapack_logical* select, lapack_int* n, const double* h,\n                    lapack_int* ldh, double* wr, const double* wi, double* vl,\n                    lapack_int* ldvl, double* vr, lapack_int* ldvr,\n                    lapack_int* mm, lapack_int* m, double* work,\n                    lapack_int* ifaill, lapack_int* ifailr, lapack_int *info );\nvoid LAPACK_chsein( char* job, char* eigsrc, char* initv,\n                    const lapack_logical* select, lapack_int* n,\n                    const lapack_complex_float* h, lapack_int* ldh,\n                    lapack_complex_float* w, lapack_complex_float* vl,\n                    lapack_int* ldvl, lapack_complex_float* vr,\n                    lapack_int* ldvr, lapack_int* mm, lapack_int* m,\n                    lapack_complex_float* work, float* rwork,\n                    lapack_int* ifaill, lapack_int* ifailr, lapack_int *info );\nvoid LAPACK_zhsein( char* job, char* eigsrc, char* initv,\n                    const lapack_logical* select, lapack_int* n,\n                    const lapack_complex_double* h, lapack_int* ldh,\n                    lapack_complex_double* w, lapack_complex_double* vl,\n                    lapack_int* ldvl, lapack_complex_double* vr,\n                    lapack_int* ldvr, lapack_int* mm, lapack_int* m,\n                    lapack_complex_double* work, double* rwork,\n                    lapack_int* ifaill, lapack_int* ifailr, lapack_int *info );\nvoid LAPACK_strevc( char* side, char* howmny, lapack_logical* select,\n                    lapack_int* n, const float* t, lapack_int* ldt, float* vl,\n                    lapack_int* ldvl, float* vr, lapack_int* ldvr,\n                    lapack_int* mm, lapack_int* m, float* work,\n                    lapack_int *info );\nvoid LAPACK_dtrevc( char* side, char* howmny, lapack_logical* select,\n                    lapack_int* n, const double* t, lapack_int* ldt, double* vl,\n                    lapack_int* ldvl, double* vr, lapack_int* ldvr,\n                    lapack_int* mm, lapack_int* m, double* work,\n                    lapack_int *info );\nvoid LAPACK_ctrevc( char* side, char* howmny, const lapack_logical* select,\n                    lapack_int* n, lapack_complex_float* t, lapack_int* ldt,\n                    lapack_complex_float* vl, lapack_int* ldvl,\n                    lapack_complex_float* vr, lapack_int* ldvr, lapack_int* mm,\n                    lapack_int* m, lapack_complex_float* work, float* rwork,\n                    lapack_int *info );\nvoid LAPACK_ztrevc( char* side, char* howmny, const lapack_logical* select,\n                    lapack_int* n, lapack_complex_double* t, lapack_int* ldt,\n                    lapack_complex_double* vl, lapack_int* ldvl,\n                    lapack_complex_double* vr, lapack_int* ldvr, lapack_int* mm,\n                    lapack_int* m, lapack_complex_double* work, double* rwork,\n                    lapack_int *info );\nvoid LAPACK_strsna( char* job, char* howmny, const lapack_logical* select,\n                    lapack_int* n, const float* t, lapack_int* ldt,\n                    const float* vl, lapack_int* ldvl, const float* vr,\n                    lapack_int* ldvr, float* s, float* sep, lapack_int* mm,\n                    lapack_int* m, float* work, lapack_int* ldwork,\n                    lapack_int* iwork, lapack_int *info );\nvoid LAPACK_dtrsna( char* job, char* howmny, const lapack_logical* select,\n                    lapack_int* n, const double* t, lapack_int* ldt,\n                    const double* vl, lapack_int* ldvl, const double* vr,\n                    lapack_int* ldvr, double* s, double* sep, lapack_int* mm,\n                    lapack_int* m, double* work, lapack_int* ldwork,\n                    lapack_int* iwork, lapack_int *info );\nvoid LAPACK_ctrsna( char* job, char* howmny, const lapack_logical* select,\n                    lapack_int* n, const lapack_complex_float* t,\n                    lapack_int* ldt, const lapack_complex_float* vl,\n                    lapack_int* ldvl, const lapack_complex_float* vr,\n                    lapack_int* ldvr, float* s, float* sep, lapack_int* mm,\n                    lapack_int* m, lapack_complex_float* work,\n                    lapack_int* ldwork, float* rwork, lapack_int *info );\nvoid LAPACK_ztrsna( char* job, char* howmny, const lapack_logical* select,\n                    lapack_int* n, const lapack_complex_double* t,\n                    lapack_int* ldt, const lapack_complex_double* vl,\n                    lapack_int* ldvl, const lapack_complex_double* vr,\n                    lapack_int* ldvr, double* s, double* sep, lapack_int* mm,\n                    lapack_int* m, lapack_complex_double* work,\n                    lapack_int* ldwork, double* rwork, lapack_int *info );\nvoid LAPACK_strexc( char* compq, lapack_int* n, float* t, lapack_int* ldt,\n                    float* q, lapack_int* ldq, lapack_int* ifst,\n                    lapack_int* ilst, float* work, lapack_int *info );\nvoid LAPACK_dtrexc( char* compq, lapack_int* n, double* t, lapack_int* ldt,\n                    double* q, lapack_int* ldq, lapack_int* ifst,\n                    lapack_int* ilst, double* work, lapack_int *info );\nvoid LAPACK_ctrexc( char* compq, lapack_int* n, lapack_complex_float* t,\n                    lapack_int* ldt, lapack_complex_float* q, lapack_int* ldq,\n                    lapack_int* ifst, lapack_int* ilst, lapack_int *info );\nvoid LAPACK_ztrexc( char* compq, lapack_int* n, lapack_complex_double* t,\n                    lapack_int* ldt, lapack_complex_double* q, lapack_int* ldq,\n                    lapack_int* ifst, lapack_int* ilst, lapack_int *info );\nvoid LAPACK_strsen( char* job, char* compq, const lapack_logical* select,\n                    lapack_int* n, float* t, lapack_int* ldt, float* q,\n                    lapack_int* ldq, float* wr, float* wi, lapack_int* m,\n                    float* s, float* sep, float* work, lapack_int* lwork,\n                    lapack_int* iwork, lapack_int* liwork, lapack_int *info );\nvoid LAPACK_dtrsen( char* job, char* compq, const lapack_logical* select,\n                    lapack_int* n, double* t, lapack_int* ldt, double* q,\n                    lapack_int* ldq, double* wr, double* wi, lapack_int* m,\n                    double* s, double* sep, double* work, lapack_int* lwork,\n                    lapack_int* iwork, lapack_int* liwork, lapack_int *info );\nvoid LAPACK_ctrsen( char* job, char* compq, const lapack_logical* select,\n                    lapack_int* n, lapack_complex_float* t, lapack_int* ldt,\n                    lapack_complex_float* q, lapack_int* ldq,\n                    lapack_complex_float* w, lapack_int* m, float* s,\n                    float* sep, lapack_complex_float* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_ztrsen( char* job, char* compq, const lapack_logical* select,\n                    lapack_int* n, lapack_complex_double* t, lapack_int* ldt,\n                    lapack_complex_double* q, lapack_int* ldq,\n                    lapack_complex_double* w, lapack_int* m, double* s,\n                    double* sep, lapack_complex_double* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_strsyl( char* trana, char* tranb, lapack_int* isgn, lapack_int* m,\n                    lapack_int* n, const float* a, lapack_int* lda,\n                    const float* b, lapack_int* ldb, float* c, lapack_int* ldc,\n                    float* scale, lapack_int *info );\nvoid LAPACK_dtrsyl( char* trana, char* tranb, lapack_int* isgn, lapack_int* m,\n                    lapack_int* n, const double* a, lapack_int* lda,\n                    const double* b, lapack_int* ldb, double* c,\n                    lapack_int* ldc, double* scale, lapack_int *info );\nvoid LAPACK_ctrsyl( char* trana, char* tranb, lapack_int* isgn, lapack_int* m,\n                    lapack_int* n, const lapack_complex_float* a,\n                    lapack_int* lda, const lapack_complex_float* b,\n                    lapack_int* ldb, lapack_complex_float* c, lapack_int* ldc,\n                    float* scale, lapack_int *info );\nvoid LAPACK_ztrsyl( char* trana, char* tranb, lapack_int* isgn, lapack_int* m,\n                    lapack_int* n, const lapack_complex_double* a,\n                    lapack_int* lda, const lapack_complex_double* b,\n                    lapack_int* ldb, lapack_complex_double* c, lapack_int* ldc,\n                    double* scale, lapack_int *info );\nvoid LAPACK_sgghrd( char* compq, char* compz, lapack_int* n, lapack_int* ilo,\n                    lapack_int* ihi, float* a, lapack_int* lda, float* b,\n                    lapack_int* ldb, float* q, lapack_int* ldq, float* z,\n                    lapack_int* ldz, lapack_int *info );\nvoid LAPACK_dgghrd( char* compq, char* compz, lapack_int* n, lapack_int* ilo,\n                    lapack_int* ihi, double* a, lapack_int* lda, double* b,\n                    lapack_int* ldb, double* q, lapack_int* ldq, double* z,\n                    lapack_int* ldz, lapack_int *info );\nvoid LAPACK_cgghrd( char* compq, char* compz, lapack_int* n, lapack_int* ilo,\n                    lapack_int* ihi, lapack_complex_float* a, lapack_int* lda,\n                    lapack_complex_float* b, lapack_int* ldb,\n                    lapack_complex_float* q, lapack_int* ldq,\n                    lapack_complex_float* z, lapack_int* ldz,\n                    lapack_int *info );\nvoid LAPACK_zgghrd( char* compq, char* compz, lapack_int* n, lapack_int* ilo,\n                    lapack_int* ihi, lapack_complex_double* a, lapack_int* lda,\n                    lapack_complex_double* b, lapack_int* ldb,\n                    lapack_complex_double* q, lapack_int* ldq,\n                    lapack_complex_double* z, lapack_int* ldz,\n                    lapack_int *info );\nvoid LAPACK_sggbal( char* job, lapack_int* n, float* a, lapack_int* lda,\n                    float* b, lapack_int* ldb, lapack_int* ilo, lapack_int* ihi,\n                    float* lscale, float* rscale, float* work,\n                    lapack_int *info );\nvoid LAPACK_dggbal( char* job, lapack_int* n, double* a, lapack_int* lda,\n                    double* b, lapack_int* ldb, lapack_int* ilo,\n                    lapack_int* ihi, double* lscale, double* rscale,\n                    double* work, lapack_int *info );\nvoid LAPACK_cggbal( char* job, lapack_int* n, lapack_complex_float* a,\n                    lapack_int* lda, lapack_complex_float* b, lapack_int* ldb,\n                    lapack_int* ilo, lapack_int* ihi, float* lscale,\n                    float* rscale, float* work, lapack_int *info );\nvoid LAPACK_zggbal( char* job, lapack_int* n, lapack_complex_double* a,\n                    lapack_int* lda, lapack_complex_double* b, lapack_int* ldb,\n                    lapack_int* ilo, lapack_int* ihi, double* lscale,\n                    double* rscale, double* work, lapack_int *info );\nvoid LAPACK_sggbak( char* job, char* side, lapack_int* n, lapack_int* ilo,\n                    lapack_int* ihi, const float* lscale, const float* rscale,\n                    lapack_int* m, float* v, lapack_int* ldv,\n                    lapack_int *info );\nvoid LAPACK_dggbak( char* job, char* side, lapack_int* n, lapack_int* ilo,\n                    lapack_int* ihi, const double* lscale, const double* rscale,\n                    lapack_int* m, double* v, lapack_int* ldv,\n                    lapack_int *info );\nvoid LAPACK_cggbak( char* job, char* side, lapack_int* n, lapack_int* ilo,\n                    lapack_int* ihi, const float* lscale, const float* rscale,\n                    lapack_int* m, lapack_complex_float* v, lapack_int* ldv,\n                    lapack_int *info );\nvoid LAPACK_zggbak( char* job, char* side, lapack_int* n, lapack_int* ilo,\n                    lapack_int* ihi, const double* lscale, const double* rscale,\n                    lapack_int* m, lapack_complex_double* v, lapack_int* ldv,\n                    lapack_int *info );\nvoid LAPACK_shgeqz( char* job, char* compq, char* compz, lapack_int* n,\n                    lapack_int* ilo, lapack_int* ihi, float* h, lapack_int* ldh,\n                    float* t, lapack_int* ldt, float* alphar, float* alphai,\n                    float* beta, float* q, lapack_int* ldq, float* z,\n                    lapack_int* ldz, float* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_dhgeqz( char* job, char* compq, char* compz, lapack_int* n,\n                    lapack_int* ilo, lapack_int* ihi, double* h,\n                    lapack_int* ldh, double* t, lapack_int* ldt, double* alphar,\n                    double* alphai, double* beta, double* q, lapack_int* ldq,\n                    double* z, lapack_int* ldz, double* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_chgeqz( char* job, char* compq, char* compz, lapack_int* n,\n                    lapack_int* ilo, lapack_int* ihi, lapack_complex_float* h,\n                    lapack_int* ldh, lapack_complex_float* t, lapack_int* ldt,\n                    lapack_complex_float* alpha, lapack_complex_float* beta,\n                    lapack_complex_float* q, lapack_int* ldq,\n                    lapack_complex_float* z, lapack_int* ldz,\n                    lapack_complex_float* work, lapack_int* lwork, float* rwork,\n                    lapack_int *info );\nvoid LAPACK_zhgeqz( char* job, char* compq, char* compz, lapack_int* n,\n                    lapack_int* ilo, lapack_int* ihi, lapack_complex_double* h,\n                    lapack_int* ldh, lapack_complex_double* t, lapack_int* ldt,\n                    lapack_complex_double* alpha, lapack_complex_double* beta,\n                    lapack_complex_double* q, lapack_int* ldq,\n                    lapack_complex_double* z, lapack_int* ldz,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    double* rwork, lapack_int *info );\nvoid LAPACK_stgevc( char* side, char* howmny, const lapack_logical* select,\n                    lapack_int* n, const float* s, lapack_int* lds,\n                    const float* p, lapack_int* ldp, float* vl,\n                    lapack_int* ldvl, float* vr, lapack_int* ldvr,\n                    lapack_int* mm, lapack_int* m, float* work,\n                    lapack_int *info );\nvoid LAPACK_dtgevc( char* side, char* howmny, const lapack_logical* select,\n                    lapack_int* n, const double* s, lapack_int* lds,\n                    const double* p, lapack_int* ldp, double* vl,\n                    lapack_int* ldvl, double* vr, lapack_int* ldvr,\n                    lapack_int* mm, lapack_int* m, double* work,\n                    lapack_int *info );\nvoid LAPACK_ctgevc( char* side, char* howmny, const lapack_logical* select,\n                    lapack_int* n, const lapack_complex_float* s,\n                    lapack_int* lds, const lapack_complex_float* p,\n                    lapack_int* ldp, lapack_complex_float* vl, lapack_int* ldvl,\n                    lapack_complex_float* vr, lapack_int* ldvr, lapack_int* mm,\n                    lapack_int* m, lapack_complex_float* work, float* rwork,\n                    lapack_int *info );\nvoid LAPACK_ztgevc( char* side, char* howmny, const lapack_logical* select,\n                    lapack_int* n, const lapack_complex_double* s,\n                    lapack_int* lds, const lapack_complex_double* p,\n                    lapack_int* ldp, lapack_complex_double* vl,\n                    lapack_int* ldvl, lapack_complex_double* vr,\n                    lapack_int* ldvr, lapack_int* mm, lapack_int* m,\n                    lapack_complex_double* work, double* rwork,\n                    lapack_int *info );\nvoid LAPACK_stgexc( lapack_logical* wantq, lapack_logical* wantz, lapack_int* n,\n                    float* a, lapack_int* lda, float* b, lapack_int* ldb,\n                    float* q, lapack_int* ldq, float* z, lapack_int* ldz,\n                    lapack_int* ifst, lapack_int* ilst, float* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_dtgexc( lapack_logical* wantq, lapack_logical* wantz, lapack_int* n,\n                    double* a, lapack_int* lda, double* b, lapack_int* ldb,\n                    double* q, lapack_int* ldq, double* z, lapack_int* ldz,\n                    lapack_int* ifst, lapack_int* ilst, double* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_ctgexc( lapack_logical* wantq, lapack_logical* wantz, lapack_int* n,\n                    lapack_complex_float* a, lapack_int* lda,\n                    lapack_complex_float* b, lapack_int* ldb,\n                    lapack_complex_float* q, lapack_int* ldq,\n                    lapack_complex_float* z, lapack_int* ldz, lapack_int* ifst,\n                    lapack_int* ilst, lapack_int *info );\nvoid LAPACK_ztgexc( lapack_logical* wantq, lapack_logical* wantz, lapack_int* n,\n                    lapack_complex_double* a, lapack_int* lda,\n                    lapack_complex_double* b, lapack_int* ldb,\n                    lapack_complex_double* q, lapack_int* ldq,\n                    lapack_complex_double* z, lapack_int* ldz, lapack_int* ifst,\n                    lapack_int* ilst, lapack_int *info );\nvoid LAPACK_stgsen( lapack_int* ijob, lapack_logical* wantq,\n                    lapack_logical* wantz, const lapack_logical* select,\n                    lapack_int* n, float* a, lapack_int* lda, float* b,\n                    lapack_int* ldb, float* alphar, float* alphai, float* beta,\n                    float* q, lapack_int* ldq, float* z, lapack_int* ldz,\n                    lapack_int* m, float* pl, float* pr, float* dif,\n                    float* work, lapack_int* lwork, lapack_int* iwork,\n                    lapack_int* liwork, lapack_int *info );\nvoid LAPACK_dtgsen( lapack_int* ijob, lapack_logical* wantq,\n                    lapack_logical* wantz, const lapack_logical* select,\n                    lapack_int* n, double* a, lapack_int* lda, double* b,\n                    lapack_int* ldb, double* alphar, double* alphai,\n                    double* beta, double* q, lapack_int* ldq, double* z,\n                    lapack_int* ldz, lapack_int* m, double* pl, double* pr,\n                    double* dif, double* work, lapack_int* lwork,\n                    lapack_int* iwork, lapack_int* liwork, lapack_int *info );\nvoid LAPACK_ctgsen( lapack_int* ijob, lapack_logical* wantq,\n                    lapack_logical* wantz, const lapack_logical* select,\n                    lapack_int* n, lapack_complex_float* a, lapack_int* lda,\n                    lapack_complex_float* b, lapack_int* ldb,\n                    lapack_complex_float* alpha, lapack_complex_float* beta,\n                    lapack_complex_float* q, lapack_int* ldq,\n                    lapack_complex_float* z, lapack_int* ldz, lapack_int* m,\n                    float* pl, float* pr, float* dif,\n                    lapack_complex_float* work, lapack_int* lwork,\n                    lapack_int* iwork, lapack_int* liwork, lapack_int *info );\nvoid LAPACK_ztgsen( lapack_int* ijob, lapack_logical* wantq,\n                    lapack_logical* wantz, const lapack_logical* select,\n                    lapack_int* n, lapack_complex_double* a, lapack_int* lda,\n                    lapack_complex_double* b, lapack_int* ldb,\n                    lapack_complex_double* alpha, lapack_complex_double* beta,\n                    lapack_complex_double* q, lapack_int* ldq,\n                    lapack_complex_double* z, lapack_int* ldz, lapack_int* m,\n                    double* pl, double* pr, double* dif,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    lapack_int* iwork, lapack_int* liwork, lapack_int *info );\nvoid LAPACK_stgsyl( char* trans, lapack_int* ijob, lapack_int* m, lapack_int* n,\n                    const float* a, lapack_int* lda, const float* b,\n                    lapack_int* ldb, float* c, lapack_int* ldc, const float* d,\n                    lapack_int* ldd, const float* e, lapack_int* lde, float* f,\n                    lapack_int* ldf, float* scale, float* dif, float* work,\n                    lapack_int* lwork, lapack_int* iwork, lapack_int *info );\nvoid LAPACK_dtgsyl( char* trans, lapack_int* ijob, lapack_int* m, lapack_int* n,\n                    const double* a, lapack_int* lda, const double* b,\n                    lapack_int* ldb, double* c, lapack_int* ldc,\n                    const double* d, lapack_int* ldd, const double* e,\n                    lapack_int* lde, double* f, lapack_int* ldf, double* scale,\n                    double* dif, double* work, lapack_int* lwork,\n                    lapack_int* iwork, lapack_int *info );\nvoid LAPACK_ctgsyl( char* trans, lapack_int* ijob, lapack_int* m, lapack_int* n,\n                    const lapack_complex_float* a, lapack_int* lda,\n                    const lapack_complex_float* b, lapack_int* ldb,\n                    lapack_complex_float* c, lapack_int* ldc,\n                    const lapack_complex_float* d, lapack_int* ldd,\n                    const lapack_complex_float* e, lapack_int* lde,\n                    lapack_complex_float* f, lapack_int* ldf, float* scale,\n                    float* dif, lapack_complex_float* work, lapack_int* lwork,\n                    lapack_int* iwork, lapack_int *info );\nvoid LAPACK_ztgsyl( char* trans, lapack_int* ijob, lapack_int* m, lapack_int* n,\n                    const lapack_complex_double* a, lapack_int* lda,\n                    const lapack_complex_double* b, lapack_int* ldb,\n                    lapack_complex_double* c, lapack_int* ldc,\n                    const lapack_complex_double* d, lapack_int* ldd,\n                    const lapack_complex_double* e, lapack_int* lde,\n                    lapack_complex_double* f, lapack_int* ldf, double* scale,\n                    double* dif, lapack_complex_double* work, lapack_int* lwork,\n                    lapack_int* iwork, lapack_int *info );\nvoid LAPACK_stgsna( char* job, char* howmny, const lapack_logical* select,\n                    lapack_int* n, const float* a, lapack_int* lda,\n                    const float* b, lapack_int* ldb, const float* vl,\n                    lapack_int* ldvl, const float* vr, lapack_int* ldvr,\n                    float* s, float* dif, lapack_int* mm, lapack_int* m,\n                    float* work, lapack_int* lwork, lapack_int* iwork,\n                    lapack_int *info );\nvoid LAPACK_dtgsna( char* job, char* howmny, const lapack_logical* select,\n                    lapack_int* n, const double* a, lapack_int* lda,\n                    const double* b, lapack_int* ldb, const double* vl,\n                    lapack_int* ldvl, const double* vr, lapack_int* ldvr,\n                    double* s, double* dif, lapack_int* mm, lapack_int* m,\n                    double* work, lapack_int* lwork, lapack_int* iwork,\n                    lapack_int *info );\nvoid LAPACK_ctgsna( char* job, char* howmny, const lapack_logical* select,\n                    lapack_int* n, const lapack_complex_float* a,\n                    lapack_int* lda, const lapack_complex_float* b,\n                    lapack_int* ldb, const lapack_complex_float* vl,\n                    lapack_int* ldvl, const lapack_complex_float* vr,\n                    lapack_int* ldvr, float* s, float* dif, lapack_int* mm,\n                    lapack_int* m, lapack_complex_float* work,\n                    lapack_int* lwork, lapack_int* iwork, lapack_int *info );\nvoid LAPACK_ztgsna( char* job, char* howmny, const lapack_logical* select,\n                    lapack_int* n, const lapack_complex_double* a,\n                    lapack_int* lda, const lapack_complex_double* b,\n                    lapack_int* ldb, const lapack_complex_double* vl,\n                    lapack_int* ldvl, const lapack_complex_double* vr,\n                    lapack_int* ldvr, double* s, double* dif, lapack_int* mm,\n                    lapack_int* m, lapack_complex_double* work,\n                    lapack_int* lwork, lapack_int* iwork, lapack_int *info );\nvoid LAPACK_sggsvp( char* jobu, char* jobv, char* jobq, lapack_int* m,\n                    lapack_int* p, lapack_int* n, float* a, lapack_int* lda,\n                    float* b, lapack_int* ldb, float* tola, float* tolb,\n                    lapack_int* k, lapack_int* l, float* u, lapack_int* ldu,\n                    float* v, lapack_int* ldv, float* q, lapack_int* ldq,\n                    lapack_int* iwork, float* tau, float* work,\n                    lapack_int *info );\nvoid LAPACK_dggsvp( char* jobu, char* jobv, char* jobq, lapack_int* m,\n                    lapack_int* p, lapack_int* n, double* a, lapack_int* lda,\n                    double* b, lapack_int* ldb, double* tola, double* tolb,\n                    lapack_int* k, lapack_int* l, double* u, lapack_int* ldu,\n                    double* v, lapack_int* ldv, double* q, lapack_int* ldq,\n                    lapack_int* iwork, double* tau, double* work,\n                    lapack_int *info );\nvoid LAPACK_cggsvp( char* jobu, char* jobv, char* jobq, lapack_int* m,\n                    lapack_int* p, lapack_int* n, lapack_complex_float* a,\n                    lapack_int* lda, lapack_complex_float* b, lapack_int* ldb,\n                    float* tola, float* tolb, lapack_int* k, lapack_int* l,\n                    lapack_complex_float* u, lapack_int* ldu,\n                    lapack_complex_float* v, lapack_int* ldv,\n                    lapack_complex_float* q, lapack_int* ldq, lapack_int* iwork,\n                    float* rwork, lapack_complex_float* tau,\n                    lapack_complex_float* work, lapack_int *info );\nvoid LAPACK_zggsvp( char* jobu, char* jobv, char* jobq, lapack_int* m,\n                    lapack_int* p, lapack_int* n, lapack_complex_double* a,\n                    lapack_int* lda, lapack_complex_double* b, lapack_int* ldb,\n                    double* tola, double* tolb, lapack_int* k, lapack_int* l,\n                    lapack_complex_double* u, lapack_int* ldu,\n                    lapack_complex_double* v, lapack_int* ldv,\n                    lapack_complex_double* q, lapack_int* ldq,\n                    lapack_int* iwork, double* rwork,\n                    lapack_complex_double* tau, lapack_complex_double* work,\n                    lapack_int *info );\nvoid LAPACK_stgsja( char* jobu, char* jobv, char* jobq, lapack_int* m,\n                    lapack_int* p, lapack_int* n, lapack_int* k, lapack_int* l,\n                    float* a, lapack_int* lda, float* b, lapack_int* ldb,\n                    float* tola, float* tolb, float* alpha, float* beta,\n                    float* u, lapack_int* ldu, float* v, lapack_int* ldv,\n                    float* q, lapack_int* ldq, float* work, lapack_int* ncycle,\n                    lapack_int *info );\nvoid LAPACK_dtgsja( char* jobu, char* jobv, char* jobq, lapack_int* m,\n                    lapack_int* p, lapack_int* n, lapack_int* k, lapack_int* l,\n                    double* a, lapack_int* lda, double* b, lapack_int* ldb,\n                    double* tola, double* tolb, double* alpha, double* beta,\n                    double* u, lapack_int* ldu, double* v, lapack_int* ldv,\n                    double* q, lapack_int* ldq, double* work,\n                    lapack_int* ncycle, lapack_int *info );\nvoid LAPACK_ctgsja( char* jobu, char* jobv, char* jobq, lapack_int* m,\n                    lapack_int* p, lapack_int* n, lapack_int* k, lapack_int* l,\n                    lapack_complex_float* a, lapack_int* lda,\n                    lapack_complex_float* b, lapack_int* ldb, float* tola,\n                    float* tolb, float* alpha, float* beta,\n                    lapack_complex_float* u, lapack_int* ldu,\n                    lapack_complex_float* v, lapack_int* ldv,\n                    lapack_complex_float* q, lapack_int* ldq,\n                    lapack_complex_float* work, lapack_int* ncycle,\n                    lapack_int *info );\nvoid LAPACK_ztgsja( char* jobu, char* jobv, char* jobq, lapack_int* m,\n                    lapack_int* p, lapack_int* n, lapack_int* k, lapack_int* l,\n                    lapack_complex_double* a, lapack_int* lda,\n                    lapack_complex_double* b, lapack_int* ldb, double* tola,\n                    double* tolb, double* alpha, double* beta,\n                    lapack_complex_double* u, lapack_int* ldu,\n                    lapack_complex_double* v, lapack_int* ldv,\n                    lapack_complex_double* q, lapack_int* ldq,\n                    lapack_complex_double* work, lapack_int* ncycle,\n                    lapack_int *info );\nvoid LAPACK_sgels( char* trans, lapack_int* m, lapack_int* n, lapack_int* nrhs,\n                   float* a, lapack_int* lda, float* b, lapack_int* ldb,\n                   float* work, lapack_int* lwork, lapack_int *info );\nvoid LAPACK_dgels( char* trans, lapack_int* m, lapack_int* n, lapack_int* nrhs,\n                   double* a, lapack_int* lda, double* b, lapack_int* ldb,\n                   double* work, lapack_int* lwork, lapack_int *info );\nvoid LAPACK_cgels( char* trans, lapack_int* m, lapack_int* n, lapack_int* nrhs,\n                   lapack_complex_float* a, lapack_int* lda,\n                   lapack_complex_float* b, lapack_int* ldb,\n                   lapack_complex_float* work, lapack_int* lwork,\n                   lapack_int *info );\nvoid LAPACK_zgels( char* trans, lapack_int* m, lapack_int* n, lapack_int* nrhs,\n                   lapack_complex_double* a, lapack_int* lda,\n                   lapack_complex_double* b, lapack_int* ldb,\n                   lapack_complex_double* work, lapack_int* lwork,\n                   lapack_int *info );\nvoid LAPACK_sgelsy( lapack_int* m, lapack_int* n, lapack_int* nrhs, float* a,\n                    lapack_int* lda, float* b, lapack_int* ldb,\n                    lapack_int* jpvt, float* rcond, lapack_int* rank,\n                    float* work, lapack_int* lwork, lapack_int *info );\nvoid LAPACK_dgelsy( lapack_int* m, lapack_int* n, lapack_int* nrhs, double* a,\n                    lapack_int* lda, double* b, lapack_int* ldb,\n                    lapack_int* jpvt, double* rcond, lapack_int* rank,\n                    double* work, lapack_int* lwork, lapack_int *info );\nvoid LAPACK_cgelsy( lapack_int* m, lapack_int* n, lapack_int* nrhs,\n                    lapack_complex_float* a, lapack_int* lda,\n                    lapack_complex_float* b, lapack_int* ldb, lapack_int* jpvt,\n                    float* rcond, lapack_int* rank, lapack_complex_float* work,\n                    lapack_int* lwork, float* rwork, lapack_int *info );\nvoid LAPACK_zgelsy( lapack_int* m, lapack_int* n, lapack_int* nrhs,\n                    lapack_complex_double* a, lapack_int* lda,\n                    lapack_complex_double* b, lapack_int* ldb, lapack_int* jpvt,\n                    double* rcond, lapack_int* rank,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    double* rwork, lapack_int *info );\nvoid LAPACK_sgelss( lapack_int* m, lapack_int* n, lapack_int* nrhs, float* a,\n                    lapack_int* lda, float* b, lapack_int* ldb, float* s,\n                    float* rcond, lapack_int* rank, float* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_dgelss( lapack_int* m, lapack_int* n, lapack_int* nrhs, double* a,\n                    lapack_int* lda, double* b, lapack_int* ldb, double* s,\n                    double* rcond, lapack_int* rank, double* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_cgelss( lapack_int* m, lapack_int* n, lapack_int* nrhs,\n                    lapack_complex_float* a, lapack_int* lda,\n                    lapack_complex_float* b, lapack_int* ldb, float* s,\n                    float* rcond, lapack_int* rank, lapack_complex_float* work,\n                    lapack_int* lwork, float* rwork, lapack_int *info );\nvoid LAPACK_zgelss( lapack_int* m, lapack_int* n, lapack_int* nrhs,\n                    lapack_complex_double* a, lapack_int* lda,\n                    lapack_complex_double* b, lapack_int* ldb, double* s,\n                    double* rcond, lapack_int* rank,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    double* rwork, lapack_int *info );\nvoid LAPACK_sgelsd( lapack_int* m, lapack_int* n, lapack_int* nrhs, float* a,\n                    lapack_int* lda, float* b, lapack_int* ldb, float* s,\n                    float* rcond, lapack_int* rank, float* work,\n                    lapack_int* lwork, lapack_int* iwork, lapack_int *info );\nvoid LAPACK_dgelsd( lapack_int* m, lapack_int* n, lapack_int* nrhs, double* a,\n                    lapack_int* lda, double* b, lapack_int* ldb, double* s,\n                    double* rcond, lapack_int* rank, double* work,\n                    lapack_int* lwork, lapack_int* iwork, lapack_int *info );\nvoid LAPACK_cgelsd( lapack_int* m, lapack_int* n, lapack_int* nrhs,\n                    lapack_complex_float* a, lapack_int* lda,\n                    lapack_complex_float* b, lapack_int* ldb, float* s,\n                    float* rcond, lapack_int* rank, lapack_complex_float* work,\n                    lapack_int* lwork, float* rwork, lapack_int* iwork,\n                    lapack_int *info );\nvoid LAPACK_zgelsd( lapack_int* m, lapack_int* n, lapack_int* nrhs,\n                    lapack_complex_double* a, lapack_int* lda,\n                    lapack_complex_double* b, lapack_int* ldb, double* s,\n                    double* rcond, lapack_int* rank,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    double* rwork, lapack_int* iwork, lapack_int *info );\nvoid LAPACK_sgglse( lapack_int* m, lapack_int* n, lapack_int* p, float* a,\n                    lapack_int* lda, float* b, lapack_int* ldb, float* c,\n                    float* d, float* x, float* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_dgglse( lapack_int* m, lapack_int* n, lapack_int* p, double* a,\n                    lapack_int* lda, double* b, lapack_int* ldb, double* c,\n                    double* d, double* x, double* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_cgglse( lapack_int* m, lapack_int* n, lapack_int* p,\n                    lapack_complex_float* a, lapack_int* lda,\n                    lapack_complex_float* b, lapack_int* ldb,\n                    lapack_complex_float* c, lapack_complex_float* d,\n                    lapack_complex_float* x, lapack_complex_float* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_zgglse( lapack_int* m, lapack_int* n, lapack_int* p,\n                    lapack_complex_double* a, lapack_int* lda,\n                    lapack_complex_double* b, lapack_int* ldb,\n                    lapack_complex_double* c, lapack_complex_double* d,\n                    lapack_complex_double* x, lapack_complex_double* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_sggglm( lapack_int* n, lapack_int* m, lapack_int* p, float* a,\n                    lapack_int* lda, float* b, lapack_int* ldb, float* d,\n                    float* x, float* y, float* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_dggglm( lapack_int* n, lapack_int* m, lapack_int* p, double* a,\n                    lapack_int* lda, double* b, lapack_int* ldb, double* d,\n                    double* x, double* y, double* work, lapack_int* lwork,\n                    lapack_int *info );\nvoid LAPACK_cggglm( lapack_int* n, lapack_int* m, lapack_int* p,\n                    lapack_complex_float* a, lapack_int* lda,\n                    lapack_complex_float* b, lapack_int* ldb,\n                    lapack_complex_float* d, lapack_complex_float* x,\n                    lapack_complex_float* y, lapack_complex_float* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_zggglm( lapack_int* n, lapack_int* m, lapack_int* p,\n                    lapack_complex_double* a, lapack_int* lda,\n                    lapack_complex_double* b, lapack_int* ldb,\n                    lapack_complex_double* d, lapack_complex_double* x,\n                    lapack_complex_double* y, lapack_complex_double* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_ssyev( char* jobz, char* uplo, lapack_int* n, float* a,\n                   lapack_int* lda, float* w, float* work, lapack_int* lwork,\n                   lapack_int *info );\nvoid LAPACK_dsyev( char* jobz, char* uplo, lapack_int* n, double* a,\n                   lapack_int* lda, double* w, double* work, lapack_int* lwork,\n                   lapack_int *info );\nvoid LAPACK_cheev( char* jobz, char* uplo, lapack_int* n,\n                   lapack_complex_float* a, lapack_int* lda, float* w,\n                   lapack_complex_float* work, lapack_int* lwork, float* rwork,\n                   lapack_int *info );\nvoid LAPACK_zheev( char* jobz, char* uplo, lapack_int* n,\n                   lapack_complex_double* a, lapack_int* lda, double* w,\n                   lapack_complex_double* work, lapack_int* lwork,\n                   double* rwork, lapack_int *info );\nvoid LAPACK_ssyevd( char* jobz, char* uplo, lapack_int* n, float* a,\n                    lapack_int* lda, float* w, float* work, lapack_int* lwork,\n                    lapack_int* iwork, lapack_int* liwork, lapack_int *info );\nvoid LAPACK_dsyevd( char* jobz, char* uplo, lapack_int* n, double* a,\n                    lapack_int* lda, double* w, double* work, lapack_int* lwork,\n                    lapack_int* iwork, lapack_int* liwork, lapack_int *info );\nvoid LAPACK_cheevd( char* jobz, char* uplo, lapack_int* n,\n                    lapack_complex_float* a, lapack_int* lda, float* w,\n                    lapack_complex_float* work, lapack_int* lwork, float* rwork,\n                    lapack_int* lrwork, lapack_int* iwork, lapack_int* liwork,\n                    lapack_int *info );\nvoid LAPACK_zheevd( char* jobz, char* uplo, lapack_int* n,\n                    lapack_complex_double* a, lapack_int* lda, double* w,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    double* rwork, lapack_int* lrwork, lapack_int* iwork,\n                    lapack_int* liwork, lapack_int *info );\nvoid LAPACK_ssyevx( char* jobz, char* range, char* uplo, lapack_int* n,\n                    float* a, lapack_int* lda, float* vl, float* vu,\n                    lapack_int* il, lapack_int* iu, float* abstol,\n                    lapack_int* m, float* w, float* z, lapack_int* ldz,\n                    float* work, lapack_int* lwork, lapack_int* iwork,\n                    lapack_int* ifail, lapack_int *info );\nvoid LAPACK_dsyevx( char* jobz, char* range, char* uplo, lapack_int* n,\n                    double* a, lapack_int* lda, double* vl, double* vu,\n                    lapack_int* il, lapack_int* iu, double* abstol,\n                    lapack_int* m, double* w, double* z, lapack_int* ldz,\n                    double* work, lapack_int* lwork, lapack_int* iwork,\n                    lapack_int* ifail, lapack_int *info );\nvoid LAPACK_cheevx( char* jobz, char* range, char* uplo, lapack_int* n,\n                    lapack_complex_float* a, lapack_int* lda, float* vl,\n                    float* vu, lapack_int* il, lapack_int* iu, float* abstol,\n                    lapack_int* m, float* w, lapack_complex_float* z,\n                    lapack_int* ldz, lapack_complex_float* work,\n                    lapack_int* lwork, float* rwork, lapack_int* iwork,\n                    lapack_int* ifail, lapack_int *info );\nvoid LAPACK_zheevx( char* jobz, char* range, char* uplo, lapack_int* n,\n                    lapack_complex_double* a, lapack_int* lda, double* vl,\n                    double* vu, lapack_int* il, lapack_int* iu, double* abstol,\n                    lapack_int* m, double* w, lapack_complex_double* z,\n                    lapack_int* ldz, lapack_complex_double* work,\n                    lapack_int* lwork, double* rwork, lapack_int* iwork,\n                    lapack_int* ifail, lapack_int *info );\nvoid LAPACK_ssyevr( char* jobz, char* range, char* uplo, lapack_int* n,\n                    float* a, lapack_int* lda, float* vl, float* vu,\n                    lapack_int* il, lapack_int* iu, float* abstol,\n                    lapack_int* m, float* w, float* z, lapack_int* ldz,\n                    lapack_int* isuppz, float* work, lapack_int* lwork,\n                    lapack_int* iwork, lapack_int* liwork, lapack_int *info );\nvoid LAPACK_dsyevr( char* jobz, char* range, char* uplo, lapack_int* n,\n                    double* a, lapack_int* lda, double* vl, double* vu,\n                    lapack_int* il, lapack_int* iu, double* abstol,\n                    lapack_int* m, double* w, double* z, lapack_int* ldz,\n                    lapack_int* isuppz, double* work, lapack_int* lwork,\n                    lapack_int* iwork, lapack_int* liwork, lapack_int *info );\nvoid LAPACK_cheevr( char* jobz, char* range, char* uplo, lapack_int* n,\n                    lapack_complex_float* a, lapack_int* lda, float* vl,\n                    float* vu, lapack_int* il, lapack_int* iu, float* abstol,\n                    lapack_int* m, float* w, lapack_complex_float* z,\n                    lapack_int* ldz, lapack_int* isuppz,\n                    lapack_complex_float* work, lapack_int* lwork, float* rwork,\n                    lapack_int* lrwork, lapack_int* iwork, lapack_int* liwork,\n                    lapack_int *info );\nvoid LAPACK_zheevr( char* jobz, char* range, char* uplo, lapack_int* n,\n                    lapack_complex_double* a, lapack_int* lda, double* vl,\n                    double* vu, lapack_int* il, lapack_int* iu, double* abstol,\n                    lapack_int* m, double* w, lapack_complex_double* z,\n                    lapack_int* ldz, lapack_int* isuppz,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    double* rwork, lapack_int* lrwork, lapack_int* iwork,\n                    lapack_int* liwork, lapack_int *info );\nvoid LAPACK_sspev( char* jobz, char* uplo, lapack_int* n, float* ap, float* w,\n                   float* z, lapack_int* ldz, float* work, lapack_int *info );\nvoid LAPACK_dspev( char* jobz, char* uplo, lapack_int* n, double* ap, double* w,\n                   double* z, lapack_int* ldz, double* work, lapack_int *info );\nvoid LAPACK_chpev( char* jobz, char* uplo, lapack_int* n,\n                   lapack_complex_float* ap, float* w, lapack_complex_float* z,\n                   lapack_int* ldz, lapack_complex_float* work, float* rwork,\n                   lapack_int *info );\nvoid LAPACK_zhpev( char* jobz, char* uplo, lapack_int* n,\n                   lapack_complex_double* ap, double* w,\n                   lapack_complex_double* z, lapack_int* ldz,\n                   lapack_complex_double* work, double* rwork,\n                   lapack_int *info );\nvoid LAPACK_sspevd( char* jobz, char* uplo, lapack_int* n, float* ap, float* w,\n                    float* z, lapack_int* ldz, float* work, lapack_int* lwork,\n                    lapack_int* iwork, lapack_int* liwork, lapack_int *info );\nvoid LAPACK_dspevd( char* jobz, char* uplo, lapack_int* n, double* ap,\n                    double* w, double* z, lapack_int* ldz, double* work,\n                    lapack_int* lwork, lapack_int* iwork, lapack_int* liwork,\n                    lapack_int *info );\nvoid LAPACK_chpevd( char* jobz, char* uplo, lapack_int* n,\n                    lapack_complex_float* ap, float* w, lapack_complex_float* z,\n                    lapack_int* ldz, lapack_complex_float* work,\n                    lapack_int* lwork, float* rwork, lapack_int* lrwork,\n                    lapack_int* iwork, lapack_int* liwork, lapack_int *info );\nvoid LAPACK_zhpevd( char* jobz, char* uplo, lapack_int* n,\n                    lapack_complex_double* ap, double* w,\n                    lapack_complex_double* z, lapack_int* ldz,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    double* rwork, lapack_int* lrwork, lapack_int* iwork,\n                    lapack_int* liwork, lapack_int *info );\nvoid LAPACK_sspevx( char* jobz, char* range, char* uplo, lapack_int* n,\n                    float* ap, float* vl, float* vu, lapack_int* il,\n                    lapack_int* iu, float* abstol, lapack_int* m, float* w,\n                    float* z, lapack_int* ldz, float* work, lapack_int* iwork,\n                    lapack_int* ifail, lapack_int *info );\nvoid LAPACK_dspevx( char* jobz, char* range, char* uplo, lapack_int* n,\n                    double* ap, double* vl, double* vu, lapack_int* il,\n                    lapack_int* iu, double* abstol, lapack_int* m, double* w,\n                    double* z, lapack_int* ldz, double* work, lapack_int* iwork,\n                    lapack_int* ifail, lapack_int *info );\nvoid LAPACK_chpevx( char* jobz, char* range, char* uplo, lapack_int* n,\n                    lapack_complex_float* ap, float* vl, float* vu,\n                    lapack_int* il, lapack_int* iu, float* abstol,\n                    lapack_int* m, float* w, lapack_complex_float* z,\n                    lapack_int* ldz, lapack_complex_float* work, float* rwork,\n                    lapack_int* iwork, lapack_int* ifail, lapack_int *info );\nvoid LAPACK_zhpevx( char* jobz, char* range, char* uplo, lapack_int* n,\n                    lapack_complex_double* ap, double* vl, double* vu,\n                    lapack_int* il, lapack_int* iu, double* abstol,\n                    lapack_int* m, double* w, lapack_complex_double* z,\n                    lapack_int* ldz, lapack_complex_double* work, double* rwork,\n                    lapack_int* iwork, lapack_int* ifail, lapack_int *info );\nvoid LAPACK_ssbev( char* jobz, char* uplo, lapack_int* n, lapack_int* kd,\n                   float* ab, lapack_int* ldab, float* w, float* z,\n                   lapack_int* ldz, float* work, lapack_int *info );\nvoid LAPACK_dsbev( char* jobz, char* uplo, lapack_int* n, lapack_int* kd,\n                   double* ab, lapack_int* ldab, double* w, double* z,\n                   lapack_int* ldz, double* work, lapack_int *info );\nvoid LAPACK_chbev( char* jobz, char* uplo, lapack_int* n, lapack_int* kd,\n                   lapack_complex_float* ab, lapack_int* ldab, float* w,\n                   lapack_complex_float* z, lapack_int* ldz,\n                   lapack_complex_float* work, float* rwork, lapack_int *info );\nvoid LAPACK_zhbev( char* jobz, char* uplo, lapack_int* n, lapack_int* kd,\n                   lapack_complex_double* ab, lapack_int* ldab, double* w,\n                   lapack_complex_double* z, lapack_int* ldz,\n                   lapack_complex_double* work, double* rwork,\n                   lapack_int *info );\nvoid LAPACK_ssbevd( char* jobz, char* uplo, lapack_int* n, lapack_int* kd,\n                    float* ab, lapack_int* ldab, float* w, float* z,\n                    lapack_int* ldz, float* work, lapack_int* lwork,\n                    lapack_int* iwork, lapack_int* liwork, lapack_int *info );\nvoid LAPACK_dsbevd( char* jobz, char* uplo, lapack_int* n, lapack_int* kd,\n                    double* ab, lapack_int* ldab, double* w, double* z,\n                    lapack_int* ldz, double* work, lapack_int* lwork,\n                    lapack_int* iwork, lapack_int* liwork, lapack_int *info );\nvoid LAPACK_chbevd( char* jobz, char* uplo, lapack_int* n, lapack_int* kd,\n                    lapack_complex_float* ab, lapack_int* ldab, float* w,\n                    lapack_complex_float* z, lapack_int* ldz,\n                    lapack_complex_float* work, lapack_int* lwork, float* rwork,\n                    lapack_int* lrwork, lapack_int* iwork, lapack_int* liwork,\n                    lapack_int *info );\nvoid LAPACK_zhbevd( char* jobz, char* uplo, lapack_int* n, lapack_int* kd,\n                    lapack_complex_double* ab, lapack_int* ldab, double* w,\n                    lapack_complex_double* z, lapack_int* ldz,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    double* rwork, lapack_int* lrwork, lapack_int* iwork,\n                    lapack_int* liwork, lapack_int *info );\nvoid LAPACK_ssbevx( char* jobz, char* range, char* uplo, lapack_int* n,\n                    lapack_int* kd, float* ab, lapack_int* ldab, float* q,\n                    lapack_int* ldq, float* vl, float* vu, lapack_int* il,\n                    lapack_int* iu, float* abstol, lapack_int* m, float* w,\n                    float* z, lapack_int* ldz, float* work, lapack_int* iwork,\n                    lapack_int* ifail, lapack_int *info );\nvoid LAPACK_dsbevx( char* jobz, char* range, char* uplo, lapack_int* n,\n                    lapack_int* kd, double* ab, lapack_int* ldab, double* q,\n                    lapack_int* ldq, double* vl, double* vu, lapack_int* il,\n                    lapack_int* iu, double* abstol, lapack_int* m, double* w,\n                    double* z, lapack_int* ldz, double* work, lapack_int* iwork,\n                    lapack_int* ifail, lapack_int *info );\nvoid LAPACK_chbevx( char* jobz, char* range, char* uplo, lapack_int* n,\n                    lapack_int* kd, lapack_complex_float* ab, lapack_int* ldab,\n                    lapack_complex_float* q, lapack_int* ldq, float* vl,\n                    float* vu, lapack_int* il, lapack_int* iu, float* abstol,\n                    lapack_int* m, float* w, lapack_complex_float* z,\n                    lapack_int* ldz, lapack_complex_float* work, float* rwork,\n                    lapack_int* iwork, lapack_int* ifail, lapack_int *info );\nvoid LAPACK_zhbevx( char* jobz, char* range, char* uplo, lapack_int* n,\n                    lapack_int* kd, lapack_complex_double* ab, lapack_int* ldab,\n                    lapack_complex_double* q, lapack_int* ldq, double* vl,\n                    double* vu, lapack_int* il, lapack_int* iu, double* abstol,\n                    lapack_int* m, double* w, lapack_complex_double* z,\n                    lapack_int* ldz, lapack_complex_double* work, double* rwork,\n                    lapack_int* iwork, lapack_int* ifail, lapack_int *info );\nvoid LAPACK_sstev( char* jobz, lapack_int* n, float* d, float* e, float* z,\n                   lapack_int* ldz, float* work, lapack_int *info );\nvoid LAPACK_dstev( char* jobz, lapack_int* n, double* d, double* e, double* z,\n                   lapack_int* ldz, double* work, lapack_int *info );\nvoid LAPACK_sstevd( char* jobz, lapack_int* n, float* d, float* e, float* z,\n                    lapack_int* ldz, float* work, lapack_int* lwork,\n                    lapack_int* iwork, lapack_int* liwork, lapack_int *info );\nvoid LAPACK_dstevd( char* jobz, lapack_int* n, double* d, double* e, double* z,\n                    lapack_int* ldz, double* work, lapack_int* lwork,\n                    lapack_int* iwork, lapack_int* liwork, lapack_int *info );\nvoid LAPACK_sstevx( char* jobz, char* range, lapack_int* n, float* d, float* e,\n                    float* vl, float* vu, lapack_int* il, lapack_int* iu,\n                    float* abstol, lapack_int* m, float* w, float* z,\n                    lapack_int* ldz, float* work, lapack_int* iwork,\n                    lapack_int* ifail, lapack_int *info );\nvoid LAPACK_dstevx( char* jobz, char* range, lapack_int* n, double* d,\n                    double* e, double* vl, double* vu, lapack_int* il,\n                    lapack_int* iu, double* abstol, lapack_int* m, double* w,\n                    double* z, lapack_int* ldz, double* work, lapack_int* iwork,\n                    lapack_int* ifail, lapack_int *info );\nvoid LAPACK_sstevr( char* jobz, char* range, lapack_int* n, float* d, float* e,\n                    float* vl, float* vu, lapack_int* il, lapack_int* iu,\n                    float* abstol, lapack_int* m, float* w, float* z,\n                    lapack_int* ldz, lapack_int* isuppz, float* work,\n                    lapack_int* lwork, lapack_int* iwork, lapack_int* liwork,\n                    lapack_int *info );\nvoid LAPACK_dstevr( char* jobz, char* range, lapack_int* n, double* d,\n                    double* e, double* vl, double* vu, lapack_int* il,\n                    lapack_int* iu, double* abstol, lapack_int* m, double* w,\n                    double* z, lapack_int* ldz, lapack_int* isuppz,\n                    double* work, lapack_int* lwork, lapack_int* iwork,\n                    lapack_int* liwork, lapack_int *info );\nvoid LAPACK_sgees( char* jobvs, char* sort, LAPACK_S_SELECT2 select,\n                   lapack_int* n, float* a, lapack_int* lda, lapack_int* sdim,\n                   float* wr, float* wi, float* vs, lapack_int* ldvs,\n                   float* work, lapack_int* lwork, lapack_logical* bwork,\n                   lapack_int *info );\nvoid LAPACK_dgees( char* jobvs, char* sort, LAPACK_D_SELECT2 select,\n                   lapack_int* n, double* a, lapack_int* lda, lapack_int* sdim,\n                   double* wr, double* wi, double* vs, lapack_int* ldvs,\n                   double* work, lapack_int* lwork, lapack_logical* bwork,\n                   lapack_int *info );\nvoid LAPACK_cgees( char* jobvs, char* sort, LAPACK_C_SELECT1 select,\n                   lapack_int* n, lapack_complex_float* a, lapack_int* lda,\n                   lapack_int* sdim, lapack_complex_float* w,\n                   lapack_complex_float* vs, lapack_int* ldvs,\n                   lapack_complex_float* work, lapack_int* lwork, float* rwork,\n                   lapack_logical* bwork, lapack_int *info );\nvoid LAPACK_zgees( char* jobvs, char* sort, LAPACK_Z_SELECT1 select,\n                   lapack_int* n, lapack_complex_double* a, lapack_int* lda,\n                   lapack_int* sdim, lapack_complex_double* w,\n                   lapack_complex_double* vs, lapack_int* ldvs,\n                   lapack_complex_double* work, lapack_int* lwork,\n                   double* rwork, lapack_logical* bwork, lapack_int *info );\nvoid LAPACK_sgeesx( char* jobvs, char* sort, LAPACK_S_SELECT2 select,\n                    char* sense, lapack_int* n, float* a, lapack_int* lda,\n                    lapack_int* sdim, float* wr, float* wi, float* vs,\n                    lapack_int* ldvs, float* rconde, float* rcondv, float* work,\n                    lapack_int* lwork, lapack_int* iwork, lapack_int* liwork,\n                    lapack_logical* bwork, lapack_int *info );\nvoid LAPACK_dgeesx( char* jobvs, char* sort, LAPACK_D_SELECT2 select,\n                    char* sense, lapack_int* n, double* a, lapack_int* lda,\n                    lapack_int* sdim, double* wr, double* wi, double* vs,\n                    lapack_int* ldvs, double* rconde, double* rcondv,\n                    double* work, lapack_int* lwork, lapack_int* iwork,\n                    lapack_int* liwork, lapack_logical* bwork,\n                    lapack_int *info );\nvoid LAPACK_cgeesx( char* jobvs, char* sort, LAPACK_C_SELECT1 select,\n                    char* sense, lapack_int* n, lapack_complex_float* a,\n                    lapack_int* lda, lapack_int* sdim, lapack_complex_float* w,\n                    lapack_complex_float* vs, lapack_int* ldvs, float* rconde,\n                    float* rcondv, lapack_complex_float* work,\n                    lapack_int* lwork, float* rwork, lapack_logical* bwork,\n                    lapack_int *info );\nvoid LAPACK_zgeesx( char* jobvs, char* sort, LAPACK_Z_SELECT1 select,\n                    char* sense, lapack_int* n, lapack_complex_double* a,\n                    lapack_int* lda, lapack_int* sdim, lapack_complex_double* w,\n                    lapack_complex_double* vs, lapack_int* ldvs, double* rconde,\n                    double* rcondv, lapack_complex_double* work,\n                    lapack_int* lwork, double* rwork, lapack_logical* bwork,\n                    lapack_int *info );\nvoid LAPACK_sgeev( char* jobvl, char* jobvr, lapack_int* n, float* a,\n                   lapack_int* lda, float* wr, float* wi, float* vl,\n                   lapack_int* ldvl, float* vr, lapack_int* ldvr, float* work,\n                   lapack_int* lwork, lapack_int *info );\nvoid LAPACK_dgeev( char* jobvl, char* jobvr, lapack_int* n, double* a,\n                   lapack_int* lda, double* wr, double* wi, double* vl,\n                   lapack_int* ldvl, double* vr, lapack_int* ldvr, double* work,\n                   lapack_int* lwork, lapack_int *info );\nvoid LAPACK_cgeev( char* jobvl, char* jobvr, lapack_int* n,\n                   lapack_complex_float* a, lapack_int* lda,\n                   lapack_complex_float* w, lapack_complex_float* vl,\n                   lapack_int* ldvl, lapack_complex_float* vr, lapack_int* ldvr,\n                   lapack_complex_float* work, lapack_int* lwork, float* rwork,\n                   lapack_int *info );\nvoid LAPACK_zgeev( char* jobvl, char* jobvr, lapack_int* n,\n                   lapack_complex_double* a, lapack_int* lda,\n                   lapack_complex_double* w, lapack_complex_double* vl,\n                   lapack_int* ldvl, lapack_complex_double* vr,\n                   lapack_int* ldvr, lapack_complex_double* work,\n                   lapack_int* lwork, double* rwork, lapack_int *info );\nvoid LAPACK_sgeevx( char* balanc, char* jobvl, char* jobvr, char* sense,\n                    lapack_int* n, float* a, lapack_int* lda, float* wr,\n                    float* wi, float* vl, lapack_int* ldvl, float* vr,\n                    lapack_int* ldvr, lapack_int* ilo, lapack_int* ihi,\n                    float* scale, float* abnrm, float* rconde, float* rcondv,\n                    float* work, lapack_int* lwork, lapack_int* iwork,\n                    lapack_int *info );\nvoid LAPACK_dgeevx( char* balanc, char* jobvl, char* jobvr, char* sense,\n                    lapack_int* n, double* a, lapack_int* lda, double* wr,\n                    double* wi, double* vl, lapack_int* ldvl, double* vr,\n                    lapack_int* ldvr, lapack_int* ilo, lapack_int* ihi,\n                    double* scale, double* abnrm, double* rconde,\n                    double* rcondv, double* work, lapack_int* lwork,\n                    lapack_int* iwork, lapack_int *info );\nvoid LAPACK_cgeevx( char* balanc, char* jobvl, char* jobvr, char* sense,\n                    lapack_int* n, lapack_complex_float* a, lapack_int* lda,\n                    lapack_complex_float* w, lapack_complex_float* vl,\n                    lapack_int* ldvl, lapack_complex_float* vr,\n                    lapack_int* ldvr, lapack_int* ilo, lapack_int* ihi,\n                    float* scale, float* abnrm, float* rconde, float* rcondv,\n                    lapack_complex_float* work, lapack_int* lwork, float* rwork,\n                    lapack_int *info );\nvoid LAPACK_zgeevx( char* balanc, char* jobvl, char* jobvr, char* sense,\n                    lapack_int* n, lapack_complex_double* a, lapack_int* lda,\n                    lapack_complex_double* w, lapack_complex_double* vl,\n                    lapack_int* ldvl, lapack_complex_double* vr,\n                    lapack_int* ldvr, lapack_int* ilo, lapack_int* ihi,\n                    double* scale, double* abnrm, double* rconde,\n                    double* rcondv, lapack_complex_double* work,\n                    lapack_int* lwork, double* rwork, lapack_int *info );\nvoid LAPACK_sgesvd( char* jobu, char* jobvt, lapack_int* m, lapack_int* n,\n                    float* a, lapack_int* lda, float* s, float* u,\n                    lapack_int* ldu, float* vt, lapack_int* ldvt, float* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_dgesvd( char* jobu, char* jobvt, lapack_int* m, lapack_int* n,\n                    double* a, lapack_int* lda, double* s, double* u,\n                    lapack_int* ldu, double* vt, lapack_int* ldvt, double* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_cgesvd( char* jobu, char* jobvt, lapack_int* m, lapack_int* n,\n                    lapack_complex_float* a, lapack_int* lda, float* s,\n                    lapack_complex_float* u, lapack_int* ldu,\n                    lapack_complex_float* vt, lapack_int* ldvt,\n                    lapack_complex_float* work, lapack_int* lwork, float* rwork,\n                    lapack_int *info );\nvoid LAPACK_zgesvd( char* jobu, char* jobvt, lapack_int* m, lapack_int* n,\n                    lapack_complex_double* a, lapack_int* lda, double* s,\n                    lapack_complex_double* u, lapack_int* ldu,\n                    lapack_complex_double* vt, lapack_int* ldvt,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    double* rwork, lapack_int *info );\nvoid LAPACK_sgesdd( char* jobz, lapack_int* m, lapack_int* n, float* a,\n                    lapack_int* lda, float* s, float* u, lapack_int* ldu,\n                    float* vt, lapack_int* ldvt, float* work, lapack_int* lwork,\n                    lapack_int* iwork, lapack_int *info );\nvoid LAPACK_dgesdd( char* jobz, lapack_int* m, lapack_int* n, double* a,\n                    lapack_int* lda, double* s, double* u, lapack_int* ldu,\n                    double* vt, lapack_int* ldvt, double* work,\n                    lapack_int* lwork, lapack_int* iwork, lapack_int *info );\nvoid LAPACK_cgesdd( char* jobz, lapack_int* m, lapack_int* n,\n                    lapack_complex_float* a, lapack_int* lda, float* s,\n                    lapack_complex_float* u, lapack_int* ldu,\n                    lapack_complex_float* vt, lapack_int* ldvt,\n                    lapack_complex_float* work, lapack_int* lwork, float* rwork,\n                    lapack_int* iwork, lapack_int *info );\nvoid LAPACK_zgesdd( char* jobz, lapack_int* m, lapack_int* n,\n                    lapack_complex_double* a, lapack_int* lda, double* s,\n                    lapack_complex_double* u, lapack_int* ldu,\n                    lapack_complex_double* vt, lapack_int* ldvt,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    double* rwork, lapack_int* iwork, lapack_int *info );\nvoid LAPACK_dgejsv( char* joba, char* jobu, char* jobv, char* jobr, char* jobt,\n                    char* jobp, lapack_int* m, lapack_int* n, double* a,\n                    lapack_int* lda, double* sva, double* u, lapack_int* ldu,\n                    double* v, lapack_int* ldv, double* work, lapack_int* lwork,\n                    lapack_int* iwork, lapack_int *info );\nvoid LAPACK_sgejsv( char* joba, char* jobu, char* jobv, char* jobr, char* jobt,\n                    char* jobp, lapack_int* m, lapack_int* n, float* a,\n                    lapack_int* lda, float* sva, float* u, lapack_int* ldu,\n                    float* v, lapack_int* ldv, float* work, lapack_int* lwork,\n                    lapack_int* iwork, lapack_int *info );\nvoid LAPACK_dgesvj( char* joba, char* jobu, char* jobv, lapack_int* m,\n                    lapack_int* n, double* a, lapack_int* lda, double* sva,\n                    lapack_int* mv, double* v, lapack_int* ldv, double* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_sgesvj( char* joba, char* jobu, char* jobv, lapack_int* m,\n                    lapack_int* n, float* a, lapack_int* lda, float* sva,\n                    lapack_int* mv, float* v, lapack_int* ldv, float* work,\n                    lapack_int* lwork, lapack_int *info );\nvoid LAPACK_sggsvd( char* jobu, char* jobv, char* jobq, lapack_int* m,\n                    lapack_int* n, lapack_int* p, lapack_int* k, lapack_int* l,\n                    float* a, lapack_int* lda, float* b, lapack_int* ldb,\n                    float* alpha, float* beta, float* u, lapack_int* ldu,\n                    float* v, lapack_int* ldv, float* q, lapack_int* ldq,\n                    float* work, lapack_int* iwork, lapack_int *info );\nvoid LAPACK_dggsvd( char* jobu, char* jobv, char* jobq, lapack_int* m,\n                    lapack_int* n, lapack_int* p, lapack_int* k, lapack_int* l,\n                    double* a, lapack_int* lda, double* b, lapack_int* ldb,\n                    double* alpha, double* beta, double* u, lapack_int* ldu,\n                    double* v, lapack_int* ldv, double* q, lapack_int* ldq,\n                    double* work, lapack_int* iwork, lapack_int *info );\nvoid LAPACK_cggsvd( char* jobu, char* jobv, char* jobq, lapack_int* m,\n                    lapack_int* n, lapack_int* p, lapack_int* k, lapack_int* l,\n                    lapack_complex_float* a, lapack_int* lda,\n                    lapack_complex_float* b, lapack_int* ldb, float* alpha,\n                    float* beta, lapack_complex_float* u, lapack_int* ldu,\n                    lapack_complex_float* v, lapack_int* ldv,\n                    lapack_complex_float* q, lapack_int* ldq,\n                    lapack_complex_float* work, float* rwork, lapack_int* iwork,\n                    lapack_int *info );\nvoid LAPACK_zggsvd( char* jobu, char* jobv, char* jobq, lapack_int* m,\n                    lapack_int* n, lapack_int* p, lapack_int* k, lapack_int* l,\n                    lapack_complex_double* a, lapack_int* lda,\n                    lapack_complex_double* b, lapack_int* ldb, double* alpha,\n                    double* beta, lapack_complex_double* u, lapack_int* ldu,\n                    lapack_complex_double* v, lapack_int* ldv,\n                    lapack_complex_double* q, lapack_int* ldq,\n                    lapack_complex_double* work, double* rwork,\n                    lapack_int* iwork, lapack_int *info );\nvoid LAPACK_ssygv( lapack_int* itype, char* jobz, char* uplo, lapack_int* n,\n                   float* a, lapack_int* lda, float* b, lapack_int* ldb,\n                   float* w, float* work, lapack_int* lwork, lapack_int *info );\nvoid LAPACK_dsygv( lapack_int* itype, char* jobz, char* uplo, lapack_int* n,\n                   double* a, lapack_int* lda, double* b, lapack_int* ldb,\n                   double* w, double* work, lapack_int* lwork,\n                   lapack_int *info );\nvoid LAPACK_chegv( lapack_int* itype, char* jobz, char* uplo, lapack_int* n,\n                   lapack_complex_float* a, lapack_int* lda,\n                   lapack_complex_float* b, lapack_int* ldb, float* w,\n                   lapack_complex_float* work, lapack_int* lwork, float* rwork,\n                   lapack_int *info );\nvoid LAPACK_zhegv( lapack_int* itype, char* jobz, char* uplo, lapack_int* n,\n                   lapack_complex_double* a, lapack_int* lda,\n                   lapack_complex_double* b, lapack_int* ldb, double* w,\n                   lapack_complex_double* work, lapack_int* lwork,\n                   double* rwork, lapack_int *info );\nvoid LAPACK_ssygvd( lapack_int* itype, char* jobz, char* uplo, lapack_int* n,\n                    float* a, lapack_int* lda, float* b, lapack_int* ldb,\n                    float* w, float* work, lapack_int* lwork, lapack_int* iwork,\n                    lapack_int* liwork, lapack_int *info );\nvoid LAPACK_dsygvd( lapack_int* itype, char* jobz, char* uplo, lapack_int* n,\n                    double* a, lapack_int* lda, double* b, lapack_int* ldb,\n                    double* w, double* work, lapack_int* lwork,\n                    lapack_int* iwork, lapack_int* liwork, lapack_int *info );\nvoid LAPACK_chegvd( lapack_int* itype, char* jobz, char* uplo, lapack_int* n,\n                    lapack_complex_float* a, lapack_int* lda,\n                    lapack_complex_float* b, lapack_int* ldb, float* w,\n                    lapack_complex_float* work, lapack_int* lwork, float* rwork,\n                    lapack_int* lrwork, lapack_int* iwork, lapack_int* liwork,\n                    lapack_int *info );\nvoid LAPACK_zhegvd( lapack_int* itype, char* jobz, char* uplo, lapack_int* n,\n                    lapack_complex_double* a, lapack_int* lda,\n                    lapack_complex_double* b, lapack_int* ldb, double* w,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    double* rwork, lapack_int* lrwork, lapack_int* iwork,\n                    lapack_int* liwork, lapack_int *info );\nvoid LAPACK_ssygvx( lapack_int* itype, char* jobz, char* range, char* uplo,\n                    lapack_int* n, float* a, lapack_int* lda, float* b,\n                    lapack_int* ldb, float* vl, float* vu, lapack_int* il,\n                    lapack_int* iu, float* abstol, lapack_int* m, float* w,\n                    float* z, lapack_int* ldz, float* work, lapack_int* lwork,\n                    lapack_int* iwork, lapack_int* ifail, lapack_int *info );\nvoid LAPACK_dsygvx( lapack_int* itype, char* jobz, char* range, char* uplo,\n                    lapack_int* n, double* a, lapack_int* lda, double* b,\n                    lapack_int* ldb, double* vl, double* vu, lapack_int* il,\n                    lapack_int* iu, double* abstol, lapack_int* m, double* w,\n                    double* z, lapack_int* ldz, double* work, lapack_int* lwork,\n                    lapack_int* iwork, lapack_int* ifail, lapack_int *info );\nvoid LAPACK_chegvx( lapack_int* itype, char* jobz, char* range, char* uplo,\n                    lapack_int* n, lapack_complex_float* a, lapack_int* lda,\n                    lapack_complex_float* b, lapack_int* ldb, float* vl,\n                    float* vu, lapack_int* il, lapack_int* iu, float* abstol,\n                    lapack_int* m, float* w, lapack_complex_float* z,\n                    lapack_int* ldz, lapack_complex_float* work,\n                    lapack_int* lwork, float* rwork, lapack_int* iwork,\n                    lapack_int* ifail, lapack_int *info );\nvoid LAPACK_zhegvx( lapack_int* itype, char* jobz, char* range, char* uplo,\n                    lapack_int* n, lapack_complex_double* a, lapack_int* lda,\n                    lapack_complex_double* b, lapack_int* ldb, double* vl,\n                    double* vu, lapack_int* il, lapack_int* iu, double* abstol,\n                    lapack_int* m, double* w, lapack_complex_double* z,\n                    lapack_int* ldz, lapack_complex_double* work,\n                    lapack_int* lwork, double* rwork, lapack_int* iwork,\n                    lapack_int* ifail, lapack_int *info );\nvoid LAPACK_sspgv( lapack_int* itype, char* jobz, char* uplo, lapack_int* n,\n                   float* ap, float* bp, float* w, float* z, lapack_int* ldz,\n                   float* work, lapack_int *info );\nvoid LAPACK_dspgv( lapack_int* itype, char* jobz, char* uplo, lapack_int* n,\n                   double* ap, double* bp, double* w, double* z,\n                   lapack_int* ldz, double* work, lapack_int *info );\nvoid LAPACK_chpgv( lapack_int* itype, char* jobz, char* uplo, lapack_int* n,\n                   lapack_complex_float* ap, lapack_complex_float* bp, float* w,\n                   lapack_complex_float* z, lapack_int* ldz,\n                   lapack_complex_float* work, float* rwork, lapack_int *info );\nvoid LAPACK_zhpgv( lapack_int* itype, char* jobz, char* uplo, lapack_int* n,\n                   lapack_complex_double* ap, lapack_complex_double* bp,\n                   double* w, lapack_complex_double* z, lapack_int* ldz,\n                   lapack_complex_double* work, double* rwork,\n                   lapack_int *info );\nvoid LAPACK_sspgvd( lapack_int* itype, char* jobz, char* uplo, lapack_int* n,\n                    float* ap, float* bp, float* w, float* z, lapack_int* ldz,\n                    float* work, lapack_int* lwork, lapack_int* iwork,\n                    lapack_int* liwork, lapack_int *info );\nvoid LAPACK_dspgvd( lapack_int* itype, char* jobz, char* uplo, lapack_int* n,\n                    double* ap, double* bp, double* w, double* z,\n                    lapack_int* ldz, double* work, lapack_int* lwork,\n                    lapack_int* iwork, lapack_int* liwork, lapack_int *info );\nvoid LAPACK_chpgvd( lapack_int* itype, char* jobz, char* uplo, lapack_int* n,\n                    lapack_complex_float* ap, lapack_complex_float* bp,\n                    float* w, lapack_complex_float* z, lapack_int* ldz,\n                    lapack_complex_float* work, lapack_int* lwork, float* rwork,\n                    lapack_int* lrwork, lapack_int* iwork, lapack_int* liwork,\n                    lapack_int *info );\nvoid LAPACK_zhpgvd( lapack_int* itype, char* jobz, char* uplo, lapack_int* n,\n                    lapack_complex_double* ap, lapack_complex_double* bp,\n                    double* w, lapack_complex_double* z, lapack_int* ldz,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    double* rwork, lapack_int* lrwork, lapack_int* iwork,\n                    lapack_int* liwork, lapack_int *info );\nvoid LAPACK_sspgvx( lapack_int* itype, char* jobz, char* range, char* uplo,\n                    lapack_int* n, float* ap, float* bp, float* vl, float* vu,\n                    lapack_int* il, lapack_int* iu, float* abstol,\n                    lapack_int* m, float* w, float* z, lapack_int* ldz,\n                    float* work, lapack_int* iwork, lapack_int* ifail,\n                    lapack_int *info );\nvoid LAPACK_dspgvx( lapack_int* itype, char* jobz, char* range, char* uplo,\n                    lapack_int* n, double* ap, double* bp, double* vl,\n                    double* vu, lapack_int* il, lapack_int* iu, double* abstol,\n                    lapack_int* m, double* w, double* z, lapack_int* ldz,\n                    double* work, lapack_int* iwork, lapack_int* ifail,\n                    lapack_int *info );\nvoid LAPACK_chpgvx( lapack_int* itype, char* jobz, char* range, char* uplo,\n                    lapack_int* n, lapack_complex_float* ap,\n                    lapack_complex_float* bp, float* vl, float* vu,\n                    lapack_int* il, lapack_int* iu, float* abstol,\n                    lapack_int* m, float* w, lapack_complex_float* z,\n                    lapack_int* ldz, lapack_complex_float* work, float* rwork,\n                    lapack_int* iwork, lapack_int* ifail, lapack_int *info );\nvoid LAPACK_zhpgvx( lapack_int* itype, char* jobz, char* range, char* uplo,\n                    lapack_int* n, lapack_complex_double* ap,\n                    lapack_complex_double* bp, double* vl, double* vu,\n                    lapack_int* il, lapack_int* iu, double* abstol,\n                    lapack_int* m, double* w, lapack_complex_double* z,\n                    lapack_int* ldz, lapack_complex_double* work, double* rwork,\n                    lapack_int* iwork, lapack_int* ifail, lapack_int *info );\nvoid LAPACK_ssbgv( char* jobz, char* uplo, lapack_int* n, lapack_int* ka,\n                   lapack_int* kb, float* ab, lapack_int* ldab, float* bb,\n                   lapack_int* ldbb, float* w, float* z, lapack_int* ldz,\n                   float* work, lapack_int *info );\nvoid LAPACK_dsbgv( char* jobz, char* uplo, lapack_int* n, lapack_int* ka,\n                   lapack_int* kb, double* ab, lapack_int* ldab, double* bb,\n                   lapack_int* ldbb, double* w, double* z, lapack_int* ldz,\n                   double* work, lapack_int *info );\nvoid LAPACK_chbgv( char* jobz, char* uplo, lapack_int* n, lapack_int* ka,\n                   lapack_int* kb, lapack_complex_float* ab, lapack_int* ldab,\n                   lapack_complex_float* bb, lapack_int* ldbb, float* w,\n                   lapack_complex_float* z, lapack_int* ldz,\n                   lapack_complex_float* work, float* rwork, lapack_int *info );\nvoid LAPACK_zhbgv( char* jobz, char* uplo, lapack_int* n, lapack_int* ka,\n                   lapack_int* kb, lapack_complex_double* ab, lapack_int* ldab,\n                   lapack_complex_double* bb, lapack_int* ldbb, double* w,\n                   lapack_complex_double* z, lapack_int* ldz,\n                   lapack_complex_double* work, double* rwork,\n                   lapack_int *info );\nvoid LAPACK_ssbgvd( char* jobz, char* uplo, lapack_int* n, lapack_int* ka,\n                    lapack_int* kb, float* ab, lapack_int* ldab, float* bb,\n                    lapack_int* ldbb, float* w, float* z, lapack_int* ldz,\n                    float* work, lapack_int* lwork, lapack_int* iwork,\n                    lapack_int* liwork, lapack_int *info );\nvoid LAPACK_dsbgvd( char* jobz, char* uplo, lapack_int* n, lapack_int* ka,\n                    lapack_int* kb, double* ab, lapack_int* ldab, double* bb,\n                    lapack_int* ldbb, double* w, double* z, lapack_int* ldz,\n                    double* work, lapack_int* lwork, lapack_int* iwork,\n                    lapack_int* liwork, lapack_int *info );\nvoid LAPACK_chbgvd( char* jobz, char* uplo, lapack_int* n, lapack_int* ka,\n                    lapack_int* kb, lapack_complex_float* ab, lapack_int* ldab,\n                    lapack_complex_float* bb, lapack_int* ldbb, float* w,\n                    lapack_complex_float* z, lapack_int* ldz,\n                    lapack_complex_float* work, lapack_int* lwork, float* rwork,\n                    lapack_int* lrwork, lapack_int* iwork, lapack_int* liwork,\n                    lapack_int *info );\nvoid LAPACK_zhbgvd( char* jobz, char* uplo, lapack_int* n, lapack_int* ka,\n                    lapack_int* kb, lapack_complex_double* ab, lapack_int* ldab,\n                    lapack_complex_double* bb, lapack_int* ldbb, double* w,\n                    lapack_complex_double* z, lapack_int* ldz,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    double* rwork, lapack_int* lrwork, lapack_int* iwork,\n                    lapack_int* liwork, lapack_int *info );\nvoid LAPACK_ssbgvx( char* jobz, char* range, char* uplo, lapack_int* n,\n                    lapack_int* ka, lapack_int* kb, float* ab, lapack_int* ldab,\n                    float* bb, lapack_int* ldbb, float* q, lapack_int* ldq,\n                    float* vl, float* vu, lapack_int* il, lapack_int* iu,\n                    float* abstol, lapack_int* m, float* w, float* z,\n                    lapack_int* ldz, float* work, lapack_int* iwork,\n                    lapack_int* ifail, lapack_int *info );\nvoid LAPACK_dsbgvx( char* jobz, char* range, char* uplo, lapack_int* n,\n                    lapack_int* ka, lapack_int* kb, double* ab,\n                    lapack_int* ldab, double* bb, lapack_int* ldbb, double* q,\n                    lapack_int* ldq, double* vl, double* vu, lapack_int* il,\n                    lapack_int* iu, double* abstol, lapack_int* m, double* w,\n                    double* z, lapack_int* ldz, double* work, lapack_int* iwork,\n                    lapack_int* ifail, lapack_int *info );\nvoid LAPACK_chbgvx( char* jobz, char* range, char* uplo, lapack_int* n,\n                    lapack_int* ka, lapack_int* kb, lapack_complex_float* ab,\n                    lapack_int* ldab, lapack_complex_float* bb,\n                    lapack_int* ldbb, lapack_complex_float* q, lapack_int* ldq,\n                    float* vl, float* vu, lapack_int* il, lapack_int* iu,\n                    float* abstol, lapack_int* m, float* w,\n                    lapack_complex_float* z, lapack_int* ldz,\n                    lapack_complex_float* work, float* rwork, lapack_int* iwork,\n                    lapack_int* ifail, lapack_int *info );\nvoid LAPACK_zhbgvx( char* jobz, char* range, char* uplo, lapack_int* n,\n                    lapack_int* ka, lapack_int* kb, lapack_complex_double* ab,\n                    lapack_int* ldab, lapack_complex_double* bb,\n                    lapack_int* ldbb, lapack_complex_double* q, lapack_int* ldq,\n                    double* vl, double* vu, lapack_int* il, lapack_int* iu,\n                    double* abstol, lapack_int* m, double* w,\n                    lapack_complex_double* z, lapack_int* ldz,\n                    lapack_complex_double* work, double* rwork,\n                    lapack_int* iwork, lapack_int* ifail, lapack_int *info );\nvoid LAPACK_sgges( char* jobvsl, char* jobvsr, char* sort,\n                   LAPACK_S_SELECT3 selctg, lapack_int* n, float* a,\n                   lapack_int* lda, float* b, lapack_int* ldb, lapack_int* sdim,\n                   float* alphar, float* alphai, float* beta, float* vsl,\n                   lapack_int* ldvsl, float* vsr, lapack_int* ldvsr,\n                   float* work, lapack_int* lwork, lapack_logical* bwork,\n                   lapack_int *info );\nvoid LAPACK_dgges( char* jobvsl, char* jobvsr, char* sort,\n                   LAPACK_D_SELECT3 selctg, lapack_int* n, double* a,\n                   lapack_int* lda, double* b, lapack_int* ldb,\n                   lapack_int* sdim, double* alphar, double* alphai,\n                   double* beta, double* vsl, lapack_int* ldvsl, double* vsr,\n                   lapack_int* ldvsr, double* work, lapack_int* lwork,\n                   lapack_logical* bwork, lapack_int *info );\nvoid LAPACK_cgges( char* jobvsl, char* jobvsr, char* sort,\n                   LAPACK_C_SELECT2 selctg, lapack_int* n,\n                   lapack_complex_float* a, lapack_int* lda,\n                   lapack_complex_float* b, lapack_int* ldb, lapack_int* sdim,\n                   lapack_complex_float* alpha, lapack_complex_float* beta,\n                   lapack_complex_float* vsl, lapack_int* ldvsl,\n                   lapack_complex_float* vsr, lapack_int* ldvsr,\n                   lapack_complex_float* work, lapack_int* lwork, float* rwork,\n                   lapack_logical* bwork, lapack_int *info );\nvoid LAPACK_zgges( char* jobvsl, char* jobvsr, char* sort,\n                   LAPACK_Z_SELECT2 selctg, lapack_int* n,\n                   lapack_complex_double* a, lapack_int* lda,\n                   lapack_complex_double* b, lapack_int* ldb, lapack_int* sdim,\n                   lapack_complex_double* alpha, lapack_complex_double* beta,\n                   lapack_complex_double* vsl, lapack_int* ldvsl,\n                   lapack_complex_double* vsr, lapack_int* ldvsr,\n                   lapack_complex_double* work, lapack_int* lwork,\n                   double* rwork, lapack_logical* bwork, lapack_int *info );\nvoid LAPACK_sggesx( char* jobvsl, char* jobvsr, char* sort,\n                    LAPACK_S_SELECT3 selctg, char* sense, lapack_int* n,\n                    float* a, lapack_int* lda, float* b, lapack_int* ldb,\n                    lapack_int* sdim, float* alphar, float* alphai, float* beta,\n                    float* vsl, lapack_int* ldvsl, float* vsr,\n                    lapack_int* ldvsr, float* rconde, float* rcondv,\n                    float* work, lapack_int* lwork, lapack_int* iwork,\n                    lapack_int* liwork, lapack_logical* bwork,\n                    lapack_int *info );\nvoid LAPACK_dggesx( char* jobvsl, char* jobvsr, char* sort,\n                    LAPACK_D_SELECT3 selctg, char* sense, lapack_int* n,\n                    double* a, lapack_int* lda, double* b, lapack_int* ldb,\n                    lapack_int* sdim, double* alphar, double* alphai,\n                    double* beta, double* vsl, lapack_int* ldvsl, double* vsr,\n                    lapack_int* ldvsr, double* rconde, double* rcondv,\n                    double* work, lapack_int* lwork, lapack_int* iwork,\n                    lapack_int* liwork, lapack_logical* bwork,\n                    lapack_int *info );\nvoid LAPACK_cggesx( char* jobvsl, char* jobvsr, char* sort,\n                    LAPACK_C_SELECT2 selctg, char* sense, lapack_int* n,\n                    lapack_complex_float* a, lapack_int* lda,\n                    lapack_complex_float* b, lapack_int* ldb, lapack_int* sdim,\n                    lapack_complex_float* alpha, lapack_complex_float* beta,\n                    lapack_complex_float* vsl, lapack_int* ldvsl,\n                    lapack_complex_float* vsr, lapack_int* ldvsr, float* rconde,\n                    float* rcondv, lapack_complex_float* work,\n                    lapack_int* lwork, float* rwork, lapack_int* iwork,\n                    lapack_int* liwork, lapack_logical* bwork,\n                    lapack_int *info );\nvoid LAPACK_zggesx( char* jobvsl, char* jobvsr, char* sort,\n                    LAPACK_Z_SELECT2 selctg, char* sense, lapack_int* n,\n                    lapack_complex_double* a, lapack_int* lda,\n                    lapack_complex_double* b, lapack_int* ldb, lapack_int* sdim,\n                    lapack_complex_double* alpha, lapack_complex_double* beta,\n                    lapack_complex_double* vsl, lapack_int* ldvsl,\n                    lapack_complex_double* vsr, lapack_int* ldvsr,\n                    double* rconde, double* rcondv, lapack_complex_double* work,\n                    lapack_int* lwork, double* rwork, lapack_int* iwork,\n                    lapack_int* liwork, lapack_logical* bwork,\n                    lapack_int *info );\nvoid LAPACK_sggev( char* jobvl, char* jobvr, lapack_int* n, float* a,\n                   lapack_int* lda, float* b, lapack_int* ldb, float* alphar,\n                   float* alphai, float* beta, float* vl, lapack_int* ldvl,\n                   float* vr, lapack_int* ldvr, float* work, lapack_int* lwork,\n                   lapack_int *info );\nvoid LAPACK_dggev( char* jobvl, char* jobvr, lapack_int* n, double* a,\n                   lapack_int* lda, double* b, lapack_int* ldb, double* alphar,\n                   double* alphai, double* beta, double* vl, lapack_int* ldvl,\n                   double* vr, lapack_int* ldvr, double* work,\n                   lapack_int* lwork, lapack_int *info );\nvoid LAPACK_cggev( char* jobvl, char* jobvr, lapack_int* n,\n                   lapack_complex_float* a, lapack_int* lda,\n                   lapack_complex_float* b, lapack_int* ldb,\n                   lapack_complex_float* alpha, lapack_complex_float* beta,\n                   lapack_complex_float* vl, lapack_int* ldvl,\n                   lapack_complex_float* vr, lapack_int* ldvr,\n                   lapack_complex_float* work, lapack_int* lwork, float* rwork,\n                   lapack_int *info );\nvoid LAPACK_zggev( char* jobvl, char* jobvr, lapack_int* n,\n                   lapack_complex_double* a, lapack_int* lda,\n                   lapack_complex_double* b, lapack_int* ldb,\n                   lapack_complex_double* alpha, lapack_complex_double* beta,\n                   lapack_complex_double* vl, lapack_int* ldvl,\n                   lapack_complex_double* vr, lapack_int* ldvr,\n                   lapack_complex_double* work, lapack_int* lwork,\n                   double* rwork, lapack_int *info );\nvoid LAPACK_sggevx( char* balanc, char* jobvl, char* jobvr, char* sense,\n                    lapack_int* n, float* a, lapack_int* lda, float* b,\n                    lapack_int* ldb, float* alphar, float* alphai, float* beta,\n                    float* vl, lapack_int* ldvl, float* vr, lapack_int* ldvr,\n                    lapack_int* ilo, lapack_int* ihi, float* lscale,\n                    float* rscale, float* abnrm, float* bbnrm, float* rconde,\n                    float* rcondv, float* work, lapack_int* lwork,\n                    lapack_int* iwork, lapack_logical* bwork,\n                    lapack_int *info );\nvoid LAPACK_dggevx( char* balanc, char* jobvl, char* jobvr, char* sense,\n                    lapack_int* n, double* a, lapack_int* lda, double* b,\n                    lapack_int* ldb, double* alphar, double* alphai,\n                    double* beta, double* vl, lapack_int* ldvl, double* vr,\n                    lapack_int* ldvr, lapack_int* ilo, lapack_int* ihi,\n                    double* lscale, double* rscale, double* abnrm,\n                    double* bbnrm, double* rconde, double* rcondv, double* work,\n                    lapack_int* lwork, lapack_int* iwork, lapack_logical* bwork,\n                    lapack_int *info );\nvoid LAPACK_cggevx( char* balanc, char* jobvl, char* jobvr, char* sense,\n                    lapack_int* n, lapack_complex_float* a, lapack_int* lda,\n                    lapack_complex_float* b, lapack_int* ldb,\n                    lapack_complex_float* alpha, lapack_complex_float* beta,\n                    lapack_complex_float* vl, lapack_int* ldvl,\n                    lapack_complex_float* vr, lapack_int* ldvr, lapack_int* ilo,\n                    lapack_int* ihi, float* lscale, float* rscale, float* abnrm,\n                    float* bbnrm, float* rconde, float* rcondv,\n                    lapack_complex_float* work, lapack_int* lwork, float* rwork,\n                    lapack_int* iwork, lapack_logical* bwork,\n                    lapack_int *info );\nvoid LAPACK_zggevx( char* balanc, char* jobvl, char* jobvr, char* sense,\n                    lapack_int* n, lapack_complex_double* a, lapack_int* lda,\n                    lapack_complex_double* b, lapack_int* ldb,\n                    lapack_complex_double* alpha, lapack_complex_double* beta,\n                    lapack_complex_double* vl, lapack_int* ldvl,\n                    lapack_complex_double* vr, lapack_int* ldvr,\n                    lapack_int* ilo, lapack_int* ihi, double* lscale,\n                    double* rscale, double* abnrm, double* bbnrm,\n                    double* rconde, double* rcondv, lapack_complex_double* work,\n                    lapack_int* lwork, double* rwork, lapack_int* iwork,\n                    lapack_logical* bwork, lapack_int *info );\nvoid LAPACK_dsfrk( char* transr, char* uplo, char* trans, lapack_int* n,\n                   lapack_int* k, double* alpha, const double* a,\n                   lapack_int* lda, double* beta, double* c );\nvoid LAPACK_ssfrk( char* transr, char* uplo, char* trans, lapack_int* n,\n                   lapack_int* k, float* alpha, const float* a, lapack_int* lda,\n                   float* beta, float* c );\nvoid LAPACK_zhfrk( char* transr, char* uplo, char* trans, lapack_int* n,\n                   lapack_int* k, double* alpha, const lapack_complex_double* a,\n                   lapack_int* lda, double* beta, lapack_complex_double* c );\nvoid LAPACK_chfrk( char* transr, char* uplo, char* trans, lapack_int* n,\n                   lapack_int* k, float* alpha, const lapack_complex_float* a,\n                   lapack_int* lda, float* beta, lapack_complex_float* c );\nvoid LAPACK_dtfsm( char* transr, char* side, char* uplo, char* trans,\n                   char* diag, lapack_int* m, lapack_int* n, double* alpha,\n                   const double* a, double* b, lapack_int* ldb );\nvoid LAPACK_stfsm( char* transr, char* side, char* uplo, char* trans,\n                   char* diag, lapack_int* m, lapack_int* n, float* alpha,\n                   const float* a, float* b, lapack_int* ldb );\nvoid LAPACK_ztfsm( char* transr, char* side, char* uplo, char* trans,\n                   char* diag, lapack_int* m, lapack_int* n,\n                   lapack_complex_double* alpha, const lapack_complex_double* a,\n                   lapack_complex_double* b, lapack_int* ldb );\nvoid LAPACK_ctfsm( char* transr, char* side, char* uplo, char* trans,\n                   char* diag, lapack_int* m, lapack_int* n,\n                   lapack_complex_float* alpha, const lapack_complex_float* a,\n                   lapack_complex_float* b, lapack_int* ldb );\nvoid LAPACK_dtfttp( char* transr, char* uplo, lapack_int* n, const double* arf,\n                    double* ap, lapack_int *info );\nvoid LAPACK_stfttp( char* transr, char* uplo, lapack_int* n, const float* arf,\n                    float* ap, lapack_int *info );\nvoid LAPACK_ztfttp( char* transr, char* uplo, lapack_int* n,\n                    const lapack_complex_double* arf, lapack_complex_double* ap,\n                    lapack_int *info );\nvoid LAPACK_ctfttp( char* transr, char* uplo, lapack_int* n,\n                    const lapack_complex_float* arf, lapack_complex_float* ap,\n                    lapack_int *info );\nvoid LAPACK_dtfttr( char* transr, char* uplo, lapack_int* n, const double* arf,\n                    double* a, lapack_int* lda, lapack_int *info );\nvoid LAPACK_stfttr( char* transr, char* uplo, lapack_int* n, const float* arf,\n                    float* a, lapack_int* lda, lapack_int *info );\nvoid LAPACK_ztfttr( char* transr, char* uplo, lapack_int* n,\n                    const lapack_complex_double* arf, lapack_complex_double* a,\n                    lapack_int* lda, lapack_int *info );\nvoid LAPACK_ctfttr( char* transr, char* uplo, lapack_int* n,\n                    const lapack_complex_float* arf, lapack_complex_float* a,\n                    lapack_int* lda, lapack_int *info );\nvoid LAPACK_dtpttf( char* transr, char* uplo, lapack_int* n, const double* ap,\n                    double* arf, lapack_int *info );\nvoid LAPACK_stpttf( char* transr, char* uplo, lapack_int* n, const float* ap,\n                    float* arf, lapack_int *info );\nvoid LAPACK_ztpttf( char* transr, char* uplo, lapack_int* n,\n                    const lapack_complex_double* ap, lapack_complex_double* arf,\n                    lapack_int *info );\nvoid LAPACK_ctpttf( char* transr, char* uplo, lapack_int* n,\n                    const lapack_complex_float* ap, lapack_complex_float* arf,\n                    lapack_int *info );\nvoid LAPACK_dtpttr( char* uplo, lapack_int* n, const double* ap, double* a,\n                    lapack_int* lda, lapack_int *info );\nvoid LAPACK_stpttr( char* uplo, lapack_int* n, const float* ap, float* a,\n                    lapack_int* lda, lapack_int *info );\nvoid LAPACK_ztpttr( char* uplo, lapack_int* n, const lapack_complex_double* ap,\n                    lapack_complex_double* a, lapack_int* lda,\n                    lapack_int *info );\nvoid LAPACK_ctpttr( char* uplo, lapack_int* n, const lapack_complex_float* ap,\n                    lapack_complex_float* a, lapack_int* lda,\n                    lapack_int *info );\nvoid LAPACK_dtrttf( char* transr, char* uplo, lapack_int* n, const double* a,\n                    lapack_int* lda, double* arf, lapack_int *info );\nvoid LAPACK_strttf( char* transr, char* uplo, lapack_int* n, const float* a,\n                    lapack_int* lda, float* arf, lapack_int *info );\nvoid LAPACK_ztrttf( char* transr, char* uplo, lapack_int* n,\n                    const lapack_complex_double* a, lapack_int* lda,\n                    lapack_complex_double* arf, lapack_int *info );\nvoid LAPACK_ctrttf( char* transr, char* uplo, lapack_int* n,\n                    const lapack_complex_float* a, lapack_int* lda,\n                    lapack_complex_float* arf, lapack_int *info );\nvoid LAPACK_dtrttp( char* uplo, lapack_int* n, const double* a, lapack_int* lda,\n                    double* ap, lapack_int *info );\nvoid LAPACK_strttp( char* uplo, lapack_int* n, const float* a, lapack_int* lda,\n                    float* ap, lapack_int *info );\nvoid LAPACK_ztrttp( char* uplo, lapack_int* n, const lapack_complex_double* a,\n                    lapack_int* lda, lapack_complex_double* ap,\n                    lapack_int *info );\nvoid LAPACK_ctrttp( char* uplo, lapack_int* n, const lapack_complex_float* a,\n                    lapack_int* lda, lapack_complex_float* ap,\n                    lapack_int *info );\nvoid LAPACK_sgeqrfp( lapack_int* m, lapack_int* n, float* a, lapack_int* lda,\n                     float* tau, float* work, lapack_int* lwork,\n                     lapack_int *info );\nvoid LAPACK_dgeqrfp( lapack_int* m, lapack_int* n, double* a, lapack_int* lda,\n                     double* tau, double* work, lapack_int* lwork,\n                     lapack_int *info );\nvoid LAPACK_cgeqrfp( lapack_int* m, lapack_int* n, lapack_complex_float* a,\n                     lapack_int* lda, lapack_complex_float* tau,\n                     lapack_complex_float* work, lapack_int* lwork,\n                     lapack_int *info );\nvoid LAPACK_zgeqrfp( lapack_int* m, lapack_int* n, lapack_complex_double* a,\n                     lapack_int* lda, lapack_complex_double* tau,\n                     lapack_complex_double* work, lapack_int* lwork,\n                     lapack_int *info );\nvoid LAPACK_clacgv( lapack_int* n, lapack_complex_float* x, lapack_int* incx );\nvoid LAPACK_zlacgv( lapack_int* n, lapack_complex_double* x, lapack_int* incx );\nvoid LAPACK_slarnv( lapack_int* idist, lapack_int* iseed, lapack_int* n,\n                    float* x );\nvoid LAPACK_dlarnv( lapack_int* idist, lapack_int* iseed, lapack_int* n,\n                    double* x );\nvoid LAPACK_clarnv( lapack_int* idist, lapack_int* iseed, lapack_int* n,\n                    lapack_complex_float* x );\nvoid LAPACK_zlarnv( lapack_int* idist, lapack_int* iseed, lapack_int* n,\n                    lapack_complex_double* x );\nvoid LAPACK_sgeqr2( lapack_int* m, lapack_int* n, float* a, lapack_int* lda,\n                    float* tau, float* work, lapack_int *info );\nvoid LAPACK_dgeqr2( lapack_int* m, lapack_int* n, double* a, lapack_int* lda,\n                    double* tau, double* work, lapack_int *info );\nvoid LAPACK_cgeqr2( lapack_int* m, lapack_int* n, lapack_complex_float* a,\n                    lapack_int* lda, lapack_complex_float* tau,\n                    lapack_complex_float* work, lapack_int *info );\nvoid LAPACK_zgeqr2( lapack_int* m, lapack_int* n, lapack_complex_double* a,\n                    lapack_int* lda, lapack_complex_double* tau,\n                    lapack_complex_double* work, lapack_int *info );\nvoid LAPACK_slacpy( char* uplo, lapack_int* m, lapack_int* n, const float* a,\n                    lapack_int* lda, float* b, lapack_int* ldb );\nvoid LAPACK_dlacpy( char* uplo, lapack_int* m, lapack_int* n, const double* a,\n                    lapack_int* lda, double* b, lapack_int* ldb );\nvoid LAPACK_clacpy( char* uplo, lapack_int* m, lapack_int* n,\n                    const lapack_complex_float* a, lapack_int* lda,\n                    lapack_complex_float* b, lapack_int* ldb );\nvoid LAPACK_zlacpy( char* uplo, lapack_int* m, lapack_int* n,\n                    const lapack_complex_double* a, lapack_int* lda,\n                    lapack_complex_double* b, lapack_int* ldb );\nvoid LAPACK_sgetf2( lapack_int* m, lapack_int* n, float* a, lapack_int* lda,\n                    lapack_int* ipiv, lapack_int *info );\nvoid LAPACK_dgetf2( lapack_int* m, lapack_int* n, double* a, lapack_int* lda,\n                    lapack_int* ipiv, lapack_int *info );\nvoid LAPACK_cgetf2( lapack_int* m, lapack_int* n, lapack_complex_float* a,\n                    lapack_int* lda, lapack_int* ipiv, lapack_int *info );\nvoid LAPACK_zgetf2( lapack_int* m, lapack_int* n, lapack_complex_double* a,\n                    lapack_int* lda, lapack_int* ipiv, lapack_int *info );\nvoid LAPACK_slaswp( lapack_int* n, float* a, lapack_int* lda, lapack_int* k1,\n                    lapack_int* k2, const lapack_int* ipiv, lapack_int* incx );\nvoid LAPACK_dlaswp( lapack_int* n, double* a, lapack_int* lda, lapack_int* k1,\n                    lapack_int* k2, const lapack_int* ipiv, lapack_int* incx );\nvoid LAPACK_claswp( lapack_int* n, lapack_complex_float* a, lapack_int* lda,\n                    lapack_int* k1, lapack_int* k2, const lapack_int* ipiv,\n                    lapack_int* incx );\nvoid LAPACK_zlaswp( lapack_int* n, lapack_complex_double* a, lapack_int* lda,\n                    lapack_int* k1, lapack_int* k2, const lapack_int* ipiv,\n                    lapack_int* incx );\nfloat LAPACK_slange( char* norm, lapack_int* m, lapack_int* n, const float* a,\n                    lapack_int* lda, float* work );\ndouble LAPACK_dlange( char* norm, lapack_int* m, lapack_int* n, const double* a,\n                    lapack_int* lda, double* work );\nfloat LAPACK_clange( char* norm, lapack_int* m, lapack_int* n,\n                    const lapack_complex_float* a, lapack_int* lda, float* work );\ndouble LAPACK_zlange( char* norm, lapack_int* m, lapack_int* n,\n                    const lapack_complex_double* a, lapack_int* lda, double* work );\nfloat LAPACK_clanhe( char* norm, char* uplo, lapack_int* n,\n                    const lapack_complex_float* a, lapack_int* lda, float* work );\ndouble LAPACK_zlanhe( char* norm, char* uplo, lapack_int* n,\n                    const lapack_complex_double* a, lapack_int* lda, double* work );\nfloat LAPACK_slansy( char* norm, char* uplo, lapack_int* n, const float* a,\n                    lapack_int* lda, float* work );\ndouble LAPACK_dlansy( char* norm, char* uplo, lapack_int* n, const double* a,\n                    lapack_int* lda, double* work );\nfloat LAPACK_clansy( char* norm, char* uplo, lapack_int* n,\n                    const lapack_complex_float* a, lapack_int* lda, float* work );\ndouble LAPACK_zlansy( char* norm, char* uplo, lapack_int* n,\n                    const lapack_complex_double* a, lapack_int* lda, double* work );\nfloat LAPACK_slantr( char* norm, char* uplo, char* diag, lapack_int* m,\n                    lapack_int* n, const float* a, lapack_int* lda, float* work );\ndouble LAPACK_dlantr( char* norm, char* uplo, char* diag, lapack_int* m,\n                    lapack_int* n, const double* a, lapack_int* lda, double* work );\nfloat LAPACK_clantr( char* norm, char* uplo, char* diag, lapack_int* m,\n                    lapack_int* n, const lapack_complex_float* a, lapack_int* lda,\n                    float* work );\ndouble LAPACK_zlantr( char* norm, char* uplo, char* diag, lapack_int* m,\n                    lapack_int* n, const lapack_complex_double* a, lapack_int* lda,\n                    double* work );\nfloat LAPACK_slamch( char* cmach );\ndouble LAPACK_dlamch( char* cmach );\nvoid LAPACK_sgelq2( lapack_int* m, lapack_int* n, float* a, lapack_int* lda,\n                    float* tau, float* work, lapack_int *info );\nvoid LAPACK_dgelq2( lapack_int* m, lapack_int* n, double* a, lapack_int* lda,\n                    double* tau, double* work, lapack_int *info );\nvoid LAPACK_cgelq2( lapack_int* m, lapack_int* n, lapack_complex_float* a,\n                    lapack_int* lda, lapack_complex_float* tau,\n                    lapack_complex_float* work, lapack_int *info );\nvoid LAPACK_zgelq2( lapack_int* m, lapack_int* n, lapack_complex_double* a,\n                    lapack_int* lda, lapack_complex_double* tau,\n                    lapack_complex_double* work, lapack_int *info );\nvoid LAPACK_slarfb( char* side, char* trans, char* direct, char* storev,\n                    lapack_int* m, lapack_int* n, lapack_int* k, const float* v,\n                    lapack_int* ldv, const float* t, lapack_int* ldt, float* c,\n                    lapack_int* ldc, float* work, lapack_int* ldwork );\nvoid LAPACK_dlarfb( char* side, char* trans, char* direct, char* storev,\n                    lapack_int* m, lapack_int* n, lapack_int* k,\n                    const double* v, lapack_int* ldv, const double* t,\n                    lapack_int* ldt, double* c, lapack_int* ldc, double* work,\n                    lapack_int* ldwork );\nvoid LAPACK_clarfb( char* side, char* trans, char* direct, char* storev,\n                    lapack_int* m, lapack_int* n, lapack_int* k,\n                    const lapack_complex_float* v, lapack_int* ldv,\n                    const lapack_complex_float* t, lapack_int* ldt,\n                    lapack_complex_float* c, lapack_int* ldc,\n                    lapack_complex_float* work, lapack_int* ldwork );\nvoid LAPACK_zlarfb( char* side, char* trans, char* direct, char* storev,\n                    lapack_int* m, lapack_int* n, lapack_int* k,\n                    const lapack_complex_double* v, lapack_int* ldv,\n                    const lapack_complex_double* t, lapack_int* ldt,\n                    lapack_complex_double* c, lapack_int* ldc,\n                    lapack_complex_double* work, lapack_int* ldwork );\nvoid LAPACK_slarfg( lapack_int* n, float* alpha, float* x, lapack_int* incx,\n                    float* tau );\nvoid LAPACK_dlarfg( lapack_int* n, double* alpha, double* x, lapack_int* incx,\n                    double* tau );\nvoid LAPACK_clarfg( lapack_int* n, lapack_complex_float* alpha,\n                    lapack_complex_float* x, lapack_int* incx,\n                    lapack_complex_float* tau );\nvoid LAPACK_zlarfg( lapack_int* n, lapack_complex_double* alpha,\n                    lapack_complex_double* x, lapack_int* incx,\n                    lapack_complex_double* tau );\nvoid LAPACK_slarft( char* direct, char* storev, lapack_int* n, lapack_int* k,\n                    const float* v, lapack_int* ldv, const float* tau, float* t,\n                    lapack_int* ldt );\nvoid LAPACK_dlarft( char* direct, char* storev, lapack_int* n, lapack_int* k,\n                    const double* v, lapack_int* ldv, const double* tau,\n                    double* t, lapack_int* ldt );\nvoid LAPACK_clarft( char* direct, char* storev, lapack_int* n, lapack_int* k,\n                    const lapack_complex_float* v, lapack_int* ldv,\n                    const lapack_complex_float* tau, lapack_complex_float* t,\n                    lapack_int* ldt );\nvoid LAPACK_zlarft( char* direct, char* storev, lapack_int* n, lapack_int* k,\n                    const lapack_complex_double* v, lapack_int* ldv,\n                    const lapack_complex_double* tau, lapack_complex_double* t,\n                    lapack_int* ldt );\nvoid LAPACK_slarfx( char* side, lapack_int* m, lapack_int* n, const float* v,\n                    float* tau, float* c, lapack_int* ldc, float* work );\nvoid LAPACK_dlarfx( char* side, lapack_int* m, lapack_int* n, const double* v,\n                    double* tau, double* c, lapack_int* ldc, double* work );\nvoid LAPACK_clarfx( char* side, lapack_int* m, lapack_int* n,\n                    const lapack_complex_float* v, lapack_complex_float* tau,\n                    lapack_complex_float* c, lapack_int* ldc,\n                    lapack_complex_float* work );\nvoid LAPACK_zlarfx( char* side, lapack_int* m, lapack_int* n,\n                    const lapack_complex_double* v, lapack_complex_double* tau,\n                    lapack_complex_double* c, lapack_int* ldc,\n                    lapack_complex_double* work );\nvoid LAPACK_slatms( lapack_int* m, lapack_int* n, char* dist, lapack_int* iseed,\n                    char* sym, float* d, lapack_int* mode, float* cond,\n                    float* dmax, lapack_int* kl, lapack_int* ku, char* pack,\n                    float* a, lapack_int* lda, float* work, lapack_int *info );\nvoid LAPACK_dlatms( lapack_int* m, lapack_int* n, char* dist, lapack_int* iseed,\n                    char* sym, double* d, lapack_int* mode, double* cond,\n                    double* dmax, lapack_int* kl, lapack_int* ku, char* pack,\n                    double* a, lapack_int* lda, double* work,\n                    lapack_int *info );\nvoid LAPACK_clatms( lapack_int* m, lapack_int* n, char* dist, lapack_int* iseed,\n                    char* sym, float* d, lapack_int* mode, float* cond,\n                    float* dmax, lapack_int* kl, lapack_int* ku, char* pack,\n                    lapack_complex_float* a, lapack_int* lda,\n                    lapack_complex_float* work, lapack_int *info );\nvoid LAPACK_zlatms( lapack_int* m, lapack_int* n, char* dist, lapack_int* iseed,\n                    char* sym, double* d, lapack_int* mode, double* cond,\n                    double* dmax, lapack_int* kl, lapack_int* ku, char* pack,\n                    lapack_complex_double* a, lapack_int* lda,\n                    lapack_complex_double* work, lapack_int *info );\nvoid LAPACK_slag2d( lapack_int* m, lapack_int* n, const float* sa,\n                    lapack_int* ldsa, double* a, lapack_int* lda,\n                    lapack_int *info );\nvoid LAPACK_dlag2s( lapack_int* m, lapack_int* n, const double* a,\n                    lapack_int* lda, float* sa, lapack_int* ldsa,\n                    lapack_int *info );\nvoid LAPACK_clag2z( lapack_int* m, lapack_int* n,\n                    const lapack_complex_float* sa, lapack_int* ldsa,\n                    lapack_complex_double* a, lapack_int* lda,\n                    lapack_int *info );\nvoid LAPACK_zlag2c( lapack_int* m, lapack_int* n,\n                    const lapack_complex_double* a, lapack_int* lda,\n                    lapack_complex_float* sa, lapack_int* ldsa,\n                    lapack_int *info );\nvoid LAPACK_slauum( char* uplo, lapack_int* n, float* a, lapack_int* lda,\n                    lapack_int *info );\nvoid LAPACK_dlauum( char* uplo, lapack_int* n, double* a, lapack_int* lda,\n                    lapack_int *info );\nvoid LAPACK_clauum( char* uplo, lapack_int* n, lapack_complex_float* a,\n                    lapack_int* lda, lapack_int *info );\nvoid LAPACK_zlauum( char* uplo, lapack_int* n, lapack_complex_double* a,\n                    lapack_int* lda, lapack_int *info );\nvoid LAPACK_slagge( lapack_int* m, lapack_int* n, lapack_int* kl,\n                    lapack_int* ku, const float* d, float* a, lapack_int* lda,\n                    lapack_int* iseed, float* work, lapack_int *info );\nvoid LAPACK_dlagge( lapack_int* m, lapack_int* n, lapack_int* kl,\n                    lapack_int* ku, const double* d, double* a, lapack_int* lda,\n                    lapack_int* iseed, double* work, lapack_int *info );\nvoid LAPACK_clagge( lapack_int* m, lapack_int* n, lapack_int* kl,\n                    lapack_int* ku, const float* d, lapack_complex_float* a,\n                    lapack_int* lda, lapack_int* iseed,\n                    lapack_complex_float* work, lapack_int *info );\nvoid LAPACK_zlagge( lapack_int* m, lapack_int* n, lapack_int* kl,\n                    lapack_int* ku, const double* d, lapack_complex_double* a,\n                    lapack_int* lda, lapack_int* iseed,\n                    lapack_complex_double* work, lapack_int *info );\nvoid LAPACK_slaset( char* uplo, lapack_int* m, lapack_int* n, float* alpha,\n                    float* beta, float* a, lapack_int* lda );\nvoid LAPACK_dlaset( char* uplo, lapack_int* m, lapack_int* n, double* alpha,\n                    double* beta, double* a, lapack_int* lda );\nvoid LAPACK_claset( char* uplo, lapack_int* m, lapack_int* n,\n                    lapack_complex_float* alpha, lapack_complex_float* beta,\n                    lapack_complex_float* a, lapack_int* lda );\nvoid LAPACK_zlaset( char* uplo, lapack_int* m, lapack_int* n,\n                    lapack_complex_double* alpha, lapack_complex_double* beta,\n                    lapack_complex_double* a, lapack_int* lda );\nvoid LAPACK_slasrt( char* id, lapack_int* n, float* d, lapack_int *info );\nvoid LAPACK_dlasrt( char* id, lapack_int* n, double* d, lapack_int *info );\nvoid LAPACK_claghe( lapack_int* n, lapack_int* k, const float* d,\n                    lapack_complex_float* a, lapack_int* lda, lapack_int* iseed,\n                    lapack_complex_float* work, lapack_int *info );\nvoid LAPACK_zlaghe( lapack_int* n, lapack_int* k, const double* d,\n                    lapack_complex_double* a, lapack_int* lda,\n                    lapack_int* iseed, lapack_complex_double* work,\n                    lapack_int *info );\nvoid LAPACK_slagsy( lapack_int* n, lapack_int* k, const float* d, float* a,\n                    lapack_int* lda, lapack_int* iseed, float* work,\n                    lapack_int *info );\nvoid LAPACK_dlagsy( lapack_int* n, lapack_int* k, const double* d, double* a,\n                    lapack_int* lda, lapack_int* iseed, double* work,\n                    lapack_int *info );\nvoid LAPACK_clagsy( lapack_int* n, lapack_int* k, const float* d,\n                    lapack_complex_float* a, lapack_int* lda, lapack_int* iseed,\n                    lapack_complex_float* work, lapack_int *info );\nvoid LAPACK_zlagsy( lapack_int* n, lapack_int* k, const double* d,\n                    lapack_complex_double* a, lapack_int* lda,\n                    lapack_int* iseed, lapack_complex_double* work,\n                    lapack_int *info );\nvoid LAPACK_slapmr( lapack_logical* forwrd, lapack_int* m, lapack_int* n,\n                    float* x, lapack_int* ldx, lapack_int* k );\nvoid LAPACK_dlapmr( lapack_logical* forwrd, lapack_int* m, lapack_int* n,\n                    double* x, lapack_int* ldx, lapack_int* k );\nvoid LAPACK_clapmr( lapack_logical* forwrd, lapack_int* m, lapack_int* n,\n                    lapack_complex_float* x, lapack_int* ldx, lapack_int* k );\nvoid LAPACK_zlapmr( lapack_logical* forwrd, lapack_int* m, lapack_int* n,\n                    lapack_complex_double* x, lapack_int* ldx, lapack_int* k );\nfloat LAPACK_slapy2( float* x, float* y );\ndouble LAPACK_dlapy2( double* x, double* y );\nfloat LAPACK_slapy3( float* x, float* y, float* z );\ndouble LAPACK_dlapy3( double* x, double* y, double* z );\nvoid LAPACK_slartgp( float* f, float* g, float* cs, float* sn, float* r );\nvoid LAPACK_dlartgp( double* f, double* g, double* cs, double* sn, double* r );\nvoid LAPACK_slartgs( float* x, float* y, float* sigma, float* cs, float* sn );\nvoid LAPACK_dlartgs( double* x, double* y, double* sigma, double* cs,\n                     double* sn );\n// LAPACK 3.3.0\nvoid LAPACK_cbbcsd( char* jobu1, char* jobu2,\n                    char* jobv1t, char* jobv2t, char* trans,\n                    lapack_int* m, lapack_int* p, lapack_int* q,\n                    float* theta, float* phi,\n                    lapack_complex_float* u1, lapack_int* ldu1,\n                    lapack_complex_float* u2, lapack_int* ldu2,\n                    lapack_complex_float* v1t, lapack_int* ldv1t,\n                    lapack_complex_float* v2t, lapack_int* ldv2t,\n                    float* b11d, float* b11e, float* b12d,\n                    float* b12e, float* b21d, float* b21e,\n                    float* b22d, float* b22e, float* rwork,\n                    lapack_int* lrwork , lapack_int *info );\nvoid LAPACK_cheswapr( char* uplo, lapack_int* n,\n                      lapack_complex_float* a, lapack_int* i1,\n                      lapack_int* i2 );\nvoid LAPACK_chetri2( char* uplo, lapack_int* n,\n                     lapack_complex_float* a, lapack_int* lda,\n                     const lapack_int* ipiv,\n                     lapack_complex_float* work, lapack_int* lwork , lapack_int *info );\nvoid LAPACK_chetri2x( char* uplo, lapack_int* n,\n                      lapack_complex_float* a, lapack_int* lda,\n                      const lapack_int* ipiv,\n                      lapack_complex_float* work, lapack_int* nb , lapack_int *info );\nvoid LAPACK_chetrs2( char* uplo, lapack_int* n,\n                     lapack_int* nrhs, const lapack_complex_float* a,\n                     lapack_int* lda, const lapack_int* ipiv,\n                     lapack_complex_float* b, lapack_int* ldb,\n                     lapack_complex_float* work , lapack_int *info );\nvoid LAPACK_csyconv( char* uplo, char* way,\n                     lapack_int* n, lapack_complex_float* a,\n                     lapack_int* lda, const lapack_int* ipiv,\n                     lapack_complex_float* work , lapack_int *info );\nvoid LAPACK_csyswapr( char* uplo, lapack_int* n,\n                      lapack_complex_float* a, lapack_int* i1,\n                      lapack_int* i2 );\nvoid LAPACK_csytri2( char* uplo, lapack_int* n,\n                     lapack_complex_float* a, lapack_int* lda,\n                     const lapack_int* ipiv,\n                     lapack_complex_float* work, lapack_int* lwork , lapack_int *info );\nvoid LAPACK_csytri2x( char* uplo, lapack_int* n,\n                      lapack_complex_float* a, lapack_int* lda,\n                      const lapack_int* ipiv,\n                      lapack_complex_float* work, lapack_int* nb , lapack_int *info );\nvoid LAPACK_csytrs2( char* uplo, lapack_int* n,\n                     lapack_int* nrhs, const lapack_complex_float* a,\n                     lapack_int* lda, const lapack_int* ipiv,\n                     lapack_complex_float* b, lapack_int* ldb,\n                     lapack_complex_float* work , lapack_int *info );\nvoid LAPACK_cunbdb( char* trans, char* signs,\n                    lapack_int* m, lapack_int* p, lapack_int* q,\n                    lapack_complex_float* x11, lapack_int* ldx11,\n                    lapack_complex_float* x12, lapack_int* ldx12,\n                    lapack_complex_float* x21, lapack_int* ldx21,\n                    lapack_complex_float* x22, lapack_int* ldx22,\n                    float* theta, float* phi,\n                    lapack_complex_float* taup1,\n                    lapack_complex_float* taup2,\n                    lapack_complex_float* tauq1,\n                    lapack_complex_float* tauq2,\n                    lapack_complex_float* work, lapack_int* lwork , lapack_int *info );\nvoid LAPACK_cuncsd( char* jobu1, char* jobu2,\n                    char* jobv1t, char* jobv2t, char* trans,\n                    char* signs, lapack_int* m, lapack_int* p,\n                    lapack_int* q, lapack_complex_float* x11,\n                    lapack_int* ldx11, lapack_complex_float* x12,\n                    lapack_int* ldx12, lapack_complex_float* x21,\n                    lapack_int* ldx21, lapack_complex_float* x22,\n                    lapack_int* ldx22, float* theta,\n                    lapack_complex_float* u1, lapack_int* ldu1,\n                    lapack_complex_float* u2, lapack_int* ldu2,\n                    lapack_complex_float* v1t, lapack_int* ldv1t,\n                    lapack_complex_float* v2t, lapack_int* ldv2t,\n                    lapack_complex_float* work, lapack_int* lwork,\n                    float* rwork, lapack_int* lrwork,\n                    lapack_int* iwork , lapack_int *info );\nvoid LAPACK_dbbcsd( char* jobu1, char* jobu2,\n                    char* jobv1t, char* jobv2t, char* trans,\n                    lapack_int* m, lapack_int* p, lapack_int* q,\n                    double* theta, double* phi, double* u1,\n                    lapack_int* ldu1, double* u2, lapack_int* ldu2,\n                    double* v1t, lapack_int* ldv1t, double* v2t,\n                    lapack_int* ldv2t, double* b11d, double* b11e,\n                    double* b12d, double* b12e, double* b21d,\n                    double* b21e, double* b22d, double* b22e,\n                    double* work, lapack_int* lwork , lapack_int *info );\nvoid LAPACK_dorbdb( char* trans, char* signs,\n                    lapack_int* m, lapack_int* p, lapack_int* q,\n                    double* x11, lapack_int* ldx11, double* x12,\n                    lapack_int* ldx12, double* x21, lapack_int* ldx21,\n                    double* x22, lapack_int* ldx22, double* theta,\n                    double* phi, double* taup1, double* taup2,\n                    double* tauq1, double* tauq2, double* work,\n                    lapack_int* lwork , lapack_int *info );\nvoid LAPACK_dorcsd( char* jobu1, char* jobu2,\n                    char* jobv1t, char* jobv2t, char* trans,\n                    char* signs, lapack_int* m, lapack_int* p,\n                    lapack_int* q, double* x11, lapack_int* ldx11,\n                    double* x12, lapack_int* ldx12, double* x21,\n                    lapack_int* ldx21, double* x22, lapack_int* ldx22,\n                    double* theta, double* u1, lapack_int* ldu1,\n                    double* u2, lapack_int* ldu2, double* v1t,\n                    lapack_int* ldv1t, double* v2t, lapack_int* ldv2t,\n                    double* work, lapack_int* lwork,\n                    lapack_int* iwork , lapack_int *info );\nvoid LAPACK_dsyconv( char* uplo, char* way,\n                     lapack_int* n, double* a, lapack_int* lda,\n                     const lapack_int* ipiv, double* work , lapack_int *info );\nvoid LAPACK_dsyswapr( char* uplo, lapack_int* n,\n                      double* a, lapack_int* i1, lapack_int* i2 );\nvoid LAPACK_dsytri2( char* uplo, lapack_int* n,\n                     double* a, lapack_int* lda,\n                     const lapack_int* ipiv,\n                     lapack_complex_double* work, lapack_int* lwork , lapack_int *info );\nvoid LAPACK_dsytri2x( char* uplo, lapack_int* n,\n                      double* a, lapack_int* lda,\n                      const lapack_int* ipiv, double* work,\n                      lapack_int* nb , lapack_int *info );\nvoid LAPACK_dsytrs2( char* uplo, lapack_int* n,\n                     lapack_int* nrhs, const double* a,\n                     lapack_int* lda, const lapack_int* ipiv,\n                     double* b, lapack_int* ldb, double* work , lapack_int *info );\nvoid LAPACK_sbbcsd( char* jobu1, char* jobu2,\n                    char* jobv1t, char* jobv2t, char* trans,\n                    lapack_int* m, lapack_int* p, lapack_int* q,\n                    float* theta, float* phi, float* u1,\n                    lapack_int* ldu1, float* u2, lapack_int* ldu2,\n                    float* v1t, lapack_int* ldv1t, float* v2t,\n                    lapack_int* ldv2t, float* b11d, float* b11e,\n                    float* b12d, float* b12e, float* b21d,\n                    float* b21e, float* b22d, float* b22e,\n                    float* work, lapack_int* lwork , lapack_int *info );\nvoid LAPACK_sorbdb( char* trans, char* signs,\n                    lapack_int* m, lapack_int* p, lapack_int* q,\n                    float* x11, lapack_int* ldx11, float* x12,\n                    lapack_int* ldx12, float* x21, lapack_int* ldx21,\n                    float* x22, lapack_int* ldx22, float* theta,\n                    float* phi, float* taup1, float* taup2,\n                    float* tauq1, float* tauq2, float* work,\n                    lapack_int* lwork , lapack_int *info );\nvoid LAPACK_sorcsd( char* jobu1, char* jobu2,\n                    char* jobv1t, char* jobv2t, char* trans,\n                    char* signs, lapack_int* m, lapack_int* p,\n                    lapack_int* q, float* x11, lapack_int* ldx11,\n                    float* x12, lapack_int* ldx12, float* x21,\n                    lapack_int* ldx21, float* x22, lapack_int* ldx22,\n                    float* theta, float* u1, lapack_int* ldu1,\n                    float* u2, lapack_int* ldu2, float* v1t,\n                    lapack_int* ldv1t, float* v2t, lapack_int* ldv2t,\n                    float* work, lapack_int* lwork,\n                    lapack_int* iwork , lapack_int *info );\nvoid LAPACK_ssyconv( char* uplo, char* way,\n                     lapack_int* n, float* a, lapack_int* lda,\n                     const lapack_int* ipiv, float* work , lapack_int *info );\nvoid LAPACK_ssyswapr( char* uplo, lapack_int* n,\n                      float* a, lapack_int* i1, lapack_int* i2 );\nvoid LAPACK_ssytri2( char* uplo, lapack_int* n,\n                     float* a, lapack_int* lda,\n                     const lapack_int* ipiv,\n                     lapack_complex_float* work, lapack_int* lwork , lapack_int *info );\nvoid LAPACK_ssytri2x( char* uplo, lapack_int* n,\n                      float* a, lapack_int* lda,\n                      const lapack_int* ipiv, float* work,\n                      lapack_int* nb , lapack_int *info );\nvoid LAPACK_ssytrs2( char* uplo, lapack_int* n,\n                     lapack_int* nrhs, const float* a,\n                     lapack_int* lda, const lapack_int* ipiv,\n                     float* b, lapack_int* ldb, float* work , lapack_int *info );\nvoid LAPACK_zbbcsd( char* jobu1, char* jobu2,\n                    char* jobv1t, char* jobv2t, char* trans,\n                    lapack_int* m, lapack_int* p, lapack_int* q,\n                    double* theta, double* phi,\n                    lapack_complex_double* u1, lapack_int* ldu1,\n                    lapack_complex_double* u2, lapack_int* ldu2,\n                    lapack_complex_double* v1t, lapack_int* ldv1t,\n                    lapack_complex_double* v2t, lapack_int* ldv2t,\n                    double* b11d, double* b11e, double* b12d,\n                    double* b12e, double* b21d, double* b21e,\n                    double* b22d, double* b22e, double* rwork,\n                    lapack_int* lrwork , lapack_int *info );\nvoid LAPACK_zheswapr( char* uplo, lapack_int* n,\n                      lapack_complex_double* a, lapack_int* i1,\n                      lapack_int* i2 );\nvoid LAPACK_zhetri2( char* uplo, lapack_int* n,\n                     lapack_complex_double* a, lapack_int* lda,\n                     const lapack_int* ipiv,\n                     lapack_complex_double* work, lapack_int* lwork , lapack_int *info );\nvoid LAPACK_zhetri2x( char* uplo, lapack_int* n,\n                      lapack_complex_double* a, lapack_int* lda,\n                      const lapack_int* ipiv,\n                      lapack_complex_double* work, lapack_int* nb , lapack_int *info );\nvoid LAPACK_zhetrs2( char* uplo, lapack_int* n,\n                     lapack_int* nrhs,\n                     const lapack_complex_double* a, lapack_int* lda,\n                     const lapack_int* ipiv,\n                     lapack_complex_double* b, lapack_int* ldb,\n                     lapack_complex_double* work , lapack_int *info );\nvoid LAPACK_zsyconv( char* uplo, char* way,\n                     lapack_int* n, lapack_complex_double* a,\n                     lapack_int* lda, const lapack_int* ipiv,\n                     lapack_complex_double* work , lapack_int *info );\nvoid LAPACK_zsyswapr( char* uplo, lapack_int* n,\n                      lapack_complex_double* a, lapack_int* i1,\n                      lapack_int* i2 );\nvoid LAPACK_zsytri2( char* uplo, lapack_int* n,\n                     lapack_complex_double* a, lapack_int* lda,\n                     const lapack_int* ipiv,\n                     lapack_complex_double* work, lapack_int* lwork , lapack_int *info );\nvoid LAPACK_zsytri2x( char* uplo, lapack_int* n,\n                      lapack_complex_double* a, lapack_int* lda,\n                      const lapack_int* ipiv,\n                      lapack_complex_double* work, lapack_int* nb , lapack_int *info );\nvoid LAPACK_zsytrs2( char* uplo, lapack_int* n,\n                     lapack_int* nrhs,\n                     const lapack_complex_double* a, lapack_int* lda,\n                     const lapack_int* ipiv,\n                     lapack_complex_double* b, lapack_int* ldb,\n                     lapack_complex_double* work , lapack_int *info );\nvoid LAPACK_zunbdb( char* trans, char* signs,\n                    lapack_int* m, lapack_int* p, lapack_int* q,\n                    lapack_complex_double* x11, lapack_int* ldx11,\n                    lapack_complex_double* x12, lapack_int* ldx12,\n                    lapack_complex_double* x21, lapack_int* ldx21,\n                    lapack_complex_double* x22, lapack_int* ldx22,\n                    double* theta, double* phi,\n                    lapack_complex_double* taup1,\n                    lapack_complex_double* taup2,\n                    lapack_complex_double* tauq1,\n                    lapack_complex_double* tauq2,\n                    lapack_complex_double* work, lapack_int* lwork , lapack_int *info );\nvoid LAPACK_zuncsd( char* jobu1, char* jobu2,\n                    char* jobv1t, char* jobv2t, char* trans,\n                    char* signs, lapack_int* m, lapack_int* p,\n                    lapack_int* q, lapack_complex_double* x11,\n                    lapack_int* ldx11, lapack_complex_double* x12,\n                    lapack_int* ldx12, lapack_complex_double* x21,\n                    lapack_int* ldx21, lapack_complex_double* x22,\n                    lapack_int* ldx22, double* theta,\n                    lapack_complex_double* u1, lapack_int* ldu1,\n                    lapack_complex_double* u2, lapack_int* ldu2,\n                    lapack_complex_double* v1t, lapack_int* ldv1t,\n                    lapack_complex_double* v2t, lapack_int* ldv2t,\n                    lapack_complex_double* work, lapack_int* lwork,\n                    double* rwork, lapack_int* lrwork,\n                    lapack_int* iwork , lapack_int *info );\n// LAPACK 3.4.0\nvoid LAPACK_sgemqrt( char* side, char* trans, lapack_int* m, lapack_int* n,\n                     lapack_int* k, lapack_int* nb, const float* v,\n                     lapack_int* ldv, const float* t, lapack_int* ldt, float* c,\n                     lapack_int* ldc, float* work, lapack_int *info );\nvoid LAPACK_dgemqrt( char* side, char* trans, lapack_int* m, lapack_int* n,\n                     lapack_int* k, lapack_int* nb, const double* v,\n                     lapack_int* ldv, const double* t, lapack_int* ldt,\n                     double* c, lapack_int* ldc, double* work,\n                     lapack_int *info );\nvoid LAPACK_cgemqrt( char* side, char* trans, lapack_int* m, lapack_int* n,\n                     lapack_int* k, lapack_int* nb,\n                     const lapack_complex_float* v, lapack_int* ldv,\n                     const lapack_complex_float* t, lapack_int* ldt,\n                     lapack_complex_float* c, lapack_int* ldc,\n                     lapack_complex_float* work, lapack_int *info );\nvoid LAPACK_zgemqrt( char* side, char* trans, lapack_int* m, lapack_int* n,\n                     lapack_int* k, lapack_int* nb,\n                     const lapack_complex_double* v, lapack_int* ldv,\n                     const lapack_complex_double* t, lapack_int* ldt,\n                     lapack_complex_double* c, lapack_int* ldc,\n                     lapack_complex_double* work, lapack_int *info );\nvoid LAPACK_sgeqrt( lapack_int* m, lapack_int* n, lapack_int* nb, float* a,\n                    lapack_int* lda, float* t, lapack_int* ldt, float* work,\n                    lapack_int *info );\nvoid LAPACK_dgeqrt( lapack_int* m, lapack_int* n, lapack_int* nb, double* a,\n                    lapack_int* lda, double* t, lapack_int* ldt, double* work,\n                    lapack_int *info );\nvoid LAPACK_cgeqrt( lapack_int* m, lapack_int* n, lapack_int* nb,\n                    lapack_complex_float* a, lapack_int* lda,\n                    lapack_complex_float* t, lapack_int* ldt,\n                    lapack_complex_float* work, lapack_int *info );\nvoid LAPACK_zgeqrt( lapack_int* m, lapack_int* n, lapack_int* nb,\n                    lapack_complex_double* a, lapack_int* lda,\n                    lapack_complex_double* t, lapack_int* ldt,\n                    lapack_complex_double* work, lapack_int *info );\nvoid LAPACK_sgeqrt2( lapack_int* m, lapack_int* n, float* a, lapack_int* lda,\n                     float* t, lapack_int* ldt, lapack_int *info );\nvoid LAPACK_dgeqrt2( lapack_int* m, lapack_int* n, double* a, lapack_int* lda,\n                     double* t, lapack_int* ldt, lapack_int *info );\nvoid LAPACK_cgeqrt2( lapack_int* m, lapack_int* n, lapack_complex_float* a,\n                     lapack_int* lda, lapack_complex_float* t, lapack_int* ldt,\n                     lapack_int *info );\nvoid LAPACK_zgeqrt2( lapack_int* m, lapack_int* n, lapack_complex_double* a,\n                     lapack_int* lda, lapack_complex_double* t, lapack_int* ldt,\n                     lapack_int *info );\nvoid LAPACK_sgeqrt3( lapack_int* m, lapack_int* n, float* a, lapack_int* lda,\n                     float* t, lapack_int* ldt, lapack_int *info );\nvoid LAPACK_dgeqrt3( lapack_int* m, lapack_int* n, double* a, lapack_int* lda,\n                     double* t, lapack_int* ldt, lapack_int *info );\nvoid LAPACK_cgeqrt3( lapack_int* m, lapack_int* n, lapack_complex_float* a,\n                     lapack_int* lda, lapack_complex_float* t, lapack_int* ldt,\n                     lapack_int *info );\nvoid LAPACK_zgeqrt3( lapack_int* m, lapack_int* n, lapack_complex_double* a,\n                     lapack_int* lda, lapack_complex_double* t, lapack_int* ldt,\n                     lapack_int *info );\nvoid LAPACK_stpmqrt( char* side, char* trans, lapack_int* m, lapack_int* n,\n                     lapack_int* k, lapack_int* l, lapack_int* nb,\n                     const float* v, lapack_int* ldv, const float* t,\n                     lapack_int* ldt, float* a, lapack_int* lda, float* b,\n                     lapack_int* ldb, float* work, lapack_int *info );\nvoid LAPACK_dtpmqrt( char* side, char* trans, lapack_int* m, lapack_int* n,\n                     lapack_int* k, lapack_int* l, lapack_int* nb,\n                     const double* v, lapack_int* ldv, const double* t,\n                     lapack_int* ldt, double* a, lapack_int* lda, double* b,\n                     lapack_int* ldb, double* work, lapack_int *info );\nvoid LAPACK_ctpmqrt( char* side, char* trans, lapack_int* m, lapack_int* n,\n                     lapack_int* k, lapack_int* l, lapack_int* nb,\n                     const lapack_complex_float* v, lapack_int* ldv,\n                     const lapack_complex_float* t, lapack_int* ldt,\n                     lapack_complex_float* a, lapack_int* lda,\n                     lapack_complex_float* b, lapack_int* ldb,\n                     lapack_complex_float* work, lapack_int *info );\nvoid LAPACK_ztpmqrt( char* side, char* trans, lapack_int* m, lapack_int* n,\n                     lapack_int* k, lapack_int* l, lapack_int* nb,\n                     const lapack_complex_double* v, lapack_int* ldv,\n                     const lapack_complex_double* t, lapack_int* ldt,\n                     lapack_complex_double* a, lapack_int* lda,\n                     lapack_complex_double* b, lapack_int* ldb,\n                     lapack_complex_double* work, lapack_int *info );\nvoid LAPACK_dtpqrt( lapack_int* m, lapack_int* n, lapack_int* l, lapack_int* nb,\n                    double* a, lapack_int* lda, double* b, lapack_int* ldb,\n                    double* t, lapack_int* ldt, double* work,\n                    lapack_int *info );\nvoid LAPACK_ctpqrt( lapack_int* m, lapack_int* n, lapack_int* l, lapack_int* nb,\n                    lapack_complex_float* a, lapack_int* lda,\n                    lapack_complex_float* t, lapack_complex_float* b,\n                    lapack_int* ldb, lapack_int* ldt,\n                    lapack_complex_float* work, lapack_int *info );\nvoid LAPACK_ztpqrt( lapack_int* m, lapack_int* n, lapack_int* l, lapack_int* nb,\n                    lapack_complex_double* a, lapack_int* lda,\n                    lapack_complex_double* b, lapack_int* ldb,\n                    lapack_complex_double* t, lapack_int* ldt,\n                    lapack_complex_double* work, lapack_int *info );\nvoid LAPACK_stpqrt2( lapack_int* m, lapack_int* n, float* a, lapack_int* lda,\n                     float* b, lapack_int* ldb, float* t, lapack_int* ldt,\n                     lapack_int *info );\nvoid LAPACK_dtpqrt2( lapack_int* m, lapack_int* n, double* a, lapack_int* lda,\n                     double* b, lapack_int* ldb, double* t, lapack_int* ldt,\n                     lapack_int *info );\nvoid LAPACK_ctpqrt2( lapack_int* m, lapack_int* n, lapack_complex_float* a,\n                     lapack_int* lda, lapack_complex_float* b, lapack_int* ldb,\n                     lapack_complex_float* t, lapack_int* ldt,\n                     lapack_int *info );\nvoid LAPACK_ztpqrt2( lapack_int* m, lapack_int* n, lapack_complex_double* a,\n                     lapack_int* lda, lapack_complex_double* b, lapack_int* ldb,\n                     lapack_complex_double* t, lapack_int* ldt,\n                     lapack_int *info );\nvoid LAPACK_stprfb( char* side, char* trans, char* direct, char* storev,\n                    lapack_int* m, lapack_int* n, lapack_int* k, lapack_int* l,\n                    const float* v, lapack_int* ldv, const float* t,\n                    lapack_int* ldt, float* a, lapack_int* lda, float* b,\n                    lapack_int* ldb, const float* mywork,\n                    lapack_int* myldwork );\nvoid LAPACK_dtprfb( char* side, char* trans, char* direct, char* storev,\n                    lapack_int* m, lapack_int* n, lapack_int* k, lapack_int* l,\n                    const double* v, lapack_int* ldv, const double* t,\n                    lapack_int* ldt, double* a, lapack_int* lda, double* b,\n                    lapack_int* ldb, const double* mywork,\n                    lapack_int* myldwork );\nvoid LAPACK_ctprfb( char* side, char* trans, char* direct, char* storev,\n                    lapack_int* m, lapack_int* n, lapack_int* k, lapack_int* l,\n                    const lapack_complex_float* v, lapack_int* ldv,\n                    const lapack_complex_float* t, lapack_int* ldt,\n                    lapack_complex_float* a, lapack_int* lda,\n                    lapack_complex_float* b, lapack_int* ldb,\n                    const float* mywork, lapack_int* myldwork );\nvoid LAPACK_ztprfb( char* side, char* trans, char* direct, char* storev,\n                    lapack_int* m, lapack_int* n, lapack_int* k, lapack_int* l,\n                    const lapack_complex_double* v, lapack_int* ldv,\n                    const lapack_complex_double* t, lapack_int* ldt,\n                    lapack_complex_double* a, lapack_int* lda,\n                    lapack_complex_double* b, lapack_int* ldb,\n                    const double* mywork, lapack_int* myldwork );\n// LAPACK 3.X.X\nvoid LAPACK_csyr( char* uplo, lapack_int* n, lapack_complex_float* alpha,\n                      const lapack_complex_float* x, lapack_int* incx,\n                      lapack_complex_float* a, lapack_int* lda );\nvoid LAPACK_zsyr( char* uplo, lapack_int* n, lapack_complex_double* alpha,\n                      const lapack_complex_double* x, lapack_int* incx,\n                      lapack_complex_double* a, lapack_int* lda );\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n\n#endif /* _LAPACKE_H_ */\n\n#endif /* _MKL_LAPACKE_H_ */\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/misc/lapacke_mangling.h",
    "content": "#ifndef LAPACK_HEADER_INCLUDED\n#define LAPACK_HEADER_INCLUDED\n\n#ifndef LAPACK_GLOBAL\n#if defined(LAPACK_GLOBAL_PATTERN_LC) || defined(ADD_)\n#define LAPACK_GLOBAL(lcname,UCNAME)  lcname##_\n#elif defined(LAPACK_GLOBAL_PATTERN_UC) || defined(UPPER)\n#define LAPACK_GLOBAL(lcname,UCNAME)  UCNAME\n#elif defined(LAPACK_GLOBAL_PATTERN_MC) || defined(NOCHANGE)\n#define LAPACK_GLOBAL(lcname,UCNAME)  lcname\n#else\n#define LAPACK_GLOBAL(lcname,UCNAME)  lcname##_\n#endif\n#endif\n\n#endif\n\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/plugins/ArrayCwiseBinaryOps.h",
    "content": "\n/** \\returns an expression of the coefficient wise product of \\c *this and \\a other\n  *\n  * \\sa MatrixBase::cwiseProduct\n  */\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC\nEIGEN_STRONG_INLINE const EIGEN_CWISE_BINARY_RETURN_TYPE(Derived,OtherDerived,product)\noperator*(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const\n{\n  return EIGEN_CWISE_BINARY_RETURN_TYPE(Derived,OtherDerived,product)(derived(), other.derived());\n}\n\n/** \\returns an expression of the coefficient wise quotient of \\c *this and \\a other\n  *\n  * \\sa MatrixBase::cwiseQuotient\n  */\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC\nEIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_quotient_op<Scalar,typename OtherDerived::Scalar>, const Derived, const OtherDerived>\noperator/(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const\n{\n  return CwiseBinaryOp<internal::scalar_quotient_op<Scalar,typename OtherDerived::Scalar>, const Derived, const OtherDerived>(derived(), other.derived());\n}\n\n/** \\returns an expression of the coefficient-wise min of \\c *this and \\a other\n  *\n  * Example: \\include Cwise_min.cpp\n  * Output: \\verbinclude Cwise_min.out\n  *\n  * \\sa max()\n  */\nEIGEN_MAKE_CWISE_BINARY_OP(min,min)\n\n/** \\returns an expression of the coefficient-wise min of \\c *this and scalar \\a other\n  *\n  * \\sa max()\n  */\nEIGEN_DEVICE_FUNC\nEIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_min_op<Scalar,Scalar>, const Derived,\n                                        const CwiseNullaryOp<internal::scalar_constant_op<Scalar>, PlainObject> >\n#ifdef EIGEN_PARSED_BY_DOXYGEN\nmin\n#else\n(min)\n#endif\n(const Scalar &other) const\n{\n  return (min)(Derived::PlainObject::Constant(rows(), cols(), other));\n}\n\n/** \\returns an expression of the coefficient-wise max of \\c *this and \\a other\n  *\n  * Example: \\include Cwise_max.cpp\n  * Output: \\verbinclude Cwise_max.out\n  *\n  * \\sa min()\n  */\nEIGEN_MAKE_CWISE_BINARY_OP(max,max)\n\n/** \\returns an expression of the coefficient-wise max of \\c *this and scalar \\a other\n  *\n  * \\sa min()\n  */\nEIGEN_DEVICE_FUNC\nEIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_max_op<Scalar,Scalar>, const Derived,\n                                        const CwiseNullaryOp<internal::scalar_constant_op<Scalar>, PlainObject> >\n#ifdef EIGEN_PARSED_BY_DOXYGEN\nmax\n#else\n(max)\n#endif\n(const Scalar &other) const\n{\n  return (max)(Derived::PlainObject::Constant(rows(), cols(), other));\n}\n\n/** \\returns an expression of the coefficient-wise absdiff of \\c *this and \\a other\n  *\n  * Example: \\include Cwise_absolute_difference.cpp\n  * Output: \\verbinclude Cwise_absolute_difference.out\n  *\n  * \\sa absolute_difference()\n  */\nEIGEN_MAKE_CWISE_BINARY_OP(absolute_difference,absolute_difference)\n\n/** \\returns an expression of the coefficient-wise absolute_difference of \\c *this and scalar \\a other\n  *\n  * \\sa absolute_difference()\n  */\nEIGEN_DEVICE_FUNC\nEIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_absolute_difference_op<Scalar,Scalar>, const Derived,\n                                        const CwiseNullaryOp<internal::scalar_constant_op<Scalar>, PlainObject> >\n#ifdef EIGEN_PARSED_BY_DOXYGEN\nabsolute_difference\n#else\n(absolute_difference)\n#endif\n(const Scalar &other) const\n{\n  return (absolute_difference)(Derived::PlainObject::Constant(rows(), cols(), other));\n}\n\n/** \\returns an expression of the coefficient-wise power of \\c *this to the given array of \\a exponents.\n  *\n  * This function computes the coefficient-wise power.\n  *\n  * Example: \\include Cwise_array_power_array.cpp\n  * Output: \\verbinclude Cwise_array_power_array.out\n  */\nEIGEN_MAKE_CWISE_BINARY_OP(pow,pow)\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\nEIGEN_MAKE_SCALAR_BINARY_OP_ONTHERIGHT(pow,pow)\n#else\n/** \\returns an expression of the coefficients of \\c *this rasied to the constant power \\a exponent\n  *\n  * \\tparam T is the scalar type of \\a exponent. It must be compatible with the scalar type of the given expression.\n  *\n  * This function computes the coefficient-wise power. The function MatrixBase::pow() in the\n  * unsupported module MatrixFunctions computes the matrix power.\n  *\n  * Example: \\include Cwise_pow.cpp\n  * Output: \\verbinclude Cwise_pow.out\n  *\n  * \\sa ArrayBase::pow(ArrayBase), square(), cube(), exp(), log()\n  */\ntemplate<typename T>\nconst CwiseBinaryOp<internal::scalar_pow_op<Scalar,T>,Derived,Constant<T> > pow(const T& exponent) const;\n#endif\n\n\n// TODO code generating macros could be moved to Macros.h and could include generation of documentation\n#define EIGEN_MAKE_CWISE_COMP_OP(OP, COMPARATOR) \\\ntemplate<typename OtherDerived> \\\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_cmp_op<Scalar, typename OtherDerived::Scalar, internal::cmp_ ## COMPARATOR>, const Derived, const OtherDerived> \\\nOP(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const \\\n{ \\\n  return CwiseBinaryOp<internal::scalar_cmp_op<Scalar, typename OtherDerived::Scalar, internal::cmp_ ## COMPARATOR>, const Derived, const OtherDerived>(derived(), other.derived()); \\\n}\\\ntypedef CwiseBinaryOp<internal::scalar_cmp_op<Scalar,Scalar, internal::cmp_ ## COMPARATOR>, const Derived, const CwiseNullaryOp<internal::scalar_constant_op<Scalar>, PlainObject> > Cmp ## COMPARATOR ## ReturnType; \\\ntypedef CwiseBinaryOp<internal::scalar_cmp_op<Scalar,Scalar, internal::cmp_ ## COMPARATOR>, const CwiseNullaryOp<internal::scalar_constant_op<Scalar>, PlainObject>, const Derived > RCmp ## COMPARATOR ## ReturnType; \\\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Cmp ## COMPARATOR ## ReturnType \\\nOP(const Scalar& s) const { \\\n  return this->OP(Derived::PlainObject::Constant(rows(), cols(), s)); \\\n} \\\nEIGEN_DEVICE_FUNC friend EIGEN_STRONG_INLINE const RCmp ## COMPARATOR ## ReturnType \\\nOP(const Scalar& s, const Derived& d) { \\\n  return Derived::PlainObject::Constant(d.rows(), d.cols(), s).OP(d); \\\n}\n\n#define EIGEN_MAKE_CWISE_COMP_R_OP(OP, R_OP, RCOMPARATOR) \\\ntemplate<typename OtherDerived> \\\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_cmp_op<typename OtherDerived::Scalar, Scalar, internal::cmp_##RCOMPARATOR>, const OtherDerived, const Derived> \\\nOP(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const \\\n{ \\\n  return CwiseBinaryOp<internal::scalar_cmp_op<typename OtherDerived::Scalar, Scalar, internal::cmp_##RCOMPARATOR>, const OtherDerived, const Derived>(other.derived(), derived()); \\\n} \\\nEIGEN_DEVICE_FUNC \\\ninline const RCmp ## RCOMPARATOR ## ReturnType \\\nOP(const Scalar& s) const { \\\n  return Derived::PlainObject::Constant(rows(), cols(), s).R_OP(*this); \\\n} \\\nfriend inline const Cmp ## RCOMPARATOR ## ReturnType \\\nOP(const Scalar& s, const Derived& d) { \\\n  return d.R_OP(Derived::PlainObject::Constant(d.rows(), d.cols(), s)); \\\n}\n\n\n\n/** \\returns an expression of the coefficient-wise \\< operator of *this and \\a other\n  *\n  * Example: \\include Cwise_less.cpp\n  * Output: \\verbinclude Cwise_less.out\n  *\n  * \\sa all(), any(), operator>(), operator<=()\n  */\nEIGEN_MAKE_CWISE_COMP_OP(operator<, LT)\n\n/** \\returns an expression of the coefficient-wise \\<= operator of *this and \\a other\n  *\n  * Example: \\include Cwise_less_equal.cpp\n  * Output: \\verbinclude Cwise_less_equal.out\n  *\n  * \\sa all(), any(), operator>=(), operator<()\n  */\nEIGEN_MAKE_CWISE_COMP_OP(operator<=, LE)\n\n/** \\returns an expression of the coefficient-wise \\> operator of *this and \\a other\n  *\n  * Example: \\include Cwise_greater.cpp\n  * Output: \\verbinclude Cwise_greater.out\n  *\n  * \\sa all(), any(), operator>=(), operator<()\n  */\nEIGEN_MAKE_CWISE_COMP_R_OP(operator>, operator<, LT)\n\n/** \\returns an expression of the coefficient-wise \\>= operator of *this and \\a other\n  *\n  * Example: \\include Cwise_greater_equal.cpp\n  * Output: \\verbinclude Cwise_greater_equal.out\n  *\n  * \\sa all(), any(), operator>(), operator<=()\n  */\nEIGEN_MAKE_CWISE_COMP_R_OP(operator>=, operator<=, LE)\n\n/** \\returns an expression of the coefficient-wise == operator of *this and \\a other\n  *\n  * \\warning this performs an exact comparison, which is generally a bad idea with floating-point types.\n  * In order to check for equality between two vectors or matrices with floating-point coefficients, it is\n  * generally a far better idea to use a fuzzy comparison as provided by isApprox() and\n  * isMuchSmallerThan().\n  *\n  * Example: \\include Cwise_equal_equal.cpp\n  * Output: \\verbinclude Cwise_equal_equal.out\n  *\n  * \\sa all(), any(), isApprox(), isMuchSmallerThan()\n  */\nEIGEN_MAKE_CWISE_COMP_OP(operator==, EQ)\n\n/** \\returns an expression of the coefficient-wise != operator of *this and \\a other\n  *\n  * \\warning this performs an exact comparison, which is generally a bad idea with floating-point types.\n  * In order to check for equality between two vectors or matrices with floating-point coefficients, it is\n  * generally a far better idea to use a fuzzy comparison as provided by isApprox() and\n  * isMuchSmallerThan().\n  *\n  * Example: \\include Cwise_not_equal.cpp\n  * Output: \\verbinclude Cwise_not_equal.out\n  *\n  * \\sa all(), any(), isApprox(), isMuchSmallerThan()\n  */\nEIGEN_MAKE_CWISE_COMP_OP(operator!=, NEQ)\n\n\n#undef EIGEN_MAKE_CWISE_COMP_OP\n#undef EIGEN_MAKE_CWISE_COMP_R_OP\n\n// scalar addition\n#ifndef EIGEN_PARSED_BY_DOXYGEN\nEIGEN_MAKE_SCALAR_BINARY_OP(operator+,sum)\n#else\n/** \\returns an expression of \\c *this with each coeff incremented by the constant \\a scalar\n  *\n  * \\tparam T is the scalar type of \\a scalar. It must be compatible with the scalar type of the given expression.\n  *\n  * Example: \\include Cwise_plus.cpp\n  * Output: \\verbinclude Cwise_plus.out\n  *\n  * \\sa operator+=(), operator-()\n  */\ntemplate<typename T>\nconst CwiseBinaryOp<internal::scalar_sum_op<Scalar,T>,Derived,Constant<T> > operator+(const T& scalar) const;\n/** \\returns an expression of \\a expr with each coeff incremented by the constant \\a scalar\n  *\n  * \\tparam T is the scalar type of \\a scalar. It must be compatible with the scalar type of the given expression.\n  */\ntemplate<typename T> friend\nconst CwiseBinaryOp<internal::scalar_sum_op<T,Scalar>,Constant<T>,Derived> operator+(const T& scalar, const StorageBaseType& expr);\n#endif\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\nEIGEN_MAKE_SCALAR_BINARY_OP(operator-,difference)\n#else\n/** \\returns an expression of \\c *this with each coeff decremented by the constant \\a scalar\n  *\n  * \\tparam T is the scalar type of \\a scalar. It must be compatible with the scalar type of the given expression.\n  *\n  * Example: \\include Cwise_minus.cpp\n  * Output: \\verbinclude Cwise_minus.out\n  *\n  * \\sa operator+=(), operator-()\n  */\ntemplate<typename T>\nconst CwiseBinaryOp<internal::scalar_difference_op<Scalar,T>,Derived,Constant<T> > operator-(const T& scalar) const;\n/** \\returns an expression of the constant matrix of value \\a scalar decremented by the coefficients of \\a expr\n  *\n  * \\tparam T is the scalar type of \\a scalar. It must be compatible with the scalar type of the given expression.\n  */\ntemplate<typename T> friend\nconst CwiseBinaryOp<internal::scalar_difference_op<T,Scalar>,Constant<T>,Derived> operator-(const T& scalar, const StorageBaseType& expr);\n#endif\n\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\n  EIGEN_MAKE_SCALAR_BINARY_OP_ONTHELEFT(operator/,quotient)\n#else\n  /**\n    * \\brief Component-wise division of the scalar \\a s by array elements of \\a a.\n    *\n    * \\tparam Scalar is the scalar type of \\a x. It must be compatible with the scalar type of the given array expression (\\c Derived::Scalar).\n    */\n  template<typename T> friend\n  inline const CwiseBinaryOp<internal::scalar_quotient_op<T,Scalar>,Constant<T>,Derived>\n  operator/(const T& s,const StorageBaseType& a);\n#endif\n\n/** \\returns an expression of the coefficient-wise ^ operator of *this and \\a other\n *\n * \\warning this operator is for expression of bool only.\n *\n * Example: \\include Cwise_boolean_xor.cpp\n * Output: \\verbinclude Cwise_boolean_xor.out\n *\n * \\sa operator&&(), select()\n */\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC\ninline const CwiseBinaryOp<internal::scalar_boolean_xor_op, const Derived, const OtherDerived>\noperator^(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const\n{\n  EIGEN_STATIC_ASSERT((internal::is_same<bool,Scalar>::value && internal::is_same<bool,typename OtherDerived::Scalar>::value),\n                      THIS_METHOD_IS_ONLY_FOR_EXPRESSIONS_OF_BOOL);\n  return CwiseBinaryOp<internal::scalar_boolean_xor_op, const Derived, const OtherDerived>(derived(),other.derived());\n}\n\n// NOTE disabled until we agree on argument order\n#if 0\n/** \\cpp11 \\returns an expression of the coefficient-wise polygamma function.\n  *\n  * \\specialfunctions_module\n  *\n  * It returns the \\a n -th derivative of the digamma(psi) evaluated at \\c *this.\n  *\n  * \\warning Be careful with the order of the parameters: x.polygamma(n) is equivalent to polygamma(n,x)\n  *\n  * \\sa Eigen::polygamma()\n  */\ntemplate<typename DerivedN>\ninline const CwiseBinaryOp<internal::scalar_polygamma_op<Scalar>, const DerivedN, const Derived>\npolygamma(const EIGEN_CURRENT_STORAGE_BASE_CLASS<DerivedN> &n) const\n{\n  return CwiseBinaryOp<internal::scalar_polygamma_op<Scalar>, const DerivedN, const Derived>(n.derived(), this->derived());\n}\n#endif\n\n/** \\returns an expression of the coefficient-wise zeta function.\n  *\n  * \\specialfunctions_module\n  *\n  * It returns the Riemann zeta function of two arguments \\c *this and \\a q:\n  *\n  * \\param q is the shift, it must be > 0\n  *\n  * \\note *this is the exponent, it must be > 1.\n  * \\note This function supports only float and double scalar types. To support other scalar types, the user has\n  * to provide implementations of zeta(T,T) for any scalar type T to be supported.\n  *\n  * This method is an alias for zeta(*this,q);\n  *\n  * \\sa Eigen::zeta()\n  */\ntemplate<typename DerivedQ>\ninline const CwiseBinaryOp<internal::scalar_zeta_op<Scalar>, const Derived, const DerivedQ>\nzeta(const EIGEN_CURRENT_STORAGE_BASE_CLASS<DerivedQ> &q) const\n{\n  return CwiseBinaryOp<internal::scalar_zeta_op<Scalar>, const Derived, const DerivedQ>(this->derived(), q.derived());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/plugins/ArrayCwiseUnaryOps.h",
    "content": "\n\ntypedef CwiseUnaryOp<internal::scalar_abs_op<Scalar>, const Derived> AbsReturnType;\ntypedef CwiseUnaryOp<internal::scalar_arg_op<Scalar>, const Derived> ArgReturnType;\ntypedef CwiseUnaryOp<internal::scalar_abs2_op<Scalar>, const Derived> Abs2ReturnType;\ntypedef CwiseUnaryOp<internal::scalar_sqrt_op<Scalar>, const Derived> SqrtReturnType;\ntypedef CwiseUnaryOp<internal::scalar_rsqrt_op<Scalar>, const Derived> RsqrtReturnType;\ntypedef CwiseUnaryOp<internal::scalar_sign_op<Scalar>, const Derived> SignReturnType;\ntypedef CwiseUnaryOp<internal::scalar_inverse_op<Scalar>, const Derived> InverseReturnType;\ntypedef CwiseUnaryOp<internal::scalar_boolean_not_op<Scalar>, const Derived> BooleanNotReturnType;\n\ntypedef CwiseUnaryOp<internal::scalar_exp_op<Scalar>, const Derived> ExpReturnType;\ntypedef CwiseUnaryOp<internal::scalar_expm1_op<Scalar>, const Derived> Expm1ReturnType;\ntypedef CwiseUnaryOp<internal::scalar_log_op<Scalar>, const Derived> LogReturnType;\ntypedef CwiseUnaryOp<internal::scalar_log1p_op<Scalar>, const Derived> Log1pReturnType;\ntypedef CwiseUnaryOp<internal::scalar_log10_op<Scalar>, const Derived> Log10ReturnType;\ntypedef CwiseUnaryOp<internal::scalar_cos_op<Scalar>, const Derived> CosReturnType;\ntypedef CwiseUnaryOp<internal::scalar_sin_op<Scalar>, const Derived> SinReturnType;\ntypedef CwiseUnaryOp<internal::scalar_tan_op<Scalar>, const Derived> TanReturnType;\ntypedef CwiseUnaryOp<internal::scalar_acos_op<Scalar>, const Derived> AcosReturnType;\ntypedef CwiseUnaryOp<internal::scalar_asin_op<Scalar>, const Derived> AsinReturnType;\ntypedef CwiseUnaryOp<internal::scalar_atan_op<Scalar>, const Derived> AtanReturnType;\ntypedef CwiseUnaryOp<internal::scalar_tanh_op<Scalar>, const Derived> TanhReturnType;\ntypedef CwiseUnaryOp<internal::scalar_logistic_op<Scalar>, const Derived> LogisticReturnType;\ntypedef CwiseUnaryOp<internal::scalar_sinh_op<Scalar>, const Derived> SinhReturnType;\n#if EIGEN_HAS_CXX11_MATH\ntypedef CwiseUnaryOp<internal::scalar_atanh_op<Scalar>, const Derived> AtanhReturnType;\ntypedef CwiseUnaryOp<internal::scalar_asinh_op<Scalar>, const Derived> AsinhReturnType;\ntypedef CwiseUnaryOp<internal::scalar_acosh_op<Scalar>, const Derived> AcoshReturnType;\n#endif\ntypedef CwiseUnaryOp<internal::scalar_cosh_op<Scalar>, const Derived> CoshReturnType;\ntypedef CwiseUnaryOp<internal::scalar_square_op<Scalar>, const Derived> SquareReturnType;\ntypedef CwiseUnaryOp<internal::scalar_cube_op<Scalar>, const Derived> CubeReturnType;\ntypedef CwiseUnaryOp<internal::scalar_round_op<Scalar>, const Derived> RoundReturnType;\ntypedef CwiseUnaryOp<internal::scalar_rint_op<Scalar>, const Derived> RintReturnType;\ntypedef CwiseUnaryOp<internal::scalar_floor_op<Scalar>, const Derived> FloorReturnType;\ntypedef CwiseUnaryOp<internal::scalar_ceil_op<Scalar>, const Derived> CeilReturnType;\ntypedef CwiseUnaryOp<internal::scalar_isnan_op<Scalar>, const Derived> IsNaNReturnType;\ntypedef CwiseUnaryOp<internal::scalar_isinf_op<Scalar>, const Derived> IsInfReturnType;\ntypedef CwiseUnaryOp<internal::scalar_isfinite_op<Scalar>, const Derived> IsFiniteReturnType;\n\n/** \\returns an expression of the coefficient-wise absolute value of \\c *this\n  *\n  * Example: \\include Cwise_abs.cpp\n  * Output: \\verbinclude Cwise_abs.out\n  *\n  * \\sa <a href=\"group__CoeffwiseMathFunctions.html#cwisetable_abs\">Math functions</a>, abs2()\n  */\nEIGEN_DEVICE_FUNC\nEIGEN_STRONG_INLINE const AbsReturnType\nabs() const\n{\n  return AbsReturnType(derived());\n}\n\n/** \\returns an expression of the coefficient-wise phase angle of \\c *this\n  *\n  * Example: \\include Cwise_arg.cpp\n  * Output: \\verbinclude Cwise_arg.out\n  *\n  * \\sa abs()\n  */\nEIGEN_DEVICE_FUNC\nEIGEN_STRONG_INLINE const ArgReturnType\narg() const\n{\n  return ArgReturnType(derived());\n}\n\n/** \\returns an expression of the coefficient-wise squared absolute value of \\c *this\n  *\n  * Example: \\include Cwise_abs2.cpp\n  * Output: \\verbinclude Cwise_abs2.out\n  *\n  * \\sa <a href=\"group__CoeffwiseMathFunctions.html#cwisetable_abs2\">Math functions</a>, abs(), square()\n  */\nEIGEN_DEVICE_FUNC\nEIGEN_STRONG_INLINE const Abs2ReturnType\nabs2() const\n{\n  return Abs2ReturnType(derived());\n}\n\n/** \\returns an expression of the coefficient-wise exponential of *this.\n  *\n  * This function computes the coefficient-wise exponential. The function MatrixBase::exp() in the\n  * unsupported module MatrixFunctions computes the matrix exponential.\n  *\n  * Example: \\include Cwise_exp.cpp\n  * Output: \\verbinclude Cwise_exp.out\n  *\n  * \\sa <a href=\"group__CoeffwiseMathFunctions.html#cwisetable_exp\">Math functions</a>, pow(), log(), sin(), cos()\n  */\nEIGEN_DEVICE_FUNC\ninline const ExpReturnType\nexp() const\n{\n  return ExpReturnType(derived());\n}\n\n/** \\returns an expression of the coefficient-wise exponential of *this minus 1.\n  *\n  * In exact arithmetic, \\c x.expm1() is equivalent to \\c x.exp() - 1,\n  * however, with finite precision, this function is much more accurate when \\c x is close to zero.\n  *\n  * \\sa <a href=\"group__CoeffwiseMathFunctions.html#cwisetable_expm1\">Math functions</a>, exp()\n  */\nEIGEN_DEVICE_FUNC\ninline const Expm1ReturnType\nexpm1() const\n{\n  return Expm1ReturnType(derived());\n}\n\n/** \\returns an expression of the coefficient-wise logarithm of *this.\n  *\n  * This function computes the coefficient-wise logarithm. The function MatrixBase::log() in the\n  * unsupported module MatrixFunctions computes the matrix logarithm.\n  *\n  * Example: \\include Cwise_log.cpp\n  * Output: \\verbinclude Cwise_log.out\n  *\n  * \\sa <a href=\"group__CoeffwiseMathFunctions.html#cwisetable_log\">Math functions</a>, log()\n  */\nEIGEN_DEVICE_FUNC\ninline const LogReturnType\nlog() const\n{\n  return LogReturnType(derived());\n}\n\n/** \\returns an expression of the coefficient-wise logarithm of 1 plus \\c *this.\n  *\n  * In exact arithmetic, \\c x.log() is equivalent to \\c (x+1).log(),\n  * however, with finite precision, this function is much more accurate when \\c x is close to zero.\n  *\n  * \\sa <a href=\"group__CoeffwiseMathFunctions.html#cwisetable_log1p\">Math functions</a>, log()\n  */\nEIGEN_DEVICE_FUNC\ninline const Log1pReturnType\nlog1p() const\n{\n  return Log1pReturnType(derived());\n}\n\n/** \\returns an expression of the coefficient-wise base-10 logarithm of *this.\n  *\n  * This function computes the coefficient-wise base-10 logarithm.\n  *\n  * Example: \\include Cwise_log10.cpp\n  * Output: \\verbinclude Cwise_log10.out\n  *\n  * \\sa <a href=\"group__CoeffwiseMathFunctions.html#cwisetable_log10\">Math functions</a>, log()\n  */\nEIGEN_DEVICE_FUNC\ninline const Log10ReturnType\nlog10() const\n{\n  return Log10ReturnType(derived());\n}\n\n/** \\returns an expression of the coefficient-wise square root of *this.\n  *\n  * This function computes the coefficient-wise square root. The function MatrixBase::sqrt() in the\n  * unsupported module MatrixFunctions computes the matrix square root.\n  *\n  * Example: \\include Cwise_sqrt.cpp\n  * Output: \\verbinclude Cwise_sqrt.out\n  *\n  * \\sa <a href=\"group__CoeffwiseMathFunctions.html#cwisetable_sqrt\">Math functions</a>, pow(), square()\n  */\nEIGEN_DEVICE_FUNC\ninline const SqrtReturnType\nsqrt() const\n{\n  return SqrtReturnType(derived());\n}\n\n/** \\returns an expression of the coefficient-wise inverse square root of *this.\n  *\n  * This function computes the coefficient-wise inverse square root.\n  *\n  * Example: \\include Cwise_sqrt.cpp\n  * Output: \\verbinclude Cwise_sqrt.out\n  *\n  * \\sa pow(), square()\n  */\nEIGEN_DEVICE_FUNC\ninline const RsqrtReturnType\nrsqrt() const\n{\n  return RsqrtReturnType(derived());\n}\n\n/** \\returns an expression of the coefficient-wise signum of *this.\n  *\n  * This function computes the coefficient-wise signum.\n  *\n  * Example: \\include Cwise_sign.cpp\n  * Output: \\verbinclude Cwise_sign.out\n  *\n  * \\sa pow(), square()\n  */\nEIGEN_DEVICE_FUNC\ninline const SignReturnType\nsign() const\n{\n  return SignReturnType(derived());\n}\n\n\n/** \\returns an expression of the coefficient-wise cosine of *this.\n  *\n  * This function computes the coefficient-wise cosine. The function MatrixBase::cos() in the\n  * unsupported module MatrixFunctions computes the matrix cosine.\n  *\n  * Example: \\include Cwise_cos.cpp\n  * Output: \\verbinclude Cwise_cos.out\n  *\n  * \\sa <a href=\"group__CoeffwiseMathFunctions.html#cwisetable_cos\">Math functions</a>, sin(), acos()\n  */\nEIGEN_DEVICE_FUNC\ninline const CosReturnType\ncos() const\n{\n  return CosReturnType(derived());\n}\n\n\n/** \\returns an expression of the coefficient-wise sine of *this.\n  *\n  * This function computes the coefficient-wise sine. The function MatrixBase::sin() in the\n  * unsupported module MatrixFunctions computes the matrix sine.\n  *\n  * Example: \\include Cwise_sin.cpp\n  * Output: \\verbinclude Cwise_sin.out\n  *\n  * \\sa <a href=\"group__CoeffwiseMathFunctions.html#cwisetable_sin\">Math functions</a>, cos(), asin()\n  */\nEIGEN_DEVICE_FUNC\ninline const SinReturnType\nsin() const\n{\n  return SinReturnType(derived());\n}\n\n/** \\returns an expression of the coefficient-wise tan of *this.\n  *\n  * Example: \\include Cwise_tan.cpp\n  * Output: \\verbinclude Cwise_tan.out\n  *\n  * \\sa <a href=\"group__CoeffwiseMathFunctions.html#cwisetable_tan\">Math functions</a>, cos(), sin()\n  */\nEIGEN_DEVICE_FUNC\ninline const TanReturnType\ntan() const\n{\n  return TanReturnType(derived());\n}\n\n/** \\returns an expression of the coefficient-wise arc tan of *this.\n  *\n  * Example: \\include Cwise_atan.cpp\n  * Output: \\verbinclude Cwise_atan.out\n  *\n  * \\sa <a href=\"group__CoeffwiseMathFunctions.html#cwisetable_atan\">Math functions</a>, tan(), asin(), acos()\n  */\nEIGEN_DEVICE_FUNC\ninline const AtanReturnType\natan() const\n{\n  return AtanReturnType(derived());\n}\n\n/** \\returns an expression of the coefficient-wise arc cosine of *this.\n  *\n  * Example: \\include Cwise_acos.cpp\n  * Output: \\verbinclude Cwise_acos.out\n  *\n  * \\sa <a href=\"group__CoeffwiseMathFunctions.html#cwisetable_acos\">Math functions</a>, cos(), asin()\n  */\nEIGEN_DEVICE_FUNC\ninline const AcosReturnType\nacos() const\n{\n  return AcosReturnType(derived());\n}\n\n/** \\returns an expression of the coefficient-wise arc sine of *this.\n  *\n  * Example: \\include Cwise_asin.cpp\n  * Output: \\verbinclude Cwise_asin.out\n  *\n  * \\sa <a href=\"group__CoeffwiseMathFunctions.html#cwisetable_asin\">Math functions</a>, sin(), acos()\n  */\nEIGEN_DEVICE_FUNC\ninline const AsinReturnType\nasin() const\n{\n  return AsinReturnType(derived());\n}\n\n/** \\returns an expression of the coefficient-wise hyperbolic tan of *this.\n  *\n  * Example: \\include Cwise_tanh.cpp\n  * Output: \\verbinclude Cwise_tanh.out\n  *\n  * \\sa <a href=\"group__CoeffwiseMathFunctions.html#cwisetable_tanh\">Math functions</a>, tan(), sinh(), cosh()\n  */\nEIGEN_DEVICE_FUNC\ninline const TanhReturnType\ntanh() const\n{\n  return TanhReturnType(derived());\n}\n\n/** \\returns an expression of the coefficient-wise hyperbolic sin of *this.\n  *\n  * Example: \\include Cwise_sinh.cpp\n  * Output: \\verbinclude Cwise_sinh.out\n  *\n  * \\sa <a href=\"group__CoeffwiseMathFunctions.html#cwisetable_sinh\">Math functions</a>, sin(), tanh(), cosh()\n  */\nEIGEN_DEVICE_FUNC\ninline const SinhReturnType\nsinh() const\n{\n  return SinhReturnType(derived());\n}\n\n/** \\returns an expression of the coefficient-wise hyperbolic cos of *this.\n  *\n  * Example: \\include Cwise_cosh.cpp\n  * Output: \\verbinclude Cwise_cosh.out\n  *\n  * \\sa <a href=\"group__CoeffwiseMathFunctions.html#cwisetable_cosh\">Math functions</a>, tanh(), sinh(), cosh()\n  */\nEIGEN_DEVICE_FUNC\ninline const CoshReturnType\ncosh() const\n{\n  return CoshReturnType(derived());\n}\n\n#if EIGEN_HAS_CXX11_MATH\n/** \\returns an expression of the coefficient-wise inverse hyperbolic tan of *this.\n  *\n  * \\sa <a href=\"group__CoeffwiseMathFunctions.html#cwisetable_atanh\">Math functions</a>, atanh(), asinh(), acosh()\n  */\nEIGEN_DEVICE_FUNC\ninline const AtanhReturnType\natanh() const\n{\n  return AtanhReturnType(derived());\n}\n\n/** \\returns an expression of the coefficient-wise inverse hyperbolic sin of *this.\n  *\n  * \\sa <a href=\"group__CoeffwiseMathFunctions.html#cwisetable_asinh\">Math functions</a>, atanh(), asinh(), acosh()\n  */\nEIGEN_DEVICE_FUNC\ninline const AsinhReturnType\nasinh() const\n{\n  return AsinhReturnType(derived());\n}\n\n/** \\returns an expression of the coefficient-wise inverse hyperbolic cos of *this.\n  *\n  * \\sa <a href=\"group__CoeffwiseMathFunctions.html#cwisetable_acosh\">Math functions</a>, atanh(), asinh(), acosh()\n  */\nEIGEN_DEVICE_FUNC\ninline const AcoshReturnType\nacosh() const\n{\n  return AcoshReturnType(derived());\n}\n#endif\n\n/** \\returns an expression of the coefficient-wise logistic of *this.\n  */\nEIGEN_DEVICE_FUNC\ninline const LogisticReturnType\nlogistic() const\n{\n  return LogisticReturnType(derived());\n}\n\n/** \\returns an expression of the coefficient-wise inverse of *this.\n  *\n  * Example: \\include Cwise_inverse.cpp\n  * Output: \\verbinclude Cwise_inverse.out\n  *\n  * \\sa operator/(), operator*()\n  */\nEIGEN_DEVICE_FUNC\ninline const InverseReturnType\ninverse() const\n{\n  return InverseReturnType(derived());\n}\n\n/** \\returns an expression of the coefficient-wise square of *this.\n  *\n  * Example: \\include Cwise_square.cpp\n  * Output: \\verbinclude Cwise_square.out\n  *\n  * \\sa <a href=\"group__CoeffwiseMathFunctions.html#cwisetable_squareE\">Math functions</a>, abs2(), cube(), pow()\n  */\nEIGEN_DEVICE_FUNC\ninline const SquareReturnType\nsquare() const\n{\n  return SquareReturnType(derived());\n}\n\n/** \\returns an expression of the coefficient-wise cube of *this.\n  *\n  * Example: \\include Cwise_cube.cpp\n  * Output: \\verbinclude Cwise_cube.out\n  *\n  * \\sa <a href=\"group__CoeffwiseMathFunctions.html#cwisetable_cube\">Math functions</a>, square(), pow()\n  */\nEIGEN_DEVICE_FUNC\ninline const CubeReturnType\ncube() const\n{\n  return CubeReturnType(derived());\n}\n\n/** \\returns an expression of the coefficient-wise rint of *this.\n  *\n  * Example: \\include Cwise_rint.cpp\n  * Output: \\verbinclude Cwise_rint.out\n  *\n  * \\sa <a href=\"group__CoeffwiseMathFunctions.html#cwisetable_rint\">Math functions</a>, ceil(), floor()\n  */\nEIGEN_DEVICE_FUNC\ninline const RintReturnType\nrint() const\n{\n  return RintReturnType(derived());\n}\n\n/** \\returns an expression of the coefficient-wise round of *this.\n  *\n  * Example: \\include Cwise_round.cpp\n  * Output: \\verbinclude Cwise_round.out\n  *\n  * \\sa <a href=\"group__CoeffwiseMathFunctions.html#cwisetable_round\">Math functions</a>, ceil(), floor()\n  */\nEIGEN_DEVICE_FUNC\ninline const RoundReturnType\nround() const\n{\n  return RoundReturnType(derived());\n}\n\n/** \\returns an expression of the coefficient-wise floor of *this.\n  *\n  * Example: \\include Cwise_floor.cpp\n  * Output: \\verbinclude Cwise_floor.out\n  *\n  * \\sa <a href=\"group__CoeffwiseMathFunctions.html#cwisetable_floor\">Math functions</a>, ceil(), round()\n  */\nEIGEN_DEVICE_FUNC\ninline const FloorReturnType\nfloor() const\n{\n  return FloorReturnType(derived());\n}\n\n/** \\returns an expression of the coefficient-wise ceil of *this.\n  *\n  * Example: \\include Cwise_ceil.cpp\n  * Output: \\verbinclude Cwise_ceil.out\n  *\n  * \\sa <a href=\"group__CoeffwiseMathFunctions.html#cwisetable_ceil\">Math functions</a>, floor(), round()\n  */\nEIGEN_DEVICE_FUNC\ninline const CeilReturnType\nceil() const\n{\n  return CeilReturnType(derived());\n}\n\n/** \\returns an expression of the coefficient-wise isnan of *this.\n  *\n  * Example: \\include Cwise_isNaN.cpp\n  * Output: \\verbinclude Cwise_isNaN.out\n  *\n  * \\sa isfinite(), isinf()\n  */\nEIGEN_DEVICE_FUNC\ninline const IsNaNReturnType\nisNaN() const\n{\n  return IsNaNReturnType(derived());\n}\n\n/** \\returns an expression of the coefficient-wise isinf of *this.\n  *\n  * Example: \\include Cwise_isInf.cpp\n  * Output: \\verbinclude Cwise_isInf.out\n  *\n  * \\sa isnan(), isfinite()\n  */\nEIGEN_DEVICE_FUNC\ninline const IsInfReturnType\nisInf() const\n{\n  return IsInfReturnType(derived());\n}\n\n/** \\returns an expression of the coefficient-wise isfinite of *this.\n  *\n  * Example: \\include Cwise_isFinite.cpp\n  * Output: \\verbinclude Cwise_isFinite.out\n  *\n  * \\sa isnan(), isinf()\n  */\nEIGEN_DEVICE_FUNC\ninline const IsFiniteReturnType\nisFinite() const\n{\n  return IsFiniteReturnType(derived());\n}\n\n/** \\returns an expression of the coefficient-wise ! operator of *this\n  *\n  * \\warning this operator is for expression of bool only.\n  *\n  * Example: \\include Cwise_boolean_not.cpp\n  * Output: \\verbinclude Cwise_boolean_not.out\n  *\n  * \\sa operator!=()\n  */\nEIGEN_DEVICE_FUNC\ninline const BooleanNotReturnType\noperator!() const\n{\n  EIGEN_STATIC_ASSERT((internal::is_same<bool,Scalar>::value),\n                      THIS_METHOD_IS_ONLY_FOR_EXPRESSIONS_OF_BOOL);\n  return BooleanNotReturnType(derived());\n}\n\n\n// --- SpecialFunctions module ---\n\ntypedef CwiseUnaryOp<internal::scalar_lgamma_op<Scalar>, const Derived> LgammaReturnType;\ntypedef CwiseUnaryOp<internal::scalar_digamma_op<Scalar>, const Derived> DigammaReturnType;\ntypedef CwiseUnaryOp<internal::scalar_erf_op<Scalar>, const Derived> ErfReturnType;\ntypedef CwiseUnaryOp<internal::scalar_erfc_op<Scalar>, const Derived> ErfcReturnType;\ntypedef CwiseUnaryOp<internal::scalar_ndtri_op<Scalar>, const Derived> NdtriReturnType;\n\n/** \\cpp11 \\returns an expression of the coefficient-wise ln(|gamma(*this)|).\n  *\n  * \\specialfunctions_module\n  *\n  * \\note This function supports only float and double scalar types in c++11 mode. To support other scalar types,\n  * or float/double in non c++11 mode, the user has to provide implementations of lgamma(T) for any scalar\n  * type T to be supported.\n  *\n  * \\sa <a href=\"group__CoeffwiseMathFunctions.html#cwisetable_lgamma\">Math functions</a>, digamma()\n  */\nEIGEN_DEVICE_FUNC\ninline const LgammaReturnType\nlgamma() const\n{\n  return LgammaReturnType(derived());\n}\n\n/** \\returns an expression of the coefficient-wise digamma (psi, derivative of lgamma).\n  *\n  * \\specialfunctions_module\n  *\n  * \\note This function supports only float and double scalar types. To support other scalar types,\n  * the user has to provide implementations of digamma(T) for any scalar\n  * type T to be supported.\n  *\n  * \\sa <a href=\"group__CoeffwiseMathFunctions.html#cwisetable_digamma\">Math functions</a>, Eigen::digamma(), Eigen::polygamma(), lgamma()\n  */\nEIGEN_DEVICE_FUNC\ninline const DigammaReturnType\ndigamma() const\n{\n  return DigammaReturnType(derived());\n}\n\n/** \\cpp11 \\returns an expression of the coefficient-wise Gauss error\n  * function of *this.\n  *\n  * \\specialfunctions_module\n  *\n  * \\note This function supports only float and double scalar types in c++11 mode. To support other scalar types,\n  * or float/double in non c++11 mode, the user has to provide implementations of erf(T) for any scalar\n  * type T to be supported.\n  *\n  * \\sa <a href=\"group__CoeffwiseMathFunctions.html#cwisetable_erf\">Math functions</a>, erfc()\n  */\nEIGEN_DEVICE_FUNC\ninline const ErfReturnType\nerf() const\n{\n  return ErfReturnType(derived());\n}\n\n/** \\cpp11 \\returns an expression of the coefficient-wise Complementary error\n  * function of *this.\n  *\n  * \\specialfunctions_module\n  *\n  * \\note This function supports only float and double scalar types in c++11 mode. To support other scalar types,\n  * or float/double in non c++11 mode, the user has to provide implementations of erfc(T) for any scalar\n  * type T to be supported.\n  *\n  * \\sa <a href=\"group__CoeffwiseMathFunctions.html#cwisetable_erfc\">Math functions</a>, erf()\n  */\nEIGEN_DEVICE_FUNC\ninline const ErfcReturnType\nerfc() const\n{\n  return ErfcReturnType(derived());\n}\n\n/** \\returns an expression of the coefficient-wise inverse of the CDF of the Normal distribution function\n  * function of *this.\n  *\n  * \\specialfunctions_module\n  * \n  * In other words, considering `x = ndtri(y)`, it returns the argument, x, for which the area under the\n  * Gaussian probability density function (integrated from minus infinity to x) is equal to y.\n  *\n  * \\note This function supports only float and double scalar types. To support other scalar types,\n  * the user has to provide implementations of ndtri(T) for any scalar type T to be supported.\n  *\n  * \\sa <a href=\"group__CoeffwiseMathFunctions.html#cwisetable_ndtri\">Math functions</a>\n  */\nEIGEN_DEVICE_FUNC\ninline const NdtriReturnType\nndtri() const\n{\n  return NdtriReturnType(derived());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/plugins/BlockMethods.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2006-2010 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\n\n/// \\internal expression type of a column */\ntypedef Block<Derived, internal::traits<Derived>::RowsAtCompileTime, 1, !IsRowMajor> ColXpr;\ntypedef const Block<const Derived, internal::traits<Derived>::RowsAtCompileTime, 1, !IsRowMajor> ConstColXpr;\n/// \\internal expression type of a row */\ntypedef Block<Derived, 1, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> RowXpr;\ntypedef const Block<const Derived, 1, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> ConstRowXpr;\n/// \\internal expression type of a block of whole columns */\ntypedef Block<Derived, internal::traits<Derived>::RowsAtCompileTime, Dynamic, !IsRowMajor> ColsBlockXpr;\ntypedef const Block<const Derived, internal::traits<Derived>::RowsAtCompileTime, Dynamic, !IsRowMajor> ConstColsBlockXpr;\n/// \\internal expression type of a block of whole rows */\ntypedef Block<Derived, Dynamic, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> RowsBlockXpr;\ntypedef const Block<const Derived, Dynamic, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> ConstRowsBlockXpr;\n/// \\internal expression type of a block of whole columns */\ntemplate<int N> struct NColsBlockXpr { typedef Block<Derived, internal::traits<Derived>::RowsAtCompileTime, N, !IsRowMajor> Type; };\ntemplate<int N> struct ConstNColsBlockXpr { typedef const Block<const Derived, internal::traits<Derived>::RowsAtCompileTime, N, !IsRowMajor> Type; };\n/// \\internal expression type of a block of whole rows */\ntemplate<int N> struct NRowsBlockXpr { typedef Block<Derived, N, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> Type; };\ntemplate<int N> struct ConstNRowsBlockXpr { typedef const Block<const Derived, N, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> Type; };\n/// \\internal expression of a block */\ntypedef Block<Derived> BlockXpr;\ntypedef const Block<const Derived> ConstBlockXpr;\n/// \\internal expression of a block of fixed sizes */\ntemplate<int Rows, int Cols> struct FixedBlockXpr { typedef Block<Derived,Rows,Cols> Type; };\ntemplate<int Rows, int Cols> struct ConstFixedBlockXpr { typedef Block<const Derived,Rows,Cols> Type; };\n\ntypedef VectorBlock<Derived> SegmentReturnType;\ntypedef const VectorBlock<const Derived> ConstSegmentReturnType;\ntemplate<int Size> struct FixedSegmentReturnType { typedef VectorBlock<Derived, Size> Type; };\ntemplate<int Size> struct ConstFixedSegmentReturnType { typedef const VectorBlock<const Derived, Size> Type; };\n\n/// \\internal inner-vector\ntypedef Block<Derived,IsRowMajor?1:Dynamic,IsRowMajor?Dynamic:1,true>       InnerVectorReturnType;\ntypedef Block<const Derived,IsRowMajor?1:Dynamic,IsRowMajor?Dynamic:1,true> ConstInnerVectorReturnType;\n\n/// \\internal set of inner-vectors\ntypedef Block<Derived,Dynamic,Dynamic,true> InnerVectorsReturnType;\ntypedef Block<const Derived,Dynamic,Dynamic,true> ConstInnerVectorsReturnType;\n\n#endif // not EIGEN_PARSED_BY_DOXYGEN\n\n/// \\returns an expression of a block in \\c *this with either dynamic or fixed sizes.\n///\n/// \\param  startRow  the first row in the block\n/// \\param  startCol  the first column in the block\n/// \\param  blockRows number of rows in the block, specified at either run-time or compile-time\n/// \\param  blockCols number of columns in the block, specified at either run-time or compile-time\n/// \\tparam NRowsType the type of the value handling the number of rows in the block, typically Index.\n/// \\tparam NColsType the type of the value handling the number of columns in the block, typically Index.\n///\n/// Example using runtime (aka dynamic) sizes: \\include MatrixBase_block_int_int_int_int.cpp\n/// Output: \\verbinclude MatrixBase_block_int_int_int_int.out\n///\n/// \\newin{3.4}:\n///\n/// The number of rows \\a blockRows and columns \\a blockCols can also be specified at compile-time by passing Eigen::fix<N>,\n/// or Eigen::fix<N>(n) as arguments. In the later case, \\c n plays the role of a runtime fallback value in case \\c N equals Eigen::Dynamic.\n/// Here is an example with a fixed number of rows \\c NRows and dynamic number of columns \\c cols:\n/// \\code\n/// mat.block(i,j,fix<NRows>,cols)\n/// \\endcode\n///\n/// This function thus fully covers the features offered by the following overloads block<NRows,NCols>(Index, Index),\n/// and block<NRows,NCols>(Index, Index, Index, Index) that are thus obsolete. Indeed, this generic version avoids\n/// redundancy, it preserves the argument order, and prevents the need to rely on the template keyword in templated code.\n///\n/// but with less redundancy and more consistency as it does not modify the argument order\n/// and seamlessly enable hybrid fixed/dynamic sizes.\n///\n/// \\note Even in the case that the returned expression has dynamic size, in the case\n/// when it is applied to a fixed-size matrix, it inherits a fixed maximal size,\n/// which means that evaluating it does not cause a dynamic memory allocation.\n///\nEIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL\n///\n/// \\sa class Block, fix, fix<N>(int)\n///\ntemplate<typename NRowsType, typename NColsType>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n#ifndef EIGEN_PARSED_BY_DOXYGEN\ntypename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type\n#else\ntypename FixedBlockXpr<...,...>::Type\n#endif\nblock(Index startRow, Index startCol, NRowsType blockRows, NColsType blockCols)\n{\n  return typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type(\n            derived(), startRow, startCol, internal::get_runtime_value(blockRows), internal::get_runtime_value(blockCols));\n}\n\n/// This is the const version of block(Index,Index,NRowsType,NColsType)\ntemplate<typename NRowsType, typename NColsType>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n#ifndef EIGEN_PARSED_BY_DOXYGEN\nconst typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type\n#else\nconst typename ConstFixedBlockXpr<...,...>::Type\n#endif\nblock(Index startRow, Index startCol, NRowsType blockRows, NColsType blockCols) const\n{\n  return typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type(\n            derived(), startRow, startCol, internal::get_runtime_value(blockRows), internal::get_runtime_value(blockCols));\n}\n\n\n\n/// \\returns a expression of a top-right corner of \\c *this with either dynamic or fixed sizes.\n///\n/// \\param cRows the number of rows in the corner\n/// \\param cCols the number of columns in the corner\n/// \\tparam NRowsType the type of the value handling the number of rows in the block, typically Index.\n/// \\tparam NColsType the type of the value handling the number of columns in the block, typically Index.\n///\n/// Example with dynamic sizes: \\include MatrixBase_topRightCorner_int_int.cpp\n/// Output: \\verbinclude MatrixBase_topRightCorner_int_int.out\n///\n/// The number of rows \\a blockRows and columns \\a blockCols can also be specified at compile-time by passing Eigen::fix<N>,\n/// or Eigen::fix<N>(n) as arguments. See \\link block(Index,Index,NRowsType,NColsType) block() \\endlink for the details.\n///\nEIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL\n///\n/// \\sa block(Index,Index,NRowsType,NColsType), class Block\n///\ntemplate<typename NRowsType, typename NColsType>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n#ifndef EIGEN_PARSED_BY_DOXYGEN\ntypename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type\n#else\ntypename FixedBlockXpr<...,...>::Type\n#endif\ntopRightCorner(NRowsType cRows, NColsType cCols)\n{\n  return typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type\n            (derived(), 0, cols() - internal::get_runtime_value(cCols), internal::get_runtime_value(cRows), internal::get_runtime_value(cCols));\n}\n\n/// This is the const version of topRightCorner(NRowsType, NColsType).\ntemplate<typename NRowsType, typename NColsType>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n#ifndef EIGEN_PARSED_BY_DOXYGEN\nconst typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type\n#else\nconst typename ConstFixedBlockXpr<...,...>::Type\n#endif\ntopRightCorner(NRowsType cRows, NColsType cCols) const\n{\n  return typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type\n            (derived(), 0, cols() - internal::get_runtime_value(cCols), internal::get_runtime_value(cRows), internal::get_runtime_value(cCols));\n}\n\n/// \\returns an expression of a fixed-size top-right corner of \\c *this.\n///\n/// \\tparam CRows the number of rows in the corner\n/// \\tparam CCols the number of columns in the corner\n///\n/// Example: \\include MatrixBase_template_int_int_topRightCorner.cpp\n/// Output: \\verbinclude MatrixBase_template_int_int_topRightCorner.out\n///\nEIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL\n///\n/// \\sa class Block, block<int,int>(Index,Index)\n///\ntemplate<int CRows, int CCols>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ntypename FixedBlockXpr<CRows,CCols>::Type topRightCorner()\n{\n  return typename FixedBlockXpr<CRows,CCols>::Type(derived(), 0, cols() - CCols);\n}\n\n/// This is the const version of topRightCorner<int, int>().\ntemplate<int CRows, int CCols>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nconst typename ConstFixedBlockXpr<CRows,CCols>::Type topRightCorner() const\n{\n  return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), 0, cols() - CCols);\n}\n\n/// \\returns an expression of a top-right corner of \\c *this.\n///\n/// \\tparam CRows number of rows in corner as specified at compile-time\n/// \\tparam CCols number of columns in corner as specified at compile-time\n/// \\param  cRows number of rows in corner as specified at run-time\n/// \\param  cCols number of columns in corner as specified at run-time\n///\n/// This function is mainly useful for corners where the number of rows is specified at compile-time\n/// and the number of columns is specified at run-time, or vice versa. The compile-time and run-time\n/// information should not contradict. In other words, \\a cRows should equal \\a CRows unless\n/// \\a CRows is \\a Dynamic, and the same for the number of columns.\n///\n/// Example: \\include MatrixBase_template_int_int_topRightCorner_int_int.cpp\n/// Output: \\verbinclude MatrixBase_template_int_int_topRightCorner_int_int.out\n///\nEIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL\n///\n/// \\sa class Block\n///\ntemplate<int CRows, int CCols>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ntypename FixedBlockXpr<CRows,CCols>::Type topRightCorner(Index cRows, Index cCols)\n{\n  return typename FixedBlockXpr<CRows,CCols>::Type(derived(), 0, cols() - cCols, cRows, cCols);\n}\n\n/// This is the const version of topRightCorner<int, int>(Index, Index).\ntemplate<int CRows, int CCols>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nconst typename ConstFixedBlockXpr<CRows,CCols>::Type topRightCorner(Index cRows, Index cCols) const\n{\n  return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), 0, cols() - cCols, cRows, cCols);\n}\n\n\n\n/// \\returns an expression of a top-left corner of \\c *this  with either dynamic or fixed sizes.\n///\n/// \\param cRows the number of rows in the corner\n/// \\param cCols the number of columns in the corner\n/// \\tparam NRowsType the type of the value handling the number of rows in the block, typically Index.\n/// \\tparam NColsType the type of the value handling the number of columns in the block, typically Index.\n///\n/// Example: \\include MatrixBase_topLeftCorner_int_int.cpp\n/// Output: \\verbinclude MatrixBase_topLeftCorner_int_int.out\n///\n/// The number of rows \\a blockRows and columns \\a blockCols can also be specified at compile-time by passing Eigen::fix<N>,\n/// or Eigen::fix<N>(n) as arguments. See \\link block(Index,Index,NRowsType,NColsType) block() \\endlink for the details.\n///\nEIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL\n///\n/// \\sa block(Index,Index,NRowsType,NColsType), class Block\n///\ntemplate<typename NRowsType, typename NColsType>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n#ifndef EIGEN_PARSED_BY_DOXYGEN\ntypename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type\n#else\ntypename FixedBlockXpr<...,...>::Type\n#endif\ntopLeftCorner(NRowsType cRows, NColsType cCols)\n{\n  return typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type\n            (derived(), 0, 0, internal::get_runtime_value(cRows), internal::get_runtime_value(cCols));\n}\n\n/// This is the const version of topLeftCorner(Index, Index).\ntemplate<typename NRowsType, typename NColsType>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n#ifndef EIGEN_PARSED_BY_DOXYGEN\nconst typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type\n#else\nconst typename ConstFixedBlockXpr<...,...>::Type\n#endif\ntopLeftCorner(NRowsType cRows, NColsType cCols) const\n{\n  return typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type\n            (derived(), 0, 0, internal::get_runtime_value(cRows), internal::get_runtime_value(cCols));\n}\n\n/// \\returns an expression of a fixed-size top-left corner of \\c *this.\n///\n/// The template parameters CRows and CCols are the number of rows and columns in the corner.\n///\n/// Example: \\include MatrixBase_template_int_int_topLeftCorner.cpp\n/// Output: \\verbinclude MatrixBase_template_int_int_topLeftCorner.out\n///\nEIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL\n///\n/// \\sa block(Index,Index,NRowsType,NColsType), class Block\n///\ntemplate<int CRows, int CCols>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ntypename FixedBlockXpr<CRows,CCols>::Type topLeftCorner()\n{\n  return typename FixedBlockXpr<CRows,CCols>::Type(derived(), 0, 0);\n}\n\n/// This is the const version of topLeftCorner<int, int>().\ntemplate<int CRows, int CCols>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nconst typename ConstFixedBlockXpr<CRows,CCols>::Type topLeftCorner() const\n{\n  return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), 0, 0);\n}\n\n/// \\returns an expression of a top-left corner of \\c *this.\n///\n/// \\tparam CRows number of rows in corner as specified at compile-time\n/// \\tparam CCols number of columns in corner as specified at compile-time\n/// \\param  cRows number of rows in corner as specified at run-time\n/// \\param  cCols number of columns in corner as specified at run-time\n///\n/// This function is mainly useful for corners where the number of rows is specified at compile-time\n/// and the number of columns is specified at run-time, or vice versa. The compile-time and run-time\n/// information should not contradict. In other words, \\a cRows should equal \\a CRows unless\n/// \\a CRows is \\a Dynamic, and the same for the number of columns.\n///\n/// Example: \\include MatrixBase_template_int_int_topLeftCorner_int_int.cpp\n/// Output: \\verbinclude MatrixBase_template_int_int_topLeftCorner_int_int.out\n///\nEIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL\n///\n/// \\sa class Block\n///\ntemplate<int CRows, int CCols>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ntypename FixedBlockXpr<CRows,CCols>::Type topLeftCorner(Index cRows, Index cCols)\n{\n  return typename FixedBlockXpr<CRows,CCols>::Type(derived(), 0, 0, cRows, cCols);\n}\n\n/// This is the const version of topLeftCorner<int, int>(Index, Index).\ntemplate<int CRows, int CCols>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nconst typename ConstFixedBlockXpr<CRows,CCols>::Type topLeftCorner(Index cRows, Index cCols) const\n{\n  return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), 0, 0, cRows, cCols);\n}\n\n\n\n/// \\returns an expression of a bottom-right corner of \\c *this  with either dynamic or fixed sizes.\n///\n/// \\param cRows the number of rows in the corner\n/// \\param cCols the number of columns in the corner\n/// \\tparam NRowsType the type of the value handling the number of rows in the block, typically Index.\n/// \\tparam NColsType the type of the value handling the number of columns in the block, typically Index.\n///\n/// Example: \\include MatrixBase_bottomRightCorner_int_int.cpp\n/// Output: \\verbinclude MatrixBase_bottomRightCorner_int_int.out\n///\n/// The number of rows \\a blockRows and columns \\a blockCols can also be specified at compile-time by passing Eigen::fix<N>,\n/// or Eigen::fix<N>(n) as arguments. See \\link block(Index,Index,NRowsType,NColsType) block() \\endlink for the details.\n///\nEIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL\n///\n/// \\sa block(Index,Index,NRowsType,NColsType), class Block\n///\ntemplate<typename NRowsType, typename NColsType>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n#ifndef EIGEN_PARSED_BY_DOXYGEN\ntypename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type\n#else\ntypename FixedBlockXpr<...,...>::Type\n#endif\nbottomRightCorner(NRowsType cRows, NColsType cCols)\n{\n  return typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type\n            (derived(), rows() - internal::get_runtime_value(cRows), cols() - internal::get_runtime_value(cCols),\n                        internal::get_runtime_value(cRows), internal::get_runtime_value(cCols));\n}\n\n/// This is the const version of bottomRightCorner(NRowsType, NColsType).\ntemplate<typename NRowsType, typename NColsType>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n#ifndef EIGEN_PARSED_BY_DOXYGEN\nconst typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type\n#else\nconst typename ConstFixedBlockXpr<...,...>::Type\n#endif\nbottomRightCorner(NRowsType cRows, NColsType cCols) const\n{\n  return typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type\n            (derived(), rows() - internal::get_runtime_value(cRows), cols() - internal::get_runtime_value(cCols),\n                        internal::get_runtime_value(cRows), internal::get_runtime_value(cCols));\n}\n\n/// \\returns an expression of a fixed-size bottom-right corner of \\c *this.\n///\n/// The template parameters CRows and CCols are the number of rows and columns in the corner.\n///\n/// Example: \\include MatrixBase_template_int_int_bottomRightCorner.cpp\n/// Output: \\verbinclude MatrixBase_template_int_int_bottomRightCorner.out\n///\nEIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL\n///\n/// \\sa block(Index,Index,NRowsType,NColsType), class Block\n///\ntemplate<int CRows, int CCols>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ntypename FixedBlockXpr<CRows,CCols>::Type bottomRightCorner()\n{\n  return typename FixedBlockXpr<CRows,CCols>::Type(derived(), rows() - CRows, cols() - CCols);\n}\n\n/// This is the const version of bottomRightCorner<int, int>().\ntemplate<int CRows, int CCols>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nconst typename ConstFixedBlockXpr<CRows,CCols>::Type bottomRightCorner() const\n{\n  return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), rows() - CRows, cols() - CCols);\n}\n\n/// \\returns an expression of a bottom-right corner of \\c *this.\n///\n/// \\tparam CRows number of rows in corner as specified at compile-time\n/// \\tparam CCols number of columns in corner as specified at compile-time\n/// \\param  cRows number of rows in corner as specified at run-time\n/// \\param  cCols number of columns in corner as specified at run-time\n///\n/// This function is mainly useful for corners where the number of rows is specified at compile-time\n/// and the number of columns is specified at run-time, or vice versa. The compile-time and run-time\n/// information should not contradict. In other words, \\a cRows should equal \\a CRows unless\n/// \\a CRows is \\a Dynamic, and the same for the number of columns.\n///\n/// Example: \\include MatrixBase_template_int_int_bottomRightCorner_int_int.cpp\n/// Output: \\verbinclude MatrixBase_template_int_int_bottomRightCorner_int_int.out\n///\nEIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL\n///\n/// \\sa class Block\n///\ntemplate<int CRows, int CCols>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ntypename FixedBlockXpr<CRows,CCols>::Type bottomRightCorner(Index cRows, Index cCols)\n{\n  return typename FixedBlockXpr<CRows,CCols>::Type(derived(), rows() - cRows, cols() - cCols, cRows, cCols);\n}\n\n/// This is the const version of bottomRightCorner<int, int>(Index, Index).\ntemplate<int CRows, int CCols>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nconst typename ConstFixedBlockXpr<CRows,CCols>::Type bottomRightCorner(Index cRows, Index cCols) const\n{\n  return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), rows() - cRows, cols() - cCols, cRows, cCols);\n}\n\n\n\n/// \\returns an expression of a bottom-left corner of \\c *this  with either dynamic or fixed sizes.\n///\n/// \\param cRows the number of rows in the corner\n/// \\param cCols the number of columns in the corner\n/// \\tparam NRowsType the type of the value handling the number of rows in the block, typically Index.\n/// \\tparam NColsType the type of the value handling the number of columns in the block, typically Index.\n///\n/// Example: \\include MatrixBase_bottomLeftCorner_int_int.cpp\n/// Output: \\verbinclude MatrixBase_bottomLeftCorner_int_int.out\n///\n/// The number of rows \\a blockRows and columns \\a blockCols can also be specified at compile-time by passing Eigen::fix<N>,\n/// or Eigen::fix<N>(n) as arguments. See \\link block(Index,Index,NRowsType,NColsType) block() \\endlink for the details.\n///\nEIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL\n///\n/// \\sa block(Index,Index,NRowsType,NColsType), class Block\n///\ntemplate<typename NRowsType, typename NColsType>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n#ifndef EIGEN_PARSED_BY_DOXYGEN\ntypename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type\n#else\ntypename FixedBlockXpr<...,...>::Type\n#endif\nbottomLeftCorner(NRowsType cRows, NColsType cCols)\n{\n  return typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type\n            (derived(), rows() - internal::get_runtime_value(cRows), 0,\n                        internal::get_runtime_value(cRows), internal::get_runtime_value(cCols));\n}\n\n/// This is the const version of bottomLeftCorner(NRowsType, NColsType).\ntemplate<typename NRowsType, typename NColsType>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n#ifndef EIGEN_PARSED_BY_DOXYGEN\ntypename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type\n#else\ntypename ConstFixedBlockXpr<...,...>::Type\n#endif\nbottomLeftCorner(NRowsType cRows, NColsType cCols) const\n{\n  return typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type\n            (derived(), rows() - internal::get_runtime_value(cRows), 0,\n                        internal::get_runtime_value(cRows), internal::get_runtime_value(cCols));\n}\n\n/// \\returns an expression of a fixed-size bottom-left corner of \\c *this.\n///\n/// The template parameters CRows and CCols are the number of rows and columns in the corner.\n///\n/// Example: \\include MatrixBase_template_int_int_bottomLeftCorner.cpp\n/// Output: \\verbinclude MatrixBase_template_int_int_bottomLeftCorner.out\n///\nEIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL\n///\n/// \\sa block(Index,Index,NRowsType,NColsType), class Block\n///\ntemplate<int CRows, int CCols>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ntypename FixedBlockXpr<CRows,CCols>::Type bottomLeftCorner()\n{\n  return typename FixedBlockXpr<CRows,CCols>::Type(derived(), rows() - CRows, 0);\n}\n\n/// This is the const version of bottomLeftCorner<int, int>().\ntemplate<int CRows, int CCols>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nconst typename ConstFixedBlockXpr<CRows,CCols>::Type bottomLeftCorner() const\n{\n  return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), rows() - CRows, 0);\n}\n\n/// \\returns an expression of a bottom-left corner of \\c *this.\n///\n/// \\tparam CRows number of rows in corner as specified at compile-time\n/// \\tparam CCols number of columns in corner as specified at compile-time\n/// \\param  cRows number of rows in corner as specified at run-time\n/// \\param  cCols number of columns in corner as specified at run-time\n///\n/// This function is mainly useful for corners where the number of rows is specified at compile-time\n/// and the number of columns is specified at run-time, or vice versa. The compile-time and run-time\n/// information should not contradict. In other words, \\a cRows should equal \\a CRows unless\n/// \\a CRows is \\a Dynamic, and the same for the number of columns.\n///\n/// Example: \\include MatrixBase_template_int_int_bottomLeftCorner_int_int.cpp\n/// Output: \\verbinclude MatrixBase_template_int_int_bottomLeftCorner_int_int.out\n///\nEIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL\n///\n/// \\sa class Block\n///\ntemplate<int CRows, int CCols>\nEIGEN_STRONG_INLINE\ntypename FixedBlockXpr<CRows,CCols>::Type bottomLeftCorner(Index cRows, Index cCols)\n{\n  return typename FixedBlockXpr<CRows,CCols>::Type(derived(), rows() - cRows, 0, cRows, cCols);\n}\n\n/// This is the const version of bottomLeftCorner<int, int>(Index, Index).\ntemplate<int CRows, int CCols>\nEIGEN_STRONG_INLINE\nconst typename ConstFixedBlockXpr<CRows,CCols>::Type bottomLeftCorner(Index cRows, Index cCols) const\n{\n  return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), rows() - cRows, 0, cRows, cCols);\n}\n\n\n\n/// \\returns a block consisting of the top rows of \\c *this.\n///\n/// \\param n the number of rows in the block\n/// \\tparam NRowsType the type of the value handling the number of rows in the block, typically Index.\n///\n/// Example: \\include MatrixBase_topRows_int.cpp\n/// Output: \\verbinclude MatrixBase_topRows_int.out\n///\n/// The number of rows \\a n can also be specified at compile-time by passing Eigen::fix<N>,\n/// or Eigen::fix<N>(n) as arguments.\n/// See \\link block(Index,Index,NRowsType,NColsType) block() \\endlink for the details.\n///\nEIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)\n///\n/// \\sa block(Index,Index,NRowsType,NColsType), class Block\n///\ntemplate<typename NRowsType>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n#ifndef EIGEN_PARSED_BY_DOXYGEN\ntypename NRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type\n#else\ntypename NRowsBlockXpr<...>::Type\n#endif\ntopRows(NRowsType n)\n{\n  return typename NRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type\n            (derived(), 0, 0, internal::get_runtime_value(n), cols());\n}\n\n/// This is the const version of topRows(NRowsType).\ntemplate<typename NRowsType>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n#ifndef EIGEN_PARSED_BY_DOXYGEN\nconst typename ConstNRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type\n#else\nconst typename ConstNRowsBlockXpr<...>::Type\n#endif\ntopRows(NRowsType n) const\n{\n  return typename ConstNRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type\n            (derived(), 0, 0, internal::get_runtime_value(n), cols());\n}\n\n/// \\returns a block consisting of the top rows of \\c *this.\n///\n/// \\tparam N the number of rows in the block as specified at compile-time\n/// \\param n the number of rows in the block as specified at run-time\n///\n/// The compile-time and run-time information should not contradict. In other words,\n/// \\a n should equal \\a N unless \\a N is \\a Dynamic.\n///\n/// Example: \\include MatrixBase_template_int_topRows.cpp\n/// Output: \\verbinclude MatrixBase_template_int_topRows.out\n///\nEIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)\n///\n/// \\sa block(Index,Index,NRowsType,NColsType), class Block\n///\ntemplate<int N>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ntypename NRowsBlockXpr<N>::Type topRows(Index n = N)\n{\n  return typename NRowsBlockXpr<N>::Type(derived(), 0, 0, n, cols());\n}\n\n/// This is the const version of topRows<int>().\ntemplate<int N>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ntypename ConstNRowsBlockXpr<N>::Type topRows(Index n = N) const\n{\n  return typename ConstNRowsBlockXpr<N>::Type(derived(), 0, 0, n, cols());\n}\n\n\n\n/// \\returns a block consisting of the bottom rows of \\c *this.\n///\n/// \\param n the number of rows in the block\n/// \\tparam NRowsType the type of the value handling the number of rows in the block, typically Index.\n///\n/// Example: \\include MatrixBase_bottomRows_int.cpp\n/// Output: \\verbinclude MatrixBase_bottomRows_int.out\n///\n/// The number of rows \\a n can also be specified at compile-time by passing Eigen::fix<N>,\n/// or Eigen::fix<N>(n) as arguments.\n/// See \\link block(Index,Index,NRowsType,NColsType) block() \\endlink for the details.\n///\nEIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)\n///\n/// \\sa block(Index,Index,NRowsType,NColsType), class Block\n///\ntemplate<typename NRowsType>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n#ifndef EIGEN_PARSED_BY_DOXYGEN\ntypename NRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type\n#else\ntypename NRowsBlockXpr<...>::Type\n#endif\nbottomRows(NRowsType n)\n{\n  return typename NRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type\n            (derived(), rows() - internal::get_runtime_value(n), 0, internal::get_runtime_value(n), cols());\n}\n\n/// This is the const version of bottomRows(NRowsType).\ntemplate<typename NRowsType>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n#ifndef EIGEN_PARSED_BY_DOXYGEN\nconst typename ConstNRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type\n#else\nconst typename ConstNRowsBlockXpr<...>::Type\n#endif\nbottomRows(NRowsType n) const\n{\n  return typename ConstNRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type\n            (derived(), rows() - internal::get_runtime_value(n), 0, internal::get_runtime_value(n), cols());\n}\n\n/// \\returns a block consisting of the bottom rows of \\c *this.\n///\n/// \\tparam N the number of rows in the block as specified at compile-time\n/// \\param n the number of rows in the block as specified at run-time\n///\n/// The compile-time and run-time information should not contradict. In other words,\n/// \\a n should equal \\a N unless \\a N is \\a Dynamic.\n///\n/// Example: \\include MatrixBase_template_int_bottomRows.cpp\n/// Output: \\verbinclude MatrixBase_template_int_bottomRows.out\n///\nEIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)\n///\n/// \\sa block(Index,Index,NRowsType,NColsType), class Block\n///\ntemplate<int N>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ntypename NRowsBlockXpr<N>::Type bottomRows(Index n = N)\n{\n  return typename NRowsBlockXpr<N>::Type(derived(), rows() - n, 0, n, cols());\n}\n\n/// This is the const version of bottomRows<int>().\ntemplate<int N>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ntypename ConstNRowsBlockXpr<N>::Type bottomRows(Index n = N) const\n{\n  return typename ConstNRowsBlockXpr<N>::Type(derived(), rows() - n, 0, n, cols());\n}\n\n\n\n/// \\returns a block consisting of a range of rows of \\c *this.\n///\n/// \\param startRow the index of the first row in the block\n/// \\param n the number of rows in the block\n/// \\tparam NRowsType the type of the value handling the number of rows in the block, typically Index.\n///\n/// Example: \\include DenseBase_middleRows_int.cpp\n/// Output: \\verbinclude DenseBase_middleRows_int.out\n///\n/// The number of rows \\a n can also be specified at compile-time by passing Eigen::fix<N>,\n/// or Eigen::fix<N>(n) as arguments.\n/// See \\link block(Index,Index,NRowsType,NColsType) block() \\endlink for the details.\n///\nEIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)\n///\n/// \\sa block(Index,Index,NRowsType,NColsType), class Block\n///\ntemplate<typename NRowsType>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n#ifndef EIGEN_PARSED_BY_DOXYGEN\ntypename NRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type\n#else\ntypename NRowsBlockXpr<...>::Type\n#endif\nmiddleRows(Index startRow, NRowsType n)\n{\n  return typename NRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type\n            (derived(), startRow, 0, internal::get_runtime_value(n), cols());\n}\n\n/// This is the const version of middleRows(Index,NRowsType).\ntemplate<typename NRowsType>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n#ifndef EIGEN_PARSED_BY_DOXYGEN\nconst typename ConstNRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type\n#else\nconst typename ConstNRowsBlockXpr<...>::Type\n#endif\nmiddleRows(Index startRow, NRowsType n) const\n{\n  return typename ConstNRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type\n            (derived(), startRow, 0, internal::get_runtime_value(n), cols());\n}\n\n/// \\returns a block consisting of a range of rows of \\c *this.\n///\n/// \\tparam N the number of rows in the block as specified at compile-time\n/// \\param startRow the index of the first row in the block\n/// \\param n the number of rows in the block as specified at run-time\n///\n/// The compile-time and run-time information should not contradict. In other words,\n/// \\a n should equal \\a N unless \\a N is \\a Dynamic.\n///\n/// Example: \\include DenseBase_template_int_middleRows.cpp\n/// Output: \\verbinclude DenseBase_template_int_middleRows.out\n///\nEIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)\n///\n/// \\sa block(Index,Index,NRowsType,NColsType), class Block\n///\ntemplate<int N>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ntypename NRowsBlockXpr<N>::Type middleRows(Index startRow, Index n = N)\n{\n  return typename NRowsBlockXpr<N>::Type(derived(), startRow, 0, n, cols());\n}\n\n/// This is the const version of middleRows<int>().\ntemplate<int N>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ntypename ConstNRowsBlockXpr<N>::Type middleRows(Index startRow, Index n = N) const\n{\n  return typename ConstNRowsBlockXpr<N>::Type(derived(), startRow, 0, n, cols());\n}\n\n\n\n/// \\returns a block consisting of the left columns of \\c *this.\n///\n/// \\param n the number of columns in the block\n/// \\tparam NColsType the type of the value handling the number of columns in the block, typically Index.\n///\n/// Example: \\include MatrixBase_leftCols_int.cpp\n/// Output: \\verbinclude MatrixBase_leftCols_int.out\n///\n/// The number of columns \\a n can also be specified at compile-time by passing Eigen::fix<N>,\n/// or Eigen::fix<N>(n) as arguments.\n/// See \\link block(Index,Index,NRowsType,NColsType) block() \\endlink for the details.\n///\nEIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)\n///\n/// \\sa block(Index,Index,NRowsType,NColsType), class Block\n///\ntemplate<typename NColsType>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n#ifndef EIGEN_PARSED_BY_DOXYGEN\ntypename NColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type\n#else\ntypename NColsBlockXpr<...>::Type\n#endif\nleftCols(NColsType n)\n{\n  return typename NColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type\n            (derived(), 0, 0, rows(), internal::get_runtime_value(n));\n}\n\n/// This is the const version of leftCols(NColsType).\ntemplate<typename NColsType>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n#ifndef EIGEN_PARSED_BY_DOXYGEN\nconst typename ConstNColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type\n#else\nconst typename ConstNColsBlockXpr<...>::Type\n#endif\nleftCols(NColsType n) const\n{\n  return typename ConstNColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type\n            (derived(), 0, 0, rows(), internal::get_runtime_value(n));\n}\n\n/// \\returns a block consisting of the left columns of \\c *this.\n///\n/// \\tparam N the number of columns in the block as specified at compile-time\n/// \\param n the number of columns in the block as specified at run-time\n///\n/// The compile-time and run-time information should not contradict. In other words,\n/// \\a n should equal \\a N unless \\a N is \\a Dynamic.\n///\n/// Example: \\include MatrixBase_template_int_leftCols.cpp\n/// Output: \\verbinclude MatrixBase_template_int_leftCols.out\n///\nEIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)\n///\n/// \\sa block(Index,Index,NRowsType,NColsType), class Block\n///\ntemplate<int N>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ntypename NColsBlockXpr<N>::Type leftCols(Index n = N)\n{\n  return typename NColsBlockXpr<N>::Type(derived(), 0, 0, rows(), n);\n}\n\n/// This is the const version of leftCols<int>().\ntemplate<int N>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ntypename ConstNColsBlockXpr<N>::Type leftCols(Index n = N) const\n{\n  return typename ConstNColsBlockXpr<N>::Type(derived(), 0, 0, rows(), n);\n}\n\n\n\n/// \\returns a block consisting of the right columns of \\c *this.\n///\n/// \\param n the number of columns in the block\n/// \\tparam NColsType the type of the value handling the number of columns in the block, typically Index.\n///\n/// Example: \\include MatrixBase_rightCols_int.cpp\n/// Output: \\verbinclude MatrixBase_rightCols_int.out\n///\n/// The number of columns \\a n can also be specified at compile-time by passing Eigen::fix<N>,\n/// or Eigen::fix<N>(n) as arguments.\n/// See \\link block(Index,Index,NRowsType,NColsType) block() \\endlink for the details.\n///\nEIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)\n///\n/// \\sa block(Index,Index,NRowsType,NColsType), class Block\n///\ntemplate<typename NColsType>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n#ifndef EIGEN_PARSED_BY_DOXYGEN\ntypename NColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type\n#else\ntypename NColsBlockXpr<...>::Type\n#endif\nrightCols(NColsType n)\n{\n  return typename NColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type\n            (derived(), 0, cols() - internal::get_runtime_value(n), rows(), internal::get_runtime_value(n));\n}\n\n/// This is the const version of rightCols(NColsType).\ntemplate<typename NColsType>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n#ifndef EIGEN_PARSED_BY_DOXYGEN\nconst typename ConstNColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type\n#else\nconst typename ConstNColsBlockXpr<...>::Type\n#endif\nrightCols(NColsType n) const\n{\n  return typename ConstNColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type\n            (derived(), 0, cols() - internal::get_runtime_value(n), rows(), internal::get_runtime_value(n));\n}\n\n/// \\returns a block consisting of the right columns of \\c *this.\n///\n/// \\tparam N the number of columns in the block as specified at compile-time\n/// \\param n the number of columns in the block as specified at run-time\n///\n/// The compile-time and run-time information should not contradict. In other words,\n/// \\a n should equal \\a N unless \\a N is \\a Dynamic.\n///\n/// Example: \\include MatrixBase_template_int_rightCols.cpp\n/// Output: \\verbinclude MatrixBase_template_int_rightCols.out\n///\nEIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)\n///\n/// \\sa block(Index,Index,NRowsType,NColsType), class Block\n///\ntemplate<int N>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ntypename NColsBlockXpr<N>::Type rightCols(Index n = N)\n{\n  return typename NColsBlockXpr<N>::Type(derived(), 0, cols() - n, rows(), n);\n}\n\n/// This is the const version of rightCols<int>().\ntemplate<int N>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ntypename ConstNColsBlockXpr<N>::Type rightCols(Index n = N) const\n{\n  return typename ConstNColsBlockXpr<N>::Type(derived(), 0, cols() - n, rows(), n);\n}\n\n\n\n/// \\returns a block consisting of a range of columns of \\c *this.\n///\n/// \\param startCol the index of the first column in the block\n/// \\param numCols the number of columns in the block\n/// \\tparam NColsType the type of the value handling the number of columns in the block, typically Index.\n///\n/// Example: \\include DenseBase_middleCols_int.cpp\n/// Output: \\verbinclude DenseBase_middleCols_int.out\n///\n/// The number of columns \\a n can also be specified at compile-time by passing Eigen::fix<N>,\n/// or Eigen::fix<N>(n) as arguments.\n/// See \\link block(Index,Index,NRowsType,NColsType) block() \\endlink for the details.\n///\nEIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)\n///\n/// \\sa block(Index,Index,NRowsType,NColsType), class Block\n///\ntemplate<typename NColsType>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n#ifndef EIGEN_PARSED_BY_DOXYGEN\ntypename NColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type\n#else\ntypename NColsBlockXpr<...>::Type\n#endif\nmiddleCols(Index startCol, NColsType numCols)\n{\n  return typename NColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type\n            (derived(), 0, startCol, rows(), internal::get_runtime_value(numCols));\n}\n\n/// This is the const version of middleCols(Index,NColsType).\ntemplate<typename NColsType>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n#ifndef EIGEN_PARSED_BY_DOXYGEN\nconst typename ConstNColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type\n#else\nconst typename ConstNColsBlockXpr<...>::Type\n#endif\nmiddleCols(Index startCol, NColsType numCols) const\n{\n  return typename ConstNColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type\n            (derived(), 0, startCol, rows(), internal::get_runtime_value(numCols));\n}\n\n/// \\returns a block consisting of a range of columns of \\c *this.\n///\n/// \\tparam N the number of columns in the block as specified at compile-time\n/// \\param startCol the index of the first column in the block\n/// \\param n the number of columns in the block as specified at run-time\n///\n/// The compile-time and run-time information should not contradict. In other words,\n/// \\a n should equal \\a N unless \\a N is \\a Dynamic.\n///\n/// Example: \\include DenseBase_template_int_middleCols.cpp\n/// Output: \\verbinclude DenseBase_template_int_middleCols.out\n///\nEIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)\n///\n/// \\sa block(Index,Index,NRowsType,NColsType), class Block\n///\ntemplate<int N>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ntypename NColsBlockXpr<N>::Type middleCols(Index startCol, Index n = N)\n{\n  return typename NColsBlockXpr<N>::Type(derived(), 0, startCol, rows(), n);\n}\n\n/// This is the const version of middleCols<int>().\ntemplate<int N>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ntypename ConstNColsBlockXpr<N>::Type middleCols(Index startCol, Index n = N) const\n{\n  return typename ConstNColsBlockXpr<N>::Type(derived(), 0, startCol, rows(), n);\n}\n\n\n\n/// \\returns a fixed-size expression of a block of \\c *this.\n///\n/// The template parameters \\a NRows and \\a NCols are the number of\n/// rows and columns in the block.\n///\n/// \\param startRow the first row in the block\n/// \\param startCol the first column in the block\n///\n/// Example: \\include MatrixBase_block_int_int.cpp\n/// Output: \\verbinclude MatrixBase_block_int_int.out\n///\n/// \\note The usage of of this overload is discouraged from %Eigen 3.4, better used the generic\n/// block(Index,Index,NRowsType,NColsType), here is the one-to-one equivalence:\n/// \\code\n/// mat.template block<NRows,NCols>(i,j)  <-->  mat.block(i,j,fix<NRows>,fix<NCols>)\n/// \\endcode\n///\n/// \\note since block is a templated member, the keyword template has to be used\n/// if the matrix type is also a template parameter: \\code m.template block<3,3>(1,1); \\endcode\n///\nEIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL\n///\n/// \\sa block(Index,Index,NRowsType,NColsType), class Block\n///\ntemplate<int NRows, int NCols>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ntypename FixedBlockXpr<NRows,NCols>::Type block(Index startRow, Index startCol)\n{\n  return typename FixedBlockXpr<NRows,NCols>::Type(derived(), startRow, startCol);\n}\n\n/// This is the const version of block<>(Index, Index). */\ntemplate<int NRows, int NCols>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nconst typename ConstFixedBlockXpr<NRows,NCols>::Type block(Index startRow, Index startCol) const\n{\n  return typename ConstFixedBlockXpr<NRows,NCols>::Type(derived(), startRow, startCol);\n}\n\n/// \\returns an expression of a block of \\c *this.\n///\n/// \\tparam NRows number of rows in block as specified at compile-time\n/// \\tparam NCols number of columns in block as specified at compile-time\n/// \\param  startRow  the first row in the block\n/// \\param  startCol  the first column in the block\n/// \\param  blockRows number of rows in block as specified at run-time\n/// \\param  blockCols number of columns in block as specified at run-time\n///\n/// This function is mainly useful for blocks where the number of rows is specified at compile-time\n/// and the number of columns is specified at run-time, or vice versa. The compile-time and run-time\n/// information should not contradict. In other words, \\a blockRows should equal \\a NRows unless\n/// \\a NRows is \\a Dynamic, and the same for the number of columns.\n///\n/// Example: \\include MatrixBase_template_int_int_block_int_int_int_int.cpp\n/// Output: \\verbinclude MatrixBase_template_int_int_block_int_int_int_int.out\n///\n/// \\note The usage of of this overload is discouraged from %Eigen 3.4, better used the generic\n/// block(Index,Index,NRowsType,NColsType), here is the one-to-one complete equivalence:\n/// \\code\n/// mat.template block<NRows,NCols>(i,j,rows,cols)     <-->  mat.block(i,j,fix<NRows>(rows),fix<NCols>(cols))\n/// \\endcode\n/// If we known that, e.g., NRows==Dynamic and NCols!=Dynamic, then the equivalence becomes:\n/// \\code\n/// mat.template block<Dynamic,NCols>(i,j,rows,NCols)  <-->  mat.block(i,j,rows,fix<NCols>)\n/// \\endcode\n///\nEIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL\n///\n/// \\sa block(Index,Index,NRowsType,NColsType), class Block\n///\ntemplate<int NRows, int NCols>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ntypename FixedBlockXpr<NRows,NCols>::Type block(Index startRow, Index startCol,\n                                                  Index blockRows, Index blockCols)\n{\n  return typename FixedBlockXpr<NRows,NCols>::Type(derived(), startRow, startCol, blockRows, blockCols);\n}\n\n/// This is the const version of block<>(Index, Index, Index, Index).\ntemplate<int NRows, int NCols>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nconst typename ConstFixedBlockXpr<NRows,NCols>::Type block(Index startRow, Index startCol,\n                                                              Index blockRows, Index blockCols) const\n{\n  return typename ConstFixedBlockXpr<NRows,NCols>::Type(derived(), startRow, startCol, blockRows, blockCols);\n}\n\n/// \\returns an expression of the \\a i-th column of \\c *this. Note that the numbering starts at 0.\n///\n/// Example: \\include MatrixBase_col.cpp\n/// Output: \\verbinclude MatrixBase_col.out\n///\nEIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)\n/**\n  * \\sa row(), class Block */\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nColXpr col(Index i)\n{\n  return ColXpr(derived(), i);\n}\n\n/// This is the const version of col().\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nConstColXpr col(Index i) const\n{\n  return ConstColXpr(derived(), i);\n}\n\n/// \\returns an expression of the \\a i-th row of \\c *this. Note that the numbering starts at 0.\n///\n/// Example: \\include MatrixBase_row.cpp\n/// Output: \\verbinclude MatrixBase_row.out\n///\nEIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)\n/**\n  * \\sa col(), class Block */\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nRowXpr row(Index i)\n{\n  return RowXpr(derived(), i);\n}\n\n/// This is the const version of row(). */\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nConstRowXpr row(Index i) const\n{\n  return ConstRowXpr(derived(), i);\n}\n\n/// \\returns an expression of a segment (i.e. a vector block) in \\c *this with either dynamic or fixed sizes.\n///\n/// \\only_for_vectors\n///\n/// \\param start the first coefficient in the segment\n/// \\param n the number of coefficients in the segment\n/// \\tparam NType the type of the value handling the number of coefficients in the segment, typically Index.\n///\n/// Example: \\include MatrixBase_segment_int_int.cpp\n/// Output: \\verbinclude MatrixBase_segment_int_int.out\n///\n/// The number of coefficients \\a n can also be specified at compile-time by passing Eigen::fix<N>,\n/// or Eigen::fix<N>(n) as arguments.\n/// See \\link block(Index,Index,NRowsType,NColsType) block() \\endlink for the details.\n///\n/// \\note Even in the case that the returned expression has dynamic size, in the case\n/// when it is applied to a fixed-size vector, it inherits a fixed maximal size,\n/// which means that evaluating it does not cause a dynamic memory allocation.\n///\n/// \\sa block(Index,Index,NRowsType,NColsType), fix<N>, fix<N>(int), class Block\n///\ntemplate<typename NType>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n#ifndef EIGEN_PARSED_BY_DOXYGEN\ntypename FixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type\n#else\ntypename FixedSegmentReturnType<...>::Type\n#endif\nsegment(Index start, NType n)\n{\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)\n  return typename FixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type\n            (derived(), start, internal::get_runtime_value(n));\n}\n\n\n/// This is the const version of segment(Index,NType).\ntemplate<typename NType>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n#ifndef EIGEN_PARSED_BY_DOXYGEN\nconst typename ConstFixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type\n#else\nconst typename ConstFixedSegmentReturnType<...>::Type\n#endif\nsegment(Index start, NType n) const\n{\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)\n  return typename ConstFixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type\n            (derived(), start, internal::get_runtime_value(n));\n}\n\n/// \\returns an expression of the first coefficients of \\c *this with either dynamic or fixed sizes.\n///\n/// \\only_for_vectors\n///\n/// \\param n the number of coefficients in the segment\n/// \\tparam NType the type of the value handling the number of coefficients in the segment, typically Index.\n///\n/// Example: \\include MatrixBase_start_int.cpp\n/// Output: \\verbinclude MatrixBase_start_int.out\n///\n/// The number of coefficients \\a n can also be specified at compile-time by passing Eigen::fix<N>,\n/// or Eigen::fix<N>(n) as arguments.\n/// See \\link block(Index,Index,NRowsType,NColsType) block() \\endlink for the details.\n///\n/// \\note Even in the case that the returned expression has dynamic size, in the case\n/// when it is applied to a fixed-size vector, it inherits a fixed maximal size,\n/// which means that evaluating it does not cause a dynamic memory allocation.\n///\n/// \\sa class Block, block(Index,Index)\n///\ntemplate<typename NType>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n#ifndef EIGEN_PARSED_BY_DOXYGEN\ntypename FixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type\n#else\ntypename FixedSegmentReturnType<...>::Type\n#endif\nhead(NType n)\n{\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)\n  return typename FixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type\n              (derived(), 0, internal::get_runtime_value(n));\n}\n\n/// This is the const version of head(NType).\ntemplate<typename NType>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n#ifndef EIGEN_PARSED_BY_DOXYGEN\nconst typename ConstFixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type\n#else\nconst typename ConstFixedSegmentReturnType<...>::Type\n#endif\nhead(NType n) const\n{\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)\n  return typename ConstFixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type\n            (derived(), 0, internal::get_runtime_value(n));\n}\n\n/// \\returns an expression of a last coefficients of \\c *this with either dynamic or fixed sizes.\n///\n/// \\only_for_vectors\n///\n/// \\param n the number of coefficients in the segment\n/// \\tparam NType the type of the value handling the number of coefficients in the segment, typically Index.\n///\n/// Example: \\include MatrixBase_end_int.cpp\n/// Output: \\verbinclude MatrixBase_end_int.out\n///\n/// The number of coefficients \\a n can also be specified at compile-time by passing Eigen::fix<N>,\n/// or Eigen::fix<N>(n) as arguments.\n/// See \\link block(Index,Index,NRowsType,NColsType) block() \\endlink for the details.\n///\n/// \\note Even in the case that the returned expression has dynamic size, in the case\n/// when it is applied to a fixed-size vector, it inherits a fixed maximal size,\n/// which means that evaluating it does not cause a dynamic memory allocation.\n///\n/// \\sa class Block, block(Index,Index)\n///\ntemplate<typename NType>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n#ifndef EIGEN_PARSED_BY_DOXYGEN\ntypename FixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type\n#else\ntypename FixedSegmentReturnType<...>::Type\n#endif\ntail(NType n)\n{\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)\n  return typename FixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type\n            (derived(), this->size() - internal::get_runtime_value(n), internal::get_runtime_value(n));\n}\n\n/// This is the const version of tail(Index).\ntemplate<typename NType>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n#ifndef EIGEN_PARSED_BY_DOXYGEN\nconst typename ConstFixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type\n#else\nconst typename ConstFixedSegmentReturnType<...>::Type\n#endif\ntail(NType n) const\n{\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)\n  return typename ConstFixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type\n            (derived(), this->size() - internal::get_runtime_value(n), internal::get_runtime_value(n));\n}\n\n/// \\returns a fixed-size expression of a segment (i.e. a vector block) in \\c *this\n///\n/// \\only_for_vectors\n///\n/// \\tparam N the number of coefficients in the segment as specified at compile-time\n/// \\param start the index of the first element in the segment\n/// \\param n the number of coefficients in the segment as specified at compile-time\n///\n/// The compile-time and run-time information should not contradict. In other words,\n/// \\a n should equal \\a N unless \\a N is \\a Dynamic.\n///\n/// Example: \\include MatrixBase_template_int_segment.cpp\n/// Output: \\verbinclude MatrixBase_template_int_segment.out\n///\n/// \\sa segment(Index,NType), class Block\n///\ntemplate<int N>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ntypename FixedSegmentReturnType<N>::Type segment(Index start, Index n = N)\n{\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)\n  return typename FixedSegmentReturnType<N>::Type(derived(), start, n);\n}\n\n/// This is the const version of segment<int>(Index).\ntemplate<int N>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ntypename ConstFixedSegmentReturnType<N>::Type segment(Index start, Index n = N) const\n{\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)\n  return typename ConstFixedSegmentReturnType<N>::Type(derived(), start, n);\n}\n\n/// \\returns a fixed-size expression of the first coefficients of \\c *this.\n///\n/// \\only_for_vectors\n///\n/// \\tparam N the number of coefficients in the segment as specified at compile-time\n/// \\param  n the number of coefficients in the segment as specified at run-time\n///\n/// The compile-time and run-time information should not contradict. In other words,\n/// \\a n should equal \\a N unless \\a N is \\a Dynamic.\n///\n/// Example: \\include MatrixBase_template_int_start.cpp\n/// Output: \\verbinclude MatrixBase_template_int_start.out\n///\n/// \\sa head(NType), class Block\n///\ntemplate<int N>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ntypename FixedSegmentReturnType<N>::Type head(Index n = N)\n{\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)\n  return typename FixedSegmentReturnType<N>::Type(derived(), 0, n);\n}\n\n/// This is the const version of head<int>().\ntemplate<int N>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ntypename ConstFixedSegmentReturnType<N>::Type head(Index n = N) const\n{\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)\n  return typename ConstFixedSegmentReturnType<N>::Type(derived(), 0, n);\n}\n\n/// \\returns a fixed-size expression of the last coefficients of \\c *this.\n///\n/// \\only_for_vectors\n///\n/// \\tparam N the number of coefficients in the segment as specified at compile-time\n/// \\param  n the number of coefficients in the segment as specified at run-time\n///\n/// The compile-time and run-time information should not contradict. In other words,\n/// \\a n should equal \\a N unless \\a N is \\a Dynamic.\n///\n/// Example: \\include MatrixBase_template_int_end.cpp\n/// Output: \\verbinclude MatrixBase_template_int_end.out\n///\n/// \\sa tail(NType), class Block\n///\ntemplate<int N>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ntypename FixedSegmentReturnType<N>::Type tail(Index n = N)\n{\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)\n  return typename FixedSegmentReturnType<N>::Type(derived(), size() - n);\n}\n\n/// This is the const version of tail<int>.\ntemplate<int N>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ntypename ConstFixedSegmentReturnType<N>::Type tail(Index n = N) const\n{\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)\n  return typename ConstFixedSegmentReturnType<N>::Type(derived(), size() - n);\n}\n\n/// \\returns the \\a outer -th column (resp. row) of the matrix \\c *this if \\c *this\n/// is col-major (resp. row-major).\n///\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nInnerVectorReturnType innerVector(Index outer)\n{ return InnerVectorReturnType(derived(), outer); }\n\n/// \\returns the \\a outer -th column (resp. row) of the matrix \\c *this if \\c *this\n/// is col-major (resp. row-major). Read-only.\n///\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nconst ConstInnerVectorReturnType innerVector(Index outer) const\n{ return ConstInnerVectorReturnType(derived(), outer); }\n\n/// \\returns the \\a outer -th column (resp. row) of the matrix \\c *this if \\c *this\n/// is col-major (resp. row-major).\n///\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nInnerVectorsReturnType\ninnerVectors(Index outerStart, Index outerSize)\n{\n  return Block<Derived,Dynamic,Dynamic,true>(derived(),\n                                             IsRowMajor ? outerStart : 0, IsRowMajor ? 0 : outerStart,\n                                             IsRowMajor ? outerSize : rows(), IsRowMajor ? cols() : outerSize);\n\n}\n\n/// \\returns the \\a outer -th column (resp. row) of the matrix \\c *this if \\c *this\n/// is col-major (resp. row-major). Read-only.\n///\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nconst ConstInnerVectorsReturnType\ninnerVectors(Index outerStart, Index outerSize) const\n{\n  return Block<const Derived,Dynamic,Dynamic,true>(derived(),\n                                                  IsRowMajor ? outerStart : 0, IsRowMajor ? 0 : outerStart,\n                                                  IsRowMajor ? outerSize : rows(), IsRowMajor ? cols() : outerSize);\n\n}\n\n/** \\returns the i-th subvector (column or vector) according to the \\c Direction\n  * \\sa subVectors()\n  */\ntemplate<DirectionType Direction>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ntypename internal::conditional<Direction==Vertical,ColXpr,RowXpr>::type\nsubVector(Index i)\n{\n  return typename internal::conditional<Direction==Vertical,ColXpr,RowXpr>::type(derived(),i);\n}\n\n/** This is the const version of subVector(Index) */\ntemplate<DirectionType Direction>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ntypename internal::conditional<Direction==Vertical,ConstColXpr,ConstRowXpr>::type\nsubVector(Index i) const\n{\n  return typename internal::conditional<Direction==Vertical,ConstColXpr,ConstRowXpr>::type(derived(),i);\n}\n\n/** \\returns the number of subvectors (rows or columns) in the direction \\c Direction\n  * \\sa subVector(Index)\n  */\ntemplate<DirectionType Direction>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nIndex subVectors() const\n{ return (Direction==Vertical)?cols():rows(); }\n\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/plugins/CommonCwiseBinaryOps.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2016 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n// This file is a base class plugin containing common coefficient wise functions.\n\n/** \\returns an expression of the difference of \\c *this and \\a other\n  *\n  * \\note If you want to substract a given scalar from all coefficients, see Cwise::operator-().\n  *\n  * \\sa class CwiseBinaryOp, operator-=()\n  */\nEIGEN_MAKE_CWISE_BINARY_OP(operator-,difference)\n\n/** \\returns an expression of the sum of \\c *this and \\a other\n  *\n  * \\note If you want to add a given scalar to all coefficients, see Cwise::operator+().\n  *\n  * \\sa class CwiseBinaryOp, operator+=()\n  */\nEIGEN_MAKE_CWISE_BINARY_OP(operator+,sum)\n\n/** \\returns an expression of a custom coefficient-wise operator \\a func of *this and \\a other\n  *\n  * The template parameter \\a CustomBinaryOp is the type of the functor\n  * of the custom operator (see class CwiseBinaryOp for an example)\n  *\n  * Here is an example illustrating the use of custom functors:\n  * \\include class_CwiseBinaryOp.cpp\n  * Output: \\verbinclude class_CwiseBinaryOp.out\n  *\n  * \\sa class CwiseBinaryOp, operator+(), operator-(), cwiseProduct()\n  */\ntemplate<typename CustomBinaryOp, typename OtherDerived>\nEIGEN_DEVICE_FUNC\nEIGEN_STRONG_INLINE const CwiseBinaryOp<CustomBinaryOp, const Derived, const OtherDerived>\nbinaryExpr(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other, const CustomBinaryOp& func = CustomBinaryOp()) const\n{\n  return CwiseBinaryOp<CustomBinaryOp, const Derived, const OtherDerived>(derived(), other.derived(), func);\n}\n\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\nEIGEN_MAKE_SCALAR_BINARY_OP(operator*,product)\n#else\n/** \\returns an expression of \\c *this scaled by the scalar factor \\a scalar\n  *\n  * \\tparam T is the scalar type of \\a scalar. It must be compatible with the scalar type of the given expression.\n  */\ntemplate<typename T>\nconst CwiseBinaryOp<internal::scalar_product_op<Scalar,T>,Derived,Constant<T> > operator*(const T& scalar) const;\n/** \\returns an expression of \\a expr scaled by the scalar factor \\a scalar\n  *\n  * \\tparam T is the scalar type of \\a scalar. It must be compatible with the scalar type of the given expression.\n  */\ntemplate<typename T> friend\nconst CwiseBinaryOp<internal::scalar_product_op<T,Scalar>,Constant<T>,Derived> operator*(const T& scalar, const StorageBaseType& expr);\n#endif\n\n\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\nEIGEN_MAKE_SCALAR_BINARY_OP_ONTHERIGHT(operator/,quotient)\n#else\n/** \\returns an expression of \\c *this divided by the scalar value \\a scalar\n  *\n  * \\tparam T is the scalar type of \\a scalar. It must be compatible with the scalar type of the given expression.\n  */\ntemplate<typename T>\nconst CwiseBinaryOp<internal::scalar_quotient_op<Scalar,T>,Derived,Constant<T> > operator/(const T& scalar) const;\n#endif\n\n/** \\returns an expression of the coefficient-wise boolean \\b and operator of \\c *this and \\a other\n  *\n  * \\warning this operator is for expression of bool only.\n  *\n  * Example: \\include Cwise_boolean_and.cpp\n  * Output: \\verbinclude Cwise_boolean_and.out\n  *\n  * \\sa operator||(), select()\n  */\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC\ninline const CwiseBinaryOp<internal::scalar_boolean_and_op, const Derived, const OtherDerived>\noperator&&(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const\n{\n  EIGEN_STATIC_ASSERT((internal::is_same<bool,Scalar>::value && internal::is_same<bool,typename OtherDerived::Scalar>::value),\n                      THIS_METHOD_IS_ONLY_FOR_EXPRESSIONS_OF_BOOL);\n  return CwiseBinaryOp<internal::scalar_boolean_and_op, const Derived, const OtherDerived>(derived(),other.derived());\n}\n\n/** \\returns an expression of the coefficient-wise boolean \\b or operator of \\c *this and \\a other\n  *\n  * \\warning this operator is for expression of bool only.\n  *\n  * Example: \\include Cwise_boolean_or.cpp\n  * Output: \\verbinclude Cwise_boolean_or.out\n  *\n  * \\sa operator&&(), select()\n  */\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC\ninline const CwiseBinaryOp<internal::scalar_boolean_or_op, const Derived, const OtherDerived>\noperator||(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const\n{\n  EIGEN_STATIC_ASSERT((internal::is_same<bool,Scalar>::value && internal::is_same<bool,typename OtherDerived::Scalar>::value),\n                      THIS_METHOD_IS_ONLY_FOR_EXPRESSIONS_OF_BOOL);\n  return CwiseBinaryOp<internal::scalar_boolean_or_op, const Derived, const OtherDerived>(derived(),other.derived());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/plugins/CommonCwiseUnaryOps.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n// This file is a base class plugin containing common coefficient wise functions.\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\n\n/** \\internal the return type of conjugate() */\ntypedef typename internal::conditional<NumTraits<Scalar>::IsComplex,\n                    const CwiseUnaryOp<internal::scalar_conjugate_op<Scalar>, const Derived>,\n                    const Derived&\n                  >::type ConjugateReturnType;\n/** \\internal the return type of real() const */\ntypedef typename internal::conditional<NumTraits<Scalar>::IsComplex,\n                    const CwiseUnaryOp<internal::scalar_real_op<Scalar>, const Derived>,\n                    const Derived&\n                  >::type RealReturnType;\n/** \\internal the return type of real() */\ntypedef typename internal::conditional<NumTraits<Scalar>::IsComplex,\n                    CwiseUnaryView<internal::scalar_real_ref_op<Scalar>, Derived>,\n                    Derived&\n                  >::type NonConstRealReturnType;\n/** \\internal the return type of imag() const */\ntypedef CwiseUnaryOp<internal::scalar_imag_op<Scalar>, const Derived> ImagReturnType;\n/** \\internal the return type of imag() */\ntypedef CwiseUnaryView<internal::scalar_imag_ref_op<Scalar>, Derived> NonConstImagReturnType;\n\ntypedef CwiseUnaryOp<internal::scalar_opposite_op<Scalar>, const Derived> NegativeReturnType;\n\n#endif // not EIGEN_PARSED_BY_DOXYGEN\n\n/// \\returns an expression of the opposite of \\c *this\n///\nEIGEN_DOC_UNARY_ADDONS(operator-,opposite)\n///\nEIGEN_DEVICE_FUNC\ninline const NegativeReturnType\noperator-() const { return NegativeReturnType(derived()); }\n\n\ntemplate<class NewType> struct CastXpr { typedef typename internal::cast_return_type<Derived,const CwiseUnaryOp<internal::scalar_cast_op<Scalar, NewType>, const Derived> >::type Type; };\n\n/// \\returns an expression of \\c *this with the \\a Scalar type casted to\n/// \\a NewScalar.\n///\n/// The template parameter \\a NewScalar is the type we are casting the scalars to.\n///\nEIGEN_DOC_UNARY_ADDONS(cast,conversion function)\n///\n/// \\sa class CwiseUnaryOp\n///\ntemplate<typename NewType>\nEIGEN_DEVICE_FUNC\ntypename CastXpr<NewType>::Type\ncast() const\n{\n  return typename CastXpr<NewType>::Type(derived());\n}\n\ntemplate<int N> struct ShiftRightXpr {\n  typedef CwiseUnaryOp<internal::scalar_shift_right_op<Scalar, N>, const Derived> Type;\n};\n\n/// \\returns an expression of \\c *this with the \\a Scalar type arithmetically\n/// shifted right by \\a N bit positions.\n///\n/// The template parameter \\a N specifies the number of bit positions to shift.\n///\nEIGEN_DOC_UNARY_ADDONS(cast,conversion function)\n///\n/// \\sa class CwiseUnaryOp\n///\ntemplate<int N>\nEIGEN_DEVICE_FUNC\ntypename ShiftRightXpr<N>::Type\nshift_right() const\n{\n  return typename ShiftRightXpr<N>::Type(derived());\n}\n\n\ntemplate<int N> struct ShiftLeftXpr {\n  typedef CwiseUnaryOp<internal::scalar_shift_left_op<Scalar, N>, const Derived> Type;\n};\n\n/// \\returns an expression of \\c *this with the \\a Scalar type logically\n/// shifted left by \\a N bit positions.\n///\n/// The template parameter \\a N specifies the number of bit positions to shift.\n///\nEIGEN_DOC_UNARY_ADDONS(cast,conversion function)\n///\n/// \\sa class CwiseUnaryOp\n///\ntemplate<int N>\nEIGEN_DEVICE_FUNC\ntypename ShiftLeftXpr<N>::Type\nshift_left() const\n{\n  return typename ShiftLeftXpr<N>::Type(derived());\n}\n\n/// \\returns an expression of the complex conjugate of \\c *this.\n///\nEIGEN_DOC_UNARY_ADDONS(conjugate,complex conjugate)\n///\n/// \\sa <a href=\"group__CoeffwiseMathFunctions.html#cwisetable_conj\">Math functions</a>, MatrixBase::adjoint()\nEIGEN_DEVICE_FUNC\ninline ConjugateReturnType\nconjugate() const\n{\n  return ConjugateReturnType(derived());\n}\n\n/// \\returns an expression of the complex conjugate of \\c *this if Cond==true, returns derived() otherwise.\n///\nEIGEN_DOC_UNARY_ADDONS(conjugate,complex conjugate)\n///\n/// \\sa conjugate()\ntemplate<bool Cond>\nEIGEN_DEVICE_FUNC\ninline typename internal::conditional<Cond,ConjugateReturnType,const Derived&>::type\nconjugateIf() const\n{\n  typedef typename internal::conditional<Cond,ConjugateReturnType,const Derived&>::type ReturnType;\n  return ReturnType(derived());\n}\n\n/// \\returns a read-only expression of the real part of \\c *this.\n///\nEIGEN_DOC_UNARY_ADDONS(real,real part function)\n///\n/// \\sa imag()\nEIGEN_DEVICE_FUNC\ninline RealReturnType\nreal() const { return RealReturnType(derived()); }\n\n/// \\returns an read-only expression of the imaginary part of \\c *this.\n///\nEIGEN_DOC_UNARY_ADDONS(imag,imaginary part function)\n///\n/// \\sa real()\nEIGEN_DEVICE_FUNC\ninline const ImagReturnType\nimag() const { return ImagReturnType(derived()); }\n\n/// \\brief Apply a unary operator coefficient-wise\n/// \\param[in]  func  Functor implementing the unary operator\n/// \\tparam  CustomUnaryOp Type of \\a func\n/// \\returns An expression of a custom coefficient-wise unary operator \\a func of *this\n///\n/// The function \\c ptr_fun() from the C++ standard library can be used to make functors out of normal functions.\n///\n/// Example:\n/// \\include class_CwiseUnaryOp_ptrfun.cpp\n/// Output: \\verbinclude class_CwiseUnaryOp_ptrfun.out\n///\n/// Genuine functors allow for more possibilities, for instance it may contain a state.\n///\n/// Example:\n/// \\include class_CwiseUnaryOp.cpp\n/// Output: \\verbinclude class_CwiseUnaryOp.out\n///\nEIGEN_DOC_UNARY_ADDONS(unaryExpr,unary function)\n///\n/// \\sa unaryViewExpr, binaryExpr, class CwiseUnaryOp\n///\ntemplate<typename CustomUnaryOp>\nEIGEN_DEVICE_FUNC\ninline const CwiseUnaryOp<CustomUnaryOp, const Derived>\nunaryExpr(const CustomUnaryOp& func = CustomUnaryOp()) const\n{\n  return CwiseUnaryOp<CustomUnaryOp, const Derived>(derived(), func);\n}\n\n/// \\returns an expression of a custom coefficient-wise unary operator \\a func of *this\n///\n/// The template parameter \\a CustomUnaryOp is the type of the functor\n/// of the custom unary operator.\n///\n/// Example:\n/// \\include class_CwiseUnaryOp.cpp\n/// Output: \\verbinclude class_CwiseUnaryOp.out\n///\nEIGEN_DOC_UNARY_ADDONS(unaryViewExpr,unary function)\n///\n/// \\sa unaryExpr, binaryExpr class CwiseUnaryOp\n///\ntemplate<typename CustomViewOp>\nEIGEN_DEVICE_FUNC\ninline const CwiseUnaryView<CustomViewOp, const Derived>\nunaryViewExpr(const CustomViewOp& func = CustomViewOp()) const\n{\n  return CwiseUnaryView<CustomViewOp, const Derived>(derived(), func);\n}\n\n/// \\returns a non const expression of the real part of \\c *this.\n///\nEIGEN_DOC_UNARY_ADDONS(real,real part function)\n///\n/// \\sa imag()\nEIGEN_DEVICE_FUNC\ninline NonConstRealReturnType\nreal() { return NonConstRealReturnType(derived()); }\n\n/// \\returns a non const expression of the imaginary part of \\c *this.\n///\nEIGEN_DOC_UNARY_ADDONS(imag,imaginary part function)\n///\n/// \\sa real()\nEIGEN_DEVICE_FUNC\ninline NonConstImagReturnType\nimag() { return NonConstImagReturnType(derived()); }\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/plugins/IndexedViewMethods.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2017 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#if !defined(EIGEN_PARSED_BY_DOXYGEN)\n\n// This file is automatically included twice to generate const and non-const versions\n\n#ifndef EIGEN_INDEXED_VIEW_METHOD_2ND_PASS\n#define EIGEN_INDEXED_VIEW_METHOD_CONST const\n#define EIGEN_INDEXED_VIEW_METHOD_TYPE  ConstIndexedViewType\n#else\n#define EIGEN_INDEXED_VIEW_METHOD_CONST\n#define EIGEN_INDEXED_VIEW_METHOD_TYPE IndexedViewType\n#endif\n\n#ifndef EIGEN_INDEXED_VIEW_METHOD_2ND_PASS\nprotected:\n\n// define some aliases to ease readability\n\ntemplate<typename Indices>\nstruct IvcRowType : public internal::IndexedViewCompatibleType<Indices,RowsAtCompileTime> {};\n\ntemplate<typename Indices>\nstruct IvcColType : public internal::IndexedViewCompatibleType<Indices,ColsAtCompileTime> {};\n\ntemplate<typename Indices>\nstruct IvcType : public internal::IndexedViewCompatibleType<Indices,SizeAtCompileTime> {};\n\ntypedef typename internal::IndexedViewCompatibleType<Index,1>::type IvcIndex;\n\ntemplate<typename Indices>\ntypename IvcRowType<Indices>::type\nivcRow(const Indices& indices) const {\n  return internal::makeIndexedViewCompatible(indices, internal::variable_if_dynamic<Index,RowsAtCompileTime>(derived().rows()),Specialized);\n}\n\ntemplate<typename Indices>\ntypename IvcColType<Indices>::type\nivcCol(const Indices& indices) const {\n  return internal::makeIndexedViewCompatible(indices, internal::variable_if_dynamic<Index,ColsAtCompileTime>(derived().cols()),Specialized);\n}\n\ntemplate<typename Indices>\ntypename IvcColType<Indices>::type\nivcSize(const Indices& indices) const {\n  return internal::makeIndexedViewCompatible(indices, internal::variable_if_dynamic<Index,SizeAtCompileTime>(derived().size()),Specialized);\n}\n\npublic:\n\n#endif\n\ntemplate<typename RowIndices, typename ColIndices>\nstruct EIGEN_INDEXED_VIEW_METHOD_TYPE {\n  typedef IndexedView<EIGEN_INDEXED_VIEW_METHOD_CONST Derived,\n                      typename IvcRowType<RowIndices>::type,\n                      typename IvcColType<ColIndices>::type> type;\n};\n\n// This is the generic version\n\ntemplate<typename RowIndices, typename ColIndices>\ntypename internal::enable_if<internal::valid_indexed_view_overload<RowIndices,ColIndices>::value\n  && internal::traits<typename EIGEN_INDEXED_VIEW_METHOD_TYPE<RowIndices,ColIndices>::type>::ReturnAsIndexedView,\n  typename EIGEN_INDEXED_VIEW_METHOD_TYPE<RowIndices,ColIndices>::type >::type\noperator()(const RowIndices& rowIndices, const ColIndices& colIndices) EIGEN_INDEXED_VIEW_METHOD_CONST\n{\n  return typename EIGEN_INDEXED_VIEW_METHOD_TYPE<RowIndices,ColIndices>::type\n            (derived(), ivcRow(rowIndices), ivcCol(colIndices));\n}\n\n// The following overload returns a Block<> object\n\ntemplate<typename RowIndices, typename ColIndices>\ntypename internal::enable_if<internal::valid_indexed_view_overload<RowIndices,ColIndices>::value\n  && internal::traits<typename EIGEN_INDEXED_VIEW_METHOD_TYPE<RowIndices,ColIndices>::type>::ReturnAsBlock,\n  typename internal::traits<typename EIGEN_INDEXED_VIEW_METHOD_TYPE<RowIndices,ColIndices>::type>::BlockType>::type\noperator()(const RowIndices& rowIndices, const ColIndices& colIndices) EIGEN_INDEXED_VIEW_METHOD_CONST\n{\n  typedef typename internal::traits<typename EIGEN_INDEXED_VIEW_METHOD_TYPE<RowIndices,ColIndices>::type>::BlockType BlockType;\n  typename IvcRowType<RowIndices>::type actualRowIndices = ivcRow(rowIndices);\n  typename IvcColType<ColIndices>::type actualColIndices = ivcCol(colIndices);\n  return BlockType(derived(),\n                   internal::first(actualRowIndices),\n                   internal::first(actualColIndices),\n                   internal::size(actualRowIndices),\n                   internal::size(actualColIndices));\n}\n\n// The following overload returns a Scalar\n\ntemplate<typename RowIndices, typename ColIndices>\ntypename internal::enable_if<internal::valid_indexed_view_overload<RowIndices,ColIndices>::value\n  && internal::traits<typename EIGEN_INDEXED_VIEW_METHOD_TYPE<RowIndices,ColIndices>::type>::ReturnAsScalar,\n  CoeffReturnType >::type\noperator()(const RowIndices& rowIndices, const ColIndices& colIndices) EIGEN_INDEXED_VIEW_METHOD_CONST\n{\n  return Base::operator()(internal::eval_expr_given_size(rowIndices,rows()),internal::eval_expr_given_size(colIndices,cols()));\n}\n\n#if EIGEN_HAS_STATIC_ARRAY_TEMPLATE\n\n// The following three overloads are needed to handle raw Index[N] arrays.\n\ntemplate<typename RowIndicesT, std::size_t RowIndicesN, typename ColIndices>\nIndexedView<EIGEN_INDEXED_VIEW_METHOD_CONST Derived,const RowIndicesT (&)[RowIndicesN],typename IvcColType<ColIndices>::type>\noperator()(const RowIndicesT (&rowIndices)[RowIndicesN], const ColIndices& colIndices) EIGEN_INDEXED_VIEW_METHOD_CONST\n{\n  return IndexedView<EIGEN_INDEXED_VIEW_METHOD_CONST Derived,const RowIndicesT (&)[RowIndicesN],typename IvcColType<ColIndices>::type>\n                    (derived(), rowIndices, ivcCol(colIndices));\n}\n\ntemplate<typename RowIndices, typename ColIndicesT, std::size_t ColIndicesN>\nIndexedView<EIGEN_INDEXED_VIEW_METHOD_CONST Derived,typename IvcRowType<RowIndices>::type, const ColIndicesT (&)[ColIndicesN]>\noperator()(const RowIndices& rowIndices, const ColIndicesT (&colIndices)[ColIndicesN]) EIGEN_INDEXED_VIEW_METHOD_CONST\n{\n  return IndexedView<EIGEN_INDEXED_VIEW_METHOD_CONST Derived,typename IvcRowType<RowIndices>::type,const ColIndicesT (&)[ColIndicesN]>\n                    (derived(), ivcRow(rowIndices), colIndices);\n}\n\ntemplate<typename RowIndicesT, std::size_t RowIndicesN, typename ColIndicesT, std::size_t ColIndicesN>\nIndexedView<EIGEN_INDEXED_VIEW_METHOD_CONST Derived,const RowIndicesT (&)[RowIndicesN], const ColIndicesT (&)[ColIndicesN]>\noperator()(const RowIndicesT (&rowIndices)[RowIndicesN], const ColIndicesT (&colIndices)[ColIndicesN]) EIGEN_INDEXED_VIEW_METHOD_CONST\n{\n  return IndexedView<EIGEN_INDEXED_VIEW_METHOD_CONST Derived,const RowIndicesT (&)[RowIndicesN],const ColIndicesT (&)[ColIndicesN]>\n                    (derived(), rowIndices, colIndices);\n}\n\n#endif // EIGEN_HAS_STATIC_ARRAY_TEMPLATE\n\n// Overloads for 1D vectors/arrays\n\ntemplate<typename Indices>\ntypename internal::enable_if<\n  IsRowMajor && (!(internal::get_compile_time_incr<typename IvcType<Indices>::type>::value==1 || internal::is_valid_index_type<Indices>::value)),\n  IndexedView<EIGEN_INDEXED_VIEW_METHOD_CONST Derived,IvcIndex,typename IvcType<Indices>::type> >::type\noperator()(const Indices& indices) EIGEN_INDEXED_VIEW_METHOD_CONST\n{\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)\n  return IndexedView<EIGEN_INDEXED_VIEW_METHOD_CONST Derived,IvcIndex,typename IvcType<Indices>::type>\n            (derived(), IvcIndex(0), ivcCol(indices));\n}\n\ntemplate<typename Indices>\ntypename internal::enable_if<\n  (!IsRowMajor) && (!(internal::get_compile_time_incr<typename IvcType<Indices>::type>::value==1 || internal::is_valid_index_type<Indices>::value)),\n  IndexedView<EIGEN_INDEXED_VIEW_METHOD_CONST Derived,typename IvcType<Indices>::type,IvcIndex> >::type\noperator()(const Indices& indices) EIGEN_INDEXED_VIEW_METHOD_CONST\n{\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)\n  return IndexedView<EIGEN_INDEXED_VIEW_METHOD_CONST Derived,typename IvcType<Indices>::type,IvcIndex>\n            (derived(), ivcRow(indices), IvcIndex(0));\n}\n\ntemplate<typename Indices>\ntypename internal::enable_if<\n  (internal::get_compile_time_incr<typename IvcType<Indices>::type>::value==1) && (!internal::is_valid_index_type<Indices>::value) && (!symbolic::is_symbolic<Indices>::value),\n  VectorBlock<EIGEN_INDEXED_VIEW_METHOD_CONST Derived,internal::array_size<Indices>::value> >::type\noperator()(const Indices& indices) EIGEN_INDEXED_VIEW_METHOD_CONST\n{\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)\n  typename IvcType<Indices>::type actualIndices = ivcSize(indices);\n  return VectorBlock<EIGEN_INDEXED_VIEW_METHOD_CONST Derived,internal::array_size<Indices>::value>\n            (derived(), internal::first(actualIndices), internal::size(actualIndices));\n}\n\ntemplate<typename IndexType>\ntypename internal::enable_if<symbolic::is_symbolic<IndexType>::value, CoeffReturnType >::type\noperator()(const IndexType& id) EIGEN_INDEXED_VIEW_METHOD_CONST\n{\n  return Base::operator()(internal::eval_expr_given_size(id,size()));\n}\n\n#if EIGEN_HAS_STATIC_ARRAY_TEMPLATE\n\ntemplate<typename IndicesT, std::size_t IndicesN>\ntypename internal::enable_if<IsRowMajor,\n  IndexedView<EIGEN_INDEXED_VIEW_METHOD_CONST Derived,IvcIndex,const IndicesT (&)[IndicesN]> >::type\noperator()(const IndicesT (&indices)[IndicesN]) EIGEN_INDEXED_VIEW_METHOD_CONST\n{\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)\n  return IndexedView<EIGEN_INDEXED_VIEW_METHOD_CONST Derived,IvcIndex,const IndicesT (&)[IndicesN]>\n            (derived(), IvcIndex(0), indices);\n}\n\ntemplate<typename IndicesT, std::size_t IndicesN>\ntypename internal::enable_if<!IsRowMajor,\n  IndexedView<EIGEN_INDEXED_VIEW_METHOD_CONST Derived,const IndicesT (&)[IndicesN],IvcIndex> >::type\noperator()(const IndicesT (&indices)[IndicesN]) EIGEN_INDEXED_VIEW_METHOD_CONST\n{\n  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)\n  return IndexedView<EIGEN_INDEXED_VIEW_METHOD_CONST Derived,const IndicesT (&)[IndicesN],IvcIndex>\n            (derived(), indices, IvcIndex(0));\n}\n\n#endif // EIGEN_HAS_STATIC_ARRAY_TEMPLATE\n\n#undef EIGEN_INDEXED_VIEW_METHOD_CONST\n#undef EIGEN_INDEXED_VIEW_METHOD_TYPE\n\n#ifndef EIGEN_INDEXED_VIEW_METHOD_2ND_PASS\n#define EIGEN_INDEXED_VIEW_METHOD_2ND_PASS\n#include \"IndexedViewMethods.h\"\n#undef EIGEN_INDEXED_VIEW_METHOD_2ND_PASS\n#endif\n\n#else // EIGEN_PARSED_BY_DOXYGEN\n\n/**\n  * \\returns a generic submatrix view defined by the rows and columns indexed \\a rowIndices and \\a colIndices respectively.\n  *\n  * Each parameter must either be:\n  *  - An integer indexing a single row or column\n  *  - Eigen::all indexing the full set of respective rows or columns in increasing order\n  *  - An ArithmeticSequence as returned by the Eigen::seq and Eigen::seqN functions\n  *  - Any %Eigen's vector/array of integers or expressions\n  *  - Plain C arrays: \\c int[N]\n  *  - And more generally any type exposing the following two member functions:\n  * \\code\n  * <integral type> operator[](<integral type>) const;\n  * <integral type> size() const;\n  * \\endcode\n  * where \\c <integral \\c type>  stands for any integer type compatible with Eigen::Index (i.e. \\c std::ptrdiff_t).\n  *\n  * The last statement implies compatibility with \\c std::vector, \\c std::valarray, \\c std::array, many of the Range-v3's ranges, etc.\n  *\n  * If the submatrix can be represented using a starting position \\c (i,j) and positive sizes \\c (rows,columns), then this\n  * method will returns a Block object after extraction of the relevant information from the passed arguments. This is the case\n  * when all arguments are either:\n  *  - An integer\n  *  - Eigen::all\n  *  - An ArithmeticSequence with compile-time increment strictly equal to 1, as returned by Eigen::seq(a,b), and Eigen::seqN(a,N).\n  *\n  * Otherwise a more general IndexedView<Derived,RowIndices',ColIndices'> object will be returned, after conversion of the inputs\n  * to more suitable types \\c RowIndices' and \\c ColIndices'.\n  *\n  * For 1D vectors and arrays, you better use the operator()(const Indices&) overload, which behave the same way but taking a single parameter.\n  *\n  * See also this <a href=\"https://stackoverflow.com/questions/46110917/eigen-replicate-items-along-one-dimension-without-useless-allocations\">question</a> and its answer for an example of how to duplicate coefficients.\n  *\n  * \\sa operator()(const Indices&), class Block, class IndexedView, DenseBase::block(Index,Index,Index,Index)\n  */\ntemplate<typename RowIndices, typename ColIndices>\nIndexedView_or_Block\noperator()(const RowIndices& rowIndices, const ColIndices& colIndices);\n\n/** This is an overload of operator()(const RowIndices&, const ColIndices&) for 1D vectors or arrays\n  *\n  * \\only_for_vectors\n  */\ntemplate<typename Indices>\nIndexedView_or_VectorBlock\noperator()(const Indices& indices);\n\n#endif  // EIGEN_PARSED_BY_DOXYGEN\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/plugins/MatrixCwiseBinaryOps.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n// This file is a base class plugin containing matrix specifics coefficient wise functions.\n\n/** \\returns an expression of the Schur product (coefficient wise product) of *this and \\a other\n  *\n  * Example: \\include MatrixBase_cwiseProduct.cpp\n  * Output: \\verbinclude MatrixBase_cwiseProduct.out\n  *\n  * \\sa class CwiseBinaryOp, cwiseAbs2\n  */\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC\nEIGEN_STRONG_INLINE const EIGEN_CWISE_BINARY_RETURN_TYPE(Derived,OtherDerived,product)\ncwiseProduct(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const\n{\n  return EIGEN_CWISE_BINARY_RETURN_TYPE(Derived,OtherDerived,product)(derived(), other.derived());\n}\n\n/** \\returns an expression of the coefficient-wise == operator of *this and \\a other\n  *\n  * \\warning this performs an exact comparison, which is generally a bad idea with floating-point types.\n  * In order to check for equality between two vectors or matrices with floating-point coefficients, it is\n  * generally a far better idea to use a fuzzy comparison as provided by isApprox() and\n  * isMuchSmallerThan().\n  *\n  * Example: \\include MatrixBase_cwiseEqual.cpp\n  * Output: \\verbinclude MatrixBase_cwiseEqual.out\n  *\n  * \\sa cwiseNotEqual(), isApprox(), isMuchSmallerThan()\n  */\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC\ninline const CwiseBinaryOp<std::equal_to<Scalar>, const Derived, const OtherDerived>\ncwiseEqual(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const\n{\n  return CwiseBinaryOp<std::equal_to<Scalar>, const Derived, const OtherDerived>(derived(), other.derived());\n}\n\n/** \\returns an expression of the coefficient-wise != operator of *this and \\a other\n  *\n  * \\warning this performs an exact comparison, which is generally a bad idea with floating-point types.\n  * In order to check for equality between two vectors or matrices with floating-point coefficients, it is\n  * generally a far better idea to use a fuzzy comparison as provided by isApprox() and\n  * isMuchSmallerThan().\n  *\n  * Example: \\include MatrixBase_cwiseNotEqual.cpp\n  * Output: \\verbinclude MatrixBase_cwiseNotEqual.out\n  *\n  * \\sa cwiseEqual(), isApprox(), isMuchSmallerThan()\n  */\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC\ninline const CwiseBinaryOp<std::not_equal_to<Scalar>, const Derived, const OtherDerived>\ncwiseNotEqual(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const\n{\n  return CwiseBinaryOp<std::not_equal_to<Scalar>, const Derived, const OtherDerived>(derived(), other.derived());\n}\n\n/** \\returns an expression of the coefficient-wise min of *this and \\a other\n  *\n  * Example: \\include MatrixBase_cwiseMin.cpp\n  * Output: \\verbinclude MatrixBase_cwiseMin.out\n  *\n  * \\sa class CwiseBinaryOp, max()\n  */\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC\nEIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_min_op<Scalar,Scalar>, const Derived, const OtherDerived>\ncwiseMin(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const\n{\n  return CwiseBinaryOp<internal::scalar_min_op<Scalar,Scalar>, const Derived, const OtherDerived>(derived(), other.derived());\n}\n\n/** \\returns an expression of the coefficient-wise min of *this and scalar \\a other\n  *\n  * \\sa class CwiseBinaryOp, min()\n  */\nEIGEN_DEVICE_FUNC\nEIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_min_op<Scalar,Scalar>, const Derived, const ConstantReturnType>\ncwiseMin(const Scalar &other) const\n{\n  return cwiseMin(Derived::Constant(rows(), cols(), other));\n}\n\n/** \\returns an expression of the coefficient-wise max of *this and \\a other\n  *\n  * Example: \\include MatrixBase_cwiseMax.cpp\n  * Output: \\verbinclude MatrixBase_cwiseMax.out\n  *\n  * \\sa class CwiseBinaryOp, min()\n  */\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC\nEIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_max_op<Scalar,Scalar>, const Derived, const OtherDerived>\ncwiseMax(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const\n{\n  return CwiseBinaryOp<internal::scalar_max_op<Scalar,Scalar>, const Derived, const OtherDerived>(derived(), other.derived());\n}\n\n/** \\returns an expression of the coefficient-wise max of *this and scalar \\a other\n  *\n  * \\sa class CwiseBinaryOp, min()\n  */\nEIGEN_DEVICE_FUNC\nEIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_max_op<Scalar,Scalar>, const Derived, const ConstantReturnType>\ncwiseMax(const Scalar &other) const\n{\n  return cwiseMax(Derived::Constant(rows(), cols(), other));\n}\n\n\n/** \\returns an expression of the coefficient-wise quotient of *this and \\a other\n  *\n  * Example: \\include MatrixBase_cwiseQuotient.cpp\n  * Output: \\verbinclude MatrixBase_cwiseQuotient.out\n  *\n  * \\sa class CwiseBinaryOp, cwiseProduct(), cwiseInverse()\n  */\ntemplate<typename OtherDerived>\nEIGEN_DEVICE_FUNC\nEIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_quotient_op<Scalar>, const Derived, const OtherDerived>\ncwiseQuotient(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const\n{\n  return CwiseBinaryOp<internal::scalar_quotient_op<Scalar>, const Derived, const OtherDerived>(derived(), other.derived());\n}\n\ntypedef CwiseBinaryOp<internal::scalar_cmp_op<Scalar,Scalar,internal::cmp_EQ>, const Derived, const ConstantReturnType> CwiseScalarEqualReturnType;\n\n/** \\returns an expression of the coefficient-wise == operator of \\c *this and a scalar \\a s\n  *\n  * \\warning this performs an exact comparison, which is generally a bad idea with floating-point types.\n  * In order to check for equality between two vectors or matrices with floating-point coefficients, it is\n  * generally a far better idea to use a fuzzy comparison as provided by isApprox() and\n  * isMuchSmallerThan().\n  *\n  * \\sa cwiseEqual(const MatrixBase<OtherDerived> &) const\n  */\nEIGEN_DEVICE_FUNC\ninline const CwiseScalarEqualReturnType\ncwiseEqual(const Scalar& s) const\n{\n  return CwiseScalarEqualReturnType(derived(), Derived::Constant(rows(), cols(), s), internal::scalar_cmp_op<Scalar,Scalar,internal::cmp_EQ>());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/plugins/MatrixCwiseUnaryOps.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n// This file is included into the body of the base classes supporting matrix specific coefficient-wise functions.\n// This include MatrixBase and SparseMatrixBase.\n\n\ntypedef CwiseUnaryOp<internal::scalar_abs_op<Scalar>, const Derived> CwiseAbsReturnType;\ntypedef CwiseUnaryOp<internal::scalar_abs2_op<Scalar>, const Derived> CwiseAbs2ReturnType;\ntypedef CwiseUnaryOp<internal::scalar_sqrt_op<Scalar>, const Derived> CwiseSqrtReturnType;\ntypedef CwiseUnaryOp<internal::scalar_sign_op<Scalar>, const Derived> CwiseSignReturnType;\ntypedef CwiseUnaryOp<internal::scalar_inverse_op<Scalar>, const Derived> CwiseInverseReturnType;\n\n/// \\returns an expression of the coefficient-wise absolute value of \\c *this\n///\n/// Example: \\include MatrixBase_cwiseAbs.cpp\n/// Output: \\verbinclude MatrixBase_cwiseAbs.out\n///\nEIGEN_DOC_UNARY_ADDONS(cwiseAbs,absolute value)\n///\n/// \\sa cwiseAbs2()\n///\nEIGEN_DEVICE_FUNC\nEIGEN_STRONG_INLINE const CwiseAbsReturnType\ncwiseAbs() const { return CwiseAbsReturnType(derived()); }\n\n/// \\returns an expression of the coefficient-wise squared absolute value of \\c *this\n///\n/// Example: \\include MatrixBase_cwiseAbs2.cpp\n/// Output: \\verbinclude MatrixBase_cwiseAbs2.out\n///\nEIGEN_DOC_UNARY_ADDONS(cwiseAbs2,squared absolute value)\n///\n/// \\sa cwiseAbs()\n///\nEIGEN_DEVICE_FUNC\nEIGEN_STRONG_INLINE const CwiseAbs2ReturnType\ncwiseAbs2() const { return CwiseAbs2ReturnType(derived()); }\n\n/// \\returns an expression of the coefficient-wise square root of *this.\n///\n/// Example: \\include MatrixBase_cwiseSqrt.cpp\n/// Output: \\verbinclude MatrixBase_cwiseSqrt.out\n///\nEIGEN_DOC_UNARY_ADDONS(cwiseSqrt,square-root)\n///\n/// \\sa cwisePow(), cwiseSquare()\n///\nEIGEN_DEVICE_FUNC\ninline const CwiseSqrtReturnType\ncwiseSqrt() const { return CwiseSqrtReturnType(derived()); }\n\n/// \\returns an expression of the coefficient-wise signum of *this.\n///\n/// Example: \\include MatrixBase_cwiseSign.cpp\n/// Output: \\verbinclude MatrixBase_cwiseSign.out\n///\nEIGEN_DOC_UNARY_ADDONS(cwiseSign,sign function)\n///\nEIGEN_DEVICE_FUNC\ninline const CwiseSignReturnType\ncwiseSign() const { return CwiseSignReturnType(derived()); }\n\n\n/// \\returns an expression of the coefficient-wise inverse of *this.\n///\n/// Example: \\include MatrixBase_cwiseInverse.cpp\n/// Output: \\verbinclude MatrixBase_cwiseInverse.out\n///\nEIGEN_DOC_UNARY_ADDONS(cwiseInverse,inverse)\n///\n/// \\sa cwiseProduct()\n///\nEIGEN_DEVICE_FUNC\ninline const CwiseInverseReturnType\ncwiseInverse() const { return CwiseInverseReturnType(derived()); }\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/Eigen/src/plugins/ReshapedMethods.h",
    "content": "\n#ifdef EIGEN_PARSED_BY_DOXYGEN\n\n/// \\returns an expression of \\c *this with reshaped sizes.\n///\n/// \\param nRows the number of rows in the reshaped expression, specified at either run-time or compile-time, or AutoSize\n/// \\param nCols the number of columns in the reshaped expression, specified at either run-time or compile-time, or AutoSize\n/// \\tparam Order specifies whether the coefficients should be processed in column-major-order (ColMajor), in row-major-order (RowMajor),\n///               or follows the \\em natural order of the nested expression (AutoOrder). The default is ColMajor.\n/// \\tparam NRowsType the type of the value handling the number of rows, typically Index.\n/// \\tparam NColsType the type of the value handling the number of columns, typically Index.\n///\n/// Dynamic size example: \\include MatrixBase_reshaped_int_int.cpp\n/// Output: \\verbinclude MatrixBase_reshaped_int_int.out\n///\n/// The number of rows \\a nRows and columns \\a nCols can also be specified at compile-time by passing Eigen::fix<N>,\n/// or Eigen::fix<N>(n) as arguments. In the later case, \\c n plays the role of a runtime fallback value in case \\c N equals Eigen::Dynamic.\n/// Here is an example with a fixed number of rows and columns:\n/// \\include MatrixBase_reshaped_fixed.cpp\n/// Output: \\verbinclude MatrixBase_reshaped_fixed.out\n///\n/// Finally, one of the sizes parameter can be automatically deduced from the other one by passing AutoSize as in the following example:\n/// \\include MatrixBase_reshaped_auto.cpp\n/// Output: \\verbinclude MatrixBase_reshaped_auto.out\n/// AutoSize does preserve compile-time sizes when possible, i.e., when the sizes of the input are known at compile time \\b and\n/// that the other size is passed at compile-time using Eigen::fix<N> as above.\n///\n/// \\sa class Reshaped, fix, fix<N>(int)\n///\ntemplate<int Order = ColMajor, typename NRowsType, typename NColsType>\nEIGEN_DEVICE_FUNC\ninline Reshaped<Derived,...>\nreshaped(NRowsType nRows, NColsType nCols);\n\n/// This is the const version of reshaped(NRowsType,NColsType).\ntemplate<int Order = ColMajor, typename NRowsType, typename NColsType>\nEIGEN_DEVICE_FUNC\ninline const Reshaped<const Derived,...>\nreshaped(NRowsType nRows, NColsType nCols) const;\n\n/// \\returns an expression of \\c *this with columns (or rows) stacked to a linear column vector\n///\n/// \\tparam Order specifies whether the coefficients should be processed in column-major-order (ColMajor), in row-major-order (RowMajor),\n///               or follows the \\em natural order of the nested expression (AutoOrder). The default is ColMajor.\n///\n/// This overloads is essentially a shortcut for `A.reshaped<Order>(AutoSize,fix<1>)`.\n///\n/// - If `Order==ColMajor` (the default), then it returns a column-vector from the stacked columns of \\c *this.\n/// - If `Order==RowMajor`, then it returns a column-vector from the stacked rows of \\c *this.\n/// - If `Order==AutoOrder`, then it returns a column-vector with elements stacked following the storage order of \\c *this.\n///   This mode is the recommended one when the particular ordering of the element is not relevant.\n///\n/// Example:\n/// \\include MatrixBase_reshaped_to_vector.cpp\n/// Output: \\verbinclude MatrixBase_reshaped_to_vector.out\n///\n/// If you want more control, you can still fall back to reshaped(NRowsType,NColsType).\n///\n/// \\sa reshaped(NRowsType,NColsType), class Reshaped\n///\ntemplate<int Order = ColMajor>\nEIGEN_DEVICE_FUNC\ninline Reshaped<Derived,...>\nreshaped();\n\n/// This is the const version of reshaped().\ntemplate<int Order = ColMajor>\nEIGEN_DEVICE_FUNC\ninline const Reshaped<const Derived,...>\nreshaped() const;\n\n#else\n\n// This file is automatically included twice to generate const and non-const versions\n\n#ifndef EIGEN_RESHAPED_METHOD_2ND_PASS\n#define EIGEN_RESHAPED_METHOD_CONST const\n#else\n#define EIGEN_RESHAPED_METHOD_CONST\n#endif\n\n#ifndef EIGEN_RESHAPED_METHOD_2ND_PASS\n\n// This part is included once\n\n#endif\n\ntemplate<typename NRowsType, typename NColsType>\nEIGEN_DEVICE_FUNC\ninline Reshaped<EIGEN_RESHAPED_METHOD_CONST Derived,\n                internal::get_compiletime_reshape_size<NRowsType,NColsType,SizeAtCompileTime>::value,\n                internal::get_compiletime_reshape_size<NColsType,NRowsType,SizeAtCompileTime>::value>\nreshaped(NRowsType nRows, NColsType nCols) EIGEN_RESHAPED_METHOD_CONST\n{\n  return Reshaped<EIGEN_RESHAPED_METHOD_CONST Derived,\n                  internal::get_compiletime_reshape_size<NRowsType,NColsType,SizeAtCompileTime>::value,\n                  internal::get_compiletime_reshape_size<NColsType,NRowsType,SizeAtCompileTime>::value>\n                (derived(),\n                 internal::get_runtime_reshape_size(nRows,internal::get_runtime_value(nCols),size()),\n                 internal::get_runtime_reshape_size(nCols,internal::get_runtime_value(nRows),size()));\n}\n\ntemplate<int Order, typename NRowsType, typename NColsType>\nEIGEN_DEVICE_FUNC\ninline Reshaped<EIGEN_RESHAPED_METHOD_CONST Derived,\n                internal::get_compiletime_reshape_size<NRowsType,NColsType,SizeAtCompileTime>::value,\n                internal::get_compiletime_reshape_size<NColsType,NRowsType,SizeAtCompileTime>::value,\n                internal::get_compiletime_reshape_order<Flags,Order>::value>\nreshaped(NRowsType nRows, NColsType nCols) EIGEN_RESHAPED_METHOD_CONST\n{\n  return Reshaped<EIGEN_RESHAPED_METHOD_CONST Derived,\n                  internal::get_compiletime_reshape_size<NRowsType,NColsType,SizeAtCompileTime>::value,\n                  internal::get_compiletime_reshape_size<NColsType,NRowsType,SizeAtCompileTime>::value,\n                  internal::get_compiletime_reshape_order<Flags,Order>::value>\n                (derived(),\n                 internal::get_runtime_reshape_size(nRows,internal::get_runtime_value(nCols),size()),\n                 internal::get_runtime_reshape_size(nCols,internal::get_runtime_value(nRows),size()));\n}\n\n// Views as linear vectors\n\nEIGEN_DEVICE_FUNC\ninline Reshaped<EIGEN_RESHAPED_METHOD_CONST Derived,SizeAtCompileTime,1>\nreshaped() EIGEN_RESHAPED_METHOD_CONST\n{\n  return Reshaped<EIGEN_RESHAPED_METHOD_CONST Derived,SizeAtCompileTime,1>(derived(),size(),1);\n}\n\ntemplate<int Order>\nEIGEN_DEVICE_FUNC\ninline Reshaped<EIGEN_RESHAPED_METHOD_CONST Derived, SizeAtCompileTime, 1,\n                internal::get_compiletime_reshape_order<Flags,Order>::value>\nreshaped() EIGEN_RESHAPED_METHOD_CONST\n{\n  EIGEN_STATIC_ASSERT(Order==RowMajor || Order==ColMajor || Order==AutoOrder, INVALID_TEMPLATE_PARAMETER);\n  return Reshaped<EIGEN_RESHAPED_METHOD_CONST Derived, SizeAtCompileTime, 1,\n                  internal::get_compiletime_reshape_order<Flags,Order>::value>\n                (derived(), size(), 1);\n}\n\n#undef EIGEN_RESHAPED_METHOD_CONST\n\n#ifndef EIGEN_RESHAPED_METHOD_2ND_PASS\n#define EIGEN_RESHAPED_METHOD_2ND_PASS\n#include \"ReshapedMethods.h\"\n#undef EIGEN_RESHAPED_METHOD_2ND_PASS\n#endif\n\n#endif // EIGEN_PARSED_BY_DOXYGEN\n"
  },
  {
    "path": "3rdparty/eigen3/INSTALL",
    "content": "Installation instructions for Eigen\n***********************************\n\nExplanation before starting\n***************************\n\nEigen consists only of header files, hence there is nothing to compile\nbefore you can use it. Moreover, these header files do not depend on your\nplatform, they are the same for everybody.\n\nMethod 1. Installing without using CMake\n****************************************\n\nYou can use right away the headers in the Eigen/ subdirectory. In order\nto install, just copy this Eigen/ subdirectory to your favorite location.\nIf you also want the unsupported features, copy the unsupported/\nsubdirectory too.\n\nMethod 2. Installing using CMake\n********************************\n\nLet's call this directory 'source_dir' (where this INSTALL file is).\nBefore starting, create another directory which we will call 'build_dir'.\n\nDo:\n\n  cd build_dir\n  cmake source_dir\n  make install\n\nThe \"make install\" step may require administrator privileges.\n\nYou can adjust the installation destination (the \"prefix\")\nby passing the -DCMAKE_INSTALL_PREFIX=myprefix option to cmake, as is\nexplained in the message that cmake prints at the end.\n"
  },
  {
    "path": "3rdparty/eigen3/README.md",
    "content": "**Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms.**\n\nFor more information go to http://eigen.tuxfamily.org/.\n\nFor ***pull request***, ***bug reports***, and ***feature requests***, go to https://gitlab.com/libeigen/eigen.\n"
  },
  {
    "path": "3rdparty/eigen3/bench/BenchSparseUtil.h",
    "content": "\n#include <Eigen/Sparse>\n#include <bench/BenchTimer.h>\n#include <set>\n\nusing namespace std;\nusing namespace Eigen;\nusing namespace Eigen;\n\n#ifndef SIZE\n#define SIZE 1024\n#endif\n\n#ifndef DENSITY\n#define DENSITY 0.01\n#endif\n\n#ifndef SCALAR\n#define SCALAR double\n#endif\n\ntypedef SCALAR Scalar;\ntypedef Matrix<Scalar,Dynamic,Dynamic> DenseMatrix;\ntypedef Matrix<Scalar,Dynamic,1> DenseVector;\ntypedef SparseMatrix<Scalar> EigenSparseMatrix;\n\nvoid fillMatrix(float density, int rows, int cols,  EigenSparseMatrix& dst)\n{\n  dst.reserve(double(rows)*cols*density);\n  for(int j = 0; j < cols; j++)\n  {\n    for(int i = 0; i < rows; i++)\n    {\n      Scalar v = (internal::random<float>(0,1) < density) ? internal::random<Scalar>() : 0;\n      if (v!=0)\n        dst.insert(i,j) = v;\n    }\n  }\n  dst.finalize();\n}\n\nvoid fillMatrix2(int nnzPerCol, int rows, int cols,  EigenSparseMatrix& dst)\n{\n//   std::cout << \"alloc \" << nnzPerCol*cols << \"\\n\";\n  dst.reserve(nnzPerCol*cols);\n  for(int j = 0; j < cols; j++)\n  {\n    std::set<int> aux;\n    for(int i = 0; i < nnzPerCol; i++)\n    {\n      int k = internal::random<int>(0,rows-1);\n      while (aux.find(k)!=aux.end())\n        k = internal::random<int>(0,rows-1);\n      aux.insert(k);\n\n      dst.insert(k,j) = internal::random<Scalar>();\n    }\n  }\n  dst.finalize();\n}\n\nvoid eiToDense(const EigenSparseMatrix& src, DenseMatrix& dst)\n{\n  dst.setZero();\n  for (int j=0; j<src.cols(); ++j)\n    for (EigenSparseMatrix::InnerIterator it(src.derived(), j); it; ++it)\n      dst(it.index(),j) = it.value();\n}\n\n#ifndef NOGMM\n#include \"gmm/gmm.h\"\ntypedef gmm::csc_matrix<Scalar> GmmSparse;\ntypedef gmm::col_matrix< gmm::wsvector<Scalar> > GmmDynSparse;\nvoid eiToGmm(const EigenSparseMatrix& src, GmmSparse& dst)\n{\n  GmmDynSparse tmp(src.rows(), src.cols());\n  for (int j=0; j<src.cols(); ++j)\n    for (EigenSparseMatrix::InnerIterator it(src.derived(), j); it; ++it)\n      tmp(it.index(),j) = it.value();\n  gmm::copy(tmp, dst);\n}\n#endif\n\n#ifndef NOMTL\n#include <boost/numeric/mtl/mtl.hpp>\ntypedef mtl::compressed2D<Scalar, mtl::matrix::parameters<mtl::tag::col_major> > MtlSparse;\ntypedef mtl::compressed2D<Scalar, mtl::matrix::parameters<mtl::tag::row_major> > MtlSparseRowMajor;\nvoid eiToMtl(const EigenSparseMatrix& src, MtlSparse& dst)\n{\n  mtl::matrix::inserter<MtlSparse> ins(dst);\n  for (int j=0; j<src.cols(); ++j)\n    for (EigenSparseMatrix::InnerIterator it(src.derived(), j); it; ++it)\n      ins[it.index()][j] = it.value();\n}\n#endif\n\n#ifdef CSPARSE\nextern \"C\" {\n#include \"cs.h\"\n}\nvoid eiToCSparse(const EigenSparseMatrix& src, cs* &dst)\n{\n  cs* aux = cs_spalloc (0, 0, 1, 1, 1);\n  for (int j=0; j<src.cols(); ++j)\n    for (EigenSparseMatrix::InnerIterator it(src.derived(), j); it; ++it)\n      if (!cs_entry(aux, it.index(), j, it.value()))\n      {\n        std::cout << \"cs_entry error\\n\";\n        exit(2);\n      }\n   dst = cs_compress(aux);\n//    cs_spfree(aux);\n}\n#endif // CSPARSE\n\n#ifndef NOUBLAS\n#include <boost/numeric/ublas/vector.hpp>\n#include <boost/numeric/ublas/matrix.hpp>\n#include <boost/numeric/ublas/io.hpp>\n#include <boost/numeric/ublas/triangular.hpp>\n#include <boost/numeric/ublas/vector_sparse.hpp>\n#include <boost/numeric/ublas/matrix_sparse.hpp>\n#include <boost/numeric/ublas/vector_of_vector.hpp>\n#include <boost/numeric/ublas/operation.hpp>\n\ntypedef boost::numeric::ublas::compressed_matrix<Scalar,boost::numeric::ublas::column_major> UBlasSparse;\n\nvoid eiToUblas(const EigenSparseMatrix& src, UBlasSparse& dst)\n{\n  dst.resize(src.rows(), src.cols(), false);\n  for (int j=0; j<src.cols(); ++j)\n    for (EigenSparseMatrix::InnerIterator it(src.derived(), j); it; ++it)\n      dst(it.index(),j) = it.value();\n}\n\ntemplate <typename EigenType, typename UblasType>\nvoid eiToUblasVec(const EigenType& src, UblasType& dst)\n{\n  dst.resize(src.size());\n  for (int j=0; j<src.size(); ++j)\n      dst[j] = src.coeff(j);\n}\n#endif\n\n#ifdef OSKI\nextern \"C\" {\n#include <oski/oski.h>\n}\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/BenchTimer.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_BENCH_TIMERR_H\n#define EIGEN_BENCH_TIMERR_H\n\n#if defined(_WIN32) || defined(__CYGWIN__)\n# ifndef NOMINMAX\n#   define NOMINMAX\n#   define EIGEN_BT_UNDEF_NOMINMAX\n# endif\n# ifndef WIN32_LEAN_AND_MEAN\n#   define WIN32_LEAN_AND_MEAN\n#   define EIGEN_BT_UNDEF_WIN32_LEAN_AND_MEAN\n# endif\n# include <windows.h>\n#elif defined(__APPLE__)\n#include <mach/mach_time.h>\n#else\n# include <unistd.h>\n#endif\n\nstatic void escape(void *p) {\n#if EIGEN_COMP_GNUC || EIGEN_COMP_CLANG\n  asm volatile(\"\" : : \"g\"(p) : \"memory\");\n#endif\n}\n\nstatic void clobber() {\n#if EIGEN_COMP_GNUC || EIGEN_COMP_CLANG\n  asm volatile(\"\" : : : \"memory\");\n#endif\n}\n\n#include <Eigen/Core>\n\nnamespace Eigen\n{\n\nenum {\n  CPU_TIMER = 0,\n  REAL_TIMER = 1\n};\n\n/** Elapsed time timer keeping the best try.\n  *\n  * On POSIX platforms we use clock_gettime with CLOCK_PROCESS_CPUTIME_ID.\n  * On Windows we use QueryPerformanceCounter\n  *\n  * Important: on linux, you must link with -lrt\n  */\nclass BenchTimer\n{\npublic:\n\n  BenchTimer()\n  {\n#if defined(_WIN32) || defined(__CYGWIN__)\n    LARGE_INTEGER freq;\n    QueryPerformanceFrequency(&freq);\n    m_frequency = (double)freq.QuadPart;\n#endif\n    reset();\n  }\n\n  ~BenchTimer() {}\n\n  inline void reset()\n  {\n    m_bests.fill(1e9);\n    m_worsts.fill(0);\n    m_totals.setZero();\n  }\n  inline void start()\n  {\n    m_starts[CPU_TIMER]  = getCpuTime();\n    m_starts[REAL_TIMER] = getRealTime();\n  }\n  inline void stop()\n  {\n    m_times[CPU_TIMER] = getCpuTime() - m_starts[CPU_TIMER];\n    m_times[REAL_TIMER] = getRealTime() - m_starts[REAL_TIMER];\n    #if EIGEN_VERSION_AT_LEAST(2,90,0)\n    m_bests = m_bests.cwiseMin(m_times);\n    m_worsts = m_worsts.cwiseMax(m_times);\n    #else\n    m_bests(0) = std::min(m_bests(0),m_times(0));\n    m_bests(1) = std::min(m_bests(1),m_times(1));\n    m_worsts(0) = std::max(m_worsts(0),m_times(0));\n    m_worsts(1) = std::max(m_worsts(1),m_times(1));\n    #endif\n    m_totals += m_times;\n  }\n\n  /** Return the elapsed time in seconds between the last start/stop pair\n    */\n  inline double value(int TIMER = CPU_TIMER) const\n  {\n    return m_times[TIMER];\n  }\n\n  /** Return the best elapsed time in seconds\n    */\n  inline double best(int TIMER = CPU_TIMER) const\n  {\n    return m_bests[TIMER];\n  }\n\n  /** Return the worst elapsed time in seconds\n    */\n  inline double worst(int TIMER = CPU_TIMER) const\n  {\n    return m_worsts[TIMER];\n  }\n\n  /** Return the total elapsed time in seconds.\n    */\n  inline double total(int TIMER = CPU_TIMER) const\n  {\n    return m_totals[TIMER];\n  }\n\n  inline double getCpuTime() const\n  {\n#ifdef _WIN32\n    LARGE_INTEGER query_ticks;\n    QueryPerformanceCounter(&query_ticks);\n    return query_ticks.QuadPart/m_frequency;\n#elif __APPLE__\n    return double(mach_absolute_time())*1e-9;\n#else\n    timespec ts;\n    clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts);\n    return double(ts.tv_sec) + 1e-9 * double(ts.tv_nsec);\n#endif\n  }\n\n  inline double getRealTime() const\n  {\n#ifdef _WIN32\n    SYSTEMTIME st;\n    GetSystemTime(&st);\n    return (double)st.wSecond + 1.e-3 * (double)st.wMilliseconds;\n#elif __APPLE__\n    return double(mach_absolute_time())*1e-9;\n#else\n    timespec ts;\n    clock_gettime(CLOCK_REALTIME, &ts);\n    return double(ts.tv_sec) + 1e-9 * double(ts.tv_nsec);\n#endif\n  }\n\nprotected:\n#if defined(_WIN32) || defined(__CYGWIN__)\n  double m_frequency;\n#endif\n  Vector2d m_starts;\n  Vector2d m_times;\n  Vector2d m_bests;\n  Vector2d m_worsts;\n  Vector2d m_totals;\n\npublic:\n  EIGEN_MAKE_ALIGNED_OPERATOR_NEW\n};\n\n#define BENCH(TIMER,TRIES,REP,CODE) { \\\n    TIMER.reset(); \\\n    for(int uglyvarname1=0; uglyvarname1<TRIES; ++uglyvarname1){ \\\n      TIMER.start(); \\\n      for(int uglyvarname2=0; uglyvarname2<REP; ++uglyvarname2){ \\\n        CODE; \\\n      } \\\n      TIMER.stop(); \\\n      clobber(); \\\n    } \\\n  }\n\n}\n\n// clean #defined tokens\n#ifdef EIGEN_BT_UNDEF_NOMINMAX\n# undef EIGEN_BT_UNDEF_NOMINMAX\n# undef NOMINMAX\n#endif\n\n#ifdef EIGEN_BT_UNDEF_WIN32_LEAN_AND_MEAN\n# undef EIGEN_BT_UNDEF_WIN32_LEAN_AND_MEAN\n# undef WIN32_LEAN_AND_MEAN\n#endif\n\n#endif // EIGEN_BENCH_TIMERR_H\n"
  },
  {
    "path": "3rdparty/eigen3/bench/BenchUtil.h",
    "content": "\n#ifndef EIGEN_BENCH_UTIL_H\n#define EIGEN_BENCH_UTIL_H\n\n#include <Eigen/Core>\n#include \"BenchTimer.h\"\n\nusing namespace std;\nusing namespace Eigen;\n\n#include <boost/preprocessor/repetition/enum_params.hpp>\n#include <boost/preprocessor/repetition.hpp>\n#include <boost/preprocessor/seq.hpp>\n#include <boost/preprocessor/array.hpp>\n#include <boost/preprocessor/arithmetic.hpp>\n#include <boost/preprocessor/comparison.hpp>\n#include <boost/preprocessor/punctuation.hpp>\n#include <boost/preprocessor/punctuation/comma.hpp>\n#include <boost/preprocessor/stringize.hpp>\n\ntemplate<typename MatrixType> void initMatrix_random(MatrixType& mat) __attribute__((noinline));\ntemplate<typename MatrixType> void initMatrix_random(MatrixType& mat)\n{\n  mat.setRandom();// = MatrixType::random(mat.rows(), mat.cols());\n}\n\ntemplate<typename MatrixType> void initMatrix_identity(MatrixType& mat) __attribute__((noinline));\ntemplate<typename MatrixType> void initMatrix_identity(MatrixType& mat)\n{\n  mat.setIdentity();\n}\n\n#ifndef __INTEL_COMPILER\n#define DISABLE_SSE_EXCEPTIONS()  { \\\n  int aux; \\\n  asm( \\\n  \"stmxcsr   %[aux]           \\n\\t\" \\\n  \"orl       $32832, %[aux]   \\n\\t\" \\\n  \"ldmxcsr   %[aux]           \\n\\t\" \\\n  : : [aux] \"m\" (aux)); \\\n}\n#else\n#define DISABLE_SSE_EXCEPTIONS()  \n#endif\n\n#ifdef BENCH_GMM\n#include <gmm/gmm.h>\ntemplate <typename EigenMatrixType, typename GmmMatrixType>\nvoid eiToGmm(const EigenMatrixType& src, GmmMatrixType& dst)\n{\n  dst.resize(src.rows(),src.cols());\n  for (int j=0; j<src.cols(); ++j)\n    for (int i=0; i<src.rows(); ++i)\n      dst(i,j) = src.coeff(i,j);\n}\n#endif\n\n\n#ifdef BENCH_GSL\n#include <gsl/gsl_matrix.h>\n#include <gsl/gsl_linalg.h>\n#include <gsl/gsl_eigen.h>\ntemplate <typename EigenMatrixType>\nvoid eiToGsl(const EigenMatrixType& src, gsl_matrix** dst)\n{\n  for (int j=0; j<src.cols(); ++j)\n    for (int i=0; i<src.rows(); ++i)\n      gsl_matrix_set(*dst, i, j, src.coeff(i,j));\n}\n#endif\n\n#ifdef BENCH_UBLAS\n#include <boost/numeric/ublas/matrix.hpp>\n#include <boost/numeric/ublas/vector.hpp>\ntemplate <typename EigenMatrixType, typename UblasMatrixType>\nvoid eiToUblas(const EigenMatrixType& src, UblasMatrixType& dst)\n{\n  dst.resize(src.rows(),src.cols());\n  for (int j=0; j<src.cols(); ++j)\n    for (int i=0; i<src.rows(); ++i)\n      dst(i,j) = src.coeff(i,j);\n}\ntemplate <typename EigenType, typename UblasType>\nvoid eiToUblasVec(const EigenType& src, UblasType& dst)\n{\n  dst.resize(src.size());\n  for (int j=0; j<src.size(); ++j)\n      dst[j] = src.coeff(j);\n}\n#endif\n\n#endif // EIGEN_BENCH_UTIL_H\n"
  },
  {
    "path": "3rdparty/eigen3/bench/README.txt",
    "content": "\nThis folder contains a couple of benchmark utities and Eigen benchmarks.\n\n****************************\n* bench_multi_compilers.sh *\n****************************\n\nThis script allows to run a benchmark on a set of different compilers/compiler options.\nIt takes two arguments:\n - a file defining the list of the compilers with their options\n - the .cpp file of the benchmark\n\nExamples:\n\n$ ./bench_multi_compilers.sh basicbench.cxxlist basicbenchmark.cpp\n\n    g++-4.1 -O3 -DNDEBUG -finline-limit=10000\n    3d-3x3   /   4d-4x4   /   Xd-4x4   /   Xd-20x20   /\n    0.271102   0.131416   0.422322   0.198633\n    0.201658   0.102436   0.397566   0.207282\n\n    g++-4.2 -O3 -DNDEBUG -finline-limit=10000\n    3d-3x3   /   4d-4x4   /   Xd-4x4   /   Xd-20x20   /\n    0.107805   0.0890579   0.30265   0.161843\n    0.127157   0.0712581   0.278341   0.191029\n\n    g++-4.3 -O3 -DNDEBUG -finline-limit=10000\n    3d-3x3   /   4d-4x4   /   Xd-4x4   /   Xd-20x20   /\n    0.134318   0.105291   0.3704   0.180966\n    0.137703   0.0732472   0.31225   0.202204\n\n    icpc -fast -DNDEBUG -fno-exceptions -no-inline-max-size\n    3d-3x3   /   4d-4x4   /   Xd-4x4   /   Xd-20x20   /\n    0.226145   0.0941319   0.371873   0.159433\n    0.109302   0.0837538   0.328102   0.173891\n\n\n$ ./bench_multi_compilers.sh ompbench.cxxlist ompbenchmark.cpp\n\n    g++-4.2 -O3 -DNDEBUG -finline-limit=10000 -fopenmp\n    double, fixed-size 4x4: 0.00165105s  0.0778739s\n    double, 32x32: 0.0654769s 0.075289s  => x0.869674 (2)\n    double, 128x128: 0.054148s 0.0419669s  => x1.29025 (2)\n    double, 512x512: 0.913799s 0.428533s  => x2.13239 (2)\n    double, 1024x1024: 14.5972s 9.3542s  => x1.5605 (2)\n\n    icpc -fast -DNDEBUG -fno-exceptions -no-inline-max-size -openmp\n    double, fixed-size 4x4: 0.000589848s  0.019949s\n    double, 32x32: 0.0682781s 0.0449722s  => x1.51823 (2)\n    double, 128x128: 0.0547509s 0.0435519s  => x1.25714 (2)\n    double, 512x512: 0.829436s 0.424438s  => x1.9542 (2)\n    double, 1024x1024: 14.5243s 10.7735s  => x1.34815 (2)\n\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/analyze-blocking-sizes.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Benoit Jacob <benoitjacob@google.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include <iostream>\n#include <cstdint>\n#include <cstdlib>\n#include <vector>\n#include <algorithm>\n#include <fstream>\n#include <string>\n#include <cmath>\n#include <cassert>\n#include <cstring>\n#include <memory>\n\n#include <Eigen/Core>\n\nusing namespace std;\n\nconst int default_precision = 4;\n\n// see --only-cubic-sizes\nbool only_cubic_sizes = false;\n\n// see --dump-tables\nbool dump_tables = false;\n\nuint8_t log2_pot(size_t x) {\n  size_t l = 0;\n  while (x >>= 1) l++;\n  return l;\n}\n\nuint16_t compact_size_triple(size_t k, size_t m, size_t n)\n{\n  return (log2_pot(k) << 8) | (log2_pot(m) << 4) | log2_pot(n);\n}\n\n// just a helper to store a triple of K,M,N sizes for matrix product\nstruct size_triple_t\n{\n  uint16_t k, m, n;\n  size_triple_t() : k(0), m(0), n(0) {}\n  size_triple_t(size_t _k, size_t _m, size_t _n) : k(_k), m(_m), n(_n) {}\n  size_triple_t(const size_triple_t& o) : k(o.k), m(o.m), n(o.n) {}\n  size_triple_t(uint16_t compact)\n  {\n    k = 1 << ((compact & 0xf00) >> 8);\n    m = 1 << ((compact & 0x0f0) >> 4);\n    n = 1 << ((compact & 0x00f) >> 0);\n  }\n  bool is_cubic() const { return k == m && m == n; }\n};\n\nostream& operator<<(ostream& s, const size_triple_t& t)\n{\n  return s << \"(\" << t.k << \", \" << t.m << \", \" << t.n << \")\";\n}\n\nstruct inputfile_entry_t\n{\n  uint16_t product_size;\n  uint16_t pot_block_size;\n  size_triple_t nonpot_block_size;\n  float gflops;\n};\n\nstruct inputfile_t\n{\n  enum class type_t {\n    unknown,\n    all_pot_sizes,\n    default_sizes\n  };\n\n  string filename;\n  vector<inputfile_entry_t> entries;\n  type_t type;\n\n  inputfile_t(const string& fname)\n    : filename(fname)\n    , type(type_t::unknown)\n  {\n    ifstream stream(filename);\n    if (!stream.is_open()) {\n      cerr << \"couldn't open input file: \" << filename << endl;\n      exit(1);\n    }\n    string line;\n    while (getline(stream, line)) {\n      if (line.empty()) continue;\n      if (line.find(\"BEGIN MEASUREMENTS ALL POT SIZES\") == 0) {\n        if (type != type_t::unknown) {\n          cerr << \"Input file \" << filename << \" contains redundant BEGIN MEASUREMENTS lines\";\n          exit(1);\n        }\n        type = type_t::all_pot_sizes;\n        continue;\n      }\n      if (line.find(\"BEGIN MEASUREMENTS DEFAULT SIZES\") == 0) {\n        if (type != type_t::unknown) {\n          cerr << \"Input file \" << filename << \" contains redundant BEGIN MEASUREMENTS lines\";\n          exit(1);\n        }\n        type = type_t::default_sizes;\n        continue;\n      }\n      \n\n      if (type == type_t::unknown) {\n        continue;\n      }\n      switch(type) {\n        case type_t::all_pot_sizes: {\n          unsigned int product_size, block_size;\n          float gflops;\n          int sscanf_result =\n            sscanf(line.c_str(), \"%x %x %f\",\n                   &product_size,\n                   &block_size,\n                   &gflops);\n          if (3 != sscanf_result ||\n              !product_size ||\n              product_size > 0xfff ||\n              !block_size ||\n              block_size > 0xfff ||\n              !isfinite(gflops))\n          {\n            cerr << \"ill-formed input file: \" << filename << endl;\n            cerr << \"offending line:\" << endl << line << endl;\n            exit(1);\n          }\n          if (only_cubic_sizes && !size_triple_t(product_size).is_cubic()) {\n            continue;\n          }\n          inputfile_entry_t entry;\n          entry.product_size = uint16_t(product_size);\n          entry.pot_block_size = uint16_t(block_size);\n          entry.gflops = gflops;\n          entries.push_back(entry);\n          break;\n        }\n        case type_t::default_sizes: {\n          unsigned int product_size;\n          float gflops;\n          int bk, bm, bn;\n          int sscanf_result =\n            sscanf(line.c_str(), \"%x default(%d, %d, %d) %f\",\n                   &product_size,\n                   &bk, &bm, &bn,\n                   &gflops);\n          if (5 != sscanf_result ||\n              !product_size ||\n              product_size > 0xfff ||\n              !isfinite(gflops))\n          {\n            cerr << \"ill-formed input file: \" << filename << endl;\n            cerr << \"offending line:\" << endl << line << endl;\n            exit(1);\n          }\n          if (only_cubic_sizes && !size_triple_t(product_size).is_cubic()) {\n            continue;\n          }\n          inputfile_entry_t entry;\n          entry.product_size = uint16_t(product_size);\n          entry.pot_block_size = 0;\n          entry.nonpot_block_size = size_triple_t(bk, bm, bn);\n          entry.gflops = gflops;\n          entries.push_back(entry);\n          break;\n        }\n        \n        default:\n          break;\n      }\n    }\n    stream.close();\n    if (type == type_t::unknown) {\n      cerr << \"Unrecognized input file \" << filename << endl;\n      exit(1);\n    }\n    if (entries.empty()) {\n      cerr << \"didn't find any measurements in input file: \" << filename << endl;\n      exit(1);\n    }\n  }\n};\n\nstruct preprocessed_inputfile_entry_t\n{\n  uint16_t product_size;\n  uint16_t block_size;\n\n  float efficiency;\n};\n\nbool lower_efficiency(const preprocessed_inputfile_entry_t& e1, const preprocessed_inputfile_entry_t& e2)\n{\n  return e1.efficiency < e2.efficiency;\n}\n\nstruct preprocessed_inputfile_t\n{\n  string filename;\n  vector<preprocessed_inputfile_entry_t> entries;\n\n  preprocessed_inputfile_t(const inputfile_t& inputfile)\n    : filename(inputfile.filename)\n  {\n    if (inputfile.type != inputfile_t::type_t::all_pot_sizes) {\n      abort();\n    }\n    auto it = inputfile.entries.begin();\n    auto it_first_with_given_product_size = it;\n    while (it != inputfile.entries.end()) {\n      ++it;\n      if (it == inputfile.entries.end() ||\n        it->product_size != it_first_with_given_product_size->product_size)\n      {\n        import_input_file_range_one_product_size(it_first_with_given_product_size, it);\n        it_first_with_given_product_size = it;\n      }\n    }\n  }\n\nprivate:\n  void import_input_file_range_one_product_size(\n    const vector<inputfile_entry_t>::const_iterator& begin,\n    const vector<inputfile_entry_t>::const_iterator& end)\n  {\n    uint16_t product_size = begin->product_size;\n    float max_gflops = 0.0f;\n    for (auto it = begin; it != end; ++it) {\n      if (it->product_size != product_size) {\n        cerr << \"Unexpected ordering of entries in \" << filename << endl;\n        cerr << \"(Expected all entries for product size \" << hex << product_size << dec << \" to be grouped)\" << endl;\n        exit(1);\n      }\n      max_gflops = max(max_gflops, it->gflops);\n    }\n    for (auto it = begin; it != end; ++it) {\n      preprocessed_inputfile_entry_t entry;\n      entry.product_size = it->product_size;\n      entry.block_size = it->pot_block_size;\n      entry.efficiency = it->gflops / max_gflops;\n      entries.push_back(entry);\n    }\n  }\n};\n\nvoid check_all_files_in_same_exact_order(\n       const vector<preprocessed_inputfile_t>& preprocessed_inputfiles)\n{\n  if (preprocessed_inputfiles.empty()) {\n    return;\n  }\n\n  const preprocessed_inputfile_t& first_file = preprocessed_inputfiles[0];\n  const size_t num_entries = first_file.entries.size();\n\n  for (size_t i = 0; i < preprocessed_inputfiles.size(); i++) {\n    if (preprocessed_inputfiles[i].entries.size() != num_entries) {\n      cerr << \"these files have different number of entries: \"\n           << preprocessed_inputfiles[i].filename\n           << \" and \"\n           << first_file.filename\n           << endl;\n      exit(1);\n    }\n  }\n\n  for (size_t entry_index = 0; entry_index < num_entries; entry_index++) {\n    const uint16_t entry_product_size = first_file.entries[entry_index].product_size;\n    const uint16_t entry_block_size = first_file.entries[entry_index].block_size;\n    for (size_t file_index = 0; file_index < preprocessed_inputfiles.size(); file_index++) {\n      const preprocessed_inputfile_t& cur_file = preprocessed_inputfiles[file_index];\n      if (cur_file.entries[entry_index].product_size != entry_product_size ||\n          cur_file.entries[entry_index].block_size != entry_block_size)\n      {\n        cerr << \"entries not in same order between these files: \"\n             << first_file.filename\n             << \" and \"\n             << cur_file.filename\n             << endl;\n        exit(1);\n      }\n    }\n  }\n}\n\nfloat efficiency_of_subset(\n        const vector<preprocessed_inputfile_t>& preprocessed_inputfiles,\n        const vector<size_t>& subset)\n{\n  if (subset.size() <= 1) {\n    return 1.0f;\n  }\n  const preprocessed_inputfile_t& first_file = preprocessed_inputfiles[subset[0]];\n  const size_t num_entries = first_file.entries.size();\n  float efficiency = 1.0f;\n  size_t entry_index = 0;\n  size_t first_entry_index_with_this_product_size = 0;\n  uint16_t product_size = first_file.entries[0].product_size;\n  while (entry_index < num_entries) {\n    ++entry_index;\n    if (entry_index == num_entries ||\n        first_file.entries[entry_index].product_size != product_size)\n    {\n      float efficiency_this_product_size = 0.0f;\n      for (size_t e = first_entry_index_with_this_product_size; e < entry_index; e++) {\n        float efficiency_this_entry = 1.0f;\n        for (auto i = subset.begin(); i != subset.end(); ++i) {\n          efficiency_this_entry = min(efficiency_this_entry, preprocessed_inputfiles[*i].entries[e].efficiency);\n        }\n        efficiency_this_product_size = max(efficiency_this_product_size, efficiency_this_entry);\n      }\n      efficiency = min(efficiency, efficiency_this_product_size);\n      if (entry_index < num_entries) {\n        first_entry_index_with_this_product_size = entry_index;\n        product_size = first_file.entries[entry_index].product_size;\n      }\n    }\n  }\n\n  return efficiency;\n}\n\nvoid dump_table_for_subset(\n        const vector<preprocessed_inputfile_t>& preprocessed_inputfiles,\n        const vector<size_t>& subset)\n{\n  const preprocessed_inputfile_t& first_file = preprocessed_inputfiles[subset[0]];\n  const size_t num_entries = first_file.entries.size();\n  size_t entry_index = 0;\n  size_t first_entry_index_with_this_product_size = 0;\n  uint16_t product_size = first_file.entries[0].product_size;\n  size_t i = 0;\n  size_triple_t min_product_size(first_file.entries.front().product_size);\n  size_triple_t max_product_size(first_file.entries.back().product_size);\n  if (!min_product_size.is_cubic() || !max_product_size.is_cubic()) {\n    abort();\n  }\n  if (only_cubic_sizes) {\n    cerr << \"Can't generate tables with --only-cubic-sizes.\" << endl;\n    abort();\n  }\n  cout << \"struct LookupTable {\" << endl;\n  cout << \"  static const size_t BaseSize = \" << min_product_size.k << \";\" << endl;\n  const size_t NumSizes = log2_pot(max_product_size.k / min_product_size.k) + 1;\n  const size_t TableSize = NumSizes * NumSizes * NumSizes;\n  cout << \"  static const size_t NumSizes = \" << NumSizes << \";\" << endl;\n  cout << \"  static const unsigned short* Data() {\" << endl;\n  cout << \"    static const unsigned short data[\" << TableSize << \"] = {\";\n  while (entry_index < num_entries) {\n    ++entry_index;\n    if (entry_index == num_entries ||\n        first_file.entries[entry_index].product_size != product_size)\n    {\n      float best_efficiency_this_product_size = 0.0f;\n      uint16_t best_block_size_this_product_size = 0;\n      for (size_t e = first_entry_index_with_this_product_size; e < entry_index; e++) {\n        float efficiency_this_entry = 1.0f;\n        for (auto i = subset.begin(); i != subset.end(); ++i) {\n          efficiency_this_entry = min(efficiency_this_entry, preprocessed_inputfiles[*i].entries[e].efficiency);\n        }\n        if (efficiency_this_entry > best_efficiency_this_product_size) {\n          best_efficiency_this_product_size = efficiency_this_entry;\n          best_block_size_this_product_size = first_file.entries[e].block_size;\n        }\n      }\n      if ((i++) % NumSizes) {\n        cout << \" \";\n      } else {\n        cout << endl << \"      \";\n      }\n      cout << \"0x\" << hex << best_block_size_this_product_size << dec;\n      if (entry_index < num_entries) {\n        cout << \",\";\n        first_entry_index_with_this_product_size = entry_index;\n        product_size = first_file.entries[entry_index].product_size;\n      }\n    }\n  }\n  if (i != TableSize) {\n    cerr << endl << \"Wrote \" << i << \" table entries, expected \" << TableSize << endl;\n    abort();\n  }\n  cout << endl << \"    };\" << endl;\n  cout << \"    return data;\" << endl;\n  cout << \"  }\" << endl;\n  cout << \"};\" << endl;\n}\n\nfloat efficiency_of_partition(\n        const vector<preprocessed_inputfile_t>& preprocessed_inputfiles,\n        const vector<vector<size_t>>& partition)\n{\n  float efficiency = 1.0f;\n  for (auto s = partition.begin(); s != partition.end(); ++s) {\n    efficiency = min(efficiency, efficiency_of_subset(preprocessed_inputfiles, *s));\n  }\n  return efficiency;\n}\n\nvoid make_first_subset(size_t subset_size, vector<size_t>& out_subset, size_t set_size)\n{\n  assert(subset_size >= 1 && subset_size <= set_size);\n  out_subset.resize(subset_size);\n  for (size_t i = 0; i < subset_size; i++) {\n    out_subset[i] = i;\n  }\n}\n\nbool is_last_subset(const vector<size_t>& subset, size_t set_size)\n{\n  return subset[0] == set_size - subset.size();\n}\n\nvoid next_subset(vector<size_t>& inout_subset, size_t set_size)\n{\n  if (is_last_subset(inout_subset, set_size)) {\n    cerr << \"iterating past the last subset\" << endl;\n    abort();\n  }\n  size_t i = 1;\n  while (inout_subset[inout_subset.size() - i] == set_size - i) {\n    i++;\n    assert(i <= inout_subset.size());\n  }\n  size_t first_index_to_change = inout_subset.size() - i;\n  inout_subset[first_index_to_change]++;\n  size_t p = inout_subset[first_index_to_change];\n  for (size_t j = first_index_to_change + 1; j < inout_subset.size(); j++) {\n    inout_subset[j] = ++p;\n  }\n}\n\nconst size_t number_of_subsets_limit = 100;\nconst size_t always_search_subsets_of_size_at_least = 2;\n\nbool is_number_of_subsets_feasible(size_t n, size_t p)\n{ \n  assert(n>0 && p>0 && p<=n);\n  uint64_t numerator = 1, denominator = 1;\n  for (size_t i = 0; i < p; i++) {\n    numerator *= n - i;\n    denominator *= i + 1;\n    if (numerator > denominator * number_of_subsets_limit) {\n      return false;\n    }\n  }\n  return true;\n}\n\nsize_t max_feasible_subset_size(size_t n)\n{\n  assert(n > 0);\n  const size_t minresult = min<size_t>(n-1, always_search_subsets_of_size_at_least);\n  for (size_t p = 1; p <= n - 1; p++) {\n    if (!is_number_of_subsets_feasible(n, p+1)) {\n      return max(p, minresult);\n    }\n  }\n  return n - 1;\n}\n\nvoid find_subset_with_efficiency_higher_than(\n       const vector<preprocessed_inputfile_t>& preprocessed_inputfiles,\n       float required_efficiency_to_beat,\n       vector<size_t>& inout_remainder,\n       vector<size_t>& out_subset)\n{\n  out_subset.resize(0);\n\n  if (required_efficiency_to_beat >= 1.0f) {\n    cerr << \"can't beat efficiency 1.\" << endl;\n    abort();\n  }\n\n  while (!inout_remainder.empty()) {\n\n    vector<size_t> candidate_indices(inout_remainder.size());\n    for (size_t i = 0; i < candidate_indices.size(); i++) {\n      candidate_indices[i] = i;\n    }\n\n    size_t candidate_indices_subset_size = max_feasible_subset_size(candidate_indices.size());\n    while (candidate_indices_subset_size >= 1) {\n      vector<size_t> candidate_indices_subset;\n      make_first_subset(candidate_indices_subset_size,\n                        candidate_indices_subset,\n                        candidate_indices.size());\n\n      vector<size_t> best_candidate_indices_subset;\n      float best_efficiency = 0.0f;\n      vector<size_t> trial_subset = out_subset;\n      trial_subset.resize(out_subset.size() + candidate_indices_subset_size);\n      while (true)\n      {\n        for (size_t i = 0; i < candidate_indices_subset_size; i++) {\n          trial_subset[out_subset.size() + i] = inout_remainder[candidate_indices_subset[i]];\n        }\n        \n        float trial_efficiency = efficiency_of_subset(preprocessed_inputfiles, trial_subset);\n        if (trial_efficiency > best_efficiency) {\n          best_efficiency = trial_efficiency;\n          best_candidate_indices_subset = candidate_indices_subset;\n        }\n        if (is_last_subset(candidate_indices_subset, candidate_indices.size())) {\n          break;\n        }\n        next_subset(candidate_indices_subset, candidate_indices.size());\n      }\n       \n      if (best_efficiency > required_efficiency_to_beat) {\n        for (size_t i = 0; i < best_candidate_indices_subset.size(); i++) {\n          candidate_indices[i] = candidate_indices[best_candidate_indices_subset[i]];\n        }\n        candidate_indices.resize(best_candidate_indices_subset.size());\n      }\n      candidate_indices_subset_size--;\n    }\n      \n    size_t candidate_index = candidate_indices[0];\n    auto candidate_iterator = inout_remainder.begin() + candidate_index;\n    vector<size_t> trial_subset = out_subset;\n\n    trial_subset.push_back(*candidate_iterator);\n    float trial_efficiency = efficiency_of_subset(preprocessed_inputfiles, trial_subset);\n    if (trial_efficiency > required_efficiency_to_beat) {\n      out_subset.push_back(*candidate_iterator);\n      inout_remainder.erase(candidate_iterator);\n    } else {\n      break;\n    }\n  }\n}\n\nvoid find_partition_with_efficiency_higher_than(\n       const vector<preprocessed_inputfile_t>& preprocessed_inputfiles,\n       float required_efficiency_to_beat,\n       vector<vector<size_t>>& out_partition)\n{\n  out_partition.resize(0);\n\n  vector<size_t> remainder;\n  for (size_t i = 0; i < preprocessed_inputfiles.size(); i++) {\n    remainder.push_back(i);\n  }\n\n  while (!remainder.empty()) {\n    vector<size_t> new_subset;\n    find_subset_with_efficiency_higher_than(\n      preprocessed_inputfiles,\n      required_efficiency_to_beat,\n      remainder,\n      new_subset);\n    out_partition.push_back(new_subset);\n  }\n}\n\nvoid print_partition(\n       const vector<preprocessed_inputfile_t>& preprocessed_inputfiles,\n       const vector<vector<size_t>>& partition)\n{\n  float efficiency = efficiency_of_partition(preprocessed_inputfiles, partition);\n  cout << \"Partition into \" << partition.size() << \" subsets for \" << efficiency * 100.0f << \"% efficiency\"  << endl;\n  for (auto subset = partition.begin(); subset != partition.end(); ++subset) {\n    cout << \"  Subset \" << (subset - partition.begin())\n         << \", efficiency \" << efficiency_of_subset(preprocessed_inputfiles, *subset) * 100.0f << \"%:\"\n         << endl;\n    for (auto file = subset->begin(); file != subset->end(); ++file) {\n      cout << \"    \" << preprocessed_inputfiles[*file].filename << endl;\n    }\n    if (dump_tables) {\n      cout << \"  Table:\" << endl;\n      dump_table_for_subset(preprocessed_inputfiles, *subset);\n    }\n  }\n  cout << endl;\n}\n\nstruct action_t\n{\n  virtual const char* invokation_name() const { abort(); return nullptr; }\n  virtual void run(const vector<string>&) const { abort(); }\n  virtual ~action_t() {}\n};\n\nstruct partition_action_t : action_t\n{\n  virtual const char* invokation_name() const override { return \"partition\"; }\n  virtual void run(const vector<string>& input_filenames) const override\n  {\n    vector<preprocessed_inputfile_t> preprocessed_inputfiles;\n\n    if (input_filenames.empty()) {\n      cerr << \"The \" << invokation_name() << \" action needs a list of input files.\" << endl;\n      exit(1);\n    }\n\n    for (auto it = input_filenames.begin(); it != input_filenames.end(); ++it) {\n      inputfile_t inputfile(*it);\n      switch (inputfile.type) {\n        case inputfile_t::type_t::all_pot_sizes:\n          preprocessed_inputfiles.emplace_back(inputfile);\n          break;\n        case inputfile_t::type_t::default_sizes:\n          cerr << \"The \" << invokation_name() << \" action only uses measurements for all pot sizes, and \"\n               << \"has no use for \" << *it << \" which contains measurements for default sizes.\" << endl;\n          exit(1);\n          break;\n        default:\n          cerr << \"Unrecognized input file: \" << *it << endl;\n          exit(1);\n      }\n    }\n\n    check_all_files_in_same_exact_order(preprocessed_inputfiles);\n\n    float required_efficiency_to_beat = 0.0f;\n    vector<vector<vector<size_t>>> partitions;\n    cerr << \"searching for partitions...\\r\" << flush;\n    while (true)\n    {\n      vector<vector<size_t>> partition;\n      find_partition_with_efficiency_higher_than(\n        preprocessed_inputfiles,\n        required_efficiency_to_beat,\n        partition);\n      float actual_efficiency = efficiency_of_partition(preprocessed_inputfiles, partition);\n      cerr << \"partition \" << preprocessed_inputfiles.size() << \" files into \" << partition.size()\n           << \" subsets for \" << 100.0f * actual_efficiency\n           << \" % efficiency\"\n           << \"                  \\r\" << flush;\n      partitions.push_back(partition);\n      if (partition.size() == preprocessed_inputfiles.size() || actual_efficiency == 1.0f) {\n        break;\n      }\n      required_efficiency_to_beat = actual_efficiency;\n    }\n    cerr << \"                                                                  \" << endl;\n    while (true) {\n      bool repeat = false;\n      for (size_t i = 0; i < partitions.size() - 1; i++) {\n        if (partitions[i].size() >= partitions[i+1].size()) {\n          partitions.erase(partitions.begin() + i);\n          repeat = true;\n          break;\n        }\n      }\n      if (!repeat) {\n        break;\n      }\n    }\n    for (auto it = partitions.begin(); it != partitions.end(); ++it) {\n      print_partition(preprocessed_inputfiles, *it);\n    }\n  }\n};\n\nstruct evaluate_defaults_action_t : action_t\n{\n  struct results_entry_t {\n    uint16_t product_size;\n    size_triple_t default_block_size;\n    uint16_t best_pot_block_size;\n    float default_gflops;\n    float best_pot_gflops;\n    float default_efficiency;\n  };\n  friend ostream& operator<<(ostream& s, const results_entry_t& entry)\n  {\n    return s\n      << \"Product size \" << size_triple_t(entry.product_size)\n      << \": default block size \" << entry.default_block_size\n      << \" -> \" << entry.default_gflops\n      << \" GFlop/s = \" << entry.default_efficiency * 100.0f << \" %\"\n      << \" of best POT block size \" << size_triple_t(entry.best_pot_block_size)\n      << \" -> \" << entry.best_pot_gflops\n      << \" GFlop/s\" << dec;\n  }\n  static bool lower_efficiency(const results_entry_t& e1, const results_entry_t& e2) {\n    return e1.default_efficiency < e2.default_efficiency;\n  }\n  virtual const char* invokation_name() const override { return \"evaluate-defaults\"; }\n  void show_usage_and_exit() const\n  {\n    cerr << \"usage: \" << invokation_name() << \" default-sizes-data all-pot-sizes-data\" << endl;\n    cerr << \"checks how well the performance with default sizes compares to the best \"\n         << \"performance measured over all POT sizes.\" << endl;\n    exit(1);\n  }\n  virtual void run(const vector<string>& input_filenames) const override\n  {\n    if (input_filenames.size() != 2) {\n      show_usage_and_exit();\n    }\n    inputfile_t inputfile_default_sizes(input_filenames[0]);\n    inputfile_t inputfile_all_pot_sizes(input_filenames[1]);\n    if (inputfile_default_sizes.type != inputfile_t::type_t::default_sizes) {\n      cerr << inputfile_default_sizes.filename << \" is not an input file with default sizes.\" << endl;\n      show_usage_and_exit();\n    }\n    if (inputfile_all_pot_sizes.type != inputfile_t::type_t::all_pot_sizes) {\n      cerr << inputfile_all_pot_sizes.filename << \" is not an input file with all POT sizes.\" << endl;\n      show_usage_and_exit();\n    }\n    vector<results_entry_t> results;\n    vector<results_entry_t> cubic_results;\n    \n    uint16_t product_size = 0;\n    auto it_all_pot_sizes = inputfile_all_pot_sizes.entries.begin();\n    for (auto it_default_sizes = inputfile_default_sizes.entries.begin();\n         it_default_sizes != inputfile_default_sizes.entries.end();\n         ++it_default_sizes)\n    {\n      if (it_default_sizes->product_size == product_size) {\n        continue;\n      }\n      product_size = it_default_sizes->product_size;\n      while (it_all_pot_sizes != inputfile_all_pot_sizes.entries.end() &&\n             it_all_pot_sizes->product_size != product_size)\n      {\n        ++it_all_pot_sizes;\n      }\n      if (it_all_pot_sizes == inputfile_all_pot_sizes.entries.end()) {\n        break;\n      }\n      uint16_t best_pot_block_size = 0;\n      float best_pot_gflops = 0;\n      for (auto it = it_all_pot_sizes;\n           it != inputfile_all_pot_sizes.entries.end() && it->product_size == product_size;\n           ++it)\n      {\n        if (it->gflops > best_pot_gflops) {\n          best_pot_gflops = it->gflops;\n          best_pot_block_size = it->pot_block_size;\n        }\n      }\n      results_entry_t entry;\n      entry.product_size = product_size;\n      entry.default_block_size = it_default_sizes->nonpot_block_size;\n      entry.best_pot_block_size = best_pot_block_size;\n      entry.default_gflops = it_default_sizes->gflops;\n      entry.best_pot_gflops = best_pot_gflops;\n      entry.default_efficiency = entry.default_gflops / entry.best_pot_gflops;\n      results.push_back(entry);\n\n      size_triple_t t(product_size);\n      if (t.k == t.m && t.m == t.n) {\n        cubic_results.push_back(entry);\n      }\n    }\n\n    cout << \"All results:\" << endl;\n    for (auto it = results.begin(); it != results.end(); ++it) {\n      cout << *it << endl;\n    }\n    cout << endl;\n\n    sort(results.begin(), results.end(), lower_efficiency);\n    \n    const size_t n = min<size_t>(20, results.size());\n    cout << n << \" worst results:\" << endl;\n    for (size_t i = 0; i < n; i++) {\n      cout << results[i] << endl;\n    }\n    cout << endl;\n\n    cout << \"cubic results:\" << endl;\n    for (auto it = cubic_results.begin(); it != cubic_results.end(); ++it) {\n      cout << *it << endl;\n    }\n    cout << endl;\n\n    sort(cubic_results.begin(), cubic_results.end(), lower_efficiency);\n    \n    cout.precision(2);\n    vector<float> a = {0.5f, 0.20f, 0.10f, 0.05f, 0.02f, 0.01f};\n    for (auto it = a.begin(); it != a.end(); ++it) {\n      size_t n = min(results.size() - 1, size_t(*it * results.size()));\n      cout << (100.0f * n / (results.size() - 1))\n           << \" % of product sizes have default efficiency <= \"\n           << 100.0f * results[n].default_efficiency << \" %\" << endl;\n    }\n    cout.precision(default_precision);\n  }\n};\n\n\nvoid show_usage_and_exit(int argc, char* argv[],\n                         const vector<unique_ptr<action_t>>& available_actions)\n{\n  cerr << \"usage: \" << argv[0] << \" <action> [options...] <input files...>\" << endl;\n  cerr << \"available actions:\" << endl;\n  for (auto it = available_actions.begin(); it != available_actions.end(); ++it) {\n    cerr << \"  \" << (*it)->invokation_name() << endl;\n  } \n  cerr << \"the input files should each contain an output of benchmark-blocking-sizes\" << endl;\n  exit(1);\n}\n\nint main(int argc, char* argv[])\n{\n  cout.precision(default_precision);\n  cerr.precision(default_precision);\n\n  vector<unique_ptr<action_t>> available_actions;\n  available_actions.emplace_back(new partition_action_t);\n  available_actions.emplace_back(new evaluate_defaults_action_t);\n\n  vector<string> input_filenames;\n\n  action_t* action = nullptr;\n\n  if (argc < 2) {\n    show_usage_and_exit(argc, argv, available_actions);\n  }\n  for (int i = 1; i < argc; i++) {\n    bool arg_handled = false;\n    // Step 1. Try to match action invocation names.\n    for (auto it = available_actions.begin(); it != available_actions.end(); ++it) {\n      if (!strcmp(argv[i], (*it)->invokation_name())) {\n        if (!action) {\n          action = it->get();\n          arg_handled = true;\n          break;\n        } else {\n          cerr << \"can't specify more than one action!\" << endl;\n          show_usage_and_exit(argc, argv, available_actions);\n        }\n      }\n    }\n    if (arg_handled) {\n      continue;\n    }\n    // Step 2. Try to match option names.\n    if (argv[i][0] == '-') {\n      if (!strcmp(argv[i], \"--only-cubic-sizes\")) {\n        only_cubic_sizes = true;\n        arg_handled = true;\n      }\n      if (!strcmp(argv[i], \"--dump-tables\")) {\n        dump_tables = true;\n        arg_handled = true;\n      }\n      if (!arg_handled) {\n        cerr << \"Unrecognized option: \" << argv[i] << endl;\n        show_usage_and_exit(argc, argv, available_actions);\n      }\n    }\n    if (arg_handled) {\n      continue;\n    }\n    // Step 3. Default to interpreting args as input filenames.\n    input_filenames.emplace_back(argv[i]);\n  }\n\n  if (dump_tables && only_cubic_sizes) {\n    cerr << \"Incompatible options: --only-cubic-sizes and --dump-tables.\" << endl;\n    show_usage_and_exit(argc, argv, available_actions);\n  }\n\n  if (!action) {\n    show_usage_and_exit(argc, argv, available_actions);\n  }\n\n  action->run(input_filenames);\n}\n"
  },
  {
    "path": "3rdparty/eigen3/bench/basicbench.cxxlist",
    "content": "#!/bin/bash\n\n# CLIST[((g++))]=\"g++-3.4 -O3 -DNDEBUG\"\n# CLIST[((g++))]=\"g++-3.4 -O3 -DNDEBUG -finline-limit=20000\"\n\n# CLIST[((g++))]=\"g++-4.1 -O3 -DNDEBUG\"\n#CLIST[((g++))]=\"g++-4.1 -O3 -DNDEBUG -finline-limit=20000\"\n\n# CLIST[((g++))]=\"g++-4.2 -O3 -DNDEBUG\"\n#CLIST[((g++))]=\"g++-4.2 -O3 -DNDEBUG -finline-limit=20000\"\n# CLIST[((g++))]=\"g++-4.2 -O3 -DNDEBUG -finline-limit=20000 -fprofile-generate\"\n# CLIST[((g++))]=\"g++-4.2 -O3 -DNDEBUG -finline-limit=20000 -fprofile-use\"\n\n# CLIST[((g++))]=\"g++-4.3 -O3 -DNDEBUG\"\n#CLIST[((g++))]=\"g++-4.3 -O3 -DNDEBUG -finline-limit=20000\"\n# CLIST[((g++))]=\"g++-4.3 -O3 -DNDEBUG -finline-limit=20000 -fprofile-generate\"\n# CLIST[((g++))]=\"g++-4.3 -O3 -DNDEBUG -finline-limit=20000 -fprofile-use\"\n\n# CLIST[((g++))]=\"icpc -fast -DNDEBUG -fno-exceptions -no-inline-max-size -prof-genx\"\n# CLIST[((g++))]=\"icpc -fast -DNDEBUG -fno-exceptions -no-inline-max-size -prof-use\"\n\n#CLIST[((g++))]=\"/opt/intel/Compiler/11.1/072/bin/intel64/icpc -fast -DNDEBUG -fno-exceptions -no-inline-max-size -lrt\"\nCLIST[((g++))]=\"/home/orzel/svn/llvm/Release/bin/clang++ -O3 -DNDEBUG -DEIGEN_DONT_VECTORIZE -lrt\"\nCLIST[((g++))]=\"/home/orzel/svn/llvm/Release/bin/clang++ -O3 -DNDEBUG -lrt\"\nCLIST[((g++))]=\"g++-4.4.4 -O3 -DNDEBUG -DEIGEN_DONT_VECTORIZE -lrt\"\nCLIST[((g++))]=\"g++-4.4.4 -O3 -DNDEBUG -lrt\"\nCLIST[((g++))]=\"g++-4.5.0 -O3 -DNDEBUG -DEIGEN_DONT_VECTORIZE -lrt\"\nCLIST[((g++))]=\"g++-4.5.0 -O3 -DNDEBUG -lrt\"\n"
  },
  {
    "path": "3rdparty/eigen3/bench/basicbenchmark.cpp",
    "content": "\n#include <iostream>\n#include \"BenchUtil.h\"\n#include \"basicbenchmark.h\"\n\nint main(int argc, char *argv[])\n{\n  DISABLE_SSE_EXCEPTIONS();\n\n  // this is the list of matrix type and size we want to bench:\n  // ((suffix) (matrix size) (number of iterations))\n  #define MODES ((3d)(3)(4000000)) ((4d)(4)(1000000)) ((Xd)(4)(1000000)) ((Xd)(20)(10000))\n//   #define MODES ((Xd)(20)(10000))\n\n  #define _GENERATE_HEADER(R,ARG,EL) << BOOST_PP_STRINGIZE(BOOST_PP_SEQ_HEAD(EL)) << \"-\" \\\n    << BOOST_PP_STRINGIZE(BOOST_PP_SEQ_ELEM(1,EL)) << \"x\" \\\n    << BOOST_PP_STRINGIZE(BOOST_PP_SEQ_ELEM(1,EL)) << \"   /   \"\n\n  std::cout BOOST_PP_SEQ_FOR_EACH(_GENERATE_HEADER, ~, MODES ) << endl;\n\n  const int tries = 10;\n\n  #define _RUN_BENCH(R,ARG,EL) \\\n    std::cout << ARG( \\\n      BOOST_PP_CAT(Matrix, BOOST_PP_SEQ_HEAD(EL)) (\\\n         BOOST_PP_SEQ_ELEM(1,EL),BOOST_PP_SEQ_ELEM(1,EL)), BOOST_PP_SEQ_ELEM(2,EL), tries) \\\n    << \"   \";\n\n  BOOST_PP_SEQ_FOR_EACH(_RUN_BENCH, benchBasic<LazyEval>, MODES );\n  std::cout << endl;\n  BOOST_PP_SEQ_FOR_EACH(_RUN_BENCH, benchBasic<EarlyEval>, MODES );\n  std::cout << endl;\n\n  return 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/bench/basicbenchmark.h",
    "content": "\n#ifndef EIGEN_BENCH_BASICBENCH_H\n#define EIGEN_BENCH_BASICBENCH_H\n\nenum {LazyEval, EarlyEval, OmpEval};\n\ntemplate<int Mode, typename MatrixType>\nvoid benchBasic_loop(const MatrixType& I, MatrixType& m, int iterations) __attribute__((noinline));\n\ntemplate<int Mode, typename MatrixType>\nvoid benchBasic_loop(const MatrixType& I, MatrixType& m, int iterations)\n{\n  for(int a = 0; a < iterations; a++)\n  {\n    if (Mode==LazyEval)\n    {\n      asm(\"#begin_bench_loop LazyEval\");\n      if (MatrixType::SizeAtCompileTime!=Eigen::Dynamic) asm(\"#fixedsize\");\n      m = (I + 0.00005 * (m + m.lazy() * m)).eval();\n    }\n    else if (Mode==OmpEval)\n    {\n      asm(\"#begin_bench_loop OmpEval\");\n      if (MatrixType::SizeAtCompileTime!=Eigen::Dynamic) asm(\"#fixedsize\");\n      m = (I + 0.00005 * (m + m.lazy() * m)).evalOMP();\n    }\n    else\n    {\n      asm(\"#begin_bench_loop EarlyEval\");\n      if (MatrixType::SizeAtCompileTime!=Eigen::Dynamic) asm(\"#fixedsize\");\n      m = I + 0.00005 * (m + m * m);\n    }\n    asm(\"#end_bench_loop\");\n  }\n}\n\ntemplate<int Mode, typename MatrixType>\ndouble benchBasic(const MatrixType& mat, int size, int tries) __attribute__((noinline));\n\ntemplate<int Mode, typename MatrixType>\ndouble benchBasic(const MatrixType& mat, int iterations, int tries)\n{\n  const int rows = mat.rows();\n  const int cols = mat.cols();\n\n  MatrixType I(rows,cols);\n  MatrixType m(rows,cols);\n\n  initMatrix_identity(I);\n\n  Eigen::BenchTimer timer;\n  for(uint t=0; t<tries; ++t)\n  {\n    initMatrix_random(m);\n    timer.start();\n    benchBasic_loop<Mode>(I, m, iterations);\n    timer.stop();\n    cerr << m;\n  }\n  return timer.value();\n};\n\n#endif // EIGEN_BENCH_BASICBENCH_H\n"
  },
  {
    "path": "3rdparty/eigen3/bench/benchBlasGemm.cpp",
    "content": "// g++ -O3 -DNDEBUG -I.. -L /usr/lib64/atlas/ benchBlasGemm.cpp -o benchBlasGemm -lrt -lcblas\n// possible options:\n//    -DEIGEN_DONT_VECTORIZE\n//    -msse2\n\n// #define EIGEN_DEFAULT_TO_ROW_MAJOR\n#define _FLOAT\n\n#include <iostream>\n\n#include <Eigen/Core>\n#include \"BenchTimer.h\"\n\n// include the BLAS headers\nextern \"C\" {\n#include <cblas.h>\n}\n#include <string>\n\n#ifdef _FLOAT\ntypedef float Scalar;\n#define CBLAS_GEMM cblas_sgemm\n#else\ntypedef double Scalar;\n#define CBLAS_GEMM cblas_dgemm\n#endif\n\n\ntypedef Eigen::Matrix<Scalar,Eigen::Dynamic,Eigen::Dynamic> MyMatrix;\nvoid bench_eigengemm(MyMatrix& mc, const MyMatrix& ma, const MyMatrix& mb, int nbloops);\nvoid check_product(int M, int N, int K);\nvoid check_product(void);\n\nint main(int argc, char *argv[])\n{\n  // disable SSE exceptions\n  #ifdef __GNUC__\n  {\n    int aux;\n    asm(\n    \"stmxcsr   %[aux]           \\n\\t\"\n    \"orl       $32832, %[aux]   \\n\\t\"\n    \"ldmxcsr   %[aux]           \\n\\t\"\n    : : [aux] \"m\" (aux));\n  }\n  #endif\n\n  int nbtries=1, nbloops=1, M, N, K;\n\n  if (argc==2)\n  {\n    if (std::string(argv[1])==\"check\")\n      check_product();\n    else\n      M = N = K = atoi(argv[1]);\n  }\n  else if ((argc==3) && (std::string(argv[1])==\"auto\"))\n  {\n    M = N = K = atoi(argv[2]);\n    nbloops = 1000000000/(M*M*M);\n    if (nbloops<1)\n      nbloops = 1;\n    nbtries = 6;\n  }\n  else if (argc==4)\n  {\n    M = N = K = atoi(argv[1]);\n    nbloops = atoi(argv[2]);\n    nbtries = atoi(argv[3]);\n  }\n  else if (argc==6)\n  {\n    M = atoi(argv[1]);\n    N = atoi(argv[2]);\n    K = atoi(argv[3]);\n    nbloops = atoi(argv[4]);\n    nbtries = atoi(argv[5]);\n  }\n  else\n  {\n    std::cout << \"Usage: \" << argv[0] << \" size  \\n\";\n    std::cout << \"Usage: \" << argv[0] << \" auto size\\n\";\n    std::cout << \"Usage: \" << argv[0] << \" size nbloops nbtries\\n\";\n    std::cout << \"Usage: \" << argv[0] << \" M N K nbloops nbtries\\n\";\n    std::cout << \"Usage: \" << argv[0] << \" check\\n\";\n    std::cout << \"Options:\\n\";\n    std::cout << \"    size       unique size of the 2 matrices (integer)\\n\";\n    std::cout << \"    auto       automatically set the number of repetitions and tries\\n\";\n    std::cout << \"    nbloops    number of times the GEMM routines is executed\\n\";\n    std::cout << \"    nbtries    number of times the loop is benched (return the best try)\\n\";\n    std::cout << \"    M N K      sizes of the matrices: MxN  =  MxK * KxN (integers)\\n\";\n    std::cout << \"    check      check eigen product using cblas as a reference\\n\";\n    exit(1);\n  }\n\n  double nbmad = double(M) * double(N) * double(K) * double(nbloops);\n\n  if (!(std::string(argv[1])==\"auto\"))\n    std::cout << M << \" x \" << N << \" x \" << K << \"\\n\";\n\n  Scalar alpha, beta;\n  MyMatrix ma(M,K), mb(K,N), mc(M,N);\n  ma = MyMatrix::Random(M,K);\n  mb = MyMatrix::Random(K,N);\n  mc = MyMatrix::Random(M,N);\n\n  Eigen::BenchTimer timer;\n\n  // we simply compute c += a*b, so:\n  alpha = 1;\n  beta = 1;\n\n  // bench cblas\n  // ROWS_A, COLS_B, COLS_A, 1.0,  A, COLS_A, B, COLS_B, 0.0, C, COLS_B);\n  if (!(std::string(argv[1])==\"auto\"))\n  {\n    timer.reset();\n    for (uint k=0 ; k<nbtries ; ++k)\n    {\n        timer.start();\n        for (uint j=0 ; j<nbloops ; ++j)\n              #ifdef EIGEN_DEFAULT_TO_ROW_MAJOR\n              CBLAS_GEMM(CblasRowMajor, CblasNoTrans, CblasNoTrans, M, N, K, alpha, ma.data(), K, mb.data(), N, beta, mc.data(), N);\n              #else\n              CBLAS_GEMM(CblasColMajor, CblasNoTrans, CblasNoTrans, M, N, K, alpha, ma.data(), M, mb.data(), K, beta, mc.data(), M);\n              #endif\n        timer.stop();\n    }\n    if (!(std::string(argv[1])==\"auto\"))\n      std::cout << \"cblas: \" << timer.value() << \" (\" << 1e-3*floor(1e-6*nbmad/timer.value()) << \" GFlops/s)\\n\";\n    else\n        std::cout << M << \" : \" << timer.value() << \" ; \" << 1e-3*floor(1e-6*nbmad/timer.value()) << \"\\n\";\n  }\n\n  // clear\n  ma = MyMatrix::Random(M,K);\n  mb = MyMatrix::Random(K,N);\n  mc = MyMatrix::Random(M,N);\n\n  // eigen\n//   if (!(std::string(argv[1])==\"auto\"))\n  {\n      timer.reset();\n      for (uint k=0 ; k<nbtries ; ++k)\n      {\n          timer.start();\n          bench_eigengemm(mc, ma, mb, nbloops);\n          timer.stop();\n      }\n      if (!(std::string(argv[1])==\"auto\"))\n        std::cout << \"eigen : \" << timer.value() << \" (\" << 1e-3*floor(1e-6*nbmad/timer.value()) << \" GFlops/s)\\n\";\n      else\n        std::cout << M << \" : \" << timer.value() << \" ; \" << 1e-3*floor(1e-6*nbmad/timer.value()) << \"\\n\";\n  }\n\n  std::cout << \"l1: \" << Eigen::l1CacheSize() << std::endl;\n  std::cout << \"l2: \" << Eigen::l2CacheSize() << std::endl;\n  \n\n  return 0;\n}\n\nusing namespace Eigen;\n\nvoid bench_eigengemm(MyMatrix& mc, const MyMatrix& ma, const MyMatrix& mb, int nbloops)\n{\n  for (uint j=0 ; j<nbloops ; ++j)\n      mc.noalias() += ma * mb;\n}\n\n#define MYVERIFY(A,M) if (!(A)) { \\\n    std::cout << \"FAIL: \" << M << \"\\n\"; \\\n  }\nvoid check_product(int M, int N, int K)\n{\n  MyMatrix ma(M,K), mb(K,N), mc(M,N), maT(K,M), mbT(N,K), meigen(M,N), mref(M,N);\n  ma = MyMatrix::Random(M,K);\n  mb = MyMatrix::Random(K,N);\n  maT = ma.transpose();\n  mbT = mb.transpose();\n  mc = MyMatrix::Random(M,N);\n\n  MyMatrix::Scalar eps = 1e-4;\n\n  meigen = mref = mc;\n  CBLAS_GEMM(CblasColMajor, CblasNoTrans, CblasNoTrans, M, N, K, 1, ma.data(), M, mb.data(), K, 1, mref.data(), M);\n  meigen += ma * mb;\n  MYVERIFY(meigen.isApprox(mref, eps),\". * .\");\n\n  meigen = mref = mc;\n  CBLAS_GEMM(CblasColMajor, CblasTrans, CblasNoTrans, M, N, K, 1, maT.data(), K, mb.data(), K, 1, mref.data(), M);\n  meigen += maT.transpose() * mb;\n  MYVERIFY(meigen.isApprox(mref, eps),\"T * .\");\n\n  meigen = mref = mc;\n  CBLAS_GEMM(CblasColMajor, CblasTrans, CblasTrans, M, N, K, 1, maT.data(), K, mbT.data(), N, 1, mref.data(), M);\n  meigen += (maT.transpose()) * (mbT.transpose());\n  MYVERIFY(meigen.isApprox(mref, eps),\"T * T\");\n\n  meigen = mref = mc;\n  CBLAS_GEMM(CblasColMajor, CblasNoTrans, CblasTrans, M, N, K, 1, ma.data(), M, mbT.data(), N, 1, mref.data(), M);\n  meigen += ma * mbT.transpose();\n  MYVERIFY(meigen.isApprox(mref, eps),\". * T\");\n}\n\nvoid check_product(void)\n{\n  int M, N, K;\n  for (uint i=0; i<1000; ++i)\n  {\n    M = internal::random<int>(1,64);\n    N = internal::random<int>(1,768);\n    K = internal::random<int>(1,768);\n    M = (0 + M) * 1;\n    std::cout << M << \" x \" << N << \" x \" << K << \"\\n\";\n    check_product(M, N, K);\n  }\n}\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/benchCholesky.cpp",
    "content": "\n// g++ -DNDEBUG -O3 -I.. benchLLT.cpp  -o benchLLT && ./benchLLT\n// options:\n//  -DBENCH_GSL -lgsl /usr/lib/libcblas.so.3\n//  -DEIGEN_DONT_VECTORIZE\n//  -msse2\n//  -DREPEAT=100\n//  -DTRIES=10\n//  -DSCALAR=double\n\n#include <iostream>\n\n#include <Eigen/Core>\n#include <Eigen/Cholesky>\n#include <bench/BenchUtil.h>\nusing namespace Eigen;\n\n#ifndef REPEAT\n#define REPEAT 10000\n#endif\n\n#ifndef TRIES\n#define TRIES 10\n#endif\n\ntypedef float Scalar;\n\ntemplate <typename MatrixType>\n__attribute__ ((noinline)) void benchLLT(const MatrixType& m)\n{\n  int rows = m.rows();\n  int cols = m.cols();\n\n  double cost = 0;\n  for (int j=0; j<rows; ++j)\n  {\n    int r = std::max(rows - j -1,0);\n    cost += 2*(r*j+r+j);\n  }\n\n  int repeats = (REPEAT*1000)/(rows*rows);\n\n  typedef typename MatrixType::Scalar Scalar;\n  typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime> SquareMatrixType;\n\n  MatrixType a = MatrixType::Random(rows,cols);\n  SquareMatrixType covMat =  a * a.adjoint();\n\n  BenchTimer timerNoSqrt, timerSqrt;\n\n  Scalar acc = 0;\n  int r = internal::random<int>(0,covMat.rows()-1);\n  int c = internal::random<int>(0,covMat.cols()-1);\n  for (int t=0; t<TRIES; ++t)\n  {\n    timerNoSqrt.start();\n    for (int k=0; k<repeats; ++k)\n    {\n      LDLT<SquareMatrixType> cholnosqrt(covMat);\n      acc += cholnosqrt.matrixL().coeff(r,c);\n    }\n    timerNoSqrt.stop();\n  }\n\n  for (int t=0; t<TRIES; ++t)\n  {\n    timerSqrt.start();\n    for (int k=0; k<repeats; ++k)\n    {\n      LLT<SquareMatrixType> chol(covMat);\n      acc += chol.matrixL().coeff(r,c);\n    }\n    timerSqrt.stop();\n  }\n\n  if (MatrixType::RowsAtCompileTime==Dynamic)\n    std::cout << \"dyn   \";\n  else\n    std::cout << \"fixed \";\n  std::cout << covMat.rows() << \" \\t\"\n            << (timerNoSqrt.best()) / repeats << \"s \"\n            << \"(\" << 1e-9 * cost*repeats/timerNoSqrt.best() << \" GFLOPS)\\t\"\n            << (timerSqrt.best()) / repeats << \"s \"\n            << \"(\" << 1e-9 * cost*repeats/timerSqrt.best() << \" GFLOPS)\\n\";\n\n\n  #ifdef BENCH_GSL\n  if (MatrixType::RowsAtCompileTime==Dynamic)\n  {\n    timerSqrt.reset();\n\n    gsl_matrix* gslCovMat = gsl_matrix_alloc(covMat.rows(),covMat.cols());\n    gsl_matrix* gslCopy = gsl_matrix_alloc(covMat.rows(),covMat.cols());\n\n    eiToGsl(covMat, &gslCovMat);\n    for (int t=0; t<TRIES; ++t)\n    {\n      timerSqrt.start();\n      for (int k=0; k<repeats; ++k)\n      {\n        gsl_matrix_memcpy(gslCopy,gslCovMat);\n        gsl_linalg_cholesky_decomp(gslCopy);\n        acc += gsl_matrix_get(gslCopy,r,c);\n      }\n      timerSqrt.stop();\n    }\n\n    std::cout << \" | \\t\"\n              << timerSqrt.value() * REPEAT / repeats << \"s\";\n\n    gsl_matrix_free(gslCovMat);\n  }\n  #endif\n  std::cout << \"\\n\";\n  // make sure the compiler does not optimize too much\n  if (acc==123)\n    std::cout << acc;\n}\n\nint main(int argc, char* argv[])\n{\n  const int dynsizes[] = {4,6,8,16,24,32,49,64,128,256,512,900,1500,0};\n  std::cout << \"size            LDLT                            LLT\";\n//   #ifdef BENCH_GSL\n//   std::cout << \"       GSL (standard + double + ATLAS)  \";\n//   #endif\n  std::cout << \"\\n\";\n  for (int i=0; dynsizes[i]>0; ++i)\n    benchLLT(Matrix<Scalar,Dynamic,Dynamic>(dynsizes[i],dynsizes[i]));\n\n  benchLLT(Matrix<Scalar,2,2>());\n  benchLLT(Matrix<Scalar,3,3>());\n  benchLLT(Matrix<Scalar,4,4>());\n  benchLLT(Matrix<Scalar,5,5>());\n  benchLLT(Matrix<Scalar,6,6>());\n  benchLLT(Matrix<Scalar,7,7>());\n  benchLLT(Matrix<Scalar,8,8>());\n  benchLLT(Matrix<Scalar,12,12>());\n  benchLLT(Matrix<Scalar,16,16>());\n  return 0;\n}\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/benchEigenSolver.cpp",
    "content": "\n// g++ -DNDEBUG -O3 -I.. benchEigenSolver.cpp  -o benchEigenSolver && ./benchEigenSolver\n// options:\n//  -DBENCH_GMM\n//  -DBENCH_GSL -lgsl /usr/lib/libcblas.so.3\n//  -DEIGEN_DONT_VECTORIZE\n//  -msse2\n//  -DREPEAT=100\n//  -DTRIES=10\n//  -DSCALAR=double\n\n#include <iostream>\n\n#include <Eigen/Core>\n#include <Eigen/QR>\n#include <bench/BenchUtil.h>\nusing namespace Eigen;\n\n#ifndef REPEAT\n#define REPEAT 1000\n#endif\n\n#ifndef TRIES\n#define TRIES 4\n#endif\n\n#ifndef SCALAR\n#define SCALAR float\n#endif\n\ntypedef SCALAR Scalar;\n\ntemplate <typename MatrixType>\n__attribute__ ((noinline)) void benchEigenSolver(const MatrixType& m)\n{\n  int rows = m.rows();\n  int cols = m.cols();\n\n  int stdRepeats = std::max(1,int((REPEAT*1000)/(rows*rows*sqrt(rows))));\n  int saRepeats = stdRepeats * 4;\n\n  typedef typename MatrixType::Scalar Scalar;\n  typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime> SquareMatrixType;\n\n  MatrixType a = MatrixType::Random(rows,cols);\n  SquareMatrixType covMat =  a * a.adjoint();\n\n  BenchTimer timerSa, timerStd;\n\n  Scalar acc = 0;\n  int r = internal::random<int>(0,covMat.rows()-1);\n  int c = internal::random<int>(0,covMat.cols()-1);\n  {\n    SelfAdjointEigenSolver<SquareMatrixType> ei(covMat);\n    for (int t=0; t<TRIES; ++t)\n    {\n      timerSa.start();\n      for (int k=0; k<saRepeats; ++k)\n      {\n        ei.compute(covMat);\n        acc += ei.eigenvectors().coeff(r,c);\n      }\n      timerSa.stop();\n    }\n  }\n\n  {\n    EigenSolver<SquareMatrixType> ei(covMat);\n    for (int t=0; t<TRIES; ++t)\n    {\n      timerStd.start();\n      for (int k=0; k<stdRepeats; ++k)\n      {\n        ei.compute(covMat);\n        acc += ei.eigenvectors().coeff(r,c);\n      }\n      timerStd.stop();\n    }\n  }\n\n  if (MatrixType::RowsAtCompileTime==Dynamic)\n    std::cout << \"dyn   \";\n  else\n    std::cout << \"fixed \";\n  std::cout << covMat.rows() << \" \\t\"\n            << timerSa.value() * REPEAT / saRepeats << \"s \\t\"\n            << timerStd.value() * REPEAT / stdRepeats << \"s\";\n\n  #ifdef BENCH_GMM\n  if (MatrixType::RowsAtCompileTime==Dynamic)\n  {\n    timerSa.reset();\n    timerStd.reset();\n\n    gmm::dense_matrix<Scalar> gmmCovMat(covMat.rows(),covMat.cols());\n    gmm::dense_matrix<Scalar> eigvect(covMat.rows(),covMat.cols());\n    std::vector<Scalar> eigval(covMat.rows());\n    eiToGmm(covMat, gmmCovMat);\n    for (int t=0; t<TRIES; ++t)\n    {\n      timerSa.start();\n      for (int k=0; k<saRepeats; ++k)\n      {\n        gmm::symmetric_qr_algorithm(gmmCovMat, eigval, eigvect);\n        acc += eigvect(r,c);\n      }\n      timerSa.stop();\n    }\n    // the non-selfadjoint solver does not compute the eigen vectors\n//     for (int t=0; t<TRIES; ++t)\n//     {\n//       timerStd.start();\n//       for (int k=0; k<stdRepeats; ++k)\n//       {\n//         gmm::implicit_qr_algorithm(gmmCovMat, eigval, eigvect);\n//         acc += eigvect(r,c);\n//       }\n//       timerStd.stop();\n//     }\n\n    std::cout << \" | \\t\"\n              << timerSa.value() * REPEAT / saRepeats << \"s\"\n              << /*timerStd.value() * REPEAT / stdRepeats << \"s\"*/ \"   na   \";\n  }\n  #endif\n\n  #ifdef BENCH_GSL\n  if (MatrixType::RowsAtCompileTime==Dynamic)\n  {\n    timerSa.reset();\n    timerStd.reset();\n\n    gsl_matrix* gslCovMat = gsl_matrix_alloc(covMat.rows(),covMat.cols());\n    gsl_matrix* gslCopy = gsl_matrix_alloc(covMat.rows(),covMat.cols());\n    gsl_matrix* eigvect = gsl_matrix_alloc(covMat.rows(),covMat.cols());\n    gsl_vector* eigval  = gsl_vector_alloc(covMat.rows());\n    gsl_eigen_symmv_workspace* eisymm = gsl_eigen_symmv_alloc(covMat.rows());\n    \n    gsl_matrix_complex* eigvectz = gsl_matrix_complex_alloc(covMat.rows(),covMat.cols());\n    gsl_vector_complex* eigvalz  = gsl_vector_complex_alloc(covMat.rows());\n    gsl_eigen_nonsymmv_workspace* einonsymm = gsl_eigen_nonsymmv_alloc(covMat.rows());\n    \n    eiToGsl(covMat, &gslCovMat);\n    for (int t=0; t<TRIES; ++t)\n    {\n      timerSa.start();\n      for (int k=0; k<saRepeats; ++k)\n      {\n        gsl_matrix_memcpy(gslCopy,gslCovMat);\n        gsl_eigen_symmv(gslCopy, eigval, eigvect, eisymm);\n        acc += gsl_matrix_get(eigvect,r,c);\n      }\n      timerSa.stop();\n    }\n    for (int t=0; t<TRIES; ++t)\n    {\n      timerStd.start();\n      for (int k=0; k<stdRepeats; ++k)\n      {\n        gsl_matrix_memcpy(gslCopy,gslCovMat);\n        gsl_eigen_nonsymmv(gslCopy, eigvalz, eigvectz, einonsymm);\n        acc += GSL_REAL(gsl_matrix_complex_get(eigvectz,r,c));\n      }\n      timerStd.stop();\n    }\n\n    std::cout << \" | \\t\"\n              << timerSa.value() * REPEAT / saRepeats << \"s \\t\"\n              << timerStd.value() * REPEAT / stdRepeats << \"s\";\n\n    gsl_matrix_free(gslCovMat);\n    gsl_vector_free(gslCopy);\n    gsl_matrix_free(eigvect);\n    gsl_vector_free(eigval);\n    gsl_matrix_complex_free(eigvectz);\n    gsl_vector_complex_free(eigvalz);\n    gsl_eigen_symmv_free(eisymm);\n    gsl_eigen_nonsymmv_free(einonsymm);\n  }\n  #endif\n\n  std::cout << \"\\n\";\n  \n  // make sure the compiler does not optimize too much\n  if (acc==123)\n    std::cout << acc;\n}\n\nint main(int argc, char* argv[])\n{\n  const int dynsizes[] = {4,6,8,12,16,24,32,64,128,256,512,0};\n  std::cout << \"size            selfadjoint       generic\";\n  #ifdef BENCH_GMM\n  std::cout << \"        GMM++          \";\n  #endif\n  #ifdef BENCH_GSL\n  std::cout << \"       GSL (double + ATLAS)  \";\n  #endif\n  std::cout << \"\\n\";\n  for (uint i=0; dynsizes[i]>0; ++i)\n    benchEigenSolver(Matrix<Scalar,Dynamic,Dynamic>(dynsizes[i],dynsizes[i]));\n\n  benchEigenSolver(Matrix<Scalar,2,2>());\n  benchEigenSolver(Matrix<Scalar,3,3>());\n  benchEigenSolver(Matrix<Scalar,4,4>());\n  benchEigenSolver(Matrix<Scalar,6,6>());\n  benchEigenSolver(Matrix<Scalar,8,8>());\n  benchEigenSolver(Matrix<Scalar,12,12>());\n  benchEigenSolver(Matrix<Scalar,16,16>());\n  return 0;\n}\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/benchFFT.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Mark Borgerding mark a borgerding net\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include <iostream>\n\n#include <bench/BenchUtil.h>\n#include <complex>\n#include <vector>\n#include <Eigen/Core>\n\n#include <unsupported/Eigen/FFT>\n\nusing namespace Eigen;\nusing namespace std;\n\n\ntemplate <typename T>\nstring nameof();\n\ntemplate <> string nameof<float>() {return \"float\";}\ntemplate <> string nameof<double>() {return \"double\";}\ntemplate <> string nameof<long double>() {return \"long double\";}\n\n#ifndef TYPE\n#define TYPE float\n#endif\n\n#ifndef NFFT\n#define NFFT 1024\n#endif\n#ifndef NDATA\n#define NDATA 1000000\n#endif\n\nusing namespace Eigen;\n\ntemplate <typename T>\nvoid bench(int nfft,bool fwd,bool unscaled=false, bool halfspec=false)\n{\n    typedef typename NumTraits<T>::Real Scalar;\n    typedef typename std::complex<Scalar> Complex;\n    int nits = NDATA/nfft;\n    vector<T> inbuf(nfft);\n    vector<Complex > outbuf(nfft);\n    FFT< Scalar > fft;\n\n    if (unscaled) {\n        fft.SetFlag(fft.Unscaled);\n        cout << \"unscaled \";\n    }\n    if (halfspec) {\n        fft.SetFlag(fft.HalfSpectrum);\n        cout << \"halfspec \";\n    }\n\n\n    std::fill(inbuf.begin(),inbuf.end(),0);\n    fft.fwd( outbuf , inbuf);\n\n    BenchTimer timer;\n    timer.reset();\n    for (int k=0;k<8;++k) {\n        timer.start();\n        if (fwd)\n            for(int i = 0; i < nits; i++)\n                fft.fwd( outbuf , inbuf);\n        else\n            for(int i = 0; i < nits; i++)\n                fft.inv(inbuf,outbuf);\n        timer.stop();\n    }\n\n    cout << nameof<Scalar>() << \" \";\n    double mflops = 5.*nfft*log2((double)nfft) / (1e6 * timer.value() / (double)nits );\n    if ( NumTraits<T>::IsComplex ) {\n        cout << \"complex\";\n    }else{\n        cout << \"real   \";\n        mflops /= 2;\n    }\n\n\n    if (fwd)\n        cout << \" fwd\";\n    else\n        cout << \" inv\";\n\n    cout << \" NFFT=\" << nfft << \"  \" << (double(1e-6*nfft*nits)/timer.value()) << \" MS/s  \" << mflops << \"MFLOPS\\n\";\n}\n\nint main(int argc,char ** argv)\n{\n    bench<complex<float> >(NFFT,true);\n    bench<complex<float> >(NFFT,false);\n    bench<float>(NFFT,true);\n    bench<float>(NFFT,false);\n    bench<float>(NFFT,false,true);\n    bench<float>(NFFT,false,true,true);\n\n    bench<complex<double> >(NFFT,true);\n    bench<complex<double> >(NFFT,false);\n    bench<double>(NFFT,true);\n    bench<double>(NFFT,false);\n    bench<complex<long double> >(NFFT,true);\n    bench<complex<long double> >(NFFT,false);\n    bench<long double>(NFFT,true);\n    bench<long double>(NFFT,false);\n    return 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/bench/benchGeometry.cpp",
    "content": "#include <iostream>\n#include <iomanip>\n#include <Eigen/Core>\n#include <Eigen/Geometry>\n#include <bench/BenchTimer.h>\n\nusing namespace Eigen;\nusing namespace std;\n\n#ifndef REPEAT\n#define REPEAT 1000000\n#endif\n\nenum func_opt\n{\n    TV,\n    TMATV,\n    TMATVMAT,\n};\n\n\ntemplate <class res, class arg1, class arg2, int opt>\nstruct func;\n\ntemplate <class res, class arg1, class arg2>\nstruct func<res, arg1, arg2, TV>\n{\n    static EIGEN_DONT_INLINE res run( arg1& a1, arg2& a2 )\n    {\n\tasm (\"\");\n\treturn a1 * a2;\n    }\n};\n\ntemplate <class res, class arg1, class arg2>\nstruct func<res, arg1, arg2, TMATV>\n{\n    static EIGEN_DONT_INLINE res run( arg1& a1, arg2& a2 )\n    {\n\tasm (\"\");\n\treturn a1.matrix() * a2;\n    }\n};\n\ntemplate <class res, class arg1, class arg2>\nstruct func<res, arg1, arg2, TMATVMAT>\n{\n    static EIGEN_DONT_INLINE res run( arg1& a1, arg2& a2 )\n    {\n\tasm (\"\");\n\treturn res(a1.matrix() * a2.matrix());\n    }\n};\n\ntemplate <class func, class arg1, class arg2>\nstruct test_transform\n{\n    static void run()\n    {\n\targ1 a1;\n\ta1.setIdentity();\n\targ2 a2;\n\ta2.setIdentity();\n\n\tBenchTimer timer;\n\ttimer.reset();\n\tfor (int k=0; k<10; ++k)\n\t{\n\t    timer.start();\n\t    for (int k=0; k<REPEAT; ++k)\n\t\ta2 = func::run( a1, a2 );\n\t    timer.stop();\n\t}\n\tcout << setprecision(4) << fixed << timer.value() << \"s  \" << endl;;\n    }\n};\n\n\n#define run_vec( op, scalar, mode, option, vsize ) \\\n    std::cout << #scalar << \"\\t \" << #mode << \"\\t \" << #option << \" \" << #vsize \" \"; \\\n    {\\\n\ttypedef Transform<scalar, 3, mode, option> Trans;\\\n\ttypedef Matrix<scalar, vsize, 1, option> Vec;\\\n\ttypedef func<Vec,Trans,Vec,op> Func;\\\n\ttest_transform< Func, Trans, Vec >::run();\\\n    }\n\n#define run_trans( op, scalar, mode, option ) \\\n    std::cout << #scalar << \"\\t \" << #mode << \"\\t \" << #option << \"   \"; \\\n    {\\\n\ttypedef Transform<scalar, 3, mode, option> Trans;\\\n\ttypedef func<Trans,Trans,Trans,op> Func;\\\n\ttest_transform< Func, Trans, Trans >::run();\\\n    }\n\nint main(int argc, char* argv[])\n{\n    cout << \"vec = trans * vec\" << endl;\n    run_vec(TV, float,  Isometry, AutoAlign, 3);\n    run_vec(TV, float,  Isometry, DontAlign, 3);\n    run_vec(TV, float,  Isometry, AutoAlign, 4);\n    run_vec(TV, float,  Isometry, DontAlign, 4);\n    run_vec(TV, float,  Projective, AutoAlign, 4);\n    run_vec(TV, float,  Projective, DontAlign, 4);\n    run_vec(TV, double, Isometry, AutoAlign, 3);\n    run_vec(TV, double, Isometry, DontAlign, 3);\n    run_vec(TV, double, Isometry, AutoAlign, 4);\n    run_vec(TV, double, Isometry, DontAlign, 4);\n    run_vec(TV, double, Projective, AutoAlign, 4);\n    run_vec(TV, double, Projective, DontAlign, 4);\n\n    cout << \"vec = trans.matrix() * vec\" << endl;\n    run_vec(TMATV, float,  Isometry, AutoAlign, 4);\n    run_vec(TMATV, float,  Isometry, DontAlign, 4);\n    run_vec(TMATV, double, Isometry, AutoAlign, 4);\n    run_vec(TMATV, double, Isometry, DontAlign, 4);\n\n    cout << \"trans = trans1 * trans\" << endl;\n    run_trans(TV, float,  Isometry, AutoAlign);\n    run_trans(TV, float,  Isometry, DontAlign);\n    run_trans(TV, double, Isometry, AutoAlign);\n    run_trans(TV, double, Isometry, DontAlign);\n    run_trans(TV, float,  Projective, AutoAlign);\n    run_trans(TV, float,  Projective, DontAlign);\n    run_trans(TV, double, Projective, AutoAlign);\n    run_trans(TV, double, Projective, DontAlign);\n\n    cout << \"trans = trans1.matrix() * trans.matrix()\" << endl;\n    run_trans(TMATVMAT, float,  Isometry, AutoAlign);\n    run_trans(TMATVMAT, float,  Isometry, DontAlign);\n    run_trans(TMATVMAT, double, Isometry, AutoAlign);\n    run_trans(TMATVMAT, double, Isometry, DontAlign);\n}\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/benchVecAdd.cpp",
    "content": "\n#include <iostream>\n#include <Eigen/Core>\n#include <bench/BenchTimer.h>\nusing namespace Eigen;\n\n#ifndef SIZE\n#define SIZE 50\n#endif\n\n#ifndef REPEAT\n#define REPEAT 10000\n#endif\n\ntypedef float Scalar;\n\n__attribute__ ((noinline)) void benchVec(Scalar* a, Scalar* b, Scalar* c, int size);\n__attribute__ ((noinline)) void benchVec(MatrixXf& a, MatrixXf& b, MatrixXf& c);\n__attribute__ ((noinline)) void benchVec(VectorXf& a, VectorXf& b, VectorXf& c);\n\nint main(int argc, char* argv[])\n{\n    int size = SIZE * 8;\n    int size2 = size * size;\n    Scalar* a = internal::aligned_new<Scalar>(size2);\n    Scalar* b = internal::aligned_new<Scalar>(size2+4)+1;\n    Scalar* c = internal::aligned_new<Scalar>(size2); \n    \n    for (int i=0; i<size; ++i)\n    {\n        a[i] = b[i] = c[i] = 0;\n    }\n    \n    BenchTimer timer;\n    \n    timer.reset();\n    for (int k=0; k<10; ++k)\n    {\n        timer.start();\n        benchVec(a, b, c, size2);\n        timer.stop();\n    }\n    std::cout << timer.value() << \"s  \" << (double(size2*REPEAT)/timer.value())/(1024.*1024.*1024.) << \" GFlops\\n\";\n    return 0;\n    for (int innersize = size; innersize>2 ; --innersize)\n    {\n        if (size2%innersize==0)\n        {\n            int outersize = size2/innersize;\n            MatrixXf ma = Map<MatrixXf>(a, innersize, outersize );\n            MatrixXf mb = Map<MatrixXf>(b, innersize, outersize );\n            MatrixXf mc = Map<MatrixXf>(c, innersize, outersize );\n            timer.reset();\n            for (int k=0; k<3; ++k)\n            {\n                timer.start();\n                benchVec(ma, mb, mc);\n                timer.stop();\n            }\n            std::cout << innersize << \" x \" << outersize << \"  \" << timer.value() << \"s   \" << (double(size2*REPEAT)/timer.value())/(1024.*1024.*1024.) << \" GFlops\\n\";\n        }\n    }\n    \n    VectorXf va = Map<VectorXf>(a, size2);\n    VectorXf vb = Map<VectorXf>(b, size2);\n    VectorXf vc = Map<VectorXf>(c, size2);\n    timer.reset();\n    for (int k=0; k<3; ++k)\n    {\n        timer.start();\n        benchVec(va, vb, vc);\n        timer.stop();\n    }\n    std::cout << timer.value() << \"s   \" << (double(size2*REPEAT)/timer.value())/(1024.*1024.*1024.) << \" GFlops\\n\";\n\n    return 0;\n}\n\nvoid benchVec(MatrixXf& a, MatrixXf& b, MatrixXf& c)\n{\n    for (int k=0; k<REPEAT; ++k)\n        a = a + b;\n}\n\nvoid benchVec(VectorXf& a, VectorXf& b, VectorXf& c)\n{\n    for (int k=0; k<REPEAT; ++k)\n        a = a + b;\n}\n\nvoid benchVec(Scalar* a, Scalar* b, Scalar* c, int size)\n{\n    typedef internal::packet_traits<Scalar>::type PacketScalar;\n    const int PacketSize = internal::packet_traits<Scalar>::size;\n    PacketScalar a0, a1, a2, a3, b0, b1, b2, b3;\n    for (int k=0; k<REPEAT; ++k)\n        for (int i=0; i<size; i+=PacketSize*8)\n        {\n//             a0 = internal::pload(&a[i]);\n//             b0 = internal::pload(&b[i]);\n//             a1 = internal::pload(&a[i+1*PacketSize]);\n//             b1 = internal::pload(&b[i+1*PacketSize]);\n//             a2 = internal::pload(&a[i+2*PacketSize]);\n//             b2 = internal::pload(&b[i+2*PacketSize]);\n//             a3 = internal::pload(&a[i+3*PacketSize]);\n//             b3 = internal::pload(&b[i+3*PacketSize]);\n//             internal::pstore(&a[i], internal::padd(a0, b0));\n//             a0 = internal::pload(&a[i+4*PacketSize]);\n//             b0 = internal::pload(&b[i+4*PacketSize]);\n//             \n//             internal::pstore(&a[i+1*PacketSize], internal::padd(a1, b1));\n//             a1 = internal::pload(&a[i+5*PacketSize]);\n//             b1 = internal::pload(&b[i+5*PacketSize]);\n//             \n//             internal::pstore(&a[i+2*PacketSize], internal::padd(a2, b2));\n//             a2 = internal::pload(&a[i+6*PacketSize]);\n//             b2 = internal::pload(&b[i+6*PacketSize]);\n//             \n//             internal::pstore(&a[i+3*PacketSize], internal::padd(a3, b3));\n//             a3 = internal::pload(&a[i+7*PacketSize]);\n//             b3 = internal::pload(&b[i+7*PacketSize]);\n//             \n//             internal::pstore(&a[i+4*PacketSize], internal::padd(a0, b0));\n//             internal::pstore(&a[i+5*PacketSize], internal::padd(a1, b1));\n//             internal::pstore(&a[i+6*PacketSize], internal::padd(a2, b2));\n//             internal::pstore(&a[i+7*PacketSize], internal::padd(a3, b3));\n            \n            internal::pstore(&a[i+2*PacketSize], internal::padd(internal::ploadu(&a[i+2*PacketSize]), internal::ploadu(&b[i+2*PacketSize])));\n            internal::pstore(&a[i+3*PacketSize], internal::padd(internal::ploadu(&a[i+3*PacketSize]), internal::ploadu(&b[i+3*PacketSize])));\n            internal::pstore(&a[i+4*PacketSize], internal::padd(internal::ploadu(&a[i+4*PacketSize]), internal::ploadu(&b[i+4*PacketSize])));\n            internal::pstore(&a[i+5*PacketSize], internal::padd(internal::ploadu(&a[i+5*PacketSize]), internal::ploadu(&b[i+5*PacketSize])));\n            internal::pstore(&a[i+6*PacketSize], internal::padd(internal::ploadu(&a[i+6*PacketSize]), internal::ploadu(&b[i+6*PacketSize])));\n            internal::pstore(&a[i+7*PacketSize], internal::padd(internal::ploadu(&a[i+7*PacketSize]), internal::ploadu(&b[i+7*PacketSize])));\n        }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/bench/bench_gemm.cpp",
    "content": "\n// g++-4.4 bench_gemm.cpp -I .. -O2 -DNDEBUG -lrt -fopenmp && OMP_NUM_THREADS=2  ./a.out\n// icpc bench_gemm.cpp -I .. -O3 -DNDEBUG -lrt -openmp  && OMP_NUM_THREADS=2  ./a.out\n\n// Compilation options:\n// \n// -DSCALAR=std::complex<double>\n// -DSCALARA=double or -DSCALARB=double\n// -DHAVE_BLAS\n// -DDECOUPLED\n//\n\n#include <iostream>\n#include <bench/BenchTimer.h>\n#include <Eigen/Core>\n\n\nusing namespace std;\nusing namespace Eigen;\n\n#ifndef SCALAR\n// #define SCALAR std::complex<float>\n#define SCALAR float\n#endif\n\n#ifndef SCALARA\n#define SCALARA SCALAR\n#endif\n\n#ifndef SCALARB\n#define SCALARB SCALAR\n#endif\n\n#ifdef ROWMAJ_A\nconst int opt_A = RowMajor;\n#else\nconst int opt_A = ColMajor;\n#endif\n\n#ifdef ROWMAJ_B\nconst int opt_B = RowMajor;\n#else\nconst int opt_B = ColMajor;\n#endif\n\ntypedef SCALAR Scalar;\ntypedef NumTraits<Scalar>::Real RealScalar;\ntypedef Matrix<SCALARA,Dynamic,Dynamic,opt_A> A;\ntypedef Matrix<SCALARB,Dynamic,Dynamic,opt_B> B;\ntypedef Matrix<Scalar,Dynamic,Dynamic> C;\ntypedef Matrix<RealScalar,Dynamic,Dynamic> M;\n\n#ifdef HAVE_BLAS\n\nextern \"C\" {\n  #include <Eigen/src/misc/blas.h>\n}\n\nstatic float fone = 1;\nstatic float fzero = 0;\nstatic double done = 1;\nstatic double szero = 0;\nstatic std::complex<float> cfone = 1;\nstatic std::complex<float> cfzero = 0;\nstatic std::complex<double> cdone = 1;\nstatic std::complex<double> cdzero = 0;\nstatic char notrans = 'N';\nstatic char trans = 'T';  \nstatic char nonunit = 'N';\nstatic char lower = 'L';\nstatic char right = 'R';\nstatic int intone = 1;\n\n#ifdef ROWMAJ_A\nconst char transA = trans;\n#else\nconst char transA = notrans;\n#endif\n\n#ifdef ROWMAJ_B\nconst char transB = trans;\n#else\nconst char transB = notrans;\n#endif\n\ntemplate<typename A,typename B>\nvoid blas_gemm(const A& a, const B& b, MatrixXf& c)\n{\n  int M = c.rows(); int N = c.cols(); int K = a.cols();\n  int lda = a.outerStride(); int ldb = b.outerStride(); int ldc = c.rows();\n\n  sgemm_(&transA,&transB,&M,&N,&K,&fone,\n         const_cast<float*>(a.data()),&lda,\n         const_cast<float*>(b.data()),&ldb,&fone,\n         c.data(),&ldc);\n}\n\ntemplate<typename A,typename B>\nvoid blas_gemm(const A& a, const B& b, MatrixXd& c)\n{\n  int M = c.rows(); int N = c.cols(); int K = a.cols();\n  int lda = a.outerStride(); int ldb = b.outerStride(); int ldc = c.rows();\n\n  dgemm_(&transA,&transB,&M,&N,&K,&done,\n         const_cast<double*>(a.data()),&lda,\n         const_cast<double*>(b.data()),&ldb,&done,\n         c.data(),&ldc);\n}\n\ntemplate<typename A,typename B>\nvoid blas_gemm(const A& a, const B& b, MatrixXcf& c)\n{\n  int M = c.rows(); int N = c.cols(); int K = a.cols();\n  int lda = a.outerStride(); int ldb = b.outerStride(); int ldc = c.rows();\n\n  cgemm_(&transA,&transB,&M,&N,&K,(float*)&cfone,\n         const_cast<float*>((const float*)a.data()),&lda,\n         const_cast<float*>((const float*)b.data()),&ldb,(float*)&cfone,\n         (float*)c.data(),&ldc);\n}\n\ntemplate<typename A,typename B>\nvoid blas_gemm(const A& a, const B& b, MatrixXcd& c)\n{\n  int M = c.rows(); int N = c.cols(); int K = a.cols();\n  int lda = a.outerStride(); int ldb = b.outerStride(); int ldc = c.rows();\n\n  zgemm_(&transA,&transB,&M,&N,&K,(double*)&cdone,\n         const_cast<double*>((const double*)a.data()),&lda,\n         const_cast<double*>((const double*)b.data()),&ldb,(double*)&cdone,\n         (double*)c.data(),&ldc);\n}\n\n\n\n#endif\n\nvoid matlab_cplx_cplx(const M& ar, const M& ai, const M& br, const M& bi, M& cr, M& ci)\n{\n  cr.noalias() += ar * br;\n  cr.noalias() -= ai * bi;\n  ci.noalias() += ar * bi;\n  ci.noalias() += ai * br;\n  // [cr ci] += [ar ai] * br + [-ai ar] * bi\n}\n\nvoid matlab_real_cplx(const M& a, const M& br, const M& bi, M& cr, M& ci)\n{\n  cr.noalias() += a * br;\n  ci.noalias() += a * bi;\n}\n\nvoid matlab_cplx_real(const M& ar, const M& ai, const M& b, M& cr, M& ci)\n{\n  cr.noalias() += ar * b;\n  ci.noalias() += ai * b;\n}\n\n\n\ntemplate<typename A, typename B, typename C>\nEIGEN_DONT_INLINE void gemm(const A& a, const B& b, C& c)\n{\n  c.noalias() += a * b;\n}\n\nint main(int argc, char ** argv)\n{\n  std::ptrdiff_t l1 = internal::queryL1CacheSize();\n  std::ptrdiff_t l2 = internal::queryTopLevelCacheSize();\n  std::cout << \"L1 cache size     = \" << (l1>0 ? l1/1024 : -1) << \" KB\\n\";\n  std::cout << \"L2/L3 cache size  = \" << (l2>0 ? l2/1024 : -1) << \" KB\\n\";\n  typedef internal::gebp_traits<Scalar,Scalar> Traits;\n  std::cout << \"Register blocking = \" << Traits::mr << \" x \" << Traits::nr << \"\\n\";\n\n  int rep = 1;    // number of repetitions per try\n  int tries = 2;  // number of tries, we keep the best\n\n  int s = 2048;\n  int m = s;\n  int n = s;\n  int p = s;\n  int cache_size1=-1, cache_size2=l2, cache_size3 = 0;\n\n  bool need_help = false;\n  for (int i=1; i<argc;)\n  {\n    if(argv[i][0]=='-')\n    {\n      if(argv[i][1]=='s')\n      {\n        ++i;\n        s = atoi(argv[i++]);\n        m = n = p = s;\n        if(argv[i][0]!='-')\n        {\n          n = atoi(argv[i++]);\n          p = atoi(argv[i++]);\n        }\n      }\n      else if(argv[i][1]=='c')\n      {\n        ++i;\n        cache_size1 = atoi(argv[i++]);\n        if(argv[i][0]!='-')\n        {\n          cache_size2 = atoi(argv[i++]);\n          if(argv[i][0]!='-')\n            cache_size3 = atoi(argv[i++]);\n        }\n      }\n      else if(argv[i][1]=='t')\n      {\n        tries = atoi(argv[++i]);\n        ++i;\n      }\n      else if(argv[i][1]=='p')\n      {\n        ++i;\n        rep = atoi(argv[i++]);\n      }\n    }\n    else\n    {\n      need_help = true;\n      break;\n    }\n  }\n\n  if(need_help)\n  {\n    std::cout << argv[0] << \" -s <matrix sizes> -c <cache sizes> -t <nb tries> -p <nb repeats>\\n\";\n    std::cout << \"   <matrix sizes> : size\\n\";\n    std::cout << \"   <matrix sizes> : rows columns depth\\n\";\n    return 1;\n  }\n\n#if EIGEN_VERSION_AT_LEAST(3,2,90)\n  if(cache_size1>0)\n    setCpuCacheSizes(cache_size1,cache_size2,cache_size3);\n#endif\n  \n  A a(m,p); a.setRandom();\n  B b(p,n); b.setRandom();\n  C c(m,n); c.setOnes();\n  C rc = c;\n\n  std::cout << \"Matrix sizes = \" << m << \"x\" << p << \" * \" << p << \"x\" << n << \"\\n\";\n  std::ptrdiff_t mc(m), nc(n), kc(p);\n  internal::computeProductBlockingSizes<Scalar,Scalar>(kc, mc, nc);\n  std::cout << \"blocking size (mc x kc) = \" << mc << \" x \" << kc << \" x \" << nc << \"\\n\";\n\n  C r = c;\n\n  // check the parallel product is correct\n  #if defined EIGEN_HAS_OPENMP\n  Eigen::initParallel();\n  int procs = omp_get_max_threads();\n  if(procs>1)\n  {\n    #ifdef HAVE_BLAS\n    blas_gemm(a,b,r);\n    #else\n    omp_set_num_threads(1);\n    r.noalias() += a * b;\n    omp_set_num_threads(procs);\n    #endif\n    c.noalias() += a * b;\n    if(!r.isApprox(c)) std::cerr << \"Warning, your parallel product is crap!\\n\\n\";\n  }\n  #elif defined HAVE_BLAS\n    blas_gemm(a,b,r);\n    c.noalias() += a * b;\n    if(!r.isApprox(c)) {\n      std::cout << (r  - c).norm()/r.norm() << \"\\n\";\n      std::cerr << \"Warning, your product is crap!\\n\\n\";\n    }\n  #else\n    if(1.*m*n*p<2000.*2000*2000)\n    {\n      gemm(a,b,c);\n      r.noalias() += a.cast<Scalar>() .lazyProduct( b.cast<Scalar>() );\n      if(!r.isApprox(c)) {\n        std::cout << (r  - c).norm()/r.norm() << \"\\n\";\n        std::cerr << \"Warning, your product is crap!\\n\\n\";\n      }\n    }\n  #endif\n\n  #ifdef HAVE_BLAS\n  BenchTimer tblas;\n  c = rc;\n  BENCH(tblas, tries, rep, blas_gemm(a,b,c));\n  std::cout << \"blas  cpu         \" << tblas.best(CPU_TIMER)/rep  << \"s  \\t\" << (double(m)*n*p*rep*2/tblas.best(CPU_TIMER))*1e-9  <<  \" GFLOPS \\t(\" << tblas.total(CPU_TIMER)  << \"s)\\n\";\n  std::cout << \"blas  real        \" << tblas.best(REAL_TIMER)/rep << \"s  \\t\" << (double(m)*n*p*rep*2/tblas.best(REAL_TIMER))*1e-9 <<  \" GFLOPS \\t(\" << tblas.total(REAL_TIMER) << \"s)\\n\";\n  #endif\n\n  // warm start\n  if(b.norm()+a.norm()==123.554) std::cout << \"\\n\";\n\n  BenchTimer tmt;\n  c = rc;\n  BENCH(tmt, tries, rep, gemm(a,b,c));\n  std::cout << \"eigen cpu         \" << tmt.best(CPU_TIMER)/rep  << \"s  \\t\" << (double(m)*n*p*rep*2/tmt.best(CPU_TIMER))*1e-9  <<  \" GFLOPS \\t(\" << tmt.total(CPU_TIMER)  << \"s)\\n\";\n  std::cout << \"eigen real        \" << tmt.best(REAL_TIMER)/rep << \"s  \\t\" << (double(m)*n*p*rep*2/tmt.best(REAL_TIMER))*1e-9 <<  \" GFLOPS \\t(\" << tmt.total(REAL_TIMER) << \"s)\\n\";\n\n  #ifdef EIGEN_HAS_OPENMP\n  if(procs>1)\n  {\n    BenchTimer tmono;\n    omp_set_num_threads(1);\n    Eigen::setNbThreads(1);\n    c = rc;\n    BENCH(tmono, tries, rep, gemm(a,b,c));\n    std::cout << \"eigen mono cpu    \" << tmono.best(CPU_TIMER)/rep  << \"s  \\t\" << (double(m)*n*p*rep*2/tmono.best(CPU_TIMER))*1e-9  <<  \" GFLOPS \\t(\" << tmono.total(CPU_TIMER)  << \"s)\\n\";\n    std::cout << \"eigen mono real   \" << tmono.best(REAL_TIMER)/rep << \"s  \\t\" << (double(m)*n*p*rep*2/tmono.best(REAL_TIMER))*1e-9 <<  \" GFLOPS \\t(\" << tmono.total(REAL_TIMER) << \"s)\\n\";\n    std::cout << \"mt speed up x\" << tmono.best(CPU_TIMER) / tmt.best(REAL_TIMER)  << \" => \" << (100.0*tmono.best(CPU_TIMER) / tmt.best(REAL_TIMER))/procs << \"%\\n\";\n  }\n  #endif\n  \n  if(1.*m*n*p<30*30*30)\n  {\n    BenchTimer tmt;\n    c = rc;\n    BENCH(tmt, tries, rep, c.noalias()+=a.lazyProduct(b));\n    std::cout << \"lazy cpu         \" << tmt.best(CPU_TIMER)/rep  << \"s  \\t\" << (double(m)*n*p*rep*2/tmt.best(CPU_TIMER))*1e-9  <<  \" GFLOPS \\t(\" << tmt.total(CPU_TIMER)  << \"s)\\n\";\n    std::cout << \"lazy real        \" << tmt.best(REAL_TIMER)/rep << \"s  \\t\" << (double(m)*n*p*rep*2/tmt.best(REAL_TIMER))*1e-9 <<  \" GFLOPS \\t(\" << tmt.total(REAL_TIMER) << \"s)\\n\";\n  }\n  \n  #ifdef DECOUPLED\n  if((NumTraits<A::Scalar>::IsComplex) && (NumTraits<B::Scalar>::IsComplex))\n  {\n    M ar(m,p); ar.setRandom();\n    M ai(m,p); ai.setRandom();\n    M br(p,n); br.setRandom();\n    M bi(p,n); bi.setRandom();\n    M cr(m,n); cr.setRandom();\n    M ci(m,n); ci.setRandom();\n    \n    BenchTimer t;\n    BENCH(t, tries, rep, matlab_cplx_cplx(ar,ai,br,bi,cr,ci));\n    std::cout << \"\\\"matlab\\\" cpu    \" << t.best(CPU_TIMER)/rep  << \"s  \\t\" << (double(m)*n*p*rep*2/t.best(CPU_TIMER))*1e-9  <<  \" GFLOPS \\t(\" << t.total(CPU_TIMER)  << \"s)\\n\";\n    std::cout << \"\\\"matlab\\\" real   \" << t.best(REAL_TIMER)/rep << \"s  \\t\" << (double(m)*n*p*rep*2/t.best(REAL_TIMER))*1e-9 <<  \" GFLOPS \\t(\" << t.total(REAL_TIMER) << \"s)\\n\";\n  }\n  if((!NumTraits<A::Scalar>::IsComplex) && (NumTraits<B::Scalar>::IsComplex))\n  {\n    M a(m,p);  a.setRandom();\n    M br(p,n); br.setRandom();\n    M bi(p,n); bi.setRandom();\n    M cr(m,n); cr.setRandom();\n    M ci(m,n); ci.setRandom();\n    \n    BenchTimer t;\n    BENCH(t, tries, rep, matlab_real_cplx(a,br,bi,cr,ci));\n    std::cout << \"\\\"matlab\\\" cpu    \" << t.best(CPU_TIMER)/rep  << \"s  \\t\" << (double(m)*n*p*rep*2/t.best(CPU_TIMER))*1e-9  <<  \" GFLOPS \\t(\" << t.total(CPU_TIMER)  << \"s)\\n\";\n    std::cout << \"\\\"matlab\\\" real   \" << t.best(REAL_TIMER)/rep << \"s  \\t\" << (double(m)*n*p*rep*2/t.best(REAL_TIMER))*1e-9 <<  \" GFLOPS \\t(\" << t.total(REAL_TIMER) << \"s)\\n\";\n  }\n  if((NumTraits<A::Scalar>::IsComplex) && (!NumTraits<B::Scalar>::IsComplex))\n  {\n    M ar(m,p); ar.setRandom();\n    M ai(m,p); ai.setRandom();\n    M b(p,n);  b.setRandom();\n    M cr(m,n); cr.setRandom();\n    M ci(m,n); ci.setRandom();\n    \n    BenchTimer t;\n    BENCH(t, tries, rep, matlab_cplx_real(ar,ai,b,cr,ci));\n    std::cout << \"\\\"matlab\\\" cpu    \" << t.best(CPU_TIMER)/rep  << \"s  \\t\" << (double(m)*n*p*rep*2/t.best(CPU_TIMER))*1e-9  <<  \" GFLOPS \\t(\" << t.total(CPU_TIMER)  << \"s)\\n\";\n    std::cout << \"\\\"matlab\\\" real   \" << t.best(REAL_TIMER)/rep << \"s  \\t\" << (double(m)*n*p*rep*2/t.best(REAL_TIMER))*1e-9 <<  \" GFLOPS \\t(\" << t.total(REAL_TIMER) << \"s)\\n\";\n  }\n  #endif\n\n  return 0;\n}\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/bench_multi_compilers.sh",
    "content": "#!/bin/bash\n\nif (($# < 2)); then\n    echo \"Usage: $0 compilerlist.txt benchfile.cpp\"\nelse\n\ncompilerlist=$1\nbenchfile=$2\n\ng=0\nsource $compilerlist\n\n# for each compiler, compile benchfile and run the benchmark\nfor (( i=0 ; i<g ; ++i )) ; do\n  # check the compiler exists\n  compiler=`echo ${CLIST[$i]} | cut -d \" \" -f 1`\n  if [ -e `which $compiler` ]; then\n    echo \"${CLIST[$i]}\"\n#     echo \"${CLIST[$i]} $benchfile -I.. -o bench~\"\n#     if [ -e ./.bench ] ; then rm .bench; fi\n    ${CLIST[$i]} $benchfile -I.. -o .bench && ./.bench 2> /dev/null\n    echo \"\"\n  else\n    echo \"compiler not found: $compiler\"\n  fi\ndone\n\nfi\n"
  },
  {
    "path": "3rdparty/eigen3/bench/bench_norm.cpp",
    "content": "#include <typeinfo>\n#include <iostream>\n#include <Eigen/Core>\n#include \"BenchTimer.h\"\nusing namespace Eigen;\nusing namespace std;\n\ntemplate<typename T>\nEIGEN_DONT_INLINE typename T::Scalar sqsumNorm(T& v)\n{\n  return v.norm();\n}\n\ntemplate<typename T>\nEIGEN_DONT_INLINE typename T::Scalar stableNorm(T& v)\n{\n  return v.stableNorm();\n}\n\ntemplate<typename T>\nEIGEN_DONT_INLINE typename T::Scalar hypotNorm(T& v)\n{\n  return v.hypotNorm();\n}\n\ntemplate<typename T>\nEIGEN_DONT_INLINE typename T::Scalar blueNorm(T& v)\n{\n  return v.blueNorm();\n}\n\ntemplate<typename T>\nEIGEN_DONT_INLINE typename T::Scalar lapackNorm(T& v)\n{\n  typedef typename T::Scalar Scalar;\n  int n = v.size();\n  Scalar scale = 0;\n  Scalar ssq = 1;\n  for (int i=0;i<n;++i)\n  {\n    Scalar ax = std::abs(v.coeff(i));\n    if (scale >= ax)\n    {\n      ssq += numext::abs2(ax/scale);\n    }\n    else\n    {\n      ssq = Scalar(1) + ssq * numext::abs2(scale/ax);\n      scale = ax;\n    }\n  }\n  return scale * std::sqrt(ssq);\n}\n\ntemplate<typename T>\nEIGEN_DONT_INLINE typename T::Scalar twopassNorm(T& v)\n{\n  typedef typename T::Scalar Scalar;\n  Scalar s = v.array().abs().maxCoeff();\n  return s*(v/s).norm();\n}\n\ntemplate<typename T>\nEIGEN_DONT_INLINE typename T::Scalar bl2passNorm(T& v)\n{\n  return v.stableNorm();\n}\n\ntemplate<typename T>\nEIGEN_DONT_INLINE typename T::Scalar divacNorm(T& v)\n{\n  int n =v.size() / 2;\n  for (int i=0;i<n;++i)\n    v(i) = v(2*i)*v(2*i) + v(2*i+1)*v(2*i+1);\n  n = n/2;\n  while (n>0)\n  {\n    for (int i=0;i<n;++i)\n      v(i) = v(2*i) + v(2*i+1);\n    n = n/2;\n  }\n  return std::sqrt(v(0));\n}\n\nnamespace Eigen {\nnamespace internal {\n#ifdef EIGEN_VECTORIZE\nPacket4f plt(const Packet4f& a, Packet4f& b) { return _mm_cmplt_ps(a,b); }\nPacket2d plt(const Packet2d& a, Packet2d& b) { return _mm_cmplt_pd(a,b); }\n\nPacket4f pandnot(const Packet4f& a, Packet4f& b) { return _mm_andnot_ps(a,b); }\nPacket2d pandnot(const Packet2d& a, Packet2d& b) { return _mm_andnot_pd(a,b); }\n#endif\n}\n}\n\ntemplate<typename T>\nEIGEN_DONT_INLINE typename T::Scalar pblueNorm(const T& v)\n{\n  #ifndef EIGEN_VECTORIZE\n  return v.blueNorm();\n  #else\n  typedef typename T::Scalar Scalar;\n\n  static int nmax = 0;\n  static Scalar b1, b2, s1m, s2m, overfl, rbig, relerr;\n  int n;\n\n  if(nmax <= 0)\n  {\n    int nbig, ibeta, it, iemin, iemax, iexp;\n    Scalar abig, eps;\n\n    nbig  = std::numeric_limits<int>::max();            // largest integer\n    ibeta = std::numeric_limits<Scalar>::radix; //NumTraits<Scalar>::Base;                    // base for floating-point numbers\n    it    = std::numeric_limits<Scalar>::digits; //NumTraits<Scalar>::Mantissa;                // number of base-beta digits in mantissa\n    iemin = std::numeric_limits<Scalar>::min_exponent;  // minimum exponent\n    iemax = std::numeric_limits<Scalar>::max_exponent;  // maximum exponent\n    rbig  = std::numeric_limits<Scalar>::max();         // largest floating-point number\n\n    // Check the basic machine-dependent constants.\n    if(iemin > 1 - 2*it || 1+it>iemax || (it==2 && ibeta<5)\n      || (it<=4 && ibeta <= 3 ) || it<2)\n    {\n      eigen_assert(false && \"the algorithm cannot be guaranteed on this computer\");\n    }\n    iexp  = -((1-iemin)/2);\n    b1    = std::pow(ibeta, iexp);  // lower boundary of midrange\n    iexp  = (iemax + 1 - it)/2;\n    b2    = std::pow(ibeta,iexp);   // upper boundary of midrange\n\n    iexp  = (2-iemin)/2;\n    s1m   = std::pow(ibeta,iexp);   // scaling factor for lower range\n    iexp  = - ((iemax+it)/2);\n    s2m   = std::pow(ibeta,iexp);   // scaling factor for upper range\n\n    overfl  = rbig*s2m;          // overflow boundary for abig\n    eps     = std::pow(ibeta, 1-it);\n    relerr  = std::sqrt(eps);      // tolerance for neglecting asml\n    abig    = 1.0/eps - 1.0;\n    if (Scalar(nbig)>abig)  nmax = abig;  // largest safe n\n    else                    nmax = nbig;\n  }\n\n  typedef typename internal::packet_traits<Scalar>::type Packet;\n  const int ps = internal::packet_traits<Scalar>::size;\n  Packet pasml = internal::pset1<Packet>(Scalar(0));\n  Packet pamed = internal::pset1<Packet>(Scalar(0));\n  Packet pabig = internal::pset1<Packet>(Scalar(0));\n  Packet ps2m = internal::pset1<Packet>(s2m);\n  Packet ps1m = internal::pset1<Packet>(s1m);\n  Packet pb2  = internal::pset1<Packet>(b2);\n  Packet pb1  = internal::pset1<Packet>(b1);\n  for(int j=0; j<v.size(); j+=ps)\n  {\n    Packet ax = internal::pabs(v.template packet<Aligned>(j));\n    Packet ax_s2m = internal::pmul(ax,ps2m);\n    Packet ax_s1m = internal::pmul(ax,ps1m);\n    Packet maskBig = internal::plt(pb2,ax);\n    Packet maskSml = internal::plt(ax,pb1);\n\n//     Packet maskMed = internal::pand(maskSml,maskBig);\n//     Packet scale = internal::pset1(Scalar(0));\n//     scale = internal::por(scale, internal::pand(maskBig,ps2m));\n//     scale = internal::por(scale, internal::pand(maskSml,ps1m));\n//     scale = internal::por(scale, internal::pandnot(internal::pset1(Scalar(1)),maskMed));\n//     ax = internal::pmul(ax,scale);\n//     ax = internal::pmul(ax,ax);\n//     pabig = internal::padd(pabig, internal::pand(maskBig, ax));\n//     pasml = internal::padd(pasml, internal::pand(maskSml, ax));\n//     pamed = internal::padd(pamed, internal::pandnot(ax,maskMed));\n\n\n    pabig = internal::padd(pabig, internal::pand(maskBig, internal::pmul(ax_s2m,ax_s2m)));\n    pasml = internal::padd(pasml, internal::pand(maskSml, internal::pmul(ax_s1m,ax_s1m)));\n    pamed = internal::padd(pamed, internal::pandnot(internal::pmul(ax,ax),internal::pand(maskSml,maskBig)));\n  }\n  Scalar abig = internal::predux(pabig);\n  Scalar asml = internal::predux(pasml);\n  Scalar amed = internal::predux(pamed);\n  if(abig > Scalar(0))\n  {\n    abig = std::sqrt(abig);\n    if(abig > overfl)\n    {\n      eigen_assert(false && \"overflow\");\n      return rbig;\n    }\n    if(amed > Scalar(0))\n    {\n      abig = abig/s2m;\n      amed = std::sqrt(amed);\n    }\n    else\n    {\n      return abig/s2m;\n    }\n\n  }\n  else if(asml > Scalar(0))\n  {\n    if (amed > Scalar(0))\n    {\n      abig = std::sqrt(amed);\n      amed = std::sqrt(asml) / s1m;\n    }\n    else\n    {\n      return std::sqrt(asml)/s1m;\n    }\n  }\n  else\n  {\n    return std::sqrt(amed);\n  }\n  asml = std::min(abig, amed);\n  abig = std::max(abig, amed);\n  if(asml <= abig*relerr)\n    return abig;\n  else\n    return abig * std::sqrt(Scalar(1) + numext::abs2(asml/abig));\n  #endif\n}\n\n#define BENCH_PERF(NRM) { \\\n  float af = 0; double ad = 0; std::complex<float> ac = 0; \\\n  Eigen::BenchTimer tf, td, tcf; tf.reset(); td.reset(); tcf.reset();\\\n  for (int k=0; k<tries; ++k) { \\\n    tf.start(); \\\n    for (int i=0; i<iters; ++i) { af += NRM(vf); } \\\n    tf.stop(); \\\n  } \\\n  for (int k=0; k<tries; ++k) { \\\n    td.start(); \\\n    for (int i=0; i<iters; ++i) { ad += NRM(vd); } \\\n    td.stop(); \\\n  } \\\n  /*for (int k=0; k<std::max(1,tries/3); ++k) { \\\n    tcf.start(); \\\n    for (int i=0; i<iters; ++i) { ac += NRM(vcf); } \\\n    tcf.stop(); \\\n  } */\\\n  std::cout << #NRM << \"\\t\" << tf.value() << \"   \" << td.value() <<  \"    \" << tcf.value() << \"\\n\"; \\\n}\n\nvoid check_accuracy(double basef, double based, int s)\n{\n  double yf = basef * std::abs(internal::random<double>());\n  double yd = based * std::abs(internal::random<double>());\n  VectorXf vf = VectorXf::Ones(s) * yf;\n  VectorXd vd = VectorXd::Ones(s) * yd;\n\n  std::cout << \"reference\\t\" << std::sqrt(double(s))*yf << \"\\t\" << std::sqrt(double(s))*yd << \"\\n\";\n  std::cout << \"sqsumNorm\\t\" << sqsumNorm(vf) << \"\\t\" << sqsumNorm(vd) << \"\\n\";\n  std::cout << \"hypotNorm\\t\" << hypotNorm(vf) << \"\\t\" << hypotNorm(vd) << \"\\n\";\n  std::cout << \"blueNorm\\t\" << blueNorm(vf) << \"\\t\" << blueNorm(vd) << \"\\n\";\n  std::cout << \"pblueNorm\\t\" << pblueNorm(vf) << \"\\t\" << pblueNorm(vd) << \"\\n\";\n  std::cout << \"lapackNorm\\t\" << lapackNorm(vf) << \"\\t\" << lapackNorm(vd) << \"\\n\";\n  std::cout << \"twopassNorm\\t\" << twopassNorm(vf) << \"\\t\" << twopassNorm(vd) << \"\\n\";\n  std::cout << \"bl2passNorm\\t\" << bl2passNorm(vf) << \"\\t\" << bl2passNorm(vd) << \"\\n\";\n}\n\nvoid check_accuracy_var(int ef0, int ef1, int ed0, int ed1, int s)\n{\n  VectorXf vf(s);\n  VectorXd vd(s);\n  for (int i=0; i<s; ++i)\n  {\n    vf[i] = std::abs(internal::random<double>()) * std::pow(double(10), internal::random<int>(ef0,ef1));\n    vd[i] = std::abs(internal::random<double>()) * std::pow(double(10), internal::random<int>(ed0,ed1));\n  }\n\n  //std::cout << \"reference\\t\" << internal::sqrt(double(s))*yf << \"\\t\" << internal::sqrt(double(s))*yd << \"\\n\";\n  std::cout << \"sqsumNorm\\t\"  << sqsumNorm(vf)  << \"\\t\" << sqsumNorm(vd)  << \"\\t\" << sqsumNorm(vf.cast<long double>()) << \"\\t\" << sqsumNorm(vd.cast<long double>()) << \"\\n\";\n  std::cout << \"hypotNorm\\t\"  << hypotNorm(vf)  << \"\\t\" << hypotNorm(vd)  << \"\\t\" << hypotNorm(vf.cast<long double>()) << \"\\t\" << hypotNorm(vd.cast<long double>()) << \"\\n\";\n  std::cout << \"blueNorm\\t\"   << blueNorm(vf)   << \"\\t\" << blueNorm(vd)   << \"\\t\" << blueNorm(vf.cast<long double>()) << \"\\t\" << blueNorm(vd.cast<long double>()) << \"\\n\";\n  std::cout << \"pblueNorm\\t\"  << pblueNorm(vf)  << \"\\t\" << pblueNorm(vd)  << \"\\t\" << blueNorm(vf.cast<long double>()) << \"\\t\" << blueNorm(vd.cast<long double>()) << \"\\n\";\n  std::cout << \"lapackNorm\\t\" << lapackNorm(vf) << \"\\t\" << lapackNorm(vd) << \"\\t\" << lapackNorm(vf.cast<long double>()) << \"\\t\" << lapackNorm(vd.cast<long double>()) << \"\\n\";\n  std::cout << \"twopassNorm\\t\" << twopassNorm(vf) << \"\\t\" << twopassNorm(vd) << \"\\t\" << twopassNorm(vf.cast<long double>()) << \"\\t\" << twopassNorm(vd.cast<long double>()) << \"\\n\";\n//   std::cout << \"bl2passNorm\\t\" << bl2passNorm(vf) << \"\\t\" << bl2passNorm(vd) << \"\\t\" << bl2passNorm(vf.cast<long double>()) << \"\\t\" << bl2passNorm(vd.cast<long double>()) << \"\\n\";\n}\n\nint main(int argc, char** argv)\n{\n  int tries = 10;\n  int iters = 100000;\n  double y = 1.1345743233455785456788e12 * internal::random<double>();\n  VectorXf v = VectorXf::Ones(1024) * y;\n\n// return 0;\n  int s = 10000;\n  double basef_ok = 1.1345743233455785456788e15;\n  double based_ok = 1.1345743233455785456788e95;\n\n  double basef_under = 1.1345743233455785456788e-27;\n  double based_under = 1.1345743233455785456788e-303;\n\n  double basef_over = 1.1345743233455785456788e+27;\n  double based_over = 1.1345743233455785456788e+302;\n\n  std::cout.precision(20);\n\n  std::cerr << \"\\nNo under/overflow:\\n\";\n  check_accuracy(basef_ok, based_ok, s);\n\n  std::cerr << \"\\nUnderflow:\\n\";\n  check_accuracy(basef_under, based_under, s);\n\n  std::cerr << \"\\nOverflow:\\n\";\n  check_accuracy(basef_over, based_over, s);\n\n  std::cerr << \"\\nVarying (over):\\n\";\n  for (int k=0; k<1; ++k)\n  {\n    check_accuracy_var(20,27,190,302,s);\n    std::cout << \"\\n\";\n  }\n\n  std::cerr << \"\\nVarying (under):\\n\";\n  for (int k=0; k<1; ++k)\n  {\n    check_accuracy_var(-27,20,-302,-190,s);\n    std::cout << \"\\n\";\n  }\n\n  y = 1;\n  std::cout.precision(4);\n  int s1 = 1024*1024*32;\n  std::cerr << \"Performance (out of cache, \" << s1 << \"):\\n\";\n  {\n    int iters = 1;\n    VectorXf vf = VectorXf::Random(s1) * y;\n    VectorXd vd = VectorXd::Random(s1) * y;\n    VectorXcf vcf = VectorXcf::Random(s1) * y;\n    BENCH_PERF(sqsumNorm);\n    BENCH_PERF(stableNorm);\n    BENCH_PERF(blueNorm);\n    BENCH_PERF(pblueNorm);\n    BENCH_PERF(lapackNorm);\n    BENCH_PERF(hypotNorm);\n    BENCH_PERF(twopassNorm);\n    BENCH_PERF(bl2passNorm);\n  }\n\n  std::cerr << \"\\nPerformance (in cache, \" << 512 << \"):\\n\";\n  {\n    int iters = 100000;\n    VectorXf vf = VectorXf::Random(512) * y;\n    VectorXd vd = VectorXd::Random(512) * y;\n    VectorXcf vcf = VectorXcf::Random(512) * y;\n    BENCH_PERF(sqsumNorm);\n    BENCH_PERF(stableNorm);\n    BENCH_PERF(blueNorm);\n    BENCH_PERF(pblueNorm);\n    BENCH_PERF(lapackNorm);\n    BENCH_PERF(hypotNorm);\n    BENCH_PERF(twopassNorm);\n    BENCH_PERF(bl2passNorm);\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/bench/bench_reverse.cpp",
    "content": "\n#include <iostream>\n#include <Eigen/Core>\n#include <bench/BenchUtil.h>\nusing namespace Eigen;\n\n#ifndef REPEAT\n#define REPEAT 100000\n#endif\n\n#ifndef TRIES\n#define TRIES 20\n#endif\n\ntypedef double Scalar;\n\ntemplate <typename MatrixType>\n__attribute__ ((noinline)) void bench_reverse(const MatrixType& m)\n{\n  int rows = m.rows();\n  int cols = m.cols();\n  int size = m.size();\n\n  int repeats = (REPEAT*1000)/size;\n  MatrixType a = MatrixType::Random(rows,cols);\n  MatrixType b = MatrixType::Random(rows,cols);\n\n  BenchTimer timerB, timerH, timerV;\n\n  Scalar acc = 0;\n  int r = internal::random<int>(0,rows-1);\n  int c = internal::random<int>(0,cols-1);\n  for (int t=0; t<TRIES; ++t)\n  {\n    timerB.start();\n    for (int k=0; k<repeats; ++k)\n    {\n      asm(\"#begin foo\");\n      b = a.reverse();\n      asm(\"#end foo\");\n      acc += b.coeff(r,c);\n    }\n    timerB.stop();\n  }\n\n  if (MatrixType::RowsAtCompileTime==Dynamic)\n    std::cout << \"dyn   \";\n  else\n    std::cout << \"fixed \";\n  std::cout << rows << \" x \" << cols << \" \\t\"\n            << (timerB.value() * REPEAT) / repeats << \"s \"\n            << \"(\" << 1e-6 * size*repeats/timerB.value() << \" MFLOPS)\\t\";\n\n  std::cout << \"\\n\";\n  // make sure the compiler does not optimize too much\n  if (acc==123)\n    std::cout << acc;\n}\n\nint main(int argc, char* argv[])\n{\n  const int dynsizes[] = {4,6,8,16,24,32,49,64,128,256,512,900,0};\n  std::cout << \"size            no sqrt                           standard\";\n//   #ifdef BENCH_GSL\n//   std::cout << \"       GSL (standard + double + ATLAS)  \";\n//   #endif\n  std::cout << \"\\n\";\n  for (uint i=0; dynsizes[i]>0; ++i)\n  {\n    bench_reverse(Matrix<Scalar,Dynamic,Dynamic>(dynsizes[i],dynsizes[i]));\n    bench_reverse(Matrix<Scalar,Dynamic,1>(dynsizes[i]*dynsizes[i]));\n  }\n//   bench_reverse(Matrix<Scalar,2,2>());\n//   bench_reverse(Matrix<Scalar,3,3>());\n//   bench_reverse(Matrix<Scalar,4,4>());\n//   bench_reverse(Matrix<Scalar,5,5>());\n//   bench_reverse(Matrix<Scalar,6,6>());\n//   bench_reverse(Matrix<Scalar,7,7>());\n//   bench_reverse(Matrix<Scalar,8,8>());\n//   bench_reverse(Matrix<Scalar,12,12>());\n//   bench_reverse(Matrix<Scalar,16,16>());\n  return 0;\n}\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/bench_sum.cpp",
    "content": "#include <iostream>\n#include <Eigen/Core>\nusing namespace Eigen;\nusing namespace std;\n\nint main() \n{\n  typedef Matrix<SCALAR,Eigen::Dynamic,1> Vec;\n  Vec v(SIZE);\n  v.setZero();\n  v[0] = 1;\n  v[1] = 2;\n  for(int i = 0; i < 1000000; i++)\n  {\n    v.coeffRef(0) += v.sum() * SCALAR(1e-20);\n  }\n  cout << v.sum() << endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/bench/bench_unrolling",
    "content": "#!/bin/bash\n\n# gcc : CXX=\"g++  -finline-limit=10000 -ftemplate-depth-2000 --param max-inline-recursive-depth=2000\"\n# icc : CXX=\"icpc -fast -no-inline-max-size -fno-exceptions\"\nCXX=${CXX-g++  -finline-limit=10000 -ftemplate-depth-2000 --param max-inline-recursive-depth=2000} # default value\n\nfor ((i=1; i<16; ++i)); do\n    echo \"Matrix size: $i x $i :\"\n    $CXX -O3 -I.. -DNDEBUG  benchmark.cpp -DMATSIZE=$i -DEIGEN_UNROLLING_LIMIT=400 -o benchmark && time ./benchmark >/dev/null\n    $CXX -O3 -I.. -DNDEBUG -finline-limit=10000 benchmark.cpp -DMATSIZE=$i -DEIGEN_DONT_USE_UNROLLED_LOOPS=1 -o benchmark && time ./benchmark >/dev/null\n    echo \" \"\ndone\n"
  },
  {
    "path": "3rdparty/eigen3/bench/benchmark-blocking-sizes.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Benoit Jacob <benoitjacob@google.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include <iostream>\n#include <cstdint>\n#include <cstdlib>\n#include <vector>\n#include <fstream>\n#include <memory>\n#include <cstdio>\n\nbool eigen_use_specific_block_size;\nint eigen_block_size_k, eigen_block_size_m, eigen_block_size_n;\n#define EIGEN_TEST_SPECIFIC_BLOCKING_SIZES eigen_use_specific_block_size\n#define EIGEN_TEST_SPECIFIC_BLOCKING_SIZE_K eigen_block_size_k\n#define EIGEN_TEST_SPECIFIC_BLOCKING_SIZE_M eigen_block_size_m\n#define EIGEN_TEST_SPECIFIC_BLOCKING_SIZE_N eigen_block_size_n\n#include <Eigen/Core>\n\n#include <bench/BenchTimer.h>\n\nusing namespace Eigen;\nusing namespace std;\n\nstatic BenchTimer timer;\n\n// how many times we repeat each measurement.\n// measurements are randomly shuffled - we're not doing\n// all N identical measurements in a row.\nconst int measurement_repetitions = 3;\n\n// Timings below this value are too short to be accurate,\n// we'll repeat measurements with more iterations until\n// we get a timing above that threshold.\nconst float min_accurate_time = 1e-2f;\n\n// See --min-working-set-size command line parameter.\nsize_t min_working_set_size = 0;\n\nfloat max_clock_speed = 0.0f;\n\n// range of sizes that we will benchmark (in all 3 K,M,N dimensions)\nconst size_t maxsize = 2048;\nconst size_t minsize = 16;\n\ntypedef MatrixXf MatrixType;\ntypedef MatrixType::Scalar Scalar;\ntypedef internal::packet_traits<Scalar>::type Packet;\n\nstatic_assert((maxsize & (maxsize - 1)) == 0, \"maxsize must be a power of two\");\nstatic_assert((minsize & (minsize - 1)) == 0, \"minsize must be a power of two\");\nstatic_assert(maxsize > minsize, \"maxsize must be larger than minsize\");\nstatic_assert(maxsize < (minsize << 16), \"maxsize must be less than (minsize<<16)\");\n\n// just a helper to store a triple of K,M,N sizes for matrix product\nstruct size_triple_t\n{\n  size_t k, m, n;\n  size_triple_t() : k(0), m(0), n(0) {}\n  size_triple_t(size_t _k, size_t _m, size_t _n) : k(_k), m(_m), n(_n) {}\n  size_triple_t(const size_triple_t& o) : k(o.k), m(o.m), n(o.n) {}\n  size_triple_t(uint16_t compact)\n  {\n    k = 1 << ((compact & 0xf00) >> 8);\n    m = 1 << ((compact & 0x0f0) >> 4);\n    n = 1 << ((compact & 0x00f) >> 0);\n  }\n};\n\nuint8_t log2_pot(size_t x) {\n  size_t l = 0;\n  while (x >>= 1) l++;\n  return l;\n}\n\n// Convert between size tripes and a compact form fitting in 12 bits\n// where each size, which must be a POT, is encoded as its log2, on 4 bits\n// so the largest representable size is 2^15 == 32k  ... big enough.\nuint16_t compact_size_triple(size_t k, size_t m, size_t n)\n{\n  return (log2_pot(k) << 8) | (log2_pot(m) << 4) | log2_pot(n);\n}\n\nuint16_t compact_size_triple(const size_triple_t& t)\n{\n  return compact_size_triple(t.k, t.m, t.n);\n}\n\n// A single benchmark. Initially only contains benchmark params.\n// Then call run(), which stores the result in the gflops field.\nstruct benchmark_t\n{\n  uint16_t compact_product_size;\n  uint16_t compact_block_size;\n  bool use_default_block_size;\n  float gflops;\n  benchmark_t()\n    : compact_product_size(0)\n    , compact_block_size(0)\n    , use_default_block_size(false)\n    , gflops(0)\n  {\n  }\n  benchmark_t(size_t pk, size_t pm, size_t pn,\n              size_t bk, size_t bm, size_t bn)\n    : compact_product_size(compact_size_triple(pk, pm, pn))\n    , compact_block_size(compact_size_triple(bk, bm, bn))\n    , use_default_block_size(false)\n    , gflops(0)\n  {}\n  benchmark_t(size_t pk, size_t pm, size_t pn)\n    : compact_product_size(compact_size_triple(pk, pm, pn))\n    , compact_block_size(0)\n    , use_default_block_size(true)\n    , gflops(0)\n  {}\n\n  void run();\n};\n\nostream& operator<<(ostream& s, const benchmark_t& b)\n{\n  s << hex << b.compact_product_size << dec;\n  if (b.use_default_block_size) {\n    size_triple_t t(b.compact_product_size);\n    Index k = t.k, m = t.m, n = t.n;\n    internal::computeProductBlockingSizes<Scalar, Scalar>(k, m, n);\n    s << \" default(\" << k << \", \" << m << \", \" << n << \")\";\n  } else {\n    s << \" \" << hex << b.compact_block_size << dec;\n  }\n  s << \" \" << b.gflops;\n  return s;\n}\n\n// We sort first by increasing benchmark parameters,\n// then by decreasing performance.\nbool operator<(const benchmark_t& b1, const benchmark_t& b2)\n{ \n  return b1.compact_product_size < b2.compact_product_size ||\n           (b1.compact_product_size == b2.compact_product_size && (\n             (b1.compact_block_size < b2.compact_block_size || (\n               b1.compact_block_size == b2.compact_block_size &&\n                 b1.gflops > b2.gflops))));\n}\n\nvoid benchmark_t::run()\n{\n  size_triple_t productsizes(compact_product_size);\n\n  if (use_default_block_size) {\n    eigen_use_specific_block_size = false;\n  } else {\n    // feed eigen with our custom blocking params\n    eigen_use_specific_block_size = true;\n    size_triple_t blocksizes(compact_block_size);\n    eigen_block_size_k = blocksizes.k;\n    eigen_block_size_m = blocksizes.m;\n    eigen_block_size_n = blocksizes.n;\n  }\n\n  // set up the matrix pool\n\n  const size_t combined_three_matrices_sizes =\n    sizeof(Scalar) *\n      (productsizes.k * productsizes.m +\n       productsizes.k * productsizes.n +\n       productsizes.m * productsizes.n);\n\n  // 64 M is large enough that nobody has a cache bigger than that,\n  // while still being small enough that everybody has this much RAM,\n  // so conveniently we don't need to special-case platforms here.\n  const size_t unlikely_large_cache_size = 64 << 20;\n\n  const size_t working_set_size =\n    min_working_set_size ? min_working_set_size : unlikely_large_cache_size;\n\n  const size_t matrix_pool_size =\n    1 + working_set_size / combined_three_matrices_sizes;\n\n  MatrixType *lhs = new MatrixType[matrix_pool_size];\n  MatrixType *rhs = new MatrixType[matrix_pool_size];\n  MatrixType *dst = new MatrixType[matrix_pool_size];\n  \n  for (size_t i = 0; i < matrix_pool_size; i++) {\n    lhs[i] = MatrixType::Zero(productsizes.m, productsizes.k);\n    rhs[i] = MatrixType::Zero(productsizes.k, productsizes.n);\n    dst[i] = MatrixType::Zero(productsizes.m, productsizes.n);\n  }\n\n  // main benchmark loop\n\n  int iters_at_a_time = 1;\n  float time_per_iter = 0.0f;\n  size_t matrix_index = 0;\n  while (true) {\n\n    double starttime = timer.getCpuTime();\n    for (int i = 0; i < iters_at_a_time; i++) {\n      dst[matrix_index].noalias() = lhs[matrix_index] * rhs[matrix_index];\n      matrix_index++;\n      if (matrix_index == matrix_pool_size) {\n        matrix_index = 0;\n      }\n    }\n    double endtime = timer.getCpuTime();\n\n    const float timing = float(endtime - starttime);\n\n    if (timing >= min_accurate_time) {\n      time_per_iter = timing / iters_at_a_time;\n      break;\n    }\n\n    iters_at_a_time *= 2;\n  }\n\n  delete[] lhs;\n  delete[] rhs;\n  delete[] dst;\n\n  gflops = 2e-9 * productsizes.k * productsizes.m * productsizes.n / time_per_iter;\n}\n\nvoid print_cpuinfo()\n{\n#ifdef __linux__\n  cout << \"contents of /proc/cpuinfo:\" << endl;\n  string line;\n  ifstream cpuinfo(\"/proc/cpuinfo\");\n  if (cpuinfo.is_open()) {\n    while (getline(cpuinfo, line)) {\n      cout << line << endl;\n    }\n    cpuinfo.close();\n  }\n  cout << endl;\n#elif defined __APPLE__\n  cout << \"output of sysctl hw:\" << endl;\n  system(\"sysctl hw\");\n  cout << endl;\n#endif\n}\n\ntemplate <typename T>\nstring type_name()\n{\n  return \"unknown\";\n}\n\ntemplate<>\nstring type_name<float>()\n{\n  return \"float\";\n}\n\ntemplate<>\nstring type_name<double>()\n{\n  return \"double\";\n}\n\nstruct action_t\n{\n  virtual const char* invokation_name() const { abort(); return nullptr; }\n  virtual void run() const { abort(); }\n  virtual ~action_t() {}\n};\n\nvoid show_usage_and_exit(int /*argc*/, char* argv[],\n                         const vector<unique_ptr<action_t>>& available_actions)\n{\n  cerr << \"usage: \" << argv[0] << \" <action> [options...]\" << endl << endl;\n  cerr << \"available actions:\" << endl << endl;\n  for (auto it = available_actions.begin(); it != available_actions.end(); ++it) {\n    cerr << \"  \" << (*it)->invokation_name() << endl;\n  }\n  cerr << endl;\n  cerr << \"options:\" << endl << endl;\n  cerr << \"  --min-working-set-size=N:\" << endl;\n  cerr << \"       Set the minimum working set size to N bytes.\" << endl;\n  cerr << \"       This is rounded up as needed to a multiple of matrix size.\" << endl;\n  cerr << \"       A larger working set lowers the chance of a warm cache.\" << endl;\n  cerr << \"       The default value 0 means use a large enough working\" << endl;\n  cerr << \"       set to likely outsize caches.\" << endl;\n  cerr << \"       A value of 1 (that is, 1 byte) would mean don't do anything to\" << endl;\n  cerr << \"       avoid warm caches.\" << endl;\n  exit(1);\n}\n     \nfloat measure_clock_speed()\n{\n  cerr << \"Measuring clock speed...                              \\r\" << flush;\n          \n  vector<float> all_gflops;\n  for (int i = 0; i < 8; i++) {\n    benchmark_t b(1024, 1024, 1024);\n    b.run();\n    all_gflops.push_back(b.gflops);\n  }\n\n  sort(all_gflops.begin(), all_gflops.end());\n  float stable_estimate = all_gflops[2] + all_gflops[3] + all_gflops[4] + all_gflops[5];\n\n  // multiply by an arbitrary constant to discourage trying doing anything with the\n  // returned values besides just comparing them with each other.\n  float result = stable_estimate * 123.456f;\n\n  return result;\n}\n\nstruct human_duration_t\n{\n  int seconds;\n  human_duration_t(int s) : seconds(s) {}\n};\n\nostream& operator<<(ostream& s, const human_duration_t& d)\n{\n  int remainder = d.seconds;\n  if (remainder > 3600) {\n    int hours = remainder / 3600;\n    s << hours << \" h \";\n    remainder -= hours * 3600;\n  }\n  if (remainder > 60) {\n    int minutes = remainder / 60;\n    s << minutes << \" min \";\n    remainder -= minutes * 60;\n  }\n  if (d.seconds < 600) {\n    s << remainder << \" s\";\n  }\n  return s;\n}\n\nconst char session_filename[] = \"/data/local/tmp/benchmark-blocking-sizes-session.data\";\n\nvoid serialize_benchmarks(const char* filename, const vector<benchmark_t>& benchmarks, size_t first_benchmark_to_run)\n{\n  FILE* file = fopen(filename, \"w\");\n  if (!file) {\n    cerr << \"Could not open file \" << filename << \" for writing.\" << endl;\n    cerr << \"Do you have write permissions on the current working directory?\" << endl;\n    exit(1);\n  }\n  size_t benchmarks_vector_size = benchmarks.size();\n  fwrite(&max_clock_speed, sizeof(max_clock_speed), 1, file);\n  fwrite(&benchmarks_vector_size, sizeof(benchmarks_vector_size), 1, file);\n  fwrite(&first_benchmark_to_run, sizeof(first_benchmark_to_run), 1, file);\n  fwrite(benchmarks.data(), sizeof(benchmark_t), benchmarks.size(), file);\n  fclose(file);\n}\n\nbool deserialize_benchmarks(const char* filename, vector<benchmark_t>& benchmarks, size_t& first_benchmark_to_run)\n{\n  FILE* file = fopen(filename, \"r\");\n  if (!file) {\n    return false;\n  }\n  if (1 != fread(&max_clock_speed, sizeof(max_clock_speed), 1, file)) {\n    return false;\n  }\n  size_t benchmarks_vector_size = 0;\n  if (1 != fread(&benchmarks_vector_size, sizeof(benchmarks_vector_size), 1, file)) {\n    return false;\n  }\n  if (1 != fread(&first_benchmark_to_run, sizeof(first_benchmark_to_run), 1, file)) {\n    return false;\n  }\n  benchmarks.resize(benchmarks_vector_size);\n  if (benchmarks.size() != fread(benchmarks.data(), sizeof(benchmark_t), benchmarks.size(), file)) {\n    return false;\n  }\n  unlink(filename);\n  return true;\n}\n\nvoid try_run_some_benchmarks(\n  vector<benchmark_t>& benchmarks,\n  double time_start,\n  size_t& first_benchmark_to_run)\n{\n  if (first_benchmark_to_run == benchmarks.size()) {\n    return;\n  }\n\n  double time_last_progress_update = 0;\n  double time_last_clock_speed_measurement = 0;\n  double time_now = 0;\n\n  size_t benchmark_index = first_benchmark_to_run;\n\n  while (true) {\n    float ratio_done = float(benchmark_index) / benchmarks.size();\n    time_now = timer.getRealTime();\n\n    // We check clock speed every minute and at the end.\n    if (benchmark_index == benchmarks.size() ||\n        time_now > time_last_clock_speed_measurement + 60.0f)\n    {\n      time_last_clock_speed_measurement = time_now;\n\n      // Ensure that clock speed is as expected\n      float current_clock_speed = measure_clock_speed();\n\n      // The tolerance needs to be smaller than the relative difference between\n      // clock speeds that a device could operate under.\n      // It seems unlikely that a device would be throttling clock speeds by\n      // amounts smaller than 2%.\n      // With a value of 1%, I was getting within noise on a Sandy Bridge.\n      const float clock_speed_tolerance = 0.02f;\n\n      if (current_clock_speed > (1 + clock_speed_tolerance) * max_clock_speed) {\n        // Clock speed is now higher than we previously measured.\n        // Either our initial measurement was inaccurate, which won't happen\n        // too many times as we are keeping the best clock speed value and\n        // and allowing some tolerance; or something really weird happened,\n        // which invalidates all benchmark results collected so far.\n        // Either way, we better restart all over again now.\n        if (benchmark_index) {\n          cerr << \"Restarting at \" << 100.0f * ratio_done\n               << \" % because clock speed increased.          \" << endl;\n        }\n        max_clock_speed = current_clock_speed;\n        first_benchmark_to_run = 0;\n        return;\n      }\n\n      bool rerun_last_tests = false;\n\n      if (current_clock_speed < (1 - clock_speed_tolerance) * max_clock_speed) {\n        cerr << \"Measurements completed so far: \"\n             << 100.0f * ratio_done\n             << \" %                             \" << endl;\n        cerr << \"Clock speed seems to be only \"\n             << current_clock_speed/max_clock_speed\n             << \" times what it used to be.\" << endl;\n\n        unsigned int seconds_to_sleep_if_lower_clock_speed = 1;\n\n        while (current_clock_speed < (1 - clock_speed_tolerance) * max_clock_speed) {\n          if (seconds_to_sleep_if_lower_clock_speed > 32) {\n            cerr << \"Sleeping longer probably won't make a difference.\" << endl;\n            cerr << \"Serializing benchmarks to \" << session_filename << endl;\n            serialize_benchmarks(session_filename, benchmarks, first_benchmark_to_run);\n            cerr << \"Now restart this benchmark, and it should pick up where we left.\" << endl;\n            exit(2);\n          }\n          rerun_last_tests = true;\n          cerr << \"Sleeping \"\n               << seconds_to_sleep_if_lower_clock_speed\n               << \" s...                                   \\r\" << endl;\n          sleep(seconds_to_sleep_if_lower_clock_speed);\n          current_clock_speed = measure_clock_speed();\n          seconds_to_sleep_if_lower_clock_speed *= 2;\n        }\n      }\n\n      if (rerun_last_tests) {\n        cerr << \"Redoing the last \"\n             << 100.0f * float(benchmark_index - first_benchmark_to_run) / benchmarks.size()\n             << \" % because clock speed had been low.   \" << endl;\n        return;\n      }\n\n      // nothing wrong with the clock speed so far, so there won't be a need to rerun\n      // benchmarks run so far in case we later encounter a lower clock speed.\n      first_benchmark_to_run = benchmark_index;\n    }\n\n    if (benchmark_index == benchmarks.size()) {\n      // We're done!\n      first_benchmark_to_run = benchmarks.size();\n      // Erase progress info\n      cerr << \"                                                            \" << endl;\n      return;\n    }\n\n    // Display progress info on stderr\n    if (time_now > time_last_progress_update + 1.0f) {\n      time_last_progress_update = time_now;\n      cerr << \"Measurements... \" << 100.0f * ratio_done\n           << \" %, ETA \"\n           << human_duration_t(float(time_now - time_start) * (1.0f - ratio_done) / ratio_done)\n           << \"                          \\r\" << flush;\n    }\n\n    // This is where we actually run a benchmark!\n    benchmarks[benchmark_index].run();\n    benchmark_index++;\n  }\n}\n\nvoid run_benchmarks(vector<benchmark_t>& benchmarks)\n{\n  size_t first_benchmark_to_run;\n  vector<benchmark_t> deserialized_benchmarks;\n  bool use_deserialized_benchmarks = false;\n  if (deserialize_benchmarks(session_filename, deserialized_benchmarks, first_benchmark_to_run)) {\n    cerr << \"Found serialized session with \"\n         << 100.0f * first_benchmark_to_run / deserialized_benchmarks.size()\n         << \" % already done\" << endl;\n    if (deserialized_benchmarks.size() == benchmarks.size() &&\n        first_benchmark_to_run > 0 &&\n        first_benchmark_to_run < benchmarks.size())\n    {\n      use_deserialized_benchmarks = true;\n    }\n  }\n\n  if (use_deserialized_benchmarks) {\n    benchmarks = deserialized_benchmarks;\n  } else {\n    // not using deserialized benchmarks, starting from scratch\n    first_benchmark_to_run = 0;\n\n    // Randomly shuffling benchmarks allows us to get accurate enough progress info,\n    // as now the cheap/expensive benchmarks are randomly mixed so they average out.\n    // It also means that if data is corrupted for some time span, the odds are that\n    // not all repetitions of a given benchmark will be corrupted.\n    random_shuffle(benchmarks.begin(), benchmarks.end());\n  }\n\n  for (int i = 0; i < 4; i++) {\n    max_clock_speed = max(max_clock_speed, measure_clock_speed());\n  }\n  \n  double time_start = 0.0;\n  while (first_benchmark_to_run < benchmarks.size()) {\n    if (first_benchmark_to_run == 0) {\n      time_start = timer.getRealTime();\n    }\n    try_run_some_benchmarks(benchmarks,\n                            time_start,\n                            first_benchmark_to_run);\n  }\n\n  // Sort timings by increasing benchmark parameters, and decreasing gflops.\n  // The latter is very important. It means that we can ignore all but the first\n  // benchmark with given parameters.\n  sort(benchmarks.begin(), benchmarks.end());\n\n  // Collect best (i.e. now first) results for each parameter values.\n  vector<benchmark_t> best_benchmarks;\n  for (auto it = benchmarks.begin(); it != benchmarks.end(); ++it) {\n    if (best_benchmarks.empty() ||\n        best_benchmarks.back().compact_product_size != it->compact_product_size ||\n        best_benchmarks.back().compact_block_size != it->compact_block_size)\n    {\n      best_benchmarks.push_back(*it);\n    }\n  }\n\n  // keep and return only the best benchmarks\n  benchmarks = best_benchmarks;\n}\n\nstruct measure_all_pot_sizes_action_t : action_t\n{\n  virtual const char* invokation_name() const { return \"all-pot-sizes\"; }\n  virtual void run() const\n  {\n    vector<benchmark_t> benchmarks;\n    for (int repetition = 0; repetition < measurement_repetitions; repetition++) {\n      for (size_t ksize = minsize; ksize <= maxsize; ksize *= 2) {\n        for (size_t msize = minsize; msize <= maxsize; msize *= 2) {\n          for (size_t nsize = minsize; nsize <= maxsize; nsize *= 2) {\n            for (size_t kblock = minsize; kblock <= ksize; kblock *= 2) {\n              for (size_t mblock = minsize; mblock <= msize; mblock *= 2) {\n                for (size_t nblock = minsize; nblock <= nsize; nblock *= 2) {\n                  benchmarks.emplace_back(ksize, msize, nsize, kblock, mblock, nblock);\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n\n    run_benchmarks(benchmarks);\n\n    cout << \"BEGIN MEASUREMENTS ALL POT SIZES\" << endl;\n    for (auto it = benchmarks.begin(); it != benchmarks.end(); ++it) {\n      cout << *it << endl;\n    }\n  }\n};\n\nstruct measure_default_sizes_action_t : action_t\n{\n  virtual const char* invokation_name() const { return \"default-sizes\"; }\n  virtual void run() const\n  {\n    vector<benchmark_t> benchmarks;\n    for (int repetition = 0; repetition < measurement_repetitions; repetition++) {\n      for (size_t ksize = minsize; ksize <= maxsize; ksize *= 2) {\n        for (size_t msize = minsize; msize <= maxsize; msize *= 2) {\n          for (size_t nsize = minsize; nsize <= maxsize; nsize *= 2) {\n            benchmarks.emplace_back(ksize, msize, nsize);\n          }\n        }\n      }\n    }\n\n    run_benchmarks(benchmarks);\n\n    cout << \"BEGIN MEASUREMENTS DEFAULT SIZES\" << endl;\n    for (auto it = benchmarks.begin(); it != benchmarks.end(); ++it) {\n      cout << *it << endl;\n    }\n  }\n};\n\nint main(int argc, char* argv[])\n{\n  double time_start = timer.getRealTime();\n  cout.precision(4);\n  cerr.precision(4);\n\n  vector<unique_ptr<action_t>> available_actions;\n  available_actions.emplace_back(new measure_all_pot_sizes_action_t);\n  available_actions.emplace_back(new measure_default_sizes_action_t);\n\n  auto action = available_actions.end();\n\n  if (argc <= 1) {\n    show_usage_and_exit(argc, argv, available_actions);\n  }\n  for (auto it = available_actions.begin(); it != available_actions.end(); ++it) {\n    if (!strcmp(argv[1], (*it)->invokation_name())) {\n      action = it;\n      break;\n    }\n  }\n\n  if (action == available_actions.end()) {\n    show_usage_and_exit(argc, argv, available_actions);\n  }\n\n  for (int i = 2; i < argc; i++) {\n    if (argv[i] == strstr(argv[i], \"--min-working-set-size=\")) {\n      const char* equals_sign = strchr(argv[i], '=');\n      min_working_set_size = strtoul(equals_sign+1, nullptr, 10);\n    } else {\n      cerr << \"unrecognized option: \" << argv[i] << endl << endl;\n      show_usage_and_exit(argc, argv, available_actions);\n    }\n  }\n\n  print_cpuinfo();\n\n  cout << \"benchmark parameters:\" << endl;\n  cout << \"pointer size: \" << 8*sizeof(void*) << \" bits\" << endl;\n  cout << \"scalar type: \" << type_name<Scalar>() << endl;\n  cout << \"packet size: \" << internal::packet_traits<MatrixType::Scalar>::size << endl;\n  cout << \"minsize = \" << minsize << endl;\n  cout << \"maxsize = \" << maxsize << endl;\n  cout << \"measurement_repetitions = \" << measurement_repetitions << endl;\n  cout << \"min_accurate_time = \" << min_accurate_time << endl;\n  cout << \"min_working_set_size = \" << min_working_set_size;\n  if (min_working_set_size == 0) {\n    cout << \" (try to outsize caches)\";\n  }\n  cout << endl << endl;\n\n  (*action)->run();\n\n  double time_end = timer.getRealTime();\n  cerr << \"Finished in \" << human_duration_t(time_end - time_start) << endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/bench/benchmark.cpp",
    "content": "// g++ -O3 -DNDEBUG -DMATSIZE=<x> benchmark.cpp -o benchmark && time ./benchmark\n\n#include <iostream>\n\n#include <Eigen/Core>\n\n#ifndef MATSIZE\n#define MATSIZE 3\n#endif\n\nusing namespace std;\nusing namespace Eigen;\n\n#ifndef REPEAT\n#define REPEAT 40000000\n#endif\n\n#ifndef SCALAR\n#define SCALAR double\n#endif\n\nint main(int argc, char *argv[])\n{\n    Matrix<SCALAR,MATSIZE,MATSIZE> I = Matrix<SCALAR,MATSIZE,MATSIZE>::Ones();\n    Matrix<SCALAR,MATSIZE,MATSIZE> m;\n    for(int i = 0; i < MATSIZE; i++)\n        for(int j = 0; j < MATSIZE; j++)\n        {\n            m(i,j) = (i+MATSIZE*j);\n        }\n    asm(\"#begin\");\n    for(int a = 0; a < REPEAT; a++)\n    {\n        m = Matrix<SCALAR,MATSIZE,MATSIZE>::Ones() + 0.00005 * (m + (m*m));\n    }\n    asm(\"#end\");\n    cout << m << endl;\n    return 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/bench/benchmarkSlice.cpp",
    "content": "// g++ -O3 -DNDEBUG benchmarkX.cpp -o benchmarkX && time ./benchmarkX\n\n#include <iostream>\n\n#include <Eigen/Core>\n\nusing namespace std;\nusing namespace Eigen;\n\n#ifndef REPEAT\n#define REPEAT 10000\n#endif\n\n#ifndef SCALAR\n#define SCALAR float\n#endif\n\nint main(int argc, char *argv[])\n{\n  typedef Matrix<SCALAR, Eigen::Dynamic, Eigen::Dynamic> Mat;\n  Mat m(100, 100);\n  m.setRandom();\n\n  for(int a = 0; a < REPEAT; a++)\n  {\n    int r, c, nr, nc;\n    r = Eigen::internal::random<int>(0,10);\n    c = Eigen::internal::random<int>(0,10);\n    nr = Eigen::internal::random<int>(50,80);\n    nc = Eigen::internal::random<int>(50,80);\n    m.block(r,c,nr,nc) += Mat::Ones(nr,nc);\n    m.block(r,c,nr,nc) *= SCALAR(10);\n    m.block(r,c,nr,nc) -= Mat::constant(nr,nc,10);\n    m.block(r,c,nr,nc) /= SCALAR(10);\n  }\n  cout << m[0] << endl;\n  return 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/bench/benchmarkX.cpp",
    "content": "// g++ -fopenmp -I .. -O3 -DNDEBUG -finline-limit=1000 benchmarkX.cpp -o b && time ./b\n\n#include <iostream>\n\n#include <Eigen/Core>\n\nusing namespace std;\nusing namespace Eigen;\n\n#ifndef MATTYPE\n#define MATTYPE MatrixXLd\n#endif\n\n#ifndef MATSIZE\n#define MATSIZE 400\n#endif\n\n#ifndef REPEAT\n#define REPEAT 100\n#endif\n\nint main(int argc, char *argv[])\n{\n\tMATTYPE I = MATTYPE::Ones(MATSIZE,MATSIZE);\n\tMATTYPE m(MATSIZE,MATSIZE);\n\tfor(int i = 0; i < MATSIZE; i++) for(int j = 0; j < MATSIZE; j++)\n\t{\n\t\tm(i,j) = (i+j+1)/(MATSIZE*MATSIZE);\n\t}\n\tfor(int a = 0; a < REPEAT; a++)\n\t{\n\t\tm = I + 0.0001 * (m + m*m);\n\t}\n\tcout << m(0,0) << endl;\n\treturn 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/bench/benchmarkXcwise.cpp",
    "content": "// g++ -O3 -DNDEBUG benchmarkX.cpp -o benchmarkX && time ./benchmarkX\n\n#include <iostream>\n#include <Eigen/Core>\n\nusing namespace std;\nusing namespace Eigen;\n\n#ifndef VECTYPE\n#define VECTYPE VectorXLd\n#endif\n\n#ifndef VECSIZE\n#define VECSIZE 1000000\n#endif\n\n#ifndef REPEAT\n#define REPEAT 1000\n#endif\n\nint main(int argc, char *argv[])\n{\n\tVECTYPE I = VECTYPE::Ones(VECSIZE);\n\tVECTYPE m(VECSIZE,1);\n\tfor(int i = 0; i < VECSIZE; i++)\n\t{\n\t\tm[i] = 0.1 * i/VECSIZE;\n\t}\n\tfor(int a = 0; a < REPEAT; a++)\n\t{\n\t\tm = VECTYPE::Ones(VECSIZE) + 0.00005 * (m.cwise().square() + m/4);\n\t}\n\tcout << m[0] << endl;\n\treturn 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/bench/benchmark_suite",
    "content": "#!/bin/bash\nCXX=${CXX-g++} # default value unless caller has defined CXX\necho \"Fixed size 3x3, column-major, -DNDEBUG\"\n$CXX -O3 -I .. -DNDEBUG benchmark.cpp -o benchmark && time ./benchmark >/dev/null\necho \"Fixed size 3x3, column-major, with asserts\"\n$CXX -O3 -I .. benchmark.cpp -o benchmark && time ./benchmark >/dev/null\necho \"Fixed size 3x3, row-major, -DNDEBUG\"\n$CXX -O3 -I .. -DEIGEN_DEFAULT_TO_ROW_MAJOR -DNDEBUG benchmark.cpp -o benchmark && time ./benchmark >/dev/null\necho \"Fixed size 3x3, row-major, with asserts\"\n$CXX -O3 -I .. -DEIGEN_DEFAULT_TO_ROW_MAJOR benchmark.cpp -o benchmark && time ./benchmark >/dev/null\necho \"Dynamic size 20x20, column-major, -DNDEBUG\"\n$CXX -O3 -I .. -DNDEBUG benchmarkX.cpp -o benchmarkX && time ./benchmarkX >/dev/null\necho \"Dynamic size 20x20, column-major, with asserts\"\n$CXX -O3 -I .. benchmarkX.cpp -o benchmarkX && time ./benchmarkX >/dev/null\necho \"Dynamic size 20x20, row-major, -DNDEBUG\"\n$CXX -O3 -I .. -DEIGEN_DEFAULT_TO_ROW_MAJOR -DNDEBUG benchmarkX.cpp -o benchmarkX && time ./benchmarkX >/dev/null\necho \"Dynamic size 20x20, row-major, with asserts\"\n$CXX -O3 -I .. -DEIGEN_DEFAULT_TO_ROW_MAJOR benchmarkX.cpp -o benchmarkX && time ./benchmarkX >/dev/null\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/CMakeLists.txt",
    "content": "project(BTL)\n\ncmake_minimum_required(VERSION 2.6.2)\n\nset(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake ${Eigen_SOURCE_DIR}/cmake)\ninclude(MacroOptionalAddSubdirectory)\n\noption(BTL_NOVEC \"Disable SSE/Altivec optimizations when possible\" OFF)\n\nset(CMAKE_INCLUDE_CURRENT_DIR ON)\n\nstring(REGEX MATCH icpc IS_ICPC ${CMAKE_CXX_COMPILER})\nif(CMAKE_COMPILER_IS_GNUCXX OR IS_ICPC)\n  set(CMAKE_CXX_FLAGS \"-g0 -O3 -DNDEBUG ${CMAKE_CXX_FLAGS}\")\n  set(CMAKE_Fortran_FLAGS \"-g0 -O3 -DNDEBUG ${CMAKE_Fortran_FLAGS}\")\n  if(BTL_NOVEC)\n    set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -DEIGEN_DONT_VECTORIZE\")\n  endif(BTL_NOVEC)\nendif(CMAKE_COMPILER_IS_GNUCXX OR IS_ICPC)\n\nif(MSVC)\n  set(CMAKE_CXX_FLAGS \" /O2 /Ot /GL /fp:fast -DNDEBUG\")\n#   set(CMAKE_Fortran_FLAGS \"-g0 -O3 -DNDEBUG\")\n  if(BTL_NOVEC)\n    set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -DEIGEN_DONT_VECTORIZE\")\n  endif(BTL_NOVEC)\nendif(MSVC)\n\nif(IS_ICPC)\n  set(CMAKE_CXX_FLAGS \"-fast ${CMAKE_CXX_FLAGS}\")\n  set(CMAKE_Fortran_FLAGS \"-fast ${CMAKE_Fortran_FLAGS}\")\nendif()\n\ninclude_directories(\n  ${PROJECT_SOURCE_DIR}/actions\n  ${PROJECT_SOURCE_DIR}/generic_bench\n  ${PROJECT_SOURCE_DIR}/generic_bench/utils\n  ${PROJECT_SOURCE_DIR}/libs/STL)\n\n# find_package(MKL)\n# if (MKL_FOUND)\n#   add_definitions(-DHAVE_MKL)\n#   set(DEFAULT_LIBRARIES ${MKL_LIBRARIES})\n# endif ()\n\nfind_library(EIGEN_BTL_RT_LIBRARY rt)\n# if we cannot find it easily, then we don't need it!\nif(NOT EIGEN_BTL_RT_LIBRARY)\n  set(EIGEN_BTL_RT_LIBRARY \"\")\nendif()\n\nmacro(BTL_ADD_BENCH targetname)\n\n  foreach(_current_var ${ARGN})\n    set(_last_var ${_current_var})\n  endforeach()\n\n  set(_sources ${ARGN})\n  list(LENGTH _sources _argn_length)\n\n  list(REMOVE_ITEM _sources ON OFF TRUE FALSE)\n\n  list(LENGTH _sources _src_length)\n\n  if (${_argn_length} EQUAL ${_src_length})\n    set(_last_var ON)\n  endif ()\n\n  option(BUILD_${targetname} \"Build benchmark ${targetname}\" ${_last_var})\n\n  if(BUILD_${targetname})\n    add_executable(${targetname} ${_sources})\n    add_test(${targetname} \"${targetname}\")\n    target_link_libraries(${targetname} ${DEFAULT_LIBRARIES} ${EIGEN_BTL_RT_LIBRARY})\n  endif(BUILD_${targetname})\n\nendmacro(BTL_ADD_BENCH)\n\nmacro(btl_add_target_property target prop value)\n\n  if(BUILD_${target})\n    get_target_property(previous ${target} ${prop})\n    if(NOT previous)\n      set(previous \"\")\n    endif()\n    set_target_properties(${target} PROPERTIES ${prop} \"${previous} ${value}\")\n  endif()\n\nendmacro()\n\nenable_testing()\n\nadd_subdirectory(libs/eigen3)\nadd_subdirectory(libs/eigen2)\nadd_subdirectory(libs/tensors)\nadd_subdirectory(libs/BLAS)\nadd_subdirectory(libs/ublas)\nadd_subdirectory(libs/gmm)\nadd_subdirectory(libs/mtl4)\nadd_subdirectory(libs/blitz)\nadd_subdirectory(libs/tvmet)\nadd_subdirectory(libs/STL)\nadd_subdirectory(libs/blaze)\n\nadd_subdirectory(data)\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/COPYING",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 2, June 1991\n\n Copyright (C) 1989, 1991 Free Software Foundation, Inc.\n                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The licenses for most software are designed to take away your\nfreedom to share and change it.  By contrast, the GNU General Public\nLicense is intended to guarantee your freedom to share and change free\nsoftware--to make sure the software is free for all its users.  This\nGeneral Public License applies to most of the Free Software\nFoundation's software and to any other program whose authors commit to\nusing it.  (Some other Free Software Foundation software is covered by\nthe GNU Library General Public License instead.)  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthis service if you wish), that you receive source code or can get it\nif you want it, that you can change the software or use pieces of it\nin new free programs; and that you know you can do these things.\n\n  To protect your rights, we need to make restrictions that forbid\nanyone to deny you these rights or to ask you to surrender the rights.\nThese restrictions translate to certain responsibilities for you if you\ndistribute copies of the software, or if you modify it.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must give the recipients all the rights that\nyou have.  You must make sure that they, too, receive or can get the\nsource code.  And you must show them these terms so they know their\nrights.\n\n  We protect your rights with two steps: (1) copyright the software, and\n(2) offer you this license which gives you legal permission to copy,\ndistribute and/or modify the software.\n\n  Also, for each author's protection and ours, we want to make certain\nthat everyone understands that there is no warranty for this free\nsoftware.  If the software is modified by someone else and passed on, we\nwant its recipients to know that what they have is not the original, so\nthat any problems introduced by others will not reflect on the original\nauthors' reputations.\n\n  Finally, any free program is threatened constantly by software\npatents.  We wish to avoid the danger that redistributors of a free\nprogram will individually obtain patent licenses, in effect making the\nprogram proprietary.  To prevent this, we have made it clear that any\npatent must be licensed for everyone's free use or not licensed at all.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                    GNU GENERAL PUBLIC LICENSE\n   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n  0. This License applies to any program or other work which contains\na notice placed by the copyright holder saying it may be distributed\nunder the terms of this General Public License.  The \"Program\", below,\nrefers to any such program or work, and a \"work based on the Program\"\nmeans either the Program or any derivative work under copyright law:\nthat is to say, a work containing the Program or a portion of it,\neither verbatim or with modifications and/or translated into another\nlanguage.  (Hereinafter, translation is included without limitation in\nthe term \"modification\".)  Each licensee is addressed as \"you\".\n\nActivities other than copying, distribution and modification are not\ncovered by this License; they are outside its scope.  The act of\nrunning the Program is not restricted, and the output from the Program\nis covered only if its contents constitute a work based on the\nProgram (independent of having been made by running the Program).\nWhether that is true depends on what the Program does.\n\n  1. You may copy and distribute verbatim copies of the Program's\nsource code as you receive it, in any medium, provided that you\nconspicuously and appropriately publish on each copy an appropriate\ncopyright notice and disclaimer of warranty; keep intact all the\nnotices that refer to this License and to the absence of any warranty;\nand give any other recipients of the Program a copy of this License\nalong with the Program.\n\nYou may charge a fee for the physical act of transferring a copy, and\nyou may at your option offer warranty protection in exchange for a fee.\n\n  2. You may modify your copy or copies of the Program or any portion\nof it, thus forming a work based on the Program, and copy and\ndistribute such modifications or work under the terms of Section 1\nabove, provided that you also meet all of these conditions:\n\n    a) You must cause the modified files to carry prominent notices\n    stating that you changed the files and the date of any change.\n\n    b) You must cause any work that you distribute or publish, that in\n    whole or in part contains or is derived from the Program or any\n    part thereof, to be licensed as a whole at no charge to all third\n    parties under the terms of this License.\n\n    c) If the modified program normally reads commands interactively\n    when run, you must cause it, when started running for such\n    interactive use in the most ordinary way, to print or display an\n    announcement including an appropriate copyright notice and a\n    notice that there is no warranty (or else, saying that you provide\n    a warranty) and that users may redistribute the program under\n    these conditions, and telling the user how to view a copy of this\n    License.  (Exception: if the Program itself is interactive but\n    does not normally print such an announcement, your work based on\n    the Program is not required to print an announcement.)\n\nThese requirements apply to the modified work as a whole.  If\nidentifiable sections of that work are not derived from the Program,\nand can be reasonably considered independent and separate works in\nthemselves, then this License, and its terms, do not apply to those\nsections when you distribute them as separate works.  But when you\ndistribute the same sections as part of a whole which is a work based\non the Program, the distribution of the whole must be on the terms of\nthis License, whose permissions for other licensees extend to the\nentire whole, and thus to each and every part regardless of who wrote it.\n\nThus, it is not the intent of this section to claim rights or contest\nyour rights to work written entirely by you; rather, the intent is to\nexercise the right to control the distribution of derivative or\ncollective works based on the Program.\n\nIn addition, mere aggregation of another work not based on the Program\nwith the Program (or with a work based on the Program) on a volume of\na storage or distribution medium does not bring the other work under\nthe scope of this License.\n\n  3. You may copy and distribute the Program (or a work based on it,\nunder Section 2) in object code or executable form under the terms of\nSections 1 and 2 above provided that you also do one of the following:\n\n    a) Accompany it with the complete corresponding machine-readable\n    source code, which must be distributed under the terms of Sections\n    1 and 2 above on a medium customarily used for software interchange; or,\n\n    b) Accompany it with a written offer, valid for at least three\n    years, to give any third party, for a charge no more than your\n    cost of physically performing source distribution, a complete\n    machine-readable copy of the corresponding source code, to be\n    distributed under the terms of Sections 1 and 2 above on a medium\n    customarily used for software interchange; or,\n\n    c) Accompany it with the information you received as to the offer\n    to distribute corresponding source code.  (This alternative is\n    allowed only for noncommercial distribution and only if you\n    received the program in object code or executable form with such\n    an offer, in accord with Subsection b above.)\n\nThe source code for a work means the preferred form of the work for\nmaking modifications to it.  For an executable work, complete source\ncode means all the source code for all modules it contains, plus any\nassociated interface definition files, plus the scripts used to\ncontrol compilation and installation of the executable.  However, as a\nspecial exception, the source code distributed need not include\nanything that is normally distributed (in either source or binary\nform) with the major components (compiler, kernel, and so on) of the\noperating system on which the executable runs, unless that component\nitself accompanies the executable.\n\nIf distribution of executable or object code is made by offering\naccess to copy from a designated place, then offering equivalent\naccess to copy the source code from the same place counts as\ndistribution of the source code, even though third parties are not\ncompelled to copy the source along with the object code.\n\n  4. You may not copy, modify, sublicense, or distribute the Program\nexcept as expressly provided under this License.  Any attempt\notherwise to copy, modify, sublicense or distribute the Program is\nvoid, and will automatically terminate your rights under this License.\nHowever, parties who have received copies, or rights, from you under\nthis License will not have their licenses terminated so long as such\nparties remain in full compliance.\n\n  5. You are not required to accept this License, since you have not\nsigned it.  However, nothing else grants you permission to modify or\ndistribute the Program or its derivative works.  These actions are\nprohibited by law if you do not accept this License.  Therefore, by\nmodifying or distributing the Program (or any work based on the\nProgram), you indicate your acceptance of this License to do so, and\nall its terms and conditions for copying, distributing or modifying\nthe Program or works based on it.\n\n  6. Each time you redistribute the Program (or any work based on the\nProgram), the recipient automatically receives a license from the\noriginal licensor to copy, distribute or modify the Program subject to\nthese terms and conditions.  You may not impose any further\nrestrictions on the recipients' exercise of the rights granted herein.\nYou are not responsible for enforcing compliance by third parties to\nthis License.\n\n  7. If, as a consequence of a court judgment or allegation of patent\ninfringement or for any other reason (not limited to patent issues),\nconditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot\ndistribute so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you\nmay not distribute the Program at all.  For example, if a patent\nlicense would not permit royalty-free redistribution of the Program by\nall those who receive copies directly or indirectly through you, then\nthe only way you could satisfy both it and this License would be to\nrefrain entirely from distribution of the Program.\n\nIf any portion of this section is held invalid or unenforceable under\nany particular circumstance, the balance of the section is intended to\napply and the section as a whole is intended to apply in other\ncircumstances.\n\nIt is not the purpose of this section to induce you to infringe any\npatents or other property right claims or to contest validity of any\nsuch claims; this section has the sole purpose of protecting the\nintegrity of the free software distribution system, which is\nimplemented by public license practices.  Many people have made\ngenerous contributions to the wide range of software distributed\nthrough that system in reliance on consistent application of that\nsystem; it is up to the author/donor to decide if he or she is willing\nto distribute software through any other system and a licensee cannot\nimpose that choice.\n\nThis section is intended to make thoroughly clear what is believed to\nbe a consequence of the rest of this License.\n\n  8. If the distribution and/or use of the Program is restricted in\ncertain countries either by patents or by copyrighted interfaces, the\noriginal copyright holder who places the Program under this License\nmay add an explicit geographical distribution limitation excluding\nthose countries, so that distribution is permitted only in or among\ncountries not thus excluded.  In such case, this License incorporates\nthe limitation as if written in the body of this License.\n\n  9. The Free Software Foundation may publish revised and/or new versions\nof the General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\nEach version is given a distinguishing version number.  If the Program\nspecifies a version number of this License which applies to it and \"any\nlater version\", you have the option of following the terms and conditions\neither of that version or of any later version published by the Free\nSoftware Foundation.  If the Program does not specify a version number of\nthis License, you may choose any version ever published by the Free Software\nFoundation.\n\n  10. If you wish to incorporate parts of the Program into other free\nprograms whose distribution conditions are different, write to the author\nto ask for permission.  For software which is copyrighted by the Free\nSoftware Foundation, write to the Free Software Foundation; we sometimes\nmake exceptions for this.  Our decision will be guided by the two goals\nof preserving the free status of all derivatives of our free software and\nof promoting the sharing and reuse of software generally.\n\n                            NO WARRANTY\n\n  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY\nFOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN\nOTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\nPROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED\nOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS\nTO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE\nPROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,\nREPAIR OR CORRECTION.\n\n  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\nREDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,\nINCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING\nOUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\nTO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\nYOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\nPROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGES.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nconvey the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software; you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation; either version 2 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program; if not, write to the Free Software\n    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\n\n\nAlso add information on how to contact you by electronic and paper mail.\n\nIf the program is interactive, make it output a short notice like this\nwhen it starts in an interactive mode:\n\n    Gnomovision version 69, Copyright (C) year name of author\n    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, the commands you use may\nbe called something other than `show w' and `show c'; they could even be\nmouse-clicks or menu items--whatever suits your program.\n\nYou should also get your employer (if you work as a programmer) or your\nschool, if any, to sign a \"copyright disclaimer\" for the program, if\nnecessary.  Here is a sample; alter the names:\n\n  Yoyodyne, Inc., hereby disclaims all copyright interest in the program\n  `Gnomovision' (which makes passes at compilers) written by James Hacker.\n\n  <signature of Ty Coon>, 1 April 1989\n  Ty Coon, President of Vice\n\nThis General Public License does not permit incorporating your program into\nproprietary programs.  If your program is a subroutine library, you may\nconsider it more useful to permit linking proprietary applications with the\nlibrary.  If this is what you want to do, use the GNU Library General\nPublic License instead of this License.\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/README",
    "content": "Bench Template Library\n\n****************************************\nIntroduction :\n\nThe aim of this project is to compare the performance\nof available numerical libraries. The code is designed\nas generic and modular as possible. Thus, adding new\nnumerical libraries or new numerical tests should\nrequire minimal effort.\n\n\n*****************************************\n\nInstallation :\n\nBTL uses cmake / ctest:\n\n1 - create a build directory:\n\n  $ mkdir build\n  $ cd build\n\n2 - configure:\n\n  $ ccmake ..\n\n3 - run the bench using ctest:\n\n  $ ctest -V\n\nYou can run the benchmarks only on libraries matching a given regular expression:\n  ctest -V -R <regexp>\nFor instance:\n  ctest -V -R eigen2\n\nYou can also select a given set of actions defining the environment variable BTL_CONFIG this way:\n  BTL_CONFIG=\"-a action1{:action2}*\" ctest -V\nAn example:\n  BTL_CONFIG=\"-a axpy:vector_matrix:trisolve:ata\" ctest -V -R eigen2\n\nFinally, if bench results already exist (the bench*.dat files) then they merges by keeping the best for each matrix size. If you want to overwrite the previous ones you can simply add the \"--overwrite\" option:\n  BTL_CONFIG=\"-a axpy:vector_matrix:trisolve:ata --overwrite\" ctest -V -R eigen2\n\n4 : Analyze the result. different data files (.dat) are produced in each libs directories.\n If gnuplot is available, choose a directory name in the data directory to store the results and type:\n        $ cd data\n        $ mkdir my_directory\n        $ cp ../libs/*/*.dat my_directory\n Build the data utilities in this (data) directory\n        make\n Then you can look the raw data,\n        go_mean my_directory\n or smooth the data first :\n\tsmooth_all.sh my_directory\n\tgo_mean my_directory_smooth\n\n\n*************************************************\n\nFiles and directories :\n\n generic_bench : all the bench sources common to all libraries\n\n actions : sources for different action wrappers (axpy, matrix-matrix product) to be tested.\n\n libs/* : bench sources specific to each tested libraries.\n\n machine_dep : directory used to store machine specific Makefile.in\n\n data : directory used to store gnuplot scripts and data analysis utilities\n\n**************************************************\n\nPrinciples : the code modularity is achieved by defining two concepts :\n\n ****** Action concept : This is a class defining which kind\n  of test must be performed (e.g. a matrix_vector_product).\n\tAn Action should define the following methods :\n\n        *** Ctor using the size of the problem (matrix or vector size) as an argument\n\t    Action action(size);\n        *** initialize : this method initialize the calculation (e.g. initialize the matrices and vectors arguments)\n\t    action.initialize();\n\t*** calculate : this method actually launch the calculation to be benchmarked\n\t    action.calculate;\n\t*** nb_op_base() : this method returns the complexity of the calculate method (allowing the mflops evaluation)\n        *** name() : this method returns the name of the action (std::string)\n\n ****** Interface concept : This is a class or namespace defining how to use a given library and\n  its specific containers (matrix and vector). Up to now an interface should following types\n\n\t*** real_type : kind of float to be used (float or double)\n\t*** stl_vector : must correspond to std::vector<real_type>\n\t*** stl_matrix : must correspond to std::vector<stl_vector>\n\t*** gene_vector : the vector type for this interface        --> e.g. (real_type *) for the C_interface\n\t*** gene_matrix : the matrix type for this interface        --> e.g. (gene_vector *) for the C_interface\n\n\t+ the following common methods\n\n        *** free_matrix(gene_matrix & A, int N)  dealocation of a N sized gene_matrix A\n        *** free_vector(gene_vector & B)  dealocation of a N sized gene_vector B\n        *** matrix_from_stl(gene_matrix & A, stl_matrix & A_stl) copy the content of an stl_matrix A_stl into a gene_matrix A.\n\t     The allocation of A is done in this function.\n\t*** vector_to_stl(gene_vector & B, stl_vector & B_stl)  copy the content of an stl_vector B_stl into a gene_vector B.\n\t     The allocation of B is done in this function.\n        *** matrix_to_stl(gene_matrix & A, stl_matrix & A_stl) copy the content of an gene_matrix A into an stl_matrix A_stl.\n             The size of A_STL must corresponds to the size of A.\n        *** vector_to_stl(gene_vector & A, stl_vector & A_stl) copy the content of an gene_vector A into an stl_vector A_stl.\n             The size of B_STL must corresponds to the size of B.\n\t*** copy_matrix(gene_matrix & source, gene_matrix & cible, int N) : copy the content of source in cible. Both source\n\t\tand cible must be sized NxN.\n\t*** copy_vector(gene_vector & source, gene_vector & cible, int N) : copy the content of source in cible. Both source\n \t\tand cible must be sized N.\n\n\tand the following method corresponding to the action one wants to be benchmarked :\n\n\t***  matrix_vector_product(const gene_matrix & A, const gene_vector & B, gene_vector & X, int N)\n\t***  matrix_matrix_product(const gene_matrix & A, const gene_matrix & B, gene_matrix & X, int N)\n        ***  ata_product(const gene_matrix & A, gene_matrix & X, int N)\n\t***  aat_product(const gene_matrix & A, gene_matrix & X, int N)\n        ***  axpy(real coef, const gene_vector & X, gene_vector & Y, int N)\n\n The bench algorithm (generic_bench/bench.hh) is templated with an action itself templated with\n an interface. A typical main.cpp source stored in a given library directory libs/A_LIB\n looks like :\n\n bench< AN_ACTION < AN_INTERFACE > >( 10 , 1000 , 50 ) ;\n\n this function will produce XY data file containing measured  mflops as a function of the size for 50\n sizes between 10 and 10000.\n\n This algorithm can be adapted by providing a given Perf_Analyzer object which determines how the time\n measurements must be done. For example, the X86_Perf_Analyzer use the asm rdtsc function and provides\n a very fast and accurate (but less portable) timing method. The default is the Portable_Perf_Analyzer\n so\n\n bench< AN_ACTION < AN_INTERFACE > >( 10 , 1000 , 50 ) ;\n\n is equivalent to\n\n bench< Portable_Perf_Analyzer,AN_ACTION < AN_INTERFACE > >( 10 , 1000 , 50 ) ;\n\n If your system supports it we suggest to use a mixed implementation (X86_perf_Analyzer+Portable_Perf_Analyzer).\n replace\n     bench<Portable_Perf_Analyzer,Action>(size_min,size_max,nb_point);\n with\n     bench<Mixed_Perf_Analyzer,Action>(size_min,size_max,nb_point);\n in generic/bench.hh\n\n.\n\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/actions/action_aat_product.hh",
    "content": "//=====================================================\n// File   :  action_aat_product.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)>\n// Copyright (C) EDF R&D,  lun sep 30 14:23:19 CEST 2002\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#ifndef ACTION_AAT_PRODUCT\n#define ACTION_AAT_PRODUCT\n#include \"utilities.h\"\n#include \"STL_interface.hh\"\n#include <string>\n#include \"init/init_function.hh\"\n#include \"init/init_vector.hh\"\n#include \"init/init_matrix.hh\"\n\nusing namespace std;\n\ntemplate<class Interface>\nclass Action_aat_product {\n\npublic :\n\n  // Ctor\n\n  Action_aat_product( int size ):_size(size)\n  {\n    MESSAGE(\"Action_aat_product Ctor\");\n\n    // STL matrix and vector initialization\n\n    init_matrix<pseudo_random>(A_stl,_size);\n    init_matrix<null_function>(X_stl,_size);\n    init_matrix<null_function>(resu_stl,_size);\n\n    // generic matrix and vector initialization\n\n    Interface::matrix_from_stl(A_ref,A_stl);\n    Interface::matrix_from_stl(X_ref,X_stl);\n\n    Interface::matrix_from_stl(A,A_stl);\n    Interface::matrix_from_stl(X,X_stl);\n\n  }\n\n  // invalidate copy ctor\n\n  Action_aat_product( const  Action_aat_product & )\n  {\n    INFOS(\"illegal call to Action_aat_product Copy Ctor\");\n    exit(0);\n  }\n\n  // Dtor\n\n  ~Action_aat_product( void ){\n\n    MESSAGE(\"Action_aat_product Dtor\");\n\n    // deallocation\n\n    Interface::free_matrix(A,_size);\n    Interface::free_matrix(X,_size);\n\n    Interface::free_matrix(A_ref,_size);\n    Interface::free_matrix(X_ref,_size);\n\n  }\n\n  // action name\n\n  static inline std::string name( void )\n  {\n    return \"aat_\"+Interface::name();\n  }\n\n  double nb_op_base( void ){\n    return double(_size)*double(_size)*double(_size);\n  }\n\n  inline void initialize( void ){\n\n    Interface::copy_matrix(A_ref,A,_size);\n    Interface::copy_matrix(X_ref,X,_size);\n\n  }\n\n  inline void calculate( void ) {\n\n      Interface::aat_product(A,X,_size);\n\n  }\n\n  void check_result( void ){\n    if (_size>128) return;\n    // calculation check\n\n    Interface::matrix_to_stl(X,resu_stl);\n\n    STL_interface<typename Interface::real_type>::aat_product(A_stl,X_stl,_size);\n\n    typename Interface::real_type error=\n      STL_interface<typename Interface::real_type>::norm_diff(X_stl,resu_stl);\n\n    if (error>1.e-6){\n      INFOS(\"WRONG CALCULATION...residual=\" << error);\n      exit(1);\n    }\n\n  }\n\nprivate :\n\n  typename Interface::stl_matrix A_stl;\n  typename Interface::stl_matrix X_stl;\n  typename Interface::stl_matrix resu_stl;\n\n  typename Interface::gene_matrix A_ref;\n  typename Interface::gene_matrix X_ref;\n\n  typename Interface::gene_matrix A;\n  typename Interface::gene_matrix X;\n\n\n  int _size;\n\n};\n\n\n#endif\n\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/actions/action_ata_product.hh",
    "content": "//=====================================================\n// File   :  action_ata_product.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)>\n// Copyright (C) EDF R&D,  lun sep 30 14:23:19 CEST 2002\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#ifndef ACTION_ATA_PRODUCT\n#define ACTION_ATA_PRODUCT\n#include \"utilities.h\"\n#include \"STL_interface.hh\"\n#include <string>\n#include \"init/init_function.hh\"\n#include \"init/init_vector.hh\"\n#include \"init/init_matrix.hh\"\n\nusing namespace std;\n\ntemplate<class Interface>\nclass Action_ata_product {\n\npublic :\n\n  // Ctor\n\n  Action_ata_product( int size ):_size(size)\n  {\n    MESSAGE(\"Action_ata_product Ctor\");\n\n    // STL matrix and vector initialization\n\n    init_matrix<pseudo_random>(A_stl,_size);\n    init_matrix<null_function>(X_stl,_size);\n    init_matrix<null_function>(resu_stl,_size);\n\n    // generic matrix and vector initialization\n\n    Interface::matrix_from_stl(A_ref,A_stl);\n    Interface::matrix_from_stl(X_ref,X_stl);\n\n    Interface::matrix_from_stl(A,A_stl);\n    Interface::matrix_from_stl(X,X_stl);\n\n  }\n\n  // invalidate copy ctor\n\n  Action_ata_product( const  Action_ata_product & )\n  {\n    INFOS(\"illegal call to Action_ata_product Copy Ctor\");\n    exit(0);\n  }\n\n  // Dtor\n\n  ~Action_ata_product( void ){\n\n    MESSAGE(\"Action_ata_product Dtor\");\n\n    // deallocation\n\n    Interface::free_matrix(A,_size);\n    Interface::free_matrix(X,_size);\n\n    Interface::free_matrix(A_ref,_size);\n    Interface::free_matrix(X_ref,_size);\n\n  }\n\n  // action name\n\n  static inline std::string name( void )\n  {\n    return \"ata_\"+Interface::name();\n  }\n\n  double nb_op_base( void ){\n    return 2.0*_size*_size*_size;\n  }\n\n  inline void initialize( void ){\n\n    Interface::copy_matrix(A_ref,A,_size);\n    Interface::copy_matrix(X_ref,X,_size);\n\n  }\n\n  inline void calculate( void ) {\n\n      Interface::ata_product(A,X,_size);\n\n  }\n\n  void check_result( void ){\n    if (_size>128) return;\n    // calculation check\n\n    Interface::matrix_to_stl(X,resu_stl);\n\n    STL_interface<typename Interface::real_type>::ata_product(A_stl,X_stl,_size);\n\n    typename Interface::real_type error=\n      STL_interface<typename Interface::real_type>::norm_diff(X_stl,resu_stl);\n\n    if (error>1.e-6){\n      INFOS(\"WRONG CALCULATION...residual=\" << error);\n      exit(1);\n    }\n\n  }\n\nprivate :\n\n  typename Interface::stl_matrix A_stl;\n  typename Interface::stl_matrix X_stl;\n  typename Interface::stl_matrix resu_stl;\n\n  typename Interface::gene_matrix A_ref;\n  typename Interface::gene_matrix X_ref;\n\n  typename Interface::gene_matrix A;\n  typename Interface::gene_matrix X;\n\n\n  int _size;\n\n};\n\n\n#endif\n\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/actions/action_atv_product.hh",
    "content": "//=====================================================\n// File   :  action_atv_product.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)>\n// Copyright (C) EDF R&D,  lun sep 30 14:23:19 CEST 2002\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#ifndef ACTION_ATV_PRODUCT\n#define ACTION_ATV_PRODUCT\n#include \"utilities.h\"\n#include \"STL_interface.hh\"\n#include <string>\n#include \"init/init_function.hh\"\n#include \"init/init_vector.hh\"\n#include \"init/init_matrix.hh\"\n\nusing namespace std;\n\ntemplate<class Interface>\nclass Action_atv_product {\n\npublic :\n\n  Action_atv_product( int size ) : _size(size)\n  {\n    MESSAGE(\"Action_atv_product Ctor\");\n\n    // STL matrix and vector initialization\n\n    init_matrix<pseudo_random>(A_stl,_size);\n    init_vector<pseudo_random>(B_stl,_size);\n    init_vector<null_function>(X_stl,_size);\n    init_vector<null_function>(resu_stl,_size);\n\n    // generic matrix and vector initialization\n\n    Interface::matrix_from_stl(A_ref,A_stl);\n    Interface::vector_from_stl(B_ref,B_stl);\n    Interface::vector_from_stl(X_ref,X_stl);\n\n    Interface::matrix_from_stl(A,A_stl);\n    Interface::vector_from_stl(B,B_stl);\n    Interface::vector_from_stl(X,X_stl);\n  }\n\n  // invalidate copy ctor\n  Action_atv_product( const  Action_atv_product & )\n  {\n    INFOS(\"illegal call to Action_atv_product Copy Ctor\");\n    exit(1);\n  }\n\n  ~Action_atv_product( void )\n  {\n    MESSAGE(\"Action_atv_product Dtor\");\n\n    Interface::free_matrix(A,_size);\n    Interface::free_vector(B);\n    Interface::free_vector(X);\n\n    Interface::free_matrix(A_ref,_size);\n    Interface::free_vector(B_ref);\n    Interface::free_vector(X_ref);\n  }\n\n  static inline std::string name() { return \"atv_\" + Interface::name(); }\n\n  double nb_op_base( void ) { return 2.0*_size*_size; }\n\n  inline void initialize( void ){\n    Interface::copy_matrix(A_ref,A,_size);\n    Interface::copy_vector(B_ref,B,_size);\n    Interface::copy_vector(X_ref,X,_size);\n  }\n\n  BTL_DONT_INLINE void calculate( void ) {\n    BTL_ASM_COMMENT(\"begin atv\");\n    Interface::atv_product(A,B,X,_size);\n    BTL_ASM_COMMENT(\"end atv\");\n  }\n\n  void check_result( void )\n  {\n    if (_size>128) return;\n    Interface::vector_to_stl(X,resu_stl);\n\n    STL_interface<typename Interface::real_type>::atv_product(A_stl,B_stl,X_stl,_size);\n\n    typename Interface::real_type error=\n      STL_interface<typename Interface::real_type>::norm_diff(X_stl,resu_stl);\n\n    if (error>1.e-6){\n      INFOS(\"WRONG CALCULATION...residual=\" << error);\n      exit(1);\n    }\n  }\n\nprivate :\n\n  typename Interface::stl_matrix A_stl;\n  typename Interface::stl_vector B_stl;\n  typename Interface::stl_vector X_stl;\n  typename Interface::stl_vector resu_stl;\n\n  typename Interface::gene_matrix A_ref;\n  typename Interface::gene_vector B_ref;\n  typename Interface::gene_vector X_ref;\n\n  typename Interface::gene_matrix A;\n  typename Interface::gene_vector B;\n  typename Interface::gene_vector X;\n\n\n  int _size;\n\n};\n\n\n#endif\n\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/actions/action_axpby.hh",
    "content": "//=====================================================\n// File   :  action_axpby.hh\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#ifndef ACTION_AXPBY\n#define ACTION_AXPBY\n#include \"utilities.h\"\n#include \"STL_interface.hh\"\n#include <string>\n#include \"init/init_function.hh\"\n#include \"init/init_vector.hh\"\n#include \"init/init_matrix.hh\"\n\nusing namespace std;\n\ntemplate<class Interface>\nclass Action_axpby {\n\npublic :\n\n  // Ctor\n  Action_axpby( int size ):_alpha(0.5),_beta(0.95),_size(size)\n  {\n    MESSAGE(\"Action_axpby Ctor\");\n\n    // STL vector initialization\n    init_vector<pseudo_random>(X_stl,_size);\n    init_vector<pseudo_random>(Y_stl,_size);\n    init_vector<null_function>(resu_stl,_size);\n\n    // generic matrix and vector initialization\n    Interface::vector_from_stl(X_ref,X_stl);\n    Interface::vector_from_stl(Y_ref,Y_stl);\n\n    Interface::vector_from_stl(X,X_stl);\n    Interface::vector_from_stl(Y,Y_stl);\n  }\n\n  // invalidate copy ctor\n  Action_axpby( const  Action_axpby & )\n  {\n    INFOS(\"illegal call to Action_axpby Copy Ctor\");\n    exit(1);\n  }\n\n  // Dtor\n  ~Action_axpby( void ){\n    MESSAGE(\"Action_axpby Dtor\");\n\n    // deallocation\n    Interface::free_vector(X_ref);\n    Interface::free_vector(Y_ref);\n\n    Interface::free_vector(X);\n    Interface::free_vector(Y);\n  }\n\n  // action name\n  static inline std::string name( void )\n  {\n    return \"axpby_\"+Interface::name();\n  }\n\n  double nb_op_base( void ){\n    return 3.0*_size;\n  }\n\n  inline void initialize( void ){\n    Interface::copy_vector(X_ref,X,_size);\n    Interface::copy_vector(Y_ref,Y,_size);\n  }\n\n  inline void calculate( void ) {\n    BTL_ASM_COMMENT(\"mybegin axpby\");\n    Interface::axpby(_alpha,X,_beta,Y,_size);\n    BTL_ASM_COMMENT(\"myend axpby\");\n  }\n\n  void check_result( void ){\n    if (_size>128) return;\n    // calculation check\n    Interface::vector_to_stl(Y,resu_stl);\n\n    STL_interface<typename Interface::real_type>::axpby(_alpha,X_stl,_beta,Y_stl,_size);\n\n    typename Interface::real_type error=\n      STL_interface<typename Interface::real_type>::norm_diff(Y_stl,resu_stl);\n\n    if (error>1.e-6){\n      INFOS(\"WRONG CALCULATION...residual=\" << error);\n      exit(2);\n    }\n  }\n\nprivate :\n\n  typename Interface::stl_vector X_stl;\n  typename Interface::stl_vector Y_stl;\n  typename Interface::stl_vector resu_stl;\n\n  typename Interface::gene_vector X_ref;\n  typename Interface::gene_vector Y_ref;\n\n  typename Interface::gene_vector X;\n  typename Interface::gene_vector Y;\n\n  typename Interface::real_type _alpha;\n  typename Interface::real_type _beta;\n\n  int _size;\n};\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/actions/action_axpy.hh",
    "content": "//=====================================================\n// File   :  action_axpy.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)>\n// Copyright (C) EDF R&D,  lun sep 30 14:23:19 CEST 2002\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#ifndef ACTION_AXPY\n#define ACTION_AXPY\n#include \"utilities.h\"\n#include \"STL_interface.hh\"\n#include <string>\n#include \"init/init_function.hh\"\n#include \"init/init_vector.hh\"\n#include \"init/init_matrix.hh\"\n\nusing namespace std;\n\ntemplate<class Interface>\nclass Action_axpy {\n\npublic :\n\n  // Ctor\n\n  Action_axpy( int size ):_coef(1.0),_size(size)\n  {\n    MESSAGE(\"Action_axpy Ctor\");\n\n    // STL vector initialization\n\n    init_vector<pseudo_random>(X_stl,_size);\n    init_vector<pseudo_random>(Y_stl,_size);\n    init_vector<null_function>(resu_stl,_size);\n\n    // generic matrix and vector initialization\n\n    Interface::vector_from_stl(X_ref,X_stl);\n    Interface::vector_from_stl(Y_ref,Y_stl);\n\n    Interface::vector_from_stl(X,X_stl);\n    Interface::vector_from_stl(Y,Y_stl);\n\n\n  }\n\n  // invalidate copy ctor\n\n  Action_axpy( const  Action_axpy & )\n  {\n    INFOS(\"illegal call to Action_axpy Copy Ctor\");\n    exit(1);\n  }\n\n  // Dtor\n\n  ~Action_axpy( void ){\n\n    MESSAGE(\"Action_axpy Dtor\");\n\n    // deallocation\n\n    Interface::free_vector(X_ref);\n    Interface::free_vector(Y_ref);\n\n    Interface::free_vector(X);\n    Interface::free_vector(Y);\n  }\n\n  // action name\n\n  static inline std::string name( void )\n  {\n    return \"axpy_\"+Interface::name();\n  }\n\n  double nb_op_base( void ){\n    return 2.0*_size;\n  }\n\n  inline void initialize( void ){\n    Interface::copy_vector(X_ref,X,_size);\n    Interface::copy_vector(Y_ref,Y,_size);\n  }\n\n  inline void calculate( void ) {\n    BTL_ASM_COMMENT(\"mybegin axpy\");\n    Interface::axpy(_coef,X,Y,_size);\n    BTL_ASM_COMMENT(\"myend axpy\");\n  }\n\n  void check_result( void ){\n    if (_size>128) return;\n    // calculation check\n\n    Interface::vector_to_stl(Y,resu_stl);\n\n    STL_interface<typename Interface::real_type>::axpy(_coef,X_stl,Y_stl,_size);\n\n    typename Interface::real_type error=\n      STL_interface<typename Interface::real_type>::norm_diff(Y_stl,resu_stl);\n\n    if (error>1.e-6){\n      INFOS(\"WRONG CALCULATION...residual=\" << error);\n      exit(0);\n    }\n\n  }\n\nprivate :\n\n  typename Interface::stl_vector X_stl;\n  typename Interface::stl_vector Y_stl;\n  typename Interface::stl_vector resu_stl;\n\n  typename Interface::gene_vector X_ref;\n  typename Interface::gene_vector Y_ref;\n\n  typename Interface::gene_vector X;\n  typename Interface::gene_vector Y;\n\n  typename Interface::real_type _coef;\n\n  int _size;\n};\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/actions/action_cholesky.hh",
    "content": "//=====================================================\n// File   :  action_cholesky.hh\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#ifndef ACTION_CHOLESKY\n#define ACTION_CHOLESKY\n#include \"utilities.h\"\n#include \"STL_interface.hh\"\n#include <string>\n#include \"init/init_function.hh\"\n#include \"init/init_vector.hh\"\n#include \"init/init_matrix.hh\"\n\nusing namespace std;\n\ntemplate<class Interface>\nclass Action_cholesky {\n\npublic :\n\n  // Ctor\n\n  Action_cholesky( int size ):_size(size)\n  {\n    MESSAGE(\"Action_cholesky Ctor\");\n\n    // STL mat/vec initialization\n    init_matrix_symm<pseudo_random>(X_stl,_size);\n    init_matrix<null_function>(C_stl,_size);\n\n    // make sure X is invertible\n    for (int i=0; i<_size; ++i)\n      X_stl[i][i] = std::abs(X_stl[i][i]) * 1e2 + 100;\n\n    // generic matrix and vector initialization\n    Interface::matrix_from_stl(X_ref,X_stl);\n    Interface::matrix_from_stl(X,X_stl);\n    Interface::matrix_from_stl(C,C_stl);\n\n    _cost = 0;\n    for (int j=0; j<_size; ++j)\n    {\n      double r = std::max(_size - j -1,0);\n      _cost += 2*(r*j+r+j);\n    }\n  }\n\n  // invalidate copy ctor\n\n  Action_cholesky( const  Action_cholesky & )\n  {\n    INFOS(\"illegal call to Action_cholesky Copy Ctor\");\n    exit(1);\n  }\n\n  // Dtor\n\n  ~Action_cholesky( void ){\n\n    MESSAGE(\"Action_cholesky Dtor\");\n\n    // deallocation\n    Interface::free_matrix(X_ref,_size);\n    Interface::free_matrix(X,_size);\n    Interface::free_matrix(C,_size);\n  }\n\n  // action name\n\n  static inline std::string name( void )\n  {\n    return \"cholesky_\"+Interface::name();\n  }\n\n  double nb_op_base( void ){\n    return _cost;\n  }\n\n  inline void initialize( void ){\n    Interface::copy_matrix(X_ref,X,_size);\n  }\n\n  inline void calculate( void ) {\n      Interface::cholesky(X,C,_size);\n  }\n\n  void check_result( void ){\n    // calculation check\n//     STL_interface<typename Interface::real_type>::cholesky(X_stl,C_stl,_size);\n//\n//     typename Interface::real_type error=\n//       STL_interface<typename Interface::real_type>::norm_diff(C_stl,resu_stl);\n//\n//     if (error>1.e-6){\n//       INFOS(\"WRONG CALCULATION...residual=\" << error);\n//       exit(0);\n//     }\n\n  }\n\nprivate :\n\n  typename Interface::stl_matrix X_stl;\n  typename Interface::stl_matrix C_stl;\n\n  typename Interface::gene_matrix X_ref;\n  typename Interface::gene_matrix X;\n  typename Interface::gene_matrix C;\n\n  int _size;\n  double _cost;\n};\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/actions/action_ger.hh",
    "content": "\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#ifndef ACTION_GER\n#define ACTION_GER\n#include \"utilities.h\"\n#include \"STL_interface.hh\"\n#include <string>\n#include \"init/init_function.hh\"\n#include \"init/init_vector.hh\"\n#include \"init/init_matrix.hh\"\n\nusing namespace std;\n\ntemplate<class Interface>\nclass Action_ger {\n\npublic :\n\n  // Ctor\n  BTL_DONT_INLINE Action_ger( int size ):_size(size)\n  {\n    MESSAGE(\"Action_ger Ctor\");\n\n    // STL matrix and vector initialization\n    typename Interface::stl_matrix tmp;\n    init_matrix<pseudo_random>(A_stl,_size);\n    init_vector<pseudo_random>(B_stl,_size);\n    init_vector<pseudo_random>(X_stl,_size);\n    init_vector<null_function>(resu_stl,_size);\n\n    // generic matrix and vector initialization\n    Interface::matrix_from_stl(A_ref,A_stl);\n    Interface::matrix_from_stl(A,A_stl);\n    Interface::vector_from_stl(B_ref,B_stl);\n    Interface::vector_from_stl(B,B_stl);\n    Interface::vector_from_stl(X_ref,X_stl);\n    Interface::vector_from_stl(X,X_stl);\n  }\n\n  // invalidate copy ctor\n  Action_ger( const  Action_ger & )\n  {\n    INFOS(\"illegal call to Action_ger Copy Ctor\");\n    exit(1);\n  }\n\n  // Dtor\n  BTL_DONT_INLINE ~Action_ger( void ){\n    MESSAGE(\"Action_ger Dtor\");\n    Interface::free_matrix(A,_size);\n    Interface::free_vector(B);\n    Interface::free_vector(X);\n    Interface::free_matrix(A_ref,_size);\n    Interface::free_vector(B_ref);\n    Interface::free_vector(X_ref);\n\n  }\n\n  // action name\n  static inline std::string name( void )\n  {\n    return \"ger_\" + Interface::name();\n  }\n\n  double nb_op_base( void ){\n    return 2.0*_size*_size;\n  }\n\n  BTL_DONT_INLINE  void initialize( void ){\n    Interface::copy_matrix(A_ref,A,_size);\n    Interface::copy_vector(B_ref,B,_size);\n    Interface::copy_vector(X_ref,X,_size);\n  }\n\n  BTL_DONT_INLINE void calculate( void ) {\n    BTL_ASM_COMMENT(\"#begin ger\");\n    Interface::ger(A,B,X,_size);\n    BTL_ASM_COMMENT(\"end ger\");\n  }\n\n  BTL_DONT_INLINE void check_result( void ){\n    // calculation check\n    Interface::vector_to_stl(X,resu_stl);\n\n    STL_interface<typename Interface::real_type>::ger(A_stl,B_stl,X_stl,_size);\n\n    typename Interface::real_type error=\n      STL_interface<typename Interface::real_type>::norm_diff(X_stl,resu_stl);\n\n    if (error>1.e-3){\n      INFOS(\"WRONG CALCULATION...residual=\" << error);\n//       exit(0);\n    }\n\n  }\n\nprivate :\n\n  typename Interface::stl_matrix A_stl;\n  typename Interface::stl_vector B_stl;\n  typename Interface::stl_vector X_stl;\n  typename Interface::stl_vector resu_stl;\n\n  typename Interface::gene_matrix A_ref;\n  typename Interface::gene_vector B_ref;\n  typename Interface::gene_vector X_ref;\n\n  typename Interface::gene_matrix A;\n  typename Interface::gene_vector B;\n  typename Interface::gene_vector X;\n\n  int _size;\n};\n\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/actions/action_hessenberg.hh",
    "content": "//=====================================================\n// File   :  action_hessenberg.hh\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#ifndef ACTION_HESSENBERG\n#define ACTION_HESSENBERG\n#include \"utilities.h\"\n#include \"STL_interface.hh\"\n#include <string>\n#include \"init/init_function.hh\"\n#include \"init/init_vector.hh\"\n#include \"init/init_matrix.hh\"\n\nusing namespace std;\n\ntemplate<class Interface>\nclass Action_hessenberg {\n\npublic :\n\n  // Ctor\n\n  Action_hessenberg( int size ):_size(size)\n  {\n    MESSAGE(\"Action_hessenberg Ctor\");\n\n    // STL vector initialization\n    init_matrix<pseudo_random>(X_stl,_size);\n\n    init_matrix<null_function>(C_stl,_size);\n    init_matrix<null_function>(resu_stl,_size);\n\n    // generic matrix and vector initialization\n    Interface::matrix_from_stl(X_ref,X_stl);\n    Interface::matrix_from_stl(X,X_stl);\n    Interface::matrix_from_stl(C,C_stl);\n\n    _cost = 0;\n    for (int j=0; j<_size-2; ++j)\n    {\n      double r = std::max(0,_size-j-1);\n      double b = std::max(0,_size-j-2);\n      _cost += 6 + 3*b + r*r*4 + r*_size*4;\n    }\n  }\n\n  // invalidate copy ctor\n\n  Action_hessenberg( const  Action_hessenberg & )\n  {\n    INFOS(\"illegal call to Action_hessenberg Copy Ctor\");\n    exit(1);\n  }\n\n  // Dtor\n\n  ~Action_hessenberg( void ){\n\n    MESSAGE(\"Action_hessenberg Dtor\");\n\n    // deallocation\n    Interface::free_matrix(X_ref,_size);\n    Interface::free_matrix(X,_size);\n    Interface::free_matrix(C,_size);\n  }\n\n  // action name\n\n  static inline std::string name( void )\n  {\n    return \"hessenberg_\"+Interface::name();\n  }\n\n  double nb_op_base( void ){\n    return _cost;\n  }\n\n  inline void initialize( void ){\n    Interface::copy_matrix(X_ref,X,_size);\n  }\n\n  inline void calculate( void ) {\n      Interface::hessenberg(X,C,_size);\n  }\n\n  void check_result( void ){\n    // calculation check\n    Interface::matrix_to_stl(C,resu_stl);\n\n//     STL_interface<typename Interface::real_type>::hessenberg(X_stl,C_stl,_size);\n//\n//     typename Interface::real_type error=\n//       STL_interface<typename Interface::real_type>::norm_diff(C_stl,resu_stl);\n//\n//     if (error>1.e-6){\n//       INFOS(\"WRONG CALCULATION...residual=\" << error);\n//       exit(0);\n//     }\n\n  }\n\nprivate :\n\n  typename Interface::stl_matrix X_stl;\n  typename Interface::stl_matrix C_stl;\n  typename Interface::stl_matrix resu_stl;\n\n  typename Interface::gene_matrix X_ref;\n  typename Interface::gene_matrix X;\n  typename Interface::gene_matrix C;\n\n  int _size;\n  double _cost;\n};\n\ntemplate<class Interface>\nclass Action_tridiagonalization {\n\npublic :\n\n  // Ctor\n\n  Action_tridiagonalization( int size ):_size(size)\n  {\n    MESSAGE(\"Action_tridiagonalization Ctor\");\n\n    // STL vector initialization\n    init_matrix<pseudo_random>(X_stl,_size);\n    \n    for(int i=0; i<_size; ++i)\n    {\n      for(int j=0; j<i; ++j)\n        X_stl[i][j] = X_stl[j][i];\n    }\n    \n    init_matrix<null_function>(C_stl,_size);\n    init_matrix<null_function>(resu_stl,_size);\n\n    // generic matrix and vector initialization\n    Interface::matrix_from_stl(X_ref,X_stl);\n    Interface::matrix_from_stl(X,X_stl);\n    Interface::matrix_from_stl(C,C_stl);\n\n    _cost = 0;\n    for (int j=0; j<_size-2; ++j)\n    {\n      double r = std::max(0,_size-j-1);\n      double b = std::max(0,_size-j-2);\n      _cost += 6. + 3.*b + r*r*8.;\n    }\n  }\n\n  // invalidate copy ctor\n\n  Action_tridiagonalization( const  Action_tridiagonalization & )\n  {\n    INFOS(\"illegal call to Action_tridiagonalization Copy Ctor\");\n    exit(1);\n  }\n\n  // Dtor\n\n  ~Action_tridiagonalization( void ){\n\n    MESSAGE(\"Action_tridiagonalization Dtor\");\n\n    // deallocation\n    Interface::free_matrix(X_ref,_size);\n    Interface::free_matrix(X,_size);\n    Interface::free_matrix(C,_size);\n  }\n\n  // action name\n\n  static inline std::string name( void ) { return \"tridiagonalization_\"+Interface::name(); }\n\n  double nb_op_base( void ){\n    return _cost;\n  }\n\n  inline void initialize( void ){\n    Interface::copy_matrix(X_ref,X,_size);\n  }\n\n  inline void calculate( void ) {\n      Interface::tridiagonalization(X,C,_size);\n  }\n\n  void check_result( void ){\n    // calculation check\n    Interface::matrix_to_stl(C,resu_stl);\n\n//     STL_interface<typename Interface::real_type>::tridiagonalization(X_stl,C_stl,_size);\n//\n//     typename Interface::real_type error=\n//       STL_interface<typename Interface::real_type>::norm_diff(C_stl,resu_stl);\n//\n//     if (error>1.e-6){\n//       INFOS(\"WRONG CALCULATION...residual=\" << error);\n//       exit(0);\n//     }\n\n  }\n\nprivate :\n\n  typename Interface::stl_matrix X_stl;\n  typename Interface::stl_matrix C_stl;\n  typename Interface::stl_matrix resu_stl;\n\n  typename Interface::gene_matrix X_ref;\n  typename Interface::gene_matrix X;\n  typename Interface::gene_matrix C;\n\n  int _size;\n  double _cost;\n};\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/actions/action_lu_decomp.hh",
    "content": "//=====================================================\n// File   :  action_lu_decomp.hh\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#ifndef ACTION_LU_DECOMP\n#define ACTION_LU_DECOMP\n#include \"utilities.h\"\n#include \"STL_interface.hh\"\n#include <string>\n#include \"init/init_function.hh\"\n#include \"init/init_vector.hh\"\n#include \"init/init_matrix.hh\"\n\nusing namespace std;\n\ntemplate<class Interface>\nclass Action_lu_decomp {\n\npublic :\n\n  // Ctor\n\n  Action_lu_decomp( int size ):_size(size)\n  {\n    MESSAGE(\"Action_lu_decomp Ctor\");\n\n    // STL vector initialization\n    init_matrix<pseudo_random>(X_stl,_size);\n\n    init_matrix<null_function>(C_stl,_size);\n    init_matrix<null_function>(resu_stl,_size);\n\n    // generic matrix and vector initialization\n    Interface::matrix_from_stl(X_ref,X_stl);\n    Interface::matrix_from_stl(X,X_stl);\n    Interface::matrix_from_stl(C,C_stl);\n\n    _cost = 2.0*size*size*size/3.0 + size*size;\n  }\n\n  // invalidate copy ctor\n\n  Action_lu_decomp( const  Action_lu_decomp & )\n  {\n    INFOS(\"illegal call to Action_lu_decomp Copy Ctor\");\n    exit(1);\n  }\n\n  // Dtor\n\n  ~Action_lu_decomp( void ){\n\n    MESSAGE(\"Action_lu_decomp Dtor\");\n\n    // deallocation\n    Interface::free_matrix(X_ref,_size);\n    Interface::free_matrix(X,_size);\n    Interface::free_matrix(C,_size);\n  }\n\n  // action name\n\n  static inline std::string name( void )\n  {\n    return \"complete_lu_decomp_\"+Interface::name();\n  }\n\n  double nb_op_base( void ){\n    return _cost;\n  }\n\n  inline void initialize( void ){\n    Interface::copy_matrix(X_ref,X,_size);\n  }\n\n  inline void calculate( void ) {\n      Interface::lu_decomp(X,C,_size);\n  }\n\n  void check_result( void ){\n    // calculation check\n    Interface::matrix_to_stl(C,resu_stl);\n\n//     STL_interface<typename Interface::real_type>::lu_decomp(X_stl,C_stl,_size);\n//\n//     typename Interface::real_type error=\n//       STL_interface<typename Interface::real_type>::norm_diff(C_stl,resu_stl);\n//\n//     if (error>1.e-6){\n//       INFOS(\"WRONG CALCULATION...residual=\" << error);\n//       exit(0);\n//     }\n\n  }\n\nprivate :\n\n  typename Interface::stl_matrix X_stl;\n  typename Interface::stl_matrix C_stl;\n  typename Interface::stl_matrix resu_stl;\n\n  typename Interface::gene_matrix X_ref;\n  typename Interface::gene_matrix X;\n  typename Interface::gene_matrix C;\n\n  int _size;\n  double _cost;\n};\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/actions/action_lu_solve.hh",
    "content": "//=====================================================\n// File   :  action_lu_solve.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)>        \n// Copyright (C) EDF R&D,  lun sep 30 14:23:19 CEST 2002\n//=====================================================\n// \n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n// \n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n// \n#ifndef ACTION_LU_SOLVE\n#define ACTION_LU_SOLVE\n#include \"utilities.h\"\n#include \"STL_interface.hh\"\n#include <string>\n#include \"init/init_function.hh\"\n#include \"init/init_vector.hh\"\n#include \"init/init_matrix.hh\"\n\nusing namespace std;\n\ntemplate<class Interface>\nclass Action_lu_solve \n{\n\npublic :\n\n  static inline std::string name( void )\n  {\n    return \"lu_solve_\"+Interface::name();\n  }\n  \n  static double nb_op_base(int size){\n    return 2.0*size*size*size/3.0;  // questionable but not really important\n  }\n\n\n  static double calculate( int nb_calc, int size ) {\n\n    // STL matrix and vector initialization\n    \n    typename Interface::stl_matrix A_stl;\n    typename Interface::stl_vector B_stl;\n    typename Interface::stl_vector X_stl;\n\n    init_matrix<pseudo_random>(A_stl,size);\n    init_vector<pseudo_random>(B_stl,size);\n    init_vector<null_function>(X_stl,size);\n\n    // generic matrix and vector initialization\n\n    typename Interface::gene_matrix A;\n    typename Interface::gene_vector B;\n    typename Interface::gene_vector X;\n\n    typename Interface::gene_matrix LU; \n\n    Interface::matrix_from_stl(A,A_stl);\n    Interface::vector_from_stl(B,B_stl);\n    Interface::vector_from_stl(X,X_stl);\n    Interface::matrix_from_stl(LU,A_stl);\n  \n    // local variable :\n\n    typename Interface::Pivot_Vector pivot; // pivot vector\n    Interface::new_Pivot_Vector(pivot,size);\n    \n    // timer utilities\n\n    Portable_Timer chronos;\n\n    // time measurement\n\n    chronos.start();\n    \n    for (int ii=0;ii<nb_calc;ii++){\n\n      // LU factorization\n      Interface::copy_matrix(A,LU,size);\n      Interface::LU_factor(LU,pivot,size);\n      \n      // LU solve\n\n      Interface::LU_solve(LU,pivot,B,X,size);\n\n    }\n\n    // Time stop\n\n    chronos.stop();\n\n    double time=chronos.user_time();\n  \n    // check result :\n\n    typename Interface::stl_vector B_new_stl(size);\n    Interface::vector_to_stl(X,X_stl);\n\n    STL_interface<typename Interface::real_type>::matrix_vector_product(A_stl,X_stl,B_new_stl,size); \n  \n    typename Interface::real_type error=\n      STL_interface<typename Interface::real_type>::norm_diff(B_stl,B_new_stl);\n    \n    if (error>1.e-5){\n      INFOS(\"WRONG CALCULATION...residual=\" << error);\n      STL_interface<typename Interface::real_type>::display_vector(B_stl);\n      STL_interface<typename Interface::real_type>::display_vector(B_new_stl);\n      exit(0);\n    }\n    \n    // deallocation and return time\n    \n    Interface::free_matrix(A,size);\n    Interface::free_vector(B);\n    Interface::free_vector(X);\n    Interface::free_Pivot_Vector(pivot);\n\n    return time;\n  }\n\n};\n  \n\n#endif\n\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/actions/action_matrix_matrix_product.hh",
    "content": "//=====================================================\n// File   :  action_matrix_matrix_product.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)>\n// Copyright (C) EDF R&D,  lun sep 30 14:23:19 CEST 2002\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#ifndef ACTION_MATRIX_MATRIX_PRODUCT\n#define ACTION_MATRIX_MATRIX_PRODUCT\n#include \"utilities.h\"\n#include \"STL_interface.hh\"\n#include <string>\n#include \"init/init_function.hh\"\n#include \"init/init_vector.hh\"\n#include \"init/init_matrix.hh\"\n\nusing namespace std;\n\ntemplate<class Interface>\nclass Action_matrix_matrix_product {\n\npublic :\n\n  // Ctor\n\n  Action_matrix_matrix_product( int size ):_size(size)\n  {\n    MESSAGE(\"Action_matrix_matrix_product Ctor\");\n\n    // STL matrix and vector initialization\n\n    init_matrix<pseudo_random>(A_stl,_size);\n    init_matrix<pseudo_random>(B_stl,_size);\n    init_matrix<null_function>(X_stl,_size);\n    init_matrix<null_function>(resu_stl,_size);\n\n    // generic matrix and vector initialization\n\n    Interface::matrix_from_stl(A_ref,A_stl);\n    Interface::matrix_from_stl(B_ref,B_stl);\n    Interface::matrix_from_stl(X_ref,X_stl);\n\n    Interface::matrix_from_stl(A,A_stl);\n    Interface::matrix_from_stl(B,B_stl);\n    Interface::matrix_from_stl(X,X_stl);\n\n  }\n\n  // invalidate copy ctor\n\n  Action_matrix_matrix_product( const  Action_matrix_matrix_product & )\n  {\n    INFOS(\"illegal call to Action_matrix_matrix_product Copy Ctor\");\n    exit(0);\n  }\n\n  // Dtor\n\n  ~Action_matrix_matrix_product( void ){\n\n    MESSAGE(\"Action_matrix_matrix_product Dtor\");\n\n    // deallocation\n\n    Interface::free_matrix(A,_size);\n    Interface::free_matrix(B,_size);\n    Interface::free_matrix(X,_size);\n\n    Interface::free_matrix(A_ref,_size);\n    Interface::free_matrix(B_ref,_size);\n    Interface::free_matrix(X_ref,_size);\n\n  }\n\n  // action name\n\n  static inline std::string name( void )\n  {\n    return \"matrix_matrix_\"+Interface::name();\n  }\n\n  double nb_op_base( void ){\n    return 2.0*_size*_size*_size;\n  }\n\n  inline void initialize( void ){\n\n    Interface::copy_matrix(A_ref,A,_size);\n    Interface::copy_matrix(B_ref,B,_size);\n    Interface::copy_matrix(X_ref,X,_size);\n\n  }\n\n  inline void calculate( void ) {\n      Interface::matrix_matrix_product(A,B,X,_size);\n  }\n\n  void check_result( void ){\n\n    // calculation check\n    if (_size<200)\n    {\n      Interface::matrix_to_stl(X,resu_stl);\n      STL_interface<typename Interface::real_type>::matrix_matrix_product(A_stl,B_stl,X_stl,_size);\n      typename Interface::real_type error=\n        STL_interface<typename Interface::real_type>::norm_diff(X_stl,resu_stl);\n      if (error>1.e-6){\n        INFOS(\"WRONG CALCULATION...residual=\" << error);\n        exit(1);\n      }\n    }\n  }\n\nprivate :\n\n  typename Interface::stl_matrix A_stl;\n  typename Interface::stl_matrix B_stl;\n  typename Interface::stl_matrix X_stl;\n  typename Interface::stl_matrix resu_stl;\n\n  typename Interface::gene_matrix A_ref;\n  typename Interface::gene_matrix B_ref;\n  typename Interface::gene_matrix X_ref;\n\n  typename Interface::gene_matrix A;\n  typename Interface::gene_matrix B;\n  typename Interface::gene_matrix X;\n\n\n  int _size;\n\n};\n\n\n#endif\n\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/actions/action_matrix_matrix_product_bis.hh",
    "content": "//=====================================================\n// File   :  action_matrix_matrix_product_bis.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)>\n// Copyright (C) EDF R&D,  lun sep 30 14:23:19 CEST 2002\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#ifndef ACTION_MATRIX_MATRIX_PRODUCT_BIS\n#define ACTION_MATRIX_MATRIX_PRODUCT_BIS\n#include \"utilities.h\"\n#include \"STL_interface.hh\"\n#include \"STL_timer.hh\"\n#include <string>\n#include \"init_function.hh\"\n#include \"init_vector.hh\"\n#include \"init_matrix.hh\"\n\nusing namespace std;\n\ntemplate<class Interface>\nclass Action_matrix_matrix_product_bis {\n\npublic :\n\n  static inline std::string name( void )\n  {\n    return \"matrix_matrix_\"+Interface::name();\n  }\n\n  static double nb_op_base(int size){\n    return 2.0*size*size*size;\n  }\n\n  static double calculate( int nb_calc, int size ) {\n\n    // STL matrix and vector initialization\n\n    typename Interface::stl_matrix A_stl;\n    typename Interface::stl_matrix B_stl;\n    typename Interface::stl_matrix X_stl;\n\n    init_matrix<pseudo_random>(A_stl,size);\n    init_matrix<pseudo_random>(B_stl,size);\n    init_matrix<null_function>(X_stl,size);\n\n    // generic matrix and vector initialization\n\n    typename Interface::gene_matrix A_ref;\n    typename Interface::gene_matrix B_ref;\n    typename Interface::gene_matrix X_ref;\n\n    typename Interface::gene_matrix A;\n    typename Interface::gene_matrix B;\n    typename Interface::gene_matrix X;\n\n\n    Interface::matrix_from_stl(A_ref,A_stl);\n    Interface::matrix_from_stl(B_ref,B_stl);\n    Interface::matrix_from_stl(X_ref,X_stl);\n\n    Interface::matrix_from_stl(A,A_stl);\n    Interface::matrix_from_stl(B,B_stl);\n    Interface::matrix_from_stl(X,X_stl);\n\n\n    // STL_timer utilities\n\n    STL_timer chronos;\n\n    // Baseline evaluation\n\n    chronos.start_baseline(nb_calc);\n\n    do {\n\n      Interface::copy_matrix(A_ref,A,size);\n      Interface::copy_matrix(B_ref,B,size);\n      Interface::copy_matrix(X_ref,X,size);\n\n\n      //      Interface::matrix_matrix_product(A,B,X,size); This line must be commented !!!!\n    }\n    while(chronos.check());\n\n    chronos.report(true);\n\n    // Time measurement\n\n    chronos.start(nb_calc);\n\n    do {\n\n      Interface::copy_matrix(A_ref,A,size);\n      Interface::copy_matrix(B_ref,B,size);\n      Interface::copy_matrix(X_ref,X,size);\n\n      Interface::matrix_matrix_product(A,B,X,size); // here it is not commented !!!!\n    }\n    while(chronos.check());\n\n    chronos.report(true);\n\n    double time=chronos.calculated_time/2000.0;\n\n    // calculation check\n\n    typename Interface::stl_matrix resu_stl(size);\n\n    Interface::matrix_to_stl(X,resu_stl);\n\n    STL_interface<typename Interface::real_type>::matrix_matrix_product(A_stl,B_stl,X_stl,size);\n\n    typename Interface::real_type error=\n      STL_interface<typename Interface::real_type>::norm_diff(X_stl,resu_stl);\n\n    if (error>1.e-6){\n      INFOS(\"WRONG CALCULATION...residual=\" << error);\n      exit(1);\n    }\n\n    // deallocation and return time\n\n    Interface::free_matrix(A,size);\n    Interface::free_matrix(B,size);\n    Interface::free_matrix(X,size);\n\n    Interface::free_matrix(A_ref,size);\n    Interface::free_matrix(B_ref,size);\n    Interface::free_matrix(X_ref,size);\n\n    return time;\n  }\n\n};\n\n\n#endif\n\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/actions/action_matrix_vector_product.hh",
    "content": "//=====================================================\n// File   :  action_matrix_vector_product.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)>\n// Copyright (C) EDF R&D,  lun sep 30 14:23:19 CEST 2002\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#ifndef ACTION_MATRIX_VECTOR_PRODUCT\n#define ACTION_MATRIX_VECTOR_PRODUCT\n#include \"utilities.h\"\n#include \"STL_interface.hh\"\n#include <string>\n#include \"init/init_function.hh\"\n#include \"init/init_vector.hh\"\n#include \"init/init_matrix.hh\"\n\nusing namespace std;\n\ntemplate<class Interface>\nclass Action_matrix_vector_product {\n\npublic :\n\n  // Ctor\n\n  BTL_DONT_INLINE Action_matrix_vector_product( int size ):_size(size)\n  {\n    MESSAGE(\"Action_matrix_vector_product Ctor\");\n\n    // STL matrix and vector initialization\n\n    init_matrix<pseudo_random>(A_stl,_size);\n    init_vector<pseudo_random>(B_stl,_size);\n    init_vector<null_function>(X_stl,_size);\n    init_vector<null_function>(resu_stl,_size);\n\n    // generic matrix and vector initialization\n\n    Interface::matrix_from_stl(A_ref,A_stl);\n    Interface::matrix_from_stl(A,A_stl);\n    Interface::vector_from_stl(B_ref,B_stl);\n    Interface::vector_from_stl(B,B_stl);\n    Interface::vector_from_stl(X_ref,X_stl);\n    Interface::vector_from_stl(X,X_stl);\n\n  }\n\n  // invalidate copy ctor\n\n  Action_matrix_vector_product( const  Action_matrix_vector_product & )\n  {\n    INFOS(\"illegal call to Action_matrix_vector_product Copy Ctor\");\n    exit(1);\n  }\n\n  // Dtor\n\n  BTL_DONT_INLINE ~Action_matrix_vector_product( void ){\n\n    MESSAGE(\"Action_matrix_vector_product Dtor\");\n\n    // deallocation\n\n    Interface::free_matrix(A,_size);\n    Interface::free_vector(B);\n    Interface::free_vector(X);\n\n    Interface::free_matrix(A_ref,_size);\n    Interface::free_vector(B_ref);\n    Interface::free_vector(X_ref);\n\n  }\n\n  // action name\n\n  static inline std::string name( void )\n  {\n    return \"matrix_vector_\" + Interface::name();\n  }\n\n  double nb_op_base( void ){\n    return 2.0*_size*_size;\n  }\n\n  BTL_DONT_INLINE  void initialize( void ){\n\n    Interface::copy_matrix(A_ref,A,_size);\n    Interface::copy_vector(B_ref,B,_size);\n    Interface::copy_vector(X_ref,X,_size);\n\n  }\n\n  BTL_DONT_INLINE void calculate( void ) {\n      BTL_ASM_COMMENT(\"#begin matrix_vector_product\");\n      Interface::matrix_vector_product(A,B,X,_size);\n      BTL_ASM_COMMENT(\"end matrix_vector_product\");\n  }\n\n  BTL_DONT_INLINE void check_result( void ){\n\n    // calculation check\n\n    Interface::vector_to_stl(X,resu_stl);\n\n    STL_interface<typename Interface::real_type>::matrix_vector_product(A_stl,B_stl,X_stl,_size);\n\n    typename Interface::real_type error=\n      STL_interface<typename Interface::real_type>::norm_diff(X_stl,resu_stl);\n\n    if (error>1.e-5){\n      INFOS(\"WRONG CALCULATION...residual=\" << error);\n      exit(0);\n    }\n\n  }\n\nprivate :\n\n  typename Interface::stl_matrix A_stl;\n  typename Interface::stl_vector B_stl;\n  typename Interface::stl_vector X_stl;\n  typename Interface::stl_vector resu_stl;\n\n  typename Interface::gene_matrix A_ref;\n  typename Interface::gene_vector B_ref;\n  typename Interface::gene_vector X_ref;\n\n  typename Interface::gene_matrix A;\n  typename Interface::gene_vector B;\n  typename Interface::gene_vector X;\n\n\n  int _size;\n\n};\n\n\n#endif\n\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/actions/action_partial_lu.hh",
    "content": "//=====================================================\n// File   :  action_lu_decomp.hh\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#ifndef ACTION_PARTIAL_LU\n#define ACTION_PARTIAL_LU\n#include \"utilities.h\"\n#include \"STL_interface.hh\"\n#include <string>\n#include \"init/init_function.hh\"\n#include \"init/init_vector.hh\"\n#include \"init/init_matrix.hh\"\n\nusing namespace std;\n\ntemplate<class Interface>\nclass Action_partial_lu {\n\npublic :\n\n  // Ctor\n\n  Action_partial_lu( int size ):_size(size)\n  {\n    MESSAGE(\"Action_partial_lu Ctor\");\n\n    // STL vector initialization\n    init_matrix<pseudo_random>(X_stl,_size);\n    init_matrix<null_function>(C_stl,_size);\n\n    // make sure X is invertible\n    for (int i=0; i<_size; ++i)\n      X_stl[i][i] = X_stl[i][i] * 1e2 + 1;\n\n    // generic matrix and vector initialization\n    Interface::matrix_from_stl(X_ref,X_stl);\n    Interface::matrix_from_stl(X,X_stl);\n    Interface::matrix_from_stl(C,C_stl);\n\n    _cost = 2.0*size*size*size/3.0 + size*size;\n  }\n\n  // invalidate copy ctor\n\n  Action_partial_lu( const  Action_partial_lu & )\n  {\n    INFOS(\"illegal call to Action_partial_lu Copy Ctor\");\n    exit(1);\n  }\n\n  // Dtor\n\n  ~Action_partial_lu( void ){\n\n    MESSAGE(\"Action_partial_lu Dtor\");\n\n    // deallocation\n    Interface::free_matrix(X_ref,_size);\n    Interface::free_matrix(X,_size);\n    Interface::free_matrix(C,_size);\n  }\n\n  // action name\n\n  static inline std::string name( void )\n  {\n    return \"partial_lu_decomp_\"+Interface::name();\n  }\n\n  double nb_op_base( void ){\n    return _cost;\n  }\n\n  inline void initialize( void ){\n    Interface::copy_matrix(X_ref,X,_size);\n  }\n\n  inline void calculate( void ) {\n      Interface::partial_lu_decomp(X,C,_size);\n  }\n\n  void check_result( void ){\n    // calculation check\n//     Interface::matrix_to_stl(C,resu_stl);\n\n//     STL_interface<typename Interface::real_type>::lu_decomp(X_stl,C_stl,_size);\n//\n//     typename Interface::real_type error=\n//       STL_interface<typename Interface::real_type>::norm_diff(C_stl,resu_stl);\n//\n//     if (error>1.e-6){\n//       INFOS(\"WRONG CALCULATION...residual=\" << error);\n//       exit(0);\n//     }\n\n  }\n\nprivate :\n\n  typename Interface::stl_matrix X_stl;\n  typename Interface::stl_matrix C_stl;\n\n  typename Interface::gene_matrix X_ref;\n  typename Interface::gene_matrix X;\n  typename Interface::gene_matrix C;\n\n  int _size;\n  double _cost;\n};\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/actions/action_rot.hh",
    "content": "\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#ifndef ACTION_ROT\n#define ACTION_ROT\n#include \"utilities.h\"\n#include \"STL_interface.hh\"\n#include <string>\n#include \"init/init_function.hh\"\n#include \"init/init_vector.hh\"\n#include \"init/init_matrix.hh\"\n\nusing namespace std;\n\ntemplate<class Interface>\nclass Action_rot {\n\npublic :\n\n  // Ctor\n  BTL_DONT_INLINE Action_rot( int size ):_size(size)\n  {\n    MESSAGE(\"Action_rot Ctor\");\n\n    // STL matrix and vector initialization\n    typename Interface::stl_matrix tmp;\n    init_vector<pseudo_random>(A_stl,_size);\n    init_vector<pseudo_random>(B_stl,_size);\n\n    // generic matrix and vector initialization\n    Interface::vector_from_stl(A_ref,A_stl);\n    Interface::vector_from_stl(A,A_stl);\n    Interface::vector_from_stl(B_ref,B_stl);\n    Interface::vector_from_stl(B,B_stl);\n  }\n\n  // invalidate copy ctor\n  Action_rot( const  Action_rot & )\n  {\n    INFOS(\"illegal call to Action_rot Copy Ctor\");\n    exit(1);\n  }\n\n  // Dtor\n  BTL_DONT_INLINE ~Action_rot( void ){\n    MESSAGE(\"Action_rot Dtor\");\n    Interface::free_vector(A);\n    Interface::free_vector(B);\n    Interface::free_vector(A_ref);\n    Interface::free_vector(B_ref);\n  }\n\n  // action name\n  static inline std::string name( void )\n  {\n    return \"rot_\" + Interface::name();\n  }\n\n  double nb_op_base( void ){\n    return 6.0*_size;\n  }\n\n  BTL_DONT_INLINE  void initialize( void ){\n    Interface::copy_vector(A_ref,A,_size);\n    Interface::copy_vector(B_ref,B,_size);\n  }\n\n  BTL_DONT_INLINE void calculate( void ) {\n    BTL_ASM_COMMENT(\"#begin rot\");\n    Interface::rot(A,B,0.5,0.6,_size);\n    BTL_ASM_COMMENT(\"end rot\");\n  }\n\n  BTL_DONT_INLINE void check_result( void ){\n    // calculation check\n//     Interface::vector_to_stl(X,resu_stl);\n\n//     STL_interface<typename Interface::real_type>::rot(A_stl,B_stl,X_stl,_size);\n\n//     typename Interface::real_type error=\n//       STL_interface<typename Interface::real_type>::norm_diff(X_stl,resu_stl);\n\n//     if (error>1.e-3){\n//       INFOS(\"WRONG CALCULATION...residual=\" << error);\n//       exit(0);\n//     }\n\n  }\n\nprivate :\n\n  typename Interface::stl_vector A_stl;\n  typename Interface::stl_vector B_stl;\n\n  typename Interface::gene_vector A_ref;\n  typename Interface::gene_vector B_ref;\n\n  typename Interface::gene_vector A;\n  typename Interface::gene_vector B;\n\n  int _size;\n};\n\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/actions/action_symv.hh",
    "content": "//=====================================================\n// File   :  action_symv.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)>\n// Copyright (C) EDF R&D,  lun sep 30 14:23:19 CEST 2002\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#ifndef ACTION_SYMV\n#define ACTION_SYMV\n#include \"utilities.h\"\n#include \"STL_interface.hh\"\n#include <string>\n#include \"init/init_function.hh\"\n#include \"init/init_vector.hh\"\n#include \"init/init_matrix.hh\"\n\nusing namespace std;\n\ntemplate<class Interface>\nclass Action_symv {\n\npublic :\n\n  // Ctor\n\n  BTL_DONT_INLINE Action_symv( int size ):_size(size)\n  {\n    MESSAGE(\"Action_symv Ctor\");\n\n    // STL matrix and vector initialization\n    init_matrix_symm<pseudo_random>(A_stl,_size);\n    init_vector<pseudo_random>(B_stl,_size);\n    init_vector<null_function>(X_stl,_size);\n    init_vector<null_function>(resu_stl,_size);\n\n    // generic matrix and vector initialization\n    Interface::matrix_from_stl(A_ref,A_stl);\n    Interface::matrix_from_stl(A,A_stl);\n    Interface::vector_from_stl(B_ref,B_stl);\n    Interface::vector_from_stl(B,B_stl);\n    Interface::vector_from_stl(X_ref,X_stl);\n    Interface::vector_from_stl(X,X_stl);\n\n  }\n\n  // invalidate copy ctor\n\n  Action_symv( const  Action_symv & )\n  {\n    INFOS(\"illegal call to Action_symv Copy Ctor\");\n    exit(1);\n  }\n\n  // Dtor\n  BTL_DONT_INLINE ~Action_symv( void ){\n    Interface::free_matrix(A,_size);\n    Interface::free_vector(B);\n    Interface::free_vector(X);\n    Interface::free_matrix(A_ref,_size);\n    Interface::free_vector(B_ref);\n    Interface::free_vector(X_ref);\n  }\n\n  // action name\n\n  static inline std::string name( void )\n  {\n    return \"symv_\" + Interface::name();\n  }\n\n  double nb_op_base( void ){\n    return 2.0*_size*_size;\n  }\n\n  BTL_DONT_INLINE  void initialize( void ){\n\n    Interface::copy_matrix(A_ref,A,_size);\n    Interface::copy_vector(B_ref,B,_size);\n    Interface::copy_vector(X_ref,X,_size);\n\n  }\n\n  BTL_DONT_INLINE void calculate( void ) {\n      BTL_ASM_COMMENT(\"#begin symv\");\n      Interface::symv(A,B,X,_size);\n      BTL_ASM_COMMENT(\"end symv\");\n  }\n\n  BTL_DONT_INLINE void check_result( void ){\n    if (_size>128) return;\n    // calculation check\n    Interface::vector_to_stl(X,resu_stl);\n\n    STL_interface<typename Interface::real_type>::symv(A_stl,B_stl,X_stl,_size);\n\n    typename Interface::real_type error=\n      STL_interface<typename Interface::real_type>::norm_diff(X_stl,resu_stl);\n\n    if (error>1.e-5){\n      INFOS(\"WRONG CALCULATION...residual=\" << error);\n      exit(0);\n    }\n\n  }\n\nprivate :\n\n  typename Interface::stl_matrix A_stl;\n  typename Interface::stl_vector B_stl;\n  typename Interface::stl_vector X_stl;\n  typename Interface::stl_vector resu_stl;\n\n  typename Interface::gene_matrix A_ref;\n  typename Interface::gene_vector B_ref;\n  typename Interface::gene_vector X_ref;\n\n  typename Interface::gene_matrix A;\n  typename Interface::gene_vector B;\n  typename Interface::gene_vector X;\n\n\n  int _size;\n\n};\n\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/actions/action_syr2.hh",
    "content": "//=====================================================\n// File   :  action_syr2.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)>\n// Copyright (C) EDF R&D,  lun sep 30 14:23:19 CEST 2002\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#ifndef ACTION_SYR2\n#define ACTION_SYR2\n#include \"utilities.h\"\n#include \"STL_interface.hh\"\n#include <string>\n#include \"init/init_function.hh\"\n#include \"init/init_vector.hh\"\n#include \"init/init_matrix.hh\"\n\nusing namespace std;\n\ntemplate<class Interface>\nclass Action_syr2 {\n\npublic :\n\n  // Ctor\n\n  BTL_DONT_INLINE Action_syr2( int size ):_size(size)\n  {\n    // STL matrix and vector initialization\n    typename Interface::stl_matrix tmp;\n    init_matrix<pseudo_random>(A_stl,_size);\n    init_vector<pseudo_random>(B_stl,_size);\n    init_vector<pseudo_random>(X_stl,_size);\n    init_vector<null_function>(resu_stl,_size);\n\n    // generic matrix and vector initialization\n    Interface::matrix_from_stl(A_ref,A_stl);\n    Interface::matrix_from_stl(A,A_stl);\n    Interface::vector_from_stl(B_ref,B_stl);\n    Interface::vector_from_stl(B,B_stl);\n    Interface::vector_from_stl(X_ref,X_stl);\n    Interface::vector_from_stl(X,X_stl);\n  }\n\n  // invalidate copy ctor\n  Action_syr2( const  Action_syr2 & )\n  {\n    INFOS(\"illegal call to Action_syr2 Copy Ctor\");\n    exit(1);\n  }\n\n  // Dtor\n  BTL_DONT_INLINE ~Action_syr2( void ){\n    Interface::free_matrix(A,_size);\n    Interface::free_vector(B);\n    Interface::free_vector(X);\n    Interface::free_matrix(A_ref,_size);\n    Interface::free_vector(B_ref);\n    Interface::free_vector(X_ref);\n  }\n\n  // action name\n\n  static inline std::string name( void )\n  {\n    return \"syr2_\" + Interface::name();\n  }\n\n  double nb_op_base( void ){\n    return 2.0*_size*_size;\n  }\n\n  BTL_DONT_INLINE  void initialize( void ){\n    Interface::copy_matrix(A_ref,A,_size);\n    Interface::copy_vector(B_ref,B,_size);\n    Interface::copy_vector(X_ref,X,_size);\n  }\n\n  BTL_DONT_INLINE void calculate( void ) {\n      BTL_ASM_COMMENT(\"#begin syr2\");\n      Interface::syr2(A,B,X,_size);\n      BTL_ASM_COMMENT(\"end syr2\");\n  }\n\n  BTL_DONT_INLINE void check_result( void ){\n    // calculation check\n    Interface::vector_to_stl(X,resu_stl);\n\n    STL_interface<typename Interface::real_type>::syr2(A_stl,B_stl,X_stl,_size);\n\n    typename Interface::real_type error=\n      STL_interface<typename Interface::real_type>::norm_diff(X_stl,resu_stl);\n\n    if (error>1.e-3){\n      INFOS(\"WRONG CALCULATION...residual=\" << error);\n//       exit(0);\n    }\n\n  }\n\nprivate :\n\n  typename Interface::stl_matrix A_stl;\n  typename Interface::stl_vector B_stl;\n  typename Interface::stl_vector X_stl;\n  typename Interface::stl_vector resu_stl;\n\n  typename Interface::gene_matrix A_ref;\n  typename Interface::gene_vector B_ref;\n  typename Interface::gene_vector X_ref;\n\n  typename Interface::gene_matrix A;\n  typename Interface::gene_vector B;\n  typename Interface::gene_vector X;\n\n\n  int _size;\n\n};\n\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/actions/action_trisolve.hh",
    "content": "//=====================================================\n// File   :  action_trisolve.hh\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#ifndef ACTION_TRISOLVE\n#define ACTION_TRISOLVE\n#include \"utilities.h\"\n#include \"STL_interface.hh\"\n#include <string>\n#include \"init/init_function.hh\"\n#include \"init/init_vector.hh\"\n#include \"init/init_matrix.hh\"\n\nusing namespace std;\n\ntemplate<class Interface>\nclass Action_trisolve {\n\npublic :\n\n  // Ctor\n\n  Action_trisolve( int size ):_size(size)\n  {\n    MESSAGE(\"Action_trisolve Ctor\");\n\n    // STL vector initialization\n    init_matrix<pseudo_random>(L_stl,_size);\n    init_vector<pseudo_random>(B_stl,_size);\n    init_vector<null_function>(X_stl,_size);\n    for (int j=0; j<_size; ++j)\n    {\n      for (int i=0; i<j; ++i)\n        L_stl[j][i] = 0;\n      L_stl[j][j] += 3;\n    }\n\n    init_vector<null_function>(resu_stl,_size);\n\n    // generic matrix and vector initialization\n    Interface::matrix_from_stl(L,L_stl);\n    Interface::vector_from_stl(X,X_stl);\n    Interface::vector_from_stl(B,B_stl);\n\n    _cost = 0;\n    for (int j=0; j<_size; ++j)\n    {\n      _cost += 2*j + 1;\n    }\n  }\n\n  // invalidate copy ctor\n\n  Action_trisolve( const  Action_trisolve & )\n  {\n    INFOS(\"illegal call to Action_trisolve Copy Ctor\");\n    exit(1);\n  }\n\n  // Dtor\n\n  ~Action_trisolve( void ){\n\n    MESSAGE(\"Action_trisolve Dtor\");\n\n    // deallocation\n    Interface::free_matrix(L,_size);\n    Interface::free_vector(B);\n    Interface::free_vector(X);\n  }\n\n  // action name\n\n  static inline std::string name( void )\n  {\n    return \"trisolve_vector_\"+Interface::name();\n  }\n\n  double nb_op_base( void ){\n    return _cost;\n  }\n\n  inline void initialize( void ){\n    //Interface::copy_vector(X_ref,X,_size);\n  }\n\n  inline void calculate( void ) {\n      Interface::trisolve_lower(L,B,X,_size);\n  }\n\n  void check_result(){\n    if (_size>128) return;\n    // calculation check\n    Interface::vector_to_stl(X,resu_stl);\n\n    STL_interface<typename Interface::real_type>::trisolve_lower(L_stl,B_stl,X_stl,_size);\n\n    typename Interface::real_type error=\n      STL_interface<typename Interface::real_type>::norm_diff(X_stl,resu_stl);\n\n    if (error>1.e-4){\n      INFOS(\"WRONG CALCULATION...residual=\" << error);\n      exit(2);\n    } //else INFOS(\"CALCULATION OK...residual=\" << error);\n\n  }\n\nprivate :\n\n  typename Interface::stl_matrix L_stl;\n  typename Interface::stl_vector X_stl;\n  typename Interface::stl_vector B_stl;\n  typename Interface::stl_vector resu_stl;\n\n  typename Interface::gene_matrix L;\n  typename Interface::gene_vector X;\n  typename Interface::gene_vector B;\n\n  int _size;\n  double _cost;\n};\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/actions/action_trisolve_matrix.hh",
    "content": "//=====================================================\n// File   :  action_matrix_matrix_product.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)>\n// Copyright (C) EDF R&D,  lun sep 30 14:23:19 CEST 2002\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#ifndef ACTION_TRISOLVE_MATRIX_PRODUCT\n#define ACTION_TRISOLVE_MATRIX_PRODUCT\n#include \"utilities.h\"\n#include \"STL_interface.hh\"\n#include <string>\n#include \"init/init_function.hh\"\n#include \"init/init_vector.hh\"\n#include \"init/init_matrix.hh\"\n\nusing namespace std;\n\ntemplate<class Interface>\nclass Action_trisolve_matrix {\n\npublic :\n\n  // Ctor\n\n  Action_trisolve_matrix( int size ):_size(size)\n  {\n    MESSAGE(\"Action_trisolve_matrix Ctor\");\n\n    // STL matrix and vector initialization\n\n    init_matrix<pseudo_random>(A_stl,_size);\n    init_matrix<pseudo_random>(B_stl,_size);\n    init_matrix<null_function>(X_stl,_size);\n    init_matrix<null_function>(resu_stl,_size);\n\n    for (int j=0; j<_size; ++j)\n    {\n      for (int i=0; i<j; ++i)\n        A_stl[j][i] = 0;\n      A_stl[j][j] += 3;\n    }\n\n    // generic matrix and vector initialization\n\n    Interface::matrix_from_stl(A_ref,A_stl);\n    Interface::matrix_from_stl(B_ref,B_stl);\n    Interface::matrix_from_stl(X_ref,X_stl);\n\n    Interface::matrix_from_stl(A,A_stl);\n    Interface::matrix_from_stl(B,B_stl);\n    Interface::matrix_from_stl(X,X_stl);\n\n    _cost = 0;\n    for (int j=0; j<_size; ++j)\n    {\n      _cost += 2*j + 1;\n    }\n    _cost *= _size;\n  }\n\n  // invalidate copy ctor\n\n  Action_trisolve_matrix( const  Action_trisolve_matrix & )\n  {\n    INFOS(\"illegal call to Action_trisolve_matrix Copy Ctor\");\n    exit(0);\n  }\n\n  // Dtor\n\n  ~Action_trisolve_matrix( void ){\n\n    MESSAGE(\"Action_trisolve_matrix Dtor\");\n\n    // deallocation\n\n    Interface::free_matrix(A,_size);\n    Interface::free_matrix(B,_size);\n    Interface::free_matrix(X,_size);\n\n    Interface::free_matrix(A_ref,_size);\n    Interface::free_matrix(B_ref,_size);\n    Interface::free_matrix(X_ref,_size);\n\n  }\n\n  // action name\n\n  static inline std::string name( void )\n  {\n    return \"trisolve_matrix_\"+Interface::name();\n  }\n\n  double nb_op_base( void ){\n    return _cost;\n  }\n\n  inline void initialize( void ){\n\n    Interface::copy_matrix(A_ref,A,_size);\n    Interface::copy_matrix(B_ref,B,_size);\n    Interface::copy_matrix(X_ref,X,_size);\n\n  }\n\n  inline void calculate( void ) {\n      Interface::trisolve_lower_matrix(A,B,X,_size);\n  }\n\n  void check_result( void ){\n\n    // calculation check\n\n//     Interface::matrix_to_stl(X,resu_stl);\n//\n//     STL_interface<typename Interface::real_type>::matrix_matrix_product(A_stl,B_stl,X_stl,_size);\n//\n//     typename Interface::real_type error=\n//       STL_interface<typename Interface::real_type>::norm_diff(X_stl,resu_stl);\n//\n//     if (error>1.e-6){\n//       INFOS(\"WRONG CALCULATION...residual=\" << error);\n// //       exit(1);\n//     }\n\n  }\n\nprivate :\n\n  typename Interface::stl_matrix A_stl;\n  typename Interface::stl_matrix B_stl;\n  typename Interface::stl_matrix X_stl;\n  typename Interface::stl_matrix resu_stl;\n\n  typename Interface::gene_matrix A_ref;\n  typename Interface::gene_matrix B_ref;\n  typename Interface::gene_matrix X_ref;\n\n  typename Interface::gene_matrix A;\n  typename Interface::gene_matrix B;\n  typename Interface::gene_matrix X;\n\n  int _size;\n  double _cost;\n\n};\n\n\n#endif\n\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/actions/action_trmm.hh",
    "content": "//=====================================================\n// File   :  action_matrix_matrix_product.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)>\n// Copyright (C) EDF R&D,  lun sep 30 14:23:19 CEST 2002\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#ifndef ACTION_TRMM\n#define ACTION_TRMM\n#include \"utilities.h\"\n#include \"STL_interface.hh\"\n#include <string>\n#include \"init/init_function.hh\"\n#include \"init/init_vector.hh\"\n#include \"init/init_matrix.hh\"\n\nusing namespace std;\n\ntemplate<class Interface>\nclass Action_trmm {\n\npublic :\n\n  // Ctor\n\n  Action_trmm( int size ):_size(size)\n  {\n    MESSAGE(\"Action_trmm Ctor\");\n\n    // STL matrix and vector initialization\n\n    init_matrix<pseudo_random>(A_stl,_size);\n    init_matrix<pseudo_random>(B_stl,_size);\n    init_matrix<null_function>(X_stl,_size);\n    init_matrix<null_function>(resu_stl,_size);\n\n    for (int j=0; j<_size; ++j)\n    {\n      for (int i=0; i<j; ++i)\n        A_stl[j][i] = 0;\n      A_stl[j][j] += 3;\n    }\n\n    // generic matrix and vector initialization\n\n    Interface::matrix_from_stl(A_ref,A_stl);\n    Interface::matrix_from_stl(B_ref,B_stl);\n    Interface::matrix_from_stl(X_ref,X_stl);\n\n    Interface::matrix_from_stl(A,A_stl);\n    Interface::matrix_from_stl(B,B_stl);\n    Interface::matrix_from_stl(X,X_stl);\n\n    _cost = 0;\n    for (int j=0; j<_size; ++j)\n    {\n      _cost += 2*j + 1;\n    }\n    _cost *= _size;\n  }\n\n  // invalidate copy ctor\n\n  Action_trmm( const  Action_trmm & )\n  {\n    INFOS(\"illegal call to Action_trmm Copy Ctor\");\n    exit(0);\n  }\n\n  // Dtor\n\n  ~Action_trmm( void ){\n\n    MESSAGE(\"Action_trmm Dtor\");\n\n    // deallocation\n\n    Interface::free_matrix(A,_size);\n    Interface::free_matrix(B,_size);\n    Interface::free_matrix(X,_size);\n\n    Interface::free_matrix(A_ref,_size);\n    Interface::free_matrix(B_ref,_size);\n    Interface::free_matrix(X_ref,_size);\n\n  }\n\n  // action name\n\n  static inline std::string name( void )\n  {\n    return \"trmm_\"+Interface::name();\n  }\n\n  double nb_op_base( void ){\n    return _cost;\n  }\n\n  inline void initialize( void ){\n\n    Interface::copy_matrix(A_ref,A,_size);\n    Interface::copy_matrix(B_ref,B,_size);\n    Interface::copy_matrix(X_ref,X,_size);\n\n  }\n\n  inline void calculate( void ) {\n      Interface::trmm(A,B,X,_size);\n  }\n\n  void check_result( void ){\n\n    // calculation check\n\n//     Interface::matrix_to_stl(X,resu_stl);\n//\n//     STL_interface<typename Interface::real_type>::matrix_matrix_product(A_stl,B_stl,X_stl,_size);\n//\n//     typename Interface::real_type error=\n//       STL_interface<typename Interface::real_type>::norm_diff(X_stl,resu_stl);\n//\n//     if (error>1.e-6){\n//       INFOS(\"WRONG CALCULATION...residual=\" << error);\n// //       exit(1);\n//     }\n\n  }\n\nprivate :\n\n  typename Interface::stl_matrix A_stl;\n  typename Interface::stl_matrix B_stl;\n  typename Interface::stl_matrix X_stl;\n  typename Interface::stl_matrix resu_stl;\n\n  typename Interface::gene_matrix A_ref;\n  typename Interface::gene_matrix B_ref;\n  typename Interface::gene_matrix X_ref;\n\n  typename Interface::gene_matrix A;\n  typename Interface::gene_matrix B;\n  typename Interface::gene_matrix X;\n\n  int _size;\n  double _cost;\n\n};\n\n\n#endif\n\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/actions/basic_actions.hh",
    "content": "\n#include \"action_axpy.hh\"\n#include \"action_axpby.hh\"\n\n#include \"action_matrix_vector_product.hh\"\n#include \"action_atv_product.hh\"\n\n#include \"action_matrix_matrix_product.hh\"\n#include \"action_ata_product.hh\"\n#include \"action_aat_product.hh\"\n\n#include \"action_trisolve.hh\"\n#include \"action_trmm.hh\"\n#include \"action_symv.hh\"\n// #include \"action_symm.hh\"\n#include \"action_syr2.hh\"\n#include \"action_ger.hh\"\n#include \"action_rot.hh\"\n\n// #include \"action_lu_solve.hh\"\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/cmake/FindACML.cmake",
    "content": "\nif (ACML_LIBRARIES)\n  set(ACML_FIND_QUIETLY TRUE)\nendif ()\n\nfind_library(ACML_LIBRARIES\n  NAMES\n  acml_mp acml_mv\n  PATHS\n  $ENV{ACMLDIR}/lib\n  $ENV{ACML_DIR}/lib\n  ${LIB_INSTALL_DIR}\n)\n\nfind_file(ACML_LIBRARIES\n  NAMES\n  libacml_mp.so\n  PATHS\n  /usr/lib\n  /usr/lib64\n  $ENV{ACMLDIR}/lib\n  ${LIB_INSTALL_DIR}\n)\n\nif(NOT ACML_LIBRARIES)\n    message(STATUS \"Multi-threaded library not found, looking for single-threaded\")\n    find_library(ACML_LIBRARIES\n        NAMES\n        acml acml_mv\n        PATHS\n        $ENV{ACMLDIR}/lib\n        $ENV{ACML_DIR}/lib\n        ${LIB_INSTALL_DIR}\n        )\n    find_file(ACML_LIBRARIES\n        libacml.so libacml_mv.so\n        PATHS\n        /usr/lib\n        /usr/lib64\n        $ENV{ACMLDIR}/lib\n        ${LIB_INSTALL_DIR}\n        )\nendif()\n\n\n\n\ninclude(FindPackageHandleStandardArgs)\nfind_package_handle_standard_args(ACML DEFAULT_MSG ACML_LIBRARIES)\n\nmark_as_advanced(ACML_LIBRARIES)\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/cmake/FindATLAS.cmake",
    "content": "\nif (ATLAS_LIBRARIES)\n  set(ATLAS_FIND_QUIETLY TRUE)\nendif ()\n\nfind_file(ATLAS_LIB libatlas.so.3 PATHS /usr/lib /usr/lib/atlas /usr/lib64 /usr/lib64/atlas $ENV{ATLASDIR} ${LIB_INSTALL_DIR})\nfind_library(ATLAS_LIB satlas PATHS $ENV{ATLASDIR} ${LIB_INSTALL_DIR})\n\nfind_file(ATLAS_LAPACK NAMES liblapack_atlas.so.3 liblapack.so.3 PATHS /usr/lib /usr/lib/atlas /usr/lib64 /usr/lib64/atlas $ENV{ATLASDIR} ${LIB_INSTALL_DIR})\nfind_library(ATLAS_LAPACK NAMES lapack_atlas lapack PATHS $ENV{ATLASDIR} ${LIB_INSTALL_DIR})\n\nfind_file(ATLAS_F77BLAS libf77blas.so.3 PATHS /usr/lib /usr/lib/atlas /usr/lib64 /usr/lib64/atlas $ENV{ATLASDIR} ${LIB_INSTALL_DIR})\nfind_library(ATLAS_F77BLAS f77blas PATHS $ENV{ATLASDIR} ${LIB_INSTALL_DIR})\n\nif(ATLAS_LIB AND ATLAS_CBLAS AND ATLAS_LAPACK AND ATLAS_F77BLAS)\n\n  set(ATLAS_LIBRARIES ${ATLAS_LAPACK}  ${ATLAS_LIB})\n  \n  # search the default lapack lib link to it\n  find_file(ATLAS_REFERENCE_LAPACK liblapack.so.3 PATHS /usr/lib /usr/lib64)\n  find_library(ATLAS_REFERENCE_LAPACK NAMES lapack)\n#   if(ATLAS_REFERENCE_LAPACK)\n#     set(ATLAS_LIBRARIES ${ATLAS_LIBRARIES} ${ATLAS_REFERENCE_LAPACK})\n#   endif()\n  \nendif()\n\ninclude(FindPackageHandleStandardArgs)\nfind_package_handle_standard_args(ATLAS DEFAULT_MSG ATLAS_LIBRARIES)\n\nmark_as_advanced(ATLAS_LIBRARIES)\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/cmake/FindBLAZE.cmake",
    "content": "# - Try to find eigen2 headers\n# Once done this will define\n#\n#  BLAZE_FOUND - system has blaze lib\n#  BLAZE_INCLUDE_DIR - the blaze include directory\n#\n# Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n# Adapted from FindEigen.cmake:\n# Copyright (c) 2006, 2007 Montel Laurent, <montel@kde.org>\n# Redistribution and use is allowed according to the terms of the BSD license.\n# For details see the accompanying COPYING-CMAKE-SCRIPTS file.\n\nif (BLAZE_INCLUDE_DIR)\n\n  # in cache already\n  set(BLAZE_FOUND TRUE)\n\nelse ()\n\nfind_path(BLAZE_INCLUDE_DIR NAMES blaze/Blaze.h\n     PATHS\n     ${INCLUDE_INSTALL_DIR}\n   )\n\ninclude(FindPackageHandleStandardArgs)\nfind_package_handle_standard_args(BLAZE DEFAULT_MSG BLAZE_INCLUDE_DIR)\n\nmark_as_advanced(BLAZE_INCLUDE_DIR)\n\nendif()\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/cmake/FindBlitz.cmake",
    "content": "# - Try to find blitz lib\n# Once done this will define\n#\n#  BLITZ_FOUND - system has blitz lib\n#  BLITZ_INCLUDES - the blitz include directory\n#  BLITZ_LIBRARIES - The libraries needed to use blitz\n\n# Copyright (c) 2006, Montel Laurent, <montel@kde.org>\n# Copyright (c) 2007, Allen Winter, <winter@kde.org>\n# Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n# Redistribution and use is allowed according to the terms of the BSD license.\n# For details see the accompanying COPYING-CMAKE-SCRIPTS file.\n\n# include(FindLibraryWithDebug)\n\nif (BLITZ_INCLUDES AND BLITZ_LIBRARIES)\n  set(Blitz_FIND_QUIETLY TRUE)\nendif ()\n\nfind_path(BLITZ_INCLUDES\n  NAMES\n  blitz/array.h\n  PATH_SUFFIXES blitz*\n  PATHS\n  $ENV{BLITZDIR}/include\n  ${INCLUDE_INSTALL_DIR}\n)\n\nfind_library(BLITZ_LIBRARIES\n  blitz\n  PATHS\n  $ENV{BLITZDIR}/lib\n  ${LIB_INSTALL_DIR}\n)\n\ninclude(FindPackageHandleStandardArgs)\nfind_package_handle_standard_args(Blitz DEFAULT_MSG\n                                  BLITZ_INCLUDES BLITZ_LIBRARIES)\n\nmark_as_advanced(BLITZ_INCLUDES BLITZ_LIBRARIES)\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/cmake/FindCBLAS.cmake",
    "content": "# include(FindLibraryWithDebug)\n\nif (CBLAS_INCLUDES AND CBLAS_LIBRARIES)\n  set(CBLAS_FIND_QUIETLY TRUE)\nendif ()\n\nfind_path(CBLAS_INCLUDES\n  NAMES\n  cblas.h\n  PATHS\n  $ENV{CBLASDIR}/include\n  ${INCLUDE_INSTALL_DIR}\n)\n\nfind_library(CBLAS_LIBRARIES\n  cblas\n  PATHS\n  $ENV{CBLASDIR}/lib\n  ${LIB_INSTALL_DIR}\n)\n\nfind_file(CBLAS_LIBRARIES\n  libcblas.so.3\n  PATHS\n  /usr/lib\n  /usr/lib64\n  $ENV{CBLASDIR}/lib\n  ${LIB_INSTALL_DIR}\n)\n\ninclude(FindPackageHandleStandardArgs)\nfind_package_handle_standard_args(CBLAS DEFAULT_MSG\n                                  CBLAS_INCLUDES CBLAS_LIBRARIES)\n\nmark_as_advanced(CBLAS_INCLUDES CBLAS_LIBRARIES)\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/cmake/FindGMM.cmake",
    "content": "if (GMM_INCLUDE_DIR)\n  # in cache already\n  set(GMM_FOUND TRUE)\nelse ()\n\nfind_path(GMM_INCLUDE_DIR NAMES gmm/gmm.h\n     PATHS\n     ${INCLUDE_INSTALL_DIR}\n     ${GMM_INCLUDE_PATH}\n   )\n\ninclude(FindPackageHandleStandardArgs)\nFIND_PACKAGE_HANDLE_STANDARD_ARGS(GMM DEFAULT_MSG GMM_INCLUDE_DIR )\n\nmark_as_advanced(GMM_INCLUDE_DIR)\n\nendif()\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/cmake/FindMKL.cmake",
    "content": "\nif (MKL_LIBRARIES)\n  set(MKL_FIND_QUIETLY TRUE)\nendif ()\n\nif(CMAKE_MINOR_VERSION GREATER 4)\n\nif(${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL \"x86_64\")\n\nfind_library(MKL_LIBRARIES\n  mkl_core\n  PATHS\n  $ENV{MKLLIB}\n  /opt/intel/mkl/*/lib/em64t\n  /opt/intel/Compiler/*/*/mkl/lib/em64t\n  ${LIB_INSTALL_DIR}\n)\n\nfind_library(MKL_GUIDE\n  guide\n  PATHS\n  $ENV{MKLLIB}\n  /opt/intel/mkl/*/lib/em64t\n  /opt/intel/Compiler/*/*/mkl/lib/em64t\n  /opt/intel/Compiler/*/*/lib/intel64\n  ${LIB_INSTALL_DIR}\n)\n\nif(MKL_LIBRARIES AND MKL_GUIDE)\n  set(MKL_LIBRARIES ${MKL_LIBRARIES} mkl_intel_lp64 mkl_sequential ${MKL_GUIDE} pthread)\nendif()\n\nelse()\n\nfind_library(MKL_LIBRARIES\n  mkl_core\n  PATHS\n  $ENV{MKLLIB}\n  /opt/intel/mkl/*/lib/32\n  /opt/intel/Compiler/*/*/mkl/lib/32\n  ${LIB_INSTALL_DIR}\n)\n\nfind_library(MKL_GUIDE\n  guide\n  PATHS\n  $ENV{MKLLIB}\n  /opt/intel/mkl/*/lib/32\n  /opt/intel/Compiler/*/*/mkl/lib/32\n  /opt/intel/Compiler/*/*/lib/intel32\n  ${LIB_INSTALL_DIR}\n)\n\nif(MKL_LIBRARIES AND MKL_GUIDE)\n  set(MKL_LIBRARIES ${MKL_LIBRARIES} mkl_intel mkl_sequential ${MKL_GUIDE} pthread)\nendif()\n\nendif()\n\nendif()\n\ninclude(FindPackageHandleStandardArgs)\nfind_package_handle_standard_args(MKL DEFAULT_MSG MKL_LIBRARIES)\n\nmark_as_advanced(MKL_LIBRARIES)\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/cmake/FindMTL4.cmake",
    "content": "# - Try to find eigen2 headers\n# Once done this will define\n#\n#  MTL4_FOUND - system has eigen2 lib\n#  MTL4_INCLUDE_DIR - the eigen2 include directory\n#\n# Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n# Adapted from FindEigen.cmake:\n# Copyright (c) 2006, 2007 Montel Laurent, <montel@kde.org>\n# Redistribution and use is allowed according to the terms of the BSD license.\n# For details see the accompanying COPYING-CMAKE-SCRIPTS file.\n\nif (MTL4_INCLUDE_DIR)\n\n  # in cache already\n  set(MTL4_FOUND TRUE)\n\nelse ()\n\nfind_path(MTL4_INCLUDE_DIR NAMES boost/numeric/mtl/mtl.hpp\n     PATHS\n     ${INCLUDE_INSTALL_DIR}\n   )\n\ninclude(FindPackageHandleStandardArgs)\nfind_package_handle_standard_args(MTL4 DEFAULT_MSG MTL4_INCLUDE_DIR)\n\nmark_as_advanced(MTL4_INCLUDE_DIR)\n\nendif()\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/cmake/FindOPENBLAS.cmake",
    "content": "\nif (OPENBLAS_LIBRARIES)\n  set(OPENBLAS_FIND_QUIETLY TRUE)\nendif ()\n\nfind_file(OPENBLAS_LIBRARIES NAMES libopenblas.so libopenblas.so.0 PATHS /usr/lib /usr/lib64 $ENV{OPENBLASDIR} ${LIB_INSTALL_DIR})\nfind_library(OPENBLAS_LIBRARIES openblas PATHS $ENV{OPENBLASDIR} ${LIB_INSTALL_DIR})\n\nif(OPENBLAS_LIBRARIES AND CMAKE_COMPILER_IS_GNUCXX)\n  set(OPENBLAS_LIBRARIES ${OPENBLAS_LIBRARIES} \"-lpthread -lgfortran\")\nendif()\n\ninclude(FindPackageHandleStandardArgs)\nfind_package_handle_standard_args(OPENBLAS DEFAULT_MSG\n                                  OPENBLAS_LIBRARIES)\n\nmark_as_advanced(OPENBLAS_LIBRARIES)\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/cmake/FindPackageHandleStandardArgs.cmake",
    "content": "# FIND_PACKAGE_HANDLE_STANDARD_ARGS(NAME (DEFAULT_MSG|\"Custom failure message\") VAR1 ... )\n#\n# This macro is intended to be used in FindXXX.cmake modules files.\n# It handles the REQUIRED and QUIET argument to find_package() and\n# it also sets the <UPPERCASED_NAME>_FOUND variable.\n# The package is found if all variables listed are TRUE.\n# Example:\n#\n#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 DEFAULT_MSG LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)\n#\n# LibXml2 is considered to be found, if both LIBXML2_LIBRARIES and \n# LIBXML2_INCLUDE_DIR are valid. Then also LIBXML2_FOUND is set to TRUE.\n# If it is not found and REQUIRED was used, it fails with FATAL_ERROR, \n# independent whether QUIET was used or not.\n#\n# If it is found, the location is reported using the VAR1 argument, so \n# here a message \"Found LibXml2: /usr/lib/libxml2.so\" will be printed out.\n# If the second argument is DEFAULT_MSG, the message in the failure case will \n# be \"Could NOT find LibXml2\", if you don't like this message you can specify\n# your own custom failure message there.\n\nmacro(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FAIL_MSG _VAR1 )\n\n  if(\"${_FAIL_MSG}\" STREQUAL \"DEFAULT_MSG\")\n    if (${_NAME}_FIND_REQUIRED)\n      set(_FAIL_MESSAGE \"Could not find REQUIRED package ${_NAME}\")\n    else (${_NAME}_FIND_REQUIRED)\n      set(_FAIL_MESSAGE \"Could not find OPTIONAL package ${_NAME}\")\n    endif (${_NAME}_FIND_REQUIRED)\n  else(\"${_FAIL_MSG}\" STREQUAL \"DEFAULT_MSG\")\n    set(_FAIL_MESSAGE \"${_FAIL_MSG}\")\n  endif(\"${_FAIL_MSG}\" STREQUAL \"DEFAULT_MSG\")\n\n  string(TOUPPER ${_NAME} _NAME_UPPER)\n\n  set(${_NAME_UPPER}_FOUND TRUE)\n  if(NOT ${_VAR1})\n    set(${_NAME_UPPER}_FOUND FALSE)\n  endif(NOT ${_VAR1})\n\n  foreach(_CURRENT_VAR ${ARGN})\n    if(NOT ${_CURRENT_VAR})\n      set(${_NAME_UPPER}_FOUND FALSE)\n    endif(NOT ${_CURRENT_VAR})\n  endforeach(_CURRENT_VAR)\n\n  if (${_NAME_UPPER}_FOUND)\n    if (NOT ${_NAME}_FIND_QUIETLY)\n        message(STATUS \"Found ${_NAME}: ${${_VAR1}}\")\n    endif (NOT ${_NAME}_FIND_QUIETLY)\n  else (${_NAME_UPPER}_FOUND)\n    if (${_NAME}_FIND_REQUIRED)\n        message(FATAL_ERROR \"${_FAIL_MESSAGE}\")\n    else (${_NAME}_FIND_REQUIRED)\n      if (NOT ${_NAME}_FIND_QUIETLY)\n        message(STATUS \"${_FAIL_MESSAGE}\")\n      endif (NOT ${_NAME}_FIND_QUIETLY)\n    endif (${_NAME}_FIND_REQUIRED)\n  endif (${_NAME_UPPER}_FOUND)\nendmacro(FIND_PACKAGE_HANDLE_STANDARD_ARGS)\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/cmake/FindTvmet.cmake",
    "content": "# - Try to find tvmet headers\n# Once done this will define\n#\n#  TVMET_FOUND - system has tvmet lib\n#  TVMET_INCLUDE_DIR - the tvmet include directory\n#\n# Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n# Adapted from FindEigen.cmake:\n# Copyright (c) 2006, 2007 Montel Laurent, <montel@kde.org>\n# Redistribution and use is allowed according to the terms of the BSD license.\n# For details see the accompanying COPYING-CMAKE-SCRIPTS file.\n\nif (TVMET_INCLUDE_DIR)\n\n  # in cache already\n  set(TVMET_FOUND TRUE)\n\nelse ()\n\nfind_path(TVMET_INCLUDE_DIR NAMES tvmet/tvmet.h\n     PATHS\n     ${TVMETDIR}/\n     ${INCLUDE_INSTALL_DIR}\n   )\n\ninclude(FindPackageHandleStandardArgs)\nfind_package_handle_standard_args(Tvmet DEFAULT_MSG TVMET_INCLUDE_DIR)\n\nmark_as_advanced(TVMET_INCLUDE_DIR)\n\nendif()\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/cmake/MacroOptionalAddSubdirectory.cmake",
    "content": "# - MACRO_OPTIONAL_ADD_SUBDIRECTORY() combines add_subdirectory() with an option()\n# MACRO_OPTIONAL_ADD_SUBDIRECTORY( <dir> )\n# If you use MACRO_OPTIONAL_ADD_SUBDIRECTORY() instead of add_subdirectory(),\n# this will have two effects\n# 1 - CMake will not complain if the directory doesn't exist\n#     This makes sense if you want to distribute just one of the subdirs\n#     in a source package, e.g. just one of the subdirs in kdeextragear.\n# 2 - If the directory exists, it will offer an option to skip the \n#     subdirectory.\n#     This is useful if you want to compile only a subset of all\n#     directories.\n\n# Copyright (c) 2007, Alexander Neundorf, <neundorf@kde.org>\n#\n# Redistribution and use is allowed according to the terms of the BSD license.\n# For details see the accompanying COPYING-CMAKE-SCRIPTS file.\n\n\nmacro (MACRO_OPTIONAL_ADD_SUBDIRECTORY _dir )\n   get_filename_component(_fullPath ${_dir} ABSOLUTE)\n   if(EXISTS ${_fullPath})\n      if(${ARGC} EQUAL 2)\n        option(BUILD_${_dir} \"Build directory ${_dir}\" ${ARGV1})\n      else(${ARGC} EQUAL 2)\n        option(BUILD_${_dir} \"Build directory ${_dir}\" TRUE)\n      endif(${ARGC} EQUAL 2)\n      if(BUILD_${_dir})\n         add_subdirectory(${_dir})\n      endif(BUILD_${_dir})\n   endif(EXISTS ${_fullPath})\nendmacro (MACRO_OPTIONAL_ADD_SUBDIRECTORY)\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/data/CMakeLists.txt",
    "content": "\nadd_custom_target(copy_scripts)\n\nset(script_files go_mean mk_mean_script.sh mk_new_gnuplot.sh\n    perlib_plot_settings.txt action_settings.txt gnuplot_common_settings.hh )\n\nforeach(script_file ${script_files})\nadd_custom_command(\n  TARGET copy_scripts\n  POST_BUILD\n  COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/${script_file} ${CMAKE_CURRENT_BINARY_DIR}/\n  ARGS\n)\nendforeach(script_file)\n\nadd_custom_command(\n  TARGET copy_scripts\n  POST_BUILD\n  COMMAND ${CMAKE_CXX_COMPILER} --version | head -n 1 > ${CMAKE_CURRENT_BINARY_DIR}/compiler_version.txt\n  ARGS\n)\nadd_custom_command(\n  TARGET copy_scripts\n  POST_BUILD\n  COMMAND echo \"${Eigen_SOURCE_DIR}\" > ${CMAKE_CURRENT_BINARY_DIR}/eigen_root_dir.txt\n  ARGS\n)\n\nadd_executable(smooth smooth.cxx)\nadd_executable(regularize regularize.cxx)\nadd_executable(main mean.cxx)\nadd_dependencies(main copy_scripts)\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/data/action_settings.txt",
    "content": "aat ; \"{/*1.5 A x A^T}\" ; \"matrix size\" ; 4:5000\nata ; \"{/*1.5 A^T x A}\" ; \"matrix size\" ; 4:5000\natv ; \"{/*1.5 matrix^T x vector}\" ; \"matrix size\" ; 4:5000\naxpby ; \"{/*1.5 Y = alpha X + beta Y}\" ; \"vector size\" ; 5:1000000\naxpy ; \"{/*1.5 Y += alpha X}\" ; \"vector size\" ; 5:1000000\nmatrix_matrix ; \"{/*1.5 matrix matrix product}\" ; \"matrix size\" ; 4:5000\nmatrix_vector ; \"{/*1.5 matrix vector product}\" ; \"matrix size\" ; 4:5000\ntrmm ; \"{/*1.5 triangular matrix matrix product}\" ; \"matrix size\" ; 4:5000\ntrisolve_vector ; \"{/*1.5 triangular solver - vector (X = inv(L) X)}\" ; \"size\" ; 4:5000\ntrisolve_matrix ; \"{/*1.5 triangular solver - matrix (M = inv(L) M)}\" ; \"size\" ; 4:5000\ncholesky ; \"{/*1.5 Cholesky decomposition}\" ; \"matrix size\" ; 4:5000\ncomplete_lu_decomp ; \"{/*1.5 Complete LU decomposition}\" ; \"matrix size\" ; 4:5000\npartial_lu_decomp ; \"{/*1.5 Partial LU decomposition}\" ; \"matrix size\" ; 4:5000\ntridiagonalization ; \"{/*1.5 Tridiagonalization}\" ; \"matrix size\" ; 4:5000\nhessenberg ; \"{/*1.5 Hessenberg decomposition}\" ; \"matrix size\" ; 4:5000\nsymv ; \"{/*1.5 symmetric matrix vector product}\" ; \"matrix size\" ; 4:5000\nsyr2 ; \"{/*1.5 symmretric rank-2 update (A += u^T v + u v^T)}\" ; \"matrix size\" ; 4:5000\nger ; \"{/*1.5 general rank-1 update (A += u v^T)}\" ; \"matrix size\" ; 4:5000\nrot ; \"{/*1.5 apply rotation in the plane}\" ; \"vector size\" ; 4:1000000\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/data/gnuplot_common_settings.hh",
    "content": "set noclip points\nset clip one\nset noclip two\nset bar 1.000000\nset border 31 lt -1 lw 1.000\nset xdata\nset ydata\nset zdata\nset x2data\nset y2data\nset boxwidth\nset dummy x,y\nset format x \"%g\"\nset format y \"%g\"\nset format x2 \"%g\"\nset format y2 \"%g\"\nset format z \"%g\"\nset angles radians\nset nogrid\nset key title \"\"\nset key left top Right noreverse box linetype -2 linewidth 1.000 samplen 4 spacing 1 width 0\nset nolabel\nset noarrow\n# set nolinestyle # deprecated\nset nologscale\nset logscale x 10\nset offsets 0, 0, 0, 0\nset pointsize 1\nset encoding default\nset nopolar\nset noparametric\nset view 60, 30, 1, 1\nset samples 100, 100\nset isosamples 10, 10\nset surface\nset nocontour\nset clabel '%8.3g'\nset mapping cartesian\nset nohidden3d\nset cntrparam order 4\nset cntrparam linear\nset cntrparam levels auto 5\nset cntrparam points 5\nset size ratio 0 1,1\nset origin 0,0\n# set data style lines\n# set function style lines\nset xzeroaxis lt -2 lw 1.000\nset x2zeroaxis lt -2 lw 1.000\nset yzeroaxis lt -2 lw 1.000\nset y2zeroaxis lt -2 lw 1.000\nset tics in\nset ticslevel 0.5\nset tics scale 1, 0.5\nset mxtics default\nset mytics default\nset mx2tics default\nset my2tics default\nset xtics border mirror norotate autofreq\nset ytics border mirror norotate autofreq\nset ztics border nomirror norotate autofreq\nset nox2tics\nset noy2tics\nset timestamp \"\" bottom norotate offset 0,0\nset rrange [ * : * ] noreverse nowriteback  # (currently [-0:10] )\nset trange [ * : * ] noreverse nowriteback  # (currently [-5:5] )\nset urange [ * : * ] noreverse nowriteback  # (currently [-5:5] )\nset vrange [ * : * ] noreverse nowriteback  # (currently [-5:5] )\nset xlabel \"matrix size\" offset 0,0\nset x2label \"\" offset 0,0\nset timefmt \"%d/%m/%y\\n%H:%M\"\nset xrange [ 10 : 1000 ] noreverse nowriteback\nset x2range [ * : * ] noreverse nowriteback  # (currently [-10:10] )\nset ylabel \"MFLOPS\" offset 0,0\nset y2label \"\" offset 0,0\nset yrange [ * : * ] noreverse nowriteback  # (currently [-10:10] )\nset y2range [ * : * ] noreverse nowriteback  # (currently [-10:10] )\nset zlabel \"\" offset 0,0\nset zrange [ * : * ] noreverse nowriteback  # (currently [-10:10] )\nset zero 1e-08\nset lmargin -1\nset bmargin -1\nset rmargin -1\nset tmargin -1\nset locale \"C\"\nset xrange [4:1024]\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/data/go_mean",
    "content": "#!/bin/bash\n\nif [ $# < 1 ]; then\n  echo \"Usage: $0 working_directory [tiny|large [prefix]]\"\nelse\n\nmkdir -p $1\n##cp ../libs/*/*.dat $1\n\nmode=large\nif [ $# > 2 ]; then\n  mode=$2\nfi\nif [ $# > 3 ]; then\n  prefix=$3\nfi\n\nEIGENDIR=`cat eigen_root_dir.txt`\n\nwebpagefilename=$1/index.html\nmeanstatsfilename=$1/mean.html\n\necho ''  > $meanstatsfilename\necho ''  > $webpagefilename\necho '<p><strong>Configuration</strong>'  >> $webpagefilename\necho '<ul>'\\\n  '<li>' `cat /proc/cpuinfo | grep \"model name\" | head -n 1`\\\n  '  (' `uname -m` ')</li>'\\\n  '<li> compiler: ' `cat compiler_version.txt` '</li>'\\\n  '<li> eigen3: ' `git ls-remote --refs  -q $EIGENDIR HEAD | cut  -f 1` '</li>'\\\n  '</ul>' \\\n  '</p>'  >> $webpagefilename\n\nsource mk_mean_script.sh axpy $1 11 2500 100000 250000  $mode $prefix\nsource mk_mean_script.sh axpby $1 11 2500 100000 250000 $mode $prefix\nsource mk_mean_script.sh matrix_vector $1 11 50 300 1000 $mode $prefix\nsource mk_mean_script.sh atv $1 11 50 300 1000 $mode $prefix\nsource mk_mean_script.sh matrix_matrix $1 11 100 300 1000 $mode $prefix\nsource mk_mean_script.sh aat $1 11 100 300 1000 $mode $prefix\n# source mk_mean_script.sh ata $1 11 100 300 1000 $mode $prefix\nsource mk_mean_script.sh trmm $1 11 100 300 1000 $mode $prefix\nsource mk_mean_script.sh trisolve_vector $1 11 100 300 1000 $mode $prefix\nsource mk_mean_script.sh trisolve_matrix $1 11 100 300 1000 $mode $prefix\nsource mk_mean_script.sh cholesky $1 11 100 300 1000 $mode $prefix\nsource mk_mean_script.sh partial_lu_decomp $1 11 100 300 1000 $mode $prefix\nsource mk_mean_script.sh tridiagonalization $1 11 100 300 1000 $mode $prefix\nsource mk_mean_script.sh hessenberg $1 11 100 300 1000 $mode $prefix\nsource mk_mean_script.sh symv $1 11 50 300 1000 $mode $prefix\nsource mk_mean_script.sh syr2 $1 11 50 300 1000 $mode $prefix\nsource mk_mean_script.sh ger $1 11 50 300 1000 $mode $prefix\nsource mk_mean_script.sh rot $1 11 2500 100000 250000 $mode $prefix\nsource mk_mean_script.sh complete_lu_decomp $1 11 100 300 1000 $mode $prefix\n\nfi\n\n## compile the web page ##\n\n#echo `cat footer.html` >> $webpagefilename"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/data/mean.cxx",
    "content": "//=====================================================\n// File   :  mean.cxx\n// Author :  L. Plagne <laurent.plagne@edf.fr)>        \n// Copyright (C) EDF R&D,  lun sep 30 14:23:15 CEST 2002\n//=====================================================\n// \n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n// \n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n// \n#include \"utilities.h\"\n#include <vector>\n#include <string>\n#include <iostream>\n#include <fstream>\n#include \"bench_parameter.hh\"\n#include \"utils/xy_file.hh\"\n#include <set>\n\nusing namespace std;\n\ndouble mean_calc(const vector<int> & tab_sizes, const vector<double> & tab_mflops, const int size_min, const int size_max);\n\nclass Lib_Mean{\n\npublic:\n  Lib_Mean( void ):_lib_name(),_mean_in_cache(),_mean_out_of_cache(){\n    MESSAGE(\"Lib_mean Default Ctor\");\n    MESSAGE(\"!!! should not be used\");\n    exit(0);\n  }\n  Lib_Mean(const string & name, const double & mic, const double & moc):_lib_name(name),_mean_in_cache(mic),_mean_out_of_cache(moc){\n    MESSAGE(\"Lib_mean Ctor\");\n  }\n  Lib_Mean(const Lib_Mean & lm):_lib_name(lm._lib_name),_mean_in_cache(lm._mean_in_cache),_mean_out_of_cache(lm._mean_out_of_cache){\n    MESSAGE(\"Lib_mean Copy Ctor\");\n  }\n  ~Lib_Mean( void ){\n    MESSAGE(\"Lib_mean Dtor\");\n  }\n    \n  double _mean_in_cache;\n  double _mean_out_of_cache;\n  string _lib_name;\n\n  bool operator < ( const Lib_Mean &right) const \n  {\n    //return ( this->_mean_out_of_cache > right._mean_out_of_cache) ;\n    return ( this->_mean_in_cache > right._mean_in_cache) ;\n  }\n\n}; \n\n\nint main( int argc , char *argv[] )\n{\n\n  if (argc<6){\n    INFOS(\"!!! Error ... usage : main what mic Mic moc Moc filename1 finename2...\");\n    exit(0);\n  }\n  INFOS(argc);\n\n  int min_in_cache=atoi(argv[2]);\n  int max_in_cache=atoi(argv[3]);\n  int min_out_of_cache=atoi(argv[4]);\n  int max_out_of_cache=atoi(argv[5]);\n\n\n  multiset<Lib_Mean> s_lib_mean ;\n\n  for (int i=6;i<argc;i++){\n    \n    string filename=argv[i];\n    \n    INFOS(filename);\n\n    double mic=0;\n    double moc=0;\n\n    {\n      \n      vector<int> tab_sizes;\n      vector<double> tab_mflops;\n\n      read_xy_file(filename,tab_sizes,tab_mflops);\n\n      mic=mean_calc(tab_sizes,tab_mflops,min_in_cache,max_in_cache);\n      moc=mean_calc(tab_sizes,tab_mflops,min_out_of_cache,max_out_of_cache);\n\n      Lib_Mean cur_lib_mean(filename,mic,moc);\n      \n      s_lib_mean.insert(cur_lib_mean);\t\n\n    }   \n           \n  }\n\n\n  cout << \"<TABLE BORDER CELLPADDING=2>\" << endl ;\n  cout << \"  <TR>\" << endl ;\n  cout << \"    <TH ALIGN=CENTER> \" << argv[1] << \" </TH>\" << endl ;\n  cout << \"    <TH ALIGN=CENTER> <a href=\"\"#mean_marker\"\"> in cache <BR> mean perf <BR> Mflops </a></TH>\" << endl ;\n  cout << \"    <TH ALIGN=CENTER> in cache <BR> % best </TH>\" << endl ;\n  cout << \"    <TH ALIGN=CENTER> <a href=\"\"#mean_marker\"\"> out of cache <BR> mean perf <BR> Mflops </a></TH>\" << endl ;\n  cout << \"    <TH ALIGN=CENTER> out of cache <BR> % best </TH>\" << endl ;\n  cout << \"    <TH ALIGN=CENTER> details </TH>\" << endl ;\n  cout << \"    <TH ALIGN=CENTER> comments </TH>\" << endl ;\n  cout << \"  </TR>\" << endl ;\n\n  multiset<Lib_Mean>::iterator is = s_lib_mean.begin();\n  Lib_Mean best(*is);  \n  \n\n  for (is=s_lib_mean.begin(); is!=s_lib_mean.end() ; is++){\n\n    cout << \"  <TR>\" << endl ;\n    cout << \"     <TD> \" << is->_lib_name << \" </TD>\" << endl ;\n    cout << \"     <TD> \" << is->_mean_in_cache << \" </TD>\" << endl ;\n    cout << \"     <TD> \" << 100*(is->_mean_in_cache/best._mean_in_cache) << \" </TD>\" << endl ;\n    cout << \"     <TD> \" << is->_mean_out_of_cache << \" </TD>\" << endl ;\n    cout << \"     <TD> \" << 100*(is->_mean_out_of_cache/best._mean_out_of_cache) << \" </TD>\" << endl ;\n    cout << \"     <TD> \" << \n      \"<a href=\\\"#\"<<is->_lib_name<<\"_\"<<argv[1]<<\"\\\">snippet</a>/\" \n      \"<a href=\\\"#\"<<is->_lib_name<<\"_flags\\\">flags</a>  </TD>\" << endl ;\n    cout << \"     <TD> \" << \n      \"<a href=\\\"#\"<<is->_lib_name<<\"_comments\\\">click here</a>  </TD>\" << endl ;\n    cout << \"  </TR>\" << endl ;\n  \n  }\n\n  cout << \"</TABLE>\" << endl ;\n\n  ofstream output_file (\"../order_lib\",ios::out) ;\n  \n  for (is=s_lib_mean.begin(); is!=s_lib_mean.end() ; is++){\n    output_file << is->_lib_name << endl ;\n  }\n\n  output_file.close();\n\n}\n\ndouble mean_calc(const vector<int> & tab_sizes, const vector<double> & tab_mflops, const int size_min, const int size_max){\n  \n  int size=tab_sizes.size();\n  int nb_sample=0;\n  double mean=0.0;\n\n  for (int i=0;i<size;i++){\n    \n    \n    if ((tab_sizes[i]>=size_min)&&(tab_sizes[i]<=size_max)){\n      \n      nb_sample++;\n      mean+=tab_mflops[i];\n\n    }\n\n    \n  }\n\n  if (nb_sample==0){\n    INFOS(\"no data for mean calculation\");\n    return 0.0;\n  }\n\n  return mean/nb_sample;\n}\n\n  \n\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/data/mk_gnuplot_script.sh",
    "content": "#! /bin/bash\nWHAT=$1\nDIR=$2\necho $WHAT script generation\ncat $WHAT.hh > $WHAT.gnuplot\n\nDATA_FILE=`find $DIR -name \"*.dat\" | grep $WHAT`\n\necho plot \\\\ >> $WHAT.gnuplot\n\nfor FILE in $DATA_FILE\ndo\n    LAST=$FILE\ndone\n\necho LAST=$LAST\n\nfor FILE in $DATA_FILE\ndo\n     if [ $FILE != $LAST ]\n     then\n\tBASE=${FILE##*/} ; BASE=${FILE##*/} ; AVANT=bench_${WHAT}_ ; REDUC=${BASE##*$AVANT} ; TITLE=${REDUC%.dat}\n\techo \"'\"$FILE\"'\" title \"'\"$TITLE\"'\" \",\\\\\" >>  $WHAT.gnuplot\n     fi\ndone\nBASE=${LAST##*/} ; BASE=${FILE##*/} ; AVANT=bench_${WHAT}_ ; REDUC=${BASE##*$AVANT} ; TITLE=${REDUC%.dat}\necho \"'\"$LAST\"'\" title \"'\"$TITLE\"'\" >>  $WHAT.gnuplot\n\n#echo set term postscript color >> $WHAT.gnuplot\n#echo set output \"'\"$WHAT.ps\"'\" >> $WHAT.gnuplot\necho set term pbm small color >> $WHAT.gnuplot\necho set output \"'\"$WHAT.ppm\"'\" >> $WHAT.gnuplot\necho plot \\\\ >> $WHAT.gnuplot\n\nfor FILE in $DATA_FILE\ndo\n     if [ $FILE != $LAST ]\n     then\n\tBASE=${FILE##*/} ; BASE=${FILE##*/} ; AVANT=bench_${WHAT}_ ; REDUC=${BASE##*$AVANT} ; TITLE=${REDUC%.dat}\n\techo \"'\"$FILE\"'\" title \"'\"$TITLE\"'\" \",\\\\\" >>  $WHAT.gnuplot\n     fi\ndone\nBASE=${LAST##*/} ; BASE=${FILE##*/} ; AVANT=bench_${WHAT}_ ; REDUC=${BASE##*$AVANT} ; TITLE=${REDUC%.dat}\necho \"'\"$LAST\"'\" title \"'\"$TITLE\"'\" >>  $WHAT.gnuplot\n\necho set term jpeg large >> $WHAT.gnuplot\necho set output \"'\"$WHAT.jpg\"'\" >> $WHAT.gnuplot\necho plot \\\\ >> $WHAT.gnuplot\n\nfor FILE in $DATA_FILE\ndo\n     if [ $FILE != $LAST ]\n     then\n\tBASE=${FILE##*/} ; BASE=${FILE##*/} ; AVANT=bench_${WHAT}_ ; REDUC=${BASE##*$AVANT} ; TITLE=${REDUC%.dat}\n\techo \"'\"$FILE\"'\" title \"'\"$TITLE\"'\" \",\\\\\" >>  $WHAT.gnuplot\n     fi\ndone\nBASE=${LAST##*/} ; BASE=${FILE##*/} ; AVANT=bench_${WHAT}_ ; REDUC=${BASE##*$AVANT} ; TITLE=${REDUC%.dat}\necho \"'\"$LAST\"'\" title \"'\"$TITLE\"'\" >>  $WHAT.gnuplot\n\n\ngnuplot -persist < $WHAT.gnuplot\n\nrm $WHAT.gnuplot\n\n\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/data/mk_mean_script.sh",
    "content": "#! /bin/bash\nWHAT=$1\nDIR=$2\nMINIC=$3\nMAXIC=$4\nMINOC=$5\nMAXOC=$6\nprefix=$8\n\nmeanstatsfilename=$2/mean.html\n\nWORK_DIR=tmp\nmkdir $WORK_DIR\n\nDATA_FILE=`find $DIR -name \"*.dat\" | grep _${WHAT}`\n\nif [ -n \"$DATA_FILE\" ]; then\n\n  echo \"\"\n  echo \"$1...\"\n  for FILE in $DATA_FILE\n  do\n          ##echo hello world\n          ##echo \"mk_mean_script1\" ${FILE}\n    BASE=${FILE##*/} ; BASE=${FILE##*/} ; AVANT=bench_${WHAT}_ ; REDUC=${BASE##*$AVANT} ; TITLE=${REDUC%.dat}\n\n    ##echo \"mk_mean_script1\" ${TITLE}\n    cp $FILE ${WORK_DIR}/${TITLE}\n\n  done\n\n  cd $WORK_DIR\n  ../main $1 $3 $4 $5 $6 * >> ../$meanstatsfilename\n  ../mk_new_gnuplot.sh $1 $2 $7\n  rm -f *.gnuplot\n  cd ..\n\n  echo '<br/>' >> $meanstatsfilename\n\n  webpagefilename=$2/index.html\n  # echo '<h3>'${WHAT}'</h3>'  >> $webpagefilename\n  echo '<hr/><a href=\"'$prefix$1'.pdf\"><img src=\"'$prefix$1'.png\" alt=\"'${WHAT}'\" /></a><br/>'  >> $webpagefilename\n\nfi\n\nrm -R $WORK_DIR\n\n\n\n\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/data/mk_new_gnuplot.sh",
    "content": "#!/bin/bash\nWHAT=$1\nDIR=$2\n\ncat ../gnuplot_common_settings.hh > ${WHAT}.gnuplot\n\necho \"set title \" `grep ${WHAT} ../action_settings.txt | head -n 1 | cut -d \";\" -f 2` >> $WHAT.gnuplot\necho \"set xlabel \" `grep ${WHAT} ../action_settings.txt | head -n 1 | cut -d \";\" -f 3` \" offset 0,0\" >> $WHAT.gnuplot\necho \"set xrange [\" `grep ${WHAT} ../action_settings.txt | head -n 1 | cut -d \";\" -f 4` \"]\" >> $WHAT.gnuplot\n\nif [ $# > 3 ]; then\n  if [ \"$3\" == \"tiny\" ]; then\n    echo \"set xrange [2:16]\" >> $WHAT.gnuplot\n    echo \"set nologscale\" >> $WHAT.gnuplot\n  fi\nfi\n\n\n\nDATA_FILE=`cat ../order_lib`\necho set term postscript color rounded enhanced >> $WHAT.gnuplot\necho set output \"'\"../${DIR}/$WHAT.ps\"'\" >> $WHAT.gnuplot\n\n# echo set term svg color rounded enhanced >> $WHAT.gnuplot\n# echo \"set terminal svg enhanced size 1000 1000 fname \\\"Times\\\" fsize 36\" >> $WHAT.gnuplot\n# echo set output \"'\"../${DIR}/$WHAT.svg\"'\" >> $WHAT.gnuplot\n\necho plot \\\\ >> $WHAT.gnuplot\n\nfor FILE in $DATA_FILE\ndo\n    LAST=$FILE\ndone\n\nfor FILE in $DATA_FILE\ndo\n    BASE=${FILE##*/} ; BASE=${FILE##*/} ; AVANT=bench_${WHAT}_ ; REDUC=${BASE##*$AVANT} ; TITLE=${REDUC%.dat}\n\n    echo \"'\"$FILE\"'\" `grep $TITLE ../perlib_plot_settings.txt | head -n 1 | cut -d \";\" -f 2` \"\\\\\" >>  $WHAT.gnuplot\n    if [ $FILE != $LAST ]\n    then\n      echo \", \\\\\" >>  $WHAT.gnuplot\n    fi\ndone\necho \" \" >>  $WHAT.gnuplot\n\ngnuplot -persist < $WHAT.gnuplot\n\nrm $WHAT.gnuplot\n\nps2pdf ../${DIR}/$WHAT.ps ../${DIR}/$WHAT.pdf\nconvert -background white -density 120 -rotate 90 -resize 800 +dither -colors 256 -quality 0 ../${DIR}/$WHAT.ps -background white -flatten  ../${DIR}/$WHAT.png\n\n# pstoedit -rotate -90 -xscale 0.8 -yscale 0.8 -centered -yshift -50 -xshift -100  -f plot-svg aat.ps  aat2.svg\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/data/perlib_plot_settings.txt",
    "content": "eigen3 ;          with lines lw 4 lt 1 lc rgbcolor \"black\"\neigen2 ;          with lines lw 3 lt 1 lc rgbcolor \"#999999\"\nEigenBLAS ;       with lines lw 3 lt 3 lc rgbcolor \"#999999\"\neigen3_novec ;    with lines lw 2 lt 1 lc rgbcolor \"#999999\"\neigen3_nogccvec ; with lines lw 2 lt 2 lc rgbcolor \"#991010\"\nINTEL_MKL ;       with lines lw 3 lt 1 lc rgbcolor \"#ff0000\"\nATLAS ;           with lines lw 3 lt 1 lc rgbcolor \"#008000\"\ngmm ;             with lines lw 3 lt 1 lc rgbcolor \"#0000ff\"\nublas ;           with lines lw 3 lt 1 lc rgbcolor \"#00b7ff\"\nmtl4 ;            with lines lw 3 lt 1 lc rgbcolor \"#d18847\"\nblitz ;           with lines lw 3 lt 1 lc rgbcolor \"#ff00ff\"\nF77 ;             with lines lw 3 lt 3 lc rgbcolor \"#e6e64c\"\nOPENBLAS ;        with lines lw 3 lt 1 lc rgbcolor \"#C05600\"\nC ;               with lines lw 3 lt 3 lc rgbcolor \"#e6bd96\"\nACML ;            with lines lw 2 lt 3 lc rgbcolor \"#e6e64c\"\nblaze ;           with lines lw 3 lt 1 lc rgbcolor \"#ff00ff\"\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/data/regularize.cxx",
    "content": "//=====================================================\n// File   :  regularize.cxx\n// Author :  L. Plagne <laurent.plagne@edf.fr)>        \n// Copyright (C) EDF R&D,  lun sep 30 14:23:15 CEST 2002\n//=====================================================\n// \n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n// \n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n// \n#include \"utilities.h\"\n#include <vector>\n#include <string>\n#include <iostream>\n#include <fstream>\n#include \"bench_parameter.hh\"\n#include <set>\n\nusing namespace std;\n\nvoid read_xy_file(const string & filename, vector<int> & tab_sizes, vector<double> & tab_mflops);\nvoid regularize_curve(const string & filename,\n\t\t      const vector<double> & tab_mflops, \n\t\t      const vector<int> & tab_sizes, \n\t\t      int start_cut_size, int stop_cut_size);\n/////////////////////////////////////////////////////////////////////////////////////////////////\n\nint main( int argc , char *argv[] )\n{\n\n  // input data\n\n  if (argc<4){\n    INFOS(\"!!! Error ... usage : main filename start_cut_size stop_cut_size regularize_filename\");\n    exit(0);\n  }\n  INFOS(argc);\n\n  int start_cut_size=atoi(argv[2]);\n  int stop_cut_size=atoi(argv[3]);\n\n  string filename=argv[1];\n  string regularize_filename=argv[4];\n  \n  INFOS(filename);\n  INFOS(\"start_cut_size=\"<<start_cut_size);\n\n  vector<int> tab_sizes;\n  vector<double> tab_mflops;\n\n  read_xy_file(filename,tab_sizes,tab_mflops);\n\n  // regularizeing\n\n  regularize_curve(regularize_filename,tab_mflops,tab_sizes,start_cut_size,stop_cut_size);\n  \n\n}\n\n//////////////////////////////////////////////////////////////////////////////////////\n\nvoid regularize_curve(const string & filename,\n\t\t      const vector<double> & tab_mflops, \n\t\t      const vector<int> & tab_sizes, \n\t\t      int start_cut_size, int stop_cut_size)\n{\n  int size=tab_mflops.size();\n  ofstream output_file (filename.c_str(),ios::out) ;\n\n  int i=0;\n\n  while(tab_sizes[i]<start_cut_size){\n    \n    output_file << tab_sizes[i] << \" \" <<  tab_mflops[i] << endl ;\n    i++;\n\n  }\n    \n  output_file << endl ;\n\n  while(tab_sizes[i]<stop_cut_size){\n    \n    i++;\n\n  }\n\n  while(i<size){\n    \n    output_file << tab_sizes[i] << \" \" <<  tab_mflops[i] << endl ;\n    i++;\n\n  }\n\n  output_file.close();\n\n}\n\n///////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\nvoid read_xy_file(const string & filename, vector<int> & tab_sizes, vector<double> & tab_mflops){\n\n  ifstream input_file (filename.c_str(),ios::in) ;\n\n  if (!input_file){\n    INFOS(\"!!! Error opening \"<<filename);\n    exit(0);\n  }\n  \n  int nb_point=0;\n  int size=0;\n  double mflops=0;\n\n  while (input_file >> size >> mflops ){\n    nb_point++;\n    tab_sizes.push_back(size);\n    tab_mflops.push_back(mflops);\n  }\n  SCRUTE(nb_point);\n\n  input_file.close();\n}\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/data/smooth.cxx",
    "content": "//=====================================================\n// File   :  smooth.cxx\n// Author :  L. Plagne <laurent.plagne@edf.fr)>        \n// Copyright (C) EDF R&D,  lun sep 30 14:23:15 CEST 2002\n//=====================================================\n// \n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n// \n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n// \n#include \"utilities.h\"\n#include <vector>\n#include <deque>\n#include <string>\n#include <iostream>\n#include <fstream>\n#include \"bench_parameter.hh\"\n#include <set>\n\nusing namespace std;\n\nvoid read_xy_file(const string & filename, vector<int> & tab_sizes, vector<double> & tab_mflops);\nvoid write_xy_file(const string & filename, vector<int> & tab_sizes, vector<double> & tab_mflops);\nvoid smooth_curve(const vector<double> & tab_mflops, vector<double> & smooth_tab_mflops,int window_half_width);\nvoid centered_smooth_curve(const vector<double> & tab_mflops, vector<double> & smooth_tab_mflops,int window_half_width);\n\n/////////////////////////////////////////////////////////////////////////////////////////////////\n\nint main( int argc , char *argv[] )\n{\n\n  // input data\n\n  if (argc<3){\n    INFOS(\"!!! Error ... usage : main filename window_half_width smooth_filename\");\n    exit(0);\n  }\n  INFOS(argc);\n\n  int window_half_width=atoi(argv[2]);\n\n  string filename=argv[1];\n  string smooth_filename=argv[3];\n  \n  INFOS(filename);\n  INFOS(\"window_half_width=\"<<window_half_width);\n\n  vector<int> tab_sizes;\n  vector<double> tab_mflops;\n\n  read_xy_file(filename,tab_sizes,tab_mflops);\n\n  // smoothing\n\n  vector<double> smooth_tab_mflops;\n\n  //smooth_curve(tab_mflops,smooth_tab_mflops,window_half_width);\n  centered_smooth_curve(tab_mflops,smooth_tab_mflops,window_half_width);\n\n  // output result\n\n  write_xy_file(smooth_filename,tab_sizes,smooth_tab_mflops);\n  \n\n}\n\n///////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\ntemplate<class VECTOR>\ndouble weighted_mean(const VECTOR & data)\n{\n\n  double mean=0.0;\n  \n  for (int i=0 ; i<data.size() ; i++){\n\n    mean+=data[i];\n\n  }\n\n  return mean/double(data.size()) ;\n\n}    \n\n\n\n\n///////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n\nvoid smooth_curve(const vector<double> & tab_mflops, vector<double> & smooth_tab_mflops,int window_half_width){\n  \n  int window_width=2*window_half_width+1;\n\n  int size=tab_mflops.size();\n\n  vector<double> sample(window_width);\n  \n  for (int i=0 ; i < size ; i++){\n    \n    for ( int j=0 ; j < window_width ; j++ ){\n      \n      int shifted_index=i+j-window_half_width;\n      if (shifted_index<0) shifted_index=0;\n      if (shifted_index>size-1) shifted_index=size-1;\n      sample[j]=tab_mflops[shifted_index];\n      \n    }\n\n    smooth_tab_mflops.push_back(weighted_mean(sample));\n\n  }\n\n}\n\nvoid centered_smooth_curve(const vector<double> & tab_mflops, vector<double> & smooth_tab_mflops,int window_half_width){\n  \n  int max_window_width=2*window_half_width+1;\n\n  int size=tab_mflops.size();\n\n  \n  for (int i=0 ; i < size ; i++){\n\n    deque<double> sample;\n\n    \n    sample.push_back(tab_mflops[i]);\n\n    for ( int j=1 ; j <= window_half_width ; j++ ){\n      \n      int before=i-j;\n      int after=i+j;\n      \n      if ((before>=0)&&(after<size)) // inside of the vector\n\t{ \n\t  sample.push_front(tab_mflops[before]);\n\t  sample.push_back(tab_mflops[after]);\n\t}\n    }\n    \n    smooth_tab_mflops.push_back(weighted_mean(sample));\n    \n  }\n\n}\n\n\n///////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\nvoid write_xy_file(const string & filename, vector<int> & tab_sizes, vector<double> & tab_mflops){\n\n  ofstream output_file (filename.c_str(),ios::out) ;\n  \n  for (int i=0 ; i < tab_sizes.size() ; i++)\n    {\n      output_file << tab_sizes[i] << \" \" <<  tab_mflops[i] << endl ;\n    }\n  \n  output_file.close();\n\n}\n\n\n///////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\nvoid read_xy_file(const string & filename, vector<int> & tab_sizes, vector<double> & tab_mflops){\n\n  ifstream input_file (filename.c_str(),ios::in) ;\n\n  if (!input_file){\n    INFOS(\"!!! Error opening \"<<filename);\n    exit(0);\n  }\n  \n  int nb_point=0;\n  int size=0;\n  double mflops=0;\n\n  while (input_file >> size >> mflops ){\n    nb_point++;\n    tab_sizes.push_back(size);\n    tab_mflops.push_back(mflops);\n  }\n  SCRUTE(nb_point);\n\n  input_file.close();\n}\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/data/smooth_all.sh",
    "content": "#! /bin/bash\nORIG_DIR=$1\nSMOOTH_DIR=${ORIG_DIR}_smooth\nmkdir ${SMOOTH_DIR}\n\nAXPY_FILE=`find ${ORIG_DIR} -name \"*.dat\" | grep axpy`\nfor FILE in ${AXPY_FILE}\ndo\n    echo $FILE\n    BASE=${FILE##*/}\n    ./smooth ${ORIG_DIR}/${BASE} 4 ${SMOOTH_DIR}/${BASE}_tmp\n    ./regularize ${SMOOTH_DIR}/${BASE}_tmp 2500 15000 ${SMOOTH_DIR}/${BASE}\n    rm -f  ${SMOOTH_DIR}/${BASE}_tmp\ndone\n\n\nMATRIX_VECTOR_FILE=`find ${ORIG_DIR} -name \"*.dat\" | grep matrix_vector`\nfor FILE in ${MATRIX_VECTOR_FILE}\ndo\n    echo $FILE\n    BASE=${FILE##*/}\n    ./smooth ${ORIG_DIR}/${BASE} 4 ${SMOOTH_DIR}/${BASE}_tmp\n    ./regularize ${SMOOTH_DIR}/${BASE}_tmp 50 180 ${SMOOTH_DIR}/${BASE}\n    rm -f  ${SMOOTH_DIR}/${BASE}_tmp\ndone\n\nMATRIX_MATRIX_FILE=`find ${ORIG_DIR} -name \"*.dat\" | grep matrix_matrix`\nfor FILE in ${MATRIX_MATRIX_FILE}\ndo\n    echo $FILE\n    BASE=${FILE##*/}\n    ./smooth ${ORIG_DIR}/${BASE} 4 ${SMOOTH_DIR}/${BASE}\ndone\n\nAAT_FILE=`find ${ORIG_DIR} -name \"*.dat\" | grep _aat`\nfor FILE in ${AAT_FILE}\ndo\n    echo $FILE\n    BASE=${FILE##*/}\n    ./smooth ${ORIG_DIR}/${BASE} 4 ${SMOOTH_DIR}/${BASE}\ndone\n\n\nATA_FILE=`find ${ORIG_DIR} -name \"*.dat\" | grep _ata`\nfor FILE in ${ATA_FILE}\ndo\n    echo $FILE\n    BASE=${FILE##*/}\n    ./smooth ${ORIG_DIR}/${BASE} 4 ${SMOOTH_DIR}/${BASE}\ndone\n\n### no smoothing for tinyvector and matrices libs\n\nTINY_BLITZ_FILE=`find ${ORIG_DIR} -name \"*.dat\" | grep tiny_blitz`\nfor FILE in ${TINY_BLITZ_FILE}\ndo\n    echo $FILE\n    BASE=${FILE##*/}\n    cp ${ORIG_DIR}/${BASE} ${SMOOTH_DIR}/${BASE}\ndone\n\nTVMET_FILE=`find ${ORIG_DIR} -name \"*.dat\" | grep tvmet`\nfor FILE in ${TVMET_FILE}\ndo\n    echo $FILE\n    BASE=${FILE##*/}\n    cp ${ORIG_DIR}/${BASE} ${SMOOTH_DIR}/${BASE}\ndone\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/generic_bench/bench.hh",
    "content": "//=====================================================\n// File   :  bench.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)>\n// Copyright (C) EDF R&D,  lun sep 30 14:23:16 CEST 2002\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#ifndef BENCH_HH\n#define BENCH_HH\n\n#include \"btl.hh\"\n#include \"bench_parameter.hh\"\n#include <iostream>\n#include \"utilities.h\"\n#include \"size_lin_log.hh\"\n#include \"xy_file.hh\"\n#include <vector>\n#include <string>\n#include \"timers/portable_perf_analyzer.hh\"\n// #include \"timers/mixed_perf_analyzer.hh\"\n// #include \"timers/x86_perf_analyzer.hh\"\n// #include \"timers/STL_perf_analyzer.hh\"\n#ifdef HAVE_MKL\nextern \"C\" void cblas_saxpy(const int, const float, const float*, const int, float *, const int);\n#endif\nusing namespace std;\n\ntemplate <template<class> class Perf_Analyzer, class Action>\nBTL_DONT_INLINE void bench( int size_min, int size_max, int nb_point )\n{\n  if (BtlConfig::skipAction(Action::name()))\n    return;\n\n  string filename=\"bench_\"+Action::name()+\".dat\";\n\n  INFOS(\"starting \" <<filename);\n\n  // utilities\n\n  std::vector<double> tab_mflops(nb_point);\n  std::vector<int> tab_sizes(nb_point);\n\n  // matrices and vector size calculations\n  size_lin_log(nb_point,size_min,size_max,tab_sizes);\n\n  std::vector<int> oldSizes;\n  std::vector<double> oldFlops;\n  bool hasOldResults = read_xy_file(filename, oldSizes, oldFlops, true);\n  int oldi = oldSizes.size() - 1;\n\n  // loop on matrix size\n  Perf_Analyzer<Action> perf_action;\n  for (int i=nb_point-1;i>=0;i--)\n  {\n    //INFOS(\"size=\" <<tab_sizes[i]<<\"   (\"<<nb_point-i<<\"/\"<<nb_point<<\")\");\n    std::cout << \" \" << \"size = \" << tab_sizes[i] << \"  \" << std::flush;\n\n    BTL_DISABLE_SSE_EXCEPTIONS();\n    #ifdef HAVE_MKL\n    {\n      float dummy;\n      cblas_saxpy(1,0,&dummy,1,&dummy,1);\n    }\n    #endif\n\n    tab_mflops[i] = perf_action.eval_mflops(tab_sizes[i]);\n    std::cout << tab_mflops[i];\n    \n    if (hasOldResults)\n    {\n      while (oldi>=0 && oldSizes[oldi]>tab_sizes[i])\n        --oldi;\n      if (oldi>=0 && oldSizes[oldi]==tab_sizes[i])\n      {\n        if (oldFlops[oldi]<tab_mflops[i])\n          std::cout << \"\\t > \";\n        else\n          std::cout << \"\\t < \";\n        std::cout << oldFlops[oldi];\n      }\n      --oldi;\n    }\n    std::cout << \" MFlops    (\" << nb_point-i << \"/\" << nb_point << \")\" << std::endl;\n  }\n\n  if (!BtlConfig::Instance.overwriteResults)\n  {\n    if (hasOldResults)\n    {\n      // merge the two data\n      std::vector<int> newSizes;\n      std::vector<double> newFlops;\n      unsigned int i=0;\n      unsigned int j=0;\n      while (i<tab_sizes.size() && j<oldSizes.size())\n      {\n        if (tab_sizes[i] == oldSizes[j])\n        {\n          newSizes.push_back(tab_sizes[i]);\n          newFlops.push_back(std::max(tab_mflops[i], oldFlops[j]));\n          ++i;\n          ++j;\n        }\n        else if (tab_sizes[i] < oldSizes[j])\n        {\n          newSizes.push_back(tab_sizes[i]);\n          newFlops.push_back(tab_mflops[i]);\n          ++i;\n        }\n        else\n        {\n          newSizes.push_back(oldSizes[j]);\n          newFlops.push_back(oldFlops[j]);\n          ++j;\n        }\n      }\n      while (i<tab_sizes.size())\n      {\n        newSizes.push_back(tab_sizes[i]);\n        newFlops.push_back(tab_mflops[i]);\n        ++i;\n      }\n      while (j<oldSizes.size())\n      {\n        newSizes.push_back(oldSizes[j]);\n        newFlops.push_back(oldFlops[j]);\n        ++j;\n      }\n      tab_mflops = newFlops;\n      tab_sizes = newSizes;\n    }\n  }\n\n  // dump the result in a file  :\n  dump_xy_file(tab_sizes,tab_mflops,filename);\n\n}\n\n// default Perf Analyzer\n\ntemplate <class Action>\nBTL_DONT_INLINE void bench( int size_min, int size_max, int nb_point ){\n\n  // if the rdtsc is not available :\n  bench<Portable_Perf_Analyzer,Action>(size_min,size_max,nb_point);\n  // if the rdtsc is available :\n//    bench<Mixed_Perf_Analyzer,Action>(size_min,size_max,nb_point);\n\n\n  // Only for small problem size. Otherwise it will be too long\n//   bench<X86_Perf_Analyzer,Action>(size_min,size_max,nb_point);\n//   bench<STL_Perf_Analyzer,Action>(size_min,size_max,nb_point);\n\n}\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/generic_bench/bench_parameter.hh",
    "content": "//=====================================================\n// File   :  bench_parameter.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)>\n// Copyright (C) EDF R&D,  lun sep 30 14:23:16 CEST 2002\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#ifndef BENCH_PARAMETER_HH\n#define BENCH_PARAMETER_HH\n\n// minimal time for each measurement\n#define REAL_TYPE float\n// minimal time for each measurement\n#define MIN_TIME 0.2\n// nb of point on bench curves\n#define NB_POINT 100\n// min vector size for axpy bench\n#define MIN_AXPY 5\n// max vector size for axpy bench\n#define MAX_AXPY 3000000\n// min matrix size for matrix vector product bench\n#define MIN_MV 5\n// max matrix size for matrix vector product bench\n#define MAX_MV 5000\n// min matrix size for matrix matrix product bench\n#define MIN_MM 5\n// max matrix size for matrix matrix product bench\n#define MAX_MM MAX_MV\n// min matrix size for LU bench\n#define MIN_LU 5\n// max matrix size for LU bench\n#define MAX_LU 3000\n// max size for tiny vector and matrix\n#define TINY_MV_MAX_SIZE 16\n// default nb_sample for x86 timer\n#define DEFAULT_NB_SAMPLE 1000\n\n// how many times we run a single bench (keep the best perf)\n#define DEFAULT_NB_TRIES 3\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/generic_bench/btl.hh",
    "content": "//=====================================================\n// File   :  btl.hh\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#ifndef BTL_HH\n#define BTL_HH\n\n#include \"bench_parameter.hh\"\n#include <iostream>\n#include <algorithm>\n#include <vector>\n#include <string>\n#include \"utilities.h\"\n\n#if (defined __GNUC__)\n#define BTL_ALWAYS_INLINE __attribute__((always_inline)) inline\n#else\n#define BTL_ALWAYS_INLINE inline\n#endif\n\n#if (defined __GNUC__)\n#define BTL_DONT_INLINE __attribute__((noinline))\n#else\n#define BTL_DONT_INLINE\n#endif\n\n#if (defined __GNUC__)\n#define BTL_ASM_COMMENT(X)  asm(\"#\" X)\n#else\n#define BTL_ASM_COMMENT(X)\n#endif\n\n#ifdef __SSE__\n#include \"xmmintrin.h\"\n// This enables flush to zero (FTZ) and denormals are zero (DAZ) modes:\n#define BTL_DISABLE_SSE_EXCEPTIONS()  { _mm_setcsr(_mm_getcsr() | 0x8040); }\n#else\n#define BTL_DISABLE_SSE_EXCEPTIONS()\n#endif\n\n/** Enhanced std::string\n*/\nclass BtlString : public std::string\n{\npublic:\n    BtlString() : std::string() {}\n    BtlString(const BtlString& str) : std::string(static_cast<const std::string&>(str)) {}\n    BtlString(const std::string& str) : std::string(str) {}\n    BtlString(const char* str) : std::string(str) {}\n\n    operator const char* () const { return c_str(); }\n\n    void trim( bool left = true, bool right = true )\n    {\n        int lspaces, rspaces, len = length(), i;\n        lspaces = rspaces = 0;\n\n        if ( left )\n            for (i=0; i<len && (at(i)==' '||at(i)=='\\t'||at(i)=='\\r'||at(i)=='\\n'); ++lspaces,++i);\n\n        if ( right && lspaces < len )\n            for(i=len-1; i>=0 && (at(i)==' '||at(i)=='\\t'||at(i)=='\\r'||at(i)=='\\n'); rspaces++,i--);\n\n        *this = substr(lspaces, len-lspaces-rspaces);\n    }\n\n    std::vector<BtlString> split( const BtlString& delims = \"\\t\\n \") const\n    {\n        std::vector<BtlString> ret;\n        unsigned int numSplits = 0;\n        size_t start, pos;\n        start = 0;\n        do\n        {\n            pos = find_first_of(delims, start);\n            if (pos == start)\n            {\n                ret.push_back(\"\");\n                start = pos + 1;\n            }\n            else if (pos == npos)\n                ret.push_back( substr(start) );\n            else\n            {\n                ret.push_back( substr(start, pos - start) );\n                start = pos + 1;\n            }\n            //start = find_first_not_of(delims, start);\n            ++numSplits;\n        } while (pos != npos);\n        return ret;\n    }\n\n    bool endsWith(const BtlString& str) const\n    {\n        if(str.size()>this->size())\n            return false;\n        return this->substr(this->size()-str.size(),str.size()) == str;\n    }\n    bool contains(const BtlString& str) const\n    {\n        return this->find(str)<this->size();\n    }\n    bool beginsWith(const BtlString& str) const\n    {\n        if(str.size()>this->size())\n            return false;\n        return this->substr(0,str.size()) == str;\n    }\n\n    BtlString toLowerCase( void )\n    {\n        std::transform(begin(), end(), begin(), static_cast<int(*)(int)>(::tolower) );\n        return *this;\n    }\n    BtlString toUpperCase( void )\n    {\n        std::transform(begin(), end(), begin(), static_cast<int(*)(int)>(::toupper) );\n        return *this;\n    }\n\n    /** Case insensitive comparison.\n    */\n    bool isEquiv(const BtlString& str) const\n    {\n        BtlString str0 = *this;\n        str0.toLowerCase();\n        BtlString str1 = str;\n        str1.toLowerCase();\n        return str0 == str1;\n    }\n\n    /** Decompose the current string as a path and a file.\n        For instance: \"dir1/dir2/file.ext\" leads to path=\"dir1/dir2/\" and filename=\"file.ext\"\n    */\n    void decomposePathAndFile(BtlString& path, BtlString& filename) const\n    {\n        std::vector<BtlString> elements = this->split(\"/\\\\\");\n        path = \"\";\n        filename = elements.back();\n        elements.pop_back();\n        if (this->at(0)=='/')\n            path = \"/\";\n        for (unsigned int i=0 ; i<elements.size() ; ++i)\n            path += elements[i] + \"/\";\n    }\n};\n\nclass BtlConfig\n{\npublic:\n  BtlConfig()\n    : overwriteResults(false), checkResults(true), realclock(false), tries(DEFAULT_NB_TRIES)\n  {\n    char * _config;\n    _config = getenv (\"BTL_CONFIG\");\n    if (_config!=NULL)\n    {\n      std::vector<BtlString> config = BtlString(_config).split(\" \\t\\n\");\n      for (unsigned int i = 0; i<config.size(); i++)\n      {\n        if (config[i].beginsWith(\"-a\"))\n        {\n          if (i+1==config.size())\n          {\n            std::cerr << \"error processing option: \" << config[i] << \"\\n\";\n            exit(2);\n          }\n          Instance.m_selectedActionNames = config[i+1].split(\":\");\n\n          i += 1;\n        }\n        else if (config[i].beginsWith(\"-t\"))\n        {\n          if (i+1==config.size())\n          {\n            std::cerr << \"error processing option: \" << config[i] << \"\\n\";\n            exit(2);\n          }\n          Instance.tries = atoi(config[i+1].c_str());\n\n          i += 1;\n        }\n        else if (config[i].beginsWith(\"--overwrite\"))\n        {\n          Instance.overwriteResults = true;\n        }\n        else if (config[i].beginsWith(\"--nocheck\"))\n        {\n          Instance.checkResults = false;\n        }\n        else if (config[i].beginsWith(\"--real\"))\n        {\n          Instance.realclock = true;\n        }\n      }\n    }\n\n    BTL_DISABLE_SSE_EXCEPTIONS();\n  }\n\n  BTL_DONT_INLINE static bool skipAction(const std::string& _name)\n  {\n    if (Instance.m_selectedActionNames.empty())\n      return false;\n\n    BtlString name(_name);\n    for (unsigned int i=0; i<Instance.m_selectedActionNames.size(); ++i)\n      if (name.contains(Instance.m_selectedActionNames[i]))\n        return false;\n\n    return true;\n  }\n\n  static BtlConfig Instance;\n  bool overwriteResults;\n  bool checkResults;\n  bool realclock;\n  int tries;\n\nprotected:\n  std::vector<BtlString> m_selectedActionNames;\n};\n\n#define BTL_MAIN \\\n  BtlConfig BtlConfig::Instance\n\n#endif // BTL_HH\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/generic_bench/init/init_function.hh",
    "content": "//=====================================================\n// File   :  init_function.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)>        \n// Copyright (C) EDF R&D,  lun sep 30 14:23:18 CEST 2002\n//=====================================================\n// \n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n// \n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n// \n#ifndef INIT_FUNCTION_HH\n#define INIT_FUNCTION_HH\n\ndouble simple_function(int index)\n{\n  return index;\n}\n\ndouble simple_function(int index_i, int index_j)\n{\n  return index_i+index_j;\n}\n\ndouble pseudo_random(int /*index*/)\n{\n  return std::rand()/double(RAND_MAX);\n}\n\ndouble pseudo_random(int /*index_i*/, int /*index_j*/)\n{\n  return std::rand()/double(RAND_MAX);\n}\n\n\ndouble null_function(int /*index*/)\n{\n  return 0.0;\n}\n\ndouble null_function(int /*index_i*/, int /*index_j*/)\n{\n  return 0.0;\n}\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/generic_bench/init/init_matrix.hh",
    "content": "//=====================================================\n// File   :  init_matrix.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)>\n// Copyright (C) EDF R&D,  lun sep 30 14:23:19 CEST 2002\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#ifndef INIT_MATRIX_HH\n#define INIT_MATRIX_HH\n\n// The Vector class must satisfy the following part of STL vector concept :\n//            resize() method\n//            [] operator for setting element\n//            value_type defined\ntemplate<double init_function(int,int), class Vector>\nBTL_DONT_INLINE void init_row(Vector & X, int size, int row){\n\n  X.resize(size);\n\n  for (unsigned int j=0;j<X.size();j++){\n    X[j]=typename Vector::value_type(init_function(row,j));\n  }\n}\n\n\n// Matrix is a Vector of Vector\n// The Matrix class must satisfy the following part of STL vector concept :\n//            resize() method\n//            [] operator for setting rows\ntemplate<double init_function(int,int),class Vector>\nBTL_DONT_INLINE void init_matrix(Vector &  A, int size){\n  A.resize(size);\n  for (unsigned int row=0; row<A.size() ; row++){\n    init_row<init_function>(A[row],size,row);\n  }\n}\n\ntemplate<double init_function(int,int),class Matrix>\nBTL_DONT_INLINE void init_matrix_symm(Matrix&  A, int size){\n  A.resize(size);\n  for (unsigned int row=0; row<A.size() ; row++)\n    A[row].resize(size);\n  for (unsigned int row=0; row<A.size() ; row++){\n    A[row][row] = init_function(row,row);\n    for (unsigned int col=0; col<row ; col++){\n      double x = init_function(row,col);\n      A[row][col] = A[col][row] = x;\n    }\n  }\n}\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/generic_bench/init/init_vector.hh",
    "content": "//=====================================================\n// File   :  init_vector.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)>\n// Copyright (C) EDF R&D,  lun sep 30 14:23:18 CEST 2002\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#ifndef INIT_VECTOR_HH\n#define INIT_VECTOR_HH\n\n// The Vector class must satisfy the following part of STL vector concept :\n//            resize() method\n//            [] operator for setting element\n//            value_type defined\ntemplate<double init_function(int), class Vector>\nvoid init_vector(Vector & X, int size){\n\n  X.resize(size);\n\n  for (unsigned int i=0;i<X.size();i++){\n    X[i]=typename Vector::value_type(init_function(i));\n  }\n}\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/generic_bench/static/bench_static.hh",
    "content": "//=====================================================\n// File   :  bench_static.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)>\n// Copyright (C) EDF R&D,  lun sep 30 14:23:16 CEST 2002\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#ifndef BENCH_STATIC_HH\n#define BENCH_STATIC_HH\n\n#include \"btl.hh\"\n#include \"bench_parameter.hh\"\n#include <iostream>\n#include \"utilities.h\"\n#include \"xy_file.hh\"\n#include \"static/static_size_generator.hh\"\n#include \"timers/portable_perf_analyzer.hh\"\n// #include \"timers/mixed_perf_analyzer.hh\"\n// #include \"timers/x86_perf_analyzer.hh\"\n\nusing namespace std;\n\n\ntemplate <template<class> class Perf_Analyzer, template<class> class Action, template<class,int> class Interface>\nBTL_DONT_INLINE  void bench_static(void)\n{\n  if (BtlConfig::skipAction(Action<Interface<REAL_TYPE,10> >::name()))\n    return;\n\n  string filename = \"bench_\" + Action<Interface<REAL_TYPE,10> >::name() + \".dat\";\n\n  INFOS(\"starting \" << filename);\n\n  const int max_size = TINY_MV_MAX_SIZE;\n\n  std::vector<double> tab_mflops;\n  std::vector<double> tab_sizes;\n\n  static_size_generator<max_size,Perf_Analyzer,Action,Interface>::go(tab_sizes,tab_mflops);\n\n  dump_xy_file(tab_sizes,tab_mflops,filename);\n}\n\n// default Perf Analyzer\ntemplate <template<class> class Action, template<class,int> class Interface>\nBTL_DONT_INLINE  void bench_static(void)\n{\n  bench_static<Portable_Perf_Analyzer,Action,Interface>();\n  //bench_static<Mixed_Perf_Analyzer,Action,Interface>();\n  //bench_static<X86_Perf_Analyzer,Action,Interface>();\n}\n\n#endif\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/generic_bench/static/intel_bench_fixed_size.hh",
    "content": "//=====================================================\n// File   :  intel_bench_fixed_size.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)>        \n// Copyright (C) EDF R&D,  mar dc 3 18:59:37 CET 2002\n//=====================================================\n// \n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n// \n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n// \n#ifndef _BENCH_FIXED_SIZE_HH_\n#define _BENCH_FIXED_SIZE_HH_\n\n#include \"utilities.h\"\n#include \"function_time.hh\"\n\ntemplate <class Action>\ndouble bench_fixed_size(int size, unsigned long long  & nb_calc,unsigned long long & nb_init)\n{\n  \n  Action action(size);\n  \n  double time_baseline=time_init(nb_init,action);\n\n  while (time_baseline < MIN_TIME) {\n\n    //INFOS(\"nb_init=\"<<nb_init);\n    //INFOS(\"time_baseline=\"<<time_baseline);\n    nb_init*=2;\n    time_baseline=time_init(nb_init,action);\n  }\n  \n  time_baseline=time_baseline/(double(nb_init));\n  \n  double time_action=time_calculate(nb_calc,action);\n  \n  while (time_action < MIN_TIME) {\n    \n    nb_calc*=2;\n    time_action=time_calculate(nb_calc,action);\n  }\n\n  INFOS(\"nb_init=\"<<nb_init);\n  INFOS(\"nb_calc=\"<<nb_calc);\n  \n  \n  time_action=time_action/(double(nb_calc));\n  \n  action.check_result();\n  \n  time_action=time_action-time_baseline;\n\n  return action.nb_op_base()/(time_action*1000000.0);\n\n}\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/generic_bench/static/static_size_generator.hh",
    "content": "//=====================================================\n// File   :  static_size_generator.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)>        \n// Copyright (C) EDF R&D,  mar dc 3 18:59:36 CET 2002\n//=====================================================\n// \n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n// \n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n// \n#ifndef _STATIC_SIZE_GENERATOR_HH\n#define _STATIC_SIZE_GENERATOR_HH\n#include <vector>\n\nusing namespace std;\n\n//recursive generation of statically defined matrix and vector sizes\n\ntemplate <int SIZE,template<class> class Perf_Analyzer, template<class> class Action, template<class,int> class Interface> \nstruct static_size_generator{\n  static void go(vector<double> & tab_sizes, vector<double> & tab_mflops)\n  {\n    tab_sizes.push_back(SIZE);\n    std::cout << tab_sizes.back() << \" \\t\" << std::flush;\n    Perf_Analyzer<Action<Interface<REAL_TYPE,SIZE> > > perf_action;\n    tab_mflops.push_back(perf_action.eval_mflops(SIZE));\n    std::cout << tab_mflops.back() << \" MFlops\" << std::endl;\n    static_size_generator<SIZE-1,Perf_Analyzer,Action,Interface>::go(tab_sizes,tab_mflops);\n  };\n};\n\n//recursion end\n\ntemplate <template<class> class Perf_Analyzer, template<class> class Action, template<class,int> class Interface> \nstruct static_size_generator<1,Perf_Analyzer,Action,Interface>{  \n  static  void go(vector<double> & tab_sizes, vector<double> & tab_mflops)\n  {\n    tab_sizes.push_back(1);\n    Perf_Analyzer<Action<Interface<REAL_TYPE,1> > > perf_action;\n    tab_mflops.push_back(perf_action.eval_mflops(1));\n  };\n};\n\n#endif\n  \n  \n  \n  \n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/generic_bench/timers/STL_perf_analyzer.hh",
    "content": "//=====================================================\n// File   :  STL_perf_analyzer.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)>        \n// Copyright (C) EDF R&D,  mar dc 3 18:59:35 CET 2002\n//=====================================================\n// \n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n// \n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n// \n#ifndef _STL_PERF_ANALYSER_HH\n#define _STL_PERF_ANALYSER_HH\n\n#include \"STL_timer.hh\"\n#include \"bench_parameter.hh\"\n\ntemplate<class ACTION>\nclass STL_Perf_Analyzer{\npublic:  \n  STL_Perf_Analyzer(unsigned long long nb_sample=DEFAULT_NB_SAMPLE):_nb_sample(nb_sample),_chronos()\n  {\n    MESSAGE(\"STL_Perf_Analyzer Ctor\");\n  }; \n  STL_Perf_Analyzer( const STL_Perf_Analyzer & ){\n    INFOS(\"Copy Ctor not implemented\");\n    exit(0);\n  };\n  ~STL_Perf_Analyzer( void ){\n    MESSAGE(\"STL_Perf_Analyzer Dtor\");\n  };\n  \n  \n  inline double eval_mflops(int size)\n  {\n\n    ACTION action(size);\n\n    _chronos.start_baseline(_nb_sample);\n      \n    do {\n\n      action.initialize();\n    } while (_chronos.check());\n\n    double baseline_time=_chronos.get_time();\n\n    _chronos.start(_nb_sample);\n    do {\n      action.initialize();\n      action.calculate();\n    } while (_chronos.check());\n\n    double calculate_time=_chronos.get_time();\n\n    double corrected_time=calculate_time-baseline_time;\n    \n    //    cout << size <<\" \"<<baseline_time<<\" \"<<calculate_time<<\" \"<<corrected_time<<\" \"<<action.nb_op_base() << endl;    \n    \n    return action.nb_op_base()/(corrected_time*1000000.0);\n    //return action.nb_op_base()/(calculate_time*1000000.0);\n    \n  }\nprivate:\n\n  STL_Timer _chronos;\n  unsigned long long _nb_sample;\n\n  \n};\n\n  \n  \n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/generic_bench/timers/STL_timer.hh",
    "content": "//=====================================================\n// File   :  STL_Timer.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)>        \n// Copyright (C) EDF R&D,  mar dc 3 18:59:35 CET 2002\n//=====================================================\n// \n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n// \n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n// \n// STL Timer Class. Adapted (L.P.) from the timer class by Musser et Al\n// described int the Book : STL Tutorial and reference guide.\n// Define a timer class for analyzing algorithm performance.\n#include <iostream>\n#include <iomanip>\n#include <vector>\n#include <map>\n#include <algorithm>\nusing namespace std;\n\nclass STL_Timer {\npublic:\n  STL_Timer(){ baseline = false; };  // Default constructor\n  // Start a series of r trials:\n  void start(unsigned int r){\n    reps = r;\n    count = 0;\n    iterations.clear();\n    iterations.reserve(reps);\n    initial = time(0);\n  };\n  // Start a series of r trials to determine baseline time:\n  void start_baseline(unsigned int r)\n  {\n    baseline = true;\n    start(r);\n  }\n  // Returns true if the trials have been completed, else false\n  bool check()\n  {\n    ++count;\n    final = time(0);\n    if (initial < final) {\n      iterations.push_back(count);  \n      initial = final;\n      count = 0;\n    }\n    return (iterations.size() < reps);\n  };\n  // Returns the results for external use\n  double get_time( void )\n  {\n    sort(iterations.begin(), iterations.end());\n    return 1.0/iterations[reps/2];\n  };\nprivate:\n  unsigned int reps;  // Number of trials\n  // For storing loop iterations of a trial\n  vector<long> iterations;\n  // For saving initial and final times of a trial\n  time_t initial, final;\n  // For counting loop iterations of a trial\n  unsigned long count;\n  // true if this is a baseline computation, false otherwise\n  bool baseline;\n  // For recording the baseline time \n  double baseline_time;\n};\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/generic_bench/timers/mixed_perf_analyzer.hh",
    "content": "//=====================================================\n// File   :  mixed_perf_analyzer.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)>        \n// Copyright (C) EDF R&D,  mar dc 3 18:59:36 CET 2002\n//=====================================================\n// \n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n// \n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n// \n#ifndef _MIXED_PERF_ANALYSER_HH\n#define _MIXED_PERF_ANALYSER_HH\n\n#include \"x86_perf_analyzer.hh\"\n#include \"portable_perf_analyzer.hh\"\n\n// choose portable perf analyzer for long calculations and x86 analyser for short ones\n\n\ntemplate<class Action>\nclass Mixed_Perf_Analyzer{\n  \npublic:  \n  Mixed_Perf_Analyzer( void ):_x86pa(),_ppa(),_use_ppa(true)\n  {\n    MESSAGE(\"Mixed_Perf_Analyzer Ctor\");\n  }; \n  Mixed_Perf_Analyzer( const Mixed_Perf_Analyzer & ){\n    INFOS(\"Copy Ctor not implemented\");\n    exit(0);\n  };\n  ~Mixed_Perf_Analyzer( void ){\n    MESSAGE(\"Mixed_Perf_Analyzer Dtor\");\n  };\n    \n  \n  inline double eval_mflops(int size)\n  {\n\n    double result=0.0;\n    if (_use_ppa){      \n      result=_ppa.eval_mflops(size);\n      if (_ppa.get_nb_calc()>DEFAULT_NB_SAMPLE){_use_ppa=false;}      \n    }\n    else{      \n      result=_x86pa.eval_mflops(size);\n    }\n\n    return result;\n  }\n\nprivate:\n\n  Portable_Perf_Analyzer<Action> _ppa;\n  X86_Perf_Analyzer<Action> _x86pa;\n  bool _use_ppa;\n\n};\n\n#endif\n\n  \n    \n  \n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/generic_bench/timers/portable_perf_analyzer.hh",
    "content": "//=====================================================\n// File   :  portable_perf_analyzer.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)>\n// Copyright (C) EDF R&D,  mar d�c 3 18:59:35 CET 2002\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#ifndef _PORTABLE_PERF_ANALYZER_HH\n#define _PORTABLE_PERF_ANALYZER_HH\n\n#include \"utilities.h\"\n#include \"timers/portable_timer.hh\"\n\ntemplate <class Action>\nclass Portable_Perf_Analyzer{\npublic:\n  Portable_Perf_Analyzer( ):_nb_calc(0), m_time_action(0), _chronos(){\n    MESSAGE(\"Portable_Perf_Analyzer Ctor\");\n  };\n  Portable_Perf_Analyzer( const Portable_Perf_Analyzer & ){\n    INFOS(\"Copy Ctor not implemented\");\n    exit(0);\n  };\n  ~Portable_Perf_Analyzer(){\n    MESSAGE(\"Portable_Perf_Analyzer Dtor\");\n  };\n\n  BTL_DONT_INLINE double eval_mflops(int size)\n  {\n    Action action(size);\n\n//     action.initialize();\n//     time_action = time_calculate(action);\n    while (m_time_action < MIN_TIME)\n    {\n      if(_nb_calc==0) _nb_calc = 1;\n      else            _nb_calc *= 2;\n      action.initialize();\n      m_time_action = time_calculate(action);\n    }\n\n    // optimize\n    for (int i=1; i<BtlConfig::Instance.tries; ++i)\n    {\n      Action _action(size);\n      std::cout << \" \" << _action.nb_op_base()*_nb_calc/(m_time_action*1e6) << \" \";\n      _action.initialize();\n      m_time_action = std::min(m_time_action, time_calculate(_action));\n    }\n\n    double time_action = m_time_action / (double(_nb_calc));\n\n    // check\n    if (BtlConfig::Instance.checkResults && size<128)\n    {\n      action.initialize();\n      action.calculate();\n      action.check_result();\n    }\n    return action.nb_op_base()/(time_action*1e6);\n  }\n\n  BTL_DONT_INLINE double time_calculate(Action & action)\n  {\n    // time measurement\n    action.calculate();\n    _chronos.start();\n    for (unsigned int ii=0;ii<_nb_calc;ii++)\n    {\n      action.calculate();\n    }\n    _chronos.stop();\n    return _chronos.user_time();\n  }\n\n  unsigned long long get_nb_calc()\n  {\n    return _nb_calc;\n  }\n\n\nprivate:\n  unsigned long long _nb_calc;\n  double m_time_action;\n  Portable_Timer _chronos;\n\n};\n\n#endif //_PORTABLE_PERF_ANALYZER_HH\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/generic_bench/timers/portable_perf_analyzer_old.hh",
    "content": "//=====================================================\n// File   :  portable_perf_analyzer.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)>\n// Copyright (C) EDF R&D,  mar d�c 3 18:59:35 CET 2002\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#ifndef _PORTABLE_PERF_ANALYZER_HH\n#define _PORTABLE_PERF_ANALYZER_HH\n\n#include \"utilities.h\"\n#include \"timers/portable_timer.hh\"\n\ntemplate <class Action>\nclass Portable_Perf_Analyzer{\npublic:\n  Portable_Perf_Analyzer( void ):_nb_calc(1),_nb_init(1),_chronos(){\n    MESSAGE(\"Portable_Perf_Analyzer Ctor\");\n  };\n  Portable_Perf_Analyzer( const Portable_Perf_Analyzer & ){\n    INFOS(\"Copy Ctor not implemented\");\n    exit(0);\n  };\n  ~Portable_Perf_Analyzer( void ){\n    MESSAGE(\"Portable_Perf_Analyzer Dtor\");\n  };\n\n\n\n  inline double eval_mflops(int size)\n  {\n\n    Action action(size);\n\n//     double time_baseline = time_init(action);\n//     while (time_baseline < MIN_TIME_INIT)\n//     {\n//       _nb_init *= 2;\n//       time_baseline = time_init(action);\n//     }\n//\n//     // optimize\n//     for (int i=1; i<NB_TRIES; ++i)\n//       time_baseline = std::min(time_baseline, time_init(action));\n//\n//     time_baseline = time_baseline/(double(_nb_init));\n\n    double time_action = time_calculate(action);\n    while (time_action < MIN_TIME)\n    {\n      _nb_calc *= 2;\n      time_action = time_calculate(action);\n    }\n\n    // optimize\n    for (int i=1; i<NB_TRIES; ++i)\n      time_action = std::min(time_action, time_calculate(action));\n\n//     INFOS(\"size=\"<<size);\n//     INFOS(\"_nb_init=\"<<_nb_init);\n//     INFOS(\"_nb_calc=\"<<_nb_calc);\n\n    time_action = time_action / (double(_nb_calc));\n\n    action.check_result();\n\n\n    double time_baseline = time_init(action);\n    for (int i=1; i<NB_TRIES; ++i)\n      time_baseline = std::min(time_baseline, time_init(action));\n    time_baseline = time_baseline/(double(_nb_init));\n\n\n\n//     INFOS(\"time_baseline=\"<<time_baseline);\n//     INFOS(\"time_action=\"<<time_action);\n\n    time_action = time_action - time_baseline;\n\n//     INFOS(\"time_corrected=\"<<time_action);\n\n    return action.nb_op_base()/(time_action*1000000.0);\n  }\n\n  inline double time_init(Action & action)\n  {\n    // time measurement\n    _chronos.start();\n    for (int ii=0; ii<_nb_init; ii++)\n      action.initialize();\n    _chronos.stop();\n    return _chronos.user_time();\n  }\n\n\n  inline double time_calculate(Action & action)\n  {\n    // time measurement\n    _chronos.start();\n    for (int ii=0;ii<_nb_calc;ii++)\n    {\n      action.initialize();\n      action.calculate();\n    }\n    _chronos.stop();\n    return _chronos.user_time();\n  }\n\n  unsigned long long get_nb_calc( void )\n  {\n    return _nb_calc;\n  }\n\n\nprivate:\n  unsigned long long _nb_calc;\n  unsigned long long _nb_init;\n  Portable_Timer _chronos;\n\n};\n\n#endif //_PORTABLE_PERF_ANALYZER_HH\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/generic_bench/timers/portable_timer.hh",
    "content": "//=====================================================\n// File   :  portable_timer.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)> from boost lib\n// Copyright (C) EDF R&D,  lun sep 30 14:23:17 CEST 2002\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n//  simple_time extracted from the boost library\n//\n#ifndef _PORTABLE_TIMER_HH\n#define _PORTABLE_TIMER_HH\n\n#include <ctime>\n#include <cstdlib>\n\n#include <time.h>\n\n\n#define USEC_IN_SEC 1000000\n\n\n//  timer  -------------------------------------------------------------------//\n\n//  A timer object measures CPU time.\n#if defined(_MSC_VER)\n\n#define NOMINMAX\n#include <windows.h>\n\n/*#ifndef hr_timer\n#include \"hr_time.h\"\n#define hr_timer\n#endif*/\n\n class Portable_Timer\n {\n  public:\n\n   typedef struct {\n    LARGE_INTEGER start;\n    LARGE_INTEGER stop;\n   } stopWatch;\n\n\n   Portable_Timer()\n   {\n\t startVal.QuadPart = 0;\n\t stopVal.QuadPart = 0;\n\t QueryPerformanceFrequency(&frequency);\n   }\n\n   void start() { QueryPerformanceCounter(&startVal); }\n\n   void stop() { QueryPerformanceCounter(&stopVal); }\n\n   double elapsed() {\n\t LARGE_INTEGER time;\n     time.QuadPart = stopVal.QuadPart - startVal.QuadPart;\n     return LIToSecs(time);\n   }\n\n   double user_time() { return elapsed(); }\n\n\n private:\n\n   double LIToSecs(LARGE_INTEGER& L) {\n     return ((double)L.QuadPart /(double)frequency.QuadPart) ;\n   }\n\n   LARGE_INTEGER startVal;\n   LARGE_INTEGER stopVal;\n   LARGE_INTEGER frequency;\n\n\n }; // Portable_Timer\n\n#elif defined(__APPLE__)\n#include <CoreServices/CoreServices.h>\n#include <mach/mach_time.h>\n\n\nclass Portable_Timer\n{\n public:\n\n  Portable_Timer()\n  {\n  }\n\n  void start()\n  {\n    m_start_time = double(mach_absolute_time())*1e-9;;\n\n  }\n\n  void stop()\n  {\n    m_stop_time = double(mach_absolute_time())*1e-9;;\n\n  }\n\n  double elapsed()\n  {\n    return  user_time();\n  }\n\n  double user_time()\n  {\n    return m_stop_time - m_start_time;\n  }\n\n\nprivate:\n\n  double m_stop_time, m_start_time;\n\n}; // Portable_Timer (Apple)\n\n#else\n\n#include <sys/time.h>\n#include <sys/resource.h>\n#include <unistd.h>\n#include <sys/times.h>\n\nclass Portable_Timer\n{\n public:\n\n  Portable_Timer()\n  {\n    m_clkid = BtlConfig::Instance.realclock ? CLOCK_REALTIME : CLOCK_PROCESS_CPUTIME_ID;\n  }\n\n  Portable_Timer(int clkid) : m_clkid(clkid)\n  {}\n\n  void start()\n  {\n    timespec ts;\n    clock_gettime(m_clkid, &ts);\n    m_start_time = double(ts.tv_sec) + 1e-9 * double(ts.tv_nsec);\n\n  }\n\n  void stop()\n  {\n    timespec ts;\n    clock_gettime(m_clkid, &ts);\n    m_stop_time = double(ts.tv_sec) + 1e-9 * double(ts.tv_nsec);\n\n  }\n\n  double elapsed()\n  {\n    return  user_time();\n  }\n\n  double user_time()\n  {\n    return m_stop_time - m_start_time;\n  }\n\n\nprivate:\n\n  int m_clkid;\n  double m_stop_time, m_start_time;\n\n}; // Portable_Timer (Linux)\n\n#endif\n\n#endif  // PORTABLE_TIMER_HPP\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/generic_bench/timers/x86_perf_analyzer.hh",
    "content": "//=====================================================\n// File   :  x86_perf_analyzer.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)>\n// Copyright (C) EDF R&D,  mar d�c 3 18:59:35 CET 2002\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#ifndef _X86_PERF_ANALYSER_HH\n#define _X86_PERF_ANALYSER_HH\n\n#include \"x86_timer.hh\"\n#include \"bench_parameter.hh\"\n\ntemplate<class ACTION>\nclass X86_Perf_Analyzer{\npublic:\n  X86_Perf_Analyzer( unsigned long long nb_sample=DEFAULT_NB_SAMPLE):_nb_sample(nb_sample),_chronos()\n  {\n    MESSAGE(\"X86_Perf_Analyzer Ctor\");\n    _chronos.find_frequency();\n  };\n  X86_Perf_Analyzer( const X86_Perf_Analyzer & ){\n    INFOS(\"Copy Ctor not implemented\");\n    exit(0);\n  };\n  ~X86_Perf_Analyzer( void ){\n    MESSAGE(\"X86_Perf_Analyzer Dtor\");\n  };\n\n\n  inline double eval_mflops(int size)\n  {\n\n    ACTION action(size);\n\n    int nb_loop=5;\n    double calculate_time=0.0;\n    double baseline_time=0.0;\n\n    for (int j=0 ; j < nb_loop ; j++){\n\n      _chronos.clear();\n\n      for(int i=0 ; i < _nb_sample  ; i++)\n      {\n        _chronos.start();\n        action.initialize();\n        action.calculate();\n        _chronos.stop();\n        _chronos.add_get_click();\n      }\n\n      calculate_time += double(_chronos.get_shortest_clicks())/_chronos.frequency();\n\n      if (j==0) action.check_result();\n\n      _chronos.clear();\n\n      for(int i=0 ; i < _nb_sample  ; i++)\n      {\n        _chronos.start();\n        action.initialize();\n        _chronos.stop();\n        _chronos.add_get_click();\n\n      }\n\n      baseline_time+=double(_chronos.get_shortest_clicks())/_chronos.frequency();\n\n    }\n\n    double corrected_time = (calculate_time-baseline_time)/double(nb_loop);\n\n\n//     INFOS(\"_nb_sample=\"<<_nb_sample);\n//     INFOS(\"baseline_time=\"<<baseline_time);\n//     INFOS(\"calculate_time=\"<<calculate_time);\n//     INFOS(\"corrected_time=\"<<corrected_time);\n\n//    cout << size <<\" \"<<baseline_time<<\" \"<<calculate_time<<\" \"<<corrected_time<<\" \"<<action.nb_op_base() << endl;\n\n    return action.nb_op_base()/(corrected_time*1000000.0);\n    //return action.nb_op_base()/(calculate_time*1000000.0);\n  }\n\nprivate:\n\n  X86_Timer _chronos;\n  unsigned long long _nb_sample;\n\n\n};\n\n\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/generic_bench/timers/x86_timer.hh",
    "content": "//=====================================================\n// File   :  x86_timer.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)>        \n// Copyright (C) EDF R&D,  mar d�c 3 18:59:35 CET 2002\n//=====================================================\n// \n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n// \n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n// \n#ifndef _X86_TIMER_HH\n#define _X86_TIMER_HH\n\n#include <sys/time.h>\n#include <sys/resource.h>\n#include <unistd.h>\n#include <sys/times.h>\n//#include \"system_time.h\"\n#define u32 unsigned int\n#include <asm/msr.h>\n#include \"utilities.h\"\n#include <map>\n#include <fstream>\n#include <string>\n#include <iostream>\n\n// frequence de la becanne en Hz\n//#define FREQUENCY 648000000\n//#define FREQUENCY 1400000000\n#define FREQUENCY 1695000000\n\nusing namespace std;\n\n\nclass X86_Timer {\n\npublic :\n\n  X86_Timer( void ):_frequency(FREQUENCY),_nb_sample(0)\n  {\n    MESSAGE(\"X86_Timer Default Ctor\");    \n  }\n\n  inline void start( void ){\n\n    rdtsc(_click_start.n32[0],_click_start.n32[1]);\n\n  }\n\n\n  inline void stop( void ){\n\n    rdtsc(_click_stop.n32[0],_click_stop.n32[1]);\n\n  }\n  \n\n  inline double frequency( void ){\n    return _frequency;\n  }\n\n  double get_elapsed_time_in_second( void ){\n\n    return (_click_stop.n64-_click_start.n64)/double(FREQUENCY);\n\n\n  }    \n\n  unsigned long long  get_click( void ){\n    \n    return (_click_stop.n64-_click_start.n64);\n\n  }    \n\n  inline void find_frequency( void ){\n\n    time_t initial, final;\n    int dummy=2;\n\n    initial = time(0);\n    start();\n    do {\n      dummy+=2;\n    }\n    while(time(0)==initial);\n    // On est au debut d'un cycle d'une seconde !!!\n    initial = time(0);\n    start();\n    do {\n      dummy+=2;\n    }\n    while(time(0)==initial);\n    final=time(0);\n    stop();\n    //    INFOS(\"fine grained time : \"<<  get_elapsed_time_in_second());\n    //  INFOS(\"coarse grained time : \"<<  final-initial);\n    _frequency=_frequency*get_elapsed_time_in_second()/double(final-initial);\n    ///  INFOS(\"CPU frequency : \"<<  _frequency);        \n\n  }\n\n  void  add_get_click( void ){\n       \n    _nb_sample++;\n    _counted_clicks[get_click()]++;\n    fill_history_clicks();\n\n  }    \n\n  void dump_statistics(string filemane){\n    \n    ofstream outfile (filemane.c_str(),ios::out) ;\n\n    std::map<unsigned long long , unsigned long long>::iterator itr;\n    for(itr=_counted_clicks.begin() ; itr!=_counted_clicks.end()  ; itr++)\n      {      \n      outfile  << (*itr).first << \"  \" << (*itr).second << endl ;       \n      }      \n    \n    outfile.close();\n\n  }\n\n  void dump_history(string filemane){\n    \n    ofstream outfile (filemane.c_str(),ios::out) ;\n\n\n\n    for(int i=0 ; i<_history_mean_clicks.size() ; i++)\n      {      \n\toutfile  << i << \" \" \n\t\t << _history_mean_clicks[i] << \" \" \n\t\t << _history_shortest_clicks[i] << \" \" \n\t\t << _history_most_occured_clicks[i] << endl ;\n      }      \n    \n    outfile.close();\n\n  }\n     \n\n\n  double get_mean_clicks( void ){\n    \n    std::map<unsigned long long,unsigned long long>::iterator itr;\n    \n    unsigned long long mean_clicks=0;\n\n    for(itr=_counted_clicks.begin() ; itr!=_counted_clicks.end()  ; itr++)\n      {      \n\t\n\tmean_clicks+=(*itr).second*(*itr).first;\n      }      \n\n    return mean_clicks/double(_nb_sample);\n\n  }\n\n  double get_shortest_clicks( void ){\n    \n    return double((*_counted_clicks.begin()).first);\n\n  }\n\n  void fill_history_clicks( void ){\n\n    _history_mean_clicks.push_back(get_mean_clicks());\n    _history_shortest_clicks.push_back(get_shortest_clicks());\n    _history_most_occured_clicks.push_back(get_most_occured_clicks());\n\n  }\n\n\n  double get_most_occured_clicks( void ){\n\n    unsigned long long moc=0;\n    unsigned long long max_occurence=0;\n\n    std::map<unsigned long long,unsigned long long>::iterator itr;\n\n    for(itr=_counted_clicks.begin() ; itr!=_counted_clicks.end()  ; itr++)\n      {      \n\t\n\tif (max_occurence<=(*itr).second){\n\t  max_occurence=(*itr).second;\n\t  moc=(*itr).first;\n\t}\n      }      \n    \n    return double(moc);    \n\n  }\n  \n  void clear( void )\n  {\n    _counted_clicks.clear();\n\n    _history_mean_clicks.clear();\n    _history_shortest_clicks.clear();\n    _history_most_occured_clicks.clear();\n\n    _nb_sample=0;\n  }\n\n\n    \nprivate :\n  \n  union\n  {\n    unsigned long int n32[2] ;\n    unsigned long long n64 ;\n  } _click_start;\n\n  union\n  {\n    unsigned long int n32[2] ;\n    unsigned long long n64 ;\n  } _click_stop;\n\n  double _frequency ;\n\n  map<unsigned long long,unsigned long long> _counted_clicks;\n\n  vector<double> _history_mean_clicks;\n  vector<double> _history_shortest_clicks;\n  vector<double> _history_most_occured_clicks;\n\n  unsigned long long _nb_sample;\n\n  \n\n};\n\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/generic_bench/utils/size_lin_log.hh",
    "content": "//=====================================================\n// File   :  size_lin_log.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)>        \n// Copyright (C) EDF R&D,  mar dc 3 18:59:37 CET 2002\n//=====================================================\n// \n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n// \n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n// \n#ifndef SIZE_LIN_LOG\n#define SIZE_LIN_LOG\n\n#include \"size_log.hh\"\n\ntemplate<class Vector>\nvoid size_lin_log(const int nb_point, const int /*size_min*/, const int size_max, Vector & X)\n{\n  int ten=10;\n  int nine=9;\n\n  X.resize(nb_point);\n\n  if (nb_point>ten){\n\n    for (int i=0;i<nine;i++){\n      \n      X[i]=i+1;\n\n    }\n\n    Vector log_size;\n    size_log(nb_point-nine,ten,size_max,log_size);\n\n    for (int i=0;i<nb_point-nine;i++){\n      \n      X[i+nine]=log_size[i];\n\n    }\n  }\n  else{\n\n    for (int i=0;i<nb_point;i++){\n      \n      X[i]=i+1;\n\n    }\n  }\n\n //  for (int i=0;i<nb_point;i++){\n    \n//        INFOS(\"computed sizes : X[\"<<i<<\"]=\"<<X[i]);\n    \n//   }\n\n}\n  \n#endif\n    \n\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/generic_bench/utils/size_log.hh",
    "content": "//=====================================================\n// File   :  size_log.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)>        \n// Copyright (C) EDF R&D,  lun sep 30 14:23:17 CEST 2002\n//=====================================================\n// \n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n// \n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n// \n#ifndef SIZE_LOG\n#define SIZE_LOG\n\n#include \"math.h\"\n// The Vector class must satisfy the following part of STL vector concept :\n//            resize() method\n//            [] operator for setting element\n// the vector element are int compatible.\ntemplate<class Vector>\nvoid size_log(const int nb_point, const int size_min, const int size_max, Vector & X)\n{\n  X.resize(nb_point);\n\n  float ls_min=log(float(size_min));\n  float ls_max=log(float(size_max));\n\n  float ls=0.0;\n\n  float delta_ls=(ls_max-ls_min)/(float(nb_point-1));\n\n  int size=0;\n\n  for (int i=0;i<nb_point;i++){\n\n    ls = ls_min + float(i)*delta_ls ;\n    \n    size=int(exp(ls)); \n\n    X[i]=size;\n  }\n\n}\n\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/generic_bench/utils/utilities.h",
    "content": "//=============================================================================\n// File      : utilities.h\n// Created   : mar jun 19 13:18:14 CEST 2001\n// Author    : Antoine YESSAYAN, Paul RASCLE, EDF\n// Project   : SALOME\n// Copyright : EDF 2001\n// $Header$\n//=============================================================================\n\n/* ---  Definition macros file to print information if _DEBUG_ is defined --- */\n\n# ifndef UTILITIES_H\n# define UTILITIES_H\n\n# include <stdlib.h>\n//# include <iostream> ok for gcc3.01\n# include <iostream>\n\n/* ---  INFOS is always defined (without _DEBUG_): to be used for warnings, with release version --- */\n\n# define HEREWEARE cout<<flush ; cerr << __FILE__ << \" [\" << __LINE__ << \"] : \" << flush ;\n# define INFOS(chain) {HEREWEARE ; cerr << chain << endl ;}\n# define PYSCRIPT(chain) {cout<<flush ; cerr << \"---PYSCRIPT--- \" << chain << endl ;}\n\n/* --- To print date and time of compilation of current source on stdout --- */\n\n# if defined ( __GNUC__ )\n# define COMPILER\t\t\"g++\" ;\n# elif defined ( __sun )\n# define COMPILER\t\t\"CC\" ;\n# elif defined ( __KCC )\n# define COMPILER\t\t\"KCC\" ;\n# elif defined ( __PGI )\n# define COMPILER\t\t\"pgCC\" ;\n# else\n# define COMPILER\t\t\"undefined\" ;\n# endif\n\n# ifdef INFOS_COMPILATION\n# error INFOS_COMPILATION already defined\n# endif\n# define INFOS_COMPILATION\t{\\\n\t\t\t\t\tcerr << flush;\\\n\t\t\t\t\tcout << __FILE__ ;\\\n\t\t\t\t\tcout << \" [\" << __LINE__ << \"] : \" ;\\\n\t\t\t\t\tcout << \"COMPILED with \" << COMPILER ;\\\n\t\t\t\t\tcout << \", \" << __DATE__ ; \\\n\t\t\t\t\tcout << \" at \" << __TIME__ << endl ;\\\n\t\t\t\t\tcout << \"\\n\\n\" ;\\\n\t\t\t\t\tcout << flush ;\\\n\t\t\t\t}\n\n# ifdef _DEBUG_\n\n/* --- the following MACROS are useful at debug time --- */\n\n# define HERE cout<<flush ; cerr << \"- Trace \" << __FILE__ << \" [\" << __LINE__ << \"] : \" << flush ;\n# define SCRUTE(var) HERE ; cerr << #var << \"=\" << var << endl ;\n# define MESSAGE(chain) {HERE ; cerr << chain << endl ;}\n# define INTERRUPTION(code) HERE ; cerr << \"INTERRUPTION return code= \" << code << endl ; exit(code) ;\n\n# ifndef ASSERT\n# define ASSERT(condition) if (!(condition)){ HERE ; cerr << \"CONDITION \" << #condition << \" NOT VERIFIED\"<< endl ; INTERRUPTION(1) ;}\n# endif /* ASSERT */\n\n#define REPERE cout<<flush ; cerr << \"   --------------\" << endl << flush ;\n#define BEGIN_OF(chain) {REPERE ; HERE ; cerr << \"Begin of: \" << chain << endl ; REPERE ; }\n#define END_OF(chain) {REPERE ; HERE ; cerr << \"Normal end of: \" << chain << endl ; REPERE ; }\n\n\n\n# else /* ifdef _DEBUG_*/\n\n# define HERE\n# define SCRUTE(var)\n# define MESSAGE(chain)\n# define INTERRUPTION(code)\n\n# ifndef ASSERT\n# define ASSERT(condition)\n# endif /* ASSERT */\n\n#define REPERE\n#define BEGIN_OF(chain)\n#define END_OF(chain)\n\n\n# endif /* ifdef _DEBUG_*/\n\n# endif /* ifndef UTILITIES_H */\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/generic_bench/utils/xy_file.hh",
    "content": "//=====================================================\n// File   :  dump_file_x_y.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)>        \n// Copyright (C) EDF R&D,  lun sep 30 14:23:20 CEST 2002\n//=====================================================\n// \n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n// \n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n// \n#ifndef XY_FILE_HH\n#define XY_FILE_HH\n#include <fstream>\n#include <iostream>\n#include <string>\n#include <vector>\nusing namespace std;\n\nbool read_xy_file(const std::string & filename, std::vector<int> & tab_sizes,\n                  std::vector<double> & tab_mflops, bool quiet = false)\n{\n\n  std::ifstream input_file (filename.c_str(),std::ios::in);\n\n  if (!input_file){\n    if (!quiet) {\n      INFOS(\"!!! Error opening \"<<filename);\n    }\n    return false;\n  }\n\n  int nb_point=0;\n  int size=0;\n  double mflops=0;\n\n  while (input_file >> size >> mflops ){\n    nb_point++;\n    tab_sizes.push_back(size);\n    tab_mflops.push_back(mflops);\n  }\n  SCRUTE(nb_point);\n\n  input_file.close();\n  return true;\n}\n\n// The Vector class must satisfy the following part of STL vector concept :\n//            resize() method\n//            [] operator for setting element\n// the vector element must have the << operator define\n\nusing namespace std;\n\ntemplate<class Vector_A, class Vector_B>\nvoid dump_xy_file(const Vector_A & X, const Vector_B & Y, const std::string & filename){\n  \n  ofstream outfile (filename.c_str(),ios::out) ;\n  int size=X.size();\n  \n  for (int i=0;i<size;i++)\n    outfile << X[i] << \" \" << Y[i] << endl;\n\n  outfile.close();\n} \n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/BLAS/CMakeLists.txt",
    "content": "\nfind_package(ATLAS)\nif (ATLAS_FOUND)\n  btl_add_bench(btl_atlas main.cpp)\n  if(BUILD_btl_atlas)\n    target_link_libraries(btl_atlas ${ATLAS_LIBRARIES})\n    set_target_properties(btl_atlas PROPERTIES COMPILE_FLAGS \"-DCBLASNAME=ATLAS -DHAS_LAPACK=1\")\n  endif()\nendif ()\n\nfind_package(MKL)\nif (MKL_FOUND)\n  btl_add_bench(btl_mkl main.cpp)\n  if(BUILD_btl_mkl)\n    target_link_libraries(btl_mkl ${MKL_LIBRARIES})\n    set_target_properties(btl_mkl PROPERTIES COMPILE_FLAGS \"-DCBLASNAME=INTEL_MKL -DHAS_LAPACK=1\")\n  endif()\nendif ()\n\n\nfind_package(OPENBLAS)\nif (OPENBLAS_FOUND)\n  btl_add_bench(btl_openblas main.cpp)\n  if(BUILD_btl_openblas)\n    target_link_libraries(btl_openblas ${OPENBLAS_LIBRARIES} )\n    set_target_properties(btl_openblas PROPERTIES COMPILE_FLAGS \"-DCBLASNAME=OPENBLAS\")\n  endif()\nendif ()\n\nfind_package(ACML)\nif (ACML_FOUND)\n  btl_add_bench(btl_acml main.cpp)\n  if(BUILD_btl_acml)\n    target_link_libraries(btl_acml ${ACML_LIBRARIES} )\n    set_target_properties(btl_acml PROPERTIES COMPILE_FLAGS \"-DCBLASNAME=ACML -DHAS_LAPACK=1\")\n  endif()\nendif ()\n\nif(Eigen_SOURCE_DIR AND CMAKE_Fortran_COMPILER_WORKS)\n  # we are inside Eigen and blas/lapack interface is compilable\n  include_directories(${Eigen_SOURCE_DIR})\n  btl_add_bench(btl_eigenblas main.cpp)\n  if(BUILD_btl_eigenblas)\n    target_link_libraries(btl_eigenblas eigen_blas eigen_lapack )\n    set_target_properties(btl_eigenblas PROPERTIES COMPILE_FLAGS \"-DCBLASNAME=EigenBLAS\")\n  endif()\nendif()\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/BLAS/blas.h",
    "content": "#ifndef BLAS_H\n#define BLAS_H\n\n#define BLASFUNC(FUNC) FUNC##_\n\n#ifdef __WIN64__\ntypedef long long BLASLONG;\ntypedef unsigned long long BLASULONG;\n#else\ntypedef long BLASLONG;\ntypedef unsigned long BLASULONG;\n#endif\n\nint    BLASFUNC(xerbla)(const char *, int *info, int);\n\nfloat  BLASFUNC(sdot)  (int *, float  *, int *, float  *, int *);\nfloat  BLASFUNC(sdsdot)(int *, float  *,        float  *, int *, float  *, int *);\n\ndouble BLASFUNC(dsdot) (int *, float  *, int *, float  *, int *);\ndouble BLASFUNC(ddot)  (int *, double *, int *, double *, int *);\ndouble BLASFUNC(qdot)  (int *, double *, int *, double *, int *);\n\n#if defined(F_INTERFACE_GFORT) && !defined(__64BIT__)\nint   BLASFUNC(cdotu)  (int *, float  * , int *, float  *,  int *);\nint   BLASFUNC(cdotc)  (int *, float  *,  int *, float  *,  int *);\nvoid  BLASFUNC(zdotu)  (double *, int *, double  *, int *, double  *, int *);\nvoid  BLASFUNC(zdotc)  (double *, int *, double  *, int *, double  *, int *);\nvoid  BLASFUNC(xdotu)  (double *, int *, double  *, int *, double  *, int *);\nvoid  BLASFUNC(xdotc)  (double *, int *, double  *, int *, double  *, int *);\n#elif  defined(F_INTERFACE_F2C) || \\\n     defined(F_INTERFACE_PGI) || \\\n     defined(F_INTERFACE_GFORT) || \\\n    (defined(F_INTERFACE_PATHSCALE) && defined(__64BIT__))\nvoid  BLASFUNC(cdotu)  (float *,  int *, float  * , int *, float  *,  int *);\nvoid  BLASFUNC(cdotc)  (float *,  int *, float  *,  int *, float  *,  int *);\nvoid  BLASFUNC(zdotu)  (double *, int *, double  *, int *, double  *, int *);\nvoid  BLASFUNC(zdotc)  (double *, int *, double  *, int *, double  *, int *);\nvoid  BLASFUNC(xdotu)  (double *, int *, double  *, int *, double  *, int *);\nvoid  BLASFUNC(xdotc)  (double *, int *, double  *, int *, double  *, int *);\n#else\nstd::complex<float>   BLASFUNC(cdotu)  (int *, float  *, int *, float  *, int *);\nstd::complex<float>   BLASFUNC(cdotc)  (int *, float  *, int *, float  *, int *);\nstd::complex<double>  BLASFUNC(zdotu)  (int *, double  *, int *, double  *, int *);\nstd::complex<double>  BLASFUNC(zdotc)  (int *, double  *, int *, double  *, int *);\ndouble  BLASFUNC(xdotu)  (int *, double  *, int *, double  *, int *);\ndouble  BLASFUNC(xdotc)  (int *, double  *, int *, double  *, int *);\n#endif\n\nint  BLASFUNC(cdotuw)  (int *, float  *, int *, float  *, int *, float*);\nint  BLASFUNC(cdotcw)  (int *, float  *, int *, float  *, int *, float*);\nint  BLASFUNC(zdotuw)  (int *, double  *, int *, double  *, int *, double*);\nint  BLASFUNC(zdotcw)  (int *, double  *, int *, double  *, int *, double*);\n\nint    BLASFUNC(saxpy) (int *, float  *, float  *, int *, float  *, int *);\nint    BLASFUNC(daxpy) (int *, double *, double *, int *, double *, int *);\nint    BLASFUNC(qaxpy) (int *, double *, double *, int *, double *, int *);\nint    BLASFUNC(caxpy) (int *, float  *, float  *, int *, float  *, int *);\nint    BLASFUNC(zaxpy) (int *, double *, double *, int *, double *, int *);\nint    BLASFUNC(xaxpy) (int *, double *, double *, int *, double *, int *);\nint    BLASFUNC(caxpyc)(int *, float  *, float  *, int *, float  *, int *);\nint    BLASFUNC(zaxpyc)(int *, double *, double *, int *, double *, int *);\nint    BLASFUNC(xaxpyc)(int *, double *, double *, int *, double *, int *);\n\nint    BLASFUNC(scopy) (int *, float  *, int *, float  *, int *);\nint    BLASFUNC(dcopy) (int *, double *, int *, double *, int *);\nint    BLASFUNC(qcopy) (int *, double *, int *, double *, int *);\nint    BLASFUNC(ccopy) (int *, float  *, int *, float  *, int *);\nint    BLASFUNC(zcopy) (int *, double *, int *, double *, int *);\nint    BLASFUNC(xcopy) (int *, double *, int *, double *, int *);\n\nint    BLASFUNC(sswap) (int *, float  *, int *, float  *, int *);\nint    BLASFUNC(dswap) (int *, double *, int *, double *, int *);\nint    BLASFUNC(qswap) (int *, double *, int *, double *, int *);\nint    BLASFUNC(cswap) (int *, float  *, int *, float  *, int *);\nint    BLASFUNC(zswap) (int *, double *, int *, double *, int *);\nint    BLASFUNC(xswap) (int *, double *, int *, double *, int *);\n\nfloat  BLASFUNC(sasum) (int *, float  *, int *);\nfloat  BLASFUNC(scasum)(int *, float  *, int *);\ndouble BLASFUNC(dasum) (int *, double *, int *);\ndouble BLASFUNC(qasum) (int *, double *, int *);\ndouble BLASFUNC(dzasum)(int *, double *, int *);\ndouble BLASFUNC(qxasum)(int *, double *, int *);\n\nint    BLASFUNC(isamax)(int *, float  *, int *);\nint    BLASFUNC(idamax)(int *, double *, int *);\nint    BLASFUNC(iqamax)(int *, double *, int *);\nint    BLASFUNC(icamax)(int *, float  *, int *);\nint    BLASFUNC(izamax)(int *, double *, int *);\nint    BLASFUNC(ixamax)(int *, double *, int *);\n\nint    BLASFUNC(ismax) (int *, float  *, int *);\nint    BLASFUNC(idmax) (int *, double *, int *);\nint    BLASFUNC(iqmax) (int *, double *, int *);\nint    BLASFUNC(icmax) (int *, float  *, int *);\nint    BLASFUNC(izmax) (int *, double *, int *);\nint    BLASFUNC(ixmax) (int *, double *, int *);\n\nint    BLASFUNC(isamin)(int *, float  *, int *);\nint    BLASFUNC(idamin)(int *, double *, int *);\nint    BLASFUNC(iqamin)(int *, double *, int *);\nint    BLASFUNC(icamin)(int *, float  *, int *);\nint    BLASFUNC(izamin)(int *, double *, int *);\nint    BLASFUNC(ixamin)(int *, double *, int *);\n\nint    BLASFUNC(ismin)(int *, float  *, int *);\nint    BLASFUNC(idmin)(int *, double *, int *);\nint    BLASFUNC(iqmin)(int *, double *, int *);\nint    BLASFUNC(icmin)(int *, float  *, int *);\nint    BLASFUNC(izmin)(int *, double *, int *);\nint    BLASFUNC(ixmin)(int *, double *, int *);\n\nfloat  BLASFUNC(samax) (int *, float  *, int *);\ndouble BLASFUNC(damax) (int *, double *, int *);\ndouble BLASFUNC(qamax) (int *, double *, int *);\nfloat  BLASFUNC(scamax)(int *, float  *, int *);\ndouble BLASFUNC(dzamax)(int *, double *, int *);\ndouble BLASFUNC(qxamax)(int *, double *, int *);\n\nfloat  BLASFUNC(samin) (int *, float  *, int *);\ndouble BLASFUNC(damin) (int *, double *, int *);\ndouble BLASFUNC(qamin) (int *, double *, int *);\nfloat  BLASFUNC(scamin)(int *, float  *, int *);\ndouble BLASFUNC(dzamin)(int *, double *, int *);\ndouble BLASFUNC(qxamin)(int *, double *, int *);\n\nfloat  BLASFUNC(smax)  (int *, float  *, int *);\ndouble BLASFUNC(dmax)  (int *, double *, int *);\ndouble BLASFUNC(qmax)  (int *, double *, int *);\nfloat  BLASFUNC(scmax) (int *, float  *, int *);\ndouble BLASFUNC(dzmax) (int *, double *, int *);\ndouble BLASFUNC(qxmax) (int *, double *, int *);\n\nfloat  BLASFUNC(smin)  (int *, float  *, int *);\ndouble BLASFUNC(dmin)  (int *, double *, int *);\ndouble BLASFUNC(qmin)  (int *, double *, int *);\nfloat  BLASFUNC(scmin) (int *, float  *, int *);\ndouble BLASFUNC(dzmin) (int *, double *, int *);\ndouble BLASFUNC(qxmin) (int *, double *, int *);\n\nint    BLASFUNC(sscal) (int *,  float  *, float  *, int *);\nint    BLASFUNC(dscal) (int *,  double *, double *, int *);\nint    BLASFUNC(qscal) (int *,  double *, double *, int *);\nint    BLASFUNC(cscal) (int *,  float  *, float  *, int *);\nint    BLASFUNC(zscal) (int *,  double *, double *, int *);\nint    BLASFUNC(xscal) (int *,  double *, double *, int *);\nint    BLASFUNC(csscal)(int *,  float  *, float  *, int *);\nint    BLASFUNC(zdscal)(int *,  double *, double *, int *);\nint    BLASFUNC(xqscal)(int *,  double *, double *, int *);\n\nfloat  BLASFUNC(snrm2) (int *, float  *, int *);\nfloat  BLASFUNC(scnrm2)(int *, float  *, int *);\n\ndouble BLASFUNC(dnrm2) (int *, double *, int *);\ndouble BLASFUNC(qnrm2) (int *, double *, int *);\ndouble BLASFUNC(dznrm2)(int *, double *, int *);\ndouble BLASFUNC(qxnrm2)(int *, double *, int *);\n\nint    BLASFUNC(srot)  (int *, float  *, int *, float  *, int *, float  *, float  *);\nint    BLASFUNC(drot)  (int *, double *, int *, double *, int *, double *, double *);\nint    BLASFUNC(qrot)  (int *, double *, int *, double *, int *, double *, double *);\nint    BLASFUNC(csrot) (int *, float  *, int *, float  *, int *, float  *, float  *);\nint    BLASFUNC(zdrot) (int *, double *, int *, double *, int *, double *, double *);\nint    BLASFUNC(xqrot) (int *, double *, int *, double *, int *, double *, double *);\n\nint    BLASFUNC(srotg) (float  *, float  *, float  *, float  *);\nint    BLASFUNC(drotg) (double *, double *, double *, double *);\nint    BLASFUNC(qrotg) (double *, double *, double *, double *);\nint    BLASFUNC(crotg) (float  *, float  *, float  *, float  *);\nint    BLASFUNC(zrotg) (double *, double *, double *, double *);\nint    BLASFUNC(xrotg) (double *, double *, double *, double *);\n\nint    BLASFUNC(srotmg)(float  *, float  *, float  *, float  *, float  *);\nint    BLASFUNC(drotmg)(double *, double *, double *, double *, double *);\n\nint    BLASFUNC(srotm) (int *, float  *, int *, float  *, int *, float  *);\nint    BLASFUNC(drotm) (int *, double *, int *, double *, int *, double *);\nint    BLASFUNC(qrotm) (int *, double *, int *, double *, int *, double *);\n\n/* Level 2 routines */\n\nint BLASFUNC(sger)(int *,    int *, float *,  float *, int *,\n\t\t   float *,  int *, float *,  int *);\nint BLASFUNC(dger)(int *,    int *, double *, double *, int *,\n\t\t   double *, int *, double *, int *);\nint BLASFUNC(qger)(int *,    int *, double *, double *, int *,\n\t\t   double *, int *, double *, int *);\nint BLASFUNC(cgeru)(int *,    int *, float *,  float *, int *,\n\t\t    float *,  int *, float *,  int *);\nint BLASFUNC(cgerc)(int *,    int *, float *,  float *, int *,\n\t\t    float *,  int *, float *,  int *);\nint BLASFUNC(zgeru)(int *,    int *, double *, double *, int *,\n\t\t    double *, int *, double *, int *);\nint BLASFUNC(zgerc)(int *,    int *, double *, double *, int *,\n\t\t    double *, int *, double *, int *);\nint BLASFUNC(xgeru)(int *,    int *, double *, double *, int *,\n\t\t    double *, int *, double *, int *);\nint BLASFUNC(xgerc)(int *,    int *, double *, double *, int *,\n\t\t    double *, int *, double *, int *);\n\nint BLASFUNC(sgemv)(char *, int *, int *, float  *, float  *, int *,\n\t\t    float  *, int *, float  *, float  *, int *);\nint BLASFUNC(dgemv)(char *, int *, int *, double *, double *, int *,\n\t\t    double *, int *, double *, double *, int *);\nint BLASFUNC(qgemv)(char *, int *, int *, double *, double *, int *,\n\t\t    double *, int *, double *, double *, int *);\nint BLASFUNC(cgemv)(char *, int *, int *, float  *, float  *, int *,\n\t\t    float  *, int *, float  *, float  *, int *);\nint BLASFUNC(zgemv)(char *, int *, int *, double *, double *, int *,\n\t\t    double *, int *, double *, double *, int *);\nint BLASFUNC(xgemv)(char *, int *, int *, double *, double *, int *,\n\t\t    double *, int *, double *, double *, int *);\n\nint BLASFUNC(strsv) (char *, char *, char *, int *, float  *, int *,\n\t\t     float  *, int *);\nint BLASFUNC(dtrsv) (char *, char *, char *, int *, double *, int *,\n\t\t     double *, int *);\nint BLASFUNC(qtrsv) (char *, char *, char *, int *, double *, int *,\n\t\t     double *, int *);\nint BLASFUNC(ctrsv) (char *, char *, char *, int *, float  *, int *,\n\t\t     float  *, int *);\nint BLASFUNC(ztrsv) (char *, char *, char *, int *, double *, int *,\n\t\t     double *, int *);\nint BLASFUNC(xtrsv) (char *, char *, char *, int *, double *, int *,\n\t\t     double *, int *);\n\nint BLASFUNC(stpsv) (char *, char *, char *, int *, float  *, float  *, int *);\nint BLASFUNC(dtpsv) (char *, char *, char *, int *, double *, double *, int *);\nint BLASFUNC(qtpsv) (char *, char *, char *, int *, double *, double *, int *);\nint BLASFUNC(ctpsv) (char *, char *, char *, int *, float  *, float  *, int *);\nint BLASFUNC(ztpsv) (char *, char *, char *, int *, double *, double *, int *);\nint BLASFUNC(xtpsv) (char *, char *, char *, int *, double *, double *, int *);\n\nint BLASFUNC(strmv) (char *, char *, char *, int *, float  *, int *,\n\t\t     float  *, int *);\nint BLASFUNC(dtrmv) (char *, char *, char *, int *, double *, int *,\n\t\t     double *, int *);\nint BLASFUNC(qtrmv) (char *, char *, char *, int *, double *, int *,\n\t\t     double *, int *);\nint BLASFUNC(ctrmv) (char *, char *, char *, int *, float  *, int *,\n\t\t     float  *, int *);\nint BLASFUNC(ztrmv) (char *, char *, char *, int *, double *, int *,\n\t\t     double *, int *);\nint BLASFUNC(xtrmv) (char *, char *, char *, int *, double *, int *,\n\t\t     double *, int *);\n\nint BLASFUNC(stpmv) (char *, char *, char *, int *, float  *, float  *, int *);\nint BLASFUNC(dtpmv) (char *, char *, char *, int *, double *, double *, int *);\nint BLASFUNC(qtpmv) (char *, char *, char *, int *, double *, double *, int *);\nint BLASFUNC(ctpmv) (char *, char *, char *, int *, float  *, float  *, int *);\nint BLASFUNC(ztpmv) (char *, char *, char *, int *, double *, double *, int *);\nint BLASFUNC(xtpmv) (char *, char *, char *, int *, double *, double *, int *);\n\nint BLASFUNC(stbmv) (char *, char *, char *, int *, int *, float  *, int *, float  *, int *);\nint BLASFUNC(dtbmv) (char *, char *, char *, int *, int *, double *, int *, double *, int *);\nint BLASFUNC(qtbmv) (char *, char *, char *, int *, int *, double *, int *, double *, int *);\nint BLASFUNC(ctbmv) (char *, char *, char *, int *, int *, float  *, int *, float  *, int *);\nint BLASFUNC(ztbmv) (char *, char *, char *, int *, int *, double *, int *, double *, int *);\nint BLASFUNC(xtbmv) (char *, char *, char *, int *, int *, double *, int *, double *, int *);\n\nint BLASFUNC(stbsv) (char *, char *, char *, int *, int *, float  *, int *, float  *, int *);\nint BLASFUNC(dtbsv) (char *, char *, char *, int *, int *, double *, int *, double *, int *);\nint BLASFUNC(qtbsv) (char *, char *, char *, int *, int *, double *, int *, double *, int *);\nint BLASFUNC(ctbsv) (char *, char *, char *, int *, int *, float  *, int *, float  *, int *);\nint BLASFUNC(ztbsv) (char *, char *, char *, int *, int *, double *, int *, double *, int *);\nint BLASFUNC(xtbsv) (char *, char *, char *, int *, int *, double *, int *, double *, int *);\n\nint BLASFUNC(ssymv) (char *, int *, float  *, float *, int *,\n\t\t     float  *, int *, float *, float *, int *);\nint BLASFUNC(dsymv) (char *, int *, double  *, double *, int *,\n\t\t     double  *, int *, double *, double *, int *);\nint BLASFUNC(qsymv) (char *, int *, double  *, double *, int *,\n\t\t     double  *, int *, double *, double *, int *);\nint BLASFUNC(csymv) (char *, int *, float  *, float *, int *,\n\t\t     float  *, int *, float *, float *, int *);\nint BLASFUNC(zsymv) (char *, int *, double  *, double *, int *,\n\t\t     double  *, int *, double *, double *, int *);\nint BLASFUNC(xsymv) (char *, int *, double  *, double *, int *,\n\t\t     double  *, int *, double *, double *, int *);\n\nint BLASFUNC(sspmv) (char *, int *, float  *, float *,\n\t\t     float  *, int *, float *, float *, int *);\nint BLASFUNC(dspmv) (char *, int *, double  *, double *,\n\t\t     double  *, int *, double *, double *, int *);\nint BLASFUNC(qspmv) (char *, int *, double  *, double *,\n\t\t     double  *, int *, double *, double *, int *);\nint BLASFUNC(cspmv) (char *, int *, float  *, float *,\n\t\t     float  *, int *, float *, float *, int *);\nint BLASFUNC(zspmv) (char *, int *, double  *, double *,\n\t\t     double  *, int *, double *, double *, int *);\nint BLASFUNC(xspmv) (char *, int *, double  *, double *,\n\t\t     double  *, int *, double *, double *, int *);\n\nint BLASFUNC(ssyr) (char *, int *, float   *, float  *, int *,\n\t\t    float  *, int *);\nint BLASFUNC(dsyr) (char *, int *, double  *, double *, int *,\n\t\t    double *, int *);\nint BLASFUNC(qsyr) (char *, int *, double  *, double *, int *,\n\t\t    double *, int *);\nint BLASFUNC(csyr) (char *, int *, float   *, float  *, int *,\n\t\t    float  *, int *);\nint BLASFUNC(zsyr) (char *, int *, double  *, double *, int *,\n\t\t    double *, int *);\nint BLASFUNC(xsyr) (char *, int *, double  *, double *, int *,\n\t\t    double *, int *);\n\nint BLASFUNC(ssyr2) (char *, int *, float   *,\n\t\t     float  *, int *, float  *, int *, float  *, int *);\nint BLASFUNC(dsyr2) (char *, int *, double  *,\n\t\t     double *, int *, double *, int *, double *, int *);\nint BLASFUNC(qsyr2) (char *, int *, double  *,\n\t\t     double *, int *, double *, int *, double *, int *);\nint BLASFUNC(csyr2) (char *, int *, float   *,\n\t\t     float  *, int *, float  *, int *, float  *, int *);\nint BLASFUNC(zsyr2) (char *, int *, double  *,\n\t\t     double *, int *, double *, int *, double *, int *);\nint BLASFUNC(xsyr2) (char *, int *, double  *,\n\t\t     double *, int *, double *, int *, double *, int *);\n\nint BLASFUNC(sspr) (char *, int *, float   *, float  *, int *,\n\t\t    float  *);\nint BLASFUNC(dspr) (char *, int *, double  *, double *, int *,\n\t\t    double *);\nint BLASFUNC(qspr) (char *, int *, double  *, double *, int *,\n\t\t    double *);\nint BLASFUNC(cspr) (char *, int *, float   *, float  *, int *,\n\t\t    float  *);\nint BLASFUNC(zspr) (char *, int *, double  *, double *, int *,\n\t\t    double *);\nint BLASFUNC(xspr) (char *, int *, double  *, double *, int *,\n\t\t    double *);\n\nint BLASFUNC(sspr2) (char *, int *, float   *,\n\t\t     float  *, int *, float  *, int *, float  *);\nint BLASFUNC(dspr2) (char *, int *, double  *,\n\t\t     double *, int *, double *, int *, double *);\nint BLASFUNC(qspr2) (char *, int *, double  *,\n\t\t     double *, int *, double *, int *, double *);\nint BLASFUNC(cspr2) (char *, int *, float   *,\n\t\t     float  *, int *, float  *, int *, float  *);\nint BLASFUNC(zspr2) (char *, int *, double  *,\n\t\t     double *, int *, double *, int *, double *);\nint BLASFUNC(xspr2) (char *, int *, double  *,\n\t\t     double *, int *, double *, int *, double *);\n\nint BLASFUNC(cher) (char *, int *, float   *, float  *, int *,\n\t\t    float  *, int *);\nint BLASFUNC(zher) (char *, int *, double  *, double *, int *,\n\t\t    double *, int *);\nint BLASFUNC(xher) (char *, int *, double  *, double *, int *,\n\t\t    double *, int *);\n\nint BLASFUNC(chpr) (char *, int *, float   *, float  *, int *, float  *);\nint BLASFUNC(zhpr) (char *, int *, double  *, double *, int *, double *);\nint BLASFUNC(xhpr) (char *, int *, double  *, double *, int *, double *);\n\nint BLASFUNC(cher2) (char *, int *, float   *,\n\t\t     float  *, int *, float  *, int *, float  *, int *);\nint BLASFUNC(zher2) (char *, int *, double  *,\n\t\t     double *, int *, double *, int *, double *, int *);\nint BLASFUNC(xher2) (char *, int *, double  *,\n\t\t     double *, int *, double *, int *, double *, int *);\n\nint BLASFUNC(chpr2) (char *, int *, float   *,\n\t\t     float  *, int *, float  *, int *, float  *);\nint BLASFUNC(zhpr2) (char *, int *, double  *,\n\t\t     double *, int *, double *, int *, double *);\nint BLASFUNC(xhpr2) (char *, int *, double  *,\n\t\t     double *, int *, double *, int *, double *);\n\nint BLASFUNC(chemv) (char *, int *, float  *, float *, int *,\n\t\t     float  *, int *, float *, float *, int *);\nint BLASFUNC(zhemv) (char *, int *, double  *, double *, int *,\n\t\t     double  *, int *, double *, double *, int *);\nint BLASFUNC(xhemv) (char *, int *, double  *, double *, int *,\n\t\t     double  *, int *, double *, double *, int *);\n\nint BLASFUNC(chpmv) (char *, int *, float  *, float *,\n\t\t     float  *, int *, float *, float *, int *);\nint BLASFUNC(zhpmv) (char *, int *, double  *, double *,\n\t\t     double  *, int *, double *, double *, int *);\nint BLASFUNC(xhpmv) (char *, int *, double  *, double *,\n\t\t     double  *, int *, double *, double *, int *);\n\nint BLASFUNC(snorm)(char *, int *, int *, float  *, int *);\nint BLASFUNC(dnorm)(char *, int *, int *, double *, int *);\nint BLASFUNC(cnorm)(char *, int *, int *, float  *, int *);\nint BLASFUNC(znorm)(char *, int *, int *, double *, int *);\n\nint BLASFUNC(sgbmv)(char *, int *, int *, int *, int *, float  *, float  *, int *,\n\t\t    float  *, int *, float  *, float  *, int *);\nint BLASFUNC(dgbmv)(char *, int *, int *, int *, int *, double *, double *, int *,\n\t\t    double *, int *, double *, double *, int *);\nint BLASFUNC(qgbmv)(char *, int *, int *, int *, int *, double *, double *, int *,\n\t\t    double *, int *, double *, double *, int *);\nint BLASFUNC(cgbmv)(char *, int *, int *, int *, int *, float  *, float  *, int *,\n\t\t    float  *, int *, float  *, float  *, int *);\nint BLASFUNC(zgbmv)(char *, int *, int *, int *, int *, double *, double *, int *,\n\t\t    double *, int *, double *, double *, int *);\nint BLASFUNC(xgbmv)(char *, int *, int *, int *, int *, double *, double *, int *,\n\t\t    double *, int *, double *, double *, int *);\n\nint BLASFUNC(ssbmv)(char *, int *, int *, float  *, float  *, int *,\n\t\t    float  *, int *, float  *, float  *, int *);\nint BLASFUNC(dsbmv)(char *, int *, int *, double *, double *, int *,\n\t\t    double *, int *, double *, double *, int *);\nint BLASFUNC(qsbmv)(char *, int *, int *, double *, double *, int *,\n\t\t    double *, int *, double *, double *, int *);\nint BLASFUNC(csbmv)(char *, int *, int *, float  *, float  *, int *,\n\t\t    float  *, int *, float  *, float  *, int *);\nint BLASFUNC(zsbmv)(char *, int *, int *, double *, double *, int *,\n\t\t    double *, int *, double *, double *, int *);\nint BLASFUNC(xsbmv)(char *, int *, int *, double *, double *, int *,\n\t\t    double *, int *, double *, double *, int *);\n\nint BLASFUNC(chbmv)(char *, int *, int *, float  *, float  *, int *,\n\t\t    float  *, int *, float  *, float  *, int *);\nint BLASFUNC(zhbmv)(char *, int *, int *, double *, double *, int *,\n\t\t    double *, int *, double *, double *, int *);\nint BLASFUNC(xhbmv)(char *, int *, int *, double *, double *, int *,\n\t\t    double *, int *, double *, double *, int *);\n\n/* Level 3 routines */\n\nint BLASFUNC(sgemm)(char *, char *, int *, int *, int *, float *,\n\t   float  *, int *, float  *, int *, float  *, float  *, int *);\nint BLASFUNC(dgemm)(char *, char *, int *, int *, int *, double *,\n\t   double *, int *, double *, int *, double *, double *, int *);\nint BLASFUNC(qgemm)(char *, char *, int *, int *, int *, double *,\n\t   double *, int *, double *, int *, double *, double *, int *);\nint BLASFUNC(cgemm)(char *, char *, int *, int *, int *, float *,\n\t   float  *, int *, float  *, int *, float  *, float  *, int *);\nint BLASFUNC(zgemm)(char *, char *, int *, int *, int *, double *,\n\t   double *, int *, double *, int *, double *, double *, int *);\nint BLASFUNC(xgemm)(char *, char *, int *, int *, int *, double *,\n\t   double *, int *, double *, int *, double *, double *, int *);\n\nint BLASFUNC(cgemm3m)(char *, char *, int *, int *, int *, float *,\n\t   float  *, int *, float  *, int *, float  *, float  *, int *);\nint BLASFUNC(zgemm3m)(char *, char *, int *, int *, int *, double *,\n\t   double *, int *, double *, int *, double *, double *, int *);\nint BLASFUNC(xgemm3m)(char *, char *, int *, int *, int *, double *,\n\t   double *, int *, double *, int *, double *, double *, int *);\n\nint BLASFUNC(sge2mm)(char *, char *, char *, int *, int *,\n\t\t     float *, float  *, int *, float  *, int *,\n\t\t     float *, float  *, int *);\nint BLASFUNC(dge2mm)(char *, char *, char *, int *, int *,\n\t\t     double *, double  *, int *, double  *, int *,\n\t\t     double *, double  *, int *);\nint BLASFUNC(cge2mm)(char *, char *, char *, int *, int *,\n\t\t     float *, float  *, int *, float  *, int *,\n\t\t     float *, float  *, int *);\nint BLASFUNC(zge2mm)(char *, char *, char *, int *, int *,\n\t\t     double *, double  *, int *, double  *, int *,\n\t\t     double *, double  *, int *);\n\nint BLASFUNC(strsm)(char *, char *, char *, char *, int *, int *,\n\t   float *,  float *, int *, float *, int *);\nint BLASFUNC(dtrsm)(char *, char *, char *, char *, int *, int *,\n\t   double *,  double *, int *, double *, int *);\nint BLASFUNC(qtrsm)(char *, char *, char *, char *, int *, int *,\n\t   double *,  double *, int *, double *, int *);\nint BLASFUNC(ctrsm)(char *, char *, char *, char *, int *, int *,\n\t   float *,  float *, int *, float *, int *);\nint BLASFUNC(ztrsm)(char *, char *, char *, char *, int *, int *,\n\t   double *,  double *, int *, double *, int *);\nint BLASFUNC(xtrsm)(char *, char *, char *, char *, int *, int *,\n\t   double *,  double *, int *, double *, int *);\n\nint BLASFUNC(strmm)(char *, char *, char *, char *, int *, int *,\n\t   float *,  float *, int *, float *, int *);\nint BLASFUNC(dtrmm)(char *, char *, char *, char *, int *, int *,\n\t   double *,  double *, int *, double *, int *);\nint BLASFUNC(qtrmm)(char *, char *, char *, char *, int *, int *,\n\t   double *,  double *, int *, double *, int *);\nint BLASFUNC(ctrmm)(char *, char *, char *, char *, int *, int *,\n\t   float *,  float *, int *, float *, int *);\nint BLASFUNC(ztrmm)(char *, char *, char *, char *, int *, int *,\n\t   double *,  double *, int *, double *, int *);\nint BLASFUNC(xtrmm)(char *, char *, char *, char *, int *, int *,\n\t   double *,  double *, int *, double *, int *);\n\nint BLASFUNC(ssymm)(char *, char *, int *, int *, float  *, float  *, int *,\n\t   float  *, int *, float  *, float  *, int *);\nint BLASFUNC(dsymm)(char *, char *, int *, int *, double *, double *, int *,\n\t   double *, int *, double *, double *, int *);\nint BLASFUNC(qsymm)(char *, char *, int *, int *, double *, double *, int *,\n\t   double *, int *, double *, double *, int *);\nint BLASFUNC(csymm)(char *, char *, int *, int *, float  *, float  *, int *,\n\t   float  *, int *, float  *, float  *, int *);\nint BLASFUNC(zsymm)(char *, char *, int *, int *, double *, double *, int *,\n\t   double *, int *, double *, double *, int *);\nint BLASFUNC(xsymm)(char *, char *, int *, int *, double *, double *, int *,\n\t   double *, int *, double *, double *, int *);\n\nint BLASFUNC(csymm3m)(char *, char *, int *, int *, float  *, float  *, int *,\n\t   float  *, int *, float  *, float  *, int *);\nint BLASFUNC(zsymm3m)(char *, char *, int *, int *, double *, double *, int *,\n\t   double *, int *, double *, double *, int *);\nint BLASFUNC(xsymm3m)(char *, char *, int *, int *, double *, double *, int *,\n\t   double *, int *, double *, double *, int *);\n\nint BLASFUNC(ssyrk)(char *, char *, int *, int *, float  *, float  *, int *,\n\t   float  *, float  *, int *);\nint BLASFUNC(dsyrk)(char *, char *, int *, int *, double *, double *, int *,\n\t   double *, double *, int *);\nint BLASFUNC(qsyrk)(char *, char *, int *, int *, double *, double *, int *,\n\t   double *, double *, int *);\nint BLASFUNC(csyrk)(char *, char *, int *, int *, float  *, float  *, int *,\n\t   float  *, float  *, int *);\nint BLASFUNC(zsyrk)(char *, char *, int *, int *, double *, double *, int *,\n\t   double *, double *, int *);\nint BLASFUNC(xsyrk)(char *, char *, int *, int *, double *, double *, int *,\n\t   double *, double *, int *);\n\nint BLASFUNC(ssyr2k)(char *, char *, int *, int *, float  *, float  *, int *,\n\t   float *, int *, float  *, float  *, int *);\nint BLASFUNC(dsyr2k)(char *, char *, int *, int *, double *, double *, int *,\n\t   double*, int *, double *, double *, int *);\nint BLASFUNC(qsyr2k)(char *, char *, int *, int *, double *, double *, int *,\n\t   double*, int *, double *, double *, int *);\nint BLASFUNC(csyr2k)(char *, char *, int *, int *, float  *, float  *, int *,\n\t   float *, int *, float  *, float  *, int *);\nint BLASFUNC(zsyr2k)(char *, char *, int *, int *, double *, double *, int *,\n\t   double*, int *, double *, double *, int *);\nint BLASFUNC(xsyr2k)(char *, char *, int *, int *, double *, double *, int *,\n\t   double*, int *, double *, double *, int *);\n\nint BLASFUNC(chemm)(char *, char *, int *, int *, float  *, float  *, int *,\n\t   float  *, int *, float  *, float  *, int *);\nint BLASFUNC(zhemm)(char *, char *, int *, int *, double *, double *, int *,\n\t   double *, int *, double *, double *, int *);\nint BLASFUNC(xhemm)(char *, char *, int *, int *, double *, double *, int *,\n\t   double *, int *, double *, double *, int *);\n\nint BLASFUNC(chemm3m)(char *, char *, int *, int *, float  *, float  *, int *,\n\t   float  *, int *, float  *, float  *, int *);\nint BLASFUNC(zhemm3m)(char *, char *, int *, int *, double *, double *, int *,\n\t   double *, int *, double *, double *, int *);\nint BLASFUNC(xhemm3m)(char *, char *, int *, int *, double *, double *, int *,\n\t   double *, int *, double *, double *, int *);\n\nint BLASFUNC(cherk)(char *, char *, int *, int *, float  *, float  *, int *,\n\t   float  *, float  *, int *);\nint BLASFUNC(zherk)(char *, char *, int *, int *, double *, double *, int *,\n\t   double *, double *, int *);\nint BLASFUNC(xherk)(char *, char *, int *, int *, double *, double *, int *,\n\t   double *, double *, int *);\n\nint BLASFUNC(cher2k)(char *, char *, int *, int *, float  *, float  *, int *,\n\t   float *, int *, float  *, float  *, int *);\nint BLASFUNC(zher2k)(char *, char *, int *, int *, double *, double *, int *,\n\t   double*, int *, double *, double *, int *);\nint BLASFUNC(xher2k)(char *, char *, int *, int *, double *, double *, int *,\n\t   double*, int *, double *, double *, int *);\nint BLASFUNC(cher2m)(char *, char *, char *, int *, int *, float  *, float  *, int *,\n\t   float *, int *, float  *, float  *, int *);\nint BLASFUNC(zher2m)(char *, char *, char *, int *, int *, double *, double *, int *,\n\t   double*, int *, double *, double *, int *);\nint BLASFUNC(xher2m)(char *, char *, char *, int *, int *, double *, double *, int *,\n\t   double*, int *, double *, double *, int *);\n\nint BLASFUNC(sgemt)(char *, int *, int *, float  *, float  *, int *,\n\t\t    float  *, int *);\nint BLASFUNC(dgemt)(char *, int *, int *, double *, double *, int *,\n\t\t    double *, int *);\nint BLASFUNC(cgemt)(char *, int *, int *, float  *, float  *, int *,\n\t\t    float  *, int *);\nint BLASFUNC(zgemt)(char *, int *, int *, double *, double *, int *,\n\t\t    double *, int *);\n\nint BLASFUNC(sgema)(char *, char *, int *, int *, float  *,\n\t\t    float  *, int *, float *, float  *, int *, float *, int *);\nint BLASFUNC(dgema)(char *, char *, int *, int *, double *,\n\t\t    double *, int *, double*, double *, int *, double*, int *);\nint BLASFUNC(cgema)(char *, char *, int *, int *, float  *,\n\t\t    float  *, int *, float *, float  *, int *, float *, int *);\nint BLASFUNC(zgema)(char *, char *, int *, int *, double *,\n\t\t    double *, int *, double*, double *, int *, double*, int *);\n\nint BLASFUNC(sgems)(char *, char *, int *, int *, float  *,\n\t\t    float  *, int *, float *, float  *, int *, float *, int *);\nint BLASFUNC(dgems)(char *, char *, int *, int *, double *,\n\t\t    double *, int *, double*, double *, int *, double*, int *);\nint BLASFUNC(cgems)(char *, char *, int *, int *, float  *,\n\t\t    float  *, int *, float *, float  *, int *, float *, int *);\nint BLASFUNC(zgems)(char *, char *, int *, int *, double *,\n\t\t    double *, int *, double*, double *, int *, double*, int *);\n\nint BLASFUNC(sgetf2)(int *, int *, float  *, int *, int *, int *);\nint BLASFUNC(dgetf2)(int *, int *, double *, int *, int *, int *);\nint BLASFUNC(qgetf2)(int *, int *, double *, int *, int *, int *);\nint BLASFUNC(cgetf2)(int *, int *, float  *, int *, int *, int *);\nint BLASFUNC(zgetf2)(int *, int *, double *, int *, int *, int *);\nint BLASFUNC(xgetf2)(int *, int *, double *, int *, int *, int *);\n\nint BLASFUNC(sgetrf)(int *, int *, float  *, int *, int *, int *);\nint BLASFUNC(dgetrf)(int *, int *, double *, int *, int *, int *);\nint BLASFUNC(qgetrf)(int *, int *, double *, int *, int *, int *);\nint BLASFUNC(cgetrf)(int *, int *, float  *, int *, int *, int *);\nint BLASFUNC(zgetrf)(int *, int *, double *, int *, int *, int *);\nint BLASFUNC(xgetrf)(int *, int *, double *, int *, int *, int *);\n\nint BLASFUNC(slaswp)(int *, float  *, int *, int *, int *, int *, int *);\nint BLASFUNC(dlaswp)(int *, double *, int *, int *, int *, int *, int *);\nint BLASFUNC(qlaswp)(int *, double *, int *, int *, int *, int *, int *);\nint BLASFUNC(claswp)(int *, float  *, int *, int *, int *, int *, int *);\nint BLASFUNC(zlaswp)(int *, double *, int *, int *, int *, int *, int *);\nint BLASFUNC(xlaswp)(int *, double *, int *, int *, int *, int *, int *);\n\nint BLASFUNC(sgetrs)(char *, int *, int *, float  *, int *, int *, float  *, int *, int *);\nint BLASFUNC(dgetrs)(char *, int *, int *, double *, int *, int *, double *, int *, int *);\nint BLASFUNC(qgetrs)(char *, int *, int *, double *, int *, int *, double *, int *, int *);\nint BLASFUNC(cgetrs)(char *, int *, int *, float  *, int *, int *, float  *, int *, int *);\nint BLASFUNC(zgetrs)(char *, int *, int *, double *, int *, int *, double *, int *, int *);\nint BLASFUNC(xgetrs)(char *, int *, int *, double *, int *, int *, double *, int *, int *);\n\nint BLASFUNC(sgesv)(int *, int *, float  *, int *, int *, float *, int *, int *);\nint BLASFUNC(dgesv)(int *, int *, double *, int *, int *, double*, int *, int *);\nint BLASFUNC(qgesv)(int *, int *, double *, int *, int *, double*, int *, int *);\nint BLASFUNC(cgesv)(int *, int *, float  *, int *, int *, float *, int *, int *);\nint BLASFUNC(zgesv)(int *, int *, double *, int *, int *, double*, int *, int *);\nint BLASFUNC(xgesv)(int *, int *, double *, int *, int *, double*, int *, int *);\n\nint BLASFUNC(spotf2)(char *, int *, float  *, int *, int *);\nint BLASFUNC(dpotf2)(char *, int *, double *, int *, int *);\nint BLASFUNC(qpotf2)(char *, int *, double *, int *, int *);\nint BLASFUNC(cpotf2)(char *, int *, float  *, int *, int *);\nint BLASFUNC(zpotf2)(char *, int *, double *, int *, int *);\nint BLASFUNC(xpotf2)(char *, int *, double *, int *, int *);\n\nint BLASFUNC(spotrf)(char *, int *, float  *, int *, int *);\nint BLASFUNC(dpotrf)(char *, int *, double *, int *, int *);\nint BLASFUNC(qpotrf)(char *, int *, double *, int *, int *);\nint BLASFUNC(cpotrf)(char *, int *, float  *, int *, int *);\nint BLASFUNC(zpotrf)(char *, int *, double *, int *, int *);\nint BLASFUNC(xpotrf)(char *, int *, double *, int *, int *);\n\nint BLASFUNC(slauu2)(char *, int *, float  *, int *, int *);\nint BLASFUNC(dlauu2)(char *, int *, double *, int *, int *);\nint BLASFUNC(qlauu2)(char *, int *, double *, int *, int *);\nint BLASFUNC(clauu2)(char *, int *, float  *, int *, int *);\nint BLASFUNC(zlauu2)(char *, int *, double *, int *, int *);\nint BLASFUNC(xlauu2)(char *, int *, double *, int *, int *);\n\nint BLASFUNC(slauum)(char *, int *, float  *, int *, int *);\nint BLASFUNC(dlauum)(char *, int *, double *, int *, int *);\nint BLASFUNC(qlauum)(char *, int *, double *, int *, int *);\nint BLASFUNC(clauum)(char *, int *, float  *, int *, int *);\nint BLASFUNC(zlauum)(char *, int *, double *, int *, int *);\nint BLASFUNC(xlauum)(char *, int *, double *, int *, int *);\n\nint BLASFUNC(strti2)(char *, char *, int *, float  *, int *, int *);\nint BLASFUNC(dtrti2)(char *, char *, int *, double *, int *, int *);\nint BLASFUNC(qtrti2)(char *, char *, int *, double *, int *, int *);\nint BLASFUNC(ctrti2)(char *, char *, int *, float  *, int *, int *);\nint BLASFUNC(ztrti2)(char *, char *, int *, double *, int *, int *);\nint BLASFUNC(xtrti2)(char *, char *, int *, double *, int *, int *);\n\nint BLASFUNC(strtri)(char *, char *, int *, float  *, int *, int *);\nint BLASFUNC(dtrtri)(char *, char *, int *, double *, int *, int *);\nint BLASFUNC(qtrtri)(char *, char *, int *, double *, int *, int *);\nint BLASFUNC(ctrtri)(char *, char *, int *, float  *, int *, int *);\nint BLASFUNC(ztrtri)(char *, char *, int *, double *, int *, int *);\nint BLASFUNC(xtrtri)(char *, char *, int *, double *, int *, int *);\n\nint BLASFUNC(spotri)(char *, int *, float  *, int *, int *);\nint BLASFUNC(dpotri)(char *, int *, double *, int *, int *);\nint BLASFUNC(qpotri)(char *, int *, double *, int *, int *);\nint BLASFUNC(cpotri)(char *, int *, float  *, int *, int *);\nint BLASFUNC(zpotri)(char *, int *, double *, int *, int *);\nint BLASFUNC(xpotri)(char *, int *, double *, int *, int *);\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/BLAS/blas_interface.hh",
    "content": "//=====================================================\n// File   :  blas_interface.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)>\n// Copyright (C) EDF R&D,  lun sep 30 14:23:28 CEST 2002\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#ifndef blas_PRODUIT_MATRICE_VECTEUR_HH\n#define blas_PRODUIT_MATRICE_VECTEUR_HH\n\n#include <c_interface_base.h>\n#include <complex>\nextern \"C\"\n{\n#include \"blas.h\"\n\n  // Cholesky Factorization\n//   void spotrf_(const char* uplo, const int* n, float *a, const int* ld, int* info);\n//   void dpotrf_(const char* uplo, const int* n, double *a, const int* ld, int* info);\n  void ssytrd_(char *uplo, const int *n, float *a, const int *lda, float *d, float *e, float *tau, float *work, int *lwork, int *info );\n  void dsytrd_(char *uplo, const int *n, double *a, const int *lda, double *d, double *e, double *tau, double *work, int *lwork, int *info );\n  void sgehrd_( const int *n, int *ilo, int *ihi, float *a, const int *lda, float *tau, float *work, int *lwork, int *info );\n  void dgehrd_( const int *n, int *ilo, int *ihi, double *a, const int *lda, double *tau, double *work, int *lwork, int *info );\n\n  // LU row pivoting\n//   void dgetrf_( int *m, int *n, double *a, int *lda, int *ipiv, int *info );\n//   void sgetrf_(const int* m, const int* n, float *a, const int* ld, int* ipivot, int* info);\n  // LU full pivoting\n  void sgetc2_(const int* n, float *a, const int *lda, int *ipiv, int *jpiv, int*info );\n  void dgetc2_(const int* n, double *a, const int *lda, int *ipiv, int *jpiv, int*info );\n#ifdef HAS_LAPACK\n#endif\n}\n\n#define MAKE_STRING2(S) #S\n#define MAKE_STRING(S) MAKE_STRING2(S)\n\n#define CAT2(A,B) A##B\n#define CAT(A,B) CAT2(A,B)\n\n\ntemplate<class real> class blas_interface;\n\n\nstatic char notrans = 'N';\nstatic char trans = 'T';\nstatic char nonunit = 'N';\nstatic char lower = 'L';\nstatic char right = 'R';\nstatic char left = 'L';\nstatic int intone = 1;\n\n\n\n#define SCALAR        float\n#define SCALAR_PREFIX s\n#include \"blas_interface_impl.hh\"\n#undef SCALAR\n#undef SCALAR_PREFIX\n\n\n#define SCALAR        double\n#define SCALAR_PREFIX d\n#include \"blas_interface_impl.hh\"\n#undef SCALAR\n#undef SCALAR_PREFIX\n\n#endif\n\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/BLAS/blas_interface_impl.hh",
    "content": "\n#define BLAS_FUNC(NAME) CAT(CAT(SCALAR_PREFIX,NAME),_)\n\ntemplate<> class blas_interface<SCALAR> : public c_interface_base<SCALAR>\n{\n\npublic :\n  \n  static SCALAR fone;\n  static SCALAR fzero;\n\n  static inline std::string name()\n  {\n    return MAKE_STRING(CBLASNAME);\n  }\n\n  static inline void matrix_vector_product(gene_matrix & A, gene_vector & B, gene_vector & X, int N){\n    BLAS_FUNC(gemv)(&notrans,&N,&N,&fone,A,&N,B,&intone,&fzero,X,&intone);\n  }\n\n  static inline void symv(gene_matrix & A, gene_vector & B, gene_vector & X, int N){\n    BLAS_FUNC(symv)(&lower, &N,&fone,A,&N,B,&intone,&fzero,X,&intone);\n  }\n\n  static inline void syr2(gene_matrix & A, gene_vector & B, gene_vector & X, int N){\n    BLAS_FUNC(syr2)(&lower,&N,&fone,B,&intone,X,&intone,A,&N);\n  }\n\n  static inline void ger(gene_matrix & A, gene_vector & X, gene_vector & Y, int N){\n    BLAS_FUNC(ger)(&N,&N,&fone,X,&intone,Y,&intone,A,&N);\n  }\n\n  static inline void rot(gene_vector & A,  gene_vector & B, SCALAR c, SCALAR s, int N){\n    BLAS_FUNC(rot)(&N,A,&intone,B,&intone,&c,&s);\n  }\n\n  static inline void atv_product(gene_matrix & A, gene_vector & B, gene_vector & X, int N){\n    BLAS_FUNC(gemv)(&trans,&N,&N,&fone,A,&N,B,&intone,&fzero,X,&intone);\n  }\n\n  static inline void matrix_matrix_product(gene_matrix & A, gene_matrix & B, gene_matrix & X, int N){\n    BLAS_FUNC(gemm)(&notrans,&notrans,&N,&N,&N,&fone,A,&N,B,&N,&fzero,X,&N);\n  }\n\n  static inline void transposed_matrix_matrix_product(gene_matrix & A, gene_matrix & B, gene_matrix & X, int N){\n    BLAS_FUNC(gemm)(&notrans,&notrans,&N,&N,&N,&fone,A,&N,B,&N,&fzero,X,&N);\n  }\n\n  static inline void ata_product(gene_matrix & A, gene_matrix & X, int N){\n    BLAS_FUNC(syrk)(&lower,&trans,&N,&N,&fone,A,&N,&fzero,X,&N);\n  }\n\n  static inline void aat_product(gene_matrix & A, gene_matrix & X, int N){\n    BLAS_FUNC(syrk)(&lower,&notrans,&N,&N,&fone,A,&N,&fzero,X,&N);\n  }\n\n  static inline void axpy(SCALAR coef, const gene_vector & X, gene_vector & Y, int N){\n    BLAS_FUNC(axpy)(&N,&coef,X,&intone,Y,&intone);\n  }\n\n  static inline void axpby(SCALAR a, const gene_vector & X, SCALAR b, gene_vector & Y, int N){\n    BLAS_FUNC(scal)(&N,&b,Y,&intone);\n    BLAS_FUNC(axpy)(&N,&a,X,&intone,Y,&intone);\n  }\n\n  static inline void cholesky(const gene_matrix & X, gene_matrix & C, int N){\n    int N2 = N*N;\n    BLAS_FUNC(copy)(&N2, X, &intone, C, &intone);\n    char uplo = 'L';\n    int info = 0;\n    BLAS_FUNC(potrf)(&uplo, &N, C, &N, &info);\n    if(info!=0) std::cerr << \"potrf_ error \" << info << \"\\n\";\n  }\n\n  static inline void partial_lu_decomp(const gene_matrix & X, gene_matrix & C, int N){\n    int N2 = N*N;\n    BLAS_FUNC(copy)(&N2, X, &intone, C, &intone);\n    int info = 0;\n    int * ipiv = (int*)alloca(sizeof(int)*N);\n    BLAS_FUNC(getrf)(&N, &N, C, &N, ipiv, &info);\n    if(info!=0) std::cerr << \"getrf_ error \" << info << \"\\n\";\n  }\n  \n  static inline void trisolve_lower(const gene_matrix & L, const gene_vector& B, gene_vector & X, int N){\n    BLAS_FUNC(copy)(&N, B, &intone, X, &intone);\n    BLAS_FUNC(trsv)(&lower, &notrans, &nonunit, &N, L, &N, X, &intone);\n  }\n\n  static inline void trisolve_lower_matrix(const gene_matrix & L, const gene_matrix& B, gene_matrix & X, int N){\n    BLAS_FUNC(copy)(&N, B, &intone, X, &intone);\n    BLAS_FUNC(trsm)(&right, &lower, &notrans, &nonunit, &N, &N, &fone, L, &N, X, &N);\n  }\n\n  static inline void trmm(gene_matrix & A, gene_matrix & B, gene_matrix & /*X*/, int N){\n    BLAS_FUNC(trmm)(&left, &lower, &notrans,&nonunit, &N,&N,&fone,A,&N,B,&N);\n  }\n\n  #ifdef HAS_LAPACK\n\n  static inline void lu_decomp(const gene_matrix & X, gene_matrix & C, int N){\n    int N2 = N*N;\n    BLAS_FUNC(copy)(&N2, X, &intone, C, &intone);\n    int info = 0;\n    int * ipiv = (int*)alloca(sizeof(int)*N);\n    int * jpiv = (int*)alloca(sizeof(int)*N);\n    BLAS_FUNC(getc2)(&N, C, &N, ipiv, jpiv, &info);\n  }\n\n\n\n  static inline void hessenberg(const gene_matrix & X, gene_matrix & C, int N){\n    {\n      int N2 = N*N;\n      int inc = 1;\n      BLAS_FUNC(copy)(&N2, X, &inc, C, &inc);\n    }\n    int info = 0;\n    int ilo = 1;\n    int ihi = N;\n    int bsize = 64;\n    int worksize = N*bsize;\n    SCALAR* d = new SCALAR[N+worksize];\n    BLAS_FUNC(gehrd)(&N, &ilo, &ihi, C, &N, d, d+N, &worksize, &info);\n    delete[] d;\n  }\n\n  static inline void tridiagonalization(const gene_matrix & X, gene_matrix & C, int N){\n    {\n      int N2 = N*N;\n      int inc = 1;\n      BLAS_FUNC(copy)(&N2, X, &inc, C, &inc);\n    }\n    char uplo = 'U';\n    int info = 0;\n    int bsize = 64;\n    int worksize = N*bsize;\n    SCALAR* d = new SCALAR[3*N+worksize];\n    BLAS_FUNC(sytrd)(&uplo, &N, C, &N, d, d+N, d+2*N, d+3*N, &worksize, &info);\n    delete[] d;\n  }\n  \n  #endif // HAS_LAPACK\n\n};\n\nSCALAR blas_interface<SCALAR>::fone = SCALAR(1);\nSCALAR blas_interface<SCALAR>::fzero = SCALAR(0);\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/BLAS/c_interface_base.h",
    "content": "\n#ifndef BTL_C_INTERFACE_BASE_H\n#define BTL_C_INTERFACE_BASE_H\n\n#include \"utilities.h\"\n#include <vector>\n\ntemplate<class real> class c_interface_base\n{\n\npublic:\n\n  typedef real                      real_type;\n  typedef std::vector<real>         stl_vector;\n  typedef std::vector<stl_vector >  stl_matrix;\n\n  typedef real* gene_matrix;\n  typedef real* gene_vector;\n\n  static void free_matrix(gene_matrix & A, int /*N*/){\n    delete[] A;\n  }\n\n  static void free_vector(gene_vector & B){\n    delete[] B;\n  }\n\n  static inline void matrix_from_stl(gene_matrix & A, stl_matrix & A_stl){\n    int N = A_stl.size();\n    A = new real[N*N];\n    for (int j=0;j<N;j++)\n      for (int i=0;i<N;i++)\n        A[i+N*j] = A_stl[j][i];\n  }\n\n  static inline void vector_from_stl(gene_vector & B, stl_vector & B_stl){\n    int N = B_stl.size();\n    B = new real[N];\n    for (int i=0;i<N;i++)\n      B[i] = B_stl[i];\n  }\n\n  static inline void vector_to_stl(gene_vector & B, stl_vector & B_stl){\n    int N = B_stl.size();\n    for (int i=0;i<N;i++)\n      B_stl[i] = B[i];\n  }\n\n  static inline void matrix_to_stl(gene_matrix & A, stl_matrix & A_stl){\n    int N = A_stl.size();\n    for (int j=0;j<N;j++){\n      A_stl[j].resize(N);\n      for (int i=0;i<N;i++)\n        A_stl[j][i] = A[i+N*j];\n    }\n  }\n\n  static inline void copy_vector(const gene_vector & source, gene_vector & cible, int N){\n    for (int i=0;i<N;i++)\n      cible[i]=source[i];\n  }\n\n  static inline void copy_matrix(const gene_matrix & source, gene_matrix & cible, int N){\n    for (int j=0;j<N;j++){\n      for (int i=0;i<N;i++){\n        cible[i+N*j] = source[i+N*j];\n      }\n    }\n  }\n\n};\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/BLAS/main.cpp",
    "content": "//=====================================================\n// File   :  main.cpp\n// Author :  L. Plagne <laurent.plagne@edf.fr)>\n// Copyright (C) EDF R&D,  lun sep 30 14:23:28 CEST 2002\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#include \"utilities.h\"\n#include \"blas_interface.hh\"\n#include \"bench.hh\"\n#include \"basic_actions.hh\"\n\n#include \"action_cholesky.hh\"\n#include \"action_lu_decomp.hh\"\n#include \"action_partial_lu.hh\"\n#include \"action_trisolve_matrix.hh\"\n\n#ifdef HAS_LAPACK\n#include \"action_hessenberg.hh\"\n#endif\n\nBTL_MAIN;\n\nint main()\n{\n\n  bench<Action_axpy<blas_interface<REAL_TYPE> > >(MIN_AXPY,MAX_AXPY,NB_POINT);\n  bench<Action_axpby<blas_interface<REAL_TYPE> > >(MIN_AXPY,MAX_AXPY,NB_POINT);\n\n  bench<Action_matrix_vector_product<blas_interface<REAL_TYPE> > >(MIN_MV,MAX_MV,NB_POINT);\n  bench<Action_atv_product<blas_interface<REAL_TYPE> > >(MIN_MV,MAX_MV,NB_POINT);\n  bench<Action_symv<blas_interface<REAL_TYPE> > >(MIN_MV,MAX_MV,NB_POINT);\n  bench<Action_syr2<blas_interface<REAL_TYPE> > >(MIN_MV,MAX_MV,NB_POINT);\n\n  bench<Action_ger<blas_interface<REAL_TYPE> > >(MIN_MV,MAX_MV,NB_POINT);\n  bench<Action_rot<blas_interface<REAL_TYPE> > >(MIN_AXPY,MAX_AXPY,NB_POINT);\n\n  bench<Action_matrix_matrix_product<blas_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n  bench<Action_ata_product<blas_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n  bench<Action_aat_product<blas_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n\n  bench<Action_trisolve<blas_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n  bench<Action_trisolve_matrix<blas_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n\n  bench<Action_trmm<blas_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n\n  bench<Action_cholesky<blas_interface<REAL_TYPE> > >(MIN_LU,MAX_LU,NB_POINT);\n  bench<Action_partial_lu<blas_interface<REAL_TYPE> > >(MIN_LU,MAX_LU,NB_POINT);\n\n  #ifdef HAS_LAPACK\n//   bench<Action_lu_decomp<blas_interface<REAL_TYPE> > >(MIN_LU,MAX_LU,NB_POINT);\n  bench<Action_hessenberg<blas_interface<REAL_TYPE> > >(MIN_LU,MAX_LU,NB_POINT);\n  bench<Action_tridiagonalization<blas_interface<REAL_TYPE> > >(MIN_LU,MAX_LU,NB_POINT);\n  #endif\n\n  //bench<Action_lu_solve<blas_LU_solve_interface<REAL_TYPE> > >(MIN_LU,MAX_LU,NB_POINT);\n\n  return 0;\n}\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/STL/CMakeLists.txt",
    "content": "\nbtl_add_bench(btl_STL main.cpp OFF)\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/STL/STL_interface.hh",
    "content": "//=====================================================\n// File   :  STL_interface.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)>\n// Copyright (C) EDF R&D,  lun sep 30 14:23:24 CEST 2002\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#ifndef STL_INTERFACE_HH\n#define STL_INTERFACE_HH\n#include <string>\n#include <vector>\n#include \"utilities.h\"\n\nusing namespace std;\n\ntemplate<class real>\nclass STL_interface{\n\npublic :\n\n  typedef real real_type ;\n\n  typedef std::vector<real>  stl_vector;\n  typedef std::vector<stl_vector > stl_matrix;\n\n  typedef stl_matrix gene_matrix;\n\n  typedef stl_vector gene_vector;\n\n  static inline std::string name( void )\n  {\n    return \"STL\";\n  }\n\n  static void free_matrix(gene_matrix & /*A*/, int /*N*/){}\n\n  static void free_vector(gene_vector & /*B*/){}\n\n  static inline void matrix_from_stl(gene_matrix & A, stl_matrix & A_stl){\n    A = A_stl;\n  }\n\n  static inline void vector_from_stl(gene_vector & B, stl_vector & B_stl){\n    B = B_stl;\n  }\n\n  static inline void vector_to_stl(gene_vector & B, stl_vector & B_stl){\n    B_stl = B ;\n  }\n\n\n  static inline void matrix_to_stl(gene_matrix & A, stl_matrix & A_stl){\n    A_stl = A ;\n  }\n\n  static inline void copy_vector(const gene_vector & source, gene_vector & cible, int N){\n    for (int i=0;i<N;i++){\n      cible[i]=source[i];\n    }\n  }\n\n\n  static inline void copy_matrix(const gene_matrix & source, gene_matrix & cible, int N){\n    for (int i=0;i<N;i++)\n      for (int j=0;j<N;j++)\n        cible[i][j]=source[i][j];\n  }\n\n  static inline void ata_product(const gene_matrix & A, gene_matrix & X, int N)\n  {\n    real somme;\n    for (int j=0;j<N;j++){\n      for (int i=0;i<N;i++){\n        somme=0.0;\n        for (int k=0;k<N;k++)\n          somme += A[i][k]*A[j][k];\n        X[j][i]=somme;\n      }\n    }\n  }\n\n  static inline void aat_product(const gene_matrix & A, gene_matrix & X, int N)\n  {\n    real somme;\n    for (int j=0;j<N;j++){\n      for (int i=0;i<N;i++){\n        somme=0.0;\n        if(i>=j)\n        {\n          for (int k=0;k<N;k++){\n            somme+=A[k][i]*A[k][j];\n          }\n          X[j][i]=somme;\n        }\n      }\n    }\n  }\n\n\n  static inline void matrix_matrix_product(const gene_matrix & A, const gene_matrix & B, gene_matrix & X, int N)\n  {\n    real somme;\n    for (int j=0;j<N;j++){\n      for (int i=0;i<N;i++){\n        somme=0.0;\n        for (int k=0;k<N;k++)\n          somme+=A[k][i]*B[j][k];\n        X[j][i]=somme;\n      }\n    }\n  }\n\n  static inline void matrix_vector_product(gene_matrix & A, gene_vector & B, gene_vector & X, int N)\n  {\n    real somme;\n    for (int i=0;i<N;i++){\n      somme=0.0;\n      for (int j=0;j<N;j++)\n        somme+=A[j][i]*B[j];\n      X[i]=somme;\n    }\n  }\n\n  static inline void symv(gene_matrix & A, gene_vector & B, gene_vector & X, int N)\n  {\n    for (int j=0; j<N; ++j)\n      X[j] = 0;\n    for (int j=0; j<N; ++j)\n    {\n      real t1 = B[j];\n      real t2 = 0;\n      X[j] += t1 * A[j][j];\n      for (int i=j+1; i<N; ++i) {\n        X[i] += t1 * A[j][i];\n        t2 += A[j][i] * B[i];\n      }\n      X[j] += t2;\n    }\n  }\n  \n  static inline void syr2(gene_matrix & A, gene_vector & B, gene_vector & X, int N)\n  {\n    for (int j=0; j<N; ++j)\n    {\n      for (int i=j; i<N; ++i)\n        A[j][i] += B[i]*X[j] + B[j]*X[i];\n    }\n  }\n\n  static inline void ger(gene_matrix & A, gene_vector & X, gene_vector & Y, int N)\n  {\n    for (int j=0; j<N; ++j)\n    {\n      for (int i=j; i<N; ++i)\n        A[j][i] += X[i]*Y[j];\n    }\n  }\n\n  static inline void atv_product(gene_matrix & A, gene_vector & B, gene_vector & X, int N)\n  {\n    real somme;\n    for (int i=0;i<N;i++){\n      somme = 0.0;\n      for (int j=0;j<N;j++)\n        somme += A[i][j]*B[j];\n      X[i] = somme;\n    }\n  }\n\n  static inline void axpy(real coef, const gene_vector & X, gene_vector & Y, int N){\n    for (int i=0;i<N;i++)\n      Y[i]+=coef*X[i];\n  }\n\n  static inline void axpby(real a, const gene_vector & X, real b, gene_vector & Y, int N){\n    for (int i=0;i<N;i++)\n      Y[i] = a*X[i] + b*Y[i];\n  }\n\n  static inline void trisolve_lower(const gene_matrix & L, const gene_vector & B, gene_vector & X, int N){\n    copy_vector(B,X,N);\n    for(int i=0; i<N; ++i)\n    {\n      X[i] /= L[i][i];\n      real tmp = X[i];\n      for (int j=i+1; j<N; ++j)\n        X[j] -= tmp * L[i][j];\n    }\n  }\n\n  static inline real norm_diff(const stl_vector & A, const stl_vector & B)\n  {\n    int N=A.size();\n    real somme=0.0;\n    real somme2=0.0;\n\n    for (int i=0;i<N;i++){\n      real diff=A[i]-B[i];\n      somme+=diff*diff;\n      somme2+=A[i]*A[i];\n    }\n    return somme/somme2;\n  }\n\n  static inline real norm_diff(const stl_matrix & A, const stl_matrix & B)\n  {\n    int N=A[0].size();\n    real somme=0.0;\n    real somme2=0.0;\n\n    for (int i=0;i<N;i++){\n      for (int j=0;j<N;j++){\n        real diff=A[i][j] - B[i][j];\n        somme += diff*diff;\n        somme2 += A[i][j]*A[i][j];\n      }\n    }\n\n    return somme/somme2;\n  }\n\n  static inline void display_vector(const stl_vector & A)\n  {\n    int N=A.size();\n    for (int i=0;i<N;i++){\n      INFOS(\"A[\"<<i<<\"]=\"<<A[i]<<endl);\n    }\n  }\n\n};\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/STL/main.cpp",
    "content": "//=====================================================\n// File   :  main.cpp\n// Author :  L. Plagne <laurent.plagne@edf.fr)>\n// Copyright (C) EDF R&D,  lun sep 30 14:23:23 CEST 2002\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#include \"utilities.h\"\n#include \"STL_interface.hh\"\n#include \"bench.hh\"\n#include \"basic_actions.hh\"\n\nBTL_MAIN;\n\nint main()\n{\n  bench<Action_axpy<STL_interface<REAL_TYPE> > >(MIN_AXPY,MAX_AXPY,NB_POINT);\n  bench<Action_axpby<STL_interface<REAL_TYPE> > >(MIN_AXPY,MAX_AXPY,NB_POINT);\n  bench<Action_matrix_vector_product<STL_interface<REAL_TYPE> > >(MIN_MV,MAX_MV,NB_POINT);\n  bench<Action_atv_product<STL_interface<REAL_TYPE> > >(MIN_MV,MAX_MV,NB_POINT);\n  bench<Action_symv<STL_interface<REAL_TYPE> > >(MIN_MV,MAX_MV,NB_POINT);\n  bench<Action_syr2<STL_interface<REAL_TYPE> > >(MIN_MV,MAX_MV,NB_POINT);\n  bench<Action_matrix_matrix_product<STL_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n  bench<Action_ata_product<STL_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n  bench<Action_aat_product<STL_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n\n  return 0;\n}\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/blaze/CMakeLists.txt",
    "content": "\nfind_package(BLAZE)\nfind_package(Boost COMPONENTS system)\nif (BLAZE_FOUND AND Boost_FOUND)\n  include_directories(${BLAZE_INCLUDE_DIR} ${Boost_INCLUDE_DIRS})\n  btl_add_bench(btl_blaze main.cpp)\n  # Note: The newest blaze version requires C++14.\n  # Ideally, we should set this depending on the version of Blaze we found\n  set_property(TARGET btl_blaze PROPERTY CXX_STANDARD 14)\n  if(BUILD_btl_blaze)\n    target_link_libraries(btl_blaze ${Boost_LIBRARIES})\n  endif()\nendif ()\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/blaze/blaze_interface.hh",
    "content": "//=====================================================\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#ifndef BLAZE_INTERFACE_HH\n#define BLAZE_INTERFACE_HH\n\n#include <blaze/Math.h>\n#include <blaze/Blaze.h>\n#include <Eigen/Core>\n// using namespace blaze;\n\n#include <vector>\n\ntemplate<class real>\nclass blaze_interface {\n\npublic :\n\n  typedef real real_type ;\n\n  typedef std::vector<real>        stl_vector;\n  typedef std::vector<stl_vector > stl_matrix;\n\n  typedef blaze::DynamicMatrix<real,blaze::columnMajor>  gene_matrix;\n  typedef blaze::DynamicVector<real>  gene_vector;\n\n  static inline std::string name() { return \"blaze\"; }\n\n  static void free_matrix(gene_matrix & A, int N){\n    return ;\n  }\n\n  static void free_vector(gene_vector & B){\n    return ;\n  }\n\n  static inline void matrix_from_stl(gene_matrix & A, stl_matrix & A_stl){\n    A.resize(A_stl[0].size(), A_stl.size());\n\n    for (int j=0; j<A_stl.size() ; j++){\n      for (int i=0; i<A_stl[j].size() ; i++){\n        A(i,j) = A_stl[j][i];\n      }\n    }\n  }\n\n  static inline void vector_from_stl(gene_vector & B, stl_vector & B_stl){\n    B.resize(B_stl.size());\n    for (int i=0; i<B_stl.size() ; i++){\n      B[i] = B_stl[i];\n    }\n  }\n\n  static inline void vector_to_stl(gene_vector & B, stl_vector & B_stl){\n    for (int i=0; i<B_stl.size() ; i++){\n      B_stl[i] = B[i];\n    }\n  }\n\n  static inline void matrix_to_stl(gene_matrix & A, stl_matrix & A_stl){\n    int N=A_stl.size();\n    for (int j=0;j<N;j++){\n      A_stl[j].resize(N);\n      for (int i=0;i<N;i++){\n        A_stl[j][i] = A(i,j);\n      }\n    }\n  }\n\n  static EIGEN_DONT_INLINE void matrix_matrix_product(const gene_matrix & A, const gene_matrix & B, gene_matrix & X, int N){\n    X = (A*B);\n  }\n\n  static EIGEN_DONT_INLINE void transposed_matrix_matrix_product(const gene_matrix & A, const gene_matrix & B, gene_matrix & X, int N){\n    X = (trans(A)*trans(B));\n  }\n\n  static EIGEN_DONT_INLINE void ata_product(const gene_matrix & A, gene_matrix & X, int N){\n    X = (trans(A)*A);\n  }\n\n  static EIGEN_DONT_INLINE void aat_product(const gene_matrix & A, gene_matrix & X, int N){\n    X = (A*trans(A));\n  }\n\n  static EIGEN_DONT_INLINE void matrix_vector_product(gene_matrix & A, gene_vector & B, gene_vector & X, int N){\n    X = (A*B);\n  }\n\n  static EIGEN_DONT_INLINE void atv_product(gene_matrix & A, gene_vector & B, gene_vector & X, int N){\n    X = (trans(A)*B);\n  }\n\n  static EIGEN_DONT_INLINE void axpy(const real coef, const gene_vector & X, gene_vector & Y, int N){\n    Y += coef * X;\n  }\n\n  static EIGEN_DONT_INLINE void axpby(real a, const gene_vector & X, real b, gene_vector & Y, int N){\n    Y = a*X + b*Y;\n  }\n\n//   static inline void cholesky(const gene_matrix & X, gene_matrix & C, int N){\n//     C = X;\n//     recursive_cholesky(C);\n//   }\n\n//   static inline void lu_decomp(const gene_matrix & X, gene_matrix & R, int N){\n//     R = X;\n//     std::vector<int> ipvt(N);\n//     lu_factor(R, ipvt);\n//   }\n\n//   static inline void trisolve_lower(const gene_matrix & L, const gene_vector& B, gene_vector & X, int N){\n//     X = lower_trisolve(L, B);\n//   }\n\n  static inline void copy_matrix(const gene_matrix & source, gene_matrix & cible, int N){\n    cible = source;\n  }\n\n  static inline void copy_vector(const gene_vector & source, gene_vector & cible, int N){\n    cible = source;\n  }\n\n};\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/blaze/main.cpp",
    "content": "//=====================================================\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#include \"utilities.h\"\n#include \"blaze_interface.hh\"\n#include \"bench.hh\"\n#include \"basic_actions.hh\"\n\nBTL_MAIN;\n\nint main()\n{\n\n  bench<Action_axpy<blaze_interface<REAL_TYPE> > >(MIN_AXPY,MAX_AXPY,NB_POINT);\n  bench<Action_axpby<blaze_interface<REAL_TYPE> > >(MIN_AXPY,MAX_AXPY,NB_POINT);\n\n  bench<Action_matrix_vector_product<blaze_interface<REAL_TYPE> > >(MIN_MV,MAX_MV,NB_POINT);\n  bench<Action_atv_product<blaze_interface<REAL_TYPE> > >(MIN_MV,MAX_MV,NB_POINT);\n  bench<Action_matrix_matrix_product<blaze_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n  bench<Action_ata_product<blaze_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n  bench<Action_aat_product<blaze_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n\n  return 0;\n}\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/blitz/CMakeLists.txt",
    "content": "\nfind_package(Blitz)\n\nif (BLITZ_FOUND)\n  include_directories(${BLITZ_INCLUDES})\n\n  btl_add_bench(btl_blitz btl_blitz.cpp)\n  if (BUILD_btl_blitz)\n    target_link_libraries(btl_blitz ${BLITZ_LIBRARIES})\n  endif ()\n\n  btl_add_bench(btl_tiny_blitz btl_tiny_blitz.cpp OFF)\n  if (BUILD_btl_tiny_blitz)\n    target_link_libraries(btl_tiny_blitz ${BLITZ_LIBRARIES})\n  endif ()\n\nendif ()\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/blitz/blitz_LU_solve_interface.hh",
    "content": "//=====================================================\n// File   :  blitz_LU_solve_interface.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)>        \n// Copyright (C) EDF R&D,  lun sep 30 14:23:31 CEST 2002\n//=====================================================\n// \n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n// \n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n// \n#ifndef BLITZ_LU_SOLVE_INTERFACE_HH\n#define BLITZ_LU_SOLVE_INTERFACE_HH\n\n#include \"blitz/array.h\"\n#include <vector>\n\nBZ_USING_NAMESPACE(blitz)\n\ntemplate<class real>\nclass blitz_LU_solve_interface : public blitz_interface<real>\n{\n\npublic :\n\n  typedef typename blitz_interface<real>::gene_matrix gene_matrix;\n  typedef typename blitz_interface<real>::gene_vector gene_vector;\n\n  typedef blitz::Array<int,1> Pivot_Vector;\n\n  inline static void new_Pivot_Vector(Pivot_Vector & pivot,int N)\n  {\n\n    pivot.resize(N);\n\n  }\n\n  inline static void free_Pivot_Vector(Pivot_Vector & pivot)\n  {\n    \n    return;\n\n  }\n\n\n  static inline real matrix_vector_product_sliced(const gene_matrix & A, gene_vector B, int row, int col_start, int col_end)\n  {\n    \n    real somme=0.;\n    \n    for (int j=col_start ; j<col_end+1 ; j++){\n\t\n\tsomme+=A(row,j)*B(j);\n\t\n    }\n\n    return somme;\n\n  }\n\n\n\n\n  static inline real matrix_matrix_product_sliced(gene_matrix & A, int row, int col_start, int col_end, gene_matrix & B, int row_shift, int col )\n  {\n    \n    real somme=0.;\n    \n    for (int j=col_start ; j<col_end+1 ; j++){\n\t\n\tsomme+=A(row,j)*B(j+row_shift,col);\n\t\n    }\n\n    return somme;\n\n  }\n\n  inline static void LU_factor(gene_matrix & LU, Pivot_Vector & pivot, int N)\n  {\n\n    ASSERT( LU.rows()==LU.cols() ) ;\n    int index_max = 0 ;\n    real big = 0. ;\n    real theSum = 0. ;\n    real dum = 0. ;\n    // Get the implicit scaling information :\n    gene_vector ImplicitScaling( N ) ;\n    for( int i=0; i<N; i++ ) {\n      big = 0. ;\n      for( int j=0; j<N; j++ ) {\n\tif( abs( LU( i, j ) )>=big ) big = abs( LU( i, j ) ) ;\n      }\n      if( big==0. ) {\n\tINFOS( \"blitz_LU_factor::Singular matrix\" ) ;\n\texit( 0 ) ;\n      }\n      ImplicitScaling( i ) = 1./big ;\n    }\n    // Loop over columns of Crout's method :\n    for( int j=0; j<N; j++ ) {\n      for( int i=0; i<j; i++ ) {\n\ttheSum = LU( i, j ) ;\n\ttheSum -= matrix_matrix_product_sliced(LU, i, 0, i-1, LU, 0, j) ;\n\t//\ttheSum -= sum( LU( i, Range( fromStart, i-1 ) )*LU( Range( fromStart, i-1 ), j ) ) ;\n\tLU( i, j ) = theSum ;\n      }\n      \n      // Search for the largest pivot element :\n      big = 0. ;\n      for( int i=j; i<N; i++ ) {\n\ttheSum = LU( i, j ) ;\n\ttheSum -= matrix_matrix_product_sliced(LU, i, 0, j-1, LU, 0, j) ;\n\t//\ttheSum -= sum( LU( i, Range( fromStart, j-1 ) )*LU( Range( fromStart, j-1 ), j ) ) ;\n\tLU( i, j ) = theSum ;\n\tif( (ImplicitScaling( i )*abs( theSum ))>=big ) {\n\t  dum = ImplicitScaling( i )*abs( theSum ) ;\n\t  big = dum ;\n\t  index_max = i ;\n\t}\n      }\n      // Interchanging rows and the scale factor :\n      if( j!=index_max ) {\n\tfor( int k=0; k<N; k++ ) {\n\t  dum = LU( index_max, k ) ;\n\t  LU( index_max, k ) = LU( j, k ) ;\n\t  LU( j, k ) = dum ;\n\t}\n\tImplicitScaling( index_max ) = ImplicitScaling( j ) ;\n      }\n      pivot( j ) = index_max ;\n      if ( LU( j, j )==0. ) LU( j, j ) = 1.e-20 ;\n      // Divide by the pivot element :\n      if( j<N ) {\n\tdum = 1./LU( j, j ) ;\n\tfor( int i=j+1; i<N; i++ ) LU( i, j ) *= dum ;\n      }\n    }\n\n  }\n\n  inline static void LU_solve(const gene_matrix & LU, const Pivot_Vector pivot, gene_vector &B, gene_vector X, int N)\n  {\n\n    // Pour conserver le meme header, on travaille sur X, copie du second-membre B\n    X = B.copy() ;\n    ASSERT( LU.rows()==LU.cols() ) ;\n    firstIndex indI ;\n    // Forward substitution :\n    int ii = 0 ;\n    real theSum = 0. ;\n    for( int i=0; i<N; i++ ) {\n      int ip = pivot( i ) ;\n      theSum = X( ip ) ;\n      //      theSum = B( ip ) ;\n      X( ip ) = X( i ) ;\n      //      B( ip ) = B( i ) ;\n      if( ii ) {\n\ttheSum -= matrix_vector_product_sliced(LU, X, i, ii-1, i-1) ;\n\t//\ttheSum -= sum( LU( i, Range( ii-1, i-1 ) )*X( Range( ii-1, i-1 ) ) ) ;\n\t//\ttheSum -= sum( LU( i, Range( ii-1, i-1 ) )*B( Range( ii-1, i-1 ) ) ) ;\n      } else if( theSum ) {\n\tii = i+1 ;\n      }\n      X( i ) = theSum ;\n      //      B( i ) = theSum ;\n    }\n    // Backsubstitution :\n    for( int i=N-1; i>=0; i-- ) {\n      theSum = X( i ) ;\n      //      theSum = B( i ) ;\n      theSum -= matrix_vector_product_sliced(LU, X, i, i+1, N) ;\n      //      theSum -= sum( LU( i, Range( i+1, toEnd ) )*X( Range( i+1, toEnd ) ) ) ;\n      //      theSum -= sum( LU( i, Range( i+1, toEnd ) )*B( Range( i+1, toEnd ) ) ) ;\n      // Store a component of the solution vector :\n      X( i ) = theSum/LU( i, i ) ;\n      //      B( i ) = theSum/LU( i, i ) ;\n    }\n\n  }\n\n};\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/blitz/blitz_interface.hh",
    "content": "//=====================================================\n// File   :  blitz_interface.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)>\n// Copyright (C) EDF R&D,  lun sep 30 14:23:30 CEST 2002\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#ifndef BLITZ_INTERFACE_HH\n#define BLITZ_INTERFACE_HH\n\n#include <blitz/blitz.h>\n#include <blitz/array.h>\n#include <blitz/vector-et.h>\n#include <blitz/vecwhere.h>\n#include <blitz/matrix.h>\n#include <vector>\n\nBZ_USING_NAMESPACE(blitz)\n\ntemplate<class real>\nclass blitz_interface{\n\npublic :\n\n  typedef real real_type ;\n\n  typedef std::vector<real>  stl_vector;\n  typedef std::vector<stl_vector > stl_matrix;\n\n  typedef blitz::Array<real, 2>  gene_matrix;\n  typedef blitz::Array<real, 1>  gene_vector;\n//   typedef blitz::Matrix<real, blitz::ColumnMajor>  gene_matrix;\n//   typedef blitz::Vector<real> gene_vector;\n\n  static inline std::string name() { return \"blitz\"; }\n\n  static void free_matrix(gene_matrix & A, int N){}\n\n  static void free_vector(gene_vector & B){}\n\n  static inline void matrix_from_stl(gene_matrix & A, stl_matrix & A_stl){\n    A.resize(A_stl[0].size(),A_stl.size());\n    for (int j=0; j<A_stl.size() ; j++){\n      for (int i=0; i<A_stl[j].size() ; i++){\n        A(i,j)=A_stl[j][i];\n      }\n    }\n  }\n\n  static inline void vector_from_stl(gene_vector & B, stl_vector & B_stl){\n    B.resize(B_stl.size());\n    for (int i=0; i<B_stl.size() ; i++){\n      B(i)=B_stl[i];\n    }\n  }\n\n  static inline void vector_to_stl(gene_vector & B, stl_vector & B_stl){\n    for (int i=0; i<B_stl.size() ; i++){\n      B_stl[i]=B(i);\n    }\n  }\n\n  static inline void matrix_to_stl(gene_matrix & A, stl_matrix & A_stl){\n    int N=A_stl.size();\n    for (int j=0;j<N;j++){\n      A_stl[j].resize(N);\n      for (int i=0;i<N;i++)\n        A_stl[j][i] = A(i,j);\n    }\n  }\n\n  static inline void matrix_matrix_product(const gene_matrix & A, const gene_matrix & B, gene_matrix & X, int N)\n  {\n    firstIndex i;\n    secondIndex j;\n    thirdIndex k;\n    X = sum(A(i,k) * B(k,j), k);\n  }\n\n  static inline void ata_product(const gene_matrix & A, gene_matrix & X, int N)\n  {\n    firstIndex i;\n    secondIndex j;\n    thirdIndex k;\n    X = sum(A(k,i) * A(k,j), k);\n  }\n\n  static inline void aat_product(const gene_matrix & A, gene_matrix & X, int N)\n  {\n    firstIndex i;\n    secondIndex j;\n    thirdIndex k;\n    X = sum(A(i,k) * A(j,k), k);\n  }\n\n  static inline void matrix_vector_product(gene_matrix & A, gene_vector & B, gene_vector & X, int N)\n  {\n    firstIndex i;\n    secondIndex j;\n    X = sum(A(i,j)*B(j),j);\n  }\n\n  static inline void atv_product(gene_matrix & A, gene_vector & B, gene_vector & X, int N)\n  {\n    firstIndex i;\n    secondIndex j;\n    X = sum(A(j,i) * B(j),j);\n  }\n\n  static inline void axpy(const real coef, const gene_vector & X, gene_vector & Y, int N)\n  {\n    firstIndex i;\n    Y = Y(i) + coef * X(i);\n    //Y += coef * X;\n  }\n\n  static inline void copy_matrix(const gene_matrix & source, gene_matrix & cible, int N){\n    cible = source;\n    //cible.template operator=<gene_matrix>(source);\n//     for (int i=0;i<N;i++){\n//       for (int j=0;j<N;j++){\n//         cible(i,j)=source(i,j);\n//       }\n//     }\n  }\n\n  static inline void copy_vector(const gene_vector & source, gene_vector & cible, int N){\n    //cible.template operator=<gene_vector>(source);\n    cible = source;\n  }\n\n};\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/blitz/btl_blitz.cpp",
    "content": "//=====================================================\n// File   :  main.cpp\n// Author :  L. Plagne <laurent.plagne@edf.fr)>\n// Copyright (C) EDF R&D,  lun sep 30 14:23:30 CEST 2002\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#include \"utilities.h\"\n#include \"blitz_interface.hh\"\n#include \"blitz_LU_solve_interface.hh\"\n#include \"bench.hh\"\n#include \"action_matrix_vector_product.hh\"\n#include \"action_matrix_matrix_product.hh\"\n#include \"action_axpy.hh\"\n#include \"action_lu_solve.hh\"\n#include \"action_ata_product.hh\"\n#include \"action_aat_product.hh\"\n#include \"action_atv_product.hh\"\n\nBTL_MAIN;\n\nint main()\n{\n\n  bench<Action_matrix_vector_product<blitz_interface<REAL_TYPE> > >(MIN_MV,MAX_MV,NB_POINT);\n  bench<Action_atv_product<blitz_interface<REAL_TYPE> > >(MIN_MV,MAX_MV,NB_POINT);\n\n  bench<Action_matrix_matrix_product<blitz_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n  bench<Action_ata_product<blitz_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n  bench<Action_aat_product<blitz_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n\n  bench<Action_axpy<blitz_interface<REAL_TYPE> > >(MIN_AXPY,MAX_AXPY,NB_POINT);\n\n  //bench<Action_lu_solve<blitz_LU_solve_interface<REAL_TYPE> > >(MIN_LU,MAX_LU,NB_POINT);\n\n  return 0;\n}\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/blitz/btl_tiny_blitz.cpp",
    "content": "//=====================================================\n// File   :  main.cpp\n// Author :  L. Plagne <laurent.plagne@edf.fr)>\n// Copyright (C) EDF R&D,  lun sep 30 14:23:30 CEST 2002\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#include \"utilities.h\"\n#include \"tiny_blitz_interface.hh\"\n#include \"static/bench_static.hh\"\n#include \"action_matrix_vector_product.hh\"\n#include \"action_matrix_matrix_product.hh\"\n#include \"action_axpy.hh\"\n\nBTL_MAIN;\n\nint main()\n{\n  bench_static<Action_axpy,tiny_blitz_interface>();\n  bench_static<Action_matrix_matrix_product,tiny_blitz_interface>();\n  bench_static<Action_matrix_vector_product,tiny_blitz_interface>();\n\n  return 0;\n}\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/blitz/tiny_blitz_interface.hh",
    "content": "//=====================================================\n// File   :  tiny_blitz_interface.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)>\n// Copyright (C) EDF R&D,  lun sep 30 14:23:30 CEST 2002\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#ifndef TINY_BLITZ_INTERFACE_HH\n#define TINY_BLITZ_INTERFACE_HH\n\n#include \"blitz/array.h\"\n#include \"blitz/tiny.h\"\n#include \"blitz/tinymat.h\"\n#include \"blitz/tinyvec.h\"\n#include <blitz/tinyvec-et.h>\n\n#include <vector>\n\nBZ_USING_NAMESPACE(blitz)\n\ntemplate<class real, int SIZE>\nclass tiny_blitz_interface\n{\n\npublic :\n\n  typedef real real_type ;\n\n  typedef std::vector<real>  stl_vector;\n  typedef std::vector<stl_vector > stl_matrix;\n\n  typedef TinyVector<real,SIZE> gene_vector;\n  typedef TinyMatrix<real,SIZE,SIZE> gene_matrix;\n\n  static inline std::string name() { return \"tiny_blitz\"; }\n\n  static void free_matrix(gene_matrix & A, int N){}\n\n  static void free_vector(gene_vector & B){}\n\n  static inline void matrix_from_stl(gene_matrix & A, stl_matrix & A_stl){\n    for (int j=0; j<A_stl.size() ; j++)\n      for (int i=0; i<A_stl[j].size() ; i++)\n        A(i,j)=A_stl[j][i];\n  }\n\n  static inline void vector_from_stl(gene_vector & B, stl_vector & B_stl){\n    for (int i=0; i<B_stl.size() ; i++)\n      B(i) = B_stl[i];\n  }\n\n  static inline void vector_to_stl(gene_vector & B, stl_vector & B_stl){\n    for (int i=0; i<B_stl.size() ; i++)\n      B_stl[i] = B(i);\n  }\n\n  static inline void matrix_to_stl(gene_matrix & A, stl_matrix & A_stl){\n    int N = A_stl.size();\n    for (int j=0;j<N;j++)\n    {\n      A_stl[j].resize(N);\n      for (int i=0;i<N;i++)\n        A_stl[j][i] = A(i,j);\n    }\n  }\n\n  static inline void copy_matrix(const gene_matrix & source, gene_matrix & cible, int N){\n    for (int j=0;j<N;j++)\n      for (int i=0;i<N;i++)\n        cible(i,j) = source(i,j);\n  }\n\n  static inline void copy_vector(const gene_vector & source, gene_vector & cible, int N){\n    for (int i=0;i<N;i++){\n      cible(i) = source(i);\n    }\n  }\n\n  static inline void matrix_matrix_product(const gene_matrix & A, const gene_matrix & B, gene_matrix & X, int N){\n    X = product(A,B);\n  }\n\n  static inline void matrix_vector_product(gene_matrix & A, gene_vector & B, gene_vector & X, int N){\n    X = product(A,B);\n  }\n\n  static inline void axpy(const real coef, const gene_vector & X, gene_vector & Y, int N){\n    Y += coef * X;\n  }\n\n};\n\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/eigen2/CMakeLists.txt",
    "content": "\nfind_package(Eigen2)\n\nif(EIGEN2_FOUND)\n\n  include_directories(BEFORE ${EIGEN2_INCLUDE_DIR})\n  btl_add_bench(btl_eigen2_linear main_linear.cpp)\n  btl_add_bench(btl_eigen2_vecmat main_vecmat.cpp)\n  btl_add_bench(btl_eigen2_matmat main_matmat.cpp)\n  btl_add_bench(btl_eigen2_adv main_adv.cpp      )\n\n  btl_add_target_property(btl_eigen2_linear COMPILE_FLAGS \"-fno-exceptions -DBTL_PREFIX=eigen2\")\n  btl_add_target_property(btl_eigen2_vecmat COMPILE_FLAGS \"-fno-exceptions -DBTL_PREFIX=eigen2\")\n  btl_add_target_property(btl_eigen2_matmat COMPILE_FLAGS \"-fno-exceptions -DBTL_PREFIX=eigen2\")\n  btl_add_target_property(btl_eigen2_adv    COMPILE_FLAGS \"-fno-exceptions -DBTL_PREFIX=eigen2\")\n\n  btl_add_bench(btl_tiny_eigen2 btl_tiny_eigen2.cpp OFF)\n\nendif() # EIGEN2_FOUND\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/eigen2/btl_tiny_eigen2.cpp",
    "content": "//=====================================================\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#include \"utilities.h\"\n#include \"eigen3_interface.hh\"\n#include \"static/bench_static.hh\"\n#include \"action_matrix_vector_product.hh\"\n#include \"action_matrix_matrix_product.hh\"\n#include \"action_axpy.hh\"\n#include \"action_lu_solve.hh\"\n#include \"action_ata_product.hh\"\n#include \"action_aat_product.hh\"\n#include \"action_atv_product.hh\"\n#include \"action_cholesky.hh\"\n#include \"action_trisolve.hh\"\n\nBTL_MAIN;\n\nint main()\n{\n\n  bench_static<Action_axpy,eigen2_interface>();\n  bench_static<Action_matrix_matrix_product,eigen2_interface>();\n  bench_static<Action_matrix_vector_product,eigen2_interface>();\n  bench_static<Action_atv_product,eigen2_interface>();\n  bench_static<Action_cholesky,eigen2_interface>();\n  bench_static<Action_trisolve,eigen2_interface>();\n\n  return 0;\n}\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/eigen2/eigen2_interface.hh",
    "content": "//=====================================================\n// Copyright (C) 2008 Gael Guennebaud <g.gael@free.fr>\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#ifndef EIGEN2_INTERFACE_HH\n#define EIGEN2_INTERFACE_HH\n// #include <cblas.h>\n#include <Eigen/Core>\n#include <Eigen/Cholesky>\n#include <Eigen/LU>\n#include <Eigen/QR>\n#include <vector>\n#include \"btl.hh\"\n\nusing namespace Eigen;\n\ntemplate<class real, int SIZE=Dynamic>\nclass eigen2_interface\n{\n\npublic :\n\n  enum {IsFixedSize = (SIZE!=Dynamic)};\n\n  typedef real real_type;\n\n  typedef std::vector<real> stl_vector;\n  typedef std::vector<stl_vector> stl_matrix;\n\n  typedef Eigen::Matrix<real,SIZE,SIZE> gene_matrix;\n  typedef Eigen::Matrix<real,SIZE,1> gene_vector;\n\n  static inline std::string name( void )\n  {\n    #if defined(EIGEN_VECTORIZE_SSE)\n    if (SIZE==Dynamic) return \"eigen2\"; else return \"tiny_eigen2\";\n    #elif defined(EIGEN_VECTORIZE_ALTIVEC) || defined(EIGEN_VECTORIZE_VSX)\n    if (SIZE==Dynamic) return \"eigen2\"; else return \"tiny_eigen2\";\n    #else\n    if (SIZE==Dynamic) return \"eigen2_novec\"; else return \"tiny_eigen2_novec\";\n    #endif\n  }\n\n  static void free_matrix(gene_matrix & A, int N) {}\n\n  static void free_vector(gene_vector & B) {}\n\n  static BTL_DONT_INLINE void matrix_from_stl(gene_matrix & A, stl_matrix & A_stl){\n    A.resize(A_stl[0].size(), A_stl.size());\n\n    for (int j=0; j<A_stl.size() ; j++){\n      for (int i=0; i<A_stl[j].size() ; i++){\n        A.coeffRef(i,j) = A_stl[j][i];\n      }\n    }\n  }\n\n  static BTL_DONT_INLINE  void vector_from_stl(gene_vector & B, stl_vector & B_stl){\n    B.resize(B_stl.size(),1);\n\n    for (int i=0; i<B_stl.size() ; i++){\n      B.coeffRef(i) = B_stl[i];\n    }\n  }\n\n  static BTL_DONT_INLINE  void vector_to_stl(gene_vector & B, stl_vector & B_stl){\n    for (int i=0; i<B_stl.size() ; i++){\n      B_stl[i] = B.coeff(i);\n    }\n  }\n\n  static BTL_DONT_INLINE  void matrix_to_stl(gene_matrix & A, stl_matrix & A_stl){\n    int N=A_stl.size();\n\n    for (int j=0;j<N;j++){\n      A_stl[j].resize(N);\n      for (int i=0;i<N;i++){\n        A_stl[j][i] = A.coeff(i,j);\n      }\n    }\n  }\n\n  static inline void matrix_matrix_product(const gene_matrix & A, const gene_matrix & B, gene_matrix & X, int N){\n    X = (A*B).lazy();\n  }\n\n  static inline void transposed_matrix_matrix_product(const gene_matrix & A, const gene_matrix & B, gene_matrix & X, int N){\n    X = (A.transpose()*B.transpose()).lazy();\n  }\n\n  static inline void ata_product(const gene_matrix & A, gene_matrix & X, int N){\n    X = (A.transpose()*A).lazy();\n  }\n\n  static inline void aat_product(const gene_matrix & A, gene_matrix & X, int N){\n    X = (A*A.transpose()).lazy();\n  }\n\n  static inline void matrix_vector_product(const gene_matrix & A, const gene_vector & B, gene_vector & X, int N){\n    X = (A*B)/*.lazy()*/;\n  }\n\n  static inline void atv_product(gene_matrix & A, gene_vector & B, gene_vector & X, int N){\n    X = (A.transpose()*B)/*.lazy()*/;\n  }\n\n  static inline void axpy(real coef, const gene_vector & X, gene_vector & Y, int N){\n    Y += coef * X;\n  }\n\n  static inline void axpby(real a, const gene_vector & X, real b, gene_vector & Y, int N){\n    Y = a*X + b*Y;\n  }\n\n  static inline void copy_matrix(const gene_matrix & source, gene_matrix & cible, int N){\n    cible = source;\n  }\n\n  static inline void copy_vector(const gene_vector & source, gene_vector & cible, int N){\n    cible = source;\n  }\n\n  static inline void trisolve_lower(const gene_matrix & L, const gene_vector& B, gene_vector& X, int N){\n    X = L.template marked<LowerTriangular>().solveTriangular(B);\n  }\n\n  static inline void trisolve_lower_matrix(const gene_matrix & L, const gene_matrix& B, gene_matrix& X, int N){\n    X = L.template marked<LowerTriangular>().solveTriangular(B);\n  }\n\n  static inline void cholesky(const gene_matrix & X, gene_matrix & C, int N){\n    C = X.llt().matrixL();\n//     C = X;\n//     Cholesky<gene_matrix>::computeInPlace(C);\n//     Cholesky<gene_matrix>::computeInPlaceBlock(C);\n  }\n\n  static inline void lu_decomp(const gene_matrix & X, gene_matrix & C, int N){\n    C = X.lu().matrixLU();\n//     C = X.inverse();\n  }\n\n  static inline void tridiagonalization(const gene_matrix & X, gene_matrix & C, int N){\n    C = Tridiagonalization<gene_matrix>(X).packedMatrix();\n  }\n\n  static inline void hessenberg(const gene_matrix & X, gene_matrix & C, int N){\n    C = HessenbergDecomposition<gene_matrix>(X).packedMatrix();\n  }\n\n\n\n};\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/eigen2/main_adv.cpp",
    "content": "//=====================================================\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#include \"utilities.h\"\n#include \"eigen2_interface.hh\"\n#include \"bench.hh\"\n#include \"action_trisolve.hh\"\n#include \"action_trisolve_matrix.hh\"\n#include \"action_cholesky.hh\"\n#include \"action_hessenberg.hh\"\n#include \"action_lu_decomp.hh\"\n// #include \"action_partial_lu.hh\"\n\nBTL_MAIN;\n\nint main()\n{\n  bench<Action_trisolve<eigen2_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n  bench<Action_trisolve_matrix<eigen2_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n  bench<Action_cholesky<eigen2_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n  bench<Action_lu_decomp<eigen2_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n//   bench<Action_partial_lu<eigen2_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n\n  bench<Action_hessenberg<eigen2_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n  bench<Action_tridiagonalization<eigen2_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n\n  return 0;\n}\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/eigen2/main_linear.cpp",
    "content": "//=====================================================\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#include \"utilities.h\"\n#include \"eigen2_interface.hh\"\n#include \"bench.hh\"\n#include \"basic_actions.hh\"\n\nBTL_MAIN;\n\nint main()\n{\n\n  bench<Action_axpy<eigen2_interface<REAL_TYPE> > >(MIN_AXPY,MAX_AXPY,NB_POINT);\n  bench<Action_axpby<eigen2_interface<REAL_TYPE> > >(MIN_AXPY,MAX_AXPY,NB_POINT);\n  \n  return 0;\n}\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/eigen2/main_matmat.cpp",
    "content": "//=====================================================\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#include \"utilities.h\"\n#include \"eigen2_interface.hh\"\n#include \"bench.hh\"\n#include \"basic_actions.hh\"\n\nBTL_MAIN;\n\nint main()\n{\n  bench<Action_matrix_matrix_product<eigen2_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n//   bench<Action_ata_product<eigen2_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n  bench<Action_aat_product<eigen2_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n//   bench<Action_trmm<eigen2_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n\n  return 0;\n}\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/eigen2/main_vecmat.cpp",
    "content": "//=====================================================\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#include \"utilities.h\"\n#include \"eigen2_interface.hh\"\n#include \"bench.hh\"\n#include \"basic_actions.hh\"\n\nBTL_MAIN;\n\nint main()\n{\n  bench<Action_matrix_vector_product<eigen2_interface<REAL_TYPE> > >(MIN_MV,MAX_MV,NB_POINT);\n  bench<Action_atv_product<eigen2_interface<REAL_TYPE> > >(MIN_MV,MAX_MV,NB_POINT);\n//   bench<Action_symv<eigen2_interface<REAL_TYPE> > >(MIN_MV,MAX_MV,NB_POINT);\n//   bench<Action_syr2<eigen2_interface<REAL_TYPE> > >(MIN_MV,MAX_MV,NB_POINT);\n//   bench<Action_ger<eigen2_interface<REAL_TYPE> > >(MIN_MV,MAX_MV,NB_POINT);\n\n  return 0;\n}\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/eigen3/CMakeLists.txt",
    "content": "\n\nif((NOT EIGEN3_INCLUDE_DIR) AND Eigen_SOURCE_DIR)\n  # unless EIGEN3_INCLUDE_DIR is defined, let's use current Eigen version\n  set(EIGEN3_INCLUDE_DIR ${Eigen_SOURCE_DIR})\n  set(EIGEN3_FOUND TRUE)\nelse()\n  find_package(Eigen3)\nendif()\n\nif (EIGEN3_FOUND)\n\n  include_directories(${EIGEN3_INCLUDE_DIR})\n  btl_add_bench(btl_eigen3_linear main_linear.cpp)\n  btl_add_bench(btl_eigen3_vecmat main_vecmat.cpp)\n  btl_add_bench(btl_eigen3_matmat main_matmat.cpp)\n  btl_add_bench(btl_eigen3_adv main_adv.cpp      )\n\n  btl_add_target_property(btl_eigen3_linear COMPILE_FLAGS \"-fno-exceptions -DBTL_PREFIX=eigen3\")\n  btl_add_target_property(btl_eigen3_vecmat COMPILE_FLAGS \"-fno-exceptions -DBTL_PREFIX=eigen3\")\n  btl_add_target_property(btl_eigen3_matmat COMPILE_FLAGS \"-fno-exceptions -DBTL_PREFIX=eigen3\")\n  btl_add_target_property(btl_eigen3_adv    COMPILE_FLAGS \"-fno-exceptions -DBTL_PREFIX=eigen3\")\n\n  option(BTL_BENCH_NOGCCVEC \"also bench Eigen explicit vec without GCC's auto vec\" OFF)\n  if(CMAKE_COMPILER_IS_GNUCXX AND BTL_BENCH_NOGCCVEC)\n    btl_add_bench(btl_eigen3_nogccvec_linear main_linear.cpp)\n    btl_add_bench(btl_eigen3_nogccvec_vecmat main_vecmat.cpp)\n    btl_add_bench(btl_eigen3_nogccvec_matmat main_matmat.cpp)\n    btl_add_bench(btl_eigen3_nogccvec_adv    main_adv.cpp   )\n\n    btl_add_target_property(btl_eigen3_nogccvec_linear COMPILE_FLAGS \"-fno-exceptions -fno-tree-vectorize -DBTL_PREFIX=eigen3_nogccvec\")\n    btl_add_target_property(btl_eigen3_nogccvec_vecmat COMPILE_FLAGS \"-fno-exceptions -fno-tree-vectorize -DBTL_PREFIX=eigen3_nogccvec\")\n    btl_add_target_property(btl_eigen3_nogccvec_matmat COMPILE_FLAGS \"-fno-exceptions -fno-tree-vectorize -DBTL_PREFIX=eigen3_nogccvec\")\n    btl_add_target_property(btl_eigen3_nogccvec_adv    COMPILE_FLAGS \"-fno-exceptions -fno-tree-vectorize -DBTL_PREFIX=eigen3_nogccvec\")\n  endif()\n\n\n  if(NOT BTL_NOVEC)\n    btl_add_bench(btl_eigen3_novec_linear main_linear.cpp OFF)\n    btl_add_bench(btl_eigen3_novec_vecmat main_vecmat.cpp OFF)\n    btl_add_bench(btl_eigen3_novec_matmat main_matmat.cpp OFF)\n    btl_add_bench(btl_eigen3_novec_adv main_adv.cpp       OFF)\n    btl_add_target_property(btl_eigen3_novec_linear COMPILE_FLAGS \"-fno-exceptions -DEIGEN_DONT_VECTORIZE -DBTL_PREFIX=eigen3_novec\")\n    btl_add_target_property(btl_eigen3_novec_vecmat COMPILE_FLAGS \"-fno-exceptions -DEIGEN_DONT_VECTORIZE -DBTL_PREFIX=eigen3_novec\")\n    btl_add_target_property(btl_eigen3_novec_matmat COMPILE_FLAGS \"-fno-exceptions -DEIGEN_DONT_VECTORIZE -DBTL_PREFIX=eigen3_novec\")\n    btl_add_target_property(btl_eigen3_novec_adv    COMPILE_FLAGS \"-fno-exceptions -DEIGEN_DONT_VECTORIZE -DBTL_PREFIX=eigen3_novec\")\n\n#     if(BUILD_btl_eigen3_adv)\n#       target_link_libraries(btl_eigen3_adv ${MKL_LIBRARIES})\n#     endif()\n\n  endif()\n\n  btl_add_bench(btl_tiny_eigen3 btl_tiny_eigen3.cpp OFF)\n\n  if(NOT BTL_NOVEC)\n    btl_add_bench(btl_tiny_eigen3_novec btl_tiny_eigen3.cpp OFF)\n    btl_add_target_property(btl_tiny_eigen3_novec    COMPILE_FLAGS \"-DBTL_PREFIX=eigen3_tiny\")\n\n    if(BUILD_btl_tiny_eigen3_novec)\n      btl_add_target_property(btl_tiny_eigen3_novec    COMPILE_FLAGS \"-DEIGEN_DONT_VECTORIZE -DBTL_PREFIX=eigen3_tiny_novec\")\n    endif()\n  endif()\n\nendif ()\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/eigen3/btl_tiny_eigen3.cpp",
    "content": "//=====================================================\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#include \"utilities.h\"\n#include \"eigen3_interface.hh\"\n#include \"static/bench_static.hh\"\n#include \"action_matrix_vector_product.hh\"\n#include \"action_matrix_matrix_product.hh\"\n#include \"action_axpy.hh\"\n#include \"action_lu_solve.hh\"\n#include \"action_ata_product.hh\"\n#include \"action_aat_product.hh\"\n#include \"action_atv_product.hh\"\n#include \"action_cholesky.hh\"\n#include \"action_trisolve.hh\"\n\nBTL_MAIN;\n\nint main()\n{\n\n  bench_static<Action_axpy,eigen2_interface>();\n  bench_static<Action_matrix_matrix_product,eigen2_interface>();\n  bench_static<Action_matrix_vector_product,eigen2_interface>();\n  bench_static<Action_atv_product,eigen2_interface>();\n  bench_static<Action_cholesky,eigen2_interface>();\n  bench_static<Action_trisolve,eigen2_interface>();\n\n  return 0;\n}\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/eigen3/eigen3_interface.hh",
    "content": "//=====================================================\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#ifndef EIGEN3_INTERFACE_HH\n#define EIGEN3_INTERFACE_HH\n\n#include <Eigen/Eigen>\n#include <vector>\n#include \"btl.hh\"\n\nusing namespace Eigen;\n\ntemplate<class real, int SIZE=Dynamic>\nclass eigen3_interface\n{\n\npublic :\n\n  enum {IsFixedSize = (SIZE!=Dynamic)};\n\n  typedef real real_type;\n\n  typedef std::vector<real> stl_vector;\n  typedef std::vector<stl_vector> stl_matrix;\n\n  typedef Eigen::Matrix<real,SIZE,SIZE> gene_matrix;\n  typedef Eigen::Matrix<real,SIZE,1> gene_vector;\n\n  static inline std::string name( void )\n  {\n    return EIGEN_MAKESTRING(BTL_PREFIX);\n  }\n\n  static void free_matrix(gene_matrix & /*A*/, int /*N*/) {}\n\n  static void free_vector(gene_vector & /*B*/) {}\n\n  static BTL_DONT_INLINE void matrix_from_stl(gene_matrix & A, stl_matrix & A_stl){\n    A.resize(A_stl[0].size(), A_stl.size());\n\n    for (unsigned int j=0; j<A_stl.size() ; j++){\n      for (unsigned int i=0; i<A_stl[j].size() ; i++){\n        A.coeffRef(i,j) = A_stl[j][i];\n      }\n    }\n  }\n\n  static BTL_DONT_INLINE  void vector_from_stl(gene_vector & B, stl_vector & B_stl){\n    B.resize(B_stl.size(),1);\n\n    for (unsigned int i=0; i<B_stl.size() ; i++){\n      B.coeffRef(i) = B_stl[i];\n    }\n  }\n\n  static BTL_DONT_INLINE  void vector_to_stl(gene_vector & B, stl_vector & B_stl){\n    for (unsigned int i=0; i<B_stl.size() ; i++){\n      B_stl[i] = B.coeff(i);\n    }\n  }\n\n  static BTL_DONT_INLINE  void matrix_to_stl(gene_matrix & A, stl_matrix & A_stl){\n    int  N=A_stl.size();\n\n    for (int j=0;j<N;j++){\n      A_stl[j].resize(N);\n      for (int i=0;i<N;i++){\n        A_stl[j][i] = A.coeff(i,j);\n      }\n    }\n  }\n\n  static inline void matrix_matrix_product(const gene_matrix & A, const gene_matrix & B, gene_matrix & X, int  /*N*/){\n    X.noalias() = A*B;\n  }\n\n  static inline void transposed_matrix_matrix_product(const gene_matrix & A, const gene_matrix & B, gene_matrix & X, int  /*N*/){\n    X.noalias() = A.transpose()*B.transpose();\n  }\n\n  static inline void ata_product(const gene_matrix & A, gene_matrix & X, int  /*N*/){\n    //X.noalias() = A.transpose()*A;\n    X.template triangularView<Lower>().setZero();\n    X.template selfadjointView<Lower>().rankUpdate(A.transpose());\n  }\n\n  static inline void aat_product(const gene_matrix & A, gene_matrix & X, int  /*N*/){\n    X.template triangularView<Lower>().setZero();\n    X.template selfadjointView<Lower>().rankUpdate(A);\n  }\n\n  static inline void matrix_vector_product(const gene_matrix & A, const gene_vector & B, gene_vector & X, int  /*N*/){\n    X.noalias() = A*B;\n  }\n\n  static inline void symv(const gene_matrix & A, const gene_vector & B, gene_vector & X, int  /*N*/){\n    X.noalias() = (A.template selfadjointView<Lower>() * B);\n//     internal::product_selfadjoint_vector<real,0,LowerTriangularBit,false,false>(N,A.data(),N, B.data(), 1, X.data(), 1);\n  }\n\n  template<typename Dest, typename Src> static void triassign(Dest& dst, const Src& src)\n  {\n    typedef typename Dest::Scalar Scalar;\n    typedef typename internal::packet_traits<Scalar>::type Packet;\n    const int PacketSize = sizeof(Packet)/sizeof(Scalar);\n    int size = dst.cols();\n    for(int j=0; j<size; j+=1)\n    {\n//       const int alignedEnd = alignedStart + ((innerSize-alignedStart) & ~packetAlignedMask);\n      Scalar* A0 = dst.data() + j*dst.stride();\n      int starti = j;\n      int alignedEnd = starti;\n      int alignedStart = (starti) + internal::first_aligned(&A0[starti], size-starti);\n      alignedEnd = alignedStart + ((size-alignedStart)/(2*PacketSize))*(PacketSize*2);\n\n      // do the non-vectorizable part of the assignment\n      for (int index = starti; index<alignedStart ; ++index)\n      {\n        if(Dest::Flags&RowMajorBit)\n          dst.copyCoeff(j, index, src);\n        else\n          dst.copyCoeff(index, j, src);\n      }\n\n      // do the vectorizable part of the assignment\n      for (int index = alignedStart; index<alignedEnd; index+=PacketSize)\n      {\n        if(Dest::Flags&RowMajorBit)\n          dst.template copyPacket<Src, Aligned, Unaligned>(j, index, src);\n        else\n          dst.template copyPacket<Src, Aligned, Unaligned>(index, j, src);\n      }\n\n      // do the non-vectorizable part of the assignment\n      for (int index = alignedEnd; index<size; ++index)\n      {\n        if(Dest::Flags&RowMajorBit)\n          dst.copyCoeff(j, index, src);\n        else\n          dst.copyCoeff(index, j, src);\n      }\n      //dst.col(j).tail(N-j) = src.col(j).tail(N-j);\n    }\n  }\n\n  static EIGEN_DONT_INLINE void syr2(gene_matrix & A,  gene_vector & X, gene_vector & Y, int  N){\n    // internal::product_selfadjoint_rank2_update<real,0,LowerTriangularBit>(N,A.data(),N, X.data(), 1, Y.data(), 1, -1);\n    for(int j=0; j<N; ++j)\n      A.col(j).tail(N-j) += X[j] * Y.tail(N-j) + Y[j] * X.tail(N-j);\n  }\n\n  static EIGEN_DONT_INLINE void ger(gene_matrix & A,  gene_vector & X, gene_vector & Y, int  N){\n    for(int j=0; j<N; ++j)\n      A.col(j) += X * Y[j];\n  }\n\n  static EIGEN_DONT_INLINE void rot(gene_vector & A,  gene_vector & B, real c, real s, int  /*N*/){\n    internal::apply_rotation_in_the_plane(A, B, JacobiRotation<real>(c,s));\n  }\n\n  static inline void atv_product(gene_matrix & A, gene_vector & B, gene_vector & X, int  /*N*/){\n    X.noalias() = (A.transpose()*B);\n  }\n\n  static inline void axpy(real coef, const gene_vector & X, gene_vector & Y, int  /*N*/){\n    Y += coef * X;\n  }\n\n  static inline void axpby(real a, const gene_vector & X, real b, gene_vector & Y, int  /*N*/){\n    Y = a*X + b*Y;\n  }\n\n  static EIGEN_DONT_INLINE void copy_matrix(const gene_matrix & source, gene_matrix & cible, int  /*N*/){\n    cible = source;\n  }\n\n  static EIGEN_DONT_INLINE void copy_vector(const gene_vector & source, gene_vector & cible, int  /*N*/){\n    cible = source;\n  }\n\n  static inline void trisolve_lower(const gene_matrix & L, const gene_vector& B, gene_vector& X, int  /*N*/){\n    X = L.template triangularView<Lower>().solve(B);\n  }\n\n  static inline void trisolve_lower_matrix(const gene_matrix & L, const gene_matrix& B, gene_matrix& X, int  /*N*/){\n    X = L.template triangularView<Upper>().solve(B);\n  }\n\n  static inline void trmm(const gene_matrix & L, const gene_matrix& B, gene_matrix& X, int  /*N*/){\n    X.noalias() = L.template triangularView<Lower>() * B;\n  }\n\n  static inline void cholesky(const gene_matrix & X, gene_matrix & C, int  /*N*/){\n    C = X;\n    internal::llt_inplace<real,Lower>::blocked(C);\n    //C = X.llt().matrixL();\n//     C = X;\n//     Cholesky<gene_matrix>::computeInPlace(C);\n//     Cholesky<gene_matrix>::computeInPlaceBlock(C);\n  }\n\n  static inline void lu_decomp(const gene_matrix & X, gene_matrix & C, int  /*N*/){\n    C = X.fullPivLu().matrixLU();\n  }\n\n  static inline void partial_lu_decomp(const gene_matrix & X, gene_matrix & C, int  N){\n    Matrix<DenseIndex,1,Dynamic> piv(N);\n    DenseIndex nb;\n    C = X;\n    internal::partial_lu_inplace(C,piv,nb);\n//     C = X.partialPivLu().matrixLU();\n  }\n\n  static inline void tridiagonalization(const gene_matrix & X, gene_matrix & C, int  N){\n    typename Tridiagonalization<gene_matrix>::CoeffVectorType aux(N-1);\n    C = X;\n    internal::tridiagonalization_inplace(C, aux);\n  }\n\n  static inline void hessenberg(const gene_matrix & X, gene_matrix & C, int  /*N*/){\n    C = HessenbergDecomposition<gene_matrix>(X).packedMatrix();\n  }\n\n\n\n};\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/eigen3/main_adv.cpp",
    "content": "//=====================================================\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#include \"utilities.h\"\n#include \"eigen3_interface.hh\"\n#include \"bench.hh\"\n#include \"action_trisolve.hh\"\n#include \"action_trisolve_matrix.hh\"\n#include \"action_cholesky.hh\"\n#include \"action_hessenberg.hh\"\n#include \"action_lu_decomp.hh\"\n#include \"action_partial_lu.hh\"\n\nBTL_MAIN;\n\nint main()\n{\n  bench<Action_trisolve<eigen3_interface<REAL_TYPE> > >(MIN_LU,MAX_LU,NB_POINT);\n  bench<Action_trisolve_matrix<eigen3_interface<REAL_TYPE> > >(MIN_LU,MAX_LU,NB_POINT);\n  bench<Action_cholesky<eigen3_interface<REAL_TYPE> > >(MIN_LU,MAX_LU,NB_POINT);\n//   bench<Action_lu_decomp<eigen3_interface<REAL_TYPE> > >(MIN_LU,MAX_LU,NB_POINT);\n  bench<Action_partial_lu<eigen3_interface<REAL_TYPE> > >(MIN_LU,MAX_LU,NB_POINT);\n\n//   bench<Action_hessenberg<eigen3_interface<REAL_TYPE> > >(MIN_LU,MAX_LU,NB_POINT);\n  bench<Action_tridiagonalization<eigen3_interface<REAL_TYPE> > >(MIN_LU,MAX_LU,NB_POINT);\n\n  return 0;\n}\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/eigen3/main_linear.cpp",
    "content": "//=====================================================\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#include \"utilities.h\"\n#include \"eigen3_interface.hh\"\n#include \"bench.hh\"\n#include \"basic_actions.hh\"\n\nBTL_MAIN;\n\nint main()\n{\n\n  bench<Action_axpy<eigen3_interface<REAL_TYPE> > >(MIN_AXPY,MAX_AXPY,NB_POINT);\n  bench<Action_axpby<eigen3_interface<REAL_TYPE> > >(MIN_AXPY,MAX_AXPY,NB_POINT);\n  bench<Action_rot<eigen3_interface<REAL_TYPE> > >(MIN_AXPY,MAX_AXPY,NB_POINT);\n  \n  return 0;\n}\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/eigen3/main_matmat.cpp",
    "content": "//=====================================================\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#include \"utilities.h\"\n#include \"eigen3_interface.hh\"\n#include \"bench.hh\"\n#include \"basic_actions.hh\"\n\nBTL_MAIN;\n\nint main()\n{\n  bench<Action_matrix_matrix_product<eigen3_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n  bench<Action_ata_product<eigen3_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n  bench<Action_aat_product<eigen3_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n  bench<Action_trmm<eigen3_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n\n  return 0;\n}\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/eigen3/main_vecmat.cpp",
    "content": "//=====================================================\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#include \"utilities.h\"\n#include \"eigen3_interface.hh\"\n#include \"bench.hh\"\n#include \"basic_actions.hh\"\n\nBTL_MAIN;\n\nint main()\n{\n  bench<Action_matrix_vector_product<eigen3_interface<REAL_TYPE> > >(MIN_MV,MAX_MV,NB_POINT);\n  bench<Action_atv_product<eigen3_interface<REAL_TYPE> > >(MIN_MV,MAX_MV,NB_POINT);\n  bench<Action_symv<eigen3_interface<REAL_TYPE> > >(MIN_MV,MAX_MV,NB_POINT);\n  bench<Action_syr2<eigen3_interface<REAL_TYPE> > >(MIN_MV,MAX_MV,NB_POINT);\n  bench<Action_ger<eigen3_interface<REAL_TYPE> > >(MIN_MV,MAX_MV,NB_POINT);\n\n  return 0;\n}\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/gmm/CMakeLists.txt",
    "content": "\nfind_package(GMM)\nif (GMM_FOUND)\n  include_directories(${GMM_INCLUDES})\n  btl_add_bench(btl_gmm main.cpp)\nendif ()\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/gmm/gmm_LU_solve_interface.hh",
    "content": "//=====================================================\n// File   :  blitz_LU_solve_interface.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)>        \n// Copyright (C) EDF R&D,  lun sep 30 14:23:31 CEST 2002\n//=====================================================\n// \n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n// \n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n// \n#ifndef BLITZ_LU_SOLVE_INTERFACE_HH\n#define BLITZ_LU_SOLVE_INTERFACE_HH\n\n#include \"blitz/array.h\"\n#include <vector>\n\nBZ_USING_NAMESPACE(blitz)\n\ntemplate<class real>\nclass blitz_LU_solve_interface : public blitz_interface<real>\n{\n\npublic :\n\n  typedef typename blitz_interface<real>::gene_matrix gene_matrix;\n  typedef typename blitz_interface<real>::gene_vector gene_vector;\n\n  typedef blitz::Array<int,1> Pivot_Vector;\n\n  inline static void new_Pivot_Vector(Pivot_Vector & pivot,int N)\n  {\n\n    pivot.resize(N);\n\n  }\n\n  inline static void free_Pivot_Vector(Pivot_Vector & pivot)\n  {\n    \n    return;\n\n  }\n\n\n  static inline real matrix_vector_product_sliced(const gene_matrix & A, gene_vector B, int row, int col_start, int col_end)\n  {\n    \n    real somme=0.;\n    \n    for (int j=col_start ; j<col_end+1 ; j++){\n\t\n\tsomme+=A(row,j)*B(j);\n\t\n    }\n\n    return somme;\n\n  }\n\n\n\n\n  static inline real matrix_matrix_product_sliced(gene_matrix & A, int row, int col_start, int col_end, gene_matrix & B, int row_shift, int col )\n  {\n    \n    real somme=0.;\n    \n    for (int j=col_start ; j<col_end+1 ; j++){\n\t\n\tsomme+=A(row,j)*B(j+row_shift,col);\n\t\n    }\n\n    return somme;\n\n  }\n\n  inline static void LU_factor(gene_matrix & LU, Pivot_Vector & pivot, int N)\n  {\n\n    ASSERT( LU.rows()==LU.cols() ) ;\n    int index_max = 0 ;\n    real big = 0. ;\n    real theSum = 0. ;\n    real dum = 0. ;\n    // Get the implicit scaling information :\n    gene_vector ImplicitScaling( N ) ;\n    for( int i=0; i<N; i++ ) {\n      big = 0. ;\n      for( int j=0; j<N; j++ ) {\n\tif( abs( LU( i, j ) )>=big ) big = abs( LU( i, j ) ) ;\n      }\n      if( big==0. ) {\n\tINFOS( \"blitz_LU_factor::Singular matrix\" ) ;\n\texit( 0 ) ;\n      }\n      ImplicitScaling( i ) = 1./big ;\n    }\n    // Loop over columns of Crout's method :\n    for( int j=0; j<N; j++ ) {\n      for( int i=0; i<j; i++ ) {\n\ttheSum = LU( i, j ) ;\n\ttheSum -= matrix_matrix_product_sliced(LU, i, 0, i-1, LU, 0, j) ;\n\t//\ttheSum -= sum( LU( i, Range( fromStart, i-1 ) )*LU( Range( fromStart, i-1 ), j ) ) ;\n\tLU( i, j ) = theSum ;\n      }\n      \n      // Search for the largest pivot element :\n      big = 0. ;\n      for( int i=j; i<N; i++ ) {\n\ttheSum = LU( i, j ) ;\n\ttheSum -= matrix_matrix_product_sliced(LU, i, 0, j-1, LU, 0, j) ;\n\t//\ttheSum -= sum( LU( i, Range( fromStart, j-1 ) )*LU( Range( fromStart, j-1 ), j ) ) ;\n\tLU( i, j ) = theSum ;\n\tif( (ImplicitScaling( i )*abs( theSum ))>=big ) {\n\t  dum = ImplicitScaling( i )*abs( theSum ) ;\n\t  big = dum ;\n\t  index_max = i ;\n\t}\n      }\n      // Interchanging rows and the scale factor :\n      if( j!=index_max ) {\n\tfor( int k=0; k<N; k++ ) {\n\t  dum = LU( index_max, k ) ;\n\t  LU( index_max, k ) = LU( j, k ) ;\n\t  LU( j, k ) = dum ;\n\t}\n\tImplicitScaling( index_max ) = ImplicitScaling( j ) ;\n      }\n      pivot( j ) = index_max ;\n      if ( LU( j, j )==0. ) LU( j, j ) = 1.e-20 ;\n      // Divide by the pivot element :\n      if( j<N ) {\n\tdum = 1./LU( j, j ) ;\n\tfor( int i=j+1; i<N; i++ ) LU( i, j ) *= dum ;\n      }\n    }\n\n  }\n\n  inline static void LU_solve(const gene_matrix & LU, const Pivot_Vector pivot, gene_vector &B, gene_vector X, int N)\n  {\n\n    // Pour conserver le meme header, on travaille sur X, copie du second-membre B\n    X = B.copy() ;\n    ASSERT( LU.rows()==LU.cols() ) ;\n    firstIndex indI ;\n    // Forward substitution :\n    int ii = 0 ;\n    real theSum = 0. ;\n    for( int i=0; i<N; i++ ) {\n      int ip = pivot( i ) ;\n      theSum = X( ip ) ;\n      //      theSum = B( ip ) ;\n      X( ip ) = X( i ) ;\n      //      B( ip ) = B( i ) ;\n      if( ii ) {\n\ttheSum -= matrix_vector_product_sliced(LU, X, i, ii-1, i-1) ;\n\t//\ttheSum -= sum( LU( i, Range( ii-1, i-1 ) )*X( Range( ii-1, i-1 ) ) ) ;\n\t//\ttheSum -= sum( LU( i, Range( ii-1, i-1 ) )*B( Range( ii-1, i-1 ) ) ) ;\n      } else if( theSum ) {\n\tii = i+1 ;\n      }\n      X( i ) = theSum ;\n      //      B( i ) = theSum ;\n    }\n    // Backsubstitution :\n    for( int i=N-1; i>=0; i-- ) {\n      theSum = X( i ) ;\n      //      theSum = B( i ) ;\n      theSum -= matrix_vector_product_sliced(LU, X, i, i+1, N) ;\n      //      theSum -= sum( LU( i, Range( i+1, toEnd ) )*X( Range( i+1, toEnd ) ) ) ;\n      //      theSum -= sum( LU( i, Range( i+1, toEnd ) )*B( Range( i+1, toEnd ) ) ) ;\n      // Store a component of the solution vector :\n      X( i ) = theSum/LU( i, i ) ;\n      //      B( i ) = theSum/LU( i, i ) ;\n    }\n\n  }\n\n};\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/gmm/gmm_interface.hh",
    "content": "//=====================================================\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#ifndef GMM_INTERFACE_HH\n#define GMM_INTERFACE_HH\n\n#include <gmm/gmm.h>\n#include <vector>\n\nusing namespace gmm;\n\ntemplate<class real>\nclass gmm_interface {\n\npublic :\n\n  typedef real real_type ;\n\n  typedef std::vector<real>  stl_vector;\n  typedef std::vector<stl_vector > stl_matrix;\n\n  typedef gmm::dense_matrix<real> gene_matrix;\n  typedef stl_vector gene_vector;\n\n  static inline std::string name( void )\n  {\n    return \"gmm\";\n  }\n\n  static void free_matrix(gene_matrix & A, int N){\n    return ;\n  }\n\n  static void free_vector(gene_vector & B){\n    return ;\n  }\n\n  static inline void matrix_from_stl(gene_matrix & A, stl_matrix & A_stl){\n    A.resize(A_stl[0].size(),A_stl.size());\n\n    for (int j=0; j<A_stl.size() ; j++){\n      for (int i=0; i<A_stl[j].size() ; i++){\n        A(i,j) = A_stl[j][i];\n      }\n    }\n  }\n\n  static inline void vector_from_stl(gene_vector & B, stl_vector & B_stl){\n    B = B_stl;\n  }\n\n  static inline void vector_to_stl(gene_vector & B, stl_vector & B_stl){\n    B_stl = B;\n  }\n\n  static inline void matrix_to_stl(gene_matrix & A, stl_matrix & A_stl){\n    int N=A_stl.size();\n\n    for (int j=0;j<N;j++){\n      A_stl[j].resize(N);\n      for (int i=0;i<N;i++){\n        A_stl[j][i] = A(i,j);\n      }\n    }\n  }\n\n  static inline void matrix_matrix_product(const gene_matrix & A, const gene_matrix & B, gene_matrix & X, int N){\n    gmm::mult(A,B, X);\n  }\n\n  static inline void transposed_matrix_matrix_product(const gene_matrix & A, const gene_matrix & B, gene_matrix & X, int N){\n    gmm::mult(gmm::transposed(A),gmm::transposed(B), X);\n  }\n\n  static inline void ata_product(const gene_matrix & A, gene_matrix & X, int N){\n    gmm::mult(gmm::transposed(A),A, X);\n  }\n\n  static inline void aat_product(const gene_matrix & A, gene_matrix & X, int N){\n    gmm::mult(A,gmm::transposed(A), X);\n  }\n\n  static inline void matrix_vector_product(gene_matrix & A, gene_vector & B, gene_vector & X, int N){\n    gmm::mult(A,B,X);\n  }\n\n  static inline void atv_product(gene_matrix & A, gene_vector & B, gene_vector & X, int N){\n    gmm::mult(gmm::transposed(A),B,X);\n  }\n\n  static inline void axpy(const real coef, const gene_vector & X, gene_vector & Y, int N){\n    gmm::add(gmm::scaled(X,coef), Y);\n  }\n\n  static inline void axpby(real a, const gene_vector & X, real b, gene_vector & Y, int N){\n    gmm::add(gmm::scaled(X,a), gmm::scaled(Y,b), Y);\n  }\n\n  static inline void copy_matrix(const gene_matrix & source, gene_matrix & cible, int N){\n    gmm::copy(source,cible);\n  }\n\n  static inline void copy_vector(const gene_vector & source, gene_vector & cible, int N){\n    gmm::copy(source,cible);\n  }\n\n  static inline void trisolve_lower(const gene_matrix & L, const gene_vector& B, gene_vector & X, int N){\n    gmm::copy(B,X);\n    gmm::lower_tri_solve(L, X, false);\n  }\n\n  static inline void partial_lu_decomp(const gene_matrix & X, gene_matrix & R, int N){\n    gmm::copy(X,R);\n    std::vector<int> ipvt(N);\n    gmm::lu_factor(R, ipvt);\n  }\n\n  static inline void hessenberg(const gene_matrix & X, gene_matrix & R, int N){\n    gmm::copy(X,R);\n    gmm::Hessenberg_reduction(R,X,false);\n  }\n\n  static inline void tridiagonalization(const gene_matrix & X, gene_matrix & R, int N){\n    gmm::copy(X,R);\n    gmm::Householder_tridiagonalization(R,X,false);\n  }\n\n};\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/gmm/main.cpp",
    "content": "//=====================================================\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#include \"utilities.h\"\n#include \"gmm_interface.hh\"\n#include \"bench.hh\"\n#include \"basic_actions.hh\"\n#include \"action_hessenberg.hh\"\n#include \"action_partial_lu.hh\"\n\nBTL_MAIN;\n\nint main()\n{\n\n  bench<Action_axpy<gmm_interface<REAL_TYPE> > >(MIN_AXPY,MAX_AXPY,NB_POINT);\n  bench<Action_axpby<gmm_interface<REAL_TYPE> > >(MIN_AXPY,MAX_AXPY,NB_POINT);\n\n  bench<Action_matrix_vector_product<gmm_interface<REAL_TYPE> > >(MIN_MV,MAX_MV,NB_POINT);\n  bench<Action_atv_product<gmm_interface<REAL_TYPE> > >(MIN_MV,MAX_MV,NB_POINT);\n\n  bench<Action_matrix_matrix_product<gmm_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n//   bench<Action_ata_product<gmm_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n//   bench<Action_aat_product<gmm_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n\n  bench<Action_trisolve<gmm_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n  //bench<Action_lu_solve<blitz_LU_solve_interface<REAL_TYPE> > >(MIN_LU,MAX_LU,NB_POINT);\n\n  bench<Action_partial_lu<gmm_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n  \n  bench<Action_hessenberg<gmm_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n  bench<Action_tridiagonalization<gmm_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n\n  return 0;\n}\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/mtl4/.kdbgrc.main",
    "content": "[General]\nDebuggerCmdStr=\nDriverName=GDB\nFileVersion=1\nOptionsSelected=\nProgramArgs=\nTTYLevel=7\nWorkingDirectory=\n\n[Memory]\nColumnWidths=80,0\nNumExprs=0\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/mtl4/CMakeLists.txt",
    "content": "\nfind_package(MTL4)\nif (MTL4_FOUND)\n  include_directories(${MTL4_INCLUDE_DIR})\n  btl_add_bench(btl_mtl4 main.cpp)\nendif ()\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/mtl4/main.cpp",
    "content": "//=====================================================\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#include \"utilities.h\"\n#include \"mtl4_interface.hh\"\n#include \"bench.hh\"\n#include \"basic_actions.hh\"\n#include \"action_cholesky.hh\"\n// #include \"action_lu_decomp.hh\"\n\nBTL_MAIN;\n\nint main()\n{\n\n  bench<Action_axpy<mtl4_interface<REAL_TYPE> > >(MIN_AXPY,MAX_AXPY,NB_POINT);\n  bench<Action_axpby<mtl4_interface<REAL_TYPE> > >(MIN_AXPY,MAX_AXPY,NB_POINT);\n\n  bench<Action_matrix_vector_product<mtl4_interface<REAL_TYPE> > >(MIN_MV,MAX_MV,NB_POINT);\n  bench<Action_atv_product<mtl4_interface<REAL_TYPE> > >(MIN_MV,MAX_MV,NB_POINT);\n  bench<Action_matrix_matrix_product<mtl4_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n//   bench<Action_ata_product<mtl4_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n//   bench<Action_aat_product<mtl4_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n\n  bench<Action_trisolve<mtl4_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n//   bench<Action_cholesky<mtl4_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n//   bench<Action_lu_decomp<mtl4_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n\n  return 0;\n}\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/mtl4/mtl4_LU_solve_interface.hh",
    "content": "//=====================================================\n// File   :  blitz_LU_solve_interface.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)>        \n// Copyright (C) EDF R&D,  lun sep 30 14:23:31 CEST 2002\n//=====================================================\n// \n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n// \n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n// \n#ifndef BLITZ_LU_SOLVE_INTERFACE_HH\n#define BLITZ_LU_SOLVE_INTERFACE_HH\n\n#include \"blitz/array.h\"\n#include <vector>\n\nBZ_USING_NAMESPACE(blitz)\n\ntemplate<class real>\nclass blitz_LU_solve_interface : public blitz_interface<real>\n{\n\npublic :\n\n  typedef typename blitz_interface<real>::gene_matrix gene_matrix;\n  typedef typename blitz_interface<real>::gene_vector gene_vector;\n\n  typedef blitz::Array<int,1> Pivot_Vector;\n\n  inline static void new_Pivot_Vector(Pivot_Vector & pivot,int N)\n  {\n\n    pivot.resize(N);\n\n  }\n\n  inline static void free_Pivot_Vector(Pivot_Vector & pivot)\n  {\n    \n    return;\n\n  }\n\n\n  static inline real matrix_vector_product_sliced(const gene_matrix & A, gene_vector B, int row, int col_start, int col_end)\n  {\n    \n    real somme=0.;\n    \n    for (int j=col_start ; j<col_end+1 ; j++){\n\t\n\tsomme+=A(row,j)*B(j);\n\t\n    }\n\n    return somme;\n\n  }\n\n\n\n\n  static inline real matrix_matrix_product_sliced(gene_matrix & A, int row, int col_start, int col_end, gene_matrix & B, int row_shift, int col )\n  {\n    \n    real somme=0.;\n    \n    for (int j=col_start ; j<col_end+1 ; j++){\n\t\n\tsomme+=A(row,j)*B(j+row_shift,col);\n\t\n    }\n\n    return somme;\n\n  }\n\n  inline static void LU_factor(gene_matrix & LU, Pivot_Vector & pivot, int N)\n  {\n\n    ASSERT( LU.rows()==LU.cols() ) ;\n    int index_max = 0 ;\n    real big = 0. ;\n    real theSum = 0. ;\n    real dum = 0. ;\n    // Get the implicit scaling information :\n    gene_vector ImplicitScaling( N ) ;\n    for( int i=0; i<N; i++ ) {\n      big = 0. ;\n      for( int j=0; j<N; j++ ) {\n\tif( abs( LU( i, j ) )>=big ) big = abs( LU( i, j ) ) ;\n      }\n      if( big==0. ) {\n\tINFOS( \"blitz_LU_factor::Singular matrix\" ) ;\n\texit( 0 ) ;\n      }\n      ImplicitScaling( i ) = 1./big ;\n    }\n    // Loop over columns of Crout's method :\n    for( int j=0; j<N; j++ ) {\n      for( int i=0; i<j; i++ ) {\n\ttheSum = LU( i, j ) ;\n\ttheSum -= matrix_matrix_product_sliced(LU, i, 0, i-1, LU, 0, j) ;\n\t//\ttheSum -= sum( LU( i, Range( fromStart, i-1 ) )*LU( Range( fromStart, i-1 ), j ) ) ;\n\tLU( i, j ) = theSum ;\n      }\n      \n      // Search for the largest pivot element :\n      big = 0. ;\n      for( int i=j; i<N; i++ ) {\n\ttheSum = LU( i, j ) ;\n\ttheSum -= matrix_matrix_product_sliced(LU, i, 0, j-1, LU, 0, j) ;\n\t//\ttheSum -= sum( LU( i, Range( fromStart, j-1 ) )*LU( Range( fromStart, j-1 ), j ) ) ;\n\tLU( i, j ) = theSum ;\n\tif( (ImplicitScaling( i )*abs( theSum ))>=big ) {\n\t  dum = ImplicitScaling( i )*abs( theSum ) ;\n\t  big = dum ;\n\t  index_max = i ;\n\t}\n      }\n      // Interchanging rows and the scale factor :\n      if( j!=index_max ) {\n\tfor( int k=0; k<N; k++ ) {\n\t  dum = LU( index_max, k ) ;\n\t  LU( index_max, k ) = LU( j, k ) ;\n\t  LU( j, k ) = dum ;\n\t}\n\tImplicitScaling( index_max ) = ImplicitScaling( j ) ;\n      }\n      pivot( j ) = index_max ;\n      if ( LU( j, j )==0. ) LU( j, j ) = 1.e-20 ;\n      // Divide by the pivot element :\n      if( j<N ) {\n\tdum = 1./LU( j, j ) ;\n\tfor( int i=j+1; i<N; i++ ) LU( i, j ) *= dum ;\n      }\n    }\n\n  }\n\n  inline static void LU_solve(const gene_matrix & LU, const Pivot_Vector pivot, gene_vector &B, gene_vector X, int N)\n  {\n\n    // Pour conserver le meme header, on travaille sur X, copie du second-membre B\n    X = B.copy() ;\n    ASSERT( LU.rows()==LU.cols() ) ;\n    firstIndex indI ;\n    // Forward substitution :\n    int ii = 0 ;\n    real theSum = 0. ;\n    for( int i=0; i<N; i++ ) {\n      int ip = pivot( i ) ;\n      theSum = X( ip ) ;\n      //      theSum = B( ip ) ;\n      X( ip ) = X( i ) ;\n      //      B( ip ) = B( i ) ;\n      if( ii ) {\n\ttheSum -= matrix_vector_product_sliced(LU, X, i, ii-1, i-1) ;\n\t//\ttheSum -= sum( LU( i, Range( ii-1, i-1 ) )*X( Range( ii-1, i-1 ) ) ) ;\n\t//\ttheSum -= sum( LU( i, Range( ii-1, i-1 ) )*B( Range( ii-1, i-1 ) ) ) ;\n      } else if( theSum ) {\n\tii = i+1 ;\n      }\n      X( i ) = theSum ;\n      //      B( i ) = theSum ;\n    }\n    // Backsubstitution :\n    for( int i=N-1; i>=0; i-- ) {\n      theSum = X( i ) ;\n      //      theSum = B( i ) ;\n      theSum -= matrix_vector_product_sliced(LU, X, i, i+1, N) ;\n      //      theSum -= sum( LU( i, Range( i+1, toEnd ) )*X( Range( i+1, toEnd ) ) ) ;\n      //      theSum -= sum( LU( i, Range( i+1, toEnd ) )*B( Range( i+1, toEnd ) ) ) ;\n      // Store a component of the solution vector :\n      X( i ) = theSum/LU( i, i ) ;\n      //      B( i ) = theSum/LU( i, i ) ;\n    }\n\n  }\n\n};\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/mtl4/mtl4_interface.hh",
    "content": "//=====================================================\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#ifndef MTL4_INTERFACE_HH\n#define MTL4_INTERFACE_HH\n\n#include <boost/numeric/mtl/mtl.hpp>\n#include <boost/numeric/mtl/utility/range_generator.hpp>\n// #include <boost/numeric/mtl/operation/cholesky.hpp>\n#include <vector>\n\nusing namespace mtl;\n\ntemplate<class real>\nclass mtl4_interface {\n\npublic :\n\n  typedef real real_type ;\n\n  typedef std::vector<real>  stl_vector;\n  typedef std::vector<stl_vector > stl_matrix;\n\n  typedef mtl::dense2D<real, mtl::matrix::parameters<mtl::tag::col_major> > gene_matrix;\n  typedef mtl::dense_vector<real>  gene_vector;\n\n  static inline std::string name() { return \"mtl4\"; }\n\n  static void free_matrix(gene_matrix & A, int N){\n    return ;\n  }\n\n  static void free_vector(gene_vector & B){\n    return ;\n  }\n\n  static inline void matrix_from_stl(gene_matrix & A, stl_matrix & A_stl){\n    A.change_dim(A_stl[0].size(), A_stl.size());\n\n    for (int j=0; j<A_stl.size() ; j++){\n      for (int i=0; i<A_stl[j].size() ; i++){\n        A(i,j) = A_stl[j][i];\n      }\n    }\n  }\n\n  static inline void vector_from_stl(gene_vector & B, stl_vector & B_stl){\n    B.change_dim(B_stl.size());\n    for (int i=0; i<B_stl.size() ; i++){\n      B[i] = B_stl[i];\n    }\n  }\n\n  static inline void vector_to_stl(gene_vector & B, stl_vector & B_stl){\n    for (int i=0; i<B_stl.size() ; i++){\n      B_stl[i] = B[i];\n    }\n  }\n\n  static inline void matrix_to_stl(gene_matrix & A, stl_matrix & A_stl){\n    int N=A_stl.size();\n    for (int j=0;j<N;j++){\n      A_stl[j].resize(N);\n      for (int i=0;i<N;i++){\n        A_stl[j][i] = A(i,j);\n      }\n    }\n  }\n\n  static inline void matrix_matrix_product(const gene_matrix & A, const gene_matrix & B, gene_matrix & X, int N){\n    X = (A*B);\n//     morton_dense<double, doppled_64_row_mask> C(N,N);\n//     C = B;\n//     X = (A*C);\n  }\n\n  static inline void transposed_matrix_matrix_product(const gene_matrix & A, const gene_matrix & B, gene_matrix & X, int N){\n    X = (trans(A)*trans(B));\n  }\n\n//   static inline void ata_product(const gene_matrix & A, gene_matrix & X, int N){\n//     X = (trans(A)*A);\n//   }\n\n  static inline void aat_product(const gene_matrix & A, gene_matrix & X, int N){\n    X = (A*trans(A));\n  }\n\n  static inline void matrix_vector_product(gene_matrix & A, gene_vector & B, gene_vector & X, int N){\n    X = (A*B);\n  }\n\n  static inline void atv_product(gene_matrix & A, gene_vector & B, gene_vector & X, int N){\n    X = (trans(A)*B);\n  }\n\n  static inline void axpy(const real coef, const gene_vector & X, gene_vector & Y, int N){\n    Y += coef * X;\n  }\n\n  static inline void axpby(real a, const gene_vector & X, real b, gene_vector & Y, int N){\n    Y = a*X + b*Y;\n  }\n\n//   static inline void cholesky(const gene_matrix & X, gene_matrix & C, int N){\n//     C = X;\n//     recursive_cholesky(C);\n//   }\n\n//   static inline void lu_decomp(const gene_matrix & X, gene_matrix & R, int N){\n//     R = X;\n//     std::vector<int> ipvt(N);\n//     lu_factor(R, ipvt);\n//   }\n\n  static inline void trisolve_lower(const gene_matrix & L, const gene_vector& B, gene_vector & X, int N){\n    X = lower_trisolve(L, B);\n  }\n\n  static inline void copy_matrix(const gene_matrix & source, gene_matrix & cible, int N){\n    cible = source;\n  }\n\n  static inline void copy_vector(const gene_vector & source, gene_vector & cible, int N){\n    cible = source;\n  }\n\n};\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/tensors/CMakeLists.txt",
    "content": "\n\nif((NOT TENSOR_INCLUDE_DIR) AND Eigen_SOURCE_DIR)\n  # unless TENSOR_INCLUDE_DIR is defined, let's use current Eigen version\n  set(TENSOR_INCLUDE_DIR ${Eigen_SOURCE_DIR})\n  set(TENSOR_FOUND TRUE)\nelse()\n  find_package(Tensor)\nendif()\n\nif (TENSOR_FOUND)\n\n  include_directories(${TENSOR_INCLUDE_DIR})\n  btl_add_bench(btl_tensor_linear main_linear.cpp)\n  btl_add_bench(btl_tensor_vecmat main_vecmat.cpp)\n  btl_add_bench(btl_tensor_matmat main_matmat.cpp)\n\n  btl_add_target_property(btl_tensor_linear COMPILE_FLAGS \"-fno-exceptions -DBTL_PREFIX=tensor\")\n  btl_add_target_property(btl_tensor_vecmat COMPILE_FLAGS \"-fno-exceptions -DBTL_PREFIX=tensor\")\n  btl_add_target_property(btl_tensor_matmat COMPILE_FLAGS \"-fno-exceptions -DBTL_PREFIX=tensor\")\n\n  option(BTL_BENCH_NOGCCVEC \"also bench Eigen explicit vec without GCC's auto vec\" OFF)\n  if(CMAKE_COMPILER_IS_GNUCXX AND BTL_BENCH_NOGCCVEC)\n    btl_add_bench(btl_tensor_nogccvec_linear main_linear.cpp)\n    btl_add_bench(btl_tensor_nogccvec_vecmat main_vecmat.cpp)\n    btl_add_bench(btl_tensor_nogccvec_matmat main_matmat.cpp)\n\n    btl_add_target_property(btl_tensor_nogccvec_linear COMPILE_FLAGS \"-fno-exceptions -fno-tree-vectorize -DBTL_PREFIX=tensor_nogccvec\")\n    btl_add_target_property(btl_tensor_nogccvec_vecmat COMPILE_FLAGS \"-fno-exceptions -fno-tree-vectorize -DBTL_PREFIX=tensor_nogccvec\")\n    btl_add_target_property(btl_tensor_nogccvec_matmat COMPILE_FLAGS \"-fno-exceptions -fno-tree-vectorize -DBTL_PREFIX=tensor_nogccvec\")\n  endif()\n\n\n  if(NOT BTL_NOVEC)\n    btl_add_bench(btl_tensor_novec_linear main_linear.cpp OFF)\n    btl_add_bench(btl_tensor_novec_vecmat main_vecmat.cpp OFF)\n    btl_add_bench(btl_tensor_novec_matmat main_matmat.cpp OFF)\n    btl_add_target_property(btl_tensor_novec_linear COMPILE_FLAGS \"-fno-exceptions -DEIGEN_DONT_VECTORIZE -DBTL_PREFIX=tensor_novec\")\n    btl_add_target_property(btl_tensor_novec_vecmat COMPILE_FLAGS \"-fno-exceptions -DEIGEN_DONT_VECTORIZE -DBTL_PREFIX=tensor_novec\")\n    btl_add_target_property(btl_tensor_novec_matmat COMPILE_FLAGS \"-fno-exceptions -DEIGEN_DONT_VECTORIZE -DBTL_PREFIX=tensor_novec\")\n\n  endif()\n\nendif ()\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/tensors/main_linear.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"utilities.h\"\n#include \"tensor_interface.hh\"\n#include \"bench.hh\"\n#include \"basic_actions.hh\"\n\nBTL_MAIN;\n\nint main()\n{\n  bench<Action_axpy<tensor_interface<REAL_TYPE> > >(MIN_AXPY,MAX_AXPY,NB_POINT);\n  bench<Action_axpby<tensor_interface<REAL_TYPE> > >(MIN_AXPY,MAX_AXPY,NB_POINT);\n\n  return 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/tensors/main_matmat.cpp",
    "content": "//=====================================================\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//=====================================================\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n//\n#include \"utilities.h\"\n#include \"tensor_interface.hh\"\n#include \"bench.hh\"\n#include \"basic_actions.hh\"\n\nBTL_MAIN;\n\nint main()\n{\n  bench<Action_matrix_matrix_product<tensor_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n\n  return 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/tensors/main_vecmat.cpp",
    "content": "//=====================================================\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//=====================================================\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n//\n#include \"utilities.h\"\n#include \"tensor_interface.hh\"\n#include \"bench.hh\"\n#include \"basic_actions.hh\"\n\nBTL_MAIN;\n\nint main()\n{\n  bench<Action_matrix_vector_product<tensor_interface<REAL_TYPE> > >(MIN_MV,MAX_MV,NB_POINT);\n\n  return 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/tensors/tensor_interface.hh",
    "content": "//=====================================================\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//=====================================================\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n//\n#ifndef TENSOR_INTERFACE_HH\n#define TENSOR_INTERFACE_HH\n\n#include <unsupported/Eigen/CXX11/Tensor>\n#include <vector>\n#include \"btl.hh\"\n\nusing namespace Eigen;\n\ntemplate<class real>\nclass tensor_interface\n{\npublic :\n  typedef real real_type;\n  typedef typename Eigen::Tensor<real,2>::Index Index;\n\n  typedef std::vector<real> stl_vector;\n  typedef std::vector<stl_vector> stl_matrix;\n\n  typedef Eigen::Tensor<real,2> gene_matrix;\n  typedef Eigen::Tensor<real,1> gene_vector;\n\n\n  static inline std::string name( void )\n  {\n    return EIGEN_MAKESTRING(BTL_PREFIX);\n  }\n\n  static void free_matrix(gene_matrix & /*A*/, int /*N*/) {}\n\n  static void free_vector(gene_vector & /*B*/) {}\n\n  static BTL_DONT_INLINE void matrix_from_stl(gene_matrix & A, stl_matrix & A_stl){\n    A.resize(Eigen::array<Index,2>(A_stl[0].size(), A_stl.size()));\n\n    for (unsigned int j=0; j<A_stl.size() ; j++){\n      for (unsigned int i=0; i<A_stl[j].size() ; i++){\n        A.coeffRef(Eigen::array<Index,2>(i,j)) = A_stl[j][i];\n      }\n    }\n  }\n\n  static BTL_DONT_INLINE  void vector_from_stl(gene_vector & B, stl_vector & B_stl){\n    B.resize(B_stl.size());\n\n    for (unsigned int i=0; i<B_stl.size() ; i++){\n      B.coeffRef(i) = B_stl[i];\n    }\n  }\n\n  static BTL_DONT_INLINE  void vector_to_stl(gene_vector & B, stl_vector & B_stl){\n    for (unsigned int i=0; i<B_stl.size() ; i++){\n      B_stl[i] = B.coeff(i);\n    }\n  }\n\n  static BTL_DONT_INLINE  void matrix_to_stl(gene_matrix & A, stl_matrix & A_stl){\n    int  N=A_stl.size();\n\n    for (int j=0;j<N;j++){\n      A_stl[j].resize(N);\n      for (int i=0;i<N;i++){\n        A_stl[j][i] = A.coeff(Eigen::array<Index,2>(i,j));\n      }\n    }\n  }\n\n  static inline void matrix_matrix_product(const gene_matrix & A, const gene_matrix & B, gene_matrix & X, int  /*N*/){\n    typedef typename Eigen::Tensor<real_type, 1>::DimensionPair DimPair;\n    const Eigen::array<DimPair, 1> dims(DimPair(1, 0));\n    X/*.noalias()*/ = A.contract(B, dims);\n  }\n\n  static inline void matrix_vector_product(const gene_matrix & A, const gene_vector & B, gene_vector & X, int  /*N*/){\n    typedef typename Eigen::Tensor<real_type, 1>::DimensionPair DimPair;\n    const Eigen::array<DimPair, 1> dims(DimPair(1, 0));\n    X/*.noalias()*/ = A.contract(B, dims);\n  }\n\n  static inline void axpy(real coef, const gene_vector & X, gene_vector & Y, int  /*N*/){\n    Y += X.constant(coef) * X;\n  }\n\n  static inline void axpby(real a, const gene_vector & X, real b, gene_vector & Y, int  /*N*/){\n    Y = X.constant(a)*X + Y.constant(b)*Y;\n  }\n\n  static EIGEN_DONT_INLINE void copy_matrix(const gene_matrix & source, gene_matrix & cible, int  /*N*/){\n    cible = source;\n  }\n\n  static EIGEN_DONT_INLINE void copy_vector(const gene_vector & source, gene_vector & cible, int  /*N*/){\n    cible = source;\n  }\n};\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/tvmet/CMakeLists.txt",
    "content": "\nfind_package(Tvmet)\nif (TVMET_FOUND)\n  include_directories(${TVMET_INCLUDE_DIR})\n  btl_add_bench(btl_tvmet main.cpp OFF)\nendif ()\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/tvmet/main.cpp",
    "content": "//=====================================================\n// File   :  main.cpp\n// Author :  L. Plagne <laurent.plagne@edf.fr)>\n// Copyright (C) EDF R&D,  lun sep 30 14:23:30 CEST 2002\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#include \"utilities.h\"\n#include \"tvmet_interface.hh\"\n#include \"static/bench_static.hh\"\n#include \"action_matrix_vector_product.hh\"\n#include \"action_matrix_matrix_product.hh\"\n#include \"action_atv_product.hh\"\n#include \"action_axpy.hh\"\n\nBTL_MAIN;\n\nint main()\n{\n  bench_static<Action_axpy,tvmet_interface>();\n  bench_static<Action_matrix_matrix_product,tvmet_interface>();\n  bench_static<Action_matrix_vector_product,tvmet_interface>();\n  bench_static<Action_atv_product,tvmet_interface>();\n\n  return 0;\n}\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/tvmet/tvmet_interface.hh",
    "content": "//=====================================================\n// File   :  tvmet_interface.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)>\n// Copyright (C) EDF R&D,  lun sep 30 14:23:30 CEST 2002\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#ifndef TVMET_INTERFACE_HH\n#define TVMET_INTERFACE_HH\n\n#include <tvmet/tvmet.h>\n#include <tvmet/Vector.h>\n#include <tvmet/Matrix.h>\n\n#include <vector>\n\nusing namespace tvmet;\n\ntemplate<class real, int SIZE>\nclass tvmet_interface{\n\npublic :\n\n  typedef real real_type ;\n\n  typedef std::vector<real>  stl_vector;\n  typedef std::vector<stl_vector > stl_matrix;\n\n  typedef Vector<real,SIZE> gene_vector;\n  typedef Matrix<real,SIZE,SIZE> gene_matrix;\n\n  static inline std::string name() { return \"tiny_tvmet\"; }\n\n  static void free_matrix(gene_matrix & A, int N){}\n\n  static void free_vector(gene_vector & B){}\n\n  static inline void matrix_from_stl(gene_matrix & A, stl_matrix & A_stl){\n    for (int j=0; j<A_stl.size() ; j++)\n      for (int i=0; i<A_stl[j].size() ; i++)\n        A(i,j) = A_stl[j][i];\n  }\n\n  static inline void vector_from_stl(gene_vector & B, stl_vector & B_stl){\n    for (int i=0; i<B_stl.size() ; i++)\n      B[i]=B_stl[i];\n  }\n\n  static inline void vector_to_stl(gene_vector & B, stl_vector & B_stl){\n    for (int i=0; i<B_stl.size() ; i++){\n      B_stl[i]=B[i];\n    }\n  }\n\n  static inline void matrix_to_stl(gene_matrix & A, stl_matrix & A_stl){\n    int N = A_stl.size();\n    for (int j=0;j<N;j++){\n      A_stl[j].resize(N);\n      for (int i=0;i<N;i++)\n        A_stl[j][i] = A(i,j);\n    }\n  }\n\n\n  static inline void copy_matrix(const gene_matrix & source, gene_matrix & cible, int N){\n    cible = source;\n  }\n\n  static inline void copy_vector(const gene_vector & source, gene_vector & cible, int N){\n    cible = source;\n  }\n\n  static inline void matrix_matrix_product(const gene_matrix & A, const gene_matrix & B, gene_matrix & X, int N){\n    X = prod(A,B);\n  }\n\n  static inline void matrix_vector_product(gene_matrix & A, gene_vector & B, gene_vector & X, int N){\n    X = prod(A,B);\n  }\n\n  static inline void atv_product(gene_matrix & A, gene_vector & B, gene_vector & X, int N){\n    X = prod(trans(A),B);\n  }\n\n  static inline void axpy(const real coef, const gene_vector & X, gene_vector & Y, int N){\n    Y+=coef*X;\n  }\n\n};\n\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/ublas/CMakeLists.txt",
    "content": "\nfind_package(Boost)\nif (Boost_FOUND)\n  include_directories(${Boost_INCLUDE_DIRS})\n  include_directories(${Boost_INCLUDES})\n  btl_add_bench(btl_ublas main.cpp)\nendif ()\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/ublas/main.cpp",
    "content": "//=====================================================\n// File   :  main.cpp\n// Author :  L. Plagne <laurent.plagne@edf.fr)>\n// Copyright (C) EDF R&D,  lun sep 30 14:23:27 CEST 2002\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#include \"utilities.h\"\n#include \"ublas_interface.hh\"\n#include \"bench.hh\"\n#include \"basic_actions.hh\"\n\nBTL_MAIN;\n\nint main()\n{\n  bench<Action_axpy<ublas_interface<REAL_TYPE> > >(MIN_AXPY,MAX_AXPY,NB_POINT);\n  bench<Action_axpby<ublas_interface<REAL_TYPE> > >(MIN_AXPY,MAX_AXPY,NB_POINT);\n\n  bench<Action_matrix_vector_product<ublas_interface<REAL_TYPE> > >(MIN_MV,MAX_MV,NB_POINT);\n  bench<Action_atv_product<ublas_interface<REAL_TYPE> > >(MIN_MV,MAX_MV,NB_POINT);\n\n  bench<Action_matrix_matrix_product<ublas_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n//   bench<Action_ata_product<ublas_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n//   bench<Action_aat_product<ublas_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n\n  bench<Action_trisolve<ublas_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);\n\n  return 0;\n}\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/btl/libs/ublas/ublas_interface.hh",
    "content": "//=====================================================\n// File   :  ublas_interface.hh\n// Author :  L. Plagne <laurent.plagne@edf.fr)>\n// Copyright (C) EDF R&D,  lun sep 30 14:23:27 CEST 2002\n//=====================================================\n//\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// as published by the Free Software Foundation; either version 2\n// of the License, or (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n//\n#ifndef UBLAS_INTERFACE_HH\n#define UBLAS_INTERFACE_HH\n\n#include <boost/numeric/ublas/vector.hpp>\n#include <boost/numeric/ublas/matrix.hpp>\n#include <boost/numeric/ublas/io.hpp>\n#include <boost/numeric/ublas/triangular.hpp>\n\nusing namespace boost::numeric;\n\ntemplate <class real>\nclass ublas_interface{\n\npublic :\n\n  typedef real real_type ;\n\n  typedef std::vector<real> stl_vector;\n  typedef std::vector<stl_vector> stl_matrix;\n\n  typedef typename boost::numeric::ublas::matrix<real,boost::numeric::ublas::column_major> gene_matrix;\n  typedef typename boost::numeric::ublas::vector<real> gene_vector;\n\n  static inline std::string name( void ) { return \"ublas\"; }\n\n  static void free_matrix(gene_matrix & A, int N) {}\n\n  static void free_vector(gene_vector & B) {}\n\n  static inline void matrix_from_stl(gene_matrix & A, stl_matrix & A_stl){\n    A.resize(A_stl.size(),A_stl[0].size());\n    for (int j=0; j<A_stl.size() ; j++)\n      for (int i=0; i<A_stl[j].size() ; i++)\n        A(i,j)=A_stl[j][i];\n  }\n\n  static inline void vector_from_stl(gene_vector & B, stl_vector & B_stl){\n    B.resize(B_stl.size());\n    for (int i=0; i<B_stl.size() ; i++)\n      B(i)=B_stl[i];\n  }\n\n  static inline void vector_to_stl(gene_vector & B, stl_vector & B_stl){\n    for (int i=0; i<B_stl.size() ; i++)\n      B_stl[i]=B(i);\n  }\n\n  static inline void matrix_to_stl(gene_matrix & A, stl_matrix & A_stl){\n    int N=A_stl.size();\n    for (int j=0;j<N;j++)\n    {\n      A_stl[j].resize(N);\n      for (int i=0;i<N;i++)\n        A_stl[j][i]=A(i,j);\n    }\n  }\n\n  static inline void copy_vector(const gene_vector & source, gene_vector & cible, int N){\n    for (int i=0;i<N;i++){\n      cible(i) = source(i);\n    }\n  }\n\n  static inline void copy_matrix(const gene_matrix & source, gene_matrix & cible, int N){\n    for (int i=0;i<N;i++){\n      for (int j=0;j<N;j++){\n        cible(i,j) = source(i,j);\n      }\n    }\n  }\n\n  static inline void matrix_vector_product_slow(gene_matrix & A, gene_vector & B, gene_vector & X, int N){\n    X =  prod(A,B);\n  }\n\n  static inline void matrix_matrix_product_slow(gene_matrix & A, gene_matrix & B, gene_matrix & X, int N){\n    X =  prod(A,B);\n  }\n\n  static inline void axpy_slow(const real coef, const gene_vector & X, gene_vector & Y, int N){\n    Y+=coef*X;\n  }\n\n  // alias free assignments\n\n  static inline void matrix_vector_product(gene_matrix & A, gene_vector & B, gene_vector & X, int N){\n    X.assign(prod(A,B));\n  }\n\n  static inline void atv_product(gene_matrix & A, gene_vector & B, gene_vector & X, int N){\n    X.assign(prod(trans(A),B));\n  }\n\n  static inline void matrix_matrix_product(gene_matrix & A, gene_matrix & B, gene_matrix & X, int N){\n    X.assign(prod(A,B));\n  }\n\n  static inline void axpy(const real coef, const gene_vector & X, gene_vector & Y, int N){\n    Y.plus_assign(coef*X);\n  }\n\n  static inline void axpby(real a, const gene_vector & X, real b, gene_vector & Y, int N){\n    Y = a*X + b*Y;\n  }\n\n  static inline void ata_product(gene_matrix & A, gene_matrix & X, int N){\n    // X =  prod(trans(A),A);\n    X.assign(prod(trans(A),A));\n  }\n\n  static inline void aat_product(gene_matrix & A, gene_matrix & X, int N){\n    // X =  prod(A,trans(A));\n    X.assign(prod(A,trans(A)));\n  }\n\n  static inline void trisolve_lower(const gene_matrix & L, const gene_vector& B, gene_vector & X, int N){\n    X = solve(L, B, ublas::lower_tag ());\n  }\n\n};\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/check_cache_queries.cpp",
    "content": "\n#define EIGEN_INTERNAL_DEBUG_CACHE_QUERY\n#include <iostream>\n#include \"../Eigen/Core\"\n\nusing namespace Eigen;\nusing namespace std;\n\n#define DUMP_CPUID(CODE) {\\\n  int abcd[4]; \\\n  abcd[0] = abcd[1] = abcd[2] = abcd[3] = 0;\\\n  EIGEN_CPUID(abcd, CODE, 0); \\\n  std::cout << \"The code \" << CODE << \" gives \" \\\n              << (int*)(abcd[0]) << \" \" << (int*)(abcd[1]) << \" \" \\\n              << (int*)(abcd[2]) << \" \" << (int*)(abcd[3]) << \" \" << std::endl; \\\n  }\n  \nint main()\n{\n  cout << \"Eigen's L1    = \" << internal::queryL1CacheSize() << endl;\n  cout << \"Eigen's L2/L3 = \" << internal::queryTopLevelCacheSize() << endl;\n  int l1, l2, l3;\n  internal::queryCacheSizes(l1, l2, l3);\n  cout << \"Eigen's L1, L2, L3       = \" << l1 << \" \" << l2 << \" \" << l3 << endl;\n  \n  #ifdef EIGEN_CPUID\n\n  int abcd[4];\n  int string[8];\n  char* string_char = (char*)(string);\n\n  // vendor ID\n  EIGEN_CPUID(abcd,0x0,0);\n  string[0] = abcd[1];\n  string[1] = abcd[3];\n  string[2] = abcd[2];\n  string[3] = 0;\n  cout << endl;\n  cout << \"vendor id = \" << string_char << endl;\n  cout << endl;\n  int max_funcs = abcd[0];\n\n  internal::queryCacheSizes_intel_codes(l1, l2, l3);\n  cout << \"Eigen's intel codes L1, L2, L3 = \" << l1 << \" \" << l2 << \" \" << l3 << endl;\n  if(max_funcs>=4)\n  {\n    internal::queryCacheSizes_intel_direct(l1, l2, l3);\n    cout << \"Eigen's intel direct L1, L2, L3 = \" << l1 << \" \" << l2 << \" \" << l3 << endl;\n  }\n  internal::queryCacheSizes_amd(l1, l2, l3);\n  cout << \"Eigen's amd L1, L2, L3         = \" << l1 << \" \" << l2 << \" \" << l3 << endl;\n  cout << endl;\n  \n  // dump Intel direct method\n  if(max_funcs>=4)\n  {\n    l1 = l2 = l3 = 0;\n    int cache_id = 0;\n    int cache_type = 0;\n    do {\n      abcd[0] = abcd[1] = abcd[2] = abcd[3] = 0;\n      EIGEN_CPUID(abcd,0x4,cache_id);\n      cache_type  = (abcd[0] & 0x0F) >> 0;\n      int cache_level = (abcd[0] & 0xE0) >> 5;  // A[7:5]\n      int ways        = (abcd[1] & 0xFFC00000) >> 22; // B[31:22]\n      int partitions  = (abcd[1] & 0x003FF000) >> 12; // B[21:12]\n      int line_size   = (abcd[1] & 0x00000FFF) >>  0; // B[11:0]\n      int sets        = (abcd[2]);                    // C[31:0]\n      int cache_size = (ways+1) * (partitions+1) * (line_size+1) * (sets+1);\n      \n      cout << \"cache[\" << cache_id << \"].type       = \" << cache_type << \"\\n\";\n      cout << \"cache[\" << cache_id << \"].level      = \" << cache_level << \"\\n\";\n      cout << \"cache[\" << cache_id << \"].ways       = \" << ways << \"\\n\";\n      cout << \"cache[\" << cache_id << \"].partitions = \" << partitions << \"\\n\";\n      cout << \"cache[\" << cache_id << \"].line_size  = \" << line_size << \"\\n\";\n      cout << \"cache[\" << cache_id << \"].sets       = \" << sets << \"\\n\";\n      cout << \"cache[\" << cache_id << \"].size       = \" << cache_size << \"\\n\";\n      \n      cache_id++;\n    } while(cache_type>0 && cache_id<16);\n  }\n  \n  // dump everything\n  std::cout << endl <<\"Raw dump:\" << endl;\n  for(int i=0; i<max_funcs; ++i)\n    DUMP_CPUID(i);\n\n  DUMP_CPUID(0x80000000);\n  DUMP_CPUID(0x80000001);\n  DUMP_CPUID(0x80000002);\n  DUMP_CPUID(0x80000003);\n  DUMP_CPUID(0x80000004);\n  DUMP_CPUID(0x80000005);\n  DUMP_CPUID(0x80000006);\n  DUMP_CPUID(0x80000007);\n  DUMP_CPUID(0x80000008);\n  #else\n  cout << \"EIGEN_CPUID is not defined\" << endl;\n  #endif\n  return 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/bench/dense_solvers.cpp",
    "content": "#include <iostream>\n#include \"BenchTimer.h\"\n#include <Eigen/Dense>\n#include <map>\n#include <vector>\n#include <string>\n#include <sstream>\nusing namespace Eigen;\n\nstd::map<std::string,Array<float,1,8,DontAlign|RowMajor> > results;\nstd::vector<std::string> labels;\nstd::vector<Array2i> sizes;\n\ntemplate<typename Solver,typename MatrixType>\nEIGEN_DONT_INLINE\nvoid compute_norm_equation(Solver &solver, const MatrixType &A) {\n  if(A.rows()!=A.cols())\n    solver.compute(A.transpose()*A);\n  else\n    solver.compute(A);\n}\n\ntemplate<typename Solver,typename MatrixType>\nEIGEN_DONT_INLINE\nvoid compute(Solver &solver, const MatrixType &A) {\n  solver.compute(A);\n}\n\ntemplate<typename Scalar,int Size>\nvoid bench(int id, int rows, int size = Size)\n{\n  typedef Matrix<Scalar,Dynamic,Size> Mat;\n  typedef Matrix<Scalar,Dynamic,Dynamic> MatDyn;\n  typedef Matrix<Scalar,Size,Size> MatSquare;\n  Mat A(rows,size);\n  A.setRandom();\n  if(rows==size)\n    A = A*A.adjoint();\n  BenchTimer t_llt, t_ldlt, t_lu, t_fplu, t_qr, t_cpqr, t_cod, t_fpqr, t_jsvd, t_bdcsvd;\n\n  int svd_opt = ComputeThinU|ComputeThinV;\n  \n  int tries = 5;\n  int rep = 1000/size;\n  if(rep==0) rep = 1;\n//   rep = rep*rep;\n  \n  LLT<MatSquare> llt(size);\n  LDLT<MatSquare> ldlt(size);\n  PartialPivLU<MatSquare> lu(size);\n  FullPivLU<MatSquare> fplu(size,size);\n  HouseholderQR<Mat> qr(A.rows(),A.cols());\n  ColPivHouseholderQR<Mat> cpqr(A.rows(),A.cols());\n  CompleteOrthogonalDecomposition<Mat> cod(A.rows(),A.cols());\n  FullPivHouseholderQR<Mat> fpqr(A.rows(),A.cols());\n  JacobiSVD<MatDyn> jsvd(A.rows(),A.cols());\n  BDCSVD<MatDyn> bdcsvd(A.rows(),A.cols());\n  \n  BENCH(t_llt, tries, rep, compute_norm_equation(llt,A));\n  BENCH(t_ldlt, tries, rep, compute_norm_equation(ldlt,A));\n  BENCH(t_lu, tries, rep, compute_norm_equation(lu,A));\n  if(size<=1000)\n    BENCH(t_fplu, tries, rep, compute_norm_equation(fplu,A));\n  BENCH(t_qr, tries, rep, compute(qr,A));\n  BENCH(t_cpqr, tries, rep, compute(cpqr,A));\n  BENCH(t_cod, tries, rep, compute(cod,A));\n  if(size*rows<=10000000)\n    BENCH(t_fpqr, tries, rep, compute(fpqr,A));\n  if(size<500) // JacobiSVD is really too slow for too large matrices\n    BENCH(t_jsvd, tries, rep, jsvd.compute(A,svd_opt));\n//   if(size*rows<=20000000)\n    BENCH(t_bdcsvd, tries, rep, bdcsvd.compute(A,svd_opt));\n  \n  results[\"LLT\"][id] = t_llt.best();\n  results[\"LDLT\"][id] = t_ldlt.best();\n  results[\"PartialPivLU\"][id] = t_lu.best();\n  results[\"FullPivLU\"][id] = t_fplu.best();\n  results[\"HouseholderQR\"][id] = t_qr.best();\n  results[\"ColPivHouseholderQR\"][id] = t_cpqr.best();\n  results[\"CompleteOrthogonalDecomposition\"][id] = t_cod.best();\n  results[\"FullPivHouseholderQR\"][id] = t_fpqr.best();\n  results[\"JacobiSVD\"][id] = t_jsvd.best();\n  results[\"BDCSVD\"][id] = t_bdcsvd.best();\n}\n\n\nint main()\n{\n  labels.push_back(\"LLT\");\n  labels.push_back(\"LDLT\");\n  labels.push_back(\"PartialPivLU\");\n  labels.push_back(\"FullPivLU\");\n  labels.push_back(\"HouseholderQR\");\n  labels.push_back(\"ColPivHouseholderQR\");\n  labels.push_back(\"CompleteOrthogonalDecomposition\");\n  labels.push_back(\"FullPivHouseholderQR\");\n  labels.push_back(\"JacobiSVD\");\n  labels.push_back(\"BDCSVD\");\n\n  for(int i=0; i<labels.size(); ++i)\n    results[labels[i]].fill(-1);\n\n  const int small = 8;\n  sizes.push_back(Array2i(small,small));\n  sizes.push_back(Array2i(100,100));\n  sizes.push_back(Array2i(1000,1000));\n  sizes.push_back(Array2i(4000,4000));\n  sizes.push_back(Array2i(10000,small));\n  sizes.push_back(Array2i(10000,100));\n  sizes.push_back(Array2i(10000,1000));\n  sizes.push_back(Array2i(10000,4000));\n\n  using namespace std;\n\n  for(int k=0; k<sizes.size(); ++k)\n  {\n    cout << sizes[k](0) << \"x\" << sizes[k](1) << \"...\\n\";\n    bench<float,Dynamic>(k,sizes[k](0),sizes[k](1));\n  }\n\n  cout.width(32);\n  cout << \"solver/size\";\n  cout << \"  \";\n  for(int k=0; k<sizes.size(); ++k)\n  {\n    std::stringstream ss;\n    ss << sizes[k](0) << \"x\" << sizes[k](1);\n    cout.width(10); cout << ss.str(); cout << \" \";\n  }\n  cout << endl;\n\n\n  for(int i=0; i<labels.size(); ++i)\n  {\n    cout.width(32); cout << labels[i]; cout << \"  \";\n    ArrayXf r = (results[labels[i]]*100000.f).floor()/100.f;\n    for(int k=0; k<sizes.size(); ++k)\n    {\n      cout.width(10);\n      if(r(k)>=1e6)  cout << \"-\";\n      else           cout << r(k);\n      cout << \" \";\n    }\n    cout << endl;\n  }\n\n  // HTML output\n  cout << \"<table class=\\\"manual\\\">\" << endl;\n  cout << \"<tr><th>solver/size</th>\" << endl;\n  for(int k=0; k<sizes.size(); ++k)\n    cout << \"  <th>\" << sizes[k](0) << \"x\" << sizes[k](1) << \"</th>\";\n  cout << \"</tr>\" << endl;\n  for(int i=0; i<labels.size(); ++i)\n  {\n    cout << \"<tr\";\n    if(i%2==1) cout << \" class=\\\"alt\\\"\";\n    cout << \"><td>\" << labels[i] << \"</td>\";\n    ArrayXf r = (results[labels[i]]*100000.f).floor()/100.f;\n    for(int k=0; k<sizes.size(); ++k)\n    {\n      if(r(k)>=1e6) cout << \"<td>-</td>\";\n      else\n      {\n        cout << \"<td>\" << r(k);\n        if(i>0)\n          cout << \" (x\" << numext::round(10.f*results[labels[i]](k)/results[\"LLT\"](k))/10.f << \")\";\n        if(i<4 && sizes[k](0)!=sizes[k](1))\n          cout << \" <sup><a href=\\\"#note_ls\\\">*</a></sup>\";\n        cout << \"</td>\";\n      }\n    }\n    cout << \"</tr>\" << endl;\n  }\n  cout << \"</table>\" << endl;\n\n//   cout << \"LLT                             (ms)  \" << (results[\"LLT\"]*1000.).format(fmt) << \"\\n\";\n//   cout << \"LDLT                             (%)  \" << (results[\"LDLT\"]/results[\"LLT\"]).format(fmt) << \"\\n\";\n//   cout << \"PartialPivLU                     (%)  \" << (results[\"PartialPivLU\"]/results[\"LLT\"]).format(fmt) << \"\\n\";\n//   cout << \"FullPivLU                        (%)  \" << (results[\"FullPivLU\"]/results[\"LLT\"]).format(fmt) << \"\\n\";\n//   cout << \"HouseholderQR                    (%)  \" << (results[\"HouseholderQR\"]/results[\"LLT\"]).format(fmt) << \"\\n\";\n//   cout << \"ColPivHouseholderQR              (%)  \" << (results[\"ColPivHouseholderQR\"]/results[\"LLT\"]).format(fmt) << \"\\n\";\n//   cout << \"CompleteOrthogonalDecomposition  (%)  \" << (results[\"CompleteOrthogonalDecomposition\"]/results[\"LLT\"]).format(fmt) << \"\\n\";\n//   cout << \"FullPivHouseholderQR             (%)  \" << (results[\"FullPivHouseholderQR\"]/results[\"LLT\"]).format(fmt) << \"\\n\";\n//   cout << \"JacobiSVD                        (%)  \" << (results[\"JacobiSVD\"]/results[\"LLT\"]).format(fmt) << \"\\n\";\n//   cout << \"BDCSVD                           (%)  \" << (results[\"BDCSVD\"]/results[\"LLT\"]).format(fmt) << \"\\n\";\n}\n"
  },
  {
    "path": "3rdparty/eigen3/bench/eig33.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n// The computeRoots function included in this is based on materials\n// covered by the following copyright and license:\n// \n// Geometric Tools, LLC\n// Copyright (c) 1998-2010\n// Distributed under the Boost Software License, Version 1.0.\n// \n// Permission is hereby granted, free of charge, to any person or organization\n// obtaining a copy of the software and accompanying documentation covered by\n// this license (the \"Software\") to use, reproduce, display, distribute,\n// execute, and transmit the Software, and to prepare derivative works of the\n// Software, and to permit third-parties to whom the Software is furnished to\n// do so, all subject to the following:\n// \n// The copyright notices in the Software and this entire statement, including\n// the above license grant, this restriction and the following disclaimer,\n// must be included in all copies of the Software, in whole or in part, and\n// all derivative works of the Software, unless such copies or derivative\n// works are solely in the form of machine-executable object code generated by\n// a source language processor.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT\n// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE\n// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,\n// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n// DEALINGS IN THE SOFTWARE.\n\n#include <iostream>\n#include <Eigen/Core>\n#include <Eigen/Eigenvalues>\n#include <Eigen/Geometry>\n#include <bench/BenchTimer.h>\n\nusing namespace Eigen;\nusing namespace std;\n\ntemplate<typename Matrix, typename Roots>\ninline void computeRoots(const Matrix& m, Roots& roots)\n{\n  typedef typename Matrix::Scalar Scalar;\n  const Scalar s_inv3 = 1.0/3.0;\n  const Scalar s_sqrt3 = std::sqrt(Scalar(3.0));\n\n  // The characteristic equation is x^3 - c2*x^2 + c1*x - c0 = 0.  The\n  // eigenvalues are the roots to this equation, all guaranteed to be\n  // real-valued, because the matrix is symmetric.\n  Scalar c0 = m(0,0)*m(1,1)*m(2,2) + Scalar(2)*m(0,1)*m(0,2)*m(1,2) - m(0,0)*m(1,2)*m(1,2) - m(1,1)*m(0,2)*m(0,2) - m(2,2)*m(0,1)*m(0,1);\n  Scalar c1 = m(0,0)*m(1,1) - m(0,1)*m(0,1) + m(0,0)*m(2,2) - m(0,2)*m(0,2) + m(1,1)*m(2,2) - m(1,2)*m(1,2);\n  Scalar c2 = m(0,0) + m(1,1) + m(2,2);\n\n  // Construct the parameters used in classifying the roots of the equation\n  // and in solving the equation for the roots in closed form.\n  Scalar c2_over_3 = c2*s_inv3;\n  Scalar a_over_3 = (c1 - c2*c2_over_3)*s_inv3;\n  if (a_over_3 > Scalar(0))\n    a_over_3 = Scalar(0);\n\n  Scalar half_b = Scalar(0.5)*(c0 + c2_over_3*(Scalar(2)*c2_over_3*c2_over_3 - c1));\n\n  Scalar q = half_b*half_b + a_over_3*a_over_3*a_over_3;\n  if (q > Scalar(0))\n    q = Scalar(0);\n\n  // Compute the eigenvalues by solving for the roots of the polynomial.\n  Scalar rho = std::sqrt(-a_over_3);\n  Scalar theta = std::atan2(std::sqrt(-q),half_b)*s_inv3;\n  Scalar cos_theta = std::cos(theta);\n  Scalar sin_theta = std::sin(theta);\n  roots(2) = c2_over_3 + Scalar(2)*rho*cos_theta;\n  roots(0) = c2_over_3 - rho*(cos_theta + s_sqrt3*sin_theta);\n  roots(1) = c2_over_3 - rho*(cos_theta - s_sqrt3*sin_theta);\n}\n\ntemplate<typename Matrix, typename Vector>\nvoid eigen33(const Matrix& mat, Matrix& evecs, Vector& evals)\n{\n  typedef typename Matrix::Scalar Scalar;\n  // Scale the matrix so its entries are in [-1,1].  The scaling is applied\n  // only when at least one matrix entry has magnitude larger than 1.\n\n  Scalar shift = mat.trace()/3;\n  Matrix scaledMat = mat;\n  scaledMat.diagonal().array() -= shift;\n  Scalar scale = scaledMat.cwiseAbs()/*.template triangularView<Lower>()*/.maxCoeff();\n  scale = std::max(scale,Scalar(1));\n  scaledMat/=scale;\n\n  // Compute the eigenvalues\n//   scaledMat.setZero();\n  computeRoots(scaledMat,evals);\n\n  // compute the eigen vectors\n  // **here we assume 3 different eigenvalues**\n\n  // \"optimized version\" which appears to be slower with gcc!\n//     Vector base;\n//     Scalar alpha, beta;\n//     base <<   scaledMat(1,0) * scaledMat(2,1),\n//               scaledMat(1,0) * scaledMat(2,0),\n//              -scaledMat(1,0) * scaledMat(1,0);\n//     for(int k=0; k<2; ++k)\n//     {\n//       alpha = scaledMat(0,0) - evals(k);\n//       beta  = scaledMat(1,1) - evals(k);\n//       evecs.col(k) = (base + Vector(-beta*scaledMat(2,0), -alpha*scaledMat(2,1), alpha*beta)).normalized();\n//     }\n//     evecs.col(2) = evecs.col(0).cross(evecs.col(1)).normalized();\n\n//   // naive version\n//   Matrix tmp;\n//   tmp = scaledMat;\n//   tmp.diagonal().array() -= evals(0);\n//   evecs.col(0) = tmp.row(0).cross(tmp.row(1)).normalized();\n// \n//   tmp = scaledMat;\n//   tmp.diagonal().array() -= evals(1);\n//   evecs.col(1) = tmp.row(0).cross(tmp.row(1)).normalized();\n// \n//   tmp = scaledMat;\n//   tmp.diagonal().array() -= evals(2);\n//   evecs.col(2) = tmp.row(0).cross(tmp.row(1)).normalized();\n  \n  // a more stable version:\n  if((evals(2)-evals(0))<=Eigen::NumTraits<Scalar>::epsilon())\n  {\n    evecs.setIdentity();\n  }\n  else\n  {\n    Matrix tmp;\n    tmp = scaledMat;\n    tmp.diagonal ().array () -= evals (2);\n    evecs.col (2) = tmp.row (0).cross (tmp.row (1)).normalized ();\n    \n    tmp = scaledMat;\n    tmp.diagonal ().array () -= evals (1);\n    evecs.col(1) = tmp.row (0).cross(tmp.row (1));\n    Scalar n1 = evecs.col(1).norm();\n    if(n1<=Eigen::NumTraits<Scalar>::epsilon())\n      evecs.col(1) = evecs.col(2).unitOrthogonal();\n    else\n      evecs.col(1) /= n1;\n    \n    // make sure that evecs[1] is orthogonal to evecs[2]\n    evecs.col(1) = evecs.col(2).cross(evecs.col(1).cross(evecs.col(2))).normalized();\n    evecs.col(0) = evecs.col(2).cross(evecs.col(1));\n  }\n  \n  // Rescale back to the original size.\n  evals *= scale;\n  evals.array()+=shift;\n}\n\nint main()\n{\n  BenchTimer t;\n  int tries = 10;\n  int rep = 400000;\n  typedef Matrix3d Mat;\n  typedef Vector3d Vec;\n  Mat A = Mat::Random(3,3);\n  A = A.adjoint() * A;\n//   Mat Q = A.householderQr().householderQ();\n//   A = Q * Vec(2.2424567,2.2424566,7.454353).asDiagonal() * Q.transpose();\n\n  SelfAdjointEigenSolver<Mat> eig(A);\n  BENCH(t, tries, rep, eig.compute(A));\n  std::cout << \"Eigen iterative:  \" << t.best() << \"s\\n\";\n  \n  BENCH(t, tries, rep, eig.computeDirect(A));\n  std::cout << \"Eigen direct   :  \" << t.best() << \"s\\n\";\n\n  Mat evecs;\n  Vec evals;\n  BENCH(t, tries, rep, eigen33(A,evecs,evals));\n  std::cout << \"Direct: \" << t.best() << \"s\\n\\n\";\n\n//   std::cerr << \"Eigenvalue/eigenvector diffs:\\n\";\n//   std::cerr << (evals - eig.eigenvalues()).transpose() << \"\\n\";\n//   for(int k=0;k<3;++k)\n//     if(evecs.col(k).dot(eig.eigenvectors().col(k))<0)\n//       evecs.col(k) = -evecs.col(k);\n//   std::cerr << evecs - eig.eigenvectors() << \"\\n\\n\";\n}\n"
  },
  {
    "path": "3rdparty/eigen3/bench/geometry.cpp",
    "content": "\n#include <iostream>\n#include <Eigen/Geometry>\n#include <bench/BenchTimer.h>\n\nusing namespace std;\nusing namespace Eigen;\n\n#ifndef SCALAR\n#define SCALAR float\n#endif\n\n#ifndef SIZE\n#define SIZE 8\n#endif\n\ntypedef SCALAR Scalar;\ntypedef NumTraits<Scalar>::Real RealScalar;\ntypedef Matrix<RealScalar,Dynamic,Dynamic> A;\ntypedef Matrix</*Real*/Scalar,Dynamic,Dynamic> B;\ntypedef Matrix<Scalar,Dynamic,Dynamic> C;\ntypedef Matrix<RealScalar,Dynamic,Dynamic> M;\n\ntemplate<typename Transformation, typename Data>\nEIGEN_DONT_INLINE void transform(const Transformation& t, Data& data)\n{\n  EIGEN_ASM_COMMENT(\"begin\");\n  data = t * data;\n  EIGEN_ASM_COMMENT(\"end\");\n}\n\ntemplate<typename Scalar, typename Data>\nEIGEN_DONT_INLINE void transform(const Quaternion<Scalar>& t, Data& data)\n{\n  EIGEN_ASM_COMMENT(\"begin quat\");\n  for(int i=0;i<data.cols();++i)\n    data.col(i) = t * data.col(i);\n  EIGEN_ASM_COMMENT(\"end quat\");\n}\n\ntemplate<typename T> struct ToRotationMatrixWrapper\n{\n  enum {Dim = T::Dim};\n  typedef typename T::Scalar Scalar;\n  ToRotationMatrixWrapper(const T& o) : object(o) {}\n  T object;\n};\n\ntemplate<typename QType, typename Data>\nEIGEN_DONT_INLINE void transform(const ToRotationMatrixWrapper<QType>& t, Data& data)\n{\n  EIGEN_ASM_COMMENT(\"begin quat via mat\");\n  data = t.object.toRotationMatrix() * data;\n  EIGEN_ASM_COMMENT(\"end quat via mat\");\n}\n\ntemplate<typename Scalar, int Dim, typename Data>\nEIGEN_DONT_INLINE void transform(const Transform<Scalar,Dim,Projective>& t, Data& data)\n{\n  data = (t * data.colwise().homogeneous()).template block<Dim,Data::ColsAtCompileTime>(0,0);\n}\n\ntemplate<typename T> struct get_dim { enum { Dim = T::Dim }; };\ntemplate<typename S, int R, int C, int O, int MR, int MC>\nstruct get_dim<Matrix<S,R,C,O,MR,MC> > { enum { Dim = R }; };\n\ntemplate<typename Transformation, int N>\nstruct bench_impl\n{\n  static EIGEN_DONT_INLINE void run(const Transformation& t)\n  {\n    Matrix<typename Transformation::Scalar,get_dim<Transformation>::Dim,N> data;\n    data.setRandom();\n    bench_impl<Transformation,N-1>::run(t);\n    BenchTimer timer;\n    BENCH(timer,10,100000,transform(t,data));\n    cout.width(9);\n    cout << timer.best() << \" \";\n  }\n};\n\n\ntemplate<typename Transformation>\nstruct bench_impl<Transformation,0>\n{\n  static EIGEN_DONT_INLINE void run(const Transformation&) {}\n};\n\ntemplate<typename Transformation>\nEIGEN_DONT_INLINE void bench(const std::string& msg, const Transformation& t)\n{\n  cout << msg << \" \";\n  bench_impl<Transformation,SIZE>::run(t);\n  std::cout << \"\\n\";\n}\n\nint main(int argc, char ** argv)\n{\n  Matrix<Scalar,3,4> mat34; mat34.setRandom();\n  Transform<Scalar,3,Isometry> iso3(mat34);\n  Transform<Scalar,3,Affine> aff3(mat34);\n  Transform<Scalar,3,AffineCompact> caff3(mat34);\n  Transform<Scalar,3,Projective> proj3(mat34);\n  Quaternion<Scalar> quat;quat.setIdentity();\n  ToRotationMatrixWrapper<Quaternion<Scalar> > quatmat(quat);\n  Matrix<Scalar,3,3> mat33; mat33.setRandom();\n  \n  cout.precision(4);\n  std::cout\n     << \"N          \";\n  for(int i=0;i<SIZE;++i)\n  {\n    cout.width(9);\n    cout << i+1 << \" \";\n  }\n  cout << \"\\n\";\n  \n  bench(\"matrix 3x3\", mat33);\n  bench(\"quaternion\", quat);\n  bench(\"quat-mat  \", quatmat);\n  bench(\"isometry3 \", iso3);\n  bench(\"affine3   \", aff3);\n  bench(\"c affine3 \", caff3);\n  bench(\"proj3     \", proj3);\n}\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/perf_monitoring/changesets.txt",
    "content": "Load hg-to-git hash maps from ./eigen_git/.git/\n#3.0.1\n#3.1.1\n#3.2.0\n3.2.4\n#574a7621809fe\n58964a85800bd  # introduce AVX\n#589cbd7e98174  # merge\n589db7d49efbb  # introduce FMA\n#590a078f442a3  # complex and AVX\n590a419cea4a0  # improve packing with ptranspose\n#59251e85c936d  # merge\n#592e497a27ddc\n593d5a795f673  # New gebp kernel: up to 3 packets x 4 register-level blocks\n#5942c3c95990d  # merge\n#596c9788d55b9  # Disable 3pX4 kernel on Altivec\n#5999aa3dc4e21  # merge\n6209452eb38f8   # before-evaluators\n#6333eba5e1101  # Implement evaluator for sparse outer products\n#663b9d314ae19\n#6655ef95fabee  # Properly detect FMA support on ARM\n#667fe25f3b8e3   # FMA has been wrongly disabled\n#668409547a0c8\n#6694304c73542   # merge default to tensors\n#67216047c8d4a   # merge default to tensors\n#67410a79ca3a3   # merge default to tensors\n#674b7271dffb5   # Generalized the gebp apis\n676bfdd9f3ac9   # Made the blocking computation aware of the l3 cache;<br/> Also optimized the blocking parameters to take<br/> into account the number of threads used for a computation.\n6782dde63499c   # generalized gemv\n6799f98650d0a   # ensured that contractions that can be reduced to a matrix vector product\n#6840918c51e60   # merge tensor\n684e972b55ec4   # change prefetching in gebp\n#68598604576d1   # merge index conversion\n68963eb0f6fe6   # clean blocking size computation\n689db05f2d01e   # rotating kernel for ARM only\n#6901b7e12847d   # result_of\n69226275b250a   # fix prefetching change for ARM\n692692136350b   # prefetching\n693a8ad8887bf   # blocking size strategy\n693bcf9bb5c1f   # avoid redundant pack_rhs\n6987550107028   # dynamic loop swapping\n69858740ce4c6   # rm dynamic loop swapping,<br/> adjust lhs's micro panel height to fully exploit L1 cache\n698cd3bbffa73   # blocking heuristic:<br/> block on the rhs in L1 if the lhs fit in L1.\n701488c15615a   # organize a little our default cache sizes,<br/> and use a saner default L1 outside of x86 (10% faster on Nexus 5)\n701e56aabf205   # Refactor computeProductBlockingSizes to make room<br/> for the possibility of using lookup tables\n701ca5c12587b   # Polish lookup tables generation\n7013589a9c115   # actual_panel_rows computation should always be resilient<br/> to parameters not consistent with the known L1 cache size, see comment\n70102babb9c0f   # Provide a empirical lookup table for blocking sizes measured on a Nexus 5.<br/> Only for float, only for Android on ARM 32bit for now.\n7088481dc21ea   # Bug 986: add support for coefficient-based<br/> product with 0 depth.\n709d7f51feb07   # Bug 992: don't select a 3p GEMM path with non-SIMD scalar types.\n759f9303cc7c5   # 3.3-alpha1\n765aba1eda71e   # help clang inlining\n770fe630c9873   # Improve numerical accuracy in LLT and triangular solve<br/> by using true scalar divisions (instead of x * (1/y))\n#8741d23430628   # Improved the matrix multiplication blocking in the case<br/> where mr is not a power of 2 (e.g on Haswell CPUs)\n878f629fe95c8   # Made the index type a template parameter to evaluateProductBlockingSizes.<br/> Use numext::mini and numext::maxi instead of <br/> std::min/std::max to compute blocking sizes.\n8975d51a7f12c   # Don't optimize the processing of the last rows of<br/> a matrix matrix product in cases that violate<br/> the assumptions made by the optimized code path.\n8986136f4fdd4   # Remove the rotating kernel.\n898e68e165a23   # Bug 256: enable vectorization with unaligned loads/stores.\n91466e99ab6a1   # Relax mixing-type constraints for binary coeff-wise operators\n91776236cdea4   # merge\n917101ea26f5e   # Include the cost of stores in unrolling\n921672076db5d   # Fix perf regression introduced in changeset e56aabf205\n9210fa9e4a15c   # Fix perf regression in dgemm introduced by changeset 5d51a7f12c\n936f6b3cf8de9   # 3.3-beta2\n944504a4404f1   # Optimize expression matching 'd?=a-b*c' as 'd?=a; d?=b*c;'\n95877e27fbeee   # 3.3-rc1\n959779774f98c   # Bug 1311: fix alignment logic in some cases<br/> of (scalar*small).lazyProduct(small)\n9729f9d8d2f62   # Disabled part of the matrix matrix peeling code<br/> that's incompatible with 512 bit registers\n979eeac81b8c0   # 3.3.0\n989c927af60ed   # Fix a performance regression in (mat*mat)*vec<br/> for which mat*mat was evaluated multiple times.\n994fe696022ec   # Operators += and -= do not resize!\n99466f65ccc36   # Ease compiler generating clean and efficient code in mat*vec\n9946a5fe86098   # Complete rewrite of column-major-matrix * vector product<br/> to deliver higher performance of modern CPU.\n99591003f3b86   # Improve performance of row-major-dense-matrix * vector products<br/> for recent CPUs.\n997eb621413c1   # Revert vec/y to vec*(1/y) in row-major TRSM\n10444bbc320468  # Bug 1435: fix aliasing issue in exressions like: A = C - B*A;\n1073624df50945  # Adds missing EIGEN_STRONG_INLINE to support MSVC<br/> properly inlining small vector calculations\n1094d428a199ab  # Bug 1562: optimize evaluation of small products<br/> of the form s*A*B by rewriting them as: s*(A.lazyProduct(B))<br/> to save a costly temporary.<br/> Measured speedup from 2x to 5x.\n1096de9e31a06d  # Introduce the macro ei_declare_local_nested_eval to<br/> help allocating on the stack local temporaries via alloca,<br/> and let outer-products makes a good use of it.\n11087b91c11207  # Bug 1578: Improve prefetching in matrix multiplication on MIPS.\n1153aa110e681b  # PR 526: Speed up multiplication of small, dynamically sized matrices\n11544ad359237a  # Vectorize row-by-row gebp loop iterations on 16 packets as well\n1157a476054879  # Bug 1624: improve matrix-matrix product on ARM 64, 20% speedup\n1160a4159dba08  # do not read buffers out of bounds\n1163c53eececb0  # Implement AVX512 vectorization of std::complex<float/double>\n11644e7746fe22  # Bug 1636: fix gemm performance issue with gcc>=6 and no FMA\n1164956678a4ef  # Bug 1515: disable gebp's 3pX4 micro kernel<br/> for MSVC<=19.14 because of register spilling.\n1165426bce7529  # fix EIGEN_GEBP_2PX4_SPILLING_WORKAROUND<br/> for non vectorized type, and non x86/64 target\n11660d90637838  # enable spilling workaround on architectures with SSE/AVX\n1166f159cf3d75  # Artificially increase l1-blocking size for AVX512.<br/> +10% speedup with current kernels.\n11686dd93f7e3b  # Make code compile again for older compilers.\n1175dbfcceabf5  # Bug: 1633: refactor gebp kernel and optimize for neon\n117670e133333d  # Bug 1661: fix regression in GEBP and AVX512\n11760f028f61cb  # GEBP: cleanup logic to choose between<br/> a 4 packets of 1 packet (=e118ce86fd+fix)\n1180de77bf5d6c  # gebp: Add new ½ and ¼ packet rows per (peeling) round on the lhs\n"
  },
  {
    "path": "3rdparty/eigen3/bench/perf_monitoring/gemm.cpp",
    "content": "#include \"gemm_common.h\"\n\nEIGEN_DONT_INLINE\nvoid gemm(const Mat &A, const Mat &B, Mat &C)\n{\n  C.noalias() += A * B;\n}\n\nint main(int argc, char **argv)\n{\n  return main_gemm(argc, argv, gemm);\n}\n"
  },
  {
    "path": "3rdparty/eigen3/bench/perf_monitoring/gemm_common.h",
    "content": "#include <iostream>\n#include <fstream>\n#include <vector>\n#include <string>\n#include \"eigen_src/Eigen/Core\"\n#include \"../BenchTimer.h\"\nusing namespace Eigen;\n\n#ifndef SCALAR\n#error SCALAR must be defined\n#endif\n\ntypedef SCALAR Scalar;\n\ntypedef Matrix<Scalar,Dynamic,Dynamic> Mat;\n\ntemplate<typename Func>\nEIGEN_DONT_INLINE\ndouble bench(long m, long n, long k, const Func& f)\n{\n  Mat A(m,k);\n  Mat B(k,n);\n  Mat C(m,n);\n  A.setRandom();\n  B.setRandom();\n  C.setZero();\n  \n  BenchTimer t;\n  \n  double up = 1e8*4/sizeof(Scalar);\n  double tm0 = 4, tm1 = 10;\n  if(NumTraits<Scalar>::IsComplex)\n  {\n    up /= 4;\n    tm0 = 2;\n    tm1 = 4;\n  }\n  \n  double flops = 2. * m * n * k;\n  long rep = std::max(1., std::min(100., up/flops) );\n  long tries = std::max(tm0, std::min(tm1, up/flops) );\n  \n  BENCH(t, tries, rep, f(A,B,C));\n  \n  return 1e-9 * rep * flops / t.best();\n}\n\ntemplate<typename Func>\nint main_gemm(int argc, char **argv, const Func& f)\n{\n  std::vector<double> results;\n  \n  std::string filename = std::string(\"gemm_settings.txt\");\n  if(argc>1)\n    filename = std::string(argv[1]);\n  std::ifstream settings(filename);\n  long m, n, k;\n  while(settings >> m >> n >> k)\n  {\n    //std::cerr << \"  Testing \" << m << \" \" << n << \" \" << k << std::endl;\n    results.push_back( bench(m, n, k, f) );\n  }\n  \n  std::cout << RowVectorXd::Map(results.data(), results.size());\n  \n  return 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/bench/perf_monitoring/gemm_settings.txt",
    "content": "8 8 8\n9 9 9\n24 24 24\n239 239 239\n240 240 240\n2400 24 24\n24 2400 24\n24 24 2400\n24 2400 2400\n2400 24 2400\n2400 2400 24\n2400 2400 64\n4800 23 160\n23 4800 160\n2400 2400 2400\n"
  },
  {
    "path": "3rdparty/eigen3/bench/perf_monitoring/gemm_square_settings.txt",
    "content": "8 8 8\n9 9 9\n12 12 12\n15 15 15\n16 16 16\n24 24 24\n102 102 102\n239 239 239\n240 240 240\n2400 2400 2400\n2463 2463 2463\n"
  },
  {
    "path": "3rdparty/eigen3/bench/perf_monitoring/gemv.cpp",
    "content": "#include \"gemv_common.h\"\n\nEIGEN_DONT_INLINE\nvoid gemv(const Mat &A, const Vec &B, Vec &C)\n{\n  C.noalias() += A * B;\n}\n\nint main(int argc, char **argv)\n{\n  return main_gemv(argc, argv, gemv);\n}\n"
  },
  {
    "path": "3rdparty/eigen3/bench/perf_monitoring/gemv_common.h",
    "content": "#include <iostream>\n#include <fstream>\n#include <vector>\n#include <string>\n#include <functional>\n#include \"eigen_src/Eigen/Core\"\n#include \"../BenchTimer.h\"\nusing namespace Eigen;\n\n#ifndef SCALAR\n#error SCALAR must be defined\n#endif\n\ntypedef SCALAR Scalar;\n\ntypedef Matrix<Scalar,Dynamic,Dynamic> Mat;\ntypedef Matrix<Scalar,Dynamic,1>       Vec;\n\ntemplate<typename Func>\nEIGEN_DONT_INLINE\ndouble bench(long m, long n, Func &f)\n{\n  Mat A(m,n);\n  Vec B(n);\n  Vec C(m);\n  A.setRandom();\n  B.setRandom();\n  C.setRandom();\n\n  BenchTimer t;\n\n  double up = 1e8/sizeof(Scalar);\n  double tm0 = 4, tm1 = 10;\n  if(NumTraits<Scalar>::IsComplex)\n  {\n    up /= 4;\n    tm0 = 2;\n    tm1 = 4;\n  }\n\n  double flops = 2. * m * n;\n  long rep = std::max(1., std::min(100., up/flops) );\n  long tries = std::max(tm0, std::min(tm1, up/flops) );\n\n  BENCH(t, tries, rep, f(A,B,C));\n\n  return 1e-9 * rep * flops / t.best();\n}\n\ntemplate<typename Func>\nint main_gemv(int argc, char **argv, Func& f)\n{\n  std::vector<double> results;\n\n  std::string filename = std::string(\"gemv_settings.txt\");\n  if(argc>1)\n    filename = std::string(argv[1]);\n  std::ifstream settings(filename);\n  long m, n;\n  while(settings >> m >> n)\n  {\n    //std::cerr << \"  Testing \" << m << \" \" << n << std::endl;\n    results.push_back( bench(m, n, f) );\n  }\n\n  std::cout << RowVectorXd::Map(results.data(), results.size());\n\n  return 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/bench/perf_monitoring/gemv_settings.txt",
    "content": "8 8\n9 9\n24 24\n239 239\n240 240\n2400 24\n24 2400\n24 240\n2400 2400\n4800 23\n23 4800\n"
  },
  {
    "path": "3rdparty/eigen3/bench/perf_monitoring/gemv_square_settings.txt",
    "content": "8 8\n9 9\n12 12\n15 15\n16 16\n24 24\n53 53\n74 74\n102 102\n239 239\n240 240\n2400 2400\n2463 2463\n"
  },
  {
    "path": "3rdparty/eigen3/bench/perf_monitoring/gemvt.cpp",
    "content": "#include \"gemv_common.h\"\n\nEIGEN_DONT_INLINE\nvoid gemv(const Mat &A, Vec &B, const Vec &C)\n{\n  B.noalias() += A.transpose() * C;\n}\n\nint main(int argc, char **argv)\n{\n  return main_gemv(argc, argv, gemv);\n}\n"
  },
  {
    "path": "3rdparty/eigen3/bench/perf_monitoring/lazy_gemm.cpp",
    "content": "#include <iostream>\n#include <fstream>\n#include <vector>\n#include <Eigen/Core>\n#include \"../../BenchTimer.h\"\nusing namespace Eigen;\n\n#ifndef SCALAR\n#error SCALAR must be defined\n#endif\n\ntypedef SCALAR Scalar;\n\ntemplate<typename MatA, typename MatB, typename MatC>\nEIGEN_DONT_INLINE\nvoid lazy_gemm(const MatA &A, const MatB &B, MatC &C)\n{\n//   escape((void*)A.data());\n//   escape((void*)B.data());\n  C.noalias() += A.lazyProduct(B);\n//   escape((void*)C.data());\n}\n\ntemplate<int m, int n, int k, int TA>\nEIGEN_DONT_INLINE\ndouble bench()\n{\n  typedef Matrix<Scalar,m,k,TA> MatA;\n  typedef Matrix<Scalar,k,n> MatB;\n  typedef Matrix<Scalar,m,n> MatC;\n\n  MatA A(m,k);\n  MatB B(k,n);\n  MatC C(m,n);\n  A.setRandom();\n  B.setRandom();\n  C.setZero();\n\n  BenchTimer t;\n\n  double up = 1e7*4/sizeof(Scalar);\n  double tm0 = 10, tm1 = 20;\n\n  double flops = 2. * m * n * k;\n  long rep = std::max(10., std::min(10000., up/flops) );\n  long tries = std::max(tm0, std::min(tm1, up/flops) );\n\n  BENCH(t, tries, rep, lazy_gemm(A,B,C));\n\n  return 1e-9 * rep * flops / t.best();\n}\n\ntemplate<int m, int n, int k>\ndouble bench_t(int t)\n{\n  if(t)\n    return bench<m,n,k,RowMajor>();\n  else\n    return bench<m,n,k,0>();\n}\n\nEIGEN_DONT_INLINE\ndouble bench_mnk(int m, int n, int k, int t)\n{\n  int id = m*10000 + n*100 + k;\n  switch(id) {\n    case  10101 : return bench_t< 1, 1, 1>(t); break;\n    case  20202 : return bench_t< 2, 2, 2>(t); break;\n    case  30303 : return bench_t< 3, 3, 3>(t); break;\n    case  40404 : return bench_t< 4, 4, 4>(t); break;\n    case  50505 : return bench_t< 5, 5, 5>(t); break;\n    case  60606 : return bench_t< 6, 6, 6>(t); break;\n    case  70707 : return bench_t< 7, 7, 7>(t); break;\n    case  80808 : return bench_t< 8, 8, 8>(t); break;\n    case  90909 : return bench_t< 9, 9, 9>(t); break;\n    case 101010 : return bench_t<10,10,10>(t); break;\n    case 111111 : return bench_t<11,11,11>(t); break;\n    case 121212 : return bench_t<12,12,12>(t); break;\n  }\n  return 0;\n}\n\nint main(int argc, char **argv)\n{\n  std::vector<double> results;\n  \n  std::string filename = std::string(\"lazy_gemm_settings.txt\");\n  if(argc>1)\n    filename = std::string(argv[1]);\n  std::ifstream settings(filename);\n  long m, n, k, t;\n  while(settings >> m >> n >> k >> t)\n  {\n    //std::cerr << \"  Testing \" << m << \" \" << n << \" \" << k << std::endl;\n    results.push_back( bench_mnk(m, n, k, t) );\n  }\n  \n  std::cout << RowVectorXd::Map(results.data(), results.size());\n  \n  return 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/bench/perf_monitoring/lazy_gemm_settings.txt",
    "content": "1 1 1 0\n2 2 2 0\n3 3 3 0\n4 4 4 0\n4 4 4 1\n5 5 5 0\n6 6 6 0\n7 7 7 0\n7 7 7 1\n8 8 8 0\n9 9 9 0\n10 10 10 0\n11 11 11 0\n12 12 12 0\n12 12 12 1\n"
  },
  {
    "path": "3rdparty/eigen3/bench/perf_monitoring/llt.cpp",
    "content": "#include \"gemm_common.h\"\n#include <Eigen/Cholesky>\n\nEIGEN_DONT_INLINE\nvoid llt(const Mat &A, const Mat &B, Mat &C)\n{\n  C = A;\n  C.diagonal().array() += 1000;\n  Eigen::internal::llt_inplace<Mat::Scalar, Lower>::blocked(C);\n}\n\nint main(int argc, char **argv)\n{\n  return main_gemm(argc, argv, llt);\n}\n"
  },
  {
    "path": "3rdparty/eigen3/bench/perf_monitoring/make_plot.sh",
    "content": "#!/bin/bash\n\n# base name of the bench\n# it reads $1.out\n# and generates $1.pdf\nWHAT=$1\nbench=$2\nsettings_file=$3\n\nheader=\"rev \"\nwhile read line\ndo\n  if [ ! -z '$line' ]; then\n    header=\"$header  \\\"$line\\\"\"\n  fi\ndone < $settings_file\n\necho $header > $WHAT.out.header\ncat $WHAT.out >> $WHAT.out.header\n\n\necho \"set title '$WHAT'\" > $WHAT.gnuplot\necho \"set key autotitle columnhead outside \" >> $WHAT.gnuplot\necho \"set xtics rotate 1\" >> $WHAT.gnuplot\n\necho \"set term pdf color rounded enhanced fontscale 0.35 size 7in,5in\" >> $WHAT.gnuplot\necho set output \"'\"$WHAT.pdf\"'\" >> $WHAT.gnuplot\n\ncol=`cat $settings_file | wc -l`\necho \"plot for [col=2:$col+1] '$WHAT.out.header' using 0:col:xticlabels(1) with lines\" >> $WHAT.gnuplot\necho \" \" >>  $WHAT.gnuplot\n\ngnuplot -persist < $WHAT.gnuplot\n\n# generate a png file (thumbnail)\nconvert -colors 256 -background white -density 300 -resize 300  -quality 0 $WHAT.pdf -background white -flatten $WHAT.png\n\n# clean\nrm $WHAT.out.header $WHAT.gnuplot\n\n\n# generate html/svg graph\n\necho \" \" > $WHAT.html\ncat resources/chart_header.html > $WHAT.html\necho 'var customSettings = {\"TITLE\":\"\",\"SUBTITLE\":\"\",\"XLABEL\":\"\",\"YLABEL\":\"\"};' >> $WHAT.html\n#  'data' is an array of datasets (i.e. curves), each of which is an object of the form\n#  {\n#    key: <name of the curve>,\n#    color: <optional color of the curve>,\n#    values: [{\n#        r: <revision number>,\n#        v: <GFlops>\n#    }]\n#  }\necho 'var data = [' >> $WHAT.html\n\ncol=2\nwhile read line\ndo\n  if [ ! -z '$line' ]; then\n    header=\"$header  \\\"$line\\\"\"\n    echo '{\"key\":\"'$line'\",\"values\":[' >> $WHAT.html\n    i=0\n    while read line2\n    do\n      if [ ! -z \"$line2\" ]; then\n        val=`echo $line2 | cut -s -f $col -d ' '`\n        if [ -n \"$val\" ]; then # skip build failures\n          echo '{\"r\":'$i',\"v\":'$val'},' >> $WHAT.html\n        fi\n      fi\n      ((i++))\n    done < $WHAT.out\n    echo ']},'  >> $WHAT.html\n  fi\n  ((col++))\ndone < $settings_file\necho '];'  >> $WHAT.html\n\necho 'var changesets = [' >> $WHAT.html\nwhile read line2\ndo\n  if [ ! -z '$line2' ]; then\n    echo '\"'`echo $line2 | cut -f 1 -d ' '`'\",' >> $WHAT.html\n  fi\ndone < $WHAT.out\necho '];'  >> $WHAT.html\n\necho 'var changesets_details = [' >> $WHAT.html\nwhile read line2\ndo\n  if [ ! -z '$line2' ]; then\n    num=`echo \"$line2\" | cut -f 1 -d ' '`\n    comment=`grep \":$num\" changesets.txt | cut -f 2 -d '#'`\n    echo '\"'\"$comment\"'\",' >> $WHAT.html\n  fi\ndone < $WHAT.out\necho '];'  >> $WHAT.html\n\necho 'var changesets_count = [' >> $WHAT.html\ni=0\nwhile read line2\ndo\n  if [ ! -z '$line2' ]; then\n    echo $i ',' >> $WHAT.html\n  fi\n  ((i++))\ndone < $WHAT.out\necho '];'  >> $WHAT.html\n\ncat resources/chart_footer.html >> $WHAT.html\n"
  },
  {
    "path": "3rdparty/eigen3/bench/perf_monitoring/resources/chart_footer.html",
    "content": "      /* setup the chart and its options */                                                                                \n      var chart = nv.models.lineChart()                                                                                    \n                    .color(d3.scale.category10().range())                                                                  \n                    .margin({left: 75, bottom: 100})                                                                        \n                    .forceX([0]).forceY([0]);                                                                              \n                                                                                                                           \n      chart.x(function(datum){ return datum.r; })                                                                          \n           .xAxis.options({                                                                                                \n             axisLabel: customSettings.XLABEL || 'Changeset',\n             tickFormat: d3.format('.0f')                                                                                  \n           });\n      chart.xAxis\n        .tickValues(changesets_count)\n        .tickFormat(function(d){return changesets[d]})\n        .rotateLabels(-90);\n                                                                                                                                                                                                       \n      chart.y(function(datum){ return datum.v; })                                                    \n            .yAxis.options({                                                                                              \n              axisLabel: customSettings.YLABEL || 'GFlops'/*,\n              tickFormat: function(val){ return d3.format('.0f')(val) + ' GFlops'; }*/\n            });\n      \n      chart.tooltip.headerFormatter(function(d) { return changesets[d]\n        + ' <p style=\"font-weight:normal;text-align: left;\">'\n        + changesets_details[d] + \"</p>\"; });\n\n      //chart.useInteractiveGuideline(true);\n      d3.select('#chart').datum(data).call(chart);                                                                         \n      var plot = d3.select('#chart > g');                                                                                  \n                                                                                                                           \n      /* setup the title */                                                                                                \n      plot.append('text')                                                                                                  \n          .style('font-size', '24px')                                                                                      \n          .attr('text-anchor', 'middle').attr('x', '50%').attr('y', '20px')                                                \n          .text(customSettings.TITLE || '');                                                                                                                   \n                                                                                                                           \n      /* ensure the chart is responsive */                                                                                 \n      nv.utils.windowResize(chart.update);                                                                                 \n    </script>                                                                                                              \n  </body>                                                                                                                  \n</html>  \n"
  },
  {
    "path": "3rdparty/eigen3/bench/perf_monitoring/resources/chart_header.html",
    "content": "\n<!DOCTYPE html>                                                                                                            \n<html>                                                                                                                     \n  <head>                                                                                                                   \n    <meta charset='utf-8'>                                                                                                 \n    <style>.nvd3 .nv-axis line,.nvd3 .nv-axis path{fill:none;shape-rendering:crispEdges}.nv-brush .extent,.nvd3 .background path,.nvd3 .nv-axis line,.nvd3 .nv-axis path{shape-rendering:crispEdges}.nv-distx,.nv-disty,.nv-noninteractive,.nvd3 .nv-axis,.nvd3.nv-pie .nv-label,.nvd3.nv-sparklineplus g.nv-hoverValue{pointer-events:none}.nvtooltip,svg.nvd3-svg{display:block;-webkit-touch-callout:none;-khtml-user-select:none}.nvd3 .nv-axis{opacity:1}.nvd3 .nv-axis.nv-disabled,.nvd3 .nv-controlsWrap .nv-legend .nv-check-box .nv-check{opacity:0}.nvd3 .nv-axis path{stroke:#000;stroke-opacity:.75}.nvd3 .nv-axis path.domain{stroke-opacity:.75}.nvd3 .nv-axis.nv-x path.domain{stroke-opacity:0}.nvd3 .nv-axis line{stroke:#e5e5e5}.nvd3 .nv-axis .zero line, .nvd3 .nv-axis line.zero{stroke-opacity:.75}.nvd3 .nv-axis .nv-axisMaxMin text{font-weight:700}.nvd3 .x .nv-axis .nv-axisMaxMin text,.nvd3 .x2 .nv-axis .nv-axisMaxMin text,.nvd3 .x3 .nv-axis .nv-axisMaxMin text{text-anchor:middle}.nvd3 .nv-bars rect{fill-opacity:.75;transition:fill-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear}.nvd3 .nv-bars rect.hover{fill-opacity:1}.nvd3 .nv-bars .hover rect{fill:#add8e6}.nvd3 .nv-bars text{fill:transparent}.nvd3 .nv-bars .hover text{fill:rgba(0,0,0,1)}.nvd3 .nv-discretebar .nv-groups rect,.nvd3 .nv-multibar .nv-groups rect,.nvd3 .nv-multibarHorizontal .nv-groups rect{stroke-opacity:0;transition:fill-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear}.nvd3 .nv-candlestickBar .nv-ticks rect:hover,.nvd3 .nv-discretebar .nv-groups rect:hover,.nvd3 .nv-multibar .nv-groups rect:hover,.nvd3 .nv-multibarHorizontal .nv-groups rect:hover{fill-opacity:1}.nvd3 .nv-discretebar .nv-groups text,.nvd3 .nv-multibarHorizontal .nv-groups text{font-weight:700;fill:rgba(0,0,0,1);stroke:transparent}.nvd3 .nv-boxplot circle{fill-opacity:.5}.nvd3 .nv-boxplot circle:hover,.nvd3 .nv-boxplot rect:hover{fill-opacity:1}.nvd3 line.nv-boxplot-median{stroke:#000}.nv-boxplot-tick:hover{stroke-width:2.5px}.nvd3.nv-bullet{font:10px sans-serif}.nvd3.nv-bullet .nv-measure{fill-opacity:.8}.nvd3.nv-bullet .nv-measure:hover{fill-opacity:1}.nvd3.nv-bullet .nv-marker{stroke:#000;stroke-width:2px}.nvd3.nv-bullet .nv-markerTriangle{stroke:#000;fill:#fff;stroke-width:1.5px}.nvd3.nv-bullet .nv-markerLine{stroke:#000;stroke-width:1.5px}.nvd3.nv-bullet .nv-tick line{stroke:#666;stroke-width:.5px}.nvd3.nv-bullet .nv-range.nv-s0{fill:#eee}.nvd3.nv-bullet .nv-range.nv-s1{fill:#ddd}.nvd3.nv-bullet .nv-range.nv-s2{fill:#ccc}.nvd3.nv-bullet .nv-title{font-size:14px;font-weight:700}.nvd3.nv-bullet .nv-subtitle{fill:#999}.nvd3.nv-bullet .nv-range{fill:#bababa;fill-opacity:.4}.nvd3.nv-bullet .nv-range:hover{fill-opacity:.7}.nvd3.nv-candlestickBar .nv-ticks .nv-tick{stroke-width:1px}.nvd3.nv-candlestickBar .nv-ticks .nv-tick.hover{stroke-width:2px}.nvd3.nv-candlestickBar .nv-ticks .nv-tick.positive rect{stroke:#2ca02c;fill:#2ca02c}.nvd3.nv-candlestickBar .nv-ticks .nv-tick.negative rect{stroke:#d62728;fill:#d62728}.with-transitions .nv-candlestickBar .nv-ticks .nv-tick{transition:stroke-width 250ms linear,stroke-opacity 250ms linear;-moz-transition:stroke-width 250ms linear,stroke-opacity 250ms linear;-webkit-transition:stroke-width 250ms linear,stroke-opacity 250ms linear}.nvd3.nv-candlestickBar .nv-ticks line{stroke:#333}.nv-force-node{stroke:#fff;stroke-width:1.5px}.nv-force-link{stroke:#999;stroke-opacity:.6}.nv-force-node text{stroke-width:0}.nvd3 .nv-check-box .nv-box{fill-opacity:0;stroke-width:2}.nvd3 .nv-check-box .nv-check{fill-opacity:0;stroke-width:4}.nvd3 .nv-series.nv-disabled .nv-check-box .nv-check{fill-opacity:0;stroke-opacity:0}.nvd3.nv-linePlusBar .nv-bar rect{fill-opacity:.75}.nvd3.nv-linePlusBar .nv-bar rect:hover{fill-opacity:1}.nvd3 .nv-groups path.nv-line{fill:none}.nvd3 .nv-groups path.nv-area{stroke:none}.nvd3.nv-line .nvd3.nv-scatter .nv-groups .nv-point{fill-opacity:0;stroke-opacity:0}.nvd3.nv-scatter.nv-single-point .nv-groups .nv-point{fill-opacity:.5!important;stroke-opacity:.5!important}.with-transitions .nvd3 .nv-groups .nv-point{transition:stroke-width 250ms linear,stroke-opacity 250ms linear;-moz-transition:stroke-width 250ms linear,stroke-opacity 250ms linear;-webkit-transition:stroke-width 250ms linear,stroke-opacity 250ms linear}.nvd3 .nv-groups .nv-point.hover,.nvd3.nv-scatter .nv-groups .nv-point.hover{stroke-width:7px;fill-opacity:.95!important;stroke-opacity:.95!important}.nvd3 .nv-point-paths path{stroke:#aaa;stroke-opacity:0;fill:#eee;fill-opacity:0}.nvd3 .nv-indexLine{cursor:ew-resize}svg.nvd3-svg{-webkit-user-select:none;-ms-user-select:none;-moz-user-select:none;user-select:none;width:100%;height:100%}.nvtooltip.with-3d-shadow,.with-3d-shadow .nvtooltip{-moz-box-shadow:0 5px 10px rgba(0,0,0,.2);-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.nvd3 text{font:400 12px Arial}.nvd3 .title{font:700 14px Arial}.nvd3 .nv-background{fill:#fff;fill-opacity:0}.nvd3.nv-noData{font-size:18px;font-weight:700}.nv-brush .extent{fill-opacity:.125}.nv-brush .resize path{fill:#eee;stroke:#666}.nvd3 .nv-legend .nv-series{cursor:pointer}.nvd3 .nv-legend .nv-disabled circle{fill-opacity:0}.nvd3 .nv-brush .extent{fill-opacity:0!important}.nvd3 .nv-brushBackground rect{stroke:#000;stroke-width:.4;fill:#fff;fill-opacity:.7}@media print{.nvd3 text{stroke-width:0;fill-opacity:1}}.nvd3.nv-ohlcBar .nv-ticks .nv-tick{stroke-width:1px}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.hover{stroke-width:2px}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.positive{stroke:#2ca02c}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.negative{stroke:#d62728}.nvd3 .background path{fill:none;stroke:#EEE;stroke-opacity:.4}.nvd3 .foreground path{fill:none;stroke-opacity:.7}.nvd3 .nv-parallelCoordinates-brush .extent{fill:#fff;fill-opacity:.6;stroke:gray;shape-rendering:crispEdges}.nvd3 .nv-parallelCoordinates .hover{fill-opacity:1;stroke-width:3px}.nvd3 .missingValuesline line{fill:none;stroke:#000;stroke-width:1;stroke-opacity:1;stroke-dasharray:5,5}.nvd3.nv-pie .nv-pie-title{font-size:24px;fill:rgba(19,196,249,.59)}.nvd3.nv-pie .nv-slice text{stroke:#000;stroke-width:0}.nvd3.nv-pie path{transition:fill-opacity 250ms linear,stroke-width 250ms linear,stroke-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear,stroke-width 250ms linear,stroke-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear,stroke-width 250ms linear,stroke-opacity 250ms linear;stroke:#fff;stroke-width:1px;stroke-opacity:1;fill-opacity:.7}.nvd3.nv-pie .hover path{fill-opacity:1}.nvd3.nv-pie .nv-label rect{fill-opacity:0;stroke-opacity:0}.nvd3 .nv-groups .nv-point.hover{stroke-width:20px;stroke-opacity:.5}.nvd3 .nv-scatter .nv-point.hover{fill-opacity:1}.nvd3.nv-sparkline path{fill:none}.nvd3.nv-sparklineplus .nv-hoverValue line{stroke:#333;stroke-width:1.5px}.nvd3.nv-sparklineplus,.nvd3.nv-sparklineplus g{pointer-events:all}.nvd3 .nv-interactiveGuideLine,.nvtooltip{pointer-events:none}.nvd3 .nv-hoverArea{fill-opacity:0;stroke-opacity:0}.nvd3.nv-sparklineplus .nv-xValue,.nvd3.nv-sparklineplus .nv-yValue{stroke-width:0;font-size:.9em;font-weight:400}.nvd3.nv-sparklineplus .nv-yValue{stroke:#f66}.nvd3.nv-sparklineplus .nv-maxValue{stroke:#2ca02c;fill:#2ca02c}.nvd3.nv-sparklineplus .nv-minValue{stroke:#d62728;fill:#d62728}.nvd3.nv-sparklineplus .nv-currentValue{font-weight:700;font-size:1.1em}.nvtooltip h3,.nvtooltip table td.key{font-weight:400}.nvd3.nv-stackedarea path.nv-area{fill-opacity:.7;stroke-opacity:0;transition:fill-opacity 250ms linear,stroke-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear,stroke-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear,stroke-opacity 250ms linear}.nvd3.nv-stackedarea path.nv-area.hover{fill-opacity:.9}.nvd3.nv-stackedarea .nv-groups .nv-point{stroke-opacity:0;fill-opacity:0}.nvtooltip{position:absolute;color:rgba(0,0,0,1);padding:1px;z-index:10000;font-family:Arial;font-size:13px;text-align:left;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background:rgba(255,255,255,.8);border:1px solid rgba(0,0,0,.5);border-radius:4px}.nvtooltip h3,.nvtooltip p{margin:0;text-align:center}.nvtooltip.with-transitions,.with-transitions .nvtooltip{transition:opacity 50ms linear;-moz-transition:opacity 50ms linear;-webkit-transition:opacity 50ms linear;transition-delay:200ms;-moz-transition-delay:200ms;-webkit-transition-delay:200ms}.nvtooltip.x-nvtooltip,.nvtooltip.y-nvtooltip{padding:8px}.nvtooltip h3{padding:4px 14px;line-height:18px;background-color:rgba(247,247,247,.75);color:rgba(0,0,0,1);border-bottom:1px solid #ebebeb;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}.nvtooltip p{padding:5px 14px}.nvtooltip span{display:inline-block;margin:2px 0}.nvtooltip table{margin:6px;border-spacing:0}.nvtooltip table td{padding:2px 9px 2px 0;vertical-align:middle}.nvtooltip table td.key.total{font-weight:700}.nvtooltip table td.value{text-align:right;font-weight:700}.nvtooltip table td.percent{color:#a9a9a9}.nvtooltip table tr.highlight td{padding:1px 9px 1px 0;border-bottom-style:solid;border-bottom-width:1px;border-top-style:solid;border-top-width:1px}.nvtooltip table td.legend-color-guide div{vertical-align:middle;width:12px;height:12px;border:1px solid #999}.nvtooltip .footer{padding:3px;text-align:center}.nvtooltip-pending-removal{pointer-events:none;display:none}.nvd3 line.nv-guideline{stroke:#ccc}</style>                                                             \n    <style>                                                                                                                \n      * {                                                                                                                  \n        box-sizing: border-box;                                                                                            \n      }                                                                                                                    \n      html, body {                                                                                                         \n        position: relative;                                                                                                \n        height: 100%;                                                                                                      \n        width: 100%;                                                                                                       \n        border: 0;                                                                                                         \n        margin: 0;                                                                                                         \n        padding: 0;                                                                                                        \n        font-size: 0;                                                                                                      \n      }                                                                                                                    \n      svg g {                                                                                                              \n        clip-path: none;                                                                                                   \n      }                                                                                                                    \n      svg text {                                                                                                           \n        fill: #333;                                                                                                        \n      }                                                                                                                    \n      .nv-axislabel {                                                                                                      \n        font-size: 16px !important;                                                                                        \n      }                                                                                                                    \n      .control {                                                                                                           \n        cursor: pointer;                                                                                                   \n        visibility: hidden;                                                                                                \n        pointer-events: visible;                                                                                           \n      }                                                                                                                    \n      @media (min-width: 768px) {                                                                                          \n        .control {                                                                                                         \n          visibility: visible;                                                                                             \n        }                                                                                                                  \n      }                                                                                                                    \n    </style>                                                                                                               \n    <script src=\"s1.js\"></script>                                                              \n    <script src=\"s2.js\"></script>                                                            \n  </head>                                                                                                                  \n  <body>                                                                                                                   \n    <svg id='chart'></svg> \n    <script type='text/javascript'>\n"
  },
  {
    "path": "3rdparty/eigen3/bench/perf_monitoring/resources/footer.html",
    "content": "</table>\n</body>\n</html>\n"
  },
  {
    "path": "3rdparty/eigen3/bench/perf_monitoring/resources/header.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n<title>Eigen performance monitoring</title>\n<style type=\"text/css\">\n\nbody\n{\n background:#fff;\n}\nth {\n\n}\nimg\n{\n width:auto;\n box-shadow:0px 0px 20px #cecece;\n margin: 20px 20px  20px  20px;\n  -moz-transform: scale(1);\n -moz-transition-duration: 0.4s;\n -webkit-transition-duration: 0.4s;\n -webkit-transform: scale(1);\n\n -ms-transform: scale(1);\n -ms-transition-duration: 0.4s;\n}\nimg:hover\n{\nbox-shadow: 5px 5px 20px #dcdcdc;\n -moz-transform: scale(1.1);\n -moz-transition-duration: 0.4s;\n -webkit-transition-duration: 0.4s;\n -webkit-transform: scale(1.1);\n\n -ms-transform: scale(1.1);\n -ms-transition-duration: 0.4s;\n\n}\n</style>\n</head>\n<body>\n"
  },
  {
    "path": "3rdparty/eigen3/bench/perf_monitoring/resources/s1.js",
    "content": "!function(){function n(n){return n&&(n.ownerDocument||n.document||n).documentElement}function t(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}function e(n,t){return t>n?-1:n>t?1:n>=t?0:NaN}function r(n){return null===n?NaN:+n}function i(n){return!isNaN(n)}function u(n){return{left:function(t,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);i>r;){var u=r+i>>>1;n(t[u],e)<0?r=u+1:i=u}return r},right:function(t,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);i>r;){var u=r+i>>>1;n(t[u],e)>0?i=u:r=u+1}return r}}}function o(n){return n.length}function a(n){for(var t=1;n*t%1;)t*=10;return t}function l(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function c(){this._=Object.create(null)}function f(n){return(n+=\"\")===bo||n[0]===_o?_o+n:n}function s(n){return(n+=\"\")[0]===_o?n.slice(1):n}function h(n){return f(n)in this._}function p(n){return(n=f(n))in this._&&delete this._[n]}function g(){var n=[];for(var t in this._)n.push(s(t));return n}function v(){var n=0;for(var t in this._)++n;return n}function d(){for(var n in this._)return!1;return!0}function y(){this._=Object.create(null)}function m(n){return n}function M(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function x(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=wo.length;r>e;++e){var i=wo[e]+t;if(i in n)return i}}function b(){}function _(){}function w(n){function t(){for(var t,r=e,i=-1,u=r.length;++i<u;)(t=r[i].on)&&t.apply(this,arguments);return n}var e=[],r=new c;return t.on=function(t,i){var u,o=r.get(t);return arguments.length<2?o&&o.on:(o&&(o.on=null,e=e.slice(0,u=e.indexOf(o)).concat(e.slice(u+1)),r.remove(t)),i&&e.push(r.set(t,{on:i})),n)},t}function S(){ao.event.preventDefault()}function k(){for(var n,t=ao.event;n=t.sourceEvent;)t=n;return t}function N(n){for(var t=new _,e=0,r=arguments.length;++e<r;)t[arguments[e]]=w(t);return t.of=function(e,r){return function(i){try{var u=i.sourceEvent=ao.event;i.target=n,ao.event=i,t[i.type].apply(e,r)}finally{ao.event=u}}},t}function E(n){return ko(n,Co),n}function A(n){return\"function\"==typeof n?n:function(){return No(n,this)}}function C(n){return\"function\"==typeof n?n:function(){return Eo(n,this)}}function z(n,t){function e(){this.removeAttribute(n)}function r(){this.removeAttributeNS(n.space,n.local)}function i(){this.setAttribute(n,t)}function u(){this.setAttributeNS(n.space,n.local,t)}function o(){var e=t.apply(this,arguments);null==e?this.removeAttribute(n):this.setAttribute(n,e)}function a(){var e=t.apply(this,arguments);null==e?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,e)}return n=ao.ns.qualify(n),null==t?n.local?r:e:\"function\"==typeof t?n.local?a:o:n.local?u:i}function L(n){return n.trim().replace(/\\s+/g,\" \")}function q(n){return new RegExp(\"(?:^|\\\\s+)\"+ao.requote(n)+\"(?:\\\\s+|$)\",\"g\")}function T(n){return(n+\"\").trim().split(/^|\\s+/)}function R(n,t){function e(){for(var e=-1;++e<i;)n[e](this,t)}function r(){for(var e=-1,r=t.apply(this,arguments);++e<i;)n[e](this,r)}n=T(n).map(D);var i=n.length;return\"function\"==typeof t?r:e}function D(n){var t=q(n);return function(e,r){if(i=e.classList)return r?i.add(n):i.remove(n);var i=e.getAttribute(\"class\")||\"\";r?(t.lastIndex=0,t.test(i)||e.setAttribute(\"class\",L(i+\" \"+n))):e.setAttribute(\"class\",L(i.replace(t,\" \")))}}function P(n,t,e){function r(){this.style.removeProperty(n)}function i(){this.style.setProperty(n,t,e)}function u(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(n):this.style.setProperty(n,r,e)}return null==t?r:\"function\"==typeof t?u:i}function U(n,t){function e(){delete this[n]}function r(){this[n]=t}function i(){var e=t.apply(this,arguments);null==e?delete this[n]:this[n]=e}return null==t?e:\"function\"==typeof t?i:r}function j(n){function t(){var t=this.ownerDocument,e=this.namespaceURI;return e===zo&&t.documentElement.namespaceURI===zo?t.createElement(n):t.createElementNS(e,n)}function e(){return this.ownerDocument.createElementNS(n.space,n.local)}return\"function\"==typeof n?n:(n=ao.ns.qualify(n)).local?e:t}function F(){var n=this.parentNode;n&&n.removeChild(this)}function H(n){return{__data__:n}}function O(n){return function(){return Ao(this,n)}}function I(n){return arguments.length||(n=e),function(t,e){return t&&e?n(t.__data__,e.__data__):!t-!e}}function Y(n,t){for(var e=0,r=n.length;r>e;e++)for(var i,u=n[e],o=0,a=u.length;a>o;o++)(i=u[o])&&t(i,o,e);return n}function Z(n){return ko(n,qo),n}function V(n){var t,e;return function(r,i,u){var o,a=n[u].update,l=a.length;for(u!=e&&(e=u,t=0),i>=t&&(t=i+1);!(o=a[t])&&++t<l;);return o}}function X(n,t,e){function r(){var t=this[o];t&&(this.removeEventListener(n,t,t.$),delete this[o])}function i(){var i=l(t,co(arguments));r.call(this),this.addEventListener(n,this[o]=i,i.$=e),i._=t}function u(){var t,e=new RegExp(\"^__on([^.]+)\"+ao.requote(n)+\"$\");for(var r in this)if(t=r.match(e)){var i=this[r];this.removeEventListener(t[1],i,i.$),delete this[r]}}var o=\"__on\"+n,a=n.indexOf(\".\"),l=$;a>0&&(n=n.slice(0,a));var c=To.get(n);return c&&(n=c,l=B),a?t?i:r:t?b:u}function $(n,t){return function(e){var r=ao.event;ao.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{ao.event=r}}}function B(n,t){var e=$(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function W(e){var r=\".dragsuppress-\"+ ++Do,i=\"click\"+r,u=ao.select(t(e)).on(\"touchmove\"+r,S).on(\"dragstart\"+r,S).on(\"selectstart\"+r,S);if(null==Ro&&(Ro=\"onselectstart\"in e?!1:x(e.style,\"userSelect\")),Ro){var o=n(e).style,a=o[Ro];o[Ro]=\"none\"}return function(n){if(u.on(r,null),Ro&&(o[Ro]=a),n){var t=function(){u.on(i,null)};u.on(i,function(){S(),t()},!0),setTimeout(t,0)}}}function J(n,e){e.changedTouches&&(e=e.changedTouches[0]);var r=n.ownerSVGElement||n;if(r.createSVGPoint){var i=r.createSVGPoint();if(0>Po){var u=t(n);if(u.scrollX||u.scrollY){r=ao.select(\"body\").append(\"svg\").style({position:\"absolute\",top:0,left:0,margin:0,padding:0,border:\"none\"},\"important\");var o=r[0][0].getScreenCTM();Po=!(o.f||o.e),r.remove()}}return Po?(i.x=e.pageX,i.y=e.pageY):(i.x=e.clientX,i.y=e.clientY),i=i.matrixTransform(n.getScreenCTM().inverse()),[i.x,i.y]}var a=n.getBoundingClientRect();return[e.clientX-a.left-n.clientLeft,e.clientY-a.top-n.clientTop]}function G(){return ao.event.changedTouches[0].identifier}function K(n){return n>0?1:0>n?-1:0}function Q(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function nn(n){return n>1?0:-1>n?Fo:Math.acos(n)}function tn(n){return n>1?Io:-1>n?-Io:Math.asin(n)}function en(n){return((n=Math.exp(n))-1/n)/2}function rn(n){return((n=Math.exp(n))+1/n)/2}function un(n){return((n=Math.exp(2*n))-1)/(n+1)}function on(n){return(n=Math.sin(n/2))*n}function an(){}function ln(n,t,e){return this instanceof ln?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof ln?new ln(n.h,n.s,n.l):_n(\"\"+n,wn,ln):new ln(n,t,e)}function cn(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?u+(o-u)*n/60:180>n?o:240>n?u+(o-u)*(240-n)/60:u}function i(n){return Math.round(255*r(n))}var u,o;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,o=.5>=e?e*(1+t):e+t-e*t,u=2*e-o,new mn(i(n+120),i(n),i(n-120))}function fn(n,t,e){return this instanceof fn?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof fn?new fn(n.h,n.c,n.l):n instanceof hn?gn(n.l,n.a,n.b):gn((n=Sn((n=ao.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new fn(n,t,e)}function sn(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new hn(e,Math.cos(n*=Yo)*t,Math.sin(n)*t)}function hn(n,t,e){return this instanceof hn?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof hn?new hn(n.l,n.a,n.b):n instanceof fn?sn(n.h,n.c,n.l):Sn((n=mn(n)).r,n.g,n.b):new hn(n,t,e)}function pn(n,t,e){var r=(n+16)/116,i=r+t/500,u=r-e/200;return i=vn(i)*na,r=vn(r)*ta,u=vn(u)*ea,new mn(yn(3.2404542*i-1.5371385*r-.4985314*u),yn(-.969266*i+1.8760108*r+.041556*u),yn(.0556434*i-.2040259*r+1.0572252*u))}function gn(n,t,e){return n>0?new fn(Math.atan2(e,t)*Zo,Math.sqrt(t*t+e*e),n):new fn(NaN,NaN,n)}function vn(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function dn(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function yn(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function mn(n,t,e){return this instanceof mn?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof mn?new mn(n.r,n.g,n.b):_n(\"\"+n,mn,cn):new mn(n,t,e)}function Mn(n){return new mn(n>>16,n>>8&255,255&n)}function xn(n){return Mn(n)+\"\"}function bn(n){return 16>n?\"0\"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function _n(n,t,e){var r,i,u,o=0,a=0,l=0;if(r=/([a-z]+)\\((.*)\\)/.exec(n=n.toLowerCase()))switch(i=r[2].split(\",\"),r[1]){case\"hsl\":return e(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case\"rgb\":return t(Nn(i[0]),Nn(i[1]),Nn(i[2]))}return(u=ua.get(n))?t(u.r,u.g,u.b):(null==n||\"#\"!==n.charAt(0)||isNaN(u=parseInt(n.slice(1),16))||(4===n.length?(o=(3840&u)>>4,o=o>>4|o,a=240&u,a=a>>4|a,l=15&u,l=l<<4|l):7===n.length&&(o=(16711680&u)>>16,a=(65280&u)>>8,l=255&u)),t(o,a,l))}function wn(n,t,e){var r,i,u=Math.min(n/=255,t/=255,e/=255),o=Math.max(n,t,e),a=o-u,l=(o+u)/2;return a?(i=.5>l?a/(o+u):a/(2-o-u),r=n==o?(t-e)/a+(e>t?6:0):t==o?(e-n)/a+2:(n-t)/a+4,r*=60):(r=NaN,i=l>0&&1>l?0:r),new ln(r,i,l)}function Sn(n,t,e){n=kn(n),t=kn(t),e=kn(e);var r=dn((.4124564*n+.3575761*t+.1804375*e)/na),i=dn((.2126729*n+.7151522*t+.072175*e)/ta),u=dn((.0193339*n+.119192*t+.9503041*e)/ea);return hn(116*i-16,500*(r-i),200*(i-u))}function kn(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Nn(n){var t=parseFloat(n);return\"%\"===n.charAt(n.length-1)?Math.round(2.55*t):t}function En(n){return\"function\"==typeof n?n:function(){return n}}function An(n){return function(t,e,r){return 2===arguments.length&&\"function\"==typeof e&&(r=e,e=null),Cn(t,e,n,r)}}function Cn(n,t,e,r){function i(){var n,t=l.status;if(!t&&Ln(l)||t>=200&&300>t||304===t){try{n=e.call(u,l)}catch(r){return void o.error.call(u,r)}o.load.call(u,n)}else o.error.call(u,l)}var u={},o=ao.dispatch(\"beforesend\",\"progress\",\"load\",\"error\"),a={},l=new XMLHttpRequest,c=null;return!this.XDomainRequest||\"withCredentials\"in l||!/^(http(s)?:)?\\/\\//.test(n)||(l=new XDomainRequest),\"onload\"in l?l.onload=l.onerror=i:l.onreadystatechange=function(){l.readyState>3&&i()},l.onprogress=function(n){var t=ao.event;ao.event=n;try{o.progress.call(u,l)}finally{ao.event=t}},u.header=function(n,t){return n=(n+\"\").toLowerCase(),arguments.length<2?a[n]:(null==t?delete a[n]:a[n]=t+\"\",u)},u.mimeType=function(n){return arguments.length?(t=null==n?null:n+\"\",u):t},u.responseType=function(n){return arguments.length?(c=n,u):c},u.response=function(n){return e=n,u},[\"get\",\"post\"].forEach(function(n){u[n]=function(){return u.send.apply(u,[n].concat(co(arguments)))}}),u.send=function(e,r,i){if(2===arguments.length&&\"function\"==typeof r&&(i=r,r=null),l.open(e,n,!0),null==t||\"accept\"in a||(a.accept=t+\",*/*\"),l.setRequestHeader)for(var f in a)l.setRequestHeader(f,a[f]);return null!=t&&l.overrideMimeType&&l.overrideMimeType(t),null!=c&&(l.responseType=c),null!=i&&u.on(\"error\",i).on(\"load\",function(n){i(null,n)}),o.beforesend.call(u,l),l.send(null==r?null:r),u},u.abort=function(){return l.abort(),u},ao.rebind(u,o,\"on\"),null==r?u:u.get(zn(r))}function zn(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function Ln(n){var t=n.responseType;return t&&\"text\"!==t?n.response:n.responseText}function qn(n,t,e){var r=arguments.length;2>r&&(t=0),3>r&&(e=Date.now());var i=e+t,u={c:n,t:i,n:null};return aa?aa.n=u:oa=u,aa=u,la||(ca=clearTimeout(ca),la=1,fa(Tn)),u}function Tn(){var n=Rn(),t=Dn()-n;t>24?(isFinite(t)&&(clearTimeout(ca),ca=setTimeout(Tn,t)),la=0):(la=1,fa(Tn))}function Rn(){for(var n=Date.now(),t=oa;t;)n>=t.t&&t.c(n-t.t)&&(t.c=null),t=t.n;return n}function Dn(){for(var n,t=oa,e=1/0;t;)t.c?(t.t<e&&(e=t.t),t=(n=t).n):t=n?n.n=t.n:oa=t.n;return aa=n,e}function Pn(n,t){return t-(n?Math.ceil(Math.log(n)/Math.LN10):1)}function Un(n,t){var e=Math.pow(10,3*xo(8-t));return{scale:t>8?function(n){return n/e}:function(n){return n*e},symbol:n}}function jn(n){var t=n.decimal,e=n.thousands,r=n.grouping,i=n.currency,u=r&&e?function(n,t){for(var i=n.length,u=[],o=0,a=r[0],l=0;i>0&&a>0&&(l+a+1>t&&(a=Math.max(1,t-l)),u.push(n.substring(i-=a,i+a)),!((l+=a+1)>t));)a=r[o=(o+1)%r.length];return u.reverse().join(e)}:m;return function(n){var e=ha.exec(n),r=e[1]||\" \",o=e[2]||\">\",a=e[3]||\"-\",l=e[4]||\"\",c=e[5],f=+e[6],s=e[7],h=e[8],p=e[9],g=1,v=\"\",d=\"\",y=!1,m=!0;switch(h&&(h=+h.substring(1)),(c||\"0\"===r&&\"=\"===o)&&(c=r=\"0\",o=\"=\"),p){case\"n\":s=!0,p=\"g\";break;case\"%\":g=100,d=\"%\",p=\"f\";break;case\"p\":g=100,d=\"%\",p=\"r\";break;case\"b\":case\"o\":case\"x\":case\"X\":\"#\"===l&&(v=\"0\"+p.toLowerCase());case\"c\":m=!1;case\"d\":y=!0,h=0;break;case\"s\":g=-1,p=\"r\"}\"$\"===l&&(v=i[0],d=i[1]),\"r\"!=p||h||(p=\"g\"),null!=h&&(\"g\"==p?h=Math.max(1,Math.min(21,h)):\"e\"!=p&&\"f\"!=p||(h=Math.max(0,Math.min(20,h)))),p=pa.get(p)||Fn;var M=c&&s;return function(n){var e=d;if(y&&n%1)return\"\";var i=0>n||0===n&&0>1/n?(n=-n,\"-\"):\"-\"===a?\"\":a;if(0>g){var l=ao.formatPrefix(n,h);n=l.scale(n),e=l.symbol+d}else n*=g;n=p(n,h);var x,b,_=n.lastIndexOf(\".\");if(0>_){var w=m?n.lastIndexOf(\"e\"):-1;0>w?(x=n,b=\"\"):(x=n.substring(0,w),b=n.substring(w))}else x=n.substring(0,_),b=t+n.substring(_+1);!c&&s&&(x=u(x,1/0));var S=v.length+x.length+b.length+(M?0:i.length),k=f>S?new Array(S=f-S+1).join(r):\"\";return M&&(x=u(k+x,k.length?f-b.length:1/0)),i+=v,n=x+b,(\"<\"===o?i+n+k:\">\"===o?k+i+n:\"^\"===o?k.substring(0,S>>=1)+i+n+k.substring(S):i+(M?n:k+n))+e}}}function Fn(n){return n+\"\"}function Hn(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function On(n,t,e){function r(t){var e=n(t),r=u(e,1);return r-t>t-e?e:r}function i(e){return t(e=n(new va(e-1)),1),e}function u(n,e){return t(n=new va(+n),e),n}function o(n,r,u){var o=i(n),a=[];if(u>1)for(;r>o;)e(o)%u||a.push(new Date(+o)),t(o,1);else for(;r>o;)a.push(new Date(+o)),t(o,1);return a}function a(n,t,e){try{va=Hn;var r=new Hn;return r._=n,o(r,t,e)}finally{va=Date}}n.floor=n,n.round=r,n.ceil=i,n.offset=u,n.range=o;var l=n.utc=In(n);return l.floor=l,l.round=In(r),l.ceil=In(i),l.offset=In(u),l.range=a,n}function In(n){return function(t,e){try{va=Hn;var r=new Hn;return r._=t,n(r,e)._}finally{va=Date}}}function Yn(n){function t(n){function t(t){for(var e,i,u,o=[],a=-1,l=0;++a<r;)37===n.charCodeAt(a)&&(o.push(n.slice(l,a)),null!=(i=ya[e=n.charAt(++a)])&&(e=n.charAt(++a)),(u=A[e])&&(e=u(t,null==i?\"e\"===e?\" \":\"0\":i)),o.push(e),l=a+1);return o.push(n.slice(l,a)),o.join(\"\")}var r=n.length;return t.parse=function(t){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},i=e(r,n,t,0);if(i!=t.length)return null;\"p\"in r&&(r.H=r.H%12+12*r.p);var u=null!=r.Z&&va!==Hn,o=new(u?Hn:va);return\"j\"in r?o.setFullYear(r.y,0,r.j):\"W\"in r||\"U\"in r?(\"w\"in r||(r.w=\"W\"in r?1:0),o.setFullYear(r.y,0,1),o.setFullYear(r.y,0,\"W\"in r?(r.w+6)%7+7*r.W-(o.getDay()+5)%7:r.w+7*r.U-(o.getDay()+6)%7)):o.setFullYear(r.y,r.m,r.d),o.setHours(r.H+(r.Z/100|0),r.M+r.Z%100,r.S,r.L),u?o._:o},t.toString=function(){return n},t}function e(n,t,e,r){for(var i,u,o,a=0,l=t.length,c=e.length;l>a;){if(r>=c)return-1;if(i=t.charCodeAt(a++),37===i){if(o=t.charAt(a++),u=C[o in ya?t.charAt(a++):o],!u||(r=u(n,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){_.lastIndex=0;var r=_.exec(t.slice(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){x.lastIndex=0;var r=x.exec(t.slice(e));return r?(n.w=b.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){N.lastIndex=0;var r=N.exec(t.slice(e));return r?(n.m=E.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,e){S.lastIndex=0;var r=S.exec(t.slice(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,r){return e(n,A.c.toString(),t,r)}function l(n,t,r){return e(n,A.x.toString(),t,r)}function c(n,t,r){return e(n,A.X.toString(),t,r)}function f(n,t,e){var r=M.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var s=n.dateTime,h=n.date,p=n.time,g=n.periods,v=n.days,d=n.shortDays,y=n.months,m=n.shortMonths;t.utc=function(n){function e(n){try{va=Hn;var t=new va;return t._=n,r(t)}finally{va=Date}}var r=t(n);return e.parse=function(n){try{va=Hn;var t=r.parse(n);return t&&t._}finally{va=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ct;var M=ao.map(),x=Vn(v),b=Xn(v),_=Vn(d),w=Xn(d),S=Vn(y),k=Xn(y),N=Vn(m),E=Xn(m);g.forEach(function(n,t){M.set(n.toLowerCase(),t)});var A={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return m[n.getMonth()]},B:function(n){return y[n.getMonth()]},c:t(s),d:function(n,t){return Zn(n.getDate(),t,2)},e:function(n,t){return Zn(n.getDate(),t,2)},H:function(n,t){return Zn(n.getHours(),t,2)},I:function(n,t){return Zn(n.getHours()%12||12,t,2)},j:function(n,t){return Zn(1+ga.dayOfYear(n),t,3)},L:function(n,t){return Zn(n.getMilliseconds(),t,3)},m:function(n,t){return Zn(n.getMonth()+1,t,2)},M:function(n,t){return Zn(n.getMinutes(),t,2)},p:function(n){return g[+(n.getHours()>=12)]},S:function(n,t){return Zn(n.getSeconds(),t,2)},U:function(n,t){return Zn(ga.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return Zn(ga.mondayOfYear(n),t,2)},x:t(h),X:t(p),y:function(n,t){return Zn(n.getFullYear()%100,t,2)},Y:function(n,t){return Zn(n.getFullYear()%1e4,t,4)},Z:at,\"%\":function(){return\"%\"}},C={a:r,A:i,b:u,B:o,c:a,d:tt,e:tt,H:rt,I:rt,j:et,L:ot,m:nt,M:it,p:f,S:ut,U:Bn,w:$n,W:Wn,x:l,X:c,y:Gn,Y:Jn,Z:Kn,\"%\":lt};return t}function Zn(n,t,e){var r=0>n?\"-\":\"\",i=(r?-n:n)+\"\",u=i.length;return r+(e>u?new Array(e-u+1).join(t)+i:i)}function Vn(n){return new RegExp(\"^(?:\"+n.map(ao.requote).join(\"|\")+\")\",\"i\")}function Xn(n){for(var t=new c,e=-1,r=n.length;++e<r;)t.set(n[e].toLowerCase(),e);return t}function $n(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+1));return r?(n.w=+r[0],e+r[0].length):-1}function Bn(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e));return r?(n.U=+r[0],e+r[0].length):-1}function Wn(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e));return r?(n.W=+r[0],e+r[0].length):-1}function Jn(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+4));return r?(n.y=+r[0],e+r[0].length):-1}function Gn(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+2));return r?(n.y=Qn(+r[0]),e+r[0].length):-1}function Kn(n,t,e){return/^[+-]\\d{4}$/.test(t=t.slice(e,e+5))?(n.Z=-t,e+5):-1}function Qn(n){return n+(n>68?1900:2e3)}function nt(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function tt(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function et(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function rt(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function it(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function ut(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function ot(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function at(n){var t=n.getTimezoneOffset(),e=t>0?\"-\":\"+\",r=xo(t)/60|0,i=xo(t)%60;return e+Zn(r,\"0\",2)+Zn(i,\"0\",2)}function lt(n,t,e){Ma.lastIndex=0;var r=Ma.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function ct(n){for(var t=n.length,e=-1;++e<t;)n[e][0]=this(n[e][0]);return function(t){for(var e=0,r=n[e];!r[1](t);)r=n[++e];return r[0](t)}}function ft(){}function st(n,t,e){var r=e.s=n+t,i=r-n,u=r-i;e.t=n-u+(t-i)}function ht(n,t){n&&wa.hasOwnProperty(n.type)&&wa[n.type](n,t)}function pt(n,t,e){var r,i=-1,u=n.length-e;for(t.lineStart();++i<u;)r=n[i],t.point(r[0],r[1],r[2]);t.lineEnd()}function gt(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)pt(n[e],t,1);t.polygonEnd()}function vt(){function n(n,t){n*=Yo,t=t*Yo/2+Fo/4;var e=n-r,o=e>=0?1:-1,a=o*e,l=Math.cos(t),c=Math.sin(t),f=u*c,s=i*l+f*Math.cos(a),h=f*o*Math.sin(a);ka.add(Math.atan2(h,s)),r=n,i=l,u=c}var t,e,r,i,u;Na.point=function(o,a){Na.point=n,r=(t=o)*Yo,i=Math.cos(a=(e=a)*Yo/2+Fo/4),u=Math.sin(a)},Na.lineEnd=function(){n(t,e)}}function dt(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function yt(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function mt(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function Mt(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function xt(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function bt(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function _t(n){return[Math.atan2(n[1],n[0]),tn(n[2])]}function wt(n,t){return xo(n[0]-t[0])<Uo&&xo(n[1]-t[1])<Uo}function St(n,t){n*=Yo;var e=Math.cos(t*=Yo);kt(e*Math.cos(n),e*Math.sin(n),Math.sin(t))}function kt(n,t,e){++Ea,Ca+=(n-Ca)/Ea,za+=(t-za)/Ea,La+=(e-La)/Ea}function Nt(){function n(n,i){n*=Yo;var u=Math.cos(i*=Yo),o=u*Math.cos(n),a=u*Math.sin(n),l=Math.sin(i),c=Math.atan2(Math.sqrt((c=e*l-r*a)*c+(c=r*o-t*l)*c+(c=t*a-e*o)*c),t*o+e*a+r*l);Aa+=c,qa+=c*(t+(t=o)),Ta+=c*(e+(e=a)),Ra+=c*(r+(r=l)),kt(t,e,r)}var t,e,r;ja.point=function(i,u){i*=Yo;var o=Math.cos(u*=Yo);t=o*Math.cos(i),e=o*Math.sin(i),r=Math.sin(u),ja.point=n,kt(t,e,r)}}function Et(){ja.point=St}function At(){function n(n,t){n*=Yo;var e=Math.cos(t*=Yo),o=e*Math.cos(n),a=e*Math.sin(n),l=Math.sin(t),c=i*l-u*a,f=u*o-r*l,s=r*a-i*o,h=Math.sqrt(c*c+f*f+s*s),p=r*o+i*a+u*l,g=h&&-nn(p)/h,v=Math.atan2(h,p);Da+=g*c,Pa+=g*f,Ua+=g*s,Aa+=v,qa+=v*(r+(r=o)),Ta+=v*(i+(i=a)),Ra+=v*(u+(u=l)),kt(r,i,u)}var t,e,r,i,u;ja.point=function(o,a){t=o,e=a,ja.point=n,o*=Yo;var l=Math.cos(a*=Yo);r=l*Math.cos(o),i=l*Math.sin(o),u=Math.sin(a),kt(r,i,u)},ja.lineEnd=function(){n(t,e),ja.lineEnd=Et,ja.point=St}}function Ct(n,t){function e(e,r){return e=n(e,r),t(e[0],e[1])}return n.invert&&t.invert&&(e.invert=function(e,r){return e=t.invert(e,r),e&&n.invert(e[0],e[1])}),e}function zt(){return!0}function Lt(n,t,e,r,i){var u=[],o=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,e=n[0],r=n[t];if(wt(e,r)){i.lineStart();for(var a=0;t>a;++a)i.point((e=n[a])[0],e[1]);return void i.lineEnd()}var l=new Tt(e,n,null,!0),c=new Tt(e,null,l,!1);l.o=c,u.push(l),o.push(c),l=new Tt(r,n,null,!1),c=new Tt(r,null,l,!0),l.o=c,u.push(l),o.push(c)}}),o.sort(t),qt(u),qt(o),u.length){for(var a=0,l=e,c=o.length;c>a;++a)o[a].e=l=!l;for(var f,s,h=u[0];;){for(var p=h,g=!0;p.v;)if((p=p.n)===h)return;f=p.z,i.lineStart();do{if(p.v=p.o.v=!0,p.e){if(g)for(var a=0,c=f.length;c>a;++a)i.point((s=f[a])[0],s[1]);else r(p.x,p.n.x,1,i);p=p.n}else{if(g){f=p.p.z;for(var a=f.length-1;a>=0;--a)i.point((s=f[a])[0],s[1])}else r(p.x,p.p.x,-1,i);p=p.p}p=p.o,f=p.z,g=!g}while(!p.v);i.lineEnd()}}}function qt(n){if(t=n.length){for(var t,e,r=0,i=n[0];++r<t;)i.n=e=n[r],e.p=i,i=e;i.n=e=n[0],e.p=i}}function Tt(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function Rt(n,t,e,r){return function(i,u){function o(t,e){var r=i(t,e);n(t=r[0],e=r[1])&&u.point(t,e)}function a(n,t){var e=i(n,t);d.point(e[0],e[1])}function l(){m.point=a,d.lineStart()}function c(){m.point=o,d.lineEnd()}function f(n,t){v.push([n,t]);var e=i(n,t);x.point(e[0],e[1])}function s(){x.lineStart(),v=[]}function h(){f(v[0][0],v[0][1]),x.lineEnd();var n,t=x.clean(),e=M.buffer(),r=e.length;if(v.pop(),g.push(v),v=null,r)if(1&t){n=e[0];var i,r=n.length-1,o=-1;if(r>0){for(b||(u.polygonStart(),b=!0),u.lineStart();++o<r;)u.point((i=n[o])[0],i[1]);u.lineEnd()}}else r>1&&2&t&&e.push(e.pop().concat(e.shift())),p.push(e.filter(Dt))}var p,g,v,d=t(u),y=i.invert(r[0],r[1]),m={point:o,lineStart:l,lineEnd:c,polygonStart:function(){m.point=f,m.lineStart=s,m.lineEnd=h,p=[],g=[]},polygonEnd:function(){m.point=o,m.lineStart=l,m.lineEnd=c,p=ao.merge(p);var n=Ot(y,g);p.length?(b||(u.polygonStart(),b=!0),Lt(p,Ut,n,e,u)):n&&(b||(u.polygonStart(),b=!0),u.lineStart(),e(null,null,1,u),u.lineEnd()),b&&(u.polygonEnd(),b=!1),p=g=null},sphere:function(){u.polygonStart(),u.lineStart(),e(null,null,1,u),u.lineEnd(),u.polygonEnd()}},M=Pt(),x=t(M),b=!1;return m}}function Dt(n){return n.length>1}function Pt(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:b,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Ut(n,t){return((n=n.x)[0]<0?n[1]-Io-Uo:Io-n[1])-((t=t.x)[0]<0?t[1]-Io-Uo:Io-t[1])}function jt(n){var t,e=NaN,r=NaN,i=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(u,o){var a=u>0?Fo:-Fo,l=xo(u-e);xo(l-Fo)<Uo?(n.point(e,r=(r+o)/2>0?Io:-Io),n.point(i,r),n.lineEnd(),n.lineStart(),n.point(a,r),n.point(u,r),t=0):i!==a&&l>=Fo&&(xo(e-i)<Uo&&(e-=i*Uo),xo(u-a)<Uo&&(u-=a*Uo),r=Ft(e,r,u,o),n.point(i,r),n.lineEnd(),n.lineStart(),n.point(a,r),t=0),n.point(e=u,r=o),i=a},lineEnd:function(){n.lineEnd(),e=r=NaN},clean:function(){return 2-t}}}function Ft(n,t,e,r){var i,u,o=Math.sin(n-e);return xo(o)>Uo?Math.atan((Math.sin(t)*(u=Math.cos(r))*Math.sin(e)-Math.sin(r)*(i=Math.cos(t))*Math.sin(n))/(i*u*o)):(t+r)/2}function Ht(n,t,e,r){var i;if(null==n)i=e*Io,r.point(-Fo,i),r.point(0,i),r.point(Fo,i),r.point(Fo,0),r.point(Fo,-i),r.point(0,-i),r.point(-Fo,-i),r.point(-Fo,0),r.point(-Fo,i);else if(xo(n[0]-t[0])>Uo){var u=n[0]<t[0]?Fo:-Fo;i=e*u/2,r.point(-u,i),r.point(0,i),r.point(u,i)}else r.point(t[0],t[1])}function Ot(n,t){var e=n[0],r=n[1],i=[Math.sin(e),-Math.cos(e),0],u=0,o=0;ka.reset();for(var a=0,l=t.length;l>a;++a){var c=t[a],f=c.length;if(f)for(var s=c[0],h=s[0],p=s[1]/2+Fo/4,g=Math.sin(p),v=Math.cos(p),d=1;;){d===f&&(d=0),n=c[d];var y=n[0],m=n[1]/2+Fo/4,M=Math.sin(m),x=Math.cos(m),b=y-h,_=b>=0?1:-1,w=_*b,S=w>Fo,k=g*M;if(ka.add(Math.atan2(k*_*Math.sin(w),v*x+k*Math.cos(w))),u+=S?b+_*Ho:b,S^h>=e^y>=e){var N=mt(dt(s),dt(n));bt(N);var E=mt(i,N);bt(E);var A=(S^b>=0?-1:1)*tn(E[2]);(r>A||r===A&&(N[0]||N[1]))&&(o+=S^b>=0?1:-1)}if(!d++)break;h=y,g=M,v=x,s=n}}return(-Uo>u||Uo>u&&-Uo>ka)^1&o}function It(n){function t(n,t){return Math.cos(n)*Math.cos(t)>u}function e(n){var e,u,l,c,f;return{lineStart:function(){c=l=!1,f=1},point:function(s,h){var p,g=[s,h],v=t(s,h),d=o?v?0:i(s,h):v?i(s+(0>s?Fo:-Fo),h):0;if(!e&&(c=l=v)&&n.lineStart(),v!==l&&(p=r(e,g),(wt(e,p)||wt(g,p))&&(g[0]+=Uo,g[1]+=Uo,v=t(g[0],g[1]))),v!==l)f=0,v?(n.lineStart(),p=r(g,e),n.point(p[0],p[1])):(p=r(e,g),n.point(p[0],p[1]),n.lineEnd()),e=p;else if(a&&e&&o^v){var y;d&u||!(y=r(g,e,!0))||(f=0,o?(n.lineStart(),n.point(y[0][0],y[0][1]),n.point(y[1][0],y[1][1]),n.lineEnd()):(n.point(y[1][0],y[1][1]),n.lineEnd(),n.lineStart(),n.point(y[0][0],y[0][1])))}!v||e&&wt(e,g)||n.point(g[0],g[1]),e=g,l=v,u=d},lineEnd:function(){l&&n.lineEnd(),e=null},clean:function(){return f|(c&&l)<<1}}}function r(n,t,e){var r=dt(n),i=dt(t),o=[1,0,0],a=mt(r,i),l=yt(a,a),c=a[0],f=l-c*c;if(!f)return!e&&n;var s=u*l/f,h=-u*c/f,p=mt(o,a),g=xt(o,s),v=xt(a,h);Mt(g,v);var d=p,y=yt(g,d),m=yt(d,d),M=y*y-m*(yt(g,g)-1);if(!(0>M)){var x=Math.sqrt(M),b=xt(d,(-y-x)/m);if(Mt(b,g),b=_t(b),!e)return b;var _,w=n[0],S=t[0],k=n[1],N=t[1];w>S&&(_=w,w=S,S=_);var E=S-w,A=xo(E-Fo)<Uo,C=A||Uo>E;if(!A&&k>N&&(_=k,k=N,N=_),C?A?k+N>0^b[1]<(xo(b[0]-w)<Uo?k:N):k<=b[1]&&b[1]<=N:E>Fo^(w<=b[0]&&b[0]<=S)){var z=xt(d,(-y+x)/m);return Mt(z,g),[b,_t(z)]}}}function i(t,e){var r=o?n:Fo-n,i=0;return-r>t?i|=1:t>r&&(i|=2),-r>e?i|=4:e>r&&(i|=8),i}var u=Math.cos(n),o=u>0,a=xo(u)>Uo,l=ve(n,6*Yo);return Rt(t,e,l,o?[0,-n]:[-Fo,n-Fo])}function Yt(n,t,e,r){return function(i){var u,o=i.a,a=i.b,l=o.x,c=o.y,f=a.x,s=a.y,h=0,p=1,g=f-l,v=s-c;if(u=n-l,g||!(u>0)){if(u/=g,0>g){if(h>u)return;p>u&&(p=u)}else if(g>0){if(u>p)return;u>h&&(h=u)}if(u=e-l,g||!(0>u)){if(u/=g,0>g){if(u>p)return;u>h&&(h=u)}else if(g>0){if(h>u)return;p>u&&(p=u)}if(u=t-c,v||!(u>0)){if(u/=v,0>v){if(h>u)return;p>u&&(p=u)}else if(v>0){if(u>p)return;u>h&&(h=u)}if(u=r-c,v||!(0>u)){if(u/=v,0>v){if(u>p)return;u>h&&(h=u)}else if(v>0){if(h>u)return;p>u&&(p=u)}return h>0&&(i.a={x:l+h*g,y:c+h*v}),1>p&&(i.b={x:l+p*g,y:c+p*v}),i}}}}}}function Zt(n,t,e,r){function i(r,i){return xo(r[0]-n)<Uo?i>0?0:3:xo(r[0]-e)<Uo?i>0?2:1:xo(r[1]-t)<Uo?i>0?1:0:i>0?3:2}function u(n,t){return o(n.x,t.x)}function o(n,t){var e=i(n,1),r=i(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(a){function l(n){for(var t=0,e=d.length,r=n[1],i=0;e>i;++i)for(var u,o=1,a=d[i],l=a.length,c=a[0];l>o;++o)u=a[o],c[1]<=r?u[1]>r&&Q(c,u,n)>0&&++t:u[1]<=r&&Q(c,u,n)<0&&--t,c=u;return 0!==t}function c(u,a,l,c){var f=0,s=0;if(null==u||(f=i(u,l))!==(s=i(a,l))||o(u,a)<0^l>0){do c.point(0===f||3===f?n:e,f>1?r:t);while((f=(f+l+4)%4)!==s)}else c.point(a[0],a[1])}function f(i,u){return i>=n&&e>=i&&u>=t&&r>=u}function s(n,t){f(n,t)&&a.point(n,t)}function h(){C.point=g,d&&d.push(y=[]),S=!0,w=!1,b=_=NaN}function p(){v&&(g(m,M),x&&w&&E.rejoin(),v.push(E.buffer())),C.point=s,w&&a.lineEnd()}function g(n,t){n=Math.max(-Ha,Math.min(Ha,n)),t=Math.max(-Ha,Math.min(Ha,t));var e=f(n,t);if(d&&y.push([n,t]),S)m=n,M=t,x=e,S=!1,e&&(a.lineStart(),a.point(n,t));else if(e&&w)a.point(n,t);else{var r={a:{x:b,y:_},b:{x:n,y:t}};A(r)?(w||(a.lineStart(),a.point(r.a.x,r.a.y)),a.point(r.b.x,r.b.y),e||a.lineEnd(),k=!1):e&&(a.lineStart(),a.point(n,t),k=!1)}b=n,_=t,w=e}var v,d,y,m,M,x,b,_,w,S,k,N=a,E=Pt(),A=Yt(n,t,e,r),C={point:s,lineStart:h,lineEnd:p,polygonStart:function(){a=E,v=[],d=[],k=!0},polygonEnd:function(){a=N,v=ao.merge(v);var t=l([n,r]),e=k&&t,i=v.length;(e||i)&&(a.polygonStart(),e&&(a.lineStart(),c(null,null,1,a),a.lineEnd()),i&&Lt(v,u,t,c,a),a.polygonEnd()),v=d=y=null}};return C}}function Vt(n){var t=0,e=Fo/3,r=ae(n),i=r(t,e);return i.parallels=function(n){return arguments.length?r(t=n[0]*Fo/180,e=n[1]*Fo/180):[t/Fo*180,e/Fo*180]},i}function Xt(n,t){function e(n,t){var e=Math.sqrt(u-2*i*Math.sin(t))/i;return[e*Math.sin(n*=i),o-e*Math.cos(n)]}var r=Math.sin(n),i=(r+Math.sin(t))/2,u=1+r*(2*i-r),o=Math.sqrt(u)/i;return e.invert=function(n,t){var e=o-t;return[Math.atan2(n,e)/i,tn((u-(n*n+e*e)*i*i)/(2*i))]},e}function $t(){function n(n,t){Ia+=i*n-r*t,r=n,i=t}var t,e,r,i;$a.point=function(u,o){$a.point=n,t=r=u,e=i=o},$a.lineEnd=function(){n(t,e)}}function Bt(n,t){Ya>n&&(Ya=n),n>Va&&(Va=n),Za>t&&(Za=t),t>Xa&&(Xa=t)}function Wt(){function n(n,t){o.push(\"M\",n,\",\",t,u)}function t(n,t){o.push(\"M\",n,\",\",t),a.point=e}function e(n,t){o.push(\"L\",n,\",\",t)}function r(){a.point=n}function i(){o.push(\"Z\")}var u=Jt(4.5),o=[],a={point:n,lineStart:function(){a.point=t},lineEnd:r,polygonStart:function(){a.lineEnd=i},polygonEnd:function(){a.lineEnd=r,a.point=n},pointRadius:function(n){return u=Jt(n),a},result:function(){if(o.length){var n=o.join(\"\");return o=[],n}}};return a}function Jt(n){return\"m0,\"+n+\"a\"+n+\",\"+n+\" 0 1,1 0,\"+-2*n+\"a\"+n+\",\"+n+\" 0 1,1 0,\"+2*n+\"z\"}function Gt(n,t){Ca+=n,za+=t,++La}function Kt(){function n(n,r){var i=n-t,u=r-e,o=Math.sqrt(i*i+u*u);qa+=o*(t+n)/2,Ta+=o*(e+r)/2,Ra+=o,Gt(t=n,e=r)}var t,e;Wa.point=function(r,i){Wa.point=n,Gt(t=r,e=i)}}function Qt(){Wa.point=Gt}function ne(){function n(n,t){var e=n-r,u=t-i,o=Math.sqrt(e*e+u*u);qa+=o*(r+n)/2,Ta+=o*(i+t)/2,Ra+=o,o=i*n-r*t,Da+=o*(r+n),Pa+=o*(i+t),Ua+=3*o,Gt(r=n,i=t)}var t,e,r,i;Wa.point=function(u,o){Wa.point=n,Gt(t=r=u,e=i=o)},Wa.lineEnd=function(){n(t,e)}}function te(n){function t(t,e){n.moveTo(t+o,e),n.arc(t,e,o,0,Ho)}function e(t,e){n.moveTo(t,e),a.point=r}function r(t,e){n.lineTo(t,e)}function i(){a.point=t}function u(){n.closePath()}var o=4.5,a={point:t,lineStart:function(){a.point=e},lineEnd:i,polygonStart:function(){a.lineEnd=u},polygonEnd:function(){a.lineEnd=i,a.point=t},pointRadius:function(n){return o=n,a},result:b};return a}function ee(n){function t(n){return(a?r:e)(n)}function e(t){return ue(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){M=NaN,S.point=u,t.lineStart()}function u(e,r){var u=dt([e,r]),o=n(e,r);i(M,x,m,b,_,w,M=o[0],x=o[1],m=e,b=u[0],_=u[1],w=u[2],a,t),t.point(M,x)}function o(){S.point=e,t.lineEnd()}function l(){r(),S.point=c,S.lineEnd=f}function c(n,t){u(s=n,h=t),p=M,g=x,v=b,d=_,y=w,S.point=u}function f(){i(M,x,m,b,_,w,p,g,s,v,d,y,a,t),S.lineEnd=o,o()}var s,h,p,g,v,d,y,m,M,x,b,_,w,S={point:e,lineStart:r,lineEnd:o,polygonStart:function(){t.polygonStart(),S.lineStart=l},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function i(t,e,r,a,l,c,f,s,h,p,g,v,d,y){var m=f-t,M=s-e,x=m*m+M*M;if(x>4*u&&d--){var b=a+p,_=l+g,w=c+v,S=Math.sqrt(b*b+_*_+w*w),k=Math.asin(w/=S),N=xo(xo(w)-1)<Uo||xo(r-h)<Uo?(r+h)/2:Math.atan2(_,b),E=n(N,k),A=E[0],C=E[1],z=A-t,L=C-e,q=M*z-m*L;(q*q/x>u||xo((m*z+M*L)/x-.5)>.3||o>a*p+l*g+c*v)&&(i(t,e,r,a,l,c,A,C,N,b/=S,_/=S,w,d,y),y.point(A,C),i(A,C,N,b,_,w,f,s,h,p,g,v,d,y))}}var u=.5,o=Math.cos(30*Yo),a=16;return t.precision=function(n){return arguments.length?(a=(u=n*n)>0&&16,t):Math.sqrt(u)},t}function re(n){var t=ee(function(t,e){return n([t*Zo,e*Zo])});return function(n){return le(t(n))}}function ie(n){this.stream=n}function ue(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function oe(n){return ae(function(){return n})()}function ae(n){function t(n){return n=a(n[0]*Yo,n[1]*Yo),[n[0]*h+l,c-n[1]*h]}function e(n){return n=a.invert((n[0]-l)/h,(c-n[1])/h),n&&[n[0]*Zo,n[1]*Zo]}function r(){a=Ct(o=se(y,M,x),u);var n=u(v,d);return l=p-n[0]*h,c=g+n[1]*h,i()}function i(){return f&&(f.valid=!1,f=null),t}var u,o,a,l,c,f,s=ee(function(n,t){return n=u(n,t),[n[0]*h+l,c-n[1]*h]}),h=150,p=480,g=250,v=0,d=0,y=0,M=0,x=0,b=Fa,_=m,w=null,S=null;return t.stream=function(n){return f&&(f.valid=!1),f=le(b(o,s(_(n)))),f.valid=!0,f},t.clipAngle=function(n){return arguments.length?(b=null==n?(w=n,Fa):It((w=+n)*Yo),i()):w},t.clipExtent=function(n){return arguments.length?(S=n,_=n?Zt(n[0][0],n[0][1],n[1][0],n[1][1]):m,i()):S},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(p=+n[0],g=+n[1],r()):[p,g]},t.center=function(n){return arguments.length?(v=n[0]%360*Yo,d=n[1]%360*Yo,r()):[v*Zo,d*Zo]},t.rotate=function(n){return arguments.length?(y=n[0]%360*Yo,M=n[1]%360*Yo,x=n.length>2?n[2]%360*Yo:0,r()):[y*Zo,M*Zo,x*Zo]},ao.rebind(t,s,\"precision\"),function(){return u=n.apply(this,arguments),t.invert=u.invert&&e,r()}}function le(n){return ue(n,function(t,e){n.point(t*Yo,e*Yo)})}function ce(n,t){return[n,t]}function fe(n,t){return[n>Fo?n-Ho:-Fo>n?n+Ho:n,t]}function se(n,t,e){return n?t||e?Ct(pe(n),ge(t,e)):pe(n):t||e?ge(t,e):fe}function he(n){return function(t,e){return t+=n,[t>Fo?t-Ho:-Fo>t?t+Ho:t,e]}}function pe(n){var t=he(n);return t.invert=he(-n),t}function ge(n,t){function e(n,t){var e=Math.cos(t),a=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),f=c*r+a*i;return[Math.atan2(l*u-f*o,a*r-c*i),tn(f*u+l*o)]}var r=Math.cos(n),i=Math.sin(n),u=Math.cos(t),o=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),a=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),f=c*u-l*o;return[Math.atan2(l*u+c*o,a*r+f*i),tn(f*r-a*i)]},e}function ve(n,t){var e=Math.cos(n),r=Math.sin(n);return function(i,u,o,a){var l=o*t;null!=i?(i=de(e,i),u=de(e,u),(o>0?u>i:i>u)&&(i+=o*Ho)):(i=n+o*Ho,u=n-.5*l);for(var c,f=i;o>0?f>u:u>f;f-=l)a.point((c=_t([e,-r*Math.cos(f),-r*Math.sin(f)]))[0],c[1])}}function de(n,t){var e=dt(t);e[0]-=n,bt(e);var r=nn(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Uo)%(2*Math.PI)}function ye(n,t,e){var r=ao.range(n,t-Uo,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function me(n,t,e){var r=ao.range(n,t-Uo,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function Me(n){return n.source}function xe(n){return n.target}function be(n,t,e,r){var i=Math.cos(t),u=Math.sin(t),o=Math.cos(r),a=Math.sin(r),l=i*Math.cos(n),c=i*Math.sin(n),f=o*Math.cos(e),s=o*Math.sin(e),h=2*Math.asin(Math.sqrt(on(r-t)+i*o*on(e-n))),p=1/Math.sin(h),g=h?function(n){var t=Math.sin(n*=h)*p,e=Math.sin(h-n)*p,r=e*l+t*f,i=e*c+t*s,o=e*u+t*a;return[Math.atan2(i,r)*Zo,Math.atan2(o,Math.sqrt(r*r+i*i))*Zo]}:function(){return[n*Zo,t*Zo]};return g.distance=h,g}function _e(){function n(n,i){var u=Math.sin(i*=Yo),o=Math.cos(i),a=xo((n*=Yo)-t),l=Math.cos(a);Ja+=Math.atan2(Math.sqrt((a=o*Math.sin(a))*a+(a=r*u-e*o*l)*a),e*u+r*o*l),t=n,e=u,r=o}var t,e,r;Ga.point=function(i,u){t=i*Yo,e=Math.sin(u*=Yo),r=Math.cos(u),Ga.point=n},Ga.lineEnd=function(){Ga.point=Ga.lineEnd=b}}function we(n,t){function e(t,e){var r=Math.cos(t),i=Math.cos(e),u=n(r*i);return[u*i*Math.sin(t),u*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),i=t(r),u=Math.sin(i),o=Math.cos(i);return[Math.atan2(n*u,r*o),Math.asin(r&&e*u/r)]},e}function Se(n,t){function e(n,t){o>0?-Io+Uo>t&&(t=-Io+Uo):t>Io-Uo&&(t=Io-Uo);var e=o/Math.pow(i(t),u);return[e*Math.sin(u*n),o-e*Math.cos(u*n)]}var r=Math.cos(n),i=function(n){return Math.tan(Fo/4+n/2)},u=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(i(t)/i(n)),o=r*Math.pow(i(n),u)/u;return u?(e.invert=function(n,t){var e=o-t,r=K(u)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/u,2*Math.atan(Math.pow(o/r,1/u))-Io]},e):Ne}function ke(n,t){function e(n,t){var e=u-t;return[e*Math.sin(i*n),u-e*Math.cos(i*n)]}var r=Math.cos(n),i=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),u=r/i+n;return xo(i)<Uo?ce:(e.invert=function(n,t){var e=u-t;return[Math.atan2(n,e)/i,u-K(i)*Math.sqrt(n*n+e*e)]},e)}function Ne(n,t){return[n,Math.log(Math.tan(Fo/4+t/2))]}function Ee(n){var t,e=oe(n),r=e.scale,i=e.translate,u=e.clipExtent;return e.scale=function(){var n=r.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.translate=function(){var n=i.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.clipExtent=function(n){var o=u.apply(e,arguments);if(o===e){if(t=null==n){var a=Fo*r(),l=i();u([[l[0]-a,l[1]-a],[l[0]+a,l[1]+a]])}}else t&&(o=null);return o},e.clipExtent(null)}function Ae(n,t){return[Math.log(Math.tan(Fo/4+t/2)),-n]}function Ce(n){return n[0]}function ze(n){return n[1]}function Le(n){for(var t=n.length,e=[0,1],r=2,i=2;t>i;i++){for(;r>1&&Q(n[e[r-2]],n[e[r-1]],n[i])<=0;)--r;e[r++]=i}return e.slice(0,r)}function qe(n,t){return n[0]-t[0]||n[1]-t[1]}function Te(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Re(n,t,e,r){var i=n[0],u=e[0],o=t[0]-i,a=r[0]-u,l=n[1],c=e[1],f=t[1]-l,s=r[1]-c,h=(a*(l-c)-s*(i-u))/(s*o-a*f);return[i+h*o,l+h*f]}function De(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Pe(){rr(this),this.edge=this.site=this.circle=null}function Ue(n){var t=cl.pop()||new Pe;return t.site=n,t}function je(n){Be(n),ol.remove(n),cl.push(n),rr(n)}function Fe(n){var t=n.circle,e=t.x,r=t.cy,i={x:e,y:r},u=n.P,o=n.N,a=[n];je(n);for(var l=u;l.circle&&xo(e-l.circle.x)<Uo&&xo(r-l.circle.cy)<Uo;)u=l.P,a.unshift(l),je(l),l=u;a.unshift(l),Be(l);for(var c=o;c.circle&&xo(e-c.circle.x)<Uo&&xo(r-c.circle.cy)<Uo;)o=c.N,a.push(c),je(c),c=o;a.push(c),Be(c);var f,s=a.length;for(f=1;s>f;++f)c=a[f],l=a[f-1],nr(c.edge,l.site,c.site,i);l=a[0],c=a[s-1],c.edge=Ke(l.site,c.site,null,i),$e(l),$e(c)}function He(n){for(var t,e,r,i,u=n.x,o=n.y,a=ol._;a;)if(r=Oe(a,o)-u,r>Uo)a=a.L;else{if(i=u-Ie(a,o),!(i>Uo)){r>-Uo?(t=a.P,e=a):i>-Uo?(t=a,e=a.N):t=e=a;break}if(!a.R){t=a;break}a=a.R}var l=Ue(n);if(ol.insert(t,l),t||e){if(t===e)return Be(t),e=Ue(t.site),ol.insert(l,e),l.edge=e.edge=Ke(t.site,l.site),$e(t),void $e(e);if(!e)return void(l.edge=Ke(t.site,l.site));Be(t),Be(e);var c=t.site,f=c.x,s=c.y,h=n.x-f,p=n.y-s,g=e.site,v=g.x-f,d=g.y-s,y=2*(h*d-p*v),m=h*h+p*p,M=v*v+d*d,x={x:(d*m-p*M)/y+f,y:(h*M-v*m)/y+s};nr(e.edge,c,g,x),l.edge=Ke(c,n,null,x),e.edge=Ke(n,g,null,x),$e(t),$e(e)}}function Oe(n,t){var e=n.site,r=e.x,i=e.y,u=i-t;if(!u)return r;var o=n.P;if(!o)return-(1/0);e=o.site;var a=e.x,l=e.y,c=l-t;if(!c)return a;var f=a-r,s=1/u-1/c,h=f/c;return s?(-h+Math.sqrt(h*h-2*s*(f*f/(-2*c)-l+c/2+i-u/2)))/s+r:(r+a)/2}function Ie(n,t){var e=n.N;if(e)return Oe(e,t);var r=n.site;return r.y===t?r.x:1/0}function Ye(n){this.site=n,this.edges=[]}function Ze(n){for(var t,e,r,i,u,o,a,l,c,f,s=n[0][0],h=n[1][0],p=n[0][1],g=n[1][1],v=ul,d=v.length;d--;)if(u=v[d],u&&u.prepare())for(a=u.edges,l=a.length,o=0;l>o;)f=a[o].end(),r=f.x,i=f.y,c=a[++o%l].start(),t=c.x,e=c.y,(xo(r-t)>Uo||xo(i-e)>Uo)&&(a.splice(o,0,new tr(Qe(u.site,f,xo(r-s)<Uo&&g-i>Uo?{x:s,y:xo(t-s)<Uo?e:g}:xo(i-g)<Uo&&h-r>Uo?{x:xo(e-g)<Uo?t:h,y:g}:xo(r-h)<Uo&&i-p>Uo?{x:h,y:xo(t-h)<Uo?e:p}:xo(i-p)<Uo&&r-s>Uo?{x:xo(e-p)<Uo?t:s,y:p}:null),u.site,null)),++l)}function Ve(n,t){return t.angle-n.angle}function Xe(){rr(this),this.x=this.y=this.arc=this.site=this.cy=null}function $e(n){var t=n.P,e=n.N;if(t&&e){var r=t.site,i=n.site,u=e.site;if(r!==u){var o=i.x,a=i.y,l=r.x-o,c=r.y-a,f=u.x-o,s=u.y-a,h=2*(l*s-c*f);if(!(h>=-jo)){var p=l*l+c*c,g=f*f+s*s,v=(s*p-c*g)/h,d=(l*g-f*p)/h,s=d+a,y=fl.pop()||new Xe;y.arc=n,y.site=i,y.x=v+o,y.y=s+Math.sqrt(v*v+d*d),y.cy=s,n.circle=y;for(var m=null,M=ll._;M;)if(y.y<M.y||y.y===M.y&&y.x<=M.x){if(!M.L){m=M.P;break}M=M.L}else{if(!M.R){m=M;break}M=M.R}ll.insert(m,y),m||(al=y)}}}}function Be(n){var t=n.circle;t&&(t.P||(al=t.N),ll.remove(t),fl.push(t),rr(t),n.circle=null)}function We(n){for(var t,e=il,r=Yt(n[0][0],n[0][1],n[1][0],n[1][1]),i=e.length;i--;)t=e[i],(!Je(t,n)||!r(t)||xo(t.a.x-t.b.x)<Uo&&xo(t.a.y-t.b.y)<Uo)&&(t.a=t.b=null,e.splice(i,1))}function Je(n,t){var e=n.b;if(e)return!0;var r,i,u=n.a,o=t[0][0],a=t[1][0],l=t[0][1],c=t[1][1],f=n.l,s=n.r,h=f.x,p=f.y,g=s.x,v=s.y,d=(h+g)/2,y=(p+v)/2;if(v===p){if(o>d||d>=a)return;if(h>g){if(u){if(u.y>=c)return}else u={x:d,y:l};e={x:d,y:c}}else{if(u){if(u.y<l)return}else u={x:d,y:c};e={x:d,y:l}}}else if(r=(h-g)/(v-p),i=y-r*d,-1>r||r>1)if(h>g){if(u){if(u.y>=c)return}else u={x:(l-i)/r,y:l};e={x:(c-i)/r,y:c}}else{if(u){if(u.y<l)return}else u={x:(c-i)/r,y:c};e={x:(l-i)/r,y:l}}else if(v>p){if(u){if(u.x>=a)return}else u={x:o,y:r*o+i};e={x:a,y:r*a+i}}else{if(u){if(u.x<o)return}else u={x:a,y:r*a+i};e={x:o,y:r*o+i}}return n.a=u,n.b=e,!0}function Ge(n,t){this.l=n,this.r=t,this.a=this.b=null}function Ke(n,t,e,r){var i=new Ge(n,t);return il.push(i),e&&nr(i,n,t,e),r&&nr(i,t,n,r),ul[n.i].edges.push(new tr(i,n,t)),ul[t.i].edges.push(new tr(i,t,n)),i}function Qe(n,t,e){var r=new Ge(n,null);return r.a=t,r.b=e,il.push(r),r}function nr(n,t,e,r){n.a||n.b?n.l===e?n.b=r:n.a=r:(n.a=r,n.l=t,n.r=e)}function tr(n,t,e){var r=n.a,i=n.b;this.edge=n,this.site=t,this.angle=e?Math.atan2(e.y-t.y,e.x-t.x):n.l===t?Math.atan2(i.x-r.x,r.y-i.y):Math.atan2(r.x-i.x,i.y-r.y)}function er(){this._=null}function rr(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function ir(n,t){var e=t,r=t.R,i=e.U;i?i.L===e?i.L=r:i.R=r:n._=r,r.U=i,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function ur(n,t){var e=t,r=t.L,i=e.U;i?i.L===e?i.L=r:i.R=r:n._=r,r.U=i,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function or(n){for(;n.L;)n=n.L;return n}function ar(n,t){var e,r,i,u=n.sort(lr).pop();for(il=[],ul=new Array(n.length),ol=new er,ll=new er;;)if(i=al,u&&(!i||u.y<i.y||u.y===i.y&&u.x<i.x))u.x===e&&u.y===r||(ul[u.i]=new Ye(u),He(u),e=u.x,r=u.y),u=n.pop();else{if(!i)break;Fe(i.arc)}t&&(We(t),Ze(t));var o={cells:ul,edges:il};return ol=ll=il=ul=null,o}function lr(n,t){return t.y-n.y||t.x-n.x}function cr(n,t,e){return(n.x-e.x)*(t.y-n.y)-(n.x-t.x)*(e.y-n.y)}function fr(n){return n.x}function sr(n){return n.y}function hr(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function pr(n,t,e,r,i,u){if(!n(t,e,r,i,u)){var o=.5*(e+i),a=.5*(r+u),l=t.nodes;l[0]&&pr(n,l[0],e,r,o,a),l[1]&&pr(n,l[1],o,r,i,a),l[2]&&pr(n,l[2],e,a,o,u),l[3]&&pr(n,l[3],o,a,i,u)}}function gr(n,t,e,r,i,u,o){var a,l=1/0;return function c(n,f,s,h,p){if(!(f>u||s>o||r>h||i>p)){if(g=n.point){var g,v=t-n.x,d=e-n.y,y=v*v+d*d;if(l>y){var m=Math.sqrt(l=y);r=t-m,i=e-m,u=t+m,o=e+m,a=g}}for(var M=n.nodes,x=.5*(f+h),b=.5*(s+p),_=t>=x,w=e>=b,S=w<<1|_,k=S+4;k>S;++S)if(n=M[3&S])switch(3&S){case 0:c(n,f,s,x,b);break;case 1:c(n,x,s,h,b);break;case 2:c(n,f,b,x,p);break;case 3:c(n,x,b,h,p)}}}(n,r,i,u,o),a}function vr(n,t){n=ao.rgb(n),t=ao.rgb(t);var e=n.r,r=n.g,i=n.b,u=t.r-e,o=t.g-r,a=t.b-i;return function(n){return\"#\"+bn(Math.round(e+u*n))+bn(Math.round(r+o*n))+bn(Math.round(i+a*n))}}function dr(n,t){var e,r={},i={};for(e in n)e in t?r[e]=Mr(n[e],t[e]):i[e]=n[e];for(e in t)e in n||(i[e]=t[e]);return function(n){for(e in r)i[e]=r[e](n);return i}}function yr(n,t){return n=+n,t=+t,function(e){return n*(1-e)+t*e}}function mr(n,t){var e,r,i,u=hl.lastIndex=pl.lastIndex=0,o=-1,a=[],l=[];for(n+=\"\",t+=\"\";(e=hl.exec(n))&&(r=pl.exec(t));)(i=r.index)>u&&(i=t.slice(u,i),a[o]?a[o]+=i:a[++o]=i),(e=e[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,l.push({i:o,x:yr(e,r)})),u=pl.lastIndex;return u<t.length&&(i=t.slice(u),a[o]?a[o]+=i:a[++o]=i),a.length<2?l[0]?(t=l[0].x,function(n){return t(n)+\"\"}):function(){return t}:(t=l.length,function(n){for(var e,r=0;t>r;++r)a[(e=l[r]).i]=e.x(n);return a.join(\"\")})}function Mr(n,t){for(var e,r=ao.interpolators.length;--r>=0&&!(e=ao.interpolators[r](n,t)););return e}function xr(n,t){var e,r=[],i=[],u=n.length,o=t.length,a=Math.min(n.length,t.length);for(e=0;a>e;++e)r.push(Mr(n[e],t[e]));for(;u>e;++e)i[e]=n[e];for(;o>e;++e)i[e]=t[e];return function(n){for(e=0;a>e;++e)i[e]=r[e](n);return i}}function br(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function _r(n){return function(t){return 1-n(1-t)}}function wr(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function Sr(n){return n*n}function kr(n){return n*n*n}function Nr(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function Er(n){return function(t){return Math.pow(t,n)}}function Ar(n){return 1-Math.cos(n*Io)}function Cr(n){return Math.pow(2,10*(n-1))}function zr(n){return 1-Math.sqrt(1-n*n)}function Lr(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/Ho*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*Ho/t)}}function qr(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function Tr(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Rr(n,t){n=ao.hcl(n),t=ao.hcl(t);var e=n.h,r=n.c,i=n.l,u=t.h-e,o=t.c-r,a=t.l-i;return isNaN(o)&&(o=0,r=isNaN(r)?t.c:r),isNaN(u)?(u=0,e=isNaN(e)?t.h:e):u>180?u-=360:-180>u&&(u+=360),function(n){return sn(e+u*n,r+o*n,i+a*n)+\"\"}}function Dr(n,t){n=ao.hsl(n),t=ao.hsl(t);var e=n.h,r=n.s,i=n.l,u=t.h-e,o=t.s-r,a=t.l-i;return isNaN(o)&&(o=0,r=isNaN(r)?t.s:r),isNaN(u)?(u=0,e=isNaN(e)?t.h:e):u>180?u-=360:-180>u&&(u+=360),function(n){return cn(e+u*n,r+o*n,i+a*n)+\"\"}}function Pr(n,t){n=ao.lab(n),t=ao.lab(t);var e=n.l,r=n.a,i=n.b,u=t.l-e,o=t.a-r,a=t.b-i;return function(n){return pn(e+u*n,r+o*n,i+a*n)+\"\"}}function Ur(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function jr(n){var t=[n.a,n.b],e=[n.c,n.d],r=Hr(t),i=Fr(t,e),u=Hr(Or(e,t,-i))||0;t[0]*e[1]<e[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,i*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-e[0],e[1]))*Zo,this.translate=[n.e,n.f],this.scale=[r,u],this.skew=u?Math.atan2(i,u)*Zo:0}function Fr(n,t){return n[0]*t[0]+n[1]*t[1]}function Hr(n){var t=Math.sqrt(Fr(n,n));return t&&(n[0]/=t,n[1]/=t),t}function Or(n,t,e){return n[0]+=e*t[0],n[1]+=e*t[1],n}function Ir(n){return n.length?n.pop()+\",\":\"\"}function Yr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var i=e.push(\"translate(\",null,\",\",null,\")\");r.push({i:i-4,x:yr(n[0],t[0])},{i:i-2,x:yr(n[1],t[1])})}else(t[0]||t[1])&&e.push(\"translate(\"+t+\")\")}function Zr(n,t,e,r){n!==t?(n-t>180?t+=360:t-n>180&&(n+=360),r.push({i:e.push(Ir(e)+\"rotate(\",null,\")\")-2,x:yr(n,t)})):t&&e.push(Ir(e)+\"rotate(\"+t+\")\")}function Vr(n,t,e,r){n!==t?r.push({i:e.push(Ir(e)+\"skewX(\",null,\")\")-2,x:yr(n,t)}):t&&e.push(Ir(e)+\"skewX(\"+t+\")\")}function Xr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var i=e.push(Ir(e)+\"scale(\",null,\",\",null,\")\");r.push({i:i-4,x:yr(n[0],t[0])},{i:i-2,x:yr(n[1],t[1])})}else 1===t[0]&&1===t[1]||e.push(Ir(e)+\"scale(\"+t+\")\")}function $r(n,t){var e=[],r=[];return n=ao.transform(n),t=ao.transform(t),Yr(n.translate,t.translate,e,r),Zr(n.rotate,t.rotate,e,r),Vr(n.skew,t.skew,e,r),Xr(n.scale,t.scale,e,r),n=t=null,function(n){for(var t,i=-1,u=r.length;++i<u;)e[(t=r[i]).i]=t.x(n);return e.join(\"\")}}function Br(n,t){return t=(t-=n=+n)||1/t,function(e){return(e-n)/t}}function Wr(n,t){return t=(t-=n=+n)||1/t,function(e){return Math.max(0,Math.min(1,(e-n)/t))}}function Jr(n){for(var t=n.source,e=n.target,r=Kr(t,e),i=[t];t!==r;)t=t.parent,i.push(t);for(var u=i.length;e!==r;)i.splice(u,0,e),e=e.parent;return i}function Gr(n){for(var t=[],e=n.parent;null!=e;)t.push(n),n=e,e=e.parent;return t.push(n),t}function Kr(n,t){if(n===t)return n;for(var e=Gr(n),r=Gr(t),i=e.pop(),u=r.pop(),o=null;i===u;)o=i,i=e.pop(),u=r.pop();return o}function Qr(n){n.fixed|=2}function ni(n){n.fixed&=-7}function ti(n){n.fixed|=4,n.px=n.x,n.py=n.y}function ei(n){n.fixed&=-5}function ri(n,t,e){var r=0,i=0;if(n.charge=0,!n.leaf)for(var u,o=n.nodes,a=o.length,l=-1;++l<a;)u=o[l],null!=u&&(ri(u,t,e),n.charge+=u.charge,r+=u.charge*u.cx,i+=u.charge*u.cy);if(n.point){n.leaf||(n.point.x+=Math.random()-.5,n.point.y+=Math.random()-.5);var c=t*e[n.point.index];n.charge+=n.pointCharge=c,r+=c*n.point.x,i+=c*n.point.y}n.cx=r/n.charge,n.cy=i/n.charge}function ii(n,t){return ao.rebind(n,t,\"sort\",\"children\",\"value\"),n.nodes=n,n.links=fi,n}function ui(n,t){for(var e=[n];null!=(n=e.pop());)if(t(n),(i=n.children)&&(r=i.length))for(var r,i;--r>=0;)e.push(i[r])}function oi(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(u=n.children)&&(i=u.length))for(var i,u,o=-1;++o<i;)e.push(u[o]);for(;null!=(n=r.pop());)t(n)}function ai(n){return n.children}function li(n){return n.value}function ci(n,t){return t.value-n.value}function fi(n){return ao.merge(n.map(function(n){return(n.children||[]).map(function(t){return{source:n,target:t}})}))}function si(n){return n.x}function hi(n){return n.y}function pi(n,t,e){n.y0=t,n.y=e}function gi(n){return ao.range(n.length)}function vi(n){for(var t=-1,e=n[0].length,r=[];++t<e;)r[t]=0;return r}function di(n){for(var t,e=1,r=0,i=n[0][1],u=n.length;u>e;++e)(t=n[e][1])>i&&(r=e,i=t);return r}function yi(n){return n.reduce(mi,0)}function mi(n,t){return n+t[1]}function Mi(n,t){return xi(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function xi(n,t){for(var e=-1,r=+n[0],i=(n[1]-r)/t,u=[];++e<=t;)u[e]=i*e+r;return u}function bi(n){return[ao.min(n),ao.max(n)]}function _i(n,t){return n.value-t.value}function wi(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function Si(n,t){n._pack_next=t,t._pack_prev=n}function ki(n,t){var e=t.x-n.x,r=t.y-n.y,i=n.r+t.r;return.999*i*i>e*e+r*r}function Ni(n){function t(n){f=Math.min(n.x-n.r,f),s=Math.max(n.x+n.r,s),h=Math.min(n.y-n.r,h),p=Math.max(n.y+n.r,p)}if((e=n.children)&&(c=e.length)){var e,r,i,u,o,a,l,c,f=1/0,s=-(1/0),h=1/0,p=-(1/0);if(e.forEach(Ei),r=e[0],r.x=-r.r,r.y=0,t(r),c>1&&(i=e[1],i.x=i.r,i.y=0,t(i),c>2))for(u=e[2],zi(r,i,u),t(u),wi(r,u),r._pack_prev=u,wi(u,i),i=r._pack_next,o=3;c>o;o++){zi(r,i,u=e[o]);var g=0,v=1,d=1;for(a=i._pack_next;a!==i;a=a._pack_next,v++)if(ki(a,u)){g=1;break}if(1==g)for(l=r._pack_prev;l!==a._pack_prev&&!ki(l,u);l=l._pack_prev,d++);g?(d>v||v==d&&i.r<r.r?Si(r,i=a):Si(r=l,i),o--):(wi(r,u),i=u,t(u))}var y=(f+s)/2,m=(h+p)/2,M=0;for(o=0;c>o;o++)u=e[o],u.x-=y,u.y-=m,M=Math.max(M,u.r+Math.sqrt(u.x*u.x+u.y*u.y));n.r=M,e.forEach(Ai)}}function Ei(n){n._pack_next=n._pack_prev=n}function Ai(n){delete n._pack_next,delete n._pack_prev}function Ci(n,t,e,r){var i=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,i)for(var u=-1,o=i.length;++u<o;)Ci(i[u],t,e,r)}function zi(n,t,e){var r=n.r+e.r,i=t.x-n.x,u=t.y-n.y;if(r&&(i||u)){var o=t.r+e.r,a=i*i+u*u;o*=o,r*=r;var l=.5+(r-o)/(2*a),c=Math.sqrt(Math.max(0,2*o*(r+a)-(r-=a)*r-o*o))/(2*a);e.x=n.x+l*i+c*u,e.y=n.y+l*u-c*i}else e.x=n.x+r,e.y=n.y}function Li(n,t){return n.parent==t.parent?1:2}function qi(n){var t=n.children;return t.length?t[0]:n.t}function Ti(n){var t,e=n.children;return(t=e.length)?e[t-1]:n.t}function Ri(n,t,e){var r=e/(t.i-n.i);t.c-=r,t.s+=e,n.c+=r,t.z+=e,t.m+=e}function Di(n){for(var t,e=0,r=0,i=n.children,u=i.length;--u>=0;)t=i[u],t.z+=e,t.m+=e,e+=t.s+(r+=t.c)}function Pi(n,t,e){return n.a.parent===t.parent?n.a:e}function Ui(n){return 1+ao.max(n,function(n){return n.y})}function ji(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Fi(n){var t=n.children;return t&&t.length?Fi(t[0]):n}function Hi(n){var t,e=n.children;return e&&(t=e.length)?Hi(e[t-1]):n}function Oi(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Ii(n,t){var e=n.x+t[3],r=n.y+t[0],i=n.dx-t[1]-t[3],u=n.dy-t[0]-t[2];return 0>i&&(e+=i/2,i=0),0>u&&(r+=u/2,u=0),{x:e,y:r,dx:i,dy:u}}function Yi(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function Zi(n){return n.rangeExtent?n.rangeExtent():Yi(n.range())}function Vi(n,t,e,r){var i=e(n[0],n[1]),u=r(t[0],t[1]);return function(n){return u(i(n))}}function Xi(n,t){var e,r=0,i=n.length-1,u=n[r],o=n[i];return u>o&&(e=r,r=i,i=e,e=u,u=o,o=e),n[r]=t.floor(u),n[i]=t.ceil(o),n}function $i(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:Sl}function Bi(n,t,e,r){var i=[],u=[],o=0,a=Math.min(n.length,t.length)-1;for(n[a]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++o<=a;)i.push(e(n[o-1],n[o])),u.push(r(t[o-1],t[o]));return function(t){var e=ao.bisect(n,t,1,a)-1;return u[e](i[e](t))}}function Wi(n,t,e,r){function i(){var i=Math.min(n.length,t.length)>2?Bi:Vi,l=r?Wr:Br;return o=i(n,t,l,e),a=i(t,n,l,Mr),u}function u(n){return o(n)}var o,a;return u.invert=function(n){return a(n)},u.domain=function(t){return arguments.length?(n=t.map(Number),i()):n},u.range=function(n){return arguments.length?(t=n,i()):t},u.rangeRound=function(n){return u.range(n).interpolate(Ur)},u.clamp=function(n){return arguments.length?(r=n,i()):r},u.interpolate=function(n){return arguments.length?(e=n,i()):e},u.ticks=function(t){return Qi(n,t)},u.tickFormat=function(t,e){return nu(n,t,e)},u.nice=function(t){return Gi(n,t),i()},u.copy=function(){return Wi(n,t,e,r)},i()}function Ji(n,t){return ao.rebind(n,t,\"range\",\"rangeRound\",\"interpolate\",\"clamp\")}function Gi(n,t){return Xi(n,$i(Ki(n,t)[2])),Xi(n,$i(Ki(n,t)[2])),n}function Ki(n,t){null==t&&(t=10);var e=Yi(n),r=e[1]-e[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),u=t/r*i;return.15>=u?i*=10:.35>=u?i*=5:.75>=u&&(i*=2),e[0]=Math.ceil(e[0]/i)*i,e[1]=Math.floor(e[1]/i)*i+.5*i,e[2]=i,e}function Qi(n,t){return ao.range.apply(ao,Ki(n,t))}function nu(n,t,e){var r=Ki(n,t);if(e){var i=ha.exec(e);if(i.shift(),\"s\"===i[8]){var u=ao.formatPrefix(Math.max(xo(r[0]),xo(r[1])));return i[7]||(i[7]=\".\"+tu(u.scale(r[2]))),i[8]=\"f\",e=ao.format(i.join(\"\")),function(n){return e(u.scale(n))+u.symbol}}i[7]||(i[7]=\".\"+eu(i[8],r)),e=i.join(\"\")}else e=\",.\"+tu(r[2])+\"f\";return ao.format(e)}function tu(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function eu(n,t){var e=tu(t[2]);return n in kl?Math.abs(e-tu(Math.max(xo(t[0]),xo(t[1]))))+ +(\"e\"!==n):e-2*(\"%\"===n)}function ru(n,t,e,r){function i(n){return(e?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function u(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function o(t){return n(i(t))}return o.invert=function(t){return u(n.invert(t))},o.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(i)),o):r},o.base=function(e){return arguments.length?(t=+e,n.domain(r.map(i)),o):t},o.nice=function(){var t=Xi(r.map(i),e?Math:El);return n.domain(t),r=t.map(u),o},o.ticks=function(){var n=Yi(r),o=[],a=n[0],l=n[1],c=Math.floor(i(a)),f=Math.ceil(i(l)),s=t%1?2:t;if(isFinite(f-c)){if(e){for(;f>c;c++)for(var h=1;s>h;h++)o.push(u(c)*h);o.push(u(c))}else for(o.push(u(c));c++<f;)for(var h=s-1;h>0;h--)o.push(u(c)*h);for(c=0;o[c]<a;c++);for(f=o.length;o[f-1]>l;f--);o=o.slice(c,f)}return o},o.tickFormat=function(n,e){if(!arguments.length)return Nl;arguments.length<2?e=Nl:\"function\"!=typeof e&&(e=ao.format(e));var r=Math.max(1,t*n/o.ticks().length);return function(n){var o=n/u(Math.round(i(n)));return t-.5>o*t&&(o*=t),r>=o?e(n):\"\"}},o.copy=function(){return ru(n.copy(),t,e,r)},Ji(o,n)}function iu(n,t,e){function r(t){return n(i(t))}var i=uu(t),u=uu(1/t);return r.invert=function(t){return u(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(i)),r):e},r.ticks=function(n){return Qi(e,n)},r.tickFormat=function(n,t){return nu(e,n,t)},r.nice=function(n){return r.domain(Gi(e,n))},r.exponent=function(o){return arguments.length?(i=uu(t=o),u=uu(1/t),n.domain(e.map(i)),r):t},r.copy=function(){return iu(n.copy(),t,e)},Ji(r,n)}function uu(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function ou(n,t){function e(e){return u[((i.get(e)||(\"range\"===t.t?i.set(e,n.push(e)):NaN))-1)%u.length]}function r(t,e){return ao.range(n.length).map(function(n){return t+e*n})}var i,u,o;return e.domain=function(r){if(!arguments.length)return n;n=[],i=new c;for(var u,o=-1,a=r.length;++o<a;)i.has(u=r[o])||i.set(u,n.push(u));return e[t.t].apply(e,t.a)},e.range=function(n){return arguments.length?(u=n,o=0,t={t:\"range\",a:arguments},e):u},e.rangePoints=function(i,a){arguments.length<2&&(a=0);var l=i[0],c=i[1],f=n.length<2?(l=(l+c)/2,0):(c-l)/(n.length-1+a);return u=r(l+f*a/2,f),o=0,t={t:\"rangePoints\",a:arguments},e},e.rangeRoundPoints=function(i,a){arguments.length<2&&(a=0);var l=i[0],c=i[1],f=n.length<2?(l=c=Math.round((l+c)/2),0):(c-l)/(n.length-1+a)|0;return u=r(l+Math.round(f*a/2+(c-l-(n.length-1+a)*f)/2),f),o=0,t={t:\"rangeRoundPoints\",a:arguments},e},e.rangeBands=function(i,a,l){arguments.length<2&&(a=0),arguments.length<3&&(l=a);var c=i[1]<i[0],f=i[c-0],s=i[1-c],h=(s-f)/(n.length-a+2*l);return u=r(f+h*l,h),c&&u.reverse(),o=h*(1-a),t={t:\"rangeBands\",a:arguments},e},e.rangeRoundBands=function(i,a,l){arguments.length<2&&(a=0),arguments.length<3&&(l=a);var c=i[1]<i[0],f=i[c-0],s=i[1-c],h=Math.floor((s-f)/(n.length-a+2*l));return u=r(f+Math.round((s-f-(n.length-a)*h)/2),h),c&&u.reverse(),o=Math.round(h*(1-a)),t={t:\"rangeRoundBands\",a:arguments},e},e.rangeBand=function(){return o},e.rangeExtent=function(){return Yi(t.a[0])},e.copy=function(){return ou(n,t)},e.domain(n)}function au(n,t){function u(){var e=0,r=t.length;for(a=[];++e<r;)a[e-1]=ao.quantile(n,e/r);return o}function o(n){return isNaN(n=+n)?void 0:t[ao.bisect(a,n)]}var a;return o.domain=function(t){return arguments.length?(n=t.map(r).filter(i).sort(e),u()):n},o.range=function(n){return arguments.length?(t=n,u()):t},o.quantiles=function(){return a},o.invertExtent=function(e){return e=t.indexOf(e),0>e?[NaN,NaN]:[e>0?a[e-1]:n[0],e<a.length?a[e]:n[n.length-1]]},o.copy=function(){return au(n,t)},u()}function lu(n,t,e){function r(t){return e[Math.max(0,Math.min(o,Math.floor(u*(t-n))))]}function i(){return u=e.length/(t-n),o=e.length-1,r}var u,o;return r.domain=function(e){return arguments.length?(n=+e[0],t=+e[e.length-1],i()):[n,t]},r.range=function(n){return arguments.length?(e=n,i()):e},r.invertExtent=function(t){return t=e.indexOf(t),t=0>t?NaN:t/u+n,[t,t+1/u]},r.copy=function(){return lu(n,t,e)},i()}function cu(n,t){function e(e){return e>=e?t[ao.bisect(n,e)]:void 0}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return cu(n,t)},e}function fu(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return Qi(n,t)},t.tickFormat=function(t,e){return nu(n,t,e)},t.copy=function(){return fu(n)},t}function su(){return 0}function hu(n){return n.innerRadius}function pu(n){return n.outerRadius}function gu(n){return n.startAngle}function vu(n){return n.endAngle}function du(n){return n&&n.padAngle}function yu(n,t,e,r){return(n-e)*t-(t-r)*n>0?0:1}function mu(n,t,e,r,i){var u=n[0]-t[0],o=n[1]-t[1],a=(i?r:-r)/Math.sqrt(u*u+o*o),l=a*o,c=-a*u,f=n[0]+l,s=n[1]+c,h=t[0]+l,p=t[1]+c,g=(f+h)/2,v=(s+p)/2,d=h-f,y=p-s,m=d*d+y*y,M=e-r,x=f*p-h*s,b=(0>y?-1:1)*Math.sqrt(Math.max(0,M*M*m-x*x)),_=(x*y-d*b)/m,w=(-x*d-y*b)/m,S=(x*y+d*b)/m,k=(-x*d+y*b)/m,N=_-g,E=w-v,A=S-g,C=k-v;return N*N+E*E>A*A+C*C&&(_=S,w=k),[[_-l,w-c],[_*e/M,w*e/M]]}function Mu(n){function t(t){function o(){c.push(\"M\",u(n(f),a))}for(var l,c=[],f=[],s=-1,h=t.length,p=En(e),g=En(r);++s<h;)i.call(this,l=t[s],s)?f.push([+p.call(this,l,s),+g.call(this,l,s)]):f.length&&(o(),f=[]);return f.length&&o(),c.length?c.join(\"\"):null}var e=Ce,r=ze,i=zt,u=xu,o=u.key,a=.7;return t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t.defined=function(n){return arguments.length?(i=n,t):i},t.interpolate=function(n){return arguments.length?(o=\"function\"==typeof n?u=n:(u=Tl.get(n)||xu).key,t):o},t.tension=function(n){return arguments.length?(a=n,t):a},t}function xu(n){return n.length>1?n.join(\"L\"):n+\"Z\"}function bu(n){return n.join(\"L\")+\"Z\"}function _u(n){for(var t=0,e=n.length,r=n[0],i=[r[0],\",\",r[1]];++t<e;)i.push(\"H\",(r[0]+(r=n[t])[0])/2,\"V\",r[1]);return e>1&&i.push(\"H\",r[0]),i.join(\"\")}function wu(n){for(var t=0,e=n.length,r=n[0],i=[r[0],\",\",r[1]];++t<e;)i.push(\"V\",(r=n[t])[1],\"H\",r[0]);return i.join(\"\")}function Su(n){for(var t=0,e=n.length,r=n[0],i=[r[0],\",\",r[1]];++t<e;)i.push(\"H\",(r=n[t])[0],\"V\",r[1]);return i.join(\"\")}function ku(n,t){return n.length<4?xu(n):n[1]+Au(n.slice(1,-1),Cu(n,t))}function Nu(n,t){return n.length<3?bu(n):n[0]+Au((n.push(n[0]),n),Cu([n[n.length-2]].concat(n,[n[1]]),t))}function Eu(n,t){return n.length<3?xu(n):n[0]+Au(n,Cu(n,t))}function Au(n,t){if(t.length<1||n.length!=t.length&&n.length!=t.length+2)return xu(n);var e=n.length!=t.length,r=\"\",i=n[0],u=n[1],o=t[0],a=o,l=1;if(e&&(r+=\"Q\"+(u[0]-2*o[0]/3)+\",\"+(u[1]-2*o[1]/3)+\",\"+u[0]+\",\"+u[1],i=n[1],l=2),t.length>1){a=t[1],u=n[l],l++,r+=\"C\"+(i[0]+o[0])+\",\"+(i[1]+o[1])+\",\"+(u[0]-a[0])+\",\"+(u[1]-a[1])+\",\"+u[0]+\",\"+u[1];for(var c=2;c<t.length;c++,l++)u=n[l],a=t[c],r+=\"S\"+(u[0]-a[0])+\",\"+(u[1]-a[1])+\",\"+u[0]+\",\"+u[1]}if(e){var f=n[l];r+=\"Q\"+(u[0]+2*a[0]/3)+\",\"+(u[1]+2*a[1]/3)+\",\"+f[0]+\",\"+f[1]}return r}function Cu(n,t){for(var e,r=[],i=(1-t)/2,u=n[0],o=n[1],a=1,l=n.length;++a<l;)e=u,u=o,o=n[a],r.push([i*(o[0]-e[0]),i*(o[1]-e[1])]);return r}function zu(n){if(n.length<3)return xu(n);var t=1,e=n.length,r=n[0],i=r[0],u=r[1],o=[i,i,i,(r=n[1])[0]],a=[u,u,u,r[1]],l=[i,\",\",u,\"L\",Ru(Pl,o),\",\",Ru(Pl,a)];for(n.push(n[e-1]);++t<=e;)r=n[t],o.shift(),o.push(r[0]),a.shift(),a.push(r[1]),Du(l,o,a);return n.pop(),l.push(\"L\",r),l.join(\"\")}function Lu(n){if(n.length<4)return xu(n);for(var t,e=[],r=-1,i=n.length,u=[0],o=[0];++r<3;)t=n[r],u.push(t[0]),o.push(t[1]);for(e.push(Ru(Pl,u)+\",\"+Ru(Pl,o)),--r;++r<i;)t=n[r],u.shift(),u.push(t[0]),o.shift(),o.push(t[1]),Du(e,u,o);return e.join(\"\")}function qu(n){for(var t,e,r=-1,i=n.length,u=i+4,o=[],a=[];++r<4;)e=n[r%i],o.push(e[0]),a.push(e[1]);for(t=[Ru(Pl,o),\",\",Ru(Pl,a)],--r;++r<u;)e=n[r%i],o.shift(),o.push(e[0]),a.shift(),a.push(e[1]),Du(t,o,a);return t.join(\"\")}function Tu(n,t){var e=n.length-1;if(e)for(var r,i,u=n[0][0],o=n[0][1],a=n[e][0]-u,l=n[e][1]-o,c=-1;++c<=e;)r=n[c],i=c/e,r[0]=t*r[0]+(1-t)*(u+i*a),r[1]=t*r[1]+(1-t)*(o+i*l);return zu(n)}function Ru(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]}function Du(n,t,e){n.push(\"C\",Ru(Rl,t),\",\",Ru(Rl,e),\",\",Ru(Dl,t),\",\",Ru(Dl,e),\",\",Ru(Pl,t),\",\",Ru(Pl,e))}function Pu(n,t){return(t[1]-n[1])/(t[0]-n[0])}function Uu(n){for(var t=0,e=n.length-1,r=[],i=n[0],u=n[1],o=r[0]=Pu(i,u);++t<e;)r[t]=(o+(o=Pu(i=u,u=n[t+1])))/2;return r[t]=o,r}function ju(n){for(var t,e,r,i,u=[],o=Uu(n),a=-1,l=n.length-1;++a<l;)t=Pu(n[a],n[a+1]),xo(t)<Uo?o[a]=o[a+1]=0:(e=o[a]/t,r=o[a+1]/t,i=e*e+r*r,i>9&&(i=3*t/Math.sqrt(i),o[a]=i*e,o[a+1]=i*r));for(a=-1;++a<=l;)i=(n[Math.min(l,a+1)][0]-n[Math.max(0,a-1)][0])/(6*(1+o[a]*o[a])),u.push([i||0,o[a]*i||0]);return u}function Fu(n){return n.length<3?xu(n):n[0]+Au(n,ju(n))}function Hu(n){for(var t,e,r,i=-1,u=n.length;++i<u;)t=n[i],e=t[0],r=t[1]-Io,t[0]=e*Math.cos(r),t[1]=e*Math.sin(r);return n}function Ou(n){function t(t){function l(){v.push(\"M\",a(n(y),s),f,c(n(d.reverse()),s),\"Z\")}for(var h,p,g,v=[],d=[],y=[],m=-1,M=t.length,x=En(e),b=En(i),_=e===r?function(){return p}:En(r),w=i===u?function(){return g}:En(u);++m<M;)o.call(this,h=t[m],m)?(d.push([p=+x.call(this,h,m),g=+b.call(this,h,m)]),y.push([+_.call(this,h,m),+w.call(this,h,m)])):d.length&&(l(),d=[],y=[]);return d.length&&l(),v.length?v.join(\"\"):null}var e=Ce,r=Ce,i=0,u=ze,o=zt,a=xu,l=a.key,c=a,f=\"L\",s=.7;return t.x=function(n){return arguments.length?(e=r=n,t):r},t.x0=function(n){return arguments.length?(e=n,t):e},t.x1=function(n){return arguments.length?(r=n,t):r},t.y=function(n){return arguments.length?(i=u=n,t):u},t.y0=function(n){return arguments.length?(i=n,t):i},t.y1=function(n){return arguments.length?(u=n,t):u},t.defined=function(n){return arguments.length?(o=n,t):o},t.interpolate=function(n){return arguments.length?(l=\"function\"==typeof n?a=n:(a=Tl.get(n)||xu).key,c=a.reverse||a,f=a.closed?\"M\":\"L\",t):l},t.tension=function(n){return arguments.length?(s=n,t):s},t}function Iu(n){return n.radius}function Yu(n){return[n.x,n.y]}function Zu(n){return function(){var t=n.apply(this,arguments),e=t[0],r=t[1]-Io;return[e*Math.cos(r),e*Math.sin(r)]}}function Vu(){return 64}function Xu(){return\"circle\"}function $u(n){var t=Math.sqrt(n/Fo);return\"M0,\"+t+\"A\"+t+\",\"+t+\" 0 1,1 0,\"+-t+\"A\"+t+\",\"+t+\" 0 1,1 0,\"+t+\"Z\"}function Bu(n){return function(){var t,e,r;(t=this[n])&&(r=t[e=t.active])&&(r.timer.c=null,r.timer.t=NaN,--t.count?delete t[e]:delete this[n],t.active+=.5,r.event&&r.event.interrupt.call(this,this.__data__,r.index))}}function Wu(n,t,e){return ko(n,Yl),n.namespace=t,n.id=e,n}function Ju(n,t,e,r){var i=n.id,u=n.namespace;return Y(n,\"function\"==typeof e?function(n,o,a){n[u][i].tween.set(t,r(e.call(n,n.__data__,o,a)))}:(e=r(e),function(n){n[u][i].tween.set(t,e)}))}function Gu(n){return null==n&&(n=\"\"),function(){this.textContent=n}}function Ku(n){return null==n?\"__transition__\":\"__transition_\"+n+\"__\"}function Qu(n,t,e,r,i){function u(n){var t=v.delay;return f.t=t+l,n>=t?o(n-t):void(f.c=o)}function o(e){var i=g.active,u=g[i];u&&(u.timer.c=null,u.timer.t=NaN,--g.count,delete g[i],u.event&&u.event.interrupt.call(n,n.__data__,u.index));for(var o in g)if(r>+o){var c=g[o];c.timer.c=null,c.timer.t=NaN,--g.count,delete g[o]}f.c=a,qn(function(){return f.c&&a(e||1)&&(f.c=null,f.t=NaN),1},0,l),g.active=r,v.event&&v.event.start.call(n,n.__data__,t),p=[],v.tween.forEach(function(e,r){(r=r.call(n,n.__data__,t))&&p.push(r)}),h=v.ease,s=v.duration}function a(i){for(var u=i/s,o=h(u),a=p.length;a>0;)p[--a].call(n,o);return u>=1?(v.event&&v.event.end.call(n,n.__data__,t),--g.count?delete g[r]:delete n[e],1):void 0}var l,f,s,h,p,g=n[e]||(n[e]={active:0,count:0}),v=g[r];v||(l=i.time,f=qn(u,0,l),v=g[r]={tween:new c,time:l,timer:f,delay:i.delay,duration:i.duration,ease:i.ease,index:t},i=null,++g.count)}function no(n,t,e){n.attr(\"transform\",function(n){var r=t(n);return\"translate(\"+(isFinite(r)?r:e(n))+\",0)\"})}function to(n,t,e){n.attr(\"transform\",function(n){var r=t(n);return\"translate(0,\"+(isFinite(r)?r:e(n))+\")\"})}function eo(n){return n.toISOString()}function ro(n,t,e){function r(t){return n(t)}function i(n,e){var r=n[1]-n[0],i=r/e,u=ao.bisect(Kl,i);return u==Kl.length?[t.year,Ki(n.map(function(n){return n/31536e6}),e)[2]]:u?t[i/Kl[u-1]<Kl[u]/i?u-1:u]:[tc,Ki(n,e)[2]]}return r.invert=function(t){return io(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain(t),r):n.domain().map(io)},r.nice=function(n,t){function e(e){return!isNaN(e)&&!n.range(e,io(+e+1),t).length}var u=r.domain(),o=Yi(u),a=null==n?i(o,10):\"number\"==typeof n&&i(o,n);return a&&(n=a[0],t=a[1]),r.domain(Xi(u,t>1?{floor:function(t){for(;e(t=n.floor(t));)t=io(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=io(+t+1);return t}}:n))},r.ticks=function(n,t){var e=Yi(r.domain()),u=null==n?i(e,10):\"number\"==typeof n?i(e,n):!n.range&&[{range:n},t];return u&&(n=u[0],t=u[1]),n.range(e[0],io(+e[1]+1),1>t?1:t)},r.tickFormat=function(){return e},r.copy=function(){return ro(n.copy(),t,e)},Ji(r,n)}function io(n){return new Date(n)}function uo(n){return JSON.parse(n.responseText)}function oo(n){var t=fo.createRange();return t.selectNode(fo.body),t.createContextualFragment(n.responseText)}var ao={version:\"3.5.17\"},lo=[].slice,co=function(n){return lo.call(n)},fo=this.document;if(fo)try{co(fo.documentElement.childNodes)[0].nodeType}catch(so){co=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}if(Date.now||(Date.now=function(){return+new Date}),fo)try{fo.createElement(\"DIV\").style.setProperty(\"opacity\",0,\"\")}catch(ho){var po=this.Element.prototype,go=po.setAttribute,vo=po.setAttributeNS,yo=this.CSSStyleDeclaration.prototype,mo=yo.setProperty;po.setAttribute=function(n,t){go.call(this,n,t+\"\")},po.setAttributeNS=function(n,t,e){vo.call(this,n,t,e+\"\")},yo.setProperty=function(n,t,e){mo.call(this,n,t+\"\",e)}}ao.ascending=e,ao.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:NaN},ao.min=function(n,t){var e,r,i=-1,u=n.length;if(1===arguments.length){for(;++i<u;)if(null!=(r=n[i])&&r>=r){e=r;break}for(;++i<u;)null!=(r=n[i])&&e>r&&(e=r)}else{for(;++i<u;)if(null!=(r=t.call(n,n[i],i))&&r>=r){e=r;break}for(;++i<u;)null!=(r=t.call(n,n[i],i))&&e>r&&(e=r)}return e},ao.max=function(n,t){var e,r,i=-1,u=n.length;if(1===arguments.length){for(;++i<u;)if(null!=(r=n[i])&&r>=r){e=r;break}for(;++i<u;)null!=(r=n[i])&&r>e&&(e=r)}else{for(;++i<u;)if(null!=(r=t.call(n,n[i],i))&&r>=r){e=r;break}for(;++i<u;)null!=(r=t.call(n,n[i],i))&&r>e&&(e=r)}return e},ao.extent=function(n,t){var e,r,i,u=-1,o=n.length;if(1===arguments.length){for(;++u<o;)if(null!=(r=n[u])&&r>=r){e=i=r;break}for(;++u<o;)null!=(r=n[u])&&(e>r&&(e=r),r>i&&(i=r))}else{for(;++u<o;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=i=r;break}for(;++u<o;)null!=(r=t.call(n,n[u],u))&&(e>r&&(e=r),r>i&&(i=r))}return[e,i]},ao.sum=function(n,t){var e,r=0,u=n.length,o=-1;if(1===arguments.length)for(;++o<u;)i(e=+n[o])&&(r+=e);else for(;++o<u;)i(e=+t.call(n,n[o],o))&&(r+=e);return r},ao.mean=function(n,t){var e,u=0,o=n.length,a=-1,l=o;if(1===arguments.length)for(;++a<o;)i(e=r(n[a]))?u+=e:--l;else for(;++a<o;)i(e=r(t.call(n,n[a],a)))?u+=e:--l;return l?u/l:void 0},ao.quantile=function(n,t){var e=(n.length-1)*t+1,r=Math.floor(e),i=+n[r-1],u=e-r;return u?i+u*(n[r]-i):i},ao.median=function(n,t){var u,o=[],a=n.length,l=-1;if(1===arguments.length)for(;++l<a;)i(u=r(n[l]))&&o.push(u);else for(;++l<a;)i(u=r(t.call(n,n[l],l)))&&o.push(u);return o.length?ao.quantile(o.sort(e),.5):void 0},ao.variance=function(n,t){var e,u,o=n.length,a=0,l=0,c=-1,f=0;if(1===arguments.length)for(;++c<o;)i(e=r(n[c]))&&(u=e-a,a+=u/++f,l+=u*(e-a));else for(;++c<o;)i(e=r(t.call(n,n[c],c)))&&(u=e-a,a+=u/++f,l+=u*(e-a));return f>1?l/(f-1):void 0},ao.deviation=function(){var n=ao.variance.apply(this,arguments);return n?Math.sqrt(n):n};var Mo=u(e);ao.bisectLeft=Mo.left,ao.bisect=ao.bisectRight=Mo.right,ao.bisector=function(n){return u(1===n.length?function(t,r){return e(n(t),r)}:n)},ao.shuffle=function(n,t,e){(u=arguments.length)<3&&(e=n.length,2>u&&(t=0));for(var r,i,u=e-t;u;)i=Math.random()*u--|0,r=n[u+t],n[u+t]=n[i+t],n[i+t]=r;return n},ao.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},ao.pairs=function(n){for(var t,e=0,r=n.length-1,i=n[0],u=new Array(0>r?0:r);r>e;)u[e]=[t=i,i=n[++e]];return u},ao.transpose=function(n){if(!(i=n.length))return[];for(var t=-1,e=ao.min(n,o),r=new Array(e);++t<e;)for(var i,u=-1,a=r[t]=new Array(i);++u<i;)a[u]=n[u][t];return r},ao.zip=function(){return ao.transpose(arguments)},ao.keys=function(n){var t=[];for(var e in n)t.push(e);return t},ao.values=function(n){var t=[];for(var e in n)t.push(n[e]);return t},ao.entries=function(n){var t=[];for(var e in n)t.push({key:e,value:n[e]});return t},ao.merge=function(n){for(var t,e,r,i=n.length,u=-1,o=0;++u<i;)o+=n[u].length;for(e=new Array(o);--i>=0;)for(r=n[i],t=r.length;--t>=0;)e[--o]=r[t];return e};var xo=Math.abs;ao.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),(t-n)/e===1/0)throw new Error(\"infinite range\");var r,i=[],u=a(xo(e)),o=-1;if(n*=u,t*=u,e*=u,0>e)for(;(r=n+e*++o)>t;)i.push(r/u);else for(;(r=n+e*++o)<t;)i.push(r/u);return i},ao.map=function(n,t){var e=new c;if(n instanceof c)n.forEach(function(n,t){e.set(n,t)});else if(Array.isArray(n)){var r,i=-1,u=n.length;if(1===arguments.length)for(;++i<u;)e.set(i,n[i]);else for(;++i<u;)e.set(t.call(n,r=n[i],i),r)}else for(var o in n)e.set(o,n[o]);return e};var bo=\"__proto__\",_o=\"\\x00\";l(c,{has:h,get:function(n){return this._[f(n)]},set:function(n,t){return this._[f(n)]=t},remove:p,keys:g,values:function(){var n=[];for(var t in this._)n.push(this._[t]);return n},entries:function(){var n=[];for(var t in this._)n.push({key:s(t),value:this._[t]});return n},size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,s(t),this._[t])}}),ao.nest=function(){function n(t,o,a){if(a>=u.length)return r?r.call(i,o):e?o.sort(e):o;for(var l,f,s,h,p=-1,g=o.length,v=u[a++],d=new c;++p<g;)(h=d.get(l=v(f=o[p])))?h.push(f):d.set(l,[f]);return t?(f=t(),s=function(e,r){f.set(e,n(t,r,a))}):(f={},s=function(e,r){f[e]=n(t,r,a)}),d.forEach(s),f}function t(n,e){if(e>=u.length)return n;var r=[],i=o[e++];return n.forEach(function(n,i){r.push({key:n,values:t(i,e)})}),i?r.sort(function(n,t){return i(n.key,t.key)}):r}var e,r,i={},u=[],o=[];return i.map=function(t,e){return n(e,t,0)},i.entries=function(e){return t(n(ao.map,e,0),0)},i.key=function(n){return u.push(n),i},i.sortKeys=function(n){return o[u.length-1]=n,i},i.sortValues=function(n){return e=n,i},i.rollup=function(n){return r=n,i},i},ao.set=function(n){var t=new y;if(n)for(var e=0,r=n.length;r>e;++e)t.add(n[e]);return t},l(y,{has:h,add:function(n){return this._[f(n+=\"\")]=!0,n},remove:p,values:g,size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,s(t))}}),ao.behavior={},ao.rebind=function(n,t){for(var e,r=1,i=arguments.length;++r<i;)n[e=arguments[r]]=M(n,t,t[e]);return n};var wo=[\"webkit\",\"ms\",\"moz\",\"Moz\",\"o\",\"O\"];ao.dispatch=function(){for(var n=new _,t=-1,e=arguments.length;++t<e;)n[arguments[t]]=w(n);return n},_.prototype.on=function(n,t){var e=n.indexOf(\".\"),r=\"\";if(e>=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},ao.event=null,ao.requote=function(n){return n.replace(So,\"\\\\$&\")};var So=/[\\\\\\^\\$\\*\\+\\?\\|\\[\\]\\(\\)\\.\\{\\}]/g,ko={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},No=function(n,t){return t.querySelector(n)},Eo=function(n,t){return t.querySelectorAll(n)},Ao=function(n,t){var e=n.matches||n[x(n,\"matchesSelector\")];return(Ao=function(n,t){return e.call(n,t)})(n,t)};\"function\"==typeof Sizzle&&(No=function(n,t){return Sizzle(n,t)[0]||null},Eo=Sizzle,Ao=Sizzle.matchesSelector),ao.selection=function(){return ao.select(fo.documentElement)};var Co=ao.selection.prototype=[];Co.select=function(n){var t,e,r,i,u=[];n=A(n);for(var o=-1,a=this.length;++o<a;){u.push(t=[]),t.parentNode=(r=this[o]).parentNode;for(var l=-1,c=r.length;++l<c;)(i=r[l])?(t.push(e=n.call(i,i.__data__,l,o)),e&&\"__data__\"in i&&(e.__data__=i.__data__)):t.push(null)}return E(u)},Co.selectAll=function(n){var t,e,r=[];n=C(n);for(var i=-1,u=this.length;++i<u;)for(var o=this[i],a=-1,l=o.length;++a<l;)(e=o[a])&&(r.push(t=co(n.call(e,e.__data__,a,i))),t.parentNode=e);return E(r)};var zo=\"http://www.w3.org/1999/xhtml\",Lo={svg:\"http://www.w3.org/2000/svg\",xhtml:zo,xlink:\"http://www.w3.org/1999/xlink\",xml:\"http://www.w3.org/XML/1998/namespace\",xmlns:\"http://www.w3.org/2000/xmlns/\"};ao.ns={prefix:Lo,qualify:function(n){var t=n.indexOf(\":\"),e=n;return t>=0&&\"xmlns\"!==(e=n.slice(0,t))&&(n=n.slice(t+1)),Lo.hasOwnProperty(e)?{space:Lo[e],local:n}:n}},Co.attr=function(n,t){if(arguments.length<2){if(\"string\"==typeof n){var e=this.node();return n=ao.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(z(t,n[t]));return this}return this.each(z(n,t))},Co.classed=function(n,t){if(arguments.length<2){if(\"string\"==typeof n){var e=this.node(),r=(n=T(n)).length,i=-1;if(t=e.classList){for(;++i<r;)if(!t.contains(n[i]))return!1}else for(t=e.getAttribute(\"class\");++i<r;)if(!q(n[i]).test(t))return!1;return!0}for(t in n)this.each(R(t,n[t]));return this}return this.each(R(n,t))},Co.style=function(n,e,r){var i=arguments.length;if(3>i){if(\"string\"!=typeof n){2>i&&(e=\"\");for(r in n)this.each(P(r,n[r],e));return this}if(2>i){var u=this.node();return t(u).getComputedStyle(u,null).getPropertyValue(n)}r=\"\"}return this.each(P(n,e,r))},Co.property=function(n,t){if(arguments.length<2){if(\"string\"==typeof n)return this.node()[n];for(t in n)this.each(U(t,n[t]));return this}return this.each(U(n,t))},Co.text=function(n){return arguments.length?this.each(\"function\"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?\"\":t}:null==n?function(){this.textContent=\"\"}:function(){this.textContent=n}):this.node().textContent},Co.html=function(n){return arguments.length?this.each(\"function\"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?\"\":t}:null==n?function(){this.innerHTML=\"\"}:function(){this.innerHTML=n}):this.node().innerHTML},Co.append=function(n){return n=j(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},Co.insert=function(n,t){return n=j(n),t=A(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},Co.remove=function(){return this.each(F)},Co.data=function(n,t){function e(n,e){var r,i,u,o=n.length,s=e.length,h=Math.min(o,s),p=new Array(s),g=new Array(s),v=new Array(o);if(t){var d,y=new c,m=new Array(o);for(r=-1;++r<o;)(i=n[r])&&(y.has(d=t.call(i,i.__data__,r))?v[r]=i:y.set(d,i),m[r]=d);for(r=-1;++r<s;)(i=y.get(d=t.call(e,u=e[r],r)))?i!==!0&&(p[r]=i,i.__data__=u):g[r]=H(u),y.set(d,!0);for(r=-1;++r<o;)r in m&&y.get(m[r])!==!0&&(v[r]=n[r])}else{for(r=-1;++r<h;)i=n[r],u=e[r],i?(i.__data__=u,p[r]=i):g[r]=H(u);for(;s>r;++r)g[r]=H(e[r]);for(;o>r;++r)v[r]=n[r]}g.update=p,g.parentNode=p.parentNode=v.parentNode=n.parentNode,a.push(g),l.push(p),f.push(v)}var r,i,u=-1,o=this.length;if(!arguments.length){for(n=new Array(o=(r=this[0]).length);++u<o;)(i=r[u])&&(n[u]=i.__data__);return n}var a=Z([]),l=E([]),f=E([]);if(\"function\"==typeof n)for(;++u<o;)e(r=this[u],n.call(r,r.parentNode.__data__,u));else for(;++u<o;)e(r=this[u],n);return l.enter=function(){return a},l.exit=function(){return f},l},Co.datum=function(n){return arguments.length?this.property(\"__data__\",n):this.property(\"__data__\")},Co.filter=function(n){var t,e,r,i=[];\"function\"!=typeof n&&(n=O(n));for(var u=0,o=this.length;o>u;u++){i.push(t=[]),t.parentNode=(e=this[u]).parentNode;for(var a=0,l=e.length;l>a;a++)(r=e[a])&&n.call(r,r.__data__,a,u)&&t.push(r)}return E(i)},Co.order=function(){for(var n=-1,t=this.length;++n<t;)for(var e,r=this[n],i=r.length-1,u=r[i];--i>=0;)(e=r[i])&&(u&&u!==e.nextSibling&&u.parentNode.insertBefore(e,u),u=e);return this},Co.sort=function(n){n=I.apply(this,arguments);for(var t=-1,e=this.length;++t<e;)this[t].sort(n);return this.order()},Co.each=function(n){return Y(this,function(t,e,r){n.call(t,t.__data__,e,r)})},Co.call=function(n){var t=co(arguments);return n.apply(t[0]=this,t),this},Co.empty=function(){return!this.node()},Co.node=function(){for(var n=0,t=this.length;t>n;n++)for(var e=this[n],r=0,i=e.length;i>r;r++){var u=e[r];if(u)return u}return null},Co.size=function(){var n=0;return Y(this,function(){++n}),n};var qo=[];ao.selection.enter=Z,ao.selection.enter.prototype=qo,qo.append=Co.append,qo.empty=Co.empty,qo.node=Co.node,qo.call=Co.call,qo.size=Co.size,qo.select=function(n){for(var t,e,r,i,u,o=[],a=-1,l=this.length;++a<l;){r=(i=this[a]).update,o.push(t=[]),t.parentNode=i.parentNode;for(var c=-1,f=i.length;++c<f;)(u=i[c])?(t.push(r[c]=e=n.call(i.parentNode,u.__data__,c,a)),e.__data__=u.__data__):t.push(null)}return E(o)},qo.insert=function(n,t){return arguments.length<2&&(t=V(this)),Co.insert.call(this,n,t)},ao.select=function(t){var e;return\"string\"==typeof t?(e=[No(t,fo)],e.parentNode=fo.documentElement):(e=[t],e.parentNode=n(t)),E([e])},ao.selectAll=function(n){var t;return\"string\"==typeof n?(t=co(Eo(n,fo)),t.parentNode=fo.documentElement):(t=co(n),t.parentNode=null),E([t])},Co.on=function(n,t,e){var r=arguments.length;if(3>r){if(\"string\"!=typeof n){2>r&&(t=!1);for(e in n)this.each(X(e,n[e],t));return this}if(2>r)return(r=this.node()[\"__on\"+n])&&r._;e=!1}return this.each(X(n,t,e))};var To=ao.map({mouseenter:\"mouseover\",mouseleave:\"mouseout\"});fo&&To.forEach(function(n){\"on\"+n in fo&&To.remove(n)});var Ro,Do=0;ao.mouse=function(n){return J(n,k())};var Po=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;ao.touch=function(n,t,e){if(arguments.length<3&&(e=t,t=k().changedTouches),t)for(var r,i=0,u=t.length;u>i;++i)if((r=t[i]).identifier===e)return J(n,r)},ao.behavior.drag=function(){function n(){this.on(\"mousedown.drag\",u).on(\"touchstart.drag\",o)}function e(n,t,e,u,o){return function(){function a(){var n,e,r=t(h,v);r&&(n=r[0]-M[0],e=r[1]-M[1],g|=n|e,M=r,p({type:\"drag\",x:r[0]+c[0],y:r[1]+c[1],dx:n,dy:e}))}function l(){t(h,v)&&(y.on(u+d,null).on(o+d,null),m(g),p({type:\"dragend\"}))}var c,f=this,s=ao.event.target.correspondingElement||ao.event.target,h=f.parentNode,p=r.of(f,arguments),g=0,v=n(),d=\".drag\"+(null==v?\"\":\"-\"+v),y=ao.select(e(s)).on(u+d,a).on(o+d,l),m=W(s),M=t(h,v);i?(c=i.apply(f,arguments),c=[c.x-M[0],c.y-M[1]]):c=[0,0],p({type:\"dragstart\"})}}var r=N(n,\"drag\",\"dragstart\",\"dragend\"),i=null,u=e(b,ao.mouse,t,\"mousemove\",\"mouseup\"),o=e(G,ao.touch,m,\"touchmove\",\"touchend\");return n.origin=function(t){return arguments.length?(i=t,n):i},ao.rebind(n,r,\"on\")},ao.touches=function(n,t){return arguments.length<2&&(t=k().touches),t?co(t).map(function(t){var e=J(n,t);return e.identifier=t.identifier,e}):[]};var Uo=1e-6,jo=Uo*Uo,Fo=Math.PI,Ho=2*Fo,Oo=Ho-Uo,Io=Fo/2,Yo=Fo/180,Zo=180/Fo,Vo=Math.SQRT2,Xo=2,$o=4;ao.interpolateZoom=function(n,t){var e,r,i=n[0],u=n[1],o=n[2],a=t[0],l=t[1],c=t[2],f=a-i,s=l-u,h=f*f+s*s;if(jo>h)r=Math.log(c/o)/Vo,e=function(n){return[i+n*f,u+n*s,o*Math.exp(Vo*n*r)]};else{var p=Math.sqrt(h),g=(c*c-o*o+$o*h)/(2*o*Xo*p),v=(c*c-o*o-$o*h)/(2*c*Xo*p),d=Math.log(Math.sqrt(g*g+1)-g),y=Math.log(Math.sqrt(v*v+1)-v);r=(y-d)/Vo,e=function(n){var t=n*r,e=rn(d),a=o/(Xo*p)*(e*un(Vo*t+d)-en(d));return[i+a*f,u+a*s,o*e/rn(Vo*t+d)]}}return e.duration=1e3*r,e},ao.behavior.zoom=function(){function n(n){n.on(L,s).on(Wo+\".zoom\",p).on(\"dblclick.zoom\",g).on(R,h)}function e(n){return[(n[0]-k.x)/k.k,(n[1]-k.y)/k.k]}function r(n){return[n[0]*k.k+k.x,n[1]*k.k+k.y]}function i(n){k.k=Math.max(A[0],Math.min(A[1],n))}function u(n,t){t=r(t),k.x+=n[0]-t[0],k.y+=n[1]-t[1]}function o(t,e,r,o){t.__chart__={x:k.x,y:k.y,k:k.k},i(Math.pow(2,o)),u(d=e,r),t=ao.select(t),C>0&&(t=t.transition().duration(C)),t.call(n.event)}function a(){b&&b.domain(x.range().map(function(n){return(n-k.x)/k.k}).map(x.invert)),w&&w.domain(_.range().map(function(n){return(n-k.y)/k.k}).map(_.invert))}function l(n){z++||n({type:\"zoomstart\"})}function c(n){a(),n({type:\"zoom\",scale:k.k,translate:[k.x,k.y]})}function f(n){--z||(n({type:\"zoomend\"}),d=null)}function s(){function n(){a=1,u(ao.mouse(i),h),c(o)}function r(){s.on(q,null).on(T,null),p(a),f(o)}var i=this,o=D.of(i,arguments),a=0,s=ao.select(t(i)).on(q,n).on(T,r),h=e(ao.mouse(i)),p=W(i);Il.call(i),l(o)}function h(){function n(){var n=ao.touches(g);return p=k.k,n.forEach(function(n){n.identifier in d&&(d[n.identifier]=e(n))}),n}function t(){var t=ao.event.target;ao.select(t).on(x,r).on(b,a),_.push(t);for(var e=ao.event.changedTouches,i=0,u=e.length;u>i;++i)d[e[i].identifier]=null;var l=n(),c=Date.now();if(1===l.length){if(500>c-M){var f=l[0];o(g,f,d[f.identifier],Math.floor(Math.log(k.k)/Math.LN2)+1),S()}M=c}else if(l.length>1){var f=l[0],s=l[1],h=f[0]-s[0],p=f[1]-s[1];y=h*h+p*p}}function r(){var n,t,e,r,o=ao.touches(g);Il.call(g);for(var a=0,l=o.length;l>a;++a,r=null)if(e=o[a],r=d[e.identifier]){if(t)break;n=e,t=r}if(r){var f=(f=e[0]-n[0])*f+(f=e[1]-n[1])*f,s=y&&Math.sqrt(f/y);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+r[0])/2,(t[1]+r[1])/2],i(s*p)}M=null,u(n,t),c(v)}function a(){if(ao.event.touches.length){for(var t=ao.event.changedTouches,e=0,r=t.length;r>e;++e)delete d[t[e].identifier];for(var i in d)return void n()}ao.selectAll(_).on(m,null),w.on(L,s).on(R,h),N(),f(v)}var p,g=this,v=D.of(g,arguments),d={},y=0,m=\".zoom-\"+ao.event.changedTouches[0].identifier,x=\"touchmove\"+m,b=\"touchend\"+m,_=[],w=ao.select(g),N=W(g);t(),l(v),w.on(L,null).on(R,t)}function p(){var n=D.of(this,arguments);m?clearTimeout(m):(Il.call(this),v=e(d=y||ao.mouse(this)),l(n)),m=setTimeout(function(){m=null,f(n)},50),S(),i(Math.pow(2,.002*Bo())*k.k),u(d,v),c(n)}function g(){var n=ao.mouse(this),t=Math.log(k.k)/Math.LN2;o(this,n,e(n),ao.event.shiftKey?Math.ceil(t)-1:Math.floor(t)+1)}var v,d,y,m,M,x,b,_,w,k={x:0,y:0,k:1},E=[960,500],A=Jo,C=250,z=0,L=\"mousedown.zoom\",q=\"mousemove.zoom\",T=\"mouseup.zoom\",R=\"touchstart.zoom\",D=N(n,\"zoomstart\",\"zoom\",\"zoomend\");return Wo||(Wo=\"onwheel\"in fo?(Bo=function(){return-ao.event.deltaY*(ao.event.deltaMode?120:1)},\"wheel\"):\"onmousewheel\"in fo?(Bo=function(){return ao.event.wheelDelta},\"mousewheel\"):(Bo=function(){return-ao.event.detail},\"MozMousePixelScroll\")),n.event=function(n){n.each(function(){var n=D.of(this,arguments),t=k;Hl?ao.select(this).transition().each(\"start.zoom\",function(){k=this.__chart__||{x:0,y:0,k:1},l(n)}).tween(\"zoom:zoom\",function(){var e=E[0],r=E[1],i=d?d[0]:e/2,u=d?d[1]:r/2,o=ao.interpolateZoom([(i-k.x)/k.k,(u-k.y)/k.k,e/k.k],[(i-t.x)/t.k,(u-t.y)/t.k,e/t.k]);return function(t){var r=o(t),a=e/r[2];this.__chart__=k={x:i-r[0]*a,y:u-r[1]*a,k:a},c(n)}}).each(\"interrupt.zoom\",function(){f(n)}).each(\"end.zoom\",function(){f(n)}):(this.__chart__=k,l(n),c(n),f(n))})},n.translate=function(t){return arguments.length?(k={x:+t[0],y:+t[1],k:k.k},a(),n):[k.x,k.y]},n.scale=function(t){return arguments.length?(k={x:k.x,y:k.y,k:null},i(+t),a(),n):k.k},n.scaleExtent=function(t){return arguments.length?(A=null==t?Jo:[+t[0],+t[1]],n):A},n.center=function(t){return arguments.length?(y=t&&[+t[0],+t[1]],n):y},n.size=function(t){return arguments.length?(E=t&&[+t[0],+t[1]],n):E},n.duration=function(t){return arguments.length?(C=+t,n):C},n.x=function(t){return arguments.length?(b=t,x=t.copy(),k={x:0,y:0,k:1},n):b},n.y=function(t){return arguments.length?(w=t,_=t.copy(),k={x:0,y:0,k:1},n):w},ao.rebind(n,D,\"on\")};var Bo,Wo,Jo=[0,1/0];ao.color=an,an.prototype.toString=function(){return this.rgb()+\"\"},ao.hsl=ln;var Go=ln.prototype=new an;Go.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,this.l/n)},Go.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,n*this.l)},Go.rgb=function(){return cn(this.h,this.s,this.l)},ao.hcl=fn;var Ko=fn.prototype=new an;Ko.brighter=function(n){return new fn(this.h,this.c,Math.min(100,this.l+Qo*(arguments.length?n:1)))},Ko.darker=function(n){return new fn(this.h,this.c,Math.max(0,this.l-Qo*(arguments.length?n:1)))},Ko.rgb=function(){return sn(this.h,this.c,this.l).rgb()},ao.lab=hn;var Qo=18,na=.95047,ta=1,ea=1.08883,ra=hn.prototype=new an;ra.brighter=function(n){return new hn(Math.min(100,this.l+Qo*(arguments.length?n:1)),this.a,this.b)},ra.darker=function(n){return new hn(Math.max(0,this.l-Qo*(arguments.length?n:1)),this.a,this.b)},ra.rgb=function(){return pn(this.l,this.a,this.b)},ao.rgb=mn;var ia=mn.prototype=new an;ia.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,i=30;return t||e||r?(t&&i>t&&(t=i),e&&i>e&&(e=i),r&&i>r&&(r=i),new mn(Math.min(255,t/n),Math.min(255,e/n),Math.min(255,r/n))):new mn(i,i,i)},ia.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new mn(n*this.r,n*this.g,n*this.b)},ia.hsl=function(){return wn(this.r,this.g,this.b)},ia.toString=function(){return\"#\"+bn(this.r)+bn(this.g)+bn(this.b)};var ua=ao.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});ua.forEach(function(n,t){ua.set(n,Mn(t))}),ao.functor=En,ao.xhr=An(m),ao.dsv=function(n,t){function e(n,e,u){arguments.length<3&&(u=e,e=null);var o=Cn(n,t,null==e?r:i(e),u);return o.row=function(n){return arguments.length?o.response(null==(e=n)?r:i(n)):e},o}function r(n){return e.parse(n.responseText)}function i(n){return function(t){return e.parse(t.responseText,n)}}function u(t){return t.map(o).join(n)}function o(n){return a.test(n)?'\"'+n.replace(/\\\"/g,'\"\"')+'\"':n}var a=new RegExp('[\"'+n+\"\\n]\"),l=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var i=new Function(\"d\",\"return {\"+n.map(function(n,t){return JSON.stringify(n)+\": d[\"+t+\"]\"}).join(\",\")+\"}\");r=t?function(n,e){return t(i(n),e)}:i})},e.parseRows=function(n,t){function e(){if(f>=c)return o;if(i)return i=!1,u;var t=f;if(34===n.charCodeAt(t)){for(var e=t;e++<c;)if(34===n.charCodeAt(e)){if(34!==n.charCodeAt(e+1))break;++e}f=e+2;var r=n.charCodeAt(e+1);return 13===r?(i=!0,10===n.charCodeAt(e+2)&&++f):10===r&&(i=!0),n.slice(t+1,e).replace(/\"\"/g,'\"')}for(;c>f;){var r=n.charCodeAt(f++),a=1;if(10===r)i=!0;else if(13===r)i=!0,10===n.charCodeAt(f)&&(++f,++a);else if(r!==l)continue;return n.slice(t,f-a)}return n.slice(t)}for(var r,i,u={},o={},a=[],c=n.length,f=0,s=0;(r=e())!==o;){for(var h=[];r!==u&&r!==o;)h.push(r),r=e();t&&null==(h=t(h,s++))||a.push(h)}return a},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new y,i=[];return t.forEach(function(n){for(var t in n)r.has(t)||i.push(r.add(t))}),[i.map(o).join(n)].concat(t.map(function(t){return i.map(function(n){return o(t[n])}).join(n)})).join(\"\\n\")},e.formatRows=function(n){return n.map(u).join(\"\\n\")},e},ao.csv=ao.dsv(\",\",\"text/csv\"),ao.tsv=ao.dsv(\"  \",\"text/tab-separated-values\");var oa,aa,la,ca,fa=this[x(this,\"requestAnimationFrame\")]||function(n){setTimeout(n,17)};ao.timer=function(){qn.apply(this,arguments)},ao.timer.flush=function(){Rn(),Dn()},ao.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var sa=[\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"\\xb5\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"].map(Un);ao.formatPrefix=function(n,t){var e=0;return(n=+n)&&(0>n&&(n*=-1),t&&(n=ao.round(n,Pn(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),sa[8+e/3]};var ha=/(?:([^{])?([<>=^]))?([+\\- ])?([$#])?(0)?(\\d+)?(,)?(\\.-?\\d+)?([a-z%])?/i,pa=ao.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=ao.round(n,Pn(n,t))).toFixed(Math.max(0,Math.min(20,Pn(n*(1+1e-15),t))))}}),ga=ao.time={},va=Date;Hn.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){da.setUTCDate.apply(this._,arguments)},setDay:function(){da.setUTCDay.apply(this._,arguments)},setFullYear:function(){da.setUTCFullYear.apply(this._,arguments)},setHours:function(){da.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){da.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){da.setUTCMinutes.apply(this._,arguments)},setMonth:function(){da.setUTCMonth.apply(this._,arguments)},setSeconds:function(){da.setUTCSeconds.apply(this._,arguments)},setTime:function(){da.setTime.apply(this._,arguments)}};var da=Date.prototype;ga.year=On(function(n){return n=ga.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),ga.years=ga.year.range,ga.years.utc=ga.year.utc.range,ga.day=On(function(n){var t=new va(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),ga.days=ga.day.range,ga.days.utc=ga.day.utc.range,ga.dayOfYear=function(n){var t=ga.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},[\"sunday\",\"monday\",\"tuesday\",\"wednesday\",\"thursday\",\"friday\",\"saturday\"].forEach(function(n,t){t=7-t;var e=ga[n]=On(function(n){return(n=ga.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=ga.year(n).getDay();return Math.floor((ga.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});ga[n+\"s\"]=e.range,ga[n+\"s\"].utc=e.utc.range,ga[n+\"OfYear\"]=function(n){var e=ga.year(n).getDay();return Math.floor((ga.dayOfYear(n)+(e+t)%7)/7)}}),ga.week=ga.sunday,ga.weeks=ga.sunday.range,ga.weeks.utc=ga.sunday.utc.range,ga.weekOfYear=ga.sundayOfYear;var ya={\"-\":\"\",_:\" \",0:\"0\"},ma=/^\\s*\\d+/,Ma=/^%/;ao.locale=function(n){return{numberFormat:jn(n),timeFormat:Yn(n)}};var xa=ao.locale({decimal:\".\",thousands:\",\",grouping:[3],currency:[\"$\",\"\"],dateTime:\"%a %b %e %X %Y\",date:\"%m/%d/%Y\",time:\"%H:%M:%S\",periods:[\"AM\",\"PM\"],days:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],shortDays:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],months:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],shortMonths:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"]});ao.format=xa.numberFormat,ao.geo={},ft.prototype={s:0,t:0,add:function(n){st(n,this.t,ba),st(ba.s,this.s,this),this.s?this.t+=ba.t:this.s=ba.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var ba=new ft;ao.geo.stream=function(n,t){n&&_a.hasOwnProperty(n.type)?_a[n.type](n,t):ht(n,t)};var _a={Feature:function(n,t){ht(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,i=e.length;++r<i;)ht(e[r].geometry,t)}},wa={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){pt(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)pt(e[r],t,0)},Polygon:function(n,t){gt(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)gt(e[r],t)},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,i=e.length;++r<i;)ht(e[r],t)}};ao.geo.area=function(n){return Sa=0,ao.geo.stream(n,Na),Sa};var Sa,ka=new ft,Na={sphere:function(){Sa+=4*Fo},point:b,lineStart:b,lineEnd:b,polygonStart:function(){ka.reset(),Na.lineStart=vt},polygonEnd:function(){var n=2*ka;Sa+=0>n?4*Fo+n:n,Na.lineStart=Na.lineEnd=Na.point=b}};ao.geo.bounds=function(){function n(n,t){M.push(x=[f=n,h=n]),s>t&&(s=t),t>p&&(p=t)}function t(t,e){var r=dt([t*Yo,e*Yo]);if(y){var i=mt(y,r),u=[i[1],-i[0],0],o=mt(u,i);bt(o),o=_t(o);var l=t-g,c=l>0?1:-1,v=o[0]*Zo*c,d=xo(l)>180;if(d^(v>c*g&&c*t>v)){var m=o[1]*Zo;m>p&&(p=m)}else if(v=(v+360)%360-180,d^(v>c*g&&c*t>v)){var m=-o[1]*Zo;s>m&&(s=m)}else s>e&&(s=e),e>p&&(p=e);d?g>t?a(f,t)>a(f,h)&&(h=t):a(t,h)>a(f,h)&&(f=t):h>=f?(f>t&&(f=t),t>h&&(h=t)):t>g?a(f,t)>a(f,h)&&(h=t):a(t,h)>a(f,h)&&(f=t)}else n(t,e);y=r,g=t}function e(){b.point=t}function r(){x[0]=f,x[1]=h,b.point=n,y=null}function i(n,e){if(y){var r=n-g;m+=xo(r)>180?r+(r>0?360:-360):r}else v=n,d=e;Na.point(n,e),t(n,e)}function u(){Na.lineStart()}function o(){i(v,d),Na.lineEnd(),xo(m)>Uo&&(f=-(h=180)),x[0]=f,x[1]=h,y=null}function a(n,t){return(t-=n)<0?t+360:t}function l(n,t){return n[0]-t[0]}function c(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var f,s,h,p,g,v,d,y,m,M,x,b={point:n,lineStart:e,lineEnd:r,polygonStart:function(){b.point=i,b.lineStart=u,b.lineEnd=o,m=0,Na.polygonStart()},polygonEnd:function(){Na.polygonEnd(),b.point=n,b.lineStart=e,b.lineEnd=r,0>ka?(f=-(h=180),s=-(p=90)):m>Uo?p=90:-Uo>m&&(s=-90),x[0]=f,x[1]=h}};return function(n){p=h=-(f=s=1/0),M=[],ao.geo.stream(n,b);var t=M.length;if(t){M.sort(l);for(var e,r=1,i=M[0],u=[i];t>r;++r)e=M[r],c(e[0],i)||c(e[1],i)?(a(i[0],e[1])>a(i[0],i[1])&&(i[1]=e[1]),a(e[0],i[1])>a(i[0],i[1])&&(i[0]=e[0])):u.push(i=e);for(var o,e,g=-(1/0),t=u.length-1,r=0,i=u[t];t>=r;i=e,++r)e=u[r],(o=a(i[1],e[0]))>g&&(g=o,f=e[0],h=i[1])}return M=x=null,f===1/0||s===1/0?[[NaN,NaN],[NaN,NaN]]:[[f,s],[h,p]]}}(),ao.geo.centroid=function(n){Ea=Aa=Ca=za=La=qa=Ta=Ra=Da=Pa=Ua=0,ao.geo.stream(n,ja);var t=Da,e=Pa,r=Ua,i=t*t+e*e+r*r;return jo>i&&(t=qa,e=Ta,r=Ra,Uo>Aa&&(t=Ca,e=za,r=La),i=t*t+e*e+r*r,jo>i)?[NaN,NaN]:[Math.atan2(e,t)*Zo,tn(r/Math.sqrt(i))*Zo]};var Ea,Aa,Ca,za,La,qa,Ta,Ra,Da,Pa,Ua,ja={sphere:b,point:St,lineStart:Nt,lineEnd:Et,polygonStart:function(){ja.lineStart=At},polygonEnd:function(){ja.lineStart=Nt}},Fa=Rt(zt,jt,Ht,[-Fo,-Fo/2]),Ha=1e9;ao.geo.clipExtent=function(){var n,t,e,r,i,u,o={stream:function(n){return i&&(i.valid=!1),i=u(n),i.valid=!0,i},extent:function(a){return arguments.length?(u=Zt(n=+a[0][0],t=+a[0][1],e=+a[1][0],r=+a[1][1]),i&&(i.valid=!1,i=null),o):[[n,t],[e,r]]}};return o.extent([[0,0],[960,500]])},(ao.geo.conicEqualArea=function(){return Vt(Xt)}).raw=Xt,ao.geo.albers=function(){return ao.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},ao.geo.albersUsa=function(){function n(n){var u=n[0],o=n[1];return t=null,e(u,o),t||(r(u,o),t)||i(u,o),t}var t,e,r,i,u=ao.geo.albers(),o=ao.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a=ao.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(n,e){t=[n,e]}};return n.invert=function(n){var t=u.scale(),e=u.translate(),r=(n[0]-e[0])/t,i=(n[1]-e[1])/t;return(i>=.12&&.234>i&&r>=-.425&&-.214>r?o:i>=.166&&.234>i&&r>=-.214&&-.115>r?a:u).invert(n)},n.stream=function(n){var t=u.stream(n),e=o.stream(n),r=a.stream(n);return{point:function(n,i){t.point(n,i),e.point(n,i),r.point(n,i)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(u.precision(t),o.precision(t),a.precision(t),n):u.precision()},n.scale=function(t){return arguments.length?(u.scale(t),o.scale(.35*t),a.scale(t),n.translate(u.translate())):u.scale()},n.translate=function(t){if(!arguments.length)return u.translate();var c=u.scale(),f=+t[0],s=+t[1];return e=u.translate(t).clipExtent([[f-.455*c,s-.238*c],[f+.455*c,s+.238*c]]).stream(l).point,r=o.translate([f-.307*c,s+.201*c]).clipExtent([[f-.425*c+Uo,s+.12*c+Uo],[f-.214*c-Uo,s+.234*c-Uo]]).stream(l).point,i=a.translate([f-.205*c,s+.212*c]).clipExtent([[f-.214*c+Uo,s+.166*c+Uo],[f-.115*c-Uo,s+.234*c-Uo]]).stream(l).point,n},n.scale(1070)};var Oa,Ia,Ya,Za,Va,Xa,$a={point:b,lineStart:b,lineEnd:b,polygonStart:function(){Ia=0,$a.lineStart=$t},polygonEnd:function(){$a.lineStart=$a.lineEnd=$a.point=b,Oa+=xo(Ia/2)}},Ba={point:Bt,lineStart:b,lineEnd:b,polygonStart:b,polygonEnd:b},Wa={point:Gt,lineStart:Kt,lineEnd:Qt,polygonStart:function(){Wa.lineStart=ne},polygonEnd:function(){Wa.point=Gt,Wa.lineStart=Kt,Wa.lineEnd=Qt}};ao.geo.path=function(){function n(n){return n&&(\"function\"==typeof a&&u.pointRadius(+a.apply(this,arguments)),o&&o.valid||(o=i(u)),ao.geo.stream(n,o)),u.result()}function t(){return o=null,n}var e,r,i,u,o,a=4.5;return n.area=function(n){return Oa=0,ao.geo.stream(n,i($a)),Oa},n.centroid=function(n){return Ca=za=La=qa=Ta=Ra=Da=Pa=Ua=0,ao.geo.stream(n,i(Wa)),Ua?[Da/Ua,Pa/Ua]:Ra?[qa/Ra,Ta/Ra]:La?[Ca/La,za/La]:[NaN,NaN]},n.bounds=function(n){return Va=Xa=-(Ya=Za=1/0),ao.geo.stream(n,i(Ba)),[[Ya,Za],[Va,Xa]]},n.projection=function(n){return arguments.length?(i=(e=n)?n.stream||re(n):m,t()):e},n.context=function(n){return arguments.length?(u=null==(r=n)?new Wt:new te(n),\"function\"!=typeof a&&u.pointRadius(a),t()):r},n.pointRadius=function(t){return arguments.length?(a=\"function\"==typeof t?t:(u.pointRadius(+t),+t),n):a},n.projection(ao.geo.albersUsa()).context(null)},ao.geo.transform=function(n){return{stream:function(t){var e=new ie(t);for(var r in n)e[r]=n[r];return e}}},ie.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},ao.geo.projection=oe,ao.geo.projectionMutator=ae,(ao.geo.equirectangular=function(){return oe(ce)}).raw=ce.invert=ce,ao.geo.rotation=function(n){function t(t){return t=n(t[0]*Yo,t[1]*Yo),t[0]*=Zo,t[1]*=Zo,t}return n=se(n[0]%360*Yo,n[1]*Yo,n.length>2?n[2]*Yo:0),t.invert=function(t){return t=n.invert(t[0]*Yo,t[1]*Yo),t[0]*=Zo,t[1]*=Zo,t},t},fe.invert=ce,ao.geo.circle=function(){function n(){var n=\"function\"==typeof r?r.apply(this,arguments):r,t=se(-n[0]*Yo,-n[1]*Yo,0).invert,i=[];return e(null,null,1,{point:function(n,e){i.push(n=t(n,e)),n[0]*=Zo,n[1]*=Zo}}),{type:\"Polygon\",coordinates:[i]}}var t,e,r=[0,0],i=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=ve((t=+r)*Yo,i*Yo),n):t},n.precision=function(r){return arguments.length?(e=ve(t*Yo,(i=+r)*Yo),n):i},n.angle(90)},ao.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Yo,i=n[1]*Yo,u=t[1]*Yo,o=Math.sin(r),a=Math.cos(r),l=Math.sin(i),c=Math.cos(i),f=Math.sin(u),s=Math.cos(u);return Math.atan2(Math.sqrt((e=s*o)*e+(e=c*f-l*s*a)*e),l*f+c*s*a)},ao.geo.graticule=function(){function n(){return{type:\"MultiLineString\",coordinates:t()}}function t(){return ao.range(Math.ceil(u/d)*d,i,d).map(h).concat(ao.range(Math.ceil(c/y)*y,l,y).map(p)).concat(ao.range(Math.ceil(r/g)*g,e,g).filter(function(n){return xo(n%d)>Uo}).map(f)).concat(ao.range(Math.ceil(a/v)*v,o,v).filter(function(n){return xo(n%y)>Uo}).map(s))}var e,r,i,u,o,a,l,c,f,s,h,p,g=10,v=g,d=90,y=360,m=2.5;return n.lines=function(){return t().map(function(n){return{type:\"LineString\",coordinates:n}})},n.outline=function(){return{type:\"Polygon\",coordinates:[h(u).concat(p(l).slice(1),h(i).reverse().slice(1),p(c).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(u=+t[0][0],i=+t[1][0],c=+t[0][1],l=+t[1][1],u>i&&(t=u,u=i,i=t),c>l&&(t=c,c=l,l=t),n.precision(m)):[[u,c],[i,l]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],a=+t[0][1],o=+t[1][1],r>e&&(t=r,r=e,e=t),a>o&&(t=a,a=o,o=t),n.precision(m)):[[r,a],[e,o]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],y=+t[1],n):[d,y]},n.minorStep=function(t){return arguments.length?(g=+t[0],v=+t[1],n):[g,v]},n.precision=function(t){return arguments.length?(m=+t,f=ye(a,o,90),s=me(r,e,m),h=ye(c,l,90),p=me(u,i,m),n):m},n.majorExtent([[-180,-90+Uo],[180,90-Uo]]).minorExtent([[-180,-80-Uo],[180,80+Uo]])},ao.geo.greatArc=function(){function n(){return{type:\"LineString\",coordinates:[t||r.apply(this,arguments),e||i.apply(this,arguments)]}}var t,e,r=Me,i=xe;return n.distance=function(){return ao.geo.distance(t||r.apply(this,arguments),e||i.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t=\"function\"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(i=t,e=\"function\"==typeof t?null:t,n):i},n.precision=function(){return arguments.length?n:0},n},ao.geo.interpolate=function(n,t){return be(n[0]*Yo,n[1]*Yo,t[0]*Yo,t[1]*Yo)},ao.geo.length=function(n){return Ja=0,ao.geo.stream(n,Ga),Ja};var Ja,Ga={sphere:b,point:b,lineStart:_e,lineEnd:b,polygonStart:b,polygonEnd:b},Ka=we(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(ao.geo.azimuthalEqualArea=function(){return oe(Ka)}).raw=Ka;var Qa=we(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},m);(ao.geo.azimuthalEquidistant=function(){return oe(Qa)}).raw=Qa,(ao.geo.conicConformal=function(){return Vt(Se)}).raw=Se,(ao.geo.conicEquidistant=function(){return Vt(ke)}).raw=ke;var nl=we(function(n){return 1/n},Math.atan);(ao.geo.gnomonic=function(){return oe(nl)}).raw=nl,Ne.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-Io]},(ao.geo.mercator=function(){return Ee(Ne)}).raw=Ne;var tl=we(function(){return 1},Math.asin);(ao.geo.orthographic=function(){return oe(tl)}).raw=tl;var el=we(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(ao.geo.stereographic=function(){return oe(el)}).raw=el,Ae.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-Io]},(ao.geo.transverseMercator=function(){var n=Ee(Ae),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},e([0,0,90])}).raw=Ae,ao.geom={},ao.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,i=En(e),u=En(r),o=n.length,a=[],l=[];for(t=0;o>t;t++)a.push([+i.call(this,n[t],t),+u.call(this,n[t],t),t]);for(a.sort(qe),t=0;o>t;t++)l.push([a[t][0],-a[t][1]]);var c=Le(a),f=Le(l),s=f[0]===c[0],h=f[f.length-1]===c[c.length-1],p=[];for(t=c.length-1;t>=0;--t)p.push(n[a[c[t]][2]]);for(t=+s;t<f.length-h;++t)p.push(n[a[f[t]][2]]);return p}var e=Ce,r=ze;return arguments.length?t(n):(t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t)},ao.geom.polygon=function(n){return ko(n,rl),n};var rl=ao.geom.polygon.prototype=[];rl.area=function(){for(var n,t=-1,e=this.length,r=this[e-1],i=0;++t<e;)n=r,r=this[t],i+=n[1]*r[0]-n[0]*r[1];return.5*i},rl.centroid=function(n){var t,e,r=-1,i=this.length,u=0,o=0,a=this[i-1];for(arguments.length||(n=-1/(6*this.area()));++r<i;)t=a,a=this[r],e=t[0]*a[1]-a[0]*t[1],u+=(t[0]+a[0])*e,o+=(t[1]+a[1])*e;return[u*n,o*n]},rl.clip=function(n){for(var t,e,r,i,u,o,a=De(n),l=-1,c=this.length-De(this),f=this[c-1];++l<c;){for(t=n.slice(),n.length=0,i=this[l],u=t[(r=t.length-a)-1],e=-1;++e<r;)o=t[e],Te(o,f,i)?(Te(u,f,i)||n.push(Re(u,o,f,i)),n.push(o)):Te(u,f,i)&&n.push(Re(u,o,f,i)),u=o;a&&n.push(n[0]),f=i}return n};var il,ul,ol,al,ll,cl=[],fl=[];Ye.prototype.prepare=function(){for(var n,t=this.edges,e=t.length;e--;)n=t[e].edge,n.b&&n.a||t.splice(e,1);return t.sort(Ve),t.length},tr.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},er.prototype={insert:function(n,t){var e,r,i;if(n){if(t.P=n,t.N=n.N,n.N&&(n.N.P=t),n.N=t,n.R){for(n=n.R;n.L;)n=n.L;n.L=t}else n.R=t;e=n}else this._?(n=or(this._),t.P=null,t.N=n,n.P=n.L=t,e=n):(t.P=t.N=null,this._=t,e=null);for(t.L=t.R=null,t.U=e,t.C=!0,n=t;e&&e.C;)r=e.U,e===r.L?(i=r.R,i&&i.C?(e.C=i.C=!1,r.C=!0,n=r):(n===e.R&&(ir(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ur(this,r))):(i=r.L,i&&i.C?(e.C=i.C=!1,r.C=!0,n=r):(n===e.L&&(ur(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ir(this,r))),e=n.U;this._.C=!1},remove:function(n){n.N&&(n.N.P=n.P),n.P&&(n.P.N=n.N),n.N=n.P=null;var t,e,r,i=n.U,u=n.L,o=n.R;if(e=u?o?or(o):u:o,i?i.L===n?i.L=e:i.R=e:this._=e,u&&o?(r=e.C,e.C=n.C,e.L=u,u.U=e,e!==o?(i=e.U,e.U=n.U,n=e.R,i.L=n,e.R=o,o.U=e):(e.U=i,i=e,n=e.R)):(r=n.C,n=e),n&&(n.U=i),!r){if(n&&n.C)return void(n.C=!1);do{if(n===this._)break;if(n===i.L){if(t=i.R,t.C&&(t.C=!1,i.C=!0,ir(this,i),t=i.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,ur(this,t),t=i.R),t.C=i.C,i.C=t.R.C=!1,ir(this,i),n=this._;break}}else if(t=i.L,t.C&&(t.C=!1,i.C=!0,ur(this,i),t=i.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,ir(this,t),t=i.L),t.C=i.C,i.C=t.L.C=!1,ur(this,i),n=this._;break}t.C=!0,n=i,i=i.U}while(!n.C);n&&(n.C=!1)}}},ao.geom.voronoi=function(n){function t(n){var t=new Array(n.length),r=a[0][0],i=a[0][1],u=a[1][0],o=a[1][1];return ar(e(n),a).cells.forEach(function(e,a){var l=e.edges,c=e.site,f=t[a]=l.length?l.map(function(n){var t=n.start();return[t.x,t.y]}):c.x>=r&&c.x<=u&&c.y>=i&&c.y<=o?[[r,o],[u,o],[u,i],[r,i]]:[];f.point=n[a]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(u(n,t)/Uo)*Uo,y:Math.round(o(n,t)/Uo)*Uo,i:t}})}var r=Ce,i=ze,u=r,o=i,a=sl;return n?t(n):(t.links=function(n){return ar(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return ar(e(n)).cells.forEach(function(e,r){for(var i,u,o=e.site,a=e.edges.sort(Ve),l=-1,c=a.length,f=a[c-1].edge,s=f.l===o?f.r:f.l;++l<c;)i=f,u=s,f=a[l].edge,s=f.l===o?f.r:f.l,r<u.i&&r<s.i&&cr(o,u,s)<0&&t.push([n[r],n[u.i],n[s.i]])}),t},t.x=function(n){return arguments.length?(u=En(r=n),t):r},t.y=function(n){return arguments.length?(o=En(i=n),t):i},t.clipExtent=function(n){return arguments.length?(a=null==n?sl:n,t):a===sl?null:a},t.size=function(n){return arguments.length?t.clipExtent(n&&[[0,0],n]):a===sl?null:a&&a[1]},t)};var sl=[[-1e6,-1e6],[1e6,1e6]];ao.geom.delaunay=function(n){return ao.geom.voronoi().triangles(n)},ao.geom.quadtree=function(n,t,e,r,i){function u(n){function u(n,t,e,r,i,u,o,a){if(!isNaN(e)&&!isNaN(r))if(n.leaf){var l=n.x,f=n.y;if(null!=l)if(xo(l-e)+xo(f-r)<.01)c(n,t,e,r,i,u,o,a);else{var s=n.point;n.x=n.y=n.point=null,c(n,s,l,f,i,u,o,a),c(n,t,e,r,i,u,o,a)}else n.x=e,n.y=r,n.point=t}else c(n,t,e,r,i,u,o,a)}function c(n,t,e,r,i,o,a,l){var c=.5*(i+a),f=.5*(o+l),s=e>=c,h=r>=f,p=h<<1|s;n.leaf=!1,n=n.nodes[p]||(n.nodes[p]=hr()),s?i=c:a=c,h?o=f:l=f,u(n,t,e,r,i,o,a,l)}var f,s,h,p,g,v,d,y,m,M=En(a),x=En(l);if(null!=t)v=t,d=e,y=r,m=i;else if(y=m=-(v=d=1/0),s=[],h=[],g=n.length,o)for(p=0;g>p;++p)f=n[p],f.x<v&&(v=f.x),f.y<d&&(d=f.y),f.x>y&&(y=f.x),f.y>m&&(m=f.y),s.push(f.x),h.push(f.y);else for(p=0;g>p;++p){var b=+M(f=n[p],p),_=+x(f,p);v>b&&(v=b),d>_&&(d=_),b>y&&(y=b),_>m&&(m=_),s.push(b),h.push(_)}var w=y-v,S=m-d;w>S?m=d+w:y=v+S;var k=hr();if(k.add=function(n){u(k,n,+M(n,++p),+x(n,p),v,d,y,m)},k.visit=function(n){pr(n,k,v,d,y,m)},k.find=function(n){return gr(k,n[0],n[1],v,d,y,m)},p=-1,null==t){for(;++p<g;)u(k,n[p],s[p],h[p],v,d,y,m);--p}else n.forEach(k.add);return s=h=n=f=null,k}var o,a=Ce,l=ze;return(o=arguments.length)?(a=fr,l=sr,3===o&&(i=e,r=t,e=t=0),u(n)):(u.x=function(n){return arguments.length?(a=n,u):a},u.y=function(n){return arguments.length?(l=n,u):l},u.extent=function(n){return arguments.length?(null==n?t=e=r=i=null:(t=+n[0][0],e=+n[0][1],r=+n[1][0],i=+n[1][1]),u):null==t?null:[[t,e],[r,i]]},u.size=function(n){return arguments.length?(null==n?t=e=r=i=null:(t=e=0,r=+n[0],i=+n[1]),u):null==t?null:[r-t,i-e]},u)},ao.interpolateRgb=vr,ao.interpolateObject=dr,ao.interpolateNumber=yr,ao.interpolateString=mr;var hl=/[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,pl=new RegExp(hl.source,\"g\");ao.interpolate=Mr,ao.interpolators=[function(n,t){var e=typeof t;return(\"string\"===e?ua.has(t.toLowerCase())||/^(#|rgb\\(|hsl\\()/i.test(t)?vr:mr:t instanceof an?vr:Array.isArray(t)?xr:\"object\"===e&&isNaN(t)?dr:yr)(n,t)}],ao.interpolateArray=xr;var gl=function(){return m},vl=ao.map({linear:gl,poly:Er,quad:function(){return Sr},cubic:function(){return kr},sin:function(){return Ar},exp:function(){return Cr},circle:function(){return zr},elastic:Lr,back:qr,bounce:function(){return Tr}}),dl=ao.map({\"in\":m,out:_r,\"in-out\":wr,\"out-in\":function(n){return wr(_r(n))}});ao.ease=function(n){var t=n.indexOf(\"-\"),e=t>=0?n.slice(0,t):n,r=t>=0?n.slice(t+1):\"in\";return e=vl.get(e)||gl,r=dl.get(r)||m,br(r(e.apply(null,lo.call(arguments,1))))},ao.interpolateHcl=Rr,ao.interpolateHsl=Dr,ao.interpolateLab=Pr,ao.interpolateRound=Ur,ao.transform=function(n){var t=fo.createElementNS(ao.ns.prefix.svg,\"g\");return(ao.transform=function(n){if(null!=n){t.setAttribute(\"transform\",n);var e=t.transform.baseVal.consolidate()}return new jr(e?e.matrix:yl)})(n)},jr.prototype.toString=function(){return\"translate(\"+this.translate+\")rotate(\"+this.rotate+\")skewX(\"+this.skew+\")scale(\"+this.scale+\")\"};var yl={a:1,b:0,c:0,d:1,e:0,f:0};ao.interpolateTransform=$r,ao.layout={},ao.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++e<r;)t.push(Jr(n[e]));return t}},ao.layout.chord=function(){function n(){var n,c,s,h,p,g={},v=[],d=ao.range(u),y=[];for(e=[],r=[],n=0,h=-1;++h<u;){for(c=0,p=-1;++p<u;)c+=i[h][p];v.push(c),y.push(ao.range(u)),n+=c}for(o&&d.sort(function(n,t){return o(v[n],v[t])}),a&&y.forEach(function(n,t){n.sort(function(n,e){return a(i[t][n],i[t][e])})}),n=(Ho-f*u)/n,c=0,h=-1;++h<u;){for(s=c,p=-1;++p<u;){var m=d[h],M=y[m][p],x=i[m][M],b=c,_=c+=x*n;g[m+\"-\"+M]={index:m,subindex:M,startAngle:b,endAngle:_,value:x}}r[m]={index:m,startAngle:s,endAngle:c,value:v[m]},c+=f}for(h=-1;++h<u;)for(p=h-1;++p<u;){var w=g[h+\"-\"+p],S=g[p+\"-\"+h];(w.value||S.value)&&e.push(w.value<S.value?{source:S,target:w}:{source:w,target:S})}l&&t()}function t(){e.sort(function(n,t){return l((n.source.value+n.target.value)/2,(t.source.value+t.target.value)/2)})}var e,r,i,u,o,a,l,c={},f=0;return c.matrix=function(n){return arguments.length?(u=(i=n)&&i.length,e=r=null,c):i},c.padding=function(n){return arguments.length?(f=n,e=r=null,c):f},c.sortGroups=function(n){return arguments.length?(o=n,e=r=null,c):o},c.sortSubgroups=function(n){return arguments.length?(a=n,e=null,c):a},c.sortChords=function(n){return arguments.length?(l=n,e&&t(),c):l},c.chords=function(){return e||n(),e},c.groups=function(){return r||n(),r},c},ao.layout.force=function(){function n(n){return function(t,e,r,i){if(t.point!==n){var u=t.cx-n.x,o=t.cy-n.y,a=i-e,l=u*u+o*o;if(l>a*a/y){if(v>l){var c=t.charge/l;n.px-=u*c,n.py-=o*c}return!0}if(t.point&&l&&v>l){var c=t.pointCharge/l;n.px-=u*c,n.py-=o*c}}return!t.charge}}function t(n){n.px=ao.event.x,n.py=ao.event.y,l.resume()}var e,r,i,u,o,a,l={},c=ao.dispatch(\"start\",\"tick\",\"end\"),f=[1,1],s=.9,h=ml,p=Ml,g=-30,v=xl,d=.1,y=.64,M=[],x=[];return l.tick=function(){if((i*=.99)<.005)return e=null,c.end({type:\"end\",alpha:i=0}),!0;var t,r,l,h,p,v,y,m,b,_=M.length,w=x.length;for(r=0;w>r;++r)l=x[r],h=l.source,p=l.target,m=p.x-h.x,b=p.y-h.y,(v=m*m+b*b)&&(v=i*o[r]*((v=Math.sqrt(v))-u[r])/v,m*=v,b*=v,p.x-=m*(y=h.weight+p.weight?h.weight/(h.weight+p.weight):.5),p.y-=b*y,h.x+=m*(y=1-y),h.y+=b*y);if((y=i*d)&&(m=f[0]/2,b=f[1]/2,r=-1,y))for(;++r<_;)l=M[r],l.x+=(m-l.x)*y,l.y+=(b-l.y)*y;if(g)for(ri(t=ao.geom.quadtree(M),i,a),r=-1;++r<_;)(l=M[r]).fixed||t.visit(n(l));for(r=-1;++r<_;)l=M[r],l.fixed?(l.x=l.px,l.y=l.py):(l.x-=(l.px-(l.px=l.x))*s,l.y-=(l.py-(l.py=l.y))*s);c.tick({type:\"tick\",alpha:i})},l.nodes=function(n){return arguments.length?(M=n,l):M},l.links=function(n){return arguments.length?(x=n,l):x},l.size=function(n){return arguments.length?(f=n,l):f},l.linkDistance=function(n){return arguments.length?(h=\"function\"==typeof n?n:+n,l):h},l.distance=l.linkDistance,l.linkStrength=function(n){return arguments.length?(p=\"function\"==typeof n?n:+n,l):p},l.friction=function(n){return arguments.length?(s=+n,l):s},l.charge=function(n){return arguments.length?(g=\"function\"==typeof n?n:+n,l):g},l.chargeDistance=function(n){return arguments.length?(v=n*n,l):Math.sqrt(v)},l.gravity=function(n){return arguments.length?(d=+n,l):d},l.theta=function(n){return arguments.length?(y=n*n,l):Math.sqrt(y)},l.alpha=function(n){return arguments.length?(n=+n,i?n>0?i=n:(e.c=null,e.t=NaN,e=null,c.end({type:\"end\",alpha:i=0})):n>0&&(c.start({type:\"start\",alpha:i=n}),e=qn(l.tick)),l):i},l.start=function(){function n(n,r){if(!e){for(e=new Array(i),l=0;i>l;++l)e[l]=[];for(l=0;c>l;++l){var u=x[l];e[u.source.index].push(u.target),e[u.target.index].push(u.source)}}for(var o,a=e[t],l=-1,f=a.length;++l<f;)if(!isNaN(o=a[l][n]))return o;return Math.random()*r}var t,e,r,i=M.length,c=x.length,s=f[0],v=f[1];for(t=0;i>t;++t)(r=M[t]).index=t,r.weight=0;for(t=0;c>t;++t)r=x[t],\"number\"==typeof r.source&&(r.source=M[r.source]),\"number\"==typeof r.target&&(r.target=M[r.target]),++r.source.weight,++r.target.weight;for(t=0;i>t;++t)r=M[t],isNaN(r.x)&&(r.x=n(\"x\",s)),isNaN(r.y)&&(r.y=n(\"y\",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(u=[],\"function\"==typeof h)for(t=0;c>t;++t)u[t]=+h.call(this,x[t],t);else for(t=0;c>t;++t)u[t]=h;if(o=[],\"function\"==typeof p)for(t=0;c>t;++t)o[t]=+p.call(this,x[t],t);else for(t=0;c>t;++t)o[t]=p;if(a=[],\"function\"==typeof g)for(t=0;i>t;++t)a[t]=+g.call(this,M[t],t);else for(t=0;i>t;++t)a[t]=g;return l.resume()},l.resume=function(){return l.alpha(.1)},l.stop=function(){return l.alpha(0)},l.drag=function(){return r||(r=ao.behavior.drag().origin(m).on(\"dragstart.force\",Qr).on(\"drag.force\",t).on(\"dragend.force\",ni)),arguments.length?void this.on(\"mouseover.force\",ti).on(\"mouseout.force\",ei).call(r):r},ao.rebind(l,c,\"on\")};var ml=20,Ml=1,xl=1/0;ao.layout.hierarchy=function(){function n(i){var u,o=[i],a=[];for(i.depth=0;null!=(u=o.pop());)if(a.push(u),(c=e.call(n,u,u.depth))&&(l=c.length)){for(var l,c,f;--l>=0;)o.push(f=c[l]),f.parent=u,f.depth=u.depth+1;r&&(u.value=0),u.children=c}else r&&(u.value=+r.call(n,u,u.depth)||0),delete u.children;return oi(i,function(n){var e,i;t&&(e=n.children)&&e.sort(t),r&&(i=n.parent)&&(i.value+=n.value)}),a}var t=ci,e=ai,r=li;return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(ui(t,function(n){n.children&&(n.value=0)}),oi(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},ao.layout.partition=function(){function n(t,e,r,i){var u=t.children;if(t.x=e,t.y=t.depth*i,t.dx=r,t.dy=i,u&&(o=u.length)){var o,a,l,c=-1;for(r=t.value?r/t.value:0;++c<o;)n(a=u[c],e,l=a.value*r,i),e+=l}}function t(n){var e=n.children,r=0;if(e&&(i=e.length))for(var i,u=-1;++u<i;)r=Math.max(r,t(e[u]));return 1+r}function e(e,u){var o=r.call(this,e,u);return n(o[0],0,i[0],i[1]/t(o[0])),o}var r=ao.layout.hierarchy(),i=[1,1];return e.size=function(n){return arguments.length?(i=n,e):i},ii(e,r)},ao.layout.pie=function(){function n(o){var a,l=o.length,c=o.map(function(e,r){return+t.call(n,e,r)}),f=+(\"function\"==typeof r?r.apply(this,arguments):r),s=(\"function\"==typeof i?i.apply(this,arguments):i)-f,h=Math.min(Math.abs(s)/l,+(\"function\"==typeof u?u.apply(this,arguments):u)),p=h*(0>s?-1:1),g=ao.sum(c),v=g?(s-l*p)/g:0,d=ao.range(l),y=[];return null!=e&&d.sort(e===bl?function(n,t){return c[t]-c[n]}:function(n,t){return e(o[n],o[t])}),d.forEach(function(n){y[n]={data:o[n],value:a=c[n],startAngle:f,endAngle:f+=a*v+p,padAngle:h}}),y}var t=Number,e=bl,r=0,i=Ho,u=0;return n.value=function(e){return arguments.length?(t=e,n):t},n.sort=function(t){return arguments.length?(e=t,n):e},n.startAngle=function(t){return arguments.length?(r=t,n):r},n.endAngle=function(t){return arguments.length?(i=t,n):i},n.padAngle=function(t){return arguments.length?(u=t,n):u},n};var bl={};ao.layout.stack=function(){function n(a,l){if(!(h=a.length))return a;var c=a.map(function(e,r){return t.call(n,e,r)}),f=c.map(function(t){return t.map(function(t,e){return[u.call(n,t,e),o.call(n,t,e)]})}),s=e.call(n,f,l);c=ao.permute(c,s),f=ao.permute(f,s);var h,p,g,v,d=r.call(n,f,l),y=c[0].length;for(g=0;y>g;++g)for(i.call(n,c[0][g],v=d[g],f[0][g][1]),p=1;h>p;++p)i.call(n,c[p][g],v+=f[p-1][g][1],f[p][g][1]);return a}var t=m,e=gi,r=vi,i=pi,u=si,o=hi;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e=\"function\"==typeof t?t:_l.get(t)||gi,n):e},n.offset=function(t){return arguments.length?(r=\"function\"==typeof t?t:wl.get(t)||vi,n):r},n.x=function(t){return arguments.length?(u=t,n):u},n.y=function(t){return arguments.length?(o=t,n):o},n.out=function(t){return arguments.length?(i=t,n):i},n};var _l=ao.map({\"inside-out\":function(n){var t,e,r=n.length,i=n.map(di),u=n.map(yi),o=ao.range(r).sort(function(n,t){return i[n]-i[t]}),a=0,l=0,c=[],f=[];for(t=0;r>t;++t)e=o[t],l>a?(a+=u[e],c.push(e)):(l+=u[e],f.push(e));return f.reverse().concat(c)},reverse:function(n){return ao.range(n.length).reverse()},\"default\":gi}),wl=ao.map({silhouette:function(n){var t,e,r,i=n.length,u=n[0].length,o=[],a=0,l=[];for(e=0;u>e;++e){for(t=0,r=0;i>t;t++)r+=n[t][e][1];r>a&&(a=r),o.push(r)}for(e=0;u>e;++e)l[e]=(a-o[e])/2;return l},wiggle:function(n){var t,e,r,i,u,o,a,l,c,f=n.length,s=n[0],h=s.length,p=[];for(p[0]=l=c=0,e=1;h>e;++e){for(t=0,i=0;f>t;++t)i+=n[t][e][1];for(t=0,u=0,a=s[e][0]-s[e-1][0];f>t;++t){for(r=0,o=(n[t][e][1]-n[t][e-1][1])/(2*a);t>r;++r)o+=(n[r][e][1]-n[r][e-1][1])/a;u+=o*n[t][e][1]}p[e]=l-=i?u/i*a:0,c>l&&(c=l)}for(e=0;h>e;++e)p[e]-=c;return p},expand:function(n){var t,e,r,i=n.length,u=n[0].length,o=1/i,a=[];for(e=0;u>e;++e){for(t=0,r=0;i>t;t++)r+=n[t][e][1];if(r)for(t=0;i>t;t++)n[t][e][1]/=r;else for(t=0;i>t;t++)n[t][e][1]=o}for(e=0;u>e;++e)a[e]=0;return a},zero:vi});ao.layout.histogram=function(){function n(n,u){for(var o,a,l=[],c=n.map(e,this),f=r.call(this,c,u),s=i.call(this,f,c,u),u=-1,h=c.length,p=s.length-1,g=t?1:1/h;++u<p;)o=l[u]=[],o.dx=s[u+1]-(o.x=s[u]),o.y=0;if(p>0)for(u=-1;++u<h;)a=c[u],a>=f[0]&&a<=f[1]&&(o=l[ao.bisect(s,a,1,p)-1],o.y+=g,o.push(n[u]));return l}var t=!0,e=Number,r=bi,i=Mi;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=En(t),n):r},n.bins=function(t){return arguments.length?(i=\"number\"==typeof t?function(n){return xi(n,t)}:En(t),n):i},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},ao.layout.pack=function(){function n(n,u){var o=e.call(this,n,u),a=o[0],l=i[0],c=i[1],f=null==t?Math.sqrt:\"function\"==typeof t?t:function(){return t};if(a.x=a.y=0,oi(a,function(n){n.r=+f(n.value)}),oi(a,Ni),r){var s=r*(t?1:Math.max(2*a.r/l,2*a.r/c))/2;oi(a,function(n){n.r+=s}),oi(a,Ni),oi(a,function(n){n.r-=s})}return Ci(a,l/2,c/2,t?1:1/Math.max(2*a.r/l,2*a.r/c)),o}var t,e=ao.layout.hierarchy().sort(_i),r=0,i=[1,1];return n.size=function(t){return arguments.length?(i=t,n):i},n.radius=function(e){return arguments.length?(t=null==e||\"function\"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},ii(n,e)},ao.layout.tree=function(){function n(n,i){var f=o.call(this,n,i),s=f[0],h=t(s);if(oi(h,e),h.parent.m=-h.z,ui(h,r),c)ui(s,u);else{var p=s,g=s,v=s;ui(s,function(n){n.x<p.x&&(p=n),n.x>g.x&&(g=n),n.depth>v.depth&&(v=n)});var d=a(p,g)/2-p.x,y=l[0]/(g.x+a(g,p)/2+d),m=l[1]/(v.depth||1);ui(s,function(n){n.x=(n.x+d)*y,n.y=n.depth*m})}return f}function t(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var i,u=t.children,o=0,a=u.length;a>o;++o)r.push((u[o]=i={_:u[o],parent:t,children:(i=u[o].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=i);return e.children[0]}function e(n){var t=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(t.length){Di(n);var u=(t[0].z+t[t.length-1].z)/2;r?(n.z=r.z+a(n._,r._),n.m=n.z-u):n.z=u}else r&&(n.z=r.z+a(n._,r._));n.parent.A=i(n,r,n.parent.A||e[0])}function r(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function i(n,t,e){if(t){for(var r,i=n,u=n,o=t,l=i.parent.children[0],c=i.m,f=u.m,s=o.m,h=l.m;o=Ti(o),i=qi(i),o&&i;)l=qi(l),u=Ti(u),u.a=n,r=o.z+s-i.z-c+a(o._,i._),r>0&&(Ri(Pi(o,n,e),n,r),c+=r,f+=r),s+=o.m,c+=i.m,h+=l.m,f+=u.m;o&&!Ti(u)&&(u.t=o,u.m+=s-f),i&&!qi(l)&&(l.t=i,l.m+=c-h,e=n)}return e}function u(n){n.x*=l[0],n.y=n.depth*l[1]}var o=ao.layout.hierarchy().sort(null).value(null),a=Li,l=[1,1],c=null;return n.separation=function(t){return arguments.length?(a=t,n):a},n.size=function(t){return arguments.length?(c=null==(l=t)?u:null,n):c?null:l},n.nodeSize=function(t){return arguments.length?(c=null==(l=t)?null:u,n):c?l:null},ii(n,o)},ao.layout.cluster=function(){function n(n,u){var o,a=t.call(this,n,u),l=a[0],c=0;oi(l,function(n){var t=n.children;t&&t.length?(n.x=ji(t),n.y=Ui(t)):(n.x=o?c+=e(n,o):0,n.y=0,o=n)});var f=Fi(l),s=Hi(l),h=f.x-e(f,s)/2,p=s.x+e(s,f)/2;return oi(l,i?function(n){n.x=(n.x-l.x)*r[0],n.y=(l.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(p-h)*r[0],n.y=(1-(l.y?n.y/l.y:1))*r[1]}),a}var t=ao.layout.hierarchy().sort(null).value(null),e=Li,r=[1,1],i=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(i=null==(r=t),n):i?null:r},n.nodeSize=function(t){return arguments.length?(i=null!=(r=t),n):i?r:null},ii(n,t)},ao.layout.treemap=function(){function n(n,t){for(var e,r,i=-1,u=n.length;++i<u;)r=(e=n[i]).value*(0>t?0:t),e.area=isNaN(r)||0>=r?0:r}function t(e){var u=e.children;if(u&&u.length){var o,a,l,c=s(e),f=[],h=u.slice(),g=1/0,v=\"slice\"===p?c.dx:\"dice\"===p?c.dy:\"slice-dice\"===p?1&e.depth?c.dy:c.dx:Math.min(c.dx,c.dy);for(n(h,c.dx*c.dy/e.value),f.area=0;(l=h.length)>0;)f.push(o=h[l-1]),f.area+=o.area,\"squarify\"!==p||(a=r(f,v))<=g?(h.pop(),g=a):(f.area-=f.pop().area,i(f,v,c,!1),v=Math.min(c.dx,c.dy),f.length=f.area=0,g=1/0);f.length&&(i(f,v,c,!0),f.length=f.area=0),u.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var u,o=s(t),a=r.slice(),l=[];for(n(a,o.dx*o.dy/t.value),l.area=0;u=a.pop();)l.push(u),l.area+=u.area,null!=u.z&&(i(l,u.z?o.dx:o.dy,o,!a.length),l.length=l.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,i=0,u=1/0,o=-1,a=n.length;++o<a;)(e=n[o].area)&&(u>e&&(u=e),e>i&&(i=e));return r*=r,t*=t,r?Math.max(t*i*g/r,r/(t*u*g)):1/0}function i(n,t,e,r){var i,u=-1,o=n.length,a=e.x,c=e.y,f=t?l(n.area/t):0;if(t==e.dx){for((r||f>e.dy)&&(f=e.dy);++u<o;)i=n[u],i.x=a,i.y=c,i.dy=f,a+=i.dx=Math.min(e.x+e.dx-a,f?l(i.area/f):0);i.z=!0,i.dx+=e.x+e.dx-a,e.y+=f,e.dy-=f}else{for((r||f>e.dx)&&(f=e.dx);++u<o;)i=n[u],i.x=a,i.y=c,i.dx=f,c+=i.dy=Math.min(e.y+e.dy-c,f?l(i.area/f):0);i.z=!1,i.dy+=e.y+e.dy-c,e.x+=f,e.dx-=f}}function u(r){var i=o||a(r),u=i[0];return u.x=u.y=0,u.value?(u.dx=c[0],u.dy=c[1]):u.dx=u.dy=0,o&&a.revalue(u),n([u],u.dx*u.dy/u.value),(o?e:t)(u),h&&(o=i),i}var o,a=ao.layout.hierarchy(),l=Math.round,c=[1,1],f=null,s=Oi,h=!1,p=\"squarify\",g=.5*(1+Math.sqrt(5));return u.size=function(n){return arguments.length?(c=n,u):c},u.padding=function(n){function t(t){var e=n.call(u,t,t.depth);return null==e?Oi(t):Ii(t,\"number\"==typeof e?[e,e,e,e]:e)}function e(t){return Ii(t,n)}if(!arguments.length)return f;var r;return s=null==(f=n)?Oi:\"function\"==(r=typeof n)?t:\"number\"===r?(n=[n,n,n,n],e):e,u},u.round=function(n){return arguments.length?(l=n?Math.round:Number,u):l!=Number},u.sticky=function(n){return arguments.length?(h=n,o=null,u):h},u.ratio=function(n){return arguments.length?(g=n,u):g},u.mode=function(n){return arguments.length?(p=n+\"\",u):p},ii(u,a)},ao.random={normal:function(n,t){var e=arguments.length;return 2>e&&(t=1),1>e&&(n=0),function(){var e,r,i;do e=2*Math.random()-1,r=2*Math.random()-1,i=e*e+r*r;while(!i||i>1);return n+t*e*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var n=ao.random.normal.apply(ao,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=ao.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;n>e;e++)t+=Math.random();return t}}},ao.scale={};var Sl={floor:m,ceil:m};ao.scale.linear=function(){return Wi([0,1],[0,1],Mr,!1)};var kl={s:1,g:1,p:1,r:1,e:1};ao.scale.log=function(){return ru(ao.scale.linear().domain([0,1]),10,!0,[1,10])};var Nl=ao.format(\".0e\"),El={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};ao.scale.pow=function(){return iu(ao.scale.linear(),1,[0,1])},ao.scale.sqrt=function(){return ao.scale.pow().exponent(.5)},ao.scale.ordinal=function(){return ou([],{t:\"range\",a:[[]]})},ao.scale.category10=function(){return ao.scale.ordinal().range(Al)},ao.scale.category20=function(){return ao.scale.ordinal().range(Cl)},ao.scale.category20b=function(){return ao.scale.ordinal().range(zl)},ao.scale.category20c=function(){return ao.scale.ordinal().range(Ll)};var Al=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(xn),Cl=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(xn),zl=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(xn),Ll=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(xn);ao.scale.quantile=function(){return au([],[])},ao.scale.quantize=function(){return lu(0,1,[0,1])},ao.scale.threshold=function(){return cu([.5],[0,1])},ao.scale.identity=function(){return fu([0,1])},ao.svg={},ao.svg.arc=function(){function n(){var n=Math.max(0,+e.apply(this,arguments)),c=Math.max(0,+r.apply(this,arguments)),f=o.apply(this,arguments)-Io,s=a.apply(this,arguments)-Io,h=Math.abs(s-f),p=f>s?0:1;if(n>c&&(g=c,c=n,n=g),h>=Oo)return t(c,p)+(n?t(n,1-p):\"\")+\"Z\";var g,v,d,y,m,M,x,b,_,w,S,k,N=0,E=0,A=[];if((y=(+l.apply(this,arguments)||0)/2)&&(d=u===ql?Math.sqrt(n*n+c*c):+u.apply(this,arguments),p||(E*=-1),c&&(E=tn(d/c*Math.sin(y))),n&&(N=tn(d/n*Math.sin(y)))),c){m=c*Math.cos(f+E),M=c*Math.sin(f+E),x=c*Math.cos(s-E),b=c*Math.sin(s-E);var C=Math.abs(s-f-2*E)<=Fo?0:1;if(E&&yu(m,M,x,b)===p^C){var z=(f+s)/2;m=c*Math.cos(z),M=c*Math.sin(z),x=b=null}}else m=M=0;if(n){_=n*Math.cos(s-N),w=n*Math.sin(s-N),S=n*Math.cos(f+N),k=n*Math.sin(f+N);var L=Math.abs(f-s+2*N)<=Fo?0:1;if(N&&yu(_,w,S,k)===1-p^L){var q=(f+s)/2;_=n*Math.cos(q),w=n*Math.sin(q),S=k=null}}else _=w=0;if(h>Uo&&(g=Math.min(Math.abs(c-n)/2,+i.apply(this,arguments)))>.001){v=c>n^p?0:1;var T=g,R=g;if(Fo>h){var D=null==S?[_,w]:null==x?[m,M]:Re([m,M],[S,k],[x,b],[_,w]),P=m-D[0],U=M-D[1],j=x-D[0],F=b-D[1],H=1/Math.sin(Math.acos((P*j+U*F)/(Math.sqrt(P*P+U*U)*Math.sqrt(j*j+F*F)))/2),O=Math.sqrt(D[0]*D[0]+D[1]*D[1]);R=Math.min(g,(n-O)/(H-1)),T=Math.min(g,(c-O)/(H+1))}if(null!=x){var I=mu(null==S?[_,w]:[S,k],[m,M],c,T,p),Y=mu([x,b],[_,w],c,T,p);g===T?A.push(\"M\",I[0],\"A\",T,\",\",T,\" 0 0,\",v,\" \",I[1],\"A\",c,\",\",c,\" 0 \",1-p^yu(I[1][0],I[1][1],Y[1][0],Y[1][1]),\",\",p,\" \",Y[1],\"A\",T,\",\",T,\" 0 0,\",v,\" \",Y[0]):A.push(\"M\",I[0],\"A\",T,\",\",T,\" 0 1,\",v,\" \",Y[0])}else A.push(\"M\",m,\",\",M);if(null!=S){var Z=mu([m,M],[S,k],n,-R,p),V=mu([_,w],null==x?[m,M]:[x,b],n,-R,p);g===R?A.push(\"L\",V[0],\"A\",R,\",\",R,\" 0 0,\",v,\" \",V[1],\"A\",n,\",\",n,\" 0 \",p^yu(V[1][0],V[1][1],Z[1][0],Z[1][1]),\",\",1-p,\" \",Z[1],\"A\",R,\",\",R,\" 0 0,\",v,\" \",Z[0]):A.push(\"L\",V[0],\"A\",R,\",\",R,\" 0 0,\",v,\" \",Z[0])}else A.push(\"L\",_,\",\",w)}else A.push(\"M\",m,\",\",M),null!=x&&A.push(\"A\",c,\",\",c,\" 0 \",C,\",\",p,\" \",x,\",\",b),A.push(\"L\",_,\",\",w),null!=S&&A.push(\"A\",n,\",\",n,\" 0 \",L,\",\",1-p,\" \",S,\",\",k);return A.push(\"Z\"),A.join(\"\")}function t(n,t){return\"M0,\"+n+\"A\"+n+\",\"+n+\" 0 1,\"+t+\" 0,\"+-n+\"A\"+n+\",\"+n+\" 0 1,\"+t+\" 0,\"+n}var e=hu,r=pu,i=su,u=ql,o=gu,a=vu,l=du;return n.innerRadius=function(t){return arguments.length?(e=En(t),n):e},n.outerRadius=function(t){return arguments.length?(r=En(t),n):r},n.cornerRadius=function(t){return arguments.length?(i=En(t),n):i},n.padRadius=function(t){return arguments.length?(u=t==ql?ql:En(t),n):u},n.startAngle=function(t){return arguments.length?(o=En(t),n):o},n.endAngle=function(t){return arguments.length?(a=En(t),n):a},n.padAngle=function(t){return arguments.length?(l=En(t),n):l},n.centroid=function(){var n=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-Io;return[Math.cos(t)*n,Math.sin(t)*n]},n};var ql=\"auto\";ao.svg.line=function(){return Mu(m)};var Tl=ao.map({linear:xu,\"linear-closed\":bu,step:_u,\"step-before\":wu,\"step-after\":Su,basis:zu,\"basis-open\":Lu,\"basis-closed\":qu,bundle:Tu,cardinal:Eu,\"cardinal-open\":ku,\"cardinal-closed\":Nu,monotone:Fu});Tl.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var Rl=[0,2/3,1/3,0],Dl=[0,1/3,2/3,0],Pl=[0,1/6,2/3,1/6];ao.svg.line.radial=function(){var n=Mu(Hu);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},wu.reverse=Su,Su.reverse=wu,ao.svg.area=function(){return Ou(m)},ao.svg.area.radial=function(){var n=Ou(Hu);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},ao.svg.chord=function(){function n(n,a){var l=t(this,u,n,a),c=t(this,o,n,a);return\"M\"+l.p0+r(l.r,l.p1,l.a1-l.a0)+(e(l,c)?i(l.r,l.p1,l.r,l.p0):i(l.r,l.p1,c.r,c.p0)+r(c.r,c.p1,c.a1-c.a0)+i(c.r,c.p1,l.r,l.p0))+\"Z\"}function t(n,t,e,r){var i=t.call(n,e,r),u=a.call(n,i,r),o=l.call(n,i,r)-Io,f=c.call(n,i,r)-Io;return{r:u,a0:o,a1:f,p0:[u*Math.cos(o),u*Math.sin(o)],p1:[u*Math.cos(f),u*Math.sin(f)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return\"A\"+n+\",\"+n+\" 0 \"+ +(e>Fo)+\",1 \"+t}function i(n,t,e,r){return\"Q 0,0 \"+r}var u=Me,o=xe,a=Iu,l=gu,c=vu;return n.radius=function(t){return arguments.length?(a=En(t),n):a},n.source=function(t){return arguments.length?(u=En(t),n):u},n.target=function(t){return arguments.length?(o=En(t),n):o},n.startAngle=function(t){return arguments.length?(l=En(t),n):l},n.endAngle=function(t){return arguments.length?(c=En(t),n):c},n},ao.svg.diagonal=function(){function n(n,i){var u=t.call(this,n,i),o=e.call(this,n,i),a=(u.y+o.y)/2,l=[u,{x:u.x,y:a},{x:o.x,y:a},o];return l=l.map(r),\"M\"+l[0]+\"C\"+l[1]+\" \"+l[2]+\" \"+l[3]}var t=Me,e=xe,r=Yu;return n.source=function(e){return arguments.length?(t=En(e),n):t},n.target=function(t){return arguments.length?(e=En(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},ao.svg.diagonal.radial=function(){var n=ao.svg.diagonal(),t=Yu,e=n.projection;return n.projection=function(n){return arguments.length?e(Zu(t=n)):t},n},ao.svg.symbol=function(){function n(n,r){return(Ul.get(t.call(this,n,r))||$u)(e.call(this,n,r))}var t=Xu,e=Vu;return n.type=function(e){return arguments.length?(t=En(e),n):t},n.size=function(t){return arguments.length?(e=En(t),n):e},n};var Ul=ao.map({circle:$u,cross:function(n){var t=Math.sqrt(n/5)/2;return\"M\"+-3*t+\",\"+-t+\"H\"+-t+\"V\"+-3*t+\"H\"+t+\"V\"+-t+\"H\"+3*t+\"V\"+t+\"H\"+t+\"V\"+3*t+\"H\"+-t+\"V\"+t+\"H\"+-3*t+\"Z\"},diamond:function(n){var t=Math.sqrt(n/(2*Fl)),e=t*Fl;return\"M0,\"+-t+\"L\"+e+\",0 0,\"+t+\" \"+-e+\",0Z\"},square:function(n){var t=Math.sqrt(n)/2;return\"M\"+-t+\",\"+-t+\"L\"+t+\",\"+-t+\" \"+t+\",\"+t+\" \"+-t+\",\"+t+\"Z\"},\"triangle-down\":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return\"M0,\"+e+\"L\"+t+\",\"+-e+\" \"+-t+\",\"+-e+\"Z\"},\"triangle-up\":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return\"M0,\"+-e+\"L\"+t+\",\"+e+\" \"+-t+\",\"+e+\"Z\"}});ao.svg.symbolTypes=Ul.keys();var jl=Math.sqrt(3),Fl=Math.tan(30*Yo);Co.transition=function(n){for(var t,e,r=Hl||++Zl,i=Ku(n),u=[],o=Ol||{time:Date.now(),ease:Nr,delay:0,duration:250},a=-1,l=this.length;++a<l;){u.push(t=[]);for(var c=this[a],f=-1,s=c.length;++f<s;)(e=c[f])&&Qu(e,f,i,r,o),t.push(e)}return Wu(u,i,r)},Co.interrupt=function(n){return this.each(null==n?Il:Bu(Ku(n)))};var Hl,Ol,Il=Bu(Ku()),Yl=[],Zl=0;Yl.call=Co.call,Yl.empty=Co.empty,Yl.node=Co.node,Yl.size=Co.size,ao.transition=function(n,t){return n&&n.transition?Hl?n.transition(t):n:ao.selection().transition(n)},ao.transition.prototype=Yl,Yl.select=function(n){var t,e,r,i=this.id,u=this.namespace,o=[];n=A(n);for(var a=-1,l=this.length;++a<l;){o.push(t=[]);for(var c=this[a],f=-1,s=c.length;++f<s;)(r=c[f])&&(e=n.call(r,r.__data__,f,a))?(\"__data__\"in r&&(e.__data__=r.__data__),Qu(e,f,u,i,r[u][i]),t.push(e)):t.push(null)}return Wu(o,u,i)},Yl.selectAll=function(n){var t,e,r,i,u,o=this.id,a=this.namespace,l=[];n=C(n);for(var c=-1,f=this.length;++c<f;)for(var s=this[c],h=-1,p=s.length;++h<p;)if(r=s[h]){u=r[a][o],e=n.call(r,r.__data__,h,c),l.push(t=[]);for(var g=-1,v=e.length;++g<v;)(i=e[g])&&Qu(i,g,a,o,u),t.push(i)}return Wu(l,a,o)},Yl.filter=function(n){var t,e,r,i=[];\"function\"!=typeof n&&(n=O(n));for(var u=0,o=this.length;o>u;u++){i.push(t=[]);for(var e=this[u],a=0,l=e.length;l>a;a++)(r=e[a])&&n.call(r,r.__data__,a,u)&&t.push(r)}return Wu(i,this.namespace,this.id)},Yl.tween=function(n,t){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(n):Y(this,null==t?function(t){t[r][e].tween.remove(n)}:function(i){i[r][e].tween.set(n,t)})},Yl.attr=function(n,t){function e(){this.removeAttribute(a)}function r(){this.removeAttributeNS(a.space,a.local)}function i(n){return null==n?e:(n+=\"\",function(){var t,e=this.getAttribute(a);return e!==n&&(t=o(e,n),function(n){this.setAttribute(a,t(n))})})}function u(n){return null==n?r:(n+=\"\",function(){var t,e=this.getAttributeNS(a.space,a.local);return e!==n&&(t=o(e,n),function(n){this.setAttributeNS(a.space,a.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var o=\"transform\"==n?$r:Mr,a=ao.ns.qualify(n);return Ju(this,\"attr.\"+n,t,a.local?u:i)},Yl.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(i));return r&&function(n){this.setAttribute(i,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(i.space,i.local));return r&&function(n){this.setAttributeNS(i.space,i.local,r(n))}}var i=ao.ns.qualify(n);return this.tween(\"attr.\"+n,i.local?r:e)},Yl.style=function(n,e,r){function i(){this.style.removeProperty(n)}function u(e){return null==e?i:(e+=\"\",function(){var i,u=t(this).getComputedStyle(this,null).getPropertyValue(n);return u!==e&&(i=Mr(u,e),function(t){this.style.setProperty(n,i(t),r)})})}var o=arguments.length;if(3>o){if(\"string\"!=typeof n){2>o&&(e=\"\");for(r in n)this.style(r,n[r],e);return this}r=\"\"}return Ju(this,\"style.\"+n,e,u)},Yl.styleTween=function(n,e,r){function i(i,u){var o=e.call(this,i,u,t(this).getComputedStyle(this,null).getPropertyValue(n));return o&&function(t){this.style.setProperty(n,o(t),r)}}return arguments.length<3&&(r=\"\"),this.tween(\"style.\"+n,i)},Yl.text=function(n){return Ju(this,\"text\",n,Gu)},Yl.remove=function(){var n=this.namespace;return this.each(\"end.transition\",function(){var t;this[n].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Yl.ease=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].ease:(\"function\"!=typeof n&&(n=ao.ease.apply(ao,arguments)),Y(this,function(r){r[e][t].ease=n}))},Yl.delay=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].delay:Y(this,\"function\"==typeof n?function(r,i,u){r[e][t].delay=+n.call(r,r.__data__,i,u)}:(n=+n,function(r){r[e][t].delay=n}))},Yl.duration=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].duration:Y(this,\"function\"==typeof n?function(r,i,u){r[e][t].duration=Math.max(1,n.call(r,r.__data__,i,u))}:(n=Math.max(1,n),function(r){r[e][t].duration=n}))},Yl.each=function(n,t){var e=this.id,r=this.namespace;if(arguments.length<2){var i=Ol,u=Hl;try{Hl=e,Y(this,function(t,i,u){Ol=t[r][e],n.call(t,t.__data__,i,u)})}finally{Ol=i,Hl=u}}else Y(this,function(i){var u=i[r][e];(u.event||(u.event=ao.dispatch(\"start\",\"end\",\"interrupt\"))).on(n,t)});return this},Yl.transition=function(){for(var n,t,e,r,i=this.id,u=++Zl,o=this.namespace,a=[],l=0,c=this.length;c>l;l++){a.push(n=[]);for(var t=this[l],f=0,s=t.length;s>f;f++)(e=t[f])&&(r=e[o][i],Qu(e,f,o,u,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),n.push(e)}return Wu(a,o,u)},ao.svg.axis=function(){function n(n){n.each(function(){var n,c=ao.select(this),f=this.__chart__||e,s=this.__chart__=e.copy(),h=null==l?s.ticks?s.ticks.apply(s,a):s.domain():l,p=null==t?s.tickFormat?s.tickFormat.apply(s,a):m:t,g=c.selectAll(\".tick\").data(h,s),v=g.enter().insert(\"g\",\".domain\").attr(\"class\",\"tick\").style(\"opacity\",Uo),d=ao.transition(g.exit()).style(\"opacity\",Uo).remove(),y=ao.transition(g.order()).style(\"opacity\",1),M=Math.max(i,0)+o,x=Zi(s),b=c.selectAll(\".domain\").data([0]),_=(b.enter().append(\"path\").attr(\"class\",\"domain\"),ao.transition(b));v.append(\"line\"),v.append(\"text\");var w,S,k,N,E=v.select(\"line\"),A=y.select(\"line\"),C=g.select(\"text\").text(p),z=v.select(\"text\"),L=y.select(\"text\"),q=\"top\"===r||\"left\"===r?-1:1;if(\"bottom\"===r||\"top\"===r?(n=no,w=\"x\",k=\"y\",S=\"x2\",N=\"y2\",C.attr(\"dy\",0>q?\"0em\":\".71em\").style(\"text-anchor\",\"middle\"),_.attr(\"d\",\"M\"+x[0]+\",\"+q*u+\"V0H\"+x[1]+\"V\"+q*u)):(n=to,w=\"y\",k=\"x\",S=\"y2\",N=\"x2\",C.attr(\"dy\",\".32em\").style(\"text-anchor\",0>q?\"end\":\"start\"),_.attr(\"d\",\"M\"+q*u+\",\"+x[0]+\"H0V\"+x[1]+\"H\"+q*u)),E.attr(N,q*i),z.attr(k,q*M),A.attr(S,0).attr(N,q*i),L.attr(w,0).attr(k,q*M),s.rangeBand){var T=s,R=T.rangeBand()/2;f=s=function(n){return T(n)+R}}else f.rangeBand?f=s:d.call(n,s,f);v.call(n,f,s),y.call(n,s,s)})}var t,e=ao.scale.linear(),r=Vl,i=6,u=6,o=3,a=[10],l=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in Xl?t+\"\":Vl,n):r},n.ticks=function(){return arguments.length?(a=co(arguments),n):a},n.tickValues=function(t){return arguments.length?(l=t,n):l},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(i=+t,u=+arguments[e-1],n):i},n.innerTickSize=function(t){return arguments.length?(i=+t,n):i},n.outerTickSize=function(t){return arguments.length?(u=+t,n):u},n.tickPadding=function(t){return arguments.length?(o=+t,n):o},n.tickSubdivide=function(){return arguments.length&&n},n};var Vl=\"bottom\",Xl={top:1,right:1,bottom:1,left:1};ao.svg.brush=function(){function n(t){t.each(function(){var t=ao.select(this).style(\"pointer-events\",\"all\").style(\"-webkit-tap-highlight-color\",\"rgba(0,0,0,0)\").on(\"mousedown.brush\",u).on(\"touchstart.brush\",u),o=t.selectAll(\".background\").data([0]);o.enter().append(\"rect\").attr(\"class\",\"background\").style(\"visibility\",\"hidden\").style(\"cursor\",\"crosshair\"),t.selectAll(\".extent\").data([0]).enter().append(\"rect\").attr(\"class\",\"extent\").style(\"cursor\",\"move\");var a=t.selectAll(\".resize\").data(v,m);a.exit().remove(),a.enter().append(\"g\").attr(\"class\",function(n){return\"resize \"+n}).style(\"cursor\",function(n){return $l[n]}).append(\"rect\").attr(\"x\",function(n){return/[ew]$/.test(n)?-3:null}).attr(\"y\",function(n){return/^[ns]/.test(n)?-3:null}).attr(\"width\",6).attr(\"height\",6).style(\"visibility\",\"hidden\"),a.style(\"display\",n.empty()?\"none\":null);var l,s=ao.transition(t),h=ao.transition(o);c&&(l=Zi(c),h.attr(\"x\",l[0]).attr(\"width\",l[1]-l[0]),r(s)),f&&(l=Zi(f),h.attr(\"y\",l[0]).attr(\"height\",l[1]-l[0]),i(s)),e(s)})}function e(n){n.selectAll(\".resize\").attr(\"transform\",function(n){return\"translate(\"+s[+/e$/.test(n)]+\",\"+h[+/^s/.test(n)]+\")\"})}function r(n){n.select(\".extent\").attr(\"x\",s[0]),n.selectAll(\".extent,.n>rect,.s>rect\").attr(\"width\",s[1]-s[0])}function i(n){n.select(\".extent\").attr(\"y\",h[0]),n.selectAll(\".extent,.e>rect,.w>rect\").attr(\"height\",h[1]-h[0])}function u(){function u(){32==ao.event.keyCode&&(C||(M=null,L[0]-=s[1],L[1]-=h[1],C=2),S())}function v(){32==ao.event.keyCode&&2==C&&(L[0]+=s[1],L[1]+=h[1],C=0,S())}function d(){var n=ao.mouse(b),t=!1;x&&(n[0]+=x[0],n[1]+=x[1]),C||(ao.event.altKey?(M||(M=[(s[0]+s[1])/2,(h[0]+h[1])/2]),L[0]=s[+(n[0]<M[0])],L[1]=h[+(n[1]<M[1])]):M=null),E&&y(n,c,0)&&(r(k),t=!0),A&&y(n,f,1)&&(i(k),t=!0),t&&(e(k),w({type:\"brush\",mode:C?\"move\":\"resize\"}))}function y(n,t,e){var r,i,u=Zi(t),l=u[0],c=u[1],f=L[e],v=e?h:s,d=v[1]-v[0];return C&&(l-=f,c-=d+f),r=(e?g:p)?Math.max(l,Math.min(c,n[e])):n[e],C?i=(r+=f)+d:(M&&(f=Math.max(l,Math.min(c,2*M[e]-r))),r>f?(i=r,r=f):i=f),v[0]!=r||v[1]!=i?(e?a=null:o=null,v[0]=r,v[1]=i,!0):void 0}function m(){d(),k.style(\"pointer-events\",\"all\").selectAll(\".resize\").style(\"display\",n.empty()?\"none\":null),ao.select(\"body\").style(\"cursor\",null),q.on(\"mousemove.brush\",null).on(\"mouseup.brush\",null).on(\"touchmove.brush\",null).on(\"touchend.brush\",null).on(\"keydown.brush\",null).on(\"keyup.brush\",null),z(),w({type:\"brushend\"})}var M,x,b=this,_=ao.select(ao.event.target),w=l.of(b,arguments),k=ao.select(b),N=_.datum(),E=!/^(n|s)$/.test(N)&&c,A=!/^(e|w)$/.test(N)&&f,C=_.classed(\"extent\"),z=W(b),L=ao.mouse(b),q=ao.select(t(b)).on(\"keydown.brush\",u).on(\"keyup.brush\",v);if(ao.event.changedTouches?q.on(\"touchmove.brush\",d).on(\"touchend.brush\",m):q.on(\"mousemove.brush\",d).on(\"mouseup.brush\",m),k.interrupt().selectAll(\"*\").interrupt(),C)L[0]=s[0]-L[0],L[1]=h[0]-L[1];else if(N){var T=+/w$/.test(N),R=+/^n/.test(N);x=[s[1-T]-L[0],h[1-R]-L[1]],L[0]=s[T],L[1]=h[R]}else ao.event.altKey&&(M=L.slice());k.style(\"pointer-events\",\"none\").selectAll(\".resize\").style(\"display\",null),ao.select(\"body\").style(\"cursor\",_.style(\"cursor\")),w({type:\"brushstart\"}),d()}var o,a,l=N(n,\"brushstart\",\"brush\",\"brushend\"),c=null,f=null,s=[0,0],h=[0,0],p=!0,g=!0,v=Bl[0];return n.event=function(n){n.each(function(){var n=l.of(this,arguments),t={x:s,y:h,i:o,j:a},e=this.__chart__||t;this.__chart__=t,Hl?ao.select(this).transition().each(\"start.brush\",function(){o=e.i,a=e.j,s=e.x,h=e.y,n({type:\"brushstart\"})}).tween(\"brush:brush\",function(){var e=xr(s,t.x),r=xr(h,t.y);return o=a=null,function(i){s=t.x=e(i),h=t.y=r(i),n({type:\"brush\",mode:\"resize\"})}}).each(\"end.brush\",function(){o=t.i,a=t.j,n({type:\"brush\",mode:\"resize\"}),n({type:\"brushend\"})}):(n({type:\"brushstart\"}),n({type:\"brush\",mode:\"resize\"}),n({type:\"brushend\"}))})},n.x=function(t){return arguments.length?(c=t,v=Bl[!c<<1|!f],n):c},n.y=function(t){return arguments.length?(f=t,v=Bl[!c<<1|!f],n):f},n.clamp=function(t){return arguments.length?(c&&f?(p=!!t[0],g=!!t[1]):c?p=!!t:f&&(g=!!t),n):c&&f?[p,g]:c?p:f?g:null},n.extent=function(t){var e,r,i,u,l;return arguments.length?(c&&(e=t[0],r=t[1],f&&(e=e[0],r=r[0]),o=[e,r],c.invert&&(e=c(e),r=c(r)),e>r&&(l=e,e=r,r=l),e==s[0]&&r==s[1]||(s=[e,r])),f&&(i=t[0],u=t[1],c&&(i=i[1],u=u[1]),a=[i,u],f.invert&&(i=f(i),u=f(u)),i>u&&(l=i,i=u,u=l),i==h[0]&&u==h[1]||(h=[i,u])),n):(c&&(o?(e=o[0],r=o[1]):(e=s[0],r=s[1],c.invert&&(e=c.invert(e),r=c.invert(r)),e>r&&(l=e,e=r,r=l))),f&&(a?(i=a[0],u=a[1]):(i=h[0],u=h[1],f.invert&&(i=f.invert(i),u=f.invert(u)),i>u&&(l=i,i=u,u=l))),c&&f?[[e,i],[r,u]]:c?[e,r]:f&&[i,u])},n.clear=function(){return n.empty()||(s=[0,0],h=[0,0],o=a=null),n},n.empty=function(){return!!c&&s[0]==s[1]||!!f&&h[0]==h[1]},ao.rebind(n,l,\"on\")};var $l={n:\"ns-resize\",e:\"ew-resize\",s:\"ns-resize\",w:\"ew-resize\",nw:\"nwse-resize\",ne:\"nesw-resize\",se:\"nwse-resize\",sw:\"nesw-resize\"},Bl=[[\"n\",\"e\",\"s\",\"w\",\"nw\",\"ne\",\"se\",\"sw\"],[\"e\",\"w\"],[\"n\",\"s\"],[]],Wl=ga.format=xa.timeFormat,Jl=Wl.utc,Gl=Jl(\"%Y-%m-%dT%H:%M:%S.%LZ\");Wl.iso=Date.prototype.toISOString&&+new Date(\"2000-01-01T00:00:00.000Z\")?eo:Gl,eo.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},eo.toString=Gl.toString,ga.second=On(function(n){return new va(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),ga.seconds=ga.second.range,ga.seconds.utc=ga.second.utc.range,ga.minute=On(function(n){return new va(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),ga.minutes=ga.minute.range,ga.minutes.utc=ga.minute.utc.range,ga.hour=On(function(n){var t=n.getTimezoneOffset()/60;return new va(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),ga.hours=ga.hour.range,ga.hours.utc=ga.hour.utc.range,ga.month=On(function(n){return n=ga.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),ga.months=ga.month.range,ga.months.utc=ga.month.utc.range;var Kl=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Ql=[[ga.second,1],[ga.second,5],[ga.second,15],[ga.second,30],[ga.minute,1],[ga.minute,5],[ga.minute,15],[ga.minute,30],[ga.hour,1],[ga.hour,3],[ga.hour,6],[ga.hour,12],[ga.day,1],[ga.day,2],[ga.week,1],[ga.month,1],[ga.month,3],[ga.year,1]],nc=Wl.multi([[\".%L\",function(n){return n.getMilliseconds()}],[\":%S\",function(n){return n.getSeconds()}],[\"%I:%M\",function(n){return n.getMinutes()}],[\"%I %p\",function(n){return n.getHours()}],[\"%a %d\",function(n){return n.getDay()&&1!=n.getDate()}],[\"%b %d\",function(n){return 1!=n.getDate()}],[\"%B\",function(n){return n.getMonth()}],[\"%Y\",zt]]),tc={range:function(n,t,e){return ao.range(Math.ceil(n/e)*e,+t,e).map(io)},floor:m,ceil:m};Ql.year=ga.year,ga.scale=function(){return ro(ao.scale.linear(),Ql,nc)};var ec=Ql.map(function(n){return[n[0].utc,n[1]]}),rc=Jl.multi([[\".%L\",function(n){return n.getUTCMilliseconds()}],[\":%S\",function(n){return n.getUTCSeconds()}],[\"%I:%M\",function(n){return n.getUTCMinutes()}],[\"%I %p\",function(n){return n.getUTCHours()}],[\"%a %d\",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],[\"%b %d\",function(n){return 1!=n.getUTCDate()}],[\"%B\",function(n){return n.getUTCMonth()}],[\"%Y\",zt]]);ec.year=ga.year.utc,ga.scale.utc=function(){return ro(ao.scale.linear(),ec,rc)},ao.text=An(function(n){return n.responseText}),ao.json=function(n,t){return Cn(n,\"application/json\",uo,t)},ao.html=function(n,t){return Cn(n,\"text/html\",oo,t)},ao.xml=An(function(n){return n.responseXML}),\"function\"==typeof define&&define.amd?(this.d3=ao,define(ao)):\"object\"==typeof module&&module.exports?module.exports=ao:this.d3=ao}();\n"
  },
  {
    "path": "3rdparty/eigen3/bench/perf_monitoring/resources/s2.js",
    "content": "!function(){var a={};a.dev=!1,a.tooltip=a.tooltip||{},a.utils=a.utils||{},a.models=a.models||{},a.charts={},a.logs={},a.dom={},\"undefined\"!=typeof module&&\"undefined\"!=typeof exports&&\"undefined\"==typeof d3&&(d3=require(\"d3\")),a.dispatch=d3.dispatch(\"render_start\",\"render_end\"),Function.prototype.bind||(Function.prototype.bind=function(a){if(\"function\"!=typeof this)throw new TypeError(\"Function.prototype.bind - what is trying to be bound is not callable\");var b=Array.prototype.slice.call(arguments,1),c=this,d=function(){},e=function(){return c.apply(this instanceof d&&a?this:a,b.concat(Array.prototype.slice.call(arguments)))};return d.prototype=this.prototype,e.prototype=new d,e}),a.dev&&(a.dispatch.on(\"render_start\",function(b){a.logs.startTime=+new Date}),a.dispatch.on(\"render_end\",function(b){a.logs.endTime=+new Date,a.logs.totalTime=a.logs.endTime-a.logs.startTime,a.log(\"total\",a.logs.totalTime)})),a.log=function(){if(a.dev&&window.console&&console.log&&console.log.apply)console.log.apply(console,arguments);else if(a.dev&&window.console&&\"function\"==typeof console.log&&Function.prototype.bind){var b=Function.prototype.bind.call(console.log,console);b.apply(console,arguments)}return arguments[arguments.length-1]},a.deprecated=function(a,b){console&&console.warn&&console.warn(\"nvd3 warning: `\"+a+\"` has been deprecated. \",b||\"\")},a.render=function(b){b=b||1,a.render.active=!0,a.dispatch.render_start();var c=function(){for(var d,e,f=0;b>f&&(e=a.render.queue[f]);f++)d=e.generate(),typeof e.callback==typeof Function&&e.callback(d);a.render.queue.splice(0,f),a.render.queue.length?setTimeout(c):(a.dispatch.render_end(),a.render.active=!1)};setTimeout(c)},a.render.active=!1,a.render.queue=[],a.addGraph=function(b){typeof arguments[0]==typeof Function&&(b={generate:arguments[0],callback:arguments[1]}),a.render.queue.push(b),a.render.active||a.render()},\"undefined\"!=typeof module&&\"undefined\"!=typeof exports&&(module.exports=a),\"undefined\"!=typeof window&&(window.nv=a),a.dom.write=function(a){return void 0!==window.fastdom?fastdom.mutate(a):a()},a.dom.read=function(a){return void 0!==window.fastdom?fastdom.measure(a):a()},a.interactiveGuideline=function(){\"use strict\";function b(l){l.each(function(l){function m(){var a=d3.mouse(this),d=a[0],e=a[1],h=!0,i=!1;if(k&&(d=d3.event.offsetX,e=d3.event.offsetY,\"svg\"!==d3.event.target.tagName&&(h=!1),d3.event.target.className.baseVal.match(\"nv-legend\")&&(i=!0)),h&&(d-=c.left,e-=c.top),\"mouseout\"===d3.event.type||0>d||0>e||d>o||e>p||d3.event.relatedTarget&&void 0===d3.event.relatedTarget.ownerSVGElement||i){if(k&&d3.event.relatedTarget&&void 0===d3.event.relatedTarget.ownerSVGElement&&(void 0===d3.event.relatedTarget.className||d3.event.relatedTarget.className.match(j.nvPointerEventsClass)))return;return g.elementMouseout({mouseX:d,mouseY:e}),b.renderGuideLine(null),void j.hidden(!0)}j.hidden(!1);var l=\"function\"==typeof f.rangeBands,m=void 0;if(l){var n=d3.bisect(f.range(),d)-1;if(!(f.range()[n]+f.rangeBand()>=d))return g.elementMouseout({mouseX:d,mouseY:e}),b.renderGuideLine(null),void j.hidden(!0);m=f.domain()[d3.bisect(f.range(),d)-1]}else m=f.invert(d);g.elementMousemove({mouseX:d,mouseY:e,pointXValue:m}),\"dblclick\"===d3.event.type&&g.elementDblclick({mouseX:d,mouseY:e,pointXValue:m}),\"click\"===d3.event.type&&g.elementClick({mouseX:d,mouseY:e,pointXValue:m}),\"mousedown\"===d3.event.type&&g.elementMouseDown({mouseX:d,mouseY:e,pointXValue:m}),\"mouseup\"===d3.event.type&&g.elementMouseUp({mouseX:d,mouseY:e,pointXValue:m})}var n=d3.select(this),o=d||960,p=e||400,q=n.selectAll(\"g.nv-wrap.nv-interactiveLineLayer\").data([l]),r=q.enter().append(\"g\").attr(\"class\",\" nv-wrap nv-interactiveLineLayer\");r.append(\"g\").attr(\"class\",\"nv-interactiveGuideLine\"),i&&(i.on(\"touchmove\",m).on(\"mousemove\",m,!0).on(\"mouseout\",m,!0).on(\"mousedown\",m,!0).on(\"mouseup\",m,!0).on(\"dblclick\",m).on(\"click\",m),b.guideLine=null,b.renderGuideLine=function(c){h&&(b.guideLine&&b.guideLine.attr(\"x1\")===c||a.dom.write(function(){var b=q.select(\".nv-interactiveGuideLine\").selectAll(\"line\").data(null!=c?[a.utils.NaNtoZero(c)]:[],String);b.enter().append(\"line\").attr(\"class\",\"nv-guideline\").attr(\"x1\",function(a){return a}).attr(\"x2\",function(a){return a}).attr(\"y1\",p).attr(\"y2\",0),b.exit().remove()}))})})}var c={left:0,top:0},d=null,e=null,f=d3.scale.linear(),g=d3.dispatch(\"elementMousemove\",\"elementMouseout\",\"elementClick\",\"elementDblclick\",\"elementMouseDown\",\"elementMouseUp\"),h=!0,i=null,j=a.models.tooltip(),k=window.ActiveXObject;return j.duration(0).hideDelay(0).hidden(!1),b.dispatch=g,b.tooltip=j,b.margin=function(a){return arguments.length?(c.top=\"undefined\"!=typeof a.top?a.top:c.top,c.left=\"undefined\"!=typeof a.left?a.left:c.left,b):c},b.width=function(a){return arguments.length?(d=a,b):d},b.height=function(a){return arguments.length?(e=a,b):e},b.xScale=function(a){return arguments.length?(f=a,b):f},b.showGuideLine=function(a){return arguments.length?(h=a,b):h},b.svgContainer=function(a){return arguments.length?(i=a,b):i},b},a.interactiveBisect=function(a,b,c){\"use strict\";if(!(a instanceof Array))return null;var d;d=\"function\"!=typeof c?function(a){return a.x}:c;var e=function(a,b){return d(a)-b},f=d3.bisector(e).left,g=d3.max([0,f(a,b)-1]),h=d(a[g]);if(\"undefined\"==typeof h&&(h=g),h===b)return g;var i=d3.min([g+1,a.length-1]),j=d(a[i]);return\"undefined\"==typeof j&&(j=i),Math.abs(j-b)>=Math.abs(h-b)?g:i},a.nearestValueIndex=function(a,b,c){\"use strict\";var d=1/0,e=null;return a.forEach(function(a,f){var g=Math.abs(b-a);null!=a&&d>=g&&c>g&&(d=g,e=f)}),e},a.models.tooltip=function(){\"use strict\";function b(){if(!l||!l.node()){var a=[1];l=d3.select(document.body).selectAll(\".nvtooltip\").data(a),l.enter().append(\"div\").attr(\"class\",\"nvtooltip \"+(i?i:\"xy-tooltip\")).attr(\"id\",d).style(\"top\",0).style(\"left\",0).style(\"opacity\",0).style(\"position\",\"fixed\").selectAll(\"div, table, td, tr\").classed(q,!0).classed(q,!0),l.exit().remove()}}function c(){return n&&w(e)?(a.dom.write(function(){b();var a=u(e);a&&(l.node().innerHTML=a),y()}),c):void 0}var d=\"nvtooltip-\"+Math.floor(1e5*Math.random()),e=null,f=\"w\",g=25,h=0,i=null,j=!0,k=200,l=null,m={left:null,top:null},n=!0,o=100,p=!0,q=\"nv-pointer-events-none\",r=function(a,b){return a},s=function(a){return a},t=function(a,b){return a},u=function(a){if(null===a)return\"\";var b=d3.select(document.createElement(\"table\"));if(p){var c=b.selectAll(\"thead\").data([a]).enter().append(\"thead\");c.append(\"tr\").append(\"td\").attr(\"colspan\",3).append(\"strong\").classed(\"x-value\",!0).html(s(a.value))}var d=b.selectAll(\"tbody\").data([a]).enter().append(\"tbody\"),e=d.selectAll(\"tr\").data(function(a){return a.series}).enter().append(\"tr\").classed(\"highlight\",function(a){return a.highlight});e.append(\"td\").classed(\"legend-color-guide\",!0).append(\"div\").style(\"background-color\",function(a){return a.color}),e.append(\"td\").classed(\"key\",!0).classed(\"total\",function(a){return!!a.total}).html(function(a,b){return t(a.key,b)}),e.append(\"td\").classed(\"value\",!0).html(function(a,b){return r(a.value,b)}),e.filter(function(a,b){return void 0!==a.percent}).append(\"td\").classed(\"percent\",!0).html(function(a,b){return\"(\"+d3.format(\"%\")(a.percent)+\")\"}),e.selectAll(\"td\").each(function(a){if(a.highlight){var b=d3.scale.linear().domain([0,1]).range([\"#fff\",a.color]),c=.6;d3.select(this).style(\"border-bottom-color\",b(c)).style(\"border-top-color\",b(c))}});var f=b.node().outerHTML;return void 0!==a.footer&&(f+=\"<div class='footer'>\"+a.footer+\"</div>\"),f},v=function(){var a={left:null!==d3.event?d3.event.clientX:0,top:null!==d3.event?d3.event.clientY:0};if(\"none\"!=getComputedStyle(document.body).transform){var b=document.body.getBoundingClientRect();a.left-=b.left,a.top-=b.top}return a},w=function(b){if(b&&b.series){if(a.utils.isArray(b.series))return!0;if(a.utils.isObject(b.series))return b.series=[b.series],!0}return!1},x=function(a){var b,c,d,e=l.node().offsetHeight,h=l.node().offsetWidth,i=document.documentElement.clientWidth,j=document.documentElement.clientHeight;switch(f){case\"e\":b=-h-g,c=-(e/2),a.left+b<0&&(b=g),(d=a.top+c)<0&&(c-=d),(d=a.top+c+e)>j&&(c-=d-j);break;case\"w\":b=g,c=-(e/2),a.left+b+h>i&&(b=-h-g),(d=a.top+c)<0&&(c-=d),(d=a.top+c+e)>j&&(c-=d-j);break;case\"n\":b=-(h/2)-5,c=g,a.top+c+e>j&&(c=-e-g),(d=a.left+b)<0&&(b-=d),(d=a.left+b+h)>i&&(b-=d-i);break;case\"s\":b=-(h/2),c=-e-g,a.top+c<0&&(c=g),(d=a.left+b)<0&&(b-=d),(d=a.left+b+h)>i&&(b-=d-i);break;case\"center\":b=-(h/2),c=-(e/2);break;default:b=0,c=0}return{left:b,top:c}},y=function(){a.dom.read(function(){var a=v(),b=x(a),c=a.left+b.left,d=a.top+b.top;if(j)l.interrupt().transition().delay(k).duration(0).style(\"opacity\",0);else{var e=\"translate(\"+m.left+\"px, \"+m.top+\"px)\",f=\"translate(\"+Math.round(c)+\"px, \"+Math.round(d)+\"px)\",g=d3.interpolateString(e,f),h=l.style(\"opacity\")<.1;l.interrupt().transition().duration(h?0:o).styleTween(\"transform\",function(a){return g},\"important\").styleTween(\"-webkit-transform\",function(a){return g}).style(\"-ms-transform\",f).style(\"opacity\",1)}m.left=c,m.top=d})};return c.nvPointerEventsClass=q,c.options=a.utils.optionsFunc.bind(c),c._options=Object.create({},{duration:{get:function(){return o},set:function(a){o=a}},gravity:{get:function(){return f},set:function(a){f=a}},distance:{get:function(){return g},set:function(a){g=a}},snapDistance:{get:function(){return h},set:function(a){h=a}},classes:{get:function(){return i},set:function(a){i=a}},enabled:{get:function(){return n},set:function(a){n=a}},hideDelay:{get:function(){return k},set:function(a){k=a}},contentGenerator:{get:function(){return u},set:function(a){u=a}},valueFormatter:{get:function(){return r},set:function(a){r=a}},headerFormatter:{get:function(){return s},set:function(a){s=a}},keyFormatter:{get:function(){return t},set:function(a){t=a}},headerEnabled:{get:function(){return p},set:function(a){p=a}},position:{get:function(){return v},set:function(a){v=a}},chartContainer:{get:function(){return document.body},set:function(b){a.deprecated(\"chartContainer\",\"feature removed after 1.8.3\")}},fixedTop:{get:function(){return null},set:function(b){a.deprecated(\"fixedTop\",\"feature removed after 1.8.1\")}},offset:{get:function(){return{left:0,top:0}},set:function(b){a.deprecated(\"offset\",\"use chart.tooltip.distance() instead\")}},hidden:{get:function(){return j},set:function(a){j!=a&&(j=!!a,c())}},data:{get:function(){return e},set:function(a){a.point&&(a.value=a.point.x,a.series=a.series||{},a.series.value=a.point.y,a.series.color=a.point.color||a.series.color),e=a}},node:{get:function(){return l.node()},set:function(a){}},id:{get:function(){return d},set:function(a){}}}),a.utils.initOptions(c),c},a.utils.windowSize=function(){var a={width:640,height:480};return window.innerWidth&&window.innerHeight?(a.width=window.innerWidth,a.height=window.innerHeight,a):\"CSS1Compat\"==document.compatMode&&document.documentElement&&document.documentElement.offsetWidth?(a.width=document.documentElement.offsetWidth,a.height=document.documentElement.offsetHeight,a):document.body&&document.body.offsetWidth?(a.width=document.body.offsetWidth,a.height=document.body.offsetHeight,a):a},a.utils.isArray=Array.isArray,a.utils.isObject=function(a){return null!==a&&\"object\"==typeof a},a.utils.isFunction=function(a){return\"function\"==typeof a},a.utils.isDate=function(a){return\"[object Date]\"===toString.call(a)},a.utils.isNumber=function(a){return!isNaN(a)&&\"number\"==typeof a},a.utils.windowResize=function(b){return window.addEventListener?window.addEventListener(\"resize\",b):a.log(\"ERROR: Failed to bind to window.resize with: \",b),{callback:b,clear:function(){window.removeEventListener(\"resize\",b)}}},a.utils.getColor=function(b){if(void 0===b)return a.utils.defaultColor();if(a.utils.isArray(b)){var c=d3.scale.ordinal().range(b);return function(a,b){var d=void 0===b?a:b;return a.color||c(d)}}return b},a.utils.defaultColor=function(){return a.utils.getColor(d3.scale.category20().range())},a.utils.customTheme=function(b,c,d){c=c||function(a){return a.key},d=d||d3.scale.category20().range();var e=d.length;return function(f,g){var h=c(f);return a.utils.isFunction(b[h])?b[h]():void 0!==b[h]?b[h]:(e||(e=d.length),e-=1,d[e])}},a.utils.pjax=function(b,c){var d=function(d){d3.html(d,function(d){var e=d3.select(c).node();e.parentNode.replaceChild(d3.select(d).select(c).node(),e),a.utils.pjax(b,c)})};d3.selectAll(b).on(\"click\",function(){history.pushState(this.href,this.textContent,this.href),d(this.href),d3.event.preventDefault()}),d3.select(window).on(\"popstate\",function(){d3.event.state&&d(d3.event.state)})},a.utils.calcApproxTextWidth=function(b){if(a.utils.isFunction(b.style)&&a.utils.isFunction(b.text)){var c=parseInt(b.style(\"font-size\").replace(\"px\",\"\"),10),d=b.text().length;return a.utils.NaNtoZero(d*c*.5)}return 0},a.utils.NaNtoZero=function(b){return!a.utils.isNumber(b)||isNaN(b)||null===b||b===1/0||b===-(1/0)?0:b},d3.selection.prototype.watchTransition=function(a){var b=[this].concat([].slice.call(arguments,1));return a.transition.apply(a,b)},a.utils.renderWatch=function(b,c){if(!(this instanceof a.utils.renderWatch))return new a.utils.renderWatch(b,c);var d=void 0!==c?c:250,e=[],f=this;this.models=function(a){return a=[].slice.call(arguments,0),a.forEach(function(a){a.__rendered=!1,function(a){a.dispatch.on(\"renderEnd\",function(b){a.__rendered=!0,f.renderEnd(\"model\")})}(a),e.indexOf(a)<0&&e.push(a)}),this},this.reset=function(a){void 0!==a&&(d=a),e=[]},this.transition=function(a,b,c){if(b=arguments.length>1?[].slice.call(arguments,1):[],c=b.length>1?b.pop():void 0!==d?d:250,a.__rendered=!1,e.indexOf(a)<0&&e.push(a),0===c)return a.__rendered=!0,a.delay=function(){return this},a.duration=function(){return this},a;0===a.length?a.__rendered=!0:a.every(function(a){return!a.length})?a.__rendered=!0:a.__rendered=!1;var g=0;return a.transition().duration(c).each(function(){++g}).each(\"end\",function(c,d){0===--g&&(a.__rendered=!0,f.renderEnd.apply(this,b))})},this.renderEnd=function(){e.every(function(a){return a.__rendered})&&(e.forEach(function(a){a.__rendered=!1}),b.renderEnd.apply(this,arguments))}},a.utils.deepExtend=function(b){var c=arguments.length>1?[].slice.call(arguments,1):[];c.forEach(function(c){for(var d in c){var e=a.utils.isArray(b[d]),f=a.utils.isObject(b[d]),g=a.utils.isObject(c[d]);f&&!e&&g?a.utils.deepExtend(b[d],c[d]):b[d]=c[d]}})},a.utils.state=function(){if(!(this instanceof a.utils.state))return new a.utils.state;var b={},c=function(){},d=function(){return{}},e=null,f=null;this.dispatch=d3.dispatch(\"change\",\"set\"),this.dispatch.on(\"set\",function(a){c(a,!0)}),this.getter=function(a){return d=a,this},this.setter=function(a,b){return b||(b=function(){}),c=function(c,d){a(c),d&&b()},this},this.init=function(b){e=e||{},a.utils.deepExtend(e,b)};var g=function(){var a=d();if(JSON.stringify(a)===JSON.stringify(b))return!1;for(var c in a)void 0===b[c]&&(b[c]={}),b[c]=a[c],f=!0;return!0};this.update=function(){e&&(c(e,!1),e=null),g.call(this)&&this.dispatch.change(b)}},a.utils.optionsFunc=function(b){return b&&d3.map(b).forEach(function(b,c){a.utils.isFunction(this[b])&&this[b](c)}.bind(this)),this},a.utils.calcTicksX=function(b,c){var d=1,e=0;for(e;e<c.length;e+=1){var f=c[e]&&c[e].values?c[e].values.length:0;d=f>d?f:d}return a.log(\"Requested number of ticks: \",b),a.log(\"Calculated max values to be: \",d),b=b>d?b=d-1:b,b=1>b?1:b,b=Math.floor(b),a.log(\"Calculating tick count as: \",b),b},a.utils.calcTicksY=function(b,c){return a.utils.calcTicksX(b,c)},a.utils.initOption=function(a,b){a._calls&&a._calls[b]?a[b]=a._calls[b]:(a[b]=function(c){return arguments.length?(a._overrides[b]=!0,a._options[b]=c,a):a._options[b]},a[\"_\"+b]=function(c){return arguments.length?(a._overrides[b]||(a._options[b]=c),a):a._options[b]})},a.utils.initOptions=function(b){b._overrides=b._overrides||{};var c=Object.getOwnPropertyNames(b._options||{}),d=Object.getOwnPropertyNames(b._calls||{});c=c.concat(d);for(var e in c)a.utils.initOption(b,c[e])},a.utils.inheritOptionsD3=function(a,b,c){a._d3options=c.concat(a._d3options||[]),c.unshift(b),c.unshift(a),d3.rebind.apply(this,c)},a.utils.arrayUnique=function(a){return a.sort().filter(function(b,c){return!c||b!=a[c-1]})},a.utils.symbolMap=d3.map(),a.utils.symbol=function(){function b(b,e){var f=c.call(this,b,e),g=d.call(this,b,e);return-1!==d3.svg.symbolTypes.indexOf(f)?d3.svg.symbol().type(f).size(g)():a.utils.symbolMap.get(f)(g)}var c,d=64;return b.type=function(a){return arguments.length?(c=d3.functor(a),b):c},b.size=function(a){return arguments.length?(d=d3.functor(a),b):d},b},a.utils.inheritOptions=function(b,c){var d=Object.getOwnPropertyNames(c._options||{}),e=Object.getOwnPropertyNames(c._calls||{}),f=c._inherited||[],g=c._d3options||[],h=d.concat(e).concat(f).concat(g);h.unshift(c),h.unshift(b),d3.rebind.apply(this,h),b._inherited=a.utils.arrayUnique(d.concat(e).concat(f).concat(d).concat(b._inherited||[])),b._d3options=a.utils.arrayUnique(g.concat(b._d3options||[]))},a.utils.initSVG=function(a){a.classed({\"nvd3-svg\":!0})},a.utils.sanitizeHeight=function(a,b){return a||parseInt(b.style(\"height\"),10)||400},a.utils.sanitizeWidth=function(a,b){return a||parseInt(b.style(\"width\"),10)||960},a.utils.availableHeight=function(b,c,d){return Math.max(0,a.utils.sanitizeHeight(b,c)-d.top-d.bottom)},a.utils.availableWidth=function(b,c,d){return Math.max(0,a.utils.sanitizeWidth(b,c)-d.left-d.right)},a.utils.noData=function(b,c){var d=b.options(),e=d.margin(),f=d.noData(),g=null==f?[\"No Data Available.\"]:[f],h=a.utils.availableHeight(null,c,e),i=a.utils.availableWidth(null,c,e),j=e.left+i/2,k=e.top+h/2;c.selectAll(\"g\").remove();var l=c.selectAll(\".nv-noData\").data(g);l.enter().append(\"text\").attr(\"class\",\"nvd3 nv-noData\").attr(\"dy\",\"-.7em\").style(\"text-anchor\",\"middle\"),l.attr(\"x\",j).attr(\"y\",k).text(function(a){return a})},a.utils.wrapTicks=function(a,b){a.each(function(){for(var a,c=d3.select(this),d=c.text().split(/\\s+/).reverse(),e=[],f=0,g=1.1,h=c.attr(\"y\"),i=parseFloat(c.attr(\"dy\")),j=c.text(null).append(\"tspan\").attr(\"x\",0).attr(\"y\",h).attr(\"dy\",i+\"em\");a=d.pop();)e.push(a),j.text(e.join(\" \")),j.node().getComputedTextLength()>b&&(e.pop(),j.text(e.join(\" \")),e=[a],j=c.append(\"tspan\").attr(\"x\",0).attr(\"y\",h).attr(\"dy\",++f*g+i+\"em\").text(a))})},a.utils.arrayEquals=function(b,c){if(b===c)return!0;if(!b||!c)return!1;if(b.length!=c.length)return!1;for(var d=0,e=b.length;e>d;d++)if(b[d]instanceof Array&&c[d]instanceof Array){if(!a.arrayEquals(b[d],c[d]))return!1}else if(b[d]!=c[d])return!1;return!0},a.models.axis=function(){\"use strict\";function b(g){return t.reset(),g.each(function(b){var g=d3.select(this);a.utils.initSVG(g);var q=g.selectAll(\"g.nv-wrap.nv-axis\").data([b]),r=q.enter().append(\"g\").attr(\"class\",\"nvd3 nv-wrap nv-axis\"),u=(r.append(\"g\"),q.select(\"g\"));null!==n?c.ticks(n):(\"top\"==c.orient()||\"bottom\"==c.orient())&&c.ticks(Math.abs(d.range()[1]-d.range()[0])/100),u.watchTransition(t,\"axis\").call(c),s=s||c.scale();var v=c.tickFormat();null==v&&(v=s.tickFormat());var w=u.selectAll(\"text.nv-axislabel\").data([h||null]);w.exit().remove(),void 0!==p&&u.selectAll(\"g\").select(\"text\").style(\"font-size\",p);var x,y,z;switch(c.orient()){case\"top\":w.enter().append(\"text\").attr(\"class\",\"nv-axislabel\"),z=0,1===d.range().length?z=m?2*d.range()[0]+d.rangeBand():0:2===d.range().length?z=m?d.range()[0]+d.range()[1]+d.rangeBand():d.range()[1]:d.range().length>2&&(z=d.range()[d.range().length-1]+(d.range()[1]-d.range()[0])),w.attr(\"text-anchor\",\"middle\").attr(\"y\",0).attr(\"x\",z/2),i&&(y=q.selectAll(\"g.nv-axisMaxMin\").data(d.domain()),y.enter().append(\"g\").attr(\"class\",function(a,b){return[\"nv-axisMaxMin\",\"nv-axisMaxMin-x\",0==b?\"nv-axisMin-x\":\"nv-axisMax-x\"].join(\" \")}).append(\"text\"),y.exit().remove(),y.attr(\"transform\",function(b,c){return\"translate(\"+a.utils.NaNtoZero(d(b))+\",0)\"}).select(\"text\").attr(\"dy\",\"-0.5em\").attr(\"y\",-c.tickPadding()).attr(\"text-anchor\",\"middle\").text(function(a,b){var c=v(a);return(\"\"+c).match(\"NaN\")?\"\":c}),y.watchTransition(t,\"min-max top\").attr(\"transform\",function(b,c){return\"translate(\"+a.utils.NaNtoZero(d.range()[c])+\",0)\"}));break;case\"bottom\":x=o+36;var A=30,B=0,C=u.selectAll(\"g\").select(\"text\"),D=\"\";if(j%360){C.attr(\"transform\",\"\"),C.each(function(a,b){var c=this.getBoundingClientRect(),d=c.width;B=c.height,d>A&&(A=d)}),D=\"rotate(\"+j+\" 0,\"+(B/2+c.tickPadding())+\")\";var E=Math.abs(Math.sin(j*Math.PI/180));x=(E?E*A:A)+30,C.attr(\"transform\",D).style(\"text-anchor\",j%360>0?\"start\":\"end\")}else l?C.attr(\"transform\",function(a,b){return\"translate(0,\"+(b%2==0?\"0\":\"12\")+\")\"}):C.attr(\"transform\",\"translate(0,0)\");w.enter().append(\"text\").attr(\"class\",\"nv-axislabel\"),z=0,1===d.range().length?z=m?2*d.range()[0]+d.rangeBand():0:2===d.range().length?z=m?d.range()[0]+d.range()[1]+d.rangeBand():d.range()[1]:d.range().length>2&&(z=d.range()[d.range().length-1]+(d.range()[1]-d.range()[0])),w.attr(\"text-anchor\",\"middle\").attr(\"y\",x).attr(\"x\",z/2),i&&(y=q.selectAll(\"g.nv-axisMaxMin\").data([d.domain()[0],d.domain()[d.domain().length-1]]),y.enter().append(\"g\").attr(\"class\",function(a,b){return[\"nv-axisMaxMin\",\"nv-axisMaxMin-x\",0==b?\"nv-axisMin-x\":\"nv-axisMax-x\"].join(\" \")}).append(\"text\"),y.exit().remove(),y.attr(\"transform\",function(b,c){return\"translate(\"+a.utils.NaNtoZero(d(b)+(m?d.rangeBand()/2:0))+\",0)\"}).select(\"text\").attr(\"dy\",\".71em\").attr(\"y\",c.tickPadding()).attr(\"transform\",D).style(\"text-anchor\",j?j%360>0?\"start\":\"end\":\"middle\").text(function(a,b){var c=v(a);return(\"\"+c).match(\"NaN\")?\"\":c}),y.watchTransition(t,\"min-max bottom\").attr(\"transform\",function(b,c){return\"translate(\"+a.utils.NaNtoZero(d(b)+(m?d.rangeBand()/2:0))+\",0)\"}));break;case\"right\":w.enter().append(\"text\").attr(\"class\",\"nv-axislabel\"),w.style(\"text-anchor\",k?\"middle\":\"begin\").attr(\"transform\",k?\"rotate(90)\":\"\").attr(\"y\",k?-Math.max(e.right,f)+12-(o||0):-10).attr(\"x\",k?d3.max(d.range())/2:c.tickPadding()),i&&(y=q.selectAll(\"g.nv-axisMaxMin\").data(d.domain()),y.enter().append(\"g\").attr(\"class\",function(a,b){return[\"nv-axisMaxMin\",\"nv-axisMaxMin-y\",0==b?\"nv-axisMin-y\":\"nv-axisMax-y\"].join(\" \")}).append(\"text\").style(\"opacity\",0),y.exit().remove(),y.attr(\"transform\",function(b,c){return\"translate(0,\"+a.utils.NaNtoZero(d(b))+\")\"}).select(\"text\").attr(\"dy\",\".32em\").attr(\"y\",0).attr(\"x\",c.tickPadding()).style(\"text-anchor\",\"start\").text(function(a,b){var c=v(a);return(\"\"+c).match(\"NaN\")?\"\":c}),y.watchTransition(t,\"min-max right\").attr(\"transform\",function(b,c){return\"translate(0,\"+a.utils.NaNtoZero(d.range()[c])+\")\"}).select(\"text\").style(\"opacity\",1));break;case\"left\":w.enter().append(\"text\").attr(\"class\",\"nv-axislabel\"),w.style(\"text-anchor\",k?\"middle\":\"end\").attr(\"transform\",k?\"rotate(-90)\":\"\").attr(\"y\",k?-Math.max(e.left,f)+25-(o||0):-10).attr(\"x\",k?-d3.max(d.range())/2:-c.tickPadding()),i&&(y=q.selectAll(\"g.nv-axisMaxMin\").data(d.domain()),y.enter().append(\"g\").attr(\"class\",function(a,b){return[\"nv-axisMaxMin\",\"nv-axisMaxMin-y\",0==b?\"nv-axisMin-y\":\"nv-axisMax-y\"].join(\" \")}).append(\"text\").style(\"opacity\",0),y.exit().remove(),y.attr(\"transform\",function(b,c){return\"translate(0,\"+a.utils.NaNtoZero(s(b))+\")\"}).select(\"text\").attr(\"dy\",\".32em\").attr(\"y\",0).attr(\"x\",-c.tickPadding()).attr(\"text-anchor\",\"end\").text(function(a,b){var c=v(a);return(\"\"+c).match(\"NaN\")?\"\":c}),y.watchTransition(t,\"min-max right\").attr(\"transform\",function(b,c){return\"translate(0,\"+a.utils.NaNtoZero(d.range()[c])+\")\"}).select(\"text\").style(\"opacity\",1))}if(w.text(function(a){return a}),!i||\"left\"!==c.orient()&&\"right\"!==c.orient()||(u.selectAll(\"g\").each(function(a,b){d3.select(this).select(\"text\").attr(\"opacity\",1),(d(a)<d.range()[1]+10||d(a)>d.range()[0]-10)&&((a>1e-10||-1e-10>a)&&d3.select(this).attr(\"opacity\",0),d3.select(this).select(\"text\").attr(\"opacity\",0))}),d.domain()[0]==d.domain()[1]&&0==d.domain()[0]&&q.selectAll(\"g.nv-axisMaxMin\").style(\"opacity\",function(a,b){return b?0:1})),i&&(\"top\"===c.orient()||\"bottom\"===c.orient())){var F=[];q.selectAll(\"g.nv-axisMaxMin\").each(function(a,b){try{b?F.push(d(a)-this.getBoundingClientRect().width-4):F.push(d(a)+this.getBoundingClientRect().width+4)}catch(c){b?F.push(d(a)-4):F.push(d(a)+4)}}),u.selectAll(\"g\").each(function(a,b){(d(a)<F[0]||d(a)>F[1])&&(a>1e-10||-1e-10>a?d3.select(this).remove():d3.select(this).select(\"text\").remove())})}u.selectAll(\".tick\").filter(function(a){return!parseFloat(Math.round(1e5*a)/1e6)&&void 0!==a}).classed(\"zero\",!0),s=d.copy()}),t.renderEnd(\"axis immediate\"),b}var c=d3.svg.axis(),d=d3.scale.linear(),e={top:0,right:0,bottom:0,left:0},f=75,g=60,h=null,i=!0,j=0,k=!0,l=!1,m=!1,n=null,o=0,p=void 0,q=250,r=d3.dispatch(\"renderEnd\");c.scale(d).orient(\"bottom\").tickFormat(function(a){return a});var s,t=a.utils.renderWatch(r,q);return b.axis=c,b.dispatch=r,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{axisLabelDistance:{get:function(){return o},set:function(a){o=a}},staggerLabels:{get:function(){return l},set:function(a){l=a}},rotateLabels:{get:function(){return j},set:function(a){j=a}},rotateYLabel:{get:function(){return k},set:function(a){k=a}},showMaxMin:{get:function(){return i},set:function(a){i=a}},axisLabel:{get:function(){return h},set:function(a){h=a}},height:{get:function(){return g},set:function(a){g=a}},ticks:{get:function(){return n},set:function(a){n=a}},width:{get:function(){return f},set:function(a){f=a}},fontSize:{get:function(){return p},set:function(a){p=a}},margin:{get:function(){return e},set:function(a){e.top=void 0!==a.top?a.top:e.top,e.right=void 0!==a.right?a.right:e.right,e.bottom=void 0!==a.bottom?a.bottom:e.bottom,e.left=void 0!==a.left?a.left:e.left}},duration:{get:function(){return q},set:function(a){q=a,t.reset(q)}},scale:{get:function(){return d},set:function(e){d=e,c.scale(d),m=\"function\"==typeof d.rangeBands,a.utils.inheritOptionsD3(b,d,[\"domain\",\"range\",\"rangeBand\",\"rangeBands\"])}}}),a.utils.initOptions(b),a.utils.inheritOptionsD3(b,c,[\"orient\",\"tickValues\",\"tickSubdivide\",\"tickSize\",\"tickPadding\",\"tickFormat\"]),a.utils.inheritOptionsD3(b,d,[\"domain\",\"range\",\"rangeBand\",\"rangeBands\"]),b},a.models.boxPlot=function(){\"use strict\";function b(l){return E.reset(),l.each(function(b){var l=j-i.left-i.right,F=k-i.top-i.bottom;A=d3.select(this),a.utils.initSVG(A),m.domain(c||b.map(function(a,b){return o(a,b)})).rangeBands(d||[0,l],.1);var G=[];if(!e){var H,I,J=[];b.forEach(function(a,b){var c=p(a),d=r(a),e=s(a),f=t(a),g=v(a);g&&g.forEach(function(a,b){J.push(w(a,b,void 0))}),e&&J.push(e),c&&J.push(c),d&&J.push(d),f&&J.push(f)}),H=d3.min(J),I=d3.max(J),G=[H,I]}n.domain(e||G),n.range(f||[F,0]),g=g||m,h=h||n.copy().range([n(0),n(0)]);var K=A.selectAll(\"g.nv-wrap\").data([b]);K.enter().append(\"g\").attr(\"class\",\"nvd3 nv-wrap\");K.attr(\"transform\",\"translate(\"+i.left+\",\"+i.top+\")\");var L=K.selectAll(\".nv-boxplot\").data(function(a){return a}),M=L.enter().append(\"g\").style(\"stroke-opacity\",1e-6).style(\"fill-opacity\",1e-6);L.attr(\"class\",\"nv-boxplot\").attr(\"transform\",function(a,b,c){return\"translate(\"+(m(o(a,b))+.05*m.rangeBand())+\", 0)\"}).classed(\"hover\",function(a){return a.hover}),L.watchTransition(E,\"nv-boxplot: boxplots\").style(\"stroke-opacity\",1).style(\"fill-opacity\",.75).delay(function(a,c){return c*C/b.length}).attr(\"transform\",function(a,b){return\"translate(\"+(m(o(a,b))+.05*m.rangeBand())+\", 0)\"}),L.exit().remove(),M.each(function(a,b){var c=d3.select(this);[s,t].forEach(function(d){if(d(a)){var e=d===s?\"low\":\"high\";c.append(\"line\").style(\"stroke\",u(a)||z(a,b)).attr(\"class\",\"nv-boxplot-whisker nv-boxplot-\"+e),c.append(\"line\").style(\"stroke\",u(a)||z(a,b)).attr(\"class\",\"nv-boxplot-tick nv-boxplot-\"+e)}})});var N=function(){return null===D?.9*m.rangeBand():Math.min(75,.9*m.rangeBand())},O=function(){return.45*m.rangeBand()-N()/2},P=function(){return.45*m.rangeBand()+N()/2};[s,t].forEach(function(a){var b=a===s?\"low\":\"high\",c=a===s?p:r;L.select(\"line.nv-boxplot-whisker.nv-boxplot-\"+b).watchTransition(E,\"nv-boxplot: boxplots\").attr(\"x1\",.45*m.rangeBand()).attr(\"y1\",function(b,c){return n(a(b))}).attr(\"x2\",.45*m.rangeBand()).attr(\"y2\",function(a,b){return n(c(a))}),L.select(\"line.nv-boxplot-tick.nv-boxplot-\"+b).watchTransition(E,\"nv-boxplot: boxplots\").attr(\"x1\",O).attr(\"y1\",function(b,c){return n(a(b))}).attr(\"x2\",P).attr(\"y2\",function(b,c){return n(a(b))})}),[s,t].forEach(function(a){var b=a===s?\"low\":\"high\";M.selectAll(\".nv-boxplot-\"+b).on(\"mouseover\",function(b,c,d){d3.select(this).classed(\"hover\",!0),B.elementMouseover({series:{key:a(b),color:u(b)||z(b,d)},e:d3.event})}).on(\"mouseout\",function(b,c,d){d3.select(this).classed(\"hover\",!1),B.elementMouseout({series:{key:a(b),color:u(b)||z(b,d)},e:d3.event})}).on(\"mousemove\",function(a,b){B.elementMousemove({e:d3.event})})}),M.append(\"rect\").attr(\"class\",\"nv-boxplot-box\").on(\"mouseover\",function(a,b){d3.select(this).classed(\"hover\",!0),B.elementMouseover({key:o(a),value:o(a),series:[{key:\"Q3\",value:r(a),color:u(a)||z(a,b)},{key:\"Q2\",value:q(a),color:u(a)||z(a,b)},{key:\"Q1\",value:p(a),color:u(a)||z(a,b)}],data:a,index:b,e:d3.event})}).on(\"mouseout\",function(a,b){d3.select(this).classed(\"hover\",!1),B.elementMouseout({key:o(a),value:o(a),series:[{key:\"Q3\",value:r(a),color:u(a)||z(a,b)},{key:\"Q2\",value:q(a),color:u(a)||z(a,b)},{key:\"Q1\",value:p(a),color:u(a)||z(a,b)}],data:a,index:b,e:d3.event})}).on(\"mousemove\",function(a,b){B.elementMousemove({e:d3.event})}),L.select(\"rect.nv-boxplot-box\").watchTransition(E,\"nv-boxplot: boxes\").attr(\"y\",function(a,b){return n(r(a))}).attr(\"width\",N).attr(\"x\",O).attr(\"height\",function(a,b){return Math.abs(n(r(a))-n(p(a)))||1}).style(\"fill\",function(a,b){return u(a)||z(a,b)}).style(\"stroke\",function(a,b){return u(a)||z(a,b)}),M.append(\"line\").attr(\"class\",\"nv-boxplot-median\"),L.select(\"line.nv-boxplot-median\").watchTransition(E,\"nv-boxplot: boxplots line\").attr(\"x1\",O).attr(\"y1\",function(a,b){return n(q(a))}).attr(\"x2\",P).attr(\"y2\",function(a,b){return n(q(a))});var Q=L.selectAll(\".nv-boxplot-outlier\").data(function(a){return v(a)||[]});Q.enter().append(\"circle\").style(\"fill\",function(a,b,c){return y(a,b,c)||z(a,c)}).style(\"stroke\",function(a,b,c){return y(a,b,c)||z(a,c)}).style(\"z-index\",9e3).on(\"mouseover\",function(a,b,c){d3.select(this).classed(\"hover\",!0),B.elementMouseover({series:{key:x(a,b,c),color:y(a,b,c)||z(a,c)},e:d3.event})}).on(\"mouseout\",function(a,b,c){d3.select(this).classed(\"hover\",!1),B.elementMouseout({series:{key:x(a,b,c),color:y(a,b,c)||z(a,c)},e:d3.event})}).on(\"mousemove\",function(a,b){B.elementMousemove({e:d3.event})}),Q.attr(\"class\",\"nv-boxplot-outlier\"),Q.watchTransition(E,\"nv-boxplot: nv-boxplot-outlier\").attr(\"cx\",.45*m.rangeBand()).attr(\"cy\",function(a,b,c){return n(w(a,b,c))}).attr(\"r\",\"3\"),Q.exit().remove(),g=m.copy(),h=n.copy()}),E.renderEnd(\"nv-boxplot immediate\"),b}var c,d,e,f,g,h,i={top:0,right:0,bottom:0,left:0},j=960,k=500,l=Math.floor(1e4*Math.random()),m=d3.scale.ordinal(),n=d3.scale.linear(),o=function(a){return a.label},p=function(a){return a.values.Q1},q=function(a){return a.values.Q2},r=function(a){return a.values.Q3},s=function(a){return a.values.whisker_low},t=function(a){return a.values.whisker_high},u=function(a){return a.color},v=function(a){return a.values.outliers},w=function(a,b,c){return a},x=function(a,b,c){return a},y=function(a,b,c){return void 0},z=a.utils.defaultColor(),A=null,B=d3.dispatch(\"elementMouseover\",\"elementMouseout\",\"elementMousemove\",\"renderEnd\"),C=250,D=null,E=a.utils.renderWatch(B,C);return b.dispatch=B,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return j},set:function(a){j=a}},height:{get:function(){return k},set:function(a){k=a}},maxBoxWidth:{get:function(){return D},set:function(a){D=a}},x:{get:function(){return o},set:function(a){o=a}},q1:{get:function(){return p},set:function(a){p=a}},q2:{get:function(){return q},set:function(a){q=a}},q3:{get:function(){return r},set:function(a){r=a}},wl:{get:function(){return s},set:function(a){s=a}},wh:{get:function(){return t},set:function(a){t=a}},itemColor:{get:function(){return u},set:function(a){u=a}},outliers:{get:function(){return v},set:function(a){v=a;}},outlierValue:{get:function(){return w},set:function(a){w=a}},outlierLabel:{get:function(){return x},set:function(a){x=a}},outlierColor:{get:function(){return y},set:function(a){y=a}},xScale:{get:function(){return m},set:function(a){m=a}},yScale:{get:function(){return n},set:function(a){n=a}},xDomain:{get:function(){return c},set:function(a){c=a}},yDomain:{get:function(){return e},set:function(a){e=a}},xRange:{get:function(){return d},set:function(a){d=a}},yRange:{get:function(){return f},set:function(a){f=a}},id:{get:function(){return l},set:function(a){l=a}},y:{get:function(){return console.warn(\"BoxPlot 'y' chart option is deprecated. Please use model overrides instead.\"),{}},set:function(a){console.warn(\"BoxPlot 'y' chart option is deprecated. Please use model overrides instead.\")}},margin:{get:function(){return i},set:function(a){i.top=void 0!==a.top?a.top:i.top,i.right=void 0!==a.right?a.right:i.right,i.bottom=void 0!==a.bottom?a.bottom:i.bottom,i.left=void 0!==a.left?a.left:i.left}},color:{get:function(){return z},set:function(b){z=a.utils.getColor(b)}},duration:{get:function(){return C},set:function(a){C=a,E.reset(C)}}}),a.utils.initOptions(b),b},a.models.boxPlotChart=function(){\"use strict\";function b(k){return t.reset(),t.models(e),l&&t.models(f),m&&t.models(g),k.each(function(k){var p=d3.select(this);a.utils.initSVG(p);var t=(i||parseInt(p.style(\"width\"))||960)-h.left-h.right,u=(j||parseInt(p.style(\"height\"))||400)-h.top-h.bottom;if(b.update=function(){r.beforeUpdate(),p.transition().duration(s).call(b)},b.container=this,!k||!k.length){var v=p.selectAll(\".nv-noData\").data([q]);return v.enter().append(\"text\").attr(\"class\",\"nvd3 nv-noData\").attr(\"dy\",\"-.7em\").style(\"text-anchor\",\"middle\"),v.attr(\"x\",h.left+t/2).attr(\"y\",h.top+u/2).text(function(a){return a}),b}p.selectAll(\".nv-noData\").remove(),c=e.xScale(),d=e.yScale().clamp(!0);var w=p.selectAll(\"g.nv-wrap.nv-boxPlotWithAxes\").data([k]),x=w.enter().append(\"g\").attr(\"class\",\"nvd3 nv-wrap nv-boxPlotWithAxes\").append(\"g\"),y=x.append(\"defs\"),z=w.select(\"g\");x.append(\"g\").attr(\"class\",\"nv-x nv-axis\"),x.append(\"g\").attr(\"class\",\"nv-y nv-axis\").append(\"g\").attr(\"class\",\"nv-zeroLine\").append(\"line\"),x.append(\"g\").attr(\"class\",\"nv-barsWrap\"),z.attr(\"transform\",\"translate(\"+h.left+\",\"+h.top+\")\"),n&&z.select(\".nv-y.nv-axis\").attr(\"transform\",\"translate(\"+t+\",0)\"),e.width(t).height(u);var A=z.select(\".nv-barsWrap\").datum(k.filter(function(a){return!a.disabled}));if(A.transition().call(e),y.append(\"clipPath\").attr(\"id\",\"nv-x-label-clip-\"+e.id()).append(\"rect\"),z.select(\"#nv-x-label-clip-\"+e.id()+\" rect\").attr(\"width\",c.rangeBand()*(o?2:1)).attr(\"height\",16).attr(\"x\",-c.rangeBand()/(o?1:2)),l){f.scale(c).ticks(a.utils.calcTicksX(t/100,k)).tickSize(-u,0),z.select(\".nv-x.nv-axis\").attr(\"transform\",\"translate(0,\"+d.range()[0]+\")\"),z.select(\".nv-x.nv-axis\").call(f);var B=z.select(\".nv-x.nv-axis\").selectAll(\"g\");o&&B.selectAll(\"text\").attr(\"transform\",function(a,b,c){return\"translate(0,\"+(c%2===0?\"5\":\"17\")+\")\"})}m&&(g.scale(d).ticks(Math.floor(u/36)).tickSize(-t,0),z.select(\".nv-y.nv-axis\").call(g)),z.select(\".nv-zeroLine line\").attr(\"x1\",0).attr(\"x2\",t).attr(\"y1\",d(0)).attr(\"y2\",d(0))}),t.renderEnd(\"nv-boxplot chart immediate\"),b}var c,d,e=a.models.boxPlot(),f=a.models.axis(),g=a.models.axis(),h={top:15,right:10,bottom:50,left:60},i=null,j=null,k=a.utils.getColor(),l=!0,m=!0,n=!1,o=!1,p=a.models.tooltip(),q=\"No Data Available.\",r=d3.dispatch(\"beforeUpdate\",\"renderEnd\"),s=250;f.orient(\"bottom\").showMaxMin(!1).tickFormat(function(a){return a}),g.orient(n?\"right\":\"left\").tickFormat(d3.format(\",.1f\")),p.duration(0);var t=a.utils.renderWatch(r,s);return e.dispatch.on(\"elementMouseover.tooltip\",function(a){p.data(a).hidden(!1)}),e.dispatch.on(\"elementMouseout.tooltip\",function(a){p.data(a).hidden(!0)}),e.dispatch.on(\"elementMousemove.tooltip\",function(a){p()}),b.dispatch=r,b.boxplot=e,b.xAxis=f,b.yAxis=g,b.tooltip=p,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return i},set:function(a){i=a}},height:{get:function(){return j},set:function(a){j=a}},staggerLabels:{get:function(){return o},set:function(a){o=a}},showXAxis:{get:function(){return l},set:function(a){l=a}},showYAxis:{get:function(){return m},set:function(a){m=a}},tooltipContent:{get:function(){return p},set:function(a){p=a}},noData:{get:function(){return q},set:function(a){q=a}},margin:{get:function(){return h},set:function(a){h.top=void 0!==a.top?a.top:h.top,h.right=void 0!==a.right?a.right:h.right,h.bottom=void 0!==a.bottom?a.bottom:h.bottom,h.left=void 0!==a.left?a.left:h.left}},duration:{get:function(){return s},set:function(a){s=a,t.reset(s),e.duration(s),f.duration(s),g.duration(s)}},color:{get:function(){return k},set:function(b){k=a.utils.getColor(b),e.color(k)}},rightAlignYAxis:{get:function(){return n},set:function(a){n=a,g.orient(a?\"right\":\"left\")}}}),a.utils.inheritOptions(b,e),a.utils.initOptions(b),b},a.models.bullet=function(){\"use strict\";function b(a,b){var c=a.slice();a.sort(function(a,d){var e=c.indexOf(a),f=c.indexOf(d);return d3.descending(b[e],b[f])})}function c(e){return e.each(function(c,e){var s=p-d.left-d.right,x=q-d.top-d.bottom;r=d3.select(this),a.utils.initSVG(r);var y=g.call(this,c,e).slice(),z=h.call(this,c,e).slice(),A=i.call(this,c,e).slice().sort(d3.descending),B=j.call(this,c,e).slice(),C=k.call(this,c,e).slice(),D=l.call(this,c,e).slice(),E=m.call(this,c,e).slice(),F=n.call(this,c,e).slice();b(C,y),b(D,z),b(E,A),b(F,B),y.sort(d3.descending),z.sort(d3.descending),B.sort(d3.descending);var G=d3.scale.linear().domain(d3.extent(d3.merge([o,y]))).range(f?[s,0]:[0,s]);this.__chart__||d3.scale.linear().domain([0,1/0]).range(G.range());this.__chart__=G;for(var H=(d3.min(y),d3.max(y),y[1],r.selectAll(\"g.nv-wrap.nv-bullet\").data([c])),I=H.enter().append(\"g\").attr(\"class\",\"nvd3 nv-wrap nv-bullet\"),J=I.append(\"g\"),K=H.select(\"g\"),e=0,L=y.length;L>e;e++){var M=\"nv-range nv-range\"+e;2>=e&&(M=M+\" nv-range\"+w[e]),J.append(\"rect\").attr(\"class\",M)}J.append(\"rect\").attr(\"class\",\"nv-measure\"),H.attr(\"transform\",\"translate(\"+d.left+\",\"+d.top+\")\");for(var N=function(a){return Math.abs(G(a)-G(0))},O=function(a){return G(0>a?a:0)},e=0,L=y.length;L>e;e++){var P=y[e];K.select(\"rect.nv-range\"+e).attr(\"height\",x).attr(\"width\",N(P)).attr(\"x\",O(P)).datum(P)}K.select(\"rect.nv-measure\").style(\"fill\",t).attr(\"height\",x/3).attr(\"y\",x/3).attr(\"width\",0>B?G(0)-G(B[0]):G(B[0])-G(0)).attr(\"x\",O(B)).on(\"mouseover\",function(){u.elementMouseover({value:B[0],label:F[0]||\"Current\",color:d3.select(this).style(\"fill\")})}).on(\"mousemove\",function(){u.elementMousemove({value:B[0],label:F[0]||\"Current\",color:d3.select(this).style(\"fill\")})}).on(\"mouseout\",function(){u.elementMouseout({value:B[0],label:F[0]||\"Current\",color:d3.select(this).style(\"fill\")})});var Q=x/6,R=z.map(function(a,b){return{value:a,label:D[b]}});J.selectAll(\"path.nv-markerTriangle\").data(R).enter().append(\"path\").attr(\"class\",\"nv-markerTriangle\").attr(\"d\",\"M0,\"+Q+\"L\"+Q+\",\"+-Q+\" \"+-Q+\",\"+-Q+\"Z\").on(\"mouseover\",function(a){u.elementMouseover({value:a.value,label:a.label||\"Previous\",color:d3.select(this).style(\"fill\"),pos:[G(a.value),x/2]})}).on(\"mousemove\",function(a){u.elementMousemove({value:a.value,label:a.label||\"Previous\",color:d3.select(this).style(\"fill\")})}).on(\"mouseout\",function(a,b){u.elementMouseout({value:a.value,label:a.label||\"Previous\",color:d3.select(this).style(\"fill\")})}),K.selectAll(\"path.nv-markerTriangle\").data(R).attr(\"transform\",function(a){return\"translate(\"+G(a.value)+\",\"+x/2+\")\"});var S=A.map(function(a,b){return{value:a,label:E[b]}});J.selectAll(\"path.nv-markerLine\").data(S).enter().append(\"line\").attr(\"cursor\",\"\").attr(\"class\",\"nv-markerLine\").attr(\"x1\",function(a){return G(a.value)}).attr(\"y1\",\"2\").attr(\"x2\",function(a){return G(a.value)}).attr(\"y2\",x-2).on(\"mouseover\",function(a){u.elementMouseover({value:a.value,label:a.label||\"Previous\",color:d3.select(this).style(\"fill\"),pos:[G(a.value),x/2]})}).on(\"mousemove\",function(a){u.elementMousemove({value:a.value,label:a.label||\"Previous\",color:d3.select(this).style(\"fill\")})}).on(\"mouseout\",function(a,b){u.elementMouseout({value:a.value,label:a.label||\"Previous\",color:d3.select(this).style(\"fill\")})}),K.selectAll(\"path.nv-markerLines\").data(S).attr(\"transform\",function(a){return\"translate(\"+G(a.value)+\",\"+x/2+\")\"}),H.selectAll(\".nv-range\").on(\"mouseover\",function(a,b){var c=C[b]||v[b];u.elementMouseover({value:a,label:c,color:d3.select(this).style(\"fill\")})}).on(\"mousemove\",function(){u.elementMousemove({value:B[0],label:F[0]||\"Previous\",color:d3.select(this).style(\"fill\")})}).on(\"mouseout\",function(a,b){var c=C[b]||v[b];u.elementMouseout({value:a,label:c,color:d3.select(this).style(\"fill\")})})}),c}var d={top:0,right:0,bottom:0,left:0},e=\"left\",f=!1,g=function(a){return a.ranges},h=function(a){return a.markers?a.markers:[]},i=function(a){return a.markerLines?a.markerLines:[0]},j=function(a){return a.measures},k=function(a){return a.rangeLabels?a.rangeLabels:[]},l=function(a){return a.markerLabels?a.markerLabels:[]},m=function(a){return a.markerLineLabels?a.markerLineLabels:[]},n=function(a){return a.measureLabels?a.measureLabels:[]},o=[0],p=380,q=30,r=null,s=null,t=a.utils.getColor([\"#1f77b4\"]),u=d3.dispatch(\"elementMouseover\",\"elementMouseout\",\"elementMousemove\"),v=[\"Maximum\",\"Mean\",\"Minimum\"],w=[\"Max\",\"Avg\",\"Min\"];return c.dispatch=u,c.options=a.utils.optionsFunc.bind(c),c._options=Object.create({},{ranges:{get:function(){return g},set:function(a){g=a}},markers:{get:function(){return h},set:function(a){h=a}},measures:{get:function(){return j},set:function(a){j=a}},forceX:{get:function(){return o},set:function(a){o=a}},width:{get:function(){return p},set:function(a){p=a}},height:{get:function(){return q},set:function(a){q=a}},tickFormat:{get:function(){return s},set:function(a){s=a}},margin:{get:function(){return d},set:function(a){d.top=void 0!==a.top?a.top:d.top,d.right=void 0!==a.right?a.right:d.right,d.bottom=void 0!==a.bottom?a.bottom:d.bottom,d.left=void 0!==a.left?a.left:d.left}},orient:{get:function(){return e},set:function(a){e=a,f=\"right\"==e||\"bottom\"==e}},color:{get:function(){return t},set:function(b){t=a.utils.getColor(b)}}}),a.utils.initOptions(c),c},a.models.bulletChart=function(){\"use strict\";function b(d){return d.each(function(e,o){var p=d3.select(this);a.utils.initSVG(p);var q=a.utils.availableWidth(k,p,g),r=l-g.top-g.bottom;if(b.update=function(){b(d)},b.container=this,!e||!h.call(this,e,o))return a.utils.noData(b,p),b;p.selectAll(\".nv-noData\").remove();var s=h.call(this,e,o).slice().sort(d3.descending),t=i.call(this,e,o).slice().sort(d3.descending),u=j.call(this,e,o).slice().sort(d3.descending),v=p.selectAll(\"g.nv-wrap.nv-bulletChart\").data([e]),w=v.enter().append(\"g\").attr(\"class\",\"nvd3 nv-wrap nv-bulletChart\"),x=w.append(\"g\"),y=v.select(\"g\");x.append(\"g\").attr(\"class\",\"nv-bulletWrap\"),x.append(\"g\").attr(\"class\",\"nv-titles\"),v.attr(\"transform\",\"translate(\"+g.left+\",\"+g.top+\")\");var z=d3.scale.linear().domain([0,Math.max(s[0],t[0]||0,u[0])]).range(f?[q,0]:[0,q]),A=this.__chart__||d3.scale.linear().domain([0,1/0]).range(z.range());this.__chart__=z;var B=x.select(\".nv-titles\").append(\"g\").attr(\"text-anchor\",\"end\").attr(\"transform\",\"translate(-6,\"+(l-g.top-g.bottom)/2+\")\");B.append(\"text\").attr(\"class\",\"nv-title\").text(function(a){return a.title}),B.append(\"text\").attr(\"class\",\"nv-subtitle\").attr(\"dy\",\"1em\").text(function(a){return a.subtitle}),c.width(q).height(r);var C=y.select(\".nv-bulletWrap\");d3.transition(C).call(c);var D=m||z.tickFormat(q/100),E=y.selectAll(\"g.nv-tick\").data(z.ticks(n?n:q/50),function(a){return this.textContent||D(a)}),F=E.enter().append(\"g\").attr(\"class\",\"nv-tick\").attr(\"transform\",function(a){return\"translate(\"+A(a)+\",0)\"}).style(\"opacity\",1e-6);F.append(\"line\").attr(\"y1\",r).attr(\"y2\",7*r/6),F.append(\"text\").attr(\"text-anchor\",\"middle\").attr(\"dy\",\"1em\").attr(\"y\",7*r/6).text(D);var G=d3.transition(E).attr(\"transform\",function(a){return\"translate(\"+z(a)+\",0)\"}).style(\"opacity\",1);G.select(\"line\").attr(\"y1\",r).attr(\"y2\",7*r/6),G.select(\"text\").attr(\"y\",7*r/6),d3.transition(E.exit()).attr(\"transform\",function(a){return\"translate(\"+z(a)+\",0)\"}).style(\"opacity\",1e-6).remove()}),d3.timer.flush(),b}var c=a.models.bullet(),d=a.models.tooltip(),e=\"left\",f=!1,g={top:5,right:40,bottom:20,left:120},h=function(a){return a.ranges},i=function(a){return a.markers?a.markers:[]},j=function(a){return a.measures},k=null,l=55,m=null,n=null,o=null,p=d3.dispatch();return d.duration(0).headerEnabled(!1),c.dispatch.on(\"elementMouseover.tooltip\",function(a){a.series={key:a.label,value:a.value,color:a.color},d.data(a).hidden(!1)}),c.dispatch.on(\"elementMouseout.tooltip\",function(a){d.hidden(!0)}),c.dispatch.on(\"elementMousemove.tooltip\",function(a){d()}),b.bullet=c,b.dispatch=p,b.tooltip=d,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{ranges:{get:function(){return h},set:function(a){h=a}},markers:{get:function(){return i},set:function(a){i=a}},measures:{get:function(){return j},set:function(a){j=a}},width:{get:function(){return k},set:function(a){k=a}},height:{get:function(){return l},set:function(a){l=a}},tickFormat:{get:function(){return m},set:function(a){m=a}},ticks:{get:function(){return n},set:function(a){n=a}},noData:{get:function(){return o},set:function(a){o=a}},margin:{get:function(){return g},set:function(a){g.top=void 0!==a.top?a.top:g.top,g.right=void 0!==a.right?a.right:g.right,g.bottom=void 0!==a.bottom?a.bottom:g.bottom,g.left=void 0!==a.left?a.left:g.left}},orient:{get:function(){return e},set:function(a){e=a,f=\"right\"==e||\"bottom\"==e}}}),a.utils.inheritOptions(b,c),a.utils.initOptions(b),b},a.models.candlestickBar=function(){\"use strict\";function b(x){return x.each(function(b){c=d3.select(this);var x=a.utils.availableWidth(i,c,h),y=a.utils.availableHeight(j,c,h);a.utils.initSVG(c);var A=x/b[0].values.length*.45;l.domain(d||d3.extent(b[0].values.map(n).concat(t))),v?l.range(f||[.5*x/b[0].values.length,x*(b[0].values.length-.5)/b[0].values.length]):l.range(f||[5+A/2,x-A/2-5]),m.domain(e||[d3.min(b[0].values.map(s).concat(u)),d3.max(b[0].values.map(r).concat(u))]).range(g||[y,0]),l.domain()[0]===l.domain()[1]&&(l.domain()[0]?l.domain([l.domain()[0]-.01*l.domain()[0],l.domain()[1]+.01*l.domain()[1]]):l.domain([-1,1])),m.domain()[0]===m.domain()[1]&&(m.domain()[0]?m.domain([m.domain()[0]+.01*m.domain()[0],m.domain()[1]-.01*m.domain()[1]]):m.domain([-1,1]));var B=d3.select(this).selectAll(\"g.nv-wrap.nv-candlestickBar\").data([b[0].values]),C=B.enter().append(\"g\").attr(\"class\",\"nvd3 nv-wrap nv-candlestickBar\"),D=C.append(\"defs\"),E=C.append(\"g\"),F=B.select(\"g\");E.append(\"g\").attr(\"class\",\"nv-ticks\"),B.attr(\"transform\",\"translate(\"+h.left+\",\"+h.top+\")\"),c.on(\"click\",function(a,b){z.chartClick({data:a,index:b,pos:d3.event,id:k})}),D.append(\"clipPath\").attr(\"id\",\"nv-chart-clip-path-\"+k).append(\"rect\"),B.select(\"#nv-chart-clip-path-\"+k+\" rect\").attr(\"width\",x).attr(\"height\",y),F.attr(\"clip-path\",w?\"url(#nv-chart-clip-path-\"+k+\")\":\"\");var G=B.select(\".nv-ticks\").selectAll(\".nv-tick\").data(function(a){return a});G.exit().remove();var H=G.enter().append(\"g\");G.attr(\"class\",function(a,b,c){return(p(a,b)>q(a,b)?\"nv-tick negative\":\"nv-tick positive\")+\" nv-tick-\"+c+\"-\"+b});H.append(\"line\").attr(\"class\",\"nv-candlestick-lines\").attr(\"transform\",function(a,b){return\"translate(\"+l(n(a,b))+\",0)\"}).attr(\"x1\",0).attr(\"y1\",function(a,b){return m(r(a,b))}).attr(\"x2\",0).attr(\"y2\",function(a,b){return m(s(a,b))}),H.append(\"rect\").attr(\"class\",\"nv-candlestick-rects nv-bars\").attr(\"transform\",function(a,b){return\"translate(\"+(l(n(a,b))-A/2)+\",\"+(m(o(a,b))-(p(a,b)>q(a,b)?m(q(a,b))-m(p(a,b)):0))+\")\"}).attr(\"x\",0).attr(\"y\",0).attr(\"width\",A).attr(\"height\",function(a,b){var c=p(a,b),d=q(a,b);return c>d?m(d)-m(c):m(c)-m(d)});G.select(\".nv-candlestick-lines\").transition().attr(\"transform\",function(a,b){return\"translate(\"+l(n(a,b))+\",0)\"}).attr(\"x1\",0).attr(\"y1\",function(a,b){return m(r(a,b))}).attr(\"x2\",0).attr(\"y2\",function(a,b){return m(s(a,b))}),G.select(\".nv-candlestick-rects\").transition().attr(\"transform\",function(a,b){return\"translate(\"+(l(n(a,b))-A/2)+\",\"+(m(o(a,b))-(p(a,b)>q(a,b)?m(q(a,b))-m(p(a,b)):0))+\")\"}).attr(\"x\",0).attr(\"y\",0).attr(\"width\",A).attr(\"height\",function(a,b){var c=p(a,b),d=q(a,b);return c>d?m(d)-m(c):m(c)-m(d)})}),b}var c,d,e,f,g,h={top:0,right:0,bottom:0,left:0},i=null,j=null,k=Math.floor(1e4*Math.random()),l=d3.scale.linear(),m=d3.scale.linear(),n=function(a){return a.x},o=function(a){return a.y},p=function(a){return a.open},q=function(a){return a.close},r=function(a){return a.high},s=function(a){return a.low},t=[],u=[],v=!1,w=!0,x=a.utils.defaultColor(),y=!1,z=d3.dispatch(\"stateChange\",\"changeState\",\"renderEnd\",\"chartClick\",\"elementClick\",\"elementDblClick\",\"elementMouseover\",\"elementMouseout\",\"elementMousemove\");return b.highlightPoint=function(a,d){b.clearHighlights(),c.select(\".nv-candlestickBar .nv-tick-0-\"+a).classed(\"hover\",d)},b.clearHighlights=function(){c.select(\".nv-candlestickBar .nv-tick.hover\").classed(\"hover\",!1)},b.dispatch=z,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return i},set:function(a){i=a}},height:{get:function(){return j},set:function(a){j=a}},xScale:{get:function(){return l},set:function(a){l=a}},yScale:{get:function(){return m},set:function(a){m=a}},xDomain:{get:function(){return d},set:function(a){d=a}},yDomain:{get:function(){return e},set:function(a){e=a}},xRange:{get:function(){return f},set:function(a){f=a}},yRange:{get:function(){return g},set:function(a){g=a}},forceX:{get:function(){return t},set:function(a){t=a}},forceY:{get:function(){return u},set:function(a){u=a}},padData:{get:function(){return v},set:function(a){v=a}},clipEdge:{get:function(){return w},set:function(a){w=a}},id:{get:function(){return k},set:function(a){k=a}},interactive:{get:function(){return y},set:function(a){y=a}},x:{get:function(){return n},set:function(a){n=a}},y:{get:function(){return o},set:function(a){o=a}},open:{get:function(){return p()},set:function(a){p=a}},close:{get:function(){return q()},set:function(a){q=a}},high:{get:function(){return r},set:function(a){r=a}},low:{get:function(){return s},set:function(a){s=a}},margin:{get:function(){return h},set:function(a){h.top=void 0!=a.top?a.top:h.top,h.right=void 0!=a.right?a.right:h.right,h.bottom=void 0!=a.bottom?a.bottom:h.bottom,h.left=void 0!=a.left?a.left:h.left}},color:{get:function(){return x},set:function(b){x=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.cumulativeLineChart=function(){\"use strict\";function b(l){return H.reset(),H.models(f),r&&H.models(g),s&&H.models(h),l.each(function(l){function A(a,c){d3.select(b.container).style(\"cursor\",\"ew-resize\")}function E(a,b){G.x=d3.event.x,G.i=Math.round(F.invert(G.x)),K()}function H(a,c){d3.select(b.container).style(\"cursor\",\"auto\"),y.index=G.i,C.stateChange(y)}function K(){aa.data([G]);var a=b.duration();b.duration(0),b.update(),b.duration(a)}var L=d3.select(this);a.utils.initSVG(L),L.classed(\"nv-chart-\"+x,!0);var M=a.utils.availableWidth(o,L,m),N=a.utils.availableHeight(p,L,m);if(b.update=function(){0===D?L.call(b):L.transition().duration(D).call(b)},b.container=this,y.setter(J(l),b.update).getter(I(l)).update(),y.disabled=l.map(function(a){return!!a.disabled}),!z){var O;z={};for(O in y)y[O]instanceof Array?z[O]=y[O].slice(0):z[O]=y[O]}var P=d3.behavior.drag().on(\"dragstart\",A).on(\"drag\",E).on(\"dragend\",H);if(!(l&&l.length&&l.filter(function(a){return a.values.length}).length))return a.utils.noData(b,L),b;if(L.selectAll(\".nv-noData\").remove(),d=f.xScale(),e=f.yScale(),w)f.yDomain(null);else{var Q=l.filter(function(a){return!a.disabled}).map(function(a,b){var c=d3.extent(a.values,f.y());return c[0]<-.95&&(c[0]=-.95),[(c[0]-c[1])/(1+c[1]),(c[1]-c[0])/(1+c[0])]}),R=[d3.min(Q,function(a){return a[0]}),d3.max(Q,function(a){return a[1]})];f.yDomain(R)}F.domain([0,l[0].values.length-1]).range([0,M]).clamp(!0);var l=c(G.i,l),S=v?\"none\":\"all\",T=L.selectAll(\"g.nv-wrap.nv-cumulativeLine\").data([l]),U=T.enter().append(\"g\").attr(\"class\",\"nvd3 nv-wrap nv-cumulativeLine\").append(\"g\"),V=T.select(\"g\");if(U.append(\"g\").attr(\"class\",\"nv-interactive\"),U.append(\"g\").attr(\"class\",\"nv-x nv-axis\").style(\"pointer-events\",\"none\"),U.append(\"g\").attr(\"class\",\"nv-y nv-axis\"),U.append(\"g\").attr(\"class\",\"nv-background\"),U.append(\"g\").attr(\"class\",\"nv-linesWrap\").style(\"pointer-events\",S),U.append(\"g\").attr(\"class\",\"nv-avgLinesWrap\").style(\"pointer-events\",\"none\"),U.append(\"g\").attr(\"class\",\"nv-legendWrap\"),U.append(\"g\").attr(\"class\",\"nv-controlsWrap\"),q?(i.width(M),V.select(\".nv-legendWrap\").datum(l).call(i),i.height()>m.top&&(m.top=i.height(),N=a.utils.availableHeight(p,L,m)),V.select(\".nv-legendWrap\").attr(\"transform\",\"translate(0,\"+-m.top+\")\")):V.select(\".nv-legendWrap\").selectAll(\"*\").remove(),u){var W=[{key:\"Re-scale y-axis\",disabled:!w}];j.width(140).color([\"#444\",\"#444\",\"#444\"]).rightAlign(!1).margin({top:5,right:0,bottom:5,left:20}),V.select(\".nv-controlsWrap\").datum(W).attr(\"transform\",\"translate(0,\"+-m.top+\")\").call(j)}else V.select(\".nv-controlsWrap\").selectAll(\"*\").remove();T.attr(\"transform\",\"translate(\"+m.left+\",\"+m.top+\")\"),t&&V.select(\".nv-y.nv-axis\").attr(\"transform\",\"translate(\"+M+\",0)\");var X=l.filter(function(a){return a.tempDisabled});T.select(\".tempDisabled\").remove(),X.length&&T.append(\"text\").attr(\"class\",\"tempDisabled\").attr(\"x\",M/2).attr(\"y\",\"-.71em\").style(\"text-anchor\",\"end\").text(X.map(function(a){return a.key}).join(\", \")+\" values cannot be calculated for this time period.\"),v&&(k.width(M).height(N).margin({left:m.left,top:m.top}).svgContainer(L).xScale(d),T.select(\".nv-interactive\").call(k)),U.select(\".nv-background\").append(\"rect\"),V.select(\".nv-background rect\").attr(\"width\",M).attr(\"height\",N),f.y(function(a){return a.display.y}).width(M).height(N).color(l.map(function(a,b){return a.color||n(a,b)}).filter(function(a,b){return!l[b].disabled&&!l[b].tempDisabled}));var Y=V.select(\".nv-linesWrap\").datum(l.filter(function(a){return!a.disabled&&!a.tempDisabled}));Y.call(f),l.forEach(function(a,b){a.seriesIndex=b});var Z=l.filter(function(a){return!a.disabled&&!!B(a)}),$=V.select(\".nv-avgLinesWrap\").selectAll(\"line\").data(Z,function(a){return a.key}),_=function(a){var b=e(B(a));return 0>b?0:b>N?N:b};$.enter().append(\"line\").style(\"stroke-width\",2).style(\"stroke-dasharray\",\"10,10\").style(\"stroke\",function(a,b){return f.color()(a,a.seriesIndex)}).attr(\"x1\",0).attr(\"x2\",M).attr(\"y1\",_).attr(\"y2\",_),$.style(\"stroke-opacity\",function(a){var b=e(B(a));return 0>b||b>N?0:1}).attr(\"x1\",0).attr(\"x2\",M).attr(\"y1\",_).attr(\"y2\",_),$.exit().remove();var aa=Y.selectAll(\".nv-indexLine\").data([G]);aa.enter().append(\"rect\").attr(\"class\",\"nv-indexLine\").attr(\"width\",3).attr(\"x\",-2).attr(\"fill\",\"red\").attr(\"fill-opacity\",.5).style(\"pointer-events\",\"all\").call(P),aa.attr(\"transform\",function(a){return\"translate(\"+F(a.i)+\",0)\"}).attr(\"height\",N),r&&(g.scale(d)._ticks(a.utils.calcTicksX(M/70,l)).tickSize(-N,0),V.select(\".nv-x.nv-axis\").attr(\"transform\",\"translate(0,\"+e.range()[0]+\")\"),V.select(\".nv-x.nv-axis\").call(g)),s&&(h.scale(e)._ticks(a.utils.calcTicksY(N/36,l)).tickSize(-M,0),V.select(\".nv-y.nv-axis\").call(h)),V.select(\".nv-background rect\").on(\"click\",function(){G.x=d3.mouse(this)[0],G.i=Math.round(F.invert(G.x)),y.index=G.i,C.stateChange(y),K()}),f.dispatch.on(\"elementClick\",function(a){G.i=a.pointIndex,G.x=F(G.i),y.index=G.i,C.stateChange(y),K()}),j.dispatch.on(\"legendClick\",function(a,c){a.disabled=!a.disabled,w=!a.disabled,y.rescaleY=w,C.stateChange(y),b.update()}),i.dispatch.on(\"stateChange\",function(a){for(var c in a)y[c]=a[c];C.stateChange(y),b.update()}),k.dispatch.on(\"elementMousemove\",function(c){f.clearHighlights();var d,e,i,j=[];if(l.filter(function(a,b){return a.seriesIndex=b,!a.disabled}).forEach(function(g,h){e=a.interactiveBisect(g.values,c.pointXValue,b.x()),f.highlightPoint(h,e,!0);var k=g.values[e];\"undefined\"!=typeof k&&(\"undefined\"==typeof d&&(d=k),\"undefined\"==typeof i&&(i=b.xScale()(b.x()(k,e))),j.push({key:g.key,value:b.y()(k,e),color:n(g,g.seriesIndex)}))}),j.length>2){var m=b.yScale().invert(c.mouseY),o=Math.abs(b.yScale().domain()[0]-b.yScale().domain()[1]),p=.03*o,q=a.nearestValueIndex(j.map(function(a){return a.value}),m,p);null!==q&&(j[q].highlight=!0)}var r=g.tickFormat()(b.x()(d,e),e);k.tooltip.valueFormatter(function(a,b){return h.tickFormat()(a)}).data({value:r,series:j})(),k.renderGuideLine(i)}),k.dispatch.on(\"elementMouseout\",function(a){f.clearHighlights()}),C.on(\"changeState\",function(a){\"undefined\"!=typeof a.disabled&&(l.forEach(function(b,c){b.disabled=a.disabled[c]}),y.disabled=a.disabled),\"undefined\"!=typeof a.index&&(G.i=a.index,G.x=F(G.i),y.index=a.index,aa.data([G])),\"undefined\"!=typeof a.rescaleY&&(w=a.rescaleY),b.update()})}),H.renderEnd(\"cumulativeLineChart immediate\"),b}function c(a,b){return K||(K=f.y()),b.map(function(b,c){if(!b.values)return b;var d=b.values[a];if(null==d)return b;var e=K(d,a);return-.95>e&&!E?(b.tempDisabled=!0,b):(b.tempDisabled=!1,b.values=b.values.map(function(a,b){return a.display={y:(K(a,b)-e)/(1+e)},a}),b)})}var d,e,f=a.models.line(),g=a.models.axis(),h=a.models.axis(),i=a.models.legend(),j=a.models.legend(),k=a.interactiveGuideline(),l=a.models.tooltip(),m={top:30,right:30,bottom:50,left:60},n=a.utils.defaultColor(),o=null,p=null,q=!0,r=!0,s=!0,t=!1,u=!0,v=!1,w=!0,x=f.id(),y=a.utils.state(),z=null,A=null,B=function(a){return a.average},C=d3.dispatch(\"stateChange\",\"changeState\",\"renderEnd\"),D=250,E=!1;y.index=0,y.rescaleY=w,g.orient(\"bottom\").tickPadding(7),h.orient(t?\"right\":\"left\"),l.valueFormatter(function(a,b){return h.tickFormat()(a,b)}).headerFormatter(function(a,b){return g.tickFormat()(a,b)}),j.updateState(!1);var F=d3.scale.linear(),G={i:0,x:0},H=a.utils.renderWatch(C,D),I=function(a){return function(){return{active:a.map(function(a){return!a.disabled}),index:G.i,rescaleY:w}}},J=function(a){return function(b){void 0!==b.index&&(G.i=b.index),void 0!==b.rescaleY&&(w=b.rescaleY),void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}};f.dispatch.on(\"elementMouseover.tooltip\",function(a){var c={x:b.x()(a.point),y:b.y()(a.point),color:a.point.color};a.point=c,l.data(a).hidden(!1)}),f.dispatch.on(\"elementMouseout.tooltip\",function(a){l.hidden(!0)});var K=null;return b.dispatch=C,b.lines=f,b.legend=i,b.controls=j,b.xAxis=g,b.yAxis=h,b.interactiveLayer=k,b.state=y,b.tooltip=l,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return o},set:function(a){o=a}},height:{get:function(){return p},set:function(a){p=a}},rescaleY:{get:function(){return w},set:function(a){w=a}},showControls:{get:function(){return u},set:function(a){u=a}},showLegend:{get:function(){return q},set:function(a){q=a}},average:{get:function(){return B},set:function(a){B=a}},defaultState:{get:function(){return z},set:function(a){z=a}},noData:{get:function(){return A},set:function(a){A=a}},showXAxis:{get:function(){return r},set:function(a){r=a}},showYAxis:{get:function(){return s},set:function(a){s=a}},noErrorCheck:{get:function(){return E},set:function(a){E=a}},margin:{get:function(){return m},set:function(a){m.top=void 0!==a.top?a.top:m.top,m.right=void 0!==a.right?a.right:m.right,m.bottom=void 0!==a.bottom?a.bottom:m.bottom,m.left=void 0!==a.left?a.left:m.left}},color:{get:function(){return n},set:function(b){n=a.utils.getColor(b),i.color(n)}},useInteractiveGuideline:{get:function(){return v},set:function(a){v=a,a===!0&&(b.interactive(!1),b.useVoronoi(!1))}},rightAlignYAxis:{get:function(){return t},set:function(a){t=a,h.orient(a?\"right\":\"left\")}},duration:{get:function(){return D},set:function(a){D=a,f.duration(D),g.duration(D),h.duration(D),H.reset(D)}}}),a.utils.inheritOptions(b,f),a.utils.initOptions(b),b},a.models.discreteBar=function(){\"use strict\";function b(m){return y.reset(),m.each(function(b){var m=k-j.left-j.right,x=l-j.top-j.bottom;c=d3.select(this),a.utils.initSVG(c),b.forEach(function(a,b){a.values.forEach(function(a){a.series=b})});var z=d&&e?[]:b.map(function(a){return a.values.map(function(a,b){return{x:p(a,b),y:q(a,b),y0:a.y0}})});n.domain(d||d3.merge(z).map(function(a){return a.x})).rangeBands(f||[0,m],.1),o.domain(e||d3.extent(d3.merge(z).map(function(a){return a.y}).concat(r))),t?o.range(g||[x-(o.domain()[0]<0?12:0),o.domain()[1]>0?12:0]):o.range(g||[x,0]),h=h||n,i=i||o.copy().range([o(0),o(0)]);var A=c.selectAll(\"g.nv-wrap.nv-discretebar\").data([b]),B=A.enter().append(\"g\").attr(\"class\",\"nvd3 nv-wrap nv-discretebar\"),C=B.append(\"g\");A.select(\"g\");C.append(\"g\").attr(\"class\",\"nv-groups\"),A.attr(\"transform\",\"translate(\"+j.left+\",\"+j.top+\")\");var D=A.select(\".nv-groups\").selectAll(\".nv-group\").data(function(a){return a},function(a){return a.key});D.enter().append(\"g\").style(\"stroke-opacity\",1e-6).style(\"fill-opacity\",1e-6),D.exit().watchTransition(y,\"discreteBar: exit groups\").style(\"stroke-opacity\",1e-6).style(\"fill-opacity\",1e-6).remove(),D.attr(\"class\",function(a,b){return\"nv-group nv-series-\"+b}).classed(\"hover\",function(a){return a.hover}),D.watchTransition(y,\"discreteBar: groups\").style(\"stroke-opacity\",1).style(\"fill-opacity\",.75);var E=D.selectAll(\"g.nv-bar\").data(function(a){return a.values});E.exit().remove();var F=E.enter().append(\"g\").attr(\"transform\",function(a,b,c){return\"translate(\"+(n(p(a,b))+.05*n.rangeBand())+\", \"+o(0)+\")\"}).on(\"mouseover\",function(a,b){d3.select(this).classed(\"hover\",!0),v.elementMouseover({data:a,index:b,color:d3.select(this).style(\"fill\")})}).on(\"mouseout\",function(a,b){d3.select(this).classed(\"hover\",!1),v.elementMouseout({data:a,index:b,color:d3.select(this).style(\"fill\")})}).on(\"mousemove\",function(a,b){v.elementMousemove({data:a,index:b,color:d3.select(this).style(\"fill\")})}).on(\"click\",function(a,b){var c=this;v.elementClick({data:a,index:b,color:d3.select(this).style(\"fill\"),event:d3.event,element:c}),d3.event.stopPropagation()}).on(\"dblclick\",function(a,b){v.elementDblClick({data:a,index:b,color:d3.select(this).style(\"fill\")}),d3.event.stopPropagation()});F.append(\"rect\").attr(\"height\",0).attr(\"width\",.9*n.rangeBand()/b.length),t?(F.append(\"text\").attr(\"text-anchor\",\"middle\"),E.select(\"text\").text(function(a,b){return u(q(a,b))}).watchTransition(y,\"discreteBar: bars text\").attr(\"x\",.9*n.rangeBand()/2).attr(\"y\",function(a,b){return q(a,b)<0?o(q(a,b))-o(0)+12:-4})):E.selectAll(\"text\").remove(),E.attr(\"class\",function(a,b){return q(a,b)<0?\"nv-bar negative\":\"nv-bar positive\"}).style(\"fill\",function(a,b){return a.color||s(a,b)}).style(\"stroke\",function(a,b){return a.color||s(a,b)}).select(\"rect\").attr(\"class\",w).watchTransition(y,\"discreteBar: bars rect\").attr(\"width\",.9*n.rangeBand()/b.length),E.watchTransition(y,\"discreteBar: bars\").attr(\"transform\",function(a,b){var c=n(p(a,b))+.05*n.rangeBand(),d=q(a,b)<0?o(0):o(0)-o(q(a,b))<1?o(0)-1:o(q(a,b));return\"translate(\"+c+\", \"+d+\")\"}).select(\"rect\").attr(\"height\",function(a,b){return Math.max(Math.abs(o(q(a,b))-o(0)),1)}),h=n.copy(),i=o.copy()}),y.renderEnd(\"discreteBar immediate\"),b}var c,d,e,f,g,h,i,j={top:0,right:0,bottom:0,left:0},k=960,l=500,m=Math.floor(1e4*Math.random()),n=d3.scale.ordinal(),o=d3.scale.linear(),p=function(a){return a.x},q=function(a){return a.y},r=[0],s=a.utils.defaultColor(),t=!1,u=d3.format(\",.2f\"),v=d3.dispatch(\"chartClick\",\"elementClick\",\"elementDblClick\",\"elementMouseover\",\"elementMouseout\",\"elementMousemove\",\"renderEnd\"),w=\"discreteBar\",x=250,y=a.utils.renderWatch(v,x);return b.dispatch=v,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return k},set:function(a){k=a}},height:{get:function(){return l},set:function(a){l=a}},forceY:{get:function(){return r},set:function(a){r=a}},showValues:{get:function(){return t},set:function(a){t=a}},x:{get:function(){return p},set:function(a){p=a}},y:{get:function(){return q},set:function(a){q=a}},xScale:{get:function(){return n},set:function(a){n=a}},yScale:{get:function(){return o},set:function(a){o=a}},xDomain:{get:function(){return d},set:function(a){d=a}},yDomain:{get:function(){return e},set:function(a){e=a}},xRange:{get:function(){return f},set:function(a){f=a}},yRange:{get:function(){return g},set:function(a){g=a}},valueFormat:{get:function(){return u},set:function(a){u=a}},id:{get:function(){return m},set:function(a){m=a}},rectClass:{get:function(){return w},set:function(a){w=a}},margin:{get:function(){return j},set:function(a){j.top=void 0!==a.top?a.top:j.top,j.right=void 0!==a.right?a.right:j.right,j.bottom=void 0!==a.bottom?a.bottom:j.bottom,j.left=void 0!==a.left?a.left:j.left}},color:{get:function(){return s},set:function(b){s=a.utils.getColor(b)}},duration:{get:function(){return x},set:function(a){x=a,y.reset(x)}}}),a.utils.initOptions(b),b},a.models.discreteBarChart=function(){\"use strict\";function b(i){return x.reset(),x.models(e),o&&x.models(f),p&&x.models(g),i.each(function(i){var m=d3.select(this);a.utils.initSVG(m);var u=a.utils.availableWidth(k,m,j),x=a.utils.availableHeight(l,m,j);if(b.update=function(){v.beforeUpdate(),m.transition().duration(w).call(b)},b.container=this,!(i&&i.length&&i.filter(function(a){return a.values.length}).length))return a.utils.noData(b,m),b;m.selectAll(\".nv-noData\").remove(),c=e.xScale(),d=e.yScale().clamp(!0);var y=m.selectAll(\"g.nv-wrap.nv-discreteBarWithAxes\").data([i]),z=y.enter().append(\"g\").attr(\"class\",\"nvd3 nv-wrap nv-discreteBarWithAxes\").append(\"g\"),A=z.append(\"defs\"),B=y.select(\"g\");z.append(\"g\").attr(\"class\",\"nv-x nv-axis\"),z.append(\"g\").attr(\"class\",\"nv-y nv-axis\").append(\"g\").attr(\"class\",\"nv-zeroLine\").append(\"line\"),z.append(\"g\").attr(\"class\",\"nv-barsWrap\"),z.append(\"g\").attr(\"class\",\"nv-legendWrap\"),B.attr(\"transform\",\"translate(\"+j.left+\",\"+j.top+\")\"),n?(h.width(u),B.select(\".nv-legendWrap\").datum(i).call(h),h.height()>j.top&&(j.top=h.height(),x=a.utils.availableHeight(l,m,j)),y.select(\".nv-legendWrap\").attr(\"transform\",\"translate(0,\"+-j.top+\")\")):B.select(\".nv-legendWrap\").selectAll(\"*\").remove(),q&&B.select(\".nv-y.nv-axis\").attr(\"transform\",\"translate(\"+u+\",0)\"),e.width(u).height(x);var C=B.select(\".nv-barsWrap\").datum(i.filter(function(a){return!a.disabled}));if(C.transition().call(e),A.append(\"clipPath\").attr(\"id\",\"nv-x-label-clip-\"+e.id()).append(\"rect\"),B.select(\"#nv-x-label-clip-\"+e.id()+\" rect\").attr(\"width\",c.rangeBand()*(r?2:1)).attr(\"height\",16).attr(\"x\",-c.rangeBand()/(r?1:2)),o){f.scale(c)._ticks(a.utils.calcTicksX(u/100,i)).tickSize(-x,0),B.select(\".nv-x.nv-axis\").attr(\"transform\",\"translate(0,\"+(d.range()[0]+(e.showValues()&&d.domain()[0]<0?16:0))+\")\"),B.select(\".nv-x.nv-axis\").call(f);var D=B.select(\".nv-x.nv-axis\").selectAll(\"g\");r&&D.selectAll(\"text\").attr(\"transform\",function(a,b,c){return\"translate(0,\"+(c%2==0?\"5\":\"17\")+\")\"}),t&&D.selectAll(\".tick text\").attr(\"transform\",\"rotate(\"+t+\" 0,0)\").style(\"text-anchor\",t>0?\"start\":\"end\"),s&&B.selectAll(\".tick text\").call(a.utils.wrapTicks,b.xAxis.rangeBand())}p&&(g.scale(d)._ticks(a.utils.calcTicksY(x/36,i)).tickSize(-u,0),B.select(\".nv-y.nv-axis\").call(g)),B.select(\".nv-zeroLine line\").attr(\"x1\",0).attr(\"x2\",q?-u:u).attr(\"y1\",d(0)).attr(\"y2\",d(0))}),x.renderEnd(\"discreteBar chart immediate\"),b}var c,d,e=a.models.discreteBar(),f=a.models.axis(),g=a.models.axis(),h=a.models.legend(),i=a.models.tooltip(),j={top:15,right:10,bottom:50,left:60},k=null,l=null,m=a.utils.getColor(),n=!1,o=!0,p=!0,q=!1,r=!1,s=!1,t=0,u=null,v=d3.dispatch(\"beforeUpdate\",\"renderEnd\"),w=250;f.orient(\"bottom\").showMaxMin(!1).tickFormat(function(a){return a}),g.orient(q?\"right\":\"left\").tickFormat(d3.format(\",.1f\")),i.duration(0).headerEnabled(!1).valueFormatter(function(a,b){return g.tickFormat()(a,b)}).keyFormatter(function(a,b){return f.tickFormat()(a,b)});var x=a.utils.renderWatch(v,w);return e.dispatch.on(\"elementMouseover.tooltip\",function(a){a.series={key:b.x()(a.data),value:b.y()(a.data),color:a.color},i.data(a).hidden(!1)}),e.dispatch.on(\"elementMouseout.tooltip\",function(a){i.hidden(!0)}),e.dispatch.on(\"elementMousemove.tooltip\",function(a){i()}),b.dispatch=v,b.discretebar=e,b.legend=h,b.xAxis=f,b.yAxis=g,b.tooltip=i,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return k},set:function(a){k=a}},height:{get:function(){return l},set:function(a){l=a}},showLegend:{get:function(){return n},set:function(a){n=a}},staggerLabels:{get:function(){return r},set:function(a){r=a}},rotateLabels:{get:function(){return t},set:function(a){t=a}},wrapLabels:{get:function(){return s},set:function(a){s=!!a}},showXAxis:{get:function(){return o},set:function(a){o=a}},showYAxis:{get:function(){return p},set:function(a){p=a}},noData:{get:function(){return u},set:function(a){u=a}},margin:{get:function(){return j},set:function(a){j.top=void 0!==a.top?a.top:j.top,j.right=void 0!==a.right?a.right:j.right,j.bottom=void 0!==a.bottom?a.bottom:j.bottom,j.left=void 0!==a.left?a.left:j.left}},duration:{get:function(){return w},set:function(a){w=a,x.reset(w),e.duration(w),f.duration(w),g.duration(w)}},color:{get:function(){return m},set:function(b){m=a.utils.getColor(b),e.color(m),h.color(m)}},rightAlignYAxis:{get:function(){return q},set:function(a){q=a,g.orient(a?\"right\":\"left\")}}}),a.utils.inheritOptions(b,e),a.utils.initOptions(b),b},a.models.distribution=function(){\"use strict\";function b(k){return m.reset(),k.each(function(b){var k=(e-(\"x\"===g?d.left+d.right:d.top+d.bottom),\"x\"==g?\"y\":\"x\"),l=d3.select(this);a.utils.initSVG(l),c=c||j;var n=l.selectAll(\"g.nv-distribution\").data([b]),o=n.enter().append(\"g\").attr(\"class\",\"nvd3 nv-distribution\"),p=(o.append(\"g\"),n.select(\"g\"));n.attr(\"transform\",\"translate(\"+d.left+\",\"+d.top+\")\");var q=p.selectAll(\"g.nv-dist\").data(function(a){return a},function(a){return a.key});q.enter().append(\"g\"),q.attr(\"class\",function(a,b){return\"nv-dist nv-series-\"+b}).style(\"stroke\",function(a,b){return i(a,b)});var r=q.selectAll(\"line.nv-dist\"+g).data(function(a){return a.values});r.enter().append(\"line\").attr(g+\"1\",function(a,b){return c(h(a,b))}).attr(g+\"2\",function(a,b){return c(h(a,b))}),m.transition(q.exit().selectAll(\"line.nv-dist\"+g),\"dist exit\").attr(g+\"1\",function(a,b){return j(h(a,b))}).attr(g+\"2\",function(a,b){return j(h(a,b))}).style(\"stroke-opacity\",0).remove(),r.attr(\"class\",function(a,b){return\"nv-dist\"+g+\" nv-dist\"+g+\"-\"+b}).attr(k+\"1\",0).attr(k+\"2\",f),m.transition(r,\"dist\").attr(g+\"1\",function(a,b){return j(h(a,b))}).attr(g+\"2\",function(a,b){return j(h(a,b))}),c=j.copy()}),m.renderEnd(\"distribution immediate\"),b}var c,d={top:0,right:0,bottom:0,left:0},e=400,f=8,g=\"x\",h=function(a){return a[g]},i=a.utils.defaultColor(),j=d3.scale.linear(),k=250,l=d3.dispatch(\"renderEnd\"),m=a.utils.renderWatch(l,k);return b.options=a.utils.optionsFunc.bind(b),b.dispatch=l,b.margin=function(a){return arguments.length?(d.top=\"undefined\"!=typeof a.top?a.top:d.top,d.right=\"undefined\"!=typeof a.right?a.right:d.right,d.bottom=\"undefined\"!=typeof a.bottom?a.bottom:d.bottom,d.left=\"undefined\"!=typeof a.left?a.left:d.left,b):d},b.width=function(a){return arguments.length?(e=a,b):e},b.axis=function(a){return arguments.length?(g=a,b):g},b.size=function(a){return arguments.length?(f=a,b):f},b.getData=function(a){return arguments.length?(h=d3.functor(a),b):h},b.scale=function(a){return arguments.length?(j=a,b):j},b.color=function(c){return arguments.length?(i=a.utils.getColor(c),b):i},b.duration=function(a){return arguments.length?(k=a,m.reset(k),b):k},b},a.models.focus=function(b){\"use strict\";function c(t){return s.reset(),s.models(b),m&&s.models(f),n&&s.models(g),t.each(function(s){function t(a){var b=+(\"e\"==a),c=b?1:-1,d=y/3;return\"M\"+.5*c+\",\"+d+\"A6,6 0 0 \"+b+\" \"+6.5*c+\",\"+(d+6)+\"V\"+(2*d-6)+\"A6,6 0 0 \"+b+\" \"+.5*c+\",\"+2*d+\"ZM\"+2.5*c+\",\"+(d+8)+\"V\"+(2*d-8)+\"M\"+4.5*c+\",\"+(d+8)+\"V\"+(2*d-8)}function u(){h.empty()||h.extent(p),D.data([h.empty()?d.domain():p]).each(function(a,b){var c=d(a[0])-d.range()[0],e=x-d(a[1]);d3.select(this).select(\".left\").attr(\"width\",0>c?0:c),d3.select(this).select(\".right\").attr(\"x\",d(a[1])).attr(\"width\",0>e?0:e)})}function v(){p=h.empty()?null:h.extent();var a=h.empty()?d.domain():h.extent();Math.abs(a[0]-a[1])<=1||(r.brush({extent:a,brush:h}),u(),r.onBrush(a))}var w=d3.select(this);a.utils.initSVG(w);var x=a.utils.availableWidth(k,w,i),y=l-i.top-i.bottom;c.update=function(){0===q?w.call(c):w.transition().duration(q).call(c)},c.container=this,d=b.xScale(),e=b.yScale();var z=w.selectAll(\"g.nv-focus\").data([s]),A=z.enter().append(\"g\").attr(\"class\",\"nvd3 nv-focus\").append(\"g\"),B=z.select(\"g\");z.attr(\"transform\",\"translate(\"+i.left+\",\"+i.top+\")\"),A.append(\"g\").attr(\"class\",\"nv-background\").append(\"rect\"),A.append(\"g\").attr(\"class\",\"nv-x nv-axis\"),A.append(\"g\").attr(\"class\",\"nv-y nv-axis\"),A.append(\"g\").attr(\"class\",\"nv-contentWrap\"),A.append(\"g\").attr(\"class\",\"nv-brushBackground\"),A.append(\"g\").attr(\"class\",\"nv-x nv-brush\"),o&&B.select(\".nv-y.nv-axis\").attr(\"transform\",\"translate(\"+x+\",0)\"),B.select(\".nv-background rect\").attr(\"width\",x).attr(\"height\",y),b.width(x).height(y).color(s.map(function(a,b){return a.color||j(a,b)}).filter(function(a,b){return!s[b].disabled}));var C=B.select(\".nv-contentWrap\").datum(s.filter(function(a){return!a.disabled}));d3.transition(C).call(b),h.x(d).on(\"brush\",function(){v()}),p&&h.extent(p);var D=B.select(\".nv-brushBackground\").selectAll(\"g\").data([p||h.extent()]),E=D.enter().append(\"g\");E.append(\"rect\").attr(\"class\",\"left\").attr(\"x\",0).attr(\"y\",0).attr(\"height\",y),E.append(\"rect\").attr(\"class\",\"right\").attr(\"x\",0).attr(\"y\",0).attr(\"height\",y);var F=B.select(\".nv-x.nv-brush\").call(h);F.selectAll(\"rect\").attr(\"height\",y),F.selectAll(\".resize\").append(\"path\").attr(\"d\",t),v(),B.select(\".nv-background rect\").attr(\"width\",x).attr(\"height\",y),m&&(f.scale(d)._ticks(a.utils.calcTicksX(x/100,s)).tickSize(-y,0),B.select(\".nv-x.nv-axis\").attr(\"transform\",\"translate(0,\"+e.range()[0]+\")\"),d3.transition(B.select(\".nv-x.nv-axis\")).call(f)),n&&(g.scale(e)._ticks(a.utils.calcTicksY(y/36,s)).tickSize(-x,0),d3.transition(B.select(\".nv-y.nv-axis\")).call(g)),B.select(\".nv-x.nv-axis\").attr(\"transform\",\"translate(0,\"+e.range()[0]+\")\")}),s.renderEnd(\"focus immediate\"),c}var d,e,b=b||a.models.line(),f=a.models.axis(),g=a.models.axis(),h=d3.svg.brush(),i={top:10,right:0,bottom:30,left:0},j=a.utils.defaultColor(),k=null,l=70,m=!0,n=!1,o=!1,p=null,q=250,r=d3.dispatch(\"brush\",\"onBrush\",\"renderEnd\");b.interactive(!1),b.pointActive(function(a){return!1});var s=a.utils.renderWatch(r,q);return c.dispatch=r,c.content=b,c.brush=h,c.xAxis=f,c.yAxis=g,c.options=a.utils.optionsFunc.bind(c),c._options=Object.create({},{width:{get:function(){return k},set:function(a){k=a}},height:{get:function(){return l},set:function(a){l=a}},showXAxis:{get:function(){return m},set:function(a){m=a}},showYAxis:{get:function(){return n},set:function(a){n=a}},brushExtent:{get:function(){return p},set:function(a){p=a}},margin:{get:function(){return i},set:function(a){i.top=void 0!==a.top?a.top:i.top,i.right=void 0!==a.right?a.right:i.right,i.bottom=void 0!==a.bottom?a.bottom:i.bottom,i.left=void 0!==a.left?a.left:i.left}},duration:{get:function(){return q},set:function(a){q=a,s.reset(q),b.duration(q),f.duration(q),g.duration(q)}},color:{get:function(){return j},set:function(c){j=a.utils.getColor(c),b.color(j)}},interpolate:{get:function(){return b.interpolate()},set:function(a){b.interpolate(a)}},xTickFormat:{get:function(){return f.tickFormat()},set:function(a){f.tickFormat(a)}},yTickFormat:{get:function(){return g.tickFormat()},set:function(a){g.tickFormat(a)}},x:{get:function(){return b.x()},set:function(a){b.x(a)}},y:{get:function(){return b.y()},set:function(a){b.y(a)}},rightAlignYAxis:{get:function(){return o},set:function(a){o=a,g.orient(o?\"right\":\"left\")}}}),a.utils.inheritOptions(c,b),a.utils.initOptions(c),c},a.models.forceDirectedGraph=function(){\"use strict\";function b(g){return u.reset(),g.each(function(g){f=d3.select(this),a.utils.initSVG(f);var j=a.utils.availableWidth(d,f,c),u=a.utils.availableHeight(e,f,c);if(f.attr(\"width\",j).attr(\"height\",u),!(g&&g.links&&g.nodes))return a.utils.noData(b,f),b;f.selectAll(\".nv-noData\").remove(),f.selectAll(\"*\").remove();var v=new Set;g.nodes.forEach(function(a){var b=Object.keys(a);b.forEach(function(a){v.add(a)})});var w=d3.layout.force().nodes(g.nodes).links(g.links).size([j,u]).linkStrength(k).friction(l).linkDistance(m).charge(n).gravity(o).theta(p).alpha(q).start(),x=f.selectAll(\".link\").data(g.links).enter().append(\"line\").attr(\"class\",\"nv-force-link\").style(\"stroke-width\",function(a){return Math.sqrt(a.value)}),y=f.selectAll(\".node\").data(g.nodes).enter().append(\"g\").attr(\"class\",\"nv-force-node\").call(w.drag);y.append(\"circle\").attr(\"r\",r).style(\"fill\",function(a){return h(a)}).on(\"mouseover\",function(a){f.select(\".nv-series-\"+a.seriesIndex+\" .nv-distx-\"+a.pointIndex).attr(\"y1\",a.py),f.select(\".nv-series-\"+a.seriesIndex+\" .nv-disty-\"+a.pointIndex).attr(\"x2\",a.px);var b=h(a);a.series=[],v.forEach(function(c){a.series.push({color:b,key:c,value:a[c]})}),i.data(a).hidden(!1)}).on(\"mouseout\",function(a){i.hidden(!0)}),i.headerFormatter(function(a){return\"Node\"}),t(x),s(y),w.on(\"tick\",function(){x.attr(\"x1\",function(a){return a.source.x}).attr(\"y1\",function(a){return a.source.y}).attr(\"x2\",function(a){return a.target.x}).attr(\"y2\",function(a){return a.target.y}),y.attr(\"transform\",function(a){return\"translate(\"+a.x+\", \"+a.y+\")\"})})}),b}var c={top:2,right:0,bottom:2,left:0},d=400,e=32,f=null,g=d3.dispatch(\"renderEnd\"),h=a.utils.getColor([\"#000\"]),i=a.models.tooltip(),j=null,k=.1,l=.9,m=30,n=-120,o=.1,p=.8,q=.1,r=5,s=function(a){},t=function(a){},u=a.utils.renderWatch(g);return b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return d},set:function(a){d=a}},height:{get:function(){return e},set:function(a){e=a}},linkStrength:{get:function(){return k},set:function(a){k=a}},friction:{get:function(){return l},set:function(a){l=a}},linkDist:{get:function(){return m},set:function(a){m=a}},charge:{get:function(){return n},set:function(a){n=a}},gravity:{get:function(){return o},set:function(a){o=a}},theta:{get:function(){return p},set:function(a){p=a}},alpha:{get:function(){return q},set:function(a){q=a}},radius:{get:function(){return r},set:function(a){r=a}},x:{get:function(){return getX},set:function(a){getX=d3.functor(a)}},y:{get:function(){return getY},set:function(a){getY=d3.functor(a)}},margin:{get:function(){return c},set:function(a){c.top=void 0!==a.top?a.top:c.top,c.right=void 0!==a.right?a.right:c.right,c.bottom=void 0!==a.bottom?a.bottom:c.bottom,c.left=void 0!==a.left?a.left:c.left}},color:{get:function(){return h},set:function(b){h=a.utils.getColor(b)}},noData:{get:function(){return j},set:function(a){j=a}},nodeExtras:{get:function(){return s},set:function(a){s=a}},linkExtras:{get:function(){return t},set:function(a){t=a}}}),b.dispatch=g,b.tooltip=i,a.utils.initOptions(b),b},a.models.furiousLegend=function(){\"use strict\";function b(r){function s(a,b){return\"furious\"!=q?\"#000\":o?a.disengaged?h(a,b):\"#fff\":o?void 0:a.disabled?h(a,b):\"#fff\"}function t(a,b){return o&&\"furious\"==q?a.disengaged?\"#fff\":h(a,b):a.disabled?\"#fff\":h(a,b)}return r.each(function(b){var r=d-c.left-c.right,u=d3.select(this);a.utils.initSVG(u);var v=u.selectAll(\"g.nv-legend\").data([b]),w=(v.enter().append(\"g\").attr(\"class\",\"nvd3 nv-legend\").append(\"g\"),v.select(\"g\"));v.attr(\"transform\",\"translate(\"+c.left+\",\"+c.top+\")\");var x,y=w.selectAll(\".nv-series\").data(function(a){return\"furious\"!=q?a:a.filter(function(a){return o?!0:!a.disengaged})}),z=y.enter().append(\"g\").attr(\"class\",\"nv-series\");if(\"classic\"==q)z.append(\"circle\").style(\"stroke-width\",2).attr(\"class\",\"nv-legend-symbol\").attr(\"r\",5),x=y.select(\"circle\");else if(\"furious\"==q){z.append(\"rect\").style(\"stroke-width\",2).attr(\"class\",\"nv-legend-symbol\").attr(\"rx\",3).attr(\"ry\",3),x=y.select(\"rect\"),z.append(\"g\").attr(\"class\",\"nv-check-box\").property(\"innerHTML\",'<path d=\"M0.5,5 L22.5,5 L22.5,26.5 L0.5,26.5 L0.5,5 Z\" class=\"nv-box\"></path><path d=\"M5.5,12.8618467 L11.9185089,19.2803556 L31,0.198864511\" class=\"nv-check\"></path>').attr(\"transform\",\"translate(-10,-8)scale(0.5)\");var A=y.select(\".nv-check-box\");A.each(function(a,b){d3.select(this).selectAll(\"path\").attr(\"stroke\",s(a,b))})}z.append(\"text\").attr(\"text-anchor\",\"start\").attr(\"class\",\"nv-legend-text\").attr(\"dy\",\".32em\").attr(\"dx\",\"8\");var B=y.select(\"text.nv-legend-text\");y.on(\"mouseover\",function(a,b){p.legendMouseover(a,b)}).on(\"mouseout\",function(a,b){p.legendMouseout(a,b)}).on(\"click\",function(a,b){p.legendClick(a,b);var c=y.data();if(m){if(\"classic\"==q)n?(c.forEach(function(a){a.disabled=!0}),a.disabled=!1):(a.disabled=!a.disabled,c.every(function(a){return a.disabled})&&c.forEach(function(a){a.disabled=!1}));else if(\"furious\"==q)if(o)a.disengaged=!a.disengaged,a.userDisabled=void 0==a.userDisabled?!!a.disabled:a.userDisabled,a.disabled=a.disengaged||a.userDisabled;else if(!o){a.disabled=!a.disabled,a.userDisabled=a.disabled;var d=c.filter(function(a){return!a.disengaged});d.every(function(a){return a.userDisabled})&&c.forEach(function(a){a.disabled=a.userDisabled=!1})}p.stateChange({disabled:c.map(function(a){return!!a.disabled}),disengaged:c.map(function(a){return!!a.disengaged})})}}).on(\"dblclick\",function(a,b){if((\"furious\"!=q||!o)&&(p.legendDblclick(a,b),m)){var c=y.data();c.forEach(function(a){a.disabled=!0,\"furious\"==q&&(a.userDisabled=a.disabled)}),a.disabled=!1,\"furious\"==q&&(a.userDisabled=a.disabled),p.stateChange({disabled:c.map(function(a){return!!a.disabled})})}}),y.classed(\"nv-disabled\",function(a){return a.userDisabled}),y.exit().remove(),B.attr(\"fill\",s).text(function(a){return g(f(a))});var C;switch(q){case\"furious\":C=23;break;case\"classic\":C=20}if(j){var D=[];y.each(function(b,c){var d;if(g(f(b))&&g(f(b)).length>i){var e=g(f(b)).substring(0,i);d=d3.select(this).select(\"text\").text(e+\"...\"),d3.select(this).append(\"svg:title\").text(g(f(b)))}else d=d3.select(this).select(\"text\");var h;try{if(h=d.node().getComputedTextLength(),0>=h)throw Error()}catch(j){h=a.utils.calcApproxTextWidth(d)}D.push(h+k)});for(var E=0,F=0,G=[];r>F&&E<D.length;)G[E]=D[E],F+=D[E++];for(0===E&&(E=1);F>r&&E>1;){G=[],E--;for(var H=0;H<D.length;H++)D[H]>(G[H%E]||0)&&(G[H%E]=D[H]);F=G.reduce(function(a,b,c,d){return a+b})}for(var I=[],J=0,K=0;E>J;J++)I[J]=K,K+=G[J];y.attr(\"transform\",function(a,b){return\"translate(\"+I[b%E]+\",\"+(5+Math.floor(b/E)*C)+\")\"}),l?w.attr(\"transform\",\"translate(\"+(d-c.right-F)+\",\"+c.top+\")\"):w.attr(\"transform\",\"translate(0,\"+c.top+\")\"),e=c.top+c.bottom+Math.ceil(D.length/E)*C}else{var L,M=5,N=5,O=0;y.attr(\"transform\",function(a,b){var e=d3.select(this).select(\"text\").node().getComputedTextLength()+k;return L=N,d<c.left+c.right+L+e&&(N=L=5,M+=C),N+=e,N>O&&(O=N),\"translate(\"+L+\",\"+M+\")\"}),w.attr(\"transform\",\"translate(\"+(d-c.right-O)+\",\"+c.top+\")\"),e=c.top+c.bottom+M+15}\"furious\"==q&&x.attr(\"width\",function(a,b){return B[0][b].getComputedTextLength()+27}).attr(\"height\",18).attr(\"y\",-9).attr(\"x\",-15),x.style(\"fill\",t).style(\"stroke\",function(a,b){return a.color||h(a,b)})}),b}var c={top:5,right:0,bottom:5,left:0},d=400,e=20,f=function(a){return a.key},g=function(a){return a},h=a.utils.getColor(),i=20,j=!0,k=28,l=!0,m=!0,n=!1,o=!1,p=d3.dispatch(\"legendClick\",\"legendDblclick\",\"legendMouseover\",\"legendMouseout\",\"stateChange\"),q=\"classic\";return b.dispatch=p,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return d},set:function(a){d=a}},height:{get:function(){return e},set:function(a){e=a}},key:{get:function(){return f},set:function(a){f=a}},keyFormatter:{get:function(){return g},set:function(a){g=a}},align:{get:function(){return j},set:function(a){j=a}},rightAlign:{get:function(){return l},set:function(a){l=a}},maxKeyLength:{get:function(){return i},set:function(a){i=a}},padding:{get:function(){return k},set:function(a){k=a}},updateState:{get:function(){return m},set:function(a){m=a}},radioButtonMode:{get:function(){return n},set:function(a){n=a}},expanded:{get:function(){return o},set:function(a){o=a}},vers:{get:function(){return q},set:function(a){q=a}},margin:{get:function(){return c},set:function(a){c.top=void 0!==a.top?a.top:c.top,c.right=void 0!==a.right?a.right:c.right,c.bottom=void 0!==a.bottom?a.bottom:c.bottom,c.left=void 0!==a.left?a.left:c.left}},color:{get:function(){return h},set:function(b){h=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.historicalBar=function(){\"use strict\";function b(x){return x.each(function(b){w.reset(),k=d3.select(this);var x=a.utils.availableWidth(h,k,g),y=a.utils.availableHeight(i,k,g);a.utils.initSVG(k),l.domain(c||d3.extent(b[0].values.map(n).concat(p))),r?l.range(e||[.5*x/b[0].values.length,x*(b[0].values.length-.5)/b[0].values.length]):l.range(e||[0,x]),m.domain(d||d3.extent(b[0].values.map(o).concat(q))).range(f||[y,0]),l.domain()[0]===l.domain()[1]&&(l.domain()[0]?l.domain([l.domain()[0]-.01*l.domain()[0],l.domain()[1]+.01*l.domain()[1]]):l.domain([-1,1])),m.domain()[0]===m.domain()[1]&&(m.domain()[0]?m.domain([m.domain()[0]+.01*m.domain()[0],m.domain()[1]-.01*m.domain()[1]]):m.domain([-1,1]));var z=k.selectAll(\"g.nv-wrap.nv-historicalBar-\"+j).data([b[0].values]),A=z.enter().append(\"g\").attr(\"class\",\"nvd3 nv-wrap nv-historicalBar-\"+j),B=A.append(\"defs\"),C=A.append(\"g\"),D=z.select(\"g\");C.append(\"g\").attr(\"class\",\"nv-bars\"),z.attr(\"transform\",\"translate(\"+g.left+\",\"+g.top+\")\"),k.on(\"click\",function(a,b){u.chartClick({data:a,index:b,pos:d3.event,id:j})}),B.append(\"clipPath\").attr(\"id\",\"nv-chart-clip-path-\"+j).append(\"rect\"),z.select(\"#nv-chart-clip-path-\"+j+\" rect\").attr(\"width\",x).attr(\"height\",y),D.attr(\"clip-path\",s?\"url(#nv-chart-clip-path-\"+j+\")\":\"\");var E=z.select(\".nv-bars\").selectAll(\".nv-bar\").data(function(a){return a},function(a,b){return n(a,b)});E.exit().remove(),E.enter().append(\"rect\").attr(\"x\",0).attr(\"y\",function(b,c){return a.utils.NaNtoZero(m(Math.max(0,o(b,c))))}).attr(\"height\",function(b,c){return a.utils.NaNtoZero(Math.abs(m(o(b,c))-m(0)))}).attr(\"transform\",function(a,c){return\"translate(\"+(l(n(a,c))-x/b[0].values.length*.45)+\",0)\"}).on(\"mouseover\",function(a,b){v&&(d3.select(this).classed(\"hover\",!0),u.elementMouseover({data:a,index:b,color:d3.select(this).style(\"fill\")}))}).on(\"mouseout\",function(a,b){v&&(d3.select(this).classed(\"hover\",!1),u.elementMouseout({data:a,index:b,color:d3.select(this).style(\"fill\")}))}).on(\"mousemove\",function(a,b){v&&u.elementMousemove({data:a,index:b,color:d3.select(this).style(\"fill\")})}).on(\"click\",function(a,b){v&&(u.elementClick({data:a,index:b,color:d3.select(this).style(\"fill\")}),d3.event.stopPropagation())}).on(\"dblclick\",function(a,b){v&&(u.elementDblClick({data:a,index:b,color:d3.select(this).style(\"fill\")}),d3.event.stopPropagation())}),E.attr(\"fill\",function(a,b){return t(a,b)}).attr(\"class\",function(a,b,c){return(o(a,b)<0?\"nv-bar negative\":\"nv-bar positive\")+\" nv-bar-\"+c+\"-\"+b}).watchTransition(w,\"bars\").attr(\"transform\",function(a,c){return\"translate(\"+(l(n(a,c))-x/b[0].values.length*.45)+\",0)\"}).attr(\"width\",x/b[0].values.length*.9),E.watchTransition(w,\"bars\").attr(\"y\",function(b,c){var d=o(b,c)<0?m(0):m(0)-m(o(b,c))<1?m(0)-1:m(o(b,c));return a.utils.NaNtoZero(d)}).attr(\"height\",function(b,c){return a.utils.NaNtoZero(Math.max(Math.abs(m(o(b,c))-m(0)),1))})}),w.renderEnd(\"historicalBar immediate\"),b}var c,d,e,f,g={top:0,right:0,bottom:0,left:0},h=null,i=null,j=Math.floor(1e4*Math.random()),k=null,l=d3.scale.linear(),m=d3.scale.linear(),n=function(a){return a.x},o=function(a){return a.y},p=[],q=[0],r=!1,s=!0,t=a.utils.defaultColor(),u=d3.dispatch(\"chartClick\",\"elementClick\",\"elementDblClick\",\"elementMouseover\",\"elementMouseout\",\"elementMousemove\",\"renderEnd\"),v=!0,w=a.utils.renderWatch(u,0);return b.highlightPoint=function(a,b){k.select(\".nv-bars .nv-bar-0-\"+a).classed(\"hover\",b)},b.clearHighlights=function(){k.select(\".nv-bars .nv-bar.hover\").classed(\"hover\",!1)},b.dispatch=u,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return h},set:function(a){h=a}},height:{get:function(){return i},set:function(a){i=a}},forceX:{get:function(){return p},set:function(a){p=a}},forceY:{get:function(){return q},set:function(a){q=a}},padData:{get:function(){return r},set:function(a){r=a}},x:{get:function(){return n},set:function(a){n=a}},y:{get:function(){return o},set:function(a){o=a}},xScale:{get:function(){return l},set:function(a){l=a}},yScale:{get:function(){return m},set:function(a){m=a}},xDomain:{get:function(){return c},set:function(a){c=a}},yDomain:{get:function(){return d},set:function(a){d=a}},xRange:{get:function(){return e},set:function(a){e=a}},yRange:{get:function(){return f},set:function(a){f=a}},clipEdge:{get:function(){return s},set:function(a){s=a}},id:{get:function(){return j},set:function(a){j=a}},interactive:{get:function(){return v},set:function(a){v=a}},margin:{get:function(){return g},set:function(a){g.top=void 0!==a.top?a.top:g.top,g.right=void 0!==a.right?a.right:g.right,g.bottom=void 0!==a.bottom?a.bottom:g.bottom,g.left=void 0!==a.left?a.left:g.left}},color:{get:function(){return t},set:function(b){t=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.historicalBarChart=function(b){\"use strict\";function c(b){return b.each(function(k){z.reset(),z.models(f),q&&z.models(g),r&&z.models(h);var w=d3.select(this);a.utils.initSVG(w);var A=a.utils.availableWidth(n,w,l),B=a.utils.availableHeight(o,w,l);if(c.update=function(){w.transition().duration(y).call(c)},c.container=this,u.disabled=k.map(function(a){return!!a.disabled}),!v){var C;v={};for(C in u)u[C]instanceof Array?v[C]=u[C].slice(0):v[C]=u[C]}if(!(k&&k.length&&k.filter(function(a){return a.values.length}).length))return a.utils.noData(c,w),c;w.selectAll(\".nv-noData\").remove(),d=f.xScale(),e=f.yScale();var D=w.selectAll(\"g.nv-wrap.nv-historicalBarChart\").data([k]),E=D.enter().append(\"g\").attr(\"class\",\"nvd3 nv-wrap nv-historicalBarChart\").append(\"g\"),F=D.select(\"g\");E.append(\"g\").attr(\"class\",\"nv-x nv-axis\"),E.append(\"g\").attr(\"class\",\"nv-y nv-axis\"),E.append(\"g\").attr(\"class\",\"nv-barsWrap\"),E.append(\"g\").attr(\"class\",\"nv-legendWrap\"),E.append(\"g\").attr(\"class\",\"nv-interactive\"),p?(i.width(A),F.select(\".nv-legendWrap\").datum(k).call(i),i.height()>l.top&&(l.top=i.height(),B=a.utils.availableHeight(o,w,l)),D.select(\".nv-legendWrap\").attr(\"transform\",\"translate(0,\"+-l.top+\")\")):F.select(\".nv-legendWrap\").selectAll(\"*\").remove(),D.attr(\"transform\",\"translate(\"+l.left+\",\"+l.top+\")\"),s&&F.select(\".nv-y.nv-axis\").attr(\"transform\",\"translate(\"+A+\",0)\"),t&&(j.width(A).height(B).margin({left:l.left,top:l.top}).svgContainer(w).xScale(d),D.select(\".nv-interactive\").call(j)),f.width(A).height(B).color(k.map(function(a,b){return a.color||m(a,b)}).filter(function(a,b){return!k[b].disabled}));var G=F.select(\".nv-barsWrap\").datum(k.filter(function(a){return!a.disabled}));G.transition().call(f),q&&(g.scale(d)._ticks(a.utils.calcTicksX(A/100,k)).tickSize(-B,0),F.select(\".nv-x.nv-axis\").attr(\"transform\",\"translate(0,\"+e.range()[0]+\")\"),F.select(\".nv-x.nv-axis\").transition().call(g)),r&&(h.scale(e)._ticks(a.utils.calcTicksY(B/36,k)).tickSize(-A,0),F.select(\".nv-y.nv-axis\").transition().call(h)),j.dispatch.on(\"elementMousemove\",function(b){f.clearHighlights();var d,e,i,l=[];k.filter(function(a,b){return a.seriesIndex=b,!a.disabled}).forEach(function(g,h){e=a.interactiveBisect(g.values,b.pointXValue,c.x()),f.highlightPoint(e,!0);var j=g.values[e];void 0!==j&&(void 0===d&&(d=j),void 0===i&&(i=c.xScale()(c.x()(j,e))),l.push({key:g.key,value:c.y()(j,e),color:m(g,g.seriesIndex),data:g.values[e]}))});var n=g.tickFormat()(c.x()(d,e));j.tooltip.valueFormatter(function(a,b){return h.tickFormat()(a)}).data({value:n,index:e,series:l})(),j.renderGuideLine(i)}),j.dispatch.on(\"elementMouseout\",function(a){x.tooltipHide(),f.clearHighlights()}),i.dispatch.on(\"legendClick\",function(a,d){a.disabled=!a.disabled,k.filter(function(a){return!a.disabled}).length||k.map(function(a){return a.disabled=!1,D.selectAll(\".nv-series\").classed(\"disabled\",!1),a}),u.disabled=k.map(function(a){return!!a.disabled}),x.stateChange(u),b.transition().call(c)}),i.dispatch.on(\"legendDblclick\",function(a){k.forEach(function(a){a.disabled=!0}),a.disabled=!1,u.disabled=k.map(function(a){return!!a.disabled}),x.stateChange(u),c.update()}),x.on(\"changeState\",function(a){\"undefined\"!=typeof a.disabled&&(k.forEach(function(b,c){b.disabled=a.disabled[c]}),u.disabled=a.disabled),c.update()})}),z.renderEnd(\"historicalBarChart immediate\"),c}var d,e,f=b||a.models.historicalBar(),g=a.models.axis(),h=a.models.axis(),i=a.models.legend(),j=a.interactiveGuideline(),k=a.models.tooltip(),l={top:30,right:90,bottom:50,left:90},m=a.utils.defaultColor(),n=null,o=null,p=!1,q=!0,r=!0,s=!1,t=!1,u={},v=null,w=null,x=d3.dispatch(\"tooltipHide\",\"stateChange\",\"changeState\",\"renderEnd\"),y=250;g.orient(\"bottom\").tickPadding(7),h.orient(s?\"right\":\"left\"),k.duration(0).headerEnabled(!1).valueFormatter(function(a,b){return h.tickFormat()(a,b)}).headerFormatter(function(a,b){return g.tickFormat()(a,b)});var z=a.utils.renderWatch(x,0);return f.dispatch.on(\"elementMouseover.tooltip\",function(a){a.series={key:c.x()(a.data),value:c.y()(a.data),color:a.color},k.data(a).hidden(!1)}),f.dispatch.on(\"elementMouseout.tooltip\",function(a){k.hidden(!0)}),f.dispatch.on(\"elementMousemove.tooltip\",function(a){k()}),c.dispatch=x,c.bars=f,c.legend=i,c.xAxis=g,c.yAxis=h,c.interactiveLayer=j,c.tooltip=k,c.options=a.utils.optionsFunc.bind(c),c._options=Object.create({},{width:{get:function(){return n},set:function(a){n=a}},height:{get:function(){return o},set:function(a){o=a}},showLegend:{get:function(){return p},set:function(a){p=a}},showXAxis:{get:function(){return q},set:function(a){q=a}},showYAxis:{get:function(){return r},set:function(a){r=a}},defaultState:{get:function(){return v},set:function(a){v=a}},noData:{get:function(){return w},set:function(a){w=a}},margin:{get:function(){return l},set:function(a){l.top=void 0!==a.top?a.top:l.top,l.right=void 0!==a.right?a.right:l.right,l.bottom=void 0!==a.bottom?a.bottom:l.bottom,l.left=void 0!==a.left?a.left:l.left}},color:{get:function(){return m},set:function(b){m=a.utils.getColor(b),i.color(m),f.color(m)}},duration:{get:function(){return y},set:function(a){y=a,z.reset(y),h.duration(y),g.duration(y)}},rightAlignYAxis:{get:function(){return s},set:function(a){s=a,h.orient(a?\"right\":\"left\")}},useInteractiveGuideline:{get:function(){return t},set:function(a){t=a,a===!0&&c.interactive(!1)}}}),a.utils.inheritOptions(c,f),a.utils.initOptions(c),c},a.models.ohlcBarChart=function(){var b=a.models.historicalBarChart(a.models.ohlcBar());return b.useInteractiveGuideline(!0),b.interactiveLayer.tooltip.contentGenerator(function(a){var c=a.series[0].data,d=c.open<c.close?\"2ca02c\":\"d62728\";return'<h3 style=\"color: #'+d+'\">'+a.value+\"</h3><table><tr><td>open:</td><td>\"+b.yAxis.tickFormat()(c.open)+\"</td></tr><tr><td>close:</td><td>\"+b.yAxis.tickFormat()(c.close)+\"</td></tr><tr><td>high</td><td>\"+b.yAxis.tickFormat()(c.high)+\"</td></tr><tr><td>low:</td><td>\"+b.yAxis.tickFormat()(c.low)+\"</td></tr></table>\"}),b},a.models.candlestickBarChart=function(){var b=a.models.historicalBarChart(a.models.candlestickBar());return b.useInteractiveGuideline(!0),b.interactiveLayer.tooltip.contentGenerator(function(a){var c=a.series[0].data,d=c.open<c.close?\"2ca02c\":\"d62728\";return'<h3 style=\"color: #'+d+'\">'+a.value+\"</h3><table><tr><td>open:</td><td>\"+b.yAxis.tickFormat()(c.open)+\"</td></tr><tr><td>close:</td><td>\"+b.yAxis.tickFormat()(c.close)+\"</td></tr><tr><td>high</td><td>\"+b.yAxis.tickFormat()(c.high)+\"</td></tr><tr><td>low:</td><td>\"+b.yAxis.tickFormat()(c.low)+\"</td></tr></table>\"}),b},a.models.legend=function(){\"use strict\";function b(r){function s(a,b){return\"furious\"!=q?\"#000\":o?a.disengaged?\"#000\":\"#fff\":o?void 0:(a.color||(a.color=h(a,b)),a.disabled?a.color:\"#fff\")}function t(a,b){return o&&\"furious\"==q&&a.disengaged?\"#eee\":a.color||h(a,b)}function u(a,b){return o&&\"furious\"==q?1:a.disabled?0:1}return r.each(function(b){var h=d-c.left-c.right,r=d3.select(this);a.utils.initSVG(r);var v=r.selectAll(\"g.nv-legend\").data([b]),w=v.enter().append(\"g\").attr(\"class\",\"nvd3 nv-legend\").append(\"g\"),x=v.select(\"g\");v.attr(\"transform\",\"translate(\"+c.left+\",\"+c.top+\")\");var y,z,A=x.selectAll(\".nv-series\").data(function(a){return\"furious\"!=q?a:a.filter(function(a){return o?!0:!a.disengaged})}),B=A.enter().append(\"g\").attr(\"class\",\"nv-series\");switch(q){case\"furious\":z=23;break;case\"classic\":z=20}if(\"classic\"==q)B.append(\"circle\").style(\"stroke-width\",2).attr(\"class\",\"nv-legend-symbol\").attr(\"r\",5),y=A.select(\".nv-legend-symbol\");else if(\"furious\"==q){B.append(\"rect\").style(\"stroke-width\",2).attr(\"class\",\"nv-legend-symbol\").attr(\"rx\",3).attr(\"ry\",3),y=A.select(\".nv-legend-symbol\"),B.append(\"g\").attr(\"class\",\"nv-check-box\").property(\"innerHTML\",'<path d=\"M0.5,5 L22.5,5 L22.5,26.5 L0.5,26.5 L0.5,5 Z\" class=\"nv-box\"></path><path d=\"M5.5,12.8618467 L11.9185089,19.2803556 L31,0.198864511\" class=\"nv-check\"></path>').attr(\"transform\",\"translate(-10,-8)scale(0.5)\");var C=A.select(\".nv-check-box\");C.each(function(a,b){d3.select(this).selectAll(\"path\").attr(\"stroke\",s(a,b))})}B.append(\"text\").attr(\"text-anchor\",\"start\").attr(\"class\",\"nv-legend-text\").attr(\"dy\",\".32em\").attr(\"dx\",\"8\");var D=A.select(\"text.nv-legend-text\");A.on(\"mouseover\",function(a,b){p.legendMouseover(a,b)}).on(\"mouseout\",function(a,b){p.legendMouseout(a,b)}).on(\"click\",function(a,b){p.legendClick(a,b);var c=A.data();if(m){if(\"classic\"==q)n?(c.forEach(function(a){a.disabled=!0}),a.disabled=!1):(a.disabled=!a.disabled,c.every(function(a){return a.disabled})&&c.forEach(function(a){a.disabled=!1}));else if(\"furious\"==q)if(o)a.disengaged=!a.disengaged,a.userDisabled=void 0==a.userDisabled?!!a.disabled:a.userDisabled,a.disabled=a.disengaged||a.userDisabled;else if(!o){a.disabled=!a.disabled,a.userDisabled=a.disabled;var d=c.filter(function(a){return!a.disengaged});d.every(function(a){return a.userDisabled})&&c.forEach(function(a){a.disabled=a.userDisabled=!1})}p.stateChange({disabled:c.map(function(a){return!!a.disabled}),disengaged:c.map(function(a){return!!a.disengaged})})}}).on(\"dblclick\",function(a,b){if((\"furious\"!=q||!o)&&(p.legendDblclick(a,b),m)){var c=A.data();c.forEach(function(a){a.disabled=!0,\"furious\"==q&&(a.userDisabled=a.disabled)}),a.disabled=!1,\"furious\"==q&&(a.userDisabled=a.disabled),p.stateChange({disabled:c.map(function(a){return!!a.disabled})})}}),A.classed(\"nv-disabled\",function(a){return a.userDisabled}),A.exit().remove(),D.attr(\"fill\",s).text(function(a){return g(f(a))});var E=0;if(j){var F=[];A.each(function(b,c){var d;if(g(f(b))&&g(f(b)).length>i){var e=g(f(b)).substring(0,i);d=d3.select(this).select(\"text\").text(e+\"...\"),d3.select(this).append(\"svg:title\").text(g(f(b)))}else d=d3.select(this).select(\"text\");var h;try{if(h=d.node().getComputedTextLength(),0>=h)throw Error()}catch(j){h=a.utils.calcApproxTextWidth(d)}F.push(h+k)});var G=0,H=[];for(E=0;h>E&&G<F.length;)H[G]=F[G],E+=F[G++];for(0===G&&(G=1);E>h&&G>1;){H=[],G--;for(var I=0;I<F.length;I++)F[I]>(H[I%G]||0)&&(H[I%G]=F[I]);E=H.reduce(function(a,b,c,d){return a+b})}for(var J=[],K=0,L=0;G>K;K++)J[K]=L,L+=H[K];A.attr(\"transform\",function(a,b){return\"translate(\"+J[b%G]+\",\"+(5+Math.floor(b/G)*z)+\")\"}),l?x.attr(\"transform\",\"translate(\"+(d-c.right-E)+\",\"+c.top+\")\"):x.attr(\"transform\",\"translate(0,\"+c.top+\")\"),e=c.top+c.bottom+Math.ceil(F.length/G)*z}else{var M,N=5,O=5,P=0;A.attr(\"transform\",function(a,b){var e=d3.select(this).select(\"text\").node().getComputedTextLength()+k;return M=O,d<c.left+c.right+M+e&&(O=M=5,N+=z),O+=e,O>P&&(P=O),M+P>E&&(E=M+P),\"translate(\"+M+\",\"+N+\")\"}),x.attr(\"transform\",\"translate(\"+(d-c.right-P)+\",\"+c.top+\")\"),e=c.top+c.bottom+N+15}if(\"furious\"==q){y.attr(\"width\",function(a,b){return D[0][b].getComputedTextLength()+27}).attr(\"height\",18).attr(\"y\",-9).attr(\"x\",-15),w.insert(\"rect\",\":first-child\").attr(\"class\",\"nv-legend-bg\").attr(\"fill\",\"#eee\").attr(\"opacity\",0);var Q=x.select(\".nv-legend-bg\");Q.transition().duration(300).attr(\"x\",-z).attr(\"width\",E+z-12).attr(\"height\",e+10).attr(\"y\",-c.top-10).attr(\"opacity\",o?1:0)}y.style(\"fill\",t).style(\"fill-opacity\",u).style(\"stroke\",t)}),b}var c={top:5,right:0,bottom:5,left:0},d=400,e=20,f=function(a){return a.key},g=function(a){return a},h=a.utils.getColor(),i=20,j=!0,k=32,l=!0,m=!0,n=!1,o=!1,p=d3.dispatch(\"legendClick\",\"legendDblclick\",\"legendMouseover\",\"legendMouseout\",\"stateChange\"),q=\"classic\";return b.dispatch=p,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return d},set:function(a){d=a}},height:{get:function(){return e},set:function(a){e=a}},key:{get:function(){return f},set:function(a){f=a}},keyFormatter:{get:function(){return g},set:function(a){g=a}},align:{get:function(){return j},set:function(a){j=a}},maxKeyLength:{get:function(){return i},set:function(a){i=a}},rightAlign:{get:function(){return l},set:function(a){l=a}},padding:{get:function(){return k},set:function(a){k=a}},updateState:{get:function(){return m},set:function(a){m=a}},radioButtonMode:{get:function(){return n},set:function(a){n=a}},expanded:{get:function(){return o},set:function(a){o=a}},vers:{get:function(){return q},set:function(a){q=a}},margin:{get:function(){return c},set:function(a){c.top=void 0!==a.top?a.top:c.top,c.right=void 0!==a.right?a.right:c.right,c.bottom=void 0!==a.bottom?a.bottom:c.bottom,c.left=void 0!==a.left?a.left:c.left}},color:{get:function(){return h},set:function(b){h=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.line=function(){\"use strict\";function b(r){return v.reset(),v.models(e),r.each(function(b){i=d3.select(this);var r=a.utils.availableWidth(g,i,f),s=a.utils.availableHeight(h,i,f);a.utils.initSVG(i),c=e.xScale(),d=e.yScale(),t=t||c,u=u||d;var w=i.selectAll(\"g.nv-wrap.nv-line\").data([b]),x=w.enter().append(\"g\").attr(\"class\",\"nvd3 nv-wrap nv-line\"),y=x.append(\"defs\"),z=x.append(\"g\"),A=w.select(\"g\");z.append(\"g\").attr(\"class\",\"nv-groups\"),z.append(\"g\").attr(\"class\",\"nv-scatterWrap\"),w.attr(\"transform\",\"translate(\"+f.left+\",\"+f.top+\")\"),e.width(r).height(s);var B=w.select(\".nv-scatterWrap\");B.call(e),y.append(\"clipPath\").attr(\"id\",\"nv-edge-clip-\"+e.id()).append(\"rect\"),w.select(\"#nv-edge-clip-\"+e.id()+\" rect\").attr(\"width\",r).attr(\"height\",s>0?s:0),A.attr(\"clip-path\",p?\"url(#nv-edge-clip-\"+e.id()+\")\":\"\"),B.attr(\"clip-path\",p?\"url(#nv-edge-clip-\"+e.id()+\")\":\"\");var C=w.select(\".nv-groups\").selectAll(\".nv-group\").data(function(a){return a},function(a){return a.key});C.enter().append(\"g\").style(\"stroke-opacity\",1e-6).style(\"stroke-width\",function(a){return a.strokeWidth||j}).style(\"fill-opacity\",1e-6),C.exit().remove(),C.attr(\"class\",function(a,b){return(a.classed||\"\")+\" nv-group nv-series-\"+b}).classed(\"hover\",function(a){return a.hover}).style(\"fill\",function(a,b){return k(a,b)}).style(\"stroke\",function(a,b){return k(a,b)}),C.watchTransition(v,\"line: groups\").style(\"stroke-opacity\",1).style(\"fill-opacity\",function(a){return a.fillOpacity||.5});var D=C.selectAll(\"path.nv-area\").data(function(a){return o(a)?[a]:[]});D.enter().append(\"path\").attr(\"class\",\"nv-area\").attr(\"d\",function(b){return d3.svg.area().interpolate(q).defined(n).x(function(b,c){return a.utils.NaNtoZero(t(l(b,c)))}).y0(function(b,c){return a.utils.NaNtoZero(u(m(b,c)))}).y1(function(a,b){return u(d.domain()[0]<=0?d.domain()[1]>=0?0:d.domain()[1]:d.domain()[0])}).apply(this,[b.values])}),C.exit().selectAll(\"path.nv-area\").remove(),D.watchTransition(v,\"line: areaPaths\").attr(\"d\",function(b){return d3.svg.area().interpolate(q).defined(n).x(function(b,d){return a.utils.NaNtoZero(c(l(b,d)))}).y0(function(b,c){return a.utils.NaNtoZero(d(m(b,c)))}).y1(function(a,b){return d(d.domain()[0]<=0?d.domain()[1]>=0?0:d.domain()[1]:d.domain()[0])}).apply(this,[b.values])});var E=C.selectAll(\"path.nv-line\").data(function(a){return[a.values]});E.enter().append(\"path\").attr(\"class\",\"nv-line\").attr(\"d\",d3.svg.line().interpolate(q).defined(n).x(function(b,c){return a.utils.NaNtoZero(t(l(b,c)))}).y(function(b,c){return a.utils.NaNtoZero(u(m(b,c)))})),E.watchTransition(v,\"line: linePaths\").attr(\"d\",d3.svg.line().interpolate(q).defined(n).x(function(b,d){return a.utils.NaNtoZero(c(l(b,d)))}).y(function(b,c){return a.utils.NaNtoZero(d(m(b,c)))})),t=c.copy(),u=d.copy()}),v.renderEnd(\"line immediate\"),b}var c,d,e=a.models.scatter(),f={top:0,right:0,bottom:0,left:0},g=960,h=500,i=null,j=1.5,k=a.utils.defaultColor(),l=function(a){return a.x},m=function(a){return a.y},n=function(a,b){return!isNaN(m(a,b))&&null!==m(a,b)},o=function(a){return a.area},p=!1,q=\"linear\",r=250,s=d3.dispatch(\"elementClick\",\"elementMouseover\",\"elementMouseout\",\"renderEnd\");e.pointSize(16).pointDomain([16,256]);var t,u,v=a.utils.renderWatch(s,r);return b.dispatch=s,b.scatter=e,e.dispatch.on(\"elementClick\",function(){s.elementClick.apply(this,arguments)}),e.dispatch.on(\"elementMouseover\",function(){s.elementMouseover.apply(this,arguments)}),e.dispatch.on(\"elementMouseout\",function(){s.elementMouseout.apply(this,arguments)}),b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return g},set:function(a){g=a}},height:{get:function(){return h},set:function(a){h=a}},defined:{get:function(){return n},set:function(a){n=a}},interpolate:{get:function(){return q},set:function(a){q=a}},clipEdge:{get:function(){return p},set:function(a){p=a}},margin:{get:function(){return f},set:function(a){f.top=void 0!==a.top?a.top:f.top,f.right=void 0!==a.right?a.right:f.right,f.bottom=void 0!==a.bottom?a.bottom:f.bottom,f.left=void 0!==a.left?a.left:f.left}},duration:{get:function(){return r},set:function(a){r=a,v.reset(r),e.duration(r)}},isArea:{get:function(){return o},set:function(a){o=d3.functor(a)}},x:{get:function(){return l},set:function(a){l=a,e.x(a)}},y:{get:function(){return m},set:function(a){m=a,e.y(a)}},color:{get:function(){return k},set:function(b){k=a.utils.getColor(b),e.color(k)}}}),a.utils.inheritOptions(b,e),a.utils.initOptions(b),b},a.models.lineChart=function(){\"use strict\";function b(j){return B.reset(),B.models(e),r&&B.models(f),s&&B.models(g),j.each(function(j){function y(){r&&L.select(\".nv-focus .nv-x.nv-axis\").transition().duration(A).call(f)}function B(){s&&L.select(\".nv-focus .nv-y.nv-axis\").transition().duration(A).call(g)}function E(a){var b=L.select(\".nv-focus .nv-linesWrap\").datum(j.filter(function(a){return!a.disabled}).map(function(b,c){return{key:b.key,area:b.area,classed:b.classed,values:b.values.filter(function(b,c){return e.x()(b,c)>=a[0]&&e.x()(b,c)<=a[1]}),disableTooltip:b.disableTooltip}}));b.transition().duration(A).call(e),y(),B()}var F=d3.select(this);a.utils.initSVG(F);var G=a.utils.availableWidth(n,F,l),H=a.utils.availableHeight(o,F,l)-(v?k.height():0);if(b.update=function(){0===A?F.call(b):F.transition().duration(A).call(b)},b.container=this,w.setter(D(j),b.update).getter(C(j)).update(),w.disabled=j.map(function(a){return!!a.disabled}),!x){var I;x={};for(I in w)w[I]instanceof Array?x[I]=w[I].slice(0):x[I]=w[I]}if(!(j&&j.length&&j.filter(function(a){return a.values.length}).length))return a.utils.noData(b,F),b;F.selectAll(\".nv-noData\").remove(),k.dispatch.on(\"onBrush\",function(a){E(a)}),c=e.xScale(),d=e.yScale();var J=F.selectAll(\"g.nv-wrap.nv-lineChart\").data([j]),K=J.enter().append(\"g\").attr(\"class\",\"nvd3 nv-wrap nv-lineChart\").append(\"g\"),L=J.select(\"g\");K.append(\"g\").attr(\"class\",\"nv-legendWrap\");var M=K.append(\"g\").attr(\"class\",\"nv-focus\");M.append(\"g\").attr(\"class\",\"nv-background\").append(\"rect\"),M.append(\"g\").attr(\"class\",\"nv-x nv-axis\"),M.append(\"g\").attr(\"class\",\"nv-y nv-axis\"),M.append(\"g\").attr(\"class\",\"nv-linesWrap\"),M.append(\"g\").attr(\"class\",\"nv-interactive\");K.append(\"g\").attr(\"class\",\"nv-focusWrap\");p?(h.width(G),L.select(\".nv-legendWrap\").datum(j).call(h),\"bottom\"===q?J.select(\".nv-legendWrap\").attr(\"transform\",\"translate(0,\"+H+\")\"):\"top\"===q&&(h.height()>l.top&&(l.top=h.height(),H=a.utils.availableHeight(o,F,l)-(v?k.height():0)),J.select(\".nv-legendWrap\").attr(\"transform\",\"translate(0,\"+-l.top+\")\"))):L.select(\".nv-legendWrap\").selectAll(\"*\").remove(),J.attr(\"transform\",\"translate(\"+l.left+\",\"+l.top+\")\"),t&&L.select(\".nv-y.nv-axis\").attr(\"transform\",\"translate(\"+G+\",0)\"),u&&(i.width(G).height(H).margin({left:l.left,top:l.top}).svgContainer(F).xScale(c),J.select(\".nv-interactive\").call(i)),L.select(\".nv-focus .nv-background rect\").attr(\"width\",G).attr(\"height\",H),e.width(G).height(H).color(j.map(function(a,b){return a.color||m(a,b)}).filter(function(a,b){return!j[b].disabled}));var N=L.select(\".nv-linesWrap\").datum(j.filter(function(a){return!a.disabled}));if(r&&f.scale(c)._ticks(a.utils.calcTicksX(G/100,j)).tickSize(-H,0),s&&g.scale(d)._ticks(a.utils.calcTicksY(H/36,j)).tickSize(-G,0),L.select(\".nv-focus .nv-x.nv-axis\").attr(\"transform\",\"translate(0,\"+H+\")\"),v){k.width(G),L.select(\".nv-focusWrap\").attr(\"transform\",\"translate(0,\"+(H+l.bottom+k.margin().top)+\")\").datum(j.filter(function(a){return!a.disabled})).call(k);var O=k.brush.empty()?k.xDomain():k.brush.extent();null!==O&&E(O)}else N.call(e),y(),B();h.dispatch.on(\"stateChange\",function(a){for(var c in a)w[c]=a[c];z.stateChange(w),b.update()}),i.dispatch.on(\"elementMousemove\",function(d){e.clearHighlights();var f,h,l,n=[];if(j.filter(function(a,b){return a.seriesIndex=b,!a.disabled&&!a.disableTooltip}).forEach(function(g,i){var j=v?k.brush.empty()?k.xScale().domain():k.brush.extent():c.domain(),o=g.values.filter(function(a,b){return e.x()(a,b)>=j[0]&&e.x()(a,b)<=j[1]});h=a.interactiveBisect(o,d.pointXValue,e.x());var p=o[h],q=b.y()(p,h);null!==q&&e.highlightPoint(g.seriesIndex,h,!0),void 0!==p&&(void 0===f&&(f=p),void 0===l&&(l=b.xScale()(b.x()(p,h))),n.push({key:g.key,value:q,color:m(g,g.seriesIndex),data:p}))}),n.length>2){var o=b.yScale().invert(d.mouseY),p=Math.abs(b.yScale().domain()[0]-b.yScale().domain()[1]),q=.03*p,r=a.nearestValueIndex(n.map(function(a){return a.value}),o,q);null!==r&&(n[r].highlight=!0)}var s=function(a,b){return null==a?\"N/A\":g.tickFormat()(a)};i.tooltip.valueFormatter(i.tooltip.valueFormatter()||s).data({value:b.x()(f,h),index:h,series:n})(),i.renderGuideLine(l)}),i.dispatch.on(\"elementClick\",function(c){var d,f=[];j.filter(function(a,b){return a.seriesIndex=b,!a.disabled}).forEach(function(e){var g=a.interactiveBisect(e.values,c.pointXValue,b.x()),h=e.values[g];if(\"undefined\"!=typeof h){\"undefined\"==typeof d&&(d=b.xScale()(b.x()(h,g)));var i=b.yScale()(b.y()(h,g));f.push({point:h,pointIndex:g,pos:[d,i],seriesIndex:e.seriesIndex,series:e})}}),e.dispatch.elementClick(f)}),i.dispatch.on(\"elementMouseout\",function(a){e.clearHighlights()}),z.on(\"changeState\",function(a){\"undefined\"!=typeof a.disabled&&j.length===a.disabled.length&&(j.forEach(function(b,c){b.disabled=a.disabled[c]}),w.disabled=a.disabled),b.update()})}),B.renderEnd(\"lineChart immediate\"),b}var c,d,e=a.models.line(),f=a.models.axis(),g=a.models.axis(),h=a.models.legend(),i=a.interactiveGuideline(),j=a.models.tooltip(),k=a.models.focus(a.models.line()),l={top:30,right:20,bottom:50,left:60},m=a.utils.defaultColor(),n=null,o=null,p=!0,q=\"top\",r=!0,s=!0,t=!1,u=!1,v=!1,w=a.utils.state(),x=null,y=null,z=d3.dispatch(\"tooltipShow\",\"tooltipHide\",\"stateChange\",\"changeState\",\"renderEnd\"),A=250;f.orient(\"bottom\").tickPadding(7),g.orient(t?\"right\":\"left\"),e.clipEdge(!0).duration(0),j.valueFormatter(function(a,b){return g.tickFormat()(a,b)}).headerFormatter(function(a,b){return f.tickFormat()(a,b)}),i.tooltip.valueFormatter(function(a,b){return g.tickFormat()(a,b)}).headerFormatter(function(a,b){return f.tickFormat()(a,b)});var B=a.utils.renderWatch(z,A),C=function(a){return function(){return{active:a.map(function(a){return!a.disabled})}}},D=function(a){return function(b){void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}};return e.dispatch.on(\"elementMouseover.tooltip\",function(a){a.series.disableTooltip||j.data(a).hidden(!1)}),e.dispatch.on(\"elementMouseout.tooltip\",function(a){j.hidden(!0)}),b.dispatch=z,b.lines=e,b.legend=h,b.focus=k,b.xAxis=f,b.x2Axis=k.xAxis,b.yAxis=g,b.y2Axis=k.yAxis,b.interactiveLayer=i,b.tooltip=j,b.state=w,b.dispatch=z,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return n},set:function(a){n=a}},height:{get:function(){return o},set:function(a){o=a}},showLegend:{get:function(){return p},set:function(a){p=a}},legendPosition:{get:function(){return q},set:function(a){q=a}},showXAxis:{get:function(){return r},set:function(a){r=a}},showYAxis:{get:function(){return s},set:function(a){s=a}},defaultState:{get:function(){return x},set:function(a){x=a}},noData:{get:function(){return y},set:function(a){y=a}},focusEnable:{get:function(){return v},set:function(a){v=a}},focusHeight:{get:function(){return k.height()},set:function(a){k.height(a)}},focusShowAxisX:{get:function(){return k.showXAxis()},set:function(a){k.showXAxis(a)}},focusShowAxisY:{get:function(){return k.showYAxis()},set:function(a){k.showYAxis(a)}},brushExtent:{get:function(){return k.brushExtent()},set:function(a){k.brushExtent(a)}},focusMargin:{get:function(){return k.margin},set:function(a){k.margin.top=void 0!==a.top?a.top:k.margin.top,k.margin.right=void 0!==a.right?a.right:k.margin.right,k.margin.bottom=void 0!==a.bottom?a.bottom:k.margin.bottom,k.margin.left=void 0!==a.left?a.left:k.margin.left}},margin:{get:function(){return l},set:function(a){l.top=void 0!==a.top?a.top:l.top,l.right=void 0!==a.right?a.right:l.right,l.bottom=void 0!==a.bottom?a.bottom:l.bottom,l.left=void 0!==a.left?a.left:l.left}},duration:{get:function(){return A},set:function(a){A=a,B.reset(A),e.duration(A),k.duration(A),f.duration(A),g.duration(A)}},color:{get:function(){return m},set:function(b){m=a.utils.getColor(b),h.color(m),e.color(m),k.color(m)}},interpolate:{get:function(){return e.interpolate()},set:function(a){e.interpolate(a),k.interpolate(a)}},xTickFormat:{get:function(){return f.tickFormat()},set:function(a){f.tickFormat(a),k.xTickFormat(a)}},yTickFormat:{get:function(){return g.tickFormat()},set:function(a){g.tickFormat(a),k.yTickFormat(a)}},x:{get:function(){return e.x()},set:function(a){e.x(a),k.x(a)}},y:{get:function(){return e.y()},set:function(a){e.y(a),k.y(a)}},rightAlignYAxis:{get:function(){return t},set:function(a){t=a,g.orient(t?\"right\":\"left\")}},useInteractiveGuideline:{get:function(){return u},set:function(a){u=a,u&&(e.interactive(!1),e.useVoronoi(!1))}}}),a.utils.inheritOptions(b,e),a.utils.initOptions(b),b},a.models.lineWithFocusChart=function(){return a.models.lineChart().margin({bottom:30}).focusEnable(!0)},a.models.linePlusBarChart=function(){\"use strict\";function b(v){return v.each(function(v){function J(a){var b=+(\"e\"==a),c=b?1:-1,d=Z/3;return\"M\"+.5*c+\",\"+d+\"A6,6 0 0 \"+b+\" \"+6.5*c+\",\"+(d+6)+\"V\"+(2*d-6)+\"A6,6 0 0 \"+b+\" \"+.5*c+\",\"+2*d+\"ZM\"+2.5*c+\",\"+(d+8)+\"V\"+(2*d-8)+\"M\"+4.5*c+\",\"+(d+8)+\"V\"+(2*d-8)}function R(){u.empty()||u.extent(I),ma.data([u.empty()?e.domain():I]).each(function(a,b){var c=e(a[0])-e.range()[0],d=e.range()[1]-e(a[1]);d3.select(this).select(\".left\").attr(\"width\",0>c?0:c),d3.select(this).select(\".right\").attr(\"x\",e(a[1])).attr(\"width\",0>d?0:d)})}function S(){I=u.empty()?null:u.extent(),c=u.empty()?e.domain():u.extent(),K.brush({extent:c,brush:u}),R(),l.width(X).height(Y).color(v.map(function(a,b){return a.color||C(a,b)}).filter(function(a,b){return!v[b].disabled&&v[b].bar})),j.width(X).height(Y).color(v.map(function(a,b){return a.color||C(a,b)}).filter(function(a,b){return!v[b].disabled&&!v[b].bar}));var b=fa.select(\".nv-focus .nv-barsWrap\").datum(_.length?_.map(function(a,b){return{key:a.key,values:a.values.filter(function(a,b){return l.x()(a,b)>=c[0]&&l.x()(a,b)<=c[1]})}}):[{values:[]}]),h=fa.select(\".nv-focus .nv-linesWrap\").datum(V(aa)?[{values:[]}]:aa.filter(function(a){return!a.disabled}).map(function(a,b){return{area:a.area,fillOpacity:a.fillOpacity,strokeWidth:a.strokeWidth,key:a.key,values:a.values.filter(function(a,b){return j.x()(a,b)>=c[0]&&j.x()(a,b)<=c[1]})}}));d=_.length&&!Q?l.xScale():j.xScale(),n.scale(d)._ticks(a.utils.calcTicksX(X/100,v)).tickSize(-Y,0),n.domain([Math.ceil(c[0]),Math.floor(c[1])]),fa.select(\".nv-x.nv-axis\").transition().duration(L).call(n),b.transition().duration(L).call(l),h.transition().duration(L).call(j),fa.select(\".nv-focus .nv-x.nv-axis\").attr(\"transform\",\"translate(0,\"+f.range()[0]+\")\"),p.scale(f)._ticks(a.utils.calcTicksY(Y/36,v)).tickSize(-X,0),q.scale(g)._ticks(a.utils.calcTicksY(Y/36,v)),Q?q.tickSize(aa.length?0:-X,0):q.tickSize(_.length?0:-X,0);var i=_.length?1:0,k=aa.length&&!V(aa)?1:0,m=Q?k:i,o=Q?i:k;fa.select(\".nv-focus .nv-y1.nv-axis\").style(\"opacity\",m),fa.select(\".nv-focus .nv-y2.nv-axis\").style(\"opacity\",o).attr(\"transform\",\"translate(\"+d.range()[1]+\",0)\"),fa.select(\".nv-focus .nv-y1.nv-axis\").transition().duration(L).call(p),fa.select(\".nv-focus .nv-y2.nv-axis\").transition().duration(L).call(q)}var W=d3.select(this);a.utils.initSVG(W);var X=a.utils.availableWidth(y,W,w),Y=a.utils.availableHeight(z,W,w)-(E?H:0),Z=H-x.top-x.bottom;if(b.update=function(){W.transition().duration(L).call(b)},b.container=this,M.setter(U(v),b.update).getter(T(v)).update(),M.disabled=v.map(function(a){return!!a.disabled}),!N){var $;N={};for($ in M)M[$]instanceof Array?N[$]=M[$].slice(0):N[$]=M[$]}if(!(v&&v.length&&v.filter(function(a){return a.values.length}).length))return a.utils.noData(b,W),b;W.selectAll(\".nv-noData\").remove();var _=v.filter(function(a){return!a.disabled&&a.bar}),aa=v.filter(function(a){return!a.bar});d=_.length&&!Q?l.xScale():j.xScale(),e=o.scale(),f=Q?j.yScale():l.yScale(),g=Q?l.yScale():j.yScale(),h=Q?k.yScale():m.yScale(),i=Q?m.yScale():k.yScale();var ba=v.filter(function(a){return!a.disabled&&(Q?!a.bar:a.bar)}).map(function(a){return a.values.map(function(a,b){return{x:A(a,b),y:B(a,b)}})}),ca=v.filter(function(a){return!a.disabled&&(Q?a.bar:!a.bar)}).map(function(a){return a.values.map(function(a,b){return{x:A(a,b),y:B(a,b)}})});d.range([0,X]),e.domain(d3.extent(d3.merge(ba.concat(ca)),function(a){return a.x})).range([0,X]);var da=W.selectAll(\"g.nv-wrap.nv-linePlusBar\").data([v]),ea=da.enter().append(\"g\").attr(\"class\",\"nvd3 nv-wrap nv-linePlusBar\").append(\"g\"),fa=da.select(\"g\");ea.append(\"g\").attr(\"class\",\"nv-legendWrap\");var ga=ea.append(\"g\").attr(\"class\",\"nv-focus\");ga.append(\"g\").attr(\"class\",\"nv-x nv-axis\"),ga.append(\"g\").attr(\"class\",\"nv-y1 nv-axis\"),ga.append(\"g\").attr(\"class\",\"nv-y2 nv-axis\"),ga.append(\"g\").attr(\"class\",\"nv-barsWrap\"),ga.append(\"g\").attr(\"class\",\"nv-linesWrap\");var ha=ea.append(\"g\").attr(\"class\",\"nv-context\");if(ha.append(\"g\").attr(\"class\",\"nv-x nv-axis\"),ha.append(\"g\").attr(\"class\",\"nv-y1 nv-axis\"),ha.append(\"g\").attr(\"class\",\"nv-y2 nv-axis\"),ha.append(\"g\").attr(\"class\",\"nv-barsWrap\"),ha.append(\"g\").attr(\"class\",\"nv-linesWrap\"),ha.append(\"g\").attr(\"class\",\"nv-brushBackground\"),ha.append(\"g\").attr(\"class\",\"nv-x nv-brush\"),D){var ia=t.align()?X/2:X,ja=t.align()?ia:0;t.width(ia),fa.select(\".nv-legendWrap\").datum(v.map(function(a){return a.originalKey=void 0===a.originalKey?a.key:a.originalKey,Q?a.key=a.originalKey+(a.bar?P:O):a.key=a.originalKey+(a.bar?O:P),a})).call(t),t.height()>w.top&&(w.top=t.height(),Y=a.utils.availableHeight(z,W,w)-H),fa.select(\".nv-legendWrap\").attr(\"transform\",\"translate(\"+ja+\",\"+-w.top+\")\")}else fa.select(\".nv-legendWrap\").selectAll(\"*\").remove();da.attr(\"transform\",\"translate(\"+w.left+\",\"+w.top+\")\"),fa.select(\".nv-context\").style(\"display\",E?\"initial\":\"none\"),m.width(X).height(Z).color(v.map(function(a,b){return a.color||C(a,b)}).filter(function(a,b){return!v[b].disabled&&v[b].bar})),k.width(X).height(Z).color(v.map(function(a,b){return a.color||C(a,b)}).filter(function(a,b){return!v[b].disabled&&!v[b].bar}));var ka=fa.select(\".nv-context .nv-barsWrap\").datum(_.length?_:[{values:[]}]),la=fa.select(\".nv-context .nv-linesWrap\").datum(V(aa)?[{values:[]}]:aa.filter(function(a){return!a.disabled}));fa.select(\".nv-context\").attr(\"transform\",\"translate(0,\"+(Y+w.bottom+x.top)+\")\"),ka.transition().call(m),la.transition().call(k),G&&(o._ticks(a.utils.calcTicksX(X/100,v)).tickSize(-Z,0),fa.select(\".nv-context .nv-x.nv-axis\").attr(\"transform\",\"translate(0,\"+h.range()[0]+\")\"),fa.select(\".nv-context .nv-x.nv-axis\").transition().call(o)),F&&(r.scale(h)._ticks(Z/36).tickSize(-X,0),s.scale(i)._ticks(Z/36).tickSize(_.length?0:-X,0),fa.select(\".nv-context .nv-y3.nv-axis\").style(\"opacity\",_.length?1:0).attr(\"transform\",\"translate(0,\"+e.range()[0]+\")\"),fa.select(\".nv-context .nv-y2.nv-axis\").style(\"opacity\",aa.length?1:0).attr(\"transform\",\"translate(\"+e.range()[1]+\",0)\"),fa.select(\".nv-context .nv-y1.nv-axis\").transition().call(r),fa.select(\".nv-context .nv-y2.nv-axis\").transition().call(s)),u.x(e).on(\"brush\",S),I&&u.extent(I);var ma=fa.select(\".nv-brushBackground\").selectAll(\"g\").data([I||u.extent()]),na=ma.enter().append(\"g\");na.append(\"rect\").attr(\"class\",\"left\").attr(\"x\",0).attr(\"y\",0).attr(\"height\",Z),na.append(\"rect\").attr(\"class\",\"right\").attr(\"x\",0).attr(\"y\",0).attr(\"height\",Z);var oa=fa.select(\".nv-x.nv-brush\").call(u);oa.selectAll(\"rect\").attr(\"height\",Z),oa.selectAll(\".resize\").append(\"path\").attr(\"d\",J),t.dispatch.on(\"stateChange\",function(a){for(var c in a)M[c]=a[c];K.stateChange(M),b.update()}),K.on(\"changeState\",function(a){\"undefined\"!=typeof a.disabled&&(v.forEach(function(b,c){b.disabled=a.disabled[c]}),M.disabled=a.disabled),b.update()}),S()}),b}var c,d,e,f,g,h,i,j=a.models.line(),k=a.models.line(),l=a.models.historicalBar(),m=a.models.historicalBar(),n=a.models.axis(),o=a.models.axis(),p=a.models.axis(),q=a.models.axis(),r=a.models.axis(),s=a.models.axis(),t=a.models.legend(),u=d3.svg.brush(),v=a.models.tooltip(),w={top:30,right:30,bottom:30,left:60},x={top:0,right:30,bottom:20,left:60},y=null,z=null,A=function(a){return a.x},B=function(a){return a.y},C=a.utils.defaultColor(),D=!0,E=!0,F=!1,G=!0,H=50,I=null,J=null,K=d3.dispatch(\"brush\",\"stateChange\",\"changeState\"),L=0,M=a.utils.state(),N=null,O=\" (left axis)\",P=\" (right axis)\",Q=!1;j.clipEdge(!0),k.interactive(!1),k.pointActive(function(a){return!1}),n.orient(\"bottom\").tickPadding(5),p.orient(\"left\"),q.orient(\"right\"),o.orient(\"bottom\").tickPadding(5),r.orient(\"left\"),s.orient(\"right\"),v.headerEnabled(!0).headerFormatter(function(a,b){return n.tickFormat()(a,b)});var R=function(){return Q?{main:q,focus:s}:{main:p,focus:r}},S=function(){return Q?{main:p,focus:r}:{main:q,focus:s}},T=function(a){return function(){return{active:a.map(function(a){return!a.disabled})}}},U=function(a){return function(b){void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}},V=function(a){return a.every(function(a){return a.disabled})};return j.dispatch.on(\"elementMouseover.tooltip\",function(a){v.duration(100).valueFormatter(function(a,b){return S().main.tickFormat()(a,b)}).data(a).hidden(!1)}),j.dispatch.on(\"elementMouseout.tooltip\",function(a){v.hidden(!0)}),l.dispatch.on(\"elementMouseover.tooltip\",function(a){a.value=b.x()(a.data),a.series={value:b.y()(a.data),color:a.color},v.duration(0).valueFormatter(function(a,b){return R().main.tickFormat()(a,b)}).data(a).hidden(!1)}),l.dispatch.on(\"elementMouseout.tooltip\",function(a){v.hidden(!0)}),l.dispatch.on(\"elementMousemove.tooltip\",function(a){v()}),b.dispatch=K,b.legend=t,b.lines=j,b.lines2=k,b.bars=l,b.bars2=m,b.xAxis=n,b.x2Axis=o,b.y1Axis=p,b.y2Axis=q,b.y3Axis=r,b.y4Axis=s,b.tooltip=v,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return y},set:function(a){y=a}},height:{get:function(){return z},set:function(a){z=a}},showLegend:{get:function(){return D},set:function(a){D=a}},brushExtent:{get:function(){return I},set:function(a){I=a}},noData:{get:function(){return J},set:function(a){J=a}},focusEnable:{get:function(){return E},set:function(a){E=a}},focusHeight:{get:function(){return H},set:function(a){H=a}},focusShowAxisX:{get:function(){return G},set:function(a){G=a}},focusShowAxisY:{get:function(){return F},set:function(a){F=a}},legendLeftAxisHint:{get:function(){return O},set:function(a){O=a}},legendRightAxisHint:{get:function(){return P},set:function(a){P=a}},margin:{get:function(){return w},set:function(a){w.top=void 0!==a.top?a.top:w.top,w.right=void 0!==a.right?a.right:w.right,w.bottom=void 0!==a.bottom?a.bottom:w.bottom,w.left=void 0!==a.left?a.left:w.left}},focusMargin:{get:function(){return x},set:function(a){x.top=void 0!==a.top?a.top:x.top,x.right=void 0!==a.right?a.right:x.right,x.bottom=void 0!==a.bottom?a.bottom:x.bottom,x.left=void 0!==a.left?a.left:x.left}},duration:{get:function(){return L},set:function(a){L=a}},color:{get:function(){return C},set:function(b){C=a.utils.getColor(b),t.color(C)}},x:{get:function(){return A},set:function(a){A=a,j.x(a),k.x(a),l.x(a),m.x(a)}},y:{get:function(){return B},set:function(a){B=a,j.y(a),k.y(a),l.y(a),m.y(a)}},switchYAxisOrder:{get:function(){return Q},set:function(a){if(Q!==a){var b=p;p=q,q=b;var c=r;r=s,s=c}Q=a,p.orient(\"left\"),q.orient(\"right\"),r.orient(\"left\"),s.orient(\"right\")}}}),a.utils.inheritOptions(b,j),a.utils.initOptions(b),b},a.models.multiBar=function(){\"use strict\";function b(F){return D.reset(),F.each(function(b){var F=k-j.left-j.right,G=l-j.top-j.bottom;p=d3.select(this),a.utils.initSVG(p);var H=0;if(x&&b.length&&(x=[{values:b[0].values.map(function(a){return{x:a.x,y:0,series:a.series,size:.01}})}]),u){var I=d3.layout.stack().offset(v).values(function(a){return a.values}).y(r)(!b.length&&x?x:b);I.forEach(function(a,c){a.nonStackable?(b[c].nonStackableSeries=H++,I[c]=b[c]):c>0&&I[c-1].nonStackable&&I[c].values.map(function(a,b){a.y0-=I[c-1].values[b].y,a.y1=a.y0+a.y})}),b=I}b.forEach(function(a,b){a.values.forEach(function(c){c.series=b,c.key=a.key})}),u&&b.length>0&&b[0].values.map(function(a,c){var d=0,e=0;b.map(function(a,f){if(!b[f].nonStackable){var g=a.values[c];g.size=Math.abs(g.y),g.y<0?(g.y1=e,e-=g.size):(g.y1=g.size+d,d+=g.size)}})});var J=d&&e?[]:b.map(function(a,b){return a.values.map(function(a,c){return{x:q(a,c),y:r(a,c),y0:a.y0,y1:a.y1,idx:b}})});m.domain(d||d3.merge(J).map(function(a){return a.x})).rangeBands(f||[0,F],A),n.domain(e||d3.extent(d3.merge(J).map(function(a){var c=a.y;return u&&!b[a.idx].nonStackable&&(c=a.y>0?a.y1:a.y1+a.y),c}).concat(s))).range(g||[G,0]),m.domain()[0]===m.domain()[1]&&(m.domain()[0]?m.domain([m.domain()[0]-.01*m.domain()[0],m.domain()[1]+.01*m.domain()[1]]):m.domain([-1,1])),n.domain()[0]===n.domain()[1]&&(n.domain()[0]?n.domain([n.domain()[0]+.01*n.domain()[0],n.domain()[1]-.01*n.domain()[1]]):n.domain([-1,1])),h=h||m,i=i||n;var K=p.selectAll(\"g.nv-wrap.nv-multibar\").data([b]),L=K.enter().append(\"g\").attr(\"class\",\"nvd3 nv-wrap nv-multibar\"),M=L.append(\"defs\"),N=L.append(\"g\"),O=K.select(\"g\");N.append(\"g\").attr(\"class\",\"nv-groups\"),K.attr(\"transform\",\"translate(\"+j.left+\",\"+j.top+\")\"),M.append(\"clipPath\").attr(\"id\",\"nv-edge-clip-\"+o).append(\"rect\"),K.select(\"#nv-edge-clip-\"+o+\" rect\").attr(\"width\",F).attr(\"height\",G),O.attr(\"clip-path\",t?\"url(#nv-edge-clip-\"+o+\")\":\"\");var P=K.select(\".nv-groups\").selectAll(\".nv-group\").data(function(a){return a},function(a,b){return b});P.enter().append(\"g\").style(\"stroke-opacity\",1e-6).style(\"fill-opacity\",1e-6);var Q=D.transition(P.exit().selectAll(\"rect.nv-bar\"),\"multibarExit\",Math.min(100,z)).attr(\"y\",function(a,c,d){var e=i(0)||0;return u&&b[a.series]&&!b[a.series].nonStackable&&(e=i(a.y0)),e}).attr(\"height\",0).remove();Q.delay&&Q.delay(function(a,b){var c=b*(z/(E+1))-b;return c}),P.attr(\"class\",function(a,b){return\"nv-group nv-series-\"+b}).classed(\"hover\",function(a){return a.hover}).style(\"fill\",function(a,b){return w(a,b)}).style(\"stroke\",function(a,b){return w(a,b)}),P.style(\"stroke-opacity\",1).style(\"fill-opacity\",B);var R=P.selectAll(\"rect.nv-bar\").data(function(a){return x&&!b.length?x.values:a.values});R.exit().remove();R.enter().append(\"rect\").attr(\"class\",function(a,b){return r(a,b)<0?\"nv-bar negative\":\"nv-bar positive\"}).attr(\"x\",function(a,c,d){return u&&!b[d].nonStackable?0:d*m.rangeBand()/b.length}).attr(\"y\",function(a,c,d){return i(u&&!b[d].nonStackable?a.y0:0)||0}).attr(\"height\",0).attr(\"width\",function(a,c,d){return m.rangeBand()/(u&&!b[d].nonStackable?1:b.length)}).attr(\"transform\",function(a,b){return\"translate(\"+m(q(a,b))+\",0)\"});R.style(\"fill\",function(a,b,c){return w(a,c,b)}).style(\"stroke\",function(a,b,c){return w(a,c,b)}).on(\"mouseover\",function(a,b){d3.select(this).classed(\"hover\",!0),C.elementMouseover({data:a,index:b,color:d3.select(this).style(\"fill\")})}).on(\"mouseout\",function(a,b){d3.select(this).classed(\"hover\",!1),C.elementMouseout({data:a,index:b,color:d3.select(this).style(\"fill\")})}).on(\"mousemove\",function(a,b){C.elementMousemove({data:a,index:b,color:d3.select(this).style(\"fill\")})}).on(\"click\",function(a,b){var c=this;C.elementClick({data:a,index:b,color:d3.select(this).style(\"fill\"),event:d3.event,element:c}),d3.event.stopPropagation()}).on(\"dblclick\",function(a,b){C.elementDblClick({data:a,index:b,color:d3.select(this).style(\"fill\")}),d3.event.stopPropagation()}),R.attr(\"class\",function(a,b){return r(a,b)<0?\"nv-bar negative\":\"nv-bar positive\"}).attr(\"transform\",function(a,b){return\"translate(\"+m(q(a,b))+\",0)\"}),y&&(c||(c=b.map(function(){return!0})),R.style(\"fill\",function(a,b,d){return d3.rgb(y(a,b)).darker(c.map(function(a,b){return b}).filter(function(a,b){return!c[b]})[d]).toString()}).style(\"stroke\",function(a,b,d){return d3.rgb(y(a,b)).darker(c.map(function(a,b){return b}).filter(function(a,b){return!c[b]})[d]).toString()}));var S=R.watchTransition(D,\"multibar\",Math.min(250,z)).delay(function(a,c){return c*z/b[0].values.length});u?S.attr(\"y\",function(a,c,d){var e=0;return e=b[d].nonStackable?r(a,c)<0?n(0):n(0)-n(r(a,c))<-1?n(0)-1:n(r(a,c))||0:n(a.y1)}).attr(\"height\",function(a,c,d){return b[d].nonStackable?Math.max(Math.abs(n(r(a,c))-n(0)),0)||0:Math.max(Math.abs(n(a.y+a.y0)-n(a.y0)),0)}).attr(\"x\",function(a,c,d){var e=0;return b[d].nonStackable&&(e=a.series*m.rangeBand()/b.length,b.length!==H&&(e=b[d].nonStackableSeries*m.rangeBand()/(2*H))),e}).attr(\"width\",function(a,c,d){if(b[d].nonStackable){var e=m.rangeBand()/H;return b.length!==H&&(e=m.rangeBand()/(2*H)),e}return m.rangeBand()}):S.attr(\"x\",function(a,c){return a.series*m.rangeBand()/b.length}).attr(\"width\",m.rangeBand()/b.length).attr(\"y\",function(a,b){return r(a,b)<0?n(0):n(0)-n(r(a,b))<1?n(0)-1:n(r(a,b))||0}).attr(\"height\",function(a,b){return Math.max(Math.abs(n(r(a,b))-n(0)),1)||0}),h=m.copy(),i=n.copy(),b[0]&&b[0].values&&(E=b[0].values.length)}),D.renderEnd(\"multibar immediate\"),b}var c,d,e,f,g,h,i,j={top:0,right:0,bottom:0,left:0},k=960,l=500,m=d3.scale.ordinal(),n=d3.scale.linear(),o=Math.floor(1e4*Math.random()),p=null,q=function(a){return a.x},r=function(a){return a.y},s=[0],t=!0,u=!1,v=\"zero\",w=a.utils.defaultColor(),x=!1,y=null,z=500,A=.1,B=.75,C=d3.dispatch(\"chartClick\",\"elementClick\",\"elementDblClick\",\"elementMouseover\",\"elementMouseout\",\"elementMousemove\",\"renderEnd\"),D=a.utils.renderWatch(C,z),E=0;return b.dispatch=C,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return k},set:function(a){k=a}},height:{get:function(){return l},set:function(a){l=a}},x:{get:function(){return q},set:function(a){q=a}},y:{get:function(){return r},set:function(a){r=a}},xScale:{get:function(){return m},set:function(a){m=a}},yScale:{get:function(){return n},set:function(a){n=a}},xDomain:{get:function(){return d},set:function(a){d=a}},yDomain:{get:function(){return e},set:function(a){e=a}},xRange:{get:function(){return f},set:function(a){f=a}},yRange:{get:function(){return g},set:function(a){g=a}},forceY:{get:function(){return s},set:function(a){s=a}},stacked:{get:function(){return u},set:function(a){u=a}},stackOffset:{get:function(){return v},set:function(a){v=a}},clipEdge:{get:function(){return t},set:function(a){t=a}},disabled:{get:function(){return c},set:function(a){c=a}},id:{get:function(){return o},set:function(a){o=a}},hideable:{get:function(){return x},set:function(a){x=a}},groupSpacing:{get:function(){return A},set:function(a){A=a}},fillOpacity:{get:function(){return B},set:function(a){B=a}},margin:{get:function(){return j},set:function(a){j.top=void 0!==a.top?a.top:j.top,j.right=void 0!==a.right?a.right:j.right,j.bottom=void 0!==a.bottom?a.bottom:j.bottom,j.left=void 0!==a.left?a.left:j.left}},duration:{get:function(){return z},set:function(a){z=a,D.reset(z)}},color:{get:function(){return w},set:function(b){w=a.utils.getColor(b)}},barColor:{get:function(){return y},set:function(b){y=b?a.utils.getColor(b):null}}}),a.utils.initOptions(b),b},a.models.multiBarChart=function(){\"use strict\";function b(B){return G.reset(),G.models(e),s&&G.models(f),t&&G.models(g),B.each(function(B){var G=d3.select(this);a.utils.initSVG(G);var K=a.utils.availableWidth(m,G,l),L=a.utils.availableHeight(n,G,l);if(b.update=function(){0===E?G.call(b):G.transition().duration(E).call(b)},b.container=this,z.setter(J(B),b.update).getter(I(B)).update(),z.disabled=B.map(function(a){return!!a.disabled}),!A){var M;A={};for(M in z)z[M]instanceof Array?A[M]=z[M].slice(0):A[M]=z[M]}if(!(B&&B.length&&B.filter(function(a){return a.values.length}).length))return a.utils.noData(b,G),b;G.selectAll(\".nv-noData\").remove(),c=e.xScale(),d=e.yScale();var N=G.selectAll(\"g.nv-wrap.nv-multiBarWithLegend\").data([B]),O=N.enter().append(\"g\").attr(\"class\",\"nvd3 nv-wrap nv-multiBarWithLegend\").append(\"g\"),P=N.select(\"g\");if(O.append(\"g\").attr(\"class\",\"nv-x nv-axis\"),O.append(\"g\").attr(\"class\",\"nv-y nv-axis\"),O.append(\"g\").attr(\"class\",\"nv-barsWrap\"),O.append(\"g\").attr(\"class\",\"nv-legendWrap\"),O.append(\"g\").attr(\"class\",\"nv-controlsWrap\"),O.append(\"g\").attr(\"class\",\"nv-interactive\"),r?(i.width(K-D()),P.select(\".nv-legendWrap\").datum(B).call(i),i.height()>l.top&&(l.top=i.height(),L=a.utils.availableHeight(n,G,l)),P.select(\".nv-legendWrap\").attr(\"transform\",\"translate(\"+D()+\",\"+-l.top+\")\")):P.select(\".nv-legendWrap\").selectAll(\"*\").remove(),p){var Q=[{key:q.grouped||\"Grouped\",disabled:e.stacked()},{key:q.stacked||\"Stacked\",disabled:!e.stacked()}];j.width(D()).color([\"#444\",\"#444\",\"#444\"]),P.select(\".nv-controlsWrap\").datum(Q).attr(\"transform\",\"translate(0,\"+-l.top+\")\").call(j)}else P.select(\".nv-controlsWrap\").selectAll(\"*\").remove();N.attr(\"transform\",\"translate(\"+l.left+\",\"+l.top+\")\"),u&&P.select(\".nv-y.nv-axis\").attr(\"transform\",\"translate(\"+K+\",0)\"),e.disabled(B.map(function(a){return a.disabled})).width(K).height(L).color(B.map(function(a,b){return a.color||o(a,b)}).filter(function(a,b){return!B[b].disabled}));var R=P.select(\".nv-barsWrap\").datum(B.filter(function(a){return!a.disabled}));if(R.call(e),s){f.scale(c)._ticks(a.utils.calcTicksX(K/100,B)).tickSize(-L,0),P.select(\".nv-x.nv-axis\").attr(\"transform\",\"translate(0,\"+d.range()[0]+\")\"),P.select(\".nv-x.nv-axis\").call(f);var S=P.select(\".nv-x.nv-axis > g\").selectAll(\"g\");if(S.selectAll(\"line, text\").style(\"opacity\",1),w){var T=function(a,b){return\"translate(\"+a+\",\"+b+\")\"},U=5,V=17;S.selectAll(\"text\").attr(\"transform\",function(a,b,c){return T(0,c%2==0?U:V)});var W=d3.selectAll(\".nv-x.nv-axis .nv-wrap g g text\")[0].length;P.selectAll(\".nv-x.nv-axis .nv-axisMaxMin text\").attr(\"transform\",function(a,b){return T(0,0===b||W%2!==0?V:U)})}x&&P.selectAll(\".tick text\").call(a.utils.wrapTicks,b.xAxis.rangeBand()),v&&S.filter(function(a,b){return b%Math.ceil(B[0].values.length/(K/100))!==0}).selectAll(\"text, line\").style(\"opacity\",0),y&&S.selectAll(\".tick text\").attr(\"transform\",\"rotate(\"+y+\" 0,0)\").style(\"text-anchor\",y>0?\"start\":\"end\"),P.select(\".nv-x.nv-axis\").selectAll(\"g.nv-axisMaxMin text\").style(\"opacity\",1)}t&&(g.scale(d)._ticks(a.utils.calcTicksY(L/36,B)).tickSize(-K,0),P.select(\".nv-y.nv-axis\").call(g)),F&&(h.width(K).height(L).margin({left:l.left,top:l.top}).svgContainer(G).xScale(c),N.select(\".nv-interactive\").call(h)),i.dispatch.on(\"stateChange\",function(a){for(var c in a)z[c]=a[c];C.stateChange(z),b.update()}),j.dispatch.on(\"legendClick\",function(a,c){if(a.disabled){switch(Q=Q.map(function(a){return a.disabled=!0,a}),a.disabled=!1,a.key){case\"Grouped\":case q.grouped:e.stacked(!1);break;case\"Stacked\":case q.stacked:e.stacked(!0)}z.stacked=e.stacked(),C.stateChange(z),b.update()}}),C.on(\"changeState\",function(a){\"undefined\"!=typeof a.disabled&&(B.forEach(function(b,c){b.disabled=a.disabled[c]}),z.disabled=a.disabled),\"undefined\"!=typeof a.stacked&&(e.stacked(a.stacked),z.stacked=a.stacked,H=a.stacked),b.update()}),F?(h.dispatch.on(\"elementMousemove\",function(a){if(void 0!=a.pointXValue){var d,e,f,g,i=[];B.filter(function(a,b){return a.seriesIndex=b,!a.disabled}).forEach(function(h,j){e=c.domain().indexOf(a.pointXValue);var k=h.values[e];void 0!==k&&(g=k.x,void 0===d&&(d=k),void 0===f&&(f=a.mouseX),i.push({key:h.key,value:b.y()(k,e),color:o(h,h.seriesIndex),data:h.values[e]}))}),h.tooltip.data({value:g,index:e,series:i})(),h.renderGuideLine(f)}}),h.dispatch.on(\"elementMouseout\",function(a){h.tooltip.hidden(!0)})):(e.dispatch.on(\"elementMouseover.tooltip\",function(a){a.value=b.x()(a.data),a.series={key:a.data.key,value:b.y()(a.data),color:a.color},k.data(a).hidden(!1)}),e.dispatch.on(\"elementMouseout.tooltip\",function(a){k.hidden(!0)}),e.dispatch.on(\"elementMousemove.tooltip\",function(a){k()}))}),G.renderEnd(\"multibarchart immediate\"),b}var c,d,e=a.models.multiBar(),f=a.models.axis(),g=a.models.axis(),h=a.interactiveGuideline(),i=a.models.legend(),j=a.models.legend(),k=a.models.tooltip(),l={top:30,right:20,bottom:50,left:60},m=null,n=null,o=a.utils.defaultColor(),p=!0,q={},r=!0,s=!0,t=!0,u=!1,v=!0,w=!1,x=!1,y=0,z=a.utils.state(),A=null,B=null,C=d3.dispatch(\"stateChange\",\"changeState\",\"renderEnd\"),D=function(){return p?180:0},E=250,F=!1;z.stacked=!1,e.stacked(!1),f.orient(\"bottom\").tickPadding(7).showMaxMin(!1).tickFormat(function(a){return a}),g.orient(u?\"right\":\"left\").tickFormat(d3.format(\",.1f\")),k.duration(0).valueFormatter(function(a,b){return g.tickFormat()(a,b)}).headerFormatter(function(a,b){return f.tickFormat()(a,b)}),j.updateState(!1);var G=a.utils.renderWatch(C),H=!1,I=function(a){return function(){return{active:a.map(function(a){return!a.disabled}),stacked:H}}},J=function(a){return function(b){void 0!==b.stacked&&(H=b.stacked),void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}};return b.dispatch=C,b.multibar=e,b.legend=i,b.controls=j,b.xAxis=f,b.yAxis=g,b.state=z,b.tooltip=k,b.interactiveLayer=h,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return m},set:function(a){m=a}},height:{get:function(){return n},set:function(a){n=a}},showLegend:{get:function(){return r},set:function(a){r=a}},showControls:{get:function(){return p},set:function(a){p=a}},controlLabels:{get:function(){return q},set:function(a){q=a}},showXAxis:{get:function(){return s},set:function(a){s=a}},showYAxis:{get:function(){return t},set:function(a){t=a}},defaultState:{get:function(){return A},set:function(a){A=a}},noData:{get:function(){return B},set:function(a){B=a}},reduceXTicks:{get:function(){return v},set:function(a){v=a}},rotateLabels:{get:function(){return y},set:function(a){y=a}},staggerLabels:{get:function(){return w},set:function(a){w=a}},wrapLabels:{get:function(){return x},set:function(a){x=!!a}},margin:{get:function(){return l},set:function(a){l.top=void 0!==a.top?a.top:l.top,l.right=void 0!==a.right?a.right:l.right,l.bottom=void 0!==a.bottom?a.bottom:l.bottom,l.left=void 0!==a.left?a.left:l.left}},duration:{get:function(){return E},set:function(a){E=a,e.duration(E),f.duration(E),g.duration(E),G.reset(E)}},color:{get:function(){return o},set:function(b){o=a.utils.getColor(b),i.color(o)}},rightAlignYAxis:{get:function(){return u},set:function(a){u=a,g.orient(u?\"right\":\"left\")}},useInteractiveGuideline:{get:function(){return F},set:function(a){F=a}},barColor:{get:function(){return e.barColor},set:function(a){e.barColor(a),i.color(function(a,b){return d3.rgb(\"#ccc\").darker(1.5*b).toString()})}}}),a.utils.inheritOptions(b,e),a.utils.initOptions(b),b},a.models.multiBarHorizontal=function(){\"use strict\";function b(m){return F.reset(),m.each(function(b){var m=k-j.left-j.right,D=l-j.top-j.bottom;n=d3.select(this),a.utils.initSVG(n),w&&(b=d3.layout.stack().offset(\"zero\").values(function(a){return a.values}).y(r)(b)),b.forEach(function(a,b){a.values.forEach(function(c){c.series=b,c.key=a.key})}),w&&b[0].values.map(function(a,c){var d=0,e=0;b.map(function(a){var b=a.values[c];b.size=Math.abs(b.y),b.y<0?(b.y1=e-b.size,e-=b.size):(b.y1=d,d+=b.size)})});var G=d&&e?[]:b.map(function(a){return a.values.map(function(a,b){return{x:q(a,b),y:r(a,b),y0:a.y0,y1:a.y1}})});o.domain(d||d3.merge(G).map(function(a){return a.x})).rangeBands(f||[0,D],A),p.domain(e||d3.extent(d3.merge(G).map(function(a){return w?a.y>0?a.y1+a.y:a.y1:a.y}).concat(t))),x&&!w?p.range(g||[p.domain()[0]<0?z:0,m-(p.domain()[1]>0?z:0)]):p.range(g||[0,m]),h=h||o,i=i||d3.scale.linear().domain(p.domain()).range([p(0),p(0)]);var H=d3.select(this).selectAll(\"g.nv-wrap.nv-multibarHorizontal\").data([b]),I=H.enter().append(\"g\").attr(\"class\",\"nvd3 nv-wrap nv-multibarHorizontal\"),J=(I.append(\"defs\"),I.append(\"g\"));H.select(\"g\");J.append(\"g\").attr(\"class\",\"nv-groups\"),H.attr(\"transform\",\"translate(\"+j.left+\",\"+j.top+\")\");var K=H.select(\".nv-groups\").selectAll(\".nv-group\").data(function(a){return a},function(a,b){return b});K.enter().append(\"g\").style(\"stroke-opacity\",1e-6).style(\"fill-opacity\",1e-6),K.exit().watchTransition(F,\"multibarhorizontal: exit groups\").style(\"stroke-opacity\",1e-6).style(\"fill-opacity\",1e-6).remove(),K.attr(\"class\",function(a,b){return\"nv-group nv-series-\"+b}).classed(\"hover\",function(a){return a.hover}).style(\"fill\",function(a,b){return u(a,b)}).style(\"stroke\",function(a,b){return u(a,b)}),K.watchTransition(F,\"multibarhorizontal: groups\").style(\"stroke-opacity\",1).style(\"fill-opacity\",B);var L=K.selectAll(\"g.nv-bar\").data(function(a){return a.values});L.exit().remove();var M=L.enter().append(\"g\").attr(\"transform\",function(a,c,d){return\"translate(\"+i(w?a.y0:0)+\",\"+(w?0:d*o.rangeBand()/b.length+o(q(a,c)))+\")\"});M.append(\"rect\").attr(\"width\",0).attr(\"height\",o.rangeBand()/(w?1:b.length)),L.on(\"mouseover\",function(a,b){d3.select(this).classed(\"hover\",!0),E.elementMouseover({data:a,index:b,color:d3.select(this).style(\"fill\")})}).on(\"mouseout\",function(a,b){d3.select(this).classed(\"hover\",!1),E.elementMouseout({data:a,index:b,color:d3.select(this).style(\"fill\")})}).on(\"mouseout\",function(a,b){E.elementMouseout({data:a,index:b,color:d3.select(this).style(\"fill\")})}).on(\"mousemove\",function(a,b){E.elementMousemove({data:a,index:b,color:d3.select(this).style(\"fill\")})}).on(\"click\",function(a,b){var c=this;E.elementClick({data:a,index:b,color:d3.select(this).style(\"fill\"),event:d3.event,element:c}),d3.event.stopPropagation()}).on(\"dblclick\",function(a,b){E.elementDblClick({data:a,index:b,color:d3.select(this).style(\"fill\")}),d3.event.stopPropagation()}),s(b[0],0)&&(M.append(\"polyline\"),L.select(\"polyline\").attr(\"fill\",\"none\").attr(\"points\",function(a,c){var d=s(a,c),e=.8*o.rangeBand()/(2*(w?1:b.length));d=d.length?d:[-Math.abs(d),Math.abs(d)],d=d.map(function(a){return p(a)-p(0)});var f=[[d[0],-e],[d[0],e],[d[0],0],[d[1],0],[d[1],-e],[d[1],e]];return f.map(function(a){return a.join(\",\")}).join(\" \")}).attr(\"transform\",function(a,c){var d=o.rangeBand()/(2*(w?1:b.length));return\"translate(\"+(r(a,c)<0?0:p(r(a,c))-p(0))+\", \"+d+\")\"})),M.append(\"text\"),x&&!w?(L.select(\"text\").attr(\"text-anchor\",function(a,b){return r(a,b)<0?\"end\":\"start\"}).attr(\"y\",o.rangeBand()/(2*b.length)).attr(\"dy\",\".32em\").text(function(a,b){var c=C(r(a,b)),d=s(a,b);return void 0===d?c:d.length?c+\"+\"+C(Math.abs(d[1]))+\"-\"+C(Math.abs(d[0])):c+\"±\"+C(Math.abs(d))}),L.watchTransition(F,\"multibarhorizontal: bars\").select(\"text\").attr(\"x\",function(a,b){return r(a,b)<0?-4:p(r(a,b))-p(0)+4})):L.selectAll(\"text\").text(\"\"),y&&!w?(M.append(\"text\").classed(\"nv-bar-label\",!0),L.select(\"text.nv-bar-label\").attr(\"text-anchor\",function(a,b){return r(a,b)<0?\"start\":\"end\"}).attr(\"y\",o.rangeBand()/(2*b.length)).attr(\"dy\",\".32em\").text(function(a,b){return q(a,b)}),L.watchTransition(F,\"multibarhorizontal: bars\").select(\"text.nv-bar-label\").attr(\"x\",function(a,b){return r(a,b)<0?p(0)-p(r(a,b))+4:-4})):L.selectAll(\"text.nv-bar-label\").text(\"\"),L.attr(\"class\",function(a,b){return r(a,b)<0?\"nv-bar negative\":\"nv-bar positive\"}),v&&(c||(c=b.map(function(){return!0})),L.style(\"fill\",function(a,b,d){return d3.rgb(v(a,b)).darker(c.map(function(a,b){return b}).filter(function(a,b){return!c[b]})[d]).toString()}).style(\"stroke\",function(a,b,d){return d3.rgb(v(a,b)).darker(c.map(function(a,b){return b}).filter(function(a,b){return!c[b]})[d]).toString()})),w?L.watchTransition(F,\"multibarhorizontal: bars\").attr(\"transform\",function(a,b){return\"translate(\"+p(a.y1)+\",\"+o(q(a,b))+\")\"}).select(\"rect\").attr(\"width\",function(a,b){return Math.abs(p(r(a,b)+a.y0)-p(a.y0))||0}).attr(\"height\",o.rangeBand()):L.watchTransition(F,\"multibarhorizontal: bars\").attr(\"transform\",function(a,c){return\"translate(\"+p(r(a,c)<0?r(a,c):0)+\",\"+(a.series*o.rangeBand()/b.length+o(q(a,c)))+\")\"}).select(\"rect\").attr(\"height\",o.rangeBand()/b.length).attr(\"width\",function(a,b){return Math.max(Math.abs(p(r(a,b))-p(0)),1)||0}),h=o.copy(),i=p.copy()}),F.renderEnd(\"multibarHorizontal immediate\"),b}var c,d,e,f,g,h,i,j={top:0,right:0,bottom:0,left:0},k=960,l=500,m=Math.floor(1e4*Math.random()),n=null,o=d3.scale.ordinal(),p=d3.scale.linear(),q=function(a){return a.x},r=function(a){return a.y},s=function(a){return a.yErr},t=[0],u=a.utils.defaultColor(),v=null,w=!1,x=!1,y=!1,z=60,A=.1,B=.75,C=d3.format(\",.2f\"),D=250,E=d3.dispatch(\"chartClick\",\"elementClick\",\"elementDblClick\",\"elementMouseover\",\"elementMouseout\",\"elementMousemove\",\"renderEnd\"),F=a.utils.renderWatch(E,D);return b.dispatch=E,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return k},set:function(a){k=a}},height:{get:function(){return l},set:function(a){l=a}},x:{get:function(){return q},set:function(a){q=a}},y:{get:function(){return r},set:function(a){r=a}},yErr:{get:function(){return s},set:function(a){s=a}},xScale:{get:function(){return o},set:function(a){o=a}},yScale:{get:function(){return p},set:function(a){p=a}},xDomain:{get:function(){return d},set:function(a){d=a}},yDomain:{get:function(){return e},set:function(a){e=a}},xRange:{get:function(){return f},set:function(a){f=a}},yRange:{get:function(){return g},set:function(a){g=a}},forceY:{get:function(){return t},set:function(a){t=a}},stacked:{get:function(){return w},set:function(a){w=a}},showValues:{get:function(){return x},set:function(a){x=a}},disabled:{get:function(){return c},set:function(a){c=a}},id:{get:function(){return m},set:function(a){m=a}},valueFormat:{get:function(){return C},set:function(a){C=a}},valuePadding:{get:function(){return z},set:function(a){z=a}},groupSpacing:{get:function(){return A},set:function(a){A=a}},fillOpacity:{get:function(){return B},set:function(a){B=a}},margin:{get:function(){return j},set:function(a){j.top=void 0!==a.top?a.top:j.top,j.right=void 0!==a.right?a.right:j.right,j.bottom=void 0!==a.bottom?a.bottom:j.bottom,j.left=void 0!==a.left?a.left:j.left}},duration:{get:function(){return D},set:function(a){D=a,F.reset(D)}},color:{get:function(){return u},set:function(b){u=a.utils.getColor(b)}},barColor:{get:function(){return v},set:function(b){v=b?a.utils.getColor(b):null}}}),a.utils.initOptions(b),b},a.models.multiBarHorizontalChart=function(){\"use strict\";function b(j){return C.reset(),C.models(e),r&&C.models(f),s&&C.models(g),j.each(function(j){var w=d3.select(this);a.utils.initSVG(w);var C=a.utils.availableWidth(l,w,k),D=a.utils.availableHeight(m,w,k);if(b.update=function(){w.transition().duration(z).call(b)},b.container=this,t=e.stacked(),u.setter(B(j),b.update).getter(A(j)).update(),u.disabled=j.map(function(a){return!!a.disabled}),!v){var E;v={};for(E in u)u[E]instanceof Array?v[E]=u[E].slice(0):v[E]=u[E]}if(!(j&&j.length&&j.filter(function(a){return a.values.length}).length))return a.utils.noData(b,w),b;w.selectAll(\".nv-noData\").remove(),c=e.xScale(),d=e.yScale().clamp(!0);var F=w.selectAll(\"g.nv-wrap.nv-multiBarHorizontalChart\").data([j]),G=F.enter().append(\"g\").attr(\"class\",\"nvd3 nv-wrap nv-multiBarHorizontalChart\").append(\"g\"),H=F.select(\"g\");if(G.append(\"g\").attr(\"class\",\"nv-x nv-axis\"),G.append(\"g\").attr(\"class\",\"nv-y nv-axis\").append(\"g\").attr(\"class\",\"nv-zeroLine\").append(\"line\"),G.append(\"g\").attr(\"class\",\"nv-barsWrap\"),G.append(\"g\").attr(\"class\",\"nv-legendWrap\"),G.append(\"g\").attr(\"class\",\"nv-controlsWrap\"),q?(h.width(C-y()),H.select(\".nv-legendWrap\").datum(j).call(h),h.height()>k.top&&(k.top=h.height(),D=a.utils.availableHeight(m,w,k)),H.select(\".nv-legendWrap\").attr(\"transform\",\"translate(\"+y()+\",\"+-k.top+\")\")):H.select(\".nv-legendWrap\").selectAll(\"*\").remove(),o){var I=[{key:p.grouped||\"Grouped\",disabled:e.stacked()},{key:p.stacked||\"Stacked\",disabled:!e.stacked()}];i.width(y()).color([\"#444\",\"#444\",\"#444\"]),H.select(\".nv-controlsWrap\").datum(I).attr(\"transform\",\"translate(0,\"+-k.top+\")\").call(i)}else H.select(\".nv-controlsWrap\").selectAll(\"*\").remove();F.attr(\"transform\",\"translate(\"+k.left+\",\"+k.top+\")\"),e.disabled(j.map(function(a){return a.disabled})).width(C).height(D).color(j.map(function(a,b){return a.color||n(a,b)}).filter(function(a,b){return!j[b].disabled}));var J=H.select(\".nv-barsWrap\").datum(j.filter(function(a){return!a.disabled}));if(J.transition().call(e),r){f.scale(c)._ticks(a.utils.calcTicksY(D/24,j)).tickSize(-C,0),H.select(\".nv-x.nv-axis\").call(f);var K=H.select(\".nv-x.nv-axis\").selectAll(\"g\");K.selectAll(\"line, text\")}s&&(g.scale(d)._ticks(a.utils.calcTicksX(C/100,j)).tickSize(-D,0),H.select(\".nv-y.nv-axis\").attr(\"transform\",\"translate(0,\"+D+\")\"),H.select(\".nv-y.nv-axis\").call(g)),H.select(\".nv-zeroLine line\").attr(\"x1\",d(0)).attr(\"x2\",d(0)).attr(\"y1\",0).attr(\"y2\",-D),h.dispatch.on(\"stateChange\",function(a){for(var c in a)u[c]=a[c];x.stateChange(u),b.update()}),i.dispatch.on(\"legendClick\",function(a,c){if(a.disabled){switch(I=I.map(function(a){return a.disabled=!0,a}),a.disabled=!1,a.key){case\"Grouped\":case p.grouped:e.stacked(!1);break;case\"Stacked\":case p.stacked:e.stacked(!0)}u.stacked=e.stacked(),x.stateChange(u),t=e.stacked(),b.update()}}),x.on(\"changeState\",function(a){\"undefined\"!=typeof a.disabled&&(j.forEach(function(b,c){b.disabled=a.disabled[c]}),u.disabled=a.disabled),\"undefined\"!=typeof a.stacked&&(e.stacked(a.stacked),u.stacked=a.stacked,t=a.stacked),b.update()})}),C.renderEnd(\"multibar horizontal chart immediate\"),b}var c,d,e=a.models.multiBarHorizontal(),f=a.models.axis(),g=a.models.axis(),h=a.models.legend().height(30),i=a.models.legend().height(30),j=a.models.tooltip(),k={top:30,right:20,bottom:50,left:60},l=null,m=null,n=a.utils.defaultColor(),o=!0,p={},q=!0,r=!0,s=!0,t=!1,u=a.utils.state(),v=null,w=null,x=d3.dispatch(\"stateChange\",\"changeState\",\"renderEnd\"),y=function(){return o?180:0},z=250;u.stacked=!1,e.stacked(t),f.orient(\"left\").tickPadding(5).showMaxMin(!1).tickFormat(function(a){return a}),g.orient(\"bottom\").tickFormat(d3.format(\",.1f\")),j.duration(0).valueFormatter(function(a,b){return g.tickFormat()(a,b)}).headerFormatter(function(a,b){return f.tickFormat()(a,b)}),i.updateState(!1);var A=function(a){return function(){return{active:a.map(function(a){return!a.disabled}),stacked:t}}},B=function(a){return function(b){void 0!==b.stacked&&(t=b.stacked),void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}},C=a.utils.renderWatch(x,z);return e.dispatch.on(\"elementMouseover.tooltip\",function(a){a.value=b.x()(a.data),a.series={key:a.data.key,value:b.y()(a.data),color:a.color},j.data(a).hidden(!1)}),e.dispatch.on(\"elementMouseout.tooltip\",function(a){j.hidden(!0)}),e.dispatch.on(\"elementMousemove.tooltip\",function(a){j()}),b.dispatch=x,b.multibar=e,b.legend=h,b.controls=i,b.xAxis=f,b.yAxis=g,b.state=u,b.tooltip=j,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return l},set:function(a){l=a}},height:{get:function(){return m},set:function(a){m=a}},showLegend:{get:function(){return q},set:function(a){q=a}},showControls:{get:function(){return o},set:function(a){o=a}},controlLabels:{get:function(){return p},set:function(a){p=a}},showXAxis:{get:function(){return r},set:function(a){r=a}},showYAxis:{get:function(){return s},set:function(a){s=a}},defaultState:{get:function(){return v},set:function(a){v=a}},noData:{get:function(){return w},set:function(a){w=a}},margin:{get:function(){return k},set:function(a){k.top=void 0!==a.top?a.top:k.top,k.right=void 0!==a.right?a.right:k.right,k.bottom=void 0!==a.bottom?a.bottom:k.bottom,k.left=void 0!==a.left?a.left:k.left}},duration:{get:function(){return z},set:function(a){z=a,C.reset(z),e.duration(z),f.duration(z),g.duration(z)}},color:{get:function(){return n},set:function(b){n=a.utils.getColor(b),h.color(n)}},barColor:{get:function(){return e.barColor},set:function(a){e.barColor(a),h.color(function(a,b){return d3.rgb(\"#ccc\").darker(1.5*b).toString()})}}}),a.utils.inheritOptions(b,e),a.utils.initOptions(b),b},a.models.multiChart=function(){\"use strict\";function b(j){return j.each(function(j){function n(a){var b=2===j[a.seriesIndex].yAxis?E:D;a.value=a.point.x,a.series={value:a.point.y,color:a.point.color,key:a.series.key},G.duration(0).headerFormatter(function(a,b){return C.tickFormat()(a,b)}).valueFormatter(function(a,c){return b.tickFormat()(a,c)}).data(a).hidden(!1)}function H(a){var b=2===j[a.seriesIndex].yAxis?E:D;a.value=a.point.x,a.series={value:a.point.y,color:a.point.color,key:a.series.key},G.duration(100).headerFormatter(function(a,b){return C.tickFormat()(a,b)}).valueFormatter(function(a,c){return b.tickFormat()(a,c)}).data(a).hidden(!1)}function J(a){var b=2===j[a.seriesIndex].yAxis?E:D;a.point.x=A.x()(a.point),a.point.y=A.y()(a.point),G.duration(0).headerFormatter(function(a,b){return C.tickFormat()(a,b)}).valueFormatter(function(a,c){return b.tickFormat()(a,c)}).data(a).hidden(!1)}function K(a){var b=2===j[a.data.series].yAxis?E:D;a.value=y.x()(a.data),a.series={value:y.y()(a.data),color:a.color,key:a.data.key},G.duration(0).headerFormatter(function(a,b){return C.tickFormat()(a,b)}).valueFormatter(function(a,c){return b.tickFormat()(a,c)}).data(a).hidden(!1)}function L(){for(var a=0,b=I.length;b>a;a++){var c=I[a];try{c.clearHighlights()}catch(d){}}}function M(a,b,c){for(var d=0,e=I.length;e>d;d++){var f=I[d];try{f.highlightPoint(a,b,c)}catch(g){}}}var N=d3.select(this);a.utils.initSVG(N),b.update=function(){N.transition().call(b)},b.container=this;var O=a.utils.availableWidth(g,N,e),P=a.utils.availableHeight(h,N,e),Q=j.filter(function(a){return\"line\"==a.type&&1==a.yAxis}),R=j.filter(function(a){return\"line\"==a.type&&2==a.yAxis}),S=j.filter(function(a){return\"scatter\"==a.type&&1==a.yAxis}),T=j.filter(function(a){return\"scatter\"==a.type&&2==a.yAxis}),U=j.filter(function(a){return\"bar\"==a.type&&1==a.yAxis}),V=j.filter(function(a){return\"bar\"==a.type&&2==a.yAxis}),W=j.filter(function(a){return\"area\"==a.type&&1==a.yAxis}),X=j.filter(function(a){return\"area\"==a.type&&2==a.yAxis});if(!(j&&j.length&&j.filter(function(a){return a.values.length}).length))return a.utils.noData(b,N),b;N.selectAll(\".nv-noData\").remove();var Y=j.filter(function(a){return!a.disabled&&1==a.yAxis}).map(function(a){return a.values.map(function(a,b){return{x:k(a),y:l(a)}})}),Z=j.filter(function(a){return!a.disabled&&2==a.yAxis}).map(function(a){return a.values.map(function(a,b){return{x:k(a),y:l(a)}})});r.domain(d3.extent(d3.merge(Y.concat(Z)),function(a){return a.x})).range([0,O]);var $=N.selectAll(\"g.wrap.multiChart\").data([j]),_=$.enter().append(\"g\").attr(\"class\",\"wrap nvd3 multiChart\").append(\"g\");_.append(\"g\").attr(\"class\",\"nv-x nv-axis\"),_.append(\"g\").attr(\"class\",\"nv-y1 nv-axis\"),_.append(\"g\").attr(\"class\",\"nv-y2 nv-axis\"),_.append(\"g\").attr(\"class\",\"stack1Wrap\"),_.append(\"g\").attr(\"class\",\"stack2Wrap\"),_.append(\"g\").attr(\"class\",\"bars1Wrap\"),_.append(\"g\").attr(\"class\",\"bars2Wrap\"),_.append(\"g\").attr(\"class\",\"scatters1Wrap\"),_.append(\"g\").attr(\"class\",\"scatters2Wrap\"),_.append(\"g\").attr(\"class\",\"lines1Wrap\"),_.append(\"g\").attr(\"class\",\"lines2Wrap\"),_.append(\"g\").attr(\"class\",\"legendWrap\"),_.append(\"g\").attr(\"class\",\"nv-interactive\");var aa=$.select(\"g\"),ba=j.map(function(a,b){return j[b].color||f(a,b)});if(i){var ca=F.align()?O/2:O,da=F.align()?ca:0;F.width(ca),F.color(ba),aa.select(\".legendWrap\").datum(j.map(function(a){return a.originalKey=void 0===a.originalKey?a.key:a.originalKey,a.key=a.originalKey+(1==a.yAxis?\"\":q),a})).call(F),F.height()>e.top&&(e.top=F.height(),P=a.utils.availableHeight(h,N,e)),aa.select(\".legendWrap\").attr(\"transform\",\"translate(\"+da+\",\"+-e.top+\")\")}else aa.select(\".legendWrap\").selectAll(\"*\").remove();u.width(O).height(P).interpolate(m).color(ba.filter(function(a,b){return!j[b].disabled&&1==j[b].yAxis&&\"line\"==j[b].type})),v.width(O).height(P).interpolate(m).color(ba.filter(function(a,b){return!j[b].disabled&&2==j[b].yAxis&&\"line\"==j[b].type})),w.width(O).height(P).color(ba.filter(function(a,b){return!j[b].disabled&&1==j[b].yAxis&&\"scatter\"==j[b].type})),x.width(O).height(P).color(ba.filter(function(a,b){return!j[b].disabled&&2==j[b].yAxis&&\"scatter\"==j[b].type})),y.width(O).height(P).color(ba.filter(function(a,b){return!j[b].disabled&&1==j[b].yAxis&&\"bar\"==j[b].type})),z.width(O).height(P).color(ba.filter(function(a,b){return!j[b].disabled&&2==j[b].yAxis&&\"bar\"==j[b].type})),A.width(O).height(P).interpolate(m).color(ba.filter(function(a,b){return!j[b].disabled&&1==j[b].yAxis&&\"area\"==j[b].type})),B.width(O).height(P).interpolate(m).color(ba.filter(function(a,b){return!j[b].disabled&&2==j[b].yAxis&&\"area\"==j[b].type})),aa.attr(\"transform\",\"translate(\"+e.left+\",\"+e.top+\")\");var ea=aa.select(\".lines1Wrap\").datum(Q.filter(function(a){return!a.disabled})),fa=aa.select(\".scatters1Wrap\").datum(S.filter(function(a){return!a.disabled})),ga=aa.select(\".bars1Wrap\").datum(U.filter(function(a){return!a.disabled})),ha=aa.select(\".stack1Wrap\").datum(W.filter(function(a){return!a.disabled})),ia=aa.select(\".lines2Wrap\").datum(R.filter(function(a){return!a.disabled})),ja=aa.select(\".scatters2Wrap\").datum(T.filter(function(a){return!a.disabled})),ka=aa.select(\".bars2Wrap\").datum(V.filter(function(a){return!a.disabled})),la=aa.select(\".stack2Wrap\").datum(X.filter(function(a){return!a.disabled})),ma=W.length?W.map(function(a){return a.values}).reduce(function(a,b){return a.map(function(a,c){return{x:a.x,y:a.y+b[c].y}})}).concat([{x:0,y:0}]):[],na=X.length?X.map(function(a){return a.values}).reduce(function(a,b){return a.map(function(a,c){return{x:a.x,y:a.y+b[c].y}})}).concat([{x:0,y:0}]):[];s.domain(c||d3.extent(d3.merge(Y).concat(ma),function(a){return a.y})).range([0,P]),t.domain(d||d3.extent(d3.merge(Z).concat(na),function(a){return a.y})).range([0,P]),u.yDomain(s.domain()),w.yDomain(s.domain()),y.yDomain(s.domain()),A.yDomain(s.domain()),v.yDomain(t.domain()),x.yDomain(t.domain()),z.yDomain(t.domain()),B.yDomain(t.domain()),W.length&&d3.transition(ha).call(A),X.length&&d3.transition(la).call(B),U.length&&d3.transition(ga).call(y),V.length&&d3.transition(ka).call(z),Q.length&&d3.transition(ea).call(u),R.length&&d3.transition(ia).call(v),S.length&&d3.transition(fa).call(w),T.length&&d3.transition(ja).call(x),C._ticks(a.utils.calcTicksX(O/100,j)).tickSize(-P,0),aa.select(\".nv-x.nv-axis\").attr(\"transform\",\"translate(0,\"+P+\")\"),d3.transition(aa.select(\".nv-x.nv-axis\")).call(C),D._ticks(a.utils.calcTicksY(P/36,j)).tickSize(-O,0),d3.transition(aa.select(\".nv-y1.nv-axis\")).call(D),E._ticks(a.utils.calcTicksY(P/36,j)).tickSize(-O,0),d3.transition(aa.select(\".nv-y2.nv-axis\")).call(E),aa.select(\".nv-y1.nv-axis\").classed(\"nv-disabled\",Y.length?!1:!0).attr(\"transform\",\"translate(\"+r.range()[0]+\",0)\"),aa.select(\".nv-y2.nv-axis\").classed(\"nv-disabled\",Z.length?!1:!0).attr(\"transform\",\"translate(\"+r.range()[1]+\",0)\"),F.dispatch.on(\"stateChange\",function(a){b.update()}),p&&(o.width(O).height(P).margin({left:e.left,top:e.top}).svgContainer(N).xScale(r),$.select(\".nv-interactive\").call(o)),p?(o.dispatch.on(\"elementMousemove\",function(c){L();var d,e,g,h=[];j.filter(function(a,b){return a.seriesIndex=b,!a.disabled}).forEach(function(i,j){var k=r.domain(),l=i.values.filter(function(a,c){return b.x()(a,c)>=k[0]&&b.x()(a,c)<=k[1]});e=a.interactiveBisect(l,c.pointXValue,b.x());var m=l[e],n=b.y()(m,e);null!==n&&M(j,e,!0),void 0!==m&&(void 0===d&&(d=m),void 0===g&&(g=r(b.x()(m,e))),h.push({key:i.key,value:n,color:f(i,i.seriesIndex),data:m,yAxis:2==i.yAxis?E:D}))});var i=function(a,b){var c=h[b].yAxis;return null==a?\"N/A\":c.tickFormat()(a)};o.tooltip.headerFormatter(function(a,b){return C.tickFormat()(a,b)}).valueFormatter(o.tooltip.valueFormatter()||i).data({value:b.x()(d,e),index:e,series:h})(),o.renderGuideLine(g)}),o.dispatch.on(\"elementMouseout\",function(a){L()})):(u.dispatch.on(\"elementMouseover.tooltip\",n),v.dispatch.on(\"elementMouseover.tooltip\",n),u.dispatch.on(\"elementMouseout.tooltip\",function(a){G.hidden(!0)}),v.dispatch.on(\"elementMouseout.tooltip\",function(a){G.hidden(!0)}),w.dispatch.on(\"elementMouseover.tooltip\",H),x.dispatch.on(\"elementMouseover.tooltip\",H),w.dispatch.on(\"elementMouseout.tooltip\",function(a){G.hidden(!0)}),x.dispatch.on(\"elementMouseout.tooltip\",function(a){G.hidden(!0)}),A.dispatch.on(\"elementMouseover.tooltip\",J),B.dispatch.on(\"elementMouseover.tooltip\",J),A.dispatch.on(\"elementMouseout.tooltip\",function(a){G.hidden(!0)}),B.dispatch.on(\"elementMouseout.tooltip\",function(a){G.hidden(!0)}),y.dispatch.on(\"elementMouseover.tooltip\",K),z.dispatch.on(\"elementMouseover.tooltip\",K),y.dispatch.on(\"elementMouseout.tooltip\",function(a){G.hidden(!0)}),z.dispatch.on(\"elementMouseout.tooltip\",function(a){G.hidden(!0)}),y.dispatch.on(\"elementMousemove.tooltip\",function(a){G()}),z.dispatch.on(\"elementMousemove.tooltip\",function(a){G()}))}),b}var c,d,e={top:30,right:20,bottom:50,left:60},f=a.utils.defaultColor(),g=null,h=null,i=!0,j=null,k=function(a){return a.x},l=function(a){return a.y},m=\"linear\",n=!0,o=a.interactiveGuideline(),p=!1,q=\" (right axis)\",r=d3.scale.linear(),s=d3.scale.linear(),t=d3.scale.linear(),u=a.models.line().yScale(s),v=a.models.line().yScale(t),w=a.models.scatter().yScale(s),x=a.models.scatter().yScale(t),y=a.models.multiBar().stacked(!1).yScale(s),z=a.models.multiBar().stacked(!1).yScale(t),A=a.models.stackedArea().yScale(s),B=a.models.stackedArea().yScale(t),C=a.models.axis().scale(r).orient(\"bottom\").tickPadding(5),D=a.models.axis().scale(s).orient(\"left\"),E=a.models.axis().scale(t).orient(\"right\"),F=a.models.legend().height(30),G=a.models.tooltip(),H=d3.dispatch(),I=[u,v,w,x,y,z,A,B];return b.dispatch=H,b.legend=F,b.lines1=u,b.lines2=v,b.scatters1=w,b.scatters2=x,b.bars1=y,b.bars2=z,b.stack1=A,b.stack2=B,b.xAxis=C,b.yAxis1=D,b.yAxis2=E,b.tooltip=G,b.interactiveLayer=o,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return g},set:function(a){g=a}},height:{get:function(){return h},set:function(a){h=a}},showLegend:{get:function(){return i},set:function(a){i=a}},yDomain1:{get:function(){return c},set:function(a){c=a}},yDomain2:{get:function(){return d},set:function(a){d=a}},noData:{get:function(){return j},set:function(a){j=a}},interpolate:{get:function(){return m},set:function(a){m=a}},legendRightAxisHint:{get:function(){return q},set:function(a){q=a}},margin:{get:function(){return e},set:function(a){e.top=void 0!==a.top?a.top:e.top,e.right=void 0!==a.right?a.right:e.right,e.bottom=void 0!==a.bottom?a.bottom:e.bottom,e.left=void 0!==a.left?a.left:e.left}},color:{get:function(){return f},set:function(b){f=a.utils.getColor(b)}},x:{get:function(){return k},set:function(a){k=a,u.x(a),v.x(a),w.x(a),x.x(a),y.x(a),z.x(a),A.x(a),B.x(a)}},y:{get:function(){return l},set:function(a){l=a,u.y(a),v.y(a),w.y(a),x.y(a),A.y(a),B.y(a),y.y(a),z.y(a)}},useVoronoi:{get:function(){return n},set:function(a){n=a,u.useVoronoi(a),v.useVoronoi(a),A.useVoronoi(a),B.useVoronoi(a)}},useInteractiveGuideline:{get:function(){return p},set:function(a){p=a,p&&(u.interactive(!1),u.useVoronoi(!1),v.interactive(!1),v.useVoronoi(!1),A.interactive(!1),A.useVoronoi(!1),B.interactive(!1),B.useVoronoi(!1),w.interactive(!1),x.interactive(!1))}}}),a.utils.initOptions(b),b},a.models.ohlcBar=function(){\"use strict\";function b(y){return y.each(function(b){k=d3.select(this);var y=a.utils.availableWidth(h,k,g),A=a.utils.availableHeight(i,k,g);a.utils.initSVG(k);var B=y/b[0].values.length*.9;l.domain(c||d3.extent(b[0].values.map(n).concat(t))),v?l.range(e||[.5*y/b[0].values.length,y*(b[0].values.length-.5)/b[0].values.length]):l.range(e||[5+B/2,y-B/2-5]),m.domain(d||[d3.min(b[0].values.map(s).concat(u)),d3.max(b[0].values.map(r).concat(u))]).range(f||[A,0]),l.domain()[0]===l.domain()[1]&&(l.domain()[0]?l.domain([l.domain()[0]-.01*l.domain()[0],l.domain()[1]+.01*l.domain()[1]]):l.domain([-1,1])),m.domain()[0]===m.domain()[1]&&(m.domain()[0]?m.domain([m.domain()[0]+.01*m.domain()[0],m.domain()[1]-.01*m.domain()[1]]):m.domain([-1,1]));var C=d3.select(this).selectAll(\"g.nv-wrap.nv-ohlcBar\").data([b[0].values]),D=C.enter().append(\"g\").attr(\"class\",\"nvd3 nv-wrap nv-ohlcBar\"),E=D.append(\"defs\"),F=D.append(\"g\"),G=C.select(\"g\");F.append(\"g\").attr(\"class\",\"nv-ticks\"),C.attr(\"transform\",\"translate(\"+g.left+\",\"+g.top+\")\"),k.on(\"click\",function(a,b){z.chartClick({data:a,index:b,pos:d3.event,id:j})}),E.append(\"clipPath\").attr(\"id\",\"nv-chart-clip-path-\"+j).append(\"rect\"),C.select(\"#nv-chart-clip-path-\"+j+\" rect\").attr(\"width\",y).attr(\"height\",A),G.attr(\"clip-path\",w?\"url(#nv-chart-clip-path-\"+j+\")\":\"\");var H=C.select(\".nv-ticks\").selectAll(\".nv-tick\").data(function(a){return a});H.exit().remove(),H.enter().append(\"path\").attr(\"class\",function(a,b,c){return(p(a,b)>q(a,b)?\"nv-tick negative\":\"nv-tick positive\")+\" nv-tick-\"+c+\"-\"+b}).attr(\"d\",function(a,b){return\"m0,0l0,\"+(m(p(a,b))-m(r(a,b)))+\"l\"+-B/2+\",0l\"+B/2+\",0l0,\"+(m(s(a,b))-m(p(a,b)))+\"l0,\"+(m(q(a,b))-m(s(a,b)))+\"l\"+B/2+\",0l\"+-B/2+\",0z\"}).attr(\"transform\",function(a,b){return\"translate(\"+l(n(a,b))+\",\"+m(r(a,b))+\")\"}).attr(\"fill\",function(a,b){return x[0]}).attr(\"stroke\",function(a,b){return x[0]}).attr(\"x\",0).attr(\"y\",function(a,b){return m(Math.max(0,o(a,b)))}).attr(\"height\",function(a,b){return Math.abs(m(o(a,b))-m(0))}),H.attr(\"class\",function(a,b,c){return(p(a,b)>q(a,b)?\"nv-tick negative\":\"nv-tick positive\")+\" nv-tick-\"+c+\"-\"+b}),d3.transition(H).attr(\"transform\",function(a,b){return\"translate(\"+l(n(a,b))+\",\"+m(r(a,b))+\")\"}).attr(\"d\",function(a,c){var d=y/b[0].values.length*.9;return\"m0,0l0,\"+(m(p(a,c))-m(r(a,c)))+\"l\"+-d/2+\",0l\"+d/2+\",0l0,\"+(m(s(a,c))-m(p(a,c)))+\"l0,\"+(m(q(a,c))-m(s(a,c)))+\"l\"+d/2+\",0l\"+-d/2+\",0z\"})}),b}var c,d,e,f,g={top:0,right:0,bottom:0,left:0},h=null,i=null,j=Math.floor(1e4*Math.random()),k=null,l=d3.scale.linear(),m=d3.scale.linear(),n=function(a){return a.x},o=function(a){return a.y},p=function(a){return a.open},q=function(a){return a.close},r=function(a){return a.high},s=function(a){return a.low},t=[],u=[],v=!1,w=!0,x=a.utils.defaultColor(),y=!1,z=d3.dispatch(\"stateChange\",\"changeState\",\"renderEnd\",\"chartClick\",\"elementClick\",\"elementDblClick\",\"elementMouseover\",\"elementMouseout\",\"elementMousemove\");return b.highlightPoint=function(a,c){b.clearHighlights(),k.select(\".nv-ohlcBar .nv-tick-0-\"+a).classed(\"hover\",c)},b.clearHighlights=function(){k.select(\".nv-ohlcBar .nv-tick.hover\").classed(\"hover\",!1)},b.dispatch=z,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return h},set:function(a){h=a}},height:{get:function(){return i},set:function(a){i=a}},xScale:{get:function(){return l},set:function(a){l=a}},yScale:{get:function(){return m},set:function(a){m=a}},xDomain:{get:function(){return c},set:function(a){c=a}},yDomain:{get:function(){return d},set:function(a){d=a}},xRange:{get:function(){return e},set:function(a){e=a}},yRange:{get:function(){return f},set:function(a){f=a}},forceX:{get:function(){return t},set:function(a){t=a}},forceY:{get:function(){return u},set:function(a){u=a}},padData:{get:function(){return v},set:function(a){v=a}},clipEdge:{get:function(){return w},set:function(a){w=a}},id:{get:function(){return j},set:function(a){j=a}},interactive:{get:function(){return y},set:function(a){y=a}},x:{get:function(){return n},set:function(a){n=a}},y:{get:function(){return o},set:function(a){o=a}},open:{get:function(){return p()},set:function(a){p=a}},close:{get:function(){return q()},set:function(a){q=a}},high:{get:function(){return r},set:function(a){r=a}},low:{get:function(){return s},set:function(a){s=a}},margin:{get:function(){return g},set:function(a){g.top=void 0!=a.top?a.top:g.top,g.right=void 0!=a.right?a.right:g.right,g.bottom=void 0!=a.bottom?a.bottom:g.bottom,g.left=void 0!=a.left?a.left:g.left}},color:{get:function(){return x},set:function(b){x=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.parallelCoordinates=function(){\"use strict\";function b(B){return A.reset(),B.each(function(b){function A(a){return x(o.map(function(b){if(isNaN(a.values[b.key])||isNaN(parseFloat(a.values[b.key]))||O){var c=l[b.key].domain(),d=l[b.key].range(),e=c[0]-(c[1]-c[0])/9;if(v.indexOf(b.key)<0){var f=d3.scale.linear().domain([e,c[1]]).range([j-12,d[1]]);l[b.key].brush.y(f),v.push(b.key)}if(isNaN(a.values[b.key])||isNaN(parseFloat(a.values[b.key])))return[k(b.key),l[b.key](e)]}return void 0!==U&&(v.length>0||O?(U.style(\"display\",\"inline\"),V.style(\"display\",\"inline\")):(U.style(\"display\",\"none\"),V.style(\"display\",\"none\"))),[k(b.key),l[b.key](a.values[b.key])]}))}function B(a){s.forEach(function(b){var c=l[b.dimension].brush.y().domain();b.hasOnlyNaN&&(b.extent[1]=(l[b.dimension].domain()[1]-c[0])*(b.extent[1]-b.extent[0])/(N[b.dimension]-b.extent[0])+c[0]),b.hasNaN&&(b.extent[0]=c[0]),a&&l[b.dimension].brush.extent(b.extent)}),e.select(\".nv-brushBackground\").each(function(a){d3.select(this).call(l[a.key].brush)}).selectAll(\"rect\").attr(\"x\",-8).attr(\"width\",16),F()}function C(){q===!1&&(q=!0,B(!0))}function D(){$=p.filter(function(a){return!l[a].brush.empty()}),_=$.map(function(a){return l[a].brush.extent()}),s=[],$.forEach(function(a,b){s[b]={dimension:a,extent:_[b],hasNaN:!1,hasOnlyNaN:!1}}),t=[],c.style(\"display\",function(a){var b=$.every(function(b,c){return(isNaN(a.values[b])||isNaN(parseFloat(a.values[b])))&&_[c][0]==l[b].brush.y().domain()[0]?!0:_[c][0]<=a.values[b]&&a.values[b]<=_[c][1]&&!isNaN(parseFloat(a.values[b]))});return b&&t.push(a),b?null:\"none\"}),F(),z.brush({filters:s,active:t})}function E(){var a=$.length>0?!0:!1;s.forEach(function(a){a.extent[0]===l[a.dimension].brush.y().domain()[0]&&v.indexOf(a.dimension)>=0&&(a.hasNaN=!0),a.extent[1]<l[a.dimension].domain()[0]&&(a.hasOnlyNaN=!0)}),z.brushEnd(t,a)}function F(){e.select(\".nv-axis\").each(function(a,b){var c=s.filter(function(b){return b.dimension==a.key});P[a.key]=l[a.key].domain(),0!=c.length&&q&&(P[a.key]=[],c[0].extent[1]>l[a.key].domain()[0]&&(P[a.key]=[c[0].extent[1]]),c[0].extent[0]>=l[a.key].domain()[0]&&P[a.key].push(c[0].extent[0])),d3.select(this).call(y.scale(l[a.key]).tickFormat(a.format).tickValues(P[a.key]))})}function G(a){u[a.key]=this.parentNode.__origin__=k(a.key),d.attr(\"visibility\",\"hidden\")}function H(a){u[a.key]=Math.min(i,Math.max(0,this.parentNode.__origin__+=d3.event.x)),c.attr(\"d\",A),o.sort(function(a,b){return J(a.key)-J(b.key)}),o.forEach(function(a,b){return a.currentPosition=b}),k.domain(o.map(function(a){return a.key})),e.attr(\"transform\",function(a){return\"translate(\"+J(a.key)+\")\"})}function I(a,b){delete this.parentNode.__origin__,delete u[a.key],d3.select(this.parentNode).attr(\"transform\",\"translate(\"+k(a.key)+\")\"),c.attr(\"d\",A),d.attr(\"d\",A).attr(\"visibility\",null),z.dimensionsOrder(o)}function J(a){var b=u[a];return null==b?k(a):b}var K=d3.select(this);if(i=a.utils.availableWidth(g,K,f),j=a.utils.availableHeight(h,K,f),a.utils.initSVG(K),void 0===b[0].values){var L=[];b.forEach(function(a){var b={},c=Object.keys(a);c.forEach(function(c){\"name\"!==c&&(b[c]=a[c])}),L.push({key:a.name,values:b})}),b=L}var M=b.map(function(a){return a.values});0===t.length&&(t=b),p=n.sort(function(a,b){return a.currentPosition-b.currentPosition}).map(function(a){return a.key}),o=n.filter(function(a){return!a.disabled}),k.rangePoints([0,i],1).domain(o.map(function(a){return a.key}));var N={},O=!1,P=[];p.forEach(function(a){var b=d3.extent(M,function(b){return+b[a]}),c=b[0],d=b[1],e=!1;(isNaN(c)||isNaN(d))&&(e=!0,c=0,d=0),c===d&&(c-=1,d+=1);var f=s.filter(function(b){return b.dimension==a});0!==f.length&&(e?(c=l[a].domain()[0],d=l[a].domain()[1]):!f[0].hasOnlyNaN&&q?(c=c>f[0].extent[0]?f[0].extent[0]:c,d=d<f[0].extent[1]?f[0].extent[1]:d):f[0].hasNaN&&(d=d<f[0].extent[1]?f[0].extent[1]:d,N[a]=l[a].domain()[1],O=!0)),l[a]=d3.scale.linear().domain([c,d]).range([.9*(j-12),0]),v=[],l[a].brush=d3.svg.brush().y(l[a]).on(\"brushstart\",C).on(\"brush\",D).on(\"brushend\",E)});var Q=K.selectAll(\"g.nv-wrap.nv-parallelCoordinates\").data([b]),R=Q.enter().append(\"g\").attr(\"class\",\"nvd3 nv-wrap nv-parallelCoordinates\"),S=R.append(\"g\"),T=Q.select(\"g\");S.append(\"g\").attr(\"class\",\"nv-parallelCoordinates background\"),S.append(\"g\").attr(\"class\",\"nv-parallelCoordinates foreground\"),S.append(\"g\").attr(\"class\",\"nv-parallelCoordinates missingValuesline\"),Q.attr(\"transform\",\"translate(\"+f.left+\",\"+f.top+\")\"),x.interpolate(\"cardinal\").tension(w),y.orient(\"left\");var U,V,W=d3.behavior.drag().on(\"dragstart\",G).on(\"drag\",H).on(\"dragend\",I),X=k.range()[1]-k.range()[0];if(!isNaN(X)){var Y=[0+X/2,j-12,i-X/2,j-12];U=Q.select(\".missingValuesline\").selectAll(\"line\").data([Y]),U.enter().append(\"line\"),U.exit().remove(),U.attr(\"x1\",function(a){return a[0]}).attr(\"y1\",function(a){return a[1]}).attr(\"x2\",function(a){return a[2]}).attr(\"y2\",function(a){return a[3]}),V=Q.select(\".missingValuesline\").selectAll(\"text\").data([m]),V.append(\"text\").data([m]),V.enter().append(\"text\"),V.exit().remove(),V.attr(\"y\",j).attr(\"x\",i-92-X/2).text(function(a){return a})}d=Q.select(\".background\").selectAll(\"path\").data(b),d.enter().append(\"path\"),d.exit().remove(),d.attr(\"d\",A),c=Q.select(\".foreground\").selectAll(\"path\").data(b),c.enter().append(\"path\"),c.exit().remove(),c.attr(\"d\",A).style(\"stroke-width\",function(a,b){return isNaN(a.strokeWidth)&&(a.strokeWidth=1),a.strokeWidth}).attr(\"stroke\",function(a,b){return a.color||r(a,b)}),c.on(\"mouseover\",function(a,b){d3.select(this).classed(\"hover\",!0).style(\"stroke-width\",a.strokeWidth+2+\"px\").style(\"stroke-opacity\",1),z.elementMouseover({label:a.name,color:a.color||r(a,b),values:a.values,dimensions:o})}),c.on(\"mouseout\",function(a,b){d3.select(this).classed(\"hover\",!1).style(\"stroke-width\",a.strokeWidth+\"px\").style(\"stroke-opacity\",.7),z.elementMouseout({label:a.name,index:b})}),c.on(\"mousemove\",function(a,b){z.elementMousemove()}),c.on(\"click\",function(a){z.elementClick({id:a.id})}),e=T.selectAll(\".dimension\").data(o);var Z=e.enter().append(\"g\").attr(\"class\",\"nv-parallelCoordinates dimension\");e.attr(\"transform\",function(a){return\"translate(\"+k(a.key)+\",0)\"}),Z.append(\"g\").attr(\"class\",\"nv-axis\"),Z.append(\"text\").attr(\"class\",\"nv-label\").style(\"cursor\",\"move\").attr(\"dy\",\"-1em\").attr(\"text-anchor\",\"middle\").on(\"mouseover\",function(a,b){z.elementMouseover({label:a.tooltip||a.key,color:a.color})}).on(\"mouseout\",function(a,b){z.elementMouseout({label:a.tooltip})}).on(\"mousemove\",function(a,b){z.elementMousemove()}).call(W),Z.append(\"g\").attr(\"class\",\"nv-brushBackground\"),e.exit().remove(),e.select(\".nv-label\").text(function(a){return a.key}),B(q);var $=p.filter(function(a){return!l[a].brush.empty()}),_=$.map(function(a){return l[a].brush.extent()}),aa=t.slice(0);t=[],c.style(\"display\",function(a){var b=$.every(function(b,c){return(isNaN(a.values[b])||isNaN(parseFloat(a.values[b])))&&_[c][0]==l[b].brush.y().domain()[0]?!0:_[c][0]<=a.values[b]&&a.values[b]<=_[c][1]&&!isNaN(parseFloat(a.values[b]))});return b&&t.push(a),b?null:\"none\"}),(s.length>0||!a.utils.arrayEquals(t,aa))&&z.activeChanged(t)}),b}var c,d,e,f={top:30,right:0,bottom:10,left:0},g=null,h=null,i=null,j=null,k=d3.scale.ordinal(),l={},m=\"undefined values\",n=[],o=[],p=[],q=!0,r=a.utils.defaultColor(),s=[],t=[],u=[],v=[],w=1,x=d3.svg.line(),y=d3.svg.axis(),z=d3.dispatch(\"brushstart\",\"brush\",\"brushEnd\",\"dimensionsOrder\",\"stateChange\",\"elementClick\",\"elementMouseover\",\"elementMouseout\",\"elementMousemove\",\"renderEnd\",\"activeChanged\"),A=a.utils.renderWatch(z);return b.dispatch=z,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return g},set:function(a){g=a}},height:{get:function(){return h},set:function(a){h=a}},dimensionData:{get:function(){return n},set:function(a){n=a}},displayBrush:{get:function(){return q},set:function(a){q=a}},filters:{get:function(){return s},set:function(a){s=a}},active:{get:function(){return t},set:function(a){t=a}},lineTension:{get:function(){return w},set:function(a){w=a}},undefinedValuesLabel:{get:function(){return m},set:function(a){m=a}},dimensions:{get:function(){return n.map(function(a){return a.key})},set:function(b){a.deprecated(\"dimensions\",\"use dimensionData instead\"),0===n.length?b.forEach(function(a){n.push({key:a})}):b.forEach(function(a,b){n[b].key=a})}},dimensionNames:{get:function(){return n.map(function(a){return a.key})},set:function(b){a.deprecated(\"dimensionNames\",\"use dimensionData instead\"),p=[],0===n.length?b.forEach(function(a){n.push({key:a})}):b.forEach(function(a,b){n[b].key=a})}},dimensionFormats:{get:function(){return n.map(function(a){return a.format})},set:function(b){a.deprecated(\"dimensionFormats\",\"use dimensionData instead\"),0===n.length?b.forEach(function(a){n.push({format:a})}):b.forEach(function(a,b){n[b].format=a})}},margin:{get:function(){return f},set:function(a){f.top=void 0!==a.top?a.top:f.top,f.right=void 0!==a.right?a.right:f.right,f.bottom=void 0!==a.bottom?a.bottom:f.bottom,f.left=void 0!==a.left?a.left:f.left}},color:{get:function(){return r},set:function(b){r=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.parallelCoordinatesChart=function(){\"use strict\";function b(e){return r.reset(),r.models(c),e.each(function(e){var j=d3.select(this);a.utils.initSVG(j);var o=a.utils.availableWidth(g,j,f),p=a.utils.availableHeight(h,j,f);if(b.update=function(){j.call(b)},b.container=this,k.setter(t(l),b.update).getter(s(l)).update(),k.disabled=l.map(function(a){return!!a.disabled}),l=l.map(function(a){return a.disabled=!!a.disabled,a}),l.forEach(function(a,b){a.originalPosition=isNaN(a.originalPosition)?b:a.originalPosition,a.currentPosition=isNaN(a.currentPosition)?b:a.currentPosition}),!n){var r;n={};for(r in k)k[r]instanceof Array?n[r]=k[r].slice(0):n[r]=k[r]}if(!e||!e.length)return a.utils.noData(b,j),b;j.selectAll(\".nv-noData\").remove();var u=j.selectAll(\"g.nv-wrap.nv-parallelCoordinatesChart\").data([e]),v=u.enter().append(\"g\").attr(\"class\",\"nvd3 nv-wrap nv-parallelCoordinatesChart\").append(\"g\"),w=u.select(\"g\");v.append(\"g\").attr(\"class\",\"nv-parallelCoordinatesWrap\"),v.append(\"g\").attr(\"class\",\"nv-legendWrap\"),w.select(\"rect\").attr(\"width\",o).attr(\"height\",p>0?p:0),i?(d.width(o).color(function(a){return\"rgb(188,190,192)\"}),w.select(\".nv-legendWrap\").datum(l.sort(function(a,b){return a.originalPosition-b.originalPosition})).call(d),d.height()>f.top&&(f.top=d.height(),p=a.utils.availableHeight(h,j,f)),u.select(\".nv-legendWrap\").attr(\"transform\",\"translate( 0 ,\"+-f.top+\")\")):w.select(\".nv-legendWrap\").selectAll(\"*\").remove(),u.attr(\"transform\",\"translate(\"+f.left+\",\"+f.top+\")\"),c.width(o).height(p).dimensionData(l).displayBrush(m);var x=w.select(\".nv-parallelCoordinatesWrap \").datum(e);x.transition().call(c),c.dispatch.on(\"brushEnd\",function(a,b){b?(m=!0,q.brushEnd(a)):m=!1}),d.dispatch.on(\"stateChange\",function(a){for(var c in a)k[c]=a[c];q.stateChange(k),b.update()}),c.dispatch.on(\"dimensionsOrder\",function(a){l.sort(function(a,b){return a.currentPosition-b.currentPosition});var b=!1;l.forEach(function(a,c){a.currentPosition=c,a.currentPosition!==a.originalPosition&&(b=!0)}),q.dimensionsOrder(l,b)}),q.on(\"changeState\",function(a){\"undefined\"!=typeof a.disabled&&(l.forEach(function(b,c){b.disabled=a.disabled[c]}),k.disabled=a.disabled),b.update()})}),r.renderEnd(\"parraleleCoordinateChart immediate\"),b}var c=a.models.parallelCoordinates(),d=a.models.legend(),e=a.models.tooltip(),f=(a.models.tooltip(),{top:0,right:0,bottom:0,left:0}),g=null,h=null,i=!0,j=a.utils.defaultColor(),k=a.utils.state(),l=[],m=!0,n=null,o=null,p=\"undefined\",q=d3.dispatch(\"dimensionsOrder\",\"brushEnd\",\"stateChange\",\"changeState\",\"renderEnd\"),r=a.utils.renderWatch(q),s=function(a){return function(){return{active:a.map(function(a){return!a.disabled})}}},t=function(a){return function(b){void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}};return e.contentGenerator(function(a){var b='<table><thead><tr><td class=\"legend-color-guide\"><div style=\"background-color:'+a.color+'\"></div></td><td><strong>'+a.key+\"</strong></td></tr></thead>\";return 0!==a.series.length&&(b+='<tbody><tr><td height =\"10px\"></td></tr>',a.series.forEach(function(a){b=b+'<tr><td class=\"legend-color-guide\"><div style=\"background-color:'+a.color+'\"></div></td><td class=\"key\">'+a.key+'</td><td class=\"value\">'+a.value+\"</td></tr>\"}),b+=\"</tbody>\"),b+=\"</table>\"}),c.dispatch.on(\"elementMouseover.tooltip\",function(a){var b={key:a.label,color:a.color,series:[]};a.values&&(Object.keys(a.values).forEach(function(c){var d=a.dimensions.filter(function(a){return a.key===c})[0];if(d){var e;e=isNaN(a.values[c])||isNaN(parseFloat(a.values[c]))?p:d.format(a.values[c]),b.series.push({idx:d.currentPosition,key:c,value:e,color:d.color})}}),b.series.sort(function(a,b){return a.idx-b.idx})),e.data(b).hidden(!1)}),c.dispatch.on(\"elementMouseout.tooltip\",function(a){e.hidden(!0)}),c.dispatch.on(\"elementMousemove.tooltip\",function(){e()}),b.dispatch=q,b.parallelCoordinates=c,b.legend=d,b.tooltip=e,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return g},set:function(a){g=a}},height:{get:function(){return h},set:function(a){h=a}},showLegend:{get:function(){return i},set:function(a){i=a}},defaultState:{get:function(){return n},set:function(a){n=a}},dimensionData:{get:function(){return l},set:function(a){l=a}},displayBrush:{get:function(){return m},set:function(a){m=a}},noData:{get:function(){return o},set:function(a){o=a}},nanValue:{get:function(){return p},set:function(a){p=a}},margin:{get:function(){return f},set:function(a){f.top=void 0!==a.top?a.top:f.top,f.right=void 0!==a.right?a.right:f.right,f.bottom=void 0!==a.bottom?a.bottom:f.bottom,f.left=void 0!==a.left?a.left:f.left}},color:{get:function(){return j},set:function(b){j=a.utils.getColor(b),d.color(j),c.color(j)}}}),a.utils.inheritOptions(b,c),a.utils.initOptions(b),b},a.models.pie=function(){\"use strict\";function b(F){return E.reset(),F.each(function(b){function F(a,b){a.endAngle=isNaN(a.endAngle)?0:a.endAngle,a.startAngle=isNaN(a.startAngle)?0:a.startAngle,p||(a.innerRadius=0);var c=d3.interpolate(this._current,a);return this._current=c(0),function(a){return C[b](c(a))}}var G=d-c.left-c.right,H=e-c.top-c.bottom,I=Math.min(G,H)/2,J=[],K=[];if(i=d3.select(this),0===A.length)for(var L=I-I/5,M=y*I,N=0;N<b[0].length;N++)J.push(L),K.push(M);else r?(J=A.map(function(a){return(a.outer-a.outer/5)*I}),K=A.map(function(a){return(a.inner-a.inner/5)*I}),y=d3.min(A.map(function(a){return a.inner-a.inner/5}))):(J=A.map(function(a){return a.outer*I}),K=A.map(function(a){return a.inner*I}),y=d3.min(A.map(function(a){return a.inner})));a.utils.initSVG(i);var O=i.selectAll(\".nv-wrap.nv-pie\").data(b),P=O.enter().append(\"g\").attr(\"class\",\"nvd3 nv-wrap nv-pie nv-chart-\"+h),Q=P.append(\"g\"),R=O.select(\"g\"),S=Q.append(\"g\").attr(\"class\",\"nv-pie\");Q.append(\"g\").attr(\"class\",\"nv-pieLabels\"),O.attr(\"transform\",\"translate(\"+c.left+\",\"+c.top+\")\"),R.select(\".nv-pie\").attr(\"transform\",\"translate(\"+G/2+\",\"+H/2+\")\"),R.select(\".nv-pieLabels\").attr(\"transform\",\"translate(\"+G/2+\",\"+H/2+\")\"),i.on(\"click\",function(a,b){B.chartClick({data:a,index:b,pos:d3.event,id:h})}),C=[],D=[];for(var N=0;N<b[0].length;N++){var T=d3.svg.arc().outerRadius(J[N]),U=d3.svg.arc().outerRadius(J[N]+5);u!==!1&&(T.startAngle(u),U.startAngle(u)),w!==!1&&(T.endAngle(w),U.endAngle(w)),p&&(T.innerRadius(K[N]),U.innerRadius(K[N])),T.cornerRadius&&x&&(T.cornerRadius(x),U.cornerRadius(x)),C.push(T),D.push(U)}var V=d3.layout.pie().sort(null).value(function(a){return a.disabled?0:g(a)});V.padAngle&&v&&V.padAngle(v),p&&q&&(S.append(\"text\").attr(\"class\",\"nv-pie-title\"),O.select(\".nv-pie-title\").style(\"text-anchor\",\"middle\").text(function(a){return q}).style(\"font-size\",Math.min(G,H)*y*2/(q.length+2)+\"px\").attr(\"dy\",\"0.35em\").attr(\"transform\",function(a,b){return\"translate(0, \"+s+\")\"}));var W=O.select(\".nv-pie\").selectAll(\".nv-slice\").data(V),X=O.select(\".nv-pieLabels\").selectAll(\".nv-label\").data(V);W.exit().remove(),X.exit().remove();var Y=W.enter().append(\"g\");Y.attr(\"class\",\"nv-slice\"),Y.on(\"mouseover\",function(a,b){d3.select(this).classed(\"hover\",!0),r&&d3.select(this).select(\"path\").transition().duration(70).attr(\"d\",D[b]),B.elementMouseover({data:a.data,index:b,color:d3.select(this).style(\"fill\"),percent:(a.endAngle-a.startAngle)/(2*Math.PI)})}),Y.on(\"mouseout\",function(a,b){d3.select(this).classed(\"hover\",!1),r&&d3.select(this).select(\"path\").transition().duration(50).attr(\"d\",C[b]),B.elementMouseout({data:a.data,index:b})}),Y.on(\"mousemove\",function(a,b){B.elementMousemove({data:a.data,index:b})}),Y.on(\"click\",function(a,b){var c=this;B.elementClick({data:a.data,index:b,color:d3.select(this).style(\"fill\"),event:d3.event,element:c})}),Y.on(\"dblclick\",function(a,b){B.elementDblClick({data:a.data,index:b,color:d3.select(this).style(\"fill\")})}),W.attr(\"fill\",function(a,b){return j(a.data,b)}),W.attr(\"stroke\",function(a,b){return j(a.data,b)});Y.append(\"path\").each(function(a){this._current=a});if(W.select(\"path\").transition().duration(z).attr(\"d\",function(a,b){return C[b](a)}).attrTween(\"d\",F),l){for(var Z=[],N=0;N<b[0].length;N++)Z.push(C[N]),m?p&&(Z[N]=d3.svg.arc().outerRadius(C[N].outerRadius()),u!==!1&&Z[N].startAngle(u),w!==!1&&Z[N].endAngle(w)):p||Z[N].innerRadius(0);X.enter().append(\"g\").classed(\"nv-label\",!0).each(function(a,b){var c=d3.select(this);c.attr(\"transform\",function(a,b){if(t){a.outerRadius=J[b]+10,a.innerRadius=J[b]+15;var c=(a.startAngle+a.endAngle)/2*(180/Math.PI);return(a.startAngle+a.endAngle)/2<Math.PI?c-=90:c+=90,\"translate(\"+Z[b].centroid(a)+\") rotate(\"+c+\")\"}return a.outerRadius=I+10,a.innerRadius=I+15,\"translate(\"+Z[b].centroid(a)+\")\"}),c.append(\"rect\").style(\"stroke\",\"#fff\").style(\"fill\",\"#fff\").attr(\"rx\",3).attr(\"ry\",3),c.append(\"text\").style(\"text-anchor\",t?(a.startAngle+a.endAngle)/2<Math.PI?\"start\":\"end\":\"middle\").style(\"fill\",\"#000\")});var $={},_=14,aa=140,ba=function(a){return Math.floor(a[0]/aa)*aa+\",\"+Math.floor(a[1]/_)*_},ca=function(a){return(a.endAngle-a.startAngle)/(2*Math.PI)};X.watchTransition(E,\"pie labels\").attr(\"transform\",function(a,b){if(t){a.outerRadius=J[b]+10,a.innerRadius=J[b]+15;var c=(a.startAngle+a.endAngle)/2*(180/Math.PI);return(a.startAngle+a.endAngle)/2<Math.PI?c-=90:c+=90,\"translate(\"+Z[b].centroid(a)+\") rotate(\"+c+\")\"}a.outerRadius=I+10,a.innerRadius=I+15;var d=Z[b].centroid(a),e=ca(a);if(a.value&&e>=o){var f=ba(d);$[f]&&(d[1]-=_),$[ba(d)]=!0}return\"translate(\"+d+\")\"}),X.select(\".nv-label text\").style(\"text-anchor\",function(a,b){return t?(a.startAngle+a.endAngle)/2<Math.PI?\"start\":\"end\":\"middle\"}).text(function(a,b){var c=ca(a),d=\"\";if(!a.value||o>c)return\"\";if(\"function\"==typeof n)d=n(a,b,{key:f(a.data),value:g(a.data),percent:k(c)});else switch(n){case\"key\":d=f(a.data);break;case\"value\":d=k(g(a.data));break;case\"percent\":d=d3.format(\"%\")(c)}return d})}}),E.renderEnd(\"pie immediate\"),b}var c={top:0,right:0,bottom:0,left:0},d=500,e=500,f=function(a){return a.x},g=function(a){return a.y},h=Math.floor(1e4*Math.random()),i=null,j=a.utils.defaultColor(),k=d3.format(\",.2f\"),l=!0,m=!1,n=\"key\",o=.02,p=!1,q=!1,r=!0,s=0,t=!1,u=!1,v=!1,w=!1,x=0,y=.5,z=250,A=[],B=d3.dispatch(\"chartClick\",\"elementClick\",\"elementDblClick\",\"elementMouseover\",\"elementMouseout\",\"elementMousemove\",\"renderEnd\"),C=[],D=[],E=a.utils.renderWatch(B);return b.dispatch=B,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{arcsRadius:{get:function(){return A},set:function(a){A=a}},width:{get:function(){return d},set:function(a){d=a}},height:{get:function(){return e},set:function(a){e=a}},showLabels:{get:function(){return l},set:function(a){l=a}},title:{get:function(){return q},set:function(a){q=a}},titleOffset:{get:function(){return s},set:function(a){s=a}},labelThreshold:{get:function(){return o},set:function(a){o=a}},valueFormat:{get:function(){return k},set:function(a){k=a}},x:{get:function(){return f},set:function(a){f=a}},id:{get:function(){return h},set:function(a){h=a}},endAngle:{get:function(){return w},set:function(a){w=a}},startAngle:{get:function(){return u},set:function(a){u=a}},padAngle:{get:function(){return v},set:function(a){v=a}},cornerRadius:{get:function(){return x},set:function(a){x=a}},donutRatio:{get:function(){return y},set:function(a){y=a}},labelsOutside:{get:function(){return m},set:function(a){m=a}},labelSunbeamLayout:{get:function(){return t},set:function(a){t=a}},donut:{get:function(){return p},set:function(a){p=a}},growOnHover:{get:function(){return r},set:function(a){r=a}},pieLabelsOutside:{get:function(){return m},set:function(b){m=b,a.deprecated(\"pieLabelsOutside\",\"use labelsOutside instead\")}},donutLabelsOutside:{get:function(){return m},set:function(b){m=b,a.deprecated(\"donutLabelsOutside\",\"use labelsOutside instead\")}},labelFormat:{get:function(){return k},set:function(b){k=b,a.deprecated(\"labelFormat\",\"use valueFormat instead\")}},margin:{get:function(){return c},set:function(a){c.top=\"undefined\"!=typeof a.top?a.top:c.top,c.right=\"undefined\"!=typeof a.right?a.right:c.right,c.bottom=\"undefined\"!=typeof a.bottom?a.bottom:c.bottom,c.left=\"undefined\"!=typeof a.left?a.left:c.left}},duration:{get:function(){return z},set:function(a){z=a,E.reset(z)}},y:{get:function(){return g},set:function(a){g=d3.functor(a)}},color:{get:function(){return j},set:function(b){j=a.utils.getColor(b)}},labelType:{get:function(){return n},set:function(a){n=a||\"key\"}}}),a.utils.initOptions(b),b},a.models.pieChart=function(){\"use strict\";function b(e){return r.reset(),r.models(c),e.each(function(e){var i=d3.select(this);a.utils.initSVG(i);var l=a.utils.availableWidth(g,i,f),o=a.utils.availableHeight(h,i,f);if(b.update=function(){i.transition().call(b)},b.container=this,m.setter(t(e),b.update).getter(s(e)).update(),m.disabled=e.map(function(a){return!!a.disabled}),!n){var p;n={};for(p in m)m[p]instanceof Array?n[p]=m[p].slice(0):n[p]=m[p]}if(!e||!e.length)return a.utils.noData(b,i),b;i.selectAll(\".nv-noData\").remove();var r=i.selectAll(\"g.nv-wrap.nv-pieChart\").data([e]),u=r.enter().append(\"g\").attr(\"class\",\"nvd3 nv-wrap nv-pieChart\").append(\"g\"),v=r.select(\"g\");if(u.append(\"g\").attr(\"class\",\"nv-pieWrap\"),u.append(\"g\").attr(\"class\",\"nv-legendWrap\"),j){if(\"top\"===k)d.width(l).key(c.x()),r.select(\".nv-legendWrap\").datum(e).call(d),d.height()>f.top&&(f.top=d.height(),o=a.utils.availableHeight(h,i,f)),r.select(\".nv-legendWrap\").attr(\"transform\",\"translate(0,\"+-f.top+\")\");else if(\"right\"===k){var w=a.models.legend().width();w>l/2&&(w=l/2),d.height(o).key(c.x()),d.width(w),l-=d.width(),r.select(\".nv-legendWrap\").datum(e).call(d).attr(\"transform\",\"translate(\"+l+\",0)\")}}else v.select(\".nv-legendWrap\").selectAll(\"*\").remove();r.attr(\"transform\",\"translate(\"+f.left+\",\"+f.top+\")\"),c.width(l).height(o);var x=v.select(\".nv-pieWrap\").datum([e]);d3.transition(x).call(c),d.dispatch.on(\"stateChange\",function(a){for(var c in a)m[c]=a[c];q.stateChange(m),b.update()}),q.on(\"changeState\",function(a){\"undefined\"!=typeof a.disabled&&(e.forEach(function(b,c){b.disabled=a.disabled[c]}),m.disabled=a.disabled),b.update()})}),r.renderEnd(\"pieChart immediate\"),b}var c=a.models.pie(),d=a.models.legend(),e=a.models.tooltip(),f={top:30,right:20,bottom:20,left:20},g=null,h=null,i=!1,j=!0,k=\"top\",l=a.utils.defaultColor(),m=a.utils.state(),n=null,o=null,p=250,q=d3.dispatch(\"stateChange\",\"changeState\",\"renderEnd\");e.duration(0).headerEnabled(!1).valueFormatter(function(a,b){return c.valueFormat()(a,b)});var r=a.utils.renderWatch(q),s=function(a){return function(){return{active:a.map(function(a){return!a.disabled})}}},t=function(a){return function(b){void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}};return c.dispatch.on(\"elementMouseover.tooltip\",function(a){a.series={key:b.x()(a.data),value:b.y()(a.data),color:a.color,percent:a.percent},i||(delete a.percent,delete a.series.percent),e.data(a).hidden(!1)}),c.dispatch.on(\"elementMouseout.tooltip\",function(a){e.hidden(!0)}),c.dispatch.on(\"elementMousemove.tooltip\",function(a){e()}),b.legend=d,b.dispatch=q,b.pie=c,b.tooltip=e,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return g},set:function(a){g=a}},height:{get:function(){return h},set:function(a){h=a}},noData:{get:function(){return o},set:function(a){o=a}},showTooltipPercent:{get:function(){return i},set:function(a){i=a}},showLegend:{get:function(){return j},set:function(a){j=a}},legendPosition:{get:function(){return k},set:function(a){k=a}},defaultState:{get:function(){return n},set:function(a){n=a}},color:{get:function(){return l},set:function(a){l=a,d.color(l),c.color(l)}},duration:{get:function(){return p},set:function(a){p=a,r.reset(p),c.duration(p)}},margin:{get:function(){return f},set:function(a){f.top=void 0!==a.top?a.top:f.top,f.right=void 0!==a.right?a.right:f.right,f.bottom=void 0!==a.bottom?a.bottom:f.bottom,f.left=void 0!==a.left?a.left:f.left}}}),a.utils.inheritOptions(b,c),a.utils.initOptions(b),b},a.models.scatter=function(){\"use strict\";function b(a){var b,c;return b=i=i||{},c=a[0].series,b=b[c]=b[c]||{},c=a[1],b=b[c]=b[c]||{}}function c(a){var c,d,e=a[0],f=b(a),g=!1;for(c=1;c<arguments.length;c++)d=arguments[c],f[d]===e[d]&&f.hasOwnProperty(d)||(f[d]=e[d],g=!0);return g}function d(b){return U.reset(),b.each(function(b){function i(){if(T=!1,!z)return!1;if(P===!0){var c=d3.merge(b.map(function(b,c){return b.values.map(function(b,d){var e=s(b,d),f=t(b,d);return[a.utils.NaNtoZero(p(e))+1e-4*Math.random(),a.utils.NaNtoZero(q(f))+1e-4*Math.random(),c,d,b]}).filter(function(a,b){return A(a[4],b)})}));if(0==c.length)return!1;c.length<3&&(c.push([p.range()[0]-20,q.range()[0]-20,null,null]),c.push([p.range()[1]+20,q.range()[1]+20,null,null]),c.push([p.range()[0]-20,q.range()[0]+20,null,null]),c.push([p.range()[1]+20,q.range()[1]-20,null,null]));var d=d3.geom.polygon([[-10,-10],[-10,l+10],[k+10,l+10],[k+10,-10]]),e=d3.geom.voronoi(c).map(function(a,b){return{data:d.clip(a),series:c[b][2],point:c[b][3]}});_.select(\".nv-point-paths\").selectAll(\"path\").remove();var f=_.select(\".nv-point-paths\").selectAll(\"path\").data(e),g=f.enter().append(\"svg:path\").attr(\"d\",function(a){return a&&a.data&&0!==a.data.length?\"M\"+a.data.join(\",\")+\"Z\":\"M 0 0\"}).attr(\"id\",function(a,b){return\"nv-path-\"+b}).attr(\"clip-path\",function(a,b){return\"url(#nv-clip-\"+n+\"-\"+b+\")\"});if(F&&g.style(\"fill\",d3.rgb(230,230,230)).style(\"fill-opacity\",.4).style(\"stroke-opacity\",1).style(\"stroke\",d3.rgb(200,200,200)),E){_.select(\".nv-point-clips\").selectAll(\"*\").remove();var h=_.select(\".nv-point-clips\").selectAll(\"clipPath\").data(c);h.enter().append(\"svg:clipPath\").attr(\"id\",function(a,b){return\"nv-clip-\"+n+\"-\"+b}).append(\"svg:circle\").attr(\"cx\",function(a){return a[0]}).attr(\"cy\",function(a){return a[1]}).attr(\"r\",G)}var i=function(a,c){if(T)return 0;var d=b[a.series];if(void 0!==d){var e=d.values[a.point];e.color=m(d,a.series),e.x=s(e),e.y=t(e);var f=o.node().getBoundingClientRect(),g=window.pageYOffset||document.documentElement.scrollTop,h=window.pageXOffset||document.documentElement.scrollLeft,i={left:p(s(e,a.point))+f.left+h+j.left+10,top:q(t(e,a.point))+f.top+g+j.top+10};c({point:e,series:d,pos:i,relativePos:[p(s(e,a.point))+j.left,q(t(e,a.point))+j.top],seriesIndex:a.series,pointIndex:a.point})}};f.on(\"click\",function(a){i(a,O.elementClick)}).on(\"dblclick\",function(a){i(a,O.elementDblClick)}).on(\"mouseover\",function(a){i(a,O.elementMouseover)}).on(\"mouseout\",function(a,b){i(a,O.elementMouseout)})}else _.select(\".nv-groups\").selectAll(\".nv-group\").selectAll(\".nv-point\").on(\"click\",function(a,c){if(T||!b[a.series])return 0;var d=b[a.series],e=d.values[c],f=this;O.elementClick({point:e,series:d,pos:[p(s(e,c))+j.left,q(t(e,c))+j.top],relativePos:[p(s(e,c))+j.left,q(t(e,c))+j.top],seriesIndex:a.series,pointIndex:c,event:d3.event,element:f})}).on(\"dblclick\",function(a,c){if(T||!b[a.series])return 0;var d=b[a.series],e=d.values[c];O.elementDblClick({point:e,series:d,pos:[p(s(e,c))+j.left,q(t(e,c))+j.top],relativePos:[p(s(e,c))+j.left,q(t(e,c))+j.top],seriesIndex:a.series,pointIndex:c})}).on(\"mouseover\",function(a,c){if(T||!b[a.series])return 0;var d=b[a.series],e=d.values[c];O.elementMouseover({point:e,series:d,pos:[p(s(e,c))+j.left,q(t(e,c))+j.top],relativePos:[p(s(e,c))+j.left,q(t(e,c))+j.top],seriesIndex:a.series,pointIndex:c,color:m(a,c)})}).on(\"mouseout\",function(a,c){if(T||!b[a.series])return 0;var d=b[a.series],e=d.values[c];O.elementMouseout({point:e,series:d,pos:[p(s(e,c))+j.left,q(t(e,c))+j.top],relativePos:[p(s(e,c))+j.left,q(t(e,c))+j.top],seriesIndex:a.series,pointIndex:c,color:m(a,c)})})}o=d3.select(this);var Q=a.utils.availableWidth(k,o,j),W=a.utils.availableHeight(l,o,j);a.utils.initSVG(o),b.forEach(function(a,b){a.values.forEach(function(a){a.series=b})});var X=d.yScale().name===d3.scale.log().name?!0:!1,Y=H&&I&&L?[]:d3.merge(b.map(function(a){return a.values.map(function(a,b){return{x:s(a,b),y:t(a,b),size:u(a,b)}})}));if(p.domain(H||d3.extent(Y.map(function(a){return a.x}).concat(w))),B&&b[0]?p.range(J||[(Q*C+Q)/(2*b[0].values.length),Q-Q*(1+C)/(2*b[0].values.length)]):p.range(J||[0,Q]),X){var Z=d3.min(Y.map(function(a){return 0!==a.y?a.y:void 0}));q.clamp(!0).domain(I||d3.extent(Y.map(function(a){return 0!==a.y?a.y:.1*Z}).concat(x))).range(K||[W,0])}else q.domain(I||d3.extent(Y.map(function(a){return a.y}).concat(x))).range(K||[W,0]);r.domain(L||d3.extent(Y.map(function(a){return a.size}).concat(y))).range(M||V),N=p.domain()[0]===p.domain()[1]||q.domain()[0]===q.domain()[1],p.domain()[0]===p.domain()[1]&&(p.domain()[0]?p.domain([p.domain()[0]-.01*p.domain()[0],p.domain()[1]+.01*p.domain()[1]]):p.domain([-1,1])),q.domain()[0]===q.domain()[1]&&(q.domain()[0]?q.domain([q.domain()[0]-.01*q.domain()[0],q.domain()[1]+.01*q.domain()[1]]):q.domain([-1,1])),isNaN(p.domain()[0])&&p.domain([-1,1]),isNaN(q.domain()[0])&&q.domain([-1,1]),e=e||p,f=f||q,g=g||r;var $=p(1)!==e(1)||q(1)!==f(1)||r(1)!==g(1),_=o.selectAll(\"g.nv-wrap.nv-scatter\").data([b]),aa=_.enter().append(\"g\").attr(\"class\",\"nvd3 nv-wrap nv-scatter nv-chart-\"+n),ba=aa.append(\"defs\"),ca=aa.append(\"g\"),da=_.select(\"g\");_.classed(\"nv-single-point\",N),ca.append(\"g\").attr(\"class\",\"nv-groups\"),ca.append(\"g\").attr(\"class\",\"nv-point-paths\"),aa.append(\"g\").attr(\"class\",\"nv-point-clips\"),_.attr(\"transform\",\"translate(\"+j.left+\",\"+j.top+\")\"),ba.append(\"clipPath\").attr(\"id\",\"nv-edge-clip-\"+n).append(\"rect\"),_.select(\"#nv-edge-clip-\"+n+\" rect\").attr(\"width\",Q).attr(\"height\",W>0?W:0),da.attr(\"clip-path\",D?\"url(#nv-edge-clip-\"+n+\")\":\"\"),T=!0;var ea=_.select(\".nv-groups\").selectAll(\".nv-group\").data(function(a){return a},function(a){return a.key});ea.enter().append(\"g\").style(\"stroke-opacity\",1e-6).style(\"fill-opacity\",1e-6),ea.exit().remove(),ea.attr(\"class\",function(a,b){return(a.classed||\"\")+\" nv-group nv-series-\"+b}).classed(\"nv-noninteractive\",!z).classed(\"hover\",function(a){return a.hover}),ea.watchTransition(U,\"scatter: groups\").style(\"fill\",function(a,b){return m(a,b)}).style(\"stroke\",function(a,b){return m(a,b)}).style(\"stroke-opacity\",1).style(\"fill-opacity\",.5);var fa=ea.selectAll(\"path.nv-point\").data(function(a){return a.values.map(function(a,b){return[a,b]}).filter(function(a,b){return A(a[0],b)})});if(fa.enter().append(\"path\").attr(\"class\",function(a){return\"nv-point nv-point-\"+a[1]}).style(\"fill\",function(a){return a.color}).style(\"stroke\",function(a){return a.color}).attr(\"transform\",function(b){return\"translate(\"+a.utils.NaNtoZero(e(s(b[0],b[1])))+\",\"+a.utils.NaNtoZero(f(t(b[0],b[1])))+\")\"}).attr(\"d\",a.utils.symbol().type(function(a){return v(a[0])}).size(function(a){return r(u(a[0],a[1]))})),fa.exit().remove(),ea.exit().selectAll(\"path.nv-point\").watchTransition(U,\"scatter exit\").attr(\"transform\",function(b){return\"translate(\"+a.utils.NaNtoZero(p(s(b[0],b[1])))+\",\"+a.utils.NaNtoZero(q(t(b[0],b[1])))+\")\"}).remove(),fa.filter(function(a){return $||c(a,\"x\",\"y\")}).watchTransition(U,\"scatter points\").attr(\"transform\",function(b){return\"translate(\"+a.utils.NaNtoZero(p(s(b[0],b[1])))+\",\"+a.utils.NaNtoZero(q(t(b[0],b[1])))+\")\"}),fa.filter(function(a){return $||c(a,\"shape\",\"size\")}).watchTransition(U,\"scatter points\").attr(\"d\",a.utils.symbol().type(function(a){return v(a[0])}).size(function(a){return r(u(a[0],a[1]))})),S){var ga=ea.selectAll(\".nv-label\").data(function(a){return a.values.map(function(a,b){return[a,b]}).filter(function(a,b){return A(a[0],b)})});ga.enter().append(\"text\").style(\"fill\",function(a,b){return a.color}).style(\"stroke-opacity\",0).style(\"fill-opacity\",1).attr(\"transform\",function(b){var c=a.utils.NaNtoZero(e(s(b[0],b[1])))+Math.sqrt(r(u(b[0],b[1]))/Math.PI)+2;return\"translate(\"+c+\",\"+a.utils.NaNtoZero(f(t(b[0],b[1])))+\")\"}).text(function(a,b){return a[0].label}),ga.exit().remove(),ea.exit().selectAll(\"path.nv-label\").watchTransition(U,\"scatter exit\").attr(\"transform\",function(b){var c=a.utils.NaNtoZero(p(s(b[0],b[1])))+Math.sqrt(r(u(b[0],b[1]))/Math.PI)+2;return\"translate(\"+c+\",\"+a.utils.NaNtoZero(q(t(b[0],b[1])))+\")\"}).remove(),ga.each(function(a){d3.select(this).classed(\"nv-label\",!0).classed(\"nv-label-\"+a[1],!1).classed(\"hover\",!1)}),ga.watchTransition(U,\"scatter labels\").attr(\"transform\",function(b){var c=a.utils.NaNtoZero(p(s(b[0],b[1])))+Math.sqrt(r(u(b[0],b[1]))/Math.PI)+2;return\"translate(\"+c+\",\"+a.utils.NaNtoZero(q(t(b[0],b[1])))+\")\"})}R?(clearTimeout(h),h=setTimeout(i,R)):i(),e=p.copy(),f=q.copy(),g=r.copy()}),U.renderEnd(\"scatter immediate\"),d}var e,f,g,h,i,j={top:0,right:0,bottom:0,left:0},k=null,l=null,m=a.utils.defaultColor(),n=Math.floor(1e5*Math.random()),o=null,p=d3.scale.linear(),q=d3.scale.linear(),r=d3.scale.linear(),s=function(a){return a.x},t=function(a){return a.y},u=function(a){return a.size||1},v=function(a){return a.shape||\"circle\"},w=[],x=[],y=[],z=!0,A=function(a){return!a.notActive},B=!1,C=.1,D=!1,E=!0,F=!1,G=function(){return 25},H=null,I=null,J=null,K=null,L=null,M=null,N=!1,O=d3.dispatch(\"elementClick\",\"elementDblClick\",\"elementMouseover\",\"elementMouseout\",\"renderEnd\"),P=!0,Q=250,R=300,S=!1,T=!1,U=a.utils.renderWatch(O,Q),V=[16,256];return d.dispatch=O,d.options=a.utils.optionsFunc.bind(d),d._calls=new function(){this.clearHighlights=function(){return a.dom.write(function(){o.selectAll(\".nv-point.hover\").classed(\"hover\",!1)}),null},this.highlightPoint=function(b,c,d){a.dom.write(function(){o.select(\".nv-groups\").selectAll(\".nv-series-\"+b).selectAll(\".nv-point-\"+c).classed(\"hover\",d)})}},O.on(\"elementMouseover.point\",function(a){z&&d._calls.highlightPoint(a.seriesIndex,a.pointIndex,!0)}),O.on(\"elementMouseout.point\",function(a){z&&d._calls.highlightPoint(a.seriesIndex,a.pointIndex,!1)}),d._options=Object.create({},{width:{get:function(){return k},set:function(a){k=a}},height:{get:function(){return l},set:function(a){l=a}},xScale:{get:function(){return p},set:function(a){p=a}},yScale:{get:function(){return q},set:function(a){q=a}},pointScale:{get:function(){return r},set:function(a){r=a}},xDomain:{get:function(){return H},set:function(a){H=a}},yDomain:{get:function(){return I},set:function(a){I=a}},pointDomain:{get:function(){return L},set:function(a){L=a}},xRange:{get:function(){return J},set:function(a){J=a}},yRange:{get:function(){return K},set:function(a){K=a}},pointRange:{get:function(){return M},set:function(a){M=a}},forceX:{get:function(){return w},set:function(a){w=a}},forceY:{get:function(){return x},set:function(a){x=a}},forcePoint:{get:function(){return y},set:function(a){y=a}},interactive:{get:function(){return z},set:function(a){z=a}},pointActive:{get:function(){return A},set:function(a){A=a}},padDataOuter:{get:function(){return C},set:function(a){C=a}},padData:{get:function(){return B},set:function(a){B=a}},clipEdge:{get:function(){return D},set:function(a){D=a}},clipVoronoi:{get:function(){return E},set:function(a){E=a}},clipRadius:{get:function(){return G},set:function(a){G=a}},showVoronoi:{get:function(){return F},set:function(a){F=a}},id:{get:function(){return n},set:function(a){n=a}},interactiveUpdateDelay:{get:function(){return R},set:function(a){R=a}},showLabels:{get:function(){return S},set:function(a){S=a}},x:{get:function(){return s},set:function(a){s=d3.functor(a)}},y:{get:function(){return t},set:function(a){t=d3.functor(a)}},pointSize:{get:function(){return u},set:function(a){u=d3.functor(a)}},pointShape:{get:function(){return v},set:function(a){v=d3.functor(a)}},margin:{get:function(){return j},set:function(a){j.top=void 0!==a.top?a.top:j.top,j.right=void 0!==a.right?a.right:j.right,j.bottom=void 0!==a.bottom?a.bottom:j.bottom,j.left=void 0!==a.left?a.left:j.left}},duration:{get:function(){return Q},set:function(a){Q=a,U.reset(Q)}},color:{get:function(){return m},set:function(b){m=a.utils.getColor(b)}},useVoronoi:{get:function(){return P},set:function(a){P=a,P===!1&&(E=!1)}}}),a.utils.initOptions(d),d},a.models.scatterChart=function(){\"use strict\";function b(z){return E.reset(),E.models(c),t&&E.models(d),u&&E.models(e),q&&E.models(g),r&&E.models(h),z.each(function(z){m=d3.select(this),a.utils.initSVG(m);var H=a.utils.availableWidth(k,m,j),I=a.utils.availableHeight(l,m,j);if(b.update=function(){0===A?m.call(b):m.transition().duration(A).call(b)},b.container=this,w.setter(G(z),b.update).getter(F(z)).update(),w.disabled=z.map(function(a){return!!a.disabled}),!x){var J;x={};for(J in w)w[J]instanceof Array?x[J]=w[J].slice(0):x[J]=w[J]}if(!(z&&z.length&&z.filter(function(a){return a.values.length}).length))return a.utils.noData(b,m),E.renderEnd(\"scatter immediate\"),b;m.selectAll(\".nv-noData\").remove(),o=c.xScale(),p=c.yScale();var K=m.selectAll(\"g.nv-wrap.nv-scatterChart\").data([z]),L=K.enter().append(\"g\").attr(\"class\",\"nvd3 nv-wrap nv-scatterChart nv-chart-\"+c.id()),M=L.append(\"g\"),N=K.select(\"g\");if(M.append(\"rect\").attr(\"class\",\"nvd3 nv-background\").style(\"pointer-events\",\"none\"),M.append(\"g\").attr(\"class\",\"nv-x nv-axis\"),M.append(\"g\").attr(\"class\",\"nv-y nv-axis\"),M.append(\"g\").attr(\"class\",\"nv-scatterWrap\"),M.append(\"g\").attr(\"class\",\"nv-regressionLinesWrap\"),M.append(\"g\").attr(\"class\",\"nv-distWrap\"),M.append(\"g\").attr(\"class\",\"nv-legendWrap\"),v&&N.select(\".nv-y.nv-axis\").attr(\"transform\",\"translate(\"+H+\",0)\"),s){var O=H;f.width(O),K.select(\".nv-legendWrap\").datum(z).call(f),f.height()>j.top&&(j.top=f.height(),I=a.utils.availableHeight(l,m,j)),K.select(\".nv-legendWrap\").attr(\"transform\",\"translate(0,\"+-j.top+\")\")}else N.select(\".nv-legendWrap\").selectAll(\"*\").remove();K.attr(\"transform\",\"translate(\"+j.left+\",\"+j.top+\")\"),c.width(H).height(I).color(z.map(function(a,b){return a.color=a.color||n(a,b),a.color}).filter(function(a,b){return!z[b].disabled})).showLabels(B),K.select(\".nv-scatterWrap\").datum(z.filter(function(a){return!a.disabled})).call(c),K.select(\".nv-regressionLinesWrap\").attr(\"clip-path\",\"url(#nv-edge-clip-\"+c.id()+\")\");var P=K.select(\".nv-regressionLinesWrap\").selectAll(\".nv-regLines\").data(function(a){return a});P.enter().append(\"g\").attr(\"class\",\"nv-regLines\");var Q=P.selectAll(\".nv-regLine\").data(function(a){return[a]});Q.enter().append(\"line\").attr(\"class\",\"nv-regLine\").style(\"stroke-opacity\",0),Q.filter(function(a){return a.intercept&&a.slope}).watchTransition(E,\"scatterPlusLineChart: regline\").attr(\"x1\",o.range()[0]).attr(\"x2\",o.range()[1]).attr(\"y1\",function(a,b){return p(o.domain()[0]*a.slope+a.intercept)}).attr(\"y2\",function(a,b){return p(o.domain()[1]*a.slope+a.intercept)}).style(\"stroke\",function(a,b,c){return n(a,c)}).style(\"stroke-opacity\",function(a,b){return a.disabled||\"undefined\"==typeof a.slope||\"undefined\"==typeof a.intercept?0:1}),t&&(d.scale(o)._ticks(a.utils.calcTicksX(H/100,z)).tickSize(-I,0),N.select(\".nv-x.nv-axis\").attr(\"transform\",\"translate(0,\"+p.range()[0]+\")\").call(d)),u&&(e.scale(p)._ticks(a.utils.calcTicksY(I/36,z)).tickSize(-H,0),N.select(\".nv-y.nv-axis\").call(e)),q&&(g.getData(c.x()).scale(o).width(H).color(z.map(function(a,b){return a.color||n(a,b)}).filter(function(a,b){return!z[b].disabled})),M.select(\".nv-distWrap\").append(\"g\").attr(\"class\",\"nv-distributionX\"),N.select(\".nv-distributionX\").attr(\"transform\",\"translate(0,\"+p.range()[0]+\")\").datum(z.filter(function(a){return!a.disabled})).call(g)),r&&(h.getData(c.y()).scale(p).width(I).color(z.map(function(a,b){return a.color||n(a,b)}).filter(function(a,b){return!z[b].disabled})),M.select(\".nv-distWrap\").append(\"g\").attr(\"class\",\"nv-distributionY\"),N.select(\".nv-distributionY\").attr(\"transform\",\"translate(\"+(v?H:-h.size())+\",0)\").datum(z.filter(function(a){return!a.disabled})).call(h)),f.dispatch.on(\"stateChange\",function(a){for(var c in a)w[c]=a[c];y.stateChange(w),b.update()}),y.on(\"changeState\",function(a){\"undefined\"!=typeof a.disabled&&(z.forEach(function(b,c){b.disabled=a.disabled[c]}),w.disabled=a.disabled),b.update()}),c.dispatch.on(\"elementMouseout.tooltip\",function(a){i.hidden(!0),m.select(\".nv-chart-\"+c.id()+\" .nv-series-\"+a.seriesIndex+\" .nv-distx-\"+a.pointIndex).attr(\"y1\",0),m.select(\".nv-chart-\"+c.id()+\" .nv-series-\"+a.seriesIndex+\" .nv-disty-\"+a.pointIndex).attr(\"x2\",h.size())}),c.dispatch.on(\"elementMouseover.tooltip\",function(a){m.select(\".nv-series-\"+a.seriesIndex+\" .nv-distx-\"+a.pointIndex).attr(\"y1\",a.relativePos[1]-I),m.select(\".nv-series-\"+a.seriesIndex+\" .nv-disty-\"+a.pointIndex).attr(\"x2\",a.relativePos[0]+g.size()),i.data(a).hidden(!1)}),C=o.copy(),D=p.copy()}),E.renderEnd(\"scatter with line immediate\"),b}var c=a.models.scatter(),d=a.models.axis(),e=a.models.axis(),f=a.models.legend(),g=a.models.distribution(),h=a.models.distribution(),i=a.models.tooltip(),j={top:30,right:20,bottom:50,left:75},k=null,l=null,m=null,n=a.utils.defaultColor(),o=c.xScale(),p=c.yScale(),q=!1,r=!1,s=!0,t=!0,u=!0,v=!1,w=a.utils.state(),x=null,y=d3.dispatch(\"stateChange\",\"changeState\",\"renderEnd\"),z=null,A=250,B=!1;c.xScale(o).yScale(p),d.orient(\"bottom\").tickPadding(10),e.orient(v?\"right\":\"left\").tickPadding(10),g.axis(\"x\"),h.axis(\"y\"),i.headerFormatter(function(a,b){return d.tickFormat()(a,b)}).valueFormatter(function(a,b){return e.tickFormat()(a,b)});var C,D,E=a.utils.renderWatch(y,A),F=function(a){return function(){return{active:a.map(function(a){return!a.disabled})}}},G=function(a){return function(b){void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}};return b.dispatch=y,b.scatter=c,b.legend=f,b.xAxis=d,b.yAxis=e,b.distX=g,b.distY=h,b.tooltip=i,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return k},set:function(a){k=a}},height:{get:function(){return l},set:function(a){l=a}},container:{get:function(){return m},set:function(a){m=a}},showDistX:{get:function(){return q},set:function(a){q=a}},showDistY:{get:function(){return r},set:function(a){r=a}},showLegend:{get:function(){return s},set:function(a){s=a}},showXAxis:{get:function(){return t},set:function(a){t=a}},showYAxis:{get:function(){return u},set:function(a){u=a}},defaultState:{get:function(){return x},set:function(a){x=a}},noData:{get:function(){return z},set:function(a){z=a}},duration:{get:function(){return A},set:function(a){A=a}},showLabels:{get:function(){return B},set:function(a){B=a}},margin:{get:function(){return j},set:function(a){j.top=void 0!==a.top?a.top:j.top,j.right=void 0!==a.right?a.right:j.right,j.bottom=void 0!==a.bottom?a.bottom:j.bottom,j.left=void 0!==a.left?a.left:j.left}},rightAlignYAxis:{get:function(){return v},set:function(a){v=a,e.orient(a?\"right\":\"left\")}},color:{get:function(){return n},set:function(b){n=a.utils.getColor(b),f.color(n),g.color(n),h.color(n)}}}),a.utils.inheritOptions(b,c),a.utils.initOptions(b),b},a.models.sparkline=function(){\"use strict\";function b(k){return t.reset(),k.each(function(b){var k=h-g.left-g.right,s=i-g.top-g.bottom;j=d3.select(this),a.utils.initSVG(j),l.domain(c||d3.extent(b,n)).range(e||[0,k]),m.domain(d||d3.extent(b,o)).range(f||[s,0]);var t=j.selectAll(\"g.nv-wrap.nv-sparkline\").data([b]),u=t.enter().append(\"g\").attr(\"class\",\"nvd3 nv-wrap nv-sparkline\");u.append(\"g\"),t.select(\"g\");t.attr(\"transform\",\"translate(\"+g.left+\",\"+g.top+\")\");var v=t.selectAll(\"path\").data(function(a){return[a]});v.enter().append(\"path\"),v.exit().remove(),v.style(\"stroke\",function(a,b){return a.color||p(a,b)}).attr(\"d\",d3.svg.line().x(function(a,b){return l(n(a,b))}).y(function(a,b){return m(o(a,b))}));var w=t.selectAll(\"circle.nv-point\").data(function(a){function b(b){if(-1!=b){var c=a[b];return c.pointIndex=b,c}return null}var c=a.map(function(a,b){return o(a,b)}),d=b(c.lastIndexOf(m.domain()[1])),e=b(c.indexOf(m.domain()[0])),f=b(c.length-1);return[q?e:null,q?d:null,r?f:null].filter(function(a){return null!=a})});w.enter().append(\"circle\"),w.exit().remove(),w.attr(\"cx\",function(a,b){return l(n(a,a.pointIndex))}).attr(\"cy\",function(a,b){return m(o(a,a.pointIndex))}).attr(\"r\",2).attr(\"class\",function(a,b){return n(a,a.pointIndex)==l.domain()[1]?\"nv-point nv-currentValue\":o(a,a.pointIndex)==m.domain()[0]?\"nv-point nv-minValue\":\"nv-point nv-maxValue\"})}),t.renderEnd(\"sparkline immediate\"),b}var c,d,e,f,g={top:2,right:0,bottom:2,left:0},h=400,i=32,j=null,k=!0,l=d3.scale.linear(),m=d3.scale.linear(),n=function(a){return a.x},o=function(a){return a.y},p=a.utils.getColor([\"#000\"]),q=!0,r=!0,s=d3.dispatch(\"renderEnd\"),t=a.utils.renderWatch(s);return b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return h},set:function(a){h=a}},height:{get:function(){return i},set:function(a){i=a}},xDomain:{get:function(){return c},set:function(a){c=a}},yDomain:{get:function(){return d},set:function(a){d=a}},xRange:{get:function(){return e},set:function(a){e=a}},yRange:{get:function(){return f},set:function(a){f=a}},xScale:{get:function(){return l},set:function(a){l=a}},yScale:{get:function(){return m},set:function(a){m=a}},animate:{get:function(){return k},set:function(a){k=a}},showMinMaxPoints:{get:function(){return q},set:function(a){q=a}},showCurrentPoint:{get:function(){return r},set:function(a){r=a}},x:{get:function(){return n},set:function(a){n=d3.functor(a)}},y:{get:function(){return o},set:function(a){o=d3.functor(a)}},margin:{get:function(){return g},set:function(a){g.top=void 0!==a.top?a.top:g.top,g.right=void 0!==a.right?a.right:g.right,g.bottom=void 0!==a.bottom?a.bottom:g.bottom,g.left=void 0!==a.left?a.left:g.left}},color:{get:function(){return p},set:function(b){p=a.utils.getColor(b)}}}),b.dispatch=s,a.utils.initOptions(b),b},a.models.sparklinePlus=function(){\"use strict\";function b(p){return r.reset(),r.models(e),p.each(function(p){function q(){if(!j){var a=z.selectAll(\".nv-hoverValue\").data(i),b=a.enter().append(\"g\").attr(\"class\",\"nv-hoverValue\").style(\"stroke-opacity\",0).style(\"fill-opacity\",0);a.exit().transition().duration(250).style(\"stroke-opacity\",0).style(\"fill-opacity\",0).remove(),a.attr(\"transform\",function(a){return\"translate(\"+c(e.x()(p[a],a))+\",0)\"}).transition().duration(250).style(\"stroke-opacity\",1).style(\"fill-opacity\",1),i.length&&(b.append(\"line\").attr(\"x1\",0).attr(\"y1\",-f.top).attr(\"x2\",0).attr(\"y2\",u),b.append(\"text\").attr(\"class\",\"nv-xValue\").attr(\"x\",-6).attr(\"y\",-f.top).attr(\"text-anchor\",\"end\").attr(\"dy\",\".9em\"),z.select(\".nv-hoverValue .nv-xValue\").text(k(e.x()(p[i[0]],i[0]))),b.append(\"text\").attr(\"class\",\"nv-yValue\").attr(\"x\",6).attr(\"y\",-f.top).attr(\"text-anchor\",\"start\").attr(\"dy\",\".9em\"),z.select(\".nv-hoverValue .nv-yValue\").text(l(e.y()(p[i[0]],i[0]))))}}function r(){function a(a,b){for(var c=Math.abs(e.x()(a[0],0)-b),d=0,f=0;f<a.length;f++)Math.abs(e.x()(a[f],f)-b)<c&&(c=Math.abs(e.x()(a[f],f)-b),d=f);return d}if(!j){var b=d3.mouse(this)[0]-f.left;i=[a(p,Math.round(c.invert(b)))],q()}}var s=d3.select(this);a.utils.initSVG(s);var t=a.utils.availableWidth(g,s,f),u=a.utils.availableHeight(h,s,f);if(b.update=function(){s.call(b)},b.container=this,!p||!p.length)return a.utils.noData(b,s),b;s.selectAll(\".nv-noData\").remove();var v=e.y()(p[p.length-1],p.length-1);c=e.xScale(),d=e.yScale();var w=s.selectAll(\"g.nv-wrap.nv-sparklineplus\").data([p]),x=w.enter().append(\"g\").attr(\"class\",\"nvd3 nv-wrap nv-sparklineplus\"),y=x.append(\"g\"),z=w.select(\"g\");y.append(\"g\").attr(\"class\",\"nv-sparklineWrap\"),y.append(\"g\").attr(\"class\",\"nv-valueWrap\"),y.append(\"g\").attr(\"class\",\"nv-hoverArea\"),w.attr(\"transform\",\"translate(\"+f.left+\",\"+f.top+\")\");var A=z.select(\".nv-sparklineWrap\");if(e.width(t).height(u),A.call(e),m){var B=z.select(\".nv-valueWrap\"),C=B.selectAll(\".nv-currentValue\").data([v]);C.enter().append(\"text\").attr(\"class\",\"nv-currentValue\").attr(\"dx\",o?-8:8).attr(\"dy\",\".9em\").style(\"text-anchor\",o?\"end\":\"start\"),C.attr(\"x\",t+(o?f.right:0)).attr(\"y\",n?function(a){return d(a)}:0).style(\"fill\",e.color()(p[p.length-1],p.length-1)).text(l(v))}y.select(\".nv-hoverArea\").append(\"rect\").on(\"mousemove\",r).on(\"click\",function(){j=!j}).on(\"mouseout\",function(){i=[],q()}),z.select(\".nv-hoverArea rect\").attr(\"transform\",function(a){return\"translate(\"+-f.left+\",\"+-f.top+\")\"}).attr(\"width\",t+f.left+f.right).attr(\"height\",u+f.top)}),r.renderEnd(\"sparklinePlus immediate\"),b}var c,d,e=a.models.sparkline(),f={top:15,right:100,bottom:10,left:50},g=null,h=null,i=[],j=!1,k=d3.format(\",r\"),l=d3.format(\",.2f\"),m=!0,n=!0,o=!1,p=null,q=d3.dispatch(\"renderEnd\"),r=a.utils.renderWatch(q);return b.dispatch=q,b.sparkline=e,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return g},set:function(a){g=a}},height:{get:function(){return h},set:function(a){h=a}},xTickFormat:{get:function(){return k},set:function(a){k=a}},yTickFormat:{get:function(){return l},set:function(a){l=a}},showLastValue:{get:function(){return m},set:function(a){m=a}},alignValue:{get:function(){return n},set:function(a){n=a}},rightAlignValue:{get:function(){return o},set:function(a){o=a}},noData:{get:function(){return p},set:function(a){p=a}},margin:{get:function(){return f},set:function(a){f.top=void 0!==a.top?a.top:f.top,f.right=void 0!==a.right?a.right:f.right,f.bottom=void 0!==a.bottom?a.bottom:f.bottom,f.left=void 0!==a.left?a.left:f.left}}}),a.utils.inheritOptions(b,e),a.utils.initOptions(b),b},a.models.stackedArea=function(){\"use strict\";function b(n){return v.reset(),v.models(s),n.each(function(n){var t=f-e.left-e.right,w=g-e.top-e.bottom;j=d3.select(this),a.utils.initSVG(j),c=s.xScale(),d=s.yScale();var x=n;n.forEach(function(a,b){a.seriesIndex=b,a.values=a.values.map(function(a,c){return a.index=c,a.seriesIndex=b,a})});var y=n.filter(function(a){return!a.disabled});n=d3.layout.stack().order(p).offset(o).values(function(a){return a.values}).x(k).y(l).out(function(a,b,c){a.display={y:c,y0:b}})(y);var z=j.selectAll(\"g.nv-wrap.nv-stackedarea\").data([n]),A=z.enter().append(\"g\").attr(\"class\",\"nvd3 nv-wrap nv-stackedarea\"),B=A.append(\"defs\"),C=A.append(\"g\"),D=z.select(\"g\");C.append(\"g\").attr(\"class\",\"nv-areaWrap\"),C.append(\"g\").attr(\"class\",\"nv-scatterWrap\"),z.attr(\"transform\",\"translate(\"+e.left+\",\"+e.top+\")\"),0==s.forceY().length&&s.forceY().push(0),s.width(t).height(w).x(k).y(function(a){return void 0!==a.display?a.display.y+a.display.y0:void 0}).color(n.map(function(a,b){return a.color=a.color||h(a,a.seriesIndex),a.color}));var E=D.select(\".nv-scatterWrap\").datum(n);E.call(s),B.append(\"clipPath\").attr(\"id\",\"nv-edge-clip-\"+i).append(\"rect\"),z.select(\"#nv-edge-clip-\"+i+\" rect\").attr(\"width\",t).attr(\"height\",w),D.attr(\"clip-path\",r?\"url(#nv-edge-clip-\"+i+\")\":\"\");var F=d3.svg.area().defined(m).x(function(a,b){return c(k(a,b))}).y0(function(a){return d(a.display.y0)}).y1(function(a){return d(a.display.y+a.display.y0)}).interpolate(q),G=d3.svg.area().defined(m).x(function(a,b){return c(k(a,b))}).y0(function(a){return d(a.display.y0)}).y1(function(a){return d(a.display.y0)}),H=D.select(\".nv-areaWrap\").selectAll(\"path.nv-area\").data(function(a){return a});H.enter().append(\"path\").attr(\"class\",function(a,b){return\"nv-area nv-area-\"+b}).attr(\"d\",function(a,b){return G(a.values,a.seriesIndex)}).on(\"mouseover\",function(a,b){d3.select(this).classed(\"hover\",!0),u.areaMouseover({point:a,series:a.key,pos:[d3.event.pageX,d3.event.pageY],seriesIndex:a.seriesIndex})}).on(\"mouseout\",function(a,b){d3.select(this).classed(\"hover\",!1),u.areaMouseout({point:a,series:a.key,pos:[d3.event.pageX,d3.event.pageY],seriesIndex:a.seriesIndex})}).on(\"click\",function(a,b){d3.select(this).classed(\"hover\",!1),u.areaClick({point:a,series:a.key,pos:[d3.event.pageX,d3.event.pageY],seriesIndex:a.seriesIndex})}),H.exit().remove(),H.style(\"fill\",function(a,b){return a.color||h(a,a.seriesIndex)}).style(\"stroke\",function(a,b){return a.color||h(a,a.seriesIndex)}),H.watchTransition(v,\"stackedArea path\").attr(\"d\",function(a,b){return F(a.values,b)}),s.dispatch.on(\"elementMouseover.area\",function(a){D.select(\".nv-chart-\"+i+\" .nv-area-\"+a.seriesIndex).classed(\"hover\",!0)}),s.dispatch.on(\"elementMouseout.area\",function(a){D.select(\".nv-chart-\"+i+\" .nv-area-\"+a.seriesIndex).classed(\"hover\",!1)}),b.d3_stackedOffset_stackPercent=function(a){var b,c,d,e=a.length,f=a[0].length,g=[];for(c=0;f>c;++c){for(b=0,d=0;b<x.length;b++)d+=l(x[b].values[c]);if(d)for(b=0;e>b;b++)a[b][c][1]/=d;else for(b=0;e>b;b++)a[b][c][1]=0}for(c=0;f>c;++c)g[c]=0;return g}}),v.renderEnd(\"stackedArea immediate\"),b}var c,d,e={top:0,right:0,bottom:0,left:0},f=960,g=500,h=a.utils.defaultColor(),i=Math.floor(1e5*Math.random()),j=null,k=function(a){return a.x},l=function(a){return a.y},m=function(a,b){return!isNaN(l(a,b))&&null!==l(a,b)},n=\"stack\",o=\"zero\",p=\"default\",q=\"linear\",r=!1,s=a.models.scatter(),t=250,u=d3.dispatch(\"areaClick\",\"areaMouseover\",\"areaMouseout\",\"renderEnd\",\"elementClick\",\"elementMouseover\",\"elementMouseout\");s.pointSize(2.2).pointDomain([2.2,2.2]);var v=a.utils.renderWatch(u,t);return b.dispatch=u,b.scatter=s,s.dispatch.on(\"elementClick\",function(){u.elementClick.apply(this,arguments)}),s.dispatch.on(\"elementMouseover\",function(){u.elementMouseover.apply(this,arguments)}),s.dispatch.on(\"elementMouseout\",function(){u.elementMouseout.apply(this,arguments)}),b.interpolate=function(a){return arguments.length?(q=a,b):q},b.duration=function(a){return arguments.length?(t=a,v.reset(t),s.duration(t),b):t},b.dispatch=u,b.scatter=s,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return f},set:function(a){f=a}},height:{get:function(){return g},set:function(a){g=a}},defined:{get:function(){return m},set:function(a){m=a}},clipEdge:{get:function(){return r},set:function(a){r=a}},offset:{get:function(){return o},set:function(a){o=a}},order:{get:function(){return p},set:function(a){p=a}},interpolate:{get:function(){return q},set:function(a){q=a}},x:{get:function(){return k},set:function(a){k=d3.functor(a)}},y:{get:function(){return l},set:function(a){l=d3.functor(a)}},margin:{get:function(){return e},set:function(a){e.top=void 0!==a.top?a.top:e.top,e.right=void 0!==a.right?a.right:e.right,e.bottom=void 0!==a.bottom?a.bottom:e.bottom,e.left=void 0!==a.left?a.left:e.left}},color:{get:function(){return h},set:function(b){h=a.utils.getColor(b)}},style:{get:function(){return n},set:function(a){switch(n=a){case\"stack\":b.offset(\"zero\"),b.order(\"default\");break;case\"stream\":b.offset(\"wiggle\"),b.order(\"inside-out\");break;case\"stream-center\":b.offset(\"silhouette\"),b.order(\"inside-out\");break;case\"expand\":b.offset(\"expand\"),b.order(\"default\");break;case\"stack_percent\":b.offset(b.d3_stackedOffset_stackPercent),b.order(\"default\")}}},duration:{get:function(){return t},set:function(a){t=a,v.reset(t),s.duration(t)}}}),a.utils.inheritOptions(b,s),a.utils.initOptions(b),b},a.models.stackedAreaChart=function(){\"use strict\";function b(k){return J.reset(),J.models(e),s&&J.models(f),t&&J.models(g),k.each(function(k){function B(){s&&V.select(\".nv-focus .nv-x.nv-axis\").attr(\"transform\",\"translate(0,\"+R+\")\").transition().duration(G).call(f)}function J(){if(t){if(\"expand\"===e.style()||\"stack_percent\"===e.style()){var a=g.tickFormat();H&&a===N||(H=a),g.tickFormat(N)}else H&&(g.tickFormat(H),H=null);V.select(\".nv-focus .nv-y.nv-axis\").transition().duration(0).call(g)}}function O(a){var b=V.select(\".nv-focus .nv-stackedWrap\").datum(k.filter(function(a){return!a.disabled}).map(function(b,c){return{key:b.key,area:b.area,classed:b.classed,values:b.values.filter(function(b,c){return e.x()(b,c)>=a[0]&&e.x()(b,c)<=a[1]}),disableTooltip:b.disableTooltip}}));b.transition().duration(G).call(e),B(),J()}var P=d3.select(this);a.utils.initSVG(P);var Q=a.utils.availableWidth(n,P,m),R=a.utils.availableHeight(o,P,m)-(v?l.height():0);if(b.update=function(){P.transition().duration(G).call(b)},b.container=this,z.setter(M(k),b.update).getter(L(k)).update(),z.disabled=k.map(function(a){return!!a.disabled}),!A){var S;A={};for(S in z)z[S]instanceof Array?A[S]=z[S].slice(0):A[S]=z[S]}if(!(k&&k.length&&k.filter(function(a){return a.values.length}).length))return a.utils.noData(b,P),b;P.selectAll(\".nv-noData\").remove(),c=e.xScale(),d=e.yScale();var T=P.selectAll(\"g.nv-wrap.nv-stackedAreaChart\").data([k]),U=T.enter().append(\"g\").attr(\"class\",\"nvd3 nv-wrap nv-stackedAreaChart\").append(\"g\"),V=T.select(\"g\");U.append(\"g\").attr(\"class\",\"nv-legendWrap\"),U.append(\"g\").attr(\"class\",\"nv-controlsWrap\");var W=U.append(\"g\").attr(\"class\",\"nv-focus\");W.append(\"g\").attr(\"class\",\"nv-background\").append(\"rect\"),W.append(\"g\").attr(\"class\",\"nv-x nv-axis\"),W.append(\"g\").attr(\"class\",\"nv-y nv-axis\"),W.append(\"g\").attr(\"class\",\"nv-stackedWrap\"),W.append(\"g\").attr(\"class\",\"nv-interactive\");U.append(\"g\").attr(\"class\",\"nv-focusWrap\");if(r){var X=q?Q-D:Q;h.width(X),V.select(\".nv-legendWrap\").datum(k).call(h),h.height()>m.top&&(m.top=h.height(),R=a.utils.availableHeight(o,P,m)-(v?l.height():0)),V.select(\".nv-legendWrap\").attr(\"transform\",\"translate(\"+(Q-X)+\",\"+-m.top+\")\")}else V.select(\".nv-legendWrap\").selectAll(\"*\").remove();if(q){var Y=[{key:F.stacked||\"Stacked\",metaKey:\"Stacked\",disabled:\"stack\"!=e.style(),style:\"stack\"},{key:F.stream||\"Stream\",metaKey:\"Stream\",disabled:\"stream\"!=e.style(),style:\"stream\"},{key:F.expanded||\"Expanded\",metaKey:\"Expanded\",disabled:\"expand\"!=e.style(),style:\"expand\"},{key:F.stack_percent||\"Stack %\",metaKey:\"Stack_Percent\",disabled:\"stack_percent\"!=e.style(),style:\"stack_percent\"}];D=E.length/3*260,Y=Y.filter(function(a){return-1!==E.indexOf(a.metaKey)}),i.width(D).color([\"#444\",\"#444\",\"#444\"]),V.select(\".nv-controlsWrap\").datum(Y).call(i),Math.max(i.height(),h.height())>m.top&&(m.top=Math.max(i.height(),h.height()),R=a.utils.availableHeight(o,P,m)),V.select(\".nv-controlsWrap\").attr(\"transform\",\"translate(0,\"+-m.top+\")\")}else V.select(\".nv-controlsWrap\").selectAll(\"*\").remove();T.attr(\"transform\",\"translate(\"+m.left+\",\"+m.top+\")\"),u&&V.select(\".nv-y.nv-axis\").attr(\"transform\",\"translate(\"+Q+\",0)\"),w&&(j.width(Q).height(R).margin({left:m.left,top:m.top}).svgContainer(P).xScale(c),T.select(\".nv-interactive\").call(j)),V.select(\".nv-focus .nv-background rect\").attr(\"width\",Q).attr(\"height\",R),e.width(Q).height(R).color(k.map(function(a,b){return a.color||p(a,b)}).filter(function(a,b){return!k[b].disabled}));var Z=V.select(\".nv-focus .nv-stackedWrap\").datum(k.filter(function(a){return!a.disabled}));if(s&&f.scale(c)._ticks(a.utils.calcTicksX(Q/100,k)).tickSize(-R,0),t){var $;$=\"wiggle\"===e.offset()?0:a.utils.calcTicksY(R/36,k),g.scale(d)._ticks($).tickSize(-Q,0)}if(v){l.width(Q),V.select(\".nv-focusWrap\").attr(\"transform\",\"translate(0,\"+(R+m.bottom+l.margin().top)+\")\").datum(k.filter(function(a){return!a.disabled})).call(l);var _=l.brush.empty()?l.xDomain():l.brush.extent();null!==_&&O(_)}else Z.transition().call(e),B(),J();e.dispatch.on(\"areaClick.toggle\",function(a){1===k.filter(function(a){return!a.disabled}).length?k.forEach(function(a){a.disabled=!1}):k.forEach(function(b,c){b.disabled=c!=a.seriesIndex}),z.disabled=k.map(function(a){return!!a.disabled}),C.stateChange(z),b.update()}),h.dispatch.on(\"stateChange\",function(a){for(var c in a)z[c]=a[c];C.stateChange(z),b.update()}),i.dispatch.on(\"legendClick\",function(a,c){a.disabled&&(Y=Y.map(function(a){return a.disabled=!0,a}),a.disabled=!1,e.style(a.style),z.style=e.style(),C.stateChange(z),b.update())}),j.dispatch.on(\"elementMousemove\",function(c){e.clearHighlights();var d,f,g,h=[],i=0,l=!0;if(k.filter(function(a,b){return a.seriesIndex=b,!a.disabled}).forEach(function(j,k){f=a.interactiveBisect(j.values,c.pointXValue,b.x());var m=j.values[f],n=b.y()(m,f);if(null!=n&&e.highlightPoint(k,f,!0),\"undefined\"!=typeof m){\"undefined\"==typeof d&&(d=m),\"undefined\"==typeof g&&(g=b.xScale()(b.x()(m,f)));var o=\"expand\"==e.style()?m.display.y:b.y()(m,f);h.push({key:j.key,value:o,color:p(j,j.seriesIndex),point:m}),x&&\"expand\"!=e.style()&&null!=o&&(i+=o,l=!1)}}),h.reverse(),h.length>2){var m=b.yScale().invert(c.mouseY),n=null;h.forEach(function(a,b){m=Math.abs(m);var c=Math.abs(a.point.display.y0),d=Math.abs(a.point.display.y);return m>=c&&d+c>=m?void(n=b):void 0}),null!=n&&(h[n].highlight=!0)}x&&\"expand\"!=e.style()&&h.length>=2&&!l&&h.push({key:y,value:i,total:!0});var o=b.x()(d,f),q=j.tooltip.valueFormatter();\"expand\"===e.style()||\"stack_percent\"===e.style()?(I||(I=q),q=d3.format(\".1%\")):I&&(q=I,I=null),j.tooltip.valueFormatter(q).data({value:o,series:h})(),j.renderGuideLine(g)}),j.dispatch.on(\"elementMouseout\",function(a){e.clearHighlights()}),l.dispatch.on(\"onBrush\",function(a){O(a)}),C.on(\"changeState\",function(a){\"undefined\"!=typeof a.disabled&&k.length===a.disabled.length&&(k.forEach(function(b,c){b.disabled=a.disabled[c]}),z.disabled=a.disabled),\"undefined\"!=typeof a.style&&(e.style(a.style),K=a.style),b.update()})}),J.renderEnd(\"stacked Area chart immediate\"),b}var c,d,e=a.models.stackedArea(),f=a.models.axis(),g=a.models.axis(),h=a.models.legend(),i=a.models.legend(),j=a.interactiveGuideline(),k=a.models.tooltip(),l=a.models.focus(a.models.stackedArea()),m={top:30,right:25,bottom:50,left:60},n=null,o=null,p=a.utils.defaultColor(),q=!0,r=!0,s=!0,t=!0,u=!1,v=!1,w=!1,x=!0,y=\"TOTAL\",z=a.utils.state(),A=null,B=null,C=d3.dispatch(\"stateChange\",\"changeState\",\"renderEnd\"),D=250,E=[\"Stacked\",\"Stream\",\"Expanded\"],F={},G=250;z.style=e.style(),f.orient(\"bottom\").tickPadding(7),g.orient(u?\"right\":\"left\"),k.headerFormatter(function(a,b){return f.tickFormat()(a,b)}).valueFormatter(function(a,b){return g.tickFormat()(a,b)}),j.tooltip.headerFormatter(function(a,b){return f.tickFormat()(a,b)}).valueFormatter(function(a,b){return null==a?\"N/A\":g.tickFormat()(a,b)});var H=null,I=null;i.updateState(!1);var J=a.utils.renderWatch(C),K=e.style(),L=function(a){return function(){return{active:a.map(function(a){return!a.disabled}),style:e.style()}}},M=function(a){return function(b){void 0!==b.style&&(K=b.style),void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}},N=d3.format(\"%\");return e.dispatch.on(\"elementMouseover.tooltip\",function(a){a.point.x=e.x()(a.point),a.point.y=e.y()(a.point),k.data(a).hidden(!1)}),e.dispatch.on(\"elementMouseout.tooltip\",function(a){k.hidden(!0)}),b.dispatch=C,b.stacked=e,b.legend=h,b.controls=i,b.xAxis=f,b.x2Axis=l.xAxis,b.yAxis=g,b.y2Axis=l.yAxis,b.interactiveLayer=j,b.tooltip=k,b.focus=l,b.dispatch=C,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return n},set:function(a){n=a}},height:{get:function(){return o},set:function(a){o=a}},showLegend:{get:function(){return r},set:function(a){r=a}},showXAxis:{get:function(){return s},set:function(a){s=a}},showYAxis:{get:function(){return t},set:function(a){t=a}},defaultState:{get:function(){return A},set:function(a){A=a}},noData:{get:function(){return B},set:function(a){B=a}},showControls:{get:function(){return q},set:function(a){q=a}},controlLabels:{get:function(){return F},set:function(a){F=a}},controlOptions:{get:function(){return E},set:function(a){E=a}},showTotalInTooltip:{get:function(){return x},set:function(a){x=a}},totalLabel:{get:function(){return y},set:function(a){y=a}},focusEnable:{get:function(){return v},set:function(a){v=a}},focusHeight:{get:function(){return l.height()},set:function(a){l.height(a)}},brushExtent:{get:function(){return l.brushExtent()},set:function(a){l.brushExtent(a)}},margin:{get:function(){return m},set:function(a){m.top=void 0!==a.top?a.top:m.top,m.right=void 0!==a.right?a.right:m.right,m.bottom=void 0!==a.bottom?a.bottom:m.bottom,m.left=void 0!==a.left?a.left:m.left}},focusMargin:{get:function(){return l.margin},set:function(a){l.margin.top=void 0!==a.top?a.top:l.margin.top,l.margin.right=void 0!==a.right?a.right:l.margin.right,l.margin.bottom=void 0!==a.bottom?a.bottom:l.margin.bottom,l.margin.left=void 0!==a.left?a.left:l.margin.left}},duration:{get:function(){return G},set:function(a){G=a,J.reset(G),e.duration(G),f.duration(G),g.duration(G)}},color:{get:function(){return p},set:function(b){p=a.utils.getColor(b),h.color(p),e.color(p),l.color(p)}},x:{get:function(){return e.x()},set:function(a){e.x(a),l.x(a)}},y:{get:function(){return e.y()},set:function(a){e.y(a),l.y(a)}},rightAlignYAxis:{get:function(){return u},set:function(a){u=a,g.orient(u?\"right\":\"left\")}},useInteractiveGuideline:{get:function(){return w},set:function(a){w=!!a,b.interactive(!a),b.useVoronoi(!a),e.scatter.interactive(!a)}}}),a.utils.inheritOptions(b,e),a.utils.initOptions(b),b},a.models.stackedAreaWithFocusChart=function(){return a.models.stackedAreaChart().margin({bottom:30}).focusEnable(!0)},a.models.sunburst=function(){\"use strict\";function b(a){var b=c(a);return b>90?180:0}function c(a){var b=Math.max(0,Math.min(2*Math.PI,F(a.x))),c=Math.max(0,Math.min(2*Math.PI,F(a.x+a.dx))),d=(b+c)/2*(180/Math.PI)-90;return d}function d(a){var b=Math.max(0,Math.min(2*Math.PI,F(a.x))),c=Math.max(0,Math.min(2*Math.PI,F(a.x+a.dx)));return(c-b)/(2*Math.PI)}function e(a){var b=Math.max(0,Math.min(2*Math.PI,F(a.x))),c=Math.max(0,Math.min(2*Math.PI,F(a.x+a.dx))),d=c-b;return d>z}function f(a,b){var c=d3.interpolate(F.domain(),[l.x,l.x+l.dx]),d=d3.interpolate(G.domain(),[l.y,1]),e=d3.interpolate(G.range(),[l.y?20:0,o]);return 0===b?function(){return J(a)}:function(b){return F.domain(c(b)),G.domain(d(b)).range(e(b)),J(a)}}function g(a){var b=d3.interpolate({x:a.x0,dx:a.dx0,y:a.y0,dy:a.dy0},a);return function(c){var d=b(c);return a.x0=d.x,a.dx0=d.dx,a.y0=d.y,a.dy0=d.dy,J(d)}}function h(a){var b=B(a);I[b]||(I[b]={});var c=I[b];c.dx=a.dx,c.x=a.x,c.dy=a.dy,c.y=a.y}function i(a){a.forEach(function(a){var b=B(a),c=I[b];c?(a.dx0=c.dx,a.x0=c.x,a.dy0=c.dy,a.y0=c.y):(a.dx0=a.dx,a.x0=a.x,a.dy0=a.dy,a.y0=a.y),h(a)})}function j(a){var d=v.selectAll(\"text\"),g=v.selectAll(\"path\");d.transition().attr(\"opacity\",0),l=a,g.transition().duration(D).attrTween(\"d\",f).each(\"end\",function(d){if(d.x>=a.x&&d.x<a.x+a.dx&&d.depth>=a.depth){var f=d3.select(this.parentNode),g=f.select(\"text\");g.transition().duration(D).text(function(a){return y(a)}).attr(\"opacity\",function(a){return e(a)?1:0}).attr(\"transform\",function(){var e=this.getBBox().width;if(0===d.depth)return\"translate(\"+e/2*-1+\",0)\";if(d.depth===a.depth)return\"translate(\"+(G(d.y)+5)+\",0)\";var f=c(d),g=b(d);return 0===g?\"rotate(\"+f+\")translate(\"+(G(d.y)+5)+\",0)\":\"rotate(\"+f+\")translate(\"+(G(d.y)+e+5)+\",0)rotate(\"+g+\")\"})}})}function k(f){return K.reset(),f.each(function(f){v=d3.select(this),m=a.utils.availableWidth(q,v,p),n=a.utils.availableHeight(r,v,p),o=Math.min(m,n)/2,G.range([0,o]);var h=v.select(\"g.nvd3.nv-wrap.nv-sunburst\");h[0][0]?h.attr(\"transform\",\"translate(\"+(m/2+p.left+p.right)+\",\"+(n/2+p.top+p.bottom)+\")\"):h=v.append(\"g\").attr(\"class\",\"nvd3 nv-wrap nv-sunburst nv-chart-\"+u).attr(\"transform\",\"translate(\"+(m/2+p.left+p.right)+\",\"+(n/2+p.top+p.bottom)+\")\"),v.on(\"click\",function(a,b){E.chartClick({data:a,index:b,pos:d3.event,id:u})}),H.value(t[s]||t.count);var k=H.nodes(f[0]).reverse();i(k);var l=h.selectAll(\".arc-container\").data(k,B),z=l.enter().append(\"g\").attr(\"class\",\"arc-container\");z.append(\"path\").attr(\"d\",J).style(\"fill\",function(a){return a.color?a.color:w(C?(a.children?a:a.parent).name:a.name)}).style(\"stroke\",\"#FFF\").on(\"click\",j).on(\"mouseover\",function(a,b){d3.select(this).classed(\"hover\",!0).style(\"opacity\",.8),E.elementMouseover({data:a,color:d3.select(this).style(\"fill\"),percent:d(a)})}).on(\"mouseout\",function(a,b){d3.select(this).classed(\"hover\",!1).style(\"opacity\",1),E.elementMouseout({data:a})}).on(\"mousemove\",function(a,b){E.elementMousemove({data:a})}),l.each(function(a){d3.select(this).select(\"path\").transition().duration(D).attrTween(\"d\",g)}),x&&(l.selectAll(\"text\").remove(),l.append(\"text\").text(function(a){return y(a)}).transition().duration(D).attr(\"opacity\",function(a){return e(a)?1:0}).attr(\"transform\",function(a){var d=this.getBBox().width;if(0===a.depth)return\"rotate(0)translate(\"+d/2*-1+\",0)\";var e=c(a),f=b(a);return 0===f?\"rotate(\"+e+\")translate(\"+(G(a.y)+5)+\",0)\":\"rotate(\"+e+\")translate(\"+(G(a.y)+d+5)+\",0)rotate(\"+f+\")\"})),j(k[k.length-1]),l.exit().transition().duration(D).attr(\"opacity\",0).each(\"end\",function(a){var b=B(a);I[b]=void 0}).remove()}),K.renderEnd(\"sunburst immediate\"),k}var l,m,n,o,p={top:0,right:0,bottom:0,left:0},q=600,r=600,s=\"count\",t={count:function(a){return 1},value:function(a){return a.value||a.size},size:function(a){return a.value||a.size}},u=Math.floor(1e4*Math.random()),v=null,w=a.utils.defaultColor(),x=!1,y=function(a){return\"count\"===s?a.name+\" #\"+a.value:a.name+\" \"+(a.value||a.size)},z=.02,A=function(a,b){return a.name>b.name},B=function(a,b){return a.name},C=!0,D=500,E=d3.dispatch(\"chartClick\",\"elementClick\",\"elementDblClick\",\"elementMousemove\",\"elementMouseover\",\"elementMouseout\",\"renderEnd\"),F=d3.scale.linear().range([0,2*Math.PI]),G=d3.scale.sqrt(),H=d3.layout.partition().sort(A),I={},J=d3.svg.arc().startAngle(function(a){return Math.max(0,Math.min(2*Math.PI,F(a.x)))}).endAngle(function(a){return Math.max(0,Math.min(2*Math.PI,F(a.x+a.dx)))}).innerRadius(function(a){return Math.max(0,G(a.y))}).outerRadius(function(a){return Math.max(0,G(a.y+a.dy))}),K=a.utils.renderWatch(E);return k.dispatch=E,k.options=a.utils.optionsFunc.bind(k),k._options=Object.create({},{width:{get:function(){return q},set:function(a){q=a}},height:{get:function(){return r},set:function(a){r=a}},mode:{get:function(){return s},set:function(a){s=a}},id:{get:function(){return u},set:function(a){u=a}},duration:{get:function(){return D},set:function(a){D=a}},groupColorByParent:{get:function(){return C},set:function(a){C=!!a}},showLabels:{get:function(){return x},set:function(a){x=!!a}},labelFormat:{get:function(){return y},set:function(a){y=a}},labelThreshold:{get:function(){return z},set:function(a){z=a}},sort:{get:function(){return A},set:function(a){A=a}},key:{get:function(){return B},set:function(a){B=a}},margin:{get:function(){return p},set:function(a){p.top=void 0!=a.top?a.top:p.top,p.right=void 0!=a.right?a.right:p.right,p.bottom=void 0!=a.bottom?a.bottom:p.bottom,p.left=void 0!=a.left?a.left:p.left}},color:{get:function(){return w},set:function(b){w=a.utils.getColor(b)}}}),a.utils.initOptions(k),k},a.models.sunburstChart=function(){\"use strict\";function b(d){return n.reset(),n.models(c),d.each(function(d){var h=d3.select(this);a.utils.initSVG(h);var i=a.utils.availableWidth(f,h,e),j=a.utils.availableHeight(g,h,e);return b.update=function(){0===l?h.call(b):h.transition().duration(l).call(b)},b.container=h,d&&d.length?(h.selectAll(\".nv-noData\").remove(),c.width(i).height(j).margin(e),void h.call(c)):(a.utils.noData(b,h),b)}),n.renderEnd(\"sunburstChart immediate\"),b}var c=a.models.sunburst(),d=a.models.tooltip(),e={top:30,right:20,bottom:20,left:20},f=null,g=null,h=a.utils.defaultColor(),i=!1,j=(Math.round(1e5*Math.random()),null),k=null,l=250,m=d3.dispatch(\"stateChange\",\"changeState\",\"renderEnd\"),n=a.utils.renderWatch(m);return d.duration(0).headerEnabled(!1).valueFormatter(function(a){return a}),c.dispatch.on(\"elementMouseover.tooltip\",function(a){a.series={key:a.data.name,value:a.data.value||a.data.size,color:a.color,percent:a.percent},i||(delete a.percent,delete a.series.percent),d.data(a).hidden(!1)}),c.dispatch.on(\"elementMouseout.tooltip\",function(a){d.hidden(!0)}),c.dispatch.on(\"elementMousemove.tooltip\",function(a){d()}),b.dispatch=m,b.sunburst=c,b.tooltip=d,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{noData:{get:function(){return k},set:function(a){k=a}},defaultState:{get:function(){return j},set:function(a){j=a}},showTooltipPercent:{get:function(){return i},set:function(a){i=a}},color:{get:function(){return h},set:function(a){h=a,c.color(h)}},duration:{get:function(){return l},set:function(a){l=a,n.reset(l),c.duration(l)}},margin:{get:function(){return e},set:function(a){e.top=void 0!==a.top?a.top:e.top,e.right=void 0!==a.right?a.right:e.right,e.bottom=void 0!==a.bottom?a.bottom:e.bottom,e.left=void 0!==a.left?a.left:e.left,c.margin(e)}}}),a.utils.inheritOptions(b,c),a.utils.initOptions(b),b},a.version=\"1.8.4-dev\"}();"
  },
  {
    "path": "3rdparty/eigen3/bench/perf_monitoring/run.sh",
    "content": "#!/bin/bash\n\n# ./run.sh gemm gemm_settings.txt\n# ./run.sh lazy_gemm lazy_gemm_settings.txt\n# ./run.sh gemv gemv_settings.txt\n# ./run.sh trmv_up gemv_square_settings.txt\n# ...\n\n# Examples of environment variables to be set:\n#   PREFIX=\"haswell-fma-\"\n#   CXX_FLAGS=\"-mfma\"\n#   CXX=clang++\n\n# Options:\n#   -up : enforce the recomputation of existing data, and keep best results as a merging strategy\n#   -s  : recompute selected changesets only and keep bests\n#   -np : no plotting of results, just generate the data\n\nbench=$1\nsettings_file=$2\n\nif [[ \"$*\" =~ '-up' ]]; then\n  update=true\nelse\n  update=false\nfi\n\nif [[ \"$*\" =~ '-s' ]]; then\n  selected=true\nelse\n  selected=false\nfi\n\nif [[ \"$*\" =~ '-np' ]]; then\n  do_plot=false\nelse\n  do_plot=true\nfi\n\n\nWORKING_DIR=${PREFIX:?\"default\"}\n\nif [ -z \"$PREFIX\" ]; then\n  WORKING_DIR_PREFIX=\"$WORKING_DIR/\"\nelse\n  WORKING_DIR_PREFIX=\"$WORKING_DIR/$PREFIX-\"\nfi\necho \"WORKING_DIR_PREFIX=$WORKING_DIR_PREFIX\"\nmkdir -p $WORKING_DIR\n\nglobal_args=\"$*\"\n\nif $selected ; then\n echo \"Recompute selected changesets only and keep bests\"\nelif $update ; then\n echo \"(Re-)Compute all changesets and keep bests\"\nelse\n echo \"Skip previously computed changesets\"\nfi\n\n\n\nif [ ! -d \"eigen_src\" ]; then\n  git clone https://gitlab.com/libeigen/eigen.git eigen_src\nelse\n  cd eigen_src\n  git pull\n  cd ..\nfi\n\nif [ -z \"$CXX\" ]; then\n  CXX=g++\nfi\n\nfunction make_backup\n{\n  if [ -f \"$1.out\" ]; then\n    mv \"$1.out\" \"$1.backup\"\n  fi\n}\n\nfunction merge\n{\n  count1=`echo $1 |  wc -w`\n  count2=`echo $2 |  wc -w`\n  \n  if [ $count1 == $count2 ]; then\n    a=( $1 ); b=( $2 )\n    res=\"\"\n    for (( i=0 ; i<$count1 ; i++ )); do\n      ai=${a[$i]}; bi=${b[$i]}\n      tmp=`echo \"if ($ai > $bi) $ai else $bi \" | bc -l`\n      res=\"$res $tmp\"\n    done\n    echo $res\n\n  else\n    echo $1\n  fi\n}\n\nfunction test_current \n{\n  rev=$1\n  scalar=$2\n  name=$3\n  \n  prev=\"\"\n  if [ -e \"$name.backup\" ]; then\n    prev=`grep $rev \"$name.backup\" | cut -c 14-`\n  fi\n  res=$prev\n  count_rev=`echo $prev |  wc -w`\n  count_ref=`cat $settings_file |  wc -l`\n  if echo \"$global_args\" | grep \"$rev\" > /dev/null; then\n    rev_found=true\n  else\n    rev_found=false\n  fi\n#  echo $update et $selected et $rev_found because $rev et \"$global_args\"\n#  echo $count_rev et $count_ref\n  if $update || [ $count_rev != $count_ref ] || ( $selected &&  $rev_found ); then\n    echo \"RUN: $CXX -O3 -DNDEBUG -march=native $CXX_FLAGS -I eigen_src $bench.cpp -DSCALAR=$scalar -o $name\"\n    if $CXX -O3 -DNDEBUG -march=native $CXX_FLAGS -I eigen_src $bench.cpp -DSCALAR=$scalar -o $name; then\n      curr=`./$name $settings_file`\n      if [ $count_rev == $count_ref ]; then\n        echo \"merge previous $prev\"\n        echo \"with new       $curr\"\n      else\n        echo \"got            $curr\"\n      fi\n      res=`merge \"$curr\" \"$prev\"`\n#       echo $res\n      echo \"$rev $res\" >> $name.out\n    else\n      echo \"Compilation failed, skip rev $rev\"\n    fi\n  else\n    echo \"Skip existing results for $rev / $name\"\n    echo \"$rev $res\" >> $name.out\n  fi\n}\n\nmake_backup $WORKING_DIR_PREFIX\"s\"$bench\nmake_backup $WORKING_DIR_PREFIX\"d\"$bench\nmake_backup $WORKING_DIR_PREFIX\"c\"$bench\n\ncut -f1 -d\"#\" < changesets.txt | grep -E '[[:alnum:]]' | while read rev\ndo\n  if [ ! -z '$rev' ]; then\n    rev2=`echo $rev | cut -f 2 -d':'`\n    echo \"Testing rev $rev, $rev2\"\n    cd eigen_src\n    git checkout $rev2 > /dev/null\n    actual_rev=`git rev-parse --short HEAD`\n    cd ..\n    \n    test_current $actual_rev float                  $WORKING_DIR_PREFIX\"s\"$bench\n    test_current $actual_rev double                 $WORKING_DIR_PREFIX\"d\"$bench\n    test_current $actual_rev \"std::complex<double>\" $WORKING_DIR_PREFIX\"c\"$bench\n  fi\n  \ndone\n\necho \"Float:\"\ncat $WORKING_DIR_PREFIX\"s\"\"$bench.out\"\necho \" \"\n\necho \"Double:\"\ncat $WORKING_DIR_PREFIX\"d\"\"$bench.out\"\necho \"\"\n\necho \"Complex:\"\ncat $WORKING_DIR_PREFIX\"c\"\"$bench.out\"\necho \"\"\n\nif $do_plot ; then\n\n./make_plot.sh $WORKING_DIR_PREFIX\"s\"$bench $bench $settings_file\n./make_plot.sh $WORKING_DIR_PREFIX\"d\"$bench $bench $settings_file\n./make_plot.sh $WORKING_DIR_PREFIX\"c\"$bench $bench $settings_file\n\nfi\n"
  },
  {
    "path": "3rdparty/eigen3/bench/perf_monitoring/runall.sh",
    "content": "#!/bin/bash\n\n# ./runall.sh \"Title\"\n\n# Examples of environment variables to be set:\n#   PREFIX=\"haswell-fma-\"\n#   CXX_FLAGS=\"-mfma\"\n#   CXX=clang++\n\n# Options:\n#   -up : enforce the recomputation of existing data, and keep best results as a merging strategy\n#   -s  : recompute selected changesets only and keep bests\n#   -np : no plotting of results, just generate the data\n\nif [[ \"$*\" =~ '-np' ]]; then\n  do_plot=false\nelse\n  do_plot=true\nfi\n\n./run.sh gemm gemm_settings.txt $*\n./run.sh lazy_gemm lazy_gemm_settings.txt $*\n./run.sh gemv gemv_settings.txt $*\n./run.sh gemvt gemv_settings.txt $*\n./run.sh trmv_up gemv_square_settings.txt $*\n./run.sh trmv_lo gemv_square_settings.txt $*\n./run.sh trmv_upt gemv_square_settings.txt $*\n./run.sh trmv_lot gemv_square_settings.txt $*\n./run.sh llt gemm_square_settings.txt $*\n\nif $do_plot ; then\n\n# generate html file\n\nfunction print_td {\n  echo '<td><a href=\"'$PREFIX'-'$1\"$2\"'.html\"><img src=\"'$PREFIX'-'$1\"$2\"'.png\" title=\"'$3'\"></a></td>' >> $htmlfile\n}\n\nfunction print_tr {\n  echo '<tr><th colspan=\"3\">'\"$2\"'</th></tr>' >> $htmlfile\n  echo '<tr>' >> $htmlfile\n  print_td s $1 float\n  print_td d $1 double\n  print_td c $1 complex\n  echo '</tr>' >> $htmlfile\n}\n\nif [ -n \"$PREFIX\" ]; then\n\n\ncp resources/s1.js $PREFIX/\ncp resources/s2.js $PREFIX/\n\nhtmlfile=\"$PREFIX/index.html\"\ncat resources/header.html > $htmlfile\n\necho '<h1>'$1'</h1>' >> $htmlfile\necho '<table>' >> $htmlfile\nprint_tr gemm       'C += A &middot; B   &nbsp; (gemm)'\nprint_tr lazy_gemm  'C += A &middot; B   &nbsp; (gemm lazy)'\nprint_tr gemv       'y += A &middot; x   &nbsp; (gemv)'\nprint_tr gemvt      'y += A<sup>T</sup> &middot; x  &nbsp; (gemv)'\nprint_tr trmv_up    'y += U &middot; x   &nbsp; (trmv)'\nprint_tr trmv_upt   'y += U<sup>T</sup> &middot; x  &nbsp; (trmv)'\nprint_tr trmv_lo    'y += L &middot; x   &nbsp; (trmv)'\nprint_tr trmv_lot   'y += L<sup>T</sup> &middot; x  &nbsp; (trmv)'\nprint_tr trmv_lot   'L &middot; L<sup>T<sup> = A &nbsp;  (Cholesky,potrf)'\n\ncat resources/footer.html >> $htmlfile\n\nfi\nfi\n"
  },
  {
    "path": "3rdparty/eigen3/bench/perf_monitoring/trmv_lo.cpp",
    "content": "#include \"gemv_common.h\"\n\nEIGEN_DONT_INLINE\nvoid trmv(const Mat &A, const Vec &B, Vec &C)\n{\n  C.noalias() += A.triangularView<Lower>() * B;\n}\n\nint main(int argc, char **argv)\n{\n  return main_gemv(argc, argv, trmv);\n}\n"
  },
  {
    "path": "3rdparty/eigen3/bench/perf_monitoring/trmv_lot.cpp",
    "content": "#include \"gemv_common.h\"\n\nEIGEN_DONT_INLINE\nvoid trmv(const Mat &A, Vec &B, const Vec &C)\n{\n  B.noalias() += A.transpose().triangularView<Lower>() * C;\n}\n\nint main(int argc, char **argv)\n{\n  return main_gemv(argc, argv, trmv);\n}\n"
  },
  {
    "path": "3rdparty/eigen3/bench/perf_monitoring/trmv_up.cpp",
    "content": "#include \"gemv_common.h\"\n\nEIGEN_DONT_INLINE\nvoid trmv(const Mat &A, const Vec &B, Vec &C)\n{\n  C.noalias() += A.triangularView<Upper>() * B;\n}\n\nint main(int argc, char **argv)\n{\n  return main_gemv(argc, argv, trmv);\n}\n"
  },
  {
    "path": "3rdparty/eigen3/bench/perf_monitoring/trmv_upt.cpp",
    "content": "#include \"gemv_common.h\"\n\nEIGEN_DONT_INLINE\nvoid trmv(const Mat &A, Vec &B, const Vec &C)\n{\n  B.noalias() += A.transpose().triangularView<Upper>() * C;\n}\n\nint main(int argc, char **argv)\n{\n  return main_gemv(argc, argv, trmv);\n}\n"
  },
  {
    "path": "3rdparty/eigen3/bench/product_threshold.cpp",
    "content": "\n#include <iostream>\n#include <Eigen/Core>\n#include <bench/BenchTimer.h>\n\nusing namespace Eigen;\nusing namespace std;\n\n#define END 9\n\ntemplate<int S> struct map_size { enum { ret = S }; };\ntemplate<>  struct map_size<10> { enum { ret = 20 }; };\ntemplate<>  struct map_size<11> { enum { ret = 50 }; };\ntemplate<>  struct map_size<12> { enum { ret = 100 }; };\ntemplate<>  struct map_size<13> { enum { ret = 300 }; };\n\ntemplate<int M, int N,int K> struct alt_prod\n{\n  enum {\n    ret = M==1 && N==1 ? InnerProduct\n        : K==1 ? OuterProduct\n        : M==1 ? GemvProduct\n        : N==1 ? GemvProduct\n        : GemmProduct\n  };\n};\n        \nvoid print_mode(int mode)\n{\n  if(mode==InnerProduct) std::cout << \"i\";\n  if(mode==OuterProduct) std::cout << \"o\";\n  if(mode==CoeffBasedProductMode) std::cout << \"c\";\n  if(mode==LazyCoeffBasedProductMode) std::cout << \"l\";\n  if(mode==GemvProduct) std::cout << \"v\";\n  if(mode==GemmProduct) std::cout << \"m\";\n}\n\ntemplate<int Mode, typename Lhs, typename Rhs, typename Res>\nEIGEN_DONT_INLINE void prod(const Lhs& a, const Rhs& b, Res& c)\n{\n  c.noalias() += typename ProductReturnType<Lhs,Rhs,Mode>::Type(a,b);\n}\n\ntemplate<int M, int N, int K, typename Scalar, int Mode>\nEIGEN_DONT_INLINE void bench_prod()\n{\n  typedef Matrix<Scalar,M,K> Lhs; Lhs a; a.setRandom();\n  typedef Matrix<Scalar,K,N> Rhs; Rhs b; b.setRandom();\n  typedef Matrix<Scalar,M,N> Res; Res c; c.setRandom();\n\n  BenchTimer t;\n  double n = 2.*double(M)*double(N)*double(K);\n  int rep = 100000./n;\n  rep /= 2;\n  if(rep<1) rep = 1;\n  do {\n    rep *= 2;\n    t.reset();\n    BENCH(t,1,rep,prod<CoeffBasedProductMode>(a,b,c));\n  } while(t.best()<0.1);\n  \n  t.reset();\n  BENCH(t,5,rep,prod<Mode>(a,b,c));\n\n  print_mode(Mode);\n  std::cout << int(1e-6*n*rep/t.best()) << \"\\t\";\n}\n\ntemplate<int N> struct print_n;\ntemplate<int M, int N, int K> struct loop_on_m;\ntemplate<int M, int N, int K, typename Scalar, int Mode> struct loop_on_n;\n\ntemplate<int M, int N, int K>\nstruct loop_on_k\n{\n  static void run()\n  {\n    std::cout << \"K=\" << K << \"\\t\";\n    print_n<N>::run();\n    std::cout << \"\\n\";\n\n    loop_on_m<M,N,K>::run();\n    std::cout << \"\\n\\n\";\n\n    loop_on_k<M,N,K+1>::run();\n  }\n};\n\ntemplate<int M, int N>\nstruct loop_on_k<M,N,END> { static void run(){} };\n\n\ntemplate<int M, int N, int K>\nstruct loop_on_m\n{\n  static void run()\n  {\n    std::cout << M << \"f\\t\";\n    loop_on_n<M,N,K,float,CoeffBasedProductMode>::run();\n    std::cout << \"\\n\";\n    \n    std::cout << M << \"f\\t\";\n    loop_on_n<M,N,K,float,-1>::run();\n    std::cout << \"\\n\";\n\n    loop_on_m<M+1,N,K>::run();\n  }\n};\n\ntemplate<int N, int K>\nstruct loop_on_m<END,N,K> { static void run(){} };\n\ntemplate<int M, int N, int K, typename Scalar, int Mode>\nstruct loop_on_n\n{\n  static void run()\n  {\n    bench_prod<M,N,K,Scalar,Mode==-1? alt_prod<M,N,K>::ret : Mode>();\n    \n    loop_on_n<M,N+1,K,Scalar,Mode>::run();\n  }\n};\n\ntemplate<int M, int K, typename Scalar, int Mode>\nstruct loop_on_n<M,END,K,Scalar,Mode> { static void run(){} };\n\ntemplate<int N> struct print_n\n{\n  static void run()\n  {\n    std::cout << map_size<N>::ret << \"\\t\";\n    print_n<N+1>::run();\n  }\n};\n\ntemplate<> struct print_n<END> { static void run(){} };\n\nint main()\n{\n  loop_on_k<1,1,1>::run();\n  \n  return 0; \n}\n"
  },
  {
    "path": "3rdparty/eigen3/bench/quat_slerp.cpp",
    "content": "\n#include <iostream>\n#include <Eigen/Geometry>\n#include <bench/BenchTimer.h>\nusing namespace Eigen;\nusing namespace std;\n\n\n\ntemplate<typename Q>\nEIGEN_DONT_INLINE Q nlerp(const Q& a, const Q& b, typename Q::Scalar t)\n{\n  return Q((a.coeffs() * (1.0-t) + b.coeffs() * t).normalized());\n}\n\ntemplate<typename Q>\nEIGEN_DONT_INLINE Q slerp_eigen(const Q& a, const Q& b, typename Q::Scalar t)\n{\n  return a.slerp(t,b);\n}\n\ntemplate<typename Q>\nEIGEN_DONT_INLINE Q slerp_legacy(const Q& a, const Q& b, typename Q::Scalar t)\n{\n  typedef typename Q::Scalar Scalar;\n  static const Scalar one = Scalar(1) - dummy_precision<Scalar>();\n  Scalar d = a.dot(b);\n  Scalar absD = internal::abs(d);\n  if (absD>=one)\n    return a;\n\n  // theta is the angle between the 2 quaternions\n  Scalar theta = std::acos(absD);\n  Scalar sinTheta = internal::sin(theta);\n\n  Scalar scale0 = internal::sin( ( Scalar(1) - t ) * theta) / sinTheta;\n  Scalar scale1 = internal::sin( ( t * theta) ) / sinTheta;\n  if (d<0)\n    scale1 = -scale1;\n\n  return Q(scale0 * a.coeffs() + scale1 * b.coeffs());\n}\n\ntemplate<typename Q>\nEIGEN_DONT_INLINE Q slerp_legacy_nlerp(const Q& a, const Q& b, typename Q::Scalar t)\n{\n  typedef typename Q::Scalar Scalar;\n  static const Scalar one = Scalar(1) - epsilon<Scalar>();\n  Scalar d = a.dot(b);\n  Scalar absD = internal::abs(d);\n  \n  Scalar scale0;\n  Scalar scale1;\n  \n  if (absD>=one)\n  {\n    scale0 = Scalar(1) - t;\n    scale1 = t;\n  }\n  else\n  {\n    // theta is the angle between the 2 quaternions\n    Scalar theta = std::acos(absD);\n    Scalar sinTheta = internal::sin(theta);\n\n    scale0 = internal::sin( ( Scalar(1) - t ) * theta) / sinTheta;\n    scale1 = internal::sin( ( t * theta) ) / sinTheta;\n    if (d<0)\n      scale1 = -scale1;\n  }\n\n  return Q(scale0 * a.coeffs() + scale1 * b.coeffs());\n}\n\ntemplate<typename T>\ninline T sin_over_x(T x)\n{\n  if (T(1) + x*x == T(1))\n    return T(1);\n  else\n    return std::sin(x)/x;\n}\n\ntemplate<typename Q>\nEIGEN_DONT_INLINE Q slerp_rw(const Q& a, const Q& b, typename Q::Scalar t)\n{\n  typedef typename Q::Scalar Scalar;\n  \n  Scalar d = a.dot(b);\n  Scalar theta;\n  if (d<0.0)\n    theta = /*M_PI -*/ Scalar(2)*std::asin( (a.coeffs()+b.coeffs()).norm()/2 );\n  else\n    theta = Scalar(2)*std::asin( (a.coeffs()-b.coeffs()).norm()/2 );\n  \n  // theta is the angle between the 2 quaternions\n//   Scalar theta = std::acos(absD);\n  Scalar sinOverTheta = sin_over_x(theta);\n\n  Scalar scale0 = (Scalar(1)-t)*sin_over_x( ( Scalar(1) - t ) * theta) / sinOverTheta;\n  Scalar scale1 = t * sin_over_x( ( t * theta) ) / sinOverTheta;\n  if (d<0)\n    scale1 = -scale1;\n\n  return Quaternion<Scalar>(scale0 * a.coeffs() + scale1 * b.coeffs());\n}\n\ntemplate<typename Q>\nEIGEN_DONT_INLINE Q slerp_gael(const Q& a, const Q& b, typename Q::Scalar t)\n{\n  typedef typename Q::Scalar Scalar;\n  \n  Scalar d = a.dot(b);\n  Scalar theta;\n//   theta = Scalar(2) * atan2((a.coeffs()-b.coeffs()).norm(),(a.coeffs()+b.coeffs()).norm());\n//   if (d<0.0)\n//     theta = M_PI-theta;\n  \n  if (d<0.0)\n    theta = /*M_PI -*/ Scalar(2)*std::asin( (-a.coeffs()-b.coeffs()).norm()/2 );\n  else\n    theta = Scalar(2)*std::asin( (a.coeffs()-b.coeffs()).norm()/2 );\n  \n  \n  Scalar scale0;\n  Scalar scale1;\n  if(theta*theta-Scalar(6)==-Scalar(6))\n  {\n    scale0 = Scalar(1) - t;\n    scale1 = t;\n  }\n  else\n  {\n    Scalar sinTheta = std::sin(theta);\n    scale0 = internal::sin( ( Scalar(1) - t ) * theta) / sinTheta;\n    scale1 = internal::sin( ( t * theta) ) / sinTheta;\n    if (d<0)\n      scale1 = -scale1;\n  }\n\n  return Quaternion<Scalar>(scale0 * a.coeffs() + scale1 * b.coeffs());\n}\n\nint main()\n{\n  typedef double RefScalar;\n  typedef float TestScalar;\n  \n  typedef Quaternion<RefScalar>  Qd;\n  typedef Quaternion<TestScalar> Qf;\n  \n  unsigned int g_seed = (unsigned int) time(NULL);\n  std::cout << g_seed << \"\\n\";\n//   g_seed = 1259932496;\n  srand(g_seed);\n  \n  Matrix<RefScalar,Dynamic,1> maxerr(7);\n  maxerr.setZero();\n  \n  Matrix<RefScalar,Dynamic,1> avgerr(7);\n  avgerr.setZero();\n  \n  cout << \"double=>float=>double       nlerp        eigen        legacy(snap)         legacy(nlerp)        rightway         gael's criteria\\n\";\n  \n  int rep = 100;\n  int iters = 40;\n  for (int w=0; w<rep; ++w)\n  {\n    Qf a, b;\n    a.coeffs().setRandom();\n    a.normalize();\n    b.coeffs().setRandom();\n    b.normalize();\n    \n    Qf c[6];\n    \n    Qd ar(a.cast<RefScalar>());\n    Qd br(b.cast<RefScalar>());\n    Qd cr;\n    \n    \n    \n    cout.precision(8);\n    cout << std::scientific;\n    for (int i=0; i<iters; ++i)\n    {\n      RefScalar t = 0.65;\n      cr = slerp_rw(ar,br,t);\n      \n      Qf refc = cr.cast<TestScalar>();\n      c[0] = nlerp(a,b,t);\n      c[1] = slerp_eigen(a,b,t);\n      c[2] = slerp_legacy(a,b,t);\n      c[3] = slerp_legacy_nlerp(a,b,t);\n      c[4] = slerp_rw(a,b,t);\n      c[5] = slerp_gael(a,b,t);\n      \n      VectorXd err(7);\n      err[0] = (cr.coeffs()-refc.cast<RefScalar>().coeffs()).norm();\n//       std::cout << err[0] << \"    \";\n      for (int k=0; k<6; ++k)\n      {\n        err[k+1] = (c[k].coeffs()-refc.coeffs()).norm();\n//         std::cout << err[k+1] << \"    \";\n      }\n      maxerr = maxerr.cwise().max(err);\n      avgerr += err;\n//       std::cout << \"\\n\";\n      b = cr.cast<TestScalar>();\n      br = cr;\n    }\n//     std::cout << \"\\n\";\n  }\n  avgerr /= RefScalar(rep*iters);\n  cout << \"\\n\\nAccuracy:\\n\"\n       << \"  max: \" << maxerr.transpose() << \"\\n\";\n  cout << \"  avg: \" << avgerr.transpose() << \"\\n\";\n  \n  // perf bench\n  Quaternionf a,b;\n  a.coeffs().setRandom();\n  a.normalize();\n  b.coeffs().setRandom();\n  b.normalize();\n  //b = a;\n  float s = 0.65;\n    \n  #define BENCH(FUNC) {\\\n    BenchTimer t; \\\n    for(int k=0; k<2; ++k) {\\\n      t.start(); \\\n      for(int i=0; i<1000000; ++i) \\\n        FUNC(a,b,s); \\\n      t.stop(); \\\n    } \\\n    cout << \"  \" << #FUNC << \" => \\t \" << t.value() << \"s\\n\"; \\\n  }\n  \n  cout << \"\\nSpeed:\\n\" << std::fixed;\n  BENCH(nlerp);\n  BENCH(slerp_eigen);\n  BENCH(slerp_legacy);\n  BENCH(slerp_legacy_nlerp);\n  BENCH(slerp_rw);\n  BENCH(slerp_gael);\n}\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/quatmul.cpp",
    "content": "#include <iostream>\n#include <Eigen/Core>\n#include <Eigen/Geometry>\n#include <bench/BenchTimer.h>\n\nusing namespace Eigen; \n\ntemplate<typename Quat>\nEIGEN_DONT_INLINE void quatmul_default(const Quat& a, const Quat& b, Quat& c)\n{\n  c = a * b;\n}\n\ntemplate<typename Quat>\nEIGEN_DONT_INLINE void quatmul_novec(const Quat& a, const Quat& b, Quat& c)\n{\n  c = internal::quat_product<0, Quat, Quat, typename Quat::Scalar, Aligned>::run(a,b);\n}\n\ntemplate<typename Quat> void bench(const std::string& label)\n{\n  int tries = 10;\n  int rep = 1000000;\n  BenchTimer t;\n  \n  Quat a(4, 1, 2, 3);\n  Quat b(2, 3, 4, 5);\n  Quat c;\n  \n  std::cout.precision(3);\n  \n  BENCH(t, tries, rep, quatmul_default(a,b,c));\n  std::cout << label << \" default \" << 1e3*t.best(CPU_TIMER) << \"ms  \\t\" << 1e-6*double(rep)/(t.best(CPU_TIMER)) << \" M mul/s\\n\";\n  \n  BENCH(t, tries, rep, quatmul_novec(a,b,c));\n  std::cout << label << \" novec   \" << 1e3*t.best(CPU_TIMER) << \"ms  \\t\" << 1e-6*double(rep)/(t.best(CPU_TIMER)) << \" M mul/s\\n\";\n}\n\nint main()\n{\n  bench<Quaternionf>(\"float \");\n  bench<Quaterniond>(\"double\");\n\n  return 0;\n\n}\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/sparse_cholesky.cpp",
    "content": "// #define EIGEN_TAUCS_SUPPORT\n// #define EIGEN_CHOLMOD_SUPPORT\n#include <iostream>\n#include <Eigen/Sparse>\n\n// g++ -DSIZE=10000 -DDENSITY=0.001  sparse_cholesky.cpp -I.. -DDENSEMATRI -O3 -g0 -DNDEBUG   -DNBTRIES=1 -I /home/gael/Coding/LinearAlgebra/taucs_full/src/ -I/home/gael/Coding/LinearAlgebra/taucs_full/build/linux/  -L/home/gael/Coding/LinearAlgebra/taucs_full/lib/linux/ -ltaucs /home/gael/Coding/LinearAlgebra/GotoBLAS/libgoto.a -lpthread -I /home/gael/Coding/LinearAlgebra/SuiteSparse/CHOLMOD/Include/ $CHOLLIB -I /home/gael/Coding/LinearAlgebra/SuiteSparse/UFconfig/ /home/gael/Coding/LinearAlgebra/SuiteSparse/CCOLAMD/Lib/libccolamd.a   /home/gael/Coding/LinearAlgebra/SuiteSparse/CHOLMOD/Lib/libcholmod.a -lmetis /home/gael/Coding/LinearAlgebra/SuiteSparse/AMD/Lib/libamd.a  /home/gael/Coding/LinearAlgebra/SuiteSparse/CAMD/Lib/libcamd.a   /home/gael/Coding/LinearAlgebra/SuiteSparse/CCOLAMD/Lib/libccolamd.a  /home/gael/Coding/LinearAlgebra/SuiteSparse/COLAMD/Lib/libcolamd.a -llapack && ./a.out\n\n#define NOGMM\n#define NOMTL\n\n#ifndef SIZE\n#define SIZE 10\n#endif\n\n#ifndef DENSITY\n#define DENSITY 0.01\n#endif\n\n#ifndef REPEAT\n#define REPEAT 1\n#endif\n\n#include \"BenchSparseUtil.h\"\n\n#ifndef MINDENSITY\n#define MINDENSITY 0.0004\n#endif\n\n#ifndef NBTRIES\n#define NBTRIES 10\n#endif\n\n#define BENCH(X) \\\n  timer.reset(); \\\n  for (int _j=0; _j<NBTRIES; ++_j) { \\\n    timer.start(); \\\n    for (int _k=0; _k<REPEAT; ++_k) { \\\n        X  \\\n  } timer.stop(); }\n\n// typedef SparseMatrix<Scalar,UpperTriangular> EigenSparseTriMatrix;\ntypedef SparseMatrix<Scalar,SelfAdjoint|LowerTriangular> EigenSparseSelfAdjointMatrix;\n\nvoid fillSpdMatrix(float density, int rows, int cols,  EigenSparseSelfAdjointMatrix& dst)\n{\n  dst.startFill(rows*cols*density);\n  for(int j = 0; j < cols; j++)\n  {\n    dst.fill(j,j) = internal::random<Scalar>(10,20);\n    for(int i = j+1; i < rows; i++)\n    {\n      Scalar v = (internal::random<float>(0,1) < density) ? internal::random<Scalar>() : 0;\n      if (v!=0)\n        dst.fill(i,j) = v;\n    }\n\n  }\n  dst.endFill();\n}\n\n#include <Eigen/Cholesky>\n\ntemplate<int Backend>\nvoid doEigen(const char* name, const EigenSparseSelfAdjointMatrix& sm1, int flags = 0)\n{\n  std::cout << name << \"...\" << std::flush;\n  BenchTimer timer;\n  timer.start();\n  SparseLLT<EigenSparseSelfAdjointMatrix,Backend> chol(sm1, flags);\n  timer.stop();\n  std::cout << \":\\t\" << timer.value() << endl;\n\n  std::cout << \"  nnz: \" << sm1.nonZeros() << \" => \" << chol.matrixL().nonZeros() << \"\\n\";\n//   std::cout << \"sparse\\n\" << chol.matrixL() << \"%\\n\";\n}\n\nint main(int argc, char *argv[])\n{\n  int rows = SIZE;\n  int cols = SIZE;\n  float density = DENSITY;\n  BenchTimer timer;\n\n  VectorXf b = VectorXf::Random(cols);\n  VectorXf x = VectorXf::Random(cols);\n\n  bool densedone = false;\n\n  //for (float density = DENSITY; density>=MINDENSITY; density*=0.5)\n//   float density = 0.5;\n  {\n    EigenSparseSelfAdjointMatrix sm1(rows, cols);\n    std::cout << \"Generate sparse matrix (might take a while)...\\n\";\n    fillSpdMatrix(density, rows, cols, sm1);\n    std::cout << \"DONE\\n\\n\";\n\n    // dense matrices\n    #ifdef DENSEMATRIX\n    if (!densedone)\n    {\n      densedone = true;\n      std::cout << \"Eigen Dense\\t\" << density*100 << \"%\\n\";\n      DenseMatrix m1(rows,cols);\n      eiToDense(sm1, m1);\n      m1 = (m1 + m1.transpose()).eval();\n      m1.diagonal() *= 0.5;\n\n//       BENCH(LLT<DenseMatrix> chol(m1);)\n//       std::cout << \"dense:\\t\" << timer.value() << endl;\n\n      BenchTimer timer;\n      timer.start();\n      LLT<DenseMatrix> chol(m1);\n      timer.stop();\n      std::cout << \"dense:\\t\" << timer.value() << endl;\n      int count = 0;\n      for (int j=0; j<cols; ++j)\n        for (int i=j; i<rows; ++i)\n          if (!internal::isMuchSmallerThan(internal::abs(chol.matrixL()(i,j)), 0.1))\n            count++;\n      std::cout << \"dense: \" << \"nnz = \" << count << \"\\n\";\n//       std::cout << \"dense:\\n\" << m1 << \"\\n\\n\" << chol.matrixL() << endl;\n    }\n    #endif\n\n    // eigen sparse matrices\n    doEigen<Eigen::DefaultBackend>(\"Eigen/Sparse\", sm1, Eigen::IncompleteFactorization);\n\n    #ifdef EIGEN_CHOLMOD_SUPPORT\n    doEigen<Eigen::Cholmod>(\"Eigen/Cholmod\", sm1, Eigen::IncompleteFactorization);\n    #endif\n\n    #ifdef EIGEN_TAUCS_SUPPORT\n    doEigen<Eigen::Taucs>(\"Eigen/Taucs\", sm1, Eigen::IncompleteFactorization);\n    #endif\n\n    #if 0\n    // TAUCS\n    {\n      taucs_ccs_matrix A = sm1.asTaucsMatrix();\n\n      //BENCH(taucs_ccs_matrix* chol = taucs_ccs_factor_llt(&A, 0, 0);)\n//       BENCH(taucs_supernodal_factor_to_ccs(taucs_ccs_factor_llt_ll(&A));)\n//       std::cout << \"taucs:\\t\" << timer.value() << endl;\n\n      taucs_ccs_matrix* chol = taucs_ccs_factor_llt(&A, 0, 0);\n\n      for (int j=0; j<cols; ++j)\n      {\n        for (int i=chol->colptr[j]; i<chol->colptr[j+1]; ++i)\n          std::cout << chol->values.d[i] << \" \";\n      }\n    }\n\n    // CHOLMOD\n    #ifdef EIGEN_CHOLMOD_SUPPORT\n    {\n      cholmod_common c;\n      cholmod_start (&c);\n      cholmod_sparse A;\n      cholmod_factor *L;\n\n      A = sm1.asCholmodMatrix();\n      BenchTimer timer;\n//       timer.reset();\n      timer.start();\n      std::vector<int> perm(cols);\n//       std::vector<int> set(ncols);\n      for (int i=0; i<cols; ++i)\n        perm[i] = i;\n//       c.nmethods = 1;\n//       c.method[0] = 1;\n\n      c.nmethods = 1;\n      c.method [0].ordering = CHOLMOD_NATURAL;\n      c.postorder = 0;\n      c.final_ll = 1;\n\n      L = cholmod_analyze_p(&A, &perm[0], &perm[0], cols, &c);\n      timer.stop();\n      std::cout << \"cholmod/analyze:\\t\" << timer.value() << endl;\n      timer.reset();\n      timer.start();\n      cholmod_factorize(&A, L, &c);\n      timer.stop();\n      std::cout << \"cholmod/factorize:\\t\" << timer.value() << endl;\n\n      cholmod_sparse* cholmat = cholmod_factor_to_sparse(L, &c);\n\n      cholmod_print_factor(L, \"Factors\", &c);\n\n      cholmod_print_sparse(cholmat, \"Chol\", &c);\n      cholmod_write_sparse(stdout, cholmat, 0, 0, &c);\n//\n//       cholmod_print_sparse(&A, \"A\", &c);\n//       cholmod_write_sparse(stdout, &A, 0, 0, &c);\n\n\n//       for (int j=0; j<cols; ++j)\n//       {\n//           for (int i=chol->colptr[j]; i<chol->colptr[j+1]; ++i)\n//             std::cout << chol->values.s[i] << \" \";\n//       }\n    }\n    #endif\n\n    #endif\n\n\n\n  }\n\n\n  return 0;\n}\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/sparse_dense_product.cpp",
    "content": "\n//g++ -O3 -g0 -DNDEBUG  sparse_product.cpp -I.. -I/home/gael/Coding/LinearAlgebra/mtl4/ -DDENSITY=0.005 -DSIZE=10000 && ./a.out\n//g++ -O3 -g0 -DNDEBUG  sparse_product.cpp -I.. -I/home/gael/Coding/LinearAlgebra/mtl4/ -DDENSITY=0.05 -DSIZE=2000 && ./a.out\n// -DNOGMM -DNOMTL -DCSPARSE\n// -I /home/gael/Coding/LinearAlgebra/CSparse/Include/ /home/gael/Coding/LinearAlgebra/CSparse/Lib/libcsparse.a\n#ifndef SIZE\n#define SIZE 650000\n#endif\n\n#ifndef DENSITY\n#define DENSITY 0.01\n#endif\n\n#ifndef REPEAT\n#define REPEAT 1\n#endif\n\n#include \"BenchSparseUtil.h\"\n\n#ifndef MINDENSITY\n#define MINDENSITY 0.0004\n#endif\n\n#ifndef NBTRIES\n#define NBTRIES 10\n#endif\n\n#define BENCH(X) \\\n  timer.reset(); \\\n  for (int _j=0; _j<NBTRIES; ++_j) { \\\n    timer.start(); \\\n    for (int _k=0; _k<REPEAT; ++_k) { \\\n        X  \\\n  } timer.stop(); }\n\n\n#ifdef CSPARSE\ncs* cs_sorted_multiply(const cs* a, const cs* b)\n{\n  cs* A = cs_transpose (a, 1) ;\n  cs* B = cs_transpose (b, 1) ;\n  cs* D = cs_multiply (B,A) ;   /* D = B'*A' */\n  cs_spfree (A) ;\n  cs_spfree (B) ;\n  cs_dropzeros (D) ;      /* drop zeros from D */\n  cs* C = cs_transpose (D, 1) ;   /* C = D', so that C is sorted */\n  cs_spfree (D) ;\n  return C;\n}\n#endif\n\nint main(int argc, char *argv[])\n{\n  int rows = SIZE;\n  int cols = SIZE;\n  float density = DENSITY;\n\n  EigenSparseMatrix sm1(rows,cols);\n  DenseVector v1(cols), v2(cols);\n  v1.setRandom();\n\n  BenchTimer timer;\n  for (float density = DENSITY; density>=MINDENSITY; density*=0.5)\n  {\n    //fillMatrix(density, rows, cols, sm1);\n    fillMatrix2(7, rows, cols, sm1);\n\n    // dense matrices\n    #ifdef DENSEMATRIX\n    {\n      std::cout << \"Eigen Dense\\t\" << density*100 << \"%\\n\";\n      DenseMatrix m1(rows,cols);\n      eiToDense(sm1, m1);\n\n      timer.reset();\n      timer.start();\n      for (int k=0; k<REPEAT; ++k)\n        v2 = m1 * v1;\n      timer.stop();\n      std::cout << \"   a * v:\\t\" << timer.best() << \"  \" << double(REPEAT)/timer.best() << \" * / sec \" << endl;\n\n      timer.reset();\n      timer.start();\n      for (int k=0; k<REPEAT; ++k)\n        v2 = m1.transpose() * v1;\n      timer.stop();\n      std::cout << \"   a' * v:\\t\" << timer.best() << endl;\n    }\n    #endif\n\n    // eigen sparse matrices\n    {\n      std::cout << \"Eigen sparse\\t\" << sm1.nonZeros()/float(sm1.rows()*sm1.cols())*100 << \"%\\n\";\n\n      BENCH(asm(\"#myc\"); v2 = sm1 * v1; asm(\"#myd\");)\n      std::cout << \"   a * v:\\t\" << timer.best()/REPEAT << \"  \" << double(REPEAT)/timer.best(REAL_TIMER) << \" * / sec \" << endl;\n\n\n      BENCH( { asm(\"#mya\"); v2 = sm1.transpose() * v1; asm(\"#myb\"); })\n\n      std::cout << \"   a' * v:\\t\" << timer.best()/REPEAT << endl;\n    }\n\n//     {\n//       DynamicSparseMatrix<Scalar> m1(sm1);\n//       std::cout << \"Eigen dyn-sparse\\t\" << m1.nonZeros()/float(m1.rows()*m1.cols())*100 << \"%\\n\";\n//\n//       BENCH(for (int k=0; k<REPEAT; ++k) v2 = m1 * v1;)\n//       std::cout << \"   a * v:\\t\" << timer.value() << endl;\n//\n//       BENCH(for (int k=0; k<REPEAT; ++k) v2 = m1.transpose() * v1;)\n//       std::cout << \"   a' * v:\\t\" << timer.value() << endl;\n//     }\n\n    // GMM++\n    #ifndef NOGMM\n    {\n      std::cout << \"GMM++ sparse\\t\" << density*100 << \"%\\n\";\n      //GmmDynSparse  gmmT3(rows,cols);\n      GmmSparse m1(rows,cols);\n      eiToGmm(sm1, m1);\n\n      std::vector<Scalar> gmmV1(cols), gmmV2(cols);\n      Map<Matrix<Scalar,Dynamic,1> >(&gmmV1[0], cols) = v1;\n      Map<Matrix<Scalar,Dynamic,1> >(&gmmV2[0], cols) = v2;\n\n      BENCH( asm(\"#myx\"); gmm::mult(m1, gmmV1, gmmV2); asm(\"#myy\"); )\n      std::cout << \"   a * v:\\t\" << timer.value() << endl;\n\n      BENCH( gmm::mult(gmm::transposed(m1), gmmV1, gmmV2); )\n      std::cout << \"   a' * v:\\t\" << timer.value() << endl;\n    }\n    #endif\n    \n    #ifndef NOUBLAS\n    {\n      std::cout << \"ublas sparse\\t\" << density*100 << \"%\\n\";\n      UBlasSparse m1(rows,cols);\n      eiToUblas(sm1, m1);\n      \n      boost::numeric::ublas::vector<Scalar> uv1, uv2;\n      eiToUblasVec(v1,uv1);\n      eiToUblasVec(v2,uv2);\n\n//       std::vector<Scalar> gmmV1(cols), gmmV2(cols);\n//       Map<Matrix<Scalar,Dynamic,1> >(&gmmV1[0], cols) = v1;\n//       Map<Matrix<Scalar,Dynamic,1> >(&gmmV2[0], cols) = v2;\n\n      BENCH( uv2 = boost::numeric::ublas::prod(m1, uv1); )\n      std::cout << \"   a * v:\\t\" << timer.value() << endl;\n\n//       BENCH( boost::ublas::prod(gmm::transposed(m1), gmmV1, gmmV2); )\n//       std::cout << \"   a' * v:\\t\" << timer.value() << endl;\n    }\n    #endif\n\n    // MTL4\n    #ifndef NOMTL\n    {\n      std::cout << \"MTL4\\t\" << density*100 << \"%\\n\";\n      MtlSparse m1(rows,cols);\n      eiToMtl(sm1, m1);\n      mtl::dense_vector<Scalar> mtlV1(cols, 1.0);\n      mtl::dense_vector<Scalar> mtlV2(cols, 1.0);\n\n      timer.reset();\n      timer.start();\n      for (int k=0; k<REPEAT; ++k)\n        mtlV2 = m1 * mtlV1;\n      timer.stop();\n      std::cout << \"   a * v:\\t\" << timer.value() << endl;\n\n      timer.reset();\n      timer.start();\n      for (int k=0; k<REPEAT; ++k)\n        mtlV2 = trans(m1) * mtlV1;\n      timer.stop();\n      std::cout << \"   a' * v:\\t\" << timer.value() << endl;\n    }\n    #endif\n\n    std::cout << \"\\n\\n\";\n  }\n\n  return 0;\n}\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/sparse_lu.cpp",
    "content": "\n// g++ -I.. sparse_lu.cpp -O3 -g0 -I /usr/include/superlu/ -lsuperlu -lgfortran -DSIZE=1000 -DDENSITY=.05 && ./a.out\n\n#define EIGEN_SUPERLU_SUPPORT\n#define EIGEN_UMFPACK_SUPPORT\n#include <Eigen/Sparse>\n\n#define NOGMM\n#define NOMTL\n\n#ifndef SIZE\n#define SIZE 10\n#endif\n\n#ifndef DENSITY\n#define DENSITY 0.01\n#endif\n\n#ifndef REPEAT\n#define REPEAT 1\n#endif\n\n#include \"BenchSparseUtil.h\"\n\n#ifndef MINDENSITY\n#define MINDENSITY 0.0004\n#endif\n\n#ifndef NBTRIES\n#define NBTRIES 10\n#endif\n\n#define BENCH(X) \\\n  timer.reset(); \\\n  for (int _j=0; _j<NBTRIES; ++_j) { \\\n    timer.start(); \\\n    for (int _k=0; _k<REPEAT; ++_k) { \\\n        X  \\\n  } timer.stop(); }\n\ntypedef Matrix<Scalar,Dynamic,1> VectorX;\n\n#include <Eigen/LU>\n\ntemplate<int Backend>\nvoid doEigen(const char* name, const EigenSparseMatrix& sm1, const VectorX& b, VectorX& x, int flags = 0)\n{\n  std::cout << name << \"...\" << std::flush;\n  BenchTimer timer; timer.start();\n  SparseLU<EigenSparseMatrix,Backend> lu(sm1, flags);\n  timer.stop();\n  if (lu.succeeded())\n    std::cout << \":\\t\" << timer.value() << endl;\n  else\n  {\n    std::cout << \":\\t FAILED\" << endl;\n    return;\n  }\n\n  bool ok;\n  timer.reset(); timer.start();\n  ok = lu.solve(b,&x);\n  timer.stop();\n  if (ok)\n    std::cout << \"  solve:\\t\" << timer.value() << endl;\n  else\n    std::cout << \"  solve:\\t\" << \" FAILED\" << endl;\n\n  //std::cout << x.transpose() << \"\\n\";\n}\n\nint main(int argc, char *argv[])\n{\n  int rows = SIZE;\n  int cols = SIZE;\n  float density = DENSITY;\n  BenchTimer timer;\n\n  VectorX b = VectorX::Random(cols);\n  VectorX x = VectorX::Random(cols);\n\n  bool densedone = false;\n\n  //for (float density = DENSITY; density>=MINDENSITY; density*=0.5)\n//   float density = 0.5;\n  {\n    EigenSparseMatrix sm1(rows, cols);\n    fillMatrix(density, rows, cols, sm1);\n\n    // dense matrices\n    #ifdef DENSEMATRIX\n    if (!densedone)\n    {\n      densedone = true;\n      std::cout << \"Eigen Dense\\t\" << density*100 << \"%\\n\";\n      DenseMatrix m1(rows,cols);\n      eiToDense(sm1, m1);\n\n      BenchTimer timer;\n      timer.start();\n      FullPivLU<DenseMatrix> lu(m1);\n      timer.stop();\n      std::cout << \"Eigen/dense:\\t\" << timer.value() << endl;\n\n      timer.reset();\n      timer.start();\n      lu.solve(b,&x);\n      timer.stop();\n      std::cout << \"  solve:\\t\" << timer.value() << endl;\n//       std::cout << b.transpose() << \"\\n\";\n//       std::cout << x.transpose() << \"\\n\";\n    }\n    #endif\n\n    #ifdef EIGEN_UMFPACK_SUPPORT\n    x.setZero();\n    doEigen<Eigen::UmfPack>(\"Eigen/UmfPack (auto)\", sm1, b, x, 0);\n    #endif\n\n    #ifdef EIGEN_SUPERLU_SUPPORT\n    x.setZero();\n    doEigen<Eigen::SuperLU>(\"Eigen/SuperLU (nat)\", sm1, b, x, Eigen::NaturalOrdering);\n//     doEigen<Eigen::SuperLU>(\"Eigen/SuperLU (MD AT+A)\", sm1, b, x, Eigen::MinimumDegree_AT_PLUS_A);\n//     doEigen<Eigen::SuperLU>(\"Eigen/SuperLU (MD ATA)\", sm1, b, x, Eigen::MinimumDegree_ATA);\n    doEigen<Eigen::SuperLU>(\"Eigen/SuperLU (COLAMD)\", sm1, b, x, Eigen::ColApproxMinimumDegree);\n    #endif\n\n  }\n\n  return 0;\n}\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/sparse_product.cpp",
    "content": "\n//g++ -O3 -g0 -DNDEBUG  sparse_product.cpp -I.. -I/home/gael/Coding/LinearAlgebra/mtl4/ -DDENSITY=0.005 -DSIZE=10000 && ./a.out\n//g++ -O3 -g0 -DNDEBUG  sparse_product.cpp -I.. -I/home/gael/Coding/LinearAlgebra/mtl4/ -DDENSITY=0.05 -DSIZE=2000 && ./a.out\n// -DNOGMM -DNOMTL -DCSPARSE\n// -I /home/gael/Coding/LinearAlgebra/CSparse/Include/ /home/gael/Coding/LinearAlgebra/CSparse/Lib/libcsparse.a\n\n#include <typeinfo>\n\n#ifndef SIZE\n#define SIZE 1000000\n#endif\n\n#ifndef NNZPERCOL\n#define NNZPERCOL 6\n#endif\n\n#ifndef REPEAT\n#define REPEAT 1\n#endif\n\n#include <algorithm>\n#include \"BenchTimer.h\"\n#include \"BenchUtil.h\"\n#include \"BenchSparseUtil.h\"\n\n#ifndef NBTRIES\n#define NBTRIES 1\n#endif\n\n#define BENCH(X) \\\n  timer.reset(); \\\n  for (int _j=0; _j<NBTRIES; ++_j) { \\\n    timer.start(); \\\n    for (int _k=0; _k<REPEAT; ++_k) { \\\n        X  \\\n  } timer.stop(); }\n\n// #ifdef MKL\n//\n// #include \"mkl_types.h\"\n// #include \"mkl_spblas.h\"\n//\n// template<typename Lhs,typename Rhs,typename Res>\n// void mkl_multiply(const Lhs& lhs, const Rhs& rhs, Res& res)\n// {\n//   char n = 'N';\n//   float alpha = 1;\n//   char matdescra[6];\n//   matdescra[0] = 'G';\n//   matdescra[1] = 0;\n//   matdescra[2] = 0;\n//   matdescra[3] = 'C';\n//   mkl_scscmm(&n, lhs.rows(), rhs.cols(), lhs.cols(), &alpha, matdescra,\n//              lhs._valuePtr(), lhs._innerIndexPtr(), lhs.outerIndexPtr(),\n//              pntre, b, &ldb, &beta, c, &ldc);\n// //   mkl_somatcopy('C', 'T', lhs.rows(), lhs.cols(), 1,\n// //                 lhs._valuePtr(), lhs.rows(), DST, dst_stride);\n// }\n//\n// #endif\n\n\n#ifdef CSPARSE\ncs* cs_sorted_multiply(const cs* a, const cs* b)\n{\n//   return cs_multiply(a,b);\n\n  cs* A = cs_transpose(a, 1);\n  cs* B = cs_transpose(b, 1);\n  cs* D = cs_multiply(B,A);   /* D = B'*A' */\n  cs_spfree (A) ;\n  cs_spfree (B) ;\n  cs_dropzeros (D) ;      /* drop zeros from D */\n  cs* C = cs_transpose (D, 1) ;   /* C = D', so that C is sorted */\n  cs_spfree (D) ;\n  return C;\n\n//   cs* A = cs_transpose(a, 1);\n//   cs* C = cs_transpose(A, 1);\n//   return C;\n}\n\ncs* cs_sorted_multiply2(const cs* a, const cs* b)\n{\n  cs* D = cs_multiply(a,b);\n  cs* E = cs_transpose(D,1);\n  cs_spfree(D);\n  cs* C = cs_transpose(E,1);\n  cs_spfree(E);\n  return C;\n}\n#endif\n\nvoid bench_sort();\n\nint main(int argc, char *argv[])\n{\n//   bench_sort();\n\n  int rows = SIZE;\n  int cols = SIZE;\n  float density = DENSITY;\n\n  EigenSparseMatrix sm1(rows,cols), sm2(rows,cols), sm3(rows,cols), sm4(rows,cols);\n\n  BenchTimer timer;\n  for (int nnzPerCol = NNZPERCOL; nnzPerCol>1; nnzPerCol/=1.1)\n  {\n    sm1.setZero();\n    sm2.setZero();\n    fillMatrix2(nnzPerCol, rows, cols, sm1);\n    fillMatrix2(nnzPerCol, rows, cols, sm2);\n//     std::cerr << \"filling OK\\n\";\n\n    // dense matrices\n    #ifdef DENSEMATRIX\n    {\n      std::cout << \"Eigen Dense\\t\" << nnzPerCol << \"%\\n\";\n      DenseMatrix m1(rows,cols), m2(rows,cols), m3(rows,cols);\n      eiToDense(sm1, m1);\n      eiToDense(sm2, m2);\n\n      timer.reset();\n      timer.start();\n      for (int k=0; k<REPEAT; ++k)\n        m3 = m1 * m2;\n      timer.stop();\n      std::cout << \"   a * b:\\t\" << timer.value() << endl;\n\n      timer.reset();\n      timer.start();\n      for (int k=0; k<REPEAT; ++k)\n        m3 = m1.transpose() * m2;\n      timer.stop();\n      std::cout << \"   a' * b:\\t\" << timer.value() << endl;\n\n      timer.reset();\n      timer.start();\n      for (int k=0; k<REPEAT; ++k)\n        m3 = m1.transpose() * m2.transpose();\n      timer.stop();\n      std::cout << \"   a' * b':\\t\" << timer.value() << endl;\n\n      timer.reset();\n      timer.start();\n      for (int k=0; k<REPEAT; ++k)\n        m3 = m1 * m2.transpose();\n      timer.stop();\n      std::cout << \"   a * b':\\t\" << timer.value() << endl;\n    }\n    #endif\n\n    // eigen sparse matrices\n    {\n      std::cout << \"Eigen sparse\\t\" << sm1.nonZeros()/(float(sm1.rows())*float(sm1.cols()))*100 << \"% * \"\n                << sm2.nonZeros()/(float(sm2.rows())*float(sm2.cols()))*100 << \"%\\n\";\n\n      BENCH(sm3 = sm1 * sm2; )\n      std::cout << \"   a * b:\\t\" << timer.value() << endl;\n\n//       BENCH(sm3 = sm1.transpose() * sm2; )\n//       std::cout << \"   a' * b:\\t\" << timer.value() << endl;\n// //\n//       BENCH(sm3 = sm1.transpose() * sm2.transpose(); )\n//       std::cout << \"   a' * b':\\t\" << timer.value() << endl;\n// //\n//       BENCH(sm3 = sm1 * sm2.transpose(); )\n//       std::cout << \"   a * b' :\\t\" << timer.value() << endl;\n\n\n//       std::cout << \"\\n\";\n//\n//       BENCH( sm3._experimentalNewProduct(sm1, sm2); )\n//       std::cout << \"   a * b:\\t\" << timer.value() << endl;\n//\n//       BENCH(sm3._experimentalNewProduct(sm1.transpose(),sm2); )\n//       std::cout << \"   a' * b:\\t\" << timer.value() << endl;\n// //\n//       BENCH(sm3._experimentalNewProduct(sm1.transpose(),sm2.transpose()); )\n//       std::cout << \"   a' * b':\\t\" << timer.value() << endl;\n// //\n//       BENCH(sm3._experimentalNewProduct(sm1, sm2.transpose());)\n//       std::cout << \"   a * b' :\\t\" << timer.value() << endl;\n    }\n\n    // eigen dyn-sparse matrices\n    /*{\n      DynamicSparseMatrix<Scalar> m1(sm1), m2(sm2), m3(sm3);\n      std::cout << \"Eigen dyn-sparse\\t\" << m1.nonZeros()/(float(m1.rows())*float(m1.cols()))*100 << \"% * \"\n                << m2.nonZeros()/(float(m2.rows())*float(m2.cols()))*100 << \"%\\n\";\n\n//       timer.reset();\n//       timer.start();\n      BENCH(for (int k=0; k<REPEAT; ++k) m3 = m1 * m2;)\n//       timer.stop();\n      std::cout << \"   a * b:\\t\" << timer.value() << endl;\n//       std::cout << sm3 << \"\\n\";\n\n      timer.reset();\n      timer.start();\n//       std::cerr << \"transpose...\\n\";\n//       EigenSparseMatrix sm4 = sm1.transpose();\n//       std::cout << sm4.nonZeros() << \" == \" << sm1.nonZeros() << \"\\n\";\n//       exit(1);\n//       std::cerr << \"transpose OK\\n\";\n//       std::cout << sm1 << \"\\n\\n\" << sm1.transpose() << \"\\n\\n\" << sm4.transpose() << \"\\n\\n\";\n      BENCH(for (int k=0; k<REPEAT; ++k) m3 = m1.transpose() * m2;)\n//       timer.stop();\n      std::cout << \"   a' * b:\\t\" << timer.value() << endl;\n\n//       timer.reset();\n//       timer.start();\n      BENCH( for (int k=0; k<REPEAT; ++k) m3 = m1.transpose() * m2.transpose(); )\n//       timer.stop();\n      std::cout << \"   a' * b':\\t\" << timer.value() << endl;\n\n//       timer.reset();\n//       timer.start();\n      BENCH( for (int k=0; k<REPEAT; ++k) m3 = m1 * m2.transpose(); )\n//       timer.stop();\n      std::cout << \"   a * b' :\\t\" << timer.value() << endl;\n    }*/\n\n    // CSparse\n    #ifdef CSPARSE\n    {\n      std::cout << \"CSparse \\t\" << nnzPerCol << \"%\\n\";\n      cs *m1, *m2, *m3;\n      eiToCSparse(sm1, m1);\n      eiToCSparse(sm2, m2);\n\n      BENCH(\n      {\n        m3 = cs_sorted_multiply(m1, m2);\n        if (!m3)\n        {\n          std::cerr << \"cs_multiply failed\\n\";\n        }\n//         cs_print(m3, 0);\n        cs_spfree(m3);\n      }\n      );\n//       timer.stop();\n      std::cout << \"   a * b:\\t\" << timer.value() << endl;\n\n//       BENCH( { m3 = cs_sorted_multiply2(m1, m2); cs_spfree(m3); } );\n//       std::cout << \"   a * b:\\t\" << timer.value() << endl;\n    }\n    #endif\n\n    #ifndef NOUBLAS\n    {\n      std::cout << \"ublas\\t\" << nnzPerCol << \"%\\n\";\n      UBlasSparse m1(rows,cols), m2(rows,cols), m3(rows,cols);\n      eiToUblas(sm1, m1);\n      eiToUblas(sm2, m2);\n\n      BENCH(boost::numeric::ublas::prod(m1, m2, m3););\n      std::cout << \"   a * b:\\t\" << timer.value() << endl;\n    }\n    #endif\n\n    // GMM++\n    #ifndef NOGMM\n    {\n      std::cout << \"GMM++ sparse\\t\" << nnzPerCol << \"%\\n\";\n      GmmDynSparse  gmmT3(rows,cols);\n      GmmSparse m1(rows,cols), m2(rows,cols), m3(rows,cols);\n      eiToGmm(sm1, m1);\n      eiToGmm(sm2, m2);\n\n      BENCH(gmm::mult(m1, m2, gmmT3););\n      std::cout << \"   a * b:\\t\" << timer.value() << endl;\n\n//       BENCH(gmm::mult(gmm::transposed(m1), m2, gmmT3););\n//       std::cout << \"   a' * b:\\t\" << timer.value() << endl;\n//\n//       if (rows<500)\n//       {\n//         BENCH(gmm::mult(gmm::transposed(m1), gmm::transposed(m2), gmmT3););\n//         std::cout << \"   a' * b':\\t\" << timer.value() << endl;\n//\n//         BENCH(gmm::mult(m1, gmm::transposed(m2), gmmT3););\n//         std::cout << \"   a * b':\\t\" << timer.value() << endl;\n//       }\n//       else\n//       {\n//         std::cout << \"   a' * b':\\t\" << \"forever\" << endl;\n//         std::cout << \"   a * b':\\t\" << \"forever\" << endl;\n//       }\n    }\n    #endif\n\n    // MTL4\n    #ifndef NOMTL\n    {\n      std::cout << \"MTL4\\t\" << nnzPerCol << \"%\\n\";\n      MtlSparse m1(rows,cols), m2(rows,cols), m3(rows,cols);\n      eiToMtl(sm1, m1);\n      eiToMtl(sm2, m2);\n\n      BENCH(m3 = m1 * m2;);\n      std::cout << \"   a * b:\\t\" << timer.value() << endl;\n\n//       BENCH(m3 = trans(m1) * m2;);\n//       std::cout << \"   a' * b:\\t\" << timer.value() << endl;\n//\n//       BENCH(m3 = trans(m1) * trans(m2););\n//       std::cout << \"  a' * b':\\t\" << timer.value() << endl;\n//\n//       BENCH(m3 = m1 * trans(m2););\n//       std::cout << \"   a * b' :\\t\" << timer.value() << endl;\n    }\n    #endif\n\n    std::cout << \"\\n\\n\";\n  }\n\n  return 0;\n}\n\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/sparse_randomsetter.cpp",
    "content": "\n#define NOGMM\n#define NOMTL\n\n#include <map>\n#include <ext/hash_map>\n#include <google/dense_hash_map>\n#include <google/sparse_hash_map>\n\n#ifndef SIZE\n#define SIZE 10000\n#endif\n\n#ifndef DENSITY\n#define DENSITY 0.01\n#endif\n\n#ifndef REPEAT\n#define REPEAT 1\n#endif\n\n#include \"BenchSparseUtil.h\"\n\n#ifndef MINDENSITY\n#define MINDENSITY 0.0004\n#endif\n\n#ifndef NBTRIES\n#define NBTRIES 10\n#endif\n\n#define BENCH(X) \\\n  timer.reset(); \\\n  for (int _j=0; _j<NBTRIES; ++_j) { \\\n    timer.start(); \\\n    for (int _k=0; _k<REPEAT; ++_k) { \\\n        X  \\\n  } timer.stop(); }\n\n\nstatic double rtime;\nstatic double nentries;\n\ntemplate<typename SetterType>\nvoid dostuff(const char* name, EigenSparseMatrix& sm1)\n{\n  int rows = sm1.rows();\n  int cols = sm1.cols();\n  sm1.setZero();\n  BenchTimer t;\n  SetterType* set1 = new SetterType(sm1);\n  t.reset(); t.start();\n  for (int k=0; k<nentries; ++k)\n    (*set1)(internal::random<int>(0,rows-1),internal::random<int>(0,cols-1)) += 1;\n  t.stop();\n  std::cout << \"std::map =>      \\t\" << t.value()-rtime\n            << \" nnz=\" << set1->nonZeros() << std::flush;\n\n  // getchar();\n\n  t.reset(); t.start(); delete set1; t.stop();\n  std::cout << \"  back: \\t\" << t.value() << \"\\n\";\n}\n    \nint main(int argc, char *argv[])\n{\n  int rows = SIZE;\n  int cols = SIZE;\n  float density = DENSITY;\n\n  EigenSparseMatrix sm1(rows,cols), sm2(rows,cols);\n\n\n  nentries = rows*cols*density;\n  std::cout << \"n = \" << nentries << \"\\n\";\n  int dummy;\n  BenchTimer t;\n\n  t.reset(); t.start();\n  for (int k=0; k<nentries; ++k)\n    dummy = internal::random<int>(0,rows-1) + internal::random<int>(0,cols-1);\n  t.stop();\n  rtime = t.value();\n  std::cout << \"rtime = \" << rtime << \" (\" << dummy << \")\\n\\n\";\n  const int Bits = 6;\n  for (;;)\n  {\n    dostuff<RandomSetter<EigenSparseMatrix,StdMapTraits,Bits> >(\"std::map     \", sm1);\n    dostuff<RandomSetter<EigenSparseMatrix,GnuHashMapTraits,Bits> >(\"gnu::hash_map\", sm1);\n    dostuff<RandomSetter<EigenSparseMatrix,GoogleDenseHashMapTraits,Bits> >(\"google::dense\", sm1);\n    dostuff<RandomSetter<EigenSparseMatrix,GoogleSparseHashMapTraits,Bits> >(\"google::sparse\", sm1);\n\n//     {\n//       RandomSetter<EigenSparseMatrix,GnuHashMapTraits,Bits> set1(sm1);\n//       t.reset(); t.start();\n//       for (int k=0; k<n; ++k)\n//         set1(internal::random<int>(0,rows-1),internal::random<int>(0,cols-1)) += 1;\n//       t.stop();\n//       std::cout << \"gnu::hash_map => \\t\" << t.value()-rtime\n//                 << \" nnz=\" << set1.nonZeros() << \"\\n\";getchar();\n//     }\n//     {\n//       RandomSetter<EigenSparseMatrix,GoogleDenseHashMapTraits,Bits> set1(sm1);\n//       t.reset(); t.start();\n//       for (int k=0; k<n; ++k)\n//         set1(internal::random<int>(0,rows-1),internal::random<int>(0,cols-1)) += 1;\n//       t.stop();\n//       std::cout << \"google::dense => \\t\" << t.value()-rtime\n//                 << \" nnz=\" << set1.nonZeros() << \"\\n\";getchar();\n//     }\n//     {\n//       RandomSetter<EigenSparseMatrix,GoogleSparseHashMapTraits,Bits> set1(sm1);\n//       t.reset(); t.start();\n//       for (int k=0; k<n; ++k)\n//         set1(internal::random<int>(0,rows-1),internal::random<int>(0,cols-1)) += 1;\n//       t.stop();\n//       std::cout << \"google::sparse => \\t\" << t.value()-rtime\n//                 << \" nnz=\" << set1.nonZeros() << \"\\n\";getchar();\n//     }\n    std::cout << \"\\n\\n\";\n  }\n\n  return 0;\n}\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/sparse_setter.cpp",
    "content": "\n//g++ -O3 -g0 -DNDEBUG  sparse_product.cpp -I.. -I/home/gael/Coding/LinearAlgebra/mtl4/ -DDENSITY=0.005 -DSIZE=10000 && ./a.out\n//g++ -O3 -g0 -DNDEBUG  sparse_product.cpp -I.. -I/home/gael/Coding/LinearAlgebra/mtl4/ -DDENSITY=0.05 -DSIZE=2000 && ./a.out\n// -DNOGMM -DNOMTL -DCSPARSE\n// -I /home/gael/Coding/LinearAlgebra/CSparse/Include/ /home/gael/Coding/LinearAlgebra/CSparse/Lib/libcsparse.a\n#ifndef SIZE\n#define SIZE 100000\n#endif\n\n#ifndef NBPERROW\n#define NBPERROW 24\n#endif\n\n#ifndef REPEAT\n#define REPEAT 2\n#endif\n\n#ifndef NBTRIES\n#define NBTRIES 2\n#endif\n\n#ifndef KK\n#define KK 10\n#endif\n\n#ifndef NOGOOGLE\n#define EIGEN_GOOGLEHASH_SUPPORT\n#include <google/sparse_hash_map>\n#endif\n\n#include \"BenchSparseUtil.h\"\n\n#define CHECK_MEM\n// #define CHECK_MEM  std/**/::cout << \"check mem\\n\"; getchar();\n\n#define BENCH(X) \\\n  timer.reset(); \\\n  for (int _j=0; _j<NBTRIES; ++_j) { \\\n    timer.start(); \\\n    for (int _k=0; _k<REPEAT; ++_k) { \\\n        X  \\\n  } timer.stop(); }\n\ntypedef std::vector<Vector2i> Coordinates;\ntypedef std::vector<float> Values;\n\nEIGEN_DONT_INLINE Scalar* setinnerrand_eigen(const Coordinates& coords, const Values& vals);\nEIGEN_DONT_INLINE Scalar* setrand_eigen_dynamic(const Coordinates& coords, const Values& vals);\nEIGEN_DONT_INLINE Scalar* setrand_eigen_compact(const Coordinates& coords, const Values& vals);\nEIGEN_DONT_INLINE Scalar* setrand_eigen_sumeq(const Coordinates& coords, const Values& vals);\nEIGEN_DONT_INLINE Scalar* setrand_eigen_gnu_hash(const Coordinates& coords, const Values& vals);\nEIGEN_DONT_INLINE Scalar* setrand_eigen_google_dense(const Coordinates& coords, const Values& vals);\nEIGEN_DONT_INLINE Scalar* setrand_eigen_google_sparse(const Coordinates& coords, const Values& vals);\nEIGEN_DONT_INLINE Scalar* setrand_scipy(const Coordinates& coords, const Values& vals);\nEIGEN_DONT_INLINE Scalar* setrand_ublas_mapped(const Coordinates& coords, const Values& vals);\nEIGEN_DONT_INLINE Scalar* setrand_ublas_coord(const Coordinates& coords, const Values& vals);\nEIGEN_DONT_INLINE Scalar* setrand_ublas_compressed(const Coordinates& coords, const Values& vals);\nEIGEN_DONT_INLINE Scalar* setrand_ublas_genvec(const Coordinates& coords, const Values& vals);\nEIGEN_DONT_INLINE Scalar* setrand_mtl(const Coordinates& coords, const Values& vals);\n\nint main(int argc, char *argv[])\n{\n  int rows = SIZE;\n  int cols = SIZE;\n  bool fullyrand = true;\n\n  BenchTimer timer;\n  Coordinates coords;\n  Values values;\n  if(fullyrand)\n  {\n    Coordinates pool;\n    pool.reserve(cols*NBPERROW);\n    std::cerr << \"fill pool\" << \"\\n\";\n    for (int i=0; i<cols*NBPERROW; )\n    {\n//       DynamicSparseMatrix<int> stencil(SIZE,SIZE);\n      Vector2i ij(internal::random<int>(0,rows-1),internal::random<int>(0,cols-1));\n//       if(stencil.coeffRef(ij.x(), ij.y())==0)\n      {\n//         stencil.coeffRef(ij.x(), ij.y()) = 1;\n        pool.push_back(ij);\n\n      }\n      ++i;\n    }\n    std::cerr << \"pool ok\" << \"\\n\";\n    int n = cols*NBPERROW*KK;\n    coords.reserve(n);\n    values.reserve(n);\n    for (int i=0; i<n; ++i)\n    {\n      int i = internal::random<int>(0,pool.size());\n      coords.push_back(pool[i]);\n      values.push_back(internal::random<Scalar>());\n    }\n  }\n  else\n  {\n    for (int j=0; j<cols; ++j)\n    for (int i=0; i<NBPERROW; ++i)\n    {\n      coords.push_back(Vector2i(internal::random<int>(0,rows-1),j));\n      values.push_back(internal::random<Scalar>());\n    }\n  }\n  std::cout << \"nnz = \" << coords.size()  << \"\\n\";\n  CHECK_MEM\n\n    // dense matrices\n    #ifdef DENSEMATRIX\n    {\n      BENCH(setrand_eigen_dense(coords,values);)\n      std::cout << \"Eigen Dense\\t\" << timer.value() << \"\\n\";\n    }\n    #endif\n\n    // eigen sparse matrices\n//     if (!fullyrand)\n//     {\n//       BENCH(setinnerrand_eigen(coords,values);)\n//       std::cout << \"Eigen fillrand\\t\" << timer.value() << \"\\n\";\n//     }\n    {\n      BENCH(setrand_eigen_dynamic(coords,values);)\n      std::cout << \"Eigen dynamic\\t\" << timer.value() << \"\\n\";\n    }\n//     {\n//       BENCH(setrand_eigen_compact(coords,values);)\n//       std::cout << \"Eigen compact\\t\" << timer.value() << \"\\n\";\n//     }\n    {\n      BENCH(setrand_eigen_sumeq(coords,values);)\n      std::cout << \"Eigen sumeq\\t\" << timer.value() << \"\\n\";\n    }\n    {\n//       BENCH(setrand_eigen_gnu_hash(coords,values);)\n//       std::cout << \"Eigen std::map\\t\" << timer.value() << \"\\n\";\n    }\n    {\n      BENCH(setrand_scipy(coords,values);)\n      std::cout << \"scipy\\t\" << timer.value() << \"\\n\";\n    }\n    #ifndef NOGOOGLE\n    {\n      BENCH(setrand_eigen_google_dense(coords,values);)\n      std::cout << \"Eigen google dense\\t\" << timer.value() << \"\\n\";\n    }\n    {\n      BENCH(setrand_eigen_google_sparse(coords,values);)\n      std::cout << \"Eigen google sparse\\t\" << timer.value() << \"\\n\";\n    }\n    #endif\n\n    #ifndef NOUBLAS\n    {\n//       BENCH(setrand_ublas_mapped(coords,values);)\n//       std::cout << \"ublas mapped\\t\" << timer.value() << \"\\n\";\n    }\n    {\n      BENCH(setrand_ublas_genvec(coords,values);)\n      std::cout << \"ublas vecofvec\\t\" << timer.value() << \"\\n\";\n    }\n    /*{\n      timer.reset();\n      timer.start();\n      for (int k=0; k<REPEAT; ++k)\n        setrand_ublas_compressed(coords,values);\n      timer.stop();\n      std::cout << \"ublas comp\\t\" << timer.value() << \"\\n\";\n    }\n    {\n      timer.reset();\n      timer.start();\n      for (int k=0; k<REPEAT; ++k)\n        setrand_ublas_coord(coords,values);\n      timer.stop();\n      std::cout << \"ublas coord\\t\" << timer.value() << \"\\n\";\n    }*/\n    #endif\n\n\n    // MTL4\n    #ifndef NOMTL\n    {\n      BENCH(setrand_mtl(coords,values));\n      std::cout << \"MTL\\t\" << timer.value() << \"\\n\";\n    }\n    #endif\n\n  return 0;\n}\n\nEIGEN_DONT_INLINE Scalar* setinnerrand_eigen(const Coordinates& coords, const Values& vals)\n{\n  using namespace Eigen;\n  SparseMatrix<Scalar> mat(SIZE,SIZE);\n  //mat.startFill(2000000/*coords.size()*/);\n  for (int i=0; i<coords.size(); ++i)\n  {\n    mat.insert(coords[i].x(), coords[i].y()) = vals[i];\n  }\n  mat.finalize();\n  CHECK_MEM;\n  return 0;\n}\n\nEIGEN_DONT_INLINE Scalar* setrand_eigen_dynamic(const Coordinates& coords, const Values& vals)\n{\n  using namespace Eigen;\n  DynamicSparseMatrix<Scalar> mat(SIZE,SIZE);\n  mat.reserve(coords.size()/10);\n  for (int i=0; i<coords.size(); ++i)\n  {\n    mat.coeffRef(coords[i].x(), coords[i].y()) += vals[i];\n  }\n  mat.finalize();\n  CHECK_MEM;\n  return &mat.coeffRef(coords[0].x(), coords[0].y());\n}\n\nEIGEN_DONT_INLINE Scalar* setrand_eigen_sumeq(const Coordinates& coords, const Values& vals)\n{\n  using namespace Eigen;\n  int n = coords.size()/KK;\n  DynamicSparseMatrix<Scalar> mat(SIZE,SIZE);\n  for (int j=0; j<KK; ++j)\n  {\n    DynamicSparseMatrix<Scalar> aux(SIZE,SIZE);\n    mat.reserve(n);\n    for (int i=j*n; i<(j+1)*n; ++i)\n    {\n      aux.insert(coords[i].x(), coords[i].y()) += vals[i];\n    }\n    aux.finalize();\n    mat += aux;\n  }\n  return &mat.coeffRef(coords[0].x(), coords[0].y());\n}\n\nEIGEN_DONT_INLINE Scalar* setrand_eigen_compact(const Coordinates& coords, const Values& vals)\n{\n  using namespace Eigen;\n  DynamicSparseMatrix<Scalar> setter(SIZE,SIZE);\n  setter.reserve(coords.size()/10);\n  for (int i=0; i<coords.size(); ++i)\n  {\n    setter.coeffRef(coords[i].x(), coords[i].y()) += vals[i];\n  }\n  SparseMatrix<Scalar> mat = setter;\n  CHECK_MEM;\n  return &mat.coeffRef(coords[0].x(), coords[0].y());\n}\n\nEIGEN_DONT_INLINE Scalar* setrand_eigen_gnu_hash(const Coordinates& coords, const Values& vals)\n{\n  using namespace Eigen;\n  SparseMatrix<Scalar> mat(SIZE,SIZE);\n  {\n    RandomSetter<SparseMatrix<Scalar>, StdMapTraits > setter(mat);\n    for (int i=0; i<coords.size(); ++i)\n    {\n      setter(coords[i].x(), coords[i].y()) += vals[i];\n    }\n    CHECK_MEM;\n  }\n  return &mat.coeffRef(coords[0].x(), coords[0].y());\n}\n\n#ifndef NOGOOGLE\nEIGEN_DONT_INLINE Scalar* setrand_eigen_google_dense(const Coordinates& coords, const Values& vals)\n{\n  using namespace Eigen;\n  SparseMatrix<Scalar> mat(SIZE,SIZE);\n  {\n    RandomSetter<SparseMatrix<Scalar>, GoogleDenseHashMapTraits> setter(mat);\n    for (int i=0; i<coords.size(); ++i)\n      setter(coords[i].x(), coords[i].y()) += vals[i];\n    CHECK_MEM;\n  }\n  return &mat.coeffRef(coords[0].x(), coords[0].y());\n}\n\nEIGEN_DONT_INLINE Scalar* setrand_eigen_google_sparse(const Coordinates& coords, const Values& vals)\n{\n  using namespace Eigen;\n  SparseMatrix<Scalar> mat(SIZE,SIZE);\n  {\n    RandomSetter<SparseMatrix<Scalar>, GoogleSparseHashMapTraits> setter(mat);\n    for (int i=0; i<coords.size(); ++i)\n      setter(coords[i].x(), coords[i].y()) += vals[i];\n    CHECK_MEM;\n  }\n  return &mat.coeffRef(coords[0].x(), coords[0].y());\n}\n#endif\n\n\ntemplate <class T>\nvoid coo_tocsr(const int n_row,\n               const int n_col,\n               const int nnz,\n               const Coordinates Aij,\n               const Values Ax,\n                     int Bp[],\n                     int Bj[],\n                     T Bx[])\n{\n    //compute number of non-zero entries per row of A coo_tocsr\n    std::fill(Bp, Bp + n_row, 0);\n\n    for (int n = 0; n < nnz; n++){\n        Bp[Aij[n].x()]++;\n    }\n\n    //cumsum the nnz per row to get Bp[]\n    for(int i = 0, cumsum = 0; i < n_row; i++){\n        int temp = Bp[i];\n        Bp[i] = cumsum;\n        cumsum += temp;\n    }\n    Bp[n_row] = nnz;\n\n    //write Aj,Ax into Bj,Bx\n    for(int n = 0; n < nnz; n++){\n        int row  = Aij[n].x();\n        int dest = Bp[row];\n\n        Bj[dest] = Aij[n].y();\n        Bx[dest] = Ax[n];\n\n        Bp[row]++;\n    }\n\n    for(int i = 0, last = 0; i <= n_row; i++){\n        int temp = Bp[i];\n        Bp[i]  = last;\n        last   = temp;\n    }\n\n    //now Bp,Bj,Bx form a CSR representation (with possible duplicates)\n}\n\ntemplate< class T1, class T2 >\nbool kv_pair_less(const std::pair<T1,T2>& x, const std::pair<T1,T2>& y){\n    return x.first < y.first;\n}\n\n\ntemplate<class I, class T>\nvoid csr_sort_indices(const I n_row,\n                      const I Ap[],\n                            I Aj[],\n                            T Ax[])\n{\n    std::vector< std::pair<I,T> > temp;\n\n    for(I i = 0; i < n_row; i++){\n        I row_start = Ap[i];\n        I row_end   = Ap[i+1];\n\n        temp.clear();\n\n        for(I jj = row_start; jj < row_end; jj++){\n            temp.push_back(std::make_pair(Aj[jj],Ax[jj]));\n        }\n\n        std::sort(temp.begin(),temp.end(),kv_pair_less<I,T>);\n\n        for(I jj = row_start, n = 0; jj < row_end; jj++, n++){\n            Aj[jj] = temp[n].first;\n            Ax[jj] = temp[n].second;\n        }\n    }\n}\n\ntemplate <class I, class T>\nvoid csr_sum_duplicates(const I n_row,\n                        const I n_col,\n                              I Ap[],\n                              I Aj[],\n                              T Ax[])\n{\n    I nnz = 0;\n    I row_end = 0;\n    for(I i = 0; i < n_row; i++){\n        I jj = row_end;\n        row_end = Ap[i+1];\n        while( jj < row_end ){\n            I j = Aj[jj];\n            T x = Ax[jj];\n            jj++;\n            while( jj < row_end && Aj[jj] == j ){\n                x += Ax[jj];\n                jj++;\n            }\n            Aj[nnz] = j;\n            Ax[nnz] = x;\n            nnz++;\n        }\n        Ap[i+1] = nnz;\n    }\n}\n\nEIGEN_DONT_INLINE Scalar* setrand_scipy(const Coordinates& coords, const Values& vals)\n{\n  using namespace Eigen;\n  SparseMatrix<Scalar> mat(SIZE,SIZE);\n  mat.resizeNonZeros(coords.size());\n//   std::cerr << \"setrand_scipy...\\n\";\n  coo_tocsr<Scalar>(SIZE,SIZE, coords.size(), coords, vals, mat._outerIndexPtr(), mat._innerIndexPtr(), mat._valuePtr());\n//   std::cerr << \"coo_tocsr ok\\n\";\n\n  csr_sort_indices(SIZE, mat._outerIndexPtr(), mat._innerIndexPtr(), mat._valuePtr());\n\n  csr_sum_duplicates(SIZE, SIZE, mat._outerIndexPtr(), mat._innerIndexPtr(), mat._valuePtr());\n\n  mat.resizeNonZeros(mat._outerIndexPtr()[SIZE]);\n\n  return &mat.coeffRef(coords[0].x(), coords[0].y());\n}\n\n\n#ifndef NOUBLAS\nEIGEN_DONT_INLINE Scalar* setrand_ublas_mapped(const Coordinates& coords, const Values& vals)\n{\n  using namespace boost;\n  using namespace boost::numeric;\n  using namespace boost::numeric::ublas;\n  mapped_matrix<Scalar> aux(SIZE,SIZE);\n  for (int i=0; i<coords.size(); ++i)\n  {\n    aux(coords[i].x(), coords[i].y()) += vals[i];\n  }\n  CHECK_MEM;\n  compressed_matrix<Scalar> mat(aux);\n  return 0;// &mat(coords[0].x(), coords[0].y());\n}\n/*EIGEN_DONT_INLINE Scalar* setrand_ublas_coord(const Coordinates& coords, const Values& vals)\n{\n  using namespace boost;\n  using namespace boost::numeric;\n  using namespace boost::numeric::ublas;\n  coordinate_matrix<Scalar> aux(SIZE,SIZE);\n  for (int i=0; i<coords.size(); ++i)\n  {\n    aux(coords[i].x(), coords[i].y()) = vals[i];\n  }\n  compressed_matrix<Scalar> mat(aux);\n  return 0;//&mat(coords[0].x(), coords[0].y());\n}\nEIGEN_DONT_INLINE Scalar* setrand_ublas_compressed(const Coordinates& coords, const Values& vals)\n{\n  using namespace boost;\n  using namespace boost::numeric;\n  using namespace boost::numeric::ublas;\n  compressed_matrix<Scalar> mat(SIZE,SIZE);\n  for (int i=0; i<coords.size(); ++i)\n  {\n    mat(coords[i].x(), coords[i].y()) = vals[i];\n  }\n  return 0;//&mat(coords[0].x(), coords[0].y());\n}*/\nEIGEN_DONT_INLINE Scalar* setrand_ublas_genvec(const Coordinates& coords, const Values& vals)\n{\n  using namespace boost;\n  using namespace boost::numeric;\n  using namespace boost::numeric::ublas;\n\n//   ublas::vector<coordinate_vector<Scalar> > foo;\n  generalized_vector_of_vector<Scalar, row_major, ublas::vector<coordinate_vector<Scalar> > > aux(SIZE,SIZE);\n  for (int i=0; i<coords.size(); ++i)\n  {\n    aux(coords[i].x(), coords[i].y()) += vals[i];\n  }\n  CHECK_MEM;\n  compressed_matrix<Scalar,row_major> mat(aux);\n  return 0;//&mat(coords[0].x(), coords[0].y());\n}\n#endif\n\n#ifndef NOMTL\nEIGEN_DONT_INLINE void setrand_mtl(const Coordinates& coords, const Values& vals);\n#endif\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/sparse_transpose.cpp",
    "content": "\n//g++ -O3 -g0 -DNDEBUG  sparse_transpose.cpp -I.. -I/home/gael/Coding/LinearAlgebra/mtl4/ -DDENSITY=0.005 -DSIZE=10000 && ./a.out\n// -DNOGMM -DNOMTL\n// -DCSPARSE -I /home/gael/Coding/LinearAlgebra/CSparse/Include/ /home/gael/Coding/LinearAlgebra/CSparse/Lib/libcsparse.a\n\n#ifndef SIZE\n#define SIZE 10000\n#endif\n\n#ifndef DENSITY\n#define DENSITY 0.01\n#endif\n\n#ifndef REPEAT\n#define REPEAT 1\n#endif\n\n#include \"BenchSparseUtil.h\"\n\n#ifndef MINDENSITY\n#define MINDENSITY 0.0004\n#endif\n\n#ifndef NBTRIES\n#define NBTRIES 10\n#endif\n\n#define BENCH(X) \\\n  timer.reset(); \\\n  for (int _j=0; _j<NBTRIES; ++_j) { \\\n    timer.start(); \\\n    for (int _k=0; _k<REPEAT; ++_k) { \\\n        X  \\\n  } timer.stop(); }\n\nint main(int argc, char *argv[])\n{\n  int rows = SIZE;\n  int cols = SIZE;\n  float density = DENSITY;\n\n  EigenSparseMatrix sm1(rows,cols), sm3(rows,cols);\n\n  BenchTimer timer;\n  for (float density = DENSITY; density>=MINDENSITY; density*=0.5)\n  {\n    fillMatrix(density, rows, cols, sm1);\n\n    // dense matrices\n    #ifdef DENSEMATRIX\n    {\n      DenseMatrix m1(rows,cols), m3(rows,cols);\n      eiToDense(sm1, m1);\n      BENCH(for (int k=0; k<REPEAT; ++k) m3 = m1.transpose();)\n      std::cout << \"  Eigen dense:\\t\" << timer.value() << endl;\n    }\n    #endif\n\n    std::cout << \"Non zeros: \" << sm1.nonZeros()/float(sm1.rows()*sm1.cols())*100 << \"%\\n\";\n\n    // eigen sparse matrices\n    {\n      BENCH(for (int k=0; k<REPEAT; ++k) sm3 = sm1.transpose();)\n      std::cout << \"  Eigen:\\t\" << timer.value() << endl;\n    }\n\n    // CSparse\n    #ifdef CSPARSE\n    {\n      cs *m1, *m3;\n      eiToCSparse(sm1, m1);\n\n      BENCH(for (int k=0; k<REPEAT; ++k) { m3 = cs_transpose(m1,1); cs_spfree(m3);})\n      std::cout << \"  CSparse:\\t\" << timer.value() << endl;\n    }\n    #endif\n\n    // GMM++\n    #ifndef NOGMM\n    {\n      GmmDynSparse  gmmT3(rows,cols);\n      GmmSparse m1(rows,cols), m3(rows,cols);\n      eiToGmm(sm1, m1);\n      BENCH(for (int k=0; k<REPEAT; ++k) gmm::copy(gmm::transposed(m1),m3);)\n      std::cout << \"  GMM:\\t\\t\" << timer.value() << endl;\n    }\n    #endif\n\n    // MTL4\n    #ifndef NOMTL\n    {\n      MtlSparse m1(rows,cols), m3(rows,cols);\n      eiToMtl(sm1, m1);\n      BENCH(for (int k=0; k<REPEAT; ++k) m3 = trans(m1);)\n      std::cout << \"  MTL4:\\t\\t\" << timer.value() << endl;\n    }\n    #endif\n\n    std::cout << \"\\n\\n\";\n  }\n\n  return 0;\n}\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/sparse_trisolver.cpp",
    "content": "\n//g++ -O3 -g0 -DNDEBUG  sparse_product.cpp -I.. -I/home/gael/Coding/LinearAlgebra/mtl4/ -DDENSITY=0.005 -DSIZE=10000 && ./a.out\n//g++ -O3 -g0 -DNDEBUG  sparse_product.cpp -I.. -I/home/gael/Coding/LinearAlgebra/mtl4/ -DDENSITY=0.05 -DSIZE=2000 && ./a.out\n// -DNOGMM -DNOMTL\n// -I /home/gael/Coding/LinearAlgebra/CSparse/Include/ /home/gael/Coding/LinearAlgebra/CSparse/Lib/libcsparse.a\n\n#ifndef SIZE\n#define SIZE 10000\n#endif\n\n#ifndef DENSITY\n#define DENSITY 0.01\n#endif\n\n#ifndef REPEAT\n#define REPEAT 1\n#endif\n\n#include \"BenchSparseUtil.h\"\n\n#ifndef MINDENSITY\n#define MINDENSITY 0.0004\n#endif\n\n#ifndef NBTRIES\n#define NBTRIES 10\n#endif\n\n#define BENCH(X) \\\n  timer.reset(); \\\n  for (int _j=0; _j<NBTRIES; ++_j) { \\\n    timer.start(); \\\n    for (int _k=0; _k<REPEAT; ++_k) { \\\n        X  \\\n  } timer.stop(); }\n\ntypedef SparseMatrix<Scalar,UpperTriangular> EigenSparseTriMatrix;\ntypedef SparseMatrix<Scalar,RowMajorBit|UpperTriangular> EigenSparseTriMatrixRow;\n\nvoid fillMatrix(float density, int rows, int cols,  EigenSparseTriMatrix& dst)\n{\n  dst.startFill(rows*cols*density);\n  for(int j = 0; j < cols; j++)\n  {\n    for(int i = 0; i < j; i++)\n    {\n      Scalar v = (internal::random<float>(0,1) < density) ? internal::random<Scalar>() : 0;\n      if (v!=0)\n        dst.fill(i,j) = v;\n    }\n    dst.fill(j,j) = internal::random<Scalar>();\n  }\n  dst.endFill();\n}\n\nint main(int argc, char *argv[])\n{\n  int rows = SIZE;\n  int cols = SIZE;\n  float density = DENSITY;\n  BenchTimer timer;\n  #if 1\n  EigenSparseTriMatrix sm1(rows,cols);\n  typedef Matrix<Scalar,Dynamic,1> DenseVector;\n  DenseVector b = DenseVector::Random(cols);\n  DenseVector x = DenseVector::Random(cols);\n\n  bool densedone = false;\n\n  for (float density = DENSITY; density>=MINDENSITY; density*=0.5)\n  {\n    EigenSparseTriMatrix sm1(rows, cols);\n    fillMatrix(density, rows, cols, sm1);\n\n    // dense matrices\n    #ifdef DENSEMATRIX\n    if (!densedone)\n    {\n      densedone = true;\n      std::cout << \"Eigen Dense\\t\" << density*100 << \"%\\n\";\n      DenseMatrix m1(rows,cols);\n      Matrix<Scalar,Dynamic,Dynamic,Dynamic,Dynamic,RowMajorBit> m2(rows,cols);\n      eiToDense(sm1, m1);\n      m2 = m1;\n\n      BENCH(x = m1.marked<UpperTriangular>().solveTriangular(b);)\n      std::cout << \"   colmajor^-1 * b:\\t\" << timer.value() << endl;\n//       std::cerr << x.transpose() << \"\\n\";\n\n      BENCH(x = m2.marked<UpperTriangular>().solveTriangular(b);)\n      std::cout << \"   rowmajor^-1 * b:\\t\" << timer.value() << endl;\n//       std::cerr << x.transpose() << \"\\n\";\n    }\n    #endif\n\n    // eigen sparse matrices\n    {\n      std::cout << \"Eigen sparse\\t\" << density*100 << \"%\\n\";\n      EigenSparseTriMatrixRow sm2 = sm1;\n\n      BENCH(x = sm1.solveTriangular(b);)\n      std::cout << \"   colmajor^-1 * b:\\t\" << timer.value() << endl;\n//       std::cerr << x.transpose() << \"\\n\";\n\n      BENCH(x = sm2.solveTriangular(b);)\n      std::cout << \"   rowmajor^-1 * b:\\t\" << timer.value() << endl;\n//       std::cerr << x.transpose() << \"\\n\";\n\n//       x = b;\n//       BENCH(sm1.inverseProductInPlace(x);)\n//       std::cout << \"   colmajor^-1 * b:\\t\" << timer.value() << \" (inplace)\" << endl;\n//       std::cerr << x.transpose() << \"\\n\";\n//\n//       x = b;\n//       BENCH(sm2.inverseProductInPlace(x);)\n//       std::cout << \"   rowmajor^-1 * b:\\t\" << timer.value() << \" (inplace)\" << endl;\n//       std::cerr << x.transpose() << \"\\n\";\n    }\n\n\n\n    // CSparse\n    #ifdef CSPARSE\n    {\n      std::cout << \"CSparse \\t\" << density*100 << \"%\\n\";\n      cs *m1;\n      eiToCSparse(sm1, m1);\n\n      BENCH(x = b; if (!cs_lsolve (m1, x.data())){std::cerr << \"cs_lsolve failed\\n\"; break;}; )\n      std::cout << \"   colmajor^-1 * b:\\t\" << timer.value() << endl;\n    }\n    #endif\n\n    // GMM++\n    #ifndef NOGMM\n    {\n      std::cout << \"GMM++ sparse\\t\" << density*100 << \"%\\n\";\n      GmmSparse m1(rows,cols);\n      gmm::csr_matrix<Scalar> m2;\n      eiToGmm(sm1, m1);\n      gmm::copy(m1,m2);\n      std::vector<Scalar> gmmX(cols), gmmB(cols);\n      Map<Matrix<Scalar,Dynamic,1> >(&gmmX[0], cols) = x;\n      Map<Matrix<Scalar,Dynamic,1> >(&gmmB[0], cols) = b;\n\n      gmmX = gmmB;\n      BENCH(gmm::upper_tri_solve(m1, gmmX, false);)\n      std::cout << \"   colmajor^-1 * b:\\t\" << timer.value() << endl;\n//       std::cerr << Map<Matrix<Scalar,Dynamic,1> >(&gmmX[0], cols).transpose() << \"\\n\";\n\n      gmmX = gmmB;\n      BENCH(gmm::upper_tri_solve(m2, gmmX, false);)\n      timer.stop();\n      std::cout << \"   rowmajor^-1 * b:\\t\" << timer.value() << endl;\n//       std::cerr << Map<Matrix<Scalar,Dynamic,1> >(&gmmX[0], cols).transpose() << \"\\n\";\n    }\n    #endif\n\n    // MTL4\n    #ifndef NOMTL\n    {\n      std::cout << \"MTL4\\t\" << density*100 << \"%\\n\";\n      MtlSparse m1(rows,cols);\n      MtlSparseRowMajor m2(rows,cols);\n      eiToMtl(sm1, m1);\n      m2 = m1;\n      mtl::dense_vector<Scalar> x(rows, 1.0);\n      mtl::dense_vector<Scalar> b(rows, 1.0);\n\n      BENCH(x = mtl::upper_trisolve(m1,b);)\n      std::cout << \"   colmajor^-1 * b:\\t\" << timer.value() << endl;\n//       std::cerr << x << \"\\n\";\n\n      BENCH(x = mtl::upper_trisolve(m2,b);)\n      std::cout << \"   rowmajor^-1 * b:\\t\" << timer.value() << endl;\n//       std::cerr << x << \"\\n\";\n    }\n    #endif\n\n\n    std::cout << \"\\n\\n\";\n  }\n  #endif\n\n  #if 0\n    // bench small matrices (in-place versus return bye value)\n    {\n      timer.reset();\n      for (int _j=0; _j<10; ++_j) {\n        Matrix4f m = Matrix4f::Random();\n        Vector4f b = Vector4f::Random();\n        Vector4f x = Vector4f::Random();\n        timer.start();\n        for (int _k=0; _k<1000000; ++_k) {\n          b = m.inverseProduct(b);\n        }\n        timer.stop();\n      }\n      std::cout << \"4x4 :\\t\" << timer.value() << endl;\n    }\n\n    {\n      timer.reset();\n      for (int _j=0; _j<10; ++_j) {\n        Matrix4f m = Matrix4f::Random();\n        Vector4f b = Vector4f::Random();\n        Vector4f x = Vector4f::Random();\n        timer.start();\n        for (int _k=0; _k<1000000; ++_k) {\n          m.inverseProductInPlace(x);\n        }\n        timer.stop();\n      }\n      std::cout << \"4x4 IP :\\t\" << timer.value() << endl;\n    }\n  #endif\n\n  return 0;\n}\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/spbench/CMakeLists.txt",
    "content": "\n\nset(BLAS_FOUND TRUE)\nset(LAPACK_FOUND TRUE)\nset(BLAS_LIBRARIES eigen_blas_static)\nset(LAPACK_LIBRARIES eigen_lapack_static)\n\nset(SPARSE_LIBS \"\")\n\n# find_library(PARDISO_LIBRARIES pardiso412-GNU450-X86-64)\n# if(PARDISO_LIBRARIES)\n#   add_definitions(\"-DEIGEN_PARDISO_SUPPORT\")\n#   set(SPARSE_LIBS ${SPARSE_LIBS} ${PARDISO_LIBRARIES})\n# endif()\n\nfind_package(Cholmod)\nif(CHOLMOD_FOUND AND BLAS_FOUND AND LAPACK_FOUND)\n  add_definitions(\"-DEIGEN_CHOLMOD_SUPPORT\")\n  include_directories(${CHOLMOD_INCLUDES})\n  set(SPARSE_LIBS ${SPARSE_LIBS} ${CHOLMOD_LIBRARIES} ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES})\n  set(CHOLMOD_ALL_LIBS  ${CHOLMOD_LIBRARIES} ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES})\nendif()\n\nfind_package(Umfpack)\nif(UMFPACK_FOUND AND BLAS_FOUND)\n  add_definitions(\"-DEIGEN_UMFPACK_SUPPORT\")\n  include_directories(${UMFPACK_INCLUDES})\n  set(SPARSE_LIBS ${SPARSE_LIBS} ${UMFPACK_LIBRARIES} ${BLAS_LIBRARIES})\n  set(UMFPACK_ALL_LIBS ${UMFPACK_LIBRARIES} ${BLAS_LIBRARIES})\nendif()\n\nfind_package(SuperLU 4.0)\nif(SUPERLU_FOUND AND BLAS_FOUND)\n  add_definitions(\"-DEIGEN_SUPERLU_SUPPORT\")\n  include_directories(${SUPERLU_INCLUDES})\n  set(SPARSE_LIBS ${SPARSE_LIBS} ${SUPERLU_LIBRARIES} ${BLAS_LIBRARIES})\n  set(SUPERLU_ALL_LIBS ${SUPERLU_LIBRARIES} ${BLAS_LIBRARIES})\nendif()\n\n\nfind_package(PASTIX QUIET COMPONENTS METIS SCOTCH)\n# check that the PASTIX found is a version without MPI\nfind_path(PASTIX_pastix_nompi.h_INCLUDE_DIRS\n  NAMES pastix_nompi.h\n  HINTS ${PASTIX_INCLUDE_DIRS}\n)\nif (NOT PASTIX_pastix_nompi.h_INCLUDE_DIRS)\n  message(STATUS \"A version of Pastix has been found but pastix_nompi.h does not exist in the include directory.\"\n                 \" Because Eigen tests require a version without MPI, we disable the Pastix backend.\")\nendif()\nif(PASTIX_FOUND AND PASTIX_pastix_nompi.h_INCLUDE_DIRS AND BLAS_FOUND)\n  add_definitions(\"-DEIGEN_PASTIX_SUPPORT\")\n  include_directories(${PASTIX_INCLUDE_DIRS_DEP})\n  if(SCOTCH_FOUND)\n    include_directories(${SCOTCH_INCLUDE_DIRS})\n    set(PASTIX_LIBRARIES ${PASTIX_LIBRARIES} ${SCOTCH_LIBRARIES})\n  elseif(METIS_FOUND)\n    include_directories(${METIS_INCLUDE_DIRS})\n    set(PASTIX_LIBRARIES ${PASTIX_LIBRARIES} ${METIS_LIBRARIES})  \n  endif()\n  set(SPARSE_LIBS ${SPARSE_LIBS} ${PASTIX_LIBRARIES_DEP} ${ORDERING_LIBRARIES})\n  set(PASTIX_ALL_LIBS ${PASTIX_LIBRARIES_DEP})\nendif()\n\nif(METIS_FOUND)\n  include_directories(${METIS_INCLUDE_DIRS})\n  set (SPARSE_LIBS ${SPARSE_LIBS} ${METIS_LIBRARIES})\n  add_definitions(\"-DEIGEN_METIS_SUPPORT\")\nendif()\n\nfind_library(RT_LIBRARY rt)\nif(RT_LIBRARY)\n  set(SPARSE_LIBS ${SPARSE_LIBS} ${RT_LIBRARY})\nendif()\n\nadd_executable(spbenchsolver spbenchsolver.cpp)\ntarget_link_libraries (spbenchsolver ${SPARSE_LIBS})\n\nadd_executable(spsolver sp_solver.cpp)\ntarget_link_libraries (spsolver ${SPARSE_LIBS})\n\n\nadd_executable(test_sparseLU test_sparseLU.cpp)\ntarget_link_libraries (test_sparseLU ${SPARSE_LIBS})\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/spbench/sp_solver.cpp",
    "content": "// Small bench routine for Eigen available in Eigen\n// (C) Desire NUENTSA WAKAM, INRIA\n\n#include <iostream>\n#include <fstream>\n#include <iomanip>\n#include <Eigen/Jacobi>\n#include <Eigen/Householder>\n#include <Eigen/IterativeLinearSolvers>\n#include <Eigen/LU>\n#include <unsupported/Eigen/SparseExtra>\n//#include <Eigen/SparseLU>\n#include <Eigen/SuperLUSupport>\n// #include <unsupported/Eigen/src/IterativeSolvers/Scaling.h>\n#include <bench/BenchTimer.h>\n#include <unsupported/Eigen/IterativeSolvers>\nusing namespace std;\nusing namespace Eigen;\n\nint main(int argc, char **args)\n{\n  SparseMatrix<double, ColMajor> A; \n  typedef SparseMatrix<double, ColMajor>::Index Index;\n  typedef Matrix<double, Dynamic, Dynamic> DenseMatrix;\n  typedef Matrix<double, Dynamic, 1> DenseRhs;\n  VectorXd b, x, tmp;\n  BenchTimer timer,totaltime; \n  //SparseLU<SparseMatrix<double, ColMajor> >   solver;\n//   SuperLU<SparseMatrix<double, ColMajor> >   solver;\n  ConjugateGradient<SparseMatrix<double, ColMajor>, Lower,IncompleteCholesky<double,Lower> > solver; \n  ifstream matrix_file; \n  string line;\n  int  n;\n  // Set parameters\n//   solver.iparm(IPARM_THREAD_NBR) = 4;\n  /* Fill the matrix with sparse matrix stored in Matrix-Market coordinate column-oriented format */\n  if (argc < 2) assert(false && \"please, give the matrix market file \");\n  \n  timer.start();\n  totaltime.start();\n  loadMarket(A, args[1]);\n  cout << \"End charging matrix \" << endl;\n  bool iscomplex=false, isvector=false;\n  int sym;\n  getMarketHeader(args[1], sym, iscomplex, isvector);\n  if (iscomplex) { cout<< \" Not for complex matrices \\n\"; return -1; }\n  if (isvector) { cout << \"The provided file is not a matrix file\\n\"; return -1;}\n  if (sym != 0) { // symmetric matrices, only the lower part is stored\n    SparseMatrix<double, ColMajor> temp; \n    temp = A;\n    A = temp.selfadjointView<Lower>();\n  }\n  timer.stop();\n  \n  n = A.cols();\n  // ====== TESTS FOR SPARSE TUTORIAL ======\n//   cout<< \"OuterSize \" << A.outerSize() << \" inner \" << A.innerSize() << endl; \n//   SparseMatrix<double, RowMajor> mat1(A); \n//   SparseMatrix<double, RowMajor> mat2;\n//   cout << \" norm of A \" << mat1.norm() << endl; ;\n//   PermutationMatrix<Dynamic, Dynamic, int> perm(n);\n//   perm.resize(n,1);\n//   perm.indices().setLinSpaced(n, 0, n-1);\n//   mat2 = perm * mat1;\n//   mat.subrows();\n//   mat2.resize(n,n); \n//   mat2.reserve(10);\n//   mat2.setConstant();\n//   std::cout<< \"NORM \" << mat1.squaredNorm()<< endl;  \n\n  cout<< \"Time to load the matrix \" << timer.value() <<endl;\n  /* Fill the right hand side */\n\n//   solver.set_restart(374);\n  if (argc > 2)\n    loadMarketVector(b, args[2]);\n  else \n  {\n    b.resize(n);\n    tmp.resize(n);\n//       tmp.setRandom();\n    for (int i = 0; i < n; i++) tmp(i) = i; \n    b = A * tmp ;\n  }\n//   Scaling<SparseMatrix<double> > scal; \n//   scal.computeRef(A);\n//   b = scal.LeftScaling().cwiseProduct(b);\n\n  /* Compute the factorization */\n  cout<< \"Starting the factorization \"<< endl; \n  timer.reset();\n  timer.start(); \n  cout<< \"Size of Input Matrix \"<< b.size()<<\"\\n\\n\";\n  cout<< \"Rows and columns \"<< A.rows() <<\" \" <<A.cols() <<\"\\n\";\n  solver.compute(A);\n//   solver.analyzePattern(A);\n//   solver.factorize(A);\n  if (solver.info() != Success) {\n    std::cout<< \"The solver failed \\n\";\n    return -1; \n  }\n  timer.stop(); \n  float time_comp = timer.value(); \n  cout <<\" Compute Time \" << time_comp<< endl; \n  \n  timer.reset();\n  timer.start();\n  x = solver.solve(b);\n//   x = scal.RightScaling().cwiseProduct(x);\n  timer.stop();\n  float time_solve = timer.value(); \n  cout<< \" Time to solve \" << time_solve << endl; \n \n  /* Check the accuracy */\n  VectorXd tmp2 = b - A*x;\n  double tempNorm = tmp2.norm()/b.norm();\n  cout << \"Relative norm of the computed solution : \" << tempNorm <<\"\\n\";\n//   cout << \"Iterations : \" << solver.iterations() << \"\\n\"; \n  \n  totaltime.stop();\n  cout << \"Total time \" << totaltime.value() << \"\\n\";\n//  std::cout<<x.transpose()<<\"\\n\";\n  \n  return 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/bench/spbench/spbench.dtd",
    "content": "<!ELEMENT BENCH (AVAILSOLVER+,LINEARSYSTEM+)>\n  <!ELEMENT AVAILSOLVER (SOLVER+)>\n    <!ELEMENT SOLVER (TYPE,PACKAGE)>\n      <!ELEMENT TYPE (#PCDATA)>  <!-- One of LU, LLT, LDLT, ITER -->\n      <!ELEMENT PACKAGE (#PCDATA)>  <!-- Derived from a library -->\n  <!ELEMENT LINEARSYSTEM (MATRIX,SOLVER_STAT+,BEST_SOLVER,GLOBAL_PARAMS*)>\n    <!ELEMENT MATRIX (NAME,SIZE,ENTRIES,PATTERN?,SYMMETRY,POSDEF?,ARITHMETIC,RHS*)>\n      <!ELEMENT NAME (#PCDATA)>\n      <!ELEMENT SIZE (#PCDATA)>\n      <!ELEMENT ENTRIES (#PCDATA)> <!-- The number of nonzeros elements -->\n      <!ELEMENT PATTERN (#PCDATA)>  <!-- Is structural pattern symmetric or not -->\n      <!ELEMENT SYMMETRY (#PCDATA)> <!-- symmmetry with numerical values -->\n      <!ELEMENT POSDEF (#PCDATA)> <!-- Is the matrix positive definite or not -->\n      <!ELEMENT ARITHMETIC (#PCDATA)> \n      <!ELEMENT RHS (SOURCE)>  <!-- A matrix can have one or more right hand side associated. -->\n        <!ELEMENT SOURCE (#PCDATA)> <!-- Source of the right hand side, either generated or provided -->\n    <!ELEMENT SOLVER_STAT (PARAMS*,TIME,ERROR,ITER?)>\n      <!ELEMENT PARAMS (#PCDATA)>\n      <!ELEMENT TIME (COMPUTE,SOLVE,TOTAL)>\n        <!ELEMENT COMPUTE (#PCDATA)> <!-- Time to analyze,to factorize, or to setup the preconditioner-->\n        <!ELEMENT SOLVE (#PCDATA)> <!-- Time to solve with all the available rhs -->\n        <!ELEMENT TOTAL (#PCDATA)>\n      <!ELEMENT ERROR (#PCDATA)> <!-- Either the relative error or the relative residual norm -->\n      <!ELEMENT ITER (#PCDATA)> <!-- Number of iterations -->\n    <!ELEMENT BEST_SOLVER CDATA> <!-- Id of the best solver -->\n    <!ELEMENT GLOBAL_PARAMS (#PCDATA)> <!-- Parameters shared by all solvers -->\n\n<!ATTLIST SOLVER ID CDATA #REQUIRED>\n<!ATTLIST SOLVER_STAT ID CDATA #REQUIRED>\n<!ATTLIST BEST_SOLVER ID CDATA #REQUIRED>\n<!ATTLIST RHS ID CDATA #IMPLIED>"
  },
  {
    "path": "3rdparty/eigen3/bench/spbench/spbenchsolver.cpp",
    "content": "#include <bench/spbench/spbenchsolver.h>\n\nvoid bench_printhelp()\n{\n    cout<< \" \\nbenchsolver : performs a benchmark of all the solvers available in Eigen \\n\\n\";\n    cout<< \" MATRIX FOLDER : \\n\";\n    cout<< \" The matrices for the benchmark should be collected in a folder specified with an environment variable EIGEN_MATRIXDIR \\n\";\n    cout<< \" The matrices are stored using the matrix market coordinate format \\n\";\n    cout<< \" The matrix and associated right-hand side (rhs) files are named respectively \\n\";\n    cout<< \" as MatrixName.mtx and MatrixName_b.mtx. If the rhs does not exist, a random one is generated. \\n\";\n    cout<< \" If a matrix is SPD, the matrix should be named as MatrixName_SPD.mtx \\n\";\n    cout<< \" If a true solution exists, it should be named as MatrixName_x.mtx; \\n\"     ;\n    cout<< \" it will be used to compute the norm of the error relative to the computed solutions\\n\\n\";\n    cout<< \" OPTIONS : \\n\"; \n    cout<< \" -h or --help \\n    print this help and return\\n\\n\";\n    cout<< \" -d matrixdir \\n    Use matrixdir as the matrix folder instead of the one specified in the environment variable EIGEN_MATRIXDIR\\n\\n\"; \n    cout<< \" -o outputfile.xml \\n    Output the statistics to a xml file \\n\\n\";\n    cout<< \" --eps <RelErr> Sets the relative tolerance for iterative solvers (default 1e-08) \\n\\n\";\n    cout<< \" --maxits <MaxIts> Sets the maximum number of iterations (default 1000) \\n\\n\";\n    \n}\nint main(int argc, char ** args)\n{\n  \n  bool help = ( get_options(argc, args, \"-h\") || get_options(argc, args, \"--help\") );\n  if(help) {\n    bench_printhelp();\n    return 0;\n  }\n\n  // Get the location of the test matrices\n  string matrix_dir;\n  if (!get_options(argc, args, \"-d\", &matrix_dir))\n  {\n    if(getenv(\"EIGEN_MATRIXDIR\") == NULL){\n      std::cerr << \"Please, specify the location of the matrices with -d mat_folder or the environment variable EIGEN_MATRIXDIR \\n\";\n      std::cerr << \" Run with --help to see the list of all the available options \\n\";\n      return -1;\n    }\n    matrix_dir = getenv(\"EIGEN_MATRIXDIR\");\n  }\n     \n  std::ofstream statbuf;\n  string statFile ;\n  \n  // Get the file to write the statistics\n  bool statFileExists = get_options(argc, args, \"-o\", &statFile);\n  if(statFileExists)\n  {\n    statbuf.open(statFile.c_str(), std::ios::out);\n    if(statbuf.good()){\n      statFileExists = true; \n      printStatheader(statbuf);\n      statbuf.close();\n    }\n    else\n      std::cerr << \"Unable to open the provided file for writing... \\n\";\n  }       \n  \n  // Get the maximum number of iterations and the tolerance\n  int maxiters = 1000; \n  double tol = 1e-08; \n  string inval; \n  if (get_options(argc, args, \"--eps\", &inval))\n    tol = atof(inval.c_str()); \n  if(get_options(argc, args, \"--maxits\", &inval))\n    maxiters = atoi(inval.c_str()); \n  \n  string current_dir; \n  // Test the real-arithmetics matrices\n  Browse_Matrices<double>(matrix_dir, statFileExists, statFile,maxiters, tol);\n  \n  // Test the complex-arithmetics matrices\n  Browse_Matrices<std::complex<double> >(matrix_dir, statFileExists, statFile, maxiters, tol); \n  \n  if(statFileExists)\n  {\n    statbuf.open(statFile.c_str(), std::ios::app); \n    statbuf << \"</BENCH> \\n\";\n    cout << \"\\n Output written in \" << statFile << \" ...\\n\";\n    statbuf.close();\n  }\n\n  return 0;\n}\n\n      \n"
  },
  {
    "path": "3rdparty/eigen3/bench/spbench/spbenchsolver.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n\n#include <iostream>\n#include <fstream>\n#include <Eigen/SparseCore>\n#include <bench/BenchTimer.h>\n#include <cstdlib>\n#include <string>\n#include <Eigen/Cholesky>\n#include <Eigen/Jacobi>\n#include <Eigen/Householder>\n#include <Eigen/IterativeLinearSolvers>\n#include <unsupported/Eigen/IterativeSolvers>\n#include <Eigen/LU>\n#include <unsupported/Eigen/SparseExtra>\n#include <Eigen/SparseLU>\n\n#include \"spbenchstyle.h\"\n\n#ifdef EIGEN_METIS_SUPPORT\n#include <Eigen/MetisSupport>\n#endif\n\n#ifdef EIGEN_CHOLMOD_SUPPORT\n#include <Eigen/CholmodSupport>\n#endif\n\n#ifdef EIGEN_UMFPACK_SUPPORT\n#include <Eigen/UmfPackSupport>\n#endif\n\n#ifdef EIGEN_PARDISO_SUPPORT\n#include <Eigen/PardisoSupport>\n#endif\n\n#ifdef EIGEN_SUPERLU_SUPPORT\n#include <Eigen/SuperLUSupport>\n#endif\n\n#ifdef EIGEN_PASTIX_SUPPORT\n#include <Eigen/PaStiXSupport>\n#endif\n\n// CONSTANTS\n#define EIGEN_UMFPACK  10\n#define EIGEN_SUPERLU  20\n#define EIGEN_PASTIX  30\n#define EIGEN_PARDISO  40\n#define EIGEN_SPARSELU_COLAMD 50\n#define EIGEN_SPARSELU_METIS 51\n#define EIGEN_BICGSTAB  60\n#define EIGEN_BICGSTAB_ILUT  61\n#define EIGEN_GMRES 70\n#define EIGEN_GMRES_ILUT 71\n#define EIGEN_SIMPLICIAL_LDLT  80\n#define EIGEN_CHOLMOD_LDLT  90\n#define EIGEN_PASTIX_LDLT  100\n#define EIGEN_PARDISO_LDLT  110\n#define EIGEN_SIMPLICIAL_LLT  120\n#define EIGEN_CHOLMOD_SUPERNODAL_LLT  130\n#define EIGEN_CHOLMOD_SIMPLICIAL_LLT  140\n#define EIGEN_PASTIX_LLT  150\n#define EIGEN_PARDISO_LLT  160\n#define EIGEN_CG  170\n#define EIGEN_CG_PRECOND  180\n\nusing namespace Eigen;\nusing namespace std; \n\n\n// Global variables for input parameters\nint MaximumIters; // Maximum number of iterations\ndouble RelErr; // Relative error of the computed solution\ndouble best_time_val; // Current best time overall solvers \nint best_time_id; //  id of the best solver for the current system \n\ntemplate<typename T> inline typename NumTraits<T>::Real test_precision() { return NumTraits<T>::dummy_precision(); }\ntemplate<> inline float test_precision<float>() { return 1e-3f; }                                                             \ntemplate<> inline double test_precision<double>() { return 1e-6; }                                                            \ntemplate<> inline float test_precision<std::complex<float> >() { return test_precision<float>(); }\ntemplate<> inline double test_precision<std::complex<double> >() { return test_precision<double>(); }\n\nvoid printStatheader(std::ofstream& out)\n{\n  // Print XML header\n  // NOTE It would have been much easier to write these XML documents using external libraries like tinyXML or Xerces-C++.\n  \n  out << \"<?xml version='1.0' encoding='UTF-8'?> \\n\";\n  out << \"<?xml-stylesheet type='text/xsl' href='#stylesheet' ?> \\n\"; \n  out << \"<!DOCTYPE BENCH  [\\n<!ATTLIST xsl:stylesheet\\n id\\t ID  #REQUIRED>\\n]>\";\n  out << \"\\n\\n<!-- Generated by the Eigen library -->\\n\"; \n  \n  out << \"\\n<BENCH> \\n\" ; //root XML element \n  // Print the xsl style section\n  printBenchStyle(out); \n  // List all available solvers \n  out << \" <AVAILSOLVER> \\n\";\n#ifdef EIGEN_UMFPACK_SUPPORT\n  out <<\"  <SOLVER ID='\" << EIGEN_UMFPACK << \"'>\\n\"; \n  out << \"   <TYPE> LU </TYPE> \\n\";\n  out << \"   <PACKAGE> UMFPACK </PACKAGE> \\n\"; \n  out << \"  </SOLVER> \\n\"; \n#endif\n#ifdef EIGEN_SUPERLU_SUPPORT\n  out <<\"  <SOLVER ID='\" << EIGEN_SUPERLU << \"'>\\n\"; \n  out << \"   <TYPE> LU </TYPE> \\n\";\n  out << \"   <PACKAGE> SUPERLU </PACKAGE> \\n\"; \n  out << \"  </SOLVER> \\n\"; \n#endif\n#ifdef EIGEN_CHOLMOD_SUPPORT\n  out <<\"  <SOLVER ID='\" << EIGEN_CHOLMOD_SIMPLICIAL_LLT << \"'>\\n\"; \n  out << \"   <TYPE> LLT SP</TYPE> \\n\";\n  out << \"   <PACKAGE> CHOLMOD </PACKAGE> \\n\";\n  out << \"  </SOLVER> \\n\"; \n  \n  out <<\"  <SOLVER ID='\" << EIGEN_CHOLMOD_SUPERNODAL_LLT << \"'>\\n\"; \n  out << \"   <TYPE> LLT</TYPE> \\n\";\n  out << \"   <PACKAGE> CHOLMOD </PACKAGE> \\n\";\n  out << \"  </SOLVER> \\n\";\n  \n  out <<\"  <SOLVER ID='\" << EIGEN_CHOLMOD_LDLT << \"'>\\n\"; \n  out << \"   <TYPE> LDLT </TYPE> \\n\";\n  out << \"   <PACKAGE> CHOLMOD </PACKAGE> \\n\";  \n  out << \"  </SOLVER> \\n\"; \n#endif\n#ifdef EIGEN_PARDISO_SUPPORT\n  out <<\"  <SOLVER ID='\" << EIGEN_PARDISO << \"'>\\n\"; \n  out << \"   <TYPE> LU </TYPE> \\n\";\n  out << \"   <PACKAGE> PARDISO </PACKAGE> \\n\"; \n  out << \"  </SOLVER> \\n\"; \n  \n  out <<\"  <SOLVER ID='\" << EIGEN_PARDISO_LLT << \"'>\\n\"; \n  out << \"   <TYPE> LLT </TYPE> \\n\";\n  out << \"   <PACKAGE> PARDISO </PACKAGE> \\n\"; \n  out << \"  </SOLVER> \\n\"; \n  \n  out <<\"  <SOLVER ID='\" << EIGEN_PARDISO_LDLT << \"'>\\n\"; \n  out << \"   <TYPE> LDLT </TYPE> \\n\";\n  out << \"   <PACKAGE> PARDISO </PACKAGE> \\n\"; \n  out << \"  </SOLVER> \\n\"; \n#endif\n#ifdef EIGEN_PASTIX_SUPPORT\n  out <<\"  <SOLVER ID='\" << EIGEN_PASTIX << \"'>\\n\"; \n  out << \"   <TYPE> LU </TYPE> \\n\";\n  out << \"   <PACKAGE> PASTIX </PACKAGE> \\n\"; \n  out << \"  </SOLVER> \\n\"; \n  \n  out <<\"  <SOLVER ID='\" << EIGEN_PASTIX_LLT << \"'>\\n\"; \n  out << \"   <TYPE> LLT </TYPE> \\n\";\n  out << \"   <PACKAGE> PASTIX </PACKAGE> \\n\"; \n  out << \"  </SOLVER> \\n\"; \n  \n  out <<\"  <SOLVER ID='\" << EIGEN_PASTIX_LDLT << \"'>\\n\"; \n  out << \"   <TYPE> LDLT </TYPE> \\n\";\n  out << \"   <PACKAGE> PASTIX </PACKAGE> \\n\"; \n  out << \"  </SOLVER> \\n\"; \n#endif\n  \n  out <<\"  <SOLVER ID='\" << EIGEN_BICGSTAB << \"'>\\n\"; \n  out << \"   <TYPE> BICGSTAB </TYPE> \\n\";\n  out << \"   <PACKAGE> EIGEN </PACKAGE> \\n\"; \n  out << \"  </SOLVER> \\n\"; \n  \n  out <<\"  <SOLVER ID='\" << EIGEN_BICGSTAB_ILUT << \"'>\\n\"; \n  out << \"   <TYPE> BICGSTAB_ILUT </TYPE> \\n\";\n  out << \"   <PACKAGE> EIGEN </PACKAGE> \\n\"; \n  out << \"  </SOLVER> \\n\"; \n  \n  out <<\"  <SOLVER ID='\" << EIGEN_GMRES_ILUT << \"'>\\n\"; \n  out << \"   <TYPE> GMRES_ILUT </TYPE> \\n\";\n  out << \"   <PACKAGE> EIGEN </PACKAGE> \\n\"; \n  out << \"  </SOLVER> \\n\"; \n  \n  out <<\"  <SOLVER ID='\" << EIGEN_SIMPLICIAL_LDLT << \"'>\\n\"; \n  out << \"   <TYPE> LDLT </TYPE> \\n\";\n  out << \"   <PACKAGE> EIGEN </PACKAGE> \\n\"; \n  out << \"  </SOLVER> \\n\"; \n  \n  out <<\"  <SOLVER ID='\" << EIGEN_SIMPLICIAL_LLT << \"'>\\n\"; \n  out << \"   <TYPE> LLT </TYPE> \\n\";\n  out << \"   <PACKAGE> EIGEN </PACKAGE> \\n\"; \n  out << \"  </SOLVER> \\n\"; \n  \n  out <<\"  <SOLVER ID='\" << EIGEN_CG << \"'>\\n\"; \n  out << \"   <TYPE> CG </TYPE> \\n\";\n  out << \"   <PACKAGE> EIGEN </PACKAGE> \\n\"; \n  out << \"  </SOLVER> \\n\"; \n  \n  out <<\"  <SOLVER ID='\" << EIGEN_SPARSELU_COLAMD << \"'>\\n\"; \n  out << \"   <TYPE> LU_COLAMD </TYPE> \\n\";\n  out << \"   <PACKAGE> EIGEN </PACKAGE> \\n\"; \n  out << \"  </SOLVER> \\n\"; \n  \n#ifdef EIGEN_METIS_SUPPORT\n  out <<\"  <SOLVER ID='\" << EIGEN_SPARSELU_METIS << \"'>\\n\"; \n  out << \"   <TYPE> LU_METIS </TYPE> \\n\";\n  out << \"   <PACKAGE> EIGEN </PACKAGE> \\n\"; \n  out << \"  </SOLVER> \\n\"; \n#endif\n  out << \" </AVAILSOLVER> \\n\"; \n  \n}\n\n\ntemplate<typename Solver, typename Scalar>\nvoid call_solver(Solver &solver, const int solver_id, const typename Solver::MatrixType& A, const Matrix<Scalar, Dynamic, 1>& b, const Matrix<Scalar, Dynamic, 1>& refX,std::ofstream& statbuf)\n{\n  \n  double total_time;\n  double compute_time;\n  double solve_time; \n  double rel_error;\n  Matrix<Scalar, Dynamic, 1> x; \n  BenchTimer timer; \n  timer.reset();\n  timer.start();\n  solver.compute(A); \n  if (solver.info() != Success)\n  {\n    std::cerr << \"Solver failed ... \\n\";\n    return;\n  }\n  timer.stop();\n  compute_time = timer.value();\n  statbuf << \"    <TIME>\\n\"; \n  statbuf << \"     <COMPUTE> \" << timer.value() << \"</COMPUTE>\\n\";\n  std::cout<< \"COMPUTE TIME : \" << timer.value() <<std::endl; \n    \n  timer.reset();\n  timer.start();\n  x = solver.solve(b); \n  if (solver.info() == NumericalIssue)\n  {\n    std::cerr << \"Solver failed ... \\n\";\n    return;\n  }\n  timer.stop();\n  solve_time = timer.value();\n  statbuf << \"     <SOLVE> \" << timer.value() << \"</SOLVE>\\n\"; \n  std::cout<< \"SOLVE TIME : \" << timer.value() <<std::endl; \n  \n  total_time = solve_time + compute_time;\n  statbuf << \"     <TOTAL> \" << total_time << \"</TOTAL>\\n\"; \n  std::cout<< \"TOTAL TIME : \" << total_time <<std::endl; \n  statbuf << \"    </TIME>\\n\"; \n  \n  // Verify the relative error\n  if(refX.size() != 0)\n    rel_error = (refX - x).norm()/refX.norm();\n  else \n  {\n    // Compute the relative residual norm\n    Matrix<Scalar, Dynamic, 1> temp; \n    temp = A * x; \n    rel_error = (b-temp).norm()/b.norm();\n  }\n  statbuf << \"    <ERROR> \" << rel_error << \"</ERROR>\\n\"; \n  std::cout<< \"REL. ERROR : \" << rel_error << \"\\n\\n\" ;\n  if ( rel_error <= RelErr )\n  {\n    // check the best time if convergence\n    if(!best_time_val || (best_time_val > total_time))\n    {\n      best_time_val = total_time;\n      best_time_id = solver_id;\n    }\n  }\n}\n\ntemplate<typename Solver, typename Scalar>\nvoid call_directsolver(Solver& solver, const int solver_id, const typename Solver::MatrixType& A, const Matrix<Scalar, Dynamic, 1>& b, const Matrix<Scalar, Dynamic, 1>& refX, std::string& statFile)\n{\n    std::ofstream statbuf(statFile.c_str(), std::ios::app);\n    statbuf << \"   <SOLVER_STAT ID='\" << solver_id <<\"'>\\n\"; \n    call_solver(solver, solver_id, A, b, refX,statbuf);\n    statbuf << \"   </SOLVER_STAT>\\n\";\n    statbuf.close();\n}\n\ntemplate<typename Solver, typename Scalar>\nvoid call_itersolver(Solver &solver, const int solver_id, const typename Solver::MatrixType& A, const Matrix<Scalar, Dynamic, 1>& b, const Matrix<Scalar, Dynamic, 1>& refX, std::string& statFile)\n{\n  solver.setTolerance(RelErr); \n  solver.setMaxIterations(MaximumIters);\n  \n  std::ofstream statbuf(statFile.c_str(), std::ios::app);\n  statbuf << \" <SOLVER_STAT ID='\" << solver_id <<\"'>\\n\"; \n  call_solver(solver, solver_id, A, b, refX,statbuf); \n  statbuf << \"   <ITER> \"<< solver.iterations() << \"</ITER>\\n\";\n  statbuf << \" </SOLVER_STAT>\\n\";\n  std::cout << \"ITERATIONS : \" << solver.iterations() <<\"\\n\\n\\n\"; \n  \n}\n\n\ntemplate <typename Scalar>\nvoid SelectSolvers(const SparseMatrix<Scalar>&A, unsigned int sym, Matrix<Scalar, Dynamic, 1>& b, const Matrix<Scalar, Dynamic, 1>& refX, std::string& statFile)\n{\n  typedef SparseMatrix<Scalar, ColMajor> SpMat; \n  // First, deal with Nonsymmetric and symmetric matrices\n  best_time_id = 0; \n  best_time_val = 0.0;\n  //UMFPACK\n  #ifdef EIGEN_UMFPACK_SUPPORT\n  {\n    cout << \"Solving with UMFPACK LU ... \\n\"; \n    UmfPackLU<SpMat> solver; \n    call_directsolver(solver, EIGEN_UMFPACK, A, b, refX,statFile); \n  }\n  #endif\n    //SuperLU\n  #ifdef EIGEN_SUPERLU_SUPPORT\n  {\n    cout << \"\\nSolving with SUPERLU ... \\n\"; \n    SuperLU<SpMat> solver;\n    call_directsolver(solver, EIGEN_SUPERLU, A, b, refX,statFile); \n  }\n  #endif\n    \n   // PaStix LU\n  #ifdef EIGEN_PASTIX_SUPPORT\n  {\n    cout << \"\\nSolving with PASTIX LU ... \\n\"; \n    PastixLU<SpMat> solver; \n    call_directsolver(solver, EIGEN_PASTIX, A, b, refX,statFile) ;\n  }\n  #endif\n\n   //PARDISO LU\n  #ifdef EIGEN_PARDISO_SUPPORT\n  {\n    cout << \"\\nSolving with PARDISO LU ... \\n\"; \n    PardisoLU<SpMat>  solver; \n    call_directsolver(solver, EIGEN_PARDISO, A, b, refX,statFile);\n  }\n  #endif\n  \n  // Eigen SparseLU METIS\n  cout << \"\\n Solving with Sparse LU AND COLAMD ... \\n\";\n  SparseLU<SpMat, COLAMDOrdering<int> >   solver;\n  call_directsolver(solver, EIGEN_SPARSELU_COLAMD, A, b, refX, statFile); \n  // Eigen SparseLU METIS\n  #ifdef EIGEN_METIS_SUPPORT\n  {\n    cout << \"\\n Solving with Sparse LU AND METIS ... \\n\";\n    SparseLU<SpMat, MetisOrdering<int> >   solver;\n    call_directsolver(solver, EIGEN_SPARSELU_METIS, A, b, refX, statFile); \n  }\n  #endif\n  \n  //BiCGSTAB\n  {\n    cout << \"\\nSolving with BiCGSTAB ... \\n\"; \n    BiCGSTAB<SpMat> solver; \n    call_itersolver(solver, EIGEN_BICGSTAB, A, b, refX,statFile);\n  }\n  //BiCGSTAB+ILUT\n  {\n    cout << \"\\nSolving with BiCGSTAB and ILUT ... \\n\"; \n    BiCGSTAB<SpMat, IncompleteLUT<Scalar> > solver; \n    call_itersolver(solver, EIGEN_BICGSTAB_ILUT, A, b, refX,statFile); \n  }\n  \n   \n  //GMRES\n//   {\n//     cout << \"\\nSolving with GMRES ... \\n\"; \n//     GMRES<SpMat> solver; \n//     call_itersolver(solver, EIGEN_GMRES, A, b, refX,statFile); \n//   }\n  //GMRES+ILUT\n  {\n    cout << \"\\nSolving with GMRES and ILUT ... \\n\"; \n    GMRES<SpMat, IncompleteLUT<Scalar> > solver; \n    call_itersolver(solver, EIGEN_GMRES_ILUT, A, b, refX,statFile);\n  }\n  \n  // Hermitian and not necessarily positive-definites\n  if (sym != NonSymmetric)\n  {\n    // Internal Cholesky\n    {\n      cout << \"\\nSolving with Simplicial LDLT ... \\n\"; \n      SimplicialLDLT<SpMat, Lower> solver;\n      call_directsolver(solver, EIGEN_SIMPLICIAL_LDLT, A, b, refX,statFile); \n    }\n    \n    // CHOLMOD\n    #ifdef EIGEN_CHOLMOD_SUPPORT\n    {\n      cout << \"\\nSolving with CHOLMOD LDLT ... \\n\"; \n      CholmodDecomposition<SpMat, Lower> solver;\n      solver.setMode(CholmodLDLt);\n       call_directsolver(solver,EIGEN_CHOLMOD_LDLT, A, b, refX,statFile);\n    }\n    #endif\n    \n    //PASTIX LLT\n    #ifdef EIGEN_PASTIX_SUPPORT\n    {\n      cout << \"\\nSolving with PASTIX LDLT ... \\n\"; \n      PastixLDLT<SpMat, Lower> solver; \n      call_directsolver(solver,EIGEN_PASTIX_LDLT, A, b, refX,statFile); \n    }\n    #endif\n    \n    //PARDISO LLT\n    #ifdef EIGEN_PARDISO_SUPPORT\n    {\n      cout << \"\\nSolving with PARDISO LDLT ... \\n\"; \n      PardisoLDLT<SpMat, Lower> solver; \n      call_directsolver(solver,EIGEN_PARDISO_LDLT, A, b, refX,statFile); \n    }\n    #endif\n  }\n\n   // Now, symmetric POSITIVE DEFINITE matrices\n  if (sym == SPD)\n  {\n    \n    //Internal Sparse Cholesky\n    {\n      cout << \"\\nSolving with SIMPLICIAL LLT ... \\n\"; \n      SimplicialLLT<SpMat, Lower> solver; \n      call_directsolver(solver,EIGEN_SIMPLICIAL_LLT, A, b, refX,statFile); \n    }\n    \n    // CHOLMOD\n    #ifdef EIGEN_CHOLMOD_SUPPORT\n    {\n      // CholMOD SuperNodal LLT\n      cout << \"\\nSolving with CHOLMOD LLT (Supernodal)... \\n\"; \n      CholmodDecomposition<SpMat, Lower> solver;\n      solver.setMode(CholmodSupernodalLLt);\n       call_directsolver(solver,EIGEN_CHOLMOD_SUPERNODAL_LLT, A, b, refX,statFile);\n      // CholMod Simplicial LLT\n      cout << \"\\nSolving with CHOLMOD LLT (Simplicial) ... \\n\"; \n      solver.setMode(CholmodSimplicialLLt);\n      call_directsolver(solver,EIGEN_CHOLMOD_SIMPLICIAL_LLT, A, b, refX,statFile);\n    }\n    #endif\n    \n    //PASTIX LLT\n    #ifdef EIGEN_PASTIX_SUPPORT\n    {\n      cout << \"\\nSolving with PASTIX LLT ... \\n\"; \n      PastixLLT<SpMat, Lower> solver; \n      call_directsolver(solver,EIGEN_PASTIX_LLT, A, b, refX,statFile);\n    }\n    #endif\n    \n    //PARDISO LLT\n    #ifdef EIGEN_PARDISO_SUPPORT\n    {\n      cout << \"\\nSolving with PARDISO LLT ... \\n\"; \n      PardisoLLT<SpMat, Lower> solver; \n      call_directsolver(solver,EIGEN_PARDISO_LLT, A, b, refX,statFile); \n    }\n    #endif\n    \n    // Internal CG\n    {\n      cout << \"\\nSolving with CG ... \\n\"; \n      ConjugateGradient<SpMat, Lower> solver; \n      call_itersolver(solver,EIGEN_CG, A, b, refX,statFile);\n    }\n    //CG+IdentityPreconditioner\n//     {\n//       cout << \"\\nSolving with CG and IdentityPreconditioner ... \\n\"; \n//       ConjugateGradient<SpMat, Lower, IdentityPreconditioner> solver; \n//       call_itersolver(solver,EIGEN_CG_PRECOND, A, b, refX,statFile);\n//     }\n  } // End SPD matrices \n}\n\n/* Browse all the matrices available in the specified folder \n * and solve the associated linear system.\n * The results of each solve are printed in the standard output\n * and optionally in the provided html file\n */\ntemplate <typename Scalar>\nvoid Browse_Matrices(const string folder, bool statFileExists, std::string& statFile, int maxiters, double tol)\n{\n  MaximumIters = maxiters; // Maximum number of iterations, global variable \n  RelErr = tol;  //Relative residual error  as stopping criterion for iterative solvers\n  MatrixMarketIterator<Scalar> it(folder);\n  for ( ; it; ++it)\n  {\n    //print the infos for this linear system \n    if(statFileExists)\n    {\n      std::ofstream statbuf(statFile.c_str(), std::ios::app);\n      statbuf << \"<LINEARSYSTEM> \\n\";\n      statbuf << \"   <MATRIX> \\n\";\n      statbuf << \"     <NAME> \" << it.matname() << \" </NAME>\\n\"; \n      statbuf << \"     <SIZE> \" << it.matrix().rows() << \" </SIZE>\\n\"; \n      statbuf << \"     <ENTRIES> \" << it.matrix().nonZeros() << \"</ENTRIES>\\n\";\n      if (it.sym()!=NonSymmetric)\n      {\n        statbuf << \"     <SYMMETRY> Symmetric </SYMMETRY>\\n\" ; \n        if (it.sym() == SPD) \n          statbuf << \"     <POSDEF> YES </POSDEF>\\n\"; \n        else \n          statbuf << \"     <POSDEF> NO </POSDEF>\\n\"; \n          \n      }\n      else\n      {\n        statbuf << \"     <SYMMETRY> NonSymmetric </SYMMETRY>\\n\" ; \n        statbuf << \"     <POSDEF> NO </POSDEF>\\n\"; \n      }\n      statbuf << \"   </MATRIX> \\n\";\n      statbuf.close();\n    }\n    \n    cout<< \"\\n\\n===================================================== \\n\";\n    cout<< \" ======  SOLVING WITH MATRIX \" << it.matname() << \" ====\\n\";\n    cout<< \" =================================================== \\n\\n\";\n    Matrix<Scalar, Dynamic, 1> refX;\n    if(it.hasrefX()) refX = it.refX();\n    // Call all suitable solvers for this linear system \n    SelectSolvers<Scalar>(it.matrix(), it.sym(), it.rhs(), refX, statFile);\n    \n    if(statFileExists)\n    {\n      std::ofstream statbuf(statFile.c_str(), std::ios::app);\n      statbuf << \"  <BEST_SOLVER ID='\"<< best_time_id\n              << \"'></BEST_SOLVER>\\n\"; \n      statbuf << \" </LINEARSYSTEM> \\n\"; \n      statbuf.close();\n    }\n  } \n} \n\nbool get_options(int argc, char **args, string option, string* value=0)\n{\n  int idx = 1, found=false; \n  while (idx<argc && !found){\n    if (option.compare(args[idx]) == 0){\n      found = true; \n      if(value) *value = args[idx+1];\n    }\n    idx+=2;\n  }\n  return found; \n}\n"
  },
  {
    "path": "3rdparty/eigen3/bench/spbench/spbenchstyle.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef SPBENCHSTYLE_H\n#define SPBENCHSTYLE_H\n\nvoid printBenchStyle(std::ofstream& out)\n{\n  out << \"<xsl:stylesheet id='stylesheet' version='1.0' \\\n      xmlns:xsl='http://www.w3.org/1999/XSL/Transform' >\\n \\\n      <xsl:template match='xsl:stylesheet' />\\n \\\n      <xsl:template match='/'> <!-- Root of the document -->\\n \\\n      <html>\\n \\\n        <head> \\n \\\n          <style type='text/css'> \\n \\\n            td { white-space: nowrap;}\\n \\\n          </style>\\n \\\n        </head>\\n \\\n        <body>\";\n  out<<\"<table border='1' width='100%' height='100%'>\\n \\\n        <TR> <!-- Write the table header -->\\n \\\n        <TH>Matrix</TH> <TH>N</TH> <TH> NNZ</TH>  <TH> Sym</TH>  <TH> SPD</TH> <TH> </TH>\\n \\\n          <xsl:for-each select='BENCH/AVAILSOLVER/SOLVER'>\\n \\\n            <xsl:sort select='@ID' data-type='number'/>\\n \\\n            <TH>\\n \\\n              <xsl:value-of select='TYPE' />\\n \\\n              <xsl:text></xsl:text>\\n \\\n              <xsl:value-of select='PACKAGE' />\\n \\\n              <xsl:text></xsl:text>\\n \\\n            </TH>\\n \\\n          </xsl:for-each>\\n \\\n        </TR>\";\n        \n  out<<\"  <xsl:for-each select='BENCH/LINEARSYSTEM'>\\n \\\n          <TR> <!-- print statistics for one linear system-->\\n \\\n            <TH rowspan='4'> <xsl:value-of select='MATRIX/NAME' /> </TH>\\n \\\n            <TD rowspan='4'> <xsl:value-of select='MATRIX/SIZE' /> </TD>\\n \\\n            <TD rowspan='4'> <xsl:value-of select='MATRIX/ENTRIES' /> </TD>\\n \\\n            <TD rowspan='4'> <xsl:value-of select='MATRIX/SYMMETRY' /> </TD>\\n \\\n            <TD rowspan='4'> <xsl:value-of select='MATRIX/POSDEF' /> </TD>\\n \\\n            <TH> Compute Time </TH>\\n \\\n            <xsl:for-each select='SOLVER_STAT'>\\n \\\n              <xsl:sort select='@ID' data-type='number'/>\\n \\\n              <TD> <xsl:value-of select='TIME/COMPUTE' /> </TD>\\n \\\n            </xsl:for-each>\\n \\\n          </TR>\";\n  out<<\"  <TR>\\n \\\n            <TH> Solve Time </TH>\\n \\\n            <xsl:for-each select='SOLVER_STAT'>\\n \\\n              <xsl:sort select='@ID' data-type='number'/>\\n \\\n              <TD> <xsl:value-of select='TIME/SOLVE' /> </TD>\\n \\\n            </xsl:for-each>\\n \\\n          </TR>\\n \\\n          <TR>\\n \\\n            <TH> Total Time </TH>\\n \\\n            <xsl:for-each select='SOLVER_STAT'>\\n \\\n              <xsl:sort select='@ID' data-type='number'/>\\n \\\n              <xsl:choose>\\n \\\n                <xsl:when test='@ID=../BEST_SOLVER/@ID'>\\n \\\n                  <TD style='background-color:red'> <xsl:value-of select='TIME/TOTAL' />  </TD>\\n \\\n                </xsl:when>\\n \\\n                <xsl:otherwise>\\n \\\n                  <TD>  <xsl:value-of select='TIME/TOTAL' /></TD>\\n \\\n                </xsl:otherwise>\\n \\\n              </xsl:choose>\\n \\\n            </xsl:for-each>\\n \\\n          </TR>\";\n  out<<\"  <TR>\\n \\\n              <TH> Error </TH>\\n \\\n              <xsl:for-each select='SOLVER_STAT'>\\n \\\n                <xsl:sort select='@ID' data-type='number'/>\\n \\\n                <TD> <xsl:value-of select='ERROR' />\\n \\\n                <xsl:if test='ITER'>\\n \\\n                  <xsl:text>(</xsl:text>\\n \\\n                  <xsl:value-of select='ITER' />\\n \\\n                  <xsl:text>)</xsl:text>\\n \\\n                </xsl:if> </TD>\\n \\\n              </xsl:for-each>\\n \\\n            </TR>\\n \\\n          </xsl:for-each>\\n \\\n      </table>\\n \\\n    </body>\\n \\\n    </html>\\n \\\n  </xsl:template>\\n \\\n  </xsl:stylesheet>\\n\\n\";\n  \n}\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/spbench/test_sparseLU.cpp",
    "content": "// Small bench routine for Eigen available in Eigen\n// (C) Desire NUENTSA WAKAM, INRIA\n\n#include <iostream>\n#include <fstream>\n#include <iomanip>\n#include <unsupported/Eigen/SparseExtra>\n#include <Eigen/SparseLU>\n#include <bench/BenchTimer.h>\n#ifdef EIGEN_METIS_SUPPORT\n#include <Eigen/MetisSupport>\n#endif\n\nusing namespace std;\nusing namespace Eigen;\n\nint main(int argc, char **args)\n{\n//   typedef complex<double> scalar; \n  typedef double scalar; \n  SparseMatrix<scalar, ColMajor> A; \n  typedef SparseMatrix<scalar, ColMajor>::Index Index;\n  typedef Matrix<scalar, Dynamic, Dynamic> DenseMatrix;\n  typedef Matrix<scalar, Dynamic, 1> DenseRhs;\n  Matrix<scalar, Dynamic, 1> b, x, tmp;\n//   SparseLU<SparseMatrix<scalar, ColMajor>, AMDOrdering<int> >   solver;\n// #ifdef EIGEN_METIS_SUPPORT\n//   SparseLU<SparseMatrix<scalar, ColMajor>, MetisOrdering<int> > solver; \n//   std::cout<< \"ORDERING : METIS\\n\"; \n// #else\n  SparseLU<SparseMatrix<scalar, ColMajor>, COLAMDOrdering<int> >  solver;\n  std::cout<< \"ORDERING : COLAMD\\n\"; \n// #endif\n  \n  ifstream matrix_file; \n  string line;\n  int  n;\n  BenchTimer timer; \n  \n  // Set parameters\n  /* Fill the matrix with sparse matrix stored in Matrix-Market coordinate column-oriented format */\n  if (argc < 2) assert(false && \"please, give the matrix market file \");\n  loadMarket(A, args[1]);\n  cout << \"End charging matrix \" << endl;\n  bool iscomplex=false, isvector=false;\n  int sym;\n  getMarketHeader(args[1], sym, iscomplex, isvector);\n//   if (iscomplex) { cout<< \" Not for complex matrices \\n\"; return -1; }\n  if (isvector) { cout << \"The provided file is not a matrix file\\n\"; return -1;}\n  if (sym != 0) { // symmetric matrices, only the lower part is stored\n    SparseMatrix<scalar, ColMajor> temp; \n    temp = A;\n    A = temp.selfadjointView<Lower>();\n  }\n  n = A.cols();\n  /* Fill the right hand side */\n\n  if (argc > 2)\n    loadMarketVector(b, args[2]);\n  else \n  {\n    b.resize(n);\n    tmp.resize(n);\n//       tmp.setRandom();\n    for (int i = 0; i < n; i++) tmp(i) = i; \n    b = A * tmp ;\n  }\n\n  /* Compute the factorization */\n//   solver.isSymmetric(true);\n  timer.start(); \n//   solver.compute(A);\n  solver.analyzePattern(A); \n  timer.stop(); \n  cout << \"Time to analyze \" << timer.value() << std::endl;\n  timer.reset(); \n  timer.start(); \n  solver.factorize(A); \n  timer.stop(); \n  cout << \"Factorize Time \" << timer.value() << std::endl;\n  timer.reset(); \n  timer.start(); \n  x = solver.solve(b);\n  timer.stop();\n  cout << \"solve time \" << timer.value() << std::endl; \n  /* Check the accuracy */\n  Matrix<scalar, Dynamic, 1> tmp2 = b - A*x;\n  scalar tempNorm = tmp2.norm()/b.norm();\n  cout << \"Relative norm of the computed solution : \" << tempNorm <<\"\\n\";\n  cout << \"Number of nonzeros in the factor : \" << solver.nnzL() + solver.nnzU() << std::endl; \n  \n  return 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/bench/spmv.cpp",
    "content": "\n//g++-4.4 -DNOMTL  -Wl,-rpath /usr/local/lib/oski -L /usr/local/lib/oski/ -l oski -l oski_util -l oski_util_Tid  -DOSKI -I ~/Coding/LinearAlgebra/mtl4/  spmv.cpp  -I .. -O2 -DNDEBUG -lrt  -lm -l oski_mat_CSC_Tid  -loskilt && ./a.out r200000 c200000 n100 t1 p1\n\n#define SCALAR double\n\n#include <iostream>\n#include <algorithm>\n#include \"BenchTimer.h\"\n#include \"BenchSparseUtil.h\"\n\n#define SPMV_BENCH(CODE) BENCH(t,tries,repeats,CODE);\n\n// #ifdef MKL\n//\n// #include \"mkl_types.h\"\n// #include \"mkl_spblas.h\"\n//\n// template<typename Lhs,typename Rhs,typename Res>\n// void mkl_multiply(const Lhs& lhs, const Rhs& rhs, Res& res)\n// {\n//   char n = 'N';\n//   float alpha = 1;\n//   char matdescra[6];\n//   matdescra[0] = 'G';\n//   matdescra[1] = 0;\n//   matdescra[2] = 0;\n//   matdescra[3] = 'C';\n//   mkl_scscmm(&n, lhs.rows(), rhs.cols(), lhs.cols(), &alpha, matdescra,\n//              lhs._valuePtr(), lhs._innerIndexPtr(), lhs.outerIndexPtr(),\n//              pntre, b, &ldb, &beta, c, &ldc);\n// //   mkl_somatcopy('C', 'T', lhs.rows(), lhs.cols(), 1,\n// //                 lhs._valuePtr(), lhs.rows(), DST, dst_stride);\n// }\n//\n// #endif\n\nint main(int argc, char *argv[])\n{\n  int size = 10000;\n  int rows = size;\n  int cols = size;\n  int nnzPerCol = 40;\n  int tries = 2;\n  int repeats = 2;\n\n  bool need_help = false;\n  for(int i = 1; i < argc; i++)\n  {\n    if(argv[i][0] == 'r')\n    {\n      rows = atoi(argv[i]+1);\n    }\n    else if(argv[i][0] == 'c')\n    {\n      cols = atoi(argv[i]+1);\n    }\n    else if(argv[i][0] == 'n')\n    {\n      nnzPerCol = atoi(argv[i]+1);\n    }\n    else if(argv[i][0] == 't')\n    {\n      tries = atoi(argv[i]+1);\n    }\n    else if(argv[i][0] == 'p')\n    {\n      repeats = atoi(argv[i]+1);\n    }\n    else\n    {\n      need_help = true;\n    }\n  }\n  if(need_help)\n  {\n    std::cout << argv[0] << \" r<nb rows> c<nb columns> n<non zeros per column> t<nb tries> p<nb repeats>\\n\";\n    return 1;\n  }\n\n  std::cout << \"SpMV \" << rows << \" x \" << cols << \" with \" << nnzPerCol << \" non zeros per column. (\" << repeats << \" repeats, and \" << tries << \" tries)\\n\\n\";\n\n  EigenSparseMatrix sm(rows,cols);\n  DenseVector dv(cols), res(rows);\n  dv.setRandom();\n\n  BenchTimer t;\n  while (nnzPerCol>=4)\n  {\n    std::cout << \"nnz: \" << nnzPerCol << \"\\n\";\n    sm.setZero();\n    fillMatrix2(nnzPerCol, rows, cols, sm);\n\n    // dense matrices\n    #ifdef DENSEMATRIX\n    {\n      DenseMatrix dm(rows,cols), (rows,cols);\n      eiToDense(sm, dm);\n\n      SPMV_BENCH(res = dm * sm);\n      std::cout << \"Dense       \" << t.value()/repeats << \"\\t\";\n\n      SPMV_BENCH(res = dm.transpose() * sm);\n      std::cout << t.value()/repeats << endl;\n    }\n    #endif\n\n    // eigen sparse matrices\n    {\n      SPMV_BENCH(res.noalias() += sm * dv; )\n      std::cout << \"Eigen       \" << t.value()/repeats << \"\\t\";\n\n      SPMV_BENCH(res.noalias() += sm.transpose() * dv; )\n      std::cout << t.value()/repeats << endl;\n    }\n\n    // CSparse\n    #ifdef CSPARSE\n    {\n      std::cout << \"CSparse \\n\";\n      cs *csm;\n      eiToCSparse(sm, csm);\n\n//       BENCH();\n//       timer.stop();\n//       std::cout << \"   a * b:\\t\" << timer.value() << endl;\n\n//       BENCH( { m3 = cs_sorted_multiply2(m1, m2); cs_spfree(m3); } );\n//       std::cout << \"   a * b:\\t\" << timer.value() << endl;\n    }\n    #endif\n\n    #ifdef OSKI\n    {\n      oski_matrix_t om;\n      oski_vecview_t ov, ores;\n      oski_Init();\n      om = oski_CreateMatCSC(sm._outerIndexPtr(), sm._innerIndexPtr(), sm._valuePtr(), rows, cols,\n                             SHARE_INPUTMAT, 1, INDEX_ZERO_BASED);\n      ov = oski_CreateVecView(dv.data(), cols, STRIDE_UNIT);\n      ores = oski_CreateVecView(res.data(), rows, STRIDE_UNIT);\n\n      SPMV_BENCH( oski_MatMult(om, OP_NORMAL, 1, ov, 0, ores) );\n      std::cout << \"OSKI        \" << t.value()/repeats << \"\\t\";\n\n      SPMV_BENCH( oski_MatMult(om, OP_TRANS, 1, ov, 0, ores) );\n      std::cout << t.value()/repeats << \"\\n\";\n\n      // tune\n      t.reset();\n      t.start();\n      oski_SetHintMatMult(om, OP_NORMAL, 1.0, SYMBOLIC_VEC, 0.0, SYMBOLIC_VEC, ALWAYS_TUNE_AGGRESSIVELY);\n      oski_TuneMat(om);\n      t.stop();\n      double tuning = t.value();\n\n      SPMV_BENCH( oski_MatMult(om, OP_NORMAL, 1, ov, 0, ores) );\n      std::cout << \"OSKI tuned  \" << t.value()/repeats << \"\\t\";\n\n      SPMV_BENCH( oski_MatMult(om, OP_TRANS, 1, ov, 0, ores) );\n      std::cout << t.value()/repeats << \"\\t(\" << tuning <<  \")\\n\";\n\n\n      oski_DestroyMat(om);\n      oski_DestroyVecView(ov);\n      oski_DestroyVecView(ores);\n      oski_Close();\n    }\n    #endif\n\n    #ifndef NOUBLAS\n    {\n      using namespace boost::numeric;\n      UblasMatrix um(rows,cols);\n      eiToUblas(sm, um);\n\n      boost::numeric::ublas::vector<Scalar> uv(cols), ures(rows);\n      Map<Matrix<Scalar,Dynamic,1> >(&uv[0], cols) = dv;\n      Map<Matrix<Scalar,Dynamic,1> >(&ures[0], rows) = res;\n\n      SPMV_BENCH(ublas::axpy_prod(um, uv, ures, true));\n      std::cout << \"ublas       \" << t.value()/repeats << \"\\t\";\n\n      SPMV_BENCH(ublas::axpy_prod(boost::numeric::ublas::trans(um), uv, ures, true));\n      std::cout << t.value()/repeats << endl;\n    }\n    #endif\n\n    // GMM++\n    #ifndef NOGMM\n    {\n      GmmSparse gm(rows,cols);\n      eiToGmm(sm, gm);\n\n      std::vector<Scalar> gv(cols), gres(rows);\n      Map<Matrix<Scalar,Dynamic,1> >(&gv[0], cols) = dv;\n      Map<Matrix<Scalar,Dynamic,1> >(&gres[0], rows) = res;\n\n      SPMV_BENCH(gmm::mult(gm, gv, gres));\n      std::cout << \"GMM++       \" << t.value()/repeats << \"\\t\";\n\n      SPMV_BENCH(gmm::mult(gmm::transposed(gm), gv, gres));\n      std::cout << t.value()/repeats << endl;\n    }\n    #endif\n\n    // MTL4\n    #ifndef NOMTL\n    {\n      MtlSparse mm(rows,cols);\n      eiToMtl(sm, mm);\n      mtl::dense_vector<Scalar> mv(cols, 1.0);\n      mtl::dense_vector<Scalar> mres(rows, 1.0);\n\n      SPMV_BENCH(mres = mm * mv);\n      std::cout << \"MTL4        \" << t.value()/repeats << \"\\t\";\n\n      SPMV_BENCH(mres = trans(mm) * mv);\n      std::cout << t.value()/repeats << endl;\n    }\n    #endif\n\n    std::cout << \"\\n\";\n\n    if(nnzPerCol==1)\n      break;\n    nnzPerCol -= nnzPerCol/2;\n  }\n\n  return 0;\n}\n\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/tensors/README",
    "content": "The tensor benchmark suite is made of several parts.\n\nThe first part is a generic suite, in which each benchmark comes in 2 flavors: one that runs on CPU, and one that runs on GPU.\n\nTo compile the floating point CPU benchmarks, simply call:\ng++ tensor_benchmarks_cpu.cc benchmark_main.cc -I ../../ -std=c++11 -O3 -DNDEBUG -pthread -mavx -o benchmarks_cpu\n\nTo compile the floating point GPU benchmarks, simply call:\nnvcc tensor_benchmarks_gpu.cu benchmark_main.cc -I ../../ -std=c++11 -O2 -DNDEBUG -use_fast_math -ftz=true -arch compute_35 -o benchmarks_gpu\n\nWe also provide a version of the generic GPU tensor benchmarks that uses half floats (aka fp16) instead of regular floats. To compile these benchmarks, simply call the command line below. You'll need a recent GPU that supports compute capability 5.3 or higher to run them and nvcc 7.5 or higher to compile the code.\nnvcc tensor_benchmarks_fp16_gpu.cu benchmark_main.cc -I ../../ -std=c++11 -O2 -DNDEBUG -use_fast_math -ftz=true -arch compute_53 -o benchmarks_fp16_gpu\n\nTo compile and run the benchmark for SYCL, using ComputeCpp, simply run the\nfollowing commands:\n1. export COMPUTECPP_PACKAGE_ROOT_DIR={PATH TO COMPUTECPP ROOT DIRECTORY}\n2. bash eigen_sycl_bench.sh\n\nLast but not least, we also provide a suite of benchmarks to measure the scalability of the contraction code on CPU. To compile these benchmarks, call\ng++ contraction_benchmarks_cpu.cc benchmark_main.cc -I ../../ -std=c++11 -O3 -DNDEBUG -pthread -mavx -o benchmarks_cpu\n"
  },
  {
    "path": "3rdparty/eigen3/bench/tensors/benchmark.h",
    "content": "/*\n * Copyright (C) 2012 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#include <stddef.h>\n#include <stdint.h>\n#include <vector>\n\nnamespace testing {\nclass Benchmark {\n public:\n  Benchmark(const char* name, void (*fn)(int)) {\n    Register(name, fn, NULL);\n  }\n  Benchmark(const char* name, void (*fn_range)(int, int)) {\n    Register(name, NULL, fn_range);\n  }\n  Benchmark* Arg(int x);\n  Benchmark* Range(int lo, int hi);\n  const char* Name();\n  bool ShouldRun(int argc, char* argv[]);\n  void Run();\n private:\n  const char* name_;\n  void (*fn_)(int);\n  void (*fn_range_)(int, int);\n  std::vector<int> args_;\n  void Register(const char* name, void (*fn)(int), void (*fn_range)(int, int));\n  void RunRepeatedlyWithArg(int iterations, int arg);\n  void RunWithArg(int arg);\n};\n}  // namespace testing\nvoid SetBenchmarkFlopsProcessed(int64_t);\nvoid StopBenchmarkTiming();\nvoid StartBenchmarkTiming();\n#define BENCHMARK(f) \\\n    static ::testing::Benchmark* _benchmark_##f __attribute__((unused)) = \\\n        (new ::testing::Benchmark(#f, f))\n"
  },
  {
    "path": "3rdparty/eigen3/bench/tensors/benchmark_main.cc",
    "content": "/*\n * Copyright (C) 2012 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#include \"benchmark.h\"\n#include <regex.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <string>\n#include <inttypes.h>\n#include <time.h>\n#include <map>\n\nstatic int64_t g_flops_processed;\nstatic int64_t g_benchmark_total_time_ns;\nstatic int64_t g_benchmark_start_time_ns;\ntypedef std::map<std::string, ::testing::Benchmark*> BenchmarkMap;\ntypedef BenchmarkMap::iterator BenchmarkMapIt;\n\nBenchmarkMap& gBenchmarks() {\n  static BenchmarkMap g_benchmarks;\n  return g_benchmarks;\n}\n\nstatic int g_name_column_width = 20;\n\nstatic int Round(int n) {\n  int base = 1;\n  while (base*10 < n) {\n    base *= 10;\n  }\n  if (n < 2*base) {\n    return 2*base;\n  }\n  if (n < 5*base) {\n    return 5*base;\n  }\n  return 10*base;\n}\n\n#ifdef __APPLE__\n  #include <mach/mach_time.h>\n  static mach_timebase_info_data_t g_time_info;\n  static void __attribute__((constructor)) init_info() {\n    mach_timebase_info(&g_time_info);\n  }\n#endif\n\nstatic int64_t NanoTime() {\n#if defined(__APPLE__)\n  uint64_t t = mach_absolute_time();\n  return t * g_time_info.numer / g_time_info.denom;\n#else\n  struct timespec t;\n  t.tv_sec = t.tv_nsec = 0;\n  clock_gettime(CLOCK_MONOTONIC, &t);\n  return static_cast<int64_t>(t.tv_sec) * 1000000000LL + t.tv_nsec;\n#endif\n}\n\nnamespace testing {\nBenchmark* Benchmark::Arg(int arg) {\n  args_.push_back(arg);\n  return this;\n}\n\nBenchmark* Benchmark::Range(int lo, int hi) {\n  const int kRangeMultiplier = 8;\n  if (hi < lo) {\n    int temp = hi;\n    hi = lo;\n    lo = temp;\n  }\n  while (lo < hi) {\n    args_.push_back(lo);\n    lo *= kRangeMultiplier;\n  }\n  // We always run the hi number.\n  args_.push_back(hi);\n  return this;\n}\n\nconst char* Benchmark::Name() {\n  return name_;\n}\nbool Benchmark::ShouldRun(int argc, char* argv[]) {\n  if (argc == 1) {\n    return true;  // With no arguments, we run all benchmarks.\n  }\n  // Otherwise, we interpret each argument as a regular expression and\n  // see if any of our benchmarks match.\n  for (int i = 1; i < argc; i++) {\n    regex_t re;\n    if (regcomp(&re, argv[i], 0) != 0) {\n      fprintf(stderr, \"couldn't compile \\\"%s\\\" as a regular expression!\\n\", argv[i]);\n      exit(EXIT_FAILURE);\n    }\n    int match = regexec(&re, name_, 0, NULL, 0);\n    regfree(&re);\n    if (match != REG_NOMATCH) {\n      return true;\n    }\n  }\n  return false;\n}\nvoid Benchmark::Register(const char* name, void (*fn)(int), void (*fn_range)(int, int)) {\n  name_ = name;\n  fn_ = fn;\n  fn_range_ = fn_range;\n  if (fn_ == NULL && fn_range_ == NULL) {\n    fprintf(stderr, \"%s: missing function\\n\", name_);\n    exit(EXIT_FAILURE);\n  }\n  gBenchmarks().insert(std::make_pair(name, this));\n}\nvoid Benchmark::Run() {\n  if (fn_ != NULL) {\n    RunWithArg(0);\n  } else {\n    if (args_.empty()) {\n      fprintf(stderr, \"%s: no args!\\n\", name_);\n      exit(EXIT_FAILURE);\n    }\n    for (size_t i = 0; i < args_.size(); ++i) {\n      RunWithArg(args_[i]);\n    }\n  }\n}\nvoid Benchmark::RunRepeatedlyWithArg(int iterations, int arg) {\n  g_flops_processed = 0;\n  g_benchmark_total_time_ns = 0;\n  g_benchmark_start_time_ns = NanoTime();\n  if (fn_ != NULL) {\n    fn_(iterations);\n  } else {\n    fn_range_(iterations, arg);\n  }\n  if (g_benchmark_start_time_ns != 0) {\n    g_benchmark_total_time_ns += NanoTime() - g_benchmark_start_time_ns;\n  }\n}\nvoid Benchmark::RunWithArg(int arg) {\n  // run once in case it's expensive\n  int iterations = 1;\n  RunRepeatedlyWithArg(iterations, arg);\n  while (g_benchmark_total_time_ns < 1e9 && iterations < 1e9) {\n    int last = iterations;\n    if (g_benchmark_total_time_ns/iterations == 0) {\n      iterations = 1e9;\n    } else {\n      iterations = 1e9 / (g_benchmark_total_time_ns/iterations);\n    }\n    iterations = std::max(last + 1, std::min(iterations + iterations/2, 100*last));\n    iterations = Round(iterations);\n    RunRepeatedlyWithArg(iterations, arg);\n  }\n  char throughput[100];\n  throughput[0] = '\\0';\n  if (g_benchmark_total_time_ns > 0 && g_flops_processed > 0) {\n    double mflops_processed = static_cast<double>(g_flops_processed)/1e6;\n    double seconds = static_cast<double>(g_benchmark_total_time_ns)/1e9;\n    snprintf(throughput, sizeof(throughput), \" %8.2f MFlops/s\", mflops_processed/seconds);\n  }\n  char full_name[100];\n  if (fn_range_ != NULL) {\n    if (arg >= (1<<20)) {\n      snprintf(full_name, sizeof(full_name), \"%s/%dM\", name_, arg/(1<<20));\n    } else if (arg >= (1<<10)) {\n      snprintf(full_name, sizeof(full_name), \"%s/%dK\", name_, arg/(1<<10));\n    } else {\n      snprintf(full_name, sizeof(full_name), \"%s/%d\", name_, arg);\n    }\n  } else {\n    snprintf(full_name, sizeof(full_name), \"%s\", name_);\n  }\n  printf(\"%-*s %10d %10\" PRId64 \"%s\\n\", g_name_column_width, full_name,\n         iterations, g_benchmark_total_time_ns/iterations, throughput);\n  fflush(stdout);\n}\n}  // namespace testing\nvoid SetBenchmarkFlopsProcessed(int64_t x) {\n  g_flops_processed = x;\n}\nvoid StopBenchmarkTiming() {\n  if (g_benchmark_start_time_ns != 0) {\n    g_benchmark_total_time_ns += NanoTime() - g_benchmark_start_time_ns;\n  }\n  g_benchmark_start_time_ns = 0;\n}\nvoid StartBenchmarkTiming() {\n  if (g_benchmark_start_time_ns == 0) {\n    g_benchmark_start_time_ns = NanoTime();\n  }\n}\nint main(int argc, char* argv[]) {\n  if (gBenchmarks().empty()) {\n    fprintf(stderr, \"No benchmarks registered!\\n\");\n    exit(EXIT_FAILURE);\n  }\n  for (BenchmarkMapIt it = gBenchmarks().begin(); it != gBenchmarks().end(); ++it) {\n    int name_width = static_cast<int>(strlen(it->second->Name()));\n    g_name_column_width = std::max(g_name_column_width, name_width);\n  }\n  bool need_header = true;\n  for (BenchmarkMapIt it = gBenchmarks().begin(); it != gBenchmarks().end(); ++it) {\n    ::testing::Benchmark* b = it->second;\n    if (b->ShouldRun(argc, argv)) {\n      if (need_header) {\n        printf(\"%-*s %10s %10s\\n\", g_name_column_width, \"\", \"iterations\", \"ns/op\");\n        fflush(stdout);\n        need_header = false;\n      }\n      b->Run();\n    }\n  }\n  if (need_header) {\n    fprintf(stderr, \"No matching benchmarks!\\n\");\n    fprintf(stderr, \"Available benchmarks:\\n\");\n    for (BenchmarkMapIt it = gBenchmarks().begin(); it != gBenchmarks().end(); ++it) {\n      fprintf(stderr, \"  %s\\n\", it->second->Name());\n    }\n    exit(EXIT_FAILURE);\n  }\n  return 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/bench/tensors/contraction_benchmarks_cpu.cc",
    "content": "#define EIGEN_USE_THREADS\n\n#include <string>\n\n#include \"tensor_benchmarks.h\"\n\n#define CREATE_THREAD_POOL(threads)             \\\nEigen::ThreadPool pool(threads);                \\\nEigen::ThreadPoolDevice device(&pool, threads);\n\n\n// Contractions for number of threads ranging from 1 to 32\n// Dimensions are Rows, Cols, Depth\n#define BM_ContractionCPU(D1, D2, D3)                                         \\\n  static void BM_##Contraction##_##D1##x##D2##x##D3(int iters, int Threads) { \\\n    StopBenchmarkTiming();                                                    \\\n    CREATE_THREAD_POOL(Threads);                                              \\\n    BenchmarkSuite<Eigen::ThreadPoolDevice, float> suite(device, D1, D2, D3); \\\n    suite.contraction(iters);                                                 \\\n  }                                                                           \\\n  BENCHMARK_RANGE(BM_##Contraction##_##D1##x##D2##x##D3, 1, 32);\n\n\n// Vector Matrix and Matrix Vector products\nBM_ContractionCPU(1, 2000, 500);\nBM_ContractionCPU(2000, 1, 500);\n\n// Various skinny matrices\nBM_ContractionCPU(250, 3, 512);\nBM_ContractionCPU(1500, 3, 512);\n\nBM_ContractionCPU(512, 800, 4);\nBM_ContractionCPU(512, 80, 800);\nBM_ContractionCPU(512, 80, 13522);\nBM_ContractionCPU(1, 80, 13522);\n\nBM_ContractionCPU(3200, 512, 4);\nBM_ContractionCPU(3200, 512, 80);\nBM_ContractionCPU(3200, 80, 512);\n"
  },
  {
    "path": "3rdparty/eigen3/bench/tensors/eigen_sycl_bench.sh",
    "content": "rm -f tensor_benchmark_sycl\n: \"${COMPUTECPP_PACKAGE_ROOT_DIR:?Need to set COMPUTECPP_PACKAGE_ROOT_DIR}\"\necho \"COMPUTECPP_PACKAGE_ROOT_DIR is set to: \"$COMPUTECPP_PACKAGE_ROOT_DIR\n${COMPUTECPP_PACKAGE_ROOT_DIR}/bin/compute++ \\\ntensor_benchmarks_sycl.cc \\\nbenchmark_main.cc \\\n-I ../../ \\\n-I ${COMPUTECPP_PACKAGE_ROOT_DIR}/include/ \\\n-std=c++11 \\\n-march=native \\\n-O3 \\\n-DNDEBUG \\\n-DEIGEN_MPL2_ONLY \\\n-DEIGEN_USE_SYCL=1 \\\n-DEIGEN_SYCL_LOCAL_MEM=1 \\\n-no-serial-memop \\\n-mllvm \\\n-inline-threshold=10000 \\\n-fsycl-ih-last \\\n-sycl-driver \\\n-Xclang -cl-mad-enable \\\n-lOpenCL \\\n-lComputeCpp \\\n-lpthread \\\n-o \\\ntensor_benchmark_sycl\\\n${@:1}\n\nexport LD_LIBRARY_PATH=${COMPUTECPP_PACKAGE_ROOT_DIR}/lib:$LD_LIBRARY_PATH\n./tensor_benchmark_sycl\n"
  },
  {
    "path": "3rdparty/eigen3/bench/tensors/eigen_sycl_bench_contract.sh",
    "content": "rm -f tensor_contract_sycl_bench\n: \"${COMPUTECPP_PACKAGE_ROOT_DIR:?Need to set COMPUTECPP_PACKAGE_ROOT_DIR}\"\necho \"COMPUTECPP_PACKAGE_ROOT_DIR is set to: \"$COMPUTECPP_PACKAGE_ROOT_DIR\n${COMPUTECPP_PACKAGE_ROOT_DIR}/bin/compute++  tensor_contract_sycl_bench.cc -I ../../ -I ${COMPUTECPP_PACKAGE_ROOT_DIR}/include/ -std=c++11 -O3 -DNDEBUG -DEIGEN_MPL2_ONLY -DEIGEN_USE_SYCL=1 -no-serial-memop -mllvm -inline-threshold=10000 -fsycl-ih-last -sycl-driver -Xclang -cl-mad-enable -lOpenCL -lComputeCpp -lpthread -o tensor_contract_sycl_bench ${@:1}\nexport LD_LIBRARY_PATH=${COMPUTECPP_PACKAGE_ROOT_DIR}/lib:$LD_LIBRARY_PATH\n./tensor_contract_sycl_bench\n\n"
  },
  {
    "path": "3rdparty/eigen3/bench/tensors/tensor_benchmarks.h",
    "content": "#ifndef THIRD_PARTY_EIGEN3_TENSOR_BENCHMARKS_H_\n#define THIRD_PARTY_EIGEN3_TENSOR_BENCHMARKS_H_\n\ntypedef int TensorIndex;\n#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int\n\n#include \"unsupported/Eigen/CXX11/Tensor\"\n#include \"benchmark.h\"\n\n#define BENCHMARK_RANGE(bench, lo, hi) \\\n  BENCHMARK(bench)->Range(lo, hi)\n\nusing Eigen::Tensor;\nusing Eigen::TensorMap;\n\n// TODO(bsteiner): also templatize on the input type since we have users\n// for int8 as well as floats.\ntemplate <typename Device, typename T> class BenchmarkSuite {\n public:\n  BenchmarkSuite(const Device& device, size_t m, size_t k, size_t n)\n      : m_(m), k_(k), n_(n), device_(device) {\n    initialize();\n  }\n\n  BenchmarkSuite(const Device& device, size_t m)\n      : m_(m), k_(m), n_(m), device_(device) {\n    initialize();\n  }\n\n  BenchmarkSuite(const Device& device, size_t m, size_t k)\n      : m_(1), k_(k), n_(m), device_(device) {\n    initialize();\n  }\n\n  ~BenchmarkSuite() {\n    device_.deallocate(a_);\n    device_.deallocate(b_);\n    device_.deallocate(c_);\n  }\n\n  void memcpy(int num_iters) {\n    eigen_assert(m_ == k_ && k_ == n_);\n#ifdef EIGEN_USE_SYCL // warmup for sycl\n    for (int iter = 0; iter < 10; ++iter) {\n      device_.memcpy(c_, a_, m_ * m_ * sizeof(T));\n    }\n#endif\n    StartBenchmarkTiming();\n    for (int iter = 0; iter < num_iters; ++iter) {\n      device_.memcpy(c_, a_, m_ * m_ * sizeof(T));\n    }\n    // Record the number of values copied per second\n    finalizeBenchmark(static_cast<int64_t>(m_) * m_ * num_iters);\n  }\n\n  void typeCasting(int num_iters) {\n    eigen_assert(m_ == n_);\n    Eigen::array<TensorIndex, 2> sizes;\n    if (sizeof(T) >= sizeof(int)) {\n      sizes[0] = m_;\n      sizes[1] = k_;\n    } else {\n      sizes[0] = m_ * sizeof(T) / sizeof(int);\n      sizes[1] = k_ * sizeof(T) / sizeof(int);\n    }\n    const TensorMap<Tensor<int, 2, 0, TensorIndex>, Eigen::Aligned> A((int*)a_, sizes);\n    TensorMap<Tensor<T, 2, 0, TensorIndex>, Eigen::Aligned> B(b_, sizes);\n#ifdef EIGEN_USE_SYCL // warmup for sycl\n    for (int iter = 0; iter < 10; ++iter) {\n      B.device(device_) = A.template cast<T>();\n    }\n#endif\n    StartBenchmarkTiming();\n    for (int iter = 0; iter < num_iters; ++iter) {\n      B.device(device_) = A.template cast<T>();\n    }\n    // Record the number of values copied per second\n    finalizeBenchmark(static_cast<int64_t>(m_) * k_ * num_iters);\n  }\n\n  void random(int num_iters) {\n    eigen_assert(m_ == k_ && k_ == n_);\n    Eigen::array<TensorIndex, 2> sizes;\n    sizes[0] = m_;\n    sizes[1] = m_;\n    TensorMap<Tensor<T, 2>, Eigen::Aligned> C(c_, sizes);\n#ifdef EIGEN_USE_SYCL // warmup for sycl\n    for (int iter = 0; iter < 10; ++iter) {\n      C.device(device_) = C.random();\n    }\n#endif\n    StartBenchmarkTiming();\n    for (int iter = 0; iter < num_iters; ++iter) {\n      C.device(device_) = C.random();\n    }\n    // Record the number of random numbers generated per second\n    finalizeBenchmark(static_cast<int64_t>(m_) * m_ * num_iters);\n  }\n\n  void slicing(int num_iters) {\n    eigen_assert(m_ == k_ && k_ == n_);\n    Eigen::array<TensorIndex, 2> sizes;\n    sizes[0] = m_;\n    sizes[1] = m_;\n    const TensorMap<Tensor<T, 2>, Eigen::Aligned> A(a_, sizes);\n    const TensorMap<Tensor<T, 2>, Eigen::Aligned> B(b_, sizes);\n    TensorMap<Tensor<T, 2>, Eigen::Aligned> C(c_, sizes);\n\n    const Eigen::DSizes<TensorIndex, 2> quarter_sizes(m_/2, m_/2);\n    const Eigen::DSizes<TensorIndex, 2> first_quadrant(0, 0);\n    const Eigen::DSizes<TensorIndex, 2> second_quadrant(0, m_/2);\n    const Eigen::DSizes<TensorIndex, 2> third_quadrant(m_/2, 0);\n    const Eigen::DSizes<TensorIndex, 2> fourth_quadrant(m_/2, m_/2);\n#ifdef EIGEN_USE_SYCL // warmup for sycl\n    for (int iter = 0; iter < 10; ++iter) {\n      C.slice(first_quadrant, quarter_sizes).device(device_) =\n          A.slice(first_quadrant, quarter_sizes);\n      C.slice(second_quadrant, quarter_sizes).device(device_) =\n          B.slice(second_quadrant, quarter_sizes);\n      C.slice(third_quadrant, quarter_sizes).device(device_) =\n          A.slice(third_quadrant, quarter_sizes);\n      C.slice(fourth_quadrant, quarter_sizes).device(device_) =\n          B.slice(fourth_quadrant, quarter_sizes);\n    }\n#endif\n    StartBenchmarkTiming();\n    for (int iter = 0; iter < num_iters; ++iter) {\n      C.slice(first_quadrant, quarter_sizes).device(device_) =\n          A.slice(first_quadrant, quarter_sizes);\n      C.slice(second_quadrant, quarter_sizes).device(device_) =\n          B.slice(second_quadrant, quarter_sizes);\n      C.slice(third_quadrant, quarter_sizes).device(device_) =\n          A.slice(third_quadrant, quarter_sizes);\n      C.slice(fourth_quadrant, quarter_sizes).device(device_) =\n          B.slice(fourth_quadrant, quarter_sizes);\n    }\n    // Record the number of values copied from the rhs slice to the lhs slice\n    // each second\n    finalizeBenchmark(static_cast<int64_t>(m_) * m_ * num_iters);\n  }\n\n  void rowChip(int num_iters) {\n    Eigen::array<TensorIndex, 2> input_size;\n    input_size[0] = k_;\n    input_size[1] = n_;\n    const TensorMap<Tensor<T, 2, 0, TensorIndex>, Eigen::Aligned> B(b_, input_size);\n    Eigen::array<TensorIndex, 1> output_size;\n    output_size[0] = n_;\n    TensorMap<Tensor<T, 1, 0, TensorIndex>, Eigen::Aligned> C(c_, output_size);\n#ifdef EIGEN_USE_SYCL // warmup for sycl\n    for (int iter = 0; iter < 10; ++iter) {\n      C.device(device_) = B.chip(iter % k_, 0);\n    }\n#endif\n    StartBenchmarkTiming();\n    for (int iter = 0; iter < num_iters; ++iter) {\n      C.device(device_) = B.chip(iter % k_, 0);\n    }\n    // Record the number of values copied from the rhs chip to the lhs.\n    finalizeBenchmark(static_cast<int64_t>(n_) * num_iters);\n  }\n\n  void colChip(int num_iters) {\n    Eigen::array<TensorIndex, 2> input_size;\n    input_size[0] = k_;\n    input_size[1] = n_;\n    const TensorMap<Tensor<T, 2, 0, TensorIndex>, Eigen::Aligned> B(b_, input_size);\n    Eigen::array<TensorIndex, 1> output_size;\n    output_size[0] = n_;\n    TensorMap<Tensor<T, 1, 0, TensorIndex>, Eigen::Aligned> C(c_, output_size);\n#ifdef EIGEN_USE_SYCL // warmup for sycl\n    for (int iter = 0; iter < 10; ++iter) {\n      C.device(device_) = B.chip(iter % n_, 1);\n    }\n#endif\n    StartBenchmarkTiming();\n    for (int iter = 0; iter < num_iters; ++iter) {\n      C.device(device_) = B.chip(iter % n_, 1);\n    }\n    // Record the number of values copied from the rhs chip to the lhs.\n    finalizeBenchmark(static_cast<int64_t>(n_) * num_iters);\n  }\n\n  void shuffling(int num_iters) {\n    eigen_assert(m_ == n_);\n    Eigen::array<TensorIndex, 2> size_a;\n    size_a[0] = m_;\n    size_a[1] = k_;\n    const TensorMap<Tensor<T, 2>, Eigen::Aligned> A(a_, size_a);\n    Eigen::array<TensorIndex, 2> size_b;\n    size_b[0] = k_;\n    size_b[1] = m_;\n    TensorMap<Tensor<T, 2>, Eigen::Aligned> B(b_, size_b);\n\n    Eigen::array<int, 2> shuffle;\n    shuffle[0] = 1;\n    shuffle[1] = 0;\n#ifdef EIGEN_USE_SYCL // warmup for sycl\n    for (int iter = 0; iter < 10; ++iter) {\n      B.device(device_) = A.shuffle(shuffle);\n    }\n#endif\n    StartBenchmarkTiming();\n    for (int iter = 0; iter < num_iters; ++iter) {\n      B.device(device_) = A.shuffle(shuffle);\n    }\n    // Record the number of values shuffled from A and copied to B each second\n    finalizeBenchmark(static_cast<int64_t>(m_) * k_ * num_iters);\n  }\n\n void padding(int num_iters) {\n    eigen_assert(m_ == k_);\n    Eigen::array<TensorIndex, 2> size_a;\n    size_a[0] = m_;\n    size_a[1] = k_-3;\n    const TensorMap<Tensor<T, 2>, Eigen::Aligned> A(a_, size_a);\n    Eigen::array<TensorIndex, 2> size_b;\n    size_b[0] = k_;\n    size_b[1] = m_;\n    TensorMap<Tensor<T, 2>, Eigen::Aligned> B(b_, size_b);\n\n#if defined(EIGEN_HAS_INDEX_LIST)\n    Eigen::IndexPairList<Eigen::type2indexpair<0, 0>,\n                         Eigen::type2indexpair<2, 1> > paddings;\n#else\n    Eigen::array<Eigen::IndexPair<TensorIndex>, 2> paddings;\n    paddings[0] = Eigen::IndexPair<TensorIndex>(0, 0);\n    paddings[1] = Eigen::IndexPair<TensorIndex>(2, 1);\n#endif\n#ifdef EIGEN_USE_SYCL // warmup for sycl\n    for (int iter = 0; iter < 10; ++iter) {\n      B.device(device_) = A.pad(paddings);\n    }\n#endif\n    StartBenchmarkTiming();\n    for (int iter = 0; iter < num_iters; ++iter) {\n      B.device(device_) = A.pad(paddings);\n    }\n    // Record the number of values copied from the padded tensor A each second\n    finalizeBenchmark(static_cast<int64_t>(m_) * k_ * num_iters);\n  }\n\n void striding(int num_iters) {\n    eigen_assert(m_ == k_);\n    Eigen::array<TensorIndex, 2> size_a;\n    size_a[0] = m_;\n    size_a[1] = k_;\n    const TensorMap<Tensor<T, 2>, Eigen::Aligned> A(a_, size_a);\n    Eigen::array<TensorIndex, 2> size_b;\n    size_b[0] = m_;\n    size_b[1] = k_/2;\n    TensorMap<Tensor<T, 2>, Eigen::Aligned> B(b_, size_b);\n\n#ifndef EIGEN_HAS_INDEX_LIST\n    Eigen::array<TensorIndex, 2> strides;\n    strides[0] = 1;\n    strides[1] = 2;\n#else\n    // Take advantage of cxx11 to give the compiler information it can use to\n    // optimize the code.\n    Eigen::IndexList<Eigen::type2index<1>, Eigen::type2index<2> > strides;\n#endif\n\n#ifdef EIGEN_USE_SYCL // warmup for sycl\n    for (int iter = 0; iter < 10; ++iter) {\n      B.device(device_) = A.stride(strides);\n    }\n#endif\n    StartBenchmarkTiming();\n    for (int iter = 0; iter < num_iters; ++iter) {\n      B.device(device_) = A.stride(strides);\n    }\n    // Record the number of values copied from the padded tensor A each second\n    finalizeBenchmark(static_cast<int64_t>(m_) * k_ * num_iters);\n  }\n\n\n  void broadcasting(int num_iters) {\n    Eigen::array<TensorIndex, 2> size_a;\n    size_a[0] = m_;\n    size_a[1] = 1;\n    const TensorMap<Tensor<T, 2>, Eigen::Aligned> A(a_, size_a);\n    Eigen::array<TensorIndex, 2> size_c;\n    size_c[0] = m_;\n    size_c[1] = n_;\n    TensorMap<Tensor<T, 2>, Eigen::Aligned> C(c_, size_c);\n\n#ifndef EIGEN_HAS_INDEX_LIST\n    Eigen::array<int, 2> broadcast;\n    broadcast[0] = 1;\n    broadcast[1] = n_;\n#else\n    // Take advantage of cxx11 to give the compiler information it can use to\n    // optimize the code.\n    Eigen::IndexList<Eigen::type2index<1>, int> broadcast;\n    broadcast.set(1, n_);\n#endif\n\n#ifdef EIGEN_USE_SYCL // warmup for sycl\n    for (int iter = 0; iter < 10; ++iter) {\n      C.device(device_) = A.broadcast(broadcast);\n    }\n#endif\n    StartBenchmarkTiming();\n    for (int iter = 0; iter < num_iters; ++iter) {\n      C.device(device_) = A.broadcast(broadcast);\n    }\n    // Record the number of values broadcasted from A and copied to C each second\n    finalizeBenchmark(static_cast<int64_t>(m_) * n_ * num_iters);\n  }\n\n  void coeffWiseOp(int num_iters) {\n    eigen_assert(m_ == k_ && k_ == n_);\n    Eigen::array<TensorIndex, 2> sizes;\n    sizes[0] = m_;\n    sizes[1] = m_;\n    const TensorMap<Tensor<T, 2>, Eigen::Aligned> A(a_, sizes);\n    const TensorMap<Tensor<T, 2>, Eigen::Aligned> B(b_, sizes);\n    TensorMap<Tensor<T, 2>, Eigen::Aligned> C(c_, sizes);\n#ifdef EIGEN_USE_SYCL // warmup for sycl\n    for (int iter = 0; iter < 10; ++iter) {\n      C.device(device_) = A * A.constant(static_cast<T>(3.14)) + B * B.constant(static_cast<T>(2.7));\n    }\n#endif\n    StartBenchmarkTiming();\n    for (int iter = 0; iter < num_iters; ++iter) {\n      C.device(device_) = A * A.constant(static_cast<T>(3.14)) + B * B.constant(static_cast<T>(2.7));\n    }\n    // Record the number of FLOP executed per second (2 multiplications and\n    // 1 addition per value)\n    finalizeBenchmark(static_cast<int64_t>(3) * m_ * m_ * num_iters);\n  }\n\n  void algebraicFunc(int num_iters) {\n    eigen_assert(m_ == k_ && k_ == n_);\n    Eigen::array<TensorIndex, 2> sizes;\n    sizes[0] = m_;\n    sizes[1] = m_;\n    const TensorMap<Tensor<T, 2>, Eigen::Aligned> A(a_, sizes);\n    const TensorMap<Tensor<T, 2>, Eigen::Aligned> B(b_, sizes);\n    TensorMap<Tensor<T, 2>, Eigen::Aligned> C(c_, sizes);\n\n#ifdef EIGEN_USE_SYCL // warmup for sycl\nfor (int iter = 0; iter < 10; ++iter) {\n      C.device(device_) = A.rsqrt() + B.sqrt() * B.square();\n}\n#endif\n    StartBenchmarkTiming();\n    for (int iter = 0; iter < num_iters; ++iter) {\n      C.device(device_) = A.rsqrt() + B.sqrt() * B.square();\n    }\n    // Record the number of FLOP executed per second (assuming one operation\n    // per value)\n    finalizeBenchmark(static_cast<int64_t>(m_) * m_ * num_iters);\n  }\n\n  void transcendentalFunc(int num_iters) {\n    eigen_assert(m_ == k_ && k_ == n_);\n    Eigen::array<TensorIndex, 2> sizes;\n    sizes[0] = m_;\n    sizes[1] = m_;\n    const TensorMap<Tensor<T, 2>, Eigen::Aligned> A(a_, sizes);\n    const TensorMap<Tensor<T, 2>, Eigen::Aligned> B(b_, sizes);\n    TensorMap<Tensor<T, 2>, Eigen::Aligned> C(c_, sizes);\n#ifdef EIGEN_USE_SYCL // warmup for sycl\n    for (int iter = 0; iter < 10; ++iter) {\n      C.device(device_) = A.exp() + B.log();\n    }\n#endif\n    StartBenchmarkTiming();\n    for (int iter = 0; iter < num_iters; ++iter) {\n      C.device(device_) = A.exp() + B.log();\n    }\n    // Record the number of FLOP executed per second (assuming one operation\n    // per value)\n    finalizeBenchmark(static_cast<int64_t>(m_) * m_ * num_iters);\n  }\n\n // Row reduction\n  void rowReduction(int num_iters) {\n    Eigen::array<TensorIndex, 2> input_size;\n    input_size[0] = k_;\n    input_size[1] = n_;\n    const TensorMap<Tensor<T, 2, 0, TensorIndex>, Eigen::Aligned> B(b_, input_size);\n    Eigen::array<TensorIndex, 1> output_size;\n    output_size[0] = n_;\n    TensorMap<Tensor<T, 1, 0, TensorIndex>, Eigen::Aligned> C(c_, output_size);\n\n#ifndef EIGEN_HAS_INDEX_LIST\n    Eigen::array<TensorIndex, 1> sum_along_dim;\n    sum_along_dim[0] = 0;\n#else\n    // Take advantage of cxx11 to give the compiler information it can use to\n    // optimize the code.\n    Eigen::IndexList<Eigen::type2index<0>> sum_along_dim;\n#endif\n#ifdef EIGEN_USE_SYCL // warmup for sycl\n  for (int iter = 0; iter < 10; ++iter) {\n    C.device(device_) = B.sum(sum_along_dim);\n  }\n#endif\n    StartBenchmarkTiming();\n    for (int iter = 0; iter < num_iters; ++iter) {\n      C.device(device_) = B.sum(sum_along_dim);\n    }\n    // Record the number of FLOP executed per second (assuming one operation\n    // per value)\n    finalizeBenchmark(static_cast<int64_t>(k_) * n_ * num_iters);\n  }\n\n  // Column reduction\n  void colReduction(int num_iters) {\n    Eigen::array<TensorIndex, 2> input_size;\n    input_size[0] = k_;\n    input_size[1] = n_;\n    const TensorMap<Tensor<T, 2, 0, TensorIndex>, Eigen::Aligned> B(\n        b_, input_size);\n    Eigen::array<TensorIndex, 1> output_size;\n    output_size[0] = k_;\n    TensorMap<Tensor<T, 1, 0, TensorIndex>, Eigen::Aligned> A(\n        a_, output_size);\n\n#ifndef EIGEN_HAS_INDEX_LIST\n    Eigen::array<TensorIndex, 1> sum_along_dim;\n    sum_along_dim[0] = 1;\n#else\n    // Take advantage of cxx11 to give the compiler information it can use to\n    // optimize the code.\n    Eigen::IndexList<Eigen::type2index<1>> sum_along_dim;\n#endif\n#ifdef EIGEN_USE_SYCL // warmup for sycl\n  for (int iter = 0; iter < 10; ++iter) {\n    A.device(device_) = B.sum(sum_along_dim);\n  }\n#endif\n    StartBenchmarkTiming();\n    for (int iter = 0; iter < num_iters; ++iter) {\n      A.device(device_) = B.sum(sum_along_dim);\n    }\n    // Record the number of FLOP executed per second (assuming one operation\n    // per value)\n    finalizeBenchmark(static_cast<int64_t>(k_) * n_ * num_iters);\n  }\n\n  // Full reduction\n  void fullReduction(int num_iters) {\n    Eigen::array<TensorIndex, 2> input_size;\n    input_size[0] = k_;\n    input_size[1] = n_;\n    const TensorMap<Tensor<T, 2, 0, TensorIndex>, Eigen::Aligned> B(\n        b_, input_size);\n    Eigen::array<TensorIndex, 0> output_size;\n    TensorMap<Tensor<T, 0, 0, TensorIndex>, Eigen::Aligned> C(\n        c_, output_size);\n#ifdef EIGEN_USE_SYCL // warmup for sycl\n    for (int iter = 0; iter < 10; ++iter) {\n      C.device(device_) = B.sum();\n    }\n#endif\n    StartBenchmarkTiming();\n    for (int iter = 0; iter < num_iters; ++iter) {\n      C.device(device_) = B.sum();\n    }\n    // Record the number of FLOP executed per second (assuming one operation\n    // per value)\n    finalizeBenchmark(static_cast<int64_t>(k_) * n_ * num_iters);\n  }\n\n  \n\n  // do a contraction which is equivalent to a matrix multiplication\n  void contraction(int num_iters) {\n      contraction<static_cast<int>(Eigen::ColMajor)>(num_iters, false, false);\n  }\n\n    void contractionRowMajor(int num_iters) {\n      contraction<static_cast<int>(Eigen::RowMajor)>(num_iters, false, false);\n  }\n    \n  void contractionRowMajorAT(int num_iters) {\n      contraction<static_cast<int>(Eigen::RowMajor)>(num_iters, true, false);\n  }\n\n  void contractionRowMajorBT(int num_iters) {\n      contraction<static_cast<int>(Eigen::RowMajor)>(num_iters, false, true);\n  }\n\n  void contractionRowMajorABT(int num_iters) {\n      contraction<static_cast<int>(Eigen::RowMajor)>(num_iters, true, true);\n  }\n\n  void convolution(int num_iters, int kernel_x, int kernel_y) {\n    Eigen::array<TensorIndex, 2> input_sizes;\n    input_sizes[0] = m_;\n    input_sizes[1] = n_;\n    TensorMap<Tensor<T, 2>, Eigen::Aligned> A(a_, input_sizes);\n    Eigen::array<TensorIndex, 2> kernel_sizes;\n    kernel_sizes[0] = kernel_x;\n    kernel_sizes[1] = kernel_y;\n    TensorMap<Tensor<T, 2>, Eigen::Aligned> B(b_, kernel_sizes);\n    Eigen::array<TensorIndex, 2> result_sizes;\n    result_sizes[0] = m_ - kernel_x + 1;\n    result_sizes[1] = n_ - kernel_y + 1;\n    TensorMap<Tensor<T, 2>, Eigen::Aligned> C(c_, result_sizes);\n    Eigen::array<TensorIndex, 2> dims;\n    dims[0] = 0;\n    dims[1] = 1;\n#ifdef EIGEN_USE_SYCL // warmup for sycl\n    for (int iter = 0; iter < 10; ++iter) {\n      C.device(device_) = A.convolve(B, dims);\n     }\n#endif\n    StartBenchmarkTiming();\n    for (int iter = 0; iter < num_iters; ++iter) {\n      C.device(device_) = A.convolve(B, dims);\n    }\n    // Record the number of FLOPs executed per second (kernel_size\n    // multiplications and additions for each value in the resulting tensor)\n    finalizeBenchmark(static_cast<int64_t>(2) *\n        (m_ - kernel_x + 1) * (n_ - kernel_y + 1) * kernel_x * kernel_y * num_iters);\n  }\n\n private:\n // do a contraction which is equivalent to a matrix multiplication\n  template<int Layout>\n  void contraction(int num_iters, bool trans_a, bool trans_b) {\n    Eigen::array<TensorIndex, 2> sizeA;\n    sizeA[0] = (trans_a ? k_: m_);\n    sizeA[1] = (trans_a ? m_:  k_);\n    Eigen::array<TensorIndex, 2> sizeB;\n    sizeB[0] = (trans_b ? n_: k_);\n    sizeB[1] = (trans_b ? k_: n_);\n    Eigen::array<TensorIndex, 2> sizeC;\n    sizeC[0] = m_;\n    sizeC[1] = n_;\n\n    const TensorMap<Tensor<T, 2, Layout>, Eigen::Aligned> A(a_, sizeA);\n    const TensorMap<Tensor<T, 2, Layout>, Eigen::Aligned> B(b_, sizeB);\n    TensorMap<Tensor<T, 2, Layout>, Eigen::Aligned> C(c_, sizeC);\n\n    typedef typename Tensor<T, 2, Layout>::DimensionPair DimPair;\n    Eigen::array<DimPair, 1> dims;\n    TensorIndex a_contract_dim = (trans_a ? 0 : 1);\n    TensorIndex b_contract_dim = (trans_b ? 1 : 0);\n    dims[0] = DimPair(a_contract_dim, b_contract_dim);\n#ifdef EIGEN_USE_SYCL // warmup for sycl\n    for (int iter = 0; iter < 10; ++iter) {\n      C.device(device_) = A.contract(B, dims);\n     }\n#endif\n    StartBenchmarkTiming();\n    for (int iter = 0; iter < num_iters; ++iter) {\n      C.device(device_) = A.contract(B, dims);\n    }\n    // Record the number of FLOP executed per second (size_ multiplications and\n    // additions for each value in the resulting tensor)\n    finalizeBenchmark(static_cast<int64_t>(2) * m_ * n_ * k_ * num_iters);\n  }\n\n  void initialize() {\n    a_ = (T *) device_.allocate(m_ * k_ * sizeof(T));\n    b_ = (T *) device_.allocate(k_ * n_ * sizeof(T));\n    c_ = (T *) device_.allocate(m_ * n_ * sizeof(T));\n\n    // Initialize the content of the memory pools to prevent asan from\n    // complaining.\n    device_.memset(a_, 12, m_ * k_ * sizeof(T));\n    device_.memset(b_, 23, k_ * n_ * sizeof(T));\n    device_.memset(c_, 31, m_ * n_ * sizeof(T));\n\n  }\n\n  inline void finalizeBenchmark(int64_t num_items) {\n#if defined(EIGEN_USE_GPU) && defined(__CUDACC__)\n    if (Eigen::internal::is_same<Device, Eigen::GpuDevice>::value) {\n      device_.synchronize();\n    }\n#elif defined(EIGEN_USE_SYCL)\n    if (Eigen::internal::is_same<Device, Eigen::SyclDevice>::value) {\n      device_.synchronize();\n    }\n\n#endif\n    StopBenchmarkTiming();\n    SetBenchmarkFlopsProcessed(num_items);\n  }\n\n\n  TensorIndex m_;\n  TensorIndex k_;\n  TensorIndex n_;\n  T* a_;\n  T* b_;\n  T* c_;\n  Device device_;\n};\n#endif  // THIRD_PARTY_EIGEN3_TENSOR_BENCHMARKS_H_\n"
  },
  {
    "path": "3rdparty/eigen3/bench/tensors/tensor_benchmarks_cpu.cc",
    "content": "#define EIGEN_USE_THREADS\n\n#include <string>\n\n#include \"tensor_benchmarks.h\"\n\n#define CREATE_THREAD_POOL(threads)             \\\nEigen::ThreadPool pool(threads);                \\\nEigen::ThreadPoolDevice device(&pool, threads);\n\n// Simple functions\n#define BM_FuncCPU(FUNC, THREADS)                                    \\\n  static void BM_##FUNC##_##THREADS##T(int iters, int N) {           \\\n    StopBenchmarkTiming();                                           \\\n    CREATE_THREAD_POOL(THREADS);                                     \\\n    BenchmarkSuite<Eigen::ThreadPoolDevice, float> suite(device, N); \\\n    suite.FUNC(iters);                                               \\\n  }                                                                  \\\n  BENCHMARK_RANGE(BM_##FUNC##_##THREADS##T, 10, 5000);\n\nBM_FuncCPU(memcpy, 4);\nBM_FuncCPU(memcpy, 8);\nBM_FuncCPU(memcpy, 12);\n\nBM_FuncCPU(typeCasting, 4);\nBM_FuncCPU(typeCasting, 8);\nBM_FuncCPU(typeCasting, 12);\n\nBM_FuncCPU(random, 4);\nBM_FuncCPU(random, 8);\nBM_FuncCPU(random, 12);\n\nBM_FuncCPU(slicing, 4);\nBM_FuncCPU(slicing, 8);\nBM_FuncCPU(slicing, 12);\n\nBM_FuncCPU(rowChip, 4);\nBM_FuncCPU(rowChip, 8);\nBM_FuncCPU(rowChip, 12);\n\nBM_FuncCPU(colChip, 4);\nBM_FuncCPU(colChip, 8);\nBM_FuncCPU(colChip, 12);\n\nBM_FuncCPU(shuffling, 4);\nBM_FuncCPU(shuffling, 8);\nBM_FuncCPU(shuffling, 12);\n\nBM_FuncCPU(padding, 4);\nBM_FuncCPU(padding, 8);\nBM_FuncCPU(padding, 12);\n\nBM_FuncCPU(striding, 4);\nBM_FuncCPU(striding, 8);\nBM_FuncCPU(striding, 12);\n\nBM_FuncCPU(broadcasting, 4);\nBM_FuncCPU(broadcasting, 8);\nBM_FuncCPU(broadcasting, 12);\n\nBM_FuncCPU(coeffWiseOp, 4);\nBM_FuncCPU(coeffWiseOp, 8);\nBM_FuncCPU(coeffWiseOp, 12);\n\nBM_FuncCPU(algebraicFunc, 4);\nBM_FuncCPU(algebraicFunc, 8);\nBM_FuncCPU(algebraicFunc, 12);\n\nBM_FuncCPU(transcendentalFunc, 4);\nBM_FuncCPU(transcendentalFunc, 8);\nBM_FuncCPU(transcendentalFunc, 12);\n\nBM_FuncCPU(rowReduction, 4);\nBM_FuncCPU(rowReduction, 8);\nBM_FuncCPU(rowReduction, 12);\n\nBM_FuncCPU(colReduction, 4);\nBM_FuncCPU(colReduction, 8);\nBM_FuncCPU(colReduction, 12);\n\n\n// Contractions\n#define BM_FuncWithInputDimsCPU(FUNC, D1, D2, D3, THREADS)                      \\\n  static void BM_##FUNC##_##D1##x##D2##x##D3##_##THREADS##T(int iters, int N) { \\\n    StopBenchmarkTiming();                                                      \\\n    if (THREADS == 1) {                                                         \\\n      Eigen::DefaultDevice device;                                              \\\n      BenchmarkSuite<Eigen::DefaultDevice, float> suite(device, D1, D2, D3);    \\\n      suite.FUNC(iters);                                                        \\\n    } else {                                                                    \\\n      CREATE_THREAD_POOL(THREADS);                                              \\\n      BenchmarkSuite<Eigen::ThreadPoolDevice, float> suite(device, D1, D2, D3); \\\n      suite.FUNC(iters);                                                        \\\n    }                                                                           \\\n  }                                                                             \\\n  BENCHMARK_RANGE(BM_##FUNC##_##D1##x##D2##x##D3##_##THREADS##T, 10, 5000);\n\n\nBM_FuncWithInputDimsCPU(contraction, N, N, N, 1);\nBM_FuncWithInputDimsCPU(contraction, N, N, N, 4);\nBM_FuncWithInputDimsCPU(contraction, N, N, N, 8);\nBM_FuncWithInputDimsCPU(contraction, N, N, N, 12);\nBM_FuncWithInputDimsCPU(contraction, N, N, N, 16);\n\nBM_FuncWithInputDimsCPU(contraction, 64, N, N, 1);\nBM_FuncWithInputDimsCPU(contraction, 64, N, N, 4);\nBM_FuncWithInputDimsCPU(contraction, 64, N, N, 8);\nBM_FuncWithInputDimsCPU(contraction, 64, N, N, 12);\nBM_FuncWithInputDimsCPU(contraction, 64, N, N, 16);\n\nBM_FuncWithInputDimsCPU(contraction, N, 64, N, 1);\nBM_FuncWithInputDimsCPU(contraction, N, 64, N, 4);\nBM_FuncWithInputDimsCPU(contraction, N, 64, N, 8);\nBM_FuncWithInputDimsCPU(contraction, N, 64, N, 12);\nBM_FuncWithInputDimsCPU(contraction, N, 64, N, 16);\n\nBM_FuncWithInputDimsCPU(contraction, N, N, 64, 1);\nBM_FuncWithInputDimsCPU(contraction, N, N, 64, 4);\nBM_FuncWithInputDimsCPU(contraction, N, N, 64, 8);\nBM_FuncWithInputDimsCPU(contraction, N, N, 64, 12);\nBM_FuncWithInputDimsCPU(contraction, N, N, 64, 16);\n\nBM_FuncWithInputDimsCPU(contraction, 1, N, N, 1);\nBM_FuncWithInputDimsCPU(contraction, 1, N, N, 4);\nBM_FuncWithInputDimsCPU(contraction, 1, N, N, 8);\nBM_FuncWithInputDimsCPU(contraction, 1, N, N, 12);\nBM_FuncWithInputDimsCPU(contraction, 1, N, N, 16);\n\nBM_FuncWithInputDimsCPU(contraction, N, N, 1, 1);\nBM_FuncWithInputDimsCPU(contraction, N, N, 1, 4);\nBM_FuncWithInputDimsCPU(contraction, N, N, 1, 8);\nBM_FuncWithInputDimsCPU(contraction, N, N, 1, 12);\nBM_FuncWithInputDimsCPU(contraction, N, N, 1, 16);\n\n\n// Convolutions\n#define BM_FuncWithKernelDimsCPU(FUNC, DIM1, DIM2, THREADS)                    \\\n  static void BM_##FUNC##_##DIM1##x##DIM2##_##THREADS##T(int iters, int N) {   \\\n    StopBenchmarkTiming();                                                     \\\n    CREATE_THREAD_POOL(THREADS);                                               \\\n    BenchmarkSuite<Eigen::ThreadPoolDevice, float> suite(device, N);\t       \\\n    suite.FUNC(iters, DIM1, DIM2);                                             \\\n  }                                                                            \\\n  BENCHMARK_RANGE(BM_##FUNC##_##DIM1##x##DIM2##_##THREADS##T, 128, 5000);\n\nBM_FuncWithKernelDimsCPU(convolution, 7, 1, 4);\nBM_FuncWithKernelDimsCPU(convolution, 7, 1, 8);\nBM_FuncWithKernelDimsCPU(convolution, 7, 1, 12);\n\nBM_FuncWithKernelDimsCPU(convolution, 1, 7, 4);\nBM_FuncWithKernelDimsCPU(convolution, 1, 7, 8);\nBM_FuncWithKernelDimsCPU(convolution, 1, 7, 12);\n\nBM_FuncWithKernelDimsCPU(convolution, 7, 4, 4);\nBM_FuncWithKernelDimsCPU(convolution, 7, 4, 8);\nBM_FuncWithKernelDimsCPU(convolution, 7, 4, 12);\n\nBM_FuncWithKernelDimsCPU(convolution, 4, 7, 4);\nBM_FuncWithKernelDimsCPU(convolution, 4, 7, 8);\nBM_FuncWithKernelDimsCPU(convolution, 4, 7, 12);\n\nBM_FuncWithKernelDimsCPU(convolution, 7, 64, 4);\nBM_FuncWithKernelDimsCPU(convolution, 7, 64, 8);\nBM_FuncWithKernelDimsCPU(convolution, 7, 64, 12);\n\nBM_FuncWithKernelDimsCPU(convolution, 64, 7, 4);\nBM_FuncWithKernelDimsCPU(convolution, 64, 7, 8);\nBM_FuncWithKernelDimsCPU(convolution, 64, 7, 12);\n"
  },
  {
    "path": "3rdparty/eigen3/bench/tensors/tensor_benchmarks_fp16_gpu.cu",
    "content": "#define EIGEN_USE_GPU\n\n#include <cuda.h>\n#include <cuda_runtime.h>\n#include <iostream>\n\n#include \"tensor_benchmarks.h\"\n\n// Simple functions\n#define BM_FuncGPU(FUNC)                                                       \\\n  static void BM_##FUNC(int iters, int N) {                                    \\\n    StopBenchmarkTiming();                                                     \\\n    Eigen::CudaStreamDevice stream;                                            \\\n    Eigen::GpuDevice device(&stream);                                          \\\n    BenchmarkSuite<Eigen::GpuDevice, Eigen::half> suite(device, N);            \\\n    cudaDeviceSynchronize();                                                   \\\n    suite.FUNC(iters);                                                         \\\n  }                                                                            \\\n  BENCHMARK_RANGE(BM_##FUNC, 10, 5000);\n\nBM_FuncGPU(memcpy);\nBM_FuncGPU(typeCasting);\n//BM_FuncGPU(random);\nBM_FuncGPU(slicing);\nBM_FuncGPU(rowChip);\nBM_FuncGPU(colChip);\nBM_FuncGPU(shuffling);\nBM_FuncGPU(padding);\nBM_FuncGPU(striding);\nBM_FuncGPU(broadcasting);\nBM_FuncGPU(coeffWiseOp);\nBM_FuncGPU(algebraicFunc);\nBM_FuncGPU(transcendentalFunc);\nBM_FuncGPU(rowReduction);\nBM_FuncGPU(colReduction);\nBM_FuncGPU(fullReduction);\n\n\n// Contractions\n#define BM_FuncWithInputDimsGPU(FUNC, D1, D2, D3)                              \\\n  static void BM_##FUNC##_##D1##x##D2##x##D3(int iters, int N) {               \\\n    StopBenchmarkTiming();                                                     \\\n    Eigen::CudaStreamDevice stream;                                            \\\n    Eigen::GpuDevice device(&stream);                                          \\\n    BenchmarkSuite<Eigen::GpuDevice, Eigen::half> suite(device, D1, D2, D3);   \\\n    cudaDeviceSynchronize();                                                   \\\n    suite.FUNC(iters);                                                         \\\n  }                                                                            \\\n  BENCHMARK_RANGE(BM_##FUNC##_##D1##x##D2##x##D3, 10, 5000);\n\n\nBM_FuncWithInputDimsGPU(contraction, N, N, N);\nBM_FuncWithInputDimsGPU(contraction, 64, N, N);\nBM_FuncWithInputDimsGPU(contraction, N, 64, N);\nBM_FuncWithInputDimsGPU(contraction, N, N, 64);\n\n\n// Convolutions\n#define BM_FuncWithKernelDimsGPU(FUNC, DIM1, DIM2)                             \\\n  static void BM_##FUNC##_##DIM1##x##DIM2(int iters, int N) {                  \\\n    StopBenchmarkTiming();                                                     \\\n    Eigen::CudaStreamDevice stream;                                            \\\n    Eigen::GpuDevice device(&stream);                                          \\\n    BenchmarkSuite<Eigen::GpuDevice, Eigen::half> suite(device, N);            \\\n    cudaDeviceSynchronize();                                                   \\\n    suite.FUNC(iters, DIM1, DIM2);                                             \\\n  }                                                                            \\\n  BENCHMARK_RANGE(BM_##FUNC##_##DIM1##x##DIM2, 128, 5000);\n\n/*\nBM_FuncWithKernelDimsGPU(convolution, 7, 1);\nBM_FuncWithKernelDimsGPU(convolution, 1, 7);\nBM_FuncWithKernelDimsGPU(convolution, 7, 4);\nBM_FuncWithKernelDimsGPU(convolution, 4, 7);\nBM_FuncWithKernelDimsGPU(convolution, 7, 64);\nBM_FuncWithKernelDimsGPU(convolution, 64, 7);\n*/\n"
  },
  {
    "path": "3rdparty/eigen3/bench/tensors/tensor_benchmarks_gpu.cu",
    "content": "#define EIGEN_USE_GPU\n\n#include <cuda.h>\n#include <cuda_runtime.h>\n#include <iostream>\n\n#include \"tensor_benchmarks.h\"\n\n// Simple functions\n#define BM_FuncGPU(FUNC)                                                       \\\n  static void BM_##FUNC(int iters, int N) {                                    \\\n    StopBenchmarkTiming();                                                     \\\n    Eigen::CudaStreamDevice stream;                                            \\\n    Eigen::GpuDevice device(&stream);                                          \\\n    BenchmarkSuite<Eigen::GpuDevice, float> suite(device, N);                  \\\n    cudaDeviceSynchronize();                                                   \\\n    suite.FUNC(iters);                                                         \\\n  }                                                                            \\\n  BENCHMARK_RANGE(BM_##FUNC, 10, 5000);\n\nBM_FuncGPU(memcpy);\nBM_FuncGPU(typeCasting);\nBM_FuncGPU(random);\nBM_FuncGPU(slicing);\nBM_FuncGPU(rowChip);\nBM_FuncGPU(colChip);\nBM_FuncGPU(shuffling);\nBM_FuncGPU(padding);\nBM_FuncGPU(striding);\nBM_FuncGPU(broadcasting);\nBM_FuncGPU(coeffWiseOp);\nBM_FuncGPU(algebraicFunc);\nBM_FuncGPU(transcendentalFunc);\nBM_FuncGPU(rowReduction);\nBM_FuncGPU(colReduction);\nBM_FuncGPU(fullReduction);\n\n\n// Contractions\n#define BM_FuncWithInputDimsGPU(FUNC, D1, D2, D3)                              \\\n  static void BM_##FUNC##_##D1##x##D2##x##D3(int iters, int N) {               \\\n    StopBenchmarkTiming();                                                     \\\n    Eigen::CudaStreamDevice stream;                                            \\\n    Eigen::GpuDevice device(&stream);                                          \\\n    BenchmarkSuite<Eigen::GpuDevice, float> suite(device, D1, D2, D3);         \\\n    cudaDeviceSynchronize();                                                   \\\n    suite.FUNC(iters);                                                         \\\n  }                                                                            \\\n  BENCHMARK_RANGE(BM_##FUNC##_##D1##x##D2##x##D3, 10, 5000);\n\n\nBM_FuncWithInputDimsGPU(contraction, N, N, N);\nBM_FuncWithInputDimsGPU(contraction, 64, N, N);\nBM_FuncWithInputDimsGPU(contraction, N, 64, N);\nBM_FuncWithInputDimsGPU(contraction, N, N, 64);\n\n\n// Convolutions\n#define BM_FuncWithKernelDimsGPU(FUNC, DIM1, DIM2)                             \\\n  static void BM_##FUNC##_##DIM1##x##DIM2(int iters, int N) {                  \\\n    StopBenchmarkTiming();                                                     \\\n    Eigen::CudaStreamDevice stream;                                            \\\n    Eigen::GpuDevice device(&stream);                                          \\\n    BenchmarkSuite<Eigen::GpuDevice, float> suite(device, N);                  \\\n    cudaDeviceSynchronize();                                                   \\\n    suite.FUNC(iters, DIM1, DIM2);                                             \\\n  }                                                                            \\\n  BENCHMARK_RANGE(BM_##FUNC##_##DIM1##x##DIM2, 128, 5000);\n\nBM_FuncWithKernelDimsGPU(convolution, 7, 1);\nBM_FuncWithKernelDimsGPU(convolution, 1, 7);\nBM_FuncWithKernelDimsGPU(convolution, 7, 4);\nBM_FuncWithKernelDimsGPU(convolution, 4, 7);\nBM_FuncWithKernelDimsGPU(convolution, 7, 64);\nBM_FuncWithKernelDimsGPU(convolution, 64, 7);\n"
  },
  {
    "path": "3rdparty/eigen3/bench/tensors/tensor_benchmarks_sycl.cc",
    "content": "#ifdef EIGEN_USE_SYCL\n\n#include <SYCL/sycl.hpp>\n#include <iostream>\n\n#include \"tensor_benchmarks.h\"\n\ncl::sycl::gpu_selector selector;\nEigen::QueueInterface queue(selector);\n#define BM_FuncWithInput2DimsGPU(FUNC, D1, D2)                      \\\n  static void BM_##FUNC##_##D1##x##D2(int iters, int N) {           \\\n    StopBenchmarkTiming();                                          \\\n    Eigen::SyclDevice device(&queue);                               \\\n    BenchmarkSuite<Eigen::SyclDevice, float> suite(device, D1, D2); \\\n    suite.FUNC(iters);                                              \\\n  }                                                                 \\\n  BENCHMARK_RANGE(BM_##FUNC##_##D1##x##D2, 10, 10);\n\nBM_FuncWithInput2DimsGPU(rowReduction, 256, 100352);\nBM_FuncWithInput2DimsGPU(rowReduction, 64, 100352);\nBM_FuncWithInput2DimsGPU(rowReduction, 512, 25088);\nBM_FuncWithInput2DimsGPU(rowReduction, 128, 25088);\nBM_FuncWithInput2DimsGPU(rowReduction, 102, 6272);\nBM_FuncWithInput2DimsGPU(rowReduction, 256, 6272);\nBM_FuncWithInput2DimsGPU(rowReduction, 204, 1568);\nBM_FuncWithInput2DimsGPU(rowReduction, 512, 1568);\nBM_FuncWithInput2DimsGPU(rowReduction, 1024, 1568);\nBM_FuncWithInput2DimsGPU(rowReduction, 2048, 1568);\n\nBM_FuncWithInput2DimsGPU(colReduction, 100352, 256);\nBM_FuncWithInput2DimsGPU(colReduction, 100352, 64);\nBM_FuncWithInput2DimsGPU(colReduction, 25088, 512);\nBM_FuncWithInput2DimsGPU(colReduction, 6272, 102);\nBM_FuncWithInput2DimsGPU(colReduction, 25088, 128);\nBM_FuncWithInput2DimsGPU(colReduction, 6272, 256);\nBM_FuncWithInput2DimsGPU(colReduction, 1568, 204);\nBM_FuncWithInput2DimsGPU(colReduction, 1568, 512);\nBM_FuncWithInput2DimsGPU(colReduction, 1568, 1024);\nBM_FuncWithInput2DimsGPU(colReduction, 1568, 2048);\nBM_FuncWithInput2DimsGPU(fullReduction, 1001, 1);\nBM_FuncWithInput2DimsGPU(fullReduction, 2050048, 1);\nBM_FuncWithInput2DimsGPU(fullReduction, 2097152, 1);\nBM_FuncWithInput2DimsGPU(fullReduction, 2048, 1);\nBM_FuncWithInput2DimsGPU(fullReduction, 262144, 1);\nBM_FuncWithInput2DimsGPU(fullReduction, 256, 1);\nBM_FuncWithInput2DimsGPU(fullReduction, 589824, 1);\nBM_FuncWithInput2DimsGPU(fullReduction, 1024, 1);\nBM_FuncWithInput2DimsGPU(fullReduction, 524288, 1);\nBM_FuncWithInput2DimsGPU(fullReduction, 512, 1);\nBM_FuncWithInput2DimsGPU(fullReduction, 2359296, 1);\nBM_FuncWithInput2DimsGPU(fullReduction, 1048576, 1);\nBM_FuncWithInput2DimsGPU(fullReduction, 131072, 1);\nBM_FuncWithInput2DimsGPU(fullReduction, 16384, 1);\nBM_FuncWithInput2DimsGPU(fullReduction, 9408, 1);\nBM_FuncWithInput2DimsGPU(fullReduction, 64, 1);\nBM_FuncWithInput2DimsGPU(fullReduction, 4096, 1);\nBM_FuncWithInput2DimsGPU(fullReduction, 36864, 1);\nBM_FuncWithInput2DimsGPU(fullReduction, 32768, 1);\nBM_FuncWithInput2DimsGPU(fullReduction, 128, 1);\nBM_FuncWithInput2DimsGPU(fullReduction, 147456, 1);\nBM_FuncWithInput2DimsGPU(fullReduction, 65536, 1);\n#define BM_FuncGPU(FUNC)                                       \\\n  static void BM_##FUNC(int iters, int N) {                    \\\n    StopBenchmarkTiming();                                     \\\n    Eigen::SyclDevice device(&queue);                          \\\n    BenchmarkSuite<Eigen::SyclDevice, float> suite(device, N); \\\n    suite.FUNC(iters);                                         \\\n  }                                                            \\\n  BENCHMARK_RANGE(BM_##FUNC, 10, 5000);\n\nBM_FuncGPU(rowReduction);\nBM_FuncGPU(colReduction);\nBM_FuncGPU(fullReduction);\n\nBM_FuncGPU(memcpy);\nBM_FuncGPU(typeCasting);\nBM_FuncGPU(random);\nBM_FuncGPU(slicing);\nBM_FuncGPU(rowChip);\nBM_FuncGPU(colChip);\nBM_FuncGPU(shuffling);\nBM_FuncGPU(padding);\nBM_FuncGPU(striding);\nBM_FuncGPU(broadcasting);\nBM_FuncGPU(coeffWiseOp);\nBM_FuncGPU(algebraicFunc);\nBM_FuncGPU(transcendentalFunc);\n// Contractions\n#define BM_FuncWithInputDimsGPU(FUNC, D1, D2, D3)                       \\\n  static void BM_##FUNC##_##D1##x##D2##x##D3(int iters, int N) {        \\\n    StopBenchmarkTiming();                                              \\\n    Eigen::SyclDevice device(&queue);                                   \\\n    BenchmarkSuite<Eigen::SyclDevice, float> suite(device, D1, D2, D3); \\\n    suite.FUNC(iters);                                                  \\\n  }                                                                     \\\n  BENCHMARK_RANGE(BM_##FUNC##_##D1##x##D2##x##D3, 10, 5000);\n\nBM_FuncWithInputDimsGPU(contraction, N, N, N);\nBM_FuncWithInputDimsGPU(contraction, 64, N, N);\nBM_FuncWithInputDimsGPU(contraction, N, 64, N);\nBM_FuncWithInputDimsGPU(contraction, N, N, 64);\n\nBM_FuncWithInputDimsGPU(contractionRowMajor, N, N, N);\nBM_FuncWithInputDimsGPU(contractionRowMajor, 64, N, N);\nBM_FuncWithInputDimsGPU(contractionRowMajor, N, 64, N);\nBM_FuncWithInputDimsGPU(contractionRowMajor, N, N, 64);\n\nBM_FuncWithInputDimsGPU(contractionRowMajorAT, N, N, N);\nBM_FuncWithInputDimsGPU(contractionRowMajorAT, 64, N, N);\nBM_FuncWithInputDimsGPU(contractionRowMajorAT, N, 64, N);\nBM_FuncWithInputDimsGPU(contractionRowMajorAT, N, N, 64);\n\nBM_FuncWithInputDimsGPU(contractionRowMajorBT, N, N, N);\nBM_FuncWithInputDimsGPU(contractionRowMajorBT, 64, N, N);\nBM_FuncWithInputDimsGPU(contractionRowMajorBT, N, 64, N);\nBM_FuncWithInputDimsGPU(contractionRowMajorBT, N, N, 64);\n\n\nBM_FuncWithInputDimsGPU(contractionRowMajorABT, N, N, N);\nBM_FuncWithInputDimsGPU(contractionRowMajorABT, 64, N, N);\nBM_FuncWithInputDimsGPU(contractionRowMajorABT, N, 64, N);\nBM_FuncWithInputDimsGPU(contractionRowMajorABT, N, N, 64);\n\n// Convolutions\n#define BM_FuncWithKernelDimsGPU(FUNC, DIM1, DIM2)             \\\n  static void BM_##FUNC##_##DIM1##x##DIM2(int iters, int N) {  \\\n    StopBenchmarkTiming();                                     \\\n    Eigen::SyclDevice device(&queue);                          \\\n    BenchmarkSuite<Eigen::SyclDevice, float> suite(device, N); \\\n    suite.FUNC(iters, DIM1, DIM2);                             \\\n  }                                                            \\\n  BENCHMARK_RANGE(BM_##FUNC##_##DIM1##x##DIM2, 128, 5000);\n\nBM_FuncWithKernelDimsGPU(convolution, 7, 1);\nBM_FuncWithKernelDimsGPU(convolution, 1, 7);\nBM_FuncWithKernelDimsGPU(convolution, 7, 4);\nBM_FuncWithKernelDimsGPU(convolution, 4, 7);\nBM_FuncWithKernelDimsGPU(convolution, 7, 64);\nBM_FuncWithKernelDimsGPU(convolution, 64, 7);\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/bench/tensors/tensor_contract_sycl_bench.cc",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016\n// Mehdi Goli    Codeplay Software Ltd.\n// Ralph Potter  Codeplay Software Ltd.\n// Luke Iwanski  Codeplay Software Ltd.\n// Contact: <eigen@codeplay.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n#ifndef EIGEN_BENCH_CONTRACT_SYCL\n#define EIGEN_BENCH_CONTRACT_SYCL\n#define EIGEN_TEST_NO_LONGDOUBLE\n#define EIGEN_TEST_NO_COMPLEX\n#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int64_t\n#include <SYCL/sycl.hpp>\n#include <fstream>\n#include <iostream>\n#include <chrono>\n#include <ctime>\n\n#include <unsupported/Eigen/CXX11/Tensor>\n\nusing Eigen::array;\nusing Eigen::SyclDevice;\nusing Eigen::Tensor;\nusing Eigen::TensorMap;\nstd::ofstream out(\"Result.txt\");\n\nstd::chrono::time_point<std::chrono::system_clock> get_time(){\n  std::chrono::time_point<std::chrono::system_clock> start, end;\n  return std::chrono::system_clock::now();\n}\n\ntemplate<typename Start, typename End, typename TensorIndex>\nvoid finalizeBenchmark(Start start, End end, TensorIndex m_, TensorIndex k_, TensorIndex n_ , TensorIndex num_iters, std::string name){\n\n  std::chrono::duration<double> elapsed_seconds = end-start;\n  std::cout <<\"Kernel Name : \" << name << \", M : \" << m_ << \",  N : \" << n_ << \", K : \" << k_ << \" GFLOP/s : \" <<\n  static_cast<float>((static_cast<int64_t>(2) * m_ * n_ * k_ * num_iters)/ elapsed_seconds.count()) * 1e-9 << \"\\n\";\n    out <<\"Kernel Name : \" << name << \", M : \" << m_ << \",  N : \" << n_ << \", K : \" << k_ << \" GFLOP/s : \" <<\n    static_cast<float>((static_cast<int64_t>(2) * m_ * n_ * k_ * num_iters)/ elapsed_seconds.count()) * 1e-9 << \"\\n\";\n}\n\n// do a contraction which is equivalent to a matrix multiplication\ntemplate<typename T, typename Device, typename TensorIndex>\nvoid contraction(const Device& device_, TensorIndex num_iters, TensorIndex m_, TensorIndex k_, TensorIndex n_) {\n  T* a_;\n  T* b_;\n  T* c_;\n  a_ = (T *) device_.allocate(m_ * k_ * sizeof(T));\n  b_ = (T *) device_.allocate(k_ * n_ * sizeof(T));\n  c_ = (T *) device_.allocate(m_ * n_ * sizeof(T));\n\n  // Initialize the content of the memory pools to prevent asan from\n  // complaining.\n  device_.memset(a_, 12, m_ * k_ * sizeof(T));\n  device_.memset(b_, 23, k_ * n_ * sizeof(T));\n  device_.memset(c_, 31, m_ * n_ * sizeof(T));\n\n  Eigen::array<TensorIndex, 2> sizeA;\n  sizeA[0] = m_;\n  sizeA[1] = k_;\n  Eigen::array<TensorIndex, 2> sizeB;\n  sizeB[0] = k_;\n  sizeB[1] = n_;\n  Eigen::array<TensorIndex, 2> sizeC;\n  sizeC[0] = m_;\n  sizeC[1] = n_;\n\n  const TensorMap<Tensor<T, 2>, Eigen::Aligned> A(a_, sizeA);\n  const TensorMap<Tensor<T, 2>, Eigen::Aligned> B(b_, sizeB);\n  TensorMap<Tensor<T, 2>, Eigen::Aligned> C(c_, sizeC);\n\n  typedef typename Tensor<T, 2>::DimensionPair DimPair;\n  Eigen::array<DimPair, 1> dims;\n  dims[0] = DimPair(1, 0);\n#ifdef EIGEN_USE_SYCL // warmup for sycl\n  for (int iter = 0; iter < 10; ++iter) {\n    C.device(device_) = A.contract(B, dims);\n   }\n#endif\n  auto start = get_time();\n  for (int iter = 0; iter < num_iters; ++iter) {\n    C.device(device_) = A.contract(B, dims);\n  }\n auto end = get_time();\n  // Record the number of FLOPs executed per second (size_ multiplications and\n  // additions for each value in the resulting tensor)\n  finalizeBenchmark(start, end, m_, k_, n_, num_iters, \"contraction\");\n  device_.deallocate(a_);\n  device_.deallocate(b_);\n  device_.deallocate(c_);\n  device_.synchronize();\n}\n\n\n\n// do a contraction which is equivalent to a matrix multiplication\ntemplate<typename T, typename Device, typename TensorIndex>\nvoid contractionRowMajor(const Device& device_, TensorIndex num_iters, TensorIndex m_, TensorIndex k_, TensorIndex n_) {\n  T* a_;\n  T* b_;\n  T* c_;\n  a_ = (T *) device_.allocate(m_ * k_ * sizeof(T));\n  b_ = (T *) device_.allocate(k_ * n_ * sizeof(T));\n  c_ = (T *) device_.allocate(m_ * n_ * sizeof(T));\n\n  // Initialize the content of the memory pools to prevent asan from\n  // complaining.\n  device_.memset(a_, 12, m_ * k_ * sizeof(T));\n  device_.memset(b_, 23, k_ * n_ * sizeof(T));\n  device_.memset(c_, 31, m_ * n_ * sizeof(T));\n\n  Eigen::array<TensorIndex, 2> sizeA;\n  sizeA[0] = m_;\n  sizeA[1] = k_;\n  Eigen::array<TensorIndex, 2> sizeB;\n  sizeB[0] = k_;\n  sizeB[1] = n_;\n  Eigen::array<TensorIndex, 2> sizeC;\n  sizeC[0] = m_;\n  sizeC[1] = n_;\n\n  const TensorMap<Tensor<T, 2, Eigen::RowMajor>, Eigen::Aligned> A(a_, sizeA);\n  const TensorMap<Tensor<T, 2, Eigen::RowMajor>, Eigen::Aligned> B(b_, sizeB);\n  TensorMap<Tensor<T, 2, Eigen::RowMajor>, Eigen::Aligned> C(c_, sizeC);\n\n  typedef typename Tensor<T, 2>::DimensionPair DimPair;\n  Eigen::array<DimPair, 1> dims;\n  dims[0] = DimPair(1, 0);\n#ifdef EIGEN_USE_SYCL // warmup for sycl\n  for (int iter = 0; iter < 10; ++iter) {\n    C.device(device_) = A.contract(B, dims);\n   }\n#endif\n  auto start = get_time();\n  for (int iter = 0; iter < num_iters; ++iter) {\n    C.device(device_) = A.contract(B, dims);\n  }\n  auto end = get_time();\n  // Record the number of FLOPs executed per second (size_ multiplications and\n  // additions for each value in the resulting tensor)\n  finalizeBenchmark(start, end, m_, k_, n_, num_iters, \"contractionRowMajor\");\n  device_.deallocate(a_);\n  device_.deallocate(b_);\n  device_.deallocate(c_);\n  device_.synchronize();\n}\n\n\ntemplate<typename T, typename Device, typename TensorIndex>\nvoid contractionAT(const Device& device_, TensorIndex num_iters, TensorIndex m_, TensorIndex k_, TensorIndex n_) {\n  T* a_;\n  T* b_;\n  T* c_;\n  a_ = (T *) device_.allocate(m_ * k_ * sizeof(T));\n  b_ = (T *) device_.allocate(k_ * n_ * sizeof(T));\n  c_ = (T *) device_.allocate(m_ * n_ * sizeof(T));\n\n  // Initialize the content of the memory pools to prevent asan from\n  // complaining.\n  device_.memset(a_, 12, m_ * k_ * sizeof(T));\n  device_.memset(b_, 23, k_ * n_ * sizeof(T));\n  device_.memset(c_, 31, m_ * n_ * sizeof(T));\n  Eigen::array<TensorIndex, 2> sizeA;\n  sizeA[0] = k_;\n  sizeA[1] = m_;\n  Eigen::array<TensorIndex, 2> sizeB;\n  sizeB[0] = k_;\n  sizeB[1] = n_;\n  Eigen::array<TensorIndex, 2> sizeC;\n  sizeC[0] = m_;\n  sizeC[1] = n_;\n\n  const TensorMap<Tensor<T, 2, Eigen::RowMajor>, Eigen::Aligned> A(a_, sizeA);\n  const TensorMap<Tensor<T, 2, Eigen::RowMajor>, Eigen::Aligned> B(b_, sizeB);\n  TensorMap<Tensor<T, 2, Eigen::RowMajor>, Eigen::Aligned> C(c_, sizeC);\n\n  typedef typename Tensor<T, 2>::DimensionPair DimPair;\n  Eigen::array<DimPair, 1> dims;\n  dims[0] = DimPair(0, 0);\n#ifdef EIGEN_USE_SYCL // warmup for sycl\n  for (int iter = 0; iter < 10; ++iter) {\n    C.device(device_) = A.contract(B, dims);\n   }\n#endif\n  auto start = get_time();\n  for (int iter = 0; iter < num_iters; ++iter) {\n    C.device(device_) = A.contract(B, dims);\n  }\n  auto end = get_time();\n  // Record the number of FLOPs executed per second (size_ multiplications and\n  // additions for each value in the resulting tensor)\n  finalizeBenchmark(start, end, m_, k_, n_, num_iters, \"contractionAT\");\n  device_.deallocate(a_);\n  device_.deallocate(b_);\n  device_.deallocate(c_);\n  device_.synchronize();\n\n}\n\ntemplate<typename T, typename Device, typename TensorIndex>\nvoid contractionBT(const Device& device_, TensorIndex num_iters, TensorIndex m_, TensorIndex k_, TensorIndex n_) {\n  T* a_;\n  T* b_;\n  T* c_;\n  a_ = (T *) device_.allocate(m_ * k_ * sizeof(T));\n  b_ = (T *) device_.allocate(k_ * n_ * sizeof(T));\n  c_ = (T *) device_.allocate(m_ * n_ * sizeof(T));\n\n  // Initialize the content of the memory pools to prevent asan from\n  // complaining.\n  device_.memset(a_, 12, m_ * k_ * sizeof(T));\n  device_.memset(b_, 23, k_ * n_ * sizeof(T));\n  device_.memset(c_, 31, m_ * n_ * sizeof(T));\n\n  Eigen::array<TensorIndex, 2> sizeA;\n  sizeA[0] = m_;\n  sizeA[1] = k_;\n  Eigen::array<TensorIndex, 2> sizeB;\n  sizeB[0] = n_;\n  sizeB[1] = k_;\n  Eigen::array<TensorIndex, 2> sizeC;\n  sizeC[0] = m_;\n  sizeC[1] = n_;\n\n  const TensorMap<Tensor<T, 2, Eigen::RowMajor>, Eigen::Aligned> A(a_, sizeA);\n  const TensorMap<Tensor<T, 2, Eigen::RowMajor>, Eigen::Aligned> B(b_, sizeB);\n  TensorMap<Tensor<T, 2, Eigen::RowMajor>, Eigen::Aligned> C(c_, sizeC);\n\n  typedef typename Tensor<T, 2>::DimensionPair DimPair;\n  Eigen::array<DimPair, 1> dims;\n  dims[0] = DimPair(1, 1);\n#ifdef EIGEN_USE_SYCL // warmup for sycl\n  for (int iter = 0; iter < 10; ++iter) {\n    C.device(device_) = A.contract(B, dims);\n   }\n#endif\n  auto start = get_time();\n  for (int iter = 0; iter < num_iters; ++iter) {\n    C.device(device_) = A.contract(B, dims);\n  }\n  auto end = get_time();\n  // Record the number of FLOPs executed per second (size_ multiplications and\n  // additions for each value in the resulting tensor)\n  finalizeBenchmark(start, end, m_, k_, n_, num_iters, \"contractionBT\");\n  device_.deallocate(a_);\n  device_.deallocate(b_);\n  device_.deallocate(c_);\n  device_.synchronize();\n\n}\n\ntemplate<typename T, typename Device, typename TensorIndex>\nvoid contractionABT(const Device& device_, TensorIndex num_iters, TensorIndex m_, TensorIndex k_, TensorIndex n_) {\n  T* a_;\n  T* b_;\n  T* c_;\n  a_ = (T *) device_.allocate(m_ * k_ * sizeof(T));\n  b_ = (T *) device_.allocate(k_ * n_ * sizeof(T));\n  c_ = (T *) device_.allocate(m_ * n_ * sizeof(T));\n\n  // Initialize the content of the memory pools to prevent asan from\n  // complaining.\n  device_.memset(a_, 12, m_ * k_ * sizeof(T));\n  device_.memset(b_, 23, k_ * n_ * sizeof(T));\n  device_.memset(c_, 31, m_ * n_ * sizeof(T));\n\n  Eigen::array<TensorIndex, 2> sizeA;\n  sizeA[0] = k_;\n  sizeA[1] = m_;\n  Eigen::array<TensorIndex, 2> sizeB;\n  sizeB[0] = n_;\n  sizeB[1] = k_;\n  Eigen::array<TensorIndex, 2> sizeC;\n  sizeC[0] = m_;\n  sizeC[1] = n_;\n\n  const TensorMap<Tensor<T, 2, Eigen::RowMajor>, Eigen::Aligned> A(a_, sizeA);\n  const TensorMap<Tensor<T, 2, Eigen::RowMajor>, Eigen::Aligned> B(b_, sizeB);\n  TensorMap<Tensor<T, 2, Eigen::RowMajor>, Eigen::Aligned> C(c_, sizeC);\n\n  typedef typename Tensor<T, 2>::DimensionPair DimPair;\n  Eigen::array<DimPair, 1> dims;\n  dims[0] = DimPair(0, 1);\n#ifdef EIGEN_USE_SYCL // warmup for sycl\n  for (int iter = 0; iter < 10; ++iter) {\n    C.device(device_) = A.contract(B, dims);\n   }\n#endif\n  auto start = get_time();\n  for (int iter = 0; iter < num_iters; ++iter) {\n    C.device(device_) = A.contract(B, dims);\n  }\n  auto end = get_time();\n  // Record the number of FLOPs executed per second (size_ multiplications and\n  // additions for each value in the resulting tensor)\n  finalizeBenchmark(start, end, m_, k_, n_, num_iters, \"contractionABT\");\n  device_.deallocate(a_);\n  device_.deallocate(b_);\n  device_.deallocate(c_);\n  device_.synchronize();\n}\n\nint main() {\n  cl::sycl::gpu_selector selector;\n  Eigen::QueueInterface queue(selector);\n  Eigen::SyclDevice device(&queue);\n  int64_t num_iters =20;\n  for(int64_t m = 32; m <= 4096; m *= 2)\n    for(int64_t k = 32; k <= 4096; k *= 2)\n      for(int64_t n = 32; n <= 4096; n*= 2){\n        (contraction<float>(device, num_iters, m, k, n));\n        (contractionRowMajor<float>(device, num_iters, m, k, n));\n        (contractionAT<float>(device, num_iters, m, k, n));\n        (contractionBT<float>(device, num_iters, m, k, n));\n        (contractionABT<float>(device, num_iters, m, k, n));\n      }\n  return 0;\n  }\n\n#endif // EIGEN_BENCH_CONTRACT_SYCL\n"
  },
  {
    "path": "3rdparty/eigen3/bench/vdw_new.cpp",
    "content": "#include <iostream>\n#include <Eigen/Core>\n\nusing namespace Eigen;\n\n#ifndef SCALAR\n#define SCALAR float\n#endif\n\n#ifndef SIZE\n#define SIZE 10000\n#endif\n\n#ifndef REPEAT\n#define REPEAT 10000\n#endif\n\ntypedef Matrix<SCALAR, Eigen::Dynamic, 1> Vec;\n\nusing namespace std;\n\nSCALAR E_VDW(const Vec &interactions1, const Vec &interactions2)\n{\n  return (interactions2.cwise()/interactions1)\n         .cwise().cube()\n         .cwise().square()\n         .cwise().square()\n         .sum();\n}\n\nint main() \n{\n  //\n  //          1   2   3   4  ... (interactions)\n  // ka       .   .   .   .  ...\n  // rab      .   .   .   .  ...\n  // energy   .   .   .   .  ...\n  // ...     ... ... ... ... ...\n  // (variables\n  //    for\n  // interaction)\n  //\n  Vec interactions1(SIZE), interactions2(SIZE); // SIZE is the number of vdw interactions in our system\n  // SetupCalculations()\n  SCALAR rab = 1.0;  \n  interactions1.setConstant(2.4);\n  interactions2.setConstant(rab);\n  \n  // Energy()\n  SCALAR energy = 0.0;\n  for (unsigned int i = 0; i<REPEAT; ++i) {\n    energy += E_VDW(interactions1, interactions2);\n    energy *= 1 + 1e-20 * i; // prevent compiler from optimizing the loop\n  }\n  cout << \"energy = \" << energy << endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/blas/BandTriangularSolver.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2011 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_BAND_TRIANGULARSOLVER_H\n#define EIGEN_BAND_TRIANGULARSOLVER_H\n\nnamespace internal {\n\n /* \\internal\n  * Solve Ax=b with A a band triangular matrix\n  * TODO: extend it to matrices for x abd b */\ntemplate<typename Index, int Mode, typename LhsScalar, bool ConjLhs, typename RhsScalar, int StorageOrder>\nstruct band_solve_triangular_selector;\n\n\ntemplate<typename Index, int Mode, typename LhsScalar, bool ConjLhs, typename RhsScalar>\nstruct band_solve_triangular_selector<Index,Mode,LhsScalar,ConjLhs,RhsScalar,RowMajor>\n{\n  typedef Map<const Matrix<LhsScalar,Dynamic,Dynamic,RowMajor>, 0, OuterStride<> > LhsMap;\n  typedef Map<Matrix<RhsScalar,Dynamic,1> > RhsMap;\n  enum { IsLower = (Mode&Lower) ? 1 : 0 };\n  static void run(Index size, Index k, const LhsScalar* _lhs, Index lhsStride, RhsScalar* _other)\n  {\n    const LhsMap lhs(_lhs,size,k+1,OuterStride<>(lhsStride));\n    RhsMap other(_other,size,1);\n    typename internal::conditional<\n                          ConjLhs,\n                          const CwiseUnaryOp<typename internal::scalar_conjugate_op<LhsScalar>,LhsMap>,\n                          const LhsMap&>\n                        ::type cjLhs(lhs);\n                        \n    for(int col=0 ; col<other.cols() ; ++col)\n    {\n      for(int ii=0; ii<size; ++ii)\n      {\n        int i = IsLower ? ii : size-ii-1;\n        int actual_k = (std::min)(k,ii);\n        int actual_start = IsLower ? k-actual_k : 1;\n        \n        if(actual_k>0)\n          other.coeffRef(i,col) -= cjLhs.row(i).segment(actual_start,actual_k).transpose()\n                                  .cwiseProduct(other.col(col).segment(IsLower ? i-actual_k : i+1,actual_k)).sum();\n\n        if((Mode&UnitDiag)==0)\n          other.coeffRef(i,col) /= cjLhs(i,IsLower ? k : 0);\n      }\n    }\n  }\n  \n};\n\ntemplate<typename Index, int Mode, typename LhsScalar, bool ConjLhs, typename RhsScalar>\nstruct band_solve_triangular_selector<Index,Mode,LhsScalar,ConjLhs,RhsScalar,ColMajor>\n{\n  typedef Map<const Matrix<LhsScalar,Dynamic,Dynamic,ColMajor>, 0, OuterStride<> > LhsMap;\n  typedef Map<Matrix<RhsScalar,Dynamic,1> > RhsMap;\n  enum { IsLower = (Mode&Lower) ? 1 : 0 };\n  static void run(Index size, Index k, const LhsScalar* _lhs, Index lhsStride, RhsScalar* _other)\n  {\n    const LhsMap lhs(_lhs,k+1,size,OuterStride<>(lhsStride));\n    RhsMap other(_other,size,1);\n    typename internal::conditional<\n                          ConjLhs,\n                          const CwiseUnaryOp<typename internal::scalar_conjugate_op<LhsScalar>,LhsMap>,\n                          const LhsMap&>\n                        ::type cjLhs(lhs);\n                        \n    for(int col=0 ; col<other.cols() ; ++col)\n    {\n      for(int ii=0; ii<size; ++ii)\n      {\n        int i = IsLower ? ii : size-ii-1;\n        int actual_k = (std::min)(k,size-ii-1);\n        int actual_start = IsLower ? 1 : k-actual_k;\n        \n        if((Mode&UnitDiag)==0)\n          other.coeffRef(i,col) /= cjLhs(IsLower ? 0 : k, i);\n\n        if(actual_k>0)\n          other.col(col).segment(IsLower ? i+1 : i-actual_k, actual_k)\n              -= other.coeff(i,col) * cjLhs.col(i).segment(actual_start,actual_k);\n        \n      }\n    }\n  }\n};\n\n\n} // end namespace internal\n\n#endif // EIGEN_BAND_TRIANGULARSOLVER_H\n"
  },
  {
    "path": "3rdparty/eigen3/blas/CMakeLists.txt",
    "content": "\nproject(EigenBlas CXX)\n\ninclude(\"../cmake/language_support.cmake\")\n\nworkaround_9220(Fortran EIGEN_Fortran_COMPILER_WORKS)\n\nif(EIGEN_Fortran_COMPILER_WORKS)\n  enable_language(Fortran OPTIONAL)\n  if(NOT CMAKE_Fortran_COMPILER)\n    set(EIGEN_Fortran_COMPILER_WORKS OFF)\n  endif()\nendif()\n\nadd_custom_target(blas)\n\nset(EigenBlas_SRCS  single.cpp double.cpp complex_single.cpp complex_double.cpp xerbla.cpp\n                    f2c/srotm.c   f2c/srotmg.c  f2c/drotm.c f2c/drotmg.c\n                    f2c/lsame.c   f2c/dspmv.c   f2c/ssbmv.c f2c/chbmv.c\n                    f2c/sspmv.c   f2c/zhbmv.c   f2c/chpmv.c f2c/dsbmv.c\n                    f2c/zhpmv.c   f2c/dtbmv.c   f2c/stbmv.c f2c/ctbmv.c\n                    f2c/ztbmv.c   f2c/d_cnjg.c  f2c/r_cnjg.c\n   )\n\nif (EIGEN_Fortran_COMPILER_WORKS)\n  set(EigenBlas_SRCS ${EigenBlas_SRCS} fortran/complexdots.f)\nelse()\n  set(EigenBlas_SRCS ${EigenBlas_SRCS} f2c/complexdots.c)\nendif()\n\nadd_library(eigen_blas_static ${EigenBlas_SRCS})\nadd_library(eigen_blas SHARED ${EigenBlas_SRCS})\n\nif(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO)\n  target_link_libraries(eigen_blas_static ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO})\n  target_link_libraries(eigen_blas        ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO})\nendif()\n\nadd_dependencies(blas eigen_blas eigen_blas_static)\n\ninstall(TARGETS eigen_blas eigen_blas_static\n        RUNTIME DESTINATION bin\n        LIBRARY DESTINATION lib\n        ARCHIVE DESTINATION lib)\n\nif(EIGEN_Fortran_COMPILER_WORKS)\n\nif(BUILD_TESTING)\n  if(EIGEN_LEAVE_TEST_IN_ALL_TARGET)\n    add_subdirectory(testing) # can't do EXCLUDE_FROM_ALL here, breaks CTest\n  else()\n    add_subdirectory(testing EXCLUDE_FROM_ALL)\n  endif()\nendif()\n\nendif()\n\n"
  },
  {
    "path": "3rdparty/eigen3/blas/GeneralRank1Update.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Chen-Pang He <jdh8@ms63.hinet.net>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_GENERAL_RANK1UPDATE_H\n#define EIGEN_GENERAL_RANK1UPDATE_H\n\nnamespace internal {\n\n/* Optimized matrix += alpha * uv' */\ntemplate<typename Scalar, typename Index, int StorageOrder, bool ConjLhs, bool ConjRhs>\nstruct general_rank1_update;\n\ntemplate<typename Scalar, typename Index, bool ConjLhs, bool ConjRhs>\nstruct general_rank1_update<Scalar,Index,ColMajor,ConjLhs,ConjRhs>\n{\n  static void run(Index rows, Index cols, Scalar* mat, Index stride, const Scalar* u, const Scalar* v, Scalar alpha)\n  {\n    typedef Map<const Matrix<Scalar,Dynamic,1> > OtherMap;\n    typedef typename conj_expr_if<ConjLhs,OtherMap>::type ConjRhsType;\n    conj_if<ConjRhs> cj;\n\n    for (Index i=0; i<cols; ++i)\n      Map<Matrix<Scalar,Dynamic,1> >(mat+stride*i,rows) += alpha * cj(v[i]) * ConjRhsType(OtherMap(u,rows));\n  }\n};\n\ntemplate<typename Scalar, typename Index, bool ConjLhs, bool ConjRhs>\nstruct general_rank1_update<Scalar,Index,RowMajor,ConjLhs,ConjRhs>\n{\n  static void run(Index rows, Index cols, Scalar* mat, Index stride, const Scalar* u, const Scalar* v, Scalar alpha)\n  {\n    general_rank1_update<Scalar,Index,ColMajor,ConjRhs,ConjRhs>::run(rows,cols,mat,stride,u,v,alpha);\n  }\n};\n\n} // end namespace internal\n\n#endif // EIGEN_GENERAL_RANK1UPDATE_H\n"
  },
  {
    "path": "3rdparty/eigen3/blas/PackedSelfadjointProduct.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Chen-Pang He <jdh8@ms63.hinet.net>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SELFADJOINT_PACKED_PRODUCT_H\n#define EIGEN_SELFADJOINT_PACKED_PRODUCT_H\n\nnamespace internal {\n\n/* Optimized matrix += alpha * uv'\n * The matrix is in packed form.\n */\ntemplate<typename Scalar, typename Index, int StorageOrder, int UpLo, bool ConjLhs, bool ConjRhs>\nstruct selfadjoint_packed_rank1_update;\n\ntemplate<typename Scalar, typename Index, int UpLo, bool ConjLhs, bool ConjRhs>\nstruct selfadjoint_packed_rank1_update<Scalar,Index,ColMajor,UpLo,ConjLhs,ConjRhs>\n{\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  static void run(Index size, Scalar* mat, const Scalar* vec, RealScalar alpha)\n  {\n    typedef Map<const Matrix<Scalar,Dynamic,1> > OtherMap;\n    typedef typename conj_expr_if<ConjLhs,OtherMap>::type ConjRhsType;\n    conj_if<ConjRhs> cj;\n\n    for (Index i=0; i<size; ++i)\n    {\n      Map<Matrix<Scalar,Dynamic,1> >(mat, UpLo==Lower ? size-i : (i+1)) += alpha * cj(vec[i]) * ConjRhsType(OtherMap(vec+(UpLo==Lower ? i : 0), UpLo==Lower ? size-i : (i+1)));\n      //FIXME This should be handled outside.\n      mat[UpLo==Lower ? 0 : i] = numext::real(mat[UpLo==Lower ? 0 : i]);\n      mat += UpLo==Lower ? size-i : (i+1);\n    }\n  }\n};\n\ntemplate<typename Scalar, typename Index, int UpLo, bool ConjLhs, bool ConjRhs>\nstruct selfadjoint_packed_rank1_update<Scalar,Index,RowMajor,UpLo,ConjLhs,ConjRhs>\n{\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  static void run(Index size, Scalar* mat, const Scalar* vec, RealScalar alpha)\n  {\n    selfadjoint_packed_rank1_update<Scalar,Index,ColMajor,UpLo==Lower?Upper:Lower,ConjRhs,ConjLhs>::run(size,mat,vec,alpha);\n  }\n};\n\n} // end namespace internal\n\n#endif // EIGEN_SELFADJOINT_PACKED_PRODUCT_H\n"
  },
  {
    "path": "3rdparty/eigen3/blas/PackedTriangularMatrixVector.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Chen-Pang He <jdh8@ms63.hinet.net>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_PACKED_TRIANGULAR_MATRIX_VECTOR_H\n#define EIGEN_PACKED_TRIANGULAR_MATRIX_VECTOR_H\n\nnamespace internal {\n\ntemplate<typename Index, int Mode, typename LhsScalar, bool ConjLhs, typename RhsScalar, bool ConjRhs, int StorageOrder>\nstruct packed_triangular_matrix_vector_product;\n\ntemplate<typename Index, int Mode, typename LhsScalar, bool ConjLhs, typename RhsScalar, bool ConjRhs>\nstruct packed_triangular_matrix_vector_product<Index,Mode,LhsScalar,ConjLhs,RhsScalar,ConjRhs,ColMajor>\n{\n  typedef typename ScalarBinaryOpTraits<LhsScalar, RhsScalar>::ReturnType ResScalar;\n  enum {\n    IsLower     = (Mode & Lower)   ==Lower,\n    HasUnitDiag = (Mode & UnitDiag)==UnitDiag,\n    HasZeroDiag = (Mode & ZeroDiag)==ZeroDiag\n  };\n  static void run(Index size, const LhsScalar* lhs, const RhsScalar* rhs, ResScalar* res, ResScalar alpha)\n  {\n    internal::conj_if<ConjRhs> cj;\n    typedef Map<const Matrix<LhsScalar,Dynamic,1> > LhsMap;\n    typedef typename conj_expr_if<ConjLhs,LhsMap>::type ConjLhsType;\n    typedef Map<Matrix<ResScalar,Dynamic,1> > ResMap;\n\n    for (Index i=0; i<size; ++i)\n    {\n      Index s = IsLower&&(HasUnitDiag||HasZeroDiag) ? 1 : 0;\n      Index r = IsLower ? size-i: i+1;\n      if (EIGEN_IMPLIES(HasUnitDiag||HasZeroDiag, (--r)>0))\n\tResMap(res+(IsLower ? s+i : 0),r) += alpha * cj(rhs[i]) * ConjLhsType(LhsMap(lhs+s,r));\n      if (HasUnitDiag)\n\tres[i] += alpha * cj(rhs[i]);\n      lhs += IsLower ? size-i: i+1;\n    }\n  };\n};\n\ntemplate<typename Index, int Mode, typename LhsScalar, bool ConjLhs, typename RhsScalar, bool ConjRhs>\nstruct packed_triangular_matrix_vector_product<Index,Mode,LhsScalar,ConjLhs,RhsScalar,ConjRhs,RowMajor>\n{\n  typedef typename ScalarBinaryOpTraits<LhsScalar, RhsScalar>::ReturnType ResScalar;\n  enum {\n    IsLower     = (Mode & Lower)   ==Lower,\n    HasUnitDiag = (Mode & UnitDiag)==UnitDiag,\n    HasZeroDiag = (Mode & ZeroDiag)==ZeroDiag\n  };\n  static void run(Index size, const LhsScalar* lhs, const RhsScalar* rhs, ResScalar* res, ResScalar alpha)\n  {\n    internal::conj_if<ConjRhs> cj;\n    typedef Map<const Matrix<LhsScalar,Dynamic,1> > LhsMap;\n    typedef typename conj_expr_if<ConjLhs,LhsMap>::type ConjLhsType;\n    typedef Map<const Matrix<RhsScalar,Dynamic,1> > RhsMap;\n    typedef typename conj_expr_if<ConjRhs,RhsMap>::type ConjRhsType;\n\n    for (Index i=0; i<size; ++i)\n    {\n      Index s = !IsLower&&(HasUnitDiag||HasZeroDiag) ? 1 : 0;\n      Index r = IsLower ? i+1 : size-i;\n      if (EIGEN_IMPLIES(HasUnitDiag||HasZeroDiag, (--r)>0))\n\tres[i] += alpha * (ConjLhsType(LhsMap(lhs+s,r)).cwiseProduct(ConjRhsType(RhsMap(rhs+(IsLower ? 0 : s+i),r)))).sum();\n      if (HasUnitDiag)\n\tres[i] += alpha * cj(rhs[i]);\n      lhs += IsLower ? i+1 : size-i;\n    }\n  };\n};\n\n} // end namespace internal\n\n#endif // EIGEN_PACKED_TRIANGULAR_MATRIX_VECTOR_H\n"
  },
  {
    "path": "3rdparty/eigen3/blas/PackedTriangularSolverVector.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Chen-Pang He <jdh8@ms63.hinet.net>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_PACKED_TRIANGULAR_SOLVER_VECTOR_H\n#define EIGEN_PACKED_TRIANGULAR_SOLVER_VECTOR_H\n\nnamespace internal {\n\ntemplate<typename LhsScalar, typename RhsScalar, typename Index, int Side, int Mode, bool Conjugate, int StorageOrder>\nstruct packed_triangular_solve_vector;\n\n// forward and backward substitution, row-major, rhs is a vector\ntemplate<typename LhsScalar, typename RhsScalar, typename Index, int Mode, bool Conjugate>\nstruct packed_triangular_solve_vector<LhsScalar, RhsScalar, Index, OnTheLeft, Mode, Conjugate, RowMajor>\n{\n  enum {\n    IsLower = (Mode&Lower)==Lower\n  };\n  static void run(Index size, const LhsScalar* lhs, RhsScalar* rhs)\n  {\n    internal::conj_if<Conjugate> cj;\n    typedef Map<const Matrix<LhsScalar,Dynamic,1> > LhsMap;\n    typedef typename conj_expr_if<Conjugate,LhsMap>::type ConjLhsType;\n\n    lhs += IsLower ? 0 : (size*(size+1)>>1)-1;\n    for(Index pi=0; pi<size; ++pi)\n    {\n      Index i = IsLower ? pi : size-pi-1;\n      Index s = IsLower ? 0 : 1;\n      if (pi>0)\n\trhs[i] -= (ConjLhsType(LhsMap(lhs+s,pi))\n\t    .cwiseProduct(Map<const Matrix<RhsScalar,Dynamic,1> >(rhs+(IsLower ? 0 : i+1),pi))).sum();\n      if (!(Mode & UnitDiag))\n\trhs[i] /= cj(lhs[IsLower ? i : 0]);\n      IsLower ? lhs += pi+1 : lhs -= pi+2;\n    }\n  }\n};\n\n// forward and backward substitution, column-major, rhs is a vector\ntemplate<typename LhsScalar, typename RhsScalar, typename Index, int Mode, bool Conjugate>\nstruct packed_triangular_solve_vector<LhsScalar, RhsScalar, Index, OnTheLeft, Mode, Conjugate, ColMajor>\n{\n  enum {\n    IsLower = (Mode&Lower)==Lower\n  };\n  static void run(Index size, const LhsScalar* lhs, RhsScalar* rhs)\n  {\n    internal::conj_if<Conjugate> cj;\n    typedef Map<const Matrix<LhsScalar,Dynamic,1> > LhsMap;\n    typedef typename conj_expr_if<Conjugate,LhsMap>::type ConjLhsType;\n\n    lhs += IsLower ? 0 : size*(size-1)>>1;\n    for(Index pi=0; pi<size; ++pi)\n    {\n      Index i = IsLower ? pi : size-pi-1;\n      Index r = size - pi - 1;\n      if (!(Mode & UnitDiag))\n\trhs[i] /= cj(lhs[IsLower ? 0 : i]);\n      if (r>0)\n\tMap<Matrix<RhsScalar,Dynamic,1> >(rhs+(IsLower? i+1 : 0),r) -=\n\t    rhs[i] * ConjLhsType(LhsMap(lhs+(IsLower? 1 : 0),r));\n      IsLower ? lhs += size-pi : lhs -= r;\n    }\n  }\n};\n\ntemplate<typename LhsScalar, typename RhsScalar, typename Index, int Mode, bool Conjugate, int StorageOrder>\nstruct packed_triangular_solve_vector<LhsScalar, RhsScalar, Index, OnTheRight, Mode, Conjugate, StorageOrder>\n{\n  static void run(Index size, const LhsScalar* lhs, RhsScalar* rhs)\n  {\n    packed_triangular_solve_vector<LhsScalar,RhsScalar,Index,OnTheLeft,\n\t((Mode&Upper)==Upper ? Lower : Upper) | (Mode&UnitDiag),\n\tConjugate,StorageOrder==RowMajor?ColMajor:RowMajor\n      >::run(size, lhs, rhs);\n  }\n};\n\n} // end namespace internal\n\n#endif // EIGEN_PACKED_TRIANGULAR_SOLVER_VECTOR_H\n"
  },
  {
    "path": "3rdparty/eigen3/blas/README.txt",
    "content": "\nThis directory contains a BLAS library built on top of Eigen.\n\nThis module is not built by default. In order to compile it, you need to\ntype 'make blas' from within your build dir.\n\n"
  },
  {
    "path": "3rdparty/eigen3/blas/Rank2Update.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Chen-Pang He <jdh8@ms63.hinet.net>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_RANK2UPDATE_H\n#define EIGEN_RANK2UPDATE_H\n\nnamespace internal {\n\n/* Optimized selfadjoint matrix += alpha * uv' + conj(alpha)*vu'\n * This is the low-level version of SelfadjointRank2Update.h\n */\ntemplate<typename Scalar, typename Index, int UpLo>\nstruct rank2_update_selector\n{\n  static void run(Index size, Scalar* mat, Index stride, const Scalar* u, const Scalar* v, Scalar alpha)\n  {\n    typedef Map<const Matrix<Scalar,Dynamic,1> > OtherMap;\n    for (Index i=0; i<size; ++i)\n    {\n      Map<Matrix<Scalar,Dynamic,1> >(mat+stride*i+(UpLo==Lower ? i : 0), UpLo==Lower ? size-i : (i+1)) +=\n      numext::conj(alpha) * numext::conj(u[i]) * OtherMap(v+(UpLo==Lower ? i : 0), UpLo==Lower ? size-i : (i+1))\n                + alpha * numext::conj(v[i]) * OtherMap(u+(UpLo==Lower ? i : 0), UpLo==Lower ? size-i : (i+1));\n    }\n  }\n};\n\n/* Optimized selfadjoint matrix += alpha * uv' + conj(alpha)*vu'\n * The matrix is in packed form.\n */\ntemplate<typename Scalar, typename Index, int UpLo>\nstruct packed_rank2_update_selector\n{\n  static void run(Index size, Scalar* mat, const Scalar* u, const Scalar* v, Scalar alpha)\n  {\n    typedef Map<const Matrix<Scalar,Dynamic,1> > OtherMap;\n    Index offset = 0;\n    for (Index i=0; i<size; ++i)\n    {\n      Map<Matrix<Scalar,Dynamic,1> >(mat+offset, UpLo==Lower ? size-i : (i+1)) +=\n      numext::conj(alpha) * numext::conj(u[i]) * OtherMap(v+(UpLo==Lower ? i : 0), UpLo==Lower ? size-i : (i+1))\n                + alpha * numext::conj(v[i]) * OtherMap(u+(UpLo==Lower ? i : 0), UpLo==Lower ? size-i : (i+1));\n      //FIXME This should be handled outside.\n      mat[offset+(UpLo==Lower ? 0 : i)] = numext::real(mat[offset+(UpLo==Lower ? 0 : i)]);\n      offset += UpLo==Lower ? size-i : (i+1);\n    }\n  }\n};\n\n} // end namespace internal\n\n#endif // EIGEN_RANK2UPDATE_H\n"
  },
  {
    "path": "3rdparty/eigen3/blas/common.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009-2015 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_BLAS_COMMON_H\n#define EIGEN_BLAS_COMMON_H\n\n#ifdef __GNUC__\n# if __GNUC__<5\n// GCC < 5.0 does not like the global Scalar typedef\n// we just keep shadow-warnings disabled permanently\n#  define EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS\n# endif\n#endif\n\n#include \"../Eigen/Core\"\n#include \"../Eigen/Jacobi\"\n\n#include <complex>\n\n#ifndef SCALAR\n#error the token SCALAR must be defined to compile this file\n#endif\n\n#include \"../Eigen/src/misc/blas.h\"\n\n#define NOTR    0\n#define TR      1\n#define ADJ     2\n\n#define LEFT    0\n#define RIGHT   1\n\n#define UP      0\n#define LO      1\n\n#define NUNIT   0\n#define UNIT    1\n\n#define INVALID 0xff\n\n#define OP(X)   (   ((X)=='N' || (X)=='n') ? NOTR   \\\n                  : ((X)=='T' || (X)=='t') ? TR     \\\n                  : ((X)=='C' || (X)=='c') ? ADJ    \\\n                  : INVALID)\n\n#define SIDE(X) (   ((X)=='L' || (X)=='l') ? LEFT   \\\n                  : ((X)=='R' || (X)=='r') ? RIGHT  \\\n                  : INVALID)\n\n#define UPLO(X) (   ((X)=='U' || (X)=='u') ? UP     \\\n                  : ((X)=='L' || (X)=='l') ? LO     \\\n                  : INVALID)\n\n#define DIAG(X) (   ((X)=='N' || (X)=='n') ? NUNIT  \\\n                  : ((X)=='U' || (X)=='u') ? UNIT   \\\n                  : INVALID)\n\n\ninline bool check_op(const char* op)\n{\n  return OP(*op)!=0xff;\n}\n\ninline bool check_side(const char* side)\n{\n  return SIDE(*side)!=0xff;\n}\n\ninline bool check_uplo(const char* uplo)\n{\n  return UPLO(*uplo)!=0xff;\n}\n\n\nnamespace Eigen {\n#include \"BandTriangularSolver.h\"\n#include \"GeneralRank1Update.h\"\n#include \"PackedSelfadjointProduct.h\"\n#include \"PackedTriangularMatrixVector.h\"\n#include \"PackedTriangularSolverVector.h\"\n#include \"Rank2Update.h\"\n}\n\nusing namespace Eigen;\n\ntypedef SCALAR Scalar;\ntypedef NumTraits<Scalar>::Real RealScalar;\ntypedef std::complex<RealScalar> Complex;\n\nenum\n{\n  IsComplex = Eigen::NumTraits<SCALAR>::IsComplex,\n  Conj = IsComplex\n};\n\ntypedef Matrix<Scalar,Dynamic,Dynamic,ColMajor> PlainMatrixType;\ntypedef Map<Matrix<Scalar,Dynamic,Dynamic,ColMajor>, 0, OuterStride<> > MatrixType;\ntypedef Map<const Matrix<Scalar,Dynamic,Dynamic,ColMajor>, 0, OuterStride<> > ConstMatrixType;\ntypedef Map<Matrix<Scalar,Dynamic,1>, 0, InnerStride<Dynamic> > StridedVectorType;\ntypedef Map<Matrix<Scalar,Dynamic,1> > CompactVectorType;\n\ntemplate<typename T>\nMap<Matrix<T,Dynamic,Dynamic,ColMajor>, 0, OuterStride<> >\nmatrix(T* data, int rows, int cols, int stride)\n{\n  return Map<Matrix<T,Dynamic,Dynamic,ColMajor>, 0, OuterStride<> >(data, rows, cols, OuterStride<>(stride));\n}\n\ntemplate<typename T>\nMap<const Matrix<T,Dynamic,Dynamic,ColMajor>, 0, OuterStride<> >\nmatrix(const T* data, int rows, int cols, int stride)\n{\n  return Map<const Matrix<T,Dynamic,Dynamic,ColMajor>, 0, OuterStride<> >(data, rows, cols, OuterStride<>(stride));\n}\n\ntemplate<typename T>\nMap<Matrix<T,Dynamic,1>, 0, InnerStride<Dynamic> > make_vector(T* data, int size, int incr)\n{\n  return Map<Matrix<T,Dynamic,1>, 0, InnerStride<Dynamic> >(data, size, InnerStride<Dynamic>(incr));\n}\n\ntemplate<typename T>\nMap<const Matrix<T,Dynamic,1>, 0, InnerStride<Dynamic> > make_vector(const T* data, int size, int incr)\n{\n  return Map<const Matrix<T,Dynamic,1>, 0, InnerStride<Dynamic> >(data, size, InnerStride<Dynamic>(incr));\n}\n\ntemplate<typename T>\nMap<Matrix<T,Dynamic,1> > make_vector(T* data, int size)\n{\n  return Map<Matrix<T,Dynamic,1> >(data, size);\n}\n\ntemplate<typename T>\nMap<const Matrix<T,Dynamic,1> > make_vector(const T* data, int size)\n{\n  return Map<const Matrix<T,Dynamic,1> >(data, size);\n}\n\ntemplate<typename T>\nT* get_compact_vector(T* x, int n, int incx)\n{\n  if(incx==1)\n    return x;\n\n  typename Eigen::internal::remove_const<T>::type* ret = new Scalar[n];\n  if(incx<0) make_vector(ret,n) = make_vector(x,n,-incx).reverse();\n  else       make_vector(ret,n) = make_vector(x,n, incx);\n  return ret;\n}\n\ntemplate<typename T>\nT* copy_back(T* x_cpy, T* x, int n, int incx)\n{\n  if(x_cpy==x)\n    return 0;\n\n  if(incx<0) make_vector(x,n,-incx).reverse() = make_vector(x_cpy,n);\n  else       make_vector(x,n, incx)           = make_vector(x_cpy,n);\n  return x_cpy;\n}\n\n#ifndef EIGEN_BLAS_FUNC_SUFFIX\n#define EIGEN_BLAS_FUNC_SUFFIX _\n#endif\n\n#define EIGEN_BLAS_FUNC(X) EIGEN_CAT(SCALAR_SUFFIX, EIGEN_CAT(X, EIGEN_BLAS_FUNC_SUFFIX))\n\n#endif // EIGEN_BLAS_COMMON_H\n"
  },
  {
    "path": "3rdparty/eigen3/blas/complex_double.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define SCALAR        std::complex<double>\n#define SCALAR_SUFFIX z\n#define SCALAR_SUFFIX_UP \"Z\"\n#define REAL_SCALAR_SUFFIX d\n#define ISCOMPLEX     1\n\n#include \"level1_impl.h\"\n#include \"level1_cplx_impl.h\"\n#include \"level2_impl.h\"\n#include \"level2_cplx_impl.h\"\n#include \"level3_impl.h\"\n"
  },
  {
    "path": "3rdparty/eigen3/blas/complex_single.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define SCALAR        std::complex<float>\n#define SCALAR_SUFFIX c\n#define SCALAR_SUFFIX_UP \"C\"\n#define REAL_SCALAR_SUFFIX s\n#define ISCOMPLEX     1\n\n#include \"level1_impl.h\"\n#include \"level1_cplx_impl.h\"\n#include \"level2_impl.h\"\n#include \"level2_cplx_impl.h\"\n#include \"level3_impl.h\"\n"
  },
  {
    "path": "3rdparty/eigen3/blas/double.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2012 Chen-Pang He <jdh8@ms63.hinet.net>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define SCALAR        double\n#define SCALAR_SUFFIX d\n#define SCALAR_SUFFIX_UP \"D\"\n#define ISCOMPLEX     0\n\n#include \"level1_impl.h\"\n#include \"level1_real_impl.h\"\n#include \"level2_impl.h\"\n#include \"level2_real_impl.h\"\n#include \"level3_impl.h\"\n\ndouble EIGEN_BLAS_FUNC(sdot)(int* n, float* x, int* incx, float* y, int* incy)\n{\n  if(*n<=0) return 0;\n\n  if(*incx==1 && *incy==1)    return (make_vector(x,*n).cast<double>().cwiseProduct(make_vector(y,*n).cast<double>())).sum();\n  else if(*incx>0 && *incy>0) return (make_vector(x,*n,*incx).cast<double>().cwiseProduct(make_vector(y,*n,*incy).cast<double>())).sum();\n  else if(*incx<0 && *incy>0) return (make_vector(x,*n,-*incx).reverse().cast<double>().cwiseProduct(make_vector(y,*n,*incy).cast<double>())).sum();\n  else if(*incx>0 && *incy<0) return (make_vector(x,*n,*incx).cast<double>().cwiseProduct(make_vector(y,*n,-*incy).reverse().cast<double>())).sum();\n  else if(*incx<0 && *incy<0) return (make_vector(x,*n,-*incx).reverse().cast<double>().cwiseProduct(make_vector(y,*n,-*incy).reverse().cast<double>())).sum();\n  else return 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/blas/f2c/chbmv.c",
    "content": "/* chbmv.f -- translated by f2c (version 20100827).\n   You must link the resulting object file with libf2c:\n\ton Microsoft Windows system, link with libf2c.lib;\n\ton Linux or Unix systems, link with .../path/to/libf2c.a -lm\n\tor, if you install libf2c.a in a standard place, with -lf2c -lm\n\t-- in that order, at the end of the command line, as in\n\t\tcc *.o -lf2c -lm\n\tSource for libf2c is in /netlib/f2c/libf2c.zip, e.g.,\n\n\t\thttp://www.netlib.org/f2c/libf2c.zip\n*/\n\n#include \"datatypes.h\"\n\n/* Subroutine */ int chbmv_(char *uplo, integer *n, integer *k, complex *\n\talpha, complex *a, integer *lda, complex *x, integer *incx, complex *\n\tbeta, complex *y, integer *incy, ftnlen uplo_len)\n{\n    /* System generated locals */\n    integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5;\n    real r__1;\n    complex q__1, q__2, q__3, q__4;\n\n    /* Builtin functions */\n    void r_cnjg(complex *, complex *);\n\n    /* Local variables */\n    integer i__, j, l, ix, iy, jx, jy, kx, ky, info;\n    complex temp1, temp2;\n    extern logical lsame_(char *, char *, ftnlen, ftnlen);\n    integer kplus1;\n    extern /* Subroutine */ int xerbla_(char *, integer *, ftnlen);\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  CHBMV  performs the matrix-vector  operation */\n\n/*     y := alpha*A*x + beta*y, */\n\n/*  where alpha and beta are scalars, x and y are n element vectors and */\n/*  A is an n by n hermitian band matrix, with k super-diagonals. */\n\n/*  Arguments */\n/*  ========== */\n\n/*  UPLO   - CHARACTER*1. */\n/*           On entry, UPLO specifies whether the upper or lower */\n/*           triangular part of the band matrix A is being supplied as */\n/*           follows: */\n\n/*              UPLO = 'U' or 'u'   The upper triangular part of A is */\n/*                                  being supplied. */\n\n/*              UPLO = 'L' or 'l'   The lower triangular part of A is */\n/*                                  being supplied. */\n\n/*           Unchanged on exit. */\n\n/*  N      - INTEGER. */\n/*           On entry, N specifies the order of the matrix A. */\n/*           N must be at least zero. */\n/*           Unchanged on exit. */\n\n/*  K      - INTEGER. */\n/*           On entry, K specifies the number of super-diagonals of the */\n/*           matrix A. K must satisfy  0 .le. K. */\n/*           Unchanged on exit. */\n\n/*  ALPHA  - COMPLEX         . */\n/*           On entry, ALPHA specifies the scalar alpha. */\n/*           Unchanged on exit. */\n\n/*  A      - COMPLEX          array of DIMENSION ( LDA, n ). */\n/*           Before entry with UPLO = 'U' or 'u', the leading ( k + 1 ) */\n/*           by n part of the array A must contain the upper triangular */\n/*           band part of the hermitian matrix, supplied column by */\n/*           column, with the leading diagonal of the matrix in row */\n/*           ( k + 1 ) of the array, the first super-diagonal starting at */\n/*           position 2 in row k, and so on. The top left k by k triangle */\n/*           of the array A is not referenced. */\n/*           The following program segment will transfer the upper */\n/*           triangular part of a hermitian band matrix from conventional */\n/*           full matrix storage to band storage: */\n\n/*                 DO 20, J = 1, N */\n/*                    M = K + 1 - J */\n/*                    DO 10, I = MAX( 1, J - K ), J */\n/*                       A( M + I, J ) = matrix( I, J ) */\n/*              10    CONTINUE */\n/*              20 CONTINUE */\n\n/*           Before entry with UPLO = 'L' or 'l', the leading ( k + 1 ) */\n/*           by n part of the array A must contain the lower triangular */\n/*           band part of the hermitian matrix, supplied column by */\n/*           column, with the leading diagonal of the matrix in row 1 of */\n/*           the array, the first sub-diagonal starting at position 1 in */\n/*           row 2, and so on. The bottom right k by k triangle of the */\n/*           array A is not referenced. */\n/*           The following program segment will transfer the lower */\n/*           triangular part of a hermitian band matrix from conventional */\n/*           full matrix storage to band storage: */\n\n/*                 DO 20, J = 1, N */\n/*                    M = 1 - J */\n/*                    DO 10, I = J, MIN( N, J + K ) */\n/*                       A( M + I, J ) = matrix( I, J ) */\n/*              10    CONTINUE */\n/*              20 CONTINUE */\n\n/*           Note that the imaginary parts of the diagonal elements need */\n/*           not be set and are assumed to be zero. */\n/*           Unchanged on exit. */\n\n/*  LDA    - INTEGER. */\n/*           On entry, LDA specifies the first dimension of A as declared */\n/*           in the calling (sub) program. LDA must be at least */\n/*           ( k + 1 ). */\n/*           Unchanged on exit. */\n\n/*  X      - COMPLEX          array of DIMENSION at least */\n/*           ( 1 + ( n - 1 )*abs( INCX ) ). */\n/*           Before entry, the incremented array X must contain the */\n/*           vector x. */\n/*           Unchanged on exit. */\n\n/*  INCX   - INTEGER. */\n/*           On entry, INCX specifies the increment for the elements of */\n/*           X. INCX must not be zero. */\n/*           Unchanged on exit. */\n\n/*  BETA   - COMPLEX         . */\n/*           On entry, BETA specifies the scalar beta. */\n/*           Unchanged on exit. */\n\n/*  Y      - COMPLEX          array of DIMENSION at least */\n/*           ( 1 + ( n - 1 )*abs( INCY ) ). */\n/*           Before entry, the incremented array Y must contain the */\n/*           vector y. On exit, Y is overwritten by the updated vector y. */\n\n/*  INCY   - INTEGER. */\n/*           On entry, INCY specifies the increment for the elements of */\n/*           Y. INCY must not be zero. */\n/*           Unchanged on exit. */\n\n/*  Further Details */\n/*  =============== */\n\n/*  Level 2 Blas routine. */\n\n/*  -- Written on 22-October-1986. */\n/*     Jack Dongarra, Argonne National Lab. */\n/*     Jeremy Du Croz, Nag Central Office. */\n/*     Sven Hammarling, Nag Central Office. */\n/*     Richard Hanson, Sandia National Labs. */\n\n/*  ===================================================================== */\n\n/*     .. Parameters .. */\n/*     .. */\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. External Functions .. */\n/*     .. */\n/*     .. External Subroutines .. */\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n\n/*     Test the input parameters. */\n\n    /* Parameter adjustments */\n    a_dim1 = *lda;\n    a_offset = 1 + a_dim1;\n    a -= a_offset;\n    --x;\n    --y;\n\n    /* Function Body */\n    info = 0;\n    if (! lsame_(uplo, \"U\", (ftnlen)1, (ftnlen)1) && ! lsame_(uplo, \"L\", (\n\t    ftnlen)1, (ftnlen)1)) {\n\tinfo = 1;\n    } else if (*n < 0) {\n\tinfo = 2;\n    } else if (*k < 0) {\n\tinfo = 3;\n    } else if (*lda < *k + 1) {\n\tinfo = 6;\n    } else if (*incx == 0) {\n\tinfo = 8;\n    } else if (*incy == 0) {\n\tinfo = 11;\n    }\n    if (info != 0) {\n\txerbla_(\"CHBMV \", &info, (ftnlen)6);\n\treturn 0;\n    }\n\n/*     Quick return if possible. */\n\n    if (*n == 0 || (alpha->r == 0.f && alpha->i == 0.f && (beta->r == 1.f && \n                                                           beta->i == 0.f))) {\n\treturn 0;\n    }\n\n/*     Set up the start points in  X  and  Y. */\n\n    if (*incx > 0) {\n\tkx = 1;\n    } else {\n\tkx = 1 - (*n - 1) * *incx;\n    }\n    if (*incy > 0) {\n\tky = 1;\n    } else {\n\tky = 1 - (*n - 1) * *incy;\n    }\n\n/*     Start the operations. In this version the elements of the array A */\n/*     are accessed sequentially with one pass through A. */\n\n/*     First form  y := beta*y. */\n\n    if (beta->r != 1.f || beta->i != 0.f) {\n\tif (*incy == 1) {\n\t    if (beta->r == 0.f && beta->i == 0.f) {\n\t\ti__1 = *n;\n\t\tfor (i__ = 1; i__ <= i__1; ++i__) {\n\t\t    i__2 = i__;\n\t\t    y[i__2].r = 0.f, y[i__2].i = 0.f;\n/* L10: */\n\t\t}\n\t    } else {\n\t\ti__1 = *n;\n\t\tfor (i__ = 1; i__ <= i__1; ++i__) {\n\t\t    i__2 = i__;\n\t\t    i__3 = i__;\n\t\t    q__1.r = beta->r * y[i__3].r - beta->i * y[i__3].i, \n\t\t\t    q__1.i = beta->r * y[i__3].i + beta->i * y[i__3]\n\t\t\t    .r;\n\t\t    y[i__2].r = q__1.r, y[i__2].i = q__1.i;\n/* L20: */\n\t\t}\n\t    }\n\t} else {\n\t    iy = ky;\n\t    if (beta->r == 0.f && beta->i == 0.f) {\n\t\ti__1 = *n;\n\t\tfor (i__ = 1; i__ <= i__1; ++i__) {\n\t\t    i__2 = iy;\n\t\t    y[i__2].r = 0.f, y[i__2].i = 0.f;\n\t\t    iy += *incy;\n/* L30: */\n\t\t}\n\t    } else {\n\t\ti__1 = *n;\n\t\tfor (i__ = 1; i__ <= i__1; ++i__) {\n\t\t    i__2 = iy;\n\t\t    i__3 = iy;\n\t\t    q__1.r = beta->r * y[i__3].r - beta->i * y[i__3].i, \n\t\t\t    q__1.i = beta->r * y[i__3].i + beta->i * y[i__3]\n\t\t\t    .r;\n\t\t    y[i__2].r = q__1.r, y[i__2].i = q__1.i;\n\t\t    iy += *incy;\n/* L40: */\n\t\t}\n\t    }\n\t}\n    }\n    if (alpha->r == 0.f && alpha->i == 0.f) {\n\treturn 0;\n    }\n    if (lsame_(uplo, \"U\", (ftnlen)1, (ftnlen)1)) {\n\n/*        Form  y  when upper triangle of A is stored. */\n\n\tkplus1 = *k + 1;\n\tif (*incx == 1 && *incy == 1) {\n\t    i__1 = *n;\n\t    for (j = 1; j <= i__1; ++j) {\n\t\ti__2 = j;\n\t\tq__1.r = alpha->r * x[i__2].r - alpha->i * x[i__2].i, q__1.i =\n\t\t\t alpha->r * x[i__2].i + alpha->i * x[i__2].r;\n\t\ttemp1.r = q__1.r, temp1.i = q__1.i;\n\t\ttemp2.r = 0.f, temp2.i = 0.f;\n\t\tl = kplus1 - j;\n/* Computing MAX */\n\t\ti__2 = 1, i__3 = j - *k;\n\t\ti__4 = j - 1;\n\t\tfor (i__ = max(i__2,i__3); i__ <= i__4; ++i__) {\n\t\t    i__2 = i__;\n\t\t    i__3 = i__;\n\t\t    i__5 = l + i__ + j * a_dim1;\n\t\t    q__2.r = temp1.r * a[i__5].r - temp1.i * a[i__5].i, \n\t\t\t    q__2.i = temp1.r * a[i__5].i + temp1.i * a[i__5]\n\t\t\t    .r;\n\t\t    q__1.r = y[i__3].r + q__2.r, q__1.i = y[i__3].i + q__2.i;\n\t\t    y[i__2].r = q__1.r, y[i__2].i = q__1.i;\n\t\t    r_cnjg(&q__3, &a[l + i__ + j * a_dim1]);\n\t\t    i__2 = i__;\n\t\t    q__2.r = q__3.r * x[i__2].r - q__3.i * x[i__2].i, q__2.i =\n\t\t\t     q__3.r * x[i__2].i + q__3.i * x[i__2].r;\n\t\t    q__1.r = temp2.r + q__2.r, q__1.i = temp2.i + q__2.i;\n\t\t    temp2.r = q__1.r, temp2.i = q__1.i;\n/* L50: */\n\t\t}\n\t\ti__4 = j;\n\t\ti__2 = j;\n\t\ti__3 = kplus1 + j * a_dim1;\n\t\tr__1 = a[i__3].r;\n\t\tq__3.r = r__1 * temp1.r, q__3.i = r__1 * temp1.i;\n\t\tq__2.r = y[i__2].r + q__3.r, q__2.i = y[i__2].i + q__3.i;\n\t\tq__4.r = alpha->r * temp2.r - alpha->i * temp2.i, q__4.i = \n\t\t\talpha->r * temp2.i + alpha->i * temp2.r;\n\t\tq__1.r = q__2.r + q__4.r, q__1.i = q__2.i + q__4.i;\n\t\ty[i__4].r = q__1.r, y[i__4].i = q__1.i;\n/* L60: */\n\t    }\n\t} else {\n\t    jx = kx;\n\t    jy = ky;\n\t    i__1 = *n;\n\t    for (j = 1; j <= i__1; ++j) {\n\t\ti__4 = jx;\n\t\tq__1.r = alpha->r * x[i__4].r - alpha->i * x[i__4].i, q__1.i =\n\t\t\t alpha->r * x[i__4].i + alpha->i * x[i__4].r;\n\t\ttemp1.r = q__1.r, temp1.i = q__1.i;\n\t\ttemp2.r = 0.f, temp2.i = 0.f;\n\t\tix = kx;\n\t\tiy = ky;\n\t\tl = kplus1 - j;\n/* Computing MAX */\n\t\ti__4 = 1, i__2 = j - *k;\n\t\ti__3 = j - 1;\n\t\tfor (i__ = max(i__4,i__2); i__ <= i__3; ++i__) {\n\t\t    i__4 = iy;\n\t\t    i__2 = iy;\n\t\t    i__5 = l + i__ + j * a_dim1;\n\t\t    q__2.r = temp1.r * a[i__5].r - temp1.i * a[i__5].i, \n\t\t\t    q__2.i = temp1.r * a[i__5].i + temp1.i * a[i__5]\n\t\t\t    .r;\n\t\t    q__1.r = y[i__2].r + q__2.r, q__1.i = y[i__2].i + q__2.i;\n\t\t    y[i__4].r = q__1.r, y[i__4].i = q__1.i;\n\t\t    r_cnjg(&q__3, &a[l + i__ + j * a_dim1]);\n\t\t    i__4 = ix;\n\t\t    q__2.r = q__3.r * x[i__4].r - q__3.i * x[i__4].i, q__2.i =\n\t\t\t     q__3.r * x[i__4].i + q__3.i * x[i__4].r;\n\t\t    q__1.r = temp2.r + q__2.r, q__1.i = temp2.i + q__2.i;\n\t\t    temp2.r = q__1.r, temp2.i = q__1.i;\n\t\t    ix += *incx;\n\t\t    iy += *incy;\n/* L70: */\n\t\t}\n\t\ti__3 = jy;\n\t\ti__4 = jy;\n\t\ti__2 = kplus1 + j * a_dim1;\n\t\tr__1 = a[i__2].r;\n\t\tq__3.r = r__1 * temp1.r, q__3.i = r__1 * temp1.i;\n\t\tq__2.r = y[i__4].r + q__3.r, q__2.i = y[i__4].i + q__3.i;\n\t\tq__4.r = alpha->r * temp2.r - alpha->i * temp2.i, q__4.i = \n\t\t\talpha->r * temp2.i + alpha->i * temp2.r;\n\t\tq__1.r = q__2.r + q__4.r, q__1.i = q__2.i + q__4.i;\n\t\ty[i__3].r = q__1.r, y[i__3].i = q__1.i;\n\t\tjx += *incx;\n\t\tjy += *incy;\n\t\tif (j > *k) {\n\t\t    kx += *incx;\n\t\t    ky += *incy;\n\t\t}\n/* L80: */\n\t    }\n\t}\n    } else {\n\n/*        Form  y  when lower triangle of A is stored. */\n\n\tif (*incx == 1 && *incy == 1) {\n\t    i__1 = *n;\n\t    for (j = 1; j <= i__1; ++j) {\n\t\ti__3 = j;\n\t\tq__1.r = alpha->r * x[i__3].r - alpha->i * x[i__3].i, q__1.i =\n\t\t\t alpha->r * x[i__3].i + alpha->i * x[i__3].r;\n\t\ttemp1.r = q__1.r, temp1.i = q__1.i;\n\t\ttemp2.r = 0.f, temp2.i = 0.f;\n\t\ti__3 = j;\n\t\ti__4 = j;\n\t\ti__2 = j * a_dim1 + 1;\n\t\tr__1 = a[i__2].r;\n\t\tq__2.r = r__1 * temp1.r, q__2.i = r__1 * temp1.i;\n\t\tq__1.r = y[i__4].r + q__2.r, q__1.i = y[i__4].i + q__2.i;\n\t\ty[i__3].r = q__1.r, y[i__3].i = q__1.i;\n\t\tl = 1 - j;\n/* Computing MIN */\n\t\ti__4 = *n, i__2 = j + *k;\n\t\ti__3 = min(i__4,i__2);\n\t\tfor (i__ = j + 1; i__ <= i__3; ++i__) {\n\t\t    i__4 = i__;\n\t\t    i__2 = i__;\n\t\t    i__5 = l + i__ + j * a_dim1;\n\t\t    q__2.r = temp1.r * a[i__5].r - temp1.i * a[i__5].i, \n\t\t\t    q__2.i = temp1.r * a[i__5].i + temp1.i * a[i__5]\n\t\t\t    .r;\n\t\t    q__1.r = y[i__2].r + q__2.r, q__1.i = y[i__2].i + q__2.i;\n\t\t    y[i__4].r = q__1.r, y[i__4].i = q__1.i;\n\t\t    r_cnjg(&q__3, &a[l + i__ + j * a_dim1]);\n\t\t    i__4 = i__;\n\t\t    q__2.r = q__3.r * x[i__4].r - q__3.i * x[i__4].i, q__2.i =\n\t\t\t     q__3.r * x[i__4].i + q__3.i * x[i__4].r;\n\t\t    q__1.r = temp2.r + q__2.r, q__1.i = temp2.i + q__2.i;\n\t\t    temp2.r = q__1.r, temp2.i = q__1.i;\n/* L90: */\n\t\t}\n\t\ti__3 = j;\n\t\ti__4 = j;\n\t\tq__2.r = alpha->r * temp2.r - alpha->i * temp2.i, q__2.i = \n\t\t\talpha->r * temp2.i + alpha->i * temp2.r;\n\t\tq__1.r = y[i__4].r + q__2.r, q__1.i = y[i__4].i + q__2.i;\n\t\ty[i__3].r = q__1.r, y[i__3].i = q__1.i;\n/* L100: */\n\t    }\n\t} else {\n\t    jx = kx;\n\t    jy = ky;\n\t    i__1 = *n;\n\t    for (j = 1; j <= i__1; ++j) {\n\t\ti__3 = jx;\n\t\tq__1.r = alpha->r * x[i__3].r - alpha->i * x[i__3].i, q__1.i =\n\t\t\t alpha->r * x[i__3].i + alpha->i * x[i__3].r;\n\t\ttemp1.r = q__1.r, temp1.i = q__1.i;\n\t\ttemp2.r = 0.f, temp2.i = 0.f;\n\t\ti__3 = jy;\n\t\ti__4 = jy;\n\t\ti__2 = j * a_dim1 + 1;\n\t\tr__1 = a[i__2].r;\n\t\tq__2.r = r__1 * temp1.r, q__2.i = r__1 * temp1.i;\n\t\tq__1.r = y[i__4].r + q__2.r, q__1.i = y[i__4].i + q__2.i;\n\t\ty[i__3].r = q__1.r, y[i__3].i = q__1.i;\n\t\tl = 1 - j;\n\t\tix = jx;\n\t\tiy = jy;\n/* Computing MIN */\n\t\ti__4 = *n, i__2 = j + *k;\n\t\ti__3 = min(i__4,i__2);\n\t\tfor (i__ = j + 1; i__ <= i__3; ++i__) {\n\t\t    ix += *incx;\n\t\t    iy += *incy;\n\t\t    i__4 = iy;\n\t\t    i__2 = iy;\n\t\t    i__5 = l + i__ + j * a_dim1;\n\t\t    q__2.r = temp1.r * a[i__5].r - temp1.i * a[i__5].i, \n\t\t\t    q__2.i = temp1.r * a[i__5].i + temp1.i * a[i__5]\n\t\t\t    .r;\n\t\t    q__1.r = y[i__2].r + q__2.r, q__1.i = y[i__2].i + q__2.i;\n\t\t    y[i__4].r = q__1.r, y[i__4].i = q__1.i;\n\t\t    r_cnjg(&q__3, &a[l + i__ + j * a_dim1]);\n\t\t    i__4 = ix;\n\t\t    q__2.r = q__3.r * x[i__4].r - q__3.i * x[i__4].i, q__2.i =\n\t\t\t     q__3.r * x[i__4].i + q__3.i * x[i__4].r;\n\t\t    q__1.r = temp2.r + q__2.r, q__1.i = temp2.i + q__2.i;\n\t\t    temp2.r = q__1.r, temp2.i = q__1.i;\n/* L110: */\n\t\t}\n\t\ti__3 = jy;\n\t\ti__4 = jy;\n\t\tq__2.r = alpha->r * temp2.r - alpha->i * temp2.i, q__2.i = \n\t\t\talpha->r * temp2.i + alpha->i * temp2.r;\n\t\tq__1.r = y[i__4].r + q__2.r, q__1.i = y[i__4].i + q__2.i;\n\t\ty[i__3].r = q__1.r, y[i__3].i = q__1.i;\n\t\tjx += *incx;\n\t\tjy += *incy;\n/* L120: */\n\t    }\n\t}\n    }\n\n    return 0;\n\n/*     End of CHBMV . */\n\n} /* chbmv_ */\n\n"
  },
  {
    "path": "3rdparty/eigen3/blas/f2c/chpmv.c",
    "content": "/* chpmv.f -- translated by f2c (version 20100827).\n   You must link the resulting object file with libf2c:\n\ton Microsoft Windows system, link with libf2c.lib;\n\ton Linux or Unix systems, link with .../path/to/libf2c.a -lm\n\tor, if you install libf2c.a in a standard place, with -lf2c -lm\n\t-- in that order, at the end of the command line, as in\n\t\tcc *.o -lf2c -lm\n\tSource for libf2c is in /netlib/f2c/libf2c.zip, e.g.,\n\n\t\thttp://www.netlib.org/f2c/libf2c.zip\n*/\n\n#include \"datatypes.h\"\n\n/* Subroutine */ int chpmv_(char *uplo, integer *n, complex *alpha, complex *\n\tap, complex *x, integer *incx, complex *beta, complex *y, integer *\n\tincy, ftnlen uplo_len)\n{\n    /* System generated locals */\n    integer i__1, i__2, i__3, i__4, i__5;\n    real r__1;\n    complex q__1, q__2, q__3, q__4;\n\n    /* Builtin functions */\n    void r_cnjg(complex *, complex *);\n\n    /* Local variables */\n    integer i__, j, k, kk, ix, iy, jx, jy, kx, ky, info;\n    complex temp1, temp2;\n    extern logical lsame_(char *, char *, ftnlen, ftnlen);\n    extern /* Subroutine */ int xerbla_(char *, integer *, ftnlen);\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  CHPMV  performs the matrix-vector operation */\n\n/*     y := alpha*A*x + beta*y, */\n\n/*  where alpha and beta are scalars, x and y are n element vectors and */\n/*  A is an n by n hermitian matrix, supplied in packed form. */\n\n/*  Arguments */\n/*  ========== */\n\n/*  UPLO   - CHARACTER*1. */\n/*           On entry, UPLO specifies whether the upper or lower */\n/*           triangular part of the matrix A is supplied in the packed */\n/*           array AP as follows: */\n\n/*              UPLO = 'U' or 'u'   The upper triangular part of A is */\n/*                                  supplied in AP. */\n\n/*              UPLO = 'L' or 'l'   The lower triangular part of A is */\n/*                                  supplied in AP. */\n\n/*           Unchanged on exit. */\n\n/*  N      - INTEGER. */\n/*           On entry, N specifies the order of the matrix A. */\n/*           N must be at least zero. */\n/*           Unchanged on exit. */\n\n/*  ALPHA  - COMPLEX         . */\n/*           On entry, ALPHA specifies the scalar alpha. */\n/*           Unchanged on exit. */\n\n/*  AP     - COMPLEX          array of DIMENSION at least */\n/*           ( ( n*( n + 1 ) )/2 ). */\n/*           Before entry with UPLO = 'U' or 'u', the array AP must */\n/*           contain the upper triangular part of the hermitian matrix */\n/*           packed sequentially, column by column, so that AP( 1 ) */\n/*           contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 ) */\n/*           and a( 2, 2 ) respectively, and so on. */\n/*           Before entry with UPLO = 'L' or 'l', the array AP must */\n/*           contain the lower triangular part of the hermitian matrix */\n/*           packed sequentially, column by column, so that AP( 1 ) */\n/*           contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 ) */\n/*           and a( 3, 1 ) respectively, and so on. */\n/*           Note that the imaginary parts of the diagonal elements need */\n/*           not be set and are assumed to be zero. */\n/*           Unchanged on exit. */\n\n/*  X      - COMPLEX          array of dimension at least */\n/*           ( 1 + ( n - 1 )*abs( INCX ) ). */\n/*           Before entry, the incremented array X must contain the n */\n/*           element vector x. */\n/*           Unchanged on exit. */\n\n/*  INCX   - INTEGER. */\n/*           On entry, INCX specifies the increment for the elements of */\n/*           X. INCX must not be zero. */\n/*           Unchanged on exit. */\n\n/*  BETA   - COMPLEX         . */\n/*           On entry, BETA specifies the scalar beta. When BETA is */\n/*           supplied as zero then Y need not be set on input. */\n/*           Unchanged on exit. */\n\n/*  Y      - COMPLEX          array of dimension at least */\n/*           ( 1 + ( n - 1 )*abs( INCY ) ). */\n/*           Before entry, the incremented array Y must contain the n */\n/*           element vector y. On exit, Y is overwritten by the updated */\n/*           vector y. */\n\n/*  INCY   - INTEGER. */\n/*           On entry, INCY specifies the increment for the elements of */\n/*           Y. INCY must not be zero. */\n/*           Unchanged on exit. */\n\n/*  Further Details */\n/*  =============== */\n\n/*  Level 2 Blas routine. */\n\n/*  -- Written on 22-October-1986. */\n/*     Jack Dongarra, Argonne National Lab. */\n/*     Jeremy Du Croz, Nag Central Office. */\n/*     Sven Hammarling, Nag Central Office. */\n/*     Richard Hanson, Sandia National Labs. */\n\n/*  ===================================================================== */\n\n/*     .. Parameters .. */\n/*     .. */\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. External Functions .. */\n/*     .. */\n/*     .. External Subroutines .. */\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n\n/*     Test the input parameters. */\n\n    /* Parameter adjustments */\n    --y;\n    --x;\n    --ap;\n\n    /* Function Body */\n    info = 0;\n    if (! lsame_(uplo, \"U\", (ftnlen)1, (ftnlen)1) && ! lsame_(uplo, \"L\", (\n\t    ftnlen)1, (ftnlen)1)) {\n\tinfo = 1;\n    } else if (*n < 0) {\n\tinfo = 2;\n    } else if (*incx == 0) {\n\tinfo = 6;\n    } else if (*incy == 0) {\n\tinfo = 9;\n    }\n    if (info != 0) {\n\txerbla_(\"CHPMV \", &info, (ftnlen)6);\n\treturn 0;\n    }\n\n/*     Quick return if possible. */\n\n    if (*n == 0 || (alpha->r == 0.f && alpha->i == 0.f && (beta->r == 1.f && \n                                                           beta->i == 0.f))) {\n\treturn 0;\n    }\n\n/*     Set up the start points in  X  and  Y. */\n\n    if (*incx > 0) {\n\tkx = 1;\n    } else {\n\tkx = 1 - (*n - 1) * *incx;\n    }\n    if (*incy > 0) {\n\tky = 1;\n    } else {\n\tky = 1 - (*n - 1) * *incy;\n    }\n\n/*     Start the operations. In this version the elements of the array AP */\n/*     are accessed sequentially with one pass through AP. */\n\n/*     First form  y := beta*y. */\n\n    if (beta->r != 1.f || beta->i != 0.f) {\n\tif (*incy == 1) {\n\t    if (beta->r == 0.f && beta->i == 0.f) {\n\t\ti__1 = *n;\n\t\tfor (i__ = 1; i__ <= i__1; ++i__) {\n\t\t    i__2 = i__;\n\t\t    y[i__2].r = 0.f, y[i__2].i = 0.f;\n/* L10: */\n\t\t}\n\t    } else {\n\t\ti__1 = *n;\n\t\tfor (i__ = 1; i__ <= i__1; ++i__) {\n\t\t    i__2 = i__;\n\t\t    i__3 = i__;\n\t\t    q__1.r = beta->r * y[i__3].r - beta->i * y[i__3].i, \n\t\t\t    q__1.i = beta->r * y[i__3].i + beta->i * y[i__3]\n\t\t\t    .r;\n\t\t    y[i__2].r = q__1.r, y[i__2].i = q__1.i;\n/* L20: */\n\t\t}\n\t    }\n\t} else {\n\t    iy = ky;\n\t    if (beta->r == 0.f && beta->i == 0.f) {\n\t\ti__1 = *n;\n\t\tfor (i__ = 1; i__ <= i__1; ++i__) {\n\t\t    i__2 = iy;\n\t\t    y[i__2].r = 0.f, y[i__2].i = 0.f;\n\t\t    iy += *incy;\n/* L30: */\n\t\t}\n\t    } else {\n\t\ti__1 = *n;\n\t\tfor (i__ = 1; i__ <= i__1; ++i__) {\n\t\t    i__2 = iy;\n\t\t    i__3 = iy;\n\t\t    q__1.r = beta->r * y[i__3].r - beta->i * y[i__3].i, \n\t\t\t    q__1.i = beta->r * y[i__3].i + beta->i * y[i__3]\n\t\t\t    .r;\n\t\t    y[i__2].r = q__1.r, y[i__2].i = q__1.i;\n\t\t    iy += *incy;\n/* L40: */\n\t\t}\n\t    }\n\t}\n    }\n    if (alpha->r == 0.f && alpha->i == 0.f) {\n\treturn 0;\n    }\n    kk = 1;\n    if (lsame_(uplo, \"U\", (ftnlen)1, (ftnlen)1)) {\n\n/*        Form  y  when AP contains the upper triangle. */\n\n\tif (*incx == 1 && *incy == 1) {\n\t    i__1 = *n;\n\t    for (j = 1; j <= i__1; ++j) {\n\t\ti__2 = j;\n\t\tq__1.r = alpha->r * x[i__2].r - alpha->i * x[i__2].i, q__1.i =\n\t\t\t alpha->r * x[i__2].i + alpha->i * x[i__2].r;\n\t\ttemp1.r = q__1.r, temp1.i = q__1.i;\n\t\ttemp2.r = 0.f, temp2.i = 0.f;\n\t\tk = kk;\n\t\ti__2 = j - 1;\n\t\tfor (i__ = 1; i__ <= i__2; ++i__) {\n\t\t    i__3 = i__;\n\t\t    i__4 = i__;\n\t\t    i__5 = k;\n\t\t    q__2.r = temp1.r * ap[i__5].r - temp1.i * ap[i__5].i, \n\t\t\t    q__2.i = temp1.r * ap[i__5].i + temp1.i * ap[i__5]\n\t\t\t    .r;\n\t\t    q__1.r = y[i__4].r + q__2.r, q__1.i = y[i__4].i + q__2.i;\n\t\t    y[i__3].r = q__1.r, y[i__3].i = q__1.i;\n\t\t    r_cnjg(&q__3, &ap[k]);\n\t\t    i__3 = i__;\n\t\t    q__2.r = q__3.r * x[i__3].r - q__3.i * x[i__3].i, q__2.i =\n\t\t\t     q__3.r * x[i__3].i + q__3.i * x[i__3].r;\n\t\t    q__1.r = temp2.r + q__2.r, q__1.i = temp2.i + q__2.i;\n\t\t    temp2.r = q__1.r, temp2.i = q__1.i;\n\t\t    ++k;\n/* L50: */\n\t\t}\n\t\ti__2 = j;\n\t\ti__3 = j;\n\t\ti__4 = kk + j - 1;\n\t\tr__1 = ap[i__4].r;\n\t\tq__3.r = r__1 * temp1.r, q__3.i = r__1 * temp1.i;\n\t\tq__2.r = y[i__3].r + q__3.r, q__2.i = y[i__3].i + q__3.i;\n\t\tq__4.r = alpha->r * temp2.r - alpha->i * temp2.i, q__4.i = \n\t\t\talpha->r * temp2.i + alpha->i * temp2.r;\n\t\tq__1.r = q__2.r + q__4.r, q__1.i = q__2.i + q__4.i;\n\t\ty[i__2].r = q__1.r, y[i__2].i = q__1.i;\n\t\tkk += j;\n/* L60: */\n\t    }\n\t} else {\n\t    jx = kx;\n\t    jy = ky;\n\t    i__1 = *n;\n\t    for (j = 1; j <= i__1; ++j) {\n\t\ti__2 = jx;\n\t\tq__1.r = alpha->r * x[i__2].r - alpha->i * x[i__2].i, q__1.i =\n\t\t\t alpha->r * x[i__2].i + alpha->i * x[i__2].r;\n\t\ttemp1.r = q__1.r, temp1.i = q__1.i;\n\t\ttemp2.r = 0.f, temp2.i = 0.f;\n\t\tix = kx;\n\t\tiy = ky;\n\t\ti__2 = kk + j - 2;\n\t\tfor (k = kk; k <= i__2; ++k) {\n\t\t    i__3 = iy;\n\t\t    i__4 = iy;\n\t\t    i__5 = k;\n\t\t    q__2.r = temp1.r * ap[i__5].r - temp1.i * ap[i__5].i, \n\t\t\t    q__2.i = temp1.r * ap[i__5].i + temp1.i * ap[i__5]\n\t\t\t    .r;\n\t\t    q__1.r = y[i__4].r + q__2.r, q__1.i = y[i__4].i + q__2.i;\n\t\t    y[i__3].r = q__1.r, y[i__3].i = q__1.i;\n\t\t    r_cnjg(&q__3, &ap[k]);\n\t\t    i__3 = ix;\n\t\t    q__2.r = q__3.r * x[i__3].r - q__3.i * x[i__3].i, q__2.i =\n\t\t\t     q__3.r * x[i__3].i + q__3.i * x[i__3].r;\n\t\t    q__1.r = temp2.r + q__2.r, q__1.i = temp2.i + q__2.i;\n\t\t    temp2.r = q__1.r, temp2.i = q__1.i;\n\t\t    ix += *incx;\n\t\t    iy += *incy;\n/* L70: */\n\t\t}\n\t\ti__2 = jy;\n\t\ti__3 = jy;\n\t\ti__4 = kk + j - 1;\n\t\tr__1 = ap[i__4].r;\n\t\tq__3.r = r__1 * temp1.r, q__3.i = r__1 * temp1.i;\n\t\tq__2.r = y[i__3].r + q__3.r, q__2.i = y[i__3].i + q__3.i;\n\t\tq__4.r = alpha->r * temp2.r - alpha->i * temp2.i, q__4.i = \n\t\t\talpha->r * temp2.i + alpha->i * temp2.r;\n\t\tq__1.r = q__2.r + q__4.r, q__1.i = q__2.i + q__4.i;\n\t\ty[i__2].r = q__1.r, y[i__2].i = q__1.i;\n\t\tjx += *incx;\n\t\tjy += *incy;\n\t\tkk += j;\n/* L80: */\n\t    }\n\t}\n    } else {\n\n/*        Form  y  when AP contains the lower triangle. */\n\n\tif (*incx == 1 && *incy == 1) {\n\t    i__1 = *n;\n\t    for (j = 1; j <= i__1; ++j) {\n\t\ti__2 = j;\n\t\tq__1.r = alpha->r * x[i__2].r - alpha->i * x[i__2].i, q__1.i =\n\t\t\t alpha->r * x[i__2].i + alpha->i * x[i__2].r;\n\t\ttemp1.r = q__1.r, temp1.i = q__1.i;\n\t\ttemp2.r = 0.f, temp2.i = 0.f;\n\t\ti__2 = j;\n\t\ti__3 = j;\n\t\ti__4 = kk;\n\t\tr__1 = ap[i__4].r;\n\t\tq__2.r = r__1 * temp1.r, q__2.i = r__1 * temp1.i;\n\t\tq__1.r = y[i__3].r + q__2.r, q__1.i = y[i__3].i + q__2.i;\n\t\ty[i__2].r = q__1.r, y[i__2].i = q__1.i;\n\t\tk = kk + 1;\n\t\ti__2 = *n;\n\t\tfor (i__ = j + 1; i__ <= i__2; ++i__) {\n\t\t    i__3 = i__;\n\t\t    i__4 = i__;\n\t\t    i__5 = k;\n\t\t    q__2.r = temp1.r * ap[i__5].r - temp1.i * ap[i__5].i, \n\t\t\t    q__2.i = temp1.r * ap[i__5].i + temp1.i * ap[i__5]\n\t\t\t    .r;\n\t\t    q__1.r = y[i__4].r + q__2.r, q__1.i = y[i__4].i + q__2.i;\n\t\t    y[i__3].r = q__1.r, y[i__3].i = q__1.i;\n\t\t    r_cnjg(&q__3, &ap[k]);\n\t\t    i__3 = i__;\n\t\t    q__2.r = q__3.r * x[i__3].r - q__3.i * x[i__3].i, q__2.i =\n\t\t\t     q__3.r * x[i__3].i + q__3.i * x[i__3].r;\n\t\t    q__1.r = temp2.r + q__2.r, q__1.i = temp2.i + q__2.i;\n\t\t    temp2.r = q__1.r, temp2.i = q__1.i;\n\t\t    ++k;\n/* L90: */\n\t\t}\n\t\ti__2 = j;\n\t\ti__3 = j;\n\t\tq__2.r = alpha->r * temp2.r - alpha->i * temp2.i, q__2.i = \n\t\t\talpha->r * temp2.i + alpha->i * temp2.r;\n\t\tq__1.r = y[i__3].r + q__2.r, q__1.i = y[i__3].i + q__2.i;\n\t\ty[i__2].r = q__1.r, y[i__2].i = q__1.i;\n\t\tkk += *n - j + 1;\n/* L100: */\n\t    }\n\t} else {\n\t    jx = kx;\n\t    jy = ky;\n\t    i__1 = *n;\n\t    for (j = 1; j <= i__1; ++j) {\n\t\ti__2 = jx;\n\t\tq__1.r = alpha->r * x[i__2].r - alpha->i * x[i__2].i, q__1.i =\n\t\t\t alpha->r * x[i__2].i + alpha->i * x[i__2].r;\n\t\ttemp1.r = q__1.r, temp1.i = q__1.i;\n\t\ttemp2.r = 0.f, temp2.i = 0.f;\n\t\ti__2 = jy;\n\t\ti__3 = jy;\n\t\ti__4 = kk;\n\t\tr__1 = ap[i__4].r;\n\t\tq__2.r = r__1 * temp1.r, q__2.i = r__1 * temp1.i;\n\t\tq__1.r = y[i__3].r + q__2.r, q__1.i = y[i__3].i + q__2.i;\n\t\ty[i__2].r = q__1.r, y[i__2].i = q__1.i;\n\t\tix = jx;\n\t\tiy = jy;\n\t\ti__2 = kk + *n - j;\n\t\tfor (k = kk + 1; k <= i__2; ++k) {\n\t\t    ix += *incx;\n\t\t    iy += *incy;\n\t\t    i__3 = iy;\n\t\t    i__4 = iy;\n\t\t    i__5 = k;\n\t\t    q__2.r = temp1.r * ap[i__5].r - temp1.i * ap[i__5].i, \n\t\t\t    q__2.i = temp1.r * ap[i__5].i + temp1.i * ap[i__5]\n\t\t\t    .r;\n\t\t    q__1.r = y[i__4].r + q__2.r, q__1.i = y[i__4].i + q__2.i;\n\t\t    y[i__3].r = q__1.r, y[i__3].i = q__1.i;\n\t\t    r_cnjg(&q__3, &ap[k]);\n\t\t    i__3 = ix;\n\t\t    q__2.r = q__3.r * x[i__3].r - q__3.i * x[i__3].i, q__2.i =\n\t\t\t     q__3.r * x[i__3].i + q__3.i * x[i__3].r;\n\t\t    q__1.r = temp2.r + q__2.r, q__1.i = temp2.i + q__2.i;\n\t\t    temp2.r = q__1.r, temp2.i = q__1.i;\n/* L110: */\n\t\t}\n\t\ti__2 = jy;\n\t\ti__3 = jy;\n\t\tq__2.r = alpha->r * temp2.r - alpha->i * temp2.i, q__2.i = \n\t\t\talpha->r * temp2.i + alpha->i * temp2.r;\n\t\tq__1.r = y[i__3].r + q__2.r, q__1.i = y[i__3].i + q__2.i;\n\t\ty[i__2].r = q__1.r, y[i__2].i = q__1.i;\n\t\tjx += *incx;\n\t\tjy += *incy;\n\t\tkk += *n - j + 1;\n/* L120: */\n\t    }\n\t}\n    }\n\n    return 0;\n\n/*     End of CHPMV . */\n\n} /* chpmv_ */\n\n"
  },
  {
    "path": "3rdparty/eigen3/blas/f2c/complexdots.c",
    "content": "/* This file has been modified to use the standard gfortran calling\n   convention, rather than the f2c calling convention.\n\n   It does not require -ff2c when compiled with gfortran.\n*/\n\n/* complexdots.f -- translated by f2c (version 20100827).\n   You must link the resulting object file with libf2c:\n\ton Microsoft Windows system, link with libf2c.lib;\n\ton Linux or Unix systems, link with .../path/to/libf2c.a -lm\n\tor, if you install libf2c.a in a standard place, with -lf2c -lm\n\t-- in that order, at the end of the command line, as in\n\t\tcc *.o -lf2c -lm\n\tSource for libf2c is in /netlib/f2c/libf2c.zip, e.g.,\n\n\t\thttp://www.netlib.org/f2c/libf2c.zip\n*/\n\n#include \"datatypes.h\"\n\ncomplex cdotc_(integer *n, complex *cx, integer \n\t*incx, complex *cy, integer *incy)\n{\n    complex res;\n    extern /* Subroutine */ int cdotcw_(integer *, complex *, integer *, \n\t    complex *, integer *, complex *);\n\n    /* Parameter adjustments */\n    --cy;\n    --cx;\n\n    /* Function Body */\n    cdotcw_(n, &cx[1], incx, &cy[1], incy, &res);\n    return res;\n} /* cdotc_ */\n\ncomplex cdotu_(integer *n, complex *cx, integer \n\t*incx, complex *cy, integer *incy)\n{\n    complex res;\n    extern /* Subroutine */ int cdotuw_(integer *, complex *, integer *, \n\t    complex *, integer *, complex *);\n\n    /* Parameter adjustments */\n    --cy;\n    --cx;\n\n    /* Function Body */\n    cdotuw_(n, &cx[1], incx, &cy[1], incy, &res);\n    return res;\n} /* cdotu_ */\n\ndoublecomplex zdotc_(integer *n, doublecomplex *cx, integer *incx, \n                     doublecomplex *cy, integer *incy)\n{\n    doublecomplex res;\n    extern /* Subroutine */ int zdotcw_(integer *, doublecomplex *, integer *,\n\t     doublecomplex *, integer *, doublecomplex *);\n\n    /* Parameter adjustments */\n    --cy;\n    --cx;\n\n    /* Function Body */\n    zdotcw_(n, &cx[1], incx, &cy[1], incy, &res);\n    return res;\n} /* zdotc_ */\n\ndoublecomplex zdotu_(integer *n, doublecomplex *cx, integer *incx, \n                     doublecomplex *cy, integer *incy)\n{\n    doublecomplex res;\n    extern /* Subroutine */ int zdotuw_(integer *, doublecomplex *, integer *,\n\t     doublecomplex *, integer *, doublecomplex *);\n\n    /* Parameter adjustments */\n    --cy;\n    --cx;\n\n    /* Function Body */\n    zdotuw_(n, &cx[1], incx, &cy[1], incy, &res);\n    return res;\n} /* zdotu_ */\n\n"
  },
  {
    "path": "3rdparty/eigen3/blas/f2c/ctbmv.c",
    "content": "/* ctbmv.f -- translated by f2c (version 20100827).\n   You must link the resulting object file with libf2c:\n\ton Microsoft Windows system, link with libf2c.lib;\n\ton Linux or Unix systems, link with .../path/to/libf2c.a -lm\n\tor, if you install libf2c.a in a standard place, with -lf2c -lm\n\t-- in that order, at the end of the command line, as in\n\t\tcc *.o -lf2c -lm\n\tSource for libf2c is in /netlib/f2c/libf2c.zip, e.g.,\n\n\t\thttp://www.netlib.org/f2c/libf2c.zip\n*/\n\n#include \"datatypes.h\"\n\n/* Subroutine */ int ctbmv_(char *uplo, char *trans, char *diag, integer *n, \n\tinteger *k, complex *a, integer *lda, complex *x, integer *incx, \n\tftnlen uplo_len, ftnlen trans_len, ftnlen diag_len)\n{\n    /* System generated locals */\n    integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5;\n    complex q__1, q__2, q__3;\n\n    /* Builtin functions */\n    void r_cnjg(complex *, complex *);\n\n    /* Local variables */\n    integer i__, j, l, ix, jx, kx, info;\n    complex temp;\n    extern logical lsame_(char *, char *, ftnlen, ftnlen);\n    integer kplus1;\n    extern /* Subroutine */ int xerbla_(char *, integer *, ftnlen);\n    logical noconj, nounit;\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  CTBMV  performs one of the matrix-vector operations */\n\n/*     x := A*x,   or   x := A'*x,   or   x := conjg( A' )*x, */\n\n/*  where x is an n element vector and  A is an n by n unit, or non-unit, */\n/*  upper or lower triangular band matrix, with ( k + 1 ) diagonals. */\n\n/*  Arguments */\n/*  ========== */\n\n/*  UPLO   - CHARACTER*1. */\n/*           On entry, UPLO specifies whether the matrix is an upper or */\n/*           lower triangular matrix as follows: */\n\n/*              UPLO = 'U' or 'u'   A is an upper triangular matrix. */\n\n/*              UPLO = 'L' or 'l'   A is a lower triangular matrix. */\n\n/*           Unchanged on exit. */\n\n/*  TRANS  - CHARACTER*1. */\n/*           On entry, TRANS specifies the operation to be performed as */\n/*           follows: */\n\n/*              TRANS = 'N' or 'n'   x := A*x. */\n\n/*              TRANS = 'T' or 't'   x := A'*x. */\n\n/*              TRANS = 'C' or 'c'   x := conjg( A' )*x. */\n\n/*           Unchanged on exit. */\n\n/*  DIAG   - CHARACTER*1. */\n/*           On entry, DIAG specifies whether or not A is unit */\n/*           triangular as follows: */\n\n/*              DIAG = 'U' or 'u'   A is assumed to be unit triangular. */\n\n/*              DIAG = 'N' or 'n'   A is not assumed to be unit */\n/*                                  triangular. */\n\n/*           Unchanged on exit. */\n\n/*  N      - INTEGER. */\n/*           On entry, N specifies the order of the matrix A. */\n/*           N must be at least zero. */\n/*           Unchanged on exit. */\n\n/*  K      - INTEGER. */\n/*           On entry with UPLO = 'U' or 'u', K specifies the number of */\n/*           super-diagonals of the matrix A. */\n/*           On entry with UPLO = 'L' or 'l', K specifies the number of */\n/*           sub-diagonals of the matrix A. */\n/*           K must satisfy  0 .le. K. */\n/*           Unchanged on exit. */\n\n/*  A      - COMPLEX          array of DIMENSION ( LDA, n ). */\n/*           Before entry with UPLO = 'U' or 'u', the leading ( k + 1 ) */\n/*           by n part of the array A must contain the upper triangular */\n/*           band part of the matrix of coefficients, supplied column by */\n/*           column, with the leading diagonal of the matrix in row */\n/*           ( k + 1 ) of the array, the first super-diagonal starting at */\n/*           position 2 in row k, and so on. The top left k by k triangle */\n/*           of the array A is not referenced. */\n/*           The following program segment will transfer an upper */\n/*           triangular band matrix from conventional full matrix storage */\n/*           to band storage: */\n\n/*                 DO 20, J = 1, N */\n/*                    M = K + 1 - J */\n/*                    DO 10, I = MAX( 1, J - K ), J */\n/*                       A( M + I, J ) = matrix( I, J ) */\n/*              10    CONTINUE */\n/*              20 CONTINUE */\n\n/*           Before entry with UPLO = 'L' or 'l', the leading ( k + 1 ) */\n/*           by n part of the array A must contain the lower triangular */\n/*           band part of the matrix of coefficients, supplied column by */\n/*           column, with the leading diagonal of the matrix in row 1 of */\n/*           the array, the first sub-diagonal starting at position 1 in */\n/*           row 2, and so on. The bottom right k by k triangle of the */\n/*           array A is not referenced. */\n/*           The following program segment will transfer a lower */\n/*           triangular band matrix from conventional full matrix storage */\n/*           to band storage: */\n\n/*                 DO 20, J = 1, N */\n/*                    M = 1 - J */\n/*                    DO 10, I = J, MIN( N, J + K ) */\n/*                       A( M + I, J ) = matrix( I, J ) */\n/*              10    CONTINUE */\n/*              20 CONTINUE */\n\n/*           Note that when DIAG = 'U' or 'u' the elements of the array A */\n/*           corresponding to the diagonal elements of the matrix are not */\n/*           referenced, but are assumed to be unity. */\n/*           Unchanged on exit. */\n\n/*  LDA    - INTEGER. */\n/*           On entry, LDA specifies the first dimension of A as declared */\n/*           in the calling (sub) program. LDA must be at least */\n/*           ( k + 1 ). */\n/*           Unchanged on exit. */\n\n/*  X      - COMPLEX          array of dimension at least */\n/*           ( 1 + ( n - 1 )*abs( INCX ) ). */\n/*           Before entry, the incremented array X must contain the n */\n/*           element vector x. On exit, X is overwritten with the */\n/*           transformed vector x. */\n\n/*  INCX   - INTEGER. */\n/*           On entry, INCX specifies the increment for the elements of */\n/*           X. INCX must not be zero. */\n/*           Unchanged on exit. */\n\n/*  Further Details */\n/*  =============== */\n\n/*  Level 2 Blas routine. */\n\n/*  -- Written on 22-October-1986. */\n/*     Jack Dongarra, Argonne National Lab. */\n/*     Jeremy Du Croz, Nag Central Office. */\n/*     Sven Hammarling, Nag Central Office. */\n/*     Richard Hanson, Sandia National Labs. */\n\n/*  ===================================================================== */\n\n/*     .. Parameters .. */\n/*     .. */\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. External Functions .. */\n/*     .. */\n/*     .. External Subroutines .. */\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n\n/*     Test the input parameters. */\n\n    /* Parameter adjustments */\n    a_dim1 = *lda;\n    a_offset = 1 + a_dim1;\n    a -= a_offset;\n    --x;\n\n    /* Function Body */\n    info = 0;\n    if (! lsame_(uplo, \"U\", (ftnlen)1, (ftnlen)1) && ! lsame_(uplo, \"L\", (\n\t    ftnlen)1, (ftnlen)1)) {\n\tinfo = 1;\n    } else if (! lsame_(trans, \"N\", (ftnlen)1, (ftnlen)1) && ! lsame_(trans, \n\t    \"T\", (ftnlen)1, (ftnlen)1) && ! lsame_(trans, \"C\", (ftnlen)1, (\n\t    ftnlen)1)) {\n\tinfo = 2;\n    } else if (! lsame_(diag, \"U\", (ftnlen)1, (ftnlen)1) && ! lsame_(diag, \n\t    \"N\", (ftnlen)1, (ftnlen)1)) {\n\tinfo = 3;\n    } else if (*n < 0) {\n\tinfo = 4;\n    } else if (*k < 0) {\n\tinfo = 5;\n    } else if (*lda < *k + 1) {\n\tinfo = 7;\n    } else if (*incx == 0) {\n\tinfo = 9;\n    }\n    if (info != 0) {\n\txerbla_(\"CTBMV \", &info, (ftnlen)6);\n\treturn 0;\n    }\n\n/*     Quick return if possible. */\n\n    if (*n == 0) {\n\treturn 0;\n    }\n\n    noconj = lsame_(trans, \"T\", (ftnlen)1, (ftnlen)1);\n    nounit = lsame_(diag, \"N\", (ftnlen)1, (ftnlen)1);\n\n/*     Set up the start point in X if the increment is not unity. This */\n/*     will be  ( N - 1 )*INCX   too small for descending loops. */\n\n    if (*incx <= 0) {\n\tkx = 1 - (*n - 1) * *incx;\n    } else if (*incx != 1) {\n\tkx = 1;\n    }\n\n/*     Start the operations. In this version the elements of A are */\n/*     accessed sequentially with one pass through A. */\n\n    if (lsame_(trans, \"N\", (ftnlen)1, (ftnlen)1)) {\n\n/*         Form  x := A*x. */\n\n\tif (lsame_(uplo, \"U\", (ftnlen)1, (ftnlen)1)) {\n\t    kplus1 = *k + 1;\n\t    if (*incx == 1) {\n\t\ti__1 = *n;\n\t\tfor (j = 1; j <= i__1; ++j) {\n\t\t    i__2 = j;\n\t\t    if (x[i__2].r != 0.f || x[i__2].i != 0.f) {\n\t\t\ti__2 = j;\n\t\t\ttemp.r = x[i__2].r, temp.i = x[i__2].i;\n\t\t\tl = kplus1 - j;\n/* Computing MAX */\n\t\t\ti__2 = 1, i__3 = j - *k;\n\t\t\ti__4 = j - 1;\n\t\t\tfor (i__ = max(i__2,i__3); i__ <= i__4; ++i__) {\n\t\t\t    i__2 = i__;\n\t\t\t    i__3 = i__;\n\t\t\t    i__5 = l + i__ + j * a_dim1;\n\t\t\t    q__2.r = temp.r * a[i__5].r - temp.i * a[i__5].i, \n\t\t\t\t    q__2.i = temp.r * a[i__5].i + temp.i * a[\n\t\t\t\t    i__5].r;\n\t\t\t    q__1.r = x[i__3].r + q__2.r, q__1.i = x[i__3].i + \n\t\t\t\t    q__2.i;\n\t\t\t    x[i__2].r = q__1.r, x[i__2].i = q__1.i;\n/* L10: */\n\t\t\t}\n\t\t\tif (nounit) {\n\t\t\t    i__4 = j;\n\t\t\t    i__2 = j;\n\t\t\t    i__3 = kplus1 + j * a_dim1;\n\t\t\t    q__1.r = x[i__2].r * a[i__3].r - x[i__2].i * a[\n\t\t\t\t    i__3].i, q__1.i = x[i__2].r * a[i__3].i + \n\t\t\t\t    x[i__2].i * a[i__3].r;\n\t\t\t    x[i__4].r = q__1.r, x[i__4].i = q__1.i;\n\t\t\t}\n\t\t    }\n/* L20: */\n\t\t}\n\t    } else {\n\t\tjx = kx;\n\t\ti__1 = *n;\n\t\tfor (j = 1; j <= i__1; ++j) {\n\t\t    i__4 = jx;\n\t\t    if (x[i__4].r != 0.f || x[i__4].i != 0.f) {\n\t\t\ti__4 = jx;\n\t\t\ttemp.r = x[i__4].r, temp.i = x[i__4].i;\n\t\t\tix = kx;\n\t\t\tl = kplus1 - j;\n/* Computing MAX */\n\t\t\ti__4 = 1, i__2 = j - *k;\n\t\t\ti__3 = j - 1;\n\t\t\tfor (i__ = max(i__4,i__2); i__ <= i__3; ++i__) {\n\t\t\t    i__4 = ix;\n\t\t\t    i__2 = ix;\n\t\t\t    i__5 = l + i__ + j * a_dim1;\n\t\t\t    q__2.r = temp.r * a[i__5].r - temp.i * a[i__5].i, \n\t\t\t\t    q__2.i = temp.r * a[i__5].i + temp.i * a[\n\t\t\t\t    i__5].r;\n\t\t\t    q__1.r = x[i__2].r + q__2.r, q__1.i = x[i__2].i + \n\t\t\t\t    q__2.i;\n\t\t\t    x[i__4].r = q__1.r, x[i__4].i = q__1.i;\n\t\t\t    ix += *incx;\n/* L30: */\n\t\t\t}\n\t\t\tif (nounit) {\n\t\t\t    i__3 = jx;\n\t\t\t    i__4 = jx;\n\t\t\t    i__2 = kplus1 + j * a_dim1;\n\t\t\t    q__1.r = x[i__4].r * a[i__2].r - x[i__4].i * a[\n\t\t\t\t    i__2].i, q__1.i = x[i__4].r * a[i__2].i + \n\t\t\t\t    x[i__4].i * a[i__2].r;\n\t\t\t    x[i__3].r = q__1.r, x[i__3].i = q__1.i;\n\t\t\t}\n\t\t    }\n\t\t    jx += *incx;\n\t\t    if (j > *k) {\n\t\t\tkx += *incx;\n\t\t    }\n/* L40: */\n\t\t}\n\t    }\n\t} else {\n\t    if (*incx == 1) {\n\t\tfor (j = *n; j >= 1; --j) {\n\t\t    i__1 = j;\n\t\t    if (x[i__1].r != 0.f || x[i__1].i != 0.f) {\n\t\t\ti__1 = j;\n\t\t\ttemp.r = x[i__1].r, temp.i = x[i__1].i;\n\t\t\tl = 1 - j;\n/* Computing MIN */\n\t\t\ti__1 = *n, i__3 = j + *k;\n\t\t\ti__4 = j + 1;\n\t\t\tfor (i__ = min(i__1,i__3); i__ >= i__4; --i__) {\n\t\t\t    i__1 = i__;\n\t\t\t    i__3 = i__;\n\t\t\t    i__2 = l + i__ + j * a_dim1;\n\t\t\t    q__2.r = temp.r * a[i__2].r - temp.i * a[i__2].i, \n\t\t\t\t    q__2.i = temp.r * a[i__2].i + temp.i * a[\n\t\t\t\t    i__2].r;\n\t\t\t    q__1.r = x[i__3].r + q__2.r, q__1.i = x[i__3].i + \n\t\t\t\t    q__2.i;\n\t\t\t    x[i__1].r = q__1.r, x[i__1].i = q__1.i;\n/* L50: */\n\t\t\t}\n\t\t\tif (nounit) {\n\t\t\t    i__4 = j;\n\t\t\t    i__1 = j;\n\t\t\t    i__3 = j * a_dim1 + 1;\n\t\t\t    q__1.r = x[i__1].r * a[i__3].r - x[i__1].i * a[\n\t\t\t\t    i__3].i, q__1.i = x[i__1].r * a[i__3].i + \n\t\t\t\t    x[i__1].i * a[i__3].r;\n\t\t\t    x[i__4].r = q__1.r, x[i__4].i = q__1.i;\n\t\t\t}\n\t\t    }\n/* L60: */\n\t\t}\n\t    } else {\n\t\tkx += (*n - 1) * *incx;\n\t\tjx = kx;\n\t\tfor (j = *n; j >= 1; --j) {\n\t\t    i__4 = jx;\n\t\t    if (x[i__4].r != 0.f || x[i__4].i != 0.f) {\n\t\t\ti__4 = jx;\n\t\t\ttemp.r = x[i__4].r, temp.i = x[i__4].i;\n\t\t\tix = kx;\n\t\t\tl = 1 - j;\n/* Computing MIN */\n\t\t\ti__4 = *n, i__1 = j + *k;\n\t\t\ti__3 = j + 1;\n\t\t\tfor (i__ = min(i__4,i__1); i__ >= i__3; --i__) {\n\t\t\t    i__4 = ix;\n\t\t\t    i__1 = ix;\n\t\t\t    i__2 = l + i__ + j * a_dim1;\n\t\t\t    q__2.r = temp.r * a[i__2].r - temp.i * a[i__2].i, \n\t\t\t\t    q__2.i = temp.r * a[i__2].i + temp.i * a[\n\t\t\t\t    i__2].r;\n\t\t\t    q__1.r = x[i__1].r + q__2.r, q__1.i = x[i__1].i + \n\t\t\t\t    q__2.i;\n\t\t\t    x[i__4].r = q__1.r, x[i__4].i = q__1.i;\n\t\t\t    ix -= *incx;\n/* L70: */\n\t\t\t}\n\t\t\tif (nounit) {\n\t\t\t    i__3 = jx;\n\t\t\t    i__4 = jx;\n\t\t\t    i__1 = j * a_dim1 + 1;\n\t\t\t    q__1.r = x[i__4].r * a[i__1].r - x[i__4].i * a[\n\t\t\t\t    i__1].i, q__1.i = x[i__4].r * a[i__1].i + \n\t\t\t\t    x[i__4].i * a[i__1].r;\n\t\t\t    x[i__3].r = q__1.r, x[i__3].i = q__1.i;\n\t\t\t}\n\t\t    }\n\t\t    jx -= *incx;\n\t\t    if (*n - j >= *k) {\n\t\t\tkx -= *incx;\n\t\t    }\n/* L80: */\n\t\t}\n\t    }\n\t}\n    } else {\n\n/*        Form  x := A'*x  or  x := conjg( A' )*x. */\n\n\tif (lsame_(uplo, \"U\", (ftnlen)1, (ftnlen)1)) {\n\t    kplus1 = *k + 1;\n\t    if (*incx == 1) {\n\t\tfor (j = *n; j >= 1; --j) {\n\t\t    i__3 = j;\n\t\t    temp.r = x[i__3].r, temp.i = x[i__3].i;\n\t\t    l = kplus1 - j;\n\t\t    if (noconj) {\n\t\t\tif (nounit) {\n\t\t\t    i__3 = kplus1 + j * a_dim1;\n\t\t\t    q__1.r = temp.r * a[i__3].r - temp.i * a[i__3].i, \n\t\t\t\t    q__1.i = temp.r * a[i__3].i + temp.i * a[\n\t\t\t\t    i__3].r;\n\t\t\t    temp.r = q__1.r, temp.i = q__1.i;\n\t\t\t}\n/* Computing MAX */\n\t\t\ti__4 = 1, i__1 = j - *k;\n\t\t\ti__3 = max(i__4,i__1);\n\t\t\tfor (i__ = j - 1; i__ >= i__3; --i__) {\n\t\t\t    i__4 = l + i__ + j * a_dim1;\n\t\t\t    i__1 = i__;\n\t\t\t    q__2.r = a[i__4].r * x[i__1].r - a[i__4].i * x[\n\t\t\t\t    i__1].i, q__2.i = a[i__4].r * x[i__1].i + \n\t\t\t\t    a[i__4].i * x[i__1].r;\n\t\t\t    q__1.r = temp.r + q__2.r, q__1.i = temp.i + \n\t\t\t\t    q__2.i;\n\t\t\t    temp.r = q__1.r, temp.i = q__1.i;\n/* L90: */\n\t\t\t}\n\t\t    } else {\n\t\t\tif (nounit) {\n\t\t\t    r_cnjg(&q__2, &a[kplus1 + j * a_dim1]);\n\t\t\t    q__1.r = temp.r * q__2.r - temp.i * q__2.i, \n\t\t\t\t    q__1.i = temp.r * q__2.i + temp.i * \n\t\t\t\t    q__2.r;\n\t\t\t    temp.r = q__1.r, temp.i = q__1.i;\n\t\t\t}\n/* Computing MAX */\n\t\t\ti__4 = 1, i__1 = j - *k;\n\t\t\ti__3 = max(i__4,i__1);\n\t\t\tfor (i__ = j - 1; i__ >= i__3; --i__) {\n\t\t\t    r_cnjg(&q__3, &a[l + i__ + j * a_dim1]);\n\t\t\t    i__4 = i__;\n\t\t\t    q__2.r = q__3.r * x[i__4].r - q__3.i * x[i__4].i, \n\t\t\t\t    q__2.i = q__3.r * x[i__4].i + q__3.i * x[\n\t\t\t\t    i__4].r;\n\t\t\t    q__1.r = temp.r + q__2.r, q__1.i = temp.i + \n\t\t\t\t    q__2.i;\n\t\t\t    temp.r = q__1.r, temp.i = q__1.i;\n/* L100: */\n\t\t\t}\n\t\t    }\n\t\t    i__3 = j;\n\t\t    x[i__3].r = temp.r, x[i__3].i = temp.i;\n/* L110: */\n\t\t}\n\t    } else {\n\t\tkx += (*n - 1) * *incx;\n\t\tjx = kx;\n\t\tfor (j = *n; j >= 1; --j) {\n\t\t    i__3 = jx;\n\t\t    temp.r = x[i__3].r, temp.i = x[i__3].i;\n\t\t    kx -= *incx;\n\t\t    ix = kx;\n\t\t    l = kplus1 - j;\n\t\t    if (noconj) {\n\t\t\tif (nounit) {\n\t\t\t    i__3 = kplus1 + j * a_dim1;\n\t\t\t    q__1.r = temp.r * a[i__3].r - temp.i * a[i__3].i, \n\t\t\t\t    q__1.i = temp.r * a[i__3].i + temp.i * a[\n\t\t\t\t    i__3].r;\n\t\t\t    temp.r = q__1.r, temp.i = q__1.i;\n\t\t\t}\n/* Computing MAX */\n\t\t\ti__4 = 1, i__1 = j - *k;\n\t\t\ti__3 = max(i__4,i__1);\n\t\t\tfor (i__ = j - 1; i__ >= i__3; --i__) {\n\t\t\t    i__4 = l + i__ + j * a_dim1;\n\t\t\t    i__1 = ix;\n\t\t\t    q__2.r = a[i__4].r * x[i__1].r - a[i__4].i * x[\n\t\t\t\t    i__1].i, q__2.i = a[i__4].r * x[i__1].i + \n\t\t\t\t    a[i__4].i * x[i__1].r;\n\t\t\t    q__1.r = temp.r + q__2.r, q__1.i = temp.i + \n\t\t\t\t    q__2.i;\n\t\t\t    temp.r = q__1.r, temp.i = q__1.i;\n\t\t\t    ix -= *incx;\n/* L120: */\n\t\t\t}\n\t\t    } else {\n\t\t\tif (nounit) {\n\t\t\t    r_cnjg(&q__2, &a[kplus1 + j * a_dim1]);\n\t\t\t    q__1.r = temp.r * q__2.r - temp.i * q__2.i, \n\t\t\t\t    q__1.i = temp.r * q__2.i + temp.i * \n\t\t\t\t    q__2.r;\n\t\t\t    temp.r = q__1.r, temp.i = q__1.i;\n\t\t\t}\n/* Computing MAX */\n\t\t\ti__4 = 1, i__1 = j - *k;\n\t\t\ti__3 = max(i__4,i__1);\n\t\t\tfor (i__ = j - 1; i__ >= i__3; --i__) {\n\t\t\t    r_cnjg(&q__3, &a[l + i__ + j * a_dim1]);\n\t\t\t    i__4 = ix;\n\t\t\t    q__2.r = q__3.r * x[i__4].r - q__3.i * x[i__4].i, \n\t\t\t\t    q__2.i = q__3.r * x[i__4].i + q__3.i * x[\n\t\t\t\t    i__4].r;\n\t\t\t    q__1.r = temp.r + q__2.r, q__1.i = temp.i + \n\t\t\t\t    q__2.i;\n\t\t\t    temp.r = q__1.r, temp.i = q__1.i;\n\t\t\t    ix -= *incx;\n/* L130: */\n\t\t\t}\n\t\t    }\n\t\t    i__3 = jx;\n\t\t    x[i__3].r = temp.r, x[i__3].i = temp.i;\n\t\t    jx -= *incx;\n/* L140: */\n\t\t}\n\t    }\n\t} else {\n\t    if (*incx == 1) {\n\t\ti__3 = *n;\n\t\tfor (j = 1; j <= i__3; ++j) {\n\t\t    i__4 = j;\n\t\t    temp.r = x[i__4].r, temp.i = x[i__4].i;\n\t\t    l = 1 - j;\n\t\t    if (noconj) {\n\t\t\tif (nounit) {\n\t\t\t    i__4 = j * a_dim1 + 1;\n\t\t\t    q__1.r = temp.r * a[i__4].r - temp.i * a[i__4].i, \n\t\t\t\t    q__1.i = temp.r * a[i__4].i + temp.i * a[\n\t\t\t\t    i__4].r;\n\t\t\t    temp.r = q__1.r, temp.i = q__1.i;\n\t\t\t}\n/* Computing MIN */\n\t\t\ti__1 = *n, i__2 = j + *k;\n\t\t\ti__4 = min(i__1,i__2);\n\t\t\tfor (i__ = j + 1; i__ <= i__4; ++i__) {\n\t\t\t    i__1 = l + i__ + j * a_dim1;\n\t\t\t    i__2 = i__;\n\t\t\t    q__2.r = a[i__1].r * x[i__2].r - a[i__1].i * x[\n\t\t\t\t    i__2].i, q__2.i = a[i__1].r * x[i__2].i + \n\t\t\t\t    a[i__1].i * x[i__2].r;\n\t\t\t    q__1.r = temp.r + q__2.r, q__1.i = temp.i + \n\t\t\t\t    q__2.i;\n\t\t\t    temp.r = q__1.r, temp.i = q__1.i;\n/* L150: */\n\t\t\t}\n\t\t    } else {\n\t\t\tif (nounit) {\n\t\t\t    r_cnjg(&q__2, &a[j * a_dim1 + 1]);\n\t\t\t    q__1.r = temp.r * q__2.r - temp.i * q__2.i, \n\t\t\t\t    q__1.i = temp.r * q__2.i + temp.i * \n\t\t\t\t    q__2.r;\n\t\t\t    temp.r = q__1.r, temp.i = q__1.i;\n\t\t\t}\n/* Computing MIN */\n\t\t\ti__1 = *n, i__2 = j + *k;\n\t\t\ti__4 = min(i__1,i__2);\n\t\t\tfor (i__ = j + 1; i__ <= i__4; ++i__) {\n\t\t\t    r_cnjg(&q__3, &a[l + i__ + j * a_dim1]);\n\t\t\t    i__1 = i__;\n\t\t\t    q__2.r = q__3.r * x[i__1].r - q__3.i * x[i__1].i, \n\t\t\t\t    q__2.i = q__3.r * x[i__1].i + q__3.i * x[\n\t\t\t\t    i__1].r;\n\t\t\t    q__1.r = temp.r + q__2.r, q__1.i = temp.i + \n\t\t\t\t    q__2.i;\n\t\t\t    temp.r = q__1.r, temp.i = q__1.i;\n/* L160: */\n\t\t\t}\n\t\t    }\n\t\t    i__4 = j;\n\t\t    x[i__4].r = temp.r, x[i__4].i = temp.i;\n/* L170: */\n\t\t}\n\t    } else {\n\t\tjx = kx;\n\t\ti__3 = *n;\n\t\tfor (j = 1; j <= i__3; ++j) {\n\t\t    i__4 = jx;\n\t\t    temp.r = x[i__4].r, temp.i = x[i__4].i;\n\t\t    kx += *incx;\n\t\t    ix = kx;\n\t\t    l = 1 - j;\n\t\t    if (noconj) {\n\t\t\tif (nounit) {\n\t\t\t    i__4 = j * a_dim1 + 1;\n\t\t\t    q__1.r = temp.r * a[i__4].r - temp.i * a[i__4].i, \n\t\t\t\t    q__1.i = temp.r * a[i__4].i + temp.i * a[\n\t\t\t\t    i__4].r;\n\t\t\t    temp.r = q__1.r, temp.i = q__1.i;\n\t\t\t}\n/* Computing MIN */\n\t\t\ti__1 = *n, i__2 = j + *k;\n\t\t\ti__4 = min(i__1,i__2);\n\t\t\tfor (i__ = j + 1; i__ <= i__4; ++i__) {\n\t\t\t    i__1 = l + i__ + j * a_dim1;\n\t\t\t    i__2 = ix;\n\t\t\t    q__2.r = a[i__1].r * x[i__2].r - a[i__1].i * x[\n\t\t\t\t    i__2].i, q__2.i = a[i__1].r * x[i__2].i + \n\t\t\t\t    a[i__1].i * x[i__2].r;\n\t\t\t    q__1.r = temp.r + q__2.r, q__1.i = temp.i + \n\t\t\t\t    q__2.i;\n\t\t\t    temp.r = q__1.r, temp.i = q__1.i;\n\t\t\t    ix += *incx;\n/* L180: */\n\t\t\t}\n\t\t    } else {\n\t\t\tif (nounit) {\n\t\t\t    r_cnjg(&q__2, &a[j * a_dim1 + 1]);\n\t\t\t    q__1.r = temp.r * q__2.r - temp.i * q__2.i, \n\t\t\t\t    q__1.i = temp.r * q__2.i + temp.i * \n\t\t\t\t    q__2.r;\n\t\t\t    temp.r = q__1.r, temp.i = q__1.i;\n\t\t\t}\n/* Computing MIN */\n\t\t\ti__1 = *n, i__2 = j + *k;\n\t\t\ti__4 = min(i__1,i__2);\n\t\t\tfor (i__ = j + 1; i__ <= i__4; ++i__) {\n\t\t\t    r_cnjg(&q__3, &a[l + i__ + j * a_dim1]);\n\t\t\t    i__1 = ix;\n\t\t\t    q__2.r = q__3.r * x[i__1].r - q__3.i * x[i__1].i, \n\t\t\t\t    q__2.i = q__3.r * x[i__1].i + q__3.i * x[\n\t\t\t\t    i__1].r;\n\t\t\t    q__1.r = temp.r + q__2.r, q__1.i = temp.i + \n\t\t\t\t    q__2.i;\n\t\t\t    temp.r = q__1.r, temp.i = q__1.i;\n\t\t\t    ix += *incx;\n/* L190: */\n\t\t\t}\n\t\t    }\n\t\t    i__4 = jx;\n\t\t    x[i__4].r = temp.r, x[i__4].i = temp.i;\n\t\t    jx += *incx;\n/* L200: */\n\t\t}\n\t    }\n\t}\n    }\n\n    return 0;\n\n/*     End of CTBMV . */\n\n} /* ctbmv_ */\n\n"
  },
  {
    "path": "3rdparty/eigen3/blas/f2c/d_cnjg.c",
    "content": "#include \"datatypes.h\"    \n\nvoid d_cnjg(doublecomplex *r, doublecomplex *z) {\n    r->r = z->r;\n    r->i = -(z->i);\n}\n"
  },
  {
    "path": "3rdparty/eigen3/blas/f2c/datatypes.h",
    "content": "/* This contains a limited subset of the typedefs exposed by f2c\n   for use by the Eigen BLAS C-only implementation.\n*/\n\n#ifndef __EIGEN_DATATYPES_H__\n#define __EIGEN_DATATYPES_H__\n\ntypedef int integer;\ntypedef unsigned int uinteger;\ntypedef float real;\ntypedef double doublereal;\ntypedef struct { real r, i; } complex;\ntypedef struct { doublereal r, i; } doublecomplex;\ntypedef int ftnlen;\ntypedef int logical;\n\n#define abs(x) ((x) >= 0 ? (x) : -(x))\n#define dabs(x) (doublereal)abs(x)\n#define min(a,b) ((a) <= (b) ? (a) : (b))\n#define max(a,b) ((a) >= (b) ? (a) : (b))\n#define dmin(a,b) (doublereal)min(a,b)\n#define dmax(a,b) (doublereal)max(a,b)\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/blas/f2c/drotm.c",
    "content": "/* drotm.f -- translated by f2c (version 20100827).\n   You must link the resulting object file with libf2c:\n\ton Microsoft Windows system, link with libf2c.lib;\n\ton Linux or Unix systems, link with .../path/to/libf2c.a -lm\n\tor, if you install libf2c.a in a standard place, with -lf2c -lm\n\t-- in that order, at the end of the command line, as in\n\t\tcc *.o -lf2c -lm\n\tSource for libf2c is in /netlib/f2c/libf2c.zip, e.g.,\n\n\t\thttp://www.netlib.org/f2c/libf2c.zip\n*/\n\n#include \"datatypes.h\"\n\n/* Subroutine */ int drotm_(integer *n, doublereal *dx, integer *incx, \n\tdoublereal *dy, integer *incy, doublereal *dparam)\n{\n    /* Initialized data */\n\n    static doublereal zero = 0.;\n    static doublereal two = 2.;\n\n    /* System generated locals */\n    integer i__1, i__2;\n\n    /* Local variables */\n    integer i__;\n    doublereal w, z__;\n    integer kx, ky;\n    doublereal dh11, dh12, dh21, dh22, dflag;\n    integer nsteps;\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*     APPLY THE MODIFIED GIVENS TRANSFORMATION, H, TO THE 2 BY N MATRIX */\n\n/*     (DX**T) , WHERE **T INDICATES TRANSPOSE. THE ELEMENTS OF DX ARE IN */\n/*     (DY**T) */\n\n/*     DX(LX+I*INCX), I = 0 TO N-1, WHERE LX = 1 IF INCX .GE. 0, ELSE */\n/*     LX = (-INCX)*N, AND SIMILARLY FOR SY USING LY AND INCY. */\n/*     WITH DPARAM(1)=DFLAG, H HAS ONE OF THE FOLLOWING FORMS.. */\n\n/*     DFLAG=-1.D0     DFLAG=0.D0        DFLAG=1.D0     DFLAG=-2.D0 */\n\n/*       (DH11  DH12)    (1.D0  DH12)    (DH11  1.D0)    (1.D0  0.D0) */\n/*     H=(          )    (          )    (          )    (          ) */\n/*       (DH21  DH22),   (DH21  1.D0),   (-1.D0 DH22),   (0.D0  1.D0). */\n/*     SEE DROTMG FOR A DESCRIPTION OF DATA STORAGE IN DPARAM. */\n\n/*  Arguments */\n/*  ========= */\n\n/*  N      (input) INTEGER */\n/*         number of elements in input vector(s) */\n\n/*  DX     (input/output) DOUBLE PRECISION array, dimension N */\n/*         double precision vector with N elements */\n\n/*  INCX   (input) INTEGER */\n/*         storage spacing between elements of DX */\n\n/*  DY     (input/output) DOUBLE PRECISION array, dimension N */\n/*         double precision vector with N elements */\n\n/*  INCY   (input) INTEGER */\n/*         storage spacing between elements of DY */\n\n/*  DPARAM (input/output)  DOUBLE PRECISION array, dimension 5 */\n/*     DPARAM(1)=DFLAG */\n/*     DPARAM(2)=DH11 */\n/*     DPARAM(3)=DH21 */\n/*     DPARAM(4)=DH12 */\n/*     DPARAM(5)=DH22 */\n\n/*  ===================================================================== */\n\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. Data statements .. */\n    /* Parameter adjustments */\n    --dparam;\n    --dy;\n    --dx;\n\n    /* Function Body */\n/*     .. */\n\n    dflag = dparam[1];\n    if (*n <= 0 || dflag + two == zero) {\n\tgoto L140;\n    }\n    if (! (*incx == *incy && *incx > 0)) {\n\tgoto L70;\n    }\n\n    nsteps = *n * *incx;\n    if (dflag < 0.) {\n\tgoto L50;\n    } else if (dflag == 0) {\n\tgoto L10;\n    } else {\n\tgoto L30;\n    }\nL10:\n    dh12 = dparam[4];\n    dh21 = dparam[3];\n    i__1 = nsteps;\n    i__2 = *incx;\n    for (i__ = 1; i__2 < 0 ? i__ >= i__1 : i__ <= i__1; i__ += i__2) {\n\tw = dx[i__];\n\tz__ = dy[i__];\n\tdx[i__] = w + z__ * dh12;\n\tdy[i__] = w * dh21 + z__;\n/* L20: */\n    }\n    goto L140;\nL30:\n    dh11 = dparam[2];\n    dh22 = dparam[5];\n    i__2 = nsteps;\n    i__1 = *incx;\n    for (i__ = 1; i__1 < 0 ? i__ >= i__2 : i__ <= i__2; i__ += i__1) {\n\tw = dx[i__];\n\tz__ = dy[i__];\n\tdx[i__] = w * dh11 + z__;\n\tdy[i__] = -w + dh22 * z__;\n/* L40: */\n    }\n    goto L140;\nL50:\n    dh11 = dparam[2];\n    dh12 = dparam[4];\n    dh21 = dparam[3];\n    dh22 = dparam[5];\n    i__1 = nsteps;\n    i__2 = *incx;\n    for (i__ = 1; i__2 < 0 ? i__ >= i__1 : i__ <= i__1; i__ += i__2) {\n\tw = dx[i__];\n\tz__ = dy[i__];\n\tdx[i__] = w * dh11 + z__ * dh12;\n\tdy[i__] = w * dh21 + z__ * dh22;\n/* L60: */\n    }\n    goto L140;\nL70:\n    kx = 1;\n    ky = 1;\n    if (*incx < 0) {\n\tkx = (1 - *n) * *incx + 1;\n    }\n    if (*incy < 0) {\n\tky = (1 - *n) * *incy + 1;\n    }\n\n    if (dflag < 0.) {\n\tgoto L120;\n    } else if (dflag == 0) {\n\tgoto L80;\n    } else {\n\tgoto L100;\n    }\nL80:\n    dh12 = dparam[4];\n    dh21 = dparam[3];\n    i__2 = *n;\n    for (i__ = 1; i__ <= i__2; ++i__) {\n\tw = dx[kx];\n\tz__ = dy[ky];\n\tdx[kx] = w + z__ * dh12;\n\tdy[ky] = w * dh21 + z__;\n\tkx += *incx;\n\tky += *incy;\n/* L90: */\n    }\n    goto L140;\nL100:\n    dh11 = dparam[2];\n    dh22 = dparam[5];\n    i__2 = *n;\n    for (i__ = 1; i__ <= i__2; ++i__) {\n\tw = dx[kx];\n\tz__ = dy[ky];\n\tdx[kx] = w * dh11 + z__;\n\tdy[ky] = -w + dh22 * z__;\n\tkx += *incx;\n\tky += *incy;\n/* L110: */\n    }\n    goto L140;\nL120:\n    dh11 = dparam[2];\n    dh12 = dparam[4];\n    dh21 = dparam[3];\n    dh22 = dparam[5];\n    i__2 = *n;\n    for (i__ = 1; i__ <= i__2; ++i__) {\n\tw = dx[kx];\n\tz__ = dy[ky];\n\tdx[kx] = w * dh11 + z__ * dh12;\n\tdy[ky] = w * dh21 + z__ * dh22;\n\tkx += *incx;\n\tky += *incy;\n/* L130: */\n    }\nL140:\n    return 0;\n} /* drotm_ */\n\n"
  },
  {
    "path": "3rdparty/eigen3/blas/f2c/drotmg.c",
    "content": "/* drotmg.f -- translated by f2c (version 20100827).\n   You must link the resulting object file with libf2c:\n\ton Microsoft Windows system, link with libf2c.lib;\n\ton Linux or Unix systems, link with .../path/to/libf2c.a -lm\n\tor, if you install libf2c.a in a standard place, with -lf2c -lm\n\t-- in that order, at the end of the command line, as in\n\t\tcc *.o -lf2c -lm\n\tSource for libf2c is in /netlib/f2c/libf2c.zip, e.g.,\n\n\t\thttp://www.netlib.org/f2c/libf2c.zip\n*/\n\n#include \"datatypes.h\"\n\n/* Subroutine */ int drotmg_(doublereal *dd1, doublereal *dd2, doublereal *\n\tdx1, doublereal *dy1, doublereal *dparam)\n{\n    /* Initialized data */\n\n    static doublereal zero = 0.;\n    static doublereal one = 1.;\n    static doublereal two = 2.;\n    static doublereal gam = 4096.;\n    static doublereal gamsq = 16777216.;\n    static doublereal rgamsq = 5.9604645e-8;\n\n    /* Format strings */\n    static char fmt_120[] = \"\";\n    static char fmt_150[] = \"\";\n    static char fmt_180[] = \"\";\n    static char fmt_210[] = \"\";\n\n    /* System generated locals */\n    doublereal d__1;\n\n    /* Local variables */\n    doublereal du, dp1, dp2, dq1, dq2, dh11, dh12, dh21, dh22;\n    integer igo;\n    doublereal dflag, dtemp;\n\n    /* Assigned format variables */\n    static char *igo_fmt;\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*     CONSTRUCT THE MODIFIED GIVENS TRANSFORMATION MATRIX H WHICH ZEROS */\n/*     THE SECOND COMPONENT OF THE 2-VECTOR  (DSQRT(DD1)*DX1,DSQRT(DD2)* */\n/*     DY2)**T. */\n/*     WITH DPARAM(1)=DFLAG, H HAS ONE OF THE FOLLOWING FORMS.. */\n\n/*     DFLAG=-1.D0     DFLAG=0.D0        DFLAG=1.D0     DFLAG=-2.D0 */\n\n/*       (DH11  DH12)    (1.D0  DH12)    (DH11  1.D0)    (1.D0  0.D0) */\n/*     H=(          )    (          )    (          )    (          ) */\n/*       (DH21  DH22),   (DH21  1.D0),   (-1.D0 DH22),   (0.D0  1.D0). */\n/*     LOCATIONS 2-4 OF DPARAM CONTAIN DH11, DH21, DH12, AND DH22 */\n/*     RESPECTIVELY. (VALUES OF 1.D0, -1.D0, OR 0.D0 IMPLIED BY THE */\n/*     VALUE OF DPARAM(1) ARE NOT STORED IN DPARAM.) */\n\n/*     THE VALUES OF GAMSQ AND RGAMSQ SET IN THE DATA STATEMENT MAY BE */\n/*     INEXACT.  THIS IS OK AS THEY ARE ONLY USED FOR TESTING THE SIZE */\n/*     OF DD1 AND DD2.  ALL ACTUAL SCALING OF DATA IS DONE USING GAM. */\n\n\n/*  Arguments */\n/*  ========= */\n\n/*  DD1    (input/output) DOUBLE PRECISION */\n\n/*  DD2    (input/output) DOUBLE PRECISION */\n\n/*  DX1    (input/output) DOUBLE PRECISION */\n\n/*  DY1    (input) DOUBLE PRECISION */\n\n/*  DPARAM (input/output)  DOUBLE PRECISION array, dimension 5 */\n/*     DPARAM(1)=DFLAG */\n/*     DPARAM(2)=DH11 */\n/*     DPARAM(3)=DH21 */\n/*     DPARAM(4)=DH12 */\n/*     DPARAM(5)=DH22 */\n\n/*  ===================================================================== */\n\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n/*     .. Data statements .. */\n\n    /* Parameter adjustments */\n    --dparam;\n\n    /* Function Body */\n/*     .. */\n    if (! (*dd1 < zero)) {\n\tgoto L10;\n    }\n/*       GO ZERO-H-D-AND-DX1.. */\n    goto L60;\nL10:\n/*     CASE-DD1-NONNEGATIVE */\n    dp2 = *dd2 * *dy1;\n    if (! (dp2 == zero)) {\n\tgoto L20;\n    }\n    dflag = -two;\n    goto L260;\n/*     REGULAR-CASE.. */\nL20:\n    dp1 = *dd1 * *dx1;\n    dq2 = dp2 * *dy1;\n    dq1 = dp1 * *dx1;\n\n    if (! (abs(dq1) > abs(dq2))) {\n\tgoto L40;\n    }\n    dh21 = -(*dy1) / *dx1;\n    dh12 = dp2 / dp1;\n\n    du = one - dh12 * dh21;\n\n    if (! (du <= zero)) {\n\tgoto L30;\n    }\n/*         GO ZERO-H-D-AND-DX1.. */\n    goto L60;\nL30:\n    dflag = zero;\n    *dd1 /= du;\n    *dd2 /= du;\n    *dx1 *= du;\n/*         GO SCALE-CHECK.. */\n    goto L100;\nL40:\n    if (! (dq2 < zero)) {\n\tgoto L50;\n    }\n/*         GO ZERO-H-D-AND-DX1.. */\n    goto L60;\nL50:\n    dflag = one;\n    dh11 = dp1 / dp2;\n    dh22 = *dx1 / *dy1;\n    du = one + dh11 * dh22;\n    dtemp = *dd2 / du;\n    *dd2 = *dd1 / du;\n    *dd1 = dtemp;\n    *dx1 = *dy1 * du;\n/*         GO SCALE-CHECK */\n    goto L100;\n/*     PROCEDURE..ZERO-H-D-AND-DX1.. */\nL60:\n    dflag = -one;\n    dh11 = zero;\n    dh12 = zero;\n    dh21 = zero;\n    dh22 = zero;\n\n    *dd1 = zero;\n    *dd2 = zero;\n    *dx1 = zero;\n/*         RETURN.. */\n    goto L220;\n/*     PROCEDURE..FIX-H.. */\nL70:\n    if (! (dflag >= zero)) {\n\tgoto L90;\n    }\n\n    if (! (dflag == zero)) {\n\tgoto L80;\n    }\n    dh11 = one;\n    dh22 = one;\n    dflag = -one;\n    goto L90;\nL80:\n    dh21 = -one;\n    dh12 = one;\n    dflag = -one;\nL90:\n    switch (igo) {\n\tcase 0: goto L120;\n\tcase 1: goto L150;\n\tcase 2: goto L180;\n\tcase 3: goto L210;\n    }\n/*     PROCEDURE..SCALE-CHECK */\nL100:\nL110:\n    if (! (*dd1 <= rgamsq)) {\n\tgoto L130;\n    }\n    if (*dd1 == zero) {\n\tgoto L160;\n    }\n    igo = 0;\n    igo_fmt = fmt_120;\n/*              FIX-H.. */\n    goto L70;\nL120:\n/* Computing 2nd power */\n    d__1 = gam;\n    *dd1 *= d__1 * d__1;\n    *dx1 /= gam;\n    dh11 /= gam;\n    dh12 /= gam;\n    goto L110;\nL130:\nL140:\n    if (! (*dd1 >= gamsq)) {\n\tgoto L160;\n    }\n    igo = 1;\n    igo_fmt = fmt_150;\n/*              FIX-H.. */\n    goto L70;\nL150:\n/* Computing 2nd power */\n    d__1 = gam;\n    *dd1 /= d__1 * d__1;\n    *dx1 *= gam;\n    dh11 *= gam;\n    dh12 *= gam;\n    goto L140;\nL160:\nL170:\n    if (! (abs(*dd2) <= rgamsq)) {\n\tgoto L190;\n    }\n    if (*dd2 == zero) {\n\tgoto L220;\n    }\n    igo = 2;\n    igo_fmt = fmt_180;\n/*              FIX-H.. */\n    goto L70;\nL180:\n/* Computing 2nd power */\n    d__1 = gam;\n    *dd2 *= d__1 * d__1;\n    dh21 /= gam;\n    dh22 /= gam;\n    goto L170;\nL190:\nL200:\n    if (! (abs(*dd2) >= gamsq)) {\n\tgoto L220;\n    }\n    igo = 3;\n    igo_fmt = fmt_210;\n/*              FIX-H.. */\n    goto L70;\nL210:\n/* Computing 2nd power */\n    d__1 = gam;\n    *dd2 /= d__1 * d__1;\n    dh21 *= gam;\n    dh22 *= gam;\n    goto L200;\nL220:\n    if (dflag < 0.) {\n\tgoto L250;\n    } else if (dflag == 0) {\n\tgoto L230;\n    } else {\n\tgoto L240;\n    }\nL230:\n    dparam[3] = dh21;\n    dparam[4] = dh12;\n    goto L260;\nL240:\n    dparam[2] = dh11;\n    dparam[5] = dh22;\n    goto L260;\nL250:\n    dparam[2] = dh11;\n    dparam[3] = dh21;\n    dparam[4] = dh12;\n    dparam[5] = dh22;\nL260:\n    dparam[1] = dflag;\n    return 0;\n} /* drotmg_ */\n\n"
  },
  {
    "path": "3rdparty/eigen3/blas/f2c/dsbmv.c",
    "content": "/* dsbmv.f -- translated by f2c (version 20100827).\n   You must link the resulting object file with libf2c:\n\ton Microsoft Windows system, link with libf2c.lib;\n\ton Linux or Unix systems, link with .../path/to/libf2c.a -lm\n\tor, if you install libf2c.a in a standard place, with -lf2c -lm\n\t-- in that order, at the end of the command line, as in\n\t\tcc *.o -lf2c -lm\n\tSource for libf2c is in /netlib/f2c/libf2c.zip, e.g.,\n\n\t\thttp://www.netlib.org/f2c/libf2c.zip\n*/\n\n#include \"datatypes.h\"\n\n/* Subroutine */ int dsbmv_(char *uplo, integer *n, integer *k, doublereal *\n\talpha, doublereal *a, integer *lda, doublereal *x, integer *incx, \n\tdoublereal *beta, doublereal *y, integer *incy, ftnlen uplo_len)\n{\n    /* System generated locals */\n    integer a_dim1, a_offset, i__1, i__2, i__3, i__4;\n\n    /* Local variables */\n    integer i__, j, l, ix, iy, jx, jy, kx, ky, info;\n    doublereal temp1, temp2;\n    extern logical lsame_(char *, char *, ftnlen, ftnlen);\n    integer kplus1;\n    extern /* Subroutine */ int xerbla_(char *, integer *, ftnlen);\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  DSBMV  performs the matrix-vector  operation */\n\n/*     y := alpha*A*x + beta*y, */\n\n/*  where alpha and beta are scalars, x and y are n element vectors and */\n/*  A is an n by n symmetric band matrix, with k super-diagonals. */\n\n/*  Arguments */\n/*  ========== */\n\n/*  UPLO   - CHARACTER*1. */\n/*           On entry, UPLO specifies whether the upper or lower */\n/*           triangular part of the band matrix A is being supplied as */\n/*           follows: */\n\n/*              UPLO = 'U' or 'u'   The upper triangular part of A is */\n/*                                  being supplied. */\n\n/*              UPLO = 'L' or 'l'   The lower triangular part of A is */\n/*                                  being supplied. */\n\n/*           Unchanged on exit. */\n\n/*  N      - INTEGER. */\n/*           On entry, N specifies the order of the matrix A. */\n/*           N must be at least zero. */\n/*           Unchanged on exit. */\n\n/*  K      - INTEGER. */\n/*           On entry, K specifies the number of super-diagonals of the */\n/*           matrix A. K must satisfy  0 .le. K. */\n/*           Unchanged on exit. */\n\n/*  ALPHA  - DOUBLE PRECISION. */\n/*           On entry, ALPHA specifies the scalar alpha. */\n/*           Unchanged on exit. */\n\n/*  A      - DOUBLE PRECISION array of DIMENSION ( LDA, n ). */\n/*           Before entry with UPLO = 'U' or 'u', the leading ( k + 1 ) */\n/*           by n part of the array A must contain the upper triangular */\n/*           band part of the symmetric matrix, supplied column by */\n/*           column, with the leading diagonal of the matrix in row */\n/*           ( k + 1 ) of the array, the first super-diagonal starting at */\n/*           position 2 in row k, and so on. The top left k by k triangle */\n/*           of the array A is not referenced. */\n/*           The following program segment will transfer the upper */\n/*           triangular part of a symmetric band matrix from conventional */\n/*           full matrix storage to band storage: */\n\n/*                 DO 20, J = 1, N */\n/*                    M = K + 1 - J */\n/*                    DO 10, I = MAX( 1, J - K ), J */\n/*                       A( M + I, J ) = matrix( I, J ) */\n/*              10    CONTINUE */\n/*              20 CONTINUE */\n\n/*           Before entry with UPLO = 'L' or 'l', the leading ( k + 1 ) */\n/*           by n part of the array A must contain the lower triangular */\n/*           band part of the symmetric matrix, supplied column by */\n/*           column, with the leading diagonal of the matrix in row 1 of */\n/*           the array, the first sub-diagonal starting at position 1 in */\n/*           row 2, and so on. The bottom right k by k triangle of the */\n/*           array A is not referenced. */\n/*           The following program segment will transfer the lower */\n/*           triangular part of a symmetric band matrix from conventional */\n/*           full matrix storage to band storage: */\n\n/*                 DO 20, J = 1, N */\n/*                    M = 1 - J */\n/*                    DO 10, I = J, MIN( N, J + K ) */\n/*                       A( M + I, J ) = matrix( I, J ) */\n/*              10    CONTINUE */\n/*              20 CONTINUE */\n\n/*           Unchanged on exit. */\n\n/*  LDA    - INTEGER. */\n/*           On entry, LDA specifies the first dimension of A as declared */\n/*           in the calling (sub) program. LDA must be at least */\n/*           ( k + 1 ). */\n/*           Unchanged on exit. */\n\n/*  X      - DOUBLE PRECISION array of DIMENSION at least */\n/*           ( 1 + ( n - 1 )*abs( INCX ) ). */\n/*           Before entry, the incremented array X must contain the */\n/*           vector x. */\n/*           Unchanged on exit. */\n\n/*  INCX   - INTEGER. */\n/*           On entry, INCX specifies the increment for the elements of */\n/*           X. INCX must not be zero. */\n/*           Unchanged on exit. */\n\n/*  BETA   - DOUBLE PRECISION. */\n/*           On entry, BETA specifies the scalar beta. */\n/*           Unchanged on exit. */\n\n/*  Y      - DOUBLE PRECISION array of DIMENSION at least */\n/*           ( 1 + ( n - 1 )*abs( INCY ) ). */\n/*           Before entry, the incremented array Y must contain the */\n/*           vector y. On exit, Y is overwritten by the updated vector y. */\n\n/*  INCY   - INTEGER. */\n/*           On entry, INCY specifies the increment for the elements of */\n/*           Y. INCY must not be zero. */\n/*           Unchanged on exit. */\n\n\n/*  Level 2 Blas routine. */\n\n/*  -- Written on 22-October-1986. */\n/*     Jack Dongarra, Argonne National Lab. */\n/*     Jeremy Du Croz, Nag Central Office. */\n/*     Sven Hammarling, Nag Central Office. */\n/*     Richard Hanson, Sandia National Labs. */\n\n/*  ===================================================================== */\n\n/*     .. Parameters .. */\n/*     .. */\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. External Functions .. */\n/*     .. */\n/*     .. External Subroutines .. */\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n\n/*     Test the input parameters. */\n\n    /* Parameter adjustments */\n    a_dim1 = *lda;\n    a_offset = 1 + a_dim1;\n    a -= a_offset;\n    --x;\n    --y;\n\n    /* Function Body */\n    info = 0;\n    if (! lsame_(uplo, \"U\", (ftnlen)1, (ftnlen)1) && ! lsame_(uplo, \"L\", (\n\t    ftnlen)1, (ftnlen)1)) {\n\tinfo = 1;\n    } else if (*n < 0) {\n\tinfo = 2;\n    } else if (*k < 0) {\n\tinfo = 3;\n    } else if (*lda < *k + 1) {\n\tinfo = 6;\n    } else if (*incx == 0) {\n\tinfo = 8;\n    } else if (*incy == 0) {\n\tinfo = 11;\n    }\n    if (info != 0) {\n\txerbla_(\"DSBMV \", &info, (ftnlen)6);\n\treturn 0;\n    }\n\n/*     Quick return if possible. */\n\n    if (*n == 0 || (*alpha == 0. && *beta == 1.)) {\n\treturn 0;\n    }\n\n/*     Set up the start points in  X  and  Y. */\n\n    if (*incx > 0) {\n\tkx = 1;\n    } else {\n\tkx = 1 - (*n - 1) * *incx;\n    }\n    if (*incy > 0) {\n\tky = 1;\n    } else {\n\tky = 1 - (*n - 1) * *incy;\n    }\n\n/*     Start the operations. In this version the elements of the array A */\n/*     are accessed sequentially with one pass through A. */\n\n/*     First form  y := beta*y. */\n\n    if (*beta != 1.) {\n\tif (*incy == 1) {\n\t    if (*beta == 0.) {\n\t\ti__1 = *n;\n\t\tfor (i__ = 1; i__ <= i__1; ++i__) {\n\t\t    y[i__] = 0.;\n/* L10: */\n\t\t}\n\t    } else {\n\t\ti__1 = *n;\n\t\tfor (i__ = 1; i__ <= i__1; ++i__) {\n\t\t    y[i__] = *beta * y[i__];\n/* L20: */\n\t\t}\n\t    }\n\t} else {\n\t    iy = ky;\n\t    if (*beta == 0.) {\n\t\ti__1 = *n;\n\t\tfor (i__ = 1; i__ <= i__1; ++i__) {\n\t\t    y[iy] = 0.;\n\t\t    iy += *incy;\n/* L30: */\n\t\t}\n\t    } else {\n\t\ti__1 = *n;\n\t\tfor (i__ = 1; i__ <= i__1; ++i__) {\n\t\t    y[iy] = *beta * y[iy];\n\t\t    iy += *incy;\n/* L40: */\n\t\t}\n\t    }\n\t}\n    }\n    if (*alpha == 0.) {\n\treturn 0;\n    }\n    if (lsame_(uplo, \"U\", (ftnlen)1, (ftnlen)1)) {\n\n/*        Form  y  when upper triangle of A is stored. */\n\n\tkplus1 = *k + 1;\n\tif (*incx == 1 && *incy == 1) {\n\t    i__1 = *n;\n\t    for (j = 1; j <= i__1; ++j) {\n\t\ttemp1 = *alpha * x[j];\n\t\ttemp2 = 0.;\n\t\tl = kplus1 - j;\n/* Computing MAX */\n\t\ti__2 = 1, i__3 = j - *k;\n\t\ti__4 = j - 1;\n\t\tfor (i__ = max(i__2,i__3); i__ <= i__4; ++i__) {\n\t\t    y[i__] += temp1 * a[l + i__ + j * a_dim1];\n\t\t    temp2 += a[l + i__ + j * a_dim1] * x[i__];\n/* L50: */\n\t\t}\n\t\ty[j] = y[j] + temp1 * a[kplus1 + j * a_dim1] + *alpha * temp2;\n/* L60: */\n\t    }\n\t} else {\n\t    jx = kx;\n\t    jy = ky;\n\t    i__1 = *n;\n\t    for (j = 1; j <= i__1; ++j) {\n\t\ttemp1 = *alpha * x[jx];\n\t\ttemp2 = 0.;\n\t\tix = kx;\n\t\tiy = ky;\n\t\tl = kplus1 - j;\n/* Computing MAX */\n\t\ti__4 = 1, i__2 = j - *k;\n\t\ti__3 = j - 1;\n\t\tfor (i__ = max(i__4,i__2); i__ <= i__3; ++i__) {\n\t\t    y[iy] += temp1 * a[l + i__ + j * a_dim1];\n\t\t    temp2 += a[l + i__ + j * a_dim1] * x[ix];\n\t\t    ix += *incx;\n\t\t    iy += *incy;\n/* L70: */\n\t\t}\n\t\ty[jy] = y[jy] + temp1 * a[kplus1 + j * a_dim1] + *alpha * \n\t\t\ttemp2;\n\t\tjx += *incx;\n\t\tjy += *incy;\n\t\tif (j > *k) {\n\t\t    kx += *incx;\n\t\t    ky += *incy;\n\t\t}\n/* L80: */\n\t    }\n\t}\n    } else {\n\n/*        Form  y  when lower triangle of A is stored. */\n\n\tif (*incx == 1 && *incy == 1) {\n\t    i__1 = *n;\n\t    for (j = 1; j <= i__1; ++j) {\n\t\ttemp1 = *alpha * x[j];\n\t\ttemp2 = 0.;\n\t\ty[j] += temp1 * a[j * a_dim1 + 1];\n\t\tl = 1 - j;\n/* Computing MIN */\n\t\ti__4 = *n, i__2 = j + *k;\n\t\ti__3 = min(i__4,i__2);\n\t\tfor (i__ = j + 1; i__ <= i__3; ++i__) {\n\t\t    y[i__] += temp1 * a[l + i__ + j * a_dim1];\n\t\t    temp2 += a[l + i__ + j * a_dim1] * x[i__];\n/* L90: */\n\t\t}\n\t\ty[j] += *alpha * temp2;\n/* L100: */\n\t    }\n\t} else {\n\t    jx = kx;\n\t    jy = ky;\n\t    i__1 = *n;\n\t    for (j = 1; j <= i__1; ++j) {\n\t\ttemp1 = *alpha * x[jx];\n\t\ttemp2 = 0.;\n\t\ty[jy] += temp1 * a[j * a_dim1 + 1];\n\t\tl = 1 - j;\n\t\tix = jx;\n\t\tiy = jy;\n/* Computing MIN */\n\t\ti__4 = *n, i__2 = j + *k;\n\t\ti__3 = min(i__4,i__2);\n\t\tfor (i__ = j + 1; i__ <= i__3; ++i__) {\n\t\t    ix += *incx;\n\t\t    iy += *incy;\n\t\t    y[iy] += temp1 * a[l + i__ + j * a_dim1];\n\t\t    temp2 += a[l + i__ + j * a_dim1] * x[ix];\n/* L110: */\n\t\t}\n\t\ty[jy] += *alpha * temp2;\n\t\tjx += *incx;\n\t\tjy += *incy;\n/* L120: */\n\t    }\n\t}\n    }\n\n    return 0;\n\n/*     End of DSBMV . */\n\n} /* dsbmv_ */\n\n"
  },
  {
    "path": "3rdparty/eigen3/blas/f2c/dspmv.c",
    "content": "/* dspmv.f -- translated by f2c (version 20100827).\n   You must link the resulting object file with libf2c:\n\ton Microsoft Windows system, link with libf2c.lib;\n\ton Linux or Unix systems, link with .../path/to/libf2c.a -lm\n\tor, if you install libf2c.a in a standard place, with -lf2c -lm\n\t-- in that order, at the end of the command line, as in\n\t\tcc *.o -lf2c -lm\n\tSource for libf2c is in /netlib/f2c/libf2c.zip, e.g.,\n\n\t\thttp://www.netlib.org/f2c/libf2c.zip\n*/\n\n#include \"datatypes.h\"\n\n/* Subroutine */ int dspmv_(char *uplo, integer *n, doublereal *alpha, \n\tdoublereal *ap, doublereal *x, integer *incx, doublereal *beta, \n\tdoublereal *y, integer *incy, ftnlen uplo_len)\n{\n    /* System generated locals */\n    integer i__1, i__2;\n\n    /* Local variables */\n    integer i__, j, k, kk, ix, iy, jx, jy, kx, ky, info;\n    doublereal temp1, temp2;\n    extern logical lsame_(char *, char *, ftnlen, ftnlen);\n    extern /* Subroutine */ int xerbla_(char *, integer *, ftnlen);\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  DSPMV  performs the matrix-vector operation */\n\n/*     y := alpha*A*x + beta*y, */\n\n/*  where alpha and beta are scalars, x and y are n element vectors and */\n/*  A is an n by n symmetric matrix, supplied in packed form. */\n\n/*  Arguments */\n/*  ========== */\n\n/*  UPLO   - CHARACTER*1. */\n/*           On entry, UPLO specifies whether the upper or lower */\n/*           triangular part of the matrix A is supplied in the packed */\n/*           array AP as follows: */\n\n/*              UPLO = 'U' or 'u'   The upper triangular part of A is */\n/*                                  supplied in AP. */\n\n/*              UPLO = 'L' or 'l'   The lower triangular part of A is */\n/*                                  supplied in AP. */\n\n/*           Unchanged on exit. */\n\n/*  N      - INTEGER. */\n/*           On entry, N specifies the order of the matrix A. */\n/*           N must be at least zero. */\n/*           Unchanged on exit. */\n\n/*  ALPHA  - DOUBLE PRECISION. */\n/*           On entry, ALPHA specifies the scalar alpha. */\n/*           Unchanged on exit. */\n\n/*  AP     - DOUBLE PRECISION array of DIMENSION at least */\n/*           ( ( n*( n + 1 ) )/2 ). */\n/*           Before entry with UPLO = 'U' or 'u', the array AP must */\n/*           contain the upper triangular part of the symmetric matrix */\n/*           packed sequentially, column by column, so that AP( 1 ) */\n/*           contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 ) */\n/*           and a( 2, 2 ) respectively, and so on. */\n/*           Before entry with UPLO = 'L' or 'l', the array AP must */\n/*           contain the lower triangular part of the symmetric matrix */\n/*           packed sequentially, column by column, so that AP( 1 ) */\n/*           contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 ) */\n/*           and a( 3, 1 ) respectively, and so on. */\n/*           Unchanged on exit. */\n\n/*  X      - DOUBLE PRECISION array of dimension at least */\n/*           ( 1 + ( n - 1 )*abs( INCX ) ). */\n/*           Before entry, the incremented array X must contain the n */\n/*           element vector x. */\n/*           Unchanged on exit. */\n\n/*  INCX   - INTEGER. */\n/*           On entry, INCX specifies the increment for the elements of */\n/*           X. INCX must not be zero. */\n/*           Unchanged on exit. */\n\n/*  BETA   - DOUBLE PRECISION. */\n/*           On entry, BETA specifies the scalar beta. When BETA is */\n/*           supplied as zero then Y need not be set on input. */\n/*           Unchanged on exit. */\n\n/*  Y      - DOUBLE PRECISION array of dimension at least */\n/*           ( 1 + ( n - 1 )*abs( INCY ) ). */\n/*           Before entry, the incremented array Y must contain the n */\n/*           element vector y. On exit, Y is overwritten by the updated */\n/*           vector y. */\n\n/*  INCY   - INTEGER. */\n/*           On entry, INCY specifies the increment for the elements of */\n/*           Y. INCY must not be zero. */\n/*           Unchanged on exit. */\n\n/*  Further Details */\n/*  =============== */\n\n/*  Level 2 Blas routine. */\n\n/*  -- Written on 22-October-1986. */\n/*     Jack Dongarra, Argonne National Lab. */\n/*     Jeremy Du Croz, Nag Central Office. */\n/*     Sven Hammarling, Nag Central Office. */\n/*     Richard Hanson, Sandia National Labs. */\n\n/*  ===================================================================== */\n\n/*     .. Parameters .. */\n/*     .. */\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. External Functions .. */\n/*     .. */\n/*     .. External Subroutines .. */\n/*     .. */\n\n/*     Test the input parameters. */\n\n    /* Parameter adjustments */\n    --y;\n    --x;\n    --ap;\n\n    /* Function Body */\n    info = 0;\n    if (! lsame_(uplo, \"U\", (ftnlen)1, (ftnlen)1) && ! lsame_(uplo, \"L\", (\n\t    ftnlen)1, (ftnlen)1)) {\n\tinfo = 1;\n    } else if (*n < 0) {\n\tinfo = 2;\n    } else if (*incx == 0) {\n\tinfo = 6;\n    } else if (*incy == 0) {\n\tinfo = 9;\n    }\n    if (info != 0) {\n\txerbla_(\"DSPMV \", &info, (ftnlen)6);\n\treturn 0;\n    }\n\n/*     Quick return if possible. */\n\n    if (*n == 0 || (*alpha == 0. && *beta == 1.)) {\n\treturn 0;\n    }\n\n/*     Set up the start points in  X  and  Y. */\n\n    if (*incx > 0) {\n\tkx = 1;\n    } else {\n\tkx = 1 - (*n - 1) * *incx;\n    }\n    if (*incy > 0) {\n\tky = 1;\n    } else {\n\tky = 1 - (*n - 1) * *incy;\n    }\n\n/*     Start the operations. In this version the elements of the array AP */\n/*     are accessed sequentially with one pass through AP. */\n\n/*     First form  y := beta*y. */\n\n    if (*beta != 1.) {\n\tif (*incy == 1) {\n\t    if (*beta == 0.) {\n\t\ti__1 = *n;\n\t\tfor (i__ = 1; i__ <= i__1; ++i__) {\n\t\t    y[i__] = 0.;\n/* L10: */\n\t\t}\n\t    } else {\n\t\ti__1 = *n;\n\t\tfor (i__ = 1; i__ <= i__1; ++i__) {\n\t\t    y[i__] = *beta * y[i__];\n/* L20: */\n\t\t}\n\t    }\n\t} else {\n\t    iy = ky;\n\t    if (*beta == 0.) {\n\t\ti__1 = *n;\n\t\tfor (i__ = 1; i__ <= i__1; ++i__) {\n\t\t    y[iy] = 0.;\n\t\t    iy += *incy;\n/* L30: */\n\t\t}\n\t    } else {\n\t\ti__1 = *n;\n\t\tfor (i__ = 1; i__ <= i__1; ++i__) {\n\t\t    y[iy] = *beta * y[iy];\n\t\t    iy += *incy;\n/* L40: */\n\t\t}\n\t    }\n\t}\n    }\n    if (*alpha == 0.) {\n\treturn 0;\n    }\n    kk = 1;\n    if (lsame_(uplo, \"U\", (ftnlen)1, (ftnlen)1)) {\n\n/*        Form  y  when AP contains the upper triangle. */\n\n\tif (*incx == 1 && *incy == 1) {\n\t    i__1 = *n;\n\t    for (j = 1; j <= i__1; ++j) {\n\t\ttemp1 = *alpha * x[j];\n\t\ttemp2 = 0.;\n\t\tk = kk;\n\t\ti__2 = j - 1;\n\t\tfor (i__ = 1; i__ <= i__2; ++i__) {\n\t\t    y[i__] += temp1 * ap[k];\n\t\t    temp2 += ap[k] * x[i__];\n\t\t    ++k;\n/* L50: */\n\t\t}\n\t\ty[j] = y[j] + temp1 * ap[kk + j - 1] + *alpha * temp2;\n\t\tkk += j;\n/* L60: */\n\t    }\n\t} else {\n\t    jx = kx;\n\t    jy = ky;\n\t    i__1 = *n;\n\t    for (j = 1; j <= i__1; ++j) {\n\t\ttemp1 = *alpha * x[jx];\n\t\ttemp2 = 0.;\n\t\tix = kx;\n\t\tiy = ky;\n\t\ti__2 = kk + j - 2;\n\t\tfor (k = kk; k <= i__2; ++k) {\n\t\t    y[iy] += temp1 * ap[k];\n\t\t    temp2 += ap[k] * x[ix];\n\t\t    ix += *incx;\n\t\t    iy += *incy;\n/* L70: */\n\t\t}\n\t\ty[jy] = y[jy] + temp1 * ap[kk + j - 1] + *alpha * temp2;\n\t\tjx += *incx;\n\t\tjy += *incy;\n\t\tkk += j;\n/* L80: */\n\t    }\n\t}\n    } else {\n\n/*        Form  y  when AP contains the lower triangle. */\n\n\tif (*incx == 1 && *incy == 1) {\n\t    i__1 = *n;\n\t    for (j = 1; j <= i__1; ++j) {\n\t\ttemp1 = *alpha * x[j];\n\t\ttemp2 = 0.;\n\t\ty[j] += temp1 * ap[kk];\n\t\tk = kk + 1;\n\t\ti__2 = *n;\n\t\tfor (i__ = j + 1; i__ <= i__2; ++i__) {\n\t\t    y[i__] += temp1 * ap[k];\n\t\t    temp2 += ap[k] * x[i__];\n\t\t    ++k;\n/* L90: */\n\t\t}\n\t\ty[j] += *alpha * temp2;\n\t\tkk += *n - j + 1;\n/* L100: */\n\t    }\n\t} else {\n\t    jx = kx;\n\t    jy = ky;\n\t    i__1 = *n;\n\t    for (j = 1; j <= i__1; ++j) {\n\t\ttemp1 = *alpha * x[jx];\n\t\ttemp2 = 0.;\n\t\ty[jy] += temp1 * ap[kk];\n\t\tix = jx;\n\t\tiy = jy;\n\t\ti__2 = kk + *n - j;\n\t\tfor (k = kk + 1; k <= i__2; ++k) {\n\t\t    ix += *incx;\n\t\t    iy += *incy;\n\t\t    y[iy] += temp1 * ap[k];\n\t\t    temp2 += ap[k] * x[ix];\n/* L110: */\n\t\t}\n\t\ty[jy] += *alpha * temp2;\n\t\tjx += *incx;\n\t\tjy += *incy;\n\t\tkk += *n - j + 1;\n/* L120: */\n\t    }\n\t}\n    }\n\n    return 0;\n\n/*     End of DSPMV . */\n\n} /* dspmv_ */\n\n"
  },
  {
    "path": "3rdparty/eigen3/blas/f2c/dtbmv.c",
    "content": "/* dtbmv.f -- translated by f2c (version 20100827).\n   You must link the resulting object file with libf2c:\n\ton Microsoft Windows system, link with libf2c.lib;\n\ton Linux or Unix systems, link with .../path/to/libf2c.a -lm\n\tor, if you install libf2c.a in a standard place, with -lf2c -lm\n\t-- in that order, at the end of the command line, as in\n\t\tcc *.o -lf2c -lm\n\tSource for libf2c is in /netlib/f2c/libf2c.zip, e.g.,\n\n\t\thttp://www.netlib.org/f2c/libf2c.zip\n*/\n\n#include \"datatypes.h\"\n\n/* Subroutine */ int dtbmv_(char *uplo, char *trans, char *diag, integer *n, \n\tinteger *k, doublereal *a, integer *lda, doublereal *x, integer *incx,\n\t ftnlen uplo_len, ftnlen trans_len, ftnlen diag_len)\n{\n    /* System generated locals */\n    integer a_dim1, a_offset, i__1, i__2, i__3, i__4;\n\n    /* Local variables */\n    integer i__, j, l, ix, jx, kx, info;\n    doublereal temp;\n    extern logical lsame_(char *, char *, ftnlen, ftnlen);\n    integer kplus1;\n    extern /* Subroutine */ int xerbla_(char *, integer *, ftnlen);\n    logical nounit;\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  DTBMV  performs one of the matrix-vector operations */\n\n/*     x := A*x,   or   x := A'*x, */\n\n/*  where x is an n element vector and  A is an n by n unit, or non-unit, */\n/*  upper or lower triangular band matrix, with ( k + 1 ) diagonals. */\n\n/*  Arguments */\n/*  ========== */\n\n/*  UPLO   - CHARACTER*1. */\n/*           On entry, UPLO specifies whether the matrix is an upper or */\n/*           lower triangular matrix as follows: */\n\n/*              UPLO = 'U' or 'u'   A is an upper triangular matrix. */\n\n/*              UPLO = 'L' or 'l'   A is a lower triangular matrix. */\n\n/*           Unchanged on exit. */\n\n/*  TRANS  - CHARACTER*1. */\n/*           On entry, TRANS specifies the operation to be performed as */\n/*           follows: */\n\n/*              TRANS = 'N' or 'n'   x := A*x. */\n\n/*              TRANS = 'T' or 't'   x := A'*x. */\n\n/*              TRANS = 'C' or 'c'   x := A'*x. */\n\n/*           Unchanged on exit. */\n\n/*  DIAG   - CHARACTER*1. */\n/*           On entry, DIAG specifies whether or not A is unit */\n/*           triangular as follows: */\n\n/*              DIAG = 'U' or 'u'   A is assumed to be unit triangular. */\n\n/*              DIAG = 'N' or 'n'   A is not assumed to be unit */\n/*                                  triangular. */\n\n/*           Unchanged on exit. */\n\n/*  N      - INTEGER. */\n/*           On entry, N specifies the order of the matrix A. */\n/*           N must be at least zero. */\n/*           Unchanged on exit. */\n\n/*  K      - INTEGER. */\n/*           On entry with UPLO = 'U' or 'u', K specifies the number of */\n/*           super-diagonals of the matrix A. */\n/*           On entry with UPLO = 'L' or 'l', K specifies the number of */\n/*           sub-diagonals of the matrix A. */\n/*           K must satisfy  0 .le. K. */\n/*           Unchanged on exit. */\n\n/*  A      - DOUBLE PRECISION array of DIMENSION ( LDA, n ). */\n/*           Before entry with UPLO = 'U' or 'u', the leading ( k + 1 ) */\n/*           by n part of the array A must contain the upper triangular */\n/*           band part of the matrix of coefficients, supplied column by */\n/*           column, with the leading diagonal of the matrix in row */\n/*           ( k + 1 ) of the array, the first super-diagonal starting at */\n/*           position 2 in row k, and so on. The top left k by k triangle */\n/*           of the array A is not referenced. */\n/*           The following program segment will transfer an upper */\n/*           triangular band matrix from conventional full matrix storage */\n/*           to band storage: */\n\n/*                 DO 20, J = 1, N */\n/*                    M = K + 1 - J */\n/*                    DO 10, I = MAX( 1, J - K ), J */\n/*                       A( M + I, J ) = matrix( I, J ) */\n/*              10    CONTINUE */\n/*              20 CONTINUE */\n\n/*           Before entry with UPLO = 'L' or 'l', the leading ( k + 1 ) */\n/*           by n part of the array A must contain the lower triangular */\n/*           band part of the matrix of coefficients, supplied column by */\n/*           column, with the leading diagonal of the matrix in row 1 of */\n/*           the array, the first sub-diagonal starting at position 1 in */\n/*           row 2, and so on. The bottom right k by k triangle of the */\n/*           array A is not referenced. */\n/*           The following program segment will transfer a lower */\n/*           triangular band matrix from conventional full matrix storage */\n/*           to band storage: */\n\n/*                 DO 20, J = 1, N */\n/*                    M = 1 - J */\n/*                    DO 10, I = J, MIN( N, J + K ) */\n/*                       A( M + I, J ) = matrix( I, J ) */\n/*              10    CONTINUE */\n/*              20 CONTINUE */\n\n/*           Note that when DIAG = 'U' or 'u' the elements of the array A */\n/*           corresponding to the diagonal elements of the matrix are not */\n/*           referenced, but are assumed to be unity. */\n/*           Unchanged on exit. */\n\n/*  LDA    - INTEGER. */\n/*           On entry, LDA specifies the first dimension of A as declared */\n/*           in the calling (sub) program. LDA must be at least */\n/*           ( k + 1 ). */\n/*           Unchanged on exit. */\n\n/*  X      - DOUBLE PRECISION array of dimension at least */\n/*           ( 1 + ( n - 1 )*abs( INCX ) ). */\n/*           Before entry, the incremented array X must contain the n */\n/*           element vector x. On exit, X is overwritten with the */\n/*           transformed vector x. */\n\n/*  INCX   - INTEGER. */\n/*           On entry, INCX specifies the increment for the elements of */\n/*           X. INCX must not be zero. */\n/*           Unchanged on exit. */\n\n/*  Further Details */\n/*  =============== */\n\n/*  Level 2 Blas routine. */\n\n/*  -- Written on 22-October-1986. */\n/*     Jack Dongarra, Argonne National Lab. */\n/*     Jeremy Du Croz, Nag Central Office. */\n/*     Sven Hammarling, Nag Central Office. */\n/*     Richard Hanson, Sandia National Labs. */\n\n/*  ===================================================================== */\n\n/*     .. Parameters .. */\n/*     .. */\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. External Functions .. */\n/*     .. */\n/*     .. External Subroutines .. */\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n\n/*     Test the input parameters. */\n\n    /* Parameter adjustments */\n    a_dim1 = *lda;\n    a_offset = 1 + a_dim1;\n    a -= a_offset;\n    --x;\n\n    /* Function Body */\n    info = 0;\n    if (! lsame_(uplo, \"U\", (ftnlen)1, (ftnlen)1) && ! lsame_(uplo, \"L\", (\n\t    ftnlen)1, (ftnlen)1)) {\n\tinfo = 1;\n    } else if (! lsame_(trans, \"N\", (ftnlen)1, (ftnlen)1) && ! lsame_(trans, \n\t    \"T\", (ftnlen)1, (ftnlen)1) && ! lsame_(trans, \"C\", (ftnlen)1, (\n\t    ftnlen)1)) {\n\tinfo = 2;\n    } else if (! lsame_(diag, \"U\", (ftnlen)1, (ftnlen)1) && ! lsame_(diag, \n\t    \"N\", (ftnlen)1, (ftnlen)1)) {\n\tinfo = 3;\n    } else if (*n < 0) {\n\tinfo = 4;\n    } else if (*k < 0) {\n\tinfo = 5;\n    } else if (*lda < *k + 1) {\n\tinfo = 7;\n    } else if (*incx == 0) {\n\tinfo = 9;\n    }\n    if (info != 0) {\n\txerbla_(\"DTBMV \", &info, (ftnlen)6);\n\treturn 0;\n    }\n\n/*     Quick return if possible. */\n\n    if (*n == 0) {\n\treturn 0;\n    }\n\n    nounit = lsame_(diag, \"N\", (ftnlen)1, (ftnlen)1);\n\n/*     Set up the start point in X if the increment is not unity. This */\n/*     will be  ( N - 1 )*INCX   too small for descending loops. */\n\n    if (*incx <= 0) {\n\tkx = 1 - (*n - 1) * *incx;\n    } else if (*incx != 1) {\n\tkx = 1;\n    }\n\n/*     Start the operations. In this version the elements of A are */\n/*     accessed sequentially with one pass through A. */\n\n    if (lsame_(trans, \"N\", (ftnlen)1, (ftnlen)1)) {\n\n/*         Form  x := A*x. */\n\n\tif (lsame_(uplo, \"U\", (ftnlen)1, (ftnlen)1)) {\n\t    kplus1 = *k + 1;\n\t    if (*incx == 1) {\n\t\ti__1 = *n;\n\t\tfor (j = 1; j <= i__1; ++j) {\n\t\t    if (x[j] != 0.) {\n\t\t\ttemp = x[j];\n\t\t\tl = kplus1 - j;\n/* Computing MAX */\n\t\t\ti__2 = 1, i__3 = j - *k;\n\t\t\ti__4 = j - 1;\n\t\t\tfor (i__ = max(i__2,i__3); i__ <= i__4; ++i__) {\n\t\t\t    x[i__] += temp * a[l + i__ + j * a_dim1];\n/* L10: */\n\t\t\t}\n\t\t\tif (nounit) {\n\t\t\t    x[j] *= a[kplus1 + j * a_dim1];\n\t\t\t}\n\t\t    }\n/* L20: */\n\t\t}\n\t    } else {\n\t\tjx = kx;\n\t\ti__1 = *n;\n\t\tfor (j = 1; j <= i__1; ++j) {\n\t\t    if (x[jx] != 0.) {\n\t\t\ttemp = x[jx];\n\t\t\tix = kx;\n\t\t\tl = kplus1 - j;\n/* Computing MAX */\n\t\t\ti__4 = 1, i__2 = j - *k;\n\t\t\ti__3 = j - 1;\n\t\t\tfor (i__ = max(i__4,i__2); i__ <= i__3; ++i__) {\n\t\t\t    x[ix] += temp * a[l + i__ + j * a_dim1];\n\t\t\t    ix += *incx;\n/* L30: */\n\t\t\t}\n\t\t\tif (nounit) {\n\t\t\t    x[jx] *= a[kplus1 + j * a_dim1];\n\t\t\t}\n\t\t    }\n\t\t    jx += *incx;\n\t\t    if (j > *k) {\n\t\t\tkx += *incx;\n\t\t    }\n/* L40: */\n\t\t}\n\t    }\n\t} else {\n\t    if (*incx == 1) {\n\t\tfor (j = *n; j >= 1; --j) {\n\t\t    if (x[j] != 0.) {\n\t\t\ttemp = x[j];\n\t\t\tl = 1 - j;\n/* Computing MIN */\n\t\t\ti__1 = *n, i__3 = j + *k;\n\t\t\ti__4 = j + 1;\n\t\t\tfor (i__ = min(i__1,i__3); i__ >= i__4; --i__) {\n\t\t\t    x[i__] += temp * a[l + i__ + j * a_dim1];\n/* L50: */\n\t\t\t}\n\t\t\tif (nounit) {\n\t\t\t    x[j] *= a[j * a_dim1 + 1];\n\t\t\t}\n\t\t    }\n/* L60: */\n\t\t}\n\t    } else {\n\t\tkx += (*n - 1) * *incx;\n\t\tjx = kx;\n\t\tfor (j = *n; j >= 1; --j) {\n\t\t    if (x[jx] != 0.) {\n\t\t\ttemp = x[jx];\n\t\t\tix = kx;\n\t\t\tl = 1 - j;\n/* Computing MIN */\n\t\t\ti__4 = *n, i__1 = j + *k;\n\t\t\ti__3 = j + 1;\n\t\t\tfor (i__ = min(i__4,i__1); i__ >= i__3; --i__) {\n\t\t\t    x[ix] += temp * a[l + i__ + j * a_dim1];\n\t\t\t    ix -= *incx;\n/* L70: */\n\t\t\t}\n\t\t\tif (nounit) {\n\t\t\t    x[jx] *= a[j * a_dim1 + 1];\n\t\t\t}\n\t\t    }\n\t\t    jx -= *incx;\n\t\t    if (*n - j >= *k) {\n\t\t\tkx -= *incx;\n\t\t    }\n/* L80: */\n\t\t}\n\t    }\n\t}\n    } else {\n\n/*        Form  x := A'*x. */\n\n\tif (lsame_(uplo, \"U\", (ftnlen)1, (ftnlen)1)) {\n\t    kplus1 = *k + 1;\n\t    if (*incx == 1) {\n\t\tfor (j = *n; j >= 1; --j) {\n\t\t    temp = x[j];\n\t\t    l = kplus1 - j;\n\t\t    if (nounit) {\n\t\t\ttemp *= a[kplus1 + j * a_dim1];\n\t\t    }\n/* Computing MAX */\n\t\t    i__4 = 1, i__1 = j - *k;\n\t\t    i__3 = max(i__4,i__1);\n\t\t    for (i__ = j - 1; i__ >= i__3; --i__) {\n\t\t\ttemp += a[l + i__ + j * a_dim1] * x[i__];\n/* L90: */\n\t\t    }\n\t\t    x[j] = temp;\n/* L100: */\n\t\t}\n\t    } else {\n\t\tkx += (*n - 1) * *incx;\n\t\tjx = kx;\n\t\tfor (j = *n; j >= 1; --j) {\n\t\t    temp = x[jx];\n\t\t    kx -= *incx;\n\t\t    ix = kx;\n\t\t    l = kplus1 - j;\n\t\t    if (nounit) {\n\t\t\ttemp *= a[kplus1 + j * a_dim1];\n\t\t    }\n/* Computing MAX */\n\t\t    i__4 = 1, i__1 = j - *k;\n\t\t    i__3 = max(i__4,i__1);\n\t\t    for (i__ = j - 1; i__ >= i__3; --i__) {\n\t\t\ttemp += a[l + i__ + j * a_dim1] * x[ix];\n\t\t\tix -= *incx;\n/* L110: */\n\t\t    }\n\t\t    x[jx] = temp;\n\t\t    jx -= *incx;\n/* L120: */\n\t\t}\n\t    }\n\t} else {\n\t    if (*incx == 1) {\n\t\ti__3 = *n;\n\t\tfor (j = 1; j <= i__3; ++j) {\n\t\t    temp = x[j];\n\t\t    l = 1 - j;\n\t\t    if (nounit) {\n\t\t\ttemp *= a[j * a_dim1 + 1];\n\t\t    }\n/* Computing MIN */\n\t\t    i__1 = *n, i__2 = j + *k;\n\t\t    i__4 = min(i__1,i__2);\n\t\t    for (i__ = j + 1; i__ <= i__4; ++i__) {\n\t\t\ttemp += a[l + i__ + j * a_dim1] * x[i__];\n/* L130: */\n\t\t    }\n\t\t    x[j] = temp;\n/* L140: */\n\t\t}\n\t    } else {\n\t\tjx = kx;\n\t\ti__3 = *n;\n\t\tfor (j = 1; j <= i__3; ++j) {\n\t\t    temp = x[jx];\n\t\t    kx += *incx;\n\t\t    ix = kx;\n\t\t    l = 1 - j;\n\t\t    if (nounit) {\n\t\t\ttemp *= a[j * a_dim1 + 1];\n\t\t    }\n/* Computing MIN */\n\t\t    i__1 = *n, i__2 = j + *k;\n\t\t    i__4 = min(i__1,i__2);\n\t\t    for (i__ = j + 1; i__ <= i__4; ++i__) {\n\t\t\ttemp += a[l + i__ + j * a_dim1] * x[ix];\n\t\t\tix += *incx;\n/* L150: */\n\t\t    }\n\t\t    x[jx] = temp;\n\t\t    jx += *incx;\n/* L160: */\n\t\t}\n\t    }\n\t}\n    }\n\n    return 0;\n\n/*     End of DTBMV . */\n\n} /* dtbmv_ */\n\n"
  },
  {
    "path": "3rdparty/eigen3/blas/f2c/lsame.c",
    "content": "/* lsame.f -- translated by f2c (version 20100827).\n   You must link the resulting object file with libf2c:\n\ton Microsoft Windows system, link with libf2c.lib;\n\ton Linux or Unix systems, link with .../path/to/libf2c.a -lm\n\tor, if you install libf2c.a in a standard place, with -lf2c -lm\n\t-- in that order, at the end of the command line, as in\n\t\tcc *.o -lf2c -lm\n\tSource for libf2c is in /netlib/f2c/libf2c.zip, e.g.,\n\n\t\thttp://www.netlib.org/f2c/libf2c.zip\n*/\n\n#include \"datatypes.h\"\n\nlogical lsame_(char *ca, char *cb, ftnlen ca_len, ftnlen cb_len)\n{\n    /* System generated locals */\n    logical ret_val;\n\n    /* Local variables */\n    integer inta, intb, zcode;\n\n\n/*  -- LAPACK auxiliary routine (version 3.1) -- */\n/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */\n/*     November 2006 */\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  LSAME returns .TRUE. if CA is the same letter as CB regardless of */\n/*  case. */\n\n/*  Arguments */\n/*  ========= */\n\n/*  CA      (input) CHARACTER*1 */\n\n/*  CB      (input) CHARACTER*1 */\n/*          CA and CB specify the single characters to be compared. */\n\n/* ===================================================================== */\n\n/*     .. Intrinsic Functions .. */\n/*     .. */\n/*     .. Local Scalars .. */\n/*     .. */\n\n/*     Test if the characters are equal */\n\n    ret_val = *(unsigned char *)ca == *(unsigned char *)cb;\n    if (ret_val) {\n\treturn ret_val;\n    }\n\n/*     Now test for equivalence if both characters are alphabetic. */\n\n    zcode = 'Z';\n\n/*     Use 'Z' rather than 'A' so that ASCII can be detected on Prime */\n/*     machines, on which ICHAR returns a value with bit 8 set. */\n/*     ICHAR('A') on Prime machines returns 193 which is the same as */\n/*     ICHAR('A') on an EBCDIC machine. */\n\n    inta = *(unsigned char *)ca;\n    intb = *(unsigned char *)cb;\n\n    if (zcode == 90 || zcode == 122) {\n\n/*        ASCII is assumed - ZCODE is the ASCII code of either lower or */\n/*        upper case 'Z'. */\n\n\tif (inta >= 97 && inta <= 122) {\n\t    inta += -32;\n\t}\n\tif (intb >= 97 && intb <= 122) {\n\t    intb += -32;\n\t}\n\n    } else if (zcode == 233 || zcode == 169) {\n\n/*        EBCDIC is assumed - ZCODE is the EBCDIC code of either lower or */\n/*        upper case 'Z'. */\n\n\tif ((inta >= 129 && inta <= 137) || (inta >= 145 && inta <= 153) || \n            (inta >= 162 && inta <= 169)) {\n\t    inta += 64;\n\t}\n\tif ((intb >= 129 && intb <= 137) || (intb >= 145 && intb <= 153) || \n            (intb >= 162 && intb <= 169)) {\n\t    intb += 64;\n\t}\n\n    } else if (zcode == 218 || zcode == 250) {\n\n/*        ASCII is assumed, on Prime machines - ZCODE is the ASCII code */\n/*        plus 128 of either lower or upper case 'Z'. */\n\n\tif (inta >= 225 && inta <= 250) {\n\t    inta += -32;\n\t}\n\tif (intb >= 225 && intb <= 250) {\n\t    intb += -32;\n\t}\n    }\n    ret_val = inta == intb;\n\n/*     RETURN */\n\n/*     End of LSAME */\n\n    return ret_val;\n} /* lsame_ */\n\n"
  },
  {
    "path": "3rdparty/eigen3/blas/f2c/r_cnjg.c",
    "content": "#include \"datatypes.h\"    \n\nvoid r_cnjg(complex *r, complex *z) {\n    r->r = z->r;\n    r->i = -(z->i);\n}\n"
  },
  {
    "path": "3rdparty/eigen3/blas/f2c/srotm.c",
    "content": "/* srotm.f -- translated by f2c (version 20100827).\n   You must link the resulting object file with libf2c:\n\ton Microsoft Windows system, link with libf2c.lib;\n\ton Linux or Unix systems, link with .../path/to/libf2c.a -lm\n\tor, if you install libf2c.a in a standard place, with -lf2c -lm\n\t-- in that order, at the end of the command line, as in\n\t\tcc *.o -lf2c -lm\n\tSource for libf2c is in /netlib/f2c/libf2c.zip, e.g.,\n\n\t\thttp://www.netlib.org/f2c/libf2c.zip\n*/\n\n#include \"datatypes.h\"\n\n/* Subroutine */ int srotm_(integer *n, real *sx, integer *incx, real *sy, \n\tinteger *incy, real *sparam)\n{\n    /* Initialized data */\n\n    static real zero = 0.f;\n    static real two = 2.f;\n\n    /* System generated locals */\n    integer i__1, i__2;\n\n    /* Local variables */\n    integer i__;\n    real w, z__;\n    integer kx, ky;\n    real sh11, sh12, sh21, sh22, sflag;\n    integer nsteps;\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*     APPLY THE MODIFIED GIVENS TRANSFORMATION, H, TO THE 2 BY N MATRIX */\n\n/*     (SX**T) , WHERE **T INDICATES TRANSPOSE. THE ELEMENTS OF SX ARE IN */\n/*     (DX**T) */\n\n/*     SX(LX+I*INCX), I = 0 TO N-1, WHERE LX = 1 IF INCX .GE. 0, ELSE */\n/*     LX = (-INCX)*N, AND SIMILARLY FOR SY USING USING LY AND INCY. */\n/*     WITH SPARAM(1)=SFLAG, H HAS ONE OF THE FOLLOWING FORMS.. */\n\n/*     SFLAG=-1.E0     SFLAG=0.E0        SFLAG=1.E0     SFLAG=-2.E0 */\n\n/*       (SH11  SH12)    (1.E0  SH12)    (SH11  1.E0)    (1.E0  0.E0) */\n/*     H=(          )    (          )    (          )    (          ) */\n/*       (SH21  SH22),   (SH21  1.E0),   (-1.E0 SH22),   (0.E0  1.E0). */\n/*     SEE  SROTMG FOR A DESCRIPTION OF DATA STORAGE IN SPARAM. */\n\n\n/*  Arguments */\n/*  ========= */\n\n/*  N      (input) INTEGER */\n/*         number of elements in input vector(s) */\n\n/*  SX     (input/output) REAL array, dimension N */\n/*         double precision vector with N elements */\n\n/*  INCX   (input) INTEGER */\n/*         storage spacing between elements of SX */\n\n/*  SY     (input/output) REAL array, dimension N */\n/*         double precision vector with N elements */\n\n/*  INCY   (input) INTEGER */\n/*         storage spacing between elements of SY */\n\n/*  SPARAM (input/output)  REAL array, dimension 5 */\n/*     SPARAM(1)=SFLAG */\n/*     SPARAM(2)=SH11 */\n/*     SPARAM(3)=SH21 */\n/*     SPARAM(4)=SH12 */\n/*     SPARAM(5)=SH22 */\n\n/*  ===================================================================== */\n\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. Data statements .. */\n    /* Parameter adjustments */\n    --sparam;\n    --sy;\n    --sx;\n\n    /* Function Body */\n/*     .. */\n\n    sflag = sparam[1];\n    if (*n <= 0 || sflag + two == zero) {\n\tgoto L140;\n    }\n    if (! (*incx == *incy && *incx > 0)) {\n\tgoto L70;\n    }\n\n    nsteps = *n * *incx;\n    if (sflag < 0.f) {\n\tgoto L50;\n    } else if (sflag == 0) {\n\tgoto L10;\n    } else {\n\tgoto L30;\n    }\nL10:\n    sh12 = sparam[4];\n    sh21 = sparam[3];\n    i__1 = nsteps;\n    i__2 = *incx;\n    for (i__ = 1; i__2 < 0 ? i__ >= i__1 : i__ <= i__1; i__ += i__2) {\n\tw = sx[i__];\n\tz__ = sy[i__];\n\tsx[i__] = w + z__ * sh12;\n\tsy[i__] = w * sh21 + z__;\n/* L20: */\n    }\n    goto L140;\nL30:\n    sh11 = sparam[2];\n    sh22 = sparam[5];\n    i__2 = nsteps;\n    i__1 = *incx;\n    for (i__ = 1; i__1 < 0 ? i__ >= i__2 : i__ <= i__2; i__ += i__1) {\n\tw = sx[i__];\n\tz__ = sy[i__];\n\tsx[i__] = w * sh11 + z__;\n\tsy[i__] = -w + sh22 * z__;\n/* L40: */\n    }\n    goto L140;\nL50:\n    sh11 = sparam[2];\n    sh12 = sparam[4];\n    sh21 = sparam[3];\n    sh22 = sparam[5];\n    i__1 = nsteps;\n    i__2 = *incx;\n    for (i__ = 1; i__2 < 0 ? i__ >= i__1 : i__ <= i__1; i__ += i__2) {\n\tw = sx[i__];\n\tz__ = sy[i__];\n\tsx[i__] = w * sh11 + z__ * sh12;\n\tsy[i__] = w * sh21 + z__ * sh22;\n/* L60: */\n    }\n    goto L140;\nL70:\n    kx = 1;\n    ky = 1;\n    if (*incx < 0) {\n\tkx = (1 - *n) * *incx + 1;\n    }\n    if (*incy < 0) {\n\tky = (1 - *n) * *incy + 1;\n    }\n\n    if (sflag < 0.f) {\n\tgoto L120;\n    } else if (sflag == 0) {\n\tgoto L80;\n    } else {\n\tgoto L100;\n    }\nL80:\n    sh12 = sparam[4];\n    sh21 = sparam[3];\n    i__2 = *n;\n    for (i__ = 1; i__ <= i__2; ++i__) {\n\tw = sx[kx];\n\tz__ = sy[ky];\n\tsx[kx] = w + z__ * sh12;\n\tsy[ky] = w * sh21 + z__;\n\tkx += *incx;\n\tky += *incy;\n/* L90: */\n    }\n    goto L140;\nL100:\n    sh11 = sparam[2];\n    sh22 = sparam[5];\n    i__2 = *n;\n    for (i__ = 1; i__ <= i__2; ++i__) {\n\tw = sx[kx];\n\tz__ = sy[ky];\n\tsx[kx] = w * sh11 + z__;\n\tsy[ky] = -w + sh22 * z__;\n\tkx += *incx;\n\tky += *incy;\n/* L110: */\n    }\n    goto L140;\nL120:\n    sh11 = sparam[2];\n    sh12 = sparam[4];\n    sh21 = sparam[3];\n    sh22 = sparam[5];\n    i__2 = *n;\n    for (i__ = 1; i__ <= i__2; ++i__) {\n\tw = sx[kx];\n\tz__ = sy[ky];\n\tsx[kx] = w * sh11 + z__ * sh12;\n\tsy[ky] = w * sh21 + z__ * sh22;\n\tkx += *incx;\n\tky += *incy;\n/* L130: */\n    }\nL140:\n    return 0;\n} /* srotm_ */\n\n"
  },
  {
    "path": "3rdparty/eigen3/blas/f2c/srotmg.c",
    "content": "/* srotmg.f -- translated by f2c (version 20100827).\n   You must link the resulting object file with libf2c:\n\ton Microsoft Windows system, link with libf2c.lib;\n\ton Linux or Unix systems, link with .../path/to/libf2c.a -lm\n\tor, if you install libf2c.a in a standard place, with -lf2c -lm\n\t-- in that order, at the end of the command line, as in\n\t\tcc *.o -lf2c -lm\n\tSource for libf2c is in /netlib/f2c/libf2c.zip, e.g.,\n\n\t\thttp://www.netlib.org/f2c/libf2c.zip\n*/\n\n#include \"datatypes.h\"\n\n/* Subroutine */ int srotmg_(real *sd1, real *sd2, real *sx1, real *sy1, real \n\t*sparam)\n{\n    /* Initialized data */\n\n    static real zero = 0.f;\n    static real one = 1.f;\n    static real two = 2.f;\n    static real gam = 4096.f;\n    static real gamsq = 16777200.f;\n    static real rgamsq = 5.96046e-8f;\n\n    /* Format strings */\n    static char fmt_120[] = \"\";\n    static char fmt_150[] = \"\";\n    static char fmt_180[] = \"\";\n    static char fmt_210[] = \"\";\n\n    /* System generated locals */\n    real r__1;\n\n    /* Local variables */\n    real su, sp1, sp2, sq1, sq2, sh11, sh12, sh21, sh22;\n    integer igo;\n    real sflag, stemp;\n\n    /* Assigned format variables */\n    static char *igo_fmt;\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*     CONSTRUCT THE MODIFIED GIVENS TRANSFORMATION MATRIX H WHICH ZEROS */\n/*     THE SECOND COMPONENT OF THE 2-VECTOR  (SQRT(SD1)*SX1,SQRT(SD2)* */\n/*     SY2)**T. */\n/*     WITH SPARAM(1)=SFLAG, H HAS ONE OF THE FOLLOWING FORMS.. */\n\n/*     SFLAG=-1.E0     SFLAG=0.E0        SFLAG=1.E0     SFLAG=-2.E0 */\n\n/*       (SH11  SH12)    (1.E0  SH12)    (SH11  1.E0)    (1.E0  0.E0) */\n/*     H=(          )    (          )    (          )    (          ) */\n/*       (SH21  SH22),   (SH21  1.E0),   (-1.E0 SH22),   (0.E0  1.E0). */\n/*     LOCATIONS 2-4 OF SPARAM CONTAIN SH11,SH21,SH12, AND SH22 */\n/*     RESPECTIVELY. (VALUES OF 1.E0, -1.E0, OR 0.E0 IMPLIED BY THE */\n/*     VALUE OF SPARAM(1) ARE NOT STORED IN SPARAM.) */\n\n/*     THE VALUES OF GAMSQ AND RGAMSQ SET IN THE DATA STATEMENT MAY BE */\n/*     INEXACT.  THIS IS OK AS THEY ARE ONLY USED FOR TESTING THE SIZE */\n/*     OF SD1 AND SD2.  ALL ACTUAL SCALING OF DATA IS DONE USING GAM. */\n\n\n/*  Arguments */\n/*  ========= */\n\n\n/*  SD1    (input/output) REAL */\n\n/*  SD2    (input/output) REAL */\n\n/*  SX1    (input/output) REAL */\n\n/*  SY1    (input) REAL */\n\n\n/*  SPARAM (input/output)  REAL array, dimension 5 */\n/*     SPARAM(1)=SFLAG */\n/*     SPARAM(2)=SH11 */\n/*     SPARAM(3)=SH21 */\n/*     SPARAM(4)=SH12 */\n/*     SPARAM(5)=SH22 */\n\n/*  ===================================================================== */\n\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n/*     .. Data statements .. */\n\n    /* Parameter adjustments */\n    --sparam;\n\n    /* Function Body */\n/*     .. */\n    if (! (*sd1 < zero)) {\n\tgoto L10;\n    }\n/*       GO ZERO-H-D-AND-SX1.. */\n    goto L60;\nL10:\n/*     CASE-SD1-NONNEGATIVE */\n    sp2 = *sd2 * *sy1;\n    if (! (sp2 == zero)) {\n\tgoto L20;\n    }\n    sflag = -two;\n    goto L260;\n/*     REGULAR-CASE.. */\nL20:\n    sp1 = *sd1 * *sx1;\n    sq2 = sp2 * *sy1;\n    sq1 = sp1 * *sx1;\n\n    if (! (dabs(sq1) > dabs(sq2))) {\n\tgoto L40;\n    }\n    sh21 = -(*sy1) / *sx1;\n    sh12 = sp2 / sp1;\n\n    su = one - sh12 * sh21;\n\n    if (! (su <= zero)) {\n\tgoto L30;\n    }\n/*         GO ZERO-H-D-AND-SX1.. */\n    goto L60;\nL30:\n    sflag = zero;\n    *sd1 /= su;\n    *sd2 /= su;\n    *sx1 *= su;\n/*         GO SCALE-CHECK.. */\n    goto L100;\nL40:\n    if (! (sq2 < zero)) {\n\tgoto L50;\n    }\n/*         GO ZERO-H-D-AND-SX1.. */\n    goto L60;\nL50:\n    sflag = one;\n    sh11 = sp1 / sp2;\n    sh22 = *sx1 / *sy1;\n    su = one + sh11 * sh22;\n    stemp = *sd2 / su;\n    *sd2 = *sd1 / su;\n    *sd1 = stemp;\n    *sx1 = *sy1 * su;\n/*         GO SCALE-CHECK */\n    goto L100;\n/*     PROCEDURE..ZERO-H-D-AND-SX1.. */\nL60:\n    sflag = -one;\n    sh11 = zero;\n    sh12 = zero;\n    sh21 = zero;\n    sh22 = zero;\n\n    *sd1 = zero;\n    *sd2 = zero;\n    *sx1 = zero;\n/*         RETURN.. */\n    goto L220;\n/*     PROCEDURE..FIX-H.. */\nL70:\n    if (! (sflag >= zero)) {\n\tgoto L90;\n    }\n\n    if (! (sflag == zero)) {\n\tgoto L80;\n    }\n    sh11 = one;\n    sh22 = one;\n    sflag = -one;\n    goto L90;\nL80:\n    sh21 = -one;\n    sh12 = one;\n    sflag = -one;\nL90:\n    switch (igo) {\n\tcase 0: goto L120;\n\tcase 1: goto L150;\n\tcase 2: goto L180;\n\tcase 3: goto L210;\n    }\n/*     PROCEDURE..SCALE-CHECK */\nL100:\nL110:\n    if (! (*sd1 <= rgamsq)) {\n\tgoto L130;\n    }\n    if (*sd1 == zero) {\n\tgoto L160;\n    }\n    igo = 0;\n    igo_fmt = fmt_120;\n/*              FIX-H.. */\n    goto L70;\nL120:\n/* Computing 2nd power */\n    r__1 = gam;\n    *sd1 *= r__1 * r__1;\n    *sx1 /= gam;\n    sh11 /= gam;\n    sh12 /= gam;\n    goto L110;\nL130:\nL140:\n    if (! (*sd1 >= gamsq)) {\n\tgoto L160;\n    }\n    igo = 1;\n    igo_fmt = fmt_150;\n/*              FIX-H.. */\n    goto L70;\nL150:\n/* Computing 2nd power */\n    r__1 = gam;\n    *sd1 /= r__1 * r__1;\n    *sx1 *= gam;\n    sh11 *= gam;\n    sh12 *= gam;\n    goto L140;\nL160:\nL170:\n    if (! (dabs(*sd2) <= rgamsq)) {\n\tgoto L190;\n    }\n    if (*sd2 == zero) {\n\tgoto L220;\n    }\n    igo = 2;\n    igo_fmt = fmt_180;\n/*              FIX-H.. */\n    goto L70;\nL180:\n/* Computing 2nd power */\n    r__1 = gam;\n    *sd2 *= r__1 * r__1;\n    sh21 /= gam;\n    sh22 /= gam;\n    goto L170;\nL190:\nL200:\n    if (! (dabs(*sd2) >= gamsq)) {\n\tgoto L220;\n    }\n    igo = 3;\n    igo_fmt = fmt_210;\n/*              FIX-H.. */\n    goto L70;\nL210:\n/* Computing 2nd power */\n    r__1 = gam;\n    *sd2 /= r__1 * r__1;\n    sh21 *= gam;\n    sh22 *= gam;\n    goto L200;\nL220:\n    if (sflag < 0.f) {\n\tgoto L250;\n    } else if (sflag == 0) {\n\tgoto L230;\n    } else {\n\tgoto L240;\n    }\nL230:\n    sparam[3] = sh21;\n    sparam[4] = sh12;\n    goto L260;\nL240:\n    sparam[2] = sh11;\n    sparam[5] = sh22;\n    goto L260;\nL250:\n    sparam[2] = sh11;\n    sparam[3] = sh21;\n    sparam[4] = sh12;\n    sparam[5] = sh22;\nL260:\n    sparam[1] = sflag;\n    return 0;\n} /* srotmg_ */\n\n"
  },
  {
    "path": "3rdparty/eigen3/blas/f2c/ssbmv.c",
    "content": "/* ssbmv.f -- translated by f2c (version 20100827).\n   You must link the resulting object file with libf2c:\n\ton Microsoft Windows system, link with libf2c.lib;\n\ton Linux or Unix systems, link with .../path/to/libf2c.a -lm\n\tor, if you install libf2c.a in a standard place, with -lf2c -lm\n\t-- in that order, at the end of the command line, as in\n\t\tcc *.o -lf2c -lm\n\tSource for libf2c is in /netlib/f2c/libf2c.zip, e.g.,\n\n\t\thttp://www.netlib.org/f2c/libf2c.zip\n*/\n\n#include \"datatypes.h\"\n\n/* Subroutine */ int ssbmv_(char *uplo, integer *n, integer *k, real *alpha, \n\treal *a, integer *lda, real *x, integer *incx, real *beta, real *y, \n\tinteger *incy, ftnlen uplo_len)\n{\n    /* System generated locals */\n    integer a_dim1, a_offset, i__1, i__2, i__3, i__4;\n\n    /* Local variables */\n    integer i__, j, l, ix, iy, jx, jy, kx, ky, info;\n    real temp1, temp2;\n    extern logical lsame_(char *, char *, ftnlen, ftnlen);\n    integer kplus1;\n    extern /* Subroutine */ int xerbla_(char *, integer *, ftnlen);\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  SSBMV  performs the matrix-vector  operation */\n\n/*     y := alpha*A*x + beta*y, */\n\n/*  where alpha and beta are scalars, x and y are n element vectors and */\n/*  A is an n by n symmetric band matrix, with k super-diagonals. */\n\n/*  Arguments */\n/*  ========== */\n\n/*  UPLO   - CHARACTER*1. */\n/*           On entry, UPLO specifies whether the upper or lower */\n/*           triangular part of the band matrix A is being supplied as */\n/*           follows: */\n\n/*              UPLO = 'U' or 'u'   The upper triangular part of A is */\n/*                                  being supplied. */\n\n/*              UPLO = 'L' or 'l'   The lower triangular part of A is */\n/*                                  being supplied. */\n\n/*           Unchanged on exit. */\n\n/*  N      - INTEGER. */\n/*           On entry, N specifies the order of the matrix A. */\n/*           N must be at least zero. */\n/*           Unchanged on exit. */\n\n/*  K      - INTEGER. */\n/*           On entry, K specifies the number of super-diagonals of the */\n/*           matrix A. K must satisfy  0 .le. K. */\n/*           Unchanged on exit. */\n\n/*  ALPHA  - REAL            . */\n/*           On entry, ALPHA specifies the scalar alpha. */\n/*           Unchanged on exit. */\n\n/*  A      - REAL             array of DIMENSION ( LDA, n ). */\n/*           Before entry with UPLO = 'U' or 'u', the leading ( k + 1 ) */\n/*           by n part of the array A must contain the upper triangular */\n/*           band part of the symmetric matrix, supplied column by */\n/*           column, with the leading diagonal of the matrix in row */\n/*           ( k + 1 ) of the array, the first super-diagonal starting at */\n/*           position 2 in row k, and so on. The top left k by k triangle */\n/*           of the array A is not referenced. */\n/*           The following program segment will transfer the upper */\n/*           triangular part of a symmetric band matrix from conventional */\n/*           full matrix storage to band storage: */\n\n/*                 DO 20, J = 1, N */\n/*                    M = K + 1 - J */\n/*                    DO 10, I = MAX( 1, J - K ), J */\n/*                       A( M + I, J ) = matrix( I, J ) */\n/*              10    CONTINUE */\n/*              20 CONTINUE */\n\n/*           Before entry with UPLO = 'L' or 'l', the leading ( k + 1 ) */\n/*           by n part of the array A must contain the lower triangular */\n/*           band part of the symmetric matrix, supplied column by */\n/*           column, with the leading diagonal of the matrix in row 1 of */\n/*           the array, the first sub-diagonal starting at position 1 in */\n/*           row 2, and so on. The bottom right k by k triangle of the */\n/*           array A is not referenced. */\n/*           The following program segment will transfer the lower */\n/*           triangular part of a symmetric band matrix from conventional */\n/*           full matrix storage to band storage: */\n\n/*                 DO 20, J = 1, N */\n/*                    M = 1 - J */\n/*                    DO 10, I = J, MIN( N, J + K ) */\n/*                       A( M + I, J ) = matrix( I, J ) */\n/*              10    CONTINUE */\n/*              20 CONTINUE */\n\n/*           Unchanged on exit. */\n\n/*  LDA    - INTEGER. */\n/*           On entry, LDA specifies the first dimension of A as declared */\n/*           in the calling (sub) program. LDA must be at least */\n/*           ( k + 1 ). */\n/*           Unchanged on exit. */\n\n/*  X      - REAL             array of DIMENSION at least */\n/*           ( 1 + ( n - 1 )*abs( INCX ) ). */\n/*           Before entry, the incremented array X must contain the */\n/*           vector x. */\n/*           Unchanged on exit. */\n\n/*  INCX   - INTEGER. */\n/*           On entry, INCX specifies the increment for the elements of */\n/*           X. INCX must not be zero. */\n/*           Unchanged on exit. */\n\n/*  BETA   - REAL            . */\n/*           On entry, BETA specifies the scalar beta. */\n/*           Unchanged on exit. */\n\n/*  Y      - REAL             array of DIMENSION at least */\n/*           ( 1 + ( n - 1 )*abs( INCY ) ). */\n/*           Before entry, the incremented array Y must contain the */\n/*           vector y. On exit, Y is overwritten by the updated vector y. */\n\n/*  INCY   - INTEGER. */\n/*           On entry, INCY specifies the increment for the elements of */\n/*           Y. INCY must not be zero. */\n/*           Unchanged on exit. */\n\n/*  Further Details */\n/*  =============== */\n\n/*  Level 2 Blas routine. */\n\n/*  -- Written on 22-October-1986. */\n/*     Jack Dongarra, Argonne National Lab. */\n/*     Jeremy Du Croz, Nag Central Office. */\n/*     Sven Hammarling, Nag Central Office. */\n/*     Richard Hanson, Sandia National Labs. */\n\n/*  ===================================================================== */\n\n/*     .. Parameters .. */\n/*     .. */\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. External Functions .. */\n/*     .. */\n/*     .. External Subroutines .. */\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n\n/*     Test the input parameters. */\n\n    /* Parameter adjustments */\n    a_dim1 = *lda;\n    a_offset = 1 + a_dim1;\n    a -= a_offset;\n    --x;\n    --y;\n\n    /* Function Body */\n    info = 0;\n    if (! lsame_(uplo, \"U\", (ftnlen)1, (ftnlen)1) && ! lsame_(uplo, \"L\", (\n\t    ftnlen)1, (ftnlen)1)) {\n\tinfo = 1;\n    } else if (*n < 0) {\n\tinfo = 2;\n    } else if (*k < 0) {\n\tinfo = 3;\n    } else if (*lda < *k + 1) {\n\tinfo = 6;\n    } else if (*incx == 0) {\n\tinfo = 8;\n    } else if (*incy == 0) {\n\tinfo = 11;\n    }\n    if (info != 0) {\n\txerbla_(\"SSBMV \", &info, (ftnlen)6);\n\treturn 0;\n    }\n\n/*     Quick return if possible. */\n\n    if (*n == 0 || (*alpha == 0.f && *beta == 1.f)) {\n\treturn 0;\n    }\n\n/*     Set up the start points in  X  and  Y. */\n\n    if (*incx > 0) {\n\tkx = 1;\n    } else {\n\tkx = 1 - (*n - 1) * *incx;\n    }\n    if (*incy > 0) {\n\tky = 1;\n    } else {\n\tky = 1 - (*n - 1) * *incy;\n    }\n\n/*     Start the operations. In this version the elements of the array A */\n/*     are accessed sequentially with one pass through A. */\n\n/*     First form  y := beta*y. */\n\n    if (*beta != 1.f) {\n\tif (*incy == 1) {\n\t    if (*beta == 0.f) {\n\t\ti__1 = *n;\n\t\tfor (i__ = 1; i__ <= i__1; ++i__) {\n\t\t    y[i__] = 0.f;\n/* L10: */\n\t\t}\n\t    } else {\n\t\ti__1 = *n;\n\t\tfor (i__ = 1; i__ <= i__1; ++i__) {\n\t\t    y[i__] = *beta * y[i__];\n/* L20: */\n\t\t}\n\t    }\n\t} else {\n\t    iy = ky;\n\t    if (*beta == 0.f) {\n\t\ti__1 = *n;\n\t\tfor (i__ = 1; i__ <= i__1; ++i__) {\n\t\t    y[iy] = 0.f;\n\t\t    iy += *incy;\n/* L30: */\n\t\t}\n\t    } else {\n\t\ti__1 = *n;\n\t\tfor (i__ = 1; i__ <= i__1; ++i__) {\n\t\t    y[iy] = *beta * y[iy];\n\t\t    iy += *incy;\n/* L40: */\n\t\t}\n\t    }\n\t}\n    }\n    if (*alpha == 0.f) {\n\treturn 0;\n    }\n    if (lsame_(uplo, \"U\", (ftnlen)1, (ftnlen)1)) {\n\n/*        Form  y  when upper triangle of A is stored. */\n\n\tkplus1 = *k + 1;\n\tif (*incx == 1 && *incy == 1) {\n\t    i__1 = *n;\n\t    for (j = 1; j <= i__1; ++j) {\n\t\ttemp1 = *alpha * x[j];\n\t\ttemp2 = 0.f;\n\t\tl = kplus1 - j;\n/* Computing MAX */\n\t\ti__2 = 1, i__3 = j - *k;\n\t\ti__4 = j - 1;\n\t\tfor (i__ = max(i__2,i__3); i__ <= i__4; ++i__) {\n\t\t    y[i__] += temp1 * a[l + i__ + j * a_dim1];\n\t\t    temp2 += a[l + i__ + j * a_dim1] * x[i__];\n/* L50: */\n\t\t}\n\t\ty[j] = y[j] + temp1 * a[kplus1 + j * a_dim1] + *alpha * temp2;\n/* L60: */\n\t    }\n\t} else {\n\t    jx = kx;\n\t    jy = ky;\n\t    i__1 = *n;\n\t    for (j = 1; j <= i__1; ++j) {\n\t\ttemp1 = *alpha * x[jx];\n\t\ttemp2 = 0.f;\n\t\tix = kx;\n\t\tiy = ky;\n\t\tl = kplus1 - j;\n/* Computing MAX */\n\t\ti__4 = 1, i__2 = j - *k;\n\t\ti__3 = j - 1;\n\t\tfor (i__ = max(i__4,i__2); i__ <= i__3; ++i__) {\n\t\t    y[iy] += temp1 * a[l + i__ + j * a_dim1];\n\t\t    temp2 += a[l + i__ + j * a_dim1] * x[ix];\n\t\t    ix += *incx;\n\t\t    iy += *incy;\n/* L70: */\n\t\t}\n\t\ty[jy] = y[jy] + temp1 * a[kplus1 + j * a_dim1] + *alpha * \n\t\t\ttemp2;\n\t\tjx += *incx;\n\t\tjy += *incy;\n\t\tif (j > *k) {\n\t\t    kx += *incx;\n\t\t    ky += *incy;\n\t\t}\n/* L80: */\n\t    }\n\t}\n    } else {\n\n/*        Form  y  when lower triangle of A is stored. */\n\n\tif (*incx == 1 && *incy == 1) {\n\t    i__1 = *n;\n\t    for (j = 1; j <= i__1; ++j) {\n\t\ttemp1 = *alpha * x[j];\n\t\ttemp2 = 0.f;\n\t\ty[j] += temp1 * a[j * a_dim1 + 1];\n\t\tl = 1 - j;\n/* Computing MIN */\n\t\ti__4 = *n, i__2 = j + *k;\n\t\ti__3 = min(i__4,i__2);\n\t\tfor (i__ = j + 1; i__ <= i__3; ++i__) {\n\t\t    y[i__] += temp1 * a[l + i__ + j * a_dim1];\n\t\t    temp2 += a[l + i__ + j * a_dim1] * x[i__];\n/* L90: */\n\t\t}\n\t\ty[j] += *alpha * temp2;\n/* L100: */\n\t    }\n\t} else {\n\t    jx = kx;\n\t    jy = ky;\n\t    i__1 = *n;\n\t    for (j = 1; j <= i__1; ++j) {\n\t\ttemp1 = *alpha * x[jx];\n\t\ttemp2 = 0.f;\n\t\ty[jy] += temp1 * a[j * a_dim1 + 1];\n\t\tl = 1 - j;\n\t\tix = jx;\n\t\tiy = jy;\n/* Computing MIN */\n\t\ti__4 = *n, i__2 = j + *k;\n\t\ti__3 = min(i__4,i__2);\n\t\tfor (i__ = j + 1; i__ <= i__3; ++i__) {\n\t\t    ix += *incx;\n\t\t    iy += *incy;\n\t\t    y[iy] += temp1 * a[l + i__ + j * a_dim1];\n\t\t    temp2 += a[l + i__ + j * a_dim1] * x[ix];\n/* L110: */\n\t\t}\n\t\ty[jy] += *alpha * temp2;\n\t\tjx += *incx;\n\t\tjy += *incy;\n/* L120: */\n\t    }\n\t}\n    }\n\n    return 0;\n\n/*     End of SSBMV . */\n\n} /* ssbmv_ */\n\n"
  },
  {
    "path": "3rdparty/eigen3/blas/f2c/sspmv.c",
    "content": "/* sspmv.f -- translated by f2c (version 20100827).\n   You must link the resulting object file with libf2c:\n\ton Microsoft Windows system, link with libf2c.lib;\n\ton Linux or Unix systems, link with .../path/to/libf2c.a -lm\n\tor, if you install libf2c.a in a standard place, with -lf2c -lm\n\t-- in that order, at the end of the command line, as in\n\t\tcc *.o -lf2c -lm\n\tSource for libf2c is in /netlib/f2c/libf2c.zip, e.g.,\n\n\t\thttp://www.netlib.org/f2c/libf2c.zip\n*/\n\n#include \"datatypes.h\"\n\n/* Subroutine */ int sspmv_(char *uplo, integer *n, real *alpha, real *ap, \n\treal *x, integer *incx, real *beta, real *y, integer *incy, ftnlen \n\tuplo_len)\n{\n    /* System generated locals */\n    integer i__1, i__2;\n\n    /* Local variables */\n    integer i__, j, k, kk, ix, iy, jx, jy, kx, ky, info;\n    real temp1, temp2;\n    extern logical lsame_(char *, char *, ftnlen, ftnlen);\n    extern /* Subroutine */ int xerbla_(char *, integer *, ftnlen);\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  SSPMV  performs the matrix-vector operation */\n\n/*     y := alpha*A*x + beta*y, */\n\n/*  where alpha and beta are scalars, x and y are n element vectors and */\n/*  A is an n by n symmetric matrix, supplied in packed form. */\n\n/*  Arguments */\n/*  ========== */\n\n/*  UPLO   - CHARACTER*1. */\n/*           On entry, UPLO specifies whether the upper or lower */\n/*           triangular part of the matrix A is supplied in the packed */\n/*           array AP as follows: */\n\n/*              UPLO = 'U' or 'u'   The upper triangular part of A is */\n/*                                  supplied in AP. */\n\n/*              UPLO = 'L' or 'l'   The lower triangular part of A is */\n/*                                  supplied in AP. */\n\n/*           Unchanged on exit. */\n\n/*  N      - INTEGER. */\n/*           On entry, N specifies the order of the matrix A. */\n/*           N must be at least zero. */\n/*           Unchanged on exit. */\n\n/*  ALPHA  - REAL            . */\n/*           On entry, ALPHA specifies the scalar alpha. */\n/*           Unchanged on exit. */\n\n/*  AP     - REAL             array of DIMENSION at least */\n/*           ( ( n*( n + 1 ) )/2 ). */\n/*           Before entry with UPLO = 'U' or 'u', the array AP must */\n/*           contain the upper triangular part of the symmetric matrix */\n/*           packed sequentially, column by column, so that AP( 1 ) */\n/*           contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 ) */\n/*           and a( 2, 2 ) respectively, and so on. */\n/*           Before entry with UPLO = 'L' or 'l', the array AP must */\n/*           contain the lower triangular part of the symmetric matrix */\n/*           packed sequentially, column by column, so that AP( 1 ) */\n/*           contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 ) */\n/*           and a( 3, 1 ) respectively, and so on. */\n/*           Unchanged on exit. */\n\n/*  X      - REAL             array of dimension at least */\n/*           ( 1 + ( n - 1 )*abs( INCX ) ). */\n/*           Before entry, the incremented array X must contain the n */\n/*           element vector x. */\n/*           Unchanged on exit. */\n\n/*  INCX   - INTEGER. */\n/*           On entry, INCX specifies the increment for the elements of */\n/*           X. INCX must not be zero. */\n/*           Unchanged on exit. */\n\n/*  BETA   - REAL            . */\n/*           On entry, BETA specifies the scalar beta. When BETA is */\n/*           supplied as zero then Y need not be set on input. */\n/*           Unchanged on exit. */\n\n/*  Y      - REAL             array of dimension at least */\n/*           ( 1 + ( n - 1 )*abs( INCY ) ). */\n/*           Before entry, the incremented array Y must contain the n */\n/*           element vector y. On exit, Y is overwritten by the updated */\n/*           vector y. */\n\n/*  INCY   - INTEGER. */\n/*           On entry, INCY specifies the increment for the elements of */\n/*           Y. INCY must not be zero. */\n/*           Unchanged on exit. */\n\n/*  Further Details */\n/*  =============== */\n\n/*  Level 2 Blas routine. */\n\n/*  -- Written on 22-October-1986. */\n/*     Jack Dongarra, Argonne National Lab. */\n/*     Jeremy Du Croz, Nag Central Office. */\n/*     Sven Hammarling, Nag Central Office. */\n/*     Richard Hanson, Sandia National Labs. */\n\n/*  ===================================================================== */\n\n/*     .. Parameters .. */\n/*     .. */\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. External Functions .. */\n/*     .. */\n/*     .. External Subroutines .. */\n/*     .. */\n\n/*     Test the input parameters. */\n\n    /* Parameter adjustments */\n    --y;\n    --x;\n    --ap;\n\n    /* Function Body */\n    info = 0;\n    if (! lsame_(uplo, \"U\", (ftnlen)1, (ftnlen)1) && ! lsame_(uplo, \"L\", (\n\t    ftnlen)1, (ftnlen)1)) {\n\tinfo = 1;\n    } else if (*n < 0) {\n\tinfo = 2;\n    } else if (*incx == 0) {\n\tinfo = 6;\n    } else if (*incy == 0) {\n\tinfo = 9;\n    }\n    if (info != 0) {\n\txerbla_(\"SSPMV \", &info, (ftnlen)6);\n\treturn 0;\n    }\n\n/*     Quick return if possible. */\n\n    if (*n == 0 || (*alpha == 0.f && *beta == 1.f)) {\n\treturn 0;\n    }\n\n/*     Set up the start points in  X  and  Y. */\n\n    if (*incx > 0) {\n\tkx = 1;\n    } else {\n\tkx = 1 - (*n - 1) * *incx;\n    }\n    if (*incy > 0) {\n\tky = 1;\n    } else {\n\tky = 1 - (*n - 1) * *incy;\n    }\n\n/*     Start the operations. In this version the elements of the array AP */\n/*     are accessed sequentially with one pass through AP. */\n\n/*     First form  y := beta*y. */\n\n    if (*beta != 1.f) {\n\tif (*incy == 1) {\n\t    if (*beta == 0.f) {\n\t\ti__1 = *n;\n\t\tfor (i__ = 1; i__ <= i__1; ++i__) {\n\t\t    y[i__] = 0.f;\n/* L10: */\n\t\t}\n\t    } else {\n\t\ti__1 = *n;\n\t\tfor (i__ = 1; i__ <= i__1; ++i__) {\n\t\t    y[i__] = *beta * y[i__];\n/* L20: */\n\t\t}\n\t    }\n\t} else {\n\t    iy = ky;\n\t    if (*beta == 0.f) {\n\t\ti__1 = *n;\n\t\tfor (i__ = 1; i__ <= i__1; ++i__) {\n\t\t    y[iy] = 0.f;\n\t\t    iy += *incy;\n/* L30: */\n\t\t}\n\t    } else {\n\t\ti__1 = *n;\n\t\tfor (i__ = 1; i__ <= i__1; ++i__) {\n\t\t    y[iy] = *beta * y[iy];\n\t\t    iy += *incy;\n/* L40: */\n\t\t}\n\t    }\n\t}\n    }\n    if (*alpha == 0.f) {\n\treturn 0;\n    }\n    kk = 1;\n    if (lsame_(uplo, \"U\", (ftnlen)1, (ftnlen)1)) {\n\n/*        Form  y  when AP contains the upper triangle. */\n\n\tif (*incx == 1 && *incy == 1) {\n\t    i__1 = *n;\n\t    for (j = 1; j <= i__1; ++j) {\n\t\ttemp1 = *alpha * x[j];\n\t\ttemp2 = 0.f;\n\t\tk = kk;\n\t\ti__2 = j - 1;\n\t\tfor (i__ = 1; i__ <= i__2; ++i__) {\n\t\t    y[i__] += temp1 * ap[k];\n\t\t    temp2 += ap[k] * x[i__];\n\t\t    ++k;\n/* L50: */\n\t\t}\n\t\ty[j] = y[j] + temp1 * ap[kk + j - 1] + *alpha * temp2;\n\t\tkk += j;\n/* L60: */\n\t    }\n\t} else {\n\t    jx = kx;\n\t    jy = ky;\n\t    i__1 = *n;\n\t    for (j = 1; j <= i__1; ++j) {\n\t\ttemp1 = *alpha * x[jx];\n\t\ttemp2 = 0.f;\n\t\tix = kx;\n\t\tiy = ky;\n\t\ti__2 = kk + j - 2;\n\t\tfor (k = kk; k <= i__2; ++k) {\n\t\t    y[iy] += temp1 * ap[k];\n\t\t    temp2 += ap[k] * x[ix];\n\t\t    ix += *incx;\n\t\t    iy += *incy;\n/* L70: */\n\t\t}\n\t\ty[jy] = y[jy] + temp1 * ap[kk + j - 1] + *alpha * temp2;\n\t\tjx += *incx;\n\t\tjy += *incy;\n\t\tkk += j;\n/* L80: */\n\t    }\n\t}\n    } else {\n\n/*        Form  y  when AP contains the lower triangle. */\n\n\tif (*incx == 1 && *incy == 1) {\n\t    i__1 = *n;\n\t    for (j = 1; j <= i__1; ++j) {\n\t\ttemp1 = *alpha * x[j];\n\t\ttemp2 = 0.f;\n\t\ty[j] += temp1 * ap[kk];\n\t\tk = kk + 1;\n\t\ti__2 = *n;\n\t\tfor (i__ = j + 1; i__ <= i__2; ++i__) {\n\t\t    y[i__] += temp1 * ap[k];\n\t\t    temp2 += ap[k] * x[i__];\n\t\t    ++k;\n/* L90: */\n\t\t}\n\t\ty[j] += *alpha * temp2;\n\t\tkk += *n - j + 1;\n/* L100: */\n\t    }\n\t} else {\n\t    jx = kx;\n\t    jy = ky;\n\t    i__1 = *n;\n\t    for (j = 1; j <= i__1; ++j) {\n\t\ttemp1 = *alpha * x[jx];\n\t\ttemp2 = 0.f;\n\t\ty[jy] += temp1 * ap[kk];\n\t\tix = jx;\n\t\tiy = jy;\n\t\ti__2 = kk + *n - j;\n\t\tfor (k = kk + 1; k <= i__2; ++k) {\n\t\t    ix += *incx;\n\t\t    iy += *incy;\n\t\t    y[iy] += temp1 * ap[k];\n\t\t    temp2 += ap[k] * x[ix];\n/* L110: */\n\t\t}\n\t\ty[jy] += *alpha * temp2;\n\t\tjx += *incx;\n\t\tjy += *incy;\n\t\tkk += *n - j + 1;\n/* L120: */\n\t    }\n\t}\n    }\n\n    return 0;\n\n/*     End of SSPMV . */\n\n} /* sspmv_ */\n\n"
  },
  {
    "path": "3rdparty/eigen3/blas/f2c/stbmv.c",
    "content": "/* stbmv.f -- translated by f2c (version 20100827).\n   You must link the resulting object file with libf2c:\n\ton Microsoft Windows system, link with libf2c.lib;\n\ton Linux or Unix systems, link with .../path/to/libf2c.a -lm\n\tor, if you install libf2c.a in a standard place, with -lf2c -lm\n\t-- in that order, at the end of the command line, as in\n\t\tcc *.o -lf2c -lm\n\tSource for libf2c is in /netlib/f2c/libf2c.zip, e.g.,\n\n\t\thttp://www.netlib.org/f2c/libf2c.zip\n*/\n\n#include \"datatypes.h\"\n\n/* Subroutine */ int stbmv_(char *uplo, char *trans, char *diag, integer *n, \n\tinteger *k, real *a, integer *lda, real *x, integer *incx, ftnlen \n\tuplo_len, ftnlen trans_len, ftnlen diag_len)\n{\n    /* System generated locals */\n    integer a_dim1, a_offset, i__1, i__2, i__3, i__4;\n\n    /* Local variables */\n    integer i__, j, l, ix, jx, kx, info;\n    real temp;\n    extern logical lsame_(char *, char *, ftnlen, ftnlen);\n    integer kplus1;\n    extern /* Subroutine */ int xerbla_(char *, integer *, ftnlen);\n    logical nounit;\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  STBMV  performs one of the matrix-vector operations */\n\n/*     x := A*x,   or   x := A'*x, */\n\n/*  where x is an n element vector and  A is an n by n unit, or non-unit, */\n/*  upper or lower triangular band matrix, with ( k + 1 ) diagonals. */\n\n/*  Arguments */\n/*  ========== */\n\n/*  UPLO   - CHARACTER*1. */\n/*           On entry, UPLO specifies whether the matrix is an upper or */\n/*           lower triangular matrix as follows: */\n\n/*              UPLO = 'U' or 'u'   A is an upper triangular matrix. */\n\n/*              UPLO = 'L' or 'l'   A is a lower triangular matrix. */\n\n/*           Unchanged on exit. */\n\n/*  TRANS  - CHARACTER*1. */\n/*           On entry, TRANS specifies the operation to be performed as */\n/*           follows: */\n\n/*              TRANS = 'N' or 'n'   x := A*x. */\n\n/*              TRANS = 'T' or 't'   x := A'*x. */\n\n/*              TRANS = 'C' or 'c'   x := A'*x. */\n\n/*           Unchanged on exit. */\n\n/*  DIAG   - CHARACTER*1. */\n/*           On entry, DIAG specifies whether or not A is unit */\n/*           triangular as follows: */\n\n/*              DIAG = 'U' or 'u'   A is assumed to be unit triangular. */\n\n/*              DIAG = 'N' or 'n'   A is not assumed to be unit */\n/*                                  triangular. */\n\n/*           Unchanged on exit. */\n\n/*  N      - INTEGER. */\n/*           On entry, N specifies the order of the matrix A. */\n/*           N must be at least zero. */\n/*           Unchanged on exit. */\n\n/*  K      - INTEGER. */\n/*           On entry with UPLO = 'U' or 'u', K specifies the number of */\n/*           super-diagonals of the matrix A. */\n/*           On entry with UPLO = 'L' or 'l', K specifies the number of */\n/*           sub-diagonals of the matrix A. */\n/*           K must satisfy  0 .le. K. */\n/*           Unchanged on exit. */\n\n/*  A      - REAL             array of DIMENSION ( LDA, n ). */\n/*           Before entry with UPLO = 'U' or 'u', the leading ( k + 1 ) */\n/*           by n part of the array A must contain the upper triangular */\n/*           band part of the matrix of coefficients, supplied column by */\n/*           column, with the leading diagonal of the matrix in row */\n/*           ( k + 1 ) of the array, the first super-diagonal starting at */\n/*           position 2 in row k, and so on. The top left k by k triangle */\n/*           of the array A is not referenced. */\n/*           The following program segment will transfer an upper */\n/*           triangular band matrix from conventional full matrix storage */\n/*           to band storage: */\n\n/*                 DO 20, J = 1, N */\n/*                    M = K + 1 - J */\n/*                    DO 10, I = MAX( 1, J - K ), J */\n/*                       A( M + I, J ) = matrix( I, J ) */\n/*              10    CONTINUE */\n/*              20 CONTINUE */\n\n/*           Before entry with UPLO = 'L' or 'l', the leading ( k + 1 ) */\n/*           by n part of the array A must contain the lower triangular */\n/*           band part of the matrix of coefficients, supplied column by */\n/*           column, with the leading diagonal of the matrix in row 1 of */\n/*           the array, the first sub-diagonal starting at position 1 in */\n/*           row 2, and so on. The bottom right k by k triangle of the */\n/*           array A is not referenced. */\n/*           The following program segment will transfer a lower */\n/*           triangular band matrix from conventional full matrix storage */\n/*           to band storage: */\n\n/*                 DO 20, J = 1, N */\n/*                    M = 1 - J */\n/*                    DO 10, I = J, MIN( N, J + K ) */\n/*                       A( M + I, J ) = matrix( I, J ) */\n/*              10    CONTINUE */\n/*              20 CONTINUE */\n\n/*           Note that when DIAG = 'U' or 'u' the elements of the array A */\n/*           corresponding to the diagonal elements of the matrix are not */\n/*           referenced, but are assumed to be unity. */\n/*           Unchanged on exit. */\n\n/*  LDA    - INTEGER. */\n/*           On entry, LDA specifies the first dimension of A as declared */\n/*           in the calling (sub) program. LDA must be at least */\n/*           ( k + 1 ). */\n/*           Unchanged on exit. */\n\n/*  X      - REAL             array of dimension at least */\n/*           ( 1 + ( n - 1 )*abs( INCX ) ). */\n/*           Before entry, the incremented array X must contain the n */\n/*           element vector x. On exit, X is overwritten with the */\n/*           transformed vector x. */\n\n/*  INCX   - INTEGER. */\n/*           On entry, INCX specifies the increment for the elements of */\n/*           X. INCX must not be zero. */\n/*           Unchanged on exit. */\n\n/*  Further Details */\n/*  =============== */\n\n/*  Level 2 Blas routine. */\n\n/*  -- Written on 22-October-1986. */\n/*     Jack Dongarra, Argonne National Lab. */\n/*     Jeremy Du Croz, Nag Central Office. */\n/*     Sven Hammarling, Nag Central Office. */\n/*     Richard Hanson, Sandia National Labs. */\n\n/*  ===================================================================== */\n\n/*     .. Parameters .. */\n/*     .. */\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. External Functions .. */\n/*     .. */\n/*     .. External Subroutines .. */\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n\n/*     Test the input parameters. */\n\n    /* Parameter adjustments */\n    a_dim1 = *lda;\n    a_offset = 1 + a_dim1;\n    a -= a_offset;\n    --x;\n\n    /* Function Body */\n    info = 0;\n    if (! lsame_(uplo, \"U\", (ftnlen)1, (ftnlen)1) && ! lsame_(uplo, \"L\", (\n\t    ftnlen)1, (ftnlen)1)) {\n\tinfo = 1;\n    } else if (! lsame_(trans, \"N\", (ftnlen)1, (ftnlen)1) && ! lsame_(trans, \n\t    \"T\", (ftnlen)1, (ftnlen)1) && ! lsame_(trans, \"C\", (ftnlen)1, (\n\t    ftnlen)1)) {\n\tinfo = 2;\n    } else if (! lsame_(diag, \"U\", (ftnlen)1, (ftnlen)1) && ! lsame_(diag, \n\t    \"N\", (ftnlen)1, (ftnlen)1)) {\n\tinfo = 3;\n    } else if (*n < 0) {\n\tinfo = 4;\n    } else if (*k < 0) {\n\tinfo = 5;\n    } else if (*lda < *k + 1) {\n\tinfo = 7;\n    } else if (*incx == 0) {\n\tinfo = 9;\n    }\n    if (info != 0) {\n\txerbla_(\"STBMV \", &info, (ftnlen)6);\n\treturn 0;\n    }\n\n/*     Quick return if possible. */\n\n    if (*n == 0) {\n\treturn 0;\n    }\n\n    nounit = lsame_(diag, \"N\", (ftnlen)1, (ftnlen)1);\n\n/*     Set up the start point in X if the increment is not unity. This */\n/*     will be  ( N - 1 )*INCX   too small for descending loops. */\n\n    if (*incx <= 0) {\n\tkx = 1 - (*n - 1) * *incx;\n    } else if (*incx != 1) {\n\tkx = 1;\n    }\n\n/*     Start the operations. In this version the elements of A are */\n/*     accessed sequentially with one pass through A. */\n\n    if (lsame_(trans, \"N\", (ftnlen)1, (ftnlen)1)) {\n\n/*         Form  x := A*x. */\n\n\tif (lsame_(uplo, \"U\", (ftnlen)1, (ftnlen)1)) {\n\t    kplus1 = *k + 1;\n\t    if (*incx == 1) {\n\t\ti__1 = *n;\n\t\tfor (j = 1; j <= i__1; ++j) {\n\t\t    if (x[j] != 0.f) {\n\t\t\ttemp = x[j];\n\t\t\tl = kplus1 - j;\n/* Computing MAX */\n\t\t\ti__2 = 1, i__3 = j - *k;\n\t\t\ti__4 = j - 1;\n\t\t\tfor (i__ = max(i__2,i__3); i__ <= i__4; ++i__) {\n\t\t\t    x[i__] += temp * a[l + i__ + j * a_dim1];\n/* L10: */\n\t\t\t}\n\t\t\tif (nounit) {\n\t\t\t    x[j] *= a[kplus1 + j * a_dim1];\n\t\t\t}\n\t\t    }\n/* L20: */\n\t\t}\n\t    } else {\n\t\tjx = kx;\n\t\ti__1 = *n;\n\t\tfor (j = 1; j <= i__1; ++j) {\n\t\t    if (x[jx] != 0.f) {\n\t\t\ttemp = x[jx];\n\t\t\tix = kx;\n\t\t\tl = kplus1 - j;\n/* Computing MAX */\n\t\t\ti__4 = 1, i__2 = j - *k;\n\t\t\ti__3 = j - 1;\n\t\t\tfor (i__ = max(i__4,i__2); i__ <= i__3; ++i__) {\n\t\t\t    x[ix] += temp * a[l + i__ + j * a_dim1];\n\t\t\t    ix += *incx;\n/* L30: */\n\t\t\t}\n\t\t\tif (nounit) {\n\t\t\t    x[jx] *= a[kplus1 + j * a_dim1];\n\t\t\t}\n\t\t    }\n\t\t    jx += *incx;\n\t\t    if (j > *k) {\n\t\t\tkx += *incx;\n\t\t    }\n/* L40: */\n\t\t}\n\t    }\n\t} else {\n\t    if (*incx == 1) {\n\t\tfor (j = *n; j >= 1; --j) {\n\t\t    if (x[j] != 0.f) {\n\t\t\ttemp = x[j];\n\t\t\tl = 1 - j;\n/* Computing MIN */\n\t\t\ti__1 = *n, i__3 = j + *k;\n\t\t\ti__4 = j + 1;\n\t\t\tfor (i__ = min(i__1,i__3); i__ >= i__4; --i__) {\n\t\t\t    x[i__] += temp * a[l + i__ + j * a_dim1];\n/* L50: */\n\t\t\t}\n\t\t\tif (nounit) {\n\t\t\t    x[j] *= a[j * a_dim1 + 1];\n\t\t\t}\n\t\t    }\n/* L60: */\n\t\t}\n\t    } else {\n\t\tkx += (*n - 1) * *incx;\n\t\tjx = kx;\n\t\tfor (j = *n; j >= 1; --j) {\n\t\t    if (x[jx] != 0.f) {\n\t\t\ttemp = x[jx];\n\t\t\tix = kx;\n\t\t\tl = 1 - j;\n/* Computing MIN */\n\t\t\ti__4 = *n, i__1 = j + *k;\n\t\t\ti__3 = j + 1;\n\t\t\tfor (i__ = min(i__4,i__1); i__ >= i__3; --i__) {\n\t\t\t    x[ix] += temp * a[l + i__ + j * a_dim1];\n\t\t\t    ix -= *incx;\n/* L70: */\n\t\t\t}\n\t\t\tif (nounit) {\n\t\t\t    x[jx] *= a[j * a_dim1 + 1];\n\t\t\t}\n\t\t    }\n\t\t    jx -= *incx;\n\t\t    if (*n - j >= *k) {\n\t\t\tkx -= *incx;\n\t\t    }\n/* L80: */\n\t\t}\n\t    }\n\t}\n    } else {\n\n/*        Form  x := A'*x. */\n\n\tif (lsame_(uplo, \"U\", (ftnlen)1, (ftnlen)1)) {\n\t    kplus1 = *k + 1;\n\t    if (*incx == 1) {\n\t\tfor (j = *n; j >= 1; --j) {\n\t\t    temp = x[j];\n\t\t    l = kplus1 - j;\n\t\t    if (nounit) {\n\t\t\ttemp *= a[kplus1 + j * a_dim1];\n\t\t    }\n/* Computing MAX */\n\t\t    i__4 = 1, i__1 = j - *k;\n\t\t    i__3 = max(i__4,i__1);\n\t\t    for (i__ = j - 1; i__ >= i__3; --i__) {\n\t\t\ttemp += a[l + i__ + j * a_dim1] * x[i__];\n/* L90: */\n\t\t    }\n\t\t    x[j] = temp;\n/* L100: */\n\t\t}\n\t    } else {\n\t\tkx += (*n - 1) * *incx;\n\t\tjx = kx;\n\t\tfor (j = *n; j >= 1; --j) {\n\t\t    temp = x[jx];\n\t\t    kx -= *incx;\n\t\t    ix = kx;\n\t\t    l = kplus1 - j;\n\t\t    if (nounit) {\n\t\t\ttemp *= a[kplus1 + j * a_dim1];\n\t\t    }\n/* Computing MAX */\n\t\t    i__4 = 1, i__1 = j - *k;\n\t\t    i__3 = max(i__4,i__1);\n\t\t    for (i__ = j - 1; i__ >= i__3; --i__) {\n\t\t\ttemp += a[l + i__ + j * a_dim1] * x[ix];\n\t\t\tix -= *incx;\n/* L110: */\n\t\t    }\n\t\t    x[jx] = temp;\n\t\t    jx -= *incx;\n/* L120: */\n\t\t}\n\t    }\n\t} else {\n\t    if (*incx == 1) {\n\t\ti__3 = *n;\n\t\tfor (j = 1; j <= i__3; ++j) {\n\t\t    temp = x[j];\n\t\t    l = 1 - j;\n\t\t    if (nounit) {\n\t\t\ttemp *= a[j * a_dim1 + 1];\n\t\t    }\n/* Computing MIN */\n\t\t    i__1 = *n, i__2 = j + *k;\n\t\t    i__4 = min(i__1,i__2);\n\t\t    for (i__ = j + 1; i__ <= i__4; ++i__) {\n\t\t\ttemp += a[l + i__ + j * a_dim1] * x[i__];\n/* L130: */\n\t\t    }\n\t\t    x[j] = temp;\n/* L140: */\n\t\t}\n\t    } else {\n\t\tjx = kx;\n\t\ti__3 = *n;\n\t\tfor (j = 1; j <= i__3; ++j) {\n\t\t    temp = x[jx];\n\t\t    kx += *incx;\n\t\t    ix = kx;\n\t\t    l = 1 - j;\n\t\t    if (nounit) {\n\t\t\ttemp *= a[j * a_dim1 + 1];\n\t\t    }\n/* Computing MIN */\n\t\t    i__1 = *n, i__2 = j + *k;\n\t\t    i__4 = min(i__1,i__2);\n\t\t    for (i__ = j + 1; i__ <= i__4; ++i__) {\n\t\t\ttemp += a[l + i__ + j * a_dim1] * x[ix];\n\t\t\tix += *incx;\n/* L150: */\n\t\t    }\n\t\t    x[jx] = temp;\n\t\t    jx += *incx;\n/* L160: */\n\t\t}\n\t    }\n\t}\n    }\n\n    return 0;\n\n/*     End of STBMV . */\n\n} /* stbmv_ */\n\n"
  },
  {
    "path": "3rdparty/eigen3/blas/f2c/zhbmv.c",
    "content": "/* zhbmv.f -- translated by f2c (version 20100827).\n   You must link the resulting object file with libf2c:\n\ton Microsoft Windows system, link with libf2c.lib;\n\ton Linux or Unix systems, link with .../path/to/libf2c.a -lm\n\tor, if you install libf2c.a in a standard place, with -lf2c -lm\n\t-- in that order, at the end of the command line, as in\n\t\tcc *.o -lf2c -lm\n\tSource for libf2c is in /netlib/f2c/libf2c.zip, e.g.,\n\n\t\thttp://www.netlib.org/f2c/libf2c.zip\n*/\n\n#include \"datatypes.h\"\n\n/* Subroutine */ int zhbmv_(char *uplo, integer *n, integer *k, doublecomplex \n\t*alpha, doublecomplex *a, integer *lda, doublecomplex *x, integer *\n\tincx, doublecomplex *beta, doublecomplex *y, integer *incy, ftnlen \n\tuplo_len)\n{\n    /* System generated locals */\n    integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5;\n    doublereal d__1;\n    doublecomplex z__1, z__2, z__3, z__4;\n\n    /* Builtin functions */\n    void d_cnjg(doublecomplex *, doublecomplex *);\n\n    /* Local variables */\n    integer i__, j, l, ix, iy, jx, jy, kx, ky, info;\n    doublecomplex temp1, temp2;\n    extern logical lsame_(char *, char *, ftnlen, ftnlen);\n    integer kplus1;\n    extern /* Subroutine */ int xerbla_(char *, integer *, ftnlen);\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  ZHBMV  performs the matrix-vector  operation */\n\n/*     y := alpha*A*x + beta*y, */\n\n/*  where alpha and beta are scalars, x and y are n element vectors and */\n/*  A is an n by n hermitian band matrix, with k super-diagonals. */\n\n/*  Arguments */\n/*  ========== */\n\n/*  UPLO   - CHARACTER*1. */\n/*           On entry, UPLO specifies whether the upper or lower */\n/*           triangular part of the band matrix A is being supplied as */\n/*           follows: */\n\n/*              UPLO = 'U' or 'u'   The upper triangular part of A is */\n/*                                  being supplied. */\n\n/*              UPLO = 'L' or 'l'   The lower triangular part of A is */\n/*                                  being supplied. */\n\n/*           Unchanged on exit. */\n\n/*  N      - INTEGER. */\n/*           On entry, N specifies the order of the matrix A. */\n/*           N must be at least zero. */\n/*           Unchanged on exit. */\n\n/*  K      - INTEGER. */\n/*           On entry, K specifies the number of super-diagonals of the */\n/*           matrix A. K must satisfy  0 .le. K. */\n/*           Unchanged on exit. */\n\n/*  ALPHA  - COMPLEX*16      . */\n/*           On entry, ALPHA specifies the scalar alpha. */\n/*           Unchanged on exit. */\n\n/*  A      - COMPLEX*16       array of DIMENSION ( LDA, n ). */\n/*           Before entry with UPLO = 'U' or 'u', the leading ( k + 1 ) */\n/*           by n part of the array A must contain the upper triangular */\n/*           band part of the hermitian matrix, supplied column by */\n/*           column, with the leading diagonal of the matrix in row */\n/*           ( k + 1 ) of the array, the first super-diagonal starting at */\n/*           position 2 in row k, and so on. The top left k by k triangle */\n/*           of the array A is not referenced. */\n/*           The following program segment will transfer the upper */\n/*           triangular part of a hermitian band matrix from conventional */\n/*           full matrix storage to band storage: */\n\n/*                 DO 20, J = 1, N */\n/*                    M = K + 1 - J */\n/*                    DO 10, I = MAX( 1, J - K ), J */\n/*                       A( M + I, J ) = matrix( I, J ) */\n/*              10    CONTINUE */\n/*              20 CONTINUE */\n\n/*           Before entry with UPLO = 'L' or 'l', the leading ( k + 1 ) */\n/*           by n part of the array A must contain the lower triangular */\n/*           band part of the hermitian matrix, supplied column by */\n/*           column, with the leading diagonal of the matrix in row 1 of */\n/*           the array, the first sub-diagonal starting at position 1 in */\n/*           row 2, and so on. The bottom right k by k triangle of the */\n/*           array A is not referenced. */\n/*           The following program segment will transfer the lower */\n/*           triangular part of a hermitian band matrix from conventional */\n/*           full matrix storage to band storage: */\n\n/*                 DO 20, J = 1, N */\n/*                    M = 1 - J */\n/*                    DO 10, I = J, MIN( N, J + K ) */\n/*                       A( M + I, J ) = matrix( I, J ) */\n/*              10    CONTINUE */\n/*              20 CONTINUE */\n\n/*           Note that the imaginary parts of the diagonal elements need */\n/*           not be set and are assumed to be zero. */\n/*           Unchanged on exit. */\n\n/*  LDA    - INTEGER. */\n/*           On entry, LDA specifies the first dimension of A as declared */\n/*           in the calling (sub) program. LDA must be at least */\n/*           ( k + 1 ). */\n/*           Unchanged on exit. */\n\n/*  X      - COMPLEX*16       array of DIMENSION at least */\n/*           ( 1 + ( n - 1 )*abs( INCX ) ). */\n/*           Before entry, the incremented array X must contain the */\n/*           vector x. */\n/*           Unchanged on exit. */\n\n/*  INCX   - INTEGER. */\n/*           On entry, INCX specifies the increment for the elements of */\n/*           X. INCX must not be zero. */\n/*           Unchanged on exit. */\n\n/*  BETA   - COMPLEX*16      . */\n/*           On entry, BETA specifies the scalar beta. */\n/*           Unchanged on exit. */\n\n/*  Y      - COMPLEX*16       array of DIMENSION at least */\n/*           ( 1 + ( n - 1 )*abs( INCY ) ). */\n/*           Before entry, the incremented array Y must contain the */\n/*           vector y. On exit, Y is overwritten by the updated vector y. */\n\n/*  INCY   - INTEGER. */\n/*           On entry, INCY specifies the increment for the elements of */\n/*           Y. INCY must not be zero. */\n/*           Unchanged on exit. */\n\n/*  Further Details */\n/*  =============== */\n\n/*  Level 2 Blas routine. */\n\n/*  -- Written on 22-October-1986. */\n/*     Jack Dongarra, Argonne National Lab. */\n/*     Jeremy Du Croz, Nag Central Office. */\n/*     Sven Hammarling, Nag Central Office. */\n/*     Richard Hanson, Sandia National Labs. */\n\n/*  ===================================================================== */\n\n/*     .. Parameters .. */\n/*     .. */\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. External Functions .. */\n/*     .. */\n/*     .. External Subroutines .. */\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n\n/*     Test the input parameters. */\n\n    /* Parameter adjustments */\n    a_dim1 = *lda;\n    a_offset = 1 + a_dim1;\n    a -= a_offset;\n    --x;\n    --y;\n\n    /* Function Body */\n    info = 0;\n    if (! lsame_(uplo, \"U\", (ftnlen)1, (ftnlen)1) && ! lsame_(uplo, \"L\", (\n\t    ftnlen)1, (ftnlen)1)) {\n\tinfo = 1;\n    } else if (*n < 0) {\n\tinfo = 2;\n    } else if (*k < 0) {\n\tinfo = 3;\n    } else if (*lda < *k + 1) {\n\tinfo = 6;\n    } else if (*incx == 0) {\n\tinfo = 8;\n    } else if (*incy == 0) {\n\tinfo = 11;\n    }\n    if (info != 0) {\n\txerbla_(\"ZHBMV \", &info, (ftnlen)6);\n\treturn 0;\n    }\n\n/*     Quick return if possible. */\n\n    if (*n == 0 || (alpha->r == 0. && alpha->i == 0. && (beta->r == 1. && \n                                                         beta->i == 0.))) {\n\treturn 0;\n    }\n\n/*     Set up the start points in  X  and  Y. */\n\n    if (*incx > 0) {\n\tkx = 1;\n    } else {\n\tkx = 1 - (*n - 1) * *incx;\n    }\n    if (*incy > 0) {\n\tky = 1;\n    } else {\n\tky = 1 - (*n - 1) * *incy;\n    }\n\n/*     Start the operations. In this version the elements of the array A */\n/*     are accessed sequentially with one pass through A. */\n\n/*     First form  y := beta*y. */\n\n    if (beta->r != 1. || beta->i != 0.) {\n\tif (*incy == 1) {\n\t    if (beta->r == 0. && beta->i == 0.) {\n\t\ti__1 = *n;\n\t\tfor (i__ = 1; i__ <= i__1; ++i__) {\n\t\t    i__2 = i__;\n\t\t    y[i__2].r = 0., y[i__2].i = 0.;\n/* L10: */\n\t\t}\n\t    } else {\n\t\ti__1 = *n;\n\t\tfor (i__ = 1; i__ <= i__1; ++i__) {\n\t\t    i__2 = i__;\n\t\t    i__3 = i__;\n\t\t    z__1.r = beta->r * y[i__3].r - beta->i * y[i__3].i, \n\t\t\t    z__1.i = beta->r * y[i__3].i + beta->i * y[i__3]\n\t\t\t    .r;\n\t\t    y[i__2].r = z__1.r, y[i__2].i = z__1.i;\n/* L20: */\n\t\t}\n\t    }\n\t} else {\n\t    iy = ky;\n\t    if (beta->r == 0. && beta->i == 0.) {\n\t\ti__1 = *n;\n\t\tfor (i__ = 1; i__ <= i__1; ++i__) {\n\t\t    i__2 = iy;\n\t\t    y[i__2].r = 0., y[i__2].i = 0.;\n\t\t    iy += *incy;\n/* L30: */\n\t\t}\n\t    } else {\n\t\ti__1 = *n;\n\t\tfor (i__ = 1; i__ <= i__1; ++i__) {\n\t\t    i__2 = iy;\n\t\t    i__3 = iy;\n\t\t    z__1.r = beta->r * y[i__3].r - beta->i * y[i__3].i, \n\t\t\t    z__1.i = beta->r * y[i__3].i + beta->i * y[i__3]\n\t\t\t    .r;\n\t\t    y[i__2].r = z__1.r, y[i__2].i = z__1.i;\n\t\t    iy += *incy;\n/* L40: */\n\t\t}\n\t    }\n\t}\n    }\n    if (alpha->r == 0. && alpha->i == 0.) {\n\treturn 0;\n    }\n    if (lsame_(uplo, \"U\", (ftnlen)1, (ftnlen)1)) {\n\n/*        Form  y  when upper triangle of A is stored. */\n\n\tkplus1 = *k + 1;\n\tif (*incx == 1 && *incy == 1) {\n\t    i__1 = *n;\n\t    for (j = 1; j <= i__1; ++j) {\n\t\ti__2 = j;\n\t\tz__1.r = alpha->r * x[i__2].r - alpha->i * x[i__2].i, z__1.i =\n\t\t\t alpha->r * x[i__2].i + alpha->i * x[i__2].r;\n\t\ttemp1.r = z__1.r, temp1.i = z__1.i;\n\t\ttemp2.r = 0., temp2.i = 0.;\n\t\tl = kplus1 - j;\n/* Computing MAX */\n\t\ti__2 = 1, i__3 = j - *k;\n\t\ti__4 = j - 1;\n\t\tfor (i__ = max(i__2,i__3); i__ <= i__4; ++i__) {\n\t\t    i__2 = i__;\n\t\t    i__3 = i__;\n\t\t    i__5 = l + i__ + j * a_dim1;\n\t\t    z__2.r = temp1.r * a[i__5].r - temp1.i * a[i__5].i, \n\t\t\t    z__2.i = temp1.r * a[i__5].i + temp1.i * a[i__5]\n\t\t\t    .r;\n\t\t    z__1.r = y[i__3].r + z__2.r, z__1.i = y[i__3].i + z__2.i;\n\t\t    y[i__2].r = z__1.r, y[i__2].i = z__1.i;\n\t\t    d_cnjg(&z__3, &a[l + i__ + j * a_dim1]);\n\t\t    i__2 = i__;\n\t\t    z__2.r = z__3.r * x[i__2].r - z__3.i * x[i__2].i, z__2.i =\n\t\t\t     z__3.r * x[i__2].i + z__3.i * x[i__2].r;\n\t\t    z__1.r = temp2.r + z__2.r, z__1.i = temp2.i + z__2.i;\n\t\t    temp2.r = z__1.r, temp2.i = z__1.i;\n/* L50: */\n\t\t}\n\t\ti__4 = j;\n\t\ti__2 = j;\n\t\ti__3 = kplus1 + j * a_dim1;\n\t\td__1 = a[i__3].r;\n\t\tz__3.r = d__1 * temp1.r, z__3.i = d__1 * temp1.i;\n\t\tz__2.r = y[i__2].r + z__3.r, z__2.i = y[i__2].i + z__3.i;\n\t\tz__4.r = alpha->r * temp2.r - alpha->i * temp2.i, z__4.i = \n\t\t\talpha->r * temp2.i + alpha->i * temp2.r;\n\t\tz__1.r = z__2.r + z__4.r, z__1.i = z__2.i + z__4.i;\n\t\ty[i__4].r = z__1.r, y[i__4].i = z__1.i;\n/* L60: */\n\t    }\n\t} else {\n\t    jx = kx;\n\t    jy = ky;\n\t    i__1 = *n;\n\t    for (j = 1; j <= i__1; ++j) {\n\t\ti__4 = jx;\n\t\tz__1.r = alpha->r * x[i__4].r - alpha->i * x[i__4].i, z__1.i =\n\t\t\t alpha->r * x[i__4].i + alpha->i * x[i__4].r;\n\t\ttemp1.r = z__1.r, temp1.i = z__1.i;\n\t\ttemp2.r = 0., temp2.i = 0.;\n\t\tix = kx;\n\t\tiy = ky;\n\t\tl = kplus1 - j;\n/* Computing MAX */\n\t\ti__4 = 1, i__2 = j - *k;\n\t\ti__3 = j - 1;\n\t\tfor (i__ = max(i__4,i__2); i__ <= i__3; ++i__) {\n\t\t    i__4 = iy;\n\t\t    i__2 = iy;\n\t\t    i__5 = l + i__ + j * a_dim1;\n\t\t    z__2.r = temp1.r * a[i__5].r - temp1.i * a[i__5].i, \n\t\t\t    z__2.i = temp1.r * a[i__5].i + temp1.i * a[i__5]\n\t\t\t    .r;\n\t\t    z__1.r = y[i__2].r + z__2.r, z__1.i = y[i__2].i + z__2.i;\n\t\t    y[i__4].r = z__1.r, y[i__4].i = z__1.i;\n\t\t    d_cnjg(&z__3, &a[l + i__ + j * a_dim1]);\n\t\t    i__4 = ix;\n\t\t    z__2.r = z__3.r * x[i__4].r - z__3.i * x[i__4].i, z__2.i =\n\t\t\t     z__3.r * x[i__4].i + z__3.i * x[i__4].r;\n\t\t    z__1.r = temp2.r + z__2.r, z__1.i = temp2.i + z__2.i;\n\t\t    temp2.r = z__1.r, temp2.i = z__1.i;\n\t\t    ix += *incx;\n\t\t    iy += *incy;\n/* L70: */\n\t\t}\n\t\ti__3 = jy;\n\t\ti__4 = jy;\n\t\ti__2 = kplus1 + j * a_dim1;\n\t\td__1 = a[i__2].r;\n\t\tz__3.r = d__1 * temp1.r, z__3.i = d__1 * temp1.i;\n\t\tz__2.r = y[i__4].r + z__3.r, z__2.i = y[i__4].i + z__3.i;\n\t\tz__4.r = alpha->r * temp2.r - alpha->i * temp2.i, z__4.i = \n\t\t\talpha->r * temp2.i + alpha->i * temp2.r;\n\t\tz__1.r = z__2.r + z__4.r, z__1.i = z__2.i + z__4.i;\n\t\ty[i__3].r = z__1.r, y[i__3].i = z__1.i;\n\t\tjx += *incx;\n\t\tjy += *incy;\n\t\tif (j > *k) {\n\t\t    kx += *incx;\n\t\t    ky += *incy;\n\t\t}\n/* L80: */\n\t    }\n\t}\n    } else {\n\n/*        Form  y  when lower triangle of A is stored. */\n\n\tif (*incx == 1 && *incy == 1) {\n\t    i__1 = *n;\n\t    for (j = 1; j <= i__1; ++j) {\n\t\ti__3 = j;\n\t\tz__1.r = alpha->r * x[i__3].r - alpha->i * x[i__3].i, z__1.i =\n\t\t\t alpha->r * x[i__3].i + alpha->i * x[i__3].r;\n\t\ttemp1.r = z__1.r, temp1.i = z__1.i;\n\t\ttemp2.r = 0., temp2.i = 0.;\n\t\ti__3 = j;\n\t\ti__4 = j;\n\t\ti__2 = j * a_dim1 + 1;\n\t\td__1 = a[i__2].r;\n\t\tz__2.r = d__1 * temp1.r, z__2.i = d__1 * temp1.i;\n\t\tz__1.r = y[i__4].r + z__2.r, z__1.i = y[i__4].i + z__2.i;\n\t\ty[i__3].r = z__1.r, y[i__3].i = z__1.i;\n\t\tl = 1 - j;\n/* Computing MIN */\n\t\ti__4 = *n, i__2 = j + *k;\n\t\ti__3 = min(i__4,i__2);\n\t\tfor (i__ = j + 1; i__ <= i__3; ++i__) {\n\t\t    i__4 = i__;\n\t\t    i__2 = i__;\n\t\t    i__5 = l + i__ + j * a_dim1;\n\t\t    z__2.r = temp1.r * a[i__5].r - temp1.i * a[i__5].i, \n\t\t\t    z__2.i = temp1.r * a[i__5].i + temp1.i * a[i__5]\n\t\t\t    .r;\n\t\t    z__1.r = y[i__2].r + z__2.r, z__1.i = y[i__2].i + z__2.i;\n\t\t    y[i__4].r = z__1.r, y[i__4].i = z__1.i;\n\t\t    d_cnjg(&z__3, &a[l + i__ + j * a_dim1]);\n\t\t    i__4 = i__;\n\t\t    z__2.r = z__3.r * x[i__4].r - z__3.i * x[i__4].i, z__2.i =\n\t\t\t     z__3.r * x[i__4].i + z__3.i * x[i__4].r;\n\t\t    z__1.r = temp2.r + z__2.r, z__1.i = temp2.i + z__2.i;\n\t\t    temp2.r = z__1.r, temp2.i = z__1.i;\n/* L90: */\n\t\t}\n\t\ti__3 = j;\n\t\ti__4 = j;\n\t\tz__2.r = alpha->r * temp2.r - alpha->i * temp2.i, z__2.i = \n\t\t\talpha->r * temp2.i + alpha->i * temp2.r;\n\t\tz__1.r = y[i__4].r + z__2.r, z__1.i = y[i__4].i + z__2.i;\n\t\ty[i__3].r = z__1.r, y[i__3].i = z__1.i;\n/* L100: */\n\t    }\n\t} else {\n\t    jx = kx;\n\t    jy = ky;\n\t    i__1 = *n;\n\t    for (j = 1; j <= i__1; ++j) {\n\t\ti__3 = jx;\n\t\tz__1.r = alpha->r * x[i__3].r - alpha->i * x[i__3].i, z__1.i =\n\t\t\t alpha->r * x[i__3].i + alpha->i * x[i__3].r;\n\t\ttemp1.r = z__1.r, temp1.i = z__1.i;\n\t\ttemp2.r = 0., temp2.i = 0.;\n\t\ti__3 = jy;\n\t\ti__4 = jy;\n\t\ti__2 = j * a_dim1 + 1;\n\t\td__1 = a[i__2].r;\n\t\tz__2.r = d__1 * temp1.r, z__2.i = d__1 * temp1.i;\n\t\tz__1.r = y[i__4].r + z__2.r, z__1.i = y[i__4].i + z__2.i;\n\t\ty[i__3].r = z__1.r, y[i__3].i = z__1.i;\n\t\tl = 1 - j;\n\t\tix = jx;\n\t\tiy = jy;\n/* Computing MIN */\n\t\ti__4 = *n, i__2 = j + *k;\n\t\ti__3 = min(i__4,i__2);\n\t\tfor (i__ = j + 1; i__ <= i__3; ++i__) {\n\t\t    ix += *incx;\n\t\t    iy += *incy;\n\t\t    i__4 = iy;\n\t\t    i__2 = iy;\n\t\t    i__5 = l + i__ + j * a_dim1;\n\t\t    z__2.r = temp1.r * a[i__5].r - temp1.i * a[i__5].i, \n\t\t\t    z__2.i = temp1.r * a[i__5].i + temp1.i * a[i__5]\n\t\t\t    .r;\n\t\t    z__1.r = y[i__2].r + z__2.r, z__1.i = y[i__2].i + z__2.i;\n\t\t    y[i__4].r = z__1.r, y[i__4].i = z__1.i;\n\t\t    d_cnjg(&z__3, &a[l + i__ + j * a_dim1]);\n\t\t    i__4 = ix;\n\t\t    z__2.r = z__3.r * x[i__4].r - z__3.i * x[i__4].i, z__2.i =\n\t\t\t     z__3.r * x[i__4].i + z__3.i * x[i__4].r;\n\t\t    z__1.r = temp2.r + z__2.r, z__1.i = temp2.i + z__2.i;\n\t\t    temp2.r = z__1.r, temp2.i = z__1.i;\n/* L110: */\n\t\t}\n\t\ti__3 = jy;\n\t\ti__4 = jy;\n\t\tz__2.r = alpha->r * temp2.r - alpha->i * temp2.i, z__2.i = \n\t\t\talpha->r * temp2.i + alpha->i * temp2.r;\n\t\tz__1.r = y[i__4].r + z__2.r, z__1.i = y[i__4].i + z__2.i;\n\t\ty[i__3].r = z__1.r, y[i__3].i = z__1.i;\n\t\tjx += *incx;\n\t\tjy += *incy;\n/* L120: */\n\t    }\n\t}\n    }\n\n    return 0;\n\n/*     End of ZHBMV . */\n\n} /* zhbmv_ */\n\n"
  },
  {
    "path": "3rdparty/eigen3/blas/f2c/zhpmv.c",
    "content": "/* zhpmv.f -- translated by f2c (version 20100827).\n   You must link the resulting object file with libf2c:\n\ton Microsoft Windows system, link with libf2c.lib;\n\ton Linux or Unix systems, link with .../path/to/libf2c.a -lm\n\tor, if you install libf2c.a in a standard place, with -lf2c -lm\n\t-- in that order, at the end of the command line, as in\n\t\tcc *.o -lf2c -lm\n\tSource for libf2c is in /netlib/f2c/libf2c.zip, e.g.,\n\n\t\thttp://www.netlib.org/f2c/libf2c.zip\n*/\n\n#include \"datatypes.h\"\n\n/* Subroutine */ int zhpmv_(char *uplo, integer *n, doublecomplex *alpha, \n\tdoublecomplex *ap, doublecomplex *x, integer *incx, doublecomplex *\n\tbeta, doublecomplex *y, integer *incy, ftnlen uplo_len)\n{\n    /* System generated locals */\n    integer i__1, i__2, i__3, i__4, i__5;\n    doublereal d__1;\n    doublecomplex z__1, z__2, z__3, z__4;\n\n    /* Builtin functions */\n    void d_cnjg(doublecomplex *, doublecomplex *);\n\n    /* Local variables */\n    integer i__, j, k, kk, ix, iy, jx, jy, kx, ky, info;\n    doublecomplex temp1, temp2;\n    extern logical lsame_(char *, char *, ftnlen, ftnlen);\n    extern /* Subroutine */ int xerbla_(char *, integer *, ftnlen);\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  ZHPMV  performs the matrix-vector operation */\n\n/*     y := alpha*A*x + beta*y, */\n\n/*  where alpha and beta are scalars, x and y are n element vectors and */\n/*  A is an n by n hermitian matrix, supplied in packed form. */\n\n/*  Arguments */\n/*  ========== */\n\n/*  UPLO   - CHARACTER*1. */\n/*           On entry, UPLO specifies whether the upper or lower */\n/*           triangular part of the matrix A is supplied in the packed */\n/*           array AP as follows: */\n\n/*              UPLO = 'U' or 'u'   The upper triangular part of A is */\n/*                                  supplied in AP. */\n\n/*              UPLO = 'L' or 'l'   The lower triangular part of A is */\n/*                                  supplied in AP. */\n\n/*           Unchanged on exit. */\n\n/*  N      - INTEGER. */\n/*           On entry, N specifies the order of the matrix A. */\n/*           N must be at least zero. */\n/*           Unchanged on exit. */\n\n/*  ALPHA  - COMPLEX*16      . */\n/*           On entry, ALPHA specifies the scalar alpha. */\n/*           Unchanged on exit. */\n\n/*  AP     - COMPLEX*16       array of DIMENSION at least */\n/*           ( ( n*( n + 1 ) )/2 ). */\n/*           Before entry with UPLO = 'U' or 'u', the array AP must */\n/*           contain the upper triangular part of the hermitian matrix */\n/*           packed sequentially, column by column, so that AP( 1 ) */\n/*           contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 ) */\n/*           and a( 2, 2 ) respectively, and so on. */\n/*           Before entry with UPLO = 'L' or 'l', the array AP must */\n/*           contain the lower triangular part of the hermitian matrix */\n/*           packed sequentially, column by column, so that AP( 1 ) */\n/*           contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 ) */\n/*           and a( 3, 1 ) respectively, and so on. */\n/*           Note that the imaginary parts of the diagonal elements need */\n/*           not be set and are assumed to be zero. */\n/*           Unchanged on exit. */\n\n/*  X      - COMPLEX*16       array of dimension at least */\n/*           ( 1 + ( n - 1 )*abs( INCX ) ). */\n/*           Before entry, the incremented array X must contain the n */\n/*           element vector x. */\n/*           Unchanged on exit. */\n\n/*  INCX   - INTEGER. */\n/*           On entry, INCX specifies the increment for the elements of */\n/*           X. INCX must not be zero. */\n/*           Unchanged on exit. */\n\n/*  BETA   - COMPLEX*16      . */\n/*           On entry, BETA specifies the scalar beta. When BETA is */\n/*           supplied as zero then Y need not be set on input. */\n/*           Unchanged on exit. */\n\n/*  Y      - COMPLEX*16       array of dimension at least */\n/*           ( 1 + ( n - 1 )*abs( INCY ) ). */\n/*           Before entry, the incremented array Y must contain the n */\n/*           element vector y. On exit, Y is overwritten by the updated */\n/*           vector y. */\n\n/*  INCY   - INTEGER. */\n/*           On entry, INCY specifies the increment for the elements of */\n/*           Y. INCY must not be zero. */\n/*           Unchanged on exit. */\n\n/*  Further Details */\n/*  =============== */\n\n/*  Level 2 Blas routine. */\n\n/*  -- Written on 22-October-1986. */\n/*     Jack Dongarra, Argonne National Lab. */\n/*     Jeremy Du Croz, Nag Central Office. */\n/*     Sven Hammarling, Nag Central Office. */\n/*     Richard Hanson, Sandia National Labs. */\n\n/*  ===================================================================== */\n\n/*     .. Parameters .. */\n/*     .. */\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. External Functions .. */\n/*     .. */\n/*     .. External Subroutines .. */\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n\n/*     Test the input parameters. */\n\n    /* Parameter adjustments */\n    --y;\n    --x;\n    --ap;\n\n    /* Function Body */\n    info = 0;\n    if (! lsame_(uplo, \"U\", (ftnlen)1, (ftnlen)1) && ! lsame_(uplo, \"L\", (\n\t    ftnlen)1, (ftnlen)1)) {\n\tinfo = 1;\n    } else if (*n < 0) {\n\tinfo = 2;\n    } else if (*incx == 0) {\n\tinfo = 6;\n    } else if (*incy == 0) {\n\tinfo = 9;\n    }\n    if (info != 0) {\n\txerbla_(\"ZHPMV \", &info, (ftnlen)6);\n\treturn 0;\n    }\n\n/*     Quick return if possible. */\n\n    if (*n == 0 || (alpha->r == 0. && alpha->i == 0. && (beta->r == 1. && \n                                                         beta->i == 0.))) {\n\treturn 0;\n    }\n\n/*     Set up the start points in  X  and  Y. */\n\n    if (*incx > 0) {\n\tkx = 1;\n    } else {\n\tkx = 1 - (*n - 1) * *incx;\n    }\n    if (*incy > 0) {\n\tky = 1;\n    } else {\n\tky = 1 - (*n - 1) * *incy;\n    }\n\n/*     Start the operations. In this version the elements of the array AP */\n/*     are accessed sequentially with one pass through AP. */\n\n/*     First form  y := beta*y. */\n\n    if (beta->r != 1. || beta->i != 0.) {\n\tif (*incy == 1) {\n\t    if (beta->r == 0. && beta->i == 0.) {\n\t\ti__1 = *n;\n\t\tfor (i__ = 1; i__ <= i__1; ++i__) {\n\t\t    i__2 = i__;\n\t\t    y[i__2].r = 0., y[i__2].i = 0.;\n/* L10: */\n\t\t}\n\t    } else {\n\t\ti__1 = *n;\n\t\tfor (i__ = 1; i__ <= i__1; ++i__) {\n\t\t    i__2 = i__;\n\t\t    i__3 = i__;\n\t\t    z__1.r = beta->r * y[i__3].r - beta->i * y[i__3].i, \n\t\t\t    z__1.i = beta->r * y[i__3].i + beta->i * y[i__3]\n\t\t\t    .r;\n\t\t    y[i__2].r = z__1.r, y[i__2].i = z__1.i;\n/* L20: */\n\t\t}\n\t    }\n\t} else {\n\t    iy = ky;\n\t    if (beta->r == 0. && beta->i == 0.) {\n\t\ti__1 = *n;\n\t\tfor (i__ = 1; i__ <= i__1; ++i__) {\n\t\t    i__2 = iy;\n\t\t    y[i__2].r = 0., y[i__2].i = 0.;\n\t\t    iy += *incy;\n/* L30: */\n\t\t}\n\t    } else {\n\t\ti__1 = *n;\n\t\tfor (i__ = 1; i__ <= i__1; ++i__) {\n\t\t    i__2 = iy;\n\t\t    i__3 = iy;\n\t\t    z__1.r = beta->r * y[i__3].r - beta->i * y[i__3].i, \n\t\t\t    z__1.i = beta->r * y[i__3].i + beta->i * y[i__3]\n\t\t\t    .r;\n\t\t    y[i__2].r = z__1.r, y[i__2].i = z__1.i;\n\t\t    iy += *incy;\n/* L40: */\n\t\t}\n\t    }\n\t}\n    }\n    if (alpha->r == 0. && alpha->i == 0.) {\n\treturn 0;\n    }\n    kk = 1;\n    if (lsame_(uplo, \"U\", (ftnlen)1, (ftnlen)1)) {\n\n/*        Form  y  when AP contains the upper triangle. */\n\n\tif (*incx == 1 && *incy == 1) {\n\t    i__1 = *n;\n\t    for (j = 1; j <= i__1; ++j) {\n\t\ti__2 = j;\n\t\tz__1.r = alpha->r * x[i__2].r - alpha->i * x[i__2].i, z__1.i =\n\t\t\t alpha->r * x[i__2].i + alpha->i * x[i__2].r;\n\t\ttemp1.r = z__1.r, temp1.i = z__1.i;\n\t\ttemp2.r = 0., temp2.i = 0.;\n\t\tk = kk;\n\t\ti__2 = j - 1;\n\t\tfor (i__ = 1; i__ <= i__2; ++i__) {\n\t\t    i__3 = i__;\n\t\t    i__4 = i__;\n\t\t    i__5 = k;\n\t\t    z__2.r = temp1.r * ap[i__5].r - temp1.i * ap[i__5].i, \n\t\t\t    z__2.i = temp1.r * ap[i__5].i + temp1.i * ap[i__5]\n\t\t\t    .r;\n\t\t    z__1.r = y[i__4].r + z__2.r, z__1.i = y[i__4].i + z__2.i;\n\t\t    y[i__3].r = z__1.r, y[i__3].i = z__1.i;\n\t\t    d_cnjg(&z__3, &ap[k]);\n\t\t    i__3 = i__;\n\t\t    z__2.r = z__3.r * x[i__3].r - z__3.i * x[i__3].i, z__2.i =\n\t\t\t     z__3.r * x[i__3].i + z__3.i * x[i__3].r;\n\t\t    z__1.r = temp2.r + z__2.r, z__1.i = temp2.i + z__2.i;\n\t\t    temp2.r = z__1.r, temp2.i = z__1.i;\n\t\t    ++k;\n/* L50: */\n\t\t}\n\t\ti__2 = j;\n\t\ti__3 = j;\n\t\ti__4 = kk + j - 1;\n\t\td__1 = ap[i__4].r;\n\t\tz__3.r = d__1 * temp1.r, z__3.i = d__1 * temp1.i;\n\t\tz__2.r = y[i__3].r + z__3.r, z__2.i = y[i__3].i + z__3.i;\n\t\tz__4.r = alpha->r * temp2.r - alpha->i * temp2.i, z__4.i = \n\t\t\talpha->r * temp2.i + alpha->i * temp2.r;\n\t\tz__1.r = z__2.r + z__4.r, z__1.i = z__2.i + z__4.i;\n\t\ty[i__2].r = z__1.r, y[i__2].i = z__1.i;\n\t\tkk += j;\n/* L60: */\n\t    }\n\t} else {\n\t    jx = kx;\n\t    jy = ky;\n\t    i__1 = *n;\n\t    for (j = 1; j <= i__1; ++j) {\n\t\ti__2 = jx;\n\t\tz__1.r = alpha->r * x[i__2].r - alpha->i * x[i__2].i, z__1.i =\n\t\t\t alpha->r * x[i__2].i + alpha->i * x[i__2].r;\n\t\ttemp1.r = z__1.r, temp1.i = z__1.i;\n\t\ttemp2.r = 0., temp2.i = 0.;\n\t\tix = kx;\n\t\tiy = ky;\n\t\ti__2 = kk + j - 2;\n\t\tfor (k = kk; k <= i__2; ++k) {\n\t\t    i__3 = iy;\n\t\t    i__4 = iy;\n\t\t    i__5 = k;\n\t\t    z__2.r = temp1.r * ap[i__5].r - temp1.i * ap[i__5].i, \n\t\t\t    z__2.i = temp1.r * ap[i__5].i + temp1.i * ap[i__5]\n\t\t\t    .r;\n\t\t    z__1.r = y[i__4].r + z__2.r, z__1.i = y[i__4].i + z__2.i;\n\t\t    y[i__3].r = z__1.r, y[i__3].i = z__1.i;\n\t\t    d_cnjg(&z__3, &ap[k]);\n\t\t    i__3 = ix;\n\t\t    z__2.r = z__3.r * x[i__3].r - z__3.i * x[i__3].i, z__2.i =\n\t\t\t     z__3.r * x[i__3].i + z__3.i * x[i__3].r;\n\t\t    z__1.r = temp2.r + z__2.r, z__1.i = temp2.i + z__2.i;\n\t\t    temp2.r = z__1.r, temp2.i = z__1.i;\n\t\t    ix += *incx;\n\t\t    iy += *incy;\n/* L70: */\n\t\t}\n\t\ti__2 = jy;\n\t\ti__3 = jy;\n\t\ti__4 = kk + j - 1;\n\t\td__1 = ap[i__4].r;\n\t\tz__3.r = d__1 * temp1.r, z__3.i = d__1 * temp1.i;\n\t\tz__2.r = y[i__3].r + z__3.r, z__2.i = y[i__3].i + z__3.i;\n\t\tz__4.r = alpha->r * temp2.r - alpha->i * temp2.i, z__4.i = \n\t\t\talpha->r * temp2.i + alpha->i * temp2.r;\n\t\tz__1.r = z__2.r + z__4.r, z__1.i = z__2.i + z__4.i;\n\t\ty[i__2].r = z__1.r, y[i__2].i = z__1.i;\n\t\tjx += *incx;\n\t\tjy += *incy;\n\t\tkk += j;\n/* L80: */\n\t    }\n\t}\n    } else {\n\n/*        Form  y  when AP contains the lower triangle. */\n\n\tif (*incx == 1 && *incy == 1) {\n\t    i__1 = *n;\n\t    for (j = 1; j <= i__1; ++j) {\n\t\ti__2 = j;\n\t\tz__1.r = alpha->r * x[i__2].r - alpha->i * x[i__2].i, z__1.i =\n\t\t\t alpha->r * x[i__2].i + alpha->i * x[i__2].r;\n\t\ttemp1.r = z__1.r, temp1.i = z__1.i;\n\t\ttemp2.r = 0., temp2.i = 0.;\n\t\ti__2 = j;\n\t\ti__3 = j;\n\t\ti__4 = kk;\n\t\td__1 = ap[i__4].r;\n\t\tz__2.r = d__1 * temp1.r, z__2.i = d__1 * temp1.i;\n\t\tz__1.r = y[i__3].r + z__2.r, z__1.i = y[i__3].i + z__2.i;\n\t\ty[i__2].r = z__1.r, y[i__2].i = z__1.i;\n\t\tk = kk + 1;\n\t\ti__2 = *n;\n\t\tfor (i__ = j + 1; i__ <= i__2; ++i__) {\n\t\t    i__3 = i__;\n\t\t    i__4 = i__;\n\t\t    i__5 = k;\n\t\t    z__2.r = temp1.r * ap[i__5].r - temp1.i * ap[i__5].i, \n\t\t\t    z__2.i = temp1.r * ap[i__5].i + temp1.i * ap[i__5]\n\t\t\t    .r;\n\t\t    z__1.r = y[i__4].r + z__2.r, z__1.i = y[i__4].i + z__2.i;\n\t\t    y[i__3].r = z__1.r, y[i__3].i = z__1.i;\n\t\t    d_cnjg(&z__3, &ap[k]);\n\t\t    i__3 = i__;\n\t\t    z__2.r = z__3.r * x[i__3].r - z__3.i * x[i__3].i, z__2.i =\n\t\t\t     z__3.r * x[i__3].i + z__3.i * x[i__3].r;\n\t\t    z__1.r = temp2.r + z__2.r, z__1.i = temp2.i + z__2.i;\n\t\t    temp2.r = z__1.r, temp2.i = z__1.i;\n\t\t    ++k;\n/* L90: */\n\t\t}\n\t\ti__2 = j;\n\t\ti__3 = j;\n\t\tz__2.r = alpha->r * temp2.r - alpha->i * temp2.i, z__2.i = \n\t\t\talpha->r * temp2.i + alpha->i * temp2.r;\n\t\tz__1.r = y[i__3].r + z__2.r, z__1.i = y[i__3].i + z__2.i;\n\t\ty[i__2].r = z__1.r, y[i__2].i = z__1.i;\n\t\tkk += *n - j + 1;\n/* L100: */\n\t    }\n\t} else {\n\t    jx = kx;\n\t    jy = ky;\n\t    i__1 = *n;\n\t    for (j = 1; j <= i__1; ++j) {\n\t\ti__2 = jx;\n\t\tz__1.r = alpha->r * x[i__2].r - alpha->i * x[i__2].i, z__1.i =\n\t\t\t alpha->r * x[i__2].i + alpha->i * x[i__2].r;\n\t\ttemp1.r = z__1.r, temp1.i = z__1.i;\n\t\ttemp2.r = 0., temp2.i = 0.;\n\t\ti__2 = jy;\n\t\ti__3 = jy;\n\t\ti__4 = kk;\n\t\td__1 = ap[i__4].r;\n\t\tz__2.r = d__1 * temp1.r, z__2.i = d__1 * temp1.i;\n\t\tz__1.r = y[i__3].r + z__2.r, z__1.i = y[i__3].i + z__2.i;\n\t\ty[i__2].r = z__1.r, y[i__2].i = z__1.i;\n\t\tix = jx;\n\t\tiy = jy;\n\t\ti__2 = kk + *n - j;\n\t\tfor (k = kk + 1; k <= i__2; ++k) {\n\t\t    ix += *incx;\n\t\t    iy += *incy;\n\t\t    i__3 = iy;\n\t\t    i__4 = iy;\n\t\t    i__5 = k;\n\t\t    z__2.r = temp1.r * ap[i__5].r - temp1.i * ap[i__5].i, \n\t\t\t    z__2.i = temp1.r * ap[i__5].i + temp1.i * ap[i__5]\n\t\t\t    .r;\n\t\t    z__1.r = y[i__4].r + z__2.r, z__1.i = y[i__4].i + z__2.i;\n\t\t    y[i__3].r = z__1.r, y[i__3].i = z__1.i;\n\t\t    d_cnjg(&z__3, &ap[k]);\n\t\t    i__3 = ix;\n\t\t    z__2.r = z__3.r * x[i__3].r - z__3.i * x[i__3].i, z__2.i =\n\t\t\t     z__3.r * x[i__3].i + z__3.i * x[i__3].r;\n\t\t    z__1.r = temp2.r + z__2.r, z__1.i = temp2.i + z__2.i;\n\t\t    temp2.r = z__1.r, temp2.i = z__1.i;\n/* L110: */\n\t\t}\n\t\ti__2 = jy;\n\t\ti__3 = jy;\n\t\tz__2.r = alpha->r * temp2.r - alpha->i * temp2.i, z__2.i = \n\t\t\talpha->r * temp2.i + alpha->i * temp2.r;\n\t\tz__1.r = y[i__3].r + z__2.r, z__1.i = y[i__3].i + z__2.i;\n\t\ty[i__2].r = z__1.r, y[i__2].i = z__1.i;\n\t\tjx += *incx;\n\t\tjy += *incy;\n\t\tkk += *n - j + 1;\n/* L120: */\n\t    }\n\t}\n    }\n\n    return 0;\n\n/*     End of ZHPMV . */\n\n} /* zhpmv_ */\n\n"
  },
  {
    "path": "3rdparty/eigen3/blas/f2c/ztbmv.c",
    "content": "/* ztbmv.f -- translated by f2c (version 20100827).\n   You must link the resulting object file with libf2c:\n\ton Microsoft Windows system, link with libf2c.lib;\n\ton Linux or Unix systems, link with .../path/to/libf2c.a -lm\n\tor, if you install libf2c.a in a standard place, with -lf2c -lm\n\t-- in that order, at the end of the command line, as in\n\t\tcc *.o -lf2c -lm\n\tSource for libf2c is in /netlib/f2c/libf2c.zip, e.g.,\n\n\t\thttp://www.netlib.org/f2c/libf2c.zip\n*/\n\n#include \"datatypes.h\"\n\n/* Subroutine */ int ztbmv_(char *uplo, char *trans, char *diag, integer *n, \n\tinteger *k, doublecomplex *a, integer *lda, doublecomplex *x, integer \n\t*incx, ftnlen uplo_len, ftnlen trans_len, ftnlen diag_len)\n{\n    /* System generated locals */\n    integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5;\n    doublecomplex z__1, z__2, z__3;\n\n    /* Builtin functions */\n    void d_cnjg(doublecomplex *, doublecomplex *);\n\n    /* Local variables */\n    integer i__, j, l, ix, jx, kx, info;\n    doublecomplex temp;\n    extern logical lsame_(char *, char *, ftnlen, ftnlen);\n    integer kplus1;\n    extern /* Subroutine */ int xerbla_(char *, integer *, ftnlen);\n    logical noconj, nounit;\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  ZTBMV  performs one of the matrix-vector operations */\n\n/*     x := A*x,   or   x := A'*x,   or   x := conjg( A' )*x, */\n\n/*  where x is an n element vector and  A is an n by n unit, or non-unit, */\n/*  upper or lower triangular band matrix, with ( k + 1 ) diagonals. */\n\n/*  Arguments */\n/*  ========== */\n\n/*  UPLO   - CHARACTER*1. */\n/*           On entry, UPLO specifies whether the matrix is an upper or */\n/*           lower triangular matrix as follows: */\n\n/*              UPLO = 'U' or 'u'   A is an upper triangular matrix. */\n\n/*              UPLO = 'L' or 'l'   A is a lower triangular matrix. */\n\n/*           Unchanged on exit. */\n\n/*  TRANS  - CHARACTER*1. */\n/*           On entry, TRANS specifies the operation to be performed as */\n/*           follows: */\n\n/*              TRANS = 'N' or 'n'   x := A*x. */\n\n/*              TRANS = 'T' or 't'   x := A'*x. */\n\n/*              TRANS = 'C' or 'c'   x := conjg( A' )*x. */\n\n/*           Unchanged on exit. */\n\n/*  DIAG   - CHARACTER*1. */\n/*           On entry, DIAG specifies whether or not A is unit */\n/*           triangular as follows: */\n\n/*              DIAG = 'U' or 'u'   A is assumed to be unit triangular. */\n\n/*              DIAG = 'N' or 'n'   A is not assumed to be unit */\n/*                                  triangular. */\n\n/*           Unchanged on exit. */\n\n/*  N      - INTEGER. */\n/*           On entry, N specifies the order of the matrix A. */\n/*           N must be at least zero. */\n/*           Unchanged on exit. */\n\n/*  K      - INTEGER. */\n/*           On entry with UPLO = 'U' or 'u', K specifies the number of */\n/*           super-diagonals of the matrix A. */\n/*           On entry with UPLO = 'L' or 'l', K specifies the number of */\n/*           sub-diagonals of the matrix A. */\n/*           K must satisfy  0 .le. K. */\n/*           Unchanged on exit. */\n\n/*  A      - COMPLEX*16       array of DIMENSION ( LDA, n ). */\n/*           Before entry with UPLO = 'U' or 'u', the leading ( k + 1 ) */\n/*           by n part of the array A must contain the upper triangular */\n/*           band part of the matrix of coefficients, supplied column by */\n/*           column, with the leading diagonal of the matrix in row */\n/*           ( k + 1 ) of the array, the first super-diagonal starting at */\n/*           position 2 in row k, and so on. The top left k by k triangle */\n/*           of the array A is not referenced. */\n/*           The following program segment will transfer an upper */\n/*           triangular band matrix from conventional full matrix storage */\n/*           to band storage: */\n\n/*                 DO 20, J = 1, N */\n/*                    M = K + 1 - J */\n/*                    DO 10, I = MAX( 1, J - K ), J */\n/*                       A( M + I, J ) = matrix( I, J ) */\n/*              10    CONTINUE */\n/*              20 CONTINUE */\n\n/*           Before entry with UPLO = 'L' or 'l', the leading ( k + 1 ) */\n/*           by n part of the array A must contain the lower triangular */\n/*           band part of the matrix of coefficients, supplied column by */\n/*           column, with the leading diagonal of the matrix in row 1 of */\n/*           the array, the first sub-diagonal starting at position 1 in */\n/*           row 2, and so on. The bottom right k by k triangle of the */\n/*           array A is not referenced. */\n/*           The following program segment will transfer a lower */\n/*           triangular band matrix from conventional full matrix storage */\n/*           to band storage: */\n\n/*                 DO 20, J = 1, N */\n/*                    M = 1 - J */\n/*                    DO 10, I = J, MIN( N, J + K ) */\n/*                       A( M + I, J ) = matrix( I, J ) */\n/*              10    CONTINUE */\n/*              20 CONTINUE */\n\n/*           Note that when DIAG = 'U' or 'u' the elements of the array A */\n/*           corresponding to the diagonal elements of the matrix are not */\n/*           referenced, but are assumed to be unity. */\n/*           Unchanged on exit. */\n\n/*  LDA    - INTEGER. */\n/*           On entry, LDA specifies the first dimension of A as declared */\n/*           in the calling (sub) program. LDA must be at least */\n/*           ( k + 1 ). */\n/*           Unchanged on exit. */\n\n/*  X      - COMPLEX*16       array of dimension at least */\n/*           ( 1 + ( n - 1 )*abs( INCX ) ). */\n/*           Before entry, the incremented array X must contain the n */\n/*           element vector x. On exit, X is overwritten with the */\n/*           transformed vector x. */\n\n/*  INCX   - INTEGER. */\n/*           On entry, INCX specifies the increment for the elements of */\n/*           X. INCX must not be zero. */\n/*           Unchanged on exit. */\n\n/*  Further Details */\n/*  =============== */\n\n/*  Level 2 Blas routine. */\n\n/*  -- Written on 22-October-1986. */\n/*     Jack Dongarra, Argonne National Lab. */\n/*     Jeremy Du Croz, Nag Central Office. */\n/*     Sven Hammarling, Nag Central Office. */\n/*     Richard Hanson, Sandia National Labs. */\n\n/*  ===================================================================== */\n\n/*     .. Parameters .. */\n/*     .. */\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. External Functions .. */\n/*     .. */\n/*     .. External Subroutines .. */\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n\n/*     Test the input parameters. */\n\n    /* Parameter adjustments */\n    a_dim1 = *lda;\n    a_offset = 1 + a_dim1;\n    a -= a_offset;\n    --x;\n\n    /* Function Body */\n    info = 0;\n    if (! lsame_(uplo, \"U\", (ftnlen)1, (ftnlen)1) && ! lsame_(uplo, \"L\", (\n\t    ftnlen)1, (ftnlen)1)) {\n\tinfo = 1;\n    } else if (! lsame_(trans, \"N\", (ftnlen)1, (ftnlen)1) && ! lsame_(trans, \n\t    \"T\", (ftnlen)1, (ftnlen)1) && ! lsame_(trans, \"C\", (ftnlen)1, (\n\t    ftnlen)1)) {\n\tinfo = 2;\n    } else if (! lsame_(diag, \"U\", (ftnlen)1, (ftnlen)1) && ! lsame_(diag, \n\t    \"N\", (ftnlen)1, (ftnlen)1)) {\n\tinfo = 3;\n    } else if (*n < 0) {\n\tinfo = 4;\n    } else if (*k < 0) {\n\tinfo = 5;\n    } else if (*lda < *k + 1) {\n\tinfo = 7;\n    } else if (*incx == 0) {\n\tinfo = 9;\n    }\n    if (info != 0) {\n\txerbla_(\"ZTBMV \", &info, (ftnlen)6);\n\treturn 0;\n    }\n\n/*     Quick return if possible. */\n\n    if (*n == 0) {\n\treturn 0;\n    }\n\n    noconj = lsame_(trans, \"T\", (ftnlen)1, (ftnlen)1);\n    nounit = lsame_(diag, \"N\", (ftnlen)1, (ftnlen)1);\n\n/*     Set up the start point in X if the increment is not unity. This */\n/*     will be  ( N - 1 )*INCX   too small for descending loops. */\n\n    if (*incx <= 0) {\n\tkx = 1 - (*n - 1) * *incx;\n    } else if (*incx != 1) {\n\tkx = 1;\n    }\n\n/*     Start the operations. In this version the elements of A are */\n/*     accessed sequentially with one pass through A. */\n\n    if (lsame_(trans, \"N\", (ftnlen)1, (ftnlen)1)) {\n\n/*         Form  x := A*x. */\n\n\tif (lsame_(uplo, \"U\", (ftnlen)1, (ftnlen)1)) {\n\t    kplus1 = *k + 1;\n\t    if (*incx == 1) {\n\t\ti__1 = *n;\n\t\tfor (j = 1; j <= i__1; ++j) {\n\t\t    i__2 = j;\n\t\t    if (x[i__2].r != 0. || x[i__2].i != 0.) {\n\t\t\ti__2 = j;\n\t\t\ttemp.r = x[i__2].r, temp.i = x[i__2].i;\n\t\t\tl = kplus1 - j;\n/* Computing MAX */\n\t\t\ti__2 = 1, i__3 = j - *k;\n\t\t\ti__4 = j - 1;\n\t\t\tfor (i__ = max(i__2,i__3); i__ <= i__4; ++i__) {\n\t\t\t    i__2 = i__;\n\t\t\t    i__3 = i__;\n\t\t\t    i__5 = l + i__ + j * a_dim1;\n\t\t\t    z__2.r = temp.r * a[i__5].r - temp.i * a[i__5].i, \n\t\t\t\t    z__2.i = temp.r * a[i__5].i + temp.i * a[\n\t\t\t\t    i__5].r;\n\t\t\t    z__1.r = x[i__3].r + z__2.r, z__1.i = x[i__3].i + \n\t\t\t\t    z__2.i;\n\t\t\t    x[i__2].r = z__1.r, x[i__2].i = z__1.i;\n/* L10: */\n\t\t\t}\n\t\t\tif (nounit) {\n\t\t\t    i__4 = j;\n\t\t\t    i__2 = j;\n\t\t\t    i__3 = kplus1 + j * a_dim1;\n\t\t\t    z__1.r = x[i__2].r * a[i__3].r - x[i__2].i * a[\n\t\t\t\t    i__3].i, z__1.i = x[i__2].r * a[i__3].i + \n\t\t\t\t    x[i__2].i * a[i__3].r;\n\t\t\t    x[i__4].r = z__1.r, x[i__4].i = z__1.i;\n\t\t\t}\n\t\t    }\n/* L20: */\n\t\t}\n\t    } else {\n\t\tjx = kx;\n\t\ti__1 = *n;\n\t\tfor (j = 1; j <= i__1; ++j) {\n\t\t    i__4 = jx;\n\t\t    if (x[i__4].r != 0. || x[i__4].i != 0.) {\n\t\t\ti__4 = jx;\n\t\t\ttemp.r = x[i__4].r, temp.i = x[i__4].i;\n\t\t\tix = kx;\n\t\t\tl = kplus1 - j;\n/* Computing MAX */\n\t\t\ti__4 = 1, i__2 = j - *k;\n\t\t\ti__3 = j - 1;\n\t\t\tfor (i__ = max(i__4,i__2); i__ <= i__3; ++i__) {\n\t\t\t    i__4 = ix;\n\t\t\t    i__2 = ix;\n\t\t\t    i__5 = l + i__ + j * a_dim1;\n\t\t\t    z__2.r = temp.r * a[i__5].r - temp.i * a[i__5].i, \n\t\t\t\t    z__2.i = temp.r * a[i__5].i + temp.i * a[\n\t\t\t\t    i__5].r;\n\t\t\t    z__1.r = x[i__2].r + z__2.r, z__1.i = x[i__2].i + \n\t\t\t\t    z__2.i;\n\t\t\t    x[i__4].r = z__1.r, x[i__4].i = z__1.i;\n\t\t\t    ix += *incx;\n/* L30: */\n\t\t\t}\n\t\t\tif (nounit) {\n\t\t\t    i__3 = jx;\n\t\t\t    i__4 = jx;\n\t\t\t    i__2 = kplus1 + j * a_dim1;\n\t\t\t    z__1.r = x[i__4].r * a[i__2].r - x[i__4].i * a[\n\t\t\t\t    i__2].i, z__1.i = x[i__4].r * a[i__2].i + \n\t\t\t\t    x[i__4].i * a[i__2].r;\n\t\t\t    x[i__3].r = z__1.r, x[i__3].i = z__1.i;\n\t\t\t}\n\t\t    }\n\t\t    jx += *incx;\n\t\t    if (j > *k) {\n\t\t\tkx += *incx;\n\t\t    }\n/* L40: */\n\t\t}\n\t    }\n\t} else {\n\t    if (*incx == 1) {\n\t\tfor (j = *n; j >= 1; --j) {\n\t\t    i__1 = j;\n\t\t    if (x[i__1].r != 0. || x[i__1].i != 0.) {\n\t\t\ti__1 = j;\n\t\t\ttemp.r = x[i__1].r, temp.i = x[i__1].i;\n\t\t\tl = 1 - j;\n/* Computing MIN */\n\t\t\ti__1 = *n, i__3 = j + *k;\n\t\t\ti__4 = j + 1;\n\t\t\tfor (i__ = min(i__1,i__3); i__ >= i__4; --i__) {\n\t\t\t    i__1 = i__;\n\t\t\t    i__3 = i__;\n\t\t\t    i__2 = l + i__ + j * a_dim1;\n\t\t\t    z__2.r = temp.r * a[i__2].r - temp.i * a[i__2].i, \n\t\t\t\t    z__2.i = temp.r * a[i__2].i + temp.i * a[\n\t\t\t\t    i__2].r;\n\t\t\t    z__1.r = x[i__3].r + z__2.r, z__1.i = x[i__3].i + \n\t\t\t\t    z__2.i;\n\t\t\t    x[i__1].r = z__1.r, x[i__1].i = z__1.i;\n/* L50: */\n\t\t\t}\n\t\t\tif (nounit) {\n\t\t\t    i__4 = j;\n\t\t\t    i__1 = j;\n\t\t\t    i__3 = j * a_dim1 + 1;\n\t\t\t    z__1.r = x[i__1].r * a[i__3].r - x[i__1].i * a[\n\t\t\t\t    i__3].i, z__1.i = x[i__1].r * a[i__3].i + \n\t\t\t\t    x[i__1].i * a[i__3].r;\n\t\t\t    x[i__4].r = z__1.r, x[i__4].i = z__1.i;\n\t\t\t}\n\t\t    }\n/* L60: */\n\t\t}\n\t    } else {\n\t\tkx += (*n - 1) * *incx;\n\t\tjx = kx;\n\t\tfor (j = *n; j >= 1; --j) {\n\t\t    i__4 = jx;\n\t\t    if (x[i__4].r != 0. || x[i__4].i != 0.) {\n\t\t\ti__4 = jx;\n\t\t\ttemp.r = x[i__4].r, temp.i = x[i__4].i;\n\t\t\tix = kx;\n\t\t\tl = 1 - j;\n/* Computing MIN */\n\t\t\ti__4 = *n, i__1 = j + *k;\n\t\t\ti__3 = j + 1;\n\t\t\tfor (i__ = min(i__4,i__1); i__ >= i__3; --i__) {\n\t\t\t    i__4 = ix;\n\t\t\t    i__1 = ix;\n\t\t\t    i__2 = l + i__ + j * a_dim1;\n\t\t\t    z__2.r = temp.r * a[i__2].r - temp.i * a[i__2].i, \n\t\t\t\t    z__2.i = temp.r * a[i__2].i + temp.i * a[\n\t\t\t\t    i__2].r;\n\t\t\t    z__1.r = x[i__1].r + z__2.r, z__1.i = x[i__1].i + \n\t\t\t\t    z__2.i;\n\t\t\t    x[i__4].r = z__1.r, x[i__4].i = z__1.i;\n\t\t\t    ix -= *incx;\n/* L70: */\n\t\t\t}\n\t\t\tif (nounit) {\n\t\t\t    i__3 = jx;\n\t\t\t    i__4 = jx;\n\t\t\t    i__1 = j * a_dim1 + 1;\n\t\t\t    z__1.r = x[i__4].r * a[i__1].r - x[i__4].i * a[\n\t\t\t\t    i__1].i, z__1.i = x[i__4].r * a[i__1].i + \n\t\t\t\t    x[i__4].i * a[i__1].r;\n\t\t\t    x[i__3].r = z__1.r, x[i__3].i = z__1.i;\n\t\t\t}\n\t\t    }\n\t\t    jx -= *incx;\n\t\t    if (*n - j >= *k) {\n\t\t\tkx -= *incx;\n\t\t    }\n/* L80: */\n\t\t}\n\t    }\n\t}\n    } else {\n\n/*        Form  x := A'*x  or  x := conjg( A' )*x. */\n\n\tif (lsame_(uplo, \"U\", (ftnlen)1, (ftnlen)1)) {\n\t    kplus1 = *k + 1;\n\t    if (*incx == 1) {\n\t\tfor (j = *n; j >= 1; --j) {\n\t\t    i__3 = j;\n\t\t    temp.r = x[i__3].r, temp.i = x[i__3].i;\n\t\t    l = kplus1 - j;\n\t\t    if (noconj) {\n\t\t\tif (nounit) {\n\t\t\t    i__3 = kplus1 + j * a_dim1;\n\t\t\t    z__1.r = temp.r * a[i__3].r - temp.i * a[i__3].i, \n\t\t\t\t    z__1.i = temp.r * a[i__3].i + temp.i * a[\n\t\t\t\t    i__3].r;\n\t\t\t    temp.r = z__1.r, temp.i = z__1.i;\n\t\t\t}\n/* Computing MAX */\n\t\t\ti__4 = 1, i__1 = j - *k;\n\t\t\ti__3 = max(i__4,i__1);\n\t\t\tfor (i__ = j - 1; i__ >= i__3; --i__) {\n\t\t\t    i__4 = l + i__ + j * a_dim1;\n\t\t\t    i__1 = i__;\n\t\t\t    z__2.r = a[i__4].r * x[i__1].r - a[i__4].i * x[\n\t\t\t\t    i__1].i, z__2.i = a[i__4].r * x[i__1].i + \n\t\t\t\t    a[i__4].i * x[i__1].r;\n\t\t\t    z__1.r = temp.r + z__2.r, z__1.i = temp.i + \n\t\t\t\t    z__2.i;\n\t\t\t    temp.r = z__1.r, temp.i = z__1.i;\n/* L90: */\n\t\t\t}\n\t\t    } else {\n\t\t\tif (nounit) {\n\t\t\t    d_cnjg(&z__2, &a[kplus1 + j * a_dim1]);\n\t\t\t    z__1.r = temp.r * z__2.r - temp.i * z__2.i, \n\t\t\t\t    z__1.i = temp.r * z__2.i + temp.i * \n\t\t\t\t    z__2.r;\n\t\t\t    temp.r = z__1.r, temp.i = z__1.i;\n\t\t\t}\n/* Computing MAX */\n\t\t\ti__4 = 1, i__1 = j - *k;\n\t\t\ti__3 = max(i__4,i__1);\n\t\t\tfor (i__ = j - 1; i__ >= i__3; --i__) {\n\t\t\t    d_cnjg(&z__3, &a[l + i__ + j * a_dim1]);\n\t\t\t    i__4 = i__;\n\t\t\t    z__2.r = z__3.r * x[i__4].r - z__3.i * x[i__4].i, \n\t\t\t\t    z__2.i = z__3.r * x[i__4].i + z__3.i * x[\n\t\t\t\t    i__4].r;\n\t\t\t    z__1.r = temp.r + z__2.r, z__1.i = temp.i + \n\t\t\t\t    z__2.i;\n\t\t\t    temp.r = z__1.r, temp.i = z__1.i;\n/* L100: */\n\t\t\t}\n\t\t    }\n\t\t    i__3 = j;\n\t\t    x[i__3].r = temp.r, x[i__3].i = temp.i;\n/* L110: */\n\t\t}\n\t    } else {\n\t\tkx += (*n - 1) * *incx;\n\t\tjx = kx;\n\t\tfor (j = *n; j >= 1; --j) {\n\t\t    i__3 = jx;\n\t\t    temp.r = x[i__3].r, temp.i = x[i__3].i;\n\t\t    kx -= *incx;\n\t\t    ix = kx;\n\t\t    l = kplus1 - j;\n\t\t    if (noconj) {\n\t\t\tif (nounit) {\n\t\t\t    i__3 = kplus1 + j * a_dim1;\n\t\t\t    z__1.r = temp.r * a[i__3].r - temp.i * a[i__3].i, \n\t\t\t\t    z__1.i = temp.r * a[i__3].i + temp.i * a[\n\t\t\t\t    i__3].r;\n\t\t\t    temp.r = z__1.r, temp.i = z__1.i;\n\t\t\t}\n/* Computing MAX */\n\t\t\ti__4 = 1, i__1 = j - *k;\n\t\t\ti__3 = max(i__4,i__1);\n\t\t\tfor (i__ = j - 1; i__ >= i__3; --i__) {\n\t\t\t    i__4 = l + i__ + j * a_dim1;\n\t\t\t    i__1 = ix;\n\t\t\t    z__2.r = a[i__4].r * x[i__1].r - a[i__4].i * x[\n\t\t\t\t    i__1].i, z__2.i = a[i__4].r * x[i__1].i + \n\t\t\t\t    a[i__4].i * x[i__1].r;\n\t\t\t    z__1.r = temp.r + z__2.r, z__1.i = temp.i + \n\t\t\t\t    z__2.i;\n\t\t\t    temp.r = z__1.r, temp.i = z__1.i;\n\t\t\t    ix -= *incx;\n/* L120: */\n\t\t\t}\n\t\t    } else {\n\t\t\tif (nounit) {\n\t\t\t    d_cnjg(&z__2, &a[kplus1 + j * a_dim1]);\n\t\t\t    z__1.r = temp.r * z__2.r - temp.i * z__2.i, \n\t\t\t\t    z__1.i = temp.r * z__2.i + temp.i * \n\t\t\t\t    z__2.r;\n\t\t\t    temp.r = z__1.r, temp.i = z__1.i;\n\t\t\t}\n/* Computing MAX */\n\t\t\ti__4 = 1, i__1 = j - *k;\n\t\t\ti__3 = max(i__4,i__1);\n\t\t\tfor (i__ = j - 1; i__ >= i__3; --i__) {\n\t\t\t    d_cnjg(&z__3, &a[l + i__ + j * a_dim1]);\n\t\t\t    i__4 = ix;\n\t\t\t    z__2.r = z__3.r * x[i__4].r - z__3.i * x[i__4].i, \n\t\t\t\t    z__2.i = z__3.r * x[i__4].i + z__3.i * x[\n\t\t\t\t    i__4].r;\n\t\t\t    z__1.r = temp.r + z__2.r, z__1.i = temp.i + \n\t\t\t\t    z__2.i;\n\t\t\t    temp.r = z__1.r, temp.i = z__1.i;\n\t\t\t    ix -= *incx;\n/* L130: */\n\t\t\t}\n\t\t    }\n\t\t    i__3 = jx;\n\t\t    x[i__3].r = temp.r, x[i__3].i = temp.i;\n\t\t    jx -= *incx;\n/* L140: */\n\t\t}\n\t    }\n\t} else {\n\t    if (*incx == 1) {\n\t\ti__3 = *n;\n\t\tfor (j = 1; j <= i__3; ++j) {\n\t\t    i__4 = j;\n\t\t    temp.r = x[i__4].r, temp.i = x[i__4].i;\n\t\t    l = 1 - j;\n\t\t    if (noconj) {\n\t\t\tif (nounit) {\n\t\t\t    i__4 = j * a_dim1 + 1;\n\t\t\t    z__1.r = temp.r * a[i__4].r - temp.i * a[i__4].i, \n\t\t\t\t    z__1.i = temp.r * a[i__4].i + temp.i * a[\n\t\t\t\t    i__4].r;\n\t\t\t    temp.r = z__1.r, temp.i = z__1.i;\n\t\t\t}\n/* Computing MIN */\n\t\t\ti__1 = *n, i__2 = j + *k;\n\t\t\ti__4 = min(i__1,i__2);\n\t\t\tfor (i__ = j + 1; i__ <= i__4; ++i__) {\n\t\t\t    i__1 = l + i__ + j * a_dim1;\n\t\t\t    i__2 = i__;\n\t\t\t    z__2.r = a[i__1].r * x[i__2].r - a[i__1].i * x[\n\t\t\t\t    i__2].i, z__2.i = a[i__1].r * x[i__2].i + \n\t\t\t\t    a[i__1].i * x[i__2].r;\n\t\t\t    z__1.r = temp.r + z__2.r, z__1.i = temp.i + \n\t\t\t\t    z__2.i;\n\t\t\t    temp.r = z__1.r, temp.i = z__1.i;\n/* L150: */\n\t\t\t}\n\t\t    } else {\n\t\t\tif (nounit) {\n\t\t\t    d_cnjg(&z__2, &a[j * a_dim1 + 1]);\n\t\t\t    z__1.r = temp.r * z__2.r - temp.i * z__2.i, \n\t\t\t\t    z__1.i = temp.r * z__2.i + temp.i * \n\t\t\t\t    z__2.r;\n\t\t\t    temp.r = z__1.r, temp.i = z__1.i;\n\t\t\t}\n/* Computing MIN */\n\t\t\ti__1 = *n, i__2 = j + *k;\n\t\t\ti__4 = min(i__1,i__2);\n\t\t\tfor (i__ = j + 1; i__ <= i__4; ++i__) {\n\t\t\t    d_cnjg(&z__3, &a[l + i__ + j * a_dim1]);\n\t\t\t    i__1 = i__;\n\t\t\t    z__2.r = z__3.r * x[i__1].r - z__3.i * x[i__1].i, \n\t\t\t\t    z__2.i = z__3.r * x[i__1].i + z__3.i * x[\n\t\t\t\t    i__1].r;\n\t\t\t    z__1.r = temp.r + z__2.r, z__1.i = temp.i + \n\t\t\t\t    z__2.i;\n\t\t\t    temp.r = z__1.r, temp.i = z__1.i;\n/* L160: */\n\t\t\t}\n\t\t    }\n\t\t    i__4 = j;\n\t\t    x[i__4].r = temp.r, x[i__4].i = temp.i;\n/* L170: */\n\t\t}\n\t    } else {\n\t\tjx = kx;\n\t\ti__3 = *n;\n\t\tfor (j = 1; j <= i__3; ++j) {\n\t\t    i__4 = jx;\n\t\t    temp.r = x[i__4].r, temp.i = x[i__4].i;\n\t\t    kx += *incx;\n\t\t    ix = kx;\n\t\t    l = 1 - j;\n\t\t    if (noconj) {\n\t\t\tif (nounit) {\n\t\t\t    i__4 = j * a_dim1 + 1;\n\t\t\t    z__1.r = temp.r * a[i__4].r - temp.i * a[i__4].i, \n\t\t\t\t    z__1.i = temp.r * a[i__4].i + temp.i * a[\n\t\t\t\t    i__4].r;\n\t\t\t    temp.r = z__1.r, temp.i = z__1.i;\n\t\t\t}\n/* Computing MIN */\n\t\t\ti__1 = *n, i__2 = j + *k;\n\t\t\ti__4 = min(i__1,i__2);\n\t\t\tfor (i__ = j + 1; i__ <= i__4; ++i__) {\n\t\t\t    i__1 = l + i__ + j * a_dim1;\n\t\t\t    i__2 = ix;\n\t\t\t    z__2.r = a[i__1].r * x[i__2].r - a[i__1].i * x[\n\t\t\t\t    i__2].i, z__2.i = a[i__1].r * x[i__2].i + \n\t\t\t\t    a[i__1].i * x[i__2].r;\n\t\t\t    z__1.r = temp.r + z__2.r, z__1.i = temp.i + \n\t\t\t\t    z__2.i;\n\t\t\t    temp.r = z__1.r, temp.i = z__1.i;\n\t\t\t    ix += *incx;\n/* L180: */\n\t\t\t}\n\t\t    } else {\n\t\t\tif (nounit) {\n\t\t\t    d_cnjg(&z__2, &a[j * a_dim1 + 1]);\n\t\t\t    z__1.r = temp.r * z__2.r - temp.i * z__2.i, \n\t\t\t\t    z__1.i = temp.r * z__2.i + temp.i * \n\t\t\t\t    z__2.r;\n\t\t\t    temp.r = z__1.r, temp.i = z__1.i;\n\t\t\t}\n/* Computing MIN */\n\t\t\ti__1 = *n, i__2 = j + *k;\n\t\t\ti__4 = min(i__1,i__2);\n\t\t\tfor (i__ = j + 1; i__ <= i__4; ++i__) {\n\t\t\t    d_cnjg(&z__3, &a[l + i__ + j * a_dim1]);\n\t\t\t    i__1 = ix;\n\t\t\t    z__2.r = z__3.r * x[i__1].r - z__3.i * x[i__1].i, \n\t\t\t\t    z__2.i = z__3.r * x[i__1].i + z__3.i * x[\n\t\t\t\t    i__1].r;\n\t\t\t    z__1.r = temp.r + z__2.r, z__1.i = temp.i + \n\t\t\t\t    z__2.i;\n\t\t\t    temp.r = z__1.r, temp.i = z__1.i;\n\t\t\t    ix += *incx;\n/* L190: */\n\t\t\t}\n\t\t    }\n\t\t    i__4 = jx;\n\t\t    x[i__4].r = temp.r, x[i__4].i = temp.i;\n\t\t    jx += *incx;\n/* L200: */\n\t\t}\n\t    }\n\t}\n    }\n\n    return 0;\n\n/*     End of ZTBMV . */\n\n} /* ztbmv_ */\n\n"
  },
  {
    "path": "3rdparty/eigen3/blas/fortran/complexdots.f",
    "content": "      COMPLEX FUNCTION CDOTC(N,CX,INCX,CY,INCY)\n      INTEGER INCX,INCY,N\n      COMPLEX CX(*),CY(*)\n      COMPLEX RES\n      EXTERNAL CDOTCW\n      \n      CALL CDOTCW(N,CX,INCX,CY,INCY,RES)\n      CDOTC = RES\n      RETURN\n      END\n      \n      COMPLEX FUNCTION CDOTU(N,CX,INCX,CY,INCY)\n      INTEGER INCX,INCY,N\n      COMPLEX CX(*),CY(*)\n      COMPLEX RES\n      EXTERNAL CDOTUW\n      \n      CALL CDOTUW(N,CX,INCX,CY,INCY,RES)\n      CDOTU = RES\n      RETURN\n      END\n      \n      DOUBLE COMPLEX FUNCTION ZDOTC(N,CX,INCX,CY,INCY)\n      INTEGER INCX,INCY,N\n      DOUBLE COMPLEX CX(*),CY(*)\n      DOUBLE COMPLEX RES\n      EXTERNAL ZDOTCW\n      \n      CALL ZDOTCW(N,CX,INCX,CY,INCY,RES)\n      ZDOTC = RES\n      RETURN\n      END\n      \n      DOUBLE COMPLEX FUNCTION ZDOTU(N,CX,INCX,CY,INCY)\n      INTEGER INCX,INCY,N\n      DOUBLE COMPLEX CX(*),CY(*)\n      DOUBLE COMPLEX RES\n      EXTERNAL ZDOTUW\n      \n      CALL ZDOTUW(N,CX,INCX,CY,INCY,RES)\n      ZDOTU = RES\n      RETURN\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/blas/level1_cplx_impl.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009-2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"common.h\"\n\nstruct scalar_norm1_op {\n  typedef RealScalar result_type;\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_norm1_op)\n  inline RealScalar operator() (const Scalar& a) const { return numext::norm1(a); }\n};\nnamespace Eigen {\n  namespace internal {\n    template<> struct functor_traits<scalar_norm1_op >\n    {\n      enum { Cost = 3 * NumTraits<Scalar>::AddCost, PacketAccess = 0 };\n    };\n  }\n}\n\n// computes the sum of magnitudes of all vector elements or, for a complex vector x, the sum\n// res = |Rex1| + |Imx1| + |Rex2| + |Imx2| + ... + |Rexn| + |Imxn|, where x is a vector of order n\nRealScalar EIGEN_CAT(REAL_SCALAR_SUFFIX, EIGEN_BLAS_FUNC(asum))(int *n, RealScalar *px, int *incx)\n{\n//   std::cerr << \"__asum \" << *n << \" \" << *incx << \"\\n\";\n  Complex* x = reinterpret_cast<Complex*>(px);\n\n  if(*n<=0) return 0;\n\n  if(*incx==1)  return make_vector(x,*n).unaryExpr<scalar_norm1_op>().sum();\n  else          return make_vector(x,*n,std::abs(*incx)).unaryExpr<scalar_norm1_op>().sum();\n}\n\nint EIGEN_CAT(i, EIGEN_BLAS_FUNC(amax))(int *n, RealScalar *px, int *incx)\n{\n  if(*n<=0) return 0;\n  Scalar* x = reinterpret_cast<Scalar*>(px);\n\n  DenseIndex ret;\n  if(*incx==1)  make_vector(x,*n).unaryExpr<scalar_norm1_op>().maxCoeff(&ret);\n  else          make_vector(x,*n,std::abs(*incx)).unaryExpr<scalar_norm1_op>().maxCoeff(&ret);\n  return int(ret)+1;\n}\n\nint EIGEN_CAT(i, EIGEN_BLAS_FUNC(amin))(int *n, RealScalar *px, int *incx)\n{\n  if(*n<=0) return 0;\n  Scalar* x = reinterpret_cast<Scalar*>(px);\n\n  DenseIndex ret;\n  if(*incx==1)  make_vector(x,*n).unaryExpr<scalar_norm1_op>().minCoeff(&ret);\n  else          make_vector(x,*n,std::abs(*incx)).unaryExpr<scalar_norm1_op>().minCoeff(&ret);\n  return int(ret)+1;\n}\n\n// computes a dot product of a conjugated vector with another vector.\nint EIGEN_BLAS_FUNC(dotcw)(int *n, RealScalar *px, int *incx, RealScalar *py, int *incy, RealScalar* pres)\n{\n//   std::cerr << \"_dotc \" << *n << \" \" << *incx << \" \" << *incy << \"\\n\";\n  Scalar* res = reinterpret_cast<Scalar*>(pres);\n\n  if(*n<=0)\n  {\n    *res = Scalar(0);\n    return 0;\n  }\n\n  Scalar* x = reinterpret_cast<Scalar*>(px);\n  Scalar* y = reinterpret_cast<Scalar*>(py);\n\n  if(*incx==1 && *incy==1)    *res = (make_vector(x,*n).dot(make_vector(y,*n)));\n  else if(*incx>0 && *incy>0) *res = (make_vector(x,*n,*incx).dot(make_vector(y,*n,*incy)));\n  else if(*incx<0 && *incy>0) *res = (make_vector(x,*n,-*incx).reverse().dot(make_vector(y,*n,*incy)));\n  else if(*incx>0 && *incy<0) *res = (make_vector(x,*n,*incx).dot(make_vector(y,*n,-*incy).reverse()));\n  else if(*incx<0 && *incy<0) *res = (make_vector(x,*n,-*incx).reverse().dot(make_vector(y,*n,-*incy).reverse()));\n  return 0;\n}\n\n// computes a vector-vector dot product without complex conjugation.\nint EIGEN_BLAS_FUNC(dotuw)(int *n, RealScalar *px, int *incx, RealScalar *py, int *incy, RealScalar* pres)\n{\n  Scalar* res = reinterpret_cast<Scalar*>(pres);\n\n  if(*n<=0)\n  {\n    *res = Scalar(0);\n    return 0;\n  }\n\n  Scalar* x = reinterpret_cast<Scalar*>(px);\n  Scalar* y = reinterpret_cast<Scalar*>(py);\n\n  if(*incx==1 && *incy==1)    *res = (make_vector(x,*n).cwiseProduct(make_vector(y,*n))).sum();\n  else if(*incx>0 && *incy>0) *res = (make_vector(x,*n,*incx).cwiseProduct(make_vector(y,*n,*incy))).sum();\n  else if(*incx<0 && *incy>0) *res = (make_vector(x,*n,-*incx).reverse().cwiseProduct(make_vector(y,*n,*incy))).sum();\n  else if(*incx>0 && *incy<0) *res = (make_vector(x,*n,*incx).cwiseProduct(make_vector(y,*n,-*incy).reverse())).sum();\n  else if(*incx<0 && *incy<0) *res = (make_vector(x,*n,-*incx).reverse().cwiseProduct(make_vector(y,*n,-*incy).reverse())).sum();\n  return 0;\n}\n\nRealScalar EIGEN_CAT(REAL_SCALAR_SUFFIX, EIGEN_BLAS_FUNC(nrm2))(int *n, RealScalar *px, int *incx)\n{\n//   std::cerr << \"__nrm2 \" << *n << \" \" << *incx << \"\\n\";\n  if(*n<=0) return 0;\n\n  Scalar* x = reinterpret_cast<Scalar*>(px);\n\n  if(*incx==1)\n    return make_vector(x,*n).stableNorm();\n\n  return make_vector(x,*n,*incx).stableNorm();\n}\n\nint EIGEN_BLAS_FUNC(EIGEN_CAT(REAL_SCALAR_SUFFIX, rot))(int *n, RealScalar *px, int *incx, RealScalar *py, int *incy, RealScalar *pc, RealScalar *ps)\n{\n  if(*n<=0) return 0;\n\n  Scalar* x = reinterpret_cast<Scalar*>(px);\n  Scalar* y = reinterpret_cast<Scalar*>(py);\n  RealScalar c = *pc;\n  RealScalar s = *ps;\n\n  StridedVectorType vx(make_vector(x,*n,std::abs(*incx)));\n  StridedVectorType vy(make_vector(y,*n,std::abs(*incy)));\n\n  Reverse<StridedVectorType> rvx(vx);\n  Reverse<StridedVectorType> rvy(vy);\n\n  // TODO implement mixed real-scalar rotations\n       if(*incx<0 && *incy>0) internal::apply_rotation_in_the_plane(rvx, vy, JacobiRotation<Scalar>(c,s));\n  else if(*incx>0 && *incy<0) internal::apply_rotation_in_the_plane(vx, rvy, JacobiRotation<Scalar>(c,s));\n  else                        internal::apply_rotation_in_the_plane(vx, vy,  JacobiRotation<Scalar>(c,s));\n\n  return 0;\n}\n\nint EIGEN_BLAS_FUNC(EIGEN_CAT(REAL_SCALAR_SUFFIX, scal))(int *n, RealScalar *palpha, RealScalar *px, int *incx)\n{\n  if(*n<=0) return 0;\n\n  Scalar* x = reinterpret_cast<Scalar*>(px);\n  RealScalar alpha = *palpha;\n\n//   std::cerr << \"__scal \" << *n << \" \" << alpha << \" \" << *incx << \"\\n\";\n\n  if(*incx==1)  make_vector(x,*n) *= alpha;\n  else          make_vector(x,*n,std::abs(*incx)) *= alpha;\n\n  return 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/blas/level1_impl.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009-2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"common.h\"\n\nint EIGEN_BLAS_FUNC(axpy)(const int *n, const RealScalar *palpha, const RealScalar *px, const int *incx, RealScalar *py, const int *incy)\n{\n  const Scalar* x = reinterpret_cast<const Scalar*>(px);\n  Scalar* y = reinterpret_cast<Scalar*>(py);\n  Scalar alpha  = *reinterpret_cast<const Scalar*>(palpha);\n\n  if(*n<=0) return 0;\n\n  if(*incx==1 && *incy==1)    make_vector(y,*n) += alpha * make_vector(x,*n);\n  else if(*incx>0 && *incy>0) make_vector(y,*n,*incy) += alpha * make_vector(x,*n,*incx);\n  else if(*incx>0 && *incy<0) make_vector(y,*n,-*incy).reverse() += alpha * make_vector(x,*n,*incx);\n  else if(*incx<0 && *incy>0) make_vector(y,*n,*incy) += alpha * make_vector(x,*n,-*incx).reverse();\n  else if(*incx<0 && *incy<0) make_vector(y,*n,-*incy).reverse() += alpha * make_vector(x,*n,-*incx).reverse();\n\n  return 0;\n}\n\nint EIGEN_BLAS_FUNC(copy)(int *n, RealScalar *px, int *incx, RealScalar *py, int *incy)\n{\n  if(*n<=0) return 0;\n\n  Scalar* x = reinterpret_cast<Scalar*>(px);\n  Scalar* y = reinterpret_cast<Scalar*>(py);\n\n  // be careful, *incx==0 is allowed !!\n  if(*incx==1 && *incy==1)\n    make_vector(y,*n) = make_vector(x,*n);\n  else\n  {\n    if(*incx<0) x = x - (*n-1)*(*incx);\n    if(*incy<0) y = y - (*n-1)*(*incy);\n    for(int i=0;i<*n;++i)\n    {\n      *y = *x;\n      x += *incx;\n      y += *incy;\n    }\n  }\n\n  return 0;\n}\n\nint EIGEN_BLAS_FUNC(rotg)(RealScalar *pa, RealScalar *pb, RealScalar *pc, RealScalar *ps)\n{\n  using std::sqrt;\n  using std::abs;\n\n  Scalar& a = *reinterpret_cast<Scalar*>(pa);\n  Scalar& b = *reinterpret_cast<Scalar*>(pb);\n  RealScalar* c = pc;\n  Scalar* s = reinterpret_cast<Scalar*>(ps);\n\n  #if !ISCOMPLEX\n  Scalar r,z;\n  Scalar aa = abs(a);\n  Scalar ab = abs(b);\n  if((aa+ab)==Scalar(0))\n  {\n    *c = 1;\n    *s = 0;\n    r = 0;\n    z = 0;\n  }\n  else\n  {\n    r = sqrt(a*a + b*b);\n    Scalar amax = aa>ab ? a : b;\n    r = amax>0 ? r : -r;\n    *c = a/r;\n    *s = b/r;\n    z = 1;\n    if (aa > ab) z = *s;\n    if (ab > aa && *c!=RealScalar(0))\n      z = Scalar(1)/ *c;\n  }\n  *pa = r;\n  *pb = z;\n  #else\n  Scalar alpha;\n  RealScalar norm,scale;\n  if(abs(a)==RealScalar(0))\n  {\n    *c = RealScalar(0);\n    *s = Scalar(1);\n    a = b;\n  }\n  else\n  {\n    scale = abs(a) + abs(b);\n    norm = scale*sqrt((numext::abs2(a/scale)) + (numext::abs2(b/scale)));\n    alpha = a/abs(a);\n    *c = abs(a)/norm;\n    *s = alpha*numext::conj(b)/norm;\n    a = alpha*norm;\n  }\n  #endif\n\n//   JacobiRotation<Scalar> r;\n//   r.makeGivens(a,b);\n//   *c = r.c();\n//   *s = r.s();\n\n  return 0;\n}\n\nint EIGEN_BLAS_FUNC(scal)(int *n, RealScalar *palpha, RealScalar *px, int *incx)\n{\n  if(*n<=0) return 0;\n\n  Scalar* x = reinterpret_cast<Scalar*>(px);\n  Scalar alpha = *reinterpret_cast<Scalar*>(palpha);\n\n  if(*incx==1)  make_vector(x,*n) *= alpha;\n  else          make_vector(x,*n,std::abs(*incx)) *= alpha;\n\n  return 0;\n}\n\nint EIGEN_BLAS_FUNC(swap)(int *n, RealScalar *px, int *incx, RealScalar *py, int *incy)\n{\n  if(*n<=0) return 0;\n\n  Scalar* x = reinterpret_cast<Scalar*>(px);\n  Scalar* y = reinterpret_cast<Scalar*>(py);\n\n  if(*incx==1 && *incy==1)    make_vector(y,*n).swap(make_vector(x,*n));\n  else if(*incx>0 && *incy>0) make_vector(y,*n,*incy).swap(make_vector(x,*n,*incx));\n  else if(*incx>0 && *incy<0) make_vector(y,*n,-*incy).reverse().swap(make_vector(x,*n,*incx));\n  else if(*incx<0 && *incy>0) make_vector(y,*n,*incy).swap(make_vector(x,*n,-*incx).reverse());\n  else if(*incx<0 && *incy<0) make_vector(y,*n,-*incy).reverse().swap(make_vector(x,*n,-*incx).reverse());\n\n  return 1;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/blas/level1_real_impl.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009-2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"common.h\"\n\n// computes the sum of magnitudes of all vector elements or, for a complex vector x, the sum\n// res = |Rex1| + |Imx1| + |Rex2| + |Imx2| + ... + |Rexn| + |Imxn|, where x is a vector of order n\nRealScalar EIGEN_BLAS_FUNC(asum)(int *n, RealScalar *px, int *incx)\n{\n//   std::cerr << \"_asum \" << *n << \" \" << *incx << \"\\n\";\n\n  Scalar* x = reinterpret_cast<Scalar*>(px);\n\n  if(*n<=0) return 0;\n\n  if(*incx==1)  return make_vector(x,*n).cwiseAbs().sum();\n  else          return make_vector(x,*n,std::abs(*incx)).cwiseAbs().sum();\n}\n\nint EIGEN_CAT(i, EIGEN_BLAS_FUNC(amax))(int *n, RealScalar *px, int *incx)\n{\n  if(*n<=0) return 0;\n  Scalar* x = reinterpret_cast<Scalar*>(px);\n\n  DenseIndex ret;\n  if(*incx==1)  make_vector(x,*n).cwiseAbs().maxCoeff(&ret);\n  else          make_vector(x,*n,std::abs(*incx)).cwiseAbs().maxCoeff(&ret);\n  return int(ret)+1;\n}\n\nint EIGEN_CAT(i, EIGEN_BLAS_FUNC(amin))(int *n, RealScalar *px, int *incx)\n{\n  if(*n<=0) return 0;\n  Scalar* x = reinterpret_cast<Scalar*>(px);\n\n  DenseIndex ret;\n  if(*incx==1)  make_vector(x,*n).cwiseAbs().minCoeff(&ret);\n  else          make_vector(x,*n,std::abs(*incx)).cwiseAbs().minCoeff(&ret);\n  return int(ret)+1;\n}\n\n// computes a vector-vector dot product.\nScalar EIGEN_BLAS_FUNC(dot)(int *n, RealScalar *px, int *incx, RealScalar *py, int *incy)\n{\n//   std::cerr << \"_dot \" << *n << \" \" << *incx << \" \" << *incy << \"\\n\";\n\n  if(*n<=0) return 0;\n\n  Scalar* x = reinterpret_cast<Scalar*>(px);\n  Scalar* y = reinterpret_cast<Scalar*>(py);\n\n  if(*incx==1 && *incy==1)    return (make_vector(x,*n).cwiseProduct(make_vector(y,*n))).sum();\n  else if(*incx>0 && *incy>0) return (make_vector(x,*n,*incx).cwiseProduct(make_vector(y,*n,*incy))).sum();\n  else if(*incx<0 && *incy>0) return (make_vector(x,*n,-*incx).reverse().cwiseProduct(make_vector(y,*n,*incy))).sum();\n  else if(*incx>0 && *incy<0) return (make_vector(x,*n,*incx).cwiseProduct(make_vector(y,*n,-*incy).reverse())).sum();\n  else if(*incx<0 && *incy<0) return (make_vector(x,*n,-*incx).reverse().cwiseProduct(make_vector(y,*n,-*incy).reverse())).sum();\n  else return 0;\n}\n\n// computes the Euclidean norm of a vector.\n// FIXME\nScalar EIGEN_BLAS_FUNC(nrm2)(int *n, RealScalar *px, int *incx)\n{\n//   std::cerr << \"_nrm2 \" << *n << \" \" << *incx << \"\\n\";\n  if(*n<=0) return 0;\n\n  Scalar* x = reinterpret_cast<Scalar*>(px);\n\n  if(*incx==1)  return make_vector(x,*n).stableNorm();\n  else          return make_vector(x,*n,std::abs(*incx)).stableNorm();\n}\n\nint EIGEN_BLAS_FUNC(rot)(int *n, RealScalar *px, int *incx, RealScalar *py, int *incy, RealScalar *pc, RealScalar *ps)\n{\n//   std::cerr << \"_rot \" << *n << \" \" << *incx << \" \" << *incy << \"\\n\";\n  if(*n<=0) return 0;\n\n  Scalar* x = reinterpret_cast<Scalar*>(px);\n  Scalar* y = reinterpret_cast<Scalar*>(py);\n  Scalar c = *reinterpret_cast<Scalar*>(pc);\n  Scalar s = *reinterpret_cast<Scalar*>(ps);\n\n  StridedVectorType vx(make_vector(x,*n,std::abs(*incx)));\n  StridedVectorType vy(make_vector(y,*n,std::abs(*incy)));\n\n  Reverse<StridedVectorType> rvx(vx);\n  Reverse<StridedVectorType> rvy(vy);\n\n       if(*incx<0 && *incy>0) internal::apply_rotation_in_the_plane(rvx, vy, JacobiRotation<Scalar>(c,s));\n  else if(*incx>0 && *incy<0) internal::apply_rotation_in_the_plane(vx, rvy, JacobiRotation<Scalar>(c,s));\n  else                        internal::apply_rotation_in_the_plane(vx, vy,  JacobiRotation<Scalar>(c,s));\n\n\n  return 0;\n}\n\n/*\n// performs rotation of points in the modified plane.\nint EIGEN_BLAS_FUNC(rotm)(int *n, RealScalar *px, int *incx, RealScalar *py, int *incy, RealScalar *param)\n{\n  Scalar* x = reinterpret_cast<Scalar*>(px);\n  Scalar* y = reinterpret_cast<Scalar*>(py);\n\n  // TODO\n\n  return 0;\n}\n\n// computes the modified parameters for a Givens rotation.\nint EIGEN_BLAS_FUNC(rotmg)(RealScalar *d1, RealScalar *d2, RealScalar *x1, RealScalar *x2, RealScalar *param)\n{\n  // TODO\n\n  return 0;\n}\n*/\n"
  },
  {
    "path": "3rdparty/eigen3/blas/level2_cplx_impl.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009-2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"common.h\"\n\n/**  ZHEMV  performs the matrix-vector  operation\n  *\n  *     y := alpha*A*x + beta*y,\n  *\n  *  where alpha and beta are scalars, x and y are n element vectors and\n  *  A is an n by n hermitian matrix.\n  */\nint EIGEN_BLAS_FUNC(hemv)(const char *uplo, const int *n, const RealScalar *palpha, const RealScalar *pa, const int *lda,\n                          const RealScalar *px, const int *incx, const RealScalar *pbeta, RealScalar *py, const int *incy)\n{\n  typedef void (*functype)(int, const Scalar*, int, const Scalar*, Scalar*, Scalar);\n  static const functype func[2] = {\n    // array index: UP\n    (internal::selfadjoint_matrix_vector_product<Scalar,int,ColMajor,Upper,false,false>::run),\n    // array index: LO\n    (internal::selfadjoint_matrix_vector_product<Scalar,int,ColMajor,Lower,false,false>::run),\n  };\n\n  const Scalar* a = reinterpret_cast<const Scalar*>(pa);\n  const Scalar* x = reinterpret_cast<const Scalar*>(px);\n  Scalar* y = reinterpret_cast<Scalar*>(py);\n  Scalar alpha  = *reinterpret_cast<const Scalar*>(palpha);\n  Scalar beta   = *reinterpret_cast<const Scalar*>(pbeta);\n\n  // check arguments\n  int info = 0;\n  if(UPLO(*uplo)==INVALID)        info = 1;\n  else if(*n<0)                   info = 2;\n  else if(*lda<std::max(1,*n))    info = 5;\n  else if(*incx==0)               info = 7;\n  else if(*incy==0)               info = 10;\n  if(info)\n    return xerbla_(SCALAR_SUFFIX_UP\"HEMV \",&info,6);\n\n  if(*n==0)\n    return 1;\n\n  const Scalar* actual_x = get_compact_vector(x,*n,*incx);\n  Scalar* actual_y = get_compact_vector(y,*n,*incy);\n\n  if(beta!=Scalar(1))\n  {\n    if(beta==Scalar(0)) make_vector(actual_y, *n).setZero();\n    else                make_vector(actual_y, *n) *= beta;\n  }\n\n  if(alpha!=Scalar(0))\n  {\n    int code = UPLO(*uplo);\n    if(code>=2 || func[code]==0)\n      return 0;\n\n    func[code](*n, a, *lda, actual_x, actual_y, alpha);\n  }\n\n  if(actual_x!=x) delete[] actual_x;\n  if(actual_y!=y) delete[] copy_back(actual_y,y,*n,*incy);\n\n  return 1;\n}\n\n/**  ZHBMV  performs the matrix-vector  operation\n  *\n  *     y := alpha*A*x + beta*y,\n  *\n  *  where alpha and beta are scalars, x and y are n element vectors and\n  *  A is an n by n hermitian band matrix, with k super-diagonals.\n  */\n// int EIGEN_BLAS_FUNC(hbmv)(char *uplo, int *n, int *k, RealScalar *alpha, RealScalar *a, int *lda,\n//                           RealScalar *x, int *incx, RealScalar *beta, RealScalar *y, int *incy)\n// {\n//   return 1;\n// }\n\n/**  ZHPMV  performs the matrix-vector operation\n  *\n  *     y := alpha*A*x + beta*y,\n  *\n  *  where alpha and beta are scalars, x and y are n element vectors and\n  *  A is an n by n hermitian matrix, supplied in packed form.\n  */\n// int EIGEN_BLAS_FUNC(hpmv)(char *uplo, int *n, RealScalar *alpha, RealScalar *ap, RealScalar *x, int *incx, RealScalar *beta, RealScalar *y, int *incy)\n// {\n//   return 1;\n// }\n\n/**  ZHPR    performs the hermitian rank 1 operation\n  *\n  *     A := alpha*x*conjg( x' ) + A,\n  *\n  *  where alpha is a real scalar, x is an n element vector and A is an\n  *  n by n hermitian matrix, supplied in packed form.\n  */\nint EIGEN_BLAS_FUNC(hpr)(char *uplo, int *n, RealScalar *palpha, RealScalar *px, int *incx, RealScalar *pap)\n{\n  typedef void (*functype)(int, Scalar*, const Scalar*, RealScalar);\n  static const functype func[2] = {\n    // array index: UP\n    (internal::selfadjoint_packed_rank1_update<Scalar,int,ColMajor,Upper,false,Conj>::run),\n    // array index: LO\n    (internal::selfadjoint_packed_rank1_update<Scalar,int,ColMajor,Lower,false,Conj>::run),\n  };\n\n  Scalar* x = reinterpret_cast<Scalar*>(px);\n  Scalar* ap = reinterpret_cast<Scalar*>(pap);\n  RealScalar alpha = *palpha;\n\n  int info = 0;\n  if(UPLO(*uplo)==INVALID)                                            info = 1;\n  else if(*n<0)                                                       info = 2;\n  else if(*incx==0)                                                   info = 5;\n  if(info)\n    return xerbla_(SCALAR_SUFFIX_UP\"HPR  \",&info,6);\n\n  if(alpha==Scalar(0))\n    return 1;\n\n  Scalar* x_cpy = get_compact_vector(x, *n, *incx);\n\n  int code = UPLO(*uplo);\n  if(code>=2 || func[code]==0)\n    return 0;\n\n  func[code](*n, ap, x_cpy, alpha);\n\n  if(x_cpy!=x)  delete[] x_cpy;\n\n  return 1;\n}\n\n/**  ZHPR2  performs the hermitian rank 2 operation\n  *\n  *     A := alpha*x*conjg( y' ) + conjg( alpha )*y*conjg( x' ) + A,\n  *\n  *  where alpha is a scalar, x and y are n element vectors and A is an\n  *  n by n hermitian matrix, supplied in packed form.\n  */\nint EIGEN_BLAS_FUNC(hpr2)(char *uplo, int *n, RealScalar *palpha, RealScalar *px, int *incx, RealScalar *py, int *incy, RealScalar *pap)\n{\n  typedef void (*functype)(int, Scalar*, const Scalar*, const Scalar*, Scalar);\n  static const functype func[2] = {\n    // array index: UP\n    (internal::packed_rank2_update_selector<Scalar,int,Upper>::run),\n    // array index: LO\n    (internal::packed_rank2_update_selector<Scalar,int,Lower>::run),\n  };\n\n  Scalar* x = reinterpret_cast<Scalar*>(px);\n  Scalar* y = reinterpret_cast<Scalar*>(py);\n  Scalar* ap = reinterpret_cast<Scalar*>(pap);\n  Scalar alpha = *reinterpret_cast<Scalar*>(palpha);\n\n  int info = 0;\n  if(UPLO(*uplo)==INVALID)                                            info = 1;\n  else if(*n<0)                                                       info = 2;\n  else if(*incx==0)                                                   info = 5;\n  else if(*incy==0)                                                   info = 7;\n  if(info)\n    return xerbla_(SCALAR_SUFFIX_UP\"HPR2 \",&info,6);\n\n  if(alpha==Scalar(0))\n    return 1;\n\n  Scalar* x_cpy = get_compact_vector(x, *n, *incx);\n  Scalar* y_cpy = get_compact_vector(y, *n, *incy);\n\n  int code = UPLO(*uplo);\n  if(code>=2 || func[code]==0)\n    return 0;\n\n  func[code](*n, ap, x_cpy, y_cpy, alpha);\n\n  if(x_cpy!=x)  delete[] x_cpy;\n  if(y_cpy!=y)  delete[] y_cpy;\n\n  return 1;\n}\n\n/**  ZHER   performs the hermitian rank 1 operation\n  *\n  *     A := alpha*x*conjg( x' ) + A,\n  *\n  *  where alpha is a real scalar, x is an n element vector and A is an\n  *  n by n hermitian matrix.\n  */\nint EIGEN_BLAS_FUNC(her)(char *uplo, int *n, RealScalar *palpha, RealScalar *px, int *incx, RealScalar *pa, int *lda)\n{\n  typedef void (*functype)(int, Scalar*, int, const Scalar*, const Scalar*, const Scalar&);\n  static const functype func[2] = {\n    // array index: UP\n    (selfadjoint_rank1_update<Scalar,int,ColMajor,Upper,false,Conj>::run),\n    // array index: LO\n    (selfadjoint_rank1_update<Scalar,int,ColMajor,Lower,false,Conj>::run),\n  };\n\n  Scalar* x = reinterpret_cast<Scalar*>(px);\n  Scalar* a = reinterpret_cast<Scalar*>(pa);\n  RealScalar alpha = *reinterpret_cast<RealScalar*>(palpha);\n\n  int info = 0;\n  if(UPLO(*uplo)==INVALID)                                            info = 1;\n  else if(*n<0)                                                       info = 2;\n  else if(*incx==0)                                                   info = 5;\n  else if(*lda<std::max(1,*n))                                        info = 7;\n  if(info)\n    return xerbla_(SCALAR_SUFFIX_UP\"HER  \",&info,6);\n\n  if(alpha==RealScalar(0))\n    return 1;\n\n  Scalar* x_cpy = get_compact_vector(x, *n, *incx);\n\n  int code = UPLO(*uplo);\n  if(code>=2 || func[code]==0)\n    return 0;\n\n  func[code](*n, a, *lda, x_cpy, x_cpy, alpha);\n\n  matrix(a,*n,*n,*lda).diagonal().imag().setZero();\n\n  if(x_cpy!=x)  delete[] x_cpy;\n\n  return 1;\n}\n\n/**  ZHER2  performs the hermitian rank 2 operation\n  *\n  *     A := alpha*x*conjg( y' ) + conjg( alpha )*y*conjg( x' ) + A,\n  *\n  *  where alpha is a scalar, x and y are n element vectors and A is an n\n  *  by n hermitian matrix.\n  */\nint EIGEN_BLAS_FUNC(her2)(char *uplo, int *n, RealScalar *palpha, RealScalar *px, int *incx, RealScalar *py, int *incy, RealScalar *pa, int *lda)\n{\n  typedef void (*functype)(int, Scalar*, int, const Scalar*, const Scalar*, Scalar);\n  static const functype func[2] = {\n    // array index: UP\n    (internal::rank2_update_selector<Scalar,int,Upper>::run),\n    // array index: LO\n    (internal::rank2_update_selector<Scalar,int,Lower>::run),\n  };\n\n  Scalar* x = reinterpret_cast<Scalar*>(px);\n  Scalar* y = reinterpret_cast<Scalar*>(py);\n  Scalar* a = reinterpret_cast<Scalar*>(pa);\n  Scalar alpha = *reinterpret_cast<Scalar*>(palpha);\n\n  int info = 0;\n  if(UPLO(*uplo)==INVALID)                                            info = 1;\n  else if(*n<0)                                                       info = 2;\n  else if(*incx==0)                                                   info = 5;\n  else if(*incy==0)                                                   info = 7;\n  else if(*lda<std::max(1,*n))                                        info = 9;\n  if(info)\n    return xerbla_(SCALAR_SUFFIX_UP\"HER2 \",&info,6);\n\n  if(alpha==Scalar(0))\n    return 1;\n\n  Scalar* x_cpy = get_compact_vector(x, *n, *incx);\n  Scalar* y_cpy = get_compact_vector(y, *n, *incy);\n\n  int code = UPLO(*uplo);\n  if(code>=2 || func[code]==0)\n    return 0;\n\n  func[code](*n, a, *lda, x_cpy, y_cpy, alpha);\n\n  matrix(a,*n,*n,*lda).diagonal().imag().setZero();\n\n  if(x_cpy!=x)  delete[] x_cpy;\n  if(y_cpy!=y)  delete[] y_cpy;\n\n  return 1;\n}\n\n/**  ZGERU  performs the rank 1 operation\n  *\n  *     A := alpha*x*y' + A,\n  *\n  *  where alpha is a scalar, x is an m element vector, y is an n element\n  *  vector and A is an m by n matrix.\n  */\nint EIGEN_BLAS_FUNC(geru)(int *m, int *n, RealScalar *palpha, RealScalar *px, int *incx, RealScalar *py, int *incy, RealScalar *pa, int *lda)\n{\n  Scalar* x = reinterpret_cast<Scalar*>(px);\n  Scalar* y = reinterpret_cast<Scalar*>(py);\n  Scalar* a = reinterpret_cast<Scalar*>(pa);\n  Scalar alpha = *reinterpret_cast<Scalar*>(palpha);\n\n  int info = 0;\n       if(*m<0)                                                       info = 1;\n  else if(*n<0)                                                       info = 2;\n  else if(*incx==0)                                                   info = 5;\n  else if(*incy==0)                                                   info = 7;\n  else if(*lda<std::max(1,*m))                                        info = 9;\n  if(info)\n    return xerbla_(SCALAR_SUFFIX_UP\"GERU \",&info,6);\n\n  if(alpha==Scalar(0))\n    return 1;\n\n  Scalar* x_cpy = get_compact_vector(x,*m,*incx);\n  Scalar* y_cpy = get_compact_vector(y,*n,*incy);\n\n  internal::general_rank1_update<Scalar,int,ColMajor,false,false>::run(*m, *n, a, *lda, x_cpy, y_cpy, alpha);\n\n  if(x_cpy!=x)  delete[] x_cpy;\n  if(y_cpy!=y)  delete[] y_cpy;\n\n  return 1;\n}\n\n/**  ZGERC  performs the rank 1 operation\n  *\n  *     A := alpha*x*conjg( y' ) + A,\n  *\n  *  where alpha is a scalar, x is an m element vector, y is an n element\n  *  vector and A is an m by n matrix.\n  */\nint EIGEN_BLAS_FUNC(gerc)(int *m, int *n, RealScalar *palpha, RealScalar *px, int *incx, RealScalar *py, int *incy, RealScalar *pa, int *lda)\n{\n  Scalar* x = reinterpret_cast<Scalar*>(px);\n  Scalar* y = reinterpret_cast<Scalar*>(py);\n  Scalar* a = reinterpret_cast<Scalar*>(pa);\n  Scalar alpha = *reinterpret_cast<Scalar*>(palpha);\n\n  int info = 0;\n       if(*m<0)                                                       info = 1;\n  else if(*n<0)                                                       info = 2;\n  else if(*incx==0)                                                   info = 5;\n  else if(*incy==0)                                                   info = 7;\n  else if(*lda<std::max(1,*m))                                        info = 9;\n  if(info)\n    return xerbla_(SCALAR_SUFFIX_UP\"GERC \",&info,6);\n\n  if(alpha==Scalar(0))\n    return 1;\n\n  Scalar* x_cpy = get_compact_vector(x,*m,*incx);\n  Scalar* y_cpy = get_compact_vector(y,*n,*incy);\n\n  internal::general_rank1_update<Scalar,int,ColMajor,false,Conj>::run(*m, *n, a, *lda, x_cpy, y_cpy, alpha);\n\n  if(x_cpy!=x)  delete[] x_cpy;\n  if(y_cpy!=y)  delete[] y_cpy;\n\n  return 1;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/blas/level2_impl.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009-2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"common.h\"\n\ntemplate<typename Index, typename Scalar, int StorageOrder, bool ConjugateLhs, bool ConjugateRhs>\nstruct general_matrix_vector_product_wrapper\n{\n  static void run(Index rows, Index cols,const Scalar *lhs, Index lhsStride, const Scalar *rhs, Index rhsIncr, Scalar* res, Index resIncr, Scalar alpha)\n  {\n    typedef internal::const_blas_data_mapper<Scalar,Index,StorageOrder> LhsMapper;\n    typedef internal::const_blas_data_mapper<Scalar,Index,RowMajor> RhsMapper;\n    \n    internal::general_matrix_vector_product\n        <Index,Scalar,LhsMapper,StorageOrder,ConjugateLhs,Scalar,RhsMapper,ConjugateRhs>::run(\n        rows, cols, LhsMapper(lhs, lhsStride), RhsMapper(rhs, rhsIncr), res, resIncr, alpha);\n  }\n};\n\nint EIGEN_BLAS_FUNC(gemv)(const char *opa, const int *m, const int *n, const RealScalar *palpha,\n                          const RealScalar *pa, const int *lda, const RealScalar *pb, const int *incb, const RealScalar *pbeta, RealScalar *pc, const int *incc)\n{\n  typedef void (*functype)(int, int, const Scalar *, int, const Scalar *, int , Scalar *, int, Scalar);\n  static const functype func[4] = {\n    // array index: NOTR\n    (general_matrix_vector_product_wrapper<int,Scalar,ColMajor,false,false>::run),\n    // array index: TR  \n    (general_matrix_vector_product_wrapper<int,Scalar,RowMajor,false,false>::run),\n    // array index: ADJ \n    (general_matrix_vector_product_wrapper<int,Scalar,RowMajor,Conj ,false>::run),\n    0\n  };\n\n  const Scalar* a = reinterpret_cast<const Scalar*>(pa);\n  const Scalar* b = reinterpret_cast<const Scalar*>(pb);\n  Scalar* c = reinterpret_cast<Scalar*>(pc);\n  Scalar alpha  = *reinterpret_cast<const Scalar*>(palpha);\n  Scalar beta   = *reinterpret_cast<const Scalar*>(pbeta);\n\n  // check arguments\n  int info = 0;\n  if(OP(*opa)==INVALID)           info = 1;\n  else if(*m<0)                   info = 2;\n  else if(*n<0)                   info = 3;\n  else if(*lda<std::max(1,*m))    info = 6;\n  else if(*incb==0)               info = 8;\n  else if(*incc==0)               info = 11;\n  if(info)\n    return xerbla_(SCALAR_SUFFIX_UP\"GEMV \",&info,6);\n\n  if(*m==0 || *n==0 || (alpha==Scalar(0) && beta==Scalar(1)))\n    return 0;\n\n  int actual_m = *m;\n  int actual_n = *n;\n  int code = OP(*opa);\n  if(code!=NOTR)\n    std::swap(actual_m,actual_n);\n\n  const Scalar* actual_b = get_compact_vector(b,actual_n,*incb);\n  Scalar* actual_c = get_compact_vector(c,actual_m,*incc);\n\n  if(beta!=Scalar(1))\n  {\n    if(beta==Scalar(0)) make_vector(actual_c, actual_m).setZero();\n    else                make_vector(actual_c, actual_m) *= beta;\n  }\n\n  if(code>=4 || func[code]==0)\n    return 0;\n\n  func[code](actual_m, actual_n, a, *lda, actual_b, 1, actual_c, 1, alpha);\n\n  if(actual_b!=b) delete[] actual_b;\n  if(actual_c!=c) delete[] copy_back(actual_c,c,actual_m,*incc);\n\n  return 1;\n}\n\nint EIGEN_BLAS_FUNC(trsv)(const char *uplo, const char *opa, const char *diag, const int *n, const RealScalar *pa, const int *lda, RealScalar *pb, const int *incb)\n{\n  typedef void (*functype)(int, const Scalar *, int, Scalar *);\n  static const functype func[16] = {\n    // array index: NOTR  | (UP << 2) | (NUNIT << 3)\n    (internal::triangular_solve_vector<Scalar,Scalar,int,OnTheLeft, Upper|0,       false,ColMajor>::run),\n    // array index: TR    | (UP << 2) | (NUNIT << 3)\n    (internal::triangular_solve_vector<Scalar,Scalar,int,OnTheLeft, Lower|0,       false,RowMajor>::run),\n    // array index: ADJ   | (UP << 2) | (NUNIT << 3)\n    (internal::triangular_solve_vector<Scalar,Scalar,int,OnTheLeft, Lower|0,       Conj, RowMajor>::run),\n    0,\n    // array index: NOTR  | (LO << 2) | (NUNIT << 3)\n    (internal::triangular_solve_vector<Scalar,Scalar,int,OnTheLeft, Lower|0,       false,ColMajor>::run),\n    // array index: TR    | (LO << 2) | (NUNIT << 3)\n    (internal::triangular_solve_vector<Scalar,Scalar,int,OnTheLeft, Upper|0,       false,RowMajor>::run),\n    // array index: ADJ   | (LO << 2) | (NUNIT << 3)\n    (internal::triangular_solve_vector<Scalar,Scalar,int,OnTheLeft, Upper|0,       Conj, RowMajor>::run),\n    0,\n    // array index: NOTR  | (UP << 2) | (UNIT  << 3)\n    (internal::triangular_solve_vector<Scalar,Scalar,int,OnTheLeft, Upper|UnitDiag,false,ColMajor>::run),\n    // array index: TR    | (UP << 2) | (UNIT  << 3)\n    (internal::triangular_solve_vector<Scalar,Scalar,int,OnTheLeft, Lower|UnitDiag,false,RowMajor>::run),\n    // array index: ADJ   | (UP << 2) | (UNIT  << 3)\n    (internal::triangular_solve_vector<Scalar,Scalar,int,OnTheLeft, Lower|UnitDiag,Conj, RowMajor>::run),\n    0,\n    // array index: NOTR  | (LO << 2) | (UNIT  << 3)\n    (internal::triangular_solve_vector<Scalar,Scalar,int,OnTheLeft, Lower|UnitDiag,false,ColMajor>::run),\n    // array index: TR    | (LO << 2) | (UNIT  << 3)\n    (internal::triangular_solve_vector<Scalar,Scalar,int,OnTheLeft, Upper|UnitDiag,false,RowMajor>::run),\n    // array index: ADJ   | (LO << 2) | (UNIT  << 3)\n    (internal::triangular_solve_vector<Scalar,Scalar,int,OnTheLeft, Upper|UnitDiag,Conj, RowMajor>::run),\n    0\n  };\n\n  const Scalar* a = reinterpret_cast<const Scalar*>(pa);\n  Scalar* b = reinterpret_cast<Scalar*>(pb);\n\n  int info = 0;\n  if(UPLO(*uplo)==INVALID)                                            info = 1;\n  else if(OP(*opa)==INVALID)                                          info = 2;\n  else if(DIAG(*diag)==INVALID)                                       info = 3;\n  else if(*n<0)                                                       info = 4;\n  else if(*lda<std::max(1,*n))                                        info = 6;\n  else if(*incb==0)                                                   info = 8;\n  if(info)\n    return xerbla_(SCALAR_SUFFIX_UP\"TRSV \",&info,6);\n\n  Scalar* actual_b = get_compact_vector(b,*n,*incb);\n\n  int code = OP(*opa) | (UPLO(*uplo) << 2) | (DIAG(*diag) << 3);\n  func[code](*n, a, *lda, actual_b);\n\n  if(actual_b!=b) delete[] copy_back(actual_b,b,*n,*incb);\n\n  return 0;\n}\n\n\n\nint EIGEN_BLAS_FUNC(trmv)(const char *uplo, const char *opa, const char *diag, const int *n, const RealScalar *pa, const int *lda, RealScalar *pb, const int *incb)\n{\n  typedef void (*functype)(int, int, const Scalar *, int, const Scalar *, int, Scalar *, int, const Scalar&);\n  static const functype func[16] = {\n    // array index: NOTR  | (UP << 2) | (NUNIT << 3)\n    (internal::triangular_matrix_vector_product<int,Upper|0,       Scalar,false,Scalar,false,ColMajor>::run),\n    // array index: TR    | (UP << 2) | (NUNIT << 3)\n    (internal::triangular_matrix_vector_product<int,Lower|0,       Scalar,false,Scalar,false,RowMajor>::run),\n    // array index: ADJ   | (UP << 2) | (NUNIT << 3)\n    (internal::triangular_matrix_vector_product<int,Lower|0,       Scalar,Conj, Scalar,false,RowMajor>::run),\n    0,\n    // array index: NOTR  | (LO << 2) | (NUNIT << 3)\n    (internal::triangular_matrix_vector_product<int,Lower|0,       Scalar,false,Scalar,false,ColMajor>::run),\n    // array index: TR    | (LO << 2) | (NUNIT << 3)\n    (internal::triangular_matrix_vector_product<int,Upper|0,       Scalar,false,Scalar,false,RowMajor>::run),\n    // array index: ADJ   | (LO << 2) | (NUNIT << 3)\n    (internal::triangular_matrix_vector_product<int,Upper|0,       Scalar,Conj, Scalar,false,RowMajor>::run),\n    0,\n    // array index: NOTR  | (UP << 2) | (UNIT  << 3)\n    (internal::triangular_matrix_vector_product<int,Upper|UnitDiag,Scalar,false,Scalar,false,ColMajor>::run),\n    // array index: TR    | (UP << 2) | (UNIT  << 3)\n    (internal::triangular_matrix_vector_product<int,Lower|UnitDiag,Scalar,false,Scalar,false,RowMajor>::run),\n    // array index: ADJ   | (UP << 2) | (UNIT  << 3)\n    (internal::triangular_matrix_vector_product<int,Lower|UnitDiag,Scalar,Conj, Scalar,false,RowMajor>::run),\n    0,\n    // array index: NOTR  | (LO << 2) | (UNIT  << 3)\n    (internal::triangular_matrix_vector_product<int,Lower|UnitDiag,Scalar,false,Scalar,false,ColMajor>::run),\n    // array index: TR    | (LO << 2) | (UNIT  << 3)\n    (internal::triangular_matrix_vector_product<int,Upper|UnitDiag,Scalar,false,Scalar,false,RowMajor>::run),\n    // array index: ADJ   | (LO << 2) | (UNIT  << 3)\n    (internal::triangular_matrix_vector_product<int,Upper|UnitDiag,Scalar,Conj, Scalar,false,RowMajor>::run),\n    0\n  };\n\n  const Scalar* a = reinterpret_cast<const Scalar*>(pa);\n  Scalar* b = reinterpret_cast<Scalar*>(pb);\n\n  int info = 0;\n  if(UPLO(*uplo)==INVALID)                                            info = 1;\n  else if(OP(*opa)==INVALID)                                          info = 2;\n  else if(DIAG(*diag)==INVALID)                                       info = 3;\n  else if(*n<0)                                                       info = 4;\n  else if(*lda<std::max(1,*n))                                        info = 6;\n  else if(*incb==0)                                                   info = 8;\n  if(info)\n    return xerbla_(SCALAR_SUFFIX_UP\"TRMV \",&info,6);\n\n  if(*n==0)\n    return 1;\n\n  Scalar* actual_b = get_compact_vector(b,*n,*incb);\n  Matrix<Scalar,Dynamic,1> res(*n);\n  res.setZero();\n\n  int code = OP(*opa) | (UPLO(*uplo) << 2) | (DIAG(*diag) << 3);\n  if(code>=16 || func[code]==0)\n    return 0;\n\n  func[code](*n, *n, a, *lda, actual_b, 1, res.data(), 1, Scalar(1));\n\n  copy_back(res.data(),b,*n,*incb);\n  if(actual_b!=b) delete[] actual_b;\n\n  return 1;\n}\n\n/**  GBMV  performs one of the matrix-vector operations\n  *\n  *     y := alpha*A*x + beta*y,   or   y := alpha*A'*x + beta*y,\n  *\n  *  where alpha and beta are scalars, x and y are vectors and A is an\n  *  m by n band matrix, with kl sub-diagonals and ku super-diagonals.\n  */\nint EIGEN_BLAS_FUNC(gbmv)(char *trans, int *m, int *n, int *kl, int *ku, RealScalar *palpha, RealScalar *pa, int *lda,\n                          RealScalar *px, int *incx, RealScalar *pbeta, RealScalar *py, int *incy)\n{\n  const Scalar* a = reinterpret_cast<const Scalar*>(pa);\n  const Scalar* x = reinterpret_cast<const Scalar*>(px);\n  Scalar* y = reinterpret_cast<Scalar*>(py);\n  Scalar alpha = *reinterpret_cast<const Scalar*>(palpha);\n  Scalar beta = *reinterpret_cast<const Scalar*>(pbeta);\n  int coeff_rows = *kl+*ku+1;\n\n  int info = 0;\n       if(OP(*trans)==INVALID)                                        info = 1;\n  else if(*m<0)                                                       info = 2;\n  else if(*n<0)                                                       info = 3;\n  else if(*kl<0)                                                      info = 4;\n  else if(*ku<0)                                                      info = 5;\n  else if(*lda<coeff_rows)                                            info = 8;\n  else if(*incx==0)                                                   info = 10;\n  else if(*incy==0)                                                   info = 13;\n  if(info)\n    return xerbla_(SCALAR_SUFFIX_UP\"GBMV \",&info,6);\n\n  if(*m==0 || *n==0 || (alpha==Scalar(0) && beta==Scalar(1)))\n    return 0;\n\n  int actual_m = *m;\n  int actual_n = *n;\n  if(OP(*trans)!=NOTR)\n    std::swap(actual_m,actual_n);\n\n  const Scalar* actual_x = get_compact_vector(x,actual_n,*incx);\n  Scalar* actual_y = get_compact_vector(y,actual_m,*incy);\n\n  if(beta!=Scalar(1))\n  {\n    if(beta==Scalar(0)) make_vector(actual_y, actual_m).setZero();\n    else                make_vector(actual_y, actual_m) *= beta;\n  }\n\n  ConstMatrixType mat_coeffs(a,coeff_rows,*n,*lda);\n\n  int nb = std::min(*n,(*m)+(*ku));\n  for(int j=0; j<nb; ++j)\n  {\n    int start = std::max(0,j - *ku);\n    int end = std::min((*m)-1,j + *kl);\n    int len = end - start + 1;\n    int offset = (*ku) - j + start;\n    if(OP(*trans)==NOTR)\n      make_vector(actual_y+start,len) += (alpha*actual_x[j]) * mat_coeffs.col(j).segment(offset,len);\n    else if(OP(*trans)==TR)\n      actual_y[j] += alpha * ( mat_coeffs.col(j).segment(offset,len).transpose() * make_vector(actual_x+start,len) ).value();\n    else\n      actual_y[j] += alpha * ( mat_coeffs.col(j).segment(offset,len).adjoint()   * make_vector(actual_x+start,len) ).value();\n  }\n\n  if(actual_x!=x) delete[] actual_x;\n  if(actual_y!=y) delete[] copy_back(actual_y,y,actual_m,*incy);\n\n  return 0;\n}\n\n#if 0\n/**  TBMV  performs one of the matrix-vector operations\n  *\n  *     x := A*x,   or   x := A'*x,\n  *\n  *  where x is an n element vector and  A is an n by n unit, or non-unit,\n  *  upper or lower triangular band matrix, with ( k + 1 ) diagonals.\n  */\nint EIGEN_BLAS_FUNC(tbmv)(char *uplo, char *opa, char *diag, int *n, int *k, RealScalar *pa, int *lda, RealScalar *px, int *incx)\n{\n  Scalar* a = reinterpret_cast<Scalar*>(pa);\n  Scalar* x = reinterpret_cast<Scalar*>(px);\n  int coeff_rows = *k + 1;\n\n  int info = 0;\n       if(UPLO(*uplo)==INVALID)                                       info = 1;\n  else if(OP(*opa)==INVALID)                                          info = 2;\n  else if(DIAG(*diag)==INVALID)                                       info = 3;\n  else if(*n<0)                                                       info = 4;\n  else if(*k<0)                                                       info = 5;\n  else if(*lda<coeff_rows)                                            info = 7;\n  else if(*incx==0)                                                   info = 9;\n  if(info)\n    return xerbla_(SCALAR_SUFFIX_UP\"TBMV \",&info,6);\n\n  if(*n==0)\n    return 0;\n\n  int actual_n = *n;\n\n  Scalar* actual_x = get_compact_vector(x,actual_n,*incx);\n\n  MatrixType mat_coeffs(a,coeff_rows,*n,*lda);\n\n  int ku = UPLO(*uplo)==UPPER ? *k : 0;\n  int kl = UPLO(*uplo)==LOWER ? *k : 0;\n\n  for(int j=0; j<*n; ++j)\n  {\n    int start = std::max(0,j - ku);\n    int end = std::min((*m)-1,j + kl);\n    int len = end - start + 1;\n    int offset = (ku) - j + start;\n\n    if(OP(*trans)==NOTR)\n      make_vector(actual_y+start,len) += (alpha*actual_x[j]) * mat_coeffs.col(j).segment(offset,len);\n    else if(OP(*trans)==TR)\n      actual_y[j] += alpha * ( mat_coeffs.col(j).segment(offset,len).transpose() * make_vector(actual_x+start,len) ).value();\n    else\n      actual_y[j] += alpha * ( mat_coeffs.col(j).segment(offset,len).adjoint()   * make_vector(actual_x+start,len) ).value();\n  }\n\n  if(actual_x!=x) delete[] actual_x;\n  if(actual_y!=y) delete[] copy_back(actual_y,y,actual_m,*incy);\n\n  return 0;\n}\n#endif\n\n/**  DTBSV  solves one of the systems of equations\n  *\n  *     A*x = b,   or   A'*x = b,\n  *\n  *  where b and x are n element vectors and A is an n by n unit, or\n  *  non-unit, upper or lower triangular band matrix, with ( k + 1 )\n  *  diagonals.\n  *\n  *  No test for singularity or near-singularity is included in this\n  *  routine. Such tests must be performed before calling this routine.\n  */\nint EIGEN_BLAS_FUNC(tbsv)(char *uplo, char *op, char *diag, int *n, int *k, RealScalar *pa, int *lda, RealScalar *px, int *incx)\n{\n  typedef void (*functype)(int, int, const Scalar *, int, Scalar *);\n  static const functype func[16] = {\n    // array index: NOTR  | (UP << 2) | (NUNIT << 3)\n    (internal::band_solve_triangular_selector<int,Upper|0,       Scalar,false,Scalar,ColMajor>::run),\n    // array index: TR    | (UP << 2) | (NUNIT << 3)\n    (internal::band_solve_triangular_selector<int,Lower|0,       Scalar,false,Scalar,RowMajor>::run),\n    // array index: ADJ   | (UP << 2) | (NUNIT << 3)\n    (internal::band_solve_triangular_selector<int,Lower|0,       Scalar,Conj, Scalar,RowMajor>::run),\n    0,\n    // array index: NOTR  | (LO << 2) | (NUNIT << 3)\n    (internal::band_solve_triangular_selector<int,Lower|0,       Scalar,false,Scalar,ColMajor>::run),\n    // array index: TR    | (LO << 2) | (NUNIT << 3)\n    (internal::band_solve_triangular_selector<int,Upper|0,       Scalar,false,Scalar,RowMajor>::run),\n    // array index: ADJ   | (LO << 2) | (NUNIT << 3)\n    (internal::band_solve_triangular_selector<int,Upper|0,       Scalar,Conj, Scalar,RowMajor>::run),\n    0,\n    // array index: NOTR  | (UP << 2) | (UNIT  << 3)\n    (internal::band_solve_triangular_selector<int,Upper|UnitDiag,Scalar,false,Scalar,ColMajor>::run),\n    // array index: TR    | (UP << 2) | (UNIT  << 3)\n    (internal::band_solve_triangular_selector<int,Lower|UnitDiag,Scalar,false,Scalar,RowMajor>::run),\n    // array index: ADJ   | (UP << 2) | (UNIT  << 3)\n    (internal::band_solve_triangular_selector<int,Lower|UnitDiag,Scalar,Conj, Scalar,RowMajor>::run),\n    0,\n    // array index: NOTR  | (LO << 2) | (UNIT  << 3)\n    (internal::band_solve_triangular_selector<int,Lower|UnitDiag,Scalar,false,Scalar,ColMajor>::run),\n    // array index: TR    | (LO << 2) | (UNIT  << 3)\n    (internal::band_solve_triangular_selector<int,Upper|UnitDiag,Scalar,false,Scalar,RowMajor>::run),\n    // array index: ADJ   | (LO << 2) | (UNIT  << 3)\n    (internal::band_solve_triangular_selector<int,Upper|UnitDiag,Scalar,Conj, Scalar,RowMajor>::run),\n    0,\n  };\n\n  Scalar* a = reinterpret_cast<Scalar*>(pa);\n  Scalar* x = reinterpret_cast<Scalar*>(px);\n  int coeff_rows = *k+1;\n\n  int info = 0;\n       if(UPLO(*uplo)==INVALID)                                       info = 1;\n  else if(OP(*op)==INVALID)                                           info = 2;\n  else if(DIAG(*diag)==INVALID)                                       info = 3;\n  else if(*n<0)                                                       info = 4;\n  else if(*k<0)                                                       info = 5;\n  else if(*lda<coeff_rows)                                            info = 7;\n  else if(*incx==0)                                                   info = 9;\n  if(info)\n    return xerbla_(SCALAR_SUFFIX_UP\"TBSV \",&info,6);\n\n  if(*n==0 || (*k==0 && DIAG(*diag)==UNIT))\n    return 0;\n\n  int actual_n = *n;\n\n  Scalar* actual_x = get_compact_vector(x,actual_n,*incx);\n\n  int code = OP(*op) | (UPLO(*uplo) << 2) | (DIAG(*diag) << 3);\n  if(code>=16 || func[code]==0)\n    return 0;\n\n  func[code](*n, *k, a, *lda, actual_x);\n\n  if(actual_x!=x) delete[] copy_back(actual_x,x,actual_n,*incx);\n\n  return 0;\n}\n\n/**  DTPMV  performs one of the matrix-vector operations\n  *\n  *     x := A*x,   or   x := A'*x,\n  *\n  *  where x is an n element vector and  A is an n by n unit, or non-unit,\n  *  upper or lower triangular matrix, supplied in packed form.\n  */\nint EIGEN_BLAS_FUNC(tpmv)(char *uplo, char *opa, char *diag, int *n, RealScalar *pap, RealScalar *px, int *incx)\n{\n  typedef void (*functype)(int, const Scalar*, const Scalar*, Scalar*, Scalar);\n  static const functype func[16] = {\n    // array index: NOTR  | (UP << 2) | (NUNIT << 3)\n    (internal::packed_triangular_matrix_vector_product<int,Upper|0,       Scalar,false,Scalar,false,ColMajor>::run),\n    // array index: TR    | (UP << 2) | (NUNIT << 3)\n    (internal::packed_triangular_matrix_vector_product<int,Lower|0,       Scalar,false,Scalar,false,RowMajor>::run),\n    // array index: ADJ   | (UP << 2) | (NUNIT << 3)\n    (internal::packed_triangular_matrix_vector_product<int,Lower|0,       Scalar,Conj, Scalar,false,RowMajor>::run),\n    0,\n    // array index: NOTR  | (LO << 2) | (NUNIT << 3)\n    (internal::packed_triangular_matrix_vector_product<int,Lower|0,       Scalar,false,Scalar,false,ColMajor>::run),\n    // array index: TR    | (LO << 2) | (NUNIT << 3)\n    (internal::packed_triangular_matrix_vector_product<int,Upper|0,       Scalar,false,Scalar,false,RowMajor>::run),\n    // array index: ADJ   | (LO << 2) | (NUNIT << 3)\n    (internal::packed_triangular_matrix_vector_product<int,Upper|0,       Scalar,Conj, Scalar,false,RowMajor>::run),\n    0,\n    // array index: NOTR  | (UP << 2) | (UNIT  << 3)\n    (internal::packed_triangular_matrix_vector_product<int,Upper|UnitDiag,Scalar,false,Scalar,false,ColMajor>::run),\n    // array index: TR    | (UP << 2) | (UNIT  << 3)\n    (internal::packed_triangular_matrix_vector_product<int,Lower|UnitDiag,Scalar,false,Scalar,false,RowMajor>::run),\n    // array index: ADJ   | (UP << 2) | (UNIT  << 3)\n    (internal::packed_triangular_matrix_vector_product<int,Lower|UnitDiag,Scalar,Conj, Scalar,false,RowMajor>::run),\n    0,\n    // array index: NOTR  | (LO << 2) | (UNIT  << 3)\n    (internal::packed_triangular_matrix_vector_product<int,Lower|UnitDiag,Scalar,false,Scalar,false,ColMajor>::run),\n    // array index: TR    | (LO << 2) | (UNIT  << 3)\n    (internal::packed_triangular_matrix_vector_product<int,Upper|UnitDiag,Scalar,false,Scalar,false,RowMajor>::run),\n    // array index: ADJ   | (LO << 2) | (UNIT  << 3)\n    (internal::packed_triangular_matrix_vector_product<int,Upper|UnitDiag,Scalar,Conj, Scalar,false,RowMajor>::run),\n    0\n  };\n\n  Scalar* ap = reinterpret_cast<Scalar*>(pap);\n  Scalar* x = reinterpret_cast<Scalar*>(px);\n\n  int info = 0;\n  if(UPLO(*uplo)==INVALID)                                            info = 1;\n  else if(OP(*opa)==INVALID)                                          info = 2;\n  else if(DIAG(*diag)==INVALID)                                       info = 3;\n  else if(*n<0)                                                       info = 4;\n  else if(*incx==0)                                                   info = 7;\n  if(info)\n    return xerbla_(SCALAR_SUFFIX_UP\"TPMV \",&info,6);\n\n  if(*n==0)\n    return 1;\n\n  Scalar* actual_x = get_compact_vector(x,*n,*incx);\n  Matrix<Scalar,Dynamic,1> res(*n);\n  res.setZero();\n\n  int code = OP(*opa) | (UPLO(*uplo) << 2) | (DIAG(*diag) << 3);\n  if(code>=16 || func[code]==0)\n    return 0;\n\n  func[code](*n, ap, actual_x, res.data(), Scalar(1));\n\n  copy_back(res.data(),x,*n,*incx);\n  if(actual_x!=x) delete[] actual_x;\n\n  return 1;\n}\n\n/**  DTPSV  solves one of the systems of equations\n  *\n  *     A*x = b,   or   A'*x = b,\n  *\n  *  where b and x are n element vectors and A is an n by n unit, or\n  *  non-unit, upper or lower triangular matrix, supplied in packed form.\n  *\n  *  No test for singularity or near-singularity is included in this\n  *  routine. Such tests must be performed before calling this routine.\n  */\nint EIGEN_BLAS_FUNC(tpsv)(char *uplo, char *opa, char *diag, int *n, RealScalar *pap, RealScalar *px, int *incx)\n{\n  typedef void (*functype)(int, const Scalar*, Scalar*);\n  static const functype func[16] = {\n    // array index: NOTR  | (UP << 2) | (NUNIT << 3)\n    (internal::packed_triangular_solve_vector<Scalar,Scalar,int,OnTheLeft, Upper|0,       false,ColMajor>::run),\n    // array index: TR    | (UP << 2) | (NUNIT << 3)\n    (internal::packed_triangular_solve_vector<Scalar,Scalar,int,OnTheLeft, Lower|0,       false,RowMajor>::run),\n    // array index: ADJ   | (UP << 2) | (NUNIT << 3)\n    (internal::packed_triangular_solve_vector<Scalar,Scalar,int,OnTheLeft, Lower|0,       Conj, RowMajor>::run),\n    0,\n    // array index: NOTR  | (LO << 2) | (NUNIT << 3)\n    (internal::packed_triangular_solve_vector<Scalar,Scalar,int,OnTheLeft, Lower|0,       false,ColMajor>::run),\n    // array index: TR    | (LO << 2) | (NUNIT << 3)\n    (internal::packed_triangular_solve_vector<Scalar,Scalar,int,OnTheLeft, Upper|0,       false,RowMajor>::run),\n    // array index: ADJ   | (LO << 2) | (NUNIT << 3)\n    (internal::packed_triangular_solve_vector<Scalar,Scalar,int,OnTheLeft, Upper|0,       Conj, RowMajor>::run),\n    0,\n    // array index: NOTR  | (UP << 2) | (UNIT  << 3)\n    (internal::packed_triangular_solve_vector<Scalar,Scalar,int,OnTheLeft, Upper|UnitDiag,false,ColMajor>::run),\n    // array index: TR    | (UP << 2) | (UNIT  << 3)\n    (internal::packed_triangular_solve_vector<Scalar,Scalar,int,OnTheLeft, Lower|UnitDiag,false,RowMajor>::run),\n    // array index: ADJ   | (UP << 2) | (UNIT  << 3)\n    (internal::packed_triangular_solve_vector<Scalar,Scalar,int,OnTheLeft, Lower|UnitDiag,Conj, RowMajor>::run),\n    0,\n    // array index: NOTR  | (LO << 2) | (UNIT  << 3)\n    (internal::packed_triangular_solve_vector<Scalar,Scalar,int,OnTheLeft, Lower|UnitDiag,false,ColMajor>::run),\n    // array index: TR    | (LO << 2) | (UNIT  << 3)\n    (internal::packed_triangular_solve_vector<Scalar,Scalar,int,OnTheLeft, Upper|UnitDiag,false,RowMajor>::run),\n    // array index: ADJ   | (LO << 2) | (UNIT  << 3)\n    (internal::packed_triangular_solve_vector<Scalar,Scalar,int,OnTheLeft, Upper|UnitDiag,Conj, RowMajor>::run),\n    0\n  };\n\n  Scalar* ap = reinterpret_cast<Scalar*>(pap);\n  Scalar* x = reinterpret_cast<Scalar*>(px);\n\n  int info = 0;\n  if(UPLO(*uplo)==INVALID)                                            info = 1;\n  else if(OP(*opa)==INVALID)                                          info = 2;\n  else if(DIAG(*diag)==INVALID)                                       info = 3;\n  else if(*n<0)                                                       info = 4;\n  else if(*incx==0)                                                   info = 7;\n  if(info)\n    return xerbla_(SCALAR_SUFFIX_UP\"TPSV \",&info,6);\n\n  Scalar* actual_x = get_compact_vector(x,*n,*incx);\n\n  int code = OP(*opa) | (UPLO(*uplo) << 2) | (DIAG(*diag) << 3);\n  func[code](*n, ap, actual_x);\n\n  if(actual_x!=x) delete[] copy_back(actual_x,x,*n,*incx);\n\n  return 1;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/blas/level2_real_impl.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009-2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"common.h\"\n\n// y = alpha*A*x + beta*y\nint EIGEN_BLAS_FUNC(symv) (const char *uplo, const int *n, const RealScalar *palpha, const RealScalar *pa, const int *lda,\n                           const RealScalar *px, const int *incx, const RealScalar *pbeta, RealScalar *py, const int *incy)\n{\n  typedef void (*functype)(int, const Scalar*, int, const Scalar*, Scalar*, Scalar);\n  static const functype func[2] = {\n    // array index: UP\n    (internal::selfadjoint_matrix_vector_product<Scalar,int,ColMajor,Upper,false,false>::run),\n    // array index: LO\n    (internal::selfadjoint_matrix_vector_product<Scalar,int,ColMajor,Lower,false,false>::run),\n  };\n\n  const Scalar* a = reinterpret_cast<const Scalar*>(pa);\n  const Scalar* x = reinterpret_cast<const Scalar*>(px);\n  Scalar* y = reinterpret_cast<Scalar*>(py);\n  Scalar alpha  = *reinterpret_cast<const Scalar*>(palpha);\n  Scalar beta   = *reinterpret_cast<const Scalar*>(pbeta);\n\n  // check arguments\n  int info = 0;\n  if(UPLO(*uplo)==INVALID)        info = 1;\n  else if(*n<0)                   info = 2;\n  else if(*lda<std::max(1,*n))    info = 5;\n  else if(*incx==0)               info = 7;\n  else if(*incy==0)               info = 10;\n  if(info)\n    return xerbla_(SCALAR_SUFFIX_UP\"SYMV \",&info,6);\n\n  if(*n==0)\n    return 0;\n\n  const Scalar* actual_x = get_compact_vector(x,*n,*incx);\n  Scalar* actual_y = get_compact_vector(y,*n,*incy);\n\n  if(beta!=Scalar(1))\n  {\n    if(beta==Scalar(0)) make_vector(actual_y, *n).setZero();\n    else                make_vector(actual_y, *n) *= beta;\n  }\n\n  int code = UPLO(*uplo);\n  if(code>=2 || func[code]==0)\n    return 0;\n\n  func[code](*n, a, *lda, actual_x, actual_y, alpha);\n\n  if(actual_x!=x) delete[] actual_x;\n  if(actual_y!=y) delete[] copy_back(actual_y,y,*n,*incy);\n\n  return 1;\n}\n\n// C := alpha*x*x' + C\nint EIGEN_BLAS_FUNC(syr)(const char *uplo, const int *n, const RealScalar *palpha, const RealScalar *px, const int *incx, RealScalar *pc, const int *ldc)\n{\n\n  typedef void (*functype)(int, Scalar*, int, const Scalar*, const Scalar*, const Scalar&);\n  static const functype func[2] = {\n    // array index: UP\n    (selfadjoint_rank1_update<Scalar,int,ColMajor,Upper,false,Conj>::run),\n    // array index: LO\n    (selfadjoint_rank1_update<Scalar,int,ColMajor,Lower,false,Conj>::run),\n  };\n\n  const Scalar* x = reinterpret_cast<const Scalar*>(px);\n  Scalar* c = reinterpret_cast<Scalar*>(pc);\n  Scalar alpha = *reinterpret_cast<const Scalar*>(palpha);\n\n  int info = 0;\n  if(UPLO(*uplo)==INVALID)                                            info = 1;\n  else if(*n<0)                                                       info = 2;\n  else if(*incx==0)                                                   info = 5;\n  else if(*ldc<std::max(1,*n))                                        info = 7;\n  if(info)\n    return xerbla_(SCALAR_SUFFIX_UP\"SYR  \",&info,6);\n\n  if(*n==0 || alpha==Scalar(0)) return 1;\n\n  // if the increment is not 1, let's copy it to a temporary vector to enable vectorization\n  const Scalar* x_cpy = get_compact_vector(x,*n,*incx);\n\n  int code = UPLO(*uplo);\n  if(code>=2 || func[code]==0)\n    return 0;\n\n  func[code](*n, c, *ldc, x_cpy, x_cpy, alpha);\n\n  if(x_cpy!=x)  delete[] x_cpy;\n\n  return 1;\n}\n\n// C := alpha*x*y' + alpha*y*x' + C\nint EIGEN_BLAS_FUNC(syr2)(const char *uplo, const int *n, const RealScalar *palpha, const RealScalar *px, const int *incx, const RealScalar *py, const int *incy, RealScalar *pc, const int *ldc)\n{\n  typedef void (*functype)(int, Scalar*, int, const Scalar*, const Scalar*, Scalar);\n  static const functype func[2] = {\n    // array index: UP\n    (internal::rank2_update_selector<Scalar,int,Upper>::run),\n    // array index: LO\n    (internal::rank2_update_selector<Scalar,int,Lower>::run),\n  };\n\n  const Scalar* x = reinterpret_cast<const Scalar*>(px);\n  const Scalar* y = reinterpret_cast<const Scalar*>(py);\n  Scalar* c = reinterpret_cast<Scalar*>(pc);\n  Scalar alpha = *reinterpret_cast<const Scalar*>(palpha);\n\n  int info = 0;\n  if(UPLO(*uplo)==INVALID)                                            info = 1;\n  else if(*n<0)                                                       info = 2;\n  else if(*incx==0)                                                   info = 5;\n  else if(*incy==0)                                                   info = 7;\n  else if(*ldc<std::max(1,*n))                                        info = 9;\n  if(info)\n    return xerbla_(SCALAR_SUFFIX_UP\"SYR2 \",&info,6);\n\n  if(alpha==Scalar(0))\n    return 1;\n\n  const Scalar* x_cpy = get_compact_vector(x,*n,*incx);\n  const Scalar* y_cpy = get_compact_vector(y,*n,*incy);\n\n  int code = UPLO(*uplo);\n  if(code>=2 || func[code]==0)\n    return 0;\n\n  func[code](*n, c, *ldc, x_cpy, y_cpy, alpha);\n\n  if(x_cpy!=x)  delete[] x_cpy;\n  if(y_cpy!=y)  delete[] y_cpy;\n\n//   int code = UPLO(*uplo);\n//   if(code>=2 || func[code]==0)\n//     return 0;\n\n//   func[code](*n, a, *inca, b, *incb, c, *ldc, alpha);\n  return 1;\n}\n\n/**  DSBMV  performs the matrix-vector  operation\n  *\n  *     y := alpha*A*x + beta*y,\n  *\n  *  where alpha and beta are scalars, x and y are n element vectors and\n  *  A is an n by n symmetric band matrix, with k super-diagonals.\n  */\n// int EIGEN_BLAS_FUNC(sbmv)( char *uplo, int *n, int *k, RealScalar *alpha, RealScalar *a, int *lda,\n//                            RealScalar *x, int *incx, RealScalar *beta, RealScalar *y, int *incy)\n// {\n//   return 1;\n// }\n\n\n/**  DSPMV  performs the matrix-vector operation\n  *\n  *     y := alpha*A*x + beta*y,\n  *\n  *  where alpha and beta are scalars, x and y are n element vectors and\n  *  A is an n by n symmetric matrix, supplied in packed form.\n  *\n  */\n// int EIGEN_BLAS_FUNC(spmv)(char *uplo, int *n, RealScalar *alpha, RealScalar *ap, RealScalar *x, int *incx, RealScalar *beta, RealScalar *y, int *incy)\n// {\n//   return 1;\n// }\n\n/**  DSPR    performs the symmetric rank 1 operation\n  *\n  *     A := alpha*x*x' + A,\n  *\n  *  where alpha is a real scalar, x is an n element vector and A is an\n  *  n by n symmetric matrix, supplied in packed form.\n  */\nint EIGEN_BLAS_FUNC(spr)(char *uplo, int *n, Scalar *palpha, Scalar *px, int *incx, Scalar *pap)\n{\n  typedef void (*functype)(int, Scalar*, const Scalar*, Scalar);\n  static const functype func[2] = {\n    // array index: UP\n    (internal::selfadjoint_packed_rank1_update<Scalar,int,ColMajor,Upper,false,false>::run),\n    // array index: LO\n    (internal::selfadjoint_packed_rank1_update<Scalar,int,ColMajor,Lower,false,false>::run),\n  };\n\n  Scalar* x = reinterpret_cast<Scalar*>(px);\n  Scalar* ap = reinterpret_cast<Scalar*>(pap);\n  Scalar alpha = *reinterpret_cast<Scalar*>(palpha);\n\n  int info = 0;\n  if(UPLO(*uplo)==INVALID)                                            info = 1;\n  else if(*n<0)                                                       info = 2;\n  else if(*incx==0)                                                   info = 5;\n  if(info)\n    return xerbla_(SCALAR_SUFFIX_UP\"SPR  \",&info,6);\n\n  if(alpha==Scalar(0))\n    return 1;\n\n  Scalar* x_cpy = get_compact_vector(x, *n, *incx);\n\n  int code = UPLO(*uplo);\n  if(code>=2 || func[code]==0)\n    return 0;\n\n  func[code](*n, ap, x_cpy, alpha);\n\n  if(x_cpy!=x)  delete[] x_cpy;\n\n  return 1;\n}\n\n/**  DSPR2  performs the symmetric rank 2 operation\n  *\n  *     A := alpha*x*y' + alpha*y*x' + A,\n  *\n  *  where alpha is a scalar, x and y are n element vectors and A is an\n  *  n by n symmetric matrix, supplied in packed form.\n  */\nint EIGEN_BLAS_FUNC(spr2)(char *uplo, int *n, RealScalar *palpha, RealScalar *px, int *incx, RealScalar *py, int *incy, RealScalar *pap)\n{\n  typedef void (*functype)(int, Scalar*, const Scalar*, const Scalar*, Scalar);\n  static const functype func[2] = {\n    // array index: UP\n    (internal::packed_rank2_update_selector<Scalar,int,Upper>::run),\n    // array index: LO\n    (internal::packed_rank2_update_selector<Scalar,int,Lower>::run),\n  };\n\n  Scalar* x = reinterpret_cast<Scalar*>(px);\n  Scalar* y = reinterpret_cast<Scalar*>(py);\n  Scalar* ap = reinterpret_cast<Scalar*>(pap);\n  Scalar alpha = *reinterpret_cast<Scalar*>(palpha);\n\n  int info = 0;\n  if(UPLO(*uplo)==INVALID)                                            info = 1;\n  else if(*n<0)                                                       info = 2;\n  else if(*incx==0)                                                   info = 5;\n  else if(*incy==0)                                                   info = 7;\n  if(info)\n    return xerbla_(SCALAR_SUFFIX_UP\"SPR2 \",&info,6);\n\n  if(alpha==Scalar(0))\n    return 1;\n\n  Scalar* x_cpy = get_compact_vector(x, *n, *incx);\n  Scalar* y_cpy = get_compact_vector(y, *n, *incy);\n\n  int code = UPLO(*uplo);\n  if(code>=2 || func[code]==0)\n    return 0;\n\n  func[code](*n, ap, x_cpy, y_cpy, alpha);\n\n  if(x_cpy!=x)  delete[] x_cpy;\n  if(y_cpy!=y)  delete[] y_cpy;\n\n  return 1;\n}\n\n/**  DGER   performs the rank 1 operation\n  *\n  *     A := alpha*x*y' + A,\n  *\n  *  where alpha is a scalar, x is an m element vector, y is an n element\n  *  vector and A is an m by n matrix.\n  */\nint EIGEN_BLAS_FUNC(ger)(int *m, int *n, Scalar *palpha, Scalar *px, int *incx, Scalar *py, int *incy, Scalar *pa, int *lda)\n{\n  Scalar* x = reinterpret_cast<Scalar*>(px);\n  Scalar* y = reinterpret_cast<Scalar*>(py);\n  Scalar* a = reinterpret_cast<Scalar*>(pa);\n  Scalar alpha = *reinterpret_cast<Scalar*>(palpha);\n\n  int info = 0;\n       if(*m<0)                                                       info = 1;\n  else if(*n<0)                                                       info = 2;\n  else if(*incx==0)                                                   info = 5;\n  else if(*incy==0)                                                   info = 7;\n  else if(*lda<std::max(1,*m))                                        info = 9;\n  if(info)\n    return xerbla_(SCALAR_SUFFIX_UP\"GER  \",&info,6);\n\n  if(alpha==Scalar(0))\n    return 1;\n\n  Scalar* x_cpy = get_compact_vector(x,*m,*incx);\n  Scalar* y_cpy = get_compact_vector(y,*n,*incy);\n\n  internal::general_rank1_update<Scalar,int,ColMajor,false,false>::run(*m, *n, a, *lda, x_cpy, y_cpy, alpha);\n\n  if(x_cpy!=x)  delete[] x_cpy;\n  if(y_cpy!=y)  delete[] y_cpy;\n\n  return 1;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/blas/level3_impl.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009-2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n#include <iostream>\n#include \"common.h\"\n\nint EIGEN_BLAS_FUNC(gemm)(const char *opa, const char *opb, const int *m, const int *n, const int *k, const RealScalar *palpha,\n                          const RealScalar *pa, const int *lda, const RealScalar *pb, const int *ldb, const RealScalar *pbeta, RealScalar *pc, const int *ldc)\n{\n//   std::cerr << \"in gemm \" << *opa << \" \" << *opb << \" \" << *m << \" \" << *n << \" \" << *k << \" \" << *lda << \" \" << *ldb << \" \" << *ldc << \" \" << *palpha << \" \" << *pbeta << \"\\n\";\n  typedef void (*functype)(DenseIndex, DenseIndex, DenseIndex, const Scalar *, DenseIndex, const Scalar *, DenseIndex, Scalar *, DenseIndex, DenseIndex, Scalar, internal::level3_blocking<Scalar,Scalar>&, Eigen::internal::GemmParallelInfo<DenseIndex>*);\n  static const functype func[12] = {\n    // array index: NOTR  | (NOTR << 2)\n    (internal::general_matrix_matrix_product<DenseIndex,Scalar,ColMajor,false,Scalar,ColMajor,false,ColMajor,1>::run),\n    // array index: TR    | (NOTR << 2)\n    (internal::general_matrix_matrix_product<DenseIndex,Scalar,RowMajor,false,Scalar,ColMajor,false,ColMajor,1>::run),\n    // array index: ADJ   | (NOTR << 2)\n    (internal::general_matrix_matrix_product<DenseIndex,Scalar,RowMajor,Conj, Scalar,ColMajor,false,ColMajor,1>::run),\n    0,\n    // array index: NOTR  | (TR   << 2)\n    (internal::general_matrix_matrix_product<DenseIndex,Scalar,ColMajor,false,Scalar,RowMajor,false,ColMajor,1>::run),\n    // array index: TR    | (TR   << 2)\n    (internal::general_matrix_matrix_product<DenseIndex,Scalar,RowMajor,false,Scalar,RowMajor,false,ColMajor,1>::run),\n    // array index: ADJ   | (TR   << 2)\n    (internal::general_matrix_matrix_product<DenseIndex,Scalar,RowMajor,Conj, Scalar,RowMajor,false,ColMajor,1>::run),\n    0,\n    // array index: NOTR  | (ADJ  << 2)\n    (internal::general_matrix_matrix_product<DenseIndex,Scalar,ColMajor,false,Scalar,RowMajor,Conj, ColMajor,1>::run),\n    // array index: TR    | (ADJ  << 2)\n    (internal::general_matrix_matrix_product<DenseIndex,Scalar,RowMajor,false,Scalar,RowMajor,Conj, ColMajor,1>::run),\n    // array index: ADJ   | (ADJ  << 2)\n    (internal::general_matrix_matrix_product<DenseIndex,Scalar,RowMajor,Conj, Scalar,RowMajor,Conj, ColMajor,1>::run),\n    0\n  };\n\n  const Scalar* a = reinterpret_cast<const Scalar*>(pa);\n  const Scalar* b = reinterpret_cast<const Scalar*>(pb);\n  Scalar* c = reinterpret_cast<Scalar*>(pc);\n  Scalar alpha  = *reinterpret_cast<const Scalar*>(palpha);\n  Scalar beta   = *reinterpret_cast<const Scalar*>(pbeta);\n\n  int info = 0;\n  if(OP(*opa)==INVALID)                                               info = 1;\n  else if(OP(*opb)==INVALID)                                          info = 2;\n  else if(*m<0)                                                       info = 3;\n  else if(*n<0)                                                       info = 4;\n  else if(*k<0)                                                       info = 5;\n  else if(*lda<std::max(1,(OP(*opa)==NOTR)?*m:*k))                    info = 8;\n  else if(*ldb<std::max(1,(OP(*opb)==NOTR)?*k:*n))                    info = 10;\n  else if(*ldc<std::max(1,*m))                                        info = 13;\n  if(info)\n    return xerbla_(SCALAR_SUFFIX_UP\"GEMM \",&info,6);\n\n  if (*m == 0 || *n == 0)\n    return 0;\n\n  if(beta!=Scalar(1))\n  {\n    if(beta==Scalar(0)) matrix(c, *m, *n, *ldc).setZero();\n    else                matrix(c, *m, *n, *ldc) *= beta;\n  }\n\n  if(*k == 0)\n    return 0;\n\n  internal::gemm_blocking_space<ColMajor,Scalar,Scalar,Dynamic,Dynamic,Dynamic> blocking(*m,*n,*k,1,true);\n\n  int code = OP(*opa) | (OP(*opb) << 2);\n  func[code](*m, *n, *k, a, *lda, b, *ldb, c, 1, *ldc, alpha, blocking, 0);\n  return 0;\n}\n\nint EIGEN_BLAS_FUNC(trsm)(const char *side, const char *uplo, const char *opa, const char *diag, const int *m, const int *n,\n                          const RealScalar *palpha,  const RealScalar *pa, const int *lda, RealScalar *pb, const int *ldb)\n{\n//   std::cerr << \"in trsm \" << *side << \" \" << *uplo << \" \" << *opa << \" \" << *diag << \" \" << *m << \",\" << *n << \" \" << *palpha << \" \" << *lda << \" \" << *ldb<< \"\\n\";\n  typedef void (*functype)(DenseIndex, DenseIndex, const Scalar *, DenseIndex, Scalar *, DenseIndex, DenseIndex, internal::level3_blocking<Scalar,Scalar>&);\n  static const functype func[32] = {\n    // array index: NOTR  | (LEFT  << 2) | (UP << 3) | (NUNIT << 4)\n    (internal::triangular_solve_matrix<Scalar,DenseIndex,OnTheLeft, Upper|0,          false,ColMajor,ColMajor,1>::run),\n    // array index: TR    | (LEFT  << 2) | (UP << 3) | (NUNIT << 4)\n    (internal::triangular_solve_matrix<Scalar,DenseIndex,OnTheLeft, Lower|0,          false,RowMajor,ColMajor,1>::run),\n    // array index: ADJ   | (LEFT  << 2) | (UP << 3) | (NUNIT << 4)\n    (internal::triangular_solve_matrix<Scalar,DenseIndex,OnTheLeft, Lower|0,          Conj, RowMajor,ColMajor,1>::run),\\\n    0,\n    // array index: NOTR  | (RIGHT << 2) | (UP << 3) | (NUNIT << 4)\n    (internal::triangular_solve_matrix<Scalar,DenseIndex,OnTheRight,Upper|0,          false,ColMajor,ColMajor,1>::run),\n    // array index: TR    | (RIGHT << 2) | (UP << 3) | (NUNIT << 4)\n    (internal::triangular_solve_matrix<Scalar,DenseIndex,OnTheRight,Lower|0,          false,RowMajor,ColMajor,1>::run),\n    // array index: ADJ   | (RIGHT << 2) | (UP << 3) | (NUNIT << 4)\n    (internal::triangular_solve_matrix<Scalar,DenseIndex,OnTheRight,Lower|0,          Conj, RowMajor,ColMajor,1>::run),\n    0,\n    // array index: NOTR  | (LEFT  << 2) | (LO << 3) | (NUNIT << 4)\n    (internal::triangular_solve_matrix<Scalar,DenseIndex,OnTheLeft, Lower|0,          false,ColMajor,ColMajor,1>::run),\n    // array index: TR    | (LEFT  << 2) | (LO << 3) | (NUNIT << 4)\n    (internal::triangular_solve_matrix<Scalar,DenseIndex,OnTheLeft, Upper|0,          false,RowMajor,ColMajor,1>::run),\n    // array index: ADJ   | (LEFT  << 2) | (LO << 3) | (NUNIT << 4)\n    (internal::triangular_solve_matrix<Scalar,DenseIndex,OnTheLeft, Upper|0,          Conj, RowMajor,ColMajor,1>::run),\n    0,\n    // array index: NOTR  | (RIGHT << 2) | (LO << 3) | (NUNIT << 4)\n    (internal::triangular_solve_matrix<Scalar,DenseIndex,OnTheRight,Lower|0,          false,ColMajor,ColMajor,1>::run),\n    // array index: TR    | (RIGHT << 2) | (LO << 3) | (NUNIT << 4)\n    (internal::triangular_solve_matrix<Scalar,DenseIndex,OnTheRight,Upper|0,          false,RowMajor,ColMajor,1>::run),\n    // array index: ADJ   | (RIGHT << 2) | (LO << 3) | (NUNIT << 4)\n    (internal::triangular_solve_matrix<Scalar,DenseIndex,OnTheRight,Upper|0,          Conj, RowMajor,ColMajor,1>::run),\n    0,\n    // array index: NOTR  | (LEFT  << 2) | (UP << 3) | (UNIT  << 4)\n    (internal::triangular_solve_matrix<Scalar,DenseIndex,OnTheLeft, Upper|UnitDiag,false,ColMajor,ColMajor,1>::run),\n    // array index: TR    | (LEFT  << 2) | (UP << 3) | (UNIT  << 4)\n    (internal::triangular_solve_matrix<Scalar,DenseIndex,OnTheLeft, Lower|UnitDiag,false,RowMajor,ColMajor,1>::run),\n    // array index: ADJ   | (LEFT  << 2) | (UP << 3) | (UNIT  << 4)\n    (internal::triangular_solve_matrix<Scalar,DenseIndex,OnTheLeft, Lower|UnitDiag,Conj, RowMajor,ColMajor,1>::run),\n    0,\n    // array index: NOTR  | (RIGHT << 2) | (UP << 3) | (UNIT  << 4)\n    (internal::triangular_solve_matrix<Scalar,DenseIndex,OnTheRight,Upper|UnitDiag,false,ColMajor,ColMajor,1>::run),\n    // array index: TR    | (RIGHT << 2) | (UP << 3) | (UNIT  << 4)\n    (internal::triangular_solve_matrix<Scalar,DenseIndex,OnTheRight,Lower|UnitDiag,false,RowMajor,ColMajor,1>::run),\n    // array index: ADJ   | (RIGHT << 2) | (UP << 3) | (UNIT  << 4)\n    (internal::triangular_solve_matrix<Scalar,DenseIndex,OnTheRight,Lower|UnitDiag,Conj, RowMajor,ColMajor,1>::run),\n    0,\n    // array index: NOTR  | (LEFT  << 2) | (LO << 3) | (UNIT  << 4)\n    (internal::triangular_solve_matrix<Scalar,DenseIndex,OnTheLeft, Lower|UnitDiag,false,ColMajor,ColMajor,1>::run),\n    // array index: TR    | (LEFT  << 2) | (LO << 3) | (UNIT  << 4)\n    (internal::triangular_solve_matrix<Scalar,DenseIndex,OnTheLeft, Upper|UnitDiag,false,RowMajor,ColMajor,1>::run),\n    // array index: ADJ   | (LEFT  << 2) | (LO << 3) | (UNIT  << 4)\n    (internal::triangular_solve_matrix<Scalar,DenseIndex,OnTheLeft, Upper|UnitDiag,Conj, RowMajor,ColMajor,1>::run),\n    0,\n    // array index: NOTR  | (RIGHT << 2) | (LO << 3) | (UNIT  << 4)\n    (internal::triangular_solve_matrix<Scalar,DenseIndex,OnTheRight,Lower|UnitDiag,false,ColMajor,ColMajor,1>::run),\n    // array index: TR    | (RIGHT << 2) | (LO << 3) | (UNIT  << 4)\n    (internal::triangular_solve_matrix<Scalar,DenseIndex,OnTheRight,Upper|UnitDiag,false,RowMajor,ColMajor,1>::run),\n    // array index: ADJ   | (RIGHT << 2) | (LO << 3) | (UNIT  << 4)\n    (internal::triangular_solve_matrix<Scalar,DenseIndex,OnTheRight,Upper|UnitDiag,Conj, RowMajor,ColMajor,1>::run),\n    0\n  };\n\n  const Scalar* a = reinterpret_cast<const Scalar*>(pa);\n  Scalar* b = reinterpret_cast<Scalar*>(pb);\n  Scalar  alpha = *reinterpret_cast<const Scalar*>(palpha);\n\n  int info = 0;\n  if(SIDE(*side)==INVALID)                                            info = 1;\n  else if(UPLO(*uplo)==INVALID)                                       info = 2;\n  else if(OP(*opa)==INVALID)                                          info = 3;\n  else if(DIAG(*diag)==INVALID)                                       info = 4;\n  else if(*m<0)                                                       info = 5;\n  else if(*n<0)                                                       info = 6;\n  else if(*lda<std::max(1,(SIDE(*side)==LEFT)?*m:*n))                 info = 9;\n  else if(*ldb<std::max(1,*m))                                        info = 11;\n  if(info)\n    return xerbla_(SCALAR_SUFFIX_UP\"TRSM \",&info,6);\n\n  if(*m==0 || *n==0)\n    return 0;\n\n  int code = OP(*opa) | (SIDE(*side) << 2) | (UPLO(*uplo) << 3) | (DIAG(*diag) << 4);\n\n  if(SIDE(*side)==LEFT)\n  {\n    internal::gemm_blocking_space<ColMajor,Scalar,Scalar,Dynamic,Dynamic,Dynamic,4> blocking(*m,*n,*m,1,false);\n    func[code](*m, *n, a, *lda, b, 1, *ldb, blocking);\n  }\n  else\n  {\n    internal::gemm_blocking_space<ColMajor,Scalar,Scalar,Dynamic,Dynamic,Dynamic,4> blocking(*m,*n,*n,1,false);\n    func[code](*n, *m, a, *lda, b, 1, *ldb, blocking);\n  }\n\n  if(alpha!=Scalar(1))\n    matrix(b,*m,*n,*ldb) *= alpha;\n\n  return 0;\n}\n\n\n// b = alpha*op(a)*b  for side = 'L'or'l'\n// b = alpha*b*op(a)  for side = 'R'or'r'\nint EIGEN_BLAS_FUNC(trmm)(const char *side, const char *uplo, const char *opa, const char *diag, const int *m, const int *n,\n                          const RealScalar *palpha, const RealScalar *pa, const int *lda, RealScalar *pb, const int *ldb)\n{\n//   std::cerr << \"in trmm \" << *side << \" \" << *uplo << \" \" << *opa << \" \" << *diag << \" \" << *m << \" \" << *n << \" \" << *lda << \" \" << *ldb << \" \" << *palpha << \"\\n\";\n  typedef void (*functype)(DenseIndex, DenseIndex, DenseIndex, const Scalar *, DenseIndex, const Scalar *, DenseIndex, Scalar *, DenseIndex, DenseIndex, const Scalar&, internal::level3_blocking<Scalar,Scalar>&);\n  static const functype func[32] = {\n    // array index: NOTR  | (LEFT  << 2) | (UP << 3) | (NUNIT << 4)\n    (internal::product_triangular_matrix_matrix<Scalar,DenseIndex,Upper|0,          true, ColMajor,false,ColMajor,false,ColMajor,1>::run),\n    // array index: TR    | (LEFT  << 2) | (UP << 3) | (NUNIT << 4)\n    (internal::product_triangular_matrix_matrix<Scalar,DenseIndex,Lower|0,          true, RowMajor,false,ColMajor,false,ColMajor,1>::run),\n    // array index: ADJ   | (LEFT  << 2) | (UP << 3) | (NUNIT << 4)\n    (internal::product_triangular_matrix_matrix<Scalar,DenseIndex,Lower|0,          true, RowMajor,Conj, ColMajor,false,ColMajor,1>::run),\n    0,\n    // array index: NOTR  | (RIGHT << 2) | (UP << 3) | (NUNIT << 4)\n    (internal::product_triangular_matrix_matrix<Scalar,DenseIndex,Upper|0,          false,ColMajor,false,ColMajor,false,ColMajor,1>::run),\n    // array index: TR    | (RIGHT << 2) | (UP << 3) | (NUNIT << 4)\n    (internal::product_triangular_matrix_matrix<Scalar,DenseIndex,Lower|0,          false,ColMajor,false,RowMajor,false,ColMajor,1>::run),\n    // array index: ADJ   | (RIGHT << 2) | (UP << 3) | (NUNIT << 4)\n    (internal::product_triangular_matrix_matrix<Scalar,DenseIndex,Lower|0,          false,ColMajor,false,RowMajor,Conj, ColMajor,1>::run),\n    0,\n    // array index: NOTR  | (LEFT  << 2) | (LO << 3) | (NUNIT << 4)\n    (internal::product_triangular_matrix_matrix<Scalar,DenseIndex,Lower|0,          true, ColMajor,false,ColMajor,false,ColMajor,1>::run),\n    // array index: TR    | (LEFT  << 2) | (LO << 3) | (NUNIT << 4)\n    (internal::product_triangular_matrix_matrix<Scalar,DenseIndex,Upper|0,          true, RowMajor,false,ColMajor,false,ColMajor,1>::run),\n    // array index: ADJ   | (LEFT  << 2) | (LO << 3) | (NUNIT << 4)\n    (internal::product_triangular_matrix_matrix<Scalar,DenseIndex,Upper|0,          true, RowMajor,Conj, ColMajor,false,ColMajor,1>::run),\n    0,\n    // array index: NOTR  | (RIGHT << 2) | (LO << 3) | (NUNIT << 4)\n    (internal::product_triangular_matrix_matrix<Scalar,DenseIndex,Lower|0,          false,ColMajor,false,ColMajor,false,ColMajor,1>::run),\n    // array index: TR    | (RIGHT << 2) | (LO << 3) | (NUNIT << 4)\n    (internal::product_triangular_matrix_matrix<Scalar,DenseIndex,Upper|0,          false,ColMajor,false,RowMajor,false,ColMajor,1>::run),\n    // array index: ADJ   | (RIGHT << 2) | (LO << 3) | (NUNIT << 4)\n    (internal::product_triangular_matrix_matrix<Scalar,DenseIndex,Upper|0,          false,ColMajor,false,RowMajor,Conj, ColMajor,1>::run),\n    0,\n    // array index: NOTR  | (LEFT  << 2) | (UP << 3) | (UNIT  << 4)\n    (internal::product_triangular_matrix_matrix<Scalar,DenseIndex,Upper|UnitDiag,true, ColMajor,false,ColMajor,false,ColMajor,1>::run),\n    // array index: TR    | (LEFT  << 2) | (UP << 3) | (UNIT  << 4)\n    (internal::product_triangular_matrix_matrix<Scalar,DenseIndex,Lower|UnitDiag,true, RowMajor,false,ColMajor,false,ColMajor,1>::run),\n    // array index: ADJ   | (LEFT  << 2) | (UP << 3) | (UNIT  << 4)\n    (internal::product_triangular_matrix_matrix<Scalar,DenseIndex,Lower|UnitDiag,true, RowMajor,Conj, ColMajor,false,ColMajor,1>::run),\n    0,\n    // array index: NOTR  | (RIGHT << 2) | (UP << 3) | (UNIT  << 4)\n    (internal::product_triangular_matrix_matrix<Scalar,DenseIndex,Upper|UnitDiag,false,ColMajor,false,ColMajor,false,ColMajor,1>::run),\n    // array index: TR    | (RIGHT << 2) | (UP << 3) | (UNIT  << 4)\n    (internal::product_triangular_matrix_matrix<Scalar,DenseIndex,Lower|UnitDiag,false,ColMajor,false,RowMajor,false,ColMajor,1>::run),\n    // array index: ADJ   | (RIGHT << 2) | (UP << 3) | (UNIT  << 4)\n    (internal::product_triangular_matrix_matrix<Scalar,DenseIndex,Lower|UnitDiag,false,ColMajor,false,RowMajor,Conj, ColMajor,1>::run),\n    0,\n    // array index: NOTR  | (LEFT  << 2) | (LO << 3) | (UNIT  << 4)\n    (internal::product_triangular_matrix_matrix<Scalar,DenseIndex,Lower|UnitDiag,true, ColMajor,false,ColMajor,false,ColMajor,1>::run),\n    // array index: TR    | (LEFT  << 2) | (LO << 3) | (UNIT  << 4)\n    (internal::product_triangular_matrix_matrix<Scalar,DenseIndex,Upper|UnitDiag,true, RowMajor,false,ColMajor,false,ColMajor,1>::run),\n    // array index: ADJ   | (LEFT  << 2) | (LO << 3) | (UNIT  << 4)\n    (internal::product_triangular_matrix_matrix<Scalar,DenseIndex,Upper|UnitDiag,true, RowMajor,Conj, ColMajor,false,ColMajor,1>::run),\n    0,\n    // array index: NOTR  | (RIGHT << 2) | (LO << 3) | (UNIT  << 4)\n    (internal::product_triangular_matrix_matrix<Scalar,DenseIndex,Lower|UnitDiag,false,ColMajor,false,ColMajor,false,ColMajor,1>::run),\n    // array index: TR    | (RIGHT << 2) | (LO << 3) | (UNIT  << 4)\n    (internal::product_triangular_matrix_matrix<Scalar,DenseIndex,Upper|UnitDiag,false,ColMajor,false,RowMajor,false,ColMajor,1>::run),\n    // array index: ADJ   | (RIGHT << 2) | (LO << 3) | (UNIT  << 4)\n    (internal::product_triangular_matrix_matrix<Scalar,DenseIndex,Upper|UnitDiag,false,ColMajor,false,RowMajor,Conj, ColMajor,1>::run),\n    0\n  };\n\n  const Scalar* a = reinterpret_cast<const Scalar*>(pa);\n  Scalar* b = reinterpret_cast<Scalar*>(pb);\n  Scalar  alpha = *reinterpret_cast<const Scalar*>(palpha);\n\n  int info = 0;\n  if(SIDE(*side)==INVALID)                                            info = 1;\n  else if(UPLO(*uplo)==INVALID)                                       info = 2;\n  else if(OP(*opa)==INVALID)                                          info = 3;\n  else if(DIAG(*diag)==INVALID)                                       info = 4;\n  else if(*m<0)                                                       info = 5;\n  else if(*n<0)                                                       info = 6;\n  else if(*lda<std::max(1,(SIDE(*side)==LEFT)?*m:*n))                 info = 9;\n  else if(*ldb<std::max(1,*m))                                        info = 11;\n  if(info)\n    return xerbla_(SCALAR_SUFFIX_UP\"TRMM \",&info,6);\n\n  int code = OP(*opa) | (SIDE(*side) << 2) | (UPLO(*uplo) << 3) | (DIAG(*diag) << 4);\n\n  if(*m==0 || *n==0)\n    return 1;\n\n  // FIXME find a way to avoid this copy\n  Matrix<Scalar,Dynamic,Dynamic,ColMajor> tmp = matrix(b,*m,*n,*ldb);\n  matrix(b,*m,*n,*ldb).setZero();\n\n  if(SIDE(*side)==LEFT)\n  {\n    internal::gemm_blocking_space<ColMajor,Scalar,Scalar,Dynamic,Dynamic,Dynamic,4> blocking(*m,*n,*m,1,false);\n    func[code](*m, *n, *m, a, *lda, tmp.data(), tmp.outerStride(), b, 1, *ldb, alpha, blocking);\n  }\n  else\n  {\n    internal::gemm_blocking_space<ColMajor,Scalar,Scalar,Dynamic,Dynamic,Dynamic,4> blocking(*m,*n,*n,1,false);\n    func[code](*m, *n, *n, tmp.data(), tmp.outerStride(), a, *lda, b, 1, *ldb, alpha, blocking);\n  }\n  return 1;\n}\n\n// c = alpha*a*b + beta*c  for side = 'L'or'l'\n// c = alpha*b*a + beta*c  for side = 'R'or'r\nint EIGEN_BLAS_FUNC(symm)(const char *side, const char *uplo, const int *m, const int *n, const RealScalar *palpha,\n                          const RealScalar *pa, const int *lda, const RealScalar *pb, const int *ldb, const RealScalar *pbeta, RealScalar *pc, const int *ldc)\n{\n//   std::cerr << \"in symm \" << *side << \" \" << *uplo << \" \" << *m << \"x\" << *n << \" lda:\" << *lda << \" ldb:\" << *ldb << \" ldc:\" << *ldc << \" alpha:\" << *palpha << \" beta:\" << *pbeta << \"\\n\";\n  const Scalar* a = reinterpret_cast<const Scalar*>(pa);\n  const Scalar* b = reinterpret_cast<const Scalar*>(pb);\n  Scalar* c = reinterpret_cast<Scalar*>(pc);\n  Scalar alpha = *reinterpret_cast<const Scalar*>(palpha);\n  Scalar beta  = *reinterpret_cast<const Scalar*>(pbeta);\n\n  int info = 0;\n  if(SIDE(*side)==INVALID)                                            info = 1;\n  else if(UPLO(*uplo)==INVALID)                                       info = 2;\n  else if(*m<0)                                                       info = 3;\n  else if(*n<0)                                                       info = 4;\n  else if(*lda<std::max(1,(SIDE(*side)==LEFT)?*m:*n))                 info = 7;\n  else if(*ldb<std::max(1,*m))                                        info = 9;\n  else if(*ldc<std::max(1,*m))                                        info = 12;\n  if(info)\n    return xerbla_(SCALAR_SUFFIX_UP\"SYMM \",&info,6);\n\n  if(beta!=Scalar(1))\n  {\n    if(beta==Scalar(0)) matrix(c, *m, *n, *ldc).setZero();\n    else                matrix(c, *m, *n, *ldc) *= beta;\n  }\n\n  if(*m==0 || *n==0)\n  {\n    return 1;\n  }\n\n  int size = (SIDE(*side)==LEFT) ? (*m) : (*n);\n  #if ISCOMPLEX\n  // FIXME add support for symmetric complex matrix\n  Matrix<Scalar,Dynamic,Dynamic,ColMajor> matA(size,size);\n  if(UPLO(*uplo)==UP)\n  {\n    matA.triangularView<Upper>() = matrix(a,size,size,*lda);\n    matA.triangularView<Lower>() = matrix(a,size,size,*lda).transpose();\n  }\n  else if(UPLO(*uplo)==LO)\n  {\n    matA.triangularView<Lower>() = matrix(a,size,size,*lda);\n    matA.triangularView<Upper>() = matrix(a,size,size,*lda).transpose();\n  }\n  if(SIDE(*side)==LEFT)\n    matrix(c, *m, *n, *ldc) += alpha * matA * matrix(b, *m, *n, *ldb);\n  else if(SIDE(*side)==RIGHT)\n    matrix(c, *m, *n, *ldc) += alpha * matrix(b, *m, *n, *ldb) * matA;\n  #else\n  internal::gemm_blocking_space<ColMajor,Scalar,Scalar,Dynamic,Dynamic,Dynamic> blocking(*m,*n,size,1,false);\n\n  if(SIDE(*side)==LEFT)\n    if(UPLO(*uplo)==UP)       internal::product_selfadjoint_matrix<Scalar, DenseIndex, RowMajor,true,false, ColMajor,false,false, ColMajor,1>::run(*m, *n, a, *lda, b, *ldb, c, 1, *ldc, alpha, blocking);\n    else if(UPLO(*uplo)==LO)  internal::product_selfadjoint_matrix<Scalar, DenseIndex, ColMajor,true,false, ColMajor,false,false, ColMajor,1>::run(*m, *n, a, *lda, b, *ldb, c, 1, *ldc, alpha, blocking);\n    else                      return 0;\n  else if(SIDE(*side)==RIGHT)\n    if(UPLO(*uplo)==UP)       internal::product_selfadjoint_matrix<Scalar, DenseIndex, ColMajor,false,false, RowMajor,true,false, ColMajor,1>::run(*m, *n, b, *ldb, a, *lda, c, 1, *ldc, alpha, blocking);\n    else if(UPLO(*uplo)==LO)  internal::product_selfadjoint_matrix<Scalar, DenseIndex, ColMajor,false,false, ColMajor,true,false, ColMajor,1>::run(*m, *n, b, *ldb, a, *lda, c, 1, *ldc, alpha, blocking);\n    else                      return 0;\n  else\n    return 0;\n  #endif\n\n  return 0;\n}\n\n// c = alpha*a*a' + beta*c  for op = 'N'or'n'\n// c = alpha*a'*a + beta*c  for op = 'T'or't','C'or'c'\nint EIGEN_BLAS_FUNC(syrk)(const char *uplo, const char *op, const int *n, const int *k,\n                          const RealScalar *palpha, const RealScalar *pa, const int *lda, const RealScalar *pbeta, RealScalar *pc, const int *ldc)\n{\n//   std::cerr << \"in syrk \" << *uplo << \" \" << *op << \" \" << *n << \" \" << *k << \" \" << *palpha << \" \" << *lda << \" \" << *pbeta << \" \" << *ldc << \"\\n\";\n  #if !ISCOMPLEX\n  typedef void (*functype)(DenseIndex, DenseIndex, const Scalar *, DenseIndex, const Scalar *, DenseIndex, Scalar *, DenseIndex, DenseIndex, const Scalar&, internal::level3_blocking<Scalar,Scalar>&);\n  static const functype func[8] = {\n    // array index: NOTR  | (UP << 2)\n    (internal::general_matrix_matrix_triangular_product<DenseIndex,Scalar,ColMajor,false,Scalar,RowMajor,ColMajor,Conj, 1, Upper>::run),\n    // array index: TR    | (UP << 2)\n    (internal::general_matrix_matrix_triangular_product<DenseIndex,Scalar,RowMajor,false,Scalar,ColMajor,ColMajor,Conj, 1, Upper>::run),\n    // array index: ADJ   | (UP << 2)\n    (internal::general_matrix_matrix_triangular_product<DenseIndex,Scalar,RowMajor,Conj, Scalar,ColMajor,ColMajor,false,1, Upper>::run),\n    0,\n    // array index: NOTR  | (LO << 2)\n    (internal::general_matrix_matrix_triangular_product<DenseIndex,Scalar,ColMajor,false,Scalar,RowMajor,ColMajor,Conj, 1, Lower>::run),\n    // array index: TR    | (LO << 2)\n    (internal::general_matrix_matrix_triangular_product<DenseIndex,Scalar,RowMajor,false,Scalar,ColMajor,ColMajor,Conj, 1, Lower>::run),\n    // array index: ADJ   | (LO << 2)\n    (internal::general_matrix_matrix_triangular_product<DenseIndex,Scalar,RowMajor,Conj, Scalar,ColMajor,ColMajor,false,1, Lower>::run),\n    0\n  };\n  #endif\n\n  const Scalar* a = reinterpret_cast<const Scalar*>(pa);\n  Scalar* c = reinterpret_cast<Scalar*>(pc);\n  Scalar alpha = *reinterpret_cast<const Scalar*>(palpha);\n  Scalar beta  = *reinterpret_cast<const Scalar*>(pbeta);\n\n  int info = 0;\n  if(UPLO(*uplo)==INVALID)                                            info = 1;\n  else if(OP(*op)==INVALID || (ISCOMPLEX && OP(*op)==ADJ) )           info = 2;\n  else if(*n<0)                                                       info = 3;\n  else if(*k<0)                                                       info = 4;\n  else if(*lda<std::max(1,(OP(*op)==NOTR)?*n:*k))                     info = 7;\n  else if(*ldc<std::max(1,*n))                                        info = 10;\n  if(info)\n    return xerbla_(SCALAR_SUFFIX_UP\"SYRK \",&info,6);\n\n  if(beta!=Scalar(1))\n  {\n    if(UPLO(*uplo)==UP)\n      if(beta==Scalar(0)) matrix(c, *n, *n, *ldc).triangularView<Upper>().setZero();\n      else                matrix(c, *n, *n, *ldc).triangularView<Upper>() *= beta;\n    else\n      if(beta==Scalar(0)) matrix(c, *n, *n, *ldc).triangularView<Lower>().setZero();\n      else                matrix(c, *n, *n, *ldc).triangularView<Lower>() *= beta;\n  }\n\n  if(*n==0 || *k==0)\n    return 0;\n\n  #if ISCOMPLEX\n  // FIXME add support for symmetric complex matrix\n  if(UPLO(*uplo)==UP)\n  {\n    if(OP(*op)==NOTR)\n      matrix(c, *n, *n, *ldc).triangularView<Upper>() += alpha * matrix(a,*n,*k,*lda) * matrix(a,*n,*k,*lda).transpose();\n    else\n      matrix(c, *n, *n, *ldc).triangularView<Upper>() += alpha * matrix(a,*k,*n,*lda).transpose() * matrix(a,*k,*n,*lda);\n  }\n  else\n  {\n    if(OP(*op)==NOTR)\n      matrix(c, *n, *n, *ldc).triangularView<Lower>() += alpha * matrix(a,*n,*k,*lda) * matrix(a,*n,*k,*lda).transpose();\n    else\n      matrix(c, *n, *n, *ldc).triangularView<Lower>() += alpha * matrix(a,*k,*n,*lda).transpose() * matrix(a,*k,*n,*lda);\n  }\n  #else\n  internal::gemm_blocking_space<ColMajor,Scalar,Scalar,Dynamic,Dynamic,Dynamic> blocking(*n,*n,*k,1,false);\n\n  int code = OP(*op) | (UPLO(*uplo) << 2);\n  func[code](*n, *k, a, *lda, a, *lda, c, 1, *ldc, alpha, blocking);\n  #endif\n\n  return 0;\n}\n\n// c = alpha*a*b' + alpha*b*a' + beta*c  for op = 'N'or'n'\n// c = alpha*a'*b + alpha*b'*a + beta*c  for op = 'T'or't'\nint EIGEN_BLAS_FUNC(syr2k)(const char *uplo, const char *op, const int *n, const int *k, const RealScalar *palpha,\n                           const RealScalar *pa, const int *lda, const RealScalar *pb, const int *ldb, const RealScalar *pbeta, RealScalar *pc, const int *ldc)\n{\n  const Scalar* a = reinterpret_cast<const Scalar*>(pa);\n  const Scalar* b = reinterpret_cast<const Scalar*>(pb);\n  Scalar* c = reinterpret_cast<Scalar*>(pc);\n  Scalar alpha = *reinterpret_cast<const Scalar*>(palpha);\n  Scalar beta  = *reinterpret_cast<const Scalar*>(pbeta);\n\n//   std::cerr << \"in syr2k \" << *uplo << \" \" << *op << \" \" << *n << \" \" << *k << \" \" << alpha << \" \" << *lda << \" \" << *ldb << \" \" << beta << \" \" << *ldc << \"\\n\";\n\n  int info = 0;\n  if(UPLO(*uplo)==INVALID)                                            info = 1;\n  else if(OP(*op)==INVALID || (ISCOMPLEX && OP(*op)==ADJ) )           info = 2;\n  else if(*n<0)                                                       info = 3;\n  else if(*k<0)                                                       info = 4;\n  else if(*lda<std::max(1,(OP(*op)==NOTR)?*n:*k))                     info = 7;\n  else if(*ldb<std::max(1,(OP(*op)==NOTR)?*n:*k))                     info = 9;\n  else if(*ldc<std::max(1,*n))                                        info = 12;\n  if(info)\n    return xerbla_(SCALAR_SUFFIX_UP\"SYR2K\",&info,6);\n\n  if(beta!=Scalar(1))\n  {\n    if(UPLO(*uplo)==UP)\n      if(beta==Scalar(0)) matrix(c, *n, *n, *ldc).triangularView<Upper>().setZero();\n      else                matrix(c, *n, *n, *ldc).triangularView<Upper>() *= beta;\n    else\n      if(beta==Scalar(0)) matrix(c, *n, *n, *ldc).triangularView<Lower>().setZero();\n      else                matrix(c, *n, *n, *ldc).triangularView<Lower>() *= beta;\n  }\n\n  if(*k==0)\n    return 1;\n\n  if(OP(*op)==NOTR)\n  {\n    if(UPLO(*uplo)==UP)\n    {\n      matrix(c, *n, *n, *ldc).triangularView<Upper>()\n        += alpha *matrix(a, *n, *k, *lda)*matrix(b, *n, *k, *ldb).transpose()\n        +  alpha*matrix(b, *n, *k, *ldb)*matrix(a, *n, *k, *lda).transpose();\n    }\n    else if(UPLO(*uplo)==LO)\n      matrix(c, *n, *n, *ldc).triangularView<Lower>()\n        += alpha*matrix(a, *n, *k, *lda)*matrix(b, *n, *k, *ldb).transpose()\n        +  alpha*matrix(b, *n, *k, *ldb)*matrix(a, *n, *k, *lda).transpose();\n  }\n  else if(OP(*op)==TR || OP(*op)==ADJ)\n  {\n    if(UPLO(*uplo)==UP)\n      matrix(c, *n, *n, *ldc).triangularView<Upper>()\n        += alpha*matrix(a, *k, *n, *lda).transpose()*matrix(b, *k, *n, *ldb)\n        +  alpha*matrix(b, *k, *n, *ldb).transpose()*matrix(a, *k, *n, *lda);\n    else if(UPLO(*uplo)==LO)\n      matrix(c, *n, *n, *ldc).triangularView<Lower>()\n        += alpha*matrix(a, *k, *n, *lda).transpose()*matrix(b, *k, *n, *ldb)\n        +  alpha*matrix(b, *k, *n, *ldb).transpose()*matrix(a, *k, *n, *lda);\n  }\n\n  return 0;\n}\n\n\n#if ISCOMPLEX\n\n// c = alpha*a*b + beta*c  for side = 'L'or'l'\n// c = alpha*b*a + beta*c  for side = 'R'or'r\nint EIGEN_BLAS_FUNC(hemm)(const char *side, const char *uplo, const int *m, const int *n, const RealScalar *palpha,\n                          const RealScalar *pa, const int *lda, const RealScalar *pb, const int *ldb, const RealScalar *pbeta, RealScalar *pc, const int *ldc)\n{\n  const Scalar* a = reinterpret_cast<const Scalar*>(pa);\n  const Scalar* b = reinterpret_cast<const Scalar*>(pb);\n  Scalar* c = reinterpret_cast<Scalar*>(pc);\n  Scalar alpha = *reinterpret_cast<const Scalar*>(palpha);\n  Scalar beta  = *reinterpret_cast<const Scalar*>(pbeta);\n\n//   std::cerr << \"in hemm \" << *side << \" \" << *uplo << \" \" << *m << \" \" << *n << \" \" << alpha << \" \" << *lda << \" \" << beta << \" \" << *ldc << \"\\n\";\n\n  int info = 0;\n  if(SIDE(*side)==INVALID)                                            info = 1;\n  else if(UPLO(*uplo)==INVALID)                                       info = 2;\n  else if(*m<0)                                                       info = 3;\n  else if(*n<0)                                                       info = 4;\n  else if(*lda<std::max(1,(SIDE(*side)==LEFT)?*m:*n))                 info = 7;\n  else if(*ldb<std::max(1,*m))                                        info = 9;\n  else if(*ldc<std::max(1,*m))                                        info = 12;\n  if(info)\n    return xerbla_(SCALAR_SUFFIX_UP\"HEMM \",&info,6);\n\n  if(beta==Scalar(0))       matrix(c, *m, *n, *ldc).setZero();\n  else if(beta!=Scalar(1))  matrix(c, *m, *n, *ldc) *= beta;\n\n  if(*m==0 || *n==0)\n  {\n    return 1;\n  }\n\n  int size = (SIDE(*side)==LEFT) ? (*m) : (*n);\n  internal::gemm_blocking_space<ColMajor,Scalar,Scalar,Dynamic,Dynamic,Dynamic> blocking(*m,*n,size,1,false);\n\n  if(SIDE(*side)==LEFT)\n  {\n    if(UPLO(*uplo)==UP)       internal::product_selfadjoint_matrix<Scalar,DenseIndex,RowMajor,true,Conj,  ColMajor,false,false, ColMajor, 1>\n                                ::run(*m, *n, a, *lda, b, *ldb, c, 1, *ldc, alpha, blocking);\n    else if(UPLO(*uplo)==LO)  internal::product_selfadjoint_matrix<Scalar,DenseIndex,ColMajor,true,false, ColMajor,false,false, ColMajor,1>\n                                ::run(*m, *n, a, *lda, b, *ldb, c, 1, *ldc, alpha, blocking);\n    else                      return 0;\n  }\n  else if(SIDE(*side)==RIGHT)\n  {\n    if(UPLO(*uplo)==UP)       matrix(c,*m,*n,*ldc) += alpha * matrix(b,*m,*n,*ldb) * matrix(a,*n,*n,*lda).selfadjointView<Upper>();/*internal::product_selfadjoint_matrix<Scalar,DenseIndex,ColMajor,false,false, RowMajor,true,Conj,  ColMajor, 1>\n                                ::run(*m, *n, b, *ldb, a, *lda, c, 1, *ldc, alpha, blocking);*/\n    else if(UPLO(*uplo)==LO)  internal::product_selfadjoint_matrix<Scalar,DenseIndex,ColMajor,false,false, ColMajor,true,false, ColMajor,1>\n                                ::run(*m, *n, b, *ldb, a, *lda, c, 1, *ldc, alpha, blocking);\n    else                      return 0;\n  }\n  else\n  {\n    return 0;\n  }\n\n  return 0;\n}\n\n// c = alpha*a*conj(a') + beta*c  for op = 'N'or'n'\n// c = alpha*conj(a')*a + beta*c  for op  = 'C'or'c'\nint EIGEN_BLAS_FUNC(herk)(const char *uplo, const char *op, const int *n, const int *k,\n                          const RealScalar *palpha, const RealScalar *pa, const int *lda, const RealScalar *pbeta, RealScalar *pc, const int *ldc)\n{\n//   std::cerr << \"in herk \" << *uplo << \" \" << *op << \" \" << *n << \" \" << *k << \" \" << *palpha << \" \" << *lda << \" \" << *pbeta << \" \" << *ldc << \"\\n\";\n\n  typedef void (*functype)(DenseIndex, DenseIndex, const Scalar *, DenseIndex, const Scalar *, DenseIndex, Scalar *, DenseIndex, DenseIndex, const Scalar&, internal::level3_blocking<Scalar,Scalar>&);\n  static const functype func[8] = {\n    // array index: NOTR  | (UP << 2)\n    (internal::general_matrix_matrix_triangular_product<DenseIndex,Scalar,ColMajor,false,Scalar,RowMajor,Conj, ColMajor,1,Upper>::run),\n    0,\n    // array index: ADJ   | (UP << 2)\n    (internal::general_matrix_matrix_triangular_product<DenseIndex,Scalar,RowMajor,Conj, Scalar,ColMajor,false,ColMajor,1,Upper>::run),\n    0,\n    // array index: NOTR  | (LO << 2)\n    (internal::general_matrix_matrix_triangular_product<DenseIndex,Scalar,ColMajor,false,Scalar,RowMajor,Conj, ColMajor,1,Lower>::run),\n    0,\n    // array index: ADJ   | (LO << 2)\n    (internal::general_matrix_matrix_triangular_product<DenseIndex,Scalar,RowMajor,Conj, Scalar,ColMajor,false,ColMajor,1,Lower>::run),\n    0\n  };\n\n  const Scalar* a = reinterpret_cast<const Scalar*>(pa);\n  Scalar* c = reinterpret_cast<Scalar*>(pc);\n  RealScalar alpha = *palpha;\n  RealScalar beta  = *pbeta;\n\n//   std::cerr << \"in herk \" << *uplo << \" \" << *op << \" \" << *n << \" \" << *k << \" \" << alpha << \" \" << *lda << \" \" << beta << \" \" << *ldc << \"\\n\";\n\n  int info = 0;\n  if(UPLO(*uplo)==INVALID)                                            info = 1;\n  else if((OP(*op)==INVALID) || (OP(*op)==TR))                        info = 2;\n  else if(*n<0)                                                       info = 3;\n  else if(*k<0)                                                       info = 4;\n  else if(*lda<std::max(1,(OP(*op)==NOTR)?*n:*k))                     info = 7;\n  else if(*ldc<std::max(1,*n))                                        info = 10;\n  if(info)\n    return xerbla_(SCALAR_SUFFIX_UP\"HERK \",&info,6);\n\n  int code = OP(*op) | (UPLO(*uplo) << 2);\n\n  if(beta!=RealScalar(1))\n  {\n    if(UPLO(*uplo)==UP)\n      if(beta==Scalar(0)) matrix(c, *n, *n, *ldc).triangularView<Upper>().setZero();\n      else                matrix(c, *n, *n, *ldc).triangularView<StrictlyUpper>() *= beta;\n    else\n      if(beta==Scalar(0)) matrix(c, *n, *n, *ldc).triangularView<Lower>().setZero();\n      else                matrix(c, *n, *n, *ldc).triangularView<StrictlyLower>() *= beta;\n\n    if(beta!=Scalar(0))\n    {\n      matrix(c, *n, *n, *ldc).diagonal().real() *= beta;\n      matrix(c, *n, *n, *ldc).diagonal().imag().setZero();\n    }\n  }\n\n  if(*k>0 && alpha!=RealScalar(0))\n  {\n    internal::gemm_blocking_space<ColMajor,Scalar,Scalar,Dynamic,Dynamic,Dynamic> blocking(*n,*n,*k,1,false);\n    func[code](*n, *k, a, *lda, a, *lda, c, 1, *ldc, alpha, blocking);\n    matrix(c, *n, *n, *ldc).diagonal().imag().setZero();\n  }\n  return 0;\n}\n\n// c = alpha*a*conj(b') + conj(alpha)*b*conj(a') + beta*c,  for op = 'N'or'n'\n// c = alpha*conj(a')*b + conj(alpha)*conj(b')*a + beta*c,  for op = 'C'or'c'\nint EIGEN_BLAS_FUNC(her2k)(const char *uplo, const char *op, const int *n, const int *k,\n                           const RealScalar *palpha, const RealScalar *pa, const int *lda, const RealScalar *pb, const int *ldb, const RealScalar *pbeta, RealScalar *pc, const int *ldc)\n{\n  const Scalar* a = reinterpret_cast<const Scalar*>(pa);\n  const Scalar* b = reinterpret_cast<const Scalar*>(pb);\n  Scalar* c = reinterpret_cast<Scalar*>(pc);\n  Scalar alpha = *reinterpret_cast<const Scalar*>(palpha);\n  RealScalar beta  = *pbeta;\n\n//   std::cerr << \"in her2k \" << *uplo << \" \" << *op << \" \" << *n << \" \" << *k << \" \" << alpha << \" \" << *lda << \" \" << *ldb << \" \" << beta << \" \" << *ldc << \"\\n\";\n\n  int info = 0;\n  if(UPLO(*uplo)==INVALID)                                            info = 1;\n  else if((OP(*op)==INVALID) || (OP(*op)==TR))                        info = 2;\n  else if(*n<0)                                                       info = 3;\n  else if(*k<0)                                                       info = 4;\n  else if(*lda<std::max(1,(OP(*op)==NOTR)?*n:*k))                     info = 7;\n  else if(*ldb<std::max(1,(OP(*op)==NOTR)?*n:*k))                     info = 9;\n  else if(*ldc<std::max(1,*n))                                        info = 12;\n  if(info)\n    return xerbla_(SCALAR_SUFFIX_UP\"HER2K\",&info,6);\n\n  if(beta!=RealScalar(1))\n  {\n    if(UPLO(*uplo)==UP)\n      if(beta==Scalar(0)) matrix(c, *n, *n, *ldc).triangularView<Upper>().setZero();\n      else                matrix(c, *n, *n, *ldc).triangularView<StrictlyUpper>() *= beta;\n    else\n      if(beta==Scalar(0)) matrix(c, *n, *n, *ldc).triangularView<Lower>().setZero();\n      else                matrix(c, *n, *n, *ldc).triangularView<StrictlyLower>() *= beta;\n\n    if(beta!=Scalar(0))\n    {\n      matrix(c, *n, *n, *ldc).diagonal().real() *= beta;\n      matrix(c, *n, *n, *ldc).diagonal().imag().setZero();\n    }\n  }\n  else if(*k>0 && alpha!=Scalar(0))\n    matrix(c, *n, *n, *ldc).diagonal().imag().setZero();\n\n  if(*k==0)\n    return 1;\n\n  if(OP(*op)==NOTR)\n  {\n    if(UPLO(*uplo)==UP)\n    {\n      matrix(c, *n, *n, *ldc).triangularView<Upper>()\n        +=            alpha *matrix(a, *n, *k, *lda)*matrix(b, *n, *k, *ldb).adjoint()\n        +  numext::conj(alpha)*matrix(b, *n, *k, *ldb)*matrix(a, *n, *k, *lda).adjoint();\n    }\n    else if(UPLO(*uplo)==LO)\n      matrix(c, *n, *n, *ldc).triangularView<Lower>()\n        += alpha*matrix(a, *n, *k, *lda)*matrix(b, *n, *k, *ldb).adjoint()\n        +  numext::conj(alpha)*matrix(b, *n, *k, *ldb)*matrix(a, *n, *k, *lda).adjoint();\n  }\n  else if(OP(*op)==ADJ)\n  {\n    if(UPLO(*uplo)==UP)\n      matrix(c, *n, *n, *ldc).triangularView<Upper>()\n        +=             alpha*matrix(a, *k, *n, *lda).adjoint()*matrix(b, *k, *n, *ldb)\n        +  numext::conj(alpha)*matrix(b, *k, *n, *ldb).adjoint()*matrix(a, *k, *n, *lda);\n    else if(UPLO(*uplo)==LO)\n      matrix(c, *n, *n, *ldc).triangularView<Lower>()\n        +=             alpha*matrix(a, *k, *n, *lda).adjoint()*matrix(b, *k, *n, *ldb)\n        +  numext::conj(alpha)*matrix(b, *k, *n, *ldb).adjoint()*matrix(a, *k, *n, *lda);\n  }\n\n  return 1;\n}\n\n#endif // ISCOMPLEX\n"
  },
  {
    "path": "3rdparty/eigen3/blas/single.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define SCALAR        float\n#define SCALAR_SUFFIX s\n#define SCALAR_SUFFIX_UP \"S\"\n#define ISCOMPLEX     0\n\n#include \"level1_impl.h\"\n#include \"level1_real_impl.h\"\n#include \"level2_impl.h\"\n#include \"level2_real_impl.h\"\n#include \"level3_impl.h\"\n\nfloat EIGEN_BLAS_FUNC(dsdot)(int* n, float* alpha, float* x, int* incx, float* y, int* incy)\n{ return double(*alpha) + BLASFUNC(dsdot)(n, x, incx, y, incy); }\n"
  },
  {
    "path": "3rdparty/eigen3/blas/testing/CMakeLists.txt",
    "content": "\nmacro(ei_add_blas_test testname)\n\n  set(targetname ${testname})\n\n  set(filename ${testname}.f)\n  add_executable(${targetname} ${filename})\n\n  target_link_libraries(${targetname} eigen_blas)\n\n  if(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO)\n    target_link_libraries(${targetname} ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO})\n  endif()\n\n  target_link_libraries(${targetname} ${EXTERNAL_LIBS})\n\n  add_test(${testname} \"${Eigen_SOURCE_DIR}/blas/testing/runblastest.sh\" \"${testname}\" \"${Eigen_SOURCE_DIR}/blas/testing/${testname}.dat\")\n  add_dependencies(buildtests ${targetname})\n  \nendmacro()\n\n# ei_add_blas_test(sblat1)\n# ei_add_blas_test(sblat2)\n# ei_add_blas_test(sblat3)\n\n# ei_add_blas_test(dblat1)\n# ei_add_blas_test(dblat2)\n# ei_add_blas_test(dblat3)\n\n# ei_add_blas_test(cblat1)\n# ei_add_blas_test(cblat2)\n# ei_add_blas_test(cblat3)\n\n# ei_add_blas_test(zblat1)\n# ei_add_blas_test(zblat2)\n# ei_add_blas_test(zblat3)\n\n# add_custom_target(level1)\n# add_dependencies(level1 sblat1)\n\n"
  },
  {
    "path": "3rdparty/eigen3/blas/testing/cblat1.f",
    "content": "*> \\brief \\b CBLAT1\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*  Definition:\n*  ===========\n*\n*       PROGRAM CBLAT1\n* \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*>    Test program for the COMPLEX Level 1 BLAS.\n*>    Based upon the original BLAS test routine together with:\n*>\n*>    F06GAF Example Program Text\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date April 2012\n*\n*> \\ingroup complex_blas_testing\n*\n*  =====================================================================\n      PROGRAM CBLAT1\n*\n*  -- Reference BLAS test routine (version 3.4.1) --\n*  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     April 2012\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      INTEGER          NOUT\n      PARAMETER        (NOUT=6)\n*     .. Scalars in Common ..\n      INTEGER          ICASE, INCX, INCY, MODE, N\n      LOGICAL          PASS\n*     .. Local Scalars ..\n      REAL             SFAC\n      INTEGER          IC\n*     .. External Subroutines ..\n      EXTERNAL         CHECK1, CHECK2, HEADER\n*     .. Common blocks ..\n      COMMON           /COMBLA/ICASE, N, INCX, INCY, MODE, PASS\n*     .. Data statements ..\n      DATA             SFAC/9.765625E-4/\n*     .. Executable Statements ..\n      WRITE (NOUT,99999)\n      DO 20 IC = 1, 10\n         ICASE = IC\n         CALL HEADER\n*\n*        Initialize PASS, INCX, INCY, and MODE for a new case.\n*        The value 9999 for INCX, INCY or MODE will appear in the\n*        detailed  output, if any, for cases that do not involve\n*        these parameters.\n*\n         PASS = .TRUE.\n         INCX = 9999\n         INCY = 9999\n         MODE = 9999\n         IF (ICASE.LE.5) THEN\n            CALL CHECK2(SFAC)\n         ELSE IF (ICASE.GE.6) THEN\n            CALL CHECK1(SFAC)\n         END IF\n*        -- Print\n         IF (PASS) WRITE (NOUT,99998)\n   20 CONTINUE\n      STOP\n*\n99999 FORMAT (' Complex BLAS Test Program Results',/1X)\n99998 FORMAT ('                                    ----- PASS -----')\n      END\n      SUBROUTINE HEADER\n*     .. Parameters ..\n      INTEGER          NOUT\n      PARAMETER        (NOUT=6)\n*     .. Scalars in Common ..\n      INTEGER          ICASE, INCX, INCY, MODE, N\n      LOGICAL          PASS\n*     .. Local Arrays ..\n      CHARACTER*6      L(10)\n*     .. Common blocks ..\n      COMMON           /COMBLA/ICASE, N, INCX, INCY, MODE, PASS\n*     .. Data statements ..\n      DATA             L(1)/'CDOTC '/\n      DATA             L(2)/'CDOTU '/\n      DATA             L(3)/'CAXPY '/\n      DATA             L(4)/'CCOPY '/\n      DATA             L(5)/'CSWAP '/\n      DATA             L(6)/'SCNRM2'/\n      DATA             L(7)/'SCASUM'/\n      DATA             L(8)/'CSCAL '/\n      DATA             L(9)/'CSSCAL'/\n      DATA             L(10)/'ICAMAX'/\n*     .. Executable Statements ..\n      WRITE (NOUT,99999) ICASE, L(ICASE)\n      RETURN\n*\n99999 FORMAT (/' Test of subprogram number',I3,12X,A6)\n      END\n      SUBROUTINE CHECK1(SFAC)\n*     .. Parameters ..\n      INTEGER           NOUT\n      PARAMETER         (NOUT=6)\n*     .. Scalar Arguments ..\n      REAL              SFAC\n*     .. Scalars in Common ..\n      INTEGER           ICASE, INCX, INCY, MODE, N\n      LOGICAL           PASS\n*     .. Local Scalars ..\n      COMPLEX           CA\n      REAL              SA\n      INTEGER           I, J, LEN, NP1\n*     .. Local Arrays ..\n      COMPLEX           CTRUE5(8,5,2), CTRUE6(8,5,2), CV(8,5,2), CX(8),\n     +                  MWPCS(5), MWPCT(5)\n      REAL              STRUE2(5), STRUE4(5)\n      INTEGER           ITRUE3(5)\n*     .. External Functions ..\n      REAL              SCASUM, SCNRM2\n      INTEGER           ICAMAX\n      EXTERNAL          SCASUM, SCNRM2, ICAMAX\n*     .. External Subroutines ..\n      EXTERNAL          CSCAL, CSSCAL, CTEST, ITEST1, STEST1\n*     .. Intrinsic Functions ..\n      INTRINSIC         MAX\n*     .. Common blocks ..\n      COMMON            /COMBLA/ICASE, N, INCX, INCY, MODE, PASS\n*     .. Data statements ..\n      DATA              SA, CA/0.3E0, (0.4E0,-0.7E0)/\n      DATA              ((CV(I,J,1),I=1,8),J=1,5)/(0.1E0,0.1E0),\n     +                  (1.0E0,2.0E0), (1.0E0,2.0E0), (1.0E0,2.0E0),\n     +                  (1.0E0,2.0E0), (1.0E0,2.0E0), (1.0E0,2.0E0),\n     +                  (1.0E0,2.0E0), (0.3E0,-0.4E0), (3.0E0,4.0E0),\n     +                  (3.0E0,4.0E0), (3.0E0,4.0E0), (3.0E0,4.0E0),\n     +                  (3.0E0,4.0E0), (3.0E0,4.0E0), (3.0E0,4.0E0),\n     +                  (0.1E0,-0.3E0), (0.5E0,-0.1E0), (5.0E0,6.0E0),\n     +                  (5.0E0,6.0E0), (5.0E0,6.0E0), (5.0E0,6.0E0),\n     +                  (5.0E0,6.0E0), (5.0E0,6.0E0), (0.1E0,0.1E0),\n     +                  (-0.6E0,0.1E0), (0.1E0,-0.3E0), (7.0E0,8.0E0),\n     +                  (7.0E0,8.0E0), (7.0E0,8.0E0), (7.0E0,8.0E0),\n     +                  (7.0E0,8.0E0), (0.3E0,0.1E0), (0.5E0,0.0E0),\n     +                  (0.0E0,0.5E0), (0.0E0,0.2E0), (2.0E0,3.0E0),\n     +                  (2.0E0,3.0E0), (2.0E0,3.0E0), (2.0E0,3.0E0)/\n      DATA              ((CV(I,J,2),I=1,8),J=1,5)/(0.1E0,0.1E0),\n     +                  (4.0E0,5.0E0), (4.0E0,5.0E0), (4.0E0,5.0E0),\n     +                  (4.0E0,5.0E0), (4.0E0,5.0E0), (4.0E0,5.0E0),\n     +                  (4.0E0,5.0E0), (0.3E0,-0.4E0), (6.0E0,7.0E0),\n     +                  (6.0E0,7.0E0), (6.0E0,7.0E0), (6.0E0,7.0E0),\n     +                  (6.0E0,7.0E0), (6.0E0,7.0E0), (6.0E0,7.0E0),\n     +                  (0.1E0,-0.3E0), (8.0E0,9.0E0), (0.5E0,-0.1E0),\n     +                  (2.0E0,5.0E0), (2.0E0,5.0E0), (2.0E0,5.0E0),\n     +                  (2.0E0,5.0E0), (2.0E0,5.0E0), (0.1E0,0.1E0),\n     +                  (3.0E0,6.0E0), (-0.6E0,0.1E0), (4.0E0,7.0E0),\n     +                  (0.1E0,-0.3E0), (7.0E0,2.0E0), (7.0E0,2.0E0),\n     +                  (7.0E0,2.0E0), (0.3E0,0.1E0), (5.0E0,8.0E0),\n     +                  (0.5E0,0.0E0), (6.0E0,9.0E0), (0.0E0,0.5E0),\n     +                  (8.0E0,3.0E0), (0.0E0,0.2E0), (9.0E0,4.0E0)/\n      DATA              STRUE2/0.0E0, 0.5E0, 0.6E0, 0.7E0, 0.8E0/\n      DATA              STRUE4/0.0E0, 0.7E0, 1.0E0, 1.3E0, 1.6E0/\n      DATA              ((CTRUE5(I,J,1),I=1,8),J=1,5)/(0.1E0,0.1E0),\n     +                  (1.0E0,2.0E0), (1.0E0,2.0E0), (1.0E0,2.0E0),\n     +                  (1.0E0,2.0E0), (1.0E0,2.0E0), (1.0E0,2.0E0),\n     +                  (1.0E0,2.0E0), (-0.16E0,-0.37E0), (3.0E0,4.0E0),\n     +                  (3.0E0,4.0E0), (3.0E0,4.0E0), (3.0E0,4.0E0),\n     +                  (3.0E0,4.0E0), (3.0E0,4.0E0), (3.0E0,4.0E0),\n     +                  (-0.17E0,-0.19E0), (0.13E0,-0.39E0),\n     +                  (5.0E0,6.0E0), (5.0E0,6.0E0), (5.0E0,6.0E0),\n     +                  (5.0E0,6.0E0), (5.0E0,6.0E0), (5.0E0,6.0E0),\n     +                  (0.11E0,-0.03E0), (-0.17E0,0.46E0),\n     +                  (-0.17E0,-0.19E0), (7.0E0,8.0E0), (7.0E0,8.0E0),\n     +                  (7.0E0,8.0E0), (7.0E0,8.0E0), (7.0E0,8.0E0),\n     +                  (0.19E0,-0.17E0), (0.20E0,-0.35E0),\n     +                  (0.35E0,0.20E0), (0.14E0,0.08E0),\n     +                  (2.0E0,3.0E0), (2.0E0,3.0E0), (2.0E0,3.0E0),\n     +                  (2.0E0,3.0E0)/\n      DATA              ((CTRUE5(I,J,2),I=1,8),J=1,5)/(0.1E0,0.1E0),\n     +                  (4.0E0,5.0E0), (4.0E0,5.0E0), (4.0E0,5.0E0),\n     +                  (4.0E0,5.0E0), (4.0E0,5.0E0), (4.0E0,5.0E0),\n     +                  (4.0E0,5.0E0), (-0.16E0,-0.37E0), (6.0E0,7.0E0),\n     +                  (6.0E0,7.0E0), (6.0E0,7.0E0), (6.0E0,7.0E0),\n     +                  (6.0E0,7.0E0), (6.0E0,7.0E0), (6.0E0,7.0E0),\n     +                  (-0.17E0,-0.19E0), (8.0E0,9.0E0),\n     +                  (0.13E0,-0.39E0), (2.0E0,5.0E0), (2.0E0,5.0E0),\n     +                  (2.0E0,5.0E0), (2.0E0,5.0E0), (2.0E0,5.0E0),\n     +                  (0.11E0,-0.03E0), (3.0E0,6.0E0),\n     +                  (-0.17E0,0.46E0), (4.0E0,7.0E0),\n     +                  (-0.17E0,-0.19E0), (7.0E0,2.0E0), (7.0E0,2.0E0),\n     +                  (7.0E0,2.0E0), (0.19E0,-0.17E0), (5.0E0,8.0E0),\n     +                  (0.20E0,-0.35E0), (6.0E0,9.0E0),\n     +                  (0.35E0,0.20E0), (8.0E0,3.0E0),\n     +                  (0.14E0,0.08E0), (9.0E0,4.0E0)/\n      DATA              ((CTRUE6(I,J,1),I=1,8),J=1,5)/(0.1E0,0.1E0),\n     +                  (1.0E0,2.0E0), (1.0E0,2.0E0), (1.0E0,2.0E0),\n     +                  (1.0E0,2.0E0), (1.0E0,2.0E0), (1.0E0,2.0E0),\n     +                  (1.0E0,2.0E0), (0.09E0,-0.12E0), (3.0E0,4.0E0),\n     +                  (3.0E0,4.0E0), (3.0E0,4.0E0), (3.0E0,4.0E0),\n     +                  (3.0E0,4.0E0), (3.0E0,4.0E0), (3.0E0,4.0E0),\n     +                  (0.03E0,-0.09E0), (0.15E0,-0.03E0),\n     +                  (5.0E0,6.0E0), (5.0E0,6.0E0), (5.0E0,6.0E0),\n     +                  (5.0E0,6.0E0), (5.0E0,6.0E0), (5.0E0,6.0E0),\n     +                  (0.03E0,0.03E0), (-0.18E0,0.03E0),\n     +                  (0.03E0,-0.09E0), (7.0E0,8.0E0), (7.0E0,8.0E0),\n     +                  (7.0E0,8.0E0), (7.0E0,8.0E0), (7.0E0,8.0E0),\n     +                  (0.09E0,0.03E0), (0.15E0,0.00E0),\n     +                  (0.00E0,0.15E0), (0.00E0,0.06E0), (2.0E0,3.0E0),\n     +                  (2.0E0,3.0E0), (2.0E0,3.0E0), (2.0E0,3.0E0)/\n      DATA              ((CTRUE6(I,J,2),I=1,8),J=1,5)/(0.1E0,0.1E0),\n     +                  (4.0E0,5.0E0), (4.0E0,5.0E0), (4.0E0,5.0E0),\n     +                  (4.0E0,5.0E0), (4.0E0,5.0E0), (4.0E0,5.0E0),\n     +                  (4.0E0,5.0E0), (0.09E0,-0.12E0), (6.0E0,7.0E0),\n     +                  (6.0E0,7.0E0), (6.0E0,7.0E0), (6.0E0,7.0E0),\n     +                  (6.0E0,7.0E0), (6.0E0,7.0E0), (6.0E0,7.0E0),\n     +                  (0.03E0,-0.09E0), (8.0E0,9.0E0),\n     +                  (0.15E0,-0.03E0), (2.0E0,5.0E0), (2.0E0,5.0E0),\n     +                  (2.0E0,5.0E0), (2.0E0,5.0E0), (2.0E0,5.0E0),\n     +                  (0.03E0,0.03E0), (3.0E0,6.0E0),\n     +                  (-0.18E0,0.03E0), (4.0E0,7.0E0),\n     +                  (0.03E0,-0.09E0), (7.0E0,2.0E0), (7.0E0,2.0E0),\n     +                  (7.0E0,2.0E0), (0.09E0,0.03E0), (5.0E0,8.0E0),\n     +                  (0.15E0,0.00E0), (6.0E0,9.0E0), (0.00E0,0.15E0),\n     +                  (8.0E0,3.0E0), (0.00E0,0.06E0), (9.0E0,4.0E0)/\n      DATA              ITRUE3/0, 1, 2, 2, 2/\n*     .. Executable Statements ..\n      DO 60 INCX = 1, 2\n         DO 40 NP1 = 1, 5\n            N = NP1 - 1\n            LEN = 2*MAX(N,1)\n*           .. Set vector arguments ..\n            DO 20 I = 1, LEN\n               CX(I) = CV(I,NP1,INCX)\n   20       CONTINUE\n            IF (ICASE.EQ.6) THEN\n*              .. SCNRM2 ..\n               CALL STEST1(SCNRM2(N,CX,INCX),STRUE2(NP1),STRUE2(NP1),\n     +                     SFAC)\n            ELSE IF (ICASE.EQ.7) THEN\n*              .. SCASUM ..\n               CALL STEST1(SCASUM(N,CX,INCX),STRUE4(NP1),STRUE4(NP1),\n     +                     SFAC)\n            ELSE IF (ICASE.EQ.8) THEN\n*              .. CSCAL ..\n               CALL CSCAL(N,CA,CX,INCX)\n               CALL CTEST(LEN,CX,CTRUE5(1,NP1,INCX),CTRUE5(1,NP1,INCX),\n     +                    SFAC)\n            ELSE IF (ICASE.EQ.9) THEN\n*              .. CSSCAL ..\n               CALL CSSCAL(N,SA,CX,INCX)\n               CALL CTEST(LEN,CX,CTRUE6(1,NP1,INCX),CTRUE6(1,NP1,INCX),\n     +                    SFAC)\n            ELSE IF (ICASE.EQ.10) THEN\n*              .. ICAMAX ..\n               CALL ITEST1(ICAMAX(N,CX,INCX),ITRUE3(NP1))\n            ELSE\n               WRITE (NOUT,*) ' Shouldn''t be here in CHECK1'\n               STOP\n            END IF\n*\n   40    CONTINUE\n   60 CONTINUE\n*\n      INCX = 1\n      IF (ICASE.EQ.8) THEN\n*        CSCAL\n*        Add a test for alpha equal to zero.\n         CA = (0.0E0,0.0E0)\n         DO 80 I = 1, 5\n            MWPCT(I) = (0.0E0,0.0E0)\n            MWPCS(I) = (1.0E0,1.0E0)\n   80    CONTINUE\n         CALL CSCAL(5,CA,CX,INCX)\n         CALL CTEST(5,CX,MWPCT,MWPCS,SFAC)\n      ELSE IF (ICASE.EQ.9) THEN\n*        CSSCAL\n*        Add a test for alpha equal to zero.\n         SA = 0.0E0\n         DO 100 I = 1, 5\n            MWPCT(I) = (0.0E0,0.0E0)\n            MWPCS(I) = (1.0E0,1.0E0)\n  100    CONTINUE\n         CALL CSSCAL(5,SA,CX,INCX)\n         CALL CTEST(5,CX,MWPCT,MWPCS,SFAC)\n*        Add a test for alpha equal to one.\n         SA = 1.0E0\n         DO 120 I = 1, 5\n            MWPCT(I) = CX(I)\n            MWPCS(I) = CX(I)\n  120    CONTINUE\n         CALL CSSCAL(5,SA,CX,INCX)\n         CALL CTEST(5,CX,MWPCT,MWPCS,SFAC)\n*        Add a test for alpha equal to minus one.\n         SA = -1.0E0\n         DO 140 I = 1, 5\n            MWPCT(I) = -CX(I)\n            MWPCS(I) = -CX(I)\n  140    CONTINUE\n         CALL CSSCAL(5,SA,CX,INCX)\n         CALL CTEST(5,CX,MWPCT,MWPCS,SFAC)\n      END IF\n      RETURN\n      END\n      SUBROUTINE CHECK2(SFAC)\n*     .. Parameters ..\n      INTEGER           NOUT\n      PARAMETER         (NOUT=6)\n*     .. Scalar Arguments ..\n      REAL              SFAC\n*     .. Scalars in Common ..\n      INTEGER           ICASE, INCX, INCY, MODE, N\n      LOGICAL           PASS\n*     .. Local Scalars ..\n      COMPLEX           CA\n      INTEGER           I, J, KI, KN, KSIZE, LENX, LENY, MX, MY\n*     .. Local Arrays ..\n      COMPLEX           CDOT(1), CSIZE1(4), CSIZE2(7,2), CSIZE3(14),\n     +                  CT10X(7,4,4), CT10Y(7,4,4), CT6(4,4), CT7(4,4),\n     +                  CT8(7,4,4), CX(7), CX1(7), CY(7), CY1(7)\n      INTEGER           INCXS(4), INCYS(4), LENS(4,2), NS(4)\n*     .. External Functions ..\n      COMPLEX           CDOTC, CDOTU\n      EXTERNAL          CDOTC, CDOTU\n*     .. External Subroutines ..\n      EXTERNAL          CAXPY, CCOPY, CSWAP, CTEST\n*     .. Intrinsic Functions ..\n      INTRINSIC         ABS, MIN\n*     .. Common blocks ..\n      COMMON            /COMBLA/ICASE, N, INCX, INCY, MODE, PASS\n*     .. Data statements ..\n      DATA              CA/(0.4E0,-0.7E0)/\n      DATA              INCXS/1, 2, -2, -1/\n      DATA              INCYS/1, -2, 1, -2/\n      DATA              LENS/1, 1, 2, 4, 1, 1, 3, 7/\n      DATA              NS/0, 1, 2, 4/\n      DATA              CX1/(0.7E0,-0.8E0), (-0.4E0,-0.7E0),\n     +                  (-0.1E0,-0.9E0), (0.2E0,-0.8E0),\n     +                  (-0.9E0,-0.4E0), (0.1E0,0.4E0), (-0.6E0,0.6E0)/\n      DATA              CY1/(0.6E0,-0.6E0), (-0.9E0,0.5E0),\n     +                  (0.7E0,-0.6E0), (0.1E0,-0.5E0), (-0.1E0,-0.2E0),\n     +                  (-0.5E0,-0.3E0), (0.8E0,-0.7E0)/\n      DATA              ((CT8(I,J,1),I=1,7),J=1,4)/(0.6E0,-0.6E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.32E0,-1.41E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.32E0,-1.41E0),\n     +                  (-1.55E0,0.5E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.32E0,-1.41E0), (-1.55E0,0.5E0),\n     +                  (0.03E0,-0.89E0), (-0.38E0,-0.96E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0)/\n      DATA              ((CT8(I,J,2),I=1,7),J=1,4)/(0.6E0,-0.6E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.32E0,-1.41E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (-0.07E0,-0.89E0),\n     +                  (-0.9E0,0.5E0), (0.42E0,-1.41E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.78E0,0.06E0), (-0.9E0,0.5E0),\n     +                  (0.06E0,-0.13E0), (0.1E0,-0.5E0),\n     +                  (-0.77E0,-0.49E0), (-0.5E0,-0.3E0),\n     +                  (0.52E0,-1.51E0)/\n      DATA              ((CT8(I,J,3),I=1,7),J=1,4)/(0.6E0,-0.6E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.32E0,-1.41E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (-0.07E0,-0.89E0),\n     +                  (-1.18E0,-0.31E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.78E0,0.06E0), (-1.54E0,0.97E0),\n     +                  (0.03E0,-0.89E0), (-0.18E0,-1.31E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0)/\n      DATA              ((CT8(I,J,4),I=1,7),J=1,4)/(0.6E0,-0.6E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.32E0,-1.41E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.32E0,-1.41E0), (-0.9E0,0.5E0),\n     +                  (0.05E0,-0.6E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.32E0,-1.41E0),\n     +                  (-0.9E0,0.5E0), (0.05E0,-0.6E0), (0.1E0,-0.5E0),\n     +                  (-0.77E0,-0.49E0), (-0.5E0,-0.3E0),\n     +                  (0.32E0,-1.16E0)/\n      DATA              CT7/(0.0E0,0.0E0), (-0.06E0,-0.90E0),\n     +                  (0.65E0,-0.47E0), (-0.34E0,-1.22E0),\n     +                  (0.0E0,0.0E0), (-0.06E0,-0.90E0),\n     +                  (-0.59E0,-1.46E0), (-1.04E0,-0.04E0),\n     +                  (0.0E0,0.0E0), (-0.06E0,-0.90E0),\n     +                  (-0.83E0,0.59E0), (0.07E0,-0.37E0),\n     +                  (0.0E0,0.0E0), (-0.06E0,-0.90E0),\n     +                  (-0.76E0,-1.15E0), (-1.33E0,-1.82E0)/\n      DATA              CT6/(0.0E0,0.0E0), (0.90E0,0.06E0),\n     +                  (0.91E0,-0.77E0), (1.80E0,-0.10E0),\n     +                  (0.0E0,0.0E0), (0.90E0,0.06E0), (1.45E0,0.74E0),\n     +                  (0.20E0,0.90E0), (0.0E0,0.0E0), (0.90E0,0.06E0),\n     +                  (-0.55E0,0.23E0), (0.83E0,-0.39E0),\n     +                  (0.0E0,0.0E0), (0.90E0,0.06E0), (1.04E0,0.79E0),\n     +                  (1.95E0,1.22E0)/\n      DATA              ((CT10X(I,J,1),I=1,7),J=1,4)/(0.7E0,-0.8E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.6E0,-0.6E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.6E0,-0.6E0), (-0.9E0,0.5E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.6E0,-0.6E0),\n     +                  (-0.9E0,0.5E0), (0.7E0,-0.6E0), (0.1E0,-0.5E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0)/\n      DATA              ((CT10X(I,J,2),I=1,7),J=1,4)/(0.7E0,-0.8E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.6E0,-0.6E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.7E0,-0.6E0), (-0.4E0,-0.7E0),\n     +                  (0.6E0,-0.6E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.8E0,-0.7E0),\n     +                  (-0.4E0,-0.7E0), (-0.1E0,-0.2E0),\n     +                  (0.2E0,-0.8E0), (0.7E0,-0.6E0), (0.1E0,0.4E0),\n     +                  (0.6E0,-0.6E0)/\n      DATA              ((CT10X(I,J,3),I=1,7),J=1,4)/(0.7E0,-0.8E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.6E0,-0.6E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (-0.9E0,0.5E0), (-0.4E0,-0.7E0),\n     +                  (0.6E0,-0.6E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.1E0,-0.5E0),\n     +                  (-0.4E0,-0.7E0), (0.7E0,-0.6E0), (0.2E0,-0.8E0),\n     +                  (-0.9E0,0.5E0), (0.1E0,0.4E0), (0.6E0,-0.6E0)/\n      DATA              ((CT10X(I,J,4),I=1,7),J=1,4)/(0.7E0,-0.8E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.6E0,-0.6E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.6E0,-0.6E0), (0.7E0,-0.6E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.6E0,-0.6E0),\n     +                  (0.7E0,-0.6E0), (-0.1E0,-0.2E0), (0.8E0,-0.7E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0)/\n      DATA              ((CT10Y(I,J,1),I=1,7),J=1,4)/(0.6E0,-0.6E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.7E0,-0.8E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.7E0,-0.8E0), (-0.4E0,-0.7E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.7E0,-0.8E0),\n     +                  (-0.4E0,-0.7E0), (-0.1E0,-0.9E0),\n     +                  (0.2E0,-0.8E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0)/\n      DATA              ((CT10Y(I,J,2),I=1,7),J=1,4)/(0.6E0,-0.6E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.7E0,-0.8E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (-0.1E0,-0.9E0), (-0.9E0,0.5E0),\n     +                  (0.7E0,-0.8E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (-0.6E0,0.6E0),\n     +                  (-0.9E0,0.5E0), (-0.9E0,-0.4E0), (0.1E0,-0.5E0),\n     +                  (-0.1E0,-0.9E0), (-0.5E0,-0.3E0),\n     +                  (0.7E0,-0.8E0)/\n      DATA              ((CT10Y(I,J,3),I=1,7),J=1,4)/(0.6E0,-0.6E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.7E0,-0.8E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (-0.1E0,-0.9E0), (0.7E0,-0.8E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (-0.6E0,0.6E0),\n     +                  (-0.9E0,-0.4E0), (-0.1E0,-0.9E0),\n     +                  (0.7E0,-0.8E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0)/\n      DATA              ((CT10Y(I,J,4),I=1,7),J=1,4)/(0.6E0,-0.6E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.7E0,-0.8E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.7E0,-0.8E0), (-0.9E0,0.5E0),\n     +                  (-0.4E0,-0.7E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.7E0,-0.8E0),\n     +                  (-0.9E0,0.5E0), (-0.4E0,-0.7E0), (0.1E0,-0.5E0),\n     +                  (-0.1E0,-0.9E0), (-0.5E0,-0.3E0),\n     +                  (0.2E0,-0.8E0)/\n      DATA              CSIZE1/(0.0E0,0.0E0), (0.9E0,0.9E0),\n     +                  (1.63E0,1.73E0), (2.90E0,2.78E0)/\n      DATA              CSIZE3/(0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (1.17E0,1.17E0),\n     +                  (1.17E0,1.17E0), (1.17E0,1.17E0),\n     +                  (1.17E0,1.17E0), (1.17E0,1.17E0),\n     +                  (1.17E0,1.17E0), (1.17E0,1.17E0)/\n      DATA              CSIZE2/(0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),\n     +                  (0.0E0,0.0E0), (0.0E0,0.0E0), (1.54E0,1.54E0),\n     +                  (1.54E0,1.54E0), (1.54E0,1.54E0),\n     +                  (1.54E0,1.54E0), (1.54E0,1.54E0),\n     +                  (1.54E0,1.54E0), (1.54E0,1.54E0)/\n*     .. Executable Statements ..\n      DO 60 KI = 1, 4\n         INCX = INCXS(KI)\n         INCY = INCYS(KI)\n         MX = ABS(INCX)\n         MY = ABS(INCY)\n*\n         DO 40 KN = 1, 4\n            N = NS(KN)\n            KSIZE = MIN(2,KN)\n            LENX = LENS(KN,MX)\n            LENY = LENS(KN,MY)\n*           .. initialize all argument arrays ..\n            DO 20 I = 1, 7\n               CX(I) = CX1(I)\n               CY(I) = CY1(I)\n   20       CONTINUE\n            IF (ICASE.EQ.1) THEN\n*              .. CDOTC ..\n               CDOT(1) = CDOTC(N,CX,INCX,CY,INCY)\n               CALL CTEST(1,CDOT,CT6(KN,KI),CSIZE1(KN),SFAC)\n            ELSE IF (ICASE.EQ.2) THEN\n*              .. CDOTU ..\n               CDOT(1) = CDOTU(N,CX,INCX,CY,INCY)\n               CALL CTEST(1,CDOT,CT7(KN,KI),CSIZE1(KN),SFAC)\n            ELSE IF (ICASE.EQ.3) THEN\n*              .. CAXPY ..\n               CALL CAXPY(N,CA,CX,INCX,CY,INCY)\n               CALL CTEST(LENY,CY,CT8(1,KN,KI),CSIZE2(1,KSIZE),SFAC)\n            ELSE IF (ICASE.EQ.4) THEN\n*              .. CCOPY ..\n               CALL CCOPY(N,CX,INCX,CY,INCY)\n               CALL CTEST(LENY,CY,CT10Y(1,KN,KI),CSIZE3,1.0E0)\n            ELSE IF (ICASE.EQ.5) THEN\n*              .. CSWAP ..\n               CALL CSWAP(N,CX,INCX,CY,INCY)\n               CALL CTEST(LENX,CX,CT10X(1,KN,KI),CSIZE3,1.0E0)\n               CALL CTEST(LENY,CY,CT10Y(1,KN,KI),CSIZE3,1.0E0)\n            ELSE\n               WRITE (NOUT,*) ' Shouldn''t be here in CHECK2'\n               STOP\n            END IF\n*\n   40    CONTINUE\n   60 CONTINUE\n      RETURN\n      END\n      SUBROUTINE STEST(LEN,SCOMP,STRUE,SSIZE,SFAC)\n*     ********************************* STEST **************************\n*\n*     THIS SUBR COMPARES ARRAYS  SCOMP() AND STRUE() OF LENGTH LEN TO\n*     SEE IF THE TERM BY TERM DIFFERENCES, MULTIPLIED BY SFAC, ARE\n*     NEGLIGIBLE.\n*\n*     C. L. LAWSON, JPL, 1974 DEC 10\n*\n*     .. Parameters ..\n      INTEGER          NOUT\n      REAL             ZERO\n      PARAMETER        (NOUT=6, ZERO=0.0E0)\n*     .. Scalar Arguments ..\n      REAL             SFAC\n      INTEGER          LEN\n*     .. Array Arguments ..\n      REAL             SCOMP(LEN), SSIZE(LEN), STRUE(LEN)\n*     .. Scalars in Common ..\n      INTEGER          ICASE, INCX, INCY, MODE, N\n      LOGICAL          PASS\n*     .. Local Scalars ..\n      REAL             SD\n      INTEGER          I\n*     .. External Functions ..\n      REAL             SDIFF\n      EXTERNAL         SDIFF\n*     .. Intrinsic Functions ..\n      INTRINSIC        ABS\n*     .. Common blocks ..\n      COMMON           /COMBLA/ICASE, N, INCX, INCY, MODE, PASS\n*     .. Executable Statements ..\n*\n      DO 40 I = 1, LEN\n         SD = SCOMP(I) - STRUE(I)\n         IF (ABS(SFAC*SD) .LE. ABS(SSIZE(I))*EPSILON(ZERO))\n     +       GO TO 40\n*\n*                             HERE    SCOMP(I) IS NOT CLOSE TO STRUE(I).\n*\n         IF ( .NOT. PASS) GO TO 20\n*                             PRINT FAIL MESSAGE AND HEADER.\n         PASS = .FALSE.\n         WRITE (NOUT,99999)\n         WRITE (NOUT,99998)\n   20    WRITE (NOUT,99997) ICASE, N, INCX, INCY, MODE, I, SCOMP(I),\n     +     STRUE(I), SD, SSIZE(I)\n   40 CONTINUE\n      RETURN\n*\n99999 FORMAT ('                                       FAIL')\n99998 FORMAT (/' CASE  N INCX INCY MODE  I                            ',\n     +       ' COMP(I)                             TRUE(I)  DIFFERENCE',\n     +       '     SIZE(I)',/1X)\n99997 FORMAT (1X,I4,I3,3I5,I3,2E36.8,2E12.4)\n      END\n      SUBROUTINE STEST1(SCOMP1,STRUE1,SSIZE,SFAC)\n*     ************************* STEST1 *****************************\n*\n*     THIS IS AN INTERFACE SUBROUTINE TO ACCOMMODATE THE FORTRAN\n*     REQUIREMENT THAT WHEN A DUMMY ARGUMENT IS AN ARRAY, THE\n*     ACTUAL ARGUMENT MUST ALSO BE AN ARRAY OR AN ARRAY ELEMENT.\n*\n*     C.L. LAWSON, JPL, 1978 DEC 6\n*\n*     .. Scalar Arguments ..\n      REAL              SCOMP1, SFAC, STRUE1\n*     .. Array Arguments ..\n      REAL              SSIZE(*)\n*     .. Local Arrays ..\n      REAL              SCOMP(1), STRUE(1)\n*     .. External Subroutines ..\n      EXTERNAL          STEST\n*     .. Executable Statements ..\n*\n      SCOMP(1) = SCOMP1\n      STRUE(1) = STRUE1\n      CALL STEST(1,SCOMP,STRUE,SSIZE,SFAC)\n*\n      RETURN\n      END\n      REAL             FUNCTION SDIFF(SA,SB)\n*     ********************************* SDIFF **************************\n*     COMPUTES DIFFERENCE OF TWO NUMBERS.  C. L. LAWSON, JPL 1974 FEB 15\n*\n*     .. Scalar Arguments ..\n      REAL                            SA, SB\n*     .. Executable Statements ..\n      SDIFF = SA - SB\n      RETURN\n      END\n      SUBROUTINE CTEST(LEN,CCOMP,CTRUE,CSIZE,SFAC)\n*     **************************** CTEST *****************************\n*\n*     C.L. LAWSON, JPL, 1978 DEC 6\n*\n*     .. Scalar Arguments ..\n      REAL             SFAC\n      INTEGER          LEN\n*     .. Array Arguments ..\n      COMPLEX          CCOMP(LEN), CSIZE(LEN), CTRUE(LEN)\n*     .. Local Scalars ..\n      INTEGER          I\n*     .. Local Arrays ..\n      REAL             SCOMP(20), SSIZE(20), STRUE(20)\n*     .. External Subroutines ..\n      EXTERNAL         STEST\n*     .. Intrinsic Functions ..\n      INTRINSIC        AIMAG, REAL\n*     .. Executable Statements ..\n      DO 20 I = 1, LEN\n         SCOMP(2*I-1) = REAL(CCOMP(I))\n         SCOMP(2*I) = AIMAG(CCOMP(I))\n         STRUE(2*I-1) = REAL(CTRUE(I))\n         STRUE(2*I) = AIMAG(CTRUE(I))\n         SSIZE(2*I-1) = REAL(CSIZE(I))\n         SSIZE(2*I) = AIMAG(CSIZE(I))\n   20 CONTINUE\n*\n      CALL STEST(2*LEN,SCOMP,STRUE,SSIZE,SFAC)\n      RETURN\n      END\n      SUBROUTINE ITEST1(ICOMP,ITRUE)\n*     ********************************* ITEST1 *************************\n*\n*     THIS SUBROUTINE COMPARES THE VARIABLES ICOMP AND ITRUE FOR\n*     EQUALITY.\n*     C. L. LAWSON, JPL, 1974 DEC 10\n*\n*     .. Parameters ..\n      INTEGER           NOUT\n      PARAMETER         (NOUT=6)\n*     .. Scalar Arguments ..\n      INTEGER           ICOMP, ITRUE\n*     .. Scalars in Common ..\n      INTEGER           ICASE, INCX, INCY, MODE, N\n      LOGICAL           PASS\n*     .. Local Scalars ..\n      INTEGER           ID\n*     .. Common blocks ..\n      COMMON            /COMBLA/ICASE, N, INCX, INCY, MODE, PASS\n*     .. Executable Statements ..\n      IF (ICOMP.EQ.ITRUE) GO TO 40\n*\n*                            HERE ICOMP IS NOT EQUAL TO ITRUE.\n*\n      IF ( .NOT. PASS) GO TO 20\n*                             PRINT FAIL MESSAGE AND HEADER.\n      PASS = .FALSE.\n      WRITE (NOUT,99999)\n      WRITE (NOUT,99998)\n   20 ID = ICOMP - ITRUE\n      WRITE (NOUT,99997) ICASE, N, INCX, INCY, MODE, ICOMP, ITRUE, ID\n   40 CONTINUE\n      RETURN\n*\n99999 FORMAT ('                                       FAIL')\n99998 FORMAT (/' CASE  N INCX INCY MODE                               ',\n     +       ' COMP                                TRUE     DIFFERENCE',\n     +       /1X)\n99997 FORMAT (1X,I4,I3,3I5,2I36,I12)\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/blas/testing/cblat2.f",
    "content": "*> \\brief \\b CBLAT2\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*  Definition:\n*  ===========\n*\n*       PROGRAM CBLAT2\n* \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> Test program for the COMPLEX          Level 2 Blas.\n*>\n*> The program must be driven by a short data file. The first 18 records\n*> of the file are read using list-directed input, the last 17 records\n*> are read using the format ( A6, L2 ). An annotated example of a data\n*> file can be obtained by deleting the first 3 characters from the\n*> following 35 lines:\n*> 'cblat2.out'      NAME OF SUMMARY OUTPUT FILE\n*> 6                 UNIT NUMBER OF SUMMARY FILE\n*> 'CBLA2T.SNAP'     NAME OF SNAPSHOT OUTPUT FILE\n*> -1                UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)\n*> F        LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.\n*> F        LOGICAL FLAG, T TO STOP ON FAILURES.\n*> T        LOGICAL FLAG, T TO TEST ERROR EXITS.\n*> 16.0     THRESHOLD VALUE OF TEST RATIO\n*> 6                 NUMBER OF VALUES OF N\n*> 0 1 2 3 5 9       VALUES OF N\n*> 4                 NUMBER OF VALUES OF K\n*> 0 1 2 4           VALUES OF K\n*> 4                 NUMBER OF VALUES OF INCX AND INCY\n*> 1 2 -1 -2         VALUES OF INCX AND INCY\n*> 3                 NUMBER OF VALUES OF ALPHA\n*> (0.0,0.0) (1.0,0.0) (0.7,-0.9)       VALUES OF ALPHA\n*> 3                 NUMBER OF VALUES OF BETA\n*> (0.0,0.0) (1.0,0.0) (1.3,-1.1)       VALUES OF BETA\n*> CGEMV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> CGBMV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> CHEMV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> CHBMV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> CHPMV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> CTRMV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> CTBMV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> CTPMV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> CTRSV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> CTBSV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> CTPSV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> CGERC  T PUT F FOR NO TEST. SAME COLUMNS.\n*> CGERU  T PUT F FOR NO TEST. SAME COLUMNS.\n*> CHER   T PUT F FOR NO TEST. SAME COLUMNS.\n*> CHPR   T PUT F FOR NO TEST. SAME COLUMNS.\n*> CHER2  T PUT F FOR NO TEST. SAME COLUMNS.\n*> CHPR2  T PUT F FOR NO TEST. SAME COLUMNS.\n*>\n*> Further Details\n*> ===============\n*>\n*>    See:\n*>\n*>       Dongarra J. J., Du Croz J. J., Hammarling S.  and Hanson R. J..\n*>       An  extended  set of Fortran  Basic Linear Algebra Subprograms.\n*>\n*>       Technical  Memoranda  Nos. 41 (revision 3) and 81,  Mathematics\n*>       and  Computer Science  Division,  Argonne  National Laboratory,\n*>       9700 South Cass Avenue, Argonne, Illinois 60439, US.\n*>\n*>       Or\n*>\n*>       NAG  Technical Reports TR3/87 and TR4/87,  Numerical Algorithms\n*>       Group  Ltd.,  NAG  Central  Office,  256  Banbury  Road, Oxford\n*>       OX2 7DE, UK,  and  Numerical Algorithms Group Inc.,  1101  31st\n*>       Street,  Suite 100,  Downers Grove,  Illinois 60515-1263,  USA.\n*>\n*>\n*> -- Written on 10-August-1987.\n*>    Richard Hanson, Sandia National Labs.\n*>    Jeremy Du Croz, NAG Central Office.\n*>\n*>    10-9-00:  Change STATUS='NEW' to 'UNKNOWN' so that the testers\n*>              can be run multiple times without deleting generated\n*>              output files (susan)\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date April 2012\n*\n*> \\ingroup complex_blas_testing\n*\n*  =====================================================================\n      PROGRAM CBLAT2\n*\n*  -- Reference BLAS test routine (version 3.4.1) --\n*  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     April 2012\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      INTEGER            NIN\n      PARAMETER          ( NIN = 5 )\n      INTEGER            NSUBS\n      PARAMETER          ( NSUBS = 17 )\n      COMPLEX            ZERO, ONE\n      PARAMETER          ( ZERO = ( 0.0, 0.0 ), ONE = ( 1.0, 0.0 ) )\n      REAL               RZERO\n      PARAMETER          ( RZERO = 0.0 )\n      INTEGER            NMAX, INCMAX\n      PARAMETER          ( NMAX = 65, INCMAX = 2 )\n      INTEGER            NINMAX, NIDMAX, NKBMAX, NALMAX, NBEMAX\n      PARAMETER          ( NINMAX = 7, NIDMAX = 9, NKBMAX = 7,\n     $                   NALMAX = 7, NBEMAX = 7 )\n*     .. Local Scalars ..\n      REAL               EPS, ERR, THRESH\n      INTEGER            I, ISNUM, J, N, NALF, NBET, NIDIM, NINC, NKB,\n     $                   NOUT, NTRA\n      LOGICAL            FATAL, LTESTT, REWI, SAME, SFATAL, TRACE,\n     $                   TSTERR\n      CHARACTER*1        TRANS\n      CHARACTER*6        SNAMET\n      CHARACTER*32       SNAPS, SUMMRY\n*     .. Local Arrays ..\n      COMPLEX            A( NMAX, NMAX ), AA( NMAX*NMAX ),\n     $                   ALF( NALMAX ), AS( NMAX*NMAX ), BET( NBEMAX ),\n     $                   X( NMAX ), XS( NMAX*INCMAX ),\n     $                   XX( NMAX*INCMAX ), Y( NMAX ),\n     $                   YS( NMAX*INCMAX ), YT( NMAX ),\n     $                   YY( NMAX*INCMAX ), Z( 2*NMAX )\n      REAL               G( NMAX )\n      INTEGER            IDIM( NIDMAX ), INC( NINMAX ), KB( NKBMAX )\n      LOGICAL            LTEST( NSUBS )\n      CHARACTER*6        SNAMES( NSUBS )\n*     .. External Functions ..\n      REAL               SDIFF\n      LOGICAL            LCE\n      EXTERNAL           SDIFF, LCE\n*     .. External Subroutines ..\n      EXTERNAL           CCHK1, CCHK2, CCHK3, CCHK4, CCHK5, CCHK6,\n     $                   CCHKE, CMVCH\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, MAX, MIN\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n      CHARACTER*6        SRNAMT\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n      COMMON             /SRNAMC/SRNAMT\n*     .. Data statements ..\n      DATA               SNAMES/'CGEMV ', 'CGBMV ', 'CHEMV ', 'CHBMV ',\n     $                   'CHPMV ', 'CTRMV ', 'CTBMV ', 'CTPMV ',\n     $                   'CTRSV ', 'CTBSV ', 'CTPSV ', 'CGERC ',\n     $                   'CGERU ', 'CHER  ', 'CHPR  ', 'CHER2 ',\n     $                   'CHPR2 '/\n*     .. Executable Statements ..\n*\n*     Read name and unit number for summary output file and open file.\n*\n      READ( NIN, FMT = * )SUMMRY\n      READ( NIN, FMT = * )NOUT\n      OPEN( NOUT, FILE = SUMMRY, STATUS = 'UNKNOWN' )\n      NOUTC = NOUT\n*\n*     Read name and unit number for snapshot output file and open file.\n*\n      READ( NIN, FMT = * )SNAPS\n      READ( NIN, FMT = * )NTRA\n      TRACE = NTRA.GE.0\n      IF( TRACE )THEN\n         OPEN( NTRA, FILE = SNAPS, STATUS = 'UNKNOWN' )\n      END IF\n*     Read the flag that directs rewinding of the snapshot file.\n      READ( NIN, FMT = * )REWI\n      REWI = REWI.AND.TRACE\n*     Read the flag that directs stopping on any failure.\n      READ( NIN, FMT = * )SFATAL\n*     Read the flag that indicates whether error exits are to be tested.\n      READ( NIN, FMT = * )TSTERR\n*     Read the threshold value of the test ratio\n      READ( NIN, FMT = * )THRESH\n*\n*     Read and check the parameter values for the tests.\n*\n*     Values of N\n      READ( NIN, FMT = * )NIDIM\n      IF( NIDIM.LT.1.OR.NIDIM.GT.NIDMAX )THEN\n         WRITE( NOUT, FMT = 9997 )'N', NIDMAX\n         GO TO 230\n      END IF\n      READ( NIN, FMT = * )( IDIM( I ), I = 1, NIDIM )\n      DO 10 I = 1, NIDIM\n         IF( IDIM( I ).LT.0.OR.IDIM( I ).GT.NMAX )THEN\n            WRITE( NOUT, FMT = 9996 )NMAX\n            GO TO 230\n         END IF\n   10 CONTINUE\n*     Values of K\n      READ( NIN, FMT = * )NKB\n      IF( NKB.LT.1.OR.NKB.GT.NKBMAX )THEN\n         WRITE( NOUT, FMT = 9997 )'K', NKBMAX\n         GO TO 230\n      END IF\n      READ( NIN, FMT = * )( KB( I ), I = 1, NKB )\n      DO 20 I = 1, NKB\n         IF( KB( I ).LT.0 )THEN\n            WRITE( NOUT, FMT = 9995 )\n            GO TO 230\n         END IF\n   20 CONTINUE\n*     Values of INCX and INCY\n      READ( NIN, FMT = * )NINC\n      IF( NINC.LT.1.OR.NINC.GT.NINMAX )THEN\n         WRITE( NOUT, FMT = 9997 )'INCX AND INCY', NINMAX\n         GO TO 230\n      END IF\n      READ( NIN, FMT = * )( INC( I ), I = 1, NINC )\n      DO 30 I = 1, NINC\n         IF( INC( I ).EQ.0.OR.ABS( INC( I ) ).GT.INCMAX )THEN\n            WRITE( NOUT, FMT = 9994 )INCMAX\n            GO TO 230\n         END IF\n   30 CONTINUE\n*     Values of ALPHA\n      READ( NIN, FMT = * )NALF\n      IF( NALF.LT.1.OR.NALF.GT.NALMAX )THEN\n         WRITE( NOUT, FMT = 9997 )'ALPHA', NALMAX\n         GO TO 230\n      END IF\n      READ( NIN, FMT = * )( ALF( I ), I = 1, NALF )\n*     Values of BETA\n      READ( NIN, FMT = * )NBET\n      IF( NBET.LT.1.OR.NBET.GT.NBEMAX )THEN\n         WRITE( NOUT, FMT = 9997 )'BETA', NBEMAX\n         GO TO 230\n      END IF\n      READ( NIN, FMT = * )( BET( I ), I = 1, NBET )\n*\n*     Report values of parameters.\n*\n      WRITE( NOUT, FMT = 9993 )\n      WRITE( NOUT, FMT = 9992 )( IDIM( I ), I = 1, NIDIM )\n      WRITE( NOUT, FMT = 9991 )( KB( I ), I = 1, NKB )\n      WRITE( NOUT, FMT = 9990 )( INC( I ), I = 1, NINC )\n      WRITE( NOUT, FMT = 9989 )( ALF( I ), I = 1, NALF )\n      WRITE( NOUT, FMT = 9988 )( BET( I ), I = 1, NBET )\n      IF( .NOT.TSTERR )THEN\n         WRITE( NOUT, FMT = * )\n         WRITE( NOUT, FMT = 9980 )\n      END IF\n      WRITE( NOUT, FMT = * )\n      WRITE( NOUT, FMT = 9999 )THRESH\n      WRITE( NOUT, FMT = * )\n*\n*     Read names of subroutines and flags which indicate\n*     whether they are to be tested.\n*\n      DO 40 I = 1, NSUBS\n         LTEST( I ) = .FALSE.\n   40 CONTINUE\n   50 READ( NIN, FMT = 9984, END = 80 )SNAMET, LTESTT\n      DO 60 I = 1, NSUBS\n         IF( SNAMET.EQ.SNAMES( I ) )\n     $      GO TO 70\n   60 CONTINUE\n      WRITE( NOUT, FMT = 9986 )SNAMET\n      STOP\n   70 LTEST( I ) = LTESTT\n      GO TO 50\n*\n   80 CONTINUE\n      CLOSE ( NIN )\n*\n*     Compute EPS (the machine precision).\n*\n      EPS = EPSILON(RZERO)\n      WRITE( NOUT, FMT = 9998 )EPS\n*\n*     Check the reliability of CMVCH using exact data.\n*\n      N = MIN( 32, NMAX )\n      DO 120 J = 1, N\n         DO 110 I = 1, N\n            A( I, J ) = MAX( I - J + 1, 0 )\n  110    CONTINUE\n         X( J ) = J\n         Y( J ) = ZERO\n  120 CONTINUE\n      DO 130 J = 1, N\n         YY( J ) = J*( ( J + 1 )*J )/2 - ( ( J + 1 )*J*( J - 1 ) )/3\n  130 CONTINUE\n*     YY holds the exact result. On exit from CMVCH YT holds\n*     the result computed by CMVCH.\n      TRANS = 'N'\n      CALL CMVCH( TRANS, N, N, ONE, A, NMAX, X, 1, ZERO, Y, 1, YT, G,\n     $            YY, EPS, ERR, FATAL, NOUT, .TRUE. )\n      SAME = LCE( YY, YT, N )\n      IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN\n         WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR\n         STOP\n      END IF\n      TRANS = 'T'\n      CALL CMVCH( TRANS, N, N, ONE, A, NMAX, X, -1, ZERO, Y, -1, YT, G,\n     $            YY, EPS, ERR, FATAL, NOUT, .TRUE. )\n      SAME = LCE( YY, YT, N )\n      IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN\n         WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR\n         STOP\n      END IF\n*\n*     Test each subroutine in turn.\n*\n      DO 210 ISNUM = 1, NSUBS\n         WRITE( NOUT, FMT = * )\n         IF( .NOT.LTEST( ISNUM ) )THEN\n*           Subprogram is not to be tested.\n            WRITE( NOUT, FMT = 9983 )SNAMES( ISNUM )\n         ELSE\n            SRNAMT = SNAMES( ISNUM )\n*           Test error exits.\n            IF( TSTERR )THEN\n               CALL CCHKE( ISNUM, SNAMES( ISNUM ), NOUT )\n               WRITE( NOUT, FMT = * )\n            END IF\n*           Test computations.\n            INFOT = 0\n            OK = .TRUE.\n            FATAL = .FALSE.\n            GO TO ( 140, 140, 150, 150, 150, 160, 160,\n     $              160, 160, 160, 160, 170, 170, 180,\n     $              180, 190, 190 )ISNUM\n*           Test CGEMV, 01, and CGBMV, 02.\n  140       CALL CCHK1( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NKB, KB, NALF, ALF,\n     $                  NBET, BET, NINC, INC, NMAX, INCMAX, A, AA, AS,\n     $                  X, XX, XS, Y, YY, YS, YT, G )\n            GO TO 200\n*           Test CHEMV, 03, CHBMV, 04, and CHPMV, 05.\n  150       CALL CCHK2( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NKB, KB, NALF, ALF,\n     $                  NBET, BET, NINC, INC, NMAX, INCMAX, A, AA, AS,\n     $                  X, XX, XS, Y, YY, YS, YT, G )\n            GO TO 200\n*           Test CTRMV, 06, CTBMV, 07, CTPMV, 08,\n*           CTRSV, 09, CTBSV, 10, and CTPSV, 11.\n  160       CALL CCHK3( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NKB, KB, NINC, INC,\n     $                  NMAX, INCMAX, A, AA, AS, Y, YY, YS, YT, G, Z )\n            GO TO 200\n*           Test CGERC, 12, CGERU, 13.\n  170       CALL CCHK4( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NALF, ALF, NINC, INC,\n     $                  NMAX, INCMAX, A, AA, AS, X, XX, XS, Y, YY, YS,\n     $                  YT, G, Z )\n            GO TO 200\n*           Test CHER, 14, and CHPR, 15.\n  180       CALL CCHK5( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NALF, ALF, NINC, INC,\n     $                  NMAX, INCMAX, A, AA, AS, X, XX, XS, Y, YY, YS,\n     $                  YT, G, Z )\n            GO TO 200\n*           Test CHER2, 16, and CHPR2, 17.\n  190       CALL CCHK6( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NALF, ALF, NINC, INC,\n     $                  NMAX, INCMAX, A, AA, AS, X, XX, XS, Y, YY, YS,\n     $                  YT, G, Z )\n*\n  200       IF( FATAL.AND.SFATAL )\n     $         GO TO 220\n         END IF\n  210 CONTINUE\n      WRITE( NOUT, FMT = 9982 )\n      GO TO 240\n*\n  220 CONTINUE\n      WRITE( NOUT, FMT = 9981 )\n      GO TO 240\n*\n  230 CONTINUE\n      WRITE( NOUT, FMT = 9987 )\n*\n  240 CONTINUE\n      IF( TRACE )\n     $   CLOSE ( NTRA )\n      CLOSE ( NOUT )\n      STOP\n*\n 9999 FORMAT( ' ROUTINES PASS COMPUTATIONAL TESTS IF TEST RATIO IS LES',\n     $      'S THAN', F8.2 )\n 9998 FORMAT( ' RELATIVE MACHINE PRECISION IS TAKEN TO BE', 1P, E9.1 )\n 9997 FORMAT( ' NUMBER OF VALUES OF ', A, ' IS LESS THAN 1 OR GREATER ',\n     $      'THAN ', I2 )\n 9996 FORMAT( ' VALUE OF N IS LESS THAN 0 OR GREATER THAN ', I2 )\n 9995 FORMAT( ' VALUE OF K IS LESS THAN 0' )\n 9994 FORMAT( ' ABSOLUTE VALUE OF INCX OR INCY IS 0 OR GREATER THAN ',\n     $      I2 )\n 9993 FORMAT( ' TESTS OF THE COMPLEX          LEVEL 2 BLAS', //' THE F',\n     $      'OLLOWING PARAMETER VALUES WILL BE USED:' )\n 9992 FORMAT( '   FOR N              ', 9I6 )\n 9991 FORMAT( '   FOR K              ', 7I6 )\n 9990 FORMAT( '   FOR INCX AND INCY  ', 7I6 )\n 9989 FORMAT( '   FOR ALPHA          ',\n     $      7( '(', F4.1, ',', F4.1, ')  ', : ) )\n 9988 FORMAT( '   FOR BETA           ',\n     $      7( '(', F4.1, ',', F4.1, ')  ', : ) )\n 9987 FORMAT( ' AMEND DATA FILE OR INCREASE ARRAY SIZES IN PROGRAM',\n     $      /' ******* TESTS ABANDONED *******' )\n 9986 FORMAT( ' SUBPROGRAM NAME ', A6, ' NOT RECOGNIZED', /' ******* T',\n     $      'ESTS ABANDONED *******' )\n 9985 FORMAT( ' ERROR IN CMVCH -  IN-LINE DOT PRODUCTS ARE BEING EVALU',\n     $      'ATED WRONGLY.', /' CMVCH WAS CALLED WITH TRANS = ', A1,\n     $      ' AND RETURNED SAME = ', L1, ' AND ERR = ', F12.3, '.', /\n     $   ' THIS MAY BE DUE TO FAULTS IN THE ARITHMETIC OR THE COMPILER.'\n     $      , /' ******* TESTS ABANDONED *******' )\n 9984 FORMAT( A6, L2 )\n 9983 FORMAT( 1X, A6, ' WAS NOT TESTED' )\n 9982 FORMAT( /' END OF TESTS' )\n 9981 FORMAT( /' ******* FATAL ERROR - TESTS ABANDONED *******' )\n 9980 FORMAT( ' ERROR-EXITS WILL NOT BE TESTED' )\n*\n*     End of CBLAT2.\n*\n      END\n      SUBROUTINE CCHK1( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NKB, KB, NALF, ALF, NBET,\n     $                  BET, NINC, INC, NMAX, INCMAX, A, AA, AS, X, XX,\n     $                  XS, Y, YY, YS, YT, G )\n*\n*  Tests CGEMV and CGBMV.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Parameters ..\n      COMPLEX            ZERO, HALF\n      PARAMETER          ( ZERO = ( 0.0, 0.0 ), HALF = ( 0.5, 0.0 ) )\n      REAL               RZERO\n      PARAMETER          ( RZERO = 0.0 )\n*     .. Scalar Arguments ..\n      REAL               EPS, THRESH\n      INTEGER            INCMAX, NALF, NBET, NIDIM, NINC, NKB, NMAX,\n     $                   NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      COMPLEX            A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),\n     $                   AS( NMAX*NMAX ), BET( NBET ), X( NMAX ),\n     $                   XS( NMAX*INCMAX ), XX( NMAX*INCMAX ),\n     $                   Y( NMAX ), YS( NMAX*INCMAX ), YT( NMAX ),\n     $                   YY( NMAX*INCMAX )\n      REAL               G( NMAX )\n      INTEGER            IDIM( NIDIM ), INC( NINC ), KB( NKB )\n*     .. Local Scalars ..\n      COMPLEX            ALPHA, ALS, BETA, BLS, TRANSL\n      REAL               ERR, ERRMAX\n      INTEGER            I, IA, IB, IC, IKU, IM, IN, INCX, INCXS, INCY,\n     $                   INCYS, IX, IY, KL, KLS, KU, KUS, LAA, LDA,\n     $                   LDAS, LX, LY, M, ML, MS, N, NARGS, NC, ND, NK,\n     $                   NL, NS\n      LOGICAL            BANDED, FULL, NULL, RESET, SAME, TRAN\n      CHARACTER*1        TRANS, TRANSS\n      CHARACTER*3        ICH\n*     .. Local Arrays ..\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LCE, LCERES\n      EXTERNAL           LCE, LCERES\n*     .. External Subroutines ..\n      EXTERNAL           CGBMV, CGEMV, CMAKE, CMVCH\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, MAX, MIN\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICH/'NTC'/\n*     .. Executable Statements ..\n      FULL = SNAME( 3: 3 ).EQ.'E'\n      BANDED = SNAME( 3: 3 ).EQ.'B'\n*     Define the number of arguments.\n      IF( FULL )THEN\n         NARGS = 11\n      ELSE IF( BANDED )THEN\n         NARGS = 13\n      END IF\n*\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = RZERO\n*\n      DO 120 IN = 1, NIDIM\n         N = IDIM( IN )\n         ND = N/2 + 1\n*\n         DO 110 IM = 1, 2\n            IF( IM.EQ.1 )\n     $         M = MAX( N - ND, 0 )\n            IF( IM.EQ.2 )\n     $         M = MIN( N + ND, NMAX )\n*\n            IF( BANDED )THEN\n               NK = NKB\n            ELSE\n               NK = 1\n            END IF\n            DO 100 IKU = 1, NK\n               IF( BANDED )THEN\n                  KU = KB( IKU )\n                  KL = MAX( KU - 1, 0 )\n               ELSE\n                  KU = N - 1\n                  KL = M - 1\n               END IF\n*              Set LDA to 1 more than minimum value if room.\n               IF( BANDED )THEN\n                  LDA = KL + KU + 1\n               ELSE\n                  LDA = M\n               END IF\n               IF( LDA.LT.NMAX )\n     $            LDA = LDA + 1\n*              Skip tests if not enough room.\n               IF( LDA.GT.NMAX )\n     $            GO TO 100\n               LAA = LDA*N\n               NULL = N.LE.0.OR.M.LE.0\n*\n*              Generate the matrix A.\n*\n               TRANSL = ZERO\n               CALL CMAKE( SNAME( 2: 3 ), ' ', ' ', M, N, A, NMAX, AA,\n     $                     LDA, KL, KU, RESET, TRANSL )\n*\n               DO 90 IC = 1, 3\n                  TRANS = ICH( IC: IC )\n                  TRAN = TRANS.EQ.'T'.OR.TRANS.EQ.'C'\n*\n                  IF( TRAN )THEN\n                     ML = N\n                     NL = M\n                  ELSE\n                     ML = M\n                     NL = N\n                  END IF\n*\n                  DO 80 IX = 1, NINC\n                     INCX = INC( IX )\n                     LX = ABS( INCX )*NL\n*\n*                    Generate the vector X.\n*\n                     TRANSL = HALF\n                     CALL CMAKE( 'GE', ' ', ' ', 1, NL, X, 1, XX,\n     $                           ABS( INCX ), 0, NL - 1, RESET, TRANSL )\n                     IF( NL.GT.1 )THEN\n                        X( NL/2 ) = ZERO\n                        XX( 1 + ABS( INCX )*( NL/2 - 1 ) ) = ZERO\n                     END IF\n*\n                     DO 70 IY = 1, NINC\n                        INCY = INC( IY )\n                        LY = ABS( INCY )*ML\n*\n                        DO 60 IA = 1, NALF\n                           ALPHA = ALF( IA )\n*\n                           DO 50 IB = 1, NBET\n                              BETA = BET( IB )\n*\n*                             Generate the vector Y.\n*\n                              TRANSL = ZERO\n                              CALL CMAKE( 'GE', ' ', ' ', 1, ML, Y, 1,\n     $                                    YY, ABS( INCY ), 0, ML - 1,\n     $                                    RESET, TRANSL )\n*\n                              NC = NC + 1\n*\n*                             Save every datum before calling the\n*                             subroutine.\n*\n                              TRANSS = TRANS\n                              MS = M\n                              NS = N\n                              KLS = KL\n                              KUS = KU\n                              ALS = ALPHA\n                              DO 10 I = 1, LAA\n                                 AS( I ) = AA( I )\n   10                         CONTINUE\n                              LDAS = LDA\n                              DO 20 I = 1, LX\n                                 XS( I ) = XX( I )\n   20                         CONTINUE\n                              INCXS = INCX\n                              BLS = BETA\n                              DO 30 I = 1, LY\n                                 YS( I ) = YY( I )\n   30                         CONTINUE\n                              INCYS = INCY\n*\n*                             Call the subroutine.\n*\n                              IF( FULL )THEN\n                                 IF( TRACE )\n     $                              WRITE( NTRA, FMT = 9994 )NC, SNAME,\n     $                              TRANS, M, N, ALPHA, LDA, INCX, BETA,\n     $                              INCY\n                                 IF( REWI )\n     $                              REWIND NTRA\n                                 CALL CGEMV( TRANS, M, N, ALPHA, AA,\n     $                                       LDA, XX, INCX, BETA, YY,\n     $                                       INCY )\n                              ELSE IF( BANDED )THEN\n                                 IF( TRACE )\n     $                              WRITE( NTRA, FMT = 9995 )NC, SNAME,\n     $                              TRANS, M, N, KL, KU, ALPHA, LDA,\n     $                              INCX, BETA, INCY\n                                 IF( REWI )\n     $                              REWIND NTRA\n                                 CALL CGBMV( TRANS, M, N, KL, KU, ALPHA,\n     $                                       AA, LDA, XX, INCX, BETA,\n     $                                       YY, INCY )\n                              END IF\n*\n*                             Check if error-exit was taken incorrectly.\n*\n                              IF( .NOT.OK )THEN\n                                 WRITE( NOUT, FMT = 9993 )\n                                 FATAL = .TRUE.\n                                 GO TO 130\n                              END IF\n*\n*                             See what data changed inside subroutines.\n*\n                              ISAME( 1 ) = TRANS.EQ.TRANSS\n                              ISAME( 2 ) = MS.EQ.M\n                              ISAME( 3 ) = NS.EQ.N\n                              IF( FULL )THEN\n                                 ISAME( 4 ) = ALS.EQ.ALPHA\n                                 ISAME( 5 ) = LCE( AS, AA, LAA )\n                                 ISAME( 6 ) = LDAS.EQ.LDA\n                                 ISAME( 7 ) = LCE( XS, XX, LX )\n                                 ISAME( 8 ) = INCXS.EQ.INCX\n                                 ISAME( 9 ) = BLS.EQ.BETA\n                                 IF( NULL )THEN\n                                    ISAME( 10 ) = LCE( YS, YY, LY )\n                                 ELSE\n                                    ISAME( 10 ) = LCERES( 'GE', ' ', 1,\n     $                                            ML, YS, YY,\n     $                                            ABS( INCY ) )\n                                 END IF\n                                 ISAME( 11 ) = INCYS.EQ.INCY\n                              ELSE IF( BANDED )THEN\n                                 ISAME( 4 ) = KLS.EQ.KL\n                                 ISAME( 5 ) = KUS.EQ.KU\n                                 ISAME( 6 ) = ALS.EQ.ALPHA\n                                 ISAME( 7 ) = LCE( AS, AA, LAA )\n                                 ISAME( 8 ) = LDAS.EQ.LDA\n                                 ISAME( 9 ) = LCE( XS, XX, LX )\n                                 ISAME( 10 ) = INCXS.EQ.INCX\n                                 ISAME( 11 ) = BLS.EQ.BETA\n                                 IF( NULL )THEN\n                                    ISAME( 12 ) = LCE( YS, YY, LY )\n                                 ELSE\n                                    ISAME( 12 ) = LCERES( 'GE', ' ', 1,\n     $                                            ML, YS, YY,\n     $                                            ABS( INCY ) )\n                                 END IF\n                                 ISAME( 13 ) = INCYS.EQ.INCY\n                              END IF\n*\n*                             If data was incorrectly changed, report\n*                             and return.\n*\n                              SAME = .TRUE.\n                              DO 40 I = 1, NARGS\n                                 SAME = SAME.AND.ISAME( I )\n                                 IF( .NOT.ISAME( I ) )\n     $                              WRITE( NOUT, FMT = 9998 )I\n   40                         CONTINUE\n                              IF( .NOT.SAME )THEN\n                                 FATAL = .TRUE.\n                                 GO TO 130\n                              END IF\n*\n                              IF( .NOT.NULL )THEN\n*\n*                                Check the result.\n*\n                                 CALL CMVCH( TRANS, M, N, ALPHA, A,\n     $                                       NMAX, X, INCX, BETA, Y,\n     $                                       INCY, YT, G, YY, EPS, ERR,\n     $                                       FATAL, NOUT, .TRUE. )\n                                 ERRMAX = MAX( ERRMAX, ERR )\n*                                If got really bad answer, report and\n*                                return.\n                                 IF( FATAL )\n     $                              GO TO 130\n                              ELSE\n*                                Avoid repeating tests with M.le.0 or\n*                                N.le.0.\n                                 GO TO 110\n                              END IF\n*\n   50                      CONTINUE\n*\n   60                   CONTINUE\n*\n   70                CONTINUE\n*\n   80             CONTINUE\n*\n   90          CONTINUE\n*\n  100       CONTINUE\n*\n  110    CONTINUE\n*\n  120 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 140\n*\n  130 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      IF( FULL )THEN\n         WRITE( NOUT, FMT = 9994 )NC, SNAME, TRANS, M, N, ALPHA, LDA,\n     $      INCX, BETA, INCY\n      ELSE IF( BANDED )THEN\n         WRITE( NOUT, FMT = 9995 )NC, SNAME, TRANS, M, N, KL, KU,\n     $      ALPHA, LDA, INCX, BETA, INCY\n      END IF\n*\n  140 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',', 4( I3, ',' ), '(',\n     $      F4.1, ',', F4.1, '), A,', I3, ', X,', I2, ',(', F4.1, ',',\n     $      F4.1, '), Y,', I2, ') .' )\n 9994 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',', 2( I3, ',' ), '(',\n     $      F4.1, ',', F4.1, '), A,', I3, ', X,', I2, ',(', F4.1, ',',\n     $      F4.1, '), Y,', I2, ')         .' )\n 9993 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of CCHK1.\n*\n      END\n      SUBROUTINE CCHK2( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NKB, KB, NALF, ALF, NBET,\n     $                  BET, NINC, INC, NMAX, INCMAX, A, AA, AS, X, XX,\n     $                  XS, Y, YY, YS, YT, G )\n*\n*  Tests CHEMV, CHBMV and CHPMV.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Parameters ..\n      COMPLEX            ZERO, HALF\n      PARAMETER          ( ZERO = ( 0.0, 0.0 ), HALF = ( 0.5, 0.0 ) )\n      REAL               RZERO\n      PARAMETER          ( RZERO = 0.0 )\n*     .. Scalar Arguments ..\n      REAL               EPS, THRESH\n      INTEGER            INCMAX, NALF, NBET, NIDIM, NINC, NKB, NMAX,\n     $                   NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      COMPLEX            A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),\n     $                   AS( NMAX*NMAX ), BET( NBET ), X( NMAX ),\n     $                   XS( NMAX*INCMAX ), XX( NMAX*INCMAX ),\n     $                   Y( NMAX ), YS( NMAX*INCMAX ), YT( NMAX ),\n     $                   YY( NMAX*INCMAX )\n      REAL               G( NMAX )\n      INTEGER            IDIM( NIDIM ), INC( NINC ), KB( NKB )\n*     .. Local Scalars ..\n      COMPLEX            ALPHA, ALS, BETA, BLS, TRANSL\n      REAL               ERR, ERRMAX\n      INTEGER            I, IA, IB, IC, IK, IN, INCX, INCXS, INCY,\n     $                   INCYS, IX, IY, K, KS, LAA, LDA, LDAS, LX, LY,\n     $                   N, NARGS, NC, NK, NS\n      LOGICAL            BANDED, FULL, NULL, PACKED, RESET, SAME\n      CHARACTER*1        UPLO, UPLOS\n      CHARACTER*2        ICH\n*     .. Local Arrays ..\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LCE, LCERES\n      EXTERNAL           LCE, LCERES\n*     .. External Subroutines ..\n      EXTERNAL           CHBMV, CHEMV, CHPMV, CMAKE, CMVCH\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, MAX\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICH/'UL'/\n*     .. Executable Statements ..\n      FULL = SNAME( 3: 3 ).EQ.'E'\n      BANDED = SNAME( 3: 3 ).EQ.'B'\n      PACKED = SNAME( 3: 3 ).EQ.'P'\n*     Define the number of arguments.\n      IF( FULL )THEN\n         NARGS = 10\n      ELSE IF( BANDED )THEN\n         NARGS = 11\n      ELSE IF( PACKED )THEN\n         NARGS = 9\n      END IF\n*\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = RZERO\n*\n      DO 110 IN = 1, NIDIM\n         N = IDIM( IN )\n*\n         IF( BANDED )THEN\n            NK = NKB\n         ELSE\n            NK = 1\n         END IF\n         DO 100 IK = 1, NK\n            IF( BANDED )THEN\n               K = KB( IK )\n            ELSE\n               K = N - 1\n            END IF\n*           Set LDA to 1 more than minimum value if room.\n            IF( BANDED )THEN\n               LDA = K + 1\n            ELSE\n               LDA = N\n            END IF\n            IF( LDA.LT.NMAX )\n     $         LDA = LDA + 1\n*           Skip tests if not enough room.\n            IF( LDA.GT.NMAX )\n     $         GO TO 100\n            IF( PACKED )THEN\n               LAA = ( N*( N + 1 ) )/2\n            ELSE\n               LAA = LDA*N\n            END IF\n            NULL = N.LE.0\n*\n            DO 90 IC = 1, 2\n               UPLO = ICH( IC: IC )\n*\n*              Generate the matrix A.\n*\n               TRANSL = ZERO\n               CALL CMAKE( SNAME( 2: 3 ), UPLO, ' ', N, N, A, NMAX, AA,\n     $                     LDA, K, K, RESET, TRANSL )\n*\n               DO 80 IX = 1, NINC\n                  INCX = INC( IX )\n                  LX = ABS( INCX )*N\n*\n*                 Generate the vector X.\n*\n                  TRANSL = HALF\n                  CALL CMAKE( 'GE', ' ', ' ', 1, N, X, 1, XX,\n     $                        ABS( INCX ), 0, N - 1, RESET, TRANSL )\n                  IF( N.GT.1 )THEN\n                     X( N/2 ) = ZERO\n                     XX( 1 + ABS( INCX )*( N/2 - 1 ) ) = ZERO\n                  END IF\n*\n                  DO 70 IY = 1, NINC\n                     INCY = INC( IY )\n                     LY = ABS( INCY )*N\n*\n                     DO 60 IA = 1, NALF\n                        ALPHA = ALF( IA )\n*\n                        DO 50 IB = 1, NBET\n                           BETA = BET( IB )\n*\n*                          Generate the vector Y.\n*\n                           TRANSL = ZERO\n                           CALL CMAKE( 'GE', ' ', ' ', 1, N, Y, 1, YY,\n     $                                 ABS( INCY ), 0, N - 1, RESET,\n     $                                 TRANSL )\n*\n                           NC = NC + 1\n*\n*                          Save every datum before calling the\n*                          subroutine.\n*\n                           UPLOS = UPLO\n                           NS = N\n                           KS = K\n                           ALS = ALPHA\n                           DO 10 I = 1, LAA\n                              AS( I ) = AA( I )\n   10                      CONTINUE\n                           LDAS = LDA\n                           DO 20 I = 1, LX\n                              XS( I ) = XX( I )\n   20                      CONTINUE\n                           INCXS = INCX\n                           BLS = BETA\n                           DO 30 I = 1, LY\n                              YS( I ) = YY( I )\n   30                      CONTINUE\n                           INCYS = INCY\n*\n*                          Call the subroutine.\n*\n                           IF( FULL )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9993 )NC, SNAME,\n     $                           UPLO, N, ALPHA, LDA, INCX, BETA, INCY\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL CHEMV( UPLO, N, ALPHA, AA, LDA, XX,\n     $                                    INCX, BETA, YY, INCY )\n                           ELSE IF( BANDED )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9994 )NC, SNAME,\n     $                           UPLO, N, K, ALPHA, LDA, INCX, BETA,\n     $                           INCY\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL CHBMV( UPLO, N, K, ALPHA, AA, LDA,\n     $                                    XX, INCX, BETA, YY, INCY )\n                           ELSE IF( PACKED )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9995 )NC, SNAME,\n     $                           UPLO, N, ALPHA, INCX, BETA, INCY\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL CHPMV( UPLO, N, ALPHA, AA, XX, INCX,\n     $                                    BETA, YY, INCY )\n                           END IF\n*\n*                          Check if error-exit was taken incorrectly.\n*\n                           IF( .NOT.OK )THEN\n                              WRITE( NOUT, FMT = 9992 )\n                              FATAL = .TRUE.\n                              GO TO 120\n                           END IF\n*\n*                          See what data changed inside subroutines.\n*\n                           ISAME( 1 ) = UPLO.EQ.UPLOS\n                           ISAME( 2 ) = NS.EQ.N\n                           IF( FULL )THEN\n                              ISAME( 3 ) = ALS.EQ.ALPHA\n                              ISAME( 4 ) = LCE( AS, AA, LAA )\n                              ISAME( 5 ) = LDAS.EQ.LDA\n                              ISAME( 6 ) = LCE( XS, XX, LX )\n                              ISAME( 7 ) = INCXS.EQ.INCX\n                              ISAME( 8 ) = BLS.EQ.BETA\n                              IF( NULL )THEN\n                                 ISAME( 9 ) = LCE( YS, YY, LY )\n                              ELSE\n                                 ISAME( 9 ) = LCERES( 'GE', ' ', 1, N,\n     $                                        YS, YY, ABS( INCY ) )\n                              END IF\n                              ISAME( 10 ) = INCYS.EQ.INCY\n                           ELSE IF( BANDED )THEN\n                              ISAME( 3 ) = KS.EQ.K\n                              ISAME( 4 ) = ALS.EQ.ALPHA\n                              ISAME( 5 ) = LCE( AS, AA, LAA )\n                              ISAME( 6 ) = LDAS.EQ.LDA\n                              ISAME( 7 ) = LCE( XS, XX, LX )\n                              ISAME( 8 ) = INCXS.EQ.INCX\n                              ISAME( 9 ) = BLS.EQ.BETA\n                              IF( NULL )THEN\n                                 ISAME( 10 ) = LCE( YS, YY, LY )\n                              ELSE\n                                 ISAME( 10 ) = LCERES( 'GE', ' ', 1, N,\n     $                                         YS, YY, ABS( INCY ) )\n                              END IF\n                              ISAME( 11 ) = INCYS.EQ.INCY\n                           ELSE IF( PACKED )THEN\n                              ISAME( 3 ) = ALS.EQ.ALPHA\n                              ISAME( 4 ) = LCE( AS, AA, LAA )\n                              ISAME( 5 ) = LCE( XS, XX, LX )\n                              ISAME( 6 ) = INCXS.EQ.INCX\n                              ISAME( 7 ) = BLS.EQ.BETA\n                              IF( NULL )THEN\n                                 ISAME( 8 ) = LCE( YS, YY, LY )\n                              ELSE\n                                 ISAME( 8 ) = LCERES( 'GE', ' ', 1, N,\n     $                                        YS, YY, ABS( INCY ) )\n                              END IF\n                              ISAME( 9 ) = INCYS.EQ.INCY\n                           END IF\n*\n*                          If data was incorrectly changed, report and\n*                          return.\n*\n                           SAME = .TRUE.\n                           DO 40 I = 1, NARGS\n                              SAME = SAME.AND.ISAME( I )\n                              IF( .NOT.ISAME( I ) )\n     $                           WRITE( NOUT, FMT = 9998 )I\n   40                      CONTINUE\n                           IF( .NOT.SAME )THEN\n                              FATAL = .TRUE.\n                              GO TO 120\n                           END IF\n*\n                           IF( .NOT.NULL )THEN\n*\n*                             Check the result.\n*\n                              CALL CMVCH( 'N', N, N, ALPHA, A, NMAX, X,\n     $                                    INCX, BETA, Y, INCY, YT, G,\n     $                                    YY, EPS, ERR, FATAL, NOUT,\n     $                                    .TRUE. )\n                              ERRMAX = MAX( ERRMAX, ERR )\n*                             If got really bad answer, report and\n*                             return.\n                              IF( FATAL )\n     $                           GO TO 120\n                           ELSE\n*                             Avoid repeating tests with N.le.0\n                              GO TO 110\n                           END IF\n*\n   50                   CONTINUE\n*\n   60                CONTINUE\n*\n   70             CONTINUE\n*\n   80          CONTINUE\n*\n   90       CONTINUE\n*\n  100    CONTINUE\n*\n  110 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 130\n*\n  120 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      IF( FULL )THEN\n         WRITE( NOUT, FMT = 9993 )NC, SNAME, UPLO, N, ALPHA, LDA, INCX,\n     $      BETA, INCY\n      ELSE IF( BANDED )THEN\n         WRITE( NOUT, FMT = 9994 )NC, SNAME, UPLO, N, K, ALPHA, LDA,\n     $      INCX, BETA, INCY\n      ELSE IF( PACKED )THEN\n         WRITE( NOUT, FMT = 9995 )NC, SNAME, UPLO, N, ALPHA, INCX,\n     $      BETA, INCY\n      END IF\n*\n  130 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',', I3, ',(', F4.1, ',',\n     $      F4.1, '), AP, X,', I2, ',(', F4.1, ',', F4.1, '), Y,', I2,\n     $      ')                .' )\n 9994 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',', 2( I3, ',' ), '(',\n     $      F4.1, ',', F4.1, '), A,', I3, ', X,', I2, ',(', F4.1, ',',\n     $      F4.1, '), Y,', I2, ')         .' )\n 9993 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',', I3, ',(', F4.1, ',',\n     $      F4.1, '), A,', I3, ', X,', I2, ',(', F4.1, ',', F4.1, '), ',\n     $      'Y,', I2, ')             .' )\n 9992 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of CCHK2.\n*\n      END\n      SUBROUTINE CCHK3( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NKB, KB, NINC, INC, NMAX,\n     $                  INCMAX, A, AA, AS, X, XX, XS, XT, G, Z )\n*\n*  Tests CTRMV, CTBMV, CTPMV, CTRSV, CTBSV and CTPSV.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Parameters ..\n      COMPLEX            ZERO, HALF, ONE\n      PARAMETER          ( ZERO = ( 0.0, 0.0 ), HALF = ( 0.5, 0.0 ),\n     $                   ONE = ( 1.0, 0.0 ) )\n      REAL               RZERO\n      PARAMETER          ( RZERO = 0.0 )\n*     .. Scalar Arguments ..\n      REAL               EPS, THRESH\n      INTEGER            INCMAX, NIDIM, NINC, NKB, NMAX, NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      COMPLEX            A( NMAX, NMAX ), AA( NMAX*NMAX ),\n     $                   AS( NMAX*NMAX ), X( NMAX ), XS( NMAX*INCMAX ),\n     $                   XT( NMAX ), XX( NMAX*INCMAX ), Z( NMAX )\n      REAL               G( NMAX )\n      INTEGER            IDIM( NIDIM ), INC( NINC ), KB( NKB )\n*     .. Local Scalars ..\n      COMPLEX            TRANSL\n      REAL               ERR, ERRMAX\n      INTEGER            I, ICD, ICT, ICU, IK, IN, INCX, INCXS, IX, K,\n     $                   KS, LAA, LDA, LDAS, LX, N, NARGS, NC, NK, NS\n      LOGICAL            BANDED, FULL, NULL, PACKED, RESET, SAME\n      CHARACTER*1        DIAG, DIAGS, TRANS, TRANSS, UPLO, UPLOS\n      CHARACTER*2        ICHD, ICHU\n      CHARACTER*3        ICHT\n*     .. Local Arrays ..\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LCE, LCERES\n      EXTERNAL           LCE, LCERES\n*     .. External Subroutines ..\n      EXTERNAL           CMAKE, CMVCH, CTBMV, CTBSV, CTPMV, CTPSV,\n     $                   CTRMV, CTRSV\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, MAX\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICHU/'UL'/, ICHT/'NTC'/, ICHD/'UN'/\n*     .. Executable Statements ..\n      FULL = SNAME( 3: 3 ).EQ.'R'\n      BANDED = SNAME( 3: 3 ).EQ.'B'\n      PACKED = SNAME( 3: 3 ).EQ.'P'\n*     Define the number of arguments.\n      IF( FULL )THEN\n         NARGS = 8\n      ELSE IF( BANDED )THEN\n         NARGS = 9\n      ELSE IF( PACKED )THEN\n         NARGS = 7\n      END IF\n*\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = RZERO\n*     Set up zero vector for CMVCH.\n      DO 10 I = 1, NMAX\n         Z( I ) = ZERO\n   10 CONTINUE\n*\n      DO 110 IN = 1, NIDIM\n         N = IDIM( IN )\n*\n         IF( BANDED )THEN\n            NK = NKB\n         ELSE\n            NK = 1\n         END IF\n         DO 100 IK = 1, NK\n            IF( BANDED )THEN\n               K = KB( IK )\n            ELSE\n               K = N - 1\n            END IF\n*           Set LDA to 1 more than minimum value if room.\n            IF( BANDED )THEN\n               LDA = K + 1\n            ELSE\n               LDA = N\n            END IF\n            IF( LDA.LT.NMAX )\n     $         LDA = LDA + 1\n*           Skip tests if not enough room.\n            IF( LDA.GT.NMAX )\n     $         GO TO 100\n            IF( PACKED )THEN\n               LAA = ( N*( N + 1 ) )/2\n            ELSE\n               LAA = LDA*N\n            END IF\n            NULL = N.LE.0\n*\n            DO 90 ICU = 1, 2\n               UPLO = ICHU( ICU: ICU )\n*\n               DO 80 ICT = 1, 3\n                  TRANS = ICHT( ICT: ICT )\n*\n                  DO 70 ICD = 1, 2\n                     DIAG = ICHD( ICD: ICD )\n*\n*                    Generate the matrix A.\n*\n                     TRANSL = ZERO\n                     CALL CMAKE( SNAME( 2: 3 ), UPLO, DIAG, N, N, A,\n     $                           NMAX, AA, LDA, K, K, RESET, TRANSL )\n*\n                     DO 60 IX = 1, NINC\n                        INCX = INC( IX )\n                        LX = ABS( INCX )*N\n*\n*                       Generate the vector X.\n*\n                        TRANSL = HALF\n                        CALL CMAKE( 'GE', ' ', ' ', 1, N, X, 1, XX,\n     $                              ABS( INCX ), 0, N - 1, RESET,\n     $                              TRANSL )\n                        IF( N.GT.1 )THEN\n                           X( N/2 ) = ZERO\n                           XX( 1 + ABS( INCX )*( N/2 - 1 ) ) = ZERO\n                        END IF\n*\n                        NC = NC + 1\n*\n*                       Save every datum before calling the subroutine.\n*\n                        UPLOS = UPLO\n                        TRANSS = TRANS\n                        DIAGS = DIAG\n                        NS = N\n                        KS = K\n                        DO 20 I = 1, LAA\n                           AS( I ) = AA( I )\n   20                   CONTINUE\n                        LDAS = LDA\n                        DO 30 I = 1, LX\n                           XS( I ) = XX( I )\n   30                   CONTINUE\n                        INCXS = INCX\n*\n*                       Call the subroutine.\n*\n                        IF( SNAME( 4: 5 ).EQ.'MV' )THEN\n                           IF( FULL )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9993 )NC, SNAME,\n     $                           UPLO, TRANS, DIAG, N, LDA, INCX\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL CTRMV( UPLO, TRANS, DIAG, N, AA, LDA,\n     $                                    XX, INCX )\n                           ELSE IF( BANDED )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9994 )NC, SNAME,\n     $                           UPLO, TRANS, DIAG, N, K, LDA, INCX\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL CTBMV( UPLO, TRANS, DIAG, N, K, AA,\n     $                                    LDA, XX, INCX )\n                           ELSE IF( PACKED )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9995 )NC, SNAME,\n     $                           UPLO, TRANS, DIAG, N, INCX\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL CTPMV( UPLO, TRANS, DIAG, N, AA, XX,\n     $                                    INCX )\n                           END IF\n                        ELSE IF( SNAME( 4: 5 ).EQ.'SV' )THEN\n                           IF( FULL )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9993 )NC, SNAME,\n     $                           UPLO, TRANS, DIAG, N, LDA, INCX\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL CTRSV( UPLO, TRANS, DIAG, N, AA, LDA,\n     $                                    XX, INCX )\n                           ELSE IF( BANDED )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9994 )NC, SNAME,\n     $                           UPLO, TRANS, DIAG, N, K, LDA, INCX\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL CTBSV( UPLO, TRANS, DIAG, N, K, AA,\n     $                                    LDA, XX, INCX )\n                           ELSE IF( PACKED )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9995 )NC, SNAME,\n     $                           UPLO, TRANS, DIAG, N, INCX\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL CTPSV( UPLO, TRANS, DIAG, N, AA, XX,\n     $                                    INCX )\n                           END IF\n                        END IF\n*\n*                       Check if error-exit was taken incorrectly.\n*\n                        IF( .NOT.OK )THEN\n                           WRITE( NOUT, FMT = 9992 )\n                           FATAL = .TRUE.\n                           GO TO 120\n                        END IF\n*\n*                       See what data changed inside subroutines.\n*\n                        ISAME( 1 ) = UPLO.EQ.UPLOS\n                        ISAME( 2 ) = TRANS.EQ.TRANSS\n                        ISAME( 3 ) = DIAG.EQ.DIAGS\n                        ISAME( 4 ) = NS.EQ.N\n                        IF( FULL )THEN\n                           ISAME( 5 ) = LCE( AS, AA, LAA )\n                           ISAME( 6 ) = LDAS.EQ.LDA\n                           IF( NULL )THEN\n                              ISAME( 7 ) = LCE( XS, XX, LX )\n                           ELSE\n                              ISAME( 7 ) = LCERES( 'GE', ' ', 1, N, XS,\n     $                                     XX, ABS( INCX ) )\n                           END IF\n                           ISAME( 8 ) = INCXS.EQ.INCX\n                        ELSE IF( BANDED )THEN\n                           ISAME( 5 ) = KS.EQ.K\n                           ISAME( 6 ) = LCE( AS, AA, LAA )\n                           ISAME( 7 ) = LDAS.EQ.LDA\n                           IF( NULL )THEN\n                              ISAME( 8 ) = LCE( XS, XX, LX )\n                           ELSE\n                              ISAME( 8 ) = LCERES( 'GE', ' ', 1, N, XS,\n     $                                     XX, ABS( INCX ) )\n                           END IF\n                           ISAME( 9 ) = INCXS.EQ.INCX\n                        ELSE IF( PACKED )THEN\n                           ISAME( 5 ) = LCE( AS, AA, LAA )\n                           IF( NULL )THEN\n                              ISAME( 6 ) = LCE( XS, XX, LX )\n                           ELSE\n                              ISAME( 6 ) = LCERES( 'GE', ' ', 1, N, XS,\n     $                                     XX, ABS( INCX ) )\n                           END IF\n                           ISAME( 7 ) = INCXS.EQ.INCX\n                        END IF\n*\n*                       If data was incorrectly changed, report and\n*                       return.\n*\n                        SAME = .TRUE.\n                        DO 40 I = 1, NARGS\n                           SAME = SAME.AND.ISAME( I )\n                           IF( .NOT.ISAME( I ) )\n     $                        WRITE( NOUT, FMT = 9998 )I\n   40                   CONTINUE\n                        IF( .NOT.SAME )THEN\n                           FATAL = .TRUE.\n                           GO TO 120\n                        END IF\n*\n                        IF( .NOT.NULL )THEN\n                           IF( SNAME( 4: 5 ).EQ.'MV' )THEN\n*\n*                             Check the result.\n*\n                              CALL CMVCH( TRANS, N, N, ONE, A, NMAX, X,\n     $                                    INCX, ZERO, Z, INCX, XT, G,\n     $                                    XX, EPS, ERR, FATAL, NOUT,\n     $                                    .TRUE. )\n                           ELSE IF( SNAME( 4: 5 ).EQ.'SV' )THEN\n*\n*                             Compute approximation to original vector.\n*\n                              DO 50 I = 1, N\n                                 Z( I ) = XX( 1 + ( I - 1 )*\n     $                                    ABS( INCX ) )\n                                 XX( 1 + ( I - 1 )*ABS( INCX ) )\n     $                              = X( I )\n   50                         CONTINUE\n                              CALL CMVCH( TRANS, N, N, ONE, A, NMAX, Z,\n     $                                    INCX, ZERO, X, INCX, XT, G,\n     $                                    XX, EPS, ERR, FATAL, NOUT,\n     $                                    .FALSE. )\n                           END IF\n                           ERRMAX = MAX( ERRMAX, ERR )\n*                          If got really bad answer, report and return.\n                           IF( FATAL )\n     $                        GO TO 120\n                        ELSE\n*                          Avoid repeating tests with N.le.0.\n                           GO TO 110\n                        END IF\n*\n   60                CONTINUE\n*\n   70             CONTINUE\n*\n   80          CONTINUE\n*\n   90       CONTINUE\n*\n  100    CONTINUE\n*\n  110 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 130\n*\n  120 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      IF( FULL )THEN\n         WRITE( NOUT, FMT = 9993 )NC, SNAME, UPLO, TRANS, DIAG, N, LDA,\n     $      INCX\n      ELSE IF( BANDED )THEN\n         WRITE( NOUT, FMT = 9994 )NC, SNAME, UPLO, TRANS, DIAG, N, K,\n     $      LDA, INCX\n      ELSE IF( PACKED )THEN\n         WRITE( NOUT, FMT = 9995 )NC, SNAME, UPLO, TRANS, DIAG, N, INCX\n      END IF\n*\n  130 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( 1X, I6, ': ', A6, '(', 3( '''', A1, ''',' ), I3, ', AP, ',\n     $      'X,', I2, ')                                      .' )\n 9994 FORMAT( 1X, I6, ': ', A6, '(', 3( '''', A1, ''',' ), 2( I3, ',' ),\n     $      ' A,', I3, ', X,', I2, ')                               .' )\n 9993 FORMAT( 1X, I6, ': ', A6, '(', 3( '''', A1, ''',' ), I3, ', A,',\n     $      I3, ', X,', I2, ')                                   .' )\n 9992 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of CCHK3.\n*\n      END\n      SUBROUTINE CCHK4( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NALF, ALF, NINC, INC, NMAX,\n     $                  INCMAX, A, AA, AS, X, XX, XS, Y, YY, YS, YT, G,\n     $                  Z )\n*\n*  Tests CGERC and CGERU.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Parameters ..\n      COMPLEX            ZERO, HALF, ONE\n      PARAMETER          ( ZERO = ( 0.0, 0.0 ), HALF = ( 0.5, 0.0 ),\n     $                   ONE = ( 1.0, 0.0 ) )\n      REAL               RZERO\n      PARAMETER          ( RZERO = 0.0 )\n*     .. Scalar Arguments ..\n      REAL               EPS, THRESH\n      INTEGER            INCMAX, NALF, NIDIM, NINC, NMAX, NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      COMPLEX            A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),\n     $                   AS( NMAX*NMAX ), X( NMAX ), XS( NMAX*INCMAX ),\n     $                   XX( NMAX*INCMAX ), Y( NMAX ),\n     $                   YS( NMAX*INCMAX ), YT( NMAX ),\n     $                   YY( NMAX*INCMAX ), Z( NMAX )\n      REAL               G( NMAX )\n      INTEGER            IDIM( NIDIM ), INC( NINC )\n*     .. Local Scalars ..\n      COMPLEX            ALPHA, ALS, TRANSL\n      REAL               ERR, ERRMAX\n      INTEGER            I, IA, IM, IN, INCX, INCXS, INCY, INCYS, IX,\n     $                   IY, J, LAA, LDA, LDAS, LX, LY, M, MS, N, NARGS,\n     $                   NC, ND, NS\n      LOGICAL            CONJ, NULL, RESET, SAME\n*     .. Local Arrays ..\n      COMPLEX            W( 1 )\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LCE, LCERES\n      EXTERNAL           LCE, LCERES\n*     .. External Subroutines ..\n      EXTERNAL           CGERC, CGERU, CMAKE, CMVCH\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, CONJG, MAX, MIN\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Executable Statements ..\n      CONJ = SNAME( 5: 5 ).EQ.'C'\n*     Define the number of arguments.\n      NARGS = 9\n*\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = RZERO\n*\n      DO 120 IN = 1, NIDIM\n         N = IDIM( IN )\n         ND = N/2 + 1\n*\n         DO 110 IM = 1, 2\n            IF( IM.EQ.1 )\n     $         M = MAX( N - ND, 0 )\n            IF( IM.EQ.2 )\n     $         M = MIN( N + ND, NMAX )\n*\n*           Set LDA to 1 more than minimum value if room.\n            LDA = M\n            IF( LDA.LT.NMAX )\n     $         LDA = LDA + 1\n*           Skip tests if not enough room.\n            IF( LDA.GT.NMAX )\n     $         GO TO 110\n            LAA = LDA*N\n            NULL = N.LE.0.OR.M.LE.0\n*\n            DO 100 IX = 1, NINC\n               INCX = INC( IX )\n               LX = ABS( INCX )*M\n*\n*              Generate the vector X.\n*\n               TRANSL = HALF\n               CALL CMAKE( 'GE', ' ', ' ', 1, M, X, 1, XX, ABS( INCX ),\n     $                     0, M - 1, RESET, TRANSL )\n               IF( M.GT.1 )THEN\n                  X( M/2 ) = ZERO\n                  XX( 1 + ABS( INCX )*( M/2 - 1 ) ) = ZERO\n               END IF\n*\n               DO 90 IY = 1, NINC\n                  INCY = INC( IY )\n                  LY = ABS( INCY )*N\n*\n*                 Generate the vector Y.\n*\n                  TRANSL = ZERO\n                  CALL CMAKE( 'GE', ' ', ' ', 1, N, Y, 1, YY,\n     $                        ABS( INCY ), 0, N - 1, RESET, TRANSL )\n                  IF( N.GT.1 )THEN\n                     Y( N/2 ) = ZERO\n                     YY( 1 + ABS( INCY )*( N/2 - 1 ) ) = ZERO\n                  END IF\n*\n                  DO 80 IA = 1, NALF\n                     ALPHA = ALF( IA )\n*\n*                    Generate the matrix A.\n*\n                     TRANSL = ZERO\n                     CALL CMAKE( SNAME( 2: 3 ), ' ', ' ', M, N, A, NMAX,\n     $                           AA, LDA, M - 1, N - 1, RESET, TRANSL )\n*\n                     NC = NC + 1\n*\n*                    Save every datum before calling the subroutine.\n*\n                     MS = M\n                     NS = N\n                     ALS = ALPHA\n                     DO 10 I = 1, LAA\n                        AS( I ) = AA( I )\n   10                CONTINUE\n                     LDAS = LDA\n                     DO 20 I = 1, LX\n                        XS( I ) = XX( I )\n   20                CONTINUE\n                     INCXS = INCX\n                     DO 30 I = 1, LY\n                        YS( I ) = YY( I )\n   30                CONTINUE\n                     INCYS = INCY\n*\n*                    Call the subroutine.\n*\n                     IF( TRACE )\n     $                  WRITE( NTRA, FMT = 9994 )NC, SNAME, M, N,\n     $                  ALPHA, INCX, INCY, LDA\n                     IF( CONJ )THEN\n                        IF( REWI )\n     $                     REWIND NTRA\n                        CALL CGERC( M, N, ALPHA, XX, INCX, YY, INCY, AA,\n     $                              LDA )\n                     ELSE\n                        IF( REWI )\n     $                     REWIND NTRA\n                        CALL CGERU( M, N, ALPHA, XX, INCX, YY, INCY, AA,\n     $                              LDA )\n                     END IF\n*\n*                    Check if error-exit was taken incorrectly.\n*\n                     IF( .NOT.OK )THEN\n                        WRITE( NOUT, FMT = 9993 )\n                        FATAL = .TRUE.\n                        GO TO 140\n                     END IF\n*\n*                    See what data changed inside subroutine.\n*\n                     ISAME( 1 ) = MS.EQ.M\n                     ISAME( 2 ) = NS.EQ.N\n                     ISAME( 3 ) = ALS.EQ.ALPHA\n                     ISAME( 4 ) = LCE( XS, XX, LX )\n                     ISAME( 5 ) = INCXS.EQ.INCX\n                     ISAME( 6 ) = LCE( YS, YY, LY )\n                     ISAME( 7 ) = INCYS.EQ.INCY\n                     IF( NULL )THEN\n                        ISAME( 8 ) = LCE( AS, AA, LAA )\n                     ELSE\n                        ISAME( 8 ) = LCERES( 'GE', ' ', M, N, AS, AA,\n     $                               LDA )\n                     END IF\n                     ISAME( 9 ) = LDAS.EQ.LDA\n*\n*                    If data was incorrectly changed, report and return.\n*\n                     SAME = .TRUE.\n                     DO 40 I = 1, NARGS\n                        SAME = SAME.AND.ISAME( I )\n                        IF( .NOT.ISAME( I ) )\n     $                     WRITE( NOUT, FMT = 9998 )I\n   40                CONTINUE\n                     IF( .NOT.SAME )THEN\n                        FATAL = .TRUE.\n                        GO TO 140\n                     END IF\n*\n                     IF( .NOT.NULL )THEN\n*\n*                       Check the result column by column.\n*\n                        IF( INCX.GT.0 )THEN\n                           DO 50 I = 1, M\n                              Z( I ) = X( I )\n   50                      CONTINUE\n                        ELSE\n                           DO 60 I = 1, M\n                              Z( I ) = X( M - I + 1 )\n   60                      CONTINUE\n                        END IF\n                        DO 70 J = 1, N\n                           IF( INCY.GT.0 )THEN\n                              W( 1 ) = Y( J )\n                           ELSE\n                              W( 1 ) = Y( N - J + 1 )\n                           END IF\n                           IF( CONJ )\n     $                        W( 1 ) = CONJG( W( 1 ) )\n                           CALL CMVCH( 'N', M, 1, ALPHA, Z, NMAX, W, 1,\n     $                                 ONE, A( 1, J ), 1, YT, G,\n     $                                 AA( 1 + ( J - 1 )*LDA ), EPS,\n     $                                 ERR, FATAL, NOUT, .TRUE. )\n                           ERRMAX = MAX( ERRMAX, ERR )\n*                          If got really bad answer, report and return.\n                           IF( FATAL )\n     $                        GO TO 130\n   70                   CONTINUE\n                     ELSE\n*                       Avoid repeating tests with M.le.0 or N.le.0.\n                        GO TO 110\n                     END IF\n*\n   80             CONTINUE\n*\n   90          CONTINUE\n*\n  100       CONTINUE\n*\n  110    CONTINUE\n*\n  120 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 150\n*\n  130 CONTINUE\n      WRITE( NOUT, FMT = 9995 )J\n*\n  140 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      WRITE( NOUT, FMT = 9994 )NC, SNAME, M, N, ALPHA, INCX, INCY, LDA\n*\n  150 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( '      THESE ARE THE RESULTS FOR COLUMN ', I3 )\n 9994 FORMAT( 1X, I6, ': ', A6, '(', 2( I3, ',' ), '(', F4.1, ',', F4.1,\n     $      '), X,', I2, ', Y,', I2, ', A,', I3, ')                   ',\n     $      '      .' )\n 9993 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of CCHK4.\n*\n      END\n      SUBROUTINE CCHK5( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NALF, ALF, NINC, INC, NMAX,\n     $                  INCMAX, A, AA, AS, X, XX, XS, Y, YY, YS, YT, G,\n     $                  Z )\n*\n*  Tests CHER and CHPR.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Parameters ..\n      COMPLEX            ZERO, HALF, ONE\n      PARAMETER          ( ZERO = ( 0.0, 0.0 ), HALF = ( 0.5, 0.0 ),\n     $                   ONE = ( 1.0, 0.0 ) )\n      REAL               RZERO\n      PARAMETER          ( RZERO = 0.0 )\n*     .. Scalar Arguments ..\n      REAL               EPS, THRESH\n      INTEGER            INCMAX, NALF, NIDIM, NINC, NMAX, NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      COMPLEX            A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),\n     $                   AS( NMAX*NMAX ), X( NMAX ), XS( NMAX*INCMAX ),\n     $                   XX( NMAX*INCMAX ), Y( NMAX ),\n     $                   YS( NMAX*INCMAX ), YT( NMAX ),\n     $                   YY( NMAX*INCMAX ), Z( NMAX )\n      REAL               G( NMAX )\n      INTEGER            IDIM( NIDIM ), INC( NINC )\n*     .. Local Scalars ..\n      COMPLEX            ALPHA, TRANSL\n      REAL               ERR, ERRMAX, RALPHA, RALS\n      INTEGER            I, IA, IC, IN, INCX, INCXS, IX, J, JA, JJ, LAA,\n     $                   LDA, LDAS, LJ, LX, N, NARGS, NC, NS\n      LOGICAL            FULL, NULL, PACKED, RESET, SAME, UPPER\n      CHARACTER*1        UPLO, UPLOS\n      CHARACTER*2        ICH\n*     .. Local Arrays ..\n      COMPLEX            W( 1 )\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LCE, LCERES\n      EXTERNAL           LCE, LCERES\n*     .. External Subroutines ..\n      EXTERNAL           CHER, CHPR, CMAKE, CMVCH\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, CMPLX, CONJG, MAX, REAL\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICH/'UL'/\n*     .. Executable Statements ..\n      FULL = SNAME( 3: 3 ).EQ.'E'\n      PACKED = SNAME( 3: 3 ).EQ.'P'\n*     Define the number of arguments.\n      IF( FULL )THEN\n         NARGS = 7\n      ELSE IF( PACKED )THEN\n         NARGS = 6\n      END IF\n*\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = RZERO\n*\n      DO 100 IN = 1, NIDIM\n         N = IDIM( IN )\n*        Set LDA to 1 more than minimum value if room.\n         LDA = N\n         IF( LDA.LT.NMAX )\n     $      LDA = LDA + 1\n*        Skip tests if not enough room.\n         IF( LDA.GT.NMAX )\n     $      GO TO 100\n         IF( PACKED )THEN\n            LAA = ( N*( N + 1 ) )/2\n         ELSE\n            LAA = LDA*N\n         END IF\n*\n         DO 90 IC = 1, 2\n            UPLO = ICH( IC: IC )\n            UPPER = UPLO.EQ.'U'\n*\n            DO 80 IX = 1, NINC\n               INCX = INC( IX )\n               LX = ABS( INCX )*N\n*\n*              Generate the vector X.\n*\n               TRANSL = HALF\n               CALL CMAKE( 'GE', ' ', ' ', 1, N, X, 1, XX, ABS( INCX ),\n     $                     0, N - 1, RESET, TRANSL )\n               IF( N.GT.1 )THEN\n                  X( N/2 ) = ZERO\n                  XX( 1 + ABS( INCX )*( N/2 - 1 ) ) = ZERO\n               END IF\n*\n               DO 70 IA = 1, NALF\n                  RALPHA = REAL( ALF( IA ) )\n                  ALPHA = CMPLX( RALPHA, RZERO )\n                  NULL = N.LE.0.OR.RALPHA.EQ.RZERO\n*\n*                 Generate the matrix A.\n*\n                  TRANSL = ZERO\n                  CALL CMAKE( SNAME( 2: 3 ), UPLO, ' ', N, N, A, NMAX,\n     $                        AA, LDA, N - 1, N - 1, RESET, TRANSL )\n*\n                  NC = NC + 1\n*\n*                 Save every datum before calling the subroutine.\n*\n                  UPLOS = UPLO\n                  NS = N\n                  RALS = RALPHA\n                  DO 10 I = 1, LAA\n                     AS( I ) = AA( I )\n   10             CONTINUE\n                  LDAS = LDA\n                  DO 20 I = 1, LX\n                     XS( I ) = XX( I )\n   20             CONTINUE\n                  INCXS = INCX\n*\n*                 Call the subroutine.\n*\n                  IF( FULL )THEN\n                     IF( TRACE )\n     $                  WRITE( NTRA, FMT = 9993 )NC, SNAME, UPLO, N,\n     $                  RALPHA, INCX, LDA\n                     IF( REWI )\n     $                  REWIND NTRA\n                     CALL CHER( UPLO, N, RALPHA, XX, INCX, AA, LDA )\n                  ELSE IF( PACKED )THEN\n                     IF( TRACE )\n     $                  WRITE( NTRA, FMT = 9994 )NC, SNAME, UPLO, N,\n     $                  RALPHA, INCX\n                     IF( REWI )\n     $                  REWIND NTRA\n                     CALL CHPR( UPLO, N, RALPHA, XX, INCX, AA )\n                  END IF\n*\n*                 Check if error-exit was taken incorrectly.\n*\n                  IF( .NOT.OK )THEN\n                     WRITE( NOUT, FMT = 9992 )\n                     FATAL = .TRUE.\n                     GO TO 120\n                  END IF\n*\n*                 See what data changed inside subroutines.\n*\n                  ISAME( 1 ) = UPLO.EQ.UPLOS\n                  ISAME( 2 ) = NS.EQ.N\n                  ISAME( 3 ) = RALS.EQ.RALPHA\n                  ISAME( 4 ) = LCE( XS, XX, LX )\n                  ISAME( 5 ) = INCXS.EQ.INCX\n                  IF( NULL )THEN\n                     ISAME( 6 ) = LCE( AS, AA, LAA )\n                  ELSE\n                     ISAME( 6 ) = LCERES( SNAME( 2: 3 ), UPLO, N, N, AS,\n     $                            AA, LDA )\n                  END IF\n                  IF( .NOT.PACKED )THEN\n                     ISAME( 7 ) = LDAS.EQ.LDA\n                  END IF\n*\n*                 If data was incorrectly changed, report and return.\n*\n                  SAME = .TRUE.\n                  DO 30 I = 1, NARGS\n                     SAME = SAME.AND.ISAME( I )\n                     IF( .NOT.ISAME( I ) )\n     $                  WRITE( NOUT, FMT = 9998 )I\n   30             CONTINUE\n                  IF( .NOT.SAME )THEN\n                     FATAL = .TRUE.\n                     GO TO 120\n                  END IF\n*\n                  IF( .NOT.NULL )THEN\n*\n*                    Check the result column by column.\n*\n                     IF( INCX.GT.0 )THEN\n                        DO 40 I = 1, N\n                           Z( I ) = X( I )\n   40                   CONTINUE\n                     ELSE\n                        DO 50 I = 1, N\n                           Z( I ) = X( N - I + 1 )\n   50                   CONTINUE\n                     END IF\n                     JA = 1\n                     DO 60 J = 1, N\n                        W( 1 ) = CONJG( Z( J ) )\n                        IF( UPPER )THEN\n                           JJ = 1\n                           LJ = J\n                        ELSE\n                           JJ = J\n                           LJ = N - J + 1\n                        END IF\n                        CALL CMVCH( 'N', LJ, 1, ALPHA, Z( JJ ), LJ, W,\n     $                              1, ONE, A( JJ, J ), 1, YT, G,\n     $                              AA( JA ), EPS, ERR, FATAL, NOUT,\n     $                              .TRUE. )\n                        IF( FULL )THEN\n                           IF( UPPER )THEN\n                              JA = JA + LDA\n                           ELSE\n                              JA = JA + LDA + 1\n                           END IF\n                        ELSE\n                           JA = JA + LJ\n                        END IF\n                        ERRMAX = MAX( ERRMAX, ERR )\n*                       If got really bad answer, report and return.\n                        IF( FATAL )\n     $                     GO TO 110\n   60                CONTINUE\n                  ELSE\n*                    Avoid repeating tests if N.le.0.\n                     IF( N.LE.0 )\n     $                  GO TO 100\n                  END IF\n*\n   70          CONTINUE\n*\n   80       CONTINUE\n*\n   90    CONTINUE\n*\n  100 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 130\n*\n  110 CONTINUE\n      WRITE( NOUT, FMT = 9995 )J\n*\n  120 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      IF( FULL )THEN\n         WRITE( NOUT, FMT = 9993 )NC, SNAME, UPLO, N, RALPHA, INCX, LDA\n      ELSE IF( PACKED )THEN\n         WRITE( NOUT, FMT = 9994 )NC, SNAME, UPLO, N, RALPHA, INCX\n      END IF\n*\n  130 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( '      THESE ARE THE RESULTS FOR COLUMN ', I3 )\n 9994 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',', I3, ',', F4.1, ', X,',\n     $      I2, ', AP)                                         .' )\n 9993 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',', I3, ',', F4.1, ', X,',\n     $      I2, ', A,', I3, ')                                      .' )\n 9992 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of CCHK5.\n*\n      END\n      SUBROUTINE CCHK6( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NALF, ALF, NINC, INC, NMAX,\n     $                  INCMAX, A, AA, AS, X, XX, XS, Y, YY, YS, YT, G,\n     $                  Z )\n*\n*  Tests CHER2 and CHPR2.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Parameters ..\n      COMPLEX            ZERO, HALF, ONE\n      PARAMETER          ( ZERO = ( 0.0, 0.0 ), HALF = ( 0.5, 0.0 ),\n     $                   ONE = ( 1.0, 0.0 ) )\n      REAL               RZERO\n      PARAMETER          ( RZERO = 0.0 )\n*     .. Scalar Arguments ..\n      REAL               EPS, THRESH\n      INTEGER            INCMAX, NALF, NIDIM, NINC, NMAX, NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      COMPLEX            A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),\n     $                   AS( NMAX*NMAX ), X( NMAX ), XS( NMAX*INCMAX ),\n     $                   XX( NMAX*INCMAX ), Y( NMAX ),\n     $                   YS( NMAX*INCMAX ), YT( NMAX ),\n     $                   YY( NMAX*INCMAX ), Z( NMAX, 2 )\n      REAL               G( NMAX )\n      INTEGER            IDIM( NIDIM ), INC( NINC )\n*     .. Local Scalars ..\n      COMPLEX            ALPHA, ALS, TRANSL\n      REAL               ERR, ERRMAX\n      INTEGER            I, IA, IC, IN, INCX, INCXS, INCY, INCYS, IX,\n     $                   IY, J, JA, JJ, LAA, LDA, LDAS, LJ, LX, LY, N,\n     $                   NARGS, NC, NS\n      LOGICAL            FULL, NULL, PACKED, RESET, SAME, UPPER\n      CHARACTER*1        UPLO, UPLOS\n      CHARACTER*2        ICH\n*     .. Local Arrays ..\n      COMPLEX            W( 2 )\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LCE, LCERES\n      EXTERNAL           LCE, LCERES\n*     .. External Subroutines ..\n      EXTERNAL           CHER2, CHPR2, CMAKE, CMVCH\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, CONJG, MAX\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICH/'UL'/\n*     .. Executable Statements ..\n      FULL = SNAME( 3: 3 ).EQ.'E'\n      PACKED = SNAME( 3: 3 ).EQ.'P'\n*     Define the number of arguments.\n      IF( FULL )THEN\n         NARGS = 9\n      ELSE IF( PACKED )THEN\n         NARGS = 8\n      END IF\n*\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = RZERO\n*\n      DO 140 IN = 1, NIDIM\n         N = IDIM( IN )\n*        Set LDA to 1 more than minimum value if room.\n         LDA = N\n         IF( LDA.LT.NMAX )\n     $      LDA = LDA + 1\n*        Skip tests if not enough room.\n         IF( LDA.GT.NMAX )\n     $      GO TO 140\n         IF( PACKED )THEN\n            LAA = ( N*( N + 1 ) )/2\n         ELSE\n            LAA = LDA*N\n         END IF\n*\n         DO 130 IC = 1, 2\n            UPLO = ICH( IC: IC )\n            UPPER = UPLO.EQ.'U'\n*\n            DO 120 IX = 1, NINC\n               INCX = INC( IX )\n               LX = ABS( INCX )*N\n*\n*              Generate the vector X.\n*\n               TRANSL = HALF\n               CALL CMAKE( 'GE', ' ', ' ', 1, N, X, 1, XX, ABS( INCX ),\n     $                     0, N - 1, RESET, TRANSL )\n               IF( N.GT.1 )THEN\n                  X( N/2 ) = ZERO\n                  XX( 1 + ABS( INCX )*( N/2 - 1 ) ) = ZERO\n               END IF\n*\n               DO 110 IY = 1, NINC\n                  INCY = INC( IY )\n                  LY = ABS( INCY )*N\n*\n*                 Generate the vector Y.\n*\n                  TRANSL = ZERO\n                  CALL CMAKE( 'GE', ' ', ' ', 1, N, Y, 1, YY,\n     $                        ABS( INCY ), 0, N - 1, RESET, TRANSL )\n                  IF( N.GT.1 )THEN\n                     Y( N/2 ) = ZERO\n                     YY( 1 + ABS( INCY )*( N/2 - 1 ) ) = ZERO\n                  END IF\n*\n                  DO 100 IA = 1, NALF\n                     ALPHA = ALF( IA )\n                     NULL = N.LE.0.OR.ALPHA.EQ.ZERO\n*\n*                    Generate the matrix A.\n*\n                     TRANSL = ZERO\n                     CALL CMAKE( SNAME( 2: 3 ), UPLO, ' ', N, N, A,\n     $                           NMAX, AA, LDA, N - 1, N - 1, RESET,\n     $                           TRANSL )\n*\n                     NC = NC + 1\n*\n*                    Save every datum before calling the subroutine.\n*\n                     UPLOS = UPLO\n                     NS = N\n                     ALS = ALPHA\n                     DO 10 I = 1, LAA\n                        AS( I ) = AA( I )\n   10                CONTINUE\n                     LDAS = LDA\n                     DO 20 I = 1, LX\n                        XS( I ) = XX( I )\n   20                CONTINUE\n                     INCXS = INCX\n                     DO 30 I = 1, LY\n                        YS( I ) = YY( I )\n   30                CONTINUE\n                     INCYS = INCY\n*\n*                    Call the subroutine.\n*\n                     IF( FULL )THEN\n                        IF( TRACE )\n     $                     WRITE( NTRA, FMT = 9993 )NC, SNAME, UPLO, N,\n     $                     ALPHA, INCX, INCY, LDA\n                        IF( REWI )\n     $                     REWIND NTRA\n                        CALL CHER2( UPLO, N, ALPHA, XX, INCX, YY, INCY,\n     $                              AA, LDA )\n                     ELSE IF( PACKED )THEN\n                        IF( TRACE )\n     $                     WRITE( NTRA, FMT = 9994 )NC, SNAME, UPLO, N,\n     $                     ALPHA, INCX, INCY\n                        IF( REWI )\n     $                     REWIND NTRA\n                        CALL CHPR2( UPLO, N, ALPHA, XX, INCX, YY, INCY,\n     $                              AA )\n                     END IF\n*\n*                    Check if error-exit was taken incorrectly.\n*\n                     IF( .NOT.OK )THEN\n                        WRITE( NOUT, FMT = 9992 )\n                        FATAL = .TRUE.\n                        GO TO 160\n                     END IF\n*\n*                    See what data changed inside subroutines.\n*\n                     ISAME( 1 ) = UPLO.EQ.UPLOS\n                     ISAME( 2 ) = NS.EQ.N\n                     ISAME( 3 ) = ALS.EQ.ALPHA\n                     ISAME( 4 ) = LCE( XS, XX, LX )\n                     ISAME( 5 ) = INCXS.EQ.INCX\n                     ISAME( 6 ) = LCE( YS, YY, LY )\n                     ISAME( 7 ) = INCYS.EQ.INCY\n                     IF( NULL )THEN\n                        ISAME( 8 ) = LCE( AS, AA, LAA )\n                     ELSE\n                        ISAME( 8 ) = LCERES( SNAME( 2: 3 ), UPLO, N, N,\n     $                               AS, AA, LDA )\n                     END IF\n                     IF( .NOT.PACKED )THEN\n                        ISAME( 9 ) = LDAS.EQ.LDA\n                     END IF\n*\n*                    If data was incorrectly changed, report and return.\n*\n                     SAME = .TRUE.\n                     DO 40 I = 1, NARGS\n                        SAME = SAME.AND.ISAME( I )\n                        IF( .NOT.ISAME( I ) )\n     $                     WRITE( NOUT, FMT = 9998 )I\n   40                CONTINUE\n                     IF( .NOT.SAME )THEN\n                        FATAL = .TRUE.\n                        GO TO 160\n                     END IF\n*\n                     IF( .NOT.NULL )THEN\n*\n*                       Check the result column by column.\n*\n                        IF( INCX.GT.0 )THEN\n                           DO 50 I = 1, N\n                              Z( I, 1 ) = X( I )\n   50                      CONTINUE\n                        ELSE\n                           DO 60 I = 1, N\n                              Z( I, 1 ) = X( N - I + 1 )\n   60                      CONTINUE\n                        END IF\n                        IF( INCY.GT.0 )THEN\n                           DO 70 I = 1, N\n                              Z( I, 2 ) = Y( I )\n   70                      CONTINUE\n                        ELSE\n                           DO 80 I = 1, N\n                              Z( I, 2 ) = Y( N - I + 1 )\n   80                      CONTINUE\n                        END IF\n                        JA = 1\n                        DO 90 J = 1, N\n                           W( 1 ) = ALPHA*CONJG( Z( J, 2 ) )\n                           W( 2 ) = CONJG( ALPHA )*CONJG( Z( J, 1 ) )\n                           IF( UPPER )THEN\n                              JJ = 1\n                              LJ = J\n                           ELSE\n                              JJ = J\n                              LJ = N - J + 1\n                           END IF\n                           CALL CMVCH( 'N', LJ, 2, ONE, Z( JJ, 1 ),\n     $                                 NMAX, W, 1, ONE, A( JJ, J ), 1,\n     $                                 YT, G, AA( JA ), EPS, ERR, FATAL,\n     $                                 NOUT, .TRUE. )\n                           IF( FULL )THEN\n                              IF( UPPER )THEN\n                                 JA = JA + LDA\n                              ELSE\n                                 JA = JA + LDA + 1\n                              END IF\n                           ELSE\n                              JA = JA + LJ\n                           END IF\n                           ERRMAX = MAX( ERRMAX, ERR )\n*                          If got really bad answer, report and return.\n                           IF( FATAL )\n     $                        GO TO 150\n   90                   CONTINUE\n                     ELSE\n*                       Avoid repeating tests with N.le.0.\n                        IF( N.LE.0 )\n     $                     GO TO 140\n                     END IF\n*\n  100             CONTINUE\n*\n  110          CONTINUE\n*\n  120       CONTINUE\n*\n  130    CONTINUE\n*\n  140 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 170\n*\n  150 CONTINUE\n      WRITE( NOUT, FMT = 9995 )J\n*\n  160 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      IF( FULL )THEN\n         WRITE( NOUT, FMT = 9993 )NC, SNAME, UPLO, N, ALPHA, INCX,\n     $      INCY, LDA\n      ELSE IF( PACKED )THEN\n         WRITE( NOUT, FMT = 9994 )NC, SNAME, UPLO, N, ALPHA, INCX, INCY\n      END IF\n*\n  170 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( '      THESE ARE THE RESULTS FOR COLUMN ', I3 )\n 9994 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',', I3, ',(', F4.1, ',',\n     $      F4.1, '), X,', I2, ', Y,', I2, ', AP)                     ',\n     $      '       .' )\n 9993 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',', I3, ',(', F4.1, ',',\n     $      F4.1, '), X,', I2, ', Y,', I2, ', A,', I3, ')             ',\n     $      '            .' )\n 9992 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of CCHK6.\n*\n      END\n      SUBROUTINE CCHKE( ISNUM, SRNAMT, NOUT )\n*\n*  Tests the error exits from the Level 2 Blas.\n*  Requires a special version of the error-handling routine XERBLA.\n*  ALPHA, RALPHA, BETA, A, X and Y should not need to be defined.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Scalar Arguments ..\n      INTEGER            ISNUM, NOUT\n      CHARACTER*6        SRNAMT\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Local Scalars ..\n      COMPLEX            ALPHA, BETA\n      REAL               RALPHA\n*     .. Local Arrays ..\n      COMPLEX            A( 1, 1 ), X( 1 ), Y( 1 )\n*     .. External Subroutines ..\n      EXTERNAL           CGBMV, CGEMV, CGERC, CGERU, CHBMV, CHEMV, CHER,\n     $                   CHER2, CHKXER, CHPMV, CHPR, CHPR2, CTBMV,\n     $                   CTBSV, CTPMV, CTPSV, CTRMV, CTRSV\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Executable Statements ..\n*     OK is set to .FALSE. by the special version of XERBLA or by CHKXER\n*     if anything is wrong.\n      OK = .TRUE.\n*     LERR is set to .TRUE. by the special version of XERBLA each time\n*     it is called, and is then tested and re-set by CHKXER.\n      LERR = .FALSE.\n      GO TO ( 10, 20, 30, 40, 50, 60, 70, 80,\n     $        90, 100, 110, 120, 130, 140, 150, 160,\n     $        170 )ISNUM\n   10 INFOT = 1\n      CALL CGEMV( '/', 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL CGEMV( 'N', -1, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CGEMV( 'N', 0, -1, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL CGEMV( 'N', 2, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL CGEMV( 'N', 0, 0, ALPHA, A, 1, X, 0, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL CGEMV( 'N', 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 180\n   20 INFOT = 1\n      CALL CGBMV( '/', 0, 0, 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL CGBMV( 'N', -1, 0, 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CGBMV( 'N', 0, -1, 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CGBMV( 'N', 0, 0, -1, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CGBMV( 'N', 2, 0, 0, -1, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL CGBMV( 'N', 0, 0, 1, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL CGBMV( 'N', 0, 0, 0, 0, ALPHA, A, 1, X, 0, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 13\n      CALL CGBMV( 'N', 0, 0, 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 180\n   30 INFOT = 1\n      CALL CHEMV( '/', 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL CHEMV( 'U', -1, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CHEMV( 'U', 2, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL CHEMV( 'U', 0, ALPHA, A, 1, X, 0, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL CHEMV( 'U', 0, ALPHA, A, 1, X, 1, BETA, Y, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 180\n   40 INFOT = 1\n      CALL CHBMV( '/', 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL CHBMV( 'U', -1, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CHBMV( 'U', 0, -1, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL CHBMV( 'U', 0, 1, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL CHBMV( 'U', 0, 0, ALPHA, A, 1, X, 0, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL CHBMV( 'U', 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 180\n   50 INFOT = 1\n      CALL CHPMV( '/', 0, ALPHA, A, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL CHPMV( 'U', -1, ALPHA, A, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL CHPMV( 'U', 0, ALPHA, A, X, 0, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CHPMV( 'U', 0, ALPHA, A, X, 1, BETA, Y, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 180\n   60 INFOT = 1\n      CALL CTRMV( '/', 'N', 'N', 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL CTRMV( 'U', '/', 'N', 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CTRMV( 'U', 'N', '/', 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CTRMV( 'U', 'N', 'N', -1, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL CTRMV( 'U', 'N', 'N', 2, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL CTRMV( 'U', 'N', 'N', 0, A, 1, X, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 180\n   70 INFOT = 1\n      CALL CTBMV( '/', 'N', 'N', 0, 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL CTBMV( 'U', '/', 'N', 0, 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CTBMV( 'U', 'N', '/', 0, 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CTBMV( 'U', 'N', 'N', -1, 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CTBMV( 'U', 'N', 'N', 0, -1, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL CTBMV( 'U', 'N', 'N', 0, 1, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CTBMV( 'U', 'N', 'N', 0, 0, A, 1, X, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 180\n   80 INFOT = 1\n      CALL CTPMV( '/', 'N', 'N', 0, A, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL CTPMV( 'U', '/', 'N', 0, A, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CTPMV( 'U', 'N', '/', 0, A, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CTPMV( 'U', 'N', 'N', -1, A, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL CTPMV( 'U', 'N', 'N', 0, A, X, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 180\n   90 INFOT = 1\n      CALL CTRSV( '/', 'N', 'N', 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL CTRSV( 'U', '/', 'N', 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CTRSV( 'U', 'N', '/', 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CTRSV( 'U', 'N', 'N', -1, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL CTRSV( 'U', 'N', 'N', 2, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL CTRSV( 'U', 'N', 'N', 0, A, 1, X, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 180\n  100 INFOT = 1\n      CALL CTBSV( '/', 'N', 'N', 0, 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL CTBSV( 'U', '/', 'N', 0, 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CTBSV( 'U', 'N', '/', 0, 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CTBSV( 'U', 'N', 'N', -1, 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CTBSV( 'U', 'N', 'N', 0, -1, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL CTBSV( 'U', 'N', 'N', 0, 1, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CTBSV( 'U', 'N', 'N', 0, 0, A, 1, X, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 180\n  110 INFOT = 1\n      CALL CTPSV( '/', 'N', 'N', 0, A, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL CTPSV( 'U', '/', 'N', 0, A, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CTPSV( 'U', 'N', '/', 0, A, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CTPSV( 'U', 'N', 'N', -1, A, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL CTPSV( 'U', 'N', 'N', 0, A, X, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 180\n  120 INFOT = 1\n      CALL CGERC( -1, 0, ALPHA, X, 1, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL CGERC( 0, -1, ALPHA, X, 1, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CGERC( 0, 0, ALPHA, X, 0, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL CGERC( 0, 0, ALPHA, X, 1, Y, 0, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CGERC( 2, 0, ALPHA, X, 1, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 180\n  130 INFOT = 1\n      CALL CGERU( -1, 0, ALPHA, X, 1, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL CGERU( 0, -1, ALPHA, X, 1, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CGERU( 0, 0, ALPHA, X, 0, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL CGERU( 0, 0, ALPHA, X, 1, Y, 0, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CGERU( 2, 0, ALPHA, X, 1, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 180\n  140 INFOT = 1\n      CALL CHER( '/', 0, RALPHA, X, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL CHER( 'U', -1, RALPHA, X, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CHER( 'U', 0, RALPHA, X, 0, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL CHER( 'U', 2, RALPHA, X, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 180\n  150 INFOT = 1\n      CALL CHPR( '/', 0, RALPHA, X, 1, A )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL CHPR( 'U', -1, RALPHA, X, 1, A )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CHPR( 'U', 0, RALPHA, X, 0, A )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 180\n  160 INFOT = 1\n      CALL CHER2( '/', 0, ALPHA, X, 1, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL CHER2( 'U', -1, ALPHA, X, 1, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CHER2( 'U', 0, ALPHA, X, 0, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL CHER2( 'U', 0, ALPHA, X, 1, Y, 0, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CHER2( 'U', 2, ALPHA, X, 1, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 180\n  170 INFOT = 1\n      CALL CHPR2( '/', 0, ALPHA, X, 1, Y, 1, A )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL CHPR2( 'U', -1, ALPHA, X, 1, Y, 1, A )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CHPR2( 'U', 0, ALPHA, X, 0, Y, 1, A )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL CHPR2( 'U', 0, ALPHA, X, 1, Y, 0, A )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n*\n  180 IF( OK )THEN\n         WRITE( NOUT, FMT = 9999 )SRNAMT\n      ELSE\n         WRITE( NOUT, FMT = 9998 )SRNAMT\n      END IF\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE TESTS OF ERROR-EXITS' )\n 9998 FORMAT( ' ******* ', A6, ' FAILED THE TESTS OF ERROR-EXITS *****',\n     $      '**' )\n*\n*     End of CCHKE.\n*\n      END\n      SUBROUTINE CMAKE( TYPE, UPLO, DIAG, M, N, A, NMAX, AA, LDA, KL,\n     $                  KU, RESET, TRANSL )\n*\n*  Generates values for an M by N matrix A within the bandwidth\n*  defined by KL and KU.\n*  Stores the values in the array AA in the data structure required\n*  by the routine, with unwanted elements set to rogue value.\n*\n*  TYPE is 'GE', 'GB', 'HE', 'HB', 'HP', 'TR', 'TB' OR 'TP'.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Parameters ..\n      COMPLEX            ZERO, ONE\n      PARAMETER          ( ZERO = ( 0.0, 0.0 ), ONE = ( 1.0, 0.0 ) )\n      COMPLEX            ROGUE\n      PARAMETER          ( ROGUE = ( -1.0E10, 1.0E10 ) )\n      REAL               RZERO\n      PARAMETER          ( RZERO = 0.0 )\n      REAL               RROGUE\n      PARAMETER          ( RROGUE = -1.0E10 )\n*     .. Scalar Arguments ..\n      COMPLEX            TRANSL\n      INTEGER            KL, KU, LDA, M, N, NMAX\n      LOGICAL            RESET\n      CHARACTER*1        DIAG, UPLO\n      CHARACTER*2        TYPE\n*     .. Array Arguments ..\n      COMPLEX            A( NMAX, * ), AA( * )\n*     .. Local Scalars ..\n      INTEGER            I, I1, I2, I3, IBEG, IEND, IOFF, J, JJ, KK\n      LOGICAL            GEN, LOWER, SYM, TRI, UNIT, UPPER\n*     .. External Functions ..\n      COMPLEX            CBEG\n      EXTERNAL           CBEG\n*     .. Intrinsic Functions ..\n      INTRINSIC          CMPLX, CONJG, MAX, MIN, REAL\n*     .. Executable Statements ..\n      GEN = TYPE( 1: 1 ).EQ.'G'\n      SYM = TYPE( 1: 1 ).EQ.'H'\n      TRI = TYPE( 1: 1 ).EQ.'T'\n      UPPER = ( SYM.OR.TRI ).AND.UPLO.EQ.'U'\n      LOWER = ( SYM.OR.TRI ).AND.UPLO.EQ.'L'\n      UNIT = TRI.AND.DIAG.EQ.'U'\n*\n*     Generate data in array A.\n*\n      DO 20 J = 1, N\n         DO 10 I = 1, M\n            IF( GEN.OR.( UPPER.AND.I.LE.J ).OR.( LOWER.AND.I.GE.J ) )\n     $          THEN\n               IF( ( I.LE.J.AND.J - I.LE.KU ).OR.\n     $             ( I.GE.J.AND.I - J.LE.KL ) )THEN\n                  A( I, J ) = CBEG( RESET ) + TRANSL\n               ELSE\n                  A( I, J ) = ZERO\n               END IF\n               IF( I.NE.J )THEN\n                  IF( SYM )THEN\n                     A( J, I ) = CONJG( A( I, J ) )\n                  ELSE IF( TRI )THEN\n                     A( J, I ) = ZERO\n                  END IF\n               END IF\n            END IF\n   10    CONTINUE\n         IF( SYM )\n     $      A( J, J ) = CMPLX( REAL( A( J, J ) ), RZERO )\n         IF( TRI )\n     $      A( J, J ) = A( J, J ) + ONE\n         IF( UNIT )\n     $      A( J, J ) = ONE\n   20 CONTINUE\n*\n*     Store elements in array AS in data structure required by routine.\n*\n      IF( TYPE.EQ.'GE' )THEN\n         DO 50 J = 1, N\n            DO 30 I = 1, M\n               AA( I + ( J - 1 )*LDA ) = A( I, J )\n   30       CONTINUE\n            DO 40 I = M + 1, LDA\n               AA( I + ( J - 1 )*LDA ) = ROGUE\n   40       CONTINUE\n   50    CONTINUE\n      ELSE IF( TYPE.EQ.'GB' )THEN\n         DO 90 J = 1, N\n            DO 60 I1 = 1, KU + 1 - J\n               AA( I1 + ( J - 1 )*LDA ) = ROGUE\n   60       CONTINUE\n            DO 70 I2 = I1, MIN( KL + KU + 1, KU + 1 + M - J )\n               AA( I2 + ( J - 1 )*LDA ) = A( I2 + J - KU - 1, J )\n   70       CONTINUE\n            DO 80 I3 = I2, LDA\n               AA( I3 + ( J - 1 )*LDA ) = ROGUE\n   80       CONTINUE\n   90    CONTINUE\n      ELSE IF( TYPE.EQ.'HE'.OR.TYPE.EQ.'TR' )THEN\n         DO 130 J = 1, N\n            IF( UPPER )THEN\n               IBEG = 1\n               IF( UNIT )THEN\n                  IEND = J - 1\n               ELSE\n                  IEND = J\n               END IF\n            ELSE\n               IF( UNIT )THEN\n                  IBEG = J + 1\n               ELSE\n                  IBEG = J\n               END IF\n               IEND = N\n            END IF\n            DO 100 I = 1, IBEG - 1\n               AA( I + ( J - 1 )*LDA ) = ROGUE\n  100       CONTINUE\n            DO 110 I = IBEG, IEND\n               AA( I + ( J - 1 )*LDA ) = A( I, J )\n  110       CONTINUE\n            DO 120 I = IEND + 1, LDA\n               AA( I + ( J - 1 )*LDA ) = ROGUE\n  120       CONTINUE\n            IF( SYM )THEN\n               JJ = J + ( J - 1 )*LDA\n               AA( JJ ) = CMPLX( REAL( AA( JJ ) ), RROGUE )\n            END IF\n  130    CONTINUE\n      ELSE IF( TYPE.EQ.'HB'.OR.TYPE.EQ.'TB' )THEN\n         DO 170 J = 1, N\n            IF( UPPER )THEN\n               KK = KL + 1\n               IBEG = MAX( 1, KL + 2 - J )\n               IF( UNIT )THEN\n                  IEND = KL\n               ELSE\n                  IEND = KL + 1\n               END IF\n            ELSE\n               KK = 1\n               IF( UNIT )THEN\n                  IBEG = 2\n               ELSE\n                  IBEG = 1\n               END IF\n               IEND = MIN( KL + 1, 1 + M - J )\n            END IF\n            DO 140 I = 1, IBEG - 1\n               AA( I + ( J - 1 )*LDA ) = ROGUE\n  140       CONTINUE\n            DO 150 I = IBEG, IEND\n               AA( I + ( J - 1 )*LDA ) = A( I + J - KK, J )\n  150       CONTINUE\n            DO 160 I = IEND + 1, LDA\n               AA( I + ( J - 1 )*LDA ) = ROGUE\n  160       CONTINUE\n            IF( SYM )THEN\n               JJ = KK + ( J - 1 )*LDA\n               AA( JJ ) = CMPLX( REAL( AA( JJ ) ), RROGUE )\n            END IF\n  170    CONTINUE\n      ELSE IF( TYPE.EQ.'HP'.OR.TYPE.EQ.'TP' )THEN\n         IOFF = 0\n         DO 190 J = 1, N\n            IF( UPPER )THEN\n               IBEG = 1\n               IEND = J\n            ELSE\n               IBEG = J\n               IEND = N\n            END IF\n            DO 180 I = IBEG, IEND\n               IOFF = IOFF + 1\n               AA( IOFF ) = A( I, J )\n               IF( I.EQ.J )THEN\n                  IF( UNIT )\n     $               AA( IOFF ) = ROGUE\n                  IF( SYM )\n     $               AA( IOFF ) = CMPLX( REAL( AA( IOFF ) ), RROGUE )\n               END IF\n  180       CONTINUE\n  190    CONTINUE\n      END IF\n      RETURN\n*\n*     End of CMAKE.\n*\n      END\n      SUBROUTINE CMVCH( TRANS, M, N, ALPHA, A, NMAX, X, INCX, BETA, Y,\n     $                  INCY, YT, G, YY, EPS, ERR, FATAL, NOUT, MV )\n*\n*  Checks the results of the computational tests.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Parameters ..\n      COMPLEX            ZERO\n      PARAMETER          ( ZERO = ( 0.0, 0.0 ) )\n      REAL               RZERO, RONE\n      PARAMETER          ( RZERO = 0.0, RONE = 1.0 )\n*     .. Scalar Arguments ..\n      COMPLEX            ALPHA, BETA\n      REAL               EPS, ERR\n      INTEGER            INCX, INCY, M, N, NMAX, NOUT\n      LOGICAL            FATAL, MV\n      CHARACTER*1        TRANS\n*     .. Array Arguments ..\n      COMPLEX            A( NMAX, * ), X( * ), Y( * ), YT( * ), YY( * )\n      REAL               G( * )\n*     .. Local Scalars ..\n      COMPLEX            C\n      REAL               ERRI\n      INTEGER            I, INCXL, INCYL, IY, J, JX, KX, KY, ML, NL\n      LOGICAL            CTRAN, TRAN\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, AIMAG, CONJG, MAX, REAL, SQRT\n*     .. Statement Functions ..\n      REAL               ABS1\n*     .. Statement Function definitions ..\n      ABS1( C ) = ABS( REAL( C ) ) + ABS( AIMAG( C ) )\n*     .. Executable Statements ..\n      TRAN = TRANS.EQ.'T'\n      CTRAN = TRANS.EQ.'C'\n      IF( TRAN.OR.CTRAN )THEN\n         ML = N\n         NL = M\n      ELSE\n         ML = M\n         NL = N\n      END IF\n      IF( INCX.LT.0 )THEN\n         KX = NL\n         INCXL = -1\n      ELSE\n         KX = 1\n         INCXL = 1\n      END IF\n      IF( INCY.LT.0 )THEN\n         KY = ML\n         INCYL = -1\n      ELSE\n         KY = 1\n         INCYL = 1\n      END IF\n*\n*     Compute expected result in YT using data in A, X and Y.\n*     Compute gauges in G.\n*\n      IY = KY\n      DO 40 I = 1, ML\n         YT( IY ) = ZERO\n         G( IY ) = RZERO\n         JX = KX\n         IF( TRAN )THEN\n            DO 10 J = 1, NL\n               YT( IY ) = YT( IY ) + A( J, I )*X( JX )\n               G( IY ) = G( IY ) + ABS1( A( J, I ) )*ABS1( X( JX ) )\n               JX = JX + INCXL\n   10       CONTINUE\n         ELSE IF( CTRAN )THEN\n            DO 20 J = 1, NL\n               YT( IY ) = YT( IY ) + CONJG( A( J, I ) )*X( JX )\n               G( IY ) = G( IY ) + ABS1( A( J, I ) )*ABS1( X( JX ) )\n               JX = JX + INCXL\n   20       CONTINUE\n         ELSE\n            DO 30 J = 1, NL\n               YT( IY ) = YT( IY ) + A( I, J )*X( JX )\n               G( IY ) = G( IY ) + ABS1( A( I, J ) )*ABS1( X( JX ) )\n               JX = JX + INCXL\n   30       CONTINUE\n         END IF\n         YT( IY ) = ALPHA*YT( IY ) + BETA*Y( IY )\n         G( IY ) = ABS1( ALPHA )*G( IY ) + ABS1( BETA )*ABS1( Y( IY ) )\n         IY = IY + INCYL\n   40 CONTINUE\n*\n*     Compute the error ratio for this result.\n*\n      ERR = ZERO\n      DO 50 I = 1, ML\n         ERRI = ABS( YT( I ) - YY( 1 + ( I - 1 )*ABS( INCY ) ) )/EPS\n         IF( G( I ).NE.RZERO )\n     $      ERRI = ERRI/G( I )\n         ERR = MAX( ERR, ERRI )\n         IF( ERR*SQRT( EPS ).GE.RONE )\n     $      GO TO 60\n   50 CONTINUE\n*     If the loop completes, all results are at least half accurate.\n      GO TO 80\n*\n*     Report fatal error.\n*\n   60 FATAL = .TRUE.\n      WRITE( NOUT, FMT = 9999 )\n      DO 70 I = 1, ML\n         IF( MV )THEN\n            WRITE( NOUT, FMT = 9998 )I, YT( I ),\n     $         YY( 1 + ( I - 1 )*ABS( INCY ) )\n         ELSE\n            WRITE( NOUT, FMT = 9998 )I,\n     $         YY( 1 + ( I - 1 )*ABS( INCY ) ), YT( I )\n         END IF\n   70 CONTINUE\n*\n   80 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ******* FATAL ERROR - COMPUTED RESULT IS LESS THAN HAL',\n     $      'F ACCURATE *******', /'                       EXPECTED RE',\n     $      'SULT                    COMPUTED RESULT' )\n 9998 FORMAT( 1X, I7, 2( '  (', G15.6, ',', G15.6, ')' ) )\n*\n*     End of CMVCH.\n*\n      END\n      LOGICAL FUNCTION LCE( RI, RJ, LR )\n*\n*  Tests if two arrays are identical.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Scalar Arguments ..\n      INTEGER            LR\n*     .. Array Arguments ..\n      COMPLEX            RI( * ), RJ( * )\n*     .. Local Scalars ..\n      INTEGER            I\n*     .. Executable Statements ..\n      DO 10 I = 1, LR\n         IF( RI( I ).NE.RJ( I ) )\n     $      GO TO 20\n   10 CONTINUE\n      LCE = .TRUE.\n      GO TO 30\n   20 CONTINUE\n      LCE = .FALSE.\n   30 RETURN\n*\n*     End of LCE.\n*\n      END\n      LOGICAL FUNCTION LCERES( TYPE, UPLO, M, N, AA, AS, LDA )\n*\n*  Tests if selected elements in two arrays are equal.\n*\n*  TYPE is 'GE', 'HE' or 'HP'.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Scalar Arguments ..\n      INTEGER            LDA, M, N\n      CHARACTER*1        UPLO\n      CHARACTER*2        TYPE\n*     .. Array Arguments ..\n      COMPLEX            AA( LDA, * ), AS( LDA, * )\n*     .. Local Scalars ..\n      INTEGER            I, IBEG, IEND, J\n      LOGICAL            UPPER\n*     .. Executable Statements ..\n      UPPER = UPLO.EQ.'U'\n      IF( TYPE.EQ.'GE' )THEN\n         DO 20 J = 1, N\n            DO 10 I = M + 1, LDA\n               IF( AA( I, J ).NE.AS( I, J ) )\n     $            GO TO 70\n   10       CONTINUE\n   20    CONTINUE\n      ELSE IF( TYPE.EQ.'HE' )THEN\n         DO 50 J = 1, N\n            IF( UPPER )THEN\n               IBEG = 1\n               IEND = J\n            ELSE\n               IBEG = J\n               IEND = N\n            END IF\n            DO 30 I = 1, IBEG - 1\n               IF( AA( I, J ).NE.AS( I, J ) )\n     $            GO TO 70\n   30       CONTINUE\n            DO 40 I = IEND + 1, LDA\n               IF( AA( I, J ).NE.AS( I, J ) )\n     $            GO TO 70\n   40       CONTINUE\n   50    CONTINUE\n      END IF\n*\n      LCERES = .TRUE.\n      GO TO 80\n   70 CONTINUE\n      LCERES = .FALSE.\n   80 RETURN\n*\n*     End of LCERES.\n*\n      END\n      COMPLEX FUNCTION CBEG( RESET )\n*\n*  Generates complex numbers as pairs of random numbers uniformly\n*  distributed between -0.5 and 0.5.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Scalar Arguments ..\n      LOGICAL            RESET\n*     .. Local Scalars ..\n      INTEGER            I, IC, J, MI, MJ\n*     .. Save statement ..\n      SAVE               I, IC, J, MI, MJ\n*     .. Intrinsic Functions ..\n      INTRINSIC          CMPLX\n*     .. Executable Statements ..\n      IF( RESET )THEN\n*        Initialize local variables.\n         MI = 891\n         MJ = 457\n         I = 7\n         J = 7\n         IC = 0\n         RESET = .FALSE.\n      END IF\n*\n*     The sequence of values of I or J is bounded between 1 and 999.\n*     If initial I or J = 1,2,3,6,7 or 9, the period will be 50.\n*     If initial I or J = 4 or 8, the period will be 25.\n*     If initial I or J = 5, the period will be 10.\n*     IC is used to break up the period by skipping 1 value of I or J\n*     in 6.\n*\n      IC = IC + 1\n   10 I = I*MI\n      J = J*MJ\n      I = I - 1000*( I/1000 )\n      J = J - 1000*( J/1000 )\n      IF( IC.GE.5 )THEN\n         IC = 0\n         GO TO 10\n      END IF\n      CBEG = CMPLX( ( I - 500 )/1001.0, ( J - 500 )/1001.0 )\n      RETURN\n*\n*     End of CBEG.\n*\n      END\n      REAL FUNCTION SDIFF( X, Y )\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*\n*     .. Scalar Arguments ..\n      REAL               X, Y\n*     .. Executable Statements ..\n      SDIFF = X - Y\n      RETURN\n*\n*     End of SDIFF.\n*\n      END\n      SUBROUTINE CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n*\n*  Tests whether XERBLA has detected an error when it should.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Scalar Arguments ..\n      INTEGER            INFOT, NOUT\n      LOGICAL            LERR, OK\n      CHARACTER*6        SRNAMT\n*     .. Executable Statements ..\n      IF( .NOT.LERR )THEN\n         WRITE( NOUT, FMT = 9999 )INFOT, SRNAMT\n         OK = .FALSE.\n      END IF\n      LERR = .FALSE.\n      RETURN\n*\n 9999 FORMAT( ' ***** ILLEGAL VALUE OF PARAMETER NUMBER ', I2, ' NOT D',\n     $      'ETECTED BY ', A6, ' *****' )\n*\n*     End of CHKXER.\n*\n      END\n      SUBROUTINE XERBLA( SRNAME, INFO )\n*\n*  This is a special version of XERBLA to be used only as part of\n*  the test program for testing error exits from the Level 2 BLAS\n*  routines.\n*\n*  XERBLA  is an error handler for the Level 2 BLAS routines.\n*\n*  It is called by the Level 2 BLAS routines if an input parameter is\n*  invalid.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Scalar Arguments ..\n      INTEGER            INFO\n      CHARACTER*6        SRNAME\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUT\n      LOGICAL            LERR, OK\n      CHARACTER*6        SRNAMT\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUT, OK, LERR\n      COMMON             /SRNAMC/SRNAMT\n*     .. Executable Statements ..\n      LERR = .TRUE.\n      IF( INFO.NE.INFOT )THEN\n         IF( INFOT.NE.0 )THEN\n            WRITE( NOUT, FMT = 9999 )INFO, INFOT\n         ELSE\n            WRITE( NOUT, FMT = 9997 )INFO\n         END IF\n         OK = .FALSE.\n      END IF\n      IF( SRNAME.NE.SRNAMT )THEN\n         WRITE( NOUT, FMT = 9998 )SRNAME, SRNAMT\n         OK = .FALSE.\n      END IF\n      RETURN\n*\n 9999 FORMAT( ' ******* XERBLA WAS CALLED WITH INFO = ', I6, ' INSTEAD',\n     $      ' OF ', I2, ' *******' )\n 9998 FORMAT( ' ******* XERBLA WAS CALLED WITH SRNAME = ', A6, ' INSTE',\n     $      'AD OF ', A6, ' *******' )\n 9997 FORMAT( ' ******* XERBLA WAS CALLED WITH INFO = ', I6,\n     $      ' *******' )\n*\n*     End of XERBLA\n*\n      END\n\n"
  },
  {
    "path": "3rdparty/eigen3/blas/testing/cblat3.f",
    "content": "*> \\brief \\b CBLAT3\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*  Definition:\n*  ===========\n*\n*       PROGRAM CBLAT3\n* \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> Test program for the COMPLEX          Level 3 Blas.\n*>\n*> The program must be driven by a short data file. The first 14 records\n*> of the file are read using list-directed input, the last 9 records\n*> are read using the format ( A6, L2 ). An annotated example of a data\n*> file can be obtained by deleting the first 3 characters from the\n*> following 23 lines:\n*> 'cblat3.out'      NAME OF SUMMARY OUTPUT FILE\n*> 6                 UNIT NUMBER OF SUMMARY FILE\n*> 'CBLAT3.SNAP'     NAME OF SNAPSHOT OUTPUT FILE\n*> -1                UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)\n*> F        LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.\n*> F        LOGICAL FLAG, T TO STOP ON FAILURES.\n*> T        LOGICAL FLAG, T TO TEST ERROR EXITS.\n*> 16.0     THRESHOLD VALUE OF TEST RATIO\n*> 6                 NUMBER OF VALUES OF N\n*> 0 1 2 3 5 9       VALUES OF N\n*> 3                 NUMBER OF VALUES OF ALPHA\n*> (0.0,0.0) (1.0,0.0) (0.7,-0.9)       VALUES OF ALPHA\n*> 3                 NUMBER OF VALUES OF BETA\n*> (0.0,0.0) (1.0,0.0) (1.3,-1.1)       VALUES OF BETA\n*> CGEMM  T PUT F FOR NO TEST. SAME COLUMNS.\n*> CHEMM  T PUT F FOR NO TEST. SAME COLUMNS.\n*> CSYMM  T PUT F FOR NO TEST. SAME COLUMNS.\n*> CTRMM  T PUT F FOR NO TEST. SAME COLUMNS.\n*> CTRSM  T PUT F FOR NO TEST. SAME COLUMNS.\n*> CHERK  T PUT F FOR NO TEST. SAME COLUMNS.\n*> CSYRK  T PUT F FOR NO TEST. SAME COLUMNS.\n*> CHER2K T PUT F FOR NO TEST. SAME COLUMNS.\n*> CSYR2K T PUT F FOR NO TEST. SAME COLUMNS.\n*>\n*> Further Details\n*> ===============\n*>\n*> See:\n*>\n*>    Dongarra J. J., Du Croz J. J., Duff I. S. and Hammarling S.\n*>    A Set of Level 3 Basic Linear Algebra Subprograms.\n*>\n*>    Technical Memorandum No.88 (Revision 1), Mathematics and\n*>    Computer Science Division, Argonne National Laboratory, 9700\n*>    South Cass Avenue, Argonne, Illinois 60439, US.\n*>\n*> -- Written on 8-February-1989.\n*>    Jack Dongarra, Argonne National Laboratory.\n*>    Iain Duff, AERE Harwell.\n*>    Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*>    Sven Hammarling, Numerical Algorithms Group Ltd.\n*>\n*>    10-9-00:  Change STATUS='NEW' to 'UNKNOWN' so that the testers\n*>              can be run multiple times without deleting generated\n*>              output files (susan)\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date April 2012\n*\n*> \\ingroup complex_blas_testing\n*\n*  =====================================================================\n      PROGRAM CBLAT3\n*\n*  -- Reference BLAS test routine (version 3.4.1) --\n*  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     April 2012\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      INTEGER            NIN\n      PARAMETER          ( NIN = 5 )\n      INTEGER            NSUBS\n      PARAMETER          ( NSUBS = 9 )\n      COMPLEX            ZERO, ONE\n      PARAMETER          ( ZERO = ( 0.0, 0.0 ), ONE = ( 1.0, 0.0 ) )\n      REAL               RZERO\n      PARAMETER          ( RZERO = 0.0 )\n      INTEGER            NMAX\n      PARAMETER          ( NMAX = 65 )\n      INTEGER            NIDMAX, NALMAX, NBEMAX\n      PARAMETER          ( NIDMAX = 9, NALMAX = 7, NBEMAX = 7 )\n*     .. Local Scalars ..\n      REAL               EPS, ERR, THRESH\n      INTEGER            I, ISNUM, J, N, NALF, NBET, NIDIM, NOUT, NTRA\n      LOGICAL            FATAL, LTESTT, REWI, SAME, SFATAL, TRACE,\n     $                   TSTERR\n      CHARACTER*1        TRANSA, TRANSB\n      CHARACTER*6        SNAMET\n      CHARACTER*32       SNAPS, SUMMRY\n*     .. Local Arrays ..\n      COMPLEX            AA( NMAX*NMAX ), AB( NMAX, 2*NMAX ),\n     $                   ALF( NALMAX ), AS( NMAX*NMAX ),\n     $                   BB( NMAX*NMAX ), BET( NBEMAX ),\n     $                   BS( NMAX*NMAX ), C( NMAX, NMAX ),\n     $                   CC( NMAX*NMAX ), CS( NMAX*NMAX ), CT( NMAX ),\n     $                   W( 2*NMAX )\n      REAL               G( NMAX )\n      INTEGER            IDIM( NIDMAX )\n      LOGICAL            LTEST( NSUBS )\n      CHARACTER*6        SNAMES( NSUBS )\n*     .. External Functions ..\n      REAL               SDIFF\n      LOGICAL            LCE\n      EXTERNAL           SDIFF, LCE\n*     .. External Subroutines ..\n      EXTERNAL           CCHK1, CCHK2, CCHK3, CCHK4, CCHK5, CCHKE, CMMCH\n*     .. Intrinsic Functions ..\n      INTRINSIC          MAX, MIN\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n      CHARACTER*6        SRNAMT\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n      COMMON             /SRNAMC/SRNAMT\n*     .. Data statements ..\n      DATA               SNAMES/'CGEMM ', 'CHEMM ', 'CSYMM ', 'CTRMM ',\n     $                   'CTRSM ', 'CHERK ', 'CSYRK ', 'CHER2K',\n     $                   'CSYR2K'/\n*     .. Executable Statements ..\n*\n*     Read name and unit number for summary output file and open file.\n*\n      READ( NIN, FMT = * )SUMMRY\n      READ( NIN, FMT = * )NOUT\n      OPEN( NOUT, FILE = SUMMRY )\n      NOUTC = NOUT\n*\n*     Read name and unit number for snapshot output file and open file.\n*\n      READ( NIN, FMT = * )SNAPS\n      READ( NIN, FMT = * )NTRA\n      TRACE = NTRA.GE.0\n      IF( TRACE )THEN\n         OPEN( NTRA, FILE = SNAPS )\n      END IF\n*     Read the flag that directs rewinding of the snapshot file.\n      READ( NIN, FMT = * )REWI\n      REWI = REWI.AND.TRACE\n*     Read the flag that directs stopping on any failure.\n      READ( NIN, FMT = * )SFATAL\n*     Read the flag that indicates whether error exits are to be tested.\n      READ( NIN, FMT = * )TSTERR\n*     Read the threshold value of the test ratio\n      READ( NIN, FMT = * )THRESH\n*\n*     Read and check the parameter values for the tests.\n*\n*     Values of N\n      READ( NIN, FMT = * )NIDIM\n      IF( NIDIM.LT.1.OR.NIDIM.GT.NIDMAX )THEN\n         WRITE( NOUT, FMT = 9997 )'N', NIDMAX\n         GO TO 220\n      END IF\n      READ( NIN, FMT = * )( IDIM( I ), I = 1, NIDIM )\n      DO 10 I = 1, NIDIM\n         IF( IDIM( I ).LT.0.OR.IDIM( I ).GT.NMAX )THEN\n            WRITE( NOUT, FMT = 9996 )NMAX\n            GO TO 220\n         END IF\n   10 CONTINUE\n*     Values of ALPHA\n      READ( NIN, FMT = * )NALF\n      IF( NALF.LT.1.OR.NALF.GT.NALMAX )THEN\n         WRITE( NOUT, FMT = 9997 )'ALPHA', NALMAX\n         GO TO 220\n      END IF\n      READ( NIN, FMT = * )( ALF( I ), I = 1, NALF )\n*     Values of BETA\n      READ( NIN, FMT = * )NBET\n      IF( NBET.LT.1.OR.NBET.GT.NBEMAX )THEN\n         WRITE( NOUT, FMT = 9997 )'BETA', NBEMAX\n         GO TO 220\n      END IF\n      READ( NIN, FMT = * )( BET( I ), I = 1, NBET )\n*\n*     Report values of parameters.\n*\n      WRITE( NOUT, FMT = 9995 )\n      WRITE( NOUT, FMT = 9994 )( IDIM( I ), I = 1, NIDIM )\n      WRITE( NOUT, FMT = 9993 )( ALF( I ), I = 1, NALF )\n      WRITE( NOUT, FMT = 9992 )( BET( I ), I = 1, NBET )\n      IF( .NOT.TSTERR )THEN\n         WRITE( NOUT, FMT = * )\n         WRITE( NOUT, FMT = 9984 )\n      END IF\n      WRITE( NOUT, FMT = * )\n      WRITE( NOUT, FMT = 9999 )THRESH\n      WRITE( NOUT, FMT = * )\n*\n*     Read names of subroutines and flags which indicate\n*     whether they are to be tested.\n*\n      DO 20 I = 1, NSUBS\n         LTEST( I ) = .FALSE.\n   20 CONTINUE\n   30 READ( NIN, FMT = 9988, END = 60 )SNAMET, LTESTT\n      DO 40 I = 1, NSUBS\n         IF( SNAMET.EQ.SNAMES( I ) )\n     $      GO TO 50\n   40 CONTINUE\n      WRITE( NOUT, FMT = 9990 )SNAMET\n      STOP\n   50 LTEST( I ) = LTESTT\n      GO TO 30\n*\n   60 CONTINUE\n      CLOSE ( NIN )\n*\n*     Compute EPS (the machine precision).\n*\n      EPS = EPSILON(RZERO)\n      WRITE( NOUT, FMT = 9998 )EPS\n*\n*     Check the reliability of CMMCH using exact data.\n*\n      N = MIN( 32, NMAX )\n      DO 100 J = 1, N\n         DO 90 I = 1, N\n            AB( I, J ) = MAX( I - J + 1, 0 )\n   90    CONTINUE\n         AB( J, NMAX + 1 ) = J\n         AB( 1, NMAX + J ) = J\n         C( J, 1 ) = ZERO\n  100 CONTINUE\n      DO 110 J = 1, N\n         CC( J ) = J*( ( J + 1 )*J )/2 - ( ( J + 1 )*J*( J - 1 ) )/3\n  110 CONTINUE\n*     CC holds the exact result. On exit from CMMCH CT holds\n*     the result computed by CMMCH.\n      TRANSA = 'N'\n      TRANSB = 'N'\n      CALL CMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,\n     $            AB( 1, NMAX + 1 ), NMAX, ZERO, C, NMAX, CT, G, CC,\n     $            NMAX, EPS, ERR, FATAL, NOUT, .TRUE. )\n      SAME = LCE( CC, CT, N )\n      IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN\n         WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR\n         STOP\n      END IF\n      TRANSB = 'C'\n      CALL CMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,\n     $            AB( 1, NMAX + 1 ), NMAX, ZERO, C, NMAX, CT, G, CC,\n     $            NMAX, EPS, ERR, FATAL, NOUT, .TRUE. )\n      SAME = LCE( CC, CT, N )\n      IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN\n         WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR\n         STOP\n      END IF\n      DO 120 J = 1, N\n         AB( J, NMAX + 1 ) = N - J + 1\n         AB( 1, NMAX + J ) = N - J + 1\n  120 CONTINUE\n      DO 130 J = 1, N\n         CC( N - J + 1 ) = J*( ( J + 1 )*J )/2 -\n     $                     ( ( J + 1 )*J*( J - 1 ) )/3\n  130 CONTINUE\n      TRANSA = 'C'\n      TRANSB = 'N'\n      CALL CMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,\n     $            AB( 1, NMAX + 1 ), NMAX, ZERO, C, NMAX, CT, G, CC,\n     $            NMAX, EPS, ERR, FATAL, NOUT, .TRUE. )\n      SAME = LCE( CC, CT, N )\n      IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN\n         WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR\n         STOP\n      END IF\n      TRANSB = 'C'\n      CALL CMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,\n     $            AB( 1, NMAX + 1 ), NMAX, ZERO, C, NMAX, CT, G, CC,\n     $            NMAX, EPS, ERR, FATAL, NOUT, .TRUE. )\n      SAME = LCE( CC, CT, N )\n      IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN\n         WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR\n         STOP\n      END IF\n*\n*     Test each subroutine in turn.\n*\n      DO 200 ISNUM = 1, NSUBS\n         WRITE( NOUT, FMT = * )\n         IF( .NOT.LTEST( ISNUM ) )THEN\n*           Subprogram is not to be tested.\n            WRITE( NOUT, FMT = 9987 )SNAMES( ISNUM )\n         ELSE\n            SRNAMT = SNAMES( ISNUM )\n*           Test error exits.\n            IF( TSTERR )THEN\n               CALL CCHKE( ISNUM, SNAMES( ISNUM ), NOUT )\n               WRITE( NOUT, FMT = * )\n            END IF\n*           Test computations.\n            INFOT = 0\n            OK = .TRUE.\n            FATAL = .FALSE.\n            GO TO ( 140, 150, 150, 160, 160, 170, 170,\n     $              180, 180 )ISNUM\n*           Test CGEMM, 01.\n  140       CALL CCHK1( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET,\n     $                  NMAX, AB, AA, AS, AB( 1, NMAX + 1 ), BB, BS, C,\n     $                  CC, CS, CT, G )\n            GO TO 190\n*           Test CHEMM, 02, CSYMM, 03.\n  150       CALL CCHK2( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET,\n     $                  NMAX, AB, AA, AS, AB( 1, NMAX + 1 ), BB, BS, C,\n     $                  CC, CS, CT, G )\n            GO TO 190\n*           Test CTRMM, 04, CTRSM, 05.\n  160       CALL CCHK3( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NALF, ALF, NMAX, AB,\n     $                  AA, AS, AB( 1, NMAX + 1 ), BB, BS, CT, G, C )\n            GO TO 190\n*           Test CHERK, 06, CSYRK, 07.\n  170       CALL CCHK4( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET,\n     $                  NMAX, AB, AA, AS, AB( 1, NMAX + 1 ), BB, BS, C,\n     $                  CC, CS, CT, G )\n            GO TO 190\n*           Test CHER2K, 08, CSYR2K, 09.\n  180       CALL CCHK5( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET,\n     $                  NMAX, AB, AA, AS, BB, BS, C, CC, CS, CT, G, W )\n            GO TO 190\n*\n  190       IF( FATAL.AND.SFATAL )\n     $         GO TO 210\n         END IF\n  200 CONTINUE\n      WRITE( NOUT, FMT = 9986 )\n      GO TO 230\n*\n  210 CONTINUE\n      WRITE( NOUT, FMT = 9985 )\n      GO TO 230\n*\n  220 CONTINUE\n      WRITE( NOUT, FMT = 9991 )\n*\n  230 CONTINUE\n      IF( TRACE )\n     $   CLOSE ( NTRA )\n      CLOSE ( NOUT )\n      STOP\n*\n 9999 FORMAT( ' ROUTINES PASS COMPUTATIONAL TESTS IF TEST RATIO IS LES',\n     $      'S THAN', F8.2 )\n 9998 FORMAT( ' RELATIVE MACHINE PRECISION IS TAKEN TO BE', 1P, E9.1 )\n 9997 FORMAT( ' NUMBER OF VALUES OF ', A, ' IS LESS THAN 1 OR GREATER ',\n     $      'THAN ', I2 )\n 9996 FORMAT( ' VALUE OF N IS LESS THAN 0 OR GREATER THAN ', I2 )\n 9995 FORMAT( ' TESTS OF THE COMPLEX          LEVEL 3 BLAS', //' THE F',\n     $      'OLLOWING PARAMETER VALUES WILL BE USED:' )\n 9994 FORMAT( '   FOR N              ', 9I6 )\n 9993 FORMAT( '   FOR ALPHA          ',\n     $      7( '(', F4.1, ',', F4.1, ')  ', : ) )\n 9992 FORMAT( '   FOR BETA           ',\n     $      7( '(', F4.1, ',', F4.1, ')  ', : ) )\n 9991 FORMAT( ' AMEND DATA FILE OR INCREASE ARRAY SIZES IN PROGRAM',\n     $      /' ******* TESTS ABANDONED *******' )\n 9990 FORMAT( ' SUBPROGRAM NAME ', A6, ' NOT RECOGNIZED', /' ******* T',\n     $      'ESTS ABANDONED *******' )\n 9989 FORMAT( ' ERROR IN CMMCH -  IN-LINE DOT PRODUCTS ARE BEING EVALU',\n     $      'ATED WRONGLY.', /' CMMCH WAS CALLED WITH TRANSA = ', A1,\n     $      ' AND TRANSB = ', A1, /' AND RETURNED SAME = ', L1, ' AND ',\n     $      'ERR = ', F12.3, '.', /' THIS MAY BE DUE TO FAULTS IN THE ',\n     $      'ARITHMETIC OR THE COMPILER.', /' ******* TESTS ABANDONED ',\n     $      '*******' )\n 9988 FORMAT( A6, L2 )\n 9987 FORMAT( 1X, A6, ' WAS NOT TESTED' )\n 9986 FORMAT( /' END OF TESTS' )\n 9985 FORMAT( /' ******* FATAL ERROR - TESTS ABANDONED *******' )\n 9984 FORMAT( ' ERROR-EXITS WILL NOT BE TESTED' )\n*\n*     End of CBLAT3.\n*\n      END\n      SUBROUTINE CCHK1( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET, NMAX,\n     $                  A, AA, AS, B, BB, BS, C, CC, CS, CT, G )\n*\n*  Tests CGEMM.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Parameters ..\n      COMPLEX            ZERO\n      PARAMETER          ( ZERO = ( 0.0, 0.0 ) )\n      REAL               RZERO\n      PARAMETER          ( RZERO = 0.0 )\n*     .. Scalar Arguments ..\n      REAL               EPS, THRESH\n      INTEGER            NALF, NBET, NIDIM, NMAX, NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      COMPLEX            A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),\n     $                   AS( NMAX*NMAX ), B( NMAX, NMAX ),\n     $                   BB( NMAX*NMAX ), BET( NBET ), BS( NMAX*NMAX ),\n     $                   C( NMAX, NMAX ), CC( NMAX*NMAX ),\n     $                   CS( NMAX*NMAX ), CT( NMAX )\n      REAL               G( NMAX )\n      INTEGER            IDIM( NIDIM )\n*     .. Local Scalars ..\n      COMPLEX            ALPHA, ALS, BETA, BLS\n      REAL               ERR, ERRMAX\n      INTEGER            I, IA, IB, ICA, ICB, IK, IM, IN, K, KS, LAA,\n     $                   LBB, LCC, LDA, LDAS, LDB, LDBS, LDC, LDCS, M,\n     $                   MA, MB, MS, N, NA, NARGS, NB, NC, NS\n      LOGICAL            NULL, RESET, SAME, TRANA, TRANB\n      CHARACTER*1        TRANAS, TRANBS, TRANSA, TRANSB\n      CHARACTER*3        ICH\n*     .. Local Arrays ..\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LCE, LCERES\n      EXTERNAL           LCE, LCERES\n*     .. External Subroutines ..\n      EXTERNAL           CGEMM, CMAKE, CMMCH\n*     .. Intrinsic Functions ..\n      INTRINSIC          MAX\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICH/'NTC'/\n*     .. Executable Statements ..\n*\n      NARGS = 13\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = RZERO\n*\n      DO 110 IM = 1, NIDIM\n         M = IDIM( IM )\n*\n         DO 100 IN = 1, NIDIM\n            N = IDIM( IN )\n*           Set LDC to 1 more than minimum value if room.\n            LDC = M\n            IF( LDC.LT.NMAX )\n     $         LDC = LDC + 1\n*           Skip tests if not enough room.\n            IF( LDC.GT.NMAX )\n     $         GO TO 100\n            LCC = LDC*N\n            NULL = N.LE.0.OR.M.LE.0\n*\n            DO 90 IK = 1, NIDIM\n               K = IDIM( IK )\n*\n               DO 80 ICA = 1, 3\n                  TRANSA = ICH( ICA: ICA )\n                  TRANA = TRANSA.EQ.'T'.OR.TRANSA.EQ.'C'\n*\n                  IF( TRANA )THEN\n                     MA = K\n                     NA = M\n                  ELSE\n                     MA = M\n                     NA = K\n                  END IF\n*                 Set LDA to 1 more than minimum value if room.\n                  LDA = MA\n                  IF( LDA.LT.NMAX )\n     $               LDA = LDA + 1\n*                 Skip tests if not enough room.\n                  IF( LDA.GT.NMAX )\n     $               GO TO 80\n                  LAA = LDA*NA\n*\n*                 Generate the matrix A.\n*\n                  CALL CMAKE( 'GE', ' ', ' ', MA, NA, A, NMAX, AA, LDA,\n     $                        RESET, ZERO )\n*\n                  DO 70 ICB = 1, 3\n                     TRANSB = ICH( ICB: ICB )\n                     TRANB = TRANSB.EQ.'T'.OR.TRANSB.EQ.'C'\n*\n                     IF( TRANB )THEN\n                        MB = N\n                        NB = K\n                     ELSE\n                        MB = K\n                        NB = N\n                     END IF\n*                    Set LDB to 1 more than minimum value if room.\n                     LDB = MB\n                     IF( LDB.LT.NMAX )\n     $                  LDB = LDB + 1\n*                    Skip tests if not enough room.\n                     IF( LDB.GT.NMAX )\n     $                  GO TO 70\n                     LBB = LDB*NB\n*\n*                    Generate the matrix B.\n*\n                     CALL CMAKE( 'GE', ' ', ' ', MB, NB, B, NMAX, BB,\n     $                           LDB, RESET, ZERO )\n*\n                     DO 60 IA = 1, NALF\n                        ALPHA = ALF( IA )\n*\n                        DO 50 IB = 1, NBET\n                           BETA = BET( IB )\n*\n*                          Generate the matrix C.\n*\n                           CALL CMAKE( 'GE', ' ', ' ', M, N, C, NMAX,\n     $                                 CC, LDC, RESET, ZERO )\n*\n                           NC = NC + 1\n*\n*                          Save every datum before calling the\n*                          subroutine.\n*\n                           TRANAS = TRANSA\n                           TRANBS = TRANSB\n                           MS = M\n                           NS = N\n                           KS = K\n                           ALS = ALPHA\n                           DO 10 I = 1, LAA\n                              AS( I ) = AA( I )\n   10                      CONTINUE\n                           LDAS = LDA\n                           DO 20 I = 1, LBB\n                              BS( I ) = BB( I )\n   20                      CONTINUE\n                           LDBS = LDB\n                           BLS = BETA\n                           DO 30 I = 1, LCC\n                              CS( I ) = CC( I )\n   30                      CONTINUE\n                           LDCS = LDC\n*\n*                          Call the subroutine.\n*\n                           IF( TRACE )\n     $                        WRITE( NTRA, FMT = 9995 )NC, SNAME,\n     $                        TRANSA, TRANSB, M, N, K, ALPHA, LDA, LDB,\n     $                        BETA, LDC\n                           IF( REWI )\n     $                        REWIND NTRA\n                           CALL CGEMM( TRANSA, TRANSB, M, N, K, ALPHA,\n     $                                 AA, LDA, BB, LDB, BETA, CC, LDC )\n*\n*                          Check if error-exit was taken incorrectly.\n*\n                           IF( .NOT.OK )THEN\n                              WRITE( NOUT, FMT = 9994 )\n                              FATAL = .TRUE.\n                              GO TO 120\n                           END IF\n*\n*                          See what data changed inside subroutines.\n*\n                           ISAME( 1 ) = TRANSA.EQ.TRANAS\n                           ISAME( 2 ) = TRANSB.EQ.TRANBS\n                           ISAME( 3 ) = MS.EQ.M\n                           ISAME( 4 ) = NS.EQ.N\n                           ISAME( 5 ) = KS.EQ.K\n                           ISAME( 6 ) = ALS.EQ.ALPHA\n                           ISAME( 7 ) = LCE( AS, AA, LAA )\n                           ISAME( 8 ) = LDAS.EQ.LDA\n                           ISAME( 9 ) = LCE( BS, BB, LBB )\n                           ISAME( 10 ) = LDBS.EQ.LDB\n                           ISAME( 11 ) = BLS.EQ.BETA\n                           IF( NULL )THEN\n                              ISAME( 12 ) = LCE( CS, CC, LCC )\n                           ELSE\n                              ISAME( 12 ) = LCERES( 'GE', ' ', M, N, CS,\n     $                                      CC, LDC )\n                           END IF\n                           ISAME( 13 ) = LDCS.EQ.LDC\n*\n*                          If data was incorrectly changed, report\n*                          and return.\n*\n                           SAME = .TRUE.\n                           DO 40 I = 1, NARGS\n                              SAME = SAME.AND.ISAME( I )\n                              IF( .NOT.ISAME( I ) )\n     $                           WRITE( NOUT, FMT = 9998 )I\n   40                      CONTINUE\n                           IF( .NOT.SAME )THEN\n                              FATAL = .TRUE.\n                              GO TO 120\n                           END IF\n*\n                           IF( .NOT.NULL )THEN\n*\n*                             Check the result.\n*\n                              CALL CMMCH( TRANSA, TRANSB, M, N, K,\n     $                                    ALPHA, A, NMAX, B, NMAX, BETA,\n     $                                    C, NMAX, CT, G, CC, LDC, EPS,\n     $                                    ERR, FATAL, NOUT, .TRUE. )\n                              ERRMAX = MAX( ERRMAX, ERR )\n*                             If got really bad answer, report and\n*                             return.\n                              IF( FATAL )\n     $                           GO TO 120\n                           END IF\n*\n   50                   CONTINUE\n*\n   60                CONTINUE\n*\n   70             CONTINUE\n*\n   80          CONTINUE\n*\n   90       CONTINUE\n*\n  100    CONTINUE\n*\n  110 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 130\n*\n  120 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      WRITE( NOUT, FMT = 9995 )NC, SNAME, TRANSA, TRANSB, M, N, K,\n     $   ALPHA, LDA, LDB, BETA, LDC\n*\n  130 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',''', A1, ''',',\n     $      3( I3, ',' ), '(', F4.1, ',', F4.1, '), A,', I3, ', B,', I3,\n     $      ',(', F4.1, ',', F4.1, '), C,', I3, ').' )\n 9994 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of CCHK1.\n*\n      END\n      SUBROUTINE CCHK2( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET, NMAX,\n     $                  A, AA, AS, B, BB, BS, C, CC, CS, CT, G )\n*\n*  Tests CHEMM and CSYMM.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Parameters ..\n      COMPLEX            ZERO\n      PARAMETER          ( ZERO = ( 0.0, 0.0 ) )\n      REAL               RZERO\n      PARAMETER          ( RZERO = 0.0 )\n*     .. Scalar Arguments ..\n      REAL               EPS, THRESH\n      INTEGER            NALF, NBET, NIDIM, NMAX, NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      COMPLEX            A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),\n     $                   AS( NMAX*NMAX ), B( NMAX, NMAX ),\n     $                   BB( NMAX*NMAX ), BET( NBET ), BS( NMAX*NMAX ),\n     $                   C( NMAX, NMAX ), CC( NMAX*NMAX ),\n     $                   CS( NMAX*NMAX ), CT( NMAX )\n      REAL               G( NMAX )\n      INTEGER            IDIM( NIDIM )\n*     .. Local Scalars ..\n      COMPLEX            ALPHA, ALS, BETA, BLS\n      REAL               ERR, ERRMAX\n      INTEGER            I, IA, IB, ICS, ICU, IM, IN, LAA, LBB, LCC,\n     $                   LDA, LDAS, LDB, LDBS, LDC, LDCS, M, MS, N, NA,\n     $                   NARGS, NC, NS\n      LOGICAL            CONJ, LEFT, NULL, RESET, SAME\n      CHARACTER*1        SIDE, SIDES, UPLO, UPLOS\n      CHARACTER*2        ICHS, ICHU\n*     .. Local Arrays ..\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LCE, LCERES\n      EXTERNAL           LCE, LCERES\n*     .. External Subroutines ..\n      EXTERNAL           CHEMM, CMAKE, CMMCH, CSYMM\n*     .. Intrinsic Functions ..\n      INTRINSIC          MAX\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICHS/'LR'/, ICHU/'UL'/\n*     .. Executable Statements ..\n      CONJ = SNAME( 2: 3 ).EQ.'HE'\n*\n      NARGS = 12\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = RZERO\n*\n      DO 100 IM = 1, NIDIM\n         M = IDIM( IM )\n*\n         DO 90 IN = 1, NIDIM\n            N = IDIM( IN )\n*           Set LDC to 1 more than minimum value if room.\n            LDC = M\n            IF( LDC.LT.NMAX )\n     $         LDC = LDC + 1\n*           Skip tests if not enough room.\n            IF( LDC.GT.NMAX )\n     $         GO TO 90\n            LCC = LDC*N\n            NULL = N.LE.0.OR.M.LE.0\n*           Set LDB to 1 more than minimum value if room.\n            LDB = M\n            IF( LDB.LT.NMAX )\n     $         LDB = LDB + 1\n*           Skip tests if not enough room.\n            IF( LDB.GT.NMAX )\n     $         GO TO 90\n            LBB = LDB*N\n*\n*           Generate the matrix B.\n*\n            CALL CMAKE( 'GE', ' ', ' ', M, N, B, NMAX, BB, LDB, RESET,\n     $                  ZERO )\n*\n            DO 80 ICS = 1, 2\n               SIDE = ICHS( ICS: ICS )\n               LEFT = SIDE.EQ.'L'\n*\n               IF( LEFT )THEN\n                  NA = M\n               ELSE\n                  NA = N\n               END IF\n*              Set LDA to 1 more than minimum value if room.\n               LDA = NA\n               IF( LDA.LT.NMAX )\n     $            LDA = LDA + 1\n*              Skip tests if not enough room.\n               IF( LDA.GT.NMAX )\n     $            GO TO 80\n               LAA = LDA*NA\n*\n               DO 70 ICU = 1, 2\n                  UPLO = ICHU( ICU: ICU )\n*\n*                 Generate the hermitian or symmetric matrix A.\n*\n                  CALL CMAKE( SNAME( 2: 3 ), UPLO, ' ', NA, NA, A, NMAX,\n     $                        AA, LDA, RESET, ZERO )\n*\n                  DO 60 IA = 1, NALF\n                     ALPHA = ALF( IA )\n*\n                     DO 50 IB = 1, NBET\n                        BETA = BET( IB )\n*\n*                       Generate the matrix C.\n*\n                        CALL CMAKE( 'GE', ' ', ' ', M, N, C, NMAX, CC,\n     $                              LDC, RESET, ZERO )\n*\n                        NC = NC + 1\n*\n*                       Save every datum before calling the\n*                       subroutine.\n*\n                        SIDES = SIDE\n                        UPLOS = UPLO\n                        MS = M\n                        NS = N\n                        ALS = ALPHA\n                        DO 10 I = 1, LAA\n                           AS( I ) = AA( I )\n   10                   CONTINUE\n                        LDAS = LDA\n                        DO 20 I = 1, LBB\n                           BS( I ) = BB( I )\n   20                   CONTINUE\n                        LDBS = LDB\n                        BLS = BETA\n                        DO 30 I = 1, LCC\n                           CS( I ) = CC( I )\n   30                   CONTINUE\n                        LDCS = LDC\n*\n*                       Call the subroutine.\n*\n                        IF( TRACE )\n     $                     WRITE( NTRA, FMT = 9995 )NC, SNAME, SIDE,\n     $                     UPLO, M, N, ALPHA, LDA, LDB, BETA, LDC\n                        IF( REWI )\n     $                     REWIND NTRA\n                        IF( CONJ )THEN\n                           CALL CHEMM( SIDE, UPLO, M, N, ALPHA, AA, LDA,\n     $                                 BB, LDB, BETA, CC, LDC )\n                        ELSE\n                           CALL CSYMM( SIDE, UPLO, M, N, ALPHA, AA, LDA,\n     $                                 BB, LDB, BETA, CC, LDC )\n                        END IF\n*\n*                       Check if error-exit was taken incorrectly.\n*\n                        IF( .NOT.OK )THEN\n                           WRITE( NOUT, FMT = 9994 )\n                           FATAL = .TRUE.\n                           GO TO 110\n                        END IF\n*\n*                       See what data changed inside subroutines.\n*\n                        ISAME( 1 ) = SIDES.EQ.SIDE\n                        ISAME( 2 ) = UPLOS.EQ.UPLO\n                        ISAME( 3 ) = MS.EQ.M\n                        ISAME( 4 ) = NS.EQ.N\n                        ISAME( 5 ) = ALS.EQ.ALPHA\n                        ISAME( 6 ) = LCE( AS, AA, LAA )\n                        ISAME( 7 ) = LDAS.EQ.LDA\n                        ISAME( 8 ) = LCE( BS, BB, LBB )\n                        ISAME( 9 ) = LDBS.EQ.LDB\n                        ISAME( 10 ) = BLS.EQ.BETA\n                        IF( NULL )THEN\n                           ISAME( 11 ) = LCE( CS, CC, LCC )\n                        ELSE\n                           ISAME( 11 ) = LCERES( 'GE', ' ', M, N, CS,\n     $                                   CC, LDC )\n                        END IF\n                        ISAME( 12 ) = LDCS.EQ.LDC\n*\n*                       If data was incorrectly changed, report and\n*                       return.\n*\n                        SAME = .TRUE.\n                        DO 40 I = 1, NARGS\n                           SAME = SAME.AND.ISAME( I )\n                           IF( .NOT.ISAME( I ) )\n     $                        WRITE( NOUT, FMT = 9998 )I\n   40                   CONTINUE\n                        IF( .NOT.SAME )THEN\n                           FATAL = .TRUE.\n                           GO TO 110\n                        END IF\n*\n                        IF( .NOT.NULL )THEN\n*\n*                          Check the result.\n*\n                           IF( LEFT )THEN\n                              CALL CMMCH( 'N', 'N', M, N, M, ALPHA, A,\n     $                                    NMAX, B, NMAX, BETA, C, NMAX,\n     $                                    CT, G, CC, LDC, EPS, ERR,\n     $                                    FATAL, NOUT, .TRUE. )\n                           ELSE\n                              CALL CMMCH( 'N', 'N', M, N, N, ALPHA, B,\n     $                                    NMAX, A, NMAX, BETA, C, NMAX,\n     $                                    CT, G, CC, LDC, EPS, ERR,\n     $                                    FATAL, NOUT, .TRUE. )\n                           END IF\n                           ERRMAX = MAX( ERRMAX, ERR )\n*                          If got really bad answer, report and\n*                          return.\n                           IF( FATAL )\n     $                        GO TO 110\n                        END IF\n*\n   50                CONTINUE\n*\n   60             CONTINUE\n*\n   70          CONTINUE\n*\n   80       CONTINUE\n*\n   90    CONTINUE\n*\n  100 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 120\n*\n  110 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      WRITE( NOUT, FMT = 9995 )NC, SNAME, SIDE, UPLO, M, N, ALPHA, LDA,\n     $   LDB, BETA, LDC\n*\n  120 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( 1X, I6, ': ', A6, '(', 2( '''', A1, ''',' ), 2( I3, ',' ),\n     $      '(', F4.1, ',', F4.1, '), A,', I3, ', B,', I3, ',(', F4.1,\n     $      ',', F4.1, '), C,', I3, ')    .' )\n 9994 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of CCHK2.\n*\n      END\n      SUBROUTINE CCHK3( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NALF, ALF, NMAX, A, AA, AS,\n     $                  B, BB, BS, CT, G, C )\n*\n*  Tests CTRMM and CTRSM.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Parameters ..\n      COMPLEX            ZERO, ONE\n      PARAMETER          ( ZERO = ( 0.0, 0.0 ), ONE = ( 1.0, 0.0 ) )\n      REAL               RZERO\n      PARAMETER          ( RZERO = 0.0 )\n*     .. Scalar Arguments ..\n      REAL               EPS, THRESH\n      INTEGER            NALF, NIDIM, NMAX, NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      COMPLEX            A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),\n     $                   AS( NMAX*NMAX ), B( NMAX, NMAX ),\n     $                   BB( NMAX*NMAX ), BS( NMAX*NMAX ),\n     $                   C( NMAX, NMAX ), CT( NMAX )\n      REAL               G( NMAX )\n      INTEGER            IDIM( NIDIM )\n*     .. Local Scalars ..\n      COMPLEX            ALPHA, ALS\n      REAL               ERR, ERRMAX\n      INTEGER            I, IA, ICD, ICS, ICT, ICU, IM, IN, J, LAA, LBB,\n     $                   LDA, LDAS, LDB, LDBS, M, MS, N, NA, NARGS, NC,\n     $                   NS\n      LOGICAL            LEFT, NULL, RESET, SAME\n      CHARACTER*1        DIAG, DIAGS, SIDE, SIDES, TRANAS, TRANSA, UPLO,\n     $                   UPLOS\n      CHARACTER*2        ICHD, ICHS, ICHU\n      CHARACTER*3        ICHT\n*     .. Local Arrays ..\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LCE, LCERES\n      EXTERNAL           LCE, LCERES\n*     .. External Subroutines ..\n      EXTERNAL           CMAKE, CMMCH, CTRMM, CTRSM\n*     .. Intrinsic Functions ..\n      INTRINSIC          MAX\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICHU/'UL'/, ICHT/'NTC'/, ICHD/'UN'/, ICHS/'LR'/\n*     .. Executable Statements ..\n*\n      NARGS = 11\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = RZERO\n*     Set up zero matrix for CMMCH.\n      DO 20 J = 1, NMAX\n         DO 10 I = 1, NMAX\n            C( I, J ) = ZERO\n   10    CONTINUE\n   20 CONTINUE\n*\n      DO 140 IM = 1, NIDIM\n         M = IDIM( IM )\n*\n         DO 130 IN = 1, NIDIM\n            N = IDIM( IN )\n*           Set LDB to 1 more than minimum value if room.\n            LDB = M\n            IF( LDB.LT.NMAX )\n     $         LDB = LDB + 1\n*           Skip tests if not enough room.\n            IF( LDB.GT.NMAX )\n     $         GO TO 130\n            LBB = LDB*N\n            NULL = M.LE.0.OR.N.LE.0\n*\n            DO 120 ICS = 1, 2\n               SIDE = ICHS( ICS: ICS )\n               LEFT = SIDE.EQ.'L'\n               IF( LEFT )THEN\n                  NA = M\n               ELSE\n                  NA = N\n               END IF\n*              Set LDA to 1 more than minimum value if room.\n               LDA = NA\n               IF( LDA.LT.NMAX )\n     $            LDA = LDA + 1\n*              Skip tests if not enough room.\n               IF( LDA.GT.NMAX )\n     $            GO TO 130\n               LAA = LDA*NA\n*\n               DO 110 ICU = 1, 2\n                  UPLO = ICHU( ICU: ICU )\n*\n                  DO 100 ICT = 1, 3\n                     TRANSA = ICHT( ICT: ICT )\n*\n                     DO 90 ICD = 1, 2\n                        DIAG = ICHD( ICD: ICD )\n*\n                        DO 80 IA = 1, NALF\n                           ALPHA = ALF( IA )\n*\n*                          Generate the matrix A.\n*\n                           CALL CMAKE( 'TR', UPLO, DIAG, NA, NA, A,\n     $                                 NMAX, AA, LDA, RESET, ZERO )\n*\n*                          Generate the matrix B.\n*\n                           CALL CMAKE( 'GE', ' ', ' ', M, N, B, NMAX,\n     $                                 BB, LDB, RESET, ZERO )\n*\n                           NC = NC + 1\n*\n*                          Save every datum before calling the\n*                          subroutine.\n*\n                           SIDES = SIDE\n                           UPLOS = UPLO\n                           TRANAS = TRANSA\n                           DIAGS = DIAG\n                           MS = M\n                           NS = N\n                           ALS = ALPHA\n                           DO 30 I = 1, LAA\n                              AS( I ) = AA( I )\n   30                      CONTINUE\n                           LDAS = LDA\n                           DO 40 I = 1, LBB\n                              BS( I ) = BB( I )\n   40                      CONTINUE\n                           LDBS = LDB\n*\n*                          Call the subroutine.\n*\n                           IF( SNAME( 4: 5 ).EQ.'MM' )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9995 )NC, SNAME,\n     $                           SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA,\n     $                           LDA, LDB\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL CTRMM( SIDE, UPLO, TRANSA, DIAG, M,\n     $                                    N, ALPHA, AA, LDA, BB, LDB )\n                           ELSE IF( SNAME( 4: 5 ).EQ.'SM' )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9995 )NC, SNAME,\n     $                           SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA,\n     $                           LDA, LDB\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL CTRSM( SIDE, UPLO, TRANSA, DIAG, M,\n     $                                    N, ALPHA, AA, LDA, BB, LDB )\n                           END IF\n*\n*                          Check if error-exit was taken incorrectly.\n*\n                           IF( .NOT.OK )THEN\n                              WRITE( NOUT, FMT = 9994 )\n                              FATAL = .TRUE.\n                              GO TO 150\n                           END IF\n*\n*                          See what data changed inside subroutines.\n*\n                           ISAME( 1 ) = SIDES.EQ.SIDE\n                           ISAME( 2 ) = UPLOS.EQ.UPLO\n                           ISAME( 3 ) = TRANAS.EQ.TRANSA\n                           ISAME( 4 ) = DIAGS.EQ.DIAG\n                           ISAME( 5 ) = MS.EQ.M\n                           ISAME( 6 ) = NS.EQ.N\n                           ISAME( 7 ) = ALS.EQ.ALPHA\n                           ISAME( 8 ) = LCE( AS, AA, LAA )\n                           ISAME( 9 ) = LDAS.EQ.LDA\n                           IF( NULL )THEN\n                              ISAME( 10 ) = LCE( BS, BB, LBB )\n                           ELSE\n                              ISAME( 10 ) = LCERES( 'GE', ' ', M, N, BS,\n     $                                      BB, LDB )\n                           END IF\n                           ISAME( 11 ) = LDBS.EQ.LDB\n*\n*                          If data was incorrectly changed, report and\n*                          return.\n*\n                           SAME = .TRUE.\n                           DO 50 I = 1, NARGS\n                              SAME = SAME.AND.ISAME( I )\n                              IF( .NOT.ISAME( I ) )\n     $                           WRITE( NOUT, FMT = 9998 )I\n   50                      CONTINUE\n                           IF( .NOT.SAME )THEN\n                              FATAL = .TRUE.\n                              GO TO 150\n                           END IF\n*\n                           IF( .NOT.NULL )THEN\n                              IF( SNAME( 4: 5 ).EQ.'MM' )THEN\n*\n*                                Check the result.\n*\n                                 IF( LEFT )THEN\n                                    CALL CMMCH( TRANSA, 'N', M, N, M,\n     $                                          ALPHA, A, NMAX, B, NMAX,\n     $                                          ZERO, C, NMAX, CT, G,\n     $                                          BB, LDB, EPS, ERR,\n     $                                          FATAL, NOUT, .TRUE. )\n                                 ELSE\n                                    CALL CMMCH( 'N', TRANSA, M, N, N,\n     $                                          ALPHA, B, NMAX, A, NMAX,\n     $                                          ZERO, C, NMAX, CT, G,\n     $                                          BB, LDB, EPS, ERR,\n     $                                          FATAL, NOUT, .TRUE. )\n                                 END IF\n                              ELSE IF( SNAME( 4: 5 ).EQ.'SM' )THEN\n*\n*                                Compute approximation to original\n*                                matrix.\n*\n                                 DO 70 J = 1, N\n                                    DO 60 I = 1, M\n                                       C( I, J ) = BB( I + ( J - 1 )*\n     $                                             LDB )\n                                       BB( I + ( J - 1 )*LDB ) = ALPHA*\n     $                                    B( I, J )\n   60                               CONTINUE\n   70                            CONTINUE\n*\n                                 IF( LEFT )THEN\n                                    CALL CMMCH( TRANSA, 'N', M, N, M,\n     $                                          ONE, A, NMAX, C, NMAX,\n     $                                          ZERO, B, NMAX, CT, G,\n     $                                          BB, LDB, EPS, ERR,\n     $                                          FATAL, NOUT, .FALSE. )\n                                 ELSE\n                                    CALL CMMCH( 'N', TRANSA, M, N, N,\n     $                                          ONE, C, NMAX, A, NMAX,\n     $                                          ZERO, B, NMAX, CT, G,\n     $                                          BB, LDB, EPS, ERR,\n     $                                          FATAL, NOUT, .FALSE. )\n                                 END IF\n                              END IF\n                              ERRMAX = MAX( ERRMAX, ERR )\n*                             If got really bad answer, report and\n*                             return.\n                              IF( FATAL )\n     $                           GO TO 150\n                           END IF\n*\n   80                   CONTINUE\n*\n   90                CONTINUE\n*\n  100             CONTINUE\n*\n  110          CONTINUE\n*\n  120       CONTINUE\n*\n  130    CONTINUE\n*\n  140 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 160\n*\n  150 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      WRITE( NOUT, FMT = 9995 )NC, SNAME, SIDE, UPLO, TRANSA, DIAG, M,\n     $   N, ALPHA, LDA, LDB\n*\n  160 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( 1X, I6, ': ', A6, '(', 4( '''', A1, ''',' ), 2( I3, ',' ),\n     $      '(', F4.1, ',', F4.1, '), A,', I3, ', B,', I3, ')         ',\n     $      '      .' )\n 9994 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of CCHK3.\n*\n      END\n      SUBROUTINE CCHK4( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET, NMAX,\n     $                  A, AA, AS, B, BB, BS, C, CC, CS, CT, G )\n*\n*  Tests CHERK and CSYRK.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Parameters ..\n      COMPLEX            ZERO\n      PARAMETER          ( ZERO = ( 0.0, 0.0 ) )\n      REAL               RONE, RZERO\n      PARAMETER          ( RONE = 1.0, RZERO = 0.0 )\n*     .. Scalar Arguments ..\n      REAL               EPS, THRESH\n      INTEGER            NALF, NBET, NIDIM, NMAX, NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      COMPLEX            A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),\n     $                   AS( NMAX*NMAX ), B( NMAX, NMAX ),\n     $                   BB( NMAX*NMAX ), BET( NBET ), BS( NMAX*NMAX ),\n     $                   C( NMAX, NMAX ), CC( NMAX*NMAX ),\n     $                   CS( NMAX*NMAX ), CT( NMAX )\n      REAL               G( NMAX )\n      INTEGER            IDIM( NIDIM )\n*     .. Local Scalars ..\n      COMPLEX            ALPHA, ALS, BETA, BETS\n      REAL               ERR, ERRMAX, RALPHA, RALS, RBETA, RBETS\n      INTEGER            I, IA, IB, ICT, ICU, IK, IN, J, JC, JJ, K, KS,\n     $                   LAA, LCC, LDA, LDAS, LDC, LDCS, LJ, MA, N, NA,\n     $                   NARGS, NC, NS\n      LOGICAL            CONJ, NULL, RESET, SAME, TRAN, UPPER\n      CHARACTER*1        TRANS, TRANSS, TRANST, UPLO, UPLOS\n      CHARACTER*2        ICHT, ICHU\n*     .. Local Arrays ..\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LCE, LCERES\n      EXTERNAL           LCE, LCERES\n*     .. External Subroutines ..\n      EXTERNAL           CHERK, CMAKE, CMMCH, CSYRK\n*     .. Intrinsic Functions ..\n      INTRINSIC          CMPLX, MAX, REAL\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICHT/'NC'/, ICHU/'UL'/\n*     .. Executable Statements ..\n      CONJ = SNAME( 2: 3 ).EQ.'HE'\n*\n      NARGS = 10\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = RZERO\n*\n      DO 100 IN = 1, NIDIM\n         N = IDIM( IN )\n*        Set LDC to 1 more than minimum value if room.\n         LDC = N\n         IF( LDC.LT.NMAX )\n     $      LDC = LDC + 1\n*        Skip tests if not enough room.\n         IF( LDC.GT.NMAX )\n     $      GO TO 100\n         LCC = LDC*N\n*\n         DO 90 IK = 1, NIDIM\n            K = IDIM( IK )\n*\n            DO 80 ICT = 1, 2\n               TRANS = ICHT( ICT: ICT )\n               TRAN = TRANS.EQ.'C'\n               IF( TRAN.AND..NOT.CONJ )\n     $            TRANS = 'T'\n               IF( TRAN )THEN\n                  MA = K\n                  NA = N\n               ELSE\n                  MA = N\n                  NA = K\n               END IF\n*              Set LDA to 1 more than minimum value if room.\n               LDA = MA\n               IF( LDA.LT.NMAX )\n     $            LDA = LDA + 1\n*              Skip tests if not enough room.\n               IF( LDA.GT.NMAX )\n     $            GO TO 80\n               LAA = LDA*NA\n*\n*              Generate the matrix A.\n*\n               CALL CMAKE( 'GE', ' ', ' ', MA, NA, A, NMAX, AA, LDA,\n     $                     RESET, ZERO )\n*\n               DO 70 ICU = 1, 2\n                  UPLO = ICHU( ICU: ICU )\n                  UPPER = UPLO.EQ.'U'\n*\n                  DO 60 IA = 1, NALF\n                     ALPHA = ALF( IA )\n                     IF( CONJ )THEN\n                        RALPHA = REAL( ALPHA )\n                        ALPHA = CMPLX( RALPHA, RZERO )\n                     END IF\n*\n                     DO 50 IB = 1, NBET\n                        BETA = BET( IB )\n                        IF( CONJ )THEN\n                           RBETA = REAL( BETA )\n                           BETA = CMPLX( RBETA, RZERO )\n                        END IF\n                        NULL = N.LE.0\n                        IF( CONJ )\n     $                     NULL = NULL.OR.( ( K.LE.0.OR.RALPHA.EQ.\n     $                            RZERO ).AND.RBETA.EQ.RONE )\n*\n*                       Generate the matrix C.\n*\n                        CALL CMAKE( SNAME( 2: 3 ), UPLO, ' ', N, N, C,\n     $                              NMAX, CC, LDC, RESET, ZERO )\n*\n                        NC = NC + 1\n*\n*                       Save every datum before calling the subroutine.\n*\n                        UPLOS = UPLO\n                        TRANSS = TRANS\n                        NS = N\n                        KS = K\n                        IF( CONJ )THEN\n                           RALS = RALPHA\n                        ELSE\n                           ALS = ALPHA\n                        END IF\n                        DO 10 I = 1, LAA\n                           AS( I ) = AA( I )\n   10                   CONTINUE\n                        LDAS = LDA\n                        IF( CONJ )THEN\n                           RBETS = RBETA\n                        ELSE\n                           BETS = BETA\n                        END IF\n                        DO 20 I = 1, LCC\n                           CS( I ) = CC( I )\n   20                   CONTINUE\n                        LDCS = LDC\n*\n*                       Call the subroutine.\n*\n                        IF( CONJ )THEN\n                           IF( TRACE )\n     $                        WRITE( NTRA, FMT = 9994 )NC, SNAME, UPLO,\n     $                        TRANS, N, K, RALPHA, LDA, RBETA, LDC\n                           IF( REWI )\n     $                        REWIND NTRA\n                           CALL CHERK( UPLO, TRANS, N, K, RALPHA, AA,\n     $                                 LDA, RBETA, CC, LDC )\n                        ELSE\n                           IF( TRACE )\n     $                        WRITE( NTRA, FMT = 9993 )NC, SNAME, UPLO,\n     $                        TRANS, N, K, ALPHA, LDA, BETA, LDC\n                           IF( REWI )\n     $                        REWIND NTRA\n                           CALL CSYRK( UPLO, TRANS, N, K, ALPHA, AA,\n     $                                 LDA, BETA, CC, LDC )\n                        END IF\n*\n*                       Check if error-exit was taken incorrectly.\n*\n                        IF( .NOT.OK )THEN\n                           WRITE( NOUT, FMT = 9992 )\n                           FATAL = .TRUE.\n                           GO TO 120\n                        END IF\n*\n*                       See what data changed inside subroutines.\n*\n                        ISAME( 1 ) = UPLOS.EQ.UPLO\n                        ISAME( 2 ) = TRANSS.EQ.TRANS\n                        ISAME( 3 ) = NS.EQ.N\n                        ISAME( 4 ) = KS.EQ.K\n                        IF( CONJ )THEN\n                           ISAME( 5 ) = RALS.EQ.RALPHA\n                        ELSE\n                           ISAME( 5 ) = ALS.EQ.ALPHA\n                        END IF\n                        ISAME( 6 ) = LCE( AS, AA, LAA )\n                        ISAME( 7 ) = LDAS.EQ.LDA\n                        IF( CONJ )THEN\n                           ISAME( 8 ) = RBETS.EQ.RBETA\n                        ELSE\n                           ISAME( 8 ) = BETS.EQ.BETA\n                        END IF\n                        IF( NULL )THEN\n                           ISAME( 9 ) = LCE( CS, CC, LCC )\n                        ELSE\n                           ISAME( 9 ) = LCERES( SNAME( 2: 3 ), UPLO, N,\n     $                                  N, CS, CC, LDC )\n                        END IF\n                        ISAME( 10 ) = LDCS.EQ.LDC\n*\n*                       If data was incorrectly changed, report and\n*                       return.\n*\n                        SAME = .TRUE.\n                        DO 30 I = 1, NARGS\n                           SAME = SAME.AND.ISAME( I )\n                           IF( .NOT.ISAME( I ) )\n     $                        WRITE( NOUT, FMT = 9998 )I\n   30                   CONTINUE\n                        IF( .NOT.SAME )THEN\n                           FATAL = .TRUE.\n                           GO TO 120\n                        END IF\n*\n                        IF( .NOT.NULL )THEN\n*\n*                          Check the result column by column.\n*\n                           IF( CONJ )THEN\n                              TRANST = 'C'\n                           ELSE\n                              TRANST = 'T'\n                           END IF\n                           JC = 1\n                           DO 40 J = 1, N\n                              IF( UPPER )THEN\n                                 JJ = 1\n                                 LJ = J\n                              ELSE\n                                 JJ = J\n                                 LJ = N - J + 1\n                              END IF\n                              IF( TRAN )THEN\n                                 CALL CMMCH( TRANST, 'N', LJ, 1, K,\n     $                                       ALPHA, A( 1, JJ ), NMAX,\n     $                                       A( 1, J ), NMAX, BETA,\n     $                                       C( JJ, J ), NMAX, CT, G,\n     $                                       CC( JC ), LDC, EPS, ERR,\n     $                                       FATAL, NOUT, .TRUE. )\n                              ELSE\n                                 CALL CMMCH( 'N', TRANST, LJ, 1, K,\n     $                                       ALPHA, A( JJ, 1 ), NMAX,\n     $                                       A( J, 1 ), NMAX, BETA,\n     $                                       C( JJ, J ), NMAX, CT, G,\n     $                                       CC( JC ), LDC, EPS, ERR,\n     $                                       FATAL, NOUT, .TRUE. )\n                              END IF\n                              IF( UPPER )THEN\n                                 JC = JC + LDC\n                              ELSE\n                                 JC = JC + LDC + 1\n                              END IF\n                              ERRMAX = MAX( ERRMAX, ERR )\n*                             If got really bad answer, report and\n*                             return.\n                              IF( FATAL )\n     $                           GO TO 110\n   40                      CONTINUE\n                        END IF\n*\n   50                CONTINUE\n*\n   60             CONTINUE\n*\n   70          CONTINUE\n*\n   80       CONTINUE\n*\n   90    CONTINUE\n*\n  100 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 130\n*\n  110 CONTINUE\n      IF( N.GT.1 )\n     $   WRITE( NOUT, FMT = 9995 )J\n*\n  120 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      IF( CONJ )THEN\n         WRITE( NOUT, FMT = 9994 )NC, SNAME, UPLO, TRANS, N, K, RALPHA,\n     $      LDA, RBETA, LDC\n      ELSE\n         WRITE( NOUT, FMT = 9993 )NC, SNAME, UPLO, TRANS, N, K, ALPHA,\n     $      LDA, BETA, LDC\n      END IF\n*\n  130 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( '      THESE ARE THE RESULTS FOR COLUMN ', I3 )\n 9994 FORMAT( 1X, I6, ': ', A6, '(', 2( '''', A1, ''',' ), 2( I3, ',' ),\n     $      F4.1, ', A,', I3, ',', F4.1, ', C,', I3, ')               ',\n     $      '          .' )\n 9993 FORMAT( 1X, I6, ': ', A6, '(', 2( '''', A1, ''',' ), 2( I3, ',' ),\n     $      '(', F4.1, ',', F4.1, ') , A,', I3, ',(', F4.1, ',', F4.1,\n     $      '), C,', I3, ')          .' )\n 9992 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of CCHK4.\n*\n      END\n      SUBROUTINE CCHK5( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET, NMAX,\n     $                  AB, AA, AS, BB, BS, C, CC, CS, CT, G, W )\n*\n*  Tests CHER2K and CSYR2K.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Parameters ..\n      COMPLEX            ZERO, ONE\n      PARAMETER          ( ZERO = ( 0.0, 0.0 ), ONE = ( 1.0, 0.0 ) )\n      REAL               RONE, RZERO\n      PARAMETER          ( RONE = 1.0, RZERO = 0.0 )\n*     .. Scalar Arguments ..\n      REAL               EPS, THRESH\n      INTEGER            NALF, NBET, NIDIM, NMAX, NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      COMPLEX            AA( NMAX*NMAX ), AB( 2*NMAX*NMAX ),\n     $                   ALF( NALF ), AS( NMAX*NMAX ), BB( NMAX*NMAX ),\n     $                   BET( NBET ), BS( NMAX*NMAX ), C( NMAX, NMAX ),\n     $                   CC( NMAX*NMAX ), CS( NMAX*NMAX ), CT( NMAX ),\n     $                   W( 2*NMAX )\n      REAL               G( NMAX )\n      INTEGER            IDIM( NIDIM )\n*     .. Local Scalars ..\n      COMPLEX            ALPHA, ALS, BETA, BETS\n      REAL               ERR, ERRMAX, RBETA, RBETS\n      INTEGER            I, IA, IB, ICT, ICU, IK, IN, J, JC, JJ, JJAB,\n     $                   K, KS, LAA, LBB, LCC, LDA, LDAS, LDB, LDBS,\n     $                   LDC, LDCS, LJ, MA, N, NA, NARGS, NC, NS\n      LOGICAL            CONJ, NULL, RESET, SAME, TRAN, UPPER\n      CHARACTER*1        TRANS, TRANSS, TRANST, UPLO, UPLOS\n      CHARACTER*2        ICHT, ICHU\n*     .. Local Arrays ..\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LCE, LCERES\n      EXTERNAL           LCE, LCERES\n*     .. External Subroutines ..\n      EXTERNAL           CHER2K, CMAKE, CMMCH, CSYR2K\n*     .. Intrinsic Functions ..\n      INTRINSIC          CMPLX, CONJG, MAX, REAL\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICHT/'NC'/, ICHU/'UL'/\n*     .. Executable Statements ..\n      CONJ = SNAME( 2: 3 ).EQ.'HE'\n*\n      NARGS = 12\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = RZERO\n*\n      DO 130 IN = 1, NIDIM\n         N = IDIM( IN )\n*        Set LDC to 1 more than minimum value if room.\n         LDC = N\n         IF( LDC.LT.NMAX )\n     $      LDC = LDC + 1\n*        Skip tests if not enough room.\n         IF( LDC.GT.NMAX )\n     $      GO TO 130\n         LCC = LDC*N\n*\n         DO 120 IK = 1, NIDIM\n            K = IDIM( IK )\n*\n            DO 110 ICT = 1, 2\n               TRANS = ICHT( ICT: ICT )\n               TRAN = TRANS.EQ.'C'\n               IF( TRAN.AND..NOT.CONJ )\n     $            TRANS = 'T'\n               IF( TRAN )THEN\n                  MA = K\n                  NA = N\n               ELSE\n                  MA = N\n                  NA = K\n               END IF\n*              Set LDA to 1 more than minimum value if room.\n               LDA = MA\n               IF( LDA.LT.NMAX )\n     $            LDA = LDA + 1\n*              Skip tests if not enough room.\n               IF( LDA.GT.NMAX )\n     $            GO TO 110\n               LAA = LDA*NA\n*\n*              Generate the matrix A.\n*\n               IF( TRAN )THEN\n                  CALL CMAKE( 'GE', ' ', ' ', MA, NA, AB, 2*NMAX, AA,\n     $                        LDA, RESET, ZERO )\n               ELSE\n                  CALL CMAKE( 'GE', ' ', ' ', MA, NA, AB, NMAX, AA, LDA,\n     $                        RESET, ZERO )\n               END IF\n*\n*              Generate the matrix B.\n*\n               LDB = LDA\n               LBB = LAA\n               IF( TRAN )THEN\n                  CALL CMAKE( 'GE', ' ', ' ', MA, NA, AB( K + 1 ),\n     $                        2*NMAX, BB, LDB, RESET, ZERO )\n               ELSE\n                  CALL CMAKE( 'GE', ' ', ' ', MA, NA, AB( K*NMAX + 1 ),\n     $                        NMAX, BB, LDB, RESET, ZERO )\n               END IF\n*\n               DO 100 ICU = 1, 2\n                  UPLO = ICHU( ICU: ICU )\n                  UPPER = UPLO.EQ.'U'\n*\n                  DO 90 IA = 1, NALF\n                     ALPHA = ALF( IA )\n*\n                     DO 80 IB = 1, NBET\n                        BETA = BET( IB )\n                        IF( CONJ )THEN\n                           RBETA = REAL( BETA )\n                           BETA = CMPLX( RBETA, RZERO )\n                        END IF\n                        NULL = N.LE.0\n                        IF( CONJ )\n     $                     NULL = NULL.OR.( ( K.LE.0.OR.ALPHA.EQ.\n     $                            ZERO ).AND.RBETA.EQ.RONE )\n*\n*                       Generate the matrix C.\n*\n                        CALL CMAKE( SNAME( 2: 3 ), UPLO, ' ', N, N, C,\n     $                              NMAX, CC, LDC, RESET, ZERO )\n*\n                        NC = NC + 1\n*\n*                       Save every datum before calling the subroutine.\n*\n                        UPLOS = UPLO\n                        TRANSS = TRANS\n                        NS = N\n                        KS = K\n                        ALS = ALPHA\n                        DO 10 I = 1, LAA\n                           AS( I ) = AA( I )\n   10                   CONTINUE\n                        LDAS = LDA\n                        DO 20 I = 1, LBB\n                           BS( I ) = BB( I )\n   20                   CONTINUE\n                        LDBS = LDB\n                        IF( CONJ )THEN\n                           RBETS = RBETA\n                        ELSE\n                           BETS = BETA\n                        END IF\n                        DO 30 I = 1, LCC\n                           CS( I ) = CC( I )\n   30                   CONTINUE\n                        LDCS = LDC\n*\n*                       Call the subroutine.\n*\n                        IF( CONJ )THEN\n                           IF( TRACE )\n     $                        WRITE( NTRA, FMT = 9994 )NC, SNAME, UPLO,\n     $                        TRANS, N, K, ALPHA, LDA, LDB, RBETA, LDC\n                           IF( REWI )\n     $                        REWIND NTRA\n                           CALL CHER2K( UPLO, TRANS, N, K, ALPHA, AA,\n     $                                  LDA, BB, LDB, RBETA, CC, LDC )\n                        ELSE\n                           IF( TRACE )\n     $                        WRITE( NTRA, FMT = 9993 )NC, SNAME, UPLO,\n     $                        TRANS, N, K, ALPHA, LDA, LDB, BETA, LDC\n                           IF( REWI )\n     $                        REWIND NTRA\n                           CALL CSYR2K( UPLO, TRANS, N, K, ALPHA, AA,\n     $                                  LDA, BB, LDB, BETA, CC, LDC )\n                        END IF\n*\n*                       Check if error-exit was taken incorrectly.\n*\n                        IF( .NOT.OK )THEN\n                           WRITE( NOUT, FMT = 9992 )\n                           FATAL = .TRUE.\n                           GO TO 150\n                        END IF\n*\n*                       See what data changed inside subroutines.\n*\n                        ISAME( 1 ) = UPLOS.EQ.UPLO\n                        ISAME( 2 ) = TRANSS.EQ.TRANS\n                        ISAME( 3 ) = NS.EQ.N\n                        ISAME( 4 ) = KS.EQ.K\n                        ISAME( 5 ) = ALS.EQ.ALPHA\n                        ISAME( 6 ) = LCE( AS, AA, LAA )\n                        ISAME( 7 ) = LDAS.EQ.LDA\n                        ISAME( 8 ) = LCE( BS, BB, LBB )\n                        ISAME( 9 ) = LDBS.EQ.LDB\n                        IF( CONJ )THEN\n                           ISAME( 10 ) = RBETS.EQ.RBETA\n                        ELSE\n                           ISAME( 10 ) = BETS.EQ.BETA\n                        END IF\n                        IF( NULL )THEN\n                           ISAME( 11 ) = LCE( CS, CC, LCC )\n                        ELSE\n                           ISAME( 11 ) = LCERES( 'HE', UPLO, N, N, CS,\n     $                                   CC, LDC )\n                        END IF\n                        ISAME( 12 ) = LDCS.EQ.LDC\n*\n*                       If data was incorrectly changed, report and\n*                       return.\n*\n                        SAME = .TRUE.\n                        DO 40 I = 1, NARGS\n                           SAME = SAME.AND.ISAME( I )\n                           IF( .NOT.ISAME( I ) )\n     $                        WRITE( NOUT, FMT = 9998 )I\n   40                   CONTINUE\n                        IF( .NOT.SAME )THEN\n                           FATAL = .TRUE.\n                           GO TO 150\n                        END IF\n*\n                        IF( .NOT.NULL )THEN\n*\n*                          Check the result column by column.\n*\n                           IF( CONJ )THEN\n                              TRANST = 'C'\n                           ELSE\n                              TRANST = 'T'\n                           END IF\n                           JJAB = 1\n                           JC = 1\n                           DO 70 J = 1, N\n                              IF( UPPER )THEN\n                                 JJ = 1\n                                 LJ = J\n                              ELSE\n                                 JJ = J\n                                 LJ = N - J + 1\n                              END IF\n                              IF( TRAN )THEN\n                                 DO 50 I = 1, K\n                                    W( I ) = ALPHA*AB( ( J - 1 )*2*\n     $                                       NMAX + K + I )\n                                    IF( CONJ )THEN\n                                       W( K + I ) = CONJG( ALPHA )*\n     $                                              AB( ( J - 1 )*2*\n     $                                              NMAX + I )\n                                    ELSE\n                                       W( K + I ) = ALPHA*\n     $                                              AB( ( J - 1 )*2*\n     $                                              NMAX + I )\n                                    END IF\n   50                            CONTINUE\n                                 CALL CMMCH( TRANST, 'N', LJ, 1, 2*K,\n     $                                       ONE, AB( JJAB ), 2*NMAX, W,\n     $                                       2*NMAX, BETA, C( JJ, J ),\n     $                                       NMAX, CT, G, CC( JC ), LDC,\n     $                                       EPS, ERR, FATAL, NOUT,\n     $                                       .TRUE. )\n                              ELSE\n                                 DO 60 I = 1, K\n                                    IF( CONJ )THEN\n                                       W( I ) = ALPHA*CONJG( AB( ( K +\n     $                                          I - 1 )*NMAX + J ) )\n                                       W( K + I ) = CONJG( ALPHA*\n     $                                              AB( ( I - 1 )*NMAX +\n     $                                              J ) )\n                                    ELSE\n                                       W( I ) = ALPHA*AB( ( K + I - 1 )*\n     $                                          NMAX + J )\n                                       W( K + I ) = ALPHA*\n     $                                              AB( ( I - 1 )*NMAX +\n     $                                              J )\n                                    END IF\n   60                            CONTINUE\n                                 CALL CMMCH( 'N', 'N', LJ, 1, 2*K, ONE,\n     $                                       AB( JJ ), NMAX, W, 2*NMAX,\n     $                                       BETA, C( JJ, J ), NMAX, CT,\n     $                                       G, CC( JC ), LDC, EPS, ERR,\n     $                                       FATAL, NOUT, .TRUE. )\n                              END IF\n                              IF( UPPER )THEN\n                                 JC = JC + LDC\n                              ELSE\n                                 JC = JC + LDC + 1\n                                 IF( TRAN )\n     $                              JJAB = JJAB + 2*NMAX\n                              END IF\n                              ERRMAX = MAX( ERRMAX, ERR )\n*                             If got really bad answer, report and\n*                             return.\n                              IF( FATAL )\n     $                           GO TO 140\n   70                      CONTINUE\n                        END IF\n*\n   80                CONTINUE\n*\n   90             CONTINUE\n*\n  100          CONTINUE\n*\n  110       CONTINUE\n*\n  120    CONTINUE\n*\n  130 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 160\n*\n  140 CONTINUE\n      IF( N.GT.1 )\n     $   WRITE( NOUT, FMT = 9995 )J\n*\n  150 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      IF( CONJ )THEN\n         WRITE( NOUT, FMT = 9994 )NC, SNAME, UPLO, TRANS, N, K, ALPHA,\n     $      LDA, LDB, RBETA, LDC\n      ELSE\n         WRITE( NOUT, FMT = 9993 )NC, SNAME, UPLO, TRANS, N, K, ALPHA,\n     $      LDA, LDB, BETA, LDC\n      END IF\n*\n  160 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( '      THESE ARE THE RESULTS FOR COLUMN ', I3 )\n 9994 FORMAT( 1X, I6, ': ', A6, '(', 2( '''', A1, ''',' ), 2( I3, ',' ),\n     $      '(', F4.1, ',', F4.1, '), A,', I3, ', B,', I3, ',', F4.1,\n     $      ', C,', I3, ')           .' )\n 9993 FORMAT( 1X, I6, ': ', A6, '(', 2( '''', A1, ''',' ), 2( I3, ',' ),\n     $      '(', F4.1, ',', F4.1, '), A,', I3, ', B,', I3, ',(', F4.1,\n     $      ',', F4.1, '), C,', I3, ')    .' )\n 9992 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of CCHK5.\n*\n      END\n      SUBROUTINE CCHKE( ISNUM, SRNAMT, NOUT )\n*\n*  Tests the error exits from the Level 3 Blas.\n*  Requires a special version of the error-handling routine XERBLA.\n*  A, B and C should not need to be defined.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*  3-19-92:  Initialize ALPHA, BETA, RALPHA, and RBETA  (eca)\n*  3-19-92:  Fix argument 12 in calls to CSYMM and CHEMM\n*            with INFOT = 9  (eca)\n*\n*     .. Scalar Arguments ..\n      INTEGER            ISNUM, NOUT\n      CHARACTER*6        SRNAMT\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Parameters ..\n      REAL               ONE, TWO\n      PARAMETER          ( ONE = 1.0E0, TWO = 2.0E0 )\n*     .. Local Scalars ..\n      COMPLEX            ALPHA, BETA\n      REAL               RALPHA, RBETA\n*     .. Local Arrays ..\n      COMPLEX            A( 2, 1 ), B( 2, 1 ), C( 2, 1 )\n*     .. External Subroutines ..\n      EXTERNAL           CGEMM, CHEMM, CHER2K, CHERK, CHKXER, CSYMM,\n     $                   CSYR2K, CSYRK, CTRMM, CTRSM\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Executable Statements ..\n*     OK is set to .FALSE. by the special version of XERBLA or by CHKXER\n*     if anything is wrong.\n      OK = .TRUE.\n*     LERR is set to .TRUE. by the special version of XERBLA each time\n*     it is called, and is then tested and re-set by CHKXER.\n      LERR = .FALSE.\n*\n*     Initialize ALPHA, BETA, RALPHA, and RBETA.\n*\n      ALPHA = CMPLX( ONE, -ONE )\n      BETA = CMPLX( TWO, -TWO )\n      RALPHA = ONE\n      RBETA = TWO\n*\n      GO TO ( 10, 20, 30, 40, 50, 60, 70, 80,\n     $        90 )ISNUM\n   10 INFOT = 1\n      CALL CGEMM( '/', 'N', 0, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 1\n      CALL CGEMM( '/', 'C', 0, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 1\n      CALL CGEMM( '/', 'T', 0, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL CGEMM( 'N', '/', 0, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL CGEMM( 'C', '/', 0, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL CGEMM( 'T', '/', 0, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CGEMM( 'N', 'N', -1, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CGEMM( 'N', 'C', -1, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CGEMM( 'N', 'T', -1, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CGEMM( 'C', 'N', -1, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CGEMM( 'C', 'C', -1, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CGEMM( 'C', 'T', -1, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CGEMM( 'T', 'N', -1, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CGEMM( 'T', 'C', -1, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CGEMM( 'T', 'T', -1, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CGEMM( 'N', 'N', 0, -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CGEMM( 'N', 'C', 0, -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CGEMM( 'N', 'T', 0, -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CGEMM( 'C', 'N', 0, -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CGEMM( 'C', 'C', 0, -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CGEMM( 'C', 'T', 0, -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CGEMM( 'T', 'N', 0, -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CGEMM( 'T', 'C', 0, -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CGEMM( 'T', 'T', 0, -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CGEMM( 'N', 'N', 0, 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CGEMM( 'N', 'C', 0, 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CGEMM( 'N', 'T', 0, 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CGEMM( 'C', 'N', 0, 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CGEMM( 'C', 'C', 0, 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CGEMM( 'C', 'T', 0, 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CGEMM( 'T', 'N', 0, 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CGEMM( 'T', 'C', 0, 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CGEMM( 'T', 'T', 0, 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL CGEMM( 'N', 'N', 2, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL CGEMM( 'N', 'C', 2, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL CGEMM( 'N', 'T', 2, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL CGEMM( 'C', 'N', 0, 0, 2, ALPHA, A, 1, B, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL CGEMM( 'C', 'C', 0, 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL CGEMM( 'C', 'T', 0, 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL CGEMM( 'T', 'N', 0, 0, 2, ALPHA, A, 1, B, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL CGEMM( 'T', 'C', 0, 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL CGEMM( 'T', 'T', 0, 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL CGEMM( 'N', 'N', 0, 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL CGEMM( 'C', 'N', 0, 0, 2, ALPHA, A, 2, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL CGEMM( 'T', 'N', 0, 0, 2, ALPHA, A, 2, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL CGEMM( 'N', 'C', 0, 2, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL CGEMM( 'C', 'C', 0, 2, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL CGEMM( 'T', 'C', 0, 2, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL CGEMM( 'N', 'T', 0, 2, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL CGEMM( 'C', 'T', 0, 2, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL CGEMM( 'T', 'T', 0, 2, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 13\n      CALL CGEMM( 'N', 'N', 2, 0, 0, ALPHA, A, 2, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 13\n      CALL CGEMM( 'N', 'C', 2, 0, 0, ALPHA, A, 2, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 13\n      CALL CGEMM( 'N', 'T', 2, 0, 0, ALPHA, A, 2, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 13\n      CALL CGEMM( 'C', 'N', 2, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 13\n      CALL CGEMM( 'C', 'C', 2, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 13\n      CALL CGEMM( 'C', 'T', 2, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 13\n      CALL CGEMM( 'T', 'N', 2, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 13\n      CALL CGEMM( 'T', 'C', 2, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 13\n      CALL CGEMM( 'T', 'T', 2, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 100\n   20 INFOT = 1\n      CALL CHEMM( '/', 'U', 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL CHEMM( 'L', '/', 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CHEMM( 'L', 'U', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CHEMM( 'R', 'U', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CHEMM( 'L', 'L', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CHEMM( 'R', 'L', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CHEMM( 'L', 'U', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CHEMM( 'R', 'U', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CHEMM( 'L', 'L', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CHEMM( 'R', 'L', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL CHEMM( 'L', 'U', 2, 0, ALPHA, A, 1, B, 2, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL CHEMM( 'R', 'U', 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL CHEMM( 'L', 'L', 2, 0, ALPHA, A, 1, B, 2, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL CHEMM( 'R', 'L', 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CHEMM( 'L', 'U', 2, 0, ALPHA, A, 2, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CHEMM( 'R', 'U', 2, 0, ALPHA, A, 1, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CHEMM( 'L', 'L', 2, 0, ALPHA, A, 2, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CHEMM( 'R', 'L', 2, 0, ALPHA, A, 1, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL CHEMM( 'L', 'U', 2, 0, ALPHA, A, 2, B, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL CHEMM( 'R', 'U', 2, 0, ALPHA, A, 1, B, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL CHEMM( 'L', 'L', 2, 0, ALPHA, A, 2, B, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL CHEMM( 'R', 'L', 2, 0, ALPHA, A, 1, B, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 100\n   30 INFOT = 1\n      CALL CSYMM( '/', 'U', 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL CSYMM( 'L', '/', 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CSYMM( 'L', 'U', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CSYMM( 'R', 'U', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CSYMM( 'L', 'L', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CSYMM( 'R', 'L', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CSYMM( 'L', 'U', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CSYMM( 'R', 'U', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CSYMM( 'L', 'L', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CSYMM( 'R', 'L', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL CSYMM( 'L', 'U', 2, 0, ALPHA, A, 1, B, 2, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL CSYMM( 'R', 'U', 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL CSYMM( 'L', 'L', 2, 0, ALPHA, A, 1, B, 2, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL CSYMM( 'R', 'L', 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CSYMM( 'L', 'U', 2, 0, ALPHA, A, 2, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CSYMM( 'R', 'U', 2, 0, ALPHA, A, 1, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CSYMM( 'L', 'L', 2, 0, ALPHA, A, 2, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CSYMM( 'R', 'L', 2, 0, ALPHA, A, 1, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL CSYMM( 'L', 'U', 2, 0, ALPHA, A, 2, B, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL CSYMM( 'R', 'U', 2, 0, ALPHA, A, 1, B, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL CSYMM( 'L', 'L', 2, 0, ALPHA, A, 2, B, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL CSYMM( 'R', 'L', 2, 0, ALPHA, A, 1, B, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 100\n   40 INFOT = 1\n      CALL CTRMM( '/', 'U', 'N', 'N', 0, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL CTRMM( 'L', '/', 'N', 'N', 0, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CTRMM( 'L', 'U', '/', 'N', 0, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CTRMM( 'L', 'U', 'N', '/', 0, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CTRMM( 'L', 'U', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CTRMM( 'L', 'U', 'C', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CTRMM( 'L', 'U', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CTRMM( 'R', 'U', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CTRMM( 'R', 'U', 'C', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CTRMM( 'R', 'U', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CTRMM( 'L', 'L', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CTRMM( 'L', 'L', 'C', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CTRMM( 'L', 'L', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CTRMM( 'R', 'L', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CTRMM( 'R', 'L', 'C', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CTRMM( 'R', 'L', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL CTRMM( 'L', 'U', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL CTRMM( 'L', 'U', 'C', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL CTRMM( 'L', 'U', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL CTRMM( 'R', 'U', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL CTRMM( 'R', 'U', 'C', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL CTRMM( 'R', 'U', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL CTRMM( 'L', 'L', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL CTRMM( 'L', 'L', 'C', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL CTRMM( 'L', 'L', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL CTRMM( 'R', 'L', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL CTRMM( 'R', 'L', 'C', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL CTRMM( 'R', 'L', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CTRMM( 'L', 'U', 'N', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CTRMM( 'L', 'U', 'C', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CTRMM( 'L', 'U', 'T', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CTRMM( 'R', 'U', 'N', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CTRMM( 'R', 'U', 'C', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CTRMM( 'R', 'U', 'T', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CTRMM( 'L', 'L', 'N', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CTRMM( 'L', 'L', 'C', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CTRMM( 'L', 'L', 'T', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CTRMM( 'R', 'L', 'N', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CTRMM( 'R', 'L', 'C', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CTRMM( 'R', 'L', 'T', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL CTRMM( 'L', 'U', 'N', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL CTRMM( 'L', 'U', 'C', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL CTRMM( 'L', 'U', 'T', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL CTRMM( 'R', 'U', 'N', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL CTRMM( 'R', 'U', 'C', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL CTRMM( 'R', 'U', 'T', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL CTRMM( 'L', 'L', 'N', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL CTRMM( 'L', 'L', 'C', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL CTRMM( 'L', 'L', 'T', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL CTRMM( 'R', 'L', 'N', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL CTRMM( 'R', 'L', 'C', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL CTRMM( 'R', 'L', 'T', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 100\n   50 INFOT = 1\n      CALL CTRSM( '/', 'U', 'N', 'N', 0, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL CTRSM( 'L', '/', 'N', 'N', 0, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CTRSM( 'L', 'U', '/', 'N', 0, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CTRSM( 'L', 'U', 'N', '/', 0, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CTRSM( 'L', 'U', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CTRSM( 'L', 'U', 'C', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CTRSM( 'L', 'U', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CTRSM( 'R', 'U', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CTRSM( 'R', 'U', 'C', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CTRSM( 'R', 'U', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CTRSM( 'L', 'L', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CTRSM( 'L', 'L', 'C', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CTRSM( 'L', 'L', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CTRSM( 'R', 'L', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CTRSM( 'R', 'L', 'C', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL CTRSM( 'R', 'L', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL CTRSM( 'L', 'U', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL CTRSM( 'L', 'U', 'C', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL CTRSM( 'L', 'U', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL CTRSM( 'R', 'U', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL CTRSM( 'R', 'U', 'C', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL CTRSM( 'R', 'U', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL CTRSM( 'L', 'L', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL CTRSM( 'L', 'L', 'C', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL CTRSM( 'L', 'L', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL CTRSM( 'R', 'L', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL CTRSM( 'R', 'L', 'C', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL CTRSM( 'R', 'L', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CTRSM( 'L', 'U', 'N', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CTRSM( 'L', 'U', 'C', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CTRSM( 'L', 'U', 'T', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CTRSM( 'R', 'U', 'N', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CTRSM( 'R', 'U', 'C', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CTRSM( 'R', 'U', 'T', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CTRSM( 'L', 'L', 'N', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CTRSM( 'L', 'L', 'C', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CTRSM( 'L', 'L', 'T', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CTRSM( 'R', 'L', 'N', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CTRSM( 'R', 'L', 'C', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CTRSM( 'R', 'L', 'T', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL CTRSM( 'L', 'U', 'N', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL CTRSM( 'L', 'U', 'C', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL CTRSM( 'L', 'U', 'T', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL CTRSM( 'R', 'U', 'N', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL CTRSM( 'R', 'U', 'C', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL CTRSM( 'R', 'U', 'T', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL CTRSM( 'L', 'L', 'N', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL CTRSM( 'L', 'L', 'C', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL CTRSM( 'L', 'L', 'T', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL CTRSM( 'R', 'L', 'N', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL CTRSM( 'R', 'L', 'C', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL CTRSM( 'R', 'L', 'T', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 100\n   60 INFOT = 1\n      CALL CHERK( '/', 'N', 0, 0, RALPHA, A, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL CHERK( 'U', 'T', 0, 0, RALPHA, A, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CHERK( 'U', 'N', -1, 0, RALPHA, A, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CHERK( 'U', 'C', -1, 0, RALPHA, A, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CHERK( 'L', 'N', -1, 0, RALPHA, A, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CHERK( 'L', 'C', -1, 0, RALPHA, A, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CHERK( 'U', 'N', 0, -1, RALPHA, A, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CHERK( 'U', 'C', 0, -1, RALPHA, A, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CHERK( 'L', 'N', 0, -1, RALPHA, A, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CHERK( 'L', 'C', 0, -1, RALPHA, A, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL CHERK( 'U', 'N', 2, 0, RALPHA, A, 1, RBETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL CHERK( 'U', 'C', 0, 2, RALPHA, A, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL CHERK( 'L', 'N', 2, 0, RALPHA, A, 1, RBETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL CHERK( 'L', 'C', 0, 2, RALPHA, A, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL CHERK( 'U', 'N', 2, 0, RALPHA, A, 2, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL CHERK( 'U', 'C', 2, 0, RALPHA, A, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL CHERK( 'L', 'N', 2, 0, RALPHA, A, 2, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL CHERK( 'L', 'C', 2, 0, RALPHA, A, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 100\n   70 INFOT = 1\n      CALL CSYRK( '/', 'N', 0, 0, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL CSYRK( 'U', 'C', 0, 0, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CSYRK( 'U', 'N', -1, 0, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CSYRK( 'U', 'T', -1, 0, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CSYRK( 'L', 'N', -1, 0, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CSYRK( 'L', 'T', -1, 0, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CSYRK( 'U', 'N', 0, -1, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CSYRK( 'U', 'T', 0, -1, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CSYRK( 'L', 'N', 0, -1, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CSYRK( 'L', 'T', 0, -1, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL CSYRK( 'U', 'N', 2, 0, ALPHA, A, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL CSYRK( 'U', 'T', 0, 2, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL CSYRK( 'L', 'N', 2, 0, ALPHA, A, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL CSYRK( 'L', 'T', 0, 2, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL CSYRK( 'U', 'N', 2, 0, ALPHA, A, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL CSYRK( 'U', 'T', 2, 0, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL CSYRK( 'L', 'N', 2, 0, ALPHA, A, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL CSYRK( 'L', 'T', 2, 0, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 100\n   80 INFOT = 1\n      CALL CHER2K( '/', 'N', 0, 0, ALPHA, A, 1, B, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL CHER2K( 'U', 'T', 0, 0, ALPHA, A, 1, B, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CHER2K( 'U', 'N', -1, 0, ALPHA, A, 1, B, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CHER2K( 'U', 'C', -1, 0, ALPHA, A, 1, B, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CHER2K( 'L', 'N', -1, 0, ALPHA, A, 1, B, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CHER2K( 'L', 'C', -1, 0, ALPHA, A, 1, B, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CHER2K( 'U', 'N', 0, -1, ALPHA, A, 1, B, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CHER2K( 'U', 'C', 0, -1, ALPHA, A, 1, B, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CHER2K( 'L', 'N', 0, -1, ALPHA, A, 1, B, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CHER2K( 'L', 'C', 0, -1, ALPHA, A, 1, B, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL CHER2K( 'U', 'N', 2, 0, ALPHA, A, 1, B, 1, RBETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL CHER2K( 'U', 'C', 0, 2, ALPHA, A, 1, B, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL CHER2K( 'L', 'N', 2, 0, ALPHA, A, 1, B, 1, RBETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL CHER2K( 'L', 'C', 0, 2, ALPHA, A, 1, B, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CHER2K( 'U', 'N', 2, 0, ALPHA, A, 2, B, 1, RBETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CHER2K( 'U', 'C', 0, 2, ALPHA, A, 2, B, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CHER2K( 'L', 'N', 2, 0, ALPHA, A, 2, B, 1, RBETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CHER2K( 'L', 'C', 0, 2, ALPHA, A, 2, B, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL CHER2K( 'U', 'N', 2, 0, ALPHA, A, 2, B, 2, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL CHER2K( 'U', 'C', 2, 0, ALPHA, A, 1, B, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL CHER2K( 'L', 'N', 2, 0, ALPHA, A, 2, B, 2, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL CHER2K( 'L', 'C', 2, 0, ALPHA, A, 1, B, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 100\n   90 INFOT = 1\n      CALL CSYR2K( '/', 'N', 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL CSYR2K( 'U', 'C', 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CSYR2K( 'U', 'N', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CSYR2K( 'U', 'T', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CSYR2K( 'L', 'N', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL CSYR2K( 'L', 'T', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CSYR2K( 'U', 'N', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CSYR2K( 'U', 'T', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CSYR2K( 'L', 'N', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL CSYR2K( 'L', 'T', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL CSYR2K( 'U', 'N', 2, 0, ALPHA, A, 1, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL CSYR2K( 'U', 'T', 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL CSYR2K( 'L', 'N', 2, 0, ALPHA, A, 1, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL CSYR2K( 'L', 'T', 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CSYR2K( 'U', 'N', 2, 0, ALPHA, A, 2, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CSYR2K( 'U', 'T', 0, 2, ALPHA, A, 2, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CSYR2K( 'L', 'N', 2, 0, ALPHA, A, 2, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL CSYR2K( 'L', 'T', 0, 2, ALPHA, A, 2, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL CSYR2K( 'U', 'N', 2, 0, ALPHA, A, 2, B, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL CSYR2K( 'U', 'T', 2, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL CSYR2K( 'L', 'N', 2, 0, ALPHA, A, 2, B, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL CSYR2K( 'L', 'T', 2, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n*\n  100 IF( OK )THEN\n         WRITE( NOUT, FMT = 9999 )SRNAMT\n      ELSE\n         WRITE( NOUT, FMT = 9998 )SRNAMT\n      END IF\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE TESTS OF ERROR-EXITS' )\n 9998 FORMAT( ' ******* ', A6, ' FAILED THE TESTS OF ERROR-EXITS *****',\n     $      '**' )\n*\n*     End of CCHKE.\n*\n      END\n      SUBROUTINE CMAKE( TYPE, UPLO, DIAG, M, N, A, NMAX, AA, LDA, RESET,\n     $                  TRANSL )\n*\n*  Generates values for an M by N matrix A.\n*  Stores the values in the array AA in the data structure required\n*  by the routine, with unwanted elements set to rogue value.\n*\n*  TYPE is 'GE', 'HE', 'SY' or 'TR'.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Parameters ..\n      COMPLEX            ZERO, ONE\n      PARAMETER          ( ZERO = ( 0.0, 0.0 ), ONE = ( 1.0, 0.0 ) )\n      COMPLEX            ROGUE\n      PARAMETER          ( ROGUE = ( -1.0E10, 1.0E10 ) )\n      REAL               RZERO\n      PARAMETER          ( RZERO = 0.0 )\n      REAL               RROGUE\n      PARAMETER          ( RROGUE = -1.0E10 )\n*     .. Scalar Arguments ..\n      COMPLEX            TRANSL\n      INTEGER            LDA, M, N, NMAX\n      LOGICAL            RESET\n      CHARACTER*1        DIAG, UPLO\n      CHARACTER*2        TYPE\n*     .. Array Arguments ..\n      COMPLEX            A( NMAX, * ), AA( * )\n*     .. Local Scalars ..\n      INTEGER            I, IBEG, IEND, J, JJ\n      LOGICAL            GEN, HER, LOWER, SYM, TRI, UNIT, UPPER\n*     .. External Functions ..\n      COMPLEX            CBEG\n      EXTERNAL           CBEG\n*     .. Intrinsic Functions ..\n      INTRINSIC          CMPLX, CONJG, REAL\n*     .. Executable Statements ..\n      GEN = TYPE.EQ.'GE'\n      HER = TYPE.EQ.'HE'\n      SYM = TYPE.EQ.'SY'\n      TRI = TYPE.EQ.'TR'\n      UPPER = ( HER.OR.SYM.OR.TRI ).AND.UPLO.EQ.'U'\n      LOWER = ( HER.OR.SYM.OR.TRI ).AND.UPLO.EQ.'L'\n      UNIT = TRI.AND.DIAG.EQ.'U'\n*\n*     Generate data in array A.\n*\n      DO 20 J = 1, N\n         DO 10 I = 1, M\n            IF( GEN.OR.( UPPER.AND.I.LE.J ).OR.( LOWER.AND.I.GE.J ) )\n     $          THEN\n               A( I, J ) = CBEG( RESET ) + TRANSL\n               IF( I.NE.J )THEN\n*                 Set some elements to zero\n                  IF( N.GT.3.AND.J.EQ.N/2 )\n     $               A( I, J ) = ZERO\n                  IF( HER )THEN\n                     A( J, I ) = CONJG( A( I, J ) )\n                  ELSE IF( SYM )THEN\n                     A( J, I ) = A( I, J )\n                  ELSE IF( TRI )THEN\n                     A( J, I ) = ZERO\n                  END IF\n               END IF\n            END IF\n   10    CONTINUE\n         IF( HER )\n     $      A( J, J ) = CMPLX( REAL( A( J, J ) ), RZERO )\n         IF( TRI )\n     $      A( J, J ) = A( J, J ) + ONE\n         IF( UNIT )\n     $      A( J, J ) = ONE\n   20 CONTINUE\n*\n*     Store elements in array AS in data structure required by routine.\n*\n      IF( TYPE.EQ.'GE' )THEN\n         DO 50 J = 1, N\n            DO 30 I = 1, M\n               AA( I + ( J - 1 )*LDA ) = A( I, J )\n   30       CONTINUE\n            DO 40 I = M + 1, LDA\n               AA( I + ( J - 1 )*LDA ) = ROGUE\n   40       CONTINUE\n   50    CONTINUE\n      ELSE IF( TYPE.EQ.'HE'.OR.TYPE.EQ.'SY'.OR.TYPE.EQ.'TR' )THEN\n         DO 90 J = 1, N\n            IF( UPPER )THEN\n               IBEG = 1\n               IF( UNIT )THEN\n                  IEND = J - 1\n               ELSE\n                  IEND = J\n               END IF\n            ELSE\n               IF( UNIT )THEN\n                  IBEG = J + 1\n               ELSE\n                  IBEG = J\n               END IF\n               IEND = N\n            END IF\n            DO 60 I = 1, IBEG - 1\n               AA( I + ( J - 1 )*LDA ) = ROGUE\n   60       CONTINUE\n            DO 70 I = IBEG, IEND\n               AA( I + ( J - 1 )*LDA ) = A( I, J )\n   70       CONTINUE\n            DO 80 I = IEND + 1, LDA\n               AA( I + ( J - 1 )*LDA ) = ROGUE\n   80       CONTINUE\n            IF( HER )THEN\n               JJ = J + ( J - 1 )*LDA\n               AA( JJ ) = CMPLX( REAL( AA( JJ ) ), RROGUE )\n            END IF\n   90    CONTINUE\n      END IF\n      RETURN\n*\n*     End of CMAKE.\n*\n      END\n      SUBROUTINE CMMCH( TRANSA, TRANSB, M, N, KK, ALPHA, A, LDA, B, LDB,\n     $                  BETA, C, LDC, CT, G, CC, LDCC, EPS, ERR, FATAL,\n     $                  NOUT, MV )\n*\n*  Checks the results of the computational tests.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Parameters ..\n      COMPLEX            ZERO\n      PARAMETER          ( ZERO = ( 0.0, 0.0 ) )\n      REAL               RZERO, RONE\n      PARAMETER          ( RZERO = 0.0, RONE = 1.0 )\n*     .. Scalar Arguments ..\n      COMPLEX            ALPHA, BETA\n      REAL               EPS, ERR\n      INTEGER            KK, LDA, LDB, LDC, LDCC, M, N, NOUT\n      LOGICAL            FATAL, MV\n      CHARACTER*1        TRANSA, TRANSB\n*     .. Array Arguments ..\n      COMPLEX            A( LDA, * ), B( LDB, * ), C( LDC, * ),\n     $                   CC( LDCC, * ), CT( * )\n      REAL               G( * )\n*     .. Local Scalars ..\n      COMPLEX            CL\n      REAL               ERRI\n      INTEGER            I, J, K\n      LOGICAL            CTRANA, CTRANB, TRANA, TRANB\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, AIMAG, CONJG, MAX, REAL, SQRT\n*     .. Statement Functions ..\n      REAL               ABS1\n*     .. Statement Function definitions ..\n      ABS1( CL ) = ABS( REAL( CL ) ) + ABS( AIMAG( CL ) )\n*     .. Executable Statements ..\n      TRANA = TRANSA.EQ.'T'.OR.TRANSA.EQ.'C'\n      TRANB = TRANSB.EQ.'T'.OR.TRANSB.EQ.'C'\n      CTRANA = TRANSA.EQ.'C'\n      CTRANB = TRANSB.EQ.'C'\n*\n*     Compute expected result, one column at a time, in CT using data\n*     in A, B and C.\n*     Compute gauges in G.\n*\n      DO 220 J = 1, N\n*\n         DO 10 I = 1, M\n            CT( I ) = ZERO\n            G( I ) = RZERO\n   10    CONTINUE\n         IF( .NOT.TRANA.AND..NOT.TRANB )THEN\n            DO 30 K = 1, KK\n               DO 20 I = 1, M\n                  CT( I ) = CT( I ) + A( I, K )*B( K, J )\n                  G( I ) = G( I ) + ABS1( A( I, K ) )*ABS1( B( K, J ) )\n   20          CONTINUE\n   30       CONTINUE\n         ELSE IF( TRANA.AND..NOT.TRANB )THEN\n            IF( CTRANA )THEN\n               DO 50 K = 1, KK\n                  DO 40 I = 1, M\n                     CT( I ) = CT( I ) + CONJG( A( K, I ) )*B( K, J )\n                     G( I ) = G( I ) + ABS1( A( K, I ) )*\n     $                        ABS1( B( K, J ) )\n   40             CONTINUE\n   50          CONTINUE\n            ELSE\n               DO 70 K = 1, KK\n                  DO 60 I = 1, M\n                     CT( I ) = CT( I ) + A( K, I )*B( K, J )\n                     G( I ) = G( I ) + ABS1( A( K, I ) )*\n     $                        ABS1( B( K, J ) )\n   60             CONTINUE\n   70          CONTINUE\n            END IF\n         ELSE IF( .NOT.TRANA.AND.TRANB )THEN\n            IF( CTRANB )THEN\n               DO 90 K = 1, KK\n                  DO 80 I = 1, M\n                     CT( I ) = CT( I ) + A( I, K )*CONJG( B( J, K ) )\n                     G( I ) = G( I ) + ABS1( A( I, K ) )*\n     $                        ABS1( B( J, K ) )\n   80             CONTINUE\n   90          CONTINUE\n            ELSE\n               DO 110 K = 1, KK\n                  DO 100 I = 1, M\n                     CT( I ) = CT( I ) + A( I, K )*B( J, K )\n                     G( I ) = G( I ) + ABS1( A( I, K ) )*\n     $                        ABS1( B( J, K ) )\n  100             CONTINUE\n  110          CONTINUE\n            END IF\n         ELSE IF( TRANA.AND.TRANB )THEN\n            IF( CTRANA )THEN\n               IF( CTRANB )THEN\n                  DO 130 K = 1, KK\n                     DO 120 I = 1, M\n                        CT( I ) = CT( I ) + CONJG( A( K, I ) )*\n     $                            CONJG( B( J, K ) )\n                        G( I ) = G( I ) + ABS1( A( K, I ) )*\n     $                           ABS1( B( J, K ) )\n  120                CONTINUE\n  130             CONTINUE\n               ELSE\n                  DO 150 K = 1, KK\n                     DO 140 I = 1, M\n                        CT( I ) = CT( I ) + CONJG( A( K, I ) )*B( J, K )\n                        G( I ) = G( I ) + ABS1( A( K, I ) )*\n     $                           ABS1( B( J, K ) )\n  140                CONTINUE\n  150             CONTINUE\n               END IF\n            ELSE\n               IF( CTRANB )THEN\n                  DO 170 K = 1, KK\n                     DO 160 I = 1, M\n                        CT( I ) = CT( I ) + A( K, I )*CONJG( B( J, K ) )\n                        G( I ) = G( I ) + ABS1( A( K, I ) )*\n     $                           ABS1( B( J, K ) )\n  160                CONTINUE\n  170             CONTINUE\n               ELSE\n                  DO 190 K = 1, KK\n                     DO 180 I = 1, M\n                        CT( I ) = CT( I ) + A( K, I )*B( J, K )\n                        G( I ) = G( I ) + ABS1( A( K, I ) )*\n     $                           ABS1( B( J, K ) )\n  180                CONTINUE\n  190             CONTINUE\n               END IF\n            END IF\n         END IF\n         DO 200 I = 1, M\n            CT( I ) = ALPHA*CT( I ) + BETA*C( I, J )\n            G( I ) = ABS1( ALPHA )*G( I ) +\n     $               ABS1( BETA )*ABS1( C( I, J ) )\n  200    CONTINUE\n*\n*        Compute the error ratio for this result.\n*\n         ERR = ZERO\n         DO 210 I = 1, M\n            ERRI = ABS1( CT( I ) - CC( I, J ) )/EPS\n            IF( G( I ).NE.RZERO )\n     $         ERRI = ERRI/G( I )\n            ERR = MAX( ERR, ERRI )\n            IF( ERR*SQRT( EPS ).GE.RONE )\n     $         GO TO 230\n  210    CONTINUE\n*\n  220 CONTINUE\n*\n*     If the loop completes, all results are at least half accurate.\n      GO TO 250\n*\n*     Report fatal error.\n*\n  230 FATAL = .TRUE.\n      WRITE( NOUT, FMT = 9999 )\n      DO 240 I = 1, M\n         IF( MV )THEN\n            WRITE( NOUT, FMT = 9998 )I, CT( I ), CC( I, J )\n         ELSE\n            WRITE( NOUT, FMT = 9998 )I, CC( I, J ), CT( I )\n         END IF\n  240 CONTINUE\n      IF( N.GT.1 )\n     $   WRITE( NOUT, FMT = 9997 )J\n*\n  250 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ******* FATAL ERROR - COMPUTED RESULT IS LESS THAN HAL',\n     $      'F ACCURATE *******', /'                       EXPECTED RE',\n     $      'SULT                    COMPUTED RESULT' )\n 9998 FORMAT( 1X, I7, 2( '  (', G15.6, ',', G15.6, ')' ) )\n 9997 FORMAT( '      THESE ARE THE RESULTS FOR COLUMN ', I3 )\n*\n*     End of CMMCH.\n*\n      END\n      LOGICAL FUNCTION LCE( RI, RJ, LR )\n*\n*  Tests if two arrays are identical.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Scalar Arguments ..\n      INTEGER            LR\n*     .. Array Arguments ..\n      COMPLEX            RI( * ), RJ( * )\n*     .. Local Scalars ..\n      INTEGER            I\n*     .. Executable Statements ..\n      DO 10 I = 1, LR\n         IF( RI( I ).NE.RJ( I ) )\n     $      GO TO 20\n   10 CONTINUE\n      LCE = .TRUE.\n      GO TO 30\n   20 CONTINUE\n      LCE = .FALSE.\n   30 RETURN\n*\n*     End of LCE.\n*\n      END\n      LOGICAL FUNCTION LCERES( TYPE, UPLO, M, N, AA, AS, LDA )\n*\n*  Tests if selected elements in two arrays are equal.\n*\n*  TYPE is 'GE' or 'HE' or 'SY'.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Scalar Arguments ..\n      INTEGER            LDA, M, N\n      CHARACTER*1        UPLO\n      CHARACTER*2        TYPE\n*     .. Array Arguments ..\n      COMPLEX            AA( LDA, * ), AS( LDA, * )\n*     .. Local Scalars ..\n      INTEGER            I, IBEG, IEND, J\n      LOGICAL            UPPER\n*     .. Executable Statements ..\n      UPPER = UPLO.EQ.'U'\n      IF( TYPE.EQ.'GE' )THEN\n         DO 20 J = 1, N\n            DO 10 I = M + 1, LDA\n               IF( AA( I, J ).NE.AS( I, J ) )\n     $            GO TO 70\n   10       CONTINUE\n   20    CONTINUE\n      ELSE IF( TYPE.EQ.'HE'.OR.TYPE.EQ.'SY' )THEN\n         DO 50 J = 1, N\n            IF( UPPER )THEN\n               IBEG = 1\n               IEND = J\n            ELSE\n               IBEG = J\n               IEND = N\n            END IF\n            DO 30 I = 1, IBEG - 1\n               IF( AA( I, J ).NE.AS( I, J ) )\n     $            GO TO 70\n   30       CONTINUE\n            DO 40 I = IEND + 1, LDA\n               IF( AA( I, J ).NE.AS( I, J ) )\n     $            GO TO 70\n   40       CONTINUE\n   50    CONTINUE\n      END IF\n*\n      LCERES = .TRUE.\n      GO TO 80\n   70 CONTINUE\n      LCERES = .FALSE.\n   80 RETURN\n*\n*     End of LCERES.\n*\n      END\n      COMPLEX FUNCTION CBEG( RESET )\n*\n*  Generates complex numbers as pairs of random numbers uniformly\n*  distributed between -0.5 and 0.5.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Scalar Arguments ..\n      LOGICAL            RESET\n*     .. Local Scalars ..\n      INTEGER            I, IC, J, MI, MJ\n*     .. Save statement ..\n      SAVE               I, IC, J, MI, MJ\n*     .. Intrinsic Functions ..\n      INTRINSIC          CMPLX\n*     .. Executable Statements ..\n      IF( RESET )THEN\n*        Initialize local variables.\n         MI = 891\n         MJ = 457\n         I = 7\n         J = 7\n         IC = 0\n         RESET = .FALSE.\n      END IF\n*\n*     The sequence of values of I or J is bounded between 1 and 999.\n*     If initial I or J = 1,2,3,6,7 or 9, the period will be 50.\n*     If initial I or J = 4 or 8, the period will be 25.\n*     If initial I or J = 5, the period will be 10.\n*     IC is used to break up the period by skipping 1 value of I or J\n*     in 6.\n*\n      IC = IC + 1\n   10 I = I*MI\n      J = J*MJ\n      I = I - 1000*( I/1000 )\n      J = J - 1000*( J/1000 )\n      IF( IC.GE.5 )THEN\n         IC = 0\n         GO TO 10\n      END IF\n      CBEG = CMPLX( ( I - 500 )/1001.0, ( J - 500 )/1001.0 )\n      RETURN\n*\n*     End of CBEG.\n*\n      END\n      REAL FUNCTION SDIFF( X, Y )\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Scalar Arguments ..\n      REAL               X, Y\n*     .. Executable Statements ..\n      SDIFF = X - Y\n      RETURN\n*\n*     End of SDIFF.\n*\n      END\n      SUBROUTINE CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n*\n*  Tests whether XERBLA has detected an error when it should.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Scalar Arguments ..\n      INTEGER            INFOT, NOUT\n      LOGICAL            LERR, OK\n      CHARACTER*6        SRNAMT\n*     .. Executable Statements ..\n      IF( .NOT.LERR )THEN\n         WRITE( NOUT, FMT = 9999 )INFOT, SRNAMT\n         OK = .FALSE.\n      END IF\n      LERR = .FALSE.\n      RETURN\n*\n 9999 FORMAT( ' ***** ILLEGAL VALUE OF PARAMETER NUMBER ', I2, ' NOT D',\n     $      'ETECTED BY ', A6, ' *****' )\n*\n*     End of CHKXER.\n*\n      END\n      SUBROUTINE XERBLA( SRNAME, INFO )\n*\n*  This is a special version of XERBLA to be used only as part of\n*  the test program for testing error exits from the Level 3 BLAS\n*  routines.\n*\n*  XERBLA  is an error handler for the Level 3 BLAS routines.\n*\n*  It is called by the Level 3 BLAS routines if an input parameter is\n*  invalid.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Scalar Arguments ..\n      INTEGER            INFO\n      CHARACTER*6        SRNAME\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUT\n      LOGICAL            LERR, OK\n      CHARACTER*6        SRNAMT\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUT, OK, LERR\n      COMMON             /SRNAMC/SRNAMT\n*     .. Executable Statements ..\n      LERR = .TRUE.\n      IF( INFO.NE.INFOT )THEN\n         IF( INFOT.NE.0 )THEN\n            WRITE( NOUT, FMT = 9999 )INFO, INFOT\n         ELSE\n            WRITE( NOUT, FMT = 9997 )INFO\n         END IF\n         OK = .FALSE.\n      END IF\n      IF( SRNAME.NE.SRNAMT )THEN\n         WRITE( NOUT, FMT = 9998 )SRNAME, SRNAMT\n         OK = .FALSE.\n      END IF\n      RETURN\n*\n 9999 FORMAT( ' ******* XERBLA WAS CALLED WITH INFO = ', I6, ' INSTEAD',\n     $      ' OF ', I2, ' *******' )\n 9998 FORMAT( ' ******* XERBLA WAS CALLED WITH SRNAME = ', A6, ' INSTE',\n     $      'AD OF ', A6, ' *******' )\n 9997 FORMAT( ' ******* XERBLA WAS CALLED WITH INFO = ', I6,\n     $      ' *******' )\n*\n*     End of XERBLA\n*\n      END\n\n"
  },
  {
    "path": "3rdparty/eigen3/blas/testing/dblat1.f",
    "content": "*> \\brief \\b DBLAT1\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*  Definition:\n*  ===========\n*\n*       PROGRAM DBLAT1\n* \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*>    Test program for the DOUBLE PRECISION Level 1 BLAS.\n*>\n*>    Based upon the original BLAS test routine together with:\n*>    F06EAF Example Program Text\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date April 2012\n*\n*> \\ingroup double_blas_testing\n*\n*  =====================================================================\n      PROGRAM DBLAT1\n*\n*  -- Reference BLAS test routine (version 3.4.1) --\n*  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     April 2012\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      INTEGER          NOUT\n      PARAMETER        (NOUT=6)\n*     .. Scalars in Common ..\n      INTEGER          ICASE, INCX, INCY, N\n      LOGICAL          PASS\n*     .. Local Scalars ..\n      DOUBLE PRECISION SFAC\n      INTEGER          IC\n*     .. External Subroutines ..\n      EXTERNAL         CHECK0, CHECK1, CHECK2, CHECK3, HEADER\n*     .. Common blocks ..\n      COMMON           /COMBLA/ICASE, N, INCX, INCY, PASS\n*     .. Data statements ..\n      DATA             SFAC/9.765625D-4/\n*     .. Executable Statements ..\n      WRITE (NOUT,99999)\n      DO 20 IC = 1, 13\n         ICASE = IC\n         CALL HEADER\n*\n*        .. Initialize  PASS,  INCX,  and INCY for a new case. ..\n*        .. the value 9999 for INCX or INCY will appear in the ..\n*        .. detailed  output, if any, for cases  that do not involve ..\n*        .. these parameters ..\n*\n         PASS = .TRUE.\n         INCX = 9999\n         INCY = 9999\n         IF (ICASE.EQ.3 .OR. ICASE.EQ.11) THEN\n            CALL CHECK0(SFAC)\n         ELSE IF (ICASE.EQ.7 .OR. ICASE.EQ.8 .OR. ICASE.EQ.9 .OR.\n     +            ICASE.EQ.10) THEN\n            CALL CHECK1(SFAC)\n         ELSE IF (ICASE.EQ.1 .OR. ICASE.EQ.2 .OR. ICASE.EQ.5 .OR.\n     +            ICASE.EQ.6 .OR. ICASE.EQ.12 .OR. ICASE.EQ.13) THEN\n            CALL CHECK2(SFAC)\n         ELSE IF (ICASE.EQ.4) THEN\n            CALL CHECK3(SFAC)\n         END IF\n*        -- Print\n         IF (PASS) WRITE (NOUT,99998)\n   20 CONTINUE\n      STOP\n*\n99999 FORMAT (' Real BLAS Test Program Results',/1X)\n99998 FORMAT ('                                    ----- PASS -----')\n      END\n      SUBROUTINE HEADER\n*     .. Parameters ..\n      INTEGER          NOUT\n      PARAMETER        (NOUT=6)\n*     .. Scalars in Common ..\n      INTEGER          ICASE, INCX, INCY, N\n      LOGICAL          PASS\n*     .. Local Arrays ..\n      CHARACTER*6      L(13)\n*     .. Common blocks ..\n      COMMON           /COMBLA/ICASE, N, INCX, INCY, PASS\n*     .. Data statements ..\n      DATA             L(1)/' DDOT '/\n      DATA             L(2)/'DAXPY '/\n      DATA             L(3)/'DROTG '/\n      DATA             L(4)/' DROT '/\n      DATA             L(5)/'DCOPY '/\n      DATA             L(6)/'DSWAP '/\n      DATA             L(7)/'DNRM2 '/\n      DATA             L(8)/'DASUM '/\n      DATA             L(9)/'DSCAL '/\n      DATA             L(10)/'IDAMAX'/\n      DATA             L(11)/'DROTMG'/\n      DATA             L(12)/'DROTM '/\n      DATA             L(13)/'DSDOT '/\n*     .. Executable Statements ..\n      WRITE (NOUT,99999) ICASE, L(ICASE)\n      RETURN\n*\n99999 FORMAT (/' Test of subprogram number',I3,12X,A6)\n      END\n      SUBROUTINE CHECK0(SFAC)\n*     .. Parameters ..\n      INTEGER           NOUT\n      PARAMETER         (NOUT=6)\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION  SFAC\n*     .. Scalars in Common ..\n      INTEGER           ICASE, INCX, INCY, N\n      LOGICAL           PASS\n*     .. Local Scalars ..\n      DOUBLE PRECISION  SA, SB, SC, SS, D12\n      INTEGER           I, K\n*     .. Local Arrays ..\n      DOUBLE PRECISION  DA1(8), DATRUE(8), DB1(8), DBTRUE(8), DC1(8),\n     $                  DS1(8), DAB(4,9), DTEMP(9), DTRUE(9,9)\n*     .. External Subroutines ..\n      EXTERNAL          DROTG, DROTMG, STEST1\n*     .. Common blocks ..\n      COMMON            /COMBLA/ICASE, N, INCX, INCY, PASS\n*     .. Data statements ..\n      DATA              DA1/0.3D0, 0.4D0, -0.3D0, -0.4D0, -0.3D0, 0.0D0,\n     +                  0.0D0, 1.0D0/\n      DATA              DB1/0.4D0, 0.3D0, 0.4D0, 0.3D0, -0.4D0, 0.0D0,\n     +                  1.0D0, 0.0D0/\n      DATA              DC1/0.6D0, 0.8D0, -0.6D0, 0.8D0, 0.6D0, 1.0D0,\n     +                  0.0D0, 1.0D0/\n      DATA              DS1/0.8D0, 0.6D0, 0.8D0, -0.6D0, 0.8D0, 0.0D0,\n     +                  1.0D0, 0.0D0/\n      DATA              DATRUE/0.5D0, 0.5D0, 0.5D0, -0.5D0, -0.5D0,\n     +                  0.0D0, 1.0D0, 1.0D0/\n      DATA              DBTRUE/0.0D0, 0.6D0, 0.0D0, -0.6D0, 0.0D0,\n     +                  0.0D0, 1.0D0, 0.0D0/\n*     INPUT FOR MODIFIED GIVENS\n      DATA DAB/ .1D0,.3D0,1.2D0,.2D0,\n     A          .7D0, .2D0, .6D0, 4.2D0,\n     B          0.D0,0.D0,0.D0,0.D0,\n     C          4.D0, -1.D0, 2.D0, 4.D0,\n     D          6.D-10, 2.D-2, 1.D5, 10.D0,\n     E          4.D10, 2.D-2, 1.D-5, 10.D0,\n     F          2.D-10, 4.D-2, 1.D5, 10.D0,\n     G          2.D10, 4.D-2, 1.D-5, 10.D0,\n     H          4.D0, -2.D0, 8.D0, 4.D0    /\n*    TRUE RESULTS FOR MODIFIED GIVENS\n      DATA DTRUE/0.D0,0.D0, 1.3D0, .2D0, 0.D0,0.D0,0.D0, .5D0, 0.D0,\n     A           0.D0,0.D0, 4.5D0, 4.2D0, 1.D0, .5D0, 0.D0,0.D0,0.D0,\n     B           0.D0,0.D0,0.D0,0.D0, -2.D0, 0.D0,0.D0,0.D0,0.D0,\n     C           0.D0,0.D0,0.D0, 4.D0, -1.D0, 0.D0,0.D0,0.D0,0.D0,\n     D           0.D0, 15.D-3, 0.D0, 10.D0, -1.D0, 0.D0, -1.D-4,\n     E           0.D0, 1.D0,\n     F           0.D0,0.D0, 6144.D-5, 10.D0, -1.D0, 4096.D0, -1.D6,\n     G           0.D0, 1.D0,\n     H           0.D0,0.D0,15.D0,10.D0,-1.D0, 5.D-5, 0.D0,1.D0,0.D0,\n     I           0.D0,0.D0, 15.D0, 10.D0, -1. D0, 5.D5, -4096.D0,\n     J           1.D0, 4096.D-6,\n     K           0.D0,0.D0, 7.D0, 4.D0, 0.D0,0.D0, -.5D0, -.25D0, 0.D0/\n*                   4096 = 2 ** 12\n      DATA D12  /4096.D0/\n      DTRUE(1,1) = 12.D0 / 130.D0\n      DTRUE(2,1) = 36.D0 / 130.D0\n      DTRUE(7,1) = -1.D0 / 6.D0\n      DTRUE(1,2) = 14.D0 / 75.D0\n      DTRUE(2,2) = 49.D0 / 75.D0\n      DTRUE(9,2) = 1.D0 / 7.D0\n      DTRUE(1,5) = 45.D-11 * (D12 * D12)\n      DTRUE(3,5) = 4.D5 / (3.D0 * D12)\n      DTRUE(6,5) = 1.D0 / D12\n      DTRUE(8,5) = 1.D4 / (3.D0 * D12)\n      DTRUE(1,6) = 4.D10 / (1.5D0 * D12 * D12)\n      DTRUE(2,6) = 2.D-2 / 1.5D0\n      DTRUE(8,6) = 5.D-7 * D12\n      DTRUE(1,7) = 4.D0 / 150.D0\n      DTRUE(2,7) = (2.D-10 / 1.5D0) * (D12 * D12)\n      DTRUE(7,7) = -DTRUE(6,5)\n      DTRUE(9,7) = 1.D4 / D12\n      DTRUE(1,8) = DTRUE(1,7)\n      DTRUE(2,8) = 2.D10 / (1.5D0 * D12 * D12)\n      DTRUE(1,9) = 32.D0 / 7.D0\n      DTRUE(2,9) = -16.D0 / 7.D0\n*     .. Executable Statements ..\n*\n*     Compute true values which cannot be prestored\n*     in decimal notation\n*\n      DBTRUE(1) = 1.0D0/0.6D0\n      DBTRUE(3) = -1.0D0/0.6D0\n      DBTRUE(5) = 1.0D0/0.6D0\n*\n      DO 20 K = 1, 8\n*        .. Set N=K for identification in output if any ..\n         N = K\n         IF (ICASE.EQ.3) THEN\n*           .. DROTG ..\n            IF (K.GT.8) GO TO 40\n            SA = DA1(K)\n            SB = DB1(K)\n            CALL DROTG(SA,SB,SC,SS)\n            CALL STEST1(SA,DATRUE(K),DATRUE(K),SFAC)\n            CALL STEST1(SB,DBTRUE(K),DBTRUE(K),SFAC)\n            CALL STEST1(SC,DC1(K),DC1(K),SFAC)\n            CALL STEST1(SS,DS1(K),DS1(K),SFAC)\n         ELSEIF (ICASE.EQ.11) THEN\n*           .. DROTMG ..\n            DO I=1,4\n               DTEMP(I)= DAB(I,K)\n               DTEMP(I+4) = 0.0\n            END DO\n            DTEMP(9) = 0.0\n            CALL DROTMG(DTEMP(1),DTEMP(2),DTEMP(3),DTEMP(4),DTEMP(5))\n            CALL STEST(9,DTEMP,DTRUE(1,K),DTRUE(1,K),SFAC)\n         ELSE\n            WRITE (NOUT,*) ' Shouldn''t be here in CHECK0'\n            STOP\n         END IF\n   20 CONTINUE\n   40 RETURN\n      END\n      SUBROUTINE CHECK1(SFAC)\n*     .. Parameters ..\n      INTEGER           NOUT\n      PARAMETER         (NOUT=6)\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION  SFAC\n*     .. Scalars in Common ..\n      INTEGER           ICASE, INCX, INCY, N\n      LOGICAL           PASS\n*     .. Local Scalars ..\n      INTEGER           I, LEN, NP1\n*     .. Local Arrays ..\n      DOUBLE PRECISION  DTRUE1(5), DTRUE3(5), DTRUE5(8,5,2), DV(8,5,2),\n     +                  SA(10), STEMP(1), STRUE(8), SX(8)\n      INTEGER           ITRUE2(5)\n*     .. External Functions ..\n      DOUBLE PRECISION  DASUM, DNRM2\n      INTEGER           IDAMAX\n      EXTERNAL          DASUM, DNRM2, IDAMAX\n*     .. External Subroutines ..\n      EXTERNAL          ITEST1, DSCAL, STEST, STEST1\n*     .. Intrinsic Functions ..\n      INTRINSIC         MAX\n*     .. Common blocks ..\n      COMMON            /COMBLA/ICASE, N, INCX, INCY, PASS\n*     .. Data statements ..\n      DATA              SA/0.3D0, -1.0D0, 0.0D0, 1.0D0, 0.3D0, 0.3D0,\n     +                  0.3D0, 0.3D0, 0.3D0, 0.3D0/\n      DATA              DV/0.1D0, 2.0D0, 2.0D0, 2.0D0, 2.0D0, 2.0D0,\n     +                  2.0D0, 2.0D0, 0.3D0, 3.0D0, 3.0D0, 3.0D0, 3.0D0,\n     +                  3.0D0, 3.0D0, 3.0D0, 0.3D0, -0.4D0, 4.0D0,\n     +                  4.0D0, 4.0D0, 4.0D0, 4.0D0, 4.0D0, 0.2D0,\n     +                  -0.6D0, 0.3D0, 5.0D0, 5.0D0, 5.0D0, 5.0D0,\n     +                  5.0D0, 0.1D0, -0.3D0, 0.5D0, -0.1D0, 6.0D0,\n     +                  6.0D0, 6.0D0, 6.0D0, 0.1D0, 8.0D0, 8.0D0, 8.0D0,\n     +                  8.0D0, 8.0D0, 8.0D0, 8.0D0, 0.3D0, 9.0D0, 9.0D0,\n     +                  9.0D0, 9.0D0, 9.0D0, 9.0D0, 9.0D0, 0.3D0, 2.0D0,\n     +                  -0.4D0, 2.0D0, 2.0D0, 2.0D0, 2.0D0, 2.0D0,\n     +                  0.2D0, 3.0D0, -0.6D0, 5.0D0, 0.3D0, 2.0D0,\n     +                  2.0D0, 2.0D0, 0.1D0, 4.0D0, -0.3D0, 6.0D0,\n     +                  -0.5D0, 7.0D0, -0.1D0, 3.0D0/\n      DATA              DTRUE1/0.0D0, 0.3D0, 0.5D0, 0.7D0, 0.6D0/\n      DATA              DTRUE3/0.0D0, 0.3D0, 0.7D0, 1.1D0, 1.0D0/\n      DATA              DTRUE5/0.10D0, 2.0D0, 2.0D0, 2.0D0, 2.0D0,\n     +                  2.0D0, 2.0D0, 2.0D0, -0.3D0, 3.0D0, 3.0D0,\n     +                  3.0D0, 3.0D0, 3.0D0, 3.0D0, 3.0D0, 0.0D0, 0.0D0,\n     +                  4.0D0, 4.0D0, 4.0D0, 4.0D0, 4.0D0, 4.0D0,\n     +                  0.20D0, -0.60D0, 0.30D0, 5.0D0, 5.0D0, 5.0D0,\n     +                  5.0D0, 5.0D0, 0.03D0, -0.09D0, 0.15D0, -0.03D0,\n     +                  6.0D0, 6.0D0, 6.0D0, 6.0D0, 0.10D0, 8.0D0,\n     +                  8.0D0, 8.0D0, 8.0D0, 8.0D0, 8.0D0, 8.0D0,\n     +                  0.09D0, 9.0D0, 9.0D0, 9.0D0, 9.0D0, 9.0D0,\n     +                  9.0D0, 9.0D0, 0.09D0, 2.0D0, -0.12D0, 2.0D0,\n     +                  2.0D0, 2.0D0, 2.0D0, 2.0D0, 0.06D0, 3.0D0,\n     +                  -0.18D0, 5.0D0, 0.09D0, 2.0D0, 2.0D0, 2.0D0,\n     +                  0.03D0, 4.0D0, -0.09D0, 6.0D0, -0.15D0, 7.0D0,\n     +                  -0.03D0, 3.0D0/\n      DATA              ITRUE2/0, 1, 2, 2, 3/\n*     .. Executable Statements ..\n      DO 80 INCX = 1, 2\n         DO 60 NP1 = 1, 5\n            N = NP1 - 1\n            LEN = 2*MAX(N,1)\n*           .. Set vector arguments ..\n            DO 20 I = 1, LEN\n               SX(I) = DV(I,NP1,INCX)\n   20       CONTINUE\n*\n            IF (ICASE.EQ.7) THEN\n*              .. DNRM2 ..\n               STEMP(1) = DTRUE1(NP1)\n               CALL STEST1(DNRM2(N,SX,INCX),STEMP(1),STEMP,SFAC)\n            ELSE IF (ICASE.EQ.8) THEN\n*              .. DASUM ..\n               STEMP(1) = DTRUE3(NP1)\n               CALL STEST1(DASUM(N,SX,INCX),STEMP(1),STEMP,SFAC)\n            ELSE IF (ICASE.EQ.9) THEN\n*              .. DSCAL ..\n               CALL DSCAL(N,SA((INCX-1)*5+NP1),SX,INCX)\n               DO 40 I = 1, LEN\n                  STRUE(I) = DTRUE5(I,NP1,INCX)\n   40          CONTINUE\n               CALL STEST(LEN,SX,STRUE,STRUE,SFAC)\n            ELSE IF (ICASE.EQ.10) THEN\n*              .. IDAMAX ..\n               CALL ITEST1(IDAMAX(N,SX,INCX),ITRUE2(NP1))\n            ELSE\n               WRITE (NOUT,*) ' Shouldn''t be here in CHECK1'\n               STOP\n            END IF\n   60    CONTINUE\n   80 CONTINUE\n      RETURN\n      END\n      SUBROUTINE CHECK2(SFAC)\n*     .. Parameters ..\n      INTEGER           NOUT\n      PARAMETER         (NOUT=6)\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION  SFAC\n*     .. Scalars in Common ..\n      INTEGER           ICASE, INCX, INCY, N\n      LOGICAL           PASS\n*     .. Local Scalars ..\n      DOUBLE PRECISION  SA\n      INTEGER           I, J, KI, KN, KNI, KPAR, KSIZE, LENX, LENY,\n     $                  MX, MY \n*     .. Local Arrays ..\n      DOUBLE PRECISION  DT10X(7,4,4), DT10Y(7,4,4), DT7(4,4),\n     $                  DT8(7,4,4), DX1(7),\n     $                  DY1(7), SSIZE1(4), SSIZE2(14,2), SSIZE(7),\n     $                  STX(7), STY(7), SX(7), SY(7),\n     $                  DPAR(5,4), DT19X(7,4,16),DT19XA(7,4,4),\n     $                  DT19XB(7,4,4), DT19XC(7,4,4),DT19XD(7,4,4),\n     $                  DT19Y(7,4,16), DT19YA(7,4,4),DT19YB(7,4,4),\n     $                  DT19YC(7,4,4), DT19YD(7,4,4), DTEMP(5)\n      INTEGER           INCXS(4), INCYS(4), LENS(4,2), NS(4)\n*     .. External Functions ..\n      DOUBLE PRECISION  DDOT, DSDOT\n      EXTERNAL          DDOT, DSDOT\n*     .. External Subroutines ..\n      EXTERNAL          DAXPY, DCOPY, DROTM, DSWAP, STEST, STEST1\n*     .. Intrinsic Functions ..\n      INTRINSIC         ABS, MIN\n*     .. Common blocks ..\n      COMMON            /COMBLA/ICASE, N, INCX, INCY, PASS\n*     .. Data statements ..\n      EQUIVALENCE (DT19X(1,1,1),DT19XA(1,1,1)),(DT19X(1,1,5),\n     A   DT19XB(1,1,1)),(DT19X(1,1,9),DT19XC(1,1,1)),\n     B   (DT19X(1,1,13),DT19XD(1,1,1))\n      EQUIVALENCE (DT19Y(1,1,1),DT19YA(1,1,1)),(DT19Y(1,1,5),\n     A   DT19YB(1,1,1)),(DT19Y(1,1,9),DT19YC(1,1,1)),\n     B   (DT19Y(1,1,13),DT19YD(1,1,1))\n\n      DATA              SA/0.3D0/\n      DATA              INCXS/1, 2, -2, -1/\n      DATA              INCYS/1, -2, 1, -2/\n      DATA              LENS/1, 1, 2, 4, 1, 1, 3, 7/\n      DATA              NS/0, 1, 2, 4/\n      DATA              DX1/0.6D0, 0.1D0, -0.5D0, 0.8D0, 0.9D0, -0.3D0,\n     +                  -0.4D0/\n      DATA              DY1/0.5D0, -0.9D0, 0.3D0, 0.7D0, -0.6D0, 0.2D0,\n     +                  0.8D0/\n      DATA              DT7/0.0D0, 0.30D0, 0.21D0, 0.62D0, 0.0D0,\n     +                  0.30D0, -0.07D0, 0.85D0, 0.0D0, 0.30D0, -0.79D0,\n     +                  -0.74D0, 0.0D0, 0.30D0, 0.33D0, 1.27D0/\n      DATA              DT8/0.5D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 0.68D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 0.0D0, 0.68D0, -0.87D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 0.0D0, 0.0D0, 0.68D0, -0.87D0, 0.15D0,\n     +                  0.94D0, 0.0D0, 0.0D0, 0.0D0, 0.5D0, 0.0D0,\n     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.68D0,\n     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.35D0, -0.9D0, 0.48D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 0.38D0, -0.9D0, 0.57D0, 0.7D0, -0.75D0,\n     +                  0.2D0, 0.98D0, 0.5D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 0.0D0, 0.0D0, 0.68D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.35D0, -0.72D0,\n     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.38D0,\n     +                  -0.63D0, 0.15D0, 0.88D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.5D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.68D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 0.68D0, -0.9D0, 0.33D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 0.0D0, 0.68D0, -0.9D0, 0.33D0, 0.7D0,\n     +                  -0.75D0, 0.2D0, 1.04D0/\n      DATA              DT10X/0.6D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 0.5D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 0.5D0, -0.9D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 0.0D0, 0.5D0, -0.9D0, 0.3D0, 0.7D0,\n     +                  0.0D0, 0.0D0, 0.0D0, 0.6D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 0.0D0, 0.0D0, 0.5D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 0.0D0, 0.0D0, 0.3D0, 0.1D0, 0.5D0, 0.0D0,\n     +                  0.0D0, 0.0D0, 0.0D0, 0.8D0, 0.1D0, -0.6D0,\n     +                  0.8D0, 0.3D0, -0.3D0, 0.5D0, 0.6D0, 0.0D0,\n     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.5D0, 0.0D0,\n     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, -0.9D0,\n     +                  0.1D0, 0.5D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.7D0,\n     +                  0.1D0, 0.3D0, 0.8D0, -0.9D0, -0.3D0, 0.5D0,\n     +                  0.6D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.5D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.5D0, 0.3D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.5D0, 0.3D0, -0.6D0, 0.8D0, 0.0D0, 0.0D0,\n     +                  0.0D0/\n      DATA              DT10Y/0.5D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 0.6D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 0.6D0, 0.1D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 0.6D0, 0.1D0, -0.5D0, 0.8D0, 0.0D0,\n     +                  0.0D0, 0.0D0, 0.5D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 0.0D0, 0.6D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 0.0D0, -0.5D0, -0.9D0, 0.6D0, 0.0D0,\n     +                  0.0D0, 0.0D0, 0.0D0, -0.4D0, -0.9D0, 0.9D0,\n     +                  0.7D0, -0.5D0, 0.2D0, 0.6D0, 0.5D0, 0.0D0,\n     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.6D0, 0.0D0,\n     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, -0.5D0,\n     +                  0.6D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  -0.4D0, 0.9D0, -0.5D0, 0.6D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 0.5D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 0.6D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 0.6D0, -0.9D0, 0.1D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 0.0D0, 0.6D0, -0.9D0, 0.1D0, 0.7D0,\n     +                  -0.5D0, 0.2D0, 0.8D0/\n      DATA              SSIZE1/0.0D0, 0.3D0, 1.6D0, 3.2D0/\n      DATA              SSIZE2/0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0,\n     +                  1.17D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0,\n     +                  1.17D0, 1.17D0, 1.17D0/\n*\n*                         FOR DROTM\n*\n      DATA DPAR/-2.D0,  0.D0,0.D0,0.D0,0.D0,\n     A          -1.D0,  2.D0, -3.D0, -4.D0,  5.D0,\n     B           0.D0,  0.D0,  2.D0, -3.D0,  0.D0,\n     C           1.D0,  5.D0,  2.D0,  0.D0, -4.D0/\n*                        TRUE X RESULTS F0R ROTATIONS DROTM\n      DATA DT19XA/.6D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     A            .6D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     B            .6D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     C            .6D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     D            .6D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     E           -.8D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     F           -.9D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     G           3.5D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     H            .6D0,   .1D0,             0.D0,0.D0,0.D0,0.D0,0.D0,\n     I           -.8D0,  3.8D0,             0.D0,0.D0,0.D0,0.D0,0.D0,\n     J           -.9D0,  2.8D0,             0.D0,0.D0,0.D0,0.D0,0.D0,\n     K           3.5D0,  -.4D0,             0.D0,0.D0,0.D0,0.D0,0.D0,\n     L            .6D0,   .1D0,  -.5D0,   .8D0,          0.D0,0.D0,0.D0,\n     M           -.8D0,  3.8D0, -2.2D0, -1.2D0,          0.D0,0.D0,0.D0,\n     N           -.9D0,  2.8D0, -1.4D0, -1.3D0,          0.D0,0.D0,0.D0,\n     O           3.5D0,  -.4D0, -2.2D0,  4.7D0,          0.D0,0.D0,0.D0/\n*\n      DATA DT19XB/.6D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     A            .6D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     B            .6D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     C            .6D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     D            .6D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     E           -.8D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     F           -.9D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     G           3.5D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     H            .6D0,   .1D0,  -.5D0,             0.D0,0.D0,0.D0,0.D0,\n     I           0.D0,    .1D0, -3.0D0,             0.D0,0.D0,0.D0,0.D0,\n     J           -.3D0,   .1D0, -2.0D0,             0.D0,0.D0,0.D0,0.D0,\n     K           3.3D0,   .1D0, -2.0D0,             0.D0,0.D0,0.D0,0.D0,\n     L            .6D0,   .1D0,  -.5D0,   .8D0,   .9D0,  -.3D0,  -.4D0,\n     M          -2.0D0,   .1D0,  1.4D0,   .8D0,   .6D0,  -.3D0, -2.8D0,\n     N          -1.8D0,   .1D0,  1.3D0,   .8D0,  0.D0,   -.3D0, -1.9D0,\n     O           3.8D0,   .1D0, -3.1D0,   .8D0,  4.8D0,  -.3D0, -1.5D0 /\n*\n      DATA DT19XC/.6D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     A            .6D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     B            .6D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     C            .6D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     D            .6D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     E           -.8D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     F           -.9D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     G           3.5D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     H            .6D0,   .1D0,  -.5D0,             0.D0,0.D0,0.D0,0.D0,\n     I           4.8D0,   .1D0, -3.0D0,             0.D0,0.D0,0.D0,0.D0,\n     J           3.3D0,   .1D0, -2.0D0,             0.D0,0.D0,0.D0,0.D0,\n     K           2.1D0,   .1D0, -2.0D0,             0.D0,0.D0,0.D0,0.D0,\n     L            .6D0,   .1D0,  -.5D0,   .8D0,   .9D0,  -.3D0,  -.4D0,\n     M          -1.6D0,   .1D0, -2.2D0,   .8D0,  5.4D0,  -.3D0, -2.8D0,\n     N          -1.5D0,   .1D0, -1.4D0,   .8D0,  3.6D0,  -.3D0, -1.9D0,\n     O           3.7D0,   .1D0, -2.2D0,   .8D0,  3.6D0,  -.3D0, -1.5D0 /\n*\n      DATA DT19XD/.6D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     A            .6D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     B            .6D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     C            .6D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     D            .6D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     E           -.8D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     F           -.9D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     G           3.5D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     H            .6D0,   .1D0,             0.D0,0.D0,0.D0,0.D0,0.D0,\n     I           -.8D0, -1.0D0,             0.D0,0.D0,0.D0,0.D0,0.D0,\n     J           -.9D0,  -.8D0,             0.D0,0.D0,0.D0,0.D0,0.D0,\n     K           3.5D0,   .8D0,             0.D0,0.D0,0.D0,0.D0,0.D0,\n     L            .6D0,   .1D0,  -.5D0,   .8D0,          0.D0,0.D0,0.D0,\n     M           -.8D0, -1.0D0,  1.4D0, -1.6D0,          0.D0,0.D0,0.D0,\n     N           -.9D0,  -.8D0,  1.3D0, -1.6D0,          0.D0,0.D0,0.D0,\n     O           3.5D0,   .8D0, -3.1D0,  4.8D0,          0.D0,0.D0,0.D0/\n*                        TRUE Y RESULTS FOR ROTATIONS DROTM\n      DATA DT19YA/.5D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     A            .5D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     B            .5D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     C            .5D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     D            .5D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     E            .7D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     F           1.7D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     G          -2.6D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     H            .5D0,  -.9D0,             0.D0,0.D0,0.D0,0.D0,0.D0,\n     I            .7D0, -4.8D0,             0.D0,0.D0,0.D0,0.D0,0.D0,\n     J           1.7D0,  -.7D0,             0.D0,0.D0,0.D0,0.D0,0.D0,\n     K          -2.6D0,  3.5D0,             0.D0,0.D0,0.D0,0.D0,0.D0,\n     L            .5D0,  -.9D0,   .3D0,   .7D0,          0.D0,0.D0,0.D0,\n     M            .7D0, -4.8D0,  3.0D0,  1.1D0,          0.D0,0.D0,0.D0,\n     N           1.7D0,  -.7D0,  -.7D0,  2.3D0,          0.D0,0.D0,0.D0,\n     O          -2.6D0,  3.5D0,  -.7D0, -3.6D0,          0.D0,0.D0,0.D0/\n*\n      DATA DT19YB/.5D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     A            .5D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     B            .5D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     C            .5D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     D            .5D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     E            .7D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     F           1.7D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     G          -2.6D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     H            .5D0,  -.9D0,   .3D0,             0.D0,0.D0,0.D0,0.D0,\n     I           4.0D0,  -.9D0,  -.3D0,             0.D0,0.D0,0.D0,0.D0,\n     J           -.5D0,  -.9D0,  1.5D0,             0.D0,0.D0,0.D0,0.D0,\n     K          -1.5D0,  -.9D0, -1.8D0,             0.D0,0.D0,0.D0,0.D0,\n     L            .5D0,  -.9D0,   .3D0,   .7D0,  -.6D0,   .2D0,   .8D0,\n     M           3.7D0,  -.9D0, -1.2D0,   .7D0, -1.5D0,   .2D0,  2.2D0,\n     N           -.3D0,  -.9D0,  2.1D0,   .7D0, -1.6D0,   .2D0,  2.0D0,\n     O          -1.6D0,  -.9D0, -2.1D0,   .7D0,  2.9D0,   .2D0, -3.8D0 /\n*\n      DATA DT19YC/.5D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     A            .5D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     B            .5D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     C            .5D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     D            .5D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     E            .7D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     F           1.7D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     G          -2.6D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     H            .5D0,  -.9D0,             0.D0,0.D0,0.D0,0.D0,0.D0,\n     I           4.0D0, -6.3D0,             0.D0,0.D0,0.D0,0.D0,0.D0,\n     J           -.5D0,   .3D0,             0.D0,0.D0,0.D0,0.D0,0.D0,\n     K          -1.5D0,  3.0D0,             0.D0,0.D0,0.D0,0.D0,0.D0,\n     L            .5D0,  -.9D0,   .3D0,   .7D0,          0.D0,0.D0,0.D0,\n     M           3.7D0, -7.2D0,  3.0D0,  1.7D0,          0.D0,0.D0,0.D0,\n     N           -.3D0,   .9D0,  -.7D0,  1.9D0,          0.D0,0.D0,0.D0,\n     O          -1.6D0,  2.7D0,  -.7D0, -3.4D0,          0.D0,0.D0,0.D0/\n*\n      DATA DT19YD/.5D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     A            .5D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     B            .5D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     C            .5D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     D            .5D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     E            .7D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     F           1.7D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     G          -2.6D0,                  0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,\n     H            .5D0,  -.9D0,   .3D0,             0.D0,0.D0,0.D0,0.D0,\n     I            .7D0,  -.9D0,  1.2D0,             0.D0,0.D0,0.D0,0.D0,\n     J           1.7D0,  -.9D0,   .5D0,             0.D0,0.D0,0.D0,0.D0,\n     K          -2.6D0,  -.9D0, -1.3D0,             0.D0,0.D0,0.D0,0.D0,\n     L            .5D0,  -.9D0,   .3D0,   .7D0,  -.6D0,   .2D0,   .8D0,\n     M            .7D0,  -.9D0,  1.2D0,   .7D0, -1.5D0,   .2D0,  1.6D0,\n     N           1.7D0,  -.9D0,   .5D0,   .7D0, -1.6D0,   .2D0,  2.4D0,\n     O          -2.6D0,  -.9D0, -1.3D0,   .7D0,  2.9D0,   .2D0, -4.0D0 /\n*    \n*     .. Executable Statements ..\n*\n      DO 120 KI = 1, 4\n         INCX = INCXS(KI)\n         INCY = INCYS(KI)\n         MX = ABS(INCX)\n         MY = ABS(INCY)\n*\n         DO 100 KN = 1, 4\n            N = NS(KN)\n            KSIZE = MIN(2,KN)\n            LENX = LENS(KN,MX)\n            LENY = LENS(KN,MY)\n*           .. Initialize all argument arrays ..\n            DO 20 I = 1, 7\n               SX(I) = DX1(I)\n               SY(I) = DY1(I)\n   20       CONTINUE\n*\n            IF (ICASE.EQ.1) THEN\n*              .. DDOT ..\n               CALL STEST1(DDOT(N,SX,INCX,SY,INCY),DT7(KN,KI),SSIZE1(KN)\n     +                     ,SFAC)\n            ELSE IF (ICASE.EQ.2) THEN\n*              .. DAXPY ..\n               CALL DAXPY(N,SA,SX,INCX,SY,INCY)\n               DO 40 J = 1, LENY\n                  STY(J) = DT8(J,KN,KI)\n   40          CONTINUE\n               CALL STEST(LENY,SY,STY,SSIZE2(1,KSIZE),SFAC)\n            ELSE IF (ICASE.EQ.5) THEN\n*              .. DCOPY ..\n               DO 60 I = 1, 7\n                  STY(I) = DT10Y(I,KN,KI)\n   60          CONTINUE\n               CALL DCOPY(N,SX,INCX,SY,INCY)\n               CALL STEST(LENY,SY,STY,SSIZE2(1,1),1.0D0)\n            ELSE IF (ICASE.EQ.6) THEN\n*              .. DSWAP ..\n               CALL DSWAP(N,SX,INCX,SY,INCY)\n               DO 80 I = 1, 7\n                  STX(I) = DT10X(I,KN,KI)\n                  STY(I) = DT10Y(I,KN,KI)\n   80          CONTINUE\n               CALL STEST(LENX,SX,STX,SSIZE2(1,1),1.0D0)\n               CALL STEST(LENY,SY,STY,SSIZE2(1,1),1.0D0)\n            ELSE IF (ICASE.EQ.12) THEN\n*              .. DROTM ..\n               KNI=KN+4*(KI-1)\n               DO KPAR=1,4\n                  DO I=1,7\n                     SX(I) = DX1(I)\n                     SY(I) = DY1(I)\n                     STX(I)= DT19X(I,KPAR,KNI)\n                     STY(I)= DT19Y(I,KPAR,KNI)\n                  END DO\n*\n                  DO I=1,5\n                     DTEMP(I) = DPAR(I,KPAR)\n                  END DO\n*\n                  DO  I=1,LENX\n                     SSIZE(I)=STX(I)\n                  END DO\n*                   SEE REMARK ABOVE ABOUT DT11X(1,2,7)\n*                       AND DT11X(5,3,8).\n                  IF ((KPAR .EQ. 2) .AND. (KNI .EQ. 7))\n     $               SSIZE(1) = 2.4D0\n                  IF ((KPAR .EQ. 3) .AND. (KNI .EQ. 8))\n     $               SSIZE(5) = 1.8D0\n*\n                  CALL   DROTM(N,SX,INCX,SY,INCY,DTEMP)\n                  CALL   STEST(LENX,SX,STX,SSIZE,SFAC)\n                  CALL   STEST(LENY,SY,STY,STY,SFAC)\n               END DO\n            ELSE IF (ICASE.EQ.13) THEN\n*              .. DSDOT ..\n            CALL TESTDSDOT(REAL(DSDOT(N,REAL(SX),INCX,REAL(SY),INCY)),\n     $                 REAL(DT7(KN,KI)),REAL(SSIZE1(KN)), .3125E-1)\n            ELSE\n               WRITE (NOUT,*) ' Shouldn''t be here in CHECK2'\n               STOP\n            END IF\n  100    CONTINUE\n  120 CONTINUE\n      RETURN\n      END\n      SUBROUTINE CHECK3(SFAC)\n*     .. Parameters ..\n      INTEGER           NOUT\n      PARAMETER         (NOUT=6)\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION  SFAC\n*     .. Scalars in Common ..\n      INTEGER           ICASE, INCX, INCY, N\n      LOGICAL           PASS\n*     .. Local Scalars ..\n      DOUBLE PRECISION  SC, SS\n      INTEGER           I, K, KI, KN, KSIZE, LENX, LENY, MX, MY\n*     .. Local Arrays ..\n      DOUBLE PRECISION  COPYX(5), COPYY(5), DT9X(7,4,4), DT9Y(7,4,4),\n     +                  DX1(7), DY1(7), MWPC(11), MWPS(11), MWPSTX(5),\n     +                  MWPSTY(5), MWPTX(11,5), MWPTY(11,5), MWPX(5),\n     +                  MWPY(5), SSIZE2(14,2), STX(7), STY(7), SX(7),\n     +                  SY(7)\n      INTEGER           INCXS(4), INCYS(4), LENS(4,2), MWPINX(11),\n     +                  MWPINY(11), MWPN(11), NS(4)\n*     .. External Subroutines ..\n      EXTERNAL          DROT, STEST\n*     .. Intrinsic Functions ..\n      INTRINSIC         ABS, MIN\n*     .. Common blocks ..\n      COMMON            /COMBLA/ICASE, N, INCX, INCY, PASS\n*     .. Data statements ..\n      DATA              INCXS/1, 2, -2, -1/\n      DATA              INCYS/1, -2, 1, -2/\n      DATA              LENS/1, 1, 2, 4, 1, 1, 3, 7/\n      DATA              NS/0, 1, 2, 4/\n      DATA              DX1/0.6D0, 0.1D0, -0.5D0, 0.8D0, 0.9D0, -0.3D0,\n     +                  -0.4D0/\n      DATA              DY1/0.5D0, -0.9D0, 0.3D0, 0.7D0, -0.6D0, 0.2D0,\n     +                  0.8D0/\n      DATA              SC, SS/0.8D0, 0.6D0/\n      DATA              DT9X/0.6D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 0.78D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 0.0D0, 0.78D0, -0.46D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 0.0D0, 0.0D0, 0.78D0, -0.46D0, -0.22D0,\n     +                  1.06D0, 0.0D0, 0.0D0, 0.0D0, 0.6D0, 0.0D0,\n     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.78D0,\n     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.66D0, 0.1D0, -0.1D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 0.96D0, 0.1D0, -0.76D0, 0.8D0, 0.90D0,\n     +                  -0.3D0, -0.02D0, 0.6D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 0.0D0, 0.0D0, 0.78D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, -0.06D0, 0.1D0,\n     +                  -0.1D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.90D0,\n     +                  0.1D0, -0.22D0, 0.8D0, 0.18D0, -0.3D0, -0.02D0,\n     +                  0.6D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.78D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 0.78D0, 0.26D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 0.0D0, 0.78D0, 0.26D0, -0.76D0, 1.12D0,\n     +                  0.0D0, 0.0D0, 0.0D0/\n      DATA              DT9Y/0.5D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 0.04D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 0.0D0, 0.04D0, -0.78D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 0.0D0, 0.0D0, 0.04D0, -0.78D0, 0.54D0,\n     +                  0.08D0, 0.0D0, 0.0D0, 0.0D0, 0.5D0, 0.0D0,\n     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.04D0,\n     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.7D0,\n     +                  -0.9D0, -0.12D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.64D0, -0.9D0, -0.30D0, 0.7D0, -0.18D0, 0.2D0,\n     +                  0.28D0, 0.5D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 0.0D0, 0.04D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 0.0D0, 0.0D0, 0.7D0, -1.08D0, 0.0D0,\n     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.64D0, -1.26D0,\n     +                  0.54D0, 0.20D0, 0.0D0, 0.0D0, 0.0D0, 0.5D0,\n     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.04D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 0.04D0, -0.9D0, 0.18D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 0.0D0, 0.04D0, -0.9D0, 0.18D0, 0.7D0,\n     +                  -0.18D0, 0.2D0, 0.16D0/\n      DATA              SSIZE2/0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0,\n     +                  0.0D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0,\n     +                  1.17D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0, 1.17D0,\n     +                  1.17D0, 1.17D0, 1.17D0/\n*     .. Executable Statements ..\n*\n      DO 60 KI = 1, 4\n         INCX = INCXS(KI)\n         INCY = INCYS(KI)\n         MX = ABS(INCX)\n         MY = ABS(INCY)\n*\n         DO 40 KN = 1, 4\n            N = NS(KN)\n            KSIZE = MIN(2,KN)\n            LENX = LENS(KN,MX)\n            LENY = LENS(KN,MY)\n*\n            IF (ICASE.EQ.4) THEN\n*              .. DROT ..\n               DO 20 I = 1, 7\n                  SX(I) = DX1(I)\n                  SY(I) = DY1(I)\n                  STX(I) = DT9X(I,KN,KI)\n                  STY(I) = DT9Y(I,KN,KI)\n   20          CONTINUE\n               CALL DROT(N,SX,INCX,SY,INCY,SC,SS)\n               CALL STEST(LENX,SX,STX,SSIZE2(1,KSIZE),SFAC)\n               CALL STEST(LENY,SY,STY,SSIZE2(1,KSIZE),SFAC)\n            ELSE\n               WRITE (NOUT,*) ' Shouldn''t be here in CHECK3'\n               STOP\n            END IF\n   40    CONTINUE\n   60 CONTINUE\n*\n      MWPC(1) = 1\n      DO 80 I = 2, 11\n         MWPC(I) = 0\n   80 CONTINUE\n      MWPS(1) = 0\n      DO 100 I = 2, 6\n         MWPS(I) = 1\n  100 CONTINUE\n      DO 120 I = 7, 11\n         MWPS(I) = -1\n  120 CONTINUE\n      MWPINX(1) = 1\n      MWPINX(2) = 1\n      MWPINX(3) = 1\n      MWPINX(4) = -1\n      MWPINX(5) = 1\n      MWPINX(6) = -1\n      MWPINX(7) = 1\n      MWPINX(8) = 1\n      MWPINX(9) = -1\n      MWPINX(10) = 1\n      MWPINX(11) = -1\n      MWPINY(1) = 1\n      MWPINY(2) = 1\n      MWPINY(3) = -1\n      MWPINY(4) = -1\n      MWPINY(5) = 2\n      MWPINY(6) = 1\n      MWPINY(7) = 1\n      MWPINY(8) = -1\n      MWPINY(9) = -1\n      MWPINY(10) = 2\n      MWPINY(11) = 1\n      DO 140 I = 1, 11\n         MWPN(I) = 5\n  140 CONTINUE\n      MWPN(5) = 3\n      MWPN(10) = 3\n      DO 160 I = 1, 5\n         MWPX(I) = I\n         MWPY(I) = I\n         MWPTX(1,I) = I\n         MWPTY(1,I) = I\n         MWPTX(2,I) = I\n         MWPTY(2,I) = -I\n         MWPTX(3,I) = 6 - I\n         MWPTY(3,I) = I - 6\n         MWPTX(4,I) = I\n         MWPTY(4,I) = -I\n         MWPTX(6,I) = 6 - I\n         MWPTY(6,I) = I - 6\n         MWPTX(7,I) = -I\n         MWPTY(7,I) = I\n         MWPTX(8,I) = I - 6\n         MWPTY(8,I) = 6 - I\n         MWPTX(9,I) = -I\n         MWPTY(9,I) = I\n         MWPTX(11,I) = I - 6\n         MWPTY(11,I) = 6 - I\n  160 CONTINUE\n      MWPTX(5,1) = 1\n      MWPTX(5,2) = 3\n      MWPTX(5,3) = 5\n      MWPTX(5,4) = 4\n      MWPTX(5,5) = 5\n      MWPTY(5,1) = -1\n      MWPTY(5,2) = 2\n      MWPTY(5,3) = -2\n      MWPTY(5,4) = 4\n      MWPTY(5,5) = -3\n      MWPTX(10,1) = -1\n      MWPTX(10,2) = -3\n      MWPTX(10,3) = -5\n      MWPTX(10,4) = 4\n      MWPTX(10,5) = 5\n      MWPTY(10,1) = 1\n      MWPTY(10,2) = 2\n      MWPTY(10,3) = 2\n      MWPTY(10,4) = 4\n      MWPTY(10,5) = 3\n      DO 200 I = 1, 11\n         INCX = MWPINX(I)\n         INCY = MWPINY(I)\n         DO 180 K = 1, 5\n            COPYX(K) = MWPX(K)\n            COPYY(K) = MWPY(K)\n            MWPSTX(K) = MWPTX(I,K)\n            MWPSTY(K) = MWPTY(I,K)\n  180    CONTINUE\n         CALL DROT(MWPN(I),COPYX,INCX,COPYY,INCY,MWPC(I),MWPS(I))\n         CALL STEST(5,COPYX,MWPSTX,MWPSTX,SFAC)\n         CALL STEST(5,COPYY,MWPSTY,MWPSTY,SFAC)\n  200 CONTINUE\n      RETURN\n      END\n      SUBROUTINE STEST(LEN,SCOMP,STRUE,SSIZE,SFAC)\n*     ********************************* STEST **************************\n*\n*     THIS SUBR COMPARES ARRAYS  SCOMP() AND STRUE() OF LENGTH LEN TO\n*     SEE IF THE TERM BY TERM DIFFERENCES, MULTIPLIED BY SFAC, ARE\n*     NEGLIGIBLE.\n*\n*     C. L. LAWSON, JPL, 1974 DEC 10\n*\n*     .. Parameters ..\n      INTEGER          NOUT\n      DOUBLE PRECISION ZERO\n      PARAMETER        (NOUT=6, ZERO=0.0D0)\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION SFAC\n      INTEGER          LEN\n*     .. Array Arguments ..\n      DOUBLE PRECISION SCOMP(LEN), SSIZE(LEN), STRUE(LEN)\n*     .. Scalars in Common ..\n      INTEGER          ICASE, INCX, INCY, N\n      LOGICAL          PASS\n*     .. Local Scalars ..\n      DOUBLE PRECISION SD\n      INTEGER          I\n*     .. External Functions ..\n      DOUBLE PRECISION SDIFF\n      EXTERNAL         SDIFF\n*     .. Intrinsic Functions ..\n      INTRINSIC        ABS\n*     .. Common blocks ..\n      COMMON           /COMBLA/ICASE, N, INCX, INCY, PASS\n*     .. Executable Statements ..\n*\n      DO 40 I = 1, LEN\n         SD = SCOMP(I) - STRUE(I)\n         IF (ABS(SFAC*SD) .LE. ABS(SSIZE(I))*EPSILON(ZERO))\n     +       GO TO 40\n*\n*                             HERE    SCOMP(I) IS NOT CLOSE TO STRUE(I).\n*\n         IF ( .NOT. PASS) GO TO 20\n*                             PRINT FAIL MESSAGE AND HEADER.\n         PASS = .FALSE.\n         WRITE (NOUT,99999)\n         WRITE (NOUT,99998)\n   20    WRITE (NOUT,99997) ICASE, N, INCX, INCY, I, SCOMP(I),\n     +     STRUE(I), SD, SSIZE(I)\n   40 CONTINUE\n      RETURN\n*\n99999 FORMAT ('                                       FAIL')\n99998 FORMAT (/' CASE  N INCX INCY  I                            ',\n     +       ' COMP(I)                             TRUE(I)  DIFFERENCE',\n     +       '     SIZE(I)',/1X)\n99997 FORMAT (1X,I4,I3,2I5,I3,2D36.8,2D12.4)\n      END\n      SUBROUTINE TESTDSDOT(SCOMP,STRUE,SSIZE,SFAC)\n*     ********************************* STEST **************************\n*\n*     THIS SUBR COMPARES ARRAYS  SCOMP() AND STRUE() OF LENGTH LEN TO\n*     SEE IF THE TERM BY TERM DIFFERENCES, MULTIPLIED BY SFAC, ARE\n*     NEGLIGIBLE.\n*\n*     C. L. LAWSON, JPL, 1974 DEC 10\n*\n*     .. Parameters ..\n      INTEGER          NOUT\n      REAL             ZERO\n      PARAMETER        (NOUT=6, ZERO=0.0E0)\n*     .. Scalar Arguments ..\n      REAL             SFAC, SCOMP, SSIZE, STRUE\n*     .. Scalars in Common ..\n      INTEGER          ICASE, INCX, INCY, N\n      LOGICAL          PASS\n*     .. Local Scalars ..\n      REAL             SD\n*     .. Intrinsic Functions ..\n      INTRINSIC        ABS\n*     .. Common blocks ..\n      COMMON           /COMBLA/ICASE, N, INCX, INCY, PASS\n*     .. Executable Statements ..\n*\n         SD = SCOMP - STRUE\n         IF (ABS(SFAC*SD) .LE. ABS(SSIZE) * EPSILON(ZERO))\n     +       GO TO 40\n*\n*                             HERE    SCOMP(I) IS NOT CLOSE TO STRUE(I).\n*\n         IF ( .NOT. PASS) GO TO 20\n*                             PRINT FAIL MESSAGE AND HEADER.\n         PASS = .FALSE.\n         WRITE (NOUT,99999)\n         WRITE (NOUT,99998)\n   20    WRITE (NOUT,99997) ICASE, N, INCX, INCY, SCOMP,\n     +     STRUE, SD, SSIZE\n   40 CONTINUE\n      RETURN\n*\n99999 FORMAT ('                                       FAIL')\n99998 FORMAT (/' CASE  N INCX INCY                           ',\n     +       ' COMP(I)                             TRUE(I)  DIFFERENCE',\n     +       '     SIZE(I)',/1X)\n99997 FORMAT (1X,I4,I3,1I5,I3,2E36.8,2E12.4)\n      END\n      SUBROUTINE STEST1(SCOMP1,STRUE1,SSIZE,SFAC)\n*     ************************* STEST1 *****************************\n*\n*     THIS IS AN INTERFACE SUBROUTINE TO ACCOMMODATE THE FORTRAN\n*     REQUIREMENT THAT WHEN A DUMMY ARGUMENT IS AN ARRAY, THE\n*     ACTUAL ARGUMENT MUST ALSO BE AN ARRAY OR AN ARRAY ELEMENT.\n*\n*     C.L. LAWSON, JPL, 1978 DEC 6\n*\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION  SCOMP1, SFAC, STRUE1\n*     .. Array Arguments ..\n      DOUBLE PRECISION  SSIZE(*)\n*     .. Local Arrays ..\n      DOUBLE PRECISION  SCOMP(1), STRUE(1)\n*     .. External Subroutines ..\n      EXTERNAL          STEST\n*     .. Executable Statements ..\n*\n      SCOMP(1) = SCOMP1\n      STRUE(1) = STRUE1\n      CALL STEST(1,SCOMP,STRUE,SSIZE,SFAC)\n*\n      RETURN\n      END\n      DOUBLE PRECISION FUNCTION SDIFF(SA,SB)\n*     ********************************* SDIFF **************************\n*     COMPUTES DIFFERENCE OF TWO NUMBERS.  C. L. LAWSON, JPL 1974 FEB 15\n*\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION                SA, SB\n*     .. Executable Statements ..\n      SDIFF = SA - SB\n      RETURN\n      END\n      SUBROUTINE ITEST1(ICOMP,ITRUE)\n*     ********************************* ITEST1 *************************\n*\n*     THIS SUBROUTINE COMPARES THE VARIABLES ICOMP AND ITRUE FOR\n*     EQUALITY.\n*     C. L. LAWSON, JPL, 1974 DEC 10\n*\n*     .. Parameters ..\n      INTEGER           NOUT\n      PARAMETER         (NOUT=6)\n*     .. Scalar Arguments ..\n      INTEGER           ICOMP, ITRUE\n*     .. Scalars in Common ..\n      INTEGER           ICASE, INCX, INCY, N\n      LOGICAL           PASS\n*     .. Local Scalars ..\n      INTEGER           ID\n*     .. Common blocks ..\n      COMMON            /COMBLA/ICASE, N, INCX, INCY, PASS\n*     .. Executable Statements ..\n*\n      IF (ICOMP.EQ.ITRUE) GO TO 40\n*\n*                            HERE ICOMP IS NOT EQUAL TO ITRUE.\n*\n      IF ( .NOT. PASS) GO TO 20\n*                             PRINT FAIL MESSAGE AND HEADER.\n      PASS = .FALSE.\n      WRITE (NOUT,99999)\n      WRITE (NOUT,99998)\n   20 ID = ICOMP - ITRUE\n      WRITE (NOUT,99997) ICASE, N, INCX, INCY, ICOMP, ITRUE, ID\n   40 CONTINUE\n      RETURN\n*\n99999 FORMAT ('                                       FAIL')\n99998 FORMAT (/' CASE  N INCX INCY                               ',\n     +       ' COMP                                TRUE     DIFFERENCE',\n     +       /1X)\n99997 FORMAT (1X,I4,I3,2I5,2I36,I12)\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/blas/testing/dblat2.f",
    "content": "*> \\brief \\b DBLAT2\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*  Definition:\n*  ===========\n*\n*       PROGRAM DBLAT2\n* \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> Test program for the DOUBLE PRECISION Level 2 Blas.\n*>\n*> The program must be driven by a short data file. The first 18 records\n*> of the file are read using list-directed input, the last 16 records\n*> are read using the format ( A6, L2 ). An annotated example of a data\n*> file can be obtained by deleting the first 3 characters from the\n*> following 34 lines:\n*> 'dblat2.out'      NAME OF SUMMARY OUTPUT FILE\n*> 6                 UNIT NUMBER OF SUMMARY FILE\n*> 'DBLAT2.SNAP'     NAME OF SNAPSHOT OUTPUT FILE\n*> -1                UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)\n*> F        LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.\n*> F        LOGICAL FLAG, T TO STOP ON FAILURES.\n*> T        LOGICAL FLAG, T TO TEST ERROR EXITS.\n*> 16.0     THRESHOLD VALUE OF TEST RATIO\n*> 6                 NUMBER OF VALUES OF N\n*> 0 1 2 3 5 9       VALUES OF N\n*> 4                 NUMBER OF VALUES OF K\n*> 0 1 2 4           VALUES OF K\n*> 4                 NUMBER OF VALUES OF INCX AND INCY\n*> 1 2 -1 -2         VALUES OF INCX AND INCY\n*> 3                 NUMBER OF VALUES OF ALPHA\n*> 0.0 1.0 0.7       VALUES OF ALPHA\n*> 3                 NUMBER OF VALUES OF BETA\n*> 0.0 1.0 0.9       VALUES OF BETAC\n*> DGEMV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> DGBMV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> DSYMV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> DSBMV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> DSPMV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> DTRMV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> DTBMV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> DTPMV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> DTRSV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> DTBSV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> DTPSV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> DGER   T PUT F FOR NO TEST. SAME COLUMNS.\n*> DSYR   T PUT F FOR NO TEST. SAME COLUMNS.\n*> DSPR   T PUT F FOR NO TEST. SAME COLUMNS.\n*> DSYR2  T PUT F FOR NO TEST. SAME COLUMNS.\n*> DSPR2  T PUT F FOR NO TEST. SAME COLUMNS.\n*>\n*> Further Details\n*> ===============\n*>\n*>    See:\n*>\n*>       Dongarra J. J., Du Croz J. J., Hammarling S.  and Hanson R. J..\n*>       An  extended  set of Fortran  Basic Linear Algebra Subprograms.\n*>\n*>       Technical  Memoranda  Nos. 41 (revision 3) and 81,  Mathematics\n*>       and  Computer Science  Division,  Argonne  National Laboratory,\n*>       9700 South Cass Avenue, Argonne, Illinois 60439, US.\n*>\n*>       Or\n*>\n*>       NAG  Technical Reports TR3/87 and TR4/87,  Numerical Algorithms\n*>       Group  Ltd.,  NAG  Central  Office,  256  Banbury  Road, Oxford\n*>       OX2 7DE, UK,  and  Numerical Algorithms Group Inc.,  1101  31st\n*>       Street,  Suite 100,  Downers Grove,  Illinois 60515-1263,  USA.\n*>\n*>\n*> -- Written on 10-August-1987.\n*>    Richard Hanson, Sandia National Labs.\n*>    Jeremy Du Croz, NAG Central Office.\n*>\n*>    10-9-00:  Change STATUS='NEW' to 'UNKNOWN' so that the testers\n*>              can be run multiple times without deleting generated\n*>              output files (susan)\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date April 2012\n*\n*> \\ingroup double_blas_testing\n*\n*  =====================================================================\n      PROGRAM DBLAT2\n*\n*  -- Reference BLAS test routine (version 3.4.1) --\n*  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     April 2012\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      INTEGER            NIN\n      PARAMETER          ( NIN = 5 )\n      INTEGER            NSUBS\n      PARAMETER          ( NSUBS = 16 )\n      DOUBLE PRECISION   ZERO, ONE\n      PARAMETER          ( ZERO = 0.0D0, ONE = 1.0D0 )\n      INTEGER            NMAX, INCMAX\n      PARAMETER          ( NMAX = 65, INCMAX = 2 )\n      INTEGER            NINMAX, NIDMAX, NKBMAX, NALMAX, NBEMAX\n      PARAMETER          ( NINMAX = 7, NIDMAX = 9, NKBMAX = 7,\n     $                   NALMAX = 7, NBEMAX = 7 )\n*     .. Local Scalars ..\n      DOUBLE PRECISION   EPS, ERR, THRESH\n      INTEGER            I, ISNUM, J, N, NALF, NBET, NIDIM, NINC, NKB,\n     $                   NOUT, NTRA\n      LOGICAL            FATAL, LTESTT, REWI, SAME, SFATAL, TRACE,\n     $                   TSTERR\n      CHARACTER*1        TRANS\n      CHARACTER*6        SNAMET\n      CHARACTER*32       SNAPS, SUMMRY\n*     .. Local Arrays ..\n      DOUBLE PRECISION   A( NMAX, NMAX ), AA( NMAX*NMAX ),\n     $                   ALF( NALMAX ), AS( NMAX*NMAX ), BET( NBEMAX ),\n     $                   G( NMAX ), X( NMAX ), XS( NMAX*INCMAX ),\n     $                   XX( NMAX*INCMAX ), Y( NMAX ),\n     $                   YS( NMAX*INCMAX ), YT( NMAX ),\n     $                   YY( NMAX*INCMAX ), Z( 2*NMAX )\n      INTEGER            IDIM( NIDMAX ), INC( NINMAX ), KB( NKBMAX )\n      LOGICAL            LTEST( NSUBS )\n      CHARACTER*6        SNAMES( NSUBS )\n*     .. External Functions ..\n      DOUBLE PRECISION   DDIFF\n      LOGICAL            LDE\n      EXTERNAL           DDIFF, LDE\n*     .. External Subroutines ..\n      EXTERNAL           DCHK1, DCHK2, DCHK3, DCHK4, DCHK5, DCHK6,\n     $                   DCHKE, DMVCH\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, MAX, MIN\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n      CHARACTER*6        SRNAMT\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n      COMMON             /SRNAMC/SRNAMT\n*     .. Data statements ..\n      DATA               SNAMES/'DGEMV ', 'DGBMV ', 'DSYMV ', 'DSBMV ',\n     $                   'DSPMV ', 'DTRMV ', 'DTBMV ', 'DTPMV ',\n     $                   'DTRSV ', 'DTBSV ', 'DTPSV ', 'DGER  ',\n     $                   'DSYR  ', 'DSPR  ', 'DSYR2 ', 'DSPR2 '/\n*     .. Executable Statements ..\n*\n*     Read name and unit number for summary output file and open file.\n*\n      READ( NIN, FMT = * )SUMMRY\n      READ( NIN, FMT = * )NOUT\n      OPEN( NOUT, FILE = SUMMRY, STATUS = 'UNKNOWN' )\n      NOUTC = NOUT\n*\n*     Read name and unit number for snapshot output file and open file.\n*\n      READ( NIN, FMT = * )SNAPS\n      READ( NIN, FMT = * )NTRA\n      TRACE = NTRA.GE.0\n      IF( TRACE )THEN\n         OPEN( NTRA, FILE = SNAPS, STATUS = 'UNKNOWN' )\n      END IF\n*     Read the flag that directs rewinding of the snapshot file.\n      READ( NIN, FMT = * )REWI\n      REWI = REWI.AND.TRACE\n*     Read the flag that directs stopping on any failure.\n      READ( NIN, FMT = * )SFATAL\n*     Read the flag that indicates whether error exits are to be tested.\n      READ( NIN, FMT = * )TSTERR\n*     Read the threshold value of the test ratio\n      READ( NIN, FMT = * )THRESH\n*\n*     Read and check the parameter values for the tests.\n*\n*     Values of N\n      READ( NIN, FMT = * )NIDIM\n      IF( NIDIM.LT.1.OR.NIDIM.GT.NIDMAX )THEN\n         WRITE( NOUT, FMT = 9997 )'N', NIDMAX\n         GO TO 230\n      END IF\n      READ( NIN, FMT = * )( IDIM( I ), I = 1, NIDIM )\n      DO 10 I = 1, NIDIM\n         IF( IDIM( I ).LT.0.OR.IDIM( I ).GT.NMAX )THEN\n            WRITE( NOUT, FMT = 9996 )NMAX\n            GO TO 230\n         END IF\n   10 CONTINUE\n*     Values of K\n      READ( NIN, FMT = * )NKB\n      IF( NKB.LT.1.OR.NKB.GT.NKBMAX )THEN\n         WRITE( NOUT, FMT = 9997 )'K', NKBMAX\n         GO TO 230\n      END IF\n      READ( NIN, FMT = * )( KB( I ), I = 1, NKB )\n      DO 20 I = 1, NKB\n         IF( KB( I ).LT.0 )THEN\n            WRITE( NOUT, FMT = 9995 )\n            GO TO 230\n         END IF\n   20 CONTINUE\n*     Values of INCX and INCY\n      READ( NIN, FMT = * )NINC\n      IF( NINC.LT.1.OR.NINC.GT.NINMAX )THEN\n         WRITE( NOUT, FMT = 9997 )'INCX AND INCY', NINMAX\n         GO TO 230\n      END IF\n      READ( NIN, FMT = * )( INC( I ), I = 1, NINC )\n      DO 30 I = 1, NINC\n         IF( INC( I ).EQ.0.OR.ABS( INC( I ) ).GT.INCMAX )THEN\n            WRITE( NOUT, FMT = 9994 )INCMAX\n            GO TO 230\n         END IF\n   30 CONTINUE\n*     Values of ALPHA\n      READ( NIN, FMT = * )NALF\n      IF( NALF.LT.1.OR.NALF.GT.NALMAX )THEN\n         WRITE( NOUT, FMT = 9997 )'ALPHA', NALMAX\n         GO TO 230\n      END IF\n      READ( NIN, FMT = * )( ALF( I ), I = 1, NALF )\n*     Values of BETA\n      READ( NIN, FMT = * )NBET\n      IF( NBET.LT.1.OR.NBET.GT.NBEMAX )THEN\n         WRITE( NOUT, FMT = 9997 )'BETA', NBEMAX\n         GO TO 230\n      END IF\n      READ( NIN, FMT = * )( BET( I ), I = 1, NBET )\n*\n*     Report values of parameters.\n*\n      WRITE( NOUT, FMT = 9993 )\n      WRITE( NOUT, FMT = 9992 )( IDIM( I ), I = 1, NIDIM )\n      WRITE( NOUT, FMT = 9991 )( KB( I ), I = 1, NKB )\n      WRITE( NOUT, FMT = 9990 )( INC( I ), I = 1, NINC )\n      WRITE( NOUT, FMT = 9989 )( ALF( I ), I = 1, NALF )\n      WRITE( NOUT, FMT = 9988 )( BET( I ), I = 1, NBET )\n      IF( .NOT.TSTERR )THEN\n         WRITE( NOUT, FMT = * )\n         WRITE( NOUT, FMT = 9980 )\n      END IF\n      WRITE( NOUT, FMT = * )\n      WRITE( NOUT, FMT = 9999 )THRESH\n      WRITE( NOUT, FMT = * )\n*\n*     Read names of subroutines and flags which indicate\n*     whether they are to be tested.\n*\n      DO 40 I = 1, NSUBS\n         LTEST( I ) = .FALSE.\n   40 CONTINUE\n   50 READ( NIN, FMT = 9984, END = 80 )SNAMET, LTESTT\n      DO 60 I = 1, NSUBS\n         IF( SNAMET.EQ.SNAMES( I ) )\n     $      GO TO 70\n   60 CONTINUE\n      WRITE( NOUT, FMT = 9986 )SNAMET\n      STOP\n   70 LTEST( I ) = LTESTT\n      GO TO 50\n*\n   80 CONTINUE\n      CLOSE ( NIN )\n*\n*     Compute EPS (the machine precision).\n*\n      EPS = EPSILON(ZERO)\n      WRITE( NOUT, FMT = 9998 )EPS\n*\n*     Check the reliability of DMVCH using exact data.\n*\n      N = MIN( 32, NMAX )\n      DO 120 J = 1, N\n         DO 110 I = 1, N\n            A( I, J ) = MAX( I - J + 1, 0 )\n  110    CONTINUE\n         X( J ) = J\n         Y( J ) = ZERO\n  120 CONTINUE\n      DO 130 J = 1, N\n         YY( J ) = J*( ( J + 1 )*J )/2 - ( ( J + 1 )*J*( J - 1 ) )/3\n  130 CONTINUE\n*     YY holds the exact result. On exit from DMVCH YT holds\n*     the result computed by DMVCH.\n      TRANS = 'N'\n      CALL DMVCH( TRANS, N, N, ONE, A, NMAX, X, 1, ZERO, Y, 1, YT, G,\n     $            YY, EPS, ERR, FATAL, NOUT, .TRUE. )\n      SAME = LDE( YY, YT, N )\n      IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN\n         WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR\n         STOP\n      END IF\n      TRANS = 'T'\n      CALL DMVCH( TRANS, N, N, ONE, A, NMAX, X, -1, ZERO, Y, -1, YT, G,\n     $            YY, EPS, ERR, FATAL, NOUT, .TRUE. )\n      SAME = LDE( YY, YT, N )\n      IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN\n         WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR\n         STOP\n      END IF\n*\n*     Test each subroutine in turn.\n*\n      DO 210 ISNUM = 1, NSUBS\n         WRITE( NOUT, FMT = * )\n         IF( .NOT.LTEST( ISNUM ) )THEN\n*           Subprogram is not to be tested.\n            WRITE( NOUT, FMT = 9983 )SNAMES( ISNUM )\n         ELSE\n            SRNAMT = SNAMES( ISNUM )\n*           Test error exits.\n            IF( TSTERR )THEN\n               CALL DCHKE( ISNUM, SNAMES( ISNUM ), NOUT )\n               WRITE( NOUT, FMT = * )\n            END IF\n*           Test computations.\n            INFOT = 0\n            OK = .TRUE.\n            FATAL = .FALSE.\n            GO TO ( 140, 140, 150, 150, 150, 160, 160,\n     $              160, 160, 160, 160, 170, 180, 180,\n     $              190, 190 )ISNUM\n*           Test DGEMV, 01, and DGBMV, 02.\n  140       CALL DCHK1( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NKB, KB, NALF, ALF,\n     $                  NBET, BET, NINC, INC, NMAX, INCMAX, A, AA, AS,\n     $                  X, XX, XS, Y, YY, YS, YT, G )\n            GO TO 200\n*           Test DSYMV, 03, DSBMV, 04, and DSPMV, 05.\n  150       CALL DCHK2( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NKB, KB, NALF, ALF,\n     $                  NBET, BET, NINC, INC, NMAX, INCMAX, A, AA, AS,\n     $                  X, XX, XS, Y, YY, YS, YT, G )\n            GO TO 200\n*           Test DTRMV, 06, DTBMV, 07, DTPMV, 08,\n*           DTRSV, 09, DTBSV, 10, and DTPSV, 11.\n  160       CALL DCHK3( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NKB, KB, NINC, INC,\n     $                  NMAX, INCMAX, A, AA, AS, Y, YY, YS, YT, G, Z )\n            GO TO 200\n*           Test DGER, 12.\n  170       CALL DCHK4( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NALF, ALF, NINC, INC,\n     $                  NMAX, INCMAX, A, AA, AS, X, XX, XS, Y, YY, YS,\n     $                  YT, G, Z )\n            GO TO 200\n*           Test DSYR, 13, and DSPR, 14.\n  180       CALL DCHK5( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NALF, ALF, NINC, INC,\n     $                  NMAX, INCMAX, A, AA, AS, X, XX, XS, Y, YY, YS,\n     $                  YT, G, Z )\n            GO TO 200\n*           Test DSYR2, 15, and DSPR2, 16.\n  190       CALL DCHK6( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NALF, ALF, NINC, INC,\n     $                  NMAX, INCMAX, A, AA, AS, X, XX, XS, Y, YY, YS,\n     $                  YT, G, Z )\n*\n  200       IF( FATAL.AND.SFATAL )\n     $         GO TO 220\n         END IF\n  210 CONTINUE\n      WRITE( NOUT, FMT = 9982 )\n      GO TO 240\n*\n  220 CONTINUE\n      WRITE( NOUT, FMT = 9981 )\n      GO TO 240\n*\n  230 CONTINUE\n      WRITE( NOUT, FMT = 9987 )\n*\n  240 CONTINUE\n      IF( TRACE )\n     $   CLOSE ( NTRA )\n      CLOSE ( NOUT )\n      STOP\n*\n 9999 FORMAT( ' ROUTINES PASS COMPUTATIONAL TESTS IF TEST RATIO IS LES',\n     $      'S THAN', F8.2 )\n 9998 FORMAT( ' RELATIVE MACHINE PRECISION IS TAKEN TO BE', 1P, D9.1 )\n 9997 FORMAT( ' NUMBER OF VALUES OF ', A, ' IS LESS THAN 1 OR GREATER ',\n     $      'THAN ', I2 )\n 9996 FORMAT( ' VALUE OF N IS LESS THAN 0 OR GREATER THAN ', I2 )\n 9995 FORMAT( ' VALUE OF K IS LESS THAN 0' )\n 9994 FORMAT( ' ABSOLUTE VALUE OF INCX OR INCY IS 0 OR GREATER THAN ',\n     $      I2 )\n 9993 FORMAT( ' TESTS OF THE DOUBLE PRECISION LEVEL 2 BLAS', //' THE F',\n     $      'OLLOWING PARAMETER VALUES WILL BE USED:' )\n 9992 FORMAT( '   FOR N              ', 9I6 )\n 9991 FORMAT( '   FOR K              ', 7I6 )\n 9990 FORMAT( '   FOR INCX AND INCY  ', 7I6 )\n 9989 FORMAT( '   FOR ALPHA          ', 7F6.1 )\n 9988 FORMAT( '   FOR BETA           ', 7F6.1 )\n 9987 FORMAT( ' AMEND DATA FILE OR INCREASE ARRAY SIZES IN PROGRAM',\n     $      /' ******* TESTS ABANDONED *******' )\n 9986 FORMAT( ' SUBPROGRAM NAME ', A6, ' NOT RECOGNIZED', /' ******* T',\n     $      'ESTS ABANDONED *******' )\n 9985 FORMAT( ' ERROR IN DMVCH -  IN-LINE DOT PRODUCTS ARE BEING EVALU',\n     $      'ATED WRONGLY.', /' DMVCH WAS CALLED WITH TRANS = ', A1,\n     $      ' AND RETURNED SAME = ', L1, ' AND ERR = ', F12.3, '.', /\n     $   ' THIS MAY BE DUE TO FAULTS IN THE ARITHMETIC OR THE COMPILER.'\n     $      , /' ******* TESTS ABANDONED *******' )\n 9984 FORMAT( A6, L2 )\n 9983 FORMAT( 1X, A6, ' WAS NOT TESTED' )\n 9982 FORMAT( /' END OF TESTS' )\n 9981 FORMAT( /' ******* FATAL ERROR - TESTS ABANDONED *******' )\n 9980 FORMAT( ' ERROR-EXITS WILL NOT BE TESTED' )\n*\n*     End of DBLAT2.\n*\n      END\n      SUBROUTINE DCHK1( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NKB, KB, NALF, ALF, NBET,\n     $                  BET, NINC, INC, NMAX, INCMAX, A, AA, AS, X, XX,\n     $                  XS, Y, YY, YS, YT, G )\n*\n*  Tests DGEMV and DGBMV.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Parameters ..\n      DOUBLE PRECISION   ZERO, HALF\n      PARAMETER          ( ZERO = 0.0D0, HALF = 0.5D0 )\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION   EPS, THRESH\n      INTEGER            INCMAX, NALF, NBET, NIDIM, NINC, NKB, NMAX,\n     $                   NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      DOUBLE PRECISION   A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),\n     $                   AS( NMAX*NMAX ), BET( NBET ), G( NMAX ),\n     $                   X( NMAX ), XS( NMAX*INCMAX ),\n     $                   XX( NMAX*INCMAX ), Y( NMAX ),\n     $                   YS( NMAX*INCMAX ), YT( NMAX ),\n     $                   YY( NMAX*INCMAX )\n      INTEGER            IDIM( NIDIM ), INC( NINC ), KB( NKB )\n*     .. Local Scalars ..\n      DOUBLE PRECISION   ALPHA, ALS, BETA, BLS, ERR, ERRMAX, TRANSL\n      INTEGER            I, IA, IB, IC, IKU, IM, IN, INCX, INCXS, INCY,\n     $                   INCYS, IX, IY, KL, KLS, KU, KUS, LAA, LDA,\n     $                   LDAS, LX, LY, M, ML, MS, N, NARGS, NC, ND, NK,\n     $                   NL, NS\n      LOGICAL            BANDED, FULL, NULL, RESET, SAME, TRAN\n      CHARACTER*1        TRANS, TRANSS\n      CHARACTER*3        ICH\n*     .. Local Arrays ..\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LDE, LDERES\n      EXTERNAL           LDE, LDERES\n*     .. External Subroutines ..\n      EXTERNAL           DGBMV, DGEMV, DMAKE, DMVCH\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, MAX, MIN\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICH/'NTC'/\n*     .. Executable Statements ..\n      FULL = SNAME( 3: 3 ).EQ.'E'\n      BANDED = SNAME( 3: 3 ).EQ.'B'\n*     Define the number of arguments.\n      IF( FULL )THEN\n         NARGS = 11\n      ELSE IF( BANDED )THEN\n         NARGS = 13\n      END IF\n*\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = ZERO\n*\n      DO 120 IN = 1, NIDIM\n         N = IDIM( IN )\n         ND = N/2 + 1\n*\n         DO 110 IM = 1, 2\n            IF( IM.EQ.1 )\n     $         M = MAX( N - ND, 0 )\n            IF( IM.EQ.2 )\n     $         M = MIN( N + ND, NMAX )\n*\n            IF( BANDED )THEN\n               NK = NKB\n            ELSE\n               NK = 1\n            END IF\n            DO 100 IKU = 1, NK\n               IF( BANDED )THEN\n                  KU = KB( IKU )\n                  KL = MAX( KU - 1, 0 )\n               ELSE\n                  KU = N - 1\n                  KL = M - 1\n               END IF\n*              Set LDA to 1 more than minimum value if room.\n               IF( BANDED )THEN\n                  LDA = KL + KU + 1\n               ELSE\n                  LDA = M\n               END IF\n               IF( LDA.LT.NMAX )\n     $            LDA = LDA + 1\n*              Skip tests if not enough room.\n               IF( LDA.GT.NMAX )\n     $            GO TO 100\n               LAA = LDA*N\n               NULL = N.LE.0.OR.M.LE.0\n*\n*              Generate the matrix A.\n*\n               TRANSL = ZERO\n               CALL DMAKE( SNAME( 2: 3 ), ' ', ' ', M, N, A, NMAX, AA,\n     $                     LDA, KL, KU, RESET, TRANSL )\n*\n               DO 90 IC = 1, 3\n                  TRANS = ICH( IC: IC )\n                  TRAN = TRANS.EQ.'T'.OR.TRANS.EQ.'C'\n*\n                  IF( TRAN )THEN\n                     ML = N\n                     NL = M\n                  ELSE\n                     ML = M\n                     NL = N\n                  END IF\n*\n                  DO 80 IX = 1, NINC\n                     INCX = INC( IX )\n                     LX = ABS( INCX )*NL\n*\n*                    Generate the vector X.\n*\n                     TRANSL = HALF\n                     CALL DMAKE( 'GE', ' ', ' ', 1, NL, X, 1, XX,\n     $                           ABS( INCX ), 0, NL - 1, RESET, TRANSL )\n                     IF( NL.GT.1 )THEN\n                        X( NL/2 ) = ZERO\n                        XX( 1 + ABS( INCX )*( NL/2 - 1 ) ) = ZERO\n                     END IF\n*\n                     DO 70 IY = 1, NINC\n                        INCY = INC( IY )\n                        LY = ABS( INCY )*ML\n*\n                        DO 60 IA = 1, NALF\n                           ALPHA = ALF( IA )\n*\n                           DO 50 IB = 1, NBET\n                              BETA = BET( IB )\n*\n*                             Generate the vector Y.\n*\n                              TRANSL = ZERO\n                              CALL DMAKE( 'GE', ' ', ' ', 1, ML, Y, 1,\n     $                                    YY, ABS( INCY ), 0, ML - 1,\n     $                                    RESET, TRANSL )\n*\n                              NC = NC + 1\n*\n*                             Save every datum before calling the\n*                             subroutine.\n*\n                              TRANSS = TRANS\n                              MS = M\n                              NS = N\n                              KLS = KL\n                              KUS = KU\n                              ALS = ALPHA\n                              DO 10 I = 1, LAA\n                                 AS( I ) = AA( I )\n   10                         CONTINUE\n                              LDAS = LDA\n                              DO 20 I = 1, LX\n                                 XS( I ) = XX( I )\n   20                         CONTINUE\n                              INCXS = INCX\n                              BLS = BETA\n                              DO 30 I = 1, LY\n                                 YS( I ) = YY( I )\n   30                         CONTINUE\n                              INCYS = INCY\n*\n*                             Call the subroutine.\n*\n                              IF( FULL )THEN\n                                 IF( TRACE )\n     $                              WRITE( NTRA, FMT = 9994 )NC, SNAME,\n     $                              TRANS, M, N, ALPHA, LDA, INCX, BETA,\n     $                              INCY\n                                 IF( REWI )\n     $                              REWIND NTRA\n                                 CALL DGEMV( TRANS, M, N, ALPHA, AA,\n     $                                       LDA, XX, INCX, BETA, YY,\n     $                                       INCY )\n                              ELSE IF( BANDED )THEN\n                                 IF( TRACE )\n     $                              WRITE( NTRA, FMT = 9995 )NC, SNAME,\n     $                              TRANS, M, N, KL, KU, ALPHA, LDA,\n     $                              INCX, BETA, INCY\n                                 IF( REWI )\n     $                              REWIND NTRA\n                                 CALL DGBMV( TRANS, M, N, KL, KU, ALPHA,\n     $                                       AA, LDA, XX, INCX, BETA,\n     $                                       YY, INCY )\n                              END IF\n*\n*                             Check if error-exit was taken incorrectly.\n*\n                              IF( .NOT.OK )THEN\n                                 WRITE( NOUT, FMT = 9993 )\n                                 FATAL = .TRUE.\n                                 GO TO 130\n                              END IF\n*\n*                             See what data changed inside subroutines.\n*\n                              ISAME( 1 ) = TRANS.EQ.TRANSS\n                              ISAME( 2 ) = MS.EQ.M\n                              ISAME( 3 ) = NS.EQ.N\n                              IF( FULL )THEN\n                                 ISAME( 4 ) = ALS.EQ.ALPHA\n                                 ISAME( 5 ) = LDE( AS, AA, LAA )\n                                 ISAME( 6 ) = LDAS.EQ.LDA\n                                 ISAME( 7 ) = LDE( XS, XX, LX )\n                                 ISAME( 8 ) = INCXS.EQ.INCX\n                                 ISAME( 9 ) = BLS.EQ.BETA\n                                 IF( NULL )THEN\n                                    ISAME( 10 ) = LDE( YS, YY, LY )\n                                 ELSE\n                                    ISAME( 10 ) = LDERES( 'GE', ' ', 1,\n     $                                            ML, YS, YY,\n     $                                            ABS( INCY ) )\n                                 END IF\n                                 ISAME( 11 ) = INCYS.EQ.INCY\n                              ELSE IF( BANDED )THEN\n                                 ISAME( 4 ) = KLS.EQ.KL\n                                 ISAME( 5 ) = KUS.EQ.KU\n                                 ISAME( 6 ) = ALS.EQ.ALPHA\n                                 ISAME( 7 ) = LDE( AS, AA, LAA )\n                                 ISAME( 8 ) = LDAS.EQ.LDA\n                                 ISAME( 9 ) = LDE( XS, XX, LX )\n                                 ISAME( 10 ) = INCXS.EQ.INCX\n                                 ISAME( 11 ) = BLS.EQ.BETA\n                                 IF( NULL )THEN\n                                    ISAME( 12 ) = LDE( YS, YY, LY )\n                                 ELSE\n                                    ISAME( 12 ) = LDERES( 'GE', ' ', 1,\n     $                                            ML, YS, YY,\n     $                                            ABS( INCY ) )\n                                 END IF\n                                 ISAME( 13 ) = INCYS.EQ.INCY\n                              END IF\n*\n*                             If data was incorrectly changed, report\n*                             and return.\n*\n                              SAME = .TRUE.\n                              DO 40 I = 1, NARGS\n                                 SAME = SAME.AND.ISAME( I )\n                                 IF( .NOT.ISAME( I ) )\n     $                              WRITE( NOUT, FMT = 9998 )I\n   40                         CONTINUE\n                              IF( .NOT.SAME )THEN\n                                 FATAL = .TRUE.\n                                 GO TO 130\n                              END IF\n*\n                              IF( .NOT.NULL )THEN\n*\n*                                Check the result.\n*\n                                 CALL DMVCH( TRANS, M, N, ALPHA, A,\n     $                                       NMAX, X, INCX, BETA, Y,\n     $                                       INCY, YT, G, YY, EPS, ERR,\n     $                                       FATAL, NOUT, .TRUE. )\n                                 ERRMAX = MAX( ERRMAX, ERR )\n*                                If got really bad answer, report and\n*                                return.\n                                 IF( FATAL )\n     $                              GO TO 130\n                              ELSE\n*                                Avoid repeating tests with M.le.0 or\n*                                N.le.0.\n                                 GO TO 110\n                              END IF\n*\n   50                      CONTINUE\n*\n   60                   CONTINUE\n*\n   70                CONTINUE\n*\n   80             CONTINUE\n*\n   90          CONTINUE\n*\n  100       CONTINUE\n*\n  110    CONTINUE\n*\n  120 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 140\n*\n  130 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      IF( FULL )THEN\n         WRITE( NOUT, FMT = 9994 )NC, SNAME, TRANS, M, N, ALPHA, LDA,\n     $      INCX, BETA, INCY\n      ELSE IF( BANDED )THEN\n         WRITE( NOUT, FMT = 9995 )NC, SNAME, TRANS, M, N, KL, KU,\n     $      ALPHA, LDA, INCX, BETA, INCY\n      END IF\n*\n  140 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',', 4( I3, ',' ), F4.1,\n     $      ', A,', I3, ', X,', I2, ',', F4.1, ', Y,', I2, ') .' )\n 9994 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',', 2( I3, ',' ), F4.1,\n     $      ', A,', I3, ', X,', I2, ',', F4.1, ', Y,', I2,\n     $      ')         .' )\n 9993 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of DCHK1.\n*\n      END\n      SUBROUTINE DCHK2( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NKB, KB, NALF, ALF, NBET,\n     $                  BET, NINC, INC, NMAX, INCMAX, A, AA, AS, X, XX,\n     $                  XS, Y, YY, YS, YT, G )\n*\n*  Tests DSYMV, DSBMV and DSPMV.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Parameters ..\n      DOUBLE PRECISION   ZERO, HALF\n      PARAMETER          ( ZERO = 0.0D0, HALF = 0.5D0 )\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION   EPS, THRESH\n      INTEGER            INCMAX, NALF, NBET, NIDIM, NINC, NKB, NMAX,\n     $                   NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      DOUBLE PRECISION   A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),\n     $                   AS( NMAX*NMAX ), BET( NBET ), G( NMAX ),\n     $                   X( NMAX ), XS( NMAX*INCMAX ),\n     $                   XX( NMAX*INCMAX ), Y( NMAX ),\n     $                   YS( NMAX*INCMAX ), YT( NMAX ),\n     $                   YY( NMAX*INCMAX )\n      INTEGER            IDIM( NIDIM ), INC( NINC ), KB( NKB )\n*     .. Local Scalars ..\n      DOUBLE PRECISION   ALPHA, ALS, BETA, BLS, ERR, ERRMAX, TRANSL\n      INTEGER            I, IA, IB, IC, IK, IN, INCX, INCXS, INCY,\n     $                   INCYS, IX, IY, K, KS, LAA, LDA, LDAS, LX, LY,\n     $                   N, NARGS, NC, NK, NS\n      LOGICAL            BANDED, FULL, NULL, PACKED, RESET, SAME\n      CHARACTER*1        UPLO, UPLOS\n      CHARACTER*2        ICH\n*     .. Local Arrays ..\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LDE, LDERES\n      EXTERNAL           LDE, LDERES\n*     .. External Subroutines ..\n      EXTERNAL           DMAKE, DMVCH, DSBMV, DSPMV, DSYMV\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, MAX\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICH/'UL'/\n*     .. Executable Statements ..\n      FULL = SNAME( 3: 3 ).EQ.'Y'\n      BANDED = SNAME( 3: 3 ).EQ.'B'\n      PACKED = SNAME( 3: 3 ).EQ.'P'\n*     Define the number of arguments.\n      IF( FULL )THEN\n         NARGS = 10\n      ELSE IF( BANDED )THEN\n         NARGS = 11\n      ELSE IF( PACKED )THEN\n         NARGS = 9\n      END IF\n*\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = ZERO\n*\n      DO 110 IN = 1, NIDIM\n         N = IDIM( IN )\n*\n         IF( BANDED )THEN\n            NK = NKB\n         ELSE\n            NK = 1\n         END IF\n         DO 100 IK = 1, NK\n            IF( BANDED )THEN\n               K = KB( IK )\n            ELSE\n               K = N - 1\n            END IF\n*           Set LDA to 1 more than minimum value if room.\n            IF( BANDED )THEN\n               LDA = K + 1\n            ELSE\n               LDA = N\n            END IF\n            IF( LDA.LT.NMAX )\n     $         LDA = LDA + 1\n*           Skip tests if not enough room.\n            IF( LDA.GT.NMAX )\n     $         GO TO 100\n            IF( PACKED )THEN\n               LAA = ( N*( N + 1 ) )/2\n            ELSE\n               LAA = LDA*N\n            END IF\n            NULL = N.LE.0\n*\n            DO 90 IC = 1, 2\n               UPLO = ICH( IC: IC )\n*\n*              Generate the matrix A.\n*\n               TRANSL = ZERO\n               CALL DMAKE( SNAME( 2: 3 ), UPLO, ' ', N, N, A, NMAX, AA,\n     $                     LDA, K, K, RESET, TRANSL )\n*\n               DO 80 IX = 1, NINC\n                  INCX = INC( IX )\n                  LX = ABS( INCX )*N\n*\n*                 Generate the vector X.\n*\n                  TRANSL = HALF\n                  CALL DMAKE( 'GE', ' ', ' ', 1, N, X, 1, XX,\n     $                        ABS( INCX ), 0, N - 1, RESET, TRANSL )\n                  IF( N.GT.1 )THEN\n                     X( N/2 ) = ZERO\n                     XX( 1 + ABS( INCX )*( N/2 - 1 ) ) = ZERO\n                  END IF\n*\n                  DO 70 IY = 1, NINC\n                     INCY = INC( IY )\n                     LY = ABS( INCY )*N\n*\n                     DO 60 IA = 1, NALF\n                        ALPHA = ALF( IA )\n*\n                        DO 50 IB = 1, NBET\n                           BETA = BET( IB )\n*\n*                          Generate the vector Y.\n*\n                           TRANSL = ZERO\n                           CALL DMAKE( 'GE', ' ', ' ', 1, N, Y, 1, YY,\n     $                                 ABS( INCY ), 0, N - 1, RESET,\n     $                                 TRANSL )\n*\n                           NC = NC + 1\n*\n*                          Save every datum before calling the\n*                          subroutine.\n*\n                           UPLOS = UPLO\n                           NS = N\n                           KS = K\n                           ALS = ALPHA\n                           DO 10 I = 1, LAA\n                              AS( I ) = AA( I )\n   10                      CONTINUE\n                           LDAS = LDA\n                           DO 20 I = 1, LX\n                              XS( I ) = XX( I )\n   20                      CONTINUE\n                           INCXS = INCX\n                           BLS = BETA\n                           DO 30 I = 1, LY\n                              YS( I ) = YY( I )\n   30                      CONTINUE\n                           INCYS = INCY\n*\n*                          Call the subroutine.\n*\n                           IF( FULL )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9993 )NC, SNAME,\n     $                           UPLO, N, ALPHA, LDA, INCX, BETA, INCY\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL DSYMV( UPLO, N, ALPHA, AA, LDA, XX,\n     $                                    INCX, BETA, YY, INCY )\n                           ELSE IF( BANDED )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9994 )NC, SNAME,\n     $                           UPLO, N, K, ALPHA, LDA, INCX, BETA,\n     $                           INCY\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL DSBMV( UPLO, N, K, ALPHA, AA, LDA,\n     $                                    XX, INCX, BETA, YY, INCY )\n                           ELSE IF( PACKED )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9995 )NC, SNAME,\n     $                           UPLO, N, ALPHA, INCX, BETA, INCY\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL DSPMV( UPLO, N, ALPHA, AA, XX, INCX,\n     $                                    BETA, YY, INCY )\n                           END IF\n*\n*                          Check if error-exit was taken incorrectly.\n*\n                           IF( .NOT.OK )THEN\n                              WRITE( NOUT, FMT = 9992 )\n                              FATAL = .TRUE.\n                              GO TO 120\n                           END IF\n*\n*                          See what data changed inside subroutines.\n*\n                           ISAME( 1 ) = UPLO.EQ.UPLOS\n                           ISAME( 2 ) = NS.EQ.N\n                           IF( FULL )THEN\n                              ISAME( 3 ) = ALS.EQ.ALPHA\n                              ISAME( 4 ) = LDE( AS, AA, LAA )\n                              ISAME( 5 ) = LDAS.EQ.LDA\n                              ISAME( 6 ) = LDE( XS, XX, LX )\n                              ISAME( 7 ) = INCXS.EQ.INCX\n                              ISAME( 8 ) = BLS.EQ.BETA\n                              IF( NULL )THEN\n                                 ISAME( 9 ) = LDE( YS, YY, LY )\n                              ELSE\n                                 ISAME( 9 ) = LDERES( 'GE', ' ', 1, N,\n     $                                        YS, YY, ABS( INCY ) )\n                              END IF\n                              ISAME( 10 ) = INCYS.EQ.INCY\n                           ELSE IF( BANDED )THEN\n                              ISAME( 3 ) = KS.EQ.K\n                              ISAME( 4 ) = ALS.EQ.ALPHA\n                              ISAME( 5 ) = LDE( AS, AA, LAA )\n                              ISAME( 6 ) = LDAS.EQ.LDA\n                              ISAME( 7 ) = LDE( XS, XX, LX )\n                              ISAME( 8 ) = INCXS.EQ.INCX\n                              ISAME( 9 ) = BLS.EQ.BETA\n                              IF( NULL )THEN\n                                 ISAME( 10 ) = LDE( YS, YY, LY )\n                              ELSE\n                                 ISAME( 10 ) = LDERES( 'GE', ' ', 1, N,\n     $                                         YS, YY, ABS( INCY ) )\n                              END IF\n                              ISAME( 11 ) = INCYS.EQ.INCY\n                           ELSE IF( PACKED )THEN\n                              ISAME( 3 ) = ALS.EQ.ALPHA\n                              ISAME( 4 ) = LDE( AS, AA, LAA )\n                              ISAME( 5 ) = LDE( XS, XX, LX )\n                              ISAME( 6 ) = INCXS.EQ.INCX\n                              ISAME( 7 ) = BLS.EQ.BETA\n                              IF( NULL )THEN\n                                 ISAME( 8 ) = LDE( YS, YY, LY )\n                              ELSE\n                                 ISAME( 8 ) = LDERES( 'GE', ' ', 1, N,\n     $                                        YS, YY, ABS( INCY ) )\n                              END IF\n                              ISAME( 9 ) = INCYS.EQ.INCY\n                           END IF\n*\n*                          If data was incorrectly changed, report and\n*                          return.\n*\n                           SAME = .TRUE.\n                           DO 40 I = 1, NARGS\n                              SAME = SAME.AND.ISAME( I )\n                              IF( .NOT.ISAME( I ) )\n     $                           WRITE( NOUT, FMT = 9998 )I\n   40                      CONTINUE\n                           IF( .NOT.SAME )THEN\n                              FATAL = .TRUE.\n                              GO TO 120\n                           END IF\n*\n                           IF( .NOT.NULL )THEN\n*\n*                             Check the result.\n*\n                              CALL DMVCH( 'N', N, N, ALPHA, A, NMAX, X,\n     $                                    INCX, BETA, Y, INCY, YT, G,\n     $                                    YY, EPS, ERR, FATAL, NOUT,\n     $                                    .TRUE. )\n                              ERRMAX = MAX( ERRMAX, ERR )\n*                             If got really bad answer, report and\n*                             return.\n                              IF( FATAL )\n     $                           GO TO 120\n                           ELSE\n*                             Avoid repeating tests with N.le.0\n                              GO TO 110\n                           END IF\n*\n   50                   CONTINUE\n*\n   60                CONTINUE\n*\n   70             CONTINUE\n*\n   80          CONTINUE\n*\n   90       CONTINUE\n*\n  100    CONTINUE\n*\n  110 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 130\n*\n  120 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      IF( FULL )THEN\n         WRITE( NOUT, FMT = 9993 )NC, SNAME, UPLO, N, ALPHA, LDA, INCX,\n     $      BETA, INCY\n      ELSE IF( BANDED )THEN\n         WRITE( NOUT, FMT = 9994 )NC, SNAME, UPLO, N, K, ALPHA, LDA,\n     $      INCX, BETA, INCY\n      ELSE IF( PACKED )THEN\n         WRITE( NOUT, FMT = 9995 )NC, SNAME, UPLO, N, ALPHA, INCX,\n     $      BETA, INCY\n      END IF\n*\n  130 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',', I3, ',', F4.1, ', AP',\n     $      ', X,', I2, ',', F4.1, ', Y,', I2, ')                .' )\n 9994 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',', 2( I3, ',' ), F4.1,\n     $      ', A,', I3, ', X,', I2, ',', F4.1, ', Y,', I2,\n     $      ')         .' )\n 9993 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',', I3, ',', F4.1, ', A,',\n     $      I3, ', X,', I2, ',', F4.1, ', Y,', I2, ')             .' )\n 9992 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of DCHK2.\n*\n      END\n      SUBROUTINE DCHK3( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NKB, KB, NINC, INC, NMAX,\n     $                  INCMAX, A, AA, AS, X, XX, XS, XT, G, Z )\n*\n*  Tests DTRMV, DTBMV, DTPMV, DTRSV, DTBSV and DTPSV.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Parameters ..\n      DOUBLE PRECISION   ZERO, HALF, ONE\n      PARAMETER          ( ZERO = 0.0D0, HALF = 0.5D0, ONE = 1.0D0 )\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION   EPS, THRESH\n      INTEGER            INCMAX, NIDIM, NINC, NKB, NMAX, NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      DOUBLE PRECISION   A( NMAX, NMAX ), AA( NMAX*NMAX ),\n     $                   AS( NMAX*NMAX ), G( NMAX ), X( NMAX ),\n     $                   XS( NMAX*INCMAX ), XT( NMAX ),\n     $                   XX( NMAX*INCMAX ), Z( NMAX )\n      INTEGER            IDIM( NIDIM ), INC( NINC ), KB( NKB )\n*     .. Local Scalars ..\n      DOUBLE PRECISION   ERR, ERRMAX, TRANSL\n      INTEGER            I, ICD, ICT, ICU, IK, IN, INCX, INCXS, IX, K,\n     $                   KS, LAA, LDA, LDAS, LX, N, NARGS, NC, NK, NS\n      LOGICAL            BANDED, FULL, NULL, PACKED, RESET, SAME\n      CHARACTER*1        DIAG, DIAGS, TRANS, TRANSS, UPLO, UPLOS\n      CHARACTER*2        ICHD, ICHU\n      CHARACTER*3        ICHT\n*     .. Local Arrays ..\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LDE, LDERES\n      EXTERNAL           LDE, LDERES\n*     .. External Subroutines ..\n      EXTERNAL           DMAKE, DMVCH, DTBMV, DTBSV, DTPMV, DTPSV,\n     $                   DTRMV, DTRSV\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, MAX\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICHU/'UL'/, ICHT/'NTC'/, ICHD/'UN'/\n*     .. Executable Statements ..\n      FULL = SNAME( 3: 3 ).EQ.'R'\n      BANDED = SNAME( 3: 3 ).EQ.'B'\n      PACKED = SNAME( 3: 3 ).EQ.'P'\n*     Define the number of arguments.\n      IF( FULL )THEN\n         NARGS = 8\n      ELSE IF( BANDED )THEN\n         NARGS = 9\n      ELSE IF( PACKED )THEN\n         NARGS = 7\n      END IF\n*\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = ZERO\n*     Set up zero vector for DMVCH.\n      DO 10 I = 1, NMAX\n         Z( I ) = ZERO\n   10 CONTINUE\n*\n      DO 110 IN = 1, NIDIM\n         N = IDIM( IN )\n*\n         IF( BANDED )THEN\n            NK = NKB\n         ELSE\n            NK = 1\n         END IF\n         DO 100 IK = 1, NK\n            IF( BANDED )THEN\n               K = KB( IK )\n            ELSE\n               K = N - 1\n            END IF\n*           Set LDA to 1 more than minimum value if room.\n            IF( BANDED )THEN\n               LDA = K + 1\n            ELSE\n               LDA = N\n            END IF\n            IF( LDA.LT.NMAX )\n     $         LDA = LDA + 1\n*           Skip tests if not enough room.\n            IF( LDA.GT.NMAX )\n     $         GO TO 100\n            IF( PACKED )THEN\n               LAA = ( N*( N + 1 ) )/2\n            ELSE\n               LAA = LDA*N\n            END IF\n            NULL = N.LE.0\n*\n            DO 90 ICU = 1, 2\n               UPLO = ICHU( ICU: ICU )\n*\n               DO 80 ICT = 1, 3\n                  TRANS = ICHT( ICT: ICT )\n*\n                  DO 70 ICD = 1, 2\n                     DIAG = ICHD( ICD: ICD )\n*\n*                    Generate the matrix A.\n*\n                     TRANSL = ZERO\n                     CALL DMAKE( SNAME( 2: 3 ), UPLO, DIAG, N, N, A,\n     $                           NMAX, AA, LDA, K, K, RESET, TRANSL )\n*\n                     DO 60 IX = 1, NINC\n                        INCX = INC( IX )\n                        LX = ABS( INCX )*N\n*\n*                       Generate the vector X.\n*\n                        TRANSL = HALF\n                        CALL DMAKE( 'GE', ' ', ' ', 1, N, X, 1, XX,\n     $                              ABS( INCX ), 0, N - 1, RESET,\n     $                              TRANSL )\n                        IF( N.GT.1 )THEN\n                           X( N/2 ) = ZERO\n                           XX( 1 + ABS( INCX )*( N/2 - 1 ) ) = ZERO\n                        END IF\n*\n                        NC = NC + 1\n*\n*                       Save every datum before calling the subroutine.\n*\n                        UPLOS = UPLO\n                        TRANSS = TRANS\n                        DIAGS = DIAG\n                        NS = N\n                        KS = K\n                        DO 20 I = 1, LAA\n                           AS( I ) = AA( I )\n   20                   CONTINUE\n                        LDAS = LDA\n                        DO 30 I = 1, LX\n                           XS( I ) = XX( I )\n   30                   CONTINUE\n                        INCXS = INCX\n*\n*                       Call the subroutine.\n*\n                        IF( SNAME( 4: 5 ).EQ.'MV' )THEN\n                           IF( FULL )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9993 )NC, SNAME,\n     $                           UPLO, TRANS, DIAG, N, LDA, INCX\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL DTRMV( UPLO, TRANS, DIAG, N, AA, LDA,\n     $                                    XX, INCX )\n                           ELSE IF( BANDED )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9994 )NC, SNAME,\n     $                           UPLO, TRANS, DIAG, N, K, LDA, INCX\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL DTBMV( UPLO, TRANS, DIAG, N, K, AA,\n     $                                    LDA, XX, INCX )\n                           ELSE IF( PACKED )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9995 )NC, SNAME,\n     $                           UPLO, TRANS, DIAG, N, INCX\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL DTPMV( UPLO, TRANS, DIAG, N, AA, XX,\n     $                                    INCX )\n                           END IF\n                        ELSE IF( SNAME( 4: 5 ).EQ.'SV' )THEN\n                           IF( FULL )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9993 )NC, SNAME,\n     $                           UPLO, TRANS, DIAG, N, LDA, INCX\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL DTRSV( UPLO, TRANS, DIAG, N, AA, LDA,\n     $                                    XX, INCX )\n                           ELSE IF( BANDED )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9994 )NC, SNAME,\n     $                           UPLO, TRANS, DIAG, N, K, LDA, INCX\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL DTBSV( UPLO, TRANS, DIAG, N, K, AA,\n     $                                    LDA, XX, INCX )\n                           ELSE IF( PACKED )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9995 )NC, SNAME,\n     $                           UPLO, TRANS, DIAG, N, INCX\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL DTPSV( UPLO, TRANS, DIAG, N, AA, XX,\n     $                                    INCX )\n                           END IF\n                        END IF\n*\n*                       Check if error-exit was taken incorrectly.\n*\n                        IF( .NOT.OK )THEN\n                           WRITE( NOUT, FMT = 9992 )\n                           FATAL = .TRUE.\n                           GO TO 120\n                        END IF\n*\n*                       See what data changed inside subroutines.\n*\n                        ISAME( 1 ) = UPLO.EQ.UPLOS\n                        ISAME( 2 ) = TRANS.EQ.TRANSS\n                        ISAME( 3 ) = DIAG.EQ.DIAGS\n                        ISAME( 4 ) = NS.EQ.N\n                        IF( FULL )THEN\n                           ISAME( 5 ) = LDE( AS, AA, LAA )\n                           ISAME( 6 ) = LDAS.EQ.LDA\n                           IF( NULL )THEN\n                              ISAME( 7 ) = LDE( XS, XX, LX )\n                           ELSE\n                              ISAME( 7 ) = LDERES( 'GE', ' ', 1, N, XS,\n     $                                     XX, ABS( INCX ) )\n                           END IF\n                           ISAME( 8 ) = INCXS.EQ.INCX\n                        ELSE IF( BANDED )THEN\n                           ISAME( 5 ) = KS.EQ.K\n                           ISAME( 6 ) = LDE( AS, AA, LAA )\n                           ISAME( 7 ) = LDAS.EQ.LDA\n                           IF( NULL )THEN\n                              ISAME( 8 ) = LDE( XS, XX, LX )\n                           ELSE\n                              ISAME( 8 ) = LDERES( 'GE', ' ', 1, N, XS,\n     $                                     XX, ABS( INCX ) )\n                           END IF\n                           ISAME( 9 ) = INCXS.EQ.INCX\n                        ELSE IF( PACKED )THEN\n                           ISAME( 5 ) = LDE( AS, AA, LAA )\n                           IF( NULL )THEN\n                              ISAME( 6 ) = LDE( XS, XX, LX )\n                           ELSE\n                              ISAME( 6 ) = LDERES( 'GE', ' ', 1, N, XS,\n     $                                     XX, ABS( INCX ) )\n                           END IF\n                           ISAME( 7 ) = INCXS.EQ.INCX\n                        END IF\n*\n*                       If data was incorrectly changed, report and\n*                       return.\n*\n                        SAME = .TRUE.\n                        DO 40 I = 1, NARGS\n                           SAME = SAME.AND.ISAME( I )\n                           IF( .NOT.ISAME( I ) )\n     $                        WRITE( NOUT, FMT = 9998 )I\n   40                   CONTINUE\n                        IF( .NOT.SAME )THEN\n                           FATAL = .TRUE.\n                           GO TO 120\n                        END IF\n*\n                        IF( .NOT.NULL )THEN\n                           IF( SNAME( 4: 5 ).EQ.'MV' )THEN\n*\n*                             Check the result.\n*\n                              CALL DMVCH( TRANS, N, N, ONE, A, NMAX, X,\n     $                                    INCX, ZERO, Z, INCX, XT, G,\n     $                                    XX, EPS, ERR, FATAL, NOUT,\n     $                                    .TRUE. )\n                           ELSE IF( SNAME( 4: 5 ).EQ.'SV' )THEN\n*\n*                             Compute approximation to original vector.\n*\n                              DO 50 I = 1, N\n                                 Z( I ) = XX( 1 + ( I - 1 )*\n     $                                    ABS( INCX ) )\n                                 XX( 1 + ( I - 1 )*ABS( INCX ) )\n     $                              = X( I )\n   50                         CONTINUE\n                              CALL DMVCH( TRANS, N, N, ONE, A, NMAX, Z,\n     $                                    INCX, ZERO, X, INCX, XT, G,\n     $                                    XX, EPS, ERR, FATAL, NOUT,\n     $                                    .FALSE. )\n                           END IF\n                           ERRMAX = MAX( ERRMAX, ERR )\n*                          If got really bad answer, report and return.\n                           IF( FATAL )\n     $                        GO TO 120\n                        ELSE\n*                          Avoid repeating tests with N.le.0.\n                           GO TO 110\n                        END IF\n*\n   60                CONTINUE\n*\n   70             CONTINUE\n*\n   80          CONTINUE\n*\n   90       CONTINUE\n*\n  100    CONTINUE\n*\n  110 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 130\n*\n  120 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      IF( FULL )THEN\n         WRITE( NOUT, FMT = 9993 )NC, SNAME, UPLO, TRANS, DIAG, N, LDA,\n     $      INCX\n      ELSE IF( BANDED )THEN\n         WRITE( NOUT, FMT = 9994 )NC, SNAME, UPLO, TRANS, DIAG, N, K,\n     $      LDA, INCX\n      ELSE IF( PACKED )THEN\n         WRITE( NOUT, FMT = 9995 )NC, SNAME, UPLO, TRANS, DIAG, N, INCX\n      END IF\n*\n  130 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( 1X, I6, ': ', A6, '(', 3( '''', A1, ''',' ), I3, ', AP, ',\n     $      'X,', I2, ')                        .' )\n 9994 FORMAT( 1X, I6, ': ', A6, '(', 3( '''', A1, ''',' ), 2( I3, ',' ),\n     $      ' A,', I3, ', X,', I2, ')                 .' )\n 9993 FORMAT( 1X, I6, ': ', A6, '(', 3( '''', A1, ''',' ), I3, ', A,',\n     $      I3, ', X,', I2, ')                     .' )\n 9992 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of DCHK3.\n*\n      END\n      SUBROUTINE DCHK4( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NALF, ALF, NINC, INC, NMAX,\n     $                  INCMAX, A, AA, AS, X, XX, XS, Y, YY, YS, YT, G,\n     $                  Z )\n*\n*  Tests DGER.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Parameters ..\n      DOUBLE PRECISION   ZERO, HALF, ONE\n      PARAMETER          ( ZERO = 0.0D0, HALF = 0.5D0, ONE = 1.0D0 )\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION   EPS, THRESH\n      INTEGER            INCMAX, NALF, NIDIM, NINC, NMAX, NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      DOUBLE PRECISION   A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),\n     $                   AS( NMAX*NMAX ), G( NMAX ), X( NMAX ),\n     $                   XS( NMAX*INCMAX ), XX( NMAX*INCMAX ),\n     $                   Y( NMAX ), YS( NMAX*INCMAX ), YT( NMAX ),\n     $                   YY( NMAX*INCMAX ), Z( NMAX )\n      INTEGER            IDIM( NIDIM ), INC( NINC )\n*     .. Local Scalars ..\n      DOUBLE PRECISION   ALPHA, ALS, ERR, ERRMAX, TRANSL\n      INTEGER            I, IA, IM, IN, INCX, INCXS, INCY, INCYS, IX,\n     $                   IY, J, LAA, LDA, LDAS, LX, LY, M, MS, N, NARGS,\n     $                   NC, ND, NS\n      LOGICAL            NULL, RESET, SAME\n*     .. Local Arrays ..\n      DOUBLE PRECISION   W( 1 )\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LDE, LDERES\n      EXTERNAL           LDE, LDERES\n*     .. External Subroutines ..\n      EXTERNAL           DGER, DMAKE, DMVCH\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, MAX, MIN\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Executable Statements ..\n*     Define the number of arguments.\n      NARGS = 9\n*\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = ZERO\n*\n      DO 120 IN = 1, NIDIM\n         N = IDIM( IN )\n         ND = N/2 + 1\n*\n         DO 110 IM = 1, 2\n            IF( IM.EQ.1 )\n     $         M = MAX( N - ND, 0 )\n            IF( IM.EQ.2 )\n     $         M = MIN( N + ND, NMAX )\n*\n*           Set LDA to 1 more than minimum value if room.\n            LDA = M\n            IF( LDA.LT.NMAX )\n     $         LDA = LDA + 1\n*           Skip tests if not enough room.\n            IF( LDA.GT.NMAX )\n     $         GO TO 110\n            LAA = LDA*N\n            NULL = N.LE.0.OR.M.LE.0\n*\n            DO 100 IX = 1, NINC\n               INCX = INC( IX )\n               LX = ABS( INCX )*M\n*\n*              Generate the vector X.\n*\n               TRANSL = HALF\n               CALL DMAKE( 'GE', ' ', ' ', 1, M, X, 1, XX, ABS( INCX ),\n     $                     0, M - 1, RESET, TRANSL )\n               IF( M.GT.1 )THEN\n                  X( M/2 ) = ZERO\n                  XX( 1 + ABS( INCX )*( M/2 - 1 ) ) = ZERO\n               END IF\n*\n               DO 90 IY = 1, NINC\n                  INCY = INC( IY )\n                  LY = ABS( INCY )*N\n*\n*                 Generate the vector Y.\n*\n                  TRANSL = ZERO\n                  CALL DMAKE( 'GE', ' ', ' ', 1, N, Y, 1, YY,\n     $                        ABS( INCY ), 0, N - 1, RESET, TRANSL )\n                  IF( N.GT.1 )THEN\n                     Y( N/2 ) = ZERO\n                     YY( 1 + ABS( INCY )*( N/2 - 1 ) ) = ZERO\n                  END IF\n*\n                  DO 80 IA = 1, NALF\n                     ALPHA = ALF( IA )\n*\n*                    Generate the matrix A.\n*\n                     TRANSL = ZERO\n                     CALL DMAKE( SNAME( 2: 3 ), ' ', ' ', M, N, A, NMAX,\n     $                           AA, LDA, M - 1, N - 1, RESET, TRANSL )\n*\n                     NC = NC + 1\n*\n*                    Save every datum before calling the subroutine.\n*\n                     MS = M\n                     NS = N\n                     ALS = ALPHA\n                     DO 10 I = 1, LAA\n                        AS( I ) = AA( I )\n   10                CONTINUE\n                     LDAS = LDA\n                     DO 20 I = 1, LX\n                        XS( I ) = XX( I )\n   20                CONTINUE\n                     INCXS = INCX\n                     DO 30 I = 1, LY\n                        YS( I ) = YY( I )\n   30                CONTINUE\n                     INCYS = INCY\n*\n*                    Call the subroutine.\n*\n                     IF( TRACE )\n     $                  WRITE( NTRA, FMT = 9994 )NC, SNAME, M, N,\n     $                  ALPHA, INCX, INCY, LDA\n                     IF( REWI )\n     $                  REWIND NTRA\n                     CALL DGER( M, N, ALPHA, XX, INCX, YY, INCY, AA,\n     $                          LDA )\n*\n*                    Check if error-exit was taken incorrectly.\n*\n                     IF( .NOT.OK )THEN\n                        WRITE( NOUT, FMT = 9993 )\n                        FATAL = .TRUE.\n                        GO TO 140\n                     END IF\n*\n*                    See what data changed inside subroutine.\n*\n                     ISAME( 1 ) = MS.EQ.M\n                     ISAME( 2 ) = NS.EQ.N\n                     ISAME( 3 ) = ALS.EQ.ALPHA\n                     ISAME( 4 ) = LDE( XS, XX, LX )\n                     ISAME( 5 ) = INCXS.EQ.INCX\n                     ISAME( 6 ) = LDE( YS, YY, LY )\n                     ISAME( 7 ) = INCYS.EQ.INCY\n                     IF( NULL )THEN\n                        ISAME( 8 ) = LDE( AS, AA, LAA )\n                     ELSE\n                        ISAME( 8 ) = LDERES( 'GE', ' ', M, N, AS, AA,\n     $                               LDA )\n                     END IF\n                     ISAME( 9 ) = LDAS.EQ.LDA\n*\n*                    If data was incorrectly changed, report and return.\n*\n                     SAME = .TRUE.\n                     DO 40 I = 1, NARGS\n                        SAME = SAME.AND.ISAME( I )\n                        IF( .NOT.ISAME( I ) )\n     $                     WRITE( NOUT, FMT = 9998 )I\n   40                CONTINUE\n                     IF( .NOT.SAME )THEN\n                        FATAL = .TRUE.\n                        GO TO 140\n                     END IF\n*\n                     IF( .NOT.NULL )THEN\n*\n*                       Check the result column by column.\n*\n                        IF( INCX.GT.0 )THEN\n                           DO 50 I = 1, M\n                              Z( I ) = X( I )\n   50                      CONTINUE\n                        ELSE\n                           DO 60 I = 1, M\n                              Z( I ) = X( M - I + 1 )\n   60                      CONTINUE\n                        END IF\n                        DO 70 J = 1, N\n                           IF( INCY.GT.0 )THEN\n                              W( 1 ) = Y( J )\n                           ELSE\n                              W( 1 ) = Y( N - J + 1 )\n                           END IF\n                           CALL DMVCH( 'N', M, 1, ALPHA, Z, NMAX, W, 1,\n     $                                 ONE, A( 1, J ), 1, YT, G,\n     $                                 AA( 1 + ( J - 1 )*LDA ), EPS,\n     $                                 ERR, FATAL, NOUT, .TRUE. )\n                           ERRMAX = MAX( ERRMAX, ERR )\n*                          If got really bad answer, report and return.\n                           IF( FATAL )\n     $                        GO TO 130\n   70                   CONTINUE\n                     ELSE\n*                       Avoid repeating tests with M.le.0 or N.le.0.\n                        GO TO 110\n                     END IF\n*\n   80             CONTINUE\n*\n   90          CONTINUE\n*\n  100       CONTINUE\n*\n  110    CONTINUE\n*\n  120 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 150\n*\n  130 CONTINUE\n      WRITE( NOUT, FMT = 9995 )J\n*\n  140 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      WRITE( NOUT, FMT = 9994 )NC, SNAME, M, N, ALPHA, INCX, INCY, LDA\n*\n  150 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( '      THESE ARE THE RESULTS FOR COLUMN ', I3 )\n 9994 FORMAT( 1X, I6, ': ', A6, '(', 2( I3, ',' ), F4.1, ', X,', I2,\n     $      ', Y,', I2, ', A,', I3, ')                  .' )\n 9993 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of DCHK4.\n*\n      END\n      SUBROUTINE DCHK5( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NALF, ALF, NINC, INC, NMAX,\n     $                  INCMAX, A, AA, AS, X, XX, XS, Y, YY, YS, YT, G,\n     $                  Z )\n*\n*  Tests DSYR and DSPR.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Parameters ..\n      DOUBLE PRECISION   ZERO, HALF, ONE\n      PARAMETER          ( ZERO = 0.0D0, HALF = 0.5D0, ONE = 1.0D0 )\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION   EPS, THRESH\n      INTEGER            INCMAX, NALF, NIDIM, NINC, NMAX, NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      DOUBLE PRECISION   A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),\n     $                   AS( NMAX*NMAX ), G( NMAX ), X( NMAX ),\n     $                   XS( NMAX*INCMAX ), XX( NMAX*INCMAX ),\n     $                   Y( NMAX ), YS( NMAX*INCMAX ), YT( NMAX ),\n     $                   YY( NMAX*INCMAX ), Z( NMAX )\n      INTEGER            IDIM( NIDIM ), INC( NINC )\n*     .. Local Scalars ..\n      DOUBLE PRECISION   ALPHA, ALS, ERR, ERRMAX, TRANSL\n      INTEGER            I, IA, IC, IN, INCX, INCXS, IX, J, JA, JJ, LAA,\n     $                   LDA, LDAS, LJ, LX, N, NARGS, NC, NS\n      LOGICAL            FULL, NULL, PACKED, RESET, SAME, UPPER\n      CHARACTER*1        UPLO, UPLOS\n      CHARACTER*2        ICH\n*     .. Local Arrays ..\n      DOUBLE PRECISION   W( 1 )\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LDE, LDERES\n      EXTERNAL           LDE, LDERES\n*     .. External Subroutines ..\n      EXTERNAL           DMAKE, DMVCH, DSPR, DSYR\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, MAX\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICH/'UL'/\n*     .. Executable Statements ..\n      FULL = SNAME( 3: 3 ).EQ.'Y'\n      PACKED = SNAME( 3: 3 ).EQ.'P'\n*     Define the number of arguments.\n      IF( FULL )THEN\n         NARGS = 7\n      ELSE IF( PACKED )THEN\n         NARGS = 6\n      END IF\n*\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = ZERO\n*\n      DO 100 IN = 1, NIDIM\n         N = IDIM( IN )\n*        Set LDA to 1 more than minimum value if room.\n         LDA = N\n         IF( LDA.LT.NMAX )\n     $      LDA = LDA + 1\n*        Skip tests if not enough room.\n         IF( LDA.GT.NMAX )\n     $      GO TO 100\n         IF( PACKED )THEN\n            LAA = ( N*( N + 1 ) )/2\n         ELSE\n            LAA = LDA*N\n         END IF\n*\n         DO 90 IC = 1, 2\n            UPLO = ICH( IC: IC )\n            UPPER = UPLO.EQ.'U'\n*\n            DO 80 IX = 1, NINC\n               INCX = INC( IX )\n               LX = ABS( INCX )*N\n*\n*              Generate the vector X.\n*\n               TRANSL = HALF\n               CALL DMAKE( 'GE', ' ', ' ', 1, N, X, 1, XX, ABS( INCX ),\n     $                     0, N - 1, RESET, TRANSL )\n               IF( N.GT.1 )THEN\n                  X( N/2 ) = ZERO\n                  XX( 1 + ABS( INCX )*( N/2 - 1 ) ) = ZERO\n               END IF\n*\n               DO 70 IA = 1, NALF\n                  ALPHA = ALF( IA )\n                  NULL = N.LE.0.OR.ALPHA.EQ.ZERO\n*\n*                 Generate the matrix A.\n*\n                  TRANSL = ZERO\n                  CALL DMAKE( SNAME( 2: 3 ), UPLO, ' ', N, N, A, NMAX,\n     $                        AA, LDA, N - 1, N - 1, RESET, TRANSL )\n*\n                  NC = NC + 1\n*\n*                 Save every datum before calling the subroutine.\n*\n                  UPLOS = UPLO\n                  NS = N\n                  ALS = ALPHA\n                  DO 10 I = 1, LAA\n                     AS( I ) = AA( I )\n   10             CONTINUE\n                  LDAS = LDA\n                  DO 20 I = 1, LX\n                     XS( I ) = XX( I )\n   20             CONTINUE\n                  INCXS = INCX\n*\n*                 Call the subroutine.\n*\n                  IF( FULL )THEN\n                     IF( TRACE )\n     $                  WRITE( NTRA, FMT = 9993 )NC, SNAME, UPLO, N,\n     $                  ALPHA, INCX, LDA\n                     IF( REWI )\n     $                  REWIND NTRA\n                     CALL DSYR( UPLO, N, ALPHA, XX, INCX, AA, LDA )\n                  ELSE IF( PACKED )THEN\n                     IF( TRACE )\n     $                  WRITE( NTRA, FMT = 9994 )NC, SNAME, UPLO, N,\n     $                  ALPHA, INCX\n                     IF( REWI )\n     $                  REWIND NTRA\n                     CALL DSPR( UPLO, N, ALPHA, XX, INCX, AA )\n                  END IF\n*\n*                 Check if error-exit was taken incorrectly.\n*\n                  IF( .NOT.OK )THEN\n                     WRITE( NOUT, FMT = 9992 )\n                     FATAL = .TRUE.\n                     GO TO 120\n                  END IF\n*\n*                 See what data changed inside subroutines.\n*\n                  ISAME( 1 ) = UPLO.EQ.UPLOS\n                  ISAME( 2 ) = NS.EQ.N\n                  ISAME( 3 ) = ALS.EQ.ALPHA\n                  ISAME( 4 ) = LDE( XS, XX, LX )\n                  ISAME( 5 ) = INCXS.EQ.INCX\n                  IF( NULL )THEN\n                     ISAME( 6 ) = LDE( AS, AA, LAA )\n                  ELSE\n                     ISAME( 6 ) = LDERES( SNAME( 2: 3 ), UPLO, N, N, AS,\n     $                            AA, LDA )\n                  END IF\n                  IF( .NOT.PACKED )THEN\n                     ISAME( 7 ) = LDAS.EQ.LDA\n                  END IF\n*\n*                 If data was incorrectly changed, report and return.\n*\n                  SAME = .TRUE.\n                  DO 30 I = 1, NARGS\n                     SAME = SAME.AND.ISAME( I )\n                     IF( .NOT.ISAME( I ) )\n     $                  WRITE( NOUT, FMT = 9998 )I\n   30             CONTINUE\n                  IF( .NOT.SAME )THEN\n                     FATAL = .TRUE.\n                     GO TO 120\n                  END IF\n*\n                  IF( .NOT.NULL )THEN\n*\n*                    Check the result column by column.\n*\n                     IF( INCX.GT.0 )THEN\n                        DO 40 I = 1, N\n                           Z( I ) = X( I )\n   40                   CONTINUE\n                     ELSE\n                        DO 50 I = 1, N\n                           Z( I ) = X( N - I + 1 )\n   50                   CONTINUE\n                     END IF\n                     JA = 1\n                     DO 60 J = 1, N\n                        W( 1 ) = Z( J )\n                        IF( UPPER )THEN\n                           JJ = 1\n                           LJ = J\n                        ELSE\n                           JJ = J\n                           LJ = N - J + 1\n                        END IF\n                        CALL DMVCH( 'N', LJ, 1, ALPHA, Z( JJ ), LJ, W,\n     $                              1, ONE, A( JJ, J ), 1, YT, G,\n     $                              AA( JA ), EPS, ERR, FATAL, NOUT,\n     $                              .TRUE. )\n                        IF( FULL )THEN\n                           IF( UPPER )THEN\n                              JA = JA + LDA\n                           ELSE\n                              JA = JA + LDA + 1\n                           END IF\n                        ELSE\n                           JA = JA + LJ\n                        END IF\n                        ERRMAX = MAX( ERRMAX, ERR )\n*                       If got really bad answer, report and return.\n                        IF( FATAL )\n     $                     GO TO 110\n   60                CONTINUE\n                  ELSE\n*                    Avoid repeating tests if N.le.0.\n                     IF( N.LE.0 )\n     $                  GO TO 100\n                  END IF\n*\n   70          CONTINUE\n*\n   80       CONTINUE\n*\n   90    CONTINUE\n*\n  100 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 130\n*\n  110 CONTINUE\n      WRITE( NOUT, FMT = 9995 )J\n*\n  120 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      IF( FULL )THEN\n         WRITE( NOUT, FMT = 9993 )NC, SNAME, UPLO, N, ALPHA, INCX, LDA\n      ELSE IF( PACKED )THEN\n         WRITE( NOUT, FMT = 9994 )NC, SNAME, UPLO, N, ALPHA, INCX\n      END IF\n*\n  130 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( '      THESE ARE THE RESULTS FOR COLUMN ', I3 )\n 9994 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',', I3, ',', F4.1, ', X,',\n     $      I2, ', AP)                           .' )\n 9993 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',', I3, ',', F4.1, ', X,',\n     $      I2, ', A,', I3, ')                        .' )\n 9992 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of DCHK5.\n*\n      END\n      SUBROUTINE DCHK6( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NALF, ALF, NINC, INC, NMAX,\n     $                  INCMAX, A, AA, AS, X, XX, XS, Y, YY, YS, YT, G,\n     $                  Z )\n*\n*  Tests DSYR2 and DSPR2.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Parameters ..\n      DOUBLE PRECISION   ZERO, HALF, ONE\n      PARAMETER          ( ZERO = 0.0D0, HALF = 0.5D0, ONE = 1.0D0 )\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION   EPS, THRESH\n      INTEGER            INCMAX, NALF, NIDIM, NINC, NMAX, NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      DOUBLE PRECISION   A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),\n     $                   AS( NMAX*NMAX ), G( NMAX ), X( NMAX ),\n     $                   XS( NMAX*INCMAX ), XX( NMAX*INCMAX ),\n     $                   Y( NMAX ), YS( NMAX*INCMAX ), YT( NMAX ),\n     $                   YY( NMAX*INCMAX ), Z( NMAX, 2 )\n      INTEGER            IDIM( NIDIM ), INC( NINC )\n*     .. Local Scalars ..\n      DOUBLE PRECISION   ALPHA, ALS, ERR, ERRMAX, TRANSL\n      INTEGER            I, IA, IC, IN, INCX, INCXS, INCY, INCYS, IX,\n     $                   IY, J, JA, JJ, LAA, LDA, LDAS, LJ, LX, LY, N,\n     $                   NARGS, NC, NS\n      LOGICAL            FULL, NULL, PACKED, RESET, SAME, UPPER\n      CHARACTER*1        UPLO, UPLOS\n      CHARACTER*2        ICH\n*     .. Local Arrays ..\n      DOUBLE PRECISION   W( 2 )\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LDE, LDERES\n      EXTERNAL           LDE, LDERES\n*     .. External Subroutines ..\n      EXTERNAL           DMAKE, DMVCH, DSPR2, DSYR2\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, MAX\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICH/'UL'/\n*     .. Executable Statements ..\n      FULL = SNAME( 3: 3 ).EQ.'Y'\n      PACKED = SNAME( 3: 3 ).EQ.'P'\n*     Define the number of arguments.\n      IF( FULL )THEN\n         NARGS = 9\n      ELSE IF( PACKED )THEN\n         NARGS = 8\n      END IF\n*\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = ZERO\n*\n      DO 140 IN = 1, NIDIM\n         N = IDIM( IN )\n*        Set LDA to 1 more than minimum value if room.\n         LDA = N\n         IF( LDA.LT.NMAX )\n     $      LDA = LDA + 1\n*        Skip tests if not enough room.\n         IF( LDA.GT.NMAX )\n     $      GO TO 140\n         IF( PACKED )THEN\n            LAA = ( N*( N + 1 ) )/2\n         ELSE\n            LAA = LDA*N\n         END IF\n*\n         DO 130 IC = 1, 2\n            UPLO = ICH( IC: IC )\n            UPPER = UPLO.EQ.'U'\n*\n            DO 120 IX = 1, NINC\n               INCX = INC( IX )\n               LX = ABS( INCX )*N\n*\n*              Generate the vector X.\n*\n               TRANSL = HALF\n               CALL DMAKE( 'GE', ' ', ' ', 1, N, X, 1, XX, ABS( INCX ),\n     $                     0, N - 1, RESET, TRANSL )\n               IF( N.GT.1 )THEN\n                  X( N/2 ) = ZERO\n                  XX( 1 + ABS( INCX )*( N/2 - 1 ) ) = ZERO\n               END IF\n*\n               DO 110 IY = 1, NINC\n                  INCY = INC( IY )\n                  LY = ABS( INCY )*N\n*\n*                 Generate the vector Y.\n*\n                  TRANSL = ZERO\n                  CALL DMAKE( 'GE', ' ', ' ', 1, N, Y, 1, YY,\n     $                        ABS( INCY ), 0, N - 1, RESET, TRANSL )\n                  IF( N.GT.1 )THEN\n                     Y( N/2 ) = ZERO\n                     YY( 1 + ABS( INCY )*( N/2 - 1 ) ) = ZERO\n                  END IF\n*\n                  DO 100 IA = 1, NALF\n                     ALPHA = ALF( IA )\n                     NULL = N.LE.0.OR.ALPHA.EQ.ZERO\n*\n*                    Generate the matrix A.\n*\n                     TRANSL = ZERO\n                     CALL DMAKE( SNAME( 2: 3 ), UPLO, ' ', N, N, A,\n     $                           NMAX, AA, LDA, N - 1, N - 1, RESET,\n     $                           TRANSL )\n*\n                     NC = NC + 1\n*\n*                    Save every datum before calling the subroutine.\n*\n                     UPLOS = UPLO\n                     NS = N\n                     ALS = ALPHA\n                     DO 10 I = 1, LAA\n                        AS( I ) = AA( I )\n   10                CONTINUE\n                     LDAS = LDA\n                     DO 20 I = 1, LX\n                        XS( I ) = XX( I )\n   20                CONTINUE\n                     INCXS = INCX\n                     DO 30 I = 1, LY\n                        YS( I ) = YY( I )\n   30                CONTINUE\n                     INCYS = INCY\n*\n*                    Call the subroutine.\n*\n                     IF( FULL )THEN\n                        IF( TRACE )\n     $                     WRITE( NTRA, FMT = 9993 )NC, SNAME, UPLO, N,\n     $                     ALPHA, INCX, INCY, LDA\n                        IF( REWI )\n     $                     REWIND NTRA\n                        CALL DSYR2( UPLO, N, ALPHA, XX, INCX, YY, INCY,\n     $                              AA, LDA )\n                     ELSE IF( PACKED )THEN\n                        IF( TRACE )\n     $                     WRITE( NTRA, FMT = 9994 )NC, SNAME, UPLO, N,\n     $                     ALPHA, INCX, INCY\n                        IF( REWI )\n     $                     REWIND NTRA\n                        CALL DSPR2( UPLO, N, ALPHA, XX, INCX, YY, INCY,\n     $                              AA )\n                     END IF\n*\n*                    Check if error-exit was taken incorrectly.\n*\n                     IF( .NOT.OK )THEN\n                        WRITE( NOUT, FMT = 9992 )\n                        FATAL = .TRUE.\n                        GO TO 160\n                     END IF\n*\n*                    See what data changed inside subroutines.\n*\n                     ISAME( 1 ) = UPLO.EQ.UPLOS\n                     ISAME( 2 ) = NS.EQ.N\n                     ISAME( 3 ) = ALS.EQ.ALPHA\n                     ISAME( 4 ) = LDE( XS, XX, LX )\n                     ISAME( 5 ) = INCXS.EQ.INCX\n                     ISAME( 6 ) = LDE( YS, YY, LY )\n                     ISAME( 7 ) = INCYS.EQ.INCY\n                     IF( NULL )THEN\n                        ISAME( 8 ) = LDE( AS, AA, LAA )\n                     ELSE\n                        ISAME( 8 ) = LDERES( SNAME( 2: 3 ), UPLO, N, N,\n     $                               AS, AA, LDA )\n                     END IF\n                     IF( .NOT.PACKED )THEN\n                        ISAME( 9 ) = LDAS.EQ.LDA\n                     END IF\n*\n*                    If data was incorrectly changed, report and return.\n*\n                     SAME = .TRUE.\n                     DO 40 I = 1, NARGS\n                        SAME = SAME.AND.ISAME( I )\n                        IF( .NOT.ISAME( I ) )\n     $                     WRITE( NOUT, FMT = 9998 )I\n   40                CONTINUE\n                     IF( .NOT.SAME )THEN\n                        FATAL = .TRUE.\n                        GO TO 160\n                     END IF\n*\n                     IF( .NOT.NULL )THEN\n*\n*                       Check the result column by column.\n*\n                        IF( INCX.GT.0 )THEN\n                           DO 50 I = 1, N\n                              Z( I, 1 ) = X( I )\n   50                      CONTINUE\n                        ELSE\n                           DO 60 I = 1, N\n                              Z( I, 1 ) = X( N - I + 1 )\n   60                      CONTINUE\n                        END IF\n                        IF( INCY.GT.0 )THEN\n                           DO 70 I = 1, N\n                              Z( I, 2 ) = Y( I )\n   70                      CONTINUE\n                        ELSE\n                           DO 80 I = 1, N\n                              Z( I, 2 ) = Y( N - I + 1 )\n   80                      CONTINUE\n                        END IF\n                        JA = 1\n                        DO 90 J = 1, N\n                           W( 1 ) = Z( J, 2 )\n                           W( 2 ) = Z( J, 1 )\n                           IF( UPPER )THEN\n                              JJ = 1\n                              LJ = J\n                           ELSE\n                              JJ = J\n                              LJ = N - J + 1\n                           END IF\n                           CALL DMVCH( 'N', LJ, 2, ALPHA, Z( JJ, 1 ),\n     $                                 NMAX, W, 1, ONE, A( JJ, J ), 1,\n     $                                 YT, G, AA( JA ), EPS, ERR, FATAL,\n     $                                 NOUT, .TRUE. )\n                           IF( FULL )THEN\n                              IF( UPPER )THEN\n                                 JA = JA + LDA\n                              ELSE\n                                 JA = JA + LDA + 1\n                              END IF\n                           ELSE\n                              JA = JA + LJ\n                           END IF\n                           ERRMAX = MAX( ERRMAX, ERR )\n*                          If got really bad answer, report and return.\n                           IF( FATAL )\n     $                        GO TO 150\n   90                   CONTINUE\n                     ELSE\n*                       Avoid repeating tests with N.le.0.\n                        IF( N.LE.0 )\n     $                     GO TO 140\n                     END IF\n*\n  100             CONTINUE\n*\n  110          CONTINUE\n*\n  120       CONTINUE\n*\n  130    CONTINUE\n*\n  140 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 170\n*\n  150 CONTINUE\n      WRITE( NOUT, FMT = 9995 )J\n*\n  160 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      IF( FULL )THEN\n         WRITE( NOUT, FMT = 9993 )NC, SNAME, UPLO, N, ALPHA, INCX,\n     $      INCY, LDA\n      ELSE IF( PACKED )THEN\n         WRITE( NOUT, FMT = 9994 )NC, SNAME, UPLO, N, ALPHA, INCX, INCY\n      END IF\n*\n  170 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( '      THESE ARE THE RESULTS FOR COLUMN ', I3 )\n 9994 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',', I3, ',', F4.1, ', X,',\n     $      I2, ', Y,', I2, ', AP)                     .' )\n 9993 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',', I3, ',', F4.1, ', X,',\n     $      I2, ', Y,', I2, ', A,', I3, ')                  .' )\n 9992 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of DCHK6.\n*\n      END\n      SUBROUTINE DCHKE( ISNUM, SRNAMT, NOUT )\n*\n*  Tests the error exits from the Level 2 Blas.\n*  Requires a special version of the error-handling routine XERBLA.\n*  ALPHA, BETA, A, X and Y should not need to be defined.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Scalar Arguments ..\n      INTEGER            ISNUM, NOUT\n      CHARACTER*6        SRNAMT\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Local Scalars ..\n      DOUBLE PRECISION   ALPHA, BETA\n*     .. Local Arrays ..\n      DOUBLE PRECISION   A( 1, 1 ), X( 1 ), Y( 1 )\n*     .. External Subroutines ..\n      EXTERNAL           CHKXER, DGBMV, DGEMV, DGER, DSBMV, DSPMV, DSPR,\n     $                   DSPR2, DSYMV, DSYR, DSYR2, DTBMV, DTBSV, DTPMV,\n     $                   DTPSV, DTRMV, DTRSV\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Executable Statements ..\n*     OK is set to .FALSE. by the special version of XERBLA or by CHKXER\n*     if anything is wrong.\n      OK = .TRUE.\n*     LERR is set to .TRUE. by the special version of XERBLA each time\n*     it is called, and is then tested and re-set by CHKXER.\n      LERR = .FALSE.\n      GO TO ( 10, 20, 30, 40, 50, 60, 70, 80,\n     $        90, 100, 110, 120, 130, 140, 150,\n     $        160 )ISNUM\n   10 INFOT = 1\n      CALL DGEMV( '/', 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL DGEMV( 'N', -1, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL DGEMV( 'N', 0, -1, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL DGEMV( 'N', 2, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL DGEMV( 'N', 0, 0, ALPHA, A, 1, X, 0, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL DGEMV( 'N', 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 170\n   20 INFOT = 1\n      CALL DGBMV( '/', 0, 0, 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL DGBMV( 'N', -1, 0, 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL DGBMV( 'N', 0, -1, 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL DGBMV( 'N', 0, 0, -1, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL DGBMV( 'N', 2, 0, 0, -1, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL DGBMV( 'N', 0, 0, 1, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL DGBMV( 'N', 0, 0, 0, 0, ALPHA, A, 1, X, 0, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 13\n      CALL DGBMV( 'N', 0, 0, 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 170\n   30 INFOT = 1\n      CALL DSYMV( '/', 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL DSYMV( 'U', -1, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL DSYMV( 'U', 2, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL DSYMV( 'U', 0, ALPHA, A, 1, X, 0, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL DSYMV( 'U', 0, ALPHA, A, 1, X, 1, BETA, Y, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 170\n   40 INFOT = 1\n      CALL DSBMV( '/', 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL DSBMV( 'U', -1, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL DSBMV( 'U', 0, -1, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL DSBMV( 'U', 0, 1, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL DSBMV( 'U', 0, 0, ALPHA, A, 1, X, 0, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL DSBMV( 'U', 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 170\n   50 INFOT = 1\n      CALL DSPMV( '/', 0, ALPHA, A, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL DSPMV( 'U', -1, ALPHA, A, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL DSPMV( 'U', 0, ALPHA, A, X, 0, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL DSPMV( 'U', 0, ALPHA, A, X, 1, BETA, Y, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 170\n   60 INFOT = 1\n      CALL DTRMV( '/', 'N', 'N', 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL DTRMV( 'U', '/', 'N', 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL DTRMV( 'U', 'N', '/', 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL DTRMV( 'U', 'N', 'N', -1, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL DTRMV( 'U', 'N', 'N', 2, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL DTRMV( 'U', 'N', 'N', 0, A, 1, X, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 170\n   70 INFOT = 1\n      CALL DTBMV( '/', 'N', 'N', 0, 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL DTBMV( 'U', '/', 'N', 0, 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL DTBMV( 'U', 'N', '/', 0, 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL DTBMV( 'U', 'N', 'N', -1, 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL DTBMV( 'U', 'N', 'N', 0, -1, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL DTBMV( 'U', 'N', 'N', 0, 1, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL DTBMV( 'U', 'N', 'N', 0, 0, A, 1, X, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 170\n   80 INFOT = 1\n      CALL DTPMV( '/', 'N', 'N', 0, A, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL DTPMV( 'U', '/', 'N', 0, A, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL DTPMV( 'U', 'N', '/', 0, A, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL DTPMV( 'U', 'N', 'N', -1, A, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL DTPMV( 'U', 'N', 'N', 0, A, X, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 170\n   90 INFOT = 1\n      CALL DTRSV( '/', 'N', 'N', 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL DTRSV( 'U', '/', 'N', 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL DTRSV( 'U', 'N', '/', 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL DTRSV( 'U', 'N', 'N', -1, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL DTRSV( 'U', 'N', 'N', 2, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL DTRSV( 'U', 'N', 'N', 0, A, 1, X, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 170\n  100 INFOT = 1\n      CALL DTBSV( '/', 'N', 'N', 0, 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL DTBSV( 'U', '/', 'N', 0, 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL DTBSV( 'U', 'N', '/', 0, 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL DTBSV( 'U', 'N', 'N', -1, 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL DTBSV( 'U', 'N', 'N', 0, -1, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL DTBSV( 'U', 'N', 'N', 0, 1, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL DTBSV( 'U', 'N', 'N', 0, 0, A, 1, X, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 170\n  110 INFOT = 1\n      CALL DTPSV( '/', 'N', 'N', 0, A, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL DTPSV( 'U', '/', 'N', 0, A, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL DTPSV( 'U', 'N', '/', 0, A, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL DTPSV( 'U', 'N', 'N', -1, A, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL DTPSV( 'U', 'N', 'N', 0, A, X, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 170\n  120 INFOT = 1\n      CALL DGER( -1, 0, ALPHA, X, 1, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL DGER( 0, -1, ALPHA, X, 1, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL DGER( 0, 0, ALPHA, X, 0, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL DGER( 0, 0, ALPHA, X, 1, Y, 0, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL DGER( 2, 0, ALPHA, X, 1, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 170\n  130 INFOT = 1\n      CALL DSYR( '/', 0, ALPHA, X, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL DSYR( 'U', -1, ALPHA, X, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL DSYR( 'U', 0, ALPHA, X, 0, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL DSYR( 'U', 2, ALPHA, X, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 170\n  140 INFOT = 1\n      CALL DSPR( '/', 0, ALPHA, X, 1, A )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL DSPR( 'U', -1, ALPHA, X, 1, A )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL DSPR( 'U', 0, ALPHA, X, 0, A )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 170\n  150 INFOT = 1\n      CALL DSYR2( '/', 0, ALPHA, X, 1, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL DSYR2( 'U', -1, ALPHA, X, 1, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL DSYR2( 'U', 0, ALPHA, X, 0, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL DSYR2( 'U', 0, ALPHA, X, 1, Y, 0, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL DSYR2( 'U', 2, ALPHA, X, 1, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 170\n  160 INFOT = 1\n      CALL DSPR2( '/', 0, ALPHA, X, 1, Y, 1, A )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL DSPR2( 'U', -1, ALPHA, X, 1, Y, 1, A )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL DSPR2( 'U', 0, ALPHA, X, 0, Y, 1, A )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL DSPR2( 'U', 0, ALPHA, X, 1, Y, 0, A )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n*\n  170 IF( OK )THEN\n         WRITE( NOUT, FMT = 9999 )SRNAMT\n      ELSE\n         WRITE( NOUT, FMT = 9998 )SRNAMT\n      END IF\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE TESTS OF ERROR-EXITS' )\n 9998 FORMAT( ' ******* ', A6, ' FAILED THE TESTS OF ERROR-EXITS *****',\n     $      '**' )\n*\n*     End of DCHKE.\n*\n      END\n      SUBROUTINE DMAKE( TYPE, UPLO, DIAG, M, N, A, NMAX, AA, LDA, KL,\n     $                  KU, RESET, TRANSL )\n*\n*  Generates values for an M by N matrix A within the bandwidth\n*  defined by KL and KU.\n*  Stores the values in the array AA in the data structure required\n*  by the routine, with unwanted elements set to rogue value.\n*\n*  TYPE is 'GE', 'GB', 'SY', 'SB', 'SP', 'TR', 'TB' OR 'TP'.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Parameters ..\n      DOUBLE PRECISION   ZERO, ONE\n      PARAMETER          ( ZERO = 0.0D0, ONE = 1.0D0 )\n      DOUBLE PRECISION   ROGUE\n      PARAMETER          ( ROGUE = -1.0D10 )\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION   TRANSL\n      INTEGER            KL, KU, LDA, M, N, NMAX\n      LOGICAL            RESET\n      CHARACTER*1        DIAG, UPLO\n      CHARACTER*2        TYPE\n*     .. Array Arguments ..\n      DOUBLE PRECISION   A( NMAX, * ), AA( * )\n*     .. Local Scalars ..\n      INTEGER            I, I1, I2, I3, IBEG, IEND, IOFF, J, KK\n      LOGICAL            GEN, LOWER, SYM, TRI, UNIT, UPPER\n*     .. External Functions ..\n      DOUBLE PRECISION   DBEG\n      EXTERNAL           DBEG\n*     .. Intrinsic Functions ..\n      INTRINSIC          MAX, MIN\n*     .. Executable Statements ..\n      GEN = TYPE( 1: 1 ).EQ.'G'\n      SYM = TYPE( 1: 1 ).EQ.'S'\n      TRI = TYPE( 1: 1 ).EQ.'T'\n      UPPER = ( SYM.OR.TRI ).AND.UPLO.EQ.'U'\n      LOWER = ( SYM.OR.TRI ).AND.UPLO.EQ.'L'\n      UNIT = TRI.AND.DIAG.EQ.'U'\n*\n*     Generate data in array A.\n*\n      DO 20 J = 1, N\n         DO 10 I = 1, M\n            IF( GEN.OR.( UPPER.AND.I.LE.J ).OR.( LOWER.AND.I.GE.J ) )\n     $          THEN\n               IF( ( I.LE.J.AND.J - I.LE.KU ).OR.\n     $             ( I.GE.J.AND.I - J.LE.KL ) )THEN\n                  A( I, J ) = DBEG( RESET ) + TRANSL\n               ELSE\n                  A( I, J ) = ZERO\n               END IF\n               IF( I.NE.J )THEN\n                  IF( SYM )THEN\n                     A( J, I ) = A( I, J )\n                  ELSE IF( TRI )THEN\n                     A( J, I ) = ZERO\n                  END IF\n               END IF\n            END IF\n   10    CONTINUE\n         IF( TRI )\n     $      A( J, J ) = A( J, J ) + ONE\n         IF( UNIT )\n     $      A( J, J ) = ONE\n   20 CONTINUE\n*\n*     Store elements in array AS in data structure required by routine.\n*\n      IF( TYPE.EQ.'GE' )THEN\n         DO 50 J = 1, N\n            DO 30 I = 1, M\n               AA( I + ( J - 1 )*LDA ) = A( I, J )\n   30       CONTINUE\n            DO 40 I = M + 1, LDA\n               AA( I + ( J - 1 )*LDA ) = ROGUE\n   40       CONTINUE\n   50    CONTINUE\n      ELSE IF( TYPE.EQ.'GB' )THEN\n         DO 90 J = 1, N\n            DO 60 I1 = 1, KU + 1 - J\n               AA( I1 + ( J - 1 )*LDA ) = ROGUE\n   60       CONTINUE\n            DO 70 I2 = I1, MIN( KL + KU + 1, KU + 1 + M - J )\n               AA( I2 + ( J - 1 )*LDA ) = A( I2 + J - KU - 1, J )\n   70       CONTINUE\n            DO 80 I3 = I2, LDA\n               AA( I3 + ( J - 1 )*LDA ) = ROGUE\n   80       CONTINUE\n   90    CONTINUE\n      ELSE IF( TYPE.EQ.'SY'.OR.TYPE.EQ.'TR' )THEN\n         DO 130 J = 1, N\n            IF( UPPER )THEN\n               IBEG = 1\n               IF( UNIT )THEN\n                  IEND = J - 1\n               ELSE\n                  IEND = J\n               END IF\n            ELSE\n               IF( UNIT )THEN\n                  IBEG = J + 1\n               ELSE\n                  IBEG = J\n               END IF\n               IEND = N\n            END IF\n            DO 100 I = 1, IBEG - 1\n               AA( I + ( J - 1 )*LDA ) = ROGUE\n  100       CONTINUE\n            DO 110 I = IBEG, IEND\n               AA( I + ( J - 1 )*LDA ) = A( I, J )\n  110       CONTINUE\n            DO 120 I = IEND + 1, LDA\n               AA( I + ( J - 1 )*LDA ) = ROGUE\n  120       CONTINUE\n  130    CONTINUE\n      ELSE IF( TYPE.EQ.'SB'.OR.TYPE.EQ.'TB' )THEN\n         DO 170 J = 1, N\n            IF( UPPER )THEN\n               KK = KL + 1\n               IBEG = MAX( 1, KL + 2 - J )\n               IF( UNIT )THEN\n                  IEND = KL\n               ELSE\n                  IEND = KL + 1\n               END IF\n            ELSE\n               KK = 1\n               IF( UNIT )THEN\n                  IBEG = 2\n               ELSE\n                  IBEG = 1\n               END IF\n               IEND = MIN( KL + 1, 1 + M - J )\n            END IF\n            DO 140 I = 1, IBEG - 1\n               AA( I + ( J - 1 )*LDA ) = ROGUE\n  140       CONTINUE\n            DO 150 I = IBEG, IEND\n               AA( I + ( J - 1 )*LDA ) = A( I + J - KK, J )\n  150       CONTINUE\n            DO 160 I = IEND + 1, LDA\n               AA( I + ( J - 1 )*LDA ) = ROGUE\n  160       CONTINUE\n  170    CONTINUE\n      ELSE IF( TYPE.EQ.'SP'.OR.TYPE.EQ.'TP' )THEN\n         IOFF = 0\n         DO 190 J = 1, N\n            IF( UPPER )THEN\n               IBEG = 1\n               IEND = J\n            ELSE\n               IBEG = J\n               IEND = N\n            END IF\n            DO 180 I = IBEG, IEND\n               IOFF = IOFF + 1\n               AA( IOFF ) = A( I, J )\n               IF( I.EQ.J )THEN\n                  IF( UNIT )\n     $               AA( IOFF ) = ROGUE\n               END IF\n  180       CONTINUE\n  190    CONTINUE\n      END IF\n      RETURN\n*\n*     End of DMAKE.\n*\n      END\n      SUBROUTINE DMVCH( TRANS, M, N, ALPHA, A, NMAX, X, INCX, BETA, Y,\n     $                  INCY, YT, G, YY, EPS, ERR, FATAL, NOUT, MV )\n*\n*  Checks the results of the computational tests.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Parameters ..\n      DOUBLE PRECISION   ZERO, ONE\n      PARAMETER          ( ZERO = 0.0D0, ONE = 1.0D0 )\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION   ALPHA, BETA, EPS, ERR\n      INTEGER            INCX, INCY, M, N, NMAX, NOUT\n      LOGICAL            FATAL, MV\n      CHARACTER*1        TRANS\n*     .. Array Arguments ..\n      DOUBLE PRECISION   A( NMAX, * ), G( * ), X( * ), Y( * ), YT( * ),\n     $                   YY( * )\n*     .. Local Scalars ..\n      DOUBLE PRECISION   ERRI\n      INTEGER            I, INCXL, INCYL, IY, J, JX, KX, KY, ML, NL\n      LOGICAL            TRAN\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, MAX, SQRT\n*     .. Executable Statements ..\n      TRAN = TRANS.EQ.'T'.OR.TRANS.EQ.'C'\n      IF( TRAN )THEN\n         ML = N\n         NL = M\n      ELSE\n         ML = M\n         NL = N\n      END IF\n      IF( INCX.LT.0 )THEN\n         KX = NL\n         INCXL = -1\n      ELSE\n         KX = 1\n         INCXL = 1\n      END IF\n      IF( INCY.LT.0 )THEN\n         KY = ML\n         INCYL = -1\n      ELSE\n         KY = 1\n         INCYL = 1\n      END IF\n*\n*     Compute expected result in YT using data in A, X and Y.\n*     Compute gauges in G.\n*\n      IY = KY\n      DO 30 I = 1, ML\n         YT( IY ) = ZERO\n         G( IY ) = ZERO\n         JX = KX\n         IF( TRAN )THEN\n            DO 10 J = 1, NL\n               YT( IY ) = YT( IY ) + A( J, I )*X( JX )\n               G( IY ) = G( IY ) + ABS( A( J, I )*X( JX ) )\n               JX = JX + INCXL\n   10       CONTINUE\n         ELSE\n            DO 20 J = 1, NL\n               YT( IY ) = YT( IY ) + A( I, J )*X( JX )\n               G( IY ) = G( IY ) + ABS( A( I, J )*X( JX ) )\n               JX = JX + INCXL\n   20       CONTINUE\n         END IF\n         YT( IY ) = ALPHA*YT( IY ) + BETA*Y( IY )\n         G( IY ) = ABS( ALPHA )*G( IY ) + ABS( BETA*Y( IY ) )\n         IY = IY + INCYL\n   30 CONTINUE\n*\n*     Compute the error ratio for this result.\n*\n      ERR = ZERO\n      DO 40 I = 1, ML\n         ERRI = ABS( YT( I ) - YY( 1 + ( I - 1 )*ABS( INCY ) ) )/EPS\n         IF( G( I ).NE.ZERO )\n     $      ERRI = ERRI/G( I )\n         ERR = MAX( ERR, ERRI )\n         IF( ERR*SQRT( EPS ).GE.ONE )\n     $      GO TO 50\n   40 CONTINUE\n*     If the loop completes, all results are at least half accurate.\n      GO TO 70\n*\n*     Report fatal error.\n*\n   50 FATAL = .TRUE.\n      WRITE( NOUT, FMT = 9999 )\n      DO 60 I = 1, ML\n         IF( MV )THEN\n            WRITE( NOUT, FMT = 9998 )I, YT( I ),\n     $         YY( 1 + ( I - 1 )*ABS( INCY ) )\n         ELSE\n            WRITE( NOUT, FMT = 9998 )I,\n     $         YY( 1 + ( I - 1 )*ABS( INCY ) ), YT( I )\n         END IF\n   60 CONTINUE\n*\n   70 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ******* FATAL ERROR - COMPUTED RESULT IS LESS THAN HAL',\n     $      'F ACCURATE *******', /'           EXPECTED RESULT   COMPU',\n     $      'TED RESULT' )\n 9998 FORMAT( 1X, I7, 2G18.6 )\n*\n*     End of DMVCH.\n*\n      END\n      LOGICAL FUNCTION LDE( RI, RJ, LR )\n*\n*  Tests if two arrays are identical.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Scalar Arguments ..\n      INTEGER            LR\n*     .. Array Arguments ..\n      DOUBLE PRECISION   RI( * ), RJ( * )\n*     .. Local Scalars ..\n      INTEGER            I\n*     .. Executable Statements ..\n      DO 10 I = 1, LR\n         IF( RI( I ).NE.RJ( I ) )\n     $      GO TO 20\n   10 CONTINUE\n      LDE = .TRUE.\n      GO TO 30\n   20 CONTINUE\n      LDE = .FALSE.\n   30 RETURN\n*\n*     End of LDE.\n*\n      END\n      LOGICAL FUNCTION LDERES( TYPE, UPLO, M, N, AA, AS, LDA )\n*\n*  Tests if selected elements in two arrays are equal.\n*\n*  TYPE is 'GE', 'SY' or 'SP'.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Scalar Arguments ..\n      INTEGER            LDA, M, N\n      CHARACTER*1        UPLO\n      CHARACTER*2        TYPE\n*     .. Array Arguments ..\n      DOUBLE PRECISION   AA( LDA, * ), AS( LDA, * )\n*     .. Local Scalars ..\n      INTEGER            I, IBEG, IEND, J\n      LOGICAL            UPPER\n*     .. Executable Statements ..\n      UPPER = UPLO.EQ.'U'\n      IF( TYPE.EQ.'GE' )THEN\n         DO 20 J = 1, N\n            DO 10 I = M + 1, LDA\n               IF( AA( I, J ).NE.AS( I, J ) )\n     $            GO TO 70\n   10       CONTINUE\n   20    CONTINUE\n      ELSE IF( TYPE.EQ.'SY' )THEN\n         DO 50 J = 1, N\n            IF( UPPER )THEN\n               IBEG = 1\n               IEND = J\n            ELSE\n               IBEG = J\n               IEND = N\n            END IF\n            DO 30 I = 1, IBEG - 1\n               IF( AA( I, J ).NE.AS( I, J ) )\n     $            GO TO 70\n   30       CONTINUE\n            DO 40 I = IEND + 1, LDA\n               IF( AA( I, J ).NE.AS( I, J ) )\n     $            GO TO 70\n   40       CONTINUE\n   50    CONTINUE\n      END IF\n*\n      LDERES = .TRUE.\n      GO TO 80\n   70 CONTINUE\n      LDERES = .FALSE.\n   80 RETURN\n*\n*     End of LDERES.\n*\n      END\n      DOUBLE PRECISION FUNCTION DBEG( RESET )\n*\n*  Generates random numbers uniformly distributed between -0.5 and 0.5.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Scalar Arguments ..\n      LOGICAL            RESET\n*     .. Local Scalars ..\n      INTEGER            I, IC, MI\n*     .. Save statement ..\n      SAVE               I, IC, MI\n*     .. Intrinsic Functions ..\n      INTRINSIC          DBLE\n*     .. Executable Statements ..\n      IF( RESET )THEN\n*        Initialize local variables.\n         MI = 891\n         I = 7\n         IC = 0\n         RESET = .FALSE.\n      END IF\n*\n*     The sequence of values of I is bounded between 1 and 999.\n*     If initial I = 1,2,3,6,7 or 9, the period will be 50.\n*     If initial I = 4 or 8, the period will be 25.\n*     If initial I = 5, the period will be 10.\n*     IC is used to break up the period by skipping 1 value of I in 6.\n*\n      IC = IC + 1\n   10 I = I*MI\n      I = I - 1000*( I/1000 )\n      IF( IC.GE.5 )THEN\n         IC = 0\n         GO TO 10\n      END IF\n      DBEG = DBLE( I - 500 )/1001.0D0\n      RETURN\n*\n*     End of DBEG.\n*\n      END\n      DOUBLE PRECISION FUNCTION DDIFF( X, Y )\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION   X, Y\n*     .. Executable Statements ..\n      DDIFF = X - Y\n      RETURN\n*\n*     End of DDIFF.\n*\n      END\n      SUBROUTINE CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n*\n*  Tests whether XERBLA has detected an error when it should.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Scalar Arguments ..\n      INTEGER            INFOT, NOUT\n      LOGICAL            LERR, OK\n      CHARACTER*6        SRNAMT\n*     .. Executable Statements ..\n      IF( .NOT.LERR )THEN\n         WRITE( NOUT, FMT = 9999 )INFOT, SRNAMT\n         OK = .FALSE.\n      END IF\n      LERR = .FALSE.\n      RETURN\n*\n 9999 FORMAT( ' ***** ILLEGAL VALUE OF PARAMETER NUMBER ', I2, ' NOT D',\n     $      'ETECTED BY ', A6, ' *****' )\n*\n*     End of CHKXER.\n*\n      END\n      SUBROUTINE XERBLA( SRNAME, INFO )\n*\n*  This is a special version of XERBLA to be used only as part of\n*  the test program for testing error exits from the Level 2 BLAS\n*  routines.\n*\n*  XERBLA  is an error handler for the Level 2 BLAS routines.\n*\n*  It is called by the Level 2 BLAS routines if an input parameter is\n*  invalid.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Scalar Arguments ..\n      INTEGER            INFO\n      CHARACTER*6        SRNAME\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUT\n      LOGICAL            LERR, OK\n      CHARACTER*6        SRNAMT\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUT, OK, LERR\n      COMMON             /SRNAMC/SRNAMT\n*     .. Executable Statements ..\n      LERR = .TRUE.\n      IF( INFO.NE.INFOT )THEN\n         IF( INFOT.NE.0 )THEN\n            WRITE( NOUT, FMT = 9999 )INFO, INFOT\n         ELSE\n            WRITE( NOUT, FMT = 9997 )INFO\n         END IF\n         OK = .FALSE.\n      END IF\n      IF( SRNAME.NE.SRNAMT )THEN\n         WRITE( NOUT, FMT = 9998 )SRNAME, SRNAMT\n         OK = .FALSE.\n      END IF\n      RETURN\n*\n 9999 FORMAT( ' ******* XERBLA WAS CALLED WITH INFO = ', I6, ' INSTEAD',\n     $      ' OF ', I2, ' *******' )\n 9998 FORMAT( ' ******* XERBLA WAS CALLED WITH SRNAME = ', A6, ' INSTE',\n     $      'AD OF ', A6, ' *******' )\n 9997 FORMAT( ' ******* XERBLA WAS CALLED WITH INFO = ', I6,\n     $      ' *******' )\n*\n*     End of XERBLA\n*\n      END\n\n"
  },
  {
    "path": "3rdparty/eigen3/blas/testing/dblat3.f",
    "content": "*> \\brief \\b DBLAT3\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*  Definition:\n*  ===========\n*\n*       PROGRAM DBLAT3\n* \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> Test program for the DOUBLE PRECISION Level 3 Blas.\n*>\n*> The program must be driven by a short data file. The first 14 records\n*> of the file are read using list-directed input, the last 6 records\n*> are read using the format ( A6, L2 ). An annotated example of a data\n*> file can be obtained by deleting the first 3 characters from the\n*> following 20 lines:\n*> 'dblat3.out'      NAME OF SUMMARY OUTPUT FILE\n*> 6                 UNIT NUMBER OF SUMMARY FILE\n*> 'DBLAT3.SNAP'     NAME OF SNAPSHOT OUTPUT FILE\n*> -1                UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)\n*> F        LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.\n*> F        LOGICAL FLAG, T TO STOP ON FAILURES.\n*> T        LOGICAL FLAG, T TO TEST ERROR EXITS.\n*> 16.0     THRESHOLD VALUE OF TEST RATIO\n*> 6                 NUMBER OF VALUES OF N\n*> 0 1 2 3 5 9       VALUES OF N\n*> 3                 NUMBER OF VALUES OF ALPHA\n*> 0.0 1.0 0.7       VALUES OF ALPHA\n*> 3                 NUMBER OF VALUES OF BETA\n*> 0.0 1.0 1.3       VALUES OF BETA\n*> DGEMM  T PUT F FOR NO TEST. SAME COLUMNS.\n*> DSYMM  T PUT F FOR NO TEST. SAME COLUMNS.\n*> DTRMM  T PUT F FOR NO TEST. SAME COLUMNS.\n*> DTRSM  T PUT F FOR NO TEST. SAME COLUMNS.\n*> DSYRK  T PUT F FOR NO TEST. SAME COLUMNS.\n*> DSYR2K T PUT F FOR NO TEST. SAME COLUMNS.\n*>\n*> Further Details\n*> ===============\n*>\n*> See:\n*>\n*>    Dongarra J. J., Du Croz J. J., Duff I. S. and Hammarling S.\n*>    A Set of Level 3 Basic Linear Algebra Subprograms.\n*>\n*>    Technical Memorandum No.88 (Revision 1), Mathematics and\n*>    Computer Science Division, Argonne National Laboratory, 9700\n*>    South Cass Avenue, Argonne, Illinois 60439, US.\n*>\n*> -- Written on 8-February-1989.\n*>    Jack Dongarra, Argonne National Laboratory.\n*>    Iain Duff, AERE Harwell.\n*>    Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*>    Sven Hammarling, Numerical Algorithms Group Ltd.\n*>\n*>    10-9-00:  Change STATUS='NEW' to 'UNKNOWN' so that the testers\n*>              can be run multiple times without deleting generated\n*>              output files (susan)\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date April 2012\n*\n*> \\ingroup double_blas_testing\n*\n*  =====================================================================\n      PROGRAM DBLAT3\n*\n*  -- Reference BLAS test routine (version 3.4.1) --\n*  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     April 2012\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      INTEGER            NIN\n      PARAMETER          ( NIN = 5 )\n      INTEGER            NSUBS\n      PARAMETER          ( NSUBS = 6 )\n      DOUBLE PRECISION   ZERO, ONE\n      PARAMETER          ( ZERO = 0.0D0, ONE = 1.0D0 )\n      INTEGER            NMAX\n      PARAMETER          ( NMAX = 65 )\n      INTEGER            NIDMAX, NALMAX, NBEMAX\n      PARAMETER          ( NIDMAX = 9, NALMAX = 7, NBEMAX = 7 )\n*     .. Local Scalars ..\n      DOUBLE PRECISION   EPS, ERR, THRESH\n      INTEGER            I, ISNUM, J, N, NALF, NBET, NIDIM, NOUT, NTRA\n      LOGICAL            FATAL, LTESTT, REWI, SAME, SFATAL, TRACE,\n     $                   TSTERR\n      CHARACTER*1        TRANSA, TRANSB\n      CHARACTER*6        SNAMET\n      CHARACTER*32       SNAPS, SUMMRY\n*     .. Local Arrays ..\n      DOUBLE PRECISION   AA( NMAX*NMAX ), AB( NMAX, 2*NMAX ),\n     $                   ALF( NALMAX ), AS( NMAX*NMAX ),\n     $                   BB( NMAX*NMAX ), BET( NBEMAX ),\n     $                   BS( NMAX*NMAX ), C( NMAX, NMAX ),\n     $                   CC( NMAX*NMAX ), CS( NMAX*NMAX ), CT( NMAX ),\n     $                   G( NMAX ), W( 2*NMAX )\n      INTEGER            IDIM( NIDMAX )\n      LOGICAL            LTEST( NSUBS )\n      CHARACTER*6        SNAMES( NSUBS )\n*     .. External Functions ..\n      DOUBLE PRECISION   DDIFF\n      LOGICAL            LDE\n      EXTERNAL           DDIFF, LDE\n*     .. External Subroutines ..\n      EXTERNAL           DCHK1, DCHK2, DCHK3, DCHK4, DCHK5, DCHKE, DMMCH\n*     .. Intrinsic Functions ..\n      INTRINSIC          MAX, MIN\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n      CHARACTER*6        SRNAMT\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n      COMMON             /SRNAMC/SRNAMT\n*     .. Data statements ..\n      DATA               SNAMES/'DGEMM ', 'DSYMM ', 'DTRMM ', 'DTRSM ',\n     $                   'DSYRK ', 'DSYR2K'/\n*     .. Executable Statements ..\n*\n*     Read name and unit number for summary output file and open file.\n*\n      READ( NIN, FMT = * )SUMMRY\n      READ( NIN, FMT = * )NOUT\n      OPEN( NOUT, FILE = SUMMRY, STATUS = 'UNKNOWN' )\n      NOUTC = NOUT\n*\n*     Read name and unit number for snapshot output file and open file.\n*\n      READ( NIN, FMT = * )SNAPS\n      READ( NIN, FMT = * )NTRA\n      TRACE = NTRA.GE.0\n      IF( TRACE )THEN\n         OPEN( NTRA, FILE = SNAPS, STATUS = 'UNKNOWN' )\n      END IF\n*     Read the flag that directs rewinding of the snapshot file.\n      READ( NIN, FMT = * )REWI\n      REWI = REWI.AND.TRACE\n*     Read the flag that directs stopping on any failure.\n      READ( NIN, FMT = * )SFATAL\n*     Read the flag that indicates whether error exits are to be tested.\n      READ( NIN, FMT = * )TSTERR\n*     Read the threshold value of the test ratio\n      READ( NIN, FMT = * )THRESH\n*\n*     Read and check the parameter values for the tests.\n*\n*     Values of N\n      READ( NIN, FMT = * )NIDIM\n      IF( NIDIM.LT.1.OR.NIDIM.GT.NIDMAX )THEN\n         WRITE( NOUT, FMT = 9997 )'N', NIDMAX\n         GO TO 220\n      END IF\n      READ( NIN, FMT = * )( IDIM( I ), I = 1, NIDIM )\n      DO 10 I = 1, NIDIM\n         IF( IDIM( I ).LT.0.OR.IDIM( I ).GT.NMAX )THEN\n            WRITE( NOUT, FMT = 9996 )NMAX\n            GO TO 220\n         END IF\n   10 CONTINUE\n*     Values of ALPHA\n      READ( NIN, FMT = * )NALF\n      IF( NALF.LT.1.OR.NALF.GT.NALMAX )THEN\n         WRITE( NOUT, FMT = 9997 )'ALPHA', NALMAX\n         GO TO 220\n      END IF\n      READ( NIN, FMT = * )( ALF( I ), I = 1, NALF )\n*     Values of BETA\n      READ( NIN, FMT = * )NBET\n      IF( NBET.LT.1.OR.NBET.GT.NBEMAX )THEN\n         WRITE( NOUT, FMT = 9997 )'BETA', NBEMAX\n         GO TO 220\n      END IF\n      READ( NIN, FMT = * )( BET( I ), I = 1, NBET )\n*\n*     Report values of parameters.\n*\n      WRITE( NOUT, FMT = 9995 )\n      WRITE( NOUT, FMT = 9994 )( IDIM( I ), I = 1, NIDIM )\n      WRITE( NOUT, FMT = 9993 )( ALF( I ), I = 1, NALF )\n      WRITE( NOUT, FMT = 9992 )( BET( I ), I = 1, NBET )\n      IF( .NOT.TSTERR )THEN\n         WRITE( NOUT, FMT = * )\n         WRITE( NOUT, FMT = 9984 )\n      END IF\n      WRITE( NOUT, FMT = * )\n      WRITE( NOUT, FMT = 9999 )THRESH\n      WRITE( NOUT, FMT = * )\n*\n*     Read names of subroutines and flags which indicate\n*     whether they are to be tested.\n*\n      DO 20 I = 1, NSUBS\n         LTEST( I ) = .FALSE.\n   20 CONTINUE\n   30 READ( NIN, FMT = 9988, END = 60 )SNAMET, LTESTT\n      DO 40 I = 1, NSUBS\n         IF( SNAMET.EQ.SNAMES( I ) )\n     $      GO TO 50\n   40 CONTINUE\n      WRITE( NOUT, FMT = 9990 )SNAMET\n      STOP\n   50 LTEST( I ) = LTESTT\n      GO TO 30\n*\n   60 CONTINUE\n      CLOSE ( NIN )\n*\n*     Compute EPS (the machine precision).\n*\n      EPS = EPSILON(ZERO)\n      WRITE( NOUT, FMT = 9998 )EPS\n*\n*     Check the reliability of DMMCH using exact data.\n*\n      N = MIN( 32, NMAX )\n      DO 100 J = 1, N\n         DO 90 I = 1, N\n            AB( I, J ) = MAX( I - J + 1, 0 )\n   90    CONTINUE\n         AB( J, NMAX + 1 ) = J\n         AB( 1, NMAX + J ) = J\n         C( J, 1 ) = ZERO\n  100 CONTINUE\n      DO 110 J = 1, N\n         CC( J ) = J*( ( J + 1 )*J )/2 - ( ( J + 1 )*J*( J - 1 ) )/3\n  110 CONTINUE\n*     CC holds the exact result. On exit from DMMCH CT holds\n*     the result computed by DMMCH.\n      TRANSA = 'N'\n      TRANSB = 'N'\n      CALL DMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,\n     $            AB( 1, NMAX + 1 ), NMAX, ZERO, C, NMAX, CT, G, CC,\n     $            NMAX, EPS, ERR, FATAL, NOUT, .TRUE. )\n      SAME = LDE( CC, CT, N )\n      IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN\n         WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR\n         STOP\n      END IF\n      TRANSB = 'T'\n      CALL DMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,\n     $            AB( 1, NMAX + 1 ), NMAX, ZERO, C, NMAX, CT, G, CC,\n     $            NMAX, EPS, ERR, FATAL, NOUT, .TRUE. )\n      SAME = LDE( CC, CT, N )\n      IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN\n         WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR\n         STOP\n      END IF\n      DO 120 J = 1, N\n         AB( J, NMAX + 1 ) = N - J + 1\n         AB( 1, NMAX + J ) = N - J + 1\n  120 CONTINUE\n      DO 130 J = 1, N\n         CC( N - J + 1 ) = J*( ( J + 1 )*J )/2 -\n     $                     ( ( J + 1 )*J*( J - 1 ) )/3\n  130 CONTINUE\n      TRANSA = 'T'\n      TRANSB = 'N'\n      CALL DMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,\n     $            AB( 1, NMAX + 1 ), NMAX, ZERO, C, NMAX, CT, G, CC,\n     $            NMAX, EPS, ERR, FATAL, NOUT, .TRUE. )\n      SAME = LDE( CC, CT, N )\n      IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN\n         WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR\n         STOP\n      END IF\n      TRANSB = 'T'\n      CALL DMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,\n     $            AB( 1, NMAX + 1 ), NMAX, ZERO, C, NMAX, CT, G, CC,\n     $            NMAX, EPS, ERR, FATAL, NOUT, .TRUE. )\n      SAME = LDE( CC, CT, N )\n      IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN\n         WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR\n         STOP\n      END IF\n*\n*     Test each subroutine in turn.\n*\n      DO 200 ISNUM = 1, NSUBS\n         WRITE( NOUT, FMT = * )\n         IF( .NOT.LTEST( ISNUM ) )THEN\n*           Subprogram is not to be tested.\n            WRITE( NOUT, FMT = 9987 )SNAMES( ISNUM )\n         ELSE\n            SRNAMT = SNAMES( ISNUM )\n*           Test error exits.\n            IF( TSTERR )THEN\n               CALL DCHKE( ISNUM, SNAMES( ISNUM ), NOUT )\n               WRITE( NOUT, FMT = * )\n            END IF\n*           Test computations.\n            INFOT = 0\n            OK = .TRUE.\n            FATAL = .FALSE.\n            GO TO ( 140, 150, 160, 160, 170, 180 )ISNUM\n*           Test DGEMM, 01.\n  140       CALL DCHK1( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET,\n     $                  NMAX, AB, AA, AS, AB( 1, NMAX + 1 ), BB, BS, C,\n     $                  CC, CS, CT, G )\n            GO TO 190\n*           Test DSYMM, 02.\n  150       CALL DCHK2( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET,\n     $                  NMAX, AB, AA, AS, AB( 1, NMAX + 1 ), BB, BS, C,\n     $                  CC, CS, CT, G )\n            GO TO 190\n*           Test DTRMM, 03, DTRSM, 04.\n  160       CALL DCHK3( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NALF, ALF, NMAX, AB,\n     $                  AA, AS, AB( 1, NMAX + 1 ), BB, BS, CT, G, C )\n            GO TO 190\n*           Test DSYRK, 05.\n  170       CALL DCHK4( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET,\n     $                  NMAX, AB, AA, AS, AB( 1, NMAX + 1 ), BB, BS, C,\n     $                  CC, CS, CT, G )\n            GO TO 190\n*           Test DSYR2K, 06.\n  180       CALL DCHK5( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET,\n     $                  NMAX, AB, AA, AS, BB, BS, C, CC, CS, CT, G, W )\n            GO TO 190\n*\n  190       IF( FATAL.AND.SFATAL )\n     $         GO TO 210\n         END IF\n  200 CONTINUE\n      WRITE( NOUT, FMT = 9986 )\n      GO TO 230\n*\n  210 CONTINUE\n      WRITE( NOUT, FMT = 9985 )\n      GO TO 230\n*\n  220 CONTINUE\n      WRITE( NOUT, FMT = 9991 )\n*\n  230 CONTINUE\n      IF( TRACE )\n     $   CLOSE ( NTRA )\n      CLOSE ( NOUT )\n      STOP\n*\n 9999 FORMAT( ' ROUTINES PASS COMPUTATIONAL TESTS IF TEST RATIO IS LES',\n     $      'S THAN', F8.2 )\n 9998 FORMAT( ' RELATIVE MACHINE PRECISION IS TAKEN TO BE', 1P, D9.1 )\n 9997 FORMAT( ' NUMBER OF VALUES OF ', A, ' IS LESS THAN 1 OR GREATER ',\n     $      'THAN ', I2 )\n 9996 FORMAT( ' VALUE OF N IS LESS THAN 0 OR GREATER THAN ', I2 )\n 9995 FORMAT( ' TESTS OF THE DOUBLE PRECISION LEVEL 3 BLAS', //' THE F',\n     $      'OLLOWING PARAMETER VALUES WILL BE USED:' )\n 9994 FORMAT( '   FOR N              ', 9I6 )\n 9993 FORMAT( '   FOR ALPHA          ', 7F6.1 )\n 9992 FORMAT( '   FOR BETA           ', 7F6.1 )\n 9991 FORMAT( ' AMEND DATA FILE OR INCREASE ARRAY SIZES IN PROGRAM',\n     $      /' ******* TESTS ABANDONED *******' )\n 9990 FORMAT( ' SUBPROGRAM NAME ', A6, ' NOT RECOGNIZED', /' ******* T',\n     $      'ESTS ABANDONED *******' )\n 9989 FORMAT( ' ERROR IN DMMCH -  IN-LINE DOT PRODUCTS ARE BEING EVALU',\n     $      'ATED WRONGLY.', /' DMMCH WAS CALLED WITH TRANSA = ', A1,\n     $      ' AND TRANSB = ', A1, /' AND RETURNED SAME = ', L1, ' AND ',\n     $      'ERR = ', F12.3, '.', /' THIS MAY BE DUE TO FAULTS IN THE ',\n     $      'ARITHMETIC OR THE COMPILER.', /' ******* TESTS ABANDONED ',\n     $      '*******' )\n 9988 FORMAT( A6, L2 )\n 9987 FORMAT( 1X, A6, ' WAS NOT TESTED' )\n 9986 FORMAT( /' END OF TESTS' )\n 9985 FORMAT( /' ******* FATAL ERROR - TESTS ABANDONED *******' )\n 9984 FORMAT( ' ERROR-EXITS WILL NOT BE TESTED' )\n*\n*     End of DBLAT3.\n*\n      END\n      SUBROUTINE DCHK1( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET, NMAX,\n     $                  A, AA, AS, B, BB, BS, C, CC, CS, CT, G )\n*\n*  Tests DGEMM.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Parameters ..\n      DOUBLE PRECISION   ZERO\n      PARAMETER          ( ZERO = 0.0D0 )\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION   EPS, THRESH\n      INTEGER            NALF, NBET, NIDIM, NMAX, NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      DOUBLE PRECISION   A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),\n     $                   AS( NMAX*NMAX ), B( NMAX, NMAX ),\n     $                   BB( NMAX*NMAX ), BET( NBET ), BS( NMAX*NMAX ),\n     $                   C( NMAX, NMAX ), CC( NMAX*NMAX ),\n     $                   CS( NMAX*NMAX ), CT( NMAX ), G( NMAX )\n      INTEGER            IDIM( NIDIM )\n*     .. Local Scalars ..\n      DOUBLE PRECISION   ALPHA, ALS, BETA, BLS, ERR, ERRMAX\n      INTEGER            I, IA, IB, ICA, ICB, IK, IM, IN, K, KS, LAA,\n     $                   LBB, LCC, LDA, LDAS, LDB, LDBS, LDC, LDCS, M,\n     $                   MA, MB, MS, N, NA, NARGS, NB, NC, NS\n      LOGICAL            NULL, RESET, SAME, TRANA, TRANB\n      CHARACTER*1        TRANAS, TRANBS, TRANSA, TRANSB\n      CHARACTER*3        ICH\n*     .. Local Arrays ..\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LDE, LDERES\n      EXTERNAL           LDE, LDERES\n*     .. External Subroutines ..\n      EXTERNAL           DGEMM, DMAKE, DMMCH\n*     .. Intrinsic Functions ..\n      INTRINSIC          MAX\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICH/'NTC'/\n*     .. Executable Statements ..\n*\n      NARGS = 13\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = ZERO\n*\n      DO 110 IM = 1, NIDIM\n         M = IDIM( IM )\n*\n         DO 100 IN = 1, NIDIM\n            N = IDIM( IN )\n*           Set LDC to 1 more than minimum value if room.\n            LDC = M\n            IF( LDC.LT.NMAX )\n     $         LDC = LDC + 1\n*           Skip tests if not enough room.\n            IF( LDC.GT.NMAX )\n     $         GO TO 100\n            LCC = LDC*N\n            NULL = N.LE.0.OR.M.LE.0\n*\n            DO 90 IK = 1, NIDIM\n               K = IDIM( IK )\n*\n               DO 80 ICA = 1, 3\n                  TRANSA = ICH( ICA: ICA )\n                  TRANA = TRANSA.EQ.'T'.OR.TRANSA.EQ.'C'\n*\n                  IF( TRANA )THEN\n                     MA = K\n                     NA = M\n                  ELSE\n                     MA = M\n                     NA = K\n                  END IF\n*                 Set LDA to 1 more than minimum value if room.\n                  LDA = MA\n                  IF( LDA.LT.NMAX )\n     $               LDA = LDA + 1\n*                 Skip tests if not enough room.\n                  IF( LDA.GT.NMAX )\n     $               GO TO 80\n                  LAA = LDA*NA\n*\n*                 Generate the matrix A.\n*\n                  CALL DMAKE( 'GE', ' ', ' ', MA, NA, A, NMAX, AA, LDA,\n     $                        RESET, ZERO )\n*\n                  DO 70 ICB = 1, 3\n                     TRANSB = ICH( ICB: ICB )\n                     TRANB = TRANSB.EQ.'T'.OR.TRANSB.EQ.'C'\n*\n                     IF( TRANB )THEN\n                        MB = N\n                        NB = K\n                     ELSE\n                        MB = K\n                        NB = N\n                     END IF\n*                    Set LDB to 1 more than minimum value if room.\n                     LDB = MB\n                     IF( LDB.LT.NMAX )\n     $                  LDB = LDB + 1\n*                    Skip tests if not enough room.\n                     IF( LDB.GT.NMAX )\n     $                  GO TO 70\n                     LBB = LDB*NB\n*\n*                    Generate the matrix B.\n*\n                     CALL DMAKE( 'GE', ' ', ' ', MB, NB, B, NMAX, BB,\n     $                           LDB, RESET, ZERO )\n*\n                     DO 60 IA = 1, NALF\n                        ALPHA = ALF( IA )\n*\n                        DO 50 IB = 1, NBET\n                           BETA = BET( IB )\n*\n*                          Generate the matrix C.\n*\n                           CALL DMAKE( 'GE', ' ', ' ', M, N, C, NMAX,\n     $                                 CC, LDC, RESET, ZERO )\n*\n                           NC = NC + 1\n*\n*                          Save every datum before calling the\n*                          subroutine.\n*\n                           TRANAS = TRANSA\n                           TRANBS = TRANSB\n                           MS = M\n                           NS = N\n                           KS = K\n                           ALS = ALPHA\n                           DO 10 I = 1, LAA\n                              AS( I ) = AA( I )\n   10                      CONTINUE\n                           LDAS = LDA\n                           DO 20 I = 1, LBB\n                              BS( I ) = BB( I )\n   20                      CONTINUE\n                           LDBS = LDB\n                           BLS = BETA\n                           DO 30 I = 1, LCC\n                              CS( I ) = CC( I )\n   30                      CONTINUE\n                           LDCS = LDC\n*\n*                          Call the subroutine.\n*\n                           IF( TRACE )\n     $                        WRITE( NTRA, FMT = 9995 )NC, SNAME,\n     $                        TRANSA, TRANSB, M, N, K, ALPHA, LDA, LDB,\n     $                        BETA, LDC\n                           IF( REWI )\n     $                        REWIND NTRA\n                           CALL DGEMM( TRANSA, TRANSB, M, N, K, ALPHA,\n     $                                 AA, LDA, BB, LDB, BETA, CC, LDC )\n*\n*                          Check if error-exit was taken incorrectly.\n*\n                           IF( .NOT.OK )THEN\n                              WRITE( NOUT, FMT = 9994 )\n                              FATAL = .TRUE.\n                              GO TO 120\n                           END IF\n*\n*                          See what data changed inside subroutines.\n*\n                           ISAME( 1 ) = TRANSA.EQ.TRANAS\n                           ISAME( 2 ) = TRANSB.EQ.TRANBS\n                           ISAME( 3 ) = MS.EQ.M\n                           ISAME( 4 ) = NS.EQ.N\n                           ISAME( 5 ) = KS.EQ.K\n                           ISAME( 6 ) = ALS.EQ.ALPHA\n                           ISAME( 7 ) = LDE( AS, AA, LAA )\n                           ISAME( 8 ) = LDAS.EQ.LDA\n                           ISAME( 9 ) = LDE( BS, BB, LBB )\n                           ISAME( 10 ) = LDBS.EQ.LDB\n                           ISAME( 11 ) = BLS.EQ.BETA\n                           IF( NULL )THEN\n                              ISAME( 12 ) = LDE( CS, CC, LCC )\n                           ELSE\n                              ISAME( 12 ) = LDERES( 'GE', ' ', M, N, CS,\n     $                                      CC, LDC )\n                           END IF\n                           ISAME( 13 ) = LDCS.EQ.LDC\n*\n*                          If data was incorrectly changed, report\n*                          and return.\n*\n                           SAME = .TRUE.\n                           DO 40 I = 1, NARGS\n                              SAME = SAME.AND.ISAME( I )\n                              IF( .NOT.ISAME( I ) )\n     $                           WRITE( NOUT, FMT = 9998 )I\n   40                      CONTINUE\n                           IF( .NOT.SAME )THEN\n                              FATAL = .TRUE.\n                              GO TO 120\n                           END IF\n*\n                           IF( .NOT.NULL )THEN\n*\n*                             Check the result.\n*\n                              CALL DMMCH( TRANSA, TRANSB, M, N, K,\n     $                                    ALPHA, A, NMAX, B, NMAX, BETA,\n     $                                    C, NMAX, CT, G, CC, LDC, EPS,\n     $                                    ERR, FATAL, NOUT, .TRUE. )\n                              ERRMAX = MAX( ERRMAX, ERR )\n*                             If got really bad answer, report and\n*                             return.\n                              IF( FATAL )\n     $                           GO TO 120\n                           END IF\n*\n   50                   CONTINUE\n*\n   60                CONTINUE\n*\n   70             CONTINUE\n*\n   80          CONTINUE\n*\n   90       CONTINUE\n*\n  100    CONTINUE\n*\n  110 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 130\n*\n  120 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      WRITE( NOUT, FMT = 9995 )NC, SNAME, TRANSA, TRANSB, M, N, K,\n     $   ALPHA, LDA, LDB, BETA, LDC\n*\n  130 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',''', A1, ''',',\n     $      3( I3, ',' ), F4.1, ', A,', I3, ', B,', I3, ',', F4.1, ', ',\n     $      'C,', I3, ').' )\n 9994 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of DCHK1.\n*\n      END\n      SUBROUTINE DCHK2( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET, NMAX,\n     $                  A, AA, AS, B, BB, BS, C, CC, CS, CT, G )\n*\n*  Tests DSYMM.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Parameters ..\n      DOUBLE PRECISION   ZERO\n      PARAMETER          ( ZERO = 0.0D0 )\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION   EPS, THRESH\n      INTEGER            NALF, NBET, NIDIM, NMAX, NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      DOUBLE PRECISION   A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),\n     $                   AS( NMAX*NMAX ), B( NMAX, NMAX ),\n     $                   BB( NMAX*NMAX ), BET( NBET ), BS( NMAX*NMAX ),\n     $                   C( NMAX, NMAX ), CC( NMAX*NMAX ),\n     $                   CS( NMAX*NMAX ), CT( NMAX ), G( NMAX )\n      INTEGER            IDIM( NIDIM )\n*     .. Local Scalars ..\n      DOUBLE PRECISION   ALPHA, ALS, BETA, BLS, ERR, ERRMAX\n      INTEGER            I, IA, IB, ICS, ICU, IM, IN, LAA, LBB, LCC,\n     $                   LDA, LDAS, LDB, LDBS, LDC, LDCS, M, MS, N, NA,\n     $                   NARGS, NC, NS\n      LOGICAL            LEFT, NULL, RESET, SAME\n      CHARACTER*1        SIDE, SIDES, UPLO, UPLOS\n      CHARACTER*2        ICHS, ICHU\n*     .. Local Arrays ..\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LDE, LDERES\n      EXTERNAL           LDE, LDERES\n*     .. External Subroutines ..\n      EXTERNAL           DMAKE, DMMCH, DSYMM\n*     .. Intrinsic Functions ..\n      INTRINSIC          MAX\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICHS/'LR'/, ICHU/'UL'/\n*     .. Executable Statements ..\n*\n      NARGS = 12\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = ZERO\n*\n      DO 100 IM = 1, NIDIM\n         M = IDIM( IM )\n*\n         DO 90 IN = 1, NIDIM\n            N = IDIM( IN )\n*           Set LDC to 1 more than minimum value if room.\n            LDC = M\n            IF( LDC.LT.NMAX )\n     $         LDC = LDC + 1\n*           Skip tests if not enough room.\n            IF( LDC.GT.NMAX )\n     $         GO TO 90\n            LCC = LDC*N\n            NULL = N.LE.0.OR.M.LE.0\n*\n*           Set LDB to 1 more than minimum value if room.\n            LDB = M\n            IF( LDB.LT.NMAX )\n     $         LDB = LDB + 1\n*           Skip tests if not enough room.\n            IF( LDB.GT.NMAX )\n     $         GO TO 90\n            LBB = LDB*N\n*\n*           Generate the matrix B.\n*\n            CALL DMAKE( 'GE', ' ', ' ', M, N, B, NMAX, BB, LDB, RESET,\n     $                  ZERO )\n*\n            DO 80 ICS = 1, 2\n               SIDE = ICHS( ICS: ICS )\n               LEFT = SIDE.EQ.'L'\n*\n               IF( LEFT )THEN\n                  NA = M\n               ELSE\n                  NA = N\n               END IF\n*              Set LDA to 1 more than minimum value if room.\n               LDA = NA\n               IF( LDA.LT.NMAX )\n     $            LDA = LDA + 1\n*              Skip tests if not enough room.\n               IF( LDA.GT.NMAX )\n     $            GO TO 80\n               LAA = LDA*NA\n*\n               DO 70 ICU = 1, 2\n                  UPLO = ICHU( ICU: ICU )\n*\n*                 Generate the symmetric matrix A.\n*\n                  CALL DMAKE( 'SY', UPLO, ' ', NA, NA, A, NMAX, AA, LDA,\n     $                        RESET, ZERO )\n*\n                  DO 60 IA = 1, NALF\n                     ALPHA = ALF( IA )\n*\n                     DO 50 IB = 1, NBET\n                        BETA = BET( IB )\n*\n*                       Generate the matrix C.\n*\n                        CALL DMAKE( 'GE', ' ', ' ', M, N, C, NMAX, CC,\n     $                              LDC, RESET, ZERO )\n*\n                        NC = NC + 1\n*\n*                       Save every datum before calling the\n*                       subroutine.\n*\n                        SIDES = SIDE\n                        UPLOS = UPLO\n                        MS = M\n                        NS = N\n                        ALS = ALPHA\n                        DO 10 I = 1, LAA\n                           AS( I ) = AA( I )\n   10                   CONTINUE\n                        LDAS = LDA\n                        DO 20 I = 1, LBB\n                           BS( I ) = BB( I )\n   20                   CONTINUE\n                        LDBS = LDB\n                        BLS = BETA\n                        DO 30 I = 1, LCC\n                           CS( I ) = CC( I )\n   30                   CONTINUE\n                        LDCS = LDC\n*\n*                       Call the subroutine.\n*\n                        IF( TRACE )\n     $                     WRITE( NTRA, FMT = 9995 )NC, SNAME, SIDE,\n     $                     UPLO, M, N, ALPHA, LDA, LDB, BETA, LDC\n                        IF( REWI )\n     $                     REWIND NTRA\n                        CALL DSYMM( SIDE, UPLO, M, N, ALPHA, AA, LDA,\n     $                              BB, LDB, BETA, CC, LDC )\n*\n*                       Check if error-exit was taken incorrectly.\n*\n                        IF( .NOT.OK )THEN\n                           WRITE( NOUT, FMT = 9994 )\n                           FATAL = .TRUE.\n                           GO TO 110\n                        END IF\n*\n*                       See what data changed inside subroutines.\n*\n                        ISAME( 1 ) = SIDES.EQ.SIDE\n                        ISAME( 2 ) = UPLOS.EQ.UPLO\n                        ISAME( 3 ) = MS.EQ.M\n                        ISAME( 4 ) = NS.EQ.N\n                        ISAME( 5 ) = ALS.EQ.ALPHA\n                        ISAME( 6 ) = LDE( AS, AA, LAA )\n                        ISAME( 7 ) = LDAS.EQ.LDA\n                        ISAME( 8 ) = LDE( BS, BB, LBB )\n                        ISAME( 9 ) = LDBS.EQ.LDB\n                        ISAME( 10 ) = BLS.EQ.BETA\n                        IF( NULL )THEN\n                           ISAME( 11 ) = LDE( CS, CC, LCC )\n                        ELSE\n                           ISAME( 11 ) = LDERES( 'GE', ' ', M, N, CS,\n     $                                   CC, LDC )\n                        END IF\n                        ISAME( 12 ) = LDCS.EQ.LDC\n*\n*                       If data was incorrectly changed, report and\n*                       return.\n*\n                        SAME = .TRUE.\n                        DO 40 I = 1, NARGS\n                           SAME = SAME.AND.ISAME( I )\n                           IF( .NOT.ISAME( I ) )\n     $                        WRITE( NOUT, FMT = 9998 )I\n   40                   CONTINUE\n                        IF( .NOT.SAME )THEN\n                           FATAL = .TRUE.\n                           GO TO 110\n                        END IF\n*\n                        IF( .NOT.NULL )THEN\n*\n*                          Check the result.\n*\n                           IF( LEFT )THEN\n                              CALL DMMCH( 'N', 'N', M, N, M, ALPHA, A,\n     $                                    NMAX, B, NMAX, BETA, C, NMAX,\n     $                                    CT, G, CC, LDC, EPS, ERR,\n     $                                    FATAL, NOUT, .TRUE. )\n                           ELSE\n                              CALL DMMCH( 'N', 'N', M, N, N, ALPHA, B,\n     $                                    NMAX, A, NMAX, BETA, C, NMAX,\n     $                                    CT, G, CC, LDC, EPS, ERR,\n     $                                    FATAL, NOUT, .TRUE. )\n                           END IF\n                           ERRMAX = MAX( ERRMAX, ERR )\n*                          If got really bad answer, report and\n*                          return.\n                           IF( FATAL )\n     $                        GO TO 110\n                        END IF\n*\n   50                CONTINUE\n*\n   60             CONTINUE\n*\n   70          CONTINUE\n*\n   80       CONTINUE\n*\n   90    CONTINUE\n*\n  100 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 120\n*\n  110 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      WRITE( NOUT, FMT = 9995 )NC, SNAME, SIDE, UPLO, M, N, ALPHA, LDA,\n     $   LDB, BETA, LDC\n*\n  120 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( 1X, I6, ': ', A6, '(', 2( '''', A1, ''',' ), 2( I3, ',' ),\n     $      F4.1, ', A,', I3, ', B,', I3, ',', F4.1, ', C,', I3, ')   ',\n     $      ' .' )\n 9994 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of DCHK2.\n*\n      END\n      SUBROUTINE DCHK3( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NALF, ALF, NMAX, A, AA, AS,\n     $                  B, BB, BS, CT, G, C )\n*\n*  Tests DTRMM and DTRSM.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Parameters ..\n      DOUBLE PRECISION   ZERO, ONE\n      PARAMETER          ( ZERO = 0.0D0, ONE = 1.0D0 )\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION   EPS, THRESH\n      INTEGER            NALF, NIDIM, NMAX, NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      DOUBLE PRECISION   A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),\n     $                   AS( NMAX*NMAX ), B( NMAX, NMAX ),\n     $                   BB( NMAX*NMAX ), BS( NMAX*NMAX ),\n     $                   C( NMAX, NMAX ), CT( NMAX ), G( NMAX )\n      INTEGER            IDIM( NIDIM )\n*     .. Local Scalars ..\n      DOUBLE PRECISION   ALPHA, ALS, ERR, ERRMAX\n      INTEGER            I, IA, ICD, ICS, ICT, ICU, IM, IN, J, LAA, LBB,\n     $                   LDA, LDAS, LDB, LDBS, M, MS, N, NA, NARGS, NC,\n     $                   NS\n      LOGICAL            LEFT, NULL, RESET, SAME\n      CHARACTER*1        DIAG, DIAGS, SIDE, SIDES, TRANAS, TRANSA, UPLO,\n     $                   UPLOS\n      CHARACTER*2        ICHD, ICHS, ICHU\n      CHARACTER*3        ICHT\n*     .. Local Arrays ..\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LDE, LDERES\n      EXTERNAL           LDE, LDERES\n*     .. External Subroutines ..\n      EXTERNAL           DMAKE, DMMCH, DTRMM, DTRSM\n*     .. Intrinsic Functions ..\n      INTRINSIC          MAX\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICHU/'UL'/, ICHT/'NTC'/, ICHD/'UN'/, ICHS/'LR'/\n*     .. Executable Statements ..\n*\n      NARGS = 11\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = ZERO\n*     Set up zero matrix for DMMCH.\n      DO 20 J = 1, NMAX\n         DO 10 I = 1, NMAX\n            C( I, J ) = ZERO\n   10    CONTINUE\n   20 CONTINUE\n*\n      DO 140 IM = 1, NIDIM\n         M = IDIM( IM )\n*\n         DO 130 IN = 1, NIDIM\n            N = IDIM( IN )\n*           Set LDB to 1 more than minimum value if room.\n            LDB = M\n            IF( LDB.LT.NMAX )\n     $         LDB = LDB + 1\n*           Skip tests if not enough room.\n            IF( LDB.GT.NMAX )\n     $         GO TO 130\n            LBB = LDB*N\n            NULL = M.LE.0.OR.N.LE.0\n*\n            DO 120 ICS = 1, 2\n               SIDE = ICHS( ICS: ICS )\n               LEFT = SIDE.EQ.'L'\n               IF( LEFT )THEN\n                  NA = M\n               ELSE\n                  NA = N\n               END IF\n*              Set LDA to 1 more than minimum value if room.\n               LDA = NA\n               IF( LDA.LT.NMAX )\n     $            LDA = LDA + 1\n*              Skip tests if not enough room.\n               IF( LDA.GT.NMAX )\n     $            GO TO 130\n               LAA = LDA*NA\n*\n               DO 110 ICU = 1, 2\n                  UPLO = ICHU( ICU: ICU )\n*\n                  DO 100 ICT = 1, 3\n                     TRANSA = ICHT( ICT: ICT )\n*\n                     DO 90 ICD = 1, 2\n                        DIAG = ICHD( ICD: ICD )\n*\n                        DO 80 IA = 1, NALF\n                           ALPHA = ALF( IA )\n*\n*                          Generate the matrix A.\n*\n                           CALL DMAKE( 'TR', UPLO, DIAG, NA, NA, A,\n     $                                 NMAX, AA, LDA, RESET, ZERO )\n*\n*                          Generate the matrix B.\n*\n                           CALL DMAKE( 'GE', ' ', ' ', M, N, B, NMAX,\n     $                                 BB, LDB, RESET, ZERO )\n*\n                           NC = NC + 1\n*\n*                          Save every datum before calling the\n*                          subroutine.\n*\n                           SIDES = SIDE\n                           UPLOS = UPLO\n                           TRANAS = TRANSA\n                           DIAGS = DIAG\n                           MS = M\n                           NS = N\n                           ALS = ALPHA\n                           DO 30 I = 1, LAA\n                              AS( I ) = AA( I )\n   30                      CONTINUE\n                           LDAS = LDA\n                           DO 40 I = 1, LBB\n                              BS( I ) = BB( I )\n   40                      CONTINUE\n                           LDBS = LDB\n*\n*                          Call the subroutine.\n*\n                           IF( SNAME( 4: 5 ).EQ.'MM' )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9995 )NC, SNAME,\n     $                           SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA,\n     $                           LDA, LDB\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL DTRMM( SIDE, UPLO, TRANSA, DIAG, M,\n     $                                    N, ALPHA, AA, LDA, BB, LDB )\n                           ELSE IF( SNAME( 4: 5 ).EQ.'SM' )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9995 )NC, SNAME,\n     $                           SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA,\n     $                           LDA, LDB\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL DTRSM( SIDE, UPLO, TRANSA, DIAG, M,\n     $                                    N, ALPHA, AA, LDA, BB, LDB )\n                           END IF\n*\n*                          Check if error-exit was taken incorrectly.\n*\n                           IF( .NOT.OK )THEN\n                              WRITE( NOUT, FMT = 9994 )\n                              FATAL = .TRUE.\n                              GO TO 150\n                           END IF\n*\n*                          See what data changed inside subroutines.\n*\n                           ISAME( 1 ) = SIDES.EQ.SIDE\n                           ISAME( 2 ) = UPLOS.EQ.UPLO\n                           ISAME( 3 ) = TRANAS.EQ.TRANSA\n                           ISAME( 4 ) = DIAGS.EQ.DIAG\n                           ISAME( 5 ) = MS.EQ.M\n                           ISAME( 6 ) = NS.EQ.N\n                           ISAME( 7 ) = ALS.EQ.ALPHA\n                           ISAME( 8 ) = LDE( AS, AA, LAA )\n                           ISAME( 9 ) = LDAS.EQ.LDA\n                           IF( NULL )THEN\n                              ISAME( 10 ) = LDE( BS, BB, LBB )\n                           ELSE\n                              ISAME( 10 ) = LDERES( 'GE', ' ', M, N, BS,\n     $                                      BB, LDB )\n                           END IF\n                           ISAME( 11 ) = LDBS.EQ.LDB\n*\n*                          If data was incorrectly changed, report and\n*                          return.\n*\n                           SAME = .TRUE.\n                           DO 50 I = 1, NARGS\n                              SAME = SAME.AND.ISAME( I )\n                              IF( .NOT.ISAME( I ) )\n     $                           WRITE( NOUT, FMT = 9998 )I\n   50                      CONTINUE\n                           IF( .NOT.SAME )THEN\n                              FATAL = .TRUE.\n                              GO TO 150\n                           END IF\n*\n                           IF( .NOT.NULL )THEN\n                              IF( SNAME( 4: 5 ).EQ.'MM' )THEN\n*\n*                                Check the result.\n*\n                                 IF( LEFT )THEN\n                                    CALL DMMCH( TRANSA, 'N', M, N, M,\n     $                                          ALPHA, A, NMAX, B, NMAX,\n     $                                          ZERO, C, NMAX, CT, G,\n     $                                          BB, LDB, EPS, ERR,\n     $                                          FATAL, NOUT, .TRUE. )\n                                 ELSE\n                                    CALL DMMCH( 'N', TRANSA, M, N, N,\n     $                                          ALPHA, B, NMAX, A, NMAX,\n     $                                          ZERO, C, NMAX, CT, G,\n     $                                          BB, LDB, EPS, ERR,\n     $                                          FATAL, NOUT, .TRUE. )\n                                 END IF\n                              ELSE IF( SNAME( 4: 5 ).EQ.'SM' )THEN\n*\n*                                Compute approximation to original\n*                                matrix.\n*\n                                 DO 70 J = 1, N\n                                    DO 60 I = 1, M\n                                       C( I, J ) = BB( I + ( J - 1 )*\n     $                                             LDB )\n                                       BB( I + ( J - 1 )*LDB ) = ALPHA*\n     $                                    B( I, J )\n   60                               CONTINUE\n   70                            CONTINUE\n*\n                                 IF( LEFT )THEN\n                                    CALL DMMCH( TRANSA, 'N', M, N, M,\n     $                                          ONE, A, NMAX, C, NMAX,\n     $                                          ZERO, B, NMAX, CT, G,\n     $                                          BB, LDB, EPS, ERR,\n     $                                          FATAL, NOUT, .FALSE. )\n                                 ELSE\n                                    CALL DMMCH( 'N', TRANSA, M, N, N,\n     $                                          ONE, C, NMAX, A, NMAX,\n     $                                          ZERO, B, NMAX, CT, G,\n     $                                          BB, LDB, EPS, ERR,\n     $                                          FATAL, NOUT, .FALSE. )\n                                 END IF\n                              END IF\n                              ERRMAX = MAX( ERRMAX, ERR )\n*                             If got really bad answer, report and\n*                             return.\n                              IF( FATAL )\n     $                           GO TO 150\n                           END IF\n*\n   80                   CONTINUE\n*\n   90                CONTINUE\n*\n  100             CONTINUE\n*\n  110          CONTINUE\n*\n  120       CONTINUE\n*\n  130    CONTINUE\n*\n  140 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 160\n*\n  150 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      WRITE( NOUT, FMT = 9995 )NC, SNAME, SIDE, UPLO, TRANSA, DIAG, M,\n     $   N, ALPHA, LDA, LDB\n*\n  160 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( 1X, I6, ': ', A6, '(', 4( '''', A1, ''',' ), 2( I3, ',' ),\n     $      F4.1, ', A,', I3, ', B,', I3, ')        .' )\n 9994 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of DCHK3.\n*\n      END\n      SUBROUTINE DCHK4( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET, NMAX,\n     $                  A, AA, AS, B, BB, BS, C, CC, CS, CT, G )\n*\n*  Tests DSYRK.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Parameters ..\n      DOUBLE PRECISION   ZERO\n      PARAMETER          ( ZERO = 0.0D0 )\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION   EPS, THRESH\n      INTEGER            NALF, NBET, NIDIM, NMAX, NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      DOUBLE PRECISION   A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),\n     $                   AS( NMAX*NMAX ), B( NMAX, NMAX ),\n     $                   BB( NMAX*NMAX ), BET( NBET ), BS( NMAX*NMAX ),\n     $                   C( NMAX, NMAX ), CC( NMAX*NMAX ),\n     $                   CS( NMAX*NMAX ), CT( NMAX ), G( NMAX )\n      INTEGER            IDIM( NIDIM )\n*     .. Local Scalars ..\n      DOUBLE PRECISION   ALPHA, ALS, BETA, BETS, ERR, ERRMAX\n      INTEGER            I, IA, IB, ICT, ICU, IK, IN, J, JC, JJ, K, KS,\n     $                   LAA, LCC, LDA, LDAS, LDC, LDCS, LJ, MA, N, NA,\n     $                   NARGS, NC, NS\n      LOGICAL            NULL, RESET, SAME, TRAN, UPPER\n      CHARACTER*1        TRANS, TRANSS, UPLO, UPLOS\n      CHARACTER*2        ICHU\n      CHARACTER*3        ICHT\n*     .. Local Arrays ..\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LDE, LDERES\n      EXTERNAL           LDE, LDERES\n*     .. External Subroutines ..\n      EXTERNAL           DMAKE, DMMCH, DSYRK\n*     .. Intrinsic Functions ..\n      INTRINSIC          MAX\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICHT/'NTC'/, ICHU/'UL'/\n*     .. Executable Statements ..\n*\n      NARGS = 10\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = ZERO\n*\n      DO 100 IN = 1, NIDIM\n         N = IDIM( IN )\n*        Set LDC to 1 more than minimum value if room.\n         LDC = N\n         IF( LDC.LT.NMAX )\n     $      LDC = LDC + 1\n*        Skip tests if not enough room.\n         IF( LDC.GT.NMAX )\n     $      GO TO 100\n         LCC = LDC*N\n         NULL = N.LE.0\n*\n         DO 90 IK = 1, NIDIM\n            K = IDIM( IK )\n*\n            DO 80 ICT = 1, 3\n               TRANS = ICHT( ICT: ICT )\n               TRAN = TRANS.EQ.'T'.OR.TRANS.EQ.'C'\n               IF( TRAN )THEN\n                  MA = K\n                  NA = N\n               ELSE\n                  MA = N\n                  NA = K\n               END IF\n*              Set LDA to 1 more than minimum value if room.\n               LDA = MA\n               IF( LDA.LT.NMAX )\n     $            LDA = LDA + 1\n*              Skip tests if not enough room.\n               IF( LDA.GT.NMAX )\n     $            GO TO 80\n               LAA = LDA*NA\n*\n*              Generate the matrix A.\n*\n               CALL DMAKE( 'GE', ' ', ' ', MA, NA, A, NMAX, AA, LDA,\n     $                     RESET, ZERO )\n*\n               DO 70 ICU = 1, 2\n                  UPLO = ICHU( ICU: ICU )\n                  UPPER = UPLO.EQ.'U'\n*\n                  DO 60 IA = 1, NALF\n                     ALPHA = ALF( IA )\n*\n                     DO 50 IB = 1, NBET\n                        BETA = BET( IB )\n*\n*                       Generate the matrix C.\n*\n                        CALL DMAKE( 'SY', UPLO, ' ', N, N, C, NMAX, CC,\n     $                              LDC, RESET, ZERO )\n*\n                        NC = NC + 1\n*\n*                       Save every datum before calling the subroutine.\n*\n                        UPLOS = UPLO\n                        TRANSS = TRANS\n                        NS = N\n                        KS = K\n                        ALS = ALPHA\n                        DO 10 I = 1, LAA\n                           AS( I ) = AA( I )\n   10                   CONTINUE\n                        LDAS = LDA\n                        BETS = BETA\n                        DO 20 I = 1, LCC\n                           CS( I ) = CC( I )\n   20                   CONTINUE\n                        LDCS = LDC\n*\n*                       Call the subroutine.\n*\n                        IF( TRACE )\n     $                     WRITE( NTRA, FMT = 9994 )NC, SNAME, UPLO,\n     $                     TRANS, N, K, ALPHA, LDA, BETA, LDC\n                        IF( REWI )\n     $                     REWIND NTRA\n                        CALL DSYRK( UPLO, TRANS, N, K, ALPHA, AA, LDA,\n     $                              BETA, CC, LDC )\n*\n*                       Check if error-exit was taken incorrectly.\n*\n                        IF( .NOT.OK )THEN\n                           WRITE( NOUT, FMT = 9993 )\n                           FATAL = .TRUE.\n                           GO TO 120\n                        END IF\n*\n*                       See what data changed inside subroutines.\n*\n                        ISAME( 1 ) = UPLOS.EQ.UPLO\n                        ISAME( 2 ) = TRANSS.EQ.TRANS\n                        ISAME( 3 ) = NS.EQ.N\n                        ISAME( 4 ) = KS.EQ.K\n                        ISAME( 5 ) = ALS.EQ.ALPHA\n                        ISAME( 6 ) = LDE( AS, AA, LAA )\n                        ISAME( 7 ) = LDAS.EQ.LDA\n                        ISAME( 8 ) = BETS.EQ.BETA\n                        IF( NULL )THEN\n                           ISAME( 9 ) = LDE( CS, CC, LCC )\n                        ELSE\n                           ISAME( 9 ) = LDERES( 'SY', UPLO, N, N, CS,\n     $                                  CC, LDC )\n                        END IF\n                        ISAME( 10 ) = LDCS.EQ.LDC\n*\n*                       If data was incorrectly changed, report and\n*                       return.\n*\n                        SAME = .TRUE.\n                        DO 30 I = 1, NARGS\n                           SAME = SAME.AND.ISAME( I )\n                           IF( .NOT.ISAME( I ) )\n     $                        WRITE( NOUT, FMT = 9998 )I\n   30                   CONTINUE\n                        IF( .NOT.SAME )THEN\n                           FATAL = .TRUE.\n                           GO TO 120\n                        END IF\n*\n                        IF( .NOT.NULL )THEN\n*\n*                          Check the result column by column.\n*\n                           JC = 1\n                           DO 40 J = 1, N\n                              IF( UPPER )THEN\n                                 JJ = 1\n                                 LJ = J\n                              ELSE\n                                 JJ = J\n                                 LJ = N - J + 1\n                              END IF\n                              IF( TRAN )THEN\n                                 CALL DMMCH( 'T', 'N', LJ, 1, K, ALPHA,\n     $                                       A( 1, JJ ), NMAX,\n     $                                       A( 1, J ), NMAX, BETA,\n     $                                       C( JJ, J ), NMAX, CT, G,\n     $                                       CC( JC ), LDC, EPS, ERR,\n     $                                       FATAL, NOUT, .TRUE. )\n                              ELSE\n                                 CALL DMMCH( 'N', 'T', LJ, 1, K, ALPHA,\n     $                                       A( JJ, 1 ), NMAX,\n     $                                       A( J, 1 ), NMAX, BETA,\n     $                                       C( JJ, J ), NMAX, CT, G,\n     $                                       CC( JC ), LDC, EPS, ERR,\n     $                                       FATAL, NOUT, .TRUE. )\n                              END IF\n                              IF( UPPER )THEN\n                                 JC = JC + LDC\n                              ELSE\n                                 JC = JC + LDC + 1\n                              END IF\n                              ERRMAX = MAX( ERRMAX, ERR )\n*                             If got really bad answer, report and\n*                             return.\n                              IF( FATAL )\n     $                           GO TO 110\n   40                      CONTINUE\n                        END IF\n*\n   50                CONTINUE\n*\n   60             CONTINUE\n*\n   70          CONTINUE\n*\n   80       CONTINUE\n*\n   90    CONTINUE\n*\n  100 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 130\n*\n  110 CONTINUE\n      IF( N.GT.1 )\n     $   WRITE( NOUT, FMT = 9995 )J\n*\n  120 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      WRITE( NOUT, FMT = 9994 )NC, SNAME, UPLO, TRANS, N, K, ALPHA,\n     $   LDA, BETA, LDC\n*\n  130 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( '      THESE ARE THE RESULTS FOR COLUMN ', I3 )\n 9994 FORMAT( 1X, I6, ': ', A6, '(', 2( '''', A1, ''',' ), 2( I3, ',' ),\n     $      F4.1, ', A,', I3, ',', F4.1, ', C,', I3, ')           .' )\n 9993 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of DCHK4.\n*\n      END\n      SUBROUTINE DCHK5( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET, NMAX,\n     $                  AB, AA, AS, BB, BS, C, CC, CS, CT, G, W )\n*\n*  Tests DSYR2K.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Parameters ..\n      DOUBLE PRECISION   ZERO\n      PARAMETER          ( ZERO = 0.0D0 )\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION   EPS, THRESH\n      INTEGER            NALF, NBET, NIDIM, NMAX, NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      DOUBLE PRECISION   AA( NMAX*NMAX ), AB( 2*NMAX*NMAX ),\n     $                   ALF( NALF ), AS( NMAX*NMAX ), BB( NMAX*NMAX ),\n     $                   BET( NBET ), BS( NMAX*NMAX ), C( NMAX, NMAX ),\n     $                   CC( NMAX*NMAX ), CS( NMAX*NMAX ), CT( NMAX ),\n     $                   G( NMAX ), W( 2*NMAX )\n      INTEGER            IDIM( NIDIM )\n*     .. Local Scalars ..\n      DOUBLE PRECISION   ALPHA, ALS, BETA, BETS, ERR, ERRMAX\n      INTEGER            I, IA, IB, ICT, ICU, IK, IN, J, JC, JJ, JJAB,\n     $                   K, KS, LAA, LBB, LCC, LDA, LDAS, LDB, LDBS,\n     $                   LDC, LDCS, LJ, MA, N, NA, NARGS, NC, NS\n      LOGICAL            NULL, RESET, SAME, TRAN, UPPER\n      CHARACTER*1        TRANS, TRANSS, UPLO, UPLOS\n      CHARACTER*2        ICHU\n      CHARACTER*3        ICHT\n*     .. Local Arrays ..\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LDE, LDERES\n      EXTERNAL           LDE, LDERES\n*     .. External Subroutines ..\n      EXTERNAL           DMAKE, DMMCH, DSYR2K\n*     .. Intrinsic Functions ..\n      INTRINSIC          MAX\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICHT/'NTC'/, ICHU/'UL'/\n*     .. Executable Statements ..\n*\n      NARGS = 12\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = ZERO\n*\n      DO 130 IN = 1, NIDIM\n         N = IDIM( IN )\n*        Set LDC to 1 more than minimum value if room.\n         LDC = N\n         IF( LDC.LT.NMAX )\n     $      LDC = LDC + 1\n*        Skip tests if not enough room.\n         IF( LDC.GT.NMAX )\n     $      GO TO 130\n         LCC = LDC*N\n         NULL = N.LE.0\n*\n         DO 120 IK = 1, NIDIM\n            K = IDIM( IK )\n*\n            DO 110 ICT = 1, 3\n               TRANS = ICHT( ICT: ICT )\n               TRAN = TRANS.EQ.'T'.OR.TRANS.EQ.'C'\n               IF( TRAN )THEN\n                  MA = K\n                  NA = N\n               ELSE\n                  MA = N\n                  NA = K\n               END IF\n*              Set LDA to 1 more than minimum value if room.\n               LDA = MA\n               IF( LDA.LT.NMAX )\n     $            LDA = LDA + 1\n*              Skip tests if not enough room.\n               IF( LDA.GT.NMAX )\n     $            GO TO 110\n               LAA = LDA*NA\n*\n*              Generate the matrix A.\n*\n               IF( TRAN )THEN\n                  CALL DMAKE( 'GE', ' ', ' ', MA, NA, AB, 2*NMAX, AA,\n     $                        LDA, RESET, ZERO )\n               ELSE\n                  CALL DMAKE( 'GE', ' ', ' ', MA, NA, AB, NMAX, AA, LDA,\n     $                        RESET, ZERO )\n               END IF\n*\n*              Generate the matrix B.\n*\n               LDB = LDA\n               LBB = LAA\n               IF( TRAN )THEN\n                  CALL DMAKE( 'GE', ' ', ' ', MA, NA, AB( K + 1 ),\n     $                        2*NMAX, BB, LDB, RESET, ZERO )\n               ELSE\n                  CALL DMAKE( 'GE', ' ', ' ', MA, NA, AB( K*NMAX + 1 ),\n     $                        NMAX, BB, LDB, RESET, ZERO )\n               END IF\n*\n               DO 100 ICU = 1, 2\n                  UPLO = ICHU( ICU: ICU )\n                  UPPER = UPLO.EQ.'U'\n*\n                  DO 90 IA = 1, NALF\n                     ALPHA = ALF( IA )\n*\n                     DO 80 IB = 1, NBET\n                        BETA = BET( IB )\n*\n*                       Generate the matrix C.\n*\n                        CALL DMAKE( 'SY', UPLO, ' ', N, N, C, NMAX, CC,\n     $                              LDC, RESET, ZERO )\n*\n                        NC = NC + 1\n*\n*                       Save every datum before calling the subroutine.\n*\n                        UPLOS = UPLO\n                        TRANSS = TRANS\n                        NS = N\n                        KS = K\n                        ALS = ALPHA\n                        DO 10 I = 1, LAA\n                           AS( I ) = AA( I )\n   10                   CONTINUE\n                        LDAS = LDA\n                        DO 20 I = 1, LBB\n                           BS( I ) = BB( I )\n   20                   CONTINUE\n                        LDBS = LDB\n                        BETS = BETA\n                        DO 30 I = 1, LCC\n                           CS( I ) = CC( I )\n   30                   CONTINUE\n                        LDCS = LDC\n*\n*                       Call the subroutine.\n*\n                        IF( TRACE )\n     $                     WRITE( NTRA, FMT = 9994 )NC, SNAME, UPLO,\n     $                     TRANS, N, K, ALPHA, LDA, LDB, BETA, LDC\n                        IF( REWI )\n     $                     REWIND NTRA\n                        CALL DSYR2K( UPLO, TRANS, N, K, ALPHA, AA, LDA,\n     $                               BB, LDB, BETA, CC, LDC )\n*\n*                       Check if error-exit was taken incorrectly.\n*\n                        IF( .NOT.OK )THEN\n                           WRITE( NOUT, FMT = 9993 )\n                           FATAL = .TRUE.\n                           GO TO 150\n                        END IF\n*\n*                       See what data changed inside subroutines.\n*\n                        ISAME( 1 ) = UPLOS.EQ.UPLO\n                        ISAME( 2 ) = TRANSS.EQ.TRANS\n                        ISAME( 3 ) = NS.EQ.N\n                        ISAME( 4 ) = KS.EQ.K\n                        ISAME( 5 ) = ALS.EQ.ALPHA\n                        ISAME( 6 ) = LDE( AS, AA, LAA )\n                        ISAME( 7 ) = LDAS.EQ.LDA\n                        ISAME( 8 ) = LDE( BS, BB, LBB )\n                        ISAME( 9 ) = LDBS.EQ.LDB\n                        ISAME( 10 ) = BETS.EQ.BETA\n                        IF( NULL )THEN\n                           ISAME( 11 ) = LDE( CS, CC, LCC )\n                        ELSE\n                           ISAME( 11 ) = LDERES( 'SY', UPLO, N, N, CS,\n     $                                   CC, LDC )\n                        END IF\n                        ISAME( 12 ) = LDCS.EQ.LDC\n*\n*                       If data was incorrectly changed, report and\n*                       return.\n*\n                        SAME = .TRUE.\n                        DO 40 I = 1, NARGS\n                           SAME = SAME.AND.ISAME( I )\n                           IF( .NOT.ISAME( I ) )\n     $                        WRITE( NOUT, FMT = 9998 )I\n   40                   CONTINUE\n                        IF( .NOT.SAME )THEN\n                           FATAL = .TRUE.\n                           GO TO 150\n                        END IF\n*\n                        IF( .NOT.NULL )THEN\n*\n*                          Check the result column by column.\n*\n                           JJAB = 1\n                           JC = 1\n                           DO 70 J = 1, N\n                              IF( UPPER )THEN\n                                 JJ = 1\n                                 LJ = J\n                              ELSE\n                                 JJ = J\n                                 LJ = N - J + 1\n                              END IF\n                              IF( TRAN )THEN\n                                 DO 50 I = 1, K\n                                    W( I ) = AB( ( J - 1 )*2*NMAX + K +\n     $                                       I )\n                                    W( K + I ) = AB( ( J - 1 )*2*NMAX +\n     $                                           I )\n   50                            CONTINUE\n                                 CALL DMMCH( 'T', 'N', LJ, 1, 2*K,\n     $                                       ALPHA, AB( JJAB ), 2*NMAX,\n     $                                       W, 2*NMAX, BETA,\n     $                                       C( JJ, J ), NMAX, CT, G,\n     $                                       CC( JC ), LDC, EPS, ERR,\n     $                                       FATAL, NOUT, .TRUE. )\n                              ELSE\n                                 DO 60 I = 1, K\n                                    W( I ) = AB( ( K + I - 1 )*NMAX +\n     $                                       J )\n                                    W( K + I ) = AB( ( I - 1 )*NMAX +\n     $                                           J )\n   60                            CONTINUE\n                                 CALL DMMCH( 'N', 'N', LJ, 1, 2*K,\n     $                                       ALPHA, AB( JJ ), NMAX, W,\n     $                                       2*NMAX, BETA, C( JJ, J ),\n     $                                       NMAX, CT, G, CC( JC ), LDC,\n     $                                       EPS, ERR, FATAL, NOUT,\n     $                                       .TRUE. )\n                              END IF\n                              IF( UPPER )THEN\n                                 JC = JC + LDC\n                              ELSE\n                                 JC = JC + LDC + 1\n                                 IF( TRAN )\n     $                              JJAB = JJAB + 2*NMAX\n                              END IF\n                              ERRMAX = MAX( ERRMAX, ERR )\n*                             If got really bad answer, report and\n*                             return.\n                              IF( FATAL )\n     $                           GO TO 140\n   70                      CONTINUE\n                        END IF\n*\n   80                CONTINUE\n*\n   90             CONTINUE\n*\n  100          CONTINUE\n*\n  110       CONTINUE\n*\n  120    CONTINUE\n*\n  130 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 160\n*\n  140 CONTINUE\n      IF( N.GT.1 )\n     $   WRITE( NOUT, FMT = 9995 )J\n*\n  150 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      WRITE( NOUT, FMT = 9994 )NC, SNAME, UPLO, TRANS, N, K, ALPHA,\n     $   LDA, LDB, BETA, LDC\n*\n  160 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( '      THESE ARE THE RESULTS FOR COLUMN ', I3 )\n 9994 FORMAT( 1X, I6, ': ', A6, '(', 2( '''', A1, ''',' ), 2( I3, ',' ),\n     $      F4.1, ', A,', I3, ', B,', I3, ',', F4.1, ', C,', I3, ')   ',\n     $      ' .' )\n 9993 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of DCHK5.\n*\n      END\n      SUBROUTINE DCHKE( ISNUM, SRNAMT, NOUT )\n*\n*  Tests the error exits from the Level 3 Blas.\n*  Requires a special version of the error-handling routine XERBLA.\n*  A, B and C should not need to be defined.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*  3-19-92:  Initialize ALPHA and BETA  (eca)\n*  3-19-92:  Fix argument 12 in calls to SSYMM with INFOT = 9  (eca)\n*\n*     .. Scalar Arguments ..\n      INTEGER            ISNUM, NOUT\n      CHARACTER*6        SRNAMT\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Parameters ..\n      DOUBLE PRECISION   ONE, TWO\n      PARAMETER          ( ONE = 1.0D0, TWO = 2.0D0 )\n*     .. Local Scalars ..\n      DOUBLE PRECISION   ALPHA, BETA\n*     .. Local Arrays ..\n      DOUBLE PRECISION   A( 2, 1 ), B( 2, 1 ), C( 2, 1 )\n*     .. External Subroutines ..\n      EXTERNAL           CHKXER, DGEMM, DSYMM, DSYR2K, DSYRK, DTRMM,\n     $                   DTRSM\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Executable Statements ..\n*     OK is set to .FALSE. by the special version of XERBLA or by CHKXER\n*     if anything is wrong.\n      OK = .TRUE.\n*     LERR is set to .TRUE. by the special version of XERBLA each time\n*     it is called, and is then tested and re-set by CHKXER.\n      LERR = .FALSE.\n*\n*     Initialize ALPHA and BETA.\n*\n      ALPHA = ONE\n      BETA = TWO\n*\n      GO TO ( 10, 20, 30, 40, 50, 60 )ISNUM\n   10 INFOT = 1\n      CALL DGEMM( '/', 'N', 0, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 1\n      CALL DGEMM( '/', 'T', 0, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL DGEMM( 'N', '/', 0, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL DGEMM( 'T', '/', 0, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL DGEMM( 'N', 'N', -1, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL DGEMM( 'N', 'T', -1, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL DGEMM( 'T', 'N', -1, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL DGEMM( 'T', 'T', -1, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL DGEMM( 'N', 'N', 0, -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL DGEMM( 'N', 'T', 0, -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL DGEMM( 'T', 'N', 0, -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL DGEMM( 'T', 'T', 0, -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL DGEMM( 'N', 'N', 0, 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL DGEMM( 'N', 'T', 0, 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL DGEMM( 'T', 'N', 0, 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL DGEMM( 'T', 'T', 0, 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL DGEMM( 'N', 'N', 2, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL DGEMM( 'N', 'T', 2, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL DGEMM( 'T', 'N', 0, 0, 2, ALPHA, A, 1, B, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL DGEMM( 'T', 'T', 0, 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL DGEMM( 'N', 'N', 0, 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL DGEMM( 'T', 'N', 0, 0, 2, ALPHA, A, 2, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL DGEMM( 'N', 'T', 0, 2, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL DGEMM( 'T', 'T', 0, 2, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 13\n      CALL DGEMM( 'N', 'N', 2, 0, 0, ALPHA, A, 2, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 13\n      CALL DGEMM( 'N', 'T', 2, 0, 0, ALPHA, A, 2, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 13\n      CALL DGEMM( 'T', 'N', 2, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 13\n      CALL DGEMM( 'T', 'T', 2, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 70\n   20 INFOT = 1\n      CALL DSYMM( '/', 'U', 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL DSYMM( 'L', '/', 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL DSYMM( 'L', 'U', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL DSYMM( 'R', 'U', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL DSYMM( 'L', 'L', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL DSYMM( 'R', 'L', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL DSYMM( 'L', 'U', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL DSYMM( 'R', 'U', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL DSYMM( 'L', 'L', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL DSYMM( 'R', 'L', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL DSYMM( 'L', 'U', 2, 0, ALPHA, A, 1, B, 2, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL DSYMM( 'R', 'U', 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL DSYMM( 'L', 'L', 2, 0, ALPHA, A, 1, B, 2, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL DSYMM( 'R', 'L', 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL DSYMM( 'L', 'U', 2, 0, ALPHA, A, 2, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL DSYMM( 'R', 'U', 2, 0, ALPHA, A, 1, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL DSYMM( 'L', 'L', 2, 0, ALPHA, A, 2, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL DSYMM( 'R', 'L', 2, 0, ALPHA, A, 1, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL DSYMM( 'L', 'U', 2, 0, ALPHA, A, 2, B, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL DSYMM( 'R', 'U', 2, 0, ALPHA, A, 1, B, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL DSYMM( 'L', 'L', 2, 0, ALPHA, A, 2, B, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL DSYMM( 'R', 'L', 2, 0, ALPHA, A, 1, B, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 70\n   30 INFOT = 1\n      CALL DTRMM( '/', 'U', 'N', 'N', 0, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL DTRMM( 'L', '/', 'N', 'N', 0, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL DTRMM( 'L', 'U', '/', 'N', 0, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL DTRMM( 'L', 'U', 'N', '/', 0, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL DTRMM( 'L', 'U', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL DTRMM( 'L', 'U', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL DTRMM( 'R', 'U', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL DTRMM( 'R', 'U', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL DTRMM( 'L', 'L', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL DTRMM( 'L', 'L', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL DTRMM( 'R', 'L', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL DTRMM( 'R', 'L', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL DTRMM( 'L', 'U', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL DTRMM( 'L', 'U', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL DTRMM( 'R', 'U', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL DTRMM( 'R', 'U', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL DTRMM( 'L', 'L', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL DTRMM( 'L', 'L', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL DTRMM( 'R', 'L', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL DTRMM( 'R', 'L', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL DTRMM( 'L', 'U', 'N', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL DTRMM( 'L', 'U', 'T', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL DTRMM( 'R', 'U', 'N', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL DTRMM( 'R', 'U', 'T', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL DTRMM( 'L', 'L', 'N', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL DTRMM( 'L', 'L', 'T', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL DTRMM( 'R', 'L', 'N', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL DTRMM( 'R', 'L', 'T', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL DTRMM( 'L', 'U', 'N', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL DTRMM( 'L', 'U', 'T', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL DTRMM( 'R', 'U', 'N', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL DTRMM( 'R', 'U', 'T', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL DTRMM( 'L', 'L', 'N', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL DTRMM( 'L', 'L', 'T', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL DTRMM( 'R', 'L', 'N', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL DTRMM( 'R', 'L', 'T', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 70\n   40 INFOT = 1\n      CALL DTRSM( '/', 'U', 'N', 'N', 0, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL DTRSM( 'L', '/', 'N', 'N', 0, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL DTRSM( 'L', 'U', '/', 'N', 0, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL DTRSM( 'L', 'U', 'N', '/', 0, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL DTRSM( 'L', 'U', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL DTRSM( 'L', 'U', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL DTRSM( 'R', 'U', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL DTRSM( 'R', 'U', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL DTRSM( 'L', 'L', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL DTRSM( 'L', 'L', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL DTRSM( 'R', 'L', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL DTRSM( 'R', 'L', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL DTRSM( 'L', 'U', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL DTRSM( 'L', 'U', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL DTRSM( 'R', 'U', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL DTRSM( 'R', 'U', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL DTRSM( 'L', 'L', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL DTRSM( 'L', 'L', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL DTRSM( 'R', 'L', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL DTRSM( 'R', 'L', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL DTRSM( 'L', 'U', 'N', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL DTRSM( 'L', 'U', 'T', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL DTRSM( 'R', 'U', 'N', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL DTRSM( 'R', 'U', 'T', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL DTRSM( 'L', 'L', 'N', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL DTRSM( 'L', 'L', 'T', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL DTRSM( 'R', 'L', 'N', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL DTRSM( 'R', 'L', 'T', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL DTRSM( 'L', 'U', 'N', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL DTRSM( 'L', 'U', 'T', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL DTRSM( 'R', 'U', 'N', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL DTRSM( 'R', 'U', 'T', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL DTRSM( 'L', 'L', 'N', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL DTRSM( 'L', 'L', 'T', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL DTRSM( 'R', 'L', 'N', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL DTRSM( 'R', 'L', 'T', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 70\n   50 INFOT = 1\n      CALL DSYRK( '/', 'N', 0, 0, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL DSYRK( 'U', '/', 0, 0, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL DSYRK( 'U', 'N', -1, 0, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL DSYRK( 'U', 'T', -1, 0, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL DSYRK( 'L', 'N', -1, 0, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL DSYRK( 'L', 'T', -1, 0, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL DSYRK( 'U', 'N', 0, -1, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL DSYRK( 'U', 'T', 0, -1, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL DSYRK( 'L', 'N', 0, -1, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL DSYRK( 'L', 'T', 0, -1, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL DSYRK( 'U', 'N', 2, 0, ALPHA, A, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL DSYRK( 'U', 'T', 0, 2, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL DSYRK( 'L', 'N', 2, 0, ALPHA, A, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL DSYRK( 'L', 'T', 0, 2, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL DSYRK( 'U', 'N', 2, 0, ALPHA, A, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL DSYRK( 'U', 'T', 2, 0, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL DSYRK( 'L', 'N', 2, 0, ALPHA, A, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL DSYRK( 'L', 'T', 2, 0, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 70\n   60 INFOT = 1\n      CALL DSYR2K( '/', 'N', 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL DSYR2K( 'U', '/', 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL DSYR2K( 'U', 'N', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL DSYR2K( 'U', 'T', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL DSYR2K( 'L', 'N', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL DSYR2K( 'L', 'T', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL DSYR2K( 'U', 'N', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL DSYR2K( 'U', 'T', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL DSYR2K( 'L', 'N', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL DSYR2K( 'L', 'T', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL DSYR2K( 'U', 'N', 2, 0, ALPHA, A, 1, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL DSYR2K( 'U', 'T', 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL DSYR2K( 'L', 'N', 2, 0, ALPHA, A, 1, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL DSYR2K( 'L', 'T', 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL DSYR2K( 'U', 'N', 2, 0, ALPHA, A, 2, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL DSYR2K( 'U', 'T', 0, 2, ALPHA, A, 2, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL DSYR2K( 'L', 'N', 2, 0, ALPHA, A, 2, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL DSYR2K( 'L', 'T', 0, 2, ALPHA, A, 2, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL DSYR2K( 'U', 'N', 2, 0, ALPHA, A, 2, B, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL DSYR2K( 'U', 'T', 2, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL DSYR2K( 'L', 'N', 2, 0, ALPHA, A, 2, B, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL DSYR2K( 'L', 'T', 2, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n*\n   70 IF( OK )THEN\n         WRITE( NOUT, FMT = 9999 )SRNAMT\n      ELSE\n         WRITE( NOUT, FMT = 9998 )SRNAMT\n      END IF\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE TESTS OF ERROR-EXITS' )\n 9998 FORMAT( ' ******* ', A6, ' FAILED THE TESTS OF ERROR-EXITS *****',\n     $      '**' )\n*\n*     End of DCHKE.\n*\n      END\n      SUBROUTINE DMAKE( TYPE, UPLO, DIAG, M, N, A, NMAX, AA, LDA, RESET,\n     $                  TRANSL )\n*\n*  Generates values for an M by N matrix A.\n*  Stores the values in the array AA in the data structure required\n*  by the routine, with unwanted elements set to rogue value.\n*\n*  TYPE is 'GE', 'SY' or 'TR'.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Parameters ..\n      DOUBLE PRECISION   ZERO, ONE\n      PARAMETER          ( ZERO = 0.0D0, ONE = 1.0D0 )\n      DOUBLE PRECISION   ROGUE\n      PARAMETER          ( ROGUE = -1.0D10 )\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION   TRANSL\n      INTEGER            LDA, M, N, NMAX\n      LOGICAL            RESET\n      CHARACTER*1        DIAG, UPLO\n      CHARACTER*2        TYPE\n*     .. Array Arguments ..\n      DOUBLE PRECISION   A( NMAX, * ), AA( * )\n*     .. Local Scalars ..\n      INTEGER            I, IBEG, IEND, J\n      LOGICAL            GEN, LOWER, SYM, TRI, UNIT, UPPER\n*     .. External Functions ..\n      DOUBLE PRECISION   DBEG\n      EXTERNAL           DBEG\n*     .. Executable Statements ..\n      GEN = TYPE.EQ.'GE'\n      SYM = TYPE.EQ.'SY'\n      TRI = TYPE.EQ.'TR'\n      UPPER = ( SYM.OR.TRI ).AND.UPLO.EQ.'U'\n      LOWER = ( SYM.OR.TRI ).AND.UPLO.EQ.'L'\n      UNIT = TRI.AND.DIAG.EQ.'U'\n*\n*     Generate data in array A.\n*\n      DO 20 J = 1, N\n         DO 10 I = 1, M\n            IF( GEN.OR.( UPPER.AND.I.LE.J ).OR.( LOWER.AND.I.GE.J ) )\n     $          THEN\n               A( I, J ) = DBEG( RESET ) + TRANSL\n               IF( I.NE.J )THEN\n*                 Set some elements to zero\n                  IF( N.GT.3.AND.J.EQ.N/2 )\n     $               A( I, J ) = ZERO\n                  IF( SYM )THEN\n                     A( J, I ) = A( I, J )\n                  ELSE IF( TRI )THEN\n                     A( J, I ) = ZERO\n                  END IF\n               END IF\n            END IF\n   10    CONTINUE\n         IF( TRI )\n     $      A( J, J ) = A( J, J ) + ONE\n         IF( UNIT )\n     $      A( J, J ) = ONE\n   20 CONTINUE\n*\n*     Store elements in array AS in data structure required by routine.\n*\n      IF( TYPE.EQ.'GE' )THEN\n         DO 50 J = 1, N\n            DO 30 I = 1, M\n               AA( I + ( J - 1 )*LDA ) = A( I, J )\n   30       CONTINUE\n            DO 40 I = M + 1, LDA\n               AA( I + ( J - 1 )*LDA ) = ROGUE\n   40       CONTINUE\n   50    CONTINUE\n      ELSE IF( TYPE.EQ.'SY'.OR.TYPE.EQ.'TR' )THEN\n         DO 90 J = 1, N\n            IF( UPPER )THEN\n               IBEG = 1\n               IF( UNIT )THEN\n                  IEND = J - 1\n               ELSE\n                  IEND = J\n               END IF\n            ELSE\n               IF( UNIT )THEN\n                  IBEG = J + 1\n               ELSE\n                  IBEG = J\n               END IF\n               IEND = N\n            END IF\n            DO 60 I = 1, IBEG - 1\n               AA( I + ( J - 1 )*LDA ) = ROGUE\n   60       CONTINUE\n            DO 70 I = IBEG, IEND\n               AA( I + ( J - 1 )*LDA ) = A( I, J )\n   70       CONTINUE\n            DO 80 I = IEND + 1, LDA\n               AA( I + ( J - 1 )*LDA ) = ROGUE\n   80       CONTINUE\n   90    CONTINUE\n      END IF\n      RETURN\n*\n*     End of DMAKE.\n*\n      END\n      SUBROUTINE DMMCH( TRANSA, TRANSB, M, N, KK, ALPHA, A, LDA, B, LDB,\n     $                  BETA, C, LDC, CT, G, CC, LDCC, EPS, ERR, FATAL,\n     $                  NOUT, MV )\n*\n*  Checks the results of the computational tests.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Parameters ..\n      DOUBLE PRECISION   ZERO, ONE\n      PARAMETER          ( ZERO = 0.0D0, ONE = 1.0D0 )\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION   ALPHA, BETA, EPS, ERR\n      INTEGER            KK, LDA, LDB, LDC, LDCC, M, N, NOUT\n      LOGICAL            FATAL, MV\n      CHARACTER*1        TRANSA, TRANSB\n*     .. Array Arguments ..\n      DOUBLE PRECISION   A( LDA, * ), B( LDB, * ), C( LDC, * ),\n     $                   CC( LDCC, * ), CT( * ), G( * )\n*     .. Local Scalars ..\n      DOUBLE PRECISION   ERRI\n      INTEGER            I, J, K\n      LOGICAL            TRANA, TRANB\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, MAX, SQRT\n*     .. Executable Statements ..\n      TRANA = TRANSA.EQ.'T'.OR.TRANSA.EQ.'C'\n      TRANB = TRANSB.EQ.'T'.OR.TRANSB.EQ.'C'\n*\n*     Compute expected result, one column at a time, in CT using data\n*     in A, B and C.\n*     Compute gauges in G.\n*\n      DO 120 J = 1, N\n*\n         DO 10 I = 1, M\n            CT( I ) = ZERO\n            G( I ) = ZERO\n   10    CONTINUE\n         IF( .NOT.TRANA.AND..NOT.TRANB )THEN\n            DO 30 K = 1, KK\n               DO 20 I = 1, M\n                  CT( I ) = CT( I ) + A( I, K )*B( K, J )\n                  G( I ) = G( I ) + ABS( A( I, K ) )*ABS( B( K, J ) )\n   20          CONTINUE\n   30       CONTINUE\n         ELSE IF( TRANA.AND..NOT.TRANB )THEN\n            DO 50 K = 1, KK\n               DO 40 I = 1, M\n                  CT( I ) = CT( I ) + A( K, I )*B( K, J )\n                  G( I ) = G( I ) + ABS( A( K, I ) )*ABS( B( K, J ) )\n   40          CONTINUE\n   50       CONTINUE\n         ELSE IF( .NOT.TRANA.AND.TRANB )THEN\n            DO 70 K = 1, KK\n               DO 60 I = 1, M\n                  CT( I ) = CT( I ) + A( I, K )*B( J, K )\n                  G( I ) = G( I ) + ABS( A( I, K ) )*ABS( B( J, K ) )\n   60          CONTINUE\n   70       CONTINUE\n         ELSE IF( TRANA.AND.TRANB )THEN\n            DO 90 K = 1, KK\n               DO 80 I = 1, M\n                  CT( I ) = CT( I ) + A( K, I )*B( J, K )\n                  G( I ) = G( I ) + ABS( A( K, I ) )*ABS( B( J, K ) )\n   80          CONTINUE\n   90       CONTINUE\n         END IF\n         DO 100 I = 1, M\n            CT( I ) = ALPHA*CT( I ) + BETA*C( I, J )\n            G( I ) = ABS( ALPHA )*G( I ) + ABS( BETA )*ABS( C( I, J ) )\n  100    CONTINUE\n*\n*        Compute the error ratio for this result.\n*\n         ERR = ZERO\n         DO 110 I = 1, M\n            ERRI = ABS( CT( I ) - CC( I, J ) )/EPS\n            IF( G( I ).NE.ZERO )\n     $         ERRI = ERRI/G( I )\n            ERR = MAX( ERR, ERRI )\n            IF( ERR*SQRT( EPS ).GE.ONE )\n     $         GO TO 130\n  110    CONTINUE\n*\n  120 CONTINUE\n*\n*     If the loop completes, all results are at least half accurate.\n      GO TO 150\n*\n*     Report fatal error.\n*\n  130 FATAL = .TRUE.\n      WRITE( NOUT, FMT = 9999 )\n      DO 140 I = 1, M\n         IF( MV )THEN\n            WRITE( NOUT, FMT = 9998 )I, CT( I ), CC( I, J )\n         ELSE\n            WRITE( NOUT, FMT = 9998 )I, CC( I, J ), CT( I )\n         END IF\n  140 CONTINUE\n      IF( N.GT.1 )\n     $   WRITE( NOUT, FMT = 9997 )J\n*\n  150 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ******* FATAL ERROR - COMPUTED RESULT IS LESS THAN HAL',\n     $      'F ACCURATE *******', /'           EXPECTED RESULT   COMPU',\n     $      'TED RESULT' )\n 9998 FORMAT( 1X, I7, 2G18.6 )\n 9997 FORMAT( '      THESE ARE THE RESULTS FOR COLUMN ', I3 )\n*\n*     End of DMMCH.\n*\n      END\n      LOGICAL FUNCTION LDE( RI, RJ, LR )\n*\n*  Tests if two arrays are identical.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Scalar Arguments ..\n      INTEGER            LR\n*     .. Array Arguments ..\n      DOUBLE PRECISION   RI( * ), RJ( * )\n*     .. Local Scalars ..\n      INTEGER            I\n*     .. Executable Statements ..\n      DO 10 I = 1, LR\n         IF( RI( I ).NE.RJ( I ) )\n     $      GO TO 20\n   10 CONTINUE\n      LDE = .TRUE.\n      GO TO 30\n   20 CONTINUE\n      LDE = .FALSE.\n   30 RETURN\n*\n*     End of LDE.\n*\n      END\n      LOGICAL FUNCTION LDERES( TYPE, UPLO, M, N, AA, AS, LDA )\n*\n*  Tests if selected elements in two arrays are equal.\n*\n*  TYPE is 'GE' or 'SY'.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Scalar Arguments ..\n      INTEGER            LDA, M, N\n      CHARACTER*1        UPLO\n      CHARACTER*2        TYPE\n*     .. Array Arguments ..\n      DOUBLE PRECISION   AA( LDA, * ), AS( LDA, * )\n*     .. Local Scalars ..\n      INTEGER            I, IBEG, IEND, J\n      LOGICAL            UPPER\n*     .. Executable Statements ..\n      UPPER = UPLO.EQ.'U'\n      IF( TYPE.EQ.'GE' )THEN\n         DO 20 J = 1, N\n            DO 10 I = M + 1, LDA\n               IF( AA( I, J ).NE.AS( I, J ) )\n     $            GO TO 70\n   10       CONTINUE\n   20    CONTINUE\n      ELSE IF( TYPE.EQ.'SY' )THEN\n         DO 50 J = 1, N\n            IF( UPPER )THEN\n               IBEG = 1\n               IEND = J\n            ELSE\n               IBEG = J\n               IEND = N\n            END IF\n            DO 30 I = 1, IBEG - 1\n               IF( AA( I, J ).NE.AS( I, J ) )\n     $            GO TO 70\n   30       CONTINUE\n            DO 40 I = IEND + 1, LDA\n               IF( AA( I, J ).NE.AS( I, J ) )\n     $            GO TO 70\n   40       CONTINUE\n   50    CONTINUE\n      END IF\n*\n      LDERES = .TRUE.\n      GO TO 80\n   70 CONTINUE\n      LDERES = .FALSE.\n   80 RETURN\n*\n*     End of LDERES.\n*\n      END\n      DOUBLE PRECISION FUNCTION DBEG( RESET )\n*\n*  Generates random numbers uniformly distributed between -0.5 and 0.5.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Scalar Arguments ..\n      LOGICAL            RESET\n*     .. Local Scalars ..\n      INTEGER            I, IC, MI\n*     .. Save statement ..\n      SAVE               I, IC, MI\n*     .. Executable Statements ..\n      IF( RESET )THEN\n*        Initialize local variables.\n         MI = 891\n         I = 7\n         IC = 0\n         RESET = .FALSE.\n      END IF\n*\n*     The sequence of values of I is bounded between 1 and 999.\n*     If initial I = 1,2,3,6,7 or 9, the period will be 50.\n*     If initial I = 4 or 8, the period will be 25.\n*     If initial I = 5, the period will be 10.\n*     IC is used to break up the period by skipping 1 value of I in 6.\n*\n      IC = IC + 1\n   10 I = I*MI\n      I = I - 1000*( I/1000 )\n      IF( IC.GE.5 )THEN\n         IC = 0\n         GO TO 10\n      END IF\n      DBEG = ( I - 500 )/1001.0D0\n      RETURN\n*\n*     End of DBEG.\n*\n      END\n      DOUBLE PRECISION FUNCTION DDIFF( X, Y )\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION   X, Y\n*     .. Executable Statements ..\n      DDIFF = X - Y\n      RETURN\n*\n*     End of DDIFF.\n*\n      END\n      SUBROUTINE CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n*\n*  Tests whether XERBLA has detected an error when it should.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Scalar Arguments ..\n      INTEGER            INFOT, NOUT\n      LOGICAL            LERR, OK\n      CHARACTER*6        SRNAMT\n*     .. Executable Statements ..\n      IF( .NOT.LERR )THEN\n         WRITE( NOUT, FMT = 9999 )INFOT, SRNAMT\n         OK = .FALSE.\n      END IF\n      LERR = .FALSE.\n      RETURN\n*\n 9999 FORMAT( ' ***** ILLEGAL VALUE OF PARAMETER NUMBER ', I2, ' NOT D',\n     $      'ETECTED BY ', A6, ' *****' )\n*\n*     End of CHKXER.\n*\n      END\n      SUBROUTINE XERBLA( SRNAME, INFO )\n*\n*  This is a special version of XERBLA to be used only as part of\n*  the test program for testing error exits from the Level 3 BLAS\n*  routines.\n*\n*  XERBLA  is an error handler for the Level 3 BLAS routines.\n*\n*  It is called by the Level 3 BLAS routines if an input parameter is\n*  invalid.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Scalar Arguments ..\n      INTEGER            INFO\n      CHARACTER*6        SRNAME\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUT\n      LOGICAL            LERR, OK\n      CHARACTER*6        SRNAMT\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUT, OK, LERR\n      COMMON             /SRNAMC/SRNAMT\n*     .. Executable Statements ..\n      LERR = .TRUE.\n      IF( INFO.NE.INFOT )THEN\n         IF( INFOT.NE.0 )THEN\n            WRITE( NOUT, FMT = 9999 )INFO, INFOT\n         ELSE\n            WRITE( NOUT, FMT = 9997 )INFO\n         END IF\n         OK = .FALSE.\n      END IF\n      IF( SRNAME.NE.SRNAMT )THEN\n         WRITE( NOUT, FMT = 9998 )SRNAME, SRNAMT\n         OK = .FALSE.\n      END IF\n      RETURN\n*\n 9999 FORMAT( ' ******* XERBLA WAS CALLED WITH INFO = ', I6, ' INSTEAD',\n     $      ' OF ', I2, ' *******' )\n 9998 FORMAT( ' ******* XERBLA WAS CALLED WITH SRNAME = ', A6, ' INSTE',\n     $      'AD OF ', A6, ' *******' )\n 9997 FORMAT( ' ******* XERBLA WAS CALLED WITH INFO = ', I6,\n     $      ' *******' )\n*\n*     End of XERBLA\n*\n      END\n\n"
  },
  {
    "path": "3rdparty/eigen3/blas/testing/runblastest.sh",
    "content": "#!/bin/bash\n\nblack='\\E[30m'\nred='\\E[31m'\ngreen='\\E[32m'\nyellow='\\E[33m'\nblue='\\E[34m'\nmagenta='\\E[35m'\ncyan='\\E[36m'\nwhite='\\E[37m'\n\nif [ -f $2 ]; then\n  data=$2\n  if [ -f $1.summ ]; then rm $1.summ; fi\n  if [ -f $1.snap ]; then rm $1.snap; fi\nelse\n  data=$1\nfi\n\nif ! ./$1 < $data > /dev/null 2> .runtest.log ; then\n  echo -e  $red Test $1 failed: $black\n  echo -e $blue\n  cat .runtest.log\n  echo -e $black\n  exit 1\nelse\n  if [ -f $1.summ ]; then\n    if [ `grep \"FATAL ERROR\" $1.summ | wc -l` -gt 0 ]; then\n      echo -e  $red \"Test $1 failed (FATAL ERROR, read the file $1.summ for details)\" $black\n      echo -e $blue\n      cat .runtest.log\n      echo -e $black\n      exit 1;\n    fi\n\n    if [ `grep \"FAILED THE TESTS OF ERROR-EXITS\" $1.summ | wc -l` -gt 0 ]; then\n      echo -e  $red \"Test $1 failed (FAILED THE TESTS OF ERROR-EXITS, read the file $1.summ for details)\" $black\n      echo -e $blue\n      cat .runtest.log\n      echo -e $black\n      exit 1;\n    fi      \n  fi\n  echo -e $green Test $1 passed$black\nfi\n"
  },
  {
    "path": "3rdparty/eigen3/blas/testing/sblat1.f",
    "content": "*> \\brief \\b SBLAT1\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*  Definition:\n*  ===========\n*\n*       PROGRAM SBLAT1\n* \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*>    Test program for the REAL Level 1 BLAS.\n*>\n*>    Based upon the original BLAS test routine together with:\n*>    F06EAF Example Program Text\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date April 2012\n*\n*> \\ingroup single_blas_testing\n*\n*  =====================================================================\n      PROGRAM SBLAT1\n*\n*  -- Reference BLAS test routine (version 3.4.1) --\n*  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     April 2012\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      INTEGER          NOUT\n      PARAMETER        (NOUT=6)\n*     .. Scalars in Common ..\n      INTEGER          ICASE, INCX, INCY, N\n      LOGICAL          PASS\n*     .. Local Scalars ..\n      REAL             SFAC\n      INTEGER          IC\n*     .. External Subroutines ..\n      EXTERNAL         CHECK0, CHECK1, CHECK2, CHECK3, HEADER\n*     .. Common blocks ..\n      COMMON           /COMBLA/ICASE, N, INCX, INCY, PASS\n*     .. Data statements ..\n      DATA             SFAC/9.765625E-4/\n*     .. Executable Statements ..\n      WRITE (NOUT,99999)\n      DO 20 IC = 1, 13\n         ICASE = IC\n         CALL HEADER\n*\n*        .. Initialize  PASS,  INCX,  and INCY for a new case. ..\n*        .. the value 9999 for INCX or INCY will appear in the ..\n*        .. detailed  output, if any, for cases  that do not involve ..\n*        .. these parameters ..\n*\n         PASS = .TRUE.\n         INCX = 9999\n         INCY = 9999\n         IF (ICASE.EQ.3 .OR. ICASE.EQ.11) THEN\n            CALL CHECK0(SFAC)\n         ELSE IF (ICASE.EQ.7 .OR. ICASE.EQ.8 .OR. ICASE.EQ.9 .OR.\n     +            ICASE.EQ.10) THEN\n            CALL CHECK1(SFAC)\n         ELSE IF (ICASE.EQ.1 .OR. ICASE.EQ.2 .OR. ICASE.EQ.5 .OR.\n     +            ICASE.EQ.6 .OR. ICASE.EQ.12 .OR. ICASE.EQ.13) THEN\n            CALL CHECK2(SFAC)\n         ELSE IF (ICASE.EQ.4) THEN\n            CALL CHECK3(SFAC)\n         END IF\n*        -- Print\n         IF (PASS) WRITE (NOUT,99998)\n   20 CONTINUE\n      STOP\n*\n99999 FORMAT (' Real BLAS Test Program Results',/1X)\n99998 FORMAT ('                                    ----- PASS -----')\n      END\n      SUBROUTINE HEADER\n*     .. Parameters ..\n      INTEGER          NOUT\n      PARAMETER        (NOUT=6)\n*     .. Scalars in Common ..\n      INTEGER          ICASE, INCX, INCY, N\n      LOGICAL          PASS\n*     .. Local Arrays ..\n      CHARACTER*6      L(13)\n*     .. Common blocks ..\n      COMMON           /COMBLA/ICASE, N, INCX, INCY, PASS\n*     .. Data statements ..\n      DATA             L(1)/' SDOT '/\n      DATA             L(2)/'SAXPY '/\n      DATA             L(3)/'SROTG '/\n      DATA             L(4)/' SROT '/\n      DATA             L(5)/'SCOPY '/\n      DATA             L(6)/'SSWAP '/\n      DATA             L(7)/'SNRM2 '/\n      DATA             L(8)/'SASUM '/\n      DATA             L(9)/'SSCAL '/\n      DATA             L(10)/'ISAMAX'/\n      DATA             L(11)/'SROTMG'/\n      DATA             L(12)/'SROTM '/\n      DATA             L(13)/'SDSDOT'/\n*     .. Executable Statements ..\n      WRITE (NOUT,99999) ICASE, L(ICASE)\n      RETURN\n*\n99999 FORMAT (/' Test of subprogram number',I3,12X,A6)\n      END\n      SUBROUTINE CHECK0(SFAC)\n*     .. Parameters ..\n      INTEGER           NOUT\n      PARAMETER         (NOUT=6)\n*     .. Scalar Arguments ..\n      REAL              SFAC\n*     .. Scalars in Common ..\n      INTEGER           ICASE, INCX, INCY, N\n      LOGICAL           PASS\n*     .. Local Scalars ..\n      REAL              D12, SA, SB, SC, SS\n      INTEGER           I, K\n*     .. Local Arrays ..\n      REAL              DA1(8), DATRUE(8), DB1(8), DBTRUE(8), DC1(8),\n     +                  DS1(8), DAB(4,9), DTEMP(9), DTRUE(9,9)\n*     .. External Subroutines ..\n      EXTERNAL          SROTG, SROTMG, STEST1\n*     .. Common blocks ..\n      COMMON            /COMBLA/ICASE, N, INCX, INCY, PASS\n*     .. Data statements ..\n      DATA              DA1/0.3E0, 0.4E0, -0.3E0, -0.4E0, -0.3E0, 0.0E0,\n     +                  0.0E0, 1.0E0/\n      DATA              DB1/0.4E0, 0.3E0, 0.4E0, 0.3E0, -0.4E0, 0.0E0,\n     +                  1.0E0, 0.0E0/\n      DATA              DC1/0.6E0, 0.8E0, -0.6E0, 0.8E0, 0.6E0, 1.0E0,\n     +                  0.0E0, 1.0E0/\n      DATA              DS1/0.8E0, 0.6E0, 0.8E0, -0.6E0, 0.8E0, 0.0E0,\n     +                  1.0E0, 0.0E0/\n      DATA              DATRUE/0.5E0, 0.5E0, 0.5E0, -0.5E0, -0.5E0,\n     +                  0.0E0, 1.0E0, 1.0E0/\n      DATA              DBTRUE/0.0E0, 0.6E0, 0.0E0, -0.6E0, 0.0E0,\n     +                  0.0E0, 1.0E0, 0.0E0/\n*     INPUT FOR MODIFIED GIVENS\n      DATA DAB/ .1E0,.3E0,1.2E0,.2E0,\n     A          .7E0, .2E0, .6E0, 4.2E0,\n     B          0.E0,0.E0,0.E0,0.E0,\n     C          4.E0, -1.E0, 2.E0, 4.E0,\n     D          6.E-10, 2.E-2, 1.E5, 10.E0,\n     E          4.E10, 2.E-2, 1.E-5, 10.E0,\n     F          2.E-10, 4.E-2, 1.E5, 10.E0,\n     G          2.E10, 4.E-2, 1.E-5, 10.E0,\n     H          4.E0, -2.E0, 8.E0, 4.E0    /\n*    TRUE RESULTS FOR MODIFIED GIVENS\n      DATA DTRUE/0.E0,0.E0, 1.3E0, .2E0, 0.E0,0.E0,0.E0, .5E0, 0.E0,\n     A           0.E0,0.E0, 4.5E0, 4.2E0, 1.E0, .5E0, 0.E0,0.E0,0.E0,\n     B           0.E0,0.E0,0.E0,0.E0, -2.E0, 0.E0,0.E0,0.E0,0.E0,\n     C           0.E0,0.E0,0.E0, 4.E0, -1.E0, 0.E0,0.E0,0.E0,0.E0,\n     D           0.E0, 15.E-3, 0.E0, 10.E0, -1.E0, 0.E0, -1.E-4,\n     E           0.E0, 1.E0,\n     F           0.E0,0.E0, 6144.E-5, 10.E0, -1.E0, 4096.E0, -1.E6,\n     G           0.E0, 1.E0,\n     H           0.E0,0.E0,15.E0,10.E0,-1.E0, 5.E-5, 0.E0,1.E0,0.E0,\n     I           0.E0,0.E0, 15.E0, 10.E0, -1. E0, 5.E5, -4096.E0,\n     J           1.E0, 4096.E-6,\n     K           0.E0,0.E0, 7.E0, 4.E0, 0.E0,0.E0, -.5E0, -.25E0, 0.E0/\n*                   4096 = 2 ** 12\n      DATA D12  /4096.E0/\n      DTRUE(1,1) = 12.E0 / 130.E0\n      DTRUE(2,1) = 36.E0 / 130.E0\n      DTRUE(7,1) = -1.E0 / 6.E0\n      DTRUE(1,2) = 14.E0 / 75.E0\n      DTRUE(2,2) = 49.E0 / 75.E0\n      DTRUE(9,2) = 1.E0 / 7.E0\n      DTRUE(1,5) = 45.E-11 * (D12 * D12)\n      DTRUE(3,5) = 4.E5 / (3.E0 * D12)\n      DTRUE(6,5) = 1.E0 / D12\n      DTRUE(8,5) = 1.E4 / (3.E0 * D12)\n      DTRUE(1,6) = 4.E10 / (1.5E0 * D12 * D12)\n      DTRUE(2,6) = 2.E-2 / 1.5E0\n      DTRUE(8,6) = 5.E-7 * D12\n      DTRUE(1,7) = 4.E0 / 150.E0\n      DTRUE(2,7) = (2.E-10 / 1.5E0) * (D12 * D12)\n      DTRUE(7,7) = -DTRUE(6,5)\n      DTRUE(9,7) = 1.E4 / D12\n      DTRUE(1,8) = DTRUE(1,7)\n      DTRUE(2,8) = 2.E10 / (1.5E0 * D12 * D12)\n      DTRUE(1,9) = 32.E0 / 7.E0\n      DTRUE(2,9) = -16.E0 / 7.E0\n*     .. Executable Statements ..\n*\n*     Compute true values which cannot be prestored\n*     in decimal notation\n*\n      DBTRUE(1) = 1.0E0/0.6E0\n      DBTRUE(3) = -1.0E0/0.6E0\n      DBTRUE(5) = 1.0E0/0.6E0\n*\n      DO 20 K = 1, 8\n*        .. Set N=K for identification in output if any ..\n         N = K\n         IF (ICASE.EQ.3) THEN\n*           .. SROTG ..\n            IF (K.GT.8) GO TO 40\n            SA = DA1(K)\n            SB = DB1(K)\n            CALL SROTG(SA,SB,SC,SS)\n            CALL STEST1(SA,DATRUE(K),DATRUE(K),SFAC)\n            CALL STEST1(SB,DBTRUE(K),DBTRUE(K),SFAC)\n            CALL STEST1(SC,DC1(K),DC1(K),SFAC)\n            CALL STEST1(SS,DS1(K),DS1(K),SFAC)\n         ELSEIF (ICASE.EQ.11) THEN\n*           .. SROTMG ..\n            DO I=1,4\n               DTEMP(I)= DAB(I,K)\n               DTEMP(I+4) = 0.0\n            END DO\n            DTEMP(9) = 0.0\n            CALL SROTMG(DTEMP(1),DTEMP(2),DTEMP(3),DTEMP(4),DTEMP(5))\n            CALL STEST(9,DTEMP,DTRUE(1,K),DTRUE(1,K),SFAC)\n         ELSE\n            WRITE (NOUT,*) ' Shouldn''t be here in CHECK0'\n            STOP\n         END IF\n   20 CONTINUE\n   40 RETURN\n      END\n      SUBROUTINE CHECK1(SFAC)\n*     .. Parameters ..\n      INTEGER           NOUT\n      PARAMETER         (NOUT=6)\n*     .. Scalar Arguments ..\n      REAL              SFAC\n*     .. Scalars in Common ..\n      INTEGER           ICASE, INCX, INCY, N\n      LOGICAL           PASS\n*     .. Local Scalars ..\n      INTEGER           I, LEN, NP1\n*     .. Local Arrays ..\n      REAL              DTRUE1(5), DTRUE3(5), DTRUE5(8,5,2), DV(8,5,2),\n     +                  SA(10), STEMP(1), STRUE(8), SX(8)\n      INTEGER           ITRUE2(5)\n*     .. External Functions ..\n      REAL              SASUM, SNRM2\n      INTEGER           ISAMAX\n      EXTERNAL          SASUM, SNRM2, ISAMAX\n*     .. External Subroutines ..\n      EXTERNAL          ITEST1, SSCAL, STEST, STEST1\n*     .. Intrinsic Functions ..\n      INTRINSIC         MAX\n*     .. Common blocks ..\n      COMMON            /COMBLA/ICASE, N, INCX, INCY, PASS\n*     .. Data statements ..\n      DATA              SA/0.3E0, -1.0E0, 0.0E0, 1.0E0, 0.3E0, 0.3E0,\n     +                  0.3E0, 0.3E0, 0.3E0, 0.3E0/\n      DATA              DV/0.1E0, 2.0E0, 2.0E0, 2.0E0, 2.0E0, 2.0E0,\n     +                  2.0E0, 2.0E0, 0.3E0, 3.0E0, 3.0E0, 3.0E0, 3.0E0,\n     +                  3.0E0, 3.0E0, 3.0E0, 0.3E0, -0.4E0, 4.0E0,\n     +                  4.0E0, 4.0E0, 4.0E0, 4.0E0, 4.0E0, 0.2E0,\n     +                  -0.6E0, 0.3E0, 5.0E0, 5.0E0, 5.0E0, 5.0E0,\n     +                  5.0E0, 0.1E0, -0.3E0, 0.5E0, -0.1E0, 6.0E0,\n     +                  6.0E0, 6.0E0, 6.0E0, 0.1E0, 8.0E0, 8.0E0, 8.0E0,\n     +                  8.0E0, 8.0E0, 8.0E0, 8.0E0, 0.3E0, 9.0E0, 9.0E0,\n     +                  9.0E0, 9.0E0, 9.0E0, 9.0E0, 9.0E0, 0.3E0, 2.0E0,\n     +                  -0.4E0, 2.0E0, 2.0E0, 2.0E0, 2.0E0, 2.0E0,\n     +                  0.2E0, 3.0E0, -0.6E0, 5.0E0, 0.3E0, 2.0E0,\n     +                  2.0E0, 2.0E0, 0.1E0, 4.0E0, -0.3E0, 6.0E0,\n     +                  -0.5E0, 7.0E0, -0.1E0, 3.0E0/\n      DATA              DTRUE1/0.0E0, 0.3E0, 0.5E0, 0.7E0, 0.6E0/\n      DATA              DTRUE3/0.0E0, 0.3E0, 0.7E0, 1.1E0, 1.0E0/\n      DATA              DTRUE5/0.10E0, 2.0E0, 2.0E0, 2.0E0, 2.0E0,\n     +                  2.0E0, 2.0E0, 2.0E0, -0.3E0, 3.0E0, 3.0E0,\n     +                  3.0E0, 3.0E0, 3.0E0, 3.0E0, 3.0E0, 0.0E0, 0.0E0,\n     +                  4.0E0, 4.0E0, 4.0E0, 4.0E0, 4.0E0, 4.0E0,\n     +                  0.20E0, -0.60E0, 0.30E0, 5.0E0, 5.0E0, 5.0E0,\n     +                  5.0E0, 5.0E0, 0.03E0, -0.09E0, 0.15E0, -0.03E0,\n     +                  6.0E0, 6.0E0, 6.0E0, 6.0E0, 0.10E0, 8.0E0,\n     +                  8.0E0, 8.0E0, 8.0E0, 8.0E0, 8.0E0, 8.0E0,\n     +                  0.09E0, 9.0E0, 9.0E0, 9.0E0, 9.0E0, 9.0E0,\n     +                  9.0E0, 9.0E0, 0.09E0, 2.0E0, -0.12E0, 2.0E0,\n     +                  2.0E0, 2.0E0, 2.0E0, 2.0E0, 0.06E0, 3.0E0,\n     +                  -0.18E0, 5.0E0, 0.09E0, 2.0E0, 2.0E0, 2.0E0,\n     +                  0.03E0, 4.0E0, -0.09E0, 6.0E0, -0.15E0, 7.0E0,\n     +                  -0.03E0, 3.0E0/\n      DATA              ITRUE2/0, 1, 2, 2, 3/\n*     .. Executable Statements ..\n      DO 80 INCX = 1, 2\n         DO 60 NP1 = 1, 5\n            N = NP1 - 1\n            LEN = 2*MAX(N,1)\n*           .. Set vector arguments ..\n            DO 20 I = 1, LEN\n               SX(I) = DV(I,NP1,INCX)\n   20       CONTINUE\n*\n            IF (ICASE.EQ.7) THEN\n*              .. SNRM2 ..\n               STEMP(1) = DTRUE1(NP1)\n               CALL STEST1(SNRM2(N,SX,INCX),STEMP(1),STEMP,SFAC)\n            ELSE IF (ICASE.EQ.8) THEN\n*              .. SASUM ..\n               STEMP(1) = DTRUE3(NP1)\n               CALL STEST1(SASUM(N,SX,INCX),STEMP(1),STEMP,SFAC)\n            ELSE IF (ICASE.EQ.9) THEN\n*              .. SSCAL ..\n               CALL SSCAL(N,SA((INCX-1)*5+NP1),SX,INCX)\n               DO 40 I = 1, LEN\n                  STRUE(I) = DTRUE5(I,NP1,INCX)\n   40          CONTINUE\n               CALL STEST(LEN,SX,STRUE,STRUE,SFAC)\n            ELSE IF (ICASE.EQ.10) THEN\n*              .. ISAMAX ..\n               CALL ITEST1(ISAMAX(N,SX,INCX),ITRUE2(NP1))\n            ELSE\n               WRITE (NOUT,*) ' Shouldn''t be here in CHECK1'\n               STOP\n            END IF\n   60    CONTINUE\n   80 CONTINUE\n      RETURN\n      END\n      SUBROUTINE CHECK2(SFAC)\n*     .. Parameters ..\n      INTEGER           NOUT\n      PARAMETER         (NOUT=6)\n*     .. Scalar Arguments ..\n      REAL              SFAC\n*     .. Scalars in Common ..\n      INTEGER           ICASE, INCX, INCY, N\n      LOGICAL           PASS\n*     .. Local Scalars ..\n      REAL              SA\n      INTEGER           I, J, KI, KN, KNI, KPAR, KSIZE, LENX, LENY,\n     $                  MX, MY \n*     .. Local Arrays ..\n      REAL              DT10X(7,4,4), DT10Y(7,4,4), DT7(4,4),\n     $                  DT8(7,4,4), DX1(7),\n     $                  DY1(7), SSIZE1(4), SSIZE2(14,2), SSIZE3(4),\n     $                  SSIZE(7), STX(7), STY(7), SX(7), SY(7),\n     $                  DPAR(5,4), DT19X(7,4,16),DT19XA(7,4,4),\n     $                  DT19XB(7,4,4), DT19XC(7,4,4),DT19XD(7,4,4),\n     $                  DT19Y(7,4,16), DT19YA(7,4,4),DT19YB(7,4,4),\n     $                  DT19YC(7,4,4), DT19YD(7,4,4), DTEMP(5),\n     $                  ST7B(4,4)\n      INTEGER           INCXS(4), INCYS(4), LENS(4,2), NS(4)\n*     .. External Functions ..\n      REAL              SDOT, SDSDOT\n      EXTERNAL          SDOT, SDSDOT\n*     .. External Subroutines ..\n      EXTERNAL          SAXPY, SCOPY, SROTM, SSWAP, STEST, STEST1\n*     .. Intrinsic Functions ..\n      INTRINSIC         ABS, MIN\n*     .. Common blocks ..\n      COMMON            /COMBLA/ICASE, N, INCX, INCY, PASS\n*     .. Data statements ..\n      EQUIVALENCE (DT19X(1,1,1),DT19XA(1,1,1)),(DT19X(1,1,5),\n     A   DT19XB(1,1,1)),(DT19X(1,1,9),DT19XC(1,1,1)),\n     B   (DT19X(1,1,13),DT19XD(1,1,1))\n      EQUIVALENCE (DT19Y(1,1,1),DT19YA(1,1,1)),(DT19Y(1,1,5),\n     A   DT19YB(1,1,1)),(DT19Y(1,1,9),DT19YC(1,1,1)),\n     B   (DT19Y(1,1,13),DT19YD(1,1,1))\n\n      DATA              SA/0.3E0/\n      DATA              INCXS/1, 2, -2, -1/\n      DATA              INCYS/1, -2, 1, -2/\n      DATA              LENS/1, 1, 2, 4, 1, 1, 3, 7/\n      DATA              NS/0, 1, 2, 4/\n      DATA              DX1/0.6E0, 0.1E0, -0.5E0, 0.8E0, 0.9E0, -0.3E0,\n     +                  -0.4E0/\n      DATA              DY1/0.5E0, -0.9E0, 0.3E0, 0.7E0, -0.6E0, 0.2E0,\n     +                  0.8E0/\n      DATA              DT7/0.0E0, 0.30E0, 0.21E0, 0.62E0, 0.0E0,\n     +                  0.30E0, -0.07E0, 0.85E0, 0.0E0, 0.30E0, -0.79E0,\n     +                  -0.74E0, 0.0E0, 0.30E0, 0.33E0, 1.27E0/\n      DATA              ST7B/ .1, .4, .31, .72,     .1, .4, .03, .95,\n     +                  .1, .4, -.69, -.64,   .1, .4, .43, 1.37/\n      DATA              DT8/0.5E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 0.68E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 0.0E0, 0.68E0, -0.87E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 0.0E0, 0.0E0, 0.68E0, -0.87E0, 0.15E0,\n     +                  0.94E0, 0.0E0, 0.0E0, 0.0E0, 0.5E0, 0.0E0,\n     +                  0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.68E0,\n     +                  0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.35E0, -0.9E0, 0.48E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 0.38E0, -0.9E0, 0.57E0, 0.7E0, -0.75E0,\n     +                  0.2E0, 0.98E0, 0.5E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 0.0E0, 0.0E0, 0.68E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.35E0, -0.72E0,\n     +                  0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.38E0,\n     +                  -0.63E0, 0.15E0, 0.88E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.5E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.68E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 0.68E0, -0.9E0, 0.33E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 0.0E0, 0.68E0, -0.9E0, 0.33E0, 0.7E0,\n     +                  -0.75E0, 0.2E0, 1.04E0/\n      DATA              DT10X/0.6E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 0.5E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 0.5E0, -0.9E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 0.0E0, 0.5E0, -0.9E0, 0.3E0, 0.7E0,\n     +                  0.0E0, 0.0E0, 0.0E0, 0.6E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 0.0E0, 0.0E0, 0.5E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 0.0E0, 0.0E0, 0.3E0, 0.1E0, 0.5E0, 0.0E0,\n     +                  0.0E0, 0.0E0, 0.0E0, 0.8E0, 0.1E0, -0.6E0,\n     +                  0.8E0, 0.3E0, -0.3E0, 0.5E0, 0.6E0, 0.0E0,\n     +                  0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.5E0, 0.0E0,\n     +                  0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, -0.9E0,\n     +                  0.1E0, 0.5E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.7E0,\n     +                  0.1E0, 0.3E0, 0.8E0, -0.9E0, -0.3E0, 0.5E0,\n     +                  0.6E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.5E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.5E0, 0.3E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.5E0, 0.3E0, -0.6E0, 0.8E0, 0.0E0, 0.0E0,\n     +                  0.0E0/\n      DATA              DT10Y/0.5E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 0.6E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 0.6E0, 0.1E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 0.6E0, 0.1E0, -0.5E0, 0.8E0, 0.0E0,\n     +                  0.0E0, 0.0E0, 0.5E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 0.0E0, 0.6E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 0.0E0, -0.5E0, -0.9E0, 0.6E0, 0.0E0,\n     +                  0.0E0, 0.0E0, 0.0E0, -0.4E0, -0.9E0, 0.9E0,\n     +                  0.7E0, -0.5E0, 0.2E0, 0.6E0, 0.5E0, 0.0E0,\n     +                  0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.6E0, 0.0E0,\n     +                  0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, -0.5E0,\n     +                  0.6E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  -0.4E0, 0.9E0, -0.5E0, 0.6E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 0.5E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 0.6E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 0.6E0, -0.9E0, 0.1E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 0.0E0, 0.6E0, -0.9E0, 0.1E0, 0.7E0,\n     +                  -0.5E0, 0.2E0, 0.8E0/\n      DATA              SSIZE1/0.0E0, 0.3E0, 1.6E0, 3.2E0/\n      DATA              SSIZE2/0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 1.17E0, 1.17E0, 1.17E0, 1.17E0, 1.17E0,\n     +                  1.17E0, 1.17E0, 1.17E0, 1.17E0, 1.17E0, 1.17E0,\n     +                  1.17E0, 1.17E0, 1.17E0/\n      DATA              SSIZE3/ .1, .4, 1.7, 3.3 /\n*\n*                         FOR DROTM\n*\n      DATA DPAR/-2.E0,  0.E0,0.E0,0.E0,0.E0,\n     A          -1.E0,  2.E0, -3.E0, -4.E0,  5.E0,\n     B           0.E0,  0.E0,  2.E0, -3.E0,  0.E0,\n     C           1.E0,  5.E0,  2.E0,  0.E0, -4.E0/\n*                        TRUE X RESULTS F0R ROTATIONS DROTM\n      DATA DT19XA/.6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     A            .6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     B            .6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     C            .6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     D            .6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     E           -.8E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     F           -.9E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     G           3.5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     H            .6E0,   .1E0,             0.E0,0.E0,0.E0,0.E0,0.E0,\n     I           -.8E0,  3.8E0,             0.E0,0.E0,0.E0,0.E0,0.E0,\n     J           -.9E0,  2.8E0,             0.E0,0.E0,0.E0,0.E0,0.E0,\n     K           3.5E0,  -.4E0,             0.E0,0.E0,0.E0,0.E0,0.E0,\n     L            .6E0,   .1E0,  -.5E0,   .8E0,          0.E0,0.E0,0.E0,\n     M           -.8E0,  3.8E0, -2.2E0, -1.2E0,          0.E0,0.E0,0.E0,\n     N           -.9E0,  2.8E0, -1.4E0, -1.3E0,          0.E0,0.E0,0.E0,\n     O           3.5E0,  -.4E0, -2.2E0,  4.7E0,          0.E0,0.E0,0.E0/\n*\n      DATA DT19XB/.6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     A            .6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     B            .6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     C            .6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     D            .6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     E           -.8E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     F           -.9E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     G           3.5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     H            .6E0,   .1E0,  -.5E0,             0.E0,0.E0,0.E0,0.E0,\n     I           0.E0,    .1E0, -3.0E0,             0.E0,0.E0,0.E0,0.E0,\n     J           -.3E0,   .1E0, -2.0E0,             0.E0,0.E0,0.E0,0.E0,\n     K           3.3E0,   .1E0, -2.0E0,             0.E0,0.E0,0.E0,0.E0,\n     L            .6E0,   .1E0,  -.5E0,   .8E0,   .9E0,  -.3E0,  -.4E0,\n     M          -2.0E0,   .1E0,  1.4E0,   .8E0,   .6E0,  -.3E0, -2.8E0,\n     N          -1.8E0,   .1E0,  1.3E0,   .8E0,  0.E0,   -.3E0, -1.9E0,\n     O           3.8E0,   .1E0, -3.1E0,   .8E0,  4.8E0,  -.3E0, -1.5E0 /\n*\n      DATA DT19XC/.6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     A            .6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     B            .6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     C            .6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     D            .6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     E           -.8E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     F           -.9E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     G           3.5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     H            .6E0,   .1E0,  -.5E0,             0.E0,0.E0,0.E0,0.E0,\n     I           4.8E0,   .1E0, -3.0E0,             0.E0,0.E0,0.E0,0.E0,\n     J           3.3E0,   .1E0, -2.0E0,             0.E0,0.E0,0.E0,0.E0,\n     K           2.1E0,   .1E0, -2.0E0,             0.E0,0.E0,0.E0,0.E0,\n     L            .6E0,   .1E0,  -.5E0,   .8E0,   .9E0,  -.3E0,  -.4E0,\n     M          -1.6E0,   .1E0, -2.2E0,   .8E0,  5.4E0,  -.3E0, -2.8E0,\n     N          -1.5E0,   .1E0, -1.4E0,   .8E0,  3.6E0,  -.3E0, -1.9E0,\n     O           3.7E0,   .1E0, -2.2E0,   .8E0,  3.6E0,  -.3E0, -1.5E0 /\n*\n      DATA DT19XD/.6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     A            .6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     B            .6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     C            .6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     D            .6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     E           -.8E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     F           -.9E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     G           3.5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     H            .6E0,   .1E0,             0.E0,0.E0,0.E0,0.E0,0.E0,\n     I           -.8E0, -1.0E0,             0.E0,0.E0,0.E0,0.E0,0.E0,\n     J           -.9E0,  -.8E0,             0.E0,0.E0,0.E0,0.E0,0.E0,\n     K           3.5E0,   .8E0,             0.E0,0.E0,0.E0,0.E0,0.E0,\n     L            .6E0,   .1E0,  -.5E0,   .8E0,          0.E0,0.E0,0.E0,\n     M           -.8E0, -1.0E0,  1.4E0, -1.6E0,          0.E0,0.E0,0.E0,\n     N           -.9E0,  -.8E0,  1.3E0, -1.6E0,          0.E0,0.E0,0.E0,\n     O           3.5E0,   .8E0, -3.1E0,  4.8E0,          0.E0,0.E0,0.E0/\n*                        TRUE Y RESULTS FOR ROTATIONS DROTM\n      DATA DT19YA/.5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     A            .5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     B            .5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     C            .5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     D            .5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     E            .7E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     F           1.7E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     G          -2.6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     H            .5E0,  -.9E0,             0.E0,0.E0,0.E0,0.E0,0.E0,\n     I            .7E0, -4.8E0,             0.E0,0.E0,0.E0,0.E0,0.E0,\n     J           1.7E0,  -.7E0,             0.E0,0.E0,0.E0,0.E0,0.E0,\n     K          -2.6E0,  3.5E0,             0.E0,0.E0,0.E0,0.E0,0.E0,\n     L            .5E0,  -.9E0,   .3E0,   .7E0,          0.E0,0.E0,0.E0,\n     M            .7E0, -4.8E0,  3.0E0,  1.1E0,          0.E0,0.E0,0.E0,\n     N           1.7E0,  -.7E0,  -.7E0,  2.3E0,          0.E0,0.E0,0.E0,\n     O          -2.6E0,  3.5E0,  -.7E0, -3.6E0,          0.E0,0.E0,0.E0/\n*\n      DATA DT19YB/.5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     A            .5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     B            .5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     C            .5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     D            .5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     E            .7E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     F           1.7E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     G          -2.6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     H            .5E0,  -.9E0,   .3E0,             0.E0,0.E0,0.E0,0.E0,\n     I           4.0E0,  -.9E0,  -.3E0,             0.E0,0.E0,0.E0,0.E0,\n     J           -.5E0,  -.9E0,  1.5E0,             0.E0,0.E0,0.E0,0.E0,\n     K          -1.5E0,  -.9E0, -1.8E0,             0.E0,0.E0,0.E0,0.E0,\n     L            .5E0,  -.9E0,   .3E0,   .7E0,  -.6E0,   .2E0,   .8E0,\n     M           3.7E0,  -.9E0, -1.2E0,   .7E0, -1.5E0,   .2E0,  2.2E0,\n     N           -.3E0,  -.9E0,  2.1E0,   .7E0, -1.6E0,   .2E0,  2.0E0,\n     O          -1.6E0,  -.9E0, -2.1E0,   .7E0,  2.9E0,   .2E0, -3.8E0 /\n*\n      DATA DT19YC/.5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     A            .5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     B            .5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     C            .5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     D            .5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     E            .7E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     F           1.7E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     G          -2.6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     H            .5E0,  -.9E0,             0.E0,0.E0,0.E0,0.E0,0.E0,\n     I           4.0E0, -6.3E0,             0.E0,0.E0,0.E0,0.E0,0.E0,\n     J           -.5E0,   .3E0,             0.E0,0.E0,0.E0,0.E0,0.E0,\n     K          -1.5E0,  3.0E0,             0.E0,0.E0,0.E0,0.E0,0.E0,\n     L            .5E0,  -.9E0,   .3E0,   .7E0,          0.E0,0.E0,0.E0,\n     M           3.7E0, -7.2E0,  3.0E0,  1.7E0,          0.E0,0.E0,0.E0,\n     N           -.3E0,   .9E0,  -.7E0,  1.9E0,          0.E0,0.E0,0.E0,\n     O          -1.6E0,  2.7E0,  -.7E0, -3.4E0,          0.E0,0.E0,0.E0/\n*\n      DATA DT19YD/.5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     A            .5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     B            .5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     C            .5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     D            .5E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     E            .7E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     F           1.7E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     G          -2.6E0,                  0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,\n     H            .5E0,  -.9E0,   .3E0,             0.E0,0.E0,0.E0,0.E0,\n     I            .7E0,  -.9E0,  1.2E0,             0.E0,0.E0,0.E0,0.E0,\n     J           1.7E0,  -.9E0,   .5E0,             0.E0,0.E0,0.E0,0.E0,\n     K          -2.6E0,  -.9E0, -1.3E0,             0.E0,0.E0,0.E0,0.E0,\n     L            .5E0,  -.9E0,   .3E0,   .7E0,  -.6E0,   .2E0,   .8E0,\n     M            .7E0,  -.9E0,  1.2E0,   .7E0, -1.5E0,   .2E0,  1.6E0,\n     N           1.7E0,  -.9E0,   .5E0,   .7E0, -1.6E0,   .2E0,  2.4E0,\n     O          -2.6E0,  -.9E0, -1.3E0,   .7E0,  2.9E0,   .2E0, -4.0E0 /\n*\n*     .. Executable Statements ..\n*\n      DO 120 KI = 1, 4\n         INCX = INCXS(KI)\n         INCY = INCYS(KI)\n         MX = ABS(INCX)\n         MY = ABS(INCY)\n*\n         DO 100 KN = 1, 4\n            N = NS(KN)\n            KSIZE = MIN(2,KN)\n            LENX = LENS(KN,MX)\n            LENY = LENS(KN,MY)\n*           .. Initialize all argument arrays ..\n            DO 20 I = 1, 7\n               SX(I) = DX1(I)\n               SY(I) = DY1(I)\n   20       CONTINUE\n*\n            IF (ICASE.EQ.1) THEN\n*              .. SDOT ..\n               CALL STEST1(SDOT(N,SX,INCX,SY,INCY),DT7(KN,KI),SSIZE1(KN)\n     +                     ,SFAC)\n            ELSE IF (ICASE.EQ.2) THEN\n*              .. SAXPY ..\n               CALL SAXPY(N,SA,SX,INCX,SY,INCY)\n               DO 40 J = 1, LENY\n                  STY(J) = DT8(J,KN,KI)\n   40          CONTINUE\n               CALL STEST(LENY,SY,STY,SSIZE2(1,KSIZE),SFAC)\n            ELSE IF (ICASE.EQ.5) THEN\n*              .. SCOPY ..\n               DO 60 I = 1, 7\n                  STY(I) = DT10Y(I,KN,KI)\n   60          CONTINUE\n               CALL SCOPY(N,SX,INCX,SY,INCY)\n               CALL STEST(LENY,SY,STY,SSIZE2(1,1),1.0E0)\n            ELSE IF (ICASE.EQ.6) THEN\n*              .. SSWAP ..\n               CALL SSWAP(N,SX,INCX,SY,INCY)\n               DO 80 I = 1, 7\n                  STX(I) = DT10X(I,KN,KI)\n                  STY(I) = DT10Y(I,KN,KI)\n   80          CONTINUE\n               CALL STEST(LENX,SX,STX,SSIZE2(1,1),1.0E0)\n               CALL STEST(LENY,SY,STY,SSIZE2(1,1),1.0E0)\n            ELSEIF (ICASE.EQ.12) THEN\n*              .. SROTM ..\n               KNI=KN+4*(KI-1)\n               DO KPAR=1,4\n                  DO I=1,7\n                     SX(I) = DX1(I)\n                     SY(I) = DY1(I)\n                     STX(I)= DT19X(I,KPAR,KNI)\n                     STY(I)= DT19Y(I,KPAR,KNI)\n                  END DO\n*\n                  DO I=1,5\n                     DTEMP(I) = DPAR(I,KPAR)\n                  END DO\n*\n                  DO  I=1,LENX\n                     SSIZE(I)=STX(I)\n                  END DO\n*                   SEE REMARK ABOVE ABOUT DT11X(1,2,7)\n*                       AND DT11X(5,3,8).\n                  IF ((KPAR .EQ. 2) .AND. (KNI .EQ. 7))\n     $               SSIZE(1) = 2.4E0\n                  IF ((KPAR .EQ. 3) .AND. (KNI .EQ. 8))\n     $               SSIZE(5) = 1.8E0\n*\n                  CALL   SROTM(N,SX,INCX,SY,INCY,DTEMP)\n                  CALL   STEST(LENX,SX,STX,SSIZE,SFAC)\n                  CALL   STEST(LENY,SY,STY,STY,SFAC)\n               END DO\n            ELSEIF (ICASE.EQ.13) THEN\n*              .. SDSROT ..\n               CALL STEST1 (SDSDOT(N,.1,SX,INCX,SY,INCY),\n     $                 ST7B(KN,KI),SSIZE3(KN),SFAC)\n            ELSE\n               WRITE (NOUT,*) ' Shouldn''t be here in CHECK2'\n               STOP\n            END IF\n  100    CONTINUE\n  120 CONTINUE\n      RETURN\n      END\n      SUBROUTINE CHECK3(SFAC)\n*     .. Parameters ..\n      INTEGER           NOUT\n      PARAMETER         (NOUT=6)\n*     .. Scalar Arguments ..\n      REAL              SFAC\n*     .. Scalars in Common ..\n      INTEGER           ICASE, INCX, INCY, N\n      LOGICAL           PASS\n*     .. Local Scalars ..\n      REAL              SC, SS\n      INTEGER           I, K, KI, KN, KSIZE, LENX, LENY, MX, MY\n*     .. Local Arrays ..\n      REAL              COPYX(5), COPYY(5), DT9X(7,4,4), DT9Y(7,4,4),\n     +                  DX1(7), DY1(7), MWPC(11), MWPS(11), MWPSTX(5),\n     +                  MWPSTY(5), MWPTX(11,5), MWPTY(11,5), MWPX(5),\n     +                  MWPY(5), SSIZE2(14,2), STX(7), STY(7), SX(7),\n     +                  SY(7)\n      INTEGER           INCXS(4), INCYS(4), LENS(4,2), MWPINX(11),\n     +                  MWPINY(11), MWPN(11), NS(4)\n*     .. External Subroutines ..\n      EXTERNAL          SROT, STEST\n*     .. Intrinsic Functions ..\n      INTRINSIC         ABS, MIN\n*     .. Common blocks ..\n      COMMON            /COMBLA/ICASE, N, INCX, INCY, PASS\n*     .. Data statements ..\n      DATA              INCXS/1, 2, -2, -1/\n      DATA              INCYS/1, -2, 1, -2/\n      DATA              LENS/1, 1, 2, 4, 1, 1, 3, 7/\n      DATA              NS/0, 1, 2, 4/\n      DATA              DX1/0.6E0, 0.1E0, -0.5E0, 0.8E0, 0.9E0, -0.3E0,\n     +                  -0.4E0/\n      DATA              DY1/0.5E0, -0.9E0, 0.3E0, 0.7E0, -0.6E0, 0.2E0,\n     +                  0.8E0/\n      DATA              SC, SS/0.8E0, 0.6E0/\n      DATA              DT9X/0.6E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 0.78E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 0.0E0, 0.78E0, -0.46E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 0.0E0, 0.0E0, 0.78E0, -0.46E0, -0.22E0,\n     +                  1.06E0, 0.0E0, 0.0E0, 0.0E0, 0.6E0, 0.0E0,\n     +                  0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.78E0,\n     +                  0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.66E0, 0.1E0, -0.1E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 0.96E0, 0.1E0, -0.76E0, 0.8E0, 0.90E0,\n     +                  -0.3E0, -0.02E0, 0.6E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 0.0E0, 0.0E0, 0.78E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 0.0E0, 0.0E0, 0.0E0, -0.06E0, 0.1E0,\n     +                  -0.1E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.90E0,\n     +                  0.1E0, -0.22E0, 0.8E0, 0.18E0, -0.3E0, -0.02E0,\n     +                  0.6E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.78E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 0.78E0, 0.26E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 0.0E0, 0.78E0, 0.26E0, -0.76E0, 1.12E0,\n     +                  0.0E0, 0.0E0, 0.0E0/\n      DATA              DT9Y/0.5E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 0.04E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 0.0E0, 0.04E0, -0.78E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 0.0E0, 0.0E0, 0.04E0, -0.78E0, 0.54E0,\n     +                  0.08E0, 0.0E0, 0.0E0, 0.0E0, 0.5E0, 0.0E0,\n     +                  0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.04E0,\n     +                  0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.7E0,\n     +                  -0.9E0, -0.12E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.64E0, -0.9E0, -0.30E0, 0.7E0, -0.18E0, 0.2E0,\n     +                  0.28E0, 0.5E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 0.0E0, 0.04E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 0.0E0, 0.0E0, 0.7E0, -1.08E0, 0.0E0,\n     +                  0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.64E0, -1.26E0,\n     +                  0.54E0, 0.20E0, 0.0E0, 0.0E0, 0.0E0, 0.5E0,\n     +                  0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.04E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 0.04E0, -0.9E0, 0.18E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 0.0E0, 0.04E0, -0.9E0, 0.18E0, 0.7E0,\n     +                  -0.18E0, 0.2E0, 0.16E0/\n      DATA              SSIZE2/0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0, 0.0E0,\n     +                  0.0E0, 1.17E0, 1.17E0, 1.17E0, 1.17E0, 1.17E0,\n     +                  1.17E0, 1.17E0, 1.17E0, 1.17E0, 1.17E0, 1.17E0,\n     +                  1.17E0, 1.17E0, 1.17E0/\n*     .. Executable Statements ..\n*\n      DO 60 KI = 1, 4\n         INCX = INCXS(KI)\n         INCY = INCYS(KI)\n         MX = ABS(INCX)\n         MY = ABS(INCY)\n*\n         DO 40 KN = 1, 4\n            N = NS(KN)\n            KSIZE = MIN(2,KN)\n            LENX = LENS(KN,MX)\n            LENY = LENS(KN,MY)\n*\n            IF (ICASE.EQ.4) THEN\n*              .. SROT ..\n               DO 20 I = 1, 7\n                  SX(I) = DX1(I)\n                  SY(I) = DY1(I)\n                  STX(I) = DT9X(I,KN,KI)\n                  STY(I) = DT9Y(I,KN,KI)\n   20          CONTINUE\n               CALL SROT(N,SX,INCX,SY,INCY,SC,SS)\n               CALL STEST(LENX,SX,STX,SSIZE2(1,KSIZE),SFAC)\n               CALL STEST(LENY,SY,STY,SSIZE2(1,KSIZE),SFAC)\n            ELSE\n               WRITE (NOUT,*) ' Shouldn''t be here in CHECK3'\n               STOP\n            END IF\n   40    CONTINUE\n   60 CONTINUE\n*\n      MWPC(1) = 1\n      DO 80 I = 2, 11\n         MWPC(I) = 0\n   80 CONTINUE\n      MWPS(1) = 0\n      DO 100 I = 2, 6\n         MWPS(I) = 1\n  100 CONTINUE\n      DO 120 I = 7, 11\n         MWPS(I) = -1\n  120 CONTINUE\n      MWPINX(1) = 1\n      MWPINX(2) = 1\n      MWPINX(3) = 1\n      MWPINX(4) = -1\n      MWPINX(5) = 1\n      MWPINX(6) = -1\n      MWPINX(7) = 1\n      MWPINX(8) = 1\n      MWPINX(9) = -1\n      MWPINX(10) = 1\n      MWPINX(11) = -1\n      MWPINY(1) = 1\n      MWPINY(2) = 1\n      MWPINY(3) = -1\n      MWPINY(4) = -1\n      MWPINY(5) = 2\n      MWPINY(6) = 1\n      MWPINY(7) = 1\n      MWPINY(8) = -1\n      MWPINY(9) = -1\n      MWPINY(10) = 2\n      MWPINY(11) = 1\n      DO 140 I = 1, 11\n         MWPN(I) = 5\n  140 CONTINUE\n      MWPN(5) = 3\n      MWPN(10) = 3\n      DO 160 I = 1, 5\n         MWPX(I) = I\n         MWPY(I) = I\n         MWPTX(1,I) = I\n         MWPTY(1,I) = I\n         MWPTX(2,I) = I\n         MWPTY(2,I) = -I\n         MWPTX(3,I) = 6 - I\n         MWPTY(3,I) = I - 6\n         MWPTX(4,I) = I\n         MWPTY(4,I) = -I\n         MWPTX(6,I) = 6 - I\n         MWPTY(6,I) = I - 6\n         MWPTX(7,I) = -I\n         MWPTY(7,I) = I\n         MWPTX(8,I) = I - 6\n         MWPTY(8,I) = 6 - I\n         MWPTX(9,I) = -I\n         MWPTY(9,I) = I\n         MWPTX(11,I) = I - 6\n         MWPTY(11,I) = 6 - I\n  160 CONTINUE\n      MWPTX(5,1) = 1\n      MWPTX(5,2) = 3\n      MWPTX(5,3) = 5\n      MWPTX(5,4) = 4\n      MWPTX(5,5) = 5\n      MWPTY(5,1) = -1\n      MWPTY(5,2) = 2\n      MWPTY(5,3) = -2\n      MWPTY(5,4) = 4\n      MWPTY(5,5) = -3\n      MWPTX(10,1) = -1\n      MWPTX(10,2) = -3\n      MWPTX(10,3) = -5\n      MWPTX(10,4) = 4\n      MWPTX(10,5) = 5\n      MWPTY(10,1) = 1\n      MWPTY(10,2) = 2\n      MWPTY(10,3) = 2\n      MWPTY(10,4) = 4\n      MWPTY(10,5) = 3\n      DO 200 I = 1, 11\n         INCX = MWPINX(I)\n         INCY = MWPINY(I)\n         DO 180 K = 1, 5\n            COPYX(K) = MWPX(K)\n            COPYY(K) = MWPY(K)\n            MWPSTX(K) = MWPTX(I,K)\n            MWPSTY(K) = MWPTY(I,K)\n  180    CONTINUE\n         CALL SROT(MWPN(I),COPYX,INCX,COPYY,INCY,MWPC(I),MWPS(I))\n         CALL STEST(5,COPYX,MWPSTX,MWPSTX,SFAC)\n         CALL STEST(5,COPYY,MWPSTY,MWPSTY,SFAC)\n  200 CONTINUE\n      RETURN\n      END\n      SUBROUTINE STEST(LEN,SCOMP,STRUE,SSIZE,SFAC)\n*     ********************************* STEST **************************\n*\n*     THIS SUBR COMPARES ARRAYS  SCOMP() AND STRUE() OF LENGTH LEN TO\n*     SEE IF THE TERM BY TERM DIFFERENCES, MULTIPLIED BY SFAC, ARE\n*     NEGLIGIBLE.\n*\n*     C. L. LAWSON, JPL, 1974 DEC 10\n*\n*     .. Parameters ..\n      INTEGER          NOUT\n      REAL             ZERO\n      PARAMETER        (NOUT=6, ZERO=0.0E0)\n*     .. Scalar Arguments ..\n      REAL             SFAC\n      INTEGER          LEN\n*     .. Array Arguments ..\n      REAL             SCOMP(LEN), SSIZE(LEN), STRUE(LEN)\n*     .. Scalars in Common ..\n      INTEGER          ICASE, INCX, INCY, N\n      LOGICAL          PASS\n*     .. Local Scalars ..\n      REAL             SD\n      INTEGER          I\n*     .. External Functions ..\n      REAL             SDIFF\n      EXTERNAL         SDIFF\n*     .. Intrinsic Functions ..\n      INTRINSIC        ABS\n*     .. Common blocks ..\n      COMMON           /COMBLA/ICASE, N, INCX, INCY, PASS\n*     .. Executable Statements ..\n*\n      DO 40 I = 1, LEN\n         SD = SCOMP(I) - STRUE(I)\n         IF (ABS(SFAC*SD) .LE. ABS(SSIZE(I))*EPSILON(ZERO))\n     +       GO TO 40\n*\n*                             HERE    SCOMP(I) IS NOT CLOSE TO STRUE(I).\n*\n         IF ( .NOT. PASS) GO TO 20\n*                             PRINT FAIL MESSAGE AND HEADER.\n         PASS = .FALSE.\n         WRITE (NOUT,99999)\n         WRITE (NOUT,99998)\n   20    WRITE (NOUT,99997) ICASE, N, INCX, INCY, I, SCOMP(I),\n     +     STRUE(I), SD, SSIZE(I)\n   40 CONTINUE\n      RETURN\n*\n99999 FORMAT ('                                       FAIL')\n99998 FORMAT (/' CASE  N INCX INCY  I                            ',\n     +       ' COMP(I)                             TRUE(I)  DIFFERENCE',\n     +       '     SIZE(I)',/1X)\n99997 FORMAT (1X,I4,I3,2I5,I3,2E36.8,2E12.4)\n      END\n      SUBROUTINE STEST1(SCOMP1,STRUE1,SSIZE,SFAC)\n*     ************************* STEST1 *****************************\n*\n*     THIS IS AN INTERFACE SUBROUTINE TO ACCOMMODATE THE FORTRAN\n*     REQUIREMENT THAT WHEN A DUMMY ARGUMENT IS AN ARRAY, THE\n*     ACTUAL ARGUMENT MUST ALSO BE AN ARRAY OR AN ARRAY ELEMENT.\n*\n*     C.L. LAWSON, JPL, 1978 DEC 6\n*\n*     .. Scalar Arguments ..\n      REAL              SCOMP1, SFAC, STRUE1\n*     .. Array Arguments ..\n      REAL              SSIZE(*)\n*     .. Local Arrays ..\n      REAL              SCOMP(1), STRUE(1)\n*     .. External Subroutines ..\n      EXTERNAL          STEST\n*     .. Executable Statements ..\n*\n      SCOMP(1) = SCOMP1\n      STRUE(1) = STRUE1\n      CALL STEST(1,SCOMP,STRUE,SSIZE,SFAC)\n*\n      RETURN\n      END\n      REAL             FUNCTION SDIFF(SA,SB)\n*     ********************************* SDIFF **************************\n*     COMPUTES DIFFERENCE OF TWO NUMBERS.  C. L. LAWSON, JPL 1974 FEB 15\n*\n*     .. Scalar Arguments ..\n      REAL                            SA, SB\n*     .. Executable Statements ..\n      SDIFF = SA - SB\n      RETURN\n      END\n      SUBROUTINE ITEST1(ICOMP,ITRUE)\n*     ********************************* ITEST1 *************************\n*\n*     THIS SUBROUTINE COMPARES THE VARIABLES ICOMP AND ITRUE FOR\n*     EQUALITY.\n*     C. L. LAWSON, JPL, 1974 DEC 10\n*\n*     .. Parameters ..\n      INTEGER           NOUT\n      PARAMETER         (NOUT=6)\n*     .. Scalar Arguments ..\n      INTEGER           ICOMP, ITRUE\n*     .. Scalars in Common ..\n      INTEGER           ICASE, INCX, INCY, N\n      LOGICAL           PASS\n*     .. Local Scalars ..\n      INTEGER           ID\n*     .. Common blocks ..\n      COMMON            /COMBLA/ICASE, N, INCX, INCY, PASS\n*     .. Executable Statements ..\n*\n      IF (ICOMP.EQ.ITRUE) GO TO 40\n*\n*                            HERE ICOMP IS NOT EQUAL TO ITRUE.\n*\n      IF ( .NOT. PASS) GO TO 20\n*                             PRINT FAIL MESSAGE AND HEADER.\n      PASS = .FALSE.\n      WRITE (NOUT,99999)\n      WRITE (NOUT,99998)\n   20 ID = ICOMP - ITRUE\n      WRITE (NOUT,99997) ICASE, N, INCX, INCY, ICOMP, ITRUE, ID\n   40 CONTINUE\n      RETURN\n*\n99999 FORMAT ('                                       FAIL')\n99998 FORMAT (/' CASE  N INCX INCY                               ',\n     +       ' COMP                                TRUE     DIFFERENCE',\n     +       /1X)\n99997 FORMAT (1X,I4,I3,2I5,2I36,I12)\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/blas/testing/sblat2.f",
    "content": "*> \\brief \\b SBLAT2\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*  Definition:\n*  ===========\n*\n*       PROGRAM SBLAT2\n* \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> Test program for the REAL Level 2 Blas.\n*>\n*> The program must be driven by a short data file. The first 18 records\n*> of the file are read using list-directed input, the last 16 records\n*> are read using the format ( A6, L2 ). An annotated example of a data\n*> file can be obtained by deleting the first 3 characters from the\n*> following 34 lines:\n*> 'sblat2.out'      NAME OF SUMMARY OUTPUT FILE\n*> 6                 UNIT NUMBER OF SUMMARY FILE\n*> 'SBLAT2.SNAP'     NAME OF SNAPSHOT OUTPUT FILE\n*> -1                UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)\n*> F        LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.\n*> F        LOGICAL FLAG, T TO STOP ON FAILURES.\n*> T        LOGICAL FLAG, T TO TEST ERROR EXITS.\n*> 16.0     THRESHOLD VALUE OF TEST RATIO\n*> 6                 NUMBER OF VALUES OF N\n*> 0 1 2 3 5 9       VALUES OF N\n*> 4                 NUMBER OF VALUES OF K\n*> 0 1 2 4           VALUES OF K\n*> 4                 NUMBER OF VALUES OF INCX AND INCY\n*> 1 2 -1 -2         VALUES OF INCX AND INCY\n*> 3                 NUMBER OF VALUES OF ALPHA\n*> 0.0 1.0 0.7       VALUES OF ALPHA\n*> 3                 NUMBER OF VALUES OF BETA\n*> 0.0 1.0 0.9       VALUES OF BETA\n*> SGEMV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> SGBMV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> SSYMV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> SSBMV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> SSPMV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> STRMV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> STBMV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> STPMV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> STRSV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> STBSV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> STPSV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> SGER   T PUT F FOR NO TEST. SAME COLUMNS.\n*> SSYR   T PUT F FOR NO TEST. SAME COLUMNS.\n*> SSPR   T PUT F FOR NO TEST. SAME COLUMNS.\n*> SSYR2  T PUT F FOR NO TEST. SAME COLUMNS.\n*> SSPR2  T PUT F FOR NO TEST. SAME COLUMNS.\n*>\n*> Further Details\n*> ===============\n*>\n*>    See:\n*>\n*>       Dongarra J. J., Du Croz J. J., Hammarling S.  and Hanson R. J..\n*>       An  extended  set of Fortran  Basic Linear Algebra Subprograms.\n*>\n*>       Technical  Memoranda  Nos. 41 (revision 3) and 81,  Mathematics\n*>       and  Computer Science  Division,  Argonne  National Laboratory,\n*>       9700 South Cass Avenue, Argonne, Illinois 60439, US.\n*>\n*>       Or\n*>\n*>       NAG  Technical Reports TR3/87 and TR4/87,  Numerical Algorithms\n*>       Group  Ltd.,  NAG  Central  Office,  256  Banbury  Road, Oxford\n*>       OX2 7DE, UK,  and  Numerical Algorithms Group Inc.,  1101  31st\n*>       Street,  Suite 100,  Downers Grove,  Illinois 60515-1263,  USA.\n*>\n*>\n*> -- Written on 10-August-1987.\n*>    Richard Hanson, Sandia National Labs.\n*>    Jeremy Du Croz, NAG Central Office.\n*>\n*>    10-9-00:  Change STATUS='NEW' to 'UNKNOWN' so that the testers\n*>              can be run multiple times without deleting generated\n*>              output files (susan)\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date April 2012\n*\n*> \\ingroup single_blas_testing\n*\n*  =====================================================================\n      PROGRAM SBLAT2\n*\n*  -- Reference BLAS test routine (version 3.4.1) --\n*  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     April 2012\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      INTEGER            NIN\n      PARAMETER          ( NIN = 5 )\n      INTEGER            NSUBS\n      PARAMETER          ( NSUBS = 16 )\n      REAL               ZERO, ONE\n      PARAMETER          ( ZERO = 0.0, ONE = 1.0 )\n      INTEGER            NMAX, INCMAX\n      PARAMETER          ( NMAX = 65, INCMAX = 2 )\n      INTEGER            NINMAX, NIDMAX, NKBMAX, NALMAX, NBEMAX\n      PARAMETER          ( NINMAX = 7, NIDMAX = 9, NKBMAX = 7,\n     $                   NALMAX = 7, NBEMAX = 7 )\n*     .. Local Scalars ..\n      REAL               EPS, ERR, THRESH\n      INTEGER            I, ISNUM, J, N, NALF, NBET, NIDIM, NINC, NKB,\n     $                   NOUT, NTRA\n      LOGICAL            FATAL, LTESTT, REWI, SAME, SFATAL, TRACE,\n     $                   TSTERR\n      CHARACTER*1        TRANS\n      CHARACTER*6        SNAMET\n      CHARACTER*32       SNAPS, SUMMRY\n*     .. Local Arrays ..\n      REAL               A( NMAX, NMAX ), AA( NMAX*NMAX ),\n     $                   ALF( NALMAX ), AS( NMAX*NMAX ), BET( NBEMAX ),\n     $                   G( NMAX ), X( NMAX ), XS( NMAX*INCMAX ),\n     $                   XX( NMAX*INCMAX ), Y( NMAX ),\n     $                   YS( NMAX*INCMAX ), YT( NMAX ),\n     $                   YY( NMAX*INCMAX ), Z( 2*NMAX )\n      INTEGER            IDIM( NIDMAX ), INC( NINMAX ), KB( NKBMAX )\n      LOGICAL            LTEST( NSUBS )\n      CHARACTER*6        SNAMES( NSUBS )\n*     .. External Functions ..\n      REAL               SDIFF\n      LOGICAL            LSE\n      EXTERNAL           SDIFF, LSE\n*     .. External Subroutines ..\n      EXTERNAL           SCHK1, SCHK2, SCHK3, SCHK4, SCHK5, SCHK6,\n     $                   SCHKE, SMVCH\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, MAX, MIN\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n      CHARACTER*6        SRNAMT\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n      COMMON             /SRNAMC/SRNAMT\n*     .. Data statements ..\n      DATA               SNAMES/'SGEMV ', 'SGBMV ', 'SSYMV ', 'SSBMV ',\n     $                   'SSPMV ', 'STRMV ', 'STBMV ', 'STPMV ',\n     $                   'STRSV ', 'STBSV ', 'STPSV ', 'SGER  ',\n     $                   'SSYR  ', 'SSPR  ', 'SSYR2 ', 'SSPR2 '/\n*     .. Executable Statements ..\n*\n*     Read name and unit number for summary output file and open file.\n*\n      READ( NIN, FMT = * )SUMMRY\n      READ( NIN, FMT = * )NOUT\n      OPEN( NOUT, FILE = SUMMRY, STATUS = 'UNKNOWN' )\n      NOUTC = NOUT\n*\n*     Read name and unit number for snapshot output file and open file.\n*\n      READ( NIN, FMT = * )SNAPS\n      READ( NIN, FMT = * )NTRA\n      TRACE = NTRA.GE.0\n      IF( TRACE )THEN\n         OPEN( NTRA, FILE = SNAPS, STATUS = 'UNKNOWN' )\n      END IF\n*     Read the flag that directs rewinding of the snapshot file.\n      READ( NIN, FMT = * )REWI\n      REWI = REWI.AND.TRACE\n*     Read the flag that directs stopping on any failure.\n      READ( NIN, FMT = * )SFATAL\n*     Read the flag that indicates whether error exits are to be tested.\n      READ( NIN, FMT = * )TSTERR\n*     Read the threshold value of the test ratio\n      READ( NIN, FMT = * )THRESH\n*\n*     Read and check the parameter values for the tests.\n*\n*     Values of N\n      READ( NIN, FMT = * )NIDIM\n      IF( NIDIM.LT.1.OR.NIDIM.GT.NIDMAX )THEN\n         WRITE( NOUT, FMT = 9997 )'N', NIDMAX\n         GO TO 230\n      END IF\n      READ( NIN, FMT = * )( IDIM( I ), I = 1, NIDIM )\n      DO 10 I = 1, NIDIM\n         IF( IDIM( I ).LT.0.OR.IDIM( I ).GT.NMAX )THEN\n            WRITE( NOUT, FMT = 9996 )NMAX\n            GO TO 230\n         END IF\n   10 CONTINUE\n*     Values of K\n      READ( NIN, FMT = * )NKB\n      IF( NKB.LT.1.OR.NKB.GT.NKBMAX )THEN\n         WRITE( NOUT, FMT = 9997 )'K', NKBMAX\n         GO TO 230\n      END IF\n      READ( NIN, FMT = * )( KB( I ), I = 1, NKB )\n      DO 20 I = 1, NKB\n         IF( KB( I ).LT.0 )THEN\n            WRITE( NOUT, FMT = 9995 )\n            GO TO 230\n         END IF\n   20 CONTINUE\n*     Values of INCX and INCY\n      READ( NIN, FMT = * )NINC\n      IF( NINC.LT.1.OR.NINC.GT.NINMAX )THEN\n         WRITE( NOUT, FMT = 9997 )'INCX AND INCY', NINMAX\n         GO TO 230\n      END IF\n      READ( NIN, FMT = * )( INC( I ), I = 1, NINC )\n      DO 30 I = 1, NINC\n         IF( INC( I ).EQ.0.OR.ABS( INC( I ) ).GT.INCMAX )THEN\n            WRITE( NOUT, FMT = 9994 )INCMAX\n            GO TO 230\n         END IF\n   30 CONTINUE\n*     Values of ALPHA\n      READ( NIN, FMT = * )NALF\n      IF( NALF.LT.1.OR.NALF.GT.NALMAX )THEN\n         WRITE( NOUT, FMT = 9997 )'ALPHA', NALMAX\n         GO TO 230\n      END IF\n      READ( NIN, FMT = * )( ALF( I ), I = 1, NALF )\n*     Values of BETA\n      READ( NIN, FMT = * )NBET\n      IF( NBET.LT.1.OR.NBET.GT.NBEMAX )THEN\n         WRITE( NOUT, FMT = 9997 )'BETA', NBEMAX\n         GO TO 230\n      END IF\n      READ( NIN, FMT = * )( BET( I ), I = 1, NBET )\n*\n*     Report values of parameters.\n*\n      WRITE( NOUT, FMT = 9993 )\n      WRITE( NOUT, FMT = 9992 )( IDIM( I ), I = 1, NIDIM )\n      WRITE( NOUT, FMT = 9991 )( KB( I ), I = 1, NKB )\n      WRITE( NOUT, FMT = 9990 )( INC( I ), I = 1, NINC )\n      WRITE( NOUT, FMT = 9989 )( ALF( I ), I = 1, NALF )\n      WRITE( NOUT, FMT = 9988 )( BET( I ), I = 1, NBET )\n      IF( .NOT.TSTERR )THEN\n         WRITE( NOUT, FMT = * )\n         WRITE( NOUT, FMT = 9980 )\n      END IF\n      WRITE( NOUT, FMT = * )\n      WRITE( NOUT, FMT = 9999 )THRESH\n      WRITE( NOUT, FMT = * )\n*\n*     Read names of subroutines and flags which indicate\n*     whether they are to be tested.\n*\n      DO 40 I = 1, NSUBS\n         LTEST( I ) = .FALSE.\n   40 CONTINUE\n   50 READ( NIN, FMT = 9984, END = 80 )SNAMET, LTESTT\n      DO 60 I = 1, NSUBS\n         IF( SNAMET.EQ.SNAMES( I ) )\n     $      GO TO 70\n   60 CONTINUE\n      WRITE( NOUT, FMT = 9986 )SNAMET\n      STOP\n   70 LTEST( I ) = LTESTT\n      GO TO 50\n*\n   80 CONTINUE\n      CLOSE ( NIN )\n*\n*     Compute EPS (the machine precision).\n*\n      EPS = EPSILON(ZERO)\n      WRITE( NOUT, FMT = 9998 )EPS\n*\n*     Check the reliability of SMVCH using exact data.\n*\n      N = MIN( 32, NMAX )\n      DO 120 J = 1, N\n         DO 110 I = 1, N\n            A( I, J ) = MAX( I - J + 1, 0 )\n  110    CONTINUE\n         X( J ) = J\n         Y( J ) = ZERO\n  120 CONTINUE\n      DO 130 J = 1, N\n         YY( J ) = J*( ( J + 1 )*J )/2 - ( ( J + 1 )*J*( J - 1 ) )/3\n  130 CONTINUE\n*     YY holds the exact result. On exit from SMVCH YT holds\n*     the result computed by SMVCH.\n      TRANS = 'N'\n      CALL SMVCH( TRANS, N, N, ONE, A, NMAX, X, 1, ZERO, Y, 1, YT, G,\n     $            YY, EPS, ERR, FATAL, NOUT, .TRUE. )\n      SAME = LSE( YY, YT, N )\n      IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN\n         WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR\n         STOP\n      END IF\n      TRANS = 'T'\n      CALL SMVCH( TRANS, N, N, ONE, A, NMAX, X, -1, ZERO, Y, -1, YT, G,\n     $            YY, EPS, ERR, FATAL, NOUT, .TRUE. )\n      SAME = LSE( YY, YT, N )\n      IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN\n         WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR\n         STOP\n      END IF\n*\n*     Test each subroutine in turn.\n*\n      DO 210 ISNUM = 1, NSUBS\n         WRITE( NOUT, FMT = * )\n         IF( .NOT.LTEST( ISNUM ) )THEN\n*           Subprogram is not to be tested.\n            WRITE( NOUT, FMT = 9983 )SNAMES( ISNUM )\n         ELSE\n            SRNAMT = SNAMES( ISNUM )\n*           Test error exits.\n            IF( TSTERR )THEN\n               CALL SCHKE( ISNUM, SNAMES( ISNUM ), NOUT )\n               WRITE( NOUT, FMT = * )\n            END IF\n*           Test computations.\n            INFOT = 0\n            OK = .TRUE.\n            FATAL = .FALSE.\n            GO TO ( 140, 140, 150, 150, 150, 160, 160,\n     $              160, 160, 160, 160, 170, 180, 180,\n     $              190, 190 )ISNUM\n*           Test SGEMV, 01, and SGBMV, 02.\n  140       CALL SCHK1( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NKB, KB, NALF, ALF,\n     $                  NBET, BET, NINC, INC, NMAX, INCMAX, A, AA, AS,\n     $                  X, XX, XS, Y, YY, YS, YT, G )\n            GO TO 200\n*           Test SSYMV, 03, SSBMV, 04, and SSPMV, 05.\n  150       CALL SCHK2( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NKB, KB, NALF, ALF,\n     $                  NBET, BET, NINC, INC, NMAX, INCMAX, A, AA, AS,\n     $                  X, XX, XS, Y, YY, YS, YT, G )\n            GO TO 200\n*           Test STRMV, 06, STBMV, 07, STPMV, 08,\n*           STRSV, 09, STBSV, 10, and STPSV, 11.\n  160       CALL SCHK3( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NKB, KB, NINC, INC,\n     $                  NMAX, INCMAX, A, AA, AS, Y, YY, YS, YT, G, Z )\n            GO TO 200\n*           Test SGER, 12.\n  170       CALL SCHK4( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NALF, ALF, NINC, INC,\n     $                  NMAX, INCMAX, A, AA, AS, X, XX, XS, Y, YY, YS,\n     $                  YT, G, Z )\n            GO TO 200\n*           Test SSYR, 13, and SSPR, 14.\n  180       CALL SCHK5( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NALF, ALF, NINC, INC,\n     $                  NMAX, INCMAX, A, AA, AS, X, XX, XS, Y, YY, YS,\n     $                  YT, G, Z )\n            GO TO 200\n*           Test SSYR2, 15, and SSPR2, 16.\n  190       CALL SCHK6( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NALF, ALF, NINC, INC,\n     $                  NMAX, INCMAX, A, AA, AS, X, XX, XS, Y, YY, YS,\n     $                  YT, G, Z )\n*\n  200       IF( FATAL.AND.SFATAL )\n     $         GO TO 220\n         END IF\n  210 CONTINUE\n      WRITE( NOUT, FMT = 9982 )\n      GO TO 240\n*\n  220 CONTINUE\n      WRITE( NOUT, FMT = 9981 )\n      GO TO 240\n*\n  230 CONTINUE\n      WRITE( NOUT, FMT = 9987 )\n*\n  240 CONTINUE\n      IF( TRACE )\n     $   CLOSE ( NTRA )\n      CLOSE ( NOUT )\n      STOP\n*\n 9999 FORMAT( ' ROUTINES PASS COMPUTATIONAL TESTS IF TEST RATIO IS LES',\n     $      'S THAN', F8.2 )\n 9998 FORMAT( ' RELATIVE MACHINE PRECISION IS TAKEN TO BE', 1P, E9.1 )\n 9997 FORMAT( ' NUMBER OF VALUES OF ', A, ' IS LESS THAN 1 OR GREATER ',\n     $      'THAN ', I2 )\n 9996 FORMAT( ' VALUE OF N IS LESS THAN 0 OR GREATER THAN ', I2 )\n 9995 FORMAT( ' VALUE OF K IS LESS THAN 0' )\n 9994 FORMAT( ' ABSOLUTE VALUE OF INCX OR INCY IS 0 OR GREATER THAN ',\n     $      I2 )\n 9993 FORMAT( ' TESTS OF THE REAL             LEVEL 2 BLAS', //' THE F',\n     $      'OLLOWING PARAMETER VALUES WILL BE USED:' )\n 9992 FORMAT( '   FOR N              ', 9I6 )\n 9991 FORMAT( '   FOR K              ', 7I6 )\n 9990 FORMAT( '   FOR INCX AND INCY  ', 7I6 )\n 9989 FORMAT( '   FOR ALPHA          ', 7F6.1 )\n 9988 FORMAT( '   FOR BETA           ', 7F6.1 )\n 9987 FORMAT( ' AMEND DATA FILE OR INCREASE ARRAY SIZES IN PROGRAM',\n     $      /' ******* TESTS ABANDONED *******' )\n 9986 FORMAT( ' SUBPROGRAM NAME ', A6, ' NOT RECOGNIZED', /' ******* T',\n     $      'ESTS ABANDONED *******' )\n 9985 FORMAT( ' ERROR IN SMVCH -  IN-LINE DOT PRODUCTS ARE BEING EVALU',\n     $      'ATED WRONGLY.', /' SMVCH WAS CALLED WITH TRANS = ', A1,\n     $      ' AND RETURNED SAME = ', L1, ' AND ERR = ', F12.3, '.', /\n     $   ' THIS MAY BE DUE TO FAULTS IN THE ARITHMETIC OR THE COMPILER.'\n     $      , /' ******* TESTS ABANDONED *******' )\n 9984 FORMAT( A6, L2 )\n 9983 FORMAT( 1X, A6, ' WAS NOT TESTED' )\n 9982 FORMAT( /' END OF TESTS' )\n 9981 FORMAT( /' ******* FATAL ERROR - TESTS ABANDONED *******' )\n 9980 FORMAT( ' ERROR-EXITS WILL NOT BE TESTED' )\n*\n*     End of SBLAT2.\n*\n      END\n      SUBROUTINE SCHK1( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NKB, KB, NALF, ALF, NBET,\n     $                  BET, NINC, INC, NMAX, INCMAX, A, AA, AS, X, XX,\n     $                  XS, Y, YY, YS, YT, G )\n*\n*  Tests SGEMV and SGBMV.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Parameters ..\n      REAL               ZERO, HALF\n      PARAMETER          ( ZERO = 0.0, HALF = 0.5 )\n*     .. Scalar Arguments ..\n      REAL               EPS, THRESH\n      INTEGER            INCMAX, NALF, NBET, NIDIM, NINC, NKB, NMAX,\n     $                   NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      REAL               A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),\n     $                   AS( NMAX*NMAX ), BET( NBET ), G( NMAX ),\n     $                   X( NMAX ), XS( NMAX*INCMAX ),\n     $                   XX( NMAX*INCMAX ), Y( NMAX ),\n     $                   YS( NMAX*INCMAX ), YT( NMAX ),\n     $                   YY( NMAX*INCMAX )\n      INTEGER            IDIM( NIDIM ), INC( NINC ), KB( NKB )\n*     .. Local Scalars ..\n      REAL               ALPHA, ALS, BETA, BLS, ERR, ERRMAX, TRANSL\n      INTEGER            I, IA, IB, IC, IKU, IM, IN, INCX, INCXS, INCY,\n     $                   INCYS, IX, IY, KL, KLS, KU, KUS, LAA, LDA,\n     $                   LDAS, LX, LY, M, ML, MS, N, NARGS, NC, ND, NK,\n     $                   NL, NS\n      LOGICAL            BANDED, FULL, NULL, RESET, SAME, TRAN\n      CHARACTER*1        TRANS, TRANSS\n      CHARACTER*3        ICH\n*     .. Local Arrays ..\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LSE, LSERES\n      EXTERNAL           LSE, LSERES\n*     .. External Subroutines ..\n      EXTERNAL           SGBMV, SGEMV, SMAKE, SMVCH\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, MAX, MIN\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICH/'NTC'/\n*     .. Executable Statements ..\n      FULL = SNAME( 3: 3 ).EQ.'E'\n      BANDED = SNAME( 3: 3 ).EQ.'B'\n*     Define the number of arguments.\n      IF( FULL )THEN\n         NARGS = 11\n      ELSE IF( BANDED )THEN\n         NARGS = 13\n      END IF\n*\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = ZERO\n*\n      DO 120 IN = 1, NIDIM\n         N = IDIM( IN )\n         ND = N/2 + 1\n*\n         DO 110 IM = 1, 2\n            IF( IM.EQ.1 )\n     $         M = MAX( N - ND, 0 )\n            IF( IM.EQ.2 )\n     $         M = MIN( N + ND, NMAX )\n*\n            IF( BANDED )THEN\n               NK = NKB\n            ELSE\n               NK = 1\n            END IF\n            DO 100 IKU = 1, NK\n               IF( BANDED )THEN\n                  KU = KB( IKU )\n                  KL = MAX( KU - 1, 0 )\n               ELSE\n                  KU = N - 1\n                  KL = M - 1\n               END IF\n*              Set LDA to 1 more than minimum value if room.\n               IF( BANDED )THEN\n                  LDA = KL + KU + 1\n               ELSE\n                  LDA = M\n               END IF\n               IF( LDA.LT.NMAX )\n     $            LDA = LDA + 1\n*              Skip tests if not enough room.\n               IF( LDA.GT.NMAX )\n     $            GO TO 100\n               LAA = LDA*N\n               NULL = N.LE.0.OR.M.LE.0\n*\n*              Generate the matrix A.\n*\n               TRANSL = ZERO\n               CALL SMAKE( SNAME( 2: 3 ), ' ', ' ', M, N, A, NMAX, AA,\n     $                     LDA, KL, KU, RESET, TRANSL )\n*\n               DO 90 IC = 1, 3\n                  TRANS = ICH( IC: IC )\n                  TRAN = TRANS.EQ.'T'.OR.TRANS.EQ.'C'\n*\n                  IF( TRAN )THEN\n                     ML = N\n                     NL = M\n                  ELSE\n                     ML = M\n                     NL = N\n                  END IF\n*\n                  DO 80 IX = 1, NINC\n                     INCX = INC( IX )\n                     LX = ABS( INCX )*NL\n*\n*                    Generate the vector X.\n*\n                     TRANSL = HALF\n                     CALL SMAKE( 'GE', ' ', ' ', 1, NL, X, 1, XX,\n     $                           ABS( INCX ), 0, NL - 1, RESET, TRANSL )\n                     IF( NL.GT.1 )THEN\n                        X( NL/2 ) = ZERO\n                        XX( 1 + ABS( INCX )*( NL/2 - 1 ) ) = ZERO\n                     END IF\n*\n                     DO 70 IY = 1, NINC\n                        INCY = INC( IY )\n                        LY = ABS( INCY )*ML\n*\n                        DO 60 IA = 1, NALF\n                           ALPHA = ALF( IA )\n*\n                           DO 50 IB = 1, NBET\n                              BETA = BET( IB )\n*\n*                             Generate the vector Y.\n*\n                              TRANSL = ZERO\n                              CALL SMAKE( 'GE', ' ', ' ', 1, ML, Y, 1,\n     $                                    YY, ABS( INCY ), 0, ML - 1,\n     $                                    RESET, TRANSL )\n*\n                              NC = NC + 1\n*\n*                             Save every datum before calling the\n*                             subroutine.\n*\n                              TRANSS = TRANS\n                              MS = M\n                              NS = N\n                              KLS = KL\n                              KUS = KU\n                              ALS = ALPHA\n                              DO 10 I = 1, LAA\n                                 AS( I ) = AA( I )\n   10                         CONTINUE\n                              LDAS = LDA\n                              DO 20 I = 1, LX\n                                 XS( I ) = XX( I )\n   20                         CONTINUE\n                              INCXS = INCX\n                              BLS = BETA\n                              DO 30 I = 1, LY\n                                 YS( I ) = YY( I )\n   30                         CONTINUE\n                              INCYS = INCY\n*\n*                             Call the subroutine.\n*\n                              IF( FULL )THEN\n                                 IF( TRACE )\n     $                              WRITE( NTRA, FMT = 9994 )NC, SNAME,\n     $                              TRANS, M, N, ALPHA, LDA, INCX, BETA,\n     $                              INCY\n                                 IF( REWI )\n     $                              REWIND NTRA\n                                 CALL SGEMV( TRANS, M, N, ALPHA, AA,\n     $                                       LDA, XX, INCX, BETA, YY,\n     $                                       INCY )\n                              ELSE IF( BANDED )THEN\n                                 IF( TRACE )\n     $                              WRITE( NTRA, FMT = 9995 )NC, SNAME,\n     $                              TRANS, M, N, KL, KU, ALPHA, LDA,\n     $                              INCX, BETA, INCY\n                                 IF( REWI )\n     $                              REWIND NTRA\n                                 CALL SGBMV( TRANS, M, N, KL, KU, ALPHA,\n     $                                       AA, LDA, XX, INCX, BETA,\n     $                                       YY, INCY )\n                              END IF\n*\n*                             Check if error-exit was taken incorrectly.\n*\n                              IF( .NOT.OK )THEN\n                                 WRITE( NOUT, FMT = 9993 )\n                                 FATAL = .TRUE.\n                                 GO TO 130\n                              END IF\n*\n*                             See what data changed inside subroutines.\n*\n                              ISAME( 1 ) = TRANS.EQ.TRANSS\n                              ISAME( 2 ) = MS.EQ.M\n                              ISAME( 3 ) = NS.EQ.N\n                              IF( FULL )THEN\n                                 ISAME( 4 ) = ALS.EQ.ALPHA\n                                 ISAME( 5 ) = LSE( AS, AA, LAA )\n                                 ISAME( 6 ) = LDAS.EQ.LDA\n                                 ISAME( 7 ) = LSE( XS, XX, LX )\n                                 ISAME( 8 ) = INCXS.EQ.INCX\n                                 ISAME( 9 ) = BLS.EQ.BETA\n                                 IF( NULL )THEN\n                                    ISAME( 10 ) = LSE( YS, YY, LY )\n                                 ELSE\n                                    ISAME( 10 ) = LSERES( 'GE', ' ', 1,\n     $                                            ML, YS, YY,\n     $                                            ABS( INCY ) )\n                                 END IF\n                                 ISAME( 11 ) = INCYS.EQ.INCY\n                              ELSE IF( BANDED )THEN\n                                 ISAME( 4 ) = KLS.EQ.KL\n                                 ISAME( 5 ) = KUS.EQ.KU\n                                 ISAME( 6 ) = ALS.EQ.ALPHA\n                                 ISAME( 7 ) = LSE( AS, AA, LAA )\n                                 ISAME( 8 ) = LDAS.EQ.LDA\n                                 ISAME( 9 ) = LSE( XS, XX, LX )\n                                 ISAME( 10 ) = INCXS.EQ.INCX\n                                 ISAME( 11 ) = BLS.EQ.BETA\n                                 IF( NULL )THEN\n                                    ISAME( 12 ) = LSE( YS, YY, LY )\n                                 ELSE\n                                    ISAME( 12 ) = LSERES( 'GE', ' ', 1,\n     $                                            ML, YS, YY,\n     $                                            ABS( INCY ) )\n                                 END IF\n                                 ISAME( 13 ) = INCYS.EQ.INCY\n                              END IF\n*\n*                             If data was incorrectly changed, report\n*                             and return.\n*\n                              SAME = .TRUE.\n                              DO 40 I = 1, NARGS\n                                 SAME = SAME.AND.ISAME( I )\n                                 IF( .NOT.ISAME( I ) )\n     $                              WRITE( NOUT, FMT = 9998 )I\n   40                         CONTINUE\n                              IF( .NOT.SAME )THEN\n                                 FATAL = .TRUE.\n                                 GO TO 130\n                              END IF\n*\n                              IF( .NOT.NULL )THEN\n*\n*                                Check the result.\n*\n                                 CALL SMVCH( TRANS, M, N, ALPHA, A,\n     $                                       NMAX, X, INCX, BETA, Y,\n     $                                       INCY, YT, G, YY, EPS, ERR,\n     $                                       FATAL, NOUT, .TRUE. )\n                                 ERRMAX = MAX( ERRMAX, ERR )\n*                                If got really bad answer, report and\n*                                return.\n                                 IF( FATAL )\n     $                              GO TO 130\n                              ELSE\n*                                Avoid repeating tests with M.le.0 or\n*                                N.le.0.\n                                 GO TO 110\n                              END IF\n*\n   50                      CONTINUE\n*\n   60                   CONTINUE\n*\n   70                CONTINUE\n*\n   80             CONTINUE\n*\n   90          CONTINUE\n*\n  100       CONTINUE\n*\n  110    CONTINUE\n*\n  120 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 140\n*\n  130 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      IF( FULL )THEN\n         WRITE( NOUT, FMT = 9994 )NC, SNAME, TRANS, M, N, ALPHA, LDA,\n     $      INCX, BETA, INCY\n      ELSE IF( BANDED )THEN\n         WRITE( NOUT, FMT = 9995 )NC, SNAME, TRANS, M, N, KL, KU,\n     $      ALPHA, LDA, INCX, BETA, INCY\n      END IF\n*\n  140 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',', 4( I3, ',' ), F4.1,\n     $      ', A,', I3, ', X,', I2, ',', F4.1, ', Y,', I2, ') .' )\n 9994 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',', 2( I3, ',' ), F4.1,\n     $      ', A,', I3, ', X,', I2, ',', F4.1, ', Y,', I2,\n     $      ')         .' )\n 9993 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of SCHK1.\n*\n      END\n      SUBROUTINE SCHK2( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NKB, KB, NALF, ALF, NBET,\n     $                  BET, NINC, INC, NMAX, INCMAX, A, AA, AS, X, XX,\n     $                  XS, Y, YY, YS, YT, G )\n*\n*  Tests SSYMV, SSBMV and SSPMV.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Parameters ..\n      REAL               ZERO, HALF\n      PARAMETER          ( ZERO = 0.0, HALF = 0.5 )\n*     .. Scalar Arguments ..\n      REAL               EPS, THRESH\n      INTEGER            INCMAX, NALF, NBET, NIDIM, NINC, NKB, NMAX,\n     $                   NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      REAL               A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),\n     $                   AS( NMAX*NMAX ), BET( NBET ), G( NMAX ),\n     $                   X( NMAX ), XS( NMAX*INCMAX ),\n     $                   XX( NMAX*INCMAX ), Y( NMAX ),\n     $                   YS( NMAX*INCMAX ), YT( NMAX ),\n     $                   YY( NMAX*INCMAX )\n      INTEGER            IDIM( NIDIM ), INC( NINC ), KB( NKB )\n*     .. Local Scalars ..\n      REAL               ALPHA, ALS, BETA, BLS, ERR, ERRMAX, TRANSL\n      INTEGER            I, IA, IB, IC, IK, IN, INCX, INCXS, INCY,\n     $                   INCYS, IX, IY, K, KS, LAA, LDA, LDAS, LX, LY,\n     $                   N, NARGS, NC, NK, NS\n      LOGICAL            BANDED, FULL, NULL, PACKED, RESET, SAME\n      CHARACTER*1        UPLO, UPLOS\n      CHARACTER*2        ICH\n*     .. Local Arrays ..\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LSE, LSERES\n      EXTERNAL           LSE, LSERES\n*     .. External Subroutines ..\n      EXTERNAL           SMAKE, SMVCH, SSBMV, SSPMV, SSYMV\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, MAX\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICH/'UL'/\n*     .. Executable Statements ..\n      FULL = SNAME( 3: 3 ).EQ.'Y'\n      BANDED = SNAME( 3: 3 ).EQ.'B'\n      PACKED = SNAME( 3: 3 ).EQ.'P'\n*     Define the number of arguments.\n      IF( FULL )THEN\n         NARGS = 10\n      ELSE IF( BANDED )THEN\n         NARGS = 11\n      ELSE IF( PACKED )THEN\n         NARGS = 9\n      END IF\n*\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = ZERO\n*\n      DO 110 IN = 1, NIDIM\n         N = IDIM( IN )\n*\n         IF( BANDED )THEN\n            NK = NKB\n         ELSE\n            NK = 1\n         END IF\n         DO 100 IK = 1, NK\n            IF( BANDED )THEN\n               K = KB( IK )\n            ELSE\n               K = N - 1\n            END IF\n*           Set LDA to 1 more than minimum value if room.\n            IF( BANDED )THEN\n               LDA = K + 1\n            ELSE\n               LDA = N\n            END IF\n            IF( LDA.LT.NMAX )\n     $         LDA = LDA + 1\n*           Skip tests if not enough room.\n            IF( LDA.GT.NMAX )\n     $         GO TO 100\n            IF( PACKED )THEN\n               LAA = ( N*( N + 1 ) )/2\n            ELSE\n               LAA = LDA*N\n            END IF\n            NULL = N.LE.0\n*\n            DO 90 IC = 1, 2\n               UPLO = ICH( IC: IC )\n*\n*              Generate the matrix A.\n*\n               TRANSL = ZERO\n               CALL SMAKE( SNAME( 2: 3 ), UPLO, ' ', N, N, A, NMAX, AA,\n     $                     LDA, K, K, RESET, TRANSL )\n*\n               DO 80 IX = 1, NINC\n                  INCX = INC( IX )\n                  LX = ABS( INCX )*N\n*\n*                 Generate the vector X.\n*\n                  TRANSL = HALF\n                  CALL SMAKE( 'GE', ' ', ' ', 1, N, X, 1, XX,\n     $                        ABS( INCX ), 0, N - 1, RESET, TRANSL )\n                  IF( N.GT.1 )THEN\n                     X( N/2 ) = ZERO\n                     XX( 1 + ABS( INCX )*( N/2 - 1 ) ) = ZERO\n                  END IF\n*\n                  DO 70 IY = 1, NINC\n                     INCY = INC( IY )\n                     LY = ABS( INCY )*N\n*\n                     DO 60 IA = 1, NALF\n                        ALPHA = ALF( IA )\n*\n                        DO 50 IB = 1, NBET\n                           BETA = BET( IB )\n*\n*                          Generate the vector Y.\n*\n                           TRANSL = ZERO\n                           CALL SMAKE( 'GE', ' ', ' ', 1, N, Y, 1, YY,\n     $                                 ABS( INCY ), 0, N - 1, RESET,\n     $                                 TRANSL )\n*\n                           NC = NC + 1\n*\n*                          Save every datum before calling the\n*                          subroutine.\n*\n                           UPLOS = UPLO\n                           NS = N\n                           KS = K\n                           ALS = ALPHA\n                           DO 10 I = 1, LAA\n                              AS( I ) = AA( I )\n   10                      CONTINUE\n                           LDAS = LDA\n                           DO 20 I = 1, LX\n                              XS( I ) = XX( I )\n   20                      CONTINUE\n                           INCXS = INCX\n                           BLS = BETA\n                           DO 30 I = 1, LY\n                              YS( I ) = YY( I )\n   30                      CONTINUE\n                           INCYS = INCY\n*\n*                          Call the subroutine.\n*\n                           IF( FULL )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9993 )NC, SNAME,\n     $                           UPLO, N, ALPHA, LDA, INCX, BETA, INCY\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL SSYMV( UPLO, N, ALPHA, AA, LDA, XX,\n     $                                    INCX, BETA, YY, INCY )\n                           ELSE IF( BANDED )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9994 )NC, SNAME,\n     $                           UPLO, N, K, ALPHA, LDA, INCX, BETA,\n     $                           INCY\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL SSBMV( UPLO, N, K, ALPHA, AA, LDA,\n     $                                    XX, INCX, BETA, YY, INCY )\n                           ELSE IF( PACKED )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9995 )NC, SNAME,\n     $                           UPLO, N, ALPHA, INCX, BETA, INCY\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL SSPMV( UPLO, N, ALPHA, AA, XX, INCX,\n     $                                    BETA, YY, INCY )\n                           END IF\n*\n*                          Check if error-exit was taken incorrectly.\n*\n                           IF( .NOT.OK )THEN\n                              WRITE( NOUT, FMT = 9992 )\n                              FATAL = .TRUE.\n                              GO TO 120\n                           END IF\n*\n*                          See what data changed inside subroutines.\n*\n                           ISAME( 1 ) = UPLO.EQ.UPLOS\n                           ISAME( 2 ) = NS.EQ.N\n                           IF( FULL )THEN\n                              ISAME( 3 ) = ALS.EQ.ALPHA\n                              ISAME( 4 ) = LSE( AS, AA, LAA )\n                              ISAME( 5 ) = LDAS.EQ.LDA\n                              ISAME( 6 ) = LSE( XS, XX, LX )\n                              ISAME( 7 ) = INCXS.EQ.INCX\n                              ISAME( 8 ) = BLS.EQ.BETA\n                              IF( NULL )THEN\n                                 ISAME( 9 ) = LSE( YS, YY, LY )\n                              ELSE\n                                 ISAME( 9 ) = LSERES( 'GE', ' ', 1, N,\n     $                                        YS, YY, ABS( INCY ) )\n                              END IF\n                              ISAME( 10 ) = INCYS.EQ.INCY\n                           ELSE IF( BANDED )THEN\n                              ISAME( 3 ) = KS.EQ.K\n                              ISAME( 4 ) = ALS.EQ.ALPHA\n                              ISAME( 5 ) = LSE( AS, AA, LAA )\n                              ISAME( 6 ) = LDAS.EQ.LDA\n                              ISAME( 7 ) = LSE( XS, XX, LX )\n                              ISAME( 8 ) = INCXS.EQ.INCX\n                              ISAME( 9 ) = BLS.EQ.BETA\n                              IF( NULL )THEN\n                                 ISAME( 10 ) = LSE( YS, YY, LY )\n                              ELSE\n                                 ISAME( 10 ) = LSERES( 'GE', ' ', 1, N,\n     $                                         YS, YY, ABS( INCY ) )\n                              END IF\n                              ISAME( 11 ) = INCYS.EQ.INCY\n                           ELSE IF( PACKED )THEN\n                              ISAME( 3 ) = ALS.EQ.ALPHA\n                              ISAME( 4 ) = LSE( AS, AA, LAA )\n                              ISAME( 5 ) = LSE( XS, XX, LX )\n                              ISAME( 6 ) = INCXS.EQ.INCX\n                              ISAME( 7 ) = BLS.EQ.BETA\n                              IF( NULL )THEN\n                                 ISAME( 8 ) = LSE( YS, YY, LY )\n                              ELSE\n                                 ISAME( 8 ) = LSERES( 'GE', ' ', 1, N,\n     $                                        YS, YY, ABS( INCY ) )\n                              END IF\n                              ISAME( 9 ) = INCYS.EQ.INCY\n                           END IF\n*\n*                          If data was incorrectly changed, report and\n*                          return.\n*\n                           SAME = .TRUE.\n                           DO 40 I = 1, NARGS\n                              SAME = SAME.AND.ISAME( I )\n                              IF( .NOT.ISAME( I ) )\n     $                           WRITE( NOUT, FMT = 9998 )I\n   40                      CONTINUE\n                           IF( .NOT.SAME )THEN\n                              FATAL = .TRUE.\n                              GO TO 120\n                           END IF\n*\n                           IF( .NOT.NULL )THEN\n*\n*                             Check the result.\n*\n                              CALL SMVCH( 'N', N, N, ALPHA, A, NMAX, X,\n     $                                    INCX, BETA, Y, INCY, YT, G,\n     $                                    YY, EPS, ERR, FATAL, NOUT,\n     $                                    .TRUE. )\n                              ERRMAX = MAX( ERRMAX, ERR )\n*                             If got really bad answer, report and\n*                             return.\n                              IF( FATAL )\n     $                           GO TO 120\n                           ELSE\n*                             Avoid repeating tests with N.le.0\n                              GO TO 110\n                           END IF\n*\n   50                   CONTINUE\n*\n   60                CONTINUE\n*\n   70             CONTINUE\n*\n   80          CONTINUE\n*\n   90       CONTINUE\n*\n  100    CONTINUE\n*\n  110 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 130\n*\n  120 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      IF( FULL )THEN\n         WRITE( NOUT, FMT = 9993 )NC, SNAME, UPLO, N, ALPHA, LDA, INCX,\n     $      BETA, INCY\n      ELSE IF( BANDED )THEN\n         WRITE( NOUT, FMT = 9994 )NC, SNAME, UPLO, N, K, ALPHA, LDA,\n     $      INCX, BETA, INCY\n      ELSE IF( PACKED )THEN\n         WRITE( NOUT, FMT = 9995 )NC, SNAME, UPLO, N, ALPHA, INCX,\n     $      BETA, INCY\n      END IF\n*\n  130 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',', I3, ',', F4.1, ', AP',\n     $      ', X,', I2, ',', F4.1, ', Y,', I2, ')                .' )\n 9994 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',', 2( I3, ',' ), F4.1,\n     $      ', A,', I3, ', X,', I2, ',', F4.1, ', Y,', I2,\n     $      ')         .' )\n 9993 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',', I3, ',', F4.1, ', A,',\n     $      I3, ', X,', I2, ',', F4.1, ', Y,', I2, ')             .' )\n 9992 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of SCHK2.\n*\n      END\n      SUBROUTINE SCHK3( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NKB, KB, NINC, INC, NMAX,\n     $                  INCMAX, A, AA, AS, X, XX, XS, XT, G, Z )\n*\n*  Tests STRMV, STBMV, STPMV, STRSV, STBSV and STPSV.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Parameters ..\n      REAL               ZERO, HALF, ONE\n      PARAMETER          ( ZERO = 0.0, HALF = 0.5, ONE = 1.0 )\n*     .. Scalar Arguments ..\n      REAL               EPS, THRESH\n      INTEGER            INCMAX, NIDIM, NINC, NKB, NMAX, NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      REAL               A( NMAX, NMAX ), AA( NMAX*NMAX ),\n     $                   AS( NMAX*NMAX ), G( NMAX ), X( NMAX ),\n     $                   XS( NMAX*INCMAX ), XT( NMAX ),\n     $                   XX( NMAX*INCMAX ), Z( NMAX )\n      INTEGER            IDIM( NIDIM ), INC( NINC ), KB( NKB )\n*     .. Local Scalars ..\n      REAL               ERR, ERRMAX, TRANSL\n      INTEGER            I, ICD, ICT, ICU, IK, IN, INCX, INCXS, IX, K,\n     $                   KS, LAA, LDA, LDAS, LX, N, NARGS, NC, NK, NS\n      LOGICAL            BANDED, FULL, NULL, PACKED, RESET, SAME\n      CHARACTER*1        DIAG, DIAGS, TRANS, TRANSS, UPLO, UPLOS\n      CHARACTER*2        ICHD, ICHU\n      CHARACTER*3        ICHT\n*     .. Local Arrays ..\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LSE, LSERES\n      EXTERNAL           LSE, LSERES\n*     .. External Subroutines ..\n      EXTERNAL           SMAKE, SMVCH, STBMV, STBSV, STPMV, STPSV,\n     $                   STRMV, STRSV\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, MAX\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICHU/'UL'/, ICHT/'NTC'/, ICHD/'UN'/\n*     .. Executable Statements ..\n      FULL = SNAME( 3: 3 ).EQ.'R'\n      BANDED = SNAME( 3: 3 ).EQ.'B'\n      PACKED = SNAME( 3: 3 ).EQ.'P'\n*     Define the number of arguments.\n      IF( FULL )THEN\n         NARGS = 8\n      ELSE IF( BANDED )THEN\n         NARGS = 9\n      ELSE IF( PACKED )THEN\n         NARGS = 7\n      END IF\n*\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = ZERO\n*     Set up zero vector for SMVCH.\n      DO 10 I = 1, NMAX\n         Z( I ) = ZERO\n   10 CONTINUE\n*\n      DO 110 IN = 1, NIDIM\n         N = IDIM( IN )\n*\n         IF( BANDED )THEN\n            NK = NKB\n         ELSE\n            NK = 1\n         END IF\n         DO 100 IK = 1, NK\n            IF( BANDED )THEN\n               K = KB( IK )\n            ELSE\n               K = N - 1\n            END IF\n*           Set LDA to 1 more than minimum value if room.\n            IF( BANDED )THEN\n               LDA = K + 1\n            ELSE\n               LDA = N\n            END IF\n            IF( LDA.LT.NMAX )\n     $         LDA = LDA + 1\n*           Skip tests if not enough room.\n            IF( LDA.GT.NMAX )\n     $         GO TO 100\n            IF( PACKED )THEN\n               LAA = ( N*( N + 1 ) )/2\n            ELSE\n               LAA = LDA*N\n            END IF\n            NULL = N.LE.0\n*\n            DO 90 ICU = 1, 2\n               UPLO = ICHU( ICU: ICU )\n*\n               DO 80 ICT = 1, 3\n                  TRANS = ICHT( ICT: ICT )\n*\n                  DO 70 ICD = 1, 2\n                     DIAG = ICHD( ICD: ICD )\n*\n*                    Generate the matrix A.\n*\n                     TRANSL = ZERO\n                     CALL SMAKE( SNAME( 2: 3 ), UPLO, DIAG, N, N, A,\n     $                           NMAX, AA, LDA, K, K, RESET, TRANSL )\n*\n                     DO 60 IX = 1, NINC\n                        INCX = INC( IX )\n                        LX = ABS( INCX )*N\n*\n*                       Generate the vector X.\n*\n                        TRANSL = HALF\n                        CALL SMAKE( 'GE', ' ', ' ', 1, N, X, 1, XX,\n     $                              ABS( INCX ), 0, N - 1, RESET,\n     $                              TRANSL )\n                        IF( N.GT.1 )THEN\n                           X( N/2 ) = ZERO\n                           XX( 1 + ABS( INCX )*( N/2 - 1 ) ) = ZERO\n                        END IF\n*\n                        NC = NC + 1\n*\n*                       Save every datum before calling the subroutine.\n*\n                        UPLOS = UPLO\n                        TRANSS = TRANS\n                        DIAGS = DIAG\n                        NS = N\n                        KS = K\n                        DO 20 I = 1, LAA\n                           AS( I ) = AA( I )\n   20                   CONTINUE\n                        LDAS = LDA\n                        DO 30 I = 1, LX\n                           XS( I ) = XX( I )\n   30                   CONTINUE\n                        INCXS = INCX\n*\n*                       Call the subroutine.\n*\n                        IF( SNAME( 4: 5 ).EQ.'MV' )THEN\n                           IF( FULL )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9993 )NC, SNAME,\n     $                           UPLO, TRANS, DIAG, N, LDA, INCX\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL STRMV( UPLO, TRANS, DIAG, N, AA, LDA,\n     $                                    XX, INCX )\n                           ELSE IF( BANDED )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9994 )NC, SNAME,\n     $                           UPLO, TRANS, DIAG, N, K, LDA, INCX\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL STBMV( UPLO, TRANS, DIAG, N, K, AA,\n     $                                    LDA, XX, INCX )\n                           ELSE IF( PACKED )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9995 )NC, SNAME,\n     $                           UPLO, TRANS, DIAG, N, INCX\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL STPMV( UPLO, TRANS, DIAG, N, AA, XX,\n     $                                    INCX )\n                           END IF\n                        ELSE IF( SNAME( 4: 5 ).EQ.'SV' )THEN\n                           IF( FULL )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9993 )NC, SNAME,\n     $                           UPLO, TRANS, DIAG, N, LDA, INCX\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL STRSV( UPLO, TRANS, DIAG, N, AA, LDA,\n     $                                    XX, INCX )\n                           ELSE IF( BANDED )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9994 )NC, SNAME,\n     $                           UPLO, TRANS, DIAG, N, K, LDA, INCX\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL STBSV( UPLO, TRANS, DIAG, N, K, AA,\n     $                                    LDA, XX, INCX )\n                           ELSE IF( PACKED )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9995 )NC, SNAME,\n     $                           UPLO, TRANS, DIAG, N, INCX\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL STPSV( UPLO, TRANS, DIAG, N, AA, XX,\n     $                                    INCX )\n                           END IF\n                        END IF\n*\n*                       Check if error-exit was taken incorrectly.\n*\n                        IF( .NOT.OK )THEN\n                           WRITE( NOUT, FMT = 9992 )\n                           FATAL = .TRUE.\n                           GO TO 120\n                        END IF\n*\n*                       See what data changed inside subroutines.\n*\n                        ISAME( 1 ) = UPLO.EQ.UPLOS\n                        ISAME( 2 ) = TRANS.EQ.TRANSS\n                        ISAME( 3 ) = DIAG.EQ.DIAGS\n                        ISAME( 4 ) = NS.EQ.N\n                        IF( FULL )THEN\n                           ISAME( 5 ) = LSE( AS, AA, LAA )\n                           ISAME( 6 ) = LDAS.EQ.LDA\n                           IF( NULL )THEN\n                              ISAME( 7 ) = LSE( XS, XX, LX )\n                           ELSE\n                              ISAME( 7 ) = LSERES( 'GE', ' ', 1, N, XS,\n     $                                     XX, ABS( INCX ) )\n                           END IF\n                           ISAME( 8 ) = INCXS.EQ.INCX\n                        ELSE IF( BANDED )THEN\n                           ISAME( 5 ) = KS.EQ.K\n                           ISAME( 6 ) = LSE( AS, AA, LAA )\n                           ISAME( 7 ) = LDAS.EQ.LDA\n                           IF( NULL )THEN\n                              ISAME( 8 ) = LSE( XS, XX, LX )\n                           ELSE\n                              ISAME( 8 ) = LSERES( 'GE', ' ', 1, N, XS,\n     $                                     XX, ABS( INCX ) )\n                           END IF\n                           ISAME( 9 ) = INCXS.EQ.INCX\n                        ELSE IF( PACKED )THEN\n                           ISAME( 5 ) = LSE( AS, AA, LAA )\n                           IF( NULL )THEN\n                              ISAME( 6 ) = LSE( XS, XX, LX )\n                           ELSE\n                              ISAME( 6 ) = LSERES( 'GE', ' ', 1, N, XS,\n     $                                     XX, ABS( INCX ) )\n                           END IF\n                           ISAME( 7 ) = INCXS.EQ.INCX\n                        END IF\n*\n*                       If data was incorrectly changed, report and\n*                       return.\n*\n                        SAME = .TRUE.\n                        DO 40 I = 1, NARGS\n                           SAME = SAME.AND.ISAME( I )\n                           IF( .NOT.ISAME( I ) )\n     $                        WRITE( NOUT, FMT = 9998 )I\n   40                   CONTINUE\n                        IF( .NOT.SAME )THEN\n                           FATAL = .TRUE.\n                           GO TO 120\n                        END IF\n*\n                        IF( .NOT.NULL )THEN\n                           IF( SNAME( 4: 5 ).EQ.'MV' )THEN\n*\n*                             Check the result.\n*\n                              CALL SMVCH( TRANS, N, N, ONE, A, NMAX, X,\n     $                                    INCX, ZERO, Z, INCX, XT, G,\n     $                                    XX, EPS, ERR, FATAL, NOUT,\n     $                                    .TRUE. )\n                           ELSE IF( SNAME( 4: 5 ).EQ.'SV' )THEN\n*\n*                             Compute approximation to original vector.\n*\n                              DO 50 I = 1, N\n                                 Z( I ) = XX( 1 + ( I - 1 )*\n     $                                    ABS( INCX ) )\n                                 XX( 1 + ( I - 1 )*ABS( INCX ) )\n     $                              = X( I )\n   50                         CONTINUE\n                              CALL SMVCH( TRANS, N, N, ONE, A, NMAX, Z,\n     $                                    INCX, ZERO, X, INCX, XT, G,\n     $                                    XX, EPS, ERR, FATAL, NOUT,\n     $                                    .FALSE. )\n                           END IF\n                           ERRMAX = MAX( ERRMAX, ERR )\n*                          If got really bad answer, report and return.\n                           IF( FATAL )\n     $                        GO TO 120\n                        ELSE\n*                          Avoid repeating tests with N.le.0.\n                           GO TO 110\n                        END IF\n*\n   60                CONTINUE\n*\n   70             CONTINUE\n*\n   80          CONTINUE\n*\n   90       CONTINUE\n*\n  100    CONTINUE\n*\n  110 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 130\n*\n  120 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      IF( FULL )THEN\n         WRITE( NOUT, FMT = 9993 )NC, SNAME, UPLO, TRANS, DIAG, N, LDA,\n     $      INCX\n      ELSE IF( BANDED )THEN\n         WRITE( NOUT, FMT = 9994 )NC, SNAME, UPLO, TRANS, DIAG, N, K,\n     $      LDA, INCX\n      ELSE IF( PACKED )THEN\n         WRITE( NOUT, FMT = 9995 )NC, SNAME, UPLO, TRANS, DIAG, N, INCX\n      END IF\n*\n  130 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( 1X, I6, ': ', A6, '(', 3( '''', A1, ''',' ), I3, ', AP, ',\n     $      'X,', I2, ')                        .' )\n 9994 FORMAT( 1X, I6, ': ', A6, '(', 3( '''', A1, ''',' ), 2( I3, ',' ),\n     $      ' A,', I3, ', X,', I2, ')                 .' )\n 9993 FORMAT( 1X, I6, ': ', A6, '(', 3( '''', A1, ''',' ), I3, ', A,',\n     $      I3, ', X,', I2, ')                     .' )\n 9992 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of SCHK3.\n*\n      END\n      SUBROUTINE SCHK4( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NALF, ALF, NINC, INC, NMAX,\n     $                  INCMAX, A, AA, AS, X, XX, XS, Y, YY, YS, YT, G,\n     $                  Z )\n*\n*  Tests SGER.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Parameters ..\n      REAL               ZERO, HALF, ONE\n      PARAMETER          ( ZERO = 0.0, HALF = 0.5, ONE = 1.0 )\n*     .. Scalar Arguments ..\n      REAL               EPS, THRESH\n      INTEGER            INCMAX, NALF, NIDIM, NINC, NMAX, NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      REAL               A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),\n     $                   AS( NMAX*NMAX ), G( NMAX ), X( NMAX ),\n     $                   XS( NMAX*INCMAX ), XX( NMAX*INCMAX ),\n     $                   Y( NMAX ), YS( NMAX*INCMAX ), YT( NMAX ),\n     $                   YY( NMAX*INCMAX ), Z( NMAX )\n      INTEGER            IDIM( NIDIM ), INC( NINC )\n*     .. Local Scalars ..\n      REAL               ALPHA, ALS, ERR, ERRMAX, TRANSL\n      INTEGER            I, IA, IM, IN, INCX, INCXS, INCY, INCYS, IX,\n     $                   IY, J, LAA, LDA, LDAS, LX, LY, M, MS, N, NARGS,\n     $                   NC, ND, NS\n      LOGICAL            NULL, RESET, SAME\n*     .. Local Arrays ..\n      REAL               W( 1 )\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LSE, LSERES\n      EXTERNAL           LSE, LSERES\n*     .. External Subroutines ..\n      EXTERNAL           SGER, SMAKE, SMVCH\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, MAX, MIN\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Executable Statements ..\n*     Define the number of arguments.\n      NARGS = 9\n*\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = ZERO\n*\n      DO 120 IN = 1, NIDIM\n         N = IDIM( IN )\n         ND = N/2 + 1\n*\n         DO 110 IM = 1, 2\n            IF( IM.EQ.1 )\n     $         M = MAX( N - ND, 0 )\n            IF( IM.EQ.2 )\n     $         M = MIN( N + ND, NMAX )\n*\n*           Set LDA to 1 more than minimum value if room.\n            LDA = M\n            IF( LDA.LT.NMAX )\n     $         LDA = LDA + 1\n*           Skip tests if not enough room.\n            IF( LDA.GT.NMAX )\n     $         GO TO 110\n            LAA = LDA*N\n            NULL = N.LE.0.OR.M.LE.0\n*\n            DO 100 IX = 1, NINC\n               INCX = INC( IX )\n               LX = ABS( INCX )*M\n*\n*              Generate the vector X.\n*\n               TRANSL = HALF\n               CALL SMAKE( 'GE', ' ', ' ', 1, M, X, 1, XX, ABS( INCX ),\n     $                     0, M - 1, RESET, TRANSL )\n               IF( M.GT.1 )THEN\n                  X( M/2 ) = ZERO\n                  XX( 1 + ABS( INCX )*( M/2 - 1 ) ) = ZERO\n               END IF\n*\n               DO 90 IY = 1, NINC\n                  INCY = INC( IY )\n                  LY = ABS( INCY )*N\n*\n*                 Generate the vector Y.\n*\n                  TRANSL = ZERO\n                  CALL SMAKE( 'GE', ' ', ' ', 1, N, Y, 1, YY,\n     $                        ABS( INCY ), 0, N - 1, RESET, TRANSL )\n                  IF( N.GT.1 )THEN\n                     Y( N/2 ) = ZERO\n                     YY( 1 + ABS( INCY )*( N/2 - 1 ) ) = ZERO\n                  END IF\n*\n                  DO 80 IA = 1, NALF\n                     ALPHA = ALF( IA )\n*\n*                    Generate the matrix A.\n*\n                     TRANSL = ZERO\n                     CALL SMAKE( SNAME( 2: 3 ), ' ', ' ', M, N, A, NMAX,\n     $                           AA, LDA, M - 1, N - 1, RESET, TRANSL )\n*\n                     NC = NC + 1\n*\n*                    Save every datum before calling the subroutine.\n*\n                     MS = M\n                     NS = N\n                     ALS = ALPHA\n                     DO 10 I = 1, LAA\n                        AS( I ) = AA( I )\n   10                CONTINUE\n                     LDAS = LDA\n                     DO 20 I = 1, LX\n                        XS( I ) = XX( I )\n   20                CONTINUE\n                     INCXS = INCX\n                     DO 30 I = 1, LY\n                        YS( I ) = YY( I )\n   30                CONTINUE\n                     INCYS = INCY\n*\n*                    Call the subroutine.\n*\n                     IF( TRACE )\n     $                  WRITE( NTRA, FMT = 9994 )NC, SNAME, M, N,\n     $                  ALPHA, INCX, INCY, LDA\n                     IF( REWI )\n     $                  REWIND NTRA\n                     CALL SGER( M, N, ALPHA, XX, INCX, YY, INCY, AA,\n     $                          LDA )\n*\n*                    Check if error-exit was taken incorrectly.\n*\n                     IF( .NOT.OK )THEN\n                        WRITE( NOUT, FMT = 9993 )\n                        FATAL = .TRUE.\n                        GO TO 140\n                     END IF\n*\n*                    See what data changed inside subroutine.\n*\n                     ISAME( 1 ) = MS.EQ.M\n                     ISAME( 2 ) = NS.EQ.N\n                     ISAME( 3 ) = ALS.EQ.ALPHA\n                     ISAME( 4 ) = LSE( XS, XX, LX )\n                     ISAME( 5 ) = INCXS.EQ.INCX\n                     ISAME( 6 ) = LSE( YS, YY, LY )\n                     ISAME( 7 ) = INCYS.EQ.INCY\n                     IF( NULL )THEN\n                        ISAME( 8 ) = LSE( AS, AA, LAA )\n                     ELSE\n                        ISAME( 8 ) = LSERES( 'GE', ' ', M, N, AS, AA,\n     $                               LDA )\n                     END IF\n                     ISAME( 9 ) = LDAS.EQ.LDA\n*\n*                    If data was incorrectly changed, report and return.\n*\n                     SAME = .TRUE.\n                     DO 40 I = 1, NARGS\n                        SAME = SAME.AND.ISAME( I )\n                        IF( .NOT.ISAME( I ) )\n     $                     WRITE( NOUT, FMT = 9998 )I\n   40                CONTINUE\n                     IF( .NOT.SAME )THEN\n                        FATAL = .TRUE.\n                        GO TO 140\n                     END IF\n*\n                     IF( .NOT.NULL )THEN\n*\n*                       Check the result column by column.\n*\n                        IF( INCX.GT.0 )THEN\n                           DO 50 I = 1, M\n                              Z( I ) = X( I )\n   50                      CONTINUE\n                        ELSE\n                           DO 60 I = 1, M\n                              Z( I ) = X( M - I + 1 )\n   60                      CONTINUE\n                        END IF\n                        DO 70 J = 1, N\n                           IF( INCY.GT.0 )THEN\n                              W( 1 ) = Y( J )\n                           ELSE\n                              W( 1 ) = Y( N - J + 1 )\n                           END IF\n                           CALL SMVCH( 'N', M, 1, ALPHA, Z, NMAX, W, 1,\n     $                                 ONE, A( 1, J ), 1, YT, G,\n     $                                 AA( 1 + ( J - 1 )*LDA ), EPS,\n     $                                 ERR, FATAL, NOUT, .TRUE. )\n                           ERRMAX = MAX( ERRMAX, ERR )\n*                          If got really bad answer, report and return.\n                           IF( FATAL )\n     $                        GO TO 130\n   70                   CONTINUE\n                     ELSE\n*                       Avoid repeating tests with M.le.0 or N.le.0.\n                        GO TO 110\n                     END IF\n*\n   80             CONTINUE\n*\n   90          CONTINUE\n*\n  100       CONTINUE\n*\n  110    CONTINUE\n*\n  120 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 150\n*\n  130 CONTINUE\n      WRITE( NOUT, FMT = 9995 )J\n*\n  140 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      WRITE( NOUT, FMT = 9994 )NC, SNAME, M, N, ALPHA, INCX, INCY, LDA\n*\n  150 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( '      THESE ARE THE RESULTS FOR COLUMN ', I3 )\n 9994 FORMAT( 1X, I6, ': ', A6, '(', 2( I3, ',' ), F4.1, ', X,', I2,\n     $      ', Y,', I2, ', A,', I3, ')                  .' )\n 9993 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of SCHK4.\n*\n      END\n      SUBROUTINE SCHK5( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NALF, ALF, NINC, INC, NMAX,\n     $                  INCMAX, A, AA, AS, X, XX, XS, Y, YY, YS, YT, G,\n     $                  Z )\n*\n*  Tests SSYR and SSPR.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Parameters ..\n      REAL               ZERO, HALF, ONE\n      PARAMETER          ( ZERO = 0.0, HALF = 0.5, ONE = 1.0 )\n*     .. Scalar Arguments ..\n      REAL               EPS, THRESH\n      INTEGER            INCMAX, NALF, NIDIM, NINC, NMAX, NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      REAL               A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),\n     $                   AS( NMAX*NMAX ), G( NMAX ), X( NMAX ),\n     $                   XS( NMAX*INCMAX ), XX( NMAX*INCMAX ),\n     $                   Y( NMAX ), YS( NMAX*INCMAX ), YT( NMAX ),\n     $                   YY( NMAX*INCMAX ), Z( NMAX )\n      INTEGER            IDIM( NIDIM ), INC( NINC )\n*     .. Local Scalars ..\n      REAL               ALPHA, ALS, ERR, ERRMAX, TRANSL\n      INTEGER            I, IA, IC, IN, INCX, INCXS, IX, J, JA, JJ, LAA,\n     $                   LDA, LDAS, LJ, LX, N, NARGS, NC, NS\n      LOGICAL            FULL, NULL, PACKED, RESET, SAME, UPPER\n      CHARACTER*1        UPLO, UPLOS\n      CHARACTER*2        ICH\n*     .. Local Arrays ..\n      REAL               W( 1 )\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LSE, LSERES\n      EXTERNAL           LSE, LSERES\n*     .. External Subroutines ..\n      EXTERNAL           SMAKE, SMVCH, SSPR, SSYR\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, MAX\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICH/'UL'/\n*     .. Executable Statements ..\n      FULL = SNAME( 3: 3 ).EQ.'Y'\n      PACKED = SNAME( 3: 3 ).EQ.'P'\n*     Define the number of arguments.\n      IF( FULL )THEN\n         NARGS = 7\n      ELSE IF( PACKED )THEN\n         NARGS = 6\n      END IF\n*\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = ZERO\n*\n      DO 100 IN = 1, NIDIM\n         N = IDIM( IN )\n*        Set LDA to 1 more than minimum value if room.\n         LDA = N\n         IF( LDA.LT.NMAX )\n     $      LDA = LDA + 1\n*        Skip tests if not enough room.\n         IF( LDA.GT.NMAX )\n     $      GO TO 100\n         IF( PACKED )THEN\n            LAA = ( N*( N + 1 ) )/2\n         ELSE\n            LAA = LDA*N\n         END IF\n*\n         DO 90 IC = 1, 2\n            UPLO = ICH( IC: IC )\n            UPPER = UPLO.EQ.'U'\n*\n            DO 80 IX = 1, NINC\n               INCX = INC( IX )\n               LX = ABS( INCX )*N\n*\n*              Generate the vector X.\n*\n               TRANSL = HALF\n               CALL SMAKE( 'GE', ' ', ' ', 1, N, X, 1, XX, ABS( INCX ),\n     $                     0, N - 1, RESET, TRANSL )\n               IF( N.GT.1 )THEN\n                  X( N/2 ) = ZERO\n                  XX( 1 + ABS( INCX )*( N/2 - 1 ) ) = ZERO\n               END IF\n*\n               DO 70 IA = 1, NALF\n                  ALPHA = ALF( IA )\n                  NULL = N.LE.0.OR.ALPHA.EQ.ZERO\n*\n*                 Generate the matrix A.\n*\n                  TRANSL = ZERO\n                  CALL SMAKE( SNAME( 2: 3 ), UPLO, ' ', N, N, A, NMAX,\n     $                        AA, LDA, N - 1, N - 1, RESET, TRANSL )\n*\n                  NC = NC + 1\n*\n*                 Save every datum before calling the subroutine.\n*\n                  UPLOS = UPLO\n                  NS = N\n                  ALS = ALPHA\n                  DO 10 I = 1, LAA\n                     AS( I ) = AA( I )\n   10             CONTINUE\n                  LDAS = LDA\n                  DO 20 I = 1, LX\n                     XS( I ) = XX( I )\n   20             CONTINUE\n                  INCXS = INCX\n*\n*                 Call the subroutine.\n*\n                  IF( FULL )THEN\n                     IF( TRACE )\n     $                  WRITE( NTRA, FMT = 9993 )NC, SNAME, UPLO, N,\n     $                  ALPHA, INCX, LDA\n                     IF( REWI )\n     $                  REWIND NTRA\n                     CALL SSYR( UPLO, N, ALPHA, XX, INCX, AA, LDA )\n                  ELSE IF( PACKED )THEN\n                     IF( TRACE )\n     $                  WRITE( NTRA, FMT = 9994 )NC, SNAME, UPLO, N,\n     $                  ALPHA, INCX\n                     IF( REWI )\n     $                  REWIND NTRA\n                     CALL SSPR( UPLO, N, ALPHA, XX, INCX, AA )\n                  END IF\n*\n*                 Check if error-exit was taken incorrectly.\n*\n                  IF( .NOT.OK )THEN\n                     WRITE( NOUT, FMT = 9992 )\n                     FATAL = .TRUE.\n                     GO TO 120\n                  END IF\n*\n*                 See what data changed inside subroutines.\n*\n                  ISAME( 1 ) = UPLO.EQ.UPLOS\n                  ISAME( 2 ) = NS.EQ.N\n                  ISAME( 3 ) = ALS.EQ.ALPHA\n                  ISAME( 4 ) = LSE( XS, XX, LX )\n                  ISAME( 5 ) = INCXS.EQ.INCX\n                  IF( NULL )THEN\n                     ISAME( 6 ) = LSE( AS, AA, LAA )\n                  ELSE\n                     ISAME( 6 ) = LSERES( SNAME( 2: 3 ), UPLO, N, N, AS,\n     $                            AA, LDA )\n                  END IF\n                  IF( .NOT.PACKED )THEN\n                     ISAME( 7 ) = LDAS.EQ.LDA\n                  END IF\n*\n*                 If data was incorrectly changed, report and return.\n*\n                  SAME = .TRUE.\n                  DO 30 I = 1, NARGS\n                     SAME = SAME.AND.ISAME( I )\n                     IF( .NOT.ISAME( I ) )\n     $                  WRITE( NOUT, FMT = 9998 )I\n   30             CONTINUE\n                  IF( .NOT.SAME )THEN\n                     FATAL = .TRUE.\n                     GO TO 120\n                  END IF\n*\n                  IF( .NOT.NULL )THEN\n*\n*                    Check the result column by column.\n*\n                     IF( INCX.GT.0 )THEN\n                        DO 40 I = 1, N\n                           Z( I ) = X( I )\n   40                   CONTINUE\n                     ELSE\n                        DO 50 I = 1, N\n                           Z( I ) = X( N - I + 1 )\n   50                   CONTINUE\n                     END IF\n                     JA = 1\n                     DO 60 J = 1, N\n                        W( 1 ) = Z( J )\n                        IF( UPPER )THEN\n                           JJ = 1\n                           LJ = J\n                        ELSE\n                           JJ = J\n                           LJ = N - J + 1\n                        END IF\n                        CALL SMVCH( 'N', LJ, 1, ALPHA, Z( JJ ), LJ, W,\n     $                              1, ONE, A( JJ, J ), 1, YT, G,\n     $                              AA( JA ), EPS, ERR, FATAL, NOUT,\n     $                              .TRUE. )\n                        IF( FULL )THEN\n                           IF( UPPER )THEN\n                              JA = JA + LDA\n                           ELSE\n                              JA = JA + LDA + 1\n                           END IF\n                        ELSE\n                           JA = JA + LJ\n                        END IF\n                        ERRMAX = MAX( ERRMAX, ERR )\n*                       If got really bad answer, report and return.\n                        IF( FATAL )\n     $                     GO TO 110\n   60                CONTINUE\n                  ELSE\n*                    Avoid repeating tests if N.le.0.\n                     IF( N.LE.0 )\n     $                  GO TO 100\n                  END IF\n*\n   70          CONTINUE\n*\n   80       CONTINUE\n*\n   90    CONTINUE\n*\n  100 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 130\n*\n  110 CONTINUE\n      WRITE( NOUT, FMT = 9995 )J\n*\n  120 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      IF( FULL )THEN\n         WRITE( NOUT, FMT = 9993 )NC, SNAME, UPLO, N, ALPHA, INCX, LDA\n      ELSE IF( PACKED )THEN\n         WRITE( NOUT, FMT = 9994 )NC, SNAME, UPLO, N, ALPHA, INCX\n      END IF\n*\n  130 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( '      THESE ARE THE RESULTS FOR COLUMN ', I3 )\n 9994 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',', I3, ',', F4.1, ', X,',\n     $      I2, ', AP)                           .' )\n 9993 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',', I3, ',', F4.1, ', X,',\n     $      I2, ', A,', I3, ')                        .' )\n 9992 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of SCHK5.\n*\n      END\n      SUBROUTINE SCHK6( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NALF, ALF, NINC, INC, NMAX,\n     $                  INCMAX, A, AA, AS, X, XX, XS, Y, YY, YS, YT, G,\n     $                  Z )\n*\n*  Tests SSYR2 and SSPR2.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Parameters ..\n      REAL               ZERO, HALF, ONE\n      PARAMETER          ( ZERO = 0.0, HALF = 0.5, ONE = 1.0 )\n*     .. Scalar Arguments ..\n      REAL               EPS, THRESH\n      INTEGER            INCMAX, NALF, NIDIM, NINC, NMAX, NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      REAL               A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),\n     $                   AS( NMAX*NMAX ), G( NMAX ), X( NMAX ),\n     $                   XS( NMAX*INCMAX ), XX( NMAX*INCMAX ),\n     $                   Y( NMAX ), YS( NMAX*INCMAX ), YT( NMAX ),\n     $                   YY( NMAX*INCMAX ), Z( NMAX, 2 )\n      INTEGER            IDIM( NIDIM ), INC( NINC )\n*     .. Local Scalars ..\n      REAL               ALPHA, ALS, ERR, ERRMAX, TRANSL\n      INTEGER            I, IA, IC, IN, INCX, INCXS, INCY, INCYS, IX,\n     $                   IY, J, JA, JJ, LAA, LDA, LDAS, LJ, LX, LY, N,\n     $                   NARGS, NC, NS\n      LOGICAL            FULL, NULL, PACKED, RESET, SAME, UPPER\n      CHARACTER*1        UPLO, UPLOS\n      CHARACTER*2        ICH\n*     .. Local Arrays ..\n      REAL               W( 2 )\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LSE, LSERES\n      EXTERNAL           LSE, LSERES\n*     .. External Subroutines ..\n      EXTERNAL           SMAKE, SMVCH, SSPR2, SSYR2\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, MAX\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICH/'UL'/\n*     .. Executable Statements ..\n      FULL = SNAME( 3: 3 ).EQ.'Y'\n      PACKED = SNAME( 3: 3 ).EQ.'P'\n*     Define the number of arguments.\n      IF( FULL )THEN\n         NARGS = 9\n      ELSE IF( PACKED )THEN\n         NARGS = 8\n      END IF\n*\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = ZERO\n*\n      DO 140 IN = 1, NIDIM\n         N = IDIM( IN )\n*        Set LDA to 1 more than minimum value if room.\n         LDA = N\n         IF( LDA.LT.NMAX )\n     $      LDA = LDA + 1\n*        Skip tests if not enough room.\n         IF( LDA.GT.NMAX )\n     $      GO TO 140\n         IF( PACKED )THEN\n            LAA = ( N*( N + 1 ) )/2\n         ELSE\n            LAA = LDA*N\n         END IF\n*\n         DO 130 IC = 1, 2\n            UPLO = ICH( IC: IC )\n            UPPER = UPLO.EQ.'U'\n*\n            DO 120 IX = 1, NINC\n               INCX = INC( IX )\n               LX = ABS( INCX )*N\n*\n*              Generate the vector X.\n*\n               TRANSL = HALF\n               CALL SMAKE( 'GE', ' ', ' ', 1, N, X, 1, XX, ABS( INCX ),\n     $                     0, N - 1, RESET, TRANSL )\n               IF( N.GT.1 )THEN\n                  X( N/2 ) = ZERO\n                  XX( 1 + ABS( INCX )*( N/2 - 1 ) ) = ZERO\n               END IF\n*\n               DO 110 IY = 1, NINC\n                  INCY = INC( IY )\n                  LY = ABS( INCY )*N\n*\n*                 Generate the vector Y.\n*\n                  TRANSL = ZERO\n                  CALL SMAKE( 'GE', ' ', ' ', 1, N, Y, 1, YY,\n     $                        ABS( INCY ), 0, N - 1, RESET, TRANSL )\n                  IF( N.GT.1 )THEN\n                     Y( N/2 ) = ZERO\n                     YY( 1 + ABS( INCY )*( N/2 - 1 ) ) = ZERO\n                  END IF\n*\n                  DO 100 IA = 1, NALF\n                     ALPHA = ALF( IA )\n                     NULL = N.LE.0.OR.ALPHA.EQ.ZERO\n*\n*                    Generate the matrix A.\n*\n                     TRANSL = ZERO\n                     CALL SMAKE( SNAME( 2: 3 ), UPLO, ' ', N, N, A,\n     $                           NMAX, AA, LDA, N - 1, N - 1, RESET,\n     $                           TRANSL )\n*\n                     NC = NC + 1\n*\n*                    Save every datum before calling the subroutine.\n*\n                     UPLOS = UPLO\n                     NS = N\n                     ALS = ALPHA\n                     DO 10 I = 1, LAA\n                        AS( I ) = AA( I )\n   10                CONTINUE\n                     LDAS = LDA\n                     DO 20 I = 1, LX\n                        XS( I ) = XX( I )\n   20                CONTINUE\n                     INCXS = INCX\n                     DO 30 I = 1, LY\n                        YS( I ) = YY( I )\n   30                CONTINUE\n                     INCYS = INCY\n*\n*                    Call the subroutine.\n*\n                     IF( FULL )THEN\n                        IF( TRACE )\n     $                     WRITE( NTRA, FMT = 9993 )NC, SNAME, UPLO, N,\n     $                     ALPHA, INCX, INCY, LDA\n                        IF( REWI )\n     $                     REWIND NTRA\n                        CALL SSYR2( UPLO, N, ALPHA, XX, INCX, YY, INCY,\n     $                              AA, LDA )\n                     ELSE IF( PACKED )THEN\n                        IF( TRACE )\n     $                     WRITE( NTRA, FMT = 9994 )NC, SNAME, UPLO, N,\n     $                     ALPHA, INCX, INCY\n                        IF( REWI )\n     $                     REWIND NTRA\n                        CALL SSPR2( UPLO, N, ALPHA, XX, INCX, YY, INCY,\n     $                              AA )\n                     END IF\n*\n*                    Check if error-exit was taken incorrectly.\n*\n                     IF( .NOT.OK )THEN\n                        WRITE( NOUT, FMT = 9992 )\n                        FATAL = .TRUE.\n                        GO TO 160\n                     END IF\n*\n*                    See what data changed inside subroutines.\n*\n                     ISAME( 1 ) = UPLO.EQ.UPLOS\n                     ISAME( 2 ) = NS.EQ.N\n                     ISAME( 3 ) = ALS.EQ.ALPHA\n                     ISAME( 4 ) = LSE( XS, XX, LX )\n                     ISAME( 5 ) = INCXS.EQ.INCX\n                     ISAME( 6 ) = LSE( YS, YY, LY )\n                     ISAME( 7 ) = INCYS.EQ.INCY\n                     IF( NULL )THEN\n                        ISAME( 8 ) = LSE( AS, AA, LAA )\n                     ELSE\n                        ISAME( 8 ) = LSERES( SNAME( 2: 3 ), UPLO, N, N,\n     $                               AS, AA, LDA )\n                     END IF\n                     IF( .NOT.PACKED )THEN\n                        ISAME( 9 ) = LDAS.EQ.LDA\n                     END IF\n*\n*                    If data was incorrectly changed, report and return.\n*\n                     SAME = .TRUE.\n                     DO 40 I = 1, NARGS\n                        SAME = SAME.AND.ISAME( I )\n                        IF( .NOT.ISAME( I ) )\n     $                     WRITE( NOUT, FMT = 9998 )I\n   40                CONTINUE\n                     IF( .NOT.SAME )THEN\n                        FATAL = .TRUE.\n                        GO TO 160\n                     END IF\n*\n                     IF( .NOT.NULL )THEN\n*\n*                       Check the result column by column.\n*\n                        IF( INCX.GT.0 )THEN\n                           DO 50 I = 1, N\n                              Z( I, 1 ) = X( I )\n   50                      CONTINUE\n                        ELSE\n                           DO 60 I = 1, N\n                              Z( I, 1 ) = X( N - I + 1 )\n   60                      CONTINUE\n                        END IF\n                        IF( INCY.GT.0 )THEN\n                           DO 70 I = 1, N\n                              Z( I, 2 ) = Y( I )\n   70                      CONTINUE\n                        ELSE\n                           DO 80 I = 1, N\n                              Z( I, 2 ) = Y( N - I + 1 )\n   80                      CONTINUE\n                        END IF\n                        JA = 1\n                        DO 90 J = 1, N\n                           W( 1 ) = Z( J, 2 )\n                           W( 2 ) = Z( J, 1 )\n                           IF( UPPER )THEN\n                              JJ = 1\n                              LJ = J\n                           ELSE\n                              JJ = J\n                              LJ = N - J + 1\n                           END IF\n                           CALL SMVCH( 'N', LJ, 2, ALPHA, Z( JJ, 1 ),\n     $                                 NMAX, W, 1, ONE, A( JJ, J ), 1,\n     $                                 YT, G, AA( JA ), EPS, ERR, FATAL,\n     $                                 NOUT, .TRUE. )\n                           IF( FULL )THEN\n                              IF( UPPER )THEN\n                                 JA = JA + LDA\n                              ELSE\n                                 JA = JA + LDA + 1\n                              END IF\n                           ELSE\n                              JA = JA + LJ\n                           END IF\n                           ERRMAX = MAX( ERRMAX, ERR )\n*                          If got really bad answer, report and return.\n                           IF( FATAL )\n     $                        GO TO 150\n   90                   CONTINUE\n                     ELSE\n*                       Avoid repeating tests with N.le.0.\n                        IF( N.LE.0 )\n     $                     GO TO 140\n                     END IF\n*\n  100             CONTINUE\n*\n  110          CONTINUE\n*\n  120       CONTINUE\n*\n  130    CONTINUE\n*\n  140 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 170\n*\n  150 CONTINUE\n      WRITE( NOUT, FMT = 9995 )J\n*\n  160 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      IF( FULL )THEN\n         WRITE( NOUT, FMT = 9993 )NC, SNAME, UPLO, N, ALPHA, INCX,\n     $      INCY, LDA\n      ELSE IF( PACKED )THEN\n         WRITE( NOUT, FMT = 9994 )NC, SNAME, UPLO, N, ALPHA, INCX, INCY\n      END IF\n*\n  170 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( '      THESE ARE THE RESULTS FOR COLUMN ', I3 )\n 9994 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',', I3, ',', F4.1, ', X,',\n     $      I2, ', Y,', I2, ', AP)                     .' )\n 9993 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',', I3, ',', F4.1, ', X,',\n     $      I2, ', Y,', I2, ', A,', I3, ')                  .' )\n 9992 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of SCHK6.\n*\n      END\n      SUBROUTINE SCHKE( ISNUM, SRNAMT, NOUT )\n*\n*  Tests the error exits from the Level 2 Blas.\n*  Requires a special version of the error-handling routine XERBLA.\n*  ALPHA, BETA, A, X and Y should not need to be defined.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Scalar Arguments ..\n      INTEGER            ISNUM, NOUT\n      CHARACTER*6        SRNAMT\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Local Scalars ..\n      REAL               ALPHA, BETA\n*     .. Local Arrays ..\n      REAL               A( 1, 1 ), X( 1 ), Y( 1 )\n*     .. External Subroutines ..\n      EXTERNAL           CHKXER, SGBMV, SGEMV, SGER, SSBMV, SSPMV, SSPR,\n     $                   SSPR2, SSYMV, SSYR, SSYR2, STBMV, STBSV, STPMV,\n     $                   STPSV, STRMV, STRSV\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Executable Statements ..\n*     OK is set to .FALSE. by the special version of XERBLA or by CHKXER\n*     if anything is wrong.\n      OK = .TRUE.\n*     LERR is set to .TRUE. by the special version of XERBLA each time\n*     it is called, and is then tested and re-set by CHKXER.\n      LERR = .FALSE.\n      GO TO ( 10, 20, 30, 40, 50, 60, 70, 80,\n     $        90, 100, 110, 120, 130, 140, 150,\n     $        160 )ISNUM\n   10 INFOT = 1\n      CALL SGEMV( '/', 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL SGEMV( 'N', -1, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL SGEMV( 'N', 0, -1, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL SGEMV( 'N', 2, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL SGEMV( 'N', 0, 0, ALPHA, A, 1, X, 0, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL SGEMV( 'N', 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 170\n   20 INFOT = 1\n      CALL SGBMV( '/', 0, 0, 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL SGBMV( 'N', -1, 0, 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL SGBMV( 'N', 0, -1, 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL SGBMV( 'N', 0, 0, -1, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL SGBMV( 'N', 2, 0, 0, -1, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL SGBMV( 'N', 0, 0, 1, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL SGBMV( 'N', 0, 0, 0, 0, ALPHA, A, 1, X, 0, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 13\n      CALL SGBMV( 'N', 0, 0, 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 170\n   30 INFOT = 1\n      CALL SSYMV( '/', 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL SSYMV( 'U', -1, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL SSYMV( 'U', 2, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL SSYMV( 'U', 0, ALPHA, A, 1, X, 0, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL SSYMV( 'U', 0, ALPHA, A, 1, X, 1, BETA, Y, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 170\n   40 INFOT = 1\n      CALL SSBMV( '/', 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL SSBMV( 'U', -1, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL SSBMV( 'U', 0, -1, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL SSBMV( 'U', 0, 1, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL SSBMV( 'U', 0, 0, ALPHA, A, 1, X, 0, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL SSBMV( 'U', 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 170\n   50 INFOT = 1\n      CALL SSPMV( '/', 0, ALPHA, A, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL SSPMV( 'U', -1, ALPHA, A, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL SSPMV( 'U', 0, ALPHA, A, X, 0, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL SSPMV( 'U', 0, ALPHA, A, X, 1, BETA, Y, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 170\n   60 INFOT = 1\n      CALL STRMV( '/', 'N', 'N', 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL STRMV( 'U', '/', 'N', 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL STRMV( 'U', 'N', '/', 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL STRMV( 'U', 'N', 'N', -1, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL STRMV( 'U', 'N', 'N', 2, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL STRMV( 'U', 'N', 'N', 0, A, 1, X, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 170\n   70 INFOT = 1\n      CALL STBMV( '/', 'N', 'N', 0, 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL STBMV( 'U', '/', 'N', 0, 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL STBMV( 'U', 'N', '/', 0, 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL STBMV( 'U', 'N', 'N', -1, 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL STBMV( 'U', 'N', 'N', 0, -1, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL STBMV( 'U', 'N', 'N', 0, 1, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL STBMV( 'U', 'N', 'N', 0, 0, A, 1, X, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 170\n   80 INFOT = 1\n      CALL STPMV( '/', 'N', 'N', 0, A, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL STPMV( 'U', '/', 'N', 0, A, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL STPMV( 'U', 'N', '/', 0, A, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL STPMV( 'U', 'N', 'N', -1, A, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL STPMV( 'U', 'N', 'N', 0, A, X, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 170\n   90 INFOT = 1\n      CALL STRSV( '/', 'N', 'N', 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL STRSV( 'U', '/', 'N', 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL STRSV( 'U', 'N', '/', 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL STRSV( 'U', 'N', 'N', -1, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL STRSV( 'U', 'N', 'N', 2, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL STRSV( 'U', 'N', 'N', 0, A, 1, X, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 170\n  100 INFOT = 1\n      CALL STBSV( '/', 'N', 'N', 0, 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL STBSV( 'U', '/', 'N', 0, 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL STBSV( 'U', 'N', '/', 0, 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL STBSV( 'U', 'N', 'N', -1, 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL STBSV( 'U', 'N', 'N', 0, -1, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL STBSV( 'U', 'N', 'N', 0, 1, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL STBSV( 'U', 'N', 'N', 0, 0, A, 1, X, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 170\n  110 INFOT = 1\n      CALL STPSV( '/', 'N', 'N', 0, A, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL STPSV( 'U', '/', 'N', 0, A, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL STPSV( 'U', 'N', '/', 0, A, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL STPSV( 'U', 'N', 'N', -1, A, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL STPSV( 'U', 'N', 'N', 0, A, X, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 170\n  120 INFOT = 1\n      CALL SGER( -1, 0, ALPHA, X, 1, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL SGER( 0, -1, ALPHA, X, 1, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL SGER( 0, 0, ALPHA, X, 0, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL SGER( 0, 0, ALPHA, X, 1, Y, 0, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL SGER( 2, 0, ALPHA, X, 1, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 170\n  130 INFOT = 1\n      CALL SSYR( '/', 0, ALPHA, X, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL SSYR( 'U', -1, ALPHA, X, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL SSYR( 'U', 0, ALPHA, X, 0, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL SSYR( 'U', 2, ALPHA, X, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 170\n  140 INFOT = 1\n      CALL SSPR( '/', 0, ALPHA, X, 1, A )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL SSPR( 'U', -1, ALPHA, X, 1, A )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL SSPR( 'U', 0, ALPHA, X, 0, A )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 170\n  150 INFOT = 1\n      CALL SSYR2( '/', 0, ALPHA, X, 1, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL SSYR2( 'U', -1, ALPHA, X, 1, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL SSYR2( 'U', 0, ALPHA, X, 0, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL SSYR2( 'U', 0, ALPHA, X, 1, Y, 0, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL SSYR2( 'U', 2, ALPHA, X, 1, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 170\n  160 INFOT = 1\n      CALL SSPR2( '/', 0, ALPHA, X, 1, Y, 1, A )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL SSPR2( 'U', -1, ALPHA, X, 1, Y, 1, A )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL SSPR2( 'U', 0, ALPHA, X, 0, Y, 1, A )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL SSPR2( 'U', 0, ALPHA, X, 1, Y, 0, A )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n*\n  170 IF( OK )THEN\n         WRITE( NOUT, FMT = 9999 )SRNAMT\n      ELSE\n         WRITE( NOUT, FMT = 9998 )SRNAMT\n      END IF\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE TESTS OF ERROR-EXITS' )\n 9998 FORMAT( ' ******* ', A6, ' FAILED THE TESTS OF ERROR-EXITS *****',\n     $      '**' )\n*\n*     End of SCHKE.\n*\n      END\n      SUBROUTINE SMAKE( TYPE, UPLO, DIAG, M, N, A, NMAX, AA, LDA, KL,\n     $                  KU, RESET, TRANSL )\n*\n*  Generates values for an M by N matrix A within the bandwidth\n*  defined by KL and KU.\n*  Stores the values in the array AA in the data structure required\n*  by the routine, with unwanted elements set to rogue value.\n*\n*  TYPE is 'GE', 'GB', 'SY', 'SB', 'SP', 'TR', 'TB' OR 'TP'.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Parameters ..\n      REAL               ZERO, ONE\n      PARAMETER          ( ZERO = 0.0, ONE = 1.0 )\n      REAL               ROGUE\n      PARAMETER          ( ROGUE = -1.0E10 )\n*     .. Scalar Arguments ..\n      REAL               TRANSL\n      INTEGER            KL, KU, LDA, M, N, NMAX\n      LOGICAL            RESET\n      CHARACTER*1        DIAG, UPLO\n      CHARACTER*2        TYPE\n*     .. Array Arguments ..\n      REAL               A( NMAX, * ), AA( * )\n*     .. Local Scalars ..\n      INTEGER            I, I1, I2, I3, IBEG, IEND, IOFF, J, KK\n      LOGICAL            GEN, LOWER, SYM, TRI, UNIT, UPPER\n*     .. External Functions ..\n      REAL               SBEG\n      EXTERNAL           SBEG\n*     .. Intrinsic Functions ..\n      INTRINSIC          MAX, MIN\n*     .. Executable Statements ..\n      GEN = TYPE( 1: 1 ).EQ.'G'\n      SYM = TYPE( 1: 1 ).EQ.'S'\n      TRI = TYPE( 1: 1 ).EQ.'T'\n      UPPER = ( SYM.OR.TRI ).AND.UPLO.EQ.'U'\n      LOWER = ( SYM.OR.TRI ).AND.UPLO.EQ.'L'\n      UNIT = TRI.AND.DIAG.EQ.'U'\n*\n*     Generate data in array A.\n*\n      DO 20 J = 1, N\n         DO 10 I = 1, M\n            IF( GEN.OR.( UPPER.AND.I.LE.J ).OR.( LOWER.AND.I.GE.J ) )\n     $          THEN\n               IF( ( I.LE.J.AND.J - I.LE.KU ).OR.\n     $             ( I.GE.J.AND.I - J.LE.KL ) )THEN\n                  A( I, J ) = SBEG( RESET ) + TRANSL\n               ELSE\n                  A( I, J ) = ZERO\n               END IF\n               IF( I.NE.J )THEN\n                  IF( SYM )THEN\n                     A( J, I ) = A( I, J )\n                  ELSE IF( TRI )THEN\n                     A( J, I ) = ZERO\n                  END IF\n               END IF\n            END IF\n   10    CONTINUE\n         IF( TRI )\n     $      A( J, J ) = A( J, J ) + ONE\n         IF( UNIT )\n     $      A( J, J ) = ONE\n   20 CONTINUE\n*\n*     Store elements in array AS in data structure required by routine.\n*\n      IF( TYPE.EQ.'GE' )THEN\n         DO 50 J = 1, N\n            DO 30 I = 1, M\n               AA( I + ( J - 1 )*LDA ) = A( I, J )\n   30       CONTINUE\n            DO 40 I = M + 1, LDA\n               AA( I + ( J - 1 )*LDA ) = ROGUE\n   40       CONTINUE\n   50    CONTINUE\n      ELSE IF( TYPE.EQ.'GB' )THEN\n         DO 90 J = 1, N\n            DO 60 I1 = 1, KU + 1 - J\n               AA( I1 + ( J - 1 )*LDA ) = ROGUE\n   60       CONTINUE\n            DO 70 I2 = I1, MIN( KL + KU + 1, KU + 1 + M - J )\n               AA( I2 + ( J - 1 )*LDA ) = A( I2 + J - KU - 1, J )\n   70       CONTINUE\n            DO 80 I3 = I2, LDA\n               AA( I3 + ( J - 1 )*LDA ) = ROGUE\n   80       CONTINUE\n   90    CONTINUE\n      ELSE IF( TYPE.EQ.'SY'.OR.TYPE.EQ.'TR' )THEN\n         DO 130 J = 1, N\n            IF( UPPER )THEN\n               IBEG = 1\n               IF( UNIT )THEN\n                  IEND = J - 1\n               ELSE\n                  IEND = J\n               END IF\n            ELSE\n               IF( UNIT )THEN\n                  IBEG = J + 1\n               ELSE\n                  IBEG = J\n               END IF\n               IEND = N\n            END IF\n            DO 100 I = 1, IBEG - 1\n               AA( I + ( J - 1 )*LDA ) = ROGUE\n  100       CONTINUE\n            DO 110 I = IBEG, IEND\n               AA( I + ( J - 1 )*LDA ) = A( I, J )\n  110       CONTINUE\n            DO 120 I = IEND + 1, LDA\n               AA( I + ( J - 1 )*LDA ) = ROGUE\n  120       CONTINUE\n  130    CONTINUE\n      ELSE IF( TYPE.EQ.'SB'.OR.TYPE.EQ.'TB' )THEN\n         DO 170 J = 1, N\n            IF( UPPER )THEN\n               KK = KL + 1\n               IBEG = MAX( 1, KL + 2 - J )\n               IF( UNIT )THEN\n                  IEND = KL\n               ELSE\n                  IEND = KL + 1\n               END IF\n            ELSE\n               KK = 1\n               IF( UNIT )THEN\n                  IBEG = 2\n               ELSE\n                  IBEG = 1\n               END IF\n               IEND = MIN( KL + 1, 1 + M - J )\n            END IF\n            DO 140 I = 1, IBEG - 1\n               AA( I + ( J - 1 )*LDA ) = ROGUE\n  140       CONTINUE\n            DO 150 I = IBEG, IEND\n               AA( I + ( J - 1 )*LDA ) = A( I + J - KK, J )\n  150       CONTINUE\n            DO 160 I = IEND + 1, LDA\n               AA( I + ( J - 1 )*LDA ) = ROGUE\n  160       CONTINUE\n  170    CONTINUE\n      ELSE IF( TYPE.EQ.'SP'.OR.TYPE.EQ.'TP' )THEN\n         IOFF = 0\n         DO 190 J = 1, N\n            IF( UPPER )THEN\n               IBEG = 1\n               IEND = J\n            ELSE\n               IBEG = J\n               IEND = N\n            END IF\n            DO 180 I = IBEG, IEND\n               IOFF = IOFF + 1\n               AA( IOFF ) = A( I, J )\n               IF( I.EQ.J )THEN\n                  IF( UNIT )\n     $               AA( IOFF ) = ROGUE\n               END IF\n  180       CONTINUE\n  190    CONTINUE\n      END IF\n      RETURN\n*\n*     End of SMAKE.\n*\n      END\n      SUBROUTINE SMVCH( TRANS, M, N, ALPHA, A, NMAX, X, INCX, BETA, Y,\n     $                  INCY, YT, G, YY, EPS, ERR, FATAL, NOUT, MV )\n*\n*  Checks the results of the computational tests.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Parameters ..\n      REAL               ZERO, ONE\n      PARAMETER          ( ZERO = 0.0, ONE = 1.0 )\n*     .. Scalar Arguments ..\n      REAL               ALPHA, BETA, EPS, ERR\n      INTEGER            INCX, INCY, M, N, NMAX, NOUT\n      LOGICAL            FATAL, MV\n      CHARACTER*1        TRANS\n*     .. Array Arguments ..\n      REAL               A( NMAX, * ), G( * ), X( * ), Y( * ), YT( * ),\n     $                   YY( * )\n*     .. Local Scalars ..\n      REAL               ERRI\n      INTEGER            I, INCXL, INCYL, IY, J, JX, KX, KY, ML, NL\n      LOGICAL            TRAN\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, MAX, SQRT\n*     .. Executable Statements ..\n      TRAN = TRANS.EQ.'T'.OR.TRANS.EQ.'C'\n      IF( TRAN )THEN\n         ML = N\n         NL = M\n      ELSE\n         ML = M\n         NL = N\n      END IF\n      IF( INCX.LT.0 )THEN\n         KX = NL\n         INCXL = -1\n      ELSE\n         KX = 1\n         INCXL = 1\n      END IF\n      IF( INCY.LT.0 )THEN\n         KY = ML\n         INCYL = -1\n      ELSE\n         KY = 1\n         INCYL = 1\n      END IF\n*\n*     Compute expected result in YT using data in A, X and Y.\n*     Compute gauges in G.\n*\n      IY = KY\n      DO 30 I = 1, ML\n         YT( IY ) = ZERO\n         G( IY ) = ZERO\n         JX = KX\n         IF( TRAN )THEN\n            DO 10 J = 1, NL\n               YT( IY ) = YT( IY ) + A( J, I )*X( JX )\n               G( IY ) = G( IY ) + ABS( A( J, I )*X( JX ) )\n               JX = JX + INCXL\n   10       CONTINUE\n         ELSE\n            DO 20 J = 1, NL\n               YT( IY ) = YT( IY ) + A( I, J )*X( JX )\n               G( IY ) = G( IY ) + ABS( A( I, J )*X( JX ) )\n               JX = JX + INCXL\n   20       CONTINUE\n         END IF\n         YT( IY ) = ALPHA*YT( IY ) + BETA*Y( IY )\n         G( IY ) = ABS( ALPHA )*G( IY ) + ABS( BETA*Y( IY ) )\n         IY = IY + INCYL\n   30 CONTINUE\n*\n*     Compute the error ratio for this result.\n*\n      ERR = ZERO\n      DO 40 I = 1, ML\n         ERRI = ABS( YT( I ) - YY( 1 + ( I - 1 )*ABS( INCY ) ) )/EPS\n         IF( G( I ).NE.ZERO )\n     $      ERRI = ERRI/G( I )\n         ERR = MAX( ERR, ERRI )\n         IF( ERR*SQRT( EPS ).GE.ONE )\n     $      GO TO 50\n   40 CONTINUE\n*     If the loop completes, all results are at least half accurate.\n      GO TO 70\n*\n*     Report fatal error.\n*\n   50 FATAL = .TRUE.\n      WRITE( NOUT, FMT = 9999 )\n      DO 60 I = 1, ML\n         IF( MV )THEN\n            WRITE( NOUT, FMT = 9998 )I, YT( I ),\n     $         YY( 1 + ( I - 1 )*ABS( INCY ) )\n         ELSE\n            WRITE( NOUT, FMT = 9998 )I, \n     $         YY( 1 + ( I - 1 )*ABS( INCY ) ), YT(I)\n         END IF\n   60 CONTINUE\n*\n   70 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ******* FATAL ERROR - COMPUTED RESULT IS LESS THAN HAL',\n     $      'F ACCURATE *******', /'           EXPECTED RESULT   COMPU',\n     $      'TED RESULT' )\n 9998 FORMAT( 1X, I7, 2G18.6 )\n*\n*     End of SMVCH.\n*\n      END\n      LOGICAL FUNCTION LSE( RI, RJ, LR )\n*\n*  Tests if two arrays are identical.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Scalar Arguments ..\n      INTEGER            LR\n*     .. Array Arguments ..\n      REAL               RI( * ), RJ( * )\n*     .. Local Scalars ..\n      INTEGER            I\n*     .. Executable Statements ..\n      DO 10 I = 1, LR\n         IF( RI( I ).NE.RJ( I ) )\n     $      GO TO 20\n   10 CONTINUE\n      LSE = .TRUE.\n      GO TO 30\n   20 CONTINUE\n      LSE = .FALSE.\n   30 RETURN\n*\n*     End of LSE.\n*\n      END\n      LOGICAL FUNCTION LSERES( TYPE, UPLO, M, N, AA, AS, LDA )\n*\n*  Tests if selected elements in two arrays are equal.\n*\n*  TYPE is 'GE', 'SY' or 'SP'.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Scalar Arguments ..\n      INTEGER            LDA, M, N\n      CHARACTER*1        UPLO\n      CHARACTER*2        TYPE\n*     .. Array Arguments ..\n      REAL               AA( LDA, * ), AS( LDA, * )\n*     .. Local Scalars ..\n      INTEGER            I, IBEG, IEND, J\n      LOGICAL            UPPER\n*     .. Executable Statements ..\n      UPPER = UPLO.EQ.'U'\n      IF( TYPE.EQ.'GE' )THEN\n         DO 20 J = 1, N\n            DO 10 I = M + 1, LDA\n               IF( AA( I, J ).NE.AS( I, J ) )\n     $            GO TO 70\n   10       CONTINUE\n   20    CONTINUE\n      ELSE IF( TYPE.EQ.'SY' )THEN\n         DO 50 J = 1, N\n            IF( UPPER )THEN\n               IBEG = 1\n               IEND = J\n            ELSE\n               IBEG = J\n               IEND = N\n            END IF\n            DO 30 I = 1, IBEG - 1\n               IF( AA( I, J ).NE.AS( I, J ) )\n     $            GO TO 70\n   30       CONTINUE\n            DO 40 I = IEND + 1, LDA\n               IF( AA( I, J ).NE.AS( I, J ) )\n     $            GO TO 70\n   40       CONTINUE\n   50    CONTINUE\n      END IF\n*\n      LSERES = .TRUE.\n      GO TO 80\n   70 CONTINUE\n      LSERES = .FALSE.\n   80 RETURN\n*\n*     End of LSERES.\n*\n      END\n      REAL FUNCTION SBEG( RESET )\n*\n*  Generates random numbers uniformly distributed between -0.5 and 0.5.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Scalar Arguments ..\n      LOGICAL            RESET\n*     .. Local Scalars ..\n      INTEGER            I, IC, MI\n*     .. Save statement ..\n      SAVE               I, IC, MI\n*     .. Intrinsic Functions ..\n      INTRINSIC          REAL\n*     .. Executable Statements ..\n      IF( RESET )THEN\n*        Initialize local variables.\n         MI = 891\n         I = 7\n         IC = 0\n         RESET = .FALSE.\n      END IF\n*\n*     The sequence of values of I is bounded between 1 and 999.\n*     If initial I = 1,2,3,6,7 or 9, the period will be 50.\n*     If initial I = 4 or 8, the period will be 25.\n*     If initial I = 5, the period will be 10.\n*     IC is used to break up the period by skipping 1 value of I in 6.\n*\n      IC = IC + 1\n   10 I = I*MI\n      I = I - 1000*( I/1000 )\n      IF( IC.GE.5 )THEN\n         IC = 0\n         GO TO 10\n      END IF\n      SBEG = REAL( I - 500 )/1001.0\n      RETURN\n*\n*     End of SBEG.\n*\n      END\n      REAL FUNCTION SDIFF( X, Y )\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*\n*     .. Scalar Arguments ..\n      REAL               X, Y\n*     .. Executable Statements ..\n      SDIFF = X - Y\n      RETURN\n*\n*     End of SDIFF.\n*\n      END\n      SUBROUTINE CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n*\n*  Tests whether XERBLA has detected an error when it should.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Scalar Arguments ..\n      INTEGER            INFOT, NOUT\n      LOGICAL            LERR, OK\n      CHARACTER*6        SRNAMT\n*     .. Executable Statements ..\n      IF( .NOT.LERR )THEN\n         WRITE( NOUT, FMT = 9999 )INFOT, SRNAMT\n         OK = .FALSE.\n      END IF\n      LERR = .FALSE.\n      RETURN\n*\n 9999 FORMAT( ' ***** ILLEGAL VALUE OF PARAMETER NUMBER ', I2, ' NOT D',\n     $      'ETECTED BY ', A6, ' *****' )\n*\n*     End of CHKXER.\n*\n      END\n      SUBROUTINE XERBLA( SRNAME, INFO )\n*\n*  This is a special version of XERBLA to be used only as part of\n*  the test program for testing error exits from the Level 2 BLAS\n*  routines.\n*\n*  XERBLA  is an error handler for the Level 2 BLAS routines.\n*\n*  It is called by the Level 2 BLAS routines if an input parameter is\n*  invalid.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Scalar Arguments ..\n      INTEGER            INFO\n      CHARACTER*6        SRNAME\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUT\n      LOGICAL            LERR, OK\n      CHARACTER*6        SRNAMT\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUT, OK, LERR\n      COMMON             /SRNAMC/SRNAMT\n*     .. Executable Statements ..\n      LERR = .TRUE.\n      IF( INFO.NE.INFOT )THEN\n         IF( INFOT.NE.0 )THEN\n            WRITE( NOUT, FMT = 9999 )INFO, INFOT\n         ELSE\n            WRITE( NOUT, FMT = 9997 )INFO\n         END IF\n         OK = .FALSE.\n      END IF\n      IF( SRNAME.NE.SRNAMT )THEN\n         WRITE( NOUT, FMT = 9998 )SRNAME, SRNAMT\n         OK = .FALSE.\n      END IF\n      RETURN\n*\n 9999 FORMAT( ' ******* XERBLA WAS CALLED WITH INFO = ', I6, ' INSTEAD',\n     $      ' OF ', I2, ' *******' )\n 9998 FORMAT( ' ******* XERBLA WAS CALLED WITH SRNAME = ', A6, ' INSTE',\n     $      'AD OF ', A6, ' *******' )\n 9997 FORMAT( ' ******* XERBLA WAS CALLED WITH INFO = ', I6,\n     $      ' *******' )\n*\n*     End of XERBLA\n*\n      END\n\n"
  },
  {
    "path": "3rdparty/eigen3/blas/testing/sblat3.f",
    "content": "*> \\brief \\b SBLAT3\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*  Definition:\n*  ===========\n*\n*       PROGRAM SBLAT3\n* \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> Test program for the REAL             Level 3 Blas.\n*>\n*> The program must be driven by a short data file. The first 14 records\n*> of the file are read using list-directed input, the last 6 records\n*> are read using the format ( A6, L2 ). An annotated example of a data\n*> file can be obtained by deleting the first 3 characters from the\n*> following 20 lines:\n*> 'sblat3.out'      NAME OF SUMMARY OUTPUT FILE\n*> 6                 UNIT NUMBER OF SUMMARY FILE\n*> 'SBLAT3.SNAP'     NAME OF SNAPSHOT OUTPUT FILE\n*> -1                UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)\n*> F        LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.\n*> F        LOGICAL FLAG, T TO STOP ON FAILURES.\n*> T        LOGICAL FLAG, T TO TEST ERROR EXITS.\n*> 16.0     THRESHOLD VALUE OF TEST RATIO\n*> 6                 NUMBER OF VALUES OF N\n*> 0 1 2 3 5 9       VALUES OF N\n*> 3                 NUMBER OF VALUES OF ALPHA\n*> 0.0 1.0 0.7       VALUES OF ALPHA\n*> 3                 NUMBER OF VALUES OF BETA\n*> 0.0 1.0 1.3       VALUES OF BETA\n*> SGEMM  T PUT F FOR NO TEST. SAME COLUMNS.\n*> SSYMM  T PUT F FOR NO TEST. SAME COLUMNS.\n*> STRMM  T PUT F FOR NO TEST. SAME COLUMNS.\n*> STRSM  T PUT F FOR NO TEST. SAME COLUMNS.\n*> SSYRK  T PUT F FOR NO TEST. SAME COLUMNS.\n*> SSYR2K T PUT F FOR NO TEST. SAME COLUMNS.\n*>\n*> Further Details\n*> ===============\n*>\n*> See:\n*>\n*>    Dongarra J. J., Du Croz J. J., Duff I. S. and Hammarling S.\n*>    A Set of Level 3 Basic Linear Algebra Subprograms.\n*>\n*>    Technical Memorandum No.88 (Revision 1), Mathematics and\n*>    Computer Science Division, Argonne National Laboratory, 9700\n*>    South Cass Avenue, Argonne, Illinois 60439, US.\n*>\n*> -- Written on 8-February-1989.\n*>    Jack Dongarra, Argonne National Laboratory.\n*>    Iain Duff, AERE Harwell.\n*>    Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*>    Sven Hammarling, Numerical Algorithms Group Ltd.\n*>\n*>    10-9-00:  Change STATUS='NEW' to 'UNKNOWN' so that the testers\n*>              can be run multiple times without deleting generated\n*>              output files (susan)\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date April 2012\n*\n*> \\ingroup single_blas_testing\n*\n*  =====================================================================\n      PROGRAM SBLAT3\n*\n*  -- Reference BLAS test routine (version 3.4.1) --\n*  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     April 2012\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      INTEGER            NIN\n      PARAMETER          ( NIN = 5 )\n      INTEGER            NSUBS\n      PARAMETER          ( NSUBS = 6 )\n      REAL               ZERO, ONE\n      PARAMETER          ( ZERO = 0.0, ONE = 1.0 )\n      INTEGER            NMAX\n      PARAMETER          ( NMAX = 65 )\n      INTEGER            NIDMAX, NALMAX, NBEMAX\n      PARAMETER          ( NIDMAX = 9, NALMAX = 7, NBEMAX = 7 )\n*     .. Local Scalars ..\n      REAL               EPS, ERR, THRESH\n      INTEGER            I, ISNUM, J, N, NALF, NBET, NIDIM, NOUT, NTRA\n      LOGICAL            FATAL, LTESTT, REWI, SAME, SFATAL, TRACE,\n     $                   TSTERR\n      CHARACTER*1        TRANSA, TRANSB\n      CHARACTER*6        SNAMET\n      CHARACTER*32       SNAPS, SUMMRY\n*     .. Local Arrays ..\n      REAL               AA( NMAX*NMAX ), AB( NMAX, 2*NMAX ),\n     $                   ALF( NALMAX ), AS( NMAX*NMAX ),\n     $                   BB( NMAX*NMAX ), BET( NBEMAX ),\n     $                   BS( NMAX*NMAX ), C( NMAX, NMAX ),\n     $                   CC( NMAX*NMAX ), CS( NMAX*NMAX ), CT( NMAX ),\n     $                   G( NMAX ), W( 2*NMAX )\n      INTEGER            IDIM( NIDMAX )\n      LOGICAL            LTEST( NSUBS )\n      CHARACTER*6        SNAMES( NSUBS )\n*     .. External Functions ..\n      REAL               SDIFF\n      LOGICAL            LSE\n      EXTERNAL           SDIFF, LSE\n*     .. External Subroutines ..\n      EXTERNAL           SCHK1, SCHK2, SCHK3, SCHK4, SCHK5, SCHKE, SMMCH\n*     .. Intrinsic Functions ..\n      INTRINSIC          MAX, MIN\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n      CHARACTER*6        SRNAMT\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n      COMMON             /SRNAMC/SRNAMT\n*     .. Data statements ..\n      DATA               SNAMES/'SGEMM ', 'SSYMM ', 'STRMM ', 'STRSM ',\n     $                   'SSYRK ', 'SSYR2K'/\n*     .. Executable Statements ..\n*\n*     Read name and unit number for summary output file and open file.\n*\n      READ( NIN, FMT = * )SUMMRY\n      READ( NIN, FMT = * )NOUT\n      OPEN( NOUT, FILE = SUMMRY )\n      NOUTC = NOUT\n*\n*     Read name and unit number for snapshot output file and open file.\n*\n      READ( NIN, FMT = * )SNAPS\n      READ( NIN, FMT = * )NTRA\n      TRACE = NTRA.GE.0\n      IF( TRACE )THEN\n         OPEN( NTRA, FILE = SNAPS )\n      END IF\n*     Read the flag that directs rewinding of the snapshot file.\n      READ( NIN, FMT = * )REWI\n      REWI = REWI.AND.TRACE\n*     Read the flag that directs stopping on any failure.\n      READ( NIN, FMT = * )SFATAL\n*     Read the flag that indicates whether error exits are to be tested.\n      READ( NIN, FMT = * )TSTERR\n*     Read the threshold value of the test ratio\n      READ( NIN, FMT = * )THRESH\n*\n*     Read and check the parameter values for the tests.\n*\n*     Values of N\n      READ( NIN, FMT = * )NIDIM\n      IF( NIDIM.LT.1.OR.NIDIM.GT.NIDMAX )THEN\n         WRITE( NOUT, FMT = 9997 )'N', NIDMAX\n         GO TO 220\n      END IF\n      READ( NIN, FMT = * )( IDIM( I ), I = 1, NIDIM )\n      DO 10 I = 1, NIDIM\n         IF( IDIM( I ).LT.0.OR.IDIM( I ).GT.NMAX )THEN\n            WRITE( NOUT, FMT = 9996 )NMAX\n            GO TO 220\n         END IF\n   10 CONTINUE\n*     Values of ALPHA\n      READ( NIN, FMT = * )NALF\n      IF( NALF.LT.1.OR.NALF.GT.NALMAX )THEN\n         WRITE( NOUT, FMT = 9997 )'ALPHA', NALMAX\n         GO TO 220\n      END IF\n      READ( NIN, FMT = * )( ALF( I ), I = 1, NALF )\n*     Values of BETA\n      READ( NIN, FMT = * )NBET\n      IF( NBET.LT.1.OR.NBET.GT.NBEMAX )THEN\n         WRITE( NOUT, FMT = 9997 )'BETA', NBEMAX\n         GO TO 220\n      END IF\n      READ( NIN, FMT = * )( BET( I ), I = 1, NBET )\n*\n*     Report values of parameters.\n*\n      WRITE( NOUT, FMT = 9995 )\n      WRITE( NOUT, FMT = 9994 )( IDIM( I ), I = 1, NIDIM )\n      WRITE( NOUT, FMT = 9993 )( ALF( I ), I = 1, NALF )\n      WRITE( NOUT, FMT = 9992 )( BET( I ), I = 1, NBET )\n      IF( .NOT.TSTERR )THEN\n         WRITE( NOUT, FMT = * )\n         WRITE( NOUT, FMT = 9984 )\n      END IF\n      WRITE( NOUT, FMT = * )\n      WRITE( NOUT, FMT = 9999 )THRESH\n      WRITE( NOUT, FMT = * )\n*\n*     Read names of subroutines and flags which indicate\n*     whether they are to be tested.\n*\n      DO 20 I = 1, NSUBS\n         LTEST( I ) = .FALSE.\n   20 CONTINUE\n   30 READ( NIN, FMT = 9988, END = 60 )SNAMET, LTESTT\n      DO 40 I = 1, NSUBS\n         IF( SNAMET.EQ.SNAMES( I ) )\n     $      GO TO 50\n   40 CONTINUE\n      WRITE( NOUT, FMT = 9990 )SNAMET\n      STOP\n   50 LTEST( I ) = LTESTT\n      GO TO 30\n*\n   60 CONTINUE\n      CLOSE ( NIN )\n*\n*     Compute EPS (the machine precision).\n*\n      EPS = EPSILON(ZERO)\n      WRITE( NOUT, FMT = 9998 )EPS\n*\n*     Check the reliability of SMMCH using exact data.\n*\n      N = MIN( 32, NMAX )\n      DO 100 J = 1, N\n         DO 90 I = 1, N\n            AB( I, J ) = MAX( I - J + 1, 0 )\n   90    CONTINUE\n         AB( J, NMAX + 1 ) = J\n         AB( 1, NMAX + J ) = J\n         C( J, 1 ) = ZERO\n  100 CONTINUE\n      DO 110 J = 1, N\n         CC( J ) = J*( ( J + 1 )*J )/2 - ( ( J + 1 )*J*( J - 1 ) )/3\n  110 CONTINUE\n*     CC holds the exact result. On exit from SMMCH CT holds\n*     the result computed by SMMCH.\n      TRANSA = 'N'\n      TRANSB = 'N'\n      CALL SMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,\n     $            AB( 1, NMAX + 1 ), NMAX, ZERO, C, NMAX, CT, G, CC,\n     $            NMAX, EPS, ERR, FATAL, NOUT, .TRUE. )\n      SAME = LSE( CC, CT, N )\n      IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN\n         WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR\n         STOP\n      END IF\n      TRANSB = 'T'\n      CALL SMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,\n     $            AB( 1, NMAX + 1 ), NMAX, ZERO, C, NMAX, CT, G, CC,\n     $            NMAX, EPS, ERR, FATAL, NOUT, .TRUE. )\n      SAME = LSE( CC, CT, N )\n      IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN\n         WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR\n         STOP\n      END IF\n      DO 120 J = 1, N\n         AB( J, NMAX + 1 ) = N - J + 1\n         AB( 1, NMAX + J ) = N - J + 1\n  120 CONTINUE\n      DO 130 J = 1, N\n         CC( N - J + 1 ) = J*( ( J + 1 )*J )/2 -\n     $                     ( ( J + 1 )*J*( J - 1 ) )/3\n  130 CONTINUE\n      TRANSA = 'T'\n      TRANSB = 'N'\n      CALL SMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,\n     $            AB( 1, NMAX + 1 ), NMAX, ZERO, C, NMAX, CT, G, CC,\n     $            NMAX, EPS, ERR, FATAL, NOUT, .TRUE. )\n      SAME = LSE( CC, CT, N )\n      IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN\n         WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR\n         STOP\n      END IF\n      TRANSB = 'T'\n      CALL SMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,\n     $            AB( 1, NMAX + 1 ), NMAX, ZERO, C, NMAX, CT, G, CC,\n     $            NMAX, EPS, ERR, FATAL, NOUT, .TRUE. )\n      SAME = LSE( CC, CT, N )\n      IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN\n         WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR\n         STOP\n      END IF\n*\n*     Test each subroutine in turn.\n*\n      DO 200 ISNUM = 1, NSUBS\n         WRITE( NOUT, FMT = * )\n         IF( .NOT.LTEST( ISNUM ) )THEN\n*           Subprogram is not to be tested.\n            WRITE( NOUT, FMT = 9987 )SNAMES( ISNUM )\n         ELSE\n            SRNAMT = SNAMES( ISNUM )\n*           Test error exits.\n            IF( TSTERR )THEN\n               CALL SCHKE( ISNUM, SNAMES( ISNUM ), NOUT )\n               WRITE( NOUT, FMT = * )\n            END IF\n*           Test computations.\n            INFOT = 0\n            OK = .TRUE.\n            FATAL = .FALSE.\n            GO TO ( 140, 150, 160, 160, 170, 180 )ISNUM\n*           Test SGEMM, 01.\n  140       CALL SCHK1( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET,\n     $                  NMAX, AB, AA, AS, AB( 1, NMAX + 1 ), BB, BS, C,\n     $                  CC, CS, CT, G )\n            GO TO 190\n*           Test SSYMM, 02.\n  150       CALL SCHK2( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET,\n     $                  NMAX, AB, AA, AS, AB( 1, NMAX + 1 ), BB, BS, C,\n     $                  CC, CS, CT, G )\n            GO TO 190\n*           Test STRMM, 03, STRSM, 04.\n  160       CALL SCHK3( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NALF, ALF, NMAX, AB,\n     $                  AA, AS, AB( 1, NMAX + 1 ), BB, BS, CT, G, C )\n            GO TO 190\n*           Test SSYRK, 05.\n  170       CALL SCHK4( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET,\n     $                  NMAX, AB, AA, AS, AB( 1, NMAX + 1 ), BB, BS, C,\n     $                  CC, CS, CT, G )\n            GO TO 190\n*           Test SSYR2K, 06.\n  180       CALL SCHK5( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET,\n     $                  NMAX, AB, AA, AS, BB, BS, C, CC, CS, CT, G, W )\n            GO TO 190\n*\n  190       IF( FATAL.AND.SFATAL )\n     $         GO TO 210\n         END IF\n  200 CONTINUE\n      WRITE( NOUT, FMT = 9986 )\n      GO TO 230\n*\n  210 CONTINUE\n      WRITE( NOUT, FMT = 9985 )\n      GO TO 230\n*\n  220 CONTINUE\n      WRITE( NOUT, FMT = 9991 )\n*\n  230 CONTINUE\n      IF( TRACE )\n     $   CLOSE ( NTRA )\n      CLOSE ( NOUT )\n      STOP\n*\n 9999 FORMAT( ' ROUTINES PASS COMPUTATIONAL TESTS IF TEST RATIO IS LES',\n     $      'S THAN', F8.2 )\n 9998 FORMAT( ' RELATIVE MACHINE PRECISION IS TAKEN TO BE', 1P, E9.1 )\n 9997 FORMAT( ' NUMBER OF VALUES OF ', A, ' IS LESS THAN 1 OR GREATER ',\n     $      'THAN ', I2 )\n 9996 FORMAT( ' VALUE OF N IS LESS THAN 0 OR GREATER THAN ', I2 )\n 9995 FORMAT( ' TESTS OF THE REAL             LEVEL 3 BLAS', //' THE F',\n     $      'OLLOWING PARAMETER VALUES WILL BE USED:' )\n 9994 FORMAT( '   FOR N              ', 9I6 )\n 9993 FORMAT( '   FOR ALPHA          ', 7F6.1 )\n 9992 FORMAT( '   FOR BETA           ', 7F6.1 )\n 9991 FORMAT( ' AMEND DATA FILE OR INCREASE ARRAY SIZES IN PROGRAM',\n     $      /' ******* TESTS ABANDONED *******' )\n 9990 FORMAT( ' SUBPROGRAM NAME ', A6, ' NOT RECOGNIZED', /' ******* T',\n     $      'ESTS ABANDONED *******' )\n 9989 FORMAT( ' ERROR IN SMMCH -  IN-LINE DOT PRODUCTS ARE BEING EVALU',\n     $      'ATED WRONGLY.', /' SMMCH WAS CALLED WITH TRANSA = ', A1,\n     $      ' AND TRANSB = ', A1, /' AND RETURNED SAME = ', L1, ' AND ',\n     $      'ERR = ', F12.3, '.', /' THIS MAY BE DUE TO FAULTS IN THE ',\n     $      'ARITHMETIC OR THE COMPILER.', /' ******* TESTS ABANDONED ',\n     $      '*******' )\n 9988 FORMAT( A6, L2 )\n 9987 FORMAT( 1X, A6, ' WAS NOT TESTED' )\n 9986 FORMAT( /' END OF TESTS' )\n 9985 FORMAT( /' ******* FATAL ERROR - TESTS ABANDONED *******' )\n 9984 FORMAT( ' ERROR-EXITS WILL NOT BE TESTED' )\n*\n*     End of SBLAT3.\n*\n      END\n      SUBROUTINE SCHK1( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET, NMAX,\n     $                  A, AA, AS, B, BB, BS, C, CC, CS, CT, G )\n*\n*  Tests SGEMM.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Parameters ..\n      REAL               ZERO\n      PARAMETER          ( ZERO = 0.0 )\n*     .. Scalar Arguments ..\n      REAL               EPS, THRESH\n      INTEGER            NALF, NBET, NIDIM, NMAX, NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      REAL               A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),\n     $                   AS( NMAX*NMAX ), B( NMAX, NMAX ),\n     $                   BB( NMAX*NMAX ), BET( NBET ), BS( NMAX*NMAX ),\n     $                   C( NMAX, NMAX ), CC( NMAX*NMAX ),\n     $                   CS( NMAX*NMAX ), CT( NMAX ), G( NMAX )\n      INTEGER            IDIM( NIDIM )\n*     .. Local Scalars ..\n      REAL               ALPHA, ALS, BETA, BLS, ERR, ERRMAX\n      INTEGER            I, IA, IB, ICA, ICB, IK, IM, IN, K, KS, LAA,\n     $                   LBB, LCC, LDA, LDAS, LDB, LDBS, LDC, LDCS, M,\n     $                   MA, MB, MS, N, NA, NARGS, NB, NC, NS\n      LOGICAL            NULL, RESET, SAME, TRANA, TRANB\n      CHARACTER*1        TRANAS, TRANBS, TRANSA, TRANSB\n      CHARACTER*3        ICH\n*     .. Local Arrays ..\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LSE, LSERES\n      EXTERNAL           LSE, LSERES\n*     .. External Subroutines ..\n      EXTERNAL           SGEMM, SMAKE, SMMCH\n*     .. Intrinsic Functions ..\n      INTRINSIC          MAX\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICH/'NTC'/\n*     .. Executable Statements ..\n*\n      NARGS = 13\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = ZERO\n*\n      DO 110 IM = 1, NIDIM\n         M = IDIM( IM )\n*\n         DO 100 IN = 1, NIDIM\n            N = IDIM( IN )\n*           Set LDC to 1 more than minimum value if room.\n            LDC = M\n            IF( LDC.LT.NMAX )\n     $         LDC = LDC + 1\n*           Skip tests if not enough room.\n            IF( LDC.GT.NMAX )\n     $         GO TO 100\n            LCC = LDC*N\n            NULL = N.LE.0.OR.M.LE.0\n*\n            DO 90 IK = 1, NIDIM\n               K = IDIM( IK )\n*\n               DO 80 ICA = 1, 3\n                  TRANSA = ICH( ICA: ICA )\n                  TRANA = TRANSA.EQ.'T'.OR.TRANSA.EQ.'C'\n*\n                  IF( TRANA )THEN\n                     MA = K\n                     NA = M\n                  ELSE\n                     MA = M\n                     NA = K\n                  END IF\n*                 Set LDA to 1 more than minimum value if room.\n                  LDA = MA\n                  IF( LDA.LT.NMAX )\n     $               LDA = LDA + 1\n*                 Skip tests if not enough room.\n                  IF( LDA.GT.NMAX )\n     $               GO TO 80\n                  LAA = LDA*NA\n*\n*                 Generate the matrix A.\n*\n                  CALL SMAKE( 'GE', ' ', ' ', MA, NA, A, NMAX, AA, LDA,\n     $                        RESET, ZERO )\n*\n                  DO 70 ICB = 1, 3\n                     TRANSB = ICH( ICB: ICB )\n                     TRANB = TRANSB.EQ.'T'.OR.TRANSB.EQ.'C'\n*\n                     IF( TRANB )THEN\n                        MB = N\n                        NB = K\n                     ELSE\n                        MB = K\n                        NB = N\n                     END IF\n*                    Set LDB to 1 more than minimum value if room.\n                     LDB = MB\n                     IF( LDB.LT.NMAX )\n     $                  LDB = LDB + 1\n*                    Skip tests if not enough room.\n                     IF( LDB.GT.NMAX )\n     $                  GO TO 70\n                     LBB = LDB*NB\n*\n*                    Generate the matrix B.\n*\n                     CALL SMAKE( 'GE', ' ', ' ', MB, NB, B, NMAX, BB,\n     $                           LDB, RESET, ZERO )\n*\n                     DO 60 IA = 1, NALF\n                        ALPHA = ALF( IA )\n*\n                        DO 50 IB = 1, NBET\n                           BETA = BET( IB )\n*\n*                          Generate the matrix C.\n*\n                           CALL SMAKE( 'GE', ' ', ' ', M, N, C, NMAX,\n     $                                 CC, LDC, RESET, ZERO )\n*\n                           NC = NC + 1\n*\n*                          Save every datum before calling the\n*                          subroutine.\n*\n                           TRANAS = TRANSA\n                           TRANBS = TRANSB\n                           MS = M\n                           NS = N\n                           KS = K\n                           ALS = ALPHA\n                           DO 10 I = 1, LAA\n                              AS( I ) = AA( I )\n   10                      CONTINUE\n                           LDAS = LDA\n                           DO 20 I = 1, LBB\n                              BS( I ) = BB( I )\n   20                      CONTINUE\n                           LDBS = LDB\n                           BLS = BETA\n                           DO 30 I = 1, LCC\n                              CS( I ) = CC( I )\n   30                      CONTINUE\n                           LDCS = LDC\n*\n*                          Call the subroutine.\n*\n                           IF( TRACE )\n     $                        WRITE( NTRA, FMT = 9995 )NC, SNAME,\n     $                        TRANSA, TRANSB, M, N, K, ALPHA, LDA, LDB,\n     $                        BETA, LDC\n                           IF( REWI )\n     $                        REWIND NTRA\n                           CALL SGEMM( TRANSA, TRANSB, M, N, K, ALPHA,\n     $                                 AA, LDA, BB, LDB, BETA, CC, LDC )\n*\n*                          Check if error-exit was taken incorrectly.\n*\n                           IF( .NOT.OK )THEN\n                              WRITE( NOUT, FMT = 9994 )\n                              FATAL = .TRUE.\n                              GO TO 120\n                           END IF\n*\n*                          See what data changed inside subroutines.\n*\n                           ISAME( 1 ) = TRANSA.EQ.TRANAS\n                           ISAME( 2 ) = TRANSB.EQ.TRANBS\n                           ISAME( 3 ) = MS.EQ.M\n                           ISAME( 4 ) = NS.EQ.N\n                           ISAME( 5 ) = KS.EQ.K\n                           ISAME( 6 ) = ALS.EQ.ALPHA\n                           ISAME( 7 ) = LSE( AS, AA, LAA )\n                           ISAME( 8 ) = LDAS.EQ.LDA\n                           ISAME( 9 ) = LSE( BS, BB, LBB )\n                           ISAME( 10 ) = LDBS.EQ.LDB\n                           ISAME( 11 ) = BLS.EQ.BETA\n                           IF( NULL )THEN\n                              ISAME( 12 ) = LSE( CS, CC, LCC )\n                           ELSE\n                              ISAME( 12 ) = LSERES( 'GE', ' ', M, N, CS,\n     $                                      CC, LDC )\n                           END IF\n                           ISAME( 13 ) = LDCS.EQ.LDC\n*\n*                          If data was incorrectly changed, report\n*                          and return.\n*\n                           SAME = .TRUE.\n                           DO 40 I = 1, NARGS\n                              SAME = SAME.AND.ISAME( I )\n                              IF( .NOT.ISAME( I ) )\n     $                           WRITE( NOUT, FMT = 9998 )I\n   40                      CONTINUE\n                           IF( .NOT.SAME )THEN\n                              FATAL = .TRUE.\n                              GO TO 120\n                           END IF\n*\n                           IF( .NOT.NULL )THEN\n*\n*                             Check the result.\n*\n                              CALL SMMCH( TRANSA, TRANSB, M, N, K,\n     $                                    ALPHA, A, NMAX, B, NMAX, BETA,\n     $                                    C, NMAX, CT, G, CC, LDC, EPS,\n     $                                    ERR, FATAL, NOUT, .TRUE. )\n                              ERRMAX = MAX( ERRMAX, ERR )\n*                             If got really bad answer, report and\n*                             return.\n                              IF( FATAL )\n     $                           GO TO 120\n                           END IF\n*\n   50                   CONTINUE\n*\n   60                CONTINUE\n*\n   70             CONTINUE\n*\n   80          CONTINUE\n*\n   90       CONTINUE\n*\n  100    CONTINUE\n*\n  110 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 130\n*\n  120 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      WRITE( NOUT, FMT = 9995 )NC, SNAME, TRANSA, TRANSB, M, N, K,\n     $   ALPHA, LDA, LDB, BETA, LDC\n*\n  130 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',''', A1, ''',',\n     $      3( I3, ',' ), F4.1, ', A,', I3, ', B,', I3, ',', F4.1, ', ',\n     $      'C,', I3, ').' )\n 9994 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of SCHK1.\n*\n      END\n      SUBROUTINE SCHK2( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET, NMAX,\n     $                  A, AA, AS, B, BB, BS, C, CC, CS, CT, G )\n*\n*  Tests SSYMM.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Parameters ..\n      REAL               ZERO\n      PARAMETER          ( ZERO = 0.0 )\n*     .. Scalar Arguments ..\n      REAL               EPS, THRESH\n      INTEGER            NALF, NBET, NIDIM, NMAX, NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      REAL               A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),\n     $                   AS( NMAX*NMAX ), B( NMAX, NMAX ),\n     $                   BB( NMAX*NMAX ), BET( NBET ), BS( NMAX*NMAX ),\n     $                   C( NMAX, NMAX ), CC( NMAX*NMAX ),\n     $                   CS( NMAX*NMAX ), CT( NMAX ), G( NMAX )\n      INTEGER            IDIM( NIDIM )\n*     .. Local Scalars ..\n      REAL               ALPHA, ALS, BETA, BLS, ERR, ERRMAX\n      INTEGER            I, IA, IB, ICS, ICU, IM, IN, LAA, LBB, LCC,\n     $                   LDA, LDAS, LDB, LDBS, LDC, LDCS, M, MS, N, NA,\n     $                   NARGS, NC, NS\n      LOGICAL            LEFT, NULL, RESET, SAME\n      CHARACTER*1        SIDE, SIDES, UPLO, UPLOS\n      CHARACTER*2        ICHS, ICHU\n*     .. Local Arrays ..\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LSE, LSERES\n      EXTERNAL           LSE, LSERES\n*     .. External Subroutines ..\n      EXTERNAL           SMAKE, SMMCH, SSYMM\n*     .. Intrinsic Functions ..\n      INTRINSIC          MAX\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICHS/'LR'/, ICHU/'UL'/\n*     .. Executable Statements ..\n*\n      NARGS = 12\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = ZERO\n*\n      DO 100 IM = 1, NIDIM\n         M = IDIM( IM )\n*\n         DO 90 IN = 1, NIDIM\n            N = IDIM( IN )\n*           Set LDC to 1 more than minimum value if room.\n            LDC = M\n            IF( LDC.LT.NMAX )\n     $         LDC = LDC + 1\n*           Skip tests if not enough room.\n            IF( LDC.GT.NMAX )\n     $         GO TO 90\n            LCC = LDC*N\n            NULL = N.LE.0.OR.M.LE.0\n*\n*           Set LDB to 1 more than minimum value if room.\n            LDB = M\n            IF( LDB.LT.NMAX )\n     $         LDB = LDB + 1\n*           Skip tests if not enough room.\n            IF( LDB.GT.NMAX )\n     $         GO TO 90\n            LBB = LDB*N\n*\n*           Generate the matrix B.\n*\n            CALL SMAKE( 'GE', ' ', ' ', M, N, B, NMAX, BB, LDB, RESET,\n     $                  ZERO )\n*\n            DO 80 ICS = 1, 2\n               SIDE = ICHS( ICS: ICS )\n               LEFT = SIDE.EQ.'L'\n*\n               IF( LEFT )THEN\n                  NA = M\n               ELSE\n                  NA = N\n               END IF\n*              Set LDA to 1 more than minimum value if room.\n               LDA = NA\n               IF( LDA.LT.NMAX )\n     $            LDA = LDA + 1\n*              Skip tests if not enough room.\n               IF( LDA.GT.NMAX )\n     $            GO TO 80\n               LAA = LDA*NA\n*\n               DO 70 ICU = 1, 2\n                  UPLO = ICHU( ICU: ICU )\n*\n*                 Generate the symmetric matrix A.\n*\n                  CALL SMAKE( 'SY', UPLO, ' ', NA, NA, A, NMAX, AA, LDA,\n     $                        RESET, ZERO )\n*\n                  DO 60 IA = 1, NALF\n                     ALPHA = ALF( IA )\n*\n                     DO 50 IB = 1, NBET\n                        BETA = BET( IB )\n*\n*                       Generate the matrix C.\n*\n                        CALL SMAKE( 'GE', ' ', ' ', M, N, C, NMAX, CC,\n     $                              LDC, RESET, ZERO )\n*\n                        NC = NC + 1\n*\n*                       Save every datum before calling the\n*                       subroutine.\n*\n                        SIDES = SIDE\n                        UPLOS = UPLO\n                        MS = M\n                        NS = N\n                        ALS = ALPHA\n                        DO 10 I = 1, LAA\n                           AS( I ) = AA( I )\n   10                   CONTINUE\n                        LDAS = LDA\n                        DO 20 I = 1, LBB\n                           BS( I ) = BB( I )\n   20                   CONTINUE\n                        LDBS = LDB\n                        BLS = BETA\n                        DO 30 I = 1, LCC\n                           CS( I ) = CC( I )\n   30                   CONTINUE\n                        LDCS = LDC\n*\n*                       Call the subroutine.\n*\n                        IF( TRACE )\n     $                     WRITE( NTRA, FMT = 9995 )NC, SNAME, SIDE,\n     $                     UPLO, M, N, ALPHA, LDA, LDB, BETA, LDC\n                        IF( REWI )\n     $                     REWIND NTRA\n                        CALL SSYMM( SIDE, UPLO, M, N, ALPHA, AA, LDA,\n     $                              BB, LDB, BETA, CC, LDC )\n*\n*                       Check if error-exit was taken incorrectly.\n*\n                        IF( .NOT.OK )THEN\n                           WRITE( NOUT, FMT = 9994 )\n                           FATAL = .TRUE.\n                           GO TO 110\n                        END IF\n*\n*                       See what data changed inside subroutines.\n*\n                        ISAME( 1 ) = SIDES.EQ.SIDE\n                        ISAME( 2 ) = UPLOS.EQ.UPLO\n                        ISAME( 3 ) = MS.EQ.M\n                        ISAME( 4 ) = NS.EQ.N\n                        ISAME( 5 ) = ALS.EQ.ALPHA\n                        ISAME( 6 ) = LSE( AS, AA, LAA )\n                        ISAME( 7 ) = LDAS.EQ.LDA\n                        ISAME( 8 ) = LSE( BS, BB, LBB )\n                        ISAME( 9 ) = LDBS.EQ.LDB\n                        ISAME( 10 ) = BLS.EQ.BETA\n                        IF( NULL )THEN\n                           ISAME( 11 ) = LSE( CS, CC, LCC )\n                        ELSE\n                           ISAME( 11 ) = LSERES( 'GE', ' ', M, N, CS,\n     $                                   CC, LDC )\n                        END IF\n                        ISAME( 12 ) = LDCS.EQ.LDC\n*\n*                       If data was incorrectly changed, report and\n*                       return.\n*\n                        SAME = .TRUE.\n                        DO 40 I = 1, NARGS\n                           SAME = SAME.AND.ISAME( I )\n                           IF( .NOT.ISAME( I ) )\n     $                        WRITE( NOUT, FMT = 9998 )I\n   40                   CONTINUE\n                        IF( .NOT.SAME )THEN\n                           FATAL = .TRUE.\n                           GO TO 110\n                        END IF\n*\n                        IF( .NOT.NULL )THEN\n*\n*                          Check the result.\n*\n                           IF( LEFT )THEN\n                              CALL SMMCH( 'N', 'N', M, N, M, ALPHA, A,\n     $                                    NMAX, B, NMAX, BETA, C, NMAX,\n     $                                    CT, G, CC, LDC, EPS, ERR,\n     $                                    FATAL, NOUT, .TRUE. )\n                           ELSE\n                              CALL SMMCH( 'N', 'N', M, N, N, ALPHA, B,\n     $                                    NMAX, A, NMAX, BETA, C, NMAX,\n     $                                    CT, G, CC, LDC, EPS, ERR,\n     $                                    FATAL, NOUT, .TRUE. )\n                           END IF\n                           ERRMAX = MAX( ERRMAX, ERR )\n*                          If got really bad answer, report and\n*                          return.\n                           IF( FATAL )\n     $                        GO TO 110\n                        END IF\n*\n   50                CONTINUE\n*\n   60             CONTINUE\n*\n   70          CONTINUE\n*\n   80       CONTINUE\n*\n   90    CONTINUE\n*\n  100 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 120\n*\n  110 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      WRITE( NOUT, FMT = 9995 )NC, SNAME, SIDE, UPLO, M, N, ALPHA, LDA,\n     $   LDB, BETA, LDC\n*\n  120 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( 1X, I6, ': ', A6, '(', 2( '''', A1, ''',' ), 2( I3, ',' ),\n     $      F4.1, ', A,', I3, ', B,', I3, ',', F4.1, ', C,', I3, ')   ',\n     $      ' .' )\n 9994 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of SCHK2.\n*\n      END\n      SUBROUTINE SCHK3( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NALF, ALF, NMAX, A, AA, AS,\n     $                  B, BB, BS, CT, G, C )\n*\n*  Tests STRMM and STRSM.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Parameters ..\n      REAL               ZERO, ONE\n      PARAMETER          ( ZERO = 0.0, ONE = 1.0 )\n*     .. Scalar Arguments ..\n      REAL               EPS, THRESH\n      INTEGER            NALF, NIDIM, NMAX, NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      REAL               A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),\n     $                   AS( NMAX*NMAX ), B( NMAX, NMAX ),\n     $                   BB( NMAX*NMAX ), BS( NMAX*NMAX ),\n     $                   C( NMAX, NMAX ), CT( NMAX ), G( NMAX )\n      INTEGER            IDIM( NIDIM )\n*     .. Local Scalars ..\n      REAL               ALPHA, ALS, ERR, ERRMAX\n      INTEGER            I, IA, ICD, ICS, ICT, ICU, IM, IN, J, LAA, LBB,\n     $                   LDA, LDAS, LDB, LDBS, M, MS, N, NA, NARGS, NC,\n     $                   NS\n      LOGICAL            LEFT, NULL, RESET, SAME\n      CHARACTER*1        DIAG, DIAGS, SIDE, SIDES, TRANAS, TRANSA, UPLO,\n     $                   UPLOS\n      CHARACTER*2        ICHD, ICHS, ICHU\n      CHARACTER*3        ICHT\n*     .. Local Arrays ..\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LSE, LSERES\n      EXTERNAL           LSE, LSERES\n*     .. External Subroutines ..\n      EXTERNAL           SMAKE, SMMCH, STRMM, STRSM\n*     .. Intrinsic Functions ..\n      INTRINSIC          MAX\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICHU/'UL'/, ICHT/'NTC'/, ICHD/'UN'/, ICHS/'LR'/\n*     .. Executable Statements ..\n*\n      NARGS = 11\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = ZERO\n*     Set up zero matrix for SMMCH.\n      DO 20 J = 1, NMAX\n         DO 10 I = 1, NMAX\n            C( I, J ) = ZERO\n   10    CONTINUE\n   20 CONTINUE\n*\n      DO 140 IM = 1, NIDIM\n         M = IDIM( IM )\n*\n         DO 130 IN = 1, NIDIM\n            N = IDIM( IN )\n*           Set LDB to 1 more than minimum value if room.\n            LDB = M\n            IF( LDB.LT.NMAX )\n     $         LDB = LDB + 1\n*           Skip tests if not enough room.\n            IF( LDB.GT.NMAX )\n     $         GO TO 130\n            LBB = LDB*N\n            NULL = M.LE.0.OR.N.LE.0\n*\n            DO 120 ICS = 1, 2\n               SIDE = ICHS( ICS: ICS )\n               LEFT = SIDE.EQ.'L'\n               IF( LEFT )THEN\n                  NA = M\n               ELSE\n                  NA = N\n               END IF\n*              Set LDA to 1 more than minimum value if room.\n               LDA = NA\n               IF( LDA.LT.NMAX )\n     $            LDA = LDA + 1\n*              Skip tests if not enough room.\n               IF( LDA.GT.NMAX )\n     $            GO TO 130\n               LAA = LDA*NA\n*\n               DO 110 ICU = 1, 2\n                  UPLO = ICHU( ICU: ICU )\n*\n                  DO 100 ICT = 1, 3\n                     TRANSA = ICHT( ICT: ICT )\n*\n                     DO 90 ICD = 1, 2\n                        DIAG = ICHD( ICD: ICD )\n*\n                        DO 80 IA = 1, NALF\n                           ALPHA = ALF( IA )\n*\n*                          Generate the matrix A.\n*\n                           CALL SMAKE( 'TR', UPLO, DIAG, NA, NA, A,\n     $                                 NMAX, AA, LDA, RESET, ZERO )\n*\n*                          Generate the matrix B.\n*\n                           CALL SMAKE( 'GE', ' ', ' ', M, N, B, NMAX,\n     $                                 BB, LDB, RESET, ZERO )\n*\n                           NC = NC + 1\n*\n*                          Save every datum before calling the\n*                          subroutine.\n*\n                           SIDES = SIDE\n                           UPLOS = UPLO\n                           TRANAS = TRANSA\n                           DIAGS = DIAG\n                           MS = M\n                           NS = N\n                           ALS = ALPHA\n                           DO 30 I = 1, LAA\n                              AS( I ) = AA( I )\n   30                      CONTINUE\n                           LDAS = LDA\n                           DO 40 I = 1, LBB\n                              BS( I ) = BB( I )\n   40                      CONTINUE\n                           LDBS = LDB\n*\n*                          Call the subroutine.\n*\n                           IF( SNAME( 4: 5 ).EQ.'MM' )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9995 )NC, SNAME,\n     $                           SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA,\n     $                           LDA, LDB\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL STRMM( SIDE, UPLO, TRANSA, DIAG, M,\n     $                                    N, ALPHA, AA, LDA, BB, LDB )\n                           ELSE IF( SNAME( 4: 5 ).EQ.'SM' )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9995 )NC, SNAME,\n     $                           SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA,\n     $                           LDA, LDB\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL STRSM( SIDE, UPLO, TRANSA, DIAG, M,\n     $                                    N, ALPHA, AA, LDA, BB, LDB )\n                           END IF\n*\n*                          Check if error-exit was taken incorrectly.\n*\n                           IF( .NOT.OK )THEN\n                              WRITE( NOUT, FMT = 9994 )\n                              FATAL = .TRUE.\n                              GO TO 150\n                           END IF\n*\n*                          See what data changed inside subroutines.\n*\n                           ISAME( 1 ) = SIDES.EQ.SIDE\n                           ISAME( 2 ) = UPLOS.EQ.UPLO\n                           ISAME( 3 ) = TRANAS.EQ.TRANSA\n                           ISAME( 4 ) = DIAGS.EQ.DIAG\n                           ISAME( 5 ) = MS.EQ.M\n                           ISAME( 6 ) = NS.EQ.N\n                           ISAME( 7 ) = ALS.EQ.ALPHA\n                           ISAME( 8 ) = LSE( AS, AA, LAA )\n                           ISAME( 9 ) = LDAS.EQ.LDA\n                           IF( NULL )THEN\n                              ISAME( 10 ) = LSE( BS, BB, LBB )\n                           ELSE\n                              ISAME( 10 ) = LSERES( 'GE', ' ', M, N, BS,\n     $                                      BB, LDB )\n                           END IF\n                           ISAME( 11 ) = LDBS.EQ.LDB\n*\n*                          If data was incorrectly changed, report and\n*                          return.\n*\n                           SAME = .TRUE.\n                           DO 50 I = 1, NARGS\n                              SAME = SAME.AND.ISAME( I )\n                              IF( .NOT.ISAME( I ) )\n     $                           WRITE( NOUT, FMT = 9998 )I\n   50                      CONTINUE\n                           IF( .NOT.SAME )THEN\n                              FATAL = .TRUE.\n                              GO TO 150\n                           END IF\n*\n                           IF( .NOT.NULL )THEN\n                              IF( SNAME( 4: 5 ).EQ.'MM' )THEN\n*\n*                                Check the result.\n*\n                                 IF( LEFT )THEN\n                                    CALL SMMCH( TRANSA, 'N', M, N, M,\n     $                                          ALPHA, A, NMAX, B, NMAX,\n     $                                          ZERO, C, NMAX, CT, G,\n     $                                          BB, LDB, EPS, ERR,\n     $                                          FATAL, NOUT, .TRUE. )\n                                 ELSE\n                                    CALL SMMCH( 'N', TRANSA, M, N, N,\n     $                                          ALPHA, B, NMAX, A, NMAX,\n     $                                          ZERO, C, NMAX, CT, G,\n     $                                          BB, LDB, EPS, ERR,\n     $                                          FATAL, NOUT, .TRUE. )\n                                 END IF\n                              ELSE IF( SNAME( 4: 5 ).EQ.'SM' )THEN\n*\n*                                Compute approximation to original\n*                                matrix.\n*\n                                 DO 70 J = 1, N\n                                    DO 60 I = 1, M\n                                       C( I, J ) = BB( I + ( J - 1 )*\n     $                                             LDB )\n                                       BB( I + ( J - 1 )*LDB ) = ALPHA*\n     $                                    B( I, J )\n   60                               CONTINUE\n   70                            CONTINUE\n*\n                                 IF( LEFT )THEN\n                                    CALL SMMCH( TRANSA, 'N', M, N, M,\n     $                                          ONE, A, NMAX, C, NMAX,\n     $                                          ZERO, B, NMAX, CT, G,\n     $                                          BB, LDB, EPS, ERR,\n     $                                          FATAL, NOUT, .FALSE. )\n                                 ELSE\n                                    CALL SMMCH( 'N', TRANSA, M, N, N,\n     $                                          ONE, C, NMAX, A, NMAX,\n     $                                          ZERO, B, NMAX, CT, G,\n     $                                          BB, LDB, EPS, ERR,\n     $                                          FATAL, NOUT, .FALSE. )\n                                 END IF\n                              END IF\n                              ERRMAX = MAX( ERRMAX, ERR )\n*                             If got really bad answer, report and\n*                             return.\n                              IF( FATAL )\n     $                           GO TO 150\n                           END IF\n*\n   80                   CONTINUE\n*\n   90                CONTINUE\n*\n  100             CONTINUE\n*\n  110          CONTINUE\n*\n  120       CONTINUE\n*\n  130    CONTINUE\n*\n  140 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 160\n*\n  150 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      WRITE( NOUT, FMT = 9995 )NC, SNAME, SIDE, UPLO, TRANSA, DIAG, M,\n     $   N, ALPHA, LDA, LDB\n*\n  160 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( 1X, I6, ': ', A6, '(', 4( '''', A1, ''',' ), 2( I3, ',' ),\n     $      F4.1, ', A,', I3, ', B,', I3, ')        .' )\n 9994 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of SCHK3.\n*\n      END\n      SUBROUTINE SCHK4( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET, NMAX,\n     $                  A, AA, AS, B, BB, BS, C, CC, CS, CT, G )\n*\n*  Tests SSYRK.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Parameters ..\n      REAL               ZERO\n      PARAMETER          ( ZERO = 0.0 )\n*     .. Scalar Arguments ..\n      REAL               EPS, THRESH\n      INTEGER            NALF, NBET, NIDIM, NMAX, NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      REAL               A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),\n     $                   AS( NMAX*NMAX ), B( NMAX, NMAX ),\n     $                   BB( NMAX*NMAX ), BET( NBET ), BS( NMAX*NMAX ),\n     $                   C( NMAX, NMAX ), CC( NMAX*NMAX ),\n     $                   CS( NMAX*NMAX ), CT( NMAX ), G( NMAX )\n      INTEGER            IDIM( NIDIM )\n*     .. Local Scalars ..\n      REAL               ALPHA, ALS, BETA, BETS, ERR, ERRMAX\n      INTEGER            I, IA, IB, ICT, ICU, IK, IN, J, JC, JJ, K, KS,\n     $                   LAA, LCC, LDA, LDAS, LDC, LDCS, LJ, MA, N, NA,\n     $                   NARGS, NC, NS\n      LOGICAL            NULL, RESET, SAME, TRAN, UPPER\n      CHARACTER*1        TRANS, TRANSS, UPLO, UPLOS\n      CHARACTER*2        ICHU\n      CHARACTER*3        ICHT\n*     .. Local Arrays ..\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LSE, LSERES\n      EXTERNAL           LSE, LSERES\n*     .. External Subroutines ..\n      EXTERNAL           SMAKE, SMMCH, SSYRK\n*     .. Intrinsic Functions ..\n      INTRINSIC          MAX\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICHT/'NTC'/, ICHU/'UL'/\n*     .. Executable Statements ..\n*\n      NARGS = 10\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = ZERO\n*\n      DO 100 IN = 1, NIDIM\n         N = IDIM( IN )\n*        Set LDC to 1 more than minimum value if room.\n         LDC = N\n         IF( LDC.LT.NMAX )\n     $      LDC = LDC + 1\n*        Skip tests if not enough room.\n         IF( LDC.GT.NMAX )\n     $      GO TO 100\n         LCC = LDC*N\n         NULL = N.LE.0\n*\n         DO 90 IK = 1, NIDIM\n            K = IDIM( IK )\n*\n            DO 80 ICT = 1, 3\n               TRANS = ICHT( ICT: ICT )\n               TRAN = TRANS.EQ.'T'.OR.TRANS.EQ.'C'\n               IF( TRAN )THEN\n                  MA = K\n                  NA = N\n               ELSE\n                  MA = N\n                  NA = K\n               END IF\n*              Set LDA to 1 more than minimum value if room.\n               LDA = MA\n               IF( LDA.LT.NMAX )\n     $            LDA = LDA + 1\n*              Skip tests if not enough room.\n               IF( LDA.GT.NMAX )\n     $            GO TO 80\n               LAA = LDA*NA\n*\n*              Generate the matrix A.\n*\n               CALL SMAKE( 'GE', ' ', ' ', MA, NA, A, NMAX, AA, LDA,\n     $                     RESET, ZERO )\n*\n               DO 70 ICU = 1, 2\n                  UPLO = ICHU( ICU: ICU )\n                  UPPER = UPLO.EQ.'U'\n*\n                  DO 60 IA = 1, NALF\n                     ALPHA = ALF( IA )\n*\n                     DO 50 IB = 1, NBET\n                        BETA = BET( IB )\n*\n*                       Generate the matrix C.\n*\n                        CALL SMAKE( 'SY', UPLO, ' ', N, N, C, NMAX, CC,\n     $                              LDC, RESET, ZERO )\n*\n                        NC = NC + 1\n*\n*                       Save every datum before calling the subroutine.\n*\n                        UPLOS = UPLO\n                        TRANSS = TRANS\n                        NS = N\n                        KS = K\n                        ALS = ALPHA\n                        DO 10 I = 1, LAA\n                           AS( I ) = AA( I )\n   10                   CONTINUE\n                        LDAS = LDA\n                        BETS = BETA\n                        DO 20 I = 1, LCC\n                           CS( I ) = CC( I )\n   20                   CONTINUE\n                        LDCS = LDC\n*\n*                       Call the subroutine.\n*\n                        IF( TRACE )\n     $                     WRITE( NTRA, FMT = 9994 )NC, SNAME, UPLO,\n     $                     TRANS, N, K, ALPHA, LDA, BETA, LDC\n                        IF( REWI )\n     $                     REWIND NTRA\n                        CALL SSYRK( UPLO, TRANS, N, K, ALPHA, AA, LDA,\n     $                              BETA, CC, LDC )\n*\n*                       Check if error-exit was taken incorrectly.\n*\n                        IF( .NOT.OK )THEN\n                           WRITE( NOUT, FMT = 9993 )\n                           FATAL = .TRUE.\n                           GO TO 120\n                        END IF\n*\n*                       See what data changed inside subroutines.\n*\n                        ISAME( 1 ) = UPLOS.EQ.UPLO\n                        ISAME( 2 ) = TRANSS.EQ.TRANS\n                        ISAME( 3 ) = NS.EQ.N\n                        ISAME( 4 ) = KS.EQ.K\n                        ISAME( 5 ) = ALS.EQ.ALPHA\n                        ISAME( 6 ) = LSE( AS, AA, LAA )\n                        ISAME( 7 ) = LDAS.EQ.LDA\n                        ISAME( 8 ) = BETS.EQ.BETA\n                        IF( NULL )THEN\n                           ISAME( 9 ) = LSE( CS, CC, LCC )\n                        ELSE\n                           ISAME( 9 ) = LSERES( 'SY', UPLO, N, N, CS,\n     $                                  CC, LDC )\n                        END IF\n                        ISAME( 10 ) = LDCS.EQ.LDC\n*\n*                       If data was incorrectly changed, report and\n*                       return.\n*\n                        SAME = .TRUE.\n                        DO 30 I = 1, NARGS\n                           SAME = SAME.AND.ISAME( I )\n                           IF( .NOT.ISAME( I ) )\n     $                        WRITE( NOUT, FMT = 9998 )I\n   30                   CONTINUE\n                        IF( .NOT.SAME )THEN\n                           FATAL = .TRUE.\n                           GO TO 120\n                        END IF\n*\n                        IF( .NOT.NULL )THEN\n*\n*                          Check the result column by column.\n*\n                           JC = 1\n                           DO 40 J = 1, N\n                              IF( UPPER )THEN\n                                 JJ = 1\n                                 LJ = J\n                              ELSE\n                                 JJ = J\n                                 LJ = N - J + 1\n                              END IF\n                              IF( TRAN )THEN\n                                 CALL SMMCH( 'T', 'N', LJ, 1, K, ALPHA,\n     $                                       A( 1, JJ ), NMAX,\n     $                                       A( 1, J ), NMAX, BETA,\n     $                                       C( JJ, J ), NMAX, CT, G,\n     $                                       CC( JC ), LDC, EPS, ERR,\n     $                                       FATAL, NOUT, .TRUE. )\n                              ELSE\n                                 CALL SMMCH( 'N', 'T', LJ, 1, K, ALPHA,\n     $                                       A( JJ, 1 ), NMAX,\n     $                                       A( J, 1 ), NMAX, BETA,\n     $                                       C( JJ, J ), NMAX, CT, G,\n     $                                       CC( JC ), LDC, EPS, ERR,\n     $                                       FATAL, NOUT, .TRUE. )\n                              END IF\n                              IF( UPPER )THEN\n                                 JC = JC + LDC\n                              ELSE\n                                 JC = JC + LDC + 1\n                              END IF\n                              ERRMAX = MAX( ERRMAX, ERR )\n*                             If got really bad answer, report and\n*                             return.\n                              IF( FATAL )\n     $                           GO TO 110\n   40                      CONTINUE\n                        END IF\n*\n   50                CONTINUE\n*\n   60             CONTINUE\n*\n   70          CONTINUE\n*\n   80       CONTINUE\n*\n   90    CONTINUE\n*\n  100 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 130\n*\n  110 CONTINUE\n      IF( N.GT.1 )\n     $   WRITE( NOUT, FMT = 9995 )J\n*\n  120 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      WRITE( NOUT, FMT = 9994 )NC, SNAME, UPLO, TRANS, N, K, ALPHA,\n     $   LDA, BETA, LDC\n*\n  130 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( '      THESE ARE THE RESULTS FOR COLUMN ', I3 )\n 9994 FORMAT( 1X, I6, ': ', A6, '(', 2( '''', A1, ''',' ), 2( I3, ',' ),\n     $      F4.1, ', A,', I3, ',', F4.1, ', C,', I3, ')           .' )\n 9993 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of SCHK4.\n*\n      END\n      SUBROUTINE SCHK5( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET, NMAX,\n     $                  AB, AA, AS, BB, BS, C, CC, CS, CT, G, W )\n*\n*  Tests SSYR2K.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Parameters ..\n      REAL               ZERO\n      PARAMETER          ( ZERO = 0.0 )\n*     .. Scalar Arguments ..\n      REAL               EPS, THRESH\n      INTEGER            NALF, NBET, NIDIM, NMAX, NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      REAL               AA( NMAX*NMAX ), AB( 2*NMAX*NMAX ),\n     $                   ALF( NALF ), AS( NMAX*NMAX ), BB( NMAX*NMAX ),\n     $                   BET( NBET ), BS( NMAX*NMAX ), C( NMAX, NMAX ),\n     $                   CC( NMAX*NMAX ), CS( NMAX*NMAX ), CT( NMAX ),\n     $                   G( NMAX ), W( 2*NMAX )\n      INTEGER            IDIM( NIDIM )\n*     .. Local Scalars ..\n      REAL               ALPHA, ALS, BETA, BETS, ERR, ERRMAX\n      INTEGER            I, IA, IB, ICT, ICU, IK, IN, J, JC, JJ, JJAB,\n     $                   K, KS, LAA, LBB, LCC, LDA, LDAS, LDB, LDBS,\n     $                   LDC, LDCS, LJ, MA, N, NA, NARGS, NC, NS\n      LOGICAL            NULL, RESET, SAME, TRAN, UPPER\n      CHARACTER*1        TRANS, TRANSS, UPLO, UPLOS\n      CHARACTER*2        ICHU\n      CHARACTER*3        ICHT\n*     .. Local Arrays ..\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LSE, LSERES\n      EXTERNAL           LSE, LSERES\n*     .. External Subroutines ..\n      EXTERNAL           SMAKE, SMMCH, SSYR2K\n*     .. Intrinsic Functions ..\n      INTRINSIC          MAX\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICHT/'NTC'/, ICHU/'UL'/\n*     .. Executable Statements ..\n*\n      NARGS = 12\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = ZERO\n*\n      DO 130 IN = 1, NIDIM\n         N = IDIM( IN )\n*        Set LDC to 1 more than minimum value if room.\n         LDC = N\n         IF( LDC.LT.NMAX )\n     $      LDC = LDC + 1\n*        Skip tests if not enough room.\n         IF( LDC.GT.NMAX )\n     $      GO TO 130\n         LCC = LDC*N\n         NULL = N.LE.0\n*\n         DO 120 IK = 1, NIDIM\n            K = IDIM( IK )\n*\n            DO 110 ICT = 1, 3\n               TRANS = ICHT( ICT: ICT )\n               TRAN = TRANS.EQ.'T'.OR.TRANS.EQ.'C'\n               IF( TRAN )THEN\n                  MA = K\n                  NA = N\n               ELSE\n                  MA = N\n                  NA = K\n               END IF\n*              Set LDA to 1 more than minimum value if room.\n               LDA = MA\n               IF( LDA.LT.NMAX )\n     $            LDA = LDA + 1\n*              Skip tests if not enough room.\n               IF( LDA.GT.NMAX )\n     $            GO TO 110\n               LAA = LDA*NA\n*\n*              Generate the matrix A.\n*\n               IF( TRAN )THEN\n                  CALL SMAKE( 'GE', ' ', ' ', MA, NA, AB, 2*NMAX, AA,\n     $                        LDA, RESET, ZERO )\n               ELSE\n                  CALL SMAKE( 'GE', ' ', ' ', MA, NA, AB, NMAX, AA, LDA,\n     $                        RESET, ZERO )\n               END IF\n*\n*              Generate the matrix B.\n*\n               LDB = LDA\n               LBB = LAA\n               IF( TRAN )THEN\n                  CALL SMAKE( 'GE', ' ', ' ', MA, NA, AB( K + 1 ),\n     $                        2*NMAX, BB, LDB, RESET, ZERO )\n               ELSE\n                  CALL SMAKE( 'GE', ' ', ' ', MA, NA, AB( K*NMAX + 1 ),\n     $                        NMAX, BB, LDB, RESET, ZERO )\n               END IF\n*\n               DO 100 ICU = 1, 2\n                  UPLO = ICHU( ICU: ICU )\n                  UPPER = UPLO.EQ.'U'\n*\n                  DO 90 IA = 1, NALF\n                     ALPHA = ALF( IA )\n*\n                     DO 80 IB = 1, NBET\n                        BETA = BET( IB )\n*\n*                       Generate the matrix C.\n*\n                        CALL SMAKE( 'SY', UPLO, ' ', N, N, C, NMAX, CC,\n     $                              LDC, RESET, ZERO )\n*\n                        NC = NC + 1\n*\n*                       Save every datum before calling the subroutine.\n*\n                        UPLOS = UPLO\n                        TRANSS = TRANS\n                        NS = N\n                        KS = K\n                        ALS = ALPHA\n                        DO 10 I = 1, LAA\n                           AS( I ) = AA( I )\n   10                   CONTINUE\n                        LDAS = LDA\n                        DO 20 I = 1, LBB\n                           BS( I ) = BB( I )\n   20                   CONTINUE\n                        LDBS = LDB\n                        BETS = BETA\n                        DO 30 I = 1, LCC\n                           CS( I ) = CC( I )\n   30                   CONTINUE\n                        LDCS = LDC\n*\n*                       Call the subroutine.\n*\n                        IF( TRACE )\n     $                     WRITE( NTRA, FMT = 9994 )NC, SNAME, UPLO,\n     $                     TRANS, N, K, ALPHA, LDA, LDB, BETA, LDC\n                        IF( REWI )\n     $                     REWIND NTRA\n                        CALL SSYR2K( UPLO, TRANS, N, K, ALPHA, AA, LDA,\n     $                               BB, LDB, BETA, CC, LDC )\n*\n*                       Check if error-exit was taken incorrectly.\n*\n                        IF( .NOT.OK )THEN\n                           WRITE( NOUT, FMT = 9993 )\n                           FATAL = .TRUE.\n                           GO TO 150\n                        END IF\n*\n*                       See what data changed inside subroutines.\n*\n                        ISAME( 1 ) = UPLOS.EQ.UPLO\n                        ISAME( 2 ) = TRANSS.EQ.TRANS\n                        ISAME( 3 ) = NS.EQ.N\n                        ISAME( 4 ) = KS.EQ.K\n                        ISAME( 5 ) = ALS.EQ.ALPHA\n                        ISAME( 6 ) = LSE( AS, AA, LAA )\n                        ISAME( 7 ) = LDAS.EQ.LDA\n                        ISAME( 8 ) = LSE( BS, BB, LBB )\n                        ISAME( 9 ) = LDBS.EQ.LDB\n                        ISAME( 10 ) = BETS.EQ.BETA\n                        IF( NULL )THEN\n                           ISAME( 11 ) = LSE( CS, CC, LCC )\n                        ELSE\n                           ISAME( 11 ) = LSERES( 'SY', UPLO, N, N, CS,\n     $                                   CC, LDC )\n                        END IF\n                        ISAME( 12 ) = LDCS.EQ.LDC\n*\n*                       If data was incorrectly changed, report and\n*                       return.\n*\n                        SAME = .TRUE.\n                        DO 40 I = 1, NARGS\n                           SAME = SAME.AND.ISAME( I )\n                           IF( .NOT.ISAME( I ) )\n     $                        WRITE( NOUT, FMT = 9998 )I\n   40                   CONTINUE\n                        IF( .NOT.SAME )THEN\n                           FATAL = .TRUE.\n                           GO TO 150\n                        END IF\n*\n                        IF( .NOT.NULL )THEN\n*\n*                          Check the result column by column.\n*\n                           JJAB = 1\n                           JC = 1\n                           DO 70 J = 1, N\n                              IF( UPPER )THEN\n                                 JJ = 1\n                                 LJ = J\n                              ELSE\n                                 JJ = J\n                                 LJ = N - J + 1\n                              END IF\n                              IF( TRAN )THEN\n                                 DO 50 I = 1, K\n                                    W( I ) = AB( ( J - 1 )*2*NMAX + K +\n     $                                       I )\n                                    W( K + I ) = AB( ( J - 1 )*2*NMAX +\n     $                                           I )\n   50                            CONTINUE\n                                 CALL SMMCH( 'T', 'N', LJ, 1, 2*K,\n     $                                       ALPHA, AB( JJAB ), 2*NMAX,\n     $                                       W, 2*NMAX, BETA,\n     $                                       C( JJ, J ), NMAX, CT, G,\n     $                                       CC( JC ), LDC, EPS, ERR,\n     $                                       FATAL, NOUT, .TRUE. )\n                              ELSE\n                                 DO 60 I = 1, K\n                                    W( I ) = AB( ( K + I - 1 )*NMAX +\n     $                                       J )\n                                    W( K + I ) = AB( ( I - 1 )*NMAX +\n     $                                           J )\n   60                            CONTINUE\n                                 CALL SMMCH( 'N', 'N', LJ, 1, 2*K,\n     $                                       ALPHA, AB( JJ ), NMAX, W,\n     $                                       2*NMAX, BETA, C( JJ, J ),\n     $                                       NMAX, CT, G, CC( JC ), LDC,\n     $                                       EPS, ERR, FATAL, NOUT,\n     $                                       .TRUE. )\n                              END IF\n                              IF( UPPER )THEN\n                                 JC = JC + LDC\n                              ELSE\n                                 JC = JC + LDC + 1\n                                 IF( TRAN )\n     $                              JJAB = JJAB + 2*NMAX\n                              END IF\n                              ERRMAX = MAX( ERRMAX, ERR )\n*                             If got really bad answer, report and\n*                             return.\n                              IF( FATAL )\n     $                           GO TO 140\n   70                      CONTINUE\n                        END IF\n*\n   80                CONTINUE\n*\n   90             CONTINUE\n*\n  100          CONTINUE\n*\n  110       CONTINUE\n*\n  120    CONTINUE\n*\n  130 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 160\n*\n  140 CONTINUE\n      IF( N.GT.1 )\n     $   WRITE( NOUT, FMT = 9995 )J\n*\n  150 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      WRITE( NOUT, FMT = 9994 )NC, SNAME, UPLO, TRANS, N, K, ALPHA,\n     $   LDA, LDB, BETA, LDC\n*\n  160 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( '      THESE ARE THE RESULTS FOR COLUMN ', I3 )\n 9994 FORMAT( 1X, I6, ': ', A6, '(', 2( '''', A1, ''',' ), 2( I3, ',' ),\n     $      F4.1, ', A,', I3, ', B,', I3, ',', F4.1, ', C,', I3, ')   ',\n     $      ' .' )\n 9993 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of SCHK5.\n*\n      END\n      SUBROUTINE SCHKE( ISNUM, SRNAMT, NOUT )\n*\n*  Tests the error exits from the Level 3 Blas.\n*  Requires a special version of the error-handling routine XERBLA.\n*  A, B and C should not need to be defined.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*  3-19-92:  Initialize ALPHA and BETA  (eca)\n*  3-19-92:  Fix argument 12 in calls to SSYMM with INFOT = 9  (eca)\n*\n*     .. Scalar Arguments ..\n      INTEGER            ISNUM, NOUT\n      CHARACTER*6        SRNAMT\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Parameters ..\n      REAL               ONE, TWO\n      PARAMETER          ( ONE = 1.0E0, TWO = 2.0E0 )\n*     .. Local Scalars ..\n      REAL               ALPHA, BETA\n*     .. Local Arrays ..\n      REAL               A( 2, 1 ), B( 2, 1 ), C( 2, 1 )\n*     .. External Subroutines ..\n      EXTERNAL           CHKXER, SGEMM, SSYMM, SSYR2K, SSYRK, STRMM,\n     $                   STRSM\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Executable Statements ..\n*     OK is set to .FALSE. by the special version of XERBLA or by CHKXER\n*     if anything is wrong.\n      OK = .TRUE.\n*     LERR is set to .TRUE. by the special version of XERBLA each time\n*     it is called, and is then tested and re-set by CHKXER.\n      LERR = .FALSE.\n*\n*     Initialize ALPHA and BETA.\n*\n      ALPHA = ONE\n      BETA = TWO\n*\n      GO TO ( 10, 20, 30, 40, 50, 60 )ISNUM\n   10 INFOT = 1\n      CALL SGEMM( '/', 'N', 0, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 1\n      CALL SGEMM( '/', 'T', 0, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL SGEMM( 'N', '/', 0, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL SGEMM( 'T', '/', 0, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL SGEMM( 'N', 'N', -1, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL SGEMM( 'N', 'T', -1, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL SGEMM( 'T', 'N', -1, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL SGEMM( 'T', 'T', -1, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL SGEMM( 'N', 'N', 0, -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL SGEMM( 'N', 'T', 0, -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL SGEMM( 'T', 'N', 0, -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL SGEMM( 'T', 'T', 0, -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL SGEMM( 'N', 'N', 0, 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL SGEMM( 'N', 'T', 0, 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL SGEMM( 'T', 'N', 0, 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL SGEMM( 'T', 'T', 0, 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL SGEMM( 'N', 'N', 2, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL SGEMM( 'N', 'T', 2, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL SGEMM( 'T', 'N', 0, 0, 2, ALPHA, A, 1, B, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL SGEMM( 'T', 'T', 0, 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL SGEMM( 'N', 'N', 0, 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL SGEMM( 'T', 'N', 0, 0, 2, ALPHA, A, 2, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL SGEMM( 'N', 'T', 0, 2, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL SGEMM( 'T', 'T', 0, 2, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 13\n      CALL SGEMM( 'N', 'N', 2, 0, 0, ALPHA, A, 2, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 13\n      CALL SGEMM( 'N', 'T', 2, 0, 0, ALPHA, A, 2, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 13\n      CALL SGEMM( 'T', 'N', 2, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 13\n      CALL SGEMM( 'T', 'T', 2, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 70\n   20 INFOT = 1\n      CALL SSYMM( '/', 'U', 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL SSYMM( 'L', '/', 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL SSYMM( 'L', 'U', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL SSYMM( 'R', 'U', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL SSYMM( 'L', 'L', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL SSYMM( 'R', 'L', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL SSYMM( 'L', 'U', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL SSYMM( 'R', 'U', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL SSYMM( 'L', 'L', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL SSYMM( 'R', 'L', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL SSYMM( 'L', 'U', 2, 0, ALPHA, A, 1, B, 2, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL SSYMM( 'R', 'U', 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL SSYMM( 'L', 'L', 2, 0, ALPHA, A, 1, B, 2, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL SSYMM( 'R', 'L', 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL SSYMM( 'L', 'U', 2, 0, ALPHA, A, 2, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL SSYMM( 'R', 'U', 2, 0, ALPHA, A, 1, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL SSYMM( 'L', 'L', 2, 0, ALPHA, A, 2, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL SSYMM( 'R', 'L', 2, 0, ALPHA, A, 1, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL SSYMM( 'L', 'U', 2, 0, ALPHA, A, 2, B, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL SSYMM( 'R', 'U', 2, 0, ALPHA, A, 1, B, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL SSYMM( 'L', 'L', 2, 0, ALPHA, A, 2, B, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL SSYMM( 'R', 'L', 2, 0, ALPHA, A, 1, B, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 70\n   30 INFOT = 1\n      CALL STRMM( '/', 'U', 'N', 'N', 0, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL STRMM( 'L', '/', 'N', 'N', 0, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL STRMM( 'L', 'U', '/', 'N', 0, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL STRMM( 'L', 'U', 'N', '/', 0, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL STRMM( 'L', 'U', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL STRMM( 'L', 'U', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL STRMM( 'R', 'U', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL STRMM( 'R', 'U', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL STRMM( 'L', 'L', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL STRMM( 'L', 'L', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL STRMM( 'R', 'L', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL STRMM( 'R', 'L', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL STRMM( 'L', 'U', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL STRMM( 'L', 'U', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL STRMM( 'R', 'U', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL STRMM( 'R', 'U', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL STRMM( 'L', 'L', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL STRMM( 'L', 'L', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL STRMM( 'R', 'L', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL STRMM( 'R', 'L', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL STRMM( 'L', 'U', 'N', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL STRMM( 'L', 'U', 'T', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL STRMM( 'R', 'U', 'N', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL STRMM( 'R', 'U', 'T', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL STRMM( 'L', 'L', 'N', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL STRMM( 'L', 'L', 'T', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL STRMM( 'R', 'L', 'N', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL STRMM( 'R', 'L', 'T', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL STRMM( 'L', 'U', 'N', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL STRMM( 'L', 'U', 'T', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL STRMM( 'R', 'U', 'N', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL STRMM( 'R', 'U', 'T', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL STRMM( 'L', 'L', 'N', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL STRMM( 'L', 'L', 'T', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL STRMM( 'R', 'L', 'N', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL STRMM( 'R', 'L', 'T', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 70\n   40 INFOT = 1\n      CALL STRSM( '/', 'U', 'N', 'N', 0, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL STRSM( 'L', '/', 'N', 'N', 0, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL STRSM( 'L', 'U', '/', 'N', 0, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL STRSM( 'L', 'U', 'N', '/', 0, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL STRSM( 'L', 'U', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL STRSM( 'L', 'U', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL STRSM( 'R', 'U', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL STRSM( 'R', 'U', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL STRSM( 'L', 'L', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL STRSM( 'L', 'L', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL STRSM( 'R', 'L', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL STRSM( 'R', 'L', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL STRSM( 'L', 'U', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL STRSM( 'L', 'U', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL STRSM( 'R', 'U', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL STRSM( 'R', 'U', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL STRSM( 'L', 'L', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL STRSM( 'L', 'L', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL STRSM( 'R', 'L', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL STRSM( 'R', 'L', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL STRSM( 'L', 'U', 'N', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL STRSM( 'L', 'U', 'T', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL STRSM( 'R', 'U', 'N', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL STRSM( 'R', 'U', 'T', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL STRSM( 'L', 'L', 'N', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL STRSM( 'L', 'L', 'T', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL STRSM( 'R', 'L', 'N', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL STRSM( 'R', 'L', 'T', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL STRSM( 'L', 'U', 'N', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL STRSM( 'L', 'U', 'T', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL STRSM( 'R', 'U', 'N', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL STRSM( 'R', 'U', 'T', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL STRSM( 'L', 'L', 'N', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL STRSM( 'L', 'L', 'T', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL STRSM( 'R', 'L', 'N', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL STRSM( 'R', 'L', 'T', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 70\n   50 INFOT = 1\n      CALL SSYRK( '/', 'N', 0, 0, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL SSYRK( 'U', '/', 0, 0, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL SSYRK( 'U', 'N', -1, 0, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL SSYRK( 'U', 'T', -1, 0, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL SSYRK( 'L', 'N', -1, 0, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL SSYRK( 'L', 'T', -1, 0, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL SSYRK( 'U', 'N', 0, -1, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL SSYRK( 'U', 'T', 0, -1, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL SSYRK( 'L', 'N', 0, -1, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL SSYRK( 'L', 'T', 0, -1, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL SSYRK( 'U', 'N', 2, 0, ALPHA, A, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL SSYRK( 'U', 'T', 0, 2, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL SSYRK( 'L', 'N', 2, 0, ALPHA, A, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL SSYRK( 'L', 'T', 0, 2, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL SSYRK( 'U', 'N', 2, 0, ALPHA, A, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL SSYRK( 'U', 'T', 2, 0, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL SSYRK( 'L', 'N', 2, 0, ALPHA, A, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL SSYRK( 'L', 'T', 2, 0, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 70\n   60 INFOT = 1\n      CALL SSYR2K( '/', 'N', 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL SSYR2K( 'U', '/', 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL SSYR2K( 'U', 'N', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL SSYR2K( 'U', 'T', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL SSYR2K( 'L', 'N', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL SSYR2K( 'L', 'T', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL SSYR2K( 'U', 'N', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL SSYR2K( 'U', 'T', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL SSYR2K( 'L', 'N', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL SSYR2K( 'L', 'T', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL SSYR2K( 'U', 'N', 2, 0, ALPHA, A, 1, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL SSYR2K( 'U', 'T', 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL SSYR2K( 'L', 'N', 2, 0, ALPHA, A, 1, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL SSYR2K( 'L', 'T', 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL SSYR2K( 'U', 'N', 2, 0, ALPHA, A, 2, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL SSYR2K( 'U', 'T', 0, 2, ALPHA, A, 2, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL SSYR2K( 'L', 'N', 2, 0, ALPHA, A, 2, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL SSYR2K( 'L', 'T', 0, 2, ALPHA, A, 2, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL SSYR2K( 'U', 'N', 2, 0, ALPHA, A, 2, B, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL SSYR2K( 'U', 'T', 2, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL SSYR2K( 'L', 'N', 2, 0, ALPHA, A, 2, B, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL SSYR2K( 'L', 'T', 2, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n*\n   70 IF( OK )THEN\n         WRITE( NOUT, FMT = 9999 )SRNAMT\n      ELSE\n         WRITE( NOUT, FMT = 9998 )SRNAMT\n      END IF\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE TESTS OF ERROR-EXITS' )\n 9998 FORMAT( ' ******* ', A6, ' FAILED THE TESTS OF ERROR-EXITS *****',\n     $      '**' )\n*\n*     End of SCHKE.\n*\n      END\n      SUBROUTINE SMAKE( TYPE, UPLO, DIAG, M, N, A, NMAX, AA, LDA, RESET,\n     $                  TRANSL )\n*\n*  Generates values for an M by N matrix A.\n*  Stores the values in the array AA in the data structure required\n*  by the routine, with unwanted elements set to rogue value.\n*\n*  TYPE is 'GE', 'SY' or 'TR'.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Parameters ..\n      REAL               ZERO, ONE\n      PARAMETER          ( ZERO = 0.0, ONE = 1.0 )\n      REAL               ROGUE\n      PARAMETER          ( ROGUE = -1.0E10 )\n*     .. Scalar Arguments ..\n      REAL               TRANSL\n      INTEGER            LDA, M, N, NMAX\n      LOGICAL            RESET\n      CHARACTER*1        DIAG, UPLO\n      CHARACTER*2        TYPE\n*     .. Array Arguments ..\n      REAL               A( NMAX, * ), AA( * )\n*     .. Local Scalars ..\n      INTEGER            I, IBEG, IEND, J\n      LOGICAL            GEN, LOWER, SYM, TRI, UNIT, UPPER\n*     .. External Functions ..\n      REAL               SBEG\n      EXTERNAL           SBEG\n*     .. Executable Statements ..\n      GEN = TYPE.EQ.'GE'\n      SYM = TYPE.EQ.'SY'\n      TRI = TYPE.EQ.'TR'\n      UPPER = ( SYM.OR.TRI ).AND.UPLO.EQ.'U'\n      LOWER = ( SYM.OR.TRI ).AND.UPLO.EQ.'L'\n      UNIT = TRI.AND.DIAG.EQ.'U'\n*\n*     Generate data in array A.\n*\n      DO 20 J = 1, N\n         DO 10 I = 1, M\n            IF( GEN.OR.( UPPER.AND.I.LE.J ).OR.( LOWER.AND.I.GE.J ) )\n     $          THEN\n               A( I, J ) = SBEG( RESET ) + TRANSL\n               IF( I.NE.J )THEN\n*                 Set some elements to zero\n                  IF( N.GT.3.AND.J.EQ.N/2 )\n     $               A( I, J ) = ZERO\n                  IF( SYM )THEN\n                     A( J, I ) = A( I, J )\n                  ELSE IF( TRI )THEN\n                     A( J, I ) = ZERO\n                  END IF\n               END IF\n            END IF\n   10    CONTINUE\n         IF( TRI )\n     $      A( J, J ) = A( J, J ) + ONE\n         IF( UNIT )\n     $      A( J, J ) = ONE\n   20 CONTINUE\n*\n*     Store elements in array AS in data structure required by routine.\n*\n      IF( TYPE.EQ.'GE' )THEN\n         DO 50 J = 1, N\n            DO 30 I = 1, M\n               AA( I + ( J - 1 )*LDA ) = A( I, J )\n   30       CONTINUE\n            DO 40 I = M + 1, LDA\n               AA( I + ( J - 1 )*LDA ) = ROGUE\n   40       CONTINUE\n   50    CONTINUE\n      ELSE IF( TYPE.EQ.'SY'.OR.TYPE.EQ.'TR' )THEN\n         DO 90 J = 1, N\n            IF( UPPER )THEN\n               IBEG = 1\n               IF( UNIT )THEN\n                  IEND = J - 1\n               ELSE\n                  IEND = J\n               END IF\n            ELSE\n               IF( UNIT )THEN\n                  IBEG = J + 1\n               ELSE\n                  IBEG = J\n               END IF\n               IEND = N\n            END IF\n            DO 60 I = 1, IBEG - 1\n               AA( I + ( J - 1 )*LDA ) = ROGUE\n   60       CONTINUE\n            DO 70 I = IBEG, IEND\n               AA( I + ( J - 1 )*LDA ) = A( I, J )\n   70       CONTINUE\n            DO 80 I = IEND + 1, LDA\n               AA( I + ( J - 1 )*LDA ) = ROGUE\n   80       CONTINUE\n   90    CONTINUE\n      END IF\n      RETURN\n*\n*     End of SMAKE.\n*\n      END\n      SUBROUTINE SMMCH( TRANSA, TRANSB, M, N, KK, ALPHA, A, LDA, B, LDB,\n     $                  BETA, C, LDC, CT, G, CC, LDCC, EPS, ERR, FATAL,\n     $                  NOUT, MV )\n*\n*  Checks the results of the computational tests.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Parameters ..\n      REAL               ZERO, ONE\n      PARAMETER          ( ZERO = 0.0, ONE = 1.0 )\n*     .. Scalar Arguments ..\n      REAL               ALPHA, BETA, EPS, ERR\n      INTEGER            KK, LDA, LDB, LDC, LDCC, M, N, NOUT\n      LOGICAL            FATAL, MV\n      CHARACTER*1        TRANSA, TRANSB\n*     .. Array Arguments ..\n      REAL               A( LDA, * ), B( LDB, * ), C( LDC, * ),\n     $                   CC( LDCC, * ), CT( * ), G( * )\n*     .. Local Scalars ..\n      REAL               ERRI\n      INTEGER            I, J, K\n      LOGICAL            TRANA, TRANB\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, MAX, SQRT\n*     .. Executable Statements ..\n      TRANA = TRANSA.EQ.'T'.OR.TRANSA.EQ.'C'\n      TRANB = TRANSB.EQ.'T'.OR.TRANSB.EQ.'C'\n*\n*     Compute expected result, one column at a time, in CT using data\n*     in A, B and C.\n*     Compute gauges in G.\n*\n      DO 120 J = 1, N\n*\n         DO 10 I = 1, M\n            CT( I ) = ZERO\n            G( I ) = ZERO\n   10    CONTINUE\n         IF( .NOT.TRANA.AND..NOT.TRANB )THEN\n            DO 30 K = 1, KK\n               DO 20 I = 1, M\n                  CT( I ) = CT( I ) + A( I, K )*B( K, J )\n                  G( I ) = G( I ) + ABS( A( I, K ) )*ABS( B( K, J ) )\n   20          CONTINUE\n   30       CONTINUE\n         ELSE IF( TRANA.AND..NOT.TRANB )THEN\n            DO 50 K = 1, KK\n               DO 40 I = 1, M\n                  CT( I ) = CT( I ) + A( K, I )*B( K, J )\n                  G( I ) = G( I ) + ABS( A( K, I ) )*ABS( B( K, J ) )\n   40          CONTINUE\n   50       CONTINUE\n         ELSE IF( .NOT.TRANA.AND.TRANB )THEN\n            DO 70 K = 1, KK\n               DO 60 I = 1, M\n                  CT( I ) = CT( I ) + A( I, K )*B( J, K )\n                  G( I ) = G( I ) + ABS( A( I, K ) )*ABS( B( J, K ) )\n   60          CONTINUE\n   70       CONTINUE\n         ELSE IF( TRANA.AND.TRANB )THEN\n            DO 90 K = 1, KK\n               DO 80 I = 1, M\n                  CT( I ) = CT( I ) + A( K, I )*B( J, K )\n                  G( I ) = G( I ) + ABS( A( K, I ) )*ABS( B( J, K ) )\n   80          CONTINUE\n   90       CONTINUE\n         END IF\n         DO 100 I = 1, M\n            CT( I ) = ALPHA*CT( I ) + BETA*C( I, J )\n            G( I ) = ABS( ALPHA )*G( I ) + ABS( BETA )*ABS( C( I, J ) )\n  100    CONTINUE\n*\n*        Compute the error ratio for this result.\n*\n         ERR = ZERO\n         DO 110 I = 1, M\n            ERRI = ABS( CT( I ) - CC( I, J ) )/EPS\n            IF( G( I ).NE.ZERO )\n     $         ERRI = ERRI/G( I )\n            ERR = MAX( ERR, ERRI )\n            IF( ERR*SQRT( EPS ).GE.ONE )\n     $         GO TO 130\n  110    CONTINUE\n*\n  120 CONTINUE\n*\n*     If the loop completes, all results are at least half accurate.\n      GO TO 150\n*\n*     Report fatal error.\n*\n  130 FATAL = .TRUE.\n      WRITE( NOUT, FMT = 9999 )\n      DO 140 I = 1, M\n         IF( MV )THEN\n            WRITE( NOUT, FMT = 9998 )I, CT( I ), CC( I, J )\n         ELSE\n            WRITE( NOUT, FMT = 9998 )I, CC( I, J ), CT( I )\n         END IF\n  140 CONTINUE\n      IF( N.GT.1 )\n     $   WRITE( NOUT, FMT = 9997 )J\n*\n  150 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ******* FATAL ERROR - COMPUTED RESULT IS LESS THAN HAL',\n     $      'F ACCURATE *******', /'           EXPECTED RESULT   COMPU',\n     $      'TED RESULT' )\n 9998 FORMAT( 1X, I7, 2G18.6 )\n 9997 FORMAT( '      THESE ARE THE RESULTS FOR COLUMN ', I3 )\n*\n*     End of SMMCH.\n*\n      END\n      LOGICAL FUNCTION LSE( RI, RJ, LR )\n*\n*  Tests if two arrays are identical.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Scalar Arguments ..\n      INTEGER            LR\n*     .. Array Arguments ..\n      REAL               RI( * ), RJ( * )\n*     .. Local Scalars ..\n      INTEGER            I\n*     .. Executable Statements ..\n      DO 10 I = 1, LR\n         IF( RI( I ).NE.RJ( I ) )\n     $      GO TO 20\n   10 CONTINUE\n      LSE = .TRUE.\n      GO TO 30\n   20 CONTINUE\n      LSE = .FALSE.\n   30 RETURN\n*\n*     End of LSE.\n*\n      END\n      LOGICAL FUNCTION LSERES( TYPE, UPLO, M, N, AA, AS, LDA )\n*\n*  Tests if selected elements in two arrays are equal.\n*\n*  TYPE is 'GE' or 'SY'.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Scalar Arguments ..\n      INTEGER            LDA, M, N\n      CHARACTER*1        UPLO\n      CHARACTER*2        TYPE\n*     .. Array Arguments ..\n      REAL               AA( LDA, * ), AS( LDA, * )\n*     .. Local Scalars ..\n      INTEGER            I, IBEG, IEND, J\n      LOGICAL            UPPER\n*     .. Executable Statements ..\n      UPPER = UPLO.EQ.'U'\n      IF( TYPE.EQ.'GE' )THEN\n         DO 20 J = 1, N\n            DO 10 I = M + 1, LDA\n               IF( AA( I, J ).NE.AS( I, J ) )\n     $            GO TO 70\n   10       CONTINUE\n   20    CONTINUE\n      ELSE IF( TYPE.EQ.'SY' )THEN\n         DO 50 J = 1, N\n            IF( UPPER )THEN\n               IBEG = 1\n               IEND = J\n            ELSE\n               IBEG = J\n               IEND = N\n            END IF\n            DO 30 I = 1, IBEG - 1\n               IF( AA( I, J ).NE.AS( I, J ) )\n     $            GO TO 70\n   30       CONTINUE\n            DO 40 I = IEND + 1, LDA\n               IF( AA( I, J ).NE.AS( I, J ) )\n     $            GO TO 70\n   40       CONTINUE\n   50    CONTINUE\n      END IF\n*\n      LSERES = .TRUE.\n      GO TO 80\n   70 CONTINUE\n      LSERES = .FALSE.\n   80 RETURN\n*\n*     End of LSERES.\n*\n      END\n      REAL FUNCTION SBEG( RESET )\n*\n*  Generates random numbers uniformly distributed between -0.5 and 0.5.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Scalar Arguments ..\n      LOGICAL            RESET\n*     .. Local Scalars ..\n      INTEGER            I, IC, MI\n*     .. Save statement ..\n      SAVE               I, IC, MI\n*     .. Executable Statements ..\n      IF( RESET )THEN\n*        Initialize local variables.\n         MI = 891\n         I = 7\n         IC = 0\n         RESET = .FALSE.\n      END IF\n*\n*     The sequence of values of I is bounded between 1 and 999.\n*     If initial I = 1,2,3,6,7 or 9, the period will be 50.\n*     If initial I = 4 or 8, the period will be 25.\n*     If initial I = 5, the period will be 10.\n*     IC is used to break up the period by skipping 1 value of I in 6.\n*\n      IC = IC + 1\n   10 I = I*MI\n      I = I - 1000*( I/1000 )\n      IF( IC.GE.5 )THEN\n         IC = 0\n         GO TO 10\n      END IF\n      SBEG = ( I - 500 )/1001.0\n      RETURN\n*\n*     End of SBEG.\n*\n      END\n      REAL FUNCTION SDIFF( X, Y )\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Scalar Arguments ..\n      REAL               X, Y\n*     .. Executable Statements ..\n      SDIFF = X - Y\n      RETURN\n*\n*     End of SDIFF.\n*\n      END\n      SUBROUTINE CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n*\n*  Tests whether XERBLA has detected an error when it should.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Scalar Arguments ..\n      INTEGER            INFOT, NOUT\n      LOGICAL            LERR, OK\n      CHARACTER*6        SRNAMT\n*     .. Executable Statements ..\n      IF( .NOT.LERR )THEN\n         WRITE( NOUT, FMT = 9999 )INFOT, SRNAMT\n         OK = .FALSE.\n      END IF\n      LERR = .FALSE.\n      RETURN\n*\n 9999 FORMAT( ' ***** ILLEGAL VALUE OF PARAMETER NUMBER ', I2, ' NOT D',\n     $      'ETECTED BY ', A6, ' *****' )\n*\n*     End of CHKXER.\n*\n      END\n      SUBROUTINE XERBLA( SRNAME, INFO )\n*\n*  This is a special version of XERBLA to be used only as part of\n*  the test program for testing error exits from the Level 3 BLAS\n*  routines.\n*\n*  XERBLA  is an error handler for the Level 3 BLAS routines.\n*\n*  It is called by the Level 3 BLAS routines if an input parameter is\n*  invalid.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Scalar Arguments ..\n      INTEGER            INFO\n      CHARACTER*6        SRNAME\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUT\n      LOGICAL            LERR, OK\n      CHARACTER*6        SRNAMT\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUT, OK, LERR\n      COMMON             /SRNAMC/SRNAMT\n*     .. Executable Statements ..\n      LERR = .TRUE.\n      IF( INFO.NE.INFOT )THEN\n         IF( INFOT.NE.0 )THEN\n            WRITE( NOUT, FMT = 9999 )INFO, INFOT\n         ELSE\n            WRITE( NOUT, FMT = 9997 )INFO\n         END IF\n         OK = .FALSE.\n      END IF\n      IF( SRNAME.NE.SRNAMT )THEN\n         WRITE( NOUT, FMT = 9998 )SRNAME, SRNAMT\n         OK = .FALSE.\n      END IF\n      RETURN\n*\n 9999 FORMAT( ' ******* XERBLA WAS CALLED WITH INFO = ', I6, ' INSTEAD',\n     $      ' OF ', I2, ' *******' )\n 9998 FORMAT( ' ******* XERBLA WAS CALLED WITH SRNAME = ', A6, ' INSTE',\n     $      'AD OF ', A6, ' *******' )\n 9997 FORMAT( ' ******* XERBLA WAS CALLED WITH INFO = ', I6,\n     $      ' *******' )\n*\n*     End of XERBLA\n*\n      END\n\n"
  },
  {
    "path": "3rdparty/eigen3/blas/testing/zblat1.f",
    "content": "*> \\brief \\b ZBLAT1\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*  Definition:\n*  ===========\n*\n*       PROGRAM ZBLAT1\n* \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*>    Test program for the COMPLEX*16 Level 1 BLAS.\n*>\n*>    Based upon the original BLAS test routine together with:\n*>    F06GAF Example Program Text\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date April 2012\n*\n*> \\ingroup complex16_blas_testing\n*\n*  =====================================================================\n      PROGRAM ZBLAT1\n*\n*  -- Reference BLAS test routine (version 3.4.1) --\n*  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     April 2012\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      INTEGER          NOUT\n      PARAMETER        (NOUT=6)\n*     .. Scalars in Common ..\n      INTEGER          ICASE, INCX, INCY, MODE, N\n      LOGICAL          PASS\n*     .. Local Scalars ..\n      DOUBLE PRECISION SFAC\n      INTEGER          IC\n*     .. External Subroutines ..\n      EXTERNAL         CHECK1, CHECK2, HEADER\n*     .. Common blocks ..\n      COMMON           /COMBLA/ICASE, N, INCX, INCY, MODE, PASS\n*     .. Data statements ..\n      DATA             SFAC/9.765625D-4/\n*     .. Executable Statements ..\n      WRITE (NOUT,99999)\n      DO 20 IC = 1, 10\n         ICASE = IC\n         CALL HEADER\n*\n*        Initialize PASS, INCX, INCY, and MODE for a new case.\n*        The value 9999 for INCX, INCY or MODE will appear in the\n*        detailed  output, if any, for cases that do not involve\n*        these parameters.\n*\n         PASS = .TRUE.\n         INCX = 9999\n         INCY = 9999\n         MODE = 9999\n         IF (ICASE.LE.5) THEN\n            CALL CHECK2(SFAC)\n         ELSE IF (ICASE.GE.6) THEN\n            CALL CHECK1(SFAC)\n         END IF\n*        -- Print\n         IF (PASS) WRITE (NOUT,99998)\n   20 CONTINUE\n      STOP\n*\n99999 FORMAT (' Complex BLAS Test Program Results',/1X)\n99998 FORMAT ('                                    ----- PASS -----')\n      END\n      SUBROUTINE HEADER\n*     .. Parameters ..\n      INTEGER          NOUT\n      PARAMETER        (NOUT=6)\n*     .. Scalars in Common ..\n      INTEGER          ICASE, INCX, INCY, MODE, N\n      LOGICAL          PASS\n*     .. Local Arrays ..\n      CHARACTER*6      L(10)\n*     .. Common blocks ..\n      COMMON           /COMBLA/ICASE, N, INCX, INCY, MODE, PASS\n*     .. Data statements ..\n      DATA             L(1)/'ZDOTC '/\n      DATA             L(2)/'ZDOTU '/\n      DATA             L(3)/'ZAXPY '/\n      DATA             L(4)/'ZCOPY '/\n      DATA             L(5)/'ZSWAP '/\n      DATA             L(6)/'DZNRM2'/\n      DATA             L(7)/'DZASUM'/\n      DATA             L(8)/'ZSCAL '/\n      DATA             L(9)/'ZDSCAL'/\n      DATA             L(10)/'IZAMAX'/\n*     .. Executable Statements ..\n      WRITE (NOUT,99999) ICASE, L(ICASE)\n      RETURN\n*\n99999 FORMAT (/' Test of subprogram number',I3,12X,A6)\n      END\n      SUBROUTINE CHECK1(SFAC)\n*     .. Parameters ..\n      INTEGER           NOUT\n      PARAMETER         (NOUT=6)\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION  SFAC\n*     .. Scalars in Common ..\n      INTEGER           ICASE, INCX, INCY, MODE, N\n      LOGICAL           PASS\n*     .. Local Scalars ..\n      COMPLEX*16        CA\n      DOUBLE PRECISION  SA\n      INTEGER           I, J, LEN, NP1\n*     .. Local Arrays ..\n      COMPLEX*16        CTRUE5(8,5,2), CTRUE6(8,5,2), CV(8,5,2), CX(8),\n     +                  MWPCS(5), MWPCT(5)\n      DOUBLE PRECISION  STRUE2(5), STRUE4(5)\n      INTEGER           ITRUE3(5)\n*     .. External Functions ..\n      DOUBLE PRECISION  DZASUM, DZNRM2\n      INTEGER           IZAMAX\n      EXTERNAL          DZASUM, DZNRM2, IZAMAX\n*     .. External Subroutines ..\n      EXTERNAL          ZSCAL, ZDSCAL, CTEST, ITEST1, STEST1\n*     .. Intrinsic Functions ..\n      INTRINSIC         MAX\n*     .. Common blocks ..\n      COMMON            /COMBLA/ICASE, N, INCX, INCY, MODE, PASS\n*     .. Data statements ..\n      DATA              SA, CA/0.3D0, (0.4D0,-0.7D0)/\n      DATA              ((CV(I,J,1),I=1,8),J=1,5)/(0.1D0,0.1D0),\n     +                  (1.0D0,2.0D0), (1.0D0,2.0D0), (1.0D0,2.0D0),\n     +                  (1.0D0,2.0D0), (1.0D0,2.0D0), (1.0D0,2.0D0),\n     +                  (1.0D0,2.0D0), (0.3D0,-0.4D0), (3.0D0,4.0D0),\n     +                  (3.0D0,4.0D0), (3.0D0,4.0D0), (3.0D0,4.0D0),\n     +                  (3.0D0,4.0D0), (3.0D0,4.0D0), (3.0D0,4.0D0),\n     +                  (0.1D0,-0.3D0), (0.5D0,-0.1D0), (5.0D0,6.0D0),\n     +                  (5.0D0,6.0D0), (5.0D0,6.0D0), (5.0D0,6.0D0),\n     +                  (5.0D0,6.0D0), (5.0D0,6.0D0), (0.1D0,0.1D0),\n     +                  (-0.6D0,0.1D0), (0.1D0,-0.3D0), (7.0D0,8.0D0),\n     +                  (7.0D0,8.0D0), (7.0D0,8.0D0), (7.0D0,8.0D0),\n     +                  (7.0D0,8.0D0), (0.3D0,0.1D0), (0.5D0,0.0D0),\n     +                  (0.0D0,0.5D0), (0.0D0,0.2D0), (2.0D0,3.0D0),\n     +                  (2.0D0,3.0D0), (2.0D0,3.0D0), (2.0D0,3.0D0)/\n      DATA              ((CV(I,J,2),I=1,8),J=1,5)/(0.1D0,0.1D0),\n     +                  (4.0D0,5.0D0), (4.0D0,5.0D0), (4.0D0,5.0D0),\n     +                  (4.0D0,5.0D0), (4.0D0,5.0D0), (4.0D0,5.0D0),\n     +                  (4.0D0,5.0D0), (0.3D0,-0.4D0), (6.0D0,7.0D0),\n     +                  (6.0D0,7.0D0), (6.0D0,7.0D0), (6.0D0,7.0D0),\n     +                  (6.0D0,7.0D0), (6.0D0,7.0D0), (6.0D0,7.0D0),\n     +                  (0.1D0,-0.3D0), (8.0D0,9.0D0), (0.5D0,-0.1D0),\n     +                  (2.0D0,5.0D0), (2.0D0,5.0D0), (2.0D0,5.0D0),\n     +                  (2.0D0,5.0D0), (2.0D0,5.0D0), (0.1D0,0.1D0),\n     +                  (3.0D0,6.0D0), (-0.6D0,0.1D0), (4.0D0,7.0D0),\n     +                  (0.1D0,-0.3D0), (7.0D0,2.0D0), (7.0D0,2.0D0),\n     +                  (7.0D0,2.0D0), (0.3D0,0.1D0), (5.0D0,8.0D0),\n     +                  (0.5D0,0.0D0), (6.0D0,9.0D0), (0.0D0,0.5D0),\n     +                  (8.0D0,3.0D0), (0.0D0,0.2D0), (9.0D0,4.0D0)/\n      DATA              STRUE2/0.0D0, 0.5D0, 0.6D0, 0.7D0, 0.8D0/\n      DATA              STRUE4/0.0D0, 0.7D0, 1.0D0, 1.3D0, 1.6D0/\n      DATA              ((CTRUE5(I,J,1),I=1,8),J=1,5)/(0.1D0,0.1D0),\n     +                  (1.0D0,2.0D0), (1.0D0,2.0D0), (1.0D0,2.0D0),\n     +                  (1.0D0,2.0D0), (1.0D0,2.0D0), (1.0D0,2.0D0),\n     +                  (1.0D0,2.0D0), (-0.16D0,-0.37D0), (3.0D0,4.0D0),\n     +                  (3.0D0,4.0D0), (3.0D0,4.0D0), (3.0D0,4.0D0),\n     +                  (3.0D0,4.0D0), (3.0D0,4.0D0), (3.0D0,4.0D0),\n     +                  (-0.17D0,-0.19D0), (0.13D0,-0.39D0),\n     +                  (5.0D0,6.0D0), (5.0D0,6.0D0), (5.0D0,6.0D0),\n     +                  (5.0D0,6.0D0), (5.0D0,6.0D0), (5.0D0,6.0D0),\n     +                  (0.11D0,-0.03D0), (-0.17D0,0.46D0),\n     +                  (-0.17D0,-0.19D0), (7.0D0,8.0D0), (7.0D0,8.0D0),\n     +                  (7.0D0,8.0D0), (7.0D0,8.0D0), (7.0D0,8.0D0),\n     +                  (0.19D0,-0.17D0), (0.20D0,-0.35D0),\n     +                  (0.35D0,0.20D0), (0.14D0,0.08D0),\n     +                  (2.0D0,3.0D0), (2.0D0,3.0D0), (2.0D0,3.0D0),\n     +                  (2.0D0,3.0D0)/\n      DATA              ((CTRUE5(I,J,2),I=1,8),J=1,5)/(0.1D0,0.1D0),\n     +                  (4.0D0,5.0D0), (4.0D0,5.0D0), (4.0D0,5.0D0),\n     +                  (4.0D0,5.0D0), (4.0D0,5.0D0), (4.0D0,5.0D0),\n     +                  (4.0D0,5.0D0), (-0.16D0,-0.37D0), (6.0D0,7.0D0),\n     +                  (6.0D0,7.0D0), (6.0D0,7.0D0), (6.0D0,7.0D0),\n     +                  (6.0D0,7.0D0), (6.0D0,7.0D0), (6.0D0,7.0D0),\n     +                  (-0.17D0,-0.19D0), (8.0D0,9.0D0),\n     +                  (0.13D0,-0.39D0), (2.0D0,5.0D0), (2.0D0,5.0D0),\n     +                  (2.0D0,5.0D0), (2.0D0,5.0D0), (2.0D0,5.0D0),\n     +                  (0.11D0,-0.03D0), (3.0D0,6.0D0),\n     +                  (-0.17D0,0.46D0), (4.0D0,7.0D0),\n     +                  (-0.17D0,-0.19D0), (7.0D0,2.0D0), (7.0D0,2.0D0),\n     +                  (7.0D0,2.0D0), (0.19D0,-0.17D0), (5.0D0,8.0D0),\n     +                  (0.20D0,-0.35D0), (6.0D0,9.0D0),\n     +                  (0.35D0,0.20D0), (8.0D0,3.0D0),\n     +                  (0.14D0,0.08D0), (9.0D0,4.0D0)/\n      DATA              ((CTRUE6(I,J,1),I=1,8),J=1,5)/(0.1D0,0.1D0),\n     +                  (1.0D0,2.0D0), (1.0D0,2.0D0), (1.0D0,2.0D0),\n     +                  (1.0D0,2.0D0), (1.0D0,2.0D0), (1.0D0,2.0D0),\n     +                  (1.0D0,2.0D0), (0.09D0,-0.12D0), (3.0D0,4.0D0),\n     +                  (3.0D0,4.0D0), (3.0D0,4.0D0), (3.0D0,4.0D0),\n     +                  (3.0D0,4.0D0), (3.0D0,4.0D0), (3.0D0,4.0D0),\n     +                  (0.03D0,-0.09D0), (0.15D0,-0.03D0),\n     +                  (5.0D0,6.0D0), (5.0D0,6.0D0), (5.0D0,6.0D0),\n     +                  (5.0D0,6.0D0), (5.0D0,6.0D0), (5.0D0,6.0D0),\n     +                  (0.03D0,0.03D0), (-0.18D0,0.03D0),\n     +                  (0.03D0,-0.09D0), (7.0D0,8.0D0), (7.0D0,8.0D0),\n     +                  (7.0D0,8.0D0), (7.0D0,8.0D0), (7.0D0,8.0D0),\n     +                  (0.09D0,0.03D0), (0.15D0,0.00D0),\n     +                  (0.00D0,0.15D0), (0.00D0,0.06D0), (2.0D0,3.0D0),\n     +                  (2.0D0,3.0D0), (2.0D0,3.0D0), (2.0D0,3.0D0)/\n      DATA              ((CTRUE6(I,J,2),I=1,8),J=1,5)/(0.1D0,0.1D0),\n     +                  (4.0D0,5.0D0), (4.0D0,5.0D0), (4.0D0,5.0D0),\n     +                  (4.0D0,5.0D0), (4.0D0,5.0D0), (4.0D0,5.0D0),\n     +                  (4.0D0,5.0D0), (0.09D0,-0.12D0), (6.0D0,7.0D0),\n     +                  (6.0D0,7.0D0), (6.0D0,7.0D0), (6.0D0,7.0D0),\n     +                  (6.0D0,7.0D0), (6.0D0,7.0D0), (6.0D0,7.0D0),\n     +                  (0.03D0,-0.09D0), (8.0D0,9.0D0),\n     +                  (0.15D0,-0.03D0), (2.0D0,5.0D0), (2.0D0,5.0D0),\n     +                  (2.0D0,5.0D0), (2.0D0,5.0D0), (2.0D0,5.0D0),\n     +                  (0.03D0,0.03D0), (3.0D0,6.0D0),\n     +                  (-0.18D0,0.03D0), (4.0D0,7.0D0),\n     +                  (0.03D0,-0.09D0), (7.0D0,2.0D0), (7.0D0,2.0D0),\n     +                  (7.0D0,2.0D0), (0.09D0,0.03D0), (5.0D0,8.0D0),\n     +                  (0.15D0,0.00D0), (6.0D0,9.0D0), (0.00D0,0.15D0),\n     +                  (8.0D0,3.0D0), (0.00D0,0.06D0), (9.0D0,4.0D0)/\n      DATA              ITRUE3/0, 1, 2, 2, 2/\n*     .. Executable Statements ..\n      DO 60 INCX = 1, 2\n         DO 40 NP1 = 1, 5\n            N = NP1 - 1\n            LEN = 2*MAX(N,1)\n*           .. Set vector arguments ..\n            DO 20 I = 1, LEN\n               CX(I) = CV(I,NP1,INCX)\n   20       CONTINUE\n            IF (ICASE.EQ.6) THEN\n*              .. DZNRM2 ..\n               CALL STEST1(DZNRM2(N,CX,INCX),STRUE2(NP1),STRUE2(NP1),\n     +                     SFAC)\n            ELSE IF (ICASE.EQ.7) THEN\n*              .. DZASUM ..\n               CALL STEST1(DZASUM(N,CX,INCX),STRUE4(NP1),STRUE4(NP1),\n     +                     SFAC)\n            ELSE IF (ICASE.EQ.8) THEN\n*              .. ZSCAL ..\n               CALL ZSCAL(N,CA,CX,INCX)\n               CALL CTEST(LEN,CX,CTRUE5(1,NP1,INCX),CTRUE5(1,NP1,INCX),\n     +                    SFAC)\n            ELSE IF (ICASE.EQ.9) THEN\n*              .. ZDSCAL ..\n               CALL ZDSCAL(N,SA,CX,INCX)\n               CALL CTEST(LEN,CX,CTRUE6(1,NP1,INCX),CTRUE6(1,NP1,INCX),\n     +                    SFAC)\n            ELSE IF (ICASE.EQ.10) THEN\n*              .. IZAMAX ..\n               CALL ITEST1(IZAMAX(N,CX,INCX),ITRUE3(NP1))\n            ELSE\n               WRITE (NOUT,*) ' Shouldn''t be here in CHECK1'\n               STOP\n            END IF\n*\n   40    CONTINUE\n   60 CONTINUE\n*\n      INCX = 1\n      IF (ICASE.EQ.8) THEN\n*        ZSCAL\n*        Add a test for alpha equal to zero.\n         CA = (0.0D0,0.0D0)\n         DO 80 I = 1, 5\n            MWPCT(I) = (0.0D0,0.0D0)\n            MWPCS(I) = (1.0D0,1.0D0)\n   80    CONTINUE\n         CALL ZSCAL(5,CA,CX,INCX)\n         CALL CTEST(5,CX,MWPCT,MWPCS,SFAC)\n      ELSE IF (ICASE.EQ.9) THEN\n*        ZDSCAL\n*        Add a test for alpha equal to zero.\n         SA = 0.0D0\n         DO 100 I = 1, 5\n            MWPCT(I) = (0.0D0,0.0D0)\n            MWPCS(I) = (1.0D0,1.0D0)\n  100    CONTINUE\n         CALL ZDSCAL(5,SA,CX,INCX)\n         CALL CTEST(5,CX,MWPCT,MWPCS,SFAC)\n*        Add a test for alpha equal to one.\n         SA = 1.0D0\n         DO 120 I = 1, 5\n            MWPCT(I) = CX(I)\n            MWPCS(I) = CX(I)\n  120    CONTINUE\n         CALL ZDSCAL(5,SA,CX,INCX)\n         CALL CTEST(5,CX,MWPCT,MWPCS,SFAC)\n*        Add a test for alpha equal to minus one.\n         SA = -1.0D0\n         DO 140 I = 1, 5\n            MWPCT(I) = -CX(I)\n            MWPCS(I) = -CX(I)\n  140    CONTINUE\n         CALL ZDSCAL(5,SA,CX,INCX)\n         CALL CTEST(5,CX,MWPCT,MWPCS,SFAC)\n      END IF\n      RETURN\n      END\n      SUBROUTINE CHECK2(SFAC)\n*     .. Parameters ..\n      INTEGER           NOUT\n      PARAMETER         (NOUT=6)\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION  SFAC\n*     .. Scalars in Common ..\n      INTEGER           ICASE, INCX, INCY, MODE, N\n      LOGICAL           PASS\n*     .. Local Scalars ..\n      COMPLEX*16        CA\n      INTEGER           I, J, KI, KN, KSIZE, LENX, LENY, MX, MY\n*     .. Local Arrays ..\n      COMPLEX*16        CDOT(1), CSIZE1(4), CSIZE2(7,2), CSIZE3(14),\n     +                  CT10X(7,4,4), CT10Y(7,4,4), CT6(4,4), CT7(4,4),\n     +                  CT8(7,4,4), CX(7), CX1(7), CY(7), CY1(7)\n      INTEGER           INCXS(4), INCYS(4), LENS(4,2), NS(4)\n*     .. External Functions ..\n      COMPLEX*16        ZDOTC, ZDOTU\n      EXTERNAL          ZDOTC, ZDOTU\n*     .. External Subroutines ..\n      EXTERNAL          ZAXPY, ZCOPY, ZSWAP, CTEST\n*     .. Intrinsic Functions ..\n      INTRINSIC         ABS, MIN\n*     .. Common blocks ..\n      COMMON            /COMBLA/ICASE, N, INCX, INCY, MODE, PASS\n*     .. Data statements ..\n      DATA              CA/(0.4D0,-0.7D0)/\n      DATA              INCXS/1, 2, -2, -1/\n      DATA              INCYS/1, -2, 1, -2/\n      DATA              LENS/1, 1, 2, 4, 1, 1, 3, 7/\n      DATA              NS/0, 1, 2, 4/\n      DATA              CX1/(0.7D0,-0.8D0), (-0.4D0,-0.7D0),\n     +                  (-0.1D0,-0.9D0), (0.2D0,-0.8D0),\n     +                  (-0.9D0,-0.4D0), (0.1D0,0.4D0), (-0.6D0,0.6D0)/\n      DATA              CY1/(0.6D0,-0.6D0), (-0.9D0,0.5D0),\n     +                  (0.7D0,-0.6D0), (0.1D0,-0.5D0), (-0.1D0,-0.2D0),\n     +                  (-0.5D0,-0.3D0), (0.8D0,-0.7D0)/\n      DATA              ((CT8(I,J,1),I=1,7),J=1,4)/(0.6D0,-0.6D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.32D0,-1.41D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.32D0,-1.41D0),\n     +                  (-1.55D0,0.5D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.32D0,-1.41D0), (-1.55D0,0.5D0),\n     +                  (0.03D0,-0.89D0), (-0.38D0,-0.96D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0)/\n      DATA              ((CT8(I,J,2),I=1,7),J=1,4)/(0.6D0,-0.6D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.32D0,-1.41D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (-0.07D0,-0.89D0),\n     +                  (-0.9D0,0.5D0), (0.42D0,-1.41D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.78D0,0.06D0), (-0.9D0,0.5D0),\n     +                  (0.06D0,-0.13D0), (0.1D0,-0.5D0),\n     +                  (-0.77D0,-0.49D0), (-0.5D0,-0.3D0),\n     +                  (0.52D0,-1.51D0)/\n      DATA              ((CT8(I,J,3),I=1,7),J=1,4)/(0.6D0,-0.6D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.32D0,-1.41D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (-0.07D0,-0.89D0),\n     +                  (-1.18D0,-0.31D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.78D0,0.06D0), (-1.54D0,0.97D0),\n     +                  (0.03D0,-0.89D0), (-0.18D0,-1.31D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0)/\n      DATA              ((CT8(I,J,4),I=1,7),J=1,4)/(0.6D0,-0.6D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.32D0,-1.41D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.32D0,-1.41D0), (-0.9D0,0.5D0),\n     +                  (0.05D0,-0.6D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.32D0,-1.41D0),\n     +                  (-0.9D0,0.5D0), (0.05D0,-0.6D0), (0.1D0,-0.5D0),\n     +                  (-0.77D0,-0.49D0), (-0.5D0,-0.3D0),\n     +                  (0.32D0,-1.16D0)/\n      DATA              CT7/(0.0D0,0.0D0), (-0.06D0,-0.90D0),\n     +                  (0.65D0,-0.47D0), (-0.34D0,-1.22D0),\n     +                  (0.0D0,0.0D0), (-0.06D0,-0.90D0),\n     +                  (-0.59D0,-1.46D0), (-1.04D0,-0.04D0),\n     +                  (0.0D0,0.0D0), (-0.06D0,-0.90D0),\n     +                  (-0.83D0,0.59D0), (0.07D0,-0.37D0),\n     +                  (0.0D0,0.0D0), (-0.06D0,-0.90D0),\n     +                  (-0.76D0,-1.15D0), (-1.33D0,-1.82D0)/\n      DATA              CT6/(0.0D0,0.0D0), (0.90D0,0.06D0),\n     +                  (0.91D0,-0.77D0), (1.80D0,-0.10D0),\n     +                  (0.0D0,0.0D0), (0.90D0,0.06D0), (1.45D0,0.74D0),\n     +                  (0.20D0,0.90D0), (0.0D0,0.0D0), (0.90D0,0.06D0),\n     +                  (-0.55D0,0.23D0), (0.83D0,-0.39D0),\n     +                  (0.0D0,0.0D0), (0.90D0,0.06D0), (1.04D0,0.79D0),\n     +                  (1.95D0,1.22D0)/\n      DATA              ((CT10X(I,J,1),I=1,7),J=1,4)/(0.7D0,-0.8D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.6D0,-0.6D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.6D0,-0.6D0), (-0.9D0,0.5D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.6D0,-0.6D0),\n     +                  (-0.9D0,0.5D0), (0.7D0,-0.6D0), (0.1D0,-0.5D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0)/\n      DATA              ((CT10X(I,J,2),I=1,7),J=1,4)/(0.7D0,-0.8D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.6D0,-0.6D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.7D0,-0.6D0), (-0.4D0,-0.7D0),\n     +                  (0.6D0,-0.6D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.8D0,-0.7D0),\n     +                  (-0.4D0,-0.7D0), (-0.1D0,-0.2D0),\n     +                  (0.2D0,-0.8D0), (0.7D0,-0.6D0), (0.1D0,0.4D0),\n     +                  (0.6D0,-0.6D0)/\n      DATA              ((CT10X(I,J,3),I=1,7),J=1,4)/(0.7D0,-0.8D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.6D0,-0.6D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (-0.9D0,0.5D0), (-0.4D0,-0.7D0),\n     +                  (0.6D0,-0.6D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.1D0,-0.5D0),\n     +                  (-0.4D0,-0.7D0), (0.7D0,-0.6D0), (0.2D0,-0.8D0),\n     +                  (-0.9D0,0.5D0), (0.1D0,0.4D0), (0.6D0,-0.6D0)/\n      DATA              ((CT10X(I,J,4),I=1,7),J=1,4)/(0.7D0,-0.8D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.6D0,-0.6D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.6D0,-0.6D0), (0.7D0,-0.6D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.6D0,-0.6D0),\n     +                  (0.7D0,-0.6D0), (-0.1D0,-0.2D0), (0.8D0,-0.7D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0)/\n      DATA              ((CT10Y(I,J,1),I=1,7),J=1,4)/(0.6D0,-0.6D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.7D0,-0.8D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.7D0,-0.8D0), (-0.4D0,-0.7D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.7D0,-0.8D0),\n     +                  (-0.4D0,-0.7D0), (-0.1D0,-0.9D0),\n     +                  (0.2D0,-0.8D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0)/\n      DATA              ((CT10Y(I,J,2),I=1,7),J=1,4)/(0.6D0,-0.6D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.7D0,-0.8D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (-0.1D0,-0.9D0), (-0.9D0,0.5D0),\n     +                  (0.7D0,-0.8D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (-0.6D0,0.6D0),\n     +                  (-0.9D0,0.5D0), (-0.9D0,-0.4D0), (0.1D0,-0.5D0),\n     +                  (-0.1D0,-0.9D0), (-0.5D0,-0.3D0),\n     +                  (0.7D0,-0.8D0)/\n      DATA              ((CT10Y(I,J,3),I=1,7),J=1,4)/(0.6D0,-0.6D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.7D0,-0.8D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (-0.1D0,-0.9D0), (0.7D0,-0.8D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (-0.6D0,0.6D0),\n     +                  (-0.9D0,-0.4D0), (-0.1D0,-0.9D0),\n     +                  (0.7D0,-0.8D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0)/\n      DATA              ((CT10Y(I,J,4),I=1,7),J=1,4)/(0.6D0,-0.6D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.7D0,-0.8D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.7D0,-0.8D0), (-0.9D0,0.5D0),\n     +                  (-0.4D0,-0.7D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.7D0,-0.8D0),\n     +                  (-0.9D0,0.5D0), (-0.4D0,-0.7D0), (0.1D0,-0.5D0),\n     +                  (-0.1D0,-0.9D0), (-0.5D0,-0.3D0),\n     +                  (0.2D0,-0.8D0)/\n      DATA              CSIZE1/(0.0D0,0.0D0), (0.9D0,0.9D0),\n     +                  (1.63D0,1.73D0), (2.90D0,2.78D0)/\n      DATA              CSIZE3/(0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (1.17D0,1.17D0),\n     +                  (1.17D0,1.17D0), (1.17D0,1.17D0),\n     +                  (1.17D0,1.17D0), (1.17D0,1.17D0),\n     +                  (1.17D0,1.17D0), (1.17D0,1.17D0)/\n      DATA              CSIZE2/(0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),\n     +                  (0.0D0,0.0D0), (0.0D0,0.0D0), (1.54D0,1.54D0),\n     +                  (1.54D0,1.54D0), (1.54D0,1.54D0),\n     +                  (1.54D0,1.54D0), (1.54D0,1.54D0),\n     +                  (1.54D0,1.54D0), (1.54D0,1.54D0)/\n*     .. Executable Statements ..\n      DO 60 KI = 1, 4\n         INCX = INCXS(KI)\n         INCY = INCYS(KI)\n         MX = ABS(INCX)\n         MY = ABS(INCY)\n*\n         DO 40 KN = 1, 4\n            N = NS(KN)\n            KSIZE = MIN(2,KN)\n            LENX = LENS(KN,MX)\n            LENY = LENS(KN,MY)\n*           .. initialize all argument arrays ..\n            DO 20 I = 1, 7\n               CX(I) = CX1(I)\n               CY(I) = CY1(I)\n   20       CONTINUE\n            IF (ICASE.EQ.1) THEN\n*              .. ZDOTC ..\n               CDOT(1) = ZDOTC(N,CX,INCX,CY,INCY)\n               CALL CTEST(1,CDOT,CT6(KN,KI),CSIZE1(KN),SFAC)\n            ELSE IF (ICASE.EQ.2) THEN\n*              .. ZDOTU ..\n               CDOT(1) = ZDOTU(N,CX,INCX,CY,INCY)\n               CALL CTEST(1,CDOT,CT7(KN,KI),CSIZE1(KN),SFAC)\n            ELSE IF (ICASE.EQ.3) THEN\n*              .. ZAXPY ..\n               CALL ZAXPY(N,CA,CX,INCX,CY,INCY)\n               CALL CTEST(LENY,CY,CT8(1,KN,KI),CSIZE2(1,KSIZE),SFAC)\n            ELSE IF (ICASE.EQ.4) THEN\n*              .. ZCOPY ..\n               CALL ZCOPY(N,CX,INCX,CY,INCY)\n               CALL CTEST(LENY,CY,CT10Y(1,KN,KI),CSIZE3,1.0D0)\n            ELSE IF (ICASE.EQ.5) THEN\n*              .. ZSWAP ..\n               CALL ZSWAP(N,CX,INCX,CY,INCY)\n               CALL CTEST(LENX,CX,CT10X(1,KN,KI),CSIZE3,1.0D0)\n               CALL CTEST(LENY,CY,CT10Y(1,KN,KI),CSIZE3,1.0D0)\n            ELSE\n               WRITE (NOUT,*) ' Shouldn''t be here in CHECK2'\n               STOP\n            END IF\n*\n   40    CONTINUE\n   60 CONTINUE\n      RETURN\n      END\n      SUBROUTINE STEST(LEN,SCOMP,STRUE,SSIZE,SFAC)\n*     ********************************* STEST **************************\n*\n*     THIS SUBR COMPARES ARRAYS  SCOMP() AND STRUE() OF LENGTH LEN TO\n*     SEE IF THE TERM BY TERM DIFFERENCES, MULTIPLIED BY SFAC, ARE\n*     NEGLIGIBLE.\n*\n*     C. L. LAWSON, JPL, 1974 DEC 10\n*\n*     .. Parameters ..\n      INTEGER          NOUT\n      DOUBLE PRECISION ZERO\n      PARAMETER        (NOUT=6, ZERO=0.0D0)\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION SFAC\n      INTEGER          LEN\n*     .. Array Arguments ..\n      DOUBLE PRECISION SCOMP(LEN), SSIZE(LEN), STRUE(LEN)\n*     .. Scalars in Common ..\n      INTEGER          ICASE, INCX, INCY, MODE, N\n      LOGICAL          PASS\n*     .. Local Scalars ..\n      DOUBLE PRECISION SD\n      INTEGER          I\n*     .. External Functions ..\n      DOUBLE PRECISION SDIFF\n      EXTERNAL         SDIFF\n*     .. Intrinsic Functions ..\n      INTRINSIC        ABS\n*     .. Common blocks ..\n      COMMON           /COMBLA/ICASE, N, INCX, INCY, MODE, PASS\n*     .. Executable Statements ..\n*\n      DO 40 I = 1, LEN\n         SD = SCOMP(I) - STRUE(I)\n         IF (ABS(SFAC*SD) .LE. ABS(SSIZE(I))*EPSILON(ZERO))\n     +       GO TO 40\n*\n*                             HERE    SCOMP(I) IS NOT CLOSE TO STRUE(I).\n*\n         IF ( .NOT. PASS) GO TO 20\n*                             PRINT FAIL MESSAGE AND HEADER.\n         PASS = .FALSE.\n         WRITE (NOUT,99999)\n         WRITE (NOUT,99998)\n   20    WRITE (NOUT,99997) ICASE, N, INCX, INCY, MODE, I, SCOMP(I),\n     +     STRUE(I), SD, SSIZE(I)\n   40 CONTINUE\n      RETURN\n*\n99999 FORMAT ('                                       FAIL')\n99998 FORMAT (/' CASE  N INCX INCY MODE  I                            ',\n     +       ' COMP(I)                             TRUE(I)  DIFFERENCE',\n     +       '     SIZE(I)',/1X)\n99997 FORMAT (1X,I4,I3,3I5,I3,2D36.8,2D12.4)\n      END\n      SUBROUTINE STEST1(SCOMP1,STRUE1,SSIZE,SFAC)\n*     ************************* STEST1 *****************************\n*\n*     THIS IS AN INTERFACE SUBROUTINE TO ACCOMMODATE THE FORTRAN\n*     REQUIREMENT THAT WHEN A DUMMY ARGUMENT IS AN ARRAY, THE\n*     ACTUAL ARGUMENT MUST ALSO BE AN ARRAY OR AN ARRAY ELEMENT.\n*\n*     C.L. LAWSON, JPL, 1978 DEC 6\n*\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION  SCOMP1, SFAC, STRUE1\n*     .. Array Arguments ..\n      DOUBLE PRECISION  SSIZE(*)\n*     .. Local Arrays ..\n      DOUBLE PRECISION  SCOMP(1), STRUE(1)\n*     .. External Subroutines ..\n      EXTERNAL          STEST\n*     .. Executable Statements ..\n*\n      SCOMP(1) = SCOMP1\n      STRUE(1) = STRUE1\n      CALL STEST(1,SCOMP,STRUE,SSIZE,SFAC)\n*\n      RETURN\n      END\n      DOUBLE PRECISION FUNCTION SDIFF(SA,SB)\n*     ********************************* SDIFF **************************\n*     COMPUTES DIFFERENCE OF TWO NUMBERS.  C. L. LAWSON, JPL 1974 FEB 15\n*\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION                SA, SB\n*     .. Executable Statements ..\n      SDIFF = SA - SB\n      RETURN\n      END\n      SUBROUTINE CTEST(LEN,CCOMP,CTRUE,CSIZE,SFAC)\n*     **************************** CTEST *****************************\n*\n*     C.L. LAWSON, JPL, 1978 DEC 6\n*\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION SFAC\n      INTEGER          LEN\n*     .. Array Arguments ..\n      COMPLEX*16       CCOMP(LEN), CSIZE(LEN), CTRUE(LEN)\n*     .. Local Scalars ..\n      INTEGER          I\n*     .. Local Arrays ..\n      DOUBLE PRECISION SCOMP(20), SSIZE(20), STRUE(20)\n*     .. External Subroutines ..\n      EXTERNAL         STEST\n*     .. Intrinsic Functions ..\n      INTRINSIC        DIMAG, DBLE\n*     .. Executable Statements ..\n      DO 20 I = 1, LEN\n         SCOMP(2*I-1) = DBLE(CCOMP(I))\n         SCOMP(2*I) = DIMAG(CCOMP(I))\n         STRUE(2*I-1) = DBLE(CTRUE(I))\n         STRUE(2*I) = DIMAG(CTRUE(I))\n         SSIZE(2*I-1) = DBLE(CSIZE(I))\n         SSIZE(2*I) = DIMAG(CSIZE(I))\n   20 CONTINUE\n*\n      CALL STEST(2*LEN,SCOMP,STRUE,SSIZE,SFAC)\n      RETURN\n      END\n      SUBROUTINE ITEST1(ICOMP,ITRUE)\n*     ********************************* ITEST1 *************************\n*\n*     THIS SUBROUTINE COMPARES THE VARIABLES ICOMP AND ITRUE FOR\n*     EQUALITY.\n*     C. L. LAWSON, JPL, 1974 DEC 10\n*\n*     .. Parameters ..\n      INTEGER           NOUT\n      PARAMETER         (NOUT=6)\n*     .. Scalar Arguments ..\n      INTEGER           ICOMP, ITRUE\n*     .. Scalars in Common ..\n      INTEGER           ICASE, INCX, INCY, MODE, N\n      LOGICAL           PASS\n*     .. Local Scalars ..\n      INTEGER           ID\n*     .. Common blocks ..\n      COMMON            /COMBLA/ICASE, N, INCX, INCY, MODE, PASS\n*     .. Executable Statements ..\n      IF (ICOMP.EQ.ITRUE) GO TO 40\n*\n*                            HERE ICOMP IS NOT EQUAL TO ITRUE.\n*\n      IF ( .NOT. PASS) GO TO 20\n*                             PRINT FAIL MESSAGE AND HEADER.\n      PASS = .FALSE.\n      WRITE (NOUT,99999)\n      WRITE (NOUT,99998)\n   20 ID = ICOMP - ITRUE\n      WRITE (NOUT,99997) ICASE, N, INCX, INCY, MODE, ICOMP, ITRUE, ID\n   40 CONTINUE\n      RETURN\n*\n99999 FORMAT ('                                       FAIL')\n99998 FORMAT (/' CASE  N INCX INCY MODE                               ',\n     +       ' COMP                                TRUE     DIFFERENCE',\n     +       /1X)\n99997 FORMAT (1X,I4,I3,3I5,2I36,I12)\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/blas/testing/zblat2.f",
    "content": "*> \\brief \\b ZBLAT2\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*  Definition:\n*  ===========\n*\n*       PROGRAM ZBLAT2\n* \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> Test program for the COMPLEX*16       Level 2 Blas.\n*>\n*> The program must be driven by a short data file. The first 18 records\n*> of the file are read using list-directed input, the last 17 records\n*> are read using the format ( A6, L2 ). An annotated example of a data\n*> file can be obtained by deleting the first 3 characters from the\n*> following 35 lines:\n*> 'zblat2.out'      NAME OF SUMMARY OUTPUT FILE\n*> 6                 UNIT NUMBER OF SUMMARY FILE\n*> 'CBLA2T.SNAP'     NAME OF SNAPSHOT OUTPUT FILE\n*> -1                UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)\n*> F        LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.\n*> F        LOGICAL FLAG, T TO STOP ON FAILURES.\n*> T        LOGICAL FLAG, T TO TEST ERROR EXITS.\n*> 16.0     THRESHOLD VALUE OF TEST RATIO\n*> 6                 NUMBER OF VALUES OF N\n*> 0 1 2 3 5 9       VALUES OF N\n*> 4                 NUMBER OF VALUES OF K\n*> 0 1 2 4           VALUES OF K\n*> 4                 NUMBER OF VALUES OF INCX AND INCY\n*> 1 2 -1 -2         VALUES OF INCX AND INCY\n*> 3                 NUMBER OF VALUES OF ALPHA\n*> (0.0,0.0) (1.0,0.0) (0.7,-0.9)       VALUES OF ALPHA\n*> 3                 NUMBER OF VALUES OF BETA\n*> (0.0,0.0) (1.0,0.0) (1.3,-1.1)       VALUES OF BETA\n*> ZGEMV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> ZGBMV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> ZHEMV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> ZHBMV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> ZHPMV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> ZTRMV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> ZTBMV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> ZTPMV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> ZTRSV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> ZTBSV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> ZTPSV  T PUT F FOR NO TEST. SAME COLUMNS.\n*> ZGERC  T PUT F FOR NO TEST. SAME COLUMNS.\n*> ZGERU  T PUT F FOR NO TEST. SAME COLUMNS.\n*> ZHER   T PUT F FOR NO TEST. SAME COLUMNS.\n*> ZHPR   T PUT F FOR NO TEST. SAME COLUMNS.\n*> ZHER2  T PUT F FOR NO TEST. SAME COLUMNS.\n*> ZHPR2  T PUT F FOR NO TEST. SAME COLUMNS.\n*>\n*> Further Details\n*> ===============\n*>\n*>    See:\n*>\n*>       Dongarra J. J., Du Croz J. J., Hammarling S.  and Hanson R. J..\n*>       An  extended  set of Fortran  Basic Linear Algebra Subprograms.\n*>\n*>       Technical  Memoranda  Nos. 41 (revision 3) and 81,  Mathematics\n*>       and  Computer Science  Division,  Argonne  National Laboratory,\n*>       9700 South Cass Avenue, Argonne, Illinois 60439, US.\n*>\n*>       Or\n*>\n*>       NAG  Technical Reports TR3/87 and TR4/87,  Numerical Algorithms\n*>       Group  Ltd.,  NAG  Central  Office,  256  Banbury  Road, Oxford\n*>       OX2 7DE, UK,  and  Numerical Algorithms Group Inc.,  1101  31st\n*>       Street,  Suite 100,  Downers Grove,  Illinois 60515-1263,  USA.\n*>\n*>\n*> -- Written on 10-August-1987.\n*>    Richard Hanson, Sandia National Labs.\n*>    Jeremy Du Croz, NAG Central Office.\n*>\n*>    10-9-00:  Change STATUS='NEW' to 'UNKNOWN' so that the testers\n*>              can be run multiple times without deleting generated\n*>              output files (susan)\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date April 2012\n*\n*> \\ingroup complex16_blas_testing\n*\n*  =====================================================================\n      PROGRAM ZBLAT2\n*\n*  -- Reference BLAS test routine (version 3.4.1) --\n*  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     April 2012\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      INTEGER            NIN\n      PARAMETER          ( NIN = 5 )\n      INTEGER            NSUBS\n      PARAMETER          ( NSUBS = 17 )\n      COMPLEX*16         ZERO, ONE\n      PARAMETER          ( ZERO = ( 0.0D0, 0.0D0 ),\n     $                   ONE = ( 1.0D0, 0.0D0 ) )\n      DOUBLE PRECISION   RZERO\n      PARAMETER          ( RZERO = 0.0D0 )\n      INTEGER            NMAX, INCMAX\n      PARAMETER          ( NMAX = 65, INCMAX = 2 )\n      INTEGER            NINMAX, NIDMAX, NKBMAX, NALMAX, NBEMAX\n      PARAMETER          ( NINMAX = 7, NIDMAX = 9, NKBMAX = 7,\n     $                   NALMAX = 7, NBEMAX = 7 )\n*     .. Local Scalars ..\n      DOUBLE PRECISION   EPS, ERR, THRESH\n      INTEGER            I, ISNUM, J, N, NALF, NBET, NIDIM, NINC, NKB,\n     $                   NOUT, NTRA\n      LOGICAL            FATAL, LTESTT, REWI, SAME, SFATAL, TRACE,\n     $                   TSTERR\n      CHARACTER*1        TRANS\n      CHARACTER*6        SNAMET\n      CHARACTER*32       SNAPS, SUMMRY\n*     .. Local Arrays ..\n      COMPLEX*16         A( NMAX, NMAX ), AA( NMAX*NMAX ),\n     $                   ALF( NALMAX ), AS( NMAX*NMAX ), BET( NBEMAX ),\n     $                   X( NMAX ), XS( NMAX*INCMAX ),\n     $                   XX( NMAX*INCMAX ), Y( NMAX ),\n     $                   YS( NMAX*INCMAX ), YT( NMAX ),\n     $                   YY( NMAX*INCMAX ), Z( 2*NMAX )\n      DOUBLE PRECISION   G( NMAX )\n      INTEGER            IDIM( NIDMAX ), INC( NINMAX ), KB( NKBMAX )\n      LOGICAL            LTEST( NSUBS )\n      CHARACTER*6        SNAMES( NSUBS )\n*     .. External Functions ..\n      DOUBLE PRECISION   DDIFF\n      LOGICAL            LZE\n      EXTERNAL           DDIFF, LZE\n*     .. External Subroutines ..\n      EXTERNAL           ZCHK1, ZCHK2, ZCHK3, ZCHK4, ZCHK5, ZCHK6,\n     $                   ZCHKE, ZMVCH\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, MAX, MIN\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n      CHARACTER*6        SRNAMT\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n      COMMON             /SRNAMC/SRNAMT\n*     .. Data statements ..\n      DATA               SNAMES/'ZGEMV ', 'ZGBMV ', 'ZHEMV ', 'ZHBMV ',\n     $                   'ZHPMV ', 'ZTRMV ', 'ZTBMV ', 'ZTPMV ',\n     $                   'ZTRSV ', 'ZTBSV ', 'ZTPSV ', 'ZGERC ',\n     $                   'ZGERU ', 'ZHER  ', 'ZHPR  ', 'ZHER2 ',\n     $                   'ZHPR2 '/\n*     .. Executable Statements ..\n*\n*     Read name and unit number for summary output file and open file.\n*\n      READ( NIN, FMT = * )SUMMRY\n      READ( NIN, FMT = * )NOUT\n      OPEN( NOUT, FILE = SUMMRY, STATUS = 'UNKNOWN' )\n      NOUTC = NOUT\n*\n*     Read name and unit number for snapshot output file and open file.\n*\n      READ( NIN, FMT = * )SNAPS\n      READ( NIN, FMT = * )NTRA\n      TRACE = NTRA.GE.0\n      IF( TRACE )THEN\n         OPEN( NTRA, FILE = SNAPS, STATUS = 'UNKNOWN' )\n      END IF\n*     Read the flag that directs rewinding of the snapshot file.\n      READ( NIN, FMT = * )REWI\n      REWI = REWI.AND.TRACE\n*     Read the flag that directs stopping on any failure.\n      READ( NIN, FMT = * )SFATAL\n*     Read the flag that indicates whether error exits are to be tested.\n      READ( NIN, FMT = * )TSTERR\n*     Read the threshold value of the test ratio\n      READ( NIN, FMT = * )THRESH\n*\n*     Read and check the parameter values for the tests.\n*\n*     Values of N\n      READ( NIN, FMT = * )NIDIM\n      IF( NIDIM.LT.1.OR.NIDIM.GT.NIDMAX )THEN\n         WRITE( NOUT, FMT = 9997 )'N', NIDMAX\n         GO TO 230\n      END IF\n      READ( NIN, FMT = * )( IDIM( I ), I = 1, NIDIM )\n      DO 10 I = 1, NIDIM\n         IF( IDIM( I ).LT.0.OR.IDIM( I ).GT.NMAX )THEN\n            WRITE( NOUT, FMT = 9996 )NMAX\n            GO TO 230\n         END IF\n   10 CONTINUE\n*     Values of K\n      READ( NIN, FMT = * )NKB\n      IF( NKB.LT.1.OR.NKB.GT.NKBMAX )THEN\n         WRITE( NOUT, FMT = 9997 )'K', NKBMAX\n         GO TO 230\n      END IF\n      READ( NIN, FMT = * )( KB( I ), I = 1, NKB )\n      DO 20 I = 1, NKB\n         IF( KB( I ).LT.0 )THEN\n            WRITE( NOUT, FMT = 9995 )\n            GO TO 230\n         END IF\n   20 CONTINUE\n*     Values of INCX and INCY\n      READ( NIN, FMT = * )NINC\n      IF( NINC.LT.1.OR.NINC.GT.NINMAX )THEN\n         WRITE( NOUT, FMT = 9997 )'INCX AND INCY', NINMAX\n         GO TO 230\n      END IF\n      READ( NIN, FMT = * )( INC( I ), I = 1, NINC )\n      DO 30 I = 1, NINC\n         IF( INC( I ).EQ.0.OR.ABS( INC( I ) ).GT.INCMAX )THEN\n            WRITE( NOUT, FMT = 9994 )INCMAX\n            GO TO 230\n         END IF\n   30 CONTINUE\n*     Values of ALPHA\n      READ( NIN, FMT = * )NALF\n      IF( NALF.LT.1.OR.NALF.GT.NALMAX )THEN\n         WRITE( NOUT, FMT = 9997 )'ALPHA', NALMAX\n         GO TO 230\n      END IF\n      READ( NIN, FMT = * )( ALF( I ), I = 1, NALF )\n*     Values of BETA\n      READ( NIN, FMT = * )NBET\n      IF( NBET.LT.1.OR.NBET.GT.NBEMAX )THEN\n         WRITE( NOUT, FMT = 9997 )'BETA', NBEMAX\n         GO TO 230\n      END IF\n      READ( NIN, FMT = * )( BET( I ), I = 1, NBET )\n*\n*     Report values of parameters.\n*\n      WRITE( NOUT, FMT = 9993 )\n      WRITE( NOUT, FMT = 9992 )( IDIM( I ), I = 1, NIDIM )\n      WRITE( NOUT, FMT = 9991 )( KB( I ), I = 1, NKB )\n      WRITE( NOUT, FMT = 9990 )( INC( I ), I = 1, NINC )\n      WRITE( NOUT, FMT = 9989 )( ALF( I ), I = 1, NALF )\n      WRITE( NOUT, FMT = 9988 )( BET( I ), I = 1, NBET )\n      IF( .NOT.TSTERR )THEN\n         WRITE( NOUT, FMT = * )\n         WRITE( NOUT, FMT = 9980 )\n      END IF\n      WRITE( NOUT, FMT = * )\n      WRITE( NOUT, FMT = 9999 )THRESH\n      WRITE( NOUT, FMT = * )\n*\n*     Read names of subroutines and flags which indicate\n*     whether they are to be tested.\n*\n      DO 40 I = 1, NSUBS\n         LTEST( I ) = .FALSE.\n   40 CONTINUE\n   50 READ( NIN, FMT = 9984, END = 80 )SNAMET, LTESTT\n      DO 60 I = 1, NSUBS\n         IF( SNAMET.EQ.SNAMES( I ) )\n     $      GO TO 70\n   60 CONTINUE\n      WRITE( NOUT, FMT = 9986 )SNAMET\n      STOP\n   70 LTEST( I ) = LTESTT\n      GO TO 50\n*\n   80 CONTINUE\n      CLOSE ( NIN )\n*\n*     Compute EPS (the machine precision).\n*\n      EPS = EPSILON(RZERO)\n      WRITE( NOUT, FMT = 9998 )EPS\n*\n*     Check the reliability of ZMVCH using exact data.\n*\n      N = MIN( 32, NMAX )\n      DO 120 J = 1, N\n         DO 110 I = 1, N\n            A( I, J ) = MAX( I - J + 1, 0 )\n  110    CONTINUE\n         X( J ) = J\n         Y( J ) = ZERO\n  120 CONTINUE\n      DO 130 J = 1, N\n         YY( J ) = J*( ( J + 1 )*J )/2 - ( ( J + 1 )*J*( J - 1 ) )/3\n  130 CONTINUE\n*     YY holds the exact result. On exit from ZMVCH YT holds\n*     the result computed by ZMVCH.\n      TRANS = 'N'\n      CALL ZMVCH( TRANS, N, N, ONE, A, NMAX, X, 1, ZERO, Y, 1, YT, G,\n     $            YY, EPS, ERR, FATAL, NOUT, .TRUE. )\n      SAME = LZE( YY, YT, N )\n      IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN\n         WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR\n         STOP\n      END IF\n      TRANS = 'T'\n      CALL ZMVCH( TRANS, N, N, ONE, A, NMAX, X, -1, ZERO, Y, -1, YT, G,\n     $            YY, EPS, ERR, FATAL, NOUT, .TRUE. )\n      SAME = LZE( YY, YT, N )\n      IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN\n         WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR\n         STOP\n      END IF\n*\n*     Test each subroutine in turn.\n*\n      DO 210 ISNUM = 1, NSUBS\n         WRITE( NOUT, FMT = * )\n         IF( .NOT.LTEST( ISNUM ) )THEN\n*           Subprogram is not to be tested.\n            WRITE( NOUT, FMT = 9983 )SNAMES( ISNUM )\n         ELSE\n            SRNAMT = SNAMES( ISNUM )\n*           Test error exits.\n            IF( TSTERR )THEN\n               CALL ZCHKE( ISNUM, SNAMES( ISNUM ), NOUT )\n               WRITE( NOUT, FMT = * )\n            END IF\n*           Test computations.\n            INFOT = 0\n            OK = .TRUE.\n            FATAL = .FALSE.\n            GO TO ( 140, 140, 150, 150, 150, 160, 160,\n     $              160, 160, 160, 160, 170, 170, 180,\n     $              180, 190, 190 )ISNUM\n*           Test ZGEMV, 01, and ZGBMV, 02.\n  140       CALL ZCHK1( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NKB, KB, NALF, ALF,\n     $                  NBET, BET, NINC, INC, NMAX, INCMAX, A, AA, AS,\n     $                  X, XX, XS, Y, YY, YS, YT, G )\n            GO TO 200\n*           Test ZHEMV, 03, ZHBMV, 04, and ZHPMV, 05.\n  150       CALL ZCHK2( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NKB, KB, NALF, ALF,\n     $                  NBET, BET, NINC, INC, NMAX, INCMAX, A, AA, AS,\n     $                  X, XX, XS, Y, YY, YS, YT, G )\n            GO TO 200\n*           Test ZTRMV, 06, ZTBMV, 07, ZTPMV, 08,\n*           ZTRSV, 09, ZTBSV, 10, and ZTPSV, 11.\n  160       CALL ZCHK3( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NKB, KB, NINC, INC,\n     $                  NMAX, INCMAX, A, AA, AS, Y, YY, YS, YT, G, Z )\n            GO TO 200\n*           Test ZGERC, 12, ZGERU, 13.\n  170       CALL ZCHK4( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NALF, ALF, NINC, INC,\n     $                  NMAX, INCMAX, A, AA, AS, X, XX, XS, Y, YY, YS,\n     $                  YT, G, Z )\n            GO TO 200\n*           Test ZHER, 14, and ZHPR, 15.\n  180       CALL ZCHK5( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NALF, ALF, NINC, INC,\n     $                  NMAX, INCMAX, A, AA, AS, X, XX, XS, Y, YY, YS,\n     $                  YT, G, Z )\n            GO TO 200\n*           Test ZHER2, 16, and ZHPR2, 17.\n  190       CALL ZCHK6( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NALF, ALF, NINC, INC,\n     $                  NMAX, INCMAX, A, AA, AS, X, XX, XS, Y, YY, YS,\n     $                  YT, G, Z )\n*\n  200       IF( FATAL.AND.SFATAL )\n     $         GO TO 220\n         END IF\n  210 CONTINUE\n      WRITE( NOUT, FMT = 9982 )\n      GO TO 240\n*\n  220 CONTINUE\n      WRITE( NOUT, FMT = 9981 )\n      GO TO 240\n*\n  230 CONTINUE\n      WRITE( NOUT, FMT = 9987 )\n*\n  240 CONTINUE\n      IF( TRACE )\n     $   CLOSE ( NTRA )\n      CLOSE ( NOUT )\n      STOP\n*\n 9999 FORMAT( ' ROUTINES PASS COMPUTATIONAL TESTS IF TEST RATIO IS LES',\n     $      'S THAN', F8.2 )\n 9998 FORMAT( ' RELATIVE MACHINE PRECISION IS TAKEN TO BE', 1P, D9.1 )\n 9997 FORMAT( ' NUMBER OF VALUES OF ', A, ' IS LESS THAN 1 OR GREATER ',\n     $      'THAN ', I2 )\n 9996 FORMAT( ' VALUE OF N IS LESS THAN 0 OR GREATER THAN ', I2 )\n 9995 FORMAT( ' VALUE OF K IS LESS THAN 0' )\n 9994 FORMAT( ' ABSOLUTE VALUE OF INCX OR INCY IS 0 OR GREATER THAN ',\n     $      I2 )\n 9993 FORMAT( ' TESTS OF THE COMPLEX*16       LEVEL 2 BLAS', //' THE F',\n     $      'OLLOWING PARAMETER VALUES WILL BE USED:' )\n 9992 FORMAT( '   FOR N              ', 9I6 )\n 9991 FORMAT( '   FOR K              ', 7I6 )\n 9990 FORMAT( '   FOR INCX AND INCY  ', 7I6 )\n 9989 FORMAT( '   FOR ALPHA          ',\n     $      7( '(', F4.1, ',', F4.1, ')  ', : ) )\n 9988 FORMAT( '   FOR BETA           ',\n     $      7( '(', F4.1, ',', F4.1, ')  ', : ) )\n 9987 FORMAT( ' AMEND DATA FILE OR INCREASE ARRAY SIZES IN PROGRAM',\n     $      /' ******* TESTS ABANDONED *******' )\n 9986 FORMAT( ' SUBPROGRAM NAME ', A6, ' NOT RECOGNIZED', /' ******* T',\n     $      'ESTS ABANDONED *******' )\n 9985 FORMAT( ' ERROR IN ZMVCH -  IN-LINE DOT PRODUCTS ARE BEING EVALU',\n     $      'ATED WRONGLY.', /' ZMVCH WAS CALLED WITH TRANS = ', A1,\n     $      ' AND RETURNED SAME = ', L1, ' AND ERR = ', F12.3, '.', /\n     $   ' THIS MAY BE DUE TO FAULTS IN THE ARITHMETIC OR THE COMPILER.'\n     $      , /' ******* TESTS ABANDONED *******' )\n 9984 FORMAT( A6, L2 )\n 9983 FORMAT( 1X, A6, ' WAS NOT TESTED' )\n 9982 FORMAT( /' END OF TESTS' )\n 9981 FORMAT( /' ******* FATAL ERROR - TESTS ABANDONED *******' )\n 9980 FORMAT( ' ERROR-EXITS WILL NOT BE TESTED' )\n*\n*     End of ZBLAT2.\n*\n      END\n      SUBROUTINE ZCHK1( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NKB, KB, NALF, ALF, NBET,\n     $                  BET, NINC, INC, NMAX, INCMAX, A, AA, AS, X, XX,\n     $                  XS, Y, YY, YS, YT, G )\n*\n*  Tests ZGEMV and ZGBMV.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Parameters ..\n      COMPLEX*16         ZERO, HALF\n      PARAMETER          ( ZERO = ( 0.0D0, 0.0D0 ),\n     $                   HALF = ( 0.5D0, 0.0D0 ) )\n      DOUBLE PRECISION   RZERO\n      PARAMETER          ( RZERO = 0.0D0 )\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION   EPS, THRESH\n      INTEGER            INCMAX, NALF, NBET, NIDIM, NINC, NKB, NMAX,\n     $                   NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      COMPLEX*16         A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),\n     $                   AS( NMAX*NMAX ), BET( NBET ), X( NMAX ),\n     $                   XS( NMAX*INCMAX ), XX( NMAX*INCMAX ),\n     $                   Y( NMAX ), YS( NMAX*INCMAX ), YT( NMAX ),\n     $                   YY( NMAX*INCMAX )\n      DOUBLE PRECISION   G( NMAX )\n      INTEGER            IDIM( NIDIM ), INC( NINC ), KB( NKB )\n*     .. Local Scalars ..\n      COMPLEX*16         ALPHA, ALS, BETA, BLS, TRANSL\n      DOUBLE PRECISION   ERR, ERRMAX\n      INTEGER            I, IA, IB, IC, IKU, IM, IN, INCX, INCXS, INCY,\n     $                   INCYS, IX, IY, KL, KLS, KU, KUS, LAA, LDA,\n     $                   LDAS, LX, LY, M, ML, MS, N, NARGS, NC, ND, NK,\n     $                   NL, NS\n      LOGICAL            BANDED, FULL, NULL, RESET, SAME, TRAN\n      CHARACTER*1        TRANS, TRANSS\n      CHARACTER*3        ICH\n*     .. Local Arrays ..\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LZE, LZERES\n      EXTERNAL           LZE, LZERES\n*     .. External Subroutines ..\n      EXTERNAL           ZGBMV, ZGEMV, ZMAKE, ZMVCH\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, MAX, MIN\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICH/'NTC'/\n*     .. Executable Statements ..\n      FULL = SNAME( 3: 3 ).EQ.'E'\n      BANDED = SNAME( 3: 3 ).EQ.'B'\n*     Define the number of arguments.\n      IF( FULL )THEN\n         NARGS = 11\n      ELSE IF( BANDED )THEN\n         NARGS = 13\n      END IF\n*\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = RZERO\n*\n      DO 120 IN = 1, NIDIM\n         N = IDIM( IN )\n         ND = N/2 + 1\n*\n         DO 110 IM = 1, 2\n            IF( IM.EQ.1 )\n     $         M = MAX( N - ND, 0 )\n            IF( IM.EQ.2 )\n     $         M = MIN( N + ND, NMAX )\n*\n            IF( BANDED )THEN\n               NK = NKB\n            ELSE\n               NK = 1\n            END IF\n            DO 100 IKU = 1, NK\n               IF( BANDED )THEN\n                  KU = KB( IKU )\n                  KL = MAX( KU - 1, 0 )\n               ELSE\n                  KU = N - 1\n                  KL = M - 1\n               END IF\n*              Set LDA to 1 more than minimum value if room.\n               IF( BANDED )THEN\n                  LDA = KL + KU + 1\n               ELSE\n                  LDA = M\n               END IF\n               IF( LDA.LT.NMAX )\n     $            LDA = LDA + 1\n*              Skip tests if not enough room.\n               IF( LDA.GT.NMAX )\n     $            GO TO 100\n               LAA = LDA*N\n               NULL = N.LE.0.OR.M.LE.0\n*\n*              Generate the matrix A.\n*\n               TRANSL = ZERO\n               CALL ZMAKE( SNAME( 2: 3 ), ' ', ' ', M, N, A, NMAX, AA,\n     $                     LDA, KL, KU, RESET, TRANSL )\n*\n               DO 90 IC = 1, 3\n                  TRANS = ICH( IC: IC )\n                  TRAN = TRANS.EQ.'T'.OR.TRANS.EQ.'C'\n*\n                  IF( TRAN )THEN\n                     ML = N\n                     NL = M\n                  ELSE\n                     ML = M\n                     NL = N\n                  END IF\n*\n                  DO 80 IX = 1, NINC\n                     INCX = INC( IX )\n                     LX = ABS( INCX )*NL\n*\n*                    Generate the vector X.\n*\n                     TRANSL = HALF\n                     CALL ZMAKE( 'GE', ' ', ' ', 1, NL, X, 1, XX,\n     $                           ABS( INCX ), 0, NL - 1, RESET, TRANSL )\n                     IF( NL.GT.1 )THEN\n                        X( NL/2 ) = ZERO\n                        XX( 1 + ABS( INCX )*( NL/2 - 1 ) ) = ZERO\n                     END IF\n*\n                     DO 70 IY = 1, NINC\n                        INCY = INC( IY )\n                        LY = ABS( INCY )*ML\n*\n                        DO 60 IA = 1, NALF\n                           ALPHA = ALF( IA )\n*\n                           DO 50 IB = 1, NBET\n                              BETA = BET( IB )\n*\n*                             Generate the vector Y.\n*\n                              TRANSL = ZERO\n                              CALL ZMAKE( 'GE', ' ', ' ', 1, ML, Y, 1,\n     $                                    YY, ABS( INCY ), 0, ML - 1,\n     $                                    RESET, TRANSL )\n*\n                              NC = NC + 1\n*\n*                             Save every datum before calling the\n*                             subroutine.\n*\n                              TRANSS = TRANS\n                              MS = M\n                              NS = N\n                              KLS = KL\n                              KUS = KU\n                              ALS = ALPHA\n                              DO 10 I = 1, LAA\n                                 AS( I ) = AA( I )\n   10                         CONTINUE\n                              LDAS = LDA\n                              DO 20 I = 1, LX\n                                 XS( I ) = XX( I )\n   20                         CONTINUE\n                              INCXS = INCX\n                              BLS = BETA\n                              DO 30 I = 1, LY\n                                 YS( I ) = YY( I )\n   30                         CONTINUE\n                              INCYS = INCY\n*\n*                             Call the subroutine.\n*\n                              IF( FULL )THEN\n                                 IF( TRACE )\n     $                              WRITE( NTRA, FMT = 9994 )NC, SNAME,\n     $                              TRANS, M, N, ALPHA, LDA, INCX, BETA,\n     $                              INCY\n                                 IF( REWI )\n     $                              REWIND NTRA\n                                 CALL ZGEMV( TRANS, M, N, ALPHA, AA,\n     $                                       LDA, XX, INCX, BETA, YY,\n     $                                       INCY )\n                              ELSE IF( BANDED )THEN\n                                 IF( TRACE )\n     $                              WRITE( NTRA, FMT = 9995 )NC, SNAME,\n     $                              TRANS, M, N, KL, KU, ALPHA, LDA,\n     $                              INCX, BETA, INCY\n                                 IF( REWI )\n     $                              REWIND NTRA\n                                 CALL ZGBMV( TRANS, M, N, KL, KU, ALPHA,\n     $                                       AA, LDA, XX, INCX, BETA,\n     $                                       YY, INCY )\n                              END IF\n*\n*                             Check if error-exit was taken incorrectly.\n*\n                              IF( .NOT.OK )THEN\n                                 WRITE( NOUT, FMT = 9993 )\n                                 FATAL = .TRUE.\n                                 GO TO 130\n                              END IF\n*\n*                             See what data changed inside subroutines.\n*\n                              ISAME( 1 ) = TRANS.EQ.TRANSS\n                              ISAME( 2 ) = MS.EQ.M\n                              ISAME( 3 ) = NS.EQ.N\n                              IF( FULL )THEN\n                                 ISAME( 4 ) = ALS.EQ.ALPHA\n                                 ISAME( 5 ) = LZE( AS, AA, LAA )\n                                 ISAME( 6 ) = LDAS.EQ.LDA\n                                 ISAME( 7 ) = LZE( XS, XX, LX )\n                                 ISAME( 8 ) = INCXS.EQ.INCX\n                                 ISAME( 9 ) = BLS.EQ.BETA\n                                 IF( NULL )THEN\n                                    ISAME( 10 ) = LZE( YS, YY, LY )\n                                 ELSE\n                                    ISAME( 10 ) = LZERES( 'GE', ' ', 1,\n     $                                            ML, YS, YY,\n     $                                            ABS( INCY ) )\n                                 END IF\n                                 ISAME( 11 ) = INCYS.EQ.INCY\n                              ELSE IF( BANDED )THEN\n                                 ISAME( 4 ) = KLS.EQ.KL\n                                 ISAME( 5 ) = KUS.EQ.KU\n                                 ISAME( 6 ) = ALS.EQ.ALPHA\n                                 ISAME( 7 ) = LZE( AS, AA, LAA )\n                                 ISAME( 8 ) = LDAS.EQ.LDA\n                                 ISAME( 9 ) = LZE( XS, XX, LX )\n                                 ISAME( 10 ) = INCXS.EQ.INCX\n                                 ISAME( 11 ) = BLS.EQ.BETA\n                                 IF( NULL )THEN\n                                    ISAME( 12 ) = LZE( YS, YY, LY )\n                                 ELSE\n                                    ISAME( 12 ) = LZERES( 'GE', ' ', 1,\n     $                                            ML, YS, YY,\n     $                                            ABS( INCY ) )\n                                 END IF\n                                 ISAME( 13 ) = INCYS.EQ.INCY\n                              END IF\n*\n*                             If data was incorrectly changed, report\n*                             and return.\n*\n                              SAME = .TRUE.\n                              DO 40 I = 1, NARGS\n                                 SAME = SAME.AND.ISAME( I )\n                                 IF( .NOT.ISAME( I ) )\n     $                              WRITE( NOUT, FMT = 9998 )I\n   40                         CONTINUE\n                              IF( .NOT.SAME )THEN\n                                 FATAL = .TRUE.\n                                 GO TO 130\n                              END IF\n*\n                              IF( .NOT.NULL )THEN\n*\n*                                Check the result.\n*\n                                 CALL ZMVCH( TRANS, M, N, ALPHA, A,\n     $                                       NMAX, X, INCX, BETA, Y,\n     $                                       INCY, YT, G, YY, EPS, ERR,\n     $                                       FATAL, NOUT, .TRUE. )\n                                 ERRMAX = MAX( ERRMAX, ERR )\n*                                If got really bad answer, report and\n*                                return.\n                                 IF( FATAL )\n     $                              GO TO 130\n                              ELSE\n*                                Avoid repeating tests with M.le.0 or\n*                                N.le.0.\n                                 GO TO 110\n                              END IF\n*\n   50                      CONTINUE\n*\n   60                   CONTINUE\n*\n   70                CONTINUE\n*\n   80             CONTINUE\n*\n   90          CONTINUE\n*\n  100       CONTINUE\n*\n  110    CONTINUE\n*\n  120 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 140\n*\n  130 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      IF( FULL )THEN\n         WRITE( NOUT, FMT = 9994 )NC, SNAME, TRANS, M, N, ALPHA, LDA,\n     $      INCX, BETA, INCY\n      ELSE IF( BANDED )THEN\n         WRITE( NOUT, FMT = 9995 )NC, SNAME, TRANS, M, N, KL, KU,\n     $      ALPHA, LDA, INCX, BETA, INCY\n      END IF\n*\n  140 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',', 4( I3, ',' ), '(',\n     $      F4.1, ',', F4.1, '), A,', I3, ', X,', I2, ',(', F4.1, ',',\n     $      F4.1, '), Y,', I2, ') .' )\n 9994 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',', 2( I3, ',' ), '(',\n     $      F4.1, ',', F4.1, '), A,', I3, ', X,', I2, ',(', F4.1, ',',\n     $      F4.1, '), Y,', I2, ')         .' )\n 9993 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of ZCHK1.\n*\n      END\n      SUBROUTINE ZCHK2( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NKB, KB, NALF, ALF, NBET,\n     $                  BET, NINC, INC, NMAX, INCMAX, A, AA, AS, X, XX,\n     $                  XS, Y, YY, YS, YT, G )\n*\n*  Tests ZHEMV, ZHBMV and ZHPMV.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Parameters ..\n      COMPLEX*16         ZERO, HALF\n      PARAMETER          ( ZERO = ( 0.0D0, 0.0D0 ),\n     $                   HALF = ( 0.5D0, 0.0D0 ) )\n      DOUBLE PRECISION   RZERO\n      PARAMETER          ( RZERO = 0.0D0 )\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION   EPS, THRESH\n      INTEGER            INCMAX, NALF, NBET, NIDIM, NINC, NKB, NMAX,\n     $                   NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      COMPLEX*16         A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),\n     $                   AS( NMAX*NMAX ), BET( NBET ), X( NMAX ),\n     $                   XS( NMAX*INCMAX ), XX( NMAX*INCMAX ),\n     $                   Y( NMAX ), YS( NMAX*INCMAX ), YT( NMAX ),\n     $                   YY( NMAX*INCMAX )\n      DOUBLE PRECISION   G( NMAX )\n      INTEGER            IDIM( NIDIM ), INC( NINC ), KB( NKB )\n*     .. Local Scalars ..\n      COMPLEX*16         ALPHA, ALS, BETA, BLS, TRANSL\n      DOUBLE PRECISION   ERR, ERRMAX\n      INTEGER            I, IA, IB, IC, IK, IN, INCX, INCXS, INCY,\n     $                   INCYS, IX, IY, K, KS, LAA, LDA, LDAS, LX, LY,\n     $                   N, NARGS, NC, NK, NS\n      LOGICAL            BANDED, FULL, NULL, PACKED, RESET, SAME\n      CHARACTER*1        UPLO, UPLOS\n      CHARACTER*2        ICH\n*     .. Local Arrays ..\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LZE, LZERES\n      EXTERNAL           LZE, LZERES\n*     .. External Subroutines ..\n      EXTERNAL           ZHBMV, ZHEMV, ZHPMV, ZMAKE, ZMVCH\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, MAX\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICH/'UL'/\n*     .. Executable Statements ..\n      FULL = SNAME( 3: 3 ).EQ.'E'\n      BANDED = SNAME( 3: 3 ).EQ.'B'\n      PACKED = SNAME( 3: 3 ).EQ.'P'\n*     Define the number of arguments.\n      IF( FULL )THEN\n         NARGS = 10\n      ELSE IF( BANDED )THEN\n         NARGS = 11\n      ELSE IF( PACKED )THEN\n         NARGS = 9\n      END IF\n*\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = RZERO\n*\n      DO 110 IN = 1, NIDIM\n         N = IDIM( IN )\n*\n         IF( BANDED )THEN\n            NK = NKB\n         ELSE\n            NK = 1\n         END IF\n         DO 100 IK = 1, NK\n            IF( BANDED )THEN\n               K = KB( IK )\n            ELSE\n               K = N - 1\n            END IF\n*           Set LDA to 1 more than minimum value if room.\n            IF( BANDED )THEN\n               LDA = K + 1\n            ELSE\n               LDA = N\n            END IF\n            IF( LDA.LT.NMAX )\n     $         LDA = LDA + 1\n*           Skip tests if not enough room.\n            IF( LDA.GT.NMAX )\n     $         GO TO 100\n            IF( PACKED )THEN\n               LAA = ( N*( N + 1 ) )/2\n            ELSE\n               LAA = LDA*N\n            END IF\n            NULL = N.LE.0\n*\n            DO 90 IC = 1, 2\n               UPLO = ICH( IC: IC )\n*\n*              Generate the matrix A.\n*\n               TRANSL = ZERO\n               CALL ZMAKE( SNAME( 2: 3 ), UPLO, ' ', N, N, A, NMAX, AA,\n     $                     LDA, K, K, RESET, TRANSL )\n*\n               DO 80 IX = 1, NINC\n                  INCX = INC( IX )\n                  LX = ABS( INCX )*N\n*\n*                 Generate the vector X.\n*\n                  TRANSL = HALF\n                  CALL ZMAKE( 'GE', ' ', ' ', 1, N, X, 1, XX,\n     $                        ABS( INCX ), 0, N - 1, RESET, TRANSL )\n                  IF( N.GT.1 )THEN\n                     X( N/2 ) = ZERO\n                     XX( 1 + ABS( INCX )*( N/2 - 1 ) ) = ZERO\n                  END IF\n*\n                  DO 70 IY = 1, NINC\n                     INCY = INC( IY )\n                     LY = ABS( INCY )*N\n*\n                     DO 60 IA = 1, NALF\n                        ALPHA = ALF( IA )\n*\n                        DO 50 IB = 1, NBET\n                           BETA = BET( IB )\n*\n*                          Generate the vector Y.\n*\n                           TRANSL = ZERO\n                           CALL ZMAKE( 'GE', ' ', ' ', 1, N, Y, 1, YY,\n     $                                 ABS( INCY ), 0, N - 1, RESET,\n     $                                 TRANSL )\n*\n                           NC = NC + 1\n*\n*                          Save every datum before calling the\n*                          subroutine.\n*\n                           UPLOS = UPLO\n                           NS = N\n                           KS = K\n                           ALS = ALPHA\n                           DO 10 I = 1, LAA\n                              AS( I ) = AA( I )\n   10                      CONTINUE\n                           LDAS = LDA\n                           DO 20 I = 1, LX\n                              XS( I ) = XX( I )\n   20                      CONTINUE\n                           INCXS = INCX\n                           BLS = BETA\n                           DO 30 I = 1, LY\n                              YS( I ) = YY( I )\n   30                      CONTINUE\n                           INCYS = INCY\n*\n*                          Call the subroutine.\n*\n                           IF( FULL )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9993 )NC, SNAME,\n     $                           UPLO, N, ALPHA, LDA, INCX, BETA, INCY\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL ZHEMV( UPLO, N, ALPHA, AA, LDA, XX,\n     $                                    INCX, BETA, YY, INCY )\n                           ELSE IF( BANDED )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9994 )NC, SNAME,\n     $                           UPLO, N, K, ALPHA, LDA, INCX, BETA,\n     $                           INCY\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL ZHBMV( UPLO, N, K, ALPHA, AA, LDA,\n     $                                    XX, INCX, BETA, YY, INCY )\n                           ELSE IF( PACKED )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9995 )NC, SNAME,\n     $                           UPLO, N, ALPHA, INCX, BETA, INCY\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL ZHPMV( UPLO, N, ALPHA, AA, XX, INCX,\n     $                                    BETA, YY, INCY )\n                           END IF\n*\n*                          Check if error-exit was taken incorrectly.\n*\n                           IF( .NOT.OK )THEN\n                              WRITE( NOUT, FMT = 9992 )\n                              FATAL = .TRUE.\n                              GO TO 120\n                           END IF\n*\n*                          See what data changed inside subroutines.\n*\n                           ISAME( 1 ) = UPLO.EQ.UPLOS\n                           ISAME( 2 ) = NS.EQ.N\n                           IF( FULL )THEN\n                              ISAME( 3 ) = ALS.EQ.ALPHA\n                              ISAME( 4 ) = LZE( AS, AA, LAA )\n                              ISAME( 5 ) = LDAS.EQ.LDA\n                              ISAME( 6 ) = LZE( XS, XX, LX )\n                              ISAME( 7 ) = INCXS.EQ.INCX\n                              ISAME( 8 ) = BLS.EQ.BETA\n                              IF( NULL )THEN\n                                 ISAME( 9 ) = LZE( YS, YY, LY )\n                              ELSE\n                                 ISAME( 9 ) = LZERES( 'GE', ' ', 1, N,\n     $                                        YS, YY, ABS( INCY ) )\n                              END IF\n                              ISAME( 10 ) = INCYS.EQ.INCY\n                           ELSE IF( BANDED )THEN\n                              ISAME( 3 ) = KS.EQ.K\n                              ISAME( 4 ) = ALS.EQ.ALPHA\n                              ISAME( 5 ) = LZE( AS, AA, LAA )\n                              ISAME( 6 ) = LDAS.EQ.LDA\n                              ISAME( 7 ) = LZE( XS, XX, LX )\n                              ISAME( 8 ) = INCXS.EQ.INCX\n                              ISAME( 9 ) = BLS.EQ.BETA\n                              IF( NULL )THEN\n                                 ISAME( 10 ) = LZE( YS, YY, LY )\n                              ELSE\n                                 ISAME( 10 ) = LZERES( 'GE', ' ', 1, N,\n     $                                         YS, YY, ABS( INCY ) )\n                              END IF\n                              ISAME( 11 ) = INCYS.EQ.INCY\n                           ELSE IF( PACKED )THEN\n                              ISAME( 3 ) = ALS.EQ.ALPHA\n                              ISAME( 4 ) = LZE( AS, AA, LAA )\n                              ISAME( 5 ) = LZE( XS, XX, LX )\n                              ISAME( 6 ) = INCXS.EQ.INCX\n                              ISAME( 7 ) = BLS.EQ.BETA\n                              IF( NULL )THEN\n                                 ISAME( 8 ) = LZE( YS, YY, LY )\n                              ELSE\n                                 ISAME( 8 ) = LZERES( 'GE', ' ', 1, N,\n     $                                        YS, YY, ABS( INCY ) )\n                              END IF\n                              ISAME( 9 ) = INCYS.EQ.INCY\n                           END IF\n*\n*                          If data was incorrectly changed, report and\n*                          return.\n*\n                           SAME = .TRUE.\n                           DO 40 I = 1, NARGS\n                              SAME = SAME.AND.ISAME( I )\n                              IF( .NOT.ISAME( I ) )\n     $                           WRITE( NOUT, FMT = 9998 )I\n   40                      CONTINUE\n                           IF( .NOT.SAME )THEN\n                              FATAL = .TRUE.\n                              GO TO 120\n                           END IF\n*\n                           IF( .NOT.NULL )THEN\n*\n*                             Check the result.\n*\n                              CALL ZMVCH( 'N', N, N, ALPHA, A, NMAX, X,\n     $                                    INCX, BETA, Y, INCY, YT, G,\n     $                                    YY, EPS, ERR, FATAL, NOUT,\n     $                                    .TRUE. )\n                              ERRMAX = MAX( ERRMAX, ERR )\n*                             If got really bad answer, report and\n*                             return.\n                              IF( FATAL )\n     $                           GO TO 120\n                           ELSE\n*                             Avoid repeating tests with N.le.0\n                              GO TO 110\n                           END IF\n*\n   50                   CONTINUE\n*\n   60                CONTINUE\n*\n   70             CONTINUE\n*\n   80          CONTINUE\n*\n   90       CONTINUE\n*\n  100    CONTINUE\n*\n  110 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 130\n*\n  120 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      IF( FULL )THEN\n         WRITE( NOUT, FMT = 9993 )NC, SNAME, UPLO, N, ALPHA, LDA, INCX,\n     $      BETA, INCY\n      ELSE IF( BANDED )THEN\n         WRITE( NOUT, FMT = 9994 )NC, SNAME, UPLO, N, K, ALPHA, LDA,\n     $      INCX, BETA, INCY\n      ELSE IF( PACKED )THEN\n         WRITE( NOUT, FMT = 9995 )NC, SNAME, UPLO, N, ALPHA, INCX,\n     $      BETA, INCY\n      END IF\n*\n  130 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',', I3, ',(', F4.1, ',',\n     $      F4.1, '), AP, X,', I2, ',(', F4.1, ',', F4.1, '), Y,', I2,\n     $      ')                .' )\n 9994 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',', 2( I3, ',' ), '(',\n     $      F4.1, ',', F4.1, '), A,', I3, ', X,', I2, ',(', F4.1, ',',\n     $      F4.1, '), Y,', I2, ')         .' )\n 9993 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',', I3, ',(', F4.1, ',',\n     $      F4.1, '), A,', I3, ', X,', I2, ',(', F4.1, ',', F4.1, '), ',\n     $      'Y,', I2, ')             .' )\n 9992 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of ZCHK2.\n*\n      END\n      SUBROUTINE ZCHK3( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NKB, KB, NINC, INC, NMAX,\n     $                  INCMAX, A, AA, AS, X, XX, XS, XT, G, Z )\n*\n*  Tests ZTRMV, ZTBMV, ZTPMV, ZTRSV, ZTBSV and ZTPSV.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Parameters ..\n      COMPLEX*16         ZERO, HALF, ONE\n      PARAMETER          ( ZERO = ( 0.0D0, 0.0D0 ),\n     $                   HALF = ( 0.5D0, 0.0D0 ),\n     $                   ONE = ( 1.0D0, 0.0D0 ) )\n      DOUBLE PRECISION   RZERO\n      PARAMETER          ( RZERO = 0.0D0 )\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION   EPS, THRESH\n      INTEGER            INCMAX, NIDIM, NINC, NKB, NMAX, NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      COMPLEX*16         A( NMAX, NMAX ), AA( NMAX*NMAX ),\n     $                   AS( NMAX*NMAX ), X( NMAX ), XS( NMAX*INCMAX ),\n     $                   XT( NMAX ), XX( NMAX*INCMAX ), Z( NMAX )\n      DOUBLE PRECISION   G( NMAX )\n      INTEGER            IDIM( NIDIM ), INC( NINC ), KB( NKB )\n*     .. Local Scalars ..\n      COMPLEX*16         TRANSL\n      DOUBLE PRECISION   ERR, ERRMAX\n      INTEGER            I, ICD, ICT, ICU, IK, IN, INCX, INCXS, IX, K,\n     $                   KS, LAA, LDA, LDAS, LX, N, NARGS, NC, NK, NS\n      LOGICAL            BANDED, FULL, NULL, PACKED, RESET, SAME\n      CHARACTER*1        DIAG, DIAGS, TRANS, TRANSS, UPLO, UPLOS\n      CHARACTER*2        ICHD, ICHU\n      CHARACTER*3        ICHT\n*     .. Local Arrays ..\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LZE, LZERES\n      EXTERNAL           LZE, LZERES\n*     .. External Subroutines ..\n      EXTERNAL           ZMAKE, ZMVCH, ZTBMV, ZTBSV, ZTPMV, ZTPSV,\n     $                   ZTRMV, ZTRSV\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, MAX\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICHU/'UL'/, ICHT/'NTC'/, ICHD/'UN'/\n*     .. Executable Statements ..\n      FULL = SNAME( 3: 3 ).EQ.'R'\n      BANDED = SNAME( 3: 3 ).EQ.'B'\n      PACKED = SNAME( 3: 3 ).EQ.'P'\n*     Define the number of arguments.\n      IF( FULL )THEN\n         NARGS = 8\n      ELSE IF( BANDED )THEN\n         NARGS = 9\n      ELSE IF( PACKED )THEN\n         NARGS = 7\n      END IF\n*\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = RZERO\n*     Set up zero vector for ZMVCH.\n      DO 10 I = 1, NMAX\n         Z( I ) = ZERO\n   10 CONTINUE\n*\n      DO 110 IN = 1, NIDIM\n         N = IDIM( IN )\n*\n         IF( BANDED )THEN\n            NK = NKB\n         ELSE\n            NK = 1\n         END IF\n         DO 100 IK = 1, NK\n            IF( BANDED )THEN\n               K = KB( IK )\n            ELSE\n               K = N - 1\n            END IF\n*           Set LDA to 1 more than minimum value if room.\n            IF( BANDED )THEN\n               LDA = K + 1\n            ELSE\n               LDA = N\n            END IF\n            IF( LDA.LT.NMAX )\n     $         LDA = LDA + 1\n*           Skip tests if not enough room.\n            IF( LDA.GT.NMAX )\n     $         GO TO 100\n            IF( PACKED )THEN\n               LAA = ( N*( N + 1 ) )/2\n            ELSE\n               LAA = LDA*N\n            END IF\n            NULL = N.LE.0\n*\n            DO 90 ICU = 1, 2\n               UPLO = ICHU( ICU: ICU )\n*\n               DO 80 ICT = 1, 3\n                  TRANS = ICHT( ICT: ICT )\n*\n                  DO 70 ICD = 1, 2\n                     DIAG = ICHD( ICD: ICD )\n*\n*                    Generate the matrix A.\n*\n                     TRANSL = ZERO\n                     CALL ZMAKE( SNAME( 2: 3 ), UPLO, DIAG, N, N, A,\n     $                           NMAX, AA, LDA, K, K, RESET, TRANSL )\n*\n                     DO 60 IX = 1, NINC\n                        INCX = INC( IX )\n                        LX = ABS( INCX )*N\n*\n*                       Generate the vector X.\n*\n                        TRANSL = HALF\n                        CALL ZMAKE( 'GE', ' ', ' ', 1, N, X, 1, XX,\n     $                              ABS( INCX ), 0, N - 1, RESET,\n     $                              TRANSL )\n                        IF( N.GT.1 )THEN\n                           X( N/2 ) = ZERO\n                           XX( 1 + ABS( INCX )*( N/2 - 1 ) ) = ZERO\n                        END IF\n*\n                        NC = NC + 1\n*\n*                       Save every datum before calling the subroutine.\n*\n                        UPLOS = UPLO\n                        TRANSS = TRANS\n                        DIAGS = DIAG\n                        NS = N\n                        KS = K\n                        DO 20 I = 1, LAA\n                           AS( I ) = AA( I )\n   20                   CONTINUE\n                        LDAS = LDA\n                        DO 30 I = 1, LX\n                           XS( I ) = XX( I )\n   30                   CONTINUE\n                        INCXS = INCX\n*\n*                       Call the subroutine.\n*\n                        IF( SNAME( 4: 5 ).EQ.'MV' )THEN\n                           IF( FULL )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9993 )NC, SNAME,\n     $                           UPLO, TRANS, DIAG, N, LDA, INCX\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL ZTRMV( UPLO, TRANS, DIAG, N, AA, LDA,\n     $                                    XX, INCX )\n                           ELSE IF( BANDED )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9994 )NC, SNAME,\n     $                           UPLO, TRANS, DIAG, N, K, LDA, INCX\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL ZTBMV( UPLO, TRANS, DIAG, N, K, AA,\n     $                                    LDA, XX, INCX )\n                           ELSE IF( PACKED )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9995 )NC, SNAME,\n     $                           UPLO, TRANS, DIAG, N, INCX\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL ZTPMV( UPLO, TRANS, DIAG, N, AA, XX,\n     $                                    INCX )\n                           END IF\n                        ELSE IF( SNAME( 4: 5 ).EQ.'SV' )THEN\n                           IF( FULL )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9993 )NC, SNAME,\n     $                           UPLO, TRANS, DIAG, N, LDA, INCX\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL ZTRSV( UPLO, TRANS, DIAG, N, AA, LDA,\n     $                                    XX, INCX )\n                           ELSE IF( BANDED )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9994 )NC, SNAME,\n     $                           UPLO, TRANS, DIAG, N, K, LDA, INCX\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL ZTBSV( UPLO, TRANS, DIAG, N, K, AA,\n     $                                    LDA, XX, INCX )\n                           ELSE IF( PACKED )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9995 )NC, SNAME,\n     $                           UPLO, TRANS, DIAG, N, INCX\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL ZTPSV( UPLO, TRANS, DIAG, N, AA, XX,\n     $                                    INCX )\n                           END IF\n                        END IF\n*\n*                       Check if error-exit was taken incorrectly.\n*\n                        IF( .NOT.OK )THEN\n                           WRITE( NOUT, FMT = 9992 )\n                           FATAL = .TRUE.\n                           GO TO 120\n                        END IF\n*\n*                       See what data changed inside subroutines.\n*\n                        ISAME( 1 ) = UPLO.EQ.UPLOS\n                        ISAME( 2 ) = TRANS.EQ.TRANSS\n                        ISAME( 3 ) = DIAG.EQ.DIAGS\n                        ISAME( 4 ) = NS.EQ.N\n                        IF( FULL )THEN\n                           ISAME( 5 ) = LZE( AS, AA, LAA )\n                           ISAME( 6 ) = LDAS.EQ.LDA\n                           IF( NULL )THEN\n                              ISAME( 7 ) = LZE( XS, XX, LX )\n                           ELSE\n                              ISAME( 7 ) = LZERES( 'GE', ' ', 1, N, XS,\n     $                                     XX, ABS( INCX ) )\n                           END IF\n                           ISAME( 8 ) = INCXS.EQ.INCX\n                        ELSE IF( BANDED )THEN\n                           ISAME( 5 ) = KS.EQ.K\n                           ISAME( 6 ) = LZE( AS, AA, LAA )\n                           ISAME( 7 ) = LDAS.EQ.LDA\n                           IF( NULL )THEN\n                              ISAME( 8 ) = LZE( XS, XX, LX )\n                           ELSE\n                              ISAME( 8 ) = LZERES( 'GE', ' ', 1, N, XS,\n     $                                     XX, ABS( INCX ) )\n                           END IF\n                           ISAME( 9 ) = INCXS.EQ.INCX\n                        ELSE IF( PACKED )THEN\n                           ISAME( 5 ) = LZE( AS, AA, LAA )\n                           IF( NULL )THEN\n                              ISAME( 6 ) = LZE( XS, XX, LX )\n                           ELSE\n                              ISAME( 6 ) = LZERES( 'GE', ' ', 1, N, XS,\n     $                                     XX, ABS( INCX ) )\n                           END IF\n                           ISAME( 7 ) = INCXS.EQ.INCX\n                        END IF\n*\n*                       If data was incorrectly changed, report and\n*                       return.\n*\n                        SAME = .TRUE.\n                        DO 40 I = 1, NARGS\n                           SAME = SAME.AND.ISAME( I )\n                           IF( .NOT.ISAME( I ) )\n     $                        WRITE( NOUT, FMT = 9998 )I\n   40                   CONTINUE\n                        IF( .NOT.SAME )THEN\n                           FATAL = .TRUE.\n                           GO TO 120\n                        END IF\n*\n                        IF( .NOT.NULL )THEN\n                           IF( SNAME( 4: 5 ).EQ.'MV' )THEN\n*\n*                             Check the result.\n*\n                              CALL ZMVCH( TRANS, N, N, ONE, A, NMAX, X,\n     $                                    INCX, ZERO, Z, INCX, XT, G,\n     $                                    XX, EPS, ERR, FATAL, NOUT,\n     $                                    .TRUE. )\n                           ELSE IF( SNAME( 4: 5 ).EQ.'SV' )THEN\n*\n*                             Compute approximation to original vector.\n*\n                              DO 50 I = 1, N\n                                 Z( I ) = XX( 1 + ( I - 1 )*\n     $                                    ABS( INCX ) )\n                                 XX( 1 + ( I - 1 )*ABS( INCX ) )\n     $                              = X( I )\n   50                         CONTINUE\n                              CALL ZMVCH( TRANS, N, N, ONE, A, NMAX, Z,\n     $                                    INCX, ZERO, X, INCX, XT, G,\n     $                                    XX, EPS, ERR, FATAL, NOUT,\n     $                                    .FALSE. )\n                           END IF\n                           ERRMAX = MAX( ERRMAX, ERR )\n*                          If got really bad answer, report and return.\n                           IF( FATAL )\n     $                        GO TO 120\n                        ELSE\n*                          Avoid repeating tests with N.le.0.\n                           GO TO 110\n                        END IF\n*\n   60                CONTINUE\n*\n   70             CONTINUE\n*\n   80          CONTINUE\n*\n   90       CONTINUE\n*\n  100    CONTINUE\n*\n  110 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 130\n*\n  120 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      IF( FULL )THEN\n         WRITE( NOUT, FMT = 9993 )NC, SNAME, UPLO, TRANS, DIAG, N, LDA,\n     $      INCX\n      ELSE IF( BANDED )THEN\n         WRITE( NOUT, FMT = 9994 )NC, SNAME, UPLO, TRANS, DIAG, N, K,\n     $      LDA, INCX\n      ELSE IF( PACKED )THEN\n         WRITE( NOUT, FMT = 9995 )NC, SNAME, UPLO, TRANS, DIAG, N, INCX\n      END IF\n*\n  130 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( 1X, I6, ': ', A6, '(', 3( '''', A1, ''',' ), I3, ', AP, ',\n     $      'X,', I2, ')                                      .' )\n 9994 FORMAT( 1X, I6, ': ', A6, '(', 3( '''', A1, ''',' ), 2( I3, ',' ),\n     $      ' A,', I3, ', X,', I2, ')                               .' )\n 9993 FORMAT( 1X, I6, ': ', A6, '(', 3( '''', A1, ''',' ), I3, ', A,',\n     $      I3, ', X,', I2, ')                                   .' )\n 9992 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of ZCHK3.\n*\n      END\n      SUBROUTINE ZCHK4( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NALF, ALF, NINC, INC, NMAX,\n     $                  INCMAX, A, AA, AS, X, XX, XS, Y, YY, YS, YT, G,\n     $                  Z )\n*\n*  Tests ZGERC and ZGERU.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Parameters ..\n      COMPLEX*16         ZERO, HALF, ONE\n      PARAMETER          ( ZERO = ( 0.0D0, 0.0D0 ),\n     $                   HALF = ( 0.5D0, 0.0D0 ),\n     $                   ONE = ( 1.0D0, 0.0D0 ) )\n      DOUBLE PRECISION   RZERO\n      PARAMETER          ( RZERO = 0.0D0 )\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION   EPS, THRESH\n      INTEGER            INCMAX, NALF, NIDIM, NINC, NMAX, NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      COMPLEX*16         A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),\n     $                   AS( NMAX*NMAX ), X( NMAX ), XS( NMAX*INCMAX ),\n     $                   XX( NMAX*INCMAX ), Y( NMAX ),\n     $                   YS( NMAX*INCMAX ), YT( NMAX ),\n     $                   YY( NMAX*INCMAX ), Z( NMAX )\n      DOUBLE PRECISION   G( NMAX )\n      INTEGER            IDIM( NIDIM ), INC( NINC )\n*     .. Local Scalars ..\n      COMPLEX*16         ALPHA, ALS, TRANSL\n      DOUBLE PRECISION   ERR, ERRMAX\n      INTEGER            I, IA, IM, IN, INCX, INCXS, INCY, INCYS, IX,\n     $                   IY, J, LAA, LDA, LDAS, LX, LY, M, MS, N, NARGS,\n     $                   NC, ND, NS\n      LOGICAL            CONJ, NULL, RESET, SAME\n*     .. Local Arrays ..\n      COMPLEX*16         W( 1 )\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LZE, LZERES\n      EXTERNAL           LZE, LZERES\n*     .. External Subroutines ..\n      EXTERNAL           ZGERC, ZGERU, ZMAKE, ZMVCH\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, DCONJG, MAX, MIN\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Executable Statements ..\n      CONJ = SNAME( 5: 5 ).EQ.'C'\n*     Define the number of arguments.\n      NARGS = 9\n*\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = RZERO\n*\n      DO 120 IN = 1, NIDIM\n         N = IDIM( IN )\n         ND = N/2 + 1\n*\n         DO 110 IM = 1, 2\n            IF( IM.EQ.1 )\n     $         M = MAX( N - ND, 0 )\n            IF( IM.EQ.2 )\n     $         M = MIN( N + ND, NMAX )\n*\n*           Set LDA to 1 more than minimum value if room.\n            LDA = M\n            IF( LDA.LT.NMAX )\n     $         LDA = LDA + 1\n*           Skip tests if not enough room.\n            IF( LDA.GT.NMAX )\n     $         GO TO 110\n            LAA = LDA*N\n            NULL = N.LE.0.OR.M.LE.0\n*\n            DO 100 IX = 1, NINC\n               INCX = INC( IX )\n               LX = ABS( INCX )*M\n*\n*              Generate the vector X.\n*\n               TRANSL = HALF\n               CALL ZMAKE( 'GE', ' ', ' ', 1, M, X, 1, XX, ABS( INCX ),\n     $                     0, M - 1, RESET, TRANSL )\n               IF( M.GT.1 )THEN\n                  X( M/2 ) = ZERO\n                  XX( 1 + ABS( INCX )*( M/2 - 1 ) ) = ZERO\n               END IF\n*\n               DO 90 IY = 1, NINC\n                  INCY = INC( IY )\n                  LY = ABS( INCY )*N\n*\n*                 Generate the vector Y.\n*\n                  TRANSL = ZERO\n                  CALL ZMAKE( 'GE', ' ', ' ', 1, N, Y, 1, YY,\n     $                        ABS( INCY ), 0, N - 1, RESET, TRANSL )\n                  IF( N.GT.1 )THEN\n                     Y( N/2 ) = ZERO\n                     YY( 1 + ABS( INCY )*( N/2 - 1 ) ) = ZERO\n                  END IF\n*\n                  DO 80 IA = 1, NALF\n                     ALPHA = ALF( IA )\n*\n*                    Generate the matrix A.\n*\n                     TRANSL = ZERO\n                     CALL ZMAKE( SNAME( 2: 3 ), ' ', ' ', M, N, A, NMAX,\n     $                           AA, LDA, M - 1, N - 1, RESET, TRANSL )\n*\n                     NC = NC + 1\n*\n*                    Save every datum before calling the subroutine.\n*\n                     MS = M\n                     NS = N\n                     ALS = ALPHA\n                     DO 10 I = 1, LAA\n                        AS( I ) = AA( I )\n   10                CONTINUE\n                     LDAS = LDA\n                     DO 20 I = 1, LX\n                        XS( I ) = XX( I )\n   20                CONTINUE\n                     INCXS = INCX\n                     DO 30 I = 1, LY\n                        YS( I ) = YY( I )\n   30                CONTINUE\n                     INCYS = INCY\n*\n*                    Call the subroutine.\n*\n                     IF( TRACE )\n     $                  WRITE( NTRA, FMT = 9994 )NC, SNAME, M, N,\n     $                  ALPHA, INCX, INCY, LDA\n                     IF( CONJ )THEN\n                        IF( REWI )\n     $                     REWIND NTRA\n                        CALL ZGERC( M, N, ALPHA, XX, INCX, YY, INCY, AA,\n     $                              LDA )\n                     ELSE\n                        IF( REWI )\n     $                     REWIND NTRA\n                        CALL ZGERU( M, N, ALPHA, XX, INCX, YY, INCY, AA,\n     $                              LDA )\n                     END IF\n*\n*                    Check if error-exit was taken incorrectly.\n*\n                     IF( .NOT.OK )THEN\n                        WRITE( NOUT, FMT = 9993 )\n                        FATAL = .TRUE.\n                        GO TO 140\n                     END IF\n*\n*                    See what data changed inside subroutine.\n*\n                     ISAME( 1 ) = MS.EQ.M\n                     ISAME( 2 ) = NS.EQ.N\n                     ISAME( 3 ) = ALS.EQ.ALPHA\n                     ISAME( 4 ) = LZE( XS, XX, LX )\n                     ISAME( 5 ) = INCXS.EQ.INCX\n                     ISAME( 6 ) = LZE( YS, YY, LY )\n                     ISAME( 7 ) = INCYS.EQ.INCY\n                     IF( NULL )THEN\n                        ISAME( 8 ) = LZE( AS, AA, LAA )\n                     ELSE\n                        ISAME( 8 ) = LZERES( 'GE', ' ', M, N, AS, AA,\n     $                               LDA )\n                     END IF\n                     ISAME( 9 ) = LDAS.EQ.LDA\n*\n*                    If data was incorrectly changed, report and return.\n*\n                     SAME = .TRUE.\n                     DO 40 I = 1, NARGS\n                        SAME = SAME.AND.ISAME( I )\n                        IF( .NOT.ISAME( I ) )\n     $                     WRITE( NOUT, FMT = 9998 )I\n   40                CONTINUE\n                     IF( .NOT.SAME )THEN\n                        FATAL = .TRUE.\n                        GO TO 140\n                     END IF\n*\n                     IF( .NOT.NULL )THEN\n*\n*                       Check the result column by column.\n*\n                        IF( INCX.GT.0 )THEN\n                           DO 50 I = 1, M\n                              Z( I ) = X( I )\n   50                      CONTINUE\n                        ELSE\n                           DO 60 I = 1, M\n                              Z( I ) = X( M - I + 1 )\n   60                      CONTINUE\n                        END IF\n                        DO 70 J = 1, N\n                           IF( INCY.GT.0 )THEN\n                              W( 1 ) = Y( J )\n                           ELSE\n                              W( 1 ) = Y( N - J + 1 )\n                           END IF\n                           IF( CONJ )\n     $                        W( 1 ) = DCONJG( W( 1 ) )\n                           CALL ZMVCH( 'N', M, 1, ALPHA, Z, NMAX, W, 1,\n     $                                 ONE, A( 1, J ), 1, YT, G,\n     $                                 AA( 1 + ( J - 1 )*LDA ), EPS,\n     $                                 ERR, FATAL, NOUT, .TRUE. )\n                           ERRMAX = MAX( ERRMAX, ERR )\n*                          If got really bad answer, report and return.\n                           IF( FATAL )\n     $                        GO TO 130\n   70                   CONTINUE\n                     ELSE\n*                       Avoid repeating tests with M.le.0 or N.le.0.\n                        GO TO 110\n                     END IF\n*\n   80             CONTINUE\n*\n   90          CONTINUE\n*\n  100       CONTINUE\n*\n  110    CONTINUE\n*\n  120 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 150\n*\n  130 CONTINUE\n      WRITE( NOUT, FMT = 9995 )J\n*\n  140 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      WRITE( NOUT, FMT = 9994 )NC, SNAME, M, N, ALPHA, INCX, INCY, LDA\n*\n  150 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( '      THESE ARE THE RESULTS FOR COLUMN ', I3 )\n 9994 FORMAT( 1X, I6, ': ', A6, '(', 2( I3, ',' ), '(', F4.1, ',', F4.1,\n     $      '), X,', I2, ', Y,', I2, ', A,', I3, ')                   ',\n     $      '      .' )\n 9993 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of ZCHK4.\n*\n      END\n      SUBROUTINE ZCHK5( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NALF, ALF, NINC, INC, NMAX,\n     $                  INCMAX, A, AA, AS, X, XX, XS, Y, YY, YS, YT, G,\n     $                  Z )\n*\n*  Tests ZHER and ZHPR.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Parameters ..\n      COMPLEX*16         ZERO, HALF, ONE\n      PARAMETER          ( ZERO = ( 0.0D0, 0.0D0 ),\n     $                   HALF = ( 0.5D0, 0.0D0 ),\n     $                   ONE = ( 1.0D0, 0.0D0 ) )\n      DOUBLE PRECISION   RZERO\n      PARAMETER          ( RZERO = 0.0D0 )\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION   EPS, THRESH\n      INTEGER            INCMAX, NALF, NIDIM, NINC, NMAX, NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      COMPLEX*16         A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),\n     $                   AS( NMAX*NMAX ), X( NMAX ), XS( NMAX*INCMAX ),\n     $                   XX( NMAX*INCMAX ), Y( NMAX ),\n     $                   YS( NMAX*INCMAX ), YT( NMAX ),\n     $                   YY( NMAX*INCMAX ), Z( NMAX )\n      DOUBLE PRECISION   G( NMAX )\n      INTEGER            IDIM( NIDIM ), INC( NINC )\n*     .. Local Scalars ..\n      COMPLEX*16         ALPHA, TRANSL\n      DOUBLE PRECISION   ERR, ERRMAX, RALPHA, RALS\n      INTEGER            I, IA, IC, IN, INCX, INCXS, IX, J, JA, JJ, LAA,\n     $                   LDA, LDAS, LJ, LX, N, NARGS, NC, NS\n      LOGICAL            FULL, NULL, PACKED, RESET, SAME, UPPER\n      CHARACTER*1        UPLO, UPLOS\n      CHARACTER*2        ICH\n*     .. Local Arrays ..\n      COMPLEX*16         W( 1 )\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LZE, LZERES\n      EXTERNAL           LZE, LZERES\n*     .. External Subroutines ..\n      EXTERNAL           ZHER, ZHPR, ZMAKE, ZMVCH\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, DBLE, DCMPLX, DCONJG, MAX\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICH/'UL'/\n*     .. Executable Statements ..\n      FULL = SNAME( 3: 3 ).EQ.'E'\n      PACKED = SNAME( 3: 3 ).EQ.'P'\n*     Define the number of arguments.\n      IF( FULL )THEN\n         NARGS = 7\n      ELSE IF( PACKED )THEN\n         NARGS = 6\n      END IF\n*\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = RZERO\n*\n      DO 100 IN = 1, NIDIM\n         N = IDIM( IN )\n*        Set LDA to 1 more than minimum value if room.\n         LDA = N\n         IF( LDA.LT.NMAX )\n     $      LDA = LDA + 1\n*        Skip tests if not enough room.\n         IF( LDA.GT.NMAX )\n     $      GO TO 100\n         IF( PACKED )THEN\n            LAA = ( N*( N + 1 ) )/2\n         ELSE\n            LAA = LDA*N\n         END IF\n*\n         DO 90 IC = 1, 2\n            UPLO = ICH( IC: IC )\n            UPPER = UPLO.EQ.'U'\n*\n            DO 80 IX = 1, NINC\n               INCX = INC( IX )\n               LX = ABS( INCX )*N\n*\n*              Generate the vector X.\n*\n               TRANSL = HALF\n               CALL ZMAKE( 'GE', ' ', ' ', 1, N, X, 1, XX, ABS( INCX ),\n     $                     0, N - 1, RESET, TRANSL )\n               IF( N.GT.1 )THEN\n                  X( N/2 ) = ZERO\n                  XX( 1 + ABS( INCX )*( N/2 - 1 ) ) = ZERO\n               END IF\n*\n               DO 70 IA = 1, NALF\n                  RALPHA = DBLE( ALF( IA ) )\n                  ALPHA = DCMPLX( RALPHA, RZERO )\n                  NULL = N.LE.0.OR.RALPHA.EQ.RZERO\n*\n*                 Generate the matrix A.\n*\n                  TRANSL = ZERO\n                  CALL ZMAKE( SNAME( 2: 3 ), UPLO, ' ', N, N, A, NMAX,\n     $                        AA, LDA, N - 1, N - 1, RESET, TRANSL )\n*\n                  NC = NC + 1\n*\n*                 Save every datum before calling the subroutine.\n*\n                  UPLOS = UPLO\n                  NS = N\n                  RALS = RALPHA\n                  DO 10 I = 1, LAA\n                     AS( I ) = AA( I )\n   10             CONTINUE\n                  LDAS = LDA\n                  DO 20 I = 1, LX\n                     XS( I ) = XX( I )\n   20             CONTINUE\n                  INCXS = INCX\n*\n*                 Call the subroutine.\n*\n                  IF( FULL )THEN\n                     IF( TRACE )\n     $                  WRITE( NTRA, FMT = 9993 )NC, SNAME, UPLO, N,\n     $                  RALPHA, INCX, LDA\n                     IF( REWI )\n     $                  REWIND NTRA\n                     CALL ZHER( UPLO, N, RALPHA, XX, INCX, AA, LDA )\n                  ELSE IF( PACKED )THEN\n                     IF( TRACE )\n     $                  WRITE( NTRA, FMT = 9994 )NC, SNAME, UPLO, N,\n     $                  RALPHA, INCX\n                     IF( REWI )\n     $                  REWIND NTRA\n                     CALL ZHPR( UPLO, N, RALPHA, XX, INCX, AA )\n                  END IF\n*\n*                 Check if error-exit was taken incorrectly.\n*\n                  IF( .NOT.OK )THEN\n                     WRITE( NOUT, FMT = 9992 )\n                     FATAL = .TRUE.\n                     GO TO 120\n                  END IF\n*\n*                 See what data changed inside subroutines.\n*\n                  ISAME( 1 ) = UPLO.EQ.UPLOS\n                  ISAME( 2 ) = NS.EQ.N\n                  ISAME( 3 ) = RALS.EQ.RALPHA\n                  ISAME( 4 ) = LZE( XS, XX, LX )\n                  ISAME( 5 ) = INCXS.EQ.INCX\n                  IF( NULL )THEN\n                     ISAME( 6 ) = LZE( AS, AA, LAA )\n                  ELSE\n                     ISAME( 6 ) = LZERES( SNAME( 2: 3 ), UPLO, N, N, AS,\n     $                            AA, LDA )\n                  END IF\n                  IF( .NOT.PACKED )THEN\n                     ISAME( 7 ) = LDAS.EQ.LDA\n                  END IF\n*\n*                 If data was incorrectly changed, report and return.\n*\n                  SAME = .TRUE.\n                  DO 30 I = 1, NARGS\n                     SAME = SAME.AND.ISAME( I )\n                     IF( .NOT.ISAME( I ) )\n     $                  WRITE( NOUT, FMT = 9998 )I\n   30             CONTINUE\n                  IF( .NOT.SAME )THEN\n                     FATAL = .TRUE.\n                     GO TO 120\n                  END IF\n*\n                  IF( .NOT.NULL )THEN\n*\n*                    Check the result column by column.\n*\n                     IF( INCX.GT.0 )THEN\n                        DO 40 I = 1, N\n                           Z( I ) = X( I )\n   40                   CONTINUE\n                     ELSE\n                        DO 50 I = 1, N\n                           Z( I ) = X( N - I + 1 )\n   50                   CONTINUE\n                     END IF\n                     JA = 1\n                     DO 60 J = 1, N\n                        W( 1 ) = DCONJG( Z( J ) )\n                        IF( UPPER )THEN\n                           JJ = 1\n                           LJ = J\n                        ELSE\n                           JJ = J\n                           LJ = N - J + 1\n                        END IF\n                        CALL ZMVCH( 'N', LJ, 1, ALPHA, Z( JJ ), LJ, W,\n     $                              1, ONE, A( JJ, J ), 1, YT, G,\n     $                              AA( JA ), EPS, ERR, FATAL, NOUT,\n     $                              .TRUE. )\n                        IF( FULL )THEN\n                           IF( UPPER )THEN\n                              JA = JA + LDA\n                           ELSE\n                              JA = JA + LDA + 1\n                           END IF\n                        ELSE\n                           JA = JA + LJ\n                        END IF\n                        ERRMAX = MAX( ERRMAX, ERR )\n*                       If got really bad answer, report and return.\n                        IF( FATAL )\n     $                     GO TO 110\n   60                CONTINUE\n                  ELSE\n*                    Avoid repeating tests if N.le.0.\n                     IF( N.LE.0 )\n     $                  GO TO 100\n                  END IF\n*\n   70          CONTINUE\n*\n   80       CONTINUE\n*\n   90    CONTINUE\n*\n  100 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 130\n*\n  110 CONTINUE\n      WRITE( NOUT, FMT = 9995 )J\n*\n  120 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      IF( FULL )THEN\n         WRITE( NOUT, FMT = 9993 )NC, SNAME, UPLO, N, RALPHA, INCX, LDA\n      ELSE IF( PACKED )THEN\n         WRITE( NOUT, FMT = 9994 )NC, SNAME, UPLO, N, RALPHA, INCX\n      END IF\n*\n  130 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( '      THESE ARE THE RESULTS FOR COLUMN ', I3 )\n 9994 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',', I3, ',', F4.1, ', X,',\n     $      I2, ', AP)                                         .' )\n 9993 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',', I3, ',', F4.1, ', X,',\n     $      I2, ', A,', I3, ')                                      .' )\n 9992 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of ZCHK5.\n*\n      END\n      SUBROUTINE ZCHK6( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NALF, ALF, NINC, INC, NMAX,\n     $                  INCMAX, A, AA, AS, X, XX, XS, Y, YY, YS, YT, G,\n     $                  Z )\n*\n*  Tests ZHER2 and ZHPR2.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Parameters ..\n      COMPLEX*16         ZERO, HALF, ONE\n      PARAMETER          ( ZERO = ( 0.0D0, 0.0D0 ),\n     $                   HALF = ( 0.5D0, 0.0D0 ),\n     $                   ONE = ( 1.0D0, 0.0D0 ) )\n      DOUBLE PRECISION   RZERO\n      PARAMETER          ( RZERO = 0.0D0 )\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION   EPS, THRESH\n      INTEGER            INCMAX, NALF, NIDIM, NINC, NMAX, NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      COMPLEX*16         A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),\n     $                   AS( NMAX*NMAX ), X( NMAX ), XS( NMAX*INCMAX ),\n     $                   XX( NMAX*INCMAX ), Y( NMAX ),\n     $                   YS( NMAX*INCMAX ), YT( NMAX ),\n     $                   YY( NMAX*INCMAX ), Z( NMAX, 2 )\n      DOUBLE PRECISION   G( NMAX )\n      INTEGER            IDIM( NIDIM ), INC( NINC )\n*     .. Local Scalars ..\n      COMPLEX*16         ALPHA, ALS, TRANSL\n      DOUBLE PRECISION   ERR, ERRMAX\n      INTEGER            I, IA, IC, IN, INCX, INCXS, INCY, INCYS, IX,\n     $                   IY, J, JA, JJ, LAA, LDA, LDAS, LJ, LX, LY, N,\n     $                   NARGS, NC, NS\n      LOGICAL            FULL, NULL, PACKED, RESET, SAME, UPPER\n      CHARACTER*1        UPLO, UPLOS\n      CHARACTER*2        ICH\n*     .. Local Arrays ..\n      COMPLEX*16         W( 2 )\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LZE, LZERES\n      EXTERNAL           LZE, LZERES\n*     .. External Subroutines ..\n      EXTERNAL           ZHER2, ZHPR2, ZMAKE, ZMVCH\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, DCONJG, MAX\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICH/'UL'/\n*     .. Executable Statements ..\n      FULL = SNAME( 3: 3 ).EQ.'E'\n      PACKED = SNAME( 3: 3 ).EQ.'P'\n*     Define the number of arguments.\n      IF( FULL )THEN\n         NARGS = 9\n      ELSE IF( PACKED )THEN\n         NARGS = 8\n      END IF\n*\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = RZERO\n*\n      DO 140 IN = 1, NIDIM\n         N = IDIM( IN )\n*        Set LDA to 1 more than minimum value if room.\n         LDA = N\n         IF( LDA.LT.NMAX )\n     $      LDA = LDA + 1\n*        Skip tests if not enough room.\n         IF( LDA.GT.NMAX )\n     $      GO TO 140\n         IF( PACKED )THEN\n            LAA = ( N*( N + 1 ) )/2\n         ELSE\n            LAA = LDA*N\n         END IF\n*\n         DO 130 IC = 1, 2\n            UPLO = ICH( IC: IC )\n            UPPER = UPLO.EQ.'U'\n*\n            DO 120 IX = 1, NINC\n               INCX = INC( IX )\n               LX = ABS( INCX )*N\n*\n*              Generate the vector X.\n*\n               TRANSL = HALF\n               CALL ZMAKE( 'GE', ' ', ' ', 1, N, X, 1, XX, ABS( INCX ),\n     $                     0, N - 1, RESET, TRANSL )\n               IF( N.GT.1 )THEN\n                  X( N/2 ) = ZERO\n                  XX( 1 + ABS( INCX )*( N/2 - 1 ) ) = ZERO\n               END IF\n*\n               DO 110 IY = 1, NINC\n                  INCY = INC( IY )\n                  LY = ABS( INCY )*N\n*\n*                 Generate the vector Y.\n*\n                  TRANSL = ZERO\n                  CALL ZMAKE( 'GE', ' ', ' ', 1, N, Y, 1, YY,\n     $                        ABS( INCY ), 0, N - 1, RESET, TRANSL )\n                  IF( N.GT.1 )THEN\n                     Y( N/2 ) = ZERO\n                     YY( 1 + ABS( INCY )*( N/2 - 1 ) ) = ZERO\n                  END IF\n*\n                  DO 100 IA = 1, NALF\n                     ALPHA = ALF( IA )\n                     NULL = N.LE.0.OR.ALPHA.EQ.ZERO\n*\n*                    Generate the matrix A.\n*\n                     TRANSL = ZERO\n                     CALL ZMAKE( SNAME( 2: 3 ), UPLO, ' ', N, N, A,\n     $                           NMAX, AA, LDA, N - 1, N - 1, RESET,\n     $                           TRANSL )\n*\n                     NC = NC + 1\n*\n*                    Save every datum before calling the subroutine.\n*\n                     UPLOS = UPLO\n                     NS = N\n                     ALS = ALPHA\n                     DO 10 I = 1, LAA\n                        AS( I ) = AA( I )\n   10                CONTINUE\n                     LDAS = LDA\n                     DO 20 I = 1, LX\n                        XS( I ) = XX( I )\n   20                CONTINUE\n                     INCXS = INCX\n                     DO 30 I = 1, LY\n                        YS( I ) = YY( I )\n   30                CONTINUE\n                     INCYS = INCY\n*\n*                    Call the subroutine.\n*\n                     IF( FULL )THEN\n                        IF( TRACE )\n     $                     WRITE( NTRA, FMT = 9993 )NC, SNAME, UPLO, N,\n     $                     ALPHA, INCX, INCY, LDA\n                        IF( REWI )\n     $                     REWIND NTRA\n                        CALL ZHER2( UPLO, N, ALPHA, XX, INCX, YY, INCY,\n     $                              AA, LDA )\n                     ELSE IF( PACKED )THEN\n                        IF( TRACE )\n     $                     WRITE( NTRA, FMT = 9994 )NC, SNAME, UPLO, N,\n     $                     ALPHA, INCX, INCY\n                        IF( REWI )\n     $                     REWIND NTRA\n                        CALL ZHPR2( UPLO, N, ALPHA, XX, INCX, YY, INCY,\n     $                              AA )\n                     END IF\n*\n*                    Check if error-exit was taken incorrectly.\n*\n                     IF( .NOT.OK )THEN\n                        WRITE( NOUT, FMT = 9992 )\n                        FATAL = .TRUE.\n                        GO TO 160\n                     END IF\n*\n*                    See what data changed inside subroutines.\n*\n                     ISAME( 1 ) = UPLO.EQ.UPLOS\n                     ISAME( 2 ) = NS.EQ.N\n                     ISAME( 3 ) = ALS.EQ.ALPHA\n                     ISAME( 4 ) = LZE( XS, XX, LX )\n                     ISAME( 5 ) = INCXS.EQ.INCX\n                     ISAME( 6 ) = LZE( YS, YY, LY )\n                     ISAME( 7 ) = INCYS.EQ.INCY\n                     IF( NULL )THEN\n                        ISAME( 8 ) = LZE( AS, AA, LAA )\n                     ELSE\n                        ISAME( 8 ) = LZERES( SNAME( 2: 3 ), UPLO, N, N,\n     $                               AS, AA, LDA )\n                     END IF\n                     IF( .NOT.PACKED )THEN\n                        ISAME( 9 ) = LDAS.EQ.LDA\n                     END IF\n*\n*                    If data was incorrectly changed, report and return.\n*\n                     SAME = .TRUE.\n                     DO 40 I = 1, NARGS\n                        SAME = SAME.AND.ISAME( I )\n                        IF( .NOT.ISAME( I ) )\n     $                     WRITE( NOUT, FMT = 9998 )I\n   40                CONTINUE\n                     IF( .NOT.SAME )THEN\n                        FATAL = .TRUE.\n                        GO TO 160\n                     END IF\n*\n                     IF( .NOT.NULL )THEN\n*\n*                       Check the result column by column.\n*\n                        IF( INCX.GT.0 )THEN\n                           DO 50 I = 1, N\n                              Z( I, 1 ) = X( I )\n   50                      CONTINUE\n                        ELSE\n                           DO 60 I = 1, N\n                              Z( I, 1 ) = X( N - I + 1 )\n   60                      CONTINUE\n                        END IF\n                        IF( INCY.GT.0 )THEN\n                           DO 70 I = 1, N\n                              Z( I, 2 ) = Y( I )\n   70                      CONTINUE\n                        ELSE\n                           DO 80 I = 1, N\n                              Z( I, 2 ) = Y( N - I + 1 )\n   80                      CONTINUE\n                        END IF\n                        JA = 1\n                        DO 90 J = 1, N\n                           W( 1 ) = ALPHA*DCONJG( Z( J, 2 ) )\n                           W( 2 ) = DCONJG( ALPHA )*DCONJG( Z( J, 1 ) )\n                           IF( UPPER )THEN\n                              JJ = 1\n                              LJ = J\n                           ELSE\n                              JJ = J\n                              LJ = N - J + 1\n                           END IF\n                           CALL ZMVCH( 'N', LJ, 2, ONE, Z( JJ, 1 ),\n     $                                 NMAX, W, 1, ONE, A( JJ, J ), 1,\n     $                                 YT, G, AA( JA ), EPS, ERR, FATAL,\n     $                                 NOUT, .TRUE. )\n                           IF( FULL )THEN\n                              IF( UPPER )THEN\n                                 JA = JA + LDA\n                              ELSE\n                                 JA = JA + LDA + 1\n                              END IF\n                           ELSE\n                              JA = JA + LJ\n                           END IF\n                           ERRMAX = MAX( ERRMAX, ERR )\n*                          If got really bad answer, report and return.\n                           IF( FATAL )\n     $                        GO TO 150\n   90                   CONTINUE\n                     ELSE\n*                       Avoid repeating tests with N.le.0.\n                        IF( N.LE.0 )\n     $                     GO TO 140\n                     END IF\n*\n  100             CONTINUE\n*\n  110          CONTINUE\n*\n  120       CONTINUE\n*\n  130    CONTINUE\n*\n  140 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 170\n*\n  150 CONTINUE\n      WRITE( NOUT, FMT = 9995 )J\n*\n  160 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      IF( FULL )THEN\n         WRITE( NOUT, FMT = 9993 )NC, SNAME, UPLO, N, ALPHA, INCX,\n     $      INCY, LDA\n      ELSE IF( PACKED )THEN\n         WRITE( NOUT, FMT = 9994 )NC, SNAME, UPLO, N, ALPHA, INCX, INCY\n      END IF\n*\n  170 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( '      THESE ARE THE RESULTS FOR COLUMN ', I3 )\n 9994 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',', I3, ',(', F4.1, ',',\n     $      F4.1, '), X,', I2, ', Y,', I2, ', AP)                     ',\n     $      '       .' )\n 9993 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',', I3, ',(', F4.1, ',',\n     $      F4.1, '), X,', I2, ', Y,', I2, ', A,', I3, ')             ',\n     $      '            .' )\n 9992 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of ZCHK6.\n*\n      END\n      SUBROUTINE ZCHKE( ISNUM, SRNAMT, NOUT )\n*\n*  Tests the error exits from the Level 2 Blas.\n*  Requires a special version of the error-handling routine XERBLA.\n*  ALPHA, RALPHA, BETA, A, X and Y should not need to be defined.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Scalar Arguments ..\n      INTEGER            ISNUM, NOUT\n      CHARACTER*6        SRNAMT\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Local Scalars ..\n      COMPLEX*16         ALPHA, BETA\n      DOUBLE PRECISION   RALPHA\n*     .. Local Arrays ..\n      COMPLEX*16         A( 1, 1 ), X( 1 ), Y( 1 )\n*     .. External Subroutines ..\n      EXTERNAL           CHKXER, ZGBMV, ZGEMV, ZGERC, ZGERU, ZHBMV,\n     $                   ZHEMV, ZHER, ZHER2, ZHPMV, ZHPR, ZHPR2, ZTBMV,\n     $                   ZTBSV, ZTPMV, ZTPSV, ZTRMV, ZTRSV\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Executable Statements ..\n*     OK is set to .FALSE. by the special version of XERBLA or by CHKXER\n*     if anything is wrong.\n      OK = .TRUE.\n*     LERR is set to .TRUE. by the special version of XERBLA each time\n*     it is called, and is then tested and re-set by CHKXER.\n      LERR = .FALSE.\n      GO TO ( 10, 20, 30, 40, 50, 60, 70, 80,\n     $        90, 100, 110, 120, 130, 140, 150, 160,\n     $        170 )ISNUM\n   10 INFOT = 1\n      CALL ZGEMV( '/', 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL ZGEMV( 'N', -1, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZGEMV( 'N', 0, -1, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL ZGEMV( 'N', 2, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL ZGEMV( 'N', 0, 0, ALPHA, A, 1, X, 0, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL ZGEMV( 'N', 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 180\n   20 INFOT = 1\n      CALL ZGBMV( '/', 0, 0, 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL ZGBMV( 'N', -1, 0, 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZGBMV( 'N', 0, -1, 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZGBMV( 'N', 0, 0, -1, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZGBMV( 'N', 2, 0, 0, -1, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL ZGBMV( 'N', 0, 0, 1, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL ZGBMV( 'N', 0, 0, 0, 0, ALPHA, A, 1, X, 0, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 13\n      CALL ZGBMV( 'N', 0, 0, 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 180\n   30 INFOT = 1\n      CALL ZHEMV( '/', 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL ZHEMV( 'U', -1, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZHEMV( 'U', 2, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL ZHEMV( 'U', 0, ALPHA, A, 1, X, 0, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL ZHEMV( 'U', 0, ALPHA, A, 1, X, 1, BETA, Y, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 180\n   40 INFOT = 1\n      CALL ZHBMV( '/', 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL ZHBMV( 'U', -1, 0, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZHBMV( 'U', 0, -1, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL ZHBMV( 'U', 0, 1, ALPHA, A, 1, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL ZHBMV( 'U', 0, 0, ALPHA, A, 1, X, 0, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL ZHBMV( 'U', 0, 0, ALPHA, A, 1, X, 1, BETA, Y, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 180\n   50 INFOT = 1\n      CALL ZHPMV( '/', 0, ALPHA, A, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL ZHPMV( 'U', -1, ALPHA, A, X, 1, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL ZHPMV( 'U', 0, ALPHA, A, X, 0, BETA, Y, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZHPMV( 'U', 0, ALPHA, A, X, 1, BETA, Y, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 180\n   60 INFOT = 1\n      CALL ZTRMV( '/', 'N', 'N', 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL ZTRMV( 'U', '/', 'N', 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZTRMV( 'U', 'N', '/', 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZTRMV( 'U', 'N', 'N', -1, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL ZTRMV( 'U', 'N', 'N', 2, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL ZTRMV( 'U', 'N', 'N', 0, A, 1, X, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 180\n   70 INFOT = 1\n      CALL ZTBMV( '/', 'N', 'N', 0, 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL ZTBMV( 'U', '/', 'N', 0, 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZTBMV( 'U', 'N', '/', 0, 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZTBMV( 'U', 'N', 'N', -1, 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZTBMV( 'U', 'N', 'N', 0, -1, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL ZTBMV( 'U', 'N', 'N', 0, 1, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZTBMV( 'U', 'N', 'N', 0, 0, A, 1, X, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 180\n   80 INFOT = 1\n      CALL ZTPMV( '/', 'N', 'N', 0, A, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL ZTPMV( 'U', '/', 'N', 0, A, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZTPMV( 'U', 'N', '/', 0, A, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZTPMV( 'U', 'N', 'N', -1, A, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL ZTPMV( 'U', 'N', 'N', 0, A, X, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 180\n   90 INFOT = 1\n      CALL ZTRSV( '/', 'N', 'N', 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL ZTRSV( 'U', '/', 'N', 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZTRSV( 'U', 'N', '/', 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZTRSV( 'U', 'N', 'N', -1, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL ZTRSV( 'U', 'N', 'N', 2, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL ZTRSV( 'U', 'N', 'N', 0, A, 1, X, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 180\n  100 INFOT = 1\n      CALL ZTBSV( '/', 'N', 'N', 0, 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL ZTBSV( 'U', '/', 'N', 0, 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZTBSV( 'U', 'N', '/', 0, 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZTBSV( 'U', 'N', 'N', -1, 0, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZTBSV( 'U', 'N', 'N', 0, -1, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL ZTBSV( 'U', 'N', 'N', 0, 1, A, 1, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZTBSV( 'U', 'N', 'N', 0, 0, A, 1, X, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 180\n  110 INFOT = 1\n      CALL ZTPSV( '/', 'N', 'N', 0, A, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL ZTPSV( 'U', '/', 'N', 0, A, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZTPSV( 'U', 'N', '/', 0, A, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZTPSV( 'U', 'N', 'N', -1, A, X, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL ZTPSV( 'U', 'N', 'N', 0, A, X, 0 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 180\n  120 INFOT = 1\n      CALL ZGERC( -1, 0, ALPHA, X, 1, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL ZGERC( 0, -1, ALPHA, X, 1, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZGERC( 0, 0, ALPHA, X, 0, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL ZGERC( 0, 0, ALPHA, X, 1, Y, 0, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZGERC( 2, 0, ALPHA, X, 1, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 180\n  130 INFOT = 1\n      CALL ZGERU( -1, 0, ALPHA, X, 1, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL ZGERU( 0, -1, ALPHA, X, 1, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZGERU( 0, 0, ALPHA, X, 0, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL ZGERU( 0, 0, ALPHA, X, 1, Y, 0, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZGERU( 2, 0, ALPHA, X, 1, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 180\n  140 INFOT = 1\n      CALL ZHER( '/', 0, RALPHA, X, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL ZHER( 'U', -1, RALPHA, X, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZHER( 'U', 0, RALPHA, X, 0, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL ZHER( 'U', 2, RALPHA, X, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 180\n  150 INFOT = 1\n      CALL ZHPR( '/', 0, RALPHA, X, 1, A )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL ZHPR( 'U', -1, RALPHA, X, 1, A )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZHPR( 'U', 0, RALPHA, X, 0, A )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 180\n  160 INFOT = 1\n      CALL ZHER2( '/', 0, ALPHA, X, 1, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL ZHER2( 'U', -1, ALPHA, X, 1, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZHER2( 'U', 0, ALPHA, X, 0, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL ZHER2( 'U', 0, ALPHA, X, 1, Y, 0, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZHER2( 'U', 2, ALPHA, X, 1, Y, 1, A, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 180\n  170 INFOT = 1\n      CALL ZHPR2( '/', 0, ALPHA, X, 1, Y, 1, A )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL ZHPR2( 'U', -1, ALPHA, X, 1, Y, 1, A )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZHPR2( 'U', 0, ALPHA, X, 0, Y, 1, A )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL ZHPR2( 'U', 0, ALPHA, X, 1, Y, 0, A )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n*\n  180 IF( OK )THEN\n         WRITE( NOUT, FMT = 9999 )SRNAMT\n      ELSE\n         WRITE( NOUT, FMT = 9998 )SRNAMT\n      END IF\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE TESTS OF ERROR-EXITS' )\n 9998 FORMAT( ' ******* ', A6, ' FAILED THE TESTS OF ERROR-EXITS *****',\n     $      '**' )\n*\n*     End of ZCHKE.\n*\n      END\n      SUBROUTINE ZMAKE( TYPE, UPLO, DIAG, M, N, A, NMAX, AA, LDA, KL,\n     $                  KU, RESET, TRANSL )\n*\n*  Generates values for an M by N matrix A within the bandwidth\n*  defined by KL and KU.\n*  Stores the values in the array AA in the data structure required\n*  by the routine, with unwanted elements set to rogue value.\n*\n*  TYPE is 'GE', 'GB', 'HE', 'HB', 'HP', 'TR', 'TB' OR 'TP'.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Parameters ..\n      COMPLEX*16         ZERO, ONE\n      PARAMETER          ( ZERO = ( 0.0D0, 0.0D0 ),\n     $                   ONE = ( 1.0D0, 0.0D0 ) )\n      COMPLEX*16         ROGUE\n      PARAMETER          ( ROGUE = ( -1.0D10, 1.0D10 ) )\n      DOUBLE PRECISION   RZERO\n      PARAMETER          ( RZERO = 0.0D0 )\n      DOUBLE PRECISION   RROGUE\n      PARAMETER          ( RROGUE = -1.0D10 )\n*     .. Scalar Arguments ..\n      COMPLEX*16         TRANSL\n      INTEGER            KL, KU, LDA, M, N, NMAX\n      LOGICAL            RESET\n      CHARACTER*1        DIAG, UPLO\n      CHARACTER*2        TYPE\n*     .. Array Arguments ..\n      COMPLEX*16         A( NMAX, * ), AA( * )\n*     .. Local Scalars ..\n      INTEGER            I, I1, I2, I3, IBEG, IEND, IOFF, J, JJ, KK\n      LOGICAL            GEN, LOWER, SYM, TRI, UNIT, UPPER\n*     .. External Functions ..\n      COMPLEX*16         ZBEG\n      EXTERNAL           ZBEG\n*     .. Intrinsic Functions ..\n      INTRINSIC          DBLE, DCMPLX, DCONJG, MAX, MIN\n*     .. Executable Statements ..\n      GEN = TYPE( 1: 1 ).EQ.'G'\n      SYM = TYPE( 1: 1 ).EQ.'H'\n      TRI = TYPE( 1: 1 ).EQ.'T'\n      UPPER = ( SYM.OR.TRI ).AND.UPLO.EQ.'U'\n      LOWER = ( SYM.OR.TRI ).AND.UPLO.EQ.'L'\n      UNIT = TRI.AND.DIAG.EQ.'U'\n*\n*     Generate data in array A.\n*\n      DO 20 J = 1, N\n         DO 10 I = 1, M\n            IF( GEN.OR.( UPPER.AND.I.LE.J ).OR.( LOWER.AND.I.GE.J ) )\n     $          THEN\n               IF( ( I.LE.J.AND.J - I.LE.KU ).OR.\n     $             ( I.GE.J.AND.I - J.LE.KL ) )THEN\n                  A( I, J ) = ZBEG( RESET ) + TRANSL\n               ELSE\n                  A( I, J ) = ZERO\n               END IF\n               IF( I.NE.J )THEN\n                  IF( SYM )THEN\n                     A( J, I ) = DCONJG( A( I, J ) )\n                  ELSE IF( TRI )THEN\n                     A( J, I ) = ZERO\n                  END IF\n               END IF\n            END IF\n   10    CONTINUE\n         IF( SYM )\n     $      A( J, J ) = DCMPLX( DBLE( A( J, J ) ), RZERO )\n         IF( TRI )\n     $      A( J, J ) = A( J, J ) + ONE\n         IF( UNIT )\n     $      A( J, J ) = ONE\n   20 CONTINUE\n*\n*     Store elements in array AS in data structure required by routine.\n*\n      IF( TYPE.EQ.'GE' )THEN\n         DO 50 J = 1, N\n            DO 30 I = 1, M\n               AA( I + ( J - 1 )*LDA ) = A( I, J )\n   30       CONTINUE\n            DO 40 I = M + 1, LDA\n               AA( I + ( J - 1 )*LDA ) = ROGUE\n   40       CONTINUE\n   50    CONTINUE\n      ELSE IF( TYPE.EQ.'GB' )THEN\n         DO 90 J = 1, N\n            DO 60 I1 = 1, KU + 1 - J\n               AA( I1 + ( J - 1 )*LDA ) = ROGUE\n   60       CONTINUE\n            DO 70 I2 = I1, MIN( KL + KU + 1, KU + 1 + M - J )\n               AA( I2 + ( J - 1 )*LDA ) = A( I2 + J - KU - 1, J )\n   70       CONTINUE\n            DO 80 I3 = I2, LDA\n               AA( I3 + ( J - 1 )*LDA ) = ROGUE\n   80       CONTINUE\n   90    CONTINUE\n      ELSE IF( TYPE.EQ.'HE'.OR.TYPE.EQ.'TR' )THEN\n         DO 130 J = 1, N\n            IF( UPPER )THEN\n               IBEG = 1\n               IF( UNIT )THEN\n                  IEND = J - 1\n               ELSE\n                  IEND = J\n               END IF\n            ELSE\n               IF( UNIT )THEN\n                  IBEG = J + 1\n               ELSE\n                  IBEG = J\n               END IF\n               IEND = N\n            END IF\n            DO 100 I = 1, IBEG - 1\n               AA( I + ( J - 1 )*LDA ) = ROGUE\n  100       CONTINUE\n            DO 110 I = IBEG, IEND\n               AA( I + ( J - 1 )*LDA ) = A( I, J )\n  110       CONTINUE\n            DO 120 I = IEND + 1, LDA\n               AA( I + ( J - 1 )*LDA ) = ROGUE\n  120       CONTINUE\n            IF( SYM )THEN\n               JJ = J + ( J - 1 )*LDA\n               AA( JJ ) = DCMPLX( DBLE( AA( JJ ) ), RROGUE )\n            END IF\n  130    CONTINUE\n      ELSE IF( TYPE.EQ.'HB'.OR.TYPE.EQ.'TB' )THEN\n         DO 170 J = 1, N\n            IF( UPPER )THEN\n               KK = KL + 1\n               IBEG = MAX( 1, KL + 2 - J )\n               IF( UNIT )THEN\n                  IEND = KL\n               ELSE\n                  IEND = KL + 1\n               END IF\n            ELSE\n               KK = 1\n               IF( UNIT )THEN\n                  IBEG = 2\n               ELSE\n                  IBEG = 1\n               END IF\n               IEND = MIN( KL + 1, 1 + M - J )\n            END IF\n            DO 140 I = 1, IBEG - 1\n               AA( I + ( J - 1 )*LDA ) = ROGUE\n  140       CONTINUE\n            DO 150 I = IBEG, IEND\n               AA( I + ( J - 1 )*LDA ) = A( I + J - KK, J )\n  150       CONTINUE\n            DO 160 I = IEND + 1, LDA\n               AA( I + ( J - 1 )*LDA ) = ROGUE\n  160       CONTINUE\n            IF( SYM )THEN\n               JJ = KK + ( J - 1 )*LDA\n               AA( JJ ) = DCMPLX( DBLE( AA( JJ ) ), RROGUE )\n            END IF\n  170    CONTINUE\n      ELSE IF( TYPE.EQ.'HP'.OR.TYPE.EQ.'TP' )THEN\n         IOFF = 0\n         DO 190 J = 1, N\n            IF( UPPER )THEN\n               IBEG = 1\n               IEND = J\n            ELSE\n               IBEG = J\n               IEND = N\n            END IF\n            DO 180 I = IBEG, IEND\n               IOFF = IOFF + 1\n               AA( IOFF ) = A( I, J )\n               IF( I.EQ.J )THEN\n                  IF( UNIT )\n     $               AA( IOFF ) = ROGUE\n                  IF( SYM )\n     $               AA( IOFF ) = DCMPLX( DBLE( AA( IOFF ) ), RROGUE )\n               END IF\n  180       CONTINUE\n  190    CONTINUE\n      END IF\n      RETURN\n*\n*     End of ZMAKE.\n*\n      END\n      SUBROUTINE ZMVCH( TRANS, M, N, ALPHA, A, NMAX, X, INCX, BETA, Y,\n     $                  INCY, YT, G, YY, EPS, ERR, FATAL, NOUT, MV )\n*\n*  Checks the results of the computational tests.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Parameters ..\n      COMPLEX*16         ZERO\n      PARAMETER          ( ZERO = ( 0.0D0, 0.0D0 ) )\n      DOUBLE PRECISION   RZERO, RONE\n      PARAMETER          ( RZERO = 0.0D0, RONE = 1.0D0 )\n*     .. Scalar Arguments ..\n      COMPLEX*16         ALPHA, BETA\n      DOUBLE PRECISION   EPS, ERR\n      INTEGER            INCX, INCY, M, N, NMAX, NOUT\n      LOGICAL            FATAL, MV\n      CHARACTER*1        TRANS\n*     .. Array Arguments ..\n      COMPLEX*16         A( NMAX, * ), X( * ), Y( * ), YT( * ), YY( * )\n      DOUBLE PRECISION   G( * )\n*     .. Local Scalars ..\n      COMPLEX*16         C\n      DOUBLE PRECISION   ERRI\n      INTEGER            I, INCXL, INCYL, IY, J, JX, KX, KY, ML, NL\n      LOGICAL            CTRAN, TRAN\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, DBLE, DCONJG, DIMAG, MAX, SQRT\n*     .. Statement Functions ..\n      DOUBLE PRECISION   ABS1\n*     .. Statement Function definitions ..\n      ABS1( C ) = ABS( DBLE( C ) ) + ABS( DIMAG( C ) )\n*     .. Executable Statements ..\n      TRAN = TRANS.EQ.'T'\n      CTRAN = TRANS.EQ.'C'\n      IF( TRAN.OR.CTRAN )THEN\n         ML = N\n         NL = M\n      ELSE\n         ML = M\n         NL = N\n      END IF\n      IF( INCX.LT.0 )THEN\n         KX = NL\n         INCXL = -1\n      ELSE\n         KX = 1\n         INCXL = 1\n      END IF\n      IF( INCY.LT.0 )THEN\n         KY = ML\n         INCYL = -1\n      ELSE\n         KY = 1\n         INCYL = 1\n      END IF\n*\n*     Compute expected result in YT using data in A, X and Y.\n*     Compute gauges in G.\n*\n      IY = KY\n      DO 40 I = 1, ML\n         YT( IY ) = ZERO\n         G( IY ) = RZERO\n         JX = KX\n         IF( TRAN )THEN\n            DO 10 J = 1, NL\n               YT( IY ) = YT( IY ) + A( J, I )*X( JX )\n               G( IY ) = G( IY ) + ABS1( A( J, I ) )*ABS1( X( JX ) )\n               JX = JX + INCXL\n   10       CONTINUE\n         ELSE IF( CTRAN )THEN\n            DO 20 J = 1, NL\n               YT( IY ) = YT( IY ) + DCONJG( A( J, I ) )*X( JX )\n               G( IY ) = G( IY ) + ABS1( A( J, I ) )*ABS1( X( JX ) )\n               JX = JX + INCXL\n   20       CONTINUE\n         ELSE\n            DO 30 J = 1, NL\n               YT( IY ) = YT( IY ) + A( I, J )*X( JX )\n               G( IY ) = G( IY ) + ABS1( A( I, J ) )*ABS1( X( JX ) )\n               JX = JX + INCXL\n   30       CONTINUE\n         END IF\n         YT( IY ) = ALPHA*YT( IY ) + BETA*Y( IY )\n         G( IY ) = ABS1( ALPHA )*G( IY ) + ABS1( BETA )*ABS1( Y( IY ) )\n         IY = IY + INCYL\n   40 CONTINUE\n*\n*     Compute the error ratio for this result.\n*\n      ERR = ZERO\n      DO 50 I = 1, ML\n         ERRI = ABS( YT( I ) - YY( 1 + ( I - 1 )*ABS( INCY ) ) )/EPS\n         IF( G( I ).NE.RZERO )\n     $      ERRI = ERRI/G( I )\n         ERR = MAX( ERR, ERRI )\n         IF( ERR*SQRT( EPS ).GE.RONE )\n     $      GO TO 60\n   50 CONTINUE\n*     If the loop completes, all results are at least half accurate.\n      GO TO 80\n*\n*     Report fatal error.\n*\n   60 FATAL = .TRUE.\n      WRITE( NOUT, FMT = 9999 )\n      DO 70 I = 1, ML\n         IF( MV )THEN\n            WRITE( NOUT, FMT = 9998 )I, YT( I ),\n     $         YY( 1 + ( I - 1 )*ABS( INCY ) )\n         ELSE\n            WRITE( NOUT, FMT = 9998 )I,\n     $         YY( 1 + ( I - 1 )*ABS( INCY ) ), YT( I )\n         END IF\n   70 CONTINUE\n*\n   80 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ******* FATAL ERROR - COMPUTED RESULT IS LESS THAN HAL',\n     $      'F ACCURATE *******', /'                       EXPECTED RE',\n     $      'SULT                    COMPUTED RESULT' )\n 9998 FORMAT( 1X, I7, 2( '  (', G15.6, ',', G15.6, ')' ) )\n*\n*     End of ZMVCH.\n*\n      END\n      LOGICAL FUNCTION LZE( RI, RJ, LR )\n*\n*  Tests if two arrays are identical.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Scalar Arguments ..\n      INTEGER            LR\n*     .. Array Arguments ..\n      COMPLEX*16         RI( * ), RJ( * )\n*     .. Local Scalars ..\n      INTEGER            I\n*     .. Executable Statements ..\n      DO 10 I = 1, LR\n         IF( RI( I ).NE.RJ( I ) )\n     $      GO TO 20\n   10 CONTINUE\n      LZE = .TRUE.\n      GO TO 30\n   20 CONTINUE\n      LZE = .FALSE.\n   30 RETURN\n*\n*     End of LZE.\n*\n      END\n      LOGICAL FUNCTION LZERES( TYPE, UPLO, M, N, AA, AS, LDA )\n*\n*  Tests if selected elements in two arrays are equal.\n*\n*  TYPE is 'GE', 'HE' or 'HP'.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Scalar Arguments ..\n      INTEGER            LDA, M, N\n      CHARACTER*1        UPLO\n      CHARACTER*2        TYPE\n*     .. Array Arguments ..\n      COMPLEX*16         AA( LDA, * ), AS( LDA, * )\n*     .. Local Scalars ..\n      INTEGER            I, IBEG, IEND, J\n      LOGICAL            UPPER\n*     .. Executable Statements ..\n      UPPER = UPLO.EQ.'U'\n      IF( TYPE.EQ.'GE' )THEN\n         DO 20 J = 1, N\n            DO 10 I = M + 1, LDA\n               IF( AA( I, J ).NE.AS( I, J ) )\n     $            GO TO 70\n   10       CONTINUE\n   20    CONTINUE\n      ELSE IF( TYPE.EQ.'HE' )THEN\n         DO 50 J = 1, N\n            IF( UPPER )THEN\n               IBEG = 1\n               IEND = J\n            ELSE\n               IBEG = J\n               IEND = N\n            END IF\n            DO 30 I = 1, IBEG - 1\n               IF( AA( I, J ).NE.AS( I, J ) )\n     $            GO TO 70\n   30       CONTINUE\n            DO 40 I = IEND + 1, LDA\n               IF( AA( I, J ).NE.AS( I, J ) )\n     $            GO TO 70\n   40       CONTINUE\n   50    CONTINUE\n      END IF\n*\n      LZERES = .TRUE.\n      GO TO 80\n   70 CONTINUE\n      LZERES = .FALSE.\n   80 RETURN\n*\n*     End of LZERES.\n*\n      END\n      COMPLEX*16 FUNCTION ZBEG( RESET )\n*\n*  Generates complex numbers as pairs of random numbers uniformly\n*  distributed between -0.5 and 0.5.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Scalar Arguments ..\n      LOGICAL            RESET\n*     .. Local Scalars ..\n      INTEGER            I, IC, J, MI, MJ\n*     .. Save statement ..\n      SAVE               I, IC, J, MI, MJ\n*     .. Intrinsic Functions ..\n      INTRINSIC          DCMPLX\n*     .. Executable Statements ..\n      IF( RESET )THEN\n*        Initialize local variables.\n         MI = 891\n         MJ = 457\n         I = 7\n         J = 7\n         IC = 0\n         RESET = .FALSE.\n      END IF\n*\n*     The sequence of values of I or J is bounded between 1 and 999.\n*     If initial I or J = 1,2,3,6,7 or 9, the period will be 50.\n*     If initial I or J = 4 or 8, the period will be 25.\n*     If initial I or J = 5, the period will be 10.\n*     IC is used to break up the period by skipping 1 value of I or J\n*     in 6.\n*\n      IC = IC + 1\n   10 I = I*MI\n      J = J*MJ\n      I = I - 1000*( I/1000 )\n      J = J - 1000*( J/1000 )\n      IF( IC.GE.5 )THEN\n         IC = 0\n         GO TO 10\n      END IF\n      ZBEG = DCMPLX( ( I - 500 )/1001.0D0, ( J - 500 )/1001.0D0 )\n      RETURN\n*\n*     End of ZBEG.\n*\n      END\n      DOUBLE PRECISION FUNCTION DDIFF( X, Y )\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION   X, Y\n*     .. Executable Statements ..\n      DDIFF = X - Y\n      RETURN\n*\n*     End of DDIFF.\n*\n      END\n      SUBROUTINE CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n*\n*  Tests whether XERBLA has detected an error when it should.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Scalar Arguments ..\n      INTEGER            INFOT, NOUT\n      LOGICAL            LERR, OK\n      CHARACTER*6        SRNAMT\n*     .. Executable Statements ..\n      IF( .NOT.LERR )THEN\n         WRITE( NOUT, FMT = 9999 )INFOT, SRNAMT\n         OK = .FALSE.\n      END IF\n      LERR = .FALSE.\n      RETURN\n*\n 9999 FORMAT( ' ***** ILLEGAL VALUE OF PARAMETER NUMBER ', I2, ' NOT D',\n     $      'ETECTED BY ', A6, ' *****' )\n*\n*     End of CHKXER.\n*\n      END\n      SUBROUTINE XERBLA( SRNAME, INFO )\n*\n*  This is a special version of XERBLA to be used only as part of\n*  the test program for testing error exits from the Level 2 BLAS\n*  routines.\n*\n*  XERBLA  is an error handler for the Level 2 BLAS routines.\n*\n*  It is called by the Level 2 BLAS routines if an input parameter is\n*  invalid.\n*\n*  Auxiliary routine for test program for Level 2 Blas.\n*\n*  -- Written on 10-August-1987.\n*     Richard Hanson, Sandia National Labs.\n*     Jeremy Du Croz, NAG Central Office.\n*\n*     .. Scalar Arguments ..\n      INTEGER            INFO\n      CHARACTER*6        SRNAME\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUT\n      LOGICAL            LERR, OK\n      CHARACTER*6        SRNAMT\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUT, OK, LERR\n      COMMON             /SRNAMC/SRNAMT\n*     .. Executable Statements ..\n      LERR = .TRUE.\n      IF( INFO.NE.INFOT )THEN\n         IF( INFOT.NE.0 )THEN\n            WRITE( NOUT, FMT = 9999 )INFO, INFOT\n         ELSE\n            WRITE( NOUT, FMT = 9997 )INFO\n         END IF\n         OK = .FALSE.\n      END IF\n      IF( SRNAME.NE.SRNAMT )THEN\n         WRITE( NOUT, FMT = 9998 )SRNAME, SRNAMT\n         OK = .FALSE.\n      END IF\n      RETURN\n*\n 9999 FORMAT( ' ******* XERBLA WAS CALLED WITH INFO = ', I6, ' INSTEAD',\n     $      ' OF ', I2, ' *******' )\n 9998 FORMAT( ' ******* XERBLA WAS CALLED WITH SRNAME = ', A6, ' INSTE',\n     $      'AD OF ', A6, ' *******' )\n 9997 FORMAT( ' ******* XERBLA WAS CALLED WITH INFO = ', I6,\n     $      ' *******' )\n*\n*     End of XERBLA\n*\n      END\n\n"
  },
  {
    "path": "3rdparty/eigen3/blas/testing/zblat3.f",
    "content": "*> \\brief \\b ZBLAT3\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*  Definition:\n*  ===========\n*\n*       PROGRAM ZBLAT3\n* \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> Test program for the COMPLEX*16       Level 3 Blas.\n*>\n*> The program must be driven by a short data file. The first 14 records\n*> of the file are read using list-directed input, the last 9 records\n*> are read using the format ( A6, L2 ). An annotated example of a data\n*> file can be obtained by deleting the first 3 characters from the\n*> following 23 lines:\n*> 'zblat3.out'      NAME OF SUMMARY OUTPUT FILE\n*> 6                 UNIT NUMBER OF SUMMARY FILE\n*> 'ZBLAT3.SNAP'     NAME OF SNAPSHOT OUTPUT FILE\n*> -1                UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)\n*> F        LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.\n*> F        LOGICAL FLAG, T TO STOP ON FAILURES.\n*> T        LOGICAL FLAG, T TO TEST ERROR EXITS.\n*> 16.0     THRESHOLD VALUE OF TEST RATIO\n*> 6                 NUMBER OF VALUES OF N\n*> 0 1 2 3 5 9       VALUES OF N\n*> 3                 NUMBER OF VALUES OF ALPHA\n*> (0.0,0.0) (1.0,0.0) (0.7,-0.9)       VALUES OF ALPHA\n*> 3                 NUMBER OF VALUES OF BETA\n*> (0.0,0.0) (1.0,0.0) (1.3,-1.1)       VALUES OF BETA\n*> ZGEMM  T PUT F FOR NO TEST. SAME COLUMNS.\n*> ZHEMM  T PUT F FOR NO TEST. SAME COLUMNS.\n*> ZSYMM  T PUT F FOR NO TEST. SAME COLUMNS.\n*> ZTRMM  T PUT F FOR NO TEST. SAME COLUMNS.\n*> ZTRSM  T PUT F FOR NO TEST. SAME COLUMNS.\n*> ZHERK  T PUT F FOR NO TEST. SAME COLUMNS.\n*> ZSYRK  T PUT F FOR NO TEST. SAME COLUMNS.\n*> ZHER2K T PUT F FOR NO TEST. SAME COLUMNS.\n*> ZSYR2K T PUT F FOR NO TEST. SAME COLUMNS.\n*>\n*> \n*> Further Details\n*> ===============\n*>\n*> See:\n*>\n*>    Dongarra J. J., Du Croz J. J., Duff I. S. and Hammarling S.\n*>    A Set of Level 3 Basic Linear Algebra Subprograms.\n*>\n*>    Technical Memorandum No.88 (Revision 1), Mathematics and\n*>    Computer Science Division, Argonne National Laboratory, 9700\n*>    South Cass Avenue, Argonne, Illinois 60439, US.\n*>\n*> -- Written on 8-February-1989.\n*>    Jack Dongarra, Argonne National Laboratory.\n*>    Iain Duff, AERE Harwell.\n*>    Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*>    Sven Hammarling, Numerical Algorithms Group Ltd.\n*>\n*>    10-9-00:  Change STATUS='NEW' to 'UNKNOWN' so that the testers\n*>              can be run multiple times without deleting generated\n*>              output files (susan)\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date April 2012\n*\n*> \\ingroup complex16_blas_testing\n*\n*  =====================================================================\n      PROGRAM ZBLAT3\n*\n*  -- Reference BLAS test routine (version 3.4.1) --\n*  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     April 2012\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      INTEGER            NIN\n      PARAMETER          ( NIN = 5 )\n      INTEGER            NSUBS\n      PARAMETER          ( NSUBS = 9 )\n      COMPLEX*16         ZERO, ONE\n      PARAMETER          ( ZERO = ( 0.0D0, 0.0D0 ),\n     $                   ONE = ( 1.0D0, 0.0D0 ) )\n      DOUBLE PRECISION   RZERO\n      PARAMETER          ( RZERO = 0.0D0 )\n      INTEGER            NMAX\n      PARAMETER          ( NMAX = 65 )\n      INTEGER            NIDMAX, NALMAX, NBEMAX\n      PARAMETER          ( NIDMAX = 9, NALMAX = 7, NBEMAX = 7 )\n*     .. Local Scalars ..\n      DOUBLE PRECISION   EPS, ERR, THRESH\n      INTEGER            I, ISNUM, J, N, NALF, NBET, NIDIM, NOUT, NTRA\n      LOGICAL            FATAL, LTESTT, REWI, SAME, SFATAL, TRACE,\n     $                   TSTERR\n      CHARACTER*1        TRANSA, TRANSB\n      CHARACTER*6        SNAMET\n      CHARACTER*32       SNAPS, SUMMRY\n*     .. Local Arrays ..\n      COMPLEX*16         AA( NMAX*NMAX ), AB( NMAX, 2*NMAX ),\n     $                   ALF( NALMAX ), AS( NMAX*NMAX ),\n     $                   BB( NMAX*NMAX ), BET( NBEMAX ),\n     $                   BS( NMAX*NMAX ), C( NMAX, NMAX ),\n     $                   CC( NMAX*NMAX ), CS( NMAX*NMAX ), CT( NMAX ),\n     $                   W( 2*NMAX )\n      DOUBLE PRECISION   G( NMAX )\n      INTEGER            IDIM( NIDMAX )\n      LOGICAL            LTEST( NSUBS )\n      CHARACTER*6        SNAMES( NSUBS )\n*     .. External Functions ..\n      DOUBLE PRECISION   DDIFF\n      LOGICAL            LZE\n      EXTERNAL           DDIFF, LZE\n*     .. External Subroutines ..\n      EXTERNAL           ZCHK1, ZCHK2, ZCHK3, ZCHK4, ZCHK5, ZCHKE, ZMMCH\n*     .. Intrinsic Functions ..\n      INTRINSIC          MAX, MIN\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n      CHARACTER*6        SRNAMT\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n      COMMON             /SRNAMC/SRNAMT\n*     .. Data statements ..\n      DATA               SNAMES/'ZGEMM ', 'ZHEMM ', 'ZSYMM ', 'ZTRMM ',\n     $                   'ZTRSM ', 'ZHERK ', 'ZSYRK ', 'ZHER2K',\n     $                   'ZSYR2K'/\n*     .. Executable Statements ..\n*\n*     Read name and unit number for summary output file and open file.\n*\n      READ( NIN, FMT = * )SUMMRY\n      READ( NIN, FMT = * )NOUT\n      OPEN( NOUT, FILE = SUMMRY, STATUS = 'UNKNOWN' )\n      NOUTC = NOUT\n*\n*     Read name and unit number for snapshot output file and open file.\n*\n      READ( NIN, FMT = * )SNAPS\n      READ( NIN, FMT = * )NTRA\n      TRACE = NTRA.GE.0\n      IF( TRACE )THEN\n         OPEN( NTRA, FILE = SNAPS, STATUS = 'UNKNOWN' )\n      END IF\n*     Read the flag that directs rewinding of the snapshot file.\n      READ( NIN, FMT = * )REWI\n      REWI = REWI.AND.TRACE\n*     Read the flag that directs stopping on any failure.\n      READ( NIN, FMT = * )SFATAL\n*     Read the flag that indicates whether error exits are to be tested.\n      READ( NIN, FMT = * )TSTERR\n*     Read the threshold value of the test ratio\n      READ( NIN, FMT = * )THRESH\n*\n*     Read and check the parameter values for the tests.\n*\n*     Values of N\n      READ( NIN, FMT = * )NIDIM\n      IF( NIDIM.LT.1.OR.NIDIM.GT.NIDMAX )THEN\n         WRITE( NOUT, FMT = 9997 )'N', NIDMAX\n         GO TO 220\n      END IF\n      READ( NIN, FMT = * )( IDIM( I ), I = 1, NIDIM )\n      DO 10 I = 1, NIDIM\n         IF( IDIM( I ).LT.0.OR.IDIM( I ).GT.NMAX )THEN\n            WRITE( NOUT, FMT = 9996 )NMAX\n            GO TO 220\n         END IF\n   10 CONTINUE\n*     Values of ALPHA\n      READ( NIN, FMT = * )NALF\n      IF( NALF.LT.1.OR.NALF.GT.NALMAX )THEN\n         WRITE( NOUT, FMT = 9997 )'ALPHA', NALMAX\n         GO TO 220\n      END IF\n      READ( NIN, FMT = * )( ALF( I ), I = 1, NALF )\n*     Values of BETA\n      READ( NIN, FMT = * )NBET\n      IF( NBET.LT.1.OR.NBET.GT.NBEMAX )THEN\n         WRITE( NOUT, FMT = 9997 )'BETA', NBEMAX\n         GO TO 220\n      END IF\n      READ( NIN, FMT = * )( BET( I ), I = 1, NBET )\n*\n*     Report values of parameters.\n*\n      WRITE( NOUT, FMT = 9995 )\n      WRITE( NOUT, FMT = 9994 )( IDIM( I ), I = 1, NIDIM )\n      WRITE( NOUT, FMT = 9993 )( ALF( I ), I = 1, NALF )\n      WRITE( NOUT, FMT = 9992 )( BET( I ), I = 1, NBET )\n      IF( .NOT.TSTERR )THEN\n         WRITE( NOUT, FMT = * )\n         WRITE( NOUT, FMT = 9984 )\n      END IF\n      WRITE( NOUT, FMT = * )\n      WRITE( NOUT, FMT = 9999 )THRESH\n      WRITE( NOUT, FMT = * )\n*\n*     Read names of subroutines and flags which indicate\n*     whether they are to be tested.\n*\n      DO 20 I = 1, NSUBS\n         LTEST( I ) = .FALSE.\n   20 CONTINUE\n   30 READ( NIN, FMT = 9988, END = 60 )SNAMET, LTESTT\n      DO 40 I = 1, NSUBS\n         IF( SNAMET.EQ.SNAMES( I ) )\n     $      GO TO 50\n   40 CONTINUE\n      WRITE( NOUT, FMT = 9990 )SNAMET\n      STOP\n   50 LTEST( I ) = LTESTT\n      GO TO 30\n*\n   60 CONTINUE\n      CLOSE ( NIN )\n*\n*     Compute EPS (the machine precision).\n*\n      EPS = EPSILON(RZERO)\n      WRITE( NOUT, FMT = 9998 )EPS\n*\n*     Check the reliability of ZMMCH using exact data.\n*\n      N = MIN( 32, NMAX )\n      DO 100 J = 1, N\n         DO 90 I = 1, N\n            AB( I, J ) = MAX( I - J + 1, 0 )\n   90    CONTINUE\n         AB( J, NMAX + 1 ) = J\n         AB( 1, NMAX + J ) = J\n         C( J, 1 ) = ZERO\n  100 CONTINUE\n      DO 110 J = 1, N\n         CC( J ) = J*( ( J + 1 )*J )/2 - ( ( J + 1 )*J*( J - 1 ) )/3\n  110 CONTINUE\n*     CC holds the exact result. On exit from ZMMCH CT holds\n*     the result computed by ZMMCH.\n      TRANSA = 'N'\n      TRANSB = 'N'\n      CALL ZMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,\n     $            AB( 1, NMAX + 1 ), NMAX, ZERO, C, NMAX, CT, G, CC,\n     $            NMAX, EPS, ERR, FATAL, NOUT, .TRUE. )\n      SAME = LZE( CC, CT, N )\n      IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN\n         WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR\n         STOP\n      END IF\n      TRANSB = 'C'\n      CALL ZMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,\n     $            AB( 1, NMAX + 1 ), NMAX, ZERO, C, NMAX, CT, G, CC,\n     $            NMAX, EPS, ERR, FATAL, NOUT, .TRUE. )\n      SAME = LZE( CC, CT, N )\n      IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN\n         WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR\n         STOP\n      END IF\n      DO 120 J = 1, N\n         AB( J, NMAX + 1 ) = N - J + 1\n         AB( 1, NMAX + J ) = N - J + 1\n  120 CONTINUE\n      DO 130 J = 1, N\n         CC( N - J + 1 ) = J*( ( J + 1 )*J )/2 -\n     $                     ( ( J + 1 )*J*( J - 1 ) )/3\n  130 CONTINUE\n      TRANSA = 'C'\n      TRANSB = 'N'\n      CALL ZMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,\n     $            AB( 1, NMAX + 1 ), NMAX, ZERO, C, NMAX, CT, G, CC,\n     $            NMAX, EPS, ERR, FATAL, NOUT, .TRUE. )\n      SAME = LZE( CC, CT, N )\n      IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN\n         WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR\n         STOP\n      END IF\n      TRANSB = 'C'\n      CALL ZMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX,\n     $            AB( 1, NMAX + 1 ), NMAX, ZERO, C, NMAX, CT, G, CC,\n     $            NMAX, EPS, ERR, FATAL, NOUT, .TRUE. )\n      SAME = LZE( CC, CT, N )\n      IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN\n         WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR\n         STOP\n      END IF\n*\n*     Test each subroutine in turn.\n*\n      DO 200 ISNUM = 1, NSUBS\n         WRITE( NOUT, FMT = * )\n         IF( .NOT.LTEST( ISNUM ) )THEN\n*           Subprogram is not to be tested.\n            WRITE( NOUT, FMT = 9987 )SNAMES( ISNUM )\n         ELSE\n            SRNAMT = SNAMES( ISNUM )\n*           Test error exits.\n            IF( TSTERR )THEN\n               CALL ZCHKE( ISNUM, SNAMES( ISNUM ), NOUT )\n               WRITE( NOUT, FMT = * )\n            END IF\n*           Test computations.\n            INFOT = 0\n            OK = .TRUE.\n            FATAL = .FALSE.\n            GO TO ( 140, 150, 150, 160, 160, 170, 170,\n     $              180, 180 )ISNUM\n*           Test ZGEMM, 01.\n  140       CALL ZCHK1( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET,\n     $                  NMAX, AB, AA, AS, AB( 1, NMAX + 1 ), BB, BS, C,\n     $                  CC, CS, CT, G )\n            GO TO 190\n*           Test ZHEMM, 02, ZSYMM, 03.\n  150       CALL ZCHK2( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET,\n     $                  NMAX, AB, AA, AS, AB( 1, NMAX + 1 ), BB, BS, C,\n     $                  CC, CS, CT, G )\n            GO TO 190\n*           Test ZTRMM, 04, ZTRSM, 05.\n  160       CALL ZCHK3( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NALF, ALF, NMAX, AB,\n     $                  AA, AS, AB( 1, NMAX + 1 ), BB, BS, CT, G, C )\n            GO TO 190\n*           Test ZHERK, 06, ZSYRK, 07.\n  170       CALL ZCHK4( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET,\n     $                  NMAX, AB, AA, AS, AB( 1, NMAX + 1 ), BB, BS, C,\n     $                  CC, CS, CT, G )\n            GO TO 190\n*           Test ZHER2K, 08, ZSYR2K, 09.\n  180       CALL ZCHK5( SNAMES( ISNUM ), EPS, THRESH, NOUT, NTRA, TRACE,\n     $                  REWI, FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET,\n     $                  NMAX, AB, AA, AS, BB, BS, C, CC, CS, CT, G, W )\n            GO TO 190\n*\n  190       IF( FATAL.AND.SFATAL )\n     $         GO TO 210\n         END IF\n  200 CONTINUE\n      WRITE( NOUT, FMT = 9986 )\n      GO TO 230\n*\n  210 CONTINUE\n      WRITE( NOUT, FMT = 9985 )\n      GO TO 230\n*\n  220 CONTINUE\n      WRITE( NOUT, FMT = 9991 )\n*\n  230 CONTINUE\n      IF( TRACE )\n     $   CLOSE ( NTRA )\n      CLOSE ( NOUT )\n      STOP\n*\n 9999 FORMAT( ' ROUTINES PASS COMPUTATIONAL TESTS IF TEST RATIO IS LES',\n     $      'S THAN', F8.2 )\n 9998 FORMAT( ' RELATIVE MACHINE PRECISION IS TAKEN TO BE', 1P, D9.1 )\n 9997 FORMAT( ' NUMBER OF VALUES OF ', A, ' IS LESS THAN 1 OR GREATER ',\n     $      'THAN ', I2 )\n 9996 FORMAT( ' VALUE OF N IS LESS THAN 0 OR GREATER THAN ', I2 )\n 9995 FORMAT( ' TESTS OF THE COMPLEX*16       LEVEL 3 BLAS', //' THE F',\n     $      'OLLOWING PARAMETER VALUES WILL BE USED:' )\n 9994 FORMAT( '   FOR N              ', 9I6 )\n 9993 FORMAT( '   FOR ALPHA          ',\n     $      7( '(', F4.1, ',', F4.1, ')  ', : ) )\n 9992 FORMAT( '   FOR BETA           ',\n     $      7( '(', F4.1, ',', F4.1, ')  ', : ) )\n 9991 FORMAT( ' AMEND DATA FILE OR INCREASE ARRAY SIZES IN PROGRAM',\n     $      /' ******* TESTS ABANDONED *******' )\n 9990 FORMAT( ' SUBPROGRAM NAME ', A6, ' NOT RECOGNIZED', /' ******* T',\n     $      'ESTS ABANDONED *******' )\n 9989 FORMAT( ' ERROR IN ZMMCH -  IN-LINE DOT PRODUCTS ARE BEING EVALU',\n     $      'ATED WRONGLY.', /' ZMMCH WAS CALLED WITH TRANSA = ', A1,\n     $      ' AND TRANSB = ', A1, /' AND RETURNED SAME = ', L1, ' AND ',\n     $      'ERR = ', F12.3, '.', /' THIS MAY BE DUE TO FAULTS IN THE ',\n     $      'ARITHMETIC OR THE COMPILER.', /' ******* TESTS ABANDONED ',\n     $      '*******' )\n 9988 FORMAT( A6, L2 )\n 9987 FORMAT( 1X, A6, ' WAS NOT TESTED' )\n 9986 FORMAT( /' END OF TESTS' )\n 9985 FORMAT( /' ******* FATAL ERROR - TESTS ABANDONED *******' )\n 9984 FORMAT( ' ERROR-EXITS WILL NOT BE TESTED' )\n*\n*     End of ZBLAT3.\n*\n      END\n      SUBROUTINE ZCHK1( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET, NMAX,\n     $                  A, AA, AS, B, BB, BS, C, CC, CS, CT, G )\n*\n*  Tests ZGEMM.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Parameters ..\n      COMPLEX*16         ZERO\n      PARAMETER          ( ZERO = ( 0.0D0, 0.0D0 ) )\n      DOUBLE PRECISION   RZERO\n      PARAMETER          ( RZERO = 0.0D0 )\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION   EPS, THRESH\n      INTEGER            NALF, NBET, NIDIM, NMAX, NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      COMPLEX*16         A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),\n     $                   AS( NMAX*NMAX ), B( NMAX, NMAX ),\n     $                   BB( NMAX*NMAX ), BET( NBET ), BS( NMAX*NMAX ),\n     $                   C( NMAX, NMAX ), CC( NMAX*NMAX ),\n     $                   CS( NMAX*NMAX ), CT( NMAX )\n      DOUBLE PRECISION   G( NMAX )\n      INTEGER            IDIM( NIDIM )\n*     .. Local Scalars ..\n      COMPLEX*16         ALPHA, ALS, BETA, BLS\n      DOUBLE PRECISION   ERR, ERRMAX\n      INTEGER            I, IA, IB, ICA, ICB, IK, IM, IN, K, KS, LAA,\n     $                   LBB, LCC, LDA, LDAS, LDB, LDBS, LDC, LDCS, M,\n     $                   MA, MB, MS, N, NA, NARGS, NB, NC, NS\n      LOGICAL            NULL, RESET, SAME, TRANA, TRANB\n      CHARACTER*1        TRANAS, TRANBS, TRANSA, TRANSB\n      CHARACTER*3        ICH\n*     .. Local Arrays ..\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LZE, LZERES\n      EXTERNAL           LZE, LZERES\n*     .. External Subroutines ..\n      EXTERNAL           ZGEMM, ZMAKE, ZMMCH\n*     .. Intrinsic Functions ..\n      INTRINSIC          MAX\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICH/'NTC'/\n*     .. Executable Statements ..\n*\n      NARGS = 13\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = RZERO\n*\n      DO 110 IM = 1, NIDIM\n         M = IDIM( IM )\n*\n         DO 100 IN = 1, NIDIM\n            N = IDIM( IN )\n*           Set LDC to 1 more than minimum value if room.\n            LDC = M\n            IF( LDC.LT.NMAX )\n     $         LDC = LDC + 1\n*           Skip tests if not enough room.\n            IF( LDC.GT.NMAX )\n     $         GO TO 100\n            LCC = LDC*N\n            NULL = N.LE.0.OR.M.LE.0\n*\n            DO 90 IK = 1, NIDIM\n               K = IDIM( IK )\n*\n               DO 80 ICA = 1, 3\n                  TRANSA = ICH( ICA: ICA )\n                  TRANA = TRANSA.EQ.'T'.OR.TRANSA.EQ.'C'\n*\n                  IF( TRANA )THEN\n                     MA = K\n                     NA = M\n                  ELSE\n                     MA = M\n                     NA = K\n                  END IF\n*                 Set LDA to 1 more than minimum value if room.\n                  LDA = MA\n                  IF( LDA.LT.NMAX )\n     $               LDA = LDA + 1\n*                 Skip tests if not enough room.\n                  IF( LDA.GT.NMAX )\n     $               GO TO 80\n                  LAA = LDA*NA\n*\n*                 Generate the matrix A.\n*\n                  CALL ZMAKE( 'GE', ' ', ' ', MA, NA, A, NMAX, AA, LDA,\n     $                        RESET, ZERO )\n*\n                  DO 70 ICB = 1, 3\n                     TRANSB = ICH( ICB: ICB )\n                     TRANB = TRANSB.EQ.'T'.OR.TRANSB.EQ.'C'\n*\n                     IF( TRANB )THEN\n                        MB = N\n                        NB = K\n                     ELSE\n                        MB = K\n                        NB = N\n                     END IF\n*                    Set LDB to 1 more than minimum value if room.\n                     LDB = MB\n                     IF( LDB.LT.NMAX )\n     $                  LDB = LDB + 1\n*                    Skip tests if not enough room.\n                     IF( LDB.GT.NMAX )\n     $                  GO TO 70\n                     LBB = LDB*NB\n*\n*                    Generate the matrix B.\n*\n                     CALL ZMAKE( 'GE', ' ', ' ', MB, NB, B, NMAX, BB,\n     $                           LDB, RESET, ZERO )\n*\n                     DO 60 IA = 1, NALF\n                        ALPHA = ALF( IA )\n*\n                        DO 50 IB = 1, NBET\n                           BETA = BET( IB )\n*\n*                          Generate the matrix C.\n*\n                           CALL ZMAKE( 'GE', ' ', ' ', M, N, C, NMAX,\n     $                                 CC, LDC, RESET, ZERO )\n*\n                           NC = NC + 1\n*\n*                          Save every datum before calling the\n*                          subroutine.\n*\n                           TRANAS = TRANSA\n                           TRANBS = TRANSB\n                           MS = M\n                           NS = N\n                           KS = K\n                           ALS = ALPHA\n                           DO 10 I = 1, LAA\n                              AS( I ) = AA( I )\n   10                      CONTINUE\n                           LDAS = LDA\n                           DO 20 I = 1, LBB\n                              BS( I ) = BB( I )\n   20                      CONTINUE\n                           LDBS = LDB\n                           BLS = BETA\n                           DO 30 I = 1, LCC\n                              CS( I ) = CC( I )\n   30                      CONTINUE\n                           LDCS = LDC\n*\n*                          Call the subroutine.\n*\n                           IF( TRACE )\n     $                        WRITE( NTRA, FMT = 9995 )NC, SNAME,\n     $                        TRANSA, TRANSB, M, N, K, ALPHA, LDA, LDB,\n     $                        BETA, LDC\n                           IF( REWI )\n     $                        REWIND NTRA\n                           CALL ZGEMM( TRANSA, TRANSB, M, N, K, ALPHA,\n     $                                 AA, LDA, BB, LDB, BETA, CC, LDC )\n*\n*                          Check if error-exit was taken incorrectly.\n*\n                           IF( .NOT.OK )THEN\n                              WRITE( NOUT, FMT = 9994 )\n                              FATAL = .TRUE.\n                              GO TO 120\n                           END IF\n*\n*                          See what data changed inside subroutines.\n*\n                           ISAME( 1 ) = TRANSA.EQ.TRANAS\n                           ISAME( 2 ) = TRANSB.EQ.TRANBS\n                           ISAME( 3 ) = MS.EQ.M\n                           ISAME( 4 ) = NS.EQ.N\n                           ISAME( 5 ) = KS.EQ.K\n                           ISAME( 6 ) = ALS.EQ.ALPHA\n                           ISAME( 7 ) = LZE( AS, AA, LAA )\n                           ISAME( 8 ) = LDAS.EQ.LDA\n                           ISAME( 9 ) = LZE( BS, BB, LBB )\n                           ISAME( 10 ) = LDBS.EQ.LDB\n                           ISAME( 11 ) = BLS.EQ.BETA\n                           IF( NULL )THEN\n                              ISAME( 12 ) = LZE( CS, CC, LCC )\n                           ELSE\n                              ISAME( 12 ) = LZERES( 'GE', ' ', M, N, CS,\n     $                                      CC, LDC )\n                           END IF\n                           ISAME( 13 ) = LDCS.EQ.LDC\n*\n*                          If data was incorrectly changed, report\n*                          and return.\n*\n                           SAME = .TRUE.\n                           DO 40 I = 1, NARGS\n                              SAME = SAME.AND.ISAME( I )\n                              IF( .NOT.ISAME( I ) )\n     $                           WRITE( NOUT, FMT = 9998 )I\n   40                      CONTINUE\n                           IF( .NOT.SAME )THEN\n                              FATAL = .TRUE.\n                              GO TO 120\n                           END IF\n*\n                           IF( .NOT.NULL )THEN\n*\n*                             Check the result.\n*\n                              CALL ZMMCH( TRANSA, TRANSB, M, N, K,\n     $                                    ALPHA, A, NMAX, B, NMAX, BETA,\n     $                                    C, NMAX, CT, G, CC, LDC, EPS,\n     $                                    ERR, FATAL, NOUT, .TRUE. )\n                              ERRMAX = MAX( ERRMAX, ERR )\n*                             If got really bad answer, report and\n*                             return.\n                              IF( FATAL )\n     $                           GO TO 120\n                           END IF\n*\n   50                   CONTINUE\n*\n   60                CONTINUE\n*\n   70             CONTINUE\n*\n   80          CONTINUE\n*\n   90       CONTINUE\n*\n  100    CONTINUE\n*\n  110 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 130\n*\n  120 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      WRITE( NOUT, FMT = 9995 )NC, SNAME, TRANSA, TRANSB, M, N, K,\n     $   ALPHA, LDA, LDB, BETA, LDC\n*\n  130 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( 1X, I6, ': ', A6, '(''', A1, ''',''', A1, ''',',\n     $      3( I3, ',' ), '(', F4.1, ',', F4.1, '), A,', I3, ', B,', I3,\n     $      ',(', F4.1, ',', F4.1, '), C,', I3, ').' )\n 9994 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of ZCHK1.\n*\n      END\n      SUBROUTINE ZCHK2( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET, NMAX,\n     $                  A, AA, AS, B, BB, BS, C, CC, CS, CT, G )\n*\n*  Tests ZHEMM and ZSYMM.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Parameters ..\n      COMPLEX*16         ZERO\n      PARAMETER          ( ZERO = ( 0.0D0, 0.0D0 ) )\n      DOUBLE PRECISION   RZERO\n      PARAMETER          ( RZERO = 0.0D0 )\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION   EPS, THRESH\n      INTEGER            NALF, NBET, NIDIM, NMAX, NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      COMPLEX*16         A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),\n     $                   AS( NMAX*NMAX ), B( NMAX, NMAX ),\n     $                   BB( NMAX*NMAX ), BET( NBET ), BS( NMAX*NMAX ),\n     $                   C( NMAX, NMAX ), CC( NMAX*NMAX ),\n     $                   CS( NMAX*NMAX ), CT( NMAX )\n      DOUBLE PRECISION   G( NMAX )\n      INTEGER            IDIM( NIDIM )\n*     .. Local Scalars ..\n      COMPLEX*16         ALPHA, ALS, BETA, BLS\n      DOUBLE PRECISION   ERR, ERRMAX\n      INTEGER            I, IA, IB, ICS, ICU, IM, IN, LAA, LBB, LCC,\n     $                   LDA, LDAS, LDB, LDBS, LDC, LDCS, M, MS, N, NA,\n     $                   NARGS, NC, NS\n      LOGICAL            CONJ, LEFT, NULL, RESET, SAME\n      CHARACTER*1        SIDE, SIDES, UPLO, UPLOS\n      CHARACTER*2        ICHS, ICHU\n*     .. Local Arrays ..\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LZE, LZERES\n      EXTERNAL           LZE, LZERES\n*     .. External Subroutines ..\n      EXTERNAL           ZHEMM, ZMAKE, ZMMCH, ZSYMM\n*     .. Intrinsic Functions ..\n      INTRINSIC          MAX\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICHS/'LR'/, ICHU/'UL'/\n*     .. Executable Statements ..\n      CONJ = SNAME( 2: 3 ).EQ.'HE'\n*\n      NARGS = 12\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = RZERO\n*\n      DO 100 IM = 1, NIDIM\n         M = IDIM( IM )\n*\n         DO 90 IN = 1, NIDIM\n            N = IDIM( IN )\n*           Set LDC to 1 more than minimum value if room.\n            LDC = M\n            IF( LDC.LT.NMAX )\n     $         LDC = LDC + 1\n*           Skip tests if not enough room.\n            IF( LDC.GT.NMAX )\n     $         GO TO 90\n            LCC = LDC*N\n            NULL = N.LE.0.OR.M.LE.0\n*           Set LDB to 1 more than minimum value if room.\n            LDB = M\n            IF( LDB.LT.NMAX )\n     $         LDB = LDB + 1\n*           Skip tests if not enough room.\n            IF( LDB.GT.NMAX )\n     $         GO TO 90\n            LBB = LDB*N\n*\n*           Generate the matrix B.\n*\n            CALL ZMAKE( 'GE', ' ', ' ', M, N, B, NMAX, BB, LDB, RESET,\n     $                  ZERO )\n*\n            DO 80 ICS = 1, 2\n               SIDE = ICHS( ICS: ICS )\n               LEFT = SIDE.EQ.'L'\n*\n               IF( LEFT )THEN\n                  NA = M\n               ELSE\n                  NA = N\n               END IF\n*              Set LDA to 1 more than minimum value if room.\n               LDA = NA\n               IF( LDA.LT.NMAX )\n     $            LDA = LDA + 1\n*              Skip tests if not enough room.\n               IF( LDA.GT.NMAX )\n     $            GO TO 80\n               LAA = LDA*NA\n*\n               DO 70 ICU = 1, 2\n                  UPLO = ICHU( ICU: ICU )\n*\n*                 Generate the hermitian or symmetric matrix A.\n*\n                  CALL ZMAKE( SNAME( 2: 3 ), UPLO, ' ', NA, NA, A, NMAX,\n     $                        AA, LDA, RESET, ZERO )\n*\n                  DO 60 IA = 1, NALF\n                     ALPHA = ALF( IA )\n*\n                     DO 50 IB = 1, NBET\n                        BETA = BET( IB )\n*\n*                       Generate the matrix C.\n*\n                        CALL ZMAKE( 'GE', ' ', ' ', M, N, C, NMAX, CC,\n     $                              LDC, RESET, ZERO )\n*\n                        NC = NC + 1\n*\n*                       Save every datum before calling the\n*                       subroutine.\n*\n                        SIDES = SIDE\n                        UPLOS = UPLO\n                        MS = M\n                        NS = N\n                        ALS = ALPHA\n                        DO 10 I = 1, LAA\n                           AS( I ) = AA( I )\n   10                   CONTINUE\n                        LDAS = LDA\n                        DO 20 I = 1, LBB\n                           BS( I ) = BB( I )\n   20                   CONTINUE\n                        LDBS = LDB\n                        BLS = BETA\n                        DO 30 I = 1, LCC\n                           CS( I ) = CC( I )\n   30                   CONTINUE\n                        LDCS = LDC\n*\n*                       Call the subroutine.\n*\n                        IF( TRACE )\n     $                     WRITE( NTRA, FMT = 9995 )NC, SNAME, SIDE,\n     $                     UPLO, M, N, ALPHA, LDA, LDB, BETA, LDC\n                        IF( REWI )\n     $                     REWIND NTRA\n                        IF( CONJ )THEN\n                           CALL ZHEMM( SIDE, UPLO, M, N, ALPHA, AA, LDA,\n     $                                 BB, LDB, BETA, CC, LDC )\n                        ELSE\n                           CALL ZSYMM( SIDE, UPLO, M, N, ALPHA, AA, LDA,\n     $                                 BB, LDB, BETA, CC, LDC )\n                        END IF\n*\n*                       Check if error-exit was taken incorrectly.\n*\n                        IF( .NOT.OK )THEN\n                           WRITE( NOUT, FMT = 9994 )\n                           FATAL = .TRUE.\n                           GO TO 110\n                        END IF\n*\n*                       See what data changed inside subroutines.\n*\n                        ISAME( 1 ) = SIDES.EQ.SIDE\n                        ISAME( 2 ) = UPLOS.EQ.UPLO\n                        ISAME( 3 ) = MS.EQ.M\n                        ISAME( 4 ) = NS.EQ.N\n                        ISAME( 5 ) = ALS.EQ.ALPHA\n                        ISAME( 6 ) = LZE( AS, AA, LAA )\n                        ISAME( 7 ) = LDAS.EQ.LDA\n                        ISAME( 8 ) = LZE( BS, BB, LBB )\n                        ISAME( 9 ) = LDBS.EQ.LDB\n                        ISAME( 10 ) = BLS.EQ.BETA\n                        IF( NULL )THEN\n                           ISAME( 11 ) = LZE( CS, CC, LCC )\n                        ELSE\n                           ISAME( 11 ) = LZERES( 'GE', ' ', M, N, CS,\n     $                                   CC, LDC )\n                        END IF\n                        ISAME( 12 ) = LDCS.EQ.LDC\n*\n*                       If data was incorrectly changed, report and\n*                       return.\n*\n                        SAME = .TRUE.\n                        DO 40 I = 1, NARGS\n                           SAME = SAME.AND.ISAME( I )\n                           IF( .NOT.ISAME( I ) )\n     $                        WRITE( NOUT, FMT = 9998 )I\n   40                   CONTINUE\n                        IF( .NOT.SAME )THEN\n                           FATAL = .TRUE.\n                           GO TO 110\n                        END IF\n*\n                        IF( .NOT.NULL )THEN\n*\n*                          Check the result.\n*\n                           IF( LEFT )THEN\n                              CALL ZMMCH( 'N', 'N', M, N, M, ALPHA, A,\n     $                                    NMAX, B, NMAX, BETA, C, NMAX,\n     $                                    CT, G, CC, LDC, EPS, ERR,\n     $                                    FATAL, NOUT, .TRUE. )\n                           ELSE\n                              CALL ZMMCH( 'N', 'N', M, N, N, ALPHA, B,\n     $                                    NMAX, A, NMAX, BETA, C, NMAX,\n     $                                    CT, G, CC, LDC, EPS, ERR,\n     $                                    FATAL, NOUT, .TRUE. )\n                           END IF\n                           ERRMAX = MAX( ERRMAX, ERR )\n*                          If got really bad answer, report and\n*                          return.\n                           IF( FATAL )\n     $                        GO TO 110\n                        END IF\n*\n   50                CONTINUE\n*\n   60             CONTINUE\n*\n   70          CONTINUE\n*\n   80       CONTINUE\n*\n   90    CONTINUE\n*\n  100 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 120\n*\n  110 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      WRITE( NOUT, FMT = 9995 )NC, SNAME, SIDE, UPLO, M, N, ALPHA, LDA,\n     $   LDB, BETA, LDC\n*\n  120 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( 1X, I6, ': ', A6, '(', 2( '''', A1, ''',' ), 2( I3, ',' ),\n     $      '(', F4.1, ',', F4.1, '), A,', I3, ', B,', I3, ',(', F4.1,\n     $      ',', F4.1, '), C,', I3, ')    .' )\n 9994 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of ZCHK2.\n*\n      END\n      SUBROUTINE ZCHK3( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NALF, ALF, NMAX, A, AA, AS,\n     $                  B, BB, BS, CT, G, C )\n*\n*  Tests ZTRMM and ZTRSM.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Parameters ..\n      COMPLEX*16         ZERO, ONE\n      PARAMETER          ( ZERO = ( 0.0D0, 0.0D0 ),\n     $                   ONE = ( 1.0D0, 0.0D0 ) )\n      DOUBLE PRECISION   RZERO\n      PARAMETER          ( RZERO = 0.0D0 )\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION   EPS, THRESH\n      INTEGER            NALF, NIDIM, NMAX, NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      COMPLEX*16         A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),\n     $                   AS( NMAX*NMAX ), B( NMAX, NMAX ),\n     $                   BB( NMAX*NMAX ), BS( NMAX*NMAX ),\n     $                   C( NMAX, NMAX ), CT( NMAX )\n      DOUBLE PRECISION   G( NMAX )\n      INTEGER            IDIM( NIDIM )\n*     .. Local Scalars ..\n      COMPLEX*16         ALPHA, ALS\n      DOUBLE PRECISION   ERR, ERRMAX\n      INTEGER            I, IA, ICD, ICS, ICT, ICU, IM, IN, J, LAA, LBB,\n     $                   LDA, LDAS, LDB, LDBS, M, MS, N, NA, NARGS, NC,\n     $                   NS\n      LOGICAL            LEFT, NULL, RESET, SAME\n      CHARACTER*1        DIAG, DIAGS, SIDE, SIDES, TRANAS, TRANSA, UPLO,\n     $                   UPLOS\n      CHARACTER*2        ICHD, ICHS, ICHU\n      CHARACTER*3        ICHT\n*     .. Local Arrays ..\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LZE, LZERES\n      EXTERNAL           LZE, LZERES\n*     .. External Subroutines ..\n      EXTERNAL           ZMAKE, ZMMCH, ZTRMM, ZTRSM\n*     .. Intrinsic Functions ..\n      INTRINSIC          MAX\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICHU/'UL'/, ICHT/'NTC'/, ICHD/'UN'/, ICHS/'LR'/\n*     .. Executable Statements ..\n*\n      NARGS = 11\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = RZERO\n*     Set up zero matrix for ZMMCH.\n      DO 20 J = 1, NMAX\n         DO 10 I = 1, NMAX\n            C( I, J ) = ZERO\n   10    CONTINUE\n   20 CONTINUE\n*\n      DO 140 IM = 1, NIDIM\n         M = IDIM( IM )\n*\n         DO 130 IN = 1, NIDIM\n            N = IDIM( IN )\n*           Set LDB to 1 more than minimum value if room.\n            LDB = M\n            IF( LDB.LT.NMAX )\n     $         LDB = LDB + 1\n*           Skip tests if not enough room.\n            IF( LDB.GT.NMAX )\n     $         GO TO 130\n            LBB = LDB*N\n            NULL = M.LE.0.OR.N.LE.0\n*\n            DO 120 ICS = 1, 2\n               SIDE = ICHS( ICS: ICS )\n               LEFT = SIDE.EQ.'L'\n               IF( LEFT )THEN\n                  NA = M\n               ELSE\n                  NA = N\n               END IF\n*              Set LDA to 1 more than minimum value if room.\n               LDA = NA\n               IF( LDA.LT.NMAX )\n     $            LDA = LDA + 1\n*              Skip tests if not enough room.\n               IF( LDA.GT.NMAX )\n     $            GO TO 130\n               LAA = LDA*NA\n*\n               DO 110 ICU = 1, 2\n                  UPLO = ICHU( ICU: ICU )\n*\n                  DO 100 ICT = 1, 3\n                     TRANSA = ICHT( ICT: ICT )\n*\n                     DO 90 ICD = 1, 2\n                        DIAG = ICHD( ICD: ICD )\n*\n                        DO 80 IA = 1, NALF\n                           ALPHA = ALF( IA )\n*\n*                          Generate the matrix A.\n*\n                           CALL ZMAKE( 'TR', UPLO, DIAG, NA, NA, A,\n     $                                 NMAX, AA, LDA, RESET, ZERO )\n*\n*                          Generate the matrix B.\n*\n                           CALL ZMAKE( 'GE', ' ', ' ', M, N, B, NMAX,\n     $                                 BB, LDB, RESET, ZERO )\n*\n                           NC = NC + 1\n*\n*                          Save every datum before calling the\n*                          subroutine.\n*\n                           SIDES = SIDE\n                           UPLOS = UPLO\n                           TRANAS = TRANSA\n                           DIAGS = DIAG\n                           MS = M\n                           NS = N\n                           ALS = ALPHA\n                           DO 30 I = 1, LAA\n                              AS( I ) = AA( I )\n   30                      CONTINUE\n                           LDAS = LDA\n                           DO 40 I = 1, LBB\n                              BS( I ) = BB( I )\n   40                      CONTINUE\n                           LDBS = LDB\n*\n*                          Call the subroutine.\n*\n                           IF( SNAME( 4: 5 ).EQ.'MM' )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9995 )NC, SNAME,\n     $                           SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA,\n     $                           LDA, LDB\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL ZTRMM( SIDE, UPLO, TRANSA, DIAG, M,\n     $                                    N, ALPHA, AA, LDA, BB, LDB )\n                           ELSE IF( SNAME( 4: 5 ).EQ.'SM' )THEN\n                              IF( TRACE )\n     $                           WRITE( NTRA, FMT = 9995 )NC, SNAME,\n     $                           SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA,\n     $                           LDA, LDB\n                              IF( REWI )\n     $                           REWIND NTRA\n                              CALL ZTRSM( SIDE, UPLO, TRANSA, DIAG, M,\n     $                                    N, ALPHA, AA, LDA, BB, LDB )\n                           END IF\n*\n*                          Check if error-exit was taken incorrectly.\n*\n                           IF( .NOT.OK )THEN\n                              WRITE( NOUT, FMT = 9994 )\n                              FATAL = .TRUE.\n                              GO TO 150\n                           END IF\n*\n*                          See what data changed inside subroutines.\n*\n                           ISAME( 1 ) = SIDES.EQ.SIDE\n                           ISAME( 2 ) = UPLOS.EQ.UPLO\n                           ISAME( 3 ) = TRANAS.EQ.TRANSA\n                           ISAME( 4 ) = DIAGS.EQ.DIAG\n                           ISAME( 5 ) = MS.EQ.M\n                           ISAME( 6 ) = NS.EQ.N\n                           ISAME( 7 ) = ALS.EQ.ALPHA\n                           ISAME( 8 ) = LZE( AS, AA, LAA )\n                           ISAME( 9 ) = LDAS.EQ.LDA\n                           IF( NULL )THEN\n                              ISAME( 10 ) = LZE( BS, BB, LBB )\n                           ELSE\n                              ISAME( 10 ) = LZERES( 'GE', ' ', M, N, BS,\n     $                                      BB, LDB )\n                           END IF\n                           ISAME( 11 ) = LDBS.EQ.LDB\n*\n*                          If data was incorrectly changed, report and\n*                          return.\n*\n                           SAME = .TRUE.\n                           DO 50 I = 1, NARGS\n                              SAME = SAME.AND.ISAME( I )\n                              IF( .NOT.ISAME( I ) )\n     $                           WRITE( NOUT, FMT = 9998 )I\n   50                      CONTINUE\n                           IF( .NOT.SAME )THEN\n                              FATAL = .TRUE.\n                              GO TO 150\n                           END IF\n*\n                           IF( .NOT.NULL )THEN\n                              IF( SNAME( 4: 5 ).EQ.'MM' )THEN\n*\n*                                Check the result.\n*\n                                 IF( LEFT )THEN\n                                    CALL ZMMCH( TRANSA, 'N', M, N, M,\n     $                                          ALPHA, A, NMAX, B, NMAX,\n     $                                          ZERO, C, NMAX, CT, G,\n     $                                          BB, LDB, EPS, ERR,\n     $                                          FATAL, NOUT, .TRUE. )\n                                 ELSE\n                                    CALL ZMMCH( 'N', TRANSA, M, N, N,\n     $                                          ALPHA, B, NMAX, A, NMAX,\n     $                                          ZERO, C, NMAX, CT, G,\n     $                                          BB, LDB, EPS, ERR,\n     $                                          FATAL, NOUT, .TRUE. )\n                                 END IF\n                              ELSE IF( SNAME( 4: 5 ).EQ.'SM' )THEN\n*\n*                                Compute approximation to original\n*                                matrix.\n*\n                                 DO 70 J = 1, N\n                                    DO 60 I = 1, M\n                                       C( I, J ) = BB( I + ( J - 1 )*\n     $                                             LDB )\n                                       BB( I + ( J - 1 )*LDB ) = ALPHA*\n     $                                    B( I, J )\n   60                               CONTINUE\n   70                            CONTINUE\n*\n                                 IF( LEFT )THEN\n                                    CALL ZMMCH( TRANSA, 'N', M, N, M,\n     $                                          ONE, A, NMAX, C, NMAX,\n     $                                          ZERO, B, NMAX, CT, G,\n     $                                          BB, LDB, EPS, ERR,\n     $                                          FATAL, NOUT, .FALSE. )\n                                 ELSE\n                                    CALL ZMMCH( 'N', TRANSA, M, N, N,\n     $                                          ONE, C, NMAX, A, NMAX,\n     $                                          ZERO, B, NMAX, CT, G,\n     $                                          BB, LDB, EPS, ERR,\n     $                                          FATAL, NOUT, .FALSE. )\n                                 END IF\n                              END IF\n                              ERRMAX = MAX( ERRMAX, ERR )\n*                             If got really bad answer, report and\n*                             return.\n                              IF( FATAL )\n     $                           GO TO 150\n                           END IF\n*\n   80                   CONTINUE\n*\n   90                CONTINUE\n*\n  100             CONTINUE\n*\n  110          CONTINUE\n*\n  120       CONTINUE\n*\n  130    CONTINUE\n*\n  140 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 160\n*\n  150 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      WRITE( NOUT, FMT = 9995 )NC, SNAME, SIDE, UPLO, TRANSA, DIAG, M,\n     $   N, ALPHA, LDA, LDB\n*\n  160 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( 1X, I6, ': ', A6, '(', 4( '''', A1, ''',' ), 2( I3, ',' ),\n     $      '(', F4.1, ',', F4.1, '), A,', I3, ', B,', I3, ')         ',\n     $      '      .' )\n 9994 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of ZCHK3.\n*\n      END\n      SUBROUTINE ZCHK4( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET, NMAX,\n     $                  A, AA, AS, B, BB, BS, C, CC, CS, CT, G )\n*\n*  Tests ZHERK and ZSYRK.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Parameters ..\n      COMPLEX*16         ZERO\n      PARAMETER          ( ZERO = ( 0.0D0, 0.0D0 ) )\n      DOUBLE PRECISION   RONE, RZERO\n      PARAMETER          ( RONE = 1.0D0, RZERO = 0.0D0 )\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION   EPS, THRESH\n      INTEGER            NALF, NBET, NIDIM, NMAX, NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      COMPLEX*16         A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),\n     $                   AS( NMAX*NMAX ), B( NMAX, NMAX ),\n     $                   BB( NMAX*NMAX ), BET( NBET ), BS( NMAX*NMAX ),\n     $                   C( NMAX, NMAX ), CC( NMAX*NMAX ),\n     $                   CS( NMAX*NMAX ), CT( NMAX )\n      DOUBLE PRECISION   G( NMAX )\n      INTEGER            IDIM( NIDIM )\n*     .. Local Scalars ..\n      COMPLEX*16         ALPHA, ALS, BETA, BETS\n      DOUBLE PRECISION   ERR, ERRMAX, RALPHA, RALS, RBETA, RBETS\n      INTEGER            I, IA, IB, ICT, ICU, IK, IN, J, JC, JJ, K, KS,\n     $                   LAA, LCC, LDA, LDAS, LDC, LDCS, LJ, MA, N, NA,\n     $                   NARGS, NC, NS\n      LOGICAL            CONJ, NULL, RESET, SAME, TRAN, UPPER\n      CHARACTER*1        TRANS, TRANSS, TRANST, UPLO, UPLOS\n      CHARACTER*2        ICHT, ICHU\n*     .. Local Arrays ..\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LZE, LZERES\n      EXTERNAL           LZE, LZERES\n*     .. External Subroutines ..\n      EXTERNAL           ZHERK, ZMAKE, ZMMCH, ZSYRK\n*     .. Intrinsic Functions ..\n      INTRINSIC          DCMPLX, MAX, DBLE\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICHT/'NC'/, ICHU/'UL'/\n*     .. Executable Statements ..\n      CONJ = SNAME( 2: 3 ).EQ.'HE'\n*\n      NARGS = 10\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = RZERO\n*\n      DO 100 IN = 1, NIDIM\n         N = IDIM( IN )\n*        Set LDC to 1 more than minimum value if room.\n         LDC = N\n         IF( LDC.LT.NMAX )\n     $      LDC = LDC + 1\n*        Skip tests if not enough room.\n         IF( LDC.GT.NMAX )\n     $      GO TO 100\n         LCC = LDC*N\n*\n         DO 90 IK = 1, NIDIM\n            K = IDIM( IK )\n*\n            DO 80 ICT = 1, 2\n               TRANS = ICHT( ICT: ICT )\n               TRAN = TRANS.EQ.'C'\n               IF( TRAN.AND..NOT.CONJ )\n     $            TRANS = 'T'\n               IF( TRAN )THEN\n                  MA = K\n                  NA = N\n               ELSE\n                  MA = N\n                  NA = K\n               END IF\n*              Set LDA to 1 more than minimum value if room.\n               LDA = MA\n               IF( LDA.LT.NMAX )\n     $            LDA = LDA + 1\n*              Skip tests if not enough room.\n               IF( LDA.GT.NMAX )\n     $            GO TO 80\n               LAA = LDA*NA\n*\n*              Generate the matrix A.\n*\n               CALL ZMAKE( 'GE', ' ', ' ', MA, NA, A, NMAX, AA, LDA,\n     $                     RESET, ZERO )\n*\n               DO 70 ICU = 1, 2\n                  UPLO = ICHU( ICU: ICU )\n                  UPPER = UPLO.EQ.'U'\n*\n                  DO 60 IA = 1, NALF\n                     ALPHA = ALF( IA )\n                     IF( CONJ )THEN\n                        RALPHA = DBLE( ALPHA )\n                        ALPHA = DCMPLX( RALPHA, RZERO )\n                     END IF\n*\n                     DO 50 IB = 1, NBET\n                        BETA = BET( IB )\n                        IF( CONJ )THEN\n                           RBETA = DBLE( BETA )\n                           BETA = DCMPLX( RBETA, RZERO )\n                        END IF\n                        NULL = N.LE.0\n                        IF( CONJ )\n     $                     NULL = NULL.OR.( ( K.LE.0.OR.RALPHA.EQ.\n     $                            RZERO ).AND.RBETA.EQ.RONE )\n*\n*                       Generate the matrix C.\n*\n                        CALL ZMAKE( SNAME( 2: 3 ), UPLO, ' ', N, N, C,\n     $                              NMAX, CC, LDC, RESET, ZERO )\n*\n                        NC = NC + 1\n*\n*                       Save every datum before calling the subroutine.\n*\n                        UPLOS = UPLO\n                        TRANSS = TRANS\n                        NS = N\n                        KS = K\n                        IF( CONJ )THEN\n                           RALS = RALPHA\n                        ELSE\n                           ALS = ALPHA\n                        END IF\n                        DO 10 I = 1, LAA\n                           AS( I ) = AA( I )\n   10                   CONTINUE\n                        LDAS = LDA\n                        IF( CONJ )THEN\n                           RBETS = RBETA\n                        ELSE\n                           BETS = BETA\n                        END IF\n                        DO 20 I = 1, LCC\n                           CS( I ) = CC( I )\n   20                   CONTINUE\n                        LDCS = LDC\n*\n*                       Call the subroutine.\n*\n                        IF( CONJ )THEN\n                           IF( TRACE )\n     $                        WRITE( NTRA, FMT = 9994 )NC, SNAME, UPLO,\n     $                        TRANS, N, K, RALPHA, LDA, RBETA, LDC\n                           IF( REWI )\n     $                        REWIND NTRA\n                           CALL ZHERK( UPLO, TRANS, N, K, RALPHA, AA,\n     $                                 LDA, RBETA, CC, LDC )\n                        ELSE\n                           IF( TRACE )\n     $                        WRITE( NTRA, FMT = 9993 )NC, SNAME, UPLO,\n     $                        TRANS, N, K, ALPHA, LDA, BETA, LDC\n                           IF( REWI )\n     $                        REWIND NTRA\n                           CALL ZSYRK( UPLO, TRANS, N, K, ALPHA, AA,\n     $                                 LDA, BETA, CC, LDC )\n                        END IF\n*\n*                       Check if error-exit was taken incorrectly.\n*\n                        IF( .NOT.OK )THEN\n                           WRITE( NOUT, FMT = 9992 )\n                           FATAL = .TRUE.\n                           GO TO 120\n                        END IF\n*\n*                       See what data changed inside subroutines.\n*\n                        ISAME( 1 ) = UPLOS.EQ.UPLO\n                        ISAME( 2 ) = TRANSS.EQ.TRANS\n                        ISAME( 3 ) = NS.EQ.N\n                        ISAME( 4 ) = KS.EQ.K\n                        IF( CONJ )THEN\n                           ISAME( 5 ) = RALS.EQ.RALPHA\n                        ELSE\n                           ISAME( 5 ) = ALS.EQ.ALPHA\n                        END IF\n                        ISAME( 6 ) = LZE( AS, AA, LAA )\n                        ISAME( 7 ) = LDAS.EQ.LDA\n                        IF( CONJ )THEN\n                           ISAME( 8 ) = RBETS.EQ.RBETA\n                        ELSE\n                           ISAME( 8 ) = BETS.EQ.BETA\n                        END IF\n                        IF( NULL )THEN\n                           ISAME( 9 ) = LZE( CS, CC, LCC )\n                        ELSE\n                           ISAME( 9 ) = LZERES( SNAME( 2: 3 ), UPLO, N,\n     $                                  N, CS, CC, LDC )\n                        END IF\n                        ISAME( 10 ) = LDCS.EQ.LDC\n*\n*                       If data was incorrectly changed, report and\n*                       return.\n*\n                        SAME = .TRUE.\n                        DO 30 I = 1, NARGS\n                           SAME = SAME.AND.ISAME( I )\n                           IF( .NOT.ISAME( I ) )\n     $                        WRITE( NOUT, FMT = 9998 )I\n   30                   CONTINUE\n                        IF( .NOT.SAME )THEN\n                           FATAL = .TRUE.\n                           GO TO 120\n                        END IF\n*\n                        IF( .NOT.NULL )THEN\n*\n*                          Check the result column by column.\n*\n                           IF( CONJ )THEN\n                              TRANST = 'C'\n                           ELSE\n                              TRANST = 'T'\n                           END IF\n                           JC = 1\n                           DO 40 J = 1, N\n                              IF( UPPER )THEN\n                                 JJ = 1\n                                 LJ = J\n                              ELSE\n                                 JJ = J\n                                 LJ = N - J + 1\n                              END IF\n                              IF( TRAN )THEN\n                                 CALL ZMMCH( TRANST, 'N', LJ, 1, K,\n     $                                       ALPHA, A( 1, JJ ), NMAX,\n     $                                       A( 1, J ), NMAX, BETA,\n     $                                       C( JJ, J ), NMAX, CT, G,\n     $                                       CC( JC ), LDC, EPS, ERR,\n     $                                       FATAL, NOUT, .TRUE. )\n                              ELSE\n                                 CALL ZMMCH( 'N', TRANST, LJ, 1, K,\n     $                                       ALPHA, A( JJ, 1 ), NMAX,\n     $                                       A( J, 1 ), NMAX, BETA,\n     $                                       C( JJ, J ), NMAX, CT, G,\n     $                                       CC( JC ), LDC, EPS, ERR,\n     $                                       FATAL, NOUT, .TRUE. )\n                              END IF\n                              IF( UPPER )THEN\n                                 JC = JC + LDC\n                              ELSE\n                                 JC = JC + LDC + 1\n                              END IF\n                              ERRMAX = MAX( ERRMAX, ERR )\n*                             If got really bad answer, report and\n*                             return.\n                              IF( FATAL )\n     $                           GO TO 110\n   40                      CONTINUE\n                        END IF\n*\n   50                CONTINUE\n*\n   60             CONTINUE\n*\n   70          CONTINUE\n*\n   80       CONTINUE\n*\n   90    CONTINUE\n*\n  100 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 130\n*\n  110 CONTINUE\n      IF( N.GT.1 )\n     $   WRITE( NOUT, FMT = 9995 )J\n*\n  120 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      IF( CONJ )THEN\n         WRITE( NOUT, FMT = 9994 )NC, SNAME, UPLO, TRANS, N, K, RALPHA,\n     $      LDA, RBETA, LDC\n      ELSE\n         WRITE( NOUT, FMT = 9993 )NC, SNAME, UPLO, TRANS, N, K, ALPHA,\n     $      LDA, BETA, LDC\n      END IF\n*\n  130 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( '      THESE ARE THE RESULTS FOR COLUMN ', I3 )\n 9994 FORMAT( 1X, I6, ': ', A6, '(', 2( '''', A1, ''',' ), 2( I3, ',' ),\n     $      F4.1, ', A,', I3, ',', F4.1, ', C,', I3, ')               ',\n     $      '          .' )\n 9993 FORMAT( 1X, I6, ': ', A6, '(', 2( '''', A1, ''',' ), 2( I3, ',' ),\n     $      '(', F4.1, ',', F4.1, ') , A,', I3, ',(', F4.1, ',', F4.1,\n     $      '), C,', I3, ')          .' )\n 9992 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of ZCHK4.\n*\n      END\n      SUBROUTINE ZCHK5( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,\n     $                  FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET, NMAX,\n     $                  AB, AA, AS, BB, BS, C, CC, CS, CT, G, W )\n*\n*  Tests ZHER2K and ZSYR2K.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Parameters ..\n      COMPLEX*16         ZERO, ONE\n      PARAMETER          ( ZERO = ( 0.0D0, 0.0D0 ),\n     $                   ONE = ( 1.0D0, 0.0D0 ) )\n      DOUBLE PRECISION   RONE, RZERO\n      PARAMETER          ( RONE = 1.0D0, RZERO = 0.0D0 )\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION   EPS, THRESH\n      INTEGER            NALF, NBET, NIDIM, NMAX, NOUT, NTRA\n      LOGICAL            FATAL, REWI, TRACE\n      CHARACTER*6        SNAME\n*     .. Array Arguments ..\n      COMPLEX*16         AA( NMAX*NMAX ), AB( 2*NMAX*NMAX ),\n     $                   ALF( NALF ), AS( NMAX*NMAX ), BB( NMAX*NMAX ),\n     $                   BET( NBET ), BS( NMAX*NMAX ), C( NMAX, NMAX ),\n     $                   CC( NMAX*NMAX ), CS( NMAX*NMAX ), CT( NMAX ),\n     $                   W( 2*NMAX )\n      DOUBLE PRECISION   G( NMAX )\n      INTEGER            IDIM( NIDIM )\n*     .. Local Scalars ..\n      COMPLEX*16         ALPHA, ALS, BETA, BETS\n      DOUBLE PRECISION   ERR, ERRMAX, RBETA, RBETS\n      INTEGER            I, IA, IB, ICT, ICU, IK, IN, J, JC, JJ, JJAB,\n     $                   K, KS, LAA, LBB, LCC, LDA, LDAS, LDB, LDBS,\n     $                   LDC, LDCS, LJ, MA, N, NA, NARGS, NC, NS\n      LOGICAL            CONJ, NULL, RESET, SAME, TRAN, UPPER\n      CHARACTER*1        TRANS, TRANSS, TRANST, UPLO, UPLOS\n      CHARACTER*2        ICHT, ICHU\n*     .. Local Arrays ..\n      LOGICAL            ISAME( 13 )\n*     .. External Functions ..\n      LOGICAL            LZE, LZERES\n      EXTERNAL           LZE, LZERES\n*     .. External Subroutines ..\n      EXTERNAL           ZHER2K, ZMAKE, ZMMCH, ZSYR2K\n*     .. Intrinsic Functions ..\n      INTRINSIC          DCMPLX, DCONJG, MAX, DBLE\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Data statements ..\n      DATA               ICHT/'NC'/, ICHU/'UL'/\n*     .. Executable Statements ..\n      CONJ = SNAME( 2: 3 ).EQ.'HE'\n*\n      NARGS = 12\n      NC = 0\n      RESET = .TRUE.\n      ERRMAX = RZERO\n*\n      DO 130 IN = 1, NIDIM\n         N = IDIM( IN )\n*        Set LDC to 1 more than minimum value if room.\n         LDC = N\n         IF( LDC.LT.NMAX )\n     $      LDC = LDC + 1\n*        Skip tests if not enough room.\n         IF( LDC.GT.NMAX )\n     $      GO TO 130\n         LCC = LDC*N\n*\n         DO 120 IK = 1, NIDIM\n            K = IDIM( IK )\n*\n            DO 110 ICT = 1, 2\n               TRANS = ICHT( ICT: ICT )\n               TRAN = TRANS.EQ.'C'\n               IF( TRAN.AND..NOT.CONJ )\n     $            TRANS = 'T'\n               IF( TRAN )THEN\n                  MA = K\n                  NA = N\n               ELSE\n                  MA = N\n                  NA = K\n               END IF\n*              Set LDA to 1 more than minimum value if room.\n               LDA = MA\n               IF( LDA.LT.NMAX )\n     $            LDA = LDA + 1\n*              Skip tests if not enough room.\n               IF( LDA.GT.NMAX )\n     $            GO TO 110\n               LAA = LDA*NA\n*\n*              Generate the matrix A.\n*\n               IF( TRAN )THEN\n                  CALL ZMAKE( 'GE', ' ', ' ', MA, NA, AB, 2*NMAX, AA,\n     $                        LDA, RESET, ZERO )\n               ELSE\n                  CALL ZMAKE( 'GE', ' ', ' ', MA, NA, AB, NMAX, AA, LDA,\n     $                        RESET, ZERO )\n               END IF\n*\n*              Generate the matrix B.\n*\n               LDB = LDA\n               LBB = LAA\n               IF( TRAN )THEN\n                  CALL ZMAKE( 'GE', ' ', ' ', MA, NA, AB( K + 1 ),\n     $                        2*NMAX, BB, LDB, RESET, ZERO )\n               ELSE\n                  CALL ZMAKE( 'GE', ' ', ' ', MA, NA, AB( K*NMAX + 1 ),\n     $                        NMAX, BB, LDB, RESET, ZERO )\n               END IF\n*\n               DO 100 ICU = 1, 2\n                  UPLO = ICHU( ICU: ICU )\n                  UPPER = UPLO.EQ.'U'\n*\n                  DO 90 IA = 1, NALF\n                     ALPHA = ALF( IA )\n*\n                     DO 80 IB = 1, NBET\n                        BETA = BET( IB )\n                        IF( CONJ )THEN\n                           RBETA = DBLE( BETA )\n                           BETA = DCMPLX( RBETA, RZERO )\n                        END IF\n                        NULL = N.LE.0\n                        IF( CONJ )\n     $                     NULL = NULL.OR.( ( K.LE.0.OR.ALPHA.EQ.\n     $                            ZERO ).AND.RBETA.EQ.RONE )\n*\n*                       Generate the matrix C.\n*\n                        CALL ZMAKE( SNAME( 2: 3 ), UPLO, ' ', N, N, C,\n     $                              NMAX, CC, LDC, RESET, ZERO )\n*\n                        NC = NC + 1\n*\n*                       Save every datum before calling the subroutine.\n*\n                        UPLOS = UPLO\n                        TRANSS = TRANS\n                        NS = N\n                        KS = K\n                        ALS = ALPHA\n                        DO 10 I = 1, LAA\n                           AS( I ) = AA( I )\n   10                   CONTINUE\n                        LDAS = LDA\n                        DO 20 I = 1, LBB\n                           BS( I ) = BB( I )\n   20                   CONTINUE\n                        LDBS = LDB\n                        IF( CONJ )THEN\n                           RBETS = RBETA\n                        ELSE\n                           BETS = BETA\n                        END IF\n                        DO 30 I = 1, LCC\n                           CS( I ) = CC( I )\n   30                   CONTINUE\n                        LDCS = LDC\n*\n*                       Call the subroutine.\n*\n                        IF( CONJ )THEN\n                           IF( TRACE )\n     $                        WRITE( NTRA, FMT = 9994 )NC, SNAME, UPLO,\n     $                        TRANS, N, K, ALPHA, LDA, LDB, RBETA, LDC\n                           IF( REWI )\n     $                        REWIND NTRA\n                           CALL ZHER2K( UPLO, TRANS, N, K, ALPHA, AA,\n     $                                  LDA, BB, LDB, RBETA, CC, LDC )\n                        ELSE\n                           IF( TRACE )\n     $                        WRITE( NTRA, FMT = 9993 )NC, SNAME, UPLO,\n     $                        TRANS, N, K, ALPHA, LDA, LDB, BETA, LDC\n                           IF( REWI )\n     $                        REWIND NTRA\n                           CALL ZSYR2K( UPLO, TRANS, N, K, ALPHA, AA,\n     $                                  LDA, BB, LDB, BETA, CC, LDC )\n                        END IF\n*\n*                       Check if error-exit was taken incorrectly.\n*\n                        IF( .NOT.OK )THEN\n                           WRITE( NOUT, FMT = 9992 )\n                           FATAL = .TRUE.\n                           GO TO 150\n                        END IF\n*\n*                       See what data changed inside subroutines.\n*\n                        ISAME( 1 ) = UPLOS.EQ.UPLO\n                        ISAME( 2 ) = TRANSS.EQ.TRANS\n                        ISAME( 3 ) = NS.EQ.N\n                        ISAME( 4 ) = KS.EQ.K\n                        ISAME( 5 ) = ALS.EQ.ALPHA\n                        ISAME( 6 ) = LZE( AS, AA, LAA )\n                        ISAME( 7 ) = LDAS.EQ.LDA\n                        ISAME( 8 ) = LZE( BS, BB, LBB )\n                        ISAME( 9 ) = LDBS.EQ.LDB\n                        IF( CONJ )THEN\n                           ISAME( 10 ) = RBETS.EQ.RBETA\n                        ELSE\n                           ISAME( 10 ) = BETS.EQ.BETA\n                        END IF\n                        IF( NULL )THEN\n                           ISAME( 11 ) = LZE( CS, CC, LCC )\n                        ELSE\n                           ISAME( 11 ) = LZERES( 'HE', UPLO, N, N, CS,\n     $                                   CC, LDC )\n                        END IF\n                        ISAME( 12 ) = LDCS.EQ.LDC\n*\n*                       If data was incorrectly changed, report and\n*                       return.\n*\n                        SAME = .TRUE.\n                        DO 40 I = 1, NARGS\n                           SAME = SAME.AND.ISAME( I )\n                           IF( .NOT.ISAME( I ) )\n     $                        WRITE( NOUT, FMT = 9998 )I\n   40                   CONTINUE\n                        IF( .NOT.SAME )THEN\n                           FATAL = .TRUE.\n                           GO TO 150\n                        END IF\n*\n                        IF( .NOT.NULL )THEN\n*\n*                          Check the result column by column.\n*\n                           IF( CONJ )THEN\n                              TRANST = 'C'\n                           ELSE\n                              TRANST = 'T'\n                           END IF\n                           JJAB = 1\n                           JC = 1\n                           DO 70 J = 1, N\n                              IF( UPPER )THEN\n                                 JJ = 1\n                                 LJ = J\n                              ELSE\n                                 JJ = J\n                                 LJ = N - J + 1\n                              END IF\n                              IF( TRAN )THEN\n                                 DO 50 I = 1, K\n                                    W( I ) = ALPHA*AB( ( J - 1 )*2*\n     $                                       NMAX + K + I )\n                                    IF( CONJ )THEN\n                                       W( K + I ) = DCONJG( ALPHA )*\n     $                                              AB( ( J - 1 )*2*\n     $                                              NMAX + I )\n                                    ELSE\n                                       W( K + I ) = ALPHA*\n     $                                              AB( ( J - 1 )*2*\n     $                                              NMAX + I )\n                                    END IF\n   50                            CONTINUE\n                                 CALL ZMMCH( TRANST, 'N', LJ, 1, 2*K,\n     $                                       ONE, AB( JJAB ), 2*NMAX, W,\n     $                                       2*NMAX, BETA, C( JJ, J ),\n     $                                       NMAX, CT, G, CC( JC ), LDC,\n     $                                       EPS, ERR, FATAL, NOUT,\n     $                                       .TRUE. )\n                              ELSE\n                                 DO 60 I = 1, K\n                                    IF( CONJ )THEN\n                                       W( I ) = ALPHA*DCONJG( AB( ( K +\n     $                                          I - 1 )*NMAX + J ) )\n                                       W( K + I ) = DCONJG( ALPHA*\n     $                                              AB( ( I - 1 )*NMAX +\n     $                                              J ) )\n                                    ELSE\n                                       W( I ) = ALPHA*AB( ( K + I - 1 )*\n     $                                          NMAX + J )\n                                       W( K + I ) = ALPHA*\n     $                                              AB( ( I - 1 )*NMAX +\n     $                                              J )\n                                    END IF\n   60                            CONTINUE\n                                 CALL ZMMCH( 'N', 'N', LJ, 1, 2*K, ONE,\n     $                                       AB( JJ ), NMAX, W, 2*NMAX,\n     $                                       BETA, C( JJ, J ), NMAX, CT,\n     $                                       G, CC( JC ), LDC, EPS, ERR,\n     $                                       FATAL, NOUT, .TRUE. )\n                              END IF\n                              IF( UPPER )THEN\n                                 JC = JC + LDC\n                              ELSE\n                                 JC = JC + LDC + 1\n                                 IF( TRAN )\n     $                              JJAB = JJAB + 2*NMAX\n                              END IF\n                              ERRMAX = MAX( ERRMAX, ERR )\n*                             If got really bad answer, report and\n*                             return.\n                              IF( FATAL )\n     $                           GO TO 140\n   70                      CONTINUE\n                        END IF\n*\n   80                CONTINUE\n*\n   90             CONTINUE\n*\n  100          CONTINUE\n*\n  110       CONTINUE\n*\n  120    CONTINUE\n*\n  130 CONTINUE\n*\n*     Report result.\n*\n      IF( ERRMAX.LT.THRESH )THEN\n         WRITE( NOUT, FMT = 9999 )SNAME, NC\n      ELSE\n         WRITE( NOUT, FMT = 9997 )SNAME, NC, ERRMAX\n      END IF\n      GO TO 160\n*\n  140 CONTINUE\n      IF( N.GT.1 )\n     $   WRITE( NOUT, FMT = 9995 )J\n*\n  150 CONTINUE\n      WRITE( NOUT, FMT = 9996 )SNAME\n      IF( CONJ )THEN\n         WRITE( NOUT, FMT = 9994 )NC, SNAME, UPLO, TRANS, N, K, ALPHA,\n     $      LDA, LDB, RBETA, LDC\n      ELSE\n         WRITE( NOUT, FMT = 9993 )NC, SNAME, UPLO, TRANS, N, K, ALPHA,\n     $      LDA, LDB, BETA, LDC\n      END IF\n*\n  160 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE COMPUTATIONAL TESTS (', I6, ' CALL',\n     $      'S)' )\n 9998 FORMAT( ' ******* FATAL ERROR - PARAMETER NUMBER ', I2, ' WAS CH',\n     $      'ANGED INCORRECTLY *******' )\n 9997 FORMAT( ' ', A6, ' COMPLETED THE COMPUTATIONAL TESTS (', I6, ' C',\n     $      'ALLS)', /' ******* BUT WITH MAXIMUM TEST RATIO', F8.2,\n     $      ' - SUSPECT *******' )\n 9996 FORMAT( ' ******* ', A6, ' FAILED ON CALL NUMBER:' )\n 9995 FORMAT( '      THESE ARE THE RESULTS FOR COLUMN ', I3 )\n 9994 FORMAT( 1X, I6, ': ', A6, '(', 2( '''', A1, ''',' ), 2( I3, ',' ),\n     $      '(', F4.1, ',', F4.1, '), A,', I3, ', B,', I3, ',', F4.1,\n     $      ', C,', I3, ')           .' )\n 9993 FORMAT( 1X, I6, ': ', A6, '(', 2( '''', A1, ''',' ), 2( I3, ',' ),\n     $      '(', F4.1, ',', F4.1, '), A,', I3, ', B,', I3, ',(', F4.1,\n     $      ',', F4.1, '), C,', I3, ')    .' )\n 9992 FORMAT( ' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',\n     $      '******' )\n*\n*     End of ZCHK5.\n*\n      END\n      SUBROUTINE ZCHKE( ISNUM, SRNAMT, NOUT )\n*\n*  Tests the error exits from the Level 3 Blas.\n*  Requires a special version of the error-handling routine XERBLA.\n*  A, B and C should not need to be defined.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*  3-19-92:  Initialize ALPHA, BETA, RALPHA, and RBETA  (eca)\n*  3-19-92:  Fix argument 12 in calls to ZSYMM and ZHEMM\n*            with INFOT = 9  (eca)\n*  10-9-00:  Declared INTRINSIC DCMPLX (susan)\n*\n*     .. Scalar Arguments ..\n      INTEGER            ISNUM, NOUT\n      CHARACTER*6        SRNAMT\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUTC\n      LOGICAL            LERR, OK\n*     .. Parameters ..\n      REAL               ONE, TWO\n      PARAMETER          ( ONE = 1.0D0, TWO = 2.0D0 )\n*     .. Local Scalars ..\n      COMPLEX*16         ALPHA, BETA\n      DOUBLE PRECISION   RALPHA, RBETA\n*     .. Local Arrays ..\n      COMPLEX*16         A( 2, 1 ), B( 2, 1 ), C( 2, 1 )\n*     .. External Subroutines ..\n      EXTERNAL           ZGEMM, ZHEMM, ZHER2K, ZHERK, CHKXER, ZSYMM,\n     $                   ZSYR2K, ZSYRK, ZTRMM, ZTRSM\n*     .. Intrinsic Functions ..\n      INTRINSIC          DCMPLX\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUTC, OK, LERR\n*     .. Executable Statements ..\n*     OK is set to .FALSE. by the special version of XERBLA or by CHKXER\n*     if anything is wrong.\n      OK = .TRUE.\n*     LERR is set to .TRUE. by the special version of XERBLA each time\n*     it is called, and is then tested and re-set by CHKXER.\n      LERR = .FALSE.\n*\n*     Initialize ALPHA, BETA, RALPHA, and RBETA.\n*\n      ALPHA = DCMPLX( ONE, -ONE )\n      BETA = DCMPLX( TWO, -TWO )\n      RALPHA = ONE\n      RBETA = TWO\n*\n      GO TO ( 10, 20, 30, 40, 50, 60, 70, 80,\n     $        90 )ISNUM\n   10 INFOT = 1\n      CALL ZGEMM( '/', 'N', 0, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 1\n      CALL ZGEMM( '/', 'C', 0, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 1\n      CALL ZGEMM( '/', 'T', 0, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL ZGEMM( 'N', '/', 0, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL ZGEMM( 'C', '/', 0, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL ZGEMM( 'T', '/', 0, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZGEMM( 'N', 'N', -1, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZGEMM( 'N', 'C', -1, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZGEMM( 'N', 'T', -1, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZGEMM( 'C', 'N', -1, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZGEMM( 'C', 'C', -1, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZGEMM( 'C', 'T', -1, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZGEMM( 'T', 'N', -1, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZGEMM( 'T', 'C', -1, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZGEMM( 'T', 'T', -1, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZGEMM( 'N', 'N', 0, -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZGEMM( 'N', 'C', 0, -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZGEMM( 'N', 'T', 0, -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZGEMM( 'C', 'N', 0, -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZGEMM( 'C', 'C', 0, -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZGEMM( 'C', 'T', 0, -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZGEMM( 'T', 'N', 0, -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZGEMM( 'T', 'C', 0, -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZGEMM( 'T', 'T', 0, -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZGEMM( 'N', 'N', 0, 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZGEMM( 'N', 'C', 0, 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZGEMM( 'N', 'T', 0, 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZGEMM( 'C', 'N', 0, 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZGEMM( 'C', 'C', 0, 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZGEMM( 'C', 'T', 0, 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZGEMM( 'T', 'N', 0, 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZGEMM( 'T', 'C', 0, 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZGEMM( 'T', 'T', 0, 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL ZGEMM( 'N', 'N', 2, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL ZGEMM( 'N', 'C', 2, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL ZGEMM( 'N', 'T', 2, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL ZGEMM( 'C', 'N', 0, 0, 2, ALPHA, A, 1, B, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL ZGEMM( 'C', 'C', 0, 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL ZGEMM( 'C', 'T', 0, 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL ZGEMM( 'T', 'N', 0, 0, 2, ALPHA, A, 1, B, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL ZGEMM( 'T', 'C', 0, 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 8\n      CALL ZGEMM( 'T', 'T', 0, 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL ZGEMM( 'N', 'N', 0, 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL ZGEMM( 'C', 'N', 0, 0, 2, ALPHA, A, 2, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL ZGEMM( 'T', 'N', 0, 0, 2, ALPHA, A, 2, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL ZGEMM( 'N', 'C', 0, 2, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL ZGEMM( 'C', 'C', 0, 2, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL ZGEMM( 'T', 'C', 0, 2, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL ZGEMM( 'N', 'T', 0, 2, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL ZGEMM( 'C', 'T', 0, 2, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL ZGEMM( 'T', 'T', 0, 2, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 13\n      CALL ZGEMM( 'N', 'N', 2, 0, 0, ALPHA, A, 2, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 13\n      CALL ZGEMM( 'N', 'C', 2, 0, 0, ALPHA, A, 2, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 13\n      CALL ZGEMM( 'N', 'T', 2, 0, 0, ALPHA, A, 2, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 13\n      CALL ZGEMM( 'C', 'N', 2, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 13\n      CALL ZGEMM( 'C', 'C', 2, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 13\n      CALL ZGEMM( 'C', 'T', 2, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 13\n      CALL ZGEMM( 'T', 'N', 2, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 13\n      CALL ZGEMM( 'T', 'C', 2, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 13\n      CALL ZGEMM( 'T', 'T', 2, 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 100\n   20 INFOT = 1\n      CALL ZHEMM( '/', 'U', 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL ZHEMM( 'L', '/', 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZHEMM( 'L', 'U', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZHEMM( 'R', 'U', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZHEMM( 'L', 'L', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZHEMM( 'R', 'L', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZHEMM( 'L', 'U', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZHEMM( 'R', 'U', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZHEMM( 'L', 'L', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZHEMM( 'R', 'L', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL ZHEMM( 'L', 'U', 2, 0, ALPHA, A, 1, B, 2, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL ZHEMM( 'R', 'U', 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL ZHEMM( 'L', 'L', 2, 0, ALPHA, A, 1, B, 2, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL ZHEMM( 'R', 'L', 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZHEMM( 'L', 'U', 2, 0, ALPHA, A, 2, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZHEMM( 'R', 'U', 2, 0, ALPHA, A, 1, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZHEMM( 'L', 'L', 2, 0, ALPHA, A, 2, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZHEMM( 'R', 'L', 2, 0, ALPHA, A, 1, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL ZHEMM( 'L', 'U', 2, 0, ALPHA, A, 2, B, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL ZHEMM( 'R', 'U', 2, 0, ALPHA, A, 1, B, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL ZHEMM( 'L', 'L', 2, 0, ALPHA, A, 2, B, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL ZHEMM( 'R', 'L', 2, 0, ALPHA, A, 1, B, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 100\n   30 INFOT = 1\n      CALL ZSYMM( '/', 'U', 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL ZSYMM( 'L', '/', 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZSYMM( 'L', 'U', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZSYMM( 'R', 'U', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZSYMM( 'L', 'L', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZSYMM( 'R', 'L', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZSYMM( 'L', 'U', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZSYMM( 'R', 'U', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZSYMM( 'L', 'L', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZSYMM( 'R', 'L', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL ZSYMM( 'L', 'U', 2, 0, ALPHA, A, 1, B, 2, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL ZSYMM( 'R', 'U', 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL ZSYMM( 'L', 'L', 2, 0, ALPHA, A, 1, B, 2, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL ZSYMM( 'R', 'L', 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZSYMM( 'L', 'U', 2, 0, ALPHA, A, 2, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZSYMM( 'R', 'U', 2, 0, ALPHA, A, 1, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZSYMM( 'L', 'L', 2, 0, ALPHA, A, 2, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZSYMM( 'R', 'L', 2, 0, ALPHA, A, 1, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL ZSYMM( 'L', 'U', 2, 0, ALPHA, A, 2, B, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL ZSYMM( 'R', 'U', 2, 0, ALPHA, A, 1, B, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL ZSYMM( 'L', 'L', 2, 0, ALPHA, A, 2, B, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL ZSYMM( 'R', 'L', 2, 0, ALPHA, A, 1, B, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 100\n   40 INFOT = 1\n      CALL ZTRMM( '/', 'U', 'N', 'N', 0, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL ZTRMM( 'L', '/', 'N', 'N', 0, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZTRMM( 'L', 'U', '/', 'N', 0, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZTRMM( 'L', 'U', 'N', '/', 0, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZTRMM( 'L', 'U', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZTRMM( 'L', 'U', 'C', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZTRMM( 'L', 'U', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZTRMM( 'R', 'U', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZTRMM( 'R', 'U', 'C', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZTRMM( 'R', 'U', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZTRMM( 'L', 'L', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZTRMM( 'L', 'L', 'C', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZTRMM( 'L', 'L', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZTRMM( 'R', 'L', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZTRMM( 'R', 'L', 'C', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZTRMM( 'R', 'L', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL ZTRMM( 'L', 'U', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL ZTRMM( 'L', 'U', 'C', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL ZTRMM( 'L', 'U', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL ZTRMM( 'R', 'U', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL ZTRMM( 'R', 'U', 'C', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL ZTRMM( 'R', 'U', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL ZTRMM( 'L', 'L', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL ZTRMM( 'L', 'L', 'C', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL ZTRMM( 'L', 'L', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL ZTRMM( 'R', 'L', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL ZTRMM( 'R', 'L', 'C', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL ZTRMM( 'R', 'L', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZTRMM( 'L', 'U', 'N', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZTRMM( 'L', 'U', 'C', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZTRMM( 'L', 'U', 'T', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZTRMM( 'R', 'U', 'N', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZTRMM( 'R', 'U', 'C', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZTRMM( 'R', 'U', 'T', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZTRMM( 'L', 'L', 'N', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZTRMM( 'L', 'L', 'C', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZTRMM( 'L', 'L', 'T', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZTRMM( 'R', 'L', 'N', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZTRMM( 'R', 'L', 'C', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZTRMM( 'R', 'L', 'T', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL ZTRMM( 'L', 'U', 'N', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL ZTRMM( 'L', 'U', 'C', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL ZTRMM( 'L', 'U', 'T', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL ZTRMM( 'R', 'U', 'N', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL ZTRMM( 'R', 'U', 'C', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL ZTRMM( 'R', 'U', 'T', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL ZTRMM( 'L', 'L', 'N', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL ZTRMM( 'L', 'L', 'C', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL ZTRMM( 'L', 'L', 'T', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL ZTRMM( 'R', 'L', 'N', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL ZTRMM( 'R', 'L', 'C', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL ZTRMM( 'R', 'L', 'T', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 100\n   50 INFOT = 1\n      CALL ZTRSM( '/', 'U', 'N', 'N', 0, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL ZTRSM( 'L', '/', 'N', 'N', 0, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZTRSM( 'L', 'U', '/', 'N', 0, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZTRSM( 'L', 'U', 'N', '/', 0, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZTRSM( 'L', 'U', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZTRSM( 'L', 'U', 'C', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZTRSM( 'L', 'U', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZTRSM( 'R', 'U', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZTRSM( 'R', 'U', 'C', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZTRSM( 'R', 'U', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZTRSM( 'L', 'L', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZTRSM( 'L', 'L', 'C', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZTRSM( 'L', 'L', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZTRSM( 'R', 'L', 'N', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZTRSM( 'R', 'L', 'C', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 5\n      CALL ZTRSM( 'R', 'L', 'T', 'N', -1, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL ZTRSM( 'L', 'U', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL ZTRSM( 'L', 'U', 'C', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL ZTRSM( 'L', 'U', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL ZTRSM( 'R', 'U', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL ZTRSM( 'R', 'U', 'C', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL ZTRSM( 'R', 'U', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL ZTRSM( 'L', 'L', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL ZTRSM( 'L', 'L', 'C', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL ZTRSM( 'L', 'L', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL ZTRSM( 'R', 'L', 'N', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL ZTRSM( 'R', 'L', 'C', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 6\n      CALL ZTRSM( 'R', 'L', 'T', 'N', 0, -1, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZTRSM( 'L', 'U', 'N', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZTRSM( 'L', 'U', 'C', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZTRSM( 'L', 'U', 'T', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZTRSM( 'R', 'U', 'N', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZTRSM( 'R', 'U', 'C', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZTRSM( 'R', 'U', 'T', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZTRSM( 'L', 'L', 'N', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZTRSM( 'L', 'L', 'C', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZTRSM( 'L', 'L', 'T', 'N', 2, 0, ALPHA, A, 1, B, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZTRSM( 'R', 'L', 'N', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZTRSM( 'R', 'L', 'C', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZTRSM( 'R', 'L', 'T', 'N', 0, 2, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL ZTRSM( 'L', 'U', 'N', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL ZTRSM( 'L', 'U', 'C', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL ZTRSM( 'L', 'U', 'T', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL ZTRSM( 'R', 'U', 'N', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL ZTRSM( 'R', 'U', 'C', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL ZTRSM( 'R', 'U', 'T', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL ZTRSM( 'L', 'L', 'N', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL ZTRSM( 'L', 'L', 'C', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL ZTRSM( 'L', 'L', 'T', 'N', 2, 0, ALPHA, A, 2, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL ZTRSM( 'R', 'L', 'N', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL ZTRSM( 'R', 'L', 'C', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 11\n      CALL ZTRSM( 'R', 'L', 'T', 'N', 2, 0, ALPHA, A, 1, B, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 100\n   60 INFOT = 1\n      CALL ZHERK( '/', 'N', 0, 0, RALPHA, A, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL ZHERK( 'U', 'T', 0, 0, RALPHA, A, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZHERK( 'U', 'N', -1, 0, RALPHA, A, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZHERK( 'U', 'C', -1, 0, RALPHA, A, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZHERK( 'L', 'N', -1, 0, RALPHA, A, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZHERK( 'L', 'C', -1, 0, RALPHA, A, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZHERK( 'U', 'N', 0, -1, RALPHA, A, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZHERK( 'U', 'C', 0, -1, RALPHA, A, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZHERK( 'L', 'N', 0, -1, RALPHA, A, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZHERK( 'L', 'C', 0, -1, RALPHA, A, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL ZHERK( 'U', 'N', 2, 0, RALPHA, A, 1, RBETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL ZHERK( 'U', 'C', 0, 2, RALPHA, A, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL ZHERK( 'L', 'N', 2, 0, RALPHA, A, 1, RBETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL ZHERK( 'L', 'C', 0, 2, RALPHA, A, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL ZHERK( 'U', 'N', 2, 0, RALPHA, A, 2, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL ZHERK( 'U', 'C', 2, 0, RALPHA, A, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL ZHERK( 'L', 'N', 2, 0, RALPHA, A, 2, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL ZHERK( 'L', 'C', 2, 0, RALPHA, A, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 100\n   70 INFOT = 1\n      CALL ZSYRK( '/', 'N', 0, 0, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL ZSYRK( 'U', 'C', 0, 0, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZSYRK( 'U', 'N', -1, 0, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZSYRK( 'U', 'T', -1, 0, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZSYRK( 'L', 'N', -1, 0, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZSYRK( 'L', 'T', -1, 0, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZSYRK( 'U', 'N', 0, -1, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZSYRK( 'U', 'T', 0, -1, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZSYRK( 'L', 'N', 0, -1, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZSYRK( 'L', 'T', 0, -1, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL ZSYRK( 'U', 'N', 2, 0, ALPHA, A, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL ZSYRK( 'U', 'T', 0, 2, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL ZSYRK( 'L', 'N', 2, 0, ALPHA, A, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL ZSYRK( 'L', 'T', 0, 2, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL ZSYRK( 'U', 'N', 2, 0, ALPHA, A, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL ZSYRK( 'U', 'T', 2, 0, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL ZSYRK( 'L', 'N', 2, 0, ALPHA, A, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 10\n      CALL ZSYRK( 'L', 'T', 2, 0, ALPHA, A, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 100\n   80 INFOT = 1\n      CALL ZHER2K( '/', 'N', 0, 0, ALPHA, A, 1, B, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL ZHER2K( 'U', 'T', 0, 0, ALPHA, A, 1, B, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZHER2K( 'U', 'N', -1, 0, ALPHA, A, 1, B, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZHER2K( 'U', 'C', -1, 0, ALPHA, A, 1, B, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZHER2K( 'L', 'N', -1, 0, ALPHA, A, 1, B, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZHER2K( 'L', 'C', -1, 0, ALPHA, A, 1, B, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZHER2K( 'U', 'N', 0, -1, ALPHA, A, 1, B, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZHER2K( 'U', 'C', 0, -1, ALPHA, A, 1, B, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZHER2K( 'L', 'N', 0, -1, ALPHA, A, 1, B, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZHER2K( 'L', 'C', 0, -1, ALPHA, A, 1, B, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL ZHER2K( 'U', 'N', 2, 0, ALPHA, A, 1, B, 1, RBETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL ZHER2K( 'U', 'C', 0, 2, ALPHA, A, 1, B, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL ZHER2K( 'L', 'N', 2, 0, ALPHA, A, 1, B, 1, RBETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL ZHER2K( 'L', 'C', 0, 2, ALPHA, A, 1, B, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZHER2K( 'U', 'N', 2, 0, ALPHA, A, 2, B, 1, RBETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZHER2K( 'U', 'C', 0, 2, ALPHA, A, 2, B, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZHER2K( 'L', 'N', 2, 0, ALPHA, A, 2, B, 1, RBETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZHER2K( 'L', 'C', 0, 2, ALPHA, A, 2, B, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL ZHER2K( 'U', 'N', 2, 0, ALPHA, A, 2, B, 2, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL ZHER2K( 'U', 'C', 2, 0, ALPHA, A, 1, B, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL ZHER2K( 'L', 'N', 2, 0, ALPHA, A, 2, B, 2, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL ZHER2K( 'L', 'C', 2, 0, ALPHA, A, 1, B, 1, RBETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      GO TO 100\n   90 INFOT = 1\n      CALL ZSYR2K( '/', 'N', 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 2\n      CALL ZSYR2K( 'U', 'C', 0, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZSYR2K( 'U', 'N', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZSYR2K( 'U', 'T', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZSYR2K( 'L', 'N', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 3\n      CALL ZSYR2K( 'L', 'T', -1, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZSYR2K( 'U', 'N', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZSYR2K( 'U', 'T', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZSYR2K( 'L', 'N', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 4\n      CALL ZSYR2K( 'L', 'T', 0, -1, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL ZSYR2K( 'U', 'N', 2, 0, ALPHA, A, 1, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL ZSYR2K( 'U', 'T', 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL ZSYR2K( 'L', 'N', 2, 0, ALPHA, A, 1, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 7\n      CALL ZSYR2K( 'L', 'T', 0, 2, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZSYR2K( 'U', 'N', 2, 0, ALPHA, A, 2, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZSYR2K( 'U', 'T', 0, 2, ALPHA, A, 2, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZSYR2K( 'L', 'N', 2, 0, ALPHA, A, 2, B, 1, BETA, C, 2 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 9\n      CALL ZSYR2K( 'L', 'T', 0, 2, ALPHA, A, 2, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL ZSYR2K( 'U', 'N', 2, 0, ALPHA, A, 2, B, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL ZSYR2K( 'U', 'T', 2, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL ZSYR2K( 'L', 'N', 2, 0, ALPHA, A, 2, B, 2, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n      INFOT = 12\n      CALL ZSYR2K( 'L', 'T', 2, 0, ALPHA, A, 1, B, 1, BETA, C, 1 )\n      CALL CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n*\n  100 IF( OK )THEN\n         WRITE( NOUT, FMT = 9999 )SRNAMT\n      ELSE\n         WRITE( NOUT, FMT = 9998 )SRNAMT\n      END IF\n      RETURN\n*\n 9999 FORMAT( ' ', A6, ' PASSED THE TESTS OF ERROR-EXITS' )\n 9998 FORMAT( ' ******* ', A6, ' FAILED THE TESTS OF ERROR-EXITS *****',\n     $      '**' )\n*\n*     End of ZCHKE.\n*\n      END\n      SUBROUTINE ZMAKE( TYPE, UPLO, DIAG, M, N, A, NMAX, AA, LDA, RESET,\n     $                  TRANSL )\n*\n*  Generates values for an M by N matrix A.\n*  Stores the values in the array AA in the data structure required\n*  by the routine, with unwanted elements set to rogue value.\n*\n*  TYPE is 'GE', 'HE', 'SY' or 'TR'.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Parameters ..\n      COMPLEX*16         ZERO, ONE\n      PARAMETER          ( ZERO = ( 0.0D0, 0.0D0 ),\n     $                   ONE = ( 1.0D0, 0.0D0 ) )\n      COMPLEX*16         ROGUE\n      PARAMETER          ( ROGUE = ( -1.0D10, 1.0D10 ) )\n      DOUBLE PRECISION   RZERO\n      PARAMETER          ( RZERO = 0.0D0 )\n      DOUBLE PRECISION   RROGUE\n      PARAMETER          ( RROGUE = -1.0D10 )\n*     .. Scalar Arguments ..\n      COMPLEX*16         TRANSL\n      INTEGER            LDA, M, N, NMAX\n      LOGICAL            RESET\n      CHARACTER*1        DIAG, UPLO\n      CHARACTER*2        TYPE\n*     .. Array Arguments ..\n      COMPLEX*16         A( NMAX, * ), AA( * )\n*     .. Local Scalars ..\n      INTEGER            I, IBEG, IEND, J, JJ\n      LOGICAL            GEN, HER, LOWER, SYM, TRI, UNIT, UPPER\n*     .. External Functions ..\n      COMPLEX*16         ZBEG\n      EXTERNAL           ZBEG\n*     .. Intrinsic Functions ..\n      INTRINSIC          DCMPLX, DCONJG, DBLE\n*     .. Executable Statements ..\n      GEN = TYPE.EQ.'GE'\n      HER = TYPE.EQ.'HE'\n      SYM = TYPE.EQ.'SY'\n      TRI = TYPE.EQ.'TR'\n      UPPER = ( HER.OR.SYM.OR.TRI ).AND.UPLO.EQ.'U'\n      LOWER = ( HER.OR.SYM.OR.TRI ).AND.UPLO.EQ.'L'\n      UNIT = TRI.AND.DIAG.EQ.'U'\n*\n*     Generate data in array A.\n*\n      DO 20 J = 1, N\n         DO 10 I = 1, M\n            IF( GEN.OR.( UPPER.AND.I.LE.J ).OR.( LOWER.AND.I.GE.J ) )\n     $          THEN\n               A( I, J ) = ZBEG( RESET ) + TRANSL\n               IF( I.NE.J )THEN\n*                 Set some elements to zero\n                  IF( N.GT.3.AND.J.EQ.N/2 )\n     $               A( I, J ) = ZERO\n                  IF( HER )THEN\n                     A( J, I ) = DCONJG( A( I, J ) )\n                  ELSE IF( SYM )THEN\n                     A( J, I ) = A( I, J )\n                  ELSE IF( TRI )THEN\n                     A( J, I ) = ZERO\n                  END IF\n               END IF\n            END IF\n   10    CONTINUE\n         IF( HER )\n     $      A( J, J ) = DCMPLX( DBLE( A( J, J ) ), RZERO )\n         IF( TRI )\n     $      A( J, J ) = A( J, J ) + ONE\n         IF( UNIT )\n     $      A( J, J ) = ONE\n   20 CONTINUE\n*\n*     Store elements in array AS in data structure required by routine.\n*\n      IF( TYPE.EQ.'GE' )THEN\n         DO 50 J = 1, N\n            DO 30 I = 1, M\n               AA( I + ( J - 1 )*LDA ) = A( I, J )\n   30       CONTINUE\n            DO 40 I = M + 1, LDA\n               AA( I + ( J - 1 )*LDA ) = ROGUE\n   40       CONTINUE\n   50    CONTINUE\n      ELSE IF( TYPE.EQ.'HE'.OR.TYPE.EQ.'SY'.OR.TYPE.EQ.'TR' )THEN\n         DO 90 J = 1, N\n            IF( UPPER )THEN\n               IBEG = 1\n               IF( UNIT )THEN\n                  IEND = J - 1\n               ELSE\n                  IEND = J\n               END IF\n            ELSE\n               IF( UNIT )THEN\n                  IBEG = J + 1\n               ELSE\n                  IBEG = J\n               END IF\n               IEND = N\n            END IF\n            DO 60 I = 1, IBEG - 1\n               AA( I + ( J - 1 )*LDA ) = ROGUE\n   60       CONTINUE\n            DO 70 I = IBEG, IEND\n               AA( I + ( J - 1 )*LDA ) = A( I, J )\n   70       CONTINUE\n            DO 80 I = IEND + 1, LDA\n               AA( I + ( J - 1 )*LDA ) = ROGUE\n   80       CONTINUE\n            IF( HER )THEN\n               JJ = J + ( J - 1 )*LDA\n               AA( JJ ) = DCMPLX( DBLE( AA( JJ ) ), RROGUE )\n            END IF\n   90    CONTINUE\n      END IF\n      RETURN\n*\n*     End of ZMAKE.\n*\n      END\n      SUBROUTINE ZMMCH( TRANSA, TRANSB, M, N, KK, ALPHA, A, LDA, B, LDB,\n     $                  BETA, C, LDC, CT, G, CC, LDCC, EPS, ERR, FATAL,\n     $                  NOUT, MV )\n*\n*  Checks the results of the computational tests.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Parameters ..\n      COMPLEX*16         ZERO\n      PARAMETER          ( ZERO = ( 0.0D0, 0.0D0 ) )\n      DOUBLE PRECISION   RZERO, RONE\n      PARAMETER          ( RZERO = 0.0D0, RONE = 1.0D0 )\n*     .. Scalar Arguments ..\n      COMPLEX*16         ALPHA, BETA\n      DOUBLE PRECISION   EPS, ERR\n      INTEGER            KK, LDA, LDB, LDC, LDCC, M, N, NOUT\n      LOGICAL            FATAL, MV\n      CHARACTER*1        TRANSA, TRANSB\n*     .. Array Arguments ..\n      COMPLEX*16         A( LDA, * ), B( LDB, * ), C( LDC, * ),\n     $                   CC( LDCC, * ), CT( * )\n      DOUBLE PRECISION   G( * )\n*     .. Local Scalars ..\n      COMPLEX*16         CL\n      DOUBLE PRECISION   ERRI\n      INTEGER            I, J, K\n      LOGICAL            CTRANA, CTRANB, TRANA, TRANB\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, DIMAG, DCONJG, MAX, DBLE, SQRT\n*     .. Statement Functions ..\n      DOUBLE PRECISION   ABS1\n*     .. Statement Function definitions ..\n      ABS1( CL ) = ABS( DBLE( CL ) ) + ABS( DIMAG( CL ) )\n*     .. Executable Statements ..\n      TRANA = TRANSA.EQ.'T'.OR.TRANSA.EQ.'C'\n      TRANB = TRANSB.EQ.'T'.OR.TRANSB.EQ.'C'\n      CTRANA = TRANSA.EQ.'C'\n      CTRANB = TRANSB.EQ.'C'\n*\n*     Compute expected result, one column at a time, in CT using data\n*     in A, B and C.\n*     Compute gauges in G.\n*\n      DO 220 J = 1, N\n*\n         DO 10 I = 1, M\n            CT( I ) = ZERO\n            G( I ) = RZERO\n   10    CONTINUE\n         IF( .NOT.TRANA.AND..NOT.TRANB )THEN\n            DO 30 K = 1, KK\n               DO 20 I = 1, M\n                  CT( I ) = CT( I ) + A( I, K )*B( K, J )\n                  G( I ) = G( I ) + ABS1( A( I, K ) )*ABS1( B( K, J ) )\n   20          CONTINUE\n   30       CONTINUE\n         ELSE IF( TRANA.AND..NOT.TRANB )THEN\n            IF( CTRANA )THEN\n               DO 50 K = 1, KK\n                  DO 40 I = 1, M\n                     CT( I ) = CT( I ) + DCONJG( A( K, I ) )*B( K, J )\n                     G( I ) = G( I ) + ABS1( A( K, I ) )*\n     $                        ABS1( B( K, J ) )\n   40             CONTINUE\n   50          CONTINUE\n            ELSE\n               DO 70 K = 1, KK\n                  DO 60 I = 1, M\n                     CT( I ) = CT( I ) + A( K, I )*B( K, J )\n                     G( I ) = G( I ) + ABS1( A( K, I ) )*\n     $                        ABS1( B( K, J ) )\n   60             CONTINUE\n   70          CONTINUE\n            END IF\n         ELSE IF( .NOT.TRANA.AND.TRANB )THEN\n            IF( CTRANB )THEN\n               DO 90 K = 1, KK\n                  DO 80 I = 1, M\n                     CT( I ) = CT( I ) + A( I, K )*DCONJG( B( J, K ) )\n                     G( I ) = G( I ) + ABS1( A( I, K ) )*\n     $                        ABS1( B( J, K ) )\n   80             CONTINUE\n   90          CONTINUE\n            ELSE\n               DO 110 K = 1, KK\n                  DO 100 I = 1, M\n                     CT( I ) = CT( I ) + A( I, K )*B( J, K )\n                     G( I ) = G( I ) + ABS1( A( I, K ) )*\n     $                        ABS1( B( J, K ) )\n  100             CONTINUE\n  110          CONTINUE\n            END IF\n         ELSE IF( TRANA.AND.TRANB )THEN\n            IF( CTRANA )THEN\n               IF( CTRANB )THEN\n                  DO 130 K = 1, KK\n                     DO 120 I = 1, M\n                        CT( I ) = CT( I ) + DCONJG( A( K, I ) )*\n     $                            DCONJG( B( J, K ) )\n                        G( I ) = G( I ) + ABS1( A( K, I ) )*\n     $                           ABS1( B( J, K ) )\n  120                CONTINUE\n  130             CONTINUE\n               ELSE\n                  DO 150 K = 1, KK\n                     DO 140 I = 1, M\n                        CT( I ) = CT( I ) + DCONJG( A( K, I ) )*\n     $                            B( J, K )\n                        G( I ) = G( I ) + ABS1( A( K, I ) )*\n     $                           ABS1( B( J, K ) )\n  140                CONTINUE\n  150             CONTINUE\n               END IF\n            ELSE\n               IF( CTRANB )THEN\n                  DO 170 K = 1, KK\n                     DO 160 I = 1, M\n                        CT( I ) = CT( I ) + A( K, I )*\n     $                            DCONJG( B( J, K ) )\n                        G( I ) = G( I ) + ABS1( A( K, I ) )*\n     $                           ABS1( B( J, K ) )\n  160                CONTINUE\n  170             CONTINUE\n               ELSE\n                  DO 190 K = 1, KK\n                     DO 180 I = 1, M\n                        CT( I ) = CT( I ) + A( K, I )*B( J, K )\n                        G( I ) = G( I ) + ABS1( A( K, I ) )*\n     $                           ABS1( B( J, K ) )\n  180                CONTINUE\n  190             CONTINUE\n               END IF\n            END IF\n         END IF\n         DO 200 I = 1, M\n            CT( I ) = ALPHA*CT( I ) + BETA*C( I, J )\n            G( I ) = ABS1( ALPHA )*G( I ) +\n     $               ABS1( BETA )*ABS1( C( I, J ) )\n  200    CONTINUE\n*\n*        Compute the error ratio for this result.\n*\n         ERR = ZERO\n         DO 210 I = 1, M\n            ERRI = ABS1( CT( I ) - CC( I, J ) )/EPS\n            IF( G( I ).NE.RZERO )\n     $         ERRI = ERRI/G( I )\n            ERR = MAX( ERR, ERRI )\n            IF( ERR*SQRT( EPS ).GE.RONE )\n     $         GO TO 230\n  210    CONTINUE\n*\n  220 CONTINUE\n*\n*     If the loop completes, all results are at least half accurate.\n      GO TO 250\n*\n*     Report fatal error.\n*\n  230 FATAL = .TRUE.\n      WRITE( NOUT, FMT = 9999 )\n      DO 240 I = 1, M\n         IF( MV )THEN\n            WRITE( NOUT, FMT = 9998 )I, CT( I ), CC( I, J )\n         ELSE\n            WRITE( NOUT, FMT = 9998 )I, CC( I, J ), CT( I )\n         END IF\n  240 CONTINUE\n      IF( N.GT.1 )\n     $   WRITE( NOUT, FMT = 9997 )J\n*\n  250 CONTINUE\n      RETURN\n*\n 9999 FORMAT( ' ******* FATAL ERROR - COMPUTED RESULT IS LESS THAN HAL',\n     $      'F ACCURATE *******', /'                       EXPECTED RE',\n     $      'SULT                    COMPUTED RESULT' )\n 9998 FORMAT( 1X, I7, 2( '  (', G15.6, ',', G15.6, ')' ) )\n 9997 FORMAT( '      THESE ARE THE RESULTS FOR COLUMN ', I3 )\n*\n*     End of ZMMCH.\n*\n      END\n      LOGICAL FUNCTION LZE( RI, RJ, LR )\n*\n*  Tests if two arrays are identical.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Scalar Arguments ..\n      INTEGER            LR\n*     .. Array Arguments ..\n      COMPLEX*16         RI( * ), RJ( * )\n*     .. Local Scalars ..\n      INTEGER            I\n*     .. Executable Statements ..\n      DO 10 I = 1, LR\n         IF( RI( I ).NE.RJ( I ) )\n     $      GO TO 20\n   10 CONTINUE\n      LZE = .TRUE.\n      GO TO 30\n   20 CONTINUE\n      LZE = .FALSE.\n   30 RETURN\n*\n*     End of LZE.\n*\n      END\n      LOGICAL FUNCTION LZERES( TYPE, UPLO, M, N, AA, AS, LDA )\n*\n*  Tests if selected elements in two arrays are equal.\n*\n*  TYPE is 'GE' or 'HE' or 'SY'.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Scalar Arguments ..\n      INTEGER            LDA, M, N\n      CHARACTER*1        UPLO\n      CHARACTER*2        TYPE\n*     .. Array Arguments ..\n      COMPLEX*16         AA( LDA, * ), AS( LDA, * )\n*     .. Local Scalars ..\n      INTEGER            I, IBEG, IEND, J\n      LOGICAL            UPPER\n*     .. Executable Statements ..\n      UPPER = UPLO.EQ.'U'\n      IF( TYPE.EQ.'GE' )THEN\n         DO 20 J = 1, N\n            DO 10 I = M + 1, LDA\n               IF( AA( I, J ).NE.AS( I, J ) )\n     $            GO TO 70\n   10       CONTINUE\n   20    CONTINUE\n      ELSE IF( TYPE.EQ.'HE'.OR.TYPE.EQ.'SY' )THEN\n         DO 50 J = 1, N\n            IF( UPPER )THEN\n               IBEG = 1\n               IEND = J\n            ELSE\n               IBEG = J\n               IEND = N\n            END IF\n            DO 30 I = 1, IBEG - 1\n               IF( AA( I, J ).NE.AS( I, J ) )\n     $            GO TO 70\n   30       CONTINUE\n            DO 40 I = IEND + 1, LDA\n               IF( AA( I, J ).NE.AS( I, J ) )\n     $            GO TO 70\n   40       CONTINUE\n   50    CONTINUE\n      END IF\n*\n      LZERES = .TRUE.\n      GO TO 80\n   70 CONTINUE\n      LZERES = .FALSE.\n   80 RETURN\n*\n*     End of LZERES.\n*\n      END\n      COMPLEX*16     FUNCTION ZBEG( RESET )\n*\n*  Generates complex numbers as pairs of random numbers uniformly\n*  distributed between -0.5 and 0.5.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Scalar Arguments ..\n      LOGICAL            RESET\n*     .. Local Scalars ..\n      INTEGER            I, IC, J, MI, MJ\n*     .. Save statement ..\n      SAVE               I, IC, J, MI, MJ\n*     .. Intrinsic Functions ..\n      INTRINSIC          DCMPLX\n*     .. Executable Statements ..\n      IF( RESET )THEN\n*        Initialize local variables.\n         MI = 891\n         MJ = 457\n         I = 7\n         J = 7\n         IC = 0\n         RESET = .FALSE.\n      END IF\n*\n*     The sequence of values of I or J is bounded between 1 and 999.\n*     If initial I or J = 1,2,3,6,7 or 9, the period will be 50.\n*     If initial I or J = 4 or 8, the period will be 25.\n*     If initial I or J = 5, the period will be 10.\n*     IC is used to break up the period by skipping 1 value of I or J\n*     in 6.\n*\n      IC = IC + 1\n   10 I = I*MI\n      J = J*MJ\n      I = I - 1000*( I/1000 )\n      J = J - 1000*( J/1000 )\n      IF( IC.GE.5 )THEN\n         IC = 0\n         GO TO 10\n      END IF\n      ZBEG = DCMPLX( ( I - 500 )/1001.0D0, ( J - 500 )/1001.0D0 )\n      RETURN\n*\n*     End of ZBEG.\n*\n      END\n      DOUBLE PRECISION FUNCTION DDIFF( X, Y )\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION   X, Y\n*     .. Executable Statements ..\n      DDIFF = X - Y\n      RETURN\n*\n*     End of DDIFF.\n*\n      END\n      SUBROUTINE CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )\n*\n*  Tests whether XERBLA has detected an error when it should.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Scalar Arguments ..\n      INTEGER            INFOT, NOUT\n      LOGICAL            LERR, OK\n      CHARACTER*6        SRNAMT\n*     .. Executable Statements ..\n      IF( .NOT.LERR )THEN\n         WRITE( NOUT, FMT = 9999 )INFOT, SRNAMT\n         OK = .FALSE.\n      END IF\n      LERR = .FALSE.\n      RETURN\n*\n 9999 FORMAT( ' ***** ILLEGAL VALUE OF PARAMETER NUMBER ', I2, ' NOT D',\n     $      'ETECTED BY ', A6, ' *****' )\n*\n*     End of CHKXER.\n*\n      END\n      SUBROUTINE XERBLA( SRNAME, INFO )\n*\n*  This is a special version of XERBLA to be used only as part of\n*  the test program for testing error exits from the Level 3 BLAS\n*  routines.\n*\n*  XERBLA  is an error handler for the Level 3 BLAS routines.\n*\n*  It is called by the Level 3 BLAS routines if an input parameter is\n*  invalid.\n*\n*  Auxiliary routine for test program for Level 3 Blas.\n*\n*  -- Written on 8-February-1989.\n*     Jack Dongarra, Argonne National Laboratory.\n*     Iain Duff, AERE Harwell.\n*     Jeremy Du Croz, Numerical Algorithms Group Ltd.\n*     Sven Hammarling, Numerical Algorithms Group Ltd.\n*\n*     .. Scalar Arguments ..\n      INTEGER            INFO\n      CHARACTER*6        SRNAME\n*     .. Scalars in Common ..\n      INTEGER            INFOT, NOUT\n      LOGICAL            LERR, OK\n      CHARACTER*6        SRNAMT\n*     .. Common blocks ..\n      COMMON             /INFOC/INFOT, NOUT, OK, LERR\n      COMMON             /SRNAMC/SRNAMT\n*     .. Executable Statements ..\n      LERR = .TRUE.\n      IF( INFO.NE.INFOT )THEN\n         IF( INFOT.NE.0 )THEN\n            WRITE( NOUT, FMT = 9999 )INFO, INFOT\n         ELSE\n            WRITE( NOUT, FMT = 9997 )INFO\n         END IF\n         OK = .FALSE.\n      END IF\n      IF( SRNAME.NE.SRNAMT )THEN\n         WRITE( NOUT, FMT = 9998 )SRNAME, SRNAMT\n         OK = .FALSE.\n      END IF\n      RETURN\n*\n 9999 FORMAT( ' ******* XERBLA WAS CALLED WITH INFO = ', I6, ' INSTEAD',\n     $      ' OF ', I2, ' *******' )\n 9998 FORMAT( ' ******* XERBLA WAS CALLED WITH SRNAME = ', A6, ' INSTE',\n     $      'AD OF ', A6, ' *******' )\n 9997 FORMAT( ' ******* XERBLA WAS CALLED WITH INFO = ', I6,\n     $      ' *******' )\n*\n*     End of XERBLA\n*\n      END\n\n"
  },
  {
    "path": "3rdparty/eigen3/blas/xerbla.cpp",
    "content": "\n#include <stdio.h>\n\n#if (defined __GNUC__) && (!defined __MINGW32__) && (!defined __CYGWIN__)\n#define EIGEN_WEAK_LINKING __attribute__ ((weak))\n#else\n#define EIGEN_WEAK_LINKING\n#endif\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif\n\nEIGEN_WEAK_LINKING int xerbla_(const char * msg, int *info, int)\n{\n  printf(\"Eigen BLAS ERROR #%i: %s\\n\", *info, msg );\n  return 0;\n}\n\n#ifdef __cplusplus\n}\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/cmake/Eigen3Config.cmake.in",
    "content": "# This file exports the Eigen3::Eigen CMake target which should be passed to the\n# target_link_libraries command.\n\n@PACKAGE_INIT@\n\nif (NOT TARGET eigen)\n  include (\"${CMAKE_CURRENT_LIST_DIR}/Eigen3Targets.cmake\")\nendif ()\n\n# Legacy variables, do *not* use. May be removed in the future.\n\nset (EIGEN3_FOUND 1)\nset (EIGEN3_USE_FILE    \"${CMAKE_CURRENT_LIST_DIR}/UseEigen3.cmake\")\n\nset (EIGEN3_DEFINITIONS  \"@EIGEN_DEFINITIONS@\")\nset (EIGEN3_INCLUDE_DIR  \"@PACKAGE_EIGEN_INCLUDE_DIR@\")\nset (EIGEN3_INCLUDE_DIRS \"@PACKAGE_EIGEN_INCLUDE_DIR@\")\nset (EIGEN3_ROOT_DIR     \"@PACKAGE_EIGEN_ROOT_DIR@\")\n\nset (EIGEN3_VERSION_STRING \"@EIGEN_VERSION_STRING@\")\nset (EIGEN3_VERSION_MAJOR  \"@EIGEN_VERSION_MAJOR@\")\nset (EIGEN3_VERSION_MINOR  \"@EIGEN_VERSION_MINOR@\")\nset (EIGEN3_VERSION_PATCH  \"@EIGEN_VERSION_PATCH@\")\n"
  },
  {
    "path": "3rdparty/eigen3/cmake/Eigen3ConfigLegacy.cmake.in",
    "content": "#                                               -*- cmake -*-\n#\n#  Eigen3Config.cmake(.in)\n\n# Use the following variables to compile and link against Eigen:\n#  EIGEN3_FOUND              - True if Eigen was found on your system\n#  EIGEN3_USE_FILE           - The file making Eigen usable\n#  EIGEN3_DEFINITIONS        - Definitions needed to build with Eigen\n#  EIGEN3_INCLUDE_DIR        - Directory where signature_of_eigen3_matrix_library can be found\n#  EIGEN3_INCLUDE_DIRS       - List of directories of Eigen and it's dependencies\n#  EIGEN3_ROOT_DIR           - The base directory of Eigen\n#  EIGEN3_VERSION_STRING     - A human-readable string containing the version\n#  EIGEN3_VERSION_MAJOR      - The major version of Eigen\n#  EIGEN3_VERSION_MINOR      - The minor version of Eigen\n#  EIGEN3_VERSION_PATCH      - The patch version of Eigen\n\n@PACKAGE_INIT@\n\nset ( EIGEN3_FOUND 1 )\nset ( EIGEN3_USE_FILE     \"${CMAKE_CURRENT_LIST_DIR}/UseEigen3.cmake\" )\n\nset ( EIGEN3_DEFINITIONS  \"@EIGEN_DEFINITIONS@\" )\nset ( EIGEN3_INCLUDE_DIR  \"@PACKAGE_EIGEN_INCLUDE_DIR@\" )\nset ( EIGEN3_INCLUDE_DIRS \"@PACKAGE_EIGEN_INCLUDE_DIR@\" )\nset ( EIGEN3_ROOT_DIR     \"@PACKAGE_EIGEN_ROOT_DIR@\" )\n\nset ( EIGEN3_VERSION_STRING \"@EIGEN_VERSION_STRING@\" )\nset ( EIGEN3_VERSION_MAJOR  \"@EIGEN_VERSION_MAJOR@\" )\nset ( EIGEN3_VERSION_MINOR  \"@EIGEN_VERSION_MINOR@\" )\nset ( EIGEN3_VERSION_PATCH  \"@EIGEN_VERSION_PATCH@\" )\n"
  },
  {
    "path": "3rdparty/eigen3/cmake/EigenConfigureTesting.cmake",
    "content": "include(EigenTesting)\ninclude(CheckCXXSourceCompiles)\n\n# configure the \"site\" and \"buildname\" \nei_set_sitename()\n\n# retrieve and store the build string\nei_set_build_string()\n\nadd_custom_target(buildtests)\nadd_custom_target(check COMMAND \"ctest\")\nadd_dependencies(check buildtests)\n\n# check whether /bin/bash exists (disabled as not used anymore)\n# find_file(EIGEN_BIN_BASH_EXISTS \"/bin/bash\" PATHS \"/\" NO_DEFAULT_PATH)\n\n# This call activates testing and generates the DartConfiguration.tcl\ninclude(CTest)\n\nset(EIGEN_TEST_BUILD_FLAGS \"\" CACHE STRING \"Options passed to the build command of unit tests\")\nset(EIGEN_DASHBOARD_BUILD_TARGET \"buildtests\" CACHE STRING \"Target to be built in dashboard mode, default is buildtests\")\nset(EIGEN_CTEST_ERROR_EXCEPTION \"\" CACHE STRING \"Regular expression for build error messages to be filtered out\")\n\n# Overwrite default DartConfiguration.tcl such that ctest can build our unit tests.\n# Recall that our unit tests are not in the \"all\" target, so we have to explicitly ask ctest to build our custom 'buildtests' target.\n# At this stage, we can also add custom flags to the build tool through the user defined EIGEN_TEST_BUILD_FLAGS variable.\nfile(READ  \"${CMAKE_CURRENT_BINARY_DIR}/DartConfiguration.tcl\" EIGEN_DART_CONFIG_FILE)\n# try to grab the default flags\nstring(REGEX MATCH \"MakeCommand:.*-- (.*)\\nDefaultCTestConfigurationType\" EIGEN_DUMMY ${EIGEN_DART_CONFIG_FILE})\nif(NOT CMAKE_MATCH_1)\nstring(REGEX MATCH \"MakeCommand:.*[^c]make (.*)\\nDefaultCTestConfigurationType\" EIGEN_DUMMY ${EIGEN_DART_CONFIG_FILE})\nendif()\nstring(REGEX REPLACE \"MakeCommand:.*DefaultCTestConfigurationType\" \"MakeCommand: ${CMAKE_COMMAND} --build . --target ${EIGEN_DASHBOARD_BUILD_TARGET} --config \\\"\\${CTEST_CONFIGURATION_TYPE}\\\" -- ${CMAKE_MATCH_1} ${EIGEN_TEST_BUILD_FLAGS}\\nDefaultCTestConfigurationType\"\n       EIGEN_DART_CONFIG_FILE2 ${EIGEN_DART_CONFIG_FILE})\nfile(WRITE \"${CMAKE_CURRENT_BINARY_DIR}/DartConfiguration.tcl\" ${EIGEN_DART_CONFIG_FILE2})\n\nconfigure_file(${CMAKE_CURRENT_SOURCE_DIR}/CTestCustom.cmake.in ${CMAKE_BINARY_DIR}/CTestCustom.cmake)\n\n# some documentation of this function would be nice\nei_init_testing()\n\n# configure Eigen related testing options\noption(EIGEN_NO_ASSERTION_CHECKING \"Disable checking of assertions using exceptions\" OFF)\noption(EIGEN_DEBUG_ASSERTS \"Enable advanced debugging of assertions\" OFF)\n\nif(CMAKE_COMPILER_IS_GNUCXX)\n  option(EIGEN_COVERAGE_TESTING \"Enable/disable gcov\" OFF)\n  if(EIGEN_COVERAGE_TESTING)\n    set(COVERAGE_FLAGS \"-fprofile-arcs -ftest-coverage\")\n    set(CTEST_CUSTOM_COVERAGE_EXCLUDE \"/test/\")\n    set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} ${COVERAGE_FLAGS}\")\n  endif()\n  \nelseif(MSVC)\n  set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} /D_CRT_SECURE_NO_WARNINGS /D_SCL_SECURE_NO_WARNINGS\")\nendif()\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/cmake/EigenDetermineOSVersion.cmake",
    "content": "# The utility function DetermineOSVersion aims at providing an\n# improved version of the CMake variable ${CMAKE_SYSTEM} on Windows\n# machines.\n#\n# Usage:\n#  include(EigenDetermineOSVersion)\n#  DetermineOSVersion(OS_VERSION)\n#  message(\"OS: ${OS_VERSION}\")\n\n# - A little helper variable which should not be directly called\nfunction(DetermineShortWindowsName WIN_VERSION win_num_version)\n   if    (${win_num_version} VERSION_EQUAL \"6.1\")\n       set(_version \"win7\")\n   elseif(${win_num_version} VERSION_EQUAL \"6.0\")\n       set(_version \"winVista\")\n   elseif(${win_num_version} VERSION_EQUAL \"5.2\")\n       set(_version \"winXpProf\")\n   elseif(${win_num_version} VERSION_EQUAL \"5.1\")\n       set(_version \"winXp\")\n   elseif(${win_num_version} VERSION_EQUAL \"5.0\")\n       set(_version \"win2000Prof\")\n   else()\n       set(_version \"unknownWin\")\n   endif()\n   set(${WIN_VERSION} ${_version} PARENT_SCOPE)\nendfunction()\n\nfunction(DetermineOSVersion OS_VERSION)\n  if (WIN32 AND CMAKE_HOST_SYSTEM_NAME MATCHES Windows)\n    file (TO_NATIVE_PATH \"$ENV{COMSPEC}\" SHELL)\n    exec_program( ${SHELL} ARGS \"/c\" \"ver\" OUTPUT_VARIABLE ver_output)\n\t\t\t\t\n      string(REGEX MATCHALL \"[0-9]+\"\n           ver_list \"${ver_output}\")\n      list(GET ver_list 0 _major)\t\t   \n      list(GET ver_list 1 _minor)\n\t\t\t\t\n    set(win_num_version ${_major}.${_minor})\n    DetermineShortWindowsName(win_version \"${win_num_version}\")\n    if(win_version)\n      set(${OS_VERSION} ${win_version} PARENT_SCOPE)\n    endif()\n  else()\n    set(${OS_VERSION} ${CMAKE_SYSTEM} PARENT_SCOPE)\n  endif()\nendfunction()\n"
  },
  {
    "path": "3rdparty/eigen3/cmake/EigenDetermineVSServicePack.cmake",
    "content": "include(CMakeDetermineVSServicePack)\n\n# The code is almost identical to the CMake version. The only difference is that we remove\n# _DetermineVSServicePack_FastCheckVersionWithCompiler which lead to errors on some systems.\nfunction(EigenDetermineVSServicePack _pack)\n    if(NOT DETERMINED_VS_SERVICE_PACK OR NOT ${_pack})\n        if(NOT DETERMINED_VS_SERVICE_PACK)\n            _DetermineVSServicePack_CheckVersionWithTryCompile(DETERMINED_VS_SERVICE_PACK _cl_version)\n            if(NOT DETERMINED_VS_SERVICE_PACK)\n                _DetermineVSServicePack_CheckVersionWithTryRun(DETERMINED_VS_SERVICE_PACK _cl_version)\n            endif()\n        endif()\n\n        if(DETERMINED_VS_SERVICE_PACK)\n            if(_cl_version)\n                # Call helper function to determine VS version\n                _DetermineVSServicePackFromCompiler(_sp \"${_cl_version}\")\n              \n                # temporary fix, until CMake catches up\n                if (NOT _sp)\n                    if(${_cl_version} VERSION_EQUAL \"17.00.50727.1\")\n                        set(_sp \"vc110\")\n                    elseif(${_cl_version} VERSION_EQUAL \"17.00.51106.1\")\n                        set(_sp \"vc110sp1\")\n                    elseif(${_cl_version} VERSION_EQUAL \"17.00.60315.1\")\n                        set(_sp \"vc110sp2\")\n                    elseif(${_cl_version} VERSION_EQUAL \"17.00.60610.1\")\n                        set(_sp \"vc110sp3\")\n                    else()\n                        set(_sp ${CMAKE_CXX_COMPILER_VERSION})\n                    endif()\n                endif()\n                \n                if(_sp)\n                    set(${_pack} ${_sp} CACHE INTERNAL\n                        \"The Visual Studio Release with Service Pack\")\n                endif()\n            endif()\n        endif()\n    endif()\nendfunction()\n"
  },
  {
    "path": "3rdparty/eigen3/cmake/EigenTesting.cmake",
    "content": "\nmacro(ei_add_property prop value)\n  get_property(previous GLOBAL PROPERTY ${prop})\n  if ((NOT previous) OR (previous STREQUAL \"\"))\n    set_property(GLOBAL PROPERTY ${prop} \"${value}\")\n  else()\n    set_property(GLOBAL PROPERTY ${prop} \"${previous} ${value}\")\n  endif()\nendmacro()\n\n#internal. See documentation of ei_add_test for details.\nmacro(ei_add_test_internal testname testname_with_suffix)\n  set(targetname ${testname_with_suffix})\n\n  if(EIGEN_ADD_TEST_FILENAME_EXTENSION)\n    set(filename ${testname}.${EIGEN_ADD_TEST_FILENAME_EXTENSION})\n  else()\n    set(filename ${testname}.cpp)\n  endif()\n\n  if(EIGEN_ADD_TEST_FILENAME_EXTENSION STREQUAL cu)\n    if(EIGEN_TEST_HIP)\n      hip_reset_flags()\n      hip_add_executable(${targetname} ${filename} HIPCC_OPTIONS \"-DEIGEN_USE_HIP ${ARGV2}\")\n    elseif(EIGEN_TEST_CUDA_CLANG)\n      set_source_files_properties(${filename} PROPERTIES LANGUAGE CXX)\n      \n      if(CUDA_64_BIT_DEVICE_CODE AND (EXISTS \"${CUDA_TOOLKIT_ROOT_DIR}/lib64\"))\n        link_directories(\"${CUDA_TOOLKIT_ROOT_DIR}/lib64\")\n      else()\n        link_directories(\"${CUDA_TOOLKIT_ROOT_DIR}/lib\")\n      endif()\n\n      if (${ARGC} GREATER 2)\n        add_executable(${targetname} ${filename})\n      else()\n        add_executable(${targetname} ${filename} OPTIONS ${ARGV2})\n      endif()\n      set(CUDA_CLANG_LINK_LIBRARIES \"cudart_static\" \"cuda\" \"dl\" \"pthread\")\n      if (CMAKE_SYSTEM_NAME STREQUAL \"Linux\")\n      set(CUDA_CLANG_LINK_LIBRARIES ${CUDA_CLANG_LINK_LIBRARIES} \"rt\")\n      endif()\n      target_link_libraries(${targetname} ${CUDA_CLANG_LINK_LIBRARIES})\n    else()\n      if (${ARGC} GREATER 2)\n        cuda_add_executable(${targetname} ${filename} OPTIONS ${ARGV2})\n      else()\n        cuda_add_executable(${targetname} ${filename})\n      endif()\n    endif()\n  else()\n    add_executable(${targetname} ${filename})\n  endif()\n\n  if (targetname MATCHES \"^eigen2_\")\n    add_dependencies(eigen2_buildtests ${targetname})\n  else()\n    add_dependencies(buildtests ${targetname})\n  endif()\n\n  if(EIGEN_NO_ASSERTION_CHECKING)\n    ei_add_target_property(${targetname} COMPILE_FLAGS \"-DEIGEN_NO_ASSERTION_CHECKING=1\")\n  else()\n    if(EIGEN_DEBUG_ASSERTS)\n      ei_add_target_property(${targetname} COMPILE_FLAGS \"-DEIGEN_DEBUG_ASSERTS=1\")\n    endif()\n  endif()\n\n  ei_add_target_property(${targetname} COMPILE_FLAGS \"-DEIGEN_TEST_MAX_SIZE=${EIGEN_TEST_MAX_SIZE}\")\n\n  if(MSVC)\n    ei_add_target_property(${targetname} COMPILE_FLAGS \"/bigobj\")\n  endif()\n\n  # let the user pass flags.\n  if(${ARGC} GREATER 2)\n    ei_add_target_property(${targetname} COMPILE_FLAGS \"${ARGV2}\")\n  endif()\n\n  if(EIGEN_TEST_CUSTOM_CXX_FLAGS)\n    ei_add_target_property(${targetname} COMPILE_FLAGS \"${EIGEN_TEST_CUSTOM_CXX_FLAGS}\")\n  endif()\n\n  if(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO)\n    target_link_libraries(${targetname} ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO})\n  endif()\n  if(EXTERNAL_LIBS)\n    target_link_libraries(${targetname} ${EXTERNAL_LIBS})\n  endif()\n  if(EIGEN_TEST_CUSTOM_LINKER_FLAGS)\n    target_link_libraries(${targetname} ${EIGEN_TEST_CUSTOM_LINKER_FLAGS})\n  endif()\n\n  if(${ARGC} GREATER 3)\n    set(libs_to_link ${ARGV3})\n    # it could be that some cmake module provides a bad library string \" \"  (just spaces),\n    # and that severely breaks target_link_libraries (\"can't link to -l-lstdc++\" errors).\n    # so we check for strings containing only spaces.\n    string(STRIP \"${libs_to_link}\" libs_to_link_stripped)\n    string(LENGTH \"${libs_to_link_stripped}\" libs_to_link_stripped_length)\n    if(${libs_to_link_stripped_length} GREATER 0)\n      # notice: no double quotes around ${libs_to_link} here. It may be a list.\n      target_link_libraries(${targetname} ${libs_to_link})\n    endif()\n  endif()\n\n  add_test(${testname_with_suffix} \"${targetname}\")\n\n  # Specify target and test labels according to EIGEN_CURRENT_SUBPROJECT\n  get_property(current_subproject GLOBAL PROPERTY EIGEN_CURRENT_SUBPROJECT)\n  if ((current_subproject) AND (NOT (current_subproject STREQUAL \"\")))\n    set_property(TARGET ${targetname} PROPERTY LABELS \"Build${current_subproject}\")\n    add_dependencies(\"Build${current_subproject}\" ${targetname})\n    set_property(TEST ${testname_with_suffix} PROPERTY LABELS \"${current_subproject}\")\n  endif()\n  if(EIGEN_SYCL)\n    # Force include of the SYCL file at the end to avoid errors.\n    set_property(TARGET ${targetname} PROPERTY COMPUTECPP_INCLUDE_AFTER 1)\n    # Set COMPILE_FLAGS to COMPILE_DEFINITIONS instead to avoid having to duplicate the flags\n    # to the device compiler.\n    get_target_property(target_compile_flags ${targetname} COMPILE_FLAGS)\n    separate_arguments(target_compile_flags)\n    foreach(flag ${target_compile_flags})\n      if(${flag} MATCHES \"^-D.*\")\n        string(REPLACE \"-D\" \"\" definition_flag ${flag})\n        set_property(TARGET ${targetname} APPEND PROPERTY COMPILE_DEFINITIONS ${definition_flag})\n        list(REMOVE_ITEM target_compile_flags ${flag})\n      endif()\n    endforeach()\n    set_property(TARGET ${targetname} PROPERTY COMPILE_FLAGS ${target_compile_flags})\n    # Link against pthread and add sycl to target\n    set(THREADS_PREFER_PTHREAD_FLAG ON)\n    find_package(Threads REQUIRED)\n    target_link_libraries(${targetname} Threads::Threads)\n    add_sycl_to_target(TARGET ${targetname} SOURCES ${filename})\n  endif(EIGEN_SYCL)\nendmacro(ei_add_test_internal)\n# Macro to add a test\n#\n# the unique mandatory parameter testname must correspond to a file\n# <testname>.cpp which follows this pattern:\n#\n# #include \"main.h\"\n# void test_<testname>() { ... }\n#\n# Depending on the contents of that file, this macro can have 2 behaviors,\n# see below.\n#\n# The optional 2nd parameter is libraries to link to.\n#\n# A. Default behavior\n#\n# this macro adds an executable <testname> as well as a ctest test\n# named <testname> too.\n#\n# On platforms with bash simply run:\n#   \"ctest -V\" or \"ctest -V -R <testname>\"\n# On other platform use ctest as usual\n#\n# B. Multi-part behavior\n#\n# If the source file matches the regexp\n#    CALL_SUBTEST_[0-9]+|EIGEN_TEST_PART_[0-9]+\n# then it is interpreted as a multi-part test. The behavior then depends on the\n# CMake option EIGEN_SPLIT_LARGE_TESTS, which is ON by default.\n#\n# If EIGEN_SPLIT_LARGE_TESTS is OFF, the behavior is the same as in A (the multi-part\n# aspect is ignored).\n#\n# If EIGEN_SPLIT_LARGE_TESTS is ON, the test is split into multiple executables\n#   test_<testname>_<N>\n# where N runs from 1 to the greatest occurrence found in the source file. Each of these\n# executables is built passing -DEIGEN_TEST_PART_N. This allows to split large tests\n# into smaller executables.\n#\n# Moreover, targets <testname> are still generated, they\n# have the effect of building all the parts of the test.\n#\n# Again, ctest -R allows to run all matching tests.\nmacro(ei_add_test testname)\n  get_property(EIGEN_TESTS_LIST GLOBAL PROPERTY EIGEN_TESTS_LIST)\n  set(EIGEN_TESTS_LIST \"${EIGEN_TESTS_LIST}${testname}\\n\")\n  set_property(GLOBAL PROPERTY EIGEN_TESTS_LIST \"${EIGEN_TESTS_LIST}\")\n\n  if(EIGEN_ADD_TEST_FILENAME_EXTENSION)\n    set(filename ${testname}.${EIGEN_ADD_TEST_FILENAME_EXTENSION})\n  else()\n    set(filename ${testname}.cpp)\n  endif()\n\n  file(READ \"${filename}\" test_source)\n  string(REGEX MATCHALL \"CALL_SUBTEST_[0-9]+|EIGEN_TEST_PART_[0-9]+|EIGEN_SUFFIXES(;[0-9]+)+\"\n         occurrences \"${test_source}\")\n  string(REGEX REPLACE \"CALL_SUBTEST_|EIGEN_TEST_PART_|EIGEN_SUFFIXES\" \"\" suffixes \"${occurrences}\")\n  list(REMOVE_DUPLICATES suffixes)\n  set(explicit_suffixes \"\")\n  if( (NOT EIGEN_SPLIT_LARGE_TESTS) AND suffixes)\n    # Check whether we have EIGEN_TEST_PART_* statements, in which case we likely must enforce splitting.\n    # For instance, indexed_view activate a different c++ version for each part.\n    string(REGEX MATCHALL \"EIGEN_TEST_PART_[0-9]+\" occurrences \"${test_source}\")\n    string(REGEX REPLACE \"EIGEN_TEST_PART_\" \"\" explicit_suffixes \"${occurrences}\")\n    list(REMOVE_DUPLICATES explicit_suffixes)\n  endif()\n  if( (EIGEN_SPLIT_LARGE_TESTS AND suffixes) OR explicit_suffixes)\n    add_custom_target(${testname})\n    foreach(suffix ${suffixes})\n      ei_add_test_internal(${testname} ${testname}_${suffix}\n        \"${ARGV1} -DEIGEN_TEST_PART_${suffix}=1\" \"${ARGV2}\")\n      add_dependencies(${testname} ${testname}_${suffix})\n    endforeach()\n  else()\n    ei_add_test_internal(${testname} ${testname} \"${ARGV1} -DEIGEN_TEST_PART_ALL=1\" \"${ARGV2}\")\n  endif()\nendmacro()\n\n# adds a failtest, i.e. a test that succeed if the program fails to compile\n# note that the test runner for these is CMake itself, when passed -DEIGEN_FAILTEST=ON\n# so here we're just running CMake commands immediately, we're not adding any targets.\nmacro(ei_add_failtest testname)\n\n  set(test_target_ok ${testname}_ok)\n  set(test_target_ko ${testname}_ko)\n\n  # Add executables\n  add_executable(${test_target_ok} ${testname}.cpp)\n  add_executable(${test_target_ko} ${testname}.cpp)\n\n  # Remove them from the normal build process\n  set_target_properties(${test_target_ok} ${test_target_ko} PROPERTIES\n                        EXCLUDE_FROM_ALL TRUE\n                        EXCLUDE_FROM_DEFAULT_BUILD TRUE)\n\n  # Configure the failing test\n  target_compile_definitions(${test_target_ko} PRIVATE EIGEN_SHOULD_FAIL_TO_BUILD)\n\n  # Add the tests to ctest.\n  add_test(NAME ${test_target_ok}\n          COMMAND ${CMAKE_COMMAND} --build . --target ${test_target_ok} --config $<CONFIGURATION>\n          WORKING_DIRECTORY ${CMAKE_BINARY_DIR})\n  add_test(NAME ${test_target_ko}\n          COMMAND ${CMAKE_COMMAND} --build . --target ${test_target_ko} --config $<CONFIGURATION>\n          WORKING_DIRECTORY ${CMAKE_BINARY_DIR})\n\n  # Expect the second test to fail\n  set_tests_properties(${test_target_ko} PROPERTIES WILL_FAIL TRUE)\nendmacro()\n\n# print a summary of the different options\nmacro(ei_testing_print_summary)\n  message(STATUS \"************************************************************\")\n  message(STATUS \"***    Eigen's unit tests configuration summary          ***\")\n  message(STATUS \"************************************************************\")\n  message(STATUS \"\")\n  message(STATUS \"Build type:        ${CMAKE_BUILD_TYPE}\")\n  message(STATUS \"Build site:        ${SITE}\")\n  message(STATUS \"Build string:      ${BUILDNAME}\")\n  get_property(EIGEN_TESTING_SUMMARY GLOBAL PROPERTY EIGEN_TESTING_SUMMARY)\n  get_property(EIGEN_TESTED_BACKENDS GLOBAL PROPERTY EIGEN_TESTED_BACKENDS)\n  get_property(EIGEN_MISSING_BACKENDS GLOBAL PROPERTY EIGEN_MISSING_BACKENDS)\n  message(STATUS \"Enabled backends:  ${EIGEN_TESTED_BACKENDS}\")\n  message(STATUS \"Disabled backends: ${EIGEN_MISSING_BACKENDS}\")\n\n  if(EIGEN_DEFAULT_TO_ROW_MAJOR)\n    message(STATUS \"Default order:     Row-major\")\n  else()\n    message(STATUS \"Default order:     Column-major\")\n  endif()\n\n  if(EIGEN_TEST_NO_EXPLICIT_ALIGNMENT)\n    message(STATUS \"Explicit alignment (hence vectorization) disabled\")\n  elseif(EIGEN_TEST_NO_EXPLICIT_VECTORIZATION)\n    message(STATUS \"Explicit vectorization disabled (alignment kept enabled)\")\n  else()\n\n  message(STATUS \"Maximal matrix/vector size: ${EIGEN_TEST_MAX_SIZE}\")\n\n    if(EIGEN_TEST_SSE2)\n      message(STATUS \"SSE2:              ON\")\n    else()\n      message(STATUS \"SSE2:              Using architecture defaults\")\n    endif()\n\n    if(EIGEN_TEST_SSE3)\n      message(STATUS \"SSE3:              ON\")\n    else()\n      message(STATUS \"SSE3:              Using architecture defaults\")\n    endif()\n\n    if(EIGEN_TEST_SSSE3)\n      message(STATUS \"SSSE3:             ON\")\n    else()\n      message(STATUS \"SSSE3:             Using architecture defaults\")\n    endif()\n\n    if(EIGEN_TEST_SSE4_1)\n      message(STATUS \"SSE4.1:            ON\")\n    else()\n      message(STATUS \"SSE4.1:            Using architecture defaults\")\n    endif()\n\n    if(EIGEN_TEST_SSE4_2)\n      message(STATUS \"SSE4.2:            ON\")\n    else()\n      message(STATUS \"SSE4.2:            Using architecture defaults\")\n    endif()\n\n    if(EIGEN_TEST_AVX)\n      message(STATUS \"AVX:               ON\")\n    else()\n      message(STATUS \"AVX:               Using architecture defaults\")\n    endif()\n\n    if(EIGEN_TEST_FMA)\n      message(STATUS \"FMA:               ON\")\n    else()\n      message(STATUS \"FMA:               Using architecture defaults\")\n    endif()\n\n    if(EIGEN_TEST_AVX512)\n      message(STATUS \"AVX512:            ON\")\n    else()\n      message(STATUS \"AVX512:            Using architecture defaults\")\n    endif()\n\n    if(EIGEN_TEST_ALTIVEC)\n      message(STATUS \"Altivec:           ON\")\n    else()\n      message(STATUS \"Altivec:           Using architecture defaults\")\n    endif()\n\n    if(EIGEN_TEST_VSX)\n      message(STATUS \"VSX:               ON\")\n    else()\n      message(STATUS \"VSX:               Using architecture defaults\")\n    endif()\n\n    if(EIGEN_TEST_MSA)\n      message(STATUS \"MIPS MSA:          ON\")\n    else()\n      message(STATUS \"MIPS MSA:          Using architecture defaults\")\n    endif()\n\n    if(EIGEN_TEST_NEON)\n      message(STATUS \"ARM NEON:          ON\")\n    else()\n      message(STATUS \"ARM NEON:          Using architecture defaults\")\n    endif()\n\n    if(EIGEN_TEST_NEON64)\n      message(STATUS \"ARMv8 NEON:        ON\")\n    else()\n      message(STATUS \"ARMv8 NEON:        Using architecture defaults\")\n    endif()\n\n    if(EIGEN_TEST_ZVECTOR)\n      message(STATUS \"S390X ZVECTOR:     ON\")\n    else()\n      message(STATUS \"S390X ZVECTOR:     Using architecture defaults\")\n    endif()\n\n    if(EIGEN_TEST_CXX11)\n      message(STATUS \"C++11:             ON\")\n    else()\n      message(STATUS \"C++11:             OFF\")\n    endif()\n\n    if(EIGEN_TEST_SYCL)\n      if(EIGEN_SYCL_TRISYCL)\n        message(STATUS \"SYCL:              ON (using triSYCL)\")\n      else()\n        message(STATUS \"SYCL:              ON (using computeCPP)\")\n      endif()\n    else()\n      message(STATUS \"SYCL:              OFF\")\n    endif()\n    if(EIGEN_TEST_CUDA)\n      if(EIGEN_TEST_CUDA_CLANG)\n        message(STATUS \"CUDA:              ON (using clang)\")\n      else()\n        message(STATUS \"CUDA:              ON (using nvcc)\")\n      endif()\n    else()\n      message(STATUS \"CUDA:              OFF\")\n    endif()\n    if(EIGEN_TEST_HIP)\n      message(STATUS \"HIP:               ON (using hipcc)\")\n    else()\n      message(STATUS \"HIP:               OFF\")\n    endif()\n\n  endif() # vectorization / alignment options\n\n  message(STATUS \"\\n${EIGEN_TESTING_SUMMARY}\")\n\n  message(STATUS \"************************************************************\")\nendmacro()\n\nmacro(ei_init_testing)\n  define_property(GLOBAL PROPERTY EIGEN_CURRENT_SUBPROJECT BRIEF_DOCS \" \" FULL_DOCS \" \")\n  define_property(GLOBAL PROPERTY EIGEN_TESTED_BACKENDS BRIEF_DOCS \" \" FULL_DOCS \" \")\n  define_property(GLOBAL PROPERTY EIGEN_MISSING_BACKENDS BRIEF_DOCS \" \" FULL_DOCS \" \")\n  define_property(GLOBAL PROPERTY EIGEN_TESTING_SUMMARY BRIEF_DOCS \" \" FULL_DOCS \" \")\n  define_property(GLOBAL PROPERTY EIGEN_TESTS_LIST BRIEF_DOCS \" \" FULL_DOCS \" \")\n\n  set_property(GLOBAL PROPERTY EIGEN_TESTED_BACKENDS \"\")\n  set_property(GLOBAL PROPERTY EIGEN_MISSING_BACKENDS \"\")\n  set_property(GLOBAL PROPERTY EIGEN_TESTING_SUMMARY \"\")\n  set_property(GLOBAL PROPERTY EIGEN_TESTS_LIST \"\")\n\n  define_property(GLOBAL PROPERTY EIGEN_FAILTEST_FAILURE_COUNT BRIEF_DOCS \" \" FULL_DOCS \" \")\n  define_property(GLOBAL PROPERTY EIGEN_FAILTEST_COUNT BRIEF_DOCS \" \" FULL_DOCS \" \")\n\n  set_property(GLOBAL PROPERTY EIGEN_FAILTEST_FAILURE_COUNT \"0\")\n  set_property(GLOBAL PROPERTY EIGEN_FAILTEST_COUNT \"0\")\n\n  # uncomment anytime you change the ei_get_compilerver_from_cxx_version_string macro\n  # ei_test_get_compilerver_from_cxx_version_string()\nendmacro()\n\nmacro(ei_set_sitename)\n  # if the sitename is not yet set, try to set it\n  if(NOT ${SITE} OR ${SITE} STREQUAL \"\")\n    set(eigen_computername $ENV{COMPUTERNAME})\n    set(eigen_hostname $ENV{HOSTNAME})\n    if(eigen_hostname)\n      set(SITE ${eigen_hostname})\n    elseif(eigen_computername)\n      set(SITE ${eigen_computername})\n    endif()\n  endif()\n  # in case it is already set, enforce lower case\n  if(SITE)\n    string(TOLOWER ${SITE} SITE)\n  endif()\nendmacro()\n\nmacro(ei_get_compilerver VAR)\n    if(MSVC)\n      # on windows system, we use a modified CMake script\n      include(EigenDetermineVSServicePack)\n      EigenDetermineVSServicePack( my_service_pack )\n\n      if( my_service_pack )\n        set(${VAR} ${my_service_pack})\n      else()\n        set(${VAR} \"na\")\n      endif()\n    elseif(${CMAKE_CXX_COMPILER_ID} MATCHES \"PGI\")\n      set(${VAR} \"${CMAKE_CXX_COMPILER_ID}-${CMAKE_CXX_COMPILER_VERSION}\")\n    else()\n    # on all other system we rely on ${CMAKE_CXX_COMPILER}\n    # supporting a \"--version\" or \"/version\" flag\n\n    if(WIN32 AND ${CMAKE_CXX_COMPILER_ID} EQUAL \"Intel\")\n      set(EIGEN_CXX_FLAG_VERSION \"/version\")\n    else()\n      set(EIGEN_CXX_FLAG_VERSION \"--version\")\n    endif()\n\n    execute_process(COMMAND ${CMAKE_CXX_COMPILER} ${EIGEN_CXX_FLAG_VERSION}\n                    OUTPUT_VARIABLE eigen_cxx_compiler_version_string OUTPUT_STRIP_TRAILING_WHITESPACE)\n    string(REGEX REPLACE \"[\\n\\r].*\"  \"\"  eigen_cxx_compiler_version_string  ${eigen_cxx_compiler_version_string})\n\n    ei_get_compilerver_from_cxx_version_string(\"${eigen_cxx_compiler_version_string}\" CNAME CVER)\n    set(${VAR} \"${CNAME}-${CVER}\")\n\n  endif()\nendmacro()\n\n# Extract compiler name and version from a raw version string\n# WARNING: if you edit thid macro, then please test it by  uncommenting\n# the testing macro call in ei_init_testing() of the EigenTesting.cmake file.\n# See also the ei_test_get_compilerver_from_cxx_version_string macro at the end of the file\nmacro(ei_get_compilerver_from_cxx_version_string VERSTRING CNAME CVER)\n  # extract possible compiler names\n  string(REGEX MATCH \"g\\\\+\\\\+\"      ei_has_gpp    ${VERSTRING})\n  string(REGEX MATCH \"llvm|LLVM\"    ei_has_llvm   ${VERSTRING})\n  string(REGEX MATCH \"gcc|GCC\"      ei_has_gcc    ${VERSTRING})\n  string(REGEX MATCH \"icpc|ICC\"     ei_has_icpc   ${VERSTRING})\n  string(REGEX MATCH \"clang|CLANG\"  ei_has_clang  ${VERSTRING})\n\n  # combine them\n  if((ei_has_llvm) AND (ei_has_gpp OR ei_has_gcc))\n    set(${CNAME} \"llvm-g++\")\n  elseif((ei_has_llvm) AND (ei_has_clang))\n    set(${CNAME} \"llvm-clang++\")\n  elseif(ei_has_clang)\n    set(${CNAME} \"clang++\")\n  elseif(ei_has_icpc)\n    set(${CNAME} \"icpc\")\n  elseif(ei_has_gpp OR ei_has_gcc)\n    set(${CNAME} \"g++\")\n  else()\n    set(${CNAME} \"_\")\n  endif()\n\n  # extract possible version numbers\n  # first try to extract 3 isolated numbers:\n  string(REGEX MATCH \" [0-9]+\\\\.[0-9]+\\\\.[0-9]+\" eicver ${VERSTRING})\n  if(NOT eicver)\n    # try to extract 2 isolated ones:\n    string(REGEX MATCH \" [0-9]+\\\\.[0-9]+\" eicver ${VERSTRING})\n    if(NOT eicver)\n      # try to extract 3:\n      string(REGEX MATCH \"[^0-9][0-9]+\\\\.[0-9]+\\\\.[0-9]+\" eicver ${VERSTRING})\n      if(NOT eicver)\n        # try to extract 2:\n        string(REGEX MATCH \"[^0-9][0-9]+\\\\.[0-9]+\" eicver ${VERSTRING})\n      else()\n        set(eicver \" _\")\n      endif()\n    endif()\n  endif()\n\n  string(REGEX REPLACE \".(.*)\" \"\\\\1\" ${CVER} ${eicver})\n\nendmacro()\n\nmacro(ei_get_cxxflags VAR)\n  set(${VAR} \"\")\n  ei_is_64bit_env(IS_64BIT_ENV)\n  if(EIGEN_TEST_NEON)\n    set(${VAR} NEON)\n  elseif(EIGEN_TEST_NEON64)\n    set(${VAR} NEON)\n  elseif(EIGEN_TEST_ZVECTOR)\n    set(${VAR} ZVECTOR)\n  elseif(EIGEN_TEST_VSX)\n    set(${VAR} VSX)\n  elseif(EIGEN_TEST_ALTIVEC)\n    set(${VAR} ALVEC)\n  elseif(EIGEN_TEST_FMA)\n    set(${VAR} FMA)\n  elseif(EIGEN_TEST_AVX)\n    set(${VAR} AVX)\n  elseif(EIGEN_TEST_SSE4_2)\n    set(${VAR} SSE42)\n  elseif(EIGEN_TEST_SSE4_1)\n    set(${VAR} SSE41)\n  elseif(EIGEN_TEST_SSSE3)\n    set(${VAR} SSSE3)\n  elseif(EIGEN_TEST_SSE3)\n    set(${VAR} SSE3)\n  elseif(EIGEN_TEST_SSE2 OR IS_64BIT_ENV)\n    set(${VAR} SSE2)\n  elseif(EIGEN_TEST_MSA)\n    set(${VAR} MSA)\n  endif()\n\n  if(EIGEN_TEST_OPENMP)\n    if (${VAR} STREQUAL \"\")\n      set(${VAR} OMP)\n    else()\n      set(${VAR} ${${VAR}}-OMP)\n    endif()\n  endif()\n\n  if(EIGEN_DEFAULT_TO_ROW_MAJOR)\n    if (${VAR} STREQUAL \"\")\n      set(${VAR} ROW)\n    else()\n      set(${VAR} ${${VAR}}-ROWMAJ)\n    endif()\n  endif()\nendmacro()\n\nmacro(ei_set_build_string)\n  ei_get_compilerver(LOCAL_COMPILER_VERSION)\n  ei_get_cxxflags(LOCAL_COMPILER_FLAGS)\n\n  include(EigenDetermineOSVersion)\n  DetermineOSVersion(OS_VERSION)\n\n  set(TMP_BUILD_STRING ${OS_VERSION}-${LOCAL_COMPILER_VERSION})\n\n  if (NOT ${LOCAL_COMPILER_FLAGS} STREQUAL  \"\")\n    set(TMP_BUILD_STRING ${TMP_BUILD_STRING}-${LOCAL_COMPILER_FLAGS})\n  endif()\n\n  if(EIGEN_TEST_EXTERNAL_BLAS)\n    set(TMP_BUILD_STRING ${TMP_BUILD_STRING}-external_blas)\n  endif()\n\n  ei_is_64bit_env(IS_64BIT_ENV)\n  if(NOT IS_64BIT_ENV)\n    set(TMP_BUILD_STRING ${TMP_BUILD_STRING}-32bit)\n  else()\n    set(TMP_BUILD_STRING ${TMP_BUILD_STRING}-64bit)\n  endif()\n\n  if(EIGEN_TEST_CXX11)\n    set(TMP_BUILD_STRING ${TMP_BUILD_STRING}-cxx11)\n  endif()\n\n  if(EIGEN_BUILD_STRING_SUFFIX)\n    set(TMP_BUILD_STRING ${TMP_BUILD_STRING}-${EIGEN_BUILD_STRING_SUFFIX})\n  endif()\n\n  string(TOLOWER ${TMP_BUILD_STRING} BUILDNAME)\nendmacro()\n\nmacro(ei_is_64bit_env VAR)\n  if(CMAKE_SIZEOF_VOID_P EQUAL 8)\n    set(${VAR} 1)\n  elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)\n    set(${VAR} 0)\n  else()\n    message(WARNING \"Unsupported pointer size. Please contact the authors.\")\n  endif()\nendmacro()\n\n\n# helper macro for testing ei_get_compilerver_from_cxx_version_string\n# STR: raw version string\n# REFNAME: expected compiler name\n# REFVER: expected compiler version\nmacro(ei_test1_get_compilerver_from_cxx_version_string STR REFNAME REFVER)\n  ei_get_compilerver_from_cxx_version_string(${STR} CNAME CVER)\n  if((NOT ${REFNAME} STREQUAL ${CNAME}) OR (NOT ${REFVER} STREQUAL ${CVER}))\n    message(\"STATUS ei_get_compilerver_from_cxx_version_string error:\")\n    message(\"Expected \\\"${REFNAME}-${REFVER}\\\", got \\\"${CNAME}-${CVER}\\\"\")\n  endif()\nendmacro()\n\n# macro for testing ei_get_compilerver_from_cxx_version_string\n# feel free to add more version strings\nmacro(ei_test_get_compilerver_from_cxx_version_string)\n  ei_test1_get_compilerver_from_cxx_version_string(\"g++ (SUSE Linux) 4.5.3 20110428 [gcc-4_5-branch revision 173117]\" \"g++\" \"4.5.3\")\n  ei_test1_get_compilerver_from_cxx_version_string(\"c++ (GCC) 4.5.1 20100924 (Red Hat 4.5.1-4)\" \"g++\" \"4.5.1\")\n  ei_test1_get_compilerver_from_cxx_version_string(\"icpc (ICC) 11.0 20081105\" \"icpc\" \"11.0\")\n  ei_test1_get_compilerver_from_cxx_version_string(\"g++-3.4 (GCC) 3.4.6\" \"g++\" \"3.4.6\")\n  ei_test1_get_compilerver_from_cxx_version_string(\"SUSE Linux clang version 3.0 (branches/release_30 145598) (based on LLVM 3.0)\" \"llvm-clang++\" \"3.0\")\n  ei_test1_get_compilerver_from_cxx_version_string(\"icpc (ICC) 12.0.5 20110719\" \"icpc\" \"12.0.5\")\n  ei_test1_get_compilerver_from_cxx_version_string(\"Apple clang version 2.1 (tags/Apple/clang-163.7.1) (based on LLVM 3.0svn)\" \"llvm-clang++\" \"2.1\")\n  ei_test1_get_compilerver_from_cxx_version_string(\"i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)\" \"llvm-g++\" \"4.2.1\")\n  ei_test1_get_compilerver_from_cxx_version_string(\"g++-mp-4.4 (GCC) 4.4.6\" \"g++\" \"4.4.6\")\n  ei_test1_get_compilerver_from_cxx_version_string(\"g++-mp-4.4 (GCC) 2011\" \"g++\" \"4.4\")\nendmacro()\n"
  },
  {
    "path": "3rdparty/eigen3/cmake/EigenUninstall.cmake",
    "content": "################ CMake Uninstall Template #######################\n# CMake Template file for uninstallation of files\n# mentioned in 'install_manifest.txt'\n#\n# Used by uinstall target\n#################################################################\n\nset(MANIFEST \"${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt\")\n\nif(EXISTS ${MANIFEST})\n  message(STATUS \"============== Uninstalling Eigen  ===================\")\n\n  file(STRINGS ${MANIFEST} files)\n  foreach(file ${files})\n    if(EXISTS ${file})\n      message(STATUS \"Removing file: '${file}'\")\n\n      execute_process(\n        COMMAND ${CMAKE_COMMAND} -E remove ${file}\n        OUTPUT_VARIABLE rm_out\n        RESULT_VARIABLE rm_retval\n        )\n\n      if(NOT \"${rm_retval}\" STREQUAL 0)\n        message(FATAL_ERROR \"Failed to remove file: '${file}'.\")\n      endif()\n    else()\n      message(STATUS \"File '${file}' does not exist.\")\n    endif()\n  endforeach()\n\n  message(STATUS \"========== Finished Uninstalling Eigen  ==============\")\nelse()\n  message(STATUS \"Cannot find install manifest: '${MANIFEST}'\")\n  message(STATUS \"Probably make install has not been performed\")\n  message(STATUS \"   or install_manifest.txt has been deleted.\")\nendif()\n\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/cmake/FindAdolc.cmake",
    "content": "\nif (ADOLC_INCLUDES AND ADOLC_LIBRARIES)\n  set(ADOLC_FIND_QUIETLY TRUE)\nendif ()\n\nfind_path(ADOLC_INCLUDES\n  NAMES\n  adolc/adtl.h\n  PATHS\n  $ENV{ADOLCDIR}\n  ${INCLUDE_INSTALL_DIR}\n)\n\nfind_library(ADOLC_LIBRARIES adolc PATHS $ENV{ADOLCDIR} ${LIB_INSTALL_DIR})\n\ninclude(FindPackageHandleStandardArgs)\nfind_package_handle_standard_args(ADOLC DEFAULT_MSG\n                                  ADOLC_INCLUDES ADOLC_LIBRARIES)\n\nmark_as_advanced(ADOLC_INCLUDES ADOLC_LIBRARIES)\n"
  },
  {
    "path": "3rdparty/eigen3/cmake/FindBLAS.cmake",
    "content": "###\n#\n# @copyright (c) 2009-2014 The University of Tennessee and The University\n#                          of Tennessee Research Foundation.\n#                          All rights reserved.\n# @copyright (c) 2012-2016 Inria. All rights reserved.\n# @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.\n#\n###\n#\n# - Find BLAS library\n# This module finds an installed fortran library that implements the BLAS\n# linear-algebra interface (see http://www.netlib.org/blas/).\n# The list of libraries searched for is taken\n# from the autoconf macro file, acx_blas.m4 (distributed at\n# http://ac-archive.sourceforge.net/ac-archive/acx_blas.html).\n#\n# This module sets the following variables:\n#  BLAS_FOUND - set to true if a library implementing the BLAS interface\n#    is found\n#  BLAS_LINKER_FLAGS - uncached list of required linker flags (excluding -l\n#    and -L).\n#  BLAS_COMPILER_FLAGS - uncached list of required compiler flags (including -I for mkl headers).\n#  BLAS_LIBRARIES - uncached list of libraries (using full path name) to\n#    link against to use BLAS\n#  BLAS95_LIBRARIES - uncached list of libraries (using full path name)\n#    to link against to use BLAS95 interface\n#  BLAS95_FOUND - set to true if a library implementing the BLAS f95 interface\n#    is found\n#  BLA_STATIC  if set on this determines what kind of linkage we do (static)\n#  BLA_VENDOR  if set checks only the specified vendor, if not set checks\n#     all the possibilities\n#  BLAS_VENDOR_FOUND stores the BLAS vendor found \n#  BLA_F95     if set on tries to find the f95 interfaces for BLAS/LAPACK\n# The user can give specific paths where to find the libraries adding cmake\n# options at configure (ex: cmake path/to/project -DBLAS_DIR=path/to/blas):\n#  BLAS_DIR            - Where to find the base directory of blas\n#  BLAS_INCDIR         - Where to find the header files\n#  BLAS_LIBDIR         - Where to find the library files\n# The module can also look for the following environment variables if paths\n# are not given as cmake variable: BLAS_DIR, BLAS_INCDIR, BLAS_LIBDIR\n# For MKL case and if no paths are given as hints, we will try to use the MKLROOT\n# environment variable\n#  BLAS_VERBOSE Print some additional information during BLAS libraries detection\n##########\n### List of vendors (BLA_VENDOR) valid in this module\n########## List of vendors (BLA_VENDOR) valid in this module\n##  Open (for OpenBlas), Eigen (for EigenBlas), Goto, ATLAS PhiPACK,\n##  CXML, DXML, SunPerf, SCSL, SGIMATH, IBMESSL, IBMESSLMT\n##  Intel10_32 (intel mkl v10 32 bit), Intel10_64lp (intel mkl v10 64 bit,lp thread model, lp64 model),\n##  Intel10_64lp_seq (intel mkl v10 64 bit,sequential code, lp64 model),\n##  Intel( older versions of mkl 32 and 64 bit),\n##  ACML, ACML_MP, ACML_GPU, Apple, NAS, Generic\n# C/CXX should be enabled to use Intel mkl\n###\n# We handle different modes to find the dependency\n#\n# - Detection if already installed on the system\n#   - BLAS libraries can be detected from different ways\n#     Here is the order of precedence:\n#     1) we look in cmake variable BLAS_LIBDIR or BLAS_DIR (we guess the libdirs) if defined\n#     2) we look in environment variable BLAS_LIBDIR or BLAS_DIR (we guess the libdirs) if defined\n#     3) we look in common environnment variables depending on the system (INCLUDE, C_INCLUDE_PATH, CPATH - LIB, DYLD_LIBRARY_PATH, LD_LIBRARY_PATH)\n#     4) we look in common system paths depending on the system, see for example paths contained in the following cmake variables:\n#       - CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES, CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES\n#       - CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES, CMAKE_C_IMPLICIT_LINK_DIRECTORIES\n#\n\n#=============================================================================\n# Copyright 2007-2009 Kitware, Inc.\n#\n# Distributed under the OSI-approved BSD License (the \"License\");\n# see accompanying file Copyright.txt for details.\n#\n# This software is distributed WITHOUT ANY WARRANTY; without even the\n# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n# See the License for more information.\n#=============================================================================\n# (To distribute this file outside of CMake, substitute the full\n#  License text for the above reference.)\n\n## Some macros to print status when search for headers and libs\n# This macro informs why the _lib_to_find file has not been found\nmacro(Print_Find_Library_Blas_Status _libname _lib_to_find)\n\n  # save _libname upper/lower case\n  string(TOUPPER ${_libname} LIBNAME)\n  string(TOLOWER ${_libname} libname)\n\n  # print status\n  #message(\" \")\n  if(${LIBNAME}_LIBDIR)\n    message(\"${Yellow}${LIBNAME}_LIBDIR is defined but ${_lib_to_find}\"\n      \"has not been found in ${ARGN}${ColourReset}\")\n  else()\n    if(${LIBNAME}_DIR)\n      message(\"${Yellow}${LIBNAME}_DIR is defined but ${_lib_to_find}\"\n\t\"has not been found in ${ARGN}${ColourReset}\")\n    else()\n      message(\"${Yellow}${_lib_to_find} not found.\"\n\t\"Nor ${LIBNAME}_DIR neither ${LIBNAME}_LIBDIR\"\n\t\"are defined so that we look for ${_lib_to_find} in\"\n\t\"system paths (Linux: LD_LIBRARY_PATH, Windows: LIB,\"\n\t\"Mac: DYLD_LIBRARY_PATH,\"\n\t\"CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES,\"\n\t\"CMAKE_C_IMPLICIT_LINK_DIRECTORIES)${ColourReset}\")\n      if(_lib_env)\n\tmessage(\"${Yellow}${_lib_to_find} has not been found in\"\n\t  \"${_lib_env}${ColourReset}\")\n      endif()\n    endif()\n  endif()\n  message(\"${BoldYellow}Please indicate where to find ${_lib_to_find}. You have three options:\\n\"\n    \"- Option 1: Provide the Installation directory of BLAS library with cmake option: -D${LIBNAME}_DIR=your/path/to/${libname}/\\n\"\n    \"- Option 2: Provide the directory where to find the library with cmake option: -D${LIBNAME}_LIBDIR=your/path/to/${libname}/lib/\\n\"\n    \"- Option 3: Update your environment variable (Linux: LD_LIBRARY_PATH, Windows: LIB, Mac: DYLD_LIBRARY_PATH)\\n\"\n    \"- Option 4: If your library provides a PkgConfig file, make sure pkg-config finds your library${ColourReset}\")\n\nendmacro()\n\n# This macro informs why the _lib_to_find file has not been found\nmacro(Print_Find_Library_Blas_CheckFunc_Status _name)\n\n  # save _libname upper/lower case\n  string(TOUPPER ${_name} FUNCNAME)\n  string(TOLOWER ${_name} funcname)\n\n  # print status\n  #message(\" \")\n  message(\"${Red}Libs have been found but check of symbol ${_name} failed \"\n    \"with following libraries ${ARGN}${ColourReset}\")\n  message(\"${BoldRed}Please open your error file CMakeFiles/CMakeError.log\"\n    \"to figure out why it fails${ColourReset}\")\n  #message(\" \")\n\nendmacro()\n\nif (NOT BLAS_FOUND)\n  set(BLAS_DIR \"\" CACHE PATH \"Installation directory of BLAS library\")\n  if (NOT BLAS_FIND_QUIETLY)\n    message(STATUS \"A cache variable, namely BLAS_DIR, has been set to specify the install directory of BLAS\")\n  endif()\nendif()\n\noption(BLAS_VERBOSE \"Print some additional information during BLAS libraries detection\" OFF)\nmark_as_advanced(BLAS_VERBOSE)\n\ninclude(CheckFunctionExists)\ninclude(CheckFortranFunctionExists)\n\nset(_blas_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})\n\n# Check the language being used\nget_property( _LANGUAGES_ GLOBAL PROPERTY ENABLED_LANGUAGES )\nif( _LANGUAGES_ MATCHES Fortran AND CMAKE_Fortran_COMPILER)\n  set( _CHECK_FORTRAN TRUE )\nelseif( (_LANGUAGES_ MATCHES C) OR (_LANGUAGES_ MATCHES CXX) )\n  set( _CHECK_FORTRAN FALSE )\nelse()\n  if(BLAS_FIND_REQUIRED)\n    message(FATAL_ERROR \"FindBLAS requires Fortran, C, or C++ to be enabled.\")\n  else()\n    message(STATUS \"Looking for BLAS... - NOT found (Unsupported languages)\")\n    return()\n  endif()\nendif()\n\nmacro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list _thread)\n  # This macro checks for the existence of the combination of fortran libraries\n  # given by _list.  If the combination is found, this macro checks (using the\n  # Check_Fortran_Function_Exists macro) whether can link against that library\n  # combination using the name of a routine given by _name using the linker\n  # flags given by _flags.  If the combination of libraries is found and passes\n  # the link test, LIBRARIES is set to the list of complete library paths that\n  # have been found.  Otherwise, LIBRARIES is set to FALSE.\n\n  # N.B. _prefix is the prefix applied to the names of all cached variables that\n  # are generated internally and marked advanced by this macro.\n\n  set(_libdir ${ARGN})\n\n  set(_libraries_work TRUE)\n  set(${LIBRARIES})\n  set(_combined_name)\n  set(ENV_MKLROOT \"$ENV{MKLROOT}\")\n  set(ENV_BLAS_DIR \"$ENV{BLAS_DIR}\")\n  set(ENV_BLAS_LIBDIR \"$ENV{BLAS_LIBDIR}\")\n  if (NOT _libdir)\n    if (BLAS_LIBDIR)\n      list(APPEND _libdir \"${BLAS_LIBDIR}\")\n    elseif (BLAS_DIR)\n      list(APPEND _libdir \"${BLAS_DIR}\")\n      list(APPEND _libdir \"${BLAS_DIR}/lib\")\n      if(\"${CMAKE_SIZEOF_VOID_P}\" EQUAL \"8\")\n\tlist(APPEND _libdir \"${BLAS_DIR}/lib64\")\n\tlist(APPEND _libdir \"${BLAS_DIR}/lib/intel64\")\n      else()\n\tlist(APPEND _libdir \"${BLAS_DIR}/lib32\")\n\tlist(APPEND _libdir \"${BLAS_DIR}/lib/ia32\")\n      endif()\n    elseif(ENV_BLAS_LIBDIR)\n      list(APPEND _libdir \"${ENV_BLAS_LIBDIR}\")\n    elseif(ENV_BLAS_DIR)\n      list(APPEND _libdir \"${ENV_BLAS_DIR}\")\n      list(APPEND _libdir \"${ENV_BLAS_DIR}/lib\")\n      if(\"${CMAKE_SIZEOF_VOID_P}\" EQUAL \"8\")\n\tlist(APPEND _libdir \"${ENV_BLAS_DIR}/lib64\")\n\tlist(APPEND _libdir \"${ENV_BLAS_DIR}/lib/intel64\")\n      else()\n\tlist(APPEND _libdir \"${ENV_BLAS_DIR}/lib32\")\n\tlist(APPEND _libdir \"${ENV_BLAS_DIR}/lib/ia32\")\n      endif()\n    else()\n      if (ENV_MKLROOT)\n\tlist(APPEND _libdir \"${ENV_MKLROOT}/lib\")\n\tif(\"${CMAKE_SIZEOF_VOID_P}\" EQUAL \"8\")\n\t  list(APPEND _libdir \"${ENV_MKLROOT}/lib64\")\n\t  list(APPEND _libdir \"${ENV_MKLROOT}/lib/intel64\")\n\telse()\n\t  list(APPEND _libdir \"${ENV_MKLROOT}/lib32\")\n\t  list(APPEND _libdir \"${ENV_MKLROOT}/lib/ia32\")\n\tendif()\n      endif()\n      if (WIN32)\n\tstring(REPLACE \":\" \";\" _libdir2 \"$ENV{LIB}\")\n      elseif (APPLE)\n\tstring(REPLACE \":\" \";\" _libdir2 \"$ENV{DYLD_LIBRARY_PATH}\")\n      else ()\n\tstring(REPLACE \":\" \";\" _libdir2 \"$ENV{LD_LIBRARY_PATH}\")\n      endif ()\n      list(APPEND _libdir \"${_libdir2}\")\n      list(APPEND _libdir \"${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}\")\n      list(APPEND _libdir \"${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}\")\n    endif()\n  endif ()\n\n  if (BLAS_VERBOSE)\n    message(\"${Cyan}Try to find BLAS libraries: ${_list}\")\n  endif ()\n\n  foreach(_library ${_list})\n    set(_combined_name ${_combined_name}_${_library})\n\n    if(_libraries_work)\n      if (BLA_STATIC)\n\tif (WIN32)\n\t  set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES})\n\tendif ()\n\tif (APPLE)\n\t  set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES})\n\telse ()\n\t  set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})\n\tendif ()\n      else ()\n\tif (CMAKE_SYSTEM_NAME STREQUAL \"Linux\")\n\t  # for ubuntu's libblas3gf and liblapack3gf packages\n\t  set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES} .so.3gf)\n\tendif ()\n      endif ()\n      find_library(${_prefix}_${_library}_LIBRARY\n\tNAMES ${_library}\n\tHINTS ${_libdir}\n\tNO_DEFAULT_PATH\n\t)\n      mark_as_advanced(${_prefix}_${_library}_LIBRARY)\n      # Print status if not found\n      # -------------------------\n      if (NOT ${_prefix}_${_library}_LIBRARY AND NOT BLAS_FIND_QUIETLY AND BLAS_VERBOSE)\n\tPrint_Find_Library_Blas_Status(blas ${_library} ${_libdir})\n      endif ()\n      set(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY})\n      set(_libraries_work ${${_prefix}_${_library}_LIBRARY})\n    endif()\n  endforeach()\n\n  if(_libraries_work)\n    # Test this combination of libraries.\n    if (CMAKE_SYSTEM_NAME STREQUAL \"Linux\" AND BLA_STATIC)\n      list(INSERT ${LIBRARIES} 0 \"-Wl,--start-group\")\n      list(APPEND ${LIBRARIES} \"-Wl,--end-group\")\n    endif()\n    set(CMAKE_REQUIRED_LIBRARIES \"${_flags};${${LIBRARIES}};${_thread}\")\n    set(CMAKE_REQUIRED_FLAGS \"${BLAS_COMPILER_FLAGS}\")\n    if (BLAS_VERBOSE)\n      message(\"${Cyan}BLAS libs found for BLA_VENDOR ${BLA_VENDOR}.\"\n\t\"Try to compile symbol ${_name} with following libraries:\"\n\t\"${CMAKE_REQUIRED_LIBRARIES}\")\n    endif ()\n    if(NOT BLAS_FOUND)\n      unset(${_prefix}${_combined_name}_WORKS CACHE)\n    endif()\n    if (_CHECK_FORTRAN)\n      if (CMAKE_Fortran_COMPILER_ID STREQUAL \"GNU\")\n\tstring(REPLACE \"mkl_intel_lp64\" \"mkl_gf_lp64\" CMAKE_REQUIRED_LIBRARIES \"${CMAKE_REQUIRED_LIBRARIES}\")\n\tstring(REPLACE \"mkl_intel_ilp64\" \"mkl_gf_ilp64\" CMAKE_REQUIRED_LIBRARIES \"${CMAKE_REQUIRED_LIBRARIES}\")\n      endif()\n      check_fortran_function_exists(\"${_name}\" ${_prefix}${_combined_name}_WORKS)\n    else()\n      check_function_exists(\"${_name}_\" ${_prefix}${_combined_name}_WORKS)\n    endif()\n    mark_as_advanced(${_prefix}${_combined_name}_WORKS)\n    set(_libraries_work ${${_prefix}${_combined_name}_WORKS})\n    # Print status if not found\n    # -------------------------\n    if (NOT _libraries_work AND NOT BLAS_FIND_QUIETLY AND BLAS_VERBOSE)\n      Print_Find_Library_Blas_CheckFunc_Status(${_name} ${CMAKE_REQUIRED_LIBRARIES})\n    endif ()\n    set(CMAKE_REQUIRED_LIBRARIES)\n  endif()\n\n  if(_libraries_work)\n    set(${LIBRARIES} ${${LIBRARIES}} ${_thread})\n  else()\n    set(${LIBRARIES} FALSE)\n  endif()\n\nendmacro()\n\n\nset(BLAS_LINKER_FLAGS)\nset(BLAS_LIBRARIES)\nset(BLAS95_LIBRARIES)\nif ($ENV{BLA_VENDOR} MATCHES \".+\")\n  set(BLA_VENDOR $ENV{BLA_VENDOR})\nelse ()\n  if(NOT BLA_VENDOR)\n    set(BLA_VENDOR \"All\")\n  endif()\nendif ()\n\n#BLAS in intel mkl 10 library? (em64t 64bit)\nif (BLA_VENDOR MATCHES \"Intel*\" OR BLA_VENDOR STREQUAL \"All\")\n\n  if(NOT BLAS_LIBRARIES OR BLA_VENDOR MATCHES \"Intel*\")\n    # Looking for include\n    # -------------------\n\n    # Add system include paths to search include\n    # ------------------------------------------\n    unset(_inc_env)\n    set(ENV_MKLROOT \"$ENV{MKLROOT}\")\n    set(ENV_BLAS_DIR \"$ENV{BLAS_DIR}\")\n    set(ENV_BLAS_INCDIR \"$ENV{BLAS_INCDIR}\")\n    if(ENV_BLAS_INCDIR)\n      list(APPEND _inc_env \"${ENV_BLAS_INCDIR}\")\n    elseif(ENV_BLAS_DIR)\n      list(APPEND _inc_env \"${ENV_BLAS_DIR}\")\n      list(APPEND _inc_env \"${ENV_BLAS_DIR}/include\")\n    else()\n      if (ENV_MKLROOT)\n\tlist(APPEND _inc_env \"${ENV_MKLROOT}/include\")\n      endif()\n      # system variables\n      if(WIN32)\n\tstring(REPLACE \":\" \";\" _path_env \"$ENV{INCLUDE}\")\n\tlist(APPEND _inc_env \"${_path_env}\")\n      else()\n\tstring(REPLACE \":\" \";\" _path_env \"$ENV{INCLUDE}\")\n\tlist(APPEND _inc_env \"${_path_env}\")\n\tstring(REPLACE \":\" \";\" _path_env \"$ENV{C_INCLUDE_PATH}\")\n\tlist(APPEND _inc_env \"${_path_env}\")\n\tstring(REPLACE \":\" \";\" _path_env \"$ENV{CPATH}\")\n\tlist(APPEND _inc_env \"${_path_env}\")\n\tstring(REPLACE \":\" \";\" _path_env \"$ENV{INCLUDE_PATH}\")\n\tlist(APPEND _inc_env \"${_path_env}\")\n      endif()\n    endif()\n    list(APPEND _inc_env \"${CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES}\")\n    list(APPEND _inc_env \"${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES}\")\n    list(REMOVE_DUPLICATES _inc_env)\n\n    # set paths where to look for\n    set(PATH_TO_LOOK_FOR \"${_inc_env}\")\n\n    # Try to find the fftw header in the given paths\n    # -------------------------------------------------\n    # call cmake macro to find the header path\n    if(BLAS_INCDIR)\n      set(BLAS_mkl.h_DIRS \"BLAS_mkl.h_DIRS-NOTFOUND\")\n      find_path(BLAS_mkl.h_DIRS\n\tNAMES mkl.h\n\tHINTS ${BLAS_INCDIR})\n    else()\n      if(BLAS_DIR)\n\tset(BLAS_mkl.h_DIRS \"BLAS_mkl.h_DIRS-NOTFOUND\")\n\tfind_path(BLAS_mkl.h_DIRS\n\t  NAMES mkl.h\n\t  HINTS ${BLAS_DIR}\n\t  PATH_SUFFIXES \"include\")\n      else()\n\tset(BLAS_mkl.h_DIRS \"BLAS_mkl.h_DIRS-NOTFOUND\")\n\tfind_path(BLAS_mkl.h_DIRS\n\t  NAMES mkl.h\n\t  HINTS ${PATH_TO_LOOK_FOR})\n      endif()\n    endif()\n    mark_as_advanced(BLAS_mkl.h_DIRS)\n\n    # If found, add path to cmake variable\n    # ------------------------------------\n    if (BLAS_mkl.h_DIRS)\n      set(BLAS_INCLUDE_DIRS \"${BLAS_mkl.h_DIRS}\")\n    else ()\n      set(BLAS_INCLUDE_DIRS \"BLAS_INCLUDE_DIRS-NOTFOUND\")\n      if(NOT BLAS_FIND_QUIETLY)\n\tmessage(STATUS \"Looking for BLAS -- mkl.h not found\")\n      endif()\n    endif()\n\n    if (WIN32)\n      string(REPLACE \":\" \";\" _libdir \"$ENV{LIB}\")\n    elseif (APPLE)\n      string(REPLACE \":\" \";\" _libdir \"$ENV{DYLD_LIBRARY_PATH}\")\n    else ()\n      string(REPLACE \":\" \";\" _libdir \"$ENV{LD_LIBRARY_PATH}\")\n    endif ()\n    list(APPEND _libdir \"${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}\")\n    list(APPEND _libdir \"${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}\")\n    # libiomp5\n    # --------\n    set(OMP_iomp5_LIBRARY \"OMP_iomp5_LIBRARY-NOTFOUND\")\n    find_library(OMP_iomp5_LIBRARY\n      NAMES iomp5\n      HINTS ${_libdir}\n      )\n    mark_as_advanced(OMP_iomp5_LIBRARY)\n    set(OMP_LIB \"\")\n    # libgomp\n    # -------\n    set(OMP_gomp_LIBRARY \"OMP_gomp_LIBRARY-NOTFOUND\")\n    find_library(OMP_gomp_LIBRARY\n      NAMES gomp\n      HINTS ${_libdir}\n      )\n    mark_as_advanced(OMP_gomp_LIBRARY)\n    # choose one or another depending on the compilo\n    if (CMAKE_C_COMPILER_ID STREQUAL \"GNU\")\n      if (OMP_gomp_LIBRARY)\n\tset(OMP_LIB \"${OMP_gomp_LIBRARY}\")\n      endif()\n    else()\n      if (OMP_iomp5_LIBRARY)\n\tset(OMP_LIB \"${OMP_iomp5_LIBRARY}\")\n      endif()\n    endif()\n\n    if (UNIX AND NOT WIN32)\n      # m\n      find_library(M_LIBRARY\n\tNAMES m\n\tHINTS ${_libdir})\n      mark_as_advanced(M_LIBRARY)\n      if(M_LIBRARY)\n\tset(LM \"-lm\")\n      else()\n\tset(LM \"\")\n      endif()\n      # Fortran\n      set(LGFORTRAN \"\")\n      if (CMAKE_C_COMPILER_ID MATCHES \"GNU\")\n\tfind_library(\n\t  FORTRAN_gfortran_LIBRARY\n\t  NAMES gfortran\n\t  HINTS ${_libdir}\n\t  )\n\tmark_as_advanced(FORTRAN_gfortran_LIBRARY)\n\tif (FORTRAN_gfortran_LIBRARY)\n\t  set(LGFORTRAN \"${FORTRAN_gfortran_LIBRARY}\")\n\tendif()\n      elseif (CMAKE_C_COMPILER_ID MATCHES \"Intel\")\n\tfind_library(\n\t  FORTRAN_ifcore_LIBRARY\n\t  NAMES ifcore\n\t  HINTS ${_libdir}\n\t  )\n\tmark_as_advanced(FORTRAN_ifcore_LIBRARY)\n\tif (FORTRAN_ifcore_LIBRARY)\n\t  set(LGFORTRAN \"{FORTRAN_ifcore_LIBRARY}\")\n\tendif()\n      endif()\n      set(BLAS_COMPILER_FLAGS \"\")\n      if (NOT BLA_VENDOR STREQUAL \"Intel10_64lp_seq\")\n\tif (CMAKE_C_COMPILER_ID STREQUAL \"Intel\")\n\t  list(APPEND BLAS_COMPILER_FLAGS \"-openmp\")\n\tendif()\n\tif (CMAKE_C_COMPILER_ID STREQUAL \"GNU\")\n\t  list(APPEND BLAS_COMPILER_FLAGS \"-fopenmp\")\n\tendif()\n      endif()\n      if (CMAKE_C_COMPILER_ID STREQUAL \"GNU\")\n\tif (BLA_VENDOR STREQUAL \"Intel10_32\")\n\t  list(APPEND BLAS_COMPILER_FLAGS \"-m32\")\n\telse()\n\t  list(APPEND BLAS_COMPILER_FLAGS \"-m64\")\n\tendif()\n\tif (NOT BLA_VENDOR STREQUAL \"Intel10_64lp_seq\")\n\t  list(APPEND OMP_LIB \"-ldl\")\n\tendif()\n\tif (ENV_MKLROOT)\n\t  list(APPEND BLAS_COMPILER_FLAGS \"-I${ENV_MKLROOT}/include\")\n\tendif()\n      endif()\n\n      set(additional_flags \"\")\n      if (CMAKE_C_COMPILER_ID STREQUAL \"GNU\" AND CMAKE_SYSTEM_NAME STREQUAL \"Linux\")\n\tset(additional_flags \"-Wl,--no-as-needed\")\n      endif()\n    endif ()\n\n    if (_LANGUAGES_ MATCHES C OR _LANGUAGES_ MATCHES CXX)\n      if(BLAS_FIND_QUIETLY OR NOT BLAS_FIND_REQUIRED)\n\tfind_package(Threads)\n      else()\n\tfind_package(Threads REQUIRED)\n      endif()\n\n      set(BLAS_SEARCH_LIBS \"\")\n\n      if(BLA_F95)\n\n\tset(BLAS_mkl_SEARCH_SYMBOL SGEMM)\n\tset(_LIBRARIES BLAS95_LIBRARIES)\n\tif (WIN32)\n\t  if (BLA_STATIC)\n\t    set(BLAS_mkl_DLL_SUFFIX \"\")\n\t  else()\n\t    set(BLAS_mkl_DLL_SUFFIX \"_dll\")\n\t  endif()\n\n\t  # Find the main file (32-bit or 64-bit)\n\t  set(BLAS_SEARCH_LIBS_WIN_MAIN \"\")\n\t  if (BLA_VENDOR STREQUAL \"Intel10_32\" OR BLA_VENDOR STREQUAL \"All\")\n\t    list(APPEND BLAS_SEARCH_LIBS_WIN_MAIN\n\t      \"mkl_blas95${BLAS_mkl_DLL_SUFFIX} mkl_intel_c${BLAS_mkl_DLL_SUFFIX}\")\n\t  endif()\n\t  if (BLA_VENDOR STREQUAL \"Intel10_64lp*\" OR BLA_VENDOR STREQUAL \"All\")\n\t    list(APPEND BLAS_SEARCH_LIBS_WIN_MAIN\n\t      \"mkl_blas95_lp64${BLAS_mkl_DLL_SUFFIX} mkl_intel_lp64${BLAS_mkl_DLL_SUFFIX}\")\n\t  endif ()\n\n\t  # Add threading/sequential libs\n\t  set(BLAS_SEARCH_LIBS_WIN_THREAD \"\")\n\t  if (BLA_VENDOR STREQUAL \"*_seq\" OR BLA_VENDOR STREQUAL \"All\")\n\t    list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD\n\t      \"mkl_sequential${BLAS_mkl_DLL_SUFFIX}\")\n\t  endif()\n\t  if (NOT BLA_VENDOR STREQUAL \"*_seq\" OR BLA_VENDOR STREQUAL \"All\")\n\t    # old version\n\t    list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD\n\t      \"libguide40 mkl_intel_thread${BLAS_mkl_DLL_SUFFIX}\")\n\t    # mkl >= 10.3\n\t    list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD\n\t      \"libiomp5md mkl_intel_thread${BLAS_mkl_DLL_SUFFIX}\")\n\t  endif()\n\n\t  # Cartesian product of the above\n\t  foreach (MAIN ${BLAS_SEARCH_LIBS_WIN_MAIN})\n\t    foreach (THREAD ${BLAS_SEARCH_LIBS_WIN_THREAD})\n\t      list(APPEND BLAS_SEARCH_LIBS\n\t\t\"${MAIN} ${THREAD} mkl_core${BLAS_mkl_DLL_SUFFIX}\")\n\t    endforeach()\n\t  endforeach()\n\telse ()\n\t  if (BLA_VENDOR STREQUAL \"Intel10_32\" OR BLA_VENDOR STREQUAL \"All\")\n\t    list(APPEND BLAS_SEARCH_LIBS\n\t      \"mkl_blas95 mkl_intel mkl_intel_thread mkl_core guide\")\n\t  endif ()\n\t  if (BLA_VENDOR STREQUAL \"Intel10_64lp\" OR BLA_VENDOR STREQUAL \"All\")\n\t    # old version\n\t    list(APPEND BLAS_SEARCH_LIBS\n\t      \"mkl_blas95 mkl_intel_lp64 mkl_intel_thread mkl_core guide\")\n\t    # mkl >= 10.3\n\t    if (CMAKE_C_COMPILER_ID STREQUAL \"Intel\")\n\t      list(APPEND BLAS_SEARCH_LIBS\n\t\t\"mkl_blas95_lp64 mkl_intel_lp64 mkl_intel_thread mkl_core\")\n\t    endif()\n\t    if (CMAKE_C_COMPILER_ID STREQUAL \"GNU\")\n\t      list(APPEND BLAS_SEARCH_LIBS\n\t\t\"mkl_blas95_lp64 mkl_intel_lp64 mkl_gnu_thread mkl_core\")\n\t    endif()\n\t  endif ()\n\t  if (BLA_VENDOR STREQUAL \"Intel10_64lp_seq\" OR BLA_VENDOR STREQUAL \"All\")\n\t    list(APPEND BLAS_SEARCH_LIBS\n\t      \"mkl_intel_lp64 mkl_sequential mkl_core\")\n\t    if (BLA_VENDOR STREQUAL \"Intel10_64lp_seq\")\n\t      set(OMP_LIB \"\")\n\t    endif()\n\t  endif ()\n\tendif ()\n\n      else ()\n\n\tset(BLAS_mkl_SEARCH_SYMBOL sgemm)\n\tset(_LIBRARIES BLAS_LIBRARIES)\n\tif (WIN32)\n\t  if (BLA_STATIC)\n\t    set(BLAS_mkl_DLL_SUFFIX \"\")\n\t  else()\n\t    set(BLAS_mkl_DLL_SUFFIX \"_dll\")\n\t  endif()\n\n\t  # Find the main file (32-bit or 64-bit)\n\t  set(BLAS_SEARCH_LIBS_WIN_MAIN \"\")\n\t  if (BLA_VENDOR STREQUAL \"Intel10_32\" OR BLA_VENDOR STREQUAL \"All\")\n\t    list(APPEND BLAS_SEARCH_LIBS_WIN_MAIN\n\t      \"mkl_intel_c${BLAS_mkl_DLL_SUFFIX}\")\n\t  endif()\n\t  if (BLA_VENDOR STREQUAL \"Intel10_64lp*\" OR BLA_VENDOR STREQUAL \"All\")\n\t    list(APPEND BLAS_SEARCH_LIBS_WIN_MAIN\n\t      \"mkl_intel_lp64${BLAS_mkl_DLL_SUFFIX}\")\n\t  endif ()\n\n\t  # Add threading/sequential libs\n\t  set(BLAS_SEARCH_LIBS_WIN_THREAD \"\")\n\t  if (NOT BLA_VENDOR STREQUAL \"*_seq\" OR BLA_VENDOR STREQUAL \"All\")\n\t    # old version\n\t    list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD\n\t      \"libguide40 mkl_intel_thread${BLAS_mkl_DLL_SUFFIX}\")\n\t    # mkl >= 10.3\n\t    list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD\n\t      \"libiomp5md mkl_intel_thread${BLAS_mkl_DLL_SUFFIX}\")\n\t  endif()\n\t  if (BLA_VENDOR STREQUAL \"*_seq\" OR BLA_VENDOR STREQUAL \"All\")\n\t    list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD\n\t      \"mkl_sequential${BLAS_mkl_DLL_SUFFIX}\")\n\t  endif()\n\n\t  # Cartesian product of the above\n\t  foreach (MAIN ${BLAS_SEARCH_LIBS_WIN_MAIN})\n\t    foreach (THREAD ${BLAS_SEARCH_LIBS_WIN_THREAD})\n\t      list(APPEND BLAS_SEARCH_LIBS\n\t\t\"${MAIN} ${THREAD} mkl_core${BLAS_mkl_DLL_SUFFIX}\")\n\t    endforeach()\n\t  endforeach()\n\telse ()\n\t  if (BLA_VENDOR STREQUAL \"Intel10_32\" OR BLA_VENDOR STREQUAL \"All\")\n\t    list(APPEND BLAS_SEARCH_LIBS\n\t      \"mkl_intel mkl_intel_thread mkl_core guide\")\n\t  endif ()\n\t  if (BLA_VENDOR STREQUAL \"Intel10_64lp\" OR BLA_VENDOR STREQUAL \"All\")\n\t    # old version\n\t    list(APPEND BLAS_SEARCH_LIBS\n\t      \"mkl_intel_lp64 mkl_intel_thread mkl_core guide\")\n\t    # mkl >= 10.3\n\t    if (CMAKE_C_COMPILER_ID STREQUAL \"Intel\")\n\t      list(APPEND BLAS_SEARCH_LIBS\n\t\t\"mkl_intel_lp64 mkl_intel_thread mkl_core\")\n\t    endif()\n\t    if (CMAKE_C_COMPILER_ID STREQUAL \"GNU\")\n\t      list(APPEND BLAS_SEARCH_LIBS\n\t\t\"mkl_intel_lp64 mkl_gnu_thread mkl_core\")\n\t    endif()\n\t  endif ()\n\t  if (BLA_VENDOR STREQUAL \"Intel10_64lp_seq\" OR BLA_VENDOR STREQUAL \"All\")\n\t    list(APPEND BLAS_SEARCH_LIBS\n\t      \"mkl_intel_lp64 mkl_sequential mkl_core\")\n\t    if (BLA_VENDOR STREQUAL \"Intel10_64lp_seq\")\n\t      set(OMP_LIB \"\")\n\t    endif()\n\t  endif ()\n\t  #older vesions of intel mkl libs\n\t  if (BLA_VENDOR STREQUAL \"Intel\" OR BLA_VENDOR STREQUAL \"All\")\n\t    list(APPEND BLAS_SEARCH_LIBS\n\t      \"mkl\")\n\t    list(APPEND BLAS_SEARCH_LIBS\n\t      \"mkl_ia32\")\n\t    list(APPEND BLAS_SEARCH_LIBS\n\t      \"mkl_em64t\")\n\t  endif ()\n\tendif ()\n\n      endif ()\n\n      foreach (IT ${BLAS_SEARCH_LIBS})\n\tstring(REPLACE \" \" \";\" SEARCH_LIBS ${IT})\n\tif (${_LIBRARIES})\n\telse ()\n\t  check_fortran_libraries(\n\t    ${_LIBRARIES}\n\t    BLAS\n\t    ${BLAS_mkl_SEARCH_SYMBOL}\n\t    \"${additional_flags}\"\n\t    \"${SEARCH_LIBS}\"\n\t    \"${OMP_LIB};${CMAKE_THREAD_LIBS_INIT};${LM}\"\n\t    )\n\t  if(_LIBRARIES)\n\t    set(BLAS_LINKER_FLAGS \"${additional_flags}\")\n\t  endif()\n\tendif()\n      endforeach ()\n      if(NOT BLAS_FIND_QUIETLY)\n        if(${_LIBRARIES})\n          message(STATUS \"Looking for MKL BLAS: found\")\n        else()\n          message(STATUS \"Looking for MKL BLAS: not found\")\n        endif()\n      endif()\n      if (${_LIBRARIES} AND NOT BLAS_VENDOR_FOUND)\n          set (BLAS_VENDOR_FOUND \"Intel MKL\")\n      endif()\n    endif ()\n  endif()\nendif ()\n\n\nif (BLA_VENDOR STREQUAL \"Goto\" OR BLA_VENDOR STREQUAL \"All\")\n\n  if(NOT BLAS_LIBRARIES)\n    # gotoblas (http://www.tacc.utexas.edu/tacc-projects/gotoblas2)\n    check_fortran_libraries(\n      BLAS_LIBRARIES\n      BLAS\n      sgemm\n      \"\"\n      \"goto2\"\n      \"\"\n      )\n    if(NOT BLAS_FIND_QUIETLY)\n      if(BLAS_LIBRARIES)\n\tmessage(STATUS \"Looking for Goto BLAS: found\")\n      else()\n\tmessage(STATUS \"Looking for Goto BLAS: not found\")\n      endif()\n    endif()\n  endif()\n  if (BLAS_LIBRARIES AND NOT BLAS_VENDOR_FOUND)\n      set (BLAS_VENDOR_FOUND \"Goto\")\n  endif()\n\nendif ()\n\n\n# OpenBlas\nif (BLA_VENDOR STREQUAL \"Open\" OR BLA_VENDOR STREQUAL \"All\")\n\n  if(NOT BLAS_LIBRARIES)\n    # openblas (http://www.openblas.net/)\n    check_fortran_libraries(\n      BLAS_LIBRARIES\n      BLAS\n      sgemm\n      \"\"\n      \"openblas\"\n      \"\"\n      )\n    if(NOT BLAS_FIND_QUIETLY)\n      if(BLAS_LIBRARIES)\n\tmessage(STATUS \"Looking for Open BLAS: found\")\n      else()\n\tmessage(STATUS \"Looking for Open BLAS: not found\")\n      endif()\n    endif()\n  endif()\n  if (BLAS_LIBRARIES AND NOT BLAS_VENDOR_FOUND)\n      set (BLAS_VENDOR_FOUND \"Openblas\")\n  endif()\n\nendif ()\n\n\n# EigenBlas\nif (BLA_VENDOR STREQUAL \"Eigen\" OR BLA_VENDOR STREQUAL \"All\")\n\n  if(NOT BLAS_LIBRARIES)\n    # eigenblas (http://eigen.tuxfamily.org/index.php?title=Main_Page)\n    check_fortran_libraries(\n      BLAS_LIBRARIES\n      BLAS\n      sgemm\n      \"\"\n      \"eigen_blas\"\n      \"\"\n      )\n    if(NOT BLAS_FIND_QUIETLY)\n      if(BLAS_LIBRARIES AND NOT BLAS_VENDOR_FOUND)\n\tmessage(STATUS \"Looking for Eigen BLAS: found\")\n      else()\n\tmessage(STATUS \"Looking for Eigen BLAS: not found\")\n      endif()\n    endif()\n  endif()\n\n  if(NOT BLAS_LIBRARIES)\n    # eigenblas (http://eigen.tuxfamily.org/index.php?title=Main_Page)\n    check_fortran_libraries(\n      BLAS_LIBRARIES\n      BLAS\n      sgemm\n      \"\"\n      \"eigen_blas_static\"\n      \"\"\n      )\n    if(NOT BLAS_FIND_QUIETLY)\n      if(BLAS_LIBRARIES)\n\tmessage(STATUS \"Looking for Eigen BLAS: found\")\n      else()\n\tmessage(STATUS \"Looking for Eigen BLAS: not found\")\n      endif()\n    endif()\n  endif()\n  if (BLAS_LIBRARIES AND NOT BLAS_VENDOR_FOUND)\n      set (BLAS_VENDOR_FOUND \"Eigen\")\n  endif()\n\nendif ()\n\n\nif (BLA_VENDOR STREQUAL \"ATLAS\" OR BLA_VENDOR STREQUAL \"All\")\n\n  if(NOT BLAS_LIBRARIES)\n    # BLAS in ATLAS library? (http://math-atlas.sourceforge.net/)\n    check_fortran_libraries(\n      BLAS_LIBRARIES\n      BLAS\n      dgemm\n      \"\"\n      \"f77blas;atlas\"\n      \"\"\n      )\n    if(NOT BLAS_FIND_QUIETLY)\n      if(BLAS_LIBRARIES)\n\tmessage(STATUS \"Looking for Atlas BLAS: found\")\n      else()\n\tmessage(STATUS \"Looking for Atlas BLAS: not found\")\n      endif()\n    endif()\n  endif()\n\n  if (BLAS_LIBRARIES AND NOT BLAS_VENDOR_FOUND)\n      set (BLAS_VENDOR_FOUND \"Atlas\")\n  endif()\n\nendif ()\n\n\n# BLAS in PhiPACK libraries? (requires generic BLAS lib, too)\nif (BLA_VENDOR STREQUAL \"PhiPACK\" OR BLA_VENDOR STREQUAL \"All\")\n\n  if(NOT BLAS_LIBRARIES)\n    check_fortran_libraries(\n      BLAS_LIBRARIES\n      BLAS\n      sgemm\n      \"\"\n      \"sgemm;dgemm;blas\"\n      \"\"\n      )\n    if(NOT BLAS_FIND_QUIETLY)\n      if(BLAS_LIBRARIES)\n\tmessage(STATUS \"Looking for PhiPACK BLAS: found\")\n      else()\n\tmessage(STATUS \"Looking for PhiPACK BLAS: not found\")\n      endif()\n    endif()\n  endif()\n\n  if (BLAS_LIBRARIES AND NOT BLAS_VENDOR_FOUND)\n      set (BLAS_VENDOR_FOUND \"PhiPACK\")\n  endif()\n\nendif ()\n\n\n# BLAS in Alpha CXML library?\nif (BLA_VENDOR STREQUAL \"CXML\" OR BLA_VENDOR STREQUAL \"All\")\n\n  if(NOT BLAS_LIBRARIES)\n    check_fortran_libraries(\n      BLAS_LIBRARIES\n      BLAS\n      sgemm\n      \"\"\n      \"cxml\"\n      \"\"\n      )\n    if(NOT BLAS_FIND_QUIETLY)\n      if(BLAS_LIBRARIES)\n\tmessage(STATUS \"Looking for CXML BLAS: found\")\n      else()\n\tmessage(STATUS \"Looking for CXML BLAS: not found\")\n      endif()\n    endif()\n  endif()\n\n  if (BLAS_LIBRARIES AND NOT BLAS_VENDOR_FOUND)\n      set (BLAS_VENDOR_FOUND \"CXML\")\n  endif()\n\nendif ()\n\n\n# BLAS in Alpha DXML library? (now called CXML, see above)\nif (BLA_VENDOR STREQUAL \"DXML\" OR BLA_VENDOR STREQUAL \"All\")\n\n  if(NOT BLAS_LIBRARIES)\n    check_fortran_libraries(\n      BLAS_LIBRARIES\n      BLAS\n      sgemm\n      \"\"\n      \"dxml\"\n      \"\"\n      )\n    if(NOT BLAS_FIND_QUIETLY)\n      if(BLAS_LIBRARIES)\n\tmessage(STATUS \"Looking for DXML BLAS: found\")\n      else()\n\tmessage(STATUS \"Looking for DXML BLAS: not found\")\n      endif()\n    endif()\n  endif()\n\n  if (BLAS_LIBRARIES AND NOT BLAS_VENDOR_FOUND)\n      set (BLAS_VENDOR_FOUND \"DXML\")\n  endif()\n  \nendif ()\n\n\n# BLAS in Sun Performance library?\nif (BLA_VENDOR STREQUAL \"SunPerf\" OR BLA_VENDOR STREQUAL \"All\")\n\n  if(NOT BLAS_LIBRARIES)\n    check_fortran_libraries(\n      BLAS_LIBRARIES\n      BLAS\n      sgemm\n      \"-xlic_lib=sunperf\"\n      \"sunperf;sunmath\"\n      \"\"\n      )\n    if(BLAS_LIBRARIES)\n      set(BLAS_LINKER_FLAGS \"-xlic_lib=sunperf\")\n    endif()\n    if(NOT BLAS_FIND_QUIETLY)\n      if(BLAS_LIBRARIES)\n\tmessage(STATUS \"Looking for SunPerf BLAS: found\")\n      else()\n\tmessage(STATUS \"Looking for SunPerf BLAS: not found\")\n      endif()\n    endif()\n  endif()\n\n  if (BLAS_LIBRARIES AND NOT BLAS_VENDOR_FOUND)\n      set (BLAS_VENDOR_FOUND \"SunPerf\")\n  endif()\n\nendif ()\n\n\n# BLAS in SCSL library?  (SGI/Cray Scientific Library)\nif (BLA_VENDOR STREQUAL \"SCSL\" OR BLA_VENDOR STREQUAL \"All\")\n\n  if(NOT BLAS_LIBRARIES)\n    check_fortran_libraries(\n      BLAS_LIBRARIES\n      BLAS\n      sgemm\n      \"\"\n      \"scsl\"\n      \"\"\n      )\n    if(NOT BLAS_FIND_QUIETLY)\n      if(BLAS_LIBRARIES)\n\tmessage(STATUS \"Looking for SCSL BLAS: found\")\n      else()\n\tmessage(STATUS \"Looking for SCSL BLAS: not found\")\n      endif()\n    endif()\n  endif()\n\n  if (BLAS_LIBRARIES AND NOT BLAS_VENDOR_FOUND)\n      set (BLAS_VENDOR_FOUND \"SunPerf\")\n  endif()\n\nendif ()\n\n\n# BLAS in SGIMATH library?\nif (BLA_VENDOR STREQUAL \"SGIMATH\" OR BLA_VENDOR STREQUAL \"All\")\n\n  if(NOT BLAS_LIBRARIES)\n    check_fortran_libraries(\n      BLAS_LIBRARIES\n      BLAS\n      sgemm\n      \"\"\n      \"complib.sgimath\"\n      \"\"\n      )\n    if(NOT BLAS_FIND_QUIETLY)\n      if(BLAS_LIBRARIES)\n\tmessage(STATUS \"Looking for SGIMATH BLAS: found\")\n      else()\n\tmessage(STATUS \"Looking for SGIMATH BLAS: not found\")\n      endif()\n    endif()\n  endif()\n\n  if (BLAS_LIBRARIES AND NOT BLAS_VENDOR_FOUND)\n      set (BLAS_VENDOR_FOUND \"SGIMATH\")\n  endif()\n\nendif ()\n\n\n# BLAS in IBM ESSL library (requires generic BLAS lib, too)\nif (BLA_VENDOR STREQUAL \"IBMESSL\" OR BLA_VENDOR STREQUAL \"All\")\n\n  if(NOT BLAS_LIBRARIES)\n    check_fortran_libraries(\n      BLAS_LIBRARIES\n      BLAS\n      sgemm\n      \"\"\n      \"essl;xlfmath;xlf90_r;blas\"\n      \"\"\n      )\n    if(NOT BLAS_FIND_QUIETLY)\n      if(BLAS_LIBRARIES)\n\tmessage(STATUS \"Looking for IBM ESSL BLAS: found\")\n      else()\n\tmessage(STATUS \"Looking for IBM ESSL BLAS: not found\")\n      endif()\n    endif()\n  endif()\n\n  if (BLAS_LIBRARIES AND NOT BLAS_VENDOR_FOUND)\n      set (BLAS_VENDOR_FOUND \"IBM ESSL\")\n  endif()\n\nendif ()\n\n# BLAS in IBM ESSL_MT library (requires generic BLAS lib, too)\nif (BLA_VENDOR STREQUAL \"IBMESSLMT\" OR BLA_VENDOR STREQUAL \"All\")\n\n  if(NOT BLAS_LIBRARIES)\n    check_fortran_libraries(\n      BLAS_LIBRARIES\n      BLAS\n      sgemm\n      \"\"\n      \"esslsmp;xlsmp;xlfmath;xlf90_r;blas\"\n      \"\"\n      )\n    if(NOT BLAS_FIND_QUIETLY)\n      if(BLAS_LIBRARIES)\n\tmessage(STATUS \"Looking for IBM ESSL MT BLAS: found\")\n      else()\n\tmessage(STATUS \"Looking for IBM ESSL MT BLAS: not found\")\n      endif()\n    endif()\n  endif()\n\n  if (BLAS_LIBRARIES AND NOT BLAS_VENDOR_FOUND)\n      set (BLAS_VENDOR_FOUND \"IBM ESSL MT\")\n  endif()\n\nendif ()\n\n\n#BLAS in acml library?\nif (BLA_VENDOR MATCHES \"ACML.*\" OR BLA_VENDOR STREQUAL \"All\")\n\n  if( ((BLA_VENDOR STREQUAL \"ACML\") AND (NOT BLAS_ACML_LIB_DIRS)) OR\n      ((BLA_VENDOR STREQUAL \"ACML_MP\") AND (NOT BLAS_ACML_MP_LIB_DIRS)) OR\n      ((BLA_VENDOR STREQUAL \"ACML_GPU\") AND (NOT BLAS_ACML_GPU_LIB_DIRS)))\n\n    # try to find acml in \"standard\" paths\n    if( WIN32 )\n      file( GLOB _ACML_ROOT \"C:/AMD/acml*/ACML-EULA.txt\" )\n    else()\n      file( GLOB _ACML_ROOT \"/opt/acml*/ACML-EULA.txt\" )\n    endif()\n    if( WIN32 )\n      file( GLOB _ACML_GPU_ROOT \"C:/AMD/acml*/GPGPUexamples\" )\n    else()\n      file( GLOB _ACML_GPU_ROOT \"/opt/acml*/GPGPUexamples\" )\n    endif()\n    list(GET _ACML_ROOT 0 _ACML_ROOT)\n    list(GET _ACML_GPU_ROOT 0 _ACML_GPU_ROOT)\n\n    if( _ACML_ROOT )\n\n      get_filename_component( _ACML_ROOT ${_ACML_ROOT} PATH )\n      if( SIZEOF_INTEGER EQUAL 8 )\n\tset( _ACML_PATH_SUFFIX \"_int64\" )\n      else()\n\tset( _ACML_PATH_SUFFIX \"\" )\n      endif()\n      if( CMAKE_Fortran_COMPILER_ID STREQUAL \"Intel\" )\n\tset( _ACML_COMPILER32 \"ifort32\" )\n\tset( _ACML_COMPILER64 \"ifort64\" )\n      elseif( CMAKE_Fortran_COMPILER_ID STREQUAL \"SunPro\" )\n\tset( _ACML_COMPILER32 \"sun32\" )\n\tset( _ACML_COMPILER64 \"sun64\" )\n      elseif( CMAKE_Fortran_COMPILER_ID STREQUAL \"PGI\" )\n\tset( _ACML_COMPILER32 \"pgi32\" )\n\tif( WIN32 )\n\t  set( _ACML_COMPILER64 \"win64\" )\n\telse()\n\t  set( _ACML_COMPILER64 \"pgi64\" )\n\tendif()\n      elseif( CMAKE_Fortran_COMPILER_ID STREQUAL \"Open64\" )\n\t# 32 bit builds not supported on Open64 but for code simplicity\n\t# We'll just use the same directory twice\n\tset( _ACML_COMPILER32 \"open64_64\" )\n\tset( _ACML_COMPILER64 \"open64_64\" )\n      elseif( CMAKE_Fortran_COMPILER_ID STREQUAL \"NAG\" )\n\tset( _ACML_COMPILER32 \"nag32\" )\n\tset( _ACML_COMPILER64 \"nag64\" )\n      else()\n\tset( _ACML_COMPILER32 \"gfortran32\" )\n\tset( _ACML_COMPILER64 \"gfortran64\" )\n      endif()\n\n      if( BLA_VENDOR STREQUAL \"ACML_MP\" )\n\tset(_ACML_MP_LIB_DIRS\n\t  \"${_ACML_ROOT}/${_ACML_COMPILER32}_mp${_ACML_PATH_SUFFIX}/lib\"\n\t  \"${_ACML_ROOT}/${_ACML_COMPILER64}_mp${_ACML_PATH_SUFFIX}/lib\" )\n      else()\n\tset(_ACML_LIB_DIRS\n\t  \"${_ACML_ROOT}/${_ACML_COMPILER32}${_ACML_PATH_SUFFIX}/lib\"\n\t  \"${_ACML_ROOT}/${_ACML_COMPILER64}${_ACML_PATH_SUFFIX}/lib\" )\n      endif()\n\n    endif()\n\n  elseif(BLAS_${BLA_VENDOR}_LIB_DIRS)\n\n    set(_${BLA_VENDOR}_LIB_DIRS ${BLAS_${BLA_VENDOR}_LIB_DIRS})\n\n  endif()\n\n  if( BLA_VENDOR STREQUAL \"ACML_MP\" )\n    foreach( BLAS_ACML_MP_LIB_DIRS ${_ACML_MP_LIB_DIRS})\n      check_fortran_libraries (\n\tBLAS_LIBRARIES\n\tBLAS\n\tsgemm\n\t\"\" \"acml_mp;acml_mv\" \"\" ${BLAS_ACML_MP_LIB_DIRS}\n\t)\n      if( BLAS_LIBRARIES )\n\tbreak()\n      endif()\n    endforeach()\n  elseif( BLA_VENDOR STREQUAL \"ACML_GPU\" )\n    foreach( BLAS_ACML_GPU_LIB_DIRS ${_ACML_GPU_LIB_DIRS})\n      check_fortran_libraries (\n\tBLAS_LIBRARIES\n\tBLAS\n\tsgemm\n\t\"\" \"acml;acml_mv;CALBLAS\" \"\" ${BLAS_ACML_GPU_LIB_DIRS}\n\t)\n      if( BLAS_LIBRARIES )\n\tbreak()\n      endif()\n    endforeach()\n  else()\n    foreach( BLAS_ACML_LIB_DIRS ${_ACML_LIB_DIRS} )\n      check_fortran_libraries (\n\tBLAS_LIBRARIES\n\tBLAS\n\tsgemm\n\t\"\" \"acml;acml_mv\" \"\" ${BLAS_ACML_LIB_DIRS}\n\t)\n      if( BLAS_LIBRARIES )\n\tbreak()\n      endif()\n    endforeach()\n  endif()\n\n  # Either acml or acml_mp should be in LD_LIBRARY_PATH but not both\n  if(NOT BLAS_LIBRARIES)\n    check_fortran_libraries(\n      BLAS_LIBRARIES\n      BLAS\n      sgemm\n      \"\"\n      \"acml;acml_mv\"\n      \"\"\n      )\n    if(NOT BLAS_FIND_QUIETLY)\n      if(BLAS_LIBRARIES)\n\tmessage(STATUS \"Looking for ACML BLAS: found\")\n      else()\n\tmessage(STATUS \"Looking for ACML BLAS: not found\")\n      endif()\n    endif()\n  endif()\n\n  if(NOT BLAS_LIBRARIES)\n    check_fortran_libraries(\n      BLAS_LIBRARIES\n      BLAS\n      sgemm\n      \"\"\n      \"acml_mp;acml_mv\"\n      \"\"\n      )\n    if(NOT BLAS_FIND_QUIETLY)\n      if(BLAS_LIBRARIES)\n\tmessage(STATUS \"Looking for ACML BLAS: found\")\n      else()\n\tmessage(STATUS \"Looking for ACML BLAS: not found\")\n      endif()\n    endif()\n  endif()\n\n  if(NOT BLAS_LIBRARIES)\n    check_fortran_libraries(\n      BLAS_LIBRARIES\n      BLAS\n      sgemm\n      \"\"\n      \"acml;acml_mv;CALBLAS\"\n      \"\"\n      )\n    if(NOT BLAS_FIND_QUIETLY)\n      if(BLAS_LIBRARIES)\n\tmessage(STATUS \"Looking for ACML BLAS: found\")\n      else()\n\tmessage(STATUS \"Looking for ACML BLAS: not found\")\n      endif()\n    endif()\n  endif()\n\n  if (BLAS_LIBRARIES AND NOT BLAS_VENDOR_FOUND)\n      set (BLAS_VENDOR_FOUND \"ACML\")\n  endif()\n\nendif () # ACML\n\n\n# Apple BLAS library?\nif (BLA_VENDOR STREQUAL \"Apple\" OR BLA_VENDOR STREQUAL \"All\")\n\n  if(NOT BLAS_LIBRARIES)\n    check_fortran_libraries(\n      BLAS_LIBRARIES\n      BLAS\n      dgemm\n      \"\"\n      \"Accelerate\"\n      \"\"\n      )\n    if(NOT BLAS_FIND_QUIETLY)\n      if(BLAS_LIBRARIES)\n\tmessage(STATUS \"Looking for Apple BLAS: found\")\n      else()\n\tmessage(STATUS \"Looking for Apple BLAS: not found\")\n      endif()\n    endif()\n  endif()\n\n  if (BLAS_LIBRARIES AND NOT BLAS_VENDOR_FOUND)\n      set (BLAS_VENDOR_FOUND \"Apple Accelerate\")\n  endif()\n\nendif ()\n\n\nif (BLA_VENDOR STREQUAL \"NAS\" OR BLA_VENDOR STREQUAL \"All\")\n\n  if ( NOT BLAS_LIBRARIES )\n    check_fortran_libraries(\n      BLAS_LIBRARIES\n      BLAS\n      dgemm\n      \"\"\n      \"vecLib\"\n      \"\"\n      )\n    if(NOT BLAS_FIND_QUIETLY)\n      if(BLAS_LIBRARIES)\n\tmessage(STATUS \"Looking for NAS BLAS: found\")\n      else()\n\tmessage(STATUS \"Looking for NAS BLAS: not found\")\n      endif()\n    endif()\n  endif ()\n\n  if (BLAS_LIBRARIES AND NOT BLAS_VENDOR_FOUND)\n      set (BLAS_VENDOR_FOUND \"NAS\")\n  endif()\n\nendif ()\n\n\n# Generic BLAS library?\nif (BLA_VENDOR STREQUAL \"Generic\" OR BLA_VENDOR STREQUAL \"All\")\n\n  set(BLAS_SEARCH_LIBS \"blas;blas_LINUX;blas_MAC;blas_WINDOWS;refblas\")\n  foreach (SEARCH_LIB ${BLAS_SEARCH_LIBS})\n    if (BLAS_LIBRARIES)\n    else ()\n      check_fortran_libraries(\n\tBLAS_LIBRARIES\n\tBLAS\n\tsgemm\n\t\"\"\n\t\"${SEARCH_LIB}\"\n\t\"${LGFORTRAN}\"\n\t)\n      if(NOT BLAS_FIND_QUIETLY)\n\tif(BLAS_LIBRARIES)\n\t  message(STATUS \"Looking for Generic BLAS: found\")\n\telse()\n\t  message(STATUS \"Looking for Generic BLAS: not found\")\n\tendif()\n      endif()\n    endif()\n  endforeach ()\n\n  if (BLAS_LIBRARIES AND NOT BLAS_VENDOR_FOUND)\n      set (BLAS_VENDOR_FOUND \"Netlib or other Generic libblas\")\n  endif()\n\nendif ()\n\n\nif(BLA_F95)\n\n  if(BLAS95_LIBRARIES)\n    set(BLAS95_FOUND TRUE)\n  else()\n    set(BLAS95_FOUND FALSE)\n  endif()\n\n  if(NOT BLAS_FIND_QUIETLY)\n    if(BLAS95_FOUND)\n      message(STATUS \"A library with BLAS95 API found.\")\n      message(STATUS \"BLAS_LIBRARIES ${BLAS_LIBRARIES}\")\n    else()\n      message(WARNING \"BLA_VENDOR has been set to ${BLA_VENDOR} but blas 95 libraries could not be found or check of symbols failed.\"\n\t\"\\nPlease indicate where to find blas libraries. You have three options:\\n\"\n\t\"- Option 1: Provide the installation directory of BLAS library with cmake option: -DBLAS_DIR=your/path/to/blas\\n\"\n\t\"- Option 2: Provide the directory where to find BLAS libraries with cmake option: -DBLAS_LIBDIR=your/path/to/blas/libs\\n\"\n\t\"- Option 3: Update your environment variable (Linux: LD_LIBRARY_PATH, Windows: LIB, Mac: DYLD_LIBRARY_PATH)\\n\"\n\t\"\\nTo follow libraries detection more precisely you can activate a verbose mode with -DBLAS_VERBOSE=ON at cmake configure.\"\n\t\"\\nYou could also specify a BLAS vendor to look for by setting -DBLA_VENDOR=blas_vendor_name.\"\n\t\"\\nList of possible BLAS vendor: Goto, ATLAS PhiPACK, CXML, DXML, SunPerf, SCSL, SGIMATH, IBMESSL, Intel10_32 (intel mkl v10 32 bit),\"\n\t\"Intel10_64lp (intel mkl v10 64 bit, lp thread model, lp64 model), Intel10_64lp_seq (intel mkl v10 64 bit, sequential code, lp64 model),\"\n\t\"Intel( older versions of mkl 32 and 64 bit), ACML, ACML_MP, ACML_GPU, Apple, NAS, Generic\")\n      if(BLAS_FIND_REQUIRED)\n\tmessage(FATAL_ERROR\n\t  \"A required library with BLAS95 API not found. Please specify library location.\")\n      else()\n\tmessage(STATUS\n\t  \"A library with BLAS95 API not found. Please specify library location.\")\n      endif()\n    endif()\n  endif()\n\n  set(BLAS_FOUND TRUE)\n  set(BLAS_LIBRARIES \"${BLAS95_LIBRARIES}\")\n\nelse()\n\n  if(BLAS_LIBRARIES)\n    set(BLAS_FOUND TRUE)\n  else()\n    set(BLAS_FOUND FALSE)\n  endif()\n\n  if(NOT BLAS_FIND_QUIETLY)\n    if(BLAS_FOUND)\n      message(STATUS \"A library with BLAS API found.\")\n      message(STATUS \"BLAS_LIBRARIES ${BLAS_LIBRARIES}\")\n    else()\n      message(WARNING \"BLA_VENDOR has been set to ${BLA_VENDOR} but blas libraries could not be found or check of symbols failed.\"\n\t\"\\nPlease indicate where to find blas libraries. You have three options:\\n\"\n\t\"- Option 1: Provide the installation directory of BLAS library with cmake option: -DBLAS_DIR=your/path/to/blas\\n\"\n\t\"- Option 2: Provide the directory where to find BLAS libraries with cmake option: -DBLAS_LIBDIR=your/path/to/blas/libs\\n\"\n\t\"- Option 3: Update your environment variable (Linux: LD_LIBRARY_PATH, Windows: LIB, Mac: DYLD_LIBRARY_PATH)\\n\"\n\t\"\\nTo follow libraries detection more precisely you can activate a verbose mode with -DBLAS_VERBOSE=ON at cmake configure.\"\n\t\"\\nYou could also specify a BLAS vendor to look for by setting -DBLA_VENDOR=blas_vendor_name.\"\n\t\"\\nList of possible BLAS vendor: Goto, ATLAS PhiPACK, CXML, DXML, SunPerf, SCSL, SGIMATH, IBMESSL, Intel10_32 (intel mkl v10 32 bit),\"\n\t\"Intel10_64lp (intel mkl v10 64 bit, lp thread model, lp64 model), Intel10_64lp_seq (intel mkl v10 64 bit, sequential code, lp64 model),\"\n\t\"Intel( older versions of mkl 32 and 64 bit), ACML, ACML_MP, ACML_GPU, Apple, NAS, Generic\")\n      if(BLAS_FIND_REQUIRED)\n\tmessage(FATAL_ERROR\n\t  \"A required library with BLAS API not found. Please specify library location.\")\n      else()\n\tmessage(STATUS\n\t  \"A library with BLAS API not found. Please specify library location.\")\n      endif()\n    endif()\n  endif()\n\nendif()\n\nset(CMAKE_FIND_LIBRARY_SUFFIXES ${_blas_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})\n\nif (BLAS_FOUND)\n  list(GET BLAS_LIBRARIES 0 first_lib)\n  get_filename_component(first_lib_path \"${first_lib}\" PATH)\n  if (${first_lib_path} MATCHES \"(/lib(32|64)?$)|(/lib/intel64$|/lib/ia32$)\")\n    string(REGEX REPLACE \"(/lib(32|64)?$)|(/lib/intel64$|/lib/ia32$)\" \"\" not_cached_dir \"${first_lib_path}\")\n    set(BLAS_DIR_FOUND \"${not_cached_dir}\" CACHE PATH \"Installation directory of BLAS library\" FORCE)\n  else()\n    set(BLAS_DIR_FOUND \"${first_lib_path}\" CACHE PATH \"Installation directory of BLAS library\" FORCE)\n  endif()\nendif()\nmark_as_advanced(BLAS_DIR)\nmark_as_advanced(BLAS_DIR_FOUND)\n"
  },
  {
    "path": "3rdparty/eigen3/cmake/FindBLASEXT.cmake",
    "content": "###\n#\n# @copyright (c) 2009-2014 The University of Tennessee and The University\n#                          of Tennessee Research Foundation.\n#                          All rights reserved.\n# @copyright (c) 2012-2016 Inria. All rights reserved.\n# @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.\n#\n###\n#\n# - Find BLAS EXTENDED for MORSE projects: find include dirs and libraries\n#\n# This module allows to find BLAS libraries by calling the official FindBLAS module\n# and handles the creation of different library lists whether the user wishes to link\n# with a sequential BLAS or a multihreaded (BLAS_SEQ_LIBRARIES and BLAS_PAR_LIBRARIES).\n# BLAS is detected with a FindBLAS call then if the BLAS vendor is Intel10_64lp, ACML\n# or IBMESSLMT then the module attempts to find the corresponding multithreaded libraries.\n#\n# The following variables have been added to manage links with sequential or multithreaded\n# versions:\n#  BLAS_INCLUDE_DIRS  - BLAS include directories\n#  BLAS_LIBRARY_DIRS  - Link directories for BLAS libraries\n#  BLAS_SEQ_LIBRARIES - BLAS component libraries to be linked (sequential)\n#  BLAS_PAR_LIBRARIES - BLAS component libraries to be linked (multithreaded)\n\n#=============================================================================\n# Copyright 2012-2013 Inria\n# Copyright 2012-2013 Emmanuel Agullo\n# Copyright 2012-2013 Mathieu Faverge\n# Copyright 2012      Cedric Castagnede\n# Copyright 2013-2016 Florent Pruvost\n#\n# Distributed under the OSI-approved BSD License (the \"License\");\n# see accompanying file MORSE-Copyright.txt for details.\n#\n# This software is distributed WITHOUT ANY WARRANTY; without even the\n# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n# See the License for more information.\n#=============================================================================\n# (To distribute this file outside of Morse, substitute the full\n#  License text for the above reference.)\n\n# macro to factorize this call\nmacro(find_package_blas)\n  if(BLASEXT_FIND_REQUIRED)\n    if(BLASEXT_FIND_QUIETLY)\n      find_package(BLAS REQUIRED QUIET)\n    else()\n      find_package(BLAS REQUIRED)\n    endif()\n  else()\n    if(BLASEXT_FIND_QUIETLY)\n      find_package(BLAS QUIET)\n    else()\n      find_package(BLAS)\n    endif()\n  endif()\nendmacro()\n\n# add a cache variable to let the user specify the BLAS vendor\nset(BLA_VENDOR \"\" CACHE STRING \"list of possible BLAS vendor:\n    Open, Eigen, Goto, ATLAS PhiPACK, CXML, DXML, SunPerf, SCSL, SGIMATH, IBMESSL, IBMESSLMT,\n    Intel10_32 (intel mkl v10 32 bit),\n    Intel10_64lp (intel mkl v10 64 bit, lp thread model, lp64 model),\n    Intel10_64lp_seq (intel mkl v10 64 bit, sequential code, lp64 model),\n    Intel( older versions of mkl 32 and 64 bit),\n    ACML, ACML_MP, ACML_GPU, Apple, NAS, Generic\")\n\nif(NOT BLASEXT_FIND_QUIETLY)\n  message(STATUS \"In FindBLASEXT\")\n  message(STATUS \"If you want to force the use of one specific library, \"\n    \"\\n   please specify the BLAS vendor by setting -DBLA_VENDOR=blas_vendor_name\"\n    \"\\n   at cmake configure.\")\n  message(STATUS \"List of possible BLAS vendor: Goto, ATLAS PhiPACK, CXML, \"\n    \"\\n   DXML, SunPerf, SCSL, SGIMATH, IBMESSL, IBMESSLMT, Intel10_32 (intel mkl v10 32 bit),\"\n    \"\\n   Intel10_64lp (intel mkl v10 64 bit, lp thread model, lp64 model),\"\n    \"\\n   Intel10_64lp_seq (intel mkl v10 64 bit, sequential code, lp64 model),\"\n    \"\\n   Intel( older versions of mkl 32 and 64 bit),\"\n    \"\\n   ACML, ACML_MP, ACML_GPU, Apple, NAS, Generic\")\nendif()\n\nif (NOT BLAS_FOUND)\n  # First try to detect two cases:\n  # 1: only SEQ libs are handled\n  # 2: both SEQ and PAR libs are handled\n  find_package_blas()\nendif ()\n\n# detect the cases where SEQ and PAR libs are handled\nif(BLA_VENDOR STREQUAL \"All\" AND\n    (BLAS_mkl_core_LIBRARY OR BLAS_mkl_core_dll_LIBRARY)\n    )\n  set(BLA_VENDOR \"Intel\")\n  if(BLAS_mkl_intel_LIBRARY)\n    set(BLA_VENDOR \"Intel10_32\")\n  endif()\n  if(BLAS_mkl_intel_lp64_LIBRARY)\n    set(BLA_VENDOR \"Intel10_64lp\")\n  endif()\n  if(NOT BLASEXT_FIND_QUIETLY)\n    message(STATUS \"A BLAS library has been found (${BLAS_LIBRARIES}) but we\"\n      \"\\n   have also potentially detected some multithreaded BLAS libraries from the MKL.\"\n      \"\\n   We try to find both libraries lists (Sequential/Multithreaded).\")\n  endif()\n  set(BLAS_FOUND \"\")\nelseif(BLA_VENDOR STREQUAL \"All\" AND BLAS_acml_LIBRARY)\n  set(BLA_VENDOR \"ACML\")\n  if(NOT BLASEXT_FIND_QUIETLY)\n    message(STATUS \"A BLAS library has been found (${BLAS_LIBRARIES}) but we\"\n      \"\\n   have also potentially detected some multithreaded BLAS libraries from the ACML.\"\n      \"\\n   We try to find both libraries lists (Sequential/Multithreaded).\")\n  endif()\n  set(BLAS_FOUND \"\")\nelseif(BLA_VENDOR STREQUAL \"All\" AND BLAS_essl_LIBRARY)\n  set(BLA_VENDOR \"IBMESSL\")\n  if(NOT BLASEXT_FIND_QUIETLY)\n    message(STATUS \"A BLAS library has been found (${BLAS_LIBRARIES}) but we\"\n      \"\\n   have also potentially detected some multithreaded BLAS libraries from the ESSL.\"\n      \"\\n   We try to find both libraries lists (Sequential/Multithreaded).\")\n  endif()\n  set(BLAS_FOUND \"\")\nendif()\n\n# Intel case\nif(BLA_VENDOR MATCHES \"Intel*\")\n\n  ###\n  # look for include path if the BLAS vendor is Intel\n  ###\n\n  # gather system include paths\n  unset(_inc_env)\n  if(WIN32)\n    string(REPLACE \":\" \";\" _inc_env \"$ENV{INCLUDE}\")\n  else()\n    string(REPLACE \":\" \";\" _path_env \"$ENV{INCLUDE}\")\n    list(APPEND _inc_env \"${_path_env}\")\n    string(REPLACE \":\" \";\" _path_env \"$ENV{C_INCLUDE_PATH}\")\n    list(APPEND _inc_env \"${_path_env}\")\n    string(REPLACE \":\" \";\" _path_env \"$ENV{CPATH}\")\n    list(APPEND _inc_env \"${_path_env}\")\n    string(REPLACE \":\" \";\" _path_env \"$ENV{INCLUDE_PATH}\")\n    list(APPEND _inc_env \"${_path_env}\")\n  endif()\n  list(APPEND _inc_env \"${CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES}\")\n  list(APPEND _inc_env \"${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES}\")\n  set(ENV_MKLROOT \"$ENV{MKLROOT}\")\n  if (ENV_MKLROOT)\n    list(APPEND _inc_env \"${ENV_MKLROOT}/include\")\n  endif()\n  list(REMOVE_DUPLICATES _inc_env)\n\n  # find mkl.h inside known include paths\n  set(BLAS_mkl.h_INCLUDE_DIRS \"BLAS_mkl.h_INCLUDE_DIRS-NOTFOUND\")\n  if(BLAS_INCDIR)\n    set(BLAS_mkl.h_INCLUDE_DIRS \"BLAS_mkl.h_INCLUDE_DIRS-NOTFOUND\")\n    find_path(BLAS_mkl.h_INCLUDE_DIRS\n      NAMES mkl.h\n      HINTS ${BLAS_INCDIR})\n  else()\n    if(BLAS_DIR)\n      set(BLAS_mkl.h_INCLUDE_DIRS \"BLAS_mkl.h_INCLUDE_DIRS-NOTFOUND\")\n      find_path(BLAS_mkl.h_INCLUDE_DIRS\n\tNAMES mkl.h\n\tHINTS ${BLAS_DIR}\n\tPATH_SUFFIXES include)\n    else()\n      set(BLAS_mkl.h_INCLUDE_DIRS \"BLAS_mkl.h_INCLUDE_DIRS-NOTFOUND\")\n      find_path(BLAS_mkl.h_INCLUDE_DIRS\n\tNAMES mkl.h\n\tHINTS ${_inc_env})\n    endif()\n  endif()\n  mark_as_advanced(BLAS_mkl.h_INCLUDE_DIRS)\n  ## Print status if not found\n  ## -------------------------\n  #if (NOT BLAS_mkl.h_INCLUDE_DIRS AND MORSE_VERBOSE)\n  #    Print_Find_Header_Status(blas mkl.h)\n  #endif ()\n  set(BLAS_INCLUDE_DIRS \"\")\n  if(BLAS_mkl.h_INCLUDE_DIRS)\n    list(APPEND BLAS_INCLUDE_DIRS \"${BLAS_mkl.h_INCLUDE_DIRS}\" )\n  endif()\n\n  ###\n  # look for libs\n  ###\n  # if Intel 10 64 bit -> look for sequential and multithreaded versions\n  if(BLA_VENDOR MATCHES \"Intel10_64lp*\")\n\n    ## look for the sequential version\n    set(BLA_VENDOR \"Intel10_64lp_seq\")\n    if(NOT BLASEXT_FIND_QUIETLY)\n      message(STATUS \"Look for the sequential version Intel10_64lp_seq\")\n    endif()\n    find_package_blas()\n    if(BLAS_FOUND)\n      set(BLAS_SEQ_LIBRARIES \"${BLAS_LIBRARIES}\")\n    else()\n      set(BLAS_SEQ_LIBRARIES \"${BLAS_SEQ_LIBRARIES-NOTFOUND}\")\n    endif()\n\n    ## look for the multithreaded version\n    set(BLA_VENDOR \"Intel10_64lp\")\n    if(NOT BLASEXT_FIND_QUIETLY)\n      message(STATUS \"Look for the multithreaded version Intel10_64lp\")\n    endif()\n    find_package_blas()\n    if(BLAS_FOUND)\n      set(BLAS_PAR_LIBRARIES \"${BLAS_LIBRARIES}\")\n    else()\n      set(BLAS_PAR_LIBRARIES \"${BLAS_PAR_LIBRARIES-NOTFOUND}\")\n    endif()\n\n  else()\n\n    if(BLAS_FOUND)\n      set(BLAS_SEQ_LIBRARIES \"${BLAS_LIBRARIES}\")\n    else()\n      set(BLAS_SEQ_LIBRARIES \"${BLAS_SEQ_LIBRARIES-NOTFOUND}\")\n    endif()\n\n  endif()\n\n  # ACML case\nelseif(BLA_VENDOR MATCHES \"ACML*\")\n\n  ## look for the sequential version\n  set(BLA_VENDOR \"ACML\")\n  find_package_blas()\n  if(BLAS_FOUND)\n    set(BLAS_SEQ_LIBRARIES \"${BLAS_LIBRARIES}\")\n  else()\n    set(BLAS_SEQ_LIBRARIES \"${BLAS_SEQ_LIBRARIES-NOTFOUND}\")\n  endif()\n\n  ## look for the multithreaded version\n  set(BLA_VENDOR \"ACML_MP\")\n  find_package_blas()\n  if(BLAS_FOUND)\n    set(BLAS_PAR_LIBRARIES \"${BLAS_LIBRARIES}\")\n  else()\n    set(BLAS_PAR_LIBRARIES \"${BLAS_PAR_LIBRARIES-NOTFOUND}\")\n  endif()\n\n  # IBMESSL case\nelseif(BLA_VENDOR MATCHES \"IBMESSL*\")\n\n  ## look for the sequential version\n  set(BLA_VENDOR \"IBMESSL\")\n  find_package_blas()\n  if(BLAS_FOUND)\n    set(BLAS_SEQ_LIBRARIES \"${BLAS_LIBRARIES}\")\n  else()\n    set(BLAS_SEQ_LIBRARIES \"${BLAS_SEQ_LIBRARIES-NOTFOUND}\")\n  endif()\n\n  ## look for the multithreaded version\n  set(BLA_VENDOR \"IBMESSLMT\")\n  find_package_blas()\n  if(BLAS_FOUND)\n    set(BLAS_PAR_LIBRARIES \"${BLAS_LIBRARIES}\")\n  else()\n    set(BLAS_PAR_LIBRARIES \"${BLAS_PAR_LIBRARIES-NOTFOUND}\")\n  endif()\n\nelse()\n\n  if(BLAS_FOUND)\n    # define the SEQ libs as the BLAS_LIBRARIES\n    set(BLAS_SEQ_LIBRARIES \"${BLAS_LIBRARIES}\")\n  else()\n    set(BLAS_SEQ_LIBRARIES \"${BLAS_SEQ_LIBRARIES-NOTFOUND}\")\n  endif()\n  set(BLAS_PAR_LIBRARIES \"${BLAS_PAR_LIBRARIES-NOTFOUND}\")\n\nendif()\n\n\nif(BLAS_SEQ_LIBRARIES)\n  set(BLAS_LIBRARIES \"${BLAS_SEQ_LIBRARIES}\")\nendif()\n\n# extract libs paths\n# remark: because it is not given by find_package(BLAS)\nset(BLAS_LIBRARY_DIRS \"\")\nstring(REPLACE \" \" \";\" BLAS_LIBRARIES \"${BLAS_LIBRARIES}\")\nforeach(blas_lib ${BLAS_LIBRARIES})\n  if (EXISTS \"${blas_lib}\")\n    get_filename_component(a_blas_lib_dir \"${blas_lib}\" PATH)\n    list(APPEND BLAS_LIBRARY_DIRS \"${a_blas_lib_dir}\" )\n  else()\n    string(REPLACE \"-L\" \"\" blas_lib \"${blas_lib}\")\n    if (EXISTS \"${blas_lib}\")\n      list(APPEND BLAS_LIBRARY_DIRS \"${blas_lib}\" )\n    else()\n      get_filename_component(a_blas_lib_dir \"${blas_lib}\" PATH)\n      if (EXISTS \"${a_blas_lib_dir}\")\n\tlist(APPEND BLAS_LIBRARY_DIRS \"${a_blas_lib_dir}\" )\n      endif()\n    endif()\n  endif()\nendforeach()\nif (BLAS_LIBRARY_DIRS)\n  list(REMOVE_DUPLICATES BLAS_LIBRARY_DIRS)\nendif ()\n\n# check that BLAS has been found\n# ---------------------------------\ninclude(FindPackageHandleStandardArgs)\nif(BLA_VENDOR MATCHES \"Intel*\")\n  if(BLA_VENDOR MATCHES \"Intel10_64lp*\")\n    if(NOT BLASEXT_FIND_QUIETLY)\n      message(STATUS \"BLAS found is Intel MKL:\"\n\t\"\\n   we manage two lists of libs, one sequential and one parallel if found\"\n\t\"\\n   (see BLAS_SEQ_LIBRARIES and BLAS_PAR_LIBRARIES)\")\n      message(STATUS \"BLAS sequential libraries stored in BLAS_SEQ_LIBRARIES\")\n    endif()\n    find_package_handle_standard_args(BLAS DEFAULT_MSG\n      BLAS_SEQ_LIBRARIES\n      BLAS_LIBRARY_DIRS\n      BLAS_INCLUDE_DIRS)\n    if(BLAS_PAR_LIBRARIES)\n      if(NOT BLASEXT_FIND_QUIETLY)\n\tmessage(STATUS \"BLAS parallel libraries stored in BLAS_PAR_LIBRARIES\")\n      endif()\n      find_package_handle_standard_args(BLAS DEFAULT_MSG\n\tBLAS_PAR_LIBRARIES)\n    endif()\n  else()\n    if(NOT BLASEXT_FIND_QUIETLY)\n      message(STATUS \"BLAS sequential libraries stored in BLAS_SEQ_LIBRARIES\")\n    endif()\n    find_package_handle_standard_args(BLAS DEFAULT_MSG\n      BLAS_SEQ_LIBRARIES\n      BLAS_LIBRARY_DIRS\n      BLAS_INCLUDE_DIRS)\n  endif()\nelseif(BLA_VENDOR MATCHES \"ACML*\")\n  if(NOT BLASEXT_FIND_QUIETLY)\n    message(STATUS \"BLAS found is ACML:\"\n      \"\\n   we manage two lists of libs, one sequential and one parallel if found\"\n      \"\\n   (see BLAS_SEQ_LIBRARIES and BLAS_PAR_LIBRARIES)\")\n    message(STATUS \"BLAS sequential libraries stored in BLAS_SEQ_LIBRARIES\")\n  endif()\n  find_package_handle_standard_args(BLAS DEFAULT_MSG\n    BLAS_SEQ_LIBRARIES\n    BLAS_LIBRARY_DIRS)\n  if(BLAS_PAR_LIBRARIES)\n    if(NOT BLASEXT_FIND_QUIETLY)\n      message(STATUS \"BLAS parallel libraries stored in BLAS_PAR_LIBRARIES\")\n    endif()\n    find_package_handle_standard_args(BLAS DEFAULT_MSG\n      BLAS_PAR_LIBRARIES)\n  endif()\nelseif(BLA_VENDOR MATCHES \"IBMESSL*\")\n  if(NOT BLASEXT_FIND_QUIETLY)\n    message(STATUS \"BLAS found is ESSL:\"\n      \"\\n   we manage two lists of libs, one sequential and one parallel if found\"\n      \"\\n   (see BLAS_SEQ_LIBRARIES and BLAS_PAR_LIBRARIES)\")\n    message(STATUS \"BLAS sequential libraries stored in BLAS_SEQ_LIBRARIES\")\n  endif()\n  find_package_handle_standard_args(BLAS DEFAULT_MSG\n    BLAS_SEQ_LIBRARIES\n    BLAS_LIBRARY_DIRS)\n  if(BLAS_PAR_LIBRARIES)\n    if(NOT BLASEXT_FIND_QUIETLY)\n      message(STATUS \"BLAS parallel libraries stored in BLAS_PAR_LIBRARIES\")\n    endif()\n    find_package_handle_standard_args(BLAS DEFAULT_MSG\n      BLAS_PAR_LIBRARIES)\n  endif()\nelse()\n  if(NOT BLASEXT_FIND_QUIETLY)\n    message(STATUS \"BLAS sequential libraries stored in BLAS_SEQ_LIBRARIES\")\n  endif()\n  find_package_handle_standard_args(BLAS DEFAULT_MSG\n    BLAS_SEQ_LIBRARIES\n    BLAS_LIBRARY_DIRS)\nendif()\n"
  },
  {
    "path": "3rdparty/eigen3/cmake/FindCholmod.cmake",
    "content": "# Cholmod lib usually requires linking to a blas and lapack library.\n# It is up to the user of this module to find a BLAS and link to it.\n\nif (CHOLMOD_INCLUDES AND CHOLMOD_LIBRARIES)\n  set(CHOLMOD_FIND_QUIETLY TRUE)\nendif ()\n\nfind_path(CHOLMOD_INCLUDES\n  NAMES\n  cholmod.h\n  PATHS\n  $ENV{CHOLMODDIR}\n  ${INCLUDE_INSTALL_DIR}\n  PATH_SUFFIXES\n  suitesparse\n  ufsparse\n)\n\nfind_library(CHOLMOD_LIBRARIES cholmod PATHS $ENV{CHOLMODDIR} ${LIB_INSTALL_DIR})\n\nif(CHOLMOD_LIBRARIES)\n\n  get_filename_component(CHOLMOD_LIBDIR ${CHOLMOD_LIBRARIES} PATH)\n\n  find_library(AMD_LIBRARY amd PATHS ${CHOLMOD_LIBDIR} $ENV{CHOLMODDIR} ${LIB_INSTALL_DIR})\n  if (AMD_LIBRARY)\n    set(CHOLMOD_LIBRARIES ${CHOLMOD_LIBRARIES} ${AMD_LIBRARY})\n  else ()\n    set(CHOLMOD_LIBRARIES FALSE)\n  endif ()\n\nendif()\n\nif(CHOLMOD_LIBRARIES)\n\n  find_library(COLAMD_LIBRARY colamd PATHS ${CHOLMOD_LIBDIR} $ENV{CHOLMODDIR} ${LIB_INSTALL_DIR})\n  if (COLAMD_LIBRARY)\n    set(CHOLMOD_LIBRARIES ${CHOLMOD_LIBRARIES} ${COLAMD_LIBRARY})\n  else ()\n    set(CHOLMOD_LIBRARIES FALSE)\n  endif ()\n\nendif()\n\nif(CHOLMOD_LIBRARIES)\n\n  find_library(CAMD_LIBRARY camd PATHS ${CHOLMOD_LIBDIR} $ENV{CHOLMODDIR} ${LIB_INSTALL_DIR})\n  if (CAMD_LIBRARY)\n    set(CHOLMOD_LIBRARIES ${CHOLMOD_LIBRARIES} ${CAMD_LIBRARY})\n  else ()\n    set(CHOLMOD_LIBRARIES FALSE)\n  endif ()\n\nendif()\n\nif(CHOLMOD_LIBRARIES)\n\n  find_library(CCOLAMD_LIBRARY ccolamd PATHS ${CHOLMOD_LIBDIR} $ENV{CHOLMODDIR} ${LIB_INSTALL_DIR})\n  if (CCOLAMD_LIBRARY)\n    set(CHOLMOD_LIBRARIES ${CHOLMOD_LIBRARIES} ${CCOLAMD_LIBRARY})\n  else ()\n    set(CHOLMOD_LIBRARIES FALSE)\n  endif ()\n\nendif()\n\nif(CHOLMOD_LIBRARIES)\n\n  find_library(CHOLMOD_METIS_LIBRARY metis PATHS ${CHOLMOD_LIBDIR} $ENV{CHOLMODDIR} ${LIB_INSTALL_DIR})\n  if (CHOLMOD_METIS_LIBRARY)\n    set(CHOLMOD_LIBRARIES ${CHOLMOD_LIBRARIES} ${CHOLMOD_METIS_LIBRARY})\n  endif ()\n\nendif()\n\nif(CHOLMOD_LIBRARIES)\n\n  find_library(SUITESPARSE_LIBRARY SuiteSparse PATHS ${CHOLMOD_LIBDIR} $ENV{CHOLMODDIR} ${LIB_INSTALL_DIR})\n  if (SUITESPARSE_LIBRARY)\n    set(CHOLMOD_LIBRARIES ${CHOLMOD_LIBRARIES} ${SUITESPARSE_LIBRARY})\n  endif ()\n  \nendif()\n\ninclude(FindPackageHandleStandardArgs)\nfind_package_handle_standard_args(CHOLMOD DEFAULT_MSG\n                                  CHOLMOD_INCLUDES CHOLMOD_LIBRARIES)\n\nmark_as_advanced(CHOLMOD_INCLUDES CHOLMOD_LIBRARIES AMD_LIBRARY COLAMD_LIBRARY SUITESPARSE_LIBRARY CAMD_LIBRARY CCOLAMD_LIBRARY CHOLMOD_METIS_LIBRARY)\n"
  },
  {
    "path": "3rdparty/eigen3/cmake/FindComputeCpp.cmake",
    "content": "#.rst:\n# FindComputeCpp\n#---------------\n#\n#   Copyright 2016-2018 Codeplay Software Ltd.\n#\n#   Licensed under the Apache License, Version 2.0 (the \"License\");\n#   you may not use these files except in compliance with the License.\n#   You may obtain a copy of the License at\n#\n#       http://www.apache.org/licenses/LICENSE-2.0\n#\n#\n#   Unless required by applicable law or agreed to in writing, software\n#   distributed under the License is distributed on an \"AS IS\" BASIS,\n#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n#   See the License for the specific language governing permissions and\n#   limitations under the License.\n\n#########################\n#  FindComputeCpp.cmake\n#########################\n#\n#  Tools for finding and building with ComputeCpp.\n#\n#  User must define ComputeCpp_DIR pointing to the ComputeCpp\n#  installation.\n#\n#  Latest version of this file can be found at:\n#    https://github.com/codeplaysoftware/computecpp-sdk\n\ncmake_minimum_required(VERSION 3.4.3)\ninclude(FindPackageHandleStandardArgs)\n\nset(COMPUTECPP_USER_FLAGS \"\" CACHE STRING \"User flags for compute++\")\nseparate_arguments(COMPUTECPP_USER_FLAGS)\nmark_as_advanced(COMPUTECPP_USER_FLAGS)\n\nset(COMPUTECPP_BITCODE \"spir64\" CACHE STRING\n  \"Bitcode type to use as SYCL target in compute++\")\nmark_as_advanced(COMPUTECPP_BITCODE)\n\nfind_package(OpenCL REQUIRED)\n\n# Find ComputeCpp package\n\nif(DEFINED ComputeCpp_DIR)\n  set(computecpp_find_hint ${ComputeCpp_DIR})\nelseif(DEFINED ENV{COMPUTECPP_DIR})\n  set(computecpp_find_hint $ENV{COMPUTECPP_DIR})\nendif()\n\n# Used for running executables on the host\nset(computecpp_host_find_hint ${computecpp_find_hint})\n\nif(CMAKE_CROSSCOMPILING)\n  # ComputeCpp_HOST_DIR is used to find executables that are run on the host\n  if(DEFINED ComputeCpp_HOST_DIR)\n    set(computecpp_host_find_hint ${ComputeCpp_HOST_DIR})\n  elseif(DEFINED ENV{COMPUTECPP_HOST_DIR})\n    set(computecpp_host_find_hint $ENV{COMPUTECPP_HOST_DIR})\n  endif()\nendif()\n\nfind_program(ComputeCpp_DEVICE_COMPILER_EXECUTABLE compute++\n  HINTS ${computecpp_host_find_hint}\n  PATH_SUFFIXES bin)\n\nfind_program(ComputeCpp_INFO_EXECUTABLE computecpp_info\n  HINTS ${computecpp_host_find_hint}\n  PATH_SUFFIXES bin)\n\nfind_library(COMPUTECPP_RUNTIME_LIBRARY\n  NAMES ComputeCpp ComputeCpp_vs2015\n  HINTS ${computecpp_find_hint}\n  PATH_SUFFIXES lib\n  DOC \"ComputeCpp Runtime Library\")\n\nfind_library(COMPUTECPP_RUNTIME_LIBRARY_DEBUG\n  NAMES ComputeCpp ComputeCpp_vs2015_d\n  HINTS ${computecpp_find_hint}\n  PATH_SUFFIXES lib\n  DOC \"ComputeCpp Debug Runtime Library\")\n\nfind_path(ComputeCpp_INCLUDE_DIRS\n  NAMES \"CL/sycl.hpp\"\n  HINTS ${computecpp_find_hint}/include\n  DOC \"The ComputeCpp include directory\")\nget_filename_component(ComputeCpp_INCLUDE_DIRS ${ComputeCpp_INCLUDE_DIRS} ABSOLUTE)\n\nget_filename_component(computecpp_canonical_root_dir \"${ComputeCpp_INCLUDE_DIRS}/..\" ABSOLUTE)\nset(ComputeCpp_ROOT_DIR \"${computecpp_canonical_root_dir}\" CACHE PATH\n    \"The root of the ComputeCpp install\")\n\nif(NOT ComputeCpp_INFO_EXECUTABLE)\n  message(WARNING \"Can't find computecpp_info - check ComputeCpp_DIR\")\nelse()\n  execute_process(COMMAND ${ComputeCpp_INFO_EXECUTABLE} \"--dump-version\"\n    OUTPUT_VARIABLE ComputeCpp_VERSION\n    RESULT_VARIABLE ComputeCpp_INFO_EXECUTABLE_RESULT OUTPUT_STRIP_TRAILING_WHITESPACE)\n  if(NOT ComputeCpp_INFO_EXECUTABLE_RESULT EQUAL \"0\")\n    message(WARNING \"Package version - Error obtaining version!\")\n  endif()\n\n  execute_process(COMMAND ${ComputeCpp_INFO_EXECUTABLE} \"--dump-is-supported\"\n    OUTPUT_VARIABLE COMPUTECPP_PLATFORM_IS_SUPPORTED\n    RESULT_VARIABLE ComputeCpp_INFO_EXECUTABLE_RESULT OUTPUT_STRIP_TRAILING_WHITESPACE)\n  if(NOT ComputeCpp_INFO_EXECUTABLE_RESULT EQUAL \"0\")\n    message(WARNING \"platform - Error checking platform support!\")\n  else()\n    mark_as_advanced(COMPUTECPP_PLATFORM_IS_SUPPORTED)\n    if (COMPUTECPP_PLATFORM_IS_SUPPORTED)\n      message(STATUS \"platform - your system can support ComputeCpp\")\n    else()\n      message(WARNING \"platform - your system CANNOT support ComputeCpp\")\n    endif()\n  endif()\nendif()\n\nfind_package_handle_standard_args(ComputeCpp\n  REQUIRED_VARS ComputeCpp_ROOT_DIR\n                ComputeCpp_DEVICE_COMPILER_EXECUTABLE\n                ComputeCpp_INFO_EXECUTABLE\n                COMPUTECPP_RUNTIME_LIBRARY\n                COMPUTECPP_RUNTIME_LIBRARY_DEBUG\n                ComputeCpp_INCLUDE_DIRS\n  VERSION_VAR ComputeCpp_VERSION)\nmark_as_advanced(ComputeCpp_ROOT_DIR\n                 ComputeCpp_DEVICE_COMPILER_EXECUTABLE\n                 ComputeCpp_INFO_EXECUTABLE\n                 COMPUTECPP_RUNTIME_LIBRARY\n                 COMPUTECPP_RUNTIME_LIBRARY_DEBUG\n                 ComputeCpp_INCLUDE_DIRS\n                 ComputeCpp_VERSION)\n\nif(NOT ComputeCpp_FOUND)\n  return()\nendif()\n\nlist(APPEND COMPUTECPP_DEVICE_COMPILER_FLAGS -O2 -mllvm -inline-threshold=1000 -intelspirmetadata)\nmark_as_advanced(COMPUTECPP_DEVICE_COMPILER_FLAGS)\n\nif(CMAKE_CROSSCOMPILING)\n  if(NOT COMPUTECPP_DONT_USE_TOOLCHAIN)\n    list(APPEND COMPUTECPP_DEVICE_COMPILER_FLAGS --gcc-toolchain=${COMPUTECPP_TOOLCHAIN_DIR})\n  endif()\n  list(APPEND COMPUTECPP_DEVICE_COMPILER_FLAGS --sysroot=${COMPUTECPP_SYSROOT_DIR})\n  list(APPEND COMPUTECPP_DEVICE_COMPILER_FLAGS -target ${COMPUTECPP_TARGET_TRIPLE})\nendif()\n\nlist(APPEND COMPUTECPP_DEVICE_COMPILER_FLAGS -sycl-target ${COMPUTECPP_BITCODE})\nmessage(STATUS \"compute++ flags - ${COMPUTECPP_DEVICE_COMPILER_FLAGS}\")\n\nif(NOT TARGET OpenCL::OpenCL)\n  add_library(OpenCL::OpenCL UNKNOWN IMPORTED)\n  set_target_properties(OpenCL::OpenCL PROPERTIES\n    IMPORTED_LOCATION             \"${OpenCL_LIBRARIES}\"\n    INTERFACE_INCLUDE_DIRECTORIES \"${OpenCL_INCLUDE_DIRS}\"\n  )\nendif()\n\nif(NOT TARGET ComputeCpp::ComputeCpp)\n  add_library(ComputeCpp::ComputeCpp UNKNOWN IMPORTED)\n  set_target_properties(ComputeCpp::ComputeCpp PROPERTIES\n    IMPORTED_LOCATION_DEBUG          \"${COMPUTECPP_RUNTIME_LIBRARY_DEBUG}\"\n    IMPORTED_LOCATION_RELWITHDEBINFO \"${COMPUTECPP_RUNTIME_LIBRARY_DEBUG}\"\n    IMPORTED_LOCATION                \"${COMPUTECPP_RUNTIME_LIBRARY}\"\n    INTERFACE_INCLUDE_DIRECTORIES    \"${ComputeCpp_INCLUDE_DIRS}\"\n    INTERFACE_LINK_LIBRARIES         \"OpenCL::OpenCL\"\n  )\nendif()\n\n# This property allows targets to specify that their sources should be\n# compiled with the integration header included after the user's\n# sources, not before (e.g. when an enum is used in a kernel name, this\n# is not technically valid SYCL code but can work with ComputeCpp)\ndefine_property(\n  TARGET PROPERTY COMPUTECPP_INCLUDE_AFTER\n  BRIEF_DOCS \"Include integration header after user source\"\n  FULL_DOCS \"Changes compiler arguments such that the source file is\n  actually the integration header, and the .cpp file is included on\n  the command line so that it is seen by the compiler first. Enables\n  non-standards-conformant SYCL code to compile with ComputeCpp.\"\n)\ndefine_property(\n  TARGET PROPERTY INTERFACE_COMPUTECPP_FLAGS\n  BRIEF_DOCS \"Interface compile flags to provide compute++\"\n  FULL_DOCS  \"Set additional compile flags to pass to compute++ when compiling\n  any target which links to this one.\"\n)\ndefine_property(\n  SOURCE PROPERTY COMPUTECPP_SOURCE_FLAGS\n  BRIEF_DOCS \"Source file compile flags for compute++\"\n  FULL_DOCS  \"Set additional compile flags for compiling the SYCL integration\n  header for the given source file.\"\n)\n\n####################\n#   __build_ir\n####################\n#\n#  Adds a custom target for running compute++ and adding a dependency for the\n#  resulting integration header.\n#\n#  TARGET : Name of the target.\n#  SOURCE : Source file to be compiled.\n#  COUNTER : Counter included in name of custom target. Different counter\n#       values prevent duplicated names of custom target when source files with\n#       the same name, but located in different directories, are used for the\n#       same target.\n#\nfunction(__build_ir)\n  set(options)\n  set(one_value_args\n    TARGET\n    SOURCE\n    COUNTER\n  )\n  set(multi_value_args)\n  cmake_parse_arguments(SDK_BUILD_IR\n    \"${options}\"\n    \"${one_value_args}\"\n    \"${multi_value_args}\"\n    ${ARGN}\n  )\n  get_filename_component(sourceFileName ${SDK_BUILD_IR_SOURCE} NAME)\n\n  # Set the path to the integration header.\n  # The .sycl filename must depend on the target so that different targets\n  # using the same source file will be generated with a different rule.\n  set(baseSyclName ${CMAKE_CURRENT_BINARY_DIR}/${SDK_BUILD_IR_TARGET}_${sourceFileName})\n  set(outputSyclFile ${baseSyclName}.sycl)\n  set(depFileName ${baseSyclName}.sycl.d)\n\n  set(include_directories \"$<TARGET_PROPERTY:${SDK_BUILD_IR_TARGET},INCLUDE_DIRECTORIES>\")\n  set(compile_definitions \"$<TARGET_PROPERTY:${SDK_BUILD_IR_TARGET},COMPILE_DEFINITIONS>\")\n  set(generated_include_directories\n    $<$<BOOL:${include_directories}>:-I\\\"$<JOIN:${include_directories},\\\"\\t-I\\\">\\\">)\n  set(generated_compile_definitions\n    $<$<BOOL:${compile_definitions}>:-D$<JOIN:${compile_definitions},\\t-D>>)\n\n  # Obtain language standard of the file\n  set(device_compiler_cxx_standard)\n  get_target_property(targetCxxStandard ${SDK_BUILD_IR_TARGET} CXX_STANDARD)\n  if (targetCxxStandard MATCHES 17)\n    set(device_compiler_cxx_standard \"-std=c++1z\")\n  elseif (targetCxxStandard MATCHES 14)\n    set(device_compiler_cxx_standard \"-std=c++14\")\n  elseif (targetCxxStandard MATCHES 11)\n    set(device_compiler_cxx_standard \"-std=c++11\")\n  elseif (targetCxxStandard MATCHES 98)\n    message(FATAL_ERROR \"SYCL applications cannot be compiled using C++98\")\n  else ()\n    set(device_compiler_cxx_standard \"\")\n  endif()\n\n  get_property(source_compile_flags\n    SOURCE ${SDK_BUILD_IR_SOURCE}\n    PROPERTY COMPUTECPP_SOURCE_FLAGS\n  )\n  separate_arguments(source_compile_flags)\n  if(source_compile_flags)\n    list(APPEND computecpp_source_flags ${source_compile_flags})\n  endif()\n\n  list(APPEND COMPUTECPP_DEVICE_COMPILER_FLAGS\n    ${device_compiler_cxx_standard}\n    ${COMPUTECPP_USER_FLAGS}\n    ${computecpp_source_flags}\n  )\n\n  set(ir_dependencies ${SDK_BUILD_IR_SOURCE})\n  get_target_property(target_libraries ${SDK_BUILD_IR_TARGET} LINK_LIBRARIES)\n  if(target_libraries)\n    foreach(library ${target_libraries})\n      list(APPEND ir_dependencies ${library})\n    endforeach()\n  endif()\n\n  # Depfile support was only added in CMake 3.7\n  # CMake throws an error if it is unsupported by the generator (i. e. not ninja)\n  if((NOT CMAKE_VERSION VERSION_LESS 3.7.0) AND\n          CMAKE_GENERATOR MATCHES \"Ninja\")\n    file(RELATIVE_PATH relOutputFile ${CMAKE_BINARY_DIR} ${outputSyclFile})\n    set(generate_depfile -MMD -MF ${depFileName} -MT ${relOutputFile})\n    set(enable_depfile DEPFILE ${depFileName})\n  endif()\n\n  # Add custom command for running compute++\n  add_custom_command(\n    OUTPUT ${outputSyclFile}\n    COMMAND ${ComputeCpp_DEVICE_COMPILER_EXECUTABLE}\n            ${COMPUTECPP_DEVICE_COMPILER_FLAGS}\n            ${generated_include_directories}\n            ${generated_compile_definitions}\n            -o ${outputSyclFile}\n            -c ${SDK_BUILD_IR_SOURCE}\n            ${generate_depfile}\n    DEPENDS ${ir_dependencies}\n    IMPLICIT_DEPENDS CXX ${SDK_BUILD_IR_SOURCE}\n    ${enable_depfile}\n    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}\n    COMMENT \"Building ComputeCpp integration header file ${outputSyclFile}\")\n\n  # Name: (user-defined name)_(source file)_(counter)_ih\n  set(headerTargetName\n    ${SDK_BUILD_IR_TARGET}_${sourceFileName}_${SDK_BUILD_IR_COUNTER}_ih)\n\n  if(NOT MSVC)\n    # Add a custom target for the generated integration header\n    add_custom_target(${headerTargetName} DEPENDS ${outputSyclFile})\n    add_dependencies(${SDK_BUILD_IR_TARGET} ${headerTargetName})\n  endif()\n\n  # This property can be set on a per-target basis to indicate that the\n  # integration header should appear after the main source listing\n  get_target_property(includeAfter ${SDK_ADD_SYCL_TARGET} COMPUTECPP_INCLUDE_AFTER)\n\n  if(includeAfter)\n    # Change the source file to the integration header - e.g.\n    # g++ -c source_file_name.cpp.sycl\n    get_target_property(current_sources ${SDK_BUILD_IR_TARGET} SOURCES)\n    # Remove absolute path to source file\n    list(REMOVE_ITEM current_sources ${SDK_BUILD_IR_SOURCE})\n    # Remove relative path to source file\n    string(REPLACE \"${CMAKE_CURRENT_SOURCE_DIR}/\" \"\"\n      rel_source_file ${SDK_BUILD_IR_SOURCE}\n    )\n    list(REMOVE_ITEM current_sources ${rel_source_file})\n    # Add SYCL header to source list\n    list(APPEND current_sources ${outputSyclFile})\n    set_property(TARGET ${SDK_BUILD_IR_TARGET}\n      PROPERTY SOURCES ${current_sources})\n    # CMake/gcc don't know what language a .sycl file is, so tell them\n    set_property(SOURCE ${outputSyclFile} PROPERTY LANGUAGE CXX)\n    set(includedFile ${SDK_BUILD_IR_SOURCE})\n    set(cppFile ${outputSyclFile})\n  else()\n    set_property(SOURCE ${outputSyclFile} PROPERTY HEADER_FILE_ONLY ON)\n    set(includedFile ${outputSyclFile})\n    set(cppFile ${SDK_BUILD_IR_SOURCE})\n  endif()\n\n  # Force inclusion of the integration header for the host compiler\n  if(MSVC)\n    # Group SYCL files inside Visual Studio\n    source_group(\"SYCL\" FILES ${outputSyclFile})\n\n    if(includeAfter)\n      # Allow the source file to be edited using Visual Studio.\n      # It will be added as a header file so it won't be compiled.\n      set_property(SOURCE ${SDK_BUILD_IR_SOURCE} PROPERTY HEADER_FILE_ONLY true)\n    endif()\n\n    # Add both source and the sycl files to the VS solution.\n    target_sources(${SDK_BUILD_IR_TARGET} PUBLIC ${SDK_BUILD_IR_SOURCE} ${outputSyclFile})\n\n    set(forceIncludeFlags \"/FI${includedFile} /TP\")\n  else()\n    set(forceIncludeFlags \"-include ${includedFile} -x c++\")\n  endif()\n\n  set_property(\n    SOURCE ${cppFile}\n    APPEND_STRING PROPERTY COMPILE_FLAGS \"${forceIncludeFlags}\"\n  )\n\nendfunction(__build_ir)\n\n#######################\n#  add_sycl_to_target\n#######################\n#\n#  Adds a SYCL compilation custom command associated with an existing\n#  target and sets a dependancy on that new command.\n#\n#  TARGET : Name of the target to add SYCL to.\n#  SOURCES : Source files to be compiled for SYCL.\n#\nfunction(add_sycl_to_target)\n  set(options)\n  set(one_value_args\n    TARGET\n  )\n  set(multi_value_args\n    SOURCES\n  )\n  cmake_parse_arguments(SDK_ADD_SYCL\n    \"${options}\"\n    \"${one_value_args}\"\n    \"${multi_value_args}\"\n    ${ARGN}\n  )\n\n  # If the CXX compiler is set to compute++ enable the driver.\n  get_filename_component(cmakeCxxCompilerFileName \"${CMAKE_CXX_COMPILER}\" NAME)\n  if(\"${cmakeCxxCompilerFileName}\" STREQUAL \"compute++\")\n    if(MSVC)\n      message(FATAL_ERROR \"The compiler driver is not supported by this system,\n                           revert the CXX compiler to your default host compiler.\")\n    endif()\n\n    get_target_property(includeAfter ${SDK_ADD_SYCL_TARGET} COMPUTECPP_INCLUDE_AFTER)\n    if(includeAfter)\n      list(APPEND COMPUTECPP_USER_FLAGS -fsycl-ih-last)\n    endif()\n    list(INSERT COMPUTECPP_DEVICE_COMPILER_FLAGS 0 -sycl-driver)\n    # Prepend COMPUTECPP_DEVICE_COMPILER_FLAGS and append COMPUTECPP_USER_FLAGS\n    foreach(prop COMPILE_OPTIONS INTERFACE_COMPILE_OPTIONS)\n      get_target_property(target_compile_options ${SDK_ADD_SYCL_TARGET} ${prop})\n      if(NOT target_compile_options)\n        set(target_compile_options \"\")\n      endif()\n      set_property(\n        TARGET ${SDK_ADD_SYCL_TARGET}\n        PROPERTY ${prop}\n        ${COMPUTECPP_DEVICE_COMPILER_FLAGS}\n        ${target_compile_options}\n        ${COMPUTECPP_USER_FLAGS}\n      )\n    endforeach()\n  else()\n    set(fileCounter 0)\n    list(INSERT COMPUTECPP_DEVICE_COMPILER_FLAGS 0 -sycl)\n    # Add custom target to run compute++ and generate the integration header\n    foreach(sourceFile ${SDK_ADD_SYCL_SOURCES})\n      if(NOT IS_ABSOLUTE ${sourceFile})\n        set(sourceFile \"${CMAKE_CURRENT_SOURCE_DIR}/${sourceFile}\")\n      endif()\n      __build_ir(\n        TARGET     ${SDK_ADD_SYCL_TARGET}\n        SOURCE     ${sourceFile}\n        COUNTER    ${fileCounter}\n      )\n      MATH(EXPR fileCounter \"${fileCounter} + 1\")\n    endforeach()\n  endif()\n\n  set_property(TARGET ${SDK_ADD_SYCL_TARGET}\n    APPEND PROPERTY LINK_LIBRARIES ComputeCpp::ComputeCpp)\n  set_property(TARGET ${SDK_ADD_SYCL_TARGET}\n    APPEND PROPERTY INTERFACE_LINK_LIBRARIES ComputeCpp::ComputeCpp)\nendfunction(add_sycl_to_target)\n"
  },
  {
    "path": "3rdparty/eigen3/cmake/FindEigen2.cmake",
    "content": "# - Try to find Eigen2 lib\n#\n# This module supports requiring a minimum version, e.g. you can do\n#   find_package(Eigen2 2.0.3)\n# to require version 2.0.3 to newer of Eigen2.\n#\n# Once done this will define\n#\n#  EIGEN2_FOUND - system has eigen lib with correct version\n#  EIGEN2_INCLUDE_DIR - the eigen include directory\n#  EIGEN2_VERSION - eigen version\n\n# Copyright (c) 2006, 2007 Montel Laurent, <montel@kde.org>\n# Copyright (c) 2008, 2009 Gael Guennebaud, <g.gael@free.fr>\n# Redistribution and use is allowed according to the terms of the BSD license.\n\nif(NOT Eigen2_FIND_VERSION)\n  if(NOT Eigen2_FIND_VERSION_MAJOR)\n    set(Eigen2_FIND_VERSION_MAJOR 2)\n  endif()\n  if(NOT Eigen2_FIND_VERSION_MINOR)\n    set(Eigen2_FIND_VERSION_MINOR 0)\n  endif()\n  if(NOT Eigen2_FIND_VERSION_PATCH)\n    set(Eigen2_FIND_VERSION_PATCH 0)\n  endif()\n\n  set(Eigen2_FIND_VERSION \"${Eigen2_FIND_VERSION_MAJOR}.${Eigen2_FIND_VERSION_MINOR}.${Eigen2_FIND_VERSION_PATCH}\")\nendif()\n\nmacro(_eigen2_check_version)\n  file(READ \"${EIGEN2_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h\" _eigen2_version_header)\n\n  string(REGEX MATCH \"define[ \\t]+EIGEN_WORLD_VERSION[ \\t]+([0-9]+)\" _eigen2_world_version_match \"${_eigen2_version_header}\")\n  set(EIGEN2_WORLD_VERSION \"${CMAKE_MATCH_1}\")\n  string(REGEX MATCH \"define[ \\t]+EIGEN_MAJOR_VERSION[ \\t]+([0-9]+)\" _eigen2_major_version_match \"${_eigen2_version_header}\")\n  set(EIGEN2_MAJOR_VERSION \"${CMAKE_MATCH_1}\")\n  string(REGEX MATCH \"define[ \\t]+EIGEN_MINOR_VERSION[ \\t]+([0-9]+)\" _eigen2_minor_version_match \"${_eigen2_version_header}\")\n  set(EIGEN2_MINOR_VERSION \"${CMAKE_MATCH_1}\")\n\n  set(EIGEN2_VERSION ${EIGEN2_WORLD_VERSION}.${EIGEN2_MAJOR_VERSION}.${EIGEN2_MINOR_VERSION})\n  if((${EIGEN2_WORLD_VERSION} NOTEQUAL 2) OR (${EIGEN2_MAJOR_VERSION} GREATER 10) OR (${EIGEN2_VERSION} VERSION_LESS ${Eigen2_FIND_VERSION}))\n    set(EIGEN2_VERSION_OK FALSE)\n  else()\n    set(EIGEN2_VERSION_OK TRUE)\n  endif()\n\n  if(NOT EIGEN2_VERSION_OK)\n\n    message(STATUS \"Eigen2 version ${EIGEN2_VERSION} found in ${EIGEN2_INCLUDE_DIR}, \"\n                   \"but at least version ${Eigen2_FIND_VERSION} is required\")\n  endif()\nendmacro()\n\nif (EIGEN2_INCLUDE_DIR)\n\n  # in cache already\n  _eigen2_check_version()\n  set(EIGEN2_FOUND ${EIGEN2_VERSION_OK})\n\nelse ()\n\nfind_path(EIGEN2_INCLUDE_DIR NAMES Eigen/Core\n     PATHS\n     ${INCLUDE_INSTALL_DIR}\n     ${KDE4_INCLUDE_DIR}\n     PATH_SUFFIXES eigen2\n   )\n\nif(EIGEN2_INCLUDE_DIR)\n  _eigen2_check_version()\nendif()\n\ninclude(FindPackageHandleStandardArgs)\nfind_package_handle_standard_args(Eigen2 DEFAULT_MSG EIGEN2_INCLUDE_DIR EIGEN2_VERSION_OK)\n\nmark_as_advanced(EIGEN2_INCLUDE_DIR)\n\nendif()\n\n"
  },
  {
    "path": "3rdparty/eigen3/cmake/FindEigen3.cmake",
    "content": "# - Try to find Eigen3 lib\n#\n# This module supports requiring a minimum version, e.g. you can do\n#   find_package(Eigen3 3.1.2)\n# to require version 3.1.2 or newer of Eigen3.\n#\n# Once done this will define\n#\n#  EIGEN3_FOUND - system has eigen lib with correct version\n#  EIGEN3_INCLUDE_DIR - the eigen include directory\n#  EIGEN3_VERSION - eigen version\n#\n# and the following imported target:\n#\n#  Eigen3::Eigen - The header-only Eigen library\n#\n# This module reads hints about search locations from \n# the following environment variables:\n#\n# EIGEN3_ROOT\n# EIGEN3_ROOT_DIR\n\n# Copyright (c) 2006, 2007 Montel Laurent, <montel@kde.org>\n# Copyright (c) 2008, 2009 Gael Guennebaud, <g.gael@free.fr>\n# Copyright (c) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>\n# Redistribution and use is allowed according to the terms of the 2-clause BSD license.\n\nif(NOT Eigen3_FIND_VERSION)\n  if(NOT Eigen3_FIND_VERSION_MAJOR)\n    set(Eigen3_FIND_VERSION_MAJOR 2)\n  endif()\n  if(NOT Eigen3_FIND_VERSION_MINOR)\n    set(Eigen3_FIND_VERSION_MINOR 91)\n  endif()\n  if(NOT Eigen3_FIND_VERSION_PATCH)\n    set(Eigen3_FIND_VERSION_PATCH 0)\n  endif()\n\n  set(Eigen3_FIND_VERSION \"${Eigen3_FIND_VERSION_MAJOR}.${Eigen3_FIND_VERSION_MINOR}.${Eigen3_FIND_VERSION_PATCH}\")\nendif()\n\nmacro(_eigen3_check_version)\n  file(READ \"${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h\" _eigen3_version_header)\n\n  string(REGEX MATCH \"define[ \\t]+EIGEN_WORLD_VERSION[ \\t]+([0-9]+)\" _eigen3_world_version_match \"${_eigen3_version_header}\")\n  set(EIGEN3_WORLD_VERSION \"${CMAKE_MATCH_1}\")\n  string(REGEX MATCH \"define[ \\t]+EIGEN_MAJOR_VERSION[ \\t]+([0-9]+)\" _eigen3_major_version_match \"${_eigen3_version_header}\")\n  set(EIGEN3_MAJOR_VERSION \"${CMAKE_MATCH_1}\")\n  string(REGEX MATCH \"define[ \\t]+EIGEN_MINOR_VERSION[ \\t]+([0-9]+)\" _eigen3_minor_version_match \"${_eigen3_version_header}\")\n  set(EIGEN3_MINOR_VERSION \"${CMAKE_MATCH_1}\")\n\n  set(EIGEN3_VERSION ${EIGEN3_WORLD_VERSION}.${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION})\n  if(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})\n    set(EIGEN3_VERSION_OK FALSE)\n  else()\n    set(EIGEN3_VERSION_OK TRUE)\n  endif()\n\n  if(NOT EIGEN3_VERSION_OK)\n\n    message(STATUS \"Eigen3 version ${EIGEN3_VERSION} found in ${EIGEN3_INCLUDE_DIR}, \"\n                   \"but at least version ${Eigen3_FIND_VERSION} is required\")\n  endif()\nendmacro()\n\nif (EIGEN3_INCLUDE_DIR)\n\n  # in cache already\n  _eigen3_check_version()\n  set(EIGEN3_FOUND ${EIGEN3_VERSION_OK})\n  set(Eigen3_FOUND ${EIGEN3_VERSION_OK})\n\nelse ()\n  \n  # search first if an Eigen3Config.cmake is available in the system,\n  # if successful this would set EIGEN3_INCLUDE_DIR and the rest of\n  # the script will work as usual\n  find_package(Eigen3 ${Eigen3_FIND_VERSION} NO_MODULE QUIET)\n\n  if(NOT EIGEN3_INCLUDE_DIR)\n    find_path(EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library\n        HINTS\n        ENV EIGEN3_ROOT \n        ENV EIGEN3_ROOT_DIR\n        PATHS\n        ${CMAKE_INSTALL_PREFIX}/include\n        ${KDE4_INCLUDE_DIR}\n        PATH_SUFFIXES eigen3 eigen\n      )\n  endif()\n\n  if(EIGEN3_INCLUDE_DIR)\n    _eigen3_check_version()\n  endif()\n\n  include(FindPackageHandleStandardArgs)\n  find_package_handle_standard_args(Eigen3 DEFAULT_MSG EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK)\n\n  mark_as_advanced(EIGEN3_INCLUDE_DIR)\n\nendif()\n\nif(EIGEN3_FOUND AND NOT TARGET Eigen3::Eigen)\n  add_library(Eigen3::Eigen INTERFACE IMPORTED)\n  set_target_properties(Eigen3::Eigen PROPERTIES\n    INTERFACE_INCLUDE_DIRECTORIES \"${EIGEN3_INCLUDE_DIR}\")\nendif()\n"
  },
  {
    "path": "3rdparty/eigen3/cmake/FindFFTW.cmake",
    "content": "# - Find the FFTW library\n#\n# Usage:\n#   find_package(FFTW [REQUIRED] [QUIET] )\n#     \n# It sets the following variables:\n#   FFTW_FOUND               ... true if fftw is found on the system\n#   FFTW_LIBRARIES           ... full path to fftw library\n#   FFTW_INCLUDES            ... fftw include directory\n#\n# The following variables will be checked by the function\n#   FFTW_USE_STATIC_LIBS    ... if true, only static libraries are found\n#   FFTW_ROOT               ... if set, the libraries are exclusively searched\n#                               under this path\n#   FFTW_LIBRARY            ... fftw library to use\n#   FFTW_INCLUDE_DIR        ... fftw include directory\n#\n\n#If environment variable FFTWDIR is specified, it has same effect as FFTW_ROOT\nif( NOT FFTW_ROOT AND ENV{FFTWDIR} )\n  set( FFTW_ROOT $ENV{FFTWDIR} )\nendif()\n\n# Check if we can use PkgConfig\nfind_package(PkgConfig)\n\n#Determine from PKG\nif( PKG_CONFIG_FOUND AND NOT FFTW_ROOT )\n  pkg_check_modules( PKG_FFTW QUIET \"fftw3\" )\nendif()\n\n#Check whether to search static or dynamic libs\nset( CMAKE_FIND_LIBRARY_SUFFIXES_SAV ${CMAKE_FIND_LIBRARY_SUFFIXES} )\n\nif( ${FFTW_USE_STATIC_LIBS} )\n  set( CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX} )\nelse()\n  set( CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_SHARED_LIBRARY_SUFFIX} )\nendif()\n\nif( FFTW_ROOT )\n\n  #find libs\n  find_library(\n    FFTW_LIB\n    NAMES \"fftw3\"\n    PATHS ${FFTW_ROOT}\n    PATH_SUFFIXES \"lib\" \"lib64\"\n    NO_DEFAULT_PATH\n  )\n\n  find_library(\n    FFTWF_LIB\n    NAMES \"fftw3f\"\n    PATHS ${FFTW_ROOT}\n    PATH_SUFFIXES \"lib\" \"lib64\"\n    NO_DEFAULT_PATH\n  )\n\n  find_library(\n    FFTWL_LIB\n    NAMES \"fftw3l\"\n    PATHS ${FFTW_ROOT}\n    PATH_SUFFIXES \"lib\" \"lib64\"\n    NO_DEFAULT_PATH\n  )\n\n  #find includes\n  find_path(\n    FFTW_INCLUDES\n    NAMES \"fftw3.h\"\n    PATHS ${FFTW_ROOT}\n    PATH_SUFFIXES \"include\"\n    NO_DEFAULT_PATH\n  )\n\nelse()\n\n  find_library(\n    FFTW_LIB\n    NAMES \"fftw3\"\n    PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR}\n  )\n\n  find_library(\n    FFTWF_LIB\n    NAMES \"fftw3f\"\n    PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR}\n  )\n\n\n  find_library(\n    FFTWL_LIB\n    NAMES \"fftw3l\"\n    PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR}\n  )\n\n  find_path(\n    FFTW_INCLUDES\n    NAMES \"fftw3.h\"\n    PATHS ${PKG_FFTW_INCLUDE_DIRS} ${INCLUDE_INSTALL_DIR}\n  )\n\nendif()\n\nset(FFTW_LIBRARIES ${FFTW_LIB} ${FFTWF_LIB})\n\nif(FFTWL_LIB)\n  set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTWL_LIB})\nendif()\n\nset( CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_SAV} )\n\ninclude(FindPackageHandleStandardArgs)\nfind_package_handle_standard_args(FFTW DEFAULT_MSG\n                                  FFTW_INCLUDES FFTW_LIBRARIES)\n\nmark_as_advanced(FFTW_INCLUDES FFTW_LIBRARIES FFTW_LIB FFTWF_LIB FFTWL_LIB)\n\n"
  },
  {
    "path": "3rdparty/eigen3/cmake/FindGLEW.cmake",
    "content": "# Copyright (c) 2009 Boudewijn Rempt <boud@valdyas.org>                                                                                          \n#                                                                                                                                                \n# Redistribution and use is allowed according to the terms of the BSD license.                                                                   \n# For details see the accompanying COPYING-CMAKE-SCRIPTS file. \n# \n# - try to find glew library and include files\n#  GLEW_INCLUDE_DIR, where to find GL/glew.h, etc.\n#  GLEW_LIBRARIES, the libraries to link against\n#  GLEW_FOUND, If false, do not try to use GLEW.\n# Also defined, but not for general use are:\n#  GLEW_GLEW_LIBRARY = the full path to the glew library.\n\nif (WIN32)\n\n  if(CYGWIN)\n\n    find_path( GLEW_INCLUDE_DIR GL/glew.h)\n\n    find_library( GLEW_GLEW_LIBRARY glew32\n      ${OPENGL_LIBRARY_DIR}\n      /usr/lib/w32api\n      /usr/X11R6/lib\n    )\n\n\n  else(CYGWIN)\n  \n    find_path( GLEW_INCLUDE_DIR GL/glew.h\n      $ENV{GLEW_ROOT_PATH}/include\n    )\n\n    find_library( GLEW_GLEW_LIBRARY\n      NAMES glew glew32\n      PATHS\n      $ENV{GLEW_ROOT_PATH}/lib\n      ${OPENGL_LIBRARY_DIR}\n    )\n\n  endif(CYGWIN)\n\nelse (WIN32)\n\n  if (APPLE)\n# These values for Apple could probably do with improvement.\n    find_path( GLEW_INCLUDE_DIR glew.h\n      /System/Library/Frameworks/GLEW.framework/Versions/A/Headers\n      ${OPENGL_LIBRARY_DIR}\n    )\n    set(GLEW_GLEW_LIBRARY \"-framework GLEW\" CACHE STRING \"GLEW library for OSX\")\n    set(GLEW_cocoa_LIBRARY \"-framework Cocoa\" CACHE STRING \"Cocoa framework for OSX\")\n  else (APPLE)\n\n    find_path( GLEW_INCLUDE_DIR GL/glew.h\n      /usr/include/GL\n      /usr/openwin/share/include\n      /usr/openwin/include\n      /usr/X11R6/include\n      /usr/include/X11\n      /opt/graphics/OpenGL/include\n      /opt/graphics/OpenGL/contrib/libglew\n    )\n\n    find_library( GLEW_GLEW_LIBRARY GLEW\n      /usr/openwin/lib\n      /usr/X11R6/lib\n    )\n\n  endif (APPLE)\n\nendif (WIN32)\n\nset( GLEW_FOUND \"NO\" )\nif(GLEW_INCLUDE_DIR)\n  if(GLEW_GLEW_LIBRARY)\n    # Is -lXi and -lXmu required on all platforms that have it?\n    # If not, we need some way to figure out what platform we are on.\n    set( GLEW_LIBRARIES\n      ${GLEW_GLEW_LIBRARY}\n      ${GLEW_cocoa_LIBRARY}\n    )\n    set( GLEW_FOUND \"YES\" )\n\n#The following deprecated settings are for backwards compatibility with CMake1.4\n    set (GLEW_LIBRARY ${GLEW_LIBRARIES})\n    set (GLEW_INCLUDE_PATH ${GLEW_INCLUDE_DIR})\n\n  endif(GLEW_GLEW_LIBRARY)\nendif(GLEW_INCLUDE_DIR)\n\nif(GLEW_FOUND)\n  if(NOT GLEW_FIND_QUIETLY)\n    message(STATUS \"Found Glew: ${GLEW_LIBRARIES}\")\n  endif(NOT GLEW_FIND_QUIETLY)\nelse(GLEW_FOUND)\n  if(GLEW_FIND_REQUIRED)\n    message(FATAL_ERROR \"Could not find Glew\")\n  endif(GLEW_FIND_REQUIRED)\nendif(GLEW_FOUND)\n\nmark_as_advanced(\n  GLEW_INCLUDE_DIR\n  GLEW_GLEW_LIBRARY\n  GLEW_Xmu_LIBRARY\n  GLEW_Xi_LIBRARY\n)\n"
  },
  {
    "path": "3rdparty/eigen3/cmake/FindGMP.cmake",
    "content": "# Try to find the GNU Multiple Precision Arithmetic Library (GMP)\n# See http://gmplib.org/\n\nif (GMP_INCLUDES AND GMP_LIBRARIES)\n  set(GMP_FIND_QUIETLY TRUE)\nendif ()\n\nfind_path(GMP_INCLUDES\n  NAMES\n  gmp.h\n  PATHS\n  $ENV{GMPDIR}\n  ${INCLUDE_INSTALL_DIR}\n)\n\nfind_library(GMP_LIBRARIES gmp PATHS $ENV{GMPDIR} ${LIB_INSTALL_DIR})\n\ninclude(FindPackageHandleStandardArgs)\nfind_package_handle_standard_args(GMP DEFAULT_MSG\n                                  GMP_INCLUDES GMP_LIBRARIES)\nmark_as_advanced(GMP_INCLUDES GMP_LIBRARIES)\n"
  },
  {
    "path": "3rdparty/eigen3/cmake/FindGSL.cmake",
    "content": "# Try to find gnu scientific library GSL\n# See \n# http://www.gnu.org/software/gsl/  and\n# http://gnuwin32.sourceforge.net/packages/gsl.htm\n#\n# Once run this will define: \n# \n# GSL_FOUND       = system has GSL lib\n#\n# GSL_LIBRARIES   = full path to the libraries\n#    on Unix/Linux with additional linker flags from \"gsl-config --libs\"\n# \n# CMAKE_GSL_CXX_FLAGS  = Unix compiler flags for GSL, essentially \"`gsl-config --cxxflags`\"\n#\n# GSL_INCLUDE_DIR      = where to find headers \n#\n# GSL_LINK_DIRECTORIES = link directories, useful for rpath on Unix\n# GSL_EXE_LINKER_FLAGS = rpath on Unix\n#\n# Felix Woelk 07/2004\n# Jan Woetzel\n#\n# www.mip.informatik.uni-kiel.de\n# --------------------------------\n\nif(WIN32)\n  # JW tested with gsl-1.8, Windows XP, MSVS 7.1\n  set(GSL_POSSIBLE_ROOT_DIRS\n    ${GSL_ROOT_DIR}\n    $ENV{GSL_ROOT_DIR}\n    ${GSL_DIR}\n    ${GSL_HOME}    \n    $ENV{GSL_DIR}\n    $ENV{GSL_HOME}\n    $ENV{EXTRA}\n    \"C:/Program Files/GnuWin32\"\n    )\n  find_path(GSL_INCLUDE_DIR\n    NAMES gsl/gsl_cdf.h gsl/gsl_randist.h\n    PATHS ${GSL_POSSIBLE_ROOT_DIRS}\n    PATH_SUFFIXES include\n    DOC \"GSL header include dir\"\n    )\n  \n  find_library(GSL_GSL_LIBRARY\n    NAMES libgsl.dll.a gsl libgsl\n    PATHS  ${GSL_POSSIBLE_ROOT_DIRS}\n    PATH_SUFFIXES lib\n    DOC \"GSL library\" )\n  \n  if(NOT GSL_GSL_LIBRARY)\n\tfind_file(GSL_GSL_LIBRARY\n\t\tNAMES libgsl.dll.a\n\t\tPATHS  ${GSL_POSSIBLE_ROOT_DIRS}\n\t\tPATH_SUFFIXES lib\n\t\tDOC \"GSL library\")\n  endif()\n  \n  find_library(GSL_GSLCBLAS_LIBRARY\n    NAMES libgslcblas.dll.a gslcblas libgslcblas\n    PATHS  ${GSL_POSSIBLE_ROOT_DIRS}\n    PATH_SUFFIXES lib\n    DOC \"GSL cblas library dir\" )\n  \n  if(NOT GSL_GSLCBLAS_LIBRARY)\n\tfind_file(GSL_GSLCBLAS_LIBRARY\n\t\tNAMES libgslcblas.dll.a\n\t\tPATHS  ${GSL_POSSIBLE_ROOT_DIRS}\n\t\tPATH_SUFFIXES lib\n\t\tDOC \"GSL library\")\n  endif()\n  \n  set(GSL_LIBRARIES ${GSL_GSL_LIBRARY})\n\n  #message(\"DBG\\n\"\n  #  \"GSL_GSL_LIBRARY=${GSL_GSL_LIBRARY}\\n\"\n  #  \"GSL_GSLCBLAS_LIBRARY=${GSL_GSLCBLAS_LIBRARY}\\n\"\n  #  \"GSL_LIBRARIES=${GSL_LIBRARIES}\")\n\n\nelse(WIN32)\n  \n  if(UNIX) \n    set(GSL_CONFIG_PREFER_PATH \n      \"$ENV{GSL_DIR}/bin\"\n      \"$ENV{GSL_DIR}\"\n      \"$ENV{GSL_HOME}/bin\" \n      \"$ENV{GSL_HOME}\" \n      CACHE STRING \"preferred path to GSL (gsl-config)\")\n    find_program(GSL_CONFIG gsl-config\n      ${GSL_CONFIG_PREFER_PATH}\n      /usr/bin/\n      )\n    # message(\"DBG GSL_CONFIG ${GSL_CONFIG}\")\n    \n    if (GSL_CONFIG) \n      # set CXXFLAGS to be fed into CXX_FLAGS by the user:\n      set(GSL_CXX_FLAGS \"`${GSL_CONFIG} --cflags`\")\n      \n      # set INCLUDE_DIRS to prefix+include\n      exec_program(${GSL_CONFIG}\n        ARGS --prefix\n        OUTPUT_VARIABLE GSL_PREFIX)\n      set(GSL_INCLUDE_DIR ${GSL_PREFIX}/include CACHE STRING INTERNAL)\n\n      # set link libraries and link flags\n      #set(GSL_LIBRARIES \"`${GSL_CONFIG} --libs`\")\n      exec_program(${GSL_CONFIG}\n        ARGS --libs\n        OUTPUT_VARIABLE GSL_LIBRARIES )\n        \n      # extract link dirs for rpath  \n      exec_program(${GSL_CONFIG}\n        ARGS --libs\n        OUTPUT_VARIABLE GSL_CONFIG_LIBS )\n      \n      # extract version\n      exec_program(${GSL_CONFIG}\n        ARGS --version\n        OUTPUT_VARIABLE GSL_FULL_VERSION )\n      \n      # split version as major/minor\n      string(REGEX MATCH \"(.)\\\\..*\" GSL_VERSION_MAJOR_ \"${GSL_FULL_VERSION}\")\n      set(GSL_VERSION_MAJOR ${CMAKE_MATCH_1})\n      string(REGEX MATCH \".\\\\.(.*)\" GSL_VERSION_MINOR_ \"${GSL_FULL_VERSION}\")\n      set(GSL_VERSION_MINOR ${CMAKE_MATCH_1})\n\n      # split off the link dirs (for rpath)\n      # use regular expression to match wildcard equivalent \"-L*<endchar>\"\n      # with <endchar> is a space or a semicolon\n      string(REGEX MATCHALL \"[-][L]([^ ;])+\" \n        GSL_LINK_DIRECTORIES_WITH_PREFIX \n        \"${GSL_CONFIG_LIBS}\" )\n      #      message(\"DBG  GSL_LINK_DIRECTORIES_WITH_PREFIX=${GSL_LINK_DIRECTORIES_WITH_PREFIX}\")\n\n      # remove prefix -L because we need the pure directory for LINK_DIRECTORIES\n      \n      if (GSL_LINK_DIRECTORIES_WITH_PREFIX)\n        string(REGEX REPLACE \"[-][L]\" \"\" GSL_LINK_DIRECTORIES ${GSL_LINK_DIRECTORIES_WITH_PREFIX} )\n      endif (GSL_LINK_DIRECTORIES_WITH_PREFIX)\n      set(GSL_EXE_LINKER_FLAGS \"-Wl,-rpath,${GSL_LINK_DIRECTORIES}\" CACHE STRING INTERNAL)\n      #      message(\"DBG  GSL_LINK_DIRECTORIES=${GSL_LINK_DIRECTORIES}\")\n      #      message(\"DBG  GSL_EXE_LINKER_FLAGS=${GSL_EXE_LINKER_FLAGS}\")\n\n      #      add_definitions(\"-DHAVE_GSL\")\n      #      set(GSL_DEFINITIONS \"-DHAVE_GSL\")\n      mark_as_advanced(\n        GSL_CXX_FLAGS\n        GSL_INCLUDE_DIR\n        GSL_LIBRARIES\n        GSL_LINK_DIRECTORIES\n        GSL_DEFINITIONS\n        )\n      message(STATUS \"Using GSL from ${GSL_PREFIX}\")\n      \n    else(GSL_CONFIG)\n      message(\"FindGSL.cmake: gsl-config not found. Please set it manually. GSL_CONFIG=${GSL_CONFIG}\")\n    endif(GSL_CONFIG)\n\n  endif(UNIX)\nendif(WIN32)\n\n\nif(GSL_LIBRARIES)\n  if(GSL_INCLUDE_DIR OR GSL_CXX_FLAGS)\n\n    set(GSL_FOUND 1)\n    \n  endif(GSL_INCLUDE_DIR OR GSL_CXX_FLAGS)\nendif(GSL_LIBRARIES)\n"
  },
  {
    "path": "3rdparty/eigen3/cmake/FindGoogleHash.cmake",
    "content": "\nif (GOOGLEHASH_INCLUDES AND GOOGLEHASH_LIBRARIES)\n  set(GOOGLEHASH_FIND_QUIETLY TRUE)\nendif ()\n\nfind_path(GOOGLEHASH_INCLUDES\n  NAMES\n  google/dense_hash_map\n  PATHS\n  ${INCLUDE_INSTALL_DIR}\n)\n\nif(GOOGLEHASH_INCLUDES)\n  # let's make sure it compiles with the current compiler\n  file(WRITE ${CMAKE_BINARY_DIR}/googlehash_test.cpp\n  \"#include <google/sparse_hash_map>\\n#include <google/dense_hash_map>\\nint main(int argc, char** argv) { google::dense_hash_map<int,float> a; google::sparse_hash_map<int,float> b; return 0;}\\n\")\n  try_compile(GOOGLEHASH_COMPILE ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/googlehash_test.cpp OUTPUT_VARIABLE GOOGLEHASH_COMPILE_RESULT)\nendif()\n\ninclude(FindPackageHandleStandardArgs)\nfind_package_handle_standard_args(GOOGLEHASH DEFAULT_MSG GOOGLEHASH_INCLUDES GOOGLEHASH_COMPILE)\n\nmark_as_advanced(GOOGLEHASH_INCLUDES)\n"
  },
  {
    "path": "3rdparty/eigen3/cmake/FindHWLOC.cmake",
    "content": "###\n#\n# @copyright (c) 2009-2014 The University of Tennessee and The University\n#                          of Tennessee Research Foundation.\n#                          All rights reserved.\n# @copyright (c) 2012-2014 Inria. All rights reserved.\n# @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.\n#\n###\n#\n# - Find HWLOC include dirs and libraries\n# Use this module by invoking find_package with the form:\n#  find_package(HWLOC\n#               [REQUIRED]) # Fail with error if hwloc is not found\n#\n# This module finds headers and hwloc library.\n# Results are reported in variables:\n#  HWLOC_FOUND           - True if headers and requested libraries were found\n#  HWLOC_INCLUDE_DIRS    - hwloc include directories\n#  HWLOC_LIBRARY_DIRS    - Link directories for hwloc libraries\n#  HWLOC_LIBRARIES       - hwloc component libraries to be linked\n#\n# The user can give specific paths where to find the libraries adding cmake\n# options at configure (ex: cmake path/to/project -DHWLOC_DIR=path/to/hwloc):\n#  HWLOC_DIR             - Where to find the base directory of hwloc\n#  HWLOC_INCDIR          - Where to find the header files\n#  HWLOC_LIBDIR          - Where to find the library files\n# The module can also look for the following environment variables if paths\n# are not given as cmake variable: HWLOC_DIR, HWLOC_INCDIR, HWLOC_LIBDIR\n\n#=============================================================================\n# Copyright 2012-2013 Inria\n# Copyright 2012-2013 Emmanuel Agullo\n# Copyright 2012-2013 Mathieu Faverge\n# Copyright 2012      Cedric Castagnede\n# Copyright 2013      Florent Pruvost\n#\n# Distributed under the OSI-approved BSD License (the \"License\");\n# see accompanying file MORSE-Copyright.txt for details.\n#\n# This software is distributed WITHOUT ANY WARRANTY; without even the\n# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n# See the License for more information.\n#=============================================================================\n# (To distribute this file outside of Morse, substitute the full\n#  License text for the above reference.)\n\ninclude(CheckStructHasMember)\ninclude(CheckCSourceCompiles)\n\nif (NOT HWLOC_FOUND)\n  set(HWLOC_DIR \"\" CACHE PATH \"Installation directory of HWLOC library\")\n  if (NOT HWLOC_FIND_QUIETLY)\n    message(STATUS \"A cache variable, namely HWLOC_DIR, has been set to specify the install directory of HWLOC\")\n  endif()\nendif()\n\nset(ENV_HWLOC_DIR \"$ENV{HWLOC_DIR}\")\nset(ENV_HWLOC_INCDIR \"$ENV{HWLOC_INCDIR}\")\nset(ENV_HWLOC_LIBDIR \"$ENV{HWLOC_LIBDIR}\")\nset(HWLOC_GIVEN_BY_USER \"FALSE\")\nif ( HWLOC_DIR OR ( HWLOC_INCDIR AND HWLOC_LIBDIR) OR ENV_HWLOC_DIR OR (ENV_HWLOC_INCDIR AND ENV_HWLOC_LIBDIR) )\n  set(HWLOC_GIVEN_BY_USER \"TRUE\")\nendif()\n\n# Optionally use pkg-config to detect include/library dirs (if pkg-config is available)\n# -------------------------------------------------------------------------------------\ninclude(FindPkgConfig)\nfind_package(PkgConfig QUIET)\nif( PKG_CONFIG_EXECUTABLE AND NOT HWLOC_GIVEN_BY_USER )\n\n  pkg_search_module(HWLOC hwloc)\n  if (NOT HWLOC_FIND_QUIETLY)\n    if (HWLOC_FOUND AND HWLOC_LIBRARIES)\n      message(STATUS \"Looking for HWLOC - found using PkgConfig\")\n      #if(NOT HWLOC_INCLUDE_DIRS)\n      #    message(\"${Magenta}HWLOC_INCLUDE_DIRS is empty using PkgConfig.\"\n      #        \"Perhaps the path to hwloc headers is already present in your\"\n      #        \"C(PLUS)_INCLUDE_PATH environment variable.${ColourReset}\")\n      #endif()\n    else()\n      message(STATUS \"${Magenta}Looking for HWLOC - not found using PkgConfig.\"\n\t\"\\n   Perhaps you should add the directory containing hwloc.pc to\"\n\t\"\\n   the PKG_CONFIG_PATH environment variable.${ColourReset}\")\n    endif()\n  endif()\n\nendif()\n\nif( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT HWLOC_FOUND) OR (HWLOC_GIVEN_BY_USER) )\n\n  if (NOT HWLOC_FIND_QUIETLY)\n    message(STATUS \"Looking for HWLOC - PkgConfig not used\")\n  endif()\n\n  # Looking for include\n  # -------------------\n\n  # Add system include paths to search include\n  # ------------------------------------------\n  unset(_inc_env)\n  if(ENV_HWLOC_INCDIR)\n    list(APPEND _inc_env \"${ENV_HWLOC_INCDIR}\")\n  elseif(ENV_HWLOC_DIR)\n    list(APPEND _inc_env \"${ENV_HWLOC_DIR}\")\n    list(APPEND _inc_env \"${ENV_HWLOC_DIR}/include\")\n    list(APPEND _inc_env \"${ENV_HWLOC_DIR}/include/hwloc\")\n  else()\n    if(WIN32)\n      string(REPLACE \":\" \";\" _inc_env \"$ENV{INCLUDE}\")\n    else()\n      string(REPLACE \":\" \";\" _path_env \"$ENV{INCLUDE}\")\n      list(APPEND _inc_env \"${_path_env}\")\n      string(REPLACE \":\" \";\" _path_env \"$ENV{C_INCLUDE_PATH}\")\n      list(APPEND _inc_env \"${_path_env}\")\n      string(REPLACE \":\" \";\" _path_env \"$ENV{CPATH}\")\n      list(APPEND _inc_env \"${_path_env}\")\n      string(REPLACE \":\" \";\" _path_env \"$ENV{INCLUDE_PATH}\")\n      list(APPEND _inc_env \"${_path_env}\")\n    endif()\n  endif()\n  list(APPEND _inc_env \"${CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES}\")\n  list(APPEND _inc_env \"${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES}\")\n  list(REMOVE_DUPLICATES _inc_env)\n\n  # set paths where to look for\n  set(PATH_TO_LOOK_FOR \"${_inc_env}\")\n\n  # Try to find the hwloc header in the given paths\n  # -------------------------------------------------\n  # call cmake macro to find the header path\n  if(HWLOC_INCDIR)\n    set(HWLOC_hwloc.h_DIRS \"HWLOC_hwloc.h_DIRS-NOTFOUND\")\n    find_path(HWLOC_hwloc.h_DIRS\n      NAMES hwloc.h\n      HINTS ${HWLOC_INCDIR})\n  else()\n    if(HWLOC_DIR)\n      set(HWLOC_hwloc.h_DIRS \"HWLOC_hwloc.h_DIRS-NOTFOUND\")\n      find_path(HWLOC_hwloc.h_DIRS\n\tNAMES hwloc.h\n\tHINTS ${HWLOC_DIR}\n\tPATH_SUFFIXES \"include\" \"include/hwloc\")\n    else()\n      set(HWLOC_hwloc.h_DIRS \"HWLOC_hwloc.h_DIRS-NOTFOUND\")\n      find_path(HWLOC_hwloc.h_DIRS\n\tNAMES hwloc.h\n\tHINTS ${PATH_TO_LOOK_FOR}\n\tPATH_SUFFIXES \"hwloc\")\n    endif()\n  endif()\n  mark_as_advanced(HWLOC_hwloc.h_DIRS)\n\n  # Add path to cmake variable\n  # ------------------------------------\n  if (HWLOC_hwloc.h_DIRS)\n    set(HWLOC_INCLUDE_DIRS \"${HWLOC_hwloc.h_DIRS}\")\n  else ()\n    set(HWLOC_INCLUDE_DIRS \"HWLOC_INCLUDE_DIRS-NOTFOUND\")\n    if(NOT HWLOC_FIND_QUIETLY)\n      message(STATUS \"Looking for hwloc -- hwloc.h not found\")\n    endif()\n  endif ()\n\n  if (HWLOC_INCLUDE_DIRS)\n    list(REMOVE_DUPLICATES HWLOC_INCLUDE_DIRS)\n  endif ()\n\n\n  # Looking for lib\n  # ---------------\n\n  # Add system library paths to search lib\n  # --------------------------------------\n  unset(_lib_env)\n  if(ENV_HWLOC_LIBDIR)\n    list(APPEND _lib_env \"${ENV_HWLOC_LIBDIR}\")\n  elseif(ENV_HWLOC_DIR)\n    list(APPEND _lib_env \"${ENV_HWLOC_DIR}\")\n    list(APPEND _lib_env \"${ENV_HWLOC_DIR}/lib\")\n  else()\n    if(WIN32)\n      string(REPLACE \":\" \";\" _lib_env \"$ENV{LIB}\")\n    else()\n      if(APPLE)\n\tstring(REPLACE \":\" \";\" _lib_env \"$ENV{DYLD_LIBRARY_PATH}\")\n      else()\n\tstring(REPLACE \":\" \";\" _lib_env \"$ENV{LD_LIBRARY_PATH}\")\n      endif()\n      list(APPEND _lib_env \"${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}\")\n      list(APPEND _lib_env \"${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}\")\n    endif()\n  endif()\n  list(REMOVE_DUPLICATES _lib_env)\n\n  # set paths where to look for\n  set(PATH_TO_LOOK_FOR \"${_lib_env}\")\n\n  # Try to find the hwloc lib in the given paths\n  # ----------------------------------------------\n\n  # call cmake macro to find the lib path\n  if(HWLOC_LIBDIR)\n    set(HWLOC_hwloc_LIBRARY \"HWLOC_hwloc_LIBRARY-NOTFOUND\")\n    find_library(HWLOC_hwloc_LIBRARY\n      NAMES hwloc\n      HINTS ${HWLOC_LIBDIR})\n  else()\n    if(HWLOC_DIR)\n      set(HWLOC_hwloc_LIBRARY \"HWLOC_hwloc_LIBRARY-NOTFOUND\")\n      find_library(HWLOC_hwloc_LIBRARY\n\tNAMES hwloc\n\tHINTS ${HWLOC_DIR}\n\tPATH_SUFFIXES lib lib32 lib64)\n    else()\n      set(HWLOC_hwloc_LIBRARY \"HWLOC_hwloc_LIBRARY-NOTFOUND\")\n      find_library(HWLOC_hwloc_LIBRARY\n\tNAMES hwloc\n\tHINTS ${PATH_TO_LOOK_FOR})\n    endif()\n  endif()\n  mark_as_advanced(HWLOC_hwloc_LIBRARY)\n\n  # If found, add path to cmake variable\n  # ------------------------------------\n  if (HWLOC_hwloc_LIBRARY)\n    get_filename_component(hwloc_lib_path ${HWLOC_hwloc_LIBRARY} PATH)\n    # set cmake variables (respects naming convention)\n    set(HWLOC_LIBRARIES    \"${HWLOC_hwloc_LIBRARY}\")\n    set(HWLOC_LIBRARY_DIRS \"${hwloc_lib_path}\")\n  else ()\n    set(HWLOC_LIBRARIES    \"HWLOC_LIBRARIES-NOTFOUND\")\n    set(HWLOC_LIBRARY_DIRS \"HWLOC_LIBRARY_DIRS-NOTFOUND\")\n    if(NOT HWLOC_FIND_QUIETLY)\n      message(STATUS \"Looking for hwloc -- lib hwloc not found\")\n    endif()\n  endif ()\n\n  if (HWLOC_LIBRARY_DIRS)\n    list(REMOVE_DUPLICATES HWLOC_LIBRARY_DIRS)\n  endif ()\n\n  # check a function to validate the find\n  if(HWLOC_LIBRARIES)\n\n    set(REQUIRED_INCDIRS)\n    set(REQUIRED_LIBDIRS)\n    set(REQUIRED_LIBS)\n\n    # HWLOC\n    if (HWLOC_INCLUDE_DIRS)\n      set(REQUIRED_INCDIRS \"${HWLOC_INCLUDE_DIRS}\")\n    endif()\n    if (HWLOC_LIBRARY_DIRS)\n      set(REQUIRED_LIBDIRS \"${HWLOC_LIBRARY_DIRS}\")\n    endif()\n    set(REQUIRED_LIBS \"${HWLOC_LIBRARIES}\")\n\n    # set required libraries for link\n    set(CMAKE_REQUIRED_INCLUDES \"${REQUIRED_INCDIRS}\")\n    set(CMAKE_REQUIRED_LIBRARIES)\n    foreach(lib_dir ${REQUIRED_LIBDIRS})\n      list(APPEND CMAKE_REQUIRED_LIBRARIES \"-L${lib_dir}\")\n    endforeach()\n    list(APPEND CMAKE_REQUIRED_LIBRARIES \"${REQUIRED_LIBS}\")\n    string(REGEX REPLACE \"^ -\" \"-\" CMAKE_REQUIRED_LIBRARIES \"${CMAKE_REQUIRED_LIBRARIES}\")\n\n    # test link\n    unset(HWLOC_WORKS CACHE)\n    include(CheckFunctionExists)\n    check_function_exists(hwloc_topology_init HWLOC_WORKS)\n    mark_as_advanced(HWLOC_WORKS)\n\n    if(NOT HWLOC_WORKS)\n      if(NOT HWLOC_FIND_QUIETLY)\n\tmessage(STATUS \"Looking for hwloc : test of hwloc_topology_init with hwloc library fails\")\n\tmessage(STATUS \"CMAKE_REQUIRED_LIBRARIES: ${CMAKE_REQUIRED_LIBRARIES}\")\n\tmessage(STATUS \"CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}\")\n\tmessage(STATUS \"Check in CMakeFiles/CMakeError.log to figure out why it fails\")\n      endif()\n    endif()\n    set(CMAKE_REQUIRED_INCLUDES)\n    set(CMAKE_REQUIRED_FLAGS)\n    set(CMAKE_REQUIRED_LIBRARIES)\n  endif()\n\nendif()\n\nif (HWLOC_LIBRARIES)\n  if (HWLOC_LIBRARY_DIRS)\n    list(GET HWLOC_LIBRARY_DIRS 0 first_lib_path)\n  else()\n    list(GET HWLOC_LIBRARIES 0 first_lib)\n    get_filename_component(first_lib_path \"${first_lib}\" PATH)\n  endif()\n  if (${first_lib_path} MATCHES \"/lib(32|64)?$\")\n    string(REGEX REPLACE \"/lib(32|64)?$\" \"\" not_cached_dir \"${first_lib_path}\")\n    set(HWLOC_DIR_FOUND \"${not_cached_dir}\" CACHE PATH \"Installation directory of HWLOC library\" FORCE)\n  else()\n    set(HWLOC_DIR_FOUND \"${first_lib_path}\" CACHE PATH \"Installation directory of HWLOC library\" FORCE)\n  endif()\nendif()\nmark_as_advanced(HWLOC_DIR)\nmark_as_advanced(HWLOC_DIR_FOUND)\n\n# check that HWLOC has been found\n# -------------------------------\ninclude(FindPackageHandleStandardArgs)\nif (PKG_CONFIG_EXECUTABLE AND HWLOC_FOUND)\n  find_package_handle_standard_args(HWLOC DEFAULT_MSG\n    HWLOC_LIBRARIES)\nelse()\n  find_package_handle_standard_args(HWLOC DEFAULT_MSG\n    HWLOC_LIBRARIES\n    HWLOC_WORKS)\nendif()\n\nif (HWLOC_FOUND)\n  set(HWLOC_SAVE_CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES})\n  list(APPEND CMAKE_REQUIRED_INCLUDES ${HWLOC_INCLUDE_DIRS})\n\n  # test headers to guess the version\n  check_struct_has_member( \"struct hwloc_obj\" parent hwloc.h HAVE_HWLOC_PARENT_MEMBER )\n  check_struct_has_member( \"struct hwloc_cache_attr_s\" size hwloc.h HAVE_HWLOC_CACHE_ATTR )\n  check_c_source_compiles( \"#include <hwloc.h>\n\t    int main(void) { hwloc_obj_t o; o->type = HWLOC_OBJ_PU; return 0;}\" HAVE_HWLOC_OBJ_PU)\n  include(CheckLibraryExists)\n  check_library_exists(${HWLOC_LIBRARIES} hwloc_bitmap_free \"\" HAVE_HWLOC_BITMAP)\n\n  set(CMAKE_REQUIRED_INCLUDES ${HWLOC_SAVE_CMAKE_REQUIRED_INCLUDES})\nendif()\n"
  },
  {
    "path": "3rdparty/eigen3/cmake/FindKLU.cmake",
    "content": "# KLU lib usually requires linking to a blas library.\n# It is up to the user of this module to find a BLAS and link to it.\n\nif (KLU_INCLUDES AND KLU_LIBRARIES)\n  set(KLU_FIND_QUIETLY TRUE)\nendif ()\n\nfind_path(KLU_INCLUDES\n  NAMES\n  klu.h\n  PATHS\n  $ENV{KLUDIR}\n  ${INCLUDE_INSTALL_DIR}\n  PATH_SUFFIXES\n  suitesparse\n  ufsparse\n)\n\nfind_library(KLU_LIBRARIES klu PATHS $ENV{KLUDIR} ${LIB_INSTALL_DIR})\n\nif(KLU_LIBRARIES)\n\n  if(NOT KLU_LIBDIR)\n    get_filename_component(KLU_LIBDIR ${KLU_LIBRARIES} PATH)\n  endif()\n\n  find_library(COLAMD_LIBRARY colamd PATHS ${KLU_LIBDIR} $ENV{KLUDIR} ${LIB_INSTALL_DIR})\n  if(COLAMD_LIBRARY)\n    set(KLU_LIBRARIES ${KLU_LIBRARIES} ${COLAMD_LIBRARY})\n  endif ()\n  \n  find_library(AMD_LIBRARY amd PATHS ${KLU_LIBDIR} $ENV{KLUDIR} ${LIB_INSTALL_DIR})\n  if(AMD_LIBRARY)\n    set(KLU_LIBRARIES ${KLU_LIBRARIES} ${AMD_LIBRARY})\n  endif ()\n\n  find_library(BTF_LIBRARY btf PATHS $ENV{KLU_LIBDIR} $ENV{KLUDIR} ${LIB_INSTALL_DIR})\n  if(BTF_LIBRARY)\n    set(KLU_LIBRARIES ${KLU_LIBRARIES} ${BTF_LIBRARY})\n  endif()\n\nendif()\n\ninclude(FindPackageHandleStandardArgs)\nfind_package_handle_standard_args(KLU DEFAULT_MSG\n                                  KLU_INCLUDES KLU_LIBRARIES)\n\nmark_as_advanced(KLU_INCLUDES KLU_LIBRARIES AMD_LIBRARY COLAMD_LIBRARY BTF_LIBRARY)\n"
  },
  {
    "path": "3rdparty/eigen3/cmake/FindLAPACK.cmake",
    "content": "# Find LAPACK library\n#\n# This module finds an installed library that implements the LAPACK\n# linear-algebra interface (see http://www.netlib.org/lapack/).\n# The approach follows mostly that taken for the autoconf macro file, acx_lapack.m4\n# (distributed at http://ac-archive.sourceforge.net/ac-archive/acx_lapack.html).\n#\n# This module sets the following variables:\n#  LAPACK_FOUND - set to true if a library implementing the LAPACK interface\n#    is found\n#  LAPACK_INCLUDE_DIR - Directories containing the LAPACK header files\n#  LAPACK_DEFINITIONS - Compilation options to use LAPACK\n#  LAPACK_LINKER_FLAGS - Linker flags to use LAPACK (excluding -l\n#    and -L).\n#  LAPACK_LIBRARIES_DIR - Directories containing the LAPACK libraries.\n#     May be null if LAPACK_LIBRARIES contains libraries name using full path.\n#  LAPACK_LIBRARIES - List of libraries to link against LAPACK interface.\n#     May be null if the compiler supports auto-link (e.g. VC++).\n#  LAPACK_USE_FILE - The name of the cmake module to include to compile\n#     applications or libraries using LAPACK.\n#\n# This module was modified by CGAL team:\n# - find libraries for a C++ compiler, instead of Fortran\n# - added LAPACK_INCLUDE_DIR, LAPACK_DEFINITIONS and LAPACK_LIBRARIES_DIR\n# - removed LAPACK95_LIBRARIES\n\n\ninclude(CheckFunctionExists)\n\n# This macro checks for the existence of the combination of fortran libraries\n# given by _list.  If the combination is found, this macro checks (using the\n# check_function_exists macro) whether can link against that library\n# combination using the name of a routine given by _name using the linker\n# flags given by _flags.  If the combination of libraries is found and passes\n# the link test, LIBRARIES is set to the list of complete library paths that\n# have been found and DEFINITIONS to the required definitions.\n# Otherwise, LIBRARIES is set to FALSE.\n# N.B. _prefix is the prefix applied to the names of all cached variables that\n# are generated internally and marked advanced by this macro.\nmacro(check_lapack_libraries DEFINITIONS LIBRARIES _prefix _name _flags _list _blas _path)\n  #message(\"DEBUG: check_lapack_libraries(${_list} in ${_path} with ${_blas})\")\n\n  # Check for the existence of the libraries given by _list\n  set(_libraries_found TRUE)\n  set(_libraries_work FALSE)\n  set(${DEFINITIONS} \"\")\n  set(${LIBRARIES} \"\")\n  set(_combined_name)\n  foreach(_library ${_list})\n    set(_combined_name ${_combined_name}_${_library})\n\n    if(_libraries_found)\n      # search first in ${_path}\n      find_library(${_prefix}_${_library}_LIBRARY\n                  NAMES ${_library}\n                  PATHS ${_path} NO_DEFAULT_PATH\n                  )\n      # if not found, search in environment variables and system\n      if ( WIN32 )\n        find_library(${_prefix}_${_library}_LIBRARY\n                    NAMES ${_library}\n                    PATHS ENV LIB\n                    )\n      elseif ( APPLE )\n        find_library(${_prefix}_${_library}_LIBRARY\n                    NAMES ${_library}\n                    PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV DYLD_LIBRARY_PATH\n                    )\n      else ()\n        find_library(${_prefix}_${_library}_LIBRARY\n                    NAMES ${_library}\n                    PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV LD_LIBRARY_PATH\n                    )\n      endif()\n      mark_as_advanced(${_prefix}_${_library}_LIBRARY)\n      set(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY})\n      set(_libraries_found ${${_prefix}_${_library}_LIBRARY})\n    endif()\n  endforeach()\n  if(_libraries_found)\n    set(_libraries_found ${${LIBRARIES}})\n  endif()\n\n  # Test this combination of libraries with the Fortran/f2c interface.\n  # We test the Fortran interface first as it is well standardized.\n  if(_libraries_found AND NOT _libraries_work)\n    set(${DEFINITIONS}  \"-D${_prefix}_USE_F2C\")\n    set(${LIBRARIES}    ${_libraries_found})\n    # Some C++ linkers require the f2c library to link with Fortran libraries.\n    # I do not know which ones, thus I just add the f2c library if it is available.\n    find_package( F2C QUIET )\n    if ( F2C_FOUND )\n      set(${DEFINITIONS}  ${${DEFINITIONS}} ${F2C_DEFINITIONS})\n      set(${LIBRARIES}    ${${LIBRARIES}} ${F2C_LIBRARIES})\n    endif()\n    set(CMAKE_REQUIRED_DEFINITIONS  ${${DEFINITIONS}})\n    set(CMAKE_REQUIRED_LIBRARIES    ${_flags} ${${LIBRARIES}} ${_blas})\n    #message(\"DEBUG: CMAKE_REQUIRED_DEFINITIONS = ${CMAKE_REQUIRED_DEFINITIONS}\")\n    #message(\"DEBUG: CMAKE_REQUIRED_LIBRARIES = ${CMAKE_REQUIRED_LIBRARIES}\")\n    # Check if function exists with f2c calling convention (ie a trailing underscore)\n    check_function_exists(${_name}_ ${_prefix}_${_name}_${_combined_name}_f2c_WORKS)\n    set(CMAKE_REQUIRED_DEFINITIONS} \"\")\n    set(CMAKE_REQUIRED_LIBRARIES    \"\")\n    mark_as_advanced(${_prefix}_${_name}_${_combined_name}_f2c_WORKS)\n    set(_libraries_work ${${_prefix}_${_name}_${_combined_name}_f2c_WORKS})\n  endif()\n\n  # If not found, test this combination of libraries with a C interface.\n  # A few implementations (ie ACML) provide a C interface. Unfortunately, there is no standard.\n  if(_libraries_found AND NOT _libraries_work)\n    set(${DEFINITIONS} \"\")\n    set(${LIBRARIES}   ${_libraries_found})\n    set(CMAKE_REQUIRED_DEFINITIONS \"\")\n    set(CMAKE_REQUIRED_LIBRARIES   ${_flags} ${${LIBRARIES}} ${_blas})\n    #message(\"DEBUG: CMAKE_REQUIRED_LIBRARIES = ${CMAKE_REQUIRED_LIBRARIES}\")\n    check_function_exists(${_name} ${_prefix}_${_name}${_combined_name}_WORKS)\n    set(CMAKE_REQUIRED_LIBRARIES \"\")\n    mark_as_advanced(${_prefix}_${_name}${_combined_name}_WORKS)\n    set(_libraries_work ${${_prefix}_${_name}${_combined_name}_WORKS})\n  endif()\n\n  # on failure\n  if(NOT _libraries_work)\n    set(${DEFINITIONS} \"\")\n    set(${LIBRARIES}   FALSE)\n  endif()\n  #message(\"DEBUG: ${DEFINITIONS} = ${${DEFINITIONS}}\")\n  #message(\"DEBUG: ${LIBRARIES} = ${${LIBRARIES}}\")\nendmacro()\n\n\n#\n# main\n#\n\n# LAPACK requires BLAS\nif(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED)\n  find_package(BLAS)\nelse()\n  find_package(BLAS REQUIRED)\nendif()\n\nif (NOT BLAS_FOUND)\n\n  message(STATUS \"LAPACK requires BLAS.\")\n  set(LAPACK_FOUND FALSE)\n\n# Is it already configured?\nelseif (LAPACK_LIBRARIES_DIR OR LAPACK_LIBRARIES)\n\n  set(LAPACK_FOUND TRUE)\n\nelse()\n\n  # reset variables\n  set( LAPACK_INCLUDE_DIR \"\" )\n  set( LAPACK_DEFINITIONS \"\" )\n  set( LAPACK_LINKER_FLAGS \"\" ) # unused (yet)\n  set( LAPACK_LIBRARIES \"\" )\n  set( LAPACK_LIBRARIES_DIR \"\" )\n\n    #\n    # If Unix, search for LAPACK function in possible libraries\n    #\n\n    #intel mkl lapack?\n    if(NOT LAPACK_LIBRARIES)\n      check_lapack_libraries(\n      LAPACK_DEFINITIONS\n      LAPACK_LIBRARIES\n      LAPACK\n      cheev\n      \"\"\n      \"mkl_lapack\"\n      \"${BLAS_LIBRARIES}\"\n      \"${CGAL_TAUCS_LIBRARIES_DIR} ENV LAPACK_LIB_DIR\"\n      )\n    endif()\n\n    #acml lapack?\n    if(NOT LAPACK_LIBRARIES)\n      check_lapack_libraries(\n      LAPACK_DEFINITIONS\n      LAPACK_LIBRARIES\n      LAPACK\n      cheev\n      \"\"\n      \"acml\"\n      \"${BLAS_LIBRARIES}\"\n      \"${CGAL_TAUCS_LIBRARIES_DIR} ENV LAPACK_LIB_DIR\"\n      )\n    endif()\n\n    # Apple LAPACK library?\n    if(NOT LAPACK_LIBRARIES)\n      check_lapack_libraries(\n      LAPACK_DEFINITIONS\n      LAPACK_LIBRARIES\n      LAPACK\n      cheev\n      \"\"\n      \"Accelerate\"\n      \"${BLAS_LIBRARIES}\"\n      \"${CGAL_TAUCS_LIBRARIES_DIR} ENV LAPACK_LIB_DIR\"\n      )\n    endif()\n\n    if ( NOT LAPACK_LIBRARIES )\n      check_lapack_libraries(\n      LAPACK_DEFINITIONS\n      LAPACK_LIBRARIES\n      LAPACK\n      cheev\n      \"\"\n      \"vecLib\"\n      \"${BLAS_LIBRARIES}\"\n      \"${CGAL_TAUCS_LIBRARIES_DIR} ENV LAPACK_LIB_DIR\"\n      )\n    endif ()\n\n    # Generic LAPACK library?\n    # This configuration *must* be the last try as this library is notably slow.\n    if ( NOT LAPACK_LIBRARIES )\n      check_lapack_libraries(\n      LAPACK_DEFINITIONS\n      LAPACK_LIBRARIES\n      LAPACK\n      cheev\n      \"\"\n      \"lapack\"\n      \"${BLAS_LIBRARIES}\"\n      \"${CGAL_TAUCS_LIBRARIES_DIR} ENV LAPACK_LIB_DIR\"\n      )\n    endif()\n\n  if(LAPACK_LIBRARIES_DIR OR LAPACK_LIBRARIES)\n    set(LAPACK_FOUND TRUE)\n  else()\n    set(LAPACK_FOUND FALSE)\n  endif()\n\n  if(NOT LAPACK_FIND_QUIETLY)\n    if(LAPACK_FOUND)\n      message(STATUS \"A library with LAPACK API found.\")\n    else()\n      if(LAPACK_FIND_REQUIRED)\n        message(FATAL_ERROR \"A required library with LAPACK API not found. Please specify library location.\")\n      else()\n        message(STATUS \"A library with LAPACK API not found. Please specify library location.\")\n      endif()\n    endif()\n  endif()\n\n  # Add variables to cache\n  set( LAPACK_INCLUDE_DIR   \"${LAPACK_INCLUDE_DIR}\"\n                            CACHE PATH \"Directories containing the LAPACK header files\" FORCE )\n  set( LAPACK_DEFINITIONS   \"${LAPACK_DEFINITIONS}\"\n                            CACHE STRING \"Compilation options to use LAPACK\" FORCE )\n  set( LAPACK_LINKER_FLAGS  \"${LAPACK_LINKER_FLAGS}\"\n                            CACHE STRING \"Linker flags to use LAPACK\" FORCE )\n  set( LAPACK_LIBRARIES     \"${LAPACK_LIBRARIES}\"\n                            CACHE FILEPATH \"LAPACK libraries name\" FORCE )\n  set( LAPACK_LIBRARIES_DIR \"${LAPACK_LIBRARIES_DIR}\"\n                            CACHE PATH \"Directories containing the LAPACK libraries\" FORCE )\n\n  #message(\"DEBUG: LAPACK_INCLUDE_DIR = ${LAPACK_INCLUDE_DIR}\")\n  #message(\"DEBUG: LAPACK_DEFINITIONS = ${LAPACK_DEFINITIONS}\")\n  #message(\"DEBUG: LAPACK_LINKER_FLAGS = ${LAPACK_LINKER_FLAGS}\")\n  #message(\"DEBUG: LAPACK_LIBRARIES = ${LAPACK_LIBRARIES}\")\n  #message(\"DEBUG: LAPACK_LIBRARIES_DIR = ${LAPACK_LIBRARIES_DIR}\")\n  #message(\"DEBUG: LAPACK_FOUND = ${LAPACK_FOUND}\")\n\nendif()\n"
  },
  {
    "path": "3rdparty/eigen3/cmake/FindMPFR.cmake",
    "content": "# Try to find the MPFR library\n# See http://www.mpfr.org/\n#\n# This module supports requiring a minimum version, e.g. you can do\n#   find_package(MPFR 2.3.0)\n# to require version 2.3.0 to newer of MPFR.\n#\n# Once done this will define\n#\n#  MPFR_FOUND - system has MPFR lib with correct version\n#  MPFR_INCLUDES - the MPFR include directory\n#  MPFR_LIBRARIES - the MPFR library\n#  MPFR_VERSION - MPFR version\n\n# Copyright (c) 2006, 2007 Montel Laurent, <montel@kde.org>\n# Copyright (c) 2008, 2009 Gael Guennebaud, <g.gael@free.fr>\n# Copyright (c) 2010 Jitse Niesen, <jitse@maths.leeds.ac.uk>\n# Redistribution and use is allowed according to the terms of the BSD license.\n\n# Set MPFR_INCLUDES\n\nfind_path(MPFR_INCLUDES\n  NAMES\n  mpfr.h\n  PATHS\n  $ENV{GMPDIR}\n  ${INCLUDE_INSTALL_DIR}\n)\n\n# Set MPFR_FIND_VERSION to 1.0.0 if no minimum version is specified\n\nif(NOT MPFR_FIND_VERSION)\n  if(NOT MPFR_FIND_VERSION_MAJOR)\n    set(MPFR_FIND_VERSION_MAJOR 1)\n  endif()\n  if(NOT MPFR_FIND_VERSION_MINOR)\n    set(MPFR_FIND_VERSION_MINOR 0)\n  endif()\n  if(NOT MPFR_FIND_VERSION_PATCH)\n    set(MPFR_FIND_VERSION_PATCH 0)\n  endif()\n\n  set(MPFR_FIND_VERSION \"${MPFR_FIND_VERSION_MAJOR}.${MPFR_FIND_VERSION_MINOR}.${MPFR_FIND_VERSION_PATCH}\")\nendif()\n\n\nif(MPFR_INCLUDES)\n\n  # Set MPFR_VERSION\n  \n  file(READ \"${MPFR_INCLUDES}/mpfr.h\" _mpfr_version_header)\n  \n  string(REGEX MATCH \"define[ \\t]+MPFR_VERSION_MAJOR[ \\t]+([0-9]+)\" _mpfr_major_version_match \"${_mpfr_version_header}\")\n  set(MPFR_MAJOR_VERSION \"${CMAKE_MATCH_1}\")\n  string(REGEX MATCH \"define[ \\t]+MPFR_VERSION_MINOR[ \\t]+([0-9]+)\" _mpfr_minor_version_match \"${_mpfr_version_header}\")\n  set(MPFR_MINOR_VERSION \"${CMAKE_MATCH_1}\")\n  string(REGEX MATCH \"define[ \\t]+MPFR_VERSION_PATCHLEVEL[ \\t]+([0-9]+)\" _mpfr_patchlevel_version_match \"${_mpfr_version_header}\")\n  set(MPFR_PATCHLEVEL_VERSION \"${CMAKE_MATCH_1}\")\n  \n  set(MPFR_VERSION ${MPFR_MAJOR_VERSION}.${MPFR_MINOR_VERSION}.${MPFR_PATCHLEVEL_VERSION})\n  \n  # Check whether found version exceeds minimum version\n  \n  if(${MPFR_VERSION} VERSION_LESS ${MPFR_FIND_VERSION})\n    set(MPFR_VERSION_OK FALSE)\n    message(STATUS \"MPFR version ${MPFR_VERSION} found in ${MPFR_INCLUDES}, \"\n                   \"but at least version ${MPFR_FIND_VERSION} is required\")\n  else()\n    set(MPFR_VERSION_OK TRUE)\n  endif()\n\nendif()\n\n# Set MPFR_LIBRARIES\n\nfind_library(MPFR_LIBRARIES mpfr PATHS $ENV{GMPDIR} ${LIB_INSTALL_DIR})\n\n# Epilogue\n\ninclude(FindPackageHandleStandardArgs)\nfind_package_handle_standard_args(MPFR DEFAULT_MSG\n                                  MPFR_INCLUDES MPFR_LIBRARIES MPFR_VERSION_OK)\nmark_as_advanced(MPFR_INCLUDES MPFR_LIBRARIES)\n"
  },
  {
    "path": "3rdparty/eigen3/cmake/FindMetis.cmake",
    "content": "###\n#\n# @copyright (c) 2009-2014 The University of Tennessee and The University\n#                          of Tennessee Research Foundation.\n#                          All rights reserved.\n# @copyright (c) 2012-2014 Inria. All rights reserved.\n# @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.\n#\n###\n#\n# - Find METIS include dirs and libraries\n# Use this module by invoking find_package with the form:\n#  find_package(METIS\n#               [REQUIRED]             # Fail with error if metis is not found\n#              )\n#\n# This module finds headers and metis library.\n# Results are reported in variables:\n#  METIS_FOUND           - True if headers and requested libraries were found\n#  METIS_INCLUDE_DIRS    - metis include directories\n#  METIS_LIBRARY_DIRS    - Link directories for metis libraries\n#  METIS_LIBRARIES       - metis component libraries to be linked\n#\n# The user can give specific paths where to find the libraries adding cmake\n# options at configure (ex: cmake path/to/project -DMETIS_DIR=path/to/metis):\n#  METIS_DIR             - Where to find the base directory of metis\n#  METIS_INCDIR          - Where to find the header files\n#  METIS_LIBDIR          - Where to find the library files\n# The module can also look for the following environment variables if paths\n# are not given as cmake variable: METIS_DIR, METIS_INCDIR, METIS_LIBDIR\n\n#=============================================================================\n# Copyright 2012-2013 Inria\n# Copyright 2012-2013 Emmanuel Agullo\n# Copyright 2012-2013 Mathieu Faverge\n# Copyright 2012      Cedric Castagnede\n# Copyright 2013      Florent Pruvost\n#\n# Distributed under the OSI-approved BSD License (the \"License\");\n# see accompanying file MORSE-Copyright.txt for details.\n#\n# This software is distributed WITHOUT ANY WARRANTY; without even the\n# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n# See the License for more information.\n#=============================================================================\n# (To distribute this file outside of Morse, substitute the full\n#  License text for the above reference.)\n\nif (NOT METIS_FOUND)\n  set(METIS_DIR \"\" CACHE PATH \"Installation directory of METIS library\")\n  if (NOT METIS_FIND_QUIETLY)\n    message(STATUS \"A cache variable, namely METIS_DIR, has been set to specify the install directory of METIS\")\n  endif()\nendif()\n\n# Looking for include\n# -------------------\n\n# Add system include paths to search include\n# ------------------------------------------\nunset(_inc_env)\nset(ENV_METIS_DIR \"$ENV{METIS_DIR}\")\nset(ENV_METIS_INCDIR \"$ENV{METIS_INCDIR}\")\nif(ENV_METIS_INCDIR)\n  list(APPEND _inc_env \"${ENV_METIS_INCDIR}\")\nelseif(ENV_METIS_DIR)\n  list(APPEND _inc_env \"${ENV_METIS_DIR}\")\n  list(APPEND _inc_env \"${ENV_METIS_DIR}/include\")\n  list(APPEND _inc_env \"${ENV_METIS_DIR}/include/metis\")\nelse()\n  if(WIN32)\n    string(REPLACE \":\" \";\" _inc_env \"$ENV{INCLUDE}\")\n  else()\n    string(REPLACE \":\" \";\" _path_env \"$ENV{INCLUDE}\")\n    list(APPEND _inc_env \"${_path_env}\")\n    string(REPLACE \":\" \";\" _path_env \"$ENV{C_INCLUDE_PATH}\")\n    list(APPEND _inc_env \"${_path_env}\")\n    string(REPLACE \":\" \";\" _path_env \"$ENV{CPATH}\")\n    list(APPEND _inc_env \"${_path_env}\")\n    string(REPLACE \":\" \";\" _path_env \"$ENV{INCLUDE_PATH}\")\n    list(APPEND _inc_env \"${_path_env}\")\n  endif()\nendif()\nlist(APPEND _inc_env \"${CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES}\")\nlist(APPEND _inc_env \"${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES}\")\nlist(REMOVE_DUPLICATES _inc_env)\n\n\n# Try to find the metis header in the given paths\n# -------------------------------------------------\n# call cmake macro to find the header path\nif(METIS_INCDIR)\n  set(METIS_metis.h_DIRS \"METIS_metis.h_DIRS-NOTFOUND\")\n  find_path(METIS_metis.h_DIRS\n    NAMES metis.h\n    HINTS ${METIS_INCDIR})\nelse()\n  if(METIS_DIR)\n    set(METIS_metis.h_DIRS \"METIS_metis.h_DIRS-NOTFOUND\")\n    find_path(METIS_metis.h_DIRS\n      NAMES metis.h\n      HINTS ${METIS_DIR}\n      PATH_SUFFIXES \"include\" \"include/metis\")\n  else()\n    set(METIS_metis.h_DIRS \"METIS_metis.h_DIRS-NOTFOUND\")\n    find_path(METIS_metis.h_DIRS\n      NAMES metis.h\n      HINTS ${_inc_env})\n  endif()\nendif()\nmark_as_advanced(METIS_metis.h_DIRS)\n\n\n# If found, add path to cmake variable\n# ------------------------------------\nif (METIS_metis.h_DIRS)\n  set(METIS_INCLUDE_DIRS \"${METIS_metis.h_DIRS}\")\nelse ()\n  set(METIS_INCLUDE_DIRS \"METIS_INCLUDE_DIRS-NOTFOUND\")\n  if(NOT METIS_FIND_QUIETLY)\n    message(STATUS \"Looking for metis -- metis.h not found\")\n  endif()\nendif()\n\n\n# Looking for lib\n# ---------------\n\n# Add system library paths to search lib\n# --------------------------------------\nunset(_lib_env)\nset(ENV_METIS_LIBDIR \"$ENV{METIS_LIBDIR}\")\nif(ENV_METIS_LIBDIR)\n  list(APPEND _lib_env \"${ENV_METIS_LIBDIR}\")\nelseif(ENV_METIS_DIR)\n  list(APPEND _lib_env \"${ENV_METIS_DIR}\")\n  list(APPEND _lib_env \"${ENV_METIS_DIR}/lib\")\nelse()\n  if(WIN32)\n    string(REPLACE \":\" \";\" _lib_env \"$ENV{LIB}\")\n  else()\n    if(APPLE)\n      string(REPLACE \":\" \";\" _lib_env \"$ENV{DYLD_LIBRARY_PATH}\")\n    else()\n      string(REPLACE \":\" \";\" _lib_env \"$ENV{LD_LIBRARY_PATH}\")\n    endif()\n    list(APPEND _lib_env \"${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}\")\n    list(APPEND _lib_env \"${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}\")\n  endif()\nendif()\nlist(REMOVE_DUPLICATES _lib_env)\n\n# Try to find the metis lib in the given paths\n# ----------------------------------------------\n# call cmake macro to find the lib path\nif(METIS_LIBDIR)\n  set(METIS_metis_LIBRARY \"METIS_metis_LIBRARY-NOTFOUND\")\n  find_library(METIS_metis_LIBRARY\n    NAMES metis\n    HINTS ${METIS_LIBDIR})\nelse()\n  if(METIS_DIR)\n    set(METIS_metis_LIBRARY \"METIS_metis_LIBRARY-NOTFOUND\")\n    find_library(METIS_metis_LIBRARY\n      NAMES metis\n      HINTS ${METIS_DIR}\n      PATH_SUFFIXES lib lib32 lib64)\n  else()\n    set(METIS_metis_LIBRARY \"METIS_metis_LIBRARY-NOTFOUND\")\n    find_library(METIS_metis_LIBRARY\n      NAMES metis\n      HINTS ${_lib_env})\n  endif()\nendif()\nmark_as_advanced(METIS_metis_LIBRARY)\n\n\n# If found, add path to cmake variable\n# ------------------------------------\nif (METIS_metis_LIBRARY)\n  get_filename_component(metis_lib_path \"${METIS_metis_LIBRARY}\" PATH)\n  # set cmake variables\n  set(METIS_LIBRARIES    \"${METIS_metis_LIBRARY}\")\n  set(METIS_LIBRARY_DIRS \"${metis_lib_path}\")\nelse ()\n  set(METIS_LIBRARIES    \"METIS_LIBRARIES-NOTFOUND\")\n  set(METIS_LIBRARY_DIRS \"METIS_LIBRARY_DIRS-NOTFOUND\")\n  if(NOT METIS_FIND_QUIETLY)\n    message(STATUS \"Looking for metis -- lib metis not found\")\n  endif()\nendif ()\n\n# check a function to validate the find\nif(METIS_LIBRARIES)\n\n  set(REQUIRED_INCDIRS)\n  set(REQUIRED_LIBDIRS)\n  set(REQUIRED_LIBS)\n\n  # METIS\n  if (METIS_INCLUDE_DIRS)\n    set(REQUIRED_INCDIRS  \"${METIS_INCLUDE_DIRS}\")\n  endif()\n  if (METIS_LIBRARY_DIRS)\n    set(REQUIRED_LIBDIRS \"${METIS_LIBRARY_DIRS}\")\n  endif()\n  set(REQUIRED_LIBS \"${METIS_LIBRARIES}\")\n  # m\n  find_library(M_LIBRARY NAMES m)\n  mark_as_advanced(M_LIBRARY)\n  if(M_LIBRARY)\n    list(APPEND REQUIRED_LIBS \"-lm\")\n  endif()\n\n  # set required libraries for link\n  set(CMAKE_REQUIRED_INCLUDES \"${REQUIRED_INCDIRS}\")\n  set(CMAKE_REQUIRED_LIBRARIES)\n  foreach(lib_dir ${REQUIRED_LIBDIRS})\n    list(APPEND CMAKE_REQUIRED_LIBRARIES \"-L${lib_dir}\")\n  endforeach()\n  list(APPEND CMAKE_REQUIRED_LIBRARIES \"${REQUIRED_LIBS}\")\n  string(REGEX REPLACE \"^ -\" \"-\" CMAKE_REQUIRED_LIBRARIES \"${CMAKE_REQUIRED_LIBRARIES}\")\n\n  # test link\n  unset(METIS_WORKS CACHE)\n  include(CheckFunctionExists)\n  check_function_exists(METIS_NodeND METIS_WORKS)\n  mark_as_advanced(METIS_WORKS)\n\n  if(NOT METIS_WORKS)\n    if(NOT METIS_FIND_QUIETLY)\n      message(STATUS \"Looking for METIS : test of METIS_NodeND with METIS library fails\")\n      message(STATUS \"CMAKE_REQUIRED_LIBRARIES: ${CMAKE_REQUIRED_LIBRARIES}\")\n      message(STATUS \"CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}\")\n      message(STATUS \"Check in CMakeFiles/CMakeError.log to figure out why it fails\")\n    endif()\n  endif()\n  set(CMAKE_REQUIRED_INCLUDES)\n  set(CMAKE_REQUIRED_FLAGS)\n  set(CMAKE_REQUIRED_LIBRARIES)\nendif()\n\nif (METIS_LIBRARIES)\n  list(GET METIS_LIBRARIES 0 first_lib)\n  get_filename_component(first_lib_path \"${first_lib}\" PATH)\n  if (${first_lib_path} MATCHES \"/lib(32|64)?$\")\n    string(REGEX REPLACE \"/lib(32|64)?$\" \"\" not_cached_dir \"${first_lib_path}\")\n    set(METIS_DIR_FOUND \"${not_cached_dir}\" CACHE PATH \"Installation directory of METIS library\" FORCE)\n  else()\n    set(METIS_DIR_FOUND \"${first_lib_path}\" CACHE PATH \"Installation directory of METIS library\" FORCE)\n  endif()\nendif()\nmark_as_advanced(METIS_DIR)\nmark_as_advanced(METIS_DIR_FOUND)\n\n# check that METIS has been found\n# ---------------------------------\ninclude(FindPackageHandleStandardArgs)\nfind_package_handle_standard_args(METIS DEFAULT_MSG\n  METIS_LIBRARIES\n  METIS_WORKS)\n#\n# TODO: Add possibility to check for specific functions in the library\n#\n"
  },
  {
    "path": "3rdparty/eigen3/cmake/FindPTSCOTCH.cmake",
    "content": "###\n#\n# @copyright (c) 2009-2014 The University of Tennessee and The University\n#                          of Tennessee Research Foundation.\n#                          All rights reserved.\n# @copyright (c) 2012-2016 Inria. All rights reserved.\n# @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.\n#\n###\n#\n# - Find PTSCOTCH include dirs and libraries\n# Use this module by invoking find_package with the form:\n#  find_package(PTSCOTCH\n#               [REQUIRED]             # Fail with error if ptscotch is not found\n#               [COMPONENTS <comp1> <comp2> ...] # dependencies\n#              )\n#\n#  PTSCOTCH depends on the following libraries:\n#   - Threads\n#   - MPI\n#\n#  COMPONENTS can be some of the following:\n#   - ESMUMPS: to activate detection of PT-Scotch with the esmumps interface\n#\n# This module finds headers and ptscotch library.\n# Results are reported in variables:\n#  PTSCOTCH_FOUND            - True if headers and requested libraries were found\n#  PTSCOTCH_LINKER_FLAGS     - list of required linker flags (excluding -l and -L)\n#  PTSCOTCH_INCLUDE_DIRS     - ptscotch include directories\n#  PTSCOTCH_LIBRARY_DIRS     - Link directories for ptscotch libraries\n#  PTSCOTCH_LIBRARIES        - ptscotch component libraries to be linked\n#  PTSCOTCH_INCLUDE_DIRS_DEP - ptscotch + dependencies include directories\n#  PTSCOTCH_LIBRARY_DIRS_DEP - ptscotch + dependencies link directories\n#  PTSCOTCH_LIBRARIES_DEP    - ptscotch libraries + dependencies\n#  PTSCOTCH_INTSIZE          - Number of octets occupied by a SCOTCH_Num\n#\n# The user can give specific paths where to find the libraries adding cmake\n# options at configure (ex: cmake path/to/project -DPTSCOTCH=path/to/ptscotch):\n#  PTSCOTCH_DIR              - Where to find the base directory of ptscotch\n#  PTSCOTCH_INCDIR           - Where to find the header files\n#  PTSCOTCH_LIBDIR           - Where to find the library files\n# The module can also look for the following environment variables if paths\n# are not given as cmake variable: PTSCOTCH_DIR, PTSCOTCH_INCDIR, PTSCOTCH_LIBDIR\n\n#=============================================================================\n# Copyright 2012-2013 Inria\n# Copyright 2012-2013 Emmanuel Agullo\n# Copyright 2012-2013 Mathieu Faverge\n# Copyright 2012      Cedric Castagnede\n# Copyright 2013-2016 Florent Pruvost\n#\n# Distributed under the OSI-approved BSD License (the \"License\");\n# see accompanying file MORSE-Copyright.txt for details.\n#\n# This software is distributed WITHOUT ANY WARRANTY; without even the\n# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n# See the License for more information.\n#=============================================================================\n# (To distribute this file outside of Morse, substitute the full\n#  License text for the above reference.)\n\nif (NOT PTSCOTCH_FOUND)\n  set(PTSCOTCH_DIR \"\" CACHE PATH \"Installation directory of PTSCOTCH library\")\n  if (NOT PTSCOTCH_FIND_QUIETLY)\n    message(STATUS \"A cache variable, namely PTSCOTCH_DIR, has been set to specify the install directory of PTSCOTCH\")\n  endif()\nendif()\n\n# Set the version to find\nset(PTSCOTCH_LOOK_FOR_ESMUMPS OFF)\n\nif( PTSCOTCH_FIND_COMPONENTS )\n  foreach( component ${PTSCOTCH_FIND_COMPONENTS} )\n    if (${component} STREQUAL \"ESMUMPS\")\n      # means we look for esmumps library\n      set(PTSCOTCH_LOOK_FOR_ESMUMPS ON)\n    endif()\n  endforeach()\nendif()\n\n# PTSCOTCH depends on Threads, try to find it\nif (NOT THREADS_FOUND)\n  if (PTSCOTCH_FIND_REQUIRED)\n    find_package(Threads REQUIRED)\n  else()\n    find_package(Threads)\n  endif()\nendif()\n\n# PTSCOTCH depends on MPI, try to find it\nif (NOT MPI_FOUND)\n  if (PTSCOTCH_FIND_REQUIRED)\n    find_package(MPI REQUIRED)\n  else()\n    find_package(MPI)\n  endif()\nendif()\n\n# Looking for include\n# -------------------\n\n# Add system include paths to search include\n# ------------------------------------------\nunset(_inc_env)\nset(ENV_PTSCOTCH_DIR \"$ENV{PTSCOTCH_DIR}\")\nset(ENV_PTSCOTCH_INCDIR \"$ENV{PTSCOTCH_INCDIR}\")\nif(ENV_PTSCOTCH_INCDIR)\n  list(APPEND _inc_env \"${ENV_PTSCOTCH_INCDIR}\")\nelseif(ENV_PTSCOTCH_DIR)\n  list(APPEND _inc_env \"${ENV_PTSCOTCH_DIR}\")\n  list(APPEND _inc_env \"${ENV_PTSCOTCH_DIR}/include\")\n  list(APPEND _inc_env \"${ENV_PTSCOTCH_DIR}/include/ptscotch\")\nelse()\n  if(WIN32)\n    string(REPLACE \":\" \";\" _inc_env \"$ENV{INCLUDE}\")\n  else()\n    string(REPLACE \":\" \";\" _path_env \"$ENV{INCLUDE}\")\n    list(APPEND _inc_env \"${_path_env}\")\n    string(REPLACE \":\" \";\" _path_env \"$ENV{C_INCLUDE_PATH}\")\n    list(APPEND _inc_env \"${_path_env}\")\n    string(REPLACE \":\" \";\" _path_env \"$ENV{CPATH}\")\n    list(APPEND _inc_env \"${_path_env}\")\n    string(REPLACE \":\" \";\" _path_env \"$ENV{INCLUDE_PATH}\")\n    list(APPEND _inc_env \"${_path_env}\")\n  endif()\nendif()\nlist(APPEND _inc_env \"${CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES}\")\nlist(APPEND _inc_env \"${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES}\")\nlist(REMOVE_DUPLICATES _inc_env)\n\n\n# Try to find the ptscotch header in the given paths\n# -------------------------------------------------\n\nset(PTSCOTCH_hdrs_to_find \"ptscotch.h;scotch.h\")\n\n# call cmake macro to find the header path\nif(PTSCOTCH_INCDIR)\n  foreach(ptscotch_hdr ${PTSCOTCH_hdrs_to_find})\n    set(PTSCOTCH_${ptscotch_hdr}_DIRS \"PTSCOTCH_${ptscotch_hdr}_DIRS-NOTFOUND\")\n    find_path(PTSCOTCH_${ptscotch_hdr}_DIRS\n      NAMES ${ptscotch_hdr}\n      HINTS ${PTSCOTCH_INCDIR})\n    mark_as_advanced(PTSCOTCH_${ptscotch_hdr}_DIRS)\n  endforeach()\nelse()\n  if(PTSCOTCH_DIR)\n    foreach(ptscotch_hdr ${PTSCOTCH_hdrs_to_find})\n      set(PTSCOTCH_${ptscotch_hdr}_DIRS \"PTSCOTCH_${ptscotch_hdr}_DIRS-NOTFOUND\")\n      find_path(PTSCOTCH_${ptscotch_hdr}_DIRS\n\tNAMES ${ptscotch_hdr}\n\tHINTS ${PTSCOTCH_DIR}\n\tPATH_SUFFIXES \"include\" \"include/scotch\")\n      mark_as_advanced(PTSCOTCH_${ptscotch_hdr}_DIRS)\n    endforeach()\n  else()\n    foreach(ptscotch_hdr ${PTSCOTCH_hdrs_to_find})\n      set(PTSCOTCH_${ptscotch_hdr}_DIRS \"PTSCOTCH_${ptscotch_hdr}_DIRS-NOTFOUND\")\n      find_path(PTSCOTCH_${ptscotch_hdr}_DIRS\n\tNAMES ${ptscotch_hdr}\n\tHINTS ${_inc_env}\n\tPATH_SUFFIXES \"scotch\")\n      mark_as_advanced(PTSCOTCH_${ptscotch_hdr}_DIRS)\n    endforeach()\n  endif()\nendif()\n\n# If found, add path to cmake variable\n# ------------------------------------\nforeach(ptscotch_hdr ${PTSCOTCH_hdrs_to_find})\n  if (PTSCOTCH_${ptscotch_hdr}_DIRS)\n    list(APPEND PTSCOTCH_INCLUDE_DIRS \"${PTSCOTCH_${ptscotch_hdr}_DIRS}\")\n  else ()\n    set(PTSCOTCH_INCLUDE_DIRS \"PTSCOTCH_INCLUDE_DIRS-NOTFOUND\")\n    if (NOT PTSCOTCH_FIND_QUIETLY)\n      message(STATUS \"Looking for ptscotch -- ${ptscotch_hdr} not found\")\n    endif()\n  endif()\nendforeach()\nlist(REMOVE_DUPLICATES PTSCOTCH_INCLUDE_DIRS)\n\n# Looking for lib\n# ---------------\n\n# Add system library paths to search lib\n# --------------------------------------\nunset(_lib_env)\nset(ENV_PTSCOTCH_LIBDIR \"$ENV{PTSCOTCH_LIBDIR}\")\nif(ENV_PTSCOTCH_LIBDIR)\n  list(APPEND _lib_env \"${ENV_PTSCOTCH_LIBDIR}\")\nelseif(ENV_PTSCOTCH_DIR)\n  list(APPEND _lib_env \"${ENV_PTSCOTCH_DIR}\")\n  list(APPEND _lib_env \"${ENV_PTSCOTCH_DIR}/lib\")\nelse()\n  if(WIN32)\n    string(REPLACE \":\" \";\" _lib_env \"$ENV{LIB}\")\n  else()\n    if(APPLE)\n      string(REPLACE \":\" \";\" _lib_env \"$ENV{DYLD_LIBRARY_PATH}\")\n    else()\n      string(REPLACE \":\" \";\" _lib_env \"$ENV{LD_LIBRARY_PATH}\")\n    endif()\n    list(APPEND _lib_env \"${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}\")\n    list(APPEND _lib_env \"${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}\")\n  endif()\nendif()\nlist(REMOVE_DUPLICATES _lib_env)\n\n# Try to find the ptscotch lib in the given paths\n# ----------------------------------------------\n\nset(PTSCOTCH_libs_to_find \"ptscotch;ptscotcherr\")\nif (PTSCOTCH_LOOK_FOR_ESMUMPS)\n  list(INSERT PTSCOTCH_libs_to_find 0 \"ptesmumps\")\n  list(APPEND PTSCOTCH_libs_to_find   \"esmumps\"  )\nendif()\nlist(APPEND PTSCOTCH_libs_to_find \"scotch;scotcherr\")\n\n# call cmake macro to find the lib path\nif(PTSCOTCH_LIBDIR)\n  foreach(ptscotch_lib ${PTSCOTCH_libs_to_find})\n    set(PTSCOTCH_${ptscotch_lib}_LIBRARY \"PTSCOTCH_${ptscotch_lib}_LIBRARY-NOTFOUND\")\n    find_library(PTSCOTCH_${ptscotch_lib}_LIBRARY\n      NAMES ${ptscotch_lib}\n      HINTS ${PTSCOTCH_LIBDIR})\n  endforeach()\nelse()\n  if(PTSCOTCH_DIR)\n    foreach(ptscotch_lib ${PTSCOTCH_libs_to_find})\n      set(PTSCOTCH_${ptscotch_lib}_LIBRARY \"PTSCOTCH_${ptscotch_lib}_LIBRARY-NOTFOUND\")\n      find_library(PTSCOTCH_${ptscotch_lib}_LIBRARY\n\tNAMES ${ptscotch_lib}\n\tHINTS ${PTSCOTCH_DIR}\n\tPATH_SUFFIXES lib lib32 lib64)\n    endforeach()\n  else()\n    foreach(ptscotch_lib ${PTSCOTCH_libs_to_find})\n      set(PTSCOTCH_${ptscotch_lib}_LIBRARY \"PTSCOTCH_${ptscotch_lib}_LIBRARY-NOTFOUND\")\n      find_library(PTSCOTCH_${ptscotch_lib}_LIBRARY\n\tNAMES ${ptscotch_lib}\n\tHINTS ${_lib_env})\n    endforeach()\n  endif()\nendif()\n\nset(PTSCOTCH_LIBRARIES \"\")\nset(PTSCOTCH_LIBRARY_DIRS \"\")\n# If found, add path to cmake variable\n# ------------------------------------\nforeach(ptscotch_lib ${PTSCOTCH_libs_to_find})\n\n  if (PTSCOTCH_${ptscotch_lib}_LIBRARY)\n    get_filename_component(${ptscotch_lib}_lib_path \"${PTSCOTCH_${ptscotch_lib}_LIBRARY}\" PATH)\n    # set cmake variables\n    list(APPEND PTSCOTCH_LIBRARIES \"${PTSCOTCH_${ptscotch_lib}_LIBRARY}\")\n    list(APPEND PTSCOTCH_LIBRARY_DIRS \"${${ptscotch_lib}_lib_path}\")\n  else ()\n    list(APPEND PTSCOTCH_LIBRARIES \"${PTSCOTCH_${ptscotch_lib}_LIBRARY}\")\n    if (NOT PTSCOTCH_FIND_QUIETLY)\n      message(STATUS \"Looking for ptscotch -- lib ${ptscotch_lib} not found\")\n    endif()\n  endif ()\n\n  mark_as_advanced(PTSCOTCH_${ptscotch_lib}_LIBRARY)\n\nendforeach()\nlist(REMOVE_DUPLICATES PTSCOTCH_LIBRARY_DIRS)\n\n# check a function to validate the find\nif(PTSCOTCH_LIBRARIES)\n\n  set(REQUIRED_LDFLAGS)\n  set(REQUIRED_INCDIRS)\n  set(REQUIRED_LIBDIRS)\n  set(REQUIRED_LIBS)\n\n  # PTSCOTCH\n  if (PTSCOTCH_INCLUDE_DIRS)\n    set(REQUIRED_INCDIRS  \"${PTSCOTCH_INCLUDE_DIRS}\")\n  endif()\n  if (PTSCOTCH_LIBRARY_DIRS)\n    set(REQUIRED_LIBDIRS \"${PTSCOTCH_LIBRARY_DIRS}\")\n  endif()\n  set(REQUIRED_LIBS \"${PTSCOTCH_LIBRARIES}\")\n  # MPI\n  if (MPI_FOUND)\n    if (MPI_C_INCLUDE_PATH)\n      list(APPEND CMAKE_REQUIRED_INCLUDES \"${MPI_C_INCLUDE_PATH}\")\n    endif()\n    if (MPI_C_LINK_FLAGS)\n      if (${MPI_C_LINK_FLAGS} MATCHES \"  -\")\n\tstring(REGEX REPLACE \" -\" \"-\" MPI_C_LINK_FLAGS ${MPI_C_LINK_FLAGS})\n      endif()\n      list(APPEND REQUIRED_LDFLAGS \"${MPI_C_LINK_FLAGS}\")\n    endif()\n    list(APPEND REQUIRED_LIBS \"${MPI_C_LIBRARIES}\")\n  endif()\n  # THREADS\n  if(CMAKE_THREAD_LIBS_INIT)\n    list(APPEND REQUIRED_LIBS \"${CMAKE_THREAD_LIBS_INIT}\")\n  endif()\n  set(Z_LIBRARY \"Z_LIBRARY-NOTFOUND\")\n  find_library(Z_LIBRARY NAMES z)\n  mark_as_advanced(Z_LIBRARY)\n  if(Z_LIBRARY)\n    list(APPEND REQUIRED_LIBS \"-lz\")\n  endif()\n  set(M_LIBRARY \"M_LIBRARY-NOTFOUND\")\n  find_library(M_LIBRARY NAMES m)\n  mark_as_advanced(M_LIBRARY)\n  if(M_LIBRARY)\n    list(APPEND REQUIRED_LIBS \"-lm\")\n  endif()\n  set(RT_LIBRARY \"RT_LIBRARY-NOTFOUND\")\n  find_library(RT_LIBRARY NAMES rt)\n  mark_as_advanced(RT_LIBRARY)\n  if(RT_LIBRARY)\n    list(APPEND REQUIRED_LIBS \"-lrt\")\n  endif()\n\n  # set required libraries for link\n  set(CMAKE_REQUIRED_INCLUDES \"${REQUIRED_INCDIRS}\")\n  set(CMAKE_REQUIRED_LIBRARIES)\n  list(APPEND CMAKE_REQUIRED_LIBRARIES \"${REQUIRED_LDFLAGS}\")\n  foreach(lib_dir ${REQUIRED_LIBDIRS})\n    list(APPEND CMAKE_REQUIRED_LIBRARIES \"-L${lib_dir}\")\n  endforeach()\n  list(APPEND CMAKE_REQUIRED_LIBRARIES \"${REQUIRED_LIBS}\")\n  list(APPEND CMAKE_REQUIRED_FLAGS \"${REQUIRED_FLAGS}\")\n  string(REGEX REPLACE \"^ -\" \"-\" CMAKE_REQUIRED_LIBRARIES \"${CMAKE_REQUIRED_LIBRARIES}\")\n\n  # test link\n  unset(PTSCOTCH_WORKS CACHE)\n  include(CheckFunctionExists)\n  check_function_exists(SCOTCH_dgraphInit PTSCOTCH_WORKS)\n  mark_as_advanced(PTSCOTCH_WORKS)\n\n  if(PTSCOTCH_WORKS)\n    # save link with dependencies\n    set(PTSCOTCH_LIBRARIES_DEP \"${REQUIRED_LIBS}\")\n    set(PTSCOTCH_LIBRARY_DIRS_DEP \"${REQUIRED_LIBDIRS}\")\n    set(PTSCOTCH_INCLUDE_DIRS_DEP \"${REQUIRED_INCDIRS}\")\n    set(PTSCOTCH_LINKER_FLAGS \"${REQUIRED_LDFLAGS}\")\n    list(REMOVE_DUPLICATES PTSCOTCH_LIBRARY_DIRS_DEP)\n    list(REMOVE_DUPLICATES PTSCOTCH_INCLUDE_DIRS_DEP)\n    list(REMOVE_DUPLICATES PTSCOTCH_LINKER_FLAGS)\n  else()\n    if(NOT PTSCOTCH_FIND_QUIETLY)\n      message(STATUS \"Looking for PTSCOTCH : test of SCOTCH_dgraphInit with PTSCOTCH library fails\")\n      message(STATUS \"CMAKE_REQUIRED_LIBRARIES: ${CMAKE_REQUIRED_LIBRARIES}\")\n      message(STATUS \"CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}\")\n      message(STATUS \"Check in CMakeFiles/CMakeError.log to figure out why it fails\")\n    endif()\n  endif()\n  set(CMAKE_REQUIRED_INCLUDES)\n  set(CMAKE_REQUIRED_FLAGS)\n  set(CMAKE_REQUIRED_LIBRARIES)\nendif()\n\nif (PTSCOTCH_LIBRARIES)\n  list(GET PTSCOTCH_LIBRARIES 0 first_lib)\n  get_filename_component(first_lib_path \"${first_lib}\" PATH)\n  if (${first_lib_path} MATCHES \"/lib(32|64)?$\")\n    string(REGEX REPLACE \"/lib(32|64)?$\" \"\" not_cached_dir \"${first_lib_path}\")\n    set(PTSCOTCH_DIR_FOUND \"${not_cached_dir}\" CACHE PATH \"Installation directory of PTSCOTCH library\" FORCE)\n  else()\n    set(PTSCOTCH_DIR_FOUND \"${first_lib_path}\" CACHE PATH \"Installation directory of PTSCOTCH library\" FORCE)\n  endif()\nendif()\nmark_as_advanced(PTSCOTCH_DIR)\nmark_as_advanced(PTSCOTCH_DIR_FOUND)\n\n# Check the size of SCOTCH_Num\n# ---------------------------------\nset(CMAKE_REQUIRED_INCLUDES ${PTSCOTCH_INCLUDE_DIRS})\n\ninclude(CheckCSourceRuns)\n#stdio.h and stdint.h should be included by scotch.h directly\nset(PTSCOTCH_C_TEST_SCOTCH_Num_4 \"\n#include <stdio.h>\n#include <stdint.h>\n#include <ptscotch.h>\nint main(int argc, char **argv) {\n  if (sizeof(SCOTCH_Num) == 4)\n    return 0;\n  else\n    return 1;\n}\n\")\n\nset(PTSCOTCH_C_TEST_SCOTCH_Num_8 \"\n#include <stdio.h>\n#include <stdint.h>\n#include <ptscotch.h>\nint main(int argc, char **argv) {\n  if (sizeof(SCOTCH_Num) == 8)\n    return 0;\n  else\n    return 1;\n}\n\")\ncheck_c_source_runs(\"${PTSCOTCH_C_TEST_SCOTCH_Num_4}\" PTSCOTCH_Num_4)\nif(NOT PTSCOTCH_Num_4)\n  check_c_source_runs(\"${PTSCOTCH_C_TEST_SCOTCH_Num_8}\" PTSCOTCH_Num_8)\n  if(NOT PTSCOTCH_Num_8)\n    set(PTSCOTCH_INTSIZE -1)\n  else()\n    set(PTSCOTCH_INTSIZE 8)\n  endif()\nelse()\n  set(PTSCOTCH_INTSIZE 4)\nendif()\nset(CMAKE_REQUIRED_INCLUDES \"\")\n\n# check that PTSCOTCH has been found\n# ---------------------------------\ninclude(FindPackageHandleStandardArgs)\nfind_package_handle_standard_args(PTSCOTCH DEFAULT_MSG\n  PTSCOTCH_LIBRARIES\n  PTSCOTCH_WORKS)\n#\n# TODO: Add possibility to check for specific functions in the library\n#\n"
  },
  {
    "path": "3rdparty/eigen3/cmake/FindPastix.cmake",
    "content": "###\n#\n# @copyright (c) 2009-2014 The University of Tennessee and The University\n#                          of Tennessee Research Foundation.\n#                          All rights reserved.\n# @copyright (c) 2012-2014 Inria. All rights reserved.\n# @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.\n#\n###\n#\n# - Find PASTIX include dirs and libraries\n# Use this module by invoking find_package with the form:\n#  find_package(PASTIX\n#               [REQUIRED] # Fail with error if pastix is not found\n#               [COMPONENTS <comp1> <comp2> ...] # dependencies\n#              )\n#\n#  PASTIX depends on the following libraries:\n#   - Threads, m, rt\n#   - MPI\n#   - HWLOC\n#   - BLAS\n#\n#  COMPONENTS are optional libraries PASTIX could be linked with,\n#  Use it to drive detection of a specific compilation chain\n#  COMPONENTS can be some of the following:\n#   - MPI: to activate detection of the parallel MPI version (default)\n#        it looks for Threads, HWLOC, BLAS, MPI and ScaLAPACK libraries\n#   - SEQ: to activate detection of the sequential version (exclude MPI version)\n#   - STARPU: to activate detection of StarPU version\n#   it looks for MPI version of StarPU (default behaviour)\n#   if SEQ and STARPU are given, it looks for a StarPU without MPI\n#   - STARPU_CUDA: to activate detection of StarPU with CUDA\n#   - STARPU_FXT: to activate detection of StarPU with FxT\n#   - SCOTCH: to activate detection of PASTIX linked with SCOTCH\n#   - PTSCOTCH: to activate detection of PASTIX linked with SCOTCH\n#   - METIS: to activate detection of PASTIX linked with SCOTCH\n#\n# This module finds headers and pastix library.\n# Results are reported in variables:\n#  PASTIX_FOUND            - True if headers and requested libraries were found\n#  PASTIX_LINKER_FLAGS     - list of required linker flags (excluding -l and -L)\n#  PASTIX_INCLUDE_DIRS     - pastix include directories\n#  PASTIX_LIBRARY_DIRS     - Link directories for pastix libraries\n#  PASTIX_LIBRARIES        - pastix libraries\n#  PASTIX_INCLUDE_DIRS_DEP - pastix + dependencies include directories\n#  PASTIX_LIBRARY_DIRS_DEP - pastix + dependencies link directories\n#  PASTIX_LIBRARIES_DEP    - pastix libraries + dependencies\n#\n# The user can give specific paths where to find the libraries adding cmake\n# options at configure (ex: cmake path/to/project -DPASTIX_DIR=path/to/pastix):\n#  PASTIX_DIR              - Where to find the base directory of pastix\n#  PASTIX_INCDIR           - Where to find the header files\n#  PASTIX_LIBDIR           - Where to find the library files\n# The module can also look for the following environment variables if paths\n# are not given as cmake variable: PASTIX_DIR, PASTIX_INCDIR, PASTIX_LIBDIR\n\n#=============================================================================\n# Copyright 2012-2013 Inria\n# Copyright 2012-2013 Emmanuel Agullo\n# Copyright 2012-2013 Mathieu Faverge\n# Copyright 2012      Cedric Castagnede\n# Copyright 2013      Florent Pruvost\n#\n# Distributed under the OSI-approved BSD License (the \"License\");\n# see accompanying file MORSE-Copyright.txt for details.\n#\n# This software is distributed WITHOUT ANY WARRANTY; without even the\n# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n# See the License for more information.\n#=============================================================================\n# (To distribute this file outside of Morse, substitute the full\n#  License text for the above reference.)\n\n\nif (NOT PASTIX_FOUND)\n  set(PASTIX_DIR \"\" CACHE PATH \"Installation directory of PASTIX library\")\n  if (NOT PASTIX_FIND_QUIETLY)\n    message(STATUS \"A cache variable, namely PASTIX_DIR, has been set to specify the install directory of PASTIX\")\n  endif()\nendif()\n\n# Set the version to find\nset(PASTIX_LOOK_FOR_MPI ON)\nset(PASTIX_LOOK_FOR_SEQ OFF)\nset(PASTIX_LOOK_FOR_STARPU OFF)\nset(PASTIX_LOOK_FOR_STARPU_CUDA OFF)\nset(PASTIX_LOOK_FOR_STARPU_FXT OFF)\nset(PASTIX_LOOK_FOR_SCOTCH ON)\nset(PASTIX_LOOK_FOR_PTSCOTCH OFF)\nset(PASTIX_LOOK_FOR_METIS OFF)\n\nif( PASTIX_FIND_COMPONENTS )\n  foreach( component ${PASTIX_FIND_COMPONENTS} )\n    if (${component} STREQUAL \"SEQ\")\n      # means we look for the sequential version of PaStiX (without MPI)\n      set(PASTIX_LOOK_FOR_SEQ ON)\n      set(PASTIX_LOOK_FOR_MPI OFF)\n    endif()\n    if (${component} STREQUAL \"MPI\")\n      # means we look for the MPI version of PaStiX (default)\n      set(PASTIX_LOOK_FOR_SEQ OFF)\n      set(PASTIX_LOOK_FOR_MPI ON)\n    endif()\n    if (${component} STREQUAL \"STARPU\")\n      # means we look for PaStiX with StarPU\n      set(PASTIX_LOOK_FOR_STARPU ON)\n    endif()\n    if (${component} STREQUAL \"STARPU_CUDA\")\n      # means we look for PaStiX with StarPU + CUDA\n      set(PASTIX_LOOK_FOR_STARPU ON)\n      set(PASTIX_LOOK_FOR_STARPU_CUDA ON)\n    endif()\n    if (${component} STREQUAL \"STARPU_FXT\")\n      # means we look for PaStiX with StarPU + FxT\n      set(PASTIX_LOOK_FOR_STARPU_FXT ON)\n    endif()\n    if (${component} STREQUAL \"SCOTCH\")\n      set(PASTIX_LOOK_FOR_SCOTCH ON)\n    endif()\n    if (${component} STREQUAL \"SCOTCH\")\n      set(PASTIX_LOOK_FOR_PTSCOTCH ON)\n    endif()\n    if (${component} STREQUAL \"METIS\")\n      set(PASTIX_LOOK_FOR_METIS ON)\n    endif()\n  endforeach()\nendif()\n\n# Dependencies detection\n# ----------------------\n\n\n# Required dependencies\n# ---------------------\n\nif (NOT PASTIX_FIND_QUIETLY)\n  message(STATUS \"Looking for PASTIX - Try to detect pthread\")\nendif()\nif (PASTIX_FIND_REQUIRED)\n  find_package(Threads REQUIRED QUIET)\nelse()\n  find_package(Threads QUIET)\nendif()\nset(PASTIX_EXTRA_LIBRARIES \"\")\nif( THREADS_FOUND )\n  list(APPEND PASTIX_EXTRA_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})\nendif ()\n\n# Add math library to the list of extra\n# it normally exists on all common systems provided with a C compiler\nif (NOT PASTIX_FIND_QUIETLY)\n  message(STATUS \"Looking for PASTIX - Try to detect libm\")\nendif()\nset(PASTIX_M_LIBRARIES \"\")\nif(UNIX OR WIN32)\n  find_library(\n    PASTIX_M_m_LIBRARY\n    NAMES m\n    )\n  mark_as_advanced(PASTIX_M_m_LIBRARY)\n  if (PASTIX_M_m_LIBRARY)\n    list(APPEND PASTIX_M_LIBRARIES \"${PASTIX_M_m_LIBRARY}\")\n    list(APPEND PASTIX_EXTRA_LIBRARIES \"${PASTIX_M_m_LIBRARY}\")\n  else()\n    if (PASTIX_FIND_REQUIRED)\n      message(FATAL_ERROR \"Could NOT find libm on your system.\"\n\t\"Are you sure to a have a C compiler installed?\")\n    endif()\n  endif()\nendif()\n\n# Try to find librt (libposix4 - POSIX.1b Realtime Extensions library)\n# on Unix systems except Apple ones because it does not exist on it\nif (NOT PASTIX_FIND_QUIETLY)\n  message(STATUS \"Looking for PASTIX - Try to detect librt\")\nendif()\nset(PASTIX_RT_LIBRARIES \"\")\nif(UNIX AND NOT APPLE)\n  find_library(\n    PASTIX_RT_rt_LIBRARY\n    NAMES rt\n    )\n  mark_as_advanced(PASTIX_RT_rt_LIBRARY)\n  if (PASTIX_RT_rt_LIBRARY)\n    list(APPEND PASTIX_RT_LIBRARIES \"${PASTIX_RT_rt_LIBRARY}\")\n    list(APPEND PASTIX_EXTRA_LIBRARIES \"${PASTIX_RT_rt_LIBRARY}\")\n  else()\n    if (PASTIX_FIND_REQUIRED)\n      message(FATAL_ERROR \"Could NOT find librt on your system\")\n    endif()\n  endif()\nendif()\n\n# PASTIX depends on HWLOC\n#------------------------\nif (NOT PASTIX_FIND_QUIETLY)\n  message(STATUS \"Looking for PASTIX - Try to detect HWLOC\")\nendif()\nif (PASTIX_FIND_REQUIRED)\n  find_package(HWLOC REQUIRED QUIET)\nelse()\n  find_package(HWLOC QUIET)\nendif()\n\n# PASTIX depends on BLAS\n#-----------------------\nif (NOT PASTIX_FIND_QUIETLY)\n  message(STATUS \"Looking for PASTIX - Try to detect BLAS\")\nendif()\nif (PASTIX_FIND_REQUIRED)\n  find_package(BLASEXT REQUIRED QUIET)\nelse()\n  find_package(BLASEXT QUIET)\nendif()\n\n# Optional dependencies\n# ---------------------\n\n# PASTIX may depend on MPI\n#-------------------------\nif (NOT MPI_FOUND AND PASTIX_LOOK_FOR_MPI)\n  if (NOT PASTIX_FIND_QUIETLY)\n    message(STATUS \"Looking for PASTIX - Try to detect MPI\")\n  endif()\n  # allows to use an external mpi compilation by setting compilers with\n  # -DMPI_C_COMPILER=path/to/mpicc -DMPI_Fortran_COMPILER=path/to/mpif90\n  # at cmake configure\n  if(NOT MPI_C_COMPILER)\n    set(MPI_C_COMPILER mpicc)\n  endif()\n  if (PASTIX_FIND_REQUIRED AND PASTIX_FIND_REQUIRED_MPI)\n    find_package(MPI REQUIRED QUIET)\n  else()\n    find_package(MPI QUIET)\n  endif()\n  if (MPI_FOUND)\n    mark_as_advanced(MPI_LIBRARY)\n    mark_as_advanced(MPI_EXTRA_LIBRARY)\n  endif()\nendif ()\n\n# PASTIX may depend on STARPU\n#----------------------------\nif( NOT STARPU_FOUND AND PASTIX_LOOK_FOR_STARPU)\n\n  if (NOT PASTIX_FIND_QUIETLY)\n    message(STATUS \"Looking for PASTIX - Try to detect StarPU\")\n  endif()\n\n  set(PASTIX_STARPU_VERSION \"1.1\" CACHE STRING \"oldest STARPU version desired\")\n\n  # create list of components in order to make a single call to find_package(starpu...)\n  # we explicitly need a StarPU version built with hwloc\n  set(STARPU_COMPONENT_LIST \"HWLOC\")\n\n  # StarPU may depend on MPI\n  # allows to use an external mpi compilation by setting compilers with\n  # -DMPI_C_COMPILER=path/to/mpicc -DMPI_Fortran_COMPILER=path/to/mpif90\n  # at cmake configure\n  if (PASTIX_LOOK_FOR_MPI)\n    if(NOT MPI_C_COMPILER)\n      set(MPI_C_COMPILER mpicc)\n    endif()\n    list(APPEND STARPU_COMPONENT_LIST \"MPI\")\n  endif()\n  if (PASTIX_LOOK_FOR_STARPU_CUDA)\n    list(APPEND STARPU_COMPONENT_LIST \"CUDA\")\n  endif()\n  if (PASTIX_LOOK_FOR_STARPU_FXT)\n    list(APPEND STARPU_COMPONENT_LIST \"FXT\")\n  endif()\n  # set the list of optional dependencies we may discover\n  if (PASTIX_FIND_REQUIRED AND PASTIX_FIND_REQUIRED_STARPU)\n    find_package(STARPU ${PASTIX_STARPU_VERSION} REQUIRED\n      COMPONENTS ${STARPU_COMPONENT_LIST})\n  else()\n    find_package(STARPU ${PASTIX_STARPU_VERSION}\n      COMPONENTS ${STARPU_COMPONENT_LIST})\n  endif()\n\nendif()\n\n# PASTIX may depends on SCOTCH\n#-----------------------------\nif (NOT SCOTCH_FOUND AND PASTIX_LOOK_FOR_SCOTCH)\n  if (NOT PASTIX_FIND_QUIETLY)\n    message(STATUS \"Looking for PASTIX - Try to detect SCOTCH\")\n  endif()\n  if (PASTIX_FIND_REQUIRED AND PASTIX_FIND_REQUIRED_SCOTCH)\n    find_package(SCOTCH REQUIRED QUIET)\n  else()\n    find_package(SCOTCH QUIET)\n  endif()\nendif()\n\n# PASTIX may depends on PTSCOTCH\n#-------------------------------\nif (NOT PTSCOTCH_FOUND AND PASTIX_LOOK_FOR_PTSCOTCH)\n  if (NOT PASTIX_FIND_QUIETLY)\n    message(STATUS \"Looking for PASTIX - Try to detect PTSCOTCH\")\n  endif()\n  if (PASTIX_FIND_REQUIRED AND PASTIX_FIND_REQUIRED_PTSCOTCH)\n    find_package(PTSCOTCH REQUIRED QUIET)\n  else()\n    find_package(PTSCOTCH QUIET)\n  endif()\nendif()\n\n# PASTIX may depends on METIS\n#----------------------------\nif (NOT METIS_FOUND AND PASTIX_LOOK_FOR_METIS)\n  if (NOT PASTIX_FIND_QUIETLY)\n    message(STATUS \"Looking for PASTIX - Try to detect METIS\")\n  endif()\n  if (PASTIX_FIND_REQUIRED AND PASTIX_FIND_REQUIRED_METIS)\n    find_package(METIS REQUIRED QUIET)\n  else()\n    find_package(METIS QUIET)\n  endif()\nendif()\n\n# Error if pastix required and no partitioning lib found\nif (PASTIX_FIND_REQUIRED AND NOT SCOTCH_FOUND AND NOT PTSCOTCH_FOUND AND NOT METIS_FOUND)\n  message(FATAL_ERROR \"Could NOT find any partitioning library on your system\"\n    \" (install scotch, ptscotch or metis)\")\nendif()\n\n\n# Looking for PaStiX\n# ------------------\n\n# Looking for include\n# -------------------\n\n# Add system include paths to search include\n# ------------------------------------------\nunset(_inc_env)\nset(ENV_PASTIX_DIR \"$ENV{PASTIX_DIR}\")\nset(ENV_PASTIX_INCDIR \"$ENV{PASTIX_INCDIR}\")\nif(ENV_PASTIX_INCDIR)\n  list(APPEND _inc_env \"${ENV_PASTIX_INCDIR}\")\nelseif(ENV_PASTIX_DIR)\n  list(APPEND _inc_env \"${ENV_PASTIX_DIR}\")\n  list(APPEND _inc_env \"${ENV_PASTIX_DIR}/include\")\n  list(APPEND _inc_env \"${ENV_PASTIX_DIR}/include/pastix\")\nelse()\n  if(WIN32)\n    string(REPLACE \":\" \";\" _inc_env \"$ENV{INCLUDE}\")\n  else()\n    string(REPLACE \":\" \";\" _path_env \"$ENV{INCLUDE}\")\n    list(APPEND _inc_env \"${_path_env}\")\n    string(REPLACE \":\" \";\" _path_env \"$ENV{C_INCLUDE_PATH}\")\n    list(APPEND _inc_env \"${_path_env}\")\n    string(REPLACE \":\" \";\" _path_env \"$ENV{CPATH}\")\n    list(APPEND _inc_env \"${_path_env}\")\n    string(REPLACE \":\" \";\" _path_env \"$ENV{INCLUDE_PATH}\")\n    list(APPEND _inc_env \"${_path_env}\")\n  endif()\nendif()\nlist(APPEND _inc_env \"${CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES}\")\nlist(APPEND _inc_env \"${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES}\")\nlist(REMOVE_DUPLICATES _inc_env)\n\n\n# Try to find the pastix header in the given paths\n# ---------------------------------------------------\n# call cmake macro to find the header path\nif(PASTIX_INCDIR)\n  set(PASTIX_pastix.h_DIRS \"PASTIX_pastix.h_DIRS-NOTFOUND\")\n  find_path(PASTIX_pastix.h_DIRS\n    NAMES pastix.h\n    HINTS ${PASTIX_INCDIR})\nelse()\n  if(PASTIX_DIR)\n    set(PASTIX_pastix.h_DIRS \"PASTIX_pastix.h_DIRS-NOTFOUND\")\n    find_path(PASTIX_pastix.h_DIRS\n      NAMES pastix.h\n      HINTS ${PASTIX_DIR}\n      PATH_SUFFIXES \"include\" \"include/pastix\")\n  else()\n    set(PASTIX_pastix.h_DIRS \"PASTIX_pastix.h_DIRS-NOTFOUND\")\n    find_path(PASTIX_pastix.h_DIRS\n      NAMES pastix.h\n      HINTS ${_inc_env}\n      PATH_SUFFIXES \"pastix\")\n  endif()\nendif()\nmark_as_advanced(PASTIX_pastix.h_DIRS)\n\n# If found, add path to cmake variable\n# ------------------------------------\nif (PASTIX_pastix.h_DIRS)\n  set(PASTIX_INCLUDE_DIRS \"${PASTIX_pastix.h_DIRS}\")\nelse ()\n  set(PASTIX_INCLUDE_DIRS \"PASTIX_INCLUDE_DIRS-NOTFOUND\")\n  if(NOT PASTIX_FIND_QUIETLY)\n    message(STATUS \"Looking for pastix -- pastix.h not found\")\n  endif()\nendif()\n\n\n# Looking for lib\n# ---------------\n\n# Add system library paths to search lib\n# --------------------------------------\nunset(_lib_env)\nset(ENV_PASTIX_LIBDIR \"$ENV{PASTIX_LIBDIR}\")\nif(ENV_PASTIX_LIBDIR)\n  list(APPEND _lib_env \"${ENV_PASTIX_LIBDIR}\")\nelseif(ENV_PASTIX_DIR)\n  list(APPEND _lib_env \"${ENV_PASTIX_DIR}\")\n  list(APPEND _lib_env \"${ENV_PASTIX_DIR}/lib\")\nelse()\n  if(WIN32)\n    string(REPLACE \":\" \";\" _lib_env \"$ENV{LIB}\")\n  else()\n    if(APPLE)\n      string(REPLACE \":\" \";\" _lib_env \"$ENV{DYLD_LIBRARY_PATH}\")\n    else()\n      string(REPLACE \":\" \";\" _lib_env \"$ENV{LD_LIBRARY_PATH}\")\n    endif()\n    list(APPEND _lib_env \"${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}\")\n    list(APPEND _lib_env \"${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}\")\n  endif()\nendif()\nlist(REMOVE_DUPLICATES _lib_env)\n\n# Try to find the pastix lib in the given paths\n# ------------------------------------------------\n\n# create list of libs to find\nset(PASTIX_libs_to_find \"pastix_murge;pastix\")\n\n# call cmake macro to find the lib path\nif(PASTIX_LIBDIR)\n  foreach(pastix_lib ${PASTIX_libs_to_find})\n    set(PASTIX_${pastix_lib}_LIBRARY \"PASTIX_${pastix_lib}_LIBRARY-NOTFOUND\")\n    find_library(PASTIX_${pastix_lib}_LIBRARY\n      NAMES ${pastix_lib}\n      HINTS ${PASTIX_LIBDIR})\n  endforeach()\nelse()\n  if(PASTIX_DIR)\n    foreach(pastix_lib ${PASTIX_libs_to_find})\n      set(PASTIX_${pastix_lib}_LIBRARY \"PASTIX_${pastix_lib}_LIBRARY-NOTFOUND\")\n      find_library(PASTIX_${pastix_lib}_LIBRARY\n\tNAMES ${pastix_lib}\n\tHINTS ${PASTIX_DIR}\n\tPATH_SUFFIXES lib lib32 lib64)\n    endforeach()\n  else()\n    foreach(pastix_lib ${PASTIX_libs_to_find})\n      set(PASTIX_${pastix_lib}_LIBRARY \"PASTIX_${pastix_lib}_LIBRARY-NOTFOUND\")\n      find_library(PASTIX_${pastix_lib}_LIBRARY\n\tNAMES ${pastix_lib}\n\tHINTS ${_lib_env})\n    endforeach()\n  endif()\nendif()\n\n# If found, add path to cmake variable\n# ------------------------------------\nforeach(pastix_lib ${PASTIX_libs_to_find})\n\n  get_filename_component(${pastix_lib}_lib_path ${PASTIX_${pastix_lib}_LIBRARY} PATH)\n  # set cmake variables (respects naming convention)\n  if (PASTIX_LIBRARIES)\n    list(APPEND PASTIX_LIBRARIES \"${PASTIX_${pastix_lib}_LIBRARY}\")\n  else()\n    set(PASTIX_LIBRARIES \"${PASTIX_${pastix_lib}_LIBRARY}\")\n  endif()\n  if (PASTIX_LIBRARY_DIRS)\n    list(APPEND PASTIX_LIBRARY_DIRS \"${${pastix_lib}_lib_path}\")\n  else()\n    set(PASTIX_LIBRARY_DIRS \"${${pastix_lib}_lib_path}\")\n  endif()\n  mark_as_advanced(PASTIX_${pastix_lib}_LIBRARY)\n\nendforeach()\n\n# check a function to validate the find\nif(PASTIX_LIBRARIES)\n\n  set(REQUIRED_LDFLAGS)\n  set(REQUIRED_INCDIRS)\n  set(REQUIRED_LIBDIRS)\n  set(REQUIRED_LIBS)\n\n  # PASTIX\n  if (PASTIX_INCLUDE_DIRS)\n    set(REQUIRED_INCDIRS \"${PASTIX_INCLUDE_DIRS}\")\n  endif()\n  foreach(libdir ${PASTIX_LIBRARY_DIRS})\n    if (libdir)\n      list(APPEND REQUIRED_LIBDIRS \"${libdir}\")\n    endif()\n  endforeach()\n  set(REQUIRED_LIBS \"${PASTIX_LIBRARIES}\")\n  # STARPU\n  if (PASTIX_LOOK_FOR_STARPU AND STARPU_FOUND)\n    if (STARPU_INCLUDE_DIRS_DEP)\n      list(APPEND REQUIRED_INCDIRS \"${STARPU_INCLUDE_DIRS_DEP}\")\n    elseif (STARPU_INCLUDE_DIRS)\n      list(APPEND REQUIRED_INCDIRS \"${STARPU_INCLUDE_DIRS}\")\n    endif()\n    if(STARPU_LIBRARY_DIRS_DEP)\n      list(APPEND REQUIRED_LIBDIRS \"${STARPU_LIBRARY_DIRS_DEP}\")\n    elseif(STARPU_LIBRARY_DIRS)\n      list(APPEND REQUIRED_LIBDIRS \"${STARPU_LIBRARY_DIRS}\")\n    endif()\n    if (STARPU_LIBRARIES_DEP)\n      list(APPEND REQUIRED_LIBS \"${STARPU_LIBRARIES_DEP}\")\n    elseif (STARPU_LIBRARIES)\n      foreach(lib ${STARPU_LIBRARIES})\n\tif (EXISTS ${lib} OR ${lib} MATCHES \"^-\")\n\t  list(APPEND REQUIRED_LIBS \"${lib}\")\n\telse()\n\t  list(APPEND REQUIRED_LIBS \"-l${lib}\")\n\tendif()\n      endforeach()\n    endif()\n  endif()\n  # CUDA\n  if (PASTIX_LOOK_FOR_STARPU_CUDA AND CUDA_FOUND)\n    if (CUDA_INCLUDE_DIRS)\n      list(APPEND REQUIRED_INCDIRS \"${CUDA_INCLUDE_DIRS}\")\n    endif()\n    foreach(libdir ${CUDA_LIBRARY_DIRS})\n      if (libdir)\n\tlist(APPEND REQUIRED_LIBDIRS \"${libdir}\")\n      endif()\n    endforeach()\n    list(APPEND REQUIRED_LIBS \"${CUDA_CUBLAS_LIBRARIES};${CUDA_LIBRARIES}\")\n  endif()\n  # MPI\n  if (PASTIX_LOOK_FOR_MPI AND MPI_FOUND)\n    if (MPI_C_INCLUDE_PATH)\n      list(APPEND REQUIRED_INCDIRS \"${MPI_C_INCLUDE_PATH}\")\n    endif()\n    if (MPI_C_LINK_FLAGS)\n      if (${MPI_C_LINK_FLAGS} MATCHES \"  -\")\n\tstring(REGEX REPLACE \" -\" \"-\" MPI_C_LINK_FLAGS ${MPI_C_LINK_FLAGS})\n      endif()\n      list(APPEND REQUIRED_LDFLAGS \"${MPI_C_LINK_FLAGS}\")\n    endif()\n    list(APPEND REQUIRED_LIBS \"${MPI_C_LIBRARIES}\")\n  endif()\n  # HWLOC\n  if (HWLOC_FOUND)\n    if (HWLOC_INCLUDE_DIRS)\n      list(APPEND REQUIRED_INCDIRS \"${HWLOC_INCLUDE_DIRS}\")\n    endif()\n    foreach(libdir ${HWLOC_LIBRARY_DIRS})\n      if (libdir)\n\tlist(APPEND REQUIRED_LIBDIRS \"${libdir}\")\n      endif()\n    endforeach()\n    foreach(lib ${HWLOC_LIBRARIES})\n      if (EXISTS ${lib} OR ${lib} MATCHES \"^-\")\n\tlist(APPEND REQUIRED_LIBS \"${lib}\")\n      else()\n\tlist(APPEND REQUIRED_LIBS \"-l${lib}\")\n      endif()\n    endforeach()\n  endif()\n  # BLAS\n  if (BLAS_FOUND)\n    if (BLAS_INCLUDE_DIRS)\n      list(APPEND REQUIRED_INCDIRS \"${BLAS_INCLUDE_DIRS}\")\n    endif()\n    foreach(libdir ${BLAS_LIBRARY_DIRS})\n      if (libdir)\n\tlist(APPEND REQUIRED_LIBDIRS \"${libdir}\")\n      endif()\n    endforeach()\n    list(APPEND REQUIRED_LIBS \"${BLAS_LIBRARIES}\")\n    if (BLAS_LINKER_FLAGS)\n      list(APPEND REQUIRED_LDFLAGS \"${BLAS_LINKER_FLAGS}\")\n    endif()\n  endif()\n  # SCOTCH\n  if (PASTIX_LOOK_FOR_SCOTCH AND SCOTCH_FOUND)\n    if (SCOTCH_INCLUDE_DIRS)\n      list(APPEND REQUIRED_INCDIRS \"${SCOTCH_INCLUDE_DIRS}\")\n    endif()\n    foreach(libdir ${SCOTCH_LIBRARY_DIRS})\n      if (libdir)\n\tlist(APPEND REQUIRED_LIBDIRS \"${libdir}\")\n      endif()\n    endforeach()\n    list(APPEND REQUIRED_LIBS \"${SCOTCH_LIBRARIES}\")\n  endif()\n  # PTSCOTCH\n  if (PASTIX_LOOK_FOR_PTSCOTCH AND PTSCOTCH_FOUND)\n    if (PTSCOTCH_INCLUDE_DIRS)\n      list(APPEND REQUIRED_INCDIRS \"${PTSCOTCH_INCLUDE_DIRS}\")\n    endif()\n    foreach(libdir ${PTSCOTCH_LIBRARY_DIRS})\n      if (libdir)\n\tlist(APPEND REQUIRED_LIBDIRS \"${libdir}\")\n      endif()\n    endforeach()\n    list(APPEND REQUIRED_LIBS \"${PTSCOTCH_LIBRARIES}\")\n  endif()\n  # METIS\n  if (PASTIX_LOOK_FOR_METIS AND METIS_FOUND)\n    if (METIS_INCLUDE_DIRS)\n      list(APPEND REQUIRED_INCDIRS \"${METIS_INCLUDE_DIRS}\")\n    endif()\n    foreach(libdir ${METIS_LIBRARY_DIRS})\n      if (libdir)\n\tlist(APPEND REQUIRED_LIBDIRS \"${libdir}\")\n      endif()\n    endforeach()\n    list(APPEND REQUIRED_LIBS \"${METIS_LIBRARIES}\")\n  endif()\n  # Fortran\n  if (CMAKE_C_COMPILER_ID MATCHES \"GNU\")\n    find_library(\n      FORTRAN_gfortran_LIBRARY\n      NAMES gfortran\n      HINTS ${_lib_env}\n      )\n    mark_as_advanced(FORTRAN_gfortran_LIBRARY)\n    if (FORTRAN_gfortran_LIBRARY)\n      list(APPEND REQUIRED_LIBS \"${FORTRAN_gfortran_LIBRARY}\")\n    endif()\n  elseif (CMAKE_C_COMPILER_ID MATCHES \"Intel\")\n    find_library(\n      FORTRAN_ifcore_LIBRARY\n      NAMES ifcore\n      HINTS ${_lib_env}\n      )\n    mark_as_advanced(FORTRAN_ifcore_LIBRARY)\n    if (FORTRAN_ifcore_LIBRARY)\n      list(APPEND REQUIRED_LIBS \"${FORTRAN_ifcore_LIBRARY}\")\n    endif()\n  endif()\n  # EXTRA LIBS such that pthread, m, rt\n  list(APPEND REQUIRED_LIBS ${PASTIX_EXTRA_LIBRARIES})\n\n  # set required libraries for link\n  set(CMAKE_REQUIRED_INCLUDES \"${REQUIRED_INCDIRS}\")\n  set(CMAKE_REQUIRED_LIBRARIES)\n  list(APPEND CMAKE_REQUIRED_LIBRARIES \"${REQUIRED_LDFLAGS}\")\n  foreach(lib_dir ${REQUIRED_LIBDIRS})\n    list(APPEND CMAKE_REQUIRED_LIBRARIES \"-L${lib_dir}\")\n  endforeach()\n  list(APPEND CMAKE_REQUIRED_LIBRARIES \"${REQUIRED_LIBS}\")\n  list(APPEND CMAKE_REQUIRED_FLAGS \"${REQUIRED_FLAGS}\")\n  string(REGEX REPLACE \"^ -\" \"-\" CMAKE_REQUIRED_LIBRARIES \"${CMAKE_REQUIRED_LIBRARIES}\")\n\n  # test link\n  unset(PASTIX_WORKS CACHE)\n  include(CheckFunctionExists)\n  check_function_exists(pastix PASTIX_WORKS)\n  mark_as_advanced(PASTIX_WORKS)\n\n  if(PASTIX_WORKS)\n    # save link with dependencies\n    set(PASTIX_LIBRARIES_DEP \"${REQUIRED_LIBS}\")\n    set(PASTIX_LIBRARY_DIRS_DEP \"${REQUIRED_LIBDIRS}\")\n    set(PASTIX_INCLUDE_DIRS_DEP \"${REQUIRED_INCDIRS}\")\n    set(PASTIX_LINKER_FLAGS \"${REQUIRED_LDFLAGS}\")\n    list(REMOVE_DUPLICATES PASTIX_LIBRARY_DIRS_DEP)\n    list(REMOVE_DUPLICATES PASTIX_INCLUDE_DIRS_DEP)\n    list(REMOVE_DUPLICATES PASTIX_LINKER_FLAGS)\n  else()\n    if(NOT PASTIX_FIND_QUIETLY)\n      message(STATUS \"Looking for PASTIX : test of pastix() fails\")\n      message(STATUS \"CMAKE_REQUIRED_LIBRARIES: ${CMAKE_REQUIRED_LIBRARIES}\")\n      message(STATUS \"CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}\")\n      message(STATUS \"Check in CMakeFiles/CMakeError.log to figure out why it fails\")\n      message(STATUS \"Maybe PASTIX is linked with specific libraries. \"\n\t\"Have you tried with COMPONENTS (MPI/SEQ, STARPU, STARPU_CUDA, SCOTCH, PTSCOTCH, METIS)? \"\n\t\"See the explanation in FindPASTIX.cmake.\")\n    endif()\n  endif()\n  set(CMAKE_REQUIRED_INCLUDES)\n  set(CMAKE_REQUIRED_FLAGS)\n  set(CMAKE_REQUIRED_LIBRARIES)\nendif()\n\nif (PASTIX_LIBRARIES)\n  list(GET PASTIX_LIBRARIES 0 first_lib)\n  get_filename_component(first_lib_path \"${first_lib}\" PATH)\n  if (${first_lib_path} MATCHES \"/lib(32|64)?$\")\n    string(REGEX REPLACE \"/lib(32|64)?$\" \"\" not_cached_dir \"${first_lib_path}\")\n    set(PASTIX_DIR_FOUND \"${not_cached_dir}\" CACHE PATH \"Installation directory of PASTIX library\" FORCE)\n  else()\n    set(PASTIX_DIR_FOUND \"${first_lib_path}\" CACHE PATH \"Installation directory of PASTIX library\" FORCE)\n  endif()\nendif()\nmark_as_advanced(PASTIX_DIR)\nmark_as_advanced(PASTIX_DIR_FOUND)\n\n# check that PASTIX has been found\n# ---------------------------------\ninclude(FindPackageHandleStandardArgs)\nfind_package_handle_standard_args(PASTIX DEFAULT_MSG\n  PASTIX_LIBRARIES\n  PASTIX_WORKS)\n"
  },
  {
    "path": "3rdparty/eigen3/cmake/FindSPQR.cmake",
    "content": "# SPQR lib usually requires linking to a blas and lapack library.\n# It is up to the user of this module to find a BLAS and link to it.\n\n# SPQR lib requires Cholmod, colamd and amd as well. \n# FindCholmod.cmake can be used to find those packages before finding spqr\n\nif (SPQR_INCLUDES AND SPQR_LIBRARIES)\n  set(SPQR_FIND_QUIETLY TRUE)\nendif ()\n\nfind_path(SPQR_INCLUDES\n  NAMES\n  SuiteSparseQR.hpp\n  PATHS\n  $ENV{SPQRDIR}\n  ${INCLUDE_INSTALL_DIR}\n  PATH_SUFFIXES\n  suitesparse\n  ufsparse\n)\n\nfind_library(SPQR_LIBRARIES spqr $ENV{SPQRDIR} ${LIB_INSTALL_DIR})\n\nif(SPQR_LIBRARIES)\n\n  find_library(SUITESPARSE_LIBRARY SuiteSparse PATHS $ENV{SPQRDIR} ${LIB_INSTALL_DIR})\n  if (SUITESPARSE_LIBRARY)\n    set(SPQR_LIBRARIES ${SPQR_LIBRARIES} ${SUITESPARSE_LIBRARY})\n  endif()\n\n  find_library(CHOLMOD_LIBRARY cholmod PATHS $ENV{UMFPACK_LIBDIR} $ENV{UMFPACKDIR} ${LIB_INSTALL_DIR})\n  if(CHOLMOD_LIBRARY)\n    set(SPQR_LIBRARIES ${SPQR_LIBRARIES} ${CHOLMOD_LIBRARY})\n  endif()\n  \nendif()\n\ninclude(FindPackageHandleStandardArgs)\nfind_package_handle_standard_args(SPQR DEFAULT_MSG SPQR_INCLUDES SPQR_LIBRARIES)\n\nmark_as_advanced(SPQR_INCLUDES SPQR_LIBRARIES)"
  },
  {
    "path": "3rdparty/eigen3/cmake/FindScotch.cmake",
    "content": "###\n#\n# @copyright (c) 2009-2014 The University of Tennessee and The University\n#                          of Tennessee Research Foundation.\n#                          All rights reserved.\n# @copyright (c) 2012-2014 Inria. All rights reserved.\n# @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.\n#\n###\n#\n# - Find SCOTCH include dirs and libraries\n# Use this module by invoking find_package with the form:\n#  find_package(SCOTCH\n#               [REQUIRED]             # Fail with error if scotch is not found\n#               [COMPONENTS <comp1> <comp2> ...] # dependencies\n#              )\n#\n#  COMPONENTS can be some of the following:\n#   - ESMUMPS: to activate detection of Scotch with the esmumps interface\n#\n# This module finds headers and scotch library.\n# Results are reported in variables:\n#  SCOTCH_FOUND           - True if headers and requested libraries were found\n#  SCOTCH_INCLUDE_DIRS    - scotch include directories\n#  SCOTCH_LIBRARY_DIRS    - Link directories for scotch libraries\n#  SCOTCH_LIBRARIES       - scotch component libraries to be linked\n#  SCOTCH_INTSIZE         - Number of octets occupied by a SCOTCH_Num\n#\n# The user can give specific paths where to find the libraries adding cmake\n# options at configure (ex: cmake path/to/project -DSCOTCH=path/to/scotch):\n#  SCOTCH_DIR             - Where to find the base directory of scotch\n#  SCOTCH_INCDIR          - Where to find the header files\n#  SCOTCH_LIBDIR          - Where to find the library files\n# The module can also look for the following environment variables if paths\n# are not given as cmake variable: SCOTCH_DIR, SCOTCH_INCDIR, SCOTCH_LIBDIR\n\n#=============================================================================\n# Copyright 2012-2013 Inria\n# Copyright 2012-2013 Emmanuel Agullo\n# Copyright 2012-2013 Mathieu Faverge\n# Copyright 2012      Cedric Castagnede\n# Copyright 2013      Florent Pruvost\n#\n# Distributed under the OSI-approved BSD License (the \"License\");\n# see accompanying file MORSE-Copyright.txt for details.\n#\n# This software is distributed WITHOUT ANY WARRANTY; without even the\n# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n# See the License for more information.\n#=============================================================================\n# (To distribute this file outside of Morse, substitute the full\n#  License text for the above reference.)\n\nif (NOT SCOTCH_FOUND)\n  set(SCOTCH_DIR \"\" CACHE PATH \"Installation directory of SCOTCH library\")\n  if (NOT SCOTCH_FIND_QUIETLY)\n    message(STATUS \"A cache variable, namely SCOTCH_DIR, has been set to specify the install directory of SCOTCH\")\n  endif()\nendif()\n\n# Set the version to find\nset(SCOTCH_LOOK_FOR_ESMUMPS OFF)\n\nif( SCOTCH_FIND_COMPONENTS )\n  foreach( component ${SCOTCH_FIND_COMPONENTS} )\n    if (${component} STREQUAL \"ESMUMPS\")\n      # means we look for esmumps library\n      set(SCOTCH_LOOK_FOR_ESMUMPS ON)\n    endif()\n  endforeach()\nendif()\n\n# SCOTCH may depend on Threads, try to find it\nif (NOT THREADS_FOUND)\n  if (SCOTCH_FIND_REQUIRED)\n    find_package(Threads REQUIRED)\n  else()\n    find_package(Threads)\n  endif()\nendif()\n\n# Looking for include\n# -------------------\n\n# Add system include paths to search include\n# ------------------------------------------\nunset(_inc_env)\nset(ENV_SCOTCH_DIR \"$ENV{SCOTCH_DIR}\")\nset(ENV_SCOTCH_INCDIR \"$ENV{SCOTCH_INCDIR}\")\nif(ENV_SCOTCH_INCDIR)\n  list(APPEND _inc_env \"${ENV_SCOTCH_INCDIR}\")\nelseif(ENV_SCOTCH_DIR)\n  list(APPEND _inc_env \"${ENV_SCOTCH_DIR}\")\n  list(APPEND _inc_env \"${ENV_SCOTCH_DIR}/include\")\n  list(APPEND _inc_env \"${ENV_SCOTCH_DIR}/include/scotch\")\nelse()\n  if(WIN32)\n    string(REPLACE \":\" \";\" _inc_env \"$ENV{INCLUDE}\")\n  else()\n    string(REPLACE \":\" \";\" _path_env \"$ENV{INCLUDE}\")\n    list(APPEND _inc_env \"${_path_env}\")\n    string(REPLACE \":\" \";\" _path_env \"$ENV{C_INCLUDE_PATH}\")\n    list(APPEND _inc_env \"${_path_env}\")\n    string(REPLACE \":\" \";\" _path_env \"$ENV{CPATH}\")\n    list(APPEND _inc_env \"${_path_env}\")\n    string(REPLACE \":\" \";\" _path_env \"$ENV{INCLUDE_PATH}\")\n    list(APPEND _inc_env \"${_path_env}\")\n  endif()\nendif()\nlist(APPEND _inc_env \"${CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES}\")\nlist(APPEND _inc_env \"${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES}\")\nlist(REMOVE_DUPLICATES _inc_env)\n\n\n# Try to find the scotch header in the given paths\n# -------------------------------------------------\n# call cmake macro to find the header path\nif(SCOTCH_INCDIR)\n  set(SCOTCH_scotch.h_DIRS \"SCOTCH_scotch.h_DIRS-NOTFOUND\")\n  find_path(SCOTCH_scotch.h_DIRS\n    NAMES scotch.h\n    HINTS ${SCOTCH_INCDIR})\nelse()\n  if(SCOTCH_DIR)\n    set(SCOTCH_scotch.h_DIRS \"SCOTCH_scotch.h_DIRS-NOTFOUND\")\n    find_path(SCOTCH_scotch.h_DIRS\n      NAMES scotch.h\n      HINTS ${SCOTCH_DIR}\n      PATH_SUFFIXES \"include\" \"include/scotch\")\n  else()\n    set(SCOTCH_scotch.h_DIRS \"SCOTCH_scotch.h_DIRS-NOTFOUND\")\n    find_path(SCOTCH_scotch.h_DIRS\n      NAMES scotch.h\n      HINTS ${_inc_env}\n      PATH_SUFFIXES \"scotch\")\n  endif()\nendif()\nmark_as_advanced(SCOTCH_scotch.h_DIRS)\n\n# If found, add path to cmake variable\n# ------------------------------------\nif (SCOTCH_scotch.h_DIRS)\n  set(SCOTCH_INCLUDE_DIRS \"${SCOTCH_scotch.h_DIRS}\")\nelse ()\n  set(SCOTCH_INCLUDE_DIRS \"SCOTCH_INCLUDE_DIRS-NOTFOUND\")\n  if (NOT SCOTCH_FIND_QUIETLY)\n    message(STATUS \"Looking for scotch -- scotch.h not found\")\n  endif()\nendif()\nlist(REMOVE_DUPLICATES SCOTCH_INCLUDE_DIRS)\n\n# Looking for lib\n# ---------------\n\n# Add system library paths to search lib\n# --------------------------------------\nunset(_lib_env)\nset(ENV_SCOTCH_LIBDIR \"$ENV{SCOTCH_LIBDIR}\")\nif(ENV_SCOTCH_LIBDIR)\n  list(APPEND _lib_env \"${ENV_SCOTCH_LIBDIR}\")\nelseif(ENV_SCOTCH_DIR)\n  list(APPEND _lib_env \"${ENV_SCOTCH_DIR}\")\n  list(APPEND _lib_env \"${ENV_SCOTCH_DIR}/lib\")\nelse()\n  if(WIN32)\n    string(REPLACE \":\" \";\" _lib_env \"$ENV{LIB}\")\n  else()\n    if(APPLE)\n      string(REPLACE \":\" \";\" _lib_env \"$ENV{DYLD_LIBRARY_PATH}\")\n    else()\n      string(REPLACE \":\" \";\" _lib_env \"$ENV{LD_LIBRARY_PATH}\")\n    endif()\n    list(APPEND _lib_env \"${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}\")\n    list(APPEND _lib_env \"${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}\")\n  endif()\nendif()\nlist(REMOVE_DUPLICATES _lib_env)\n\n# Try to find the scotch lib in the given paths\n# ----------------------------------------------\n\nset(SCOTCH_libs_to_find \"scotch;scotcherrexit\")\nif (SCOTCH_LOOK_FOR_ESMUMPS)\n  list(INSERT SCOTCH_libs_to_find 0 \"esmumps\")\nendif()\n\n# call cmake macro to find the lib path\nif(SCOTCH_LIBDIR)\n  foreach(scotch_lib ${SCOTCH_libs_to_find})\n    set(SCOTCH_${scotch_lib}_LIBRARY \"SCOTCH_${scotch_lib}_LIBRARY-NOTFOUND\")\n    find_library(SCOTCH_${scotch_lib}_LIBRARY\n      NAMES ${scotch_lib}\n      HINTS ${SCOTCH_LIBDIR})\n  endforeach()\nelse()\n  if(SCOTCH_DIR)\n    foreach(scotch_lib ${SCOTCH_libs_to_find})\n      set(SCOTCH_${scotch_lib}_LIBRARY \"SCOTCH_${scotch_lib}_LIBRARY-NOTFOUND\")\n      find_library(SCOTCH_${scotch_lib}_LIBRARY\n\tNAMES ${scotch_lib}\n\tHINTS ${SCOTCH_DIR}\n\tPATH_SUFFIXES lib lib32 lib64)\n    endforeach()\n  else()\n    foreach(scotch_lib ${SCOTCH_libs_to_find})\n      set(SCOTCH_${scotch_lib}_LIBRARY \"SCOTCH_${scotch_lib}_LIBRARY-NOTFOUND\")\n      find_library(SCOTCH_${scotch_lib}_LIBRARY\n\tNAMES ${scotch_lib}\n\tHINTS ${_lib_env})\n    endforeach()\n  endif()\nendif()\n\nset(SCOTCH_LIBRARIES \"\")\nset(SCOTCH_LIBRARY_DIRS \"\")\n# If found, add path to cmake variable\n# ------------------------------------\nforeach(scotch_lib ${SCOTCH_libs_to_find})\n\n  if (SCOTCH_${scotch_lib}_LIBRARY)\n    get_filename_component(${scotch_lib}_lib_path \"${SCOTCH_${scotch_lib}_LIBRARY}\" PATH)\n    # set cmake variables\n    list(APPEND SCOTCH_LIBRARIES \"${SCOTCH_${scotch_lib}_LIBRARY}\")\n    list(APPEND SCOTCH_LIBRARY_DIRS \"${${scotch_lib}_lib_path}\")\n  else ()\n    list(APPEND SCOTCH_LIBRARIES \"${SCOTCH_${scotch_lib}_LIBRARY}\")\n    if (NOT SCOTCH_FIND_QUIETLY)\n      message(STATUS \"Looking for scotch -- lib ${scotch_lib} not found\")\n    endif()\n  endif ()\n\n  mark_as_advanced(SCOTCH_${scotch_lib}_LIBRARY)\n\nendforeach()\nlist(REMOVE_DUPLICATES SCOTCH_LIBRARY_DIRS)\n\n# check a function to validate the find\nif(SCOTCH_LIBRARIES)\n\n  set(REQUIRED_INCDIRS)\n  set(REQUIRED_LIBDIRS)\n  set(REQUIRED_LIBS)\n\n  # SCOTCH\n  if (SCOTCH_INCLUDE_DIRS)\n    set(REQUIRED_INCDIRS  \"${SCOTCH_INCLUDE_DIRS}\")\n  endif()\n  if (SCOTCH_LIBRARY_DIRS)\n    set(REQUIRED_LIBDIRS \"${SCOTCH_LIBRARY_DIRS}\")\n  endif()\n  set(REQUIRED_LIBS \"${SCOTCH_LIBRARIES}\")\n  # THREADS\n  if(CMAKE_THREAD_LIBS_INIT)\n    list(APPEND REQUIRED_LIBS \"${CMAKE_THREAD_LIBS_INIT}\")\n  endif()\n  set(Z_LIBRARY \"Z_LIBRARY-NOTFOUND\")\n  find_library(Z_LIBRARY NAMES z)\n  mark_as_advanced(Z_LIBRARY)\n  if(Z_LIBRARY)\n    list(APPEND REQUIRED_LIBS \"-lz\")\n  endif()\n  set(M_LIBRARY \"M_LIBRARY-NOTFOUND\")\n  find_library(M_LIBRARY NAMES m)\n  mark_as_advanced(M_LIBRARY)\n  if(M_LIBRARY)\n    list(APPEND REQUIRED_LIBS \"-lm\")\n  endif()\n  set(RT_LIBRARY \"RT_LIBRARY-NOTFOUND\")\n  find_library(RT_LIBRARY NAMES rt)\n  mark_as_advanced(RT_LIBRARY)\n  if(RT_LIBRARY)\n    list(APPEND REQUIRED_LIBS \"-lrt\")\n  endif()\n\n  # set required libraries for link\n  set(CMAKE_REQUIRED_INCLUDES \"${REQUIRED_INCDIRS}\")\n  set(CMAKE_REQUIRED_LIBRARIES)\n  foreach(lib_dir ${REQUIRED_LIBDIRS})\n    list(APPEND CMAKE_REQUIRED_LIBRARIES \"-L${lib_dir}\")\n  endforeach()\n  list(APPEND CMAKE_REQUIRED_LIBRARIES \"${REQUIRED_LIBS}\")\n  string(REGEX REPLACE \"^ -\" \"-\" CMAKE_REQUIRED_LIBRARIES \"${CMAKE_REQUIRED_LIBRARIES}\")\n\n  # test link\n  unset(SCOTCH_WORKS CACHE)\n  include(CheckFunctionExists)\n  check_function_exists(SCOTCH_graphInit SCOTCH_WORKS)\n  mark_as_advanced(SCOTCH_WORKS)\n\n  if(SCOTCH_WORKS)\n    # save link with dependencies\n    set(SCOTCH_LIBRARIES \"${REQUIRED_LIBS}\")\n  else()\n    if(NOT SCOTCH_FIND_QUIETLY)\n      message(STATUS \"Looking for SCOTCH : test of SCOTCH_graphInit with SCOTCH library fails\")\n      message(STATUS \"CMAKE_REQUIRED_LIBRARIES: ${CMAKE_REQUIRED_LIBRARIES}\")\n      message(STATUS \"CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}\")\n      message(STATUS \"Check in CMakeFiles/CMakeError.log to figure out why it fails\")\n    endif()\n  endif()\n  set(CMAKE_REQUIRED_INCLUDES)\n  set(CMAKE_REQUIRED_FLAGS)\n  set(CMAKE_REQUIRED_LIBRARIES)\nendif()\n\nif (SCOTCH_LIBRARIES)\n  list(GET SCOTCH_LIBRARIES 0 first_lib)\n  get_filename_component(first_lib_path \"${first_lib}\" PATH)\n  if (${first_lib_path} MATCHES \"/lib(32|64)?$\")\n    string(REGEX REPLACE \"/lib(32|64)?$\" \"\" not_cached_dir \"${first_lib_path}\")\n    set(SCOTCH_DIR_FOUND \"${not_cached_dir}\" CACHE PATH \"Installation directory of SCOTCH library\" FORCE)\n  else()\n    set(SCOTCH_DIR_FOUND \"${first_lib_path}\" CACHE PATH \"Installation directory of SCOTCH library\" FORCE)\n  endif()\nendif()\nmark_as_advanced(SCOTCH_DIR)\nmark_as_advanced(SCOTCH_DIR_FOUND)\n\n# Check the size of SCOTCH_Num\n# ---------------------------------\nset(CMAKE_REQUIRED_INCLUDES ${SCOTCH_INCLUDE_DIRS})\n\ninclude(CheckCSourceRuns)\n#stdio.h and stdint.h should be included by scotch.h directly\nset(SCOTCH_C_TEST_SCOTCH_Num_4 \"\n#include <stdio.h>\n#include <stdint.h>\n#include <scotch.h>\nint main(int argc, char **argv) {\n  if (sizeof(SCOTCH_Num) == 4)\n    return 0;\n  else\n    return 1;\n}\n\")\n\nset(SCOTCH_C_TEST_SCOTCH_Num_8 \"\n#include <stdio.h>\n#include <stdint.h>\n#include <scotch.h>\nint main(int argc, char **argv) {\n  if (sizeof(SCOTCH_Num) == 8)\n    return 0;\n  else\n    return 1;\n}\n\")\ncheck_c_source_runs(\"${SCOTCH_C_TEST_SCOTCH_Num_4}\" SCOTCH_Num_4)\nif(NOT SCOTCH_Num_4)\n  check_c_source_runs(\"${SCOTCH_C_TEST_SCOTCH_Num_8}\" SCOTCH_Num_8)\n  if(NOT SCOTCH_Num_8)\n    set(SCOTCH_INTSIZE -1)\n  else()\n    set(SCOTCH_INTSIZE 8)\n  endif()\nelse()\n  set(SCOTCH_INTSIZE 4)\nendif()\nset(CMAKE_REQUIRED_INCLUDES \"\")\n\n# check that SCOTCH has been found\n# ---------------------------------\ninclude(FindPackageHandleStandardArgs)\nfind_package_handle_standard_args(SCOTCH DEFAULT_MSG\n  SCOTCH_LIBRARIES\n  SCOTCH_WORKS)\n#\n# TODO: Add possibility to check for specific functions in the library\n#\n"
  },
  {
    "path": "3rdparty/eigen3/cmake/FindStandardMathLibrary.cmake",
    "content": "# - Try to find how to link to the standard math library, if anything at all is needed to do.\n# On most platforms this is automatic, but for example it's not automatic on QNX.\n#\n# Once done this will define\n#\n#  STANDARD_MATH_LIBRARY_FOUND - we found how to successfully link to the standard math library\n#  STANDARD_MATH_LIBRARY - the name of the standard library that one has to link to.\n#                            -- this will be left empty if it's automatic (most platforms).\n#                            -- this will be set to \"m\" on platforms where one must explicitly\n#                               pass the \"-lm\" linker flag.\n#\n# Copyright (c) 2010 Benoit Jacob <jacob.benoit.1@gmail.com>\n# Redistribution and use is allowed according to the terms of the 2-clause BSD license.\n\n\ninclude(CheckCXXSourceCompiles)\n\n# a little test program for c++ math functions.\n# notice the std:: is required on some platforms such as QNX\n\nset(find_standard_math_library_test_program\n\"#include<cmath>\nint main() { std::sin(0.0); std::log(0.0f); }\")\n\n# first try compiling/linking the test program without any linker flags\n\nset(CMAKE_REQUIRED_FLAGS \"\")\nset(CMAKE_REQUIRED_LIBRARIES \"\")\nCHECK_CXX_SOURCE_COMPILES(\n  \"${find_standard_math_library_test_program}\"\n  standard_math_library_linked_to_automatically\n)\n\nif(standard_math_library_linked_to_automatically)\n\n  # the test program linked successfully without any linker flag.\n  set(STANDARD_MATH_LIBRARY \"\")\n  set(STANDARD_MATH_LIBRARY_FOUND TRUE)\n\nelse()\n\n  # the test program did not link successfully without any linker flag.\n  # This is a very uncommon case that so far we only saw on QNX. The next try is the\n  # standard name 'm' for the standard math library.\n\n  set(CMAKE_REQUIRED_LIBRARIES \"m\")\n  CHECK_CXX_SOURCE_COMPILES(\n    \"${find_standard_math_library_test_program}\"\n    standard_math_library_linked_to_as_m)\n\n  if(standard_math_library_linked_to_as_m)\n\n    # the test program linked successfully when linking to the 'm' library\n    set(STANDARD_MATH_LIBRARY \"m\")\n    set(STANDARD_MATH_LIBRARY_FOUND TRUE)\n\n  else()\n\n    # the test program still doesn't link successfully\n    set(STANDARD_MATH_LIBRARY_FOUND FALSE)\n\n  endif()\n\nendif()\n"
  },
  {
    "path": "3rdparty/eigen3/cmake/FindSuperLU.cmake",
    "content": "\n# Umfpack lib usually requires linking to a blas library.\n# It is up to the user of this module to find a BLAS and link to it.\n\nif (SUPERLU_INCLUDES AND SUPERLU_LIBRARIES)\n  set(SUPERLU_FIND_QUIETLY TRUE)\nendif ()\n\nfind_path(SUPERLU_INCLUDES\n  NAMES\n  supermatrix.h\n  PATHS\n  $ENV{SUPERLUDIR}\n  ${INCLUDE_INSTALL_DIR}\n  PATH_SUFFIXES\n  superlu\n  SRC\n)\n\nfind_library(SUPERLU_LIBRARIES\n  NAMES \"superlu_5.2.1\" \"superlu_5.2\" \"superlu_5.1.1\" \"superlu_5.1\" \"superlu_5.0\" \"superlu_4.3\" \"superlu_4.2\" \"superlu_4.1\" \"superlu_4.0\" \"superlu_3.1\" \"superlu_3.0\" \"superlu\"\n  PATHS $ENV{SUPERLUDIR} ${LIB_INSTALL_DIR}\n  PATH_SUFFIXES lib)\n\nif(SUPERLU_INCLUDES AND SUPERLU_LIBRARIES)\n\ninclude(CheckCXXSourceCompiles)\ninclude(CMakePushCheckState)\ncmake_push_check_state()\n\nset(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${SUPERLU_INCLUDES})\n\n# check whether struct mem_usage_t is globally defined\ncheck_cxx_source_compiles(\"\ntypedef int int_t;\n#include <supermatrix.h>\n#include <slu_util.h>\nint main() {\n  mem_usage_t mem;\n  return 0;\n}\"\nSUPERLU_HAS_GLOBAL_MEM_USAGE_T)\n\n\ncheck_cxx_source_compiles(\"\ntypedef int int_t;\n#include <supermatrix.h>\n#include <superlu_enum_consts.h>\nint main() {\n  return SLU_SINGLE;\n}\"\nSUPERLU_HAS_CLEAN_ENUMS)\n\ncheck_cxx_source_compiles(\"\ntypedef int int_t;\n#include <supermatrix.h>\n#include <slu_util.h>\nint main(void)\n{\n  GlobalLU_t glu;\n  return 0;\n}\"\nSUPERLU_HAS_GLOBALLU_T)\n\nif(SUPERLU_HAS_GLOBALLU_T)\n  # at least 5.0\n  set(SUPERLU_VERSION_VAR \"5.0\")\nelseif(SUPERLU_HAS_CLEAN_ENUMS)\n  # at least 4.3\n  set(SUPERLU_VERSION_VAR \"4.3\")\nelseif(SUPERLU_HAS_GLOBAL_MEM_USAGE_T)\n  # at least 4.0\n  set(SUPERLU_VERSION_VAR \"4.0\")\nelse()\n  set(SUPERLU_VERSION_VAR \"3.0\")\nendif()\n\ncmake_pop_check_state()\n\nif(SuperLU_FIND_VERSION)\n  if(${SUPERLU_VERSION_VAR} VERSION_LESS ${SuperLU_FIND_VERSION})\n    set(SUPERLU_VERSION_OK FALSE)\n  else()\n    set(SUPERLU_VERSION_OK TRUE)\n  endif()\nelse()\n  set(SUPERLU_VERSION_OK TRUE)\nendif()\n\nendif()\n\ninclude(FindPackageHandleStandardArgs)\nfind_package_handle_standard_args(SUPERLU\n                                  REQUIRED_VARS SUPERLU_INCLUDES SUPERLU_LIBRARIES SUPERLU_VERSION_OK\n                                  VERSION_VAR SUPERLU_VERSION_VAR)\n\nmark_as_advanced(SUPERLU_INCLUDES SUPERLU_LIBRARIES)\n"
  },
  {
    "path": "3rdparty/eigen3/cmake/FindTriSYCL.cmake",
    "content": "#.rst:\n# FindTriSYCL\n#---------------\n#\n# TODO : insert Copyright and licence\n\n#########################\n#  FindTriSYCL.cmake\n#########################\n#\n#  Tools for finding and building with TriSYCL.\n#\n#  User must define TRISYCL_INCLUDE_DIR pointing to the triSYCL\n#  include directory.\n#\n#  Latest version of this file can be found at:\n#    https://github.com/triSYCL/triSYCL\n\n# Requite CMake version 3.5 or higher\ncmake_minimum_required (VERSION 3.5)\n\n# Check that a supported host compiler can be found\nif(CMAKE_COMPILER_IS_GNUCXX)\n  # Require at least gcc 5.4\n  if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.4)\n    message(FATAL_ERROR\n      \"host compiler - Not found! (gcc version must be at least 5.4)\")\n  else()\n    message(STATUS \"host compiler - gcc ${CMAKE_CXX_COMPILER_VERSION}\")\n  endif()\nelseif (\"${CMAKE_CXX_COMPILER_ID}\" STREQUAL \"Clang\")\n  # Require at least clang 3.9\n  if (${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 3.9)\n    message(FATAL_ERROR\n      \"host compiler - Not found! (clang version must be at least 3.9)\")\n  else()\n    message(STATUS \"host compiler - clang ${CMAKE_CXX_COMPILER_VERSION}\")\n  endif()\nelse()\n  message(WARNING\n    \"host compiler - Not found! (triSYCL supports GCC and Clang)\")\nendif()\n\n#triSYCL options\noption(TRISYCL_OPENMP \"triSYCL multi-threading with OpenMP\" ON)\noption(TRISYCL_OPENCL \"triSYCL OpenCL interoperability mode\" OFF)\noption(TRISYCL_NO_ASYNC \"triSYCL use synchronous kernel execution\" OFF)\noption(TRISYCL_DEBUG \"triSCYL use debug mode\" OFF)\noption(TRISYCL_DEBUG_STRUCTORS \"triSYCL trace of object lifetimes\" OFF)\noption(TRISYCL_TRACE_KERNEL \"triSYCL trace of kernel execution\" OFF)\n\nmark_as_advanced(TRISYCL_OPENMP)\nmark_as_advanced(TRISYCL_OPENCL)\nmark_as_advanced(TRISYCL_NO_ASYNC)\nmark_as_advanced(TRISYCL_DEBUG)\nmark_as_advanced(TRISYCL_DEBUG_STRUCTORS)\nmark_as_advanced(TRISYCL_TRACE_KERNEL)\n\n#triSYCL definitions\nset(CL_SYCL_LANGUAGE_VERSION 220 CACHE VERSION\n  \"Host language version to be used by trisYCL (default is: 220)\")\nset(TRISYCL_CL_LANGUAGE_VERSION 220 CACHE VERSION\n  \"Device language version to be used by trisYCL (default is: 220)\")\n#set(TRISYCL_COMPILE_OPTIONS \"-std=c++1z -Wall -Wextra\")\nset(CMAKE_CXX_STANDARD 14)\nset(CXX_STANDARD_REQUIRED ON)\n\n\n# Find OpenCL package\nif(TRISYCL_OPENCL)\n  find_package(OpenCL REQUIRED)\n  if(UNIX)\n    set(BOOST_COMPUTE_INCPATH /usr/include/compute CACHE PATH\n      \"Path to Boost.Compute headers (default is: /usr/include/compute)\")\n  endif()\nendif()\n\n# Find OpenMP package\nif(TRISYCL_OPENMP)\n  find_package(OpenMP REQUIRED)\nendif()\n\n# Find Boost\nfind_package(Boost 1.58 REQUIRED COMPONENTS chrono log)\n\n# If debug or trace we need boost log\nif(TRISYCL_DEBUG OR TRISYCL_DEBUG_STRUCTORS OR TRISYCL_TRACE_KERNEL)\n  set(LOG_NEEDED ON)\nelse()\n  set(LOG_NEEDED OFF)\nendif()\n\nfind_package(Threads REQUIRED)\n\n# Find triSYCL directory\nif(NOT TRISYCL_INCLUDE_DIR)\n  message(FATAL_ERROR\n    \"triSYCL include directory - Not found! (please set TRISYCL_INCLUDE_DIR\")\nelse()\n  message(STATUS \"triSYCL include directory - Found ${TRISYCL_INCLUDE_DIR}\")\nendif()\n\n#######################\n#  add_sycl_to_target\n#######################\n#\n#  Sets the proper flags and includes for the target compilation.\n#\n#  targetName : Name of the target to add a SYCL to.\n#  sourceFile : Source file to be compiled for SYCL.\n#  binaryDir : Intermediate directory to output the integration header.\n#\nfunction(add_sycl_to_target targetName sourceFile binaryDir)\n\n  # Add include directories to the \"#include <>\" paths\n  target_include_directories (${targetName} PUBLIC\n    ${TRISYCL_INCLUDE_DIR}\n    ${Boost_INCLUDE_DIRS}\n    $<$<BOOL:${TRISYCL_OPENCL}>:${OpenCL_INCLUDE_DIRS}>\n    $<$<BOOL:${TRISYCL_OPENCL}>:${BOOST_COMPUTE_INCPATH}>)\n\n\n  # Link dependencies\n  target_link_libraries(${targetName} PUBLIC\n    $<$<BOOL:${TRISYCL_OPENCL}>:${OpenCL_LIBRARIES}>\n    Threads::Threads\n    $<$<BOOL:${LOG_NEEDED}>:Boost::log>\n    Boost::chrono)\n\n\n  # Compile definitions\n  target_compile_definitions(${targetName} PUBLIC\n    $<$<BOOL:${TRISYCL_NO_ASYNC}>:TRISYCL_NO_ASYNC>\n    $<$<BOOL:${TRISYCL_OPENCL}>:TRISYCL_OPENCL>\n    $<$<BOOL:${TRISYCL_DEBUG}>:TRISYCL_DEBUG>\n    $<$<BOOL:${TRISYCL_DEBUG_STRUCTORS}>:TRISYCL_DEBUG_STRUCTORS>\n    $<$<BOOL:${TRISYCL_TRACE_KERNEL}>:TRISYCL_TRACE_KERNEL>\n    $<$<BOOL:${LOG_NEEDED}>:BOOST_LOG_DYN_LINK>)\n\n  # C++ and OpenMP requirements\n  target_compile_options(${targetName} PUBLIC\n    ${TRISYCL_COMPILE_OPTIONS}\n    $<$<BOOL:${TRISYCL_OPENMP}>:${OpenMP_CXX_FLAGS}>)\n\n  if(${TRISYCL_OPENMP} AND (NOT WIN32))\n    # Does not support generator expressions\n    set_target_properties(${targetName}\n      PROPERTIES\n      LINK_FLAGS ${OpenMP_CXX_FLAGS})\n  endif()\n\nendfunction()\n"
  },
  {
    "path": "3rdparty/eigen3/cmake/FindUmfpack.cmake",
    "content": "# Umfpack lib usually requires linking to a blas library.\n# It is up to the user of this module to find a BLAS and link to it.\n\nif (UMFPACK_INCLUDES AND UMFPACK_LIBRARIES)\n  set(UMFPACK_FIND_QUIETLY TRUE)\nendif ()\n\nfind_path(UMFPACK_INCLUDES\n  NAMES\n  umfpack.h\n  PATHS\n  $ENV{UMFPACKDIR}\n  ${INCLUDE_INSTALL_DIR}\n  PATH_SUFFIXES\n  suitesparse\n  ufsparse\n)\n\nfind_library(UMFPACK_LIBRARIES umfpack PATHS $ENV{UMFPACKDIR} ${LIB_INSTALL_DIR})\n\nif(UMFPACK_LIBRARIES)\n\n  if(NOT UMFPACK_LIBDIR)\n    get_filename_component(UMFPACK_LIBDIR ${UMFPACK_LIBRARIES} PATH)\n  endif()\n\n  find_library(COLAMD_LIBRARY colamd PATHS ${UMFPACK_LIBDIR} $ENV{UMFPACKDIR} ${LIB_INSTALL_DIR})\n  if(COLAMD_LIBRARY)\n    set(UMFPACK_LIBRARIES ${UMFPACK_LIBRARIES} ${COLAMD_LIBRARY})\n  endif ()\n  \n  find_library(AMD_LIBRARY amd PATHS ${UMFPACK_LIBDIR} $ENV{UMFPACKDIR} ${LIB_INSTALL_DIR})\n  if(AMD_LIBRARY)\n    set(UMFPACK_LIBRARIES ${UMFPACK_LIBRARIES} ${AMD_LIBRARY})\n  endif ()\n\n  find_library(SUITESPARSE_LIBRARY SuiteSparse PATHS ${UMFPACK_LIBDIR} $ENV{UMFPACKDIR} ${LIB_INSTALL_DIR})\n  if(SUITESPARSE_LIBRARY)\n    set(UMFPACK_LIBRARIES ${UMFPACK_LIBRARIES} ${SUITESPARSE_LIBRARY})\n  endif ()\n\n  find_library(CHOLMOD_LIBRARY cholmod PATHS $ENV{UMFPACK_LIBDIR} $ENV{UMFPACKDIR} ${LIB_INSTALL_DIR})\n  if(CHOLMOD_LIBRARY)\n    set(UMFPACK_LIBRARIES ${UMFPACK_LIBRARIES} ${CHOLMOD_LIBRARY})\n  endif()\n\nendif()\n\ninclude(FindPackageHandleStandardArgs)\nfind_package_handle_standard_args(UMFPACK DEFAULT_MSG\n                                  UMFPACK_INCLUDES UMFPACK_LIBRARIES)\n\nmark_as_advanced(UMFPACK_INCLUDES UMFPACK_LIBRARIES AMD_LIBRARY COLAMD_LIBRARY CHOLMOD_LIBRARY SUITESPARSE_LIBRARY)\n"
  },
  {
    "path": "3rdparty/eigen3/cmake/RegexUtils.cmake",
    "content": "function(escape_string_as_regex _str_out _str_in)\n  string(REGEX REPLACE \"\\\\\\\\\" \"\\\\\\\\\\\\\\\\\" FILETEST2 \"${_str_in}\")\n  string(REGEX REPLACE \"([.$+*?|-])\" \"\\\\\\\\\\\\1\" FILETEST2 \"${FILETEST2}\")\n  string(REGEX REPLACE \"\\\\^\" \"\\\\\\\\^\" FILETEST2 \"${FILETEST2}\")\n  string(REGEX REPLACE \"\\\\(\" \"\\\\\\\\(\" FILETEST2 \"${FILETEST2}\")\n  string(REGEX REPLACE \"\\\\)\" \"\\\\\\\\)\" FILETEST2 \"${FILETEST2}\")\n  string(REGEX REPLACE \"\\\\[\" \"\\\\\\\\[\" FILETEST2 \"${FILETEST2}\")\n  string(REGEX REPLACE \"\\\\]\" \"\\\\\\\\]\" FILETEST2 \"${FILETEST2}\")\n  set(${_str_out} \"${FILETEST2}\" PARENT_SCOPE)\nendfunction()\n\nfunction(test_escape_string_as_regex)\n  set(test1 \"\\\\.^$-+*()[]?|\")\n  escape_string_as_regex(test2 \"${test1}\")\n  set(testRef \"\\\\\\\\\\\\.\\\\^\\\\$\\\\-\\\\+\\\\*\\\\(\\\\)\\\\[\\\\]\\\\?\\\\|\")\n  if(NOT test2 STREQUAL testRef)\n\tmessage(\"Error in the escape_string_for_regex function : \\n   ${test1} was escaped as ${test2}, should be ${testRef}\")\n  endif()\nendfunction()"
  },
  {
    "path": "3rdparty/eigen3/cmake/UseEigen3.cmake",
    "content": "#                                               -*- cmake -*-\n#\n#  UseEigen3.cmake\n\nadd_definitions     ( ${EIGEN3_DEFINITIONS} )\ninclude_directories ( ${EIGEN3_INCLUDE_DIRS} )\n"
  },
  {
    "path": "3rdparty/eigen3/cmake/language_support.cmake",
    "content": "# cmake/modules/language_support.cmake\n#\n# Temporary additional general language support is contained within this\n# file.  \n\n# This additional function definition is needed to provide a workaround for\n# CMake bug 9220.\n\n# On debian testing (cmake 2.6.2), I get return code zero when calling \n# cmake the first time, but cmake crashes when running a second time\n# as follows:\n#\n#  -- The Fortran compiler identification is unknown\n#  CMake Error at /usr/share/cmake-2.6/Modules/CMakeFortranInformation.cmake:7 (GET_FILENAME_COMPONENT):\n#    get_filename_component called with incorrect number of arguments\n#  Call Stack (most recent call first):\n#    CMakeLists.txt:3 (enable_language)\n#\n# My workaround is to invoke cmake twice.  If both return codes are zero, \n# it is safe to invoke enable_language(Fortran OPTIONAL)\n\nfunction(workaround_9220 language language_works)\n  #message(\"DEBUG: language = ${language}\")\n  set(text\n    \"project(test NONE)\n    cmake_minimum_required(VERSION 2.8.11)\n    set (CMAKE_Fortran_FLAGS \\\"${CMAKE_Fortran_FLAGS}\\\")\n    set (CMAKE_EXE_LINKER_FLAGS \\\"${CMAKE_EXE_LINKER_FLAGS}\\\")\n    enable_language(${language})\n  \")\n  file(REMOVE_RECURSE ${CMAKE_BINARY_DIR}/language_tests/${language})\n  file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/language_tests/${language})\n  file(WRITE ${CMAKE_BINARY_DIR}/language_tests/${language}/CMakeLists.txt\n    ${text})\n  execute_process(\n    COMMAND ${CMAKE_COMMAND} . -G \"${CMAKE_GENERATOR}\"\n    WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/language_tests/${language}\n    RESULT_VARIABLE return_code\n    OUTPUT_QUIET\n    ERROR_QUIET\n    )\n\n  if(return_code EQUAL 0)\n    # Second run\n    execute_process (\n      COMMAND ${CMAKE_COMMAND} . -G \"${CMAKE_GENERATOR}\"\n      WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/language_tests/${language}\n      RESULT_VARIABLE return_code\n      OUTPUT_QUIET\n      ERROR_QUIET\n      )\n    if(return_code EQUAL 0)\n      set(${language_works} ON PARENT_SCOPE)\n    else()\n      set(${language_works} OFF PARENT_SCOPE)\n    endif()\n  else()\n    set(${language_works} OFF PARENT_SCOPE)\n  endif()\nendfunction()\n\n# Temporary tests of the above function.\n#workaround_9220(CXX CXX_language_works)\n#message(\"CXX_language_works = ${CXX_language_works}\")\n#workaround_9220(CXXp CXXp_language_works)\n#message(\"CXXp_language_works = ${CXXp_language_works}\")\n\n"
  },
  {
    "path": "3rdparty/eigen3/debug/gdb/__init__.py",
    "content": "# Intentionally empty\n"
  },
  {
    "path": "3rdparty/eigen3/debug/gdb/printers.py",
    "content": "# -*- coding: utf-8 -*-\n# This file is part of Eigen, a lightweight C++ template library\n# for linear algebra.\n#\n# Copyright (C) 2009 Benjamin Schindler <bschindler@inf.ethz.ch>\n#\n# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this\n# file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n# Pretty printers for Eigen::Matrix\n# This is still pretty basic as the python extension to gdb is still pretty basic. \n# It cannot handle complex eigen types and it doesn't support many of the other eigen types\n# This code supports fixed size as well as dynamic size matrices\n\n# To use it:\n#\n# * Create a directory and put the file as well as an empty __init__.py in \n#   that directory.\n# * Create a ~/.gdbinit file, that contains the following:\n#      python\n#      import sys\n#      sys.path.insert(0, '/path/to/eigen/printer/directory')\n#      from printers import register_eigen_printers\n#      register_eigen_printers (None)\n#      end\n\nimport gdb\nimport re\nimport itertools\nfrom bisect import bisect_left\n\n# Basic row/column iteration code for use with Sparse and Dense matrices\nclass _MatrixEntryIterator(object):\n\t\n\tdef __init__ (self, rows, cols, rowMajor):\n\t\tself.rows = rows\n\t\tself.cols = cols\n\t\tself.currentRow = 0\n\t\tself.currentCol = 0\n\t\tself.rowMajor = rowMajor\n\n\tdef __iter__ (self):\n\t\treturn self\n\n\tdef next(self):\n                return self.__next__()  # Python 2.x compatibility\n\n\tdef __next__(self):\n\t\trow = self.currentRow\n\t\tcol = self.currentCol\n\t\tif self.rowMajor == 0:\n\t\t\tif self.currentCol >= self.cols:\n\t\t\t\traise StopIteration\n\t\t\t\t\n\t\t\tself.currentRow = self.currentRow + 1\n\t\t\tif self.currentRow >= self.rows:\n\t\t\t\tself.currentRow = 0\n\t\t\t\tself.currentCol = self.currentCol + 1\n\t\telse:\n\t\t\tif self.currentRow >= self.rows:\n\t\t\t\traise StopIteration\n\t\t\t\t\n\t\t\tself.currentCol = self.currentCol + 1\n\t\t\tif self.currentCol >= self.cols:\n\t\t\t\tself.currentCol = 0\n\t\t\t\tself.currentRow = self.currentRow + 1\n\n\t\treturn (row, col)\n\nclass EigenMatrixPrinter:\n\t\"Print Eigen Matrix or Array of some kind\"\n\n\tdef __init__(self, variety, val):\n\t\t\"Extract all the necessary information\"\n\t\t\n\t\t# Save the variety (presumably \"Matrix\" or \"Array\") for later usage\n\t\tself.variety = variety\n\t\t\n\t\t# The gdb extension does not support value template arguments - need to extract them by hand\n\t\ttype = val.type\n\t\tif type.code == gdb.TYPE_CODE_REF:\n\t\t\ttype = type.target()\n\t\tself.type = type.unqualified().strip_typedefs()\n\t\ttag = self.type.tag\n\t\tregex = re.compile('\\<.*\\>')\n\t\tm = regex.findall(tag)[0][1:-1]\n\t\ttemplate_params = m.split(',')\n\t\ttemplate_params = [x.replace(\" \", \"\") for x in template_params]\n\t\t\n\t\tif template_params[1] == '-0x00000000000000001' or template_params[1] == '-0x000000001' or template_params[1] == '-1':\n\t\t\tself.rows = val['m_storage']['m_rows']\n\t\telse:\n\t\t\tself.rows = int(template_params[1])\n\t\t\n\t\tif template_params[2] == '-0x00000000000000001' or template_params[2] == '-0x000000001' or template_params[2] == '-1':\n\t\t\tself.cols = val['m_storage']['m_cols']\n\t\telse:\n\t\t\tself.cols = int(template_params[2])\n\t\t\n\t\tself.options = 0 # default value\n\t\tif len(template_params) > 3:\n\t\t\tself.options = template_params[3];\n\t\t\n\t\tself.rowMajor = (int(self.options) & 0x1)\n\t\t\n\t\tself.innerType = self.type.template_argument(0)\n\t\t\n\t\tself.val = val\n\t\t\n\t\t# Fixed size matrices have a struct as their storage, so we need to walk through this\n\t\tself.data = self.val['m_storage']['m_data']\n\t\tif self.data.type.code == gdb.TYPE_CODE_STRUCT:\n\t\t\tself.data = self.data['array']\n\t\t\tself.data = self.data.cast(self.innerType.pointer())\n\t\t\t\n\tclass _iterator(_MatrixEntryIterator):\n\t\tdef __init__ (self, rows, cols, dataPtr, rowMajor):\n\t\t\tsuper(EigenMatrixPrinter._iterator, self).__init__(rows, cols, rowMajor)\n\n\t\t\tself.dataPtr = dataPtr\n\n\t\tdef __next__(self):\n\t\t\t\n\t\t\trow, col = super(EigenMatrixPrinter._iterator, self).__next__()\n\t\t\t\n\t\t\titem = self.dataPtr.dereference()\n\t\t\tself.dataPtr = self.dataPtr + 1\n\t\t\tif (self.cols == 1): #if it's a column vector\n\t\t\t\treturn ('[%d]' % (row,), item)\n\t\t\telif (self.rows == 1): #if it's a row vector\n\t\t\t\treturn ('[%d]' % (col,), item)\n\t\t\treturn ('[%d,%d]' % (row, col), item)\n\t\t\t\n\tdef children(self):\n\t\t\n\t\treturn self._iterator(self.rows, self.cols, self.data, self.rowMajor)\n\t\t\n\tdef to_string(self):\n\t\treturn \"Eigen::%s<%s,%d,%d,%s> (data ptr: %s)\" % (self.variety, self.innerType, self.rows, self.cols, \"RowMajor\" if self.rowMajor else  \"ColMajor\", self.data)\n\nclass EigenSparseMatrixPrinter:\n\t\"Print an Eigen SparseMatrix\"\n\n\tdef __init__(self, val):\n\t\t\"Extract all the necessary information\"\n\n\t\ttype = val.type\n\t\tif type.code == gdb.TYPE_CODE_REF:\n\t\t\ttype = type.target()\n\t\tself.type = type.unqualified().strip_typedefs()\n\t\ttag = self.type.tag\n\t\tregex = re.compile('\\<.*\\>')\n\t\tm = regex.findall(tag)[0][1:-1]\n\t\ttemplate_params = m.split(',')\n\t\ttemplate_params = [x.replace(\" \", \"\") for x in template_params]\n\n\t\tself.options = 0\n\t\tif len(template_params) > 1:\n\t\t\tself.options = template_params[1];\n\t\t\n\t\tself.rowMajor = (int(self.options) & 0x1)\n\t\t\n\t\tself.innerType = self.type.template_argument(0)\n\t\t\n\t\tself.val = val\n\n\t\tself.data = self.val['m_data']\n\t\tself.data = self.data.cast(self.innerType.pointer())\n\n\tclass _iterator(_MatrixEntryIterator):\n\t\tdef __init__ (self, rows, cols, val, rowMajor):\n\t\t\tsuper(EigenSparseMatrixPrinter._iterator, self).__init__(rows, cols, rowMajor)\n\n\t\t\tself.val = val\n\t\t\t\n\t\tdef __next__(self):\n\t\t\t\n\t\t\trow, col = super(EigenSparseMatrixPrinter._iterator, self).__next__()\n\t\t\t\t\n\t\t\t# repeat calculations from SparseMatrix.h:\n\t\t\touter = row if self.rowMajor else col\n\t\t\tinner = col if self.rowMajor else row\n\t\t\tstart = self.val['m_outerIndex'][outer]\n\t\t\tend = ((start + self.val['m_innerNonZeros'][outer]) if self.val['m_innerNonZeros'] else\n\t\t\t       self.val['m_outerIndex'][outer+1])\n\n\t\t\t# and from CompressedStorage.h:\n\t\t\tdata = self.val['m_data']\n\t\t\tif start >= end:\n\t\t\t\titem = 0\n\t\t\telif (end > start) and (inner == data['m_indices'][end-1]):\n\t\t\t\titem = data['m_values'][end-1]\n\t\t\telse:\n\t\t\t\t# create Python index list from the target range within m_indices\n\t\t\t\tindices = [data['m_indices'][x] for x in range(int(start), int(end)-1)]\n\t\t\t\t# find the index with binary search\n\t\t\t\tidx = int(start) + bisect_left(indices, inner)\n\t\t\t\tif ((idx < end) and (data['m_indices'][idx] == inner)):\n\t\t\t\t\titem = data['m_values'][idx]\n\t\t\t\telse:\n\t\t\t\t\titem = 0\n\n\t\t\treturn ('[%d,%d]' % (row, col), item)\n\n\tdef children(self):\n\t\tif self.data:\n\t\t\treturn self._iterator(self.rows(), self.cols(), self.val, self.rowMajor)\n\n\t\treturn iter([])   # empty matrix, for now\n\n\n\tdef rows(self):\n\t\treturn self.val['m_outerSize'] if self.rowMajor else self.val['m_innerSize']\n\n\tdef cols(self):\n\t\treturn self.val['m_innerSize'] if self.rowMajor else self.val['m_outerSize']\n\n\tdef to_string(self):\n\n\t\tif self.data:\n\t\t\tstatus = (\"not compressed\" if self.val['m_innerNonZeros'] else \"compressed\")\n\t\telse:\n\t\t\tstatus = \"empty\"\n\t\tdimensions  = \"%d x %d\" % (self.rows(), self.cols())\n\t\tlayout      = \"row\" if self.rowMajor else \"column\"\n\n\t\treturn \"Eigen::SparseMatrix<%s>, %s, %s major, %s\" % (\n\t\t\tself.innerType, dimensions, layout, status )\n\nclass EigenQuaternionPrinter:\n\t\"Print an Eigen Quaternion\"\n\t\n\tdef __init__(self, val):\n\t\t\"Extract all the necessary information\"\n\t\t# The gdb extension does not support value template arguments - need to extract them by hand\n\t\ttype = val.type\n\t\tif type.code == gdb.TYPE_CODE_REF:\n\t\t\ttype = type.target()\n\t\tself.type = type.unqualified().strip_typedefs()\n\t\tself.innerType = self.type.template_argument(0)\n\t\tself.val = val\n\t\t\n\t\t# Quaternions have a struct as their storage, so we need to walk through this\n\t\tself.data = self.val['m_coeffs']['m_storage']['m_data']['array']\n\t\tself.data = self.data.cast(self.innerType.pointer())\n\t\t\t\n\tclass _iterator:\n\t\tdef __init__ (self, dataPtr):\n\t\t\tself.dataPtr = dataPtr\n\t\t\tself.currentElement = 0\n\t\t\tself.elementNames = ['x', 'y', 'z', 'w']\n\t\t\t\n\t\tdef __iter__ (self):\n\t\t\treturn self\n\t\n\t\tdef next(self):\n\t\t\treturn self.__next__()  # Python 2.x compatibility\n\n\t\tdef __next__(self):\n\t\t\telement = self.currentElement\n\t\t\t\n\t\t\tif self.currentElement >= 4: #there are 4 elements in a quanternion\n\t\t\t\traise StopIteration\n\t\t\t\n\t\t\tself.currentElement = self.currentElement + 1\n\t\t\t\n\t\t\titem = self.dataPtr.dereference()\n\t\t\tself.dataPtr = self.dataPtr + 1\n\t\t\treturn ('[%s]' % (self.elementNames[element],), item)\n\t\t\t\n\tdef children(self):\n\t\t\n\t\treturn self._iterator(self.data)\n\t\n\tdef to_string(self):\n\t\treturn \"Eigen::Quaternion<%s> (data ptr: %s)\" % (self.innerType, self.data)\n\ndef build_eigen_dictionary ():\n\tpretty_printers_dict[re.compile('^Eigen::Quaternion<.*>$')] = lambda val: EigenQuaternionPrinter(val)\n\tpretty_printers_dict[re.compile('^Eigen::Matrix<.*>$')] = lambda val: EigenMatrixPrinter(\"Matrix\", val)\n\tpretty_printers_dict[re.compile('^Eigen::SparseMatrix<.*>$')] = lambda val: EigenSparseMatrixPrinter(val)\n\tpretty_printers_dict[re.compile('^Eigen::Array<.*>$')]  = lambda val: EigenMatrixPrinter(\"Array\",  val)\n\ndef register_eigen_printers(obj):\n\t\"Register eigen pretty-printers with objfile Obj\"\n\n\tif obj == None:\n\t\tobj = gdb\n\tobj.pretty_printers.append(lookup_function)\n\ndef lookup_function(val):\n\t\"Look-up and return a pretty-printer that can print va.\"\n\t\n\ttype = val.type\n\t\n\tif type.code == gdb.TYPE_CODE_REF:\n\t\ttype = type.target()\n\t\n\ttype = type.unqualified().strip_typedefs()\n\t\n\ttypename = type.tag\n\tif typename == None:\n\t\treturn None\n\t\n\tfor function in pretty_printers_dict:\n\t\tif function.search(typename):\n\t\t\treturn pretty_printers_dict[function](val)\n\t\n\treturn None\n\npretty_printers_dict = {}\n\nbuild_eigen_dictionary ()\n"
  },
  {
    "path": "3rdparty/eigen3/debug/msvc/eigen.natvis",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n\r\n<AutoVisualizer xmlns=\"http://schemas.microsoft.com/vstudio/debugger/natvis/2010\">\r\n\r\n  <!-- Fixed x Fixed Matrix -->\r\n  <Type Name=\"Eigen::Matrix&lt;*,*,*,*,*,*&gt;\">      \r\n      <AlternativeType Name=\"Eigen::Array&lt;*,-1,-1,*,*,*&gt;\"/>\r\n      <DisplayString>[{$T2}, {$T3}] (fixed matrix)</DisplayString>\r\n      <Expand>\r\n        <ArrayItems Condition=\"Flags%2\"> <!-- row major layout -->\r\n          <Rank>2</Rank>\r\n          <Size>$i==0 ? $T2 : $T3</Size>\r\n          <ValuePointer>m_storage.m_data.array</ValuePointer>\r\n        </ArrayItems>\r\n        <ArrayItems Condition=\"!(Flags%2)\"> <!-- column major layout -->\r\n          <Direction>Backward</Direction>\r\n          <Rank>2</Rank>\r\n          <Size>$i==0 ? $T2 : $T3</Size>\r\n          <ValuePointer>m_storage.m_data.array</ValuePointer>\r\n        </ArrayItems>\r\n      </Expand>\r\n  </Type>\r\n  \r\n  <!-- 2 x 2 Matrix -->\r\n  <Type Name=\"Eigen::Matrix&lt;*,2,2,*,*,*&gt;\">      \r\n      <AlternativeType Name=\"Eigen::Array&lt;*,2,2,*,*,*&gt;\"/>\r\n      <DisplayString>[2, 2] (fixed matrix)</DisplayString>\r\n      <Expand>\r\n        <Synthetic Name=\"[row 0]\" Condition=\"Flags%2\">\r\n          <DisplayString>({m_storage.m_data.array[0]}, {m_storage.m_data.array[1]})</DisplayString>\r\n        </Synthetic>\r\n        <Synthetic Name=\"[row 0]\" Condition=\"!(Flags%2)\">\r\n          <DisplayString>({m_storage.m_data.array[0]}, {m_storage.m_data.array[2]})</DisplayString>\r\n        </Synthetic>\r\n        <Synthetic Name=\"[row 1]\" Condition=\"Flags%2\">\r\n          <DisplayString>({m_storage.m_data.array[2]}, {m_storage.m_data.array[3]})</DisplayString>\r\n        </Synthetic>\r\n        <Synthetic Name=\"[row 1]\" Condition=\"!(Flags%2)\">\r\n          <DisplayString>({m_storage.m_data.array[1]}, {m_storage.m_data.array[3]})</DisplayString>\r\n        </Synthetic>        \r\n      </Expand>\r\n  </Type>\r\n  \r\n  <!-- 3 x 3 Matrix -->\r\n  <Type Name=\"Eigen::Matrix&lt;*,3,3,*,*,*&gt;\">      \r\n      <AlternativeType Name=\"Eigen::Array&lt;*,3,3,*,*,*&gt;\"/>\r\n      <DisplayString>[3, 3] (fixed matrix)</DisplayString>\r\n      <Expand>\r\n        <Synthetic Name=\"[row 0]\" Condition=\"Flags%2\">\r\n          <DisplayString>({m_storage.m_data.array[0]}, {m_storage.m_data.array[1]}, {m_storage.m_data.array[2]})</DisplayString>\r\n        </Synthetic>\r\n        <Synthetic Name=\"[row 0]\" Condition=\"!(Flags%2)\">\r\n          <DisplayString>({m_storage.m_data.array[0]}, {m_storage.m_data.array[3]}, {m_storage.m_data.array[6]})</DisplayString>\r\n        </Synthetic>\r\n        <Synthetic Name=\"[row 1]\" Condition=\"Flags%2\">\r\n          <DisplayString>({m_storage.m_data.array[3]}, {m_storage.m_data.array[4]}, {m_storage.m_data.array[5]})</DisplayString>\r\n        </Synthetic>\r\n        <Synthetic Name=\"[row 1]\" Condition=\"!(Flags%2)\">\r\n          <DisplayString>({m_storage.m_data.array[1]}, {m_storage.m_data.array[4]}, {m_storage.m_data.array[7]})</DisplayString>\r\n        </Synthetic>\r\n        <Synthetic Name=\"[row 2]\" Condition=\"Flags%2\">\r\n          <DisplayString>({m_storage.m_data.array[6]}, {m_storage.m_data.array[7]}, {m_storage.m_data.array[8]})</DisplayString>\r\n        </Synthetic>\r\n        <Synthetic Name=\"[row 2]\" Condition=\"!(Flags%2)\">\r\n          <DisplayString>({m_storage.m_data.array[2]}, {m_storage.m_data.array[5]}, {m_storage.m_data.array[8]})</DisplayString>\r\n        </Synthetic>        \r\n      </Expand>\r\n  </Type>\r\n  \r\n  <!-- 4 x 4 Matrix -->\r\n  <Type Name=\"Eigen::Matrix&lt;*,4,4,*,*,*&gt;\">      \r\n      <AlternativeType Name=\"Eigen::Array&lt;*,4,4,*,*,*&gt;\"/>\r\n      <DisplayString>[4, 4] (fixed matrix)</DisplayString>\r\n      <Expand>\r\n        <Synthetic Name=\"[row 0]\" Condition=\"Flags%2\">\r\n          <DisplayString>({m_storage.m_data.array[0]}, {m_storage.m_data.array[1]}, {m_storage.m_data.array[2]}, {m_storage.m_data.array[3]})</DisplayString>\r\n        </Synthetic>\r\n        <Synthetic Name=\"[row 0]\" Condition=\"!(Flags%2)\">\r\n          <DisplayString>({m_storage.m_data.array[0]}, {m_storage.m_data.array[4]}, {m_storage.m_data.array[8]}, {m_storage.m_data.array[12]})</DisplayString>\r\n        </Synthetic>\r\n        <Synthetic Name=\"[row 1]\" Condition=\"Flags%2\">\r\n          <DisplayString>({m_storage.m_data.array[4]}, {m_storage.m_data.array[5]}, {m_storage.m_data.array[6]}, {m_storage.m_data.array[7]})</DisplayString>\r\n        </Synthetic>\r\n        <Synthetic Name=\"[row 1]\" Condition=\"!(Flags%2)\">\r\n          <DisplayString>({m_storage.m_data.array[1]}, {m_storage.m_data.array[5]}, {m_storage.m_data.array[9]}, {m_storage.m_data.array[13]})</DisplayString>\r\n        </Synthetic>\r\n        <Synthetic Name=\"[row 2]\" Condition=\"Flags%2\">\r\n          <DisplayString>({m_storage.m_data.array[8]}, {m_storage.m_data.array[9]}, {m_storage.m_data.array[10]}, {m_storage.m_data.array[11]})</DisplayString>\r\n        </Synthetic>\r\n        <Synthetic Name=\"[row 2]\" Condition=\"!(Flags%2)\">\r\n          <DisplayString>({m_storage.m_data.array[2]}, {m_storage.m_data.array[6]}, {m_storage.m_data.array[10]}, {m_storage.m_data.array[14]})</DisplayString>\r\n        </Synthetic>\r\n        <Synthetic Name=\"[row 3]\" Condition=\"Flags%2\">\r\n          <DisplayString>({m_storage.m_data.array[12]}, {m_storage.m_data.array[13]}, {m_storage.m_data.array[14]}, {m_storage.m_data.array[15]})</DisplayString>\r\n        </Synthetic>\r\n        <Synthetic Name=\"[row 3]\" Condition=\"!(Flags%2)\">\r\n          <DisplayString>({m_storage.m_data.array[3]}, {m_storage.m_data.array[7]}, {m_storage.m_data.array[11]}, {m_storage.m_data.array[15]})</DisplayString>\r\n        </Synthetic>        \r\n      </Expand>\r\n  </Type>  \r\n  \r\n  <!-- Dynamic x Dynamic Matrix -->\r\n  <Type Name=\"Eigen::Matrix&lt;*,-1,-1,*,*,*&gt;\">      \r\n      <AlternativeType Name=\"Eigen::Array&lt;*,-1,-1,*,*,*&gt;\"/>\r\n      <DisplayString Condition=\"m_storage.m_data == 0\">empty</DisplayString>\r\n      <DisplayString Condition=\"m_storage.m_data != 0\">[{m_storage.m_rows}, {m_storage.m_cols}] (dynamic matrix)</DisplayString>\r\n      <Expand>\r\n        <ArrayItems Condition=\"Flags%2\"> <!-- row major layout -->\r\n          <Rank>2</Rank>\r\n          <Size>$i==0 ? m_storage.m_rows : m_storage.m_cols</Size>\r\n          <ValuePointer>m_storage.m_data</ValuePointer>\r\n        </ArrayItems>\r\n        <ArrayItems Condition=\"!(Flags%2)\"> <!-- column major layout -->\r\n          <Direction>Backward</Direction>\r\n          <Rank>2</Rank>\r\n          <Size>$i==0 ? m_storage.m_rows : m_storage.m_cols</Size>\r\n          <ValuePointer>m_storage.m_data</ValuePointer>\r\n        </ArrayItems>\r\n      </Expand>\r\n  </Type>\r\n  \r\n  <!-- Fixed x Dynamic Matrix -->\r\n  <Type Name=\"Eigen::Matrix&lt;*,*,-1,*,*,*&gt;\">\r\n      <AlternativeType Name=\"Eigen::Array&lt;*,*,-1,*,*,*&gt;\"/>\r\n      <DisplayString Condition=\"m_storage.m_data == 0\">empty</DisplayString>\r\n      <DisplayString Condition=\"m_storage.m_data != 0\">[{$T2}, {m_storage.m_cols}] (dynamic column matrix)</DisplayString>\r\n      <Expand>\r\n        <ArrayItems Condition=\"Flags%2\"> <!-- row major layout -->\r\n          <Rank>2</Rank>\r\n          <Size>$i==0 ? $T2 : m_storage.m_cols</Size>\r\n          <ValuePointer>m_storage.m_data</ValuePointer>\r\n        </ArrayItems>\r\n        <ArrayItems Condition=\"!(Flags%2)\"> <!-- column major layout -->\r\n          <Direction>Backward</Direction>\r\n          <Rank>2</Rank>\r\n          <Size>$i==0 ? $T2 : m_storage.m_cols</Size>\r\n          <ValuePointer>m_storage.m_data</ValuePointer>\r\n        </ArrayItems>\r\n      </Expand>\r\n  </Type>\r\n  \r\n  <!-- Dynamic x Fixed Matrix -->\r\n  <Type Name=\"Eigen::Matrix&lt;*,-1,*,*,*,*&gt;\">\r\n      <AlternativeType Name=\"Eigen::Array&lt;*,-1,*,*,*,*&gt;\"/>\r\n      <DisplayString Condition=\"m_storage.m_data == 0\">empty</DisplayString>\r\n      <DisplayString Condition=\"m_storage.m_data != 0\">[{m_storage.m_rows}, {$T2}] (dynamic row matrix)</DisplayString>\r\n      <Expand>\r\n        <ArrayItems Condition=\"Flags%2\"> <!-- row major layout -->\r\n          <Rank>2</Rank>\r\n          <Size>$i==0 ? m_storage.m_rows : $T2</Size>\r\n          <ValuePointer>m_storage.m_data</ValuePointer>\r\n        </ArrayItems>\r\n        <ArrayItems Condition=\"!(Flags%2)\"> <!-- column major layout -->\r\n          <Direction>Backward</Direction>\r\n          <Rank>2</Rank>\r\n          <Size>$i==0 ? m_storage.m_rows : $T2</Size>\r\n          <ValuePointer>m_storage.m_data</ValuePointer>\r\n        </ArrayItems>\r\n      </Expand>\r\n  </Type>\r\n  \r\n  <!-- Dynamic Column Vector -->\r\n  <Type Name=\"Eigen::Matrix&lt;*,1,-1,*,*,*&gt;\">\r\n      <AlternativeType Name=\"Eigen::Array&lt;*,1,-1,*,*,*&gt;\"/>\r\n      <DisplayString Condition=\"m_storage.m_data == 0\">empty</DisplayString>\r\n      <DisplayString Condition=\"m_storage.m_data != 0\">[{m_storage.m_cols}] (dynamic column vector)</DisplayString>\r\n      <Expand>\r\n        <Item Name=\"[size]\">m_storage.m_cols</Item>\r\n        <ArrayItems>\r\n          <Size>m_storage.m_cols</Size>\r\n          <ValuePointer>m_storage.m_data</ValuePointer>\r\n        </ArrayItems>\r\n      </Expand>\r\n  </Type>\r\n  \r\n  <!-- Dynamic Row Vector -->\r\n  <Type Name=\"Eigen::Matrix&lt;*,-1,1,*,*,*&gt;\">\r\n      <AlternativeType Name=\"Eigen::Array&lt;*,-1,1,*,*,*&gt;\"/>\r\n      <DisplayString Condition=\"m_storage.m_data == 0\">empty</DisplayString>\r\n      <DisplayString Condition=\"m_storage.m_data != 0\">[{m_storage.m_rows}] (dynamic row vector)</DisplayString>\r\n      <Expand>\r\n        <Item Name=\"[size]\">m_storage.m_rows</Item>\r\n        <ArrayItems>\r\n          <Size>m_storage.m_rows</Size>\r\n          <ValuePointer>m_storage.m_data</ValuePointer>\r\n        </ArrayItems>\r\n      </Expand>\r\n  </Type>\r\n  \r\n  <!-- Fixed Vector -->\r\n  <Type Name=\"Eigen::Matrix&lt;*,1,1,*,*,*&gt;\">\r\n      <AlternativeType Name=\"Eigen::Array&lt;*,1,1,*,*,*&gt;\"/>\r\n      <DisplayString>[1] ({m_storage.m_data.array[0]})</DisplayString>\r\n      <Expand>\r\n        <Item Name=\"[x]\">m_storage.m_data.array[0]</Item>\r\n      </Expand>\r\n  </Type>\r\n  \r\n  <Type Name=\"Eigen::Matrix&lt;*,2,1,*,*,*&gt;\">\r\n      <AlternativeType Name=\"Eigen::Matrix&lt;*,1,2,*,*,*&gt;\"/>\r\n      <AlternativeType Name=\"Eigen::Array&lt;*,2,1,*,*,*&gt;\"/>\r\n      <AlternativeType Name=\"Eigen::Array&lt;*,1,2,*,*,*&gt;\"/>\r\n      <DisplayString>[2] ({m_storage.m_data.array[0]}, {m_storage.m_data.array[1]})</DisplayString>\r\n      <Expand>\r\n        <Item Name=\"[x]\">m_storage.m_data.array[0]</Item>\r\n        <Item Name=\"[y]\">m_storage.m_data.array[1]</Item>\r\n      </Expand>\r\n  </Type>\r\n  \r\n  <Type Name=\"Eigen::Matrix&lt;*,3,1,*,*,*&gt;\">\r\n      <AlternativeType Name=\"Eigen::Matrix&lt;*,1,3,*,*,*&gt;\"/>\r\n      <AlternativeType Name=\"Eigen::Array&lt;*,3,1,*,*,*&gt;\"/>\r\n      <AlternativeType Name=\"Eigen::Array&lt;*,1,3,*,*,*&gt;\"/>\r\n      <DisplayString>[3] ({m_storage.m_data.array[0]}, {m_storage.m_data.array[1]}, {m_storage.m_data.array[2]})</DisplayString>\r\n      <Expand>\r\n        <Item Name=\"[x]\">m_storage.m_data.array[0]</Item>\r\n        <Item Name=\"[y]\">m_storage.m_data.array[1]</Item>\r\n        <Item Name=\"[z]\">m_storage.m_data.array[2]</Item>\r\n      </Expand>\r\n  </Type>\r\n  \r\n    <Type Name=\"Eigen::Matrix&lt;*,4,1,*,*,*&gt;\">\r\n      <AlternativeType Name=\"Eigen::Matrix&lt;*,1,4,*,*,*&gt;\"/>\r\n      <AlternativeType Name=\"Eigen::Array&lt;*,4,1,*,*,*&gt;\"/>\r\n      <AlternativeType Name=\"Eigen::Array&lt;*,1,4,*,*,*&gt;\"/>\r\n      <DisplayString>[4] ({m_storage.m_data.array[0]}, {m_storage.m_data.array[1]}, {m_storage.m_data.array[2]}, {m_storage.m_data.array[3]})</DisplayString>\r\n      <Expand>\r\n        <Item Name=\"[x]\">m_storage.m_data.array[0]</Item>\r\n        <Item Name=\"[y]\">m_storage.m_data.array[1]</Item>\r\n        <Item Name=\"[z]\">m_storage.m_data.array[2]</Item>\r\n        <Item Name=\"[w]\">m_storage.m_data.array[3]</Item>\r\n      </Expand>\r\n  </Type>\r\n\r\n</AutoVisualizer>\r\n"
  },
  {
    "path": "3rdparty/eigen3/demos/CMakeLists.txt",
    "content": "project(EigenDemos)\n\nadd_custom_target(demos)\n\nif(NOT EIGEN_TEST_NOQT)\n  find_package(Qt4)\n  if(QT4_FOUND)\n    add_subdirectory(mandelbrot)\n    add_subdirectory(opengl)\n  else()\n    message(STATUS \"Qt4 not found, so disabling the mandelbrot and opengl demos\")\n  endif()\nendif()\n"
  },
  {
    "path": "3rdparty/eigen3/demos/mandelbrot/CMakeLists.txt",
    "content": "find_package(Qt4 REQUIRED)\n\nset(CMAKE_INCLUDE_CURRENT_DIR ON)\n\nif (CMAKE_COMPILER_IS_GNUCXX)\n   set ( CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -O2\")\n   add_definitions ( \"-DNDEBUG\" )\nendif ()\n\ninclude_directories( ${QT_INCLUDE_DIR} )\n\nset(mandelbrot_SRCS\n    mandelbrot.cpp\n)\n\nqt4_automoc(${mandelbrot_SRCS})\n\nadd_executable(mandelbrot ${mandelbrot_SRCS})\nadd_dependencies(demos mandelbrot)\n\ntarget_link_libraries(mandelbrot ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})\n"
  },
  {
    "path": "3rdparty/eigen3/demos/mandelbrot/README",
    "content": "*** Mandelbrot demo ***\n\nControls:\n* Left mouse button to center view at a point.\n* Drag vertically with left mouse button to zoom in and out.\n\nBe sure to enable SSE2 or AltiVec to improve performance.\n\nThe number of iterations, and the choice between single and double precision, are\ndetermined at runtime depending on the zoom level.\n"
  },
  {
    "path": "3rdparty/eigen3/demos/mandelbrot/mandelbrot.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"mandelbrot.h\"\n#include <iostream>\n#include<QtGui/QPainter>\n#include<QtGui/QImage>\n#include<QtGui/QMouseEvent>\n#include<QtCore/QTime>\n\nvoid MandelbrotWidget::resizeEvent(QResizeEvent *)\n{\n  if(size < width() * height())\n  {\n    std::cout << \"reallocate buffer\" << std::endl;\n    size = width() * height();\n    if(buffer) delete[]buffer;\n    buffer = new unsigned char[4*size];\n  }\n}\n\ntemplate<typename T> struct iters_before_test { enum { ret = 8 }; };\ntemplate<> struct iters_before_test<double> { enum { ret = 16 }; };\n\ntemplate<typename Real> void MandelbrotThread::render(int img_width, int img_height)\n{\n  enum { packetSize = Eigen::internal::packet_traits<Real>::size }; // number of reals in a Packet\n  typedef Eigen::Array<Real, packetSize, 1> Packet; // wrap a Packet as a vector\n\n  enum { iters_before_test = iters_before_test<Real>::ret };\n  max_iter = (max_iter / iters_before_test) * iters_before_test;\n  const int alignedWidth = (img_width/packetSize)*packetSize;\n  unsigned char *const buffer = widget->buffer;\n  const double xradius = widget->xradius;\n  const double yradius = xradius * img_height / img_width;\n  const int threadcount = widget->threadcount;\n  typedef Eigen::Array<Real, 2, 1> Vector2;\n  Vector2 start(widget->center.x() - widget->xradius, widget->center.y() - yradius);\n  Vector2 step(2*widget->xradius/img_width, 2*yradius/img_height);\n  total_iter = 0;\n\n  for(int y = id; y < img_height; y += threadcount)\n  {\n    int pix = y * img_width;\n\n    // for each pixel, we're going to do the iteration z := z^2 + c where z and c are complex numbers, \n    // starting with z = c = complex coord of the pixel. pzi and pzr denote the real and imaginary parts of z.\n    // pci and pcr denote the real and imaginary parts of c.\n\n    Packet pzi_start, pci_start;\n    for(int i = 0; i < packetSize; i++) pzi_start[i] = pci_start[i] = start.y() + y * step.y();\n\n    for(int x = 0; x < alignedWidth; x += packetSize, pix += packetSize)\n    {\n      Packet pcr, pci = pci_start, pzr, pzi = pzi_start, pzr_buf;\n      for(int i = 0; i < packetSize; i++) pzr[i] = pcr[i] = start.x() + (x+i) * step.x();\n\n      // do the iterations. Every iters_before_test iterations we check for divergence,\n      // in which case we can stop iterating.\n      int j = 0;\n      typedef Eigen::Matrix<int, packetSize, 1> Packeti;\n      Packeti pix_iter = Packeti::Zero(), // number of iteration per pixel in the packet\n              pix_dont_diverge; // whether or not each pixel has already diverged\n      do\n      {\n        for(int i = 0; i < iters_before_test/4; i++) // peel the inner loop by 4\n        {\n#         define ITERATE \\\n            pzr_buf = pzr; \\\n            pzr = pzr.square(); \\\n            pzr -= pzi.square(); \\\n            pzr += pcr; \\\n            pzi = (2*pzr_buf)*pzi; \\\n            pzi += pci;\n          ITERATE ITERATE ITERATE ITERATE\n        }\n        pix_dont_diverge = ((pzr.square() + pzi.square())\n                           .eval() // temporary fix as what follows is not yet vectorized by Eigen\n                           <= Packet::Constant(4))\n                                // the 4 here is not a magic value, it's a math fact that if\n                                // the square modulus is >4 then divergence is inevitable.\n                           .template cast<int>();\n        pix_iter += iters_before_test * pix_dont_diverge;\n        j++;\n        total_iter += iters_before_test * packetSize;\n      }\n      while(j < max_iter/iters_before_test && pix_dont_diverge.any()); // any() is not yet vectorized by Eigen\n\n      // compute pixel colors\n      for(int i = 0; i < packetSize; i++)\n      {\n        buffer[4*(pix+i)] = 255*pix_iter[i]/max_iter;\n        buffer[4*(pix+i)+1] = 0;\n        buffer[4*(pix+i)+2] = 0;\n      }\n    }\n\n    // if the width is not a multiple of packetSize, fill the remainder in black\n    for(int x = alignedWidth; x < img_width; x++, pix++)\n      buffer[4*pix] = buffer[4*pix+1] = buffer[4*pix+2] = 0;\n  }\n  return;\n}\n\nvoid MandelbrotThread::run()\n{\n  setTerminationEnabled(true);\n  double resolution = widget->xradius*2/widget->width();\n  max_iter = 128;\n  if(resolution < 1e-4f) max_iter += 128 * ( - 4 - std::log10(resolution));\n  int img_width = widget->width()/widget->draft;\n  int img_height = widget->height()/widget->draft;\n  single_precision = resolution > 1e-7f;\n\n  if(single_precision)\n    render<float>(img_width, img_height);\n  else\n    render<double>(img_width, img_height);\n}\n\nvoid MandelbrotWidget::paintEvent(QPaintEvent *)\n{\n  static float max_speed = 0;\n  long long total_iter = 0;\n\n  QTime time;\n  time.start();\n  for(int th = 0; th < threadcount; th++)\n    threads[th]->start(QThread::LowPriority);\n  for(int th = 0; th < threadcount; th++)\n  {\n    threads[th]->wait();\n    total_iter += threads[th]->total_iter;\n  }\n  int elapsed = time.elapsed();\n\n  if(draft == 1)\n  {\n    float speed = elapsed ? float(total_iter)*1000/elapsed : 0;\n    max_speed = std::max(max_speed, speed);\n    std::cout << threadcount << \" threads, \"\n              << elapsed << \" ms, \"\n              << speed << \" iters/s (max \" << max_speed << \")\" << std::endl;\n    int packetSize = threads[0]->single_precision\n                   ? int(Eigen::internal::packet_traits<float>::size)\n                   : int(Eigen::internal::packet_traits<double>::size);\n    setWindowTitle(QString(\"resolution \")+QString::number(xradius*2/width(), 'e', 2)\n                  +QString(\", %1 iterations per pixel, \").arg(threads[0]->max_iter)\n                  +(threads[0]->single_precision ? QString(\"single \") : QString(\"double \"))\n                  +QString(\"precision, \")\n                  +(packetSize==1 ? QString(\"no vectorization\")\n                                  : QString(\"vectorized (%1 per packet)\").arg(packetSize)));\n  }\n  \n  QImage image(buffer, width()/draft, height()/draft, QImage::Format_RGB32);\n  QPainter painter(this);\n  painter.drawImage(QPoint(0, 0), image.scaled(width(), height()));\n\n  if(draft>1)\n  {\n    draft /= 2;\n    setWindowTitle(QString(\"recomputing at 1/%1 resolution...\").arg(draft));\n    update();\n  }\n}\n\nvoid MandelbrotWidget::mousePressEvent(QMouseEvent *event)\n{\n  if( event->buttons() & Qt::LeftButton )\n  {\n    lastpos = event->pos();\n    double yradius = xradius * height() / width();\n    center = Eigen::Vector2d(center.x() + (event->pos().x() - width()/2) * xradius * 2 / width(),\n                             center.y() + (event->pos().y() - height()/2) * yradius * 2 / height());\n    draft = 16;\n    for(int th = 0; th < threadcount; th++)\n      threads[th]->terminate();\n    update();\n  }\n}\n\nvoid MandelbrotWidget::mouseMoveEvent(QMouseEvent *event)\n{\n  QPoint delta = event->pos() - lastpos;\n  lastpos = event->pos();\n  if( event->buttons() & Qt::LeftButton )\n  {\n    double t = 1 + 5 * double(delta.y()) / height();\n    if(t < 0.5) t = 0.5;\n    if(t > 2) t = 2;\n    xradius *= t;\n    draft = 16;\n    for(int th = 0; th < threadcount; th++)\n      threads[th]->terminate();\n    update();\n  }\n}\n\nint main(int argc, char *argv[])\n{\n  QApplication app(argc, argv);\n  MandelbrotWidget w;\n  w.show();\n  return app.exec();\n}\n\n#include \"mandelbrot.moc\"\n"
  },
  {
    "path": "3rdparty/eigen3/demos/mandelbrot/mandelbrot.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef MANDELBROT_H\n#define MANDELBROT_H\n\n#include <Eigen/Core>\n#include <QtGui/QApplication>\n#include <QtGui/QWidget>\n#include <QtCore/QThread>\n\nclass MandelbrotWidget;\n\nclass MandelbrotThread : public QThread\n{\n    friend class MandelbrotWidget;\n    MandelbrotWidget *widget;\n    long long total_iter;\n    int id, max_iter;\n    bool single_precision;\n\n  public:\n    MandelbrotThread(MandelbrotWidget *w, int i) : widget(w), id(i) {}\n    void run();\n    template<typename Real> void render(int img_width, int img_height);\n};\n\nclass MandelbrotWidget : public QWidget\n{\n    Q_OBJECT\n\n    friend class MandelbrotThread;\n    Eigen::Vector2d center;\n    double xradius;\n    int size;\n    unsigned char *buffer;\n    QPoint lastpos;\n    int draft;\n    MandelbrotThread **threads;\n    int threadcount;\n\n  protected:\n    void resizeEvent(QResizeEvent *);\n    void paintEvent(QPaintEvent *);\n    void mousePressEvent(QMouseEvent *event);\n    void mouseMoveEvent(QMouseEvent *event);\n\n  public:\n    MandelbrotWidget() : QWidget(), center(0,0), xradius(2),\n                         size(0), buffer(0), draft(16)\n    {\n      setAutoFillBackground(false);\n      threadcount = QThread::idealThreadCount();\n      threads = new MandelbrotThread*[threadcount];\n      for(int th = 0; th < threadcount; th++) threads[th] = new MandelbrotThread(this, th);\n    }\n    ~MandelbrotWidget()\n    {\n      if(buffer) delete[]buffer;\n      for(int th = 0; th < threadcount; th++) delete threads[th];\n      delete[] threads;\n    }\n};\n\n#endif // MANDELBROT_H\n"
  },
  {
    "path": "3rdparty/eigen3/demos/mix_eigen_and_c/README",
    "content": "This is an example of how one can wrap some of Eigen into a C library.\n\nTo try this with GCC, do:\n\n  g++ -c binary_library.cpp -O2 -msse2 -I ../..\n  gcc example.c binary_library.o -o example -lstdc++\n  ./example\n\nTODO: add CMakeLists, add more explanations here\n"
  },
  {
    "path": "3rdparty/eigen3/demos/mix_eigen_and_c/binary_library.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n// This C++ file compiles to binary code that can be linked to by your C program,\n// thanks to the extern \"C\" syntax used in the declarations in binary_library.h.\n\n#include \"binary_library.h\"\n\n#include <Eigen/Core>\n\nusing namespace Eigen;\n\n/************************* pointer conversion methods **********************************************/\n\n////// class MatrixXd //////\n\ninline MatrixXd& c_to_eigen(C_MatrixXd* ptr)\n{\n  return *reinterpret_cast<MatrixXd*>(ptr);\n}\n\ninline const MatrixXd& c_to_eigen(const C_MatrixXd* ptr)\n{\n  return *reinterpret_cast<const MatrixXd*>(ptr);\n}\n\ninline C_MatrixXd* eigen_to_c(MatrixXd& ref)\n{\n  return reinterpret_cast<C_MatrixXd*>(&ref);\n}\n\ninline const C_MatrixXd* eigen_to_c(const MatrixXd& ref)\n{\n  return reinterpret_cast<const C_MatrixXd*>(&ref);\n}\n\n////// class Map<MatrixXd> //////\n\ninline Map<MatrixXd>& c_to_eigen(C_Map_MatrixXd* ptr)\n{\n  return *reinterpret_cast<Map<MatrixXd>*>(ptr);\n}\n\ninline const Map<MatrixXd>& c_to_eigen(const C_Map_MatrixXd* ptr)\n{\n  return *reinterpret_cast<const Map<MatrixXd>*>(ptr);\n}\n\ninline C_Map_MatrixXd* eigen_to_c(Map<MatrixXd>& ref)\n{\n  return reinterpret_cast<C_Map_MatrixXd*>(&ref);\n}\n\ninline const C_Map_MatrixXd* eigen_to_c(const Map<MatrixXd>& ref)\n{\n  return reinterpret_cast<const C_Map_MatrixXd*>(&ref);\n}\n\n\n/************************* implementation of classes **********************************************/\n\n\n////// class MatrixXd //////\n\n\nC_MatrixXd* MatrixXd_new(int rows, int cols)\n{\n  return eigen_to_c(*new MatrixXd(rows,cols));\n}\n\nvoid MatrixXd_delete(C_MatrixXd *m)\n{\n  delete &c_to_eigen(m);\n}\n\ndouble* MatrixXd_data(C_MatrixXd *m)\n{\n  return c_to_eigen(m).data();\n}\n\nvoid MatrixXd_set_zero(C_MatrixXd *m)\n{\n  c_to_eigen(m).setZero();\n}\n\nvoid MatrixXd_resize(C_MatrixXd *m, int rows, int cols)\n{\n  c_to_eigen(m).resize(rows,cols);\n}\n\nvoid MatrixXd_copy(C_MatrixXd *dst, const C_MatrixXd *src)\n{\n  c_to_eigen(dst) = c_to_eigen(src);\n}\n\nvoid MatrixXd_copy_map(C_MatrixXd *dst, const C_Map_MatrixXd *src)\n{\n  c_to_eigen(dst) = c_to_eigen(src);\n}\n\nvoid MatrixXd_set_coeff(C_MatrixXd *m, int i, int j, double coeff)\n{\n  c_to_eigen(m)(i,j) = coeff;\n}\n\ndouble MatrixXd_get_coeff(const C_MatrixXd *m, int i, int j)\n{\n  return c_to_eigen(m)(i,j);\n}\n\nvoid MatrixXd_print(const C_MatrixXd *m)\n{\n  std::cout << c_to_eigen(m) << std::endl;\n}\n\nvoid MatrixXd_multiply(const C_MatrixXd *m1, const C_MatrixXd *m2, C_MatrixXd *result)\n{\n  c_to_eigen(result) = c_to_eigen(m1) * c_to_eigen(m2);\n}\n\nvoid MatrixXd_add(const C_MatrixXd *m1, const C_MatrixXd *m2, C_MatrixXd *result)\n{\n  c_to_eigen(result) = c_to_eigen(m1) + c_to_eigen(m2);\n}\n\n\n\n////// class Map_MatrixXd //////\n\n\nC_Map_MatrixXd* Map_MatrixXd_new(double *array, int rows, int cols)\n{\n  return eigen_to_c(*new Map<MatrixXd>(array,rows,cols));\n}\n\nvoid Map_MatrixXd_delete(C_Map_MatrixXd *m)\n{\n  delete &c_to_eigen(m);\n}\n\nvoid Map_MatrixXd_set_zero(C_Map_MatrixXd *m)\n{\n  c_to_eigen(m).setZero();\n}\n\nvoid Map_MatrixXd_copy(C_Map_MatrixXd *dst, const C_Map_MatrixXd *src)\n{\n  c_to_eigen(dst) = c_to_eigen(src);\n}\n\nvoid Map_MatrixXd_copy_matrix(C_Map_MatrixXd *dst, const C_MatrixXd *src)\n{\n  c_to_eigen(dst) = c_to_eigen(src);\n}\n\nvoid Map_MatrixXd_set_coeff(C_Map_MatrixXd *m, int i, int j, double coeff)\n{\n  c_to_eigen(m)(i,j) = coeff;\n}\n\ndouble Map_MatrixXd_get_coeff(const C_Map_MatrixXd *m, int i, int j)\n{\n  return c_to_eigen(m)(i,j);\n}\n\nvoid Map_MatrixXd_print(const C_Map_MatrixXd *m)\n{\n  std::cout << c_to_eigen(m) << std::endl;\n}\n\nvoid Map_MatrixXd_multiply(const C_Map_MatrixXd *m1, const C_Map_MatrixXd *m2, C_Map_MatrixXd *result)\n{\n  c_to_eigen(result) = c_to_eigen(m1) * c_to_eigen(m2);\n}\n\nvoid Map_MatrixXd_add(const C_Map_MatrixXd *m1, const C_Map_MatrixXd *m2, C_Map_MatrixXd *result)\n{\n  c_to_eigen(result) = c_to_eigen(m1) + c_to_eigen(m2);\n}\n"
  },
  {
    "path": "3rdparty/eigen3/demos/mix_eigen_and_c/binary_library.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n// This is a pure C header, no C++ here.\n// The functions declared here will be implemented in C++ but\n// we don't have to know, because thanks to the extern \"C\" syntax,\n// they will be compiled to C object code.\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif\n\n  // just dummy empty structs to give different pointer types,\n  // instead of using void* which would be type unsafe\n  struct C_MatrixXd {};\n  struct C_Map_MatrixXd {};\n\n  // the C_MatrixXd class, wraps some of the functionality\n  // of Eigen::MatrixXd.\n  struct C_MatrixXd* MatrixXd_new(int rows, int cols);\n  void    MatrixXd_delete     (struct C_MatrixXd *m);\n  double* MatrixXd_data       (struct C_MatrixXd *m);\n  void    MatrixXd_set_zero   (struct C_MatrixXd *m);\n  void    MatrixXd_resize     (struct C_MatrixXd *m, int rows, int cols);\n  void    MatrixXd_copy       (struct C_MatrixXd *dst,\n                               const struct C_MatrixXd *src);\n  void    MatrixXd_copy_map   (struct C_MatrixXd *dst,\n                               const struct C_Map_MatrixXd *src);  \n  void    MatrixXd_set_coeff  (struct C_MatrixXd *m,\n                               int i, int j, double coeff);\n  double  MatrixXd_get_coeff  (const struct C_MatrixXd *m,\n                               int i, int j);\n  void    MatrixXd_print      (const struct C_MatrixXd *m);\n  void    MatrixXd_add        (const struct C_MatrixXd *m1,\n                               const struct C_MatrixXd *m2,\n                               struct C_MatrixXd *result);  \n  void    MatrixXd_multiply   (const struct C_MatrixXd *m1,\n                               const struct C_MatrixXd *m2,\n                               struct C_MatrixXd *result);\n  \n  // the C_Map_MatrixXd class, wraps some of the functionality\n  // of Eigen::Map<MatrixXd>\n  struct C_Map_MatrixXd* Map_MatrixXd_new(double *array, int rows, int cols);\n  void   Map_MatrixXd_delete     (struct C_Map_MatrixXd *m);\n  void   Map_MatrixXd_set_zero   (struct C_Map_MatrixXd *m);\n  void   Map_MatrixXd_copy       (struct C_Map_MatrixXd *dst,\n                                  const struct C_Map_MatrixXd *src);\n  void   Map_MatrixXd_copy_matrix(struct C_Map_MatrixXd *dst,\n                                  const struct C_MatrixXd *src);  \n  void   Map_MatrixXd_set_coeff  (struct C_Map_MatrixXd *m,\n                                  int i, int j, double coeff);\n  double Map_MatrixXd_get_coeff  (const struct C_Map_MatrixXd *m,\n                                  int i, int j);\n  void   Map_MatrixXd_print      (const struct C_Map_MatrixXd *m);\n  void   Map_MatrixXd_add        (const struct C_Map_MatrixXd *m1,\n                                  const struct C_Map_MatrixXd *m2,\n                                  struct C_Map_MatrixXd *result);  \n  void   Map_MatrixXd_multiply   (const struct C_Map_MatrixXd *m1,\n                                  const struct C_Map_MatrixXd *m2,\n                                  struct C_Map_MatrixXd *result);\n\n#ifdef __cplusplus\n} // end extern \"C\"\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/demos/mix_eigen_and_c/example.c",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"binary_library.h\"\n#include \"stdio.h\"\n\nvoid demo_MatrixXd()\n{\n  struct C_MatrixXd *matrix1, *matrix2, *result;\n  printf(\"*** demo_MatrixXd ***\\n\");\n  \n  matrix1 = MatrixXd_new(3, 3);\n  MatrixXd_set_zero(matrix1);\n  MatrixXd_set_coeff(matrix1, 0, 1, 2.5);\n  MatrixXd_set_coeff(matrix1, 1, 0, 1.4);\n  printf(\"Here is matrix1:\\n\");\n  MatrixXd_print(matrix1);\n\n  matrix2 = MatrixXd_new(3, 3);\n  MatrixXd_multiply(matrix1, matrix1, matrix2);\n  printf(\"Here is matrix1*matrix1:\\n\");\n  MatrixXd_print(matrix2);\n\n  MatrixXd_delete(matrix1);\n  MatrixXd_delete(matrix2);\n}\n\n// this helper function takes a plain C array and prints it in one line\nvoid print_array(double *array, int n)\n{\n  struct C_Map_MatrixXd *m = Map_MatrixXd_new(array, 1, n);\n  Map_MatrixXd_print(m);\n  Map_MatrixXd_delete(m);\n}\n\nvoid demo_Map_MatrixXd()\n{\n  struct C_Map_MatrixXd *map;\n  double array[5];\n  int i;\n  printf(\"*** demo_Map_MatrixXd ***\\n\");\n  \n  for(i = 0; i < 5; ++i) array[i] = i;\n  printf(\"Initially, the array is:\\n\");\n  print_array(array, 5);\n  \n  map = Map_MatrixXd_new(array, 5, 1);\n  Map_MatrixXd_add(map, map, map);\n  Map_MatrixXd_delete(map);\n\n  printf(\"Now the array is:\\n\");\n  print_array(array, 5);\n}\n\nint main()\n{\n  demo_MatrixXd();\n  demo_Map_MatrixXd();\n}\n"
  },
  {
    "path": "3rdparty/eigen3/demos/opengl/CMakeLists.txt",
    "content": "find_package(Qt4)\nfind_package(OpenGL)\n\nif(QT4_FOUND AND OPENGL_FOUND)\n\n  set(QT_USE_QTOPENGL TRUE)\n  include(${QT_USE_FILE})\n\n  set(CMAKE_INCLUDE_CURRENT_DIR ON)\n\n  include_directories( ${QT_INCLUDE_DIR} )\n\n  set(quaternion_demo_SRCS  gpuhelper.cpp icosphere.cpp camera.cpp trackball.cpp quaternion_demo.cpp)\n\n  qt4_automoc(${quaternion_demo_SRCS})\n\n  add_executable(quaternion_demo ${quaternion_demo_SRCS})\n  add_dependencies(demos quaternion_demo)\n\n  target_link_libraries(quaternion_demo\n    ${QT_QTCORE_LIBRARY}    ${QT_QTGUI_LIBRARY}\n    ${QT_QTOPENGL_LIBRARY}  ${OPENGL_LIBRARIES} )\n\nelse()\n\n  message(STATUS \"OpenGL demo disabled because Qt4 and/or OpenGL have not been found.\")\n\nendif()"
  },
  {
    "path": "3rdparty/eigen3/demos/opengl/README",
    "content": "\nNavigation:\n left button:           rotate around the target\n middle button:         zoom\n left button + ctrl     quake rotate (rotate around camera position)\n middle button + ctrl   walk (progress along camera's z direction)\n left button:           pan (translate in the XY camera's plane)\n\nR : move the camera to initial position\nA : start/stop animation\nC : clear the animation\nG : add a key frame\n\n"
  },
  {
    "path": "3rdparty/eigen3/demos/opengl/camera.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"camera.h\"\n\n#include \"gpuhelper.h\"\n#include <GL/glu.h>\n\n#include \"Eigen/LU\"\nusing namespace Eigen;\n\nCamera::Camera()\n    : mViewIsUptodate(false), mProjIsUptodate(false)\n{\n    mViewMatrix.setIdentity();\n    \n    mFovY = M_PI/3.;\n    mNearDist = 1.;\n    mFarDist = 50000.;\n    \n    mVpX = 0;\n    mVpY = 0;\n\n    setPosition(Vector3f::Constant(100.));\n    setTarget(Vector3f::Zero());\n}\n\nCamera& Camera::operator=(const Camera& other)\n{\n    mViewIsUptodate = false;\n    mProjIsUptodate = false;\n    \n    mVpX = other.mVpX;\n    mVpY = other.mVpY;\n    mVpWidth = other.mVpWidth;\n    mVpHeight = other.mVpHeight;\n\n    mTarget = other.mTarget;\n    mFovY = other.mFovY;\n    mNearDist = other.mNearDist;\n    mFarDist = other.mFarDist;\n    \n    mViewMatrix = other.mViewMatrix;\n    mProjectionMatrix = other.mProjectionMatrix;\n\n    return *this;\n}\n\nCamera::Camera(const Camera& other)\n{\n    *this = other;\n}\n\nCamera::~Camera()\n{\n}\n\n\nvoid Camera::setViewport(uint offsetx, uint offsety, uint width, uint height)\n{\n    mVpX = offsetx;\n    mVpY = offsety;\n    mVpWidth = width;\n    mVpHeight = height;\n    \n    mProjIsUptodate = false;\n}\n\nvoid Camera::setViewport(uint width, uint height)\n{\n    mVpWidth = width;\n    mVpHeight = height;\n    \n    mProjIsUptodate = false;\n}\n\nvoid Camera::setFovY(float value)\n{\n    mFovY = value;\n    mProjIsUptodate = false;\n}\n\nVector3f Camera::direction(void) const\n{\n    return - (orientation() * Vector3f::UnitZ());\n}\nVector3f Camera::up(void) const\n{\n    return orientation() * Vector3f::UnitY();\n}\nVector3f Camera::right(void) const\n{\n    return orientation() * Vector3f::UnitX();\n}\n\nvoid Camera::setDirection(const Vector3f& newDirection)\n{\n    // TODO implement it computing the rotation between newDirection and current dir ?\n    Vector3f up = this->up();\n    \n    Matrix3f camAxes;\n\n    camAxes.col(2) = (-newDirection).normalized();\n    camAxes.col(0) = up.cross( camAxes.col(2) ).normalized();\n    camAxes.col(1) = camAxes.col(2).cross( camAxes.col(0) ).normalized();\n    setOrientation(Quaternionf(camAxes));\n    \n    mViewIsUptodate = false;\n}\n\nvoid Camera::setTarget(const Vector3f& target)\n{\n    mTarget = target;\n    if (!mTarget.isApprox(position()))\n    {\n        Vector3f newDirection = mTarget - position();\n        setDirection(newDirection.normalized());\n    }\n}\n\nvoid Camera::setPosition(const Vector3f& p)\n{\n    mFrame.position = p;\n    mViewIsUptodate = false;\n}\n\nvoid Camera::setOrientation(const Quaternionf& q)\n{\n    mFrame.orientation = q;\n    mViewIsUptodate = false;\n}\n\nvoid Camera::setFrame(const Frame& f)\n{\n  mFrame = f;\n  mViewIsUptodate = false;\n}\n\nvoid Camera::rotateAroundTarget(const Quaternionf& q)\n{\n    Matrix4f mrot, mt, mtm;\n    \n    // update the transform matrix\n    updateViewMatrix();\n    Vector3f t = mViewMatrix * mTarget;\n\n    mViewMatrix = Translation3f(t)\n                * q\n                * Translation3f(-t)\n                * mViewMatrix;\n    \n    Quaternionf qa(mViewMatrix.linear());\n    qa = qa.conjugate();\n    setOrientation(qa);\n    setPosition(- (qa * mViewMatrix.translation()) );\n\n    mViewIsUptodate = true;\n}\n\nvoid Camera::localRotate(const Quaternionf& q)\n{\n    float dist = (position() - mTarget).norm();\n    setOrientation(orientation() * q);\n    mTarget = position() + dist * direction();\n    mViewIsUptodate = false;\n}\n\nvoid Camera::zoom(float d)\n{\n    float dist = (position() - mTarget).norm();\n    if(dist > d)\n    {\n        setPosition(position() + direction() * d);\n        mViewIsUptodate = false;\n    }\n}\n\nvoid Camera::localTranslate(const Vector3f& t)\n{\n  Vector3f trans = orientation() * t;\n  setPosition( position() + trans );\n  setTarget( mTarget + trans );\n\n  mViewIsUptodate = false;\n}\n\nvoid Camera::updateViewMatrix(void) const\n{\n    if(!mViewIsUptodate)\n    {\n        Quaternionf q = orientation().conjugate();\n        mViewMatrix.linear() = q.toRotationMatrix();\n        mViewMatrix.translation() = - (mViewMatrix.linear() * position());\n\n        mViewIsUptodate = true;\n    }\n}\n\nconst Affine3f& Camera::viewMatrix(void) const\n{\n  updateViewMatrix();\n  return mViewMatrix;\n}\n\nvoid Camera::updateProjectionMatrix(void) const\n{\n  if(!mProjIsUptodate)\n  {\n    mProjectionMatrix.setIdentity();\n    float aspect = float(mVpWidth)/float(mVpHeight);\n    float theta = mFovY*0.5;\n    float range = mFarDist - mNearDist;\n    float invtan = 1./tan(theta);\n\n    mProjectionMatrix(0,0) = invtan / aspect;\n    mProjectionMatrix(1,1) = invtan;\n    mProjectionMatrix(2,2) = -(mNearDist + mFarDist) / range;\n    mProjectionMatrix(3,2) = -1;\n    mProjectionMatrix(2,3) = -2 * mNearDist * mFarDist / range;\n    mProjectionMatrix(3,3) = 0;\n    \n    mProjIsUptodate = true;\n  }\n}\n\nconst Matrix4f& Camera::projectionMatrix(void) const\n{\n  updateProjectionMatrix();\n  return mProjectionMatrix;\n}\n\nvoid Camera::activateGL(void)\n{\n  glViewport(vpX(), vpY(), vpWidth(), vpHeight());\n  gpu.loadMatrix(projectionMatrix(),GL_PROJECTION);\n  gpu.loadMatrix(viewMatrix().matrix(),GL_MODELVIEW);\n}\n\n\nVector3f Camera::unProject(const Vector2f& uv, float depth) const\n{\n    Matrix4f inv = mViewMatrix.inverse().matrix();\n    return unProject(uv, depth, inv);\n}\n\nVector3f Camera::unProject(const Vector2f& uv, float depth, const Matrix4f& invModelview) const\n{\n    updateViewMatrix();\n    updateProjectionMatrix();\n    \n    Vector3f a(2.*uv.x()/float(mVpWidth)-1., 2.*uv.y()/float(mVpHeight)-1., 1.);\n    a.x() *= depth/mProjectionMatrix(0,0);\n    a.y() *= depth/mProjectionMatrix(1,1);\n    a.z() = -depth;\n    // FIXME /\\/|\n    Vector4f b = invModelview * Vector4f(a.x(), a.y(), a.z(), 1.);\n    return Vector3f(b.x(), b.y(), b.z());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/demos/opengl/camera.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CAMERA_H\n#define EIGEN_CAMERA_H\n\n#include <Eigen/Geometry>\n#include <QObject>\n// #include <frame.h>\n\nclass Frame\n{\n  public:\n    EIGEN_MAKE_ALIGNED_OPERATOR_NEW\n    \n    inline Frame(const Eigen::Vector3f& pos = Eigen::Vector3f::Zero(),\n                 const Eigen::Quaternionf& o = Eigen::Quaternionf())\n      : orientation(o), position(pos)\n    {}\n    Frame lerp(float alpha, const Frame& other) const\n    {\n      return Frame((1.f-alpha)*position + alpha * other.position,\n                   orientation.slerp(alpha,other.orientation));\n    }\n\n    Eigen::Quaternionf orientation;\n    Eigen::Vector3f position;\n};\n\nclass Camera\n{\n  public:\n    EIGEN_MAKE_ALIGNED_OPERATOR_NEW\n\n    Camera(void);\n    \n    Camera(const Camera& other);\n    \n    virtual ~Camera();\n    \n    Camera& operator=(const Camera& other);\n    \n    void setViewport(uint offsetx, uint offsety, uint width, uint height);\n    void setViewport(uint width, uint height);\n    \n    inline uint vpX(void) const { return mVpX; }\n    inline uint vpY(void) const { return mVpY; }\n    inline uint vpWidth(void) const { return mVpWidth; }\n    inline uint vpHeight(void) const { return mVpHeight; }\n\n    inline float fovY(void) const { return mFovY; }\n    void setFovY(float value);\n    \n    void setPosition(const Eigen::Vector3f& pos);\n    inline const Eigen::Vector3f& position(void) const { return mFrame.position; }\n\n    void setOrientation(const Eigen::Quaternionf& q);\n    inline const Eigen::Quaternionf& orientation(void) const { return mFrame.orientation; }\n\n    void setFrame(const Frame& f);\n    const Frame& frame(void) const { return mFrame; }\n    \n    void setDirection(const Eigen::Vector3f& newDirection);\n    Eigen::Vector3f direction(void) const;\n    void setUp(const Eigen::Vector3f& vectorUp);\n    Eigen::Vector3f up(void) const;\n    Eigen::Vector3f right(void) const;\n    \n    void setTarget(const Eigen::Vector3f& target);\n    inline const Eigen::Vector3f& target(void) { return mTarget; }\n    \n    const Eigen::Affine3f& viewMatrix(void) const;\n    const Eigen::Matrix4f& projectionMatrix(void) const;\n    \n    void rotateAroundTarget(const Eigen::Quaternionf& q);\n    void localRotate(const Eigen::Quaternionf& q);\n    void zoom(float d);\n    \n    void localTranslate(const Eigen::Vector3f& t);\n    \n    /** Setup OpenGL matrices and viewport */\n    void activateGL(void);\n    \n    Eigen::Vector3f unProject(const Eigen::Vector2f& uv, float depth, const Eigen::Matrix4f& invModelview) const;\n    Eigen::Vector3f unProject(const Eigen::Vector2f& uv, float depth) const;\n    \n  protected:\n    void updateViewMatrix(void) const;\n    void updateProjectionMatrix(void) const;\n\n  protected:\n\n    uint mVpX, mVpY;\n    uint mVpWidth, mVpHeight;\n\n    Frame mFrame;\n    \n    mutable Eigen::Affine3f mViewMatrix;\n    mutable Eigen::Matrix4f mProjectionMatrix;\n\n    mutable bool mViewIsUptodate;\n    mutable bool mProjIsUptodate;\n\n    // used by rotateAroundTarget\n    Eigen::Vector3f mTarget;\n    \n    float mFovY;\n    float mNearDist;\n    float mFarDist;\n};\n\n#endif // EIGEN_CAMERA_H\n"
  },
  {
    "path": "3rdparty/eigen3/demos/opengl/gpuhelper.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"gpuhelper.h\"\n#include \"icosphere.h\"\n#include <GL/glu.h>\n// PLEASE don't look at this old code... ;)\n\n#include <fstream>\n#include <algorithm>\n\nGpuHelper gpu;\n\nGpuHelper::GpuHelper()\n{\n    mVpWidth = mVpHeight = 0;\n    mCurrentMatrixTarget = 0;\n    mInitialized = false;\n}\n\nGpuHelper::~GpuHelper()\n{\n}\n\nvoid GpuHelper::pushProjectionMode2D(ProjectionMode2D pm)\n{\n    // switch to 2D projection\n    pushMatrix(Matrix4f::Identity(),GL_PROJECTION);\n\n    if(pm==PM_Normalized)\n    {\n        //glOrtho(-1., 1., -1., 1., 0., 1.);\n    }\n    else if(pm==PM_Viewport)\n    {\n        GLint vp[4];\n        glGetIntegerv(GL_VIEWPORT, vp);\n        glOrtho(0., vp[2], 0., vp[3], -1., 1.);\n    }\n\n    pushMatrix(Matrix4f::Identity(),GL_MODELVIEW);\n}\n\nvoid GpuHelper::popProjectionMode2D(void)\n{\n    popMatrix(GL_PROJECTION);\n    popMatrix(GL_MODELVIEW);\n}\n\nvoid GpuHelper::drawVector(const Vector3f& position, const Vector3f& vec, const Color& color, float aspect /* = 50.*/)\n{\n    static GLUquadricObj *cylindre = gluNewQuadric();\n    glColor4fv(color.data());\n    float length = vec.norm();\n    pushMatrix(GL_MODELVIEW);\n    glTranslatef(position.x(), position.y(), position.z());\n    Vector3f ax = Matrix3f::Identity().col(2).cross(vec);\n    ax.normalize();\n    Vector3f tmp = vec;\n    tmp.normalize();\n    float angle = 180.f/M_PI * acos(tmp.z());\n    if (angle>1e-3)\n        glRotatef(angle, ax.x(), ax.y(), ax.z());\n    gluCylinder(cylindre, length/aspect, length/aspect, 0.8*length, 10, 10);\n    glTranslatef(0.0,0.0,0.8*length);\n    gluCylinder(cylindre, 2.0*length/aspect, 0.0, 0.2*length, 10, 10);\n\n    popMatrix(GL_MODELVIEW);\n}\n\nvoid GpuHelper::drawVectorBox(const Vector3f& position, const Vector3f& vec, const Color& color, float aspect)\n{\n    static GLUquadricObj *cylindre = gluNewQuadric();\n    glColor4fv(color.data());\n    float length = vec.norm();\n    pushMatrix(GL_MODELVIEW);\n    glTranslatef(position.x(), position.y(), position.z());\n    Vector3f ax = Matrix3f::Identity().col(2).cross(vec);\n    ax.normalize();\n    Vector3f tmp = vec;\n    tmp.normalize();\n    float angle = 180.f/M_PI * acos(tmp.z());\n    if (angle>1e-3)\n        glRotatef(angle, ax.x(), ax.y(), ax.z());\n    gluCylinder(cylindre, length/aspect, length/aspect, 0.8*length, 10, 10);\n    glTranslatef(0.0,0.0,0.8*length);\n    glScalef(4.0*length/aspect,4.0*length/aspect,4.0*length/aspect);\n    drawUnitCube();\n    popMatrix(GL_MODELVIEW);\n}\n\nvoid GpuHelper::drawUnitCube(void)\n{\n    static float vertices[][3] = {\n        {-0.5,-0.5,-0.5},\n        { 0.5,-0.5,-0.5},\n        {-0.5, 0.5,-0.5},\n        { 0.5, 0.5,-0.5},\n        {-0.5,-0.5, 0.5},\n        { 0.5,-0.5, 0.5},\n        {-0.5, 0.5, 0.5},\n        { 0.5, 0.5, 0.5}};\n\n    glBegin(GL_QUADS);\n    glNormal3f(0,0,-1); glVertex3fv(vertices[0]); glVertex3fv(vertices[2]); glVertex3fv(vertices[3]); glVertex3fv(vertices[1]);\n    glNormal3f(0,0, 1); glVertex3fv(vertices[4]); glVertex3fv(vertices[5]); glVertex3fv(vertices[7]); glVertex3fv(vertices[6]);\n    glNormal3f(0,-1,0); glVertex3fv(vertices[0]); glVertex3fv(vertices[1]); glVertex3fv(vertices[5]); glVertex3fv(vertices[4]);\n    glNormal3f(0, 1,0); glVertex3fv(vertices[2]); glVertex3fv(vertices[6]); glVertex3fv(vertices[7]); glVertex3fv(vertices[3]);\n    glNormal3f(-1,0,0); glVertex3fv(vertices[0]); glVertex3fv(vertices[4]); glVertex3fv(vertices[6]); glVertex3fv(vertices[2]);\n    glNormal3f( 1,0,0); glVertex3fv(vertices[1]); glVertex3fv(vertices[3]); glVertex3fv(vertices[7]); glVertex3fv(vertices[5]);\n    glEnd();\n}\n\nvoid GpuHelper::drawUnitSphere(int level)\n{\n  static IcoSphere sphere;\n  sphere.draw(level);\n}\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/demos/opengl/gpuhelper.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_GPUHELPER_H\n#define EIGEN_GPUHELPER_H\n\n#include <Eigen/Geometry>\n#include <GL/gl.h>\n#include <vector>\n\nusing namespace Eigen;\n\ntypedef Vector4f Color;\n\nclass GpuHelper\n{\n  public:\n\n    GpuHelper();\n\n    ~GpuHelper();\n\n    enum ProjectionMode2D { PM_Normalized = 1, PM_Viewport = 2 };\n    void pushProjectionMode2D(ProjectionMode2D pm);\n    void popProjectionMode2D();\n\n    /** Multiply the OpenGL matrix \\a matrixTarget by the matrix \\a mat.\n        Essentially, this helper function automatically calls glMatrixMode(matrixTarget) if required\n        and does a proper call to the right glMultMatrix*() function according to the scalar type\n        and storage order.\n        \\warning glMatrixMode() must never be called directly. If your're unsure, use forceMatrixMode().\n        \\sa Matrix, loadMatrix(), forceMatrixMode()\n    */\n    template<typename Scalar, int _Flags>\n    void multMatrix(const Matrix<Scalar,4,4, _Flags, 4,4>& mat, GLenum matrixTarget);\n\n    /** Load the matrix \\a mat to the OpenGL matrix \\a matrixTarget.\n        Essentially, this helper function automatically calls glMatrixMode(matrixTarget) if required\n        and does a proper call to the right glLoadMatrix*() or glLoadIdentity() function according to the scalar type\n        and storage order.\n        \\warning glMatrixMode() must never be called directly. If your're unsure, use forceMatrixMode().\n        \\sa Matrix, multMatrix(), forceMatrixMode()\n    */\n    template<typename Scalar, int _Flags>\n    void loadMatrix(const Eigen::Matrix<Scalar,4,4, _Flags, 4,4>& mat, GLenum matrixTarget);\n\n    template<typename Scalar, typename Derived>\n    void loadMatrix(\n        const Eigen::CwiseNullaryOp<Eigen::internal::scalar_identity_op<Scalar>,Derived>&,\n        GLenum matrixTarget);\n\n    /** Make the matrix \\a matrixTarget the current OpenGL matrix target.\n        Call this function before loadMatrix() or multMatrix() if you cannot guarantee that glMatrixMode()\n        has never been called after the last loadMatrix() or multMatrix() calls.\n        \\todo provides a debug mode checking the sanity of the cached matrix mode.\n    */\n    inline void forceMatrixTarget(GLenum matrixTarget) {glMatrixMode(mCurrentMatrixTarget=matrixTarget);}\n\n    inline void setMatrixTarget(GLenum matrixTarget);\n\n    /** Push the OpenGL matrix \\a matrixTarget and load \\a mat.\n    */\n    template<typename Scalar, int _Flags>\n    inline void pushMatrix(const Matrix<Scalar,4,4, _Flags, 4,4>& mat, GLenum matrixTarget);\n\n    template<typename Scalar, typename Derived>\n    void pushMatrix(\n        const Eigen::CwiseNullaryOp<Eigen::internal::scalar_identity_op<Scalar>,Derived>&,\n        GLenum matrixTarget);\n\n    /** Push and clone the OpenGL matrix \\a matrixTarget\n    */\n    inline void pushMatrix(GLenum matrixTarget);\n\n    /** Pop the OpenGL matrix \\a matrixTarget\n    */\n    inline void popMatrix(GLenum matrixTarget);\n\n    void drawVector(const Vector3f& position, const Vector3f& vec, const Color& color, float aspect = 50.);\n    void drawVectorBox(const Vector3f& position, const Vector3f& vec, const Color& color, float aspect = 50.);\n    void drawUnitCube(void);\n    void drawUnitSphere(int level=0);\n\n    /// draw the \\a nofElement first elements\n    inline void draw(GLenum mode, uint nofElement);\n\n    /// draw a range of elements\n    inline void draw(GLenum mode, uint start, uint end);\n\n    /// draw an indexed subset\n    inline void draw(GLenum mode, const std::vector<uint>* pIndexes);\n\nprotected:\n\n    void update(void);\n\n    GLuint mColorBufferId;\n    int mVpWidth, mVpHeight;\n    GLenum mCurrentMatrixTarget;\n    bool mInitialized;\n};\n\n/** Singleton shortcut\n*/\nextern GpuHelper gpu;\n\n\n/** \\internal\n*/\ntemplate<bool RowMajor, int _Flags> struct GlMatrixHelper;\n\ntemplate<int _Flags> struct GlMatrixHelper<false,_Flags>\n{\n    static void loadMatrix(const Matrix<float, 4,4, _Flags, 4,4>&  mat) { glLoadMatrixf(mat.data()); }\n    static void loadMatrix(const Matrix<double,4,4, _Flags, 4,4>& mat) { glLoadMatrixd(mat.data()); }\n    static void multMatrix(const Matrix<float, 4,4, _Flags, 4,4>&  mat) { glMultMatrixf(mat.data()); }\n    static void multMatrix(const Matrix<double,4,4, _Flags, 4,4>& mat) { glMultMatrixd(mat.data()); }\n};\n\ntemplate<int _Flags> struct GlMatrixHelper<true,_Flags>\n{\n    static void loadMatrix(const Matrix<float, 4,4, _Flags, 4,4>&  mat) { glLoadMatrixf(mat.transpose().eval().data()); }\n    static void loadMatrix(const Matrix<double,4,4, _Flags, 4,4>& mat) { glLoadMatrixd(mat.transpose().eval().data()); }\n    static void multMatrix(const Matrix<float, 4,4, _Flags, 4,4>&  mat) { glMultMatrixf(mat.transpose().eval().data()); }\n    static void multMatrix(const Matrix<double,4,4, _Flags, 4,4>& mat) { glMultMatrixd(mat.transpose().eval().data()); }\n};\n\ninline void GpuHelper::setMatrixTarget(GLenum matrixTarget)\n{\n    if (matrixTarget != mCurrentMatrixTarget)\n        glMatrixMode(mCurrentMatrixTarget=matrixTarget);\n}\n\ntemplate<typename Scalar, int _Flags>\nvoid GpuHelper::multMatrix(const Matrix<Scalar,4,4, _Flags, 4,4>& mat, GLenum matrixTarget)\n{\n    setMatrixTarget(matrixTarget);\n    GlMatrixHelper<_Flags&Eigen::RowMajorBit, _Flags>::multMatrix(mat);\n}\n\ntemplate<typename Scalar, typename Derived>\nvoid GpuHelper::loadMatrix(\n    const Eigen::CwiseNullaryOp<Eigen::internal::scalar_identity_op<Scalar>,Derived>&,\n    GLenum matrixTarget)\n{\n    setMatrixTarget(matrixTarget);\n    glLoadIdentity();\n}\n\ntemplate<typename Scalar, int _Flags>\nvoid GpuHelper::loadMatrix(const Eigen::Matrix<Scalar,4,4, _Flags, 4,4>& mat, GLenum matrixTarget)\n{\n    setMatrixTarget(matrixTarget);\n    GlMatrixHelper<(_Flags&Eigen::RowMajorBit)!=0, _Flags>::loadMatrix(mat);\n}\n\ninline void GpuHelper::pushMatrix(GLenum matrixTarget)\n{\n    setMatrixTarget(matrixTarget);\n    glPushMatrix();\n}\n\ntemplate<typename Scalar, int _Flags>\ninline void GpuHelper::pushMatrix(const Matrix<Scalar,4,4, _Flags, 4,4>& mat, GLenum matrixTarget)\n{\n    pushMatrix(matrixTarget);\n    GlMatrixHelper<_Flags&Eigen::RowMajorBit,_Flags>::loadMatrix(mat);\n}\n\ntemplate<typename Scalar, typename Derived>\nvoid GpuHelper::pushMatrix(\n    const Eigen::CwiseNullaryOp<Eigen::internal::scalar_identity_op<Scalar>,Derived>&,\n    GLenum matrixTarget)\n{\n    pushMatrix(matrixTarget);\n    glLoadIdentity();\n}\n\ninline void GpuHelper::popMatrix(GLenum matrixTarget)\n{\n    setMatrixTarget(matrixTarget);\n    glPopMatrix();\n}\n\ninline void GpuHelper::draw(GLenum mode, uint nofElement)\n{\n    glDrawArrays(mode, 0, nofElement);\n}\n\n\ninline void GpuHelper::draw(GLenum mode, const std::vector<uint>* pIndexes)\n{\n    glDrawElements(mode, pIndexes->size(), GL_UNSIGNED_INT, &(pIndexes->front()));\n}\n\ninline void GpuHelper::draw(GLenum mode, uint start, uint end)\n{\n    glDrawArrays(mode, start, end-start);\n}\n\n#endif // EIGEN_GPUHELPER_H\n"
  },
  {
    "path": "3rdparty/eigen3/demos/opengl/icosphere.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"icosphere.h\"\n\n#include <GL/gl.h>\n#include <map>\n\nusing namespace Eigen;\n\n//--------------------------------------------------------------------------------\n// icosahedron data\n//--------------------------------------------------------------------------------\n#define X .525731112119133606\n#define Z .850650808352039932\n\nstatic GLfloat vdata[12][3] = {\n   {-X, 0.0, Z}, {X, 0.0, Z}, {-X, 0.0, -Z}, {X, 0.0, -Z},\n   {0.0, Z, X}, {0.0, Z, -X}, {0.0, -Z, X}, {0.0, -Z, -X},\n   {Z, X, 0.0}, {-Z, X, 0.0}, {Z, -X, 0.0}, {-Z, -X, 0.0}\n};\n\nstatic GLint tindices[20][3] = {\n   {0,4,1}, {0,9,4}, {9,5,4}, {4,5,8}, {4,8,1},\n   {8,10,1}, {8,3,10}, {5,3,8}, {5,2,3}, {2,7,3},\n   {7,10,3}, {7,6,10}, {7,11,6}, {11,0,6}, {0,1,6},\n   {6,1,10}, {9,0,11}, {9,11,2}, {9,2,5}, {7,2,11} };\n//--------------------------------------------------------------------------------\n\nIcoSphere::IcoSphere(unsigned int levels)\n{\n  // init with an icosahedron\n  for (int i = 0; i < 12; i++)\n    mVertices.push_back(Map<Vector3f>(vdata[i]));\n  mIndices.push_back(new std::vector<int>);\n  std::vector<int>& indices = *mIndices.back();\n  for (int i = 0; i < 20; i++)\n  {\n    for (int k = 0; k < 3; k++)\n      indices.push_back(tindices[i][k]);\n  }\n  mListIds.push_back(0);\n\n  while(mIndices.size()<levels)\n    _subdivide();\n}\n\nconst std::vector<int>& IcoSphere::indices(int level) const\n{\n  while (level>=int(mIndices.size()))\n    const_cast<IcoSphere*>(this)->_subdivide();\n  return *mIndices[level];\n}\n\nvoid IcoSphere::_subdivide(void)\n{\n  typedef unsigned long long Key;\n  std::map<Key,int> edgeMap;\n  const std::vector<int>& indices = *mIndices.back();\n  mIndices.push_back(new std::vector<int>);\n  std::vector<int>& refinedIndices = *mIndices.back();\n  int end = indices.size();\n  for (int i=0; i<end; i+=3)\n  {\n    int ids0[3],  // indices of outer vertices\n        ids1[3];  // indices of edge vertices\n    for (int k=0; k<3; ++k)\n    {\n      int k1 = (k+1)%3;\n      int e0 = indices[i+k];\n      int e1 = indices[i+k1];\n      ids0[k] = e0;\n      if (e1>e0)\n        std::swap(e0,e1);\n      Key edgeKey = Key(e0) | (Key(e1)<<32);\n      std::map<Key,int>::iterator it = edgeMap.find(edgeKey);\n      if (it==edgeMap.end())\n      {\n        ids1[k] = mVertices.size();\n        edgeMap[edgeKey] = ids1[k];\n        mVertices.push_back( (mVertices[e0]+mVertices[e1]).normalized() );\n      }\n      else\n        ids1[k] = it->second;\n    }\n    refinedIndices.push_back(ids0[0]); refinedIndices.push_back(ids1[0]); refinedIndices.push_back(ids1[2]);\n    refinedIndices.push_back(ids0[1]); refinedIndices.push_back(ids1[1]); refinedIndices.push_back(ids1[0]);\n    refinedIndices.push_back(ids0[2]); refinedIndices.push_back(ids1[2]); refinedIndices.push_back(ids1[1]);\n    refinedIndices.push_back(ids1[0]); refinedIndices.push_back(ids1[1]); refinedIndices.push_back(ids1[2]);\n  }\n  mListIds.push_back(0);\n}\n\nvoid IcoSphere::draw(int level)\n{\n  while (level>=int(mIndices.size()))\n    const_cast<IcoSphere*>(this)->_subdivide();\n  if (mListIds[level]==0)\n  {\n    mListIds[level] = glGenLists(1);\n    glNewList(mListIds[level], GL_COMPILE);\n      glVertexPointer(3, GL_FLOAT, 0, mVertices[0].data());\n      glNormalPointer(GL_FLOAT, 0, mVertices[0].data());\n      glEnableClientState(GL_VERTEX_ARRAY);\n      glEnableClientState(GL_NORMAL_ARRAY);\n      glDrawElements(GL_TRIANGLES, mIndices[level]->size(), GL_UNSIGNED_INT, &(mIndices[level]->at(0)));\n      glDisableClientState(GL_VERTEX_ARRAY);\n      glDisableClientState(GL_NORMAL_ARRAY);\n    glEndList();\n  }\n  glCallList(mListIds[level]);\n}\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/demos/opengl/icosphere.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_ICOSPHERE_H\n#define EIGEN_ICOSPHERE_H\n\n#include <Eigen/Core>\n#include <vector>\n\nclass IcoSphere\n{\n  public:\n    IcoSphere(unsigned int levels=1);\n    const std::vector<Eigen::Vector3f>& vertices() const { return mVertices; }\n    const std::vector<int>& indices(int level) const;\n    void draw(int level);\n  protected:\n    void _subdivide();\n    std::vector<Eigen::Vector3f> mVertices;\n    std::vector<std::vector<int>*> mIndices;\n    std::vector<int> mListIds;\n};\n\n#endif // EIGEN_ICOSPHERE_H\n"
  },
  {
    "path": "3rdparty/eigen3/demos/opengl/quaternion_demo.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"quaternion_demo.h\"\n#include \"icosphere.h\"\n\n#include <Eigen/Geometry>\n#include <Eigen/QR>\n#include <Eigen/LU>\n\n#include <iostream>\n#include <QEvent>\n#include <QMouseEvent>\n#include <QInputDialog>\n#include <QGridLayout>\n#include <QButtonGroup>\n#include <QRadioButton>\n#include <QDockWidget>\n#include <QPushButton>\n#include <QGroupBox>\n\nusing namespace Eigen;\n\nclass FancySpheres\n{\n  public:\n    EIGEN_MAKE_ALIGNED_OPERATOR_NEW\n    \n    FancySpheres()\n    {\n      const int levels = 4;\n      const float scale = 0.33;\n      float radius = 100;\n      std::vector<int> parents;\n\n      // leval 0\n      mCenters.push_back(Vector3f::Zero());\n      parents.push_back(-1);\n      mRadii.push_back(radius);\n\n      // generate level 1 using icosphere vertices\n      radius *= 0.45;\n      {\n        float dist = mRadii[0]*0.9;\n        for (int i=0; i<12; ++i)\n        {\n          mCenters.push_back(mIcoSphere.vertices()[i] * dist);\n          mRadii.push_back(radius);\n          parents.push_back(0);\n        }\n      }\n\n      static const float angles [10] = {\n        0, 0,\n        M_PI, 0.*M_PI,\n        M_PI, 0.5*M_PI,\n        M_PI, 1.*M_PI,\n        M_PI, 1.5*M_PI\n      };\n\n      // generate other levels\n      int start = 1;\n      for (int l=1; l<levels; l++)\n      {\n        radius *= scale;\n        int end = mCenters.size();\n        for (int i=start; i<end; ++i)\n        {\n          Vector3f c = mCenters[i];\n          Vector3f ax0 = (c - mCenters[parents[i]]).normalized();\n          Vector3f ax1 = ax0.unitOrthogonal();\n          Quaternionf q;\n          q.setFromTwoVectors(Vector3f::UnitZ(), ax0);\n          Affine3f t = Translation3f(c) * q * Scaling(mRadii[i]+radius);\n          for (int j=0; j<5; ++j)\n          {\n            Vector3f newC = c + ( (AngleAxisf(angles[j*2+1], ax0)\n                                * AngleAxisf(angles[j*2+0] * (l==1 ? 0.35 : 0.5), ax1)) * ax0)\n                                * (mRadii[i] + radius*0.8);\n            mCenters.push_back(newC);\n            mRadii.push_back(radius);\n            parents.push_back(i);\n          }\n        }\n        start = end;\n      }\n    }\n\n    void draw()\n    {\n      int end = mCenters.size();\n      glEnable(GL_NORMALIZE);\n      for (int i=0; i<end; ++i)\n      {\n        Affine3f t = Translation3f(mCenters[i]) * Scaling(mRadii[i]);\n        gpu.pushMatrix(GL_MODELVIEW);\n        gpu.multMatrix(t.matrix(),GL_MODELVIEW);\n        mIcoSphere.draw(2);\n        gpu.popMatrix(GL_MODELVIEW);\n      }\n      glDisable(GL_NORMALIZE);\n    }\n  protected:\n    std::vector<Vector3f> mCenters;\n    std::vector<float> mRadii;\n    IcoSphere mIcoSphere;\n};\n\n\n// generic linear interpolation method\ntemplate<typename T> T lerp(float t, const T& a, const T& b)\n{\n  return a*(1-t) + b*t;\n}\n\n// quaternion slerp\ntemplate<> Quaternionf lerp(float t, const Quaternionf& a, const Quaternionf& b)\n{ return a.slerp(t,b); }\n\n// linear interpolation of a frame using the type OrientationType\n// to perform the interpolation of the orientations\ntemplate<typename OrientationType>\ninline static Frame lerpFrame(float alpha, const Frame& a, const Frame& b)\n{\n  return Frame(lerp(alpha,a.position,b.position),\n               Quaternionf(lerp(alpha,OrientationType(a.orientation),OrientationType(b.orientation))));\n}\n\ntemplate<typename _Scalar> class EulerAngles\n{\npublic:\n  enum { Dim = 3 };\n  typedef _Scalar Scalar;\n  typedef Matrix<Scalar,3,3> Matrix3;\n  typedef Matrix<Scalar,3,1> Vector3;\n  typedef Quaternion<Scalar> QuaternionType;\n\nprotected:\n\n  Vector3 m_angles;\n\npublic:\n\n  EulerAngles() {}\n  inline EulerAngles(Scalar a0, Scalar a1, Scalar a2) : m_angles(a0, a1, a2) {}\n  inline EulerAngles(const QuaternionType& q) { *this = q; }\n\n  const Vector3& coeffs() const { return m_angles; }\n  Vector3& coeffs() { return m_angles; }\n\n  EulerAngles& operator=(const QuaternionType& q)\n  {\n    Matrix3 m = q.toRotationMatrix();\n    return *this = m;\n  }\n\n  EulerAngles& operator=(const Matrix3& m)\n  {\n    // mat =  cy*cz          -cy*sz           sy\n    //        cz*sx*sy+cx*sz  cx*cz-sx*sy*sz -cy*sx\n    //       -cx*cz*sy+sx*sz  cz*sx+cx*sy*sz  cx*cy\n    m_angles.coeffRef(1) = std::asin(m.coeff(0,2));\n    m_angles.coeffRef(0) = std::atan2(-m.coeff(1,2),m.coeff(2,2));\n    m_angles.coeffRef(2) = std::atan2(-m.coeff(0,1),m.coeff(0,0));\n    return *this;\n  }\n\n  Matrix3 toRotationMatrix(void) const\n  {\n    Vector3 c = m_angles.array().cos();\n    Vector3 s = m_angles.array().sin();\n    Matrix3 res;\n    res <<  c.y()*c.z(),                    -c.y()*s.z(),                   s.y(),\n            c.z()*s.x()*s.y()+c.x()*s.z(),  c.x()*c.z()-s.x()*s.y()*s.z(),  -c.y()*s.x(),\n            -c.x()*c.z()*s.y()+s.x()*s.z(), c.z()*s.x()+c.x()*s.y()*s.z(),  c.x()*c.y();\n    return res;\n  }\n\n  operator QuaternionType() { return QuaternionType(toRotationMatrix()); }\n};\n\n// Euler angles slerp\ntemplate<> EulerAngles<float> lerp(float t, const EulerAngles<float>& a, const EulerAngles<float>& b)\n{\n  EulerAngles<float> res;\n  res.coeffs() = lerp(t, a.coeffs(), b.coeffs());\n  return res;\n}\n\n\nRenderingWidget::RenderingWidget()\n{\n  mAnimate = false;\n  mCurrentTrackingMode = TM_NO_TRACK;\n  mNavMode = NavTurnAround;\n  mLerpMode = LerpQuaternion;\n  mRotationMode = RotationStable;\n  mTrackball.setCamera(&mCamera);\n\n  // required to capture key press events\n  setFocusPolicy(Qt::ClickFocus);\n}\n\nvoid RenderingWidget::grabFrame(void)\n{\n    // ask user for a time\n    bool ok = false;\n    double t = 0;\n    if (!m_timeline.empty())\n      t = (--m_timeline.end())->first + 1.;\n    t = QInputDialog::getDouble(this, \"Eigen's RenderingWidget\", \"time value: \",\n      t, 0, 1e3, 1, &ok);\n    if (ok)\n    {\n      Frame aux;\n      aux.orientation = mCamera.viewMatrix().linear();\n      aux.position = mCamera.viewMatrix().translation();\n      m_timeline[t] = aux;\n    }\n}\n\nvoid RenderingWidget::drawScene()\n{\n  static FancySpheres sFancySpheres;\n  float length = 50;\n  gpu.drawVector(Vector3f::Zero(), length*Vector3f::UnitX(), Color(1,0,0,1));\n  gpu.drawVector(Vector3f::Zero(), length*Vector3f::UnitY(), Color(0,1,0,1));\n  gpu.drawVector(Vector3f::Zero(), length*Vector3f::UnitZ(), Color(0,0,1,1));\n\n  // draw the fractal object\n  float sqrt3 = std::sqrt(3.);\n  glLightfv(GL_LIGHT0, GL_AMBIENT, Vector4f(0.5,0.5,0.5,1).data());\n  glLightfv(GL_LIGHT0, GL_DIFFUSE, Vector4f(0.5,1,0.5,1).data());\n  glLightfv(GL_LIGHT0, GL_SPECULAR, Vector4f(1,1,1,1).data());\n  glLightfv(GL_LIGHT0, GL_POSITION, Vector4f(-sqrt3,-sqrt3,sqrt3,0).data());\n\n  glLightfv(GL_LIGHT1, GL_AMBIENT, Vector4f(0,0,0,1).data());\n  glLightfv(GL_LIGHT1, GL_DIFFUSE, Vector4f(1,0.5,0.5,1).data());\n  glLightfv(GL_LIGHT1, GL_SPECULAR, Vector4f(1,1,1,1).data());\n  glLightfv(GL_LIGHT1, GL_POSITION, Vector4f(-sqrt3,sqrt3,-sqrt3,0).data());\n\n  glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, Vector4f(0.7, 0.7, 0.7, 1).data());\n  glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, Vector4f(0.8, 0.75, 0.6, 1).data());\n  glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, Vector4f(1, 1, 1, 1).data());\n  glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, 64);\n\n  glEnable(GL_LIGHTING);\n  glEnable(GL_LIGHT0);\n  glEnable(GL_LIGHT1);\n\n  sFancySpheres.draw();\n  glVertexPointer(3, GL_FLOAT, 0, mVertices[0].data());\n  glNormalPointer(GL_FLOAT, 0, mNormals[0].data());\n  glEnableClientState(GL_VERTEX_ARRAY);\n  glEnableClientState(GL_NORMAL_ARRAY);\n  glDrawArrays(GL_TRIANGLES, 0, mVertices.size());\n  glDisableClientState(GL_VERTEX_ARRAY);\n  glDisableClientState(GL_NORMAL_ARRAY);\n\n  glDisable(GL_LIGHTING);\n}\n\nvoid RenderingWidget::animate()\n{\n  m_alpha += double(m_timer.interval()) * 1e-3;\n\n  TimeLine::const_iterator hi = m_timeline.upper_bound(m_alpha);\n  TimeLine::const_iterator lo = hi;\n  --lo;\n\n  Frame currentFrame;\n\n  if(hi==m_timeline.end())\n  {\n    // end\n    currentFrame = lo->second;\n    stopAnimation();\n  }\n  else if(hi==m_timeline.begin())\n  {\n    // start\n    currentFrame = hi->second;\n  }\n  else\n  {\n    float s = (m_alpha - lo->first)/(hi->first - lo->first);\n    if (mLerpMode==LerpEulerAngles)\n      currentFrame = ::lerpFrame<EulerAngles<float> >(s, lo->second, hi->second);\n    else if (mLerpMode==LerpQuaternion)\n      currentFrame = ::lerpFrame<Eigen::Quaternionf>(s, lo->second, hi->second);\n    else\n    {\n      std::cerr << \"Invalid rotation interpolation mode (abort)\\n\";\n      exit(2);\n    }\n    currentFrame.orientation.coeffs().normalize();\n  }\n\n  currentFrame.orientation = currentFrame.orientation.inverse();\n  currentFrame.position = - (currentFrame.orientation * currentFrame.position);\n  mCamera.setFrame(currentFrame);\n\n  updateGL();\n}\n\nvoid RenderingWidget::keyPressEvent(QKeyEvent * e)\n{\n    switch(e->key())\n    {\n      case Qt::Key_Up:\n        mCamera.zoom(2);\n        break;\n      case Qt::Key_Down:\n        mCamera.zoom(-2);\n        break;\n      // add a frame\n      case Qt::Key_G:\n        grabFrame();\n        break;\n      // clear the time line\n      case Qt::Key_C:\n        m_timeline.clear();\n        break;\n      // move the camera to initial pos\n      case Qt::Key_R:\n        resetCamera();\n        break;\n      // start/stop the animation\n      case Qt::Key_A:\n        if (mAnimate)\n        {\n          stopAnimation();\n        }\n        else\n        {\n          m_alpha = 0;\n          connect(&m_timer, SIGNAL(timeout()), this, SLOT(animate()));\n          m_timer.start(1000/30);\n          mAnimate = true;\n        }\n        break;\n      default:\n        break;\n    }\n\n    updateGL();\n}\n\nvoid RenderingWidget::stopAnimation()\n{\n  disconnect(&m_timer, SIGNAL(timeout()), this, SLOT(animate()));\n  m_timer.stop();\n  mAnimate = false;\n  m_alpha = 0;\n}\n\nvoid RenderingWidget::mousePressEvent(QMouseEvent* e)\n{\n  mMouseCoords = Vector2i(e->pos().x(), e->pos().y());\n  bool fly = (mNavMode==NavFly) || (e->modifiers()&Qt::ControlModifier);\n  switch(e->button())\n  {\n    case Qt::LeftButton:\n      if(fly)\n      {\n        mCurrentTrackingMode = TM_LOCAL_ROTATE;\n        mTrackball.start(Trackball::Local);\n      }\n      else\n      {\n        mCurrentTrackingMode = TM_ROTATE_AROUND;\n        mTrackball.start(Trackball::Around);\n      }\n      mTrackball.track(mMouseCoords);\n      break;\n    case Qt::MidButton:\n      if(fly)\n        mCurrentTrackingMode = TM_FLY_Z;\n      else\n        mCurrentTrackingMode = TM_ZOOM;\n      break;\n    case Qt::RightButton:\n        mCurrentTrackingMode = TM_FLY_PAN;\n      break;\n    default:\n      break;\n  }\n}\nvoid RenderingWidget::mouseReleaseEvent(QMouseEvent*)\n{\n    mCurrentTrackingMode = TM_NO_TRACK;\n    updateGL();\n}\n\nvoid RenderingWidget::mouseMoveEvent(QMouseEvent* e)\n{\n    // tracking\n    if(mCurrentTrackingMode != TM_NO_TRACK)\n    {\n        float dx =   float(e->x() - mMouseCoords.x()) / float(mCamera.vpWidth());\n        float dy = - float(e->y() - mMouseCoords.y()) / float(mCamera.vpHeight());\n\n        // speedup the transformations\n        if(e->modifiers() & Qt::ShiftModifier)\n        {\n          dx *= 10.;\n          dy *= 10.;\n        }\n\n        switch(mCurrentTrackingMode)\n        {\n          case TM_ROTATE_AROUND:\n          case TM_LOCAL_ROTATE:\n            if (mRotationMode==RotationStable)\n            {\n              // use the stable trackball implementation mapping\n              // the 2D coordinates to 3D points on a sphere.\n              mTrackball.track(Vector2i(e->pos().x(), e->pos().y()));\n            }\n            else\n            {\n              // standard approach mapping the x and y displacements as rotations\n              // around the camera's X and Y axes.\n              Quaternionf q = AngleAxisf( dx*M_PI, Vector3f::UnitY())\n                            * AngleAxisf(-dy*M_PI, Vector3f::UnitX());\n              if (mCurrentTrackingMode==TM_LOCAL_ROTATE)\n                mCamera.localRotate(q);\n              else\n                mCamera.rotateAroundTarget(q);\n            }\n            break;\n          case TM_ZOOM :\n            mCamera.zoom(dy*100);\n            break;\n          case TM_FLY_Z :\n            mCamera.localTranslate(Vector3f(0, 0, -dy*200));\n            break;\n          case TM_FLY_PAN :\n            mCamera.localTranslate(Vector3f(dx*200, dy*200, 0));\n            break;\n          default:\n            break;\n        }\n\n        updateGL();\n    }\n\n    mMouseCoords = Vector2i(e->pos().x(), e->pos().y());\n}\n\nvoid RenderingWidget::paintGL()\n{\n  glEnable(GL_DEPTH_TEST);\n  glDisable(GL_CULL_FACE);\n  glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);\n  glDisable(GL_COLOR_MATERIAL);\n  glDisable(GL_BLEND);\n  glDisable(GL_ALPHA_TEST);\n  glDisable(GL_TEXTURE_1D);\n  glDisable(GL_TEXTURE_2D);\n  glDisable(GL_TEXTURE_3D);\n\n  // Clear buffers\n  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);\n\n  mCamera.activateGL();\n\n  drawScene();\n}\n\nvoid RenderingWidget::initializeGL()\n{\n  glClearColor(1., 1., 1., 0.);\n  glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, 1);\n  glDepthMask(GL_TRUE);\n  glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);\n\n  mCamera.setPosition(Vector3f(-200, -200, -200));\n  mCamera.setTarget(Vector3f(0, 0, 0));\n  mInitFrame.orientation = mCamera.orientation().inverse();\n  mInitFrame.position = mCamera.viewMatrix().translation();\n}\n\nvoid RenderingWidget::resizeGL(int width, int height)\n{\n    mCamera.setViewport(width,height);\n}\n\nvoid RenderingWidget::setNavMode(int m)\n{\n  mNavMode = NavMode(m);\n}\n\nvoid RenderingWidget::setLerpMode(int m)\n{\n  mLerpMode = LerpMode(m);\n}\n\nvoid RenderingWidget::setRotationMode(int m)\n{\n  mRotationMode = RotationMode(m);\n}\n\nvoid RenderingWidget::resetCamera()\n{\n  if (mAnimate)\n    stopAnimation();\n  m_timeline.clear();\n  Frame aux0 = mCamera.frame();\n  aux0.orientation = aux0.orientation.inverse();\n  aux0.position = mCamera.viewMatrix().translation();\n  m_timeline[0] = aux0;\n\n  Vector3f currentTarget = mCamera.target();\n  mCamera.setTarget(Vector3f::Zero());\n\n  // compute the rotation duration to move the camera to the target\n  Frame aux1 = mCamera.frame();\n  aux1.orientation = aux1.orientation.inverse();\n  aux1.position = mCamera.viewMatrix().translation();\n  float duration = aux0.orientation.angularDistance(aux1.orientation) * 0.9;\n  if (duration<0.1) duration = 0.1;\n\n  // put the camera at that time step:\n  aux1 = aux0.lerp(duration/2,mInitFrame);\n  // and make it look at the target again\n  aux1.orientation = aux1.orientation.inverse();\n  aux1.position = - (aux1.orientation * aux1.position);\n  mCamera.setFrame(aux1);\n  mCamera.setTarget(Vector3f::Zero());\n\n  // add this camera keyframe\n  aux1.orientation = aux1.orientation.inverse();\n  aux1.position = mCamera.viewMatrix().translation();\n  m_timeline[duration] = aux1;\n\n  m_timeline[2] = mInitFrame;\n  m_alpha = 0;\n  animate();\n  connect(&m_timer, SIGNAL(timeout()), this, SLOT(animate()));\n  m_timer.start(1000/30);\n  mAnimate = true;\n}\n\nQWidget* RenderingWidget::createNavigationControlWidget()\n{\n  QWidget* panel = new QWidget();\n  QVBoxLayout* layout = new QVBoxLayout();\n\n  {\n    QPushButton* but = new QPushButton(\"reset\");\n    but->setToolTip(\"move the camera to initial position (with animation)\");\n    layout->addWidget(but);\n    connect(but, SIGNAL(clicked()), this, SLOT(resetCamera()));\n  }\n  {\n    // navigation mode\n    QGroupBox* box = new QGroupBox(\"navigation mode\");\n    QVBoxLayout* boxLayout = new QVBoxLayout;\n    QButtonGroup* group = new QButtonGroup(panel);\n    QRadioButton* but;\n    but = new QRadioButton(\"turn around\");\n    but->setToolTip(\"look around an object\");\n    group->addButton(but, NavTurnAround);\n    boxLayout->addWidget(but);\n    but = new QRadioButton(\"fly\");\n    but->setToolTip(\"free navigation like a spaceship\\n(this mode can also be enabled pressing the \\\"shift\\\" key)\");\n    group->addButton(but, NavFly);\n    boxLayout->addWidget(but);\n    group->button(mNavMode)->setChecked(true);\n    connect(group, SIGNAL(buttonClicked(int)), this, SLOT(setNavMode(int)));\n    box->setLayout(boxLayout);\n    layout->addWidget(box);\n  }\n  {\n    // track ball, rotation mode\n    QGroupBox* box = new QGroupBox(\"rotation mode\");\n    QVBoxLayout* boxLayout = new QVBoxLayout;\n    QButtonGroup* group = new QButtonGroup(panel);\n    QRadioButton* but;\n    but = new QRadioButton(\"stable trackball\");\n    group->addButton(but, RotationStable);\n    boxLayout->addWidget(but);\n    but->setToolTip(\"use the stable trackball implementation mapping\\nthe 2D coordinates to 3D points on a sphere\");\n    but = new QRadioButton(\"standard rotation\");\n    group->addButton(but, RotationStandard);\n    boxLayout->addWidget(but);\n    but->setToolTip(\"standard approach mapping the x and y displacements\\nas rotations around the camera's X and Y axes\");\n    group->button(mRotationMode)->setChecked(true);\n    connect(group, SIGNAL(buttonClicked(int)), this, SLOT(setRotationMode(int)));\n    box->setLayout(boxLayout);\n    layout->addWidget(box);\n  }\n  {\n    // interpolation mode\n    QGroupBox* box = new QGroupBox(\"spherical interpolation\");\n    QVBoxLayout* boxLayout = new QVBoxLayout;\n    QButtonGroup* group = new QButtonGroup(panel);\n    QRadioButton* but;\n    but = new QRadioButton(\"quaternion slerp\");\n    group->addButton(but, LerpQuaternion);\n    boxLayout->addWidget(but);\n    but->setToolTip(\"use quaternion spherical interpolation\\nto interpolate orientations\");\n    but = new QRadioButton(\"euler angles\");\n    group->addButton(but, LerpEulerAngles);\n    boxLayout->addWidget(but);\n    but->setToolTip(\"use Euler angles to interpolate orientations\");\n    group->button(mNavMode)->setChecked(true);\n    connect(group, SIGNAL(buttonClicked(int)), this, SLOT(setLerpMode(int)));\n    box->setLayout(boxLayout);\n    layout->addWidget(box);\n  }\n  layout->addItem(new QSpacerItem(0,0,QSizePolicy::Minimum,QSizePolicy::Expanding));\n  panel->setLayout(layout);\n  return panel;\n}\n\nQuaternionDemo::QuaternionDemo()\n{\n  mRenderingWidget = new RenderingWidget();\n  setCentralWidget(mRenderingWidget);\n\n  QDockWidget* panel = new QDockWidget(\"navigation\", this);\n  panel->setAllowedAreas((QFlags<Qt::DockWidgetArea>)(Qt::RightDockWidgetArea | Qt::LeftDockWidgetArea));\n  addDockWidget(Qt::RightDockWidgetArea, panel);\n  panel->setWidget(mRenderingWidget->createNavigationControlWidget());\n}\n\nint main(int argc, char *argv[])\n{\n  std::cout << \"Navigation:\\n\";\n  std::cout << \"  left button:           rotate around the target\\n\";\n  std::cout << \"  middle button:         zoom\\n\";\n  std::cout << \"  left button + ctrl     quake rotate (rotate around camera position)\\n\";\n  std::cout << \"  middle button + ctrl   walk (progress along camera's z direction)\\n\";\n  std::cout << \"  left button:           pan (translate in the XY camera's plane)\\n\\n\";\n  std::cout << \"R : move the camera to initial position\\n\";\n  std::cout << \"A : start/stop animation\\n\";\n  std::cout << \"C : clear the animation\\n\";\n  std::cout << \"G : add a key frame\\n\";\n\n  QApplication app(argc, argv);\n  QuaternionDemo demo;\n  demo.resize(600,500);\n  demo.show();\n  return app.exec();\n}\n\n#include \"quaternion_demo.moc\"\n\n"
  },
  {
    "path": "3rdparty/eigen3/demos/opengl/quaternion_demo.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_QUATERNION_DEMO_H\n#define EIGEN_QUATERNION_DEMO_H\n\n#include \"gpuhelper.h\"\n#include \"camera.h\"\n#include \"trackball.h\"\n#include <map>\n#include <QTimer>\n#include <QtGui/QApplication>\n#include <QtOpenGL/QGLWidget>\n#include <QtGui/QMainWindow>\n\nclass RenderingWidget : public QGLWidget\n{\n  Q_OBJECT\n\n    typedef std::map<float,Frame> TimeLine;\n    TimeLine m_timeline;\n    Frame lerpFrame(float t);\n\n    Frame mInitFrame;\n    bool mAnimate;\n    float m_alpha;\n\n    enum TrackMode {\n      TM_NO_TRACK=0, TM_ROTATE_AROUND, TM_ZOOM,\n      TM_LOCAL_ROTATE, TM_FLY_Z, TM_FLY_PAN\n    };\n\n    enum NavMode {\n      NavTurnAround,\n      NavFly\n    };\n\n    enum LerpMode {\n      LerpQuaternion,\n      LerpEulerAngles\n    };\n\n    enum RotationMode {\n      RotationStable,\n      RotationStandard\n    };\n\n    Camera mCamera;\n    TrackMode mCurrentTrackingMode;\n    NavMode mNavMode;\n    LerpMode mLerpMode;\n    RotationMode mRotationMode;\n    Vector2i mMouseCoords;\n    Trackball mTrackball;\n\n    QTimer m_timer;\n\n    void setupCamera();\n\n    std::vector<Vector3f> mVertices;\n    std::vector<Vector3f> mNormals;\n    std::vector<int> mIndices;\n\n  protected slots:\n\n    virtual void animate(void);\n    virtual void drawScene(void);\n\n    virtual void grabFrame(void);\n    virtual void stopAnimation();\n\n    virtual void setNavMode(int);\n    virtual void setLerpMode(int);\n    virtual void setRotationMode(int);\n    virtual void resetCamera();\n\n  protected:\n\n    virtual void initializeGL();\n    virtual void resizeGL(int width, int height);\n    virtual void paintGL();\n    \n    //--------------------------------------------------------------------------------\n    virtual void mousePressEvent(QMouseEvent * e);\n    virtual void mouseReleaseEvent(QMouseEvent * e);\n    virtual void mouseMoveEvent(QMouseEvent * e);\n    virtual void keyPressEvent(QKeyEvent * e);\n    //--------------------------------------------------------------------------------\n\n  public: \n    EIGEN_MAKE_ALIGNED_OPERATOR_NEW\n    \n    RenderingWidget();\n    ~RenderingWidget() { }\n\n    QWidget* createNavigationControlWidget();\n};\n\nclass QuaternionDemo : public QMainWindow\n{\n  Q_OBJECT\n  public:\n    QuaternionDemo();\n  protected:\n    RenderingWidget* mRenderingWidget;\n};\n\n#endif // EIGEN_QUATERNION_DEMO_H\n"
  },
  {
    "path": "3rdparty/eigen3/demos/opengl/trackball.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"trackball.h\"\n#include \"camera.h\"\n\nusing namespace Eigen;\n\nvoid Trackball::track(const Vector2i& point2D)\n{\n  if (mpCamera==0)\n    return;\n  Vector3f newPoint3D;\n  bool newPointOk = mapToSphere(point2D, newPoint3D);\n\n  if (mLastPointOk && newPointOk)\n  {\n    Vector3f axis = mLastPoint3D.cross(newPoint3D).normalized();\n    float cos_angle = mLastPoint3D.dot(newPoint3D);\n    if ( std::abs(cos_angle) < 1.0 )\n    {\n      float angle = 2. * acos(cos_angle);\n      if (mMode==Around)\n        mpCamera->rotateAroundTarget(Quaternionf(AngleAxisf(angle, axis)));\n      else\n        mpCamera->localRotate(Quaternionf(AngleAxisf(-angle, axis)));\n    }\n  }\n\n  mLastPoint3D = newPoint3D;\n  mLastPointOk = newPointOk;\n}\n\nbool Trackball::mapToSphere(const Vector2i& p2, Vector3f& v3)\n{\n  if ((p2.x() >= 0) && (p2.x() <= int(mpCamera->vpWidth())) &&\n      (p2.y() >= 0) && (p2.y() <= int(mpCamera->vpHeight())) )\n  {\n    double x  = (double)(p2.x() - 0.5*mpCamera->vpWidth())  / (double)mpCamera->vpWidth();\n    double y  = (double)(0.5*mpCamera->vpHeight() - p2.y()) / (double)mpCamera->vpHeight();\n    double sinx         = sin(M_PI * x * 0.5);\n    double siny         = sin(M_PI * y * 0.5);\n    double sinx2siny2   = sinx * sinx + siny * siny;\n\n    v3.x() = sinx;\n    v3.y() = siny;\n    v3.z() = sinx2siny2 < 1.0 ? sqrt(1.0 - sinx2siny2) : 0.0;\n\n    return true;\n  }\n  else\n    return false;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/demos/opengl/trackball.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_TRACKBALL_H\n#define EIGEN_TRACKBALL_H\n\n#include <Eigen/Geometry>\n\nclass Camera;\n\nclass Trackball\n{\n  public:\n\n    enum Mode {Around, Local};\n\n    Trackball() : mpCamera(0) {}\n\n    void start(Mode m = Around) { mMode = m; mLastPointOk = false; }\n\n    void setCamera(Camera* pCam) { mpCamera = pCam; }\n\n    void track(const Eigen::Vector2i& newPoint2D);\n\n  protected:\n\n    bool mapToSphere( const Eigen::Vector2i& p2, Eigen::Vector3f& v3);\n\n    Camera* mpCamera;\n    Eigen::Vector3f mLastPoint3D;\n    Mode mMode;\n    bool mLastPointOk;\n\n};\n\n#endif // EIGEN_TRACKBALL_H\n"
  },
  {
    "path": "3rdparty/eigen3/doc/AsciiQuickReference.txt",
    "content": "// A simple quickref for Eigen. Add anything that's missing.\n// Main author: Keir Mierle\n\n#include <Eigen/Dense>\n\nMatrix<double, 3, 3> A;               // Fixed rows and cols. Same as Matrix3d.\nMatrix<double, 3, Dynamic> B;         // Fixed rows, dynamic cols.\nMatrix<double, Dynamic, Dynamic> C;   // Full dynamic. Same as MatrixXd.\nMatrix<double, 3, 3, RowMajor> E;     // Row major; default is column-major.\nMatrix3f P, Q, R;                     // 3x3 float matrix.\nVector3f x, y, z;                     // 3x1 float matrix.\nRowVector3f a, b, c;                  // 1x3 float matrix.\nVectorXd v;                           // Dynamic column vector of doubles\ndouble s;                            \n\n// Basic usage\n// Eigen          // Matlab           // comments\nx.size()          // length(x)        // vector size\nC.rows()          // size(C,1)        // number of rows\nC.cols()          // size(C,2)        // number of columns\nx(i)              // x(i+1)           // Matlab is 1-based\nC(i,j)            // C(i+1,j+1)       //\n\nA.resize(4, 4);   // Runtime error if assertions are on.\nB.resize(4, 9);   // Runtime error if assertions are on.\nA.resize(3, 3);   // Ok; size didn't change.\nB.resize(3, 9);   // Ok; only dynamic cols changed.\n                  \nA << 1, 2, 3,     // Initialize A. The elements can also be\n     4, 5, 6,     // matrices, which are stacked along cols\n     7, 8, 9;     // and then the rows are stacked.\nB << A, A, A;     // B is three horizontally stacked A's.\nA.fill(10);       // Fill A with all 10's.\n\n// Eigen                                    // Matlab\nMatrixXd::Identity(rows,cols)               // eye(rows,cols)\nC.setIdentity(rows,cols)                    // C = eye(rows,cols)\nMatrixXd::Zero(rows,cols)                   // zeros(rows,cols)\nC.setZero(rows,cols)                        // C = zeros(rows,cols)\nMatrixXd::Ones(rows,cols)                   // ones(rows,cols)\nC.setOnes(rows,cols)                        // C = ones(rows,cols)\nMatrixXd::Random(rows,cols)                 // rand(rows,cols)*2-1            // MatrixXd::Random returns uniform random numbers in (-1, 1).\nC.setRandom(rows,cols)                      // C = rand(rows,cols)*2-1\nVectorXd::LinSpaced(size,low,high)          // linspace(low,high,size)'\nv.setLinSpaced(size,low,high)               // v = linspace(low,high,size)'\nVectorXi::LinSpaced(((hi-low)/step)+1,      // low:step:hi\n                    low,low+step*(size-1))  //\n\n\n// Matrix slicing and blocks. All expressions listed here are read/write.\n// Templated size versions are faster. Note that Matlab is 1-based (a size N\n// vector is x(1)...x(N)).\n/******************************************************************************/\n/*                  PLEASE HELP US IMPROVING THIS SECTION                     */\n/* Eigen 3.4 supports a much improved API for sub-matrices, including,        */\n/* slicing and indexing from arrays:                                          */\n/* http://eigen.tuxfamily.org/dox-devel/group__TutorialSlicingIndexing.html   */\n/******************************************************************************/\n// Eigen                           // Matlab\nx.head(n)                          // x(1:n)\nx.head<n>()                        // x(1:n)\nx.tail(n)                          // x(end - n + 1: end)\nx.tail<n>()                        // x(end - n + 1: end)\nx.segment(i, n)                    // x(i+1 : i+n)\nx.segment<n>(i)                    // x(i+1 : i+n)\nP.block(i, j, rows, cols)          // P(i+1 : i+rows, j+1 : j+cols)\nP.block<rows, cols>(i, j)          // P(i+1 : i+rows, j+1 : j+cols)\nP.row(i)                           // P(i+1, :)\nP.col(j)                           // P(:, j+1)\nP.leftCols<cols>()                 // P(:, 1:cols)\nP.leftCols(cols)                   // P(:, 1:cols)\nP.middleCols<cols>(j)              // P(:, j+1:j+cols)\nP.middleCols(j, cols)              // P(:, j+1:j+cols)\nP.rightCols<cols>()                // P(:, end-cols+1:end)\nP.rightCols(cols)                  // P(:, end-cols+1:end)\nP.topRows<rows>()                  // P(1:rows, :)\nP.topRows(rows)                    // P(1:rows, :)\nP.middleRows<rows>(i)              // P(i+1:i+rows, :)\nP.middleRows(i, rows)              // P(i+1:i+rows, :)\nP.bottomRows<rows>()               // P(end-rows+1:end, :)\nP.bottomRows(rows)                 // P(end-rows+1:end, :)\nP.topLeftCorner(rows, cols)        // P(1:rows, 1:cols)\nP.topRightCorner(rows, cols)       // P(1:rows, end-cols+1:end)\nP.bottomLeftCorner(rows, cols)     // P(end-rows+1:end, 1:cols)\nP.bottomRightCorner(rows, cols)    // P(end-rows+1:end, end-cols+1:end)\nP.topLeftCorner<rows,cols>()       // P(1:rows, 1:cols)\nP.topRightCorner<rows,cols>()      // P(1:rows, end-cols+1:end)\nP.bottomLeftCorner<rows,cols>()    // P(end-rows+1:end, 1:cols)\nP.bottomRightCorner<rows,cols>()   // P(end-rows+1:end, end-cols+1:end)\n\n// Of particular note is Eigen's swap function which is highly optimized.\n// Eigen                           // Matlab\nR.row(i) = P.col(j);               // R(i, :) = P(:, j)\nR.col(j1).swap(mat1.col(j2));      // R(:, [j1 j2]) = R(:, [j2, j1])\n\n// Views, transpose, etc;\n/******************************************************************************/\n/*                  PLEASE HELP US IMPROVING THIS SECTION                     */\n/* Eigen 3.4 supports a new API for reshaping:                                */\n/* http://eigen.tuxfamily.org/dox-devel/group__TutorialReshape.html           */\n/******************************************************************************/\n// Eigen                           // Matlab\nR.adjoint()                        // R'\nR.transpose()                      // R.' or conj(R')       // Read-write\nR.diagonal()                       // diag(R)               // Read-write\nx.asDiagonal()                     // diag(x)\nR.transpose().colwise().reverse()  // rot90(R)              // Read-write\nR.rowwise().reverse()              // fliplr(R)\nR.colwise().reverse()              // flipud(R)\nR.replicate(i,j)                   // repmat(P,i,j)\n\n\n// All the same as Matlab, but matlab doesn't have *= style operators.\n// Matrix-vector.  Matrix-matrix.   Matrix-scalar.\ny  = M*x;          R  = P*Q;        R  = P*s;\na  = b*M;          R  = P - Q;      R  = s*P;\na *= M;            R  = P + Q;      R  = P/s;\n                   R *= Q;          R  = s*P;\n                   R += Q;          R *= s;\n                   R -= Q;          R /= s;\n\n// Vectorized operations on each element independently\n// Eigen                       // Matlab\nR = P.cwiseProduct(Q);         // R = P .* Q\nR = P.array() * s.array();     // R = P .* s\nR = P.cwiseQuotient(Q);        // R = P ./ Q\nR = P.array() / Q.array();     // R = P ./ Q\nR = P.array() + s.array();     // R = P + s\nR = P.array() - s.array();     // R = P - s\nR.array() += s;                // R = R + s\nR.array() -= s;                // R = R - s\nR.array() < Q.array();         // R < Q\nR.array() <= Q.array();        // R <= Q\nR.cwiseInverse();              // 1 ./ P\nR.array().inverse();           // 1 ./ P\nR.array().sin()                // sin(P)\nR.array().cos()                // cos(P)\nR.array().pow(s)               // P .^ s\nR.array().square()             // P .^ 2\nR.array().cube()               // P .^ 3\nR.cwiseSqrt()                  // sqrt(P)\nR.array().sqrt()               // sqrt(P)\nR.array().exp()                // exp(P)\nR.array().log()                // log(P)\nR.cwiseMax(P)                  // max(R, P)\nR.array().max(P.array())       // max(R, P)\nR.cwiseMin(P)                  // min(R, P)\nR.array().min(P.array())       // min(R, P)\nR.cwiseAbs()                   // abs(P)\nR.array().abs()                // abs(P)\nR.cwiseAbs2()                  // abs(P.^2)\nR.array().abs2()               // abs(P.^2)\n(R.array() < s).select(P,Q );  // (R < s ? P : Q)\nR = (Q.array()==0).select(P,R) // R(Q==0) = P(Q==0)\nR = P.unaryExpr(ptr_fun(func)) // R = arrayfun(func, P)   // with: scalar func(const scalar &x);\n\n\n// Reductions.\nint r, c;\n// Eigen                  // Matlab\nR.minCoeff()              // min(R(:))\nR.maxCoeff()              // max(R(:))\ns = R.minCoeff(&r, &c)    // [s, i] = min(R(:)); [r, c] = ind2sub(size(R), i);\ns = R.maxCoeff(&r, &c)    // [s, i] = max(R(:)); [r, c] = ind2sub(size(R), i);\nR.sum()                   // sum(R(:))\nR.colwise().sum()         // sum(R)\nR.rowwise().sum()         // sum(R, 2) or sum(R')'\nR.prod()                  // prod(R(:))\nR.colwise().prod()        // prod(R)\nR.rowwise().prod()        // prod(R, 2) or prod(R')'\nR.trace()                 // trace(R)\nR.all()                   // all(R(:))\nR.colwise().all()         // all(R)\nR.rowwise().all()         // all(R, 2)\nR.any()                   // any(R(:))\nR.colwise().any()         // any(R)\nR.rowwise().any()         // any(R, 2)\n\n// Dot products, norms, etc.\n// Eigen                  // Matlab\nx.norm()                  // norm(x).    Note that norm(R) doesn't work in Eigen.\nx.squaredNorm()           // dot(x, x)   Note the equivalence is not true for complex\nx.dot(y)                  // dot(x, y)\nx.cross(y)                // cross(x, y) Requires #include <Eigen/Geometry>\n\n//// Type conversion\n// Eigen                  // Matlab\nA.cast<double>();         // double(A)\nA.cast<float>();          // single(A)\nA.cast<int>();            // int32(A)\nA.real();                 // real(A)\nA.imag();                 // imag(A)\n// if the original type equals destination type, no work is done\n\n// Note that for most operations Eigen requires all operands to have the same type:\nMatrixXf F = MatrixXf::Zero(3,3);\nA += F;                // illegal in Eigen. In Matlab A = A+F is allowed\nA += F.cast<double>(); // F converted to double and then added (generally, conversion happens on-the-fly)\n\n// Eigen can map existing memory into Eigen matrices.\nfloat array[3];\nVector3f::Map(array).fill(10);            // create a temporary Map over array and sets entries to 10\nint data[4] = {1, 2, 3, 4};\nMatrix2i mat2x2(data);                    // copies data into mat2x2\nMatrix2i::Map(data) = 2*mat2x2;           // overwrite elements of data with 2*mat2x2\nMatrixXi::Map(data, 2, 2) += mat2x2;      // adds mat2x2 to elements of data (alternative syntax if size is not know at compile time)\n\n// Solve Ax = b. Result stored in x. Matlab: x = A \\ b.\nx = A.ldlt().solve(b));  // A sym. p.s.d.    #include <Eigen/Cholesky>\nx = A.llt() .solve(b));  // A sym. p.d.      #include <Eigen/Cholesky>\nx = A.lu()  .solve(b));  // Stable and fast. #include <Eigen/LU>\nx = A.qr()  .solve(b));  // No pivoting.     #include <Eigen/QR>\nx = A.svd() .solve(b));  // Stable, slowest. #include <Eigen/SVD>\n// .ldlt() -> .matrixL() and .matrixD()\n// .llt()  -> .matrixL()\n// .lu()   -> .matrixL() and .matrixU()\n// .qr()   -> .matrixQ() and .matrixR()\n// .svd()  -> .matrixU(), .singularValues(), and .matrixV()\n\n// Eigenvalue problems\n// Eigen                          // Matlab\nA.eigenvalues();                  // eig(A);\nEigenSolver<Matrix3d> eig(A);     // [vec val] = eig(A)\neig.eigenvalues();                // diag(val)\neig.eigenvectors();               // vec\n// For self-adjoint matrices use SelfAdjointEigenSolver<>\n"
  },
  {
    "path": "3rdparty/eigen3/doc/B01_Experimental.dox",
    "content": "namespace Eigen {\n\n/** \\page Experimental Experimental parts of Eigen\n\n\\eigenAutoToc\n\n\\section Experimental_summary Summary\n\nWith the 2.0 release, Eigen's API is, to a large extent, stable. However, we wish to retain the freedom to make API incompatible changes. To that effect, we call many parts of Eigen \"experimental\" which means that they are not subject to API stability guarantee.\n\nOur goal is that for the 2.1 release (expected in July 2009) most of these parts become API-stable too.\n\nWe are aware that API stability is a major concern for our users. That's why it's a priority for us to reach it, but at the same time we're being serious about not calling Eigen API-stable too early.\n\nExperimental features may at any time:\n\\li be removed;\n\\li be subject to an API incompatible change;\n\\li introduce API or ABI incompatible changes in your own code if you let them affect your API or ABI.\n\n\\section Experimental_modules Experimental modules\n\nThe following modules are considered entirely experimental, and we make no firm API stability guarantee about them for the time being:\n\\li SVD\n\\li QR\n\\li Cholesky\n\\li Sparse\n\\li Geometry (this one should be mostly stable, but it's a little too early to make a formal guarantee)\n\n\\section Experimental_core Experimental parts of the Core module\n\nIn the Core module, the only classes subject to ABI stability guarantee (meaning that you can use it for data members in your public ABI) is:\n\\li Matrix\n\\li Map\n\nAll other classes offer no ABI guarantee, e.g. the layout of their data can be changed.\n\nThe only classes subject to (even partial) API stability guarantee (meaning that you can safely construct and use objects) are:\n\\li MatrixBase : partial API stability (see below)\n\\li Matrix : full API stability (except for experimental stuff inherited from MatrixBase)\n\\li Map : full API stability (except for experimental stuff inherited from MatrixBase)\n\nAll other classes offer no direct API guarantee, e.g. their methods can be changed; however notice that most classes inherit MatrixBase and that this is where most of their API comes from -- so in practice most of the API is stable.\n\nA few MatrixBase methods are considered experimental, hence not part of any API stability guarantee:\n\\li all methods documented as internal\n\\li all methods hidden in the Doxygen documentation\n\\li all methods marked as experimental\n\\li all methods defined in experimental modules\n\n*/\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/CMakeLists.txt",
    "content": "project(EigenDoc)\n\nset_directory_properties(PROPERTIES EXCLUDE_FROM_ALL TRUE)\n\nproject(EigenDoc)\n\nif(CMAKE_COMPILER_IS_GNUCXX)\n  if(CMAKE_SYSTEM_NAME MATCHES Linux)\n    set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -O1 -g1\")\n  endif()\nendif()\n\n# some examples and snippets needs c++11, so let's check it once\ncheck_cxx_compiler_flag(\"-std=c++11\" EIGEN_COMPILER_SUPPORT_CPP11)\n\noption(EIGEN_INTERNAL_DOCUMENTATION \"Build internal documentation\" OFF)\n\n\n# Set some Doxygen flags\nset(EIGEN_DOXY_PROJECT_NAME             \"Eigen\")\nset(EIGEN_DOXY_OUTPUT_DIRECTORY_SUFFIX  \"\")\nset(EIGEN_DOXY_INPUT                    \"\\\"${Eigen_SOURCE_DIR}/Eigen\\\" \\\"${Eigen_SOURCE_DIR}/doc\\\"\")\nset(EIGEN_DOXY_HTML_COLORSTYLE_HUE      \"220\")\nset(EIGEN_DOXY_TAGFILES                 \"\")\nif(EIGEN_INTERNAL_DOCUMENTATION)\n  set(EIGEN_DOXY_INTERNAL                 \"YES\")\nelse()\n  set(EIGEN_DOXY_INTERNAL                 \"NO\")\nendif()\n\nconfigure_file(\n  ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in\n  ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile\n)\n\nset(EIGEN_DOXY_PROJECT_NAME             \"Eigen-unsupported\")\nset(EIGEN_DOXY_OUTPUT_DIRECTORY_SUFFIX  \"/unsupported\")\nset(EIGEN_DOXY_INPUT                    \"\\\"${Eigen_SOURCE_DIR}/unsupported/Eigen\\\" \\\"${Eigen_SOURCE_DIR}/unsupported/doc\\\"\")\nset(EIGEN_DOXY_HTML_COLORSTYLE_HUE      \"0\")\nset(EIGEN_DOXY_TAGFILES                 \"\\\"${Eigen_BINARY_DIR}/doc/Eigen.doxytags=..\\\"\")\n#set(EIGEN_DOXY_TAGFILES                 \"\")\n\nconfigure_file(\n  ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in\n  ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile-unsupported\n)\n\nconfigure_file(\n  ${CMAKE_CURRENT_SOURCE_DIR}/eigendoxy_header.html.in\n  ${CMAKE_CURRENT_BINARY_DIR}/eigendoxy_header.html\n)\n\nconfigure_file(\n  ${CMAKE_CURRENT_SOURCE_DIR}/eigendoxy_footer.html.in\n  ${CMAKE_CURRENT_BINARY_DIR}/eigendoxy_footer.html\n)\n\nconfigure_file(\n  ${CMAKE_CURRENT_SOURCE_DIR}/eigendoxy_layout.xml.in\n  ${CMAKE_CURRENT_BINARY_DIR}/eigendoxy_layout.xml\n)\n\nconfigure_file(\n  ${Eigen_SOURCE_DIR}/unsupported/doc/eigendoxy_layout.xml.in\n  ${Eigen_BINARY_DIR}/doc/unsupported/eigendoxy_layout.xml\n)\n\nset(examples_targets \"\")\nset(snippets_targets \"\")\n\nadd_definitions(\"-DEIGEN_MAKING_DOCS\")\nadd_custom_target(all_examples)\n\nadd_subdirectory(examples)\nadd_subdirectory(special_examples)\nadd_subdirectory(snippets)\n\nadd_custom_target(\n  doc-eigen-prerequisites\n  ALL\n  COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/html/\n  COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/eigen_navtree_hacks.js           ${CMAKE_CURRENT_BINARY_DIR}/html/\n  COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/Eigen_Silly_Professor_64x64.png  ${CMAKE_CURRENT_BINARY_DIR}/html/\n  COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/ftv2pnode.png                    ${CMAKE_CURRENT_BINARY_DIR}/html/\n  COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/ftv2node.png                     ${CMAKE_CURRENT_BINARY_DIR}/html/\n  COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/AsciiQuickReference.txt          ${CMAKE_CURRENT_BINARY_DIR}/html/\n  WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}\n)\n\nadd_custom_target(\n  doc-unsupported-prerequisites\n  ALL\n  COMMAND ${CMAKE_COMMAND} -E make_directory ${Eigen_BINARY_DIR}/doc/html/unsupported\n  COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/eigen_navtree_hacks.js           ${CMAKE_CURRENT_BINARY_DIR}/html/unsupported/\n  COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/Eigen_Silly_Professor_64x64.png  ${CMAKE_CURRENT_BINARY_DIR}/html/unsupported/\n  COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/ftv2pnode.png                    ${CMAKE_CURRENT_BINARY_DIR}/html/unsupported/\n  COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/ftv2node.png                     ${CMAKE_CURRENT_BINARY_DIR}/html/unsupported/\n  WORKING_DIRECTORY ${Eigen_BINARY_DIR}/doc\n)\n\nadd_dependencies(doc-eigen-prerequisites all_snippets all_examples)\nadd_dependencies(doc-unsupported-prerequisites unsupported_snippets unsupported_examples)\n\nadd_custom_target(doc ALL\n  COMMAND doxygen\n  COMMAND doxygen Doxyfile-unsupported\n  COMMAND ${CMAKE_COMMAND} -E copy ${Eigen_BINARY_DIR}/doc/html/group__TopicUnalignedArrayAssert.html ${Eigen_BINARY_DIR}/doc/html/TopicUnalignedArrayAssert.html\n  COMMAND ${CMAKE_COMMAND} -E rename html eigen-doc\n  COMMAND ${CMAKE_COMMAND} -E remove eigen-doc/eigen-doc.tgz eigen-doc/unsupported/_formulas.log eigen-doc/_formulas.log\n  COMMAND ${CMAKE_COMMAND} -E tar cfz eigen-doc.tgz eigen-doc\n  COMMAND ${CMAKE_COMMAND} -E rename eigen-doc.tgz eigen-doc/eigen-doc.tgz\n  COMMAND ${CMAKE_COMMAND} -E rename eigen-doc html\n  WORKING_DIRECTORY ${Eigen_BINARY_DIR}/doc)\n\nadd_dependencies(doc doc-eigen-prerequisites doc-unsupported-prerequisites)\n"
  },
  {
    "path": "3rdparty/eigen3/doc/ClassHierarchy.dox",
    "content": "namespace Eigen {\n\n/** \\page TopicClassHierarchy The class hierarchy\n\nThis page explains the design of the core classes in Eigen's class hierarchy and how they fit together. Casual\nusers probably need not concern themselves with these details, but it may be useful for both advanced users\nand Eigen developers.\n\n\\eigenAutoToc\n\n\n\\section TopicClassHierarchyPrinciples Principles\n\nEigen's class hierarchy is designed so that virtual functions are avoided where their overhead would\nsignificantly impair performance. Instead, Eigen achieves polymorphism with the Curiously Recurring Template\nPattern (CRTP). In this pattern, the base class (for instance, \\c MatrixBase) is in fact a template class, and\nthe derived class (for instance, \\c Matrix) inherits the base class with the derived class itself as a\ntemplate argument (in this case, \\c Matrix inherits from \\c MatrixBase&lt;Matrix&gt;). This allows Eigen to\nresolve the polymorphic function calls at compile time.\n\nIn addition, the design avoids multiple inheritance. One reason for this is that in our experience, some\ncompilers (like MSVC) fail to perform empty base class optimization, which is crucial for our fixed-size\ntypes.\n\n\n\\section TopicClassHierarchyCoreClasses The core classes\n\nThese are the classes that you need to know about if you want to write functions that accept or return Eigen\nobjects.\n\n  - Matrix means plain dense matrix. If \\c m is a \\c %Matrix, then, for instance, \\c m+m is no longer a \n    \\c %Matrix, it is a \"matrix expression\".\n  - MatrixBase means dense matrix expression. This means that a \\c %MatrixBase is something that can be\n    added, matrix-multiplied, LU-decomposed, QR-decomposed... All matrix expression classes, including \n    \\c %Matrix itself, inherit \\c %MatrixBase.\n  - Array means plain dense array. If \\c x is an \\c %Array, then, for instance, \\c x+x is no longer an \n    \\c %Array, it is an \"array expression\".\n  - ArrayBase means dense array expression. This means that an \\c %ArrayBase is something that can be\n    added, array-multiplied, and on which you can perform all sorts of array operations... All array\n    expression classes, including \\c %Array itself, inherit \\c %ArrayBase.\n  - DenseBase means dense (matrix or array) expression. Both \\c %ArrayBase and \\c %MatrixBase inherit\n    \\c %DenseBase. \\c %DenseBase is where all the methods go that apply to dense expressions regardless of\n    whether they are matrix or array expressions. For example, the \\link DenseBase::block() block(...) \\endlink\n    methods are in \\c %DenseBase.\n\n\\section TopicClassHierarchyBaseClasses Base classes\n\nThese classes serve as base classes for the five core classes mentioned above. They are more internal and so\nless interesting for users of the Eigen library.\n\n  - PlainObjectBase means dense (matrix or array) plain object, i.e. something that stores its own dense\n    array of coefficients. This is where, for instance, the \\link PlainObjectBase::resize() resize() \\endlink\n    methods go. \\c %PlainObjectBase is inherited by \\c %Matrix and by \\c %Array. But above, we said that \n    \\c %Matrix inherits \\c %MatrixBase and \\c %Array inherits \\c %ArrayBase. So does that mean multiple\n    inheritance? No, because \\c %PlainObjectBase \\e itself inherits \\c %MatrixBase or \\c %ArrayBase depending\n    on whether we are in the matrix or array case. When we said above that \\c %Matrix inherited \n    \\c %MatrixBase, we omitted to say it does so indirectly via \\c %PlainObjectBase. Same for \\c %Array.\n  - DenseCoeffsBase means something that has dense coefficient accessors. It is a base class for\n    \\c %DenseBase. The reason for \\c %DenseCoeffsBase to exist is that the set of available coefficient\n    accessors is very different depending on whether a dense expression has direct memory access or not (the\n    \\c DirectAccessBit flag). For example, if \\c x is a plain matrix, then \\c x has direct access, and \n    \\c x.transpose() and \\c x.block(...) also have direct access, because their coefficients can be read right\n    off memory, but for example, \\c x+x does not have direct memory access, because obtaining any of its\n    coefficients requires a computation (an addition), it can't be just read off memory.\n  - EigenBase means anything that can be evaluated into a plain dense matrix or array (even if that would\n    be a bad idea). \\c %EigenBase is really the absolute base class for anything that remotely looks like a\n    matrix or array. It is a base class for \\c %DenseCoeffsBase, so it sits below all our dense class\n    hierarchy, but it is not limited to dense expressions. For example, \\c %EigenBase is also inherited by\n    diagonal matrices, sparse matrices, etc...\n\n\n\\section TopicClassHierarchyInheritanceDiagrams Inheritance diagrams\n\nThe inheritance diagram for Matrix looks as follows:\n\n<pre>\nEigenBase&lt;%Matrix&gt;\n  <-- DenseCoeffsBase&lt;%Matrix&gt;    (direct access case)\n    <-- DenseBase&lt;%Matrix&gt;\n      <-- MatrixBase&lt;%Matrix&gt;\n        <-- PlainObjectBase&lt;%Matrix&gt;    (matrix case)\n          <-- Matrix\n</pre>\n\nThe inheritance diagram for Array looks as follows:\n\n<pre>\nEigenBase&lt;%Array&gt;\n  <-- DenseCoeffsBase&lt;%Array&gt;    (direct access case)\n    <-- DenseBase&lt;%Array&gt;\n      <-- ArrayBase&lt;%Array&gt;\n        <-- PlainObjectBase&lt;%Array&gt;    (array case)\n          <-- Array\n</pre>\n\nThe inheritance diagram for some other matrix expression class, here denoted by \\c SomeMatrixXpr, looks as\nfollows:\n\n<pre>\nEigenBase&lt;SomeMatrixXpr&gt;\n  <-- DenseCoeffsBase&lt;SomeMatrixXpr&gt;    (direct access or no direct access case)\n    <-- DenseBase&lt;SomeMatrixXpr&gt;\n      <-- MatrixBase&lt;SomeMatrixXpr&gt;\n        <-- SomeMatrixXpr\n</pre>\n\nThe inheritance diagram for some other array expression class, here denoted by \\c SomeArrayXpr, looks as\nfollows:\n\n<pre>\nEigenBase&lt;SomeArrayXpr&gt;\n  <-- DenseCoeffsBase&lt;SomeArrayXpr&gt;    (direct access or no direct access case)\n    <-- DenseBase&lt;SomeArrayXpr&gt;\n      <-- ArrayBase&lt;SomeArrayXpr&gt;\n        <-- SomeArrayXpr\n</pre>\n\nFinally, consider an example of something that is not a dense expression, for instance a diagonal matrix. The\ncorresponding inheritance diagram is:\n\n<pre>\nEigenBase&lt;%DiagonalMatrix&gt;\n  <-- DiagonalBase&lt;%DiagonalMatrix&gt;\n    <-- DiagonalMatrix\n</pre>\n\n\n*/\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/CoeffwiseMathFunctionsTable.dox",
    "content": "namespace Eigen {\n\n/** \\eigenManualPage CoeffwiseMathFunctions Catalog of coefficient-wise math functions\n\n\n<!-- <span style=\"font-size:300%; color:red; font-weight: 900;\">!WORK IN PROGRESS!</span> -->\n\nThis table presents a catalog of the coefficient-wise math functions supported by %Eigen.\nIn this table, \\c a, \\c b, refer to Array objects or expressions, and \\c m refers to a linear algebra Matrix/Vector object. Standard scalar types are abbreviated as follows:\n  - \\c int: \\c i32\n  - \\c float: \\c f\n  - \\c double: \\c d\n  - \\c std::complex<float>: \\c cf\n  - \\c std::complex<double>: \\c cd\n\nFor each row, the first column list the equivalent calls for arrays, and matrices when supported. Of course, all functions are available for matrices by first casting it as an array: \\c m.array().\n\nThe third column gives some hints in the underlying scalar implementation. In most cases, %Eigen does not implement itself the math function but relies on the STL for standard scalar types, or user-provided functions for custom scalar types.\nFor instance, some simply calls the respective function of the STL while preserving <a href=\"http://en.cppreference.com/w/cpp/language/adl\">argument-dependent lookup</a> for custom types.\nThe following:\n\\code\nusing std::foo;\nfoo(a[i]);\n\\endcode\nmeans that the STL's function \\c std::foo will be potentially called if it is compatible with the underlying scalar type. If not, then the user must ensure that an overload of the function foo is available for the given scalar type (usually defined in the same namespace as the given scalar type).\nThis also means that, unless specified, if the function \\c std::foo is available only in some recent c++ versions (e.g., c++11), then the respective %Eigen's function/method will be usable on standard types only if the compiler support the required c++ version.\n\n<table class=\"manual-hl\">\n<tr>\n<th>API</th><th>Description</th><th>Default scalar implementation</th><th>SIMD</th>\n</tr>\n<tr><td colspan=\"4\"></td></tr>\n<tr><th colspan=\"4\">Basic operations</th></tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_abs\n  a.\\link ArrayBase::abs abs\\endlink(); \\n\n  \\link Eigen::abs abs\\endlink(a); \\n\n  m.\\link MatrixBase::cwiseAbs cwiseAbs\\endlink();\n  </td>\n  <td>absolute value (\\f$ |a_i| \\f$) </td>\n  <td class=\"code\">\n  using <a href=\"http://en.cppreference.com/w/cpp/numeric/math/fabs\">std::abs</a>; \\n\n  abs(a[i]);\n  </td>\n  <td>SSE2, AVX (i32,f,d)</td>\n</tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_inverse\n  a.\\link ArrayBase::inverse inverse\\endlink(); \\n\n  \\link Eigen::inverse inverse\\endlink(a); \\n\n  m.\\link MatrixBase::cwiseInverse cwiseInverse\\endlink();\n  </td>\n  <td>inverse value (\\f$ 1/a_i \\f$) </td>\n  <td class=\"code\">\n  1/a[i];\n  </td>\n  <td>All engines (f,d,fc,fd)</td>\n</tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_conj\n  a.\\link ArrayBase::conjugate conjugate\\endlink(); \\n\n  \\link Eigen::conj conj\\endlink(a); \\n\n  m.\\link MatrixBase::conjugate conjugate\\endlink();\n  </td>\n  <td><a href=\"https://en.wikipedia.org/wiki/Complex_conjugate\">complex conjugate</a> (\\f$ \\bar{a_i} \\f$),\\n\n  no-op for real </td>\n  <td class=\"code\">\n  using <a href=\"http://en.cppreference.com/w/cpp/numeric/complex/conj\">std::conj</a>; \\n\n  conj(a[i]);\n  </td>\n  <td>All engines (fc,fd)</td>\n</tr>\n<tr>\n<th colspan=\"4\">Exponential functions</th>\n</tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_exp\n  a.\\link ArrayBase::exp exp\\endlink(); \\n\n  \\link Eigen::exp exp\\endlink(a);\n  </td>\n  <td>\\f$ e \\f$ raised to the given power (\\f$ e^{a_i} \\f$) </td>\n  <td class=\"code\">\n  using <a href=\"http://en.cppreference.com/w/cpp/numeric/math/exp\">std::exp</a>; \\n\n  exp(a[i]);\n  </td>\n  <td>SSE2, AVX (f,d)</td>\n</tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_log\n  a.\\link ArrayBase::log log\\endlink(); \\n\n  \\link Eigen::log log\\endlink(a);\n  </td>\n  <td>natural (base \\f$ e \\f$) logarithm (\\f$ \\ln({a_i}) \\f$)</td>\n  <td class=\"code\">\n  using <a href=\"http://en.cppreference.com/w/cpp/numeric/math/log\">std::log</a>; \\n\n  log(a[i]);\n  </td>\n  <td>SSE2, AVX (f)</td>\n</tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_log1p\n  a.\\link ArrayBase::log1p log1p\\endlink(); \\n\n  \\link Eigen::log1p log1p\\endlink(a);\n  </td>\n  <td>natural (base \\f$ e \\f$) logarithm of 1 plus \\n the given number (\\f$ \\ln({1+a_i}) \\f$)</td>\n  <td>built-in generic implementation based on \\c log,\\n\n  plus \\c using <a href=\"http://en.cppreference.com/w/cpp/numeric/math/log1p\">\\c std::log1p </a>; \\cpp11</td>\n  <td></td>\n</tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_log10\n  a.\\link ArrayBase::log10 log10\\endlink(); \\n\n  \\link Eigen::log10 log10\\endlink(a);\n  </td>\n  <td>base 10 logarithm (\\f$ \\log_{10}({a_i}) \\f$)</td>\n  <td class=\"code\">\n  using <a href=\"http://en.cppreference.com/w/cpp/numeric/math/log10\">std::log10</a>; \\n\n  log10(a[i]);\n  </td>\n  <td></td>\n</tr>\n<tr>\n<th colspan=\"4\">Power functions</th>\n</tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_pow\n  a.\\link ArrayBase::pow pow\\endlink(b); \\n\n  \\link ArrayBase::pow(const Eigen::ArrayBase< Derived > &x, const Eigen::ArrayBase< ExponentDerived > &exponents) pow\\endlink(a,b);\n  </td>\n  <!-- For some reason Doxygen thinks that pow is in ArrayBase namespace -->\n  <td>raises a number to the given power (\\f$ a_i ^ {b_i} \\f$) \\n \\c a and \\c b can be either an array or scalar.</td>\n  <td class=\"code\">\n  using <a href=\"http://en.cppreference.com/w/cpp/numeric/math/pow\">std::pow</a>; \\n\n  pow(a[i],b[i]);\\n\n  (plus builtin for integer types)</td>\n  <td></td>\n</tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_sqrt\n  a.\\link ArrayBase::sqrt sqrt\\endlink(); \\n\n  \\link Eigen::sqrt sqrt\\endlink(a);\\n\n  m.\\link MatrixBase::cwiseSqrt cwiseSqrt\\endlink();\n  </td>\n  <td>computes square root (\\f$ \\sqrt a_i \\f$)</td>\n  <td class=\"code\">\n  using <a href=\"http://en.cppreference.com/w/cpp/numeric/math/sqrt\">std::sqrt</a>; \\n\n  sqrt(a[i]);</td>\n  <td>SSE2, AVX (f,d)</td>\n</tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_rsqrt\n  a.\\link ArrayBase::rsqrt rsqrt\\endlink(); \\n\n  \\link Eigen::rsqrt rsqrt\\endlink(a);\n  </td>\n  <td><a href=\"https://en.wikipedia.org/wiki/Fast_inverse_square_root\">reciprocal square root</a> (\\f$ 1/{\\sqrt a_i} \\f$)</td>\n  <td class=\"code\">\n  using <a href=\"http://en.cppreference.com/w/cpp/numeric/math/sqrt\">std::sqrt</a>; \\n\n  1/sqrt(a[i]); \\n\n  </td>\n  <td>SSE2, AVX, AltiVec, ZVector (f,d)\\n\n  (approx + 1 Newton iteration)</td>\n</tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_square\n  a.\\link ArrayBase::square square\\endlink(); \\n\n  \\link Eigen::square square\\endlink(a);\n  </td>\n  <td>computes square power (\\f$ a_i^2 \\f$)</td>\n  <td class=\"code\">\n  a[i]*a[i]</td>\n  <td>All (i32,f,d,cf,cd)</td>\n</tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_cube\n  a.\\link ArrayBase::cube cube\\endlink(); \\n\n  \\link Eigen::cube cube\\endlink(a);\n  </td>\n  <td>computes cubic power (\\f$ a_i^3 \\f$)</td>\n  <td class=\"code\">\n  a[i]*a[i]*a[i]</td>\n  <td>All (i32,f,d,cf,cd)</td>\n</tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_abs2\n  a.\\link ArrayBase::abs2 abs2\\endlink(); \\n\n  \\link Eigen::abs2 abs2\\endlink(a);\\n\n  m.\\link MatrixBase::cwiseAbs2 cwiseAbs2\\endlink();\n  </td>\n  <td>computes the squared absolute value (\\f$ |a_i|^2 \\f$)</td>\n  <td class=\"code\">\n  real:    a[i]*a[i] \\n\n  complex:  real(a[i])*real(a[i]) \\n\n  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + imag(a[i])*imag(a[i])</td>\n  <td>All (i32,f,d)</td>\n</tr>\n<tr>\n<th colspan=\"4\">Trigonometric functions</th>\n</tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_sin\n  a.\\link ArrayBase::sin sin\\endlink(); \\n\n  \\link Eigen::sin sin\\endlink(a);\n  </td>\n  <td>computes sine</td>\n  <td class=\"code\">\n  using <a href=\"http://en.cppreference.com/w/cpp/numeric/math/sin\">std::sin</a>; \\n\n  sin(a[i]);</td>\n  <td>SSE2, AVX (f)</td>\n</tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_cos\n  a.\\link ArrayBase::cos cos\\endlink(); \\n\n  \\link Eigen::cos cos\\endlink(a);\n  </td>\n  <td>computes cosine</td>\n  <td class=\"code\">\n  using <a href=\"http://en.cppreference.com/w/cpp/numeric/math/cos\">std::cos</a>; \\n\n  cos(a[i]);</td>\n  <td>SSE2, AVX (f)</td>\n</tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_tan\n  a.\\link ArrayBase::tan tan\\endlink(); \\n\n  \\link Eigen::tan tan\\endlink(a);\n  </td>\n  <td>computes tangent</td>\n  <td class=\"code\">\n  using <a href=\"http://en.cppreference.com/w/cpp/numeric/math/tan\">std::tan</a>; \\n\n  tan(a[i]);</td>\n  <td></td>\n</tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_asin\n  a.\\link ArrayBase::asin asin\\endlink(); \\n\n  \\link Eigen::asin asin\\endlink(a);\n  </td>\n  <td>computes arc sine (\\f$ \\sin^{-1} a_i \\f$)</td>\n  <td class=\"code\">\n  using <a href=\"http://en.cppreference.com/w/cpp/numeric/math/asin\">std::asin</a>; \\n\n  asin(a[i]);</td>\n  <td></td>\n</tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_acos\n  a.\\link ArrayBase::acos acos\\endlink(); \\n\n  \\link Eigen::acos acos\\endlink(a);\n  </td>\n  <td>computes arc cosine  (\\f$ \\cos^{-1} a_i \\f$)</td>\n  <td class=\"code\">\n  using <a href=\"http://en.cppreference.com/w/cpp/numeric/math/acos\">std::acos</a>; \\n\n  acos(a[i]);</td>\n  <td></td>\n</tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_atan\n  a.\\link ArrayBase::atan atan\\endlink(); \\n\n  \\link Eigen::atan atan\\endlink(a);\n  </td>\n  <td>computes arc tangent (\\f$ \\tan^{-1} a_i \\f$)</td>\n  <td class=\"code\">\n  using <a href=\"http://en.cppreference.com/w/cpp/numeric/math/atan\">std::atan</a>; \\n\n  atan(a[i]);</td>\n  <td></td>\n</tr>\n<tr>\n<th colspan=\"4\">Hyperbolic functions</th>\n</tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_sinh\n  a.\\link ArrayBase::sinh sinh\\endlink(); \\n\n  \\link Eigen::sinh sinh\\endlink(a);\n  </td>\n  <td>computes hyperbolic sine</td>\n  <td class=\"code\">\n  using <a href=\"http://en.cppreference.com/w/cpp/numeric/math/sinh\">std::sinh</a>; \\n\n  sinh(a[i]);</td>\n  <td></td>\n</tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_cosh\n  a.\\link ArrayBase::cosh cohs\\endlink(); \\n\n  \\link Eigen::cosh cosh\\endlink(a);\n  </td>\n  <td>computes hyperbolic cosine</td>\n  <td class=\"code\">\n  using <a href=\"http://en.cppreference.com/w/cpp/numeric/math/cosh\">std::cosh</a>; \\n\n  cosh(a[i]);</td>\n  <td></td>\n</tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_tanh\n  a.\\link ArrayBase::tanh tanh\\endlink(); \\n\n  \\link Eigen::tanh tanh\\endlink(a);\n  </td>\n  <td>computes hyperbolic tangent</td>\n  <td class=\"code\">\n  using <a href=\"http://en.cppreference.com/w/cpp/numeric/math/tanh\">std::tanh</a>; \\n\n  tanh(a[i]);</td>\n  <td></td>\n</tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_asinh\n  a.\\link ArrayBase::asinh asinh\\endlink(); \\n\n  \\link Eigen::asinh asinh\\endlink(a);\n  </td>\n  <td>computes inverse hyperbolic sine</td>\n  <td class=\"code\">\n  using <a href=\"http://en.cppreference.com/w/cpp/numeric/math/asinh\">std::asinh</a>; \\n\n  asinh(a[i]);</td>\n  <td></td>\n</tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_acosh\n  a.\\link ArrayBase::acosh cohs\\endlink(); \\n\n  \\link Eigen::acosh acosh\\endlink(a);\n  </td>\n  <td>computes hyperbolic cosine</td>\n  <td class=\"code\">\n  using <a href=\"http://en.cppreference.com/w/cpp/numeric/math/acosh\">std::acosh</a>; \\n\n  acosh(a[i]);</td>\n  <td></td>\n</tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_atanh\n  a.\\link ArrayBase::atanh atanh\\endlink(); \\n\n  \\link Eigen::atanh atanh\\endlink(a);\n  </td>\n  <td>computes hyperbolic tangent</td>\n  <td class=\"code\">\n  using <a href=\"http://en.cppreference.com/w/cpp/numeric/math/atanh\">std::atanh</a>; \\n\n  atanh(a[i]);</td>\n  <td></td>\n</tr>\n<tr>\n<th colspan=\"4\">Nearest integer floating point operations</th>\n</tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_ceil\n  a.\\link ArrayBase::ceil ceil\\endlink(); \\n\n  \\link Eigen::ceil ceil\\endlink(a);\n  </td>\n  <td>nearest integer not less than the given value</td>\n  <td class=\"code\">\n  using <a href=\"http://en.cppreference.com/w/cpp/numeric/math/ceil\">std::ceil</a>; \\n\n  ceil(a[i]);</td>\n  <td>SSE4,AVX,ZVector (f,d)</td>\n</tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_floor\n  a.\\link ArrayBase::floor floor\\endlink(); \\n\n  \\link Eigen::floor floor\\endlink(a);\n  </td>\n  <td>nearest integer not greater than the given value</td>\n  <td class=\"code\">\n  using <a href=\"http://en.cppreference.com/w/cpp/numeric/math/floor\">std::floor</a>; \\n\n  floor(a[i]);</td>\n  <td>SSE4,AVX,ZVector (f,d)</td>\n</tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_round\n  a.\\link ArrayBase::round round\\endlink(); \\n\n  \\link Eigen::round round\\endlink(a);\n  </td>\n  <td>nearest integer, \\n rounding away from zero in halfway cases</td>\n  <td>built-in generic implementation \\n based on \\c floor and \\c ceil,\\n\n  plus \\c using <a href=\"http://en.cppreference.com/w/cpp/numeric/math/round\">\\c std::round </a>; \\cpp11</td>\n  <td>SSE4,AVX,ZVector (f,d)</td>\n</tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_rint\n  a.\\link ArrayBase::rint rint\\endlink(); \\n\n  \\link Eigen::rint rint\\endlink(a);\n  </td>\n  <td>nearest integer, \\n rounding to nearest even in halfway cases</td>\n  <td>built-in generic implementation using <a href=\"http://en.cppreference.com/w/cpp/numeric/math/rint\">\\c std::rint </a>; \\cpp11\n  or <a href=\"http://en.cppreference.com/w/c/numeric/math/rint\">\\c rintf </a>; </td>\n  <td>SSE4,AVX (f,d)</td>\n</tr>\n<tr>\n<th colspan=\"4\">Floating point manipulation functions</th>\n</tr>\n<tr>\n<th colspan=\"4\">Classification and comparison</th>\n</tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_isfinite\n  a.\\link ArrayBase::isFinite isFinite\\endlink(); \\n\n  \\link Eigen::isfinite isfinite\\endlink(a);\n  </td>\n  <td>checks if the given number has finite value</td>\n  <td>built-in generic implementation,\\n\n  plus \\c using <a href=\"http://en.cppreference.com/w/cpp/numeric/math/isfinite\">\\c std::isfinite </a>; \\cpp11</td>\n  <td></td>\n</tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_isinf\n  a.\\link ArrayBase::isInf isInf\\endlink(); \\n\n  \\link Eigen::isinf isinf\\endlink(a);\n  </td>\n  <td>checks if the given number is infinite</td>\n  <td>built-in generic implementation,\\n\n  plus \\c using <a href=\"http://en.cppreference.com/w/cpp/numeric/math/isinf\">\\c std::isinf </a>; \\cpp11</td>\n  <td></td>\n</tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_isnan\n  a.\\link ArrayBase::isNaN isNaN\\endlink(); \\n\n  \\link Eigen::isnan isnan\\endlink(a);\n  </td>\n  <td>checks if the given number is not a number</td>\n  <td>built-in generic implementation,\\n\n  plus \\c using <a href=\"http://en.cppreference.com/w/cpp/numeric/math/isnan\">\\c std::isnan </a>; \\cpp11</td>\n  <td></td>\n</tr>\n<tr>\n<th colspan=\"4\">Error and gamma functions</th>\n</tr>\n<tr> <td colspan=\"4\">  Require \\c \\#include \\c <unsupported/Eigen/SpecialFunctions> </td></tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_erf\n  a.\\link ArrayBase::erf erf\\endlink(); \\n\n  \\link Eigen::erf erf\\endlink(a);\n  </td>\n  <td>error function</td>\n  <td class=\"code\">\n  using <a href=\"http://en.cppreference.com/w/cpp/numeric/math/erf\">std::erf</a>; \\cpp11 \\n\n  erf(a[i]);\n  </td>\n  <td></td>\n</tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_erfc\n  a.\\link ArrayBase::erfc erfc\\endlink(); \\n\n  \\link Eigen::erfc erfc\\endlink(a);\n  </td>\n  <td>complementary error function</td>\n  <td class=\"code\">\n  using <a href=\"http://en.cppreference.com/w/cpp/numeric/math/erfc\">std::erfc</a>; \\cpp11 \\n\n  erfc(a[i]);\n  </td>\n  <td></td>\n</tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_lgamma\n  a.\\link ArrayBase::lgamma lgamma\\endlink(); \\n\n  \\link Eigen::lgamma lgamma\\endlink(a);\n  </td>\n  <td>natural logarithm of the gamma function</td>\n  <td class=\"code\">\n  using <a href=\"http://en.cppreference.com/w/cpp/numeric/math/lgamma\">std::lgamma</a>; \\cpp11 \\n\n  lgamma(a[i]);\n  </td>\n  <td></td>\n</tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_digamma\n  a.\\link ArrayBase::digamma digamma\\endlink(); \\n\n  \\link Eigen::digamma digamma\\endlink(a);\n  </td>\n  <td><a href=\"https://en.wikipedia.org/wiki/Digamma_function\">logarithmic derivative of the gamma function</a></td>\n  <td>\n  built-in for float and double\n  </td>\n  <td></td>\n</tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_igamma\n  \\link Eigen::igamma igamma\\endlink(a,x);\n  </td>\n  <td><a href=\"https://en.wikipedia.org/wiki/Incomplete_gamma_function\">lower incomplete gamma integral</a>\n  \\n \\f$ \\gamma(a_i,x_i)= \\frac{1}{|a_i|} \\int_{0}^{x_i}e^{\\text{-}t} t^{a_i-1} \\mathrm{d} t \\f$</td>\n  <td>\n  built-in for float and double,\\n but requires \\cpp11\n  </td>\n  <td></td>\n</tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_igammac\n  \\link Eigen::igammac igammac\\endlink(a,x);\n  </td>\n  <td><a href=\"https://en.wikipedia.org/wiki/Incomplete_gamma_function\">upper incomplete gamma integral</a>\n  \\n \\f$ \\Gamma(a_i,x_i) = \\frac{1}{|a_i|} \\int_{x_i}^{\\infty}e^{\\text{-}t} t^{a_i-1} \\mathrm{d} t \\f$</td>\n  <td>\n  built-in for float and double,\\n but requires \\cpp11\n  </td>\n  <td></td>\n</tr>\n<tr>\n<th colspan=\"4\">Special functions</th>\n</tr>\n<tr> <td colspan=\"4\">  Require \\c \\#include \\c <unsupported/Eigen/SpecialFunctions> </td></tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_polygamma\n  \\link Eigen::polygamma polygamma\\endlink(n,x);\n  </td>\n  <td><a href=\"https://en.wikipedia.org/wiki/Polygamma_function\">n-th derivative of digamma at x</a></td>\n  <td>\n  built-in generic based on\\n <a href=\"#cwisetable_lgamma\">\\c lgamma </a>,\n  <a href=\"#cwisetable_digamma\"> \\c digamma </a>\n  and <a href=\"#cwisetable_zeta\">\\c zeta </a>.\n  </td>\n  <td></td>\n</tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_betainc\n  \\link Eigen::betainc betainc\\endlink(a,b,x);\n  </td>\n  <td><a href=\"https://en.wikipedia.org/wiki/Beta_function#Incomplete_beta_function\">Incomplete beta function</a></td>\n  <td>\n  built-in for float and double,\\n but requires \\cpp11\n  </td>\n  <td></td>\n</tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_zeta\n  \\link Eigen::zeta zeta\\endlink(a,b); \\n\n  a.\\link ArrayBase::zeta zeta\\endlink(b);\n  </td>\n  <td><a href=\"https://en.wikipedia.org/wiki/Hurwitz_zeta_function\">Hurwitz zeta function</a>\n  \\n \\f$ \\zeta(a_i,b_i)=\\sum_{k=0}^{\\infty}(b_i+k)^{\\text{-}a_i} \\f$</td>\n  <td>\n  built-in for float and double\n  </td>\n  <td></td>\n</tr>\n<tr>\n  <td class=\"code\">\n  \\anchor cwisetable_ndtri\n  a.\\link ArrayBase::ndtri ndtri\\endlink(); \\n\n  \\link Eigen::ndtri ndtri\\endlink(a);\n  </td>\n  <td>Inverse of the CDF of the Normal distribution function</td>\n  <td>\n  built-in for float and double\n  </td>\n  <td></td>\n</tr>\n<tr><td colspan=\"4\"></td></tr>\n</table>\n\n\\n\n\n*/\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/CustomizingEigen_CustomScalar.dox",
    "content": "namespace Eigen {\n\n/** \\page TopicCustomizing_CustomScalar Using custom scalar types\n\\anchor user_defined_scalars\n\nBy default, Eigen currently supports standard floating-point types (\\c float, \\c double, \\c std::complex<float>, \\c std::complex<double>, \\c long \\c double), as well as all native integer types (e.g., \\c int, \\c unsigned \\c int, \\c short, etc.), and \\c bool.\nOn x86-64 systems, \\c long \\c double permits to locally enforces the use of x87 registers with extended accuracy (in comparison to SSE).\n\nIn order to add support for a custom type \\c T you need:\n-# make sure the common operator (+,-,*,/,etc.) are supported by the type \\c T\n-# add a specialization of struct Eigen::NumTraits<T> (see \\ref NumTraits)\n-# define the math functions that makes sense for your type. This includes standard ones like sqrt, pow, sin, tan, conj, real, imag, etc, as well as abs2 which is Eigen specific.\n     (see the file Eigen/src/Core/MathFunctions.h)\n\nThe math function should be defined in the same namespace than \\c T, or in the \\c std namespace though that second approach is not recommended.\n\nHere is a concrete example adding support for the Adolc's \\c adouble type. <a href=\"https://projects.coin-or.org/ADOL-C\">Adolc</a> is an automatic differentiation library. The type \\c adouble is basically a real value tracking the values of any number of partial derivatives.\n\n\\code\n#ifndef ADOLCSUPPORT_H\n#define ADOLCSUPPORT_H\n\n#define ADOLC_TAPELESS\n#include <adolc/adouble.h>\n#include <Eigen/Core>\n\nnamespace Eigen {\n\ntemplate<> struct NumTraits<adtl::adouble>\n : NumTraits<double> // permits to get the epsilon, dummy_precision, lowest, highest functions\n{\n  typedef adtl::adouble Real;\n  typedef adtl::adouble NonInteger;\n  typedef adtl::adouble Nested;\n\n  enum {\n    IsComplex = 0,\n    IsInteger = 0,\n    IsSigned = 1,\n    RequireInitialization = 1,\n    ReadCost = 1,\n    AddCost = 3,\n    MulCost = 3\n  };\n};\n\n}\n\nnamespace adtl {\n\ninline const adouble& conj(const adouble& x)  { return x; }\ninline const adouble& real(const adouble& x)  { return x; }\ninline adouble imag(const adouble&)    { return 0.; }\ninline adouble abs(const adouble&  x)  { return fabs(x); }\ninline adouble abs2(const adouble& x)  { return x*x; }\n\n}\n\n#endif // ADOLCSUPPORT_H\n\\endcode\n\nThis other example adds support for the \\c mpq_class type from <a href=\"https://gmplib.org/\">GMP</a>. It shows in particular how to change the way Eigen picks the best pivot during LU factorization. It selects the coefficient with the highest score, where the score is by default the absolute value of a number, but we can define a different score, for instance to prefer pivots with a more compact representation (this is an example, not a recommendation). Note that the scores should always be non-negative and only zero is allowed to have a score of zero. Also, this can interact badly with thresholds for inexact scalar types.\n\n\\code\n#include <gmpxx.h>\n#include <Eigen/Core>\n#include <boost/operators.hpp>\n\nnamespace Eigen {\n  template<> struct NumTraits<mpq_class> : GenericNumTraits<mpq_class>\n  {\n    typedef mpq_class Real;\n    typedef mpq_class NonInteger;\n    typedef mpq_class Nested;\n\n    static inline Real epsilon() { return 0; }\n    static inline Real dummy_precision() { return 0; }\n    static inline int digits10() { return 0; }\n\n    enum {\n      IsInteger = 0,\n      IsSigned = 1,\n      IsComplex = 0,\n      RequireInitialization = 1,\n      ReadCost = 6,\n      AddCost = 150,\n      MulCost = 100\n    };\n  };\n\n  namespace internal {\n\n    template<> struct scalar_score_coeff_op<mpq_class> {\n      struct result_type : boost::totally_ordered1<result_type> {\n        std::size_t len;\n        result_type(int i = 0) : len(i) {} // Eigen uses Score(0) and Score()\n        result_type(mpq_class const& q) :\n          len(mpz_size(q.get_num_mpz_t())+\n              mpz_size(q.get_den_mpz_t())-1) {}\n        friend bool operator<(result_type x, result_type y) {\n          // 0 is the worst possible pivot\n          if (x.len == 0) return y.len > 0;\n          if (y.len == 0) return false;\n          // Prefer a pivot with a small representation\n          return x.len > y.len;\n        }\n        friend bool operator==(result_type x, result_type y) {\n          // Only used to test if the score is 0\n          return x.len == y.len;\n        }\n      };\n      result_type operator()(mpq_class const& x) const { return x; }\n    };\n  }\n}\n\\endcode\n\n*/\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/CustomizingEigen_InheritingMatrix.dox",
    "content": "namespace Eigen {\n\n/** \\page TopicCustomizing_InheritingMatrix Inheriting from Matrix\n\nBefore inheriting from Matrix, be really, I mean REALLY, sure that using\nEIGEN_MATRIX_PLUGIN is not what you really want (see previous section).\nIf you just need to add few members to Matrix, this is the way to go.\n\nAn example of when you actually need to inherit Matrix, is when you\nhave several layers of heritage such as \nMyVerySpecificVector1, MyVerySpecificVector2 -> MyVector1 -> Matrix and\nMyVerySpecificVector3, MyVerySpecificVector4 -> MyVector2 -> Matrix.\n\nIn order for your object to work within the %Eigen framework, you need to\ndefine a few members in your inherited class.\n\nHere is a minimalistic example:\n\n\\include CustomizingEigen_Inheritance.cpp\n\nOutput: \\verbinclude CustomizingEigen_Inheritance.out\n\nThis is the kind of error you can get if you don't provide those methods\n\\verbatim\nerror: no match for ‘operator=’ in ‘v = Eigen::operator*(\nconst Eigen::MatrixBase<Eigen::Matrix<double, -0x000000001, 1, 0, -0x000000001, 1> >::Scalar&, \nconst Eigen::MatrixBase<Eigen::Matrix<double, -0x000000001, 1> >::StorageBaseType&)\n(((const Eigen::MatrixBase<Eigen::Matrix<double, -0x000000001, 1> >::StorageBaseType&)\n((const Eigen::MatrixBase<Eigen::Matrix<double, -0x000000001, 1> >::StorageBaseType*)(& v))))’\n\\endverbatim\n\n*/\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/CustomizingEigen_NullaryExpr.dox",
    "content": "namespace Eigen {\n\n/** \\page TopicCustomizing_NullaryExpr Matrix manipulation via nullary-expressions\n\n\nThe main purpose of the class CwiseNullaryOp is to define \\em procedural matrices such as constant or random matrices as returned by the Ones(), Zero(), Constant(), Identity() and Random() methods.\nNevertheless, with some imagination it is possible to accomplish very sophisticated matrix manipulation with minimal efforts such that \\ref TopicNewExpressionType \"implementing new expression\" is rarely needed.\n\n\\section NullaryExpr_Circulant Example 1: circulant matrix\n\nTo explore these possibilities let us start with the  \\em circulant example of the \\ref TopicNewExpressionType \"implementing new expression\" topic.\nLet us recall that a circulant matrix is a matrix where each column is the same as the\ncolumn to the left, except that it is cyclically shifted downwards.\nFor example, here is a 4-by-4 circulant matrix:\n\\f[ \\begin{bmatrix}\n    1 & 8 & 4 & 2 \\\\\n    2 & 1 & 8 & 4 \\\\\n    4 & 2 & 1 & 8 \\\\\n    8 & 4 & 2 & 1\n\\end{bmatrix} \\f]\nA circulant matrix is uniquely determined by its first column. We wish\nto write a function \\c makeCirculant which, given the first column,\nreturns an expression representing the circulant matrix.\n\nFor this exercise, the return type of \\c makeCirculant will be a CwiseNullaryOp that we need to instantiate with:\n1 - a proper \\c circulant_functor storing the input vector and implementing the adequate coefficient accessor \\c operator(i,j)\n2 - a template instantiation of class Matrix conveying compile-time information such as the scalar type, sizes, and preferred storage layout.\n\nCalling \\c ArgType the type of the input vector, we can construct the equivalent squared Matrix type as follows:\n\n\\snippet make_circulant2.cpp square\n\nThis little helper structure will help us to implement our \\c makeCirculant function as follows:\n\n\\snippet make_circulant2.cpp makeCirculant\n\nAs usual, our function takes as argument a \\c MatrixBase (see this \\ref TopicFunctionTakingEigenTypes \"page\" for more details).\nThen, the CwiseNullaryOp object is constructed through the DenseBase::NullaryExpr static method with the adequate runtime sizes.\n\nThen, we need to implement our \\c circulant_functor, which is a straightforward exercise:\n\n\\snippet make_circulant2.cpp circulant_func\n\nWe are now all set to try our new feature:\n\n\\snippet make_circulant2.cpp main\n\n\nIf all the fragments are combined, the following output is produced,\nshowing that the program works as expected:\n\n\\include make_circulant2.out\n\nThis implementation of \\c makeCirculant is much simpler than \\ref TopicNewExpressionType \"defining a new expression\" from scratch.\n\n\n\\section NullaryExpr_Indexing Example 2: indexing rows and columns\n\nThe goal here is to mimic MatLab's ability to index a matrix through two vectors of indices referencing the rows and columns to be picked respectively, like this:\n\n\\snippet nullary_indexing.out main1\n\nTo this end, let us first write a nullary-functor storing references to the input matrix and to the two arrays of indices, and implementing the required \\c operator()(i,j):\n\n\\snippet nullary_indexing.cpp functor\n\nThen, let's create an \\c indexing(A,rows,cols) function creating the nullary expression:\n\n\\snippet nullary_indexing.cpp function\n\nFinally, here is an example of how this function can be used:\n\n\\snippet nullary_indexing.cpp main1\n\nThis straightforward implementation is already quite powerful as the row or column index arrays can also be expressions to perform offsetting, modulo, striding, reverse, etc.\n\n\\snippet nullary_indexing.cpp main2\n\nand the output is:\n\n\\snippet nullary_indexing.out main2\n\n*/\n\n}\n\n"
  },
  {
    "path": "3rdparty/eigen3/doc/CustomizingEigen_Plugins.dox",
    "content": "namespace Eigen {\n\n/** \\page TopicCustomizing_Plugins Extending MatrixBase (and other classes)\n\nIn this section we will see how to add custom methods to MatrixBase. Since all expressions and matrix types inherit MatrixBase, adding a method to MatrixBase make it immediately available to all expressions ! A typical use case is, for instance, to make Eigen compatible with another API.\n\nYou certainly know that in C++ it is not possible to add methods to an existing class. So how that's possible ? Here the trick is to include in the declaration of MatrixBase a file defined by the preprocessor token \\c EIGEN_MATRIXBASE_PLUGIN:\n\\code\nclass MatrixBase {\n  // ...\n  #ifdef EIGEN_MATRIXBASE_PLUGIN\n  #include EIGEN_MATRIXBASE_PLUGIN\n  #endif\n};\n\\endcode\nTherefore to extend MatrixBase with your own methods you just have to create a file with your method declaration and define EIGEN_MATRIXBASE_PLUGIN before you include any Eigen's header file.\n\nYou can extend many of the other classes used in Eigen by defining similarly named preprocessor symbols. For instance, define \\c EIGEN_ARRAYBASE_PLUGIN if you want to extend the ArrayBase class. A full list of classes that can be extended in this way and the corresponding preprocessor symbols can be found on our page \\ref TopicPreprocessorDirectives.\n\nHere is an example of an extension file for adding methods to MatrixBase: \\n\n\\b MatrixBaseAddons.h\n\\code\ninline Scalar at(uint i, uint j) const { return this->operator()(i,j); }\ninline Scalar& at(uint i, uint j) { return this->operator()(i,j); }\ninline Scalar at(uint i) const { return this->operator[](i); }\ninline Scalar& at(uint i) { return this->operator[](i); }\n\ninline RealScalar squaredLength() const { return squaredNorm(); }\ninline RealScalar length() const { return norm(); }\ninline RealScalar invLength(void) const { return fast_inv_sqrt(squaredNorm()); }\n\ntemplate<typename OtherDerived>\ninline Scalar squaredDistanceTo(const MatrixBase<OtherDerived>& other) const\n{ return (derived() - other.derived()).squaredNorm(); }\n\ntemplate<typename OtherDerived>\ninline RealScalar distanceTo(const MatrixBase<OtherDerived>& other) const\n{ return internal::sqrt(derived().squaredDistanceTo(other)); }\n\ninline void scaleTo(RealScalar l) { RealScalar vl = norm(); if (vl>1e-9) derived() *= (l/vl); }\n\ninline Transpose<Derived> transposed() {return this->transpose();}\ninline const Transpose<Derived> transposed() const {return this->transpose();}\n\ninline uint minComponentId(void) const  { int i; this->minCoeff(&i); return i; }\ninline uint maxComponentId(void) const  { int i; this->maxCoeff(&i); return i; }\n\ntemplate<typename OtherDerived>\nvoid makeFloor(const MatrixBase<OtherDerived>& other) { derived() = derived().cwiseMin(other.derived()); }\ntemplate<typename OtherDerived>\nvoid makeCeil(const MatrixBase<OtherDerived>& other) { derived() = derived().cwiseMax(other.derived()); }\n\nconst CwiseBinaryOp<internal::scalar_sum_op<Scalar>, const Derived, const ConstantReturnType>\noperator+(const Scalar& scalar) const\n{ return CwiseBinaryOp<internal::scalar_sum_op<Scalar>, const Derived, const ConstantReturnType>(derived(), Constant(rows(),cols(),scalar)); }\n\nfriend const CwiseBinaryOp<internal::scalar_sum_op<Scalar>, const ConstantReturnType, Derived>\noperator+(const Scalar& scalar, const MatrixBase<Derived>& mat)\n{ return CwiseBinaryOp<internal::scalar_sum_op<Scalar>, const ConstantReturnType, Derived>(Constant(rows(),cols(),scalar), mat.derived()); }\n\\endcode\n\nThen one can the following declaration in the config.h or whatever prerequisites header file of his project:\n\\code\n#define EIGEN_MATRIXBASE_PLUGIN \"MatrixBaseAddons.h\"\n\\endcode\n\n*/\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/DenseDecompositionBenchmark.dox",
    "content": "namespace Eigen {\n\n/** \\eigenManualPage DenseDecompositionBenchmark Benchmark of dense decompositions\n\nThis page presents a speed comparison of the dense matrix decompositions offered by %Eigen for a wide range of square matrices and overconstrained problems.\n\nFor a more general overview on the features and numerical robustness of linear solvers and decompositions, check this \\link TopicLinearAlgebraDecompositions table \\endlink.\n\nThis benchmark has been run on a laptop equipped with an Intel core i7 \\@ 2,6 GHz, and compiled with clang with \\b AVX and \\b FMA instruction sets enabled but without multi-threading.\nIt uses \\b single \\b precision \\b float numbers. For double, you can get a good estimate by multiplying the timings by a factor 2.\n\nThe square matrices are symmetric, and for the overconstrained matrices, the reported timmings include the cost to compute the symmetric covariance matrix \\f$ A^T A \\f$ for the first four solvers based on Cholesky and LU, as denoted by the \\b * symbol (top-right corner part of the table).\nTimings are in \\b milliseconds, and factors are relative to the LLT decomposition which is the fastest but also the least general and robust.\n\n<table class=\"manual\">\n<tr><th>solver/size</th>\n  <th>8x8</th>  <th>100x100</th>  <th>1000x1000</th>  <th>4000x4000</th>  <th>10000x8</th>  <th>10000x100</th>  <th>10000x1000</th>  <th>10000x4000</th></tr>\n<tr><td>LLT</td><td>0.05</td><td>0.42</td><td>5.83</td><td>374.55</td><td>6.79 <sup><a href=\"#note_ls\">*</a></sup></td><td>30.15 <sup><a href=\"#note_ls\">*</a></sup></td><td>236.34 <sup><a href=\"#note_ls\">*</a></sup></td><td>3847.17 <sup><a href=\"#note_ls\">*</a></sup></td></tr>\n<tr class=\"alt\"><td>LDLT</td><td>0.07 (x1.3)</td><td>0.65 (x1.5)</td><td>26.86 (x4.6)</td><td>2361.18 (x6.3)</td><td>6.81 (x1) <sup><a href=\"#note_ls\">*</a></sup></td><td>31.91 (x1.1) <sup><a href=\"#note_ls\">*</a></sup></td><td>252.61 (x1.1) <sup><a href=\"#note_ls\">*</a></sup></td><td>5807.66 (x1.5) <sup><a href=\"#note_ls\">*</a></sup></td></tr>\n<tr><td>PartialPivLU</td><td>0.08 (x1.5)</td><td>0.69 (x1.6)</td><td>15.63 (x2.7)</td><td>709.32 (x1.9)</td><td>6.81 (x1) <sup><a href=\"#note_ls\">*</a></sup></td><td>31.32 (x1) <sup><a href=\"#note_ls\">*</a></sup></td><td>241.68 (x1) <sup><a href=\"#note_ls\">*</a></sup></td><td>4270.48 (x1.1) <sup><a href=\"#note_ls\">*</a></sup></td></tr>\n<tr class=\"alt\"><td>FullPivLU</td><td>0.1 (x1.9)</td><td>4.48 (x10.6)</td><td>281.33 (x48.2)</td><td>-</td><td>6.83 (x1) <sup><a href=\"#note_ls\">*</a></sup></td><td>32.67 (x1.1) <sup><a href=\"#note_ls\">*</a></sup></td><td>498.25 (x2.1) <sup><a href=\"#note_ls\">*</a></sup></td><td>-</td></tr>\n<tr><td>HouseholderQR</td><td>0.19 (x3.5)</td><td>2.18 (x5.2)</td><td>23.42 (x4)</td><td>1337.52 (x3.6)</td><td>34.26 (x5)</td><td>129.01 (x4.3)</td><td>377.37 (x1.6)</td><td>4839.1 (x1.3)</td></tr>\n<tr class=\"alt\"><td>ColPivHouseholderQR</td><td>0.23 (x4.3)</td><td>2.23 (x5.3)</td><td>103.34 (x17.7)</td><td>9987.16 (x26.7)</td><td>36.05 (x5.3)</td><td>163.18 (x5.4)</td><td>2354.08 (x10)</td><td>37860.5 (x9.8)</td></tr>\n<tr><td>CompleteOrthogonalDecomposition</td><td>0.23 (x4.3)</td><td>2.22 (x5.2)</td><td>99.44 (x17.1)</td><td>10555.3 (x28.2)</td><td>35.75 (x5.3)</td><td>169.39 (x5.6)</td><td>2150.56 (x9.1)</td><td>36981.8 (x9.6)</td></tr>\n<tr class=\"alt\"><td>FullPivHouseholderQR</td><td>0.23 (x4.3)</td><td>4.64 (x11)</td><td>289.1 (x49.6)</td><td>-</td><td>69.38 (x10.2)</td><td>446.73 (x14.8)</td><td>4852.12 (x20.5)</td><td>-</td></tr>\n<tr><td>JacobiSVD</td><td>1.01 (x18.6)</td><td>71.43 (x168.4)</td><td>-</td><td>-</td><td>113.81 (x16.7)</td><td>1179.66 (x39.1)</td><td>-</td><td>-</td></tr>\n<tr class=\"alt\"><td>BDCSVD</td><td>1.07 (x19.7)</td><td>21.83 (x51.5)</td><td>331.77 (x56.9)</td><td>18587.9 (x49.6)</td><td>110.53 (x16.3)</td><td>397.67 (x13.2)</td><td>2975 (x12.6)</td><td>48593.2 (x12.6)</td></tr>\n</table>\n\n<a name=\"note_ls\">\\b *: </a> This decomposition do not support direct least-square solving for over-constrained problems, and the reported timing include the cost to form the symmetric covariance matrix \\f$ A^T A \\f$.\n\n\\b Observations:\n + LLT is always the fastest solvers.\n + For largely over-constrained problems, the cost of Cholesky/LU decompositions is dominated by the computation of the symmetric covariance matrix.\n + For large problem sizes, only the decomposition implementing a cache-friendly blocking strategy scale well. Those include LLT, PartialPivLU, HouseholderQR, and BDCSVD. This explain why for a 4k x 4k matrix, HouseholderQR is faster than LDLT. In the future, LDLT and ColPivHouseholderQR will also implement blocking strategies.\n + CompleteOrthogonalDecomposition is based on ColPivHouseholderQR and they thus achieve the same level of performance.\n\nThe above table has been generated by the <a href=\"https://gitlab.com/libeigen/eigen/raw/master/bench/dense_solvers.cpp\">bench/dense_solvers.cpp</a> file, feel-free to hack it to generate a table matching your hardware, compiler, and favorite problem sizes.\n\n*/\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/Doxyfile.in",
    "content": "# Doxyfile 1.8.1.1\n\n# This file describes the settings to be used by the documentation system\n# doxygen (www.doxygen.org) for a project.\n#\n# All text after a hash (#) is considered a comment and will be ignored.\n# The format is:\n#       TAG = value [value, ...]\n# For lists items can also be appended using:\n#       TAG += value [value, ...]\n# Values that contain spaces should be placed between quotes (\" \").\n\n#---------------------------------------------------------------------------\n# Project related configuration options\n#---------------------------------------------------------------------------\n\n# This tag specifies the encoding used for all characters in the config file\n# that follow. The default is UTF-8 which is also the encoding used for all\n# text before the first occurrence of this tag. Doxygen uses libiconv (or the\n# iconv built into libc) for the transcoding. See\n# http://www.gnu.org/software/libiconv for the list of possible encodings.\n\nDOXYFILE_ENCODING      = UTF-8\n\n# The PROJECT_NAME tag is a single word (or sequence of words) that should\n# identify the project. Note that if you do not use Doxywizard you need\n# to put quotes around the project name if it contains spaces.\n\nPROJECT_NAME           = ${EIGEN_DOXY_PROJECT_NAME}\n\n# The PROJECT_NUMBER tag can be used to enter a project or revision number.\n# This could be handy for archiving the generated documentation or\n# if some version control system is used.\n\n# EIGEN_VERSION is set in the root CMakeLists.txt\n\nPROJECT_NUMBER         = \"${EIGEN_VERSION}\"\n\n# Using the PROJECT_BRIEF tag one can provide an optional one line description\n# for a project that appears at the top of each page and should give viewer\n# a quick idea about the purpose of the project. Keep the description short.\n\nPROJECT_BRIEF          =\n\n# With the PROJECT_LOGO tag one can specify an logo or icon that is\n# included in the documentation. The maximum height of the logo should not\n# exceed 55 pixels and the maximum width should not exceed 200 pixels.\n# Doxygen will copy the logo to the output directory.\n\nPROJECT_LOGO           = \"${Eigen_SOURCE_DIR}/doc/Eigen_Silly_Professor_64x64.png\"\n\n# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)\n# base path where the generated documentation will be put.\n# If a relative path is entered, it will be relative to the location\n# where doxygen was started. If left blank the current directory will be used.\n\nOUTPUT_DIRECTORY       = \"${Eigen_BINARY_DIR}/doc${EIGEN_DOXY_OUTPUT_DIRECTORY_SUFFIX}\"\n\n# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create\n# 4096 sub-directories (in 2 levels) under the output directory of each output\n# format and will distribute the generated files over these directories.\n# Enabling this option can be useful when feeding doxygen a huge amount of\n# source files, where putting all generated files in the same directory would\n# otherwise cause performance problems for the file system.\n\nCREATE_SUBDIRS         = NO\n\n# The OUTPUT_LANGUAGE tag is used to specify the language in which all\n# documentation generated by doxygen is written. Doxygen will use this\n# information to generate all constant output in the proper language.\n# The default language is English, other supported languages are:\n# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,\n# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,\n# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English\n# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,\n# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,\n# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.\n\nOUTPUT_LANGUAGE        = English\n\n# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will\n# include brief member descriptions after the members that are listed in\n# the file and class documentation (similar to JavaDoc).\n# Set to NO to disable this.\n\nBRIEF_MEMBER_DESC      = YES\n\n# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend\n# the brief description of a member or function before the detailed description.\n# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the\n# brief descriptions will be completely suppressed.\n\nREPEAT_BRIEF           = YES\n\n# This tag implements a quasi-intelligent brief description abbreviator\n# that is used to form the text in various listings. Each string\n# in this list, if found as the leading text of the brief description, will be\n# stripped from the text and the result after processing the whole list, is\n# used as the annotated text. Otherwise, the brief description is used as-is.\n# If left blank, the following values are used (\"$name\" is automatically\n# replaced with the name of the entity): \"The $name class\" \"The $name widget\"\n# \"The $name file\" \"is\" \"provides\" \"specifies\" \"contains\"\n# \"represents\" \"a\" \"an\" \"the\"\n\nABBREVIATE_BRIEF       = \"The $name class\" \\\n                         \"The $name widget\" \\\n                         \"The $name file\" \\\n                         is \\\n                         provides \\\n                         specifies \\\n                         contains \\\n                         represents \\\n                         a \\\n                         an \\\n                         the\n\n# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then\n# Doxygen will generate a detailed section even if there is only a brief\n# description.\n\nALWAYS_DETAILED_SEC    = NO\n\n# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all\n# inherited members of a class in the documentation of that class as if those\n# members were ordinary class members. Constructors, destructors and assignment\n# operators of the base classes will not be shown.\n\nINLINE_INHERITED_MEMB  = NO\n\n# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full\n# path before files name in the file list and in the header files. If set\n# to NO the shortest path that makes the file name unique will be used.\n\nFULL_PATH_NAMES        = NO\n\n# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag\n# can be used to strip a user-defined part of the path. Stripping is\n# only done if one of the specified strings matches the left-hand part of\n# the path. The tag can be used to show relative paths in the file list.\n# If left blank the directory from which doxygen is run is used as the\n# path to strip.\n\nSTRIP_FROM_PATH        =\n\n# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of\n# the path mentioned in the documentation of a class, which tells\n# the reader which header file to include in order to use a class.\n# If left blank only the name of the header file containing the class\n# definition is used. Otherwise one should specify the include paths that\n# are normally passed to the compiler using the -I flag.\n\nSTRIP_FROM_INC_PATH    =\n\n# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter\n# (but less readable) file names. This can be useful if your file system\n# doesn't support long names like on DOS, Mac, or CD-ROM.\n\nSHORT_NAMES            = NO\n\n# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen\n# will interpret the first line (until the first dot) of a JavaDoc-style\n# comment as the brief description. If set to NO, the JavaDoc\n# comments will behave just like regular Qt-style comments\n# (thus requiring an explicit @brief command for a brief description.)\n\nJAVADOC_AUTOBRIEF      = NO\n\n# If the QT_AUTOBRIEF tag is set to YES then Doxygen will\n# interpret the first line (until the first dot) of a Qt-style\n# comment as the brief description. If set to NO, the comments\n# will behave just like regular Qt-style comments (thus requiring\n# an explicit \\brief command for a brief description.)\n\nQT_AUTOBRIEF           = NO\n\n# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen\n# treat a multi-line C++ special comment block (i.e. a block of //! or ///\n# comments) as a brief description. This used to be the default behaviour.\n# The new default is to treat a multi-line C++ comment block as a detailed\n# description. Set this tag to YES if you prefer the old behaviour instead.\n\nMULTILINE_CPP_IS_BRIEF = NO\n\n# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented\n# member inherits the documentation from any documented member that it\n# re-implements.\n\nINHERIT_DOCS           = YES\n\n# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce\n# a new page for each member. If set to NO, the documentation of a member will\n# be part of the file/class/namespace that contains it.\n\nSEPARATE_MEMBER_PAGES  = NO\n\n# The TAB_SIZE tag can be used to set the number of spaces in a tab.\n# Doxygen uses this value to replace tabs by spaces in code fragments.\n\nTAB_SIZE               = 8\n\n# This tag can be used to specify a number of aliases that acts\n# as commands in the documentation. An alias has the form \"name=value\".\n# For example adding \"sideeffect=\\par Side Effects:\\n\" will allow you to\n# put the command \\sideeffect (or @sideeffect) in the documentation, which\n# will result in a user-defined paragraph with heading \"Side Effects:\".\n# You can put \\n's in the value part of an alias to insert newlines.\n\nALIASES                = \"only_for_vectors=This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.\" \\\n                         \"not_reentrant=\\warning This function is not re-entrant.\" \\\n                         \"array_module=This is defined in the %Array module. \\code #include <Eigen/Array> \\endcode\" \\\n                         \"cholesky_module=This is defined in the %Cholesky module. \\code #include <Eigen/Cholesky> \\endcode\" \\\n                         \"eigenvalues_module=This is defined in the %Eigenvalues module. \\code #include <Eigen/Eigenvalues> \\endcode\" \\\n                         \"geometry_module=This is defined in the %Geometry module. \\code #include <Eigen/Geometry> \\endcode\" \\\n                         \"householder_module=This is defined in the %Householder module. \\code #include <Eigen/Householder> \\endcode\" \\\n                         \"jacobi_module=This is defined in the %Jacobi module. \\code #include <Eigen/Jacobi> \\endcode\" \\\n                         \"lu_module=This is defined in the %LU module. \\code #include <Eigen/LU> \\endcode\" \\\n                         \"qr_module=This is defined in the %QR module. \\code #include <Eigen/QR> \\endcode\" \\\n                         \"svd_module=This is defined in the %SVD module. \\code #include <Eigen/SVD> \\endcode\" \\\n                         \"specialfunctions_module=This is defined in the \\b unsupported SpecialFunctions module. \\code #include <Eigen/SpecialFunctions> \\endcode\" \\\n                         \"label=\\bug\" \\\n                         \"matrixworld=<a href='#matrixonly' style='color:green;text-decoration: none;'>*</a>\" \\\n                         \"arrayworld=<a href='#arrayonly' style='color:blue;text-decoration: none;'>*</a>\" \\\n                         \"note_about_arbitrary_choice_of_solution=If there exists more than one solution, this method will arbitrarily choose one.\" \\\n                         \"note_about_using_kernel_to_study_multiple_solutions=If you need a complete analysis of the space of solutions, take the one solution obtained by this method and add to it elements of the kernel, as determined by kernel().\" \\\n                         \"note_about_checking_solutions=This method just tries to find as good a solution as possible. If you want to check whether a solution exists or if it is accurate, just call this function to get a result and then compute the error of this result, or use MatrixBase::isApprox() directly, for instance like this: \\code bool a_solution_exists = (A*result).isApprox(b, precision); \\endcode This method avoids dividing by zero, so that the non-existence of a solution doesn't by itself mean that you'll get \\c inf or \\c nan values.\" \\\n                         \"note_try_to_help_rvo=This function returns the result by value. In order to make that efficient, it is implemented as just a return statement using a special constructor, hopefully allowing the compiler to perform a RVO (return value optimization).\" \\\n                         \"nonstableyet=\\warning This is not considered to be part of the stable public API yet. Changes may happen in future releases. See \\ref Experimental \\\"Experimental parts of Eigen\\\"\" \\\n                         \"implsparsesolverconcept=This class follows the \\link TutorialSparseSolverConcept sparse solver concept \\endlink.\" \\\n                         \"blank= \" \\\n                         \"cpp11=<span class='cpp11'>[c++11]</span>\" \\\n                         \"cpp14=<span class='cpp14'>[c++14]</span>\" \\\n                         \"cpp17=<span class='cpp17'>[c++17]</span>\" \\\n                         \"newin{1}=<span class='newin3x'>New in %Eigen \\1.</span>\"\n                         \n\nALIASES += \"eigenAutoToc=  \"\nALIASES += \"eigenManualPage=\\defgroup\"\n\n# This tag can be used to specify a number of word-keyword mappings (TCL only).\n# A mapping has the form \"name=value\". For example adding\n# \"class=itcl::class\" will allow you to use the command class in the\n# itcl::class meaning.\n\nTCL_SUBST              =\n\n# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C\n# sources only. Doxygen will then generate output that is more tailored for C.\n# For instance, some of the names that are used will be different. The list\n# of all members will be omitted, etc.\n\nOPTIMIZE_OUTPUT_FOR_C  = NO\n\n# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java\n# sources only. Doxygen will then generate output that is more tailored for\n# Java. For instance, namespaces will be presented as packages, qualified\n# scopes will look different, etc.\n\nOPTIMIZE_OUTPUT_JAVA   = NO\n\n# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran\n# sources only. Doxygen will then generate output that is more tailored for\n# Fortran.\n\nOPTIMIZE_FOR_FORTRAN   = NO\n\n# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL\n# sources. Doxygen will then generate output that is tailored for\n# VHDL.\n\nOPTIMIZE_OUTPUT_VHDL   = NO\n\n# Doxygen selects the parser to use depending on the extension of the files it\n# parses. With this tag you can assign which parser to use for a given extension.\n# Doxygen has a built-in mapping, but you can override or extend it using this\n# tag. The format is ext=language, where ext is a file extension, and language\n# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,\n# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make\n# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C\n# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions\n# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.\n\nEXTENSION_MAPPING      = .h=C++ no_extension=C++\n\n# If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all\n# comments according to the Markdown format, which allows for more readable\n# documentation. See http://daringfireball.net/projects/markdown/ for details.\n# The output of markdown processing is further processed by doxygen, so you\n# can mix doxygen, HTML, and XML commands with Markdown formatting.\n# Disable only in case of backward compatibilities issues.\n\nMARKDOWN_SUPPORT       = YES\n\n# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want\n# to include (a tag file for) the STL sources as input, then you should\n# set this tag to YES in order to let doxygen match functions declarations and\n# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.\n# func(std::string) {}). This also makes the inheritance and collaboration\n# diagrams that involve STL classes more complete and accurate.\n\nBUILTIN_STL_SUPPORT    = NO\n\n# If you use Microsoft's C++/CLI language, you should set this option to YES to\n# enable parsing support.\n\nCPP_CLI_SUPPORT        = NO\n\n# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.\n# Doxygen will parse them like normal C++ but will assume all classes use public\n# instead of private inheritance when no explicit protection keyword is present.\n\nSIP_SUPPORT            = NO\n\n# For Microsoft's IDL there are propget and propput attributes to indicate getter\n# and setter methods for a property. Setting this option to YES (the default)\n# will make doxygen replace the get and set methods by a property in the\n# documentation. This will only work if the methods are indeed getting or\n# setting a simple type. If this is not the case, or you want to show the\n# methods anyway, you should set this option to NO.\n\nIDL_PROPERTY_SUPPORT   = YES\n\n# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC\n# tag is set to YES, then doxygen will reuse the documentation of the first\n# member in the group (if any) for the other members of the group. By default\n# all members of a group must be documented explicitly.\n\nDISTRIBUTE_GROUP_DOC   = YES\n\n# Set the SUBGROUPING tag to YES (the default) to allow class member groups of\n# the same type (for instance a group of public functions) to be put as a\n# subgroup of that type (e.g. under the Public Functions section). Set it to\n# NO to prevent subgrouping. Alternatively, this can be done per class using\n# the \\nosubgrouping command.\n\nSUBGROUPING            = YES\n\n# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and\n# unions are shown inside the group in which they are included (e.g. using\n# @ingroup) instead of on a separate page (for HTML and Man pages) or\n# section (for LaTeX and RTF).\n\nINLINE_GROUPED_CLASSES = NO\n\n# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and\n# unions with only public data fields will be shown inline in the documentation\n# of the scope in which they are defined (i.e. file, namespace, or group\n# documentation), provided this scope is documented. If set to NO (the default),\n# structs, classes, and unions are shown on a separate page (for HTML and Man\n# pages) or section (for LaTeX and RTF).\n\nINLINE_SIMPLE_STRUCTS  = NO\n\n# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum\n# is documented as struct, union, or enum with the name of the typedef. So\n# typedef struct TypeS {} TypeT, will appear in the documentation as a struct\n# with name TypeT. When disabled the typedef will appear as a member of a file,\n# namespace, or class. And the struct will be named TypeS. This can typically\n# be useful for C code in case the coding convention dictates that all compound\n# types are typedef'ed and only the typedef is referenced, never the tag name.\n\nTYPEDEF_HIDES_STRUCT   = NO\n\n# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to\n# determine which symbols to keep in memory and which to flush to disk.\n# When the cache is full, less often used symbols will be written to disk.\n# For small to medium size projects (<1000 input files) the default value is\n# probably good enough. For larger projects a too small cache size can cause\n# doxygen to be busy swapping symbols to and from disk most of the time\n# causing a significant performance penalty.\n# If the system has enough physical memory increasing the cache will improve the\n# performance by keeping more symbols in memory. Note that the value works on\n# a logarithmic scale so increasing the size by one will roughly double the\n# memory usage. The cache size is given by this formula:\n# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,\n# corresponding to a cache size of 2^16 = 65536 symbols.\n\n# SYMBOL_CACHE_SIZE      = 0\n\n# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be\n# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given\n# their name and scope. Since this can be an expensive process and often the\n# same symbol appear multiple times in the code, doxygen keeps a cache of\n# pre-resolved symbols. If the cache is too small doxygen will become slower.\n# If the cache is too large, memory is wasted. The cache size is given by this\n# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0,\n# corresponding to a cache size of 2^16 = 65536 symbols.\n\nLOOKUP_CACHE_SIZE      = 0\n\n#---------------------------------------------------------------------------\n# Build related configuration options\n#---------------------------------------------------------------------------\n\n# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in\n# documentation are documented, even if no documentation was available.\n# Private class members and static file members will be hidden unless\n# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES\n\nEXTRACT_ALL            = NO\n\n# If the EXTRACT_PRIVATE tag is set to YES all private members of a class\n# will be included in the documentation.\n\nEXTRACT_PRIVATE        = NO\n\n# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal scope will be included in the documentation.\n\nEXTRACT_PACKAGE        = NO\n\n# If the EXTRACT_STATIC tag is set to YES all static members of a file\n# will be included in the documentation.\n\nEXTRACT_STATIC         = YES\n\n# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)\n# defined locally in source files will be included in the documentation.\n# If set to NO only classes defined in header files are included.\n\nEXTRACT_LOCAL_CLASSES  = NO\n\n# This flag is only useful for Objective-C code. When set to YES local\n# methods, which are defined in the implementation section but not in\n# the interface are included in the documentation.\n# If set to NO (the default) only methods in the interface are included.\n\nEXTRACT_LOCAL_METHODS  = NO\n\n# If this flag is set to YES, the members of anonymous namespaces will be\n# extracted and appear in the documentation as a namespace called\n# 'anonymous_namespace{file}', where file will be replaced with the base\n# name of the file that contains the anonymous namespace. By default\n# anonymous namespaces are hidden.\n\nEXTRACT_ANON_NSPACES   = NO\n\n# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all\n# undocumented members of documented classes, files or namespaces.\n# If set to NO (the default) these members will be included in the\n# various overviews, but no documentation section is generated.\n# This option has no effect if EXTRACT_ALL is enabled.\n\nHIDE_UNDOC_MEMBERS     = YES\n\n# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all\n# undocumented classes that are normally visible in the class hierarchy.\n# If set to NO (the default) these classes will be included in the various\n# overviews. This option has no effect if EXTRACT_ALL is enabled.\n\nHIDE_UNDOC_CLASSES     = YES\n\n# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all\n# friend (class|struct|union) declarations.\n# If set to NO (the default) these declarations will be included in the\n# documentation.\n\nHIDE_FRIEND_COMPOUNDS  = YES\n\n# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any\n# documentation blocks found inside the body of a function.\n# If set to NO (the default) these blocks will be appended to the\n# function's detailed documentation block.\n\nHIDE_IN_BODY_DOCS      = NO\n\n# The INTERNAL_DOCS tag determines if documentation\n# that is typed after a \\internal command is included. If the tag is set\n# to NO (the default) then the documentation will be excluded.\n# Set it to YES to include the internal documentation.\n\nINTERNAL_DOCS          = ${EIGEN_DOXY_INTERNAL}\n\n# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate\n# file names in lower-case letters. If set to YES upper-case letters are also\n# allowed. This is useful if you have classes or files whose names only differ\n# in case and if your file system supports case sensitive file names. Windows\n# and Mac users are advised to set this option to NO.\n\nCASE_SENSE_NAMES       = YES\n\n# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen\n# will show members with their full class and namespace scopes in the\n# documentation. If set to YES the scope will be hidden.\n\nHIDE_SCOPE_NAMES       = NO\n\n# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen\n# will put a list of the files that are included by a file in the documentation\n# of that file.\n\nSHOW_INCLUDE_FILES     = ${EIGEN_DOXY_INTERNAL}\n\n# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen\n# will list include files with double quotes in the documentation\n# rather than with sharp brackets.\n\nFORCE_LOCAL_INCLUDES   = NO\n\n# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]\n# is inserted in the documentation for inline members.\n\nINLINE_INFO            = YES\n\n# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen\n# will sort the (detailed) documentation of file and class members\n# alphabetically by member name. If set to NO the members will appear in\n# declaration order.\n\nSORT_MEMBER_DOCS       = YES\n\n# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the\n# brief documentation of file, namespace and class members alphabetically\n# by member name. If set to NO (the default) the members will appear in\n# declaration order.\n\nSORT_BRIEF_DOCS        = YES\n\n# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen\n# will sort the (brief and detailed) documentation of class members so that\n# constructors and destructors are listed first. If set to NO (the default)\n# the constructors will appear in the respective orders defined by\n# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.\n# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO\n# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.\n\nSORT_MEMBERS_CTORS_1ST = NO\n\n# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the\n# hierarchy of group names into alphabetical order. If set to NO (the default)\n# the group names will appear in their defined order.\n\nSORT_GROUP_NAMES       = NO\n\n# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be\n# sorted by fully-qualified names, including namespaces. If set to\n# NO (the default), the class list will be sorted only by class name,\n# not including the namespace part.\n# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.\n# Note: This option applies only to the class list, not to the\n# alphabetical list.\n\nSORT_BY_SCOPE_NAME     = NO\n\n# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to\n# do proper type resolution of all parameters of a function it will reject a\n# match between the prototype and the implementation of a member function even\n# if there is only one candidate or it is obvious which candidate to choose\n# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen\n# will still accept a match between prototype and implementation in such cases.\n\nSTRICT_PROTO_MATCHING  = NO\n\n# The GENERATE_TODOLIST tag can be used to enable (YES) or\n# disable (NO) the todo list. This list is created by putting \\todo\n# commands in the documentation.\n\nGENERATE_TODOLIST      = ${EIGEN_DOXY_INTERNAL}\n\n# The GENERATE_TESTLIST tag can be used to enable (YES) or\n# disable (NO) the test list. This list is created by putting \\test\n# commands in the documentation.\n\nGENERATE_TESTLIST      = NO\n\n# The GENERATE_BUGLIST tag can be used to enable (YES) or\n# disable (NO) the bug list. This list is created by putting \\bug\n# commands in the documentation.\n\nGENERATE_BUGLIST       = ${EIGEN_DOXY_INTERNAL}\n\n# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or\n# disable (NO) the deprecated list. This list is created by putting\n# \\deprecated commands in the documentation.\n\nGENERATE_DEPRECATEDLIST= YES\n\n# The ENABLED_SECTIONS tag can be used to enable conditional\n# documentation sections, marked by \\if sectionname ... \\endif.\n\nENABLED_SECTIONS       =\n\n# The MAX_INITIALIZER_LINES tag determines the maximum number of lines\n# the initial value of a variable or macro consists of for it to appear in\n# the documentation. If the initializer consists of more lines than specified\n# here it will be hidden. Use a value of 0 to hide initializers completely.\n# The appearance of the initializer of individual variables and macros in the\n# documentation can be controlled using \\showinitializer or \\hideinitializer\n# command in the documentation regardless of this setting.\n\nMAX_INITIALIZER_LINES  = 0\n\n# Set the SHOW_USED_FILES tag to NO to disable the list of files generated\n# at the bottom of the documentation of classes and structs. If set to YES the\n# list will mention the files that were used to generate the documentation.\n\nSHOW_USED_FILES        = YES\n\n# Set the SHOW_FILES tag to NO to disable the generation of the Files page.\n# This will remove the Files entry from the Quick Index and from the\n# Folder Tree View (if specified). The default is YES.\n\nSHOW_FILES             = YES\n\n# Set the SHOW_NAMESPACES tag to NO to disable the generation of the\n# Namespaces page.\n# This will remove the Namespaces entry from the Quick Index\n# and from the Folder Tree View (if specified). The default is YES.\n\nSHOW_NAMESPACES        = NO\n\n# The FILE_VERSION_FILTER tag can be used to specify a program or script that\n# doxygen should invoke to get the current version for each file (typically from\n# the version control system). Doxygen will invoke the program by executing (via\n# popen()) the command <command> <input-file>, where <command> is the value of\n# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file\n# provided by doxygen. Whatever the program writes to standard output\n# is used as the file version. See the manual for examples.\n\nFILE_VERSION_FILTER    =\n\n# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed\n# by doxygen. The layout file controls the global structure of the generated\n# output files in an output format independent way. To create the layout file\n# that represents doxygen's defaults, run doxygen with the -l option.\n# You can optionally specify a file name after the option, if omitted\n# DoxygenLayout.xml will be used as the name of the layout file.\n\nLAYOUT_FILE            = \"${Eigen_BINARY_DIR}/doc${EIGEN_DOXY_OUTPUT_DIRECTORY_SUFFIX}/eigendoxy_layout.xml\"\n\n# The CITE_BIB_FILES tag can be used to specify one or more bib files\n# containing the references data. This must be a list of .bib files. The\n# .bib extension is automatically appended if omitted. Using this command\n# requires the bibtex tool to be installed. See also\n# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style\n# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this\n# feature you need bibtex and perl available in the search path.\n\nCITE_BIB_FILES         =\n\n#---------------------------------------------------------------------------\n# configuration options related to warning and progress messages\n#---------------------------------------------------------------------------\n\n# The QUIET tag can be used to turn on/off the messages that are generated\n# by doxygen. Possible values are YES and NO. If left blank NO is used.\n\nQUIET                  = NO\n\n# The WARNINGS tag can be used to turn on/off the warning messages that are\n# generated by doxygen. Possible values are YES and NO. If left blank\n# NO is used.\n\nWARNINGS               = YES\n\n# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings\n# for undocumented members. If EXTRACT_ALL is set to YES then this flag will\n# automatically be disabled.\n\nWARN_IF_UNDOCUMENTED   = NO\n\n# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for\n# potential errors in the documentation, such as not documenting some\n# parameters in a documented function, or documenting parameters that\n# don't exist or using markup commands wrongly.\n\nWARN_IF_DOC_ERROR      = YES\n\n# The WARN_NO_PARAMDOC option can be enabled to get warnings for\n# functions that are documented, but have no documentation for their parameters\n# or return value. If set to NO (the default) doxygen will only warn about\n# wrong or incomplete parameter documentation, but not about the absence of\n# documentation.\n\nWARN_NO_PARAMDOC       = NO\n\n# The WARN_FORMAT tag determines the format of the warning messages that\n# doxygen can produce. The string should contain the $file, $line, and $text\n# tags, which will be replaced by the file and line number from which the\n# warning originated and the warning text. Optionally the format may contain\n# $version, which will be replaced by the version of the file (if it could\n# be obtained via FILE_VERSION_FILTER)\n\nWARN_FORMAT            = \"$file:$line: $text\"\n\n# The WARN_LOGFILE tag can be used to specify a file to which warning\n# and error messages should be written. If left blank the output is written\n# to stderr.\n\nWARN_LOGFILE           =\n\n#---------------------------------------------------------------------------\n# configuration options related to the input files\n#---------------------------------------------------------------------------\n\n# The INPUT tag can be used to specify the files and/or directories that contain\n# documented source files. You may enter file names like \"myfile.cpp\" or\n# directories like \"/usr/src/myproject\". Separate the files or directories\n# with spaces.\n\nINPUT                  = ${EIGEN_DOXY_INPUT}\n\n# This tag can be used to specify the character encoding of the source files\n# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is\n# also the default input encoding. Doxygen uses libiconv (or the iconv built\n# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for\n# the list of possible encodings.\n\nINPUT_ENCODING         = UTF-8\n\n# If the value of the INPUT tag contains directories, you can use the\n# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp\n# and *.h) to filter out the source-files in the directories. If left\n# blank the following patterns are tested:\n# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh\n# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py\n# *.f90 *.f *.for *.vhd *.vhdl\n\nFILE_PATTERNS          = *\n\n# The RECURSIVE tag can be used to turn specify whether or not subdirectories\n# should be searched for input files as well. Possible values are YES and NO.\n# If left blank NO is used.\n\nRECURSIVE              = YES\n\n# The EXCLUDE tag can be used to specify files and/or directories that should be\n# excluded from the INPUT source files. This way you can easily exclude a\n# subdirectory from a directory tree whose root is specified with the INPUT tag.\n# Note that relative paths are relative to the directory from which doxygen is\n# run.\n\nEXCLUDE                = \"${Eigen_SOURCE_DIR}/Eigen/src/Core/products\" \\\n                         \"${Eigen_SOURCE_DIR}/Eigen/Eigen2Support\" \\\n                         \"${Eigen_SOURCE_DIR}/Eigen/src/Eigen2Support\" \\\n                         \"${Eigen_SOURCE_DIR}/doc/examples\" \\\n                         \"${Eigen_SOURCE_DIR}/doc/special_examples\" \\\n                         \"${Eigen_SOURCE_DIR}/doc/snippets\" \\\n                         \"${Eigen_SOURCE_DIR}/unsupported/doc/examples\" \\\n                         \"${Eigen_SOURCE_DIR}/unsupported/doc/snippets\"\n\n# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or\n# directories that are symbolic links (a Unix file system feature) are excluded\n# from the input.\n\nEXCLUDE_SYMLINKS       = NO\n\n# If the value of the INPUT tag contains directories, you can use the\n# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude\n# certain files from those directories. Note that the wildcards are matched\n# against the file with absolute path, so to exclude all test directories\n# for example use the pattern */test/*\n\nEXCLUDE_PATTERNS       = CMake* \\\n                         *.txt \\\n                         *.sh \\\n                         *.orig \\\n                         *.diff \\\n                         diff \\\n                         *~ \\\n                         *. \\\n                         *.sln \\\n                         *.sdf \\\n                         *.tmp \\\n                         *.vcxproj \\\n                         *.filters \\\n                         *.user \\\n                         *.suo\n\n# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names\n# (namespaces, classes, functions, etc.) that should be excluded from the\n# output. The symbol name can be a fully qualified name, a word, or if the\n# wildcard * is used, a substring. Examples: ANamespace, AClass,\n# AClass::ANamespace, ANamespace::*Test\n\nEXCLUDE_SYMBOLS        = internal::* \\\n                         Flagged* \\\n                         *InnerIterator* \\\n                         DenseStorage<* \\\n                         \n\n# The EXAMPLE_PATH tag can be used to specify one or more files or\n# directories that contain example code fragments that are included (see\n# the \\include command).\n\nEXAMPLE_PATH           = \"${Eigen_SOURCE_DIR}/doc/snippets\" \\\n                         \"${Eigen_BINARY_DIR}/doc/snippets\" \\\n                         \"${Eigen_SOURCE_DIR}/doc/examples\" \\\n                         \"${Eigen_BINARY_DIR}/doc/examples\" \\\n                         \"${Eigen_SOURCE_DIR}/doc/special_examples\" \\\n                         \"${Eigen_BINARY_DIR}/doc/special_examples\" \\\n                         \"${Eigen_SOURCE_DIR}/unsupported/doc/snippets\" \\\n                         \"${Eigen_BINARY_DIR}/unsupported/doc/snippets\" \\\n                         \"${Eigen_SOURCE_DIR}/unsupported/doc/examples\" \\\n                         \"${Eigen_BINARY_DIR}/unsupported/doc/examples\"\n\n# If the value of the EXAMPLE_PATH tag contains directories, you can use the\n# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp\n# and *.h) to filter out the source-files in the directories. If left\n# blank all files are included.\n\nEXAMPLE_PATTERNS       = *\n\n# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be\n# searched for input files to be used with the \\include or \\dontinclude\n# commands irrespective of the value of the RECURSIVE tag.\n# Possible values are YES and NO. If left blank NO is used.\n\nEXAMPLE_RECURSIVE      = NO\n\n# The IMAGE_PATH tag can be used to specify one or more files or\n# directories that contain image that are included in the documentation (see\n# the \\image command).\n\nIMAGE_PATH             = ${Eigen_BINARY_DIR}/doc/html\n\n# The INPUT_FILTER tag can be used to specify a program that doxygen should\n# invoke to filter for each input file. Doxygen will invoke the filter program\n# by executing (via popen()) the command <filter> <input-file>, where <filter>\n# is the value of the INPUT_FILTER tag, and <input-file> is the name of an\n# input file. Doxygen will then use the output that the filter program writes\n# to standard output.\n# If FILTER_PATTERNS is specified, this tag will be\n# ignored.\n\nINPUT_FILTER           =\n\n# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern\n# basis.\n# Doxygen will compare the file name with each pattern and apply the\n# filter if there is a match.\n# The filters are a list of the form:\n# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further\n# info on how filters are used. If FILTER_PATTERNS is empty or if\n# non of the patterns match the file name, INPUT_FILTER is applied.\n\nFILTER_PATTERNS        =\n\n# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using\n# INPUT_FILTER) will be used to filter the input files when producing source\n# files to browse (i.e. when SOURCE_BROWSER is set to YES).\n\nFILTER_SOURCE_FILES    = NO\n\n# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file\n# pattern. A pattern will override the setting for FILTER_PATTERN (if any)\n# and it is also possible to disable source filtering for a specific pattern\n# using *.ext= (so without naming a filter). This option only has effect when\n# FILTER_SOURCE_FILES is enabled.\n\nFILTER_SOURCE_PATTERNS =\n\n#---------------------------------------------------------------------------\n# configuration options related to source browsing\n#---------------------------------------------------------------------------\n\n# If the SOURCE_BROWSER tag is set to YES then a list of source files will\n# be generated. Documented entities will be cross-referenced with these sources.\n# Note: To get rid of all source code in the generated output, make sure also\n# VERBATIM_HEADERS is set to NO.\n\nSOURCE_BROWSER         = NO\n\n# Setting the INLINE_SOURCES tag to YES will include the body\n# of functions and classes directly in the documentation.\n\nINLINE_SOURCES         = NO\n\n# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct\n# doxygen to hide any special comment blocks from generated source code\n# fragments. Normal C, C++ and Fortran comments will always remain visible.\n\nSTRIP_CODE_COMMENTS    = YES\n\n# If the REFERENCED_BY_RELATION tag is set to YES\n# then for each documented function all documented\n# functions referencing it will be listed.\n\nREFERENCED_BY_RELATION = NO\n\n# If the REFERENCES_RELATION tag is set to YES\n# then for each documented function all documented entities\n# called/used by that function will be listed.\n\nREFERENCES_RELATION    = NO\n\n# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)\n# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from\n# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will\n# link to the source code.\n# Otherwise they will link to the documentation.\n\nREFERENCES_LINK_SOURCE = YES\n\n# If the USE_HTAGS tag is set to YES then the references to source code\n# will point to the HTML generated by the htags(1) tool instead of doxygen\n# built-in source browser. The htags tool is part of GNU's global source\n# tagging system (see http://www.gnu.org/software/global/global.html). You\n# will need version 4.8.6 or higher.\n\nUSE_HTAGS              = NO\n\n# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen\n# will generate a verbatim copy of the header file for each class for\n# which an include is specified. Set to NO to disable this.\n\nVERBATIM_HEADERS       = YES\n\n#---------------------------------------------------------------------------\n# configuration options related to the alphabetical class index\n#---------------------------------------------------------------------------\n\n# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index\n# of all compounds will be generated. Enable this if the project\n# contains a lot of classes, structs, unions or interfaces.\n\nALPHABETICAL_INDEX     = NO\n\n# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then\n# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns\n# in which this list will be split (can be a number in the range [1..20])\n\nCOLS_IN_ALPHA_INDEX    = 5\n\n# In case all classes in a project start with a common prefix, all\n# classes will be put under the same header in the alphabetical index.\n# The IGNORE_PREFIX tag can be used to specify one or more prefixes that\n# should be ignored while generating the index headers.\n\nIGNORE_PREFIX          =\n\n#---------------------------------------------------------------------------\n# configuration options related to the HTML output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_HTML tag is set to YES (the default) Doxygen will\n# generate HTML output.\n\nGENERATE_HTML          = YES\n\n# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.\n# If a relative path is entered the value of OUTPUT_DIRECTORY will be\n# put in front of it. If left blank `html' will be used as the default path.\n\nHTML_OUTPUT            = \"${Eigen_BINARY_DIR}/doc/html${EIGEN_DOXY_OUTPUT_DIRECTORY_SUFFIX}\"\n\n# The HTML_FILE_EXTENSION tag can be used to specify the file extension for\n# each generated HTML page (for example: .htm,.php,.asp). If it is left blank\n# doxygen will generate files with .html extension.\n\nHTML_FILE_EXTENSION    = .html\n\n# The HTML_HEADER tag can be used to specify a personal HTML header for\n# each generated HTML page. If it is left blank doxygen will generate a\n# standard header. Note that when using a custom header you are responsible\n#  for the proper inclusion of any scripts and style sheets that doxygen\n# needs, which is dependent on the configuration options used.\n# It is advised to generate a default header using \"doxygen -w html\n# header.html footer.html stylesheet.css YourConfigFile\" and then modify\n# that header. Note that the header is subject to change so you typically\n# have to redo this when upgrading to a newer version of doxygen or when\n# changing the value of configuration settings such as GENERATE_TREEVIEW!\n\nHTML_HEADER            = \"${Eigen_BINARY_DIR}/doc/eigendoxy_header.html\"\n\n# The HTML_FOOTER tag can be used to specify a personal HTML footer for\n# each generated HTML page. If it is left blank doxygen will generate a\n# standard footer.\n\nHTML_FOOTER            = \"${Eigen_BINARY_DIR}/doc/eigendoxy_footer.html\"\n\n# The HTML_STYLESHEET tag can be used to specify a user-defined cascading\n# style sheet that is used by each HTML page. It can be used to\n# fine-tune the look of the HTML output. If the tag is left blank doxygen\n# will generate a default style sheet. Note that doxygen will try to copy\n# the style sheet file to the HTML output directory, so don't put your own\n# style sheet in the HTML output directory as well, or it will be erased!\n\nHTML_STYLESHEET        = \n\n# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or\n# other source files which should be copied to the HTML output directory. Note\n# that these files will be copied to the base HTML output directory. Use the\n# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these\n# files. In the HTML_STYLESHEET file, use the file name only. Also note that\n# the files will be copied as-is; there are no commands or markers available.\n\nHTML_EXTRA_FILES       = \"${Eigen_SOURCE_DIR}/doc/eigendoxy.css\"\n\n# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.\n# Doxygen will adjust the colors in the style sheet and background images\n# according to this color. Hue is specified as an angle on a colorwheel,\n# see http://en.wikipedia.org/wiki/Hue for more information.\n# For instance the value 0 represents red, 60 is yellow, 120 is green,\n# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.\n# The allowed range is 0 to 359.\n# The default is 220.\n\nHTML_COLORSTYLE_HUE    = ${EIGEN_DOXY_HTML_COLORSTYLE_HUE}\n\n# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of\n# the colors in the HTML output. For a value of 0 the output will use\n# grayscales only. A value of 255 will produce the most vivid colors.\n\nHTML_COLORSTYLE_SAT    = 100\n\n# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to\n# the luminance component of the colors in the HTML output. Values below\n# 100 gradually make the output lighter, whereas values above 100 make\n# the output darker. The value divided by 100 is the actual gamma applied,\n# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,\n# and 100 does not change the gamma.\n\nHTML_COLORSTYLE_GAMMA  = 80\n\n# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML\n# page will contain the date and time when the page was generated. Setting\n# this to NO can help when comparing the output of multiple runs.\n\nHTML_TIMESTAMP         = YES\n\n# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML\n# documentation will contain sections that can be hidden and shown after the\n# page has loaded.\n\nHTML_DYNAMIC_SECTIONS  = YES\n\n# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of\n# entries shown in the various tree structured indices initially; the user\n# can expand and collapse entries dynamically later on. Doxygen will expand\n# the tree to such a level that at most the specified number of entries are\n# visible (unless a fully collapsed tree already exceeds this amount).\n# So setting the number of entries 1 will produce a full collapsed tree by\n# default. 0 is a special value representing an infinite number of entries\n# and will result in a full expanded tree by default.\n\nHTML_INDEX_NUM_ENTRIES = 100\n\n# If the GENERATE_DOCSET tag is set to YES, additional index files\n# will be generated that can be used as input for Apple's Xcode 3\n# integrated development environment, introduced with OSX 10.5 (Leopard).\n# To create a documentation set, doxygen will generate a Makefile in the\n# HTML output directory. Running make will produce the docset in that\n# directory and running \"make install\" will install the docset in\n# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find\n# it at startup.\n# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html\n# for more information.\n\nGENERATE_DOCSET        = NO\n\n# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the\n# feed. A documentation feed provides an umbrella under which multiple\n# documentation sets from a single provider (such as a company or product suite)\n# can be grouped.\n\nDOCSET_FEEDNAME        = \"Doxygen generated docs\"\n\n# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that\n# should uniquely identify the documentation set bundle. This should be a\n# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen\n# will append .docset to the name.\n\nDOCSET_BUNDLE_ID       = org.doxygen.Project\n\n# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify\n# the documentation publisher. This should be a reverse domain-name style\n# string, e.g. com.mycompany.MyDocSet.documentation.\n\nDOCSET_PUBLISHER_ID    = org.doxygen.Publisher\n\n# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.\n\nDOCSET_PUBLISHER_NAME  = Publisher\n\n# If the GENERATE_HTMLHELP tag is set to YES, additional index files\n# will be generated that can be used as input for tools like the\n# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)\n# of the generated HTML documentation.\n\nGENERATE_HTMLHELP      = NO\n\n# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can\n# be used to specify the file name of the resulting .chm file. You\n# can add a path in front of the file if the result should not be\n# written to the html output directory.\n\nCHM_FILE               =\n\n# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can\n# be used to specify the location (absolute path including file name) of\n# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run\n# the HTML help compiler on the generated index.hhp.\n\nHHC_LOCATION           =\n\n# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag\n# controls if a separate .chi index file is generated (YES) or that\n# it should be included in the master .chm file (NO).\n\nGENERATE_CHI           = NO\n\n# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING\n# is used to encode HtmlHelp index (hhk), content (hhc) and project file\n# content.\n\nCHM_INDEX_ENCODING     =\n\n# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag\n# controls whether a binary table of contents is generated (YES) or a\n# normal table of contents (NO) in the .chm file.\n\nBINARY_TOC             = NO\n\n# The TOC_EXPAND flag can be set to YES to add extra items for group members\n# to the contents of the HTML help documentation and to the tree view.\n\nTOC_EXPAND             = NO\n\n# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and\n# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated\n# that can be used as input for Qt's qhelpgenerator to generate a\n# Qt Compressed Help (.qch) of the generated HTML documentation.\n\nGENERATE_QHP           = NO\n\n# If the QHG_LOCATION tag is specified, the QCH_FILE tag can\n# be used to specify the file name of the resulting .qch file.\n# The path specified is relative to the HTML output folder.\n\nQCH_FILE               =\n\n# The QHP_NAMESPACE tag specifies the namespace to use when generating\n# Qt Help Project output. For more information please see\n# http://doc.trolltech.com/qthelpproject.html#namespace\n\nQHP_NAMESPACE          = org.doxygen.Project\n\n# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating\n# Qt Help Project output. For more information please see\n# http://doc.trolltech.com/qthelpproject.html#virtual-folders\n\nQHP_VIRTUAL_FOLDER     = doc\n\n# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to\n# add. For more information please see\n# http://doc.trolltech.com/qthelpproject.html#custom-filters\n\nQHP_CUST_FILTER_NAME   =\n\n# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the\n# custom filter to add. For more information please see\n# <a href=\"http://doc.trolltech.com/qthelpproject.html#custom-filters\">\n# Qt Help Project / Custom Filters</a>.\n\nQHP_CUST_FILTER_ATTRS  =\n\n# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this\n# project's\n# filter section matches.\n# <a href=\"http://doc.trolltech.com/qthelpproject.html#filter-attributes\">\n# Qt Help Project / Filter Attributes</a>.\n\nQHP_SECT_FILTER_ATTRS  =\n\n# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can\n# be used to specify the location of Qt's qhelpgenerator.\n# If non-empty doxygen will try to run qhelpgenerator on the generated\n# .qhp file.\n\nQHG_LOCATION           =\n\n# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files\n#  will be generated, which together with the HTML files, form an Eclipse help\n# plugin. To install this plugin and make it available under the help contents\n# menu in Eclipse, the contents of the directory containing the HTML and XML\n# files needs to be copied into the plugins directory of eclipse. The name of\n# the directory within the plugins directory should be the same as\n# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before\n# the help appears.\n\nGENERATE_ECLIPSEHELP   = NO\n\n# A unique identifier for the eclipse help plugin. When installing the plugin\n# the directory name containing the HTML and XML files should also have\n# this name.\n\nECLIPSE_DOC_ID         = org.doxygen.Project\n\n# The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs)\n# at top of each HTML page. The value NO (the default) enables the index and\n# the value YES disables it. Since the tabs have the same information as the\n# navigation tree you can set this option to NO if you already set\n# GENERATE_TREEVIEW to YES.\n\nDISABLE_INDEX          = YES\n\n# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index\n# structure should be generated to display hierarchical information.\n# If the tag value is set to YES, a side panel will be generated\n# containing a tree-like index structure (just like the one that\n# is generated for HTML Help). For this to work a browser that supports\n# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).\n# Windows users are probably better off using the HTML help feature.\n# Since the tree basically has the same information as the tab index you\n# could consider to set DISABLE_INDEX to NO when enabling this option.\n\nGENERATE_TREEVIEW      = YES\n\n# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values\n# (range [0,1..20]) that doxygen will group on one line in the generated HTML\n# documentation. Note that a value of 0 will completely suppress the enum\n# values from appearing in the overview section.\n\nENUM_VALUES_PER_LINE   = 1\n\n# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be\n# used to set the initial width (in pixels) of the frame in which the tree\n# is shown.\n\nTREEVIEW_WIDTH         = 250\n\n# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open\n# links to external symbols imported via tag files in a separate window.\n\nEXT_LINKS_IN_WINDOW    = NO\n\n# Use this tag to change the font size of Latex formulas included\n# as images in the HTML documentation. The default is 10. Note that\n# when you change the font size after a successful doxygen run you need\n# to manually remove any form_*.png images from the HTML output directory\n# to force them to be regenerated.\n\nFORMULA_FONTSIZE       = 12\n\n# Use the FORMULA_TRANPARENT tag to determine whether or not the images\n# generated for formulas are transparent PNGs. Transparent PNGs are\n# not supported properly for IE 6.0, but are supported on all modern browsers.\n# Note that when changing this option you need to delete any form_*.png files\n# in the HTML output before the changes have effect.\n\nFORMULA_TRANSPARENT    = YES\n\n# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax\n# (see http://www.mathjax.org) which uses client side Javascript for the\n# rendering instead of using prerendered bitmaps. Use this if you do not\n# have LaTeX installed or if you want to formulas look prettier in the HTML\n# output. When enabled you may also need to install MathJax separately and\n# configure the path to it using the MATHJAX_RELPATH option.\n\nUSE_MATHJAX            = NO\n\n# When MathJax is enabled you need to specify the location relative to the\n# HTML output directory using the MATHJAX_RELPATH option. The destination\n# directory should contain the MathJax.js script. For instance, if the mathjax\n# directory is located at the same level as the HTML output directory, then\n# MATHJAX_RELPATH should be ../mathjax. The default value points to\n# the MathJax Content Delivery Network so you can quickly see the result without\n# installing MathJax.\n# However, it is strongly recommended to install a local\n# copy of MathJax from http://www.mathjax.org before deployment.\n\nMATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest\n\n# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension\n# names that should be enabled during MathJax rendering.\n\nMATHJAX_EXTENSIONS     =\n\n# When the SEARCHENGINE tag is enabled doxygen will generate a search box\n# for the HTML output. The underlying search engine uses javascript\n# and DHTML and should work on any modern browser. Note that when using\n# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets\n# (GENERATE_DOCSET) there is already a search function so this one should\n# typically be disabled. For large projects the javascript based search engine\n# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.\n\nSEARCHENGINE           = YES\n\n# When the SERVER_BASED_SEARCH tag is enabled the search engine will be\n# implemented using a PHP enabled web server instead of at the web client\n# using Javascript. Doxygen will generate the search PHP script and index\n# file to put on the web server. The advantage of the server\n# based approach is that it scales better to large projects and allows\n# full text search. The disadvantages are that it is more difficult to setup\n# and does not have live searching capabilities.\n\nSERVER_BASED_SEARCH    = NO\n\n#---------------------------------------------------------------------------\n# configuration options related to the LaTeX output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will\n# generate Latex output.\n\nGENERATE_LATEX         = NO\n\n# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.\n# If a relative path is entered the value of OUTPUT_DIRECTORY will be\n# put in front of it. If left blank `latex' will be used as the default path.\n\nLATEX_OUTPUT           = latex\n\n# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be\n# invoked. If left blank `latex' will be used as the default command name.\n# Note that when enabling USE_PDFLATEX this option is only used for\n# generating bitmaps for formulas in the HTML output, but not in the\n# Makefile that is written to the output directory.\n\nLATEX_CMD_NAME         = latex\n\n# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to\n# generate index for LaTeX. If left blank `makeindex' will be used as the\n# default command name.\n\nMAKEINDEX_CMD_NAME     = makeindex\n\n# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact\n# LaTeX documents. This may be useful for small projects and may help to\n# save some trees in general.\n\nCOMPACT_LATEX          = NO\n\n# The PAPER_TYPE tag can be used to set the paper type that is used\n# by the printer. Possible values are: a4, letter, legal and\n# executive. If left blank a4wide will be used.\n\nPAPER_TYPE             = a4wide\n\n# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX\n# packages that should be included in the LaTeX output.\n\nEXTRA_PACKAGES         = amssymb \\\n                         amsmath\n\n# The LATEX_HEADER tag can be used to specify a personal LaTeX header for\n# the generated latex document. The header should contain everything until\n# the first chapter. If it is left blank doxygen will generate a\n# standard header. Notice: only use this tag if you know what you are doing!\n\nLATEX_HEADER           =\n\n# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for\n# the generated latex document. The footer should contain everything after\n# the last chapter. If it is left blank doxygen will generate a\n# standard footer. Notice: only use this tag if you know what you are doing!\n\nLATEX_FOOTER           =\n\n# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated\n# is prepared for conversion to pdf (using ps2pdf). The pdf file will\n# contain links (just like the HTML output) instead of page references\n# This makes the output suitable for online browsing using a pdf viewer.\n\nPDF_HYPERLINKS         = NO\n\n# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of\n# plain latex in the generated Makefile. Set this option to YES to get a\n# higher quality PDF documentation.\n\nUSE_PDFLATEX           = NO\n\n# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\\\batchmode.\n# command to the generated LaTeX files. This will instruct LaTeX to keep\n# running if errors occur, instead of asking the user for help.\n# This option is also used when generating formulas in HTML.\n\nLATEX_BATCHMODE        = NO\n\n# If LATEX_HIDE_INDICES is set to YES then doxygen will not\n# include the index chapters (such as File Index, Compound Index, etc.)\n# in the output.\n\nLATEX_HIDE_INDICES     = NO\n\n# If LATEX_SOURCE_CODE is set to YES then doxygen will include\n# source code with syntax highlighting in the LaTeX output.\n# Note that which sources are shown also depends on other settings\n# such as SOURCE_BROWSER.\n\nLATEX_SOURCE_CODE      = NO\n\n# The LATEX_BIB_STYLE tag can be used to specify the style to use for the\n# bibliography, e.g. plainnat, or ieeetr. The default style is \"plain\". See\n# http://en.wikipedia.org/wiki/BibTeX for more info.\n\nLATEX_BIB_STYLE        = plain\n\n#---------------------------------------------------------------------------\n# configuration options related to the RTF output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output\n# The RTF output is optimized for Word 97 and may not look very pretty with\n# other RTF readers or editors.\n\nGENERATE_RTF           = NO\n\n# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.\n# If a relative path is entered the value of OUTPUT_DIRECTORY will be\n# put in front of it. If left blank `rtf' will be used as the default path.\n\nRTF_OUTPUT             = rtf\n\n# If the COMPACT_RTF tag is set to YES Doxygen generates more compact\n# RTF documents. This may be useful for small projects and may help to\n# save some trees in general.\n\nCOMPACT_RTF            = NO\n\n# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated\n# will contain hyperlink fields. The RTF file will\n# contain links (just like the HTML output) instead of page references.\n# This makes the output suitable for online browsing using WORD or other\n# programs which support those fields.\n# Note: wordpad (write) and others do not support links.\n\nRTF_HYPERLINKS         = NO\n\n# Load style sheet definitions from file. Syntax is similar to doxygen's\n# config file, i.e. a series of assignments. You only have to provide\n# replacements, missing definitions are set to their default value.\n\nRTF_STYLESHEET_FILE    =\n\n# Set optional variables used in the generation of an rtf document.\n# Syntax is similar to doxygen's config file.\n\nRTF_EXTENSIONS_FILE    =\n\n#---------------------------------------------------------------------------\n# configuration options related to the man page output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_MAN tag is set to YES (the default) Doxygen will\n# generate man pages\n\nGENERATE_MAN           = NO\n\n# The MAN_OUTPUT tag is used to specify where the man pages will be put.\n# If a relative path is entered the value of OUTPUT_DIRECTORY will be\n# put in front of it. If left blank `man' will be used as the default path.\n\nMAN_OUTPUT             = man\n\n# The MAN_EXTENSION tag determines the extension that is added to\n# the generated man pages (default is the subroutine's section .3)\n\nMAN_EXTENSION          = .3\n\n# If the MAN_LINKS tag is set to YES and Doxygen generates man output,\n# then it will generate one additional man file for each entity\n# documented in the real man page(s). These additional files\n# only source the real man page, but without them the man command\n# would be unable to find the correct page. The default is NO.\n\nMAN_LINKS              = NO\n\n#---------------------------------------------------------------------------\n# configuration options related to the XML output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_XML tag is set to YES Doxygen will\n# generate an XML file that captures the structure of\n# the code including all documentation.\n\nGENERATE_XML           = NO\n\n# The XML_OUTPUT tag is used to specify where the XML pages will be put.\n# If a relative path is entered the value of OUTPUT_DIRECTORY will be\n# put in front of it. If left blank `xml' will be used as the default path.\n\nXML_OUTPUT             = xml\n\n# The XML_SCHEMA tag can be used to specify an XML schema,\n# which can be used by a validating XML parser to check the\n# syntax of the XML files.\n\n# XML_SCHEMA             =\n\n# The XML_DTD tag can be used to specify an XML DTD,\n# which can be used by a validating XML parser to check the\n# syntax of the XML files.\n\n# XML_DTD                =\n\n# If the XML_PROGRAMLISTING tag is set to YES Doxygen will\n# dump the program listings (including syntax highlighting\n# and cross-referencing information) to the XML output. Note that\n# enabling this will significantly increase the size of the XML output.\n\nXML_PROGRAMLISTING     = YES\n\n#---------------------------------------------------------------------------\n# configuration options for the AutoGen Definitions output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will\n# generate an AutoGen Definitions (see autogen.sf.net) file\n# that captures the structure of the code including all\n# documentation. Note that this feature is still experimental\n# and incomplete at the moment.\n\nGENERATE_AUTOGEN_DEF   = NO\n\n#---------------------------------------------------------------------------\n# configuration options related to the Perl module output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_PERLMOD tag is set to YES Doxygen will\n# generate a Perl module file that captures the structure of\n# the code including all documentation. Note that this\n# feature is still experimental and incomplete at the\n# moment.\n\nGENERATE_PERLMOD       = NO\n\n# If the PERLMOD_LATEX tag is set to YES Doxygen will generate\n# the necessary Makefile rules, Perl scripts and LaTeX code to be able\n# to generate PDF and DVI output from the Perl module output.\n\nPERLMOD_LATEX          = NO\n\n# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be\n# nicely formatted so it can be parsed by a human reader.\n# This is useful\n# if you want to understand what is going on.\n# On the other hand, if this\n# tag is set to NO the size of the Perl module output will be much smaller\n# and Perl will parse it just the same.\n\nPERLMOD_PRETTY         = YES\n\n# The names of the make variables in the generated doxyrules.make file\n# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.\n# This is useful so different doxyrules.make files included by the same\n# Makefile don't overwrite each other's variables.\n\nPERLMOD_MAKEVAR_PREFIX =\n\n#---------------------------------------------------------------------------\n# Configuration options related to the preprocessor\n#---------------------------------------------------------------------------\n\n# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will\n# evaluate all C-preprocessor directives found in the sources and include\n# files.\n\nENABLE_PREPROCESSING   = YES\n\n# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro\n# names in the source code. If set to NO (the default) only conditional\n# compilation will be performed. Macro expansion can be done in a controlled\n# way by setting EXPAND_ONLY_PREDEF to YES.\n\nMACRO_EXPANSION        = YES\n\n# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES\n# then the macro expansion is limited to the macros specified with the\n# PREDEFINED and EXPAND_AS_DEFINED tags.\n\nEXPAND_ONLY_PREDEF     = YES\n\n# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files\n# pointed to by INCLUDE_PATH will be searched when a #include is found.\n\nSEARCH_INCLUDES        = YES\n\n# The INCLUDE_PATH tag can be used to specify one or more directories that\n# contain include files that are not input files but should be processed by\n# the preprocessor.\n\nINCLUDE_PATH           = \"${Eigen_SOURCE_DIR}/Eigen/src/plugins\"\n\n# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard\n# patterns (like *.h and *.hpp) to filter out the header-files in the\n# directories. If left blank, the patterns specified with FILE_PATTERNS will\n# be used.\n\nINCLUDE_FILE_PATTERNS  =\n\n# The PREDEFINED tag can be used to specify one or more macro names that\n# are defined before the preprocessor is started (similar to the -D option of\n# gcc). The argument of the tag is a list of macros of the form: name\n# or name=definition (no spaces). If the definition and the = are\n# omitted =1 is assumed. To prevent a macro definition from being\n# undefined via #undef or recursively expanded use the := operator\n# instead of the = operator.\n\nPREDEFINED             = EIGEN_EMPTY_STRUCT \\\n                         EIGEN_PARSED_BY_DOXYGEN \\\n                         EIGEN_VECTORIZE \\\n                         EIGEN_QT_SUPPORT \\\n                         EIGEN_STRONG_INLINE=inline \\\n                         EIGEN_DEVICE_FUNC= \\\n                         EIGEN_HAS_CXX11=1 \\\n                         EIGEN_HAS_CXX11_MATH=1 \\\n                         \"EIGEN_MAKE_CWISE_BINARY_OP(METHOD,FUNCTOR)=template<typename OtherDerived> const CwiseBinaryOp<FUNCTOR<Scalar>, const Derived, const OtherDerived> METHOD(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const;\" \\\n                         \"EIGEN_CWISE_PRODUCT_RETURN_TYPE(LHS,RHS)=CwiseBinaryOp<internal::scalar_product_op<LHS::Scalar,RHS::Scalar>, const LHS, const RHS>\"\\\n                         \"EIGEN_CAT2(a,b)= a ## b\"\\\n                         \"EIGEN_CAT(a,b)=EIGEN_CAT2(a,b)\"\\\n                         \"EIGEN_CWISE_BINARY_RETURN_TYPE(LHS,RHS,OPNAME)=CwiseBinaryOp<EIGEN_CAT(EIGEN_CAT(internal::scalar_,OPNAME),_op)<LHS::Scalar, RHS::Scalar>, const LHS, const RHS>\"\\\n                         \"EIGEN_ALIGN_TO_BOUNDARY(x)=\"\\\n                         DOXCOMMA=,\n\n\n# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then\n# this tag can be used to specify a list of macro names that should be expanded.\n# The macro definition that is found in the sources will be used.\n# Use the PREDEFINED tag if you want to use a different macro definition that\n# overrules the definition found in the source code.\n\nEXPAND_AS_DEFINED      = EIGEN_MAKE_TYPEDEFS \\\n                         EIGEN_MAKE_FIXED_TYPEDEFS \\\n                         EIGEN_MAKE_TYPEDEFS_ALL_SIZES \\\n                         EIGEN_MAKE_ARRAY_TYPEDEFS \\\n                         EIGEN_MAKE_ARRAY_FIXED_TYPEDEFS \\\n                         EIGEN_MAKE_ARRAY_TYPEDEFS_ALL_SIZES \\\n                         EIGEN_CWISE_UNOP_RETURN_TYPE \\\n                         EIGEN_CWISE_BINOP_RETURN_TYPE \\\n                         EIGEN_CURRENT_STORAGE_BASE_CLASS \\\n                         EIGEN_MATHFUNC_IMPL \\\n                         _EIGEN_GENERIC_PUBLIC_INTERFACE \\\n                         EIGEN_ARRAY_DECLARE_GLOBAL_UNARY \\\n                         EIGEN_EMPTY \\\n                         EIGEN_EULER_ANGLES_TYPEDEFS \\\n                         EIGEN_EULER_ANGLES_SINGLE_TYPEDEF \\\n                         EIGEN_EULER_SYSTEM_TYPEDEF \\\n                         EIGEN_AUTODIFF_DECLARE_GLOBAL_UNARY \\\n                         EIGEN_MATRIX_FUNCTION \\\n                         EIGEN_MATRIX_FUNCTION_1 \\\n                         EIGEN_DOC_UNARY_ADDONS \\\n                         EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL \\\n                         EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF\n\n\n# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then\n# doxygen's preprocessor will remove all references to function-like macros\n# that are alone on a line, have an all uppercase name, and do not end with a\n# semicolon, because these will confuse the parser if not removed.\n\nSKIP_FUNCTION_MACROS   = YES\n\n#---------------------------------------------------------------------------\n# Configuration::additions related to external references\n#---------------------------------------------------------------------------\n\n# The TAGFILES option can be used to specify one or more tagfiles. For each\n# tag file the location of the external documentation should be added. The\n# format of a tag file without this location is as follows:\n#\n# TAGFILES = file1 file2 ...\n# Adding location for the tag files is done as follows:\n#\n# TAGFILES = file1=loc1 \"file2 = loc2\" ...\n# where \"loc1\" and \"loc2\" can be relative or absolute paths\n# or URLs. Note that each tag file must have a unique name (where the name does\n# NOT include the path). If a tag file is not located in the directory in which\n# doxygen is run, you must also specify the path to the tagfile here.\n\nTAGFILES               = ${EIGEN_DOXY_TAGFILES}\n# \"${Eigen_BINARY_DIR}/doc/eigen-unsupported.doxytags =unsupported\"\n\n# When a file name is specified after GENERATE_TAGFILE, doxygen will create\n# a tag file that is based on the input files it reads.\n\nGENERATE_TAGFILE       = \"${Eigen_BINARY_DIR}/doc/${EIGEN_DOXY_PROJECT_NAME}.doxytags\"\n\n# If the ALLEXTERNALS tag is set to YES all external classes will be listed\n# in the class index. If set to NO only the inherited external classes\n# will be listed.\n\nALLEXTERNALS           = NO\n\n# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed\n# in the modules index. If set to NO, only the current project's groups will\n# be listed.\n\nEXTERNAL_GROUPS        = NO\n\n# The PERL_PATH should be the absolute path and name of the perl script\n# interpreter (i.e. the result of `which perl').\n\nPERL_PATH              = /usr/bin/perl\n\n#---------------------------------------------------------------------------\n# Configuration options related to the dot tool\n#---------------------------------------------------------------------------\n\n# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will\n# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base\n# or super classes. Setting the tag to NO turns the diagrams off. Note that\n# this option also works with HAVE_DOT disabled, but it is recommended to\n# install and use dot, since it yields more powerful graphs.\n\nCLASS_DIAGRAMS         = YES\n\n# You can define message sequence charts within doxygen comments using the \\msc\n# command. Doxygen will then run the mscgen tool (see\n# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the\n# documentation. The MSCGEN_PATH tag allows you to specify the directory where\n# the mscgen tool resides. If left empty the tool is assumed to be found in the\n# default search path.\n\nMSCGEN_PATH            =\n\n# If set to YES, the inheritance and collaboration graphs will hide\n# inheritance and usage relations if the target is undocumented\n# or is not a class.\n\nHIDE_UNDOC_RELATIONS   = NO\n\n# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is\n# available from the path. This tool is part of Graphviz, a graph visualization\n# toolkit from AT&T and Lucent Bell Labs. The other options in this section\n# have no effect if this option is set to NO (the default)\n\nHAVE_DOT               = YES\n\n# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is\n# allowed to run in parallel. When set to 0 (the default) doxygen will\n# base this on the number of processors available in the system. You can set it\n# explicitly to a value larger than 0 to get control over the balance\n# between CPU load and processing speed.\n\nDOT_NUM_THREADS        = 0\n\n# By default doxygen will use the Helvetica font for all dot files that\n# doxygen generates. When you want a differently looking font you can specify\n# the font name using DOT_FONTNAME. You need to make sure dot is able to find\n# the font, which can be done by putting it in a standard location or by setting\n# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the\n# directory containing the font.\n\nDOT_FONTNAME           = \n\n# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.\n# The default size is 10pt.\n\nDOT_FONTSIZE           = 10\n\n# By default doxygen will tell dot to use the Helvetica font.\n# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to\n# set the path where dot can find it.\n\nDOT_FONTPATH           =\n\n# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen\n# will generate a graph for each documented class showing the direct and\n# indirect inheritance relations. Setting this tag to YES will force the\n# CLASS_DIAGRAMS tag to NO.\n\nCLASS_GRAPH            = YES\n\n# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen\n# will generate a graph for each documented class showing the direct and\n# indirect implementation dependencies (inheritance, containment, and\n# class references variables) of the class with other documented classes.\n\nCOLLABORATION_GRAPH    = NO\n\n# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen\n# will generate a graph for groups, showing the direct groups dependencies\n\nGROUP_GRAPHS           = NO\n\n# If the UML_LOOK tag is set to YES doxygen will generate inheritance and\n# collaboration diagrams in a style similar to the OMG's Unified Modeling\n# Language.\n\nUML_LOOK               = YES\n\n# If the UML_LOOK tag is enabled, the fields and methods are shown inside\n# the class node. If there are many fields or methods and many nodes the\n# graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS\n# threshold limits the number of items for each type to make the size more\n# manageable. Set this to 0 for no limit. Note that the threshold may be\n# exceeded by 50% before the limit is enforced.\n\nUML_LIMIT_NUM_FIELDS   = 10\n\n# If set to YES, the inheritance and collaboration graphs will show the\n# relations between templates and their instances.\n\nTEMPLATE_RELATIONS     = NO\n\n# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT\n# tags are set to YES then doxygen will generate a graph for each documented\n# file showing the direct and indirect include dependencies of the file with\n# other documented files.\n\nINCLUDE_GRAPH          = NO\n\n# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and\n# HAVE_DOT tags are set to YES then doxygen will generate a graph for each\n# documented header file showing the documented files that directly or\n# indirectly include this file.\n\nINCLUDED_BY_GRAPH      = NO\n\n# If the CALL_GRAPH and HAVE_DOT options are set to YES then\n# doxygen will generate a call dependency graph for every global function\n# or class method. Note that enabling this option will significantly increase\n# the time of a run. So in most cases it will be better to enable call graphs\n# for selected functions only using the \\callgraph command.\n\nCALL_GRAPH             = NO\n\n# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then\n# doxygen will generate a caller dependency graph for every global function\n# or class method. Note that enabling this option will significantly increase\n# the time of a run. So in most cases it will be better to enable caller\n# graphs for selected functions only using the \\callergraph command.\n\nCALLER_GRAPH           = NO\n\n# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen\n# will generate a graphical hierarchy of all classes instead of a textual one.\n\nGRAPHICAL_HIERARCHY    = NO\n\n# If the DIRECTORY_GRAPH and HAVE_DOT tags are set to YES\n# then doxygen will show the dependencies a directory has on other directories\n# in a graphical way. The dependency relations are determined by the #include\n# relations between the files in the directories.\n\nDIRECTORY_GRAPH        = NO\n\n# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images\n# generated by dot. Possible values are svg, png, jpg, or gif.\n# If left blank png will be used. If you choose svg you need to set\n# HTML_FILE_EXTENSION to xhtml in order to make the SVG files\n# visible in IE 9+ (other browsers do not have this requirement).\n\nDOT_IMAGE_FORMAT       = png\n\n# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to\n# enable generation of interactive SVG images that allow zooming and panning.\n# Note that this requires a modern browser other than Internet Explorer.\n# Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you\n# need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files\n# visible. Older versions of IE do not have SVG support.\n\nINTERACTIVE_SVG        = NO\n\n# The tag DOT_PATH can be used to specify the path where the dot tool can be\n# found. If left blank, it is assumed the dot tool can be found in the path.\n\nDOT_PATH               =\n\n# The DOTFILE_DIRS tag can be used to specify one or more directories that\n# contain dot files that are included in the documentation (see the\n# \\dotfile command).\n\nDOTFILE_DIRS           =\n\n# The MSCFILE_DIRS tag can be used to specify one or more directories that\n# contain msc files that are included in the documentation (see the\n# \\mscfile command).\n\nMSCFILE_DIRS           =\n\n# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of\n# nodes that will be shown in the graph. If the number of nodes in a graph\n# becomes larger than this value, doxygen will truncate the graph, which is\n# visualized by representing a node as a red box. Note that doxygen if the\n# number of direct children of the root node in a graph is already larger than\n# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note\n# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.\n\nDOT_GRAPH_MAX_NODES    = 50\n\n# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the\n# graphs generated by dot. A depth value of 3 means that only nodes reachable\n# from the root by following a path via at most 3 edges will be shown. Nodes\n# that lay further from the root node will be omitted. Note that setting this\n# option to 1 or 2 may greatly reduce the computation time needed for large\n# code bases. Also note that the size of a graph can be further restricted by\n# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.\n\nMAX_DOT_GRAPH_DEPTH    = 0\n\n# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent\n# background. This is disabled by default, because dot on Windows does not\n# seem to support this out of the box. Warning: Depending on the platform used,\n# enabling this option may lead to badly anti-aliased labels on the edges of\n# a graph (i.e. they become hard to read).\n\nDOT_TRANSPARENT        = NO\n\n# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output\n# files in one run (i.e. multiple -o and -T options on the command line). This\n# makes dot run faster, but since only newer versions of dot (>1.8.10)\n# support this, this feature is disabled by default.\n\nDOT_MULTI_TARGETS      = NO\n\n# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will\n# generate a legend page explaining the meaning of the various boxes and\n# arrows in the dot generated graphs.\n\nGENERATE_LEGEND        = YES\n\n# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will\n# remove the intermediate dot files that are used to generate\n# the various graphs.\n\nDOT_CLEANUP            = YES\n"
  },
  {
    "path": "3rdparty/eigen3/doc/FixedSizeVectorizable.dox",
    "content": "namespace Eigen {\n\n/** \\eigenManualPage TopicFixedSizeVectorizable Fixed-size vectorizable %Eigen objects\n\nThe goal of this page is to explain what we mean by \"fixed-size vectorizable\".\n\n\\section FixedSizeVectorizable_summary Executive Summary\n\nAn Eigen object is called \"fixed-size vectorizable\" if it has fixed size and that size is a multiple of 16 bytes.\n\nExamples include:\n\\li Eigen::Vector2d\n\\li Eigen::Vector4d\n\\li Eigen::Vector4f\n\\li Eigen::Matrix2d\n\\li Eigen::Matrix2f\n\\li Eigen::Matrix4d\n\\li Eigen::Matrix4f\n\\li Eigen::Affine3d\n\\li Eigen::Affine3f\n\\li Eigen::Quaterniond\n\\li Eigen::Quaternionf\n\n\\section FixedSizeVectorizable_explanation Explanation\n\nFirst, \"fixed-size\" should be clear: an %Eigen object has fixed size if its number of rows and its number of columns are fixed at compile-time. So for example \\ref Matrix3f has fixed size, but \\ref MatrixXf doesn't (the opposite of fixed-size is dynamic-size).\n\nThe array of coefficients of a fixed-size %Eigen object is a plain \"static array\", it is not dynamically allocated. For example, the data behind a \\ref Matrix4f is just a \"float array[16]\".\n\nFixed-size objects are typically very small, which means that we want to handle them with zero runtime overhead -- both in terms of memory usage and of speed.\n\nNow, vectorization works with 128-bit packets (e.g., SSE, AltiVec, NEON), 256-bit packets (e.g., AVX), or 512-bit packets (e.g., AVX512). Moreover, for performance reasons, these packets are most efficiently read and written if they have the same alignment as the packet size, that is 16 bytes, 32 bytes, and 64 bytes respectively.\n\nSo it turns out that the best way that fixed-size %Eigen objects can be vectorized, is if their size is a multiple of 16 bytes (or more). %Eigen will then request 16-byte alignment (or more) for these objects, and henceforth rely on these objects being aligned to achieve maximal efficiency.\n\n*/\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/FunctionsTakingEigenTypes.dox",
    "content": "namespace Eigen {\n\n/** \\page TopicFunctionTakingEigenTypes Writing Functions Taking %Eigen Types as Parameters\n\n%Eigen's use of expression templates results in potentially every expression being of a different type. If you pass such an expression to a function taking a parameter of type Matrix, your expression will implicitly be evaluated into a temporary Matrix, which will then be passed to the function. This means that you lose the benefit of expression templates. Concretely, this has two drawbacks:\n \\li The evaluation into a temporary may be useless and inefficient;\n \\li This only allows the function to read from the expression, not to write to it.\n\nFortunately, all this myriad of expression types have in common that they all inherit a few common, templated base classes. By letting your function take templated parameters of these base types, you can let them play nicely with %Eigen's expression templates.\n\n\\eigenAutoToc\n\n\\section TopicFirstExamples Some First Examples\n\nThis section will provide simple examples for different types of objects %Eigen is offering. Before starting with the actual examples, we need to recapitulate which base objects we can work with (see also \\ref TopicClassHierarchy).\n\n \\li MatrixBase: The common base class for all dense matrix expressions (as opposed to array expressions, as opposed to sparse and special matrix classes). Use it in functions that are meant to work only on dense matrices.\n \\li ArrayBase: The common base class for all dense array expressions (as opposed to matrix expressions, etc). Use it in functions that are meant to work only on arrays.\n \\li DenseBase: The common base class for all dense matrix expression, that is, the base class for both \\c MatrixBase and \\c ArrayBase. It can be used in functions that are meant to work on both matrices and arrays.\n \\li EigenBase: The base class unifying all types of objects that can be evaluated into dense matrices or arrays, for example special matrix classes such as diagonal matrices, permutation matrices, etc. It can be used in functions that are meant to work on any such general type.\n\n<b> %EigenBase Example </b><br/><br/>\nPrints the dimensions of the most generic object present in %Eigen. It could be any matrix expressions, any dense or sparse matrix and any array.\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include function_taking_eigenbase.cpp\n</td>\n<td>\n\\verbinclude function_taking_eigenbase.out\n</td></tr></table>\n<b> %DenseBase Example </b><br/><br/>\nPrints a sub-block of the dense expression. Accepts any dense matrix or array expression, but no sparse objects and no special matrix classes such as DiagonalMatrix.\n\\code\ntemplate <typename Derived>\nvoid print_block(const DenseBase<Derived>& b, int x, int y, int r, int c)\n{\n  std::cout << \"block: \" << b.block(x,y,r,c) << std::endl;\n}\n\\endcode\n<b> %ArrayBase Example </b><br/><br/>\nPrints the maximum coefficient of the array or array-expression.\n\\code\ntemplate <typename Derived>\nvoid print_max_coeff(const ArrayBase<Derived> &a)\n{\n  std::cout << \"max: \" << a.maxCoeff() << std::endl;\n}\n\\endcode\n<b> %MatrixBase Example </b><br/><br/>\nPrints the inverse condition number of the given matrix or matrix-expression.\n\\code\ntemplate <typename Derived>\nvoid print_inv_cond(const MatrixBase<Derived>& a)\n{\n  const typename JacobiSVD<typename Derived::PlainObject>::SingularValuesType&\n    sing_vals = a.jacobiSvd().singularValues();\n  std::cout << \"inv cond: \" << sing_vals(sing_vals.size()-1) / sing_vals(0) << std::endl;\n}\n\\endcode\n<b> Multiple templated arguments example </b><br/><br/>\nCalculate the Euclidean distance between two points.\n\\code\ntemplate <typename DerivedA,typename DerivedB>\ntypename DerivedA::Scalar squaredist(const MatrixBase<DerivedA>& p1,const MatrixBase<DerivedB>& p2)\n{\n  return (p1-p2).squaredNorm();\n}\n\\endcode\nNotice that we used two template parameters, one per argument. This permits the function to handle inputs of different types, e.g.,\n\\code\nsquaredist(v1,2*v2)\n\\endcode\nwhere the first argument \\c v1 is a vector and the second argument \\c 2*v2 is an expression.\n<br/><br/>\n\nThese examples are just intended to give the reader a first impression of how functions can be written which take a plain and constant Matrix or Array argument. They are also intended to give the reader an idea about the most common base classes being the optimal candidates for functions. In the next section we will look in more detail at an example and the different ways it can be implemented, while discussing each implementation's problems and advantages. For the discussion below, Matrix and Array as well as MatrixBase and ArrayBase can be exchanged and all arguments still hold.\n\n\n\\section TopicUsingRefClass How to write generic, but non-templated function?\n\nIn all the previous examples, the functions had to be template functions. This approach allows to write very generic code, but it is often desirable to write non templated functions and still keep some level of genericity to avoid stupid copies of the arguments. The typical example is to write functions accepting both a MatrixXf or a block of a MatrixXf. This is exactly the purpose of the Ref class. Here is a simple example:\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include function_taking_ref.cpp\n</td>\n<td>\n\\verbinclude function_taking_ref.out\n</td></tr></table>\nIn the first two calls to inv_cond, no copy occur because the memory layout of the arguments matches the memory layout accepted by Ref<MatrixXf>. However, in the last call, we have a generic expression that will be automatically evaluated into a temporary MatrixXf by the Ref<> object.\n\nA Ref object can also be writable. Here is an example of a function computing the covariance matrix of two input matrices where each row is an observation:\n\\code\nvoid cov(const Ref<const MatrixXf> x, const Ref<const MatrixXf> y, Ref<MatrixXf> C)\n{\n  const float num_observations = static_cast<float>(x.rows());\n  const RowVectorXf x_mean = x.colwise().sum() / num_observations;\n  const RowVectorXf y_mean = y.colwise().sum() / num_observations;\n  C = (x.rowwise() - x_mean).transpose() * (y.rowwise() - y_mean) / num_observations;\n}\n\\endcode\nand here are two examples calling cov without any copy:\n\\code\nMatrixXf m1, m2, m3\ncov(m1, m2, m3);\ncov(m1.leftCols<3>(), m2.leftCols<3>(), m3.topLeftCorner<3,3>());\n\\endcode\nThe Ref<> class has two other optional template arguments allowing to control the kind of memory layout that can be accepted without any copy. See the class Ref documentation for the details.\n\n\\section TopicPlainFunctionsWorking In which cases do functions taking plain Matrix or Array arguments work?\n\nWithout using template functions, and without the Ref class, a naive implementation of the previous cov function might look like this\n\\code\nMatrixXf cov(const MatrixXf& x, const MatrixXf& y)\n{\n  const float num_observations = static_cast<float>(x.rows());\n  const RowVectorXf x_mean = x.colwise().sum() / num_observations;\n  const RowVectorXf y_mean = y.colwise().sum() / num_observations;\n  return (x.rowwise() - x_mean).transpose() * (y.rowwise() - y_mean) / num_observations;\n}\n\\endcode\nand contrary to what one might think at first, this implementation is fine unless you require a generic implementation that works with double matrices too and unless you do not care about temporary objects. Why is that the case? Where are temporaries involved? How can code as given below compile?\n\\code\nMatrixXf x,y,z;\nMatrixXf C = cov(x,y+z);\n\\endcode\nIn this special case, the example is fine and will be working because both parameters are declared as \\e const references. The compiler creates a temporary and evaluates the expression x+z into this temporary. Once the function is processed, the temporary is released and the result is assigned to C.\n\n\\b Note: Functions taking \\e const references to Matrix (or Array) can process expressions at the cost of temporaries.\n\n\n\\section TopicPlainFunctionsFailing In which cases do functions taking a plain Matrix or Array argument fail?\n\nHere, we consider a slightly modified version of the function given above. This time, we do not want to return the result but pass an additional non-const parameter which allows us to store the result. A first naive implementation might look as follows.\n\\code\n// Note: This code is flawed!\nvoid cov(const MatrixXf& x, const MatrixXf& y, MatrixXf& C)\n{\n  const float num_observations = static_cast<float>(x.rows());\n  const RowVectorXf x_mean = x.colwise().sum() / num_observations;\n  const RowVectorXf y_mean = y.colwise().sum() / num_observations;\n  C = (x.rowwise() - x_mean).transpose() * (y.rowwise() - y_mean) / num_observations;\n}\n\\endcode\nWhen trying to execute the following code\n\\code\nMatrixXf C = MatrixXf::Zero(3,6);\ncov(x,y, C.block(0,0,3,3));\n\\endcode\nthe compiler will fail, because it is not possible to convert the expression returned by \\c MatrixXf::block() into a non-const \\c MatrixXf&. This is the case because the compiler wants to protect you from writing your result to a temporary object. In this special case this protection is not intended -- we want to write to a temporary object. So how can we overcome this problem? \n\nThe solution which is preferred at the moment is based on a little \\em hack. One needs to pass a const reference to the matrix and internally the constness needs to be cast away. The correct implementation for C98 compliant compilers would be\n\\code\ntemplate <typename Derived, typename OtherDerived>\nvoid cov(const MatrixBase<Derived>& x, const MatrixBase<Derived>& y, MatrixBase<OtherDerived> const & C)\n{\n  typedef typename Derived::Scalar Scalar;\n  typedef typename internal::plain_row_type<Derived>::type RowVectorType;\n\n  const Scalar num_observations = static_cast<Scalar>(x.rows());\n\n  const RowVectorType x_mean = x.colwise().sum() / num_observations;\n  const RowVectorType y_mean = y.colwise().sum() / num_observations;\n\n  const_cast< MatrixBase<OtherDerived>& >(C) =\n    (x.rowwise() - x_mean).transpose() * (y.rowwise() - y_mean) / num_observations;\n}\n\\endcode\nThe implementation above does now not only work with temporary expressions but it also allows to use the function with matrices of arbitrary floating point scalar types.\n\n\\b Note: The const cast hack will only work with templated functions. It will not work with the MatrixXf implementation because it is not possible to cast a Block expression to a Matrix reference!\n\n\n\n\\section TopicResizingInGenericImplementations How to resize matrices in generic implementations?\n\nOne might think we are done now, right? This is not completely true because in order for our covariance function to be generically applicable, we want the following code to work\n\\code\nMatrixXf x = MatrixXf::Random(100,3);\nMatrixXf y = MatrixXf::Random(100,3);\nMatrixXf C;\ncov(x, y, C);\n\\endcode\nThis is not the case anymore, when we are using an implementation taking MatrixBase as a parameter. In general, %Eigen supports automatic resizing but it is not possible to do so on expressions. Why should resizing of a matrix Block be allowed? It is a reference to a sub-matrix and we definitely don't want to resize that. So how can we incorporate resizing if we cannot resize on MatrixBase? The solution is to resize the derived object as in this implementation.\n\\code\ntemplate <typename Derived, typename OtherDerived>\nvoid cov(const MatrixBase<Derived>& x, const MatrixBase<Derived>& y, MatrixBase<OtherDerived> const & C_)\n{\n  typedef typename Derived::Scalar Scalar;\n  typedef typename internal::plain_row_type<Derived>::type RowVectorType;\n\n  const Scalar num_observations = static_cast<Scalar>(x.rows());\n\n  const RowVectorType x_mean = x.colwise().sum() / num_observations;\n  const RowVectorType y_mean = y.colwise().sum() / num_observations;\n\n  MatrixBase<OtherDerived>& C = const_cast< MatrixBase<OtherDerived>& >(C_);\n  \n  C.derived().resize(x.cols(),x.cols()); // resize the derived object\n  C = (x.rowwise() - x_mean).transpose() * (y.rowwise() - y_mean) / num_observations;\n}\n\\endcode\nThis implementation is now working for parameters being expressions and for parameters being matrices and having the wrong size. Resizing the expressions does not do any harm in this case unless they actually require resizing. That means, passing an expression with the wrong dimensions will result in a run-time error (in debug mode only) while passing expressions of the correct size will just work fine.\n\n\\b Note: In the above discussion the terms Matrix and Array and MatrixBase and ArrayBase can be exchanged and all arguments still hold.\n\n\\section TopicSummary Summary\n\n  - To summarize, the implementation of functions taking non-writable (const referenced) objects is not a big issue and does not lead to problematic situations in terms of compiling and running your program. However, a naive implementation is likely to introduce unnecessary temporary objects in your code. In order to avoid evaluating parameters into temporaries, pass them as (const) references to MatrixBase or ArrayBase (so templatize your function).\n\n  - Functions taking writable (non-const) parameters must take const references and cast away constness within the function body.\n\n  - Functions that take as parameters MatrixBase (or ArrayBase) objects, and potentially need to resize them (in the case where they are resizable), must call resize() on the derived class, as returned by derived().\n*/\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/HiPerformance.dox",
    "content": "\nnamespace Eigen {\n\n/** \\page TopicWritingEfficientProductExpression Writing efficient matrix product expressions\n\nIn general achieving good performance with Eigen does no require any special effort:\nsimply write your expressions in the most high level way. This is especially true\nfor small fixed size matrices. For large matrices, however, it might be useful to\ntake some care when writing your expressions in order to minimize useless evaluations\nand optimize the performance.\nIn this page we will give a brief overview of the Eigen's internal mechanism to simplify\nand evaluate complex product expressions, and discuss the current limitations.\nIn particular we will focus on expressions matching level 2 and 3 BLAS routines, i.e,\nall kind of matrix products and triangular solvers.\n\nIndeed, in Eigen we have implemented a set of highly optimized routines which are very similar\nto BLAS's ones. Unlike BLAS, those routines are made available to user via a high level and\nnatural API. Each of these routines can compute in a single evaluation a wide variety of expressions.\nGiven an expression, the challenge is then to map it to a minimal set of routines.\nAs explained latter, this mechanism has some limitations, and knowing them will allow\nyou to write faster code by making your expressions more Eigen friendly.\n\n\\section GEMM General Matrix-Matrix product (GEMM)\n\nLet's start with the most common primitive: the matrix product of general dense matrices.\nIn the BLAS world this corresponds to the GEMM routine. Our equivalent primitive can\nperform the following operation:\n\\f$ C.noalias() += \\alpha op1(A) op2(B) \\f$\nwhere A, B, and C are column and/or row major matrices (or sub-matrices),\nalpha is a scalar value, and op1, op2 can be transpose, adjoint, conjugate, or the identity.\nWhen Eigen detects a matrix product, it analyzes both sides of the product to extract a\nunique scalar factor alpha, and for each side, its effective storage order, shape, and conjugation states.\nMore precisely each side is simplified by iteratively removing trivial expressions such as scalar multiple,\nnegation and conjugation. Transpose and Block expressions are not evaluated and they only modify the storage order\nand shape. All other expressions are immediately evaluated.\nFor instance, the following expression:\n\\code m1.noalias() -= s4 * (s1 * m2.adjoint() * (-(s3*m3).conjugate()*s2))  \\endcode\nis automatically simplified to:\n\\code m1.noalias() += (s1*s2*conj(s3)*s4) * m2.adjoint() * m3.conjugate() \\endcode\nwhich exactly matches our GEMM routine.\n\n\\subsection GEMM_Limitations Limitations\nUnfortunately, this simplification mechanism is not perfect yet and not all expressions which could be\nhandled by a single GEMM-like call are correctly detected.\n<table class=\"manual\" style=\"width:100%\">\n<tr>\n<th>Not optimal expression</th>\n<th>Evaluated as</th>\n<th>Optimal version (single evaluation)</th>\n<th>Comments</th>\n</tr>\n<tr>\n<td>\\code\nm1 += m2 * m3; \\endcode</td>\n<td>\\code\ntemp = m2 * m3;\nm1 += temp; \\endcode</td>\n<td>\\code\nm1.noalias() += m2 * m3; \\endcode</td>\n<td>Use .noalias() to tell Eigen the result and right-hand-sides do not alias. \n    Otherwise the product m2 * m3 is evaluated into a temporary.</td>\n</tr>\n<tr class=\"alt\">\n<td></td>\n<td></td>\n<td>\\code\nm1.noalias() += s1 * (m2 * m3); \\endcode</td>\n<td>This is a special feature of Eigen. Here the product between a scalar\n    and a matrix product does not evaluate the matrix product but instead it\n    returns a matrix product expression tracking the scalar scaling factor. <br>\n    Without this optimization, the matrix product would be evaluated into a\n    temporary as in the next example.</td>\n</tr>\n<tr>\n<td>\\code\nm1.noalias() += (m2 * m3).adjoint(); \\endcode</td>\n<td>\\code\ntemp = m2 * m3;\nm1 += temp.adjoint(); \\endcode</td>\n<td>\\code\nm1.noalias() += m3.adjoint()\n*              * m2.adjoint(); \\endcode</td>\n<td>This is because the product expression has the EvalBeforeNesting bit which\n    enforces the evaluation of the product by the Tranpose expression.</td>\n</tr>\n<tr class=\"alt\">\n<td>\\code\nm1 = m1 + m2 * m3; \\endcode</td>\n<td>\\code\ntemp = m2 * m3;\nm1 = m1 + temp; \\endcode</td>\n<td>\\code m1.noalias() += m2 * m3; \\endcode</td>\n<td>Here there is no way to detect at compile time that the two m1 are the same,\n    and so the matrix product will be immediately evaluated.</td>\n</tr>\n<tr>\n<td>\\code\nm1.noalias() = m4 + m2 * m3; \\endcode</td>\n<td>\\code\ntemp = m2 * m3;\nm1 = m4 + temp; \\endcode</td>\n<td>\\code\nm1 = m4;\nm1.noalias() += m2 * m3; \\endcode</td>\n<td>First of all, here the .noalias() in the first expression is useless because\n    m2*m3 will be evaluated anyway. However, note how this expression can be rewritten\n    so that no temporary is required. (tip: for very small fixed size matrix\n    it is slightly better to rewrite it like this: m1.noalias() = m2 * m3; m1 += m4;</td>\n</tr>\n<tr class=\"alt\">\n<td>\\code\nm1.noalias() += (s1*m2).block(..) * m3; \\endcode</td>\n<td>\\code\ntemp = (s1*m2).block(..);\nm1 += temp * m3; \\endcode</td>\n<td>\\code\nm1.noalias() += s1 * m2.block(..) * m3; \\endcode</td>\n<td>This is because our expression analyzer is currently not able to extract trivial\n    expressions nested in a Block expression. Therefore the nested scalar\n    multiple cannot be properly extracted.</td>\n</tr>\n</table>\n\nOf course all these remarks hold for all other kind of products involving triangular or selfadjoint matrices.\n\n*/\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/InplaceDecomposition.dox",
    "content": "namespace Eigen {\n\n/** \\eigenManualPage InplaceDecomposition Inplace matrix decompositions\n\nStarting from %Eigen 3.3, the LU, Cholesky, and QR decompositions can operate \\em inplace, that is, directly within the given input matrix.\nThis feature is especially useful when dealing with huge matrices, and or when the available memory is very limited (embedded systems).\n\nTo this end, the respective decomposition class must be instantiated with a Ref<> matrix type, and the decomposition object must be constructed with the input matrix as argument. As an example, let us consider an inplace LU decomposition with partial pivoting.\n\nLet's start with the basic inclusions, and declaration of a 2x2 matrix \\c A:\n\n<table class=\"example\">\n<tr><th>code</th><th>output</th></tr>\n<tr>\n  <td>\\snippet TutorialInplaceLU.cpp init\n  </td>\n  <td>\\snippet TutorialInplaceLU.out init\n  </td>\n</tr>\n</table>\n\nNo surprise here! Then, let's declare our inplace LU object \\c lu, and check the content of the matrix \\c A:\n\n<table class=\"example\">\n<tr>\n  <td>\\snippet TutorialInplaceLU.cpp declaration\n  </td>\n  <td>\\snippet TutorialInplaceLU.out declaration\n  </td>\n</tr>\n</table>\n\nHere, the \\c lu object computes and stores the \\c L and \\c U factors within the memory held by the matrix \\c A.\nThe coefficients of \\c A have thus been destroyed during the factorization, and replaced by the L and U factors as one can verify:\n\n<table class=\"example\">\n<tr>\n  <td>\\snippet TutorialInplaceLU.cpp matrixLU\n  </td>\n  <td>\\snippet TutorialInplaceLU.out matrixLU\n  </td>\n</tr>\n</table>\n\nThen, one can use the \\c lu object as usual, for instance to solve the Ax=b problem:\n<table class=\"example\">\n<tr>\n  <td>\\snippet TutorialInplaceLU.cpp solve\n  </td>\n  <td>\\snippet TutorialInplaceLU.out solve\n  </td>\n</tr>\n</table>\n\nHere, since the content of the original matrix \\c A has been lost, we had to declared a new matrix \\c A0 to verify the result.\n\nSince the memory is shared between \\c A and \\c lu, modifying the matrix \\c A will make \\c lu invalid.\nThis can easily be verified by modifying the content of \\c A and trying to solve the initial problem again:\n\n<table class=\"example\">\n<tr>\n  <td>\\snippet TutorialInplaceLU.cpp modifyA\n  </td>\n  <td>\\snippet TutorialInplaceLU.out modifyA\n  </td>\n</tr>\n</table>\n\nNote that there is no shared pointer under the hood, it is the \\b responsibility \\b of \\b the \\b user to keep the input matrix \\c A in life as long as \\c lu is living.\n\nIf one wants to update the factorization with the modified A, one has to call the compute method as usual:\n<table class=\"example\">\n<tr>\n  <td>\\snippet TutorialInplaceLU.cpp recompute\n  </td>\n  <td>\\snippet TutorialInplaceLU.out recompute\n  </td>\n</tr>\n</table>\n\nNote that calling compute does not change the memory which is referenced by the \\c lu object. Therefore, if the compute method is called with another matrix \\c A1 different than \\c A, then the content of \\c A1 won't be modified. This is still the content of \\c A that will be used to store the L and U factors of the matrix \\c A1.\nThis can easily be verified as follows:\n<table class=\"example\">\n<tr>\n  <td>\\snippet TutorialInplaceLU.cpp recompute_bis0\n </td>\n  <td>\\snippet TutorialInplaceLU.out recompute_bis0\n </td>\n</tr>\n</table>\nThe matrix \\c A1 is unchanged, and one can thus solve A1*x=b, and directly check the residual without any copy of \\c A1:\n<table class=\"example\">\n<tr>\n  <td>\\snippet TutorialInplaceLU.cpp recompute_bis1\n  </td>\n  <td>\\snippet TutorialInplaceLU.out recompute_bis1\n </td>\n</tr>\n</table>\n\n\nHere is the list of matrix decompositions supporting this inplace mechanism:\n\n- class LLT\n- class LDLT\n- class PartialPivLU\n- class FullPivLU\n- class HouseholderQR\n- class ColPivHouseholderQR\n- class FullPivHouseholderQR\n- class CompleteOrthogonalDecomposition\n\n*/\n\n}"
  },
  {
    "path": "3rdparty/eigen3/doc/InsideEigenExample.dox",
    "content": "namespace Eigen {\n\n/** \\page TopicInsideEigenExample What happens inside Eigen, on a simple example\n\n\\eigenAutoToc\n\n<hr>\n\n\nConsider the following example program:\n\n\\code\n#include<Eigen/Core>\n\nint main()\n{\n  int size = 50;\n  // VectorXf is a vector of floats, with dynamic size.\n  Eigen::VectorXf u(size), v(size), w(size);\n  u = v + w;\n}\n\\endcode\n\nThe goal of this page is to understand how Eigen compiles it, assuming that SSE2 vectorization is enabled (GCC option -msse2).\n\n\\section WhyInteresting Why it's interesting\n\nMaybe you think, that the above example program is so simple, that compiling it shouldn't involve anything interesting. So before starting, let us explain what is nontrivial in compiling it correctly -- that is, producing optimized code -- so that the complexity of Eigen, that we'll explain here, is really useful.\n\nLook at the line of code\n\\code\n  u = v + w;   //   (*)\n\\endcode\n\nThe first important thing about compiling it, is that the arrays should be traversed only once, like\n\\code\n  for(int i = 0; i < size; i++) u[i] = v[i] + w[i];\n\\endcode\nThe problem is that if we make a naive C++ library where the VectorXf class has an operator+ returning a VectorXf, then the line of code (*) will amount to:\n\\code\n  VectorXf tmp = v + w;\n  VectorXf u = tmp;\n\\endcode\nObviously, the introduction of the temporary \\a tmp here is useless. It has a very bad effect on performance, first because the creation of \\a tmp requires a dynamic memory allocation in this context, and second as there are now two for loops:\n\\code\n  for(int i = 0; i < size; i++) tmp[i] = v[i] + w[i];\n  for(int i = 0; i < size; i++) u[i] = tmp[i];\n\\endcode\nTraversing the arrays twice instead of once is terrible for performance, as it means that we do many redundant memory accesses.\n\nThe second important thing about compiling the above program, is to make correct use of SSE2 instructions. Notice that Eigen also supports AltiVec and that all the discussion that we make here applies also to AltiVec.\n\nSSE2, like AltiVec, is a set of instructions allowing to perform computations on packets of 128 bits at once. Since a float is 32 bits, this means that SSE2 instructions can handle 4 floats at once. This means that, if correctly used, they can make our computation go up to 4x faster.\n\nHowever, in the above program, we have chosen size=50, so our vectors consist of 50 float's, and 50 is not a multiple of 4. This means that we cannot hope to do all of that computation using SSE2 instructions. The second best thing, to which we should aim, is to handle the 48 first coefficients with SSE2 instructions, since 48 is the biggest multiple of 4 below 50, and then handle separately, without SSE2, the 49th and 50th coefficients. Something like this:\n\n\\code\n  for(int i = 0; i < 4*(size/4); i+=4) u.packet(i)  = v.packet(i) + w.packet(i);\n  for(int i = 4*(size/4); i < size; i++) u[i] = v[i] + w[i];\n\\endcode\n\nSo let us look line by line at our example program, and let's follow Eigen as it compiles it.\n\n\\section ConstructingVectors Constructing vectors\n\nLet's analyze the first line:\n\n\\code\n  Eigen::VectorXf u(size), v(size), w(size);\n\\endcode\n\nFirst of all, VectorXf is the following typedef:\n\\code\n  typedef Matrix<float, Dynamic, 1> VectorXf;\n\\endcode\n\nThe class template Matrix is declared in src/Core/util/ForwardDeclarations.h with 6 template parameters, but the last 3 are automatically determined by the first 3. So you don't need to worry about them for now. Here, Matrix\\<float, Dynamic, 1\\> means a matrix of floats, with a dynamic number of rows and 1 column.\n\nThe Matrix class inherits a base class, MatrixBase. Don't worry about it, for now it suffices to say that MatrixBase is what unifies matrices/vectors and all the expressions types -- more on that below.\n\nWhen we do\n\\code\n  Eigen::VectorXf u(size);\n\\endcode\nthe constructor that is called is Matrix::Matrix(int), in src/Core/Matrix.h. Besides some assertions, all it does is to construct the \\a m_storage member, which is of type DenseStorage\\<float, Dynamic, Dynamic, 1\\>.\n\nYou may wonder, isn't it overengineering to have the storage in a separate class? The reason is that the Matrix class template covers all kinds of matrices and vector: both fixed-size and dynamic-size. The storage method is not the same in these two cases. For fixed-size, the matrix coefficients are stored as a plain member array. For dynamic-size, the coefficients will be stored as a pointer to a dynamically-allocated array. Because of this, we need to abstract storage away from the Matrix class. That's DenseStorage.\n\nLet's look at this constructor, in src/Core/DenseStorage.h. You can see that there are many partial template specializations of DenseStorages here, treating separately the cases where dimensions are Dynamic or fixed at compile-time. The partial specialization that we are looking at is:\n\\code\ntemplate<typename T, int _Cols> class DenseStorage<T, Dynamic, Dynamic, _Cols>\n\\endcode\n\nHere, the constructor called is DenseStorage::DenseStorage(int size, int rows, int columns)\nwith size=50, rows=50, columns=1.\n\nHere is this constructor:\n\\code\ninline DenseStorage(int size, int rows, int) : m_data(internal::aligned_new<T>(size)), m_rows(rows) {}\n\\endcode\n\nHere, the \\a m_data member is the actual array of coefficients of the matrix. As you see, it is dynamically allocated. Rather than calling new[] or malloc(), as you can see, we have our own internal::aligned_new defined in src/Core/util/Memory.h. What it does is that if vectorization is enabled, then it uses a platform-specific call to allocate a 128-bit-aligned array, as that is very useful for vectorization with both SSE2 and AltiVec. If vectorization is disabled, it amounts to the standard new[].\n\nAs you can see, the constructor also sets the \\a m_rows member to \\a size. Notice that there is no \\a m_columns member: indeed, in this partial specialization of DenseStorage, we know the number of columns at compile-time, since the _Cols template parameter is different from Dynamic. Namely, in our case, _Cols is 1, which is to say that our vector is just a matrix with 1 column. Hence, there is no need to store the number of columns as a runtime variable.\n\nWhen you call VectorXf::data() to get the pointer to the array of coefficients, it returns DenseStorage::data() which returns the \\a m_data member.\n\nWhen you call VectorXf::size() to get the size of the vector, this is actually a method in the base class MatrixBase. It determines that the vector is a column-vector, since ColsAtCompileTime==1 (this comes from the template parameters in the typedef VectorXf). It deduces that the size is the number of rows, so it returns VectorXf::rows(), which returns DenseStorage::rows(), which returns the \\a m_rows member, which was set to \\a size by the constructor.\n\n\\section ConstructionOfSumXpr Construction of the sum expression\n\nNow that our vectors are constructed, let's move on to the next line:\n\n\\code\nu = v + w;\n\\endcode\n\nThe executive summary is that operator+ returns a \"sum of vectors\" expression, but doesn't actually perform the computation. It is the operator=, whose call occurs thereafter, that does the computation.\n\nLet us now see what Eigen does when it sees this:\n\n\\code\nv + w\n\\endcode\n\nHere, v and w are of type VectorXf, which is a typedef for a specialization of Matrix (as we explained above), which is a subclass of MatrixBase. So what is being called is\n\n\\code\nMatrixBase::operator+(const MatrixBase&)\n\\endcode\n\nThe return type of this operator is\n\\code\nCwiseBinaryOp<internal::scalar_sum_op<float>, VectorXf, VectorXf>\n\\endcode\nThe CwiseBinaryOp class is our first encounter with an expression template. As we said, the operator+ doesn't by itself perform any computation, it just returns an abstract \"sum of vectors\" expression. Since there are also \"difference of vectors\" and \"coefficient-wise product of vectors\" expressions, we unify them all as \"coefficient-wise binary operations\", which we abbreviate as \"CwiseBinaryOp\". \"Coefficient-wise\" means that the operations is performed coefficient by coefficient. \"binary\" means that there are two operands -- we are adding two vectors with one another.\n\nNow you might ask, what if we did something like\n\n\\code\nv + w + u;\n\\endcode\n\nThe first v + w would return a CwiseBinaryOp as above, so in order for this to compile, we'd need to define an operator+ also in the class CwiseBinaryOp... at this point it starts looking like a nightmare: are we going to have to define all operators in each of the expression classes (as you guessed, CwiseBinaryOp is only one of many) ? This looks like a dead end!\n\nThe solution is that CwiseBinaryOp itself, as well as Matrix and all the other expression types, is a subclass of MatrixBase. So it is enough to define once and for all the operators in class MatrixBase.\n\nSince MatrixBase is the common base class of different subclasses, the aspects that depend on the subclass must be abstracted from MatrixBase. This is called polymorphism.\n\nThe classical approach to polymorphism in C++ is by means of virtual functions. This is dynamic polymorphism. Here we don't want dynamic polymorphism because the whole design of Eigen is based around the assumption that all the complexity, all the abstraction, gets resolved at compile-time. This is crucial: if the abstraction can't get resolved at compile-time, Eigen's compile-time optimization mechanisms become useless, not to mention that if that abstraction has to be resolved at runtime it'll incur an overhead by itself.\n\nHere, what we want is to have a single class MatrixBase as the base of many subclasses, in such a way that each MatrixBase object (be it a matrix, or vector, or any kind of expression) knows at compile-time (as opposed to run-time) of which particular subclass it is an object (i.e. whether it is a matrix, or an expression, and what kind of expression).\n\nThe solution is the <a href=\"http://en.wikipedia.org/wiki/Curiously_Recurring_Template_Pattern\">Curiously Recurring Template Pattern</a>. Let's do the break now. Hopefully you can read this wikipedia page during the break if needed, but it won't be allowed during the exam.\n\nIn short, MatrixBase takes a template parameter \\a Derived. Whenever we define a subclass Subclass, we actually make Subclass inherit MatrixBase\\<Subclass\\>. The point is that different subclasses inherit different MatrixBase types. Thanks to this, whenever we have an object of a subclass, and we call on it some MatrixBase method, we still remember even from inside the MatrixBase method which particular subclass we're talking about.\n\nThis means that we can put almost all the methods and operators in the base class MatrixBase, and have only the bare minimum in the subclasses. If you look at the subclasses in Eigen, like for instance the CwiseBinaryOp class, they have very few methods. There are coeff() and sometimes coeffRef() methods for access to the coefficients, there are rows() and cols() methods returning the number of rows and columns, but there isn't much more than that. All the meat is in MatrixBase, so it only needs to be coded once for all kinds of expressions, matrices, and vectors.\n\nSo let's end this digression and come back to the piece of code from our example program that we were currently analyzing,\n\n\\code\nv + w\n\\endcode\n\nNow that MatrixBase is a good friend, let's write fully the prototype of the operator+ that gets called here (this code is from src/Core/MatrixBase.h):\n\n\\code\ntemplate<typename Derived>\nclass MatrixBase\n{\n  // ...\n\n  template<typename OtherDerived>\n  const CwiseBinaryOp<internal::scalar_sum_op<typename internal::traits<Derived>::Scalar>, Derived, OtherDerived>\n  operator+(const MatrixBase<OtherDerived> &other) const;\n\n  // ...\n};\n\\endcode\n\nHere of course, \\a Derived and \\a OtherDerived are VectorXf.\n\nAs we said, CwiseBinaryOp is also used for other operations such as substration, so it takes another template parameter determining the operation that will be applied to coefficients. This template parameter is a functor, that is, a class in which we have an operator() so it behaves like a function. Here, the functor used is internal::scalar_sum_op. It is defined in src/Core/Functors.h.\n\nLet us now explain the internal::traits here. The internal::scalar_sum_op class takes one template parameter: the type of the numbers to handle. Here of course we want to pass the scalar type (a.k.a. numeric type) of VectorXf, which is \\c float. How do we determine which is the scalar type of \\a Derived ? Throughout Eigen, all matrix and expression types define a typedef \\a Scalar which gives its scalar type. For example, VectorXf::Scalar is a typedef for \\c float. So here, if life was easy, we could find the numeric type of \\a Derived as just\n\\code\ntypename Derived::Scalar\n\\endcode\nUnfortunately, we can't do that here, as the compiler would complain that the type Derived hasn't yet been defined. So we use a workaround: in src/Core/util/ForwardDeclarations.h, we declared (not defined!) all our subclasses, like Matrix, and we also declared the following class template:\n\\code\ntemplate<typename T> struct internal::traits;\n\\endcode\nIn src/Core/Matrix.h, right \\em before the definition of class Matrix, we define a partial specialization of internal::traits for T=Matrix\\<any template parameters\\>. In this specialization of internal::traits, we define the Scalar typedef. So when we actually define Matrix, it is legal to refer to \"typename internal::traits\\<Matrix\\>::Scalar\".\n\nAnyway, we have declared our operator+. In our case, where \\a Derived and \\a OtherDerived are VectorXf, the above declaration amounts to:\n\\code\nclass MatrixBase<VectorXf>\n{\n  // ...\n\n  const CwiseBinaryOp<internal::scalar_sum_op<float>, VectorXf, VectorXf>\n  operator+(const MatrixBase<VectorXf> &other) const;\n\n  // ...\n};\n\\endcode\n\nLet's now jump to src/Core/CwiseBinaryOp.h to see how it is defined. As you can see there, all it does is to return a CwiseBinaryOp object, and this object is just storing references to the left-hand-side and right-hand-side expressions -- here, these are the vectors \\a v and \\a w. Well, the CwiseBinaryOp object is also storing an instance of the (empty) functor class, but you shouldn't worry about it as that is a minor implementation detail.\n\nThus, the operator+ hasn't performed any actual computation. To summarize, the operation \\a v + \\a w just returned an object of type CwiseBinaryOp which did nothing else than just storing references to \\a v and \\a w.\n\n\\section Assignment The assignment\n\n<div class=\"warningbox\">\n<strong>PLEASE HELP US IMPROVING THIS SECTION.</strong>\nThis page reflects how %Eigen worked until 3.2, but since %Eigen 3.3 the assignment is more sophisticated as it involves an Assignment expression, and the creation of so called evaluator which are responsible for the evaluation of each kind of expressions.\n</div>\n\nAt this point, the expression \\a v + \\a w has finished evaluating, so, in the process of compiling the line of code\n\\code\nu = v + w;\n\\endcode\nwe now enter the operator=.\n\nWhat operator= is being called here? The vector u is an object of class VectorXf, i.e. Matrix. In src/Core/Matrix.h, inside the definition of class Matrix, we see this:\n\\code\n    template<typename OtherDerived>\n    inline Matrix& operator=(const MatrixBase<OtherDerived>& other)\n    {\n      eigen_assert(m_storage.data()!=0 && \"you cannot use operator= with a non initialized matrix (instead use set()\");\n      return Base::operator=(other.derived());\n    }\n\\endcode\nHere, Base is a typedef for MatrixBase\\<Matrix\\>. So, what is being called is the operator= of MatrixBase. Let's see its prototype in src/Core/MatrixBase.h:\n\\code\n    template<typename OtherDerived>\n    Derived& operator=(const MatrixBase<OtherDerived>& other);\n\\endcode\nHere, \\a Derived is VectorXf (since u is a VectorXf) and \\a OtherDerived is CwiseBinaryOp. More specifically, as explained in the previous section, \\a OtherDerived is:\n\\code\nCwiseBinaryOp<internal::scalar_sum_op<float>, VectorXf, VectorXf>\n\\endcode\nSo the full prototype of the operator= being called is:\n\\code\nVectorXf& MatrixBase<VectorXf>::operator=(const MatrixBase<CwiseBinaryOp<internal::scalar_sum_op<float>, VectorXf, VectorXf> > & other);\n\\endcode\nThis operator= literally reads \"copying a sum of two VectorXf's into another VectorXf\".\n\nLet's now look at the implementation of this operator=. It resides in the file src/Core/Assign.h.\n\nWhat we can see there is:\n\\code\ntemplate<typename Derived>\ntemplate<typename OtherDerived>\ninline Derived& MatrixBase<Derived>\n  ::operator=(const MatrixBase<OtherDerived>& other)\n{\n  return internal::assign_selector<Derived,OtherDerived>::run(derived(), other.derived());\n}\n\\endcode\n\nOK so our next task is to understand internal::assign_selector :)\n\nHere is its declaration (all that is still in the same file src/Core/Assign.h)\n\\code\ntemplate<typename Derived, typename OtherDerived,\n         bool EvalBeforeAssigning = int(OtherDerived::Flags) & EvalBeforeAssigningBit,\n         bool NeedToTranspose = Derived::IsVectorAtCompileTime\n                && OtherDerived::IsVectorAtCompileTime\n                && int(Derived::RowsAtCompileTime) == int(OtherDerived::ColsAtCompileTime)\n                && int(Derived::ColsAtCompileTime) == int(OtherDerived::RowsAtCompileTime)\n                && int(Derived::SizeAtCompileTime) != 1>\nstruct internal::assign_selector;\n\\endcode\n\nSo internal::assign_selector takes 4 template parameters, but the 2 last ones are automatically determined by the 2 first ones.\n\nEvalBeforeAssigning is here to enforce the EvalBeforeAssigningBit. As explained <a href=\"TopicLazyEvaluation.html\">here</a>, certain expressions have this flag which makes them automatically evaluate into temporaries before assigning them to another expression. This is the case of the Product expression, in order to avoid strange aliasing effects when doing \"m = m * m;\" However, of course here our CwiseBinaryOp expression doesn't have the EvalBeforeAssigningBit: we said since the beginning that we didn't want a temporary to be introduced here. So if you go to src/Core/CwiseBinaryOp.h, you'll see that the Flags in internal::traits\\<CwiseBinaryOp\\> don't include the EvalBeforeAssigningBit. The Flags member of CwiseBinaryOp is then imported from the internal::traits by the EIGEN_GENERIC_PUBLIC_INTERFACE macro. Anyway, here the template parameter EvalBeforeAssigning has the value \\c false.\n\nNeedToTranspose is here for the case where the user wants to copy a row-vector into a column-vector. We allow this as a special exception to the general rule that in assignments we require the dimesions to match. Anyway, here both the left-hand and right-hand sides are column vectors, in the sense that ColsAtCompileTime is equal to 1. So NeedToTranspose is \\c false too.\n\nSo, here we are in the partial specialization:\n\\code\ninternal::assign_selector<Derived, OtherDerived, false, false>\n\\endcode\n\nHere's how it is defined:\n\\code\ntemplate<typename Derived, typename OtherDerived>\nstruct internal::assign_selector<Derived,OtherDerived,false,false> {\n  static Derived& run(Derived& dst, const OtherDerived& other) { return dst.lazyAssign(other.derived()); }\n};\n\\endcode\n\nOK so now our next job is to understand how lazyAssign works :)\n\n\\code\ntemplate<typename Derived>\ntemplate<typename OtherDerived>\ninline Derived& MatrixBase<Derived>\n  ::lazyAssign(const MatrixBase<OtherDerived>& other)\n{\n  EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(Derived,OtherDerived)\n  eigen_assert(rows() == other.rows() && cols() == other.cols());\n  internal::assign_impl<Derived, OtherDerived>::run(derived(),other.derived());\n  return derived();\n}\n\\endcode\n\nWhat do we see here? Some assertions, and then the only interesting line is:\n\\code\n  internal::assign_impl<Derived, OtherDerived>::run(derived(),other.derived());\n\\endcode\n\nOK so now we want to know what is inside internal::assign_impl.\n\nHere is its declaration:\n\\code\ntemplate<typename Derived1, typename Derived2,\n         int Vectorization = internal::assign_traits<Derived1, Derived2>::Vectorization,\n         int Unrolling = internal::assign_traits<Derived1, Derived2>::Unrolling>\nstruct internal::assign_impl;\n\\endcode\nAgain, internal::assign_selector takes 4 template parameters, but the 2 last ones are automatically determined by the 2 first ones.\n\nThese two parameters \\a Vectorization and \\a Unrolling are determined by a helper class internal::assign_traits. Its job is to determine which vectorization strategy to use (that is \\a Vectorization) and which unrolling strategy to use (that is \\a Unrolling).\n\nWe'll not enter into the details of how these strategies are chosen (this is in the implementation of internal::assign_traits at the top of the same file). Let's just say that here \\a Vectorization has the value \\a LinearVectorization, and \\a Unrolling has the value \\a NoUnrolling (the latter is obvious since our vectors have dynamic size so there's no way to unroll the loop at compile-time).\n\nSo the partial specialization of internal::assign_impl that we're looking at is:\n\\code\ninternal::assign_impl<Derived1, Derived2, LinearVectorization, NoUnrolling>\n\\endcode\n\nHere is how it's defined:\n\\code\ntemplate<typename Derived1, typename Derived2>\nstruct internal::assign_impl<Derived1, Derived2, LinearVectorization, NoUnrolling>\n{\n  static void run(Derived1 &dst, const Derived2 &src)\n  {\n    const int size = dst.size();\n    const int packetSize = internal::packet_traits<typename Derived1::Scalar>::size;\n    const int alignedStart = internal::assign_traits<Derived1,Derived2>::DstIsAligned ? 0\n                           : internal::first_aligned(&dst.coeffRef(0), size);\n    const int alignedEnd = alignedStart + ((size-alignedStart)/packetSize)*packetSize;\n\n    for(int index = 0; index < alignedStart; index++)\n      dst.copyCoeff(index, src);\n\n    for(int index = alignedStart; index < alignedEnd; index += packetSize)\n    {\n      dst.template copyPacket<Derived2, Aligned, internal::assign_traits<Derived1,Derived2>::SrcAlignment>(index, src);\n    }\n\n    for(int index = alignedEnd; index < size; index++)\n      dst.copyCoeff(index, src);\n  }\n};\n\\endcode\n\nHere's how it works. \\a LinearVectorization means that the left-hand and right-hand side expression can be accessed linearly i.e. you can refer to their coefficients by one integer \\a index, as opposed to having to refer to its coefficients by two integers \\a row, \\a column.\n\nAs we said at the beginning, vectorization works with blocks of 4 floats. Here, \\a PacketSize is 4.\n\nThere are two potential problems that we need to deal with:\n\\li first, vectorization works much better if the packets are 128-bit-aligned. This is especially important for write access. So when writing to the coefficients of \\a dst, we want to group these coefficients by packets of 4 such that each of these packets is 128-bit-aligned. In general, this requires to skip a few coefficients at the beginning of \\a dst. This is the purpose of \\a alignedStart. We then copy these first few coefficients one by one, not by packets. However, in our case, the \\a dst expression is a VectorXf and remember that in the construction of the vectors we allocated aligned arrays. Thanks to \\a DstIsAligned, Eigen remembers that without having to do any runtime check, so \\a alignedStart is zero and this part is avoided altogether.\n\\li second, the number of coefficients to copy is not in general a multiple of \\a packetSize. Here, there are 50 coefficients to copy and \\a packetSize is 4. So we'll have to copy the last 2 coefficients one by one, not by packets. Here, \\a alignedEnd is 48.\n\nNow come the actual loops.\n\nFirst, the vectorized part: the 48 first coefficients out of 50 will be copied by packets of 4:\n\\code\n  for(int index = alignedStart; index < alignedEnd; index += packetSize)\n  {\n    dst.template copyPacket<Derived2, Aligned, internal::assign_traits<Derived1,Derived2>::SrcAlignment>(index, src);\n  }\n\\endcode\n\nWhat is copyPacket? It is defined in src/Core/Coeffs.h:\n\\code\ntemplate<typename Derived>\ntemplate<typename OtherDerived, int StoreMode, int LoadMode>\ninline void MatrixBase<Derived>::copyPacket(int index, const MatrixBase<OtherDerived>& other)\n{\n  eigen_internal_assert(index >= 0 && index < size());\n  derived().template writePacket<StoreMode>(index,\n    other.derived().template packet<LoadMode>(index));\n}\n\\endcode\n\nOK, what are writePacket() and packet() here?\n\nFirst, writePacket() here is a method on the left-hand side VectorXf. So we go to src/Core/Matrix.h to look at its definition:\n\\code\ntemplate<int StoreMode>\ninline void writePacket(int index, const PacketScalar& x)\n{\n  internal::pstoret<Scalar, PacketScalar, StoreMode>(m_storage.data() + index, x);\n}\n\\endcode\nHere, \\a StoreMode is \\a #Aligned, indicating that we are doing a 128-bit-aligned write access, \\a PacketScalar is a type representing a \"SSE packet of 4 floats\" and internal::pstoret is a function writing such a packet in memory. Their definitions are architecture-specific, we find them in src/Core/arch/SSE/PacketMath.h:\n\nThe line in src/Core/arch/SSE/PacketMath.h that determines the PacketScalar type (via a typedef in Matrix.h) is:\n\\code\ntemplate<> struct internal::packet_traits<float>  { typedef __m128  type; enum {size=4}; };\n\\endcode\nHere, __m128 is a SSE-specific type. Notice that the enum \\a size here is what was used to define \\a packetSize above.\n\nAnd here is the implementation of internal::pstoret:\n\\code\ntemplate<> inline void internal::pstore(float*  to, const __m128&  from) { _mm_store_ps(to, from); }\n\\endcode\nHere, __mm_store_ps is a SSE-specific intrinsic function, representing a single SSE instruction. The difference between internal::pstore and internal::pstoret is that internal::pstoret is a dispatcher handling both the aligned and unaligned cases, you find its definition in src/Core/GenericPacketMath.h:\n\\code\ntemplate<typename Scalar, typename Packet, int LoadMode>\ninline void internal::pstoret(Scalar* to, const Packet& from)\n{\n  if(LoadMode == Aligned)\n    internal::pstore(to, from);\n  else\n    internal::pstoreu(to, from);\n}\n\\endcode\n\nOK, that explains how writePacket() works. Now let's look into the packet() call. Remember that we are analyzing this line of code inside copyPacket():\n\\code\nderived().template writePacket<StoreMode>(index,\n    other.derived().template packet<LoadMode>(index));\n\\endcode\n\nHere, \\a other is our sum expression \\a v + \\a w. The .derived() is just casting from MatrixBase to the subclass which here is CwiseBinaryOp. So let's go to src/Core/CwiseBinaryOp.h:\n\\code\nclass CwiseBinaryOp\n{\n  // ...\n    template<int LoadMode>\n    inline PacketScalar packet(int index) const\n    {\n      return m_functor.packetOp(m_lhs.template packet<LoadMode>(index), m_rhs.template packet<LoadMode>(index));\n    }\n};\n\\endcode\nHere, \\a m_lhs is the vector \\a v, and \\a m_rhs is the vector \\a w. So the packet() function here is Matrix::packet(). The template parameter \\a LoadMode is \\a #Aligned. So we're looking at\n\\code\nclass Matrix\n{\n  // ...\n    template<int LoadMode>\n    inline PacketScalar packet(int index) const\n    {\n      return internal::ploadt<Scalar, LoadMode>(m_storage.data() + index);\n    }\n};\n\\endcode\nWe let you look up the definition of internal::ploadt in GenericPacketMath.h and the internal::pload in src/Core/arch/SSE/PacketMath.h. It is very similar to the above for internal::pstore.\n\nLet's go back to CwiseBinaryOp::packet(). Once the packets from the vectors \\a v and \\a w have been returned, what does this function do? It calls m_functor.packetOp() on them. What is m_functor? Here we must remember what particular template specialization of CwiseBinaryOp we're dealing with:\n\\code\nCwiseBinaryOp<internal::scalar_sum_op<float>, VectorXf, VectorXf>\n\\endcode\nSo m_functor is an object of the empty class internal::scalar_sum_op<float>. As we mentioned above, don't worry about why we constructed an object of this empty class at all -- it's an implementation detail, the point is that some other functors need to store member data.\n\nAnyway, internal::scalar_sum_op is defined in src/Core/Functors.h:\n\\code\ntemplate<typename Scalar> struct internal::scalar_sum_op EIGEN_EMPTY_STRUCT {\n  inline const Scalar operator() (const Scalar& a, const Scalar& b) const { return a + b; }\n  template<typename PacketScalar>\n  inline const PacketScalar packetOp(const PacketScalar& a, const PacketScalar& b) const\n  { return internal::padd(a,b); }\n};\n\\endcode\nAs you can see, all what packetOp() does is to call internal::padd on the two packets. Here is the definition of internal::padd from src/Core/arch/SSE/PacketMath.h:\n\\code\ntemplate<> inline __m128  internal::padd(const __m128&  a, const __m128&  b) { return _mm_add_ps(a,b); }\n\\endcode\nHere, _mm_add_ps is a SSE-specific intrinsic function, representing a single SSE instruction.\n\nTo summarize, the loop\n\\code\n  for(int index = alignedStart; index < alignedEnd; index += packetSize)\n  {\n    dst.template copyPacket<Derived2, Aligned, internal::assign_traits<Derived1,Derived2>::SrcAlignment>(index, src);\n  }\n\\endcode\nhas been compiled to the following code: for \\a index going from 0 to the 11 ( = 48/4 - 1), read the i-th packet (of 4 floats) from the vector v and the i-th packet from the vector w using two __mm_load_ps SSE instructions, then add them together using a __mm_add_ps instruction, then store the result using a __mm_store_ps instruction.\n\nThere remains the second loop handling the last few (here, the last 2) coefficients:\n\\code\n  for(int index = alignedEnd; index < size; index++)\n    dst.copyCoeff(index, src);\n\\endcode\nHowever, it works just like the one we just explained, it is just simpler because there is no SSE vectorization involved here. copyPacket() becomes copyCoeff(), packet() becomes coeff(), writePacket() becomes coeffRef(). If you followed us this far, you can probably understand this part by yourself.\n\nWe see that all the C++ abstraction of Eigen goes away during compilation and that we indeed are precisely controlling which assembly instructions we emit. Such is the beauty of C++! Since we have such precise control over the emitted assembly instructions, but such complex logic to choose the right instructions, we can say that Eigen really behaves like an optimizing compiler. If you prefer, you could say that Eigen behaves like a script for the compiler. In a sense, C++ template metaprogramming is scripting the compiler -- and it's been shown that this scripting language is Turing-complete. See <a href=\"http://en.wikipedia.org/wiki/Template_metaprogramming\"> Wikipedia</a>.\n\n*/\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/LeastSquares.dox",
    "content": "namespace Eigen {\n\n/** \\eigenManualPage LeastSquares Solving linear least squares systems\n\nThis page describes how to solve linear least squares systems using %Eigen. An overdetermined system\nof equations, say \\a Ax = \\a b, has no solutions. In this case, it makes sense to search for the\nvector \\a x which is closest to being a solution, in the sense that the difference \\a Ax - \\a b is\nas small as possible. This \\a x is called the least square solution (if the Euclidean norm is used).\n\nThe three methods discussed on this page are the SVD decomposition, the QR decomposition and normal\nequations. Of these, the SVD decomposition is generally the most accurate but the slowest, normal\nequations is the fastest but least accurate, and the QR decomposition is in between.\n\n\\eigenAutoToc\n\n\n\\section LeastSquaresSVD Using the SVD decomposition\n\nThe \\link BDCSVD::solve() solve() \\endlink method in the BDCSVD class can be directly used to\nsolve linear squares systems. It is not enough to compute only the singular values (the default for\nthis class); you also need the singular vectors but the thin SVD decomposition suffices for\ncomputing least squares solutions:\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr>\n  <td>\\include TutorialLinAlgSVDSolve.cpp </td>\n  <td>\\verbinclude TutorialLinAlgSVDSolve.out </td>\n</tr>\n</table>\n\nThis is example from the page \\link TutorialLinearAlgebra Linear algebra and decompositions \\endlink.\n\n\n\\section LeastSquaresQR Using the QR decomposition\n\nThe solve() method in QR decomposition classes also computes the least squares solution. There are\nthree QR decomposition classes: HouseholderQR (no pivoting, so fast but unstable),\nColPivHouseholderQR (column pivoting, thus a bit slower but more accurate) and FullPivHouseholderQR\n(full pivoting, so slowest and most stable). Here is an example with column pivoting:\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr>\n  <td>\\include LeastSquaresQR.cpp </td>\n  <td>\\verbinclude LeastSquaresQR.out </td>\n</tr>\n</table>\n\n\n\\section LeastSquaresNormalEquations Using normal equations\n\nFinding the least squares solution of \\a Ax = \\a b is equivalent to solving the normal equation\n<i>A</i><sup>T</sup><i>Ax</i> = <i>A</i><sup>T</sup><i>b</i>. This leads to the following code\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr>\n  <td>\\include LeastSquaresNormalEquations.cpp </td>\n  <td>\\verbinclude LeastSquaresNormalEquations.out </td>\n</tr>\n</table>\n\nIf the matrix \\a A is ill-conditioned, then this is not a good method, because the condition number\nof <i>A</i><sup>T</sup><i>A</i> is the square of the condition number of \\a A. This means that you\nlose twice as many digits using normal equation than if you use the other methods.\n\n*/\n\n}"
  },
  {
    "path": "3rdparty/eigen3/doc/Manual.dox",
    "content": "\n// This file strutures pages and modules into a convenient hierarchical structure.\n\nnamespace Eigen {\n\n/** \\page UserManual_CustomizingEigen Extending/Customizing Eigen\n  %Eigen can be extended in several ways, for instance, by defining global methods, by inserting custom methods within main %Eigen's classes through the \\ref TopicCustomizing_Plugins \"plugin\" mechanism, by adding support to \\ref TopicCustomizing_CustomScalar \"custom scalar types\" etc. See below for the respective sub-topics.\n  - \\subpage TopicCustomizing_Plugins\n  - \\subpage TopicCustomizing_InheritingMatrix\n  - \\subpage TopicCustomizing_CustomScalar\n  - \\subpage TopicCustomizing_NullaryExpr\n  - \\subpage TopicNewExpressionType\n  \\sa \\ref TopicPreprocessorDirectives\n*/\n\n\n/** \\page UserManual_Generalities General topics\n  - \\subpage TopicFunctionTakingEigenTypes\n  - \\subpage TopicPreprocessorDirectives\n  - \\subpage TopicAssertions\n  - \\subpage TopicMultiThreading\n  - \\subpage TopicUsingBlasLapack\n  - \\subpage TopicUsingIntelMKL\n  - \\subpage TopicCUDA\n  - \\subpage TopicPitfalls\n  - \\subpage TopicTemplateKeyword\n  - \\subpage UserManual_UnderstandingEigen\n  - \\subpage TopicCMakeGuide\n*/\n\n/** \\page UserManual_UnderstandingEigen Understanding Eigen\n  - \\subpage TopicInsideEigenExample\n  - \\subpage TopicClassHierarchy\n  - \\subpage TopicLazyEvaluation\n*/\n\n/** \\page UnclassifiedPages Unclassified pages\n  - \\subpage TopicResizing\n  - \\subpage TopicVectorization\n  - \\subpage TopicEigenExpressionTemplates\n  - \\subpage TopicScalarTypes\n  - \\subpage GettingStarted\n  - \\subpage TutorialSparse_example_details\n  - \\subpage TopicWritingEfficientProductExpression\n  - \\subpage Experimental\n*/\n\n\n/** \\defgroup Support_modules Support modules\n  * Category of modules which add support for external libraries.\n  */\n\n\n/** \\defgroup DenseMatrixManipulation_chapter Dense matrix and array manipulation */\n/** \\defgroup DenseMatrixManipulation_Alignement Alignment issues */\n/** \\defgroup DenseMatrixManipulation_Reference Reference */\n\n/** \\addtogroup TutorialMatrixClass\n    \\ingroup DenseMatrixManipulation_chapter */\n/** \\addtogroup TutorialMatrixArithmetic\n    \\ingroup DenseMatrixManipulation_chapter */\n/** \\addtogroup TutorialArrayClass\n    \\ingroup DenseMatrixManipulation_chapter */\n/** \\addtogroup TutorialBlockOperations\n    \\ingroup DenseMatrixManipulation_chapter */\n/** \\addtogroup TutorialSlicingIndexing\n    \\ingroup DenseMatrixManipulation_chapter */\n/** \\addtogroup TutorialAdvancedInitialization\n    \\ingroup DenseMatrixManipulation_chapter */\n/** \\addtogroup TutorialReductionsVisitorsBroadcasting\n    \\ingroup DenseMatrixManipulation_chapter */\n/** \\addtogroup TutorialReshape\n    \\ingroup DenseMatrixManipulation_chapter */\n/** \\addtogroup TutorialSTL\n    \\ingroup DenseMatrixManipulation_chapter */\n/** \\addtogroup TutorialMapClass\n    \\ingroup DenseMatrixManipulation_chapter */\n/** \\addtogroup TopicAliasing\n    \\ingroup DenseMatrixManipulation_chapter */\n/** \\addtogroup TopicStorageOrders\n    \\ingroup DenseMatrixManipulation_chapter */\n\n/** \\addtogroup DenseMatrixManipulation_Alignement\n    \\ingroup DenseMatrixManipulation_chapter        */\n/**     \\addtogroup TopicUnalignedArrayAssert\n        \\ingroup DenseMatrixManipulation_Alignement */\n/**     \\addtogroup TopicFixedSizeVectorizable\n        \\ingroup DenseMatrixManipulation_Alignement */\n/**     \\addtogroup TopicStructHavingEigenMembers\n        \\ingroup DenseMatrixManipulation_Alignement */\n/**     \\addtogroup TopicStlContainers\n        \\ingroup DenseMatrixManipulation_Alignement */\n/**     \\addtogroup TopicPassingByValue\n        \\ingroup DenseMatrixManipulation_Alignement */\n/**     \\addtogroup TopicWrongStackAlignment\n        \\ingroup DenseMatrixManipulation_Alignement */\n    \n/** \\addtogroup DenseMatrixManipulation_Reference\n    \\ingroup DenseMatrixManipulation_chapter       */\n/**     \\addtogroup Core_Module\n        \\ingroup DenseMatrixManipulation_Reference */  \n/**     \\addtogroup Jacobi_Module\n        \\ingroup DenseMatrixManipulation_Reference */ \n/**     \\addtogroup Householder_Module\n        \\ingroup DenseMatrixManipulation_Reference */ \n\n/** \\addtogroup CoeffwiseMathFunctions\n    \\ingroup DenseMatrixManipulation_chapter */\n\n/** \\addtogroup QuickRefPage\n    \\ingroup DenseMatrixManipulation_chapter */\n\n\n/** \\defgroup DenseLinearSolvers_chapter Dense linear problems and decompositions */\n/** \\defgroup DenseLinearSolvers_Reference Reference */\n\n/** \\addtogroup TutorialLinearAlgebra\n    \\ingroup DenseLinearSolvers_chapter */\n/** \\addtogroup TopicLinearAlgebraDecompositions\n    \\ingroup DenseLinearSolvers_chapter */\n/** \\addtogroup LeastSquares \n    \\ingroup DenseLinearSolvers_chapter */\n/** \\addtogroup InplaceDecomposition\n    \\ingroup DenseLinearSolvers_chapter */\n/** \\addtogroup DenseDecompositionBenchmark\n    \\ingroup DenseLinearSolvers_chapter */\n\n/** \\addtogroup DenseLinearSolvers_Reference\n    \\ingroup DenseLinearSolvers_chapter */\n/** \\addtogroup Cholesky_Module\n    \\ingroup DenseLinearSolvers_Reference */\n/** \\addtogroup LU_Module\n    \\ingroup DenseLinearSolvers_Reference */\n/** \\addtogroup QR_Module\n    \\ingroup DenseLinearSolvers_Reference */\n/** \\addtogroup SVD_Module\n    \\ingroup DenseLinearSolvers_Reference*/\n/** \\addtogroup Eigenvalues_Module\n    \\ingroup DenseLinearSolvers_Reference */\n\n\n\n\n/** \\defgroup Sparse_chapter Sparse linear algebra */\n/** \\defgroup Sparse_Reference Reference */\n\n/** \\addtogroup TutorialSparse\n    \\ingroup Sparse_chapter */\n/** \\addtogroup TopicSparseSystems\n    \\ingroup Sparse_chapter */\n/** \\addtogroup MatrixfreeSolverExample\n    \\ingroup Sparse_chapter */\n\n/** \\addtogroup Sparse_Reference\n    \\ingroup Sparse_chapter */\n/** \\addtogroup SparseCore_Module\n    \\ingroup Sparse_Reference */\n/** \\addtogroup OrderingMethods_Module\n    \\ingroup Sparse_Reference */\n/** \\addtogroup SparseCholesky_Module\n    \\ingroup Sparse_Reference */\n/** \\addtogroup SparseLU_Module\n    \\ingroup Sparse_Reference */\n/** \\addtogroup SparseQR_Module\n    \\ingroup Sparse_Reference */\n/** \\addtogroup IterativeLinearSolvers_Module\n    \\ingroup Sparse_Reference */\n/** \\addtogroup Sparse_Module\n    \\ingroup Sparse_Reference */\n/** \\addtogroup Support_modules\n    \\ingroup Sparse_Reference */    \n\n/** \\addtogroup SparseQuickRefPage\n    \\ingroup Sparse_chapter */\n\n\n/** \\defgroup Geometry_chapter Geometry */\n/** \\defgroup Geometry_Reference Reference */\n\n/** \\addtogroup TutorialGeometry\n    \\ingroup Geometry_chapter */\n    \n/** \\addtogroup Geometry_Reference\n    \\ingroup Geometry_chapter */\n/** \\addtogroup Geometry_Module\n    \\ingroup Geometry_Reference */\n/** \\addtogroup Splines_Module\n    \\ingroup Geometry_Reference */\n\n/** \\internal \\brief Namespace containing low-level routines from the %Eigen library. */\nnamespace internal {}\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/MatrixfreeSolverExample.dox",
    "content": "\nnamespace Eigen {\n\n/**\n\n\\eigenManualPage MatrixfreeSolverExample Matrix-free solvers\n\nIterative solvers such as ConjugateGradient and BiCGSTAB can be used in a matrix free context. To this end, user must provide a wrapper class inheriting EigenBase<> and implementing the following methods:\n - \\c Index \\c rows() and \\c Index \\c cols(): returns number of rows and columns respectively\n - \\c operator* with your type and an %Eigen dense column vector (its actual implementation goes in a specialization of the internal::generic_product_impl class)\n\n\\c Eigen::internal::traits<> must also be specialized for the wrapper type.\n\nHere is a complete example wrapping an Eigen::SparseMatrix:\n\\include matrixfree_cg.cpp\nOutput: \\verbinclude matrixfree_cg.out\n\n*/\n\n}"
  },
  {
    "path": "3rdparty/eigen3/doc/NewExpressionType.dox",
    "content": "namespace Eigen {\n\n/** \\page TopicNewExpressionType Adding a new expression type\n\n<!--<span style=\"font-size:130%; color:red; font-weight: 900;\"></span>-->\n\\warning\nDisclaimer: this page is tailored to very advanced users who are not afraid of dealing with some %Eigen's internal aspects.\nIn most cases, a custom expression can be avoided by either using custom \\ref MatrixBase::unaryExpr \"unary\" or \\ref MatrixBase::binaryExpr \"binary\" functors,\nwhile extremely complex matrix manipulations can be achieved by a nullary functors as described in the \\ref TopicCustomizing_NullaryExpr \"previous page\".\n\nThis page describes with the help of an example how to implement a new\nlight-weight expression type in %Eigen. This consists of three parts:\nthe expression type itself, a traits class containing compile-time\ninformation about the expression, and the evaluator class which is\nused to evaluate the expression to a matrix.\n\n\\b TO \\b DO: Write a page explaining the design, with details on\nvectorization etc., and refer to that page here.\n\n\n\\eigenAutoToc\n\n\\section TopicSetting The setting\n\nA circulant matrix is a matrix where each column is the same as the\ncolumn to the left, except that it is cyclically shifted downwards.\nFor example, here is a 4-by-4 circulant matrix:\n\\f[ \\begin{bmatrix} \n    1 & 8 & 4 & 2 \\\\ \n    2 & 1 & 8 & 4 \\\\\n    4 & 2 & 1 & 8 \\\\\n    8 & 4 & 2 & 1\n\\end{bmatrix} \\f]\nA circulant matrix is uniquely determined by its first column. We wish\nto write a function \\c makeCirculant which, given the first column,\nreturns an expression representing the circulant matrix.\n\nFor simplicity, we restrict the \\c makeCirculant function to dense\nmatrices. It may make sense to also allow arrays, or sparse matrices,\nbut we will not do so here. We also do not want to support\nvectorization.\n\n\n\\section TopicPreamble Getting started\n\nWe will present the file implementing the \\c makeCirculant function\npart by part. We start by including the appropriate header files and\nforward declaring the expression class, which we will call\n\\c Circulant. The \\c makeCirculant function will return an object of\nthis type. The class \\c Circulant is in fact a class template; the\ntemplate argument \\c ArgType refers to the type of the vector passed\nto the \\c makeCirculant function.\n\n\\include make_circulant.cpp.preamble\n\n\n\\section TopicTraits The traits class\n\nFor every expression class \\c X, there should be a traits class \n\\c Traits<X> in the \\c Eigen::internal namespace containing\ninformation about \\c X known as compile time.\n\nAs explained in \\ref TopicSetting, we designed the \\c Circulant\nexpression class to refer to dense matrices. The entries of the\ncirculant matrix have the same type as the entries of the vector\npassed to the \\c makeCirculant function. The type used to index the\nentries is also the same. Again for simplicity, we will only return\ncolumn-major matrices. Finally, the circulant matrix is a square\nmatrix (number of rows equals number of columns), and the number of\nrows equals the number of rows of the column vector passed to the\n\\c makeCirculant function. If this is a dynamic-size vector, then the\nsize of the circulant matrix is not known at compile-time.\n\nThis leads to the following code:\n\n\\include make_circulant.cpp.traits\n\n\n\\section TopicExpression The expression class\n\nThe next step is to define the expression class itself. In our case,\nwe want to inherit from \\c MatrixBase in order to expose the interface\nfor dense matrices. In the constructor, we check that we are passed a\ncolumn vector (see \\ref TopicAssertions) and we store the vector from\nwhich we are going to build the circulant matrix in the member\nvariable \\c m_arg. Finally, the expression class should compute the\nsize of the corresponding circulant matrix. As explained above, this\nis a square matrix with as many columns as the vector used to\nconstruct the matrix.\n\n\\b TO \\b DO: What about the \\c Nested typedef? It seems to be\nnecessary; is this only temporary?\n\n\\include make_circulant.cpp.expression\n\n\n\\section TopicEvaluator The evaluator\n\nThe last big fragment implements the evaluator for the \\c Circulant\nexpression. The evaluator computes the entries of the circulant\nmatrix; this is done in the \\c .coeff() member function. The entries\nare computed by finding the corresponding entry of the vector from\nwhich the circulant matrix is constructed. Getting this entry may\nactually be non-trivial when the circulant matrix is constructed from\na vector which is given by a complicated expression, so we use the\nevaluator which corresponds to the vector.\n\nThe \\c CoeffReadCost constant records the cost of computing an entry\nof the circulant matrix; we ignore the index computation and say that\nthis is the same as the cost of computing an entry of the vector from\nwhich the circulant matrix is constructed.\n\nIn the constructor, we save the evaluator for the column vector which\ndefined the circulant matrix. We also save the size of that vector;\nremember that we can query an expression object to find the size but\nnot the evaluator. \n\n\\include make_circulant.cpp.evaluator\n\n\n\\section TopicEntry The entry point\n\nAfter all this, the \\c makeCirculant function is very simple. It\nsimply creates an expression object and returns it.\n\n\\include make_circulant.cpp.entry\n\n\n\\section TopicMain A simple main function for testing\n\nFinally, a short \\c main function that shows how the \\c makeCirculant\nfunction can be called.\n\n\\include make_circulant.cpp.main\n\nIf all the fragments are combined, the following output is produced,\nshowing that the program works as expected:\n\n\\include make_circulant.out\n\n*/\n}\n\n"
  },
  {
    "path": "3rdparty/eigen3/doc/Overview.dox",
    "content": "namespace Eigen {\n\n/** \\mainpage notitle\n\nThis is the API documentation for Eigen3. You can <a href=\"eigen-doc.tgz\">download</a> it as a tgz archive for offline reading.\n\nFor a first contact with Eigen, the best place is to have a look at the \\link GettingStarted getting started \\endlink page that show you how to write and compile your first program with Eigen.\n\nThen, the \\b quick \\b reference \\b pages give you a quite complete description of the API in a very condensed format that is specially useful to recall the syntax of a particular feature, or to have a quick look at the API. They currently cover the two following feature sets, and more will come in the future:\n  - \\link QuickRefPage [QuickRef] Dense matrix and array manipulations \\endlink\n  - \\link SparseQuickRefPage [QuickRef] Sparse linear algebra \\endlink\n\nYou're a MatLab user? There is also a <a href=\"AsciiQuickReference.txt\">short ASCII reference</a> with Matlab translations.\n  \nThe \\b main \\b documentation is organized into \\em chapters covering different domains of features.\nThey are themselves composed of \\em user \\em manual pages describing the different features in a comprehensive way, and \\em reference pages that gives you access to the API documentation through the related Eigen's \\em modules and \\em classes.\n\nUnder the \\subpage UserManual_CustomizingEigen section, you will find discussions and examples on extending %Eigen's features and supporting custom scalar types.\n\nUnder the \\subpage UserManual_Generalities section, you will find documentation on more general topics such as preprocessor directives, controlling assertions, multi-threading, MKL support, some Eigen's internal insights, and much more...\n\nFinally, do not miss the search engine, useful to quickly get to the documentation of a given class or function.\n\nWant more? Checkout the <a href=\"unsupported/index.html\">\\em unsupported \\em modules </a> documentation.\n\n*/\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/PassingByValue.dox",
    "content": "namespace Eigen {\n\n/** \\eigenManualPage TopicPassingByValue Passing Eigen objects by value to functions\n\nPassing objects by value is almost always a very bad idea in C++, as this means useless copies, and one should pass them by reference instead.\n\nWith %Eigen, this is even more important: passing \\ref TopicFixedSizeVectorizable \"fixed-size vectorizable Eigen objects\" by value is not only inefficient, it can be illegal or make your program crash! And the reason is that these %Eigen objects have alignment modifiers that aren't respected when they are passed by value.\n\nFor example, a function like this, where \\c v is passed by value:\n\n\\code\nvoid my_function(Eigen::Vector2d v);\n\\endcode\n\nneeds to be rewritten as follows, passing \\c v by const reference:\n\n\\code\nvoid my_function(const Eigen::Vector2d& v);\n\\endcode\n\nLikewise if you have a class having an %Eigen object as member:\n\n\\code\nstruct Foo\n{\n  Eigen::Vector2d v;\n};\nvoid my_function(Foo v);\n\\endcode\n\nThis function also needs to be rewritten like this:\n\\code\nvoid my_function(const Foo& v);\n\\endcode\n\nNote that on the other hand, there is no problem with functions that return objects by value.\n\n*/\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/Pitfalls.dox",
    "content": "namespace Eigen {\n\n/** \\page TopicPitfalls Common pitfalls\n\n\n\\section TopicPitfalls_template_keyword Compilation error with template methods\n\nSee this \\link TopicTemplateKeyword page \\endlink.\n\n\n\\section TopicPitfalls_aliasing Aliasing\n\nDon't miss this \\link TopicAliasing page \\endlink on aliasing,\nespecially if you got wrong results in statements where the destination appears on the right hand side of the expression.\n\n\n\\section TopicPitfalls_alignment_issue Alignment Issues (runtime assertion)\n\n%Eigen does explicit vectorization, and while that is appreciated by many users, that also leads to some issues in special situations where data alignment is compromised.\nIndeed, prior to C++17,  C++ does not have quite good enough support for explicit data alignment.\nIn that case your program hits an assertion failure (that is, a \"controlled crash\") with a message that tells you to consult this page:\n\\code\nhttp://eigen.tuxfamily.org/dox/group__TopicUnalignedArrayAssert.html\n\\endcode\nHave a look at \\link TopicUnalignedArrayAssert it \\endlink and see for yourself if that's something that you can cope with.\nIt contains detailed information about how to deal with each known cause for that issue.\n\nNow what if you don't care about vectorization and so don't want to be annoyed with these alignment issues? Then read \\link getrid how to get rid of them \\endlink.\n\n\n\\section TopicPitfalls_auto_keyword C++11 and the auto keyword\n\nIn short: do not use the auto keywords with %Eigen's expressions, unless you are 100% sure about what you are doing. In particular, do not use the auto keyword as a replacement for a \\c Matrix<> type. Here is an example:\n\n\\code\nMatrixXd A, B;\nauto C = A*B;\nfor(...) { ... w = C * v;  ...}\n\\endcode\n\nIn this example, the type of C is not a \\c MatrixXd but an abstract expression representing a matrix product and storing references to \\c A and \\c B.\nTherefore, the product of \\c A*B will be carried out multiple times, once per iteration of the for loop.\nMoreover, if the coefficients of `A` or `B` change during the iteration, then `C` will evaluate to different values as in the following example:\n\n\\code\nMatrixXd A = ..., B = ...;\nauto C = A*B;\nMatrixXd R1 = C;\nA = ...;\nMatrixXd R2 = C;\n\\endcode\nfor which we end up with `R1` &ne; `R2`.\n\n\nHere is another example leading to a segfault:\n\\code\nauto C = ((A+B).eval()).transpose();\n// do something with C\n\\endcode\nThe problem is that \\c eval() returns a temporary object (in this case a \\c MatrixXd) which is then referenced by the \\c Transpose<> expression.\nHowever, this temporary is deleted right after the first line, and then the \\c C expression references a dead object.\nOne possible fix consists in applying \\c eval() on the whole expression:\n\\code\nauto C = (A+B).transpose().eval();\n\\endcode\n\nThe same issue might occur when sub expressions are automatically evaluated by %Eigen as in the following example:\n\\code\nVectorXd u, v;\nauto C = u + (A*v).normalized();\n// do something with C\n\\endcode\nHere the \\c normalized() method has to evaluate the expensive product \\c A*v to avoid evaluating it twice.\nAgain, one possible fix is to call \\c .eval() on the whole expression:\n\\code\nauto C = (u + (A*v).normalized()).eval();\n\\endcode\nIn this case, \\c C will be a regular \\c VectorXd object.\nNote that DenseBase::eval() is smart enough to avoid copies when the underlying expression is already a plain \\c Matrix<>.\n\n\n\\section TopicPitfalls_header_issues Header Issues (failure to compile)\n\nWith all libraries, one must check the documentation for which header to include.\nThe same is true with %Eigen, but slightly worse: with %Eigen, a method in a class may require an additional \\c \\#include over what the class itself requires!\nFor example, if you want to use the \\c cross() method on a vector (it computes a cross-product) then you need to:\n\\code\n#include<Eigen/Geometry>\n\\endcode\nWe try to always document this, but do tell us if we forgot an occurrence.\n\n\n\\section TopicPitfalls_ternary_operator Ternary operator\n\nIn short: avoid the use of the ternary operator <code>(COND ? THEN : ELSE)</code> with %Eigen's expressions for the \\c THEN and \\c ELSE statements.\nTo see why, let's consider the following example:\n\\code\nVector3f A;\nA << 1, 2, 3;\nVector3f B = ((1 < 0) ? (A.reverse()) : A);\n\\endcode\nThis example will return <code>B = 3, 2, 1</code>. Do you see why?\nThe reason is that in c++ the type of the \\c ELSE statement is inferred from the type of the \\c THEN expression such that both match.\nSince \\c THEN is a <code>Reverse<Vector3f></code>, the \\c ELSE statement A is converted to a <code>Reverse<Vector3f></code>, and the compiler thus generates:\n\\code\nVector3f B = ((1 < 0) ? (A.reverse()) : Reverse<Vector3f>(A));\n\\endcode\nIn this very particular case, a workaround would be to call A.reverse().eval() for the \\c THEN statement, but the safest and fastest is really to avoid this ternary operator with %Eigen's expressions and use a if/else construct.\n\n\n\\section TopicPitfalls_pass_by_value Pass-by-value\n\nIf you don't know why passing-by-value is wrong with %Eigen, read this \\link TopicPassingByValue page \\endlink first.\n\nWhile you may be extremely careful and use care to make sure that all of your code that explicitly uses %Eigen types is pass-by-reference you have to watch out for templates which define the argument types at compile time.\n\nIf a template has a function that takes arguments pass-by-value, and the relevant template parameter ends up being an %Eigen type, then you will of course have the same alignment problems that you would in an explicitly defined function passing %Eigen types by reference.\n\nUsing %Eigen types with other third party libraries or even the STL can present the same problem.\n<code>boost::bind</code> for example uses pass-by-value to store arguments in the returned functor.\nThis will of course be a problem.\n\nThere are at least two ways around this:\n  - If the value you are passing is guaranteed to be around for the life of the functor, you can use boost::ref() to wrap the value as you pass it to boost::bind. Generally this is not a solution for values on the stack as if the functor ever gets passed to a lower or independent scope, the object may be gone by the time it's attempted to be used.\n  - The other option is to make your functions take a reference counted pointer like boost::shared_ptr as the argument. This avoids needing to worry about managing the lifetime of the object being passed.\n\n*/\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/PreprocessorDirectives.dox",
    "content": "namespace Eigen {\n\n/** \\page TopicPreprocessorDirectives Preprocessor directives\n\nYou can control some aspects of %Eigen by defining the preprocessor tokens using \\c \\#define. These macros\nshould be defined before any %Eigen headers are included. Often they are best set in the project options.\n\nThis page lists the preprocessor tokens recognized by %Eigen.\n\n\\eigenAutoToc\n\n\n\\section TopicPreprocessorDirectivesMajor Macros with major effects\n\nThese macros have a major effect and typically break the API (Application Programming Interface) and/or the\nABI (Application Binary Interface). This can be rather dangerous: if parts of your program are compiled with\none option, and other parts (or libraries that you use) are compiled with another option, your program may\nfail to link or exhibit subtle bugs. Nevertheless, these options can be useful for people who know what they\nare doing.\n\n - \\b EIGEN2_SUPPORT and \\b EIGEN2_SUPPORT_STAGEnn_xxx are disabled starting from the 3.3 release.\n   Defining one of these will raise a compile-error. If you need to compile Eigen2 code,\n   <a href=\"http://eigen.tuxfamily.org/index.php?title=Eigen2\">check this site</a>.\n - \\b EIGEN_DEFAULT_DENSE_INDEX_TYPE - the type for column and row indices in matrices, vectors and array\n   (DenseBase::Index). Set to \\c std::ptrdiff_t by default.\n - \\b EIGEN_DEFAULT_IO_FORMAT - the IOFormat to use when printing a matrix if no %IOFormat is specified.\n   Defaults to the %IOFormat constructed by the default constructor IOFormat::IOFormat().\n - \\b EIGEN_INITIALIZE_MATRICES_BY_ZERO - if defined, all entries of newly constructed matrices and arrays are\n   initialized to zero, as are new entries in matrices and arrays after resizing. Not defined by default.\n   \\warning The unary (resp. binary) constructor of \\c 1x1 (resp. \\c 2x1 or \\c 1x2) fixed size matrices is\n   always interpreted as an initialization constructor where the argument(s) are the coefficient values\n   and not the sizes. For instance, \\code Vector2d v(2,1); \\endcode will create a vector with coeficients [2,1],\n   and \\b not a \\c 2x1 vector initialized with zeros (i.e., [0,0]). If such cases might occur, then it is\n   recommended to use the default constructor with a explicit call to resize:\n   \\code\n   Matrix<?,SizeAtCompileTime,1> v;\n   v.resize(size);\n   Matrix<?,RowsAtCompileTime,ColsAtCompileTime> m;\n   m.resize(rows,cols);\n   \\endcode\n - \\b EIGEN_INITIALIZE_MATRICES_BY_NAN - if defined, all entries of newly constructed matrices and arrays are\n   initialized to NaN, as are new entries in matrices and arrays after resizing. This option is especially\n   useful for debugging purpose, though a memory tool like <a href=\"http://valgrind.org/\">valgrind</a> is\n   preferable. Not defined by default.\n   \\warning See the documentation of \\c EIGEN_INITIALIZE_MATRICES_BY_ZERO for a discussion on a limitations\n   of these macros when applied to \\c 1x1, \\c 1x2, and \\c 2x1 fixed-size matrices.\n - \\b EIGEN_NO_AUTOMATIC_RESIZING - if defined, the matrices (or arrays) on both sides of an assignment \n   <tt>a = b</tt> have to be of the same size; otherwise, %Eigen automatically resizes \\c a so that it is of\n   the correct size. Not defined by default.\n\n\n\\section TopicPreprocessorDirectivesCppVersion C++ standard features\n\nBy default, %Eigen strive to automatically detect and enable language features at compile-time based on\nthe information provided by the compiler.\n\n - \\b EIGEN_MAX_CPP_VER - disables usage of C++ features requiring a version greater than EIGEN_MAX_CPP_VER.\n   Possible values are: 03, 11, 14, 17, etc. If not defined (the default), %Eigen enables all features supported\n   by the compiler.\n\nIndividual features can be explicitly enabled or disabled by defining the following token to 0 or 1 respectively.\nFor instance, one might limit the C++ version to C++03 by defining EIGEN_MAX_CPP_VER=03, but still enable C99 math\nfunctions by defining EIGEN_HAS_C99_MATH=1.\n\n - \\b EIGEN_HAS_C99_MATH - controls the usage of C99 math functions such as erf, erfc, lgamma, etc.\n   Automatic detection disabled if EIGEN_MAX_CPP_VER<11.\n - \\b EIGEN_HAS_CXX11_MATH - controls the implementation of some functions such as round, logp1, isinf, isnan, etc.\n   Automatic detection disabled if EIGEN_MAX_CPP_VER<11.\n - \\b EIGEN_HAS_RVALUE_REFERENCES - defines whether rvalue references are supported\n   Automatic detection disabled if EIGEN_MAX_CPP_VER<11.\n - \\b EIGEN_HAS_STD_RESULT_OF - defines whether std::result_of is supported\n   Automatic detection disabled if EIGEN_MAX_CPP_VER<11.\n - \\b EIGEN_HAS_VARIADIC_TEMPLATES - defines whether variadic templates are supported\n   Automatic detection disabled if EIGEN_MAX_CPP_VER<11.\n - \\b EIGEN_HAS_CONSTEXPR - defines whether relaxed const expression are supported\n   Automatic detection disabled if EIGEN_MAX_CPP_VER<14.\n - \\b EIGEN_HAS_CXX11_CONTAINERS - defines whether STL's containers follows C++11 specifications\n   Automatic detection disabled if EIGEN_MAX_CPP_VER<11.\n - \\b EIGEN_HAS_CXX11_NOEXCEPT - defines whether noexcept is supported\n   Automatic detection disabled if EIGEN_MAX_CPP_VER<11.\n - \\b EIGEN_NO_IO - Disables any usage and support for `<iostreams>`.\n\n\\section TopicPreprocessorDirectivesAssertions Assertions\n\nThe %Eigen library contains many assertions to guard against programming errors, both at compile time and at\nrun time. However, these assertions do cost time and can thus be turned off.\n\n - \\b EIGEN_NO_DEBUG - disables %Eigen's assertions if defined. Not defined by default, unless the\n   \\c NDEBUG macro is defined (this is a standard C++ macro which disables all asserts). \n - \\b EIGEN_NO_STATIC_ASSERT - if defined, compile-time static assertions are replaced by runtime assertions; \n   this saves compilation time. Not defined by default.\n - \\b eigen_assert - macro with one argument that is used inside %Eigen for assertions. By default, it is\n   basically defined to be \\c assert, which aborts the program if the assertion is violated. Redefine this\n   macro if you want to do something else, like throwing an exception.\n - \\b EIGEN_MPL2_ONLY - disable non MPL2 compatible features, or in other words disable the features which\n   are still under the LGPL.\n\n\n\\section TopicPreprocessorDirectivesPerformance Alignment, vectorization and performance tweaking\n\n - \\b \\c EIGEN_MALLOC_ALREADY_ALIGNED - Can be set to 0 or 1 to tell whether default system \\c malloc already\n   returns aligned buffers. In not defined, then this information is automatically deduced from the compiler\n   and system preprocessor tokens.\n - \\b \\c EIGEN_MAX_ALIGN_BYTES - Must be a power of two, or 0. Defines an upper bound on the memory boundary in bytes on which dynamically and statically allocated data may be aligned by %Eigen. If not defined, a default value is automatically computed based on architecture, compiler, and OS.\n This option is typically used to enforce binary compatibility between code/libraries compiled with different SIMD options. For instance, one may compile AVX code and enforce ABI compatibility with existing SSE code by defining \\c EIGEN_MAX_ALIGN_BYTES=16. In the other way round, since by default AVX implies 32 bytes alignment for best performance, one can compile SSE code to be ABI compatible with AVX code by defining \\c EIGEN_MAX_ALIGN_BYTES=32.\n - \\b \\c EIGEN_MAX_STATIC_ALIGN_BYTES - Same as \\c EIGEN_MAX_ALIGN_BYTES but for statically allocated data only. By default, if only  \\c EIGEN_MAX_ALIGN_BYTES is defined, then \\c EIGEN_MAX_STATIC_ALIGN_BYTES == \\c EIGEN_MAX_ALIGN_BYTES, otherwise a default value is automatically computed based on architecture, compiler, and OS (can be smaller than the default value of EIGEN_MAX_ALIGN_BYTES on architectures that do not support stack alignment).\n Let us emphasize that \\c EIGEN_MAX_*_ALIGN_BYTES define only a diserable upper bound. In practice data is aligned to largest power-of-two common divisor of \\c EIGEN_MAX_STATIC_ALIGN_BYTES and the size of the data, such that memory is not wasted.\n - \\b \\c EIGEN_DONT_PARALLELIZE - if defined, this disables multi-threading. This is only relevant if you enabled OpenMP.\n   See \\ref TopicMultiThreading for details.\n - \\b EIGEN_DONT_VECTORIZE - disables explicit vectorization when defined. Not defined by default, unless \n   alignment is disabled by %Eigen's platform test or the user defining \\c EIGEN_DONT_ALIGN.\n - \\b \\c EIGEN_UNALIGNED_VECTORIZE - disables/enables vectorization with unaligned stores. Default is 1 (enabled).\n   If set to 0 (disabled), then expression for which the destination cannot be aligned are not vectorized (e.g., unaligned\n   small fixed size vectors or matrices)\n - \\b \\c EIGEN_FAST_MATH - enables some optimizations which might affect the accuracy of the result. This currently\n   enables the SSE vectorization of sin() and cos(), and speedups sqrt() for single precision. Defined to 1 by default.\n   Define it to 0 to disable.\n - \\b \\c EIGEN_UNROLLING_LIMIT - defines the size of a loop to enable meta unrolling. Set it to zero to disable\n   unrolling. The size of a loop here is expressed in %Eigen's own notion of \"number of FLOPS\", it does not\n   correspond to the number of iterations or the number of instructions. The default is value 110.\n - \\b \\c EIGEN_STACK_ALLOCATION_LIMIT - defines the maximum bytes for a buffer to be allocated on the stack. For internal\n   temporary buffers, dynamic memory allocation is employed as a fall back. For fixed-size matrices or arrays, exceeding\n   this threshold raises a compile time assertion. Use 0 to set no limit. Default is 128 KB.\n - \\b \\c EIGEN_NO_CUDA - disables CUDA support when defined. Might be useful in .cu files for which Eigen is used on the host only,\n   and never called from device code.\n - \\b \\c EIGEN_STRONG_INLINE - This macro is used to qualify critical functions and methods that we expect the compiler to inline.\n   By default it is defined to \\c __forceinline for MSVC and ICC, and to \\c inline for other compilers. A tipical usage is to\n   define it to \\c inline for MSVC users wanting faster compilation times, at the risk of performance degradations in some rare\n   cases for which MSVC inliner fails to do a good job.\n\n\n - \\c EIGEN_DONT_ALIGN - Deprecated, it is a synonym for \\c EIGEN_MAX_ALIGN_BYTES=0. It disables alignment completely. %Eigen will not try to align its objects and does not expect that any objects passed to it are aligned. This will turn off vectorization if \\b EIGEN_UNALIGNED_VECTORIZE=1. Not defined by default.\n - \\c EIGEN_DONT_ALIGN_STATICALLY - Deprecated, it is a synonym for \\c EIGEN_MAX_STATIC_ALIGN_BYTES=0. It disables alignment of arrays on the stack. Not defined by default, unless \\c EIGEN_DONT_ALIGN is defined.\n\n\n\\section TopicPreprocessorDirectivesPlugins Plugins\n\nIt is possible to add new methods to many fundamental classes in %Eigen by writing a plugin. As explained in\nthe section \\ref TopicCustomizing_Plugins, the plugin is specified by defining a \\c EIGEN_xxx_PLUGIN macro. The\nfollowing macros are supported; none of them are defined by default.\n\n - \\b EIGEN_ARRAY_PLUGIN - filename of plugin for extending the Array class.\n - \\b EIGEN_ARRAYBASE_PLUGIN - filename of plugin for extending the ArrayBase class.\n - \\b EIGEN_CWISE_PLUGIN - filename of plugin for extending the Cwise class.\n - \\b EIGEN_DENSEBASE_PLUGIN - filename of plugin for extending the DenseBase class.\n - \\b EIGEN_DYNAMICSPARSEMATRIX_PLUGIN - filename of plugin for extending the DynamicSparseMatrix class.\n - \\b EIGEN_FUNCTORS_PLUGIN - filename of plugin for adding new functors and specializations of functor_traits.\n - \\b EIGEN_MAPBASE_PLUGIN - filename of plugin for extending the MapBase class.\n - \\b EIGEN_MATRIX_PLUGIN - filename of plugin for extending the Matrix class.\n - \\b EIGEN_MATRIXBASE_PLUGIN - filename of plugin for extending the MatrixBase class.\n - \\b EIGEN_PLAINOBJECTBASE_PLUGIN - filename of plugin for extending the PlainObjectBase class.\n - \\b EIGEN_QUATERNION_PLUGIN - filename of plugin for extending the Quaternion class.\n - \\b EIGEN_QUATERNIONBASE_PLUGIN - filename of plugin for extending the QuaternionBase class.\n - \\b EIGEN_SPARSEMATRIX_PLUGIN - filename of plugin for extending the SparseMatrix class.\n - \\b EIGEN_SPARSEMATRIXBASE_PLUGIN - filename of plugin for extending the SparseMatrixBase class.\n - \\b EIGEN_SPARSEVECTOR_PLUGIN - filename of plugin for extending the SparseVector class.\n - \\b EIGEN_TRANSFORM_PLUGIN - filename of plugin for extending the Transform class.\n - \\b EIGEN_VECTORWISEOP_PLUGIN - filename of plugin for extending the VectorwiseOp class.\n\n\\section TopicPreprocessorDirectivesDevelopers Macros for Eigen developers\n\nThese macros are mainly meant for people developing %Eigen and for testing purposes. Even though, they might be useful for power users and the curious for debugging and testing purpose, they \\b should \\b not \\b be \\b used by real-word code.\n\n - \\b EIGEN_DEFAULT_TO_ROW_MAJOR - when defined, the default storage order for matrices becomes row-major\n   instead of column-major. Not defined by default.\n - \\b EIGEN_INTERNAL_DEBUGGING - if defined, enables assertions in %Eigen's internal routines. This is useful\n   for debugging %Eigen itself. Not defined by default.\n - \\b EIGEN_NO_MALLOC - if defined, any request from inside the %Eigen to allocate memory from the heap\n   results in an assertion failure. This is useful to check that some routine does not allocate memory\n   dynamically. Not defined by default.\n - \\b EIGEN_RUNTIME_NO_MALLOC - if defined, a new switch is introduced which can be turned on and off by\n   calling <tt>set_is_malloc_allowed(bool)</tt>. If malloc is not allowed and %Eigen tries to allocate memory\n   dynamically anyway, an assertion failure results. Not defined by default.\n\n*/\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/QuickReference.dox",
    "content": "namespace Eigen {\n\n/** \\eigenManualPage QuickRefPage Quick reference guide\n\n\\eigenAutoToc\n\n<hr>\n\n<a href=\"#\" class=\"top\">top</a>\n\\section QuickRef_Headers Modules and Header files\n\nThe Eigen library is divided in a Core module and several additional modules. Each module has a corresponding header file which has to be included in order to use the module. The \\c %Dense and \\c Eigen header files are provided to conveniently gain access to several modules at once.\n\n<table class=\"manual\">\n<tr><th>Module</th><th>Header file</th><th>Contents</th></tr>\n<tr            ><td>\\link Core_Module Core \\endlink</td><td>\\code#include <Eigen/Core>\\endcode</td><td>Matrix and Array classes, basic linear algebra (including triangular and selfadjoint products), array manipulation</td></tr>\n<tr class=\"alt\"><td>\\link Geometry_Module Geometry \\endlink</td><td>\\code#include <Eigen/Geometry>\\endcode</td><td>Transform, Translation, Scaling, Rotation2D and 3D rotations (Quaternion, AngleAxis)</td></tr>\n<tr            ><td>\\link LU_Module LU \\endlink</td><td>\\code#include <Eigen/LU>\\endcode</td><td>Inverse, determinant, LU decompositions with solver (FullPivLU, PartialPivLU)</td></tr>\n<tr class=\"alt\"><td>\\link Cholesky_Module Cholesky \\endlink</td><td>\\code#include <Eigen/Cholesky>\\endcode</td><td>LLT and LDLT Cholesky factorization with solver</td></tr>\n<tr            ><td>\\link Householder_Module Householder \\endlink</td><td>\\code#include <Eigen/Householder>\\endcode</td><td>Householder transformations; this module is used by several linear algebra modules</td></tr>\n<tr class=\"alt\"><td>\\link SVD_Module SVD \\endlink</td><td>\\code#include <Eigen/SVD>\\endcode</td><td>SVD decompositions with least-squares solver (JacobiSVD, BDCSVD)</td></tr>\n<tr            ><td>\\link QR_Module QR \\endlink</td><td>\\code#include <Eigen/QR>\\endcode</td><td>QR decomposition with solver (HouseholderQR, ColPivHouseholderQR, FullPivHouseholderQR)</td></tr>\n<tr class=\"alt\"><td>\\link Eigenvalues_Module Eigenvalues \\endlink</td><td>\\code#include <Eigen/Eigenvalues>\\endcode</td><td>Eigenvalue, eigenvector decompositions (EigenSolver, SelfAdjointEigenSolver, ComplexEigenSolver)</td></tr>\n<tr            ><td>\\link Sparse_Module Sparse \\endlink</td><td>\\code#include <Eigen/Sparse>\\endcode</td><td>%Sparse matrix storage and related basic linear algebra (SparseMatrix, SparseVector) \\n (see \\ref SparseQuickRefPage for details on sparse modules)</td></tr>\n<tr class=\"alt\"><td></td><td>\\code#include <Eigen/Dense>\\endcode</td><td>Includes Core, Geometry, LU, Cholesky, SVD, QR, and Eigenvalues header files</td></tr>\n<tr            ><td></td><td>\\code#include <Eigen/Eigen>\\endcode</td><td>Includes %Dense and %Sparse header files (the whole Eigen library)</td></tr>\n</table>\n\n<a href=\"#\" class=\"top\">top</a>\n\\section QuickRef_Types Array, matrix and vector types\n\n\n\\b Recall: Eigen provides two kinds of dense objects: mathematical matrices and vectors which are both represented by the template class Matrix, and general 1D and 2D arrays represented by the template class Array:\n\\code\ntypedef Matrix<Scalar, RowsAtCompileTime, ColsAtCompileTime, Options> MyMatrixType;\ntypedef Array<Scalar, RowsAtCompileTime, ColsAtCompileTime, Options> MyArrayType;\n\\endcode\n\n\\li \\c Scalar is the scalar type of the coefficients (e.g., \\c float, \\c double, \\c bool, \\c int, etc.).\n\\li \\c RowsAtCompileTime and \\c ColsAtCompileTime are the number of rows and columns of the matrix as known at compile-time or \\c Dynamic.\n\\li \\c Options can be \\c ColMajor or \\c RowMajor, default is \\c ColMajor. (see class Matrix for more options)\n\nAll combinations are allowed: you can have a matrix with a fixed number of rows and a dynamic number of columns, etc. The following are all valid:\n\\code\nMatrix<double, 6, Dynamic>                  // Dynamic number of columns (heap allocation)\nMatrix<double, Dynamic, 2>                  // Dynamic number of rows (heap allocation)\nMatrix<double, Dynamic, Dynamic, RowMajor>  // Fully dynamic, row major (heap allocation)\nMatrix<double, 13, 3>                       // Fully fixed (usually allocated on stack)\n\\endcode\n\nIn most cases, you can simply use one of the convenience typedefs for \\ref matrixtypedefs \"matrices\" and \\ref arraytypedefs \"arrays\". Some examples:\n<table class=\"example\">\n<tr><th>Matrices</th><th>Arrays</th></tr>\n<tr><td>\\code\nMatrix<float,Dynamic,Dynamic>   <=>   MatrixXf\nMatrix<double,Dynamic,1>        <=>   VectorXd\nMatrix<int,1,Dynamic>           <=>   RowVectorXi\nMatrix<float,3,3>               <=>   Matrix3f\nMatrix<float,4,1>               <=>   Vector4f\n\\endcode</td><td>\\code\nArray<float,Dynamic,Dynamic>    <=>   ArrayXXf\nArray<double,Dynamic,1>         <=>   ArrayXd\nArray<int,1,Dynamic>            <=>   RowArrayXi\nArray<float,3,3>                <=>   Array33f\nArray<float,4,1>                <=>   Array4f\n\\endcode</td></tr>\n</table>\n\nConversion between the matrix and array worlds:\n\\code\nArray44f a1, a2;\nMatrix4f m1, m2;\nm1 = a1 * a2;                     // coeffwise product, implicit conversion from array to matrix.\na1 = m1 * m2;                     // matrix product, implicit conversion from matrix to array.\na2 = a1 + m1.array();             // mixing array and matrix is forbidden\nm2 = a1.matrix() + m1;            // and explicit conversion is required.\nArrayWrapper<Matrix4f> m1a(m1);   // m1a is an alias for m1.array(), they share the same coefficients\nMatrixWrapper<Array44f> a1m(a1);\n\\endcode\n\nIn the rest of this document we will use the following symbols to emphasize the features which are specifics to a given kind of object:\n\\li <a name=\"matrixonly\"></a>\\matrixworld linear algebra matrix and vector only\n\\li <a name=\"arrayonly\"></a>\\arrayworld array objects only\n\n\\subsection QuickRef_Basics Basic matrix manipulation\n\n<table class=\"manual\">\n<tr><th></th><th>1D objects</th><th>2D objects</th><th>Notes</th></tr>\n<tr><td>Constructors</td>\n<td>\\code\nVector4d  v4;\nVector2f  v1(x, y);\nArray3i   v2(x, y, z);\nVector4d  v3(x, y, z, w);\n\nVectorXf  v5; // empty object\nArrayXf   v6(size);\n\\endcode</td><td>\\code\nMatrix4f  m1;\n\n\n\n\nMatrixXf  m5; // empty object\nMatrixXf  m6(nb_rows, nb_columns);\n\\endcode</td><td class=\"note\">\nBy default, the coefficients \\n are left uninitialized</td></tr>\n<tr class=\"alt\"><td>Comma initializer</td>\n<td>\\code\nVector3f  v1;     v1 << x, y, z;\nArrayXf   v2(4);  v2 << 1, 2, 3, 4;\n\n\\endcode</td><td>\\code\nMatrix3f  m1;   m1 << 1, 2, 3,\n                      4, 5, 6,\n                      7, 8, 9;\n\\endcode</td><td></td></tr>\n\n<tr><td>Comma initializer (bis)</td>\n<td colspan=\"2\">\n\\include Tutorial_commainit_02.cpp\n</td>\n<td>\noutput:\n\\verbinclude Tutorial_commainit_02.out\n</td>\n</tr>\n\n<tr class=\"alt\"><td>Runtime info</td>\n<td>\\code\nvector.size();\n\nvector.innerStride();\nvector.data();\n\\endcode</td><td>\\code\nmatrix.rows();          matrix.cols();\nmatrix.innerSize();     matrix.outerSize();\nmatrix.innerStride();   matrix.outerStride();\nmatrix.data();\n\\endcode</td><td class=\"note\">Inner/Outer* are storage order dependent</td></tr>\n<tr><td>Compile-time info</td>\n<td colspan=\"2\">\\code\nObjectType::Scalar              ObjectType::RowsAtCompileTime\nObjectType::RealScalar          ObjectType::ColsAtCompileTime\nObjectType::Index               ObjectType::SizeAtCompileTime\n\\endcode</td><td></td></tr>\n<tr class=\"alt\"><td>Resizing</td>\n<td>\\code\nvector.resize(size);\n\n\nvector.resizeLike(other_vector);\nvector.conservativeResize(size);\n\\endcode</td><td>\\code\nmatrix.resize(nb_rows, nb_cols);\nmatrix.resize(Eigen::NoChange, nb_cols);\nmatrix.resize(nb_rows, Eigen::NoChange);\nmatrix.resizeLike(other_matrix);\nmatrix.conservativeResize(nb_rows, nb_cols);\n\\endcode</td><td class=\"note\">no-op if the new sizes match,<br/>otherwise data are lost<br/><br/>resizing with data preservation</td></tr>\n\n<tr><td>Coeff access with \\n range checking</td>\n<td>\\code\nvector(i)     vector.x()\nvector[i]     vector.y()\n              vector.z()\n              vector.w()\n\\endcode</td><td>\\code\nmatrix(i,j)\n\\endcode</td><td class=\"note\">Range checking is disabled if \\n NDEBUG or EIGEN_NO_DEBUG is defined</td></tr>\n\n<tr class=\"alt\"><td>Coeff access without \\n range checking</td>\n<td>\\code\nvector.coeff(i)\nvector.coeffRef(i)\n\\endcode</td><td>\\code\nmatrix.coeff(i,j)\nmatrix.coeffRef(i,j)\n\\endcode</td><td></td></tr>\n\n<tr><td>Assignment/copy</td>\n<td colspan=\"2\">\\code\nobject = expression;\nobject_of_float = expression_of_double.cast<float>();\n\\endcode</td><td class=\"note\">the destination is automatically resized (if possible)</td></tr>\n\n</table>\n\n\\subsection QuickRef_PredefMat Predefined Matrices\n\n<table class=\"manual\">\n<tr>\n  <th>Fixed-size matrix or vector</th>\n  <th>Dynamic-size matrix</th>\n  <th>Dynamic-size vector</th>\n</tr>\n<tr style=\"border-bottom-style: none;\">\n  <td>\n\\code\ntypedef {Matrix3f|Array33f} FixedXD;\nFixedXD x;\n\nx = FixedXD::Zero();\nx = FixedXD::Ones();\nx = FixedXD::Constant(value);\nx = FixedXD::Random();\nx = FixedXD::LinSpaced(size, low, high);\n\nx.setZero();\nx.setOnes();\nx.setConstant(value);\nx.setRandom();\nx.setLinSpaced(size, low, high);\n\\endcode\n  </td>\n  <td>\n\\code\ntypedef {MatrixXf|ArrayXXf} Dynamic2D;\nDynamic2D x;\n\nx = Dynamic2D::Zero(rows, cols);\nx = Dynamic2D::Ones(rows, cols);\nx = Dynamic2D::Constant(rows, cols, value);\nx = Dynamic2D::Random(rows, cols);\nN/A\n\nx.setZero(rows, cols);\nx.setOnes(rows, cols);\nx.setConstant(rows, cols, value);\nx.setRandom(rows, cols);\nN/A\n\\endcode\n  </td>\n  <td>\n\\code\ntypedef {VectorXf|ArrayXf} Dynamic1D;\nDynamic1D x;\n\nx = Dynamic1D::Zero(size);\nx = Dynamic1D::Ones(size);\nx = Dynamic1D::Constant(size, value);\nx = Dynamic1D::Random(size);\nx = Dynamic1D::LinSpaced(size, low, high);\n\nx.setZero(size);\nx.setOnes(size);\nx.setConstant(size, value);\nx.setRandom(size);\nx.setLinSpaced(size, low, high);\n\\endcode\n  </td>\n</tr>\n\n<tr><td colspan=\"3\">Identity and \\link MatrixBase::Unit basis vectors \\endlink \\matrixworld</td></tr>\n<tr style=\"border-bottom-style: none;\">\n  <td>\n\\code\nx = FixedXD::Identity();\nx.setIdentity();\n\nVector3f::UnitX() // 1 0 0\nVector3f::UnitY() // 0 1 0\nVector3f::UnitZ() // 0 0 1\nVector4f::Unit(i)\nx.setUnit(i);\n\\endcode\n  </td>\n  <td>\n\\code\nx = Dynamic2D::Identity(rows, cols);\nx.setIdentity(rows, cols);\n\n\n\nN/A\n\\endcode\n  </td>\n  <td>\\code\nN/A\n\n\nVectorXf::Unit(size,i)\nx.setUnit(size,i);\nVectorXf::Unit(4,1) == Vector4f(0,1,0,0)\n                    == Vector4f::UnitY()\n\\endcode\n  </td>\n</tr>\n</table>\n\nNote that it is allowed to call any of the \\c set* functions to a dynamic-sized vector or matrix without passing new sizes.\nFor instance:\n\\code\nMatrixXi M(3,3);\nM.setIdentity();\n\\endcode\n\n\\subsection QuickRef_Map Mapping external arrays\n\n<table class=\"manual\">\n<tr>\n<td>Contiguous \\n memory</td>\n<td>\\code\nfloat data[] = {1,2,3,4};\nMap<Vector3f> v1(data);       // uses v1 as a Vector3f object\nMap<ArrayXf>  v2(data,3);     // uses v2 as a ArrayXf object\nMap<Array22f> m1(data);       // uses m1 as a Array22f object\nMap<MatrixXf> m2(data,2,2);   // uses m2 as a MatrixXf object\n\\endcode</td>\n</tr>\n<tr>\n<td>Typical usage \\n of strides</td>\n<td>\\code\nfloat data[] = {1,2,3,4,5,6,7,8,9};\nMap<VectorXf,0,InnerStride<2> >  v1(data,3);                      // = [1,3,5]\nMap<VectorXf,0,InnerStride<> >   v2(data,3,InnerStride<>(3));     // = [1,4,7]\nMap<MatrixXf,0,OuterStride<3> >  m2(data,2,3);                    // both lines     |1,4,7|\nMap<MatrixXf,0,OuterStride<> >   m1(data,2,3,OuterStride<>(3));   // are equal to:  |2,5,8|\n\\endcode</td>\n</tr>\n</table>\n\n\n<a href=\"#\" class=\"top\">top</a>\n\\section QuickRef_ArithmeticOperators Arithmetic Operators\n\n<table class=\"manual\">\n<tr><td>\nadd \\n subtract</td><td>\\code\nmat3 = mat1 + mat2;           mat3 += mat1;\nmat3 = mat1 - mat2;           mat3 -= mat1;\\endcode\n</td></tr>\n<tr class=\"alt\"><td>\nscalar product</td><td>\\code\nmat3 = mat1 * s1;             mat3 *= s1;           mat3 = s1 * mat1;\nmat3 = mat1 / s1;             mat3 /= s1;\\endcode\n</td></tr>\n<tr><td>\nmatrix/vector \\n products \\matrixworld</td><td>\\code\ncol2 = mat1 * col1;\nrow2 = row1 * mat1;           row1 *= mat1;\nmat3 = mat1 * mat2;           mat3 *= mat1; \\endcode\n</td></tr>\n<tr class=\"alt\"><td>\ntransposition \\n adjoint \\matrixworld</td><td>\\code\nmat1 = mat2.transpose();      mat1.transposeInPlace();\nmat1 = mat2.adjoint();        mat1.adjointInPlace();\n\\endcode\n</td></tr>\n<tr><td>\n\\link MatrixBase::dot dot \\endlink product \\n inner product \\matrixworld</td><td>\\code\nscalar = vec1.dot(vec2);\nscalar = col1.adjoint() * col2;\nscalar = (col1.adjoint() * col2).value();\\endcode\n</td></tr>\n<tr class=\"alt\"><td>\nouter product \\matrixworld</td><td>\\code\nmat = col1 * col2.transpose();\\endcode\n</td></tr>\n\n<tr><td>\n\\link MatrixBase::norm() norm \\endlink \\n \\link MatrixBase::normalized() normalization \\endlink \\matrixworld</td><td>\\code\nscalar = vec1.norm();         scalar = vec1.squaredNorm()\nvec2 = vec1.normalized();     vec1.normalize(); // inplace \\endcode\n</td></tr>\n\n<tr class=\"alt\"><td>\n\\link MatrixBase::cross() cross product \\endlink \\matrixworld</td><td>\\code\n#include <Eigen/Geometry>\nvec3 = vec1.cross(vec2);\\endcode</td></tr>\n</table>\n\n<a href=\"#\" class=\"top\">top</a>\n\\section QuickRef_Coeffwise Coefficient-wise \\& Array operators\n\nIn addition to the aforementioned operators, Eigen supports numerous coefficient-wise operator and functions.\nMost of them unambiguously makes sense in array-world\\arrayworld. The following operators are readily available for arrays,\nor available through .array() for vectors and matrices:\n\n<table class=\"manual\">\n<tr><td>Arithmetic operators</td><td>\\code\narray1 * array2     array1 / array2     array1 *= array2    array1 /= array2\narray1 + scalar     array1 - scalar     array1 += scalar    array1 -= scalar\n\\endcode</td></tr>\n<tr><td>Comparisons</td><td>\\code\narray1 < array2     array1 > array2     array1 < scalar     array1 > scalar\narray1 <= array2    array1 >= array2    array1 <= scalar    array1 >= scalar\narray1 == array2    array1 != array2    array1 == scalar    array1 != scalar\narray1.min(array2)  array1.max(array2)  array1.min(scalar)  array1.max(scalar)\n\\endcode</td></tr>\n<tr><td>Trigo, power, and \\n misc functions \\n and the STL-like variants</td><td>\\code\narray1.abs2()\narray1.abs()                  abs(array1)\narray1.sqrt()                 sqrt(array1)\narray1.log()                  log(array1)\narray1.log10()                log10(array1)\narray1.exp()                  exp(array1)\narray1.pow(array2)            pow(array1,array2)\narray1.pow(scalar)            pow(array1,scalar)\n                              pow(scalar,array2)\narray1.square()\narray1.cube()\narray1.inverse()\n\narray1.sin()                  sin(array1)\narray1.cos()                  cos(array1)\narray1.tan()                  tan(array1)\narray1.asin()                 asin(array1)\narray1.acos()                 acos(array1)\narray1.atan()                 atan(array1)\narray1.sinh()                 sinh(array1)\narray1.cosh()                 cosh(array1)\narray1.tanh()                 tanh(array1)\narray1.arg()                  arg(array1)\n\narray1.floor()                floor(array1)\narray1.ceil()                 ceil(array1)\narray1.round()                round(aray1)\n\narray1.isFinite()             isfinite(array1)\narray1.isInf()                isinf(array1)\narray1.isNaN()                isnan(array1)\n\\endcode\n</td></tr>\n</table>\n\n\nThe following coefficient-wise operators are available for all kind of expressions (matrices, vectors, and arrays), and for both real or complex scalar types:\n\n<table class=\"manual\">\n<tr><th>Eigen's API</th><th>STL-like APIs\\arrayworld </th><th>Comments</th></tr>\n<tr><td>\\code\nmat1.real()\nmat1.imag()\nmat1.conjugate()\n\\endcode\n</td><td>\\code\nreal(array1)\nimag(array1)\nconj(array1)\n\\endcode\n</td><td>\n\\code\n // read-write, no-op for real expressions\n // read-only for real, read-write for complexes\n // no-op for real expressions\n\\endcode\n</td></tr>\n</table>\n\nSome coefficient-wise operators are readily available for for matrices and vectors through the following cwise* methods:\n<table class=\"manual\">\n<tr><th>Matrix API \\matrixworld</th><th>Via Array conversions</th></tr>\n<tr><td>\\code\nmat1.cwiseMin(mat2)         mat1.cwiseMin(scalar)\nmat1.cwiseMax(mat2)         mat1.cwiseMax(scalar)\nmat1.cwiseAbs2()\nmat1.cwiseAbs()\nmat1.cwiseSqrt()\nmat1.cwiseInverse()\nmat1.cwiseProduct(mat2)\nmat1.cwiseQuotient(mat2)\nmat1.cwiseEqual(mat2)       mat1.cwiseEqual(scalar)\nmat1.cwiseNotEqual(mat2)\n\\endcode\n</td><td>\\code\nmat1.array().min(mat2.array())    mat1.array().min(scalar)\nmat1.array().max(mat2.array())    mat1.array().max(scalar)\nmat1.array().abs2()\nmat1.array().abs()\nmat1.array().sqrt()\nmat1.array().inverse()\nmat1.array() * mat2.array()\nmat1.array() / mat2.array()\nmat1.array() == mat2.array()      mat1.array() == scalar\nmat1.array() != mat2.array()\n\\endcode</td></tr>\n</table>\nThe main difference between the two API is that the one based on cwise* methods returns an expression in the matrix world,\nwhile the second one (based on .array()) returns an array expression.\nRecall that .array() has no cost, it only changes the available API and interpretation of the data.\n\nIt is also very simple to apply any user defined function \\c foo using DenseBase::unaryExpr together with <a href=\"http://en.cppreference.com/w/cpp/utility/functional/ptr_fun\">std::ptr_fun</a> (c++03), <a href=\"http://en.cppreference.com/w/cpp/utility/functional/ref\">std::ref</a> (c++11), or <a href=\"http://en.cppreference.com/w/cpp/language/lambda\">lambdas</a> (c++11):\n\\code\nmat1.unaryExpr(std::ptr_fun(foo));\nmat1.unaryExpr(std::ref(foo));\nmat1.unaryExpr([](double x) { return foo(x); });\n\\endcode\n\n\n<a href=\"#\" class=\"top\">top</a>\n\\section QuickRef_Reductions Reductions\n\nEigen provides several reduction methods such as:\n\\link DenseBase::minCoeff() minCoeff() \\endlink, \\link DenseBase::maxCoeff() maxCoeff() \\endlink,\n\\link DenseBase::sum() sum() \\endlink, \\link DenseBase::prod() prod() \\endlink,\n\\link MatrixBase::trace() trace() \\endlink \\matrixworld,\n\\link MatrixBase::norm() norm() \\endlink \\matrixworld, \\link MatrixBase::squaredNorm() squaredNorm() \\endlink \\matrixworld,\n\\link DenseBase::all() all() \\endlink, and \\link DenseBase::any() any() \\endlink.\nAll reduction operations can be done matrix-wise,\n\\link DenseBase::colwise() column-wise \\endlink or\n\\link DenseBase::rowwise() row-wise \\endlink. Usage example:\n<table class=\"manual\">\n<tr><td rowspan=\"3\" style=\"border-right-style:dashed;vertical-align:middle\">\\code\n      5 3 1\nmat = 2 7 8\n      9 4 6 \\endcode\n</td> <td>\\code mat.minCoeff(); \\endcode</td><td>\\code 1 \\endcode</td></tr>\n<tr class=\"alt\"><td>\\code mat.colwise().minCoeff(); \\endcode</td><td>\\code 2 3 1 \\endcode</td></tr>\n<tr style=\"vertical-align:middle\"><td>\\code mat.rowwise().minCoeff(); \\endcode</td><td>\\code\n1\n2\n4\n\\endcode</td></tr>\n</table>\n\nSpecial versions of \\link DenseBase::minCoeff(IndexType*,IndexType*) const minCoeff \\endlink and \\link DenseBase::maxCoeff(IndexType*,IndexType*) const maxCoeff \\endlink:\n\\code\nint i, j;\ns = vector.minCoeff(&i);        // s == vector[i]\ns = matrix.maxCoeff(&i, &j);    // s == matrix(i,j)\n\\endcode\nTypical use cases of all() and any():\n\\code\nif((array1 > 0).all()) ...      // if all coefficients of array1 are greater than 0 ...\nif((array1 < array2).any()) ... // if there exist a pair i,j such that array1(i,j) < array2(i,j) ...\n\\endcode\n\n\n<a href=\"#\" class=\"top\">top</a>\\section QuickRef_Blocks Sub-matrices\n\n<div class=\"warningbox\">\n<strong>PLEASE HELP US IMPROVING THIS SECTION.</strong>\n%Eigen 3.4 supports a much improved API for sub-matrices, including,\nslicing and indexing from arrays: \\ref TutorialSlicingIndexing\n</div>\n\nRead-write access to a \\link DenseBase::col(Index) column \\endlink\nor a \\link DenseBase::row(Index) row \\endlink of a matrix (or array):\n\\code\nmat1.row(i) = mat2.col(j);\nmat1.col(j1).swap(mat1.col(j2));\n\\endcode\n\nRead-write access to sub-vectors:\n<table class=\"manual\">\n<tr>\n<th>Default versions</th>\n<th>Optimized versions when the size \\n is known at compile time</th></tr>\n<th></th>\n\n<tr><td>\\code vec1.head(n)\\endcode</td><td>\\code vec1.head<n>()\\endcode</td><td>the first \\c n coeffs </td></tr>\n<tr><td>\\code vec1.tail(n)\\endcode</td><td>\\code vec1.tail<n>()\\endcode</td><td>the last \\c n coeffs </td></tr>\n<tr><td>\\code vec1.segment(pos,n)\\endcode</td><td>\\code vec1.segment<n>(pos)\\endcode</td>\n    <td>the \\c n coeffs in the \\n range [\\c pos : \\c pos + \\c n - 1]</td></tr>\n<tr class=\"alt\"><td colspan=\"3\">\n\nRead-write access to sub-matrices:</td></tr>\n<tr>\n  <td>\\code mat1.block(i,j,rows,cols)\\endcode\n      \\link DenseBase::block(Index,Index,Index,Index) (more) \\endlink</td>\n  <td>\\code mat1.block<rows,cols>(i,j)\\endcode\n      \\link DenseBase::block(Index,Index) (more) \\endlink</td>\n  <td>the \\c rows x \\c cols sub-matrix \\n starting from position (\\c i,\\c j)</td></tr>\n<tr><td>\\code\n mat1.topLeftCorner(rows,cols)\n mat1.topRightCorner(rows,cols)\n mat1.bottomLeftCorner(rows,cols)\n mat1.bottomRightCorner(rows,cols)\\endcode\n <td>\\code\n mat1.topLeftCorner<rows,cols>()\n mat1.topRightCorner<rows,cols>()\n mat1.bottomLeftCorner<rows,cols>()\n mat1.bottomRightCorner<rows,cols>()\\endcode\n <td>the \\c rows x \\c cols sub-matrix \\n taken in one of the four corners</td></tr>\n <tr><td>\\code\n mat1.topRows(rows)\n mat1.bottomRows(rows)\n mat1.leftCols(cols)\n mat1.rightCols(cols)\\endcode\n <td>\\code\n mat1.topRows<rows>()\n mat1.bottomRows<rows>()\n mat1.leftCols<cols>()\n mat1.rightCols<cols>()\\endcode\n <td>specialized versions of block() \\n when the block fit two corners</td></tr>\n</table>\n\n\n\n<a href=\"#\" class=\"top\">top</a>\\section QuickRef_Misc Miscellaneous operations\n\n<div class=\"warningbox\">\n<strong>PLEASE HELP US IMPROVING THIS SECTION.</strong>\n%Eigen 3.4 supports a new API for reshaping: \\ref TutorialReshape\n</div>\n\n\\subsection QuickRef_Reverse Reverse\nVectors, rows, and/or columns of a matrix can be reversed (see DenseBase::reverse(), DenseBase::reverseInPlace(), VectorwiseOp::reverse()).\n\\code\nvec.reverse()           mat.colwise().reverse()   mat.rowwise().reverse()\nvec.reverseInPlace()\n\\endcode\n\n\\subsection QuickRef_Replicate Replicate\nVectors, matrices, rows, and/or columns can be replicated in any direction (see DenseBase::replicate(), VectorwiseOp::replicate())\n\\code\nvec.replicate(times)                                          vec.replicate<Times>\nmat.replicate(vertical_times, horizontal_times)               mat.replicate<VerticalTimes, HorizontalTimes>()\nmat.colwise().replicate(vertical_times, horizontal_times)     mat.colwise().replicate<VerticalTimes, HorizontalTimes>()\nmat.rowwise().replicate(vertical_times, horizontal_times)     mat.rowwise().replicate<VerticalTimes, HorizontalTimes>()\n\\endcode\n\n\n<a href=\"#\" class=\"top\">top</a>\\section QuickRef_DiagTriSymm Diagonal, Triangular, and Self-adjoint matrices\n(matrix world \\matrixworld)\n\n\\subsection QuickRef_Diagonal Diagonal matrices\n\n<table class=\"example\">\n<tr><th>Operation</th><th>Code</th></tr>\n<tr><td>\nview a vector \\link MatrixBase::asDiagonal() as a diagonal matrix \\endlink \\n </td><td>\\code\nmat1 = vec1.asDiagonal();\\endcode\n</td></tr>\n<tr><td>\nDeclare a diagonal matrix</td><td>\\code\nDiagonalMatrix<Scalar,SizeAtCompileTime> diag1(size);\ndiag1.diagonal() = vector;\\endcode\n</td></tr>\n<tr><td>Access the \\link MatrixBase::diagonal() diagonal \\endlink and \\link MatrixBase::diagonal(Index) super/sub diagonals \\endlink of a matrix as a vector (read/write)</td>\n <td>\\code\nvec1 = mat1.diagonal();        mat1.diagonal() = vec1;      // main diagonal\nvec1 = mat1.diagonal(+n);      mat1.diagonal(+n) = vec1;    // n-th super diagonal\nvec1 = mat1.diagonal(-n);      mat1.diagonal(-n) = vec1;    // n-th sub diagonal\nvec1 = mat1.diagonal<1>();     mat1.diagonal<1>() = vec1;   // first super diagonal\nvec1 = mat1.diagonal<-2>();    mat1.diagonal<-2>() = vec1;  // second sub diagonal\n\\endcode</td>\n</tr>\n\n<tr><td>Optimized products and inverse</td>\n <td>\\code\nmat3  = scalar * diag1 * mat1;\nmat3 += scalar * mat1 * vec1.asDiagonal();\nmat3 = vec1.asDiagonal().inverse() * mat1\nmat3 = mat1 * diag1.inverse()\n\\endcode</td>\n</tr>\n\n</table>\n\n\\subsection QuickRef_TriangularView Triangular views\n\nTriangularView gives a view on a triangular part of a dense matrix and allows to perform optimized operations on it. The opposite triangular part is never referenced and can be used to store other information.\n\n\\note The .triangularView() template member function requires the \\c template keyword if it is used on an\nobject of a type that depends on a template parameter; see \\ref TopicTemplateKeyword for details.\n\n<table class=\"example\">\n<tr><th>Operation</th><th>Code</th></tr>\n<tr><td>\nReference to a triangular with optional \\n\nunit or null diagonal (read/write):\n</td><td>\\code\nm.triangularView<Xxx>()\n\\endcode \\n\n\\c Xxx = ::Upper, ::Lower, ::StrictlyUpper, ::StrictlyLower, ::UnitUpper, ::UnitLower\n</td></tr>\n<tr><td>\nWriting to a specific triangular part:\\n (only the referenced triangular part is evaluated)\n</td><td>\\code\nm1.triangularView<Eigen::Lower>() = m2 + m3 \\endcode\n</td></tr>\n<tr><td>\nConversion to a dense matrix setting the opposite triangular part to zero:\n</td><td>\\code\nm2 = m1.triangularView<Eigen::UnitUpper>()\\endcode\n</td></tr>\n<tr><td>\nProducts:\n</td><td>\\code\nm3 += s1 * m1.adjoint().triangularView<Eigen::UnitUpper>() * m2\nm3 -= s1 * m2.conjugate() * m1.adjoint().triangularView<Eigen::Lower>() \\endcode\n</td></tr>\n<tr><td>\nSolving linear equations:\\n\n\\f$ M_2 := L_1^{-1} M_2 \\f$ \\n\n\\f$ M_3 := {L_1^*}^{-1} M_3 \\f$ \\n\n\\f$ M_4 := M_4 U_1^{-1} \\f$\n</td><td>\\n \\code\nL1.triangularView<Eigen::UnitLower>().solveInPlace(M2)\nL1.triangularView<Eigen::Lower>().adjoint().solveInPlace(M3)\nU1.triangularView<Eigen::Upper>().solveInPlace<OnTheRight>(M4)\\endcode\n</td></tr>\n</table>\n\n\\subsection QuickRef_SelfadjointMatrix Symmetric/selfadjoint views\n\nJust as for triangular matrix, you can reference any triangular part of a square matrix to see it as a selfadjoint\nmatrix and perform special and optimized operations. Again the opposite triangular part is never referenced and can be\nused to store other information.\n\n\\note The .selfadjointView() template member function requires the \\c template keyword if it is used on an\nobject of a type that depends on a template parameter; see \\ref TopicTemplateKeyword for details.\n\n<table class=\"example\">\n<tr><th>Operation</th><th>Code</th></tr>\n<tr><td>\nConversion to a dense matrix:\n</td><td>\\code\nm2 = m.selfadjointView<Eigen::Lower>();\\endcode\n</td></tr>\n<tr><td>\nProduct with another general matrix or vector:\n</td><td>\\code\nm3  = s1 * m1.conjugate().selfadjointView<Eigen::Upper>() * m3;\nm3 -= s1 * m3.adjoint() * m1.selfadjointView<Eigen::Lower>();\\endcode\n</td></tr>\n<tr><td>\nRank 1 and rank K update: \\n\n\\f$ upper(M_1) \\mathrel{{+}{=}} s_1 M_2 M_2^* \\f$ \\n\n\\f$ lower(M_1) \\mathbin{{-}{=}} M_2^* M_2 \\f$\n</td><td>\\n \\code\nM1.selfadjointView<Eigen::Upper>().rankUpdate(M2,s1);\nM1.selfadjointView<Eigen::Lower>().rankUpdate(M2.adjoint(),-1); \\endcode\n</td></tr>\n<tr><td>\nRank 2 update: (\\f$ M \\mathrel{{+}{=}} s u v^* + s v u^* \\f$)\n</td><td>\\code\nM.selfadjointView<Eigen::Upper>().rankUpdate(u,v,s);\n\\endcode\n</td></tr>\n<tr><td>\nSolving linear equations:\\n(\\f$ M_2 := M_1^{-1} M_2 \\f$)\n</td><td>\\code\n// via a standard Cholesky factorization\nm2 = m1.selfadjointView<Eigen::Upper>().llt().solve(m2);\n// via a Cholesky factorization with pivoting\nm2 = m1.selfadjointView<Eigen::Lower>().ldlt().solve(m2);\n\\endcode\n</td></tr>\n</table>\n\n*/\n\n/*\n<table class=\"tutorial_code\">\n<tr><td>\n\\link MatrixBase::asDiagonal() make a diagonal matrix \\endlink \\n from a vector </td><td>\\code\nmat1 = vec1.asDiagonal();\\endcode\n</td></tr>\n<tr><td>\nDeclare a diagonal matrix</td><td>\\code\nDiagonalMatrix<Scalar,SizeAtCompileTime> diag1(size);\ndiag1.diagonal() = vector;\\endcode\n</td></tr>\n<tr><td>Access \\link MatrixBase::diagonal() the diagonal and super/sub diagonals of a matrix \\endlink as a vector (read/write)</td>\n <td>\\code\nvec1 = mat1.diagonal();            mat1.diagonal() = vec1;      // main diagonal\nvec1 = mat1.diagonal(+n);          mat1.diagonal(+n) = vec1;    // n-th super diagonal\nvec1 = mat1.diagonal(-n);          mat1.diagonal(-n) = vec1;    // n-th sub diagonal\nvec1 = mat1.diagonal<1>();         mat1.diagonal<1>() = vec1;   // first super diagonal\nvec1 = mat1.diagonal<-2>();        mat1.diagonal<-2>() = vec1;  // second sub diagonal\n\\endcode</td>\n</tr>\n\n<tr><td>View on a triangular part of a matrix (read/write)</td>\n <td>\\code\nmat2 = mat1.triangularView<Xxx>();\n// Xxx = Upper, Lower, StrictlyUpper, StrictlyLower, UnitUpper, UnitLower\nmat1.triangularView<Upper>() = mat2 + mat3; // only the upper part is evaluated and referenced\n\\endcode</td></tr>\n\n<tr><td>View a triangular part as a symmetric/self-adjoint matrix (read/write)</td>\n <td>\\code\nmat2 = mat1.selfadjointView<Xxx>();     // Xxx = Upper or Lower\nmat1.selfadjointView<Upper>() = mat2 + mat2.adjoint();  // evaluated and write to the upper triangular part only\n\\endcode</td></tr>\n\n</table>\n\nOptimized products:\n\\code\nmat3 += scalar * vec1.asDiagonal() * mat1\nmat3 += scalar * mat1 * vec1.asDiagonal()\nmat3.noalias() += scalar * mat1.triangularView<Xxx>() * mat2\nmat3.noalias() += scalar * mat2 * mat1.triangularView<Xxx>()\nmat3.noalias() += scalar * mat1.selfadjointView<Upper or Lower>() * mat2\nmat3.noalias() += scalar * mat2 * mat1.selfadjointView<Upper or Lower>()\nmat1.selfadjointView<Upper or Lower>().rankUpdate(mat2);\nmat1.selfadjointView<Upper or Lower>().rankUpdate(mat2.adjoint(), scalar);\n\\endcode\n\nInverse products: (all are optimized)\n\\code\nmat3 = vec1.asDiagonal().inverse() * mat1\nmat3 = mat1 * diag1.inverse()\nmat1.triangularView<Xxx>().solveInPlace(mat2)\nmat1.triangularView<Xxx>().solveInPlace<OnTheRight>(mat2)\nmat2 = mat1.selfadjointView<Upper or Lower>().llt().solve(mat2)\n\\endcode\n\n*/\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/QuickStartGuide.dox",
    "content": "namespace Eigen {\n\n/** \\page GettingStarted Getting started\n\n\\eigenAutoToc\n\nThis is a very short guide on how to get started with Eigen. It has a dual purpose. It serves as a minimal introduction to the Eigen library for people who want to start coding as soon as possible. You can also read this page as the first part of the Tutorial, which explains the library in more detail; in this case you will continue with \\ref TutorialMatrixClass.\n\n\\section GettingStartedInstallation How to \"install\" Eigen?\n\nIn order to use Eigen, you just need to download and extract Eigen's source code (see <a href=\"http://eigen.tuxfamily.org/index.php?title=Main_Page#Download\">the wiki</a> for download instructions). In fact, the header files in the \\c Eigen subdirectory are the only files required to compile programs using Eigen. The header files are the same for all platforms. It is not necessary to use CMake or install anything.\n\n\n\\section GettingStartedFirstProgram A simple first program\n\nHere is a rather simple program to get you started.\n\n\\include QuickStart_example.cpp\n\nWe will explain the program after telling you how to compile it.\n\n\n\\section GettingStartedCompiling Compiling and running your first program\n\nThere is no library to link to. The only thing that you need to keep in mind when compiling the above program is that the compiler must be able to find the Eigen header files. The directory in which you placed Eigen's source code must be in the include path. With GCC you use the -I option to achieve this, so you can compile the program with a command like this:\n\n\\code g++ -I /path/to/eigen/ my_program.cpp -o my_program \\endcode\n\nOn Linux or Mac OS X, another option is to symlink or copy the Eigen folder into /usr/local/include/. This way, you can compile the program with:\n\n\\code g++ my_program.cpp -o my_program \\endcode\n\nWhen you run the program, it produces the following output:\n\n\\include QuickStart_example.out\n\n\n\\section GettingStartedExplanation Explanation of the first program\n\nThe Eigen header files define many types, but for simple applications it may be enough to use only the \\c MatrixXd type. This represents a matrix of arbitrary size (hence the \\c X in \\c MatrixXd), in which every entry is a \\c double (hence the \\c d in \\c MatrixXd). See the \\ref QuickRef_Types \"quick reference guide\" for an overview of the different types you can use to represent a matrix.\n\nThe \\c Eigen/Dense header file defines all member functions for the MatrixXd type and related types (see also the \\ref QuickRef_Headers \"table of header files\"). All classes and functions defined in this header file (and other Eigen header files) are in the \\c Eigen namespace. \n\nThe first line of the \\c main function declares a variable of type \\c MatrixXd and specifies that it is a matrix with 2 rows and 2 columns (the entries are not initialized). The statement <tt>m(0,0) = 3</tt> sets the entry in the top-left corner to 3. You need to use round parentheses to refer to entries in the matrix. As usual in computer science, the index of the first index is 0, as opposed to the convention in mathematics that the first index is 1.\n\nThe following three statements sets the other three entries. The final line outputs the matrix \\c m to the standard output stream.\n\n\n\\section GettingStartedExample2 Example 2: Matrices and vectors\n\nHere is another example, which combines matrices with vectors. Concentrate on the left-hand program for now; we will talk about the right-hand program later.\n\n<table class=\"manual\">\n<tr><th>Size set at run time:</th><th>Size set at compile time:</th></tr>\n<tr><td>\n\\include QuickStart_example2_dynamic.cpp\n</td>\n<td>\n\\include QuickStart_example2_fixed.cpp\n</td></tr></table>\n\nThe output is as follows:\n\n\\include QuickStart_example2_dynamic.out\n\n\n\\section GettingStartedExplanation2 Explanation of the second example\n\nThe second example starts by declaring a 3-by-3 matrix \\c m which is initialized using the \\link DenseBase::Random(Index,Index) Random() \\endlink method with random values between -1 and 1. The next line applies a linear mapping such that the values are between 10 and 110. The function call \\link DenseBase::Constant(Index,Index,const Scalar&) MatrixXd::Constant\\endlink(3,3,1.2) returns a 3-by-3 matrix expression having all coefficients equal to 1.2. The rest is standard arithmetic.\n\nThe next line of the \\c main function introduces a new type: \\c VectorXd. This represents a (column) vector of arbitrary size. Here, the vector \\c v is created to contain \\c 3 coefficients which are left uninitialized. The one but last line uses the so-called comma-initializer, explained in \\ref TutorialAdvancedInitialization, to set all coefficients of the vector \\c v to be as follows:\n\n\\f[\nv =\n\\begin{bmatrix}\n  1 \\\\\n  2 \\\\\n  3\n\\end{bmatrix}.\n\\f]\n\nThe final line of the program multiplies the matrix \\c m with the vector \\c v and outputs the result.\n\nNow look back at the second example program. We presented two versions of it. In the version in the left column, the matrix is of type \\c MatrixXd which represents matrices of arbitrary size. The version in the right column is similar, except that the matrix is of type \\c Matrix3d, which represents matrices of a fixed size (here 3-by-3). Because the type already encodes the size of the matrix, it is not necessary to specify the size in the constructor; compare <tt>MatrixXd m(3,3)</tt> with <tt>Matrix3d m</tt>. Similarly, we have \\c VectorXd on the left (arbitrary size) versus \\c Vector3d on the right (fixed size). Note that here the coefficients of vector \\c v are directly set in the constructor, though the same syntax of the left example could be used too.\n\nThe use of fixed-size matrices and vectors has two advantages. The compiler emits better (faster) code because it knows the size of the matrices and vectors. Specifying the size in the type also allows for more rigorous checking at compile-time. For instance, the compiler will complain if you try to multiply a \\c Matrix4d (a 4-by-4 matrix) with a \\c Vector3d (a vector of size 3). However, the use of many types increases compilation time and the size of the executable. The size of the matrix may also not be known at compile-time. A rule of thumb is to use fixed-size matrices for size 4-by-4 and smaller.\n\n\n\\section GettingStartedConclusion Where to go from here?\n\nIt's worth taking the time to read the  \\ref TutorialMatrixClass \"long tutorial\".\n\nHowever if you think you don't need it, you can directly use the classes documentation and our \\ref QuickRefPage.\n\n\\li \\b Next: \\ref TutorialMatrixClass\n\n*/\n\n}\n\n"
  },
  {
    "path": "3rdparty/eigen3/doc/SparseLinearSystems.dox",
    "content": "namespace Eigen {\n/** \\eigenManualPage TopicSparseSystems Solving Sparse Linear Systems\nIn Eigen, there are several methods available to solve linear systems when the coefficient matrix is sparse. Because of the special representation of this class of matrices, special care should be taken in order to get a good performance. See \\ref TutorialSparse for a detailed introduction about sparse matrices in Eigen. This page lists the sparse solvers available in Eigen. The main steps that are common to all these linear solvers are introduced as well. Depending on the properties of the matrix, the desired accuracy, the end-user is able to tune those steps in order to improve the performance of its code. Note that it is not required to know deeply what's hiding behind these steps: the last section presents a benchmark routine that can be easily used to get an insight on the performance of all the available solvers. \n\n\\eigenAutoToc\n\n\\section TutorialSparseSolverList List of sparse solvers\n\n%Eigen currently provides a wide set of built-in solvers, as well as wrappers to external solver libraries.\nThey are summarized in the following tables:\n\n\\subsection TutorialSparseSolverList_Direct Built-in direct solvers\n\n<table class=\"manual\">\n<tr><th>Class</th><th>Solver kind</th><th>Matrix kind</th><th>Features related to performance</th>\n    <th>License</th><th class=\"width20em\"><p>Notes</p></th></tr>\n\n<tr><td>SimplicialLLT \\n <tt>\\#include<Eigen/\\link SparseCholesky_Module SparseCholesky\\endlink></tt></td><td>Direct LLt factorization</td><td>SPD</td><td>Fill-in reducing</td>\n    <td>LGPL</td>\n    <td>SimplicialLDLT is often preferable</td></tr>\n\n<tr><td>SimplicialLDLT \\n <tt>\\#include<Eigen/\\link SparseCholesky_Module SparseCholesky\\endlink></tt></td><td>Direct LDLt factorization</td><td>SPD</td><td>Fill-in reducing</td>\n    <td>LGPL</td>\n    <td>Recommended for very sparse and not too large problems (e.g., 2D Poisson eq.)</td></tr>\n\n<tr><td>SparseLU \\n <tt>\\#include<Eigen/\\link SparseLU_Module SparseLU\\endlink></tt></td> <td>LU factorization </td>\n    <td>Square </td><td>Fill-in reducing, Leverage fast dense algebra</td>\n    <td>MPL2</td>\n    <td>optimized for small and large problems with irregular patterns </td></tr>\n\n<tr><td>SparseQR \\n <tt>\\#include<Eigen/\\link SparseQR_Module SparseQR\\endlink></tt></td> <td> QR factorization</td>\n    <td>Any, rectangular</td><td> Fill-in reducing</td>\n    <td>MPL2</td>\n    <td>recommended for least-square problems, has a basic rank-revealing feature</td></tr>\n </table>\n\n\\subsection TutorialSparseSolverList_Iterative Built-in iterative solvers\n\n<table class=\"manual\">\n<tr><th>Class</th><th>Solver kind</th><th>Matrix kind</th><th>Supported preconditioners, [default]</th>\n    <th>License</th><th class=\"width20em\"><p>Notes</p></th></tr>\n\n<tr><td>ConjugateGradient \\n <tt>\\#include<Eigen/\\link IterativeLinearSolvers_Module IterativeLinearSolvers\\endlink></tt></td> <td>Classic iterative CG</td><td>SPD</td>\n    <td>IdentityPreconditioner, [DiagonalPreconditioner], IncompleteCholesky</td>\n    <td>MPL2</td>\n    <td>Recommended for large symmetric problems (e.g., 3D Poisson eq.)</td></tr>\n\n<tr><td>LeastSquaresConjugateGradient \\n <tt>\\#include<Eigen/\\link IterativeLinearSolvers_Module IterativeLinearSolvers\\endlink></tt></td><td>CG for rectangular least-square problem</td><td>Rectangular</td>\n    <td>IdentityPreconditioner, [LeastSquareDiagonalPreconditioner]</td>\n    <td>MPL2</td>\n    <td>Solve for min |A'Ax-b|^2 without forming A'A</td></tr>\n\n<tr><td>BiCGSTAB \\n <tt>\\#include<Eigen/\\link IterativeLinearSolvers_Module IterativeLinearSolvers\\endlink></tt></td><td>Iterative stabilized bi-conjugate gradient</td><td>Square</td>\n    <td>IdentityPreconditioner, [DiagonalPreconditioner], IncompleteLUT</td>\n    <td>MPL2</td>\n    <td>To speedup the convergence, try it with the \\ref IncompleteLUT preconditioner.</td></tr>\n</table>\n\n\\subsection TutorialSparseSolverList_Wrapper Wrappers to external solvers\n\n<table class=\"manual\">\n<tr><th>Class</th><th>Module</th><th>Solver kind</th><th>Matrix kind</th><th>Features related to performance</th>\n    <th>Dependencies,License</th><th class=\"width20em\"><p>Notes</p></th></tr>\n<tr><td>PastixLLT \\n PastixLDLT \\n PastixLU</td><td>\\link PaStiXSupport_Module PaStiXSupport \\endlink</td><td>Direct LLt, LDLt, LU factorizations</td><td>SPD \\n SPD \\n Square</td><td>Fill-in reducing, Leverage fast dense algebra, Multithreading</td>\n    <td>Requires the <a href=\"http://pastix.gforge.inria.fr\">PaStiX</a> package, \\b CeCILL-C </td>\n    <td>optimized for tough problems and symmetric patterns</td></tr>\n<tr><td>CholmodSupernodalLLT</td><td>\\link CholmodSupport_Module CholmodSupport \\endlink</td><td>Direct LLt factorization</td><td>SPD</td><td>Fill-in reducing, Leverage fast dense algebra</td>\n    <td>Requires the <a href=\"http://www.suitesparse.com\">SuiteSparse</a> package, \\b GPL </td>\n    <td></td></tr>\n<tr><td>UmfPackLU</td><td>\\link UmfPackSupport_Module UmfPackSupport \\endlink</td><td>Direct LU factorization</td><td>Square</td><td>Fill-in reducing, Leverage fast dense algebra</td>\n    <td>Requires the <a href=\"http://www.suitesparse.com\">SuiteSparse</a> package, \\b GPL </td>\n    <td></td></tr>\n<tr><td>KLU</td><td>\\link KLUSupport_Module KLUSupport \\endlink</td><td>Direct LU factorization</td><td>Square</td><td>Fill-in reducing, suitted for circuit simulation</td>\n    <td>Requires the <a href=\"http://www.suitesparse.com\">SuiteSparse</a> package, \\b GPL </td>\n    <td></td></tr>\n<tr><td>SuperLU</td><td>\\link SuperLUSupport_Module SuperLUSupport \\endlink</td><td>Direct LU factorization</td><td>Square</td><td>Fill-in reducing, Leverage fast dense algebra</td>\n    <td>Requires the <a href=\"http://crd-legacy.lbl.gov/~xiaoye/SuperLU/\">SuperLU</a> library, (BSD-like)</td>\n    <td></td></tr>\n<tr><td>SPQR</td><td>\\link SPQRSupport_Module SPQRSupport \\endlink  </td> <td> QR factorization </td> \n    <td> Any, rectangular</td><td>fill-in reducing, multithreaded, fast dense algebra</td>\n    <td> requires the <a href=\"http://www.suitesparse.com\">SuiteSparse</a> package, \\b GPL </td><td>recommended for linear least-squares problems, has a rank-revealing feature</tr>\n<tr><td>PardisoLLT \\n PardisoLDLT \\n PardisoLU</td><td>\\link PardisoSupport_Module PardisoSupport \\endlink</td><td>Direct LLt, LDLt, LU factorizations</td><td>SPD \\n SPD \\n Square</td><td>Fill-in reducing, Leverage fast dense algebra, Multithreading</td>\n    <td>Requires the <a href=\"http://eigen.tuxfamily.org/Counter/redirect_to_mkl.php\">Intel MKL</a> package, \\b Proprietary </td>\n    <td>optimized for tough problems patterns, see also \\link TopicUsingIntelMKL using MKL with Eigen \\endlink</td></tr>\n</table>\n\nHere \\c SPD means symmetric positive definite.\n\n\\section TutorialSparseSolverConcept Sparse solver concept\n\nAll these solvers follow the same general concept.\nHere is a typical and general example:\n\\code\n#include <Eigen/RequiredModuleName>\n// ...\nSparseMatrix<double> A;\n// fill A\nVectorXd b, x;\n// fill b\n// solve Ax = b\nSolverClassName<SparseMatrix<double> > solver;\nsolver.compute(A);\nif(solver.info()!=Success) {\n  // decomposition failed\n  return;\n}\nx = solver.solve(b);\nif(solver.info()!=Success) {\n  // solving failed\n  return;\n}\n// solve for another right hand side:\nx1 = solver.solve(b1);\n\\endcode\n\nFor \\c SPD solvers, a second optional template argument allows to specify which triangular part have to be used, e.g.:\n\n\\code\n#include <Eigen/IterativeLinearSolvers>\n\nConjugateGradient<SparseMatrix<double>, Eigen::Upper> solver;\nx = solver.compute(A).solve(b);\n\\endcode\nIn the above example, only the upper triangular part of the input matrix A is considered for solving. The opposite triangle might either be empty or contain arbitrary values.\n\nIn the case where multiple problems with the same sparsity pattern have to be solved, then the \"compute\" step can be decomposed as follow:\n\\code\nSolverClassName<SparseMatrix<double> > solver;\nsolver.analyzePattern(A);   // for this step the numerical values of A are not used\nsolver.factorize(A);\nx1 = solver.solve(b1);\nx2 = solver.solve(b2);\n...\nA = ...;                    // modify the values of the nonzeros of A, the nonzeros pattern must stay unchanged\nsolver.factorize(A);\nx1 = solver.solve(b1);\nx2 = solver.solve(b2);\n...\n\\endcode\nThe compute() method is equivalent to calling both analyzePattern() and factorize().\n\nEach solver provides some specific features, such as determinant, access to the factors, controls of the iterations, and so on.\nMore details are available in the documentations of the respective classes.\n\nFinally, most of the iterative solvers, can also be used in a \\b matrix-free context, see the following \\link MatrixfreeSolverExample example \\endlink.\n\n\\section TheSparseCompute The Compute Step\nIn the compute() function, the matrix is generally factorized: LLT for self-adjoint matrices, LDLT for general hermitian matrices, LU for non hermitian matrices and QR for rectangular matrices. These are the results of using direct solvers. For this class of solvers precisely, the compute step is further subdivided into analyzePattern() and factorize(). \n\nThe goal of analyzePattern() is to reorder the nonzero elements of the matrix, such that the factorization step creates less fill-in. This step exploits only the structure of the matrix. Hence, the results of this step can be used for other linear systems where the matrix has the same structure. Note however that sometimes, some external solvers (like SuperLU) require that the values of the matrix are set in this step, for instance to equilibrate the rows and columns of the matrix. In this situation, the results of this step should not be used with other matrices.\n\nEigen provides a limited set of methods to reorder the matrix in this step, either built-in (COLAMD, AMD) or external (METIS). These methods are set in template parameter list of the solver :\n\\code\nDirectSolverClassName<SparseMatrix<double>, OrderingMethod<IndexType> > solver;\n\\endcode \n\nSee the \\link OrderingMethods_Module OrderingMethods module \\endlink for the list of available methods and the associated options. \n\nIn factorize(), the factors of the coefficient matrix are computed. This step should be called each time the values of the matrix change. However, the structural pattern of the matrix should not change between multiple calls. \n\nFor iterative solvers, the compute step is used to eventually setup a preconditioner. For instance, with the ILUT preconditioner, the incomplete factors L and U are computed in this step. Remember that, basically, the goal of the preconditioner is to speedup the convergence of an iterative method by solving a modified linear system where the coefficient matrix has more clustered eigenvalues. For real problems, an iterative solver should always be used with a preconditioner. In Eigen, a preconditioner is  selected by simply adding it as a template parameter to the iterative solver object. \n\\code\nIterativeSolverClassName<SparseMatrix<double>, PreconditionerName<SparseMatrix<double> > solver; \n\\endcode\nThe member function preconditioner() returns a read-write reference to the preconditioner \n to directly interact with it. See the \\link IterativeLinearSolvers_Module Iterative solvers module \\endlink and the documentation of each class for the list of available methods.\n\n\\section TheSparseSolve The Solve step\nThe solve() function computes the solution of the linear systems with one or many right hand sides.\n\\code\nX = solver.solve(B);\n\\endcode \nHere, B  can be a vector or a matrix where the columns form the different right hand sides. The solve() function can be called several times as well, for instance when all the right hand sides are not available at once. \n\\code\nx1 = solver.solve(b1);\n// Get the second right hand side b2\nx2 = solver.solve(b2); \n//  ...\n\\endcode\nFor direct methods, the solution are computed at the machine precision. Sometimes, the solution need not be too accurate. In this case, the iterative methods are more suitable and the desired accuracy can be set before the solve step using \\b setTolerance(). For all the available functions, please, refer to the documentation of the \\link IterativeLinearSolvers_Module Iterative solvers module \\endlink. \n\n\\section BenchmarkRoutine\nMost of the time, all you need is to know how much time it will take to solve your system, and hopefully, what is the most suitable solver. In Eigen, we provide a benchmark routine that can be used for this purpose. It is very easy to use. In the build directory, navigate to bench/spbench and compile the routine by typing \\b make \\e spbenchsolver. Run it with --help option to get the list of all available options. Basically, the matrices to test should be in <a href=\"http://math.nist.gov/MatrixMarket/formats.html\">MatrixMarket Coordinate format</a>, and the routine returns the statistics from all available solvers in Eigen.\n\nTo export your matrices and right-hand-side vectors in the matrix-market format, you can the the unsupported SparseExtra module:\n\\code\n#include <unsupported/Eigen/SparseExtra>\n...\nEigen::saveMarket(A, \"filename.mtx\");\nEigen::saveMarket(A, \"filename_SPD.mtx\", Eigen::Symmetric); // if A is symmetric-positive-definite\nEigen::saveMarketVector(B, \"filename_b.mtx\");\n\\endcode\n\nThe following table gives an example of XML statistics from several Eigen built-in and external solvers. \n<TABLE border=\"1\">\n <TR><TH>Matrix <TH> N <TH> NNZ <TH>  <TH > UMFPACK <TH > SUPERLU <TH > PASTIX LU <TH >BiCGSTAB <TH > BiCGSTAB+ILUT <TH >GMRES+ILUT<TH > LDLT <TH> CHOLMOD LDLT <TH > PASTIX LDLT <TH > LLT <TH > CHOLMOD SP LLT <TH > CHOLMOD LLT <TH > PASTIX LLT <TH> CG</TR>\n<TR><TH rowspan=\"4\">vector_graphics <TD rowspan=\"4\"> 12855 <TD rowspan=\"4\"> 72069 <TH>Compute Time <TD>0.0254549<TD>0.0215677<TD>0.0701827<TD>0.000153388<TD>0.0140107<TD>0.0153709<TD>0.0101601<TD style=\"background-color:red\">0.00930502<TD>0.0649689\n<TR><TH>Solve Time <TD>0.00337835<TD>0.000951826<TD>0.00484373<TD>0.0374886<TD>0.0046445<TD>0.00847754<TD>0.000541813<TD style=\"background-color:red\">0.000293696<TD>0.00485376\n<TR><TH>Total Time <TD>0.0288333<TD>0.0225195<TD>0.0750265<TD>0.037642<TD>0.0186552<TD>0.0238484<TD>0.0107019<TD style=\"background-color:red\">0.00959871<TD>0.0698227\n<TR><TH>Error(Iter) <TD> 1.299e-16 <TD> 2.04207e-16 <TD> 4.83393e-15 <TD> 3.94856e-11 (80)  <TD> 1.03861e-12 (3)  <TD> 5.81088e-14 (6)  <TD> 1.97578e-16 <TD> 1.83927e-16 <TD> 4.24115e-15\n<TR><TH rowspan=\"4\">poisson_SPD <TD rowspan=\"4\"> 19788 <TD rowspan=\"4\"> 308232 <TH>Compute Time <TD>0.425026<TD>1.82378<TD>0.617367<TD>0.000478921<TD>1.34001<TD>1.33471<TD>0.796419<TD>0.857573<TD>0.473007<TD>0.814826<TD style=\"background-color:red\">0.184719<TD>0.861555<TD>0.470559<TD>0.000458188\n<TR><TH>Solve Time <TD>0.0280053<TD>0.0194402<TD>0.0268747<TD>0.249437<TD>0.0548444<TD>0.0926991<TD>0.00850204<TD>0.0053171<TD>0.0258932<TD>0.00874603<TD style=\"background-color:red\">0.00578155<TD>0.00530361<TD>0.0248942<TD>0.239093\n<TR><TH>Total Time <TD>0.453031<TD>1.84322<TD>0.644241<TD>0.249916<TD>1.39486<TD>1.42741<TD>0.804921<TD>0.862891<TD>0.4989<TD>0.823572<TD style=\"background-color:red\">0.190501<TD>0.866859<TD>0.495453<TD>0.239551\n<TR><TH>Error(Iter) <TD> 4.67146e-16 <TD> 1.068e-15 <TD> 1.3397e-15 <TD> 6.29233e-11 (201)  <TD> 3.68527e-11 (6)  <TD> 3.3168e-15 (16)  <TD> 1.86376e-15 <TD> 1.31518e-16 <TD> 1.42593e-15 <TD> 3.45361e-15 <TD> 3.14575e-16 <TD> 2.21723e-15 <TD> 7.21058e-16 <TD> 9.06435e-12 (261) \n<TR><TH rowspan=\"4\">sherman2 <TD rowspan=\"4\"> 1080 <TD rowspan=\"4\"> 23094 <TH>Compute Time <TD style=\"background-color:red\">0.00631754<TD>0.015052<TD>0.0247514 <TD> -<TD>0.0214425<TD>0.0217988\n<TR><TH>Solve Time <TD style=\"background-color:red\">0.000478424<TD>0.000337998<TD>0.0010291 <TD> -<TD>0.00243152<TD>0.00246152\n<TR><TH>Total Time <TD style=\"background-color:red\">0.00679597<TD>0.01539<TD>0.0257805 <TD> -<TD>0.023874<TD>0.0242603\n<TR><TH>Error(Iter) <TD> 1.83099e-15 <TD> 8.19351e-15 <TD> 2.625e-14 <TD> 1.3678e+69 (1080)  <TD> 4.1911e-12 (7)  <TD> 5.0299e-13 (12) \n<TR><TH rowspan=\"4\">bcsstk01_SPD <TD rowspan=\"4\"> 48 <TD rowspan=\"4\"> 400 <TH>Compute Time <TD>0.000169079<TD>0.00010789<TD>0.000572538<TD>1.425e-06<TD>9.1612e-05<TD>8.3985e-05<TD style=\"background-color:red\">5.6489e-05<TD>7.0913e-05<TD>0.000468251<TD>5.7389e-05<TD>8.0212e-05<TD>5.8394e-05<TD>0.000463017<TD>1.333e-06\n<TR><TH>Solve Time <TD>1.2288e-05<TD>1.1124e-05<TD>0.000286387<TD>8.5896e-05<TD>1.6381e-05<TD>1.6984e-05<TD style=\"background-color:red\">3.095e-06<TD>4.115e-06<TD>0.000325438<TD>3.504e-06<TD>7.369e-06<TD>3.454e-06<TD>0.000294095<TD>6.0516e-05\n<TR><TH>Total Time <TD>0.000181367<TD>0.000119014<TD>0.000858925<TD>8.7321e-05<TD>0.000107993<TD>0.000100969<TD style=\"background-color:red\">5.9584e-05<TD>7.5028e-05<TD>0.000793689<TD>6.0893e-05<TD>8.7581e-05<TD>6.1848e-05<TD>0.000757112<TD>6.1849e-05\n<TR><TH>Error(Iter) <TD> 1.03474e-16 <TD> 2.23046e-16 <TD> 2.01273e-16 <TD> 4.87455e-07 (48)  <TD> 1.03553e-16 (2)  <TD> 3.55965e-16 (2)  <TD> 2.48189e-16 <TD> 1.88808e-16 <TD> 1.97976e-16 <TD> 2.37248e-16 <TD> 1.82701e-16 <TD> 2.71474e-16 <TD> 2.11322e-16 <TD> 3.547e-09 (48) \n<TR><TH rowspan=\"4\">sherman1 <TD rowspan=\"4\"> 1000 <TD rowspan=\"4\"> 3750 <TH>Compute Time <TD>0.00228805<TD>0.00209231<TD>0.00528268<TD>9.846e-06<TD>0.00163522<TD>0.00162155<TD>0.000789259<TD style=\"background-color:red\">0.000804495<TD>0.00438269\n<TR><TH>Solve Time <TD>0.000213788<TD>9.7983e-05<TD>0.000938831<TD>0.00629835<TD>0.000361764<TD>0.00078794<TD>4.3989e-05<TD style=\"background-color:red\">2.5331e-05<TD>0.000917166\n<TR><TH>Total Time <TD>0.00250184<TD>0.00219029<TD>0.00622151<TD>0.0063082<TD>0.00199698<TD>0.00240949<TD>0.000833248<TD style=\"background-color:red\">0.000829826<TD>0.00529986\n<TR><TH>Error(Iter) <TD> 1.16839e-16 <TD> 2.25968e-16 <TD> 2.59116e-16 <TD> 3.76779e-11 (248)  <TD> 4.13343e-11 (4)  <TD> 2.22347e-14 (10)  <TD> 2.05861e-16 <TD> 1.83555e-16 <TD> 1.02917e-15\n<TR><TH rowspan=\"4\">young1c <TD rowspan=\"4\"> 841 <TD rowspan=\"4\"> 4089 <TH>Compute Time <TD>0.00235843<TD style=\"background-color:red\">0.00217228<TD>0.00568075<TD>1.2735e-05<TD>0.00264866<TD>0.00258236\n<TR><TH>Solve Time <TD>0.000329599<TD style=\"background-color:red\">0.000168634<TD>0.00080118<TD>0.0534738<TD>0.00187193<TD>0.00450211\n<TR><TH>Total Time <TD>0.00268803<TD style=\"background-color:red\">0.00234091<TD>0.00648193<TD>0.0534865<TD>0.00452059<TD>0.00708447\n<TR><TH>Error(Iter) <TD> 1.27029e-16 <TD> 2.81321e-16 <TD> 5.0492e-15 <TD> 8.0507e-11 (706)  <TD> 3.00447e-12 (8)  <TD> 1.46532e-12 (16) \n<TR><TH rowspan=\"4\">mhd1280b <TD rowspan=\"4\"> 1280 <TD rowspan=\"4\"> 22778 <TH>Compute Time <TD>0.00234898<TD>0.00207079<TD>0.00570918<TD>2.5976e-05<TD>0.00302563<TD>0.00298036<TD>0.00144525<TD style=\"background-color:red\">0.000919922<TD>0.00426444\n<TR><TH>Solve Time <TD>0.00103392<TD>0.000211911<TD>0.00105<TD>0.0110432<TD>0.000628287<TD>0.00392089<TD>0.000138303<TD style=\"background-color:red\">6.2446e-05<TD>0.00097564\n<TR><TH>Total Time <TD>0.0033829<TD>0.0022827<TD>0.00675918<TD>0.0110692<TD>0.00365392<TD>0.00690124<TD>0.00158355<TD style=\"background-color:red\">0.000982368<TD>0.00524008\n<TR><TH>Error(Iter) <TD> 1.32953e-16 <TD> 3.08646e-16 <TD> 6.734e-16 <TD> 8.83132e-11 (40)  <TD> 1.51153e-16 (1)  <TD> 6.08556e-16 (8)  <TD> 1.89264e-16 <TD> 1.97477e-16 <TD> 6.68126e-09\n<TR><TH rowspan=\"4\">crashbasis <TD rowspan=\"4\"> 160000 <TD rowspan=\"4\"> 1750416 <TH>Compute Time <TD>3.2019<TD>5.7892<TD>15.7573<TD style=\"background-color:red\">0.00383515<TD>3.1006<TD>3.09921\n<TR><TH>Solve Time <TD>0.261915<TD>0.106225<TD>0.402141<TD style=\"background-color:red\">1.49089<TD>0.24888<TD>0.443673\n<TR><TH>Total Time <TD>3.46381<TD>5.89542<TD>16.1594<TD style=\"background-color:red\">1.49473<TD>3.34948<TD>3.54288\n<TR><TH>Error(Iter) <TD> 1.76348e-16 <TD> 4.58395e-16 <TD> 1.67982e-14 <TD> 8.64144e-11 (61)  <TD> 8.5996e-12 (2)  <TD> 6.04042e-14 (5) \n\n</TABLE>\n*/\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/SparseQuickReference.dox",
    "content": "namespace Eigen {\n/** \\eigenManualPage SparseQuickRefPage Quick reference guide for sparse matrices\n\\eigenAutoToc\n\n<hr>\n\nIn this page, we give a quick summary of the main operations available for sparse matrices in the class SparseMatrix. First, it is recommended to read  the introductory tutorial at \\ref TutorialSparse. The important point to have in mind when working on sparse matrices is how they are stored : \ni.e either row major or column major. The default is column major. Most arithmetic operations on sparse matrices will assert that they have the same storage order. \n\n\\section SparseMatrixInit Sparse Matrix Initialization\n<table class=\"manual\">\n<tr><th> Category </th> <th> Operations</th> <th>Notes</th></tr>\n<tr><td>Constructor</td>\n<td>\n\\code\n  SparseMatrix<double> sm1(1000,1000); \n  SparseMatrix<std::complex<double>,RowMajor> sm2;\n\\endcode\n</td> <td> Default is ColMajor</td> </tr>\n<tr class=\"alt\">\n<td> Resize/Reserve</td>\n<td> \n \\code\n    sm1.resize(m,n);      // Change sm1 to a m x n matrix.\n    sm1.reserve(nnz);     // Allocate room for nnz nonzeros elements.   \n  \\endcode \n</td>\n<td> Note that when calling reserve(), it is not required that nnz is the exact number of nonzero elements in the final matrix. However, an exact estimation will avoid multiple reallocations during the insertion phase. </td>\n</tr>\n<tr> \n<td> Assignment </td>\n<td> \n\\code \n  SparseMatrix<double,Colmajor> sm1;\n // Initialize sm2 with sm1.\n  SparseMatrix<double,Rowmajor> sm2(sm1), sm3;        \n  // Assignment and evaluations modify the storage order.\n  sm3 = sm1; \n \\endcode\n</td>\n<td> The copy constructor can be used to convert from a storage order to another</td>\n</tr>\n<tr class=\"alt\">\n<td> Element-wise Insertion</td>\n<td>\n\\code \n// Insert a new element; \n sm1.insert(i, j) = v_ij;  \n\n// Update the value v_ij\n sm1.coeffRef(i,j) = v_ij;\n sm1.coeffRef(i,j) += v_ij;\n sm1.coeffRef(i,j) -= v_ij;\n\\endcode\n</td>\n<td> insert() assumes that the element does not already exist; otherwise, use coeffRef()</td>\n</tr>\n<tr> \n<td> Batch insertion</td>\n<td>\n\\code\n  std::vector< Eigen::Triplet<double> > tripletList;\n  tripletList.reserve(estimation_of_entries);\n  // -- Fill tripletList with nonzero elements...\n  sm1.setFromTriplets(TripletList.begin(), TripletList.end());\n\\endcode\n</td>\n<td>A complete example is available at \\link TutorialSparseFilling Triplet Insertion \\endlink.</td>\n</tr>\n<tr class=\"alt\"> \n<td> Constant or Random Insertion</td>\n<td>\n\\code\nsm1.setZero();\n\\endcode\n</td>\n<td>Remove all non-zero coefficients</td>\n</tr>\n</table>\n\n\n\\section SparseBasicInfos Matrix properties\nBeyond the basic functions rows() and cols(), there are some useful functions that are available to easily get some information from the matrix. \n<table class=\"manual\">\n<tr>\n  <td> \\code\n  sm1.rows();         // Number of rows\n  sm1.cols();         // Number of columns \n  sm1.nonZeros();     // Number of non zero values   \n  sm1.outerSize();    // Number of columns (resp. rows) for a column major (resp. row major )\n  sm1.innerSize();    // Number of rows (resp. columns) for a row major (resp. column major)\n  sm1.norm();         // Euclidian norm of the matrix\n  sm1.squaredNorm();  // Squared norm of the matrix\n  sm1.blueNorm();\n  sm1.isVector();     // Check if sm1 is a sparse vector or a sparse matrix\n  sm1.isCompressed(); // Check if sm1 is in compressed form\n  ...\n  \\endcode </td>\n</tr>\n</table>\n\n\\section SparseBasicOps Arithmetic operations\nIt is easy to perform arithmetic operations on sparse matrices provided that the dimensions are adequate and that the matrices have the same storage order. Note that the evaluation can always be done in a matrix with a different storage order. In the following, \\b sm denotes a sparse matrix, \\b dm a dense matrix and \\b dv a dense vector.\n<table class=\"manual\">\n<tr><th> Operations </th> <th> Code </th> <th> Notes </th></tr>\n\n<tr>\n  <td> add subtract </td> \n  <td> \\code\n  sm3 = sm1 + sm2; \n  sm3 = sm1 - sm2;\n  sm2 += sm1; \n  sm2 -= sm1; \\endcode\n  </td>\n  <td> \n  sm1 and sm2 should have the same storage order\n  </td> \n</tr>\n\n<tr class=\"alt\"><td>\n  scalar product</td><td>\\code\n  sm3 = sm1 * s1;   sm3 *= s1; \n  sm3 = s1 * sm1 + s2 * sm2; sm3 /= s1;\\endcode\n  </td>\n  <td>\n    Many combinations are possible if the dimensions and the storage order agree.\n</tr>\n\n<tr>\n  <td> %Sparse %Product </td>\n  <td> \\code\n  sm3 = sm1 * sm2;\n  dm2 = sm1 * dm1;\n  dv2 = sm1 * dv1;\n  \\endcode </td>\n  <td>\n  </td>\n</tr> \n\n<tr class='alt'>\n  <td> transposition, adjoint</td>\n  <td> \\code\n  sm2 = sm1.transpose();\n  sm2 = sm1.adjoint();\n  \\endcode </td>\n  <td>\n  Note that the transposition change the storage order. There is no support for transposeInPlace().\n  </td>\n</tr> \n<tr>\n<td> Permutation </td>\n<td> \n\\code \nperm.indices();      // Reference to the vector of indices\nsm1.twistedBy(perm); // Permute rows and columns\nsm2 = sm1 * perm;    // Permute the columns\nsm2 = perm * sm1;    // Permute the columns\n\\endcode \n</td>\n<td> \n\n</td>\n</tr>\n<tr>\n  <td>\n  Component-wise ops\n  </td>\n  <td>\\code \n  sm1.cwiseProduct(sm2);\n  sm1.cwiseQuotient(sm2);\n  sm1.cwiseMin(sm2);\n  sm1.cwiseMax(sm2);\n  sm1.cwiseAbs();\n  sm1.cwiseSqrt();\n  \\endcode</td>\n  <td>\n  sm1 and sm2 should have the same storage order\n  </td>\n</tr>\n</table>\n\n\\section sparseotherops Other supported operations\n<table class=\"manual\">\n<tr><th style=\"min-width:initial\"> Code </th> <th> Notes</th> </tr>\n<tr><td colspan=\"2\">Sub-matrices</td></tr>\n<tr>\n<td> \n\\code \n  sm1.block(startRow, startCol, rows, cols); \n  sm1.block(startRow, startCol); \n  sm1.topLeftCorner(rows, cols); \n  sm1.topRightCorner(rows, cols);\n  sm1.bottomLeftCorner( rows, cols);\n  sm1.bottomRightCorner( rows, cols);\n  \\endcode\n</td><td>\nContrary to dense matrices, here <strong>all these methods are read-only</strong>.\\n\nSee \\ref TutorialSparse_SubMatrices and below for read-write sub-matrices.\n</td>\n</tr>\n<tr class=\"alt\"><td colspan=\"2\"> Range </td></tr>\n<tr class=\"alt\">\n<td> \n\\code \n  sm1.innerVector(outer);           // RW\n  sm1.innerVectors(start, size);    // RW\n  sm1.leftCols(size);               // RW\n  sm2.rightCols(size);              // RO because sm2 is row-major\n  sm1.middleRows(start, numRows);   // RO because sm1 is column-major\n  sm1.middleCols(start, numCols);   // RW\n  sm1.col(j);                       // RW\n\\endcode\n</td>\n<td>\nA inner vector is either a row (for row-major) or a column (for column-major).\\n\nAs stated earlier, for a read-write sub-matrix (RW), the evaluation can be done in a matrix with different storage order.\n</td>\n</tr>\n<tr><td colspan=\"2\"> Triangular and selfadjoint views</td></tr>\n<tr>\n<td> \n\\code\n  sm2 = sm1.triangularview<Lower>();\n  sm2 = sm1.selfadjointview<Lower>();\n\\endcode\n</td>\n<td> Several combination between triangular views and blocks views are possible\n\\code \n  \\endcode </td>\n</tr>\n<tr class=\"alt\"><td colspan=\"2\">Triangular solve </td></tr>\n<tr class=\"alt\">\n<td> \n\\code \n dv2 = sm1.triangularView<Upper>().solve(dv1);\n dv2 = sm1.topLeftCorner(size, size)\n          .triangularView<Lower>().solve(dv1);\n\\endcode \n</td>\n<td> For general sparse solve, Use any suitable module described at \\ref TopicSparseSystems </td>\n</tr>\n<tr><td colspan=\"2\"> Low-level API</td></tr>\n<tr>\n<td>\n\\code\nsm1.valuePtr();      // Pointer to the values\nsm1.innerIndextr();  // Pointer to the indices.\nsm1.outerIndexPtr(); // Pointer to the beginning of each inner vector\n\\endcode\n</td>\n<td>\nIf the matrix is not in compressed form, makeCompressed() should be called before.\\n\nNote that these functions are mostly provided for interoperability purposes with external libraries.\\n\nA better access to the values of the matrix is done by using the InnerIterator class as described in \\link TutorialSparse the Tutorial Sparse \\endlink section</td>\n</tr>\n<tr class=\"alt\"><td colspan=\"2\">Mapping external buffers</td></tr>\n<tr class=\"alt\">\n<td>\n\\code\nint outerIndexPtr[cols+1];\nint innerIndices[nnz];\ndouble values[nnz];\nMap<SparseMatrix<double> > sm1(rows,cols,nnz,outerIndexPtr, // read-write\n                               innerIndices,values);\nMap<const SparseMatrix<double> > sm2(...);                  // read-only\n\\endcode\n</td>\n<td>As for dense matrices, class Map<SparseMatrixType> can be used to see external buffers as an %Eigen's SparseMatrix object. </td>\n</tr>\n</table>\n*/\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/StlContainers.dox",
    "content": "namespace Eigen {\n\n/** \\eigenManualPage TopicStlContainers Using STL Containers with Eigen\n\n\\eigenAutoToc\n\n\\section StlContainers_summary Executive summary\n\nIf you're compiling in \\cpp17 mode only with a sufficiently recent compiler (e.g., GCC>=7, clang>=5, MSVC>=19.12), then everything is taken care by the compiler and you can stop reading.\n\nOtherwise, using STL containers on \\ref TopicFixedSizeVectorizable \"fixed-size vectorizable Eigen types\", or classes having members of such types, requires the use of an over-aligned allocator.\nThat is, an allocator capable of allocating buffers with 16, 32, or even 64 bytes alignment.\n%Eigen does provide one ready for use: aligned_allocator.\n\nPrior to \\cpp11, if you want to use the `std::vector` container, then you also have to <code> \\#include <Eigen/StdVector> </code>.\n\nThese issues arise only with \\ref TopicFixedSizeVectorizable \"fixed-size vectorizable Eigen types\" and \\ref TopicStructHavingEigenMembers \"structures having such Eigen objects as member\".\nFor other %Eigen types, such as Vector3f or MatrixXd, no special care is needed when using STL containers.\n\n\\section allocator Using an aligned allocator\n\nSTL containers take an optional template parameter, the allocator type. When using STL containers on \\ref TopicFixedSizeVectorizable \"fixed-size vectorizable Eigen types\", you need tell the container to use an allocator that will always allocate memory at 16-byte-aligned (or more) locations. Fortunately, %Eigen does provide such an allocator: Eigen::aligned_allocator.\n\nFor example, instead of\n\\code\nstd::map<int, Eigen::Vector4d>\n\\endcode\nyou need to use\n\\code\nstd::map<int, Eigen::Vector4d, std::less<int>, \n         Eigen::aligned_allocator<std::pair<const int, Eigen::Vector4d> > >\n\\endcode\nNote that the third parameter `std::less<int>` is just the default value, but we have to include it because we want to specify the fourth parameter, which is the allocator type.\n\n\\section StlContainers_vector The case of std::vector\n\nThis section is for c++98/03 users only. \\cpp11 (or above) users can stop reading here.\n\nSo in c++98/03, the situation with `std::vector` is more complicated because of a bug in the standard (explanation below).\nTo workaround the issue, we had to specialize it for the Eigen::aligned_allocator type.\nIn practice you \\b must use the Eigen::aligned_allocator (not another aligned allocator), \\b and \\#include <Eigen/StdVector>.\n\nHere is an example:\n\\code\n#include<Eigen/StdVector>\n/* ... */\nstd::vector<Eigen::Vector4f,Eigen::aligned_allocator<Eigen::Vector4f> >\n\\endcode\n\n<span class=\"note\">\\b Explanation: The `resize()` method of `std::vector` takes a `value_type` argument (defaulting to `value_type()`). So with `std::vector<Eigen::Vector4d>`, some Eigen::Vector4d objects will be passed by value, which discards any alignment modifiers, so a Eigen::Vector4d can be created at an unaligned location.\nIn order to avoid that, the only solution we saw was to specialize `std::vector` to make it work on a slight modification of, here, Eigen::Vector4d, that is able to deal properly with this situation.\n</span>\n\n\\subsection vector_spec An alternative - specializing std::vector for Eigen types\n\nAs an alternative to the recommended approach described above, you have the option to specialize std::vector for Eigen types requiring alignment. \nThe advantage is that you won't need to declare std::vector all over with Eigen::aligned_allocator. One drawback on the other hand side is that\nthe specialization needs to be defined before all code pieces in which e.g. `std::vector<Vector2d>` is used. Otherwise, without knowing the specialization\nthe compiler will compile that particular instance with the default `std::allocator` and you program is most likely to crash.\n\nHere is an example:\n\\code\n#include<Eigen/StdVector>\n/* ... */\nEIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(Matrix2d)\nstd::vector<Eigen::Vector2d>\n\\endcode\n\n\n\n*/\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/StorageOrders.dox",
    "content": "namespace Eigen {\n\n/** \\eigenManualPage TopicStorageOrders Storage orders\n\nThere are two different storage orders for matrices and two-dimensional arrays: column-major and row-major.\nThis page explains these storage orders and how to specify which one should be used.\n\n\\eigenAutoToc\n\n\n\\section TopicStorageOrdersIntro Column-major and row-major storage\n\nThe entries of a matrix form a two-dimensional grid. However, when the matrix is stored in memory, the entries\nhave to somehow be laid out linearly. There are two main ways to do this, by row and by column.\n\nWe say that a matrix is stored in \\b row-major order if it is stored row by row. The entire first row is\nstored first, followed by the entire second row, and so on. Consider for example the matrix\n\n\\f[\nA = \\begin{bmatrix}\n8 & 2 & 2 & 9 \\\\\n9 & 1 & 4 & 4 \\\\\n3 & 5 & 4 & 5\n\\end{bmatrix}.\n\\f]\n\nIf this matrix is stored in row-major order, then the entries are laid out in memory as follows:\n\n\\code 8 2 2 9 9 1 4 4 3 5 4 5 \\endcode\n\nOn the other hand, a matrix is stored in \\b column-major order if it is stored column by column, starting with\nthe entire first column, followed by the entire second column, and so on. If the above matrix is stored in\ncolumn-major order, it is laid out as follows:\n\n\\code 8 9 3 2 1 5 2 4 4 9 4 5 \\endcode\n\nThis example is illustrated by the following Eigen code. It uses the PlainObjectBase::data() function, which\nreturns a pointer to the memory location of the first entry of the matrix.\n\n<table class=\"example\">\n<tr><th>Example</th><th>Output</th></tr>\n<tr><td>\n\\include TopicStorageOrders_example.cpp\n</td>\n<td>\n\\verbinclude TopicStorageOrders_example.out\n</td></tr></table>\n\n\n\\section TopicStorageOrdersInEigen Storage orders in Eigen\n\nThe storage order of a matrix or a two-dimensional array can be set by specifying the \\c Options template\nparameter for Matrix or Array. As \\ref TutorialMatrixClass explains, the %Matrix class template has six\ntemplate parameters, of which three are compulsory (\\c Scalar, \\c RowsAtCompileTime and \\c ColsAtCompileTime)\nand three are optional (\\c Options, \\c MaxRowsAtCompileTime and \\c MaxColsAtCompileTime). If the \\c Options\nparameter is set to \\c RowMajor, then the matrix or array is stored in row-major order; if it is set to \n\\c ColMajor, then it is stored in column-major order. This mechanism is used in the above Eigen program to\nspecify the storage order.\n\nIf the storage order is not specified, then Eigen defaults to storing the entry in column-major. This is also\nthe case if one of the convenience typedefs (\\c Matrix3f, \\c ArrayXXd, etc.) is used.\n\nMatrices and arrays using one storage order can be assigned to matrices and arrays using the other storage\norder, as happens in the above program when \\c Arowmajor is initialized using \\c Acolmajor. Eigen will reorder\nthe entries automatically. More generally, row-major and column-major matrices can be mixed in an expression\nas we want.\n\n\n\\section TopicStorageOrdersWhich Which storage order to choose?\n\nSo, which storage order should you use in your program? There is no simple answer to this question; it depends\non your application. Here are some points to keep in mind:\n\n  - Your users may expect you to use a specific storage order. Alternatively, you may use other libraries than\n    Eigen, and these other libraries may expect a certain storage order. In these cases it may be easiest and\n    fastest to use this storage order in your whole program.\n  - Algorithms that traverse a matrix row by row will go faster when the matrix is stored in row-major order\n    because of better data locality. Similarly, column-by-column traversal is faster for column-major\n    matrices. It may be worthwhile to experiment a bit to find out what is faster for your particular\n    application.\n  - The default in Eigen is column-major. Naturally, most of the development and testing of the Eigen library\n    is thus done with column-major matrices. This means that, even though we aim to support column-major and\n    row-major storage orders transparently, the Eigen library may well work best with column-major matrices.\n\n*/\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/StructHavingEigenMembers.dox",
    "content": "namespace Eigen {\n\n/** \\eigenManualPage TopicStructHavingEigenMembers Structures Having Eigen Members\n\n\\eigenAutoToc\n\n\\section StructHavingEigenMembers_summary Executive Summary\n\n\nIf you define a structure having members of \\ref TopicFixedSizeVectorizable \"fixed-size vectorizable Eigen types\", you must ensure that calling operator new on it allocates properly aligned buffers.\nIf you're compiling in \\cpp17 mode only with a sufficiently recent compiler (e.g., GCC>=7, clang>=5, MSVC>=19.12), then everything is taken care by the compiler and you can stop reading.\n\nOtherwise, you have to overload its `operator new` so that it generates properly aligned pointers (e.g., 32-bytes-aligned for Vector4d and AVX).\nFortunately, %Eigen provides you with a macro `EIGEN_MAKE_ALIGNED_OPERATOR_NEW` that does that for you.\n\n\\section StructHavingEigenMembers_what What kind of code needs to be changed?\n\nThe kind of code that needs to be changed is this:\n\n\\code\nclass Foo\n{\n  ...\n  Eigen::Vector2d v;\n  ...\n};\n\n...\n\nFoo *foo = new Foo;\n\\endcode\n\nIn other words: you have a class that has as a member a \\ref TopicFixedSizeVectorizable \"fixed-size vectorizable Eigen object\", and then you dynamically create an object of that class.\n\n\\section StructHavingEigenMembers_how How should such code be modified?\n\nVery easy, you just need to put a `EIGEN_MAKE_ALIGNED_OPERATOR_NEW` macro in a public part of your class, like this:\n\n\\code\nclass Foo\n{\n  ...\n  Eigen::Vector4d v;\n  ...\npublic:\n  EIGEN_MAKE_ALIGNED_OPERATOR_NEW\n};\n\n...\n\nFoo *foo = new Foo;\n\\endcode\n\nThis macro makes `new Foo` always return an aligned pointer.\n\nIn \\cpp17, this macro is empty.\n\nIf this approach is too intrusive, see also the \\ref StructHavingEigenMembers_othersolutions \"other solutions\".\n\n\\section StructHavingEigenMembers_why Why is this needed?\n\nOK let's say that your code looks like this:\n\n\\code\nclass Foo\n{\n  ...\n  Eigen::Vector4d v;\n  ...\n};\n\n...\n\nFoo *foo = new Foo;\n\\endcode\n\nA Eigen::Vector4d consists of 4 doubles, which is 256 bits.\nThis is exactly the size of an AVX register, which makes it possible to use AVX for all sorts of operations on this vector.\nBut AVX instructions (at least the ones that %Eigen uses, which are the fast ones) require 256-bit alignment.\nOtherwise you get a segmentation fault.\n\nFor this reason, %Eigen takes care by itself to require 256-bit alignment for Eigen::Vector4d, by doing two things:\n\\li %Eigen requires 256-bit alignment for the Eigen::Vector4d's array (of 4 doubles). With \\cpp11 this is done with the <a href=\"https://en.cppreference.com/w/cpp/keyword/alignas\">alignas</a> keyword, or compiler's extensions for c++98/03.\n\\li %Eigen overloads the `operator new` of Eigen::Vector4d so it will always return 256-bit aligned pointers. (removed in \\cpp17)\n\nThus, normally, you don't have to worry about anything, %Eigen handles alignment of operator new for you...\n\n... except in one case. When you have a `class Foo` like above, and you dynamically allocate a new `Foo` as above, then, since `Foo` doesn't have aligned `operator new`, the returned pointer foo is not necessarily 256-bit aligned.\n\nThe alignment attribute of the member `v` is then relative to the start of the class `Foo`. If the `foo` pointer wasn't aligned, then `foo->v` won't be aligned either!\n\nThe solution is to let `class Foo` have an aligned `operator new`, as we showed in the previous section.\n\nThis explanation also holds for SSE/NEON/MSA/Altivec/VSX targets, which require 16-bytes alignment, and AVX512 which requires 64-bytes alignment for fixed-size objects multiple of 64 bytes (e.g., Eigen::Matrix4d).\n\n\\section StructHavingEigenMembers_movetotop Should I then put all the members of Eigen types at the beginning of my class?\n\nThat's not required. Since %Eigen takes care of declaring adequate alignment, all members that need it are automatically aligned relatively to the class. So code like this works fine:\n\n\\code\nclass Foo\n{\n  double x;\n  Eigen::Vector4d v;\npublic:\n  EIGEN_MAKE_ALIGNED_OPERATOR_NEW\n};\n\\endcode\n\nThat said, as usual, it is recommended to sort the members so that alignment does not waste memory.\nIn the above example, with AVX, the compiler will have to reserve 24 empty bytes between `x` and `v`.\n\n\n\\section StructHavingEigenMembers_dynamicsize What about dynamic-size matrices and vectors?\n\nDynamic-size matrices and vectors, such as Eigen::VectorXd, allocate dynamically their own array of coefficients, so they take care of requiring absolute alignment automatically. So they don't cause this issue. The issue discussed here is only with \\ref TopicFixedSizeVectorizable  \"fixed-size vectorizable matrices and vectors\".\n\n\n\\section StructHavingEigenMembers_bugineigen So is this a bug in Eigen?\n\nNo, it's not our bug. It's more like an inherent problem of the c++ language specification that has been solved in c++17 through the feature known as <a href=\"http://wg21.link/p0035r4\">dynamic memory allocation for over-aligned data</a>.\n\n\n\\section StructHavingEigenMembers_conditional What if I want to do this conditionally (depending on template parameters) ?\n\nFor this situation, we offer the macro `EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign)`.\nIt will generate aligned operators like `EIGEN_MAKE_ALIGNED_OPERATOR_NEW` if `NeedsToAlign` is true.\nIt will generate operators with the default alignment if `NeedsToAlign` is false.\nIn \\cpp17, this macro is empty.\n\nExample:\n\n\\code\ntemplate<int n> class Foo\n{\n  typedef Eigen::Matrix<float,n,1> Vector;\n  enum { NeedsToAlign = (sizeof(Vector)%16)==0 };\n  ...\n  Vector v;\n  ...\npublic:\n  EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign)\n};\n\n...\n\nFoo<4> *foo4 = new Foo<4>; // foo4 is guaranteed to be 128bit-aligned\nFoo<3> *foo3 = new Foo<3>; // foo3 has only the system default alignment guarantee\n\\endcode\n\n\n\\section StructHavingEigenMembers_othersolutions Other solutions\n\nIn case putting the `EIGEN_MAKE_ALIGNED_OPERATOR_NEW` macro everywhere is too intrusive, there exists at least two other solutions.\n\n\\subsection othersolutions1 Disabling alignment\n\nThe first is to disable alignment requirement for the fixed size members:\n\\code\nclass Foo\n{\n  ...\n  Eigen::Matrix<double,4,1,Eigen::DontAlign> v;\n  ...\n};\n\\endcode\nThis `v` is fully compatible with aligned Eigen::Vector4d.\nThis has only for effect to make load/stores to `v` more expensive (usually slightly, but that's hardware dependent).\n\n\n\\subsection othersolutions2 Private structure\n\nThe second consist in storing the fixed-size objects into a private struct which will be dynamically allocated at the construction time of the main object:\n\n\\code\nstruct Foo_d\n{\n  EIGEN_MAKE_ALIGNED_OPERATOR_NEW\n  Vector4d v;\n  ...\n};\n\n\nstruct Foo {\n  Foo() { init_d(); }\n  ~Foo() { delete d; }\n  void bar()\n  {\n    // use d->v instead of v\n    ...\n  }\nprivate:\n  void init_d() { d = new Foo_d; }\n  Foo_d* d;\n};\n\\endcode\n\nThe clear advantage here is that the class `Foo` remains unchanged regarding alignment issues.\nThe drawback is that an additional heap allocation will be required whatsoever.\n\n*/\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/TemplateKeyword.dox",
    "content": "namespace Eigen {\n\n/** \\page TopicTemplateKeyword The template and typename keywords in C++\n\nThere are two uses for the \\c template and \\c typename keywords in C++. One of them is fairly well known\namongst programmers: to define templates. The other use is more obscure: to specify that an expression refers\nto a template function or a type. This regularly trips up programmers that use the %Eigen library, often\nleading to error messages from the compiler that are difficult to understand, such as \"expected expression\" or\n\"no match for operator<\".\n\n\\eigenAutoToc\n\n\n\\section TopicTemplateKeywordToDefineTemplates Using the template and typename keywords to define templates\n\nThe \\c template and \\c typename keywords are routinely used to define templates. This is not the topic of this\npage as we assume that the reader is aware of this (otherwise consult a C++ book). The following example\nshould illustrate this use of the \\c template keyword.\n\n\\code\ntemplate <typename T>\nbool isPositive(T x)\n{\n    return x > 0;\n}\n\\endcode\n\nWe could just as well have written <tt>template &lt;class T&gt;</tt>; the keywords \\c typename and \\c class have the\nsame meaning in this context.\n\n\n\\section TopicTemplateKeywordExample An example showing the second use of the template keyword\n\nLet us illustrate the second use of the \\c template keyword with an example. Suppose we want to write a\nfunction which copies all entries in the upper triangular part of a matrix into another matrix, while keeping\nthe lower triangular part unchanged. A straightforward implementation would be as follows:\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include TemplateKeyword_simple.cpp\n</td>\n<td>\n\\verbinclude TemplateKeyword_simple.out\n</td></tr></table>\n\nThat works fine, but it is not very flexible. First, it only works with dynamic-size matrices of\nsingle-precision floats; the function \\c copyUpperTriangularPart() does not accept static-size matrices or\nmatrices with double-precision numbers. Second, if you use an expression such as\n<tt>mat.topLeftCorner(3,3)</tt> as the parameter \\c src, then this is copied into a temporary variable of type\nMatrixXf; this copy can be avoided.\n\nAs explained in \\ref TopicFunctionTakingEigenTypes, both issues can be resolved by making \n\\c copyUpperTriangularPart() accept any object of type MatrixBase. This leads to the following code:\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include TemplateKeyword_flexible.cpp\n</td>\n<td>\n\\verbinclude TemplateKeyword_flexible.out\n</td></tr></table>\n\nThe one line in the body of the function \\c copyUpperTriangularPart() shows the second, more obscure use of\nthe \\c template keyword in C++.  Even though it may look strange, the \\c template keywords are necessary\naccording to the standard. Without it, the compiler may reject the code with an error message like \"no match\nfor operator<\".\n\n\n\\section TopicTemplateKeywordExplanation Explanation\n\nThe reason that the \\c template keyword is necessary in the last example has to do with the rules for how\ntemplates are supposed to be compiled in C++. The compiler has to check the code for correct syntax at the\npoint where the template is defined, without knowing the actual value of the template arguments (\\c Derived1\nand \\c Derived2 in the example). That means that the compiler cannot know that <tt>dst.triangularView</tt> is\na member template and that the following &lt; symbol is part of the delimiter for the template\nparameter. Another possibility would be that <tt>dst.triangularView</tt> is a member variable with the &lt;\nsymbol referring to the <tt>operator&lt;()</tt> function. In fact, the compiler should choose the second\npossibility, according to the standard. If <tt>dst.triangularView</tt> is a member template (as in our case),\nthe programmer should specify this explicitly with the \\c template keyword and write <tt>dst.template\ntriangularView</tt>.\n\nThe precise rules are rather complicated, but ignoring some subtleties we can summarize them as follows:\n- A <em>dependent name</em> is name that depends (directly or indirectly) on a template parameter. In the\n  example, \\c dst is a dependent name because it is of type <tt>MatrixBase&lt;Derived1&gt;</tt> which depends\n  on the template parameter \\c Derived1.\n- If the code contains either one of the constructs <tt>xxx.yyy</tt> or <tt>xxx-&gt;yyy</tt> and \\c xxx is a\n  dependent name and \\c yyy refers to a member template, then the \\c template keyword must be used before \n  \\c yyy, leading to <tt>xxx.template yyy</tt> or <tt>xxx-&gt;template yyy</tt>.\n- If the code contains the construct <tt>xxx::yyy</tt> and \\c xxx is a dependent name and \\c yyy refers to a\n  member typedef, then the \\c typename keyword must be used before the whole construct, leading to\n  <tt>typename xxx::yyy</tt>.\n\nAs an example where the \\c typename keyword is required, consider the following code in \\ref TutorialSparse\nfor iterating over the non-zero entries of a sparse matrix type:\n\n\\code\nSparseMatrixType mat(rows,cols);\nfor (int k=0; k<mat.outerSize(); ++k)\n  for (SparseMatrixType::InnerIterator it(mat,k); it; ++it)\n  {\n    /* ... */\n  }\n\\endcode\n\nIf \\c SparseMatrixType depends on a template parameter, then the \\c typename keyword is required:\n\n\\code\ntemplate <typename T>\nvoid iterateOverSparseMatrix(const SparseMatrix<T>& mat;\n{\n  for (int k=0; k<m1.outerSize(); ++k)\n    for (typename SparseMatrix<T>::InnerIterator it(mat,k); it; ++it)\n    {\n      /* ... */\n    }\n}\n\\endcode\n\n\n\\section TopicTemplateKeywordResources Resources for further reading\n\nFor more information and a fuller explanation of this topic, the reader may consult the following sources:\n- The book \"C++ Template Metaprogramming\" by David Abrahams and Aleksey Gurtovoy contains a very good\n  explanation in Appendix B (\"The typename and template Keywords\") which formed the basis for this page.\n- http://pages.cs.wisc.edu/~driscoll/typename.html\n- http://www.parashift.com/c++-faq-lite/templates.html#faq-35.18\n- http://www.comeaucomputing.com/techtalk/templates/#templateprefix\n- http://www.comeaucomputing.com/techtalk/templates/#typename\n\n*/\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/TopicAliasing.dox",
    "content": "namespace Eigen {\n\n/** \\eigenManualPage TopicAliasing Aliasing\n\nIn %Eigen, aliasing refers to assignment statement in which the same matrix (or array or vector) appears on the\nleft and on the right of the assignment operators. Statements like <tt>mat = 2 * mat;</tt> or <tt>mat =\nmat.transpose();</tt> exhibit aliasing. The aliasing in the first example is harmless, but the aliasing in the\nsecond example leads to unexpected results. This page explains what aliasing is, when it is harmful, and what\nto do about it.\n\n\\eigenAutoToc\n\n\n\\section TopicAliasingExamples Examples\n\nHere is a simple example exhibiting aliasing:\n\n<table class=\"example\">\n<tr><th>Example</th><th>Output</th></tr>\n<tr><td>\n\\include TopicAliasing_block.cpp\n</td>\n<td>\n\\verbinclude TopicAliasing_block.out\n</td></tr></table>\n\nThe output is not what one would expect. The problem is the assignment\n\\code\nmat.bottomRightCorner(2,2) = mat.topLeftCorner(2,2);\n\\endcode\nThis assignment exhibits aliasing: the coefficient \\c mat(1,1) appears both in the block\n<tt>mat.bottomRightCorner(2,2)</tt> on the left-hand side of the assignment and the block\n<tt>mat.topLeftCorner(2,2)</tt> on the right-hand side. After the assignment, the (2,2) entry in the bottom\nright corner should have the value of \\c mat(1,1) before the assignment, which is 5. However, the output shows\nthat \\c mat(2,2) is actually 1. The problem is that %Eigen uses lazy evaluation (see \n\\ref TopicEigenExpressionTemplates) for <tt>mat.topLeftCorner(2,2)</tt>. The result is similar to\n\\code\nmat(1,1) = mat(0,0);\nmat(1,2) = mat(0,1);\nmat(2,1) = mat(1,0);\nmat(2,2) = mat(1,1);\n\\endcode\nThus, \\c mat(2,2) is assigned the \\e new value of \\c mat(1,1) instead of the old value. The next section\nexplains how to solve this problem by calling \\link DenseBase::eval() eval()\\endlink.\n\nAliasing occurs more naturally when trying to shrink a matrix. For example, the expressions <tt>vec =\nvec.head(n)</tt> and <tt>mat = mat.block(i,j,r,c)</tt> exhibit aliasing.\n\nIn general, aliasing cannot be detected at compile time: if \\c mat in the first example were a bit bigger,\nthen the blocks would not overlap, and there would be no aliasing problem. However, %Eigen does detect some\ninstances of aliasing, albeit at run time.  The following example exhibiting aliasing was mentioned in \\ref\nTutorialMatrixArithmetic :\n\n<table class=\"example\">\n<tr><th>Example</th><th>Output</th></tr>\n<tr><td>\n\\include tut_arithmetic_transpose_aliasing.cpp\n</td>\n<td>\n\\verbinclude tut_arithmetic_transpose_aliasing.out\n</td></tr></table>\n\nAgain, the output shows the aliasing issue. However, by default %Eigen uses a run-time assertion to detect this\nand exits with a message like\n\n\\verbatim\nvoid Eigen::DenseBase<Derived>::checkTransposeAliasing(const OtherDerived&) const \n[with OtherDerived = Eigen::Transpose<Eigen::Matrix<int, 2, 2, 0, 2, 2> >, Derived = Eigen::Matrix<int, 2, 2, 0, 2, 2>]: \nAssertion `(!internal::check_transpose_aliasing_selector<Scalar,internal::blas_traits<Derived>::IsTransposed,OtherDerived>::run(internal::extract_data(derived()), other)) \n&& \"aliasing detected during transposition, use transposeInPlace() or evaluate the rhs into a temporary using .eval()\"' failed.\n\\endverbatim\n\nThe user can turn %Eigen's run-time assertions like the one to detect this aliasing problem off by defining the\nEIGEN_NO_DEBUG macro, and the above program was compiled with this macro turned off in order to illustrate the\naliasing problem. See \\ref TopicAssertions for more information about %Eigen's run-time assertions.\n\n\n\\section TopicAliasingSolution Resolving aliasing issues\n\nIf you understand the cause of the aliasing issue, then it is obvious what must happen to solve it: %Eigen has\nto evaluate the right-hand side fully into a temporary matrix/array and then assign it to the left-hand\nside. The function \\link DenseBase::eval() eval() \\endlink does precisely that.\n\nFor example, here is the corrected version of the first example above:\n\n<table class=\"example\">\n<tr><th>Example</th><th>Output</th></tr>\n<tr><td>\n\\include TopicAliasing_block_correct.cpp\n</td>\n<td>\n\\verbinclude TopicAliasing_block_correct.out\n</td></tr></table>\n\nNow, \\c mat(2,2) equals 5 after the assignment, as it should be.\n\nThe same solution also works for the second example, with the transpose: simply replace the line \n<tt>a = a.transpose();</tt> with <tt>a = a.transpose().eval();</tt>. However, in this common case there is a\nbetter solution. %Eigen provides the special-purpose function \n\\link DenseBase::transposeInPlace() transposeInPlace() \\endlink which replaces a matrix by its transpose. \nThis is shown below:\n\n<table class=\"example\">\n<tr><th>Example</th><th>Output</th></tr>\n<tr><td>\n\\include tut_arithmetic_transpose_inplace.cpp\n</td>\n<td>\n\\verbinclude tut_arithmetic_transpose_inplace.out\n</td></tr></table>\n\nIf an xxxInPlace() function is available, then it is best to use it, because it indicates more clearly what you\nare doing. This may also allow %Eigen to optimize more aggressively. These are some of the xxxInPlace()\nfunctions provided: \n\n<table class=\"manual\">\n<tr><th>Original function</th><th>In-place function</th></tr>\n<tr> <td> MatrixBase::adjoint() </td> <td> MatrixBase::adjointInPlace() </td> </tr>\n<tr class=\"alt\"> <td> DenseBase::reverse() </td> <td> DenseBase::reverseInPlace() </td> </tr>\n<tr> <td> LDLT::solve() </td> <td> LDLT::solveInPlace() </td> </tr>\n<tr class=\"alt\"> <td> LLT::solve() </td> <td> LLT::solveInPlace() </td> </tr>\n<tr> <td> TriangularView::solve() </td> <td> TriangularView::solveInPlace() </td> </tr>\n<tr class=\"alt\"> <td> DenseBase::transpose() </td> <td> DenseBase::transposeInPlace() </td> </tr>\n</table>\n\nIn the special case where a matrix or vector is shrunk using an expression like <tt>vec = vec.head(n)</tt>,\nyou can use \\link PlainObjectBase::conservativeResize() conservativeResize() \\endlink.\n\n\n\\section TopicAliasingCwise Aliasing and component-wise operations\n\nAs explained above, it may be dangerous if the same matrix or array occurs on both the left-hand side and the\nright-hand side of an assignment operator, and it is then often necessary to evaluate the right-hand side\nexplicitly. However, applying component-wise operations (such as matrix addition, scalar multiplication and\narray multiplication) is safe. \n\nThe following example has only component-wise operations. Thus, there is no need for \\link DenseBase::eval()\neval() \\endlink even though the same matrix appears on both sides of the assignments.\n\n<table class=\"example\">\n<tr><th>Example</th><th>Output</th></tr>\n<tr><td>\n\\include TopicAliasing_cwise.cpp\n</td>\n<td>\n\\verbinclude TopicAliasing_cwise.out\n</td></tr></table>\n\nIn general, an assignment is safe if the (i,j) entry of the expression on the right-hand side depends only on\nthe (i,j) entry of the matrix or array on the left-hand side and not on any other entries. In that case it is\nnot necessary to evaluate the right-hand side explicitly.\n\n\n\\section TopicAliasingMatrixMult Aliasing and matrix multiplication\n\nMatrix multiplication is the only operation in %Eigen that assumes aliasing by default, <strong>under the\ncondition that the destination matrix is not resized</strong>.\nThus, if \\c matA is a \\b squared matrix, then the statement <tt>matA = matA * matA;</tt> is safe.\nAll other operations in %Eigen assume that there are no aliasing problems,\neither because the result is assigned to a different matrix or because it is a component-wise operation.\n\n<table class=\"example\">\n<tr><th>Example</th><th>Output</th></tr>\n<tr><td>\n\\include TopicAliasing_mult1.cpp\n</td>\n<td>\n\\verbinclude TopicAliasing_mult1.out\n</td></tr></table>\n\nHowever, this comes at a price. When executing the expression <tt>matA = matA * matA</tt>, %Eigen evaluates the\nproduct in a temporary matrix which is assigned to \\c matA after the computation. This is fine. But %Eigen does\nthe same when the product is assigned to a different matrix (e.g., <tt>matB = matA * matA</tt>). In that case,\nit is more efficient to evaluate the product directly into \\c matB instead of evaluating it first into a\ntemporary matrix and copying that matrix to \\c matB.\n\nThe user can indicate with the \\link MatrixBase::noalias() noalias()\\endlink function that there is no\naliasing, as follows: <tt>matB.noalias() = matA * matA</tt>. This allows %Eigen to evaluate the matrix product\n<tt>matA * matA</tt> directly into \\c matB.\n\n<table class=\"example\">\n<tr><th>Example</th><th>Output</th></tr>\n<tr><td>\n\\include TopicAliasing_mult2.cpp\n</td>\n<td>\n\\verbinclude TopicAliasing_mult2.out\n</td></tr></table>\n\nOf course, you should not use \\c noalias() when there is in fact aliasing taking place. If you do, then you\nmay get wrong results:\n\n<table class=\"example\">\n<tr><th>Example</th><th>Output</th></tr>\n<tr><td>\n\\include TopicAliasing_mult3.cpp\n</td>\n<td>\n\\verbinclude TopicAliasing_mult3.out\n</td></tr></table>\n\nMoreover, starting in Eigen 3.3, aliasing is \\b not assumed if the destination matrix is resized and the product is not directly assigned to the destination.\nTherefore, the following example is also wrong:\n\n<table class=\"example\">\n<tr><th>Example</th><th>Output</th></tr>\n<tr><td>\n\\include TopicAliasing_mult4.cpp\n</td>\n<td>\n\\verbinclude TopicAliasing_mult4.out\n</td></tr></table>\n\nAs for any aliasing issue, you can resolve it by explicitly evaluating the expression prior to assignment:\n<table class=\"example\">\n<tr><th>Example</th><th>Output</th></tr>\n<tr><td>\n\\include TopicAliasing_mult5.cpp\n</td>\n<td>\n\\verbinclude TopicAliasing_mult5.out\n</td></tr></table>\n\n\\section TopicAliasingSummary Summary\n\nAliasing occurs when the same matrix or array coefficients appear both on the left- and the right-hand side of\nan assignment operator.\n - Aliasing is harmless with coefficient-wise computations; this includes scalar multiplication and matrix or\n   array addition.\n - When you multiply two matrices, %Eigen assumes that aliasing occurs. If you know that there is no aliasing,\n   then you can use \\link MatrixBase::noalias() noalias()\\endlink.\n - In all other situations, %Eigen assumes that there is no aliasing issue and thus gives the wrong result if\n   aliasing does in fact occur. To prevent this, you have to use \\link DenseBase::eval() eval() \\endlink or\n   one of the xxxInPlace() functions.\n\n*/\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/TopicAssertions.dox",
    "content": "namespace Eigen {\n\n/** \\page TopicAssertions Assertions\n\n\\eigenAutoToc\n\n\\section PlainAssert Assertions\n\nThe macro eigen_assert is defined to be \\c eigen_plain_assert by default. We use eigen_plain_assert instead of \\c assert to work around a known bug for GCC <= 4.3. Basically, eigen_plain_assert \\a is \\c assert.\n\n\\subsection RedefineAssert Redefining assertions\n\nBoth eigen_assert and eigen_plain_assert are defined in Macros.h. Defining eigen_assert indirectly gives you a chance to change its behavior. You can redefine this macro if you want to do something else such as throwing an exception, and fall back to its default behavior with eigen_plain_assert. The code below tells Eigen to throw an std::runtime_error:\n\n\\code\n#include <stdexcept>\n#undef eigen_assert\n#define eigen_assert(x) \\\n  if (!(x)) { throw (std::runtime_error(\"Put your message here\")); }\n\\endcode\n\n\\subsection DisableAssert Disabling assertions\n\nAssertions cost run time and can be turned off. You can suppress eigen_assert by defining \\c EIGEN_NO_DEBUG \\b before including Eigen headers. \\c EIGEN_NO_DEBUG is undefined by default unless \\c NDEBUG is defined.\n\n\\section StaticAssert Static assertions\n\nStatic assertions are not standardized until C++11. However, in the Eigen library, there are many conditions can and should be detectedat compile time. For instance, we use static assertions to prevent the code below from compiling.\n\n\\code\nMatrix3d()  + Matrix4d();   // adding matrices of different sizes\nMatrix4cd() * Vector3cd();  // invalid product known at compile time\n\\endcode\n\nStatic assertions are defined in StaticAssert.h. If there is native static_assert, we use it. Otherwise, we have implemented an assertion macro that can show a limited range of messages.\n\nOne can easily come up with static assertions without messages, such as:\n\n\\code\n#define STATIC_ASSERT(x) \\\n  switch(0) { case 0: case x:; }\n\\endcode\n\nHowever, the example above obviously cannot tell why the assertion failed. Therefore, we define a \\c struct in namespace Eigen::internal to handle available messages.\n\n\\code\ntemplate<bool condition>\nstruct static_assertion {};\n\ntemplate<>\nstruct static_assertion<true>\n{\n  enum {\n    YOU_TRIED_CALLING_A_VECTOR_METHOD_ON_A_MATRIX,\n    YOU_MIXED_VECTORS_OF_DIFFERENT_SIZES,\n    // see StaticAssert.h for all enums.\n  };\n};\n\\endcode\n\nAnd then, we define EIGEN_STATIC_ASSERT(CONDITION,MSG) to access Eigen::internal::static_assertion<bool(CONDITION)>::MSG. If the condition evaluates into \\c false, your compiler displays a lot of messages explaining there is no MSG in static_assert<false>. Nevertheless, this is \\a not in what we are interested. As you can see, all members of static_assert<true> are ALL_CAPS_AND_THEY_ARE_SHOUTING.\n\n\\warning\nWhen using this macro, MSG should be a member of static_assertion<true>, or the static assertion \\b always fails.\nCurrently, it can only be used in function scope.\n\n\\subsection DerivedStaticAssert Derived static assertions\n\nThere are other macros derived from EIGEN_STATIC_ASSERT to enhance readability. Their names are self-explanatory.\n\n- \\b EIGEN_STATIC_ASSERT_FIXED_SIZE(TYPE) - passes if \\a TYPE is fixed size.\n- \\b EIGEN_STATIC_ASSERT_DYNAMIC_SIZE(TYPE) - passes if \\a TYPE is dynamic size.\n- \\b EIGEN_STATIC_ASSERT_LVALUE(Derived) - failes if \\a Derived is read-only.\n- \\b EIGEN_STATIC_ASSERT_ARRAYXPR(Derived) - passes if \\a Derived is an array expression.\n- <b>EIGEN_STATIC_ASSERT_SAME_XPR_KIND(Derived1, Derived2)</b> - failes if the two expressions are an array one and a matrix one.\n\nBecause Eigen handles both fixed-size and dynamic-size expressions, some conditions cannot be clearly determined at compile time. We classify them into strict assertions and permissive assertions.\n\n\\subsubsection StrictAssertions Strict assertions\n\nThese assertions fail if the condition <b>may not</b> be met. For example, MatrixXd may not be a vector, so it fails EIGEN_STATIC_ASSERT_VECTOR_ONLY.\n\n- \\b EIGEN_STATIC_ASSERT_VECTOR_ONLY(TYPE) - passes if \\a TYPE must be a vector type.\n- <b>EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(TYPE, SIZE)</b> - passes if \\a TYPE must be a vector of the given size.\n- <b>EIGEN_STATIC_ASSERT_MATRIX_SPECIFIC_SIZE(TYPE, ROWS, COLS)</b> - passes if \\a TYPE must be a matrix with given rows and columns.\n\n\\subsubsection PermissiveAssertions Permissive assertions\n\nThese assertions fail if the condition \\b cannot be met. For example, MatrixXd and Matrix4d may have the same size, so they pass EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE.\n\n- \\b EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(TYPE0,TYPE1) - fails if the two vector expression types must have different sizes.\n- \\b EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(TYPE0,TYPE1) - fails if the two matrix expression types must have different sizes.\n- \\b EIGEN_STATIC_ASSERT_SIZE_1x1(TYPE) - fails if \\a TYPE cannot be an 1x1 expression.\n\nSee StaticAssert.h for details such as what messages they throw.\n\n\\subsection DisableStaticAssert Disabling static assertions\n\nIf \\c EIGEN_NO_STATIC_ASSERT is defined, static assertions turn into <tt>eigen_assert</tt>'s, working like:\n\n\\code\n#define EIGEN_STATIC_ASSERT(CONDITION,MSG) eigen_assert((CONDITION) && #MSG);\n\\endcode\n\nThis saves compile time but consumes more run time. \\c EIGEN_NO_STATIC_ASSERT is undefined by default.\n\n*/\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/TopicCMakeGuide.dox",
    "content": "namespace Eigen {\n\n/**\n\n\\page TopicCMakeGuide Using %Eigen in CMake Projects\n\n%Eigen provides native CMake support which allows the library to be easily\nused in CMake projects.\n\n\\note %CMake 3.0 (or later) is required to enable this functionality.\n\n%Eigen exports a CMake target called `Eigen3::Eigen` which can be imported\nusing the `find_package` CMake command and used by calling\n`target_link_libraries` as in the following example:\n\\code{.cmake}\ncmake_minimum_required (VERSION 3.0)\nproject (myproject)\n\nfind_package (Eigen3 3.3 REQUIRED NO_MODULE)\n\nadd_executable (example example.cpp)\ntarget_link_libraries (example Eigen3::Eigen)\n\\endcode\n\nThe above code snippet must be placed in a file called `CMakeLists.txt` alongside\n`example.cpp`. After running\n\\code{.sh}\n$ cmake path-to-example-directory\n\\endcode\nCMake will produce project files that generate an executable called `example`\nwhich requires at least version 3.3 of %Eigen. Here, `path-to-example-directory`\nis the path to the directory that contains both `CMakeLists.txt` and\n`example.cpp`.\n\nDo not forget to set the <a href=\"https://cmake.org/cmake/help/v3.7/variable/CMAKE_PREFIX_PATH.html\">\\c CMAKE_PREFIX_PATH </a> variable if Eigen is not installed in a default location or if you want to pick a specific version. For instance:\n\\code{.sh}\n$ cmake path-to-example-directory -DCMAKE_PREFIX_PATH=$HOME/mypackages\n\\endcode\nAn alternative is to set the \\c Eigen3_DIR cmake's variable to the respective path containing the \\c Eigen3*.cmake files. For instance:\n\\code{.sh}\n$ cmake path-to-example-directory -DEigen3_DIR=$HOME/mypackages/share/eigen3/cmake/\n\\endcode\n\nIf the `REQUIRED` option is omitted when locating %Eigen using\n`find_package`, one can check whether the package was found as follows:\n\\code{.cmake}\nfind_package (Eigen3 3.3 NO_MODULE)\n\nif (TARGET Eigen3::Eigen)\n  # Use the imported target\nendif (TARGET Eigen3::Eigen)\n\\endcode\n\n*/\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/TopicEigenExpressionTemplates.dox",
    "content": "namespace Eigen {\n\n/** \\page TopicEigenExpressionTemplates Expression templates in Eigen\n\n\nTODO: write this dox page!\n\nIs linked from the tutorial on arithmetic ops.\n\n*/\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/TopicLazyEvaluation.dox",
    "content": "namespace Eigen {\n\n/** \\page TopicLazyEvaluation Lazy Evaluation and Aliasing\n\nExecutive summary: %Eigen has intelligent compile-time mechanisms to enable lazy evaluation and removing temporaries where appropriate.\nIt will handle aliasing automatically in most cases, for example with matrix products. The automatic behavior can be overridden\nmanually by using the MatrixBase::eval() and MatrixBase::noalias() methods.\n\nWhen you write a line of code involving a complex expression such as\n\n\\code mat1 = mat2 + mat3 * (mat4 + mat5);\n\\endcode\n\n%Eigen determines automatically, for each sub-expression, whether to evaluate it into a temporary variable. Indeed, in certain cases it is better to evaluate a sub-expression into a temporary variable, while in other cases it is better to avoid that.\n\nA traditional math library without expression templates always evaluates all sub-expressions into temporaries. So with this code,\n\n\\code vec1 = vec2 + vec3;\n\\endcode\n\na traditional library would evaluate \\c vec2 + vec3 into a temporary \\c vec4 and then copy \\c vec4  into \\c vec1. This is of course inefficient: the arrays are traversed twice, so there are a lot of useless load/store operations.\n\nExpression-templates-based libraries can avoid evaluating sub-expressions into temporaries, which in many cases results in large speed improvements.\nThis is called <i>lazy evaluation</i> as an expression is getting evaluated as late as possible.\nIn %Eigen <b>all expressions are lazy-evaluated</b>.\nMore precisely, an expression starts to be evaluated once it is assigned to a matrix.\nUntil then nothing happens beyond constructing the abstract expression tree.\nIn contrast to most other expression-templates-based libraries, however, <b>%Eigen might choose to evaluate some sub-expressions into temporaries</b>.\nThere are two reasons for that: first, pure lazy evaluation is not always a good choice for performance; second, pure lazy evaluation can be very dangerous, for example with matrix products: doing <tt>mat = mat*mat</tt> gives a wrong result if the matrix product is directly evaluated within the destination matrix, because of the way matrix product works.\n\nFor these reasons, %Eigen has intelligent compile-time mechanisms to determine automatically which sub-expression should be evaluated into a temporary variable.\n\nSo in the basic example,\n\n\\code mat1 = mat2 + mat3;\n\\endcode\n\n%Eigen chooses not to introduce any temporary. Thus the arrays are traversed only once, producing optimized code.\nIf you really want to force immediate evaluation, use \\link MatrixBase::eval() eval()\\endlink:\n\n\\code mat1 = (mat2 + mat3).eval();\n\\endcode\n\nHere is now a more involved example:\n\n\\code mat1 = -mat2 + mat3 + 5 * mat4;\n\\endcode\n\nHere again %Eigen won't introduce any temporary, thus producing a single <b>fused</b> evaluation loop, which is clearly the correct choice.\n\n\\section TopicLazyEvaluationWhichExpr Which sub-expressions are evaluated into temporaries?\n\nThe default evaluation strategy is to fuse the operations in a single loop, and %Eigen will choose it except in a few circumstances.\n\n<b>The first circumstance</b> in which %Eigen chooses to evaluate a sub-expression is when it sees an assignment <tt>a = b;</tt> and the expression \\c b has the evaluate-before-assigning \\link flags flag\\endlink.\nThe most important example of such an expression is the \\link Product matrix product expression\\endlink. For example, when you do\n\n\\code mat = mat * mat;\n\\endcode\n\n%Eigen will evaluate <tt>mat * mat</tt> into a temporary matrix, and then copies it into the original \\c mat.\nThis guarantees a correct result as we saw above that lazy evaluation gives wrong results with matrix products.\nIt also doesn't cost much, as the cost of the matrix product itself is much higher.\nNote that this temporary is introduced at evaluation time only, that is, within operator= in this example.\nThe expression <tt>mat * mat</tt> still return a abstract product type.\n\nWhat if you know that the result does no alias the operand of the product and want to force lazy evaluation? Then use \\link MatrixBase::noalias() .noalias()\\endlink instead. Here is an example:\n\n\\code mat1.noalias() = mat2 * mat2;\n\\endcode\n\nHere, since we know that mat2 is not the same matrix as mat1, we know that lazy evaluation is not dangerous, so we may force lazy evaluation. Concretely, the effect of noalias() here is to bypass the evaluate-before-assigning \\link flags flag\\endlink.\n\n<b>The second circumstance</b> in which %Eigen chooses to evaluate a sub-expression, is when it sees a nested expression such as <tt>a + b</tt> where \\c b is already an expression having the evaluate-before-nesting \\link flags flag\\endlink.\nAgain, the most important example of such an expression is the \\link Product matrix product expression\\endlink.\nFor example, when you do\n\n\\code mat1 = mat2 * mat3 + mat4 * mat5;\n\\endcode\n\nthe products <tt>mat2 * mat3</tt> and <tt>mat4 * mat5</tt> gets evaluated separately into temporary matrices before being summed up in <tt>mat1</tt>.\nIndeed, to be efficient matrix products need to be evaluated within a destination matrix at hand, and not as simple \"dot products\".\nFor small matrices, however, you might want to enforce a \"dot-product\" based lazy evaluation with lazyProduct().\nAgain, it is important to understand that those temporaries are created at evaluation time only, that is in operator =.\nSee TopicPitfalls_auto_keyword for common pitfalls regarding this remark.\n\n<b>The third circumstance</b> in which %Eigen chooses to evaluate a sub-expression, is when its cost model shows that the total cost of an operation is reduced if a sub-expression gets evaluated into a temporary.\nIndeed, in certain cases, an intermediate result is sufficiently costly to compute and is reused sufficiently many times, that is worth \"caching\". Here is an example:\n\n\\code mat1 = mat2 * (mat3 + mat4);\n\\endcode\n\nHere, provided the matrices have at least 2 rows and 2 columns, each coefficient of the expression <tt>mat3 + mat4</tt> is going to be used several times in the matrix product. Instead of computing the sum every time, it is much better to compute it once and store it in a temporary variable. %Eigen understands this and evaluates <tt>mat3 + mat4</tt> into a temporary variable before evaluating the product.\n\n*/\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/TopicLinearAlgebraDecompositions.dox",
    "content": "namespace Eigen {\n\n/** \\eigenManualPage TopicLinearAlgebraDecompositions Catalogue of dense decompositions\n\nThis page presents a catalogue of the dense matrix decompositions offered by Eigen.\nFor an introduction on linear solvers and decompositions, check this \\link TutorialLinearAlgebra page \\endlink.\nTo get an overview of the true relative speed of the different decompositions, check this \\link DenseDecompositionBenchmark benchmark \\endlink.\n\n\\section TopicLinAlgBigTable Catalogue of decompositions offered by Eigen\n\n<table class=\"manual-vl\">\n    <tr>\n        <th class=\"meta\"></th>\n        <th class=\"meta\" colspan=\"5\">Generic information, not Eigen-specific</th>\n        <th class=\"meta\" colspan=\"3\">Eigen-specific</th>\n    </tr>\n\n    <tr>\n        <th>Decomposition</th>\n        <th>Requirements on the matrix</th>\n        <th>Speed</th>\n        <th>Algorithm reliability and accuracy</th>\n        <th>Rank-revealing</th>\n        <th>Allows to compute (besides linear solving)</th>\n        <th>Linear solver provided by Eigen</th>\n        <th>Maturity of Eigen's implementation</th>\n        <th>Optimizations</th>\n    </tr>\n\n    <tr>\n        <td>PartialPivLU</td>\n        <td>Invertible</td>\n        <td>Fast</td>\n        <td>Depends on condition number</td>\n        <td>-</td>\n        <td>-</td>\n        <td>Yes</td>\n        <td>Excellent</td>\n        <td>Blocking, Implicit MT</td>\n    </tr>\n\n    <tr class=\"alt\">\n        <td>FullPivLU</td>\n        <td>-</td>\n        <td>Slow</td>\n        <td>Proven</td>\n        <td>Yes</td>\n        <td>-</td>\n        <td>Yes</td>\n        <td>Excellent</td>\n        <td>-</td>\n    </tr>\n\n    <tr>\n        <td>HouseholderQR</td>\n        <td>-</td>\n        <td>Fast</td>\n        <td>Depends on condition number</td>\n        <td>-</td>\n        <td>Orthogonalization</td>\n        <td>Yes</td>\n        <td>Excellent</td>\n        <td>Blocking</td>\n    </tr>\n\n    <tr class=\"alt\">\n        <td>ColPivHouseholderQR</td>\n        <td>-</td>\n        <td>Fast</td>\n        <td>Good</td>\n        <td>Yes</td>\n        <td>Orthogonalization</td>\n        <td>Yes</td>\n        <td>Excellent</td>\n        <td><em>Soon: blocking</em></td>\n    </tr>\n\n    <tr>\n        <td>FullPivHouseholderQR</td>\n        <td>-</td>\n        <td>Slow</td>\n        <td>Proven</td>\n        <td>Yes</td>\n        <td>Orthogonalization</td>\n        <td>Yes</td>\n        <td>Average</td>\n        <td>-</td>\n    </tr>\n\n    <tr class=\"alt\">\n        <td>LLT</td>\n        <td>Positive definite</td>\n        <td>Very fast</td>\n        <td>Depends on condition number</td>\n        <td>-</td>\n        <td>-</td>\n        <td>Yes</td>\n        <td>Excellent</td>\n        <td>Blocking</td>\n    </tr>\n\n    <tr>\n        <td>LDLT</td>\n        <td>Positive or negative semidefinite<sup><a href=\"#note1\">1</a></sup></td>\n        <td>Very fast</td>\n        <td>Good</td>\n        <td>-</td>\n        <td>-</td>\n        <td>Yes</td>\n        <td>Excellent</td>\n        <td><em>Soon: blocking</em></td>\n    </tr>\n\n    <tr><th class=\"inter\" colspan=\"9\">\\n Singular values and eigenvalues decompositions</th></tr>\n\n    <tr>\n        <td>BDCSVD (divide \\& conquer)</td>\n        <td>-</td>\n        <td>One of the fastest SVD algorithms</td>\n        <td>Excellent</td>\n        <td>Yes</td>\n        <td>Singular values/vectors, least squares</td>\n        <td>Yes (and does least squares)</td>\n        <td>Excellent</td>\n        <td>Blocked bidiagonalization</td>\n    </tr>\n\n    <tr>\n        <td>JacobiSVD (two-sided)</td>\n        <td>-</td>\n        <td>Slow (but fast for small matrices)</td>\n        <td>Proven<sup><a href=\"#note3\">3</a></sup></td>\n        <td>Yes</td>\n        <td>Singular values/vectors, least squares</td>\n        <td>Yes (and does least squares)</td>\n        <td>Excellent</td>\n        <td>R-SVD</td>\n    </tr>\n\n    <tr class=\"alt\">\n        <td>SelfAdjointEigenSolver</td>\n        <td>Self-adjoint</td>\n        <td>Fast-average<sup><a href=\"#note2\">2</a></sup></td>\n        <td>Good</td>\n        <td>Yes</td>\n        <td>Eigenvalues/vectors</td>\n        <td>-</td>\n        <td>Excellent</td>\n        <td><em>Closed forms for 2x2 and 3x3</em></td>\n    </tr>\n\n    <tr>\n        <td>ComplexEigenSolver</td>\n        <td>Square</td>\n        <td>Slow-very slow<sup><a href=\"#note2\">2</a></sup></td>\n        <td>Depends on condition number</td>\n        <td>Yes</td>\n        <td>Eigenvalues/vectors</td>\n        <td>-</td>\n        <td>Average</td>\n        <td>-</td>\n    </tr>\n\n    <tr class=\"alt\">\n        <td>EigenSolver</td>\n        <td>Square and real</td>\n        <td>Average-slow<sup><a href=\"#note2\">2</a></sup></td>\n        <td>Depends on condition number</td>\n        <td>Yes</td>\n        <td>Eigenvalues/vectors</td>\n        <td>-</td>\n        <td>Average</td>\n        <td>-</td>\n    </tr>\n\n    <tr>\n        <td>GeneralizedSelfAdjointEigenSolver</td>\n        <td>Square</td>\n        <td>Fast-average<sup><a href=\"#note2\">2</a></sup></td>\n        <td>Depends on condition number</td>\n        <td>-</td>\n        <td>Generalized eigenvalues/vectors</td>\n        <td>-</td>\n        <td>Good</td>\n        <td>-</td>\n    </tr>\n\n    <tr><th class=\"inter\" colspan=\"9\">\\n Helper decompositions</th></tr>\n\n    <tr>\n        <td>RealSchur</td>\n        <td>Square and real</td>\n        <td>Average-slow<sup><a href=\"#note2\">2</a></sup></td>\n        <td>Depends on condition number</td>\n        <td>Yes</td>\n        <td>-</td>\n        <td>-</td>\n        <td>Average</td>\n        <td>-</td>\n    </tr>\n\n    <tr class=\"alt\">\n        <td>ComplexSchur</td>\n        <td>Square</td>\n        <td>Slow-very slow<sup><a href=\"#note2\">2</a></sup></td>\n        <td>Depends on condition number</td>\n        <td>Yes</td>\n        <td>-</td>\n        <td>-</td>\n        <td>Average</td>\n        <td>-</td>\n    </tr>\n\n    <tr class=\"alt\">\n        <td>Tridiagonalization</td>\n        <td>Self-adjoint</td>\n        <td>Fast</td>\n        <td>Good</td>\n        <td>-</td>\n        <td>-</td>\n        <td>-</td>\n        <td>Good</td>\n        <td><em>Soon: blocking</em></td>\n    </tr>\n\n    <tr>\n        <td>HessenbergDecomposition</td>\n        <td>Square</td>\n        <td>Average</td>\n        <td>Good</td>\n        <td>-</td>\n        <td>-</td>\n        <td>-</td>\n        <td>Good</td>\n        <td><em>Soon: blocking</em></td>\n    </tr>\n\n</table>\n\n\\b Notes:\n<ul>\n<li><a name=\"note1\">\\b 1: </a>There exist two variants of the LDLT algorithm. Eigen's one produces a pure diagonal D matrix, and therefore it cannot handle indefinite matrices, unlike Lapack's one which produces a block diagonal D matrix.</li>\n<li><a name=\"note2\">\\b 2: </a>Eigenvalues, SVD and Schur decompositions rely on iterative algorithms. Their convergence speed depends on how well the eigenvalues are separated.</li>\n<li><a name=\"note3\">\\b 3: </a>Our JacobiSVD is two-sided, making for proven and optimal precision for square matrices. For non-square matrices, we have to use a QR preconditioner first. The default choice, ColPivHouseholderQR, is already very reliable, but if you want it to be proven, use FullPivHouseholderQR instead.\n</ul>\n\n\\section TopicLinAlgTerminology Terminology\n\n<dl>\n  <dt><b>Selfadjoint</b></dt>\n    <dd>For a real matrix, selfadjoint is a synonym for symmetric. For a complex matrix, selfadjoint is a synonym for \\em hermitian.\n        More generally, a matrix \\f$ A \\f$ is selfadjoint if and only if it is equal to its adjoint \\f$ A^* \\f$. The adjoint is also called the \\em conjugate \\em transpose. </dd>\n  <dt><b>Positive/negative definite</b></dt>\n    <dd>A selfadjoint matrix \\f$ A \\f$ is positive definite if \\f$ v^* A v > 0 \\f$ for any non zero vector \\f$ v \\f$.\n        In the same vein, it is negative definite if \\f$ v^* A v < 0 \\f$ for any non zero vector \\f$ v \\f$ </dd>\n  <dt><b>Positive/negative semidefinite</b></dt>\n    <dd>A selfadjoint matrix \\f$ A \\f$ is positive semi-definite if \\f$ v^* A v \\ge 0 \\f$ for any non zero vector \\f$ v \\f$.\n        In the same vein, it is negative semi-definite if \\f$ v^* A v \\le 0 \\f$ for any non zero vector \\f$ v \\f$ </dd>\n\n  <dt><b>Blocking</b></dt>\n    <dd>Means the algorithm can work per block, whence guaranteeing a good scaling of the performance for large matrices.</dd>\n  <dt><b>Implicit Multi Threading (MT)</b></dt>\n    <dd>Means the algorithm can take advantage of multicore processors via OpenMP. \"Implicit\" means the algortihm itself is not parallelized, but that it relies on parallelized matrix-matrix product routines.</dd>\n  <dt><b>Explicit Multi Threading (MT)</b></dt>\n    <dd>Means the algorithm is explicitly parallelized to take advantage of multicore processors via OpenMP.</dd>\n  <dt><b>Meta-unroller</b></dt>\n    <dd>Means the algorithm is automatically and explicitly unrolled for very small fixed size matrices.</dd>\n  <dt><b></b></dt>\n    <dd></dd>\n</dl>\n\n\n*/\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/TopicMultithreading.dox",
    "content": "namespace Eigen {\n\n/** \\page TopicMultiThreading Eigen and multi-threading\n\n\\section TopicMultiThreading_MakingEigenMT Make Eigen run in parallel\n\nSome %Eigen's algorithms can exploit the multiple cores present in your hardware.\nTo this end, it is enough to enable OpenMP on your compiler, for instance:\n - GCC: \\c -fopenmp\n - ICC: \\c -openmp\n - MSVC: check the respective option in the build properties.\n\nYou can control the number of threads that will be used using either the OpenMP API or %Eigen's API using the following priority:\n\\code\n OMP_NUM_THREADS=n ./my_program\n omp_set_num_threads(n);\n Eigen::setNbThreads(n);\n\\endcode\nUnless `setNbThreads` has been called, %Eigen uses the number of threads specified by OpenMP.\nYou can restore this behavior by calling `setNbThreads(0);`.\nYou can query the number of threads that will be used with:\n\\code\nn = Eigen::nbThreads( );\n\\endcode\nYou can disable %Eigen's multi threading at compile time by defining the \\link TopicPreprocessorDirectivesPerformance EIGEN_DONT_PARALLELIZE \\endlink preprocessor token.\n\nCurrently, the following algorithms can make use of multi-threading:\n - general dense matrix - matrix products\n - PartialPivLU\n - row-major-sparse * dense vector/matrix products\n - ConjugateGradient with \\c Lower|Upper as the \\c UpLo template parameter.\n - BiCGSTAB with a row-major sparse matrix format.\n - LeastSquaresConjugateGradient\n\n\\warning On most OS it is <strong>very important</strong> to limit the number of threads to the number of physical cores, otherwise significant slowdowns are expected, especially for operations involving dense matrices.\n\nIndeed, the principle of hyper-threading is to run multiple threads (in most cases 2) on a single core in an interleaved manner.\nHowever, %Eigen's matrix-matrix product kernel is fully optimized and already exploits nearly 100% of the CPU capacity.\nConsequently, there is no room for running multiple such threads on a single core, and the performance would drops significantly because of cache pollution and other sources of overheads.\nAt this stage of reading you're probably wondering why %Eigen does not limit itself to the number of physical cores?\nThis is simply because OpenMP does not allow to know the number of physical cores, and thus %Eigen will launch as many threads as <i>cores</i> reported by OpenMP.\n\n\\section TopicMultiThreading_UsingEigenWithMT Using Eigen in a multi-threaded application\n\nIn the case your own application is multithreaded, and multiple threads make calls to %Eigen, then you have to initialize %Eigen by calling the following routine \\b before creating the threads:\n\\code\n#include <Eigen/Core>\n\nint main(int argc, char** argv)\n{\n  Eigen::initParallel();\n  \n  ...\n}\n\\endcode\n\n\\note With %Eigen 3.3, and a fully C++11 compliant compiler (i.e., <a href=\"http://en.cppreference.com/w/cpp/language/storage_duration#Static_local_variables\">thread-safe static local variable initialization</a>), then calling \\c initParallel() is optional.\n\n\\warning Note that all functions generating random matrices are \\b not re-entrant nor thread-safe. Those include DenseBase::Random(), and DenseBase::setRandom() despite a call to `Eigen::initParallel()`. This is because these functions are based on `std::rand` which is not re-entrant.\nFor thread-safe random generator, we recommend the use of c++11 random generators (\\link DenseBase::NullaryExpr(Index, const CustomNullaryOp&) example \\endlink) or `boost::random`.\n\nIn the case your application is parallelized with OpenMP, you might want to disable %Eigen's own parallelization as detailed in the previous section.\n\n*/\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/TopicResizing.dox",
    "content": "namespace Eigen {\n\n/** \\page TopicResizing Resizing\n\n\nTODO: write this dox page!\n\nIs linked from the tutorial on the Matrix class.\n\n*/\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/TopicScalarTypes.dox",
    "content": "namespace Eigen {\n\n/** \\page TopicScalarTypes Scalar types\n\n\nTODO: write this dox page!\n\nIs linked from the tutorial on the Matrix class.\n\n*/\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/TopicVectorization.dox",
    "content": "namespace Eigen {\n\n/** \\page TopicVectorization Vectorization\n\n\nTODO: write this dox page!\n\n*/\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/TutorialAdvancedInitialization.dox",
    "content": "namespace Eigen {\n\n/** \\eigenManualPage TutorialAdvancedInitialization Advanced initialization\n\nThis page discusses several advanced methods for initializing matrices. It gives more details on the\ncomma-initializer, which was introduced before. It also explains how to get special matrices such as the\nidentity matrix and the zero matrix.\n\n\\eigenAutoToc\n\n\\section TutorialAdvancedInitializationCommaInitializer The comma initializer\n\nEigen offers a comma initializer syntax which allows the user to easily set all the coefficients of a matrix,\nvector or array. Simply list the coefficients, starting at the top-left corner and moving from left to right\nand from the top to the bottom. The size of the object needs to be specified beforehand. If you list too few\nor too many coefficients, Eigen will complain.\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include Tutorial_commainit_01.cpp\n</td>\n<td>\n\\verbinclude Tutorial_commainit_01.out\n</td></tr></table>\n\nMoreover, the elements of the initialization list may themselves be vectors or matrices. A common use is\nto join vectors or matrices together. For example, here is how to join two row vectors together. Remember\nthat you have to set the size before you can use the comma initializer.\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include Tutorial_AdvancedInitialization_Join.cpp\n</td>\n<td>\n\\verbinclude Tutorial_AdvancedInitialization_Join.out\n</td></tr></table>\n\nWe can use the same technique to initialize matrices with a block structure.\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include Tutorial_AdvancedInitialization_Block.cpp\n</td>\n<td>\n\\verbinclude Tutorial_AdvancedInitialization_Block.out\n</td></tr></table>\n\nThe comma initializer can also be used to fill block expressions such as <tt>m.row(i)</tt>. Here is a more\ncomplicated way to get the same result as in the first example above:\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include Tutorial_commainit_01b.cpp\n</td>\n<td>\n\\verbinclude Tutorial_commainit_01b.out\n</td></tr></table>\n\n\n\\section TutorialAdvancedInitializationSpecialMatrices Special matrices and arrays\n\nThe Matrix and Array classes have static methods like \\link DenseBase::Zero() Zero()\\endlink, which can be\nused to initialize all coefficients to zero. There are three variants. The first variant takes no arguments\nand can only be used for fixed-size objects. If you want to initialize a dynamic-size object to zero, you need\nto specify the size. Thus, the second variant requires one argument and can be used for one-dimensional\ndynamic-size objects, while the third variant requires two arguments and can be used for two-dimensional\nobjects. All three variants are illustrated in the following example:\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include Tutorial_AdvancedInitialization_Zero.cpp\n</td>\n<td>\n\\verbinclude Tutorial_AdvancedInitialization_Zero.out\n</td></tr></table>\n\nSimilarly, the static method \\link DenseBase::Constant() Constant\\endlink(value) sets all coefficients to \\c value.\nIf the size of the object needs to be specified, the additional arguments go before the \\c value\nargument, as in <tt>MatrixXd::Constant(rows, cols, value)</tt>. The method \\link DenseBase::Random() Random()\n\\endlink fills the matrix or array with random coefficients. The identity matrix can be obtained by calling\n\\link MatrixBase::Identity() Identity()\\endlink; this method is only available for Matrix, not for Array,\nbecause \"identity matrix\" is a linear algebra concept.  The method\n\\link DenseBase::LinSpaced LinSpaced\\endlink(size, low, high) is only available for vectors and\none-dimensional arrays; it yields a vector of the specified size whose coefficients are equally spaced between\n\\c low and \\c high. The method \\c LinSpaced() is illustrated in the following example, which prints a table\nwith angles in degrees, the corresponding angle in radians, and their sine and cosine.\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include Tutorial_AdvancedInitialization_LinSpaced.cpp\n</td>\n<td>\n\\verbinclude Tutorial_AdvancedInitialization_LinSpaced.out\n</td></tr></table>\n\nThis example shows that objects like the ones returned by LinSpaced() can be assigned to variables (and\nexpressions). Eigen defines utility functions like \\link DenseBase::setZero() setZero()\\endlink, \n\\link MatrixBase::setIdentity() \\endlink and \\link DenseBase::setLinSpaced() \\endlink to do this\nconveniently. The following example contrasts three ways to construct the matrix\n\\f$ J = \\bigl[ \\begin{smallmatrix} O & I \\\\ I & O \\end{smallmatrix} \\bigr] \\f$: using static methods and\nassignment, using static methods and the comma-initializer, or using the setXxx() methods.\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include Tutorial_AdvancedInitialization_ThreeWays.cpp\n</td>\n<td>\n\\verbinclude Tutorial_AdvancedInitialization_ThreeWays.out\n</td></tr></table>\n\nA summary of all pre-defined matrix, vector and array objects can be found in the \\ref QuickRefPage.\n\n\n\\section TutorialAdvancedInitializationTemporaryObjects Usage as temporary objects\n\nAs shown above, static methods as Zero() and Constant() can be used to initialize variables at the time of\ndeclaration or at the right-hand side of an assignment operator. You can think of these methods as returning a\nmatrix or array; in fact, they return so-called \\ref TopicEigenExpressionTemplates \"expression objects\" which\nevaluate to a matrix or array when needed, so that this syntax does not incur any overhead.\n\nThese expressions can also be used as a temporary object. The second example in\nthe \\ref GettingStarted guide, which we reproduce here, already illustrates this.\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include QuickStart_example2_dynamic.cpp\n</td>\n<td>\n\\verbinclude QuickStart_example2_dynamic.out\n</td></tr></table>\n\nThe expression <tt>m + MatrixXf::Constant(3,3,1.2)</tt> constructs the 3-by-3 matrix expression with all its coefficients\nequal to 1.2 plus the corresponding coefficient of \\a m.\n\nThe comma-initializer, too, can also be used to construct temporary objects. The following example constructs a random\nmatrix of size 2-by-3, and then multiplies this matrix on the left with \n\\f$ \\bigl[ \\begin{smallmatrix} 0 & 1 \\\\ 1 & 0 \\end{smallmatrix} \\bigr] \\f$.\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include Tutorial_AdvancedInitialization_CommaTemporary.cpp\n</td>\n<td>\n\\verbinclude Tutorial_AdvancedInitialization_CommaTemporary.out\n</td></tr></table>\n\nThe \\link CommaInitializer::finished() finished() \\endlink method is necessary here to get the actual matrix\nobject once the comma initialization of our temporary submatrix is done.\n\n\n*/\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/TutorialArrayClass.dox",
    "content": "namespace Eigen {\n\n/** \\eigenManualPage TutorialArrayClass The Array class and coefficient-wise operations\n\nThis page aims to provide an overview and explanations on how to use\nEigen's Array class.\n\n\\eigenAutoToc\n  \n\\section TutorialArrayClassIntro What is the Array class?\n\nThe Array class provides general-purpose arrays, as opposed to the Matrix class which\nis intended for linear algebra. Furthermore, the Array class provides an easy way to\nperform coefficient-wise operations, which might not have a linear algebraic meaning,\nsuch as adding a constant to every coefficient in the array or multiplying two arrays coefficient-wise.\n\n\n\\section TutorialArrayClassTypes Array types\nArray is a class template taking the same template parameters as Matrix.\nAs with Matrix, the first three template parameters are mandatory:\n\\code\nArray<typename Scalar, int RowsAtCompileTime, int ColsAtCompileTime>\n\\endcode\nThe last three template parameters are optional. Since this is exactly the same as for Matrix,\nwe won't explain it again here and just refer to \\ref TutorialMatrixClass.\n\nEigen also provides typedefs for some common cases, in a way that is similar to the Matrix typedefs\nbut with some slight differences, as the word \"array\" is used for both 1-dimensional and 2-dimensional arrays.\nWe adopt the convention that typedefs of the form ArrayNt stand for 1-dimensional arrays, where N and t are\nthe size and the scalar type, as in the Matrix typedefs explained on \\ref TutorialMatrixClass \"this page\". For 2-dimensional arrays, we\nuse typedefs of the form ArrayNNt. Some examples are shown in the following table:\n\n<table class=\"manual\">\n  <tr>\n    <th>Type </th>\n    <th>Typedef </th>\n  </tr>\n  <tr>\n    <td> \\code Array<float,Dynamic,1> \\endcode </td>\n    <td> \\code ArrayXf \\endcode </td>\n  </tr>\n  <tr>\n    <td> \\code Array<float,3,1> \\endcode </td>\n    <td> \\code Array3f \\endcode </td>\n  </tr>\n  <tr>\n    <td> \\code Array<double,Dynamic,Dynamic> \\endcode </td>\n    <td> \\code ArrayXXd \\endcode </td>\n  </tr>\n  <tr>\n    <td> \\code Array<double,3,3> \\endcode </td>\n    <td> \\code Array33d \\endcode </td>\n  </tr>\n</table>\n\n\n\\section TutorialArrayClassAccess Accessing values inside an Array\n\nThe parenthesis operator is overloaded to provide write and read access to the coefficients of an array, just as with matrices.\nFurthermore, the \\c << operator can be used to initialize arrays (via the comma initializer) or to print them.\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include Tutorial_ArrayClass_accessors.cpp\n</td>\n<td>\n\\verbinclude Tutorial_ArrayClass_accessors.out\n</td></tr></table>\n\nFor more information about the comma initializer, see \\ref TutorialAdvancedInitialization.\n\n\n\\section TutorialArrayClassAddSub Addition and subtraction\n\nAdding and subtracting two arrays is the same as for matrices.\nThe operation is valid if both arrays have the same size, and the addition or subtraction is done coefficient-wise.\n\nArrays also support expressions of the form <tt>array + scalar</tt> which add a scalar to each coefficient in the array.\nThis provides a functionality that is not directly available for Matrix objects.\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include Tutorial_ArrayClass_addition.cpp\n</td>\n<td>\n\\verbinclude Tutorial_ArrayClass_addition.out\n</td></tr></table>\n\n\n\\section TutorialArrayClassMult Array multiplication\n\nFirst of all, of course you can multiply an array by a scalar, this works in the same way as matrices. Where arrays\nare fundamentally different from matrices, is when you multiply two together. Matrices interpret\nmultiplication as matrix product and arrays interpret multiplication as coefficient-wise product. Thus, two \narrays can be multiplied if and only if they have the same dimensions.\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include Tutorial_ArrayClass_mult.cpp\n</td>\n<td>\n\\verbinclude Tutorial_ArrayClass_mult.out\n</td></tr></table>\n\n\n\\section TutorialArrayClassCwiseOther Other coefficient-wise operations\n\nThe Array class defines other coefficient-wise operations besides the addition, subtraction and multiplication\noperators described above. For example, the \\link ArrayBase::abs() .abs() \\endlink method takes the absolute\nvalue of each coefficient, while \\link ArrayBase::sqrt() .sqrt() \\endlink computes the square root of the\ncoefficients. If you have two arrays of the same size, you can call \\link ArrayBase::min(const Eigen::ArrayBase<OtherDerived>&) const .min(.) \\endlink to\nconstruct the array whose coefficients are the minimum of the corresponding coefficients of the two given\narrays. These operations are illustrated in the following example.\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include Tutorial_ArrayClass_cwise_other.cpp\n</td>\n<td>\n\\verbinclude Tutorial_ArrayClass_cwise_other.out\n</td></tr></table>\n\nMore coefficient-wise operations can be found in the \\ref QuickRefPage.\n\n\n\\section TutorialArrayClassConvert Converting between array and matrix expressions\n\nWhen should you use objects of the Matrix class and when should you use objects of the Array class? You cannot\napply Matrix operations on arrays, or Array operations on matrices. Thus, if you need to do linear algebraic\noperations such as matrix multiplication, then you should use matrices; if you need to do coefficient-wise\noperations, then you should use arrays. However, sometimes it is not that simple, but you need to use both\nMatrix and Array operations. In that case, you need to convert a matrix to an array or reversely. This gives\naccess to all operations regardless of the choice of declaring objects as arrays or as matrices.\n\n\\link MatrixBase Matrix expressions \\endlink have an \\link MatrixBase::array() .array() \\endlink method that\n'converts' them into \\link ArrayBase array expressions\\endlink, so that coefficient-wise operations\ncan be applied easily. Conversely, \\link ArrayBase array expressions \\endlink\nhave a \\link ArrayBase::matrix() .matrix() \\endlink method. As with all Eigen expression abstractions,\nthis doesn't have any runtime cost (provided that you let your compiler optimize).\nBoth \\link MatrixBase::array() .array() \\endlink and \\link ArrayBase::matrix() .matrix() \\endlink \ncan be used as rvalues and as lvalues.\n\nMixing matrices and arrays in an expression is forbidden with Eigen. For instance, you cannot add a matrix and\narray directly; the operands of a \\c + operator should either both be matrices or both be arrays. However,\nit is easy to convert from one to the other with \\link MatrixBase::array() .array() \\endlink and \n\\link ArrayBase::matrix() .matrix()\\endlink. The exception to this rule is the assignment operator: it is\nallowed to assign a matrix expression to an array variable, or to assign an array expression to a matrix\nvariable.\n\nThe following example shows how to use array operations on a Matrix object by employing the \n\\link MatrixBase::array() .array() \\endlink method. For example, the statement \n<tt>result = m.array() * n.array()</tt> takes two matrices \\c m and \\c n, converts them both to an array, uses\n* to multiply them coefficient-wise and assigns the result to the matrix variable \\c result (this is legal\nbecause Eigen allows assigning array expressions to matrix variables). \n\nAs a matter of fact, this usage case is so common that Eigen provides a \\link MatrixBase::cwiseProduct const\n.cwiseProduct(.) \\endlink method for matrices to compute the coefficient-wise product. This is also shown in\nthe example program.\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include Tutorial_ArrayClass_interop_matrix.cpp\n</td>\n<td>\n\\verbinclude Tutorial_ArrayClass_interop_matrix.out\n</td></tr></table>\n\nSimilarly, if \\c array1 and \\c array2 are arrays, then the expression <tt>array1.matrix() * array2.matrix()</tt>\ncomputes their matrix product.\n\nHere is a more advanced example. The expression <tt>(m.array() + 4).matrix() * m</tt> adds 4 to every\ncoefficient in the matrix \\c m and then computes the matrix product of the result with \\c m. Similarly, the\nexpression <tt>(m.array() * n.array()).matrix() * m</tt> computes the coefficient-wise product of the matrices\n\\c m and \\c n and then the matrix product of the result with \\c m.\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include Tutorial_ArrayClass_interop.cpp\n</td>\n<td>\n\\verbinclude Tutorial_ArrayClass_interop.out\n</td></tr></table>\n\n*/\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/TutorialBlockOperations.dox",
    "content": "namespace Eigen {\n\n/** \\eigenManualPage TutorialBlockOperations Block operations\n\nThis page explains the essentials of block operations.\nA block is a rectangular part of a matrix or array. Blocks expressions can be used both\nas rvalues and as lvalues. As usual with Eigen expressions, this abstraction has zero runtime cost\nprovided that you let your compiler optimize.\n\n\\eigenAutoToc\n\n\\section TutorialBlockOperationsUsing Using block operations\n\nThe most general block operation in Eigen is called \\link DenseBase::block() .block() \\endlink.\nThere are two versions, whose syntax is as follows:\n\n<table class=\"manual\">\n<tr><th>\\b %Block \\b operation</td>\n<th>Version constructing a \\n dynamic-size block expression</th>\n<th>Version constructing a \\n fixed-size block expression</th></tr>\n<tr><td>%Block of size <tt>(p,q)</tt>, starting at <tt>(i,j)</tt></td>\n    <td>\\code\nmatrix.block(i,j,p,q);\\endcode </td>\n    <td>\\code \nmatrix.block<p,q>(i,j);\\endcode </td>\n</tr>\n</table>\n\nAs always in Eigen, indices start at 0.\n\nBoth versions can be used on fixed-size and dynamic-size matrices and arrays.\nThese two expressions are semantically equivalent.\nThe only difference is that the fixed-size version will typically give you faster code if the block size is small,\nbut requires this size to be known at compile time.\n\nThe following program uses the dynamic-size and fixed-size versions to print the values of several blocks inside a\nmatrix.\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include Tutorial_BlockOperations_print_block.cpp\n</td>\n<td>\n\\verbinclude Tutorial_BlockOperations_print_block.out\n</td></tr></table>\n\nIn the above example the \\link DenseBase::block() .block() \\endlink function was employed as a \\em rvalue, i.e.\nit was only read from. However, blocks can also be used as \\em lvalues, meaning that you can assign to a block.\n\nThis is illustrated in the following example. This example also demonstrates blocks in arrays, which works exactly like the above-demonstrated blocks in matrices.\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include Tutorial_BlockOperations_block_assignment.cpp\n</td>\n<td>\n\\verbinclude Tutorial_BlockOperations_block_assignment.out\n</td></tr></table>\n\nWhile the \\link DenseBase::block() .block() \\endlink method can be used for any block operation, there are\nother methods for special cases, providing more specialized API and/or better performance. On the topic of performance, all what\nmatters is that you give Eigen as much information as possible at compile time. For example, if your block is a single whole column in a matrix,\nusing the specialized \\link DenseBase::col() .col() \\endlink function described below lets Eigen know that, which can give it optimization opportunities.\n\nThe rest of this page describes these specialized methods.\n\n\\section TutorialBlockOperationsSyntaxColumnRows Columns and rows\n\nIndividual columns and rows are special cases of blocks. Eigen provides methods to easily address them:\n\\link DenseBase::col() .col() \\endlink and \\link DenseBase::row() .row()\\endlink.\n\n<table class=\"manual\">\n<tr><th>%Block operation</th>\n<th>Method</th>\n<tr><td>i<sup>th</sup> row\n                    \\link DenseBase::row() * \\endlink</td>\n    <td>\\code\nmatrix.row(i);\\endcode </td>\n</tr>\n<tr><td>j<sup>th</sup> column\n                    \\link DenseBase::col() * \\endlink</td>\n    <td>\\code\nmatrix.col(j);\\endcode </td>\n</tr>\n</table>\n\nThe argument for \\p col() and \\p row() is the index of the column or row to be accessed. As always in Eigen, indices start at 0.\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include Tutorial_BlockOperations_colrow.cpp\n</td>\n<td>\n\\verbinclude Tutorial_BlockOperations_colrow.out\n</td></tr></table>\n\nThat example also demonstrates that block expressions (here columns) can be used in arithmetic like any other expression.\n\n\n\\section TutorialBlockOperationsSyntaxCorners Corner-related operations\n\nEigen also provides special methods for blocks that are flushed against one of the corners or sides of a\nmatrix or array. For instance, \\link DenseBase::topLeftCorner() .topLeftCorner() \\endlink can be used to refer\nto a block in the top-left corner of a matrix.\n\nThe different possibilities are summarized in the following table:\n\n<table class=\"manual\">\n<tr><th>%Block \\b operation</td>\n<th>Version constructing a \\n dynamic-size block expression</th>\n<th>Version constructing a \\n fixed-size block expression</th></tr>\n<tr><td>Top-left p by q block \\link DenseBase::topLeftCorner() * \\endlink</td>\n    <td>\\code\nmatrix.topLeftCorner(p,q);\\endcode </td>\n    <td>\\code \nmatrix.topLeftCorner<p,q>();\\endcode </td>\n</tr>\n<tr><td>Bottom-left p by q block\n              \\link DenseBase::bottomLeftCorner() * \\endlink</td>\n    <td>\\code\nmatrix.bottomLeftCorner(p,q);\\endcode </td>\n    <td>\\code \nmatrix.bottomLeftCorner<p,q>();\\endcode </td>\n</tr>\n<tr><td>Top-right p by q block\n              \\link DenseBase::topRightCorner() * \\endlink</td>\n    <td>\\code\nmatrix.topRightCorner(p,q);\\endcode </td>\n    <td>\\code \nmatrix.topRightCorner<p,q>();\\endcode </td>\n</tr>\n<tr><td>Bottom-right p by q block\n               \\link DenseBase::bottomRightCorner() * \\endlink</td>\n    <td>\\code\nmatrix.bottomRightCorner(p,q);\\endcode </td>\n    <td>\\code \nmatrix.bottomRightCorner<p,q>();\\endcode </td>\n</tr>\n<tr><td>%Block containing the first q rows\n                   \\link DenseBase::topRows() * \\endlink</td>\n    <td>\\code\nmatrix.topRows(q);\\endcode </td>\n    <td>\\code \nmatrix.topRows<q>();\\endcode </td>\n</tr>\n<tr><td>%Block containing the last q rows\n                    \\link DenseBase::bottomRows() * \\endlink</td>\n    <td>\\code\nmatrix.bottomRows(q);\\endcode </td>\n    <td>\\code \nmatrix.bottomRows<q>();\\endcode </td>\n</tr>\n<tr><td>%Block containing the first p columns\n                    \\link DenseBase::leftCols() * \\endlink</td>\n    <td>\\code\nmatrix.leftCols(p);\\endcode </td>\n    <td>\\code \nmatrix.leftCols<p>();\\endcode </td>\n</tr>\n<tr><td>%Block containing the last q columns\n                    \\link DenseBase::rightCols() * \\endlink</td>\n    <td>\\code\nmatrix.rightCols(q);\\endcode </td>\n    <td>\\code \nmatrix.rightCols<q>();\\endcode </td>\n</tr>\n</table>\n\nHere is a simple example illustrating the use of the operations presented above:\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include Tutorial_BlockOperations_corner.cpp\n</td>\n<td>\n\\verbinclude Tutorial_BlockOperations_corner.out\n</td></tr></table>\n\n\n\\section TutorialBlockOperationsSyntaxVectors Block operations for vectors\n\nEigen also provides a set of block operations designed specifically for the special case of vectors and one-dimensional arrays:\n\n<table class=\"manual\">\n<tr><th> %Block operation</th>\n<th>Version constructing a \\n dynamic-size block expression</th>\n<th>Version constructing a \\n fixed-size block expression</th></tr>\n<tr><td>%Block containing the first \\p n elements \n                    \\link DenseBase::head() * \\endlink</td>\n    <td>\\code\nvector.head(n);\\endcode </td>\n    <td>\\code \nvector.head<n>();\\endcode </td>\n</tr>\n<tr><td>%Block containing the last \\p n elements\n                    \\link DenseBase::tail() * \\endlink</td>\n    <td>\\code\nvector.tail(n);\\endcode </td>\n    <td>\\code \nvector.tail<n>();\\endcode </td>\n</tr>\n<tr><td>%Block containing \\p n elements, starting at position \\p i\n                    \\link DenseBase::segment() * \\endlink</td>\n    <td>\\code\nvector.segment(i,n);\\endcode </td>\n    <td>\\code \nvector.segment<n>(i);\\endcode </td>\n</tr>\n</table>\n\n\nAn example is presented below:\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include Tutorial_BlockOperations_vector.cpp\n</td>\n<td>\n\\verbinclude Tutorial_BlockOperations_vector.out\n</td></tr></table>\n\n*/\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/TutorialGeometry.dox",
    "content": "namespace Eigen {\n\n/** \\eigenManualPage TutorialGeometry Space transformations\n\nIn this page, we will introduce the many possibilities offered by the \\ref Geometry_Module \"geometry module\" to deal with 2D and 3D rotations and projective or affine transformations.\n\n\\eigenAutoToc\n\nEigen's Geometry module provides two different kinds of geometric transformations:\n  - Abstract transformations, such as rotations (represented by \\ref AngleAxis \"angle and axis\" or by a \\ref Quaternion \"quaternion\"), \\ref Translation \"translations\", \\ref Scaling \"scalings\". These transformations are NOT represented as matrices, but you can nevertheless mix them with matrices and vectors in expressions, and convert them to matrices if you wish.\n  - Projective or affine transformation matrices: see the Transform class. These are really matrices.\n\n\\note If you are working with OpenGL 4x4 matrices then Affine3f and Affine3d are what you want. Since Eigen defaults to column-major storage, you can directly use the Transform::data() method to pass your transformation matrix to OpenGL.\n\nYou can construct a Transform from an abstract transformation, like this:\n\\code\n  Transform t(AngleAxis(angle,axis));\n\\endcode\nor like this:\n\\code\n  Transform t;\n  t = AngleAxis(angle,axis);\n\\endcode\nBut note that unfortunately, because of how C++ works, you can \\b not do this:\n\\code\n  Transform t = AngleAxis(angle,axis);\n\\endcode\n<span class=\"note\">\\b Explanation: In the C++ language, this would require Transform to have a non-explicit conversion constructor from AngleAxis, but we really don't want to allow implicit casting here.\n</span>\n\n\\section TutorialGeoElementaryTransformations Transformation types\n\n<table class=\"manual\">\n<tr><th>Transformation type</th><th>Typical initialization code</th></tr>\n<tr><td>\n\\ref Rotation2D \"2D rotation\" from an angle</td><td>\\code\nRotation2D<float> rot2(angle_in_radian);\\endcode</td></tr>\n<tr class=\"alt\"><td>\n3D rotation as an \\ref AngleAxis \"angle + axis\"</td><td>\\code\nAngleAxis<float> aa(angle_in_radian, Vector3f(ax,ay,az));\\endcode\n<span class=\"note\">The axis vector must be normalized.</span></td></tr>\n<tr><td>\n3D rotation as a \\ref Quaternion \"quaternion\"</td><td>\\code\nQuaternion<float> q;  q = AngleAxis<float>(angle_in_radian, axis);\\endcode</td></tr>\n<tr class=\"alt\"><td>\nN-D Scaling</td><td>\\code\nScaling(sx, sy)\nScaling(sx, sy, sz)\nScaling(s)\nScaling(vecN)\\endcode</td></tr>\n<tr><td>\nN-D Translation</td><td>\\code\nTranslation<float,2>(tx, ty)\nTranslation<float,3>(tx, ty, tz)\nTranslation<float,N>(s)\nTranslation<float,N>(vecN)\\endcode</td></tr>\n<tr class=\"alt\"><td>\nN-D \\ref TutorialGeoTransform \"Affine transformation\"</td><td>\\code\nTransform<float,N,Affine> t = concatenation_of_any_transformations;\nTransform<float,3,Affine> t = Translation3f(p) * AngleAxisf(a,axis) * Scaling(s);\\endcode</td></tr>\n<tr><td>\nN-D Linear transformations \\n\n<em class=note>(pure rotations, \\n scaling, etc.)</em></td><td>\\code\nMatrix<float,N> t = concatenation_of_rotations_and_scalings;\nMatrix<float,2> t = Rotation2Df(a) * Scaling(s);\nMatrix<float,3> t = AngleAxisf(a,axis) * Scaling(s);\\endcode</td></tr>\n</table>\n\n<strong>Notes on rotations</strong>\\n To transform more than a single vector the preferred\nrepresentations are rotation matrices, while for other usages Quaternion is the\nrepresentation of choice as they are compact, fast and stable. Finally Rotation2D and\nAngleAxis are mainly convenient types to create other rotation objects.\n\n<strong>Notes on Translation and Scaling</strong>\\n Like AngleAxis, these classes were\ndesigned to simplify the creation/initialization of linear (Matrix) and affine (Transform)\ntransformations. Nevertheless, unlike AngleAxis which is inefficient to use, these classes\nmight still be interesting to write generic and efficient algorithms taking as input any\nkind of transformations.\n\nAny of the above transformation types can be converted to any other types of the same nature,\nor to a more generic type. Here are some additional examples:\n<table class=\"manual\">\n<tr><td>\\code\nRotation2Df r;  r  = Matrix2f(..);       // assumes a pure rotation matrix\nAngleAxisf aa;  aa = Quaternionf(..);\nAngleAxisf aa;  aa = Matrix3f(..);       // assumes a pure rotation matrix\nMatrix2f m;     m  = Rotation2Df(..);\nMatrix3f m;     m  = Quaternionf(..);       Matrix3f m;   m = Scaling(..);\nAffine3f m;     m  = AngleAxis3f(..);       Affine3f m;   m = Scaling(..);\nAffine3f m;     m  = Translation3f(..);     Affine3f m;   m = Matrix3f(..);\n\\endcode</td></tr>\n</table>\n\n\n<a href=\"#\" class=\"top\">top</a>\\section TutorialGeoCommontransformationAPI Common API across transformation types\n\nTo some extent, Eigen's \\ref Geometry_Module \"geometry module\" allows you to write\ngeneric algorithms working on any kind of transformation representations:\n<table class=\"manual\">\n<tr><td>\nConcatenation of two transformations</td><td>\\code\ngen1 * gen2;\\endcode</td></tr>\n<tr class=\"alt\"><td>Apply the transformation to a vector</td><td>\\code\nvec2 = gen1 * vec1;\\endcode</td></tr>\n<tr><td>Get the inverse of the transformation</td><td>\\code\ngen2 = gen1.inverse();\\endcode</td></tr>\n<tr class=\"alt\"><td>Spherical interpolation \\n (Rotation2D and Quaternion only)</td><td>\\code\nrot3 = rot1.slerp(alpha,rot2);\\endcode</td></tr>\n</table>\n\n\n\n<a href=\"#\" class=\"top\">top</a>\\section TutorialGeoTransform Affine transformations\nGeneric affine transformations are represented by the Transform class which internally\nis a (Dim+1)^2 matrix. In Eigen we have chosen to not distinghish between points and\nvectors such that all points are actually represented by displacement vectors from the\norigin ( \\f$ \\mathbf{p} \\equiv \\mathbf{p}-0 \\f$ ). With that in mind, real points and\nvector distinguish when the transformation is applied.\n<table class=\"manual\">\n<tr><td>\nApply the transformation to a \\b point </td><td>\\code\nVectorNf p1, p2;\np2 = t * p1;\\endcode</td></tr>\n<tr class=\"alt\"><td>\nApply the transformation to a \\b vector </td><td>\\code\nVectorNf vec1, vec2;\nvec2 = t.linear() * vec1;\\endcode</td></tr>\n<tr><td>\nApply a \\em general transformation \\n to a \\b normal \\b vector \\n\n</td><td>\\code\nVectorNf n1, n2;\nMatrixNf normalMatrix = t.linear().inverse().transpose();\nn2 = (normalMatrix * n1).normalized();\\endcode</td></tr>\n<tr><td colspan=\"2\">(See subject 5.27 of this <a href=\"http://www.faqs.org/faqs/graphics/algorithms-faq\">faq</a> for the explanations)</td></tr>\n<tr class=\"alt\"><td>\nApply a transformation with \\em pure \\em rotation \\n to a \\b normal \\b vector\n(no scaling, no shear)</td><td>\\code\nn2 = t.linear() * n1;\\endcode</td></tr>\n<tr><td>\nOpenGL compatibility \\b 3D </td><td>\\code\nglLoadMatrixf(t.data());\\endcode</td></tr>\n<tr class=\"alt\"><td>\nOpenGL compatibility \\b 2D </td><td>\\code\nAffine3f aux(Affine3f::Identity());\naux.linear().topLeftCorner<2,2>() = t.linear();\naux.translation().start<2>() = t.translation();\nglLoadMatrixf(aux.data());\\endcode</td></tr>\n</table>\n\n\\b Component \\b accessors\n<table class=\"manual\">\n<tr><td>\nfull read-write access to the internal matrix</td><td>\\code\nt.matrix() = matN1xN1;    // N1 means N+1\nmatN1xN1 = t.matrix();\n\\endcode</td></tr>\n<tr class=\"alt\"><td>\ncoefficient accessors</td><td>\\code\nt(i,j) = scalar;   <=>   t.matrix()(i,j) = scalar;\nscalar = t(i,j);   <=>   scalar = t.matrix()(i,j);\n\\endcode</td></tr>\n<tr><td>\ntranslation part</td><td>\\code\nt.translation() = vecN;\nvecN = t.translation();\n\\endcode</td></tr>\n<tr class=\"alt\"><td>\nlinear part</td><td>\\code\nt.linear() = matNxN;\nmatNxN = t.linear();\n\\endcode</td></tr>\n<tr><td>\nextract the rotation matrix</td><td>\\code\nmatNxN = t.rotation();\n\\endcode</td></tr>\n</table>\n\n\n\\b Transformation \\b creation \\n\nWhile transformation objects can be created and updated concatenating elementary transformations,\nthe Transform class also features a procedural API:\n<table class=\"manual\">\n<tr><th></th><th>procedural API</th><th>equivalent natural API </th></tr>\n<tr><td>Translation</td><td>\\code\nt.translate(Vector_(tx,ty,..));\nt.pretranslate(Vector_(tx,ty,..));\n\\endcode</td><td>\\code\nt *= Translation_(tx,ty,..);\nt = Translation_(tx,ty,..) * t;\n\\endcode</td></tr>\n<tr class=\"alt\"><td>\\b Rotation \\n <em class=\"note\">In 2D and for the procedural API, any_rotation can also \\n be an angle in radian</em></td><td>\\code\nt.rotate(any_rotation);\nt.prerotate(any_rotation);\n\\endcode</td><td>\\code\nt *= any_rotation;\nt = any_rotation * t;\n\\endcode</td></tr>\n<tr><td>Scaling</td><td>\\code\nt.scale(Vector_(sx,sy,..));\nt.scale(s);\nt.prescale(Vector_(sx,sy,..));\nt.prescale(s);\n\\endcode</td><td>\\code\nt *= Scaling(sx,sy,..);\nt *= Scaling(s);\nt = Scaling(sx,sy,..) * t;\nt = Scaling(s) * t;\n\\endcode</td></tr>\n<tr class=\"alt\"><td>Shear transformation \\n ( \\b 2D \\b only ! )</td><td>\\code\nt.shear(sx,sy);\nt.preshear(sx,sy);\n\\endcode</td><td></td></tr>\n</table>\n\nNote that in both API, any many transformations can be concatenated in a single expression as shown in the two following equivalent examples:\n<table class=\"manual\">\n<tr><td>\\code\nt.pretranslate(..).rotate(..).translate(..).scale(..);\n\\endcode</td></tr>\n<tr><td>\\code\nt = Translation_(..) * t * RotationType(..) * Translation_(..) * Scaling(..);\n\\endcode</td></tr>\n</table>\n\n\n\n<a href=\"#\" class=\"top\">top</a>\\section TutorialGeoEulerAngles Euler angles\n<table class=\"manual\">\n<tr><td style=\"max-width:30em;\">\nEuler angles might be convenient to create rotation objects.\nOn the other hand, since there exist 24 different conventions, they are pretty confusing to use. This example shows how\nto create a rotation matrix according to the 2-1-2 convention.</td><td>\\code\nMatrix3f m;\nm = AngleAxisf(angle1, Vector3f::UnitZ())\n *  * AngleAxisf(angle2, Vector3f::UnitY())\n *  * AngleAxisf(angle3, Vector3f::UnitZ());\n\\endcode</td></tr>\n</table>\n\n*/\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/TutorialLinearAlgebra.dox",
    "content": "namespace Eigen {\n\n/** \\eigenManualPage TutorialLinearAlgebra Linear algebra and decompositions\n\nThis page explains how to solve linear systems, compute various decompositions such as LU,\nQR, %SVD, eigendecompositions... After reading this page, don't miss our\n\\link TopicLinearAlgebraDecompositions catalogue \\endlink of dense matrix decompositions.\n\n\\eigenAutoToc\n\n\\section TutorialLinAlgBasicSolve Basic linear solving\n\n\\b The \\b problem: You have a system of equations, that you have written as a single matrix equation\n    \\f[ Ax \\: = \\: b \\f]\nWhere \\a A and \\a b are matrices (\\a b could be a vector, as a special case). You want to find a solution \\a x.\n\n\\b The \\b solution: You can choose between various decompositions, depending on what your matrix \\a A looks like,\nand depending on whether you favor speed or accuracy. However, let's start with an example that works in all cases,\nand is a good compromise:\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr>\n  <td>\\include TutorialLinAlgExSolveColPivHouseholderQR.cpp </td>\n  <td>\\verbinclude TutorialLinAlgExSolveColPivHouseholderQR.out </td>\n</tr>\n</table>\n\nIn this example, the colPivHouseholderQr() method returns an object of class ColPivHouseholderQR. Since here the\nmatrix is of type Matrix3f, this line could have been replaced by:\n\\code\nColPivHouseholderQR<Matrix3f> dec(A);\nVector3f x = dec.solve(b);\n\\endcode\n\nHere, ColPivHouseholderQR is a QR decomposition with column pivoting. It's a good compromise for this tutorial, as it\nworks for all matrices while being quite fast. Here is a table of some other decompositions that you can choose from,\ndepending on your matrix and the trade-off you want to make:\n\n<table class=\"manual\">\n    <tr>\n        <th>Decomposition</th>\n        <th>Method</th>\n        <th>Requirements<br/>on the matrix</th>\n        <th>Speed<br/> (small-to-medium)</th>\n        <th>Speed<br/> (large)</th>\n        <th>Accuracy</th>\n    </tr>\n    <tr>\n        <td>PartialPivLU</td>\n        <td>partialPivLu()</td>\n        <td>Invertible</td>\n        <td>++</td>\n        <td>++</td>\n        <td>+</td>\n    </tr>\n    <tr class=\"alt\">\n        <td>FullPivLU</td>\n        <td>fullPivLu()</td>\n        <td>None</td>\n        <td>-</td>\n        <td>- -</td>\n        <td>+++</td>\n    </tr>\n    <tr>\n        <td>HouseholderQR</td>\n        <td>householderQr()</td>\n        <td>None</td>\n        <td>++</td>\n        <td>++</td>\n        <td>+</td>\n    </tr>\n    <tr class=\"alt\">\n        <td>ColPivHouseholderQR</td>\n        <td>colPivHouseholderQr()</td>\n        <td>None</td>\n        <td>+</td>\n        <td>-</td>\n        <td>+++</td>\n    </tr>\n    <tr>\n        <td>FullPivHouseholderQR</td>\n        <td>fullPivHouseholderQr()</td>\n        <td>None</td>\n        <td>-</td>\n        <td>- -</td>\n        <td>+++</td>\n    </tr>\n    <tr class=\"alt\">\n        <td>CompleteOrthogonalDecomposition</td>\n        <td>completeOrthogonalDecomposition()</td>\n        <td>None</td>\n        <td>+</td>\n        <td>-</td>\n        <td>+++</td>\n    </tr>\n    <tr class=\"alt\">\n        <td>LLT</td>\n        <td>llt()</td>\n        <td>Positive definite</td>\n        <td>+++</td>\n        <td>+++</td>\n        <td>+</td>\n    </tr>\n    <tr>\n        <td>LDLT</td>\n        <td>ldlt()</td>\n        <td>Positive or negative<br/> semidefinite</td>\n        <td>+++</td>\n        <td>+</td>\n        <td>++</td>\n    </tr>\n    <tr class=\"alt\">\n        <td>BDCSVD</td>\n        <td>bdcSvd()</td>\n        <td>None</td>\n        <td>-</td>\n        <td>-</td>\n        <td>+++</td>\n    </tr>\n    <tr class=\"alt\">\n        <td>JacobiSVD</td>\n        <td>jacobiSvd()</td>\n        <td>None</td>\n        <td>-</td>\n        <td>- - -</td>\n        <td>+++</td>\n    </tr>\n</table>\nTo get an overview of the true relative speed of the different decompositions, check this \\link DenseDecompositionBenchmark benchmark \\endlink.\n\nAll of these decompositions offer a solve() method that works as in the above example.\n\nFor example, if your matrix is positive definite, the above table says that a very good\nchoice is then the LLT or LDLT decomposition. Here's an example, also demonstrating that using a general\nmatrix (not a vector) as right hand side is possible.\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr>\n  <td>\\include TutorialLinAlgExSolveLDLT.cpp </td>\n  <td>\\verbinclude TutorialLinAlgExSolveLDLT.out </td>\n</tr>\n</table>\n\nFor a \\ref TopicLinearAlgebraDecompositions \"much more complete table\" comparing all decompositions supported by Eigen (notice that Eigen\nsupports many other decompositions), see our special page on\n\\ref TopicLinearAlgebraDecompositions \"this topic\".\n\n\\section TutorialLinAlgSolutionExists Checking if a solution really exists\n\nOnly you know what error margin you want to allow for a solution to be considered valid.\nSo Eigen lets you do this computation for yourself, if you want to, as in this example:\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr>\n  <td>\\include TutorialLinAlgExComputeSolveError.cpp </td>\n  <td>\\verbinclude TutorialLinAlgExComputeSolveError.out </td>\n</tr>\n</table>\n\n\\section TutorialLinAlgEigensolving Computing eigenvalues and eigenvectors\n\nYou need an eigendecomposition here, see available such decompositions on \\ref TopicLinearAlgebraDecompositions \"this page\".\nMake sure to check if your matrix is self-adjoint, as is often the case in these problems. Here's an example using\nSelfAdjointEigenSolver, it could easily be adapted to general matrices using EigenSolver or ComplexEigenSolver.\n\nThe computation of eigenvalues and eigenvectors does not necessarily converge, but such failure to converge is\nvery rare. The call to info() is to check for this possibility.\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr>\n  <td>\\include TutorialLinAlgSelfAdjointEigenSolver.cpp </td>\n  <td>\\verbinclude TutorialLinAlgSelfAdjointEigenSolver.out </td>\n</tr>\n</table>\n\n\\section TutorialLinAlgInverse Computing inverse and determinant\n\nFirst of all, make sure that you really want this. While inverse and determinant are fundamental mathematical concepts,\nin \\em numerical linear algebra they are not as popular as in pure mathematics. Inverse computations are often\nadvantageously replaced by solve() operations, and the determinant is often \\em not a good way of checking if a matrix\nis invertible.\n\nHowever, for \\em very \\em small matrices, the above is not true, and inverse and determinant can be very useful.\n\nWhile certain decompositions, such as PartialPivLU and FullPivLU, offer inverse() and determinant() methods, you can also\ncall inverse() and determinant() directly on a matrix. If your matrix is of a very small fixed size (at most 4x4) this\nallows Eigen to avoid performing a LU decomposition, and instead use formulas that are more efficient on such small matrices.\n\nHere is an example:\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr>\n  <td>\\include TutorialLinAlgInverseDeterminant.cpp </td>\n  <td>\\verbinclude TutorialLinAlgInverseDeterminant.out </td>\n</tr>\n</table>\n\n\\section TutorialLinAlgLeastsquares Least squares solving\n\nThe most accurate method to do least squares solving is with a SVD decomposition.\nEigen provides two implementations.\nThe recommended one is the BDCSVD class, which scale well for large problems\nand automatically fall-back to the JacobiSVD class for smaller problems.\nFor both classes, their solve() method is doing least-squares solving.\n\nHere is an example:\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr>\n  <td>\\include TutorialLinAlgSVDSolve.cpp </td>\n  <td>\\verbinclude TutorialLinAlgSVDSolve.out </td>\n</tr>\n</table>\n\nAnother methods, potentially faster but less reliable, are to use a Cholesky decomposition of the\nnormal matrix or a QR decomposition. Our page on \\link LeastSquares least squares solving \\endlink\nhas more details.\n\n\n\\section TutorialLinAlgSeparateComputation Separating the computation from the construction\n\nIn the above examples, the decomposition was computed at the same time that the decomposition object was constructed.\nThere are however situations where you might want to separate these two things, for example if you don't know,\nat the time of the construction, the matrix that you will want to decompose; or if you want to reuse an existing\ndecomposition object.\n\nWhat makes this possible is that:\n\\li all decompositions have a default constructor,\n\\li all decompositions have a compute(matrix) method that does the computation, and that may be called again\n    on an already-computed decomposition, reinitializing it.\n\nFor example:\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr>\n  <td>\\include TutorialLinAlgComputeTwice.cpp </td>\n  <td>\\verbinclude TutorialLinAlgComputeTwice.out </td>\n</tr>\n</table>\n\nFinally, you can tell the decomposition constructor to preallocate storage for decomposing matrices of a given size,\nso that when you subsequently decompose such matrices, no dynamic memory allocation is performed (of course, if you\nare using fixed-size matrices, no dynamic memory allocation happens at all). This is done by just\npassing the size to the decomposition constructor, as in this example:\n\\code\nHouseholderQR<MatrixXf> qr(50,50);\nMatrixXf A = MatrixXf::Random(50,50);\nqr.compute(A); // no dynamic memory allocation\n\\endcode\n\n\\section TutorialLinAlgRankRevealing Rank-revealing decompositions\n\nCertain decompositions are rank-revealing, i.e. are able to compute the rank of a matrix. These are typically\nalso the decompositions that behave best in the face of a non-full-rank matrix (which in the square case means a\nsingular matrix). On \\ref TopicLinearAlgebraDecompositions \"this table\" you can see for all our decompositions\nwhether they are rank-revealing or not.\n\nRank-revealing decompositions offer at least a rank() method. They can also offer convenience methods such as isInvertible(),\nand some are also providing methods to compute the kernel (null-space) and image (column-space) of the matrix, as is the\ncase with FullPivLU:\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr>\n  <td>\\include TutorialLinAlgRankRevealing.cpp </td>\n  <td>\\verbinclude TutorialLinAlgRankRevealing.out </td>\n</tr>\n</table>\n\nOf course, any rank computation depends on the choice of an arbitrary threshold, since practically no\nfloating-point matrix is \\em exactly rank-deficient. Eigen picks a sensible default threshold, which depends\non the decomposition but is typically the diagonal size times machine epsilon. While this is the best default we\ncould pick, only you know what is the right threshold for your application. You can set this by calling setThreshold()\non your decomposition object before calling rank() or any other method that needs to use such a threshold.\nThe decomposition itself, i.e. the compute() method, is independent of the threshold. You don't need to recompute the\ndecomposition after you've changed the threshold.\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr>\n  <td>\\include TutorialLinAlgSetThreshold.cpp </td>\n  <td>\\verbinclude TutorialLinAlgSetThreshold.out </td>\n</tr>\n</table>\n\n*/\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/TutorialMapClass.dox",
    "content": "namespace Eigen {\n\n/** \\eigenManualPage TutorialMapClass Interfacing with raw buffers: the Map class\n\nThis page explains how to work with \"raw\" C/C++ arrays.\nThis can be useful in a variety of contexts, particularly when \"importing\" vectors and matrices from other libraries into %Eigen.\n\n\\eigenAutoToc\n\n\\section TutorialMapIntroduction Introduction\n\nOccasionally you may have a pre-defined array of numbers that you want to use within %Eigen as a vector or matrix. While one option is to make a copy of the data, most commonly you probably want to re-use this memory as an %Eigen type. Fortunately, this is very easy with the Map class.\n\n\\section TutorialMapTypes Map types and declaring Map variables\n\nA Map object has a type defined by its %Eigen equivalent:\n\\code\nMap<Matrix<typename Scalar, int RowsAtCompileTime, int ColsAtCompileTime> >\n\\endcode\nNote that, in this default case, a Map requires just a single template parameter.  \n\nTo construct a Map variable, you need two other pieces of information: a pointer to the region of memory defining the array of coefficients, and the desired shape of the matrix or vector.  For example, to define a matrix of \\c float with sizes determined at compile time, you might do the following:\n\\code\nMap<MatrixXf> mf(pf,rows,columns);\n\\endcode\nwhere \\c pf is a \\c float \\c * pointing to the array of memory.  A fixed-size read-only vector of integers might be declared as\n\\code\nMap<const Vector4i> mi(pi);\n\\endcode\nwhere \\c pi is an \\c int \\c *. In this case the size does not have to be passed to the constructor, because it is already specified by the Matrix/Array type.\n\nNote that Map does not have a default constructor; you \\em must pass a pointer to initialize the object. However, you can work around this requirement (see \\ref TutorialMapPlacementNew).\n\nMap is flexible enough to accommodate a variety of different data representations.  There are two other (optional) template parameters:\n\\code\nMap<typename MatrixType,\n    int MapOptions,\n    typename StrideType>\n\\endcode\n\\li \\c MapOptions specifies whether the pointer is \\c #Aligned, or \\c #Unaligned.  The default is \\c #Unaligned.\n\\li \\c StrideType allows you to specify a custom layout for the memory array, using the Stride class.  One example would be to specify that the data array is organized in row-major format:\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr>\n<td>\\include Tutorial_Map_rowmajor.cpp </td>\n<td>\\verbinclude Tutorial_Map_rowmajor.out </td>\n</table>\nHowever, Stride is even more flexible than this; for details, see the documentation for the Map and Stride classes.\n\n\\section TutorialMapUsing Using Map variables\n\nYou can use a Map object just like any other %Eigen type:\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr>\n<td>\\include Tutorial_Map_using.cpp </td>\n<td>\\verbinclude Tutorial_Map_using.out </td>\n</table>\n\nAll %Eigen functions are written to accept Map objects just like other %Eigen types. However, when writing your own functions taking %Eigen types, this does \\em not happen automatically: a Map type is not identical to its Dense equivalent.  See \\ref TopicFunctionTakingEigenTypes for details.\n\n\\section TutorialMapPlacementNew Changing the mapped array\n\nIt is possible to change the array of a Map object after declaration, using the C++ \"placement new\" syntax:\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr>\n<td>\\include Map_placement_new.cpp </td>\n<td>\\verbinclude Map_placement_new.out </td>\n</table>\nDespite appearances, this does not invoke the memory allocator, because the syntax specifies the location for storing the result.\n\nThis syntax makes it possible to declare a Map object without first knowing the mapped array's location in memory:\n\\code\nMap<Matrix3f> A(NULL);  // don't try to use this matrix yet!\nVectorXf b(n_matrices);\nfor (int i = 0; i < n_matrices; i++)\n{\n  new (&A) Map<Matrix3f>(get_matrix_pointer(i));\n  b(i) = A.trace();\n}\n\\endcode\n\n*/\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/TutorialMatrixArithmetic.dox",
    "content": "namespace Eigen {\n\n/** \\eigenManualPage TutorialMatrixArithmetic Matrix and vector arithmetic\n\nThis page aims to provide an overview and some details on how to perform arithmetic\nbetween matrices, vectors and scalars with Eigen.\n\n\\eigenAutoToc\n\n\\section TutorialArithmeticIntroduction Introduction\n\nEigen offers matrix/vector arithmetic operations either through overloads of common C++ arithmetic operators such as +, -, *,\nor through special methods such as dot(), cross(), etc.\nFor the Matrix class (matrices and vectors), operators are only overloaded to support\nlinear-algebraic operations. For example, \\c matrix1 \\c * \\c matrix2 means matrix-matrix product,\nand \\c vector \\c + \\c scalar is just not allowed. If you want to perform all kinds of array operations,\nnot linear algebra, see the \\ref TutorialArrayClass \"next page\".\n\n\\section TutorialArithmeticAddSub Addition and subtraction\n\nThe left hand side and right hand side must, of course, have the same numbers of rows and of columns. They must\nalso have the same \\c Scalar type, as Eigen doesn't do automatic type promotion. The operators at hand here are:\n\\li binary operator + as in \\c a+b\n\\li binary operator - as in \\c a-b\n\\li unary operator - as in \\c -a\n\\li compound operator += as in \\c a+=b\n\\li compound operator -= as in \\c a-=b\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include tut_arithmetic_add_sub.cpp\n</td>\n<td>\n\\verbinclude tut_arithmetic_add_sub.out\n</td></tr></table>\n\n\\section TutorialArithmeticScalarMulDiv Scalar multiplication and division\n\nMultiplication and division by a scalar is very simple too. The operators at hand here are:\n\\li binary operator * as in \\c matrix*scalar\n\\li binary operator * as in \\c scalar*matrix\n\\li binary operator / as in \\c matrix/scalar\n\\li compound operator *= as in \\c matrix*=scalar\n\\li compound operator /= as in \\c matrix/=scalar\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include tut_arithmetic_scalar_mul_div.cpp\n</td>\n<td>\n\\verbinclude tut_arithmetic_scalar_mul_div.out\n</td></tr></table>\n\n\n\\section TutorialArithmeticMentionXprTemplates A note about expression templates\n\nThis is an advanced topic that we explain on \\ref TopicEigenExpressionTemplates \"this page\",\nbut it is useful to just mention it now. In Eigen, arithmetic operators such as \\c operator+ don't\nperform any computation by themselves, they just return an \"expression object\" describing the computation to be\nperformed. The actual computation happens later, when the whole expression is evaluated, typically in \\c operator=.\nWhile this might sound heavy, any modern optimizing compiler is able to optimize away that abstraction and\nthe result is perfectly optimized code. For example, when you do:\n\\code\nVectorXf a(50), b(50), c(50), d(50);\n...\na = 3*b + 4*c + 5*d;\n\\endcode\nEigen compiles it to just one for loop, so that the arrays are traversed only once. Simplifying (e.g. ignoring\nSIMD optimizations), this loop looks like this:\n\\code\nfor(int i = 0; i < 50; ++i)\n  a[i] = 3*b[i] + 4*c[i] + 5*d[i];\n\\endcode\nThus, you should not be afraid of using relatively large arithmetic expressions with Eigen: it only gives Eigen\nmore opportunities for optimization.\n\n\\section TutorialArithmeticTranspose Transposition and conjugation\n\nThe transpose \\f$ a^T \\f$, conjugate \\f$ \\bar{a} \\f$, and adjoint (i.e., conjugate transpose) \\f$ a^* \\f$ of a matrix or vector \\f$ a \\f$ are obtained by the member functions \\link DenseBase::transpose() transpose()\\endlink, \\link MatrixBase::conjugate() conjugate()\\endlink, and \\link MatrixBase::adjoint() adjoint()\\endlink, respectively.\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include tut_arithmetic_transpose_conjugate.cpp\n</td>\n<td>\n\\verbinclude tut_arithmetic_transpose_conjugate.out\n</td></tr></table>\n\nFor real matrices, \\c conjugate() is a no-operation, and so \\c adjoint() is equivalent to \\c transpose().\n\nAs for basic arithmetic operators, \\c transpose() and \\c adjoint() simply return a proxy object without doing the actual transposition. If you do <tt>b = a.transpose()</tt>, then the transpose is evaluated at the same time as the result is written into \\c b. However, there is a complication here. If you do <tt>a = a.transpose()</tt>, then Eigen starts writing the result into \\c a before the evaluation of the transpose is finished. Therefore, the instruction <tt>a = a.transpose()</tt> does not replace \\c a with its transpose, as one would expect:\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include tut_arithmetic_transpose_aliasing.cpp\n</td>\n<td>\n\\verbinclude tut_arithmetic_transpose_aliasing.out\n</td></tr></table>\nThis is the so-called \\ref TopicAliasing \"aliasing issue\". In \"debug mode\", i.e., when \\ref TopicAssertions \"assertions\" have not been disabled, such common pitfalls are automatically detected. \n\nFor \\em in-place transposition, as for instance in <tt>a = a.transpose()</tt>, simply use the \\link DenseBase::transposeInPlace() transposeInPlace()\\endlink  function:\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include tut_arithmetic_transpose_inplace.cpp\n</td>\n<td>\n\\verbinclude tut_arithmetic_transpose_inplace.out\n</td></tr></table>\nThere is also the \\link MatrixBase::adjointInPlace() adjointInPlace()\\endlink function for complex matrices.\n\n\\section TutorialArithmeticMatrixMul Matrix-matrix and matrix-vector multiplication\n\nMatrix-matrix multiplication is again done with \\c operator*. Since vectors are a special\ncase of matrices, they are implicitly handled there too, so matrix-vector product is really just a special\ncase of matrix-matrix product, and so is vector-vector outer product. Thus, all these cases are handled by just\ntwo operators:\n\\li binary operator * as in \\c a*b\n\\li compound operator *= as in \\c a*=b (this multiplies on the right: \\c a*=b is equivalent to <tt>a = a*b</tt>)\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include tut_arithmetic_matrix_mul.cpp\n</td>\n<td>\n\\verbinclude tut_arithmetic_matrix_mul.out\n</td></tr></table>\n\nNote: if you read the above paragraph on expression templates and are worried that doing \\c m=m*m might cause\naliasing issues, be reassured for now: Eigen treats matrix multiplication as a special case and takes care of\nintroducing a temporary here, so it will compile \\c m=m*m as:\n\\code\ntmp = m*m;\nm = tmp;\n\\endcode\nIf you know your matrix product can be safely evaluated into the destination matrix without aliasing issue, then you can use the \\link MatrixBase::noalias() noalias()\\endlink function to avoid the temporary, e.g.:\n\\code\nc.noalias() += a * b;\n\\endcode\nFor more details on this topic, see the page on \\ref TopicAliasing \"aliasing\".\n\n\\b Note: for BLAS users worried about performance, expressions such as <tt>c.noalias() -= 2 * a.adjoint() * b;</tt> are fully optimized and trigger a single gemm-like function call.\n\n\\section TutorialArithmeticDotAndCross Dot product and cross product\n\nFor dot product and cross product, you need the \\link MatrixBase::dot() dot()\\endlink and \\link MatrixBase::cross() cross()\\endlink methods. Of course, the dot product can also be obtained as a 1x1 matrix as u.adjoint()*v.\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include tut_arithmetic_dot_cross.cpp\n</td>\n<td>\n\\verbinclude tut_arithmetic_dot_cross.out\n</td></tr></table>\n\nRemember that cross product is only for vectors of size 3. Dot product is for vectors of any sizes.\nWhen using complex numbers, Eigen's dot product is conjugate-linear in the first variable and linear in the\nsecond variable.\n\n\\section TutorialArithmeticRedux Basic arithmetic reduction operations\nEigen also provides some reduction operations to reduce a given matrix or vector to a single value such as the sum (computed by \\link DenseBase::sum() sum()\\endlink), product (\\link DenseBase::prod() prod()\\endlink), or the maximum (\\link DenseBase::maxCoeff() maxCoeff()\\endlink) and minimum (\\link DenseBase::minCoeff() minCoeff()\\endlink) of all its coefficients.\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include tut_arithmetic_redux_basic.cpp\n</td>\n<td>\n\\verbinclude tut_arithmetic_redux_basic.out\n</td></tr></table>\n\nThe \\em trace of a matrix, as returned by the function \\link MatrixBase::trace() trace()\\endlink, is the sum of the diagonal coefficients and can also be computed as efficiently using <tt>a.diagonal().sum()</tt>, as we will see later on.\n\nThere also exist variants of the \\c minCoeff and \\c maxCoeff functions returning the coordinates of the respective coefficient via the arguments:\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include tut_arithmetic_redux_minmax.cpp\n</td>\n<td>\n\\verbinclude tut_arithmetic_redux_minmax.out\n</td></tr></table>\n\n\n\\section TutorialArithmeticValidity Validity of operations\nEigen checks the validity of the operations that you perform. When possible,\nit checks them at compile time, producing compilation errors. These error messages can be long and ugly,\nbut Eigen writes the important message in UPPERCASE_LETTERS_SO_IT_STANDS_OUT. For example:\n\\code\n  Matrix3f m;\n  Vector4f v;\n  v = m*v;      // Compile-time error: YOU_MIXED_MATRICES_OF_DIFFERENT_SIZES\n\\endcode\n\nOf course, in many cases, for example when checking dynamic sizes, the check cannot be performed at compile time.\nEigen then uses runtime assertions. This means that the program will abort with an error message when executing an illegal operation if it is run in \"debug mode\", and it will probably crash if assertions are turned off.\n\n\\code\n  MatrixXf m(3,3);\n  VectorXf v(4);\n  v = m * v; // Run-time assertion failure here: \"invalid matrix product\"\n\\endcode\n\nFor more details on this topic, see \\ref TopicAssertions \"this page\".\n\n*/\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/TutorialMatrixClass.dox",
    "content": "namespace Eigen {\n\n/** \\eigenManualPage TutorialMatrixClass The Matrix class\n\n\\eigenAutoToc\n\nIn Eigen, all matrices and vectors are objects of the Matrix template class.\nVectors are just a special case of matrices, with either 1 row or 1 column.\n\n\\section TutorialMatrixFirst3Params The first three template parameters of Matrix\n\nThe Matrix class takes six template parameters, but for now it's enough to\nlearn about the first three first parameters. The three remaining parameters have default\nvalues, which for now we will leave untouched, and which we\n\\ref TutorialMatrixOptTemplParams \"discuss below\".\n\nThe three mandatory template parameters of Matrix are:\n\\code\nMatrix<typename Scalar, int RowsAtCompileTime, int ColsAtCompileTime>\n\\endcode\n\\li \\c Scalar is the scalar type, i.e. the type of the coefficients.\n    That is, if you want a matrix of floats, choose \\c float here.\n    See \\ref TopicScalarTypes \"Scalar types\" for a list of all supported\n    scalar types and for how to extend support to new types.\n\\li \\c RowsAtCompileTime and \\c ColsAtCompileTime are the number of rows\n    and columns of the matrix as known at compile time (see \n    \\ref TutorialMatrixDynamic \"below\" for what to do if the number is not\n    known at compile time).\n\nWe offer a lot of convenience typedefs to cover the usual cases. For example, \\c Matrix4f is\na 4x4 matrix of floats. Here is how it is defined by Eigen:\n\\code\ntypedef Matrix<float, 4, 4> Matrix4f;\n\\endcode\nWe discuss \\ref TutorialMatrixTypedefs \"below\" these convenience typedefs.\n\n\\section TutorialMatrixVectors Vectors\n\nAs mentioned above, in Eigen, vectors are just a special case of\nmatrices, with either 1 row or 1 column. The case where they have 1 column is the most common;\nsuch vectors are called column-vectors, often abbreviated as just vectors. In the other case\nwhere they have 1 row, they are called row-vectors.\n\nFor example, the convenience typedef \\c Vector3f is a (column) vector of 3 floats. It is defined as follows by Eigen:\n\\code\ntypedef Matrix<float, 3, 1> Vector3f;\n\\endcode\nWe also offer convenience typedefs for row-vectors, for example:\n\\code\ntypedef Matrix<int, 1, 2> RowVector2i;\n\\endcode\n\n\\section TutorialMatrixDynamic The special value Dynamic\n\nOf course, Eigen is not limited to matrices whose dimensions are known at compile time.\nThe \\c RowsAtCompileTime and \\c ColsAtCompileTime template parameters can take the special\nvalue \\c Dynamic which indicates that the size is unknown at compile time, so must\nbe handled as a run-time variable. In Eigen terminology, such a size is referred to as a\n\\em dynamic \\em size; while a size that is known at compile time is called a\n\\em fixed \\em size. For example, the convenience typedef \\c MatrixXd, meaning\na matrix of doubles with dynamic size, is defined as follows:\n\\code\ntypedef Matrix<double, Dynamic, Dynamic> MatrixXd;\n\\endcode\nAnd similarly, we define a self-explanatory typedef \\c VectorXi as follows:\n\\code\ntypedef Matrix<int, Dynamic, 1> VectorXi;\n\\endcode\nYou can perfectly have e.g. a fixed number of rows with a dynamic number of columns, as in:\n\\code\nMatrix<float, 3, Dynamic>\n\\endcode\n\n\\section TutorialMatrixConstructors Constructors\n\nA default constructor is always available, never performs any dynamic memory allocation, and never initializes the matrix coefficients. You can do:\n\\code\nMatrix3f a;\nMatrixXf b;\n\\endcode\nHere,\n\\li \\c a is a 3-by-3 matrix, with a plain float[9] array of uninitialized coefficients,\n\\li \\c b is a dynamic-size matrix whose size is currently 0-by-0, and whose array of\ncoefficients hasn't yet been allocated at all.\n\nConstructors taking sizes are also available. For matrices, the number of rows is always passed first.\nFor vectors, just pass the vector size. They allocate the array of coefficients\nwith the given size, but don't initialize the coefficients themselves:\n\\code\nMatrixXf a(10,15);\nVectorXf b(30);\n\\endcode\nHere,\n\\li \\c a is a 10x15 dynamic-size matrix, with allocated but currently uninitialized coefficients.\n\\li \\c b is a dynamic-size vector of size 30, with allocated but currently uninitialized coefficients.\n\nIn order to offer a uniform API across fixed-size and dynamic-size matrices, it is legal to use these\nconstructors on fixed-size matrices, even if passing the sizes is useless in this case. So this is legal:\n\\code\nMatrix3f a(3,3);\n\\endcode\nand is a no-operation.\n\nMatrices and vectors can also be initialized from lists of coefficients.\nPrior to C++11, this feature is limited to small fixed-size column or vectors up to size 4:\n\\code\nVector2d a(5.0, 6.0);\nVector3d b(5.0, 6.0, 7.0);\nVector4d c(5.0, 6.0, 7.0, 8.0);\n\\endcode\n\nIf C++11 is enabled, fixed-size column or row vectors of arbitrary size can be initialized by passing an arbitrary number of coefficients:\n\\code\nVector2i a(1, 2);                      // A column vector containing the elements {1, 2}\nMatrix<int, 5, 1> b {1, 2, 3, 4, 5};   // A row-vector containing the elements {1, 2, 3, 4, 5}\nMatrix<int, 1, 5> c = {1, 2, 3, 4, 5}; // A column vector containing the elements {1, 2, 3, 4, 5}\n\\endcode\n\nIn the general case of matrices and vectors with either fixed or runtime sizes,\ncoefficients have to be grouped by rows and passed as an initializer list of initializer list (\\link Matrix::Matrix(const std::initializer_list<std::initializer_list<Scalar>>&) details \\endlink):\n\\code\nMatrixXi a {      // construct a 2x2 matrix\n      {1, 2},     // first row\n      {3, 4}      // second row\n};\nMatrix<double, 2, 3> b {\n      {2, 3, 4},\n      {5, 6, 7},\n};\n\\endcode\n\nFor column or row vectors, implicit transposition is allowed.\nThis means that a column vector can be initialized from a single row:\n\\code\nVectorXd a {{1.5, 2.5, 3.5}};             // A column-vector with 3 coefficients\nRowVectorXd b {{1.0, 2.0, 3.0, 4.0}};     // A row-vector with 4 coefficients\n\\endcode\n\n\\section TutorialMatrixCoeffAccessors Coefficient accessors\n\nThe primary coefficient accessors and mutators in Eigen are the overloaded parenthesis operators.\nFor matrices, the row index is always passed first. For vectors, just pass one index.\nThe numbering starts at 0. This example is self-explanatory:\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include tut_matrix_coefficient_accessors.cpp\n</td>\n<td>\n\\verbinclude tut_matrix_coefficient_accessors.out\n</td></tr></table>\n\nNote that the syntax <tt> m(index) </tt>\nis not restricted to vectors, it is also available for general matrices, meaning index-based access\nin the array of coefficients. This however depends on the matrix's storage order. All Eigen matrices default to\ncolumn-major storage order, but this can be changed to row-major, see \\ref TopicStorageOrders \"Storage orders\".\n\nThe operator[] is also overloaded for index-based access in vectors, but keep in mind that C++ doesn't allow operator[] to\ntake more than one argument. We restrict operator[] to vectors, because an awkwardness in the C++ language\nwould make matrix[i,j] compile to the same thing as matrix[j] !\n\n\\section TutorialMatrixCommaInitializer Comma-initialization\n\n%Matrix and vector coefficients can be conveniently set using the so-called \\em comma-initializer syntax.\nFor now, it is enough to know this example:\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr>\n<td>\\include Tutorial_commainit_01.cpp </td>\n<td>\\verbinclude Tutorial_commainit_01.out </td>\n</tr></table>\n\n\nThe right-hand side can also contain matrix expressions as discussed in \\ref TutorialAdvancedInitialization \"this page\".\n\n\\section TutorialMatrixSizesResizing Resizing\n\nThe current size of a matrix can be retrieved by \\link EigenBase::rows() rows()\\endlink, \\link EigenBase::cols() cols() \\endlink and \\link EigenBase::size() size()\\endlink. These methods return the number of rows, the number of columns and the number of coefficients, respectively. Resizing a dynamic-size matrix is done by the \\link PlainObjectBase::resize(Index,Index) resize() \\endlink method.\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr>\n<td>\\include tut_matrix_resize.cpp </td>\n<td>\\verbinclude tut_matrix_resize.out </td>\n</tr></table>\n\nThe resize() method is a no-operation if the actual matrix size doesn't change; otherwise it is destructive: the values of the coefficients may change.\nIf you want a conservative variant of resize() which does not change the coefficients, use \\link PlainObjectBase::conservativeResize() conservativeResize()\\endlink, see \\ref TopicResizing \"this page\" for more details.\n\nAll these methods are still available on fixed-size matrices, for the sake of API uniformity. Of course, you can't actually\nresize a fixed-size matrix. Trying to change a fixed size to an actually different value will trigger an assertion failure;\nbut the following code is legal:\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr>\n<td>\\include tut_matrix_resize_fixed_size.cpp </td>\n<td>\\verbinclude tut_matrix_resize_fixed_size.out </td>\n</tr></table>\n\n\n\\section TutorialMatrixAssignment Assignment and resizing\n\nAssignment is the action of copying a matrix into another, using \\c operator=. Eigen resizes the matrix on the left-hand side automatically so that it matches the size of the matrix on the right-hand size. For example:\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr>\n<td>\\include tut_matrix_assignment_resizing.cpp </td>\n<td>\\verbinclude tut_matrix_assignment_resizing.out </td>\n</tr></table>\n\nOf course, if the left-hand side is of fixed size, resizing it is not allowed.\n\nIf you do not want this automatic resizing to happen (for example for debugging purposes), you can disable it, see\n\\ref TopicResizing \"this page\".\n\n\n\\section TutorialMatrixFixedVsDynamic Fixed vs. Dynamic size\n\nWhen should one use fixed sizes (e.g. \\c Matrix4f), and when should one prefer dynamic sizes (e.g. \\c MatrixXf)?\nThe simple answer is: use fixed\nsizes for very small sizes where you can, and use dynamic sizes for larger sizes or where you have to. For small sizes,\nespecially for sizes smaller than (roughly) 16, using fixed sizes is hugely beneficial\nto performance, as it allows Eigen to avoid dynamic memory allocation and to unroll\nloops. Internally, a fixed-size Eigen matrix is just a plain array, i.e. doing\n\\code Matrix4f mymatrix; \\endcode\nreally amounts to just doing\n\\code float mymatrix[16]; \\endcode\nso this really has zero runtime cost. By contrast, the array of a dynamic-size matrix\nis always allocated on the heap, so doing\n\\code MatrixXf mymatrix(rows,columns); \\endcode\namounts to doing\n\\code float *mymatrix = new float[rows*columns]; \\endcode\nand in addition to that, the MatrixXf object stores its number of rows and columns as\nmember variables.\n\nThe limitation of using fixed sizes, of course, is that this is only possible\nwhen you know the sizes at compile time. Also, for large enough sizes, say for sizes\ngreater than (roughly) 32, the performance benefit of using fixed sizes becomes negligible.\nWorse, trying to create a very large matrix using fixed sizes inside a function could result in a\nstack overflow, since Eigen will try to allocate the array automatically as a local variable, and\nthis is normally done on the stack.\nFinally, depending on circumstances, Eigen can also be more aggressive trying to vectorize\n(use SIMD instructions) when dynamic sizes are used, see \\ref TopicVectorization \"Vectorization\".\n\n\\section TutorialMatrixOptTemplParams Optional template parameters\n\nWe mentioned at the beginning of this page that the Matrix class takes six template parameters,\nbut so far we only discussed the first three. The remaining three parameters are optional. Here is\nthe complete list of template parameters:\n\\code\nMatrix<typename Scalar,\n       int RowsAtCompileTime,\n       int ColsAtCompileTime,\n       int Options = 0,\n       int MaxRowsAtCompileTime = RowsAtCompileTime,\n       int MaxColsAtCompileTime = ColsAtCompileTime>\n\\endcode\n\\li \\c Options is a bit field. Here, we discuss only one bit: \\c RowMajor. It specifies that the matrices\n      of this type use row-major storage order; by default, the storage order is column-major. See the page on\n      \\ref TopicStorageOrders \"storage orders\". For example, this type means row-major 3x3 matrices:\n      \\code\n      Matrix<float, 3, 3, RowMajor>\n      \\endcode\n\\li \\c MaxRowsAtCompileTime and \\c MaxColsAtCompileTime are useful when you want to specify that, even though\n      the exact sizes of your matrices are not known at compile time, a fixed upper bound is known at\n      compile time. The biggest reason why you might want to do that is to avoid dynamic memory allocation.\n      For example the following matrix type uses a plain array of 12 floats, without dynamic memory allocation:\n      \\code\n      Matrix<float, Dynamic, Dynamic, 0, 3, 4>\n      \\endcode\n\n\\section TutorialMatrixTypedefs Convenience typedefs\n\nEigen defines the following Matrix typedefs:\n\\li MatrixNt for Matrix<type, N, N>. For example, MatrixXi for Matrix<int, Dynamic, Dynamic>.\n\\li VectorNt for Matrix<type, N, 1>. For example, Vector2f for Matrix<float, 2, 1>.\n\\li RowVectorNt for Matrix<type, 1, N>. For example, RowVector3d for Matrix<double, 1, 3>.\n\nWhere:\n\\li N can be any one of \\c 2, \\c 3, \\c 4, or \\c X (meaning \\c Dynamic).\n\\li t can be any one of \\c i (meaning int), \\c f (meaning float), \\c d (meaning double),\n      \\c cf (meaning complex<float>), or \\c cd (meaning complex<double>). The fact that typedefs are only\n    defined for these five types doesn't mean that they are the only supported scalar types. For example,\n    all standard integer types are supported, see \\ref TopicScalarTypes \"Scalar types\".\n\n\n*/\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/TutorialReductionsVisitorsBroadcasting.dox",
    "content": "namespace Eigen {\n\n/** \\eigenManualPage TutorialReductionsVisitorsBroadcasting Reductions, visitors and broadcasting\n\nThis page explains Eigen's reductions, visitors and broadcasting and how they are used with\n\\link MatrixBase matrices \\endlink and \\link ArrayBase arrays \\endlink.\n\n\\eigenAutoToc\n\n\\section TutorialReductionsVisitorsBroadcastingReductions Reductions\nIn Eigen, a reduction is a function taking a matrix or array, and returning a single\nscalar value. One of the most used reductions is \\link DenseBase::sum() .sum() \\endlink,\nreturning the sum of all the coefficients inside a given matrix or array.\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include tut_arithmetic_redux_basic.cpp\n</td>\n<td>\n\\verbinclude tut_arithmetic_redux_basic.out\n</td></tr></table>\n\nThe \\em trace of a matrix, as returned by the function \\c trace(), is the sum of the diagonal coefficients and can equivalently be computed <tt>a.diagonal().sum()</tt>.\n\n\n\\subsection TutorialReductionsVisitorsBroadcastingReductionsNorm Norm computations\n\nThe (Euclidean a.k.a. \\f$\\ell^2\\f$) squared norm of a vector can be obtained \\link MatrixBase::squaredNorm() squaredNorm() \\endlink. It is equal to the dot product of the vector by itself, and equivalently to the sum of squared absolute values of its coefficients.\n\nEigen also provides the \\link MatrixBase::norm() norm() \\endlink method, which returns the square root of \\link MatrixBase::squaredNorm() squaredNorm() \\endlink.\n\nThese operations can also operate on matrices; in that case, a n-by-p matrix is seen as a vector of size (n*p), so for example the \\link MatrixBase::norm() norm() \\endlink method returns the \"Frobenius\" or \"Hilbert-Schmidt\" norm. We refrain from speaking of the \\f$\\ell^2\\f$ norm of a matrix because that can mean different things.\n\nIf you want other coefficient-wise \\f$\\ell^p\\f$ norms, use the \\link MatrixBase::lpNorm lpNorm<p>() \\endlink method. The template parameter \\a p can take the special value \\a Infinity if you want the \\f$\\ell^\\infty\\f$ norm, which is the maximum of the absolute values of the coefficients.\n\nThe following example demonstrates these methods.\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include Tutorial_ReductionsVisitorsBroadcasting_reductions_norm.cpp\n</td>\n<td>\n\\verbinclude Tutorial_ReductionsVisitorsBroadcasting_reductions_norm.out\n</td></tr></table>\n\n\\b Operator \\b norm: The 1-norm and \\f$\\infty\\f$-norm <a href=\"https://en.wikipedia.org/wiki/Operator_norm\">matrix operator norms</a> can easily be computed as follows:\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include Tutorial_ReductionsVisitorsBroadcasting_reductions_operatornorm.cpp\n</td>\n<td>\n\\verbinclude Tutorial_ReductionsVisitorsBroadcasting_reductions_operatornorm.out\n</td></tr></table>\nSee below for more explanations on the syntax of these expressions.\n\n\\subsection TutorialReductionsVisitorsBroadcastingReductionsBool Boolean reductions\n\nThe following reductions operate on boolean values:\n  - \\link DenseBase::all() all() \\endlink returns \\b true if all of the coefficients in a given Matrix or Array evaluate to \\b true .\n  - \\link DenseBase::any() any() \\endlink returns \\b true if at least one of the coefficients in a given Matrix or Array evaluates to \\b true .\n  - \\link DenseBase::count() count() \\endlink returns the number of coefficients in a given Matrix or Array that evaluate to  \\b true.\n\nThese are typically used in conjunction with the coefficient-wise comparison and equality operators provided by Array. For instance, <tt>array > 0</tt> is an %Array of the same size as \\c array , with \\b true at those positions where the corresponding coefficient of \\c array is positive. Thus, <tt>(array > 0).all()</tt> tests whether all coefficients of \\c array are positive. This can be seen in the following example:\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include Tutorial_ReductionsVisitorsBroadcasting_reductions_bool.cpp\n</td>\n<td>\n\\verbinclude Tutorial_ReductionsVisitorsBroadcasting_reductions_bool.out\n</td></tr></table>\n\n\\subsection TutorialReductionsVisitorsBroadcastingReductionsUserdefined User defined reductions\n\nTODO\n\nIn the meantime you can have a look at the DenseBase::redux() function.\n\n\\section TutorialReductionsVisitorsBroadcastingVisitors Visitors\nVisitors are useful when one wants to obtain the location of a coefficient inside \na Matrix or Array. The simplest examples are \n\\link MatrixBase::maxCoeff() maxCoeff(&x,&y) \\endlink and \n\\link MatrixBase::minCoeff() minCoeff(&x,&y)\\endlink, which can be used to find\nthe location of the greatest or smallest coefficient in a Matrix or \nArray.\n\nThe arguments passed to a visitor are pointers to the variables where the\nrow and column position are to be stored. These variables should be of type\n\\link Eigen::Index Index \\endlink, as shown below:\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include Tutorial_ReductionsVisitorsBroadcasting_visitors.cpp\n</td>\n<td>\n\\verbinclude Tutorial_ReductionsVisitorsBroadcasting_visitors.out\n</td></tr></table>\n\nBoth functions also return the value of the minimum or maximum coefficient.\n\n\\section TutorialReductionsVisitorsBroadcastingPartialReductions Partial reductions\nPartial reductions are reductions that can operate column- or row-wise on a Matrix or \nArray, applying the reduction operation on each column or row and \nreturning a column or row vector with the corresponding values. Partial reductions are applied \nwith \\link DenseBase::colwise() colwise() \\endlink or \\link DenseBase::rowwise() rowwise() \\endlink.\n\nA simple example is obtaining the maximum of the elements \nin each column in a given matrix, storing the result in a row vector:\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include Tutorial_ReductionsVisitorsBroadcasting_colwise.cpp\n</td>\n<td>\n\\verbinclude Tutorial_ReductionsVisitorsBroadcasting_colwise.out\n</td></tr></table>\n\nThe same operation can be performed row-wise:\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include Tutorial_ReductionsVisitorsBroadcasting_rowwise.cpp\n</td>\n<td>\n\\verbinclude Tutorial_ReductionsVisitorsBroadcasting_rowwise.out\n</td></tr></table>\n\n<b>Note that column-wise operations return a row vector, while row-wise operations return a column vector.</b>\n\n\\subsection TutorialReductionsVisitorsBroadcastingPartialReductionsCombined Combining partial reductions with other operations\nIt is also possible to use the result of a partial reduction to do further processing.\nHere is another example that finds the column whose sum of elements is the maximum\n within a matrix. With column-wise partial reductions this can be coded as:\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include Tutorial_ReductionsVisitorsBroadcasting_maxnorm.cpp\n</td>\n<td>\n\\verbinclude Tutorial_ReductionsVisitorsBroadcasting_maxnorm.out\n</td></tr></table>\n\nThe previous example applies the \\link DenseBase::sum() sum() \\endlink reduction on each column\nthough the \\link DenseBase::colwise() colwise() \\endlink visitor, obtaining a new matrix whose\nsize is 1x4.\n\nTherefore, if\n\\f[\n\\mbox{m} = \\begin{bmatrix} 1 & 2 & 6 & 9 \\\\\n                    3 & 1 & 7 & 2 \\end{bmatrix}\n\\f]\n\nthen\n\n\\f[\n\\mbox{m.colwise().sum()} = \\begin{bmatrix} 4 & 3 & 13 & 11 \\end{bmatrix}\n\\f]\n\nThe \\link DenseBase::maxCoeff() maxCoeff() \\endlink reduction is finally applied \nto obtain the column index where the maximum sum is found, \nwhich is the column index 2 (third column) in this case.\n\n\n\\section TutorialReductionsVisitorsBroadcastingBroadcasting Broadcasting\nThe concept behind broadcasting is similar to partial reductions, with the difference that broadcasting \nconstructs an expression where a vector (column or row) is interpreted as a matrix by replicating it in \none direction.\n\nA simple example is to add a certain column vector to each column in a matrix. \nThis can be accomplished with:\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include Tutorial_ReductionsVisitorsBroadcasting_broadcast_simple.cpp\n</td>\n<td>\n\\verbinclude Tutorial_ReductionsVisitorsBroadcasting_broadcast_simple.out\n</td></tr></table>\n\nWe can interpret the instruction <tt>mat.colwise() += v</tt> in two equivalent ways. It adds the vector \\c v\nto every column of the matrix. Alternatively, it can be interpreted as repeating the vector \\c v four times to\nform a four-by-two matrix which is then added to \\c mat:\n\\f[\n\\begin{bmatrix} 1 & 2 & 6 & 9 \\\\ 3 & 1 & 7 & 2 \\end{bmatrix}\n+ \\begin{bmatrix} 0 & 0 & 0 & 0 \\\\ 1 & 1 & 1 & 1 \\end{bmatrix}\n= \\begin{bmatrix} 1 & 2 & 6 & 9 \\\\ 4 & 2 & 8 & 3 \\end{bmatrix}.\n\\f]\nThe operators <tt>-=</tt>, <tt>+</tt> and <tt>-</tt> can also be used column-wise and row-wise. On arrays, we \ncan also use the operators <tt>*=</tt>, <tt>/=</tt>, <tt>*</tt> and <tt>/</tt> to perform coefficient-wise \nmultiplication and division column-wise or row-wise. These operators are not available on matrices because it\nis not clear what they would do. If you want multiply column 0 of a matrix \\c mat with \\c v(0), column 1 with \n\\c v(1), and so on, then use <tt>mat = mat * v.asDiagonal()</tt>.\n\nIt is important to point out that the vector to be added column-wise or row-wise must be of type Vector,\nand cannot be a Matrix. If this is not met then you will get compile-time error. This also means that\nbroadcasting operations can only be applied with an object of type Vector, when operating with Matrix.\nThe same applies for the Array class, where the equivalent for VectorXf is ArrayXf. As always, you should\nnot mix arrays and matrices in the same expression.\n\nTo perform the same operation row-wise we can do:\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include Tutorial_ReductionsVisitorsBroadcasting_broadcast_simple_rowwise.cpp\n</td>\n<td>\n\\verbinclude Tutorial_ReductionsVisitorsBroadcasting_broadcast_simple_rowwise.out\n</td></tr></table>\n\n\\subsection TutorialReductionsVisitorsBroadcastingBroadcastingCombined Combining broadcasting with other operations\nBroadcasting can also be combined with other operations, such as Matrix or Array operations, \nreductions and partial reductions.\n\nNow that broadcasting, reductions and partial reductions have been introduced, we can dive into a more advanced example that finds\nthe nearest neighbour of a vector <tt>v</tt> within the columns of matrix <tt>m</tt>. The Euclidean distance will be used in this example,\ncomputing the squared Euclidean distance with the partial reduction named \\link MatrixBase::squaredNorm() squaredNorm() \\endlink:\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include Tutorial_ReductionsVisitorsBroadcasting_broadcast_1nn.cpp\n</td>\n<td>\n\\verbinclude Tutorial_ReductionsVisitorsBroadcasting_broadcast_1nn.out\n</td></tr></table>\n\nThe line that does the job is \n\\code\n  (m.colwise() - v).colwise().squaredNorm().minCoeff(&index);\n\\endcode\n\nWe will go step by step to understand what is happening:\n\n  - <tt>m.colwise() - v</tt> is a broadcasting operation, subtracting <tt>v</tt> from each column in <tt>m</tt>. The result of this operation\nis a new matrix whose size is the same as matrix <tt>m</tt>: \\f[\n  \\mbox{m.colwise() - v} = \n  \\begin{bmatrix}\n    -1 & 21 & 4 & 7 \\\\\n     0 & 8  & 4 & -1\n  \\end{bmatrix}\n\\f]\n\n  - <tt>(m.colwise() - v).colwise().squaredNorm()</tt> is a partial reduction, computing the squared norm column-wise. The result of\nthis operation is a row vector where each coefficient is the squared Euclidean distance between each column in <tt>m</tt> and <tt>v</tt>: \\f[\n  \\mbox{(m.colwise() - v).colwise().squaredNorm()} =\n  \\begin{bmatrix}\n     1 & 505 & 32 & 50\n  \\end{bmatrix}\n\\f]\n\n  - Finally, <tt>minCoeff(&index)</tt> is used to obtain the index of the column in <tt>m</tt> that is closest to <tt>v</tt> in terms of Euclidean\ndistance.\n\n*/\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/TutorialReshape.dox",
    "content": "namespace Eigen {\n\n/** \\eigenManualPage TutorialReshape Reshape\n\nSince the version 3.4, %Eigen exposes convenient methods to reshape a matrix to another matrix of different sizes or vector.\nAll cases are handled via the DenseBase::reshaped(NRowsType,NColsType) and DenseBase::reshaped() functions.\nThose functions do not perform in-place reshaping, but instead return a <i> view </i> on the input expression.\n\n\\eigenAutoToc\n\n\\section TutorialReshapeMat2Mat Reshaped 2D views\n\nThe more general reshaping transformation is handled via: `reshaped(nrows,ncols)`.\nHere is an example reshaping a 4x4 matrix to a 2x8 one:\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include MatrixBase_reshaped_int_int.cpp\n</td>\n<td>\n\\verbinclude MatrixBase_reshaped_int_int.out\n</td></tr></table>\n\nBy default, the input coefficients are always interpreted in column-major order regardless of the storage order of the input expression.\nFor more control on ordering, compile-time sizes, and automatic size deduction, please see de documentation of DenseBase::reshaped(NRowsType,NColsType) that contains all the details with many examples.\n\n\n\\section TutorialReshapeMat2Vec 1D linear views\n\nA very common usage of reshaping is to create a 1D linear view over a given 2D matrix or expression.\nIn this case, sizes can be deduced and thus omitted as in the following example:\n\n<table class=\"example\">\n<tr><th>Example:</th></tr>\n<tr><td>\n\\include MatrixBase_reshaped_to_vector.cpp\n</td></tr>\n<tr><th>Output:</th></tr>\n<tr><td>\n\\verbinclude MatrixBase_reshaped_to_vector.out\n</td></tr></table>\n\nThis shortcut always returns a column vector and by default input coefficients are always interpreted in column-major order.\nAgain, see the documentation of DenseBase::reshaped() for more control on the ordering.\n\n\\section TutorialReshapeInPlace\n\nThe above examples create reshaped views, but what about reshaping inplace a given matrix?\nOf course this task in only conceivable for matrix and arrays having runtime dimensions.\nIn many cases, this can be accomplished via PlainObjectBase::resize(Index,Index):\n\n<table class=\"example\">\n<tr><th>Example:</th></tr>\n<tr><td>\n\\include Tutorial_reshaped_vs_resize_1.cpp\n</td></tr>\n<tr><th>Output:</th></tr>\n<tr><td>\n\\verbinclude Tutorial_reshaped_vs_resize_1.out\n</td></tr></table>\n\nHowever beware that unlike \\c reshaped, the result of \\c resize depends on the input storage order.\nIt thus behaves similarly to `reshaped<AutoOrder>`:\n\n<table class=\"example\">\n<tr><th>Example:</th></tr>\n<tr><td>\n\\include Tutorial_reshaped_vs_resize_2.cpp\n</td></tr>\n<tr><th>Output:</th></tr>\n<tr><td>\n\\verbinclude Tutorial_reshaped_vs_resize_2.out\n</td></tr></table>\n\nFinally, assigning a reshaped matrix to itself is currently not supported and will result to undefined-behavior because of \\link TopicAliasing aliasing \\endlink.\nThe following is forbidden: \\code A = A.reshaped(2,8); \\endcode\nThis is OK: \\code A = A.reshaped(2,8).eval(); \\endcode\n\n*/\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/TutorialSTL.dox",
    "content": "namespace Eigen {\n\n/** \\eigenManualPage TutorialSTL STL iterators and algorithms\n\nSince the version 3.4, %Eigen's dense matrices and arrays provide STL compatible iterators.\nAs demonstrated below, this makes them naturally compatible with range-for-loops and STL's algorithms.\n\n\\eigenAutoToc\n\n\\section TutorialSTLVectors Iterating over 1D arrays and vectors \n\nAny dense 1D expressions exposes the pair of `begin()/end()` methods to iterate over them.\n\nThis directly enables c++11 range for loops:\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include Tutorial_range_for_loop_1d_cxx11.cpp\n</td>\n<td>\n\\verbinclude Tutorial_range_for_loop_1d_cxx11.out\n</td></tr></table>\n\nOne dimensional expressions can also easily be passed to STL algorithms:\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include Tutorial_std_sort.cpp\n</td>\n<td>\n\\verbinclude Tutorial_std_sort.out\n</td></tr></table>\n\nSimilar to `std::vector`, 1D expressions also exposes the pair of `cbegin()/cend()` methods to conveniently get const iterators on non-const object.\n\n\\section TutorialSTLMatrices Iterating over coefficients of 2D arrays and matrices\n\nSTL iterators are intrinsically designed to iterate over 1D structures.\nThis is why `begin()/end()` methods are disabled for 2D expressions.\nIterating over all coefficients of a 2D expressions is still easily accomplished by creating a 1D linear view through `reshaped()`:\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include Tutorial_range_for_loop_2d_cxx11.cpp\n</td>\n<td>\n\\verbinclude Tutorial_range_for_loop_2d_cxx11.out\n</td></tr></table>\n\n\\section TutorialSTLRowsColumns Iterating over rows or columns of 2D arrays and matrices\n\nIt is also possible to get iterators over rows or columns of 2D expressions.\nThose are available through the `rowwise()` and `colwise()` proxies.\nHere is an example sorting each row of a matrix:\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include Tutorial_std_sort_rows_cxx11.cpp\n</td>\n<td>\n\\verbinclude Tutorial_std_sort_rows_cxx11.out\n</td></tr></table>\n\n*/\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/TutorialSlicingIndexing.dox",
    "content": "namespace Eigen {\n\n/** \\eigenManualPage TutorialSlicingIndexing Slicing and Indexing\n\nThis page presents the numerous possibilities offered by `operator()` to index sub-set of rows and columns.\nThis API has been introduced in %Eigen 3.4.\nIt supports all the feature proposed by the \\link TutorialBlockOperations block API \\endlink, and much more.\nIn particular, it supports \\b slicing that consists in taking a set of rows, columns, or elements, uniformly spaced within a matrix or indexed from an array of indices.\n\n\\eigenAutoToc\n\n\\section TutorialSlicingOverview Overview\n\nAll the aforementioned operations are handled through the generic DenseBase::operator()(const RowIndices&, const ColIndices&) method.\nEach argument can be:\n  - An integer indexing a single row or column, including symbolic indices.\n  - The symbol Eigen::all representing the whole set of respective rows or columns in increasing order.\n  - An ArithmeticSequence as constructed by the Eigen::seq, Eigen::seqN, or Eigen::lastN functions.\n  - Any 1D vector/array of integers including %Eigen's vector/array, expressions, std::vector, std::array, as well as plain C arrays: `int[N]`.\n\nMore generally, it can accepts any object exposing the following two member functions:\n  \\code\n  <integral type> operator[](<integral type>) const;\n  <integral type> size() const;\n  \\endcode\nwhere `<integral type>` stands for any integer type compatible with Eigen::Index (i.e. `std::ptrdiff_t`).\n\n\\section TutorialSlicingBasic Basic slicing\n\nTaking a set of rows, columns, or elements, uniformly spaced within a matrix or vector is achieved through the Eigen::seq or Eigen::seqN functions where \"seq\" stands for arithmetic sequence. Their signatures are summarized below:\n\n<table class=\"manual\">\n<tr>\n  <th>function</th>\n  <th>description</th>\n  <th>example</th>\n</tr>\n<tr>\n  <td>\\code seq(firstIdx,lastIdx) \\endcode</td>\n  <td>represents the sequence of integers ranging from \\c firstIdx to \\c lastIdx</td>\n  <td>\\code seq(2,5) <=> {2,3,4,5} \\endcode</td>\n</tr>\n<tr>\n  <td>\\code seq(firstIdx,lastIdx,incr) \\endcode</td>\n  <td>same but using the increment \\c incr to advance from one index to the next</td>\n  <td>\\code seq(2,8,2) <=> {2,4,6,8} \\endcode</td>\n</tr>\n<tr>\n  <td>\\code seqN(firstIdx,size) \\endcode</td>\n  <td>represents the sequence of \\c size integers starting from \\c firstIdx</td>\n  <td>\\code seqN(2,5) <=> {2,3,4,5,6} \\endcode</td>\n</tr>\n<tr>\n  <td>\\code seqN(firstIdx,size,incr) \\endcode</td>\n  <td>same but using the increment \\c incr to advance from one index to the next</td>\n  <td>\\code seqN(2,3,3) <=> {2,5,8} \\endcode</td>\n</tr>\n</table>\n\nThe \\c firstIdx and \\c lastIdx parameters can also be defined with the help of the Eigen::last symbol representing the index of the last row, column or element of the underlying matrix/vector once the arithmetic sequence is passed to it through operator().\nHere are some examples for a 2D array/matrix \\c A and a 1D array/vector \\c v.\n<table class=\"manual\">\n<tr>\n  <th>Intent</th>\n  <th>Code</th>\n  <th>Block-API equivalence</th>\n</tr>\n<tr>\n  <td>Bottom-left corner starting at row \\c i with \\c n columns</td>\n  <td>\\code A(seq(i,last), seqN(0,n)) \\endcode</td>\n  <td>\\code A.bottomLeftCorner(A.rows()-i,n) \\endcode</td>\n</tr>\n<tr>\n  <td>%Block starting at \\c i,j having \\c m rows, and \\c n columns</td>\n  <td>\\code A(seqN(i,m), seqN(i,n) \\endcode</td>\n  <td>\\code A.block(i,j,m,n) \\endcode</td>\n</tr>\n<tr>\n  <td>%Block starting at \\c i0,j0 and ending at \\c i1,j1</td>\n  <td>\\code A(seq(i0,i1), seq(j0,j1) \\endcode</td>\n  <td>\\code A.block(i0,j0,i1-i0+1,j1-j0+1) \\endcode</td>\n</tr>\n<tr>\n  <td>Even columns of A</td>\n  <td>\\code A(all, seq(0,last,2)) \\endcode</td>\n  <td></td>\n</tr>\n<tr>\n  <td>First \\c n odd rows A</td>\n  <td>\\code A(seqN(1,n,2), all) \\endcode</td>\n  <td></td>\n</tr>\n<tr>\n  <td>The last past one column</td>\n  <td>\\code A(all, last-1) \\endcode</td>\n  <td>\\code A.col(A.cols()-2) \\endcode</td>\n</tr>\n<tr>\n  <td>The middle row</td>\n  <td>\\code A(last/2,all) \\endcode</td>\n  <td>\\code A.row((A.rows()-1)/2) \\endcode</td>\n</tr>\n<tr>\n  <td>Last elements of v starting at i</td>\n  <td>\\code v(seq(i,last)) \\endcode</td>\n  <td>\\code v.tail(v.size()-i) \\endcode</td>\n</tr>\n<tr>\n  <td>Last \\c n elements of v</td>\n  <td>\\code v(seq(last+1-n,last)) \\endcode</td>\n  <td>\\code v.tail(n) \\endcode</td>\n</tr>\n</table>\n\nAs seen in the last exemple, referencing the <i> last n </i> elements (or rows/columns) is a bit cumbersome to write.\nThis becomes even more tricky and error prone with a non-default increment.\nHere comes \\link Eigen::lastN(SizeType) Eigen::lastN(size) \\endlink, and \\link Eigen::lastN(SizeType,IncrType) Eigen::lastN(size,incr) \\endlink:\n\n<table class=\"manual\">\n<tr>\n  <th>Intent</th>\n  <th>Code</th>\n  <th>Block-API equivalence</th>\n</tr>\n<tr>\n  <td>Last \\c n elements of v</td>\n  <td>\\code v(lastN(n)) \\endcode</td>\n  <td>\\code v.tail(n) \\endcode</td>\n</tr>\n<tr>\n  <td>Bottom-right corner of A of size \\c m times \\c n</td>\n  <td>\\code v(lastN(m), lastN(n)) \\endcode</td>\n  <td>\\code A.bottomRightCorner(m,n) \\endcode</td>\n</tr>\n<tr>\n  <td>Bottom-right corner of A of size \\c m times \\c n</td>\n  <td>\\code v(lastN(m), lastN(n)) \\endcode</td>\n  <td>\\code A.bottomRightCorner(m,n) \\endcode</td>\n</tr>\n<tr>\n  <td>Last \\c n columns taking 1 column over 3</td>\n  <td>\\code A(all, lastN(n,3)) \\endcode</td>\n  <td></td>\n</tr>\n</table>\n\n\\section TutorialSlicingFixed Compile time size and increment\n\nIn terms of performance, %Eigen and the compiler can take advantage of compile-time size and increment.\nTo this end, you can enforce compile-time parameters using Eigen::fix<val>.\nSuch compile-time value can be combined with the Eigen::last symbol:\n\\code v(seq(last-fix<7>, last-fix<2>))\n\\endcode\nIn this example %Eigen knowns at compile-time that the returned expression has 6 elements.\nIt is equivalent to:\n\\code v(seqN(last-7, fix<6>))\n\\endcode\n\nWe can revisit the <i>even columns of A</i> example as follows:\n\\code A(all, seq(0,last,fix<2>))\n\\endcode\n\n\n\\section TutorialSlicingReverse Reverse order\n\nRow/column indices can also be enumerated in decreasing order using a negative increment.\nFor instance, one over two columns of A from the column 20 to 10:\n\\code A(all, seq(20, 10, fix<-2>))\n\\endcode\nThe last \\c n rows starting from the last one:\n\\code A(seqN(last, n, fix<-1>), all)\n\\endcode\nYou can also use the ArithmeticSequence::reverse() method to reverse its order.\nThe previous example can thus also be written as:\n\\code A(lastN(n).reverse(), all)\n\\endcode\n\n\n\\section TutorialSlicingArray Array of indices\n\nThe generic `operator()` can also takes as input an arbitrary list of row or column indices stored as either an `ArrayXi`, a `std::vector<int>`, `std::array<int,N>`, etc.\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include Slicing_stdvector_cxx11.cpp\n</td>\n<td>\n\\verbinclude Slicing_stdvector_cxx11.out\n</td></tr></table>\n\nYou can also directly pass a static array:\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include Slicing_rawarray_cxx11.cpp\n</td>\n<td>\n\\verbinclude Slicing_rawarray_cxx11.out\n</td></tr></table>\n\nor expressions:\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include Slicing_arrayexpr.cpp\n</td>\n<td>\n\\verbinclude Slicing_arrayexpr.out\n</td></tr></table>\n\nWhen passing an object with a compile-time size such as `Array4i`, `std::array<int,N>`, or a static array, then the returned expression also exhibit compile-time dimensions.\n\n\\section TutorialSlicingCustomArray Custom index list\n\nMore generally, `operator()` can accept as inputs any object \\c ind of type \\c T compatible with:\n\\code\nIndex s = ind.size(); or Index s = size(ind);\nIndex i;\ni = ind[i];\n\\endcode\n\nThis means you can easily build your own fancy sequence generator and pass it to `operator()`.\nHere is an exemple enlarging a given matrix while padding the additional first rows and columns through repetition:\n\n<table class=\"example\">\n<tr><th>Example:</th><th>Output:</th></tr>\n<tr><td>\n\\include Slicing_custom_padding_cxx11.cpp\n</td>\n<td>\n\\verbinclude Slicing_custom_padding_cxx11.out\n</td></tr></table>\n\n<br>\n\n*/\n\n/*\nTODO add:\nso_repeat_inner.cpp\nso_repeleme.cpp\n*/\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/TutorialSparse.dox",
    "content": "namespace Eigen {\n\n/** \\eigenManualPage TutorialSparse Sparse matrix manipulations\n\n\\eigenAutoToc\n\nManipulating and solving sparse problems involves various modules which are summarized below:\n\n<table class=\"manual\">\n<tr><th>Module</th><th>Header file</th><th>Contents</th></tr>\n<tr><td>\\link SparseCore_Module SparseCore \\endlink</td><td>\\code#include <Eigen/SparseCore>\\endcode</td><td>SparseMatrix and SparseVector classes, matrix assembly, basic sparse linear algebra (including sparse triangular solvers)</td></tr>\n<tr><td>\\link SparseCholesky_Module SparseCholesky \\endlink</td><td>\\code#include <Eigen/SparseCholesky>\\endcode</td><td>Direct sparse LLT and LDLT Cholesky factorization to solve sparse self-adjoint positive definite problems</td></tr>\n<tr><td>\\link SparseLU_Module SparseLU \\endlink</td><td>\\code #include<Eigen/SparseLU> \\endcode</td>\n<td>%Sparse LU factorization to solve general square sparse systems</td></tr>\n<tr><td>\\link SparseQR_Module SparseQR \\endlink</td><td>\\code #include<Eigen/SparseQR>\\endcode </td><td>%Sparse QR factorization for solving sparse linear least-squares problems</td></tr>\n<tr><td>\\link IterativeLinearSolvers_Module IterativeLinearSolvers \\endlink</td><td>\\code#include <Eigen/IterativeLinearSolvers>\\endcode</td><td>Iterative solvers to solve large general linear square problems (including self-adjoint positive definite problems)</td></tr>\n<tr><td>\\link Sparse_Module Sparse \\endlink</td><td>\\code#include <Eigen/Sparse>\\endcode</td><td>Includes all the above modules</td></tr>\n</table>\n\n\\section TutorialSparseIntro Sparse matrix format\n\nIn many applications (e.g., finite element methods) it is common to deal with very large matrices where only a few coefficients are different from zero.  In such cases, memory consumption can be reduced and performance increased by using a specialized representation storing only the nonzero coefficients. Such a matrix is called a sparse matrix.\n\n\\b The \\b %SparseMatrix \\b class\n\nThe class SparseMatrix is the main sparse matrix representation of Eigen's sparse module; it offers high performance and low memory usage.\nIt implements a more versatile variant of the widely-used Compressed Column (or Row) Storage scheme.\nIt consists of four compact arrays:\n - \\c Values: stores the coefficient values of the non-zeros.\n - \\c InnerIndices: stores the row (resp. column) indices of the non-zeros.\n - \\c OuterStarts: stores for each column (resp. row) the index of the first non-zero in the previous two arrays.\n - \\c InnerNNZs: stores the number of non-zeros of each column (resp. row).\nThe word \\c inner refers to an \\em inner \\em vector that is a column for a column-major matrix, or a row for a row-major matrix.\nThe word \\c outer refers to the other direction.\n\nThis storage scheme is better explained on an example. The following matrix\n<table class=\"manual\">\n<tr><td> 0</td><td>3</td><td> 0</td><td>0</td><td> 0</td></tr>\n<tr><td>22</td><td>0</td><td> 0</td><td>0</td><td>17</td></tr>\n<tr><td> 7</td><td>5</td><td> 0</td><td>1</td><td> 0</td></tr>\n<tr><td> 0</td><td>0</td><td> 0</td><td>0</td><td> 0</td></tr>\n<tr><td> 0</td><td>0</td><td>14</td><td>0</td><td> 8</td></tr>\n</table>\n\nand one of its possible sparse, \\b column \\b major representation:\n<table class=\"manual\">\n<tr><td>Values:</td>        <td>22</td><td>7</td><td>_</td><td>3</td><td>5</td><td>14</td><td>_</td><td>_</td><td>1</td><td>_</td><td>17</td><td>8</td></tr>\n<tr><td>InnerIndices:</td>  <td> 1</td><td>2</td><td>_</td><td>0</td><td>2</td><td> 4</td><td>_</td><td>_</td><td>2</td><td>_</td><td> 1</td><td>4</td></tr>\n</table>\n<table class=\"manual\">\n<tr><td>OuterStarts:</td><td>0</td><td>3</td><td>5</td><td>8</td><td>10</td><td>\\em 12 </td></tr>\n<tr><td>InnerNNZs:</td>    <td>2</td><td>2</td><td>1</td><td>1</td><td> 2</td><td></td></tr>\n</table>\n\nCurrently the elements of a given inner vector are guaranteed to be always sorted by increasing inner indices.\nThe \\c \"_\" indicates available free space to quickly insert new elements.\nAssuming no reallocation is needed, the insertion of a random element is therefore in O(nnz_j) where nnz_j is the number of nonzeros of the respective inner vector.\nOn the other hand, inserting elements with increasing inner indices in a given inner vector is much more efficient since this only requires to increase the respective \\c InnerNNZs entry that is a O(1) operation.\n\nThe case where no empty space is available is a special case, and is referred as the \\em compressed mode.\nIt corresponds to the widely used Compressed Column (or Row) Storage schemes (CCS or CRS).\nAny SparseMatrix can be turned to this form by calling the SparseMatrix::makeCompressed() function.\nIn this case, one can remark that the \\c InnerNNZs array is redundant with \\c OuterStarts because we the equality: \\c InnerNNZs[j] = \\c OuterStarts[j+1]-\\c OuterStarts[j].\nTherefore, in practice a call to SparseMatrix::makeCompressed() frees this buffer.\n\nIt is worth noting that most of our wrappers to external libraries requires compressed matrices as inputs.\n\nThe results of %Eigen's operations always produces \\b compressed sparse matrices.\nOn the other hand, the insertion of a new element into a SparseMatrix converts this later to the \\b uncompressed mode.\n\nHere is the previous matrix represented in compressed mode:\n<table class=\"manual\">\n<tr><td>Values:</td>        <td>22</td><td>7</td><td>3</td><td>5</td><td>14</td><td>1</td><td>17</td><td>8</td></tr>\n<tr><td>InnerIndices:</td>  <td> 1</td><td>2</td><td>0</td><td>2</td><td> 4</td><td>2</td><td> 1</td><td>4</td></tr>\n</table>\n<table class=\"manual\">\n<tr><td>OuterStarts:</td><td>0</td><td>2</td><td>4</td><td>5</td><td>6</td><td>\\em 8 </td></tr>\n</table>\n\nA SparseVector is a special case of a SparseMatrix where only the \\c Values and \\c InnerIndices arrays are stored.\nThere is no notion of compressed/uncompressed mode for a SparseVector.\n\n\n\\section TutorialSparseExample First example\n\nBefore describing each individual class, let's start with the following typical example: solving the Laplace equation \\f$ \\Delta u = 0 \\f$ on a regular 2D grid using a finite difference scheme and Dirichlet boundary conditions.\nSuch problem can be mathematically expressed as a linear problem of the form \\f$ Ax=b \\f$ where \\f$ x \\f$ is the vector of \\c m unknowns (in our case, the values of the pixels), \\f$ b \\f$ is the right hand side vector resulting from the boundary conditions, and \\f$ A \\f$ is an \\f$ m \\times m \\f$ matrix containing only a few non-zero elements resulting from the discretization of the Laplacian operator.\n\n<table class=\"manual\">\n<tr><td>\n\\include Tutorial_sparse_example.cpp\n</td>\n<td>\n\\image html Tutorial_sparse_example.jpeg\n</td></tr></table>\n\nIn this example, we start by defining a column-major sparse matrix type of double \\c SparseMatrix<double>, and a triplet list of the same scalar type \\c  Triplet<double>. A triplet is a simple object representing a non-zero entry as the triplet: \\c row index, \\c column index, \\c value.\n\nIn the main function, we declare a list \\c coefficients of triplets (as a std vector) and the right hand side vector \\f$ b \\f$ which are filled by the \\a buildProblem function.\nThe raw and flat list of non-zero entries is then converted to a true SparseMatrix object \\c A.\nNote that the elements of the list do not have to be sorted, and possible duplicate entries will be summed up.\n\nThe last step consists of effectively solving the assembled problem.\nSince the resulting matrix \\c A is symmetric by construction, we can perform a direct Cholesky factorization via the SimplicialLDLT class which behaves like its LDLT counterpart for dense objects.\n\nThe resulting vector \\c x contains the pixel values as a 1D array which is saved to a jpeg file shown on the right of the code above.\n\nDescribing the \\a buildProblem and \\a save functions is out of the scope of this tutorial. They are given \\ref TutorialSparse_example_details \"here\" for the curious and reproducibility purpose.\n\n\n\n\n\\section TutorialSparseSparseMatrix The SparseMatrix class\n\n\\b %Matrix \\b and \\b vector \\b properties \\n\n\nThe SparseMatrix and SparseVector classes take three template arguments:\n * the scalar type (e.g., double)\n * the storage order (ColMajor or RowMajor, the default is ColMajor)\n * the inner index type (default is \\c int).\n\nAs for dense Matrix objects, constructors takes the size of the object.\nHere are some examples:\n\n\\code\nSparseMatrix<std::complex<float> > mat(1000,2000);         // declares a 1000x2000 column-major compressed sparse matrix of complex<float>\nSparseMatrix<double,RowMajor> mat(1000,2000);              // declares a 1000x2000 row-major compressed sparse matrix of double\nSparseVector<std::complex<float> > vec(1000);              // declares a column sparse vector of complex<float> of size 1000\nSparseVector<double,RowMajor> vec(1000);                   // declares a row sparse vector of double of size 1000\n\\endcode\n\nIn the rest of the tutorial, \\c mat and \\c vec represent any sparse-matrix and sparse-vector objects, respectively.\n\nThe dimensions of a matrix can be queried using the following functions:\n<table class=\"manual\">\n<tr><td>Standard \\n dimensions</td><td>\\code\nmat.rows()\nmat.cols()\\endcode</td>\n<td>\\code\nvec.size() \\endcode</td>\n</tr>\n<tr><td>Sizes along the \\n inner/outer dimensions</td><td>\\code\nmat.innerSize()\nmat.outerSize()\\endcode</td>\n<td></td>\n</tr>\n<tr><td>Number of non \\n zero coefficients</td><td>\\code\nmat.nonZeros() \\endcode</td>\n<td>\\code\nvec.nonZeros() \\endcode</td></tr>\n</table>\n\n\n\\b Iterating \\b over \\b the \\b nonzero \\b coefficients \\n\n\nRandom access to the elements of a sparse object can be done through the \\c coeffRef(i,j) function.\nHowever, this function involves a quite expensive binary search.\nIn most cases, one only wants to iterate over the non-zeros elements. This is achieved by a standard loop over the outer dimension, and then by iterating over the non-zeros of the current inner vector via an InnerIterator. Thus, the non-zero entries have to be visited in the same order than the storage order.\nHere is an example:\n<table class=\"manual\">\n<tr><td>\n\\code\nSparseMatrix<double> mat(rows,cols);\nfor (int k=0; k<mat.outerSize(); ++k)\n  for (SparseMatrix<double>::InnerIterator it(mat,k); it; ++it)\n  {\n    it.value();\n    it.row();   // row index\n    it.col();   // col index (here it is equal to k)\n    it.index(); // inner index, here it is equal to it.row()\n  }\n\\endcode\n</td><td>\n\\code\nSparseVector<double> vec(size);\nfor (SparseVector<double>::InnerIterator it(vec); it; ++it)\n{\n  it.value(); // == vec[ it.index() ]\n  it.index();\n}\n\\endcode\n</td></tr>\n</table>\nFor a writable expression, the referenced value can be modified using the valueRef() function.\nIf the type of the sparse matrix or vector depends on a template parameter, then the \\c typename keyword is\nrequired to indicate that \\c InnerIterator denotes a type; see \\ref TopicTemplateKeyword for details.\n\n\n\\section TutorialSparseFilling Filling a sparse matrix\n\nBecause of the special storage scheme of a SparseMatrix, special care has to be taken when adding new nonzero entries.\nFor instance, the cost of a single purely random insertion into a SparseMatrix is \\c O(nnz), where \\c nnz is the current number of non-zero coefficients.\n\nThe simplest way to create a sparse matrix while guaranteeing good performance is thus to first build a list of so-called \\em triplets, and then convert it to a SparseMatrix.\n\nHere is a typical usage example:\n\\code\ntypedef Eigen::Triplet<double> T;\nstd::vector<T> tripletList;\ntripletList.reserve(estimation_of_entries);\nfor(...)\n{\n  // ...\n  tripletList.push_back(T(i,j,v_ij));\n}\nSparseMatrixType mat(rows,cols);\nmat.setFromTriplets(tripletList.begin(), tripletList.end());\n// mat is ready to go!\n\\endcode\nThe \\c std::vector of triplets might contain the elements in arbitrary order, and might even contain duplicated elements that will be summed up by setFromTriplets().\nSee the SparseMatrix::setFromTriplets() function and class Triplet for more details.\n\n\nIn some cases, however, slightly higher performance, and lower memory consumption can be reached by directly inserting the non-zeros into the destination matrix.\nA typical scenario of this approach is illustrated below:\n\\code\n1: SparseMatrix<double> mat(rows,cols);         // default is column major\n2: mat.reserve(VectorXi::Constant(cols,6));\n3: for each i,j such that v_ij != 0\n4:   mat.insert(i,j) = v_ij;                    // alternative: mat.coeffRef(i,j) += v_ij;\n5: mat.makeCompressed();                        // optional\n\\endcode\n\n- The key ingredient here is the line 2 where we reserve room for 6 non-zeros per column. In many cases, the number of non-zeros per column or row can easily be known in advance. If it varies significantly for each inner vector, then it is possible to specify a reserve size for each inner vector by providing a vector object with an operator[](int j) returning the reserve size of the \\c j-th inner vector (e.g., via a VectorXi or std::vector<int>). If only a rought estimate of the number of nonzeros per inner-vector can be obtained, it is highly recommended to overestimate it rather than the opposite. If this line is omitted, then the first insertion of a new element will reserve room for 2 elements per inner vector.\n- The line 4 performs a sorted insertion. In this example, the ideal case is when the \\c j-th column is not full and contains non-zeros whose inner-indices are smaller than \\c i. In this case, this operation boils down to trivial O(1) operation.\n- When calling insert(i,j) the element \\c i \\c ,j must not already exists, otherwise use the coeffRef(i,j) method that will allow to, e.g., accumulate values. This method first performs a binary search and finally calls insert(i,j) if the element does not already exist. It is more flexible than insert() but also more costly.\n- The line 5 suppresses the remaining empty space and transforms the matrix into a compressed column storage.\n\n\n\n\\section TutorialSparseFeatureSet Supported operators and functions\n\nBecause of their special storage format, sparse matrices cannot offer the same level of flexibility than dense matrices.\nIn Eigen's sparse module we chose to expose only the subset of the dense matrix API which can be efficiently implemented.\nIn the following \\em sm denotes a sparse matrix, \\em sv a sparse vector, \\em dm a dense matrix, and \\em dv a dense vector.\n\n\\subsection TutorialSparse_BasicOps Basic operations\n\n%Sparse expressions support most of the unary and binary coefficient wise operations:\n\\code\nsm1.real()   sm1.imag()   -sm1                    0.5*sm1\nsm1+sm2      sm1-sm2      sm1.cwiseProduct(sm2)\n\\endcode\nHowever, <strong>a strong restriction is that the storage orders must match</strong>. For instance, in the following example:\n\\code\nsm4 = sm1 + sm2 + sm3;\n\\endcode\nsm1, sm2, and sm3 must all be row-major or all column-major.\nOn the other hand, there is no restriction on the target matrix sm4.\nFor instance, this means that for computing \\f$ A^T + A \\f$, the matrix \\f$ A^T \\f$ must be evaluated into a temporary matrix of compatible storage order:\n\\code\nSparseMatrix<double> A, B;\nB = SparseMatrix<double>(A.transpose()) + A;\n\\endcode\n\nBinary coefficient wise operators can also mix sparse and dense expressions:\n\\code\nsm2 = sm1.cwiseProduct(dm1);\ndm2 = sm1 + dm1;\ndm2 = dm1 - sm1;\n\\endcode\nPerformance-wise, the adding/subtracting sparse and dense matrices is better performed in two steps. For instance, instead of doing <tt>dm2 = sm1 + dm1</tt>, better write:\n\\code\ndm2 = dm1;\ndm2 += sm1;\n\\endcode\nThis version has the advantage to fully exploit the higher performance of dense storage (no indirection, SIMD, etc.), and to pay the cost of slow sparse evaluation on the few non-zeros of the sparse matrix only.\n\n\n%Sparse expressions also support transposition:\n\\code\nsm1 = sm2.transpose();\nsm1 = sm2.adjoint();\n\\endcode\nHowever, there is no transposeInPlace() method.\n\n\n\\subsection TutorialSparse_Products Matrix products\n\n%Eigen supports various kind of sparse matrix products which are summarize below:\n  - \\b sparse-dense:\n    \\code\ndv2 = sm1 * dv1;\ndm2 = dm1 * sm1.adjoint();\ndm2 = 2. * sm1 * dm1;\n    \\endcode\n  - \\b symmetric \\b sparse-dense. The product of a sparse symmetric matrix with a dense matrix (or vector) can also be optimized by specifying the symmetry with selfadjointView():\n    \\code\ndm2 = sm1.selfadjointView<>() * dm1;        // if all coefficients of A are stored\ndm2 = A.selfadjointView<Upper>() * dm1;     // if only the upper part of A is stored\ndm2 = A.selfadjointView<Lower>() * dm1;     // if only the lower part of A is stored\n    \\endcode\n  - \\b sparse-sparse. For sparse-sparse products, two different algorithms are available. The default one is conservative and preserve the explicit zeros that might appear:\n    \\code\nsm3 = sm1 * sm2;\nsm3 = 4 * sm1.adjoint() * sm2;\n    \\endcode\n    The second algorithm prunes on the fly the explicit zeros, or the values smaller than a given threshold. It is enabled and controlled through the prune() functions:\n    \\code\nsm3 = (sm1 * sm2).pruned();                  // removes numerical zeros\nsm3 = (sm1 * sm2).pruned(ref);               // removes elements much smaller than ref\nsm3 = (sm1 * sm2).pruned(ref,epsilon);       // removes elements smaller than ref*epsilon\n    \\endcode\n\n  - \\b permutations. Finally, permutations can be applied to sparse matrices too:\n    \\code\nPermutationMatrix<Dynamic,Dynamic> P = ...;\nsm2 = P * sm1;\nsm2 = sm1 * P.inverse();\nsm2 = sm1.transpose() * P;\n    \\endcode\n\n\n\\subsection TutorialSparse_SubMatrices Block operations\n\nRegarding read-access, sparse matrices expose the same API than for dense matrices to access to sub-matrices such as blocks, columns, and rows. See \\ref TutorialBlockOperations for a detailed introduction.\nHowever, for performance reasons, writing to a sub-sparse-matrix is much more limited, and currently only contiguous sets of columns (resp. rows) of a column-major (resp. row-major) SparseMatrix are writable. Moreover, this information has to be known at compile-time, leaving out methods such as <tt>block(...)</tt> and <tt>corner*(...)</tt>. The available API for write-access to a SparseMatrix are summarized below:\n\\code\nSparseMatrix<double,ColMajor> sm1;\nsm1.col(j) = ...;\nsm1.leftCols(ncols) = ...;\nsm1.middleCols(j,ncols) = ...;\nsm1.rightCols(ncols) = ...;\n\nSparseMatrix<double,RowMajor> sm2;\nsm2.row(i) = ...;\nsm2.topRows(nrows) = ...;\nsm2.middleRows(i,nrows) = ...;\nsm2.bottomRows(nrows) = ...;\n\\endcode\n\nIn addition, sparse matrices expose the SparseMatrixBase::innerVector() and SparseMatrixBase::innerVectors() methods, which are aliases to the col/middleCols methods for a column-major storage, and to the row/middleRows methods for a row-major storage.\n\n\\subsection TutorialSparse_TriangularSelfadjoint Triangular and selfadjoint views\n\nJust as with dense matrices, the triangularView() function can be used to address a triangular part of the matrix, and perform triangular solves with a dense right hand side:\n\\code\ndm2 = sm1.triangularView<Lower>(dm1);\ndv2 = sm1.transpose().triangularView<Upper>(dv1);\n\\endcode\n\nThe selfadjointView() function permits various operations:\n - optimized sparse-dense matrix products:\n    \\code\ndm2 = sm1.selfadjointView<>() * dm1;        // if all coefficients of A are stored\ndm2 = A.selfadjointView<Upper>() * dm1;     // if only the upper part of A is stored\ndm2 = A.selfadjointView<Lower>() * dm1;     // if only the lower part of A is stored\n    \\endcode\n - copy of triangular parts:\n    \\code\nsm2 = sm1.selfadjointView<Upper>();                               // makes a full selfadjoint matrix from the upper triangular part\nsm2.selfadjointView<Lower>() = sm1.selfadjointView<Upper>();      // copies the upper triangular part to the lower triangular part\n    \\endcode\n - application of symmetric permutations:\n \\code\nPermutationMatrix<Dynamic,Dynamic> P = ...;\nsm2 = A.selfadjointView<Upper>().twistedBy(P);                                // compute P S P' from the upper triangular part of A, and make it a full matrix\nsm2.selfadjointView<Lower>() = A.selfadjointView<Lower>().twistedBy(P);       // compute P S P' from the lower triangular part of A, and then only compute the lower part\n \\endcode\n\nPlease, refer to the \\link SparseQuickRefPage Quick Reference \\endlink  guide for the list of supported operations. The list of linear solvers available is \\link TopicSparseSystems here. \\endlink\n\n*/\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/TutorialSparse_example_details.dox",
    "content": "/**\n\\page TutorialSparse_example_details\n\\include Tutorial_sparse_example_details.cpp\n*/\n"
  },
  {
    "path": "3rdparty/eigen3/doc/UnalignedArrayAssert.dox",
    "content": "namespace Eigen {\n\n/** \\eigenManualPage TopicUnalignedArrayAssert Explanation of the assertion on unaligned arrays\n\nHello! You are seeing this webpage because your program terminated on an assertion failure like this one:\n<pre>\nmy_program: path/to/eigen/Eigen/src/Core/DenseStorage.h:44:\nEigen::internal::matrix_array<T, Size, MatrixOptions, Align>::internal::matrix_array()\n[with T = double, int Size = 2, int MatrixOptions = 2, bool Align = true]:\nAssertion `(reinterpret_cast<size_t>(array) & (sizemask)) == 0 && \"this assertion\nis explained here: http://eigen.tuxfamily.org/dox-devel/group__TopicUnalignedArrayAssert.html\n**** READ THIS WEB PAGE !!! ****\"' failed.\n</pre>\n\nThere are 4 known causes for this issue.\nIf you can target \\cpp17 only with a recent compiler (e.g., GCC>=7, clang>=5, MSVC>=19.12), then you're lucky: enabling c++17 should be enough (if not, please <a href=\"http://eigen.tuxfamily.org/bz/\">report</a> to us).\nOtherwise, please read on to understand those issues and learn how to fix them.\n\n\\eigenAutoToc\n\n\\section where Where in my own code is the cause of the problem?\n\nFirst of all, you need to find out where in your own code this assertion was triggered from. At first glance, the error message doesn't look helpful, as it refers to a file inside Eigen! However, since your program crashed, if you can reproduce the crash, you can get a backtrace using any debugger. For example, if you're using GCC, you can use the GDB debugger as follows:\n\\code\n$ gdb ./my_program          # Start GDB on your program\n> run                       # Start running your program\n...                         # Now reproduce the crash!\n> bt                        # Obtain the backtrace\n\\endcode\nNow that you know precisely where in your own code the problem is happening, read on to understand what you need to change.\n\n\\section c1 Cause 1: Structures having Eigen objects as members\n\nIf you have code like this,\n\n\\code\nclass Foo\n{\n  //...\n  Eigen::Vector4d v;\n  //...\n};\n//...\nFoo *foo = new Foo;\n\\endcode\n\nthen you need to read this separate page: \\ref TopicStructHavingEigenMembers \"Structures Having Eigen Members\".\n\nNote that here, Eigen::Vector4d is only used as an example, more generally the issue arises for all \\ref TopicFixedSizeVectorizable \"fixed-size vectorizable Eigen types\".\n\n\\section c2 Cause 2: STL Containers or manual memory allocation\n\nIf you use STL Containers such as std::vector, std::map, ..., with %Eigen objects, or with classes containing %Eigen objects, like this,\n\n\\code\nstd::vector<Eigen::Matrix2d> my_vector;\nstruct my_class { ... Eigen::Matrix2d m; ... };\nstd::map<int, my_class> my_map;\n\\endcode\n\nthen you need to read this separate page: \\ref TopicStlContainers \"Using STL Containers with Eigen\".\n\nNote that here, Eigen::Matrix2d is only used as an example, more generally the issue arises for all \\ref TopicFixedSizeVectorizable \"fixed-size vectorizable Eigen types\" and \\ref TopicStructHavingEigenMembers \"structures having such Eigen objects as member\".\n\nThe same issue will be exhibited by any classes/functions by-passing operator new to allocate memory, that is, by performing custom memory allocation followed by calls to the placement new operator. This is for instance typically the case of \\c `std::make_shared` or `std::allocate_shared` for which is the solution is to use an \\ref aligned_allocator \"aligned allocator\" as detailed in the \\ref TopicStlContainers \"solution for STL containers\".\n\n\\section c3 Cause 3: Passing Eigen objects by value\n\nIf some function in your code is getting an %Eigen object passed by value, like this,\n\n\\code\nvoid func(Eigen::Vector4d v);\n\\endcode\n\nthen you need to read this separate page: \\ref TopicPassingByValue \"Passing Eigen objects by value to functions\".\n\nNote that here, Eigen::Vector4d is only used as an example, more generally the issue arises for all \\ref TopicFixedSizeVectorizable \"fixed-size vectorizable Eigen types\".\n\n\\section c4 Cause 4: Compiler making a wrong assumption on stack alignment (for instance GCC on Windows)\n\nThis is a must-read for people using GCC on Windows (like MinGW or TDM-GCC). If you have this assertion failure in an innocent function declaring a local variable like this:\n\n\\code\nvoid foo()\n{\n  Eigen::Quaternionf q;\n  //...\n}\n\\endcode\n\nthen you need to read this separate page: \\ref TopicWrongStackAlignment \"Compiler making a wrong assumption on stack alignment\".\n\nNote that here, Eigen::Quaternionf is only used as an example, more generally the issue arises for all \\ref TopicFixedSizeVectorizable \"fixed-size vectorizable Eigen types\".\n\n\n\\section explanation General explanation of this assertion\n\n\\ref TopicFixedSizeVectorizable \"Fixed-size vectorizable Eigen objects\" must absolutely be created at properly aligned locations, otherwise SIMD instructions addressing them will crash.\nFor instance, SSE/NEON/MSA/Altivec/VSX targets will require 16-byte-alignment, whereas AVX and AVX512 targets may require up to 32 and 64 byte alignment respectively.\n\n%Eigen normally takes care of these alignment issues for you, by setting an alignment attribute on them and by overloading their `operator new`.\n\nHowever there are a few corner cases where these alignment settings get overridden: they are the possible causes for this assertion.\n\n\\section getrid I don't care about optimal vectorization, how do I get rid of that stuff?\n\nThree possibilities:\n<ul>\n  <li>Use the \\c DontAlign option to Matrix, Array, Quaternion, etc. objects that gives you trouble. This way %Eigen won't try to over-align them, and thus won\"t assume any special alignment. On the down side, you will pay the cost of unaligned loads/stores for them, but on modern CPUs, the overhead is either null or marginal. See \\link StructHavingEigenMembers_othersolutions here \\endlink for an example.</li>\n  <li>Define \\link TopicPreprocessorDirectivesPerformance EIGEN_MAX_STATIC_ALIGN_BYTES \\endlink to 0. That disables all 16-byte (and above) static alignment code, while keeping 16-byte (or above) heap alignment. This has the effect of\n      vectorizing fixed-size objects (like Matrix4d) through unaligned stores (as controlled by \\link TopicPreprocessorDirectivesPerformance EIGEN_UNALIGNED_VECTORIZE \\endlink), while keeping unchanged the vectorization of dynamic-size objects\n      (like MatrixXd). On 64 bytes systems, you might also define it 16 to disable only 32 and 64 bytes of over-alignment. But do note that this breaks ABI compatibility with the default behavior of static alignment.</li>\n  <li>Or define both \\link TopicPreprocessorDirectivesPerformance  EIGEN_DONT_VECTORIZE \\endlink and `EIGEN_DISABLE_UNALIGNED_ARRAY_ASSERT`. This keeps the\n      16-byte (or above) alignment code and thus preserves ABI compatibility, but completely disables vectorization.</li>\n</ul>\n\nIf you want to know why defining `EIGEN_DONT_VECTORIZE` does not by itself disable 16-byte (or above) alignment and the assertion, here's the explanation:\n\nIt doesn't disable the assertion, because otherwise code that runs fine without vectorization would suddenly crash when enabling vectorization.\nIt doesn't disable 16-byte (or above) alignment, because that would mean that vectorized and non-vectorized code are not mutually ABI-compatible. This ABI compatibility is very important, even for people who develop only an in-house application, as for instance one may want to have in the same application a vectorized path and a non-vectorized path.\n\n\\section checkmycode How can I check my code is safe regarding alignment issues?\n\nUnfortunately, there is no possibility in c++ to detect any of the aforementioned shortcoming at compile time (though static analyzers are becoming more and more powerful and could detect some of them).\nEven at runtime, all we can do is to catch invalid unaligned allocation and trigger the explicit assertion mentioned at the beginning of this page.\nTherefore, if your program runs fine on a given system with some given compilation flags, then this does not guarantee that your code is safe. For instance, on most 64 bits systems buffer are aligned on 16 bytes boundary and so, if you do not enable AVX instruction set, then your code will run fine. On the other hand, the same code may assert if moving to a more exotic platform, or enabling AVX instructions that required 32 bytes alignment by default.\n\nThe situation is not hopeless though. Assuming your code is well covered by unit test, then you can check its alignment safety by linking it to a custom malloc library returning 8 bytes aligned buffers only. This way all alignment shortcomings should pop-up. To this end, you must also compile your program with \\link TopicPreprocessorDirectivesPerformance EIGEN_MALLOC_ALREADY_ALIGNED=0 \\endlink.\n\n\n*/\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/UsingBlasLapackBackends.dox",
    "content": "/*\n Copyright (c) 2011, Intel Corporation. All rights reserved.\n Copyright (C) 2011-2016 Gael Guennebaud <gael.guennebaud@inria.fr>\n\n Redistribution and use in source and binary forms, with or without modification,\n are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n   list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n * Neither the name of Intel Corporation nor the names of its contributors may\n   be used to endorse or promote products derived from this software without\n   specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\n ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n ********************************************************************************\n *   Content : Documentation on the use of BLAS/LAPACK libraries through Eigen\n ********************************************************************************\n*/\n\nnamespace Eigen {\n\n/** \\page TopicUsingBlasLapack Using BLAS/LAPACK from %Eigen\n\n\nSince %Eigen version 3.3 and later, any F77 compatible BLAS or LAPACK libraries can be used as backends for dense matrix products and dense matrix decompositions.\nFor instance, one can use <a href=\"http://eigen.tuxfamily.org/Counter/redirect_to_mkl.php\">Intel® MKL</a>, Apple's Accelerate framework on OSX, <a href=\"http://www.openblas.net/\">OpenBLAS</a>, <a href=\"http://www.netlib.org/lapack\">Netlib LAPACK</a>, etc.\n\nDo not miss this \\link TopicUsingIntelMKL page \\endlink for further discussions on the specific use of Intel® MKL (also includes VML, PARDISO, etc.)\n\nIn order to use an external BLAS and/or LAPACK library, you must link you own application to the respective libraries and their dependencies.\nFor LAPACK, you must also link to the standard <a href=\"http://www.netlib.org/lapack/lapacke.html\">Lapacke</a> library, which is used as a convenient think layer between %Eigen's C++ code and LAPACK F77 interface. Then you must activate their usage by defining one or multiple of the following macros (\\b before including any %Eigen's header):\n\n\\note For Mac users, in order to use the lapack version shipped with the Accelerate framework, you also need the lapacke library.\nUsing <a href=\"https://www.macports.org/\">MacPorts</a>, this is as easy as:\n\\code\nsudo port install lapack\n\\endcode\nand then use the following link flags: \\c -framework \\c Accelerate \\c /opt/local/lib/lapack/liblapacke.dylib\n\n<table class=\"manual\">\n<tr><td>\\c EIGEN_USE_BLAS </td><td>Enables the use of external BLAS level 2 and 3 routines (compatible with any F77 BLAS interface)</td></tr>\n<tr class=\"alt\"><td>\\c EIGEN_USE_LAPACKE </td><td>Enables the use of external Lapack routines via the <a href=\"http://www.netlib.org/lapack/lapacke.html\">Lapacke</a> C interface to Lapack (compatible with any F77 LAPACK interface)</td></tr>\n<tr><td>\\c EIGEN_USE_LAPACKE_STRICT </td><td>Same as \\c EIGEN_USE_LAPACKE but algorithms of lower numerical robustness are disabled. \\n This currently concerns only JacobiSVD which otherwise would be replaced by \\c gesvd that is less robust than Jacobi rotations.</td></tr>\n</table>\n\nWhen doing so, a number of %Eigen's algorithms are silently substituted with calls to BLAS or LAPACK routines.\nThese substitutions apply only for \\b Dynamic \\b or \\b large enough objects with one of the following four standard scalar types: \\c float, \\c double, \\c complex<float>, and \\c complex<double>.\nOperations on other scalar types or mixing reals and complexes will continue to use the built-in algorithms.\n\nThe breadth of %Eigen functionality that can be substituted is listed in the table below.\n<table class=\"manual\">\n<tr><th>Functional domain</th><th>Code example</th><th>BLAS/LAPACK routines</th></tr>\n<tr><td>Matrix-matrix operations \\n \\c EIGEN_USE_BLAS </td><td>\\code\nm1*m2.transpose();\nm1.selfadjointView<Lower>()*m2;\nm1*m2.triangularView<Upper>();\nm1.selfadjointView<Lower>().rankUpdate(m2,1.0);\n\\endcode</td><td>\\code\n?gemm\n?symm/?hemm\n?trmm\ndsyrk/ssyrk\n\\endcode</td></tr>\n<tr class=\"alt\"><td>Matrix-vector operations \\n \\c EIGEN_USE_BLAS </td><td>\\code\nm1.adjoint()*b;\nm1.selfadjointView<Lower>()*b;\nm1.triangularView<Upper>()*b;\n\\endcode</td><td>\\code\n?gemv\n?symv/?hemv\n?trmv\n\\endcode</td></tr>\n<tr><td>LU decomposition \\n \\c EIGEN_USE_LAPACKE \\n \\c EIGEN_USE_LAPACKE_STRICT </td><td>\\code\nv1 = m1.lu().solve(v2);\n\\endcode</td><td>\\code\n?getrf\n\\endcode</td></tr>\n<tr class=\"alt\"><td>Cholesky decomposition \\n \\c EIGEN_USE_LAPACKE \\n \\c EIGEN_USE_LAPACKE_STRICT </td><td>\\code\nv1 = m2.selfadjointView<Upper>().llt().solve(v2);\n\\endcode</td><td>\\code\n?potrf\n\\endcode</td></tr>\n<tr><td>QR decomposition \\n \\c EIGEN_USE_LAPACKE \\n \\c EIGEN_USE_LAPACKE_STRICT </td><td>\\code\nm1.householderQr();\nm1.colPivHouseholderQr();\n\\endcode</td><td>\\code\n?geqrf\n?geqp3\n\\endcode</td></tr>\n<tr class=\"alt\"><td>Singular value decomposition \\n \\c EIGEN_USE_LAPACKE </td><td>\\code\nJacobiSVD<MatrixXd> svd;\nsvd.compute(m1, ComputeThinV);\n\\endcode</td><td>\\code\n?gesvd\n\\endcode</td></tr>\n<tr><td>Eigen-value decompositions \\n \\c EIGEN_USE_LAPACKE \\n \\c EIGEN_USE_LAPACKE_STRICT </td><td>\\code\nEigenSolver<MatrixXd> es(m1);\nComplexEigenSolver<MatrixXcd> ces(m1);\nSelfAdjointEigenSolver<MatrixXd> saes(m1+m1.transpose());\nGeneralizedSelfAdjointEigenSolver<MatrixXd>\n    gsaes(m1+m1.transpose(),m2+m2.transpose());\n\\endcode</td><td>\\code\n?gees\n?gees\n?syev/?heev\n?syev/?heev,\n?potrf\n\\endcode</td></tr>\n<tr class=\"alt\"><td>Schur decomposition \\n \\c EIGEN_USE_LAPACKE \\n \\c EIGEN_USE_LAPACKE_STRICT </td><td>\\code\nRealSchur<MatrixXd> schurR(m1);\nComplexSchur<MatrixXcd> schurC(m1);\n\\endcode</td><td>\\code\n?gees\n\\endcode</td></tr>\n</table>\nIn the examples, m1 and m2 are dense matrices and v1 and v2 are dense vectors.\n\n*/\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/UsingIntelMKL.dox",
    "content": "/*\n Copyright (c) 2011, Intel Corporation. All rights reserved.\n Copyright (C) 2011 Gael Guennebaud <gael.guennebaud@inria.fr>\n\n Redistribution and use in source and binary forms, with or without modification,\n are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n   list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n * Neither the name of Intel Corporation nor the names of its contributors may\n   be used to endorse or promote products derived from this software without\n   specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\n ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n ********************************************************************************\n *   Content : Documentation on the use of Intel MKL through Eigen\n ********************************************************************************\n*/\n\nnamespace Eigen {\n\n/** \\page TopicUsingIntelMKL Using Intel® MKL from %Eigen\n\n<!-- \\section TopicUsingIntelMKL_Intro Eigen and Intel® Math Kernel Library (Intel® MKL) -->\n\nSince %Eigen version 3.1 and later, users can benefit from built-in Intel® Math Kernel Library (MKL) optimizations with an installed copy of Intel MKL 10.3 (or later).\n\n<a href=\"http://eigen.tuxfamily.org/Counter/redirect_to_mkl.php\"> Intel MKL </a> provides highly optimized multi-threaded mathematical routines for x86-compatible architectures.\nIntel MKL is available on Linux, Mac and Windows for both Intel64 and IA32 architectures.\n\n\\note\nIntel® MKL is a proprietary software and it is the responsibility of users to buy or register for community (free) Intel MKL licenses for their products. Moreover, the license of the user product has to allow linking to proprietary software that excludes any unmodified versions of the GPL.\n\nUsing Intel MKL through %Eigen is easy:\n-# define the \\c EIGEN_USE_MKL_ALL macro before including any %Eigen's header\n-# link your program to MKL libraries (see the <a href=\"http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/\">MKL linking advisor</a>)\n-# on a 64bits system, you must use the LP64 interface (not the ILP64 one)\n\nWhen doing so, a number of %Eigen's algorithms are silently substituted with calls to Intel MKL routines.\nThese substitutions apply only for \\b Dynamic \\b or \\b large enough objects with one of the following four standard scalar types: \\c float, \\c double, \\c complex<float>, and \\c complex<double>.\nOperations on other scalar types or mixing reals and complexes will continue to use the built-in algorithms.\n\nIn addition you can choose which parts will be substituted by defining one or multiple of the following macros:\n\n<table class=\"manual\">\n<tr><td>\\c EIGEN_USE_BLAS </td><td>Enables the use of external BLAS level 2 and 3 routines</td></tr>\n<tr class=\"alt\"><td>\\c EIGEN_USE_LAPACKE </td><td>Enables the use of external Lapack routines via the <a href=\"http://www.netlib.org/lapack/lapacke.html\">Lapacke</a> C interface to Lapack</td></tr>\n<tr><td>\\c EIGEN_USE_LAPACKE_STRICT </td><td>Same as \\c EIGEN_USE_LAPACKE but algorithm of lower robustness are disabled. \\n This currently concerns only JacobiSVD which otherwise would be replaced by \\c gesvd that is less robust than Jacobi rotations.</td></tr>\n<tr class=\"alt\"><td>\\c EIGEN_USE_MKL_VML </td><td>Enables the use of Intel VML (vector operations)</td></tr>\n<tr><td>\\c EIGEN_USE_MKL_ALL </td><td>Defines \\c EIGEN_USE_BLAS, \\c EIGEN_USE_LAPACKE, and \\c EIGEN_USE_MKL_VML </td></tr>\n</table>\n\nThe \\c EIGEN_USE_BLAS and \\c EIGEN_USE_LAPACKE* macros can be combined with \\c EIGEN_USE_MKL to explicitly tell Eigen that the underlying BLAS/Lapack implementation is Intel MKL.\nThe main effect is to enable MKL direct call feature (\\c MKL_DIRECT_CALL).\nThis may help to increase performance of some MKL BLAS (?GEMM, ?GEMV, ?TRSM, ?AXPY and ?DOT) and LAPACK (LU, Cholesky and QR) routines for very small matrices.\nMKL direct call can be disabled by defining \\c EIGEN_MKL_NO_DIRECT_CALL.\n\n\nNote that the BLAS and LAPACKE backends can be enabled for any F77 compatible BLAS and LAPACK libraries. See this \\link TopicUsingBlasLapack page \\endlink for the details.\n\nFinally, the PARDISO sparse solver shipped with Intel MKL can be used through the \\ref PardisoLU, \\ref PardisoLLT and \\ref PardisoLDLT classes of the \\ref PardisoSupport_Module.\n\nThe following table summarizes the list of functions covered by \\c EIGEN_USE_MKL_VML:\n<table class=\"manual\">\n<tr><th>Code example</th><th>MKL routines</th></tr>\n<tr><td>\\code\nv2=v1.array().sin();\nv2=v1.array().asin();\nv2=v1.array().cos();\nv2=v1.array().acos();\nv2=v1.array().tan();\nv2=v1.array().exp();\nv2=v1.array().log();\nv2=v1.array().sqrt();\nv2=v1.array().square();\nv2=v1.array().pow(1.5);\n\\endcode</td><td>\\code\nv?Sin\nv?Asin\nv?Cos\nv?Acos\nv?Tan\nv?Exp\nv?Ln\nv?Sqrt\nv?Sqr\nv?Powx\n\\endcode</td></tr>\n</table>\nIn the examples, v1 and v2 are dense vectors.\n\n\n\\section TopicUsingIntelMKL_Links Links\n- Intel MKL can be purchased and downloaded <a href=\"http://eigen.tuxfamily.org/Counter/redirect_to_mkl.php\">here</a>.\n- Intel MKL is also bundled with <a href=\"http://software.intel.com/en-us/articles/intel-composer-xe/\">Intel Composer XE</a>.\n\n\n*/\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/UsingNVCC.dox",
    "content": "\nnamespace Eigen {\n\n/** \\page TopicCUDA Using Eigen in CUDA kernels\n\nStaring from CUDA 5.5 and Eigen 3.3, it is possible to use Eigen's matrices, vectors, and arrays for fixed size within CUDA kernels. This is especially useful when working on numerous but small problems. By default, when Eigen's headers are included within a .cu file compiled by nvcc most Eigen's functions and methods are prefixed by the \\c __device__ \\c __host__ keywords making them callable from both host and device code.\nThis support can be disabled by defining \\c EIGEN_NO_CUDA before including any Eigen's header.\nThis might be useful to disable some warnings when a .cu file makes use of Eigen on the host side only.\nHowever, in both cases, host's SIMD vectorization has to be disabled in .cu files.\nIt is thus \\b strongly \\b recommended to properly move all costly host computation from your .cu files to regular .cpp files.\n\nKnown issues:\n\n - \\c nvcc with MS Visual Studio does not work (patch welcome)\n \n - \\c nvcc 5.5 with gcc-4.7 (or greater) has issues with the standard \\c \\<limits\\> header file. To workaround this, you can add the following before including any other files:\n   \\code\n    // workaround issue between gcc >= 4.7 and cuda 5.5\n    #if (defined __GNUC__) && (__GNUC__>4 || __GNUC_MINOR__>=7)\n      #undef _GLIBCXX_ATOMIC_BUILTINS\n      #undef _GLIBCXX_USE_INT128\n    #endif\n   \\endcode\n   \n - On 64bits system Eigen uses \\c long \\c int as the default type for indexes and sizes. On CUDA device, it would make sense to default to 32 bits \\c int.\n   However, to keep host and CUDA code compatible, this cannot be done automatically by %Eigen, and the user is thus required to define \\c EIGEN_DEFAULT_DENSE_INDEX_TYPE to \\c int throughout his code (or only for CUDA code if there is no interaction between host and CUDA code through %Eigen's object).\n\n*/\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/WrongStackAlignment.dox",
    "content": "namespace Eigen {\n\n/** \\eigenManualPage TopicWrongStackAlignment Compiler making a wrong assumption on stack alignment\n\n<h4>It appears that this was a GCC bug that has been fixed in GCC 4.5.\nIf you hit this issue, please upgrade to GCC 4.5 and report to us, so we can update this page.</h4>\n\nThis is an issue that, so far, we met only with GCC on Windows: for instance, MinGW and TDM-GCC.\n\nBy default, in a function like this,\n\n\\code\nvoid foo()\n{\n  Eigen::Quaternionf q;\n  //...\n}\n\\endcode\n\nGCC assumes that the stack is already 16-byte-aligned so that the object \\a q will be created at a 16-byte-aligned location. For this reason, it doesn't take any special care to explicitly align the object \\a q, as Eigen requires.\n\nThe problem is that, in some particular cases, this assumption can be wrong on Windows, where the stack is only guaranteed to have 4-byte alignment. Indeed, even though GCC takes care of aligning the stack in the main function and does its best to keep it aligned, when a function is called from another thread or from a binary compiled with another compiler, the stack alignment can be corrupted. This results in the object 'q' being created at an unaligned location, making your program crash with the \\ref TopicUnalignedArrayAssert \"assertion on unaligned arrays\". So far we found the three following solutions.\n\n\n\\section sec_sol1 Local solution\n\nA local solution is to mark such a function with this attribute:\n\\code\n__attribute__((force_align_arg_pointer)) void foo()\n{\n  Eigen::Quaternionf q;\n  //...\n}\n\\endcode\nRead <a href=\"http://gcc.gnu.org/onlinedocs/gcc-4.4.0/gcc/Function-Attributes.html#Function-Attributes\">this GCC documentation</a> to understand what this does. Of course this should only be done on GCC on Windows, so for portability you'll have to encapsulate this in a macro which you leave empty on other platforms. The advantage of this solution is that you can finely select which function might have a corrupted stack alignment. Of course on the downside this has to be done for every such function, so you may prefer one of the following two global solutions.\n\n\n\\section sec_sol2 Global solutions\n\nA global solution is to edit your project so that when compiling with GCC on Windows, you pass this option to GCC:\n\\code\n-mincoming-stack-boundary=2\n\\endcode\nExplanation: this tells GCC that the stack is only required to be aligned to 2^2=4 bytes, so that GCC now knows that it really must take extra care to honor the 16 byte alignment of \\ref TopicFixedSizeVectorizable \"fixed-size vectorizable Eigen types\" when needed.\n\nAnother global solution is to pass this option to gcc:\n\\code\n-mstackrealign\n\\endcode\nwhich has the same effect than adding the \\c force_align_arg_pointer attribute to all functions.\n\nThese global solutions are easy to use, but note that they may slowdown your program because they lead to extra prologue/epilogue instructions for every function.\n\n*/\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/eigen_navtree_hacks.js",
    "content": "\n// generate a table of contents in the side-nav based on the h1/h2 tags of the current page.\nfunction generate_autotoc() {\n  var headers = $(\"h1, h2\");\n  if(headers.length > 1) {\n    var toc = $(\"#side-nav\").append('<div id=\"nav-toc\" class=\"toc\"><h3>Table of contents</h3></div>');\n    toc = $(\"#nav-toc\");\n    var footerHeight = footer.height();\n    toc = toc.append('<ul></ul>');\n    toc = toc.find('ul');\n    var indices = new Array();\n    indices[0] = 0;\n    indices[1] = 0;\n\n    var h1counts = $(\"h1\").length;\n    headers.each(function(i) {\n      var current = $(this);\n      var levelTag = current[0].tagName.charAt(1);\n      if(h1counts==0)\n        levelTag--;\n      var cur_id = current.attr(\"id\");\n\n      indices[levelTag-1]+=1;  \n      var prefix = indices[0];\n      if (levelTag >1) {\n        prefix+=\".\"+indices[1];\n      }\n        \n      // Uncomment to add number prefixes\n      // current.html(prefix + \"   \" + current.html());\n      for(var l = levelTag; l < 2; ++l){\n          indices[l] = 0;\n      }\n\n      if(cur_id == undefined) {\n        current.attr('id', 'title' + i);\n        current.addClass('anchor');\n        toc.append(\"<li class='level\" + levelTag + \"'><a id='link\" + i + \"' href='#title\" +\n                    i + \"' title='\" + current.prop(\"tagName\") + \"'>\" + current.text() + \"</a></li>\");\n      } else {\n        toc.append(\"<li class='level\" + levelTag + \"'><a id='\" + cur_id + \"' href='#title\" +\n                    i + \"' title='\" + current.prop(\"tagName\") + \"'>\" + current.text() + \"</a></li>\");\n      }\n    });\n    resizeHeight();\n  }\n}\n\n\nvar global_navtree_object;\n\n// Overloaded to remove links to sections/subsections\nfunction getNode(o, po)\n{\n  po.childrenVisited = true;\n  var l = po.childrenData.length-1;\n  for (var i in po.childrenData) {\n    var nodeData = po.childrenData[i];\n    if((!nodeData[1]) ||  (nodeData[1].indexOf('#')==-1)) // <- we added this line\n      po.children[i] = newNode(o, po, nodeData[0], nodeData[1], nodeData[2], i==l);\n  }\n}\n\n// Overloaded to adjust the size of the navtree wrt the toc\nfunction resizeHeight() \n{\n  var header  = $(\"#top\");\n  var sidenav = $(\"#side-nav\");\n  var content = $(\"#doc-content\");\n  var navtree = $(\"#nav-tree\");\n  var footer  = $(\"#nav-path\");\n  var toc     = $(\"#nav-toc\");\n\n  var headerHeight = header.outerHeight();\n  var footerHeight = footer.outerHeight();\n  var tocHeight    = toc.height();\n  var windowHeight = $(window).height() - headerHeight - footerHeight;\n  content.css({height:windowHeight + \"px\"});\n  navtree.css({height:(windowHeight-tocHeight) + \"px\"});\n  sidenav.css({height:windowHeight + \"px\"});\n}\n\n// Overloaded to save the root node into global_navtree_object\nfunction initNavTree(toroot,relpath)\n{\n  var o = new Object();\n  global_navtree_object = o; // <- we added this line\n  o.toroot = toroot;\n  o.node = new Object();\n  o.node.li = document.getElementById(\"nav-tree-contents\");\n  o.node.childrenData = NAVTREE;\n  o.node.children = new Array();\n  o.node.childrenUL = document.createElement(\"ul\");\n  o.node.getChildrenUL = function() { return o.node.childrenUL; };\n  o.node.li.appendChild(o.node.childrenUL);\n  o.node.depth = 0;\n  o.node.relpath = relpath;\n  o.node.expanded = false;\n  o.node.isLast = true;\n  o.node.plus_img = document.createElement(\"img\");\n  o.node.plus_img.src = relpath+\"ftv2pnode.png\";\n  o.node.plus_img.width = 16;\n  o.node.plus_img.height = 22;\n\n  if (localStorageSupported()) {\n    var navSync = $('#nav-sync');\n    if (cachedLink()) {\n      showSyncOff(navSync,relpath);\n      navSync.removeClass('sync');\n    } else {\n      showSyncOn(navSync,relpath);\n    }\n    navSync.click(function(){ toggleSyncButton(relpath); });\n  }\n\n  navTo(o,toroot,window.location.hash,relpath);\n\n  $(window).bind('hashchange', function(){\n     if (window.location.hash && window.location.hash.length>1){\n       var a;\n       if ($(location).attr('hash')){\n         var clslink=stripPath($(location).attr('pathname'))+':'+\n                               $(location).attr('hash').substring(1);\n         a=$('.item a[class$=\"'+clslink+'\"]');\n       }\n       if (a==null || !$(a).parent().parent().hasClass('selected')){\n         $('.item').removeClass('selected');\n         $('.item').removeAttr('id');\n       }\n       var link=stripPath2($(location).attr('pathname'));\n       navTo(o,link,$(location).attr('hash'),relpath);\n     } else if (!animationInProgress) {\n       $('#doc-content').scrollTop(0);\n       $('.item').removeClass('selected');\n       $('.item').removeAttr('id');\n       navTo(o,toroot,window.location.hash,relpath);\n     }\n  })\n\n  $(window).load(showRoot);\n}\n\n// return false if the the node has no children at all, or has only section/subsection children\nfunction checkChildrenData(node) {\n  if (!(typeof(node.childrenData)==='string')) {\n    for (var i in node.childrenData) {\n      var url = node.childrenData[i][1];\n      if(url.indexOf(\"#\")==-1)\n        return true;\n    }\n    return false;\n  }\n  return (node.childrenData);\n}\n\n// Modified to:\n// 1 - remove the root node \n// 2 - remove the section/subsection children\nfunction createIndent(o,domNode,node,level)\n{\n  var level=-2; // <- we replaced level=-1 by level=-2\n  var n = node;\n  while (n.parentNode) { level++; n=n.parentNode; }\n  if (checkChildrenData(node)) { // <- we modified this line to use checkChildrenData(node) instead of node.childrenData\n    var imgNode = document.createElement(\"span\");\n    imgNode.className = 'arrow';\n    imgNode.style.paddingLeft=(16*level).toString()+'px';\n    imgNode.innerHTML=arrowRight;\n    node.plus_img = imgNode;\n    node.expandToggle = document.createElement(\"a\");\n    node.expandToggle.href = \"javascript:void(0)\";\n    node.expandToggle.onclick = function() {\n      if (node.expanded) {\n        $(node.getChildrenUL()).slideUp(\"fast\");\n        node.plus_img.innerHTML=arrowRight;\n        node.expanded = false;\n      } else {\n        expandNode(o, node, false, false);\n      }\n    }\n    node.expandToggle.appendChild(imgNode);\n    domNode.appendChild(node.expandToggle);\n  } else {\n    var span = document.createElement(\"span\");\n    span.className = 'arrow';\n    span.style.width   = 16*(level+1)+'px';\n    span.innerHTML = '&#160;';\n    domNode.appendChild(span);\n  }\n}\n\n// Overloaded to automatically expand the selected node\nfunction selectAndHighlight(hash,n)\n{\n  var a;\n  if (hash) {\n    var link=stripPath($(location).attr('pathname'))+':'+hash.substring(1);\n    a=$('.item a[class$=\"'+link+'\"]');\n  }\n  if (a && a.length) {\n    a.parent().parent().addClass('selected');\n    a.parent().parent().attr('id','selected');\n    highlightAnchor();\n  } else if (n) {\n    $(n.itemDiv).addClass('selected');\n    $(n.itemDiv).attr('id','selected');\n  }\n  if ($('#nav-tree-contents .item:first').hasClass('selected')) {\n    $('#nav-sync').css('top','30px');\n  } else {\n    $('#nav-sync').css('top','5px');\n  }\n  expandNode(global_navtree_object, n, true, true); // <- we added this line\n  showRoot();\n}\n\n\n$(document).ready(function() {\n  \n  generate_autotoc();\n  \n  (function (){ // wait until the first \"selected\" element has been created\n    try {\n      \n      // this line will triger an exception if there is no #selected element, i.e., before the tree structure is complete.\n      document.getElementById(\"selected\").className = \"item selected\";\n      \n      // ok, the default tree has been created, we can keep going...\n      \n      // expand the \"Chapters\" node\n      if(window.location.href.indexOf('unsupported')==-1)\n        expandNode(global_navtree_object, global_navtree_object.node.children[0].children[2], true, true);\n      else\n        expandNode(global_navtree_object, global_navtree_object.node.children[0].children[1], true, true);\n      \n      // Hide the root node \"Eigen\"\n      $(document.getElementsByClassName('index.html')[0]).parent().parent().css({display:\"none\"});\n      \n    } catch (err) {\n      setTimeout(arguments.callee, 10);\n    }\n  })();\n\n  $(window).load(resizeHeight);\n});\n\n"
  },
  {
    "path": "3rdparty/eigen3/doc/eigendoxy.css",
    "content": "\n/******** Eigen specific CSS code ************/\n\n/**** Styles removing elements ****/\n\n/* remove the \"modules|classes\" link for module pages (they are already in the TOC) */\ndiv.summary {\n  display:none;\n}\n\n/* remove */\ndiv.contents hr {\n  display:none;\n}\n\n/**** ****/\n\np, dl.warning, dl.attention, dl.note\n{\n  max-width:60em;\n  text-align:justify;\n}\n\nli {\n  max-width:55em;\n  text-align:justify;  \n}\n\nimg {\n  border: 0;\n}\n\ndiv.fragment {\n  display:table; /* this allows the element to be larger than its parent */\n  padding: 0pt;\n}\npre.fragment {\n  border: 1px solid #cccccc;\n\n  margin: 2px 0px 2px 0px;\n  padding: 3px 5px 3px 5px;\n}\n\n\n\n/* Common style for all Eigen's tables */\n\ntable.example, table.manual, table.manual-vl, table.manual-hl {\n    max-width:100%;\n    border-collapse: collapse;\n    border-style: solid;\n    border-width: 1px;\n    border-color: #cccccc;\n    font-size: 1em;\n    \n    box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);\n    -moz-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);\n    -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);\n}\n\ntable.example th, table.manual th, table.manual-vl th, table.manual-hl th {\n  padding: 0.5em 0.5em 0.5em 0.5em;\n  text-align: left;\n  padding-right: 1em;\n  color: #555555;\n  background-color: #F4F4E5;\n  \n  background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.3,#FFFFFF), color-stop(0.30,#FFFFFF), color-stop(0.98,#F4F4E5), to(#ECECDE));\n  background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 30%, #F4F4E5 98%, #ECECDE);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFF', endColorstr='#F4F4E5');\n}\n\ntable.example td, table.manual td, table.manual-vl td, table.manual-hl td {\n  vertical-align:top;\n  border-width: 1px;\n  border-color: #cccccc;\n}\n\n/* header of headers */\ntable th.meta {\n  text-align:center;\n  font-size: 1.2em;\n  background-color:#FFFFFF;\n}\n\n/* intermediate header */\ntable th.inter {\n  text-align:left;\n  background-color:#FFFFFF;\n  background-image:none;\n  border-style:solid solid solid solid;\n  border-width: 1px;\n\tborder-color: #cccccc;\n}\n\n/** class for example / output tables **/\n\ntable.example {\n}\n\ntable.example th {\n}\n\ntable.example td {\n  padding: 0.5em 0.5em 0.5em 0.5em;\n  vertical-align:top;\n}\n\n/* standard class for the manual */\n\ntable.manual, table.manual-vl, table.manual-hl {\n    padding: 0.2em 0em 0.5em 0em;\n}\n\ntable.manual th, table.manual-vl th, table.manual-hl th {\n  margin: 0em 0em 0.3em 0em;\n}\n\ntable.manual td, table.manual-vl td, table.manual-hl td {\n  padding: 0.3em 0.5em 0.3em 0.5em;\n  vertical-align:top;\n  border-width: 1px;\n}\n\ntable.manual td.alt, table.manual tr.alt, table.manual-vl td.alt, table.manual-vl tr.alt {\n  background-color: #F4F4E5;\n}\n\ntable.manual-vl th, table.manual-vl td, table.manual-vl td.alt {\n  border-color: #cccccc;\n  border-width: 1px;\n  border-style: none solid none solid;\n}\n\ntable.manual-vl th.inter {\n  border-style: solid solid solid solid;\n}\n\ntable.manual-hl td {\n  border-color: #cccccc;\n  border-width: 1px;\n  border-style: solid none solid none;\n}\n\ntable td.code {\n  font-family: monospace;\n}\n\nh2 {\n  margin-top:2em;\n  border-style: none none solid none;\n  border-width: 1px;\n  border-color: #cccccc;\n}\n\n/**** Table of content in the side-nav ****/\n\n\ndiv.toc {\n  margin:0;\n  padding: 0.3em 0 0 0;\n  width:100%;\n  float:none;\n  position:absolute;\n  bottom:0;\n  border-radius:0px;\n  border-style: solid none none none;\n  max-height:50%;\n  overflow-y: scroll;\n}\n\ndiv.toc h3 {\n  margin-left: 0.5em;\n  margin-bottom: 0.2em;\n}\n\ndiv.toc ul {\n  margin: 0.2em 0 0.4em 0.5em;\n}\n\nspan.cpp11,span.cpp14,span.cpp17 {\n  color: #119911;\n  font-weight: bold;\n}\n\n.newin3x {\n  color: #a37c1a;\n  font-weight: bold;\n}\n\ndiv.warningbox {\n  max-width:60em;\n  border-style: solid solid solid solid;\n  border-color: red;\n  border-width: 3px;\n}\n\n/**** old Eigen's styles ****/\n\n\ntable.tutorial_code td {\n  border-color: transparent; /* required for Firefox */\n  padding: 3pt 5pt 3pt 5pt;\n  vertical-align: top;\n}\n\n\n/* Whenever doxygen meets a '\\n' or a '<BR/>', it will put \n * the text containing the character into a <p class=\"starttd\">.\n * This little hack together with table.tutorial_code td.note\n * aims at fixing this issue. */\ntable.tutorial_code td.note p.starttd {\n  margin: 0px;\n  border: none;\n  padding: 0px;\n}\n\ndiv.eimainmenu {\n  text-align:     center;\n}\n\n/* center version number on main page */\nh3.version { \n  text-align:     center;\n}\n\n\ntd.width20em p.endtd {\n  width:  20em;\n}\n\n/* needed for huge screens */\n.ui-resizable-e {\n  background-repeat: repeat-y;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/eigendoxy_footer.html.in",
    "content": "<!-- start footer part -->\n<!--BEGIN GENERATE_TREEVIEW-->\n<div id=\"nav-path\" class=\"navpath\"><!-- id is needed for treeview function! -->\n  <ul>\n    $navpath\n    <li class=\"footer\">$generatedby\n    <a href=\"http://www.doxygen.org/index.html\">\n    <img class=\"footer\" src=\"$relpath^doxygen.png\" alt=\"doxygen\"/></a> $doxygenversion </li>\n  </ul>\n</div>\n<!--END GENERATE_TREEVIEW-->\n<!--BEGIN !GENERATE_TREEVIEW-->\n<hr class=\"footer\"/><address class=\"footer\"><small>\n$generatedby &#160;<a href=\"http://www.doxygen.org/index.html\">\n<img class=\"footer\" src=\"$relpath^doxygen.png\" alt=\"doxygen\"/>\n</a> $doxygenversion\n</small></address>\n<!--END !GENERATE_TREEVIEW-->\n\n<!-- Matomo -->\n<script type=\"text/javascript\">\n  var _paq = _paq || [];\n  /* tracker methods like \"setCustomDimension\" should be called before \"trackPageView\" */\n  _paq.push(['trackPageView']);\n  _paq.push(['enableLinkTracking']);\n  (function() {\n    var u=\"//stats.sylphide-consulting.com/matomo/\";\n    _paq.push(['setTrackerUrl', u+'piwik.php']);\n    _paq.push(['setSiteId', '20']);\n    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];\n    g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);\n  })();\n</script>\n<noscript><p><img src=\"//stats.sylphide-consulting.com/matomo/piwik.php?idsite=20&rec=1\" style=\"border:0;\" alt=\"\" /></p></noscript>\n<!-- End Matomo Code -->\n\n</body>\n</html>\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/doc/eigendoxy_header.html.in",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen $doxygenversion\"/>\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"/>\n<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->\n<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->\n<link href=\"$relpath^tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"$relpath^jquery.js\"></script>\n<script type=\"text/javascript\" src=\"$relpath^dynsections.js\"></script>\n$treeview\n$search\n$mathjax\n<link href=\"$relpath^$stylesheet\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"$relpath$eigendoxy.css\" rel=\"stylesheet\" type=\"text/css\">\n<!-- $extrastylesheet -->\n<script type=\"text/javascript\" src=\"$relpath$eigen_navtree_hacks.js\"></script>\n\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n\n<!--BEGIN TITLEAREA-->\n<div id=\"titlearea\">\n<table cellspacing=\"0\" cellpadding=\"0\">\n <tbody>\n <tr style=\"height: 56px;\">\n  <!--BEGIN PROJECT_LOGO-->\n  <td id=\"projectlogo\"><img alt=\"Logo\" src=\"$relpath^$projectlogo\"/></td>\n  <!--END PROJECT_LOGO-->\n  <!--BEGIN PROJECT_NAME-->\n  <td id=\"projectalign\" style=\"padding-left: 0.5em;\">\n   <div id=\"projectname\"><a href=\"http://eigen.tuxfamily.org\">$projectname</a>\n   <!--BEGIN PROJECT_NUMBER-->&#160;<span id=\"projectnumber\">$projectnumber</span><!--END PROJECT_NUMBER-->\n   </div>\n   <!--BEGIN PROJECT_BRIEF--><div id=\"projectbrief\">$projectbrief</div><!--END PROJECT_BRIEF-->\n  </td>\n  <!--END PROJECT_NAME-->\n  <!--BEGIN !PROJECT_NAME-->\n   <!--BEGIN PROJECT_BRIEF-->\n    <td id=\"projectalign\" style=\"padding-left: 0.5em;\">\n    <div id=\"projectbrief\">$projectbrief</div>\n    </td>\n   <!--END PROJECT_BRIEF-->\n  <!--END !PROJECT_NAME-->\n  <!--BEGIN DISABLE_INDEX-->\n   <!--BEGIN SEARCHENGINE-->\n   <td>$searchbox</td>\n   <!--END SEARCHENGINE-->\n  <!--END DISABLE_INDEX-->\n </tr>\n </tbody>\n</table>\n</div>\n<!--END TITLEAREA-->\n<!-- end header part -->\n\n"
  },
  {
    "path": "3rdparty/eigen3/doc/eigendoxy_layout.xml.in",
    "content": "<?xml version=\"1.0\"?>\n<doxygenlayout version=\"1.0\">\n  <!-- Navigation index tabs for HTML output -->\n  <navindex>\n    <tab type=\"user\" url=\"index.html\" title=\"Overview\" />\n    <tab type=\"user\" url=\"@ref GettingStarted\" title=\"Getting started\" />\n    <tab type=\"modules\" visible=\"yes\" title=\"Chapters\" intro=\"\"/>\n    <tab type=\"mainpage\" visible=\"yes\" title=\"\"/>\n    <tab type=\"classlist\" visible=\"yes\" title=\"\" intro=\"\"/>\n<!--     <tab type=\"classmembers\" visible=\"yes\" title=\"\" intro=\"\"/> -->\n  </navindex>\n\n  <!-- Layout definition for a class page -->\n  <class>\n    <briefdescription visible=\"no\"/>\n    <includes visible=\"$SHOW_INCLUDE_FILES\"/>\n    <detaileddescription title=\"\"/>\n    <inheritancegraph visible=\"$CLASS_GRAPH\"/>\n    <collaborationgraph visible=\"$COLLABORATION_GRAPH\"/>\n    <allmemberslink visible=\"yes\"/>\n    <memberdecl>\n      <nestedclasses visible=\"yes\" title=\"\"/>\n      <publictypes title=\"\"/>\n      <publicslots title=\"\"/>\n      <signals title=\"\"/>\n      <publicmethods title=\"\"/>\n      <publicstaticmethods title=\"\"/>\n      <publicattributes title=\"\"/>\n      <publicstaticattributes title=\"\"/>\n      <protectedtypes title=\"\"/>\n      <protectedslots title=\"\"/>\n      <protectedmethods title=\"\"/>\n      <protectedstaticmethods title=\"\"/>\n      <protectedattributes title=\"\"/>\n      <protectedstaticattributes title=\"\"/>\n      <packagetypes title=\"\"/>\n      <packagemethods title=\"\"/>\n      <packagestaticmethods title=\"\"/>\n      <packageattributes title=\"\"/>\n      <packagestaticattributes title=\"\"/>\n      <properties title=\"\"/>\n      <events title=\"\"/>\n      <privatetypes title=\"\"/>\n      <privateslots title=\"\"/>\n      <privatemethods title=\"\"/>\n      <privatestaticmethods title=\"\"/>\n      <privateattributes title=\"\"/>\n      <privatestaticattributes title=\"\"/>\n      <friends title=\"\"/>\n      <related title=\"\" subtitle=\"\"/>\n      <membergroups visible=\"yes\"/>\n    </memberdecl>\n    \n    <memberdef>\n      <inlineclasses title=\"\"/>\n      <typedefs title=\"\"/>\n      <enums title=\"\"/>\n      <constructors title=\"\"/>\n      <functions title=\"\"/>\n      <related title=\"\"/>\n      <variables title=\"\"/>\n      <properties title=\"\"/>\n      <events title=\"\"/>\n    </memberdef>\n    <usedfiles visible=\"$SHOW_USED_FILES\"/>\n    <authorsection visible=\"yes\"/>\n  </class>\n\n  <!-- Layout definition for a namespace page -->\n  <namespace>\n    <briefdescription visible=\"yes\"/>\n    <memberdecl>\n      <nestednamespaces visible=\"yes\" title=\"\"/>\n      <classes visible=\"yes\" title=\"\"/>\n      <typedefs title=\"\"/>\n      <enums title=\"\"/>\n      <functions title=\"\"/>\n      <variables title=\"\"/>\n      <membergroups visible=\"yes\"/>\n    </memberdecl>\n    <detaileddescription title=\"\"/>\n    <memberdef>\n      <inlineclasses title=\"\"/>\n      <typedefs title=\"\"/>\n      <enums title=\"\"/>\n      <functions title=\"\"/>\n      <variables title=\"\"/>\n    </memberdef>\n    <authorsection visible=\"yes\"/>\n  </namespace>\n\n  <!-- Layout definition for a file page -->\n  <file>\n    <briefdescription visible=\"yes\"/>\n    <includes visible=\"$SHOW_INCLUDE_FILES\"/>\n    <includegraph visible=\"$INCLUDE_GRAPH\"/>\n    <includedbygraph visible=\"$INCLUDED_BY_GRAPH\"/>\n    <sourcelink visible=\"yes\"/>\n    <memberdecl>\n      <classes visible=\"yes\" title=\"\"/>\n      <namespaces visible=\"yes\" title=\"\"/>\n      <defines title=\"\"/>\n      <typedefs title=\"\"/>\n      <enums title=\"\"/>\n      <functions title=\"\"/>\n      <variables title=\"\"/>\n      <membergroups visible=\"yes\"/>\n    </memberdecl>\n    <detaileddescription title=\"\"/>\n    <memberdef>\n      <inlineclasses title=\"\"/>\n      <defines title=\"\"/>\n      <typedefs title=\"\"/>\n      <enums title=\"\"/>\n      <functions title=\"\"/>\n      <variables title=\"\"/>\n    </memberdef>\n    <authorsection/>\n  </file>\n\n  <!-- Layout definition for a group page -->\n  <group>\n    <briefdescription visible=\"no\"/>\n    <detaileddescription title=\"\"/>\n    <groupgraph visible=\"$GROUP_GRAPHS\"/>\n    <memberdecl>\n      <nestedgroups visible=\"yes\" title=\"\"/>\n      <dirs visible=\"yes\" title=\"\"/>\n      <files visible=\"yes\" title=\"\"/>\n      <namespaces visible=\"yes\" title=\"\"/>\n      <classes visible=\"yes\" title=\"\"/>\n      <defines title=\"\"/>\n      <typedefs title=\"\"/>\n      <enums title=\"\"/>\n      <enumvalues title=\"\"/>\n      <functions title=\"\"/>\n      <variables title=\"\"/>\n      <signals title=\"\"/>\n      <publicslots title=\"\"/>\n      <protectedslots title=\"\"/>\n      <privateslots title=\"\"/>\n      <events title=\"\"/>\n      <properties title=\"\"/>\n      <friends title=\"\"/>\n      <membergroups visible=\"yes\"/>\n    </memberdecl>\n    \n    <memberdef>\n      <pagedocs/>\n      <inlineclasses title=\"\"/>\n      <defines title=\"\"/>\n      <typedefs title=\"\"/>\n      <enums title=\"\"/>\n      <enumvalues title=\"\"/>\n      <functions title=\"\"/>\n      <variables title=\"\"/>\n      <signals title=\"\"/>\n      <publicslots title=\"\"/>\n      <protectedslots title=\"\"/>\n      <privateslots title=\"\"/>\n      <events title=\"\"/>\n      <properties title=\"\"/>\n      <friends title=\"\"/>\n    </memberdef>\n    <authorsection visible=\"yes\"/>\n  </group>\n\n  <!-- Layout definition for a directory page -->\n  <directory>\n    <briefdescription visible=\"yes\"/>\n    <directorygraph visible=\"yes\"/>\n    <memberdecl>\n      <dirs visible=\"yes\"/>\n      <files visible=\"yes\"/>\n    </memberdecl>\n    <detaileddescription title=\"\"/>\n  </directory>\n</doxygenlayout>\n"
  },
  {
    "path": "3rdparty/eigen3/doc/eigendoxy_tabs.css",
    "content": ".tabs, .tabs2, .tabs3 {\n    background-image: url('tab_b.png');\n    width: 100%;\n    z-index: 101;\n    font-size: 13px;\n}\n\n.tabs2 {\n    font-size: 10px;\n}\n.tabs3 {\n    font-size: 9px;\n}\n\n.tablist {\n    margin: 0;\n    padding: 0;\n    display: table;\n}\n\n.tablist li {\n    float: left;\n    display: table-cell;\n    background-image: url('tab_b.png');\n    line-height: 36px;\n    list-style: none;\n}\n\n.tablist a {\n    display: block;\n    padding: 0 20px;\n    font-weight: bold;\n    background-image:url('tab_s.png');\n    background-repeat:no-repeat;\n    background-position:right;\n    color: #283A5D;\n    text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);\n    text-decoration: none;\n    outline: none;\n}\n\n.tabs3 .tablist a {\n    padding: 0 10px;\n}\n\n.tablist a:hover {\n    background-image: url('tab_h.png');\n    background-repeat:repeat-x;\n    color: #fff;\n    text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);\n    text-decoration: none;\n}\n\n.tablist li.current a {\n    background-image: url('tab_a.png');\n    background-repeat:repeat-x;\n    color: #fff;\n    text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/.krazy",
    "content": "EXCLUDE copyright\nEXCLUDE license\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/CMakeLists.txt",
    "content": "file(GLOB examples_SRCS \"*.cpp\")\n\nforeach(example_src ${examples_SRCS})\n  get_filename_component(example ${example_src} NAME_WE)\n  add_executable(${example} ${example_src})\n  if(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO)\n    target_link_libraries(${example} ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO})\n  endif()\n  add_custom_command(\n    TARGET ${example}\n    POST_BUILD\n    COMMAND ${example}\n    ARGS >${CMAKE_CURRENT_BINARY_DIR}/${example}.out\n  )\n  add_dependencies(all_examples ${example})\nendforeach()\n\nif(EIGEN_COMPILER_SUPPORT_CPP11)\nei_add_target_property(nullary_indexing COMPILE_FLAGS \"-std=c++11\")\nendif()"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/CustomizingEigen_Inheritance.cpp",
    "content": "#include <Eigen/Core>\n#include <iostream>\n\nclass MyVectorType : public Eigen::VectorXd\n{\npublic:\n    MyVectorType(void):Eigen::VectorXd() {}\n\n    // This constructor allows you to construct MyVectorType from Eigen expressions\n    template<typename OtherDerived>\n    MyVectorType(const Eigen::MatrixBase<OtherDerived>& other)\n        : Eigen::VectorXd(other)\n    { }\n\n    // This method allows you to assign Eigen expressions to MyVectorType\n    template<typename OtherDerived>\n    MyVectorType& operator=(const Eigen::MatrixBase <OtherDerived>& other)\n    {\n        this->Eigen::VectorXd::operator=(other);\n        return *this;\n    }\n};\n\nint main()\n{\n  MyVectorType v = MyVectorType::Ones(4);\n  v(2) += 10;\n  v = 2 * v;\n  std::cout << v.transpose() << std::endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/Cwise_erf.cpp",
    "content": "#include <Eigen/Core>\n#include <unsupported/Eigen/SpecialFunctions>\n#include <iostream>\nusing namespace Eigen;\nint main()\n{\n  Array4d v(-0.5,2,0,-7);\n  std::cout << v.erf() << std::endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/Cwise_erfc.cpp",
    "content": "#include <Eigen/Core>\n#include <unsupported/Eigen/SpecialFunctions>\n#include <iostream>\nusing namespace Eigen;\nint main()\n{\n  Array4d v(-0.5,2,0,-7);\n  std::cout << v.erfc() << std::endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/Cwise_lgamma.cpp",
    "content": "#include <Eigen/Core>\n#include <unsupported/Eigen/SpecialFunctions>\n#include <iostream>\nusing namespace Eigen;\nint main()\n{\n  Array4d v(0.5,10,0,-1);\n  std::cout << v.lgamma() << std::endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/DenseBase_middleCols_int.cpp",
    "content": "#include <Eigen/Core>\n#include <iostream>\n\nusing namespace Eigen;\nusing namespace std;\n\nint main(void)\n{\n    int const N = 5;\n    MatrixXi A(N,N);\n    A.setRandom();\n    cout << \"A =\\n\" << A << '\\n' << endl;\n    cout << \"A(1..3,:) =\\n\" << A.middleCols(1,3) << endl;\n    return 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/DenseBase_middleRows_int.cpp",
    "content": "#include <Eigen/Core>\n#include <iostream>\n\nusing namespace Eigen;\nusing namespace std;\n\nint main(void)\n{\n    int const N = 5;\n    MatrixXi A(N,N);\n    A.setRandom();\n    cout << \"A =\\n\" << A << '\\n' << endl;\n    cout << \"A(2..3,:) =\\n\" << A.middleRows(2,2) << endl;\n    return 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/DenseBase_template_int_middleCols.cpp",
    "content": "#include <Eigen/Core>\n#include <iostream>\n\nusing namespace Eigen;\nusing namespace std;\n\nint main(void)\n{\n    int const N = 5;\n    MatrixXi A(N,N);\n    A.setRandom();\n    cout << \"A =\\n\" << A << '\\n' << endl;\n    cout << \"A(:,1..3) =\\n\" << A.middleCols<3>(1) << endl;\n    return 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/DenseBase_template_int_middleRows.cpp",
    "content": "#include <Eigen/Core>\n#include <iostream>\n\nusing namespace Eigen;\nusing namespace std;\n\nint main(void)\n{\n    int const N = 5;\n    MatrixXi A(N,N);\n    A.setRandom();\n    cout << \"A =\\n\" << A << '\\n' << endl;\n    cout << \"A(1..3,:) =\\n\" << A.middleRows<3>(1) << endl;\n    return 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/QuickStart_example.cpp",
    "content": "#include <iostream>\n#include <Eigen/Dense>\n\nusing Eigen::MatrixXd;\n\nint main()\n{\n  MatrixXd m(2,2);\n  m(0,0) = 3;\n  m(1,0) = 2.5;\n  m(0,1) = -1;\n  m(1,1) = m(1,0) + m(0,1);\n  std::cout << m << std::endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/QuickStart_example2_dynamic.cpp",
    "content": "#include <iostream>\n#include <Eigen/Dense>\n\nusing namespace Eigen;\nusing namespace std;\n\nint main()\n{\n  MatrixXd m = MatrixXd::Random(3,3);\n  m = (m + MatrixXd::Constant(3,3,1.2)) * 50;\n  cout << \"m =\" << endl << m << endl;\n  VectorXd v(3);\n  v << 1, 2, 3;\n  cout << \"m * v =\" << endl << m * v << endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/QuickStart_example2_fixed.cpp",
    "content": "#include <iostream>\n#include <Eigen/Dense>\n\nusing namespace Eigen;\nusing namespace std;\n\nint main()\n{\n  Matrix3d m = Matrix3d::Random();\n  m = (m + Matrix3d::Constant(1.2)) * 50;\n  cout << \"m =\" << endl << m << endl;\n  Vector3d v(1,2,3);\n  \n  cout << \"m * v =\" << endl << m * v << endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/TemplateKeyword_flexible.cpp",
    "content": "#include <Eigen/Dense>\n#include <iostream>\n\nusing namespace Eigen;\n\ntemplate <typename Derived1, typename Derived2>\nvoid copyUpperTriangularPart(MatrixBase<Derived1>& dst, const MatrixBase<Derived2>& src)\n{\n  /* Note the 'template' keywords in the following line! */\n  dst.template triangularView<Upper>() = src.template triangularView<Upper>();\n}\n\nint main()\n{\n  MatrixXi m1 = MatrixXi::Ones(5,5);\n  MatrixXi m2 = MatrixXi::Random(4,4);\n  std::cout << \"m2 before copy:\" << std::endl;\n  std::cout << m2 << std::endl << std::endl;\n  copyUpperTriangularPart(m2, m1.topLeftCorner(4,4));\n  std::cout << \"m2 after copy:\" << std::endl;\n  std::cout << m2 << std::endl << std::endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/TemplateKeyword_simple.cpp",
    "content": "#include <Eigen/Dense>\n#include <iostream>\n\nusing namespace Eigen;\n\nvoid copyUpperTriangularPart(MatrixXf& dst, const MatrixXf& src)\n{\n  dst.triangularView<Upper>() = src.triangularView<Upper>();\n}\n\nint main()\n{\n  MatrixXf m1 = MatrixXf::Ones(4,4);\n  MatrixXf m2 = MatrixXf::Random(4,4);\n  std::cout << \"m2 before copy:\" << std::endl;\n  std::cout << m2 << std::endl << std::endl;\n  copyUpperTriangularPart(m2, m1);\n  std::cout << \"m2 after copy:\" << std::endl;\n  std::cout << m2 << std::endl << std::endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/TutorialInplaceLU.cpp",
    "content": "#include <iostream>\nstruct init {\n  init() { std::cout << \"[\" << \"init\" << \"]\" << std::endl; }\n};\ninit init_obj;\n// [init]\n#include <iostream>\n#include <Eigen/Dense>\n\nusing namespace std;\nusing namespace Eigen;\n\nint main()\n{\n  MatrixXd A(2,2);\n  A << 2, -1, 1, 3;\n  cout << \"Here is the input matrix A before decomposition:\\n\" << A << endl;\ncout << \"[init]\" << endl;\n\ncout << \"[declaration]\" << endl;\n  PartialPivLU<Ref<MatrixXd> > lu(A);\n  cout << \"Here is the input matrix A after decomposition:\\n\" << A << endl;\ncout << \"[declaration]\" << endl;\n\ncout << \"[matrixLU]\" << endl;\n  cout << \"Here is the matrix storing the L and U factors:\\n\" << lu.matrixLU() << endl;\ncout << \"[matrixLU]\" << endl;\n\ncout << \"[solve]\" << endl;\n  MatrixXd A0(2,2); A0 << 2, -1, 1, 3;\n  VectorXd b(2);    b << 1, 2;\n  VectorXd x = lu.solve(b);\n  cout << \"Residual: \" << (A0 * x - b).norm() << endl;\ncout << \"[solve]\" << endl;\n\ncout << \"[modifyA]\" << endl;\n  A << 3, 4, -2, 1;\n  x = lu.solve(b);\n  cout << \"Residual: \" << (A0 * x - b).norm() << endl;\ncout << \"[modifyA]\" << endl;\n\ncout << \"[recompute]\" << endl;\n  A0 = A; // save A\n  lu.compute(A);\n  x = lu.solve(b);\n  cout << \"Residual: \" << (A0 * x - b).norm() << endl;\ncout << \"[recompute]\" << endl;\n\ncout << \"[recompute_bis0]\" << endl;\n  MatrixXd A1(2,2);\n  A1 << 5,-2,3,4;\n  lu.compute(A1);\n  cout << \"Here is the input matrix A1 after decomposition:\\n\" << A1 << endl;\ncout << \"[recompute_bis0]\" << endl;\n\ncout << \"[recompute_bis1]\" << endl;\n  x = lu.solve(b);\n  cout << \"Residual: \" << (A1 * x - b).norm() << endl;\ncout << \"[recompute_bis1]\" << endl;\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/TutorialLinAlgComputeTwice.cpp",
    "content": "#include <iostream>\n#include <Eigen/Dense>\n\nusing namespace std;\nusing namespace Eigen;\n\nint main()\n{\n   Matrix2f A, b;\n   LLT<Matrix2f> llt;\n   A << 2, -1, -1, 3;\n   b << 1, 2, 3, 1;\n   cout << \"Here is the matrix A:\\n\" << A << endl;\n   cout << \"Here is the right hand side b:\\n\" << b << endl;\n   cout << \"Computing LLT decomposition...\" << endl;\n   llt.compute(A);\n   cout << \"The solution is:\\n\" << llt.solve(b) << endl;\n   A(1,1)++;\n   cout << \"The matrix A is now:\\n\" << A << endl;\n   cout << \"Computing LLT decomposition...\" << endl;\n   llt.compute(A);\n   cout << \"The solution is now:\\n\" << llt.solve(b) << endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/TutorialLinAlgExComputeSolveError.cpp",
    "content": "#include <iostream>\n#include <Eigen/Dense>\n\nusing namespace std;\nusing namespace Eigen;\n\nint main()\n{\n   MatrixXd A = MatrixXd::Random(100,100);\n   MatrixXd b = MatrixXd::Random(100,50);\n   MatrixXd x = A.fullPivLu().solve(b);\n   double relative_error = (A*x - b).norm() / b.norm(); // norm() is L2 norm\n   cout << \"The relative error is:\\n\" << relative_error << endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/TutorialLinAlgExSolveColPivHouseholderQR.cpp",
    "content": "#include <iostream>\n#include <Eigen/Dense>\n\nusing namespace std;\nusing namespace Eigen;\n\nint main()\n{\n   Matrix3f A;\n   Vector3f b;\n   A << 1,2,3,  4,5,6,  7,8,10;\n   b << 3, 3, 4;\n   cout << \"Here is the matrix A:\\n\" << A << endl;\n   cout << \"Here is the vector b:\\n\" << b << endl;\n   Vector3f x = A.colPivHouseholderQr().solve(b);\n   cout << \"The solution is:\\n\" << x << endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/TutorialLinAlgExSolveLDLT.cpp",
    "content": "#include <iostream>\n#include <Eigen/Dense>\n\nusing namespace std;\nusing namespace Eigen;\n\nint main()\n{\n   Matrix2f A, b;\n   A << 2, -1, -1, 3;\n   b << 1, 2, 3, 1;\n   cout << \"Here is the matrix A:\\n\" << A << endl;\n   cout << \"Here is the right hand side b:\\n\" << b << endl;\n   Matrix2f x = A.ldlt().solve(b);\n   cout << \"The solution is:\\n\" << x << endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/TutorialLinAlgInverseDeterminant.cpp",
    "content": "#include <iostream>\n#include <Eigen/Dense>\n\nusing namespace std;\nusing namespace Eigen;\n\nint main()\n{\n   Matrix3f A;\n   A << 1, 2, 1,\n        2, 1, 0,\n        -1, 1, 2;\n   cout << \"Here is the matrix A:\\n\" << A << endl;\n   cout << \"The determinant of A is \" << A.determinant() << endl;\n   cout << \"The inverse of A is:\\n\" << A.inverse() << endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/TutorialLinAlgRankRevealing.cpp",
    "content": "#include <iostream>\n#include <Eigen/Dense>\n\nusing namespace std;\nusing namespace Eigen;\n\nint main()\n{\n   Matrix3f A;\n   A << 1, 2, 5,\n        2, 1, 4,\n        3, 0, 3;\n   cout << \"Here is the matrix A:\\n\" << A << endl;\n   FullPivLU<Matrix3f> lu_decomp(A);\n   cout << \"The rank of A is \" << lu_decomp.rank() << endl;\n   cout << \"Here is a matrix whose columns form a basis of the null-space of A:\\n\"\n        << lu_decomp.kernel() << endl;\n   cout << \"Here is a matrix whose columns form a basis of the column-space of A:\\n\"\n        << lu_decomp.image(A) << endl; // yes, have to pass the original A\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/TutorialLinAlgSVDSolve.cpp",
    "content": "#include <iostream>\n#include <Eigen/Dense>\n\nusing namespace std;\nusing namespace Eigen;\n\nint main()\n{\n   MatrixXf A = MatrixXf::Random(3, 2);\n   cout << \"Here is the matrix A:\\n\" << A << endl;\n   VectorXf b = VectorXf::Random(3);\n   cout << \"Here is the right hand side b:\\n\" << b << endl;\n   cout << \"The least-squares solution is:\\n\"\n        << A.bdcSvd(ComputeThinU | ComputeThinV).solve(b) << endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/TutorialLinAlgSelfAdjointEigenSolver.cpp",
    "content": "#include <iostream>\n#include <Eigen/Dense>\n\nusing namespace std;\nusing namespace Eigen;\n\nint main()\n{\n   Matrix2f A;\n   A << 1, 2, 2, 3;\n   cout << \"Here is the matrix A:\\n\" << A << endl;\n   SelfAdjointEigenSolver<Matrix2f> eigensolver(A);\n   if (eigensolver.info() != Success) abort();\n   cout << \"The eigenvalues of A are:\\n\" << eigensolver.eigenvalues() << endl;\n   cout << \"Here's a matrix whose columns are eigenvectors of A \\n\"\n        << \"corresponding to these eigenvalues:\\n\"\n        << eigensolver.eigenvectors() << endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/TutorialLinAlgSetThreshold.cpp",
    "content": "#include <iostream>\n#include <Eigen/Dense>\n\nusing namespace std;\nusing namespace Eigen;\n\nint main()\n{\n   Matrix2d A;\n   A << 2, 1,\n        2, 0.9999999999;\n   FullPivLU<Matrix2d> lu(A);\n   cout << \"By default, the rank of A is found to be \" << lu.rank() << endl;\n   lu.setThreshold(1e-5);\n   cout << \"With threshold 1e-5, the rank of A is found to be \" << lu.rank() << endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/Tutorial_ArrayClass_accessors.cpp",
    "content": "#include <Eigen/Dense>\n#include <iostream>\n\nusing namespace Eigen;\nusing namespace std;\n\nint main()\n{\n  ArrayXXf  m(2,2);\n  \n  // assign some values coefficient by coefficient\n  m(0,0) = 1.0; m(0,1) = 2.0;\n  m(1,0) = 3.0; m(1,1) = m(0,1) + m(1,0);\n  \n  // print values to standard output\n  cout << m << endl << endl;\n \n  // using the comma-initializer is also allowed\n  m << 1.0,2.0,\n       3.0,4.0;\n     \n  // print values to standard output\n  cout << m << endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/Tutorial_ArrayClass_addition.cpp",
    "content": "#include <Eigen/Dense>\n#include <iostream>\n\nusing namespace Eigen;\nusing namespace std;\n\nint main()\n{\n  ArrayXXf a(3,3);\n  ArrayXXf b(3,3);\n  a << 1,2,3,\n       4,5,6,\n       7,8,9;\n  b << 1,2,3,\n       1,2,3,\n       1,2,3;\n       \n  // Adding two arrays\n  cout << \"a + b = \" << endl << a + b << endl << endl;\n\n  // Subtracting a scalar from an array\n  cout << \"a - 2 = \" << endl << a - 2 << endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/Tutorial_ArrayClass_cwise_other.cpp",
    "content": "#include <Eigen/Dense>\n#include <iostream>\n\nusing namespace Eigen;\nusing namespace std;\n\nint main()\n{\n  ArrayXf a = ArrayXf::Random(5);\n  a *= 2;\n  cout << \"a =\" << endl \n       << a << endl;\n  cout << \"a.abs() =\" << endl \n       << a.abs() << endl;\n  cout << \"a.abs().sqrt() =\" << endl \n       << a.abs().sqrt() << endl;\n  cout << \"a.min(a.abs().sqrt()) =\" << endl \n       << a.min(a.abs().sqrt()) << endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/Tutorial_ArrayClass_interop.cpp",
    "content": "#include <Eigen/Dense>\n#include <iostream>\n\nusing namespace Eigen;\nusing namespace std;\n\nint main()\n{\n  MatrixXf m(2,2);\n  MatrixXf n(2,2);\n  MatrixXf result(2,2);\n\n  m << 1,2,\n       3,4;\n  n << 5,6,\n       7,8;\n  \n  result = (m.array() + 4).matrix() * m;\n  cout << \"-- Combination 1: --\" << endl << result << endl << endl;\n  result = (m.array() * n.array()).matrix() * m;\n  cout << \"-- Combination 2: --\" << endl << result << endl << endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/Tutorial_ArrayClass_interop_matrix.cpp",
    "content": "#include <Eigen/Dense>\n#include <iostream>\n\nusing namespace Eigen;\nusing namespace std;\n\nint main()\n{\n  MatrixXf m(2,2);\n  MatrixXf n(2,2);\n  MatrixXf result(2,2);\n\n  m << 1,2,\n       3,4;\n  n << 5,6,\n       7,8;\n\n  result = m * n;\n  cout << \"-- Matrix m*n: --\" << endl << result << endl << endl;\n  result = m.array() * n.array();\n  cout << \"-- Array m*n: --\" << endl << result << endl << endl;\n  result = m.cwiseProduct(n);\n  cout << \"-- With cwiseProduct: --\" << endl << result << endl << endl;\n  result = m.array() + 4;\n  cout << \"-- Array m + 4: --\" << endl << result << endl << endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/Tutorial_ArrayClass_mult.cpp",
    "content": "#include <Eigen/Dense>\n#include <iostream>\n\nusing namespace Eigen;\nusing namespace std;\n\nint main()\n{\n  ArrayXXf a(2,2);\n  ArrayXXf b(2,2);\n  a << 1,2,\n       3,4;\n  b << 5,6,\n       7,8;\n  cout << \"a * b = \" << endl << a * b << endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/Tutorial_BlockOperations_block_assignment.cpp",
    "content": "#include <Eigen/Dense>\n#include <iostream>\n\nusing namespace std;\nusing namespace Eigen;\n\nint main()\n{\n  Array22f m;\n  m << 1,2,\n       3,4;\n  Array44f a = Array44f::Constant(0.6);\n  cout << \"Here is the array a:\" << endl << a << endl << endl;\n  a.block<2,2>(1,1) = m;\n  cout << \"Here is now a with m copied into its central 2x2 block:\" << endl << a << endl << endl;\n  a.block(0,0,2,3) = a.block(2,1,2,3);\n  cout << \"Here is now a with bottom-right 2x3 block copied into top-left 2x2 block:\" << endl << a << endl << endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/Tutorial_BlockOperations_colrow.cpp",
    "content": "#include <Eigen/Dense>\n#include <iostream>\n\nusing namespace std;\n\nint main()\n{\n  Eigen::MatrixXf m(3,3);\n  m << 1,2,3,\n       4,5,6,\n       7,8,9;\n  cout << \"Here is the matrix m:\" << endl << m << endl;\n  cout << \"2nd Row: \" << m.row(1) << endl;\n  m.col(2) += 3 * m.col(0);\n  cout << \"After adding 3 times the first column into the third column, the matrix m is:\\n\";\n  cout << m << endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/Tutorial_BlockOperations_corner.cpp",
    "content": "#include <Eigen/Dense>\n#include <iostream>\n\nusing namespace std;\n\nint main()\n{\n  Eigen::Matrix4f m;\n  m << 1, 2, 3, 4,\n       5, 6, 7, 8,\n       9, 10,11,12,\n       13,14,15,16;\n  cout << \"m.leftCols(2) =\" << endl << m.leftCols(2) << endl << endl;\n  cout << \"m.bottomRows<2>() =\" << endl << m.bottomRows<2>() << endl << endl;\n  m.topLeftCorner(1,3) = m.bottomRightCorner(3,1).transpose();\n  cout << \"After assignment, m = \" << endl << m << endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/Tutorial_BlockOperations_print_block.cpp",
    "content": "#include <Eigen/Dense>\n#include <iostream>\n\nusing namespace std;\n\nint main()\n{\n  Eigen::MatrixXf m(4,4);\n  m <<  1, 2, 3, 4,\n        5, 6, 7, 8,\n        9,10,11,12,\n       13,14,15,16;\n  cout << \"Block in the middle\" << endl;\n  cout << m.block<2,2>(1,1) << endl << endl;\n  for (int i = 1; i <= 3; ++i)\n  {\n    cout << \"Block of size \" << i << \"x\" << i << endl;\n    cout << m.block(0,0,i,i) << endl << endl;\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/Tutorial_BlockOperations_vector.cpp",
    "content": "#include <Eigen/Dense>\n#include <iostream>\n\nusing namespace std;\n\nint main()\n{\n  Eigen::ArrayXf v(6);\n  v << 1, 2, 3, 4, 5, 6;\n  cout << \"v.head(3) =\" << endl << v.head(3) << endl << endl;\n  cout << \"v.tail<3>() = \" << endl << v.tail<3>() << endl << endl;\n  v.segment(1,4) *= 2;\n  cout << \"after 'v.segment(1,4) *= 2', v =\" << endl << v << endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/Tutorial_PartialLU_solve.cpp",
    "content": "#include <Eigen/Core>\n#include <Eigen/LU>\n#include <iostream>\n\nusing namespace std;\nusing namespace Eigen;\n\nint main()\n{\n   Matrix3f A;\n   Vector3f b;\n   A << 1,2,3,  4,5,6,  7,8,10;\n   b << 3, 3, 4;\n   cout << \"Here is the matrix A:\" << endl << A << endl;\n   cout << \"Here is the vector b:\" << endl << b << endl;\n   Vector3f x = A.lu().solve(b);\n   cout << \"The solution is:\" << endl << x << endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_broadcast_1nn.cpp",
    "content": "#include <iostream>\n#include <Eigen/Dense>\n\nusing namespace std;\nusing namespace Eigen;\n\nint main()\n{\n  Eigen::MatrixXf m(2,4);\n  Eigen::VectorXf v(2);\n  \n  m << 1, 23, 6, 9,\n       3, 11, 7, 2;\n       \n  v << 2,\n       3;\n\n  MatrixXf::Index index;\n  // find nearest neighbour\n  (m.colwise() - v).colwise().squaredNorm().minCoeff(&index);\n\n  cout << \"Nearest neighbour is column \" << index << \":\" << endl;\n  cout << m.col(index) << endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_broadcast_simple.cpp",
    "content": "#include <iostream>\n#include <Eigen/Dense>\n\nusing namespace std;\nint main()\n{\n  Eigen::MatrixXf mat(2,4);\n  Eigen::VectorXf v(2);\n  \n  mat << 1, 2, 6, 9,\n         3, 1, 7, 2;\n         \n  v << 0,\n       1;\n       \n  //add v to each column of m\n  mat.colwise() += v;\n  \n  std::cout << \"Broadcasting result: \" << std::endl;\n  std::cout << mat << std::endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_broadcast_simple_rowwise.cpp",
    "content": "#include <iostream>\n#include <Eigen/Dense>\n\nusing namespace std;\nint main()\n{\n  Eigen::MatrixXf mat(2,4);\n  Eigen::VectorXf v(4);\n  \n  mat << 1, 2, 6, 9,\n         3, 1, 7, 2;\n         \n  v << 0,1,2,3;\n       \n  //add v to each row of m\n  mat.rowwise() += v.transpose();\n  \n  std::cout << \"Broadcasting result: \" << std::endl;\n  std::cout << mat << std::endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_colwise.cpp",
    "content": "#include <iostream>\n#include <Eigen/Dense>\n\nusing namespace std;\nint main()\n{\n  Eigen::MatrixXf mat(2,4);\n  mat << 1, 2, 6, 9,\n         3, 1, 7, 2;\n  \n  std::cout << \"Column's maximum: \" << std::endl\n   << mat.colwise().maxCoeff() << std::endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_maxnorm.cpp",
    "content": "#include <iostream>\n#include <Eigen/Dense>\n\nusing namespace std;\nusing namespace Eigen;\nint main()\n{\n  MatrixXf mat(2,4);\n  mat << 1, 2, 6, 9,\n         3, 1, 7, 2;\n  \n  MatrixXf::Index   maxIndex;\n  float maxNorm = mat.colwise().sum().maxCoeff(&maxIndex);\n  \n  std::cout << \"Maximum sum at position \" << maxIndex << std::endl;\n\n  std::cout << \"The corresponding vector is: \" << std::endl;\n  std::cout << mat.col( maxIndex ) << std::endl;\n  std::cout << \"And its sum is is: \" << maxNorm << std::endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_reductions_bool.cpp",
    "content": "#include <Eigen/Dense>\n#include <iostream>\n\nusing namespace std;\nusing namespace Eigen;\n\nint main()\n{\n  ArrayXXf a(2,2);\n  \n  a << 1,2,\n       3,4;\n\n  cout << \"(a > 0).all()   = \" << (a > 0).all() << endl;\n  cout << \"(a > 0).any()   = \" << (a > 0).any() << endl;\n  cout << \"(a > 0).count() = \" << (a > 0).count() << endl;\n  cout << endl;\n  cout << \"(a > 2).all()   = \" << (a > 2).all() << endl;\n  cout << \"(a > 2).any()   = \" << (a > 2).any() << endl;\n  cout << \"(a > 2).count() = \" << (a > 2).count() << endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_reductions_norm.cpp",
    "content": "#include <Eigen/Dense>\n#include <iostream>\n\nusing namespace std;\nusing namespace Eigen;\n\nint main()\n{\n  VectorXf v(2);\n  MatrixXf m(2,2), n(2,2);\n  \n  v << -1,\n       2;\n  \n  m << 1,-2,\n       -3,4;\n\n  cout << \"v.squaredNorm() = \" << v.squaredNorm() << endl;\n  cout << \"v.norm() = \" << v.norm() << endl;\n  cout << \"v.lpNorm<1>() = \" << v.lpNorm<1>() << endl;\n  cout << \"v.lpNorm<Infinity>() = \" << v.lpNorm<Infinity>() << endl;\n\n  cout << endl;\n  cout << \"m.squaredNorm() = \" << m.squaredNorm() << endl;\n  cout << \"m.norm() = \" << m.norm() << endl;\n  cout << \"m.lpNorm<1>() = \" << m.lpNorm<1>() << endl;\n  cout << \"m.lpNorm<Infinity>() = \" << m.lpNorm<Infinity>() << endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_reductions_operatornorm.cpp",
    "content": "#include <Eigen/Dense>\n#include <iostream>\n\nusing namespace Eigen;\nusing namespace std;\n\nint main()\n{\n  MatrixXf m(2,2);\n  m << 1,-2,\n       -3,4;\n\n  cout << \"1-norm(m)     = \" << m.cwiseAbs().colwise().sum().maxCoeff()\n       << \" == \"             << m.colwise().lpNorm<1>().maxCoeff() << endl;\n\n  cout << \"infty-norm(m) = \" << m.cwiseAbs().rowwise().sum().maxCoeff()\n       << \" == \"             << m.rowwise().lpNorm<1>().maxCoeff() << endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_rowwise.cpp",
    "content": "#include <iostream>\n#include <Eigen/Dense>\n\nusing namespace std;\nint main()\n{\n  Eigen::MatrixXf mat(2,4);\n  mat << 1, 2, 6, 9,\n         3, 1, 7, 2;\n  \n  std::cout << \"Row's maximum: \" << std::endl\n   << mat.rowwise().maxCoeff() << std::endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_visitors.cpp",
    "content": "#include <iostream>\n#include <Eigen/Dense>\n\nusing namespace std;\nusing namespace Eigen;\n\nint main()\n{\n  Eigen::MatrixXf m(2,2);\n  \n  m << 1, 2,\n       3, 4;\n\n  //get location of maximum\n  MatrixXf::Index maxRow, maxCol;\n  float max = m.maxCoeff(&maxRow, &maxCol);\n\n  //get location of minimum\n  MatrixXf::Index minRow, minCol;\n  float min = m.minCoeff(&minRow, &minCol);\n\n  cout << \"Max: \" << max <<  \", at: \" <<\n     maxRow << \",\" << maxCol << endl;\n  cout << \"Min: \" << min << \", at: \" <<\n     minRow << \",\" << minCol << endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/Tutorial_simple_example_dynamic_size.cpp",
    "content": "#include <Eigen/Core>\n#include <iostream>\n\nusing namespace Eigen;\n\nint main()\n{\n  for (int size=1; size<=4; ++size)\n  {\n    MatrixXi m(size,size+1);         // a (size)x(size+1)-matrix of int's\n    for (int j=0; j<m.cols(); ++j)   // loop over columns\n      for (int i=0; i<m.rows(); ++i) // loop over rows\n        m(i,j) = i+j*size;           // to access matrix coefficients,\n                                     // use operator()(int,int)\n    std::cout << m << \"\\n\\n\";\n  }\n\n  VectorXf v(4); // a vector of 4 float's\n  // to access vector coefficients, use either operator () or operator []\n  v[0] = 1; v[1] = 2; v(2) = 3; v(3) = 4;\n  std::cout << \"\\nv:\\n\" << v << std::endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/Tutorial_simple_example_fixed_size.cpp",
    "content": "#include <Eigen/Core>\n#include <iostream>\n\nusing namespace Eigen;\n\nint main()\n{\n  Matrix3f m3;\n  m3 << 1, 2, 3, 4, 5, 6, 7, 8, 9;\n  Matrix4f m4 = Matrix4f::Identity();\n  Vector4i v4(1, 2, 3, 4);\n\n  std::cout << \"m3\\n\" << m3 << \"\\nm4:\\n\"\n    << m4 << \"\\nv4:\\n\" << v4 << std::endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/class_Block.cpp",
    "content": "#include <Eigen/Core>\n#include <iostream>\nusing namespace Eigen;\nusing namespace std;\n\ntemplate<typename Derived>\nEigen::Block<Derived>\ntopLeftCorner(MatrixBase<Derived>& m, int rows, int cols)\n{\n  return Eigen::Block<Derived>(m.derived(), 0, 0, rows, cols);\n}\n\ntemplate<typename Derived>\nconst Eigen::Block<const Derived>\ntopLeftCorner(const MatrixBase<Derived>& m, int rows, int cols)\n{\n  return Eigen::Block<const Derived>(m.derived(), 0, 0, rows, cols);\n}\n\nint main(int, char**)\n{\n  Matrix4d m = Matrix4d::Identity();\n  cout << topLeftCorner(4*m, 2, 3) << endl; // calls the const version\n  topLeftCorner(m, 2, 3) *= 5;              // calls the non-const version\n  cout << \"Now the matrix m is:\" << endl << m << endl;\n  return 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/class_CwiseBinaryOp.cpp",
    "content": "#include <Eigen/Core>\n#include <iostream>\nusing namespace Eigen;\nusing namespace std;\n\n// define a custom template binary functor\ntemplate<typename Scalar> struct MakeComplexOp {\n  EIGEN_EMPTY_STRUCT_CTOR(MakeComplexOp)\n  typedef complex<Scalar> result_type;\n  complex<Scalar> operator()(const Scalar& a, const Scalar& b) const { return complex<Scalar>(a,b); }\n};\n\nint main(int, char**)\n{\n  Matrix4d m1 = Matrix4d::Random(), m2 = Matrix4d::Random();\n  cout << m1.binaryExpr(m2, MakeComplexOp<double>()) << endl;\n  return 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/class_CwiseUnaryOp.cpp",
    "content": "#include <Eigen/Core>\n#include <iostream>\nusing namespace Eigen;\nusing namespace std;\n\n// define a custom template unary functor\ntemplate<typename Scalar>\nstruct CwiseClampOp {\n  CwiseClampOp(const Scalar& inf, const Scalar& sup) : m_inf(inf), m_sup(sup) {}\n  const Scalar operator()(const Scalar& x) const { return x<m_inf ? m_inf : (x>m_sup ? m_sup : x); }\n  Scalar m_inf, m_sup;\n};\n\nint main(int, char**)\n{\n  Matrix4d m1 = Matrix4d::Random();\n  cout << m1 << endl << \"becomes: \" << endl << m1.unaryExpr(CwiseClampOp<double>(-0.5,0.5)) << endl;\n  return 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/class_CwiseUnaryOp_ptrfun.cpp",
    "content": "#include <Eigen/Core>\n#include <iostream>\nusing namespace Eigen;\nusing namespace std;\n\n// define function to be applied coefficient-wise\ndouble ramp(double x)\n{\n  if (x > 0)\n    return x;\n  else \n    return 0;\n}\n\nint main(int, char**)\n{\n  Matrix4d m1 = Matrix4d::Random();\n  cout << m1 << endl << \"becomes: \" << endl << m1.unaryExpr(ptr_fun(ramp)) << endl;\n  return 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/class_FixedBlock.cpp",
    "content": "#include <Eigen/Core>\n#include <iostream>\nusing namespace Eigen;\nusing namespace std;\n\ntemplate<typename Derived>\nEigen::Block<Derived, 2, 2>\ntopLeft2x2Corner(MatrixBase<Derived>& m)\n{\n  return Eigen::Block<Derived, 2, 2>(m.derived(), 0, 0);\n}\n\ntemplate<typename Derived>\nconst Eigen::Block<const Derived, 2, 2>\ntopLeft2x2Corner(const MatrixBase<Derived>& m)\n{\n  return Eigen::Block<const Derived, 2, 2>(m.derived(), 0, 0);\n}\n\nint main(int, char**)\n{\n  Matrix3d m = Matrix3d::Identity();\n  cout << topLeft2x2Corner(4*m) << endl; // calls the const version\n  topLeft2x2Corner(m) *= 2;              // calls the non-const version\n  cout << \"Now the matrix m is:\" << endl << m << endl;\n  return 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/class_FixedReshaped.cpp",
    "content": "#include <Eigen/Core>\n#include <iostream>\nusing namespace Eigen;\nusing namespace std;\n\ntemplate<typename Derived>\nEigen::Reshaped<Derived, 4, 2>\nreshape_helper(MatrixBase<Derived>& m)\n{\n  return Eigen::Reshaped<Derived, 4, 2>(m.derived());\n}\n\nint main(int, char**)\n{\n  MatrixXd m(2, 4);\n  m << 1, 2, 3, 4,\n       5, 6, 7, 8;\n  MatrixXd n = reshape_helper(m);\n  cout << \"matrix m is:\" << endl << m << endl;\n  cout << \"matrix n is:\" << endl << n << endl;\n  return 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/class_FixedVectorBlock.cpp",
    "content": "#include <Eigen/Core>\n#include <iostream>\nusing namespace Eigen;\nusing namespace std;\n\ntemplate<typename Derived>\nEigen::VectorBlock<Derived, 2>\nfirstTwo(MatrixBase<Derived>& v)\n{\n  return Eigen::VectorBlock<Derived, 2>(v.derived(), 0);\n}\n\ntemplate<typename Derived>\nconst Eigen::VectorBlock<const Derived, 2>\nfirstTwo(const MatrixBase<Derived>& v)\n{\n  return Eigen::VectorBlock<const Derived, 2>(v.derived(), 0);\n}\n\nint main(int, char**)\n{\n  Matrix<int,1,6> v; v << 1,2,3,4,5,6;\n  cout << firstTwo(4*v) << endl; // calls the const version\n  firstTwo(v) *= 2;              // calls the non-const version\n  cout << \"Now the vector v is:\" << endl << v << endl;\n  return 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/class_Reshaped.cpp",
    "content": "#include <Eigen/Core>\n#include <iostream>\nusing namespace std;\nusing namespace Eigen;\n\ntemplate<typename Derived>\nconst Reshaped<const Derived>\nreshape_helper(const MatrixBase<Derived>& m, int rows, int cols)\n{\n  return Reshaped<const Derived>(m.derived(), rows, cols);\n}\n\nint main(int, char**)\n{\n  MatrixXd m(3, 4);\n  m << 1, 4, 7, 10,\n       2, 5, 8, 11,\n       3, 6, 9, 12;\n  cout << m << endl;\n  Ref<const MatrixXd> n = reshape_helper(m, 2, 6);\n  cout << \"Matrix m is:\" << endl << m << endl;\n  cout << \"Matrix n is:\" << endl << n << endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/class_VectorBlock.cpp",
    "content": "#include <Eigen/Core>\n#include <iostream>\nusing namespace Eigen;\nusing namespace std;\n\ntemplate<typename Derived>\nEigen::VectorBlock<Derived>\nsegmentFromRange(MatrixBase<Derived>& v, int start, int end)\n{\n  return Eigen::VectorBlock<Derived>(v.derived(), start, end-start);\n}\n\ntemplate<typename Derived>\nconst Eigen::VectorBlock<const Derived>\nsegmentFromRange(const MatrixBase<Derived>& v, int start, int end)\n{\n  return Eigen::VectorBlock<const Derived>(v.derived(), start, end-start);\n}\n\nint main(int, char**)\n{\n  Matrix<int,1,6> v; v << 1,2,3,4,5,6;\n  cout << segmentFromRange(2*v, 2, 4) << endl; // calls the const version\n  segmentFromRange(v, 1, 3) *= 5;              // calls the non-const version\n  cout << \"Now the vector v is:\" << endl << v << endl;\n  return 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/function_taking_eigenbase.cpp",
    "content": "#include <iostream>\n#include <Eigen/Core>\nusing namespace Eigen;\n\ntemplate <typename Derived>\nvoid print_size(const EigenBase<Derived>& b)\n{\n  std::cout << \"size (rows, cols): \" << b.size() << \" (\" << b.rows()\n            << \", \" << b.cols() << \")\" << std::endl;\n}\n\nint main()\n{\n    Vector3f v;\n    print_size(v);\n    // v.asDiagonal() returns a 3x3 diagonal matrix pseudo-expression\n    print_size(v.asDiagonal());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/function_taking_ref.cpp",
    "content": "#include <iostream>\n#include <Eigen/SVD>\nusing namespace Eigen;\nusing namespace std;\n\nfloat inv_cond(const Ref<const MatrixXf>& a)\n{\n  const VectorXf sing_vals = a.jacobiSvd().singularValues();\n  return sing_vals(sing_vals.size()-1) / sing_vals(0);\n}\n\nint main()\n{\n  Matrix4f m = Matrix4f::Random();\n  cout << \"matrix m:\" << endl << m << endl << endl;\n  cout << \"inv_cond(m):          \" << inv_cond(m)                      << endl;\n  cout << \"inv_cond(m(1:3,1:3)): \" << inv_cond(m.topLeftCorner(3,3))   << endl;\n  cout << \"inv_cond(m+I):        \" << inv_cond(m+Matrix4f::Identity()) << endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/make_circulant.cpp",
    "content": "/*\nThis program is presented in several fragments in the doc page.\nEvery fragment is in its own file; this file simply combines them.\n*/\n\n#include \"make_circulant.cpp.preamble\"\n#include \"make_circulant.cpp.traits\"\n#include \"make_circulant.cpp.expression\"\n#include \"make_circulant.cpp.evaluator\"\n#include \"make_circulant.cpp.entry\"\n#include \"make_circulant.cpp.main\"\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/make_circulant.cpp.entry",
    "content": "template <class ArgType>\nCirculant<ArgType> makeCirculant(const Eigen::MatrixBase<ArgType>& arg)\n{\n  return Circulant<ArgType>(arg.derived());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/make_circulant.cpp.evaluator",
    "content": "namespace Eigen {\n  namespace internal {\n    template<typename ArgType>\n    struct evaluator<Circulant<ArgType> >\n      : evaluator_base<Circulant<ArgType> >\n    {\n      typedef Circulant<ArgType> XprType;\n      typedef typename nested_eval<ArgType, XprType::ColsAtCompileTime>::type ArgTypeNested;\n      typedef typename remove_all<ArgTypeNested>::type ArgTypeNestedCleaned;\n      typedef typename XprType::CoeffReturnType CoeffReturnType;\n\n      enum { \n        CoeffReadCost = evaluator<ArgTypeNestedCleaned>::CoeffReadCost,\n        Flags = Eigen::ColMajor \n      };\n      \n      evaluator(const XprType& xpr)\n        : m_argImpl(xpr.m_arg), m_rows(xpr.rows())\n      { }\n\n      CoeffReturnType coeff(Index row, Index col) const\n      {\n        Index index = row - col;\n        if (index < 0) index += m_rows;\n        return m_argImpl.coeff(index);\n      }\n\n      evaluator<ArgTypeNestedCleaned> m_argImpl;\n      const Index m_rows;\n    };\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/make_circulant.cpp.expression",
    "content": "template <class ArgType>\nclass Circulant : public Eigen::MatrixBase<Circulant<ArgType> >\n{\npublic:\n  Circulant(const ArgType& arg)\n    : m_arg(arg)\n  { \n    EIGEN_STATIC_ASSERT(ArgType::ColsAtCompileTime == 1,\n                        YOU_TRIED_CALLING_A_VECTOR_METHOD_ON_A_MATRIX);\n  }\n\n  typedef typename Eigen::internal::ref_selector<Circulant>::type Nested; \n\n  typedef Eigen::Index Index;\n  Index rows() const { return m_arg.rows(); }\n  Index cols() const { return m_arg.rows(); }\n\n  typedef typename Eigen::internal::ref_selector<ArgType>::type ArgTypeNested;\n  ArgTypeNested m_arg;\n};\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/make_circulant.cpp.main",
    "content": "int main()\n{\n  Eigen::VectorXd vec(4);\n  vec << 1, 2, 4, 8;\n  Eigen::MatrixXd mat;\n  mat = makeCirculant(vec);\n  std::cout << mat << std::endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/make_circulant.cpp.preamble",
    "content": "#include <Eigen/Core>\n#include <iostream>\n\ntemplate <class ArgType> class Circulant;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/make_circulant.cpp.traits",
    "content": "namespace Eigen {\n  namespace internal {\n    template <class ArgType>\n    struct traits<Circulant<ArgType> >\n    {\n      typedef Eigen::Dense StorageKind;\n      typedef Eigen::MatrixXpr XprKind;\n      typedef typename ArgType::StorageIndex StorageIndex;\n      typedef typename ArgType::Scalar Scalar;\n      enum { \n        Flags = Eigen::ColMajor,\n        RowsAtCompileTime = ArgType::RowsAtCompileTime,\n        ColsAtCompileTime = ArgType::RowsAtCompileTime,\n        MaxRowsAtCompileTime = ArgType::MaxRowsAtCompileTime,\n        MaxColsAtCompileTime = ArgType::MaxRowsAtCompileTime\n      };\n    };\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/make_circulant2.cpp",
    "content": "#include <Eigen/Core>\n#include <iostream>\n\nusing namespace Eigen;\n\n// [circulant_func]\ntemplate<class ArgType>\nclass circulant_functor {\n  const ArgType &m_vec;\npublic:\n  circulant_functor(const ArgType& arg) : m_vec(arg) {}\n\n  const typename ArgType::Scalar& operator() (Index row, Index col) const {\n    Index index = row - col;\n    if (index < 0) index += m_vec.size();\n    return m_vec(index);\n  }\n};\n// [circulant_func]\n\n// [square]\ntemplate<class ArgType>\nstruct circulant_helper {\n  typedef Matrix<typename ArgType::Scalar,\n                 ArgType::SizeAtCompileTime,\n                 ArgType::SizeAtCompileTime,\n                 ColMajor,\n                 ArgType::MaxSizeAtCompileTime,\n                 ArgType::MaxSizeAtCompileTime> MatrixType;\n};\n// [square]\n\n// [makeCirculant]\ntemplate <class ArgType>\nCwiseNullaryOp<circulant_functor<ArgType>, typename circulant_helper<ArgType>::MatrixType>\nmakeCirculant(const Eigen::MatrixBase<ArgType>& arg)\n{\n  typedef typename circulant_helper<ArgType>::MatrixType MatrixType;\n  return MatrixType::NullaryExpr(arg.size(), arg.size(), circulant_functor<ArgType>(arg.derived()));\n}\n// [makeCirculant]\n\n// [main]\nint main()\n{\n  Eigen::VectorXd vec(4);\n  vec << 1, 2, 4, 8;\n  Eigen::MatrixXd mat;\n  mat = makeCirculant(vec);\n  std::cout << mat << std::endl;\n}\n// [main]\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/matrixfree_cg.cpp",
    "content": "#include <iostream>\n#include <Eigen/Core>\n#include <Eigen/Dense>\n#include <Eigen/IterativeLinearSolvers>\n#include <unsupported/Eigen/IterativeSolvers>\n\nclass MatrixReplacement;\nusing Eigen::SparseMatrix;\n\nnamespace Eigen {\nnamespace internal {\n  // MatrixReplacement looks-like a SparseMatrix, so let's inherits its traits:\n  template<>\n  struct traits<MatrixReplacement> :  public Eigen::internal::traits<Eigen::SparseMatrix<double> >\n  {};\n}\n}\n\n// Example of a matrix-free wrapper from a user type to Eigen's compatible type\n// For the sake of simplicity, this example simply wrap a Eigen::SparseMatrix.\nclass MatrixReplacement : public Eigen::EigenBase<MatrixReplacement> {\npublic:\n  // Required typedefs, constants, and method:\n  typedef double Scalar;\n  typedef double RealScalar;\n  typedef int StorageIndex;\n  enum {\n    ColsAtCompileTime = Eigen::Dynamic,\n    MaxColsAtCompileTime = Eigen::Dynamic,\n    IsRowMajor = false\n  };\n\n  Index rows() const { return mp_mat->rows(); }\n  Index cols() const { return mp_mat->cols(); }\n\n  template<typename Rhs>\n  Eigen::Product<MatrixReplacement,Rhs,Eigen::AliasFreeProduct> operator*(const Eigen::MatrixBase<Rhs>& x) const {\n    return Eigen::Product<MatrixReplacement,Rhs,Eigen::AliasFreeProduct>(*this, x.derived());\n  }\n\n  // Custom API:\n  MatrixReplacement() : mp_mat(0) {}\n\n  void attachMyMatrix(const SparseMatrix<double> &mat) {\n    mp_mat = &mat;\n  }\n  const SparseMatrix<double> my_matrix() const { return *mp_mat; }\n\nprivate:\n  const SparseMatrix<double> *mp_mat;\n};\n\n\n// Implementation of MatrixReplacement * Eigen::DenseVector though a specialization of internal::generic_product_impl:\nnamespace Eigen {\nnamespace internal {\n\n  template<typename Rhs>\n  struct generic_product_impl<MatrixReplacement, Rhs, SparseShape, DenseShape, GemvProduct> // GEMV stands for matrix-vector\n  : generic_product_impl_base<MatrixReplacement,Rhs,generic_product_impl<MatrixReplacement,Rhs> >\n  {\n    typedef typename Product<MatrixReplacement,Rhs>::Scalar Scalar;\n\n    template<typename Dest>\n    static void scaleAndAddTo(Dest& dst, const MatrixReplacement& lhs, const Rhs& rhs, const Scalar& alpha)\n    {\n      // This method should implement \"dst += alpha * lhs * rhs\" inplace,\n      // however, for iterative solvers, alpha is always equal to 1, so let's not bother about it.\n      assert(alpha==Scalar(1) && \"scaling is not implemented\");\n      EIGEN_ONLY_USED_FOR_DEBUG(alpha);\n\n      // Here we could simply call dst.noalias() += lhs.my_matrix() * rhs,\n      // but let's do something fancier (and less efficient):\n      for(Index i=0; i<lhs.cols(); ++i)\n        dst += rhs(i) * lhs.my_matrix().col(i);\n    }\n  };\n\n}\n}\n\nint main()\n{\n  int n = 10;\n  Eigen::SparseMatrix<double> S = Eigen::MatrixXd::Random(n,n).sparseView(0.5,1);\n  S = S.transpose()*S;\n\n  MatrixReplacement A;\n  A.attachMyMatrix(S);\n\n  Eigen::VectorXd b(n), x;\n  b.setRandom();\n\n  // Solve Ax = b using various iterative solver with matrix-free version:\n  {\n    Eigen::ConjugateGradient<MatrixReplacement, Eigen::Lower|Eigen::Upper, Eigen::IdentityPreconditioner> cg;\n    cg.compute(A);\n    x = cg.solve(b);\n    std::cout << \"CG:       #iterations: \" << cg.iterations() << \", estimated error: \" << cg.error() << std::endl;\n  }\n\n  {\n    Eigen::BiCGSTAB<MatrixReplacement, Eigen::IdentityPreconditioner> bicg;\n    bicg.compute(A);\n    x = bicg.solve(b);\n    std::cout << \"BiCGSTAB: #iterations: \" << bicg.iterations() << \", estimated error: \" << bicg.error() << std::endl;\n  }\n\n  {\n    Eigen::GMRES<MatrixReplacement, Eigen::IdentityPreconditioner> gmres;\n    gmres.compute(A);\n    x = gmres.solve(b);\n    std::cout << \"GMRES:    #iterations: \" << gmres.iterations() << \", estimated error: \" << gmres.error() << std::endl;\n  }\n\n  {\n    Eigen::DGMRES<MatrixReplacement, Eigen::IdentityPreconditioner> gmres;\n    gmres.compute(A);\n    x = gmres.solve(b);\n    std::cout << \"DGMRES:   #iterations: \" << gmres.iterations() << \", estimated error: \" << gmres.error() << std::endl;\n  }\n\n  {\n    Eigen::MINRES<MatrixReplacement, Eigen::Lower|Eigen::Upper, Eigen::IdentityPreconditioner> minres;\n    minres.compute(A);\n    x = minres.solve(b);\n    std::cout << \"MINRES:   #iterations: \" << minres.iterations() << \", estimated error: \" << minres.error() << std::endl;\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/nullary_indexing.cpp",
    "content": "#include <Eigen/Core>\n#include <iostream>\n\nusing namespace Eigen;\n\n// [functor]\ntemplate<class ArgType, class RowIndexType, class ColIndexType>\nclass indexing_functor {\n  const ArgType &m_arg;\n  const RowIndexType &m_rowIndices;\n  const ColIndexType &m_colIndices;\npublic:\n  typedef Matrix<typename ArgType::Scalar,\n                 RowIndexType::SizeAtCompileTime,\n                 ColIndexType::SizeAtCompileTime,\n                 ArgType::Flags&RowMajorBit?RowMajor:ColMajor,\n                 RowIndexType::MaxSizeAtCompileTime,\n                 ColIndexType::MaxSizeAtCompileTime> MatrixType;\n\n  indexing_functor(const ArgType& arg, const RowIndexType& row_indices, const ColIndexType& col_indices)\n    : m_arg(arg), m_rowIndices(row_indices), m_colIndices(col_indices)\n  {}\n\n  const typename ArgType::Scalar& operator() (Index row, Index col) const {\n    return m_arg(m_rowIndices[row], m_colIndices[col]);\n  }\n};\n// [functor]\n\n// [function]\ntemplate <class ArgType, class RowIndexType, class ColIndexType>\nCwiseNullaryOp<indexing_functor<ArgType,RowIndexType,ColIndexType>, typename indexing_functor<ArgType,RowIndexType,ColIndexType>::MatrixType>\nmat_indexing(const Eigen::MatrixBase<ArgType>& arg, const RowIndexType& row_indices, const ColIndexType& col_indices)\n{\n  typedef indexing_functor<ArgType,RowIndexType,ColIndexType> Func;\n  typedef typename Func::MatrixType MatrixType;\n  return MatrixType::NullaryExpr(row_indices.size(), col_indices.size(), Func(arg.derived(), row_indices, col_indices));\n}\n// [function]\n\n\nint main()\n{\n  std::cout << \"[main1]\\n\";\n  Eigen::MatrixXi A = Eigen::MatrixXi::Random(4,4);\n  Array3i ri(1,2,1);\n  ArrayXi ci(6); ci << 3,2,1,0,0,2;\n  Eigen::MatrixXi B = mat_indexing(A, ri, ci);\n  std::cout << \"A =\" << std::endl;\n  std::cout << A << std::endl << std::endl;\n  std::cout << \"A([\" << ri.transpose() << \"], [\" << ci.transpose() << \"]) =\" << std::endl;\n  std::cout << B << std::endl;\n  std::cout << \"[main1]\\n\";\n\n  std::cout << \"[main2]\\n\";\n  B =  mat_indexing(A, ri+1, ci);\n  std::cout << \"A(ri+1,ci) =\" << std::endl;\n  std::cout << B << std::endl << std::endl;\n#if __cplusplus >= 201103L\n  B =  mat_indexing(A, ArrayXi::LinSpaced(13,0,12).unaryExpr([](int x){return x%4;}), ArrayXi::LinSpaced(4,0,3));\n  std::cout << \"A(ArrayXi::LinSpaced(13,0,12).unaryExpr([](int x){return x%4;}), ArrayXi::LinSpaced(4,0,3)) =\" << std::endl;\n  std::cout << B << std::endl << std::endl;\n#endif\n  std::cout << \"[main2]\\n\";\n}\n\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/tut_arithmetic_add_sub.cpp",
    "content": "#include <iostream>\n#include <Eigen/Dense>\n\nusing namespace Eigen;\n\nint main()\n{\n  Matrix2d a;\n  a << 1, 2,\n       3, 4;\n  MatrixXd b(2,2);\n  b << 2, 3,\n       1, 4;\n  std::cout << \"a + b =\\n\" << a + b << std::endl;\n  std::cout << \"a - b =\\n\" << a - b << std::endl;\n  std::cout << \"Doing a += b;\" << std::endl;\n  a += b;\n  std::cout << \"Now a =\\n\" << a << std::endl;\n  Vector3d v(1,2,3);\n  Vector3d w(1,0,0);\n  std::cout << \"-v + w - v =\\n\" << -v + w - v << std::endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/tut_arithmetic_dot_cross.cpp",
    "content": "#include <iostream>\n#include <Eigen/Dense>\n\nusing namespace Eigen;\nusing namespace std;\nint main()\n{\n  Vector3d v(1,2,3);\n  Vector3d w(0,1,2);\n\n  cout << \"Dot product: \" << v.dot(w) << endl;\n  double dp = v.adjoint()*w; // automatic conversion of the inner product to a scalar\n  cout << \"Dot product via a matrix product: \" << dp << endl;\n  cout << \"Cross product:\\n\" << v.cross(w) << endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/tut_arithmetic_matrix_mul.cpp",
    "content": "#include <iostream>\n#include <Eigen/Dense>\n\nusing namespace Eigen;\nint main()\n{\n  Matrix2d mat;\n  mat << 1, 2,\n         3, 4;\n  Vector2d u(-1,1), v(2,0);\n  std::cout << \"Here is mat*mat:\\n\" << mat*mat << std::endl;\n  std::cout << \"Here is mat*u:\\n\" << mat*u << std::endl;\n  std::cout << \"Here is u^T*mat:\\n\" << u.transpose()*mat << std::endl;\n  std::cout << \"Here is u^T*v:\\n\" << u.transpose()*v << std::endl;\n  std::cout << \"Here is u*v^T:\\n\" << u*v.transpose() << std::endl;\n  std::cout << \"Let's multiply mat by itself\" << std::endl;\n  mat = mat*mat;\n  std::cout << \"Now mat is mat:\\n\" << mat << std::endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/tut_arithmetic_redux_basic.cpp",
    "content": "#include <iostream>\n#include <Eigen/Dense>\n\nusing namespace std;\nint main()\n{\n  Eigen::Matrix2d mat;\n  mat << 1, 2,\n         3, 4;\n  cout << \"Here is mat.sum():       \" << mat.sum()       << endl;\n  cout << \"Here is mat.prod():      \" << mat.prod()      << endl;\n  cout << \"Here is mat.mean():      \" << mat.mean()      << endl;\n  cout << \"Here is mat.minCoeff():  \" << mat.minCoeff()  << endl;\n  cout << \"Here is mat.maxCoeff():  \" << mat.maxCoeff()  << endl;\n  cout << \"Here is mat.trace():     \" << mat.trace()     << endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/tut_arithmetic_scalar_mul_div.cpp",
    "content": "#include <iostream>\n#include <Eigen/Dense>\n\nusing namespace Eigen;\n\nint main()\n{\n  Matrix2d a;\n  a << 1, 2,\n       3, 4;\n  Vector3d v(1,2,3);\n  std::cout << \"a * 2.5 =\\n\" << a * 2.5 << std::endl;\n  std::cout << \"0.1 * v =\\n\" << 0.1 * v << std::endl;\n  std::cout << \"Doing v *= 2;\" << std::endl;\n  v *= 2;\n  std::cout << \"Now v =\\n\" << v << std::endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/tut_matrix_coefficient_accessors.cpp",
    "content": "#include <iostream>\n#include <Eigen/Dense>\n\nusing namespace Eigen;\n\nint main()\n{\n  MatrixXd m(2,2);\n  m(0,0) = 3;\n  m(1,0) = 2.5;\n  m(0,1) = -1;\n  m(1,1) = m(1,0) + m(0,1);\n  std::cout << \"Here is the matrix m:\\n\" << m << std::endl;\n  VectorXd v(2);\n  v(0) = 4;\n  v(1) = v(0) - 1;\n  std::cout << \"Here is the vector v:\\n\" << v << std::endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/tut_matrix_resize.cpp",
    "content": "#include <iostream>\n#include <Eigen/Dense>\n\nusing namespace Eigen;\n\nint main()\n{\n  MatrixXd m(2,5);\n  m.resize(4,3);\n  std::cout << \"The matrix m is of size \"\n            << m.rows() << \"x\" << m.cols() << std::endl;\n  std::cout << \"It has \" << m.size() << \" coefficients\" << std::endl;\n  VectorXd v(2);\n  v.resize(5);\n  std::cout << \"The vector v is of size \" << v.size() << std::endl;\n  std::cout << \"As a matrix, v is of size \"\n            << v.rows() << \"x\" << v.cols() << std::endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/examples/tut_matrix_resize_fixed_size.cpp",
    "content": "#include <iostream>\n#include <Eigen/Dense>\n\nusing namespace Eigen;\n\nint main()\n{\n  Matrix4d m;\n  m.resize(4,4); // no operation\n  std::cout << \"The matrix m is of size \"\n            << m.rows() << \"x\" << m.cols() << std::endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/.krazy",
    "content": "EXCLUDE copyright\nEXCLUDE license\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/AngleAxis_mimic_euler.cpp",
    "content": "Matrix3f m;\nm = AngleAxisf(0.25*M_PI, Vector3f::UnitX())\n  * AngleAxisf(0.5*M_PI,  Vector3f::UnitY())\n  * AngleAxisf(0.33*M_PI, Vector3f::UnitZ());\ncout << m << endl << \"is unitary: \" << m.isUnitary() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Array_initializer_list_23_cxx11.cpp",
    "content": "ArrayXXi a {\n  {1, 2, 3},\n  {3, 4, 5}\n};\ncout << a << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Array_initializer_list_vector_cxx11.cpp",
    "content": "Array<int, Dynamic, 1> v {{1, 2, 3, 4, 5}};\ncout << v << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Array_variadic_ctor_cxx11.cpp",
    "content": "Array<int, 1, 6> a(1, 2, 3, 4, 5, 6);\nArray<int, 3, 1> b {1, 2, 3};\ncout << a << \"\\n\\n\" << b << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/BiCGSTAB_simple.cpp",
    "content": "  int n = 10000;\n  VectorXd x(n), b(n);\n  SparseMatrix<double> A(n,n);\n  /* ... fill A and b ... */ \n  BiCGSTAB<SparseMatrix<double> > solver;\n  solver.compute(A);\n  x = solver.solve(b);\n  std::cout << \"#iterations:     \" << solver.iterations() << std::endl;\n  std::cout << \"estimated error: \" << solver.error()      << std::endl;\n  /* ... update b ... */\n  x = solver.solve(b); // solve again\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/BiCGSTAB_step_by_step.cpp",
    "content": "  int n = 10000;\n  VectorXd x(n), b(n);\n  SparseMatrix<double> A(n,n);\n  /* ... fill A and b ... */ \n  BiCGSTAB<SparseMatrix<double> > solver(A);\n  // start from a random solution\n  x = VectorXd::Random(n);\n  solver.setMaxIterations(1);\n  int i = 0;\n  do {\n    x = solver.solveWithGuess(b,x);\n    std::cout << i << \" : \" << solver.error() << std::endl;\n    ++i;\n  } while (solver.info()!=Success && i<100);\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/CMakeLists.txt",
    "content": "file(GLOB snippets_SRCS \"*.cpp\")\n\nadd_custom_target(all_snippets)\n\nforeach(snippet_src ${snippets_SRCS})\n  get_filename_component(snippet ${snippet_src} NAME_WE)\n  set(compile_snippet_target compile_${snippet})\n  set(compile_snippet_src ${compile_snippet_target}.cpp)\n  if((NOT ${snippet_src} MATCHES \"cxx11\") OR EIGEN_COMPILER_SUPPORT_CPP11)\n    file(READ ${snippet_src} snippet_source_code)\n    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/compile_snippet.cpp.in\n                  ${CMAKE_CURRENT_BINARY_DIR}/${compile_snippet_src})\n    add_executable(${compile_snippet_target}\n                  ${CMAKE_CURRENT_BINARY_DIR}/${compile_snippet_src})\n    if(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO)\n      target_link_libraries(${compile_snippet_target} ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO})\n    endif()\n    if(${snippet_src} MATCHES \"cxx11\")\n      set_target_properties(${compile_snippet_target} PROPERTIES COMPILE_FLAGS \"-std=c++11\")\n    endif()\n    if(${snippet_src} MATCHES \"deprecated\")\n      set_target_properties(${compile_snippet_target} PROPERTIES COMPILE_FLAGS \"-DEIGEN_NO_DEPRECATED_WARNING\")\n    endif()\n    add_custom_command(\n      TARGET ${compile_snippet_target}\n      POST_BUILD\n      COMMAND ${compile_snippet_target}\n      ARGS >${CMAKE_CURRENT_BINARY_DIR}/${snippet}.out\n    )\n    add_dependencies(all_snippets ${compile_snippet_target})\n    set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${compile_snippet_src}\n                                PROPERTIES OBJECT_DEPENDS ${snippet_src})\n  else()\n    message(\"skip snippet ${snippet_src} because compiler does not support C++11\")\n  endif()\nendforeach()\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/ColPivHouseholderQR_solve.cpp",
    "content": "Matrix3f m = Matrix3f::Random();\nMatrix3f y = Matrix3f::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is the matrix y:\" << endl << y << endl;\nMatrix3f x;\nx = m.colPivHouseholderQr().solve(y);\nassert(y.isApprox(m*x));\ncout << \"Here is a solution x to the equation mx=y:\" << endl << x << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/ComplexEigenSolver_compute.cpp",
    "content": "MatrixXcf A = MatrixXcf::Random(4,4);\ncout << \"Here is a random 4x4 matrix, A:\" << endl << A << endl << endl;\n\nComplexEigenSolver<MatrixXcf> ces;\nces.compute(A);\ncout << \"The eigenvalues of A are:\" << endl << ces.eigenvalues() << endl;\ncout << \"The matrix of eigenvectors, V, is:\" << endl << ces.eigenvectors() << endl << endl;\n\ncomplex<float> lambda = ces.eigenvalues()[0];\ncout << \"Consider the first eigenvalue, lambda = \" << lambda << endl;\nVectorXcf v = ces.eigenvectors().col(0);\ncout << \"If v is the corresponding eigenvector, then lambda * v = \" << endl << lambda * v << endl;\ncout << \"... and A * v = \" << endl << A * v << endl << endl;\n\ncout << \"Finally, V * D * V^(-1) = \" << endl\n     << ces.eigenvectors() * ces.eigenvalues().asDiagonal() * ces.eigenvectors().inverse() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/ComplexEigenSolver_eigenvalues.cpp",
    "content": "MatrixXcf ones = MatrixXcf::Ones(3,3);\nComplexEigenSolver<MatrixXcf> ces(ones, /* computeEigenvectors = */ false);\ncout << \"The eigenvalues of the 3x3 matrix of ones are:\" \n     << endl << ces.eigenvalues() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/ComplexEigenSolver_eigenvectors.cpp",
    "content": "MatrixXcf ones = MatrixXcf::Ones(3,3);\nComplexEigenSolver<MatrixXcf> ces(ones);\ncout << \"The first eigenvector of the 3x3 matrix of ones is:\" \n     << endl << ces.eigenvectors().col(1) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/ComplexSchur_compute.cpp",
    "content": "MatrixXcf A = MatrixXcf::Random(4,4);\nComplexSchur<MatrixXcf> schur(4);\nschur.compute(A);\ncout << \"The matrix T in the decomposition of A is:\" << endl << schur.matrixT() << endl;\nschur.compute(A.inverse());\ncout << \"The matrix T in the decomposition of A^(-1) is:\" << endl << schur.matrixT() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/ComplexSchur_matrixT.cpp",
    "content": "MatrixXcf A = MatrixXcf::Random(4,4);\ncout << \"Here is a random 4x4 matrix, A:\" << endl << A << endl << endl;\nComplexSchur<MatrixXcf> schurOfA(A, false); // false means do not compute U\ncout << \"The triangular matrix T is:\" << endl << schurOfA.matrixT() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/ComplexSchur_matrixU.cpp",
    "content": "MatrixXcf A = MatrixXcf::Random(4,4);\ncout << \"Here is a random 4x4 matrix, A:\" << endl << A << endl << endl;\nComplexSchur<MatrixXcf> schurOfA(A);\ncout << \"The unitary matrix U is:\" << endl << schurOfA.matrixU() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_abs.cpp",
    "content": "Array3d v(1,-2,-3);\ncout << v.abs() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_abs2.cpp",
    "content": "Array3d v(1,-2,-3);\ncout << v.abs2() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_acos.cpp",
    "content": "Array3d v(0, sqrt(2.)/2, 1);\ncout << v.acos() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_arg.cpp",
    "content": "ArrayXcf v = ArrayXcf::Random(3);\ncout << v << endl << endl;\ncout << arg(v) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_array_power_array.cpp",
    "content": "Array<double,1,3> x(8,25,3),\n                  e(1./3.,0.5,2.);\ncout << \"[\" << x << \"]^[\" << e << \"] = \" << x.pow(e) << endl; // using ArrayBase::pow\ncout << \"[\" << x << \"]^[\" << e << \"] = \" << pow(x,e) << endl; // using Eigen::pow\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_asin.cpp",
    "content": "Array3d v(0, sqrt(2.)/2, 1);\ncout << v.asin() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_atan.cpp",
    "content": "ArrayXd v = ArrayXd::LinSpaced(5,0,1);\ncout << v.atan() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_boolean_and.cpp",
    "content": "Array3d v(-1,2,1), w(-3,2,3);\ncout << ((v<w) && (v<0)) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_boolean_not.cpp",
    "content": "Array3d v(1,2,3);\nv(1) *= 0.0/0.0;\nv(2) /= 0.0;\ncout << v << endl << endl;\ncout << !isfinite(v) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_boolean_or.cpp",
    "content": "Array3d v(-1,2,1), w(-3,2,3);\ncout << ((v<w) || (v<0)) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_boolean_xor.cpp",
    "content": "Array3d v(-1,2,1), w(-3,2,3);\ncout << ((v<w) ^ (v<0)) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_ceil.cpp",
    "content": "ArrayXd v = ArrayXd::LinSpaced(7,-2,2);\ncout << v << endl << endl;\ncout << ceil(v) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_cos.cpp",
    "content": "Array3d v(M_PI, M_PI/2, M_PI/3);\ncout << v.cos() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_cosh.cpp",
    "content": "ArrayXd v = ArrayXd::LinSpaced(5,0,1);\ncout << cosh(v) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_cube.cpp",
    "content": "Array3d v(2,3,4);\ncout << v.cube() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_equal_equal.cpp",
    "content": "Array3d v(1,2,3), w(3,2,1);\ncout << (v==w) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_exp.cpp",
    "content": "Array3d v(1,2,3);\ncout << v.exp() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_floor.cpp",
    "content": "ArrayXd v = ArrayXd::LinSpaced(7,-2,2);\ncout << v << endl << endl;\ncout << floor(v) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_greater.cpp",
    "content": "Array3d v(1,2,3), w(3,2,1);\ncout << (v>w) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_greater_equal.cpp",
    "content": "Array3d v(1,2,3), w(3,2,1);\ncout << (v>=w) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_inverse.cpp",
    "content": "Array3d v(2,3,4);\ncout << v.inverse() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_isFinite.cpp",
    "content": "Array3d v(1,2,3);\nv(1) *= 0.0/0.0;\nv(2) /= 0.0;\ncout << v << endl << endl;\ncout << isfinite(v) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_isInf.cpp",
    "content": "Array3d v(1,2,3);\nv(1) *= 0.0/0.0;\nv(2) /= 0.0;\ncout << v << endl << endl;\ncout << isinf(v) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_isNaN.cpp",
    "content": "Array3d v(1,2,3);\nv(1) *= 0.0/0.0;\nv(2) /= 0.0;\ncout << v << endl << endl;\ncout << isnan(v) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_less.cpp",
    "content": "Array3d v(1,2,3), w(3,2,1);\ncout << (v<w) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_less_equal.cpp",
    "content": "Array3d v(1,2,3), w(3,2,1);\ncout << (v<=w) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_log.cpp",
    "content": "Array3d v(1,2,3);\ncout << v.log() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_log10.cpp",
    "content": "Array4d v(-1,0,1,2);\ncout << log10(v) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_max.cpp",
    "content": "Array3d v(2,3,4), w(4,2,3);\ncout << v.max(w) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_min.cpp",
    "content": "Array3d v(2,3,4), w(4,2,3);\ncout << v.min(w) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_minus.cpp",
    "content": "Array3d v(1,2,3);\ncout << v-5 << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_minus_equal.cpp",
    "content": "Array3d v(1,2,3);\nv -= 5;\ncout << v << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_not_equal.cpp",
    "content": "Array3d v(1,2,3), w(3,2,1);\ncout << (v!=w) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_plus.cpp",
    "content": "Array3d v(1,2,3);\ncout << v+5 << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_plus_equal.cpp",
    "content": "Array3d v(1,2,3);\nv += 5;\ncout << v << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_pow.cpp",
    "content": "Array3d v(8,27,64);\ncout << v.pow(0.333333) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_product.cpp",
    "content": "Array33i a = Array33i::Random(), b = Array33i::Random();\nArray33i c = a * b;\ncout << \"a:\\n\" << a << \"\\nb:\\n\" << b << \"\\nc:\\n\" << c << endl;\n\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_quotient.cpp",
    "content": "Array3d v(2,3,4), w(4,2,3);\ncout << v/w << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_rint.cpp",
    "content": "ArrayXd v = ArrayXd::LinSpaced(7,-2,2);\ncout << v << endl << endl;\ncout << rint(v) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_round.cpp",
    "content": "ArrayXd v = ArrayXd::LinSpaced(7,-2,2);\ncout << v << endl << endl;\ncout << round(v) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_scalar_power_array.cpp",
    "content": "Array<double,1,3> e(2,-3,1./3.);\ncout << \"10^[\" << e << \"] = \" << pow(10,e) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_sign.cpp",
    "content": "Array3d v(-3,5,0);\ncout << v.sign() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_sin.cpp",
    "content": "Array3d v(M_PI, M_PI/2, M_PI/3);\ncout << v.sin() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_sinh.cpp",
    "content": "ArrayXd v = ArrayXd::LinSpaced(5,0,1);\ncout << sinh(v) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_slash_equal.cpp",
    "content": "Array3d v(3,2,4), w(5,4,2);\nv /= w;\ncout << v << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_sqrt.cpp",
    "content": "Array3d v(1,2,4);\ncout << v.sqrt() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_square.cpp",
    "content": "Array3d v(2,3,4);\ncout << v.square() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_tan.cpp",
    "content": "Array3d v(M_PI, M_PI/2, M_PI/3);\ncout << v.tan() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_tanh.cpp",
    "content": "ArrayXd v = ArrayXd::LinSpaced(5,0,1);\ncout << tanh(v) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Cwise_times_equal.cpp",
    "content": "Array3d v(1,2,3), w(2,3,0);\nv *= w;\ncout << v << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/DenseBase_LinSpaced.cpp",
    "content": "cout << VectorXi::LinSpaced(4,7,10).transpose() << endl;\ncout << VectorXd::LinSpaced(5,0.0,1.0).transpose() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/DenseBase_LinSpacedInt.cpp",
    "content": "cout << \"Even spacing inputs:\" << endl;\ncout << VectorXi::LinSpaced(8,1,4).transpose() << endl;\ncout << VectorXi::LinSpaced(8,1,8).transpose() << endl;\ncout << VectorXi::LinSpaced(8,1,15).transpose() << endl;\ncout << \"Uneven spacing inputs:\" << endl;\ncout << VectorXi::LinSpaced(8,1,7).transpose() << endl;\ncout << VectorXi::LinSpaced(8,1,9).transpose() << endl;\ncout << VectorXi::LinSpaced(8,1,16).transpose() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/DenseBase_LinSpaced_seq_deprecated.cpp",
    "content": "cout << VectorXi::LinSpaced(Sequential,4,7,10).transpose() << endl;\ncout << VectorXd::LinSpaced(Sequential,5,0.0,1.0).transpose() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/DenseBase_setLinSpaced.cpp",
    "content": "VectorXf v;\nv.setLinSpaced(5,0.5f,1.5f);\ncout << v << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/DirectionWise_hnormalized.cpp",
    "content": "Matrix4Xd M = Matrix4Xd::Random(4,5);\nProjective3d P(Matrix4d::Random());\ncout << \"The matrix M is:\" << endl << M << endl << endl;\ncout << \"M.colwise().hnormalized():\" << endl << M.colwise().hnormalized() << endl << endl;\ncout << \"P*M:\" << endl << P*M << endl << endl;\ncout << \"(P*M).colwise().hnormalized():\" << endl << (P*M).colwise().hnormalized() << endl << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/DirectionWise_replicate.cpp",
    "content": "MatrixXi m = MatrixXi::Random(2,3);\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"m.colwise().replicate<3>() = ...\" << endl;\ncout << m.colwise().replicate<3>() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/DirectionWise_replicate_int.cpp",
    "content": "Vector3i v = Vector3i::Random();\ncout << \"Here is the vector v:\" << endl << v << endl;\ncout << \"v.rowwise().replicate(5) = ...\" << endl;\ncout << v.rowwise().replicate(5) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/EigenSolver_EigenSolver_MatrixType.cpp",
    "content": "MatrixXd A = MatrixXd::Random(6,6);\ncout << \"Here is a random 6x6 matrix, A:\" << endl << A << endl << endl;\n\nEigenSolver<MatrixXd> es(A);\ncout << \"The eigenvalues of A are:\" << endl << es.eigenvalues() << endl;\ncout << \"The matrix of eigenvectors, V, is:\" << endl << es.eigenvectors() << endl << endl;\n\ncomplex<double> lambda = es.eigenvalues()[0];\ncout << \"Consider the first eigenvalue, lambda = \" << lambda << endl;\nVectorXcd v = es.eigenvectors().col(0);\ncout << \"If v is the corresponding eigenvector, then lambda * v = \" << endl << lambda * v << endl;\ncout << \"... and A * v = \" << endl << A.cast<complex<double> >() * v << endl << endl;\n\nMatrixXcd D = es.eigenvalues().asDiagonal();\nMatrixXcd V = es.eigenvectors();\ncout << \"Finally, V * D * V^(-1) = \" << endl << V * D * V.inverse() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/EigenSolver_compute.cpp",
    "content": "EigenSolver<MatrixXf> es;\nMatrixXf A = MatrixXf::Random(4,4);\nes.compute(A, /* computeEigenvectors = */ false);\ncout << \"The eigenvalues of A are: \" << es.eigenvalues().transpose() << endl;\nes.compute(A + MatrixXf::Identity(4,4), false); // re-use es to compute eigenvalues of A+I\ncout << \"The eigenvalues of A+I are: \" << es.eigenvalues().transpose() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/EigenSolver_eigenvalues.cpp",
    "content": "MatrixXd ones = MatrixXd::Ones(3,3);\nEigenSolver<MatrixXd> es(ones, false);\ncout << \"The eigenvalues of the 3x3 matrix of ones are:\" \n     << endl << es.eigenvalues() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/EigenSolver_eigenvectors.cpp",
    "content": "MatrixXd ones = MatrixXd::Ones(3,3);\nEigenSolver<MatrixXd> es(ones);\ncout << \"The first eigenvector of the 3x3 matrix of ones is:\"\n     << endl << es.eigenvectors().col(0) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/EigenSolver_pseudoEigenvectors.cpp",
    "content": "MatrixXd A = MatrixXd::Random(6,6);\ncout << \"Here is a random 6x6 matrix, A:\" << endl << A << endl << endl;\n\nEigenSolver<MatrixXd> es(A);\nMatrixXd D = es.pseudoEigenvalueMatrix();\nMatrixXd V = es.pseudoEigenvectors();\ncout << \"The pseudo-eigenvalue matrix D is:\" << endl << D << endl;\ncout << \"The pseudo-eigenvector matrix V is:\" << endl << V << endl;\ncout << \"Finally, V * D * V^(-1) = \" << endl << V * D * V.inverse() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/FullPivHouseholderQR_solve.cpp",
    "content": "Matrix3f m = Matrix3f::Random();\nMatrix3f y = Matrix3f::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is the matrix y:\" << endl << y << endl;\nMatrix3f x;\nx = m.fullPivHouseholderQr().solve(y);\nassert(y.isApprox(m*x));\ncout << \"Here is a solution x to the equation mx=y:\" << endl << x << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/FullPivLU_image.cpp",
    "content": "Matrix3d m;\nm << 1,1,0,\n     1,3,2,\n     0,1,1;\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Notice that the middle column is the sum of the two others, so the \"\n     << \"columns are linearly dependent.\" << endl;\ncout << \"Here is a matrix whose columns have the same span but are linearly independent:\"\n     << endl << m.fullPivLu().image(m) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/FullPivLU_kernel.cpp",
    "content": "MatrixXf m = MatrixXf::Random(3,5);\ncout << \"Here is the matrix m:\" << endl << m << endl;\nMatrixXf ker = m.fullPivLu().kernel();\ncout << \"Here is a matrix whose columns form a basis of the kernel of m:\"\n     << endl << ker << endl;\ncout << \"By definition of the kernel, m*ker is zero:\"\n     << endl << m*ker << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/FullPivLU_solve.cpp",
    "content": "Matrix<float,2,3> m = Matrix<float,2,3>::Random();\nMatrix2f y = Matrix2f::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is the matrix y:\" << endl << y << endl;\nMatrix<float,3,2> x = m.fullPivLu().solve(y);\nif((m*x).isApprox(y))\n{\n  cout << \"Here is a solution x to the equation mx=y:\" << endl << x << endl;\n}\nelse\n  cout << \"The equation mx=y does not have any solution.\" << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/GeneralizedEigenSolver.cpp",
    "content": "GeneralizedEigenSolver<MatrixXf> ges;\nMatrixXf A = MatrixXf::Random(4,4);\nMatrixXf B = MatrixXf::Random(4,4);\nges.compute(A, B);\ncout << \"The (complex) numerators of the generalzied eigenvalues are: \" << ges.alphas().transpose() << endl;\ncout << \"The (real) denominatore of the generalzied eigenvalues are: \" << ges.betas().transpose() << endl;\ncout << \"The (complex) generalzied eigenvalues are (alphas./beta): \" << ges.eigenvalues().transpose() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/HessenbergDecomposition_compute.cpp",
    "content": "MatrixXcf A = MatrixXcf::Random(4,4);\nHessenbergDecomposition<MatrixXcf> hd(4);\nhd.compute(A);\ncout << \"The matrix H in the decomposition of A is:\" << endl << hd.matrixH() << endl;\nhd.compute(2*A); // re-use hd to compute and store decomposition of 2A\ncout << \"The matrix H in the decomposition of 2A is:\" << endl << hd.matrixH() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/HessenbergDecomposition_matrixH.cpp",
    "content": "Matrix4f A = MatrixXf::Random(4,4);\ncout << \"Here is a random 4x4 matrix:\" << endl << A << endl;\nHessenbergDecomposition<MatrixXf> hessOfA(A);\nMatrixXf H = hessOfA.matrixH();\ncout << \"The Hessenberg matrix H is:\" << endl << H << endl;\nMatrixXf Q = hessOfA.matrixQ();\ncout << \"The orthogonal matrix Q is:\" << endl << Q << endl;\ncout << \"Q H Q^T is:\" << endl << Q * H * Q.transpose() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/HessenbergDecomposition_packedMatrix.cpp",
    "content": "Matrix4d A = Matrix4d::Random(4,4);\ncout << \"Here is a random 4x4 matrix:\" << endl << A << endl;\nHessenbergDecomposition<Matrix4d> hessOfA(A);\nMatrix4d pm = hessOfA.packedMatrix();\ncout << \"The packed matrix M is:\" << endl << pm << endl;\ncout << \"The upper Hessenberg part corresponds to the matrix H, which is:\" \n     << endl << hessOfA.matrixH() << endl;\nVector3d hc = hessOfA.householderCoefficients();\ncout << \"The vector of Householder coefficients is:\" << endl << hc << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/HouseholderQR_householderQ.cpp",
    "content": "MatrixXf A(MatrixXf::Random(5,3)), thinQ(MatrixXf::Identity(5,3)), Q;\nA.setRandom();\nHouseholderQR<MatrixXf> qr(A);\nQ = qr.householderQ();\nthinQ = qr.householderQ() * thinQ;\nstd::cout << \"The complete unitary matrix Q is:\\n\" << Q << \"\\n\\n\";\nstd::cout << \"The thin matrix Q is:\\n\" << thinQ << \"\\n\\n\";\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/HouseholderQR_solve.cpp",
    "content": "typedef Matrix<float,3,3> Matrix3x3;\nMatrix3x3 m = Matrix3x3::Random();\nMatrix3f y = Matrix3f::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is the matrix y:\" << endl << y << endl;\nMatrix3f x;\nx = m.householderQr().solve(y);\nassert(y.isApprox(m*x));\ncout << \"Here is a solution x to the equation mx=y:\" << endl << x << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/HouseholderSequence_HouseholderSequence.cpp",
    "content": "Matrix3d v = Matrix3d::Random();\ncout << \"The matrix v is:\" << endl;\ncout << v << endl;\n\nVector3d v0(1, v(1,0), v(2,0));\ncout << \"The first Householder vector is: v_0 = \" << v0.transpose() << endl;\nVector3d v1(0, 1, v(2,1));\ncout << \"The second Householder vector is: v_1 = \" << v1.transpose()  << endl;\nVector3d v2(0, 0, 1);\ncout << \"The third Householder vector is: v_2 = \" << v2.transpose() << endl;\n\nVector3d h = Vector3d::Random();\ncout << \"The Householder coefficients are: h = \" << h.transpose() << endl;\n\nMatrix3d H0 = Matrix3d::Identity() - h(0) * v0 * v0.adjoint();\ncout << \"The first Householder reflection is represented by H_0 = \" << endl;\ncout << H0 << endl;\nMatrix3d H1 = Matrix3d::Identity() - h(1) * v1 * v1.adjoint();\ncout << \"The second Householder reflection is represented by H_1 = \" << endl;\ncout << H1 << endl;\nMatrix3d H2 = Matrix3d::Identity() - h(2) * v2 * v2.adjoint();\ncout << \"The third Householder reflection is represented by H_2 = \" << endl;\ncout << H2 << endl;\ncout << \"Their product is H_0 H_1 H_2 = \" << endl;\ncout << H0 * H1 * H2 << endl;\n\nHouseholderSequence<Matrix3d, Vector3d> hhSeq(v, h);\nMatrix3d hhSeqAsMatrix(hhSeq);\ncout << \"If we construct a HouseholderSequence from v and h\" << endl;\ncout << \"and convert it to a matrix, we get:\" << endl;\ncout << hhSeqAsMatrix << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/IOFormat.cpp",
    "content": "std::string sep = \"\\n----------------------------------------\\n\";\nMatrix3d m1;\nm1 << 1.111111, 2, 3.33333, 4, 5, 6, 7, 8.888888, 9;\n\nIOFormat CommaInitFmt(StreamPrecision, DontAlignCols, \", \", \", \", \"\", \"\", \" << \", \";\");\nIOFormat CleanFmt(4, 0, \", \", \"\\n\", \"[\", \"]\");\nIOFormat OctaveFmt(StreamPrecision, 0, \", \", \";\\n\", \"\", \"\", \"[\", \"]\");\nIOFormat HeavyFmt(FullPrecision, 0, \", \", \";\\n\", \"[\", \"]\", \"[\", \"]\");\n\nstd::cout << m1 << sep;\nstd::cout << m1.format(CommaInitFmt) << sep;\nstd::cout << m1.format(CleanFmt) << sep;\nstd::cout << m1.format(OctaveFmt) << sep;\nstd::cout << m1.format(HeavyFmt) << sep;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/JacobiSVD_basic.cpp",
    "content": "MatrixXf m = MatrixXf::Random(3,2);\ncout << \"Here is the matrix m:\" << endl << m << endl;\nJacobiSVD<MatrixXf> svd(m, ComputeThinU | ComputeThinV);\ncout << \"Its singular values are:\" << endl << svd.singularValues() << endl;\ncout << \"Its left singular vectors are the columns of the thin U matrix:\" << endl << svd.matrixU() << endl;\ncout << \"Its right singular vectors are the columns of the thin V matrix:\" << endl << svd.matrixV() << endl;\nVector3f rhs(1, 0, 0);\ncout << \"Now consider this rhs vector:\" << endl << rhs << endl;\ncout << \"A least-squares solution of m*x = rhs is:\" << endl << svd.solve(rhs) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Jacobi_makeGivens.cpp",
    "content": "Vector2f v = Vector2f::Random();\nJacobiRotation<float> G;\nG.makeGivens(v.x(), v.y());\ncout << \"Here is the vector v:\" << endl << v << endl;\nv.applyOnTheLeft(0, 1, G.adjoint());\ncout << \"Here is the vector J' * v:\" << endl << v << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Jacobi_makeJacobi.cpp",
    "content": "Matrix2f m = Matrix2f::Random();\nm = (m + m.adjoint()).eval();\nJacobiRotation<float> J;\nJ.makeJacobi(m, 0, 1);\ncout << \"Here is the matrix m:\" << endl << m << endl;\nm.applyOnTheLeft(0, 1, J.adjoint());\nm.applyOnTheRight(0, 1, J);\ncout << \"Here is the matrix J' * m * J:\" << endl << m << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/LLT_example.cpp",
    "content": "MatrixXd A(3,3);\nA << 4,-1,2, -1,6,0, 2,0,5;\ncout << \"The matrix A is\" << endl << A << endl;\n\nLLT<MatrixXd> lltOfA(A); // compute the Cholesky decomposition of A\nMatrixXd L = lltOfA.matrixL(); // retrieve factor L  in the decomposition\n// The previous two lines can also be written as \"L = A.llt().matrixL()\"\n\ncout << \"The Cholesky factor L is\" << endl << L << endl;\ncout << \"To check this, let us compute L * L.transpose()\" << endl;\ncout << L * L.transpose() << endl;\ncout << \"This should equal the matrix A\" << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/LLT_solve.cpp",
    "content": "typedef Matrix<float,Dynamic,2> DataMatrix;\n// let's generate some samples on the 3D plane of equation z = 2x+3y (with some noise)\nDataMatrix samples = DataMatrix::Random(12,2);\nVectorXf elevations = 2*samples.col(0) + 3*samples.col(1) + VectorXf::Random(12)*0.1;\n// and let's solve samples * [x y]^T = elevations in least square sense:\nMatrix<float,2,1> xy\n = (samples.adjoint() * samples).llt().solve((samples.adjoint()*elevations));\ncout << xy << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/LeastSquaresNormalEquations.cpp",
    "content": "MatrixXf A = MatrixXf::Random(3, 2);\nVectorXf b = VectorXf::Random(3);\ncout << \"The solution using normal equations is:\\n\"\n     << (A.transpose() * A).ldlt().solve(A.transpose() * b) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/LeastSquaresQR.cpp",
    "content": "MatrixXf A = MatrixXf::Random(3, 2);\nVectorXf b = VectorXf::Random(3);\ncout << \"The solution using the QR decomposition is:\\n\"\n     << A.colPivHouseholderQr().solve(b) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Map_general_stride.cpp",
    "content": "int array[24];\nfor(int i = 0; i < 24; ++i) array[i] = i;\ncout << Map<MatrixXi, 0, Stride<Dynamic,2> >\n         (array, 3, 3, Stride<Dynamic,2>(8, 2))\n     << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Map_inner_stride.cpp",
    "content": "int array[12];\nfor(int i = 0; i < 12; ++i) array[i] = i;\ncout << Map<VectorXi, 0, InnerStride<2> >\n         (array, 6) // the inner stride has already been passed as template parameter\n     << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Map_outer_stride.cpp",
    "content": "int array[12];\nfor(int i = 0; i < 12; ++i) array[i] = i;\ncout << Map<MatrixXi, 0, OuterStride<> >(array, 3, 3, OuterStride<>(4)) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Map_placement_new.cpp",
    "content": "int data[] = {1,2,3,4,5,6,7,8,9};\nMap<RowVectorXi> v(data,4);\ncout << \"The mapped vector v is: \" << v << \"\\n\";\nnew (&v) Map<RowVectorXi>(data+4,5);\ncout << \"Now v is: \" << v << \"\\n\";\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Map_simple.cpp",
    "content": "int array[9];\nfor(int i = 0; i < 9; ++i) array[i] = i;\ncout << Map<Matrix3i>(array) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_adjoint.cpp",
    "content": "Matrix2cf m = Matrix2cf::Random();\ncout << \"Here is the 2x2 complex matrix m:\" << endl << m << endl;\ncout << \"Here is the adjoint of m:\" << endl << m.adjoint() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_all.cpp",
    "content": "Vector3f boxMin(Vector3f::Zero()), boxMax(Vector3f::Ones());\nVector3f p0 = Vector3f::Random(), p1 = Vector3f::Random().cwiseAbs();\n// let's check if p0 and p1 are inside the axis aligned box defined by the corners boxMin,boxMax:\ncout << \"Is (\" << p0.transpose() << \") inside the box: \"\n     << ((boxMin.array()<p0.array()).all() && (boxMax.array()>p0.array()).all()) << endl;\ncout << \"Is (\" << p1.transpose() << \") inside the box: \"\n     << ((boxMin.array()<p1.array()).all() && (boxMax.array()>p1.array()).all()) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_applyOnTheLeft.cpp",
    "content": "Matrix3f A = Matrix3f::Random(3,3), B;\nB << 0,1,0,  \n     0,0,1,  \n     1,0,0;\ncout << \"At start, A = \" << endl << A << endl;\nA.applyOnTheLeft(B); \ncout << \"After applyOnTheLeft, A = \" << endl << A << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_applyOnTheRight.cpp",
    "content": "Matrix3f A = Matrix3f::Random(3,3), B;\nB << 0,1,0,  \n     0,0,1,  \n     1,0,0;\ncout << \"At start, A = \" << endl << A << endl;\nA *= B;\ncout << \"After A *= B, A = \" << endl << A << endl;\nA.applyOnTheRight(B);  // equivalent to A *= B\ncout << \"After applyOnTheRight, A = \" << endl << A << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_array.cpp",
    "content": "Vector3d v(1,2,3);\nv.array() += 3;\nv.array() -= 2;\ncout << v << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_array_const.cpp",
    "content": "Vector3d v(-1,2,-3);\ncout << \"the absolute values:\" << endl << v.array().abs() << endl;\ncout << \"the absolute values plus one:\" << endl << v.array().abs()+1 << endl;\ncout << \"sum of the squares: \" << v.array().square().sum() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_asDiagonal.cpp",
    "content": "cout << Matrix3i(Vector3i(2,5,6).asDiagonal()) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_block_int_int.cpp",
    "content": "Matrix4i m = Matrix4i::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is m.block<2,2>(1,1):\" << endl << m.block<2,2>(1,1) << endl;\nm.block<2,2>(1,1).setZero();\ncout << \"Now the matrix m is:\" << endl << m << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_block_int_int_int_int.cpp",
    "content": "Matrix4i m = Matrix4i::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is m.block(1, 1, 2, 2):\" << endl << m.block(1, 1, 2, 2) << endl;\nm.block(1, 1, 2, 2).setZero();\ncout << \"Now the matrix m is:\" << endl << m << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_bottomLeftCorner_int_int.cpp",
    "content": "Matrix4i m = Matrix4i::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is m.bottomLeftCorner(2, 2):\" << endl;\ncout << m.bottomLeftCorner(2, 2) << endl;\nm.bottomLeftCorner(2, 2).setZero();\ncout << \"Now the matrix m is:\" << endl << m << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_bottomRightCorner_int_int.cpp",
    "content": "Matrix4i m = Matrix4i::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is m.bottomRightCorner(2, 2):\" << endl;\ncout << m.bottomRightCorner(2, 2) << endl;\nm.bottomRightCorner(2, 2).setZero();\ncout << \"Now the matrix m is:\" << endl << m << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_bottomRows_int.cpp",
    "content": "Array44i a = Array44i::Random();\ncout << \"Here is the array a:\" << endl << a << endl;\ncout << \"Here is a.bottomRows(2):\" << endl;\ncout << a.bottomRows(2) << endl;\na.bottomRows(2).setZero();\ncout << \"Now the array a is:\" << endl << a << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_cast.cpp",
    "content": "Matrix2d md = Matrix2d::Identity() * 0.45;\nMatrix2f mf = Matrix2f::Identity();\ncout << md + mf.cast<double>() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_col.cpp",
    "content": "Matrix3d m = Matrix3d::Identity();\nm.col(1) = Vector3d(4,5,6);\ncout << m << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_colwise.cpp",
    "content": "Matrix3d m = Matrix3d::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is the sum of each column:\" << endl << m.colwise().sum() << endl;\ncout << \"Here is the maximum absolute value of each column:\"\n     << endl << m.cwiseAbs().colwise().maxCoeff() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_colwise_iterator_cxx11.cpp",
    "content": "Matrix3i m = Matrix3i::Random();\ncout << \"Here is the initial matrix m:\" << endl << m << endl;\nint i = -1;\nfor(auto c: m.colwise()) {\n  c *= i;\n  ++i;\n}\ncout << \"Here is the matrix m after the for-range-loop:\" << endl << m << endl;\nauto cols = m.colwise();\nauto it = std::find_if(cols.cbegin(), cols.cend(),\n                       [](Matrix3i::ConstColXpr x) { return x.squaredNorm() == 0; });\ncout << \"The first empty column is: \" << distance(cols.cbegin(),it) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_computeInverseAndDetWithCheck.cpp",
    "content": "Matrix3d m = Matrix3d::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\nMatrix3d inverse;\nbool invertible;\ndouble determinant;\nm.computeInverseAndDetWithCheck(inverse,determinant,invertible);\ncout << \"Its determinant is \" << determinant << endl;\nif(invertible) {\n  cout << \"It is invertible, and its inverse is:\" << endl << inverse << endl;\n}\nelse {\n  cout << \"It is not invertible.\" << endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_computeInverseWithCheck.cpp",
    "content": "Matrix3d m = Matrix3d::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\nMatrix3d inverse;\nbool invertible;\nm.computeInverseWithCheck(inverse,invertible);\nif(invertible) {\n  cout << \"It is invertible, and its inverse is:\" << endl << inverse << endl;\n}\nelse {\n  cout << \"It is not invertible.\" << endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_cwiseAbs.cpp",
    "content": "MatrixXd m(2,3);\nm << 2, -4, 6,   \n     -5, 1, 0;\ncout << m.cwiseAbs() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_cwiseAbs2.cpp",
    "content": "MatrixXd m(2,3);\nm << 2, -4, 6,   \n     -5, 1, 0;\ncout << m.cwiseAbs2() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_cwiseEqual.cpp",
    "content": "MatrixXi m(2,2);\nm << 1, 0,\n     1, 1;\ncout << \"Comparing m with identity matrix:\" << endl;\ncout << m.cwiseEqual(MatrixXi::Identity(2,2)) << endl;\nIndex count = m.cwiseEqual(MatrixXi::Identity(2,2)).count();\ncout << \"Number of coefficients that are equal: \" << count << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_cwiseInverse.cpp",
    "content": "MatrixXd m(2,3);\nm << 2, 0.5, 1,   \n     3, 0.25, 1;\ncout << m.cwiseInverse() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_cwiseMax.cpp",
    "content": "Vector3d v(2,3,4), w(4,2,3);\ncout << v.cwiseMax(w) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_cwiseMin.cpp",
    "content": "Vector3d v(2,3,4), w(4,2,3);\ncout << v.cwiseMin(w) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_cwiseNotEqual.cpp",
    "content": "MatrixXi m(2,2);\nm << 1, 0,\n     1, 1;\ncout << \"Comparing m with identity matrix:\" << endl;\ncout << m.cwiseNotEqual(MatrixXi::Identity(2,2)) << endl;\nIndex count = m.cwiseNotEqual(MatrixXi::Identity(2,2)).count();\ncout << \"Number of coefficients that are not equal: \" << count << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_cwiseProduct.cpp",
    "content": "Matrix3i a = Matrix3i::Random(), b = Matrix3i::Random();\nMatrix3i c = a.cwiseProduct(b);\ncout << \"a:\\n\" << a << \"\\nb:\\n\" << b << \"\\nc:\\n\" << c << endl;\n\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_cwiseQuotient.cpp",
    "content": "Vector3d v(2,3,4), w(4,2,3);\ncout << v.cwiseQuotient(w) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_cwiseSign.cpp",
    "content": "MatrixXd m(2,3);\nm <<  2, -4, 6,\n     -5,  1, 0;\ncout << m.cwiseSign() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_cwiseSqrt.cpp",
    "content": "Vector3d v(1,2,4);\ncout << v.cwiseSqrt() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_diagonal.cpp",
    "content": "Matrix3i m = Matrix3i::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here are the coefficients on the main diagonal of m:\" << endl\n     << m.diagonal() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_diagonal_int.cpp",
    "content": "Matrix4i m = Matrix4i::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here are the coefficients on the 1st super-diagonal and 2nd sub-diagonal of m:\" << endl\n     << m.diagonal(1).transpose() << endl\n     << m.diagonal(-2).transpose() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_diagonal_template_int.cpp",
    "content": "Matrix4i m = Matrix4i::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here are the coefficients on the 1st super-diagonal and 2nd sub-diagonal of m:\" << endl\n     << m.diagonal<1>().transpose() << endl\n     << m.diagonal<-2>().transpose() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_eigenvalues.cpp",
    "content": "MatrixXd ones = MatrixXd::Ones(3,3);\nVectorXcd eivals = ones.eigenvalues();\ncout << \"The eigenvalues of the 3x3 matrix of ones are:\" << endl << eivals << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_end_int.cpp",
    "content": "RowVector4i v = RowVector4i::Random();\ncout << \"Here is the vector v:\" << endl << v << endl;\ncout << \"Here is v.tail(2):\" << endl << v.tail(2) << endl;\nv.tail(2).setZero();\ncout << \"Now the vector v is:\" << endl << v << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_eval.cpp",
    "content": "Matrix2f M = Matrix2f::Random();\nMatrix2f m;\nm = M;\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Now we want to copy a column into a row.\" << endl;\ncout << \"If we do m.col(1) = m.row(0), then m becomes:\" << endl;\nm.col(1) = m.row(0);\ncout << m << endl << \"which is wrong!\" << endl;\ncout << \"Now let us instead do m.col(1) = m.row(0).eval(). Then m becomes\" << endl;\nm = M;\nm.col(1) = m.row(0).eval();\ncout << m << endl << \"which is right.\" << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_fixedBlock_int_int.cpp",
    "content": "Matrix4d m = Vector4d(1,2,3,4).asDiagonal();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is m.fixed<2, 2>(2, 2):\" << endl << m.block<2, 2>(2, 2) << endl;\nm.block<2, 2>(2, 0) = m.block<2, 2>(2, 2);\ncout << \"Now the matrix m is:\" << endl << m << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_hnormalized.cpp",
    "content": "Vector4d v = Vector4d::Random();\nProjective3d P(Matrix4d::Random());\ncout << \"v                   = \" << v.transpose() << \"]^T\" << endl;\ncout << \"v.hnormalized()     = \" << v.hnormalized().transpose() << \"]^T\" << endl;\ncout << \"P*v                 = \" << (P*v).transpose() << \"]^T\" << endl;\ncout << \"(P*v).hnormalized() = \" << (P*v).hnormalized().transpose() << \"]^T\" << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_homogeneous.cpp",
    "content": "Vector3d v = Vector3d::Random(), w;\nProjective3d P(Matrix4d::Random());\ncout << \"v                                   = [\" << v.transpose() << \"]^T\" << endl;\ncout << \"h.homogeneous()                     = [\" << v.homogeneous().transpose() << \"]^T\" << endl;\ncout << \"(P * v.homogeneous())               = [\" << (P * v.homogeneous()).transpose() << \"]^T\" << endl;\ncout << \"(P * v.homogeneous()).hnormalized() = [\" << (P * v.homogeneous()).eval().hnormalized().transpose() << \"]^T\" << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_identity.cpp",
    "content": "cout << Matrix<double, 3, 4>::Identity() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_identity_int_int.cpp",
    "content": "cout << MatrixXd::Identity(4, 3) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_inverse.cpp",
    "content": "Matrix3d m = Matrix3d::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Its inverse is:\" << endl << m.inverse() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_isDiagonal.cpp",
    "content": "Matrix3d m = 10000 * Matrix3d::Identity();\nm(0,2) = 1;\ncout << \"Here's the matrix m:\" << endl << m << endl;\ncout << \"m.isDiagonal() returns: \" << m.isDiagonal() << endl;\ncout << \"m.isDiagonal(1e-3) returns: \" << m.isDiagonal(1e-3) << endl;\n\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_isIdentity.cpp",
    "content": "Matrix3d m = Matrix3d::Identity();\nm(0,2) = 1e-4;\ncout << \"Here's the matrix m:\" << endl << m << endl;\ncout << \"m.isIdentity() returns: \" << m.isIdentity() << endl;\ncout << \"m.isIdentity(1e-3) returns: \" << m.isIdentity(1e-3) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_isOnes.cpp",
    "content": "Matrix3d m = Matrix3d::Ones();\nm(0,2) += 1e-4;\ncout << \"Here's the matrix m:\" << endl << m << endl;\ncout << \"m.isOnes() returns: \" << m.isOnes() << endl;\ncout << \"m.isOnes(1e-3) returns: \" << m.isOnes(1e-3) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_isOrthogonal.cpp",
    "content": "Vector3d v(1,0,0);\nVector3d w(1e-4,0,1);\ncout << \"Here's the vector v:\" << endl << v << endl;\ncout << \"Here's the vector w:\" << endl << w << endl;\ncout << \"v.isOrthogonal(w) returns: \" << v.isOrthogonal(w) << endl;\ncout << \"v.isOrthogonal(w,1e-3) returns: \" << v.isOrthogonal(w,1e-3) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_isUnitary.cpp",
    "content": "Matrix3d m = Matrix3d::Identity();\nm(0,2) = 1e-4;\ncout << \"Here's the matrix m:\" << endl << m << endl;\ncout << \"m.isUnitary() returns: \" << m.isUnitary() << endl;\ncout << \"m.isUnitary(1e-3) returns: \" << m.isUnitary(1e-3) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_isZero.cpp",
    "content": "Matrix3d m = Matrix3d::Zero();\nm(0,2) = 1e-4;\ncout << \"Here's the matrix m:\" << endl << m << endl;\ncout << \"m.isZero() returns: \" << m.isZero() << endl;\ncout << \"m.isZero(1e-3) returns: \" << m.isZero(1e-3) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_leftCols_int.cpp",
    "content": "Array44i a = Array44i::Random();\ncout << \"Here is the array a:\" << endl << a << endl;\ncout << \"Here is a.leftCols(2):\" << endl;\ncout << a.leftCols(2) << endl;\na.leftCols(2).setZero();\ncout << \"Now the array a is:\" << endl << a << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_noalias.cpp",
    "content": "Matrix2d a, b, c; a << 1,2,3,4; b << 5,6,7,8;\nc.noalias() = a * b; // this computes the product directly to c\ncout << c << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_ones.cpp",
    "content": "cout << Matrix2d::Ones() << endl;\ncout << 6 * RowVector4i::Ones() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_ones_int.cpp",
    "content": "cout << 6 * RowVectorXi::Ones(4) << endl;\ncout << VectorXf::Ones(2) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_ones_int_int.cpp",
    "content": "cout << MatrixXi::Ones(2,3) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_operatorNorm.cpp",
    "content": "MatrixXd ones = MatrixXd::Ones(3,3);\ncout << \"The operator norm of the 3x3 matrix of ones is \"\n     << ones.operatorNorm() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_prod.cpp",
    "content": "Matrix3d m = Matrix3d::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is the product of all the coefficients:\" << endl << m.prod() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_random.cpp",
    "content": "cout << 100 * Matrix2i::Random() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_random_int.cpp",
    "content": "cout << VectorXi::Random(2) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_random_int_int.cpp",
    "content": "cout << MatrixXi::Random(2,3) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_replicate.cpp",
    "content": "MatrixXi m = MatrixXi::Random(2,3);\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"m.replicate<3,2>() = ...\" << endl;\ncout << m.replicate<3,2>() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_replicate_int_int.cpp",
    "content": "Vector3i v = Vector3i::Random();\ncout << \"Here is the vector v:\" << endl << v << endl;\ncout << \"v.replicate(2,5) = ...\" << endl;\ncout << v.replicate(2,5) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_reshaped_auto.cpp",
    "content": "Matrix4i m = Matrix4i::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is m.reshaped(2, AutoSize):\" << endl << m.reshaped(2, AutoSize) << endl;\ncout << \"Here is m.reshaped<RowMajor>(AutoSize, fix<8>):\" << endl << m.reshaped<RowMajor>(AutoSize, fix<8>) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_reshaped_fixed.cpp",
    "content": "Matrix4i m = Matrix4i::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is m.reshaped(fix<2>,fix<8>):\" << endl << m.reshaped(fix<2>,fix<8>) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_reshaped_int_int.cpp",
    "content": "Matrix4i m = Matrix4i::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is m.reshaped(2, 8):\" << endl << m.reshaped(2, 8) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_reshaped_to_vector.cpp",
    "content": "Matrix4i m = Matrix4i::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is m.reshaped().transpose():\" << endl << m.reshaped().transpose() << endl;\ncout << \"Here is m.reshaped<RowMajor>().transpose():  \" << endl << m.reshaped<RowMajor>().transpose() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_reverse.cpp",
    "content": "MatrixXi m = MatrixXi::Random(3,4);\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is the reverse of m:\" << endl << m.reverse() << endl;\ncout << \"Here is the coefficient (1,0) in the reverse of m:\" << endl\n     << m.reverse()(1,0) << endl;\ncout << \"Let us overwrite this coefficient with the value 4.\" << endl;\nm.reverse()(1,0) = 4;\ncout << \"Now the matrix m is:\" << endl << m << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_rightCols_int.cpp",
    "content": "Array44i a = Array44i::Random();\ncout << \"Here is the array a:\" << endl << a << endl;\ncout << \"Here is a.rightCols(2):\" << endl;\ncout << a.rightCols(2) << endl;\na.rightCols(2).setZero();\ncout << \"Now the array a is:\" << endl << a << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_row.cpp",
    "content": "Matrix3d m = Matrix3d::Identity();\nm.row(1) = Vector3d(4,5,6);\ncout << m << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_rowwise.cpp",
    "content": "Matrix3d m = Matrix3d::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is the sum of each row:\" << endl << m.rowwise().sum() << endl;\ncout << \"Here is the maximum absolute value of each row:\"\n     << endl << m.cwiseAbs().rowwise().maxCoeff() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_segment_int_int.cpp",
    "content": "RowVector4i v = RowVector4i::Random();\ncout << \"Here is the vector v:\" << endl << v << endl;\ncout << \"Here is v.segment(1, 2):\" << endl << v.segment(1, 2) << endl;\nv.segment(1, 2).setZero();\ncout << \"Now the vector v is:\" << endl << v << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_select.cpp",
    "content": "MatrixXi m(3, 3);\nm << 1, 2, 3,\n     4, 5, 6,\n     7, 8, 9;\nm = (m.array() >= 5).select(-m, m);\ncout << m << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_selfadjointView.cpp",
    "content": "Matrix3i m = Matrix3i::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is the symmetric matrix extracted from the upper part of m:\" << endl\n     << Matrix3i(m.selfadjointView<Upper>()) << endl;\ncout << \"Here is the symmetric matrix extracted from the lower part of m:\" << endl\n     << Matrix3i(m.selfadjointView<Lower>()) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_set.cpp",
    "content": "Matrix3i m1;\nm1 << 1, 2, 3,\n      4, 5, 6,\n      7, 8, 9;\ncout << m1 << endl << endl;\nMatrix3i m2 = Matrix3i::Identity();\nm2.block(0,0, 2,2) << 10, 11, 12, 13;\ncout << m2 << endl << endl;\nVector2i v1;\nv1 << 14, 15;\nm2 << v1.transpose(), 16,\n      v1, m1.block(1,1,2,2);\ncout << m2 << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_setIdentity.cpp",
    "content": "Matrix4i m = Matrix4i::Zero();\nm.block<3,3>(1,0).setIdentity();\ncout << m << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_setOnes.cpp",
    "content": "Matrix4i m = Matrix4i::Random();\nm.row(1).setOnes();\ncout << m << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_setRandom.cpp",
    "content": "Matrix4i m = Matrix4i::Zero();\nm.col(1).setRandom();\ncout << m << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_setZero.cpp",
    "content": "Matrix4i m = Matrix4i::Random();\nm.row(1).setZero();\ncout << m << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_start_int.cpp",
    "content": "RowVector4i v = RowVector4i::Random();\ncout << \"Here is the vector v:\" << endl << v << endl;\ncout << \"Here is v.head(2):\" << endl << v.head(2) << endl;\nv.head(2).setZero();\ncout << \"Now the vector v is:\" << endl << v << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_template_int_bottomRows.cpp",
    "content": "Array44i a = Array44i::Random();\ncout << \"Here is the array a:\" << endl << a << endl;\ncout << \"Here is a.bottomRows<2>():\" << endl;\ncout << a.bottomRows<2>() << endl;\na.bottomRows<2>().setZero();\ncout << \"Now the array a is:\" << endl << a << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_template_int_end.cpp",
    "content": "RowVector4i v = RowVector4i::Random();\ncout << \"Here is the vector v:\" << endl << v << endl;\ncout << \"Here is v.tail(2):\" << endl << v.tail<2>() << endl;\nv.tail<2>().setZero();\ncout << \"Now the vector v is:\" << endl << v << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_template_int_int_block_int_int_int_int.cpp",
    "content": "Matrix4i m = Matrix4i::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is the block:\" << endl << m.block<2, Dynamic>(1, 1, 2, 3) << endl;\nm.block<2, Dynamic>(1, 1, 2, 3).setZero();\ncout << \"Now the matrix m is:\" << endl << m << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_template_int_int_bottomLeftCorner.cpp",
    "content": "Matrix4i m = Matrix4i::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is m.bottomLeftCorner<2,2>():\" << endl;\ncout << m.bottomLeftCorner<2,2>() << endl;\nm.bottomLeftCorner<2,2>().setZero();\ncout << \"Now the matrix m is:\" << endl << m << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_template_int_int_bottomLeftCorner_int_int.cpp",
    "content": "Matrix4i m = Matrix4i::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is m.bottomLeftCorner<2,Dynamic>(2,2):\" << endl;\ncout << m.bottomLeftCorner<2,Dynamic>(2,2) << endl;\nm.bottomLeftCorner<2,Dynamic>(2,2).setZero();\ncout << \"Now the matrix m is:\" << endl << m << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_template_int_int_bottomRightCorner.cpp",
    "content": "Matrix4i m = Matrix4i::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is m.bottomRightCorner<2,2>():\" << endl;\ncout << m.bottomRightCorner<2,2>() << endl;\nm.bottomRightCorner<2,2>().setZero();\ncout << \"Now the matrix m is:\" << endl << m << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_template_int_int_bottomRightCorner_int_int.cpp",
    "content": "Matrix4i m = Matrix4i::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is m.bottomRightCorner<2,Dynamic>(2,2):\" << endl;\ncout << m.bottomRightCorner<2,Dynamic>(2,2) << endl;\nm.bottomRightCorner<2,Dynamic>(2,2).setZero();\ncout << \"Now the matrix m is:\" << endl << m << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_template_int_int_topLeftCorner.cpp",
    "content": "Matrix4i m = Matrix4i::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is m.topLeftCorner<2,2>():\" << endl;\ncout << m.topLeftCorner<2,2>() << endl;\nm.topLeftCorner<2,2>().setZero();\ncout << \"Now the matrix m is:\" << endl << m << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_template_int_int_topLeftCorner_int_int.cpp",
    "content": "Matrix4i m = Matrix4i::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is m.topLeftCorner<2,Dynamic>(2,2):\" << endl;\ncout << m.topLeftCorner<2,Dynamic>(2,2) << endl;\nm.topLeftCorner<2,Dynamic>(2,2).setZero();\ncout << \"Now the matrix m is:\" << endl << m << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_template_int_int_topRightCorner.cpp",
    "content": "Matrix4i m = Matrix4i::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is m.topRightCorner<2,2>():\" << endl;\ncout << m.topRightCorner<2,2>() << endl;\nm.topRightCorner<2,2>().setZero();\ncout << \"Now the matrix m is:\" << endl << m << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_template_int_int_topRightCorner_int_int.cpp",
    "content": "Matrix4i m = Matrix4i::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is m.topRightCorner<2,Dynamic>(2,2):\" << endl;\ncout << m.topRightCorner<2,Dynamic>(2,2) << endl;\nm.topRightCorner<2,Dynamic>(2,2).setZero();\ncout << \"Now the matrix m is:\" << endl << m << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_template_int_leftCols.cpp",
    "content": "Array44i a = Array44i::Random();\ncout << \"Here is the array a:\" << endl << a << endl;\ncout << \"Here is a.leftCols<2>():\" << endl;\ncout << a.leftCols<2>() << endl;\na.leftCols<2>().setZero();\ncout << \"Now the array a is:\" << endl << a << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_template_int_rightCols.cpp",
    "content": "Array44i a = Array44i::Random();\ncout << \"Here is the array a:\" << endl << a << endl;\ncout << \"Here is a.rightCols<2>():\" << endl;\ncout << a.rightCols<2>() << endl;\na.rightCols<2>().setZero();\ncout << \"Now the array a is:\" << endl << a << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_template_int_segment.cpp",
    "content": "RowVector4i v = RowVector4i::Random();\ncout << \"Here is the vector v:\" << endl << v << endl;\ncout << \"Here is v.segment<2>(1):\" << endl << v.segment<2>(1) << endl;\nv.segment<2>(2).setZero();\ncout << \"Now the vector v is:\" << endl << v << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_template_int_start.cpp",
    "content": "RowVector4i v = RowVector4i::Random();\ncout << \"Here is the vector v:\" << endl << v << endl;\ncout << \"Here is v.head(2):\" << endl << v.head<2>() << endl;\nv.head<2>().setZero();\ncout << \"Now the vector v is:\" << endl << v << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_template_int_topRows.cpp",
    "content": "Array44i a = Array44i::Random();\ncout << \"Here is the array a:\" << endl << a << endl;\ncout << \"Here is a.topRows<2>():\" << endl;\ncout << a.topRows<2>() << endl;\na.topRows<2>().setZero();\ncout << \"Now the array a is:\" << endl << a << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_topLeftCorner_int_int.cpp",
    "content": "Matrix4i m = Matrix4i::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is m.topLeftCorner(2, 2):\" << endl;\ncout << m.topLeftCorner(2, 2) << endl;\nm.topLeftCorner(2, 2).setZero();\ncout << \"Now the matrix m is:\" << endl << m << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_topRightCorner_int_int.cpp",
    "content": "Matrix4i m = Matrix4i::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is m.topRightCorner(2, 2):\" << endl;\ncout << m.topRightCorner(2, 2) << endl;\nm.topRightCorner(2, 2).setZero();\ncout << \"Now the matrix m is:\" << endl << m << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_topRows_int.cpp",
    "content": "Array44i a = Array44i::Random();\ncout << \"Here is the array a:\" << endl << a << endl;\ncout << \"Here is a.topRows(2):\" << endl;\ncout << a.topRows(2) << endl;\na.topRows(2).setZero();\ncout << \"Now the array a is:\" << endl << a << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_transpose.cpp",
    "content": "Matrix2i m = Matrix2i::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is the transpose of m:\" << endl << m.transpose() << endl;\ncout << \"Here is the coefficient (1,0) in the transpose of m:\" << endl\n     << m.transpose()(1,0) << endl;\ncout << \"Let us overwrite this coefficient with the value 0.\" << endl;\nm.transpose()(1,0) = 0;\ncout << \"Now the matrix m is:\" << endl << m << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_triangularView.cpp",
    "content": "Matrix3i m = Matrix3i::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is the upper-triangular matrix extracted from m:\" << endl\n     << Matrix3i(m.triangularView<Eigen::Upper>()) << endl;\ncout << \"Here is the strictly-upper-triangular matrix extracted from m:\" << endl\n     << Matrix3i(m.triangularView<Eigen::StrictlyUpper>()) << endl;\ncout << \"Here is the unit-lower-triangular matrix extracted from m:\" << endl\n     << Matrix3i(m.triangularView<Eigen::UnitLower>()) << endl;\n// FIXME need to implement output for triangularViews (Bug 885)\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_zero.cpp",
    "content": "cout << Matrix2d::Zero() << endl;\ncout << RowVector4i::Zero() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_zero_int.cpp",
    "content": "cout << RowVectorXi::Zero(4) << endl;\ncout << VectorXf::Zero(2) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/MatrixBase_zero_int_int.cpp",
    "content": "cout << MatrixXi::Zero(2,3) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Matrix_Map_stride.cpp",
    "content": "Matrix4i A;\nA << 1,  2,  3,  4,\n     5,  6,  7,  8,\n     9, 10, 11, 12,\n    13, 14, 15, 16;\n\nstd::cout << Matrix2i::Map(&A(1,1),Stride<8,2>()) << std::endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Matrix_initializer_list_23_cxx11.cpp",
    "content": "MatrixXd m {\n  {1, 2, 3},\n  {4, 5, 6}\n};\ncout << m << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Matrix_initializer_list_vector_cxx11.cpp",
    "content": "VectorXi v {{1, 2}};\ncout << v << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Matrix_resize_NoChange_int.cpp",
    "content": "MatrixXd m(3,4);\nm.resize(NoChange, 5);\ncout << \"m: \" << m.rows() << \" rows, \" << m.cols() << \" cols\" << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Matrix_resize_int.cpp",
    "content": "VectorXd v(10);\nv.resize(3);\nRowVector3d w;\nw.resize(3); // this is legal, but has no effect\ncout << \"v: \" << v.rows() << \" rows, \" << v.cols() << \" cols\" << endl;\ncout << \"w: \" << w.rows() << \" rows, \" << w.cols() << \" cols\" << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Matrix_resize_int_NoChange.cpp",
    "content": "MatrixXd m(3,4);\nm.resize(5, NoChange);\ncout << \"m: \" << m.rows() << \" rows, \" << m.cols() << \" cols\" << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Matrix_resize_int_int.cpp",
    "content": "MatrixXd m(2,3);\nm << 1,2,3,4,5,6;\ncout << \"here's the 2x3 matrix m:\" << endl << m << endl;\ncout << \"let's resize m to 3x2. This is a conservative resizing because 2*3==3*2.\" << endl;\nm.resize(3,2);\ncout << \"here's the 3x2 matrix m:\" << endl << m << endl;\ncout << \"now let's resize m to size 2x2. This is NOT a conservative resizing, so it becomes uninitialized:\" << endl;\nm.resize(2,2);\ncout << m << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Matrix_setConstant_int.cpp",
    "content": "VectorXf v;\nv.setConstant(3, 5);\ncout << v << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Matrix_setConstant_int_int.cpp",
    "content": "MatrixXf m;\nm.setConstant(3, 3, 5);\ncout << m << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Matrix_setIdentity_int_int.cpp",
    "content": "MatrixXf m;\nm.setIdentity(3, 3);\ncout << m << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Matrix_setOnes_int.cpp",
    "content": "VectorXf v;\nv.setOnes(3);\ncout << v << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Matrix_setOnes_int_int.cpp",
    "content": "MatrixXf m;\nm.setOnes(3, 3);\ncout << m << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Matrix_setRandom_int.cpp",
    "content": "VectorXf v;\nv.setRandom(3);\ncout << v << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Matrix_setRandom_int_int.cpp",
    "content": "MatrixXf m;\nm.setRandom(3, 3);\ncout << m << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Matrix_setZero_int.cpp",
    "content": "VectorXf v;\nv.setZero(3);\ncout << v << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Matrix_setZero_int_int.cpp",
    "content": "MatrixXf m;\nm.setZero(3, 3);\ncout << m << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Matrix_variadic_ctor_cxx11.cpp",
    "content": "Matrix<int, 1, 6> a(1, 2, 3, 4, 5, 6);\nMatrix<int, 3, 1> b {1, 2, 3};\ncout << a << \"\\n\\n\" << b << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/PartialPivLU_solve.cpp",
    "content": "MatrixXd A = MatrixXd::Random(3,3);\nMatrixXd B = MatrixXd::Random(3,2);\ncout << \"Here is the invertible matrix A:\" << endl << A << endl;\ncout << \"Here is the matrix B:\" << endl << B << endl;\nMatrixXd X = A.lu().solve(B);\ncout << \"Here is the (unique) solution X to the equation AX=B:\" << endl << X << endl;\ncout << \"Relative error: \" << (A*X-B).norm() / B.norm() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/PartialRedux_count.cpp",
    "content": "Matrix3d m = Matrix3d::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\nMatrix<ptrdiff_t, 3, 1> res = (m.array() >= 0.5).rowwise().count();\ncout << \"Here is the count of elements larger or equal than 0.5 of each row:\" << endl;\ncout << res << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/PartialRedux_maxCoeff.cpp",
    "content": "Matrix3d m = Matrix3d::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is the maximum of each column:\" << endl << m.colwise().maxCoeff() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/PartialRedux_minCoeff.cpp",
    "content": "Matrix3d m = Matrix3d::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is the minimum of each column:\" << endl << m.colwise().minCoeff() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/PartialRedux_norm.cpp",
    "content": "Matrix3d m = Matrix3d::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is the norm of each column:\" << endl << m.colwise().norm() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/PartialRedux_prod.cpp",
    "content": "Matrix3d m = Matrix3d::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is the product of each row:\" << endl << m.rowwise().prod() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/PartialRedux_squaredNorm.cpp",
    "content": "Matrix3d m = Matrix3d::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is the square norm of each row:\" << endl << m.rowwise().squaredNorm() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/PartialRedux_sum.cpp",
    "content": "Matrix3d m = Matrix3d::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is the sum of each row:\" << endl << m.rowwise().sum() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/RealQZ_compute.cpp",
    "content": "MatrixXf A = MatrixXf::Random(4,4);\nMatrixXf B = MatrixXf::Random(4,4);\nRealQZ<MatrixXf> qz(4); // preallocate space for 4x4 matrices\nqz.compute(A,B);  // A = Q S Z,  B = Q T Z\n\n// print original matrices and result of decomposition\ncout << \"A:\\n\" << A << \"\\n\" << \"B:\\n\" << B << \"\\n\";\ncout << \"S:\\n\" << qz.matrixS() << \"\\n\" << \"T:\\n\" << qz.matrixT() << \"\\n\";\ncout << \"Q:\\n\" << qz.matrixQ() << \"\\n\" << \"Z:\\n\" << qz.matrixZ() << \"\\n\";\n\n// verify precision\ncout << \"\\nErrors:\"\n  << \"\\n|A-QSZ|: \" << (A-qz.matrixQ()*qz.matrixS()*qz.matrixZ()).norm()\n  << \", |B-QTZ|: \" << (B-qz.matrixQ()*qz.matrixT()*qz.matrixZ()).norm()\n  << \"\\n|QQ* - I|: \" << (qz.matrixQ()*qz.matrixQ().adjoint() - MatrixXf::Identity(4,4)).norm()\n  << \", |ZZ* - I|: \" << (qz.matrixZ()*qz.matrixZ().adjoint() - MatrixXf::Identity(4,4)).norm()\n  << \"\\n\";\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/RealSchur_RealSchur_MatrixType.cpp",
    "content": "MatrixXd A = MatrixXd::Random(6,6);\ncout << \"Here is a random 6x6 matrix, A:\" << endl << A << endl << endl;\n\nRealSchur<MatrixXd> schur(A);\ncout << \"The orthogonal matrix U is:\" << endl << schur.matrixU() << endl;\ncout << \"The quasi-triangular matrix T is:\" << endl << schur.matrixT() << endl << endl;\n\nMatrixXd U = schur.matrixU();\nMatrixXd T = schur.matrixT();\ncout << \"U * T * U^T = \" << endl << U * T * U.transpose() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/RealSchur_compute.cpp",
    "content": "MatrixXf A = MatrixXf::Random(4,4);\nRealSchur<MatrixXf> schur(4);\nschur.compute(A, /* computeU = */ false);\ncout << \"The matrix T in the decomposition of A is:\" << endl << schur.matrixT() << endl;\nschur.compute(A.inverse(), /* computeU = */ false);\ncout << \"The matrix T in the decomposition of A^(-1) is:\" << endl << schur.matrixT() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/SelfAdjointEigenSolver_SelfAdjointEigenSolver.cpp",
    "content": "SelfAdjointEigenSolver<Matrix4f> es;\nMatrix4f X = Matrix4f::Random(4,4);\nMatrix4f A = X + X.transpose();\nes.compute(A);\ncout << \"The eigenvalues of A are: \" << es.eigenvalues().transpose() << endl;\nes.compute(A + Matrix4f::Identity(4,4)); // re-use es to compute eigenvalues of A+I\ncout << \"The eigenvalues of A+I are: \" << es.eigenvalues().transpose() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/SelfAdjointEigenSolver_SelfAdjointEigenSolver_MatrixType.cpp",
    "content": "MatrixXd X = MatrixXd::Random(5,5);\nMatrixXd A = X + X.transpose();\ncout << \"Here is a random symmetric 5x5 matrix, A:\" << endl << A << endl << endl;\n\nSelfAdjointEigenSolver<MatrixXd> es(A);\ncout << \"The eigenvalues of A are:\" << endl << es.eigenvalues() << endl;\ncout << \"The matrix of eigenvectors, V, is:\" << endl << es.eigenvectors() << endl << endl;\n\ndouble lambda = es.eigenvalues()[0];\ncout << \"Consider the first eigenvalue, lambda = \" << lambda << endl;\nVectorXd v = es.eigenvectors().col(0);\ncout << \"If v is the corresponding eigenvector, then lambda * v = \" << endl << lambda * v << endl;\ncout << \"... and A * v = \" << endl << A * v << endl << endl;\n\nMatrixXd D = es.eigenvalues().asDiagonal();\nMatrixXd V = es.eigenvectors();\ncout << \"Finally, V * D * V^(-1) = \" << endl << V * D * V.inverse() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/SelfAdjointEigenSolver_SelfAdjointEigenSolver_MatrixType2.cpp",
    "content": "MatrixXd X = MatrixXd::Random(5,5);\nMatrixXd A = X + X.transpose();\ncout << \"Here is a random symmetric matrix, A:\" << endl << A << endl;\nX = MatrixXd::Random(5,5);\nMatrixXd B = X * X.transpose();\ncout << \"and a random postive-definite matrix, B:\" << endl << B << endl << endl;\n\nGeneralizedSelfAdjointEigenSolver<MatrixXd> es(A,B);\ncout << \"The eigenvalues of the pencil (A,B) are:\" << endl << es.eigenvalues() << endl;\ncout << \"The matrix of eigenvectors, V, is:\" << endl << es.eigenvectors() << endl << endl;\n\ndouble lambda = es.eigenvalues()[0];\ncout << \"Consider the first eigenvalue, lambda = \" << lambda << endl;\nVectorXd v = es.eigenvectors().col(0);\ncout << \"If v is the corresponding eigenvector, then A * v = \" << endl << A * v << endl;\ncout << \"... and lambda * B * v = \" << endl << lambda * B * v << endl << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/SelfAdjointEigenSolver_compute_MatrixType.cpp",
    "content": "SelfAdjointEigenSolver<MatrixXf> es(4);\nMatrixXf X = MatrixXf::Random(4,4);\nMatrixXf A = X + X.transpose();\nes.compute(A);\ncout << \"The eigenvalues of A are: \" << es.eigenvalues().transpose() << endl;\nes.compute(A + MatrixXf::Identity(4,4)); // re-use es to compute eigenvalues of A+I\ncout << \"The eigenvalues of A+I are: \" << es.eigenvalues().transpose() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/SelfAdjointEigenSolver_compute_MatrixType2.cpp",
    "content": "MatrixXd X = MatrixXd::Random(5,5);\nMatrixXd A = X * X.transpose();\nX = MatrixXd::Random(5,5);\nMatrixXd B = X * X.transpose();\n\nGeneralizedSelfAdjointEigenSolver<MatrixXd> es(A,B,EigenvaluesOnly);\ncout << \"The eigenvalues of the pencil (A,B) are:\" << endl << es.eigenvalues() << endl;\nes.compute(B,A,false);\ncout << \"The eigenvalues of the pencil (B,A) are:\" << endl << es.eigenvalues() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/SelfAdjointEigenSolver_eigenvalues.cpp",
    "content": "MatrixXd ones = MatrixXd::Ones(3,3);\nSelfAdjointEigenSolver<MatrixXd> es(ones);\ncout << \"The eigenvalues of the 3x3 matrix of ones are:\" \n     << endl << es.eigenvalues() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/SelfAdjointEigenSolver_eigenvectors.cpp",
    "content": "MatrixXd ones = MatrixXd::Ones(3,3);\nSelfAdjointEigenSolver<MatrixXd> es(ones);\ncout << \"The first eigenvector of the 3x3 matrix of ones is:\" \n     << endl << es.eigenvectors().col(1) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/SelfAdjointEigenSolver_operatorInverseSqrt.cpp",
    "content": "MatrixXd X = MatrixXd::Random(4,4);\nMatrixXd A = X * X.transpose();\ncout << \"Here is a random positive-definite matrix, A:\" << endl << A << endl << endl;\n\nSelfAdjointEigenSolver<MatrixXd> es(A);\ncout << \"The inverse square root of A is: \" << endl;\ncout << es.operatorInverseSqrt() << endl;\ncout << \"We can also compute it with operatorSqrt() and inverse(). That yields: \" << endl;\ncout << es.operatorSqrt().inverse() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/SelfAdjointEigenSolver_operatorSqrt.cpp",
    "content": "MatrixXd X = MatrixXd::Random(4,4);\nMatrixXd A = X * X.transpose();\ncout << \"Here is a random positive-definite matrix, A:\" << endl << A << endl << endl;\n\nSelfAdjointEigenSolver<MatrixXd> es(A);\nMatrixXd sqrtA = es.operatorSqrt();\ncout << \"The square root of A is: \" << endl << sqrtA << endl;\ncout << \"If we square this, we get: \" << endl << sqrtA*sqrtA << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/SelfAdjointView_eigenvalues.cpp",
    "content": "MatrixXd ones = MatrixXd::Ones(3,3);\nVectorXd eivals = ones.selfadjointView<Lower>().eigenvalues();\ncout << \"The eigenvalues of the 3x3 matrix of ones are:\" << endl << eivals << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/SelfAdjointView_operatorNorm.cpp",
    "content": "MatrixXd ones = MatrixXd::Ones(3,3);\ncout << \"The operator norm of the 3x3 matrix of ones is \"\n     << ones.selfadjointView<Lower>().operatorNorm() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Slicing_arrayexpr.cpp",
    "content": "ArrayXi ind(5); ind<<4,2,5,5,3;\nMatrixXi A = MatrixXi::Random(4,6);\ncout << \"Initial matrix A:\\n\" << A << \"\\n\\n\";\ncout << \"A(all,ind-1):\\n\" << A(all,ind-1) << \"\\n\\n\";\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Slicing_custom_padding_cxx11.cpp",
    "content": "struct pad {\n  Index size() const { return out_size; }\n  Index operator[] (Index i) const { return std::max<Index>(0,i-(out_size-in_size)); }\n  Index in_size, out_size;\n};\n\nMatrix3i A;\nA.reshaped() = VectorXi::LinSpaced(9,1,9);\ncout << \"Initial matrix A:\\n\" << A << \"\\n\\n\";\nMatrixXi B(5,5);\nB = A(pad{3,5}, pad{3,5});\ncout << \"A(pad{3,N}, pad{3,N}):\\n\" << B << \"\\n\\n\";\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Slicing_rawarray_cxx11.cpp",
    "content": "#if EIGEN_HAS_STATIC_ARRAY_TEMPLATE\nMatrixXi A = MatrixXi::Random(4,6);\ncout << \"Initial matrix A:\\n\" << A << \"\\n\\n\";\ncout << \"A(all,{4,2,5,5,3}):\\n\" << A(all,{4,2,5,5,3}) << \"\\n\\n\";\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Slicing_stdvector_cxx11.cpp",
    "content": "std::vector<int> ind{4,2,5,5,3};\nMatrixXi A = MatrixXi::Random(4,6);\ncout << \"Initial matrix A:\\n\" << A << \"\\n\\n\";\ncout << \"A(all,ind):\\n\" << A(all,ind) << \"\\n\\n\";\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/SparseMatrix_coeffs.cpp",
    "content": "SparseMatrix<double> A(3,3);\nA.insert(1,2) = 0;\nA.insert(0,1) = 1;\nA.insert(2,0) = 2;\nA.makeCompressed();\ncout << \"The matrix A is:\" << endl << MatrixXd(A) << endl;\ncout << \"it has \" << A.nonZeros() << \" stored non zero coefficients that are: \" << A.coeffs().transpose() << endl;\nA.coeffs() += 10;\ncout << \"After adding 10 to every stored non zero coefficient, the matrix A is:\" << endl << MatrixXd(A) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/TopicAliasing_block.cpp",
    "content": "MatrixXi mat(3,3); \nmat << 1, 2, 3,   4, 5, 6,   7, 8, 9;\ncout << \"Here is the matrix mat:\\n\" << mat << endl;\n\n// This assignment shows the aliasing problem\nmat.bottomRightCorner(2,2) = mat.topLeftCorner(2,2);\ncout << \"After the assignment, mat = \\n\" << mat << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/TopicAliasing_block_correct.cpp",
    "content": "MatrixXi mat(3,3); \nmat << 1, 2, 3,   4, 5, 6,   7, 8, 9;\ncout << \"Here is the matrix mat:\\n\" << mat << endl;\n\n// The eval() solves the aliasing problem\nmat.bottomRightCorner(2,2) = mat.topLeftCorner(2,2).eval();\ncout << \"After the assignment, mat = \\n\" << mat << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/TopicAliasing_cwise.cpp",
    "content": "MatrixXf mat(2,2); \nmat << 1, 2,  4, 7;\ncout << \"Here is the matrix mat:\\n\" << mat << endl << endl;\n\nmat = 2 * mat;\ncout << \"After 'mat = 2 * mat', mat = \\n\" << mat << endl << endl;\n\n\nmat = mat - MatrixXf::Identity(2,2);\ncout << \"After the subtraction, it becomes\\n\" << mat << endl << endl;\n\n\nArrayXXf arr = mat;\narr = arr.square();\ncout << \"After squaring, it becomes\\n\" << arr << endl << endl;\n\n// Combining all operations in one statement:\nmat << 1, 2,  4, 7;\nmat = (2 * mat - MatrixXf::Identity(2,2)).array().square();\ncout << \"Doing everything at once yields\\n\" << mat << endl << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/TopicAliasing_mult1.cpp",
    "content": "MatrixXf matA(2,2); \nmatA << 2, 0,  0, 2;\nmatA = matA * matA;\ncout << matA;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/TopicAliasing_mult2.cpp",
    "content": "MatrixXf matA(2,2), matB(2,2); \nmatA << 2, 0,  0, 2;\n\n// Simple but not quite as efficient\nmatB = matA * matA;\ncout << matB << endl << endl;\n\n// More complicated but also more efficient\nmatB.noalias() = matA * matA;\ncout << matB;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/TopicAliasing_mult3.cpp",
    "content": "MatrixXf matA(2,2); \nmatA << 2, 0,  0, 2;\nmatA.noalias() = matA * matA;\ncout << matA;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/TopicAliasing_mult4.cpp",
    "content": "MatrixXf A(2,2), B(3,2);\nB << 2, 0,  0, 3, 1, 1;\nA << 2, 0, 0, -2;\nA = (B * A).cwiseAbs();\ncout << A;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/TopicAliasing_mult5.cpp",
    "content": "MatrixXf A(2,2), B(3,2);\nB << 2, 0,  0, 3, 1, 1;\nA << 2, 0, 0, -2;\nA = (B * A).eval().cwiseAbs();\ncout << A;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/TopicStorageOrders_example.cpp",
    "content": "Matrix<int, 3, 4, ColMajor> Acolmajor;\nAcolmajor << 8, 2, 2, 9,\n             9, 1, 4, 4,\n\t     3, 5, 4, 5;\ncout << \"The matrix A:\" << endl;\ncout << Acolmajor << endl << endl; \n\ncout << \"In memory (column-major):\" << endl;\nfor (int i = 0; i < Acolmajor.size(); i++)\n  cout << *(Acolmajor.data() + i) << \"  \";\ncout << endl << endl;\n\nMatrix<int, 3, 4, RowMajor> Arowmajor = Acolmajor;\ncout << \"In memory (row-major):\" << endl;\nfor (int i = 0; i < Arowmajor.size(); i++)\n  cout << *(Arowmajor.data() + i) << \"  \";\ncout << endl;\n\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Triangular_solve.cpp",
    "content": "Matrix3d m = Matrix3d::Zero();\nm.triangularView<Eigen::Upper>().setOnes();\ncout << \"Here is the matrix m:\\n\" << m << endl;\nMatrix3d n = Matrix3d::Ones();\nn.triangularView<Eigen::Lower>() *= 2;\ncout << \"Here is the matrix n:\\n\" << n << endl;\ncout << \"And now here is m.inverse()*n, taking advantage of the fact that\"\n        \" m is upper-triangular:\\n\"\n     << m.triangularView<Eigen::Upper>().solve(n) << endl;\ncout << \"And this is n*m.inverse():\\n\"\n     << m.triangularView<Eigen::Upper>().solve<Eigen::OnTheRight>(n);\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Tridiagonalization_Tridiagonalization_MatrixType.cpp",
    "content": "MatrixXd X = MatrixXd::Random(5,5);\nMatrixXd A = X + X.transpose();\ncout << \"Here is a random symmetric 5x5 matrix:\" << endl << A << endl << endl;\nTridiagonalization<MatrixXd> triOfA(A);\nMatrixXd Q = triOfA.matrixQ();\ncout << \"The orthogonal matrix Q is:\" << endl << Q << endl;\nMatrixXd T = triOfA.matrixT();\ncout << \"The tridiagonal matrix T is:\" << endl << T << endl << endl;\ncout << \"Q * T * Q^T = \" << endl << Q * T * Q.transpose() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Tridiagonalization_compute.cpp",
    "content": "Tridiagonalization<MatrixXf> tri;\nMatrixXf X = MatrixXf::Random(4,4);\nMatrixXf A = X + X.transpose();\ntri.compute(A);\ncout << \"The matrix T in the tridiagonal decomposition of A is: \" << endl;\ncout << tri.matrixT() << endl;\ntri.compute(2*A); // re-use tri to compute eigenvalues of 2A\ncout << \"The matrix T in the tridiagonal decomposition of 2A is: \" << endl;\ncout << tri.matrixT() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Tridiagonalization_decomposeInPlace.cpp",
    "content": "MatrixXd X = MatrixXd::Random(5,5);\nMatrixXd A = X + X.transpose();\ncout << \"Here is a random symmetric 5x5 matrix:\" << endl << A << endl << endl;\n\nVectorXd diag(5);\nVectorXd subdiag(4);\ninternal::tridiagonalization_inplace(A, diag, subdiag, true);\ncout << \"The orthogonal matrix Q is:\" << endl << A << endl;\ncout << \"The diagonal of the tridiagonal matrix T is:\" << endl << diag << endl;\ncout << \"The subdiagonal of the tridiagonal matrix T is:\" << endl << subdiag << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Tridiagonalization_diagonal.cpp",
    "content": "MatrixXcd X = MatrixXcd::Random(4,4);\nMatrixXcd A = X + X.adjoint();\ncout << \"Here is a random self-adjoint 4x4 matrix:\" << endl << A << endl << endl;\n\nTridiagonalization<MatrixXcd> triOfA(A);\nMatrixXd T = triOfA.matrixT();\ncout << \"The tridiagonal matrix T is:\" << endl << T << endl << endl;\n\ncout << \"We can also extract the diagonals of T directly ...\" << endl;\nVectorXd diag = triOfA.diagonal();\ncout << \"The diagonal is:\" << endl << diag << endl; \nVectorXd subdiag = triOfA.subDiagonal();\ncout << \"The subdiagonal is:\" << endl << subdiag << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Tridiagonalization_householderCoefficients.cpp",
    "content": "Matrix4d X = Matrix4d::Random(4,4);\nMatrix4d A = X + X.transpose();\ncout << \"Here is a random symmetric 4x4 matrix:\" << endl << A << endl;\nTridiagonalization<Matrix4d> triOfA(A);\nVector3d hc = triOfA.householderCoefficients();\ncout << \"The vector of Householder coefficients is:\" << endl << hc << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Tridiagonalization_packedMatrix.cpp",
    "content": "Matrix4d X = Matrix4d::Random(4,4);\nMatrix4d A = X + X.transpose();\ncout << \"Here is a random symmetric 4x4 matrix:\" << endl << A << endl;\nTridiagonalization<Matrix4d> triOfA(A);\nMatrix4d pm = triOfA.packedMatrix();\ncout << \"The packed matrix M is:\" << endl << pm << endl;\ncout << \"The diagonal and subdiagonal corresponds to the matrix T, which is:\" \n     << endl << triOfA.matrixT() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Tutorial_AdvancedInitialization_Block.cpp",
    "content": "MatrixXf matA(2, 2);\nmatA << 1, 2, 3, 4;\nMatrixXf matB(4, 4);\nmatB << matA, matA/10, matA/10, matA;\nstd::cout << matB << std::endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Tutorial_AdvancedInitialization_CommaTemporary.cpp",
    "content": "MatrixXf mat = MatrixXf::Random(2, 3);\nstd::cout << mat << std::endl << std::endl;\nmat = (MatrixXf(2,2) << 0, 1, 1, 0).finished() * mat;\nstd::cout << mat << std::endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Tutorial_AdvancedInitialization_Join.cpp",
    "content": "RowVectorXd vec1(3);\nvec1 << 1, 2, 3;\nstd::cout << \"vec1 = \" << vec1 << std::endl;\n\nRowVectorXd vec2(4);\nvec2 << 1, 4, 9, 16;\nstd::cout << \"vec2 = \" << vec2 << std::endl;\n\nRowVectorXd joined(7);\njoined << vec1, vec2;\nstd::cout << \"joined = \" << joined << std::endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Tutorial_AdvancedInitialization_LinSpaced.cpp",
    "content": "ArrayXXf table(10, 4);\ntable.col(0) = ArrayXf::LinSpaced(10, 0, 90);\ntable.col(1) = M_PI / 180 * table.col(0);\ntable.col(2) = table.col(1).sin();\ntable.col(3) = table.col(1).cos();\nstd::cout << \"  Degrees   Radians      Sine    Cosine\\n\";\nstd::cout << table << std::endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Tutorial_AdvancedInitialization_ThreeWays.cpp",
    "content": "const int size = 6;\nMatrixXd mat1(size, size);\nmat1.topLeftCorner(size/2, size/2)     = MatrixXd::Zero(size/2, size/2);\nmat1.topRightCorner(size/2, size/2)    = MatrixXd::Identity(size/2, size/2);\nmat1.bottomLeftCorner(size/2, size/2)  = MatrixXd::Identity(size/2, size/2);\nmat1.bottomRightCorner(size/2, size/2) = MatrixXd::Zero(size/2, size/2);\nstd::cout << mat1 << std::endl << std::endl;\n\nMatrixXd mat2(size, size);\nmat2.topLeftCorner(size/2, size/2).setZero();\nmat2.topRightCorner(size/2, size/2).setIdentity();\nmat2.bottomLeftCorner(size/2, size/2).setIdentity();\nmat2.bottomRightCorner(size/2, size/2).setZero();\nstd::cout << mat2 << std::endl << std::endl;\n\nMatrixXd mat3(size, size);\nmat3 << MatrixXd::Zero(size/2, size/2), MatrixXd::Identity(size/2, size/2),\n        MatrixXd::Identity(size/2, size/2), MatrixXd::Zero(size/2, size/2);\nstd::cout << mat3 << std::endl;\n\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Tutorial_AdvancedInitialization_Zero.cpp",
    "content": "std::cout << \"A fixed-size array:\\n\";\nArray33f a1 = Array33f::Zero();\nstd::cout << a1 << \"\\n\\n\";\n\n\nstd::cout << \"A one-dimensional dynamic-size array:\\n\";\nArrayXf a2 = ArrayXf::Zero(3);\nstd::cout << a2 << \"\\n\\n\";\n\n\nstd::cout << \"A two-dimensional dynamic-size array:\\n\";\nArrayXXf a3 = ArrayXXf::Zero(3, 4);\nstd::cout << a3 << \"\\n\";\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Tutorial_Map_rowmajor.cpp",
    "content": "int array[8];\nfor(int i = 0; i < 8; ++i) array[i] = i;\ncout << \"Column-major:\\n\" << Map<Matrix<int,2,4> >(array) << endl;\ncout << \"Row-major:\\n\" << Map<Matrix<int,2,4,RowMajor> >(array) << endl;\ncout << \"Row-major using stride:\\n\" <<\n  Map<Matrix<int,2,4>, Unaligned, Stride<1,4> >(array) << endl;\n\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Tutorial_Map_using.cpp",
    "content": "typedef Matrix<float,1,Dynamic> MatrixType;\ntypedef Map<MatrixType> MapType;\ntypedef Map<const MatrixType> MapTypeConst;   // a read-only map\nconst int n_dims = 5;\n  \nMatrixType m1(n_dims), m2(n_dims);\nm1.setRandom();\nm2.setRandom();\nfloat *p = &m2(0);  // get the address storing the data for m2\nMapType m2map(p,m2.size());   // m2map shares data with m2\nMapTypeConst m2mapconst(p,m2.size());  // a read-only accessor for m2\n\ncout << \"m1: \" << m1 << endl;\ncout << \"m2: \" << m2 << endl;\ncout << \"Squared euclidean distance: \" << (m1-m2).squaredNorm() << endl;\ncout << \"Squared euclidean distance, using map: \" <<\n  (m1-m2map).squaredNorm() << endl;\nm2map(3) = 7;   // this will change m2, since they share the same array\ncout << \"Updated m2: \" << m2 << endl;\ncout << \"m2 coefficient 2, constant accessor: \" << m2mapconst(2) << endl;\n/* m2mapconst(2) = 5; */   // this yields a compile-time error\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Tutorial_ReshapeMat2Mat.cpp",
    "content": "MatrixXf M1(2,6);    // Column-major storage\nM1 << 1, 2, 3,  4,  5,  6,\n      7, 8, 9, 10, 11, 12;\n\nMap<MatrixXf> M2(M1.data(), 6,2);\ncout << \"M2:\" << endl << M2 << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Tutorial_ReshapeMat2Vec.cpp",
    "content": "MatrixXf M1(3,3);    // Column-major storage\nM1 << 1, 2, 3,\n      4, 5, 6,\n      7, 8, 9;\n\nMap<RowVectorXf> v1(M1.data(), M1.size());\ncout << \"v1:\" << endl << v1 << endl;\n\nMatrix<float,Dynamic,Dynamic,RowMajor> M2(M1);\nMap<RowVectorXf> v2(M2.data(), M2.size());\ncout << \"v2:\" << endl << v2 << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Tutorial_SlicingCol.cpp",
    "content": "MatrixXf M1 = MatrixXf::Random(3,8);\ncout << \"Column major input:\" << endl << M1 << \"\\n\";\nMap<MatrixXf,0,OuterStride<> > M2(M1.data(), M1.rows(), (M1.cols()+2)/3, OuterStride<>(M1.outerStride()*3));\ncout << \"1 column over 3:\" << endl << M2 << \"\\n\";\n\ntypedef Matrix<float,Dynamic,Dynamic,RowMajor> RowMajorMatrixXf;\nRowMajorMatrixXf M3(M1);\ncout << \"Row major input:\" << endl << M3 << \"\\n\";\nMap<RowMajorMatrixXf,0,Stride<Dynamic,3> > M4(M3.data(), M3.rows(), (M3.cols()+2)/3,\n                                              Stride<Dynamic,3>(M3.outerStride(),3));\ncout << \"1 column over 3:\" << endl << M4 << \"\\n\";\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Tutorial_SlicingVec.cpp",
    "content": "RowVectorXf v = RowVectorXf::LinSpaced(20,0,19);\ncout << \"Input:\" << endl << v << endl;\nMap<RowVectorXf,0,InnerStride<2> > v2(v.data(), v.size()/2);\ncout << \"Even:\" << v2 << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Tutorial_commainit_01.cpp",
    "content": "Matrix3f m;\nm << 1, 2, 3,\n     4, 5, 6,\n     7, 8, 9;\nstd::cout << m;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Tutorial_commainit_01b.cpp",
    "content": "Matrix3f m;\nm.row(0) << 1, 2, 3;\nm.block(1,0,2,2) << 4, 5, 7, 8;\nm.col(2).tail(2) << 6, 9;\t\t    \nstd::cout << m;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Tutorial_commainit_02.cpp",
    "content": "int rows=5, cols=5;\nMatrixXf m(rows,cols);\nm << (Matrix3f() << 1, 2, 3, 4, 5, 6, 7, 8, 9).finished(),\n     MatrixXf::Zero(3,cols-3),\n     MatrixXf::Zero(rows-3,3),\n     MatrixXf::Identity(rows-3,cols-3);\ncout << m;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Tutorial_range_for_loop_1d_cxx11.cpp",
    "content": "VectorXi v = VectorXi::Random(4);\ncout << \"Here is the vector v:\\n\";\nfor(auto x : v) cout << x << \" \";\ncout << \"\\n\";\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Tutorial_range_for_loop_2d_cxx11.cpp",
    "content": "Matrix2i A = Matrix2i::Random();\ncout << \"Here are the coeffs of the 2x2 matrix A:\\n\";\nfor(auto x : A.reshaped())\n  cout << x << \" \";\ncout << \"\\n\";\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Tutorial_reshaped_vs_resize_1.cpp",
    "content": "MatrixXi m = Matrix4i::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is m.reshaped(2, 8):\" << endl << m.reshaped(2, 8) << endl;\nm.resize(2,8);\ncout << \"Here is the matrix m after m.resize(2,8):\" << endl << m << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Tutorial_reshaped_vs_resize_2.cpp",
    "content": "Matrix<int,Dynamic,Dynamic,RowMajor> m = Matrix4i::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is m.reshaped(2, 8):\" << endl << m.reshaped(2, 8) << endl;\ncout << \"Here is m.reshaped<AutoOrder>(2, 8):\" << endl << m.reshaped<AutoOrder>(2, 8) << endl;\nm.resize(2,8);\ncout << \"Here is the matrix m after m.resize(2,8):\" << endl << m << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Tutorial_solve_matrix_inverse.cpp",
    "content": "Matrix3f A;\nVector3f b;\nA << 1,2,3,  4,5,6,  7,8,10;\nb << 3, 3, 4;\nVector3f x = A.inverse() * b;\ncout << \"The solution is:\" << endl << x << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Tutorial_solve_multiple_rhs.cpp",
    "content": "Matrix3f A(3,3);\nA << 1,2,3,  4,5,6,  7,8,10;\nMatrix<float,3,2> B;\nB << 3,1, 3,1, 4,1;\nMatrix<float,3,2> X;\nX = A.fullPivLu().solve(B);\ncout << \"The solution with right-hand side (3,3,4) is:\" << endl;\ncout << X.col(0) << endl;\ncout << \"The solution with right-hand side (1,1,1) is:\" << endl;\ncout << X.col(1) << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Tutorial_solve_reuse_decomposition.cpp",
    "content": "Matrix3f A(3,3);\nA << 1,2,3,  4,5,6,  7,8,10;\nPartialPivLU<Matrix3f> luOfA(A); // compute LU decomposition of A\nVector3f b;\nb << 3,3,4;\nVector3f x;\nx = luOfA.solve(b);\ncout << \"The solution with right-hand side (3,3,4) is:\" << endl;\ncout << x << endl;\nb << 1,1,1;\nx = luOfA.solve(b);\ncout << \"The solution with right-hand side (1,1,1) is:\" << endl;\ncout << x << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Tutorial_solve_singular.cpp",
    "content": "Matrix3f A;\nVector3f b;\nA << 1,2,3,  4,5,6,  7,8,9;\nb << 3, 3, 4;\ncout << \"Here is the matrix A:\" << endl << A << endl;\ncout << \"Here is the vector b:\" << endl << b << endl;\nVector3f x;\nx = A.lu().solve(b);\ncout << \"The solution is:\" << endl << x << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Tutorial_solve_triangular.cpp",
    "content": "Matrix3f A;\nVector3f b;\nA << 1,2,3,  0,5,6,  0,0,10;\nb << 3, 3, 4;\ncout << \"Here is the matrix A:\" << endl << A << endl;\ncout << \"Here is the vector b:\" << endl << b << endl;\nVector3f x = A.triangularView<Upper>().solve(b);\ncout << \"The solution is:\" << endl << x << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Tutorial_solve_triangular_inplace.cpp",
    "content": "Matrix3f A;\nVector3f b;\nA << 1,2,3,  0,5,6,  0,0,10;\nb << 3, 3, 4;\nA.triangularView<Upper>().solveInPlace(b);\ncout << \"The solution is:\" << endl << b << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Tutorial_std_sort.cpp",
    "content": "Array4i v = Array4i::Random().abs();\ncout << \"Here is the initial vector v:\\n\" << v.transpose() << \"\\n\";\nstd::sort(v.begin(), v.end());\ncout << \"Here is the sorted vector v:\\n\" << v.transpose() << \"\\n\";\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Tutorial_std_sort_rows_cxx11.cpp",
    "content": "ArrayXXi A = ArrayXXi::Random(4,4).abs();\ncout << \"Here is the initial matrix A:\\n\" << A << \"\\n\";\nfor(auto row : A.rowwise())\n  std::sort(row.begin(), row.end());\ncout << \"Here is the sorted matrix A:\\n\" << A << \"\\n\";\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/VectorwiseOp_homogeneous.cpp",
    "content": "Matrix3Xd M = Matrix3Xd::Random(3,5);\nProjective3d P(Matrix4d::Random());\ncout << \"The matrix M is:\" << endl << M << endl << endl;\ncout << \"M.colwise().homogeneous():\" << endl << M.colwise().homogeneous() << endl << endl;\ncout << \"P * M.colwise().homogeneous():\" << endl << P * M.colwise().homogeneous() << endl << endl;\ncout << \"P * M.colwise().homogeneous().hnormalized(): \" << endl << (P * M.colwise().homogeneous()).colwise().hnormalized() << endl << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/Vectorwise_reverse.cpp",
    "content": "MatrixXi m = MatrixXi::Random(3,4);\ncout << \"Here is the matrix m:\" << endl << m << endl;\ncout << \"Here is the rowwise reverse of m:\" << endl << m.rowwise().reverse() << endl;\ncout << \"Here is the colwise reverse of m:\" << endl << m.colwise().reverse() << endl;\n\ncout << \"Here is the coefficient (1,0) in the rowise reverse of m:\" << endl\n<< m.rowwise().reverse()(1,0) << endl;\ncout << \"Let us overwrite this coefficient with the value 4.\" << endl;\n//m.colwise().reverse()(1,0) = 4;\ncout << \"Now the matrix m is:\" << endl << m << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/class_FullPivLU.cpp",
    "content": "typedef Matrix<double, 5, 3> Matrix5x3;\ntypedef Matrix<double, 5, 5> Matrix5x5;\nMatrix5x3 m = Matrix5x3::Random();\ncout << \"Here is the matrix m:\" << endl << m << endl;\nEigen::FullPivLU<Matrix5x3> lu(m);\ncout << \"Here is, up to permutations, its LU decomposition matrix:\"\n     << endl << lu.matrixLU() << endl;\ncout << \"Here is the L part:\" << endl;\nMatrix5x5 l = Matrix5x5::Identity();\nl.block<5,3>(0,0).triangularView<StrictlyLower>() = lu.matrixLU();\ncout << l << endl;\ncout << \"Here is the U part:\" << endl;\nMatrix5x3 u = lu.matrixLU().triangularView<Upper>();\ncout << u << endl;\ncout << \"Let us now reconstruct the original matrix m:\" << endl;\ncout << lu.permutationP().inverse() * l * u * lu.permutationQ().inverse() << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/compile_snippet.cpp.in",
    "content": "static bool eigen_did_assert = false;\n#define eigen_assert(X) if(!eigen_did_assert && !(X)){ std::cout << \"### Assertion raised in \" << __FILE__ << \":\" << __LINE__ << \":\\n\" #X << \"\\n### The following would happen without assertions:\\n\"; eigen_did_assert = true;}\n\n#include <iostream>\n#include <Eigen/Eigen>\n\n#ifndef M_PI\n#define M_PI 3.1415926535897932384626433832795\n#endif\n\n\nusing namespace Eigen;\nusing namespace std;\n\nint main(int, char**)\n{\n  cout.precision(3);\n// intentionally remove indentation of snippet\n{\n${snippet_source_code}\n}\n  return 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/tut_arithmetic_redux_minmax.cpp",
    "content": "  Matrix3f m = Matrix3f::Random();\n  std::ptrdiff_t i, j;\n  float minOfM = m.minCoeff(&i,&j);\n  cout << \"Here is the matrix m:\\n\" << m << endl;\n  cout << \"Its minimum coefficient (\" << minOfM \n       << \") is at position (\" << i << \",\" << j << \")\\n\\n\";\n\n  RowVector4i v = RowVector4i::Random();\n  int maxOfV = v.maxCoeff(&i);\n  cout << \"Here is the vector v: \" << v << endl;\n  cout << \"Its maximum coefficient (\" << maxOfV \n       << \") is at position \" << i << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/tut_arithmetic_transpose_aliasing.cpp",
    "content": "Matrix2i a; a << 1, 2, 3, 4;\ncout << \"Here is the matrix a:\\n\" << a << endl;\n\na = a.transpose(); // !!! do NOT do this !!!\ncout << \"and the result of the aliasing effect:\\n\" << a << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/tut_arithmetic_transpose_conjugate.cpp",
    "content": "MatrixXcf a = MatrixXcf::Random(2,2);\ncout << \"Here is the matrix a\\n\" << a << endl;\n\ncout << \"Here is the matrix a^T\\n\" << a.transpose() << endl;\n\n\ncout << \"Here is the conjugate of a\\n\" << a.conjugate() << endl;\n\n\ncout << \"Here is the matrix a^*\\n\" << a.adjoint() << endl;\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/tut_arithmetic_transpose_inplace.cpp",
    "content": "MatrixXf a(2,3); a << 1, 2, 3, 4, 5, 6;\ncout << \"Here is the initial matrix a:\\n\" << a << endl;\n\n\na.transposeInPlace();\ncout << \"and after being transposed:\\n\" << a << endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/snippets/tut_matrix_assignment_resizing.cpp",
    "content": "MatrixXf a(2,2);\nstd::cout << \"a is of size \" << a.rows() << \"x\" << a.cols() << std::endl;\nMatrixXf b(3,3);\na = b;\nstd::cout << \"a is now of size \" << a.rows() << \"x\" << a.cols() << std::endl;\n"
  },
  {
    "path": "3rdparty/eigen3/doc/special_examples/CMakeLists.txt",
    "content": "if(NOT EIGEN_TEST_NOQT)\n  find_package(Qt4)\n  if(QT4_FOUND)\n    include(${QT_USE_FILE})\n  endif()\nendif()\n\nif(QT4_FOUND)\n  add_executable(Tutorial_sparse_example Tutorial_sparse_example.cpp Tutorial_sparse_example_details.cpp)\n  target_link_libraries(Tutorial_sparse_example ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})\n\n  add_custom_command(\n    TARGET Tutorial_sparse_example\n    POST_BUILD\n    COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/../html/\n    COMMAND Tutorial_sparse_example ARGS ${CMAKE_CURRENT_BINARY_DIR}/../html/Tutorial_sparse_example.jpeg\n  )\n\n  add_dependencies(all_examples Tutorial_sparse_example)\nendif()\n\nif(EIGEN_COMPILER_SUPPORT_CPP11)\n  add_executable(random_cpp11 random_cpp11.cpp)\n  target_link_libraries(random_cpp11 ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO})\n  add_dependencies(all_examples random_cpp11)\n  ei_add_target_property(random_cpp11 COMPILE_FLAGS \"-std=c++11\")\n\n  add_custom_command(\n    TARGET random_cpp11\n    POST_BUILD\n    COMMAND random_cpp11\n    ARGS >${CMAKE_CURRENT_BINARY_DIR}/random_cpp11.out\n  )\nendif()\n"
  },
  {
    "path": "3rdparty/eigen3/doc/special_examples/Tutorial_sparse_example.cpp",
    "content": "#include <Eigen/Sparse>\n#include <vector>\n#include <iostream>\n\ntypedef Eigen::SparseMatrix<double> SpMat; // declares a column-major sparse matrix type of double\ntypedef Eigen::Triplet<double> T;\n\nvoid buildProblem(std::vector<T>& coefficients, Eigen::VectorXd& b, int n);\nvoid saveAsBitmap(const Eigen::VectorXd& x, int n, const char* filename);\n\nint main(int argc, char** argv)\n{\n  if(argc!=2) {\n    std::cerr << \"Error: expected one and only one argument.\\n\";\n    return -1;\n  }\n  \n  int n = 300;  // size of the image\n  int m = n*n;  // number of unknowns (=number of pixels)\n\n  // Assembly:\n  std::vector<T> coefficients;            // list of non-zeros coefficients\n  Eigen::VectorXd b(m);                   // the right hand side-vector resulting from the constraints\n  buildProblem(coefficients, b, n);\n\n  SpMat A(m,m);\n  A.setFromTriplets(coefficients.begin(), coefficients.end());\n\n  // Solving:\n  Eigen::SimplicialCholesky<SpMat> chol(A);  // performs a Cholesky factorization of A\n  Eigen::VectorXd x = chol.solve(b);         // use the factorization to solve for the given right hand side\n\n  // Export the result to a file:\n  saveAsBitmap(x, n, argv[1]);\n\n  return 0;\n}\n\n"
  },
  {
    "path": "3rdparty/eigen3/doc/special_examples/Tutorial_sparse_example_details.cpp",
    "content": "#include <Eigen/Sparse>\n#include <vector>\n#include <QImage>\n\ntypedef Eigen::SparseMatrix<double> SpMat; // declares a column-major sparse matrix type of double\ntypedef Eigen::Triplet<double> T;\n\nvoid insertCoefficient(int id, int i, int j, double w, std::vector<T>& coeffs,\n                       Eigen::VectorXd& b, const Eigen::VectorXd& boundary)\n{\n  int n = int(boundary.size());\n  int id1 = i+j*n;\n\n        if(i==-1 || i==n) b(id) -= w * boundary(j); // constrained coefficient\n  else  if(j==-1 || j==n) b(id) -= w * boundary(i); // constrained coefficient\n  else  coeffs.push_back(T(id,id1,w));              // unknown coefficient\n}\n\nvoid buildProblem(std::vector<T>& coefficients, Eigen::VectorXd& b, int n)\n{\n  b.setZero();\n  Eigen::ArrayXd boundary = Eigen::ArrayXd::LinSpaced(n, 0,M_PI).sin().pow(2);\n  for(int j=0; j<n; ++j)\n  {\n    for(int i=0; i<n; ++i)\n    {\n      int id = i+j*n;\n      insertCoefficient(id, i-1,j, -1, coefficients, b, boundary);\n      insertCoefficient(id, i+1,j, -1, coefficients, b, boundary);\n      insertCoefficient(id, i,j-1, -1, coefficients, b, boundary);\n      insertCoefficient(id, i,j+1, -1, coefficients, b, boundary);\n      insertCoefficient(id, i,j,    4, coefficients, b, boundary);\n    }\n  }\n}\n\nvoid saveAsBitmap(const Eigen::VectorXd& x, int n, const char* filename)\n{\n  Eigen::Array<unsigned char,Eigen::Dynamic,Eigen::Dynamic> bits = (x*255).cast<unsigned char>();\n  QImage img(bits.data(), n,n,QImage::Format_Indexed8);\n  img.setColorCount(256);\n  for(int i=0;i<256;i++) img.setColor(i,qRgb(i,i,i));\n  img.save(filename);\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/special_examples/random_cpp11.cpp",
    "content": "#include <Eigen/Core>\n#include <iostream>\n#include <random>\n\nusing namespace Eigen;\n\nint main() {\n  std::default_random_engine generator;\n  std::poisson_distribution<int> distribution(4.1);\n  auto poisson = [&] () {return distribution(generator);};\n\n  RowVectorXi v = RowVectorXi::NullaryExpr(10, poisson );\n  std::cout << v << \"\\n\";\n}\n"
  },
  {
    "path": "3rdparty/eigen3/doc/tutorial.cpp",
    "content": "#include <Eigen/Array>\n\nint main(int argc, char *argv[])\n{\n  std::cout.precision(2);\n\n  // demo static functions\n  Eigen::Matrix3f m3 = Eigen::Matrix3f::Random();\n  Eigen::Matrix4f m4 = Eigen::Matrix4f::Identity();\n\n  std::cout << \"*** Step 1 ***\\nm3:\\n\" << m3 << \"\\nm4:\\n\" << m4 << std::endl;\n\n  // demo non-static set... functions\n  m4.setZero();\n  m3.diagonal().setOnes();\n  \n  std::cout << \"*** Step 2 ***\\nm3:\\n\" << m3 << \"\\nm4:\\n\" << m4 << std::endl;\n\n  // demo fixed-size block() expression as lvalue and as rvalue\n  m4.block<3,3>(0,1) = m3;\n  m3.row(2) = m4.block<1,3>(2,0);\n\n  std::cout << \"*** Step 3 ***\\nm3:\\n\" << m3 << \"\\nm4:\\n\" << m4 << std::endl;\n\n  // demo dynamic-size block()\n  {\n    int rows = 3, cols = 3;\n    m4.block(0,1,3,3).setIdentity();\n    std::cout << \"*** Step 4 ***\\nm4:\\n\" << m4 << std::endl;\n  }\n\n  // demo vector blocks\n  m4.diagonal().block(1,2).setOnes();\n  std::cout << \"*** Step 5 ***\\nm4.diagonal():\\n\" << m4.diagonal() << std::endl;\n  std::cout << \"m4.diagonal().start(3)\\n\" << m4.diagonal().start(3) << std::endl;\n\n  // demo coeff-wise operations\n  m4 = m4.cwise()*m4;\n  m3 = m3.cwise().cos();\n  std::cout << \"*** Step 6 ***\\nm3:\\n\" << m3 << \"\\nm4:\\n\" << m4 << std::endl;\n\n  // sums of coefficients\n  std::cout << \"*** Step 7 ***\\n m4.sum(): \" << m4.sum() << std::endl;\n  std::cout << \"m4.col(2).sum(): \" << m4.col(2).sum() << std::endl;\n  std::cout << \"m4.colwise().sum():\\n\" << m4.colwise().sum() << std::endl;\n  std::cout << \"m4.rowwise().sum():\\n\" << m4.rowwise().sum() << std::endl;\n\n  // demo intelligent auto-evaluation\n  m4 = m4 * m4; // auto-evaluates so no aliasing problem (performance penalty is low)\n  Eigen::Matrix4f other = (m4 * m4).lazy(); // forces lazy evaluation\n  m4 = m4 + m4; // here Eigen goes for lazy evaluation, as with most expressions\n  m4 = -m4 + m4 + 5 * m4; // same here, Eigen chooses lazy evaluation for all that.\n  m4 = m4 * (m4 + m4); // here Eigen chooses to first evaluate m4 + m4 into a temporary.\n                       // indeed, here it is an optimization to cache this intermediate result.\n  m3 = m3 * m4.block<3,3>(1,1); // here Eigen chooses NOT to evaluate block() into a temporary\n    // because accessing coefficients of that block expression is not more costly than accessing\n    // coefficients of a plain matrix.\n  m4 = m4 * m4.transpose(); // same here, lazy evaluation of the transpose.\n  m4 = m4 * m4.transpose().eval(); // forces immediate evaluation of the transpose\n\n  std::cout << \"*** Step 8 ***\\nm3:\\n\" << m3 << \"\\nm4:\\n\" << m4 << std::endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/eigen3.pc.in",
    "content": "prefix=@CMAKE_INSTALL_PREFIX@\nexec_prefix=${prefix}\n\nName: Eigen3\nDescription: A C++ template library for linear algebra: vectors, matrices, and related algorithms\nRequires:\nVersion: @EIGEN_VERSION_NUMBER@\nLibs:\nCflags: -I${prefix}/@INCLUDE_INSTALL_DIR@\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/CMakeLists.txt",
    "content": "\nei_add_failtest(\"failtest_sanity_check\")\n\nei_add_failtest(\"block_nonconst_ctor_on_const_xpr_0\")\nei_add_failtest(\"block_nonconst_ctor_on_const_xpr_1\")\nei_add_failtest(\"block_nonconst_ctor_on_const_xpr_2\")\nei_add_failtest(\"transpose_nonconst_ctor_on_const_xpr\")\nei_add_failtest(\"diagonal_nonconst_ctor_on_const_xpr\")\nei_add_failtest(\"cwiseunaryview_nonconst_ctor_on_const_xpr\")\nei_add_failtest(\"triangularview_nonconst_ctor_on_const_xpr\")\nei_add_failtest(\"selfadjointview_nonconst_ctor_on_const_xpr\")\n\nei_add_failtest(\"const_qualified_block_method_retval_0\")\nei_add_failtest(\"const_qualified_block_method_retval_1\")\nei_add_failtest(\"const_qualified_transpose_method_retval\")\nei_add_failtest(\"const_qualified_diagonal_method_retval\")\n\nei_add_failtest(\"map_nonconst_ctor_on_const_ptr_0\")\nei_add_failtest(\"map_nonconst_ctor_on_const_ptr_1\")\nei_add_failtest(\"map_nonconst_ctor_on_const_ptr_2\")\nei_add_failtest(\"map_nonconst_ctor_on_const_ptr_3\")\nei_add_failtest(\"map_nonconst_ctor_on_const_ptr_4\")\n\nei_add_failtest(\"map_on_const_type_actually_const_0\")\nei_add_failtest(\"map_on_const_type_actually_const_1\")\nei_add_failtest(\"block_on_const_type_actually_const_0\")\nei_add_failtest(\"block_on_const_type_actually_const_1\")\nei_add_failtest(\"transpose_on_const_type_actually_const\")\nei_add_failtest(\"diagonal_on_const_type_actually_const\")\nei_add_failtest(\"cwiseunaryview_on_const_type_actually_const\")\nei_add_failtest(\"triangularview_on_const_type_actually_const\")\nei_add_failtest(\"selfadjointview_on_const_type_actually_const\")\n\nei_add_failtest(\"ref_1\")\nei_add_failtest(\"ref_2\")\nei_add_failtest(\"ref_3\")\nei_add_failtest(\"ref_4\")\nei_add_failtest(\"ref_5\")\n\nei_add_failtest(\"swap_1\")\nei_add_failtest(\"swap_2\")\n\nei_add_failtest(\"ternary_1\")\nei_add_failtest(\"ternary_2\")\n\nei_add_failtest(\"sparse_ref_1\")\nei_add_failtest(\"sparse_ref_2\")\nei_add_failtest(\"sparse_ref_3\")\nei_add_failtest(\"sparse_ref_4\")\nei_add_failtest(\"sparse_ref_5\")\n\nei_add_failtest(\"sparse_storage_mismatch\")\n\nei_add_failtest(\"partialpivlu_int\")\nei_add_failtest(\"fullpivlu_int\")\nei_add_failtest(\"llt_int\")\nei_add_failtest(\"ldlt_int\")\nei_add_failtest(\"qr_int\")\nei_add_failtest(\"colpivqr_int\")\nei_add_failtest(\"fullpivqr_int\")\nei_add_failtest(\"jacobisvd_int\")\nei_add_failtest(\"bdcsvd_int\")\nei_add_failtest(\"eigensolver_int\")\nei_add_failtest(\"eigensolver_cplx\")\n\nif(EIGEN_TEST_CXX11)\n  ei_add_failtest(\"initializer_list_1\")\n  ei_add_failtest(\"initializer_list_2\")\nendif()\n\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/bdcsvd_int.cpp",
    "content": "#include \"../Eigen/SVD\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define SCALAR int\n#else\n#define SCALAR float\n#endif\n\nusing namespace Eigen;\n\nint main()\n{\n  BDCSVD<Matrix<SCALAR,Dynamic,Dynamic> > qr(Matrix<SCALAR,Dynamic,Dynamic>::Random(10,10));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/block_nonconst_ctor_on_const_xpr_0.cpp",
    "content": "#include \"../Eigen/Core\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define CV_QUALIFIER const\n#else\n#define CV_QUALIFIER\n#endif\n\nusing namespace Eigen;\n\nvoid foo(CV_QUALIFIER Matrix3d &m){\n    Block<Matrix3d,3,3> b(m,0,0);\n}\n\nint main() {}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/block_nonconst_ctor_on_const_xpr_1.cpp",
    "content": "#include \"../Eigen/Core\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define CV_QUALIFIER const\n#else\n#define CV_QUALIFIER\n#endif\n\nusing namespace Eigen;\n\nvoid foo(CV_QUALIFIER Matrix3d &m){\n    Block<Matrix3d> b(m,0,0,3,3);\n}\n\nint main() {}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/block_nonconst_ctor_on_const_xpr_2.cpp",
    "content": "#include \"../Eigen/Core\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define CV_QUALIFIER const\n#else\n#define CV_QUALIFIER\n#endif\n\nusing namespace Eigen;\n\nvoid foo(CV_QUALIFIER Matrix3d &m){\n    // row/column constructor\n    Block<Matrix3d,3,1> b(m,0);\n}\n\nint main() {}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/block_on_const_type_actually_const_0.cpp",
    "content": "#include \"../Eigen/Core\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define CV_QUALIFIER const\n#else\n#define CV_QUALIFIER\n#endif\n\nusing namespace Eigen;\n\nvoid foo(){\n    Matrix3f m;\n    Block<CV_QUALIFIER Matrix3f>(m, 0, 0, 3, 3).coeffRef(0, 0) = 1.0f;\n}\n\nint main() {}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/block_on_const_type_actually_const_1.cpp",
    "content": "#include \"../Eigen/Core\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define CV_QUALIFIER const\n#else\n#define CV_QUALIFIER\n#endif\n\nusing namespace Eigen;\n\nvoid foo(){\n    MatrixXf m;\n    Block<CV_QUALIFIER MatrixXf, 3, 3>(m, 0, 0).coeffRef(0, 0) = 1.0f;\n}\n\nint main() {}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/colpivqr_int.cpp",
    "content": "#include \"../Eigen/QR\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define SCALAR int\n#else\n#define SCALAR float\n#endif\n\nusing namespace Eigen;\n\nint main()\n{\n  ColPivHouseholderQR<Matrix<SCALAR,Dynamic,Dynamic> > qr(Matrix<SCALAR,Dynamic,Dynamic>::Random(10,10));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/const_qualified_block_method_retval_0.cpp",
    "content": "#include \"../Eigen/Core\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define CV_QUALIFIER const\n#else\n#define CV_QUALIFIER\n#endif\n\nusing namespace Eigen;\n\nvoid foo(CV_QUALIFIER Matrix3d &m){\n    Block<Matrix3d,3,3> b(m.block<3,3>(0,0));\n}\n\nint main() {}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/const_qualified_block_method_retval_1.cpp",
    "content": "#include \"../Eigen/Core\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define CV_QUALIFIER const\n#else\n#define CV_QUALIFIER\n#endif\n\nusing namespace Eigen;\n\nvoid foo(CV_QUALIFIER Matrix3d &m){\n    Block<Matrix3d> b(m.block(0,0,3,3));\n}\n\nint main() {}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/const_qualified_diagonal_method_retval.cpp",
    "content": "#include \"../Eigen/Core\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define CV_QUALIFIER const\n#else\n#define CV_QUALIFIER\n#endif\n\nusing namespace Eigen;\n\nvoid foo(CV_QUALIFIER Matrix3d &m){\n    Diagonal<Matrix3d> b(m.diagonal());\n}\n\nint main() {}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/const_qualified_transpose_method_retval.cpp",
    "content": "#include \"../Eigen/Core\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define CV_QUALIFIER const\n#else\n#define CV_QUALIFIER\n#endif\n\nusing namespace Eigen;\n\nvoid foo(CV_QUALIFIER Matrix3d &m){\n    Transpose<Matrix3d> b(m.transpose());\n}\n\nint main() {}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/cwiseunaryview_nonconst_ctor_on_const_xpr.cpp",
    "content": "#include \"../Eigen/Core\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define CV_QUALIFIER const\n#else\n#define CV_QUALIFIER\n#endif\n\nusing namespace Eigen;\n\nvoid foo(CV_QUALIFIER Matrix3d &m){\n    CwiseUnaryView<internal::scalar_real_ref_op<double>,Matrix3d> t(m);\n}\n\nint main() {}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/cwiseunaryview_on_const_type_actually_const.cpp",
    "content": "#include \"../Eigen/Core\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define CV_QUALIFIER const\n#else\n#define CV_QUALIFIER\n#endif\n\nusing namespace Eigen;\n\nvoid foo(){\n    MatrixXf m;\n    CwiseUnaryView<internal::scalar_real_ref_op<double>,CV_QUALIFIER MatrixXf>(m).coeffRef(0, 0) = 1.0f;\n}\n\nint main() {}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/diagonal_nonconst_ctor_on_const_xpr.cpp",
    "content": "#include \"../Eigen/Core\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define CV_QUALIFIER const\n#else\n#define CV_QUALIFIER\n#endif\n\nusing namespace Eigen;\n\nvoid foo(CV_QUALIFIER Matrix3d &m){\n    Diagonal<Matrix3d> d(m);\n}\n\nint main() {}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/diagonal_on_const_type_actually_const.cpp",
    "content": "#include \"../Eigen/Core\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define CV_QUALIFIER const\n#else\n#define CV_QUALIFIER\n#endif\n\nusing namespace Eigen;\n\nvoid foo(){\n    MatrixXf m;\n    Diagonal<CV_QUALIFIER MatrixXf>(m).coeffRef(0) = 1.0f;\n}\n\nint main() {}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/eigensolver_cplx.cpp",
    "content": "#include \"../Eigen/Eigenvalues\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define SCALAR std::complex<double>\n#else\n#define SCALAR float\n#endif\n\nusing namespace Eigen;\n\nint main()\n{\n  EigenSolver<Matrix<SCALAR,Dynamic,Dynamic> > eig(Matrix<SCALAR,Dynamic,Dynamic>::Random(10,10));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/eigensolver_int.cpp",
    "content": "#include \"../Eigen/Eigenvalues\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define SCALAR int\n#else\n#define SCALAR float\n#endif\n\nusing namespace Eigen;\n\nint main()\n{\n  EigenSolver<Matrix<SCALAR,Dynamic,Dynamic> > eig(Matrix<SCALAR,Dynamic,Dynamic>::Random(10,10));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/failtest_sanity_check.cpp",
    "content": "#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\nThis is just some text that won't compile as a C++ file, as a basic sanity check for failtest.\n#else\nint main() {}\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/fullpivlu_int.cpp",
    "content": "#include \"../Eigen/LU\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define SCALAR int\n#else\n#define SCALAR float\n#endif\n\nusing namespace Eigen;\n\nint main()\n{\n  FullPivLU<Matrix<SCALAR,Dynamic,Dynamic> > lu(Matrix<SCALAR,Dynamic,Dynamic>::Random(10,10));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/fullpivqr_int.cpp",
    "content": "#include \"../Eigen/QR\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define SCALAR int\n#else\n#define SCALAR float\n#endif\n\nusing namespace Eigen;\n\nint main()\n{\n  FullPivHouseholderQR<Matrix<SCALAR,Dynamic,Dynamic> > qr(Matrix<SCALAR,Dynamic,Dynamic>::Random(10,10));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/initializer_list_1.cpp",
    "content": "#include \"../Eigen/Core\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define ROWS Dynamic\n#else\n#define ROWS 3\n#endif\n\nusing namespace Eigen;\n\nint main()\n{\n  Matrix<int, ROWS, 1> {1, 2, 3};\n}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/initializer_list_2.cpp",
    "content": "#include \"../Eigen/Core\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define ROWS Dynamic\n#define COLS Dynamic\n#else\n#define ROWS 3\n#define COLS 1\n#endif\n\nusing namespace Eigen;\n\nint main()\n{\n  Matrix<int, ROWS, COLS> {1, 2, 3};\n}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/jacobisvd_int.cpp",
    "content": "#include \"../Eigen/SVD\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define SCALAR int\n#else\n#define SCALAR float\n#endif\n\nusing namespace Eigen;\n\nint main()\n{\n  JacobiSVD<Matrix<SCALAR,Dynamic,Dynamic> > qr(Matrix<SCALAR,Dynamic,Dynamic>::Random(10,10));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/ldlt_int.cpp",
    "content": "#include \"../Eigen/Cholesky\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define SCALAR int\n#else\n#define SCALAR float\n#endif\n\nusing namespace Eigen;\n\nint main()\n{\n  LDLT<Matrix<SCALAR,Dynamic,Dynamic> > ldlt(Matrix<SCALAR,Dynamic,Dynamic>::Random(10,10));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/llt_int.cpp",
    "content": "#include \"../Eigen/Cholesky\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define SCALAR int\n#else\n#define SCALAR float\n#endif\n\nusing namespace Eigen;\n\nint main()\n{\n  LLT<Matrix<SCALAR,Dynamic,Dynamic> > llt(Matrix<SCALAR,Dynamic,Dynamic>::Random(10,10));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/map_nonconst_ctor_on_const_ptr_0.cpp",
    "content": "#include \"../Eigen/Core\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define CV_QUALIFIER const\n#else\n#define CV_QUALIFIER\n#endif\n\nusing namespace Eigen;\n\nvoid foo(CV_QUALIFIER float *ptr){\n    Map<Matrix3f> m(ptr);\n}\n\nint main() {}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/map_nonconst_ctor_on_const_ptr_1.cpp",
    "content": "#include \"../Eigen/Core\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define CV_QUALIFIER const\n#else\n#define CV_QUALIFIER\n#endif\n\nusing namespace Eigen;\n\nvoid foo(CV_QUALIFIER float *ptr, DenseIndex size){\n    Map<ArrayXf> m(ptr, size);\n}\n\nint main() {}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/map_nonconst_ctor_on_const_ptr_2.cpp",
    "content": "#include \"../Eigen/Core\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define CV_QUALIFIER const\n#else\n#define CV_QUALIFIER\n#endif\n\nusing namespace Eigen;\n\nvoid foo(CV_QUALIFIER float *ptr, DenseIndex rows, DenseIndex cols){\n    Map<MatrixXf> m(ptr, rows, cols);\n}\n\nint main() {}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/map_nonconst_ctor_on_const_ptr_3.cpp",
    "content": "#include \"../Eigen/Core\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define CV_QUALIFIER const\n#else\n#define CV_QUALIFIER\n#endif\n\nusing namespace Eigen;\n\nvoid foo(CV_QUALIFIER float *ptr, DenseIndex rows, DenseIndex cols){\n    Map<MatrixXf, Aligned, InnerStride<2> > m(ptr, rows, cols, InnerStride<2>());\n}\n\nint main() {}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/map_nonconst_ctor_on_const_ptr_4.cpp",
    "content": "#include \"../Eigen/Core\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define CV_QUALIFIER\n#else\n#define CV_QUALIFIER const\n#endif\n\nusing namespace Eigen;\n\nvoid foo(const float *ptr, DenseIndex rows, DenseIndex cols){\n    Map<CV_QUALIFIER MatrixXf, Unaligned, OuterStride<> > m(ptr, rows, cols, OuterStride<>(2));\n}\n\nint main() {}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/map_on_const_type_actually_const_0.cpp",
    "content": "#include \"../Eigen/Core\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define CV_QUALIFIER const\n#else\n#define CV_QUALIFIER\n#endif\n\nusing namespace Eigen;\n\nvoid foo(float *ptr){\n    Map<CV_QUALIFIER MatrixXf>(ptr, 1, 1).coeffRef(0,0) = 1.0f;\n}\n\nint main() {}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/map_on_const_type_actually_const_1.cpp",
    "content": "#include \"../Eigen/Core\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define CV_QUALIFIER const\n#else\n#define CV_QUALIFIER\n#endif\n\nusing namespace Eigen;\n\nvoid foo(float *ptr){\n    Map<CV_QUALIFIER Vector3f>(ptr).coeffRef(0) = 1.0f;\n}\n\nint main() {}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/partialpivlu_int.cpp",
    "content": "#include \"../Eigen/LU\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define SCALAR int\n#else\n#define SCALAR float\n#endif\n\nusing namespace Eigen;\n\nint main()\n{\n  PartialPivLU<Matrix<SCALAR,Dynamic,Dynamic> > lu(Matrix<SCALAR,Dynamic,Dynamic>::Random(10,10));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/qr_int.cpp",
    "content": "#include \"../Eigen/QR\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define SCALAR int\n#else\n#define SCALAR float\n#endif\n\nusing namespace Eigen;\n\nint main()\n{\n  HouseholderQR<Matrix<SCALAR,Dynamic,Dynamic> > qr(Matrix<SCALAR,Dynamic,Dynamic>::Random(10,10));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/ref_1.cpp",
    "content": "#include \"../Eigen/Core\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define CV_QUALIFIER const\n#else\n#define CV_QUALIFIER\n#endif\n\nusing namespace Eigen;\n\nvoid call_ref(Ref<VectorXf> a) { }\n\nint main()\n{\n  VectorXf a(10);\n  CV_QUALIFIER VectorXf& ac(a);\n  call_ref(ac);\n}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/ref_2.cpp",
    "content": "#include \"../Eigen/Core\"\n\nusing namespace Eigen;\n\nvoid call_ref(Ref<VectorXf> a) { }\n\nint main()\n{\n  MatrixXf A(10,10);\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n  call_ref(A.row(3));\n#else\n  call_ref(A.col(3));\n#endif\n}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/ref_3.cpp",
    "content": "#include \"../Eigen/Core\"\n\nusing namespace Eigen;\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\nvoid call_ref(Ref<VectorXf> a) { }\n#else\nvoid call_ref(const Ref<const VectorXf> &a) { }\n#endif\n\nint main()\n{\n  VectorXf a(10);\n  call_ref(a+a);\n}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/ref_4.cpp",
    "content": "#include \"../Eigen/Core\"\n\nusing namespace Eigen;\n\nvoid call_ref(Ref<MatrixXf,0,OuterStride<> > a) {}\n\nint main()\n{\n  MatrixXf A(10,10);\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n  call_ref(A.transpose());\n#else\n  call_ref(A);\n#endif\n}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/ref_5.cpp",
    "content": "#include \"../Eigen/Core\"\n\nusing namespace Eigen;\n\nvoid call_ref(Ref<VectorXf> a) { }\n\nint main()\n{\n  VectorXf a(10);\n  DenseBase<VectorXf> &ac(a);\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n  call_ref(ac);\n#else\n  call_ref(ac.derived());\n#endif\n}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/selfadjointview_nonconst_ctor_on_const_xpr.cpp",
    "content": "#include \"../Eigen/Core\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define CV_QUALIFIER const\n#else\n#define CV_QUALIFIER\n#endif\n\nusing namespace Eigen;\n\nvoid foo(CV_QUALIFIER Matrix3d &m){\n    SelfAdjointView<Matrix3d,Upper> t(m);\n}\n\nint main() {}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/selfadjointview_on_const_type_actually_const.cpp",
    "content": "#include \"../Eigen/Core\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define CV_QUALIFIER const\n#else\n#define CV_QUALIFIER\n#endif\n\nusing namespace Eigen;\n\nvoid foo(){\n    MatrixXf m;\n    SelfAdjointView<CV_QUALIFIER MatrixXf,Upper>(m).coeffRef(0, 0) = 1.0f;\n}\n\nint main() {}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/sparse_ref_1.cpp",
    "content": "#include \"../Eigen/Sparse\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define CV_QUALIFIER const\n#else\n#define CV_QUALIFIER\n#endif\n\nusing namespace Eigen;\n\nvoid call_ref(Ref<SparseMatrix<float> > a) { }\n\nint main()\n{\n  SparseMatrix<float> a(10,10);\n  CV_QUALIFIER SparseMatrix<float>& ac(a);\n  call_ref(ac);\n}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/sparse_ref_2.cpp",
    "content": "#include \"../Eigen/Sparse\"\n\nusing namespace Eigen;\n\nvoid call_ref(Ref<SparseMatrix<float> > a) { }\n\nint main()\n{\n  SparseMatrix<float> A(10,10);\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n  call_ref(A.row(3));\n#else\n  call_ref(A.col(3));\n#endif\n}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/sparse_ref_3.cpp",
    "content": "#include \"../Eigen/Sparse\"\n\nusing namespace Eigen;\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\nvoid call_ref(Ref<SparseMatrix<float> > a) { }\n#else\nvoid call_ref(const Ref<const SparseMatrix<float> > &a) { }\n#endif\n\nint main()\n{\n  SparseMatrix<float> a(10,10);\n  call_ref(a+a);\n}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/sparse_ref_4.cpp",
    "content": "#include \"../Eigen/Sparse\"\n\nusing namespace Eigen;\n\nvoid call_ref(Ref<SparseMatrix<float> > a) {}\n\nint main()\n{\n  SparseMatrix<float> A(10,10);\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n  call_ref(A.transpose());\n#else\n  call_ref(A);\n#endif\n}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/sparse_ref_5.cpp",
    "content": "#include \"../Eigen/Sparse\"\n\nusing namespace Eigen;\n\nvoid call_ref(Ref<SparseMatrix<float> > a) { }\n\nint main()\n{\n  SparseMatrix<float> a(10,10);\n  SparseMatrixBase<SparseMatrix<float> > &ac(a);\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n  call_ref(ac);\n#else\n  call_ref(ac.derived());\n#endif\n}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/sparse_storage_mismatch.cpp",
    "content": "#include \"../Eigen/Sparse\"\nusing namespace Eigen;\n\ntypedef SparseMatrix<double,ColMajor> Mat1;\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\ntypedef SparseMatrix<double,RowMajor> Mat2;\n#else\ntypedef SparseMatrix<double,ColMajor> Mat2;\n#endif\n\nint main()\n{\n  Mat1 a(10,10);\n  Mat2 b(10,10);\n  a += b;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/swap_1.cpp",
    "content": "#include \"../Eigen/Core\"\n\nusing namespace Eigen;\n\nint main()\n{\n  VectorXf a(10), b(10);\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n  const DenseBase<VectorXf> &ac(a);\n#else\n  DenseBase<VectorXf> &ac(a);\n#endif\n  b.swap(ac);\n}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/swap_2.cpp",
    "content": "#include \"../Eigen/Core\"\n\nusing namespace Eigen;\n\nint main()\n{\n  VectorXf a(10), b(10);\n  VectorXf const &ac(a);\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n  b.swap(ac);\n#else\n  b.swap(ac.const_cast_derived());\n#endif\n}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/ternary_1.cpp",
    "content": "#include \"../Eigen/Core\"\n\nusing namespace Eigen;\n\nint main(int argc,char **)\n{\n  VectorXf a(10), b(10);\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n  b = argc>1 ? 2*a : -a;\n#else\n  b = argc>1 ? 2*a : VectorXf(-a);\n#endif\n}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/ternary_2.cpp",
    "content": "#include \"../Eigen/Core\"\n\nusing namespace Eigen;\n\nint main(int argc,char **)\n{\n  VectorXf a(10), b(10);\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n  b = argc>1 ? 2*a : a+a;\n#else\n  b = argc>1 ? VectorXf(2*a) : VectorXf(a+a);\n#endif\n}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/transpose_nonconst_ctor_on_const_xpr.cpp",
    "content": "#include \"../Eigen/Core\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define CV_QUALIFIER const\n#else\n#define CV_QUALIFIER\n#endif\n\nusing namespace Eigen;\n\nvoid foo(CV_QUALIFIER Matrix3d &m){\n    Transpose<Matrix3d> t(m);\n}\n\nint main() {}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/transpose_on_const_type_actually_const.cpp",
    "content": "#include \"../Eigen/Core\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define CV_QUALIFIER const\n#else\n#define CV_QUALIFIER\n#endif\n\nusing namespace Eigen;\n\nvoid foo(){\n    MatrixXf m;\n    Transpose<CV_QUALIFIER MatrixXf>(m).coeffRef(0, 0) = 1.0f;\n}\n\nint main() {}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/triangularview_nonconst_ctor_on_const_xpr.cpp",
    "content": "#include \"../Eigen/Core\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define CV_QUALIFIER const\n#else\n#define CV_QUALIFIER\n#endif\n\nusing namespace Eigen;\n\nvoid foo(CV_QUALIFIER Matrix3d &m){\n  TriangularView<Matrix3d,Upper> t(m);\n}\n\nint main() {}\n"
  },
  {
    "path": "3rdparty/eigen3/failtest/triangularview_on_const_type_actually_const.cpp",
    "content": "#include \"../Eigen/Core\"\n\n#ifdef EIGEN_SHOULD_FAIL_TO_BUILD\n#define CV_QUALIFIER const\n#else\n#define CV_QUALIFIER\n#endif\n\nusing namespace Eigen;\n\nvoid foo(){\n    MatrixXf m;\n    TriangularView<CV_QUALIFIER MatrixXf,Upper>(m).coeffRef(0, 0) = 1.0f;\n}\n\nint main() {}\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/CMakeLists.txt",
    "content": "\nproject(EigenLapack CXX)\n\ninclude(\"../cmake/language_support.cmake\")\n\nworkaround_9220(Fortran EIGEN_Fortran_COMPILER_WORKS)\n\nif(EIGEN_Fortran_COMPILER_WORKS)\n  enable_language(Fortran OPTIONAL)\n  if(NOT CMAKE_Fortran_COMPILER)\n    set(EIGEN_Fortran_COMPILER_WORKS OFF)\n  endif()\nendif()\n\nadd_custom_target(lapack)\ninclude_directories(../blas)\n\nset(EigenLapack_SRCS\nsingle.cpp double.cpp complex_single.cpp complex_double.cpp ../blas/xerbla.cpp\n)\n\nif(EIGEN_Fortran_COMPILER_WORKS)\n\nset(EigenLapack_SRCS  ${EigenLapack_SRCS}\n  slarft.f  dlarft.f  clarft.f  zlarft.f\n  slarfb.f  dlarfb.f  clarfb.f  zlarfb.f\n  slarfg.f  dlarfg.f  clarfg.f  zlarfg.f\n  slarf.f   dlarf.f   clarf.f   zlarf.f\n  sladiv.f  dladiv.f  cladiv.f  zladiv.f\n  ilaslr.f  iladlr.f  ilaclr.f  ilazlr.f\n  ilaslc.f  iladlc.f  ilaclc.f  ilazlc.f\n  dlapy2.f  dlapy3.f  slapy2.f  slapy3.f\n  clacgv.f  zlacgv.f\n  slamch.f  dlamch.f\n  second_NONE.f dsecnd_NONE.f\n)\n\noption(EIGEN_ENABLE_LAPACK_TESTS OFF \"Enable the Lapack unit tests\")\n\nif(EIGEN_ENABLE_LAPACK_TESTS)\n\n  get_filename_component(eigen_full_path_to_reference_lapack \"./reference/\" ABSOLUTE)\n  if(NOT EXISTS ${eigen_full_path_to_reference_lapack})\n    # Download lapack and install sources and testing at the right place\n    message(STATUS \"Download lapack_addons_3.4.1.tgz...\")\n    \n    file(DOWNLOAD \"http://downloads.tuxfamily.org/eigen/lapack_addons_3.4.1.tgz\"\n                  \"${CMAKE_CURRENT_SOURCE_DIR}/lapack_addons_3.4.1.tgz\"\n                  INACTIVITY_TIMEOUT 15\n                  TIMEOUT 240\n                  STATUS download_status\n                  EXPECTED_MD5 ab5742640617e3221a873aba44bbdc93\n                  SHOW_PROGRESS)\n                  \n    message(STATUS ${download_status})\n    list(GET download_status 0 download_status_num)\n    set(download_status_num 0)\n    if(download_status_num EQUAL 0)\n      message(STATUS \"Setup lapack reference and lapack unit tests\")\n      execute_process(COMMAND tar xzf  \"lapack_addons_3.4.1.tgz\" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})\n    else()\n      message(STATUS \"Download of lapack_addons_3.4.1.tgz failed, LAPACK unit tests won't be enabled\")\n      set(EIGEN_ENABLE_LAPACK_TESTS false)\n    endif()\n                  \n  endif()\n  \n  get_filename_component(eigen_full_path_to_reference_lapack \"./reference/\" ABSOLUTE)\n  if(EXISTS ${eigen_full_path_to_reference_lapack})\n    set(EigenLapack_funcfilenames\n        ssyev.f   dsyev.f   csyev.f   zsyev.f\n        spotrf.f  dpotrf.f  cpotrf.f  zpotrf.f\n        spotrs.f  dpotrs.f  cpotrs.f  zpotrs.f\n        sgetrf.f  dgetrf.f  cgetrf.f  zgetrf.f\n        sgetrs.f  dgetrs.f  cgetrs.f  zgetrs.f)\n    \n    file(GLOB ReferenceLapack_SRCS0 RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} \"reference/*.f\")\n    foreach(filename1 IN LISTS ReferenceLapack_SRCS0)\n      string(REPLACE \"reference/\" \"\" filename ${filename1})\n      list(FIND EigenLapack_SRCS ${filename} id1)\n      list(FIND EigenLapack_funcfilenames ${filename} id2)\n      if((id1 EQUAL -1) AND (id2 EQUAL -1))\n        set(ReferenceLapack_SRCS ${ReferenceLapack_SRCS} reference/${filename})\n      endif()\n    endforeach()\n  endif()\n  \n  \nendif()\n\nendif()\n\nadd_library(eigen_lapack_static ${EigenLapack_SRCS} ${ReferenceLapack_SRCS})\nadd_library(eigen_lapack SHARED ${EigenLapack_SRCS})\n\ntarget_link_libraries(eigen_lapack  eigen_blas)\n\nif(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO)\n  target_link_libraries(eigen_lapack_static ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO})\n  target_link_libraries(eigen_lapack        ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO})\nendif()\n\nadd_dependencies(lapack eigen_lapack eigen_lapack_static)\n\ninstall(TARGETS eigen_lapack eigen_lapack_static\n        RUNTIME DESTINATION bin\n        LIBRARY DESTINATION lib\n        ARCHIVE DESTINATION lib)\n\n        \n        \nget_filename_component(eigen_full_path_to_testing_lapack \"./testing/\" ABSOLUTE)\nif(EXISTS ${eigen_full_path_to_testing_lapack})\n  \n  # The following comes from lapack/TESTING/CMakeLists.txt\n  # Get Python\n  find_package(PythonInterp)\n  message(STATUS \"Looking for Python found - ${PYTHONINTERP_FOUND}\")\n  if (PYTHONINTERP_FOUND)\n    message(STATUS \"Using Python version ${PYTHON_VERSION_STRING}\")\n  endif()\n\n  set(LAPACK_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})\n  set(LAPACK_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})\n  set(BUILD_SINGLE      true)\n  set(BUILD_DOUBLE      true)\n  set(BUILD_COMPLEX     true)\n  set(BUILD_COMPLEX16E  true)\n  \n  if(MSVC_VERSION)\n#  string(REPLACE \"/STACK:10000000\" \"/STACK:900000000000000000\"\n#    CMAKE_EXE_LINKER_FLAGS \"${CMAKE_EXE_LINKER_FLAGS}\")\n  string(REGEX REPLACE \"(.*)/STACK:(.*) (.*)\" \"\\\\1/STACK:900000000000000000 \\\\3\"\n    CMAKE_EXE_LINKER_FLAGS \"${CMAKE_EXE_LINKER_FLAGS}\")\n  endif()\n  file(MAKE_DIRECTORY \"${LAPACK_BINARY_DIR}/TESTING\")\n  add_subdirectory(testing/MATGEN)\n  add_subdirectory(testing/LIN)\n  add_subdirectory(testing/EIG)\n  cmake_policy(SET CMP0026 OLD)\n  macro(add_lapack_test output input target)\n    set(TEST_INPUT \"${LAPACK_SOURCE_DIR}/testing/${input}\")\n    set(TEST_OUTPUT \"${LAPACK_BINARY_DIR}/TESTING/${output}\")\n    get_target_property(TEST_LOC ${target} LOCATION)\n    string(REPLACE \".\" \"_\" input_name ${input})\n    set(testName \"${target}_${input_name}\")\n    if(EXISTS \"${TEST_INPUT}\")\n      add_test(LAPACK-${testName} \"${CMAKE_COMMAND}\"\n        -DTEST=${TEST_LOC}\n        -DINPUT=${TEST_INPUT} \n        -DOUTPUT=${TEST_OUTPUT} \n        -DINTDIR=${CMAKE_CFG_INTDIR}\n        -P \"${LAPACK_SOURCE_DIR}/testing/runtest.cmake\")\n    endif()\n  endmacro()\n\n  if (BUILD_SINGLE)\n  add_lapack_test(stest.out stest.in xlintsts)\n  #\n  # ======== SINGLE RFP LIN TESTS ========================\n  add_lapack_test(stest_rfp.out stest_rfp.in xlintstrfs)\n  #\n  #\n  # ======== SINGLE EIG TESTS ===========================\n  #\n\n  add_lapack_test(snep.out nep.in xeigtsts)\n\n\n  add_lapack_test(ssep.out sep.in xeigtsts)\n\n\n  add_lapack_test(ssvd.out svd.in xeigtsts)\n\n\n  add_lapack_test(sec.out sec.in xeigtsts)\n\n\n  add_lapack_test(sed.out sed.in xeigtsts)\n\n\n  add_lapack_test(sgg.out sgg.in xeigtsts)\n\n\n  add_lapack_test(sgd.out sgd.in xeigtsts)\n\n\n  add_lapack_test(ssb.out ssb.in xeigtsts)\n\n\n  add_lapack_test(ssg.out ssg.in xeigtsts)\n\n\n  add_lapack_test(sbal.out sbal.in xeigtsts)\n\n\n  add_lapack_test(sbak.out sbak.in xeigtsts)\n\n\n  add_lapack_test(sgbal.out sgbal.in xeigtsts)\n\n\n  add_lapack_test(sgbak.out sgbak.in xeigtsts)\n\n\n  add_lapack_test(sbb.out sbb.in xeigtsts)\n\n\n  add_lapack_test(sglm.out glm.in xeigtsts)\n\n\n  add_lapack_test(sgqr.out gqr.in xeigtsts)\n\n\n  add_lapack_test(sgsv.out gsv.in xeigtsts)\n\n\n  add_lapack_test(scsd.out csd.in xeigtsts)\n\n\n  add_lapack_test(slse.out lse.in xeigtsts)\n  endif()\n\n  if (BUILD_DOUBLE)\n  #\n  # ======== DOUBLE LIN TESTS ===========================\n  add_lapack_test(dtest.out dtest.in xlintstd)\n  #\n  # ======== DOUBLE RFP LIN TESTS ========================\n  add_lapack_test(dtest_rfp.out dtest_rfp.in xlintstrfd)\n  #\n  # ======== DOUBLE EIG TESTS ===========================\n\n  add_lapack_test(dnep.out nep.in xeigtstd)\n\n\n  add_lapack_test(dsep.out sep.in xeigtstd)\n\n\n  add_lapack_test(dsvd.out svd.in xeigtstd)\n\n\n  add_lapack_test(dec.out dec.in xeigtstd)\n\n\n  add_lapack_test(ded.out ded.in xeigtstd)\n\n\n  add_lapack_test(dgg.out dgg.in xeigtstd)\n\n\n  add_lapack_test(dgd.out dgd.in xeigtstd)\n\n\n  add_lapack_test(dsb.out dsb.in xeigtstd)\n\n\n  add_lapack_test(dsg.out dsg.in xeigtstd)\n\n\n  add_lapack_test(dbal.out dbal.in xeigtstd)\n\n\n  add_lapack_test(dbak.out dbak.in xeigtstd)\n\n\n  add_lapack_test(dgbal.out dgbal.in xeigtstd)\n\n\n  add_lapack_test(dgbak.out dgbak.in xeigtstd)\n\n\n  add_lapack_test(dbb.out dbb.in xeigtstd)\n\n\n  add_lapack_test(dglm.out glm.in xeigtstd)\n\n\n  add_lapack_test(dgqr.out gqr.in xeigtstd)\n\n\n  add_lapack_test(dgsv.out gsv.in xeigtstd)\n\n\n  add_lapack_test(dcsd.out csd.in xeigtstd)\n\n\n  add_lapack_test(dlse.out lse.in xeigtstd)\n  endif()\n\n  if (BUILD_COMPLEX)\n  add_lapack_test(ctest.out ctest.in xlintstc)\n  #\n  # ======== COMPLEX RFP LIN TESTS ========================\n  add_lapack_test(ctest_rfp.out ctest_rfp.in xlintstrfc)\n  #\n  # ======== COMPLEX EIG TESTS ===========================\n\n  add_lapack_test(cnep.out nep.in xeigtstc)\n\n\n  add_lapack_test(csep.out sep.in xeigtstc)\n\n\n  add_lapack_test(csvd.out svd.in xeigtstc)\n\n\n  add_lapack_test(cec.out cec.in xeigtstc)\n\n\n  add_lapack_test(ced.out ced.in xeigtstc)\n\n\n  add_lapack_test(cgg.out cgg.in xeigtstc)\n\n\n  add_lapack_test(cgd.out cgd.in xeigtstc)\n\n\n  add_lapack_test(csb.out csb.in xeigtstc)\n\n\n  add_lapack_test(csg.out csg.in xeigtstc)\n\n\n  add_lapack_test(cbal.out cbal.in xeigtstc)\n\n\n  add_lapack_test(cbak.out cbak.in xeigtstc)\n\n\n  add_lapack_test(cgbal.out cgbal.in xeigtstc)\n\n\n  add_lapack_test(cgbak.out cgbak.in xeigtstc)\n\n\n  add_lapack_test(cbb.out cbb.in xeigtstc)\n\n\n  add_lapack_test(cglm.out glm.in xeigtstc)\n\n\n  add_lapack_test(cgqr.out gqr.in xeigtstc)\n\n\n  add_lapack_test(cgsv.out gsv.in xeigtstc)\n\n\n  add_lapack_test(ccsd.out csd.in xeigtstc)\n\n\n  add_lapack_test(clse.out lse.in xeigtstc)\n  endif()\n\n  if (BUILD_COMPLEX16)\n  #\n  # ======== COMPLEX16 LIN TESTS ========================\n  add_lapack_test(ztest.out ztest.in xlintstz)\n  #\n  # ======== COMPLEX16 RFP LIN TESTS ========================\n  add_lapack_test(ztest_rfp.out ztest_rfp.in xlintstrfz)\n  #\n  # ======== COMPLEX16 EIG TESTS ===========================\n\n  add_lapack_test(znep.out nep.in xeigtstz)\n\n\n  add_lapack_test(zsep.out sep.in xeigtstz)\n\n\n  add_lapack_test(zsvd.out svd.in xeigtstz)\n\n\n  add_lapack_test(zec.out zec.in xeigtstz)\n\n\n  add_lapack_test(zed.out zed.in xeigtstz)\n\n\n  add_lapack_test(zgg.out zgg.in xeigtstz)\n\n\n  add_lapack_test(zgd.out zgd.in xeigtstz)\n\n\n  add_lapack_test(zsb.out zsb.in xeigtstz)\n\n\n  add_lapack_test(zsg.out zsg.in xeigtstz)\n\n\n  add_lapack_test(zbal.out zbal.in xeigtstz)\n\n\n  add_lapack_test(zbak.out zbak.in xeigtstz)\n\n\n  add_lapack_test(zgbal.out zgbal.in xeigtstz)\n\n\n  add_lapack_test(zgbak.out zgbak.in xeigtstz)\n\n\n  add_lapack_test(zbb.out zbb.in xeigtstz)\n\n\n  add_lapack_test(zglm.out glm.in xeigtstz)\n\n\n  add_lapack_test(zgqr.out gqr.in xeigtstz)\n\n\n  add_lapack_test(zgsv.out gsv.in xeigtstz)\n\n\n  add_lapack_test(zcsd.out csd.in xeigtstz)\n\n\n  add_lapack_test(zlse.out lse.in xeigtstz)\n  endif()\n\n\n  if (BUILD_SIMPLE)\n      if (BUILD_DOUBLE)\n  #\n  # ======== SINGLE-DOUBLE PROTO LIN TESTS ==============\n          add_lapack_test(dstest.out dstest.in xlintstds)\n      endif()\n  endif()\n\n\n  if (BUILD_COMPLEX)\n      if (BUILD_COMPLEX16)\n  #\n  # ======== COMPLEX-COMPLEX16 LIN TESTS ========================\n          add_lapack_test(zctest.out zctest.in xlintstzc)\n      endif()\n  endif()\n\n  # ==============================================================================\n\n  execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${LAPACK_SOURCE_DIR}/testing/lapack_testing.py ${LAPACK_BINARY_DIR})\n  add_test(\n    NAME LAPACK_Test_Summary\n    WORKING_DIRECTORY ${LAPACK_BINARY_DIR}\n    COMMAND ${PYTHON_EXECUTABLE} \"lapack_testing.py\"\n  )\n\nendif()\n\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/cholesky.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010-2011 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"lapack_common.h\"\n#include <Eigen/Cholesky>\n\n// POTRF computes the Cholesky factorization of a real symmetric positive definite matrix A.\nEIGEN_LAPACK_FUNC(potrf,(char* uplo, int *n, RealScalar *pa, int *lda, int *info))\n{\n  *info = 0;\n        if(UPLO(*uplo)==INVALID) *info = -1;\n  else  if(*n<0)                 *info = -2;\n  else  if(*lda<std::max(1,*n))  *info = -4;\n  if(*info!=0)\n  {\n    int e = -*info;\n    return xerbla_(SCALAR_SUFFIX_UP\"POTRF\", &e, 6);\n  }\n\n  Scalar* a = reinterpret_cast<Scalar*>(pa);\n  MatrixType A(a,*n,*n,*lda);\n  int ret;\n  if(UPLO(*uplo)==UP) ret = int(internal::llt_inplace<Scalar, Upper>::blocked(A));\n  else                ret = int(internal::llt_inplace<Scalar, Lower>::blocked(A));\n\n  if(ret>=0)\n    *info = ret+1;\n  \n  return 0;\n}\n\n// POTRS solves a system of linear equations A*X = B with a symmetric\n// positive definite matrix A using the Cholesky factorization\n// A = U**T*U or A = L*L**T computed by DPOTRF.\nEIGEN_LAPACK_FUNC(potrs,(char* uplo, int *n, int *nrhs, RealScalar *pa, int *lda, RealScalar *pb, int *ldb, int *info))\n{\n  *info = 0;\n        if(UPLO(*uplo)==INVALID) *info = -1;\n  else  if(*n<0)                 *info = -2;\n  else  if(*nrhs<0)              *info = -3;\n  else  if(*lda<std::max(1,*n))  *info = -5;\n  else  if(*ldb<std::max(1,*n))  *info = -7;\n  if(*info!=0)\n  {\n    int e = -*info;\n    return xerbla_(SCALAR_SUFFIX_UP\"POTRS\", &e, 6);\n  }\n\n  Scalar* a = reinterpret_cast<Scalar*>(pa);\n  Scalar* b = reinterpret_cast<Scalar*>(pb);\n  MatrixType A(a,*n,*n,*lda);\n  MatrixType B(b,*n,*nrhs,*ldb);\n\n  if(UPLO(*uplo)==UP)\n  {\n    A.triangularView<Upper>().adjoint().solveInPlace(B);\n    A.triangularView<Upper>().solveInPlace(B);\n  }\n  else\n  {\n    A.triangularView<Lower>().solveInPlace(B);\n    A.triangularView<Lower>().adjoint().solveInPlace(B);\n  }\n\n  return 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/clacgv.f",
    "content": "*> \\brief \\b CLACGV\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*> \\htmlonly\n*> Download CLACGV + dependencies \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/clacgv.f\"> \n*> [TGZ]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/clacgv.f\"> \n*> [ZIP]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/clacgv.f\"> \n*> [TXT]</a>\n*> \\endhtmlonly \n*\n*  Definition:\n*  ===========\n*\n*       SUBROUTINE CLACGV( N, X, INCX )\n* \n*       .. Scalar Arguments ..\n*       INTEGER            INCX, N\n*       ..\n*       .. Array Arguments ..\n*       COMPLEX            X( * )\n*       ..\n*  \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> CLACGV conjugates a complex vector of length N.\n*> \\endverbatim\n*\n*  Arguments:\n*  ==========\n*\n*> \\param[in] N\n*> \\verbatim\n*>          N is INTEGER\n*>          The length of the vector X.  N >= 0.\n*> \\endverbatim\n*>\n*> \\param[in,out] X\n*> \\verbatim\n*>          X is COMPLEX array, dimension\n*>                         (1+(N-1)*abs(INCX))\n*>          On entry, the vector of length N to be conjugated.\n*>          On exit, X is overwritten with conjg(X).\n*> \\endverbatim\n*>\n*> \\param[in] INCX\n*> \\verbatim\n*>          INCX is INTEGER\n*>          The spacing between successive elements of X.\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date November 2011\n*\n*> \\ingroup complexOTHERauxiliary\n*\n*  =====================================================================\n      SUBROUTINE CLACGV( N, X, INCX )\n*\n*  -- LAPACK auxiliary routine (version 3.4.0) --\n*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     November 2011\n*\n*     .. Scalar Arguments ..\n      INTEGER            INCX, N\n*     ..\n*     .. Array Arguments ..\n      COMPLEX            X( * )\n*     ..\n*\n* =====================================================================\n*\n*     .. Local Scalars ..\n      INTEGER            I, IOFF\n*     ..\n*     .. Intrinsic Functions ..\n      INTRINSIC          CONJG\n*     ..\n*     .. Executable Statements ..\n*\n      IF( INCX.EQ.1 ) THEN\n         DO 10 I = 1, N\n            X( I ) = CONJG( X( I ) )\n   10    CONTINUE\n      ELSE\n         IOFF = 1\n         IF( INCX.LT.0 )\n     $      IOFF = 1 - ( N-1 )*INCX\n         DO 20 I = 1, N\n            X( IOFF ) = CONJG( X( IOFF ) )\n            IOFF = IOFF + INCX\n   20    CONTINUE\n      END IF\n      RETURN\n*\n*     End of CLACGV\n*\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/cladiv.f",
    "content": "*> \\brief \\b CLADIV\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*> \\htmlonly\n*> Download CLADIV + dependencies \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/cladiv.f\"> \n*> [TGZ]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/cladiv.f\"> \n*> [ZIP]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/cladiv.f\"> \n*> [TXT]</a>\n*> \\endhtmlonly \n*\n*  Definition:\n*  ===========\n*\n*       COMPLEX FUNCTION CLADIV( X, Y )\n* \n*       .. Scalar Arguments ..\n*       COMPLEX            X, Y\n*       ..\n*  \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> CLADIV := X / Y, where X and Y are complex.  The computation of X / Y\n*> will not overflow on an intermediary step unless the results\n*> overflows.\n*> \\endverbatim\n*\n*  Arguments:\n*  ==========\n*\n*> \\param[in] X\n*> \\verbatim\n*>          X is COMPLEX\n*> \\endverbatim\n*>\n*> \\param[in] Y\n*> \\verbatim\n*>          Y is COMPLEX\n*>          The complex scalars X and Y.\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date November 2011\n*\n*> \\ingroup complexOTHERauxiliary\n*\n*  =====================================================================\n      COMPLEX FUNCTION CLADIV( X, Y )\n*\n*  -- LAPACK auxiliary routine (version 3.4.0) --\n*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     November 2011\n*\n*     .. Scalar Arguments ..\n      COMPLEX            X, Y\n*     ..\n*\n*  =====================================================================\n*\n*     .. Local Scalars ..\n      REAL               ZI, ZR\n*     ..\n*     .. External Subroutines ..\n      EXTERNAL           SLADIV\n*     ..\n*     .. Intrinsic Functions ..\n      INTRINSIC          AIMAG, CMPLX, REAL\n*     ..\n*     .. Executable Statements ..\n*\n      CALL SLADIV( REAL( X ), AIMAG( X ), REAL( Y ), AIMAG( Y ), ZR,\n     $             ZI )\n      CLADIV = CMPLX( ZR, ZI )\n*\n      RETURN\n*\n*     End of CLADIV\n*\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/clarf.f",
    "content": "*> \\brief \\b CLARF\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*> \\htmlonly\n*> Download CLARF + dependencies \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/clarf.f\"> \n*> [TGZ]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/clarf.f\"> \n*> [ZIP]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/clarf.f\"> \n*> [TXT]</a>\n*> \\endhtmlonly \n*\n*  Definition:\n*  ===========\n*\n*       SUBROUTINE CLARF( SIDE, M, N, V, INCV, TAU, C, LDC, WORK )\n* \n*       .. Scalar Arguments ..\n*       CHARACTER          SIDE\n*       INTEGER            INCV, LDC, M, N\n*       COMPLEX            TAU\n*       ..\n*       .. Array Arguments ..\n*       COMPLEX            C( LDC, * ), V( * ), WORK( * )\n*       ..\n*  \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> CLARF applies a complex elementary reflector H to a complex M-by-N\n*> matrix C, from either the left or the right. H is represented in the\n*> form\n*>\n*>       H = I - tau * v * v**H\n*>\n*> where tau is a complex scalar and v is a complex vector.\n*>\n*> If tau = 0, then H is taken to be the unit matrix.\n*>\n*> To apply H**H (the conjugate transpose of H), supply conjg(tau) instead\n*> tau.\n*> \\endverbatim\n*\n*  Arguments:\n*  ==========\n*\n*> \\param[in] SIDE\n*> \\verbatim\n*>          SIDE is CHARACTER*1\n*>          = 'L': form  H * C\n*>          = 'R': form  C * H\n*> \\endverbatim\n*>\n*> \\param[in] M\n*> \\verbatim\n*>          M is INTEGER\n*>          The number of rows of the matrix C.\n*> \\endverbatim\n*>\n*> \\param[in] N\n*> \\verbatim\n*>          N is INTEGER\n*>          The number of columns of the matrix C.\n*> \\endverbatim\n*>\n*> \\param[in] V\n*> \\verbatim\n*>          V is COMPLEX array, dimension\n*>                     (1 + (M-1)*abs(INCV)) if SIDE = 'L'\n*>                  or (1 + (N-1)*abs(INCV)) if SIDE = 'R'\n*>          The vector v in the representation of H. V is not used if\n*>          TAU = 0.\n*> \\endverbatim\n*>\n*> \\param[in] INCV\n*> \\verbatim\n*>          INCV is INTEGER\n*>          The increment between elements of v. INCV <> 0.\n*> \\endverbatim\n*>\n*> \\param[in] TAU\n*> \\verbatim\n*>          TAU is COMPLEX\n*>          The value tau in the representation of H.\n*> \\endverbatim\n*>\n*> \\param[in,out] C\n*> \\verbatim\n*>          C is COMPLEX array, dimension (LDC,N)\n*>          On entry, the M-by-N matrix C.\n*>          On exit, C is overwritten by the matrix H * C if SIDE = 'L',\n*>          or C * H if SIDE = 'R'.\n*> \\endverbatim\n*>\n*> \\param[in] LDC\n*> \\verbatim\n*>          LDC is INTEGER\n*>          The leading dimension of the array C. LDC >= max(1,M).\n*> \\endverbatim\n*>\n*> \\param[out] WORK\n*> \\verbatim\n*>          WORK is COMPLEX array, dimension\n*>                         (N) if SIDE = 'L'\n*>                      or (M) if SIDE = 'R'\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date November 2011\n*\n*> \\ingroup complexOTHERauxiliary\n*\n*  =====================================================================\n      SUBROUTINE CLARF( SIDE, M, N, V, INCV, TAU, C, LDC, WORK )\n*\n*  -- LAPACK auxiliary routine (version 3.4.0) --\n*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     November 2011\n*\n*     .. Scalar Arguments ..\n      CHARACTER          SIDE\n      INTEGER            INCV, LDC, M, N\n      COMPLEX            TAU\n*     ..\n*     .. Array Arguments ..\n      COMPLEX            C( LDC, * ), V( * ), WORK( * )\n*     ..\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      COMPLEX            ONE, ZERO\n      PARAMETER          ( ONE = ( 1.0E+0, 0.0E+0 ),\n     $                   ZERO = ( 0.0E+0, 0.0E+0 ) )\n*     ..\n*     .. Local Scalars ..\n      LOGICAL            APPLYLEFT\n      INTEGER            I, LASTV, LASTC\n*     ..\n*     .. External Subroutines ..\n      EXTERNAL           CGEMV, CGERC\n*     ..\n*     .. External Functions ..\n      LOGICAL            LSAME\n      INTEGER            ILACLR, ILACLC\n      EXTERNAL           LSAME, ILACLR, ILACLC\n*     ..\n*     .. Executable Statements ..\n*\n      APPLYLEFT = LSAME( SIDE, 'L' )\n      LASTV = 0\n      LASTC = 0\n      IF( TAU.NE.ZERO ) THEN\n!     Set up variables for scanning V.  LASTV begins pointing to the end\n!     of V.\n         IF( APPLYLEFT ) THEN\n            LASTV = M\n         ELSE\n            LASTV = N\n         END IF\n         IF( INCV.GT.0 ) THEN\n            I = 1 + (LASTV-1) * INCV\n         ELSE\n            I = 1\n         END IF\n!     Look for the last non-zero row in V.\n         DO WHILE( LASTV.GT.0 .AND. V( I ).EQ.ZERO )\n            LASTV = LASTV - 1\n            I = I - INCV\n         END DO\n         IF( APPLYLEFT ) THEN\n!     Scan for the last non-zero column in C(1:lastv,:).\n            LASTC = ILACLC(LASTV, N, C, LDC)\n         ELSE\n!     Scan for the last non-zero row in C(:,1:lastv).\n            LASTC = ILACLR(M, LASTV, C, LDC)\n         END IF\n      END IF\n!     Note that lastc.eq.0 renders the BLAS operations null; no special\n!     case is needed at this level.\n      IF( APPLYLEFT ) THEN\n*\n*        Form  H * C\n*\n         IF( LASTV.GT.0 ) THEN\n*\n*           w(1:lastc,1) := C(1:lastv,1:lastc)**H * v(1:lastv,1)\n*\n            CALL CGEMV( 'Conjugate transpose', LASTV, LASTC, ONE,\n     $           C, LDC, V, INCV, ZERO, WORK, 1 )\n*\n*           C(1:lastv,1:lastc) := C(...) - v(1:lastv,1) * w(1:lastc,1)**H\n*\n            CALL CGERC( LASTV, LASTC, -TAU, V, INCV, WORK, 1, C, LDC )\n         END IF\n      ELSE\n*\n*        Form  C * H\n*\n         IF( LASTV.GT.0 ) THEN\n*\n*           w(1:lastc,1) := C(1:lastc,1:lastv) * v(1:lastv,1)\n*\n            CALL CGEMV( 'No transpose', LASTC, LASTV, ONE, C, LDC,\n     $           V, INCV, ZERO, WORK, 1 )\n*\n*           C(1:lastc,1:lastv) := C(...) - w(1:lastc,1) * v(1:lastv,1)**H\n*\n            CALL CGERC( LASTC, LASTV, -TAU, WORK, 1, V, INCV, C, LDC )\n         END IF\n      END IF\n      RETURN\n*\n*     End of CLARF\n*\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/clarfb.f",
    "content": "*> \\brief \\b CLARFB\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*> \\htmlonly\n*> Download CLARFB + dependencies \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/clarfb.f\"> \n*> [TGZ]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/clarfb.f\"> \n*> [ZIP]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/clarfb.f\"> \n*> [TXT]</a>\n*> \\endhtmlonly \n*\n*  Definition:\n*  ===========\n*\n*       SUBROUTINE CLARFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV,\n*                          T, LDT, C, LDC, WORK, LDWORK )\n* \n*       .. Scalar Arguments ..\n*       CHARACTER          DIRECT, SIDE, STOREV, TRANS\n*       INTEGER            K, LDC, LDT, LDV, LDWORK, M, N\n*       ..\n*       .. Array Arguments ..\n*       COMPLEX            C( LDC, * ), T( LDT, * ), V( LDV, * ),\n*      $                   WORK( LDWORK, * )\n*       ..\n*  \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> CLARFB applies a complex block reflector H or its transpose H**H to a\n*> complex M-by-N matrix C, from either the left or the right.\n*> \\endverbatim\n*\n*  Arguments:\n*  ==========\n*\n*> \\param[in] SIDE\n*> \\verbatim\n*>          SIDE is CHARACTER*1\n*>          = 'L': apply H or H**H from the Left\n*>          = 'R': apply H or H**H from the Right\n*> \\endverbatim\n*>\n*> \\param[in] TRANS\n*> \\verbatim\n*>          TRANS is CHARACTER*1\n*>          = 'N': apply H (No transpose)\n*>          = 'C': apply H**H (Conjugate transpose)\n*> \\endverbatim\n*>\n*> \\param[in] DIRECT\n*> \\verbatim\n*>          DIRECT is CHARACTER*1\n*>          Indicates how H is formed from a product of elementary\n*>          reflectors\n*>          = 'F': H = H(1) H(2) . . . H(k) (Forward)\n*>          = 'B': H = H(k) . . . H(2) H(1) (Backward)\n*> \\endverbatim\n*>\n*> \\param[in] STOREV\n*> \\verbatim\n*>          STOREV is CHARACTER*1\n*>          Indicates how the vectors which define the elementary\n*>          reflectors are stored:\n*>          = 'C': Columnwise\n*>          = 'R': Rowwise\n*> \\endverbatim\n*>\n*> \\param[in] M\n*> \\verbatim\n*>          M is INTEGER\n*>          The number of rows of the matrix C.\n*> \\endverbatim\n*>\n*> \\param[in] N\n*> \\verbatim\n*>          N is INTEGER\n*>          The number of columns of the matrix C.\n*> \\endverbatim\n*>\n*> \\param[in] K\n*> \\verbatim\n*>          K is INTEGER\n*>          The order of the matrix T (= the number of elementary\n*>          reflectors whose product defines the block reflector).\n*> \\endverbatim\n*>\n*> \\param[in] V\n*> \\verbatim\n*>          V is COMPLEX array, dimension\n*>                                (LDV,K) if STOREV = 'C'\n*>                                (LDV,M) if STOREV = 'R' and SIDE = 'L'\n*>                                (LDV,N) if STOREV = 'R' and SIDE = 'R'\n*>          The matrix V. See Further Details.\n*> \\endverbatim\n*>\n*> \\param[in] LDV\n*> \\verbatim\n*>          LDV is INTEGER\n*>          The leading dimension of the array V.\n*>          If STOREV = 'C' and SIDE = 'L', LDV >= max(1,M);\n*>          if STOREV = 'C' and SIDE = 'R', LDV >= max(1,N);\n*>          if STOREV = 'R', LDV >= K.\n*> \\endverbatim\n*>\n*> \\param[in] T\n*> \\verbatim\n*>          T is COMPLEX array, dimension (LDT,K)\n*>          The triangular K-by-K matrix T in the representation of the\n*>          block reflector.\n*> \\endverbatim\n*>\n*> \\param[in] LDT\n*> \\verbatim\n*>          LDT is INTEGER\n*>          The leading dimension of the array T. LDT >= K.\n*> \\endverbatim\n*>\n*> \\param[in,out] C\n*> \\verbatim\n*>          C is COMPLEX array, dimension (LDC,N)\n*>          On entry, the M-by-N matrix C.\n*>          On exit, C is overwritten by H*C or H**H*C or C*H or C*H**H.\n*> \\endverbatim\n*>\n*> \\param[in] LDC\n*> \\verbatim\n*>          LDC is INTEGER\n*>          The leading dimension of the array C. LDC >= max(1,M).\n*> \\endverbatim\n*>\n*> \\param[out] WORK\n*> \\verbatim\n*>          WORK is COMPLEX array, dimension (LDWORK,K)\n*> \\endverbatim\n*>\n*> \\param[in] LDWORK\n*> \\verbatim\n*>          LDWORK is INTEGER\n*>          The leading dimension of the array WORK.\n*>          If SIDE = 'L', LDWORK >= max(1,N);\n*>          if SIDE = 'R', LDWORK >= max(1,M).\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date November 2011\n*\n*> \\ingroup complexOTHERauxiliary\n*\n*> \\par Further Details:\n*  =====================\n*>\n*> \\verbatim\n*>\n*>  The shape of the matrix V and the storage of the vectors which define\n*>  the H(i) is best illustrated by the following example with n = 5 and\n*>  k = 3. The elements equal to 1 are not stored; the corresponding\n*>  array elements are modified but restored on exit. The rest of the\n*>  array is not used.\n*>\n*>  DIRECT = 'F' and STOREV = 'C':         DIRECT = 'F' and STOREV = 'R':\n*>\n*>               V = (  1       )                 V = (  1 v1 v1 v1 v1 )\n*>                   ( v1  1    )                     (     1 v2 v2 v2 )\n*>                   ( v1 v2  1 )                     (        1 v3 v3 )\n*>                   ( v1 v2 v3 )\n*>                   ( v1 v2 v3 )\n*>\n*>  DIRECT = 'B' and STOREV = 'C':         DIRECT = 'B' and STOREV = 'R':\n*>\n*>               V = ( v1 v2 v3 )                 V = ( v1 v1  1       )\n*>                   ( v1 v2 v3 )                     ( v2 v2 v2  1    )\n*>                   (  1 v2 v3 )                     ( v3 v3 v3 v3  1 )\n*>                   (     1 v3 )\n*>                   (        1 )\n*> \\endverbatim\n*>\n*  =====================================================================\n      SUBROUTINE CLARFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV,\n     $                   T, LDT, C, LDC, WORK, LDWORK )\n*\n*  -- LAPACK auxiliary routine (version 3.4.0) --\n*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     November 2011\n*\n*     .. Scalar Arguments ..\n      CHARACTER          DIRECT, SIDE, STOREV, TRANS\n      INTEGER            K, LDC, LDT, LDV, LDWORK, M, N\n*     ..\n*     .. Array Arguments ..\n      COMPLEX            C( LDC, * ), T( LDT, * ), V( LDV, * ),\n     $                   WORK( LDWORK, * )\n*     ..\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      COMPLEX            ONE\n      PARAMETER          ( ONE = ( 1.0E+0, 0.0E+0 ) )\n*     ..\n*     .. Local Scalars ..\n      CHARACTER          TRANST\n      INTEGER            I, J, LASTV, LASTC\n*     ..\n*     .. External Functions ..\n      LOGICAL            LSAME\n      INTEGER            ILACLR, ILACLC\n      EXTERNAL           LSAME, ILACLR, ILACLC\n*     ..\n*     .. External Subroutines ..\n      EXTERNAL           CCOPY, CGEMM, CLACGV, CTRMM\n*     ..\n*     .. Intrinsic Functions ..\n      INTRINSIC          CONJG\n*     ..\n*     .. Executable Statements ..\n*\n*     Quick return if possible\n*\n      IF( M.LE.0 .OR. N.LE.0 )\n     $   RETURN\n*\n      IF( LSAME( TRANS, 'N' ) ) THEN\n         TRANST = 'C'\n      ELSE\n         TRANST = 'N'\n      END IF\n*\n      IF( LSAME( STOREV, 'C' ) ) THEN\n*\n         IF( LSAME( DIRECT, 'F' ) ) THEN\n*\n*           Let  V =  ( V1 )    (first K rows)\n*                     ( V2 )\n*           where  V1  is unit lower triangular.\n*\n            IF( LSAME( SIDE, 'L' ) ) THEN\n*\n*              Form  H * C  or  H**H * C  where  C = ( C1 )\n*                                                    ( C2 )\n*\n               LASTV = MAX( K, ILACLR( M, K, V, LDV ) )\n               LASTC = ILACLC( LASTV, N, C, LDC )\n*\n*              W := C**H * V  =  (C1**H * V1 + C2**H * V2)  (stored in WORK)\n*\n*              W := C1**H\n*\n               DO 10 J = 1, K\n                  CALL CCOPY( LASTC, C( J, 1 ), LDC, WORK( 1, J ), 1 )\n                  CALL CLACGV( LASTC, WORK( 1, J ), 1 )\n   10          CONTINUE\n*\n*              W := W * V1\n*\n               CALL CTRMM( 'Right', 'Lower', 'No transpose', 'Unit',\n     $              LASTC, K, ONE, V, LDV, WORK, LDWORK )\n               IF( LASTV.GT.K ) THEN\n*\n*                 W := W + C2**H *V2\n*\n                  CALL CGEMM( 'Conjugate transpose', 'No transpose',\n     $                 LASTC, K, LASTV-K, ONE, C( K+1, 1 ), LDC,\n     $                 V( K+1, 1 ), LDV, ONE, WORK, LDWORK )\n               END IF\n*\n*              W := W * T**H  or  W * T\n*\n               CALL CTRMM( 'Right', 'Upper', TRANST, 'Non-unit',\n     $              LASTC, K, ONE, T, LDT, WORK, LDWORK )\n*\n*              C := C - V * W**H\n*\n               IF( M.GT.K ) THEN\n*\n*                 C2 := C2 - V2 * W**H\n*\n                  CALL CGEMM( 'No transpose', 'Conjugate transpose',\n     $                 LASTV-K, LASTC, K, -ONE, V( K+1, 1 ), LDV,\n     $                 WORK, LDWORK, ONE, C( K+1, 1 ), LDC )\n               END IF\n*\n*              W := W * V1**H\n*\n               CALL CTRMM( 'Right', 'Lower', 'Conjugate transpose',\n     $              'Unit', LASTC, K, ONE, V, LDV, WORK, LDWORK )\n*\n*              C1 := C1 - W**H\n*\n               DO 30 J = 1, K\n                  DO 20 I = 1, LASTC\n                     C( J, I ) = C( J, I ) - CONJG( WORK( I, J ) )\n   20             CONTINUE\n   30          CONTINUE\n*\n            ELSE IF( LSAME( SIDE, 'R' ) ) THEN\n*\n*              Form  C * H  or  C * H**H  where  C = ( C1  C2 )\n*\n               LASTV = MAX( K, ILACLR( N, K, V, LDV ) )\n               LASTC = ILACLR( M, LASTV, C, LDC )\n*\n*              W := C * V  =  (C1*V1 + C2*V2)  (stored in WORK)\n*\n*              W := C1\n*\n               DO 40 J = 1, K\n                  CALL CCOPY( LASTC, C( 1, J ), 1, WORK( 1, J ), 1 )\n   40          CONTINUE\n*\n*              W := W * V1\n*\n               CALL CTRMM( 'Right', 'Lower', 'No transpose', 'Unit',\n     $              LASTC, K, ONE, V, LDV, WORK, LDWORK )\n               IF( LASTV.GT.K ) THEN\n*\n*                 W := W + C2 * V2\n*\n                  CALL CGEMM( 'No transpose', 'No transpose',\n     $                 LASTC, K, LASTV-K,\n     $                 ONE, C( 1, K+1 ), LDC, V( K+1, 1 ), LDV,\n     $                 ONE, WORK, LDWORK )\n               END IF\n*\n*              W := W * T  or  W * T**H\n*\n               CALL CTRMM( 'Right', 'Upper', TRANS, 'Non-unit',\n     $              LASTC, K, ONE, T, LDT, WORK, LDWORK )\n*\n*              C := C - W * V**H\n*\n               IF( LASTV.GT.K ) THEN\n*\n*                 C2 := C2 - W * V2**H\n*\n                  CALL CGEMM( 'No transpose', 'Conjugate transpose',\n     $                 LASTC, LASTV-K, K,\n     $                 -ONE, WORK, LDWORK, V( K+1, 1 ), LDV,\n     $                 ONE, C( 1, K+1 ), LDC )\n               END IF\n*\n*              W := W * V1**H\n*\n               CALL CTRMM( 'Right', 'Lower', 'Conjugate transpose',\n     $              'Unit', LASTC, K, ONE, V, LDV, WORK, LDWORK )\n*\n*              C1 := C1 - W\n*\n               DO 60 J = 1, K\n                  DO 50 I = 1, LASTC\n                     C( I, J ) = C( I, J ) - WORK( I, J )\n   50             CONTINUE\n   60          CONTINUE\n            END IF\n*\n         ELSE\n*\n*           Let  V =  ( V1 )\n*                     ( V2 )    (last K rows)\n*           where  V2  is unit upper triangular.\n*\n            IF( LSAME( SIDE, 'L' ) ) THEN\n*\n*              Form  H * C  or  H**H * C  where  C = ( C1 )\n*                                                    ( C2 )\n*\n               LASTV = MAX( K, ILACLR( M, K, V, LDV ) )\n               LASTC = ILACLC( LASTV, N, C, LDC )\n*\n*              W := C**H * V  =  (C1**H * V1 + C2**H * V2)  (stored in WORK)\n*\n*              W := C2**H\n*\n               DO 70 J = 1, K\n                  CALL CCOPY( LASTC, C( LASTV-K+J, 1 ), LDC,\n     $                 WORK( 1, J ), 1 )\n                  CALL CLACGV( LASTC, WORK( 1, J ), 1 )\n   70          CONTINUE\n*\n*              W := W * V2\n*\n               CALL CTRMM( 'Right', 'Upper', 'No transpose', 'Unit',\n     $              LASTC, K, ONE, V( LASTV-K+1, 1 ), LDV,\n     $              WORK, LDWORK )\n               IF( LASTV.GT.K ) THEN\n*\n*                 W := W + C1**H*V1\n*\n                  CALL CGEMM( 'Conjugate transpose', 'No transpose',\n     $                 LASTC, K, LASTV-K, ONE, C, LDC, V, LDV,\n     $                 ONE, WORK, LDWORK )\n               END IF\n*\n*              W := W * T**H  or  W * T\n*\n               CALL CTRMM( 'Right', 'Lower', TRANST, 'Non-unit',\n     $              LASTC, K, ONE, T, LDT, WORK, LDWORK )\n*\n*              C := C - V * W**H\n*\n               IF( LASTV.GT.K ) THEN\n*\n*                 C1 := C1 - V1 * W**H\n*\n                  CALL CGEMM( 'No transpose', 'Conjugate transpose',\n     $                 LASTV-K, LASTC, K, -ONE, V, LDV, WORK, LDWORK,\n     $                 ONE, C, LDC )\n               END IF\n*\n*              W := W * V2**H\n*\n               CALL CTRMM( 'Right', 'Upper', 'Conjugate transpose',\n     $              'Unit', LASTC, K, ONE, V( LASTV-K+1, 1 ), LDV,\n     $              WORK, LDWORK )\n*\n*              C2 := C2 - W**H\n*\n               DO 90 J = 1, K\n                  DO 80 I = 1, LASTC\n                     C( LASTV-K+J, I ) = C( LASTV-K+J, I ) -\n     $                               CONJG( WORK( I, J ) )\n   80             CONTINUE\n   90          CONTINUE\n*\n            ELSE IF( LSAME( SIDE, 'R' ) ) THEN\n*\n*              Form  C * H  or  C * H**H  where  C = ( C1  C2 )\n*\n               LASTV = MAX( K, ILACLR( N, K, V, LDV ) )\n               LASTC = ILACLR( M, LASTV, C, LDC )\n*\n*              W := C * V  =  (C1*V1 + C2*V2)  (stored in WORK)\n*\n*              W := C2\n*\n               DO 100 J = 1, K\n                  CALL CCOPY( LASTC, C( 1, LASTV-K+J ), 1,\n     $                 WORK( 1, J ), 1 )\n  100          CONTINUE\n*\n*              W := W * V2\n*\n               CALL CTRMM( 'Right', 'Upper', 'No transpose', 'Unit',\n     $              LASTC, K, ONE, V( LASTV-K+1, 1 ), LDV,\n     $              WORK, LDWORK )\n               IF( LASTV.GT.K ) THEN\n*\n*                 W := W + C1 * V1\n*\n                  CALL CGEMM( 'No transpose', 'No transpose',\n     $                 LASTC, K, LASTV-K,\n     $                 ONE, C, LDC, V, LDV, ONE, WORK, LDWORK )\n               END IF\n*\n*              W := W * T  or  W * T**H\n*\n               CALL CTRMM( 'Right', 'Lower', TRANS, 'Non-unit',\n     $              LASTC, K, ONE, T, LDT, WORK, LDWORK )\n*\n*              C := C - W * V**H\n*\n               IF( LASTV.GT.K ) THEN\n*\n*                 C1 := C1 - W * V1**H\n*\n                  CALL CGEMM( 'No transpose', 'Conjugate transpose',\n     $                 LASTC, LASTV-K, K, -ONE, WORK, LDWORK, V, LDV,\n     $                 ONE, C, LDC )\n               END IF\n*\n*              W := W * V2**H\n*\n               CALL CTRMM( 'Right', 'Upper', 'Conjugate transpose',\n     $              'Unit', LASTC, K, ONE, V( LASTV-K+1, 1 ), LDV,\n     $              WORK, LDWORK )\n*\n*              C2 := C2 - W\n*\n               DO 120 J = 1, K\n                  DO 110 I = 1, LASTC\n                     C( I, LASTV-K+J ) = C( I, LASTV-K+J )\n     $                    - WORK( I, J )\n  110             CONTINUE\n  120          CONTINUE\n            END IF\n         END IF\n*\n      ELSE IF( LSAME( STOREV, 'R' ) ) THEN\n*\n         IF( LSAME( DIRECT, 'F' ) ) THEN\n*\n*           Let  V =  ( V1  V2 )    (V1: first K columns)\n*           where  V1  is unit upper triangular.\n*\n            IF( LSAME( SIDE, 'L' ) ) THEN\n*\n*              Form  H * C  or  H**H * C  where  C = ( C1 )\n*                                                    ( C2 )\n*\n               LASTV = MAX( K, ILACLC( K, M, V, LDV ) )\n               LASTC = ILACLC( LASTV, N, C, LDC )\n*\n*              W := C**H * V**H  =  (C1**H * V1**H + C2**H * V2**H) (stored in WORK)\n*\n*              W := C1**H\n*\n               DO 130 J = 1, K\n                  CALL CCOPY( LASTC, C( J, 1 ), LDC, WORK( 1, J ), 1 )\n                  CALL CLACGV( LASTC, WORK( 1, J ), 1 )\n  130          CONTINUE\n*\n*              W := W * V1**H\n*\n               CALL CTRMM( 'Right', 'Upper', 'Conjugate transpose',\n     $                     'Unit', LASTC, K, ONE, V, LDV, WORK, LDWORK )\n               IF( LASTV.GT.K ) THEN\n*\n*                 W := W + C2**H*V2**H\n*\n                  CALL CGEMM( 'Conjugate transpose',\n     $                 'Conjugate transpose', LASTC, K, LASTV-K,\n     $                 ONE, C( K+1, 1 ), LDC, V( 1, K+1 ), LDV,\n     $                 ONE, WORK, LDWORK )\n               END IF\n*\n*              W := W * T**H  or  W * T\n*\n               CALL CTRMM( 'Right', 'Upper', TRANST, 'Non-unit',\n     $              LASTC, K, ONE, T, LDT, WORK, LDWORK )\n*\n*              C := C - V**H * W**H\n*\n               IF( LASTV.GT.K ) THEN\n*\n*                 C2 := C2 - V2**H * W**H\n*\n                  CALL CGEMM( 'Conjugate transpose',\n     $                 'Conjugate transpose', LASTV-K, LASTC, K,\n     $                 -ONE, V( 1, K+1 ), LDV, WORK, LDWORK,\n     $                 ONE, C( K+1, 1 ), LDC )\n               END IF\n*\n*              W := W * V1\n*\n               CALL CTRMM( 'Right', 'Upper', 'No transpose', 'Unit',\n     $              LASTC, K, ONE, V, LDV, WORK, LDWORK )\n*\n*              C1 := C1 - W**H\n*\n               DO 150 J = 1, K\n                  DO 140 I = 1, LASTC\n                     C( J, I ) = C( J, I ) - CONJG( WORK( I, J ) )\n  140             CONTINUE\n  150          CONTINUE\n*\n            ELSE IF( LSAME( SIDE, 'R' ) ) THEN\n*\n*              Form  C * H  or  C * H**H  where  C = ( C1  C2 )\n*\n               LASTV = MAX( K, ILACLC( K, N, V, LDV ) )\n               LASTC = ILACLR( M, LASTV, C, LDC )\n*\n*              W := C * V**H  =  (C1*V1**H + C2*V2**H)  (stored in WORK)\n*\n*              W := C1\n*\n               DO 160 J = 1, K\n                  CALL CCOPY( LASTC, C( 1, J ), 1, WORK( 1, J ), 1 )\n  160          CONTINUE\n*\n*              W := W * V1**H\n*\n               CALL CTRMM( 'Right', 'Upper', 'Conjugate transpose',\n     $                     'Unit', LASTC, K, ONE, V, LDV, WORK, LDWORK )\n               IF( LASTV.GT.K ) THEN\n*\n*                 W := W + C2 * V2**H\n*\n                  CALL CGEMM( 'No transpose', 'Conjugate transpose',\n     $                 LASTC, K, LASTV-K, ONE, C( 1, K+1 ), LDC,\n     $                 V( 1, K+1 ), LDV, ONE, WORK, LDWORK )\n               END IF\n*\n*              W := W * T  or  W * T**H\n*\n               CALL CTRMM( 'Right', 'Upper', TRANS, 'Non-unit',\n     $              LASTC, K, ONE, T, LDT, WORK, LDWORK )\n*\n*              C := C - W * V\n*\n               IF( LASTV.GT.K ) THEN\n*\n*                 C2 := C2 - W * V2\n*\n                  CALL CGEMM( 'No transpose', 'No transpose',\n     $                 LASTC, LASTV-K, K,\n     $                 -ONE, WORK, LDWORK, V( 1, K+1 ), LDV,\n     $                 ONE, C( 1, K+1 ), LDC )\n               END IF\n*\n*              W := W * V1\n*\n               CALL CTRMM( 'Right', 'Upper', 'No transpose', 'Unit',\n     $              LASTC, K, ONE, V, LDV, WORK, LDWORK )\n*\n*              C1 := C1 - W\n*\n               DO 180 J = 1, K\n                  DO 170 I = 1, LASTC\n                     C( I, J ) = C( I, J ) - WORK( I, J )\n  170             CONTINUE\n  180          CONTINUE\n*\n            END IF\n*\n         ELSE\n*\n*           Let  V =  ( V1  V2 )    (V2: last K columns)\n*           where  V2  is unit lower triangular.\n*\n            IF( LSAME( SIDE, 'L' ) ) THEN\n*\n*              Form  H * C  or  H**H * C  where  C = ( C1 )\n*                                                    ( C2 )\n*\n               LASTV = MAX( K, ILACLC( K, M, V, LDV ) )\n               LASTC = ILACLC( LASTV, N, C, LDC )\n*\n*              W := C**H * V**H  =  (C1**H * V1**H + C2**H * V2**H) (stored in WORK)\n*\n*              W := C2**H\n*\n               DO 190 J = 1, K\n                  CALL CCOPY( LASTC, C( LASTV-K+J, 1 ), LDC,\n     $                 WORK( 1, J ), 1 )\n                  CALL CLACGV( LASTC, WORK( 1, J ), 1 )\n  190          CONTINUE\n*\n*              W := W * V2**H\n*\n               CALL CTRMM( 'Right', 'Lower', 'Conjugate transpose',\n     $              'Unit', LASTC, K, ONE, V( 1, LASTV-K+1 ), LDV,\n     $              WORK, LDWORK )\n               IF( LASTV.GT.K ) THEN\n*\n*                 W := W + C1**H * V1**H\n*\n                  CALL CGEMM( 'Conjugate transpose',\n     $                 'Conjugate transpose', LASTC, K, LASTV-K,\n     $                 ONE, C, LDC, V, LDV, ONE, WORK, LDWORK )\n               END IF\n*\n*              W := W * T**H  or  W * T\n*\n               CALL CTRMM( 'Right', 'Lower', TRANST, 'Non-unit',\n     $              LASTC, K, ONE, T, LDT, WORK, LDWORK )\n*\n*              C := C - V**H * W**H\n*\n               IF( LASTV.GT.K ) THEN\n*\n*                 C1 := C1 - V1**H * W**H\n*\n                  CALL CGEMM( 'Conjugate transpose',\n     $                 'Conjugate transpose', LASTV-K, LASTC, K,\n     $                 -ONE, V, LDV, WORK, LDWORK, ONE, C, LDC )\n               END IF\n*\n*              W := W * V2\n*\n               CALL CTRMM( 'Right', 'Lower', 'No transpose', 'Unit',\n     $              LASTC, K, ONE, V( 1, LASTV-K+1 ), LDV,\n     $              WORK, LDWORK )\n*\n*              C2 := C2 - W**H\n*\n               DO 210 J = 1, K\n                  DO 200 I = 1, LASTC\n                     C( LASTV-K+J, I ) = C( LASTV-K+J, I ) -\n     $                               CONJG( WORK( I, J ) )\n  200             CONTINUE\n  210          CONTINUE\n*\n            ELSE IF( LSAME( SIDE, 'R' ) ) THEN\n*\n*              Form  C * H  or  C * H**H  where  C = ( C1  C2 )\n*\n               LASTV = MAX( K, ILACLC( K, N, V, LDV ) )\n               LASTC = ILACLR( M, LASTV, C, LDC )\n*\n*              W := C * V**H  =  (C1*V1**H + C2*V2**H)  (stored in WORK)\n*\n*              W := C2\n*\n               DO 220 J = 1, K\n                  CALL CCOPY( LASTC, C( 1, LASTV-K+J ), 1,\n     $                 WORK( 1, J ), 1 )\n  220          CONTINUE\n*\n*              W := W * V2**H\n*\n               CALL CTRMM( 'Right', 'Lower', 'Conjugate transpose',\n     $              'Unit', LASTC, K, ONE, V( 1, LASTV-K+1 ), LDV,\n     $              WORK, LDWORK )\n               IF( LASTV.GT.K ) THEN\n*\n*                 W := W + C1 * V1**H\n*\n                  CALL CGEMM( 'No transpose', 'Conjugate transpose',\n     $                 LASTC, K, LASTV-K, ONE, C, LDC, V, LDV, ONE,\n     $                 WORK, LDWORK )\n               END IF\n*\n*              W := W * T  or  W * T**H\n*\n               CALL CTRMM( 'Right', 'Lower', TRANS, 'Non-unit',\n     $              LASTC, K, ONE, T, LDT, WORK, LDWORK )\n*\n*              C := C - W * V\n*\n               IF( LASTV.GT.K ) THEN\n*\n*                 C1 := C1 - W * V1\n*\n                  CALL CGEMM( 'No transpose', 'No transpose',\n     $                 LASTC, LASTV-K, K, -ONE, WORK, LDWORK, V, LDV,\n     $                 ONE, C, LDC )\n               END IF\n*\n*              W := W * V2\n*\n               CALL CTRMM( 'Right', 'Lower', 'No transpose', 'Unit',\n     $              LASTC, K, ONE, V( 1, LASTV-K+1 ), LDV,\n     $              WORK, LDWORK )\n*\n*              C1 := C1 - W\n*\n               DO 240 J = 1, K\n                  DO 230 I = 1, LASTC\n                     C( I, LASTV-K+J ) = C( I, LASTV-K+J )\n     $                    - WORK( I, J )\n  230             CONTINUE\n  240          CONTINUE\n*\n            END IF\n*\n         END IF\n      END IF\n*\n      RETURN\n*\n*     End of CLARFB\n*\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/clarfg.f",
    "content": "*> \\brief \\b CLARFG\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*> \\htmlonly\n*> Download CLARFG + dependencies \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/clarfg.f\"> \n*> [TGZ]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/clarfg.f\"> \n*> [ZIP]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/clarfg.f\"> \n*> [TXT]</a>\n*> \\endhtmlonly \n*\n*  Definition:\n*  ===========\n*\n*       SUBROUTINE CLARFG( N, ALPHA, X, INCX, TAU )\n* \n*       .. Scalar Arguments ..\n*       INTEGER            INCX, N\n*       COMPLEX            ALPHA, TAU\n*       ..\n*       .. Array Arguments ..\n*       COMPLEX            X( * )\n*       ..\n*  \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> CLARFG generates a complex elementary reflector H of order n, such\n*> that\n*>\n*>       H**H * ( alpha ) = ( beta ),   H**H * H = I.\n*>              (   x   )   (   0  )\n*>\n*> where alpha and beta are scalars, with beta real, and x is an\n*> (n-1)-element complex vector. H is represented in the form\n*>\n*>       H = I - tau * ( 1 ) * ( 1 v**H ) ,\n*>                     ( v )\n*>\n*> where tau is a complex scalar and v is a complex (n-1)-element\n*> vector. Note that H is not hermitian.\n*>\n*> If the elements of x are all zero and alpha is real, then tau = 0\n*> and H is taken to be the unit matrix.\n*>\n*> Otherwise  1 <= real(tau) <= 2  and  abs(tau-1) <= 1 .\n*> \\endverbatim\n*\n*  Arguments:\n*  ==========\n*\n*> \\param[in] N\n*> \\verbatim\n*>          N is INTEGER\n*>          The order of the elementary reflector.\n*> \\endverbatim\n*>\n*> \\param[in,out] ALPHA\n*> \\verbatim\n*>          ALPHA is COMPLEX\n*>          On entry, the value alpha.\n*>          On exit, it is overwritten with the value beta.\n*> \\endverbatim\n*>\n*> \\param[in,out] X\n*> \\verbatim\n*>          X is COMPLEX array, dimension\n*>                         (1+(N-2)*abs(INCX))\n*>          On entry, the vector x.\n*>          On exit, it is overwritten with the vector v.\n*> \\endverbatim\n*>\n*> \\param[in] INCX\n*> \\verbatim\n*>          INCX is INTEGER\n*>          The increment between elements of X. INCX > 0.\n*> \\endverbatim\n*>\n*> \\param[out] TAU\n*> \\verbatim\n*>          TAU is COMPLEX\n*>          The value tau.\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date November 2011\n*\n*> \\ingroup complexOTHERauxiliary\n*\n*  =====================================================================\n      SUBROUTINE CLARFG( N, ALPHA, X, INCX, TAU )\n*\n*  -- LAPACK auxiliary routine (version 3.4.0) --\n*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     November 2011\n*\n*     .. Scalar Arguments ..\n      INTEGER            INCX, N\n      COMPLEX            ALPHA, TAU\n*     ..\n*     .. Array Arguments ..\n      COMPLEX            X( * )\n*     ..\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      REAL               ONE, ZERO\n      PARAMETER          ( ONE = 1.0E+0, ZERO = 0.0E+0 )\n*     ..\n*     .. Local Scalars ..\n      INTEGER            J, KNT\n      REAL               ALPHI, ALPHR, BETA, RSAFMN, SAFMIN, XNORM\n*     ..\n*     .. External Functions ..\n      REAL               SCNRM2, SLAMCH, SLAPY3\n      COMPLEX            CLADIV\n      EXTERNAL           SCNRM2, SLAMCH, SLAPY3, CLADIV\n*     ..\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, AIMAG, CMPLX, REAL, SIGN\n*     ..\n*     .. External Subroutines ..\n      EXTERNAL           CSCAL, CSSCAL\n*     ..\n*     .. Executable Statements ..\n*\n      IF( N.LE.0 ) THEN\n         TAU = ZERO\n         RETURN\n      END IF\n*\n      XNORM = SCNRM2( N-1, X, INCX )\n      ALPHR = REAL( ALPHA )\n      ALPHI = AIMAG( ALPHA )\n*\n      IF( XNORM.EQ.ZERO .AND. ALPHI.EQ.ZERO ) THEN\n*\n*        H  =  I\n*\n         TAU = ZERO\n      ELSE\n*\n*        general case\n*\n         BETA = -SIGN( SLAPY3( ALPHR, ALPHI, XNORM ), ALPHR )\n         SAFMIN = SLAMCH( 'S' ) / SLAMCH( 'E' )\n         RSAFMN = ONE / SAFMIN\n*\n         KNT = 0\n         IF( ABS( BETA ).LT.SAFMIN ) THEN\n*\n*           XNORM, BETA may be inaccurate; scale X and recompute them\n*\n   10       CONTINUE\n            KNT = KNT + 1\n            CALL CSSCAL( N-1, RSAFMN, X, INCX )\n            BETA = BETA*RSAFMN\n            ALPHI = ALPHI*RSAFMN\n            ALPHR = ALPHR*RSAFMN\n            IF( ABS( BETA ).LT.SAFMIN )\n     $         GO TO 10\n*\n*           New BETA is at most 1, at least SAFMIN\n*\n            XNORM = SCNRM2( N-1, X, INCX )\n            ALPHA = CMPLX( ALPHR, ALPHI )\n            BETA = -SIGN( SLAPY3( ALPHR, ALPHI, XNORM ), ALPHR )\n         END IF\n         TAU = CMPLX( ( BETA-ALPHR ) / BETA, -ALPHI / BETA )\n         ALPHA = CLADIV( CMPLX( ONE ), ALPHA-BETA )\n         CALL CSCAL( N-1, ALPHA, X, INCX )\n*\n*        If ALPHA is subnormal, it may lose relative accuracy\n*\n         DO 20 J = 1, KNT\n            BETA = BETA*SAFMIN\n 20      CONTINUE\n         ALPHA = BETA\n      END IF\n*\n      RETURN\n*\n*     End of CLARFG\n*\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/clarft.f",
    "content": "*> \\brief \\b CLARFT\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*> \\htmlonly\n*> Download CLARFT + dependencies \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/clarft.f\"> \n*> [TGZ]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/clarft.f\"> \n*> [ZIP]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/clarft.f\"> \n*> [TXT]</a>\n*> \\endhtmlonly \n*\n*  Definition:\n*  ===========\n*\n*       SUBROUTINE CLARFT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )\n* \n*       .. Scalar Arguments ..\n*       CHARACTER          DIRECT, STOREV\n*       INTEGER            K, LDT, LDV, N\n*       ..\n*       .. Array Arguments ..\n*       COMPLEX            T( LDT, * ), TAU( * ), V( LDV, * )\n*       ..\n*  \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> CLARFT forms the triangular factor T of a complex block reflector H\n*> of order n, which is defined as a product of k elementary reflectors.\n*>\n*> If DIRECT = 'F', H = H(1) H(2) . . . H(k) and T is upper triangular;\n*>\n*> If DIRECT = 'B', H = H(k) . . . H(2) H(1) and T is lower triangular.\n*>\n*> If STOREV = 'C', the vector which defines the elementary reflector\n*> H(i) is stored in the i-th column of the array V, and\n*>\n*>    H  =  I - V * T * V**H\n*>\n*> If STOREV = 'R', the vector which defines the elementary reflector\n*> H(i) is stored in the i-th row of the array V, and\n*>\n*>    H  =  I - V**H * T * V\n*> \\endverbatim\n*\n*  Arguments:\n*  ==========\n*\n*> \\param[in] DIRECT\n*> \\verbatim\n*>          DIRECT is CHARACTER*1\n*>          Specifies the order in which the elementary reflectors are\n*>          multiplied to form the block reflector:\n*>          = 'F': H = H(1) H(2) . . . H(k) (Forward)\n*>          = 'B': H = H(k) . . . H(2) H(1) (Backward)\n*> \\endverbatim\n*>\n*> \\param[in] STOREV\n*> \\verbatim\n*>          STOREV is CHARACTER*1\n*>          Specifies how the vectors which define the elementary\n*>          reflectors are stored (see also Further Details):\n*>          = 'C': columnwise\n*>          = 'R': rowwise\n*> \\endverbatim\n*>\n*> \\param[in] N\n*> \\verbatim\n*>          N is INTEGER\n*>          The order of the block reflector H. N >= 0.\n*> \\endverbatim\n*>\n*> \\param[in] K\n*> \\verbatim\n*>          K is INTEGER\n*>          The order of the triangular factor T (= the number of\n*>          elementary reflectors). K >= 1.\n*> \\endverbatim\n*>\n*> \\param[in] V\n*> \\verbatim\n*>          V is COMPLEX array, dimension\n*>                               (LDV,K) if STOREV = 'C'\n*>                               (LDV,N) if STOREV = 'R'\n*>          The matrix V. See further details.\n*> \\endverbatim\n*>\n*> \\param[in] LDV\n*> \\verbatim\n*>          LDV is INTEGER\n*>          The leading dimension of the array V.\n*>          If STOREV = 'C', LDV >= max(1,N); if STOREV = 'R', LDV >= K.\n*> \\endverbatim\n*>\n*> \\param[in] TAU\n*> \\verbatim\n*>          TAU is COMPLEX array, dimension (K)\n*>          TAU(i) must contain the scalar factor of the elementary\n*>          reflector H(i).\n*> \\endverbatim\n*>\n*> \\param[out] T\n*> \\verbatim\n*>          T is COMPLEX array, dimension (LDT,K)\n*>          The k by k triangular factor T of the block reflector.\n*>          If DIRECT = 'F', T is upper triangular; if DIRECT = 'B', T is\n*>          lower triangular. The rest of the array is not used.\n*> \\endverbatim\n*>\n*> \\param[in] LDT\n*> \\verbatim\n*>          LDT is INTEGER\n*>          The leading dimension of the array T. LDT >= K.\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date April 2012\n*\n*> \\ingroup complexOTHERauxiliary\n*\n*> \\par Further Details:\n*  =====================\n*>\n*> \\verbatim\n*>\n*>  The shape of the matrix V and the storage of the vectors which define\n*>  the H(i) is best illustrated by the following example with n = 5 and\n*>  k = 3. The elements equal to 1 are not stored.\n*>\n*>  DIRECT = 'F' and STOREV = 'C':         DIRECT = 'F' and STOREV = 'R':\n*>\n*>               V = (  1       )                 V = (  1 v1 v1 v1 v1 )\n*>                   ( v1  1    )                     (     1 v2 v2 v2 )\n*>                   ( v1 v2  1 )                     (        1 v3 v3 )\n*>                   ( v1 v2 v3 )\n*>                   ( v1 v2 v3 )\n*>\n*>  DIRECT = 'B' and STOREV = 'C':         DIRECT = 'B' and STOREV = 'R':\n*>\n*>               V = ( v1 v2 v3 )                 V = ( v1 v1  1       )\n*>                   ( v1 v2 v3 )                     ( v2 v2 v2  1    )\n*>                   (  1 v2 v3 )                     ( v3 v3 v3 v3  1 )\n*>                   (     1 v3 )\n*>                   (        1 )\n*> \\endverbatim\n*>\n*  =====================================================================\n      SUBROUTINE CLARFT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )\n*\n*  -- LAPACK auxiliary routine (version 3.4.1) --\n*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     April 2012\n*\n*     .. Scalar Arguments ..\n      CHARACTER          DIRECT, STOREV\n      INTEGER            K, LDT, LDV, N\n*     ..\n*     .. Array Arguments ..\n      COMPLEX            T( LDT, * ), TAU( * ), V( LDV, * )\n*     ..\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      COMPLEX            ONE, ZERO\n      PARAMETER          ( ONE = ( 1.0E+0, 0.0E+0 ),\n     $                   ZERO = ( 0.0E+0, 0.0E+0 ) )\n*     ..\n*     .. Local Scalars ..\n      INTEGER            I, J, PREVLASTV, LASTV\n*     ..\n*     .. External Subroutines ..\n      EXTERNAL           CGEMV, CLACGV, CTRMV\n*     ..\n*     .. External Functions ..\n      LOGICAL            LSAME\n      EXTERNAL           LSAME\n*     ..\n*     .. Executable Statements ..\n*\n*     Quick return if possible\n*\n      IF( N.EQ.0 )\n     $   RETURN\n*\n      IF( LSAME( DIRECT, 'F' ) ) THEN\n         PREVLASTV = N\n         DO I = 1, K\n            PREVLASTV = MAX( PREVLASTV, I )\n            IF( TAU( I ).EQ.ZERO ) THEN\n*\n*              H(i)  =  I\n*\n               DO J = 1, I\n                  T( J, I ) = ZERO\n               END DO\n            ELSE\n*\n*              general case\n*\n               IF( LSAME( STOREV, 'C' ) ) THEN\n*                 Skip any trailing zeros.\n                  DO LASTV = N, I+1, -1\n                     IF( V( LASTV, I ).NE.ZERO ) EXIT\n                  END DO\n                  DO J = 1, I-1\n                     T( J, I ) = -TAU( I ) * CONJG( V( I , J ) )\n                  END DO                     \n                  J = MIN( LASTV, PREVLASTV )\n*\n*                 T(1:i-1,i) := - tau(i) * V(i:j,1:i-1)**H * V(i:j,i)\n*\n                  CALL CGEMV( 'Conjugate transpose', J-I, I-1,\n     $                        -TAU( I ), V( I+1, 1 ), LDV, \n     $                        V( I+1, I ), 1,\n     $                        ONE, T( 1, I ), 1 )\n               ELSE\n*                 Skip any trailing zeros.\n                  DO LASTV = N, I+1, -1\n                     IF( V( I, LASTV ).NE.ZERO ) EXIT\n                  END DO\n                  DO J = 1, I-1\n                     T( J, I ) = -TAU( I ) * V( J , I )\n                  END DO                     \n                  J = MIN( LASTV, PREVLASTV )\n*\n*                 T(1:i-1,i) := - tau(i) * V(1:i-1,i:j) * V(i,i:j)**H\n*\n                  CALL CGEMM( 'N', 'C', I-1, 1, J-I, -TAU( I ),\n     $                        V( 1, I+1 ), LDV, V( I, I+1 ), LDV,\n     $                        ONE, T( 1, I ), LDT )                  \n               END IF\n*\n*              T(1:i-1,i) := T(1:i-1,1:i-1) * T(1:i-1,i)\n*\n               CALL CTRMV( 'Upper', 'No transpose', 'Non-unit', I-1, T,\n     $                     LDT, T( 1, I ), 1 )\n               T( I, I ) = TAU( I )\n               IF( I.GT.1 ) THEN\n                  PREVLASTV = MAX( PREVLASTV, LASTV )\n               ELSE\n                  PREVLASTV = LASTV\n               END IF\n            END IF\n         END DO\n      ELSE\n         PREVLASTV = 1\n         DO I = K, 1, -1\n            IF( TAU( I ).EQ.ZERO ) THEN\n*\n*              H(i)  =  I\n*\n               DO J = I, K\n                  T( J, I ) = ZERO\n               END DO\n            ELSE\n*\n*              general case\n*\n               IF( I.LT.K ) THEN\n                  IF( LSAME( STOREV, 'C' ) ) THEN\n*                    Skip any leading zeros.\n                     DO LASTV = 1, I-1\n                        IF( V( LASTV, I ).NE.ZERO ) EXIT\n                     END DO\n                     DO J = I+1, K\n                        T( J, I ) = -TAU( I ) * CONJG( V( N-K+I , J ) )\n                     END DO                        \n                     J = MAX( LASTV, PREVLASTV )\n*\n*                    T(i+1:k,i) = -tau(i) * V(j:n-k+i,i+1:k)**H * V(j:n-k+i,i)\n*\n                     CALL CGEMV( 'Conjugate transpose', N-K+I-J, K-I,\n     $                           -TAU( I ), V( J, I+1 ), LDV, V( J, I ),\n     $                           1, ONE, T( I+1, I ), 1 )\n                  ELSE\n*                    Skip any leading zeros.\n                     DO LASTV = 1, I-1\n                        IF( V( I, LASTV ).NE.ZERO ) EXIT\n                     END DO\n                     DO J = I+1, K\n                        T( J, I ) = -TAU( I ) * V( J, N-K+I )\n                     END DO                      \n                     J = MAX( LASTV, PREVLASTV )\n*\n*                    T(i+1:k,i) = -tau(i) * V(i+1:k,j:n-k+i) * V(i,j:n-k+i)**H\n*\n                     CALL CGEMM( 'N', 'C', K-I, 1, N-K+I-J, -TAU( I ),\n     $                           V( I+1, J ), LDV, V( I, J ), LDV,\n     $                           ONE, T( I+1, I ), LDT )                     \n                  END IF\n*\n*                 T(i+1:k,i) := T(i+1:k,i+1:k) * T(i+1:k,i)\n*\n                  CALL CTRMV( 'Lower', 'No transpose', 'Non-unit', K-I,\n     $                        T( I+1, I+1 ), LDT, T( I+1, I ), 1 )\n                  IF( I.GT.1 ) THEN\n                     PREVLASTV = MIN( PREVLASTV, LASTV )\n                  ELSE\n                     PREVLASTV = LASTV\n                  END IF\n               END IF\n               T( I, I ) = TAU( I )\n            END IF\n         END DO\n      END IF\n      RETURN\n*\n*     End of CLARFT\n*\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/complex_double.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009-2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define SCALAR        std::complex<double>\n#define SCALAR_SUFFIX z\n#define SCALAR_SUFFIX_UP \"Z\"\n#define REAL_SCALAR_SUFFIX d\n#define ISCOMPLEX     1\n\n#include \"cholesky.cpp\"\n#include \"lu.cpp\"\n#include \"svd.cpp\"\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/complex_single.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009-2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define SCALAR        std::complex<float>\n#define SCALAR_SUFFIX c\n#define SCALAR_SUFFIX_UP \"C\"\n#define REAL_SCALAR_SUFFIX s\n#define ISCOMPLEX     1\n\n#include \"cholesky.cpp\"\n#include \"lu.cpp\"\n#include \"svd.cpp\"\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/dladiv.f",
    "content": "*> \\brief \\b DLADIV\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*> \\htmlonly\n*> Download DLADIV + dependencies \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dladiv.f\"> \n*> [TGZ]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dladiv.f\"> \n*> [ZIP]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dladiv.f\"> \n*> [TXT]</a>\n*> \\endhtmlonly \n*\n*  Definition:\n*  ===========\n*\n*       SUBROUTINE DLADIV( A, B, C, D, P, Q )\n* \n*       .. Scalar Arguments ..\n*       DOUBLE PRECISION   A, B, C, D, P, Q\n*       ..\n*  \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> DLADIV performs complex division in  real arithmetic\n*>\n*>                       a + i*b\n*>            p + i*q = ---------\n*>                       c + i*d\n*>\n*> The algorithm is due to Robert L. Smith and can be found\n*> in D. Knuth, The art of Computer Programming, Vol.2, p.195\n*> \\endverbatim\n*\n*  Arguments:\n*  ==========\n*\n*> \\param[in] A\n*> \\verbatim\n*>          A is DOUBLE PRECISION\n*> \\endverbatim\n*>\n*> \\param[in] B\n*> \\verbatim\n*>          B is DOUBLE PRECISION\n*> \\endverbatim\n*>\n*> \\param[in] C\n*> \\verbatim\n*>          C is DOUBLE PRECISION\n*> \\endverbatim\n*>\n*> \\param[in] D\n*> \\verbatim\n*>          D is DOUBLE PRECISION\n*>          The scalars a, b, c, and d in the above expression.\n*> \\endverbatim\n*>\n*> \\param[out] P\n*> \\verbatim\n*>          P is DOUBLE PRECISION\n*> \\endverbatim\n*>\n*> \\param[out] Q\n*> \\verbatim\n*>          Q is DOUBLE PRECISION\n*>          The scalars p and q in the above expression.\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date November 2011\n*\n*> \\ingroup auxOTHERauxiliary\n*\n*  =====================================================================\n      SUBROUTINE DLADIV( A, B, C, D, P, Q )\n*\n*  -- LAPACK auxiliary routine (version 3.4.0) --\n*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     November 2011\n*\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION   A, B, C, D, P, Q\n*     ..\n*\n*  =====================================================================\n*\n*     .. Local Scalars ..\n      DOUBLE PRECISION   E, F\n*     ..\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS\n*     ..\n*     .. Executable Statements ..\n*\n      IF( ABS( D ).LT.ABS( C ) ) THEN\n         E = D / C\n         F = C + D*E\n         P = ( A+B*E ) / F\n         Q = ( B-A*E ) / F\n      ELSE\n         E = C / D\n         F = D + C*E\n         P = ( B+A*E ) / F\n         Q = ( -A+B*E ) / F\n      END IF\n*\n      RETURN\n*\n*     End of DLADIV\n*\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/dlamch.f",
    "content": "*> \\brief \\b DLAMCH\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*  Definition:\n*  ===========\n*\n*      DOUBLE PRECISION FUNCTION DLAMCH( CMACH )\n*  \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> DLAMCH determines double precision machine parameters.\n*> \\endverbatim\n*\n*  Arguments:\n*  ==========\n*\n*> \\param[in] CMACH\n*> \\verbatim\n*>          Specifies the value to be returned by DLAMCH:\n*>          = 'E' or 'e',   DLAMCH := eps\n*>          = 'S' or 's ,   DLAMCH := sfmin\n*>          = 'B' or 'b',   DLAMCH := base\n*>          = 'P' or 'p',   DLAMCH := eps*base\n*>          = 'N' or 'n',   DLAMCH := t\n*>          = 'R' or 'r',   DLAMCH := rnd\n*>          = 'M' or 'm',   DLAMCH := emin\n*>          = 'U' or 'u',   DLAMCH := rmin\n*>          = 'L' or 'l',   DLAMCH := emax\n*>          = 'O' or 'o',   DLAMCH := rmax\n*>          where\n*>          eps   = relative machine precision\n*>          sfmin = safe minimum, such that 1/sfmin does not overflow\n*>          base  = base of the machine\n*>          prec  = eps*base\n*>          t     = number of (base) digits in the mantissa\n*>          rnd   = 1.0 when rounding occurs in addition, 0.0 otherwise\n*>          emin  = minimum exponent before (gradual) underflow\n*>          rmin  = underflow threshold - base**(emin-1)\n*>          emax  = largest exponent before overflow\n*>          rmax  = overflow threshold  - (base**emax)*(1-eps)\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date November 2011\n*\n*> \\ingroup auxOTHERauxiliary\n*\n*  =====================================================================\n      DOUBLE PRECISION FUNCTION DLAMCH( CMACH )\n*\n*  -- LAPACK auxiliary routine (version 3.4.0) --\n*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     November 2011\n*\n*     .. Scalar Arguments ..\n      CHARACTER          CMACH\n*     ..\n*\n* =====================================================================\n*\n*     .. Parameters ..\n      DOUBLE PRECISION   ONE, ZERO\n      PARAMETER          ( ONE = 1.0D+0, ZERO = 0.0D+0 )\n*     ..\n*     .. Local Scalars ..\n      DOUBLE PRECISION   RND, EPS, SFMIN, SMALL, RMACH\n*     ..\n*     .. External Functions ..\n      LOGICAL            LSAME\n      EXTERNAL           LSAME\n*     ..\n*     .. Intrinsic Functions ..\n      INTRINSIC          DIGITS, EPSILON, HUGE, MAXEXPONENT,\n     $                   MINEXPONENT, RADIX, TINY\n*     ..\n*     .. Executable Statements ..\n*\n*\n*     Assume rounding, not chopping. Always.\n*\n      RND = ONE\n*\n      IF( ONE.EQ.RND ) THEN\n         EPS = EPSILON(ZERO) * 0.5\n      ELSE\n         EPS = EPSILON(ZERO)\n      END IF\n*\n      IF( LSAME( CMACH, 'E' ) ) THEN\n         RMACH = EPS\n      ELSE IF( LSAME( CMACH, 'S' ) ) THEN\n         SFMIN = TINY(ZERO)\n         SMALL = ONE / HUGE(ZERO)\n         IF( SMALL.GE.SFMIN ) THEN\n*\n*           Use SMALL plus a bit, to avoid the possibility of rounding\n*           causing overflow when computing  1/sfmin.\n*\n            SFMIN = SMALL*( ONE+EPS )\n         END IF\n         RMACH = SFMIN\n      ELSE IF( LSAME( CMACH, 'B' ) ) THEN\n         RMACH = RADIX(ZERO)\n      ELSE IF( LSAME( CMACH, 'P' ) ) THEN\n         RMACH = EPS * RADIX(ZERO)\n      ELSE IF( LSAME( CMACH, 'N' ) ) THEN\n         RMACH = DIGITS(ZERO)\n      ELSE IF( LSAME( CMACH, 'R' ) ) THEN\n         RMACH = RND\n      ELSE IF( LSAME( CMACH, 'M' ) ) THEN\n         RMACH = MINEXPONENT(ZERO)\n      ELSE IF( LSAME( CMACH, 'U' ) ) THEN\n         RMACH = tiny(zero)\n      ELSE IF( LSAME( CMACH, 'L' ) ) THEN\n         RMACH = MAXEXPONENT(ZERO)\n      ELSE IF( LSAME( CMACH, 'O' ) ) THEN\n         RMACH = HUGE(ZERO)\n      ELSE\n         RMACH = ZERO\n      END IF\n*\n      DLAMCH = RMACH\n      RETURN\n*\n*     End of DLAMCH\n*\n      END\n************************************************************************\n*> \\brief \\b DLAMC3\n*> \\details\n*> \\b Purpose:\n*> \\verbatim\n*> DLAMC3  is intended to force  A  and  B  to be stored prior to doing\n*> the addition of  A  and  B ,  for use in situations where optimizers\n*> might hold one of these in a register.\n*> \\endverbatim\n*> \\author LAPACK is a software package provided by Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..\n*> \\date November 2011\n*> \\ingroup auxOTHERauxiliary\n*>\n*> \\param[in] A\n*> \\verbatim\n*>          A is a DOUBLE PRECISION\n*> \\endverbatim\n*>\n*> \\param[in] B\n*> \\verbatim\n*>          B is a DOUBLE PRECISION\n*>          The values A and B.\n*> \\endverbatim\n*>\n      DOUBLE PRECISION FUNCTION DLAMC3( A, B )\n*\n*  -- LAPACK auxiliary routine (version 3.4.0) --\n*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..\n*     November 2010\n*\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION   A, B\n*     ..\n* =====================================================================\n*\n*     .. Executable Statements ..\n*\n      DLAMC3 = A + B\n*\n      RETURN\n*\n*     End of DLAMC3\n*\n      END\n*\n************************************************************************\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/dlapy2.f",
    "content": "*> \\brief \\b DLAPY2\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*> \\htmlonly\n*> Download DLAPY2 + dependencies \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlapy2.f\"> \n*> [TGZ]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlapy2.f\"> \n*> [ZIP]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlapy2.f\"> \n*> [TXT]</a>\n*> \\endhtmlonly \n*\n*  Definition:\n*  ===========\n*\n*       DOUBLE PRECISION FUNCTION DLAPY2( X, Y )\n* \n*       .. Scalar Arguments ..\n*       DOUBLE PRECISION   X, Y\n*       ..\n*  \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> DLAPY2 returns sqrt(x**2+y**2), taking care not to cause unnecessary\n*> overflow.\n*> \\endverbatim\n*\n*  Arguments:\n*  ==========\n*\n*> \\param[in] X\n*> \\verbatim\n*>          X is DOUBLE PRECISION\n*> \\endverbatim\n*>\n*> \\param[in] Y\n*> \\verbatim\n*>          Y is DOUBLE PRECISION\n*>          X and Y specify the values x and y.\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date November 2011\n*\n*> \\ingroup auxOTHERauxiliary\n*\n*  =====================================================================\n      DOUBLE PRECISION FUNCTION DLAPY2( X, Y )\n*\n*  -- LAPACK auxiliary routine (version 3.4.0) --\n*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     November 2011\n*\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION   X, Y\n*     ..\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      DOUBLE PRECISION   ZERO\n      PARAMETER          ( ZERO = 0.0D0 )\n      DOUBLE PRECISION   ONE\n      PARAMETER          ( ONE = 1.0D0 )\n*     ..\n*     .. Local Scalars ..\n      DOUBLE PRECISION   W, XABS, YABS, Z\n*     ..\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, MAX, MIN, SQRT\n*     ..\n*     .. Executable Statements ..\n*\n      XABS = ABS( X )\n      YABS = ABS( Y )\n      W = MAX( XABS, YABS )\n      Z = MIN( XABS, YABS )\n      IF( Z.EQ.ZERO ) THEN\n         DLAPY2 = W\n      ELSE\n         DLAPY2 = W*SQRT( ONE+( Z / W )**2 )\n      END IF\n      RETURN\n*\n*     End of DLAPY2\n*\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/dlapy3.f",
    "content": "*> \\brief \\b DLAPY3\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*> \\htmlonly\n*> Download DLAPY3 + dependencies \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlapy3.f\"> \n*> [TGZ]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlapy3.f\"> \n*> [ZIP]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlapy3.f\"> \n*> [TXT]</a>\n*> \\endhtmlonly \n*\n*  Definition:\n*  ===========\n*\n*       DOUBLE PRECISION FUNCTION DLAPY3( X, Y, Z )\n* \n*       .. Scalar Arguments ..\n*       DOUBLE PRECISION   X, Y, Z\n*       ..\n*  \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> DLAPY3 returns sqrt(x**2+y**2+z**2), taking care not to cause\n*> unnecessary overflow.\n*> \\endverbatim\n*\n*  Arguments:\n*  ==========\n*\n*> \\param[in] X\n*> \\verbatim\n*>          X is DOUBLE PRECISION\n*> \\endverbatim\n*>\n*> \\param[in] Y\n*> \\verbatim\n*>          Y is DOUBLE PRECISION\n*> \\endverbatim\n*>\n*> \\param[in] Z\n*> \\verbatim\n*>          Z is DOUBLE PRECISION\n*>          X, Y and Z specify the values x, y and z.\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date November 2011\n*\n*> \\ingroup auxOTHERauxiliary\n*\n*  =====================================================================\n      DOUBLE PRECISION FUNCTION DLAPY3( X, Y, Z )\n*\n*  -- LAPACK auxiliary routine (version 3.4.0) --\n*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     November 2011\n*\n*     .. Scalar Arguments ..\n      DOUBLE PRECISION   X, Y, Z\n*     ..\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      DOUBLE PRECISION   ZERO\n      PARAMETER          ( ZERO = 0.0D0 )\n*     ..\n*     .. Local Scalars ..\n      DOUBLE PRECISION   W, XABS, YABS, ZABS\n*     ..\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, MAX, SQRT\n*     ..\n*     .. Executable Statements ..\n*\n      XABS = ABS( X )\n      YABS = ABS( Y )\n      ZABS = ABS( Z )\n      W = MAX( XABS, YABS, ZABS )\n      IF( W.EQ.ZERO ) THEN\n*     W can be zero for max(0,nan,0)\n*     adding all three entries together will make sure\n*     NaN will not disappear.\n         DLAPY3 =  XABS + YABS + ZABS\n      ELSE\n         DLAPY3 = W*SQRT( ( XABS / W )**2+( YABS / W )**2+\n     $            ( ZABS / W )**2 )\n      END IF\n      RETURN\n*\n*     End of DLAPY3\n*\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/dlarf.f",
    "content": "*> \\brief \\b DLARF\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*> \\htmlonly\n*> Download DLARF + dependencies \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarf.f\"> \n*> [TGZ]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarf.f\"> \n*> [ZIP]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarf.f\"> \n*> [TXT]</a>\n*> \\endhtmlonly \n*\n*  Definition:\n*  ===========\n*\n*       SUBROUTINE DLARF( SIDE, M, N, V, INCV, TAU, C, LDC, WORK )\n* \n*       .. Scalar Arguments ..\n*       CHARACTER          SIDE\n*       INTEGER            INCV, LDC, M, N\n*       DOUBLE PRECISION   TAU\n*       ..\n*       .. Array Arguments ..\n*       DOUBLE PRECISION   C( LDC, * ), V( * ), WORK( * )\n*       ..\n*  \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> DLARF applies a real elementary reflector H to a real m by n matrix\n*> C, from either the left or the right. H is represented in the form\n*>\n*>       H = I - tau * v * v**T\n*>\n*> where tau is a real scalar and v is a real vector.\n*>\n*> If tau = 0, then H is taken to be the unit matrix.\n*> \\endverbatim\n*\n*  Arguments:\n*  ==========\n*\n*> \\param[in] SIDE\n*> \\verbatim\n*>          SIDE is CHARACTER*1\n*>          = 'L': form  H * C\n*>          = 'R': form  C * H\n*> \\endverbatim\n*>\n*> \\param[in] M\n*> \\verbatim\n*>          M is INTEGER\n*>          The number of rows of the matrix C.\n*> \\endverbatim\n*>\n*> \\param[in] N\n*> \\verbatim\n*>          N is INTEGER\n*>          The number of columns of the matrix C.\n*> \\endverbatim\n*>\n*> \\param[in] V\n*> \\verbatim\n*>          V is DOUBLE PRECISION array, dimension\n*>                     (1 + (M-1)*abs(INCV)) if SIDE = 'L'\n*>                  or (1 + (N-1)*abs(INCV)) if SIDE = 'R'\n*>          The vector v in the representation of H. V is not used if\n*>          TAU = 0.\n*> \\endverbatim\n*>\n*> \\param[in] INCV\n*> \\verbatim\n*>          INCV is INTEGER\n*>          The increment between elements of v. INCV <> 0.\n*> \\endverbatim\n*>\n*> \\param[in] TAU\n*> \\verbatim\n*>          TAU is DOUBLE PRECISION\n*>          The value tau in the representation of H.\n*> \\endverbatim\n*>\n*> \\param[in,out] C\n*> \\verbatim\n*>          C is DOUBLE PRECISION array, dimension (LDC,N)\n*>          On entry, the m by n matrix C.\n*>          On exit, C is overwritten by the matrix H * C if SIDE = 'L',\n*>          or C * H if SIDE = 'R'.\n*> \\endverbatim\n*>\n*> \\param[in] LDC\n*> \\verbatim\n*>          LDC is INTEGER\n*>          The leading dimension of the array C. LDC >= max(1,M).\n*> \\endverbatim\n*>\n*> \\param[out] WORK\n*> \\verbatim\n*>          WORK is DOUBLE PRECISION array, dimension\n*>                         (N) if SIDE = 'L'\n*>                      or (M) if SIDE = 'R'\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date November 2011\n*\n*> \\ingroup doubleOTHERauxiliary\n*\n*  =====================================================================\n      SUBROUTINE DLARF( SIDE, M, N, V, INCV, TAU, C, LDC, WORK )\n*\n*  -- LAPACK auxiliary routine (version 3.4.0) --\n*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     November 2011\n*\n*     .. Scalar Arguments ..\n      CHARACTER          SIDE\n      INTEGER            INCV, LDC, M, N\n      DOUBLE PRECISION   TAU\n*     ..\n*     .. Array Arguments ..\n      DOUBLE PRECISION   C( LDC, * ), V( * ), WORK( * )\n*     ..\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      DOUBLE PRECISION   ONE, ZERO\n      PARAMETER          ( ONE = 1.0D+0, ZERO = 0.0D+0 )\n*     ..\n*     .. Local Scalars ..\n      LOGICAL            APPLYLEFT\n      INTEGER            I, LASTV, LASTC\n*     ..\n*     .. External Subroutines ..\n      EXTERNAL           DGEMV, DGER\n*     ..\n*     .. External Functions ..\n      LOGICAL            LSAME\n      INTEGER            ILADLR, ILADLC\n      EXTERNAL           LSAME, ILADLR, ILADLC\n*     ..\n*     .. Executable Statements ..\n*\n      APPLYLEFT = LSAME( SIDE, 'L' )\n      LASTV = 0\n      LASTC = 0\n      IF( TAU.NE.ZERO ) THEN\n!     Set up variables for scanning V.  LASTV begins pointing to the end\n!     of V.\n         IF( APPLYLEFT ) THEN\n            LASTV = M\n         ELSE\n            LASTV = N\n         END IF\n         IF( INCV.GT.0 ) THEN\n            I = 1 + (LASTV-1) * INCV\n         ELSE\n            I = 1\n         END IF\n!     Look for the last non-zero row in V.\n         DO WHILE( LASTV.GT.0 .AND. V( I ).EQ.ZERO )\n            LASTV = LASTV - 1\n            I = I - INCV\n         END DO\n         IF( APPLYLEFT ) THEN\n!     Scan for the last non-zero column in C(1:lastv,:).\n            LASTC = ILADLC(LASTV, N, C, LDC)\n         ELSE\n!     Scan for the last non-zero row in C(:,1:lastv).\n            LASTC = ILADLR(M, LASTV, C, LDC)\n         END IF\n      END IF\n!     Note that lastc.eq.0 renders the BLAS operations null; no special\n!     case is needed at this level.\n      IF( APPLYLEFT ) THEN\n*\n*        Form  H * C\n*\n         IF( LASTV.GT.0 ) THEN\n*\n*           w(1:lastc,1) := C(1:lastv,1:lastc)**T * v(1:lastv,1)\n*\n            CALL DGEMV( 'Transpose', LASTV, LASTC, ONE, C, LDC, V, INCV,\n     $           ZERO, WORK, 1 )\n*\n*           C(1:lastv,1:lastc) := C(...) - v(1:lastv,1) * w(1:lastc,1)**T\n*\n            CALL DGER( LASTV, LASTC, -TAU, V, INCV, WORK, 1, C, LDC )\n         END IF\n      ELSE\n*\n*        Form  C * H\n*\n         IF( LASTV.GT.0 ) THEN\n*\n*           w(1:lastc,1) := C(1:lastc,1:lastv) * v(1:lastv,1)\n*\n            CALL DGEMV( 'No transpose', LASTC, LASTV, ONE, C, LDC,\n     $           V, INCV, ZERO, WORK, 1 )\n*\n*           C(1:lastc,1:lastv) := C(...) - w(1:lastc,1) * v(1:lastv,1)**T\n*\n            CALL DGER( LASTC, LASTV, -TAU, WORK, 1, V, INCV, C, LDC )\n         END IF\n      END IF\n      RETURN\n*\n*     End of DLARF\n*\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/dlarfb.f",
    "content": "*> \\brief \\b DLARFB\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*> \\htmlonly\n*> Download DLARFB + dependencies \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarfb.f\"> \n*> [TGZ]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarfb.f\"> \n*> [ZIP]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarfb.f\"> \n*> [TXT]</a>\n*> \\endhtmlonly \n*\n*  Definition:\n*  ===========\n*\n*       SUBROUTINE DLARFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV,\n*                          T, LDT, C, LDC, WORK, LDWORK )\n* \n*       .. Scalar Arguments ..\n*       CHARACTER          DIRECT, SIDE, STOREV, TRANS\n*       INTEGER            K, LDC, LDT, LDV, LDWORK, M, N\n*       ..\n*       .. Array Arguments ..\n*       DOUBLE PRECISION   C( LDC, * ), T( LDT, * ), V( LDV, * ),\n*      $                   WORK( LDWORK, * )\n*       ..\n*  \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> DLARFB applies a real block reflector H or its transpose H**T to a\n*> real m by n matrix C, from either the left or the right.\n*> \\endverbatim\n*\n*  Arguments:\n*  ==========\n*\n*> \\param[in] SIDE\n*> \\verbatim\n*>          SIDE is CHARACTER*1\n*>          = 'L': apply H or H**T from the Left\n*>          = 'R': apply H or H**T from the Right\n*> \\endverbatim\n*>\n*> \\param[in] TRANS\n*> \\verbatim\n*>          TRANS is CHARACTER*1\n*>          = 'N': apply H (No transpose)\n*>          = 'T': apply H**T (Transpose)\n*> \\endverbatim\n*>\n*> \\param[in] DIRECT\n*> \\verbatim\n*>          DIRECT is CHARACTER*1\n*>          Indicates how H is formed from a product of elementary\n*>          reflectors\n*>          = 'F': H = H(1) H(2) . . . H(k) (Forward)\n*>          = 'B': H = H(k) . . . H(2) H(1) (Backward)\n*> \\endverbatim\n*>\n*> \\param[in] STOREV\n*> \\verbatim\n*>          STOREV is CHARACTER*1\n*>          Indicates how the vectors which define the elementary\n*>          reflectors are stored:\n*>          = 'C': Columnwise\n*>          = 'R': Rowwise\n*> \\endverbatim\n*>\n*> \\param[in] M\n*> \\verbatim\n*>          M is INTEGER\n*>          The number of rows of the matrix C.\n*> \\endverbatim\n*>\n*> \\param[in] N\n*> \\verbatim\n*>          N is INTEGER\n*>          The number of columns of the matrix C.\n*> \\endverbatim\n*>\n*> \\param[in] K\n*> \\verbatim\n*>          K is INTEGER\n*>          The order of the matrix T (= the number of elementary\n*>          reflectors whose product defines the block reflector).\n*> \\endverbatim\n*>\n*> \\param[in] V\n*> \\verbatim\n*>          V is DOUBLE PRECISION array, dimension\n*>                                (LDV,K) if STOREV = 'C'\n*>                                (LDV,M) if STOREV = 'R' and SIDE = 'L'\n*>                                (LDV,N) if STOREV = 'R' and SIDE = 'R'\n*>          The matrix V. See Further Details.\n*> \\endverbatim\n*>\n*> \\param[in] LDV\n*> \\verbatim\n*>          LDV is INTEGER\n*>          The leading dimension of the array V.\n*>          If STOREV = 'C' and SIDE = 'L', LDV >= max(1,M);\n*>          if STOREV = 'C' and SIDE = 'R', LDV >= max(1,N);\n*>          if STOREV = 'R', LDV >= K.\n*> \\endverbatim\n*>\n*> \\param[in] T\n*> \\verbatim\n*>          T is DOUBLE PRECISION array, dimension (LDT,K)\n*>          The triangular k by k matrix T in the representation of the\n*>          block reflector.\n*> \\endverbatim\n*>\n*> \\param[in] LDT\n*> \\verbatim\n*>          LDT is INTEGER\n*>          The leading dimension of the array T. LDT >= K.\n*> \\endverbatim\n*>\n*> \\param[in,out] C\n*> \\verbatim\n*>          C is DOUBLE PRECISION array, dimension (LDC,N)\n*>          On entry, the m by n matrix C.\n*>          On exit, C is overwritten by H*C or H**T*C or C*H or C*H**T.\n*> \\endverbatim\n*>\n*> \\param[in] LDC\n*> \\verbatim\n*>          LDC is INTEGER\n*>          The leading dimension of the array C. LDC >= max(1,M).\n*> \\endverbatim\n*>\n*> \\param[out] WORK\n*> \\verbatim\n*>          WORK is DOUBLE PRECISION array, dimension (LDWORK,K)\n*> \\endverbatim\n*>\n*> \\param[in] LDWORK\n*> \\verbatim\n*>          LDWORK is INTEGER\n*>          The leading dimension of the array WORK.\n*>          If SIDE = 'L', LDWORK >= max(1,N);\n*>          if SIDE = 'R', LDWORK >= max(1,M).\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date November 2011\n*\n*> \\ingroup doubleOTHERauxiliary\n*\n*> \\par Further Details:\n*  =====================\n*>\n*> \\verbatim\n*>\n*>  The shape of the matrix V and the storage of the vectors which define\n*>  the H(i) is best illustrated by the following example with n = 5 and\n*>  k = 3. The elements equal to 1 are not stored; the corresponding\n*>  array elements are modified but restored on exit. The rest of the\n*>  array is not used.\n*>\n*>  DIRECT = 'F' and STOREV = 'C':         DIRECT = 'F' and STOREV = 'R':\n*>\n*>               V = (  1       )                 V = (  1 v1 v1 v1 v1 )\n*>                   ( v1  1    )                     (     1 v2 v2 v2 )\n*>                   ( v1 v2  1 )                     (        1 v3 v3 )\n*>                   ( v1 v2 v3 )\n*>                   ( v1 v2 v3 )\n*>\n*>  DIRECT = 'B' and STOREV = 'C':         DIRECT = 'B' and STOREV = 'R':\n*>\n*>               V = ( v1 v2 v3 )                 V = ( v1 v1  1       )\n*>                   ( v1 v2 v3 )                     ( v2 v2 v2  1    )\n*>                   (  1 v2 v3 )                     ( v3 v3 v3 v3  1 )\n*>                   (     1 v3 )\n*>                   (        1 )\n*> \\endverbatim\n*>\n*  =====================================================================\n      SUBROUTINE DLARFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV,\n     $                   T, LDT, C, LDC, WORK, LDWORK )\n*\n*  -- LAPACK auxiliary routine (version 3.4.0) --\n*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     November 2011\n*\n*     .. Scalar Arguments ..\n      CHARACTER          DIRECT, SIDE, STOREV, TRANS\n      INTEGER            K, LDC, LDT, LDV, LDWORK, M, N\n*     ..\n*     .. Array Arguments ..\n      DOUBLE PRECISION   C( LDC, * ), T( LDT, * ), V( LDV, * ),\n     $                   WORK( LDWORK, * )\n*     ..\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      DOUBLE PRECISION   ONE\n      PARAMETER          ( ONE = 1.0D+0 )\n*     ..\n*     .. Local Scalars ..\n      CHARACTER          TRANST\n      INTEGER            I, J, LASTV, LASTC\n*     ..\n*     .. External Functions ..\n      LOGICAL            LSAME\n      INTEGER            ILADLR, ILADLC\n      EXTERNAL           LSAME, ILADLR, ILADLC\n*     ..\n*     .. External Subroutines ..\n      EXTERNAL           DCOPY, DGEMM, DTRMM\n*     ..\n*     .. Executable Statements ..\n*\n*     Quick return if possible\n*\n      IF( M.LE.0 .OR. N.LE.0 )\n     $   RETURN\n*\n      IF( LSAME( TRANS, 'N' ) ) THEN\n         TRANST = 'T'\n      ELSE\n         TRANST = 'N'\n      END IF\n*\n      IF( LSAME( STOREV, 'C' ) ) THEN\n*\n         IF( LSAME( DIRECT, 'F' ) ) THEN\n*\n*           Let  V =  ( V1 )    (first K rows)\n*                     ( V2 )\n*           where  V1  is unit lower triangular.\n*\n            IF( LSAME( SIDE, 'L' ) ) THEN\n*\n*              Form  H * C  or  H**T * C  where  C = ( C1 )\n*                                                    ( C2 )\n*\n               LASTV = MAX( K, ILADLR( M, K, V, LDV ) )\n               LASTC = ILADLC( LASTV, N, C, LDC )\n*\n*              W := C**T * V  =  (C1**T * V1 + C2**T * V2)  (stored in WORK)\n*\n*              W := C1**T\n*\n               DO 10 J = 1, K\n                  CALL DCOPY( LASTC, C( J, 1 ), LDC, WORK( 1, J ), 1 )\n   10          CONTINUE\n*\n*              W := W * V1\n*\n               CALL DTRMM( 'Right', 'Lower', 'No transpose', 'Unit',\n     $              LASTC, K, ONE, V, LDV, WORK, LDWORK )\n               IF( LASTV.GT.K ) THEN\n*\n*                 W := W + C2**T *V2\n*\n                  CALL DGEMM( 'Transpose', 'No transpose',\n     $                 LASTC, K, LASTV-K,\n     $                 ONE, C( K+1, 1 ), LDC, V( K+1, 1 ), LDV,\n     $                 ONE, WORK, LDWORK )\n               END IF\n*\n*              W := W * T**T  or  W * T\n*\n               CALL DTRMM( 'Right', 'Upper', TRANST, 'Non-unit',\n     $              LASTC, K, ONE, T, LDT, WORK, LDWORK )\n*\n*              C := C - V * W**T\n*\n               IF( LASTV.GT.K ) THEN\n*\n*                 C2 := C2 - V2 * W**T\n*\n                  CALL DGEMM( 'No transpose', 'Transpose',\n     $                 LASTV-K, LASTC, K,\n     $                 -ONE, V( K+1, 1 ), LDV, WORK, LDWORK, ONE,\n     $                 C( K+1, 1 ), LDC )\n               END IF\n*\n*              W := W * V1**T\n*\n               CALL DTRMM( 'Right', 'Lower', 'Transpose', 'Unit',\n     $              LASTC, K, ONE, V, LDV, WORK, LDWORK )\n*\n*              C1 := C1 - W**T\n*\n               DO 30 J = 1, K\n                  DO 20 I = 1, LASTC\n                     C( J, I ) = C( J, I ) - WORK( I, J )\n   20             CONTINUE\n   30          CONTINUE\n*\n            ELSE IF( LSAME( SIDE, 'R' ) ) THEN\n*\n*              Form  C * H  or  C * H**T  where  C = ( C1  C2 )\n*\n               LASTV = MAX( K, ILADLR( N, K, V, LDV ) )\n               LASTC = ILADLR( M, LASTV, C, LDC )\n*\n*              W := C * V  =  (C1*V1 + C2*V2)  (stored in WORK)\n*\n*              W := C1\n*\n               DO 40 J = 1, K\n                  CALL DCOPY( LASTC, C( 1, J ), 1, WORK( 1, J ), 1 )\n   40          CONTINUE\n*\n*              W := W * V1\n*\n               CALL DTRMM( 'Right', 'Lower', 'No transpose', 'Unit',\n     $              LASTC, K, ONE, V, LDV, WORK, LDWORK )\n               IF( LASTV.GT.K ) THEN\n*\n*                 W := W + C2 * V2\n*\n                  CALL DGEMM( 'No transpose', 'No transpose',\n     $                 LASTC, K, LASTV-K,\n     $                 ONE, C( 1, K+1 ), LDC, V( K+1, 1 ), LDV,\n     $                 ONE, WORK, LDWORK )\n               END IF\n*\n*              W := W * T  or  W * T**T\n*\n               CALL DTRMM( 'Right', 'Upper', TRANS, 'Non-unit',\n     $              LASTC, K, ONE, T, LDT, WORK, LDWORK )\n*\n*              C := C - W * V**T\n*\n               IF( LASTV.GT.K ) THEN\n*\n*                 C2 := C2 - W * V2**T\n*\n                  CALL DGEMM( 'No transpose', 'Transpose',\n     $                 LASTC, LASTV-K, K,\n     $                 -ONE, WORK, LDWORK, V( K+1, 1 ), LDV, ONE,\n     $                 C( 1, K+1 ), LDC )\n               END IF\n*\n*              W := W * V1**T\n*\n               CALL DTRMM( 'Right', 'Lower', 'Transpose', 'Unit',\n     $              LASTC, K, ONE, V, LDV, WORK, LDWORK )\n*\n*              C1 := C1 - W\n*\n               DO 60 J = 1, K\n                  DO 50 I = 1, LASTC\n                     C( I, J ) = C( I, J ) - WORK( I, J )\n   50             CONTINUE\n   60          CONTINUE\n            END IF\n*\n         ELSE\n*\n*           Let  V =  ( V1 )\n*                     ( V2 )    (last K rows)\n*           where  V2  is unit upper triangular.\n*\n            IF( LSAME( SIDE, 'L' ) ) THEN\n*\n*              Form  H * C  or  H**T * C  where  C = ( C1 )\n*                                                    ( C2 )\n*\n               LASTV = MAX( K, ILADLR( M, K, V, LDV ) )\n               LASTC = ILADLC( LASTV, N, C, LDC )\n*\n*              W := C**T * V  =  (C1**T * V1 + C2**T * V2)  (stored in WORK)\n*\n*              W := C2**T\n*\n               DO 70 J = 1, K\n                  CALL DCOPY( LASTC, C( LASTV-K+J, 1 ), LDC,\n     $                 WORK( 1, J ), 1 )\n   70          CONTINUE\n*\n*              W := W * V2\n*\n               CALL DTRMM( 'Right', 'Upper', 'No transpose', 'Unit',\n     $              LASTC, K, ONE, V( LASTV-K+1, 1 ), LDV,\n     $              WORK, LDWORK )\n               IF( LASTV.GT.K ) THEN\n*\n*                 W := W + C1**T*V1\n*\n                  CALL DGEMM( 'Transpose', 'No transpose',\n     $                 LASTC, K, LASTV-K, ONE, C, LDC, V, LDV,\n     $                 ONE, WORK, LDWORK )\n               END IF\n*\n*              W := W * T**T  or  W * T\n*\n               CALL DTRMM( 'Right', 'Lower', TRANST, 'Non-unit',\n     $              LASTC, K, ONE, T, LDT, WORK, LDWORK )\n*\n*              C := C - V * W**T\n*\n               IF( LASTV.GT.K ) THEN\n*\n*                 C1 := C1 - V1 * W**T\n*\n                  CALL DGEMM( 'No transpose', 'Transpose',\n     $                 LASTV-K, LASTC, K, -ONE, V, LDV, WORK, LDWORK,\n     $                 ONE, C, LDC )\n               END IF\n*\n*              W := W * V2**T\n*\n               CALL DTRMM( 'Right', 'Upper', 'Transpose', 'Unit',\n     $              LASTC, K, ONE, V( LASTV-K+1, 1 ), LDV,\n     $              WORK, LDWORK )\n*\n*              C2 := C2 - W**T\n*\n               DO 90 J = 1, K\n                  DO 80 I = 1, LASTC\n                     C( LASTV-K+J, I ) = C( LASTV-K+J, I ) - WORK(I, J)\n   80             CONTINUE\n   90          CONTINUE\n*\n            ELSE IF( LSAME( SIDE, 'R' ) ) THEN\n*\n*              Form  C * H  or  C * H**T  where  C = ( C1  C2 )\n*\n               LASTV = MAX( K, ILADLR( N, K, V, LDV ) )\n               LASTC = ILADLR( M, LASTV, C, LDC )\n*\n*              W := C * V  =  (C1*V1 + C2*V2)  (stored in WORK)\n*\n*              W := C2\n*\n               DO 100 J = 1, K\n                  CALL DCOPY( LASTC, C( 1, N-K+J ), 1, WORK( 1, J ), 1 )\n  100          CONTINUE\n*\n*              W := W * V2\n*\n               CALL DTRMM( 'Right', 'Upper', 'No transpose', 'Unit',\n     $              LASTC, K, ONE, V( LASTV-K+1, 1 ), LDV,\n     $              WORK, LDWORK )\n               IF( LASTV.GT.K ) THEN\n*\n*                 W := W + C1 * V1\n*\n                  CALL DGEMM( 'No transpose', 'No transpose',\n     $                 LASTC, K, LASTV-K, ONE, C, LDC, V, LDV,\n     $                 ONE, WORK, LDWORK )\n               END IF\n*\n*              W := W * T  or  W * T**T\n*\n               CALL DTRMM( 'Right', 'Lower', TRANS, 'Non-unit',\n     $              LASTC, K, ONE, T, LDT, WORK, LDWORK )\n*\n*              C := C - W * V**T\n*\n               IF( LASTV.GT.K ) THEN\n*\n*                 C1 := C1 - W * V1**T\n*\n                  CALL DGEMM( 'No transpose', 'Transpose',\n     $                 LASTC, LASTV-K, K, -ONE, WORK, LDWORK, V, LDV,\n     $                 ONE, C, LDC )\n               END IF\n*\n*              W := W * V2**T\n*\n               CALL DTRMM( 'Right', 'Upper', 'Transpose', 'Unit',\n     $              LASTC, K, ONE, V( LASTV-K+1, 1 ), LDV,\n     $              WORK, LDWORK )\n*\n*              C2 := C2 - W\n*\n               DO 120 J = 1, K\n                  DO 110 I = 1, LASTC\n                     C( I, LASTV-K+J ) = C( I, LASTV-K+J ) - WORK(I, J)\n  110             CONTINUE\n  120          CONTINUE\n            END IF\n         END IF\n*\n      ELSE IF( LSAME( STOREV, 'R' ) ) THEN\n*\n         IF( LSAME( DIRECT, 'F' ) ) THEN\n*\n*           Let  V =  ( V1  V2 )    (V1: first K columns)\n*           where  V1  is unit upper triangular.\n*\n            IF( LSAME( SIDE, 'L' ) ) THEN\n*\n*              Form  H * C  or  H**T * C  where  C = ( C1 )\n*                                                    ( C2 )\n*\n               LASTV = MAX( K, ILADLC( K, M, V, LDV ) )\n               LASTC = ILADLC( LASTV, N, C, LDC )\n*\n*              W := C**T * V**T  =  (C1**T * V1**T + C2**T * V2**T) (stored in WORK)\n*\n*              W := C1**T\n*\n               DO 130 J = 1, K\n                  CALL DCOPY( LASTC, C( J, 1 ), LDC, WORK( 1, J ), 1 )\n  130          CONTINUE\n*\n*              W := W * V1**T\n*\n               CALL DTRMM( 'Right', 'Upper', 'Transpose', 'Unit',\n     $              LASTC, K, ONE, V, LDV, WORK, LDWORK )\n               IF( LASTV.GT.K ) THEN\n*\n*                 W := W + C2**T*V2**T\n*\n                  CALL DGEMM( 'Transpose', 'Transpose',\n     $                 LASTC, K, LASTV-K,\n     $                 ONE, C( K+1, 1 ), LDC, V( 1, K+1 ), LDV,\n     $                 ONE, WORK, LDWORK )\n               END IF\n*\n*              W := W * T**T  or  W * T\n*\n               CALL DTRMM( 'Right', 'Upper', TRANST, 'Non-unit',\n     $              LASTC, K, ONE, T, LDT, WORK, LDWORK )\n*\n*              C := C - V**T * W**T\n*\n               IF( LASTV.GT.K ) THEN\n*\n*                 C2 := C2 - V2**T * W**T\n*\n                  CALL DGEMM( 'Transpose', 'Transpose',\n     $                 LASTV-K, LASTC, K,\n     $                 -ONE, V( 1, K+1 ), LDV, WORK, LDWORK,\n     $                 ONE, C( K+1, 1 ), LDC )\n               END IF\n*\n*              W := W * V1\n*\n               CALL DTRMM( 'Right', 'Upper', 'No transpose', 'Unit',\n     $              LASTC, K, ONE, V, LDV, WORK, LDWORK )\n*\n*              C1 := C1 - W**T\n*\n               DO 150 J = 1, K\n                  DO 140 I = 1, LASTC\n                     C( J, I ) = C( J, I ) - WORK( I, J )\n  140             CONTINUE\n  150          CONTINUE\n*\n            ELSE IF( LSAME( SIDE, 'R' ) ) THEN\n*\n*              Form  C * H  or  C * H**T  where  C = ( C1  C2 )\n*\n               LASTV = MAX( K, ILADLC( K, N, V, LDV ) )\n               LASTC = ILADLR( M, LASTV, C, LDC )\n*\n*              W := C * V**T  =  (C1*V1**T + C2*V2**T)  (stored in WORK)\n*\n*              W := C1\n*\n               DO 160 J = 1, K\n                  CALL DCOPY( LASTC, C( 1, J ), 1, WORK( 1, J ), 1 )\n  160          CONTINUE\n*\n*              W := W * V1**T\n*\n               CALL DTRMM( 'Right', 'Upper', 'Transpose', 'Unit',\n     $              LASTC, K, ONE, V, LDV, WORK, LDWORK )\n               IF( LASTV.GT.K ) THEN\n*\n*                 W := W + C2 * V2**T\n*\n                  CALL DGEMM( 'No transpose', 'Transpose',\n     $                 LASTC, K, LASTV-K,\n     $                 ONE, C( 1, K+1 ), LDC, V( 1, K+1 ), LDV,\n     $                 ONE, WORK, LDWORK )\n               END IF\n*\n*              W := W * T  or  W * T**T\n*\n               CALL DTRMM( 'Right', 'Upper', TRANS, 'Non-unit',\n     $              LASTC, K, ONE, T, LDT, WORK, LDWORK )\n*\n*              C := C - W * V\n*\n               IF( LASTV.GT.K ) THEN\n*\n*                 C2 := C2 - W * V2\n*\n                  CALL DGEMM( 'No transpose', 'No transpose',\n     $                 LASTC, LASTV-K, K,\n     $                 -ONE, WORK, LDWORK, V( 1, K+1 ), LDV,\n     $                 ONE, C( 1, K+1 ), LDC )\n               END IF\n*\n*              W := W * V1\n*\n               CALL DTRMM( 'Right', 'Upper', 'No transpose', 'Unit',\n     $              LASTC, K, ONE, V, LDV, WORK, LDWORK )\n*\n*              C1 := C1 - W\n*\n               DO 180 J = 1, K\n                  DO 170 I = 1, LASTC\n                     C( I, J ) = C( I, J ) - WORK( I, J )\n  170             CONTINUE\n  180          CONTINUE\n*\n            END IF\n*\n         ELSE\n*\n*           Let  V =  ( V1  V2 )    (V2: last K columns)\n*           where  V2  is unit lower triangular.\n*\n            IF( LSAME( SIDE, 'L' ) ) THEN\n*\n*              Form  H * C  or  H**T * C  where  C = ( C1 )\n*                                                    ( C2 )\n*\n               LASTV = MAX( K, ILADLC( K, M, V, LDV ) )\n               LASTC = ILADLC( LASTV, N, C, LDC )\n*\n*              W := C**T * V**T  =  (C1**T * V1**T + C2**T * V2**T) (stored in WORK)\n*\n*              W := C2**T\n*\n               DO 190 J = 1, K\n                  CALL DCOPY( LASTC, C( LASTV-K+J, 1 ), LDC,\n     $                 WORK( 1, J ), 1 )\n  190          CONTINUE\n*\n*              W := W * V2**T\n*\n               CALL DTRMM( 'Right', 'Lower', 'Transpose', 'Unit',\n     $              LASTC, K, ONE, V( 1, LASTV-K+1 ), LDV,\n     $              WORK, LDWORK )\n               IF( LASTV.GT.K ) THEN\n*\n*                 W := W + C1**T * V1**T\n*\n                  CALL DGEMM( 'Transpose', 'Transpose',\n     $                 LASTC, K, LASTV-K, ONE, C, LDC, V, LDV,\n     $                 ONE, WORK, LDWORK )\n               END IF\n*\n*              W := W * T**T  or  W * T\n*\n               CALL DTRMM( 'Right', 'Lower', TRANST, 'Non-unit',\n     $              LASTC, K, ONE, T, LDT, WORK, LDWORK )\n*\n*              C := C - V**T * W**T\n*\n               IF( LASTV.GT.K ) THEN\n*\n*                 C1 := C1 - V1**T * W**T\n*\n                  CALL DGEMM( 'Transpose', 'Transpose',\n     $                 LASTV-K, LASTC, K, -ONE, V, LDV, WORK, LDWORK,\n     $                 ONE, C, LDC )\n               END IF\n*\n*              W := W * V2\n*\n               CALL DTRMM( 'Right', 'Lower', 'No transpose', 'Unit',\n     $              LASTC, K, ONE, V( 1, LASTV-K+1 ), LDV,\n     $              WORK, LDWORK )\n*\n*              C2 := C2 - W**T\n*\n               DO 210 J = 1, K\n                  DO 200 I = 1, LASTC\n                     C( LASTV-K+J, I ) = C( LASTV-K+J, I ) - WORK(I, J)\n  200             CONTINUE\n  210          CONTINUE\n*\n            ELSE IF( LSAME( SIDE, 'R' ) ) THEN\n*\n*              Form  C * H  or  C * H**T  where  C = ( C1  C2 )\n*\n               LASTV = MAX( K, ILADLC( K, N, V, LDV ) )\n               LASTC = ILADLR( M, LASTV, C, LDC )\n*\n*              W := C * V**T  =  (C1*V1**T + C2*V2**T)  (stored in WORK)\n*\n*              W := C2\n*\n               DO 220 J = 1, K\n                  CALL DCOPY( LASTC, C( 1, LASTV-K+J ), 1,\n     $                 WORK( 1, J ), 1 )\n  220          CONTINUE\n*\n*              W := W * V2**T\n*\n               CALL DTRMM( 'Right', 'Lower', 'Transpose', 'Unit',\n     $              LASTC, K, ONE, V( 1, LASTV-K+1 ), LDV,\n     $              WORK, LDWORK )\n               IF( LASTV.GT.K ) THEN\n*\n*                 W := W + C1 * V1**T\n*\n                  CALL DGEMM( 'No transpose', 'Transpose',\n     $                 LASTC, K, LASTV-K, ONE, C, LDC, V, LDV,\n     $                 ONE, WORK, LDWORK )\n               END IF\n*\n*              W := W * T  or  W * T**T\n*\n               CALL DTRMM( 'Right', 'Lower', TRANS, 'Non-unit',\n     $              LASTC, K, ONE, T, LDT, WORK, LDWORK )\n*\n*              C := C - W * V\n*\n               IF( LASTV.GT.K ) THEN\n*\n*                 C1 := C1 - W * V1\n*\n                  CALL DGEMM( 'No transpose', 'No transpose',\n     $                 LASTC, LASTV-K, K, -ONE, WORK, LDWORK, V, LDV,\n     $                 ONE, C, LDC )\n               END IF\n*\n*              W := W * V2\n*\n               CALL DTRMM( 'Right', 'Lower', 'No transpose', 'Unit',\n     $              LASTC, K, ONE, V( 1, LASTV-K+1 ), LDV,\n     $              WORK, LDWORK )\n*\n*              C1 := C1 - W\n*\n               DO 240 J = 1, K\n                  DO 230 I = 1, LASTC\n                     C( I, LASTV-K+J ) = C( I, LASTV-K+J ) - WORK(I, J)\n  230             CONTINUE\n  240          CONTINUE\n*\n            END IF\n*\n         END IF\n      END IF\n*\n      RETURN\n*\n*     End of DLARFB\n*\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/dlarfg.f",
    "content": "*> \\brief \\b DLARFG\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*> \\htmlonly\n*> Download DLARFG + dependencies \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarfg.f\"> \n*> [TGZ]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarfg.f\"> \n*> [ZIP]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarfg.f\"> \n*> [TXT]</a>\n*> \\endhtmlonly \n*\n*  Definition:\n*  ===========\n*\n*       SUBROUTINE DLARFG( N, ALPHA, X, INCX, TAU )\n* \n*       .. Scalar Arguments ..\n*       INTEGER            INCX, N\n*       DOUBLE PRECISION   ALPHA, TAU\n*       ..\n*       .. Array Arguments ..\n*       DOUBLE PRECISION   X( * )\n*       ..\n*  \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> DLARFG generates a real elementary reflector H of order n, such\n*> that\n*>\n*>       H * ( alpha ) = ( beta ),   H**T * H = I.\n*>           (   x   )   (   0  )\n*>\n*> where alpha and beta are scalars, and x is an (n-1)-element real\n*> vector. H is represented in the form\n*>\n*>       H = I - tau * ( 1 ) * ( 1 v**T ) ,\n*>                     ( v )\n*>\n*> where tau is a real scalar and v is a real (n-1)-element\n*> vector.\n*>\n*> If the elements of x are all zero, then tau = 0 and H is taken to be\n*> the unit matrix.\n*>\n*> Otherwise  1 <= tau <= 2.\n*> \\endverbatim\n*\n*  Arguments:\n*  ==========\n*\n*> \\param[in] N\n*> \\verbatim\n*>          N is INTEGER\n*>          The order of the elementary reflector.\n*> \\endverbatim\n*>\n*> \\param[in,out] ALPHA\n*> \\verbatim\n*>          ALPHA is DOUBLE PRECISION\n*>          On entry, the value alpha.\n*>          On exit, it is overwritten with the value beta.\n*> \\endverbatim\n*>\n*> \\param[in,out] X\n*> \\verbatim\n*>          X is DOUBLE PRECISION array, dimension\n*>                         (1+(N-2)*abs(INCX))\n*>          On entry, the vector x.\n*>          On exit, it is overwritten with the vector v.\n*> \\endverbatim\n*>\n*> \\param[in] INCX\n*> \\verbatim\n*>          INCX is INTEGER\n*>          The increment between elements of X. INCX > 0.\n*> \\endverbatim\n*>\n*> \\param[out] TAU\n*> \\verbatim\n*>          TAU is DOUBLE PRECISION\n*>          The value tau.\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date November 2011\n*\n*> \\ingroup doubleOTHERauxiliary\n*\n*  =====================================================================\n      SUBROUTINE DLARFG( N, ALPHA, X, INCX, TAU )\n*\n*  -- LAPACK auxiliary routine (version 3.4.0) --\n*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     November 2011\n*\n*     .. Scalar Arguments ..\n      INTEGER            INCX, N\n      DOUBLE PRECISION   ALPHA, TAU\n*     ..\n*     .. Array Arguments ..\n      DOUBLE PRECISION   X( * )\n*     ..\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      DOUBLE PRECISION   ONE, ZERO\n      PARAMETER          ( ONE = 1.0D+0, ZERO = 0.0D+0 )\n*     ..\n*     .. Local Scalars ..\n      INTEGER            J, KNT\n      DOUBLE PRECISION   BETA, RSAFMN, SAFMIN, XNORM\n*     ..\n*     .. External Functions ..\n      DOUBLE PRECISION   DLAMCH, DLAPY2, DNRM2\n      EXTERNAL           DLAMCH, DLAPY2, DNRM2\n*     ..\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, SIGN\n*     ..\n*     .. External Subroutines ..\n      EXTERNAL           DSCAL\n*     ..\n*     .. Executable Statements ..\n*\n      IF( N.LE.1 ) THEN\n         TAU = ZERO\n         RETURN\n      END IF\n*\n      XNORM = DNRM2( N-1, X, INCX )\n*\n      IF( XNORM.EQ.ZERO ) THEN\n*\n*        H  =  I\n*\n         TAU = ZERO\n      ELSE\n*\n*        general case\n*\n         BETA = -SIGN( DLAPY2( ALPHA, XNORM ), ALPHA )\n         SAFMIN = DLAMCH( 'S' ) / DLAMCH( 'E' )\n         KNT = 0\n         IF( ABS( BETA ).LT.SAFMIN ) THEN\n*\n*           XNORM, BETA may be inaccurate; scale X and recompute them\n*\n            RSAFMN = ONE / SAFMIN\n   10       CONTINUE\n            KNT = KNT + 1\n            CALL DSCAL( N-1, RSAFMN, X, INCX )\n            BETA = BETA*RSAFMN\n            ALPHA = ALPHA*RSAFMN\n            IF( ABS( BETA ).LT.SAFMIN )\n     $         GO TO 10\n*\n*           New BETA is at most 1, at least SAFMIN\n*\n            XNORM = DNRM2( N-1, X, INCX )\n            BETA = -SIGN( DLAPY2( ALPHA, XNORM ), ALPHA )\n         END IF\n         TAU = ( BETA-ALPHA ) / BETA\n         CALL DSCAL( N-1, ONE / ( ALPHA-BETA ), X, INCX )\n*\n*        If ALPHA is subnormal, it may lose relative accuracy\n*\n         DO 20 J = 1, KNT\n            BETA = BETA*SAFMIN\n 20      CONTINUE\n         ALPHA = BETA\n      END IF\n*\n      RETURN\n*\n*     End of DLARFG\n*\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/dlarft.f",
    "content": "*> \\brief \\b DLARFT\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*> \\htmlonly\n*> Download DLARFT + dependencies \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarft.f\"> \n*> [TGZ]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarft.f\"> \n*> [ZIP]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarft.f\"> \n*> [TXT]</a>\n*> \\endhtmlonly \n*\n*  Definition:\n*  ===========\n*\n*       SUBROUTINE DLARFT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )\n* \n*       .. Scalar Arguments ..\n*       CHARACTER          DIRECT, STOREV\n*       INTEGER            K, LDT, LDV, N\n*       ..\n*       .. Array Arguments ..\n*       DOUBLE PRECISION   T( LDT, * ), TAU( * ), V( LDV, * )\n*       ..\n*  \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> DLARFT forms the triangular factor T of a real block reflector H\n*> of order n, which is defined as a product of k elementary reflectors.\n*>\n*> If DIRECT = 'F', H = H(1) H(2) . . . H(k) and T is upper triangular;\n*>\n*> If DIRECT = 'B', H = H(k) . . . H(2) H(1) and T is lower triangular.\n*>\n*> If STOREV = 'C', the vector which defines the elementary reflector\n*> H(i) is stored in the i-th column of the array V, and\n*>\n*>    H  =  I - V * T * V**T\n*>\n*> If STOREV = 'R', the vector which defines the elementary reflector\n*> H(i) is stored in the i-th row of the array V, and\n*>\n*>    H  =  I - V**T * T * V\n*> \\endverbatim\n*\n*  Arguments:\n*  ==========\n*\n*> \\param[in] DIRECT\n*> \\verbatim\n*>          DIRECT is CHARACTER*1\n*>          Specifies the order in which the elementary reflectors are\n*>          multiplied to form the block reflector:\n*>          = 'F': H = H(1) H(2) . . . H(k) (Forward)\n*>          = 'B': H = H(k) . . . H(2) H(1) (Backward)\n*> \\endverbatim\n*>\n*> \\param[in] STOREV\n*> \\verbatim\n*>          STOREV is CHARACTER*1\n*>          Specifies how the vectors which define the elementary\n*>          reflectors are stored (see also Further Details):\n*>          = 'C': columnwise\n*>          = 'R': rowwise\n*> \\endverbatim\n*>\n*> \\param[in] N\n*> \\verbatim\n*>          N is INTEGER\n*>          The order of the block reflector H. N >= 0.\n*> \\endverbatim\n*>\n*> \\param[in] K\n*> \\verbatim\n*>          K is INTEGER\n*>          The order of the triangular factor T (= the number of\n*>          elementary reflectors). K >= 1.\n*> \\endverbatim\n*>\n*> \\param[in] V\n*> \\verbatim\n*>          V is DOUBLE PRECISION array, dimension\n*>                               (LDV,K) if STOREV = 'C'\n*>                               (LDV,N) if STOREV = 'R'\n*>          The matrix V. See further details.\n*> \\endverbatim\n*>\n*> \\param[in] LDV\n*> \\verbatim\n*>          LDV is INTEGER\n*>          The leading dimension of the array V.\n*>          If STOREV = 'C', LDV >= max(1,N); if STOREV = 'R', LDV >= K.\n*> \\endverbatim\n*>\n*> \\param[in] TAU\n*> \\verbatim\n*>          TAU is DOUBLE PRECISION array, dimension (K)\n*>          TAU(i) must contain the scalar factor of the elementary\n*>          reflector H(i).\n*> \\endverbatim\n*>\n*> \\param[out] T\n*> \\verbatim\n*>          T is DOUBLE PRECISION array, dimension (LDT,K)\n*>          The k by k triangular factor T of the block reflector.\n*>          If DIRECT = 'F', T is upper triangular; if DIRECT = 'B', T is\n*>          lower triangular. The rest of the array is not used.\n*> \\endverbatim\n*>\n*> \\param[in] LDT\n*> \\verbatim\n*>          LDT is INTEGER\n*>          The leading dimension of the array T. LDT >= K.\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date April 2012\n*\n*> \\ingroup doubleOTHERauxiliary\n*\n*> \\par Further Details:\n*  =====================\n*>\n*> \\verbatim\n*>\n*>  The shape of the matrix V and the storage of the vectors which define\n*>  the H(i) is best illustrated by the following example with n = 5 and\n*>  k = 3. The elements equal to 1 are not stored.\n*>\n*>  DIRECT = 'F' and STOREV = 'C':         DIRECT = 'F' and STOREV = 'R':\n*>\n*>               V = (  1       )                 V = (  1 v1 v1 v1 v1 )\n*>                   ( v1  1    )                     (     1 v2 v2 v2 )\n*>                   ( v1 v2  1 )                     (        1 v3 v3 )\n*>                   ( v1 v2 v3 )\n*>                   ( v1 v2 v3 )\n*>\n*>  DIRECT = 'B' and STOREV = 'C':         DIRECT = 'B' and STOREV = 'R':\n*>\n*>               V = ( v1 v2 v3 )                 V = ( v1 v1  1       )\n*>                   ( v1 v2 v3 )                     ( v2 v2 v2  1    )\n*>                   (  1 v2 v3 )                     ( v3 v3 v3 v3  1 )\n*>                   (     1 v3 )\n*>                   (        1 )\n*> \\endverbatim\n*>\n*  =====================================================================\n      SUBROUTINE DLARFT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )\n*\n*  -- LAPACK auxiliary routine (version 3.4.1) --\n*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     April 2012\n*\n*     .. Scalar Arguments ..\n      CHARACTER          DIRECT, STOREV\n      INTEGER            K, LDT, LDV, N\n*     ..\n*     .. Array Arguments ..\n      DOUBLE PRECISION   T( LDT, * ), TAU( * ), V( LDV, * )\n*     ..\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      DOUBLE PRECISION   ONE, ZERO\n      PARAMETER          ( ONE = 1.0D+0, ZERO = 0.0D+0 )\n*     ..\n*     .. Local Scalars ..\n      INTEGER            I, J, PREVLASTV, LASTV\n*     ..\n*     .. External Subroutines ..\n      EXTERNAL           DGEMV, DTRMV\n*     ..\n*     .. External Functions ..\n      LOGICAL            LSAME\n      EXTERNAL           LSAME\n*     ..\n*     .. Executable Statements ..\n*\n*     Quick return if possible\n*\n      IF( N.EQ.0 )\n     $   RETURN\n*\n      IF( LSAME( DIRECT, 'F' ) ) THEN\n         PREVLASTV = N\n         DO I = 1, K\n            PREVLASTV = MAX( I, PREVLASTV )\n            IF( TAU( I ).EQ.ZERO ) THEN\n*\n*              H(i)  =  I\n*\n               DO J = 1, I\n                  T( J, I ) = ZERO\n               END DO\n            ELSE\n*\n*              general case\n*\n               IF( LSAME( STOREV, 'C' ) ) THEN\n*                 Skip any trailing zeros.\n                  DO LASTV = N, I+1, -1\n                     IF( V( LASTV, I ).NE.ZERO ) EXIT\n                  END DO\n                  DO J = 1, I-1\n                     T( J, I ) = -TAU( I ) * V( I , J )\n                  END DO   \n                  J = MIN( LASTV, PREVLASTV )\n*\n*                 T(1:i-1,i) := - tau(i) * V(i:j,1:i-1)**T * V(i:j,i)\n*\n                  CALL DGEMV( 'Transpose', J-I, I-1, -TAU( I ), \n     $                        V( I+1, 1 ), LDV, V( I+1, I ), 1, ONE, \n     $                        T( 1, I ), 1 )\n               ELSE\n*                 Skip any trailing zeros.\n                  DO LASTV = N, I+1, -1\n                     IF( V( I, LASTV ).NE.ZERO ) EXIT\n                  END DO\n                  DO J = 1, I-1\n                     T( J, I ) = -TAU( I ) * V( J , I )\n                  END DO   \n                  J = MIN( LASTV, PREVLASTV )\n*\n*                 T(1:i-1,i) := - tau(i) * V(1:i-1,i:j) * V(i,i:j)**T\n*\n                  CALL DGEMV( 'No transpose', I-1, J-I, -TAU( I ),\n     $                        V( 1, I+1 ), LDV, V( I, I+1 ), LDV, ONE,\n     $                        T( 1, I ), 1 )\n               END IF\n*\n*              T(1:i-1,i) := T(1:i-1,1:i-1) * T(1:i-1,i)\n*\n               CALL DTRMV( 'Upper', 'No transpose', 'Non-unit', I-1, T,\n     $                     LDT, T( 1, I ), 1 )\n               T( I, I ) = TAU( I )\n               IF( I.GT.1 ) THEN\n                  PREVLASTV = MAX( PREVLASTV, LASTV )\n               ELSE\n                  PREVLASTV = LASTV\n               END IF\n            END IF\n         END DO\n      ELSE\n         PREVLASTV = 1\n         DO I = K, 1, -1\n            IF( TAU( I ).EQ.ZERO ) THEN\n*\n*              H(i)  =  I\n*\n               DO J = I, K\n                  T( J, I ) = ZERO\n               END DO\n            ELSE\n*\n*              general case\n*\n               IF( I.LT.K ) THEN\n                  IF( LSAME( STOREV, 'C' ) ) THEN\n*                    Skip any leading zeros.\n                     DO LASTV = 1, I-1\n                        IF( V( LASTV, I ).NE.ZERO ) EXIT\n                     END DO\n                     DO J = I+1, K\n                        T( J, I ) = -TAU( I ) * V( N-K+I , J )\n                     END DO   \n                     J = MAX( LASTV, PREVLASTV )\n*\n*                    T(i+1:k,i) = -tau(i) * V(j:n-k+i,i+1:k)**T * V(j:n-k+i,i)\n*\n                     CALL DGEMV( 'Transpose', N-K+I-J, K-I, -TAU( I ),\n     $                           V( J, I+1 ), LDV, V( J, I ), 1, ONE,\n     $                           T( I+1, I ), 1 )\n                  ELSE\n*                    Skip any leading zeros.\n                     DO LASTV = 1, I-1\n                        IF( V( I, LASTV ).NE.ZERO ) EXIT\n                     END DO\n                     DO J = I+1, K\n                        T( J, I ) = -TAU( I ) * V( J, N-K+I )\n                     END DO   \n                     J = MAX( LASTV, PREVLASTV )\n*\n*                    T(i+1:k,i) = -tau(i) * V(i+1:k,j:n-k+i) * V(i,j:n-k+i)**T\n*\n                     CALL DGEMV( 'No transpose', K-I, N-K+I-J,\n     $                    -TAU( I ), V( I+1, J ), LDV, V( I, J ), LDV,\n     $                    ONE, T( I+1, I ), 1 )\n                  END IF\n*\n*                 T(i+1:k,i) := T(i+1:k,i+1:k) * T(i+1:k,i)\n*\n                  CALL DTRMV( 'Lower', 'No transpose', 'Non-unit', K-I,\n     $                        T( I+1, I+1 ), LDT, T( I+1, I ), 1 )\n                  IF( I.GT.1 ) THEN\n                     PREVLASTV = MIN( PREVLASTV, LASTV )\n                  ELSE\n                     PREVLASTV = LASTV\n                  END IF\n               END IF\n               T( I, I ) = TAU( I )\n            END IF\n         END DO\n      END IF\n      RETURN\n*\n*     End of DLARFT\n*\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/double.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009-2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define SCALAR        double\n#define SCALAR_SUFFIX d\n#define SCALAR_SUFFIX_UP \"D\"\n#define ISCOMPLEX     0\n\n#include \"cholesky.cpp\"\n#include \"lu.cpp\"\n#include \"eigenvalues.cpp\"\n#include \"svd.cpp\"\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/dsecnd_NONE.f",
    "content": "*> \\brief \\b DSECND returns nothing\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*  Definition:\n*  ===========\n*\n*      DOUBLE PRECISION FUNCTION DSECND( )\n*  \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*>  DSECND returns nothing instead of returning the user time for a process in seconds.\n*>  If you are using that routine, it means that neither EXTERNAL ETIME,\n*>  EXTERNAL ETIME_, INTERNAL ETIME, INTERNAL CPU_TIME is available  on\n*>  your machine.\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date November 2011\n*\n*> \\ingroup auxOTHERauxiliary\n*\n*  =====================================================================\n      DOUBLE PRECISION FUNCTION DSECND( )\n*\n*  -- LAPACK auxiliary routine (version 3.4.0) --\n*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     November 2011\n*\n* =====================================================================\n*\n      DSECND = 0.0D+0\n      RETURN\n*\n*     End of DSECND\n*\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/eigenvalues.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2011 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"lapack_common.h\"\n#include <Eigen/Eigenvalues>\n\n// computes eigen values and vectors of a general N-by-N matrix A\nEIGEN_LAPACK_FUNC(syev,(char *jobz, char *uplo, int* n, Scalar* a, int *lda, Scalar* w, Scalar* /*work*/, int* lwork, int *info))\n{\n  // TODO exploit the work buffer\n  bool query_size = *lwork==-1;\n  \n  *info = 0;\n        if(*jobz!='N' && *jobz!='V')                    *info = -1;\n  else  if(UPLO(*uplo)==INVALID)                        *info = -2;\n  else  if(*n<0)                                        *info = -3;\n  else  if(*lda<std::max(1,*n))                         *info = -5;\n  else  if((!query_size) && *lwork<std::max(1,3**n-1))  *info = -8;\n    \n  if(*info!=0)\n  {\n    int e = -*info;\n    return xerbla_(SCALAR_SUFFIX_UP\"SYEV \", &e, 6);\n  }\n  \n  if(query_size)\n  {\n    *lwork = 0;\n    return 0;\n  }\n  \n  if(*n==0)\n    return 0;\n  \n  PlainMatrixType mat(*n,*n);\n  if(UPLO(*uplo)==UP) mat = matrix(a,*n,*n,*lda).adjoint();\n  else                mat = matrix(a,*n,*n,*lda);\n  \n  bool computeVectors = *jobz=='V' || *jobz=='v';\n  SelfAdjointEigenSolver<PlainMatrixType> eig(mat,computeVectors?ComputeEigenvectors:EigenvaluesOnly);\n  \n  if(eig.info()==NoConvergence)\n  {\n    make_vector(w,*n).setZero();\n    if(computeVectors)\n      matrix(a,*n,*n,*lda).setIdentity();\n    //*info = 1;\n    return 0;\n  }\n  \n  make_vector(w,*n) = eig.eigenvalues();\n  if(computeVectors)\n    matrix(a,*n,*n,*lda) = eig.eigenvectors();\n  \n  return 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/ilaclc.f",
    "content": "*> \\brief \\b ILACLC\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*> \\htmlonly\n*> Download ILACLC + dependencies \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ilaclc.f\"> \n*> [TGZ]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ilaclc.f\"> \n*> [ZIP]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ilaclc.f\"> \n*> [TXT]</a>\n*> \\endhtmlonly \n*\n*  Definition:\n*  ===========\n*\n*       INTEGER FUNCTION ILACLC( M, N, A, LDA )\n* \n*       .. Scalar Arguments ..\n*       INTEGER            M, N, LDA\n*       ..\n*       .. Array Arguments ..\n*       COMPLEX            A( LDA, * )\n*       ..\n*  \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> ILACLC scans A for its last non-zero column.\n*> \\endverbatim\n*\n*  Arguments:\n*  ==========\n*\n*> \\param[in] M\n*> \\verbatim\n*>          M is INTEGER\n*>          The number of rows of the matrix A.\n*> \\endverbatim\n*>\n*> \\param[in] N\n*> \\verbatim\n*>          N is INTEGER\n*>          The number of columns of the matrix A.\n*> \\endverbatim\n*>\n*> \\param[in] A\n*> \\verbatim\n*>          A is COMPLEX array, dimension (LDA,N)\n*>          The m by n matrix A.\n*> \\endverbatim\n*>\n*> \\param[in] LDA\n*> \\verbatim\n*>          LDA is INTEGER\n*>          The leading dimension of the array A. LDA >= max(1,M).\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date November 2011\n*\n*> \\ingroup complexOTHERauxiliary\n*\n*  =====================================================================\n      INTEGER FUNCTION ILACLC( M, N, A, LDA )\n*\n*  -- LAPACK auxiliary routine (version 3.4.0) --\n*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     November 2011\n*\n*     .. Scalar Arguments ..\n      INTEGER            M, N, LDA\n*     ..\n*     .. Array Arguments ..\n      COMPLEX            A( LDA, * )\n*     ..\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      COMPLEX          ZERO\n      PARAMETER ( ZERO = (0.0E+0, 0.0E+0) )\n*     ..\n*     .. Local Scalars ..\n      INTEGER I\n*     ..\n*     .. Executable Statements ..\n*\n*     Quick test for the common case where one corner is non-zero.\n      IF( N.EQ.0 ) THEN\n         ILACLC = N\n      ELSE IF( A(1, N).NE.ZERO .OR. A(M, N).NE.ZERO ) THEN\n         ILACLC = N\n      ELSE\n*     Now scan each column from the end, returning with the first non-zero.\n         DO ILACLC = N, 1, -1\n            DO I = 1, M\n               IF( A(I, ILACLC).NE.ZERO ) RETURN\n            END DO\n         END DO\n      END IF\n      RETURN\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/ilaclr.f",
    "content": "*> \\brief \\b ILACLR\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*> \\htmlonly\n*> Download ILACLR + dependencies \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ilaclr.f\"> \n*> [TGZ]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ilaclr.f\"> \n*> [ZIP]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ilaclr.f\"> \n*> [TXT]</a>\n*> \\endhtmlonly \n*\n*  Definition:\n*  ===========\n*\n*       INTEGER FUNCTION ILACLR( M, N, A, LDA )\n* \n*       .. Scalar Arguments ..\n*       INTEGER            M, N, LDA\n*       ..\n*       .. Array Arguments ..\n*       COMPLEX            A( LDA, * )\n*       ..\n*  \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> ILACLR scans A for its last non-zero row.\n*> \\endverbatim\n*\n*  Arguments:\n*  ==========\n*\n*> \\param[in] M\n*> \\verbatim\n*>          M is INTEGER\n*>          The number of rows of the matrix A.\n*> \\endverbatim\n*>\n*> \\param[in] N\n*> \\verbatim\n*>          N is INTEGER\n*>          The number of columns of the matrix A.\n*> \\endverbatim\n*>\n*> \\param[in] A\n*> \\verbatim\n*>          A is array, dimension (LDA,N)\n*>          The m by n matrix A.\n*> \\endverbatim\n*>\n*> \\param[in] LDA\n*> \\verbatim\n*>          LDA is INTEGER\n*>          The leading dimension of the array A. LDA >= max(1,M).\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date April 2012\n*\n*> \\ingroup complexOTHERauxiliary\n*\n*  =====================================================================\n      INTEGER FUNCTION ILACLR( M, N, A, LDA )\n*\n*  -- LAPACK auxiliary routine (version 3.4.1) --\n*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     April 2012\n*\n*     .. Scalar Arguments ..\n      INTEGER            M, N, LDA\n*     ..\n*     .. Array Arguments ..\n      COMPLEX            A( LDA, * )\n*     ..\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      COMPLEX          ZERO\n      PARAMETER ( ZERO = (0.0E+0, 0.0E+0) )\n*     ..\n*     .. Local Scalars ..\n      INTEGER I, J\n*     ..\n*     .. Executable Statements ..\n*\n*     Quick test for the common case where one corner is non-zero.\n      IF( M.EQ.0 ) THEN\n         ILACLR = M\n      ELSE IF( A(M, 1).NE.ZERO .OR. A(M, N).NE.ZERO ) THEN\n         ILACLR = M\n      ELSE\n*     Scan up each column tracking the last zero row seen.\n         ILACLR = 0\n         DO J = 1, N\n            I=M\n            DO WHILE((A(MAX(I,1),J).EQ.ZERO).AND.(I.GE.1))\n               I=I-1\n            ENDDO\n            ILACLR = MAX( ILACLR, I )\n         END DO\n      END IF\n      RETURN\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/iladlc.f",
    "content": "*> \\brief \\b ILADLC\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*> \\htmlonly\n*> Download ILADLC + dependencies \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/iladlc.f\"> \n*> [TGZ]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/iladlc.f\"> \n*> [ZIP]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/iladlc.f\"> \n*> [TXT]</a>\n*> \\endhtmlonly \n*\n*  Definition:\n*  ===========\n*\n*       INTEGER FUNCTION ILADLC( M, N, A, LDA )\n* \n*       .. Scalar Arguments ..\n*       INTEGER            M, N, LDA\n*       ..\n*       .. Array Arguments ..\n*       DOUBLE PRECISION   A( LDA, * )\n*       ..\n*  \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> ILADLC scans A for its last non-zero column.\n*> \\endverbatim\n*\n*  Arguments:\n*  ==========\n*\n*> \\param[in] M\n*> \\verbatim\n*>          M is INTEGER\n*>          The number of rows of the matrix A.\n*> \\endverbatim\n*>\n*> \\param[in] N\n*> \\verbatim\n*>          N is INTEGER\n*>          The number of columns of the matrix A.\n*> \\endverbatim\n*>\n*> \\param[in] A\n*> \\verbatim\n*>          A is DOUBLE PRECISION array, dimension (LDA,N)\n*>          The m by n matrix A.\n*> \\endverbatim\n*>\n*> \\param[in] LDA\n*> \\verbatim\n*>          LDA is INTEGER\n*>          The leading dimension of the array A. LDA >= max(1,M).\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date November 2011\n*\n*> \\ingroup auxOTHERauxiliary\n*\n*  =====================================================================\n      INTEGER FUNCTION ILADLC( M, N, A, LDA )\n*\n*  -- LAPACK auxiliary routine (version 3.4.0) --\n*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     November 2011\n*\n*     .. Scalar Arguments ..\n      INTEGER            M, N, LDA\n*     ..\n*     .. Array Arguments ..\n      DOUBLE PRECISION   A( LDA, * )\n*     ..\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      DOUBLE PRECISION ZERO\n      PARAMETER ( ZERO = 0.0D+0 )\n*     ..\n*     .. Local Scalars ..\n      INTEGER I\n*     ..\n*     .. Executable Statements ..\n*\n*     Quick test for the common case where one corner is non-zero.\n      IF( N.EQ.0 ) THEN\n         ILADLC = N\n      ELSE IF( A(1, N).NE.ZERO .OR. A(M, N).NE.ZERO ) THEN\n         ILADLC = N\n      ELSE\n*     Now scan each column from the end, returning with the first non-zero.\n         DO ILADLC = N, 1, -1\n            DO I = 1, M\n               IF( A(I, ILADLC).NE.ZERO ) RETURN\n            END DO\n         END DO\n      END IF\n      RETURN\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/iladlr.f",
    "content": "*> \\brief \\b ILADLR\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*> \\htmlonly\n*> Download ILADLR + dependencies \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/iladlr.f\"> \n*> [TGZ]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/iladlr.f\"> \n*> [ZIP]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/iladlr.f\"> \n*> [TXT]</a>\n*> \\endhtmlonly \n*\n*  Definition:\n*  ===========\n*\n*       INTEGER FUNCTION ILADLR( M, N, A, LDA )\n* \n*       .. Scalar Arguments ..\n*       INTEGER            M, N, LDA\n*       ..\n*       .. Array Arguments ..\n*       DOUBLE PRECISION   A( LDA, * )\n*       ..\n*  \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> ILADLR scans A for its last non-zero row.\n*> \\endverbatim\n*\n*  Arguments:\n*  ==========\n*\n*> \\param[in] M\n*> \\verbatim\n*>          M is INTEGER\n*>          The number of rows of the matrix A.\n*> \\endverbatim\n*>\n*> \\param[in] N\n*> \\verbatim\n*>          N is INTEGER\n*>          The number of columns of the matrix A.\n*> \\endverbatim\n*>\n*> \\param[in] A\n*> \\verbatim\n*>          A is DOUBLE PRECISION array, dimension (LDA,N)\n*>          The m by n matrix A.\n*> \\endverbatim\n*>\n*> \\param[in] LDA\n*> \\verbatim\n*>          LDA is INTEGER\n*>          The leading dimension of the array A. LDA >= max(1,M).\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date April 2012\n*\n*> \\ingroup auxOTHERauxiliary\n*\n*  =====================================================================\n      INTEGER FUNCTION ILADLR( M, N, A, LDA )\n*\n*  -- LAPACK auxiliary routine (version 3.4.1) --\n*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     April 2012\n*\n*     .. Scalar Arguments ..\n      INTEGER            M, N, LDA\n*     ..\n*     .. Array Arguments ..\n      DOUBLE PRECISION   A( LDA, * )\n*     ..\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      DOUBLE PRECISION ZERO\n      PARAMETER ( ZERO = 0.0D+0 )\n*     ..\n*     .. Local Scalars ..\n      INTEGER I, J\n*     ..\n*     .. Executable Statements ..\n*\n*     Quick test for the common case where one corner is non-zero.\n      IF( M.EQ.0 ) THEN\n         ILADLR = M\n      ELSE IF( A(M, 1).NE.ZERO .OR. A(M, N).NE.ZERO ) THEN\n         ILADLR = M\n      ELSE\n*     Scan up each column tracking the last zero row seen.\n         ILADLR = 0\n         DO J = 1, N\n            I=M\n            DO WHILE((A(MAX(I,1),J).EQ.ZERO).AND.(I.GE.1))\n               I=I-1\n            ENDDO\n            ILADLR = MAX( ILADLR, I )\n         END DO\n      END IF\n      RETURN\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/ilaslc.f",
    "content": "*> \\brief \\b ILASLC\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*> \\htmlonly\n*> Download ILASLC + dependencies \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ilaslc.f\"> \n*> [TGZ]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ilaslc.f\"> \n*> [ZIP]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ilaslc.f\"> \n*> [TXT]</a>\n*> \\endhtmlonly \n*\n*  Definition:\n*  ===========\n*\n*       INTEGER FUNCTION ILASLC( M, N, A, LDA )\n* \n*       .. Scalar Arguments ..\n*       INTEGER            M, N, LDA\n*       ..\n*       .. Array Arguments ..\n*       REAL               A( LDA, * )\n*       ..\n*  \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> ILASLC scans A for its last non-zero column.\n*> \\endverbatim\n*\n*  Arguments:\n*  ==========\n*\n*> \\param[in] M\n*> \\verbatim\n*>          M is INTEGER\n*>          The number of rows of the matrix A.\n*> \\endverbatim\n*>\n*> \\param[in] N\n*> \\verbatim\n*>          N is INTEGER\n*>          The number of columns of the matrix A.\n*> \\endverbatim\n*>\n*> \\param[in] A\n*> \\verbatim\n*>          A is REAL array, dimension (LDA,N)\n*>          The m by n matrix A.\n*> \\endverbatim\n*>\n*> \\param[in] LDA\n*> \\verbatim\n*>          LDA is INTEGER\n*>          The leading dimension of the array A. LDA >= max(1,M).\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date November 2011\n*\n*> \\ingroup realOTHERauxiliary\n*\n*  =====================================================================\n      INTEGER FUNCTION ILASLC( M, N, A, LDA )\n*\n*  -- LAPACK auxiliary routine (version 3.4.0) --\n*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     November 2011\n*\n*     .. Scalar Arguments ..\n      INTEGER            M, N, LDA\n*     ..\n*     .. Array Arguments ..\n      REAL               A( LDA, * )\n*     ..\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      REAL             ZERO\n      PARAMETER ( ZERO = 0.0D+0 )\n*     ..\n*     .. Local Scalars ..\n      INTEGER I\n*     ..\n*     .. Executable Statements ..\n*\n*     Quick test for the common case where one corner is non-zero.\n      IF( N.EQ.0 ) THEN\n         ILASLC = N\n      ELSE IF( A(1, N).NE.ZERO .OR. A(M, N).NE.ZERO ) THEN\n         ILASLC = N\n      ELSE\n*     Now scan each column from the end, returning with the first non-zero.\n         DO ILASLC = N, 1, -1\n            DO I = 1, M\n               IF( A(I, ILASLC).NE.ZERO ) RETURN\n            END DO\n         END DO\n      END IF\n      RETURN\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/ilaslr.f",
    "content": "*> \\brief \\b ILASLR\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*> \\htmlonly\n*> Download ILASLR + dependencies \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ilaslr.f\"> \n*> [TGZ]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ilaslr.f\"> \n*> [ZIP]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ilaslr.f\"> \n*> [TXT]</a>\n*> \\endhtmlonly \n*\n*  Definition:\n*  ===========\n*\n*       INTEGER FUNCTION ILASLR( M, N, A, LDA )\n* \n*       .. Scalar Arguments ..\n*       INTEGER            M, N, LDA\n*       ..\n*       .. Array Arguments ..\n*       REAL               A( LDA, * )\n*       ..\n*  \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> ILASLR scans A for its last non-zero row.\n*> \\endverbatim\n*\n*  Arguments:\n*  ==========\n*\n*> \\param[in] M\n*> \\verbatim\n*>          M is INTEGER\n*>          The number of rows of the matrix A.\n*> \\endverbatim\n*>\n*> \\param[in] N\n*> \\verbatim\n*>          N is INTEGER\n*>          The number of columns of the matrix A.\n*> \\endverbatim\n*>\n*> \\param[in] A\n*> \\verbatim\n*>          A is REAL array, dimension (LDA,N)\n*>          The m by n matrix A.\n*> \\endverbatim\n*>\n*> \\param[in] LDA\n*> \\verbatim\n*>          LDA is INTEGER\n*>          The leading dimension of the array A. LDA >= max(1,M).\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date April 2012\n*\n*> \\ingroup realOTHERauxiliary\n*\n*  =====================================================================\n      INTEGER FUNCTION ILASLR( M, N, A, LDA )\n*\n*  -- LAPACK auxiliary routine (version 3.4.1) --\n*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     April 2012\n*\n*     .. Scalar Arguments ..\n      INTEGER            M, N, LDA\n*     ..\n*     .. Array Arguments ..\n      REAL               A( LDA, * )\n*     ..\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      REAL             ZERO\n      PARAMETER ( ZERO = 0.0E+0 )\n*     ..\n*     .. Local Scalars ..\n      INTEGER I, J\n*     ..\n*     .. Executable Statements ..\n*\n*     Quick test for the common case where one corner is non-zero.\n      IF( M.EQ.0 ) THEN\n         ILASLR = M\n      ELSEIF( A(M, 1).NE.ZERO .OR. A(M, N).NE.ZERO ) THEN\n         ILASLR = M\n      ELSE\n*     Scan up each column tracking the last zero row seen.\n         ILASLR = 0\n         DO J = 1, N\n            I=M\n            DO WHILE((A(MAX(I,1),J).EQ.ZERO).AND.(I.GE.1))\n               I=I-1\n            ENDDO\n            ILASLR = MAX( ILASLR, I )\n         END DO\n      END IF\n      RETURN\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/ilazlc.f",
    "content": "*> \\brief \\b ILAZLC\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*> \\htmlonly\n*> Download ILAZLC + dependencies \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ilazlc.f\"> \n*> [TGZ]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ilazlc.f\"> \n*> [ZIP]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ilazlc.f\"> \n*> [TXT]</a>\n*> \\endhtmlonly \n*\n*  Definition:\n*  ===========\n*\n*       INTEGER FUNCTION ILAZLC( M, N, A, LDA )\n* \n*       .. Scalar Arguments ..\n*       INTEGER            M, N, LDA\n*       ..\n*       .. Array Arguments ..\n*       COMPLEX*16         A( LDA, * )\n*       ..\n*  \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> ILAZLC scans A for its last non-zero column.\n*> \\endverbatim\n*\n*  Arguments:\n*  ==========\n*\n*> \\param[in] M\n*> \\verbatim\n*>          M is INTEGER\n*>          The number of rows of the matrix A.\n*> \\endverbatim\n*>\n*> \\param[in] N\n*> \\verbatim\n*>          N is INTEGER\n*>          The number of columns of the matrix A.\n*> \\endverbatim\n*>\n*> \\param[in] A\n*> \\verbatim\n*>          A is COMPLEX*16 array, dimension (LDA,N)\n*>          The m by n matrix A.\n*> \\endverbatim\n*>\n*> \\param[in] LDA\n*> \\verbatim\n*>          LDA is INTEGER\n*>          The leading dimension of the array A. LDA >= max(1,M).\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date November 2011\n*\n*> \\ingroup complex16OTHERauxiliary\n*\n*  =====================================================================\n      INTEGER FUNCTION ILAZLC( M, N, A, LDA )\n*\n*  -- LAPACK auxiliary routine (version 3.4.0) --\n*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     November 2011\n*\n*     .. Scalar Arguments ..\n      INTEGER            M, N, LDA\n*     ..\n*     .. Array Arguments ..\n      COMPLEX*16         A( LDA, * )\n*     ..\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      COMPLEX*16       ZERO\n      PARAMETER ( ZERO = (0.0D+0, 0.0D+0) )\n*     ..\n*     .. Local Scalars ..\n      INTEGER I\n*     ..\n*     .. Executable Statements ..\n*\n*     Quick test for the common case where one corner is non-zero.\n      IF( N.EQ.0 ) THEN\n         ILAZLC = N\n      ELSE IF( A(1, N).NE.ZERO .OR. A(M, N).NE.ZERO ) THEN\n         ILAZLC = N\n      ELSE\n*     Now scan each column from the end, returning with the first non-zero.\n         DO ILAZLC = N, 1, -1\n            DO I = 1, M\n               IF( A(I, ILAZLC).NE.ZERO ) RETURN\n            END DO\n         END DO\n      END IF\n      RETURN\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/ilazlr.f",
    "content": "*> \\brief \\b ILAZLR\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*> \\htmlonly\n*> Download ILAZLR + dependencies \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ilazlr.f\"> \n*> [TGZ]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ilazlr.f\"> \n*> [ZIP]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ilazlr.f\"> \n*> [TXT]</a>\n*> \\endhtmlonly \n*\n*  Definition:\n*  ===========\n*\n*       INTEGER FUNCTION ILAZLR( M, N, A, LDA )\n* \n*       .. Scalar Arguments ..\n*       INTEGER            M, N, LDA\n*       ..\n*       .. Array Arguments ..\n*       COMPLEX*16         A( LDA, * )\n*       ..\n*  \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> ILAZLR scans A for its last non-zero row.\n*> \\endverbatim\n*\n*  Arguments:\n*  ==========\n*\n*> \\param[in] M\n*> \\verbatim\n*>          M is INTEGER\n*>          The number of rows of the matrix A.\n*> \\endverbatim\n*>\n*> \\param[in] N\n*> \\verbatim\n*>          N is INTEGER\n*>          The number of columns of the matrix A.\n*> \\endverbatim\n*>\n*> \\param[in] A\n*> \\verbatim\n*>          A is COMPLEX*16 array, dimension (LDA,N)\n*>          The m by n matrix A.\n*> \\endverbatim\n*>\n*> \\param[in] LDA\n*> \\verbatim\n*>          LDA is INTEGER\n*>          The leading dimension of the array A. LDA >= max(1,M).\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date April 2012\n*\n*> \\ingroup complex16OTHERauxiliary\n*\n*  =====================================================================\n      INTEGER FUNCTION ILAZLR( M, N, A, LDA )\n*\n*  -- LAPACK auxiliary routine (version 3.4.1) --\n*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     April 2012\n*\n*     .. Scalar Arguments ..\n      INTEGER            M, N, LDA\n*     ..\n*     .. Array Arguments ..\n      COMPLEX*16         A( LDA, * )\n*     ..\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      COMPLEX*16       ZERO\n      PARAMETER ( ZERO = (0.0D+0, 0.0D+0) )\n*     ..\n*     .. Local Scalars ..\n      INTEGER I, J\n*     ..\n*     .. Executable Statements ..\n*\n*     Quick test for the common case where one corner is non-zero.\n      IF( M.EQ.0 ) THEN\n         ILAZLR = M\n      ELSE IF( A(M, 1).NE.ZERO .OR. A(M, N).NE.ZERO ) THEN\n         ILAZLR = M\n      ELSE\n*     Scan up each column tracking the last zero row seen.\n         ILAZLR = 0\n         DO J = 1, N\n            I=M\n            DO WHILE((A(MAX(I,1),J).EQ.ZERO).AND.(I.GE.1))\n               I=I-1\n            ENDDO\n            ILAZLR = MAX( ILAZLR, I )\n         END DO\n      END IF\n      RETURN\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/lapack_common.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010-2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_LAPACK_COMMON_H\n#define EIGEN_LAPACK_COMMON_H\n\n#include \"../blas/common.h\"\n#include \"../Eigen/src/misc/lapack.h\"\n\n#define EIGEN_LAPACK_FUNC(FUNC,ARGLIST)               \\\n  extern \"C\" { int EIGEN_BLAS_FUNC(FUNC) ARGLIST; }   \\\n  int EIGEN_BLAS_FUNC(FUNC) ARGLIST\n\ntypedef Eigen::Map<Eigen::Transpositions<Eigen::Dynamic,Eigen::Dynamic,int> > PivotsType;\n\n#if ISCOMPLEX\n#define EIGEN_LAPACK_ARG_IF_COMPLEX(X) X,\n#else\n#define EIGEN_LAPACK_ARG_IF_COMPLEX(X)\n#endif\n\n\n#endif // EIGEN_LAPACK_COMMON_H\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/lu.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010-2011 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"common.h\"\n#include <Eigen/LU>\n\n// computes an LU factorization of a general M-by-N matrix A using partial pivoting with row interchanges\nEIGEN_LAPACK_FUNC(getrf,(int *m, int *n, RealScalar *pa, int *lda, int *ipiv, int *info))\n{\n  *info = 0;\n        if(*m<0)                  *info = -1;\n  else  if(*n<0)                  *info = -2;\n  else  if(*lda<std::max(1,*m))   *info = -4;\n  if(*info!=0)\n  {\n    int e = -*info;\n    return xerbla_(SCALAR_SUFFIX_UP\"GETRF\", &e, 6);\n  }\n\n  if(*m==0 || *n==0)\n    return 0;\n\n  Scalar* a = reinterpret_cast<Scalar*>(pa);\n  int nb_transpositions;\n  int ret = int(Eigen::internal::partial_lu_impl<Scalar,ColMajor,int>\n                     ::blocked_lu(*m, *n, a, *lda, ipiv, nb_transpositions));\n\n  for(int i=0; i<std::min(*m,*n); ++i)\n    ipiv[i]++;\n\n  if(ret>=0)\n    *info = ret+1;\n\n  return 0;\n}\n\n//GETRS solves a system of linear equations\n//    A * X = B  or  A' * X = B\n//  with a general N-by-N matrix A using the LU factorization computed  by GETRF\nEIGEN_LAPACK_FUNC(getrs,(char *trans, int *n, int *nrhs, RealScalar *pa, int *lda, int *ipiv, RealScalar *pb, int *ldb, int *info))\n{\n  *info = 0;\n        if(OP(*trans)==INVALID)  *info = -1;\n  else  if(*n<0)                 *info = -2;\n  else  if(*nrhs<0)              *info = -3;\n  else  if(*lda<std::max(1,*n))  *info = -5;\n  else  if(*ldb<std::max(1,*n))  *info = -8;\n  if(*info!=0)\n  {\n    int e = -*info;\n    return xerbla_(SCALAR_SUFFIX_UP\"GETRS\", &e, 6);\n  }\n\n  Scalar* a = reinterpret_cast<Scalar*>(pa);\n  Scalar* b = reinterpret_cast<Scalar*>(pb);\n  MatrixType lu(a,*n,*n,*lda);\n  MatrixType B(b,*n,*nrhs,*ldb);\n\n  for(int i=0; i<*n; ++i)\n    ipiv[i]--;\n  if(OP(*trans)==NOTR)\n  {\n    B = PivotsType(ipiv,*n) * B;\n    lu.triangularView<UnitLower>().solveInPlace(B);\n    lu.triangularView<Upper>().solveInPlace(B);\n  }\n  else if(OP(*trans)==TR)\n  {\n    lu.triangularView<Upper>().transpose().solveInPlace(B);\n    lu.triangularView<UnitLower>().transpose().solveInPlace(B);\n    B = PivotsType(ipiv,*n).transpose() * B;\n  }\n  else if(OP(*trans)==ADJ)\n  {\n    lu.triangularView<Upper>().adjoint().solveInPlace(B);\n    lu.triangularView<UnitLower>().adjoint().solveInPlace(B);\n    B = PivotsType(ipiv,*n).transpose() * B;\n  }\n  for(int i=0; i<*n; ++i)\n    ipiv[i]++;\n\n  return 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/second_NONE.f",
    "content": "*> \\brief \\b SECOND returns nothing\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*  Definition:\n*  ===========\n*\n*      REAL FUNCTION SECOND( )\n*  \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*>  SECOND returns nothing instead of returning the user time for a process in seconds.\n*>  If you are using that routine, it means that neither EXTERNAL ETIME,\n*>  EXTERNAL ETIME_, INTERNAL ETIME, INTERNAL CPU_TIME is available  on\n*>  your machine.\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date November 2011\n*\n*> \\ingroup auxOTHERauxiliary\n*\n*  =====================================================================\n      REAL FUNCTION SECOND( )\n*\n*  -- LAPACK auxiliary routine (version 3.4.0) --\n*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     November 2011\n*\n* =====================================================================\n*\n      SECOND = 0.0E+0\n      RETURN\n*\n*     End of SECOND\n*\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/single.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009-2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define SCALAR        float\n#define SCALAR_SUFFIX s\n#define SCALAR_SUFFIX_UP \"S\"\n#define ISCOMPLEX     0\n\n#include \"cholesky.cpp\"\n#include \"lu.cpp\"\n#include \"eigenvalues.cpp\"\n#include \"svd.cpp\"\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/sladiv.f",
    "content": "*> \\brief \\b SLADIV\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*> \\htmlonly\n*> Download SLADIV + dependencies \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/sladiv.f\"> \n*> [TGZ]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/sladiv.f\"> \n*> [ZIP]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/sladiv.f\"> \n*> [TXT]</a>\n*> \\endhtmlonly \n*\n*  Definition:\n*  ===========\n*\n*       SUBROUTINE SLADIV( A, B, C, D, P, Q )\n* \n*       .. Scalar Arguments ..\n*       REAL               A, B, C, D, P, Q\n*       ..\n*  \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> SLADIV performs complex division in  real arithmetic\n*>\n*>                       a + i*b\n*>            p + i*q = ---------\n*>                       c + i*d\n*>\n*> The algorithm is due to Robert L. Smith and can be found\n*> in D. Knuth, The art of Computer Programming, Vol.2, p.195\n*> \\endverbatim\n*\n*  Arguments:\n*  ==========\n*\n*> \\param[in] A\n*> \\verbatim\n*>          A is REAL\n*> \\endverbatim\n*>\n*> \\param[in] B\n*> \\verbatim\n*>          B is REAL\n*> \\endverbatim\n*>\n*> \\param[in] C\n*> \\verbatim\n*>          C is REAL\n*> \\endverbatim\n*>\n*> \\param[in] D\n*> \\verbatim\n*>          D is REAL\n*>          The scalars a, b, c, and d in the above expression.\n*> \\endverbatim\n*>\n*> \\param[out] P\n*> \\verbatim\n*>          P is REAL\n*> \\endverbatim\n*>\n*> \\param[out] Q\n*> \\verbatim\n*>          Q is REAL\n*>          The scalars p and q in the above expression.\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date November 2011\n*\n*> \\ingroup auxOTHERauxiliary\n*\n*  =====================================================================\n      SUBROUTINE SLADIV( A, B, C, D, P, Q )\n*\n*  -- LAPACK auxiliary routine (version 3.4.0) --\n*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     November 2011\n*\n*     .. Scalar Arguments ..\n      REAL               A, B, C, D, P, Q\n*     ..\n*\n*  =====================================================================\n*\n*     .. Local Scalars ..\n      REAL               E, F\n*     ..\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS\n*     ..\n*     .. Executable Statements ..\n*\n      IF( ABS( D ).LT.ABS( C ) ) THEN\n         E = D / C\n         F = C + D*E\n         P = ( A+B*E ) / F\n         Q = ( B-A*E ) / F\n      ELSE\n         E = C / D\n         F = D + C*E\n         P = ( B+A*E ) / F\n         Q = ( -A+B*E ) / F\n      END IF\n*\n      RETURN\n*\n*     End of SLADIV\n*\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/slamch.f",
    "content": "*> \\brief \\b SLAMCH\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*  Definition:\n*  ===========\n*\n*      REAL             FUNCTION SLAMCH( CMACH )\n*\n*     .. Scalar Arguments ..\n*      CHARACTER          CMACH\n*     ..\n*  \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> SLAMCH determines single precision machine parameters.\n*> \\endverbatim\n*\n*  Arguments:\n*  ==========\n*\n*> \\param[in] CMACH\n*> \\verbatim\n*>          Specifies the value to be returned by SLAMCH:\n*>          = 'E' or 'e',   SLAMCH := eps\n*>          = 'S' or 's ,   SLAMCH := sfmin\n*>          = 'B' or 'b',   SLAMCH := base\n*>          = 'P' or 'p',   SLAMCH := eps*base\n*>          = 'N' or 'n',   SLAMCH := t\n*>          = 'R' or 'r',   SLAMCH := rnd\n*>          = 'M' or 'm',   SLAMCH := emin\n*>          = 'U' or 'u',   SLAMCH := rmin\n*>          = 'L' or 'l',   SLAMCH := emax\n*>          = 'O' or 'o',   SLAMCH := rmax\n*>          where\n*>          eps   = relative machine precision\n*>          sfmin = safe minimum, such that 1/sfmin does not overflow\n*>          base  = base of the machine\n*>          prec  = eps*base\n*>          t     = number of (base) digits in the mantissa\n*>          rnd   = 1.0 when rounding occurs in addition, 0.0 otherwise\n*>          emin  = minimum exponent before (gradual) underflow\n*>          rmin  = underflow threshold - base**(emin-1)\n*>          emax  = largest exponent before overflow\n*>          rmax  = overflow threshold  - (base**emax)*(1-eps)\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date November 2011\n*\n*> \\ingroup auxOTHERauxiliary\n*\n*  =====================================================================\n      REAL             FUNCTION SLAMCH( CMACH )\n*\n*  -- LAPACK auxiliary routine (version 3.4.0) --\n*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     November 2011\n*\n*     .. Scalar Arguments ..\n      CHARACTER          CMACH\n*     ..\n*\n* =====================================================================\n*\n*     .. Parameters ..\n      REAL               ONE, ZERO\n      PARAMETER          ( ONE = 1.0E+0, ZERO = 0.0E+0 )\n*     ..\n*     .. Local Scalars ..\n      REAL               RND, EPS, SFMIN, SMALL, RMACH\n*     ..\n*     .. External Functions ..\n      LOGICAL            LSAME\n      EXTERNAL           LSAME\n*     ..\n*     .. Intrinsic Functions ..\n      INTRINSIC          DIGITS, EPSILON, HUGE, MAXEXPONENT,\n     $                   MINEXPONENT, RADIX, TINY\n*     ..\n*     .. Executable Statements ..\n*\n*\n*     Assume rounding, not chopping. Always.\n*\n      RND = ONE\n*\n      IF( ONE.EQ.RND ) THEN\n         EPS = EPSILON(ZERO) * 0.5\n      ELSE\n         EPS = EPSILON(ZERO)\n      END IF\n*\n      IF( LSAME( CMACH, 'E' ) ) THEN\n         RMACH = EPS\n      ELSE IF( LSAME( CMACH, 'S' ) ) THEN\n         SFMIN = TINY(ZERO)\n         SMALL = ONE / HUGE(ZERO)\n         IF( SMALL.GE.SFMIN ) THEN\n*\n*           Use SMALL plus a bit, to avoid the possibility of rounding\n*           causing overflow when computing  1/sfmin.\n*\n            SFMIN = SMALL*( ONE+EPS )\n         END IF\n         RMACH = SFMIN\n      ELSE IF( LSAME( CMACH, 'B' ) ) THEN\n         RMACH = RADIX(ZERO)\n      ELSE IF( LSAME( CMACH, 'P' ) ) THEN\n         RMACH = EPS * RADIX(ZERO)\n      ELSE IF( LSAME( CMACH, 'N' ) ) THEN\n         RMACH = DIGITS(ZERO)\n      ELSE IF( LSAME( CMACH, 'R' ) ) THEN\n         RMACH = RND\n      ELSE IF( LSAME( CMACH, 'M' ) ) THEN\n         RMACH = MINEXPONENT(ZERO)\n      ELSE IF( LSAME( CMACH, 'U' ) ) THEN\n         RMACH = tiny(zero)\n      ELSE IF( LSAME( CMACH, 'L' ) ) THEN\n         RMACH = MAXEXPONENT(ZERO)\n      ELSE IF( LSAME( CMACH, 'O' ) ) THEN\n         RMACH = HUGE(ZERO)\n      ELSE\n         RMACH = ZERO\n      END IF\n*\n      SLAMCH = RMACH\n      RETURN\n*\n*     End of SLAMCH\n*\n      END\n************************************************************************\n*> \\brief \\b SLAMC3\n*> \\details\n*> \\b Purpose:\n*> \\verbatim\n*> SLAMC3  is intended to force  A  and  B  to be stored prior to doing\n*> the addition of  A  and  B ,  for use in situations where optimizers\n*> might hold one of these in a register.\n*> \\endverbatim\n*> \\author LAPACK is a software package provided by Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..\n*> \\date November 2011\n*> \\ingroup auxOTHERauxiliary\n*>\n*> \\param[in] A\n*> \\verbatim\n*> \\endverbatim\n*>\n*> \\param[in] B\n*> \\verbatim\n*>          The values A and B.\n*> \\endverbatim\n*>\n*\n      REAL             FUNCTION SLAMC3( A, B )\n*\n*  -- LAPACK auxiliary routine (version 3.4.0) --\n*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..\n*     November 2010\n*\n*     .. Scalar Arguments ..\n      REAL               A, B\n*     ..\n* =====================================================================\n*\n*     .. Executable Statements ..\n*\n      SLAMC3 = A + B\n*\n      RETURN\n*\n*     End of SLAMC3\n*\n      END\n*\n************************************************************************\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/slapy2.f",
    "content": "*> \\brief \\b SLAPY2\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*> \\htmlonly\n*> Download SLAPY2 + dependencies \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/slapy2.f\"> \n*> [TGZ]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/slapy2.f\"> \n*> [ZIP]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/slapy2.f\"> \n*> [TXT]</a>\n*> \\endhtmlonly \n*\n*  Definition:\n*  ===========\n*\n*       REAL             FUNCTION SLAPY2( X, Y )\n* \n*       .. Scalar Arguments ..\n*       REAL               X, Y\n*       ..\n*  \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> SLAPY2 returns sqrt(x**2+y**2), taking care not to cause unnecessary\n*> overflow.\n*> \\endverbatim\n*\n*  Arguments:\n*  ==========\n*\n*> \\param[in] X\n*> \\verbatim\n*>          X is REAL\n*> \\endverbatim\n*>\n*> \\param[in] Y\n*> \\verbatim\n*>          Y is REAL\n*>          X and Y specify the values x and y.\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date November 2011\n*\n*> \\ingroup auxOTHERauxiliary\n*\n*  =====================================================================\n      REAL             FUNCTION SLAPY2( X, Y )\n*\n*  -- LAPACK auxiliary routine (version 3.4.0) --\n*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     November 2011\n*\n*     .. Scalar Arguments ..\n      REAL               X, Y\n*     ..\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      REAL               ZERO\n      PARAMETER          ( ZERO = 0.0E0 )\n      REAL               ONE\n      PARAMETER          ( ONE = 1.0E0 )\n*     ..\n*     .. Local Scalars ..\n      REAL               W, XABS, YABS, Z\n*     ..\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, MAX, MIN, SQRT\n*     ..\n*     .. Executable Statements ..\n*\n      XABS = ABS( X )\n      YABS = ABS( Y )\n      W = MAX( XABS, YABS )\n      Z = MIN( XABS, YABS )\n      IF( Z.EQ.ZERO ) THEN\n         SLAPY2 = W\n      ELSE\n         SLAPY2 = W*SQRT( ONE+( Z / W )**2 )\n      END IF\n      RETURN\n*\n*     End of SLAPY2\n*\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/slapy3.f",
    "content": "*> \\brief \\b SLAPY3\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*> \\htmlonly\n*> Download SLAPY3 + dependencies \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/slapy3.f\"> \n*> [TGZ]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/slapy3.f\"> \n*> [ZIP]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/slapy3.f\"> \n*> [TXT]</a>\n*> \\endhtmlonly \n*\n*  Definition:\n*  ===========\n*\n*       REAL             FUNCTION SLAPY3( X, Y, Z )\n* \n*       .. Scalar Arguments ..\n*       REAL               X, Y, Z\n*       ..\n*  \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> SLAPY3 returns sqrt(x**2+y**2+z**2), taking care not to cause\n*> unnecessary overflow.\n*> \\endverbatim\n*\n*  Arguments:\n*  ==========\n*\n*> \\param[in] X\n*> \\verbatim\n*>          X is REAL\n*> \\endverbatim\n*>\n*> \\param[in] Y\n*> \\verbatim\n*>          Y is REAL\n*> \\endverbatim\n*>\n*> \\param[in] Z\n*> \\verbatim\n*>          Z is REAL\n*>          X, Y and Z specify the values x, y and z.\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date November 2011\n*\n*> \\ingroup auxOTHERauxiliary\n*\n*  =====================================================================\n      REAL             FUNCTION SLAPY3( X, Y, Z )\n*\n*  -- LAPACK auxiliary routine (version 3.4.0) --\n*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     November 2011\n*\n*     .. Scalar Arguments ..\n      REAL               X, Y, Z\n*     ..\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      REAL               ZERO\n      PARAMETER          ( ZERO = 0.0E0 )\n*     ..\n*     .. Local Scalars ..\n      REAL               W, XABS, YABS, ZABS\n*     ..\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, MAX, SQRT\n*     ..\n*     .. Executable Statements ..\n*\n      XABS = ABS( X )\n      YABS = ABS( Y )\n      ZABS = ABS( Z )\n      W = MAX( XABS, YABS, ZABS )\n      IF( W.EQ.ZERO ) THEN\n*     W can be zero for max(0,nan,0)\n*     adding all three entries together will make sure\n*     NaN will not disappear.\n         SLAPY3 =  XABS + YABS + ZABS\n      ELSE\n         SLAPY3 = W*SQRT( ( XABS / W )**2+( YABS / W )**2+\n     $            ( ZABS / W )**2 )\n      END IF\n      RETURN\n*\n*     End of SLAPY3\n*\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/slarf.f",
    "content": "*> \\brief \\b SLARF\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*> \\htmlonly\n*> Download SLARF + dependencies \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/slarf.f\"> \n*> [TGZ]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/slarf.f\"> \n*> [ZIP]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/slarf.f\"> \n*> [TXT]</a>\n*> \\endhtmlonly \n*\n*  Definition:\n*  ===========\n*\n*       SUBROUTINE SLARF( SIDE, M, N, V, INCV, TAU, C, LDC, WORK )\n* \n*       .. Scalar Arguments ..\n*       CHARACTER          SIDE\n*       INTEGER            INCV, LDC, M, N\n*       REAL               TAU\n*       ..\n*       .. Array Arguments ..\n*       REAL               C( LDC, * ), V( * ), WORK( * )\n*       ..\n*  \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> SLARF applies a real elementary reflector H to a real m by n matrix\n*> C, from either the left or the right. H is represented in the form\n*>\n*>       H = I - tau * v * v**T\n*>\n*> where tau is a real scalar and v is a real vector.\n*>\n*> If tau = 0, then H is taken to be the unit matrix.\n*> \\endverbatim\n*\n*  Arguments:\n*  ==========\n*\n*> \\param[in] SIDE\n*> \\verbatim\n*>          SIDE is CHARACTER*1\n*>          = 'L': form  H * C\n*>          = 'R': form  C * H\n*> \\endverbatim\n*>\n*> \\param[in] M\n*> \\verbatim\n*>          M is INTEGER\n*>          The number of rows of the matrix C.\n*> \\endverbatim\n*>\n*> \\param[in] N\n*> \\verbatim\n*>          N is INTEGER\n*>          The number of columns of the matrix C.\n*> \\endverbatim\n*>\n*> \\param[in] V\n*> \\verbatim\n*>          V is REAL array, dimension\n*>                     (1 + (M-1)*abs(INCV)) if SIDE = 'L'\n*>                  or (1 + (N-1)*abs(INCV)) if SIDE = 'R'\n*>          The vector v in the representation of H. V is not used if\n*>          TAU = 0.\n*> \\endverbatim\n*>\n*> \\param[in] INCV\n*> \\verbatim\n*>          INCV is INTEGER\n*>          The increment between elements of v. INCV <> 0.\n*> \\endverbatim\n*>\n*> \\param[in] TAU\n*> \\verbatim\n*>          TAU is REAL\n*>          The value tau in the representation of H.\n*> \\endverbatim\n*>\n*> \\param[in,out] C\n*> \\verbatim\n*>          C is REAL array, dimension (LDC,N)\n*>          On entry, the m by n matrix C.\n*>          On exit, C is overwritten by the matrix H * C if SIDE = 'L',\n*>          or C * H if SIDE = 'R'.\n*> \\endverbatim\n*>\n*> \\param[in] LDC\n*> \\verbatim\n*>          LDC is INTEGER\n*>          The leading dimension of the array C. LDC >= max(1,M).\n*> \\endverbatim\n*>\n*> \\param[out] WORK\n*> \\verbatim\n*>          WORK is REAL array, dimension\n*>                         (N) if SIDE = 'L'\n*>                      or (M) if SIDE = 'R'\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date November 2011\n*\n*> \\ingroup realOTHERauxiliary\n*\n*  =====================================================================\n      SUBROUTINE SLARF( SIDE, M, N, V, INCV, TAU, C, LDC, WORK )\n*\n*  -- LAPACK auxiliary routine (version 3.4.0) --\n*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     November 2011\n*\n*     .. Scalar Arguments ..\n      CHARACTER          SIDE\n      INTEGER            INCV, LDC, M, N\n      REAL               TAU\n*     ..\n*     .. Array Arguments ..\n      REAL               C( LDC, * ), V( * ), WORK( * )\n*     ..\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      REAL               ONE, ZERO\n      PARAMETER          ( ONE = 1.0E+0, ZERO = 0.0E+0 )\n*     ..\n*     .. Local Scalars ..\n      LOGICAL            APPLYLEFT\n      INTEGER            I, LASTV, LASTC\n*     ..\n*     .. External Subroutines ..\n      EXTERNAL           SGEMV, SGER\n*     ..\n*     .. External Functions ..\n      LOGICAL            LSAME\n      INTEGER            ILASLR, ILASLC\n      EXTERNAL           LSAME, ILASLR, ILASLC\n*     ..\n*     .. Executable Statements ..\n*\n      APPLYLEFT = LSAME( SIDE, 'L' )\n      LASTV = 0\n      LASTC = 0\n      IF( TAU.NE.ZERO ) THEN\n!     Set up variables for scanning V.  LASTV begins pointing to the end\n!     of V.\n         IF( APPLYLEFT ) THEN\n            LASTV = M\n         ELSE\n            LASTV = N\n         END IF\n         IF( INCV.GT.0 ) THEN\n            I = 1 + (LASTV-1) * INCV\n         ELSE\n            I = 1\n         END IF\n!     Look for the last non-zero row in V.\n         DO WHILE( LASTV.GT.0 .AND. V( I ).EQ.ZERO )\n            LASTV = LASTV - 1\n            I = I - INCV\n         END DO\n         IF( APPLYLEFT ) THEN\n!     Scan for the last non-zero column in C(1:lastv,:).\n            LASTC = ILASLC(LASTV, N, C, LDC)\n         ELSE\n!     Scan for the last non-zero row in C(:,1:lastv).\n            LASTC = ILASLR(M, LASTV, C, LDC)\n         END IF\n      END IF\n!     Note that lastc.eq.0 renders the BLAS operations null; no special\n!     case is needed at this level.\n      IF( APPLYLEFT ) THEN\n*\n*        Form  H * C\n*\n         IF( LASTV.GT.0 ) THEN\n*\n*           w(1:lastc,1) := C(1:lastv,1:lastc)**T * v(1:lastv,1)\n*\n            CALL SGEMV( 'Transpose', LASTV, LASTC, ONE, C, LDC, V, INCV,\n     $           ZERO, WORK, 1 )\n*\n*           C(1:lastv,1:lastc) := C(...) - v(1:lastv,1) * w(1:lastc,1)**T\n*\n            CALL SGER( LASTV, LASTC, -TAU, V, INCV, WORK, 1, C, LDC )\n         END IF\n      ELSE\n*\n*        Form  C * H\n*\n         IF( LASTV.GT.0 ) THEN\n*\n*           w(1:lastc,1) := C(1:lastc,1:lastv) * v(1:lastv,1)\n*\n            CALL SGEMV( 'No transpose', LASTC, LASTV, ONE, C, LDC,\n     $           V, INCV, ZERO, WORK, 1 )\n*\n*           C(1:lastc,1:lastv) := C(...) - w(1:lastc,1) * v(1:lastv,1)**T\n*\n            CALL SGER( LASTC, LASTV, -TAU, WORK, 1, V, INCV, C, LDC )\n         END IF\n      END IF\n      RETURN\n*\n*     End of SLARF\n*\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/slarfb.f",
    "content": "*> \\brief \\b SLARFB\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*> \\htmlonly\n*> Download SLARFB + dependencies \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/slarfb.f\"> \n*> [TGZ]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/slarfb.f\"> \n*> [ZIP]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/slarfb.f\"> \n*> [TXT]</a>\n*> \\endhtmlonly \n*\n*  Definition:\n*  ===========\n*\n*       SUBROUTINE SLARFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV,\n*                          T, LDT, C, LDC, WORK, LDWORK )\n* \n*       .. Scalar Arguments ..\n*       CHARACTER          DIRECT, SIDE, STOREV, TRANS\n*       INTEGER            K, LDC, LDT, LDV, LDWORK, M, N\n*       ..\n*       .. Array Arguments ..\n*       REAL               C( LDC, * ), T( LDT, * ), V( LDV, * ),\n*      $                   WORK( LDWORK, * )\n*       ..\n*  \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> SLARFB applies a real block reflector H or its transpose H**T to a\n*> real m by n matrix C, from either the left or the right.\n*> \\endverbatim\n*\n*  Arguments:\n*  ==========\n*\n*> \\param[in] SIDE\n*> \\verbatim\n*>          SIDE is CHARACTER*1\n*>          = 'L': apply H or H**T from the Left\n*>          = 'R': apply H or H**T from the Right\n*> \\endverbatim\n*>\n*> \\param[in] TRANS\n*> \\verbatim\n*>          TRANS is CHARACTER*1\n*>          = 'N': apply H (No transpose)\n*>          = 'T': apply H**T (Transpose)\n*> \\endverbatim\n*>\n*> \\param[in] DIRECT\n*> \\verbatim\n*>          DIRECT is CHARACTER*1\n*>          Indicates how H is formed from a product of elementary\n*>          reflectors\n*>          = 'F': H = H(1) H(2) . . . H(k) (Forward)\n*>          = 'B': H = H(k) . . . H(2) H(1) (Backward)\n*> \\endverbatim\n*>\n*> \\param[in] STOREV\n*> \\verbatim\n*>          STOREV is CHARACTER*1\n*>          Indicates how the vectors which define the elementary\n*>          reflectors are stored:\n*>          = 'C': Columnwise\n*>          = 'R': Rowwise\n*> \\endverbatim\n*>\n*> \\param[in] M\n*> \\verbatim\n*>          M is INTEGER\n*>          The number of rows of the matrix C.\n*> \\endverbatim\n*>\n*> \\param[in] N\n*> \\verbatim\n*>          N is INTEGER\n*>          The number of columns of the matrix C.\n*> \\endverbatim\n*>\n*> \\param[in] K\n*> \\verbatim\n*>          K is INTEGER\n*>          The order of the matrix T (= the number of elementary\n*>          reflectors whose product defines the block reflector).\n*> \\endverbatim\n*>\n*> \\param[in] V\n*> \\verbatim\n*>          V is REAL array, dimension\n*>                                (LDV,K) if STOREV = 'C'\n*>                                (LDV,M) if STOREV = 'R' and SIDE = 'L'\n*>                                (LDV,N) if STOREV = 'R' and SIDE = 'R'\n*>          The matrix V. See Further Details.\n*> \\endverbatim\n*>\n*> \\param[in] LDV\n*> \\verbatim\n*>          LDV is INTEGER\n*>          The leading dimension of the array V.\n*>          If STOREV = 'C' and SIDE = 'L', LDV >= max(1,M);\n*>          if STOREV = 'C' and SIDE = 'R', LDV >= max(1,N);\n*>          if STOREV = 'R', LDV >= K.\n*> \\endverbatim\n*>\n*> \\param[in] T\n*> \\verbatim\n*>          T is REAL array, dimension (LDT,K)\n*>          The triangular k by k matrix T in the representation of the\n*>          block reflector.\n*> \\endverbatim\n*>\n*> \\param[in] LDT\n*> \\verbatim\n*>          LDT is INTEGER\n*>          The leading dimension of the array T. LDT >= K.\n*> \\endverbatim\n*>\n*> \\param[in,out] C\n*> \\verbatim\n*>          C is REAL array, dimension (LDC,N)\n*>          On entry, the m by n matrix C.\n*>          On exit, C is overwritten by H*C or H**T*C or C*H or C*H**T.\n*> \\endverbatim\n*>\n*> \\param[in] LDC\n*> \\verbatim\n*>          LDC is INTEGER\n*>          The leading dimension of the array C. LDC >= max(1,M).\n*> \\endverbatim\n*>\n*> \\param[out] WORK\n*> \\verbatim\n*>          WORK is REAL array, dimension (LDWORK,K)\n*> \\endverbatim\n*>\n*> \\param[in] LDWORK\n*> \\verbatim\n*>          LDWORK is INTEGER\n*>          The leading dimension of the array WORK.\n*>          If SIDE = 'L', LDWORK >= max(1,N);\n*>          if SIDE = 'R', LDWORK >= max(1,M).\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date November 2011\n*\n*> \\ingroup realOTHERauxiliary\n*\n*> \\par Further Details:\n*  =====================\n*>\n*> \\verbatim\n*>\n*>  The shape of the matrix V and the storage of the vectors which define\n*>  the H(i) is best illustrated by the following example with n = 5 and\n*>  k = 3. The elements equal to 1 are not stored; the corresponding\n*>  array elements are modified but restored on exit. The rest of the\n*>  array is not used.\n*>\n*>  DIRECT = 'F' and STOREV = 'C':         DIRECT = 'F' and STOREV = 'R':\n*>\n*>               V = (  1       )                 V = (  1 v1 v1 v1 v1 )\n*>                   ( v1  1    )                     (     1 v2 v2 v2 )\n*>                   ( v1 v2  1 )                     (        1 v3 v3 )\n*>                   ( v1 v2 v3 )\n*>                   ( v1 v2 v3 )\n*>\n*>  DIRECT = 'B' and STOREV = 'C':         DIRECT = 'B' and STOREV = 'R':\n*>\n*>               V = ( v1 v2 v3 )                 V = ( v1 v1  1       )\n*>                   ( v1 v2 v3 )                     ( v2 v2 v2  1    )\n*>                   (  1 v2 v3 )                     ( v3 v3 v3 v3  1 )\n*>                   (     1 v3 )\n*>                   (        1 )\n*> \\endverbatim\n*>\n*  =====================================================================\n      SUBROUTINE SLARFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV,\n     $                   T, LDT, C, LDC, WORK, LDWORK )\n*\n*  -- LAPACK auxiliary routine (version 3.4.0) --\n*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     November 2011\n*\n*     .. Scalar Arguments ..\n      CHARACTER          DIRECT, SIDE, STOREV, TRANS\n      INTEGER            K, LDC, LDT, LDV, LDWORK, M, N\n*     ..\n*     .. Array Arguments ..\n      REAL               C( LDC, * ), T( LDT, * ), V( LDV, * ),\n     $                   WORK( LDWORK, * )\n*     ..\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      REAL               ONE\n      PARAMETER          ( ONE = 1.0E+0 )\n*     ..\n*     .. Local Scalars ..\n      CHARACTER          TRANST\n      INTEGER            I, J, LASTV, LASTC\n*     ..\n*     .. External Functions ..\n      LOGICAL            LSAME\n      INTEGER            ILASLR, ILASLC\n      EXTERNAL           LSAME, ILASLR, ILASLC\n*     ..\n*     .. External Subroutines ..\n      EXTERNAL           SCOPY, SGEMM, STRMM\n*     ..\n*     .. Executable Statements ..\n*\n*     Quick return if possible\n*\n      IF( M.LE.0 .OR. N.LE.0 )\n     $   RETURN\n*\n      IF( LSAME( TRANS, 'N' ) ) THEN\n         TRANST = 'T'\n      ELSE\n         TRANST = 'N'\n      END IF\n*\n      IF( LSAME( STOREV, 'C' ) ) THEN\n*\n         IF( LSAME( DIRECT, 'F' ) ) THEN\n*\n*           Let  V =  ( V1 )    (first K rows)\n*                     ( V2 )\n*           where  V1  is unit lower triangular.\n*\n            IF( LSAME( SIDE, 'L' ) ) THEN\n*\n*              Form  H * C  or  H**T * C  where  C = ( C1 )\n*                                                    ( C2 )\n*\n               LASTV = MAX( K, ILASLR( M, K, V, LDV ) )\n               LASTC = ILASLC( LASTV, N, C, LDC )\n*\n*              W := C**T * V  =  (C1**T * V1 + C2**T * V2)  (stored in WORK)\n*\n*              W := C1**T\n*\n               DO 10 J = 1, K\n                  CALL SCOPY( LASTC, C( J, 1 ), LDC, WORK( 1, J ), 1 )\n   10          CONTINUE\n*\n*              W := W * V1\n*\n               CALL STRMM( 'Right', 'Lower', 'No transpose', 'Unit',\n     $              LASTC, K, ONE, V, LDV, WORK, LDWORK )\n               IF( LASTV.GT.K ) THEN\n*\n*                 W := W + C2**T *V2\n*\n                  CALL SGEMM( 'Transpose', 'No transpose',\n     $                 LASTC, K, LASTV-K,\n     $                 ONE, C( K+1, 1 ), LDC, V( K+1, 1 ), LDV,\n     $                 ONE, WORK, LDWORK )\n               END IF\n*\n*              W := W * T**T  or  W * T\n*\n               CALL STRMM( 'Right', 'Upper', TRANST, 'Non-unit',\n     $              LASTC, K, ONE, T, LDT, WORK, LDWORK )\n*\n*              C := C - V * W**T\n*\n               IF( LASTV.GT.K ) THEN\n*\n*                 C2 := C2 - V2 * W**T\n*\n                  CALL SGEMM( 'No transpose', 'Transpose',\n     $                 LASTV-K, LASTC, K,\n     $                 -ONE, V( K+1, 1 ), LDV, WORK, LDWORK, ONE,\n     $                 C( K+1, 1 ), LDC )\n               END IF\n*\n*              W := W * V1**T\n*\n               CALL STRMM( 'Right', 'Lower', 'Transpose', 'Unit',\n     $              LASTC, K, ONE, V, LDV, WORK, LDWORK )\n*\n*              C1 := C1 - W**T\n*\n               DO 30 J = 1, K\n                  DO 20 I = 1, LASTC\n                     C( J, I ) = C( J, I ) - WORK( I, J )\n   20             CONTINUE\n   30          CONTINUE\n*\n            ELSE IF( LSAME( SIDE, 'R' ) ) THEN\n*\n*              Form  C * H  or  C * H**T  where  C = ( C1  C2 )\n*\n               LASTV = MAX( K, ILASLR( N, K, V, LDV ) )\n               LASTC = ILASLR( M, LASTV, C, LDC )\n*\n*              W := C * V  =  (C1*V1 + C2*V2)  (stored in WORK)\n*\n*              W := C1\n*\n               DO 40 J = 1, K\n                  CALL SCOPY( LASTC, C( 1, J ), 1, WORK( 1, J ), 1 )\n   40          CONTINUE\n*\n*              W := W * V1\n*\n               CALL STRMM( 'Right', 'Lower', 'No transpose', 'Unit',\n     $              LASTC, K, ONE, V, LDV, WORK, LDWORK )\n               IF( LASTV.GT.K ) THEN\n*\n*                 W := W + C2 * V2\n*\n                  CALL SGEMM( 'No transpose', 'No transpose',\n     $                 LASTC, K, LASTV-K,\n     $                 ONE, C( 1, K+1 ), LDC, V( K+1, 1 ), LDV,\n     $                 ONE, WORK, LDWORK )\n               END IF\n*\n*              W := W * T  or  W * T**T\n*\n               CALL STRMM( 'Right', 'Upper', TRANS, 'Non-unit',\n     $              LASTC, K, ONE, T, LDT, WORK, LDWORK )\n*\n*              C := C - W * V**T\n*\n               IF( LASTV.GT.K ) THEN\n*\n*                 C2 := C2 - W * V2**T\n*\n                  CALL SGEMM( 'No transpose', 'Transpose',\n     $                 LASTC, LASTV-K, K,\n     $                 -ONE, WORK, LDWORK, V( K+1, 1 ), LDV, ONE,\n     $                 C( 1, K+1 ), LDC )\n               END IF\n*\n*              W := W * V1**T\n*\n               CALL STRMM( 'Right', 'Lower', 'Transpose', 'Unit',\n     $              LASTC, K, ONE, V, LDV, WORK, LDWORK )\n*\n*              C1 := C1 - W\n*\n               DO 60 J = 1, K\n                  DO 50 I = 1, LASTC\n                     C( I, J ) = C( I, J ) - WORK( I, J )\n   50             CONTINUE\n   60          CONTINUE\n            END IF\n*\n         ELSE\n*\n*           Let  V =  ( V1 )\n*                     ( V2 )    (last K rows)\n*           where  V2  is unit upper triangular.\n*\n            IF( LSAME( SIDE, 'L' ) ) THEN\n*\n*              Form  H * C  or  H**T * C  where  C = ( C1 )\n*                                                    ( C2 )\n*\n               LASTV = MAX( K, ILASLR( M, K, V, LDV ) )\n               LASTC = ILASLC( LASTV, N, C, LDC )\n*\n*              W := C**T * V  =  (C1**T * V1 + C2**T * V2)  (stored in WORK)\n*\n*              W := C2**T\n*\n               DO 70 J = 1, K\n                  CALL SCOPY( LASTC, C( LASTV-K+J, 1 ), LDC,\n     $                 WORK( 1, J ), 1 )\n   70          CONTINUE\n*\n*              W := W * V2\n*\n               CALL STRMM( 'Right', 'Upper', 'No transpose', 'Unit',\n     $              LASTC, K, ONE, V( LASTV-K+1, 1 ), LDV,\n     $              WORK, LDWORK )\n               IF( LASTV.GT.K ) THEN\n*\n*                 W := W + C1**T*V1\n*\n                  CALL SGEMM( 'Transpose', 'No transpose',\n     $                 LASTC, K, LASTV-K, ONE, C, LDC, V, LDV,\n     $                 ONE, WORK, LDWORK )\n               END IF\n*\n*              W := W * T**T  or  W * T\n*\n               CALL STRMM( 'Right', 'Lower', TRANST, 'Non-unit',\n     $              LASTC, K, ONE, T, LDT, WORK, LDWORK )\n*\n*              C := C - V * W**T\n*\n               IF( LASTV.GT.K ) THEN\n*\n*                 C1 := C1 - V1 * W**T\n*\n                  CALL SGEMM( 'No transpose', 'Transpose',\n     $                 LASTV-K, LASTC, K, -ONE, V, LDV, WORK, LDWORK,\n     $                 ONE, C, LDC )\n               END IF\n*\n*              W := W * V2**T\n*\n               CALL STRMM( 'Right', 'Upper', 'Transpose', 'Unit',\n     $              LASTC, K, ONE, V( LASTV-K+1, 1 ), LDV,\n     $              WORK, LDWORK )\n*\n*              C2 := C2 - W**T\n*\n               DO 90 J = 1, K\n                  DO 80 I = 1, LASTC\n                     C( LASTV-K+J, I ) = C( LASTV-K+J, I ) - WORK(I, J)\n   80             CONTINUE\n   90          CONTINUE\n*\n            ELSE IF( LSAME( SIDE, 'R' ) ) THEN\n*\n*              Form  C * H  or  C * H**T  where  C = ( C1  C2 )\n*\n               LASTV = MAX( K, ILASLR( N, K, V, LDV ) )\n               LASTC = ILASLR( M, LASTV, C, LDC )\n*\n*              W := C * V  =  (C1*V1 + C2*V2)  (stored in WORK)\n*\n*              W := C2\n*\n               DO 100 J = 1, K\n                  CALL SCOPY( LASTC, C( 1, N-K+J ), 1, WORK( 1, J ), 1 )\n  100          CONTINUE\n*\n*              W := W * V2\n*\n               CALL STRMM( 'Right', 'Upper', 'No transpose', 'Unit',\n     $              LASTC, K, ONE, V( LASTV-K+1, 1 ), LDV,\n     $              WORK, LDWORK )\n               IF( LASTV.GT.K ) THEN\n*\n*                 W := W + C1 * V1\n*\n                  CALL SGEMM( 'No transpose', 'No transpose',\n     $                 LASTC, K, LASTV-K, ONE, C, LDC, V, LDV,\n     $                 ONE, WORK, LDWORK )\n               END IF\n*\n*              W := W * T  or  W * T**T\n*\n               CALL STRMM( 'Right', 'Lower', TRANS, 'Non-unit',\n     $              LASTC, K, ONE, T, LDT, WORK, LDWORK )\n*\n*              C := C - W * V**T\n*\n               IF( LASTV.GT.K ) THEN\n*\n*                 C1 := C1 - W * V1**T\n*\n                  CALL SGEMM( 'No transpose', 'Transpose',\n     $                 LASTC, LASTV-K, K, -ONE, WORK, LDWORK, V, LDV,\n     $                 ONE, C, LDC )\n               END IF\n*\n*              W := W * V2**T\n*\n               CALL STRMM( 'Right', 'Upper', 'Transpose', 'Unit',\n     $              LASTC, K, ONE, V( LASTV-K+1, 1 ), LDV,\n     $              WORK, LDWORK )\n*\n*              C2 := C2 - W\n*\n               DO 120 J = 1, K\n                  DO 110 I = 1, LASTC\n                     C( I, LASTV-K+J ) = C( I, LASTV-K+J ) - WORK(I, J)\n  110             CONTINUE\n  120          CONTINUE\n            END IF\n         END IF\n*\n      ELSE IF( LSAME( STOREV, 'R' ) ) THEN\n*\n         IF( LSAME( DIRECT, 'F' ) ) THEN\n*\n*           Let  V =  ( V1  V2 )    (V1: first K columns)\n*           where  V1  is unit upper triangular.\n*\n            IF( LSAME( SIDE, 'L' ) ) THEN\n*\n*              Form  H * C  or  H**T * C  where  C = ( C1 )\n*                                                    ( C2 )\n*\n               LASTV = MAX( K, ILASLC( K, M, V, LDV ) )\n               LASTC = ILASLC( LASTV, N, C, LDC )\n*\n*              W := C**T * V**T  =  (C1**T * V1**T + C2**T * V2**T) (stored in WORK)\n*\n*              W := C1**T\n*\n               DO 130 J = 1, K\n                  CALL SCOPY( LASTC, C( J, 1 ), LDC, WORK( 1, J ), 1 )\n  130          CONTINUE\n*\n*              W := W * V1**T\n*\n               CALL STRMM( 'Right', 'Upper', 'Transpose', 'Unit',\n     $              LASTC, K, ONE, V, LDV, WORK, LDWORK )\n               IF( LASTV.GT.K ) THEN\n*\n*                 W := W + C2**T*V2**T\n*\n                  CALL SGEMM( 'Transpose', 'Transpose',\n     $                 LASTC, K, LASTV-K,\n     $                 ONE, C( K+1, 1 ), LDC, V( 1, K+1 ), LDV,\n     $                 ONE, WORK, LDWORK )\n               END IF\n*\n*              W := W * T**T  or  W * T\n*\n               CALL STRMM( 'Right', 'Upper', TRANST, 'Non-unit',\n     $              LASTC, K, ONE, T, LDT, WORK, LDWORK )\n*\n*              C := C - V**T * W**T\n*\n               IF( LASTV.GT.K ) THEN\n*\n*                 C2 := C2 - V2**T * W**T\n*\n                  CALL SGEMM( 'Transpose', 'Transpose',\n     $                 LASTV-K, LASTC, K,\n     $                 -ONE, V( 1, K+1 ), LDV, WORK, LDWORK,\n     $                 ONE, C( K+1, 1 ), LDC )\n               END IF\n*\n*              W := W * V1\n*\n               CALL STRMM( 'Right', 'Upper', 'No transpose', 'Unit',\n     $              LASTC, K, ONE, V, LDV, WORK, LDWORK )\n*\n*              C1 := C1 - W**T\n*\n               DO 150 J = 1, K\n                  DO 140 I = 1, LASTC\n                     C( J, I ) = C( J, I ) - WORK( I, J )\n  140             CONTINUE\n  150          CONTINUE\n*\n            ELSE IF( LSAME( SIDE, 'R' ) ) THEN\n*\n*              Form  C * H  or  C * H**T  where  C = ( C1  C2 )\n*\n               LASTV = MAX( K, ILASLC( K, N, V, LDV ) )\n               LASTC = ILASLR( M, LASTV, C, LDC )\n*\n*              W := C * V**T  =  (C1*V1**T + C2*V2**T)  (stored in WORK)\n*\n*              W := C1\n*\n               DO 160 J = 1, K\n                  CALL SCOPY( LASTC, C( 1, J ), 1, WORK( 1, J ), 1 )\n  160          CONTINUE\n*\n*              W := W * V1**T\n*\n               CALL STRMM( 'Right', 'Upper', 'Transpose', 'Unit',\n     $              LASTC, K, ONE, V, LDV, WORK, LDWORK )\n               IF( LASTV.GT.K ) THEN\n*\n*                 W := W + C2 * V2**T\n*\n                  CALL SGEMM( 'No transpose', 'Transpose',\n     $                 LASTC, K, LASTV-K,\n     $                 ONE, C( 1, K+1 ), LDC, V( 1, K+1 ), LDV,\n     $                 ONE, WORK, LDWORK )\n               END IF\n*\n*              W := W * T  or  W * T**T\n*\n               CALL STRMM( 'Right', 'Upper', TRANS, 'Non-unit',\n     $              LASTC, K, ONE, T, LDT, WORK, LDWORK )\n*\n*              C := C - W * V\n*\n               IF( LASTV.GT.K ) THEN\n*\n*                 C2 := C2 - W * V2\n*\n                  CALL SGEMM( 'No transpose', 'No transpose',\n     $                 LASTC, LASTV-K, K,\n     $                 -ONE, WORK, LDWORK, V( 1, K+1 ), LDV,\n     $                 ONE, C( 1, K+1 ), LDC )\n               END IF\n*\n*              W := W * V1\n*\n               CALL STRMM( 'Right', 'Upper', 'No transpose', 'Unit',\n     $              LASTC, K, ONE, V, LDV, WORK, LDWORK )\n*\n*              C1 := C1 - W\n*\n               DO 180 J = 1, K\n                  DO 170 I = 1, LASTC\n                     C( I, J ) = C( I, J ) - WORK( I, J )\n  170             CONTINUE\n  180          CONTINUE\n*\n            END IF\n*\n         ELSE\n*\n*           Let  V =  ( V1  V2 )    (V2: last K columns)\n*           where  V2  is unit lower triangular.\n*\n            IF( LSAME( SIDE, 'L' ) ) THEN\n*\n*              Form  H * C  or  H**T * C  where  C = ( C1 )\n*                                                    ( C2 )\n*\n               LASTV = MAX( K, ILASLC( K, M, V, LDV ) )\n               LASTC = ILASLC( LASTV, N, C, LDC )\n*\n*              W := C**T * V**T  =  (C1**T * V1**T + C2**T * V2**T) (stored in WORK)\n*\n*              W := C2**T\n*\n               DO 190 J = 1, K\n                  CALL SCOPY( LASTC, C( LASTV-K+J, 1 ), LDC,\n     $                 WORK( 1, J ), 1 )\n  190          CONTINUE\n*\n*              W := W * V2**T\n*\n               CALL STRMM( 'Right', 'Lower', 'Transpose', 'Unit',\n     $              LASTC, K, ONE, V( 1, LASTV-K+1 ), LDV,\n     $              WORK, LDWORK )\n               IF( LASTV.GT.K ) THEN\n*\n*                 W := W + C1**T * V1**T\n*\n                  CALL SGEMM( 'Transpose', 'Transpose',\n     $                 LASTC, K, LASTV-K, ONE, C, LDC, V, LDV,\n     $                 ONE, WORK, LDWORK )\n               END IF\n*\n*              W := W * T**T  or  W * T\n*\n               CALL STRMM( 'Right', 'Lower', TRANST, 'Non-unit',\n     $              LASTC, K, ONE, T, LDT, WORK, LDWORK )\n*\n*              C := C - V**T * W**T\n*\n               IF( LASTV.GT.K ) THEN\n*\n*                 C1 := C1 - V1**T * W**T\n*\n                  CALL SGEMM( 'Transpose', 'Transpose',\n     $                 LASTV-K, LASTC, K, -ONE, V, LDV, WORK, LDWORK,\n     $                 ONE, C, LDC )\n               END IF\n*\n*              W := W * V2\n*\n               CALL STRMM( 'Right', 'Lower', 'No transpose', 'Unit',\n     $              LASTC, K, ONE, V( 1, LASTV-K+1 ), LDV,\n     $              WORK, LDWORK )\n*\n*              C2 := C2 - W**T\n*\n               DO 210 J = 1, K\n                  DO 200 I = 1, LASTC\n                     C( LASTV-K+J, I ) = C( LASTV-K+J, I ) - WORK(I, J)\n  200             CONTINUE\n  210          CONTINUE\n*\n            ELSE IF( LSAME( SIDE, 'R' ) ) THEN\n*\n*              Form  C * H  or  C * H**T  where  C = ( C1  C2 )\n*\n               LASTV = MAX( K, ILASLC( K, N, V, LDV ) )\n               LASTC = ILASLR( M, LASTV, C, LDC )\n*\n*              W := C * V**T  =  (C1*V1**T + C2*V2**T)  (stored in WORK)\n*\n*              W := C2\n*\n               DO 220 J = 1, K\n                  CALL SCOPY( LASTC, C( 1, LASTV-K+J ), 1,\n     $                 WORK( 1, J ), 1 )\n  220          CONTINUE\n*\n*              W := W * V2**T\n*\n               CALL STRMM( 'Right', 'Lower', 'Transpose', 'Unit',\n     $              LASTC, K, ONE, V( 1, LASTV-K+1 ), LDV,\n     $              WORK, LDWORK )\n               IF( LASTV.GT.K ) THEN\n*\n*                 W := W + C1 * V1**T\n*\n                  CALL SGEMM( 'No transpose', 'Transpose',\n     $                 LASTC, K, LASTV-K, ONE, C, LDC, V, LDV,\n     $                 ONE, WORK, LDWORK )\n               END IF\n*\n*              W := W * T  or  W * T**T\n*\n               CALL STRMM( 'Right', 'Lower', TRANS, 'Non-unit',\n     $              LASTC, K, ONE, T, LDT, WORK, LDWORK )\n*\n*              C := C - W * V\n*\n               IF( LASTV.GT.K ) THEN\n*\n*                 C1 := C1 - W * V1\n*\n                  CALL SGEMM( 'No transpose', 'No transpose',\n     $                 LASTC, LASTV-K, K, -ONE, WORK, LDWORK, V, LDV,\n     $                 ONE, C, LDC )\n               END IF\n*\n*              W := W * V2\n*\n               CALL STRMM( 'Right', 'Lower', 'No transpose', 'Unit',\n     $              LASTC, K, ONE, V( 1, LASTV-K+1 ), LDV,\n     $              WORK, LDWORK )\n*\n*              C1 := C1 - W\n*\n               DO 240 J = 1, K\n                  DO 230 I = 1, LASTC\n                     C( I, LASTV-K+J ) = C( I, LASTV-K+J )\n     $                    - WORK( I, J )\n  230             CONTINUE\n  240          CONTINUE\n*\n            END IF\n*\n         END IF\n      END IF\n*\n      RETURN\n*\n*     End of SLARFB\n*\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/slarfg.f",
    "content": "*> \\brief \\b SLARFG\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*> \\htmlonly\n*> Download SLARFG + dependencies \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/slarfg.f\"> \n*> [TGZ]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/slarfg.f\"> \n*> [ZIP]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/slarfg.f\"> \n*> [TXT]</a>\n*> \\endhtmlonly \n*\n*  Definition:\n*  ===========\n*\n*       SUBROUTINE SLARFG( N, ALPHA, X, INCX, TAU )\n* \n*       .. Scalar Arguments ..\n*       INTEGER            INCX, N\n*       REAL               ALPHA, TAU\n*       ..\n*       .. Array Arguments ..\n*       REAL               X( * )\n*       ..\n*  \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> SLARFG generates a real elementary reflector H of order n, such\n*> that\n*>\n*>       H * ( alpha ) = ( beta ),   H**T * H = I.\n*>           (   x   )   (   0  )\n*>\n*> where alpha and beta are scalars, and x is an (n-1)-element real\n*> vector. H is represented in the form\n*>\n*>       H = I - tau * ( 1 ) * ( 1 v**T ) ,\n*>                     ( v )\n*>\n*> where tau is a real scalar and v is a real (n-1)-element\n*> vector.\n*>\n*> If the elements of x are all zero, then tau = 0 and H is taken to be\n*> the unit matrix.\n*>\n*> Otherwise  1 <= tau <= 2.\n*> \\endverbatim\n*\n*  Arguments:\n*  ==========\n*\n*> \\param[in] N\n*> \\verbatim\n*>          N is INTEGER\n*>          The order of the elementary reflector.\n*> \\endverbatim\n*>\n*> \\param[in,out] ALPHA\n*> \\verbatim\n*>          ALPHA is REAL\n*>          On entry, the value alpha.\n*>          On exit, it is overwritten with the value beta.\n*> \\endverbatim\n*>\n*> \\param[in,out] X\n*> \\verbatim\n*>          X is REAL array, dimension\n*>                         (1+(N-2)*abs(INCX))\n*>          On entry, the vector x.\n*>          On exit, it is overwritten with the vector v.\n*> \\endverbatim\n*>\n*> \\param[in] INCX\n*> \\verbatim\n*>          INCX is INTEGER\n*>          The increment between elements of X. INCX > 0.\n*> \\endverbatim\n*>\n*> \\param[out] TAU\n*> \\verbatim\n*>          TAU is REAL\n*>          The value tau.\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date November 2011\n*\n*> \\ingroup realOTHERauxiliary\n*\n*  =====================================================================\n      SUBROUTINE SLARFG( N, ALPHA, X, INCX, TAU )\n*\n*  -- LAPACK auxiliary routine (version 3.4.0) --\n*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     November 2011\n*\n*     .. Scalar Arguments ..\n      INTEGER            INCX, N\n      REAL               ALPHA, TAU\n*     ..\n*     .. Array Arguments ..\n      REAL               X( * )\n*     ..\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      REAL               ONE, ZERO\n      PARAMETER          ( ONE = 1.0E+0, ZERO = 0.0E+0 )\n*     ..\n*     .. Local Scalars ..\n      INTEGER            J, KNT\n      REAL               BETA, RSAFMN, SAFMIN, XNORM\n*     ..\n*     .. External Functions ..\n      REAL               SLAMCH, SLAPY2, SNRM2\n      EXTERNAL           SLAMCH, SLAPY2, SNRM2\n*     ..\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, SIGN\n*     ..\n*     .. External Subroutines ..\n      EXTERNAL           SSCAL\n*     ..\n*     .. Executable Statements ..\n*\n      IF( N.LE.1 ) THEN\n         TAU = ZERO\n         RETURN\n      END IF\n*\n      XNORM = SNRM2( N-1, X, INCX )\n*\n      IF( XNORM.EQ.ZERO ) THEN\n*\n*        H  =  I\n*\n         TAU = ZERO\n      ELSE\n*\n*        general case\n*\n         BETA = -SIGN( SLAPY2( ALPHA, XNORM ), ALPHA )\n         SAFMIN = SLAMCH( 'S' ) / SLAMCH( 'E' )\n         KNT = 0\n         IF( ABS( BETA ).LT.SAFMIN ) THEN\n*\n*           XNORM, BETA may be inaccurate; scale X and recompute them\n*\n            RSAFMN = ONE / SAFMIN\n   10       CONTINUE\n            KNT = KNT + 1\n            CALL SSCAL( N-1, RSAFMN, X, INCX )\n            BETA = BETA*RSAFMN\n            ALPHA = ALPHA*RSAFMN\n            IF( ABS( BETA ).LT.SAFMIN )\n     $         GO TO 10\n*\n*           New BETA is at most 1, at least SAFMIN\n*\n            XNORM = SNRM2( N-1, X, INCX )\n            BETA = -SIGN( SLAPY2( ALPHA, XNORM ), ALPHA )\n         END IF\n         TAU = ( BETA-ALPHA ) / BETA\n         CALL SSCAL( N-1, ONE / ( ALPHA-BETA ), X, INCX )\n*\n*        If ALPHA is subnormal, it may lose relative accuracy\n*\n         DO 20 J = 1, KNT\n            BETA = BETA*SAFMIN\n 20      CONTINUE\n         ALPHA = BETA\n      END IF\n*\n      RETURN\n*\n*     End of SLARFG\n*\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/slarft.f",
    "content": "*> \\brief \\b SLARFT\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*> \\htmlonly\n*> Download SLARFT + dependencies \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/slarft.f\"> \n*> [TGZ]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/slarft.f\"> \n*> [ZIP]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/slarft.f\"> \n*> [TXT]</a>\n*> \\endhtmlonly \n*\n*  Definition:\n*  ===========\n*\n*       SUBROUTINE SLARFT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )\n* \n*       .. Scalar Arguments ..\n*       CHARACTER          DIRECT, STOREV\n*       INTEGER            K, LDT, LDV, N\n*       ..\n*       .. Array Arguments ..\n*       REAL               T( LDT, * ), TAU( * ), V( LDV, * )\n*       ..\n*  \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> SLARFT forms the triangular factor T of a real block reflector H\n*> of order n, which is defined as a product of k elementary reflectors.\n*>\n*> If DIRECT = 'F', H = H(1) H(2) . . . H(k) and T is upper triangular;\n*>\n*> If DIRECT = 'B', H = H(k) . . . H(2) H(1) and T is lower triangular.\n*>\n*> If STOREV = 'C', the vector which defines the elementary reflector\n*> H(i) is stored in the i-th column of the array V, and\n*>\n*>    H  =  I - V * T * V**T\n*>\n*> If STOREV = 'R', the vector which defines the elementary reflector\n*> H(i) is stored in the i-th row of the array V, and\n*>\n*>    H  =  I - V**T * T * V\n*> \\endverbatim\n*\n*  Arguments:\n*  ==========\n*\n*> \\param[in] DIRECT\n*> \\verbatim\n*>          DIRECT is CHARACTER*1\n*>          Specifies the order in which the elementary reflectors are\n*>          multiplied to form the block reflector:\n*>          = 'F': H = H(1) H(2) . . . H(k) (Forward)\n*>          = 'B': H = H(k) . . . H(2) H(1) (Backward)\n*> \\endverbatim\n*>\n*> \\param[in] STOREV\n*> \\verbatim\n*>          STOREV is CHARACTER*1\n*>          Specifies how the vectors which define the elementary\n*>          reflectors are stored (see also Further Details):\n*>          = 'C': columnwise\n*>          = 'R': rowwise\n*> \\endverbatim\n*>\n*> \\param[in] N\n*> \\verbatim\n*>          N is INTEGER\n*>          The order of the block reflector H. N >= 0.\n*> \\endverbatim\n*>\n*> \\param[in] K\n*> \\verbatim\n*>          K is INTEGER\n*>          The order of the triangular factor T (= the number of\n*>          elementary reflectors). K >= 1.\n*> \\endverbatim\n*>\n*> \\param[in] V\n*> \\verbatim\n*>          V is REAL array, dimension\n*>                               (LDV,K) if STOREV = 'C'\n*>                               (LDV,N) if STOREV = 'R'\n*>          The matrix V. See further details.\n*> \\endverbatim\n*>\n*> \\param[in] LDV\n*> \\verbatim\n*>          LDV is INTEGER\n*>          The leading dimension of the array V.\n*>          If STOREV = 'C', LDV >= max(1,N); if STOREV = 'R', LDV >= K.\n*> \\endverbatim\n*>\n*> \\param[in] TAU\n*> \\verbatim\n*>          TAU is REAL array, dimension (K)\n*>          TAU(i) must contain the scalar factor of the elementary\n*>          reflector H(i).\n*> \\endverbatim\n*>\n*> \\param[out] T\n*> \\verbatim\n*>          T is REAL array, dimension (LDT,K)\n*>          The k by k triangular factor T of the block reflector.\n*>          If DIRECT = 'F', T is upper triangular; if DIRECT = 'B', T is\n*>          lower triangular. The rest of the array is not used.\n*> \\endverbatim\n*>\n*> \\param[in] LDT\n*> \\verbatim\n*>          LDT is INTEGER\n*>          The leading dimension of the array T. LDT >= K.\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date April 2012\n*\n*> \\ingroup realOTHERauxiliary\n*\n*> \\par Further Details:\n*  =====================\n*>\n*> \\verbatim\n*>\n*>  The shape of the matrix V and the storage of the vectors which define\n*>  the H(i) is best illustrated by the following example with n = 5 and\n*>  k = 3. The elements equal to 1 are not stored.\n*>\n*>  DIRECT = 'F' and STOREV = 'C':         DIRECT = 'F' and STOREV = 'R':\n*>\n*>               V = (  1       )                 V = (  1 v1 v1 v1 v1 )\n*>                   ( v1  1    )                     (     1 v2 v2 v2 )\n*>                   ( v1 v2  1 )                     (        1 v3 v3 )\n*>                   ( v1 v2 v3 )\n*>                   ( v1 v2 v3 )\n*>\n*>  DIRECT = 'B' and STOREV = 'C':         DIRECT = 'B' and STOREV = 'R':\n*>\n*>               V = ( v1 v2 v3 )                 V = ( v1 v1  1       )\n*>                   ( v1 v2 v3 )                     ( v2 v2 v2  1    )\n*>                   (  1 v2 v3 )                     ( v3 v3 v3 v3  1 )\n*>                   (     1 v3 )\n*>                   (        1 )\n*> \\endverbatim\n*>\n*  =====================================================================\n      SUBROUTINE SLARFT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )\n*\n*  -- LAPACK auxiliary routine (version 3.4.1) --\n*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     April 2012\n*\n*     .. Scalar Arguments ..\n      CHARACTER          DIRECT, STOREV\n      INTEGER            K, LDT, LDV, N\n*     ..\n*     .. Array Arguments ..\n      REAL               T( LDT, * ), TAU( * ), V( LDV, * )\n*     ..\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      REAL               ONE, ZERO\n      PARAMETER          ( ONE = 1.0E+0, ZERO = 0.0E+0 )\n*     ..\n*     .. Local Scalars ..\n      INTEGER            I, J, PREVLASTV, LASTV\n*     ..\n*     .. External Subroutines ..\n      EXTERNAL           SGEMV, STRMV\n*     ..\n*     .. External Functions ..\n      LOGICAL            LSAME\n      EXTERNAL           LSAME\n*     ..\n*     .. Executable Statements ..\n*\n*     Quick return if possible\n*\n      IF( N.EQ.0 )\n     $   RETURN\n*\n      IF( LSAME( DIRECT, 'F' ) ) THEN\n         PREVLASTV = N\n         DO I = 1, K\n            PREVLASTV = MAX( I, PREVLASTV )\n            IF( TAU( I ).EQ.ZERO ) THEN\n*\n*              H(i)  =  I\n*\n               DO J = 1, I\n                  T( J, I ) = ZERO\n               END DO\n            ELSE\n*\n*              general case\n*\n               IF( LSAME( STOREV, 'C' ) ) THEN\n*                 Skip any trailing zeros.\n                  DO LASTV = N, I+1, -1\n                     IF( V( LASTV, I ).NE.ZERO ) EXIT\n                  END DO\n                  DO J = 1, I-1\n                     T( J, I ) = -TAU( I ) * V( I , J )\n                  END DO   \n                  J = MIN( LASTV, PREVLASTV )\n*\n*                 T(1:i-1,i) := - tau(i) * V(i:j,1:i-1)**T * V(i:j,i)\n*\n                  CALL SGEMV( 'Transpose', J-I, I-1, -TAU( I ),\n     $                        V( I+1, 1 ), LDV, V( I+1, I ), 1, ONE,\n     $                        T( 1, I ), 1 )\n               ELSE\n*                 Skip any trailing zeros.\n                  DO LASTV = N, I+1, -1\n                     IF( V( I, LASTV ).NE.ZERO ) EXIT\n                  END DO\n                  DO J = 1, I-1\n                     T( J, I ) = -TAU( I ) * V( J , I )\n                  END DO   \n                  J = MIN( LASTV, PREVLASTV )\n*\n*                 T(1:i-1,i) := - tau(i) * V(1:i-1,i:j) * V(i,i:j)**T\n*\n                  CALL SGEMV( 'No transpose', I-1, J-I, -TAU( I ),\n     $                        V( 1, I+1 ), LDV, V( I, I+1 ), LDV, \n     $                        ONE, T( 1, I ), 1 )\n               END IF\n*\n*              T(1:i-1,i) := T(1:i-1,1:i-1) * T(1:i-1,i)\n*\n               CALL STRMV( 'Upper', 'No transpose', 'Non-unit', I-1, T,\n     $                     LDT, T( 1, I ), 1 )\n               T( I, I ) = TAU( I )\n               IF( I.GT.1 ) THEN\n                  PREVLASTV = MAX( PREVLASTV, LASTV )\n               ELSE\n                  PREVLASTV = LASTV\n               END IF\n            END IF\n         END DO\n      ELSE\n         PREVLASTV = 1\n         DO I = K, 1, -1\n            IF( TAU( I ).EQ.ZERO ) THEN\n*\n*              H(i)  =  I\n*\n               DO J = I, K\n                  T( J, I ) = ZERO\n               END DO\n            ELSE\n*\n*              general case\n*\n               IF( I.LT.K ) THEN\n                  IF( LSAME( STOREV, 'C' ) ) THEN\n*                    Skip any leading zeros.\n                     DO LASTV = 1, I-1\n                        IF( V( LASTV, I ).NE.ZERO ) EXIT\n                     END DO\n                     DO J = I+1, K\n                        T( J, I ) = -TAU( I ) * V( N-K+I , J )\n                     END DO   \n                     J = MAX( LASTV, PREVLASTV )\n*\n*                    T(i+1:k,i) = -tau(i) * V(j:n-k+i,i+1:k)**T * V(j:n-k+i,i)\n*\n                     CALL SGEMV( 'Transpose', N-K+I-J, K-I, -TAU( I ),\n     $                           V( J, I+1 ), LDV, V( J, I ), 1, ONE,\n     $                           T( I+1, I ), 1 )\n                  ELSE\n*                    Skip any leading zeros.\n                     DO LASTV = 1, I-1\n                        IF( V( I, LASTV ).NE.ZERO ) EXIT\n                     END DO\n                     DO J = I+1, K\n                        T( J, I ) = -TAU( I ) * V( J, N-K+I )\n                     END DO   \n                     J = MAX( LASTV, PREVLASTV )\n*\n*                    T(i+1:k,i) = -tau(i) * V(i+1:k,j:n-k+i) * V(i,j:n-k+i)**T\n*\n                     CALL SGEMV( 'No transpose', K-I, N-K+I-J,\n     $                    -TAU( I ), V( I+1, J ), LDV, V( I, J ), LDV,\n     $                    ONE, T( I+1, I ), 1 )\n                  END IF\n*\n*                 T(i+1:k,i) := T(i+1:k,i+1:k) * T(i+1:k,i)\n*\n                  CALL STRMV( 'Lower', 'No transpose', 'Non-unit', K-I,\n     $                        T( I+1, I+1 ), LDT, T( I+1, I ), 1 )\n                  IF( I.GT.1 ) THEN\n                     PREVLASTV = MIN( PREVLASTV, LASTV )\n                  ELSE\n                     PREVLASTV = LASTV\n                  END IF\n               END IF\n               T( I, I ) = TAU( I )\n            END IF\n         END DO\n      END IF\n      RETURN\n*\n*     End of SLARFT\n*\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/svd.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"lapack_common.h\"\n#include <Eigen/SVD>\n\n// computes the singular values/vectors a general M-by-N matrix A using divide-and-conquer\nEIGEN_LAPACK_FUNC(gesdd,(char *jobz, int *m, int* n, Scalar* a, int *lda, RealScalar *s, Scalar *u, int *ldu, Scalar *vt, int *ldvt, Scalar* /*work*/, int* lwork,\n                         EIGEN_LAPACK_ARG_IF_COMPLEX(RealScalar */*rwork*/) int * /*iwork*/, int *info))\n{\n  // TODO exploit the work buffer\n  bool query_size = *lwork==-1;\n  int diag_size = (std::min)(*m,*n);\n  \n  *info = 0;\n        if(*jobz!='A' && *jobz!='S' && *jobz!='O' && *jobz!='N')  *info = -1;\n  else  if(*m<0)                                                  *info = -2;\n  else  if(*n<0)                                                  *info = -3;\n  else  if(*lda<std::max(1,*m))                                   *info = -5;\n  else  if(*lda<std::max(1,*m))                                   *info = -8;\n  else  if(*ldu <1 || (*jobz=='A' && *ldu <*m)\n                   || (*jobz=='O' && *m<*n && *ldu<*m))           *info = -8;\n  else  if(*ldvt<1 || (*jobz=='A' && *ldvt<*n)\n                   || (*jobz=='S' && *ldvt<diag_size)\n                   || (*jobz=='O' && *m>=*n && *ldvt<*n))         *info = -10;\n  \n  if(*info!=0)\n  {\n    int e = -*info;\n    return xerbla_(SCALAR_SUFFIX_UP\"GESDD \", &e, 6);\n  }\n  \n  if(query_size)\n  {\n    *lwork = 0;\n    return 0;\n  }\n  \n  if(*n==0 || *m==0)\n    return 0;\n  \n  PlainMatrixType mat(*m,*n);\n  mat = matrix(a,*m,*n,*lda);\n  \n  int option = *jobz=='A' ? ComputeFullU|ComputeFullV\n             : *jobz=='S' ? ComputeThinU|ComputeThinV\n             : *jobz=='O' ? ComputeThinU|ComputeThinV\n             : 0;\n\n  BDCSVD<PlainMatrixType> svd(mat,option);\n  \n  make_vector(s,diag_size) = svd.singularValues().head(diag_size);\n\n  if(*jobz=='A')\n  {\n    matrix(u,*m,*m,*ldu)   = svd.matrixU();\n    matrix(vt,*n,*n,*ldvt) = svd.matrixV().adjoint();\n  }\n  else if(*jobz=='S')\n  {\n    matrix(u,*m,diag_size,*ldu)   = svd.matrixU();\n    matrix(vt,diag_size,*n,*ldvt) = svd.matrixV().adjoint();\n  }\n  else if(*jobz=='O' && *m>=*n)\n  {\n    matrix(a,*m,*n,*lda)   = svd.matrixU();\n    matrix(vt,*n,*n,*ldvt) = svd.matrixV().adjoint();\n  }\n  else if(*jobz=='O')\n  {\n    matrix(u,*m,*m,*ldu)        = svd.matrixU();\n    matrix(a,diag_size,*n,*lda) = svd.matrixV().adjoint();\n  }\n    \n  return 0;\n}\n\n// computes the singular values/vectors a general M-by-N matrix A using two sided jacobi algorithm\nEIGEN_LAPACK_FUNC(gesvd,(char *jobu, char *jobv, int *m, int* n, Scalar* a, int *lda, RealScalar *s, Scalar *u, int *ldu, Scalar *vt, int *ldvt, Scalar* /*work*/, int* lwork,\n                         EIGEN_LAPACK_ARG_IF_COMPLEX(RealScalar */*rwork*/) int *info))\n{\n  // TODO exploit the work buffer\n  bool query_size = *lwork==-1;\n  int diag_size = (std::min)(*m,*n);\n  \n  *info = 0;\n        if( *jobu!='A' && *jobu!='S' && *jobu!='O' && *jobu!='N') *info = -1;\n  else  if((*jobv!='A' && *jobv!='S' && *jobv!='O' && *jobv!='N')\n           || (*jobu=='O' && *jobv=='O'))                         *info = -2;\n  else  if(*m<0)                                                  *info = -3;\n  else  if(*n<0)                                                  *info = -4;\n  else  if(*lda<std::max(1,*m))                                   *info = -6;\n  else  if(*ldu <1 || ((*jobu=='A' || *jobu=='S') && *ldu<*m))    *info = -9;\n  else  if(*ldvt<1 || (*jobv=='A' && *ldvt<*n)\n                   || (*jobv=='S' && *ldvt<diag_size))            *info = -11;\n  \n  if(*info!=0)\n  {\n    int e = -*info;\n    return xerbla_(SCALAR_SUFFIX_UP\"GESVD \", &e, 6);\n  }\n  \n  if(query_size)\n  {\n    *lwork = 0;\n    return 0;\n  }\n  \n  if(*n==0 || *m==0)\n    return 0;\n  \n  PlainMatrixType mat(*m,*n);\n  mat = matrix(a,*m,*n,*lda);\n  \n  int option = (*jobu=='A' ? ComputeFullU : *jobu=='S' || *jobu=='O' ? ComputeThinU : 0)\n             | (*jobv=='A' ? ComputeFullV : *jobv=='S' || *jobv=='O' ? ComputeThinV : 0);\n  \n  JacobiSVD<PlainMatrixType> svd(mat,option);\n  \n  make_vector(s,diag_size) = svd.singularValues().head(diag_size);\n  {\n        if(*jobu=='A') matrix(u,*m,*m,*ldu)           = svd.matrixU();\n  else  if(*jobu=='S') matrix(u,*m,diag_size,*ldu)    = svd.matrixU();\n  else  if(*jobu=='O') matrix(a,*m,diag_size,*lda)    = svd.matrixU();\n  }\n  {\n        if(*jobv=='A') matrix(vt,*n,*n,*ldvt)         = svd.matrixV().adjoint();\n  else  if(*jobv=='S') matrix(vt,diag_size,*n,*ldvt)  = svd.matrixV().adjoint();\n  else  if(*jobv=='O') matrix(a,diag_size,*n,*lda)    = svd.matrixV().adjoint();\n  }\n  return 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/zlacgv.f",
    "content": "*> \\brief \\b ZLACGV\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*> \\htmlonly\n*> Download ZLACGV + dependencies \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlacgv.f\"> \n*> [TGZ]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlacgv.f\"> \n*> [ZIP]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlacgv.f\"> \n*> [TXT]</a>\n*> \\endhtmlonly \n*\n*  Definition:\n*  ===========\n*\n*       SUBROUTINE ZLACGV( N, X, INCX )\n* \n*       .. Scalar Arguments ..\n*       INTEGER            INCX, N\n*       ..\n*       .. Array Arguments ..\n*       COMPLEX*16         X( * )\n*       ..\n*  \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> ZLACGV conjugates a complex vector of length N.\n*> \\endverbatim\n*\n*  Arguments:\n*  ==========\n*\n*> \\param[in] N\n*> \\verbatim\n*>          N is INTEGER\n*>          The length of the vector X.  N >= 0.\n*> \\endverbatim\n*>\n*> \\param[in,out] X\n*> \\verbatim\n*>          X is COMPLEX*16 array, dimension\n*>                         (1+(N-1)*abs(INCX))\n*>          On entry, the vector of length N to be conjugated.\n*>          On exit, X is overwritten with conjg(X).\n*> \\endverbatim\n*>\n*> \\param[in] INCX\n*> \\verbatim\n*>          INCX is INTEGER\n*>          The spacing between successive elements of X.\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date November 2011\n*\n*> \\ingroup complex16OTHERauxiliary\n*\n*  =====================================================================\n      SUBROUTINE ZLACGV( N, X, INCX )\n*\n*  -- LAPACK auxiliary routine (version 3.4.0) --\n*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     November 2011\n*\n*     .. Scalar Arguments ..\n      INTEGER            INCX, N\n*     ..\n*     .. Array Arguments ..\n      COMPLEX*16         X( * )\n*     ..\n*\n* =====================================================================\n*\n*     .. Local Scalars ..\n      INTEGER            I, IOFF\n*     ..\n*     .. Intrinsic Functions ..\n      INTRINSIC          DCONJG\n*     ..\n*     .. Executable Statements ..\n*\n      IF( INCX.EQ.1 ) THEN\n         DO 10 I = 1, N\n            X( I ) = DCONJG( X( I ) )\n   10    CONTINUE\n      ELSE\n         IOFF = 1\n         IF( INCX.LT.0 )\n     $      IOFF = 1 - ( N-1 )*INCX\n         DO 20 I = 1, N\n            X( IOFF ) = DCONJG( X( IOFF ) )\n            IOFF = IOFF + INCX\n   20    CONTINUE\n      END IF\n      RETURN\n*\n*     End of ZLACGV\n*\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/zladiv.f",
    "content": "*> \\brief \\b ZLADIV\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*> \\htmlonly\n*> Download ZLADIV + dependencies \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zladiv.f\"> \n*> [TGZ]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zladiv.f\"> \n*> [ZIP]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zladiv.f\"> \n*> [TXT]</a>\n*> \\endhtmlonly \n*\n*  Definition:\n*  ===========\n*\n*       COMPLEX*16     FUNCTION ZLADIV( X, Y )\n* \n*       .. Scalar Arguments ..\n*       COMPLEX*16         X, Y\n*       ..\n*  \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> ZLADIV := X / Y, where X and Y are complex.  The computation of X / Y\n*> will not overflow on an intermediary step unless the results\n*> overflows.\n*> \\endverbatim\n*\n*  Arguments:\n*  ==========\n*\n*> \\param[in] X\n*> \\verbatim\n*>          X is COMPLEX*16\n*> \\endverbatim\n*>\n*> \\param[in] Y\n*> \\verbatim\n*>          Y is COMPLEX*16\n*>          The complex scalars X and Y.\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date November 2011\n*\n*> \\ingroup complex16OTHERauxiliary\n*\n*  =====================================================================\n      COMPLEX*16     FUNCTION ZLADIV( X, Y )\n*\n*  -- LAPACK auxiliary routine (version 3.4.0) --\n*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     November 2011\n*\n*     .. Scalar Arguments ..\n      COMPLEX*16         X, Y\n*     ..\n*\n*  =====================================================================\n*\n*     .. Local Scalars ..\n      DOUBLE PRECISION   ZI, ZR\n*     ..\n*     .. External Subroutines ..\n      EXTERNAL           DLADIV\n*     ..\n*     .. Intrinsic Functions ..\n      INTRINSIC          DBLE, DCMPLX, DIMAG\n*     ..\n*     .. Executable Statements ..\n*\n      CALL DLADIV( DBLE( X ), DIMAG( X ), DBLE( Y ), DIMAG( Y ), ZR,\n     $             ZI )\n      ZLADIV = DCMPLX( ZR, ZI )\n*\n      RETURN\n*\n*     End of ZLADIV\n*\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/zlarf.f",
    "content": "*> \\brief \\b ZLARF\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*> \\htmlonly\n*> Download ZLARF + dependencies \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlarf.f\"> \n*> [TGZ]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlarf.f\"> \n*> [ZIP]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlarf.f\"> \n*> [TXT]</a>\n*> \\endhtmlonly \n*\n*  Definition:\n*  ===========\n*\n*       SUBROUTINE ZLARF( SIDE, M, N, V, INCV, TAU, C, LDC, WORK )\n* \n*       .. Scalar Arguments ..\n*       CHARACTER          SIDE\n*       INTEGER            INCV, LDC, M, N\n*       COMPLEX*16         TAU\n*       ..\n*       .. Array Arguments ..\n*       COMPLEX*16         C( LDC, * ), V( * ), WORK( * )\n*       ..\n*  \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> ZLARF applies a complex elementary reflector H to a complex M-by-N\n*> matrix C, from either the left or the right. H is represented in the\n*> form\n*>\n*>       H = I - tau * v * v**H\n*>\n*> where tau is a complex scalar and v is a complex vector.\n*>\n*> If tau = 0, then H is taken to be the unit matrix.\n*>\n*> To apply H**H, supply conjg(tau) instead\n*> tau.\n*> \\endverbatim\n*\n*  Arguments:\n*  ==========\n*\n*> \\param[in] SIDE\n*> \\verbatim\n*>          SIDE is CHARACTER*1\n*>          = 'L': form  H * C\n*>          = 'R': form  C * H\n*> \\endverbatim\n*>\n*> \\param[in] M\n*> \\verbatim\n*>          M is INTEGER\n*>          The number of rows of the matrix C.\n*> \\endverbatim\n*>\n*> \\param[in] N\n*> \\verbatim\n*>          N is INTEGER\n*>          The number of columns of the matrix C.\n*> \\endverbatim\n*>\n*> \\param[in] V\n*> \\verbatim\n*>          V is COMPLEX*16 array, dimension\n*>                     (1 + (M-1)*abs(INCV)) if SIDE = 'L'\n*>                  or (1 + (N-1)*abs(INCV)) if SIDE = 'R'\n*>          The vector v in the representation of H. V is not used if\n*>          TAU = 0.\n*> \\endverbatim\n*>\n*> \\param[in] INCV\n*> \\verbatim\n*>          INCV is INTEGER\n*>          The increment between elements of v. INCV <> 0.\n*> \\endverbatim\n*>\n*> \\param[in] TAU\n*> \\verbatim\n*>          TAU is COMPLEX*16\n*>          The value tau in the representation of H.\n*> \\endverbatim\n*>\n*> \\param[in,out] C\n*> \\verbatim\n*>          C is COMPLEX*16 array, dimension (LDC,N)\n*>          On entry, the M-by-N matrix C.\n*>          On exit, C is overwritten by the matrix H * C if SIDE = 'L',\n*>          or C * H if SIDE = 'R'.\n*> \\endverbatim\n*>\n*> \\param[in] LDC\n*> \\verbatim\n*>          LDC is INTEGER\n*>          The leading dimension of the array C. LDC >= max(1,M).\n*> \\endverbatim\n*>\n*> \\param[out] WORK\n*> \\verbatim\n*>          WORK is COMPLEX*16 array, dimension\n*>                         (N) if SIDE = 'L'\n*>                      or (M) if SIDE = 'R'\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date November 2011\n*\n*> \\ingroup complex16OTHERauxiliary\n*\n*  =====================================================================\n      SUBROUTINE ZLARF( SIDE, M, N, V, INCV, TAU, C, LDC, WORK )\n*\n*  -- LAPACK auxiliary routine (version 3.4.0) --\n*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     November 2011\n*\n*     .. Scalar Arguments ..\n      CHARACTER          SIDE\n      INTEGER            INCV, LDC, M, N\n      COMPLEX*16         TAU\n*     ..\n*     .. Array Arguments ..\n      COMPLEX*16         C( LDC, * ), V( * ), WORK( * )\n*     ..\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      COMPLEX*16         ONE, ZERO\n      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ),\n     $                   ZERO = ( 0.0D+0, 0.0D+0 ) )\n*     ..\n*     .. Local Scalars ..\n      LOGICAL            APPLYLEFT\n      INTEGER            I, LASTV, LASTC\n*     ..\n*     .. External Subroutines ..\n      EXTERNAL           ZGEMV, ZGERC\n*     ..\n*     .. External Functions ..\n      LOGICAL            LSAME\n      INTEGER            ILAZLR, ILAZLC\n      EXTERNAL           LSAME, ILAZLR, ILAZLC\n*     ..\n*     .. Executable Statements ..\n*\n      APPLYLEFT = LSAME( SIDE, 'L' )\n      LASTV = 0\n      LASTC = 0\n      IF( TAU.NE.ZERO ) THEN\n*     Set up variables for scanning V.  LASTV begins pointing to the end\n*     of V.\n         IF( APPLYLEFT ) THEN\n            LASTV = M\n         ELSE\n            LASTV = N\n         END IF\n         IF( INCV.GT.0 ) THEN\n            I = 1 + (LASTV-1) * INCV\n         ELSE\n            I = 1\n         END IF\n*     Look for the last non-zero row in V.\n         DO WHILE( LASTV.GT.0 .AND. V( I ).EQ.ZERO )\n            LASTV = LASTV - 1\n            I = I - INCV\n         END DO\n         IF( APPLYLEFT ) THEN\n*     Scan for the last non-zero column in C(1:lastv,:).\n            LASTC = ILAZLC(LASTV, N, C, LDC)\n         ELSE\n*     Scan for the last non-zero row in C(:,1:lastv).\n            LASTC = ILAZLR(M, LASTV, C, LDC)\n         END IF\n      END IF\n*     Note that lastc.eq.0 renders the BLAS operations null; no special\n*     case is needed at this level.\n      IF( APPLYLEFT ) THEN\n*\n*        Form  H * C\n*\n         IF( LASTV.GT.0 ) THEN\n*\n*           w(1:lastc,1) := C(1:lastv,1:lastc)**H * v(1:lastv,1)\n*\n            CALL ZGEMV( 'Conjugate transpose', LASTV, LASTC, ONE,\n     $           C, LDC, V, INCV, ZERO, WORK, 1 )\n*\n*           C(1:lastv,1:lastc) := C(...) - v(1:lastv,1) * w(1:lastc,1)**H\n*\n            CALL ZGERC( LASTV, LASTC, -TAU, V, INCV, WORK, 1, C, LDC )\n         END IF\n      ELSE\n*\n*        Form  C * H\n*\n         IF( LASTV.GT.0 ) THEN\n*\n*           w(1:lastc,1) := C(1:lastc,1:lastv) * v(1:lastv,1)\n*\n            CALL ZGEMV( 'No transpose', LASTC, LASTV, ONE, C, LDC,\n     $           V, INCV, ZERO, WORK, 1 )\n*\n*           C(1:lastc,1:lastv) := C(...) - w(1:lastc,1) * v(1:lastv,1)**H\n*\n            CALL ZGERC( LASTC, LASTV, -TAU, WORK, 1, V, INCV, C, LDC )\n         END IF\n      END IF\n      RETURN\n*\n*     End of ZLARF\n*\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/zlarfb.f",
    "content": "*> \\brief \\b ZLARFB\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*> \\htmlonly\n*> Download ZLARFB + dependencies \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlarfb.f\"> \n*> [TGZ]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlarfb.f\"> \n*> [ZIP]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlarfb.f\"> \n*> [TXT]</a>\n*> \\endhtmlonly \n*\n*  Definition:\n*  ===========\n*\n*       SUBROUTINE ZLARFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV,\n*                          T, LDT, C, LDC, WORK, LDWORK )\n* \n*       .. Scalar Arguments ..\n*       CHARACTER          DIRECT, SIDE, STOREV, TRANS\n*       INTEGER            K, LDC, LDT, LDV, LDWORK, M, N\n*       ..\n*       .. Array Arguments ..\n*       COMPLEX*16         C( LDC, * ), T( LDT, * ), V( LDV, * ),\n*      $                   WORK( LDWORK, * )\n*       ..\n*  \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> ZLARFB applies a complex block reflector H or its transpose H**H to a\n*> complex M-by-N matrix C, from either the left or the right.\n*> \\endverbatim\n*\n*  Arguments:\n*  ==========\n*\n*> \\param[in] SIDE\n*> \\verbatim\n*>          SIDE is CHARACTER*1\n*>          = 'L': apply H or H**H from the Left\n*>          = 'R': apply H or H**H from the Right\n*> \\endverbatim\n*>\n*> \\param[in] TRANS\n*> \\verbatim\n*>          TRANS is CHARACTER*1\n*>          = 'N': apply H (No transpose)\n*>          = 'C': apply H**H (Conjugate transpose)\n*> \\endverbatim\n*>\n*> \\param[in] DIRECT\n*> \\verbatim\n*>          DIRECT is CHARACTER*1\n*>          Indicates how H is formed from a product of elementary\n*>          reflectors\n*>          = 'F': H = H(1) H(2) . . . H(k) (Forward)\n*>          = 'B': H = H(k) . . . H(2) H(1) (Backward)\n*> \\endverbatim\n*>\n*> \\param[in] STOREV\n*> \\verbatim\n*>          STOREV is CHARACTER*1\n*>          Indicates how the vectors which define the elementary\n*>          reflectors are stored:\n*>          = 'C': Columnwise\n*>          = 'R': Rowwise\n*> \\endverbatim\n*>\n*> \\param[in] M\n*> \\verbatim\n*>          M is INTEGER\n*>          The number of rows of the matrix C.\n*> \\endverbatim\n*>\n*> \\param[in] N\n*> \\verbatim\n*>          N is INTEGER\n*>          The number of columns of the matrix C.\n*> \\endverbatim\n*>\n*> \\param[in] K\n*> \\verbatim\n*>          K is INTEGER\n*>          The order of the matrix T (= the number of elementary\n*>          reflectors whose product defines the block reflector).\n*> \\endverbatim\n*>\n*> \\param[in] V\n*> \\verbatim\n*>          V is COMPLEX*16 array, dimension\n*>                                (LDV,K) if STOREV = 'C'\n*>                                (LDV,M) if STOREV = 'R' and SIDE = 'L'\n*>                                (LDV,N) if STOREV = 'R' and SIDE = 'R'\n*>          See Further Details.\n*> \\endverbatim\n*>\n*> \\param[in] LDV\n*> \\verbatim\n*>          LDV is INTEGER\n*>          The leading dimension of the array V.\n*>          If STOREV = 'C' and SIDE = 'L', LDV >= max(1,M);\n*>          if STOREV = 'C' and SIDE = 'R', LDV >= max(1,N);\n*>          if STOREV = 'R', LDV >= K.\n*> \\endverbatim\n*>\n*> \\param[in] T\n*> \\verbatim\n*>          T is COMPLEX*16 array, dimension (LDT,K)\n*>          The triangular K-by-K matrix T in the representation of the\n*>          block reflector.\n*> \\endverbatim\n*>\n*> \\param[in] LDT\n*> \\verbatim\n*>          LDT is INTEGER\n*>          The leading dimension of the array T. LDT >= K.\n*> \\endverbatim\n*>\n*> \\param[in,out] C\n*> \\verbatim\n*>          C is COMPLEX*16 array, dimension (LDC,N)\n*>          On entry, the M-by-N matrix C.\n*>          On exit, C is overwritten by H*C or H**H*C or C*H or C*H**H.\n*> \\endverbatim\n*>\n*> \\param[in] LDC\n*> \\verbatim\n*>          LDC is INTEGER\n*>          The leading dimension of the array C. LDC >= max(1,M).\n*> \\endverbatim\n*>\n*> \\param[out] WORK\n*> \\verbatim\n*>          WORK is COMPLEX*16 array, dimension (LDWORK,K)\n*> \\endverbatim\n*>\n*> \\param[in] LDWORK\n*> \\verbatim\n*>          LDWORK is INTEGER\n*>          The leading dimension of the array WORK.\n*>          If SIDE = 'L', LDWORK >= max(1,N);\n*>          if SIDE = 'R', LDWORK >= max(1,M).\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date November 2011\n*\n*> \\ingroup complex16OTHERauxiliary\n*\n*> \\par Further Details:\n*  =====================\n*>\n*> \\verbatim\n*>\n*>  The shape of the matrix V and the storage of the vectors which define\n*>  the H(i) is best illustrated by the following example with n = 5 and\n*>  k = 3. The elements equal to 1 are not stored; the corresponding\n*>  array elements are modified but restored on exit. The rest of the\n*>  array is not used.\n*>\n*>  DIRECT = 'F' and STOREV = 'C':         DIRECT = 'F' and STOREV = 'R':\n*>\n*>               V = (  1       )                 V = (  1 v1 v1 v1 v1 )\n*>                   ( v1  1    )                     (     1 v2 v2 v2 )\n*>                   ( v1 v2  1 )                     (        1 v3 v3 )\n*>                   ( v1 v2 v3 )\n*>                   ( v1 v2 v3 )\n*>\n*>  DIRECT = 'B' and STOREV = 'C':         DIRECT = 'B' and STOREV = 'R':\n*>\n*>               V = ( v1 v2 v3 )                 V = ( v1 v1  1       )\n*>                   ( v1 v2 v3 )                     ( v2 v2 v2  1    )\n*>                   (  1 v2 v3 )                     ( v3 v3 v3 v3  1 )\n*>                   (     1 v3 )\n*>                   (        1 )\n*> \\endverbatim\n*>\n*  =====================================================================\n      SUBROUTINE ZLARFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV,\n     $                   T, LDT, C, LDC, WORK, LDWORK )\n*\n*  -- LAPACK auxiliary routine (version 3.4.0) --\n*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     November 2011\n*\n*     .. Scalar Arguments ..\n      CHARACTER          DIRECT, SIDE, STOREV, TRANS\n      INTEGER            K, LDC, LDT, LDV, LDWORK, M, N\n*     ..\n*     .. Array Arguments ..\n      COMPLEX*16         C( LDC, * ), T( LDT, * ), V( LDV, * ),\n     $                   WORK( LDWORK, * )\n*     ..\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      COMPLEX*16         ONE\n      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ) )\n*     ..\n*     .. Local Scalars ..\n      CHARACTER          TRANST\n      INTEGER            I, J, LASTV, LASTC\n*     ..\n*     .. External Functions ..\n      LOGICAL            LSAME\n      INTEGER            ILAZLR, ILAZLC\n      EXTERNAL           LSAME, ILAZLR, ILAZLC\n*     ..\n*     .. External Subroutines ..\n      EXTERNAL           ZCOPY, ZGEMM, ZLACGV, ZTRMM\n*     ..\n*     .. Intrinsic Functions ..\n      INTRINSIC          DCONJG\n*     ..\n*     .. Executable Statements ..\n*\n*     Quick return if possible\n*\n      IF( M.LE.0 .OR. N.LE.0 )\n     $   RETURN\n*\n      IF( LSAME( TRANS, 'N' ) ) THEN\n         TRANST = 'C'\n      ELSE\n         TRANST = 'N'\n      END IF\n*\n      IF( LSAME( STOREV, 'C' ) ) THEN\n*\n         IF( LSAME( DIRECT, 'F' ) ) THEN\n*\n*           Let  V =  ( V1 )    (first K rows)\n*                     ( V2 )\n*           where  V1  is unit lower triangular.\n*\n            IF( LSAME( SIDE, 'L' ) ) THEN\n*\n*              Form  H * C  or  H**H * C  where  C = ( C1 )\n*                                                    ( C2 )\n*\n               LASTV = MAX( K, ILAZLR( M, K, V, LDV ) )\n               LASTC = ILAZLC( LASTV, N, C, LDC )\n*\n*              W := C**H * V  =  (C1**H * V1 + C2**H * V2)  (stored in WORK)\n*\n*              W := C1**H\n*\n               DO 10 J = 1, K\n                  CALL ZCOPY( LASTC, C( J, 1 ), LDC, WORK( 1, J ), 1 )\n                  CALL ZLACGV( LASTC, WORK( 1, J ), 1 )\n   10          CONTINUE\n*\n*              W := W * V1\n*\n               CALL ZTRMM( 'Right', 'Lower', 'No transpose', 'Unit',\n     $              LASTC, K, ONE, V, LDV, WORK, LDWORK )\n               IF( LASTV.GT.K ) THEN\n*\n*                 W := W + C2**H *V2\n*\n                  CALL ZGEMM( 'Conjugate transpose', 'No transpose',\n     $                 LASTC, K, LASTV-K, ONE, C( K+1, 1 ), LDC,\n     $                 V( K+1, 1 ), LDV, ONE, WORK, LDWORK )\n               END IF\n*\n*              W := W * T**H  or  W * T\n*\n               CALL ZTRMM( 'Right', 'Upper', TRANST, 'Non-unit',\n     $              LASTC, K, ONE, T, LDT, WORK, LDWORK )\n*\n*              C := C - V * W**H\n*\n               IF( M.GT.K ) THEN\n*\n*                 C2 := C2 - V2 * W**H\n*\n                  CALL ZGEMM( 'No transpose', 'Conjugate transpose',\n     $                 LASTV-K, LASTC, K,\n     $                 -ONE, V( K+1, 1 ), LDV, WORK, LDWORK,\n     $                 ONE, C( K+1, 1 ), LDC )\n               END IF\n*\n*              W := W * V1**H\n*\n               CALL ZTRMM( 'Right', 'Lower', 'Conjugate transpose',\n     $              'Unit', LASTC, K, ONE, V, LDV, WORK, LDWORK )\n*\n*              C1 := C1 - W**H\n*\n               DO 30 J = 1, K\n                  DO 20 I = 1, LASTC\n                     C( J, I ) = C( J, I ) - DCONJG( WORK( I, J ) )\n   20             CONTINUE\n   30          CONTINUE\n*\n            ELSE IF( LSAME( SIDE, 'R' ) ) THEN\n*\n*              Form  C * H  or  C * H**H  where  C = ( C1  C2 )\n*\n               LASTV = MAX( K, ILAZLR( N, K, V, LDV ) )\n               LASTC = ILAZLR( M, LASTV, C, LDC )\n*\n*              W := C * V  =  (C1*V1 + C2*V2)  (stored in WORK)\n*\n*              W := C1\n*\n               DO 40 J = 1, K\n                  CALL ZCOPY( LASTC, C( 1, J ), 1, WORK( 1, J ), 1 )\n   40          CONTINUE\n*\n*              W := W * V1\n*\n               CALL ZTRMM( 'Right', 'Lower', 'No transpose', 'Unit',\n     $              LASTC, K, ONE, V, LDV, WORK, LDWORK )\n               IF( LASTV.GT.K ) THEN\n*\n*                 W := W + C2 * V2\n*\n                  CALL ZGEMM( 'No transpose', 'No transpose',\n     $                 LASTC, K, LASTV-K,\n     $                 ONE, C( 1, K+1 ), LDC, V( K+1, 1 ), LDV,\n     $                 ONE, WORK, LDWORK )\n               END IF\n*\n*              W := W * T  or  W * T**H\n*\n               CALL ZTRMM( 'Right', 'Upper', TRANS, 'Non-unit',\n     $              LASTC, K, ONE, T, LDT, WORK, LDWORK )\n*\n*              C := C - W * V**H\n*\n               IF( LASTV.GT.K ) THEN\n*\n*                 C2 := C2 - W * V2**H\n*\n                  CALL ZGEMM( 'No transpose', 'Conjugate transpose',\n     $                 LASTC, LASTV-K, K,\n     $                 -ONE, WORK, LDWORK, V( K+1, 1 ), LDV,\n     $                 ONE, C( 1, K+1 ), LDC )\n               END IF\n*\n*              W := W * V1**H\n*\n               CALL ZTRMM( 'Right', 'Lower', 'Conjugate transpose',\n     $              'Unit', LASTC, K, ONE, V, LDV, WORK, LDWORK )\n*\n*              C1 := C1 - W\n*\n               DO 60 J = 1, K\n                  DO 50 I = 1, LASTC\n                     C( I, J ) = C( I, J ) - WORK( I, J )\n   50             CONTINUE\n   60          CONTINUE\n            END IF\n*\n         ELSE\n*\n*           Let  V =  ( V1 )\n*                     ( V2 )    (last K rows)\n*           where  V2  is unit upper triangular.\n*\n            IF( LSAME( SIDE, 'L' ) ) THEN\n*\n*              Form  H * C  or  H**H * C  where  C = ( C1 )\n*                                                    ( C2 )\n*\n               LASTV = MAX( K, ILAZLR( M, K, V, LDV ) )\n               LASTC = ILAZLC( LASTV, N, C, LDC )\n*\n*              W := C**H * V  =  (C1**H * V1 + C2**H * V2)  (stored in WORK)\n*\n*              W := C2**H\n*\n               DO 70 J = 1, K\n                  CALL ZCOPY( LASTC, C( LASTV-K+J, 1 ), LDC,\n     $                 WORK( 1, J ), 1 )\n                  CALL ZLACGV( LASTC, WORK( 1, J ), 1 )\n   70          CONTINUE\n*\n*              W := W * V2\n*\n               CALL ZTRMM( 'Right', 'Upper', 'No transpose', 'Unit',\n     $              LASTC, K, ONE, V( LASTV-K+1, 1 ), LDV,\n     $              WORK, LDWORK )\n               IF( LASTV.GT.K ) THEN\n*\n*                 W := W + C1**H*V1\n*\n                  CALL ZGEMM( 'Conjugate transpose', 'No transpose',\n     $                 LASTC, K, LASTV-K,\n     $                 ONE, C, LDC, V, LDV,\n     $                 ONE, WORK, LDWORK )\n               END IF\n*\n*              W := W * T**H  or  W * T\n*\n               CALL ZTRMM( 'Right', 'Lower', TRANST, 'Non-unit',\n     $              LASTC, K, ONE, T, LDT, WORK, LDWORK )\n*\n*              C := C - V * W**H\n*\n               IF( LASTV.GT.K ) THEN\n*\n*                 C1 := C1 - V1 * W**H\n*\n                  CALL ZGEMM( 'No transpose', 'Conjugate transpose',\n     $                 LASTV-K, LASTC, K,\n     $                 -ONE, V, LDV, WORK, LDWORK,\n     $                 ONE, C, LDC )\n               END IF\n*\n*              W := W * V2**H\n*\n               CALL ZTRMM( 'Right', 'Upper', 'Conjugate transpose',\n     $              'Unit', LASTC, K, ONE, V( LASTV-K+1, 1 ), LDV,\n     $              WORK, LDWORK )\n*\n*              C2 := C2 - W**H\n*\n               DO 90 J = 1, K\n                  DO 80 I = 1, LASTC\n                     C( LASTV-K+J, I ) = C( LASTV-K+J, I ) -\n     $                               DCONJG( WORK( I, J ) )\n   80             CONTINUE\n   90          CONTINUE\n*\n            ELSE IF( LSAME( SIDE, 'R' ) ) THEN\n*\n*              Form  C * H  or  C * H**H  where  C = ( C1  C2 )\n*\n               LASTV = MAX( K, ILAZLR( N, K, V, LDV ) )\n               LASTC = ILAZLR( M, LASTV, C, LDC )\n*\n*              W := C * V  =  (C1*V1 + C2*V2)  (stored in WORK)\n*\n*              W := C2\n*\n               DO 100 J = 1, K\n                  CALL ZCOPY( LASTC, C( 1, LASTV-K+J ), 1,\n     $                 WORK( 1, J ), 1 )\n  100          CONTINUE\n*\n*              W := W * V2\n*\n               CALL ZTRMM( 'Right', 'Upper', 'No transpose', 'Unit',\n     $              LASTC, K, ONE, V( LASTV-K+1, 1 ), LDV,\n     $              WORK, LDWORK )\n               IF( LASTV.GT.K ) THEN\n*\n*                 W := W + C1 * V1\n*\n                  CALL ZGEMM( 'No transpose', 'No transpose',\n     $                 LASTC, K, LASTV-K,\n     $                 ONE, C, LDC, V, LDV, ONE, WORK, LDWORK )\n               END IF\n*\n*              W := W * T  or  W * T**H\n*\n               CALL ZTRMM( 'Right', 'Lower', TRANS, 'Non-unit',\n     $              LASTC, K, ONE, T, LDT, WORK, LDWORK )\n*\n*              C := C - W * V**H\n*\n               IF( LASTV.GT.K ) THEN\n*\n*                 C1 := C1 - W * V1**H\n*\n                  CALL ZGEMM( 'No transpose', 'Conjugate transpose',\n     $                 LASTC, LASTV-K, K, -ONE, WORK, LDWORK, V, LDV,\n     $                 ONE, C, LDC )\n               END IF\n*\n*              W := W * V2**H\n*\n               CALL ZTRMM( 'Right', 'Upper', 'Conjugate transpose',\n     $              'Unit', LASTC, K, ONE, V( LASTV-K+1, 1 ), LDV,\n     $              WORK, LDWORK )\n*\n*              C2 := C2 - W\n*\n               DO 120 J = 1, K\n                  DO 110 I = 1, LASTC\n                     C( I, LASTV-K+J ) = C( I, LASTV-K+J )\n     $                    - WORK( I, J )\n  110             CONTINUE\n  120          CONTINUE\n            END IF\n         END IF\n*\n      ELSE IF( LSAME( STOREV, 'R' ) ) THEN\n*\n         IF( LSAME( DIRECT, 'F' ) ) THEN\n*\n*           Let  V =  ( V1  V2 )    (V1: first K columns)\n*           where  V1  is unit upper triangular.\n*\n            IF( LSAME( SIDE, 'L' ) ) THEN\n*\n*              Form  H * C  or  H**H * C  where  C = ( C1 )\n*                                                    ( C2 )\n*\n               LASTV = MAX( K, ILAZLC( K, M, V, LDV ) )\n               LASTC = ILAZLC( LASTV, N, C, LDC )\n*\n*              W := C**H * V**H  =  (C1**H * V1**H + C2**H * V2**H) (stored in WORK)\n*\n*              W := C1**H\n*\n               DO 130 J = 1, K\n                  CALL ZCOPY( LASTC, C( J, 1 ), LDC, WORK( 1, J ), 1 )\n                  CALL ZLACGV( LASTC, WORK( 1, J ), 1 )\n  130          CONTINUE\n*\n*              W := W * V1**H\n*\n               CALL ZTRMM( 'Right', 'Upper', 'Conjugate transpose',\n     $                     'Unit', LASTC, K, ONE, V, LDV, WORK, LDWORK )\n               IF( LASTV.GT.K ) THEN\n*\n*                 W := W + C2**H*V2**H\n*\n                  CALL ZGEMM( 'Conjugate transpose',\n     $                 'Conjugate transpose', LASTC, K, LASTV-K,\n     $                 ONE, C( K+1, 1 ), LDC, V( 1, K+1 ), LDV,\n     $                 ONE, WORK, LDWORK )\n               END IF\n*\n*              W := W * T**H  or  W * T\n*\n               CALL ZTRMM( 'Right', 'Upper', TRANST, 'Non-unit',\n     $              LASTC, K, ONE, T, LDT, WORK, LDWORK )\n*\n*              C := C - V**H * W**H\n*\n               IF( LASTV.GT.K ) THEN\n*\n*                 C2 := C2 - V2**H * W**H\n*\n                  CALL ZGEMM( 'Conjugate transpose',\n     $                 'Conjugate transpose', LASTV-K, LASTC, K,\n     $                 -ONE, V( 1, K+1 ), LDV, WORK, LDWORK,\n     $                 ONE, C( K+1, 1 ), LDC )\n               END IF\n*\n*              W := W * V1\n*\n               CALL ZTRMM( 'Right', 'Upper', 'No transpose', 'Unit',\n     $              LASTC, K, ONE, V, LDV, WORK, LDWORK )\n*\n*              C1 := C1 - W**H\n*\n               DO 150 J = 1, K\n                  DO 140 I = 1, LASTC\n                     C( J, I ) = C( J, I ) - DCONJG( WORK( I, J ) )\n  140             CONTINUE\n  150          CONTINUE\n*\n            ELSE IF( LSAME( SIDE, 'R' ) ) THEN\n*\n*              Form  C * H  or  C * H**H  where  C = ( C1  C2 )\n*\n               LASTV = MAX( K, ILAZLC( K, N, V, LDV ) )\n               LASTC = ILAZLR( M, LASTV, C, LDC )\n*\n*              W := C * V**H  =  (C1*V1**H + C2*V2**H)  (stored in WORK)\n*\n*              W := C1\n*\n               DO 160 J = 1, K\n                  CALL ZCOPY( LASTC, C( 1, J ), 1, WORK( 1, J ), 1 )\n  160          CONTINUE\n*\n*              W := W * V1**H\n*\n               CALL ZTRMM( 'Right', 'Upper', 'Conjugate transpose',\n     $                     'Unit', LASTC, K, ONE, V, LDV, WORK, LDWORK )\n               IF( LASTV.GT.K ) THEN\n*\n*                 W := W + C2 * V2**H\n*\n                  CALL ZGEMM( 'No transpose', 'Conjugate transpose',\n     $                 LASTC, K, LASTV-K, ONE, C( 1, K+1 ), LDC,\n     $                 V( 1, K+1 ), LDV, ONE, WORK, LDWORK )\n               END IF\n*\n*              W := W * T  or  W * T**H\n*\n               CALL ZTRMM( 'Right', 'Upper', TRANS, 'Non-unit',\n     $              LASTC, K, ONE, T, LDT, WORK, LDWORK )\n*\n*              C := C - W * V\n*\n               IF( LASTV.GT.K ) THEN\n*\n*                 C2 := C2 - W * V2\n*\n                  CALL ZGEMM( 'No transpose', 'No transpose',\n     $                 LASTC, LASTV-K, K,\n     $                 -ONE, WORK, LDWORK, V( 1, K+1 ), LDV,\n     $                 ONE, C( 1, K+1 ), LDC )\n               END IF\n*\n*              W := W * V1\n*\n               CALL ZTRMM( 'Right', 'Upper', 'No transpose', 'Unit',\n     $              LASTC, K, ONE, V, LDV, WORK, LDWORK )\n*\n*              C1 := C1 - W\n*\n               DO 180 J = 1, K\n                  DO 170 I = 1, LASTC\n                     C( I, J ) = C( I, J ) - WORK( I, J )\n  170             CONTINUE\n  180          CONTINUE\n*\n            END IF\n*\n         ELSE\n*\n*           Let  V =  ( V1  V2 )    (V2: last K columns)\n*           where  V2  is unit lower triangular.\n*\n            IF( LSAME( SIDE, 'L' ) ) THEN\n*\n*              Form  H * C  or  H**H * C  where  C = ( C1 )\n*                                                    ( C2 )\n*\n               LASTV = MAX( K, ILAZLC( K, M, V, LDV ) )\n               LASTC = ILAZLC( LASTV, N, C, LDC )\n*\n*              W := C**H * V**H  =  (C1**H * V1**H + C2**H * V2**H) (stored in WORK)\n*\n*              W := C2**H\n*\n               DO 190 J = 1, K\n                  CALL ZCOPY( LASTC, C( LASTV-K+J, 1 ), LDC,\n     $                 WORK( 1, J ), 1 )\n                  CALL ZLACGV( LASTC, WORK( 1, J ), 1 )\n  190          CONTINUE\n*\n*              W := W * V2**H\n*\n               CALL ZTRMM( 'Right', 'Lower', 'Conjugate transpose',\n     $              'Unit', LASTC, K, ONE, V( 1, LASTV-K+1 ), LDV,\n     $              WORK, LDWORK )\n               IF( LASTV.GT.K ) THEN\n*\n*                 W := W + C1**H * V1**H\n*\n                  CALL ZGEMM( 'Conjugate transpose',\n     $                 'Conjugate transpose', LASTC, K, LASTV-K,\n     $                 ONE, C, LDC, V, LDV, ONE, WORK, LDWORK )\n               END IF\n*\n*              W := W * T**H  or  W * T\n*\n               CALL ZTRMM( 'Right', 'Lower', TRANST, 'Non-unit',\n     $              LASTC, K, ONE, T, LDT, WORK, LDWORK )\n*\n*              C := C - V**H * W**H\n*\n               IF( LASTV.GT.K ) THEN\n*\n*                 C1 := C1 - V1**H * W**H\n*\n                  CALL ZGEMM( 'Conjugate transpose',\n     $                 'Conjugate transpose', LASTV-K, LASTC, K,\n     $                 -ONE, V, LDV, WORK, LDWORK, ONE, C, LDC )\n               END IF\n*\n*              W := W * V2\n*\n               CALL ZTRMM( 'Right', 'Lower', 'No transpose', 'Unit',\n     $              LASTC, K, ONE, V( 1, LASTV-K+1 ), LDV,\n     $              WORK, LDWORK )\n*\n*              C2 := C2 - W**H\n*\n               DO 210 J = 1, K\n                  DO 200 I = 1, LASTC\n                     C( LASTV-K+J, I ) = C( LASTV-K+J, I ) -\n     $                               DCONJG( WORK( I, J ) )\n  200             CONTINUE\n  210          CONTINUE\n*\n            ELSE IF( LSAME( SIDE, 'R' ) ) THEN\n*\n*              Form  C * H  or  C * H**H  where  C = ( C1  C2 )\n*\n               LASTV = MAX( K, ILAZLC( K, N, V, LDV ) )\n               LASTC = ILAZLR( M, LASTV, C, LDC )\n*\n*              W := C * V**H  =  (C1*V1**H + C2*V2**H)  (stored in WORK)\n*\n*              W := C2\n*\n               DO 220 J = 1, K\n                  CALL ZCOPY( LASTC, C( 1, LASTV-K+J ), 1,\n     $                 WORK( 1, J ), 1 )\n  220          CONTINUE\n*\n*              W := W * V2**H\n*\n               CALL ZTRMM( 'Right', 'Lower', 'Conjugate transpose',\n     $              'Unit', LASTC, K, ONE, V( 1, LASTV-K+1 ), LDV,\n     $              WORK, LDWORK )\n               IF( LASTV.GT.K ) THEN\n*\n*                 W := W + C1 * V1**H\n*\n                  CALL ZGEMM( 'No transpose', 'Conjugate transpose',\n     $                 LASTC, K, LASTV-K, ONE, C, LDC, V, LDV, ONE,\n     $                 WORK, LDWORK )\n               END IF\n*\n*              W := W * T  or  W * T**H\n*\n               CALL ZTRMM( 'Right', 'Lower', TRANS, 'Non-unit',\n     $              LASTC, K, ONE, T, LDT, WORK, LDWORK )\n*\n*              C := C - W * V\n*\n               IF( LASTV.GT.K ) THEN\n*\n*                 C1 := C1 - W * V1\n*\n                  CALL ZGEMM( 'No transpose', 'No transpose',\n     $                 LASTC, LASTV-K, K, -ONE, WORK, LDWORK, V, LDV,\n     $                 ONE, C, LDC )\n               END IF\n*\n*              W := W * V2\n*\n               CALL ZTRMM( 'Right', 'Lower', 'No transpose', 'Unit',\n     $              LASTC, K, ONE, V( 1, LASTV-K+1 ), LDV,\n     $              WORK, LDWORK )\n*\n*              C1 := C1 - W\n*\n               DO 240 J = 1, K\n                  DO 230 I = 1, LASTC\n                     C( I, LASTV-K+J ) = C( I, LASTV-K+J )\n     $                    - WORK( I, J )\n  230             CONTINUE\n  240          CONTINUE\n*\n            END IF\n*\n         END IF\n      END IF\n*\n      RETURN\n*\n*     End of ZLARFB\n*\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/zlarfg.f",
    "content": "*> \\brief \\b ZLARFG\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*> \\htmlonly\n*> Download ZLARFG + dependencies \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlarfg.f\"> \n*> [TGZ]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlarfg.f\"> \n*> [ZIP]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlarfg.f\"> \n*> [TXT]</a>\n*> \\endhtmlonly \n*\n*  Definition:\n*  ===========\n*\n*       SUBROUTINE ZLARFG( N, ALPHA, X, INCX, TAU )\n* \n*       .. Scalar Arguments ..\n*       INTEGER            INCX, N\n*       COMPLEX*16         ALPHA, TAU\n*       ..\n*       .. Array Arguments ..\n*       COMPLEX*16         X( * )\n*       ..\n*  \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> ZLARFG generates a complex elementary reflector H of order n, such\n*> that\n*>\n*>       H**H * ( alpha ) = ( beta ),   H**H * H = I.\n*>              (   x   )   (   0  )\n*>\n*> where alpha and beta are scalars, with beta real, and x is an\n*> (n-1)-element complex vector. H is represented in the form\n*>\n*>       H = I - tau * ( 1 ) * ( 1 v**H ) ,\n*>                     ( v )\n*>\n*> where tau is a complex scalar and v is a complex (n-1)-element\n*> vector. Note that H is not hermitian.\n*>\n*> If the elements of x are all zero and alpha is real, then tau = 0\n*> and H is taken to be the unit matrix.\n*>\n*> Otherwise  1 <= real(tau) <= 2  and  abs(tau-1) <= 1 .\n*> \\endverbatim\n*\n*  Arguments:\n*  ==========\n*\n*> \\param[in] N\n*> \\verbatim\n*>          N is INTEGER\n*>          The order of the elementary reflector.\n*> \\endverbatim\n*>\n*> \\param[in,out] ALPHA\n*> \\verbatim\n*>          ALPHA is COMPLEX*16\n*>          On entry, the value alpha.\n*>          On exit, it is overwritten with the value beta.\n*> \\endverbatim\n*>\n*> \\param[in,out] X\n*> \\verbatim\n*>          X is COMPLEX*16 array, dimension\n*>                         (1+(N-2)*abs(INCX))\n*>          On entry, the vector x.\n*>          On exit, it is overwritten with the vector v.\n*> \\endverbatim\n*>\n*> \\param[in] INCX\n*> \\verbatim\n*>          INCX is INTEGER\n*>          The increment between elements of X. INCX > 0.\n*> \\endverbatim\n*>\n*> \\param[out] TAU\n*> \\verbatim\n*>          TAU is COMPLEX*16\n*>          The value tau.\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date November 2011\n*\n*> \\ingroup complex16OTHERauxiliary\n*\n*  =====================================================================\n      SUBROUTINE ZLARFG( N, ALPHA, X, INCX, TAU )\n*\n*  -- LAPACK auxiliary routine (version 3.4.0) --\n*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     November 2011\n*\n*     .. Scalar Arguments ..\n      INTEGER            INCX, N\n      COMPLEX*16         ALPHA, TAU\n*     ..\n*     .. Array Arguments ..\n      COMPLEX*16         X( * )\n*     ..\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      DOUBLE PRECISION   ONE, ZERO\n      PARAMETER          ( ONE = 1.0D+0, ZERO = 0.0D+0 )\n*     ..\n*     .. Local Scalars ..\n      INTEGER            J, KNT\n      DOUBLE PRECISION   ALPHI, ALPHR, BETA, RSAFMN, SAFMIN, XNORM\n*     ..\n*     .. External Functions ..\n      DOUBLE PRECISION   DLAMCH, DLAPY3, DZNRM2\n      COMPLEX*16         ZLADIV\n      EXTERNAL           DLAMCH, DLAPY3, DZNRM2, ZLADIV\n*     ..\n*     .. Intrinsic Functions ..\n      INTRINSIC          ABS, DBLE, DCMPLX, DIMAG, SIGN\n*     ..\n*     .. External Subroutines ..\n      EXTERNAL           ZDSCAL, ZSCAL\n*     ..\n*     .. Executable Statements ..\n*\n      IF( N.LE.0 ) THEN\n         TAU = ZERO\n         RETURN\n      END IF\n*\n      XNORM = DZNRM2( N-1, X, INCX )\n      ALPHR = DBLE( ALPHA )\n      ALPHI = DIMAG( ALPHA )\n*\n      IF( XNORM.EQ.ZERO .AND. ALPHI.EQ.ZERO ) THEN\n*\n*        H  =  I\n*\n         TAU = ZERO\n      ELSE\n*\n*        general case\n*\n         BETA = -SIGN( DLAPY3( ALPHR, ALPHI, XNORM ), ALPHR )\n         SAFMIN = DLAMCH( 'S' ) / DLAMCH( 'E' )\n         RSAFMN = ONE / SAFMIN\n*\n         KNT = 0\n         IF( ABS( BETA ).LT.SAFMIN ) THEN\n*\n*           XNORM, BETA may be inaccurate; scale X and recompute them\n*\n   10       CONTINUE\n            KNT = KNT + 1\n            CALL ZDSCAL( N-1, RSAFMN, X, INCX )\n            BETA = BETA*RSAFMN\n            ALPHI = ALPHI*RSAFMN\n            ALPHR = ALPHR*RSAFMN\n            IF( ABS( BETA ).LT.SAFMIN )\n     $         GO TO 10\n*\n*           New BETA is at most 1, at least SAFMIN\n*\n            XNORM = DZNRM2( N-1, X, INCX )\n            ALPHA = DCMPLX( ALPHR, ALPHI )\n            BETA = -SIGN( DLAPY3( ALPHR, ALPHI, XNORM ), ALPHR )\n         END IF\n         TAU = DCMPLX( ( BETA-ALPHR ) / BETA, -ALPHI / BETA )\n         ALPHA = ZLADIV( DCMPLX( ONE ), ALPHA-BETA )\n         CALL ZSCAL( N-1, ALPHA, X, INCX )\n*\n*        If ALPHA is subnormal, it may lose relative accuracy\n*\n         DO 20 J = 1, KNT\n            BETA = BETA*SAFMIN\n 20      CONTINUE\n         ALPHA = BETA\n      END IF\n*\n      RETURN\n*\n*     End of ZLARFG\n*\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/lapack/zlarft.f",
    "content": "*> \\brief \\b ZLARFT\n*\n*  =========== DOCUMENTATION ===========\n*\n* Online html documentation available at \n*            http://www.netlib.org/lapack/explore-html/ \n*\n*> \\htmlonly\n*> Download ZLARFT + dependencies \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlarft.f\"> \n*> [TGZ]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlarft.f\"> \n*> [ZIP]</a> \n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlarft.f\"> \n*> [TXT]</a>\n*> \\endhtmlonly \n*\n*  Definition:\n*  ===========\n*\n*       SUBROUTINE ZLARFT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )\n* \n*       .. Scalar Arguments ..\n*       CHARACTER          DIRECT, STOREV\n*       INTEGER            K, LDT, LDV, N\n*       ..\n*       .. Array Arguments ..\n*       COMPLEX*16         T( LDT, * ), TAU( * ), V( LDV, * )\n*       ..\n*  \n*\n*> \\par Purpose:\n*  =============\n*>\n*> \\verbatim\n*>\n*> ZLARFT forms the triangular factor T of a complex block reflector H\n*> of order n, which is defined as a product of k elementary reflectors.\n*>\n*> If DIRECT = 'F', H = H(1) H(2) . . . H(k) and T is upper triangular;\n*>\n*> If DIRECT = 'B', H = H(k) . . . H(2) H(1) and T is lower triangular.\n*>\n*> If STOREV = 'C', the vector which defines the elementary reflector\n*> H(i) is stored in the i-th column of the array V, and\n*>\n*>    H  =  I - V * T * V**H\n*>\n*> If STOREV = 'R', the vector which defines the elementary reflector\n*> H(i) is stored in the i-th row of the array V, and\n*>\n*>    H  =  I - V**H * T * V\n*> \\endverbatim\n*\n*  Arguments:\n*  ==========\n*\n*> \\param[in] DIRECT\n*> \\verbatim\n*>          DIRECT is CHARACTER*1\n*>          Specifies the order in which the elementary reflectors are\n*>          multiplied to form the block reflector:\n*>          = 'F': H = H(1) H(2) . . . H(k) (Forward)\n*>          = 'B': H = H(k) . . . H(2) H(1) (Backward)\n*> \\endverbatim\n*>\n*> \\param[in] STOREV\n*> \\verbatim\n*>          STOREV is CHARACTER*1\n*>          Specifies how the vectors which define the elementary\n*>          reflectors are stored (see also Further Details):\n*>          = 'C': columnwise\n*>          = 'R': rowwise\n*> \\endverbatim\n*>\n*> \\param[in] N\n*> \\verbatim\n*>          N is INTEGER\n*>          The order of the block reflector H. N >= 0.\n*> \\endverbatim\n*>\n*> \\param[in] K\n*> \\verbatim\n*>          K is INTEGER\n*>          The order of the triangular factor T (= the number of\n*>          elementary reflectors). K >= 1.\n*> \\endverbatim\n*>\n*> \\param[in] V\n*> \\verbatim\n*>          V is COMPLEX*16 array, dimension\n*>                               (LDV,K) if STOREV = 'C'\n*>                               (LDV,N) if STOREV = 'R'\n*>          The matrix V. See further details.\n*> \\endverbatim\n*>\n*> \\param[in] LDV\n*> \\verbatim\n*>          LDV is INTEGER\n*>          The leading dimension of the array V.\n*>          If STOREV = 'C', LDV >= max(1,N); if STOREV = 'R', LDV >= K.\n*> \\endverbatim\n*>\n*> \\param[in] TAU\n*> \\verbatim\n*>          TAU is COMPLEX*16 array, dimension (K)\n*>          TAU(i) must contain the scalar factor of the elementary\n*>          reflector H(i).\n*> \\endverbatim\n*>\n*> \\param[out] T\n*> \\verbatim\n*>          T is COMPLEX*16 array, dimension (LDT,K)\n*>          The k by k triangular factor T of the block reflector.\n*>          If DIRECT = 'F', T is upper triangular; if DIRECT = 'B', T is\n*>          lower triangular. The rest of the array is not used.\n*> \\endverbatim\n*>\n*> \\param[in] LDT\n*> \\verbatim\n*>          LDT is INTEGER\n*>          The leading dimension of the array T. LDT >= K.\n*> \\endverbatim\n*\n*  Authors:\n*  ========\n*\n*> \\author Univ. of Tennessee \n*> \\author Univ. of California Berkeley \n*> \\author Univ. of Colorado Denver \n*> \\author NAG Ltd. \n*\n*> \\date April 2012\n*\n*> \\ingroup complex16OTHERauxiliary\n*\n*> \\par Further Details:\n*  =====================\n*>\n*> \\verbatim\n*>\n*>  The shape of the matrix V and the storage of the vectors which define\n*>  the H(i) is best illustrated by the following example with n = 5 and\n*>  k = 3. The elements equal to 1 are not stored.\n*>\n*>  DIRECT = 'F' and STOREV = 'C':         DIRECT = 'F' and STOREV = 'R':\n*>\n*>               V = (  1       )                 V = (  1 v1 v1 v1 v1 )\n*>                   ( v1  1    )                     (     1 v2 v2 v2 )\n*>                   ( v1 v2  1 )                     (        1 v3 v3 )\n*>                   ( v1 v2 v3 )\n*>                   ( v1 v2 v3 )\n*>\n*>  DIRECT = 'B' and STOREV = 'C':         DIRECT = 'B' and STOREV = 'R':\n*>\n*>               V = ( v1 v2 v3 )                 V = ( v1 v1  1       )\n*>                   ( v1 v2 v3 )                     ( v2 v2 v2  1    )\n*>                   (  1 v2 v3 )                     ( v3 v3 v3 v3  1 )\n*>                   (     1 v3 )\n*>                   (        1 )\n*> \\endverbatim\n*>\n*  =====================================================================\n      SUBROUTINE ZLARFT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )\n*\n*  -- LAPACK auxiliary routine (version 3.4.1) --\n*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\n*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n*     April 2012\n*\n*     .. Scalar Arguments ..\n      CHARACTER          DIRECT, STOREV\n      INTEGER            K, LDT, LDV, N\n*     ..\n*     .. Array Arguments ..\n      COMPLEX*16         T( LDT, * ), TAU( * ), V( LDV, * )\n*     ..\n*\n*  =====================================================================\n*\n*     .. Parameters ..\n      COMPLEX*16         ONE, ZERO\n      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ),\n     $                   ZERO = ( 0.0D+0, 0.0D+0 ) )\n*     ..\n*     .. Local Scalars ..\n      INTEGER            I, J, PREVLASTV, LASTV\n*     ..\n*     .. External Subroutines ..\n      EXTERNAL           ZGEMV, ZLACGV, ZTRMV\n*     ..\n*     .. External Functions ..\n      LOGICAL            LSAME\n      EXTERNAL           LSAME\n*     ..\n*     .. Executable Statements ..\n*\n*     Quick return if possible\n*\n      IF( N.EQ.0 )\n     $   RETURN\n*\n      IF( LSAME( DIRECT, 'F' ) ) THEN\n         PREVLASTV = N\n         DO I = 1, K\n            PREVLASTV = MAX( PREVLASTV, I )\n            IF( TAU( I ).EQ.ZERO ) THEN\n*\n*              H(i)  =  I\n*\n               DO J = 1, I\n                  T( J, I ) = ZERO\n               END DO\n            ELSE\n*\n*              general case\n*\n               IF( LSAME( STOREV, 'C' ) ) THEN\n*                 Skip any trailing zeros.\n                  DO LASTV = N, I+1, -1\n                     IF( V( LASTV, I ).NE.ZERO ) EXIT\n                  END DO\n                  DO J = 1, I-1\n                     T( J, I ) = -TAU( I ) * CONJG( V( I , J ) )\n                  END DO                     \n                  J = MIN( LASTV, PREVLASTV )\n*\n*                 T(1:i-1,i) := - tau(i) * V(i:j,1:i-1)**H * V(i:j,i)\n*\n                  CALL ZGEMV( 'Conjugate transpose', J-I, I-1,\n     $                        -TAU( I ), V( I+1, 1 ), LDV, \n     $                        V( I+1, I ), 1, ONE, T( 1, I ), 1 )\n               ELSE\n*                 Skip any trailing zeros.\n                  DO LASTV = N, I+1, -1\n                     IF( V( I, LASTV ).NE.ZERO ) EXIT\n                  END DO\n                  DO J = 1, I-1\n                     T( J, I ) = -TAU( I ) * V( J , I )\n                  END DO                     \n                  J = MIN( LASTV, PREVLASTV )\n*\n*                 T(1:i-1,i) := - tau(i) * V(1:i-1,i:j) * V(i,i:j)**H\n*\n                  CALL ZGEMM( 'N', 'C', I-1, 1, J-I, -TAU( I ),\n     $                        V( 1, I+1 ), LDV, V( I, I+1 ), LDV,\n     $                        ONE, T( 1, I ), LDT )                  \n               END IF\n*\n*              T(1:i-1,i) := T(1:i-1,1:i-1) * T(1:i-1,i)\n*\n               CALL ZTRMV( 'Upper', 'No transpose', 'Non-unit', I-1, T,\n     $                     LDT, T( 1, I ), 1 )\n               T( I, I ) = TAU( I )\n               IF( I.GT.1 ) THEN\n                  PREVLASTV = MAX( PREVLASTV, LASTV )\n               ELSE\n                  PREVLASTV = LASTV\n               END IF\n             END IF\n         END DO\n      ELSE\n         PREVLASTV = 1\n         DO I = K, 1, -1\n            IF( TAU( I ).EQ.ZERO ) THEN\n*\n*              H(i)  =  I\n*\n               DO J = I, K\n                  T( J, I ) = ZERO\n               END DO\n            ELSE\n*\n*              general case\n*\n               IF( I.LT.K ) THEN\n                  IF( LSAME( STOREV, 'C' ) ) THEN\n*                    Skip any leading zeros.\n                     DO LASTV = 1, I-1\n                        IF( V( LASTV, I ).NE.ZERO ) EXIT\n                     END DO\n                     DO J = I+1, K\n                        T( J, I ) = -TAU( I ) * CONJG( V( N-K+I , J ) )\n                     END DO                        \n                     J = MAX( LASTV, PREVLASTV )\n*\n*                    T(i+1:k,i) = -tau(i) * V(j:n-k+i,i+1:k)**H * V(j:n-k+i,i)\n*\n                     CALL ZGEMV( 'Conjugate transpose', N-K+I-J, K-I,\n     $                           -TAU( I ), V( J, I+1 ), LDV, V( J, I ),\n     $                           1, ONE, T( I+1, I ), 1 )\n                  ELSE\n*                    Skip any leading zeros.\n                     DO LASTV = 1, I-1\n                        IF( V( I, LASTV ).NE.ZERO ) EXIT\n                     END DO\n                     DO J = I+1, K\n                        T( J, I ) = -TAU( I ) * V( J, N-K+I )\n                     END DO                                           \n                     J = MAX( LASTV, PREVLASTV )\n*\n*                    T(i+1:k,i) = -tau(i) * V(i+1:k,j:n-k+i) * V(i,j:n-k+i)**H\n*\n                     CALL ZGEMM( 'N', 'C', K-I, 1, N-K+I-J, -TAU( I ),\n     $                           V( I+1, J ), LDV, V( I, J ), LDV,\n     $                           ONE, T( I+1, I ), LDT )                     \n                  END IF\n*\n*                 T(i+1:k,i) := T(i+1:k,i+1:k) * T(i+1:k,i)\n*\n                  CALL ZTRMV( 'Lower', 'No transpose', 'Non-unit', K-I,\n     $                        T( I+1, I+1 ), LDT, T( I+1, I ), 1 )\n                  IF( I.GT.1 ) THEN\n                     PREVLASTV = MIN( PREVLASTV, LASTV )\n                  ELSE\n                     PREVLASTV = LASTV\n                  END IF\n               END IF\n               T( I, I ) = TAU( I )\n            END IF\n         END DO\n      END IF\n      RETURN\n*\n*     End of ZLARFT\n*\n      END\n"
  },
  {
    "path": "3rdparty/eigen3/scripts/CMakeLists.txt",
    "content": "get_property(EIGEN_TESTS_LIST GLOBAL PROPERTY EIGEN_TESTS_LIST)\nconfigure_file(buildtests.in ${CMAKE_BINARY_DIR}/buildtests.sh @ONLY)\n\nconfigure_file(check.in ${CMAKE_BINARY_DIR}/check.sh COPYONLY)\nconfigure_file(debug.in ${CMAKE_BINARY_DIR}/debug.sh COPYONLY)\nconfigure_file(release.in ${CMAKE_BINARY_DIR}/release.sh COPYONLY)\n"
  },
  {
    "path": "3rdparty/eigen3/scripts/buildtests.in",
    "content": "#!/bin/bash\n\nif [[ $# != 1 || $1 == *help ]]\nthen\n  echo \"usage: $0 regexp\"\n  echo \"  Builds tests matching the regexp.\"\n  echo \"  The EIGEN_MAKE_ARGS environment variable allows to pass args to 'make'.\"\n  echo \"    For example, to launch 5 concurrent builds, use EIGEN_MAKE_ARGS='-j5'\"\n  exit 0\nfi\n\nTESTSLIST=\"@EIGEN_TESTS_LIST@\"\ntargets_to_make=$(echo \"$TESTSLIST\" | grep -E \"$1\" | xargs echo)\n\nif [ -n \"${EIGEN_MAKE_ARGS:+x}\" ]\nthen\n  @CMAKE_MAKE_PROGRAM@ $targets_to_make ${EIGEN_MAKE_ARGS}\nelse\n  @CMAKE_MAKE_PROGRAM@ $targets_to_make @EIGEN_TEST_BUILD_FLAGS@\nfi\nexit $?\n\n"
  },
  {
    "path": "3rdparty/eigen3/scripts/cdashtesting.cmake.in",
    "content": "\nset(CTEST_SOURCE_DIRECTORY  \"@CMAKE_SOURCE_DIR@\")\nset(CTEST_BINARY_DIRECTORY  \"@CMAKE_BINARY_DIR@\")\nset(CTEST_CMAKE_GENERATOR   \"@CMAKE_GENERATOR@\")\nset(CTEST_BUILD_NAME        \"@BUILDNAME@\")\nset(CTEST_SITE              \"@SITE@\")\n\nset(MODEL Experimental)\nif(${CTEST_SCRIPT_ARG} MATCHES Nightly)\n  set(MODEL Nightly)\nelseif(${CTEST_SCRIPT_ARG} MATCHES Continuous)\n  set(MODEL Continuous)\nendif()\n\nfind_program(CTEST_GIT_COMMAND NAMES git)\nset(CTEST_UPDATE_COMMAND \"${CTEST_GIT_COMMAND}\")\n\nctest_start(${MODEL} ${CTEST_SOURCE_DIRECTORY} ${CTEST_BINARY_DIRECTORY})\n\nctest_update(SOURCE \"${CTEST_SOURCE_DIRECTORY}\")\nctest_submit(PARTS Update Notes)\n\n# to get CTEST_PROJECT_SUBPROJECTS definition:\ninclude(\"${CTEST_SOURCE_DIRECTORY}/CTestConfig.cmake\")\n\nforeach(subproject ${CTEST_PROJECT_SUBPROJECTS})\n  message(\"\")\n  message(\"Process ${subproject}\")\n  \n  set_property(GLOBAL PROPERTY SubProject ${subproject})\n  set_property(GLOBAL PROPERTY Label ${subproject})\n\n  ctest_configure(BUILD ${CTEST_BINARY_DIRECTORY} SOURCE ${CTEST_SOURCE_DIRECTORY} )\n  ctest_submit(PARTS Configure)\n\n  set(CTEST_BUILD_TARGET \"Build${subproject}\")\n  message(\"Build ${CTEST_BUILD_TARGET}\")\n  ctest_build(BUILD \"${CTEST_BINARY_DIRECTORY}\" APPEND)\n  # builds target ${CTEST_BUILD_TARGET}\n  ctest_submit(PARTS Build)\n\n  ctest_test(BUILD \"${CTEST_BINARY_DIRECTORY}\" INCLUDE_LABEL \"${subproject}\" )\n  # runs only tests that have a LABELS property matching \"${subproject}\"\n  \n  ctest_coverage(BUILD \"${CTEST_BINARY_DIRECTORY}\" LABELS \"${subproject}\" )\n  \n  ctest_submit(PARTS Test)\n  \nendforeach()\n"
  },
  {
    "path": "3rdparty/eigen3/scripts/check.in",
    "content": "#!/bin/bash\n# check : shorthand for make and ctest -R\n\nif [[ $# != 1 || $1 == *help ]]\nthen\n  echo \"usage: $0 regexp\"\n  echo \"  Builds and runs tests matching the regexp.\"\n  echo \"  The EIGEN_MAKE_ARGS environment variable allows to pass args to 'make'.\"\n  echo \"    For example, to launch 5 concurrent builds, use EIGEN_MAKE_ARGS='-j5'\"\n  echo \"  The EIGEN_CTEST_ARGS environment variable allows to pass args to 'ctest'.\"\n  echo \"    For example, with CTest 2.8, you can use EIGEN_CTEST_ARGS='-j5'.\"\n  exit 0\nfi\n\nif [ -n \"${EIGEN_CTEST_ARGS:+x}\" ]\nthen\n  ./buildtests.sh \"$1\" && ctest -R \"$1\" ${EIGEN_CTEST_ARGS}\nelse\n  ./buildtests.sh \"$1\" && ctest -R \"$1\"\nfi\nexit $?\n"
  },
  {
    "path": "3rdparty/eigen3/scripts/debug.in",
    "content": "#!/bin/sh\n\ncmake -DCMAKE_BUILD_TYPE=Debug .\n"
  },
  {
    "path": "3rdparty/eigen3/scripts/eigen_gen_credits.cpp",
    "content": "#include <string>\n#include <sstream>\n#include <iostream>\n#include <fstream>\n#include <iomanip>\n#include <map>\n#include <list>\n\nusing namespace std;\n\n// this function takes a line that may contain a name and/or email address,\n// and returns just the name, while fixing the \"bad cases\".\nstd::string contributor_name(const std::string& line)\n{\n  string result;\n\n  // let's first take care of the case of isolated email addresses, like\n  // \"user@localhost.localdomain\" entries\n  if(line.find(\"markb@localhost.localdomain\") != string::npos)\n  {\n    return \"Mark Borgerding\";\n  }\n\n  if(line.find(\"kayhman@contact.intra.cea.fr\") != string::npos)\n  {\n    return \"Guillaume Saupin\";\n  }\n\n  // from there on we assume that we have a entry of the form\n  // either:\n  //   Bla bli Blurp\n  // or:\n  //   Bla bli Blurp <bblurp@email.com>\n  \n  size_t position_of_email_address = line.find_first_of('<');\n  if(position_of_email_address != string::npos)\n  {\n    // there is an e-mail address in <...>.\n    \n    // Hauke once committed as \"John Smith\", fix that.\n    if(line.find(\"hauke.heibel\") != string::npos)\n      result = \"Hauke Heibel\";\n    else\n    {\n      // just remove the e-mail address\n      result = line.substr(0, position_of_email_address);\n    }\n  }\n  else\n  {\n    // there is no e-mail address in <...>.\n    \n    if(line.find(\"convert-repo\") != string::npos)\n      result = \"\";\n    else\n      result = line;\n  }\n\n  // remove trailing spaces\n  size_t length = result.length();\n  while(length >= 1 && result[length-1] == ' ') result.erase(--length);\n\n  return result;\n}\n\n// parses hg churn output to generate a contributors map.\nmap<string,int> contributors_map_from_churn_output(const char *filename)\n{\n  map<string,int> contributors_map;\n\n  string line;\n  ifstream churn_out;\n  churn_out.open(filename, ios::in);\n  while(!getline(churn_out,line).eof())\n  {\n    // remove the histograms \"******\" that hg churn may draw at the end of some lines\n    size_t first_star = line.find_first_of('*');\n    if(first_star != string::npos) line.erase(first_star);\n    \n    // remove trailing spaces\n    size_t length = line.length();\n    while(length >= 1 && line[length-1] == ' ') line.erase(--length);\n\n    // now the last space indicates where the number starts\n    size_t last_space = line.find_last_of(' ');\n    \n    // get the number (of changesets or of modified lines for each contributor)\n    int number;\n    istringstream(line.substr(last_space+1)) >> number;\n\n    // get the name of the contributor\n    line.erase(last_space);    \n    string name = contributor_name(line);\n    \n    map<string,int>::iterator it = contributors_map.find(name);\n    // if new contributor, insert\n    if(it == contributors_map.end())\n      contributors_map.insert(pair<string,int>(name, number));\n    // if duplicate, just add the number\n    else\n      it->second += number;\n  }\n  churn_out.close();\n\n  return contributors_map;\n}\n\n// find the last name, i.e. the last word.\n// for \"van den Schbling\" types of last names, that's not a problem, that's actually what we want.\nstring lastname(const string& name)\n{\n  size_t last_space = name.find_last_of(' ');\n  if(last_space >= name.length()-1) return name;\n  else return name.substr(last_space+1);\n}\n\nstruct contributor\n{\n  string name;\n  int changedlines;\n  int changesets;\n  string url;\n  string misc;\n  \n  contributor() : changedlines(0), changesets(0) {}\n  \n  bool operator < (const contributor& other)\n  {\n    return lastname(name).compare(lastname(other.name)) < 0;\n  }\n};\n\nvoid add_online_info_into_contributors_list(list<contributor>& contributors_list, const char *filename)\n{\n  string line;\n  ifstream online_info;\n  online_info.open(filename, ios::in);\n  while(!getline(online_info,line).eof())\n  {\n    string hgname, realname, url, misc;\n    \n    size_t last_bar = line.find_last_of('|');\n    if(last_bar == string::npos) continue;\n    if(last_bar < line.length())\n      misc = line.substr(last_bar+1);\n    line.erase(last_bar);\n    \n    last_bar = line.find_last_of('|');\n    if(last_bar == string::npos) continue;\n    if(last_bar < line.length())\n      url = line.substr(last_bar+1);\n    line.erase(last_bar);\n\n    last_bar = line.find_last_of('|');\n    if(last_bar == string::npos) continue;\n    if(last_bar < line.length())\n      realname = line.substr(last_bar+1);\n    line.erase(last_bar);\n\n    hgname = line;\n    \n    // remove the example line\n    if(hgname.find(\"MercurialName\") != string::npos) continue;\n    \n    list<contributor>::iterator it;\n    for(it=contributors_list.begin(); it != contributors_list.end() && it->name != hgname; ++it)\n    {}\n    \n    if(it == contributors_list.end())\n    {\n      contributor c;\n      c.name = realname;\n      c.url = url;\n      c.misc = misc;\n      contributors_list.push_back(c);\n    }\n    else\n    {\n      it->name = realname;\n      it->url = url;\n      it->misc = misc;\n    }\n  }\n}\n\nint main()\n{\n  // parse the hg churn output files\n  map<string,int> contributors_map_for_changedlines = contributors_map_from_churn_output(\"churn-changedlines.out\");\n  //map<string,int> contributors_map_for_changesets = contributors_map_from_churn_output(\"churn-changesets.out\");\n  \n  // merge into the contributors list\n  list<contributor> contributors_list;\n  map<string,int>::iterator it;\n  for(it=contributors_map_for_changedlines.begin(); it != contributors_map_for_changedlines.end(); ++it)\n  {\n    contributor c;\n    c.name = it->first;\n    c.changedlines = it->second;\n    c.changesets = 0; //contributors_map_for_changesets.find(it->first)->second;\n    contributors_list.push_back(c);\n  }\n  \n  add_online_info_into_contributors_list(contributors_list, \"online-info.out\");\n  \n  contributors_list.sort();\n  \n  cout << \"{| cellpadding=\\\"5\\\"\\n\";\n  cout << \"!\\n\";\n  cout << \"! Lines changed\\n\";\n  cout << \"!\\n\";\n\n  list<contributor>::iterator itc;\n  int i = 0;\n  for(itc=contributors_list.begin(); itc != contributors_list.end(); ++itc)\n  {\n    if(itc->name.length() == 0) continue;\n    if(i%2) cout << \"|-\\n\";\n    else cout << \"|- style=\\\"background:#FFFFD0\\\"\\n\";\n    if(itc->url.length())\n      cout << \"| [\" << itc->url << \" \" << itc->name << \"]\\n\";\n    else\n      cout << \"| \" << itc->name << \"\\n\";\n    if(itc->changedlines)\n      cout << \"| \" << itc->changedlines << \"\\n\";\n    else\n      cout << \"| (no information)\\n\";\n    cout << \"| \" << itc->misc << \"\\n\";\n    i++;\n  }\n  cout << \"|}\" << endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/scripts/eigen_gen_docs",
    "content": "#!/bin/sh\n\n# configuration\n# You should call this script with USER set as you want, else some default\n# will be used\nUSER=${USER:-'orzel'}\nUPLOAD_DIR=dox-devel\n\n#ulimit -v 1024000\n\n# step 1 : build\nrm build/doc/html -Rf\nmkdir build -p\n(cd build && cmake .. && make doc) || { echo \"make failed\"; exit 1; }\n\n#step 2 : upload\n# (the '/' at the end of path is very important, see rsync documentation)\nrsync -az --no-p --delete build/doc/html/ $USER@ssh.tuxfamily.org:eigen/eigen.tuxfamily.org-web/htdocs/$UPLOAD_DIR/ || { echo \"upload failed\"; exit 1; }\n\n#step 3 : fix the perm\nssh $USER@ssh.tuxfamily.org \"chmod -R g+w /home/eigen/eigen.tuxfamily.org-web/htdocs/$UPLOAD_DIR\" || { echo \"perm failed\"; exit 1; }\n\necho \"Uploaded successfully\"\n\n"
  },
  {
    "path": "3rdparty/eigen3/scripts/eigen_gen_split_test_help.cmake",
    "content": "#!cmake -P\nfile(WRITE split_test_helper.h \"\")\nforeach(i RANGE 1 999)\n  file(APPEND split_test_helper.h\n    \"#if defined(EIGEN_TEST_PART_${i}) || defined(EIGEN_TEST_PART_ALL)\\n\"\n    \"#define CALL_SUBTEST_${i}(FUNC) CALL_SUBTEST(FUNC)\\n\"\n    \"#else\\n\"\n    \"#define CALL_SUBTEST_${i}(FUNC)\\n\"\n    \"#endif\\n\\n\"\n  )\nendforeach()"
  },
  {
    "path": "3rdparty/eigen3/scripts/eigen_monitor_perf.sh",
    "content": "#!/bin/bash\n\n# This is a script example to automatically update and upload performance unit tests.\n# The following five variables must be adjusted to match your settings.\n\nUSER='ggael'\nUPLOAD_DIR=perf_monitoring/ggaelmacbook26\nEIGEN_SOURCE_PATH=$HOME/Eigen/eigen\nexport PREFIX=\"haswell-fma\"\nexport CXX_FLAGS=\"-mfma -w\"\n\n####\n\nBENCH_PATH=$EIGEN_SOURCE_PATH/bench/perf_monitoring/$PREFIX\nPREVPATH=$(pwd)\ncd $EIGEN_SOURCE_PATH/bench/perf_monitoring && ./runall.sh \"Haswell 2.6GHz, FMA, Apple's clang\" \"$@\"\ncd $PREVPATH || exit 1\n\nALLFILES=\"$BENCH_PATH/*.png $BENCH_PATH/*.html $BENCH_PATH/index.html $BENCH_PATH/s1.js $BENCH_PATH/s2.js\"\n\n# (the '/' at the end of path is very important, see rsync documentation)\nrsync -az --no-p --delete $ALLFILES $USER@ssh.tuxfamily.org:eigen/eigen.tuxfamily.org-web/htdocs/$UPLOAD_DIR/ || { echo \"upload failed\"; exit 1; }\n\n# fix the perm\nssh $USER@ssh.tuxfamily.org \"chmod -R g+w /home/eigen/eigen.tuxfamily.org-web/htdocs/perf_monitoring\" || { echo \"perm failed\"; exit 1; }\n"
  },
  {
    "path": "3rdparty/eigen3/scripts/release.in",
    "content": "#!/bin/sh\n\ncmake -DCMAKE_BUILD_TYPE=Release .\n"
  },
  {
    "path": "3rdparty/eigen3/scripts/relicense.py",
    "content": "# This file is part of Eigen, a lightweight C++ template library\n# for linear algebra.\n#\n# Copyright (C) 2012 Keir Mierle <mierle@gmail.com>\n#\n# This Source Code Form is subject to the terms of the Mozilla\n# Public License v. 2.0. If a copy of the MPL was not distributed\n# with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n#\n# Author: mierle@gmail.com (Keir Mierle)\n#\n# Make the long-awaited conversion to MPL.\n\nlgpl3_header = '''\n// Eigen is free software; you can redistribute it and/or\n// modify it under the terms of the GNU Lesser General Public\n// License as published by the Free Software Foundation; either\n// version 3 of the License, or (at your option) any later version.\n//\n// Alternatively, you can redistribute it and/or\n// modify it under the terms of the GNU General Public License as\n// published by the Free Software Foundation; either version 2 of\n// the License, or (at your option) any later version.\n//\n// Eigen is distributed in the hope that it will be useful, but WITHOUT ANY\n// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\n// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU Lesser General Public\n// License and a copy of the GNU General Public License along with\n// Eigen. If not, see <http://www.gnu.org/licenses/>.\n'''\n\nmpl2_header = \"\"\"\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\"\"\"\n\nimport os\nimport sys\n\nexclusions = set(['relicense.py'])\n\ndef update(text):\n  if text.find(lgpl3_header) == -1:\n    return text, False\n  return text.replace(lgpl3_header, mpl2_header), True\n\nrootdir = sys.argv[1]\nfor root, sub_folders, files in os.walk(rootdir):\n    for basename in files:\n        if basename in exclusions:\n          print 'SKIPPED', filename\n          continue\n        filename = os.path.join(root, basename)\n        fo = file(filename)\n        text = fo.read()\n        fo.close()\n\n        text, updated = update(text)\n        if updated:\n          fo = file(filename, \"w\")\n          fo.write(text)\n          fo.close()\n          print 'UPDATED', filename\n        else:\n          print '       ', filename\n"
  },
  {
    "path": "3rdparty/eigen3/signature_of_eigen3_matrix_library",
    "content": "This file is just there as a signature to help identify directories containing Eigen3. When writing a script looking for Eigen3, just look for this file. This is especially useful to help disambiguate with Eigen2...\n"
  },
  {
    "path": "3rdparty/eigen3/test/AnnoyingScalar.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2011-2018 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_TEST_ANNOYING_SCALAR_H\n#define EIGEN_TEST_ANNOYING_SCALAR_H\n\n#include <ostream>\n\n#if EIGEN_COMP_GNUC\n#pragma GCC diagnostic ignored \"-Wshadow\"\n#endif\n\n#ifndef EIGEN_TEST_ANNOYING_SCALAR_DONT_THROW\nstruct my_exception\n{\n  my_exception() {}\n  ~my_exception() {}\n};\n#endif\n\n// An AnnoyingScalar is a pseudo scalar type that:\n// - can randomly through an exception in operator +\n// - randomly allocate on the heap or initialize a reference to itself making it non trivially copyable, nor movable, nor relocatable.\n\nclass AnnoyingScalar\n{\n  public:\n    AnnoyingScalar()                { init(); *v = 0;  }\n    AnnoyingScalar(long double _v)  { init(); *v = _v; }\n    AnnoyingScalar(double _v)       { init(); *v = _v; }\n    AnnoyingScalar(float _v)        { init(); *v = _v; }\n    AnnoyingScalar(int _v)          { init(); *v = _v; }\n    AnnoyingScalar(long _v)         { init(); *v = _v; }\n    #if EIGEN_HAS_CXX11\n    AnnoyingScalar(long long _v)    { init(); *v = _v; }\n    #endif\n    AnnoyingScalar(const AnnoyingScalar& other) { init(); *v = *(other.v); }\n    ~AnnoyingScalar() {\n      if(v!=&data)\n        delete v;\n      instances--;\n    }\n\n    void init() {\n      if(internal::random<bool>())\n        v = new float;\n      else\n        v = &data;\n      instances++;\n    }\n\n    AnnoyingScalar operator+(const AnnoyingScalar& other) const\n    {\n      #ifndef EIGEN_TEST_ANNOYING_SCALAR_DONT_THROW\n      countdown--;\n      if(countdown<=0 && !dont_throw)\n        throw my_exception();\n      #endif\n      return AnnoyingScalar(*v+*other.v);\n    }\n\n    AnnoyingScalar operator-() const\n    { return AnnoyingScalar(-*v); }\n    \n    AnnoyingScalar operator-(const AnnoyingScalar& other) const\n    { return AnnoyingScalar(*v-*other.v); }\n    \n    AnnoyingScalar operator*(const AnnoyingScalar& other) const\n    { return AnnoyingScalar((*v)*(*other.v)); }\n\n    AnnoyingScalar operator/(const AnnoyingScalar& other) const\n    { return AnnoyingScalar((*v)/(*other.v)); }\n    \n    AnnoyingScalar& operator+=(const AnnoyingScalar& other) { *v += *other.v; return *this; }\n    AnnoyingScalar& operator-=(const AnnoyingScalar& other) { *v -= *other.v; return *this; }\n    AnnoyingScalar& operator*=(const AnnoyingScalar& other) { *v *= *other.v; return *this; }\n    AnnoyingScalar& operator/=(const AnnoyingScalar& other) { *v /= *other.v; return *this; }\n    AnnoyingScalar& operator= (const AnnoyingScalar& other) { *v  = *other.v; return *this; }\n  \n    bool operator==(const AnnoyingScalar& other) const { return *v == *other.v; }\n    bool operator!=(const AnnoyingScalar& other) const { return *v != *other.v; }\n    bool operator<=(const AnnoyingScalar& other) const { return *v <= *other.v; }\n    bool operator< (const AnnoyingScalar& other) const { return *v <  *other.v; }\n    bool operator>=(const AnnoyingScalar& other) const { return *v >= *other.v; }\n    bool operator> (const AnnoyingScalar& other) const { return *v >  *other.v; }\n    \n    float* v;\n    float data;\n    static int instances;\n#ifndef EIGEN_TEST_ANNOYING_SCALAR_DONT_THROW\n    static int countdown;\n    static bool dont_throw;\n#endif\n};\n\nAnnoyingScalar real(const AnnoyingScalar &x) { return x; }\nAnnoyingScalar imag(const AnnoyingScalar & ) { return 0; }\nAnnoyingScalar conj(const AnnoyingScalar &x) { return x; }\nAnnoyingScalar sqrt(const AnnoyingScalar &x) { return std::sqrt(*x.v); }\nAnnoyingScalar abs (const AnnoyingScalar &x) { return std::abs(*x.v); }\nAnnoyingScalar cos (const AnnoyingScalar &x) { return std::cos(*x.v); }\nAnnoyingScalar sin (const AnnoyingScalar &x) { return std::sin(*x.v); }\nAnnoyingScalar acos(const AnnoyingScalar &x) { return std::acos(*x.v); }\nAnnoyingScalar atan2(const AnnoyingScalar &y,const AnnoyingScalar &x) { return std::atan2(*y.v,*x.v); }\n\nstd::ostream& operator<<(std::ostream& stream,const AnnoyingScalar& x) {\n  stream << (*(x.v));\n  return stream;\n}\n\nint AnnoyingScalar::instances = 0;\n\n#ifndef EIGEN_TEST_ANNOYING_SCALAR_DONT_THROW\nint AnnoyingScalar::countdown = 0;\nbool AnnoyingScalar::dont_throw = false;\n#endif\n\nnamespace Eigen {\ntemplate<>\nstruct NumTraits<AnnoyingScalar> : NumTraits<float>\n{\n  enum {\n    RequireInitialization = true\n  };\n  typedef AnnoyingScalar Real;\n  typedef AnnoyingScalar Nested;\n  typedef AnnoyingScalar Literal;\n  typedef AnnoyingScalar NonInteger;\n};\n\ntemplate<> inline AnnoyingScalar test_precision<AnnoyingScalar>() { return test_precision<float>(); }\n\nnamespace internal {\n  template<> double cast(const AnnoyingScalar& x) { return double(*x.v); }\n  template<> float  cast(const AnnoyingScalar& x) { return *x.v; }\n}\n\n}\n\nAnnoyingScalar get_test_precision(const AnnoyingScalar&)\n{ return Eigen::test_precision<AnnoyingScalar>(); }\n\nAnnoyingScalar test_relative_error(const AnnoyingScalar &a, const AnnoyingScalar &b)\n{ return test_relative_error(*a.v, *b.v); }\n\ninline bool test_isApprox(const AnnoyingScalar &a, const AnnoyingScalar &b)\n{ return internal::isApprox(*a.v, *b.v, test_precision<float>()); }\n\ninline bool test_isMuchSmallerThan(const AnnoyingScalar &a, const AnnoyingScalar &b)\n{ return test_isMuchSmallerThan(*a.v, *b.v); }\n\n#endif // EIGEN_TEST_ANNOYING_SCALAR_H\n"
  },
  {
    "path": "3rdparty/eigen3/test/CMakeLists.txt",
    "content": "# # The file split_test_helper.h was generated at first run,\n# # it is now included in test/\n# if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/split_test_helper.h)\n#   file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/split_test_helper.h)\n# endif()\n\n# # check if we have a Fortran compiler\n# include(\"../cmake/language_support.cmake\")\n\n# workaround_9220(Fortran EIGEN_Fortran_COMPILER_WORKS)\n\n# if(EIGEN_Fortran_COMPILER_WORKS)\n#   enable_language(Fortran OPTIONAL)\n#   if(NOT CMAKE_Fortran_COMPILER)\n#     set(EIGEN_Fortran_COMPILER_WORKS OFF)\n#   endif()\n# endif()\n\n# if(NOT EIGEN_Fortran_COMPILER_WORKS)\n#   # search for a default Lapack library to complete Eigen's one\n#   find_package(LAPACK QUIET)\n# endif()\n\n# # TODO do the same for EXTERNAL_LAPACK\n# option(EIGEN_TEST_EXTERNAL_BLAS \"Use external BLAS library for testsuite\" OFF)\n# if(EIGEN_TEST_EXTERNAL_BLAS)\n#   find_package(BLAS REQUIRED)\n#   message(STATUS \"BLAS_COMPILER_FLAGS: ${BLAS_COMPILER_FLAGS}\")\n#   add_definitions(\"-DEIGEN_USE_BLAS\") # is adding  ${BLAS_COMPILER_FLAGS} necessary?\n#   list(APPEND EXTERNAL_LIBS \"${BLAS_LIBRARIES}\")\n# endif()\n\n# # configure blas/lapack (use Eigen's ones)\n# set(EIGEN_BLAS_LIBRARIES eigen_blas)\n# set(EIGEN_LAPACK_LIBRARIES eigen_lapack)\n\n# set(EIGEN_TEST_MATRIX_DIR \"\" CACHE STRING \"Enable testing of realword sparse matrices contained in the specified path\")\n# if(EIGEN_TEST_MATRIX_DIR)\n#   if(NOT WIN32)\n#     message(STATUS \"Test realworld sparse matrices: ${EIGEN_TEST_MATRIX_DIR}\")\n#     add_definitions( -DTEST_REAL_CASES=\"${EIGEN_TEST_MATRIX_DIR}\" )\n#   else()\n#     message(STATUS \"REAL CASES CAN NOT BE CURRENTLY TESTED ON WIN32\")\n#   endif()\n# endif()\n\n# set(SPARSE_LIBS \" \")\n\n# find_package(Cholmod)\n# if(CHOLMOD_FOUND)\n#   add_definitions(\"-DEIGEN_CHOLMOD_SUPPORT\")\n#   include_directories(${CHOLMOD_INCLUDES})\n#   set(SPARSE_LIBS ${SPARSE_LIBS} ${CHOLMOD_LIBRARIES} ${EIGEN_BLAS_LIBRARIES} ${EIGEN_LAPACK_LIBRARIES})\n#   set(CHOLMOD_ALL_LIBS  ${CHOLMOD_LIBRARIES} ${EIGEN_BLAS_LIBRARIES} ${EIGEN_LAPACK_LIBRARIES})\n#   ei_add_property(EIGEN_TESTED_BACKENDS \"Cholmod, \")\n# else()\n#   ei_add_property(EIGEN_MISSING_BACKENDS \"Cholmod, \")\n# endif()\n\n# find_package(Umfpack)\n# if(UMFPACK_FOUND)\n#   add_definitions(\"-DEIGEN_UMFPACK_SUPPORT\")\n#   include_directories(${UMFPACK_INCLUDES})\n#   set(SPARSE_LIBS ${SPARSE_LIBS} ${UMFPACK_LIBRARIES} ${EIGEN_BLAS_LIBRARIES})\n#   set(UMFPACK_ALL_LIBS ${UMFPACK_LIBRARIES} ${EIGEN_BLAS_LIBRARIES})\n#   ei_add_property(EIGEN_TESTED_BACKENDS \"UmfPack, \")\n# else()\n#   ei_add_property(EIGEN_MISSING_BACKENDS \"UmfPack, \")\n# endif()\n\n# find_package(KLU)\n# if(KLU_FOUND)\n#   add_definitions(\"-DEIGEN_KLU_SUPPORT\")\n#   include_directories(${KLU_INCLUDES})\n#   set(SPARSE_LIBS ${SPARSE_LIBS} ${KLU_LIBRARIES} ${EIGEN_BLAS_LIBRARIES})\n#   set(KLU_ALL_LIBS ${KLU_LIBRARIES} ${EIGEN_BLAS_LIBRARIES})\n#   ei_add_property(EIGEN_TESTED_BACKENDS \"KLU, \")\n# else()\n#   ei_add_property(EIGEN_MISSING_BACKENDS \"KLU, \")\n# endif()\n\n# find_package(SuperLU 4.0)\n# if(SUPERLU_FOUND)\n#   add_definitions(\"-DEIGEN_SUPERLU_SUPPORT\")\n#   include_directories(${SUPERLU_INCLUDES})\n#   set(SPARSE_LIBS ${SPARSE_LIBS} ${SUPERLU_LIBRARIES} ${EIGEN_BLAS_LIBRARIES})\n#   set(SUPERLU_ALL_LIBS ${SUPERLU_LIBRARIES} ${EIGEN_BLAS_LIBRARIES})\n#   ei_add_property(EIGEN_TESTED_BACKENDS  \"SuperLU, \")\n# else()\n#   ei_add_property(EIGEN_MISSING_BACKENDS  \"SuperLU, \")\n# endif()\n\n\n# find_package(PASTIX QUIET COMPONENTS METIS SEQ)\n# # check that the PASTIX found is a version without MPI\n# find_path(PASTIX_pastix_nompi.h_INCLUDE_DIRS\n#   NAMES pastix_nompi.h\n#   HINTS ${PASTIX_INCLUDE_DIRS}\n# )\n# if (NOT PASTIX_pastix_nompi.h_INCLUDE_DIRS)\n#   message(STATUS \"A version of Pastix has been found but pastix_nompi.h does not exist in the include directory.\"\n#                  \" Because Eigen tests require a version without MPI, we disable the Pastix backend.\")\n# endif()\n# if(PASTIX_FOUND AND PASTIX_pastix_nompi.h_INCLUDE_DIRS)\n#   add_definitions(\"-DEIGEN_PASTIX_SUPPORT\")\n#   include_directories(${PASTIX_INCLUDE_DIRS_DEP})\n#   if(SCOTCH_FOUND)\n#     include_directories(${SCOTCH_INCLUDE_DIRS})\n#     set(PASTIX_LIBRARIES ${PASTIX_LIBRARIES} ${SCOTCH_LIBRARIES})\n#   elseif(METIS_FOUND)\n#     include_directories(${METIS_INCLUDE_DIRS})\n#     set(PASTIX_LIBRARIES ${PASTIX_LIBRARIES} ${METIS_LIBRARIES})\n#   else()\n#     ei_add_property(EIGEN_MISSING_BACKENDS  \"PaStiX, \")\n#   endif()\n#   set(SPARSE_LIBS ${SPARSE_LIBS} ${PASTIX_LIBRARIES_DEP} ${ORDERING_LIBRARIES})\n#   set(PASTIX_ALL_LIBS ${PASTIX_LIBRARIES_DEP})\n#   ei_add_property(EIGEN_TESTED_BACKENDS  \"PaStiX, \")\n# else()\n#   ei_add_property(EIGEN_MISSING_BACKENDS  \"PaStiX, \")\n# endif()\n\n# if(METIS_FOUND)\n#   add_definitions(\"-DEIGEN_METIS_SUPPORT\")\n#   include_directories(${METIS_INCLUDE_DIRS})\n#   ei_add_property(EIGEN_TESTED_BACKENDS \"METIS, \")\n# else()\n#   ei_add_property(EIGEN_MISSING_BACKENDS \"METIS, \")\n# endif()\n\n# find_package(SPQR)\n# if(SPQR_FOUND AND CHOLMOD_FOUND AND (EIGEN_Fortran_COMPILER_WORKS OR LAPACK_FOUND) )\n#   add_definitions(\"-DEIGEN_SPQR_SUPPORT\")\n#   include_directories(${SPQR_INCLUDES})\n#   set(SPQR_ALL_LIBS ${SPQR_LIBRARIES} ${CHOLMOD_LIBRARIES} ${EIGEN_LAPACK_LIBRARIES} ${EIGEN_BLAS_LIBRARIES} ${LAPACK_LIBRARIES})\n#   set(SPARSE_LIBS ${SPARSE_LIBS} ${SPQR_ALL_LIBS})\n#   ei_add_property(EIGEN_TESTED_BACKENDS \"SPQR, \")\n# else()\n#   ei_add_property(EIGEN_MISSING_BACKENDS \"SPQR, \")\n# endif()\n\n# option(EIGEN_TEST_NOQT \"Disable Qt support in unit tests\" OFF)\n# if(NOT EIGEN_TEST_NOQT)\n#   find_package(Qt4)\n#   if(QT4_FOUND)\n#     include(${QT_USE_FILE})\n#     ei_add_property(EIGEN_TESTED_BACKENDS  \"Qt4 support, \")\n#   else()\n#     ei_add_property(EIGEN_MISSING_BACKENDS  \"Qt4 support, \")\n#   endif()\n# endif()\n\n# if(TEST_LIB)\n#   add_definitions(\"-DEIGEN_EXTERN_INSTANTIATIONS=1\")\n# endif()\n\n# set_property(GLOBAL PROPERTY EIGEN_CURRENT_SUBPROJECT \"Official\")\n# add_custom_target(BuildOfficial)\n\n# ei_add_test(rand)\n# ei_add_test(meta)\n# ei_add_test(numext)\n# ei_add_test(sizeof)\n# ei_add_test(dynalloc)\n# ei_add_test(nomalloc)\n# ei_add_test(first_aligned)\n# ei_add_test(type_alias)\n# ei_add_test(nullary)\n# ei_add_test(mixingtypes)\n# ei_add_test(io)\n# ei_add_test(packetmath \"-DEIGEN_FAST_MATH=1\")\n# ei_add_test(unalignedassert)\n# ei_add_test(vectorization_logic)\n# ei_add_test(basicstuff)\n# ei_add_test(constructor)\n# ei_add_test(linearstructure)\n# ei_add_test(integer_types)\n# ei_add_test(unalignedcount)\n# if(NOT EIGEN_TEST_NO_EXCEPTIONS)\n#   ei_add_test(exceptions)\n# endif()\n# ei_add_test(redux)\n# ei_add_test(visitor)\n# ei_add_test(block)\n# ei_add_test(corners)\n# ei_add_test(symbolic_index)\n# ei_add_test(indexed_view)\n# ei_add_test(reshape)\n# ei_add_test(swap)\n# ei_add_test(resize)\n# ei_add_test(conservative_resize)\n# ei_add_test(product_small)\n# ei_add_test(product_large)\n# ei_add_test(product_extra)\n# ei_add_test(diagonalmatrices)\n# ei_add_test(adjoint)\n# ei_add_test(diagonal)\n# ei_add_test(miscmatrices)\n# ei_add_test(commainitializer)\n# ei_add_test(smallvectors)\n# ei_add_test(mapped_matrix)\n# ei_add_test(mapstride)\n# ei_add_test(mapstaticmethods)\n# ei_add_test(array_cwise)\n# ei_add_test(array_for_matrix)\n# ei_add_test(array_replicate)\n# ei_add_test(array_reverse)\n# ei_add_test(ref)\n# ei_add_test(is_same_dense)\n# ei_add_test(triangular)\n# ei_add_test(selfadjoint)\n# ei_add_test(product_selfadjoint)\n# ei_add_test(product_symm)\n# ei_add_test(product_syrk)\n# ei_add_test(product_trmv)\n# ei_add_test(product_trmm)\n# ei_add_test(product_trsolve)\n# ei_add_test(product_mmtr)\n# ei_add_test(product_notemporary)\n# ei_add_test(stable_norm)\n# ei_add_test(permutationmatrices)\n# ei_add_test(bandmatrix)\n# ei_add_test(cholesky)\n# ei_add_test(lu)\n# ei_add_test(determinant)\n# ei_add_test(inverse)\n# ei_add_test(qr)\n# ei_add_test(qr_colpivoting)\n# ei_add_test(qr_fullpivoting)\n# ei_add_test(upperbidiagonalization)\n# ei_add_test(hessenberg)\n# ei_add_test(schur_real)\n# ei_add_test(schur_complex)\n# ei_add_test(eigensolver_selfadjoint)\n# ei_add_test(eigensolver_generic)\n# ei_add_test(eigensolver_complex)\n# ei_add_test(real_qz)\n# ei_add_test(eigensolver_generalized_real)\n# ei_add_test(jacobi)\n# ei_add_test(jacobisvd)\n# ei_add_test(bdcsvd)\n# ei_add_test(householder)\n# ei_add_test(geo_orthomethods)\n# ei_add_test(geo_quaternion)\n# ei_add_test(geo_eulerangles)\n# ei_add_test(geo_parametrizedline)\n# ei_add_test(geo_alignedbox)\n# ei_add_test(geo_hyperplane)\n# ei_add_test(geo_transformations)\n# ei_add_test(geo_homogeneous)\n# ei_add_test(stdvector)\n# ei_add_test(stdvector_overload)\n# ei_add_test(stdlist)\n# ei_add_test(stdlist_overload)\n# ei_add_test(stddeque)\n# ei_add_test(stddeque_overload)\n# ei_add_test(sparse_basic)\n# ei_add_test(sparse_block)\n# ei_add_test(sparse_vector)\n# ei_add_test(sparse_product)\n# ei_add_test(sparse_ref)\n# ei_add_test(sparse_solvers)\n# ei_add_test(sparse_permutations)\n# ei_add_test(simplicial_cholesky)\n# ei_add_test(conjugate_gradient)\n# ei_add_test(incomplete_cholesky)\n# ei_add_test(bicgstab)\n# ei_add_test(lscg)\n# ei_add_test(sparselu)\n# ei_add_test(sparseqr)\n# ei_add_test(umeyama)\n# ei_add_test(nesting_ops \"${CMAKE_CXX_FLAGS_DEBUG}\")\n# ei_add_test(nestbyvalue)\n# ei_add_test(zerosized)\n# ei_add_test(dontalign)\n# ei_add_test(evaluators)\n# if(NOT EIGEN_TEST_NO_EXCEPTIONS)\n#   ei_add_test(sizeoverflow)\n# endif()\n# ei_add_test(prec_inverse_4x4)\n# ei_add_test(vectorwiseop)\n# ei_add_test(special_numbers)\n# ei_add_test(rvalue_types)\n# ei_add_test(dense_storage)\n# ei_add_test(ctorleak)\n# ei_add_test(mpl2only)\n# ei_add_test(inplace_decomposition)\n# ei_add_test(half_float)\n# ei_add_test(array_of_string)\n# ei_add_test(num_dimensions)\n# ei_add_test(stl_iterators)\n# if(EIGEN_TEST_CXX11)\n#   ei_add_test(initializer_list_construction)\n#   ei_add_test(diagonal_matrix_variadic_ctor)\n# endif()\n\n# add_executable(bug1213 bug1213.cpp bug1213_main.cpp)\n\n# check_cxx_compiler_flag(\"-ffast-math\" COMPILER_SUPPORT_FASTMATH)\n# if(COMPILER_SUPPORT_FASTMATH)\n#   set(EIGEN_FASTMATH_FLAGS \"-ffast-math\")\n# else()\n#   check_cxx_compiler_flag(\"/fp:fast\" COMPILER_SUPPORT_FPFAST)\n#   if(COMPILER_SUPPORT_FPFAST)\n#     set(EIGEN_FASTMATH_FLAGS \"/fp:fast\")\n#   endif()\n# endif()\n\n# ei_add_test(fastmath \" ${EIGEN_FASTMATH_FLAGS} \")\n\n# # # ei_add_test(denseLM)\n\n# if(QT4_FOUND)\n#   ei_add_test(qtvector \"\" \"${QT_QTCORE_LIBRARY}\")\n# endif()\n\n# if(UMFPACK_FOUND)\n#   ei_add_test(umfpack_support \"\" \"${UMFPACK_ALL_LIBS}\")\n# endif()\n\n# if(KLU_FOUND OR SuiteSparse_FOUND)\n#   ei_add_test(klu_support \"\" \"${KLU_ALL_LIBS}\")\n# endif()\n\n# if(SUPERLU_FOUND)\n#   ei_add_test(superlu_support \"\" \"${SUPERLU_ALL_LIBS}\")\n# endif()\n\n# if(CHOLMOD_FOUND)\n#   ei_add_test(cholmod_support \"\" \"${CHOLMOD_ALL_LIBS}\")\n# endif()\n\n# if(PARDISO_FOUND)\n#   ei_add_test(pardiso_support \"\" \"${PARDISO_ALL_LIBS}\")\n# endif()\n\n# if(PASTIX_FOUND AND (SCOTCH_FOUND OR METIS_FOUND))\n#   ei_add_test(pastix_support \"\" \"${PASTIX_ALL_LIBS}\")\n# endif()\n\n# if(SPQR_FOUND AND CHOLMOD_FOUND)\n#   ei_add_test(spqr_support \"\" \"${SPQR_ALL_LIBS}\")\n# endif()\n\n# if(METIS_FOUND)\n# ei_add_test(metis_support \"\" \"${METIS_LIBRARIES}\")\n# endif()\n\n# string(TOLOWER \"${CMAKE_CXX_COMPILER}\" cmake_cxx_compiler_tolower)\n# if(cmake_cxx_compiler_tolower MATCHES \"qcc\")\n#   set(CXX_IS_QCC \"ON\")\n# endif()\n\n# ei_add_property(EIGEN_TESTING_SUMMARY \"CXX:               ${CMAKE_CXX_COMPILER}\\n\")\n# if(CMAKE_COMPILER_IS_GNUCXX AND NOT CXX_IS_QCC)\n#   execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version COMMAND head -n 1 OUTPUT_VARIABLE EIGEN_CXX_VERSION_STRING OUTPUT_STRIP_TRAILING_WHITESPACE)\n#   ei_add_property(EIGEN_TESTING_SUMMARY \"CXX_VERSION:       ${EIGEN_CXX_VERSION_STRING}\\n\")\n# endif()\n# ei_add_property(EIGEN_TESTING_SUMMARY \"CXX_FLAGS:         ${CMAKE_CXX_FLAGS}\\n\")\n# ei_add_property(EIGEN_TESTING_SUMMARY \"Sparse lib flags:  ${SPARSE_LIBS}\\n\")\n\n# option(EIGEN_TEST_EIGEN2 \"Run whole Eigen2 test suite against EIGEN2_SUPPORT\" OFF)\n# mark_as_advanced(EIGEN_TEST_EIGEN2)\n# if(EIGEN_TEST_EIGEN2)\n#   message(WARNING \"The Eigen2 test suite has been removed\")\n# endif()\n\n# # boost MP unit test\n# find_package(Boost 1.53.0)\n# if(Boost_FOUND)\n#   include_directories(${Boost_INCLUDE_DIRS})\n#   ei_add_test(boostmultiprec \"\" \"${Boost_LIBRARIES}\")\n#   ei_add_property(EIGEN_TESTED_BACKENDS \"Boost.Multiprecision, \")\n# else()\n#   ei_add_property(EIGEN_MISSING_BACKENDS \"Boost.Multiprecision, \")\n# endif()\n\n\n# # CUDA unit tests\n# option(EIGEN_TEST_CUDA \"Enable CUDA support in unit tests\" OFF)\n# option(EIGEN_TEST_CUDA_CLANG \"Use clang instead of nvcc to compile the CUDA tests\" OFF)\n\n# if(EIGEN_TEST_CUDA_CLANG AND NOT CMAKE_CXX_COMPILER MATCHES \"clang\")\n#   message(WARNING \"EIGEN_TEST_CUDA_CLANG is set, but CMAKE_CXX_COMPILER does not appear to be clang.\")\n# endif()\n\n# if(EIGEN_TEST_CUDA)\n\n# find_package(CUDA 5.0)\n# if(CUDA_FOUND)\n  \n#   set(CUDA_PROPAGATE_HOST_FLAGS OFF)\n#   if(\"${CMAKE_CXX_COMPILER_ID}\" STREQUAL \"Clang\") \n#     set(CUDA_NVCC_FLAGS \"-ccbin ${CMAKE_C_COMPILER}\" CACHE STRING \"nvcc flags\" FORCE)\n#   endif()\n#   if(EIGEN_TEST_CUDA_CLANG)\n#     set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -std=c++11\")\n#     string(APPEND CMAKE_CXX_FLAGS \" --cuda-path=${CUDA_TOOLKIT_ROOT_DIR}\")\n#     foreach(GPU IN LISTS EIGEN_CUDA_COMPUTE_ARCH)\n#       string(APPEND CMAKE_CXX_FLAGS \" --cuda-gpu-arch=sm_${GPU}\")\n#     endforeach()\n#   endif()\n#   set(EIGEN_ADD_TEST_FILENAME_EXTENSION  \"cu\")\n  \n#   ei_add_test(gpu_basic)\n  \n#   unset(EIGEN_ADD_TEST_FILENAME_EXTENSION)\n\n# endif()\n\n# endif()\n\n\n# # HIP unit tests\n# option(EIGEN_TEST_HIP \"Add HIP support.\" OFF)\n# if (EIGEN_TEST_HIP)\n\n#   set(HIP_PATH \"/opt/rocm/hip\" CACHE STRING \"Path to the HIP installation.\")\n\n#   if (EXISTS ${HIP_PATH})\n    \n#     list(APPEND CMAKE_MODULE_PATH ${HIP_PATH}/cmake) \n\n#     find_package(HIP REQUIRED)\n#     if (HIP_FOUND)\n\n#       execute_process(COMMAND ${HIP_PATH}/bin/hipconfig --platform OUTPUT_VARIABLE HIP_PLATFORM)\n\n#       if (${HIP_PLATFORM} STREQUAL \"hcc\")\n\n# \tinclude_directories(${HIP_PATH}/include)\n\n# \tset(EIGEN_ADD_TEST_FILENAME_EXTENSION  \"cu\")\n# \tei_add_test(gpu_basic)\n# \tunset(EIGEN_ADD_TEST_FILENAME_EXTENSION)\n\t\n#       elseif (${HIP_PLATFORM} STREQUAL \"nvcc\")\n# \tmessage(FATAL_ERROR \"HIP_PLATFORM = nvcc is not supported within Eigen\")\n#       else ()\n# \tmessage(FATAL_ERROR \"Unknown HIP_PLATFORM = ${HIP_PLATFORM}\")\n#       endif()\n      \n#     endif()\n    \n#   else ()\n\n#     message(FATAL_ERROR \"EIGEN_TEST_HIP is ON, but the specified HIP_PATH (${HIP_PATH}) does not exist\")\n    \n#   endif()\n    \n# endif()\n\n# option(EIGEN_TEST_BUILD_DOCUMENTATION \"Test building the doxygen documentation\" OFF)\n# if(EIGEN_TEST_BUILD_DOCUMENTATION)\n#   add_dependencies(buildtests doc)\n# endif()\n"
  },
  {
    "path": "3rdparty/eigen3/test/adjoint.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_NO_STATIC_ASSERT\n\n#include \"main.h\"\n\ntemplate<bool IsInteger> struct adjoint_specific;\n\ntemplate<> struct adjoint_specific<true> {\n  template<typename Vec, typename Mat, typename Scalar>\n  static void run(const Vec& v1, const Vec& v2, Vec& v3, const Mat& square, Scalar s1, Scalar s2) {\n    VERIFY(test_isApproxWithRef((s1 * v1 + s2 * v2).dot(v3),     numext::conj(s1) * v1.dot(v3) + numext::conj(s2) * v2.dot(v3), 0));\n    VERIFY(test_isApproxWithRef(v3.dot(s1 * v1 + s2 * v2),       s1*v3.dot(v1)+s2*v3.dot(v2), 0));\n    \n    // check compatibility of dot and adjoint\n    VERIFY(test_isApproxWithRef(v1.dot(square * v2), (square.adjoint() * v1).dot(v2), 0));\n  }\n};\n\ntemplate<> struct adjoint_specific<false> {\n  template<typename Vec, typename Mat, typename Scalar>\n  static void run(const Vec& v1, const Vec& v2, Vec& v3, const Mat& square, Scalar s1, Scalar s2) {\n    typedef typename NumTraits<Scalar>::Real RealScalar;\n    using std::abs;\n    \n    RealScalar ref = NumTraits<Scalar>::IsInteger ? RealScalar(0) : (std::max)((s1 * v1 + s2 * v2).norm(),v3.norm());\n    VERIFY(test_isApproxWithRef((s1 * v1 + s2 * v2).dot(v3),     numext::conj(s1) * v1.dot(v3) + numext::conj(s2) * v2.dot(v3), ref));\n    VERIFY(test_isApproxWithRef(v3.dot(s1 * v1 + s2 * v2),       s1*v3.dot(v1)+s2*v3.dot(v2), ref));\n  \n    VERIFY_IS_APPROX(v1.squaredNorm(),                v1.norm() * v1.norm());\n    // check normalized() and normalize()\n    VERIFY_IS_APPROX(v1, v1.norm() * v1.normalized());\n    v3 = v1;\n    v3.normalize();\n    VERIFY_IS_APPROX(v1, v1.norm() * v3);\n    VERIFY_IS_APPROX(v3, v1.normalized());\n    VERIFY_IS_APPROX(v3.norm(), RealScalar(1));\n\n    // check null inputs\n    VERIFY_IS_APPROX((v1*0).normalized(), (v1*0));\n#if (!EIGEN_ARCH_i386) || defined(EIGEN_VECTORIZE)\n    RealScalar very_small = (std::numeric_limits<RealScalar>::min)();\n    VERIFY( (v1*very_small).norm() == 0 );\n    VERIFY_IS_APPROX((v1*very_small).normalized(), (v1*very_small));\n    v3 = v1*very_small;\n    v3.normalize();\n    VERIFY_IS_APPROX(v3, (v1*very_small));\n#endif\n    \n    // check compatibility of dot and adjoint\n    ref = NumTraits<Scalar>::IsInteger ? 0 : (std::max)((std::max)(v1.norm(),v2.norm()),(std::max)((square * v2).norm(),(square.adjoint() * v1).norm()));\n    VERIFY(internal::isMuchSmallerThan(abs(v1.dot(square * v2) - (square.adjoint() * v1).dot(v2)), ref, test_precision<Scalar>()));\n    \n    // check that Random().normalized() works: tricky as the random xpr must be evaluated by\n    // normalized() in order to produce a consistent result.\n    VERIFY_IS_APPROX(Vec::Random(v1.size()).normalized().norm(), RealScalar(1));\n  }\n};\n\ntemplate<typename MatrixType> void adjoint(const MatrixType& m)\n{\n  /* this test covers the following files:\n     Transpose.h Conjugate.h Dot.h\n  */\n  using std::abs;\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;\n  typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime> SquareMatrixType;\n  const Index PacketSize = internal::packet_traits<Scalar>::size;\n  \n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  MatrixType m1 = MatrixType::Random(rows, cols),\n             m2 = MatrixType::Random(rows, cols),\n             m3(rows, cols),\n             square = SquareMatrixType::Random(rows, rows);\n  VectorType v1 = VectorType::Random(rows),\n             v2 = VectorType::Random(rows),\n             v3 = VectorType::Random(rows),\n             vzero = VectorType::Zero(rows);\n\n  Scalar s1 = internal::random<Scalar>(),\n         s2 = internal::random<Scalar>();\n\n  // check basic compatibility of adjoint, transpose, conjugate\n  VERIFY_IS_APPROX(m1.transpose().conjugate().adjoint(),    m1);\n  VERIFY_IS_APPROX(m1.adjoint().conjugate().transpose(),    m1);\n\n  // check multiplicative behavior\n  VERIFY_IS_APPROX((m1.adjoint() * m2).adjoint(),           m2.adjoint() * m1);\n  VERIFY_IS_APPROX((s1 * m1).adjoint(),                     numext::conj(s1) * m1.adjoint());\n\n  // check basic properties of dot, squaredNorm\n  VERIFY_IS_APPROX(numext::conj(v1.dot(v2)),               v2.dot(v1));\n  VERIFY_IS_APPROX(numext::real(v1.dot(v1)),               v1.squaredNorm());\n  \n  adjoint_specific<NumTraits<Scalar>::IsInteger>::run(v1, v2, v3, square, s1, s2);\n  \n  VERIFY_IS_MUCH_SMALLER_THAN(abs(vzero.dot(v1)),  static_cast<RealScalar>(1));\n  \n  // like in testBasicStuff, test operator() to check const-qualification\n  Index r = internal::random<Index>(0, rows-1),\n      c = internal::random<Index>(0, cols-1);\n  VERIFY_IS_APPROX(m1.conjugate()(r,c), numext::conj(m1(r,c)));\n  VERIFY_IS_APPROX(m1.adjoint()(c,r), numext::conj(m1(r,c)));\n\n  // check inplace transpose\n  m3 = m1;\n  m3.transposeInPlace();\n  VERIFY_IS_APPROX(m3,m1.transpose());\n  m3.transposeInPlace();\n  VERIFY_IS_APPROX(m3,m1);\n  \n  if(PacketSize<m3.rows() && PacketSize<m3.cols())\n  {\n    m3 = m1;\n    Index i = internal::random<Index>(0,m3.rows()-PacketSize);\n    Index j = internal::random<Index>(0,m3.cols()-PacketSize);\n    m3.template block<PacketSize,PacketSize>(i,j).transposeInPlace();\n    VERIFY_IS_APPROX( (m3.template block<PacketSize,PacketSize>(i,j)), (m1.template block<PacketSize,PacketSize>(i,j).transpose()) );\n    m3.template block<PacketSize,PacketSize>(i,j).transposeInPlace();\n    VERIFY_IS_APPROX(m3,m1);\n  }\n\n  // check inplace adjoint\n  m3 = m1;\n  m3.adjointInPlace();\n  VERIFY_IS_APPROX(m3,m1.adjoint());\n  m3.transposeInPlace();\n  VERIFY_IS_APPROX(m3,m1.conjugate());\n\n  // check mixed dot product\n  typedef Matrix<RealScalar, MatrixType::RowsAtCompileTime, 1> RealVectorType;\n  RealVectorType rv1 = RealVectorType::Random(rows);\n  VERIFY_IS_APPROX(v1.dot(rv1.template cast<Scalar>()), v1.dot(rv1));\n  VERIFY_IS_APPROX(rv1.template cast<Scalar>().dot(v1), rv1.dot(v1));\n\n  VERIFY( is_same_type(m1,m1.template conjugateIf<false>()) );\n  VERIFY( is_same_type(m1.conjugate(),m1.template conjugateIf<true>()) );\n}\n\ntemplate<int>\nvoid adjoint_extra()\n{\n  MatrixXcf a(10,10), b(10,10);\n  VERIFY_RAISES_ASSERT(a = a.transpose());\n  VERIFY_RAISES_ASSERT(a = a.transpose() + b);\n  VERIFY_RAISES_ASSERT(a = b + a.transpose());\n  VERIFY_RAISES_ASSERT(a = a.conjugate().transpose());\n  VERIFY_RAISES_ASSERT(a = a.adjoint());\n  VERIFY_RAISES_ASSERT(a = a.adjoint() + b);\n  VERIFY_RAISES_ASSERT(a = b + a.adjoint());\n\n  // no assertion should be triggered for these cases:\n  a.transpose() = a.transpose();\n  a.transpose() += a.transpose();\n  a.transpose() += a.transpose() + b;\n  a.transpose() = a.adjoint();\n  a.transpose() += a.adjoint();\n  a.transpose() += a.adjoint() + b;\n\n  // regression tests for check_for_aliasing\n  MatrixXd c(10,10);\n  c = 1.0 * MatrixXd::Ones(10,10) + c;\n  c = MatrixXd::Ones(10,10) * 1.0 + c;\n  c = c + MatrixXd::Ones(10,10) .cwiseProduct( MatrixXd::Zero(10,10) );\n  c = MatrixXd::Ones(10,10) * MatrixXd::Zero(10,10);\n\n  // regression for bug 1646\n  for (int j = 0; j < 10; ++j) {\n    c.col(j).head(j) = c.row(j).head(j);\n  }\n\n  for (int j = 0; j < 10; ++j) {\n    c.col(j) = c.row(j);\n  }\n\n  a.conservativeResize(1,1);\n  a = a.transpose();\n\n  a.conservativeResize(0,0);\n  a = a.transpose();\n}\n\nEIGEN_DECLARE_TEST(adjoint)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( adjoint(Matrix<float, 1, 1>()) );\n    CALL_SUBTEST_2( adjoint(Matrix3d()) );\n    CALL_SUBTEST_3( adjoint(Matrix4f()) );\n    \n    CALL_SUBTEST_4( adjoint(MatrixXcf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE/2), internal::random<int>(1,EIGEN_TEST_MAX_SIZE/2))) );\n    CALL_SUBTEST_5( adjoint(MatrixXi(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_6( adjoint(MatrixXf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    \n    // Complement for 128 bits vectorization:\n    CALL_SUBTEST_8( adjoint(Matrix2d()) );\n    CALL_SUBTEST_9( adjoint(Matrix<int,4,4>()) );\n    \n    // 256 bits vectorization:\n    CALL_SUBTEST_10( adjoint(Matrix<float,8,8>()) );\n    CALL_SUBTEST_11( adjoint(Matrix<double,4,4>()) );\n    CALL_SUBTEST_12( adjoint(Matrix<int,8,8>()) );\n  }\n  // test a large static matrix only once\n  CALL_SUBTEST_7( adjoint(Matrix<float, 100, 100>()) );\n\n  CALL_SUBTEST_13( adjoint_extra<0>() );\n}\n\n"
  },
  {
    "path": "3rdparty/eigen3/test/array_cwise.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\ntemplate<typename ArrayType> void array(const ArrayType& m)\n{\n  typedef typename ArrayType::Scalar Scalar;\n  typedef typename ArrayType::RealScalar RealScalar;\n  typedef Array<Scalar, ArrayType::RowsAtCompileTime, 1> ColVectorType;\n  typedef Array<Scalar, 1, ArrayType::ColsAtCompileTime> RowVectorType;\n\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  ArrayType m1 = ArrayType::Random(rows, cols),\n             m2 = ArrayType::Random(rows, cols),\n             m3(rows, cols);\n  ArrayType m4 = m1; // copy constructor\n  VERIFY_IS_APPROX(m1, m4);\n\n  ColVectorType cv1 = ColVectorType::Random(rows);\n  RowVectorType rv1 = RowVectorType::Random(cols);\n\n  Scalar  s1 = internal::random<Scalar>(),\n          s2 = internal::random<Scalar>();\n\n  // scalar addition\n  VERIFY_IS_APPROX(m1 + s1, s1 + m1);\n  VERIFY_IS_APPROX(m1 + s1, ArrayType::Constant(rows,cols,s1) + m1);\n  VERIFY_IS_APPROX(s1 - m1, (-m1)+s1 );\n  VERIFY_IS_APPROX(m1 - s1, m1 - ArrayType::Constant(rows,cols,s1));\n  VERIFY_IS_APPROX(s1 - m1, ArrayType::Constant(rows,cols,s1) - m1);\n  VERIFY_IS_APPROX((m1*Scalar(2)) - s2, (m1+m1) - ArrayType::Constant(rows,cols,s2) );\n  m3 = m1;\n  m3 += s2;\n  VERIFY_IS_APPROX(m3, m1 + s2);\n  m3 = m1;\n  m3 -= s1;\n  VERIFY_IS_APPROX(m3, m1 - s1);\n\n  // scalar operators via Maps\n  m3 = m1;\n  ArrayType::Map(m1.data(), m1.rows(), m1.cols()) -= ArrayType::Map(m2.data(), m2.rows(), m2.cols());\n  VERIFY_IS_APPROX(m1, m3 - m2);\n\n  m3 = m1;\n  ArrayType::Map(m1.data(), m1.rows(), m1.cols()) += ArrayType::Map(m2.data(), m2.rows(), m2.cols());\n  VERIFY_IS_APPROX(m1, m3 + m2);\n\n  m3 = m1;\n  ArrayType::Map(m1.data(), m1.rows(), m1.cols()) *= ArrayType::Map(m2.data(), m2.rows(), m2.cols());\n  VERIFY_IS_APPROX(m1, m3 * m2);\n\n  m3 = m1;\n  m2 = ArrayType::Random(rows,cols);\n  m2 = (m2==0).select(1,m2);\n  ArrayType::Map(m1.data(), m1.rows(), m1.cols()) /= ArrayType::Map(m2.data(), m2.rows(), m2.cols());\n  VERIFY_IS_APPROX(m1, m3 / m2);\n\n  // reductions\n  VERIFY_IS_APPROX(m1.abs().colwise().sum().sum(), m1.abs().sum());\n  VERIFY_IS_APPROX(m1.abs().rowwise().sum().sum(), m1.abs().sum());\n  using std::abs;\n  VERIFY_IS_MUCH_SMALLER_THAN(abs(m1.colwise().sum().sum() - m1.sum()), m1.abs().sum());\n  VERIFY_IS_MUCH_SMALLER_THAN(abs(m1.rowwise().sum().sum() - m1.sum()), m1.abs().sum());\n  if (!internal::isMuchSmallerThan(abs(m1.sum() - (m1+m2).sum()), m1.abs().sum(), test_precision<Scalar>()))\n      VERIFY_IS_NOT_APPROX(((m1+m2).rowwise().sum()).sum(), m1.sum());\n  VERIFY_IS_APPROX(m1.colwise().sum(), m1.colwise().redux(internal::scalar_sum_op<Scalar,Scalar>()));\n\n  // vector-wise ops\n  m3 = m1;\n  VERIFY_IS_APPROX(m3.colwise() += cv1, m1.colwise() + cv1);\n  m3 = m1;\n  VERIFY_IS_APPROX(m3.colwise() -= cv1, m1.colwise() - cv1);\n  m3 = m1;\n  VERIFY_IS_APPROX(m3.rowwise() += rv1, m1.rowwise() + rv1);\n  m3 = m1;\n  VERIFY_IS_APPROX(m3.rowwise() -= rv1, m1.rowwise() - rv1);\n\n  // Conversion from scalar\n  VERIFY_IS_APPROX((m3 = s1), ArrayType::Constant(rows,cols,s1));\n  VERIFY_IS_APPROX((m3 = 1),  ArrayType::Constant(rows,cols,1));\n  VERIFY_IS_APPROX((m3.topLeftCorner(rows,cols) = 1),  ArrayType::Constant(rows,cols,1));\n  typedef Array<Scalar,\n                ArrayType::RowsAtCompileTime==Dynamic?2:ArrayType::RowsAtCompileTime,\n                ArrayType::ColsAtCompileTime==Dynamic?2:ArrayType::ColsAtCompileTime,\n                ArrayType::Options> FixedArrayType;\n  {\n    FixedArrayType f1(s1);\n    VERIFY_IS_APPROX(f1, FixedArrayType::Constant(s1));\n    FixedArrayType f2(numext::real(s1));\n    VERIFY_IS_APPROX(f2, FixedArrayType::Constant(numext::real(s1)));\n    FixedArrayType f3((int)100*numext::real(s1));\n    VERIFY_IS_APPROX(f3, FixedArrayType::Constant((int)100*numext::real(s1)));\n    f1.setRandom();\n    FixedArrayType f4(f1.data());\n    VERIFY_IS_APPROX(f4, f1);\n  }\n  #if EIGEN_HAS_CXX11\n  {\n    FixedArrayType f1{s1};\n    VERIFY_IS_APPROX(f1, FixedArrayType::Constant(s1));\n    FixedArrayType f2{numext::real(s1)};\n    VERIFY_IS_APPROX(f2, FixedArrayType::Constant(numext::real(s1)));\n    FixedArrayType f3{(int)100*numext::real(s1)};\n    VERIFY_IS_APPROX(f3, FixedArrayType::Constant((int)100*numext::real(s1)));\n    f1.setRandom();\n    FixedArrayType f4{f1.data()};\n    VERIFY_IS_APPROX(f4, f1);\n  }\n  #endif\n\n  // pow\n  VERIFY_IS_APPROX(m1.pow(2), m1.square());\n  VERIFY_IS_APPROX(pow(m1,2), m1.square());\n  VERIFY_IS_APPROX(m1.pow(3), m1.cube());\n  VERIFY_IS_APPROX(pow(m1,3), m1.cube());\n  VERIFY_IS_APPROX((-m1).pow(3), -m1.cube());\n  VERIFY_IS_APPROX(pow(2*m1,3), 8*m1.cube());\n  ArrayType exponents = ArrayType::Constant(rows, cols, RealScalar(2));\n  VERIFY_IS_APPROX(Eigen::pow(m1,exponents), m1.square());\n  VERIFY_IS_APPROX(m1.pow(exponents), m1.square());\n  VERIFY_IS_APPROX(Eigen::pow(2*m1,exponents), 4*m1.square());\n  VERIFY_IS_APPROX((2*m1).pow(exponents), 4*m1.square());\n  VERIFY_IS_APPROX(Eigen::pow(m1,2*exponents), m1.square().square());\n  VERIFY_IS_APPROX(m1.pow(2*exponents), m1.square().square());\n  VERIFY_IS_APPROX(Eigen::pow(m1(0,0), exponents), ArrayType::Constant(rows,cols,m1(0,0)*m1(0,0)));\n\n  // Check possible conflicts with 1D ctor\n  typedef Array<Scalar, Dynamic, 1> OneDArrayType;\n  {\n    OneDArrayType o1(rows);\n    VERIFY(o1.size()==rows);\n    OneDArrayType o2(static_cast<int>(rows));\n    VERIFY(o2.size()==rows);\n  }\n  #if EIGEN_HAS_CXX11\n  {\n    OneDArrayType o1{rows};\n    VERIFY(o1.size()==rows);\n    OneDArrayType o4{int(rows)};\n    VERIFY(o4.size()==rows);\n  }\n  #endif\n  // Check possible conflicts with 2D ctor\n  typedef Array<Scalar, Dynamic, Dynamic> TwoDArrayType;\n  typedef Array<Scalar, 2, 1> ArrayType2;\n  {\n    TwoDArrayType o1(rows,cols);\n    VERIFY(o1.rows()==rows);\n    VERIFY(o1.cols()==cols);\n    TwoDArrayType o2(static_cast<int>(rows),static_cast<int>(cols));\n    VERIFY(o2.rows()==rows);\n    VERIFY(o2.cols()==cols);\n\n    ArrayType2 o3(rows,cols);\n    VERIFY(o3(0)==Scalar(rows) && o3(1)==Scalar(cols));\n    ArrayType2 o4(static_cast<int>(rows),static_cast<int>(cols));\n    VERIFY(o4(0)==Scalar(rows) && o4(1)==Scalar(cols));\n  }\n  #if EIGEN_HAS_CXX11\n  {\n    TwoDArrayType o1{rows,cols};\n    VERIFY(o1.rows()==rows);\n    VERIFY(o1.cols()==cols);\n    TwoDArrayType o2{int(rows),int(cols)};\n    VERIFY(o2.rows()==rows);\n    VERIFY(o2.cols()==cols);\n\n    ArrayType2 o3{rows,cols};\n    VERIFY(o3(0)==Scalar(rows) && o3(1)==Scalar(cols));\n    ArrayType2 o4{int(rows),int(cols)};\n    VERIFY(o4(0)==Scalar(rows) && o4(1)==Scalar(cols));\n  }\n  #endif\n}\n\ntemplate<typename ArrayType> void comparisons(const ArrayType& m)\n{\n  using std::abs;\n  typedef typename ArrayType::Scalar Scalar;\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  Index r = internal::random<Index>(0, rows-1),\n        c = internal::random<Index>(0, cols-1);\n\n  ArrayType m1 = ArrayType::Random(rows, cols),\n            m2 = ArrayType::Random(rows, cols),\n            m3(rows, cols),\n            m4 = m1;\n\n  m4 = (m4.abs()==Scalar(0)).select(1,m4);\n\n  VERIFY(((m1 + Scalar(1)) > m1).all());\n  VERIFY(((m1 - Scalar(1)) < m1).all());\n  if (rows*cols>1)\n  {\n    m3 = m1;\n    m3(r,c) += 1;\n    VERIFY(! (m1 < m3).all() );\n    VERIFY(! (m1 > m3).all() );\n  }\n  VERIFY(!(m1 > m2 && m1 < m2).any());\n  VERIFY((m1 <= m2 || m1 >= m2).all());\n\n  // comparisons array to scalar\n  VERIFY( (m1 != (m1(r,c)+1) ).any() );\n  VERIFY( (m1 >  (m1(r,c)-1) ).any() );\n  VERIFY( (m1 <  (m1(r,c)+1) ).any() );\n  VERIFY( (m1 ==  m1(r,c)    ).any() );\n\n  // comparisons scalar to array\n  VERIFY( ( (m1(r,c)+1) != m1).any() );\n  VERIFY( ( (m1(r,c)-1) <  m1).any() );\n  VERIFY( ( (m1(r,c)+1) >  m1).any() );\n  VERIFY( (  m1(r,c)    == m1).any() );\n\n  // test Select\n  VERIFY_IS_APPROX( (m1<m2).select(m1,m2), m1.cwiseMin(m2) );\n  VERIFY_IS_APPROX( (m1>m2).select(m1,m2), m1.cwiseMax(m2) );\n  Scalar mid = (m1.cwiseAbs().minCoeff() + m1.cwiseAbs().maxCoeff())/Scalar(2);\n  for (int j=0; j<cols; ++j)\n  for (int i=0; i<rows; ++i)\n    m3(i,j) = abs(m1(i,j))<mid ? 0 : m1(i,j);\n  VERIFY_IS_APPROX( (m1.abs()<ArrayType::Constant(rows,cols,mid))\n                        .select(ArrayType::Zero(rows,cols),m1), m3);\n  // shorter versions:\n  VERIFY_IS_APPROX( (m1.abs()<ArrayType::Constant(rows,cols,mid))\n                        .select(0,m1), m3);\n  VERIFY_IS_APPROX( (m1.abs()>=ArrayType::Constant(rows,cols,mid))\n                        .select(m1,0), m3);\n  // even shorter version:\n  VERIFY_IS_APPROX( (m1.abs()<mid).select(0,m1), m3);\n\n  // count\n  VERIFY(((m1.abs()+1)>RealScalar(0.1)).count() == rows*cols);\n\n  // and/or\n  VERIFY( (m1<RealScalar(0) && m1>RealScalar(0)).count() == 0);\n  VERIFY( (m1<RealScalar(0) || m1>=RealScalar(0)).count() == rows*cols);\n  RealScalar a = m1.abs().mean();\n  VERIFY( (m1<-a || m1>a).count() == (m1.abs()>a).count());\n\n  typedef Array<Index, Dynamic, 1> ArrayOfIndices;\n\n  // TODO allows colwise/rowwise for array\n  VERIFY_IS_APPROX(((m1.abs()+1)>RealScalar(0.1)).colwise().count(), ArrayOfIndices::Constant(cols,rows).transpose());\n  VERIFY_IS_APPROX(((m1.abs()+1)>RealScalar(0.1)).rowwise().count(), ArrayOfIndices::Constant(rows, cols));\n}\n\ntemplate<typename ArrayType> void array_real(const ArrayType& m)\n{\n  using std::abs;\n  using std::sqrt;\n  typedef typename ArrayType::Scalar Scalar;\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  ArrayType m1 = ArrayType::Random(rows, cols),\n            m2 = ArrayType::Random(rows, cols),\n            m3(rows, cols),\n            m4 = m1;\n\n  m4 = (m4.abs()==Scalar(0)).select(1,m4);\n\n  Scalar  s1 = internal::random<Scalar>();\n\n  // these tests are mostly to check possible compilation issues with free-functions.\n  VERIFY_IS_APPROX(m1.sin(), sin(m1));\n  VERIFY_IS_APPROX(m1.cos(), cos(m1));\n  VERIFY_IS_APPROX(m1.tan(), tan(m1));\n  VERIFY_IS_APPROX(m1.asin(), asin(m1));\n  VERIFY_IS_APPROX(m1.acos(), acos(m1));\n  VERIFY_IS_APPROX(m1.atan(), atan(m1));\n  VERIFY_IS_APPROX(m1.sinh(), sinh(m1));\n  VERIFY_IS_APPROX(m1.cosh(), cosh(m1));\n  VERIFY_IS_APPROX(m1.tanh(), tanh(m1));\n#if EIGEN_HAS_CXX11_MATH\n  VERIFY_IS_APPROX(m1.tanh().atanh(), atanh(tanh(m1)));\n  VERIFY_IS_APPROX(m1.sinh().asinh(), asinh(sinh(m1)));\n  VERIFY_IS_APPROX(m1.cosh().acosh(), acosh(cosh(m1)));\n#endif\n  VERIFY_IS_APPROX(m1.logistic(), logistic(m1));\n\n  VERIFY_IS_APPROX(m1.arg(), arg(m1));\n  VERIFY_IS_APPROX(m1.round(), round(m1));\n  VERIFY_IS_APPROX(m1.rint(), rint(m1));\n  VERIFY_IS_APPROX(m1.floor(), floor(m1));\n  VERIFY_IS_APPROX(m1.ceil(), ceil(m1));\n  VERIFY((m1.isNaN() == (Eigen::isnan)(m1)).all());\n  VERIFY((m1.isInf() == (Eigen::isinf)(m1)).all());\n  VERIFY((m1.isFinite() == (Eigen::isfinite)(m1)).all());\n  VERIFY_IS_APPROX(m1.inverse(), inverse(m1));\n  VERIFY_IS_APPROX(m1.abs(), abs(m1));\n  VERIFY_IS_APPROX(m1.abs2(), abs2(m1));\n  VERIFY_IS_APPROX(m1.square(), square(m1));\n  VERIFY_IS_APPROX(m1.cube(), cube(m1));\n  VERIFY_IS_APPROX(cos(m1+RealScalar(3)*m2), cos((m1+RealScalar(3)*m2).eval()));\n  VERIFY_IS_APPROX(m1.sign(), sign(m1));\n\n\n  // avoid NaNs with abs() so verification doesn't fail\n  m3 = m1.abs();\n  VERIFY_IS_APPROX(m3.sqrt(), sqrt(abs(m1)));\n  VERIFY_IS_APPROX(m3.rsqrt(), Scalar(1)/sqrt(abs(m1)));\n  VERIFY_IS_APPROX(rsqrt(m3), Scalar(1)/sqrt(abs(m1)));\n  VERIFY_IS_APPROX(m3.log(), log(m3));\n  VERIFY_IS_APPROX(m3.log1p(), log1p(m3));\n  VERIFY_IS_APPROX(m3.log10(), log10(m3));\n\n\n  VERIFY((!(m1>m2) == (m1<=m2)).all());\n\n  VERIFY_IS_APPROX(sin(m1.asin()), m1);\n  VERIFY_IS_APPROX(cos(m1.acos()), m1);\n  VERIFY_IS_APPROX(tan(m1.atan()), m1);\n  VERIFY_IS_APPROX(sinh(m1), 0.5*(exp(m1)-exp(-m1)));\n  VERIFY_IS_APPROX(cosh(m1), 0.5*(exp(m1)+exp(-m1)));\n  VERIFY_IS_APPROX(tanh(m1), (0.5*(exp(m1)-exp(-m1)))/(0.5*(exp(m1)+exp(-m1))));\n  VERIFY_IS_APPROX(logistic(m1), (1.0/(1.0+exp(-m1))));\n  VERIFY_IS_APPROX(arg(m1), ((m1<0).template cast<Scalar>())*std::acos(-1.0));\n  VERIFY((round(m1) <= ceil(m1) && round(m1) >= floor(m1)).all());\n  VERIFY((rint(m1) <= ceil(m1) && rint(m1) >= floor(m1)).all());\n  VERIFY(((ceil(m1) - round(m1)) <= Scalar(0.5) || (round(m1) - floor(m1)) <= Scalar(0.5)).all());\n  VERIFY(((ceil(m1) - round(m1)) <= Scalar(1.0) && (round(m1) - floor(m1)) <= Scalar(1.0)).all());\n  VERIFY(((ceil(m1) - rint(m1)) <= Scalar(0.5) || (rint(m1) - floor(m1)) <= Scalar(0.5)).all());\n  VERIFY(((ceil(m1) - rint(m1)) <= Scalar(1.0) && (rint(m1) - floor(m1)) <= Scalar(1.0)).all());\n  VERIFY((Eigen::isnan)((m1*0.0)/0.0).all());\n  VERIFY((Eigen::isinf)(m4/0.0).all());\n  VERIFY(((Eigen::isfinite)(m1) && (!(Eigen::isfinite)(m1*0.0/0.0)) && (!(Eigen::isfinite)(m4/0.0))).all());\n  VERIFY_IS_APPROX(inverse(inverse(m1)),m1);\n  VERIFY((abs(m1) == m1 || abs(m1) == -m1).all());\n  VERIFY_IS_APPROX(m3, sqrt(abs2(m1)));\n  VERIFY_IS_APPROX(m1.absolute_difference(m2), (m1 > m2).select(m1 - m2, m2 - m1));\n  VERIFY_IS_APPROX( m1.sign(), -(-m1).sign() );\n  VERIFY_IS_APPROX( m1*m1.sign(),m1.abs());\n  VERIFY_IS_APPROX(m1.sign() * m1.abs(), m1);\n\n  VERIFY_IS_APPROX(numext::abs2(numext::real(m1)) + numext::abs2(numext::imag(m1)), numext::abs2(m1));\n  VERIFY_IS_APPROX(numext::abs2(Eigen::real(m1)) + numext::abs2(Eigen::imag(m1)), numext::abs2(m1));\n  if(!NumTraits<Scalar>::IsComplex)\n    VERIFY_IS_APPROX(numext::real(m1), m1);\n\n  // shift argument of logarithm so that it is not zero\n  Scalar smallNumber = NumTraits<Scalar>::dummy_precision();\n  VERIFY_IS_APPROX((m3 + smallNumber).log() , log(abs(m1) + smallNumber));\n  VERIFY_IS_APPROX((m3 + smallNumber + 1).log() , log1p(abs(m1) + smallNumber));\n\n  VERIFY_IS_APPROX(m1.exp() * m2.exp(), exp(m1+m2));\n  VERIFY_IS_APPROX(m1.exp(), exp(m1));\n  VERIFY_IS_APPROX(m1.exp() / m2.exp(),(m1-m2).exp());\n\n  VERIFY_IS_APPROX(m1.expm1(), expm1(m1));\n  VERIFY_IS_APPROX((m3 + smallNumber).exp() - 1, expm1(abs(m3) + smallNumber));\n\n  VERIFY_IS_APPROX(m3.pow(RealScalar(0.5)), m3.sqrt());\n  VERIFY_IS_APPROX(pow(m3,RealScalar(0.5)), m3.sqrt());\n\n  VERIFY_IS_APPROX(m3.pow(RealScalar(-0.5)), m3.rsqrt());\n  VERIFY_IS_APPROX(pow(m3,RealScalar(-0.5)), m3.rsqrt());\n\n  VERIFY_IS_APPROX(log10(m3), log(m3)/log(10));\n\n  // scalar by array division\n  const RealScalar tiny = sqrt(std::numeric_limits<RealScalar>::epsilon());\n  s1 += Scalar(tiny);\n  m1 += ArrayType::Constant(rows,cols,Scalar(tiny));\n  VERIFY_IS_APPROX(s1/m1, s1 * m1.inverse());\n\n  // check inplace transpose\n  m3 = m1;\n  m3.transposeInPlace();\n  VERIFY_IS_APPROX(m3, m1.transpose());\n  m3.transposeInPlace();\n  VERIFY_IS_APPROX(m3, m1);\n}\n\ntemplate<typename ArrayType> void array_complex(const ArrayType& m)\n{\n  typedef typename ArrayType::Scalar Scalar;\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  ArrayType m1 = ArrayType::Random(rows, cols),\n            m2(rows, cols),\n            m4 = m1;\n\n  m4.real() = (m4.real().abs()==RealScalar(0)).select(RealScalar(1),m4.real());\n  m4.imag() = (m4.imag().abs()==RealScalar(0)).select(RealScalar(1),m4.imag());\n\n  Array<RealScalar, -1, -1> m3(rows, cols);\n\n  for (Index i = 0; i < m.rows(); ++i)\n    for (Index j = 0; j < m.cols(); ++j)\n      m2(i,j) = sqrt(m1(i,j));\n\n  // these tests are mostly to check possible compilation issues with free-functions.\n  VERIFY_IS_APPROX(m1.sin(), sin(m1));\n  VERIFY_IS_APPROX(m1.cos(), cos(m1));\n  VERIFY_IS_APPROX(m1.tan(), tan(m1));\n  VERIFY_IS_APPROX(m1.sinh(), sinh(m1));\n  VERIFY_IS_APPROX(m1.cosh(), cosh(m1));\n  VERIFY_IS_APPROX(m1.tanh(), tanh(m1));\n  VERIFY_IS_APPROX(m1.logistic(), logistic(m1));\n  VERIFY_IS_APPROX(m1.arg(), arg(m1));\n  VERIFY((m1.isNaN() == (Eigen::isnan)(m1)).all());\n  VERIFY((m1.isInf() == (Eigen::isinf)(m1)).all());\n  VERIFY((m1.isFinite() == (Eigen::isfinite)(m1)).all());\n  VERIFY_IS_APPROX(m1.inverse(), inverse(m1));\n  VERIFY_IS_APPROX(m1.log(), log(m1));\n  VERIFY_IS_APPROX(m1.log10(), log10(m1));\n  VERIFY_IS_APPROX(m1.abs(), abs(m1));\n  VERIFY_IS_APPROX(m1.abs2(), abs2(m1));\n  VERIFY_IS_APPROX(m1.sqrt(), sqrt(m1));\n  VERIFY_IS_APPROX(m1.square(), square(m1));\n  VERIFY_IS_APPROX(m1.cube(), cube(m1));\n  VERIFY_IS_APPROX(cos(m1+RealScalar(3)*m2), cos((m1+RealScalar(3)*m2).eval()));\n  VERIFY_IS_APPROX(m1.sign(), sign(m1));\n\n\n  VERIFY_IS_APPROX(m1.exp() * m2.exp(), exp(m1+m2));\n  VERIFY_IS_APPROX(m1.exp(), exp(m1));\n  VERIFY_IS_APPROX(m1.exp() / m2.exp(),(m1-m2).exp());\n\n  VERIFY_IS_APPROX(m1.expm1(), expm1(m1));\n  VERIFY_IS_APPROX(expm1(m1), exp(m1) - 1.);\n  // Check for larger magnitude complex numbers that expm1 matches exp - 1.\n  VERIFY_IS_APPROX(expm1(10. * m1), exp(10. * m1) - 1.);\n\n  VERIFY_IS_APPROX(sinh(m1), 0.5*(exp(m1)-exp(-m1)));\n  VERIFY_IS_APPROX(cosh(m1), 0.5*(exp(m1)+exp(-m1)));\n  VERIFY_IS_APPROX(tanh(m1), (0.5*(exp(m1)-exp(-m1)))/(0.5*(exp(m1)+exp(-m1))));\n  VERIFY_IS_APPROX(logistic(m1), (1.0/(1.0 + exp(-m1))));\n\n  for (Index i = 0; i < m.rows(); ++i)\n    for (Index j = 0; j < m.cols(); ++j)\n      m3(i,j) = std::atan2(m1(i,j).imag(), m1(i,j).real());\n  VERIFY_IS_APPROX(arg(m1), m3);\n\n  std::complex<RealScalar> zero(0.0,0.0);\n  VERIFY((Eigen::isnan)(m1*zero/zero).all());\n#if EIGEN_COMP_MSVC\n  // msvc complex division is not robust\n  VERIFY((Eigen::isinf)(m4/RealScalar(0)).all());\n#else\n#if EIGEN_COMP_CLANG\n  // clang's complex division is notoriously broken too\n  if((numext::isinf)(m4(0,0)/RealScalar(0))) {\n#endif\n    VERIFY((Eigen::isinf)(m4/zero).all());\n#if EIGEN_COMP_CLANG\n  }\n  else\n  {\n    VERIFY((Eigen::isinf)(m4.real()/zero.real()).all());\n  }\n#endif\n#endif // MSVC\n\n  VERIFY(((Eigen::isfinite)(m1) && (!(Eigen::isfinite)(m1*zero/zero)) && (!(Eigen::isfinite)(m1/zero))).all());\n\n  VERIFY_IS_APPROX(inverse(inverse(m1)),m1);\n  VERIFY_IS_APPROX(conj(m1.conjugate()), m1);\n  VERIFY_IS_APPROX(abs(m1), sqrt(square(m1.real())+square(m1.imag())));\n  VERIFY_IS_APPROX(abs(m1), sqrt(abs2(m1)));\n  VERIFY_IS_APPROX(log10(m1), log(m1)/log(10));\n\n  VERIFY_IS_APPROX( m1.sign(), -(-m1).sign() );\n  VERIFY_IS_APPROX( m1.sign() * m1.abs(), m1);\n\n  // scalar by array division\n  Scalar  s1 = internal::random<Scalar>();\n  const RealScalar tiny = std::sqrt(std::numeric_limits<RealScalar>::epsilon());\n  s1 += Scalar(tiny);\n  m1 += ArrayType::Constant(rows,cols,Scalar(tiny));\n  VERIFY_IS_APPROX(s1/m1, s1 * m1.inverse());\n\n  // check inplace transpose\n  m2 = m1;\n  m2.transposeInPlace();\n  VERIFY_IS_APPROX(m2, m1.transpose());\n  m2.transposeInPlace();\n  VERIFY_IS_APPROX(m2, m1);\n\n}\n\ntemplate<typename ArrayType> void min_max(const ArrayType& m)\n{\n  typedef typename ArrayType::Scalar Scalar;\n\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  ArrayType m1 = ArrayType::Random(rows, cols);\n\n  // min/max with array\n  Scalar maxM1 = m1.maxCoeff();\n  Scalar minM1 = m1.minCoeff();\n\n  VERIFY_IS_APPROX(ArrayType::Constant(rows,cols, minM1), (m1.min)(ArrayType::Constant(rows,cols, minM1)));\n  VERIFY_IS_APPROX(m1, (m1.min)(ArrayType::Constant(rows,cols, maxM1)));\n\n  VERIFY_IS_APPROX(ArrayType::Constant(rows,cols, maxM1), (m1.max)(ArrayType::Constant(rows,cols, maxM1)));\n  VERIFY_IS_APPROX(m1, (m1.max)(ArrayType::Constant(rows,cols, minM1)));\n\n  // min/max with scalar input\n  VERIFY_IS_APPROX(ArrayType::Constant(rows,cols, minM1), (m1.min)( minM1));\n  VERIFY_IS_APPROX(m1, (m1.min)( maxM1));\n\n  VERIFY_IS_APPROX(ArrayType::Constant(rows,cols, maxM1), (m1.max)( maxM1));\n  VERIFY_IS_APPROX(m1, (m1.max)( minM1));\n\n}\n\nEIGEN_DECLARE_TEST(array_cwise)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( array(Array<float, 1, 1>()) );\n    CALL_SUBTEST_2( array(Array22f()) );\n    CALL_SUBTEST_3( array(Array44d()) );\n    CALL_SUBTEST_4( array(ArrayXXcf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_5( array(ArrayXXf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_6( array(ArrayXXi(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_6( array(Array<Index,Dynamic,Dynamic>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n  }\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( comparisons(Array<float, 1, 1>()) );\n    CALL_SUBTEST_2( comparisons(Array22f()) );\n    CALL_SUBTEST_3( comparisons(Array44d()) );\n    CALL_SUBTEST_5( comparisons(ArrayXXf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_6( comparisons(ArrayXXi(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n  }\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( min_max(Array<float, 1, 1>()) );\n    CALL_SUBTEST_2( min_max(Array22f()) );\n    CALL_SUBTEST_3( min_max(Array44d()) );\n    CALL_SUBTEST_5( min_max(ArrayXXf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_6( min_max(ArrayXXi(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n  }\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( array_real(Array<float, 1, 1>()) );\n    CALL_SUBTEST_2( array_real(Array22f()) );\n    CALL_SUBTEST_3( array_real(Array44d()) );\n    CALL_SUBTEST_5( array_real(ArrayXXf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n  }\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_4( array_complex(ArrayXXcf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n  }\n\n  VERIFY((internal::is_same< internal::global_math_functions_filtering_base<int>::type, int >::value));\n  VERIFY((internal::is_same< internal::global_math_functions_filtering_base<float>::type, float >::value));\n  VERIFY((internal::is_same< internal::global_math_functions_filtering_base<Array2i>::type, ArrayBase<Array2i> >::value));\n  typedef CwiseUnaryOp<internal::scalar_abs_op<double>, ArrayXd > Xpr;\n  VERIFY((internal::is_same< internal::global_math_functions_filtering_base<Xpr>::type,\n                           ArrayBase<Xpr>\n                         >::value));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/array_for_matrix.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\ntemplate<typename MatrixType> void array_for_matrix(const MatrixType& m)\n{\n  typedef typename MatrixType::Scalar Scalar;\n  typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> ColVectorType;\n  typedef Matrix<Scalar, 1, MatrixType::ColsAtCompileTime> RowVectorType; \n\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  MatrixType m1 = MatrixType::Random(rows, cols),\n             m2 = MatrixType::Random(rows, cols),\n             m3(rows, cols);\n\n  ColVectorType cv1 = ColVectorType::Random(rows);\n  RowVectorType rv1 = RowVectorType::Random(cols);\n  \n  Scalar  s1 = internal::random<Scalar>(),\n          s2 = internal::random<Scalar>();\n          \n  // scalar addition\n  VERIFY_IS_APPROX(m1.array() + s1, s1 + m1.array());\n  VERIFY_IS_APPROX((m1.array() + s1).matrix(), MatrixType::Constant(rows,cols,s1) + m1);\n  VERIFY_IS_APPROX(((m1*Scalar(2)).array() - s2).matrix(), (m1+m1) - MatrixType::Constant(rows,cols,s2) );\n  m3 = m1;\n  m3.array() += s2;\n  VERIFY_IS_APPROX(m3, (m1.array() + s2).matrix());\n  m3 = m1;\n  m3.array() -= s1;\n  VERIFY_IS_APPROX(m3, (m1.array() - s1).matrix());\n\n  // reductions\n  VERIFY_IS_MUCH_SMALLER_THAN(m1.colwise().sum().sum() - m1.sum(), m1.squaredNorm());\n  VERIFY_IS_MUCH_SMALLER_THAN(m1.rowwise().sum().sum() - m1.sum(), m1.squaredNorm());\n  VERIFY_IS_MUCH_SMALLER_THAN(m1.colwise().sum() + m2.colwise().sum() - (m1+m2).colwise().sum(), (m1+m2).squaredNorm());\n  VERIFY_IS_MUCH_SMALLER_THAN(m1.rowwise().sum() - m2.rowwise().sum() - (m1-m2).rowwise().sum(), (m1-m2).squaredNorm());\n  VERIFY_IS_APPROX(m1.colwise().sum(), m1.colwise().redux(internal::scalar_sum_op<Scalar,Scalar>()));\n\n  // vector-wise ops\n  m3 = m1;\n  VERIFY_IS_APPROX(m3.colwise() += cv1, m1.colwise() + cv1);\n  m3 = m1;\n  VERIFY_IS_APPROX(m3.colwise() -= cv1, m1.colwise() - cv1);\n  m3 = m1;\n  VERIFY_IS_APPROX(m3.rowwise() += rv1, m1.rowwise() + rv1);\n  m3 = m1;\n  VERIFY_IS_APPROX(m3.rowwise() -= rv1, m1.rowwise() - rv1);\n  \n  // empty objects\n  VERIFY_IS_APPROX((m1.template block<0,Dynamic>(0,0,0,cols).colwise().sum()), RowVectorType::Zero(cols));\n  VERIFY_IS_APPROX((m1.template block<Dynamic,0>(0,0,rows,0).rowwise().sum()), ColVectorType::Zero(rows));\n  VERIFY_IS_APPROX((m1.template block<0,Dynamic>(0,0,0,cols).colwise().prod()), RowVectorType::Ones(cols));\n  VERIFY_IS_APPROX((m1.template block<Dynamic,0>(0,0,rows,0).rowwise().prod()), ColVectorType::Ones(rows));\n\n  VERIFY_IS_APPROX(m1.block(0,0,0,cols).colwise().sum(), RowVectorType::Zero(cols));\n  VERIFY_IS_APPROX(m1.block(0,0,rows,0).rowwise().sum(), ColVectorType::Zero(rows));\n  VERIFY_IS_APPROX(m1.block(0,0,0,cols).colwise().prod(), RowVectorType::Ones(cols));\n  VERIFY_IS_APPROX(m1.block(0,0,rows,0).rowwise().prod(), ColVectorType::Ones(rows));\n  \n  // verify the const accessors exist\n  const Scalar& ref_m1 = m.matrix().array().coeffRef(0);\n  const Scalar& ref_m2 = m.matrix().array().coeffRef(0,0);\n  const Scalar& ref_a1 = m.array().matrix().coeffRef(0);\n  const Scalar& ref_a2 = m.array().matrix().coeffRef(0,0);\n  VERIFY(&ref_a1 == &ref_m1);\n  VERIFY(&ref_a2 == &ref_m2);\n\n  // Check write accessors:\n  m1.array().coeffRef(0,0) = 1;\n  VERIFY_IS_APPROX(m1(0,0),Scalar(1));\n  m1.array()(0,0) = 2;\n  VERIFY_IS_APPROX(m1(0,0),Scalar(2));\n  m1.array().matrix().coeffRef(0,0) = 3;\n  VERIFY_IS_APPROX(m1(0,0),Scalar(3));\n  m1.array().matrix()(0,0) = 4;\n  VERIFY_IS_APPROX(m1(0,0),Scalar(4));\n}\n\ntemplate<typename MatrixType> void comparisons(const MatrixType& m)\n{\n  using std::abs;\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  Index r = internal::random<Index>(0, rows-1),\n        c = internal::random<Index>(0, cols-1);\n\n  MatrixType m1 = MatrixType::Random(rows, cols),\n             m2 = MatrixType::Random(rows, cols),\n             m3(rows, cols);\n\n  VERIFY(((m1.array() + Scalar(1)) > m1.array()).all());\n  VERIFY(((m1.array() - Scalar(1)) < m1.array()).all());\n  if (rows*cols>1)\n  {\n    m3 = m1;\n    m3(r,c) += 1;\n    VERIFY(! (m1.array() < m3.array()).all() );\n    VERIFY(! (m1.array() > m3.array()).all() );\n  }\n\n  // comparisons to scalar\n  VERIFY( (m1.array() != (m1(r,c)+1) ).any() );\n  VERIFY( (m1.array() > (m1(r,c)-1) ).any() );\n  VERIFY( (m1.array() < (m1(r,c)+1) ).any() );\n  VERIFY( (m1.array() == m1(r,c) ).any() );\n  VERIFY( m1.cwiseEqual(m1(r,c)).any() );\n\n  // test Select\n  VERIFY_IS_APPROX( (m1.array()<m2.array()).select(m1,m2), m1.cwiseMin(m2) );\n  VERIFY_IS_APPROX( (m1.array()>m2.array()).select(m1,m2), m1.cwiseMax(m2) );\n  Scalar mid = (m1.cwiseAbs().minCoeff() + m1.cwiseAbs().maxCoeff())/Scalar(2);\n  for (int j=0; j<cols; ++j)\n  for (int i=0; i<rows; ++i)\n    m3(i,j) = abs(m1(i,j))<mid ? 0 : m1(i,j);\n  VERIFY_IS_APPROX( (m1.array().abs()<MatrixType::Constant(rows,cols,mid).array())\n                        .select(MatrixType::Zero(rows,cols),m1), m3);\n  // shorter versions:\n  VERIFY_IS_APPROX( (m1.array().abs()<MatrixType::Constant(rows,cols,mid).array())\n                        .select(0,m1), m3);\n  VERIFY_IS_APPROX( (m1.array().abs()>=MatrixType::Constant(rows,cols,mid).array())\n                        .select(m1,0), m3);\n  // even shorter version:\n  VERIFY_IS_APPROX( (m1.array().abs()<mid).select(0,m1), m3);\n\n  // count\n  VERIFY(((m1.array().abs()+1)>RealScalar(0.1)).count() == rows*cols);\n\n  // and/or\n  VERIFY( ((m1.array()<RealScalar(0)).matrix() && (m1.array()>RealScalar(0)).matrix()).count() == 0);\n  VERIFY( ((m1.array()<RealScalar(0)).matrix() || (m1.array()>=RealScalar(0)).matrix()).count() == rows*cols);\n  RealScalar a = m1.cwiseAbs().mean();\n  VERIFY( ((m1.array()<-a).matrix() || (m1.array()>a).matrix()).count() == (m1.cwiseAbs().array()>a).count());\n\n  typedef Matrix<Index, Dynamic, 1> VectorOfIndices;\n\n  // TODO allows colwise/rowwise for array\n  VERIFY_IS_APPROX(((m1.array().abs()+1)>RealScalar(0.1)).matrix().colwise().count(), VectorOfIndices::Constant(cols,rows).transpose());\n  VERIFY_IS_APPROX(((m1.array().abs()+1)>RealScalar(0.1)).matrix().rowwise().count(), VectorOfIndices::Constant(rows, cols));\n}\n\ntemplate<typename VectorType> void lpNorm(const VectorType& v)\n{\n  using std::sqrt;\n  typedef typename VectorType::RealScalar RealScalar;\n  VectorType u = VectorType::Random(v.size());\n\n  if(v.size()==0)\n  {\n    VERIFY_IS_APPROX(u.template lpNorm<Infinity>(), RealScalar(0));\n    VERIFY_IS_APPROX(u.template lpNorm<1>(), RealScalar(0));\n    VERIFY_IS_APPROX(u.template lpNorm<2>(), RealScalar(0));\n    VERIFY_IS_APPROX(u.template lpNorm<5>(), RealScalar(0));\n  }\n  else\n  {\n    VERIFY_IS_APPROX(u.template lpNorm<Infinity>(), u.cwiseAbs().maxCoeff());\n  }\n\n  VERIFY_IS_APPROX(u.template lpNorm<1>(), u.cwiseAbs().sum());\n  VERIFY_IS_APPROX(u.template lpNorm<2>(), sqrt(u.array().abs().square().sum()));\n  VERIFY_IS_APPROX(numext::pow(u.template lpNorm<5>(), typename VectorType::RealScalar(5)), u.array().abs().pow(5).sum());\n}\n\ntemplate<typename MatrixType> void cwise_min_max(const MatrixType& m)\n{\n  typedef typename MatrixType::Scalar Scalar;\n\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  MatrixType m1 = MatrixType::Random(rows, cols);\n\n  // min/max with array\n  Scalar maxM1 = m1.maxCoeff();\n  Scalar minM1 = m1.minCoeff();\n\n  VERIFY_IS_APPROX(MatrixType::Constant(rows,cols, minM1), m1.cwiseMin(MatrixType::Constant(rows,cols, minM1)));\n  VERIFY_IS_APPROX(m1, m1.cwiseMin(MatrixType::Constant(rows,cols, maxM1)));\n\n  VERIFY_IS_APPROX(MatrixType::Constant(rows,cols, maxM1), m1.cwiseMax(MatrixType::Constant(rows,cols, maxM1)));\n  VERIFY_IS_APPROX(m1, m1.cwiseMax(MatrixType::Constant(rows,cols, minM1)));\n\n  // min/max with scalar input\n  VERIFY_IS_APPROX(MatrixType::Constant(rows,cols, minM1), m1.cwiseMin( minM1));\n  VERIFY_IS_APPROX(m1, m1.cwiseMin(maxM1));\n  VERIFY_IS_APPROX(-m1, (-m1).cwiseMin(-minM1));\n  VERIFY_IS_APPROX(-m1.array(), ((-m1).array().min)( -minM1));\n\n  VERIFY_IS_APPROX(MatrixType::Constant(rows,cols, maxM1), m1.cwiseMax( maxM1));\n  VERIFY_IS_APPROX(m1, m1.cwiseMax(minM1));\n  VERIFY_IS_APPROX(-m1, (-m1).cwiseMax(-maxM1));\n  VERIFY_IS_APPROX(-m1.array(), ((-m1).array().max)(-maxM1));\n\n  VERIFY_IS_APPROX(MatrixType::Constant(rows,cols, minM1).array(), (m1.array().min)( minM1));\n  VERIFY_IS_APPROX(m1.array(), (m1.array().min)( maxM1));\n\n  VERIFY_IS_APPROX(MatrixType::Constant(rows,cols, maxM1).array(), (m1.array().max)( maxM1));\n  VERIFY_IS_APPROX(m1.array(), (m1.array().max)( minM1));\n\n}\n\ntemplate<typename MatrixTraits> void resize(const MatrixTraits& t)\n{\n  typedef typename MatrixTraits::Scalar Scalar;\n  typedef Matrix<Scalar,Dynamic,Dynamic> MatrixType;\n  typedef Array<Scalar,Dynamic,Dynamic> Array2DType;\n  typedef Matrix<Scalar,Dynamic,1> VectorType;\n  typedef Array<Scalar,Dynamic,1> Array1DType;\n\n  Index rows = t.rows(), cols = t.cols();\n\n  MatrixType m(rows,cols);\n  VectorType v(rows);\n  Array2DType a2(rows,cols);\n  Array1DType a1(rows);\n\n  m.array().resize(rows+1,cols+1);\n  VERIFY(m.rows()==rows+1 && m.cols()==cols+1);\n  a2.matrix().resize(rows+1,cols+1);\n  VERIFY(a2.rows()==rows+1 && a2.cols()==cols+1);\n  v.array().resize(cols);\n  VERIFY(v.size()==cols);\n  a1.matrix().resize(cols);\n  VERIFY(a1.size()==cols);\n}\n\ntemplate<int>\nvoid regression_bug_654()\n{\n  ArrayXf a = RowVectorXf(3);\n  VectorXf v = Array<float,1,Dynamic>(3);\n}\n\n// Check propagation of LvalueBit through Array/Matrix-Wrapper\ntemplate<int>\nvoid regrrssion_bug_1410()\n{\n  const Matrix4i M;\n  const Array4i A;\n  ArrayWrapper<const Matrix4i> MA = M.array();\n  MA.row(0);\n  MatrixWrapper<const Array4i> AM = A.matrix();\n  AM.row(0);\n\n  VERIFY((internal::traits<ArrayWrapper<const Matrix4i> >::Flags&LvalueBit)==0);\n  VERIFY((internal::traits<MatrixWrapper<const Array4i> >::Flags&LvalueBit)==0);\n\n  VERIFY((internal::traits<ArrayWrapper<Matrix4i> >::Flags&LvalueBit)==LvalueBit);\n  VERIFY((internal::traits<MatrixWrapper<Array4i> >::Flags&LvalueBit)==LvalueBit);\n}\n\nEIGEN_DECLARE_TEST(array_for_matrix)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( array_for_matrix(Matrix<float, 1, 1>()) );\n    CALL_SUBTEST_2( array_for_matrix(Matrix2f()) );\n    CALL_SUBTEST_3( array_for_matrix(Matrix4d()) );\n    CALL_SUBTEST_4( array_for_matrix(MatrixXcf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_5( array_for_matrix(MatrixXf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_6( array_for_matrix(MatrixXi(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n  }\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( comparisons(Matrix<float, 1, 1>()) );\n    CALL_SUBTEST_2( comparisons(Matrix2f()) );\n    CALL_SUBTEST_3( comparisons(Matrix4d()) );\n    CALL_SUBTEST_5( comparisons(MatrixXf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_6( comparisons(MatrixXi(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n  }\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( cwise_min_max(Matrix<float, 1, 1>()) );\n    CALL_SUBTEST_2( cwise_min_max(Matrix2f()) );\n    CALL_SUBTEST_3( cwise_min_max(Matrix4d()) );\n    CALL_SUBTEST_5( cwise_min_max(MatrixXf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_6( cwise_min_max(MatrixXi(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n  }\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( lpNorm(Matrix<float, 1, 1>()) );\n    CALL_SUBTEST_2( lpNorm(Vector2f()) );\n    CALL_SUBTEST_7( lpNorm(Vector3d()) );\n    CALL_SUBTEST_8( lpNorm(Vector4f()) );\n    CALL_SUBTEST_5( lpNorm(VectorXf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_4( lpNorm(VectorXcf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n  }\n  CALL_SUBTEST_5( lpNorm(VectorXf(0)) );\n  CALL_SUBTEST_4( lpNorm(VectorXcf(0)) );\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_4( resize(MatrixXcf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_5( resize(MatrixXf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_6( resize(MatrixXi(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n  }\n  CALL_SUBTEST_6( regression_bug_654<0>() );\n  CALL_SUBTEST_6( regrrssion_bug_1410<0>() );\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/array_of_string.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\nEIGEN_DECLARE_TEST(array_of_string)\n{\n  typedef Array<std::string,1,Dynamic> ArrayXs;\n  ArrayXs a1(3), a2(3), a3(3), a3ref(3);\n  a1 << \"one\", \"two\", \"three\";\n  a2 << \"1\", \"2\", \"3\";\n  a3ref << \"one (1)\", \"two (2)\", \"three (3)\";\n  std::stringstream s1;\n  s1 << a1;\n  VERIFY_IS_EQUAL(s1.str(), std::string(\"  one    two  three\"));\n  a3 = a1 + std::string(\" (\") + a2 + std::string(\")\");\n  VERIFY((a3==a3ref).all());\n\n  a3 = a1;\n  a3 += std::string(\" (\") + a2 + std::string(\")\");\n  VERIFY((a3==a3ref).all());\n\n  a1.swap(a3);\n  VERIFY((a1==a3ref).all());\n  VERIFY((a3!=a3ref).all());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/array_replicate.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\ntemplate<typename MatrixType> void replicate(const MatrixType& m)\n{\n  /* this test covers the following files:\n     Replicate.cpp\n  */\n  typedef typename MatrixType::Scalar Scalar;\n  typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;\n  typedef Matrix<Scalar, Dynamic, Dynamic> MatrixX;\n  typedef Matrix<Scalar, Dynamic, 1> VectorX;\n\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  MatrixType m1 = MatrixType::Random(rows, cols),\n             m2 = MatrixType::Random(rows, cols);\n\n  VectorType v1 = VectorType::Random(rows);\n\n  MatrixX x1, x2;\n  VectorX vx1;\n\n  int  f1 = internal::random<int>(1,10),\n       f2 = internal::random<int>(1,10);\n\n  x1.resize(rows*f1,cols*f2);\n  for(int j=0; j<f2; j++)\n  for(int i=0; i<f1; i++)\n    x1.block(i*rows,j*cols,rows,cols) = m1;\n  VERIFY_IS_APPROX(x1, m1.replicate(f1,f2));\n\n  x2.resize(2*rows,3*cols);\n  x2 << m2, m2, m2,\n        m2, m2, m2;\n  VERIFY_IS_APPROX(x2, (m2.template replicate<2,3>()));\n  \n  x2.resize(rows,3*cols);\n  x2 << m2, m2, m2;\n  VERIFY_IS_APPROX(x2, (m2.template replicate<1,3>()));\n  \n  vx1.resize(3*rows,cols);\n  vx1 << m2, m2, m2;\n  VERIFY_IS_APPROX(vx1+vx1, vx1+(m2.template replicate<3,1>()));\n  \n  vx1=m2+(m2.colwise().replicate(1));\n  \n  if(m2.cols()==1)\n    VERIFY_IS_APPROX(m2.coeff(0), (m2.template replicate<3,1>().coeff(m2.rows())));\n\n  x2.resize(rows,f1);\n  for (int j=0; j<f1; ++j)\n    x2.col(j) = v1;\n  VERIFY_IS_APPROX(x2, v1.rowwise().replicate(f1));\n\n  vx1.resize(rows*f2);\n  for (int j=0; j<f2; ++j)\n    vx1.segment(j*rows,rows) = v1;\n  VERIFY_IS_APPROX(vx1, v1.colwise().replicate(f2));\n}\n\nEIGEN_DECLARE_TEST(array_replicate)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( replicate(Matrix<float, 1, 1>()) );\n    CALL_SUBTEST_2( replicate(Vector2f()) );\n    CALL_SUBTEST_3( replicate(Vector3d()) );\n    CALL_SUBTEST_4( replicate(Vector4f()) );\n    CALL_SUBTEST_5( replicate(VectorXf(16)) );\n    CALL_SUBTEST_6( replicate(VectorXcd(10)) );\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/array_reverse.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2009 Ricard Marxer <email@ricardmarxer.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <iostream>\n\nusing namespace std;\n\ntemplate<typename MatrixType> void reverse(const MatrixType& m)\n{\n  typedef typename MatrixType::Scalar Scalar;\n  typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;\n\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  // this test relies a lot on Random.h, and there's not much more that we can do\n  // to test it, hence I consider that we will have tested Random.h\n  MatrixType m1 = MatrixType::Random(rows, cols), m2;\n  VectorType v1 = VectorType::Random(rows);\n\n  MatrixType m1_r = m1.reverse();\n  // Verify that MatrixBase::reverse() works\n  for ( int i = 0; i < rows; i++ ) {\n    for ( int j = 0; j < cols; j++ ) {\n      VERIFY_IS_APPROX(m1_r(i, j), m1(rows - 1 - i, cols - 1 - j));\n    }\n  }\n\n  Reverse<MatrixType> m1_rd(m1);\n  // Verify that a Reverse default (in both directions) of an expression works\n  for ( int i = 0; i < rows; i++ ) {\n    for ( int j = 0; j < cols; j++ ) {\n      VERIFY_IS_APPROX(m1_rd(i, j), m1(rows - 1 - i, cols - 1 - j));\n    }\n  }\n\n  Reverse<MatrixType, BothDirections> m1_rb(m1);\n  // Verify that a Reverse in both directions of an expression works\n  for ( int i = 0; i < rows; i++ ) {\n    for ( int j = 0; j < cols; j++ ) {\n      VERIFY_IS_APPROX(m1_rb(i, j), m1(rows - 1 - i, cols - 1 - j));\n    }\n  }\n\n  Reverse<MatrixType, Vertical> m1_rv(m1);\n  // Verify that a Reverse in the vertical directions of an expression works\n  for ( int i = 0; i < rows; i++ ) {\n    for ( int j = 0; j < cols; j++ ) {\n      VERIFY_IS_APPROX(m1_rv(i, j), m1(rows - 1 - i, j));\n    }\n  }\n\n  Reverse<MatrixType, Horizontal> m1_rh(m1);\n  // Verify that a Reverse in the horizontal directions of an expression works\n  for ( int i = 0; i < rows; i++ ) {\n    for ( int j = 0; j < cols; j++ ) {\n      VERIFY_IS_APPROX(m1_rh(i, j), m1(i, cols - 1 - j));\n    }\n  }\n\n  VectorType v1_r = v1.reverse();\n  // Verify that a VectorType::reverse() of an expression works\n  for ( int i = 0; i < rows; i++ ) {\n    VERIFY_IS_APPROX(v1_r(i), v1(rows - 1 - i));\n  }\n\n  MatrixType m1_cr = m1.colwise().reverse();\n  // Verify that PartialRedux::reverse() works (for colwise())\n  for ( int i = 0; i < rows; i++ ) {\n    for ( int j = 0; j < cols; j++ ) {\n      VERIFY_IS_APPROX(m1_cr(i, j), m1(rows - 1 - i, j));\n    }\n  }\n\n  MatrixType m1_rr = m1.rowwise().reverse();\n  // Verify that PartialRedux::reverse() works (for rowwise())\n  for ( int i = 0; i < rows; i++ ) {\n    for ( int j = 0; j < cols; j++ ) {\n      VERIFY_IS_APPROX(m1_rr(i, j), m1(i, cols - 1 - j));\n    }\n  }\n\n  Scalar x = internal::random<Scalar>();\n\n  Index r = internal::random<Index>(0, rows-1),\n        c = internal::random<Index>(0, cols-1);\n\n  m1.reverse()(r, c) = x;\n  VERIFY_IS_APPROX(x, m1(rows - 1 - r, cols - 1 - c));\n  \n  m2 = m1;\n  m2.reverseInPlace();\n  VERIFY_IS_APPROX(m2,m1.reverse().eval());\n  \n  m2 = m1;\n  m2.col(0).reverseInPlace();\n  VERIFY_IS_APPROX(m2.col(0),m1.col(0).reverse().eval());\n  \n  m2 = m1;\n  m2.row(0).reverseInPlace();\n  VERIFY_IS_APPROX(m2.row(0),m1.row(0).reverse().eval());\n  \n  m2 = m1;\n  m2.rowwise().reverseInPlace();\n  VERIFY_IS_APPROX(m2,m1.rowwise().reverse().eval());\n  \n  m2 = m1;\n  m2.colwise().reverseInPlace();\n  VERIFY_IS_APPROX(m2,m1.colwise().reverse().eval());\n\n  m1.colwise().reverse()(r, c) = x;\n  VERIFY_IS_APPROX(x, m1(rows - 1 - r, c));\n\n  m1.rowwise().reverse()(r, c) = x;\n  VERIFY_IS_APPROX(x, m1(r, cols - 1 - c));\n}\n\ntemplate<int>\nvoid array_reverse_extra()\n{\n  Vector4f x; x << 1, 2, 3, 4;\n  Vector4f y; y << 4, 3, 2, 1;\n  VERIFY(x.reverse()[1] == 3);\n  VERIFY(x.reverse() == y);\n}\n\n// Simpler version of reverseInPlace leveraging a bug\n// in clang 6/7 with -O2 and AVX or AVX512 enabled.\n// This simpler version ensure that the clang bug is not simply hidden\n// through mis-inlining of reverseInPlace or other minor changes.\ntemplate<typename MatrixType>\nEIGEN_DONT_INLINE\nvoid bug1684_job1(MatrixType& m1, MatrixType& m2)\n{\n  m2 = m1;\n  m2.col(0).swap(m2.col(3));\n  m2.col(1).swap(m2.col(2));\n}\n\ntemplate<typename MatrixType>\nEIGEN_DONT_INLINE\nvoid bug1684_job2(MatrixType& m1, MatrixType& m2)\n{\n  m2 = m1; // load m1/m2 in AVX registers\n  m1.col(0) = m2.col(3); // perform 128 bits moves\n  m1.col(1) = m2.col(2);\n  m1.col(2) = m2.col(1);\n  m1.col(3) = m2.col(0);\n}\n\ntemplate<typename MatrixType>\nEIGEN_DONT_INLINE\nvoid bug1684_job3(MatrixType& m1, MatrixType& m2)\n{\n  m2 = m1;\n  Vector4f tmp;\n  tmp = m2.col(0);\n  m2.col(0) = m2.col(3);\n  m2.col(3) = tmp;\n  tmp = m2.col(1);\n  m2.col(1) = m2.col(2);\n  m2.col(2) = tmp;\n  \n}\n\ntemplate<int>\nvoid bug1684()\n{\n  Matrix4f m1 = Matrix4f::Random();\n  Matrix4f m2 = Matrix4f::Random();\n  bug1684_job1(m1,m2);\n  VERIFY_IS_APPROX(m2, m1.rowwise().reverse().eval());\n  bug1684_job2(m1,m2);\n  VERIFY_IS_APPROX(m2, m1.rowwise().reverse().eval());\n  // This one still fail after our swap's workaround,\n  // but I expect users not to implement their own swap.\n  // bug1684_job3(m1,m2);\n  // VERIFY_IS_APPROX(m2, m1.rowwise().reverse().eval());\n}\n\nEIGEN_DECLARE_TEST(array_reverse)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( reverse(Matrix<float, 1, 1>()) );\n    CALL_SUBTEST_2( reverse(Matrix2f()) );\n    CALL_SUBTEST_3( reverse(Matrix4f()) );\n    CALL_SUBTEST_4( reverse(Matrix4d()) );\n    CALL_SUBTEST_5( reverse(MatrixXcf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_6( reverse(MatrixXi(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_7( reverse(MatrixXcd(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_8( reverse(Matrix<float, 100, 100>()) );\n    CALL_SUBTEST_9( reverse(Matrix<float,Dynamic,Dynamic,RowMajor>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_3( bug1684<0>() );\n  }\n  CALL_SUBTEST_3( array_reverse_extra<0>() );\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/bandmatrix.cpp",
    "content": "// This file is triangularView of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\ntemplate<typename MatrixType> void bandmatrix(const MatrixType& _m)\n{\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  typedef Matrix<Scalar,Dynamic,Dynamic> DenseMatrixType;\n\n  Index rows = _m.rows();\n  Index cols = _m.cols();\n  Index supers = _m.supers();\n  Index subs = _m.subs();\n\n  MatrixType m(rows,cols,supers,subs);\n\n  DenseMatrixType dm1(rows,cols);\n  dm1.setZero();\n\n  m.diagonal().setConstant(123);\n  dm1.diagonal().setConstant(123);\n  for (int i=1; i<=m.supers();++i)\n  {\n    m.diagonal(i).setConstant(static_cast<RealScalar>(i));\n    dm1.diagonal(i).setConstant(static_cast<RealScalar>(i));\n  }\n  for (int i=1; i<=m.subs();++i)\n  {\n    m.diagonal(-i).setConstant(-static_cast<RealScalar>(i));\n    dm1.diagonal(-i).setConstant(-static_cast<RealScalar>(i));\n  }\n  //std::cerr << m.m_data << \"\\n\\n\" << m.toDense() << \"\\n\\n\" << dm1 << \"\\n\\n\\n\\n\";\n  VERIFY_IS_APPROX(dm1,m.toDenseMatrix());\n\n  for (int i=0; i<cols; ++i)\n  {\n    m.col(i).setConstant(static_cast<RealScalar>(i+1));\n    dm1.col(i).setConstant(static_cast<RealScalar>(i+1));\n  }\n  Index d = (std::min)(rows,cols);\n  Index a = std::max<Index>(0,cols-d-supers);\n  Index b = std::max<Index>(0,rows-d-subs);\n  if(a>0) dm1.block(0,d+supers,rows,a).setZero();\n  dm1.block(0,supers+1,cols-supers-1-a,cols-supers-1-a).template triangularView<Upper>().setZero();\n  dm1.block(subs+1,0,rows-subs-1-b,rows-subs-1-b).template triangularView<Lower>().setZero();\n  if(b>0) dm1.block(d+subs,0,b,cols).setZero();\n  //std::cerr << m.m_data << \"\\n\\n\" << m.toDense() << \"\\n\\n\" << dm1 << \"\\n\\n\";\n  VERIFY_IS_APPROX(dm1,m.toDenseMatrix());\n\n}\n\nusing Eigen::internal::BandMatrix;\n\nEIGEN_DECLARE_TEST(bandmatrix)\n{\n  for(int i = 0; i < 10*g_repeat ; i++) {\n    Index rows = internal::random<Index>(1,10);\n    Index cols = internal::random<Index>(1,10);\n    Index sups = internal::random<Index>(0,cols-1);\n    Index subs = internal::random<Index>(0,rows-1);\n    CALL_SUBTEST(bandmatrix(BandMatrix<float>(rows,cols,sups,subs)) );\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/basicstuff.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_NO_STATIC_ASSERT\n\n#include \"main.h\"\n\ntemplate<typename MatrixType> void basicStuff(const MatrixType& m)\n{\n  typedef typename MatrixType::Scalar Scalar;\n  typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;\n  typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime> SquareMatrixType;\n\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  // this test relies a lot on Random.h, and there's not much more that we can do\n  // to test it, hence I consider that we will have tested Random.h\n  MatrixType m1 = MatrixType::Random(rows, cols),\n             m2 = MatrixType::Random(rows, cols),\n             m3(rows, cols),\n             mzero = MatrixType::Zero(rows, cols),\n             square = Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime>::Random(rows, rows);\n  VectorType v1 = VectorType::Random(rows),\n             vzero = VectorType::Zero(rows);\n  SquareMatrixType sm1 = SquareMatrixType::Random(rows,rows), sm2(rows,rows);\n\n  Scalar x = 0;\n  while(x == Scalar(0)) x = internal::random<Scalar>();\n\n  Index r = internal::random<Index>(0, rows-1),\n        c = internal::random<Index>(0, cols-1);\n\n  m1.coeffRef(r,c) = x;\n  VERIFY_IS_APPROX(x, m1.coeff(r,c));\n  m1(r,c) = x;\n  VERIFY_IS_APPROX(x, m1(r,c));\n  v1.coeffRef(r) = x;\n  VERIFY_IS_APPROX(x, v1.coeff(r));\n  v1(r) = x;\n  VERIFY_IS_APPROX(x, v1(r));\n  v1[r] = x;\n  VERIFY_IS_APPROX(x, v1[r]);\n\n  // test fetching with various index types.\n  Index r1 = internal::random<Index>(0, numext::mini(Index(127),rows-1));\n  x = v1(static_cast<char>(r1));\n  x = v1(static_cast<signed char>(r1));\n  x = v1(static_cast<unsigned char>(r1));\n  x = v1(static_cast<signed short>(r1));\n  x = v1(static_cast<unsigned short>(r1));\n  x = v1(static_cast<signed int>(r1));\n  x = v1(static_cast<unsigned int>(r1));\n  x = v1(static_cast<signed long>(r1));\n  x = v1(static_cast<unsigned long>(r1));\n#if EIGEN_HAS_CXX11\n  x = v1(static_cast<long long int>(r1));\n  x = v1(static_cast<unsigned long long int>(r1));\n#endif\n\n  VERIFY_IS_APPROX(               v1,    v1);\n  VERIFY_IS_NOT_APPROX(           v1,    2*v1);\n  VERIFY_IS_MUCH_SMALLER_THAN(    vzero, v1);\n  VERIFY_IS_MUCH_SMALLER_THAN(  vzero, v1.squaredNorm());\n  VERIFY_IS_NOT_MUCH_SMALLER_THAN(v1,    v1);\n  VERIFY_IS_APPROX(               vzero, v1-v1);\n  VERIFY_IS_APPROX(               m1,    m1);\n  VERIFY_IS_NOT_APPROX(           m1,    2*m1);\n  VERIFY_IS_MUCH_SMALLER_THAN(    mzero, m1);\n  VERIFY_IS_NOT_MUCH_SMALLER_THAN(m1,    m1);\n  VERIFY_IS_APPROX(               mzero, m1-m1);\n\n  // always test operator() on each read-only expression class,\n  // in order to check const-qualifiers.\n  // indeed, if an expression class (here Zero) is meant to be read-only,\n  // hence has no _write() method, the corresponding MatrixBase method (here zero())\n  // should return a const-qualified object so that it is the const-qualified\n  // operator() that gets called, which in turn calls _read().\n  VERIFY_IS_MUCH_SMALLER_THAN(MatrixType::Zero(rows,cols)(r,c), static_cast<Scalar>(1));\n\n  // now test copying a row-vector into a (column-)vector and conversely.\n  square.col(r) = square.row(r).eval();\n  Matrix<Scalar, 1, MatrixType::RowsAtCompileTime> rv(rows);\n  Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> cv(rows);\n  rv = square.row(r);\n  cv = square.col(r);\n  \n  VERIFY_IS_APPROX(rv, cv.transpose());\n\n  if(cols!=1 && rows!=1 && MatrixType::SizeAtCompileTime!=Dynamic)\n  {\n    VERIFY_RAISES_ASSERT(m1 = (m2.block(0,0, rows-1, cols-1)));\n  }\n\n  if(cols!=1 && rows!=1)\n  {\n    VERIFY_RAISES_ASSERT(m1[0]);\n    VERIFY_RAISES_ASSERT((m1+m1)[0]);\n  }\n\n  VERIFY_IS_APPROX(m3 = m1,m1);\n  MatrixType m4;\n  VERIFY_IS_APPROX(m4 = m1,m1);\n\n  m3.real() = m1.real();\n  VERIFY_IS_APPROX(static_cast<const MatrixType&>(m3).real(), static_cast<const MatrixType&>(m1).real());\n  VERIFY_IS_APPROX(static_cast<const MatrixType&>(m3).real(), m1.real());\n\n  // check == / != operators\n  VERIFY(m1==m1);\n  VERIFY(m1!=m2);\n  VERIFY(!(m1==m2));\n  VERIFY(!(m1!=m1));\n  m1 = m2;\n  VERIFY(m1==m2);\n  VERIFY(!(m1!=m2));\n  \n  // check automatic transposition\n  sm2.setZero();\n  for(Index i=0;i<rows;++i)\n    sm2.col(i) = sm1.row(i);\n  VERIFY_IS_APPROX(sm2,sm1.transpose());\n  \n  sm2.setZero();\n  for(Index i=0;i<rows;++i)\n    sm2.col(i).noalias() = sm1.row(i);\n  VERIFY_IS_APPROX(sm2,sm1.transpose());\n  \n  sm2.setZero();\n  for(Index i=0;i<rows;++i)\n    sm2.col(i).noalias() += sm1.row(i);\n  VERIFY_IS_APPROX(sm2,sm1.transpose());\n  \n  sm2.setZero();\n  for(Index i=0;i<rows;++i)\n    sm2.col(i).noalias() -= sm1.row(i);\n  VERIFY_IS_APPROX(sm2,-sm1.transpose());\n  \n  // check ternary usage\n  {\n    bool b = internal::random<int>(0,10)>5;\n    m3 = b ? m1 : m2;\n    if(b) VERIFY_IS_APPROX(m3,m1);\n    else  VERIFY_IS_APPROX(m3,m2);\n    m3 = b ? -m1 : m2;\n    if(b) VERIFY_IS_APPROX(m3,-m1);\n    else  VERIFY_IS_APPROX(m3,m2);\n    m3 = b ? m1 : -m2;\n    if(b) VERIFY_IS_APPROX(m3,m1);\n    else  VERIFY_IS_APPROX(m3,-m2);\n  }\n}\n\ntemplate<typename MatrixType> void basicStuffComplex(const MatrixType& m)\n{\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  typedef Matrix<RealScalar, MatrixType::RowsAtCompileTime, MatrixType::ColsAtCompileTime> RealMatrixType;\n\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  Scalar s1 = internal::random<Scalar>(),\n         s2 = internal::random<Scalar>();\n\n  VERIFY(numext::real(s1)==numext::real_ref(s1));\n  VERIFY(numext::imag(s1)==numext::imag_ref(s1));\n  numext::real_ref(s1) = numext::real(s2);\n  numext::imag_ref(s1) = numext::imag(s2);\n  VERIFY(internal::isApprox(s1, s2, NumTraits<RealScalar>::epsilon()));\n  // extended precision in Intel FPUs means that s1 == s2 in the line above is not guaranteed.\n\n  RealMatrixType rm1 = RealMatrixType::Random(rows,cols),\n                 rm2 = RealMatrixType::Random(rows,cols);\n  MatrixType cm(rows,cols);\n  cm.real() = rm1;\n  cm.imag() = rm2;\n  VERIFY_IS_APPROX(static_cast<const MatrixType&>(cm).real(), rm1);\n  VERIFY_IS_APPROX(static_cast<const MatrixType&>(cm).imag(), rm2);\n  rm1.setZero();\n  rm2.setZero();\n  rm1 = cm.real();\n  rm2 = cm.imag();\n  VERIFY_IS_APPROX(static_cast<const MatrixType&>(cm).real(), rm1);\n  VERIFY_IS_APPROX(static_cast<const MatrixType&>(cm).imag(), rm2);\n  cm.real().setZero();\n  VERIFY(static_cast<const MatrixType&>(cm).real().isZero());\n  VERIFY(!static_cast<const MatrixType&>(cm).imag().isZero());\n}\n\ntemplate<int>\nvoid casting()\n{\n  Matrix4f m = Matrix4f::Random(), m2;\n  Matrix4d n = m.cast<double>();\n  VERIFY(m.isApprox(n.cast<float>()));\n  m2 = m.cast<float>(); // check the specialization when NewType == Type\n  VERIFY(m.isApprox(m2));\n}\n\ntemplate <typename Scalar>\nvoid fixedSizeMatrixConstruction()\n{\n  Scalar raw[4];\n  for(int k=0; k<4; ++k)\n    raw[k] = internal::random<Scalar>();\n  \n  {\n    Matrix<Scalar,4,1> m(raw);\n    Array<Scalar,4,1> a(raw);\n    for(int k=0; k<4; ++k) VERIFY(m(k) == raw[k]);\n    for(int k=0; k<4; ++k) VERIFY(a(k) == raw[k]);    \n    VERIFY_IS_EQUAL(m,(Matrix<Scalar,4,1>(raw[0],raw[1],raw[2],raw[3])));\n    VERIFY((a==(Array<Scalar,4,1>(raw[0],raw[1],raw[2],raw[3]))).all());\n  }\n  {\n    Matrix<Scalar,3,1> m(raw);\n    Array<Scalar,3,1> a(raw);\n    for(int k=0; k<3; ++k) VERIFY(m(k) == raw[k]);\n    for(int k=0; k<3; ++k) VERIFY(a(k) == raw[k]);\n    VERIFY_IS_EQUAL(m,(Matrix<Scalar,3,1>(raw[0],raw[1],raw[2])));\n    VERIFY((a==Array<Scalar,3,1>(raw[0],raw[1],raw[2])).all());\n  }\n  {\n    Matrix<Scalar,2,1> m(raw), m2( (DenseIndex(raw[0])), (DenseIndex(raw[1])) );\n    Array<Scalar,2,1> a(raw),  a2( (DenseIndex(raw[0])), (DenseIndex(raw[1])) );\n    for(int k=0; k<2; ++k) VERIFY(m(k) == raw[k]);\n    for(int k=0; k<2; ++k) VERIFY(a(k) == raw[k]);\n    VERIFY_IS_EQUAL(m,(Matrix<Scalar,2,1>(raw[0],raw[1])));\n    VERIFY((a==Array<Scalar,2,1>(raw[0],raw[1])).all());\n    for(int k=0; k<2; ++k) VERIFY(m2(k) == DenseIndex(raw[k]));\n    for(int k=0; k<2; ++k) VERIFY(a2(k) == DenseIndex(raw[k]));\n  }\n  {\n    Matrix<Scalar,1,2> m(raw),\n                       m2( (DenseIndex(raw[0])), (DenseIndex(raw[1])) ),\n                       m3( (int(raw[0])), (int(raw[1])) ),\n                       m4( (float(raw[0])), (float(raw[1])) );\n    Array<Scalar,1,2> a(raw),  a2( (DenseIndex(raw[0])), (DenseIndex(raw[1])) );\n    for(int k=0; k<2; ++k) VERIFY(m(k) == raw[k]);\n    for(int k=0; k<2; ++k) VERIFY(a(k) == raw[k]);\n    VERIFY_IS_EQUAL(m,(Matrix<Scalar,1,2>(raw[0],raw[1])));\n    VERIFY((a==Array<Scalar,1,2>(raw[0],raw[1])).all());\n    for(int k=0; k<2; ++k) VERIFY(m2(k) == DenseIndex(raw[k]));\n    for(int k=0; k<2; ++k) VERIFY(a2(k) == DenseIndex(raw[k]));\n    for(int k=0; k<2; ++k) VERIFY(m3(k) == int(raw[k]));\n    for(int k=0; k<2; ++k) VERIFY((m4(k)) == Scalar(float(raw[k])));\n  }\n  {\n    Matrix<Scalar,1,1> m(raw), m1(raw[0]), m2( (DenseIndex(raw[0])) ), m3( (int(raw[0])) );\n    Array<Scalar,1,1> a(raw), a1(raw[0]), a2( (DenseIndex(raw[0])) );\n    VERIFY(m(0) == raw[0]);\n    VERIFY(a(0) == raw[0]);\n    VERIFY(m1(0) == raw[0]);\n    VERIFY(a1(0) == raw[0]);\n    VERIFY(m2(0) == DenseIndex(raw[0]));\n    VERIFY(a2(0) == DenseIndex(raw[0]));\n    VERIFY(m3(0) == int(raw[0]));\n    VERIFY_IS_EQUAL(m,(Matrix<Scalar,1,1>(raw[0])));\n    VERIFY((a==Array<Scalar,1,1>(raw[0])).all());\n  }\n}\n\nEIGEN_DECLARE_TEST(basicstuff)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( basicStuff(Matrix<float, 1, 1>()) );\n    CALL_SUBTEST_2( basicStuff(Matrix4d()) );\n    CALL_SUBTEST_3( basicStuff(MatrixXcf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_4( basicStuff(MatrixXi(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_5( basicStuff(MatrixXcd(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_6( basicStuff(Matrix<float, 100, 100>()) );\n    CALL_SUBTEST_7( basicStuff(Matrix<long double,Dynamic,Dynamic>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE),internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n\n    CALL_SUBTEST_3( basicStuffComplex(MatrixXcf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_5( basicStuffComplex(MatrixXcd(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n  }\n\n  CALL_SUBTEST_1(fixedSizeMatrixConstruction<unsigned char>());\n  CALL_SUBTEST_1(fixedSizeMatrixConstruction<float>());\n  CALL_SUBTEST_1(fixedSizeMatrixConstruction<double>());\n  CALL_SUBTEST_1(fixedSizeMatrixConstruction<int>());\n  CALL_SUBTEST_1(fixedSizeMatrixConstruction<long int>());\n  CALL_SUBTEST_1(fixedSizeMatrixConstruction<std::ptrdiff_t>());\n\n  CALL_SUBTEST_2(casting<0>());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/bdcsvd.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2013 Gauthier Brun <brun.gauthier@gmail.com>\n// Copyright (C) 2013 Nicolas Carre <nicolas.carre@ensimag.fr>\n// Copyright (C) 2013 Jean Ceccato <jean.ceccato@ensimag.fr>\n// Copyright (C) 2013 Pierre Zoppitelli <pierre.zoppitelli@ensimag.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/\n\n// discard stack allocation as that too bypasses malloc\n#define EIGEN_STACK_ALLOCATION_LIMIT 0\n#define EIGEN_RUNTIME_NO_MALLOC\n\n#include \"main.h\"\n#include <Eigen/SVD>\n#include <iostream>\n#include <Eigen/LU>\n\n\n#define SVD_DEFAULT(M) BDCSVD<M>\n#define SVD_FOR_MIN_NORM(M) BDCSVD<M>\n#include \"svd_common.h\"\n\n// Check all variants of JacobiSVD\ntemplate<typename MatrixType>\nvoid bdcsvd(const MatrixType& a = MatrixType(), bool pickrandom = true)\n{\n  MatrixType m;\n  if(pickrandom) {\n    m.resizeLike(a);\n    svd_fill_random(m);\n  }\n  else\n    m = a;\n\n  CALL_SUBTEST(( svd_test_all_computation_options<BDCSVD<MatrixType> >(m, false)  ));\n}\n\ntemplate<typename MatrixType>\nvoid bdcsvd_method()\n{\n  enum { Size = MatrixType::RowsAtCompileTime };\n  typedef typename MatrixType::RealScalar RealScalar;\n  typedef Matrix<RealScalar, Size, 1> RealVecType;\n  MatrixType m = MatrixType::Identity();\n  VERIFY_IS_APPROX(m.bdcSvd().singularValues(), RealVecType::Ones());\n  VERIFY_RAISES_ASSERT(m.bdcSvd().matrixU());\n  VERIFY_RAISES_ASSERT(m.bdcSvd().matrixV());\n  VERIFY_IS_APPROX(m.bdcSvd(ComputeFullU|ComputeFullV).solve(m), m);\n  VERIFY_IS_APPROX(m.bdcSvd(ComputeFullU|ComputeFullV).transpose().solve(m), m);\n  VERIFY_IS_APPROX(m.bdcSvd(ComputeFullU|ComputeFullV).adjoint().solve(m), m);\n}\n\n// compare the Singular values returned with Jacobi and Bdc\ntemplate<typename MatrixType> \nvoid compare_bdc_jacobi(const MatrixType& a = MatrixType(), unsigned int computationOptions = 0)\n{\n  MatrixType m = MatrixType::Random(a.rows(), a.cols());\n  BDCSVD<MatrixType> bdc_svd(m);\n  JacobiSVD<MatrixType> jacobi_svd(m);\n  VERIFY_IS_APPROX(bdc_svd.singularValues(), jacobi_svd.singularValues());\n  if(computationOptions & ComputeFullU) VERIFY_IS_APPROX(bdc_svd.matrixU(), jacobi_svd.matrixU());\n  if(computationOptions & ComputeThinU) VERIFY_IS_APPROX(bdc_svd.matrixU(), jacobi_svd.matrixU());\n  if(computationOptions & ComputeFullV) VERIFY_IS_APPROX(bdc_svd.matrixV(), jacobi_svd.matrixV());\n  if(computationOptions & ComputeThinV) VERIFY_IS_APPROX(bdc_svd.matrixV(), jacobi_svd.matrixV());\n}\n\nEIGEN_DECLARE_TEST(bdcsvd)\n{\n  CALL_SUBTEST_3(( svd_verify_assert<BDCSVD<Matrix3f>  >(Matrix3f()) ));\n  CALL_SUBTEST_4(( svd_verify_assert<BDCSVD<Matrix4d>  >(Matrix4d()) ));\n  CALL_SUBTEST_7(( svd_verify_assert<BDCSVD<MatrixXf>  >(MatrixXf(10,12)) ));\n  CALL_SUBTEST_8(( svd_verify_assert<BDCSVD<MatrixXcd> >(MatrixXcd(7,5)) ));\n  \n  CALL_SUBTEST_101(( svd_all_trivial_2x2(bdcsvd<Matrix2cd>) ));\n  CALL_SUBTEST_102(( svd_all_trivial_2x2(bdcsvd<Matrix2d>) ));\n\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_3(( bdcsvd<Matrix3f>() ));\n    CALL_SUBTEST_4(( bdcsvd<Matrix4d>() ));\n    CALL_SUBTEST_5(( bdcsvd<Matrix<float,3,5> >() ));\n\n    int r = internal::random<int>(1, EIGEN_TEST_MAX_SIZE/2),\n        c = internal::random<int>(1, EIGEN_TEST_MAX_SIZE/2);\n    \n    TEST_SET_BUT_UNUSED_VARIABLE(r)\n    TEST_SET_BUT_UNUSED_VARIABLE(c)\n    \n    CALL_SUBTEST_6((  bdcsvd(Matrix<double,Dynamic,2>(r,2)) ));\n    CALL_SUBTEST_7((  bdcsvd(MatrixXf(r,c)) ));\n    CALL_SUBTEST_7((  compare_bdc_jacobi(MatrixXf(r,c)) ));\n    CALL_SUBTEST_10(( bdcsvd(MatrixXd(r,c)) ));\n    CALL_SUBTEST_10(( compare_bdc_jacobi(MatrixXd(r,c)) ));\n    CALL_SUBTEST_8((  bdcsvd(MatrixXcd(r,c)) ));\n    CALL_SUBTEST_8((  compare_bdc_jacobi(MatrixXcd(r,c)) ));\n\n    // Test on inf/nan matrix\n    CALL_SUBTEST_7(  (svd_inf_nan<BDCSVD<MatrixXf>, MatrixXf>()) );\n    CALL_SUBTEST_10( (svd_inf_nan<BDCSVD<MatrixXd>, MatrixXd>()) );\n  }\n\n  // test matrixbase method\n  CALL_SUBTEST_1(( bdcsvd_method<Matrix2cd>() ));\n  CALL_SUBTEST_3(( bdcsvd_method<Matrix3f>() ));\n\n  // Test problem size constructors\n  CALL_SUBTEST_7( BDCSVD<MatrixXf>(10,10) );\n\n  // Check that preallocation avoids subsequent mallocs\n  // Disabled because not supported by BDCSVD\n  // CALL_SUBTEST_9( svd_preallocate<void>() );\n\n  CALL_SUBTEST_2( svd_underoverflow<void>() );\n}\n\n"
  },
  {
    "path": "3rdparty/eigen3/test/bicgstab.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2011 Gael Guennebaud <g.gael@free.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"sparse_solver.h\"\n#include <Eigen/IterativeLinearSolvers>\n\ntemplate<typename T, typename I_> void test_bicgstab_T()\n{\n  BiCGSTAB<SparseMatrix<T,0,I_>, DiagonalPreconditioner<T> >     bicgstab_colmajor_diag;\n  BiCGSTAB<SparseMatrix<T,0,I_>, IdentityPreconditioner    >     bicgstab_colmajor_I;\n  BiCGSTAB<SparseMatrix<T,0,I_>, IncompleteLUT<T,I_> >              bicgstab_colmajor_ilut;\n  //BiCGSTAB<SparseMatrix<T>, SSORPreconditioner<T> >     bicgstab_colmajor_ssor;\n\n  bicgstab_colmajor_diag.setTolerance(NumTraits<T>::epsilon()*4);\n  bicgstab_colmajor_ilut.setTolerance(NumTraits<T>::epsilon()*4);\n  \n  CALL_SUBTEST( check_sparse_square_solving(bicgstab_colmajor_diag)  );\n//   CALL_SUBTEST( check_sparse_square_solving(bicgstab_colmajor_I)     );\n  CALL_SUBTEST( check_sparse_square_solving(bicgstab_colmajor_ilut)     );\n  //CALL_SUBTEST( check_sparse_square_solving(bicgstab_colmajor_ssor)     );\n}\n\nEIGEN_DECLARE_TEST(bicgstab)\n{\n  CALL_SUBTEST_1((test_bicgstab_T<double,int>()) );\n  CALL_SUBTEST_2((test_bicgstab_T<std::complex<double>, int>()));\n  CALL_SUBTEST_3((test_bicgstab_T<double,long int>()));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/block.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2010 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_NO_STATIC_ASSERT // otherwise we fail at compile time on unused paths\n#include \"main.h\"\n\ntemplate<typename MatrixType, typename Index, typename Scalar>\ntypename Eigen::internal::enable_if<!NumTraits<typename MatrixType::Scalar>::IsComplex,typename MatrixType::Scalar>::type\nblock_real_only(const MatrixType &m1, Index r1, Index r2, Index c1, Index c2, const Scalar& s1) {\n  // check cwise-Functions:\n  VERIFY_IS_APPROX(m1.row(r1).cwiseMax(s1), m1.cwiseMax(s1).row(r1));\n  VERIFY_IS_APPROX(m1.col(c1).cwiseMin(s1), m1.cwiseMin(s1).col(c1));\n\n  VERIFY_IS_APPROX(m1.block(r1,c1,r2-r1+1,c2-c1+1).cwiseMin(s1), m1.cwiseMin(s1).block(r1,c1,r2-r1+1,c2-c1+1));\n  VERIFY_IS_APPROX(m1.block(r1,c1,r2-r1+1,c2-c1+1).cwiseMax(s1), m1.cwiseMax(s1).block(r1,c1,r2-r1+1,c2-c1+1));\n  \n  return Scalar(0);\n}\n\ntemplate<typename MatrixType, typename Index, typename Scalar>\ntypename Eigen::internal::enable_if<NumTraits<typename MatrixType::Scalar>::IsComplex,typename MatrixType::Scalar>::type\nblock_real_only(const MatrixType &, Index, Index, Index, Index, const Scalar&) {\n  return Scalar(0);\n}\n\n// Check at compile-time that T1==T2, and at runtime-time that a==b\ntemplate<typename T1,typename T2>\ntypename internal::enable_if<internal::is_same<T1,T2>::value,bool>::type\nis_same_block(const T1& a, const T2& b)\n{\n  return a.isApprox(b);\n}\n\ntemplate<typename MatrixType> void block(const MatrixType& m)\n{\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename MatrixType::RealScalar RealScalar;\n  typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;\n  typedef Matrix<Scalar, 1, MatrixType::ColsAtCompileTime> RowVectorType;\n  typedef Matrix<Scalar, Dynamic, Dynamic, MatrixType::IsRowMajor?RowMajor:ColMajor> DynamicMatrixType;\n  typedef Matrix<Scalar, Dynamic, 1> DynamicVectorType;\n  \n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  MatrixType m1 = MatrixType::Random(rows, cols),\n             m1_copy = m1,\n             m2 = MatrixType::Random(rows, cols),\n             m3(rows, cols),\n             ones = MatrixType::Ones(rows, cols);\n  VectorType v1 = VectorType::Random(rows);\n\n  Scalar s1 = internal::random<Scalar>();\n\n  Index r1 = internal::random<Index>(0,rows-1);\n  Index r2 = internal::random<Index>(r1,rows-1);\n  Index c1 = internal::random<Index>(0,cols-1);\n  Index c2 = internal::random<Index>(c1,cols-1);\n\n  block_real_only(m1, r1, r2, c1, c1, s1);\n\n  //check row() and col()\n  VERIFY_IS_EQUAL(m1.col(c1).transpose(), m1.transpose().row(c1));\n  //check operator(), both constant and non-constant, on row() and col()\n  m1 = m1_copy;\n  m1.row(r1) += s1 * m1_copy.row(r2);\n  VERIFY_IS_APPROX(m1.row(r1), m1_copy.row(r1) + s1 * m1_copy.row(r2));\n  // check nested block xpr on lhs\n  m1.row(r1).row(0) += s1 * m1_copy.row(r2);\n  VERIFY_IS_APPROX(m1.row(r1), m1_copy.row(r1) + Scalar(2) * s1 * m1_copy.row(r2));\n  m1 = m1_copy;\n  m1.col(c1) += s1 * m1_copy.col(c2);\n  VERIFY_IS_APPROX(m1.col(c1), m1_copy.col(c1) + s1 * m1_copy.col(c2));\n  m1.col(c1).col(0) += s1 * m1_copy.col(c2);\n  VERIFY_IS_APPROX(m1.col(c1), m1_copy.col(c1) + Scalar(2) * s1 * m1_copy.col(c2));\n  \n  \n  //check block()\n  Matrix<Scalar,Dynamic,Dynamic> b1(1,1); b1(0,0) = m1(r1,c1);\n\n  RowVectorType br1(m1.block(r1,0,1,cols));\n  VectorType bc1(m1.block(0,c1,rows,1));\n  VERIFY_IS_EQUAL(b1, m1.block(r1,c1,1,1));\n  VERIFY_IS_EQUAL(m1.row(r1), br1);\n  VERIFY_IS_EQUAL(m1.col(c1), bc1);\n  //check operator(), both constant and non-constant, on block()\n  m1.block(r1,c1,r2-r1+1,c2-c1+1) = s1 * m2.block(0, 0, r2-r1+1,c2-c1+1);\n  m1.block(r1,c1,r2-r1+1,c2-c1+1)(r2-r1,c2-c1) = m2.block(0, 0, r2-r1+1,c2-c1+1)(0,0);\n\n  const Index BlockRows = 2;\n  const Index BlockCols = 5;\n\n  if (rows>=5 && cols>=8)\n  {\n    // test fixed block() as lvalue\n    m1.template block<BlockRows,BlockCols>(1,1) *= s1;\n    // test operator() on fixed block() both as constant and non-constant\n    m1.template block<BlockRows,BlockCols>(1,1)(0, 3) = m1.template block<2,5>(1,1)(1,2);\n    // check that fixed block() and block() agree\n    Matrix<Scalar,Dynamic,Dynamic> b = m1.template block<BlockRows,BlockCols>(3,3);\n    VERIFY_IS_EQUAL(b, m1.block(3,3,BlockRows,BlockCols));\n\n    // same tests with mixed fixed/dynamic size\n    m1.template block<BlockRows,Dynamic>(1,1,BlockRows,BlockCols) *= s1;\n    m1.template block<BlockRows,Dynamic>(1,1,BlockRows,BlockCols)(0,3) = m1.template block<2,5>(1,1)(1,2);\n    Matrix<Scalar,Dynamic,Dynamic> b2 = m1.template block<Dynamic,BlockCols>(3,3,2,5);\n    VERIFY_IS_EQUAL(b2, m1.block(3,3,BlockRows,BlockCols));\n\n    VERIFY(is_same_block(m1.block(3,3,BlockRows,BlockCols), m1.block(3,3,fix<Dynamic>(BlockRows),fix<Dynamic>(BlockCols))));\n    VERIFY(is_same_block(m1.template block<BlockRows,Dynamic>(1,1,BlockRows,BlockCols), m1.block(1,1,fix<BlockRows>,BlockCols)));\n    VERIFY(is_same_block(m1.template block<BlockRows,BlockCols>(1,1,BlockRows,BlockCols), m1.block(1,1,fix<BlockRows>(),fix<BlockCols>)));\n    VERIFY(is_same_block(m1.template block<BlockRows,BlockCols>(1,1,BlockRows,BlockCols), m1.block(1,1,fix<BlockRows>,fix<BlockCols>(BlockCols))));\n  }\n\n  if (rows>2)\n  {\n    // test sub vectors\n    VERIFY_IS_EQUAL(v1.template head<2>(), v1.block(0,0,2,1));\n    VERIFY_IS_EQUAL(v1.template head<2>(), v1.head(2));\n    VERIFY_IS_EQUAL(v1.template head<2>(), v1.segment(0,2));\n    VERIFY_IS_EQUAL(v1.template head<2>(), v1.template segment<2>(0));\n    Index i = rows-2;\n    VERIFY_IS_EQUAL(v1.template tail<2>(), v1.block(i,0,2,1));\n    VERIFY_IS_EQUAL(v1.template tail<2>(), v1.tail(2));\n    VERIFY_IS_EQUAL(v1.template tail<2>(), v1.segment(i,2));\n    VERIFY_IS_EQUAL(v1.template tail<2>(), v1.template segment<2>(i));\n    i = internal::random<Index>(0,rows-2);\n    VERIFY_IS_EQUAL(v1.segment(i,2), v1.template segment<2>(i));\n  }\n\n  // stress some basic stuffs with block matrices\n  VERIFY(numext::real(ones.col(c1).sum()) == RealScalar(rows));\n  VERIFY(numext::real(ones.row(r1).sum()) == RealScalar(cols));\n\n  VERIFY(numext::real(ones.col(c1).dot(ones.col(c2))) == RealScalar(rows));\n  VERIFY(numext::real(ones.row(r1).dot(ones.row(r2))) == RealScalar(cols));\n  \n  // check that linear acccessors works on blocks\n  m1 = m1_copy;\n  if((MatrixType::Flags&RowMajorBit)==0)\n    VERIFY_IS_EQUAL(m1.leftCols(c1).coeff(r1+c1*rows), m1(r1,c1));\n  else\n    VERIFY_IS_EQUAL(m1.topRows(r1).coeff(c1+r1*cols), m1(r1,c1));\n  \n\n  // now test some block-inside-of-block.\n  \n  // expressions with direct access\n  VERIFY_IS_EQUAL( (m1.block(r1,c1,rows-r1,cols-c1).block(r2-r1,c2-c1,rows-r2,cols-c2)) , (m1.block(r2,c2,rows-r2,cols-c2)) );\n  VERIFY_IS_EQUAL( (m1.block(r1,c1,r2-r1+1,c2-c1+1).row(0)) , (m1.row(r1).segment(c1,c2-c1+1)) );\n  VERIFY_IS_EQUAL( (m1.block(r1,c1,r2-r1+1,c2-c1+1).col(0)) , (m1.col(c1).segment(r1,r2-r1+1)) );\n  VERIFY_IS_EQUAL( (m1.block(r1,c1,r2-r1+1,c2-c1+1).transpose().col(0)) , (m1.row(r1).segment(c1,c2-c1+1)).transpose() );\n  VERIFY_IS_EQUAL( (m1.transpose().block(c1,r1,c2-c1+1,r2-r1+1).col(0)) , (m1.row(r1).segment(c1,c2-c1+1)).transpose() );\n\n  // expressions without direct access\n  VERIFY_IS_APPROX( ((m1+m2).block(r1,c1,rows-r1,cols-c1).block(r2-r1,c2-c1,rows-r2,cols-c2)) , ((m1+m2).block(r2,c2,rows-r2,cols-c2)) );\n  VERIFY_IS_APPROX( ((m1+m2).block(r1,c1,r2-r1+1,c2-c1+1).row(0)) , ((m1+m2).row(r1).segment(c1,c2-c1+1)) );\n  VERIFY_IS_APPROX( ((m1+m2).block(r1,c1,r2-r1+1,c2-c1+1).row(0)) , ((m1+m2).eval().row(r1).segment(c1,c2-c1+1)) );\n  VERIFY_IS_APPROX( ((m1+m2).block(r1,c1,r2-r1+1,c2-c1+1).col(0)) , ((m1+m2).col(c1).segment(r1,r2-r1+1)) );\n  VERIFY_IS_APPROX( ((m1+m2).block(r1,c1,r2-r1+1,c2-c1+1).transpose().col(0)) , ((m1+m2).row(r1).segment(c1,c2-c1+1)).transpose() );\n  VERIFY_IS_APPROX( ((m1+m2).transpose().block(c1,r1,c2-c1+1,r2-r1+1).col(0)) , ((m1+m2).row(r1).segment(c1,c2-c1+1)).transpose() );\n  VERIFY_IS_APPROX( ((m1+m2).template block<Dynamic,1>(r1,c1,r2-r1+1,1)) , ((m1+m2).eval().col(c1).eval().segment(r1,r2-r1+1)) );\n  VERIFY_IS_APPROX( ((m1+m2).template block<1,Dynamic>(r1,c1,1,c2-c1+1)) , ((m1+m2).eval().row(r1).eval().segment(c1,c2-c1+1)) );\n  VERIFY_IS_APPROX( ((m1+m2).transpose().template block<1,Dynamic>(c1,r1,1,r2-r1+1)) , ((m1+m2).eval().col(c1).eval().segment(r1,r2-r1+1)).transpose() );\n  VERIFY_IS_APPROX( (m1+m2).row(r1).eval(), (m1+m2).eval().row(r1) );\n  VERIFY_IS_APPROX( (m1+m2).adjoint().col(r1).eval(), (m1+m2).adjoint().eval().col(r1) );\n  VERIFY_IS_APPROX( (m1+m2).adjoint().row(c1).eval(), (m1+m2).adjoint().eval().row(c1) );\n  VERIFY_IS_APPROX( (m1*1).row(r1).segment(c1,c2-c1+1).eval(), m1.row(r1).eval().segment(c1,c2-c1+1).eval() );\n  VERIFY_IS_APPROX( m1.col(c1).reverse().segment(r1,r2-r1+1).eval(),m1.col(c1).reverse().eval().segment(r1,r2-r1+1).eval() );\n\n  VERIFY_IS_APPROX( (m1*1).topRows(r1),  m1.topRows(r1) );\n  VERIFY_IS_APPROX( (m1*1).leftCols(c1), m1.leftCols(c1) );\n  VERIFY_IS_APPROX( (m1*1).transpose().topRows(c1), m1.transpose().topRows(c1) );\n  VERIFY_IS_APPROX( (m1*1).transpose().leftCols(r1), m1.transpose().leftCols(r1) );\n  VERIFY_IS_APPROX( (m1*1).transpose().middleRows(c1,c2-c1+1), m1.transpose().middleRows(c1,c2-c1+1) );\n  VERIFY_IS_APPROX( (m1*1).transpose().middleCols(r1,r2-r1+1), m1.transpose().middleCols(r1,r2-r1+1) );\n\n  // evaluation into plain matrices from expressions with direct access (stress MapBase)\n  DynamicMatrixType dm;\n  DynamicVectorType dv;\n  dm.setZero();\n  dm = m1.block(r1,c1,rows-r1,cols-c1).block(r2-r1,c2-c1,rows-r2,cols-c2);\n  VERIFY_IS_EQUAL(dm, (m1.block(r2,c2,rows-r2,cols-c2)));\n  dm.setZero();\n  dv.setZero();\n  dm = m1.block(r1,c1,r2-r1+1,c2-c1+1).row(0).transpose();\n  dv = m1.row(r1).segment(c1,c2-c1+1);\n  VERIFY_IS_EQUAL(dv, dm);\n  dm.setZero();\n  dv.setZero();\n  dm = m1.col(c1).segment(r1,r2-r1+1);\n  dv = m1.block(r1,c1,r2-r1+1,c2-c1+1).col(0);\n  VERIFY_IS_EQUAL(dv, dm);\n  dm.setZero();\n  dv.setZero();\n  dm = m1.block(r1,c1,r2-r1+1,c2-c1+1).transpose().col(0);\n  dv = m1.row(r1).segment(c1,c2-c1+1);\n  VERIFY_IS_EQUAL(dv, dm);\n  dm.setZero();\n  dv.setZero();\n  dm = m1.row(r1).segment(c1,c2-c1+1).transpose();\n  dv = m1.transpose().block(c1,r1,c2-c1+1,r2-r1+1).col(0);\n  VERIFY_IS_EQUAL(dv, dm);\n\n  VERIFY_IS_EQUAL( (m1.template block<Dynamic,1>(1,0,0,1)), m1.block(1,0,0,1));\n  VERIFY_IS_EQUAL( (m1.template block<1,Dynamic>(0,1,1,0)), m1.block(0,1,1,0));\n  VERIFY_IS_EQUAL( ((m1*1).template block<Dynamic,1>(1,0,0,1)), m1.block(1,0,0,1));\n  VERIFY_IS_EQUAL( ((m1*1).template block<1,Dynamic>(0,1,1,0)), m1.block(0,1,1,0));\n\n  if (rows>=2 && cols>=2)\n  {\n    VERIFY_RAISES_ASSERT( m1 += m1.col(0) );\n    VERIFY_RAISES_ASSERT( m1 -= m1.col(0) );\n    VERIFY_RAISES_ASSERT( m1.array() *= m1.col(0).array() );\n    VERIFY_RAISES_ASSERT( m1.array() /= m1.col(0).array() );\n  }\n\n  VERIFY_IS_EQUAL( m1.template subVector<Horizontal>(r1), m1.row(r1) );\n  VERIFY_IS_APPROX( (m1+m1).template subVector<Horizontal>(r1), (m1+m1).row(r1) );\n  VERIFY_IS_EQUAL( m1.template subVector<Vertical>(c1), m1.col(c1) );\n  VERIFY_IS_APPROX( (m1+m1).template subVector<Vertical>(c1), (m1+m1).col(c1) );\n  VERIFY_IS_EQUAL( m1.template subVectors<Horizontal>(), m1.rows() );\n  VERIFY_IS_EQUAL( m1.template subVectors<Vertical>(), m1.cols() );\n\n  if (rows>=2 || cols>=2) {\n    VERIFY_IS_EQUAL( int(m1.middleCols(0,0).IsRowMajor), int(m1.IsRowMajor) );\n    VERIFY_IS_EQUAL( m1.middleCols(0,0).outerSize(), m1.IsRowMajor ? rows : 0);\n    VERIFY_IS_EQUAL( m1.middleCols(0,0).innerSize(), m1.IsRowMajor ? 0 : rows);\n\n    VERIFY_IS_EQUAL( int(m1.middleRows(0,0).IsRowMajor), int(m1.IsRowMajor) );\n    VERIFY_IS_EQUAL( m1.middleRows(0,0).outerSize(), m1.IsRowMajor ? 0 : cols);\n    VERIFY_IS_EQUAL( m1.middleRows(0,0).innerSize(), m1.IsRowMajor ? cols : 0);\n  }\n}\n\n\ntemplate<typename MatrixType>\nvoid compare_using_data_and_stride(const MatrixType& m)\n{\n  Index rows = m.rows();\n  Index cols = m.cols();\n  Index size = m.size();\n  Index innerStride = m.innerStride();\n  Index outerStride = m.outerStride();\n  Index rowStride = m.rowStride();\n  Index colStride = m.colStride();\n  const typename MatrixType::Scalar* data = m.data();\n\n  for(int j=0;j<cols;++j)\n    for(int i=0;i<rows;++i)\n      VERIFY(m.coeff(i,j) == data[i*rowStride + j*colStride]);\n\n  if(!MatrixType::IsVectorAtCompileTime)\n  {\n    for(int j=0;j<cols;++j)\n      for(int i=0;i<rows;++i)\n        VERIFY(m.coeff(i,j) == data[(MatrixType::Flags&RowMajorBit)\n                                     ? i*outerStride + j*innerStride\n                                     : j*outerStride + i*innerStride]);\n  }\n\n  if(MatrixType::IsVectorAtCompileTime)\n  {\n    VERIFY(innerStride == int((&m.coeff(1))-(&m.coeff(0))));\n    for (int i=0;i<size;++i)\n      VERIFY(m.coeff(i) == data[i*innerStride]);\n  }\n}\n\ntemplate<typename MatrixType>\nvoid data_and_stride(const MatrixType& m)\n{\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  Index r1 = internal::random<Index>(0,rows-1);\n  Index r2 = internal::random<Index>(r1,rows-1);\n  Index c1 = internal::random<Index>(0,cols-1);\n  Index c2 = internal::random<Index>(c1,cols-1);\n\n  MatrixType m1 = MatrixType::Random(rows, cols);\n  compare_using_data_and_stride(m1.block(r1, c1, r2-r1+1, c2-c1+1));\n  compare_using_data_and_stride(m1.transpose().block(c1, r1, c2-c1+1, r2-r1+1));\n  compare_using_data_and_stride(m1.row(r1));\n  compare_using_data_and_stride(m1.col(c1));\n  compare_using_data_and_stride(m1.row(r1).transpose());\n  compare_using_data_and_stride(m1.col(c1).transpose());\n}\n\nEIGEN_DECLARE_TEST(block)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( block(Matrix<float, 1, 1>()) );\n    CALL_SUBTEST_1( block(Matrix<float, 1, Dynamic>(internal::random(2,50))) );\n    CALL_SUBTEST_1( block(Matrix<float, Dynamic, 1>(internal::random(2,50))) );\n    CALL_SUBTEST_2( block(Matrix4d()) );\n    CALL_SUBTEST_3( block(MatrixXcf(internal::random(2,50), internal::random(2,50))) );\n    CALL_SUBTEST_4( block(MatrixXi(internal::random(2,50), internal::random(2,50))) );\n    CALL_SUBTEST_5( block(MatrixXcd(internal::random(2,50), internal::random(2,50))) );\n    CALL_SUBTEST_6( block(MatrixXf(internal::random(2,50), internal::random(2,50))) );\n    CALL_SUBTEST_7( block(Matrix<int,Dynamic,Dynamic,RowMajor>(internal::random(2,50), internal::random(2,50))) );\n\n    CALL_SUBTEST_8( block(Matrix<float,Dynamic,4>(3, 4)) );\n\n#ifndef EIGEN_DEFAULT_TO_ROW_MAJOR\n    CALL_SUBTEST_6( data_and_stride(MatrixXf(internal::random(5,50), internal::random(5,50))) );\n    CALL_SUBTEST_7( data_and_stride(Matrix<int,Dynamic,Dynamic,RowMajor>(internal::random(5,50), internal::random(5,50))) );\n#endif\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/boostmultiprec.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include <sstream>\n\n#ifdef EIGEN_TEST_MAX_SIZE\n#undef EIGEN_TEST_MAX_SIZE\n#endif\n\n#define EIGEN_TEST_MAX_SIZE 50\n\n#ifdef EIGEN_TEST_PART_1\n#include \"cholesky.cpp\"\n#endif\n\n#ifdef EIGEN_TEST_PART_2\n#include \"lu.cpp\"\n#endif\n\n#ifdef EIGEN_TEST_PART_3\n#include \"qr.cpp\"\n#endif\n\n#ifdef EIGEN_TEST_PART_4\n#include \"qr_colpivoting.cpp\"\n#endif\n\n#ifdef EIGEN_TEST_PART_5\n#include \"qr_fullpivoting.cpp\"\n#endif\n\n#ifdef EIGEN_TEST_PART_6\n#include \"eigensolver_selfadjoint.cpp\"\n#endif\n\n#ifdef EIGEN_TEST_PART_7\n#include \"eigensolver_generic.cpp\"\n#endif\n\n#ifdef EIGEN_TEST_PART_8\n#include \"eigensolver_generalized_real.cpp\"\n#endif\n\n#ifdef EIGEN_TEST_PART_9\n#include \"jacobisvd.cpp\"\n#endif\n\n#ifdef EIGEN_TEST_PART_10\n#include \"bdcsvd.cpp\"\n#endif\n\n#ifdef EIGEN_TEST_PART_11\n#include \"simplicial_cholesky.cpp\"\n#endif\n\n#include <Eigen/Dense>\n\n#undef min\n#undef max\n#undef isnan\n#undef isinf\n#undef isfinite\n#undef I\n\n#include <boost/multiprecision/cpp_dec_float.hpp>\n#include <boost/multiprecision/number.hpp>\n#include <boost/math/special_functions.hpp>\n#include <boost/math/complex.hpp>\n\nnamespace mp = boost::multiprecision;\ntypedef mp::number<mp::cpp_dec_float<100>, mp::et_on> Real;\n\nnamespace Eigen {\n  template<> struct NumTraits<Real> : GenericNumTraits<Real> {\n    static inline Real dummy_precision() { return 1e-50; }\n  };\n\n  template<typename T1,typename T2,typename T3,typename T4,typename T5>\n  struct NumTraits<boost::multiprecision::detail::expression<T1,T2,T3,T4,T5> > : NumTraits<Real> {};\n\n  template<>\n  Real test_precision<Real>() { return 1e-50; }\n\n  // needed in C++93 mode where number does not support explicit cast.\n  namespace internal {\n    template<typename NewType>\n    struct cast_impl<Real,NewType> {\n      static inline NewType run(const Real& x) {\n        return x.template convert_to<NewType>();\n      }\n    };\n\n    template<>\n    struct cast_impl<Real,std::complex<Real> > {\n      static inline std::complex<Real>  run(const Real& x) {\n        return std::complex<Real>(x);\n      }\n    };\n  }\n}\n\nnamespace boost {\nnamespace multiprecision {\n  // to make ADL works as expected:\n  using boost::math::isfinite;\n  using boost::math::isnan;\n  using boost::math::isinf;\n  using boost::math::copysign;\n  using boost::math::hypot;\n\n  // The following is needed for std::complex<Real>:\n  Real fabs(const Real& a) { return abs EIGEN_NOT_A_MACRO (a); }\n  Real fmax(const Real& a, const Real& b) { using std::max; return max(a,b); }\n\n  // some specialization for the unit tests:\n  inline bool test_isMuchSmallerThan(const Real& a, const Real& b) {\n    return internal::isMuchSmallerThan(a, b, test_precision<Real>());\n  }\n\n  inline bool test_isApprox(const Real& a, const Real& b) {\n    return internal::isApprox(a, b, test_precision<Real>());\n  }\n\n  inline bool test_isApproxOrLessThan(const Real& a, const Real& b) {\n    return internal::isApproxOrLessThan(a, b, test_precision<Real>());\n  }\n\n  Real get_test_precision(const Real&) {\n    return test_precision<Real>();\n  }\n\n  Real test_relative_error(const Real &a, const Real &b) {\n    using Eigen::numext::abs2;\n    return sqrt(abs2<Real>(a-b)/Eigen::numext::mini<Real>(abs2(a),abs2(b)));\n  }\n}\n}\n\nnamespace Eigen {\n\n}\n\nEIGEN_DECLARE_TEST(boostmultiprec)\n{\n  typedef Matrix<Real,Dynamic,Dynamic> Mat;\n  typedef Matrix<std::complex<Real>,Dynamic,Dynamic> MatC;\n\n  std::cout << \"NumTraits<Real>::epsilon()         = \" << NumTraits<Real>::epsilon() << std::endl;\n  std::cout << \"NumTraits<Real>::dummy_precision() = \" << NumTraits<Real>::dummy_precision() << std::endl;\n  std::cout << \"NumTraits<Real>::lowest()          = \" << NumTraits<Real>::lowest() << std::endl;\n  std::cout << \"NumTraits<Real>::highest()         = \" << NumTraits<Real>::highest() << std::endl;\n  std::cout << \"NumTraits<Real>::digits10()        = \" << NumTraits<Real>::digits10() << std::endl;\n\n  // check stream output\n  {\n    Mat A(10,10);\n    A.setRandom();\n    std::stringstream ss;\n    ss << A;\n  }\n  {\n    MatC A(10,10);\n    A.setRandom();\n    std::stringstream ss;\n    ss << A;\n  }\n\n  for(int i = 0; i < g_repeat; i++) {\n    int s = internal::random<int>(1,EIGEN_TEST_MAX_SIZE);\n\n    CALL_SUBTEST_1( cholesky(Mat(s,s)) );\n\n    CALL_SUBTEST_2( lu_non_invertible<Mat>() );\n    CALL_SUBTEST_2( lu_invertible<Mat>() );\n    CALL_SUBTEST_2( lu_non_invertible<MatC>() );\n    CALL_SUBTEST_2( lu_invertible<MatC>() );\n\n    CALL_SUBTEST_3( qr(Mat(internal::random<int>(1,EIGEN_TEST_MAX_SIZE),internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_3( qr_invertible<Mat>() );\n\n    CALL_SUBTEST_4( qr<Mat>() );\n    CALL_SUBTEST_4( cod<Mat>() );\n    CALL_SUBTEST_4( qr_invertible<Mat>() );\n\n    CALL_SUBTEST_5( qr<Mat>() );\n    CALL_SUBTEST_5( qr_invertible<Mat>() );\n\n    CALL_SUBTEST_6( selfadjointeigensolver(Mat(s,s)) );\n\n    CALL_SUBTEST_7( eigensolver(Mat(s,s)) );\n\n    CALL_SUBTEST_8( generalized_eigensolver_real(Mat(s,s)) );\n\n    TEST_SET_BUT_UNUSED_VARIABLE(s)\n  }\n\n  CALL_SUBTEST_9(( jacobisvd(Mat(internal::random<int>(EIGEN_TEST_MAX_SIZE/4, EIGEN_TEST_MAX_SIZE), internal::random<int>(EIGEN_TEST_MAX_SIZE/4, EIGEN_TEST_MAX_SIZE/2))) ));\n  CALL_SUBTEST_10(( bdcsvd(Mat(internal::random<int>(EIGEN_TEST_MAX_SIZE/4, EIGEN_TEST_MAX_SIZE), internal::random<int>(EIGEN_TEST_MAX_SIZE/4, EIGEN_TEST_MAX_SIZE/2))) ));\n\n  CALL_SUBTEST_11(( test_simplicial_cholesky_T<Real,int>() ));\n}\n\n"
  },
  {
    "path": "3rdparty/eigen3/test/bug1213.cpp",
    "content": "\n// This anonymous enum is essential to trigger the linking issue\nenum {\n  Foo\n};\n\n#include \"bug1213.h\"\n\nbool bug1213_1(const Eigen::Vector3f& x)\n{\n  return bug1213_2(x);\n}\n\n"
  },
  {
    "path": "3rdparty/eigen3/test/bug1213.h",
    "content": "\n#include <Eigen/Core>\n\ntemplate<typename T, int dim>\nbool bug1213_2(const Eigen::Matrix<T,dim,1>& x);\n\nbool bug1213_1(const Eigen::Vector3f& x);\n\n"
  },
  {
    "path": "3rdparty/eigen3/test/bug1213_main.cpp",
    "content": "\n// This is a regression unit regarding a weird linking issue with gcc.\n\n#include \"bug1213.h\"\n\nint main()\n{\n  return 0;\n}\n\n\ntemplate<typename T, int dim>\nbool bug1213_2(const Eigen::Matrix<T,dim,1>& )\n{\n  return true;\n}\n\ntemplate bool bug1213_2<float,3>(const Eigen::Vector3f&);\n"
  },
  {
    "path": "3rdparty/eigen3/test/cholesky.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define TEST_ENABLE_TEMPORARY_TRACKING\n\n#include \"main.h\"\n#include <Eigen/Cholesky>\n#include <Eigen/QR>\n#include \"solverbase.h\"\n\ntemplate<typename MatrixType, int UpLo>\ntypename MatrixType::RealScalar matrix_l1_norm(const MatrixType& m) {\n  if(m.cols()==0) return typename MatrixType::RealScalar(0);\n  MatrixType symm = m.template selfadjointView<UpLo>();\n  return symm.cwiseAbs().colwise().sum().maxCoeff();\n}\n\ntemplate<typename MatrixType,template <typename,int> class CholType> void test_chol_update(const MatrixType& symm)\n{\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename MatrixType::RealScalar RealScalar;\n  typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;\n\n  MatrixType symmLo = symm.template triangularView<Lower>();\n  MatrixType symmUp = symm.template triangularView<Upper>();\n  MatrixType symmCpy = symm;\n\n  CholType<MatrixType,Lower> chollo(symmLo);\n  CholType<MatrixType,Upper> cholup(symmUp);\n\n  for (int k=0; k<10; ++k)\n  {\n    VectorType vec = VectorType::Random(symm.rows());\n    RealScalar sigma = internal::random<RealScalar>();\n    symmCpy += sigma * vec * vec.adjoint();\n\n    // we are doing some downdates, so it might be the case that the matrix is not SPD anymore\n    CholType<MatrixType,Lower> chol(symmCpy);\n    if(chol.info()!=Success)\n      break;\n\n    chollo.rankUpdate(vec, sigma);\n    VERIFY_IS_APPROX(symmCpy, chollo.reconstructedMatrix());\n\n    cholup.rankUpdate(vec, sigma);\n    VERIFY_IS_APPROX(symmCpy, cholup.reconstructedMatrix());\n  }\n}\n\ntemplate<typename MatrixType> void cholesky(const MatrixType& m)\n{\n  /* this test covers the following files:\n     LLT.h LDLT.h\n  */\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime> SquareMatrixType;\n  typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;\n\n  MatrixType a0 = MatrixType::Random(rows,cols);\n  VectorType vecB = VectorType::Random(rows), vecX(rows);\n  MatrixType matB = MatrixType::Random(rows,cols), matX(rows,cols);\n  SquareMatrixType symm =  a0 * a0.adjoint();\n  // let's make sure the matrix is not singular or near singular\n  for (int k=0; k<3; ++k)\n  {\n    MatrixType a1 = MatrixType::Random(rows,cols);\n    symm += a1 * a1.adjoint();\n  }\n\n  {\n    STATIC_CHECK(( internal::is_same<typename LLT<MatrixType,Lower>::StorageIndex,int>::value ));\n    STATIC_CHECK(( internal::is_same<typename LLT<MatrixType,Upper>::StorageIndex,int>::value ));\n\n    SquareMatrixType symmUp = symm.template triangularView<Upper>();\n    SquareMatrixType symmLo = symm.template triangularView<Lower>();\n\n    LLT<SquareMatrixType,Lower> chollo(symmLo);\n    VERIFY_IS_APPROX(symm, chollo.reconstructedMatrix());\n\n    check_solverbase<VectorType, VectorType>(symm, chollo, rows, rows, 1);\n    check_solverbase<MatrixType, MatrixType>(symm, chollo, rows, cols, rows);\n\n    const MatrixType symmLo_inverse = chollo.solve(MatrixType::Identity(rows,cols));\n    RealScalar rcond = (RealScalar(1) / matrix_l1_norm<MatrixType, Lower>(symmLo)) /\n                             matrix_l1_norm<MatrixType, Lower>(symmLo_inverse);\n    RealScalar rcond_est = chollo.rcond();\n    // Verify that the estimated condition number is within a factor of 10 of the\n    // truth.\n    VERIFY(rcond_est >= rcond / 10 && rcond_est <= rcond * 10);\n\n    // test the upper mode\n    LLT<SquareMatrixType,Upper> cholup(symmUp);\n    VERIFY_IS_APPROX(symm, cholup.reconstructedMatrix());\n    vecX = cholup.solve(vecB);\n    VERIFY_IS_APPROX(symm * vecX, vecB);\n    matX = cholup.solve(matB);\n    VERIFY_IS_APPROX(symm * matX, matB);\n\n    // Verify that the estimated condition number is within a factor of 10 of the\n    // truth.\n    const MatrixType symmUp_inverse = cholup.solve(MatrixType::Identity(rows,cols));\n    rcond = (RealScalar(1) / matrix_l1_norm<MatrixType, Upper>(symmUp)) /\n                             matrix_l1_norm<MatrixType, Upper>(symmUp_inverse);\n    rcond_est = cholup.rcond();\n    VERIFY(rcond_est >= rcond / 10 && rcond_est <= rcond * 10);\n\n\n    MatrixType neg = -symmLo;\n    chollo.compute(neg);\n    VERIFY(neg.size()==0 || chollo.info()==NumericalIssue);\n\n    VERIFY_IS_APPROX(MatrixType(chollo.matrixL().transpose().conjugate()), MatrixType(chollo.matrixU()));\n    VERIFY_IS_APPROX(MatrixType(chollo.matrixU().transpose().conjugate()), MatrixType(chollo.matrixL()));\n    VERIFY_IS_APPROX(MatrixType(cholup.matrixL().transpose().conjugate()), MatrixType(cholup.matrixU()));\n    VERIFY_IS_APPROX(MatrixType(cholup.matrixU().transpose().conjugate()), MatrixType(cholup.matrixL()));\n\n    // test some special use cases of SelfCwiseBinaryOp:\n    MatrixType m1 = MatrixType::Random(rows,cols), m2(rows,cols);\n    m2 = m1;\n    m2 += symmLo.template selfadjointView<Lower>().llt().solve(matB);\n    VERIFY_IS_APPROX(m2, m1 + symmLo.template selfadjointView<Lower>().llt().solve(matB));\n    m2 = m1;\n    m2 -= symmLo.template selfadjointView<Lower>().llt().solve(matB);\n    VERIFY_IS_APPROX(m2, m1 - symmLo.template selfadjointView<Lower>().llt().solve(matB));\n    m2 = m1;\n    m2.noalias() += symmLo.template selfadjointView<Lower>().llt().solve(matB);\n    VERIFY_IS_APPROX(m2, m1 + symmLo.template selfadjointView<Lower>().llt().solve(matB));\n    m2 = m1;\n    m2.noalias() -= symmLo.template selfadjointView<Lower>().llt().solve(matB);\n    VERIFY_IS_APPROX(m2, m1 - symmLo.template selfadjointView<Lower>().llt().solve(matB));\n  }\n\n  // LDLT\n  {\n    STATIC_CHECK(( internal::is_same<typename LDLT<MatrixType,Lower>::StorageIndex,int>::value ));\n    STATIC_CHECK(( internal::is_same<typename LDLT<MatrixType,Upper>::StorageIndex,int>::value ));\n\n    int sign = internal::random<int>()%2 ? 1 : -1;\n\n    if(sign == -1)\n    {\n      symm = -symm; // test a negative matrix\n    }\n\n    SquareMatrixType symmUp = symm.template triangularView<Upper>();\n    SquareMatrixType symmLo = symm.template triangularView<Lower>();\n\n    LDLT<SquareMatrixType,Lower> ldltlo(symmLo);\n    VERIFY(ldltlo.info()==Success);\n    VERIFY_IS_APPROX(symm, ldltlo.reconstructedMatrix());\n\n    check_solverbase<VectorType, VectorType>(symm, ldltlo, rows, rows, 1);\n    check_solverbase<MatrixType, MatrixType>(symm, ldltlo, rows, cols, rows);\n\n    const MatrixType symmLo_inverse = ldltlo.solve(MatrixType::Identity(rows,cols));\n    RealScalar rcond = (RealScalar(1) / matrix_l1_norm<MatrixType, Lower>(symmLo)) /\n                             matrix_l1_norm<MatrixType, Lower>(symmLo_inverse);\n    RealScalar rcond_est = ldltlo.rcond();\n    // Verify that the estimated condition number is within a factor of 10 of the\n    // truth.\n    VERIFY(rcond_est >= rcond / 10 && rcond_est <= rcond * 10);\n\n\n    LDLT<SquareMatrixType,Upper> ldltup(symmUp);\n    VERIFY(ldltup.info()==Success);\n    VERIFY_IS_APPROX(symm, ldltup.reconstructedMatrix());\n    vecX = ldltup.solve(vecB);\n    VERIFY_IS_APPROX(symm * vecX, vecB);\n    matX = ldltup.solve(matB);\n    VERIFY_IS_APPROX(symm * matX, matB);\n\n    // Verify that the estimated condition number is within a factor of 10 of the\n    // truth.\n    const MatrixType symmUp_inverse = ldltup.solve(MatrixType::Identity(rows,cols));\n    rcond = (RealScalar(1) / matrix_l1_norm<MatrixType, Upper>(symmUp)) /\n                             matrix_l1_norm<MatrixType, Upper>(symmUp_inverse);\n    rcond_est = ldltup.rcond();\n    VERIFY(rcond_est >= rcond / 10 && rcond_est <= rcond * 10);\n\n    VERIFY_IS_APPROX(MatrixType(ldltlo.matrixL().transpose().conjugate()), MatrixType(ldltlo.matrixU()));\n    VERIFY_IS_APPROX(MatrixType(ldltlo.matrixU().transpose().conjugate()), MatrixType(ldltlo.matrixL()));\n    VERIFY_IS_APPROX(MatrixType(ldltup.matrixL().transpose().conjugate()), MatrixType(ldltup.matrixU()));\n    VERIFY_IS_APPROX(MatrixType(ldltup.matrixU().transpose().conjugate()), MatrixType(ldltup.matrixL()));\n\n    if(MatrixType::RowsAtCompileTime==Dynamic)\n    {\n      // note : each inplace permutation requires a small temporary vector (mask)\n\n      // check inplace solve\n      matX = matB;\n      VERIFY_EVALUATION_COUNT(matX = ldltlo.solve(matX), 0);\n      VERIFY_IS_APPROX(matX, ldltlo.solve(matB).eval());\n\n\n      matX = matB;\n      VERIFY_EVALUATION_COUNT(matX = ldltup.solve(matX), 0);\n      VERIFY_IS_APPROX(matX, ldltup.solve(matB).eval());\n    }\n\n    // restore\n    if(sign == -1)\n      symm = -symm;\n\n    // check matrices coming from linear constraints with Lagrange multipliers\n    if(rows>=3)\n    {\n      SquareMatrixType A = symm;\n      Index c = internal::random<Index>(0,rows-2);\n      A.bottomRightCorner(c,c).setZero();\n      // Make sure a solution exists:\n      vecX.setRandom();\n      vecB = A * vecX;\n      vecX.setZero();\n      ldltlo.compute(A);\n      VERIFY_IS_APPROX(A, ldltlo.reconstructedMatrix());\n      vecX = ldltlo.solve(vecB);\n      VERIFY_IS_APPROX(A * vecX, vecB);\n    }\n\n    // check non-full rank matrices\n    if(rows>=3)\n    {\n      Index r = internal::random<Index>(1,rows-1);\n      Matrix<Scalar,Dynamic,Dynamic> a = Matrix<Scalar,Dynamic,Dynamic>::Random(rows,r);\n      SquareMatrixType A = a * a.adjoint();\n      // Make sure a solution exists:\n      vecX.setRandom();\n      vecB = A * vecX;\n      vecX.setZero();\n      ldltlo.compute(A);\n      VERIFY_IS_APPROX(A, ldltlo.reconstructedMatrix());\n      vecX = ldltlo.solve(vecB);\n      VERIFY_IS_APPROX(A * vecX, vecB);\n    }\n\n    // check matrices with a wide spectrum\n    if(rows>=3)\n    {\n      using std::pow;\n      using std::sqrt;\n      RealScalar s = (std::min)(16,std::numeric_limits<RealScalar>::max_exponent10/8);\n      Matrix<Scalar,Dynamic,Dynamic> a = Matrix<Scalar,Dynamic,Dynamic>::Random(rows,rows);\n      Matrix<RealScalar,Dynamic,1> d =  Matrix<RealScalar,Dynamic,1>::Random(rows);\n      for(Index k=0; k<rows; ++k)\n        d(k) = d(k)*pow(RealScalar(10),internal::random<RealScalar>(-s,s));\n      SquareMatrixType A = a * d.asDiagonal() * a.adjoint();\n      // Make sure a solution exists:\n      vecX.setRandom();\n      vecB = A * vecX;\n      vecX.setZero();\n      ldltlo.compute(A);\n      VERIFY_IS_APPROX(A, ldltlo.reconstructedMatrix());\n      vecX = ldltlo.solve(vecB);\n\n      if(ldltlo.vectorD().real().cwiseAbs().minCoeff()>RealScalar(0))\n      {\n        VERIFY_IS_APPROX(A * vecX,vecB);\n      }\n      else\n      {\n        RealScalar large_tol =  sqrt(test_precision<RealScalar>());\n        VERIFY((A * vecX).isApprox(vecB, large_tol));\n\n        ++g_test_level;\n        VERIFY_IS_APPROX(A * vecX,vecB);\n        --g_test_level;\n      }\n    }\n  }\n\n  // update/downdate\n  CALL_SUBTEST(( test_chol_update<SquareMatrixType,LLT>(symm)  ));\n  CALL_SUBTEST(( test_chol_update<SquareMatrixType,LDLT>(symm) ));\n}\n\ntemplate<typename MatrixType> void cholesky_cplx(const MatrixType& m)\n{\n  // classic test\n  cholesky(m);\n\n  // test mixing real/scalar types\n\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  typedef Matrix<RealScalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime> RealMatrixType;\n  typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;\n\n  RealMatrixType a0 = RealMatrixType::Random(rows,cols);\n  VectorType vecB = VectorType::Random(rows), vecX(rows);\n  MatrixType matB = MatrixType::Random(rows,cols), matX(rows,cols);\n  RealMatrixType symm =  a0 * a0.adjoint();\n  // let's make sure the matrix is not singular or near singular\n  for (int k=0; k<3; ++k)\n  {\n    RealMatrixType a1 = RealMatrixType::Random(rows,cols);\n    symm += a1 * a1.adjoint();\n  }\n\n  {\n    RealMatrixType symmLo = symm.template triangularView<Lower>();\n\n    LLT<RealMatrixType,Lower> chollo(symmLo);\n    VERIFY_IS_APPROX(symm, chollo.reconstructedMatrix());\n\n    check_solverbase<VectorType, VectorType>(symm, chollo, rows, rows, 1);\n    //check_solverbase<MatrixType, MatrixType>(symm, chollo, rows, cols, rows);\n  }\n\n  // LDLT\n  {\n    int sign = internal::random<int>()%2 ? 1 : -1;\n\n    if(sign == -1)\n    {\n      symm = -symm; // test a negative matrix\n    }\n\n    RealMatrixType symmLo = symm.template triangularView<Lower>();\n\n    LDLT<RealMatrixType,Lower> ldltlo(symmLo);\n    VERIFY(ldltlo.info()==Success);\n    VERIFY_IS_APPROX(symm, ldltlo.reconstructedMatrix());\n\n    check_solverbase<VectorType, VectorType>(symm, ldltlo, rows, rows, 1);\n    //check_solverbase<MatrixType, MatrixType>(symm, ldltlo, rows, cols, rows);\n  }\n}\n\n// regression test for bug 241\ntemplate<typename MatrixType> void cholesky_bug241(const MatrixType& m)\n{\n  eigen_assert(m.rows() == 2 && m.cols() == 2);\n\n  typedef typename MatrixType::Scalar Scalar;\n  typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;\n\n  MatrixType matA;\n  matA << 1, 1, 1, 1;\n  VectorType vecB;\n  vecB << 1, 1;\n  VectorType vecX = matA.ldlt().solve(vecB);\n  VERIFY_IS_APPROX(matA * vecX, vecB);\n}\n\n// LDLT is not guaranteed to work for indefinite matrices, but happens to work fine if matrix is diagonal.\n// This test checks that LDLT reports correctly that matrix is indefinite.\n// See http://forum.kde.org/viewtopic.php?f=74&t=106942 and bug 736\ntemplate<typename MatrixType> void cholesky_definiteness(const MatrixType& m)\n{\n  eigen_assert(m.rows() == 2 && m.cols() == 2);\n  MatrixType mat;\n  LDLT<MatrixType> ldlt(2);\n\n  {\n    mat << 1, 0, 0, -1;\n    ldlt.compute(mat);\n    VERIFY(ldlt.info()==Success);\n    VERIFY(!ldlt.isNegative());\n    VERIFY(!ldlt.isPositive());\n    VERIFY_IS_APPROX(mat,ldlt.reconstructedMatrix());\n  }\n  {\n    mat << 1, 2, 2, 1;\n    ldlt.compute(mat);\n    VERIFY(ldlt.info()==Success);\n    VERIFY(!ldlt.isNegative());\n    VERIFY(!ldlt.isPositive());\n    VERIFY_IS_APPROX(mat,ldlt.reconstructedMatrix());\n  }\n  {\n    mat << 0, 0, 0, 0;\n    ldlt.compute(mat);\n    VERIFY(ldlt.info()==Success);\n    VERIFY(ldlt.isNegative());\n    VERIFY(ldlt.isPositive());\n    VERIFY_IS_APPROX(mat,ldlt.reconstructedMatrix());\n  }\n  {\n    mat << 0, 0, 0, 1;\n    ldlt.compute(mat);\n    VERIFY(ldlt.info()==Success);\n    VERIFY(!ldlt.isNegative());\n    VERIFY(ldlt.isPositive());\n    VERIFY_IS_APPROX(mat,ldlt.reconstructedMatrix());\n  }\n  {\n    mat << -1, 0, 0, 0;\n    ldlt.compute(mat);\n    VERIFY(ldlt.info()==Success);\n    VERIFY(ldlt.isNegative());\n    VERIFY(!ldlt.isPositive());\n    VERIFY_IS_APPROX(mat,ldlt.reconstructedMatrix());\n  }\n}\n\ntemplate<typename>\nvoid cholesky_faillure_cases()\n{\n  MatrixXd mat;\n  LDLT<MatrixXd> ldlt;\n\n  {\n    mat.resize(2,2);\n    mat << 0, 1, 1, 0;\n    ldlt.compute(mat);\n    VERIFY_IS_NOT_APPROX(mat,ldlt.reconstructedMatrix());\n    VERIFY(ldlt.info()==NumericalIssue);\n  }\n#if (!EIGEN_ARCH_i386) || defined(EIGEN_VECTORIZE_SSE2)\n  {\n    mat.resize(3,3);\n    mat << -1, -3, 3,\n           -3, -8.9999999999999999999, 1,\n            3, 1, 0;\n    ldlt.compute(mat);\n    VERIFY(ldlt.info()==NumericalIssue);\n    VERIFY_IS_NOT_APPROX(mat,ldlt.reconstructedMatrix());\n  }\n#endif\n  {\n    mat.resize(3,3);\n    mat <<  1, 2, 3,\n            2, 4, 1,\n            3, 1, 0;\n    ldlt.compute(mat);\n    VERIFY(ldlt.info()==NumericalIssue);\n    VERIFY_IS_NOT_APPROX(mat,ldlt.reconstructedMatrix());\n  }\n\n  {\n    mat.resize(8,8);\n    mat <<  0.1, 0, -0.1, 0, 0, 0, 1, 0,\n            0, 4.24667, 0, 2.00333, 0, 0, 0, 0,\n            -0.1, 0, 0.2, 0, -0.1, 0, 0, 0,\n            0, 2.00333, 0, 8.49333, 0, 2.00333, 0, 0,\n            0, 0, -0.1, 0, 0.1, 0, 0, 1,\n            0, 0, 0, 2.00333, 0, 4.24667, 0, 0,\n            1, 0, 0, 0, 0, 0, 0, 0,\n            0, 0, 0, 0, 1, 0, 0, 0;\n    ldlt.compute(mat);\n    VERIFY(ldlt.info()==NumericalIssue);\n    VERIFY_IS_NOT_APPROX(mat,ldlt.reconstructedMatrix());\n  }\n\n  // bug 1479\n  {\n    mat.resize(4,4);\n    mat <<  1, 2, 0, 1,\n            2, 4, 0, 2,\n            0, 0, 0, 1,\n            1, 2, 1, 1;\n    ldlt.compute(mat);\n    VERIFY(ldlt.info()==NumericalIssue);\n    VERIFY_IS_NOT_APPROX(mat,ldlt.reconstructedMatrix());\n  }\n}\n\ntemplate<typename MatrixType> void cholesky_verify_assert()\n{\n  MatrixType tmp;\n\n  LLT<MatrixType> llt;\n  VERIFY_RAISES_ASSERT(llt.matrixL())\n  VERIFY_RAISES_ASSERT(llt.matrixU())\n  VERIFY_RAISES_ASSERT(llt.solve(tmp))\n  VERIFY_RAISES_ASSERT(llt.transpose().solve(tmp))\n  VERIFY_RAISES_ASSERT(llt.adjoint().solve(tmp))\n  VERIFY_RAISES_ASSERT(llt.solveInPlace(tmp))\n\n  LDLT<MatrixType> ldlt;\n  VERIFY_RAISES_ASSERT(ldlt.matrixL())\n  VERIFY_RAISES_ASSERT(ldlt.transpositionsP())\n  VERIFY_RAISES_ASSERT(ldlt.vectorD())\n  VERIFY_RAISES_ASSERT(ldlt.isPositive())\n  VERIFY_RAISES_ASSERT(ldlt.isNegative())\n  VERIFY_RAISES_ASSERT(ldlt.solve(tmp))\n  VERIFY_RAISES_ASSERT(ldlt.transpose().solve(tmp))\n  VERIFY_RAISES_ASSERT(ldlt.adjoint().solve(tmp))\n  VERIFY_RAISES_ASSERT(ldlt.solveInPlace(tmp))\n}\n\nEIGEN_DECLARE_TEST(cholesky)\n{\n  int s = 0;\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( cholesky(Matrix<double,1,1>()) );\n    CALL_SUBTEST_3( cholesky(Matrix2d()) );\n    CALL_SUBTEST_3( cholesky_bug241(Matrix2d()) );\n    CALL_SUBTEST_3( cholesky_definiteness(Matrix2d()) );\n    CALL_SUBTEST_4( cholesky(Matrix3f()) );\n    CALL_SUBTEST_5( cholesky(Matrix4d()) );\n\n    s = internal::random<int>(1,EIGEN_TEST_MAX_SIZE);\n    CALL_SUBTEST_2( cholesky(MatrixXd(s,s)) );\n    TEST_SET_BUT_UNUSED_VARIABLE(s)\n\n    s = internal::random<int>(1,EIGEN_TEST_MAX_SIZE/2);\n    CALL_SUBTEST_6( cholesky_cplx(MatrixXcd(s,s)) );\n    TEST_SET_BUT_UNUSED_VARIABLE(s)\n  }\n  // empty matrix, regression test for Bug 785:\n  CALL_SUBTEST_2( cholesky(MatrixXd(0,0)) );\n\n  // This does not work yet:\n  // CALL_SUBTEST_2( cholesky(Matrix<double,0,0>()) );\n\n  CALL_SUBTEST_4( cholesky_verify_assert<Matrix3f>() );\n  CALL_SUBTEST_7( cholesky_verify_assert<Matrix3d>() );\n  CALL_SUBTEST_8( cholesky_verify_assert<MatrixXf>() );\n  CALL_SUBTEST_2( cholesky_verify_assert<MatrixXd>() );\n\n  // Test problem size constructors\n  CALL_SUBTEST_9( LLT<MatrixXf>(10) );\n  CALL_SUBTEST_9( LDLT<MatrixXf>(10) );\n\n  CALL_SUBTEST_2( cholesky_faillure_cases<void>() );\n\n  TEST_SET_BUT_UNUSED_VARIABLE(nb_temporaries)\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/cholmod_support.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2011 Gael Guennebaud <g.gael@free.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_NO_DEBUG_SMALL_PRODUCT_BLOCKS\n#include \"sparse_solver.h\"\n\n#include <Eigen/CholmodSupport>\n\ntemplate<typename SparseType> void test_cholmod_ST()\n{\n  CholmodDecomposition<SparseType, Lower> g_chol_colmajor_lower; g_chol_colmajor_lower.setMode(CholmodSupernodalLLt);\n  CholmodDecomposition<SparseType, Upper> g_chol_colmajor_upper; g_chol_colmajor_upper.setMode(CholmodSupernodalLLt);\n  CholmodDecomposition<SparseType, Lower> g_llt_colmajor_lower;  g_llt_colmajor_lower.setMode(CholmodSimplicialLLt);\n  CholmodDecomposition<SparseType, Upper> g_llt_colmajor_upper;  g_llt_colmajor_upper.setMode(CholmodSimplicialLLt);\n  CholmodDecomposition<SparseType, Lower> g_ldlt_colmajor_lower; g_ldlt_colmajor_lower.setMode(CholmodLDLt);\n  CholmodDecomposition<SparseType, Upper> g_ldlt_colmajor_upper; g_ldlt_colmajor_upper.setMode(CholmodLDLt);\n  \n  CholmodSupernodalLLT<SparseType, Lower> chol_colmajor_lower;\n  CholmodSupernodalLLT<SparseType, Upper> chol_colmajor_upper;\n  CholmodSimplicialLLT<SparseType, Lower> llt_colmajor_lower;\n  CholmodSimplicialLLT<SparseType, Upper> llt_colmajor_upper;\n  CholmodSimplicialLDLT<SparseType, Lower> ldlt_colmajor_lower;\n  CholmodSimplicialLDLT<SparseType, Upper> ldlt_colmajor_upper;\n\n  check_sparse_spd_solving(g_chol_colmajor_lower);\n  check_sparse_spd_solving(g_chol_colmajor_upper);\n  check_sparse_spd_solving(g_llt_colmajor_lower);\n  check_sparse_spd_solving(g_llt_colmajor_upper);\n  check_sparse_spd_solving(g_ldlt_colmajor_lower);\n  check_sparse_spd_solving(g_ldlt_colmajor_upper);\n  \n  check_sparse_spd_solving(chol_colmajor_lower);\n  check_sparse_spd_solving(chol_colmajor_upper);\n  check_sparse_spd_solving(llt_colmajor_lower);\n  check_sparse_spd_solving(llt_colmajor_upper);\n  check_sparse_spd_solving(ldlt_colmajor_lower);\n  check_sparse_spd_solving(ldlt_colmajor_upper);\n\n  check_sparse_spd_determinant(chol_colmajor_lower);\n  check_sparse_spd_determinant(chol_colmajor_upper);\n  check_sparse_spd_determinant(llt_colmajor_lower);\n  check_sparse_spd_determinant(llt_colmajor_upper);\n  check_sparse_spd_determinant(ldlt_colmajor_lower);\n  check_sparse_spd_determinant(ldlt_colmajor_upper);\n}\n\ntemplate<typename T, int flags, typename IdxType> void test_cholmod_T()\n{\n    test_cholmod_ST<SparseMatrix<T, flags, IdxType> >();\n}\n\nEIGEN_DECLARE_TEST(cholmod_support)\n{\n  CALL_SUBTEST_11( (test_cholmod_T<double              , ColMajor, int >()) );\n  CALL_SUBTEST_12( (test_cholmod_T<double              , ColMajor, long>()) );\n  CALL_SUBTEST_13( (test_cholmod_T<double              , RowMajor, int >()) );\n  CALL_SUBTEST_14( (test_cholmod_T<double              , RowMajor, long>()) );\n  CALL_SUBTEST_21( (test_cholmod_T<std::complex<double>, ColMajor, int >()) );\n  CALL_SUBTEST_22( (test_cholmod_T<std::complex<double>, ColMajor, long>()) );\n  // TODO complex row-major matrices do not work at the moment:\n  // CALL_SUBTEST_23( (test_cholmod_T<std::complex<double>, RowMajor, int >()) );\n  // CALL_SUBTEST_24( (test_cholmod_T<std::complex<double>, RowMajor, long>()) );\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/commainitializer.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n\ntemplate<int M1, int M2, int N1, int N2>\nvoid test_blocks()\n{\n  Matrix<int, M1+M2, N1+N2> m_fixed;\n  MatrixXi m_dynamic(M1+M2, N1+N2);\n\n  Matrix<int, M1, N1> mat11; mat11.setRandom();\n  Matrix<int, M1, N2> mat12; mat12.setRandom();\n  Matrix<int, M2, N1> mat21; mat21.setRandom();\n  Matrix<int, M2, N2> mat22; mat22.setRandom();\n\n  MatrixXi matx11 = mat11, matx12 = mat12, matx21 = mat21, matx22 = mat22;\n\n  {\n    VERIFY_IS_EQUAL((m_fixed << mat11, mat12, mat21, matx22).finished(), (m_dynamic << mat11, matx12, mat21, matx22).finished());\n    VERIFY_IS_EQUAL((m_fixed.template topLeftCorner<M1,N1>()), mat11);\n    VERIFY_IS_EQUAL((m_fixed.template topRightCorner<M1,N2>()), mat12);\n    VERIFY_IS_EQUAL((m_fixed.template bottomLeftCorner<M2,N1>()), mat21);\n    VERIFY_IS_EQUAL((m_fixed.template bottomRightCorner<M2,N2>()), mat22);\n    VERIFY_IS_EQUAL((m_fixed << mat12, mat11, matx21, mat22).finished(), (m_dynamic << mat12, matx11, matx21, mat22).finished());\n  }\n\n  if(N1 > 0)\n  {\n    if(M1 > 0)\n    {\n      VERIFY_RAISES_ASSERT((m_fixed << mat11, mat12, mat11, mat21, mat22));\n    }\n    if(M2 > 0)\n    {\n      VERIFY_RAISES_ASSERT((m_fixed << mat11, mat12, mat21, mat21, mat22));\n    }\n  }\n  else\n  {\n    // allow insertion of zero-column blocks:\n    VERIFY_IS_EQUAL((m_fixed << mat11, mat12, mat11, mat11, mat21, mat21, mat22).finished(), (m_dynamic << mat12, mat22).finished());\n  }\n  if(M1 != M2)\n  {\n    VERIFY_RAISES_ASSERT((m_fixed << mat11, mat21, mat12, mat22));\n  }\n}\n\n\ntemplate<int depth, int N=0>\nstruct test_block_recursion\n{\n  static void run()\n  {\n    test_block_recursion<depth-1, N>::run();\n    test_block_recursion<depth-1, N + (1 << (depth-1))>::run();\n  }\n};\n\ntemplate<int N>\nstruct test_block_recursion<0,N>\n{\n  static void run() {\n    test_blocks<(N>>6)&3, (N>>4)&3, (N>>2)&3, N & 3>();\n  }\n};\n\nEIGEN_DECLARE_TEST(commainitializer)\n{\n  Matrix3d m3;\n  Matrix4d m4;\n\n  VERIFY_RAISES_ASSERT( (m3 << 1, 2, 3, 4, 5, 6, 7, 8) );\n  \n  #ifndef _MSC_VER\n  VERIFY_RAISES_ASSERT( (m3 << 1, 2, 3, 4, 5, 6, 7, 8, 9, 10) );\n  #endif\n\n  double data[] = {1, 2, 3, 4, 5, 6, 7, 8, 9};\n  Matrix3d ref = Map<Matrix<double,3,3,RowMajor> >(data);\n\n  m3 = Matrix3d::Random();\n  m3 << 1, 2, 3, 4, 5, 6, 7, 8, 9;\n  VERIFY_IS_APPROX(m3, ref );\n\n  Vector3d vec[3];\n  vec[0] << 1, 4, 7;\n  vec[1] << 2, 5, 8;\n  vec[2] << 3, 6, 9;\n  m3 = Matrix3d::Random();\n  m3 << vec[0], vec[1], vec[2];\n  VERIFY_IS_APPROX(m3, ref);\n\n  vec[0] << 1, 2, 3;\n  vec[1] << 4, 5, 6;\n  vec[2] << 7, 8, 9;\n  m3 = Matrix3d::Random();\n  m3 << vec[0].transpose(),\n        4, 5, 6,\n        vec[2].transpose();\n  VERIFY_IS_APPROX(m3, ref);\n\n\n  // recursively test all block-sizes from 0 to 3:\n  test_block_recursion<8>::run();\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/conjugate_gradient.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2011 Gael Guennebaud <g.gael@free.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"sparse_solver.h\"\n#include <Eigen/IterativeLinearSolvers>\n\ntemplate<typename T, typename I_> void test_conjugate_gradient_T()\n{\n  typedef SparseMatrix<T,0,I_> SparseMatrixType;\n  ConjugateGradient<SparseMatrixType, Lower      > cg_colmajor_lower_diag;\n  ConjugateGradient<SparseMatrixType, Upper      > cg_colmajor_upper_diag;\n  ConjugateGradient<SparseMatrixType, Lower|Upper> cg_colmajor_loup_diag;\n  ConjugateGradient<SparseMatrixType, Lower, IdentityPreconditioner> cg_colmajor_lower_I;\n  ConjugateGradient<SparseMatrixType, Upper, IdentityPreconditioner> cg_colmajor_upper_I;\n\n  CALL_SUBTEST( check_sparse_spd_solving(cg_colmajor_lower_diag)  );\n  CALL_SUBTEST( check_sparse_spd_solving(cg_colmajor_upper_diag)  );\n  CALL_SUBTEST( check_sparse_spd_solving(cg_colmajor_loup_diag)   );\n  CALL_SUBTEST( check_sparse_spd_solving(cg_colmajor_lower_I)     );\n  CALL_SUBTEST( check_sparse_spd_solving(cg_colmajor_upper_I)     );\n}\n\nEIGEN_DECLARE_TEST(conjugate_gradient)\n{\n  CALL_SUBTEST_1(( test_conjugate_gradient_T<double,int>() ));\n  CALL_SUBTEST_2(( test_conjugate_gradient_T<std::complex<double>, int>() ));\n  CALL_SUBTEST_3(( test_conjugate_gradient_T<double,long int>() ));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/conservative_resize.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Hauke Heibel <hauke.heibel@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/Core>\n#include \"AnnoyingScalar.h\"\n\nusing namespace Eigen;\n\ntemplate <typename Scalar, int Storage>\nvoid run_matrix_tests()\n{\n  typedef Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic, Storage> MatrixType;\n\n  MatrixType m, n;\n\n  // boundary cases ...\n  m = n = MatrixType::Random(50,50);\n  m.conservativeResize(1,50);\n  VERIFY_IS_APPROX(m, n.block(0,0,1,50));\n\n  m = n = MatrixType::Random(50,50);\n  m.conservativeResize(50,1);\n  VERIFY_IS_APPROX(m, n.block(0,0,50,1));\n\n  m = n = MatrixType::Random(50,50);\n  m.conservativeResize(50,50);\n  VERIFY_IS_APPROX(m, n.block(0,0,50,50));\n\n  // random shrinking ...\n  for (int i=0; i<25; ++i)\n  {\n    const Index rows = internal::random<Index>(1,50);\n    const Index cols = internal::random<Index>(1,50);\n    m = n = MatrixType::Random(50,50);\n    m.conservativeResize(rows,cols);\n    VERIFY_IS_APPROX(m, n.block(0,0,rows,cols));\n  }\n\n  // random growing with zeroing ...\n  for (int i=0; i<25; ++i)\n  {\n    const Index rows = internal::random<Index>(50,75);\n    const Index cols = internal::random<Index>(50,75);\n    m = n = MatrixType::Random(50,50);\n    m.conservativeResizeLike(MatrixType::Zero(rows,cols));\n    VERIFY_IS_APPROX(m.block(0,0,n.rows(),n.cols()), n);\n    VERIFY( rows<=50 || m.block(50,0,rows-50,cols).sum() == Scalar(0) );\n    VERIFY( cols<=50 || m.block(0,50,rows,cols-50).sum() == Scalar(0) );\n  }\n}\n\ntemplate <typename Scalar>\nvoid run_vector_tests()\n{\n  typedef Matrix<Scalar, 1, Eigen::Dynamic> VectorType;\n\n  VectorType m, n;\n\n  // boundary cases ...\n  m = n = VectorType::Random(50);\n  m.conservativeResize(1);\n  VERIFY_IS_APPROX(m, n.segment(0,1));\n\n  m = n = VectorType::Random(50);\n  m.conservativeResize(50);\n  VERIFY_IS_APPROX(m, n.segment(0,50));\n  \n  m = n = VectorType::Random(50);\n  m.conservativeResize(m.rows(),1);\n  VERIFY_IS_APPROX(m, n.segment(0,1));\n\n  m = n = VectorType::Random(50);\n  m.conservativeResize(m.rows(),50);\n  VERIFY_IS_APPROX(m, n.segment(0,50));\n\n  // random shrinking ...\n  for (int i=0; i<50; ++i)\n  {\n    const int size = internal::random<int>(1,50);\n    m = n = VectorType::Random(50);\n    m.conservativeResize(size);\n    VERIFY_IS_APPROX(m, n.segment(0,size));\n    \n    m = n = VectorType::Random(50);\n    m.conservativeResize(m.rows(), size);\n    VERIFY_IS_APPROX(m, n.segment(0,size));\n  }\n\n  // random growing with zeroing ...\n  for (int i=0; i<50; ++i)\n  {\n    const int size = internal::random<int>(50,100);\n    m = n = VectorType::Random(50);\n    m.conservativeResizeLike(VectorType::Zero(size));\n    VERIFY_IS_APPROX(m.segment(0,50), n);\n    VERIFY( size<=50 || m.segment(50,size-50).sum() == Scalar(0) );\n    \n    m = n = VectorType::Random(50);\n    m.conservativeResizeLike(Matrix<Scalar,Dynamic,Dynamic>::Zero(1,size));\n    VERIFY_IS_APPROX(m.segment(0,50), n);\n    VERIFY( size<=50 || m.segment(50,size-50).sum() == Scalar(0) );\n  }\n}\n\n// Basic memory leak check with a non-copyable scalar type\ntemplate<int> void noncopyable()\n{\n  typedef Eigen::Matrix<AnnoyingScalar,Dynamic,1> VectorType;\n  typedef Eigen::Matrix<AnnoyingScalar,Dynamic,Dynamic> MatrixType;\n  \n  {\n    AnnoyingScalar::dont_throw = true;\n    int n = 50;\n    VectorType v0(n), v1(n);\n    MatrixType m0(n,n), m1(n,n), m2(n,n);\n    v0.setOnes(); v1.setOnes();\n    m0.setOnes(); m1.setOnes(); m2.setOnes();\n    VERIFY(m0==m1);\n    m0.conservativeResize(2*n,2*n);\n    VERIFY(m0.topLeftCorner(n,n) == m1);\n    \n    VERIFY(v0.head(n) == v1);\n    v0.conservativeResize(2*n);\n    VERIFY(v0.head(n) == v1);\n  }\n  VERIFY(AnnoyingScalar::instances==0 && \"global memory leak detected in noncopyable\");\n}\n\nEIGEN_DECLARE_TEST(conservative_resize)\n{\n  for(int i=0; i<g_repeat; ++i)\n  {\n    CALL_SUBTEST_1((run_matrix_tests<int, Eigen::RowMajor>()));\n    CALL_SUBTEST_1((run_matrix_tests<int, Eigen::ColMajor>()));\n    CALL_SUBTEST_2((run_matrix_tests<float, Eigen::RowMajor>()));\n    CALL_SUBTEST_2((run_matrix_tests<float, Eigen::ColMajor>()));\n    CALL_SUBTEST_3((run_matrix_tests<double, Eigen::RowMajor>()));\n    CALL_SUBTEST_3((run_matrix_tests<double, Eigen::ColMajor>()));\n    CALL_SUBTEST_4((run_matrix_tests<std::complex<float>, Eigen::RowMajor>()));\n    CALL_SUBTEST_4((run_matrix_tests<std::complex<float>, Eigen::ColMajor>()));\n    CALL_SUBTEST_5((run_matrix_tests<std::complex<double>, Eigen::RowMajor>()));\n    CALL_SUBTEST_5((run_matrix_tests<std::complex<double>, Eigen::ColMajor>()));\n\n    CALL_SUBTEST_1((run_vector_tests<int>()));\n    CALL_SUBTEST_2((run_vector_tests<float>()));\n    CALL_SUBTEST_3((run_vector_tests<double>()));\n    CALL_SUBTEST_4((run_vector_tests<std::complex<float> >()));\n    CALL_SUBTEST_5((run_vector_tests<std::complex<double> >()));\n\n    AnnoyingScalar::dont_throw = true;\n    CALL_SUBTEST_6(( run_vector_tests<AnnoyingScalar>() ));\n    CALL_SUBTEST_6(( noncopyable<0>() ));\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/constructor.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2017 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n\n#define TEST_ENABLE_TEMPORARY_TRACKING\n\n#include \"main.h\"\n\ntemplate<typename MatrixType> struct Wrapper\n{\n  MatrixType m_mat;\n  inline Wrapper(const MatrixType &x) : m_mat(x) {}\n  inline operator const MatrixType& () const { return m_mat; }\n  inline operator MatrixType& () { return m_mat; }\n};\n\nenum my_sizes { M = 12, N = 7};\n\ntemplate<typename MatrixType> void ctor_init1(const MatrixType& m)\n{\n  // Check logic in PlainObjectBase::_init1\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  MatrixType m0 = MatrixType::Random(rows,cols);\n\n  VERIFY_EVALUATION_COUNT( MatrixType m1(m0), 1);\n  VERIFY_EVALUATION_COUNT( MatrixType m2(m0+m0), 1);\n  VERIFY_EVALUATION_COUNT( MatrixType m2(m0.block(0,0,rows,cols)) , 1);\n\n  Wrapper<MatrixType> wrapper(m0);\n  VERIFY_EVALUATION_COUNT( MatrixType m3(wrapper) , 1);\n}\n\n\nEIGEN_DECLARE_TEST(constructor)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( ctor_init1(Matrix<float, 1, 1>()) );\n    CALL_SUBTEST_1( ctor_init1(Matrix4d()) );\n    CALL_SUBTEST_1( ctor_init1(MatrixXcf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_1( ctor_init1(MatrixXi(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n  }\n  {\n    Matrix<Index,1,1> a(123);\n    VERIFY_IS_EQUAL(a[0], 123);\n  }\n  {\n    Matrix<Index,1,1> a(123.0);\n    VERIFY_IS_EQUAL(a[0], 123);\n  }\n  {\n    Matrix<float,1,1> a(123);\n    VERIFY_IS_EQUAL(a[0], 123.f);\n  }\n  {\n    Array<Index,1,1> a(123);\n    VERIFY_IS_EQUAL(a[0], 123);\n  }\n  {\n    Array<Index,1,1> a(123.0);\n    VERIFY_IS_EQUAL(a[0], 123);\n  }\n  {\n    Array<float,1,1> a(123);\n    VERIFY_IS_EQUAL(a[0], 123.f);\n  }\n  {\n    Array<Index,3,3> a(123);\n    VERIFY_IS_EQUAL(a(4), 123);\n  }\n  {\n    Array<Index,3,3> a(123.0);\n    VERIFY_IS_EQUAL(a(4), 123);\n  }\n  {\n    Array<float,3,3> a(123);\n    VERIFY_IS_EQUAL(a(4), 123.f);\n  }\n  {\n    MatrixXi m1(M,N);\n    VERIFY_IS_EQUAL(m1.rows(),M);\n    VERIFY_IS_EQUAL(m1.cols(),N);\n    ArrayXXi a1(M,N);\n    VERIFY_IS_EQUAL(a1.rows(),M);\n    VERIFY_IS_EQUAL(a1.cols(),N);\n    VectorXi v1(M);\n    VERIFY_IS_EQUAL(v1.size(),M);\n    ArrayXi a2(M);\n    VERIFY_IS_EQUAL(a2.size(),M);\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/corners.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2010 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#define COMPARE_CORNER(A,B) \\\n  VERIFY_IS_EQUAL(matrix.A, matrix.B); \\\n  VERIFY_IS_EQUAL(const_matrix.A, const_matrix.B);\n\ntemplate<typename MatrixType> void corners(const MatrixType& m)\n{\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  Index r = internal::random<Index>(1,rows);\n  Index c = internal::random<Index>(1,cols);\n\n  MatrixType matrix = MatrixType::Random(rows,cols);\n  const MatrixType const_matrix = MatrixType::Random(rows,cols);\n\n  COMPARE_CORNER(topLeftCorner(r,c), block(0,0,r,c));\n  COMPARE_CORNER(topRightCorner(r,c), block(0,cols-c,r,c));\n  COMPARE_CORNER(bottomLeftCorner(r,c), block(rows-r,0,r,c));\n  COMPARE_CORNER(bottomRightCorner(r,c), block(rows-r,cols-c,r,c));\n\n  Index sr = internal::random<Index>(1,rows) - 1;\n  Index nr = internal::random<Index>(1,rows-sr);\n  Index sc = internal::random<Index>(1,cols) - 1;\n  Index nc = internal::random<Index>(1,cols-sc);\n\n  COMPARE_CORNER(topRows(r), block(0,0,r,cols));\n  COMPARE_CORNER(middleRows(sr,nr), block(sr,0,nr,cols));\n  COMPARE_CORNER(bottomRows(r), block(rows-r,0,r,cols));\n  COMPARE_CORNER(leftCols(c), block(0,0,rows,c));\n  COMPARE_CORNER(middleCols(sc,nc), block(0,sc,rows,nc));\n  COMPARE_CORNER(rightCols(c), block(0,cols-c,rows,c));\n}\n\ntemplate<typename MatrixType, int CRows, int CCols, int SRows, int SCols> void corners_fixedsize()\n{\n  MatrixType matrix = MatrixType::Random();\n  const MatrixType const_matrix = MatrixType::Random();\n\n  enum {\n    rows = MatrixType::RowsAtCompileTime,\n    cols = MatrixType::ColsAtCompileTime,\n    r = CRows,\n    c = CCols,\n\tsr = SRows,\n\tsc = SCols\n  };\n\n  VERIFY_IS_EQUAL((matrix.template topLeftCorner<r,c>()), (matrix.template block<r,c>(0,0)));\n  VERIFY_IS_EQUAL((matrix.template topRightCorner<r,c>()), (matrix.template block<r,c>(0,cols-c)));\n  VERIFY_IS_EQUAL((matrix.template bottomLeftCorner<r,c>()), (matrix.template block<r,c>(rows-r,0)));\n  VERIFY_IS_EQUAL((matrix.template bottomRightCorner<r,c>()), (matrix.template block<r,c>(rows-r,cols-c)));\n\n  VERIFY_IS_EQUAL((matrix.template topLeftCorner<r,c>()), (matrix.template topLeftCorner<r,Dynamic>(r,c)));\n  VERIFY_IS_EQUAL((matrix.template topRightCorner<r,c>()), (matrix.template topRightCorner<r,Dynamic>(r,c)));\n  VERIFY_IS_EQUAL((matrix.template bottomLeftCorner<r,c>()), (matrix.template bottomLeftCorner<r,Dynamic>(r,c)));\n  VERIFY_IS_EQUAL((matrix.template bottomRightCorner<r,c>()), (matrix.template bottomRightCorner<r,Dynamic>(r,c)));\n\n  VERIFY_IS_EQUAL((matrix.template topLeftCorner<r,c>()), (matrix.template topLeftCorner<Dynamic,c>(r,c)));\n  VERIFY_IS_EQUAL((matrix.template topRightCorner<r,c>()), (matrix.template topRightCorner<Dynamic,c>(r,c)));\n  VERIFY_IS_EQUAL((matrix.template bottomLeftCorner<r,c>()), (matrix.template bottomLeftCorner<Dynamic,c>(r,c)));\n  VERIFY_IS_EQUAL((matrix.template bottomRightCorner<r,c>()), (matrix.template bottomRightCorner<Dynamic,c>(r,c)));\n\n  VERIFY_IS_EQUAL((matrix.template topRows<r>()), (matrix.template block<r,cols>(0,0)));\n  VERIFY_IS_EQUAL((matrix.template middleRows<r>(sr)), (matrix.template block<r,cols>(sr,0)));\n  VERIFY_IS_EQUAL((matrix.template bottomRows<r>()), (matrix.template block<r,cols>(rows-r,0)));\n  VERIFY_IS_EQUAL((matrix.template leftCols<c>()), (matrix.template block<rows,c>(0,0)));\n  VERIFY_IS_EQUAL((matrix.template middleCols<c>(sc)), (matrix.template block<rows,c>(0,sc)));\n  VERIFY_IS_EQUAL((matrix.template rightCols<c>()), (matrix.template block<rows,c>(0,cols-c)));\n\n  VERIFY_IS_EQUAL((const_matrix.template topLeftCorner<r,c>()), (const_matrix.template block<r,c>(0,0)));\n  VERIFY_IS_EQUAL((const_matrix.template topRightCorner<r,c>()), (const_matrix.template block<r,c>(0,cols-c)));\n  VERIFY_IS_EQUAL((const_matrix.template bottomLeftCorner<r,c>()), (const_matrix.template block<r,c>(rows-r,0)));\n  VERIFY_IS_EQUAL((const_matrix.template bottomRightCorner<r,c>()), (const_matrix.template block<r,c>(rows-r,cols-c)));\n\n  VERIFY_IS_EQUAL((const_matrix.template topLeftCorner<r,c>()), (const_matrix.template topLeftCorner<r,Dynamic>(r,c)));\n  VERIFY_IS_EQUAL((const_matrix.template topRightCorner<r,c>()), (const_matrix.template topRightCorner<r,Dynamic>(r,c)));\n  VERIFY_IS_EQUAL((const_matrix.template bottomLeftCorner<r,c>()), (const_matrix.template bottomLeftCorner<r,Dynamic>(r,c)));\n  VERIFY_IS_EQUAL((const_matrix.template bottomRightCorner<r,c>()), (const_matrix.template bottomRightCorner<r,Dynamic>(r,c)));\n\n  VERIFY_IS_EQUAL((const_matrix.template topLeftCorner<r,c>()), (const_matrix.template topLeftCorner<Dynamic,c>(r,c)));\n  VERIFY_IS_EQUAL((const_matrix.template topRightCorner<r,c>()), (const_matrix.template topRightCorner<Dynamic,c>(r,c)));\n  VERIFY_IS_EQUAL((const_matrix.template bottomLeftCorner<r,c>()), (const_matrix.template bottomLeftCorner<Dynamic,c>(r,c)));\n  VERIFY_IS_EQUAL((const_matrix.template bottomRightCorner<r,c>()), (const_matrix.template bottomRightCorner<Dynamic,c>(r,c)));\n\n  VERIFY_IS_EQUAL((const_matrix.template topRows<r>()), (const_matrix.template block<r,cols>(0,0)));\n  VERIFY_IS_EQUAL((const_matrix.template middleRows<r>(sr)), (const_matrix.template block<r,cols>(sr,0)));\n  VERIFY_IS_EQUAL((const_matrix.template bottomRows<r>()), (const_matrix.template block<r,cols>(rows-r,0)));\n  VERIFY_IS_EQUAL((const_matrix.template leftCols<c>()), (const_matrix.template block<rows,c>(0,0)));\n  VERIFY_IS_EQUAL((const_matrix.template middleCols<c>(sc)), (const_matrix.template block<rows,c>(0,sc)));\n  VERIFY_IS_EQUAL((const_matrix.template rightCols<c>()), (const_matrix.template block<rows,c>(0,cols-c)));\n}\n\nEIGEN_DECLARE_TEST(corners)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( corners(Matrix<float, 1, 1>()) );\n    CALL_SUBTEST_2( corners(Matrix4d()) );\n    CALL_SUBTEST_3( corners(Matrix<int,10,12>()) );\n    CALL_SUBTEST_4( corners(MatrixXcf(5, 7)) );\n    CALL_SUBTEST_5( corners(MatrixXf(21, 20)) );\n\n    CALL_SUBTEST_1(( corners_fixedsize<Matrix<float, 1, 1>, 1, 1, 0, 0>() ));\n    CALL_SUBTEST_2(( corners_fixedsize<Matrix4d,2,2,1,1>() ));\n    CALL_SUBTEST_3(( corners_fixedsize<Matrix<int,10,12>,4,7,5,2>() ));\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/ctorleak.cpp",
    "content": "#include \"main.h\"\n\n#include <exception>  // std::exception\n\nstruct Foo\n{\n  static Index object_count;\n  static Index object_limit;\n  int dummy;\n\n  Foo() : dummy(0)\n  {\n#ifdef EIGEN_EXCEPTIONS\n    // TODO: Is this the correct way to handle this?\n    if (Foo::object_count > Foo::object_limit) { std::cout << \"\\nThrow!\\n\"; throw Foo::Fail(); }\n#endif\n\t  std::cout << '+';\n    ++Foo::object_count;\n  }\n\n  ~Foo()\n  {\n\t  std::cout << '-';\n    --Foo::object_count;\n  }\n\n  class Fail : public std::exception {};\n};\n\nIndex Foo::object_count = 0;\nIndex Foo::object_limit = 0;\n\n#undef EIGEN_TEST_MAX_SIZE\n#define EIGEN_TEST_MAX_SIZE 3\n\nEIGEN_DECLARE_TEST(ctorleak)\n{\n  typedef Matrix<Foo, Dynamic, Dynamic> MatrixX;\n  typedef Matrix<Foo, Dynamic, 1> VectorX;\n  \n  Foo::object_count = 0;\n  for(int i = 0; i < g_repeat; i++) {\n    Index rows = internal::random<Index>(2,EIGEN_TEST_MAX_SIZE), cols = internal::random<Index>(2,EIGEN_TEST_MAX_SIZE);\n    Foo::object_limit = rows*cols;\n    {\n    MatrixX r(rows, cols);\n    Foo::object_limit = r.size()+internal::random<Index>(0, rows*cols - 2);\n    std::cout << \"object_limit =\" << Foo::object_limit << std::endl;\n#ifdef EIGEN_EXCEPTIONS\n    try\n    {\n#endif\n      if(internal::random<bool>()) {\n        std::cout <<       \"\\nMatrixX m(\" << rows << \", \" << cols << \");\\n\";\n        MatrixX m(rows, cols);\n      }\n      else {\n        std::cout <<       \"\\nMatrixX m(r);\\n\";\n        MatrixX m(r);\n      }\n#ifdef EIGEN_EXCEPTIONS\n      VERIFY(false);  // not reached if exceptions are enabled\n    }\n    catch (const Foo::Fail&) { /* ignore */ }\n#endif\n    }\n    VERIFY_IS_EQUAL(Index(0), Foo::object_count);\n\n    {\n      Foo::object_limit = (rows+1)*(cols+1);\n      MatrixX A(rows, cols);\n      VERIFY_IS_EQUAL(Foo::object_count, rows*cols);\n      VectorX v=A.row(0);\n      VERIFY_IS_EQUAL(Foo::object_count, (rows+1)*cols);\n      v = A.col(0);\n      VERIFY_IS_EQUAL(Foo::object_count, rows*(cols+1));\n    }\n    VERIFY_IS_EQUAL(Index(0), Foo::object_count);\n  }\n  std::cout << \"\\n\";\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/denseLM.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Desire Nuentsa <desire.nuentsa_wakam@inria.fr>\n// Copyright (C) 2012 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include <iostream>\n#include <fstream>\n#include <iomanip>\n\n#include \"main.h\"\n#include <Eigen/LevenbergMarquardt>\nusing namespace std;\nusing namespace Eigen;\n\ntemplate<typename Scalar>\nstruct DenseLM : DenseFunctor<Scalar>\n{\n  typedef DenseFunctor<Scalar> Base;\n  typedef typename Base::JacobianType JacobianType;\n  typedef Matrix<Scalar,Dynamic,1> VectorType;\n  \n  DenseLM(int n, int m) : DenseFunctor<Scalar>(n,m) \n  { }\n \n  VectorType model(const VectorType& uv, VectorType& x)\n  {\n    VectorType y; // Should change to use expression template\n    int m = Base::values(); \n    int n = Base::inputs();\n    eigen_assert(uv.size()%2 == 0);\n    eigen_assert(uv.size() == n);\n    eigen_assert(x.size() == m);\n    y.setZero(m);\n    int half = n/2;\n    VectorBlock<const VectorType> u(uv, 0, half);\n    VectorBlock<const VectorType> v(uv, half, half);\n    for (int j = 0; j < m; j++)\n    {\n      for (int i = 0; i < half; i++)\n        y(j) += u(i)*std::exp(-(x(j)-i)*(x(j)-i)/(v(i)*v(i)));\n    }\n    return y;\n    \n  }\n  void initPoints(VectorType& uv_ref, VectorType& x)\n  {\n    m_x = x;\n    m_y = this->model(uv_ref, x);\n  }\n  \n  int operator()(const VectorType& uv, VectorType& fvec)\n  {\n    \n    int m = Base::values(); \n    int n = Base::inputs();\n    eigen_assert(uv.size()%2 == 0);\n    eigen_assert(uv.size() == n);\n    eigen_assert(fvec.size() == m);\n    int half = n/2;\n    VectorBlock<const VectorType> u(uv, 0, half);\n    VectorBlock<const VectorType> v(uv, half, half);\n    for (int j = 0; j < m; j++)\n    {\n      fvec(j) = m_y(j);\n      for (int i = 0; i < half; i++)\n      {\n        fvec(j) -= u(i) *std::exp(-(m_x(j)-i)*(m_x(j)-i)/(v(i)*v(i)));\n      }\n    }\n    \n    return 0;\n  }\n  int df(const VectorType& uv, JacobianType& fjac)\n  {\n    int m = Base::values(); \n    int n = Base::inputs();\n    eigen_assert(n == uv.size());\n    eigen_assert(fjac.rows() == m);\n    eigen_assert(fjac.cols() == n);\n    int half = n/2;\n    VectorBlock<const VectorType> u(uv, 0, half);\n    VectorBlock<const VectorType> v(uv, half, half);\n    for (int j = 0; j < m; j++)\n    {\n      for (int i = 0; i < half; i++)\n      {\n        fjac.coeffRef(j,i) = -std::exp(-(m_x(j)-i)*(m_x(j)-i)/(v(i)*v(i)));\n        fjac.coeffRef(j,i+half) = -2.*u(i)*(m_x(j)-i)*(m_x(j)-i)/(std::pow(v(i),3)) * std::exp(-(m_x(j)-i)*(m_x(j)-i)/(v(i)*v(i)));\n      }\n    }\n    return 0;\n  }\n  VectorType m_x, m_y; //Data Points\n};\n\ntemplate<typename FunctorType, typename VectorType>\nint test_minimizeLM(FunctorType& functor, VectorType& uv)\n{\n  LevenbergMarquardt<FunctorType> lm(functor);\n  LevenbergMarquardtSpace::Status info; \n  \n  info = lm.minimize(uv);\n  \n  VERIFY_IS_EQUAL(info, 1);\n  //FIXME Check other parameters\n  return info;\n}\n\ntemplate<typename FunctorType, typename VectorType>\nint test_lmder(FunctorType& functor, VectorType& uv)\n{\n  typedef typename VectorType::Scalar Scalar;\n  LevenbergMarquardtSpace::Status info; \n  LevenbergMarquardt<FunctorType> lm(functor);\n  info = lm.lmder1(uv);\n  \n  VERIFY_IS_EQUAL(info, 1);\n  //FIXME Check other parameters\n  return info;\n}\n\ntemplate<typename FunctorType, typename VectorType>\nint test_minimizeSteps(FunctorType& functor, VectorType& uv)\n{\n  LevenbergMarquardtSpace::Status info;   \n  LevenbergMarquardt<FunctorType> lm(functor);\n  info = lm.minimizeInit(uv);\n  if (info==LevenbergMarquardtSpace::ImproperInputParameters)\n      return info;\n  do \n  {\n    info = lm.minimizeOneStep(uv);\n  } while (info==LevenbergMarquardtSpace::Running);\n  \n  VERIFY_IS_EQUAL(info, 1);\n  //FIXME Check other parameters\n  return info;\n}\n\ntemplate<typename T>\nvoid test_denseLM_T()\n{\n  typedef Matrix<T,Dynamic,1> VectorType;\n  \n  int inputs = 10; \n  int values = 1000; \n  DenseLM<T> dense_gaussian(inputs, values);\n  VectorType uv(inputs),uv_ref(inputs);\n  VectorType x(values);\n  \n  // Generate the reference solution \n  uv_ref << -2, 1, 4 ,8, 6, 1.8, 1.2, 1.1, 1.9 , 3;\n  \n  //Generate the reference data points\n  x.setRandom();\n  x = 10*x;\n  x.array() += 10;\n  dense_gaussian.initPoints(uv_ref, x);\n  \n  // Generate the initial parameters \n  VectorBlock<VectorType> u(uv, 0, inputs/2); \n  VectorBlock<VectorType> v(uv, inputs/2, inputs/2);\n  \n  // Solve the optimization problem\n  \n  //Solve in one go\n  u.setOnes(); v.setOnes();\n  test_minimizeLM(dense_gaussian, uv);\n  \n  //Solve until the machine precision\n  u.setOnes(); v.setOnes();\n  test_lmder(dense_gaussian, uv); \n  \n  // Solve step by step\n  v.setOnes(); u.setOnes();\n  test_minimizeSteps(dense_gaussian, uv);\n  \n}\n\nEIGEN_DECLARE_TEST(denseLM)\n{\n  CALL_SUBTEST_2(test_denseLM_T<double>());\n  \n  // CALL_SUBTEST_2(test_sparseLM_T<std::complex<double>());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/dense_storage.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2013 Hauke Heibel <hauke.heibel@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/Core>\n\ntemplate <typename T, int Rows, int Cols>\nvoid dense_storage_copy()\n{\n  static const int Size = ((Rows==Dynamic || Cols==Dynamic) ? Dynamic : Rows*Cols);\n  typedef DenseStorage<T,Size, Rows,Cols, 0> DenseStorageType;\n  \n  const int rows = (Rows==Dynamic) ? 4 : Rows;\n  const int cols = (Cols==Dynamic) ? 3 : Cols;\n  const int size = rows*cols;\n  DenseStorageType reference(size, rows, cols);\n  T* raw_reference = reference.data();\n  for (int i=0; i<size; ++i)\n    raw_reference[i] = static_cast<T>(i);\n    \n  DenseStorageType copied_reference(reference);\n  const T* raw_copied_reference = copied_reference.data();\n  for (int i=0; i<size; ++i)\n    VERIFY_IS_EQUAL(raw_reference[i], raw_copied_reference[i]);\n}\n\ntemplate <typename T, int Rows, int Cols>\nvoid dense_storage_assignment()\n{\n  static const int Size = ((Rows==Dynamic || Cols==Dynamic) ? Dynamic : Rows*Cols);\n  typedef DenseStorage<T,Size, Rows,Cols, 0> DenseStorageType;\n  \n  const int rows = (Rows==Dynamic) ? 4 : Rows;\n  const int cols = (Cols==Dynamic) ? 3 : Cols;\n  const int size = rows*cols;\n  DenseStorageType reference(size, rows, cols);\n  T* raw_reference = reference.data();\n  for (int i=0; i<size; ++i)\n    raw_reference[i] = static_cast<T>(i);\n    \n  DenseStorageType copied_reference;\n  copied_reference = reference;\n  const T* raw_copied_reference = copied_reference.data();\n  for (int i=0; i<size; ++i)\n    VERIFY_IS_EQUAL(raw_reference[i], raw_copied_reference[i]);\n}\n\ntemplate<typename T, int Size, std::size_t Alignment>\nvoid dense_storage_alignment()\n{\n  #if EIGEN_HAS_ALIGNAS\n  \n  struct alignas(Alignment) Empty1 {};\n  VERIFY_IS_EQUAL(std::alignment_of<Empty1>::value, Alignment);\n\n  struct EIGEN_ALIGN_TO_BOUNDARY(Alignment) Empty2 {};\n  VERIFY_IS_EQUAL(std::alignment_of<Empty2>::value, Alignment);\n\n  struct Nested1 { EIGEN_ALIGN_TO_BOUNDARY(Alignment) T data[Size]; };\n  VERIFY_IS_EQUAL(std::alignment_of<Nested1>::value, Alignment);\n\n  VERIFY_IS_EQUAL( (std::alignment_of<internal::plain_array<T,Size,AutoAlign,Alignment> >::value), Alignment);\n\n  const std::size_t default_alignment = internal::compute_default_alignment<T,Size>::value;\n\n  VERIFY_IS_EQUAL( (std::alignment_of<DenseStorage<T,Size,1,1,AutoAlign> >::value), default_alignment);\n  VERIFY_IS_EQUAL( (std::alignment_of<Matrix<T,Size,1,AutoAlign> >::value), default_alignment);\n  struct Nested2 { Matrix<T,Size,1,AutoAlign> mat; };\n  VERIFY_IS_EQUAL(std::alignment_of<Nested2>::value, default_alignment);\n\n  #endif\n}\n\nEIGEN_DECLARE_TEST(dense_storage)\n{\n  dense_storage_copy<int,Dynamic,Dynamic>();  \n  dense_storage_copy<int,Dynamic,3>();\n  dense_storage_copy<int,4,Dynamic>();\n  dense_storage_copy<int,4,3>();\n\n  dense_storage_copy<float,Dynamic,Dynamic>();\n  dense_storage_copy<float,Dynamic,3>();\n  dense_storage_copy<float,4,Dynamic>();  \n  dense_storage_copy<float,4,3>();\n  \n  dense_storage_assignment<int,Dynamic,Dynamic>();  \n  dense_storage_assignment<int,Dynamic,3>();\n  dense_storage_assignment<int,4,Dynamic>();\n  dense_storage_assignment<int,4,3>();\n\n  dense_storage_assignment<float,Dynamic,Dynamic>();\n  dense_storage_assignment<float,Dynamic,3>();\n  dense_storage_assignment<float,4,Dynamic>();  \n  dense_storage_assignment<float,4,3>(); \n\n  dense_storage_alignment<float,16,8>();\n  dense_storage_alignment<float,16,16>();\n  dense_storage_alignment<float,16,32>();\n  dense_storage_alignment<float,16,64>();\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/determinant.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <Eigen/LU>\n\ntemplate<typename MatrixType> void determinant(const MatrixType& m)\n{\n  /* this test covers the following files:\n     Determinant.h\n  */\n  Index size = m.rows();\n\n  MatrixType m1(size, size), m2(size, size);\n  m1.setRandom();\n  m2.setRandom();\n  typedef typename MatrixType::Scalar Scalar;\n  Scalar x = internal::random<Scalar>();\n  VERIFY_IS_APPROX(MatrixType::Identity(size, size).determinant(), Scalar(1));\n  VERIFY_IS_APPROX((m1*m2).eval().determinant(), m1.determinant() * m2.determinant());\n  if(size==1) return;\n  Index i = internal::random<Index>(0, size-1);\n  Index j;\n  do {\n    j = internal::random<Index>(0, size-1);\n  } while(j==i);\n  m2 = m1;\n  m2.row(i).swap(m2.row(j));\n  VERIFY_IS_APPROX(m2.determinant(), -m1.determinant());\n  m2 = m1;\n  m2.col(i).swap(m2.col(j));\n  VERIFY_IS_APPROX(m2.determinant(), -m1.determinant());\n  VERIFY_IS_APPROX(m2.determinant(), m2.transpose().determinant());\n  VERIFY_IS_APPROX(numext::conj(m2.determinant()), m2.adjoint().determinant());\n  m2 = m1;\n  m2.row(i) += x*m2.row(j);\n  VERIFY_IS_APPROX(m2.determinant(), m1.determinant());\n  m2 = m1;\n  m2.row(i) *= x;\n  VERIFY_IS_APPROX(m2.determinant(), m1.determinant() * x);\n  \n  // check empty matrix\n  VERIFY_IS_APPROX(m2.block(0,0,0,0).determinant(), Scalar(1));\n}\n\nEIGEN_DECLARE_TEST(determinant)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    int s = 0;\n    CALL_SUBTEST_1( determinant(Matrix<float, 1, 1>()) );\n    CALL_SUBTEST_2( determinant(Matrix<double, 2, 2>()) );\n    CALL_SUBTEST_3( determinant(Matrix<double, 3, 3>()) );\n    CALL_SUBTEST_4( determinant(Matrix<double, 4, 4>()) );\n    CALL_SUBTEST_5( determinant(Matrix<std::complex<double>, 10, 10>()) );\n    s = internal::random<int>(1,EIGEN_TEST_MAX_SIZE/4);\n    CALL_SUBTEST_6( determinant(MatrixXd(s, s)) );\n    TEST_SET_BUT_UNUSED_VARIABLE(s)\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/diagonal.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2010 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\ntemplate<typename MatrixType> void diagonal(const MatrixType& m)\n{\n  typedef typename MatrixType::Scalar Scalar;\n\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  MatrixType m1 = MatrixType::Random(rows, cols),\n             m2 = MatrixType::Random(rows, cols);\n\n  Scalar s1 = internal::random<Scalar>();\n\n  //check diagonal()\n  VERIFY_IS_APPROX(m1.diagonal(), m1.transpose().diagonal());\n  m2.diagonal() = 2 * m1.diagonal();\n  m2.diagonal()[0] *= 3;\n\n  if (rows>2)\n  {\n    enum {\n      N1 = MatrixType::RowsAtCompileTime>2 ?  2 : 0,\n      N2 = MatrixType::RowsAtCompileTime>1 ? -1 : 0\n    };\n\n    // check sub/super diagonal\n    if(MatrixType::SizeAtCompileTime!=Dynamic)\n    {\n      VERIFY(m1.template diagonal<N1>().RowsAtCompileTime == m1.diagonal(N1).size());\n      VERIFY(m1.template diagonal<N2>().RowsAtCompileTime == m1.diagonal(N2).size());\n    }\n\n    m2.template diagonal<N1>() = 2 * m1.template diagonal<N1>();\n    VERIFY_IS_APPROX(m2.template diagonal<N1>(), static_cast<Scalar>(2) * m1.diagonal(N1));\n    m2.template diagonal<N1>()[0] *= 3;\n    VERIFY_IS_APPROX(m2.template diagonal<N1>()[0], static_cast<Scalar>(6) * m1.template diagonal<N1>()[0]);\n\n\n    m2.template diagonal<N2>() = 2 * m1.template diagonal<N2>();\n    m2.template diagonal<N2>()[0] *= 3;\n    VERIFY_IS_APPROX(m2.template diagonal<N2>()[0], static_cast<Scalar>(6) * m1.template diagonal<N2>()[0]);\n\n    m2.diagonal(N1) = 2 * m1.diagonal(N1);\n    VERIFY_IS_APPROX(m2.template diagonal<N1>(), static_cast<Scalar>(2) * m1.diagonal(N1));\n    m2.diagonal(N1)[0] *= 3;\n    VERIFY_IS_APPROX(m2.diagonal(N1)[0], static_cast<Scalar>(6) * m1.diagonal(N1)[0]);\n\n    m2.diagonal(N2) = 2 * m1.diagonal(N2);\n    VERIFY_IS_APPROX(m2.template diagonal<N2>(), static_cast<Scalar>(2) * m1.diagonal(N2));\n    m2.diagonal(N2)[0] *= 3;\n    VERIFY_IS_APPROX(m2.diagonal(N2)[0], static_cast<Scalar>(6) * m1.diagonal(N2)[0]);\n\n    m2.diagonal(N2).x() = s1;\n    VERIFY_IS_APPROX(m2.diagonal(N2).x(), s1);\n    m2.diagonal(N2).coeffRef(0) = Scalar(2)*s1;\n    VERIFY_IS_APPROX(m2.diagonal(N2).coeff(0), Scalar(2)*s1);\n  }\n\n  VERIFY( m1.diagonal( cols).size()==0 );\n  VERIFY( m1.diagonal(-rows).size()==0 );\n}\n\ntemplate<typename MatrixType> void diagonal_assert(const MatrixType& m) {\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  MatrixType m1 = MatrixType::Random(rows, cols);\n\n  if (rows>=2 && cols>=2)\n  {\n    VERIFY_RAISES_ASSERT( m1 += m1.diagonal() );\n    VERIFY_RAISES_ASSERT( m1 -= m1.diagonal() );\n    VERIFY_RAISES_ASSERT( m1.array() *= m1.diagonal().array() );\n    VERIFY_RAISES_ASSERT( m1.array() /= m1.diagonal().array() );\n  }\n\n  VERIFY_RAISES_ASSERT( m1.diagonal(cols+1) );\n  VERIFY_RAISES_ASSERT( m1.diagonal(-(rows+1)) );\n}\n\nEIGEN_DECLARE_TEST(diagonal)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( diagonal(Matrix<float, 1, 1>()) );\n    CALL_SUBTEST_1( diagonal(Matrix<float, 4, 9>()) );\n    CALL_SUBTEST_1( diagonal(Matrix<float, 7, 3>()) );\n    CALL_SUBTEST_2( diagonal(Matrix4d()) );\n    CALL_SUBTEST_2( diagonal(MatrixXcf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_2( diagonal(MatrixXi(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_2( diagonal(MatrixXcd(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_1( diagonal(MatrixXf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_1( diagonal(Matrix<float,Dynamic,4>(3, 4)) );\n    CALL_SUBTEST_1( diagonal_assert(MatrixXf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/diagonal_matrix_variadic_ctor.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2019 David Tellenbach <david.tellenbach@tellnotes.org>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_NO_STATIC_ASSERT\n\n#include \"main.h\"\n\ntemplate <typename Scalar>\nvoid assertionTest()\n{\n  typedef DiagonalMatrix<Scalar, 5> DiagMatrix5;\n  typedef DiagonalMatrix<Scalar, 7> DiagMatrix7;\n  typedef DiagonalMatrix<Scalar, Dynamic> DiagMatrixX;\n\n  Scalar raw[6];\n  for (int i = 0; i < 6; ++i) {\n    raw[i] = internal::random<Scalar>();\n  }\n\n  VERIFY_RAISES_ASSERT((DiagMatrix5{raw[0], raw[1], raw[2], raw[3]}));\n  VERIFY_RAISES_ASSERT((DiagMatrix5{raw[0], raw[1], raw[3]}));\n  VERIFY_RAISES_ASSERT((DiagMatrix7{raw[0], raw[1], raw[2], raw[3]}));\n\n  VERIFY_RAISES_ASSERT((DiagMatrixX {\n    {raw[0], raw[1], raw[2]},\n    {raw[3], raw[4], raw[5]}\n  }));\n}\n\n#define VERIFY_IMPLICIT_CONVERSION_3(DIAGTYPE, V0, V1, V2) \\\n  DIAGTYPE d(V0, V1, V2);                                  \\\n  DIAGTYPE::DenseMatrixType Dense = d.toDenseMatrix();     \\\n  VERIFY_IS_APPROX(Dense(0, 0), (Scalar)V0);               \\\n  VERIFY_IS_APPROX(Dense(1, 1), (Scalar)V1);               \\\n  VERIFY_IS_APPROX(Dense(2, 2), (Scalar)V2);\n\n#define VERIFY_IMPLICIT_CONVERSION_4(DIAGTYPE, V0, V1, V2, V3) \\\n  DIAGTYPE d(V0, V1, V2, V3);                                  \\\n  DIAGTYPE::DenseMatrixType Dense = d.toDenseMatrix();         \\\n  VERIFY_IS_APPROX(Dense(0, 0), (Scalar)V0);                   \\\n  VERIFY_IS_APPROX(Dense(1, 1), (Scalar)V1);                   \\\n  VERIFY_IS_APPROX(Dense(2, 2), (Scalar)V2);                   \\\n  VERIFY_IS_APPROX(Dense(3, 3), (Scalar)V3);\n\n#define VERIFY_IMPLICIT_CONVERSION_5(DIAGTYPE, V0, V1, V2, V3, V4) \\\n  DIAGTYPE d(V0, V1, V2, V3, V4);                                  \\\n  DIAGTYPE::DenseMatrixType Dense = d.toDenseMatrix();             \\\n  VERIFY_IS_APPROX(Dense(0, 0), (Scalar)V0);                       \\\n  VERIFY_IS_APPROX(Dense(1, 1), (Scalar)V1);                       \\\n  VERIFY_IS_APPROX(Dense(2, 2), (Scalar)V2);                       \\\n  VERIFY_IS_APPROX(Dense(3, 3), (Scalar)V3);                       \\\n  VERIFY_IS_APPROX(Dense(4, 4), (Scalar)V4);\n\ntemplate<typename Scalar>\nvoid constructorTest()\n{\n  typedef DiagonalMatrix<Scalar, 0> DiagonalMatrix0;\n  typedef DiagonalMatrix<Scalar, 3> DiagonalMatrix3;\n  typedef DiagonalMatrix<Scalar, 4> DiagonalMatrix4;\n  typedef DiagonalMatrix<Scalar, Dynamic> DiagonalMatrixX;\n\n  Scalar raw[7];\n  for (int k = 0; k < 7; ++k) raw[k] = internal::random<Scalar>();\n\n  // Fixed-sized matrices\n  {\n    DiagonalMatrix0 a {{}};\n    VERIFY(a.rows() == 0);\n    VERIFY(a.cols() == 0);\n    typename DiagonalMatrix0::DenseMatrixType m = a.toDenseMatrix();\n    for (Index k = 0; k < a.rows(); ++k) VERIFY(m(k, k) == raw[k]);\n  }\n  {\n    DiagonalMatrix3 a {{raw[0], raw[1], raw[2]}};\n    VERIFY(a.rows() == 3);\n    VERIFY(a.cols() == 3);\n    typename DiagonalMatrix3::DenseMatrixType m = a.toDenseMatrix();\n    for (Index k = 0; k < a.rows(); ++k) VERIFY(m(k, k) == raw[k]);\n  }\n  {\n    DiagonalMatrix4 a {{raw[0], raw[1], raw[2], raw[3]}};\n    VERIFY(a.rows() == 4);\n    VERIFY(a.cols() == 4);\n    typename DiagonalMatrix4::DenseMatrixType m = a.toDenseMatrix();\n    for (Index k = 0; k < a.rows(); ++k) VERIFY(m(k, k) == raw[k]);\n  }\n\n  // dynamically sized matrices\n  {\n    DiagonalMatrixX a{{}};\n    VERIFY(a.rows() == 0);\n    VERIFY(a.rows() == 0);\n    typename DiagonalMatrixX::DenseMatrixType m = a.toDenseMatrix();\n    for (Index k = 0; k < a.rows(); ++k) VERIFY(m(k, k) == raw[k]);\n  }\n  {\n    DiagonalMatrixX a{{raw[0], raw[1], raw[2], raw[3], raw[4], raw[5], raw[6]}};\n    VERIFY(a.rows() == 7);\n    VERIFY(a.rows() == 7);\n    typename DiagonalMatrixX::DenseMatrixType m = a.toDenseMatrix();\n    for (Index k = 0; k < a.rows(); ++k) VERIFY(m(k, k) == raw[k]);\n  }\n}\n\ntemplate<>\nvoid constructorTest<float>()\n{\n  typedef float Scalar;\n\n  typedef DiagonalMatrix<Scalar, 0> DiagonalMatrix0;\n  typedef DiagonalMatrix<Scalar, 3> DiagonalMatrix3;\n  typedef DiagonalMatrix<Scalar, 4> DiagonalMatrix4;\n  typedef DiagonalMatrix<Scalar, 5> DiagonalMatrix5;\n  typedef DiagonalMatrix<Scalar, Dynamic> DiagonalMatrixX;\n\n  Scalar raw[7];\n  for (int k = 0; k < 7; ++k) raw[k] = internal::random<Scalar>();\n\n  // Fixed-sized matrices\n  {\n    DiagonalMatrix0 a {{}};\n    VERIFY(a.rows() == 0);\n    VERIFY(a.cols() == 0);\n    typename DiagonalMatrix0::DenseMatrixType m = a.toDenseMatrix();\n    for (Index k = 0; k < a.rows(); ++k) VERIFY(m(k, k) == raw[k]);\n  }\n  {\n    DiagonalMatrix3 a {{raw[0], raw[1], raw[2]}};\n    VERIFY(a.rows() == 3);\n    VERIFY(a.cols() == 3);\n    typename DiagonalMatrix3::DenseMatrixType m = a.toDenseMatrix();\n    for (Index k = 0; k < a.rows(); ++k) VERIFY(m(k, k) == raw[k]);\n  }\n  {\n    DiagonalMatrix4 a {{raw[0], raw[1], raw[2], raw[3]}};\n    VERIFY(a.rows() == 4);\n    VERIFY(a.cols() == 4);\n    typename DiagonalMatrix4::DenseMatrixType m = a.toDenseMatrix();\n    for (Index k = 0; k < a.rows(); ++k) VERIFY(m(k, k) == raw[k]);\n  }\n\n  // dynamically sized matrices\n  {\n    DiagonalMatrixX a{{}};\n    VERIFY(a.rows() == 0);\n    VERIFY(a.rows() == 0);\n    typename DiagonalMatrixX::DenseMatrixType m = a.toDenseMatrix();\n    for (Index k = 0; k < a.rows(); ++k) VERIFY(m(k, k) == raw[k]);\n  }\n  {\n    DiagonalMatrixX a{{raw[0], raw[1], raw[2], raw[3], raw[4], raw[5], raw[6]}};\n    VERIFY(a.rows() == 7);\n    VERIFY(a.rows() == 7);\n    typename DiagonalMatrixX::DenseMatrixType m = a.toDenseMatrix();\n    for (Index k = 0; k < a.rows(); ++k) VERIFY(m(k, k) == raw[k]);\n  }\n  { VERIFY_IMPLICIT_CONVERSION_3(DiagonalMatrix3, 1.2647, 2.56f, -3); }\n  { VERIFY_IMPLICIT_CONVERSION_4(DiagonalMatrix4, 1.2647, 2.56f, -3, 3.23f); }\n  { VERIFY_IMPLICIT_CONVERSION_5(DiagonalMatrix5, 1.2647, 2.56f, -3, 3.23f, 2); }\n}\n\nEIGEN_DECLARE_TEST(diagonal_matrix_variadic_ctor)\n{\n  CALL_SUBTEST_1(assertionTest<unsigned char>());\n  CALL_SUBTEST_1(assertionTest<float>());\n  CALL_SUBTEST_1(assertionTest<Index>());\n  CALL_SUBTEST_1(assertionTest<int>());\n  CALL_SUBTEST_1(assertionTest<long int>());\n  CALL_SUBTEST_1(assertionTest<std::ptrdiff_t>());\n  CALL_SUBTEST_1(assertionTest<std::complex<double>>());\n\n  CALL_SUBTEST_2(constructorTest<unsigned char>());\n  CALL_SUBTEST_2(constructorTest<float>());\n  CALL_SUBTEST_2(constructorTest<Index>());\n  CALL_SUBTEST_2(constructorTest<int>());\n  CALL_SUBTEST_2(constructorTest<long int>());\n  CALL_SUBTEST_2(constructorTest<std::ptrdiff_t>());\n  CALL_SUBTEST_2(constructorTest<std::complex<double>>());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/diagonalmatrices.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\nusing namespace std;\ntemplate<typename MatrixType> void diagonalmatrices(const MatrixType& m)\n{\n  typedef typename MatrixType::Scalar Scalar;\n  enum { Rows = MatrixType::RowsAtCompileTime, Cols = MatrixType::ColsAtCompileTime };\n  typedef Matrix<Scalar, Rows, 1> VectorType;\n  typedef Matrix<Scalar, 1, Cols> RowVectorType;\n  typedef Matrix<Scalar, Rows, Rows> SquareMatrixType;\n  typedef Matrix<Scalar, Dynamic, Dynamic> DynMatrixType;\n  typedef DiagonalMatrix<Scalar, Rows> LeftDiagonalMatrix;\n  typedef DiagonalMatrix<Scalar, Cols> RightDiagonalMatrix;\n  typedef Matrix<Scalar, Rows==Dynamic?Dynamic:2*Rows, Cols==Dynamic?Dynamic:2*Cols> BigMatrix;\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  MatrixType m1 = MatrixType::Random(rows, cols),\n             m2 = MatrixType::Random(rows, cols);\n  VectorType v1 = VectorType::Random(rows),\n             v2 = VectorType::Random(rows);\n  RowVectorType rv1 = RowVectorType::Random(cols),\n             rv2 = RowVectorType::Random(cols);\n\n  LeftDiagonalMatrix ldm1(v1), ldm2(v2);\n  RightDiagonalMatrix rdm1(rv1), rdm2(rv2);\n  \n  Scalar s1 = internal::random<Scalar>();\n\n  SquareMatrixType sq_m1 (v1.asDiagonal());\n  VERIFY_IS_APPROX(sq_m1, v1.asDiagonal().toDenseMatrix());\n  sq_m1 = v1.asDiagonal();\n  VERIFY_IS_APPROX(sq_m1, v1.asDiagonal().toDenseMatrix());\n  SquareMatrixType sq_m2 = v1.asDiagonal();\n  VERIFY_IS_APPROX(sq_m1, sq_m2);\n  \n  ldm1 = v1.asDiagonal();\n  LeftDiagonalMatrix ldm3(v1);\n  VERIFY_IS_APPROX(ldm1.diagonal(), ldm3.diagonal());\n  LeftDiagonalMatrix ldm4 = v1.asDiagonal();\n  VERIFY_IS_APPROX(ldm1.diagonal(), ldm4.diagonal());\n  \n  sq_m1.block(0,0,rows,rows) = ldm1;\n  VERIFY_IS_APPROX(sq_m1, ldm1.toDenseMatrix());\n  sq_m1.transpose() = ldm1;\n  VERIFY_IS_APPROX(sq_m1, ldm1.toDenseMatrix());\n  \n  Index i = internal::random<Index>(0, rows-1);\n  Index j = internal::random<Index>(0, cols-1);\n  \n  VERIFY_IS_APPROX( ((ldm1 * m1)(i,j))  , ldm1.diagonal()(i) * m1(i,j) );\n  VERIFY_IS_APPROX( ((ldm1 * (m1+m2))(i,j))  , ldm1.diagonal()(i) * (m1+m2)(i,j) );\n  VERIFY_IS_APPROX( ((m1 * rdm1)(i,j))  , rdm1.diagonal()(j) * m1(i,j) );\n  VERIFY_IS_APPROX( ((v1.asDiagonal() * m1)(i,j))  , v1(i) * m1(i,j) );\n  VERIFY_IS_APPROX( ((m1 * rv1.asDiagonal())(i,j))  , rv1(j) * m1(i,j) );\n  VERIFY_IS_APPROX( (((v1+v2).asDiagonal() * m1)(i,j))  , (v1+v2)(i) * m1(i,j) );\n  VERIFY_IS_APPROX( (((v1+v2).asDiagonal() * (m1+m2))(i,j))  , (v1+v2)(i) * (m1+m2)(i,j) );\n  VERIFY_IS_APPROX( ((m1 * (rv1+rv2).asDiagonal())(i,j))  , (rv1+rv2)(j) * m1(i,j) );\n  VERIFY_IS_APPROX( (((m1+m2) * (rv1+rv2).asDiagonal())(i,j))  , (rv1+rv2)(j) * (m1+m2)(i,j) );\n  \n  if(rows>1)\n  {\n    DynMatrixType tmp = m1.topRows(rows/2), res;\n    VERIFY_IS_APPROX( (res = m1.topRows(rows/2) * rv1.asDiagonal()), tmp * rv1.asDiagonal() );\n    VERIFY_IS_APPROX( (res = v1.head(rows/2).asDiagonal()*m1.topRows(rows/2)), v1.head(rows/2).asDiagonal()*tmp );\n  }\n\n  BigMatrix big;\n  big.setZero(2*rows, 2*cols);\n  \n  big.block(i,j,rows,cols) = m1;\n  big.block(i,j,rows,cols) = v1.asDiagonal() * big.block(i,j,rows,cols);\n  \n  VERIFY_IS_APPROX((big.block(i,j,rows,cols)) , v1.asDiagonal() * m1 );\n  \n  big.block(i,j,rows,cols) = m1;\n  big.block(i,j,rows,cols) = big.block(i,j,rows,cols) * rv1.asDiagonal();\n  VERIFY_IS_APPROX((big.block(i,j,rows,cols)) , m1 * rv1.asDiagonal() );\n  \n  \n  // scalar multiple\n  VERIFY_IS_APPROX(LeftDiagonalMatrix(ldm1*s1).diagonal(), ldm1.diagonal() * s1);\n  VERIFY_IS_APPROX(LeftDiagonalMatrix(s1*ldm1).diagonal(), s1 * ldm1.diagonal());\n  \n  VERIFY_IS_APPROX(m1 * (rdm1 * s1), (m1 * rdm1) * s1);\n  VERIFY_IS_APPROX(m1 * (s1 * rdm1), (m1 * rdm1) * s1);\n  \n  // Diagonal to dense\n  sq_m1.setRandom();\n  sq_m2 = sq_m1;\n  VERIFY_IS_APPROX( (sq_m1 += (s1*v1).asDiagonal()), sq_m2 += (s1*v1).asDiagonal().toDenseMatrix() );\n  VERIFY_IS_APPROX( (sq_m1 -= (s1*v1).asDiagonal()), sq_m2 -= (s1*v1).asDiagonal().toDenseMatrix() );\n  VERIFY_IS_APPROX( (sq_m1 = (s1*v1).asDiagonal()), (s1*v1).asDiagonal().toDenseMatrix() );\n\n  sq_m1.setRandom();\n  sq_m2 = v1.asDiagonal();\n  sq_m2 = sq_m1 * sq_m2;\n  VERIFY_IS_APPROX( (sq_m1*v1.asDiagonal()).col(i), sq_m2.col(i) );\n  VERIFY_IS_APPROX( (sq_m1*v1.asDiagonal()).row(i), sq_m2.row(i) );\n\n  sq_m1 = v1.asDiagonal();\n  sq_m2 = v2.asDiagonal();\n  SquareMatrixType sq_m3 = v1.asDiagonal();\n  VERIFY_IS_APPROX( sq_m3 = v1.asDiagonal() + v2.asDiagonal(), sq_m1 + sq_m2);\n  VERIFY_IS_APPROX( sq_m3 = v1.asDiagonal() - v2.asDiagonal(), sq_m1 - sq_m2);\n  VERIFY_IS_APPROX( sq_m3 = v1.asDiagonal() - 2*v2.asDiagonal() + v1.asDiagonal(), sq_m1 - 2*sq_m2 + sq_m1);\n}\n\ntemplate<typename MatrixType> void as_scalar_product(const MatrixType& m)\n{\n  typedef typename MatrixType::Scalar Scalar;\n  typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;\n  typedef Matrix<Scalar, Dynamic, Dynamic> DynMatrixType;\n  typedef Matrix<Scalar, Dynamic, 1> DynVectorType;\n  typedef Matrix<Scalar, 1, Dynamic> DynRowVectorType;\n\n  Index rows = m.rows();\n  Index depth = internal::random<Index>(1,EIGEN_TEST_MAX_SIZE);\n\n  VectorType v1 = VectorType::Random(rows);  \n  DynVectorType     dv1  = DynVectorType::Random(depth);\n  DynRowVectorType  drv1 = DynRowVectorType::Random(depth);\n  DynMatrixType     dm1  = dv1;\n  DynMatrixType     drm1 = drv1;\n  \n  Scalar s = v1(0);\n\n  VERIFY_IS_APPROX( v1.asDiagonal() * drv1, s*drv1 );\n  VERIFY_IS_APPROX( dv1 * v1.asDiagonal(), dv1*s );\n\n  VERIFY_IS_APPROX( v1.asDiagonal() * drm1, s*drm1 );\n  VERIFY_IS_APPROX( dm1 * v1.asDiagonal(), dm1*s );\n}\n\ntemplate<int>\nvoid bug987()\n{\n  Matrix3Xd points = Matrix3Xd::Random(3, 3);\n  Vector2d diag = Vector2d::Random();\n  Matrix2Xd tmp1 = points.topRows<2>(), res1, res2;\n  VERIFY_IS_APPROX( res1 = diag.asDiagonal() * points.topRows<2>(), res2 = diag.asDiagonal() * tmp1 );\n  Matrix2d tmp2 = points.topLeftCorner<2,2>();\n  VERIFY_IS_APPROX(( res1 = points.topLeftCorner<2,2>()*diag.asDiagonal()) , res2 = tmp2*diag.asDiagonal() );\n}\n\nEIGEN_DECLARE_TEST(diagonalmatrices)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( diagonalmatrices(Matrix<float, 1, 1>()) );\n    CALL_SUBTEST_1( as_scalar_product(Matrix<float, 1, 1>()) );\n\n    CALL_SUBTEST_2( diagonalmatrices(Matrix3f()) );\n    CALL_SUBTEST_3( diagonalmatrices(Matrix<double,3,3,RowMajor>()) );\n    CALL_SUBTEST_4( diagonalmatrices(Matrix4d()) );\n    CALL_SUBTEST_5( diagonalmatrices(Matrix<float,4,4,RowMajor>()) );\n    CALL_SUBTEST_6( diagonalmatrices(MatrixXcf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_6( as_scalar_product(MatrixXcf(1,1)) );\n    CALL_SUBTEST_7( diagonalmatrices(MatrixXi(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_8( diagonalmatrices(Matrix<double,Dynamic,Dynamic,RowMajor>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_9( diagonalmatrices(MatrixXf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_9( diagonalmatrices(MatrixXf(1,1)) );\n    CALL_SUBTEST_9( as_scalar_product(MatrixXf(1,1)) );\n  }\n  CALL_SUBTEST_10( bug987<0>() );\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/dontalign.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2011 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#if defined EIGEN_TEST_PART_1 || defined EIGEN_TEST_PART_2 || defined EIGEN_TEST_PART_3 || defined EIGEN_TEST_PART_4\n#define EIGEN_DONT_ALIGN\n#elif defined EIGEN_TEST_PART_5 || defined EIGEN_TEST_PART_6 || defined EIGEN_TEST_PART_7 || defined EIGEN_TEST_PART_8\n#define EIGEN_DONT_ALIGN_STATICALLY\n#endif\n\n#include \"main.h\"\n#include <Eigen/Dense>\n\ntemplate<typename MatrixType>\nvoid dontalign(const MatrixType& m)\n{\n  typedef typename MatrixType::Scalar Scalar;\n  typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;\n  typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime> SquareMatrixType;\n\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  MatrixType a = MatrixType::Random(rows,cols);\n  SquareMatrixType square = SquareMatrixType::Random(rows,rows);\n  VectorType v = VectorType::Random(rows);\n\n  VERIFY_IS_APPROX(v, square * square.colPivHouseholderQr().solve(v));\n  square = square.inverse().eval();\n  a = square * a;\n  square = square*square;\n  v = square * v;\n  v = a.adjoint() * v;\n  VERIFY(square.determinant() != Scalar(0));\n\n  // bug 219: MapAligned() was giving an assert with EIGEN_DONT_ALIGN, because Map Flags were miscomputed\n  Scalar* array = internal::aligned_new<Scalar>(rows);\n  v = VectorType::MapAligned(array, rows);\n  internal::aligned_delete(array, rows);\n}\n\nEIGEN_DECLARE_TEST(dontalign)\n{\n#if defined EIGEN_TEST_PART_1 || defined EIGEN_TEST_PART_5\n  dontalign(Matrix3d());\n  dontalign(Matrix4f());\n#elif defined EIGEN_TEST_PART_2 || defined EIGEN_TEST_PART_6\n  dontalign(Matrix3cd());\n  dontalign(Matrix4cf());\n#elif defined EIGEN_TEST_PART_3 || defined EIGEN_TEST_PART_7\n  dontalign(Matrix<float, 32, 32>());\n  dontalign(Matrix<std::complex<float>, 32, 32>());\n#elif defined EIGEN_TEST_PART_4 || defined EIGEN_TEST_PART_8\n  dontalign(MatrixXd(32, 32));\n  dontalign(MatrixXcf(32, 32));\n#endif\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/dynalloc.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#if EIGEN_MAX_ALIGN_BYTES>0\n#define ALIGNMENT EIGEN_MAX_ALIGN_BYTES\n#else\n#define ALIGNMENT 1\n#endif\n\ntypedef Matrix<float,16,1> Vector16f;\ntypedef Matrix<float,8,1> Vector8f;\n\nvoid check_handmade_aligned_malloc()\n{\n  for(int i = 1; i < 1000; i++)\n  {\n    char *p = (char*)internal::handmade_aligned_malloc(i);\n    VERIFY(internal::UIntPtr(p)%ALIGNMENT==0);\n    // if the buffer is wrongly allocated this will give a bad write --> check with valgrind\n    for(int j = 0; j < i; j++) p[j]=0;\n    internal::handmade_aligned_free(p);\n  }\n}\n\nvoid check_aligned_malloc()\n{\n  for(int i = ALIGNMENT; i < 1000; i++)\n  {\n    char *p = (char*)internal::aligned_malloc(i);\n    VERIFY(internal::UIntPtr(p)%ALIGNMENT==0);\n    // if the buffer is wrongly allocated this will give a bad write --> check with valgrind\n    for(int j = 0; j < i; j++) p[j]=0;\n    internal::aligned_free(p);\n  }\n}\n\nvoid check_aligned_new()\n{\n  for(int i = ALIGNMENT; i < 1000; i++)\n  {\n    float *p = internal::aligned_new<float>(i);\n    VERIFY(internal::UIntPtr(p)%ALIGNMENT==0);\n    // if the buffer is wrongly allocated this will give a bad write --> check with valgrind\n    for(int j = 0; j < i; j++) p[j]=0;\n    internal::aligned_delete(p,i);\n  }\n}\n\nvoid check_aligned_stack_alloc()\n{\n  for(int i = ALIGNMENT; i < 400; i++)\n  {\n    ei_declare_aligned_stack_constructed_variable(float,p,i,0);\n    VERIFY(internal::UIntPtr(p)%ALIGNMENT==0);\n    // if the buffer is wrongly allocated this will give a bad write --> check with valgrind\n    for(int j = 0; j < i; j++) p[j]=0;\n  }\n}\n\n\n// test compilation with both a struct and a class...\nstruct MyStruct\n{\n  EIGEN_MAKE_ALIGNED_OPERATOR_NEW\n  char dummychar;\n  Vector16f avec;\n};\n\nclass MyClassA\n{\n  public:\n    EIGEN_MAKE_ALIGNED_OPERATOR_NEW\n    char dummychar;\n    Vector16f avec;\n};\n\ntemplate<typename T> void check_dynaligned()\n{\n  // TODO have to be updated once we support multiple alignment values\n  if(T::SizeAtCompileTime % ALIGNMENT == 0)\n  {\n    T* obj = new T;\n    VERIFY(T::NeedsToAlign==1);\n    VERIFY(internal::UIntPtr(obj)%ALIGNMENT==0);\n    delete obj;\n  }\n}\n\ntemplate<typename T> void check_custom_new_delete()\n{\n  {\n    T* t = new T;\n    delete t;\n  }\n  \n  {\n    std::size_t N = internal::random<std::size_t>(1,10);\n    T* t = new T[N];\n    delete[] t;\n  }\n  \n#if EIGEN_MAX_ALIGN_BYTES>0 && (!EIGEN_HAS_CXX17_OVERALIGN)\n  {\n    T* t = static_cast<T *>((T::operator new)(sizeof(T)));\n    (T::operator delete)(t, sizeof(T));\n  }\n  \n  {\n    T* t = static_cast<T *>((T::operator new)(sizeof(T)));\n    (T::operator delete)(t);\n  }\n#endif\n}\n\nEIGEN_DECLARE_TEST(dynalloc)\n{\n  // low level dynamic memory allocation\n  CALL_SUBTEST(check_handmade_aligned_malloc());\n  CALL_SUBTEST(check_aligned_malloc());\n  CALL_SUBTEST(check_aligned_new());\n  CALL_SUBTEST(check_aligned_stack_alloc());\n\n  for (int i=0; i<g_repeat*100; ++i)\n  {\n    CALL_SUBTEST( check_custom_new_delete<Vector4f>() );\n    CALL_SUBTEST( check_custom_new_delete<Vector2f>() );\n    CALL_SUBTEST( check_custom_new_delete<Matrix4f>() );\n    CALL_SUBTEST( check_custom_new_delete<MatrixXi>() );\n  }\n  \n  // check static allocation, who knows ?\n  #if EIGEN_MAX_STATIC_ALIGN_BYTES\n  for (int i=0; i<g_repeat*100; ++i)\n  {\n    CALL_SUBTEST(check_dynaligned<Vector4f>() );\n    CALL_SUBTEST(check_dynaligned<Vector2d>() );\n    CALL_SUBTEST(check_dynaligned<Matrix4f>() );\n    CALL_SUBTEST(check_dynaligned<Vector4d>() );\n    CALL_SUBTEST(check_dynaligned<Vector4i>() );\n    CALL_SUBTEST(check_dynaligned<Vector8f>() );\n    CALL_SUBTEST(check_dynaligned<Vector16f>() );\n  }\n\n  {\n    MyStruct foo0;  VERIFY(internal::UIntPtr(foo0.avec.data())%ALIGNMENT==0);\n    MyClassA fooA;  VERIFY(internal::UIntPtr(fooA.avec.data())%ALIGNMENT==0);\n  }\n  \n  // dynamic allocation, single object\n  for (int i=0; i<g_repeat*100; ++i)\n  {\n    MyStruct *foo0 = new MyStruct();  VERIFY(internal::UIntPtr(foo0->avec.data())%ALIGNMENT==0);\n    MyClassA *fooA = new MyClassA();  VERIFY(internal::UIntPtr(fooA->avec.data())%ALIGNMENT==0);\n    delete foo0;\n    delete fooA;\n  }\n\n  // dynamic allocation, array\n  const int N = 10;\n  for (int i=0; i<g_repeat*100; ++i)\n  {\n    MyStruct *foo0 = new MyStruct[N];  VERIFY(internal::UIntPtr(foo0->avec.data())%ALIGNMENT==0);\n    MyClassA *fooA = new MyClassA[N];  VERIFY(internal::UIntPtr(fooA->avec.data())%ALIGNMENT==0);\n    delete[] foo0;\n    delete[] fooA;\n  }\n  #endif\n  \n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/eigen2support.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN2_SUPPORT\n\n#include \"main.h\"\n\ntemplate<typename MatrixType> void eigen2support(const MatrixType& m)\n{\n  typedef typename MatrixType::Scalar Scalar;\n\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  MatrixType m1 = MatrixType::Random(rows, cols),\n             m3(rows, cols);\n\n  Scalar  s1 = internal::random<Scalar>(),\n          s2 = internal::random<Scalar>();\n\n  // scalar addition\n  VERIFY_IS_APPROX(m1.cwise() + s1, s1 + m1.cwise());\n  VERIFY_IS_APPROX(m1.cwise() + s1, MatrixType::Constant(rows,cols,s1) + m1);\n  VERIFY_IS_APPROX((m1*Scalar(2)).cwise() - s2, (m1+m1) - MatrixType::Constant(rows,cols,s2) );\n  m3 = m1;\n  m3.cwise() += s2;\n  VERIFY_IS_APPROX(m3, m1.cwise() + s2);\n  m3 = m1;\n  m3.cwise() -= s1;\n  VERIFY_IS_APPROX(m3, m1.cwise() - s1);\n\n  VERIFY_IS_EQUAL((m1.corner(TopLeft,1,1)), (m1.block(0,0,1,1)));\n  VERIFY_IS_EQUAL((m1.template corner<1,1>(TopLeft)), (m1.template block<1,1>(0,0)));\n  VERIFY_IS_EQUAL((m1.col(0).start(1)), (m1.col(0).segment(0,1)));\n  VERIFY_IS_EQUAL((m1.col(0).template start<1>()), (m1.col(0).segment(0,1)));\n  VERIFY_IS_EQUAL((m1.col(0).end(1)), (m1.col(0).segment(rows-1,1)));\n  VERIFY_IS_EQUAL((m1.col(0).template end<1>()), (m1.col(0).segment(rows-1,1)));\n  \n  using std::cos;\n  using numext::real;\n  using numext::abs2;\n  VERIFY_IS_EQUAL(ei_cos(s1), cos(s1));\n  VERIFY_IS_EQUAL(ei_real(s1), real(s1));\n  VERIFY_IS_EQUAL(ei_abs2(s1), abs2(s1));\n\n  m1.minor(0,0);\n}\n\nEIGEN_DECLARE_TEST(eigen2support)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( eigen2support(Matrix<double,1,1>()) );\n    CALL_SUBTEST_2( eigen2support(MatrixXd(1,1)) );\n    CALL_SUBTEST_4( eigen2support(Matrix3f()) );\n    CALL_SUBTEST_5( eigen2support(Matrix4d()) );\n    CALL_SUBTEST_2( eigen2support(MatrixXf(200,200)) );\n    CALL_SUBTEST_6( eigen2support(MatrixXcd(100,100)) );\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/eigensolver_complex.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2010 Jitse Niesen <jitse@maths.leeds.ac.uk>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <limits>\n#include <Eigen/Eigenvalues>\n#include <Eigen/LU>\n\ntemplate<typename MatrixType> bool find_pivot(typename MatrixType::Scalar tol, MatrixType &diffs, Index col=0)\n{\n  bool match = diffs.diagonal().sum() <= tol;\n  if(match || col==diffs.cols())\n  {\n    return match;\n  }\n  else\n  {\n    Index n = diffs.cols();\n    std::vector<std::pair<Index,Index> > transpositions;\n    for(Index i=col; i<n; ++i)\n    {\n      Index best_index(0);\n      if(diffs.col(col).segment(col,n-i).minCoeff(&best_index) > tol)\n        break;\n      \n      best_index += col;\n      \n      diffs.row(col).swap(diffs.row(best_index));\n      if(find_pivot(tol,diffs,col+1)) return true;\n      diffs.row(col).swap(diffs.row(best_index));\n      \n      // move current pivot to the end\n      diffs.row(n-(i-col)-1).swap(diffs.row(best_index));\n      transpositions.push_back(std::pair<Index,Index>(n-(i-col)-1,best_index));\n    }\n    // restore\n    for(Index k=transpositions.size()-1; k>=0; --k)\n      diffs.row(transpositions[k].first).swap(diffs.row(transpositions[k].second));\n  }\n  return false;\n}\n\n/* Check that two column vectors are approximately equal up to permutations.\n * Initially, this method checked that the k-th power sums are equal for all k = 1, ..., vec1.rows(),\n * however this strategy is numerically inacurate because of numerical cancellation issues.\n */\ntemplate<typename VectorType>\nvoid verify_is_approx_upto_permutation(const VectorType& vec1, const VectorType& vec2)\n{\n  typedef typename VectorType::Scalar Scalar;\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n\n  VERIFY(vec1.cols() == 1);\n  VERIFY(vec2.cols() == 1);\n  VERIFY(vec1.rows() == vec2.rows());\n  \n  Index n = vec1.rows();\n  RealScalar tol = test_precision<RealScalar>()*test_precision<RealScalar>()*numext::maxi(vec1.squaredNorm(),vec2.squaredNorm());\n  Matrix<RealScalar,Dynamic,Dynamic> diffs = (vec1.rowwise().replicate(n) - vec2.rowwise().replicate(n).transpose()).cwiseAbs2();\n  \n  VERIFY( find_pivot(tol, diffs) );\n}\n\n\ntemplate<typename MatrixType> void eigensolver(const MatrixType& m)\n{\n  /* this test covers the following files:\n     ComplexEigenSolver.h, and indirectly ComplexSchur.h\n  */\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n\n  MatrixType a = MatrixType::Random(rows,cols);\n  MatrixType symmA =  a.adjoint() * a;\n\n  ComplexEigenSolver<MatrixType> ei0(symmA);\n  VERIFY_IS_EQUAL(ei0.info(), Success);\n  VERIFY_IS_APPROX(symmA * ei0.eigenvectors(), ei0.eigenvectors() * ei0.eigenvalues().asDiagonal());\n\n  ComplexEigenSolver<MatrixType> ei1(a);\n  VERIFY_IS_EQUAL(ei1.info(), Success);\n  VERIFY_IS_APPROX(a * ei1.eigenvectors(), ei1.eigenvectors() * ei1.eigenvalues().asDiagonal());\n  // Note: If MatrixType is real then a.eigenvalues() uses EigenSolver and thus\n  // another algorithm so results may differ slightly\n  verify_is_approx_upto_permutation(a.eigenvalues(), ei1.eigenvalues());\n\n  ComplexEigenSolver<MatrixType> ei2;\n  ei2.setMaxIterations(ComplexSchur<MatrixType>::m_maxIterationsPerRow * rows).compute(a);\n  VERIFY_IS_EQUAL(ei2.info(), Success);\n  VERIFY_IS_EQUAL(ei2.eigenvectors(), ei1.eigenvectors());\n  VERIFY_IS_EQUAL(ei2.eigenvalues(), ei1.eigenvalues());\n  if (rows > 2) {\n    ei2.setMaxIterations(1).compute(a);\n    VERIFY_IS_EQUAL(ei2.info(), NoConvergence);\n    VERIFY_IS_EQUAL(ei2.getMaxIterations(), 1);\n  }\n\n  ComplexEigenSolver<MatrixType> eiNoEivecs(a, false);\n  VERIFY_IS_EQUAL(eiNoEivecs.info(), Success);\n  VERIFY_IS_APPROX(ei1.eigenvalues(), eiNoEivecs.eigenvalues());\n\n  // Regression test for issue #66\n  MatrixType z = MatrixType::Zero(rows,cols);\n  ComplexEigenSolver<MatrixType> eiz(z);\n  VERIFY((eiz.eigenvalues().cwiseEqual(0)).all());\n\n  MatrixType id = MatrixType::Identity(rows, cols);\n  VERIFY_IS_APPROX(id.operatorNorm(), RealScalar(1));\n\n  if (rows > 1 && rows < 20)\n  {\n    // Test matrix with NaN\n    a(0,0) = std::numeric_limits<typename MatrixType::RealScalar>::quiet_NaN();\n    ComplexEigenSolver<MatrixType> eiNaN(a);\n    VERIFY_IS_EQUAL(eiNaN.info(), NoConvergence);\n  }\n\n  // regression test for bug 1098\n  {\n    ComplexEigenSolver<MatrixType> eig(a.adjoint() * a);\n    eig.compute(a.adjoint() * a);\n  }\n\n  // regression test for bug 478\n  {\n    a.setZero();\n    ComplexEigenSolver<MatrixType> ei3(a);\n    VERIFY_IS_EQUAL(ei3.info(), Success);\n    VERIFY_IS_MUCH_SMALLER_THAN(ei3.eigenvalues().norm(),RealScalar(1));\n    VERIFY((ei3.eigenvectors().transpose()*ei3.eigenvectors().transpose()).eval().isIdentity());\n  }\n}\n\ntemplate<typename MatrixType> void eigensolver_verify_assert(const MatrixType& m)\n{\n  ComplexEigenSolver<MatrixType> eig;\n  VERIFY_RAISES_ASSERT(eig.eigenvectors());\n  VERIFY_RAISES_ASSERT(eig.eigenvalues());\n\n  MatrixType a = MatrixType::Random(m.rows(),m.cols());\n  eig.compute(a, false);\n  VERIFY_RAISES_ASSERT(eig.eigenvectors());\n}\n\nEIGEN_DECLARE_TEST(eigensolver_complex)\n{\n  int s = 0;\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( eigensolver(Matrix4cf()) );\n    s = internal::random<int>(1,EIGEN_TEST_MAX_SIZE/4);\n    CALL_SUBTEST_2( eigensolver(MatrixXcd(s,s)) );\n    CALL_SUBTEST_3( eigensolver(Matrix<std::complex<float>, 1, 1>()) );\n    CALL_SUBTEST_4( eigensolver(Matrix3f()) );\n    TEST_SET_BUT_UNUSED_VARIABLE(s)\n  }\n  CALL_SUBTEST_1( eigensolver_verify_assert(Matrix4cf()) );\n  s = internal::random<int>(1,EIGEN_TEST_MAX_SIZE/4);\n  CALL_SUBTEST_2( eigensolver_verify_assert(MatrixXcd(s,s)) );\n  CALL_SUBTEST_3( eigensolver_verify_assert(Matrix<std::complex<float>, 1, 1>()) );\n  CALL_SUBTEST_4( eigensolver_verify_assert(Matrix3f()) );\n\n  // Test problem size constructors\n  CALL_SUBTEST_5(ComplexEigenSolver<MatrixXf> tmp(s));\n  \n  TEST_SET_BUT_UNUSED_VARIABLE(s)\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/eigensolver_generalized_real.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012-2016 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_RUNTIME_NO_MALLOC\n#include \"main.h\"\n#include <limits>\n#include <Eigen/Eigenvalues>\n#include <Eigen/LU>\n\ntemplate<typename MatrixType> void generalized_eigensolver_real(const MatrixType& m)\n{\n  /* this test covers the following files:\n     GeneralizedEigenSolver.h\n  */\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  typedef typename MatrixType::Scalar Scalar;\n  typedef std::complex<Scalar> ComplexScalar;\n  typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;\n\n  MatrixType a = MatrixType::Random(rows,cols);\n  MatrixType b = MatrixType::Random(rows,cols);\n  MatrixType a1 = MatrixType::Random(rows,cols);\n  MatrixType b1 = MatrixType::Random(rows,cols);\n  MatrixType spdA =  a.adjoint() * a + a1.adjoint() * a1;\n  MatrixType spdB =  b.adjoint() * b + b1.adjoint() * b1;\n\n  // lets compare to GeneralizedSelfAdjointEigenSolver\n  {\n    GeneralizedSelfAdjointEigenSolver<MatrixType> symmEig(spdA, spdB);\n    GeneralizedEigenSolver<MatrixType> eig(spdA, spdB);\n\n    VERIFY_IS_EQUAL(eig.eigenvalues().imag().cwiseAbs().maxCoeff(), 0);\n\n    VectorType realEigenvalues = eig.eigenvalues().real();\n    std::sort(realEigenvalues.data(), realEigenvalues.data()+realEigenvalues.size());\n    VERIFY_IS_APPROX(realEigenvalues, symmEig.eigenvalues());\n\n    // check eigenvectors\n    typename GeneralizedEigenSolver<MatrixType>::EigenvectorsType D = eig.eigenvalues().asDiagonal();\n    typename GeneralizedEigenSolver<MatrixType>::EigenvectorsType V = eig.eigenvectors();\n    VERIFY_IS_APPROX(spdA*V, spdB*V*D);\n  }\n\n  // non symmetric case:\n  {\n    GeneralizedEigenSolver<MatrixType> eig(rows);\n    // TODO enable full-prealocation of required memory, this probably requires an in-place mode for HessenbergDecomposition\n    //Eigen::internal::set_is_malloc_allowed(false);\n    eig.compute(a,b);\n    //Eigen::internal::set_is_malloc_allowed(true);\n    for(Index k=0; k<cols; ++k)\n    {\n      Matrix<ComplexScalar,Dynamic,Dynamic> tmp = (eig.betas()(k)*a).template cast<ComplexScalar>() - eig.alphas()(k)*b;\n      if(tmp.size()>1 && tmp.norm()>(std::numeric_limits<Scalar>::min)())\n        tmp /= tmp.norm();\n      VERIFY_IS_MUCH_SMALLER_THAN( std::abs(tmp.determinant()), Scalar(1) );\n    }\n    // check eigenvectors\n    typename GeneralizedEigenSolver<MatrixType>::EigenvectorsType D = eig.eigenvalues().asDiagonal();\n    typename GeneralizedEigenSolver<MatrixType>::EigenvectorsType V = eig.eigenvectors();\n    VERIFY_IS_APPROX(a*V, b*V*D);\n  }\n\n  // regression test for bug 1098\n  {\n    GeneralizedSelfAdjointEigenSolver<MatrixType> eig1(a.adjoint() * a,b.adjoint() * b);\n    eig1.compute(a.adjoint() * a,b.adjoint() * b);\n    GeneralizedEigenSolver<MatrixType> eig2(a.adjoint() * a,b.adjoint() * b);\n    eig2.compute(a.adjoint() * a,b.adjoint() * b);\n  }\n\n  // check without eigenvectors\n  {\n    GeneralizedEigenSolver<MatrixType> eig1(spdA, spdB, true);\n    GeneralizedEigenSolver<MatrixType> eig2(spdA, spdB, false);\n    VERIFY_IS_APPROX(eig1.eigenvalues(), eig2.eigenvalues());\n  }\n}\n\nEIGEN_DECLARE_TEST(eigensolver_generalized_real)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    int s = 0;\n    CALL_SUBTEST_1( generalized_eigensolver_real(Matrix4f()) );\n    s = internal::random<int>(1,EIGEN_TEST_MAX_SIZE/4);\n    CALL_SUBTEST_2( generalized_eigensolver_real(MatrixXd(s,s)) );\n\n    // some trivial but implementation-wise special cases\n    CALL_SUBTEST_2( generalized_eigensolver_real(MatrixXd(1,1)) );\n    CALL_SUBTEST_2( generalized_eigensolver_real(MatrixXd(2,2)) );\n    CALL_SUBTEST_3( generalized_eigensolver_real(Matrix<double,1,1>()) );\n    CALL_SUBTEST_4( generalized_eigensolver_real(Matrix2d()) );\n    TEST_SET_BUT_UNUSED_VARIABLE(s)\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/eigensolver_generic.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2010,2012 Jitse Niesen <jitse@maths.leeds.ac.uk>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <limits>\n#include <Eigen/Eigenvalues>\n\ntemplate<typename EigType,typename MatType>\nvoid check_eigensolver_for_given_mat(const EigType &eig, const MatType& a)\n{\n  typedef typename NumTraits<typename MatType::Scalar>::Real RealScalar;\n  typedef Matrix<RealScalar, MatType::RowsAtCompileTime, 1> RealVectorType;\n  typedef typename std::complex<RealScalar> Complex;\n  Index n = a.rows();\n  VERIFY_IS_EQUAL(eig.info(), Success);\n  VERIFY_IS_APPROX(a * eig.pseudoEigenvectors(), eig.pseudoEigenvectors() * eig.pseudoEigenvalueMatrix());\n  VERIFY_IS_APPROX(a.template cast<Complex>() * eig.eigenvectors(),\n                   eig.eigenvectors() * eig.eigenvalues().asDiagonal());\n  VERIFY_IS_APPROX(eig.eigenvectors().colwise().norm(), RealVectorType::Ones(n).transpose());\n  VERIFY_IS_APPROX(a.eigenvalues(), eig.eigenvalues());\n}\n\ntemplate<typename MatrixType> void eigensolver(const MatrixType& m)\n{\n  /* this test covers the following files:\n     EigenSolver.h\n  */\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  typedef typename std::complex<RealScalar> Complex;\n\n  MatrixType a = MatrixType::Random(rows,cols);\n  MatrixType a1 = MatrixType::Random(rows,cols);\n  MatrixType symmA =  a.adjoint() * a + a1.adjoint() * a1;\n\n  EigenSolver<MatrixType> ei0(symmA);\n  VERIFY_IS_EQUAL(ei0.info(), Success);\n  VERIFY_IS_APPROX(symmA * ei0.pseudoEigenvectors(), ei0.pseudoEigenvectors() * ei0.pseudoEigenvalueMatrix());\n  VERIFY_IS_APPROX((symmA.template cast<Complex>()) * (ei0.pseudoEigenvectors().template cast<Complex>()),\n    (ei0.pseudoEigenvectors().template cast<Complex>()) * (ei0.eigenvalues().asDiagonal()));\n\n  EigenSolver<MatrixType> ei1(a);\n  CALL_SUBTEST( check_eigensolver_for_given_mat(ei1,a) );\n\n  EigenSolver<MatrixType> ei2;\n  ei2.setMaxIterations(RealSchur<MatrixType>::m_maxIterationsPerRow * rows).compute(a);\n  VERIFY_IS_EQUAL(ei2.info(), Success);\n  VERIFY_IS_EQUAL(ei2.eigenvectors(), ei1.eigenvectors());\n  VERIFY_IS_EQUAL(ei2.eigenvalues(), ei1.eigenvalues());\n  if (rows > 2) {\n    ei2.setMaxIterations(1).compute(a);\n    VERIFY_IS_EQUAL(ei2.info(), NoConvergence);\n    VERIFY_IS_EQUAL(ei2.getMaxIterations(), 1);\n  }\n\n  EigenSolver<MatrixType> eiNoEivecs(a, false);\n  VERIFY_IS_EQUAL(eiNoEivecs.info(), Success);\n  VERIFY_IS_APPROX(ei1.eigenvalues(), eiNoEivecs.eigenvalues());\n  VERIFY_IS_APPROX(ei1.pseudoEigenvalueMatrix(), eiNoEivecs.pseudoEigenvalueMatrix());\n\n  MatrixType id = MatrixType::Identity(rows, cols);\n  VERIFY_IS_APPROX(id.operatorNorm(), RealScalar(1));\n\n  if (rows > 2 && rows < 20)\n  {\n    // Test matrix with NaN\n    a(0,0) = std::numeric_limits<typename MatrixType::RealScalar>::quiet_NaN();\n    EigenSolver<MatrixType> eiNaN(a);\n    VERIFY_IS_NOT_EQUAL(eiNaN.info(), Success);\n  }\n\n  // regression test for bug 1098\n  {\n    EigenSolver<MatrixType> eig(a.adjoint() * a);\n    eig.compute(a.adjoint() * a);\n  }\n\n  // regression test for bug 478\n  {\n    a.setZero();\n    EigenSolver<MatrixType> ei3(a);\n    VERIFY_IS_EQUAL(ei3.info(), Success);\n    VERIFY_IS_MUCH_SMALLER_THAN(ei3.eigenvalues().norm(),RealScalar(1));\n    VERIFY((ei3.eigenvectors().transpose()*ei3.eigenvectors().transpose()).eval().isIdentity());\n  }\n}\n\ntemplate<typename MatrixType> void eigensolver_verify_assert(const MatrixType& m)\n{\n  EigenSolver<MatrixType> eig;\n  VERIFY_RAISES_ASSERT(eig.eigenvectors());\n  VERIFY_RAISES_ASSERT(eig.pseudoEigenvectors());\n  VERIFY_RAISES_ASSERT(eig.pseudoEigenvalueMatrix());\n  VERIFY_RAISES_ASSERT(eig.eigenvalues());\n\n  MatrixType a = MatrixType::Random(m.rows(),m.cols());\n  eig.compute(a, false);\n  VERIFY_RAISES_ASSERT(eig.eigenvectors());\n  VERIFY_RAISES_ASSERT(eig.pseudoEigenvectors());\n}\n\n\ntemplate<typename CoeffType>\nMatrix<typename CoeffType::Scalar,Dynamic,Dynamic>\nmake_companion(const CoeffType& coeffs)\n{\n  Index n = coeffs.size()-1;\n  Matrix<typename CoeffType::Scalar,Dynamic,Dynamic> res(n,n);\n  res.setZero();\n\tres.row(0) = -coeffs.tail(n) / coeffs(0);\n\tres.diagonal(-1).setOnes();\n  return res;\n}\n\ntemplate<int>\nvoid eigensolver_generic_extra()\n{\n  {\n    // regression test for bug 793\n    MatrixXd a(3,3);\n    a << 0,  0,  1,\n        1,  1, 1,\n        1, 1e+200,  1;\n    Eigen::EigenSolver<MatrixXd> eig(a);\n    double scale = 1e-200; // scale to avoid overflow during the comparisons\n    VERIFY_IS_APPROX(a * eig.pseudoEigenvectors()*scale, eig.pseudoEigenvectors() * eig.pseudoEigenvalueMatrix()*scale);\n    VERIFY_IS_APPROX(a * eig.eigenvectors()*scale, eig.eigenvectors() * eig.eigenvalues().asDiagonal()*scale);\n  }\n  {\n    // check a case where all eigenvalues are null.\n    MatrixXd a(2,2);\n    a << 1,  1,\n        -1, -1;\n    Eigen::EigenSolver<MatrixXd> eig(a);\n    VERIFY_IS_APPROX(eig.pseudoEigenvectors().squaredNorm(), 2.);\n    VERIFY_IS_APPROX((a * eig.pseudoEigenvectors()).norm()+1., 1.);\n    VERIFY_IS_APPROX((eig.pseudoEigenvectors() * eig.pseudoEigenvalueMatrix()).norm()+1., 1.);\n    VERIFY_IS_APPROX((a * eig.eigenvectors()).norm()+1., 1.);\n    VERIFY_IS_APPROX((eig.eigenvectors() * eig.eigenvalues().asDiagonal()).norm()+1., 1.);\n  }\n\n  // regression test for bug 933\n  {\n    {\n      VectorXd coeffs(5); coeffs << 1, -3, -175, -225, 2250;\n      MatrixXd C = make_companion(coeffs);\n      EigenSolver<MatrixXd> eig(C);\n      CALL_SUBTEST( check_eigensolver_for_given_mat(eig,C) );\n    }\n    {\n      // this test is tricky because it requires high accuracy in smallest eigenvalues\n      VectorXd coeffs(5); coeffs << 6.154671e-15, -1.003870e-10, -9.819570e-01, 3.995715e+03, 2.211511e+08;\n      MatrixXd C = make_companion(coeffs);\n      EigenSolver<MatrixXd> eig(C);\n      CALL_SUBTEST( check_eigensolver_for_given_mat(eig,C) );\n      Index n = C.rows();\n      for(Index i=0;i<n;++i)\n      {\n        typedef std::complex<double> Complex;\n        MatrixXcd ac = C.cast<Complex>();\n        ac.diagonal().array() -= eig.eigenvalues()(i);\n        VectorXd sv = ac.jacobiSvd().singularValues();\n        // comparing to sv(0) is not enough here to catch the \"bug\",\n        // the hard-coded 1.0 is important!\n        VERIFY_IS_MUCH_SMALLER_THAN(sv(n-1), 1.0);\n      }\n    }\n  }\n  // regression test for bug 1557\n  {\n    // this test is interesting because it contains zeros on the diagonal.\n    MatrixXd A_bug1557(3,3);\n    A_bug1557 << 0, 0, 0, 1, 0, 0.5887907064808635127, 0, 1, 0;\n    EigenSolver<MatrixXd> eig(A_bug1557);\n    CALL_SUBTEST( check_eigensolver_for_given_mat(eig,A_bug1557) );\n  }\n\n  // regression test for bug 1174\n  {\n    Index n = 12;\n    MatrixXf A_bug1174(n,n);\n    A_bug1174 <<  262144, 0, 0, 262144, 786432, 0, 0, 0, 0, 0, 0, 786432,\n                  262144, 0, 0, 262144, 786432, 0, 0, 0, 0, 0, 0, 786432,\n                  262144, 0, 0, 262144, 786432, 0, 0, 0, 0, 0, 0, 786432,\n                  262144, 0, 0, 262144, 786432, 0, 0, 0, 0, 0, 0, 786432,\n                  0, 262144, 262144, 0, 0, 262144, 262144, 262144, 262144, 262144, 262144, 0,\n                  0, 262144, 262144, 0, 0, 262144, 262144, 262144, 262144, 262144, 262144, 0,\n                  0, 262144, 262144, 0, 0, 262144, 262144, 262144, 262144, 262144, 262144, 0,\n                  0, 262144, 262144, 0, 0, 262144, 262144, 262144, 262144, 262144, 262144, 0,\n                  0, 262144, 262144, 0, 0, 262144, 262144, 262144, 262144, 262144, 262144, 0,\n                  0, 262144, 262144, 0, 0, 262144, 262144, 262144, 262144, 262144, 262144, 0,\n                  0, 262144, 262144, 0, 0, 262144, 262144, 262144, 262144, 262144, 262144, 0,\n                  0, 262144, 262144, 0, 0, 262144, 262144, 262144, 262144, 262144, 262144, 0;\n    EigenSolver<MatrixXf> eig(A_bug1174);\n    CALL_SUBTEST( check_eigensolver_for_given_mat(eig,A_bug1174) );\n  }\n}\n\nEIGEN_DECLARE_TEST(eigensolver_generic)\n{\n  int s = 0;\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( eigensolver(Matrix4f()) );\n    s = internal::random<int>(1,EIGEN_TEST_MAX_SIZE/4);\n    CALL_SUBTEST_2( eigensolver(MatrixXd(s,s)) );\n    TEST_SET_BUT_UNUSED_VARIABLE(s)\n\n    // some trivial but implementation-wise tricky cases\n    CALL_SUBTEST_2( eigensolver(MatrixXd(1,1)) );\n    CALL_SUBTEST_2( eigensolver(MatrixXd(2,2)) );\n    CALL_SUBTEST_3( eigensolver(Matrix<double,1,1>()) );\n    CALL_SUBTEST_4( eigensolver(Matrix2d()) );\n  }\n\n  CALL_SUBTEST_1( eigensolver_verify_assert(Matrix4f()) );\n  s = internal::random<int>(1,EIGEN_TEST_MAX_SIZE/4);\n  CALL_SUBTEST_2( eigensolver_verify_assert(MatrixXd(s,s)) );\n  CALL_SUBTEST_3( eigensolver_verify_assert(Matrix<double,1,1>()) );\n  CALL_SUBTEST_4( eigensolver_verify_assert(Matrix2d()) );\n\n  // Test problem size constructors\n  CALL_SUBTEST_5(EigenSolver<MatrixXf> tmp(s));\n\n  // regression test for bug 410\n  CALL_SUBTEST_2(\n  {\n     MatrixXd A(1,1);\n     A(0,0) = std::sqrt(-1.); // is Not-a-Number\n     Eigen::EigenSolver<MatrixXd> solver(A);\n     VERIFY_IS_EQUAL(solver.info(), NumericalIssue);\n  }\n  );\n  \n  CALL_SUBTEST_2( eigensolver_generic_extra<0>() );\n  \n  TEST_SET_BUT_UNUSED_VARIABLE(s)\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/eigensolver_selfadjoint.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2010 Jitse Niesen <jitse@maths.leeds.ac.uk>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include \"svd_fill.h\"\n#include <limits>\n#include <Eigen/Eigenvalues>\n#include <Eigen/SparseCore>\n\n\ntemplate<typename MatrixType> void selfadjointeigensolver_essential_check(const MatrixType& m)\n{\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  RealScalar eival_eps = numext::mini<RealScalar>(test_precision<RealScalar>(),  NumTraits<Scalar>::dummy_precision()*20000);\n  \n  SelfAdjointEigenSolver<MatrixType> eiSymm(m);\n  VERIFY_IS_EQUAL(eiSymm.info(), Success);\n\n  RealScalar scaling = m.cwiseAbs().maxCoeff();\n\n  if(scaling<(std::numeric_limits<RealScalar>::min)())\n  {\n    VERIFY(eiSymm.eigenvalues().cwiseAbs().maxCoeff() <= (std::numeric_limits<RealScalar>::min)());\n  }\n  else\n  {\n    VERIFY_IS_APPROX((m.template selfadjointView<Lower>() * eiSymm.eigenvectors())/scaling,\n                     (eiSymm.eigenvectors() * eiSymm.eigenvalues().asDiagonal())/scaling);\n  }\n  VERIFY_IS_APPROX(m.template selfadjointView<Lower>().eigenvalues(), eiSymm.eigenvalues());\n  VERIFY_IS_UNITARY(eiSymm.eigenvectors());\n\n  if(m.cols()<=4)\n  {\n    SelfAdjointEigenSolver<MatrixType> eiDirect;\n    eiDirect.computeDirect(m);  \n    VERIFY_IS_EQUAL(eiDirect.info(), Success);\n    if(! eiSymm.eigenvalues().isApprox(eiDirect.eigenvalues(), eival_eps) )\n    {\n      std::cerr << \"reference eigenvalues: \" << eiSymm.eigenvalues().transpose() << \"\\n\"\n                << \"obtained eigenvalues:  \" << eiDirect.eigenvalues().transpose() << \"\\n\"\n                << \"diff:                  \" << (eiSymm.eigenvalues()-eiDirect.eigenvalues()).transpose() << \"\\n\"\n                << \"error (eps):           \" << (eiSymm.eigenvalues()-eiDirect.eigenvalues()).norm() / eiSymm.eigenvalues().norm() << \"  (\" << eival_eps << \")\\n\";\n    }\n    if(scaling<(std::numeric_limits<RealScalar>::min)())\n    {\n      VERIFY(eiDirect.eigenvalues().cwiseAbs().maxCoeff() <= (std::numeric_limits<RealScalar>::min)());\n    }\n    else\n    {\n      VERIFY_IS_APPROX(eiSymm.eigenvalues()/scaling, eiDirect.eigenvalues()/scaling);\n      VERIFY_IS_APPROX((m.template selfadjointView<Lower>() * eiDirect.eigenvectors())/scaling,\n                       (eiDirect.eigenvectors() * eiDirect.eigenvalues().asDiagonal())/scaling);\n      VERIFY_IS_APPROX(m.template selfadjointView<Lower>().eigenvalues()/scaling, eiDirect.eigenvalues()/scaling);\n    }\n\n    VERIFY_IS_UNITARY(eiDirect.eigenvectors());\n  }\n}\n\ntemplate<typename MatrixType> void selfadjointeigensolver(const MatrixType& m)\n{\n  /* this test covers the following files:\n     EigenSolver.h, SelfAdjointEigenSolver.h (and indirectly: Tridiagonalization.h)\n  */\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n\n  RealScalar largerEps = 10*test_precision<RealScalar>();\n\n  MatrixType a = MatrixType::Random(rows,cols);\n  MatrixType a1 = MatrixType::Random(rows,cols);\n  MatrixType symmA =  a.adjoint() * a + a1.adjoint() * a1;\n  MatrixType symmC = symmA;\n  \n  svd_fill_random(symmA,Symmetric);\n\n  symmA.template triangularView<StrictlyUpper>().setZero();\n  symmC.template triangularView<StrictlyUpper>().setZero();\n\n  MatrixType b = MatrixType::Random(rows,cols);\n  MatrixType b1 = MatrixType::Random(rows,cols);\n  MatrixType symmB = b.adjoint() * b + b1.adjoint() * b1;\n  symmB.template triangularView<StrictlyUpper>().setZero();\n  \n  CALL_SUBTEST( selfadjointeigensolver_essential_check(symmA) );\n\n  SelfAdjointEigenSolver<MatrixType> eiSymm(symmA);\n  // generalized eigen pb\n  GeneralizedSelfAdjointEigenSolver<MatrixType> eiSymmGen(symmC, symmB);\n\n  SelfAdjointEigenSolver<MatrixType> eiSymmNoEivecs(symmA, false);\n  VERIFY_IS_EQUAL(eiSymmNoEivecs.info(), Success);\n  VERIFY_IS_APPROX(eiSymm.eigenvalues(), eiSymmNoEivecs.eigenvalues());\n  \n  // generalized eigen problem Ax = lBx\n  eiSymmGen.compute(symmC, symmB,Ax_lBx);\n  VERIFY_IS_EQUAL(eiSymmGen.info(), Success);\n  VERIFY((symmC.template selfadjointView<Lower>() * eiSymmGen.eigenvectors()).isApprox(\n          symmB.template selfadjointView<Lower>() * (eiSymmGen.eigenvectors() * eiSymmGen.eigenvalues().asDiagonal()), largerEps));\n\n  // generalized eigen problem BAx = lx\n  eiSymmGen.compute(symmC, symmB,BAx_lx);\n  VERIFY_IS_EQUAL(eiSymmGen.info(), Success);\n  VERIFY((symmB.template selfadjointView<Lower>() * (symmC.template selfadjointView<Lower>() * eiSymmGen.eigenvectors())).isApprox(\n         (eiSymmGen.eigenvectors() * eiSymmGen.eigenvalues().asDiagonal()), largerEps));\n\n  // generalized eigen problem ABx = lx\n  eiSymmGen.compute(symmC, symmB,ABx_lx);\n  VERIFY_IS_EQUAL(eiSymmGen.info(), Success);\n  VERIFY((symmC.template selfadjointView<Lower>() * (symmB.template selfadjointView<Lower>() * eiSymmGen.eigenvectors())).isApprox(\n         (eiSymmGen.eigenvectors() * eiSymmGen.eigenvalues().asDiagonal()), largerEps));\n\n\n  eiSymm.compute(symmC);\n  MatrixType sqrtSymmA = eiSymm.operatorSqrt();\n  VERIFY_IS_APPROX(MatrixType(symmC.template selfadjointView<Lower>()), sqrtSymmA*sqrtSymmA);\n  VERIFY_IS_APPROX(sqrtSymmA, symmC.template selfadjointView<Lower>()*eiSymm.operatorInverseSqrt());\n\n  MatrixType id = MatrixType::Identity(rows, cols);\n  VERIFY_IS_APPROX(id.template selfadjointView<Lower>().operatorNorm(), RealScalar(1));\n\n  SelfAdjointEigenSolver<MatrixType> eiSymmUninitialized;\n  VERIFY_RAISES_ASSERT(eiSymmUninitialized.info());\n  VERIFY_RAISES_ASSERT(eiSymmUninitialized.eigenvalues());\n  VERIFY_RAISES_ASSERT(eiSymmUninitialized.eigenvectors());\n  VERIFY_RAISES_ASSERT(eiSymmUninitialized.operatorSqrt());\n  VERIFY_RAISES_ASSERT(eiSymmUninitialized.operatorInverseSqrt());\n\n  eiSymmUninitialized.compute(symmA, false);\n  VERIFY_RAISES_ASSERT(eiSymmUninitialized.eigenvectors());\n  VERIFY_RAISES_ASSERT(eiSymmUninitialized.operatorSqrt());\n  VERIFY_RAISES_ASSERT(eiSymmUninitialized.operatorInverseSqrt());\n\n  // test Tridiagonalization's methods\n  Tridiagonalization<MatrixType> tridiag(symmC);\n  VERIFY_IS_APPROX(tridiag.diagonal(), tridiag.matrixT().diagonal());\n  VERIFY_IS_APPROX(tridiag.subDiagonal(), tridiag.matrixT().template diagonal<-1>());\n  Matrix<RealScalar,Dynamic,Dynamic> T = tridiag.matrixT();\n  if(rows>1 && cols>1) {\n    // FIXME check that upper and lower part are 0:\n    //VERIFY(T.topRightCorner(rows-2, cols-2).template triangularView<Upper>().isZero());\n  }\n  VERIFY_IS_APPROX(tridiag.diagonal(), T.diagonal());\n  VERIFY_IS_APPROX(tridiag.subDiagonal(), T.template diagonal<1>());\n  VERIFY_IS_APPROX(MatrixType(symmC.template selfadjointView<Lower>()), tridiag.matrixQ() * tridiag.matrixT().eval() * MatrixType(tridiag.matrixQ()).adjoint());\n  VERIFY_IS_APPROX(MatrixType(symmC.template selfadjointView<Lower>()), tridiag.matrixQ() * tridiag.matrixT() * tridiag.matrixQ().adjoint());\n  \n  // Test computation of eigenvalues from tridiagonal matrix\n  if(rows > 1)\n  {\n    SelfAdjointEigenSolver<MatrixType> eiSymmTridiag;\n    eiSymmTridiag.computeFromTridiagonal(tridiag.matrixT().diagonal(), tridiag.matrixT().diagonal(-1), ComputeEigenvectors);\n    VERIFY_IS_APPROX(eiSymm.eigenvalues(), eiSymmTridiag.eigenvalues());\n    VERIFY_IS_APPROX(tridiag.matrixT(), eiSymmTridiag.eigenvectors().real() * eiSymmTridiag.eigenvalues().asDiagonal() * eiSymmTridiag.eigenvectors().real().transpose());\n  }\n\n  if (rows > 1 && rows < 20)\n  {\n    // Test matrix with NaN\n    symmC(0,0) = std::numeric_limits<typename MatrixType::RealScalar>::quiet_NaN();\n    SelfAdjointEigenSolver<MatrixType> eiSymmNaN(symmC);\n    VERIFY_IS_EQUAL(eiSymmNaN.info(), NoConvergence);\n  }\n\n  // regression test for bug 1098\n  {\n    SelfAdjointEigenSolver<MatrixType> eig(a.adjoint() * a);\n    eig.compute(a.adjoint() * a);\n  }\n\n  // regression test for bug 478\n  {\n    a.setZero();\n    SelfAdjointEigenSolver<MatrixType> ei3(a);\n    VERIFY_IS_EQUAL(ei3.info(), Success);\n    VERIFY_IS_MUCH_SMALLER_THAN(ei3.eigenvalues().norm(),RealScalar(1));\n    VERIFY((ei3.eigenvectors().transpose()*ei3.eigenvectors().transpose()).eval().isIdentity());\n  }\n}\n\ntemplate<int>\nvoid bug_854()\n{\n  Matrix3d m;\n  m << 850.961, 51.966, 0,\n       51.966, 254.841, 0,\n            0,       0, 0;\n  selfadjointeigensolver_essential_check(m);\n}\n\ntemplate<int>\nvoid bug_1014()\n{\n  Matrix3d m;\n  m <<        0.11111111111111114658, 0, 0,\n       0,     0.11111111111111109107, 0,\n       0, 0,  0.11111111111111107719;\n  selfadjointeigensolver_essential_check(m);\n}\n\ntemplate<int>\nvoid bug_1225()\n{\n  Matrix3d m1, m2;\n  m1.setRandom();\n  m1 = m1*m1.transpose();\n  m2 = m1.triangularView<Upper>();\n  SelfAdjointEigenSolver<Matrix3d> eig1(m1);\n  SelfAdjointEigenSolver<Matrix3d> eig2(m2.selfadjointView<Upper>());\n  VERIFY_IS_APPROX(eig1.eigenvalues(), eig2.eigenvalues());\n}\n\ntemplate<int>\nvoid bug_1204()\n{\n  SparseMatrix<double> A(2,2);\n  A.setIdentity();\n  SelfAdjointEigenSolver<Eigen::SparseMatrix<double> > eig(A);\n}\n\nEIGEN_DECLARE_TEST(eigensolver_selfadjoint)\n{\n  int s = 0;\n  for(int i = 0; i < g_repeat; i++) {\n    // trivial test for 1x1 matrices:\n    CALL_SUBTEST_1( selfadjointeigensolver(Matrix<float, 1, 1>()));\n    CALL_SUBTEST_1( selfadjointeigensolver(Matrix<double, 1, 1>()));\n    // very important to test 3x3 and 2x2 matrices since we provide special paths for them\n    CALL_SUBTEST_12( selfadjointeigensolver(Matrix2f()) );\n    CALL_SUBTEST_12( selfadjointeigensolver(Matrix2d()) );\n    CALL_SUBTEST_13( selfadjointeigensolver(Matrix3f()) );\n    CALL_SUBTEST_13( selfadjointeigensolver(Matrix3d()) );\n    CALL_SUBTEST_2( selfadjointeigensolver(Matrix4d()) );\n    \n    s = internal::random<int>(1,EIGEN_TEST_MAX_SIZE/4);\n    CALL_SUBTEST_3( selfadjointeigensolver(MatrixXf(s,s)) );\n    CALL_SUBTEST_4( selfadjointeigensolver(MatrixXd(s,s)) );\n    CALL_SUBTEST_5( selfadjointeigensolver(MatrixXcd(s,s)) );\n    CALL_SUBTEST_9( selfadjointeigensolver(Matrix<std::complex<double>,Dynamic,Dynamic,RowMajor>(s,s)) );\n    TEST_SET_BUT_UNUSED_VARIABLE(s)\n\n    // some trivial but implementation-wise tricky cases\n    CALL_SUBTEST_4( selfadjointeigensolver(MatrixXd(1,1)) );\n    CALL_SUBTEST_4( selfadjointeigensolver(MatrixXd(2,2)) );\n    CALL_SUBTEST_6( selfadjointeigensolver(Matrix<double,1,1>()) );\n    CALL_SUBTEST_7( selfadjointeigensolver(Matrix<double,2,2>()) );\n  }\n  \n  CALL_SUBTEST_13( bug_854<0>() );\n  CALL_SUBTEST_13( bug_1014<0>() );\n  CALL_SUBTEST_13( bug_1204<0>() );\n  CALL_SUBTEST_13( bug_1225<0>() );\n\n  // Test problem size constructors\n  s = internal::random<int>(1,EIGEN_TEST_MAX_SIZE/4);\n  CALL_SUBTEST_8(SelfAdjointEigenSolver<MatrixXf> tmp1(s));\n  CALL_SUBTEST_8(Tridiagonalization<MatrixXf> tmp2(s));\n  \n  TEST_SET_BUT_UNUSED_VARIABLE(s)\n}\n\n"
  },
  {
    "path": "3rdparty/eigen3/test/evaluator_common.h",
    "content": ""
  },
  {
    "path": "3rdparty/eigen3/test/evaluators.cpp",
    "content": "\n#include \"main.h\"\n\nnamespace Eigen {\n\n  template<typename Lhs,typename Rhs>\n  const Product<Lhs,Rhs>\n  prod(const Lhs& lhs, const Rhs& rhs)\n  {\n    return Product<Lhs,Rhs>(lhs,rhs);\n  }\n\n  template<typename Lhs,typename Rhs>\n  const Product<Lhs,Rhs,LazyProduct>\n  lazyprod(const Lhs& lhs, const Rhs& rhs)\n  {\n    return Product<Lhs,Rhs,LazyProduct>(lhs,rhs);\n  }\n  \n  template<typename DstXprType, typename SrcXprType>\n  EIGEN_STRONG_INLINE\n  DstXprType& copy_using_evaluator(const EigenBase<DstXprType> &dst, const SrcXprType &src)\n  {\n    call_assignment(dst.const_cast_derived(), src.derived(), internal::assign_op<typename DstXprType::Scalar,typename SrcXprType::Scalar>());\n    return dst.const_cast_derived();\n  }\n  \n  template<typename DstXprType, template <typename> class StorageBase, typename SrcXprType>\n  EIGEN_STRONG_INLINE\n  const DstXprType& copy_using_evaluator(const NoAlias<DstXprType, StorageBase>& dst, const SrcXprType &src)\n  {\n    call_assignment(dst, src.derived(), internal::assign_op<typename DstXprType::Scalar,typename SrcXprType::Scalar>());\n    return dst.expression();\n  }\n  \n  template<typename DstXprType, typename SrcXprType>\n  EIGEN_STRONG_INLINE\n  DstXprType& copy_using_evaluator(const PlainObjectBase<DstXprType> &dst, const SrcXprType &src)\n  {\n    #ifdef EIGEN_NO_AUTOMATIC_RESIZING\n    eigen_assert((dst.size()==0 || (IsVectorAtCompileTime ? (dst.size() == src.size())\n                                                          : (dst.rows() == src.rows() && dst.cols() == src.cols())))\n                && \"Size mismatch. Automatic resizing is disabled because EIGEN_NO_AUTOMATIC_RESIZING is defined\");\n  #else\n    dst.const_cast_derived().resizeLike(src.derived());\n  #endif\n    \n    call_assignment(dst.const_cast_derived(), src.derived(), internal::assign_op<typename DstXprType::Scalar,typename SrcXprType::Scalar>());\n    return dst.const_cast_derived();\n  }\n\n  template<typename DstXprType, typename SrcXprType>\n  void add_assign_using_evaluator(const DstXprType& dst, const SrcXprType& src)\n  {\n    typedef typename DstXprType::Scalar Scalar;\n    call_assignment(const_cast<DstXprType&>(dst), src.derived(), internal::add_assign_op<Scalar,typename SrcXprType::Scalar>());\n  }\n\n  template<typename DstXprType, typename SrcXprType>\n  void subtract_assign_using_evaluator(const DstXprType& dst, const SrcXprType& src)\n  {\n    typedef typename DstXprType::Scalar Scalar;\n    call_assignment(const_cast<DstXprType&>(dst), src.derived(), internal::sub_assign_op<Scalar,typename SrcXprType::Scalar>());\n  }\n\n  template<typename DstXprType, typename SrcXprType>\n  void multiply_assign_using_evaluator(const DstXprType& dst, const SrcXprType& src)\n  {\n    typedef typename DstXprType::Scalar Scalar;\n    call_assignment(dst.const_cast_derived(), src.derived(), internal::mul_assign_op<Scalar,typename SrcXprType::Scalar>());\n  }\n\n  template<typename DstXprType, typename SrcXprType>\n  void divide_assign_using_evaluator(const DstXprType& dst, const SrcXprType& src)\n  {\n    typedef typename DstXprType::Scalar Scalar;\n    call_assignment(dst.const_cast_derived(), src.derived(), internal::div_assign_op<Scalar,typename SrcXprType::Scalar>());\n  }\n  \n  template<typename DstXprType, typename SrcXprType>\n  void swap_using_evaluator(const DstXprType& dst, const SrcXprType& src)\n  {\n    typedef typename DstXprType::Scalar Scalar;\n    call_assignment(dst.const_cast_derived(), src.const_cast_derived(), internal::swap_assign_op<Scalar>());\n  }\n\n  namespace internal {\n    template<typename Dst, template <typename> class StorageBase, typename Src, typename Func>\n    EIGEN_DEVICE_FUNC void call_assignment(const NoAlias<Dst,StorageBase>& dst, const Src& src, const Func& func)\n    {\n      call_assignment_no_alias(dst.expression(), src, func);\n    }\n\n    template<typename Dst, template <typename> class StorageBase, typename Src, typename Func>\n    EIGEN_DEVICE_FUNC void call_restricted_packet_assignment(const NoAlias<Dst,StorageBase>& dst, const Src& src, const Func& func)\n    {\n      call_restricted_packet_assignment_no_alias(dst.expression(), src, func);\n    }\n  }\n  \n}\n\ntemplate<typename XprType> long get_cost(const XprType& ) { return Eigen::internal::evaluator<XprType>::CoeffReadCost; }\n\nusing namespace std;\n\n#define VERIFY_IS_APPROX_EVALUATOR(DEST,EXPR) VERIFY_IS_APPROX(copy_using_evaluator(DEST,(EXPR)), (EXPR).eval());\n#define VERIFY_IS_APPROX_EVALUATOR2(DEST,EXPR,REF) VERIFY_IS_APPROX(copy_using_evaluator(DEST,(EXPR)), (REF).eval());\n\nEIGEN_DECLARE_TEST(evaluators)\n{\n  // Testing Matrix evaluator and Transpose\n  Vector2d v = Vector2d::Random();\n  const Vector2d v_const(v);\n  Vector2d v2;\n  RowVector2d w;\n\n  VERIFY_IS_APPROX_EVALUATOR(v2, v);\n  VERIFY_IS_APPROX_EVALUATOR(v2, v_const);\n\n  // Testing Transpose\n  VERIFY_IS_APPROX_EVALUATOR(w, v.transpose()); // Transpose as rvalue\n  VERIFY_IS_APPROX_EVALUATOR(w, v_const.transpose());\n\n  copy_using_evaluator(w.transpose(), v); // Transpose as lvalue\n  VERIFY_IS_APPROX(w,v.transpose().eval());\n\n  copy_using_evaluator(w.transpose(), v_const);\n  VERIFY_IS_APPROX(w,v_const.transpose().eval());\n\n  // Testing Array evaluator\n  {\n    ArrayXXf a(2,3);\n    ArrayXXf b(3,2);\n    a << 1,2,3, 4,5,6;\n    const ArrayXXf a_const(a);\n\n    VERIFY_IS_APPROX_EVALUATOR(b, a.transpose());\n\n    VERIFY_IS_APPROX_EVALUATOR(b, a_const.transpose());\n\n    // Testing CwiseNullaryOp evaluator\n    copy_using_evaluator(w, RowVector2d::Random());\n    VERIFY((w.array() >= -1).all() && (w.array() <= 1).all()); // not easy to test ...\n\n    VERIFY_IS_APPROX_EVALUATOR(w, RowVector2d::Zero());\n\n    VERIFY_IS_APPROX_EVALUATOR(w, RowVector2d::Constant(3));\n    \n    // mix CwiseNullaryOp and transpose\n    VERIFY_IS_APPROX_EVALUATOR(w, Vector2d::Zero().transpose());\n  }\n\n  {\n    // test product expressions\n    int s = internal::random<int>(1,100);\n    MatrixXf a(s,s), b(s,s), c(s,s), d(s,s);\n    a.setRandom();\n    b.setRandom();\n    c.setRandom();\n    d.setRandom();\n    VERIFY_IS_APPROX_EVALUATOR(d, (a + b));\n    VERIFY_IS_APPROX_EVALUATOR(d, (a + b).transpose());\n    VERIFY_IS_APPROX_EVALUATOR2(d, prod(a,b), a*b);\n    VERIFY_IS_APPROX_EVALUATOR2(d.noalias(), prod(a,b), a*b);\n    VERIFY_IS_APPROX_EVALUATOR2(d, prod(a,b) + c, a*b + c);\n    VERIFY_IS_APPROX_EVALUATOR2(d, s * prod(a,b), s * a*b);\n    VERIFY_IS_APPROX_EVALUATOR2(d, prod(a,b).transpose(), (a*b).transpose());\n    VERIFY_IS_APPROX_EVALUATOR2(d, prod(a,b) + prod(b,c), a*b + b*c);\n\n    // check that prod works even with aliasing present\n    c = a*a;\n    copy_using_evaluator(a, prod(a,a));\n    VERIFY_IS_APPROX(a,c);\n\n    // check compound assignment of products\n    d = c;\n    add_assign_using_evaluator(c.noalias(), prod(a,b));\n    d.noalias() += a*b;\n    VERIFY_IS_APPROX(c, d);\n\n    d = c;\n    subtract_assign_using_evaluator(c.noalias(), prod(a,b));\n    d.noalias() -= a*b;\n    VERIFY_IS_APPROX(c, d);\n  }\n\n  {\n    // test product with all possible sizes\n    int s = internal::random<int>(1,100);\n    Matrix<float,      1,      1> m11, res11;  m11.setRandom(1,1);\n    Matrix<float,      1,      4> m14, res14;  m14.setRandom(1,4);\n    Matrix<float,      1,Dynamic> m1X, res1X;  m1X.setRandom(1,s);\n    Matrix<float,      4,      1> m41, res41;  m41.setRandom(4,1);\n    Matrix<float,      4,      4> m44, res44;  m44.setRandom(4,4);\n    Matrix<float,      4,Dynamic> m4X, res4X;  m4X.setRandom(4,s);\n    Matrix<float,Dynamic,      1> mX1, resX1;  mX1.setRandom(s,1);\n    Matrix<float,Dynamic,      4> mX4, resX4;  mX4.setRandom(s,4);\n    Matrix<float,Dynamic,Dynamic> mXX, resXX;  mXX.setRandom(s,s);\n\n    VERIFY_IS_APPROX_EVALUATOR2(res11, prod(m11,m11), m11*m11);\n    VERIFY_IS_APPROX_EVALUATOR2(res11, prod(m14,m41), m14*m41);\n    VERIFY_IS_APPROX_EVALUATOR2(res11, prod(m1X,mX1), m1X*mX1);\n    VERIFY_IS_APPROX_EVALUATOR2(res14, prod(m11,m14), m11*m14);\n    VERIFY_IS_APPROX_EVALUATOR2(res14, prod(m14,m44), m14*m44);\n    VERIFY_IS_APPROX_EVALUATOR2(res14, prod(m1X,mX4), m1X*mX4);\n    VERIFY_IS_APPROX_EVALUATOR2(res1X, prod(m11,m1X), m11*m1X);\n    VERIFY_IS_APPROX_EVALUATOR2(res1X, prod(m14,m4X), m14*m4X);\n    VERIFY_IS_APPROX_EVALUATOR2(res1X, prod(m1X,mXX), m1X*mXX);\n    VERIFY_IS_APPROX_EVALUATOR2(res41, prod(m41,m11), m41*m11);\n    VERIFY_IS_APPROX_EVALUATOR2(res41, prod(m44,m41), m44*m41);\n    VERIFY_IS_APPROX_EVALUATOR2(res41, prod(m4X,mX1), m4X*mX1);\n    VERIFY_IS_APPROX_EVALUATOR2(res44, prod(m41,m14), m41*m14);\n    VERIFY_IS_APPROX_EVALUATOR2(res44, prod(m44,m44), m44*m44);\n    VERIFY_IS_APPROX_EVALUATOR2(res44, prod(m4X,mX4), m4X*mX4);\n    VERIFY_IS_APPROX_EVALUATOR2(res4X, prod(m41,m1X), m41*m1X);\n    VERIFY_IS_APPROX_EVALUATOR2(res4X, prod(m44,m4X), m44*m4X);\n    VERIFY_IS_APPROX_EVALUATOR2(res4X, prod(m4X,mXX), m4X*mXX);\n    VERIFY_IS_APPROX_EVALUATOR2(resX1, prod(mX1,m11), mX1*m11);\n    VERIFY_IS_APPROX_EVALUATOR2(resX1, prod(mX4,m41), mX4*m41);\n    VERIFY_IS_APPROX_EVALUATOR2(resX1, prod(mXX,mX1), mXX*mX1);\n    VERIFY_IS_APPROX_EVALUATOR2(resX4, prod(mX1,m14), mX1*m14);\n    VERIFY_IS_APPROX_EVALUATOR2(resX4, prod(mX4,m44), mX4*m44);\n    VERIFY_IS_APPROX_EVALUATOR2(resX4, prod(mXX,mX4), mXX*mX4);\n    VERIFY_IS_APPROX_EVALUATOR2(resXX, prod(mX1,m1X), mX1*m1X);\n    VERIFY_IS_APPROX_EVALUATOR2(resXX, prod(mX4,m4X), mX4*m4X);\n    VERIFY_IS_APPROX_EVALUATOR2(resXX, prod(mXX,mXX), mXX*mXX);\n  }\n\n  {\n    ArrayXXf a(2,3);\n    ArrayXXf b(3,2);\n    a << 1,2,3, 4,5,6;\n    const ArrayXXf a_const(a);\n    \n    // this does not work because Random is eval-before-nested: \n    // copy_using_evaluator(w, Vector2d::Random().transpose());\n\n    // test CwiseUnaryOp\n    VERIFY_IS_APPROX_EVALUATOR(v2, 3 * v);\n    VERIFY_IS_APPROX_EVALUATOR(w, (3 * v).transpose());\n    VERIFY_IS_APPROX_EVALUATOR(b, (a + 3).transpose());\n    VERIFY_IS_APPROX_EVALUATOR(b, (2 * a_const + 3).transpose());\n\n    // test CwiseBinaryOp\n    VERIFY_IS_APPROX_EVALUATOR(v2, v + Vector2d::Ones());\n    VERIFY_IS_APPROX_EVALUATOR(w, (v + Vector2d::Ones()).transpose().cwiseProduct(RowVector2d::Constant(3)));\n\n    // dynamic matrices and arrays\n    MatrixXd mat1(6,6), mat2(6,6);\n    VERIFY_IS_APPROX_EVALUATOR(mat1, MatrixXd::Identity(6,6));\n    VERIFY_IS_APPROX_EVALUATOR(mat2, mat1);\n    copy_using_evaluator(mat2.transpose(), mat1);\n    VERIFY_IS_APPROX(mat2.transpose(), mat1);\n\n    ArrayXXd arr1(6,6), arr2(6,6);\n    VERIFY_IS_APPROX_EVALUATOR(arr1, ArrayXXd::Constant(6,6, 3.0));\n    VERIFY_IS_APPROX_EVALUATOR(arr2, arr1);\n    \n    // test automatic resizing\n    mat2.resize(3,3);\n    VERIFY_IS_APPROX_EVALUATOR(mat2, mat1);\n    arr2.resize(9,9);\n    VERIFY_IS_APPROX_EVALUATOR(arr2, arr1);\n\n    // test direct traversal\n    Matrix3f m3;\n    Array33f a3;\n    VERIFY_IS_APPROX_EVALUATOR(m3, Matrix3f::Identity());  // matrix, nullary\n    // TODO: find a way to test direct traversal with array\n    VERIFY_IS_APPROX_EVALUATOR(m3.transpose(), Matrix3f::Identity().transpose());  // transpose\n    VERIFY_IS_APPROX_EVALUATOR(m3, 2 * Matrix3f::Identity());  // unary\n    VERIFY_IS_APPROX_EVALUATOR(m3, Matrix3f::Identity() + Matrix3f::Zero());  // binary\n    VERIFY_IS_APPROX_EVALUATOR(m3.block(0,0,2,2), Matrix3f::Identity().block(1,1,2,2));  // block\n\n    // test linear traversal\n    VERIFY_IS_APPROX_EVALUATOR(m3, Matrix3f::Zero());  // matrix, nullary\n    VERIFY_IS_APPROX_EVALUATOR(a3, Array33f::Zero());  // array\n    VERIFY_IS_APPROX_EVALUATOR(m3.transpose(), Matrix3f::Zero().transpose());  // transpose\n    VERIFY_IS_APPROX_EVALUATOR(m3, 2 * Matrix3f::Zero());  // unary\n    VERIFY_IS_APPROX_EVALUATOR(m3, Matrix3f::Zero() + m3);  // binary  \n\n    // test inner vectorization\n    Matrix4f m4, m4src = Matrix4f::Random();\n    Array44f a4, a4src = Matrix4f::Random();\n    VERIFY_IS_APPROX_EVALUATOR(m4, m4src);  // matrix\n    VERIFY_IS_APPROX_EVALUATOR(a4, a4src);  // array\n    VERIFY_IS_APPROX_EVALUATOR(m4.transpose(), m4src.transpose());  // transpose\n    // TODO: find out why Matrix4f::Zero() does not allow inner vectorization\n    VERIFY_IS_APPROX_EVALUATOR(m4, 2 * m4src);  // unary\n    VERIFY_IS_APPROX_EVALUATOR(m4, m4src + m4src);  // binary\n\n    // test linear vectorization\n    MatrixXf mX(6,6), mXsrc = MatrixXf::Random(6,6);\n    ArrayXXf aX(6,6), aXsrc = ArrayXXf::Random(6,6);\n    VERIFY_IS_APPROX_EVALUATOR(mX, mXsrc);  // matrix\n    VERIFY_IS_APPROX_EVALUATOR(aX, aXsrc);  // array\n    VERIFY_IS_APPROX_EVALUATOR(mX.transpose(), mXsrc.transpose());  // transpose\n    VERIFY_IS_APPROX_EVALUATOR(mX, MatrixXf::Zero(6,6));  // nullary\n    VERIFY_IS_APPROX_EVALUATOR(mX, 2 * mXsrc);  // unary\n    VERIFY_IS_APPROX_EVALUATOR(mX, mXsrc + mXsrc);  // binary\n\n    // test blocks and slice vectorization\n    VERIFY_IS_APPROX_EVALUATOR(m4, (mXsrc.block<4,4>(1,0)));\n    VERIFY_IS_APPROX_EVALUATOR(aX, ArrayXXf::Constant(10, 10, 3.0).block(2, 3, 6, 6));\n\n    Matrix4f m4ref = m4;\n    copy_using_evaluator(m4.block(1, 1, 2, 3), m3.bottomRows(2));\n    m4ref.block(1, 1, 2, 3) = m3.bottomRows(2);\n    VERIFY_IS_APPROX(m4, m4ref);\n\n    mX.setIdentity(20,20);\n    MatrixXf mXref = MatrixXf::Identity(20,20);\n    mXsrc = MatrixXf::Random(9,12);\n    copy_using_evaluator(mX.block(4, 4, 9, 12), mXsrc);\n    mXref.block(4, 4, 9, 12) = mXsrc;\n    VERIFY_IS_APPROX(mX, mXref);\n\n    // test Map\n    const float raw[3] = {1,2,3};\n    float buffer[3] = {0,0,0};\n    Vector3f v3;\n    Array3f a3f;\n    VERIFY_IS_APPROX_EVALUATOR(v3, Map<const Vector3f>(raw));\n    VERIFY_IS_APPROX_EVALUATOR(a3f, Map<const Array3f>(raw));\n    Vector3f::Map(buffer) = 2*v3;\n    VERIFY(buffer[0] == 2);\n    VERIFY(buffer[1] == 4);\n    VERIFY(buffer[2] == 6);\n\n    // test CwiseUnaryView\n    mat1.setRandom();\n    mat2.setIdentity();\n    MatrixXcd matXcd(6,6), matXcd_ref(6,6);\n    copy_using_evaluator(matXcd.real(), mat1);\n    copy_using_evaluator(matXcd.imag(), mat2);\n    matXcd_ref.real() = mat1;\n    matXcd_ref.imag() = mat2;\n    VERIFY_IS_APPROX(matXcd, matXcd_ref);\n\n    // test Select\n    VERIFY_IS_APPROX_EVALUATOR(aX, (aXsrc > 0).select(aXsrc, -aXsrc));\n\n    // test Replicate\n    mXsrc = MatrixXf::Random(6, 6);\n    VectorXf vX = VectorXf::Random(6);\n    mX.resize(6, 6);\n    VERIFY_IS_APPROX_EVALUATOR(mX, mXsrc.colwise() + vX);\n    matXcd.resize(12, 12);\n    VERIFY_IS_APPROX_EVALUATOR(matXcd, matXcd_ref.replicate(2,2));\n    VERIFY_IS_APPROX_EVALUATOR(matXcd, (matXcd_ref.replicate<2,2>()));\n\n    // test partial reductions\n    VectorXd vec1(6);\n    VERIFY_IS_APPROX_EVALUATOR(vec1, mat1.rowwise().sum());\n    VERIFY_IS_APPROX_EVALUATOR(vec1, mat1.colwise().sum().transpose());\n\n    // test MatrixWrapper and ArrayWrapper\n    mat1.setRandom(6,6);\n    arr1.setRandom(6,6);\n    VERIFY_IS_APPROX_EVALUATOR(mat2, arr1.matrix());\n    VERIFY_IS_APPROX_EVALUATOR(arr2, mat1.array());\n    VERIFY_IS_APPROX_EVALUATOR(mat2, (arr1 + 2).matrix());\n    VERIFY_IS_APPROX_EVALUATOR(arr2, mat1.array() + 2);\n    mat2.array() = arr1 * arr1;\n    VERIFY_IS_APPROX(mat2, (arr1 * arr1).matrix());\n    arr2.matrix() = MatrixXd::Identity(6,6);\n    VERIFY_IS_APPROX(arr2, MatrixXd::Identity(6,6).array());\n\n    // test Reverse\n    VERIFY_IS_APPROX_EVALUATOR(arr2, arr1.reverse());\n    VERIFY_IS_APPROX_EVALUATOR(arr2, arr1.colwise().reverse());\n    VERIFY_IS_APPROX_EVALUATOR(arr2, arr1.rowwise().reverse());\n    arr2.reverse() = arr1;\n    VERIFY_IS_APPROX(arr2, arr1.reverse());\n    mat2.array() = mat1.array().reverse();\n    VERIFY_IS_APPROX(mat2.array(), mat1.array().reverse());\n\n    // test Diagonal\n    VERIFY_IS_APPROX_EVALUATOR(vec1, mat1.diagonal());\n    vec1.resize(5);\n    VERIFY_IS_APPROX_EVALUATOR(vec1, mat1.diagonal(1));\n    VERIFY_IS_APPROX_EVALUATOR(vec1, mat1.diagonal<-1>());\n    vec1.setRandom();\n\n    mat2 = mat1;\n    copy_using_evaluator(mat1.diagonal(1), vec1);\n    mat2.diagonal(1) = vec1;\n    VERIFY_IS_APPROX(mat1, mat2);\n\n    copy_using_evaluator(mat1.diagonal<-1>(), mat1.diagonal(1));\n    mat2.diagonal<-1>() = mat2.diagonal(1);\n    VERIFY_IS_APPROX(mat1, mat2);\n  }\n  \n  {\n    // test swapping\n    MatrixXd mat1, mat2, mat1ref, mat2ref;\n    mat1ref = mat1 = MatrixXd::Random(6, 6);\n    mat2ref = mat2 = 2 * mat1 + MatrixXd::Identity(6, 6);\n    swap_using_evaluator(mat1, mat2);\n    mat1ref.swap(mat2ref);\n    VERIFY_IS_APPROX(mat1, mat1ref);\n    VERIFY_IS_APPROX(mat2, mat2ref);\n\n    swap_using_evaluator(mat1.block(0, 0, 3, 3), mat2.block(3, 3, 3, 3));\n    mat1ref.block(0, 0, 3, 3).swap(mat2ref.block(3, 3, 3, 3));\n    VERIFY_IS_APPROX(mat1, mat1ref);\n    VERIFY_IS_APPROX(mat2, mat2ref);\n\n    swap_using_evaluator(mat1.row(2), mat2.col(3).transpose());\n    mat1.row(2).swap(mat2.col(3).transpose());\n    VERIFY_IS_APPROX(mat1, mat1ref);\n    VERIFY_IS_APPROX(mat2, mat2ref);\n  }\n\n  {\n    // test compound assignment\n    const Matrix4d mat_const = Matrix4d::Random(); \n    Matrix4d mat, mat_ref;\n    mat = mat_ref = Matrix4d::Identity();\n    add_assign_using_evaluator(mat, mat_const);\n    mat_ref += mat_const;\n    VERIFY_IS_APPROX(mat, mat_ref);\n\n    subtract_assign_using_evaluator(mat.row(1), 2*mat.row(2));\n    mat_ref.row(1) -= 2*mat_ref.row(2);\n    VERIFY_IS_APPROX(mat, mat_ref);\n\n    const ArrayXXf arr_const = ArrayXXf::Random(5,3); \n    ArrayXXf arr, arr_ref;\n    arr = arr_ref = ArrayXXf::Constant(5, 3, 0.5);\n    multiply_assign_using_evaluator(arr, arr_const);\n    arr_ref *= arr_const;\n    VERIFY_IS_APPROX(arr, arr_ref);\n\n    divide_assign_using_evaluator(arr.row(1), arr.row(2) + 1);\n    arr_ref.row(1) /= (arr_ref.row(2) + 1);\n    VERIFY_IS_APPROX(arr, arr_ref);\n  }\n  \n  {\n    // test triangular shapes\n    MatrixXd A = MatrixXd::Random(6,6), B(6,6), C(6,6), D(6,6);\n    A.setRandom();B.setRandom();\n    VERIFY_IS_APPROX_EVALUATOR2(B, A.triangularView<Upper>(), MatrixXd(A.triangularView<Upper>()));\n    \n    A.setRandom();B.setRandom();\n    VERIFY_IS_APPROX_EVALUATOR2(B, A.triangularView<UnitLower>(), MatrixXd(A.triangularView<UnitLower>()));\n    \n    A.setRandom();B.setRandom();\n    VERIFY_IS_APPROX_EVALUATOR2(B, A.triangularView<UnitUpper>(), MatrixXd(A.triangularView<UnitUpper>()));\n    \n    A.setRandom();B.setRandom();\n    C = B; C.triangularView<Upper>() = A;\n    copy_using_evaluator(B.triangularView<Upper>(), A);\n    VERIFY(B.isApprox(C) && \"copy_using_evaluator(B.triangularView<Upper>(), A)\");\n    \n    A.setRandom();B.setRandom();\n    C = B; C.triangularView<Lower>() = A.triangularView<Lower>();\n    copy_using_evaluator(B.triangularView<Lower>(), A.triangularView<Lower>());\n    VERIFY(B.isApprox(C) && \"copy_using_evaluator(B.triangularView<Lower>(), A.triangularView<Lower>())\");\n    \n    \n    A.setRandom();B.setRandom();\n    C = B; C.triangularView<Lower>() = A.triangularView<Upper>().transpose();\n    copy_using_evaluator(B.triangularView<Lower>(), A.triangularView<Upper>().transpose());\n    VERIFY(B.isApprox(C) && \"copy_using_evaluator(B.triangularView<Lower>(), A.triangularView<Lower>().transpose())\");\n    \n    \n    A.setRandom();B.setRandom(); C = B; D = A;\n    C.triangularView<Upper>().swap(D.triangularView<Upper>());\n    swap_using_evaluator(B.triangularView<Upper>(), A.triangularView<Upper>());\n    VERIFY(B.isApprox(C) && \"swap_using_evaluator(B.triangularView<Upper>(), A.triangularView<Upper>())\");\n    \n    \n    VERIFY_IS_APPROX_EVALUATOR2(B, prod(A.triangularView<Upper>(),A), MatrixXd(A.triangularView<Upper>()*A));\n    \n    VERIFY_IS_APPROX_EVALUATOR2(B, prod(A.selfadjointView<Upper>(),A), MatrixXd(A.selfadjointView<Upper>()*A));\n  }\n\n  {\n    // test diagonal shapes\n    VectorXd d = VectorXd::Random(6);\n    MatrixXd A = MatrixXd::Random(6,6), B(6,6);\n    A.setRandom();B.setRandom();\n    \n    VERIFY_IS_APPROX_EVALUATOR2(B, lazyprod(d.asDiagonal(),A), MatrixXd(d.asDiagonal()*A));\n    VERIFY_IS_APPROX_EVALUATOR2(B, lazyprod(A,d.asDiagonal()), MatrixXd(A*d.asDiagonal()));\n  }\n\n  {\n    // test CoeffReadCost\n    Matrix4d a, b;\n    VERIFY_IS_EQUAL( get_cost(a), 1 );\n    VERIFY_IS_EQUAL( get_cost(a+b), 3);\n    VERIFY_IS_EQUAL( get_cost(2*a+b), 4);\n    VERIFY_IS_EQUAL( get_cost(a*b), 1);\n    VERIFY_IS_EQUAL( get_cost(a.lazyProduct(b)), 15);\n    VERIFY_IS_EQUAL( get_cost(a*(a*b)), 1);\n    VERIFY_IS_EQUAL( get_cost(a.lazyProduct(a*b)), 15);\n    VERIFY_IS_EQUAL( get_cost(a*(a+b)), 1);\n    VERIFY_IS_EQUAL( get_cost(a.lazyProduct(a+b)), 15);\n  }\n\n  // regression test for PR 544 and bug 1622 (introduced in #71609c4)\n  {\n    // test restricted_packet_assignment with an unaligned destination\n    const size_t M = 2;\n    const size_t K = 2;\n    const size_t N = 5;\n    float *destMem = new float[(M*N) + 1];\n    float *dest = (internal::UIntPtr(destMem)%EIGEN_MAX_ALIGN_BYTES) == 0 ? destMem+1 : destMem;\n\n    const Matrix<float, Dynamic, Dynamic, RowMajor> a = Matrix<float, Dynamic, Dynamic, RowMajor>::Random(M, K);\n    const Matrix<float, Dynamic, Dynamic, RowMajor> b = Matrix<float, Dynamic, Dynamic, RowMajor>::Random(K, N);\n    \n    Map<Matrix<float, Dynamic, Dynamic, RowMajor> > z(dest, M, N);;\n    Product<Matrix<float, Dynamic, Dynamic, RowMajor>, Matrix<float, Dynamic, Dynamic, RowMajor>, LazyProduct> tmp(a,b);\n    internal::call_restricted_packet_assignment(z.noalias(), tmp.derived(), internal::assign_op<float, float>());\n    \n    VERIFY_IS_APPROX(z, a*b);\n    delete[] destMem;\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/exceptions.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2011 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n\n// Various sanity tests with exceptions and non trivially copyable scalar type.\n//  - no memory leak when a custom scalar type trow an exceptions\n//  - todo: complete the list of tests!\n\n#define EIGEN_STACK_ALLOCATION_LIMIT 100000000\n\n#include \"main.h\"\n#include \"AnnoyingScalar.h\"\n\n#define CHECK_MEMLEAK(OP) {                                 \\\n    AnnoyingScalar::countdown = 100;                        \\\n    int before = AnnoyingScalar::instances;                 \\\n    bool exception_thrown = false;                          \\\n    try { OP; }                                             \\\n    catch (my_exception) {                                  \\\n      exception_thrown = true;                              \\\n      VERIFY(AnnoyingScalar::instances==before && \"memory leak detected in \" && EIGEN_MAKESTRING(OP)); \\\n    } \\\n    VERIFY( (AnnoyingScalar::dont_throw) || (exception_thrown && \" no exception thrown in \" && EIGEN_MAKESTRING(OP)) ); \\\n  }\n\nEIGEN_DECLARE_TEST(exceptions)\n{\n  typedef Eigen::Matrix<AnnoyingScalar,Dynamic,1> VectorType;\n  typedef Eigen::Matrix<AnnoyingScalar,Dynamic,Dynamic> MatrixType;\n  \n  {\n    AnnoyingScalar::dont_throw = false;\n    int n = 50;\n    VectorType v0(n), v1(n);\n    MatrixType m0(n,n), m1(n,n), m2(n,n);\n    v0.setOnes(); v1.setOnes();\n    m0.setOnes(); m1.setOnes(); m2.setOnes();\n    CHECK_MEMLEAK(v0 = m0 * m1 * v1);\n    CHECK_MEMLEAK(m2 = m0 * m1 * m2);\n    CHECK_MEMLEAK((v0+v1).dot(v0+v1));\n  }\n  VERIFY(AnnoyingScalar::instances==0 && \"global memory leak detected in \" && EIGEN_MAKESTRING(OP));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/fastmath.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\nvoid check(bool b, bool ref)\n{\n  std::cout << b;\n  if(b==ref)\n    std::cout << \" OK  \";\n  else\n    std::cout << \" BAD \";\n}\n\n#if EIGEN_COMP_MSVC && EIGEN_COMP_MSVC < 1800\nnamespace std {\n  template<typename T> bool (isfinite)(T x) { return _finite(x); }\n  template<typename T> bool (isnan)(T x) { return _isnan(x); }\n  template<typename T> bool (isinf)(T x) { return _fpclass(x)==_FPCLASS_NINF || _fpclass(x)==_FPCLASS_PINF; }\n}\n#endif\n\ntemplate<typename T>\nvoid check_inf_nan(bool dryrun) {\n  Matrix<T,Dynamic,1> m(10);\n  m.setRandom();\n  m(3) = std::numeric_limits<T>::quiet_NaN();\n\n  if(dryrun)\n  {\n    std::cout << \"std::isfinite(\" << m(3) << \") = \"; check((std::isfinite)(m(3)),false); std::cout << \"  ; numext::isfinite = \"; check((numext::isfinite)(m(3)), false); std::cout << \"\\n\";\n    std::cout << \"std::isinf(\" << m(3) << \")    = \"; check((std::isinf)(m(3)),false);    std::cout << \"  ; numext::isinf    = \"; check((numext::isinf)(m(3)), false); std::cout << \"\\n\";\n    std::cout << \"std::isnan(\" << m(3) << \")    = \"; check((std::isnan)(m(3)),true);     std::cout << \"  ; numext::isnan    = \"; check((numext::isnan)(m(3)), true); std::cout << \"\\n\";\n    std::cout << \"allFinite: \"; check(m.allFinite(), 0); std::cout << \"\\n\";\n    std::cout << \"hasNaN:    \"; check(m.hasNaN(), 1);    std::cout << \"\\n\";\n    std::cout << \"\\n\";\n  }\n  else\n  {\n    if( (std::isfinite)(m(3))) g_test_level=1;  VERIFY( !(numext::isfinite)(m(3)) ); g_test_level=0;\n    if( (std::isinf)   (m(3))) g_test_level=1;  VERIFY( !(numext::isinf)(m(3)) );    g_test_level=0;\n    if(!(std::isnan)   (m(3))) g_test_level=1;  VERIFY(  (numext::isnan)(m(3)) );    g_test_level=0;\n    if( (std::isfinite)(m(3))) g_test_level=1;  VERIFY( !m.allFinite() );            g_test_level=0;\n    if(!(std::isnan)   (m(3))) g_test_level=1;  VERIFY(  m.hasNaN() );               g_test_level=0;\n  }\n  T hidden_zero = (std::numeric_limits<T>::min)()*(std::numeric_limits<T>::min)();\n  m(4) /= hidden_zero;\n  if(dryrun)\n  {\n    std::cout << \"std::isfinite(\" << m(4) << \") = \"; check((std::isfinite)(m(4)),false); std::cout << \"  ; numext::isfinite = \"; check((numext::isfinite)(m(4)), false); std::cout << \"\\n\";\n    std::cout << \"std::isinf(\" << m(4) << \")    = \"; check((std::isinf)(m(4)),true);     std::cout << \"  ; numext::isinf    = \"; check((numext::isinf)(m(4)), true); std::cout << \"\\n\";\n    std::cout << \"std::isnan(\" << m(4) << \")    = \"; check((std::isnan)(m(4)),false);    std::cout << \"  ; numext::isnan    = \"; check((numext::isnan)(m(4)), false); std::cout << \"\\n\";\n    std::cout << \"allFinite: \"; check(m.allFinite(), 0); std::cout << \"\\n\";\n    std::cout << \"hasNaN:    \"; check(m.hasNaN(), 1);    std::cout << \"\\n\";\n    std::cout << \"\\n\";\n  }\n  else\n  {\n    if( (std::isfinite)(m(3))) g_test_level=1;  VERIFY( !(numext::isfinite)(m(4)) );  g_test_level=0;\n    if(!(std::isinf)   (m(3))) g_test_level=1;  VERIFY(  (numext::isinf)(m(4)) );     g_test_level=0;\n    if( (std::isnan)   (m(3))) g_test_level=1;  VERIFY( !(numext::isnan)(m(4)) );     g_test_level=0;\n    if( (std::isfinite)(m(3))) g_test_level=1;  VERIFY( !m.allFinite() );             g_test_level=0;\n    if(!(std::isnan)   (m(3))) g_test_level=1;  VERIFY(  m.hasNaN() );                g_test_level=0;\n  }\n  m(3) = 0;\n  if(dryrun)\n  {\n    std::cout << \"std::isfinite(\" << m(3) << \") = \"; check((std::isfinite)(m(3)),true); std::cout << \"  ; numext::isfinite = \"; check((numext::isfinite)(m(3)), true); std::cout << \"\\n\";\n    std::cout << \"std::isinf(\" << m(3) << \")    = \"; check((std::isinf)(m(3)),false);   std::cout << \"  ; numext::isinf    = \"; check((numext::isinf)(m(3)), false); std::cout << \"\\n\";\n    std::cout << \"std::isnan(\" << m(3) << \")    = \"; check((std::isnan)(m(3)),false);   std::cout << \"  ; numext::isnan    = \"; check((numext::isnan)(m(3)), false); std::cout << \"\\n\";\n    std::cout << \"allFinite: \"; check(m.allFinite(), 0); std::cout << \"\\n\";\n    std::cout << \"hasNaN:    \"; check(m.hasNaN(), 0);    std::cout << \"\\n\";\n    std::cout << \"\\n\\n\";\n  }\n  else\n  {\n    if(!(std::isfinite)(m(3))) g_test_level=1;  VERIFY(  (numext::isfinite)(m(3)) );  g_test_level=0;\n    if( (std::isinf)   (m(3))) g_test_level=1;  VERIFY( !(numext::isinf)(m(3)) );     g_test_level=0;\n    if( (std::isnan)   (m(3))) g_test_level=1;  VERIFY( !(numext::isnan)(m(3)) );     g_test_level=0;\n    if( (std::isfinite)(m(3))) g_test_level=1;  VERIFY( !m.allFinite() );             g_test_level=0;\n    if( (std::isnan)   (m(3))) g_test_level=1;  VERIFY( !m.hasNaN() );                g_test_level=0;\n  }\n}\n\nEIGEN_DECLARE_TEST(fastmath) {\n  std::cout << \"*** float *** \\n\\n\"; check_inf_nan<float>(true);\n  std::cout << \"*** double ***\\n\\n\"; check_inf_nan<double>(true);\n  std::cout << \"*** long double *** \\n\\n\"; check_inf_nan<long double>(true);\n\n  check_inf_nan<float>(false);\n  check_inf_nan<double>(false);\n  check_inf_nan<long double>(false);\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/first_aligned.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\ntemplate<typename Scalar>\nvoid test_first_aligned_helper(Scalar *array, int size)\n{\n  const int packet_size = sizeof(Scalar) * internal::packet_traits<Scalar>::size;\n  VERIFY(((size_t(array) + sizeof(Scalar) * internal::first_default_aligned(array, size)) % packet_size) == 0);\n}\n\ntemplate<typename Scalar>\nvoid test_none_aligned_helper(Scalar *array, int size)\n{\n  EIGEN_UNUSED_VARIABLE(array);\n  EIGEN_UNUSED_VARIABLE(size);\n  VERIFY(internal::packet_traits<Scalar>::size == 1 || internal::first_default_aligned(array, size) == size);\n}\n\nstruct some_non_vectorizable_type { float x; };\n\nEIGEN_DECLARE_TEST(first_aligned)\n{\n  EIGEN_ALIGN16 float array_float[100];\n  test_first_aligned_helper(array_float, 50);\n  test_first_aligned_helper(array_float+1, 50);\n  test_first_aligned_helper(array_float+2, 50);\n  test_first_aligned_helper(array_float+3, 50);\n  test_first_aligned_helper(array_float+4, 50);\n  test_first_aligned_helper(array_float+5, 50);\n  \n  EIGEN_ALIGN16 double array_double[100];\n  test_first_aligned_helper(array_double, 50);\n  test_first_aligned_helper(array_double+1, 50);\n  test_first_aligned_helper(array_double+2, 50);\n  \n  double *array_double_plus_4_bytes = (double*)(internal::UIntPtr(array_double)+4);\n  test_none_aligned_helper(array_double_plus_4_bytes, 50);\n  test_none_aligned_helper(array_double_plus_4_bytes+1, 50);\n  \n  some_non_vectorizable_type array_nonvec[100];\n  test_first_aligned_helper(array_nonvec, 100);\n  test_none_aligned_helper(array_nonvec, 100);\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/geo_alignedbox.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <Eigen/Geometry>\n#include <Eigen/LU>\n#include <Eigen/QR>\n\n#include<iostream>\nusing namespace std;\n\n// NOTE the following workaround was needed on some 32 bits builds to kill extra precision of x87 registers.\n// It seems that it os not needed anymore, but let's keep it here, just in case...\n\ntemplate<typename T> EIGEN_DONT_INLINE\nvoid kill_extra_precision(T& /* x */) {\n  // This one worked but triggered a warning:\n  /* eigen_assert((void*)(&x) != (void*)0); */\n  // An alternative could be:\n  /* volatile T tmp = x; */\n  /* x = tmp; */\n}\n\n\ntemplate<typename BoxType> void alignedbox(const BoxType& _box)\n{\n  /* this test covers the following files:\n     AlignedBox.h\n  */\n  typedef typename BoxType::Scalar Scalar;\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  typedef Matrix<Scalar, BoxType::AmbientDimAtCompileTime, 1> VectorType;\n\n  const Index dim = _box.dim();\n\n  VectorType p0 = VectorType::Random(dim);\n  VectorType p1 = VectorType::Random(dim);\n  while( p1 == p0 ){\n      p1 =  VectorType::Random(dim); }\n  RealScalar s1 = internal::random<RealScalar>(0,1);\n\n  BoxType b0(dim);\n  BoxType b1(VectorType::Random(dim),VectorType::Random(dim));\n  BoxType b2;\n  \n  kill_extra_precision(b1);\n  kill_extra_precision(p0);\n  kill_extra_precision(p1);\n\n  b0.extend(p0);\n  b0.extend(p1);\n  VERIFY(b0.contains(p0*s1+(Scalar(1)-s1)*p1));\n  VERIFY(b0.contains(b0.center()));\n  VERIFY_IS_APPROX(b0.center(),(p0+p1)/Scalar(2));\n\n  (b2 = b0).extend(b1);\n  VERIFY(b2.contains(b0));\n  VERIFY(b2.contains(b1));\n  VERIFY_IS_APPROX(b2.clamp(b0), b0);\n\n  // intersection\n  BoxType box1(VectorType::Random(dim));\n  box1.extend(VectorType::Random(dim));\n  BoxType box2(VectorType::Random(dim));\n  box2.extend(VectorType::Random(dim));\n\n  VERIFY(box1.intersects(box2) == !box1.intersection(box2).isEmpty()); \n\n  // alignment -- make sure there is no memory alignment assertion\n  BoxType *bp0 = new BoxType(dim);\n  BoxType *bp1 = new BoxType(dim);\n  bp0->extend(*bp1);\n  delete bp0;\n  delete bp1;\n\n  // sampling\n  for( int i=0; i<10; ++i )\n  {\n      VectorType r = b0.sample();\n      VERIFY(b0.contains(r));\n  }\n\n}\n\n\n\ntemplate<typename BoxType>\nvoid alignedboxCastTests(const BoxType& _box)\n{\n  // casting  \n  typedef typename BoxType::Scalar Scalar;\n  typedef Matrix<Scalar, BoxType::AmbientDimAtCompileTime, 1> VectorType;\n\n  const Index dim = _box.dim();\n\n  VectorType p0 = VectorType::Random(dim);\n  VectorType p1 = VectorType::Random(dim);\n\n  BoxType b0(dim);\n\n  b0.extend(p0);\n  b0.extend(p1);\n\n  const int Dim = BoxType::AmbientDimAtCompileTime;\n  typedef typename GetDifferentType<Scalar>::type OtherScalar;\n  AlignedBox<OtherScalar,Dim> hp1f = b0.template cast<OtherScalar>();\n  VERIFY_IS_APPROX(hp1f.template cast<Scalar>(),b0);\n  AlignedBox<Scalar,Dim> hp1d = b0.template cast<Scalar>();\n  VERIFY_IS_APPROX(hp1d.template cast<Scalar>(),b0);\n}\n\n\nvoid specificTest1()\n{\n    Vector2f m; m << -1.0f, -2.0f;\n    Vector2f M; M <<  1.0f,  5.0f;\n\n    typedef AlignedBox2f  BoxType;\n    BoxType box( m, M );\n\n    Vector2f sides = M-m;\n    VERIFY_IS_APPROX(sides, box.sizes() );\n    VERIFY_IS_APPROX(sides[1], box.sizes()[1] );\n    VERIFY_IS_APPROX(sides[1], box.sizes().maxCoeff() );\n    VERIFY_IS_APPROX(sides[0], box.sizes().minCoeff() );\n\n    VERIFY_IS_APPROX( 14.0f, box.volume() );\n    VERIFY_IS_APPROX( 53.0f, box.diagonal().squaredNorm() );\n    VERIFY_IS_APPROX( std::sqrt( 53.0f ), box.diagonal().norm() );\n\n    VERIFY_IS_APPROX( m, box.corner( BoxType::BottomLeft ) );\n    VERIFY_IS_APPROX( M, box.corner( BoxType::TopRight ) );\n    Vector2f bottomRight; bottomRight << M[0], m[1];\n    Vector2f topLeft; topLeft << m[0], M[1];\n    VERIFY_IS_APPROX( bottomRight, box.corner( BoxType::BottomRight ) );\n    VERIFY_IS_APPROX( topLeft, box.corner( BoxType::TopLeft ) );\n}\n\n\nvoid specificTest2()\n{\n    Vector3i m; m << -1, -2, 0;\n    Vector3i M; M <<  1,  5, 3;\n\n    typedef AlignedBox3i  BoxType;\n    BoxType box( m, M );\n\n    Vector3i sides = M-m;\n    VERIFY_IS_APPROX(sides, box.sizes() );\n    VERIFY_IS_APPROX(sides[1], box.sizes()[1] );\n    VERIFY_IS_APPROX(sides[1], box.sizes().maxCoeff() );\n    VERIFY_IS_APPROX(sides[0], box.sizes().minCoeff() );\n\n    VERIFY_IS_APPROX( 42, box.volume() );\n    VERIFY_IS_APPROX( 62, box.diagonal().squaredNorm() );\n\n    VERIFY_IS_APPROX( m, box.corner( BoxType::BottomLeftFloor ) );\n    VERIFY_IS_APPROX( M, box.corner( BoxType::TopRightCeil ) );\n    Vector3i bottomRightFloor; bottomRightFloor << M[0], m[1], m[2];\n    Vector3i topLeftFloor; topLeftFloor << m[0], M[1], m[2];\n    VERIFY_IS_APPROX( bottomRightFloor, box.corner( BoxType::BottomRightFloor ) );\n    VERIFY_IS_APPROX( topLeftFloor, box.corner( BoxType::TopLeftFloor ) );\n}\n\n\nEIGEN_DECLARE_TEST(geo_alignedbox)\n{\n  for(int i = 0; i < g_repeat; i++)\n  {\n    CALL_SUBTEST_1( alignedbox(AlignedBox2f()) );\n    CALL_SUBTEST_2( alignedboxCastTests(AlignedBox2f()) );\n\n    CALL_SUBTEST_3( alignedbox(AlignedBox3f()) );\n    CALL_SUBTEST_4( alignedboxCastTests(AlignedBox3f()) );\n\n    CALL_SUBTEST_5( alignedbox(AlignedBox4d()) );\n    CALL_SUBTEST_6( alignedboxCastTests(AlignedBox4d()) );\n\n    CALL_SUBTEST_7( alignedbox(AlignedBox1d()) );\n    CALL_SUBTEST_8( alignedboxCastTests(AlignedBox1d()) );\n\n    CALL_SUBTEST_9( alignedbox(AlignedBox1i()) );\n    CALL_SUBTEST_10( alignedbox(AlignedBox2i()) );\n    CALL_SUBTEST_11( alignedbox(AlignedBox3i()) );\n\n    CALL_SUBTEST_14( alignedbox(AlignedBox<double,Dynamic>(4)) );\n  }\n  CALL_SUBTEST_12( specificTest1() );\n  CALL_SUBTEST_13( specificTest2() );\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/geo_eulerangles.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2012 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <Eigen/Geometry>\n#include <Eigen/LU>\n#include <Eigen/SVD>\n\n\ntemplate<typename Scalar>\nvoid verify_euler(const Matrix<Scalar,3,1>& ea, int i, int j, int k)\n{\n  typedef Matrix<Scalar,3,3> Matrix3;\n  typedef Matrix<Scalar,3,1> Vector3;\n  typedef AngleAxis<Scalar> AngleAxisx;\n  using std::abs;\n  Matrix3 m(AngleAxisx(ea[0], Vector3::Unit(i)) * AngleAxisx(ea[1], Vector3::Unit(j)) * AngleAxisx(ea[2], Vector3::Unit(k)));\n  Vector3 eabis = m.eulerAngles(i, j, k);\n  Matrix3 mbis(AngleAxisx(eabis[0], Vector3::Unit(i)) * AngleAxisx(eabis[1], Vector3::Unit(j)) * AngleAxisx(eabis[2], Vector3::Unit(k))); \n  VERIFY_IS_APPROX(m,  mbis); \n  /* If I==K, and ea[1]==0, then there no unique solution. */ \n  /* The remark apply in the case where I!=K, and |ea[1]| is close to pi/2. */ \n  if( (i!=k || ea[1]!=0) && (i==k || !internal::isApprox(abs(ea[1]),Scalar(EIGEN_PI/2),test_precision<Scalar>())) ) \n    VERIFY((ea-eabis).norm() <= test_precision<Scalar>());\n  \n  // approx_or_less_than does not work for 0\n  VERIFY(0 < eabis[0] || test_isMuchSmallerThan(eabis[0], Scalar(1)));\n  VERIFY_IS_APPROX_OR_LESS_THAN(eabis[0], Scalar(EIGEN_PI));\n  VERIFY_IS_APPROX_OR_LESS_THAN(-Scalar(EIGEN_PI), eabis[1]);\n  VERIFY_IS_APPROX_OR_LESS_THAN(eabis[1], Scalar(EIGEN_PI));\n  VERIFY_IS_APPROX_OR_LESS_THAN(-Scalar(EIGEN_PI), eabis[2]);\n  VERIFY_IS_APPROX_OR_LESS_THAN(eabis[2], Scalar(EIGEN_PI));\n}\n\ntemplate<typename Scalar> void check_all_var(const Matrix<Scalar,3,1>& ea)\n{\n  verify_euler(ea, 0,1,2);\n  verify_euler(ea, 0,1,0);\n  verify_euler(ea, 0,2,1);\n  verify_euler(ea, 0,2,0);\n\n  verify_euler(ea, 1,2,0);\n  verify_euler(ea, 1,2,1);\n  verify_euler(ea, 1,0,2);\n  verify_euler(ea, 1,0,1);\n\n  verify_euler(ea, 2,0,1);\n  verify_euler(ea, 2,0,2);\n  verify_euler(ea, 2,1,0);\n  verify_euler(ea, 2,1,2);\n}\n\ntemplate<typename Scalar> void eulerangles()\n{\n  typedef Matrix<Scalar,3,3> Matrix3;\n  typedef Matrix<Scalar,3,1> Vector3;\n  typedef Array<Scalar,3,1> Array3;\n  typedef Quaternion<Scalar> Quaternionx;\n  typedef AngleAxis<Scalar> AngleAxisx;\n\n  Scalar a = internal::random<Scalar>(-Scalar(EIGEN_PI), Scalar(EIGEN_PI));\n  Quaternionx q1;\n  q1 = AngleAxisx(a, Vector3::Random().normalized());\n  Matrix3 m;\n  m = q1;\n  \n  Vector3 ea = m.eulerAngles(0,1,2);\n  check_all_var(ea);\n  ea = m.eulerAngles(0,1,0);\n  check_all_var(ea);\n  \n  // Check with purely random Quaternion:\n  q1.coeffs() = Quaternionx::Coefficients::Random().normalized();\n  m = q1;\n  ea = m.eulerAngles(0,1,2);\n  check_all_var(ea);\n  ea = m.eulerAngles(0,1,0);\n  check_all_var(ea);\n  \n  // Check with random angles in range [0:pi]x[-pi:pi]x[-pi:pi].\n  ea = (Array3::Random() + Array3(1,0,0))*Scalar(EIGEN_PI)*Array3(0.5,1,1);\n  check_all_var(ea);\n  \n  ea[2] = ea[0] = internal::random<Scalar>(0,Scalar(EIGEN_PI));\n  check_all_var(ea);\n  \n  ea[0] = ea[1] = internal::random<Scalar>(0,Scalar(EIGEN_PI));\n  check_all_var(ea);\n  \n  ea[1] = 0;\n  check_all_var(ea);\n  \n  ea.head(2).setZero();\n  check_all_var(ea);\n  \n  ea.setZero();\n  check_all_var(ea);\n}\n\nEIGEN_DECLARE_TEST(geo_eulerangles)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( eulerangles<float>() );\n    CALL_SUBTEST_2( eulerangles<double>() );\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/geo_homogeneous.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <Eigen/Geometry>\n\ntemplate<typename Scalar,int Size> void homogeneous(void)\n{\n  /* this test covers the following files:\n     Homogeneous.h\n  */\n\n  typedef Matrix<Scalar,Size,Size> MatrixType;\n  typedef Matrix<Scalar,Size,1, ColMajor> VectorType;\n\n  typedef Matrix<Scalar,Size+1,Size> HMatrixType;\n  typedef Matrix<Scalar,Size+1,1> HVectorType;\n\n  typedef Matrix<Scalar,Size,Size+1>   T1MatrixType;\n  typedef Matrix<Scalar,Size+1,Size+1> T2MatrixType;\n  typedef Matrix<Scalar,Size+1,Size> T3MatrixType;\n\n  VectorType v0 = VectorType::Random(),\n             ones = VectorType::Ones();\n\n  HVectorType hv0 = HVectorType::Random();\n\n  MatrixType m0 = MatrixType::Random();\n\n  HMatrixType hm0 = HMatrixType::Random();\n\n  hv0 << v0, 1;\n  VERIFY_IS_APPROX(v0.homogeneous(), hv0);\n  VERIFY_IS_APPROX(v0, hv0.hnormalized());\n  \n  VERIFY_IS_APPROX(v0.homogeneous().sum(), hv0.sum());\n  VERIFY_IS_APPROX(v0.homogeneous().minCoeff(), hv0.minCoeff());\n  VERIFY_IS_APPROX(v0.homogeneous().maxCoeff(), hv0.maxCoeff());\n\n  hm0 << m0, ones.transpose();\n  VERIFY_IS_APPROX(m0.colwise().homogeneous(), hm0);\n  VERIFY_IS_APPROX(m0, hm0.colwise().hnormalized());\n  hm0.row(Size-1).setRandom();\n  for(int j=0; j<Size; ++j)\n    m0.col(j) = hm0.col(j).head(Size) / hm0(Size,j);\n  VERIFY_IS_APPROX(m0, hm0.colwise().hnormalized());\n\n  T1MatrixType t1 = T1MatrixType::Random();\n  VERIFY_IS_APPROX(t1 * (v0.homogeneous().eval()), t1 * v0.homogeneous());\n  VERIFY_IS_APPROX(t1 * (m0.colwise().homogeneous().eval()), t1 * m0.colwise().homogeneous());\n\n  T2MatrixType t2 = T2MatrixType::Random();\n  VERIFY_IS_APPROX(t2 * (v0.homogeneous().eval()), t2 * v0.homogeneous());\n  VERIFY_IS_APPROX(t2 * (m0.colwise().homogeneous().eval()), t2 * m0.colwise().homogeneous());\n  VERIFY_IS_APPROX(t2 * (v0.homogeneous().asDiagonal()), t2 * hv0.asDiagonal());\n  VERIFY_IS_APPROX((v0.homogeneous().asDiagonal()) * t2, hv0.asDiagonal() * t2);\n\n  VERIFY_IS_APPROX((v0.transpose().rowwise().homogeneous().eval()) * t2,\n                    v0.transpose().rowwise().homogeneous() * t2);\n  VERIFY_IS_APPROX((m0.transpose().rowwise().homogeneous().eval()) * t2,\n                    m0.transpose().rowwise().homogeneous() * t2);\n\n  T3MatrixType t3 = T3MatrixType::Random();\n  VERIFY_IS_APPROX((v0.transpose().rowwise().homogeneous().eval()) * t3,\n                    v0.transpose().rowwise().homogeneous() * t3);\n  VERIFY_IS_APPROX((m0.transpose().rowwise().homogeneous().eval()) * t3,\n                    m0.transpose().rowwise().homogeneous() * t3);\n\n  // test product with a Transform object\n  Transform<Scalar, Size, Affine> aff;\n  Transform<Scalar, Size, AffineCompact> caff;\n  Transform<Scalar, Size, Projective> proj;\n  Matrix<Scalar, Size, Dynamic>   pts;\n  Matrix<Scalar, Size+1, Dynamic> pts1, pts2;\n\n  aff.affine().setRandom();\n  proj = caff = aff;\n  pts.setRandom(Size,internal::random<int>(1,20));\n  \n  pts1 = pts.colwise().homogeneous();\n  VERIFY_IS_APPROX(aff  * pts.colwise().homogeneous(), (aff  * pts1).colwise().hnormalized());\n  VERIFY_IS_APPROX(caff * pts.colwise().homogeneous(), (caff * pts1).colwise().hnormalized());\n  VERIFY_IS_APPROX(proj * pts.colwise().homogeneous(), (proj * pts1));\n\n  VERIFY_IS_APPROX((aff  * pts1).colwise().hnormalized(),  aff  * pts);\n  VERIFY_IS_APPROX((caff * pts1).colwise().hnormalized(), caff * pts);\n  \n  pts2 = pts1;\n  pts2.row(Size).setRandom();\n  VERIFY_IS_APPROX((aff  * pts2).colwise().hnormalized(), aff  * pts2.colwise().hnormalized());\n  VERIFY_IS_APPROX((caff * pts2).colwise().hnormalized(), caff * pts2.colwise().hnormalized());\n  VERIFY_IS_APPROX((proj * pts2).colwise().hnormalized(), (proj * pts2.colwise().hnormalized().colwise().homogeneous()).colwise().hnormalized());\n  \n  // Test combination of homogeneous\n  \n  VERIFY_IS_APPROX( (t2 * v0.homogeneous()).hnormalized(),\n                       (t2.template topLeftCorner<Size,Size>() * v0 + t2.template topRightCorner<Size,1>())\n                     / ((t2.template bottomLeftCorner<1,Size>()*v0).value() + t2(Size,Size)) );\n  \n  VERIFY_IS_APPROX( (t2 * pts.colwise().homogeneous()).colwise().hnormalized(),\n                    (Matrix<Scalar, Size+1, Dynamic>(t2 * pts1).colwise().hnormalized()) );\n  \n  VERIFY_IS_APPROX( (t2 .lazyProduct( v0.homogeneous() )).hnormalized(), (t2 * v0.homogeneous()).hnormalized() );\n  VERIFY_IS_APPROX( (t2 .lazyProduct  ( pts.colwise().homogeneous() )).colwise().hnormalized(), (t2 * pts1).colwise().hnormalized() );\n  \n  VERIFY_IS_APPROX( (v0.transpose().homogeneous() .lazyProduct( t2 )).hnormalized(), (v0.transpose().homogeneous()*t2).hnormalized() );\n  VERIFY_IS_APPROX( (pts.transpose().rowwise().homogeneous() .lazyProduct( t2 )).rowwise().hnormalized(), (pts1.transpose()*t2).rowwise().hnormalized() );\n\n  VERIFY_IS_APPROX( (t2.template triangularView<Lower>() * v0.homogeneous()).eval(), (t2.template triangularView<Lower>()*hv0) );\n}\n\nEIGEN_DECLARE_TEST(geo_homogeneous)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1(( homogeneous<float,1>() ));\n    CALL_SUBTEST_2(( homogeneous<double,3>() ));\n    CALL_SUBTEST_3(( homogeneous<double,8>() ));\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/geo_hyperplane.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <Eigen/Geometry>\n#include <Eigen/LU>\n#include <Eigen/QR>\n\ntemplate<typename HyperplaneType> void hyperplane(const HyperplaneType& _plane)\n{\n  /* this test covers the following files:\n     Hyperplane.h\n  */\n  using std::abs;\n  const Index dim = _plane.dim();\n  enum { Options = HyperplaneType::Options };\n  typedef typename HyperplaneType::Scalar Scalar;\n  typedef typename HyperplaneType::RealScalar RealScalar;\n  typedef Matrix<Scalar, HyperplaneType::AmbientDimAtCompileTime, 1> VectorType;\n  typedef Matrix<Scalar, HyperplaneType::AmbientDimAtCompileTime,\n                         HyperplaneType::AmbientDimAtCompileTime> MatrixType;\n\n  VectorType p0 = VectorType::Random(dim);\n  VectorType p1 = VectorType::Random(dim);\n\n  VectorType n0 = VectorType::Random(dim).normalized();\n  VectorType n1 = VectorType::Random(dim).normalized();\n\n  HyperplaneType pl0(n0, p0);\n  HyperplaneType pl1(n1, p1);\n  HyperplaneType pl2 = pl1;\n\n  Scalar s0 = internal::random<Scalar>();\n  Scalar s1 = internal::random<Scalar>();\n\n  VERIFY_IS_APPROX( n1.dot(n1), Scalar(1) );\n\n  VERIFY_IS_MUCH_SMALLER_THAN( pl0.absDistance(p0), Scalar(1) );\n  if(numext::abs2(s0)>RealScalar(1e-6))\n    VERIFY_IS_APPROX( pl1.signedDistance(p1 + n1 * s0), s0);\n  else\n    VERIFY_IS_MUCH_SMALLER_THAN( abs(pl1.signedDistance(p1 + n1 * s0) - s0), Scalar(1) );\n  VERIFY_IS_MUCH_SMALLER_THAN( pl1.signedDistance(pl1.projection(p0)), Scalar(1) );\n  VERIFY_IS_MUCH_SMALLER_THAN( pl1.absDistance(p1 +  pl1.normal().unitOrthogonal() * s1), Scalar(1) );\n\n  // transform\n  if (!NumTraits<Scalar>::IsComplex)\n  {\n    MatrixType rot = MatrixType::Random(dim,dim).householderQr().householderQ();\n    DiagonalMatrix<Scalar,HyperplaneType::AmbientDimAtCompileTime> scaling(VectorType::Random());\n    Translation<Scalar,HyperplaneType::AmbientDimAtCompileTime> translation(VectorType::Random());\n    \n    while(scaling.diagonal().cwiseAbs().minCoeff()<RealScalar(1e-4)) scaling.diagonal() = VectorType::Random();\n\n    pl2 = pl1;\n    VERIFY_IS_MUCH_SMALLER_THAN( pl2.transform(rot).absDistance(rot * p1), Scalar(1) );\n    pl2 = pl1;\n    VERIFY_IS_MUCH_SMALLER_THAN( pl2.transform(rot,Isometry).absDistance(rot * p1), Scalar(1) );\n    pl2 = pl1;\n    VERIFY_IS_MUCH_SMALLER_THAN( pl2.transform(rot*scaling).absDistance((rot*scaling) * p1), Scalar(1) );\n    VERIFY_IS_APPROX( pl2.normal().norm(), RealScalar(1) );\n    pl2 = pl1;\n    VERIFY_IS_MUCH_SMALLER_THAN( pl2.transform(rot*scaling*translation)\n                                  .absDistance((rot*scaling*translation) * p1), Scalar(1) );\n    VERIFY_IS_APPROX( pl2.normal().norm(), RealScalar(1) );\n    pl2 = pl1;\n    VERIFY_IS_MUCH_SMALLER_THAN( pl2.transform(rot*translation,Isometry)\n                                 .absDistance((rot*translation) * p1), Scalar(1) );\n    VERIFY_IS_APPROX( pl2.normal().norm(), RealScalar(1) );\n  }\n\n  // casting\n  const int Dim = HyperplaneType::AmbientDimAtCompileTime;\n  typedef typename GetDifferentType<Scalar>::type OtherScalar;\n  Hyperplane<OtherScalar,Dim,Options> hp1f = pl1.template cast<OtherScalar>();\n  VERIFY_IS_APPROX(hp1f.template cast<Scalar>(),pl1);\n  Hyperplane<Scalar,Dim,Options> hp1d = pl1.template cast<Scalar>();\n  VERIFY_IS_APPROX(hp1d.template cast<Scalar>(),pl1);\n}\n\ntemplate<typename Scalar> void lines()\n{\n  using std::abs;\n  typedef Hyperplane<Scalar, 2> HLine;\n  typedef ParametrizedLine<Scalar, 2> PLine;\n  typedef Matrix<Scalar,2,1> Vector;\n  typedef Matrix<Scalar,3,1> CoeffsType;\n\n  for(int i = 0; i < 10; i++)\n  {\n    Vector center = Vector::Random();\n    Vector u = Vector::Random();\n    Vector v = Vector::Random();\n    Scalar a = internal::random<Scalar>();\n    while (abs(a-1) < Scalar(1e-4)) a = internal::random<Scalar>();\n    while (u.norm() < Scalar(1e-4)) u = Vector::Random();\n    while (v.norm() < Scalar(1e-4)) v = Vector::Random();\n\n    HLine line_u = HLine::Through(center + u, center + a*u);\n    HLine line_v = HLine::Through(center + v, center + a*v);\n\n    // the line equations should be normalized so that a^2+b^2=1\n    VERIFY_IS_APPROX(line_u.normal().norm(), Scalar(1));\n    VERIFY_IS_APPROX(line_v.normal().norm(), Scalar(1));\n\n    Vector result = line_u.intersection(line_v);\n\n    // the lines should intersect at the point we called \"center\"\n    if(abs(a-1) > Scalar(1e-2) && abs(v.normalized().dot(u.normalized()))<Scalar(0.9))\n      VERIFY_IS_APPROX(result, center);\n\n    // check conversions between two types of lines\n    PLine pl(line_u); // gcc 3.3 will commit suicide if we don't name this variable\n    HLine line_u2(pl);\n    CoeffsType converted_coeffs = line_u2.coeffs();\n    if(line_u2.normal().dot(line_u.normal())<Scalar(0))\n      converted_coeffs = -line_u2.coeffs();\n    VERIFY(line_u.coeffs().isApprox(converted_coeffs));\n  }\n}\n\ntemplate<typename Scalar> void planes()\n{\n  using std::abs;\n  typedef Hyperplane<Scalar, 3> Plane;\n  typedef Matrix<Scalar,3,1> Vector;\n\n  for(int i = 0; i < 10; i++)\n  {\n    Vector v0 = Vector::Random();\n    Vector v1(v0), v2(v0);\n    if(internal::random<double>(0,1)>0.25)\n      v1 += Vector::Random();\n    if(internal::random<double>(0,1)>0.25)\n      v2 += v1 * std::pow(internal::random<Scalar>(0,1),internal::random<int>(1,16));\n    if(internal::random<double>(0,1)>0.25)\n      v2 += Vector::Random() * std::pow(internal::random<Scalar>(0,1),internal::random<int>(1,16));\n\n    Plane p0 = Plane::Through(v0, v1, v2);\n\n    VERIFY_IS_APPROX(p0.normal().norm(), Scalar(1));\n    VERIFY_IS_MUCH_SMALLER_THAN(p0.absDistance(v0), Scalar(1));\n    VERIFY_IS_MUCH_SMALLER_THAN(p0.absDistance(v1), Scalar(1));\n    VERIFY_IS_MUCH_SMALLER_THAN(p0.absDistance(v2), Scalar(1));\n  }\n}\n\ntemplate<typename Scalar> void hyperplane_alignment()\n{\n  typedef Hyperplane<Scalar,3,AutoAlign> Plane3a;\n  typedef Hyperplane<Scalar,3,DontAlign> Plane3u;\n\n  EIGEN_ALIGN_MAX Scalar array1[4];\n  EIGEN_ALIGN_MAX Scalar array2[4];\n  EIGEN_ALIGN_MAX Scalar array3[4+1];\n  Scalar* array3u = array3+1;\n\n  Plane3a *p1 = ::new(reinterpret_cast<void*>(array1)) Plane3a;\n  Plane3u *p2 = ::new(reinterpret_cast<void*>(array2)) Plane3u;\n  Plane3u *p3 = ::new(reinterpret_cast<void*>(array3u)) Plane3u;\n  \n  p1->coeffs().setRandom();\n  *p2 = *p1;\n  *p3 = *p1;\n\n  VERIFY_IS_APPROX(p1->coeffs(), p2->coeffs());\n  VERIFY_IS_APPROX(p1->coeffs(), p3->coeffs());\n  \n  #if defined(EIGEN_VECTORIZE) && EIGEN_MAX_STATIC_ALIGN_BYTES > 0\n  if(internal::packet_traits<Scalar>::Vectorizable && internal::packet_traits<Scalar>::size<=4)\n    VERIFY_RAISES_ASSERT((::new(reinterpret_cast<void*>(array3u)) Plane3a));\n  #endif\n}\n\n\nEIGEN_DECLARE_TEST(geo_hyperplane)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( hyperplane(Hyperplane<float,2>()) );\n    CALL_SUBTEST_2( hyperplane(Hyperplane<float,3>()) );\n    CALL_SUBTEST_2( hyperplane(Hyperplane<float,3,DontAlign>()) );\n    CALL_SUBTEST_2( hyperplane_alignment<float>() );\n    CALL_SUBTEST_3( hyperplane(Hyperplane<double,4>()) );\n    CALL_SUBTEST_4( hyperplane(Hyperplane<std::complex<double>,5>()) );\n    CALL_SUBTEST_1( lines<float>() );\n    CALL_SUBTEST_3( lines<double>() );\n    CALL_SUBTEST_2( planes<float>() );\n    CALL_SUBTEST_5( planes<double>() );\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/geo_orthomethods.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <Eigen/Geometry>\n#include <Eigen/LU>\n#include <Eigen/SVD>\n\n/* this test covers the following files:\n   Geometry/OrthoMethods.h\n*/\n\ntemplate<typename Scalar> void orthomethods_3()\n{\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  typedef Matrix<Scalar,3,3> Matrix3;\n  typedef Matrix<Scalar,3,1> Vector3;\n\n  typedef Matrix<Scalar,4,1> Vector4;\n\n  Vector3 v0 = Vector3::Random(),\n          v1 = Vector3::Random(),\n          v2 = Vector3::Random();\n\n  // cross product\n  VERIFY_IS_MUCH_SMALLER_THAN(v1.cross(v2).dot(v1), Scalar(1));\n  VERIFY_IS_MUCH_SMALLER_THAN(v1.dot(v1.cross(v2)), Scalar(1));\n  VERIFY_IS_MUCH_SMALLER_THAN(v1.cross(v2).dot(v2), Scalar(1));\n  VERIFY_IS_MUCH_SMALLER_THAN(v2.dot(v1.cross(v2)), Scalar(1));\n  VERIFY_IS_MUCH_SMALLER_THAN(v1.cross(Vector3::Random()).dot(v1), Scalar(1));\n  Matrix3 mat3;\n  mat3 << v0.normalized(),\n         (v0.cross(v1)).normalized(),\n         (v0.cross(v1).cross(v0)).normalized();\n  VERIFY(mat3.isUnitary());\n  \n  mat3.setRandom();\n  VERIFY_IS_APPROX(v0.cross(mat3*v1), -(mat3*v1).cross(v0));\n  VERIFY_IS_APPROX(v0.cross(mat3.lazyProduct(v1)), -(mat3.lazyProduct(v1)).cross(v0));\n\n  // colwise/rowwise cross product\n  mat3.setRandom();\n  Vector3 vec3 = Vector3::Random();\n  Matrix3 mcross;\n  int i = internal::random<int>(0,2);\n  mcross = mat3.colwise().cross(vec3);\n  VERIFY_IS_APPROX(mcross.col(i), mat3.col(i).cross(vec3));\n  \n  VERIFY_IS_MUCH_SMALLER_THAN((mat3.adjoint() * mat3.colwise().cross(vec3)).diagonal().cwiseAbs().sum(), Scalar(1));\n  VERIFY_IS_MUCH_SMALLER_THAN((mat3.adjoint() * mat3.colwise().cross(Vector3::Random())).diagonal().cwiseAbs().sum(), Scalar(1));\n  \n  VERIFY_IS_MUCH_SMALLER_THAN((vec3.adjoint() * mat3.colwise().cross(vec3)).cwiseAbs().sum(), Scalar(1));\n  VERIFY_IS_MUCH_SMALLER_THAN((vec3.adjoint() * Matrix3::Random().colwise().cross(vec3)).cwiseAbs().sum(), Scalar(1));\n  \n  mcross = mat3.rowwise().cross(vec3);\n  VERIFY_IS_APPROX(mcross.row(i), mat3.row(i).cross(vec3));\n\n  // cross3\n  Vector4 v40 = Vector4::Random(),\n          v41 = Vector4::Random(),\n          v42 = Vector4::Random();\n  v40.w() = v41.w() = v42.w() = 0;\n  v42.template head<3>() = v40.template head<3>().cross(v41.template head<3>());\n  VERIFY_IS_APPROX(v40.cross3(v41), v42);\n  VERIFY_IS_MUCH_SMALLER_THAN(v40.cross3(Vector4::Random()).dot(v40), Scalar(1));\n  \n  // check mixed product\n  typedef Matrix<RealScalar, 3, 1> RealVector3;\n  RealVector3 rv1 = RealVector3::Random();\n  VERIFY_IS_APPROX(v1.cross(rv1.template cast<Scalar>()), v1.cross(rv1));\n  VERIFY_IS_APPROX(rv1.template cast<Scalar>().cross(v1), rv1.cross(v1));\n}\n\ntemplate<typename Scalar, int Size> void orthomethods(int size=Size)\n{\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  typedef Matrix<Scalar,Size,1> VectorType;\n  typedef Matrix<Scalar,3,Size> Matrix3N;\n  typedef Matrix<Scalar,Size,3> MatrixN3;\n  typedef Matrix<Scalar,3,1> Vector3;\n\n  VectorType v0 = VectorType::Random(size);\n\n  // unitOrthogonal\n  VERIFY_IS_MUCH_SMALLER_THAN(v0.unitOrthogonal().dot(v0), Scalar(1));\n  VERIFY_IS_APPROX(v0.unitOrthogonal().norm(), RealScalar(1));\n\n  if (size>=3)\n  {\n    v0.template head<2>().setZero();\n    v0.tail(size-2).setRandom();\n\n    VERIFY_IS_MUCH_SMALLER_THAN(v0.unitOrthogonal().dot(v0), Scalar(1));\n    VERIFY_IS_APPROX(v0.unitOrthogonal().norm(), RealScalar(1));\n  }\n\n  // colwise/rowwise cross product\n  Vector3 vec3 = Vector3::Random();\n  int i = internal::random<int>(0,size-1);\n\n  Matrix3N mat3N(3,size), mcross3N(3,size);\n  mat3N.setRandom();\n  mcross3N = mat3N.colwise().cross(vec3);\n  VERIFY_IS_APPROX(mcross3N.col(i), mat3N.col(i).cross(vec3));\n\n  MatrixN3 matN3(size,3), mcrossN3(size,3);\n  matN3.setRandom();\n  mcrossN3 = matN3.rowwise().cross(vec3);\n  VERIFY_IS_APPROX(mcrossN3.row(i), matN3.row(i).cross(vec3));\n}\n\nEIGEN_DECLARE_TEST(geo_orthomethods)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( orthomethods_3<float>() );\n    CALL_SUBTEST_2( orthomethods_3<double>() );\n    CALL_SUBTEST_4( orthomethods_3<std::complex<double> >() );\n    CALL_SUBTEST_1( (orthomethods<float,2>()) );\n    CALL_SUBTEST_2( (orthomethods<double,2>()) );\n    CALL_SUBTEST_1( (orthomethods<float,3>()) );\n    CALL_SUBTEST_2( (orthomethods<double,3>()) );\n    CALL_SUBTEST_3( (orthomethods<float,7>()) );\n    CALL_SUBTEST_4( (orthomethods<std::complex<double>,8>()) );\n    CALL_SUBTEST_5( (orthomethods<float,Dynamic>(36)) );\n    CALL_SUBTEST_6( (orthomethods<double,Dynamic>(35)) );\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/geo_parametrizedline.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <Eigen/Geometry>\n#include <Eigen/LU>\n#include <Eigen/QR>\n\ntemplate<typename LineType> void parametrizedline(const LineType& _line)\n{\n  /* this test covers the following files:\n     ParametrizedLine.h\n  */\n  using std::abs;\n  const Index dim = _line.dim();\n  typedef typename LineType::Scalar Scalar;\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  typedef Matrix<Scalar, LineType::AmbientDimAtCompileTime, 1> VectorType;\n  typedef Hyperplane<Scalar,LineType::AmbientDimAtCompileTime> HyperplaneType;\n  typedef Matrix<Scalar, HyperplaneType::AmbientDimAtCompileTime,\n                         HyperplaneType::AmbientDimAtCompileTime> MatrixType;\n\n  VectorType p0 = VectorType::Random(dim);\n  VectorType p1 = VectorType::Random(dim);\n\n  VectorType d0 = VectorType::Random(dim).normalized();\n\n  LineType l0(p0, d0);\n\n  Scalar s0 = internal::random<Scalar>();\n  Scalar s1 = abs(internal::random<Scalar>());\n\n  VERIFY_IS_MUCH_SMALLER_THAN( l0.distance(p0), RealScalar(1) );\n  VERIFY_IS_MUCH_SMALLER_THAN( l0.distance(p0+s0*d0), RealScalar(1) );\n  VERIFY_IS_APPROX( (l0.projection(p1)-p1).norm(), l0.distance(p1) );\n  VERIFY_IS_MUCH_SMALLER_THAN( l0.distance(l0.projection(p1)), RealScalar(1) );\n  VERIFY_IS_APPROX( Scalar(l0.distance((p0+s0*d0) + d0.unitOrthogonal() * s1)), s1 );\n\n  // casting\n  const int Dim = LineType::AmbientDimAtCompileTime;\n  typedef typename GetDifferentType<Scalar>::type OtherScalar;\n  ParametrizedLine<OtherScalar,Dim> hp1f = l0.template cast<OtherScalar>();\n  VERIFY_IS_APPROX(hp1f.template cast<Scalar>(),l0);\n  ParametrizedLine<Scalar,Dim> hp1d = l0.template cast<Scalar>();\n  VERIFY_IS_APPROX(hp1d.template cast<Scalar>(),l0);\n\n  // intersections\n  VectorType p2 = VectorType::Random(dim);\n  VectorType n2 = VectorType::Random(dim).normalized();\n  HyperplaneType hp(p2,n2);\n  Scalar t = l0.intersectionParameter(hp);\n  VectorType pi = l0.pointAt(t);\n  VERIFY_IS_MUCH_SMALLER_THAN(hp.signedDistance(pi), RealScalar(1));\n  VERIFY_IS_MUCH_SMALLER_THAN(l0.distance(pi), RealScalar(1));\n  VERIFY_IS_APPROX(l0.intersectionPoint(hp), pi);\n\n  // transform\n  if (!NumTraits<Scalar>::IsComplex)\n  {\n    MatrixType rot = MatrixType::Random(dim,dim).householderQr().householderQ();\n    DiagonalMatrix<Scalar,LineType::AmbientDimAtCompileTime> scaling(VectorType::Random());\n    Translation<Scalar,LineType::AmbientDimAtCompileTime> translation(VectorType::Random());\n\n    while(scaling.diagonal().cwiseAbs().minCoeff()<RealScalar(1e-4)) scaling.diagonal() = VectorType::Random();\n\n    LineType l1 = l0;\n    VectorType p3 = l0.pointAt(Scalar(1));\n    VERIFY_IS_MUCH_SMALLER_THAN( l1.transform(rot).distance(rot * p3), Scalar(1) );\n    l1 = l0;\n    VERIFY_IS_MUCH_SMALLER_THAN( l1.transform(rot,Isometry).distance(rot * p3), Scalar(1) );\n    l1 = l0;\n    VERIFY_IS_MUCH_SMALLER_THAN( l1.transform(rot*scaling).distance((rot*scaling) * p3), Scalar(1) );\n    l1 = l0;\n    VERIFY_IS_MUCH_SMALLER_THAN( l1.transform(rot*scaling*translation)\n                                   .distance((rot*scaling*translation) * p3), Scalar(1) );\n    l1 = l0;\n    VERIFY_IS_MUCH_SMALLER_THAN( l1.transform(rot*translation,Isometry)\n                                   .distance((rot*translation) * p3), Scalar(1) );\n  }\n\n}\n\ntemplate<typename Scalar> void parametrizedline_alignment()\n{\n  typedef ParametrizedLine<Scalar,4,AutoAlign> Line4a;\n  typedef ParametrizedLine<Scalar,4,DontAlign> Line4u;\n\n  EIGEN_ALIGN_MAX Scalar array1[16];\n  EIGEN_ALIGN_MAX Scalar array2[16];\n  EIGEN_ALIGN_MAX Scalar array3[16+1];\n  Scalar* array3u = array3+1;\n\n  Line4a *p1 = ::new(reinterpret_cast<void*>(array1)) Line4a;\n  Line4u *p2 = ::new(reinterpret_cast<void*>(array2)) Line4u;\n  Line4u *p3 = ::new(reinterpret_cast<void*>(array3u)) Line4u;\n  \n  p1->origin().setRandom();\n  p1->direction().setRandom();\n  *p2 = *p1;\n  *p3 = *p1;\n\n  VERIFY_IS_APPROX(p1->origin(), p2->origin());\n  VERIFY_IS_APPROX(p1->origin(), p3->origin());\n  VERIFY_IS_APPROX(p1->direction(), p2->direction());\n  VERIFY_IS_APPROX(p1->direction(), p3->direction());\n  \n  #if defined(EIGEN_VECTORIZE) && EIGEN_MAX_STATIC_ALIGN_BYTES>0\n  if(internal::packet_traits<Scalar>::Vectorizable && internal::packet_traits<Scalar>::size<=4)\n    VERIFY_RAISES_ASSERT((::new(reinterpret_cast<void*>(array3u)) Line4a));\n  #endif\n}\n\nEIGEN_DECLARE_TEST(geo_parametrizedline)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( parametrizedline(ParametrizedLine<float,2>()) );\n    CALL_SUBTEST_2( parametrizedline(ParametrizedLine<float,3>()) );\n    CALL_SUBTEST_2( parametrizedline_alignment<float>() );\n    CALL_SUBTEST_3( parametrizedline(ParametrizedLine<double,4>()) );\n    CALL_SUBTEST_3( parametrizedline_alignment<double>() );\n    CALL_SUBTEST_4( parametrizedline(ParametrizedLine<std::complex<double>,5>()) );\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/geo_quaternion.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2009 Mathieu Gautier <mathieu.gautier@cea.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <Eigen/Geometry>\n#include <Eigen/LU>\n#include <Eigen/SVD>\n#include \"AnnoyingScalar.h\"\n\ntemplate<typename T> T bounded_acos(T v)\n{\n  using std::acos;\n  using std::min;\n  using std::max;\n  return acos((max)(T(-1),(min)(v,T(1))));\n}\n\ntemplate<typename QuatType> void check_slerp(const QuatType& q0, const QuatType& q1)\n{\n  using std::abs;\n  typedef typename QuatType::Scalar Scalar;\n  typedef AngleAxis<Scalar> AA;\n\n  Scalar largeEps = test_precision<Scalar>();\n\n  Scalar theta_tot = AA(q1*q0.inverse()).angle();\n  if(theta_tot>Scalar(EIGEN_PI))\n    theta_tot = Scalar(2.)*Scalar(EIGEN_PI)-theta_tot;\n  for(Scalar t=0; t<=Scalar(1.001); t+=Scalar(0.1))\n  {\n    QuatType q = q0.slerp(t,q1);\n    Scalar theta = AA(q*q0.inverse()).angle();\n    VERIFY(abs(q.norm() - 1) < largeEps);\n    if(theta_tot==0)  VERIFY(theta_tot==0);\n    else              VERIFY(abs(theta - t * theta_tot) < largeEps);\n  }\n}\n\ntemplate<typename Scalar, int Options> void quaternion(void)\n{\n  /* this test covers the following files:\n     Quaternion.h\n  */\n  using std::abs;\n  typedef Matrix<Scalar,3,1> Vector3;\n  typedef Matrix<Scalar,3,3> Matrix3;\n  typedef Quaternion<Scalar,Options> Quaternionx;\n  typedef AngleAxis<Scalar> AngleAxisx;\n\n  Scalar largeEps = test_precision<Scalar>();\n  if (internal::is_same<Scalar,float>::value)\n    largeEps = Scalar(1e-3);\n\n  Scalar eps = internal::random<Scalar>() * Scalar(1e-2);\n\n  Vector3 v0 = Vector3::Random(),\n          v1 = Vector3::Random(),\n          v2 = Vector3::Random(),\n          v3 = Vector3::Random();\n\n  Scalar  a = internal::random<Scalar>(-Scalar(EIGEN_PI), Scalar(EIGEN_PI)),\n          b = internal::random<Scalar>(-Scalar(EIGEN_PI), Scalar(EIGEN_PI));\n\n  // Quaternion: Identity(), setIdentity();\n  Quaternionx q1, q2;\n  q2.setIdentity();\n  VERIFY_IS_APPROX(Quaternionx(Quaternionx::Identity()).coeffs(), q2.coeffs());\n  q1.coeffs().setRandom();\n  VERIFY_IS_APPROX(q1.coeffs(), (q1*q2).coeffs());\n\n  // concatenation\n  q1 *= q2;\n\n  q1 = AngleAxisx(a, v0.normalized());\n  q2 = AngleAxisx(a, v1.normalized());\n\n  // angular distance\n  Scalar refangle = abs(AngleAxisx(q1.inverse()*q2).angle());\n  if (refangle>Scalar(EIGEN_PI))\n    refangle = Scalar(2)*Scalar(EIGEN_PI) - refangle;\n\n  if((q1.coeffs()-q2.coeffs()).norm() > Scalar(10)*largeEps)\n  {\n    VERIFY_IS_MUCH_SMALLER_THAN(abs(q1.angularDistance(q2) - refangle), Scalar(1));\n  }\n\n  // rotation matrix conversion\n  VERIFY_IS_APPROX(q1 * v2, q1.toRotationMatrix() * v2);\n  VERIFY_IS_APPROX(q1 * q2 * v2,\n    q1.toRotationMatrix() * q2.toRotationMatrix() * v2);\n\n  VERIFY(  (q2*q1).isApprox(q1*q2, largeEps)\n        || !(q2 * q1 * v2).isApprox(q1.toRotationMatrix() * q2.toRotationMatrix() * v2));\n\n  q2 = q1.toRotationMatrix();\n  VERIFY_IS_APPROX(q1*v1,q2*v1);\n\n  Matrix3 rot1(q1);\n  VERIFY_IS_APPROX(q1*v1,rot1*v1);\n  Quaternionx q3(rot1.transpose()*rot1);\n  VERIFY_IS_APPROX(q3*v1,v1);\n\n\n  // angle-axis conversion\n  AngleAxisx aa = AngleAxisx(q1);\n  VERIFY_IS_APPROX(q1 * v1, Quaternionx(aa) * v1);\n\n  // Do not execute the test if the rotation angle is almost zero, or\n  // the rotation axis and v1 are almost parallel.\n  if (abs(aa.angle()) > Scalar(5)*test_precision<Scalar>()\n      && (aa.axis() - v1.normalized()).norm() < Scalar(1.99)\n      && (aa.axis() + v1.normalized()).norm() < Scalar(1.99))\n  {\n    VERIFY_IS_NOT_APPROX(q1 * v1, Quaternionx(AngleAxisx(aa.angle()*2,aa.axis())) * v1);\n  }\n\n  // from two vector creation\n  VERIFY_IS_APPROX( v2.normalized(),(q2.setFromTwoVectors(v1, v2)*v1).normalized());\n  VERIFY_IS_APPROX( v1.normalized(),(q2.setFromTwoVectors(v1, v1)*v1).normalized());\n  VERIFY_IS_APPROX(-v1.normalized(),(q2.setFromTwoVectors(v1,-v1)*v1).normalized());\n  if (internal::is_same<Scalar,double>::value)\n  {\n    v3 = (v1.array()+eps).matrix();\n    VERIFY_IS_APPROX( v3.normalized(),(q2.setFromTwoVectors(v1, v3)*v1).normalized());\n    VERIFY_IS_APPROX(-v3.normalized(),(q2.setFromTwoVectors(v1,-v3)*v1).normalized());\n  }\n\n  // from two vector creation static function\n  VERIFY_IS_APPROX( v2.normalized(),(Quaternionx::FromTwoVectors(v1, v2)*v1).normalized());\n  VERIFY_IS_APPROX( v1.normalized(),(Quaternionx::FromTwoVectors(v1, v1)*v1).normalized());\n  VERIFY_IS_APPROX(-v1.normalized(),(Quaternionx::FromTwoVectors(v1,-v1)*v1).normalized());\n  if (internal::is_same<Scalar,double>::value)\n  {\n    v3 = (v1.array()+eps).matrix();\n    VERIFY_IS_APPROX( v3.normalized(),(Quaternionx::FromTwoVectors(v1, v3)*v1).normalized());\n    VERIFY_IS_APPROX(-v3.normalized(),(Quaternionx::FromTwoVectors(v1,-v3)*v1).normalized());\n  }\n\n  // inverse and conjugate\n  VERIFY_IS_APPROX(q1 * (q1.inverse() * v1), v1);\n  VERIFY_IS_APPROX(q1 * (q1.conjugate() * v1), v1);\n\n  // test casting\n  Quaternion<float> q1f = q1.template cast<float>();\n  VERIFY_IS_APPROX(q1f.template cast<Scalar>(),q1);\n  Quaternion<double> q1d = q1.template cast<double>();\n  VERIFY_IS_APPROX(q1d.template cast<Scalar>(),q1);\n\n  // test bug 369 - improper alignment.\n  Quaternionx *q = new Quaternionx;\n  delete q;\n\n  q1 = Quaternionx::UnitRandom();\n  q2 = Quaternionx::UnitRandom();\n  check_slerp(q1,q2);\n\n  q1 = AngleAxisx(b, v1.normalized());\n  q2 = AngleAxisx(b+Scalar(EIGEN_PI), v1.normalized());\n  check_slerp(q1,q2);\n\n  q1 = AngleAxisx(b,  v1.normalized());\n  q2 = AngleAxisx(-b, -v1.normalized());\n  check_slerp(q1,q2);\n\n  q1 = Quaternionx::UnitRandom();\n  q2.coeffs() = -q1.coeffs();\n  check_slerp(q1,q2);\n}\n\ntemplate<typename Scalar> void mapQuaternion(void){\n  typedef Map<Quaternion<Scalar>, Aligned> MQuaternionA;\n  typedef Map<const Quaternion<Scalar>, Aligned> MCQuaternionA;\n  typedef Map<Quaternion<Scalar> > MQuaternionUA;\n  typedef Map<const Quaternion<Scalar> > MCQuaternionUA;\n  typedef Quaternion<Scalar> Quaternionx;\n  typedef Matrix<Scalar,3,1> Vector3;\n  typedef AngleAxis<Scalar> AngleAxisx;\n  \n  Vector3 v0 = Vector3::Random(),\n          v1 = Vector3::Random();\n  Scalar  a = internal::random<Scalar>(-Scalar(EIGEN_PI), Scalar(EIGEN_PI));\n\n  EIGEN_ALIGN_MAX Scalar array1[4];\n  EIGEN_ALIGN_MAX Scalar array2[4];\n  EIGEN_ALIGN_MAX Scalar array3[4+1];\n  Scalar* array3unaligned = array3+1;\n  \n  MQuaternionA    mq1(array1);\n  MCQuaternionA   mcq1(array1);\n  MQuaternionA    mq2(array2);\n  MQuaternionUA   mq3(array3unaligned);\n  MCQuaternionUA  mcq3(array3unaligned);\n\n//  std::cerr << array1 << \" \" << array2 << \" \" << array3 << \"\\n\";\n  mq1 = AngleAxisx(a, v0.normalized());\n  mq2 = mq1;\n  mq3 = mq1;\n\n  Quaternionx q1 = mq1;\n  Quaternionx q2 = mq2;\n  Quaternionx q3 = mq3;\n  Quaternionx q4 = MCQuaternionUA(array3unaligned);\n\n  VERIFY_IS_APPROX(q1.coeffs(), q2.coeffs());\n  VERIFY_IS_APPROX(q1.coeffs(), q3.coeffs());\n  VERIFY_IS_APPROX(q4.coeffs(), q3.coeffs());\n  #ifdef EIGEN_VECTORIZE\n  if(internal::packet_traits<Scalar>::Vectorizable)\n    VERIFY_RAISES_ASSERT((MQuaternionA(array3unaligned)));\n  #endif\n    \n  VERIFY_IS_APPROX(mq1 * (mq1.inverse() * v1), v1);\n  VERIFY_IS_APPROX(mq1 * (mq1.conjugate() * v1), v1);\n  \n  VERIFY_IS_APPROX(mcq1 * (mcq1.inverse() * v1), v1);\n  VERIFY_IS_APPROX(mcq1 * (mcq1.conjugate() * v1), v1);\n  \n  VERIFY_IS_APPROX(mq3 * (mq3.inverse() * v1), v1);\n  VERIFY_IS_APPROX(mq3 * (mq3.conjugate() * v1), v1);\n  \n  VERIFY_IS_APPROX(mcq3 * (mcq3.inverse() * v1), v1);\n  VERIFY_IS_APPROX(mcq3 * (mcq3.conjugate() * v1), v1);\n  \n  VERIFY_IS_APPROX(mq1*mq2, q1*q2);\n  VERIFY_IS_APPROX(mq3*mq2, q3*q2);\n  VERIFY_IS_APPROX(mcq1*mq2, q1*q2);\n  VERIFY_IS_APPROX(mcq3*mq2, q3*q2);\n\n  // Bug 1461, compilation issue with Map<const Quat>::w(), and other reference/constness checks:\n  VERIFY_IS_APPROX(mcq3.coeffs().x() + mcq3.coeffs().y() + mcq3.coeffs().z() + mcq3.coeffs().w(), mcq3.coeffs().sum());\n  VERIFY_IS_APPROX(mcq3.x() + mcq3.y() + mcq3.z() + mcq3.w(), mcq3.coeffs().sum());\n  mq3.w() = 1;\n  const Quaternionx& cq3(q3);\n  VERIFY( &cq3.x() == &q3.x() );\n  const MQuaternionUA& cmq3(mq3);\n  VERIFY( &cmq3.x() == &mq3.x() );\n  // FIXME the following should be ok. The problem is that currently the LValueBit flag\n  // is used to determine whether we can return a coeff by reference or not, which is not enough for Map<const ...>.\n  //const MCQuaternionUA& cmcq3(mcq3);\n  //VERIFY( &cmcq3.x() == &mcq3.x() );\n\n  // test cast\n  {\n    Quaternion<float> q1f = mq1.template cast<float>();\n    VERIFY_IS_APPROX(q1f.template cast<Scalar>(),mq1);\n    Quaternion<double> q1d = mq1.template cast<double>();\n    VERIFY_IS_APPROX(q1d.template cast<Scalar>(),mq1);\n  }\n}\n\ntemplate<typename Scalar> void quaternionAlignment(void){\n  typedef Quaternion<Scalar,AutoAlign> QuaternionA;\n  typedef Quaternion<Scalar,DontAlign> QuaternionUA;\n\n  EIGEN_ALIGN_MAX Scalar array1[4];\n  EIGEN_ALIGN_MAX Scalar array2[4];\n  EIGEN_ALIGN_MAX Scalar array3[4+1];\n  Scalar* arrayunaligned = array3+1;\n\n  QuaternionA *q1 = ::new(reinterpret_cast<void*>(array1)) QuaternionA;\n  QuaternionUA *q2 = ::new(reinterpret_cast<void*>(array2)) QuaternionUA;\n  QuaternionUA *q3 = ::new(reinterpret_cast<void*>(arrayunaligned)) QuaternionUA;\n\n  q1->coeffs().setRandom();\n  *q2 = *q1;\n  *q3 = *q1;\n\n  VERIFY_IS_APPROX(q1->coeffs(), q2->coeffs());\n  VERIFY_IS_APPROX(q1->coeffs(), q3->coeffs());\n  #if defined(EIGEN_VECTORIZE) && EIGEN_MAX_STATIC_ALIGN_BYTES>0\n  if(internal::packet_traits<Scalar>::Vectorizable && internal::packet_traits<Scalar>::size<=4)\n    VERIFY_RAISES_ASSERT((::new(reinterpret_cast<void*>(arrayunaligned)) QuaternionA));\n  #endif\n}\n\ntemplate<typename PlainObjectType> void check_const_correctness(const PlainObjectType&)\n{\n  // there's a lot that we can't test here while still having this test compile!\n  // the only possible approach would be to run a script trying to compile stuff and checking that it fails.\n  // CMake can help with that.\n\n  // verify that map-to-const don't have LvalueBit\n  typedef typename internal::add_const<PlainObjectType>::type ConstPlainObjectType;\n  VERIFY( !(internal::traits<Map<ConstPlainObjectType> >::Flags & LvalueBit) );\n  VERIFY( !(internal::traits<Map<ConstPlainObjectType, Aligned> >::Flags & LvalueBit) );\n  VERIFY( !(Map<ConstPlainObjectType>::Flags & LvalueBit) );\n  VERIFY( !(Map<ConstPlainObjectType, Aligned>::Flags & LvalueBit) );\n}\n\n#if EIGEN_HAS_RVALUE_REFERENCES\n\n// Regression for bug 1573\nstruct MovableClass {\n  // The following line is a workaround for gcc 4.7 and 4.8 (see bug 1573 comments).\n  static_assert(std::is_nothrow_move_constructible<Quaternionf>::value,\"\");\n  MovableClass() = default;\n  MovableClass(const MovableClass&) = default;\n  MovableClass(MovableClass&&) noexcept = default;\n  MovableClass& operator=(const MovableClass&) = default;\n  MovableClass& operator=(MovableClass&&) = default;\n  Quaternionf m_quat;\n};\n\n#endif\n\nEIGEN_DECLARE_TEST(geo_quaternion)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1(( quaternion<float,AutoAlign>() ));\n    CALL_SUBTEST_1( check_const_correctness(Quaternionf()) );\n    CALL_SUBTEST_1(( quaternion<float,DontAlign>() ));\n    CALL_SUBTEST_1(( quaternionAlignment<float>() ));\n    CALL_SUBTEST_1( mapQuaternion<float>() );\n\n    CALL_SUBTEST_2(( quaternion<double,AutoAlign>() ));\n    CALL_SUBTEST_2( check_const_correctness(Quaterniond()) );\n    CALL_SUBTEST_2(( quaternion<double,DontAlign>() ));\n    CALL_SUBTEST_2(( quaternionAlignment<double>() ));\n    CALL_SUBTEST_2( mapQuaternion<double>() );\n\n    AnnoyingScalar::dont_throw = true;\n    CALL_SUBTEST_3(( quaternion<AnnoyingScalar,AutoAlign>() ));\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/geo_transformations.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <Eigen/Geometry>\n#include <Eigen/LU>\n#include <Eigen/SVD>\n\ntemplate<typename T>\nMatrix<T,2,1> angleToVec(T a)\n{\n  return Matrix<T,2,1>(std::cos(a), std::sin(a));\n}\n\n// This permits to workaround a bug in clang/llvm code generation.\ntemplate<typename T>\nEIGEN_DONT_INLINE\nvoid dont_over_optimize(T& x) { volatile typename T::Scalar tmp = x(0); x(0) = tmp; }\n\ntemplate<typename Scalar, int Mode, int Options> void non_projective_only()\n{\n    /* this test covers the following files:\n     Cross.h Quaternion.h, Transform.cpp\n  */\n  typedef Matrix<Scalar,3,1> Vector3;\n  typedef Quaternion<Scalar> Quaternionx;\n  typedef AngleAxis<Scalar> AngleAxisx;\n  typedef Transform<Scalar,3,Mode,Options> Transform3;\n  typedef DiagonalMatrix<Scalar,3> AlignedScaling3;\n  typedef Translation<Scalar,3> Translation3;\n\n  Vector3 v0 = Vector3::Random(),\n          v1 = Vector3::Random();\n\n  Transform3 t0, t1, t2;\n\n  Scalar a = internal::random<Scalar>(-Scalar(EIGEN_PI), Scalar(EIGEN_PI));\n\n  Quaternionx q1, q2;\n\n  q1 = AngleAxisx(a, v0.normalized());\n\n  t0 = Transform3::Identity();\n  VERIFY_IS_APPROX(t0.matrix(), Transform3::MatrixType::Identity());\n\n  t0.linear() = q1.toRotationMatrix();\n\n  v0 << 50, 2, 1;\n  t0.scale(v0);\n\n  VERIFY_IS_APPROX( (t0 * Vector3(1,0,0)).template head<3>().norm(), v0.x());\n\n  t0.setIdentity();\n  t1.setIdentity();\n  v1 << 1, 2, 3;\n  t0.linear() = q1.toRotationMatrix();\n  t0.pretranslate(v0);\n  t0.scale(v1);\n  t1.linear() = q1.conjugate().toRotationMatrix();\n  t1.prescale(v1.cwiseInverse());\n  t1.translate(-v0);\n\n  VERIFY((t0 * t1).matrix().isIdentity(test_precision<Scalar>()));\n\n  t1.fromPositionOrientationScale(v0, q1, v1);\n  VERIFY_IS_APPROX(t1.matrix(), t0.matrix());\n  VERIFY_IS_APPROX(t1*v1, t0*v1);\n\n  // translation * vector\n  t0.setIdentity();\n  t0.translate(v0);\n  VERIFY_IS_APPROX((t0 * v1).template head<3>(), Translation3(v0) * v1);\n\n  // AlignedScaling * vector\n  t0.setIdentity();\n  t0.scale(v0);\n  VERIFY_IS_APPROX((t0 * v1).template head<3>(), AlignedScaling3(v0) * v1);\n}\n\ntemplate<typename Scalar, int Mode, int Options> void transformations()\n{\n  /* this test covers the following files:\n     Cross.h Quaternion.h, Transform.cpp\n  */\n  using std::cos;\n  using std::abs;\n  typedef Matrix<Scalar,3,3> Matrix3;\n  typedef Matrix<Scalar,4,4> Matrix4;\n  typedef Matrix<Scalar,2,1> Vector2;\n  typedef Matrix<Scalar,3,1> Vector3;\n  typedef Matrix<Scalar,4,1> Vector4;\n  typedef Quaternion<Scalar> Quaternionx;\n  typedef AngleAxis<Scalar> AngleAxisx;\n  typedef Transform<Scalar,2,Mode,Options> Transform2;\n  typedef Transform<Scalar,3,Mode,Options> Transform3;\n  typedef typename Transform3::MatrixType MatrixType;\n  typedef DiagonalMatrix<Scalar,3> AlignedScaling3;\n  typedef Translation<Scalar,2> Translation2;\n  typedef Translation<Scalar,3> Translation3;\n\n  Vector3 v0 = Vector3::Random(),\n          v1 = Vector3::Random();\n  Matrix3 matrot1, m;\n\n  Scalar a = internal::random<Scalar>(-Scalar(EIGEN_PI), Scalar(EIGEN_PI));\n  Scalar s0 = internal::random<Scalar>(), s1 = internal::random<Scalar>();\n  \n  while(v0.norm() < test_precision<Scalar>()) v0 = Vector3::Random();\n  while(v1.norm() < test_precision<Scalar>()) v1 = Vector3::Random();\n\n  VERIFY_IS_APPROX(v0, AngleAxisx(a, v0.normalized()) * v0);\n  VERIFY_IS_APPROX(-v0, AngleAxisx(Scalar(EIGEN_PI), v0.unitOrthogonal()) * v0);\n  if(abs(cos(a)) > test_precision<Scalar>())\n  {\n    VERIFY_IS_APPROX(cos(a)*v0.squaredNorm(), v0.dot(AngleAxisx(a, v0.unitOrthogonal()) * v0));\n  }\n  m = AngleAxisx(a, v0.normalized()).toRotationMatrix().adjoint();\n  VERIFY_IS_APPROX(Matrix3::Identity(), m * AngleAxisx(a, v0.normalized()));\n  VERIFY_IS_APPROX(Matrix3::Identity(), AngleAxisx(a, v0.normalized()) * m);\n\n  Quaternionx q1, q2;\n  q1 = AngleAxisx(a, v0.normalized());\n  q2 = AngleAxisx(a, v1.normalized());\n\n  // rotation matrix conversion\n  matrot1 = AngleAxisx(Scalar(0.1), Vector3::UnitX())\n          * AngleAxisx(Scalar(0.2), Vector3::UnitY())\n          * AngleAxisx(Scalar(0.3), Vector3::UnitZ());\n  VERIFY_IS_APPROX(matrot1 * v1,\n       AngleAxisx(Scalar(0.1), Vector3(1,0,0)).toRotationMatrix()\n    * (AngleAxisx(Scalar(0.2), Vector3(0,1,0)).toRotationMatrix()\n    * (AngleAxisx(Scalar(0.3), Vector3(0,0,1)).toRotationMatrix() * v1)));\n\n  // angle-axis conversion\n  AngleAxisx aa = AngleAxisx(q1);\n  VERIFY_IS_APPROX(q1 * v1, Quaternionx(aa) * v1);\n  \n  // The following test is stable only if 2*angle != angle and v1 is not colinear with axis\n  if( (abs(aa.angle()) > test_precision<Scalar>()) && (abs(aa.axis().dot(v1.normalized()))<(Scalar(1)-Scalar(4)*test_precision<Scalar>())) )\n  {\n    VERIFY( !(q1 * v1).isApprox(Quaternionx(AngleAxisx(aa.angle()*2,aa.axis())) * v1) );\n  }\n\n  aa.fromRotationMatrix(aa.toRotationMatrix());\n  VERIFY_IS_APPROX(q1 * v1, Quaternionx(aa) * v1);\n  // The following test is stable only if 2*angle != angle and v1 is not colinear with axis\n  if( (abs(aa.angle()) > test_precision<Scalar>()) && (abs(aa.axis().dot(v1.normalized()))<(Scalar(1)-Scalar(4)*test_precision<Scalar>())) )\n  {\n    VERIFY( !(q1 * v1).isApprox(Quaternionx(AngleAxisx(aa.angle()*2,aa.axis())) * v1) );\n  }\n\n  // AngleAxis\n  VERIFY_IS_APPROX(AngleAxisx(a,v1.normalized()).toRotationMatrix(),\n    Quaternionx(AngleAxisx(a,v1.normalized())).toRotationMatrix());\n\n  AngleAxisx aa1;\n  m = q1.toRotationMatrix();\n  aa1 = m;\n  VERIFY_IS_APPROX(AngleAxisx(m).toRotationMatrix(),\n    Quaternionx(m).toRotationMatrix());\n\n  // Transform\n  // TODO complete the tests !\n  a = 0;\n  while (abs(a)<Scalar(0.1))\n    a = internal::random<Scalar>(-Scalar(0.4)*Scalar(EIGEN_PI), Scalar(0.4)*Scalar(EIGEN_PI));\n  q1 = AngleAxisx(a, v0.normalized());\n  Transform3 t0, t1, t2;\n\n  // first test setIdentity() and Identity()\n  t0.setIdentity();\n  VERIFY_IS_APPROX(t0.matrix(), Transform3::MatrixType::Identity());\n  t0.matrix().setZero();\n  t0 = Transform3::Identity();\n  VERIFY_IS_APPROX(t0.matrix(), Transform3::MatrixType::Identity());\n\n  t0.setIdentity();\n  t1.setIdentity();\n  v1 << 1, 2, 3;\n  t0.linear() = q1.toRotationMatrix();\n  t0.pretranslate(v0);\n  t0.scale(v1);\n  t1.linear() = q1.conjugate().toRotationMatrix();\n  t1.prescale(v1.cwiseInverse());\n  t1.translate(-v0);\n\n  VERIFY((t0 * t1).matrix().isIdentity(test_precision<Scalar>()));\n\n  t1.fromPositionOrientationScale(v0, q1, v1);\n  VERIFY_IS_APPROX(t1.matrix(), t0.matrix());\n\n  t0.setIdentity(); t0.scale(v0).rotate(q1.toRotationMatrix());\n  t1.setIdentity(); t1.scale(v0).rotate(q1);\n  VERIFY_IS_APPROX(t0.matrix(), t1.matrix());\n\n  t0.setIdentity(); t0.scale(v0).rotate(AngleAxisx(q1));\n  VERIFY_IS_APPROX(t0.matrix(), t1.matrix());\n\n  VERIFY_IS_APPROX(t0.scale(a).matrix(), t1.scale(Vector3::Constant(a)).matrix());\n  VERIFY_IS_APPROX(t0.prescale(a).matrix(), t1.prescale(Vector3::Constant(a)).matrix());\n\n  // More transform constructors, operator=, operator*=\n\n  Matrix3 mat3 = Matrix3::Random();\n  Matrix4 mat4;\n  mat4 << mat3 , Vector3::Zero() , Vector4::Zero().transpose();\n  Transform3 tmat3(mat3), tmat4(mat4);\n  if(Mode!=int(AffineCompact))\n    tmat4.matrix()(3,3) = Scalar(1);\n  VERIFY_IS_APPROX(tmat3.matrix(), tmat4.matrix());\n\n  Scalar a3 = internal::random<Scalar>(-Scalar(EIGEN_PI), Scalar(EIGEN_PI));\n  Vector3 v3 = Vector3::Random().normalized();\n  AngleAxisx aa3(a3, v3);\n  Transform3 t3(aa3);\n  Transform3 t4;\n  t4 = aa3;\n  VERIFY_IS_APPROX(t3.matrix(), t4.matrix());\n  t4.rotate(AngleAxisx(-a3,v3));\n  VERIFY_IS_APPROX(t4.matrix(), MatrixType::Identity());\n  t4 *= aa3;\n  VERIFY_IS_APPROX(t3.matrix(), t4.matrix());\n\n  do {\n    v3 = Vector3::Random();\n    dont_over_optimize(v3);\n  } while (v3.cwiseAbs().minCoeff()<NumTraits<Scalar>::epsilon());\n  Translation3 tv3(v3);\n  Transform3 t5(tv3);\n  t4 = tv3;\n  VERIFY_IS_APPROX(t5.matrix(), t4.matrix());\n  t4.translate((-v3).eval());\n  VERIFY_IS_APPROX(t4.matrix(), MatrixType::Identity());\n  t4 *= tv3;\n  VERIFY_IS_APPROX(t5.matrix(), t4.matrix());\n\n  AlignedScaling3 sv3(v3);\n  Transform3 t6(sv3);\n  t4 = sv3;\n  VERIFY_IS_APPROX(t6.matrix(), t4.matrix());\n  t4.scale(v3.cwiseInverse());\n  VERIFY_IS_APPROX(t4.matrix(), MatrixType::Identity());\n  t4 *= sv3;\n  VERIFY_IS_APPROX(t6.matrix(), t4.matrix());\n\n  // matrix * transform\n  VERIFY_IS_APPROX((t3.matrix()*t4).matrix(), (t3*t4).matrix());\n\n  // chained Transform product\n  VERIFY_IS_APPROX(((t3*t4)*t5).matrix(), (t3*(t4*t5)).matrix());\n\n  // check that Transform product doesn't have aliasing problems\n  t5 = t4;\n  t5 = t5*t5;\n  VERIFY_IS_APPROX(t5, t4*t4);\n\n  // 2D transformation\n  Transform2 t20, t21;\n  Vector2 v20 = Vector2::Random();\n  Vector2 v21 = Vector2::Random();\n  for (int k=0; k<2; ++k)\n    if (abs(v21[k])<Scalar(1e-3)) v21[k] = Scalar(1e-3);\n  t21.setIdentity();\n  t21.linear() = Rotation2D<Scalar>(a).toRotationMatrix();\n  VERIFY_IS_APPROX(t20.fromPositionOrientationScale(v20,a,v21).matrix(),\n    t21.pretranslate(v20).scale(v21).matrix());\n\n  t21.setIdentity();\n  t21.linear() = Rotation2D<Scalar>(-a).toRotationMatrix();\n  VERIFY( (t20.fromPositionOrientationScale(v20,a,v21)\n        * (t21.prescale(v21.cwiseInverse()).translate(-v20))).matrix().isIdentity(test_precision<Scalar>()) );\n\n  // Transform - new API\n  // 3D\n  t0.setIdentity();\n  t0.rotate(q1).scale(v0).translate(v0);\n  // mat * aligned scaling and mat * translation\n  t1 = (Matrix3(q1) * AlignedScaling3(v0)) * Translation3(v0);\n  VERIFY_IS_APPROX(t0.matrix(), t1.matrix());\n  t1 = (Matrix3(q1) * Eigen::Scaling(v0)) * Translation3(v0);\n  VERIFY_IS_APPROX(t0.matrix(), t1.matrix());\n  t1 = (q1 * Eigen::Scaling(v0)) * Translation3(v0);\n  VERIFY_IS_APPROX(t0.matrix(), t1.matrix());\n  // mat * transformation and aligned scaling * translation\n  t1 = Matrix3(q1) * (AlignedScaling3(v0) * Translation3(v0));\n  VERIFY_IS_APPROX(t0.matrix(), t1.matrix());\n\n\n  t0.setIdentity();\n  t0.scale(s0).translate(v0);\n  t1 = Eigen::Scaling(s0) * Translation3(v0);\n  VERIFY_IS_APPROX(t0.matrix(), t1.matrix());\n  t0.prescale(s0);\n  t1 = Eigen::Scaling(s0) * t1;\n  VERIFY_IS_APPROX(t0.matrix(), t1.matrix());\n  \n  t0 = t3;\n  t0.scale(s0);\n  t1 = t3 * Eigen::Scaling(s0,s0,s0);\n  VERIFY_IS_APPROX(t0.matrix(), t1.matrix());\n  t0.prescale(s0);\n  t1 = Eigen::Scaling(s0,s0,s0) * t1;\n  VERIFY_IS_APPROX(t0.matrix(), t1.matrix());\n\n  t0 = t3;\n  t0.scale(s0);\n  t1 = t3 * Eigen::Scaling(s0);\n  VERIFY_IS_APPROX(t0.matrix(), t1.matrix());\n  t0.prescale(s0);\n  t1 = Eigen::Scaling(s0) * t1;\n  VERIFY_IS_APPROX(t0.matrix(), t1.matrix());\n\n  t0.setIdentity();\n  t0.prerotate(q1).prescale(v0).pretranslate(v0);\n  // translation * aligned scaling and transformation * mat\n  t1 = (Translation3(v0) * AlignedScaling3(v0)) * Transform3(q1);\n  VERIFY_IS_APPROX(t0.matrix(), t1.matrix());\n  // scaling * mat and translation * mat\n  t1 = Translation3(v0) * (AlignedScaling3(v0) * Transform3(q1));\n  VERIFY_IS_APPROX(t0.matrix(), t1.matrix());\n\n  t0.setIdentity();\n  t0.scale(v0).translate(v0).rotate(q1);\n  // translation * mat and aligned scaling * transformation\n  t1 = AlignedScaling3(v0) * (Translation3(v0) * Transform3(q1));\n  VERIFY_IS_APPROX(t0.matrix(), t1.matrix());\n  // transformation * aligned scaling\n  t0.scale(v0);\n  t1 *= AlignedScaling3(v0);\n  VERIFY_IS_APPROX(t0.matrix(), t1.matrix());\n  t1 = AlignedScaling3(v0) * (Translation3(v0) * Transform3(q1));\n  t1 = t1 * v0.asDiagonal();\n  VERIFY_IS_APPROX(t0.matrix(), t1.matrix());\n  // transformation * translation\n  t0.translate(v0);\n  t1 = t1 * Translation3(v0);\n  VERIFY_IS_APPROX(t0.matrix(), t1.matrix());\n  // translation * transformation\n  t0.pretranslate(v0);\n  t1 = Translation3(v0) * t1;\n  VERIFY_IS_APPROX(t0.matrix(), t1.matrix());\n\n  // transform * quaternion\n  t0.rotate(q1);\n  t1 = t1 * q1;\n  VERIFY_IS_APPROX(t0.matrix(), t1.matrix());\n\n  // translation * quaternion\n  t0.translate(v1).rotate(q1);\n  t1 = t1 * (Translation3(v1) * q1);\n  VERIFY_IS_APPROX(t0.matrix(), t1.matrix());\n\n  // aligned scaling * quaternion\n  t0.scale(v1).rotate(q1);\n  t1 = t1 * (AlignedScaling3(v1) * q1);\n  VERIFY_IS_APPROX(t0.matrix(), t1.matrix());\n\n  // quaternion * transform\n  t0.prerotate(q1);\n  t1 = q1 * t1;\n  VERIFY_IS_APPROX(t0.matrix(), t1.matrix());\n\n  // quaternion * translation\n  t0.rotate(q1).translate(v1);\n  t1 = t1 * (q1 * Translation3(v1));\n  VERIFY_IS_APPROX(t0.matrix(), t1.matrix());\n\n  // quaternion * aligned scaling\n  t0.rotate(q1).scale(v1);\n  t1 = t1 * (q1 * AlignedScaling3(v1));\n  VERIFY_IS_APPROX(t0.matrix(), t1.matrix());\n\n  // test transform inversion\n  t0.setIdentity();\n  t0.translate(v0);\n  do {\n    t0.linear().setRandom();\n  } while(t0.linear().jacobiSvd().singularValues()(2)<test_precision<Scalar>());\n  Matrix4 t044 = Matrix4::Zero();\n  t044(3,3) = 1;\n  t044.block(0,0,t0.matrix().rows(),4) = t0.matrix();\n  VERIFY_IS_APPROX(t0.inverse(Affine).matrix(), t044.inverse().block(0,0,t0.matrix().rows(),4));\n  t0.setIdentity();\n  t0.translate(v0).rotate(q1);\n  t044 = Matrix4::Zero();\n  t044(3,3) = 1;\n  t044.block(0,0,t0.matrix().rows(),4) = t0.matrix();\n  VERIFY_IS_APPROX(t0.inverse(Isometry).matrix(), t044.inverse().block(0,0,t0.matrix().rows(),4));\n\n  Matrix3 mat_rotation, mat_scaling;\n  t0.setIdentity();\n  t0.translate(v0).rotate(q1).scale(v1);\n  t0.computeRotationScaling(&mat_rotation, &mat_scaling);\n  VERIFY_IS_APPROX(t0.linear(), mat_rotation * mat_scaling);\n  VERIFY_IS_APPROX(mat_rotation*mat_rotation.adjoint(), Matrix3::Identity());\n  VERIFY_IS_APPROX(mat_rotation.determinant(), Scalar(1));\n  t0.computeScalingRotation(&mat_scaling, &mat_rotation);\n  VERIFY_IS_APPROX(t0.linear(), mat_scaling * mat_rotation);\n  VERIFY_IS_APPROX(mat_rotation*mat_rotation.adjoint(), Matrix3::Identity());\n  VERIFY_IS_APPROX(mat_rotation.determinant(), Scalar(1));\n\n  // test casting\n  Transform<float,3,Mode> t1f = t1.template cast<float>();\n  VERIFY_IS_APPROX(t1f.template cast<Scalar>(),t1);\n  Transform<double,3,Mode> t1d = t1.template cast<double>();\n  VERIFY_IS_APPROX(t1d.template cast<Scalar>(),t1);\n\n  Translation3 tr1(v0);\n  Translation<float,3> tr1f = tr1.template cast<float>();\n  VERIFY_IS_APPROX(tr1f.template cast<Scalar>(),tr1);\n  Translation<double,3> tr1d = tr1.template cast<double>();\n  VERIFY_IS_APPROX(tr1d.template cast<Scalar>(),tr1);\n\n  AngleAxis<float> aa1f = aa1.template cast<float>();\n  VERIFY_IS_APPROX(aa1f.template cast<Scalar>(),aa1);\n  AngleAxis<double> aa1d = aa1.template cast<double>();\n  VERIFY_IS_APPROX(aa1d.template cast<Scalar>(),aa1);\n\n  Rotation2D<Scalar> r2d1(internal::random<Scalar>());\n  Rotation2D<float> r2d1f = r2d1.template cast<float>();\n  VERIFY_IS_APPROX(r2d1f.template cast<Scalar>(),r2d1);\n  Rotation2D<double> r2d1d = r2d1.template cast<double>();\n  VERIFY_IS_APPROX(r2d1d.template cast<Scalar>(),r2d1);\n  \n  for(int k=0; k<100; ++k)\n  {\n    Scalar angle = internal::random<Scalar>(-100,100);\n    Rotation2D<Scalar> rot2(angle);\n    VERIFY( rot2.smallestPositiveAngle() >= 0 );\n    VERIFY( rot2.smallestPositiveAngle() <= Scalar(2)*Scalar(EIGEN_PI) );\n    VERIFY_IS_APPROX( angleToVec(rot2.smallestPositiveAngle()), angleToVec(rot2.angle()) );\n    \n    VERIFY( rot2.smallestAngle() >= -Scalar(EIGEN_PI) );\n    VERIFY( rot2.smallestAngle() <=  Scalar(EIGEN_PI) );\n    VERIFY_IS_APPROX( angleToVec(rot2.smallestAngle()), angleToVec(rot2.angle()) );\n\n    Matrix<Scalar,2,2> rot2_as_mat(rot2);\n    Rotation2D<Scalar> rot3(rot2_as_mat);\n    VERIFY_IS_APPROX( angleToVec(rot2.smallestAngle()),  angleToVec(rot3.angle()) );\n  }\n\n  s0 = internal::random<Scalar>(-100,100);\n  s1 = internal::random<Scalar>(-100,100);\n  Rotation2D<Scalar> R0(s0), R1(s1);\n  \n  t20 = Translation2(v20) * (R0 * Eigen::Scaling(s0));\n  t21 = Translation2(v20) * R0 * Eigen::Scaling(s0);\n  VERIFY_IS_APPROX(t20,t21);\n  \n  t20 = Translation2(v20) * (R0 * R0.inverse() * Eigen::Scaling(s0));\n  t21 = Translation2(v20) * Eigen::Scaling(s0);\n  VERIFY_IS_APPROX(t20,t21);\n  \n  VERIFY_IS_APPROX(s0, (R0.slerp(0, R1)).angle());\n  VERIFY_IS_APPROX( angleToVec(R1.smallestPositiveAngle()), angleToVec((R0.slerp(1, R1)).smallestPositiveAngle()) );\n  VERIFY_IS_APPROX(R0.smallestPositiveAngle(), (R0.slerp(0.5, R0)).smallestPositiveAngle());\n\n  if(std::cos(s0)>0)\n    VERIFY_IS_MUCH_SMALLER_THAN((R0.slerp(0.5, R0.inverse())).smallestAngle(), Scalar(1));\n  else\n    VERIFY_IS_APPROX(Scalar(EIGEN_PI), (R0.slerp(0.5, R0.inverse())).smallestPositiveAngle());\n  \n  // Check path length\n  Scalar l = 0;\n  int path_steps = 100;\n  for(int k=0; k<path_steps; ++k)\n  {\n    Scalar a1 = R0.slerp(Scalar(k)/Scalar(path_steps), R1).angle();\n    Scalar a2 = R0.slerp(Scalar(k+1)/Scalar(path_steps), R1).angle();\n    l += std::abs(a2-a1);\n  }\n  VERIFY(l<=Scalar(EIGEN_PI)*(Scalar(1)+NumTraits<Scalar>::epsilon()*Scalar(path_steps/2)));\n  \n  // check basic features\n  {\n    Rotation2D<Scalar> r1;           // default ctor\n    r1 = Rotation2D<Scalar>(s0);     // copy assignment\n    VERIFY_IS_APPROX(r1.angle(),s0);\n    Rotation2D<Scalar> r2(r1);       // copy ctor\n    VERIFY_IS_APPROX(r2.angle(),s0);\n  }\n\n  {\n    Transform3 t32(Matrix4::Random()), t33, t34;\n    t34 = t33 = t32;\n    t32.scale(v0);\n    t33*=AlignedScaling3(v0);\n    VERIFY_IS_APPROX(t32.matrix(), t33.matrix());\n    t33 = t34 * AlignedScaling3(v0);\n    VERIFY_IS_APPROX(t32.matrix(), t33.matrix());\n  }\n\n}\n\ntemplate<typename A1, typename A2, typename P, typename Q, typename V, typename H>\nvoid transform_associativity_left(const A1& a1, const A2& a2, const P& p, const Q& q, const V& v, const H& h)\n{\n  VERIFY_IS_APPROX( q*(a1*v), (q*a1)*v );\n  VERIFY_IS_APPROX( q*(a2*v), (q*a2)*v );\n  VERIFY_IS_APPROX( q*(p*h).hnormalized(),  ((q*p)*h).hnormalized() );\n}\n\ntemplate<typename A1, typename A2, typename P, typename Q, typename V, typename H>\nvoid transform_associativity2(const A1& a1, const A2& a2, const P& p, const Q& q, const V& v, const H& h)\n{\n  VERIFY_IS_APPROX( a1*(q*v), (a1*q)*v );\n  VERIFY_IS_APPROX( a2*(q*v), (a2*q)*v );\n  VERIFY_IS_APPROX( p *(q*v).homogeneous(), (p *q)*v.homogeneous() );\n\n  transform_associativity_left(a1, a2,p, q, v, h);\n}\n\ntemplate<typename Scalar, int Dim, int Options,typename RotationType>\nvoid transform_associativity(const RotationType& R)\n{\n  typedef Matrix<Scalar,Dim,1> VectorType;\n  typedef Matrix<Scalar,Dim+1,1> HVectorType;\n  typedef Matrix<Scalar,Dim,Dim> LinearType;\n  typedef Matrix<Scalar,Dim+1,Dim+1> MatrixType;\n  typedef Transform<Scalar,Dim,AffineCompact,Options> AffineCompactType;\n  typedef Transform<Scalar,Dim,Affine,Options> AffineType;\n  typedef Transform<Scalar,Dim,Projective,Options> ProjectiveType;\n  typedef DiagonalMatrix<Scalar,Dim> ScalingType;\n  typedef Translation<Scalar,Dim> TranslationType;\n\n  AffineCompactType A1c; A1c.matrix().setRandom();\n  AffineCompactType A2c; A2c.matrix().setRandom();\n  AffineType A1(A1c);\n  AffineType A2(A2c);\n  ProjectiveType P1; P1.matrix().setRandom();\n  VectorType v1 = VectorType::Random();\n  VectorType v2 = VectorType::Random();\n  HVectorType h1 = HVectorType::Random();\n  Scalar s1 = internal::random<Scalar>();\n  LinearType L = LinearType::Random();\n  MatrixType M = MatrixType::Random();\n\n  CALL_SUBTEST( transform_associativity2(A1c, A1, P1, A2, v2, h1) );\n  CALL_SUBTEST( transform_associativity2(A1c, A1, P1, A2c, v2, h1) );\n  CALL_SUBTEST( transform_associativity2(A1c, A1, P1, v1.asDiagonal(), v2, h1) );\n  CALL_SUBTEST( transform_associativity2(A1c, A1, P1, ScalingType(v1), v2, h1) );\n  CALL_SUBTEST( transform_associativity2(A1c, A1, P1, Scaling(v1), v2, h1) );\n  CALL_SUBTEST( transform_associativity2(A1c, A1, P1, Scaling(s1), v2, h1) );\n  CALL_SUBTEST( transform_associativity2(A1c, A1, P1, TranslationType(v1), v2, h1) );\n  CALL_SUBTEST( transform_associativity_left(A1c, A1, P1, L, v2, h1) );\n  CALL_SUBTEST( transform_associativity2(A1c, A1, P1, R, v2, h1) );\n\n  VERIFY_IS_APPROX( A1*(M*h1), (A1*M)*h1 );\n  VERIFY_IS_APPROX( A1c*(M*h1), (A1c*M)*h1 );\n  VERIFY_IS_APPROX( P1*(M*h1), (P1*M)*h1 );\n\n  VERIFY_IS_APPROX( M*(A1*h1), (M*A1)*h1 );\n  VERIFY_IS_APPROX( M*(A1c*h1), (M*A1c)*h1 );\n  VERIFY_IS_APPROX( M*(P1*h1),  ((M*P1)*h1) );\n}\n\ntemplate<typename Scalar> void transform_alignment()\n{\n  typedef Transform<Scalar,3,Projective,AutoAlign> Projective3a;\n  typedef Transform<Scalar,3,Projective,DontAlign> Projective3u;\n\n  EIGEN_ALIGN_MAX Scalar array1[16];\n  EIGEN_ALIGN_MAX Scalar array2[16];\n  EIGEN_ALIGN_MAX Scalar array3[16+1];\n  Scalar* array3u = array3+1;\n\n  Projective3a *p1 = ::new(reinterpret_cast<void*>(array1)) Projective3a;\n  Projective3u *p2 = ::new(reinterpret_cast<void*>(array2)) Projective3u;\n  Projective3u *p3 = ::new(reinterpret_cast<void*>(array3u)) Projective3u;\n  \n  p1->matrix().setRandom();\n  *p2 = *p1;\n  *p3 = *p1;\n\n  VERIFY_IS_APPROX(p1->matrix(), p2->matrix());\n  VERIFY_IS_APPROX(p1->matrix(), p3->matrix());\n  \n  VERIFY_IS_APPROX( (*p1) * (*p1), (*p2)*(*p3));\n  \n  #if defined(EIGEN_VECTORIZE) && EIGEN_MAX_STATIC_ALIGN_BYTES>0\n  if(internal::packet_traits<Scalar>::Vectorizable)\n    VERIFY_RAISES_ASSERT((::new(reinterpret_cast<void*>(array3u)) Projective3a));\n  #endif\n}\n\ntemplate<typename Scalar, int Dim, int Options> void transform_products()\n{\n  typedef Matrix<Scalar,Dim+1,Dim+1> Mat;\n  typedef Transform<Scalar,Dim,Projective,Options> Proj;\n  typedef Transform<Scalar,Dim,Affine,Options> Aff;\n  typedef Transform<Scalar,Dim,AffineCompact,Options> AffC;\n\n  Proj p; p.matrix().setRandom();\n  Aff a; a.linear().setRandom(); a.translation().setRandom();\n  AffC ac = a;\n\n  Mat p_m(p.matrix()), a_m(a.matrix());\n\n  VERIFY_IS_APPROX((p*p).matrix(), p_m*p_m);\n  VERIFY_IS_APPROX((a*a).matrix(), a_m*a_m);\n  VERIFY_IS_APPROX((p*a).matrix(), p_m*a_m);\n  VERIFY_IS_APPROX((a*p).matrix(), a_m*p_m);\n  VERIFY_IS_APPROX((ac*a).matrix(), a_m*a_m);\n  VERIFY_IS_APPROX((a*ac).matrix(), a_m*a_m);\n  VERIFY_IS_APPROX((p*ac).matrix(), p_m*a_m);\n  VERIFY_IS_APPROX((ac*p).matrix(), a_m*p_m);\n}\n\ntemplate<typename Scalar, int Mode, int Options> void transformations_no_scale()\n{\n     /* this test covers the following files:\n     Cross.h Quaternion.h, Transform.h\n  */\n  typedef Matrix<Scalar,3,1> Vector3;\n  typedef Matrix<Scalar,4,1> Vector4;\n  typedef Quaternion<Scalar> Quaternionx;\n  typedef AngleAxis<Scalar> AngleAxisx;\n  typedef Transform<Scalar,3,Mode,Options> Transform3;\n  typedef Translation<Scalar,3> Translation3;\n  typedef Matrix<Scalar,4,4> Matrix4;\n\n  Vector3 v0 = Vector3::Random(),\n          v1 = Vector3::Random();\n\n  Transform3 t0, t1, t2;\n\n  Scalar a = internal::random<Scalar>(-Scalar(EIGEN_PI), Scalar(EIGEN_PI));\n\n  Quaternionx q1, q2;\n\n  q1 = AngleAxisx(a, v0.normalized());\n\n  t0 = Transform3::Identity();\n  VERIFY_IS_APPROX(t0.matrix(), Transform3::MatrixType::Identity());\n\n  t0.setIdentity();\n  t1.setIdentity();\n  v1 = Vector3::Ones();\n  t0.linear() = q1.toRotationMatrix();\n  t0.pretranslate(v0);\n  t1.linear() = q1.conjugate().toRotationMatrix();\n  t1.translate(-v0);\n\n  VERIFY((t0 * t1).matrix().isIdentity(test_precision<Scalar>()));\n\n  t1.fromPositionOrientationScale(v0, q1, v1);\n  VERIFY_IS_APPROX(t1.matrix(), t0.matrix());\n  VERIFY_IS_APPROX(t1*v1, t0*v1);\n\n  // translation * vector\n  t0.setIdentity();\n  t0.translate(v0);\n  VERIFY_IS_APPROX((t0 * v1).template head<3>(), Translation3(v0) * v1);\n\n  // Conversion to matrix.\n  Transform3 t3;\n  t3.linear() = q1.toRotationMatrix();\n  t3.translation() = v1;\n  Matrix4 m3 = t3.matrix();\n  VERIFY((m3 * m3.inverse()).isIdentity(test_precision<Scalar>()));\n  // Verify implicit last row is initialized.\n  VERIFY_IS_APPROX(Vector4(m3.row(3)), Vector4(0.0, 0.0, 0.0, 1.0));\n\n  VERIFY_IS_APPROX(t3.rotation(), t3.linear());\n  if(Mode==Isometry)\n    VERIFY(t3.rotation().data()==t3.linear().data());\n}\n\nEIGEN_DECLARE_TEST(geo_transformations)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1(( transformations<double,Affine,AutoAlign>() ));\n    CALL_SUBTEST_1(( non_projective_only<double,Affine,AutoAlign>() ));\n    \n    CALL_SUBTEST_2(( transformations<float,AffineCompact,AutoAlign>() ));\n    CALL_SUBTEST_2(( non_projective_only<float,AffineCompact,AutoAlign>() ));\n    CALL_SUBTEST_2(( transform_alignment<float>() ));\n    \n    CALL_SUBTEST_3(( transformations<double,Projective,AutoAlign>() ));\n    CALL_SUBTEST_3(( transformations<double,Projective,DontAlign>() ));\n    CALL_SUBTEST_3(( transform_alignment<double>() ));\n\n    CALL_SUBTEST_4(( transformations<float,Affine,RowMajor|AutoAlign>() ));\n    CALL_SUBTEST_4(( non_projective_only<float,Affine,RowMajor>() ));\n    \n    CALL_SUBTEST_5(( transformations<double,AffineCompact,RowMajor|AutoAlign>() ));\n    CALL_SUBTEST_5(( non_projective_only<double,AffineCompact,RowMajor>() ));\n\n    CALL_SUBTEST_6(( transformations<double,Projective,RowMajor|AutoAlign>() ));\n    CALL_SUBTEST_6(( transformations<double,Projective,RowMajor|DontAlign>() ));\n\n\n    CALL_SUBTEST_7(( transform_products<double,3,RowMajor|AutoAlign>() ));\n    CALL_SUBTEST_7(( transform_products<float,2,AutoAlign>() ));\n\n    CALL_SUBTEST_8(( transform_associativity<double,2,ColMajor>(Rotation2D<double>(internal::random<double>()*double(EIGEN_PI))) ));\n    CALL_SUBTEST_8(( transform_associativity<double,3,ColMajor>(Quaterniond::UnitRandom()) ));\n\n    CALL_SUBTEST_9(( transformations_no_scale<double,Affine,AutoAlign>() ));\n    CALL_SUBTEST_9(( transformations_no_scale<double,Isometry,AutoAlign>() ));\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/gpu_basic.cu",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015-2016 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n// workaround issue between gcc >= 4.7 and cuda 5.5\n#if (defined __GNUC__) && (__GNUC__>4 || __GNUC_MINOR__>=7)\n  #undef _GLIBCXX_ATOMIC_BUILTINS\n  #undef _GLIBCXX_USE_INT128\n#endif\n\n#define EIGEN_TEST_NO_LONGDOUBLE\n#define EIGEN_TEST_NO_COMPLEX\n#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int\n\n#include \"main.h\"\n#include \"gpu_common.h\"\n\n// Check that dense modules can be properly parsed by nvcc\n#include <Eigen/Dense>\n\n// struct Foo{\n//   EIGEN_DEVICE_FUNC\n//   void operator()(int i, const float* mats, float* vecs) const {\n//     using namespace Eigen;\n//   //   Matrix3f M(data);\n//   //   Vector3f x(data+9);\n//   //   Map<Vector3f>(data+9) = M.inverse() * x;\n//     Matrix3f M(mats+i/16);\n//     Vector3f x(vecs+i*3);\n//   //   using std::min;\n//   //   using std::sqrt;\n//     Map<Vector3f>(vecs+i*3) << x.minCoeff(), 1, 2;// / x.dot(x);//(M.inverse() *  x) / x.x();\n//     //x = x*2 + x.y() * x + x * x.maxCoeff() - x / x.sum();\n//   }\n// };\n\ntemplate<typename T>\nstruct coeff_wise {\n  EIGEN_DEVICE_FUNC\n  void operator()(int i, const typename T::Scalar* in, typename T::Scalar* out) const\n  {\n    using namespace Eigen;\n    T x1(in+i);\n    T x2(in+i+1);\n    T x3(in+i+2);\n    Map<T> res(out+i*T::MaxSizeAtCompileTime);\n    \n    res.array() += (in[0] * x1 + x2).array() * x3.array();\n  }\n};\n\ntemplate<typename T>\nstruct replicate {\n  EIGEN_DEVICE_FUNC\n  void operator()(int i, const typename T::Scalar* in, typename T::Scalar* out) const\n  {\n    using namespace Eigen;\n    T x1(in+i);\n    int step   = x1.size() * 4;\n    int stride = 3 * step;\n    \n    typedef Map<Array<typename T::Scalar,Dynamic,Dynamic> > MapType;\n    MapType(out+i*stride+0*step, x1.rows()*2, x1.cols()*2) = x1.replicate(2,2);\n    MapType(out+i*stride+1*step, x1.rows()*3, x1.cols()) = in[i] * x1.colwise().replicate(3);\n    MapType(out+i*stride+2*step, x1.rows(), x1.cols()*3) = in[i] * x1.rowwise().replicate(3);\n  }\n};\n\ntemplate<typename T>\nstruct redux {\n  EIGEN_DEVICE_FUNC\n  void operator()(int i, const typename T::Scalar* in, typename T::Scalar* out) const\n  {\n    using namespace Eigen;\n    int N = 10;\n    T x1(in+i);\n    out[i*N+0] = x1.minCoeff();\n    out[i*N+1] = x1.maxCoeff();\n    out[i*N+2] = x1.sum();\n    out[i*N+3] = x1.prod();\n    out[i*N+4] = x1.matrix().squaredNorm();\n    out[i*N+5] = x1.matrix().norm();\n    out[i*N+6] = x1.colwise().sum().maxCoeff();\n    out[i*N+7] = x1.rowwise().maxCoeff().sum();\n    out[i*N+8] = x1.matrix().colwise().squaredNorm().sum();\n  }\n};\n\ntemplate<typename T1, typename T2>\nstruct prod_test {\n  EIGEN_DEVICE_FUNC\n  void operator()(int i, const typename T1::Scalar* in, typename T1::Scalar* out) const\n  {\n    using namespace Eigen;\n    typedef Matrix<typename T1::Scalar, T1::RowsAtCompileTime, T2::ColsAtCompileTime> T3;\n    T1 x1(in+i);\n    T2 x2(in+i+1);\n    Map<T3> res(out+i*T3::MaxSizeAtCompileTime);\n    res += in[i] * x1 * x2;\n  }\n};\n\ntemplate<typename T1, typename T2>\nstruct diagonal {\n  EIGEN_DEVICE_FUNC\n  void operator()(int i, const typename T1::Scalar* in, typename T1::Scalar* out) const\n  {\n    using namespace Eigen;\n    T1 x1(in+i);\n    Map<T2> res(out+i*T2::MaxSizeAtCompileTime);\n    res += x1.diagonal();\n  }\n};\n\ntemplate<typename T>\nstruct eigenvalues_direct {\n  EIGEN_DEVICE_FUNC\n  void operator()(int i, const typename T::Scalar* in, typename T::Scalar* out) const\n  {\n    using namespace Eigen;\n    typedef Matrix<typename T::Scalar, T::RowsAtCompileTime, 1> Vec;\n    T M(in+i);\n    Map<Vec> res(out+i*Vec::MaxSizeAtCompileTime);\n    T A = M*M.adjoint();\n    SelfAdjointEigenSolver<T> eig;\n    eig.computeDirect(A);\n    res = eig.eigenvalues();\n  }\n};\n\ntemplate<typename T>\nstruct eigenvalues {\n  EIGEN_DEVICE_FUNC\n  void operator()(int i, const typename T::Scalar* in, typename T::Scalar* out) const\n  {\n    using namespace Eigen;\n    typedef Matrix<typename T::Scalar, T::RowsAtCompileTime, 1> Vec;\n    T M(in+i);\n    Map<Vec> res(out+i*Vec::MaxSizeAtCompileTime);\n    T A = M*M.adjoint();\n    SelfAdjointEigenSolver<T> eig;\n    eig.compute(A);\n    res = eig.eigenvalues();\n  }\n};\n\ntemplate<typename T>\nstruct matrix_inverse {\n  EIGEN_DEVICE_FUNC\n  void operator()(int i, const typename T::Scalar* in, typename T::Scalar* out) const\n  {\n    using namespace Eigen;\n    T M(in+i);\n    Map<T> res(out+i*T::MaxSizeAtCompileTime);\n    res = M.inverse();\n  }\n};\n\nEIGEN_DECLARE_TEST(gpu_basic)\n{\n  ei_test_init_gpu();\n  \n  int nthreads = 100;\n  Eigen::VectorXf in, out;\n  \n  #if !defined(__CUDA_ARCH__) && !defined(__HIP_DEVICE_COMPILE__)\n  int data_size = nthreads * 512;\n  in.setRandom(data_size);\n  out.setRandom(data_size);\n  #endif\n  \n  CALL_SUBTEST( run_and_compare_to_gpu(coeff_wise<Vector3f>(), nthreads, in, out) );\n  CALL_SUBTEST( run_and_compare_to_gpu(coeff_wise<Array44f>(), nthreads, in, out) );\n\n#if !defined(EIGEN_USE_HIP)\n  // FIXME\n  // These subtests result in a compile failure on the HIP platform\n  //\n  //  eigen-upstream/Eigen/src/Core/Replicate.h:61:65: error:\n  //           base class 'internal::dense_xpr_base<Replicate<Array<float, 4, 1, 0, 4, 1>, -1, -1> >::type'\n  //           (aka 'ArrayBase<Eigen::Replicate<Eigen::Array<float, 4, 1, 0, 4, 1>, -1, -1> >') has protected default constructor\n  CALL_SUBTEST( run_and_compare_to_gpu(replicate<Array4f>(), nthreads, in, out) );\n  CALL_SUBTEST( run_and_compare_to_gpu(replicate<Array33f>(), nthreads, in, out) );\n#endif\n  \n  CALL_SUBTEST( run_and_compare_to_gpu(redux<Array4f>(), nthreads, in, out) );\n  CALL_SUBTEST( run_and_compare_to_gpu(redux<Matrix3f>(), nthreads, in, out) );\n  \n  CALL_SUBTEST( run_and_compare_to_gpu(prod_test<Matrix3f,Matrix3f>(), nthreads, in, out) );\n  CALL_SUBTEST( run_and_compare_to_gpu(prod_test<Matrix4f,Vector4f>(), nthreads, in, out) );\n  \n  CALL_SUBTEST( run_and_compare_to_gpu(diagonal<Matrix3f,Vector3f>(), nthreads, in, out) );\n  CALL_SUBTEST( run_and_compare_to_gpu(diagonal<Matrix4f,Vector4f>(), nthreads, in, out) );\n\n  CALL_SUBTEST( run_and_compare_to_gpu(matrix_inverse<Matrix2f>(), nthreads, in, out) );\n  CALL_SUBTEST( run_and_compare_to_gpu(matrix_inverse<Matrix3f>(), nthreads, in, out) );\n  CALL_SUBTEST( run_and_compare_to_gpu(matrix_inverse<Matrix4f>(), nthreads, in, out) );\n  \n  CALL_SUBTEST( run_and_compare_to_gpu(eigenvalues_direct<Matrix3f>(), nthreads, in, out) );\n  CALL_SUBTEST( run_and_compare_to_gpu(eigenvalues_direct<Matrix2f>(), nthreads, in, out) );\n\n#if defined(__NVCC__)\n  // FIXME\n  // These subtests compiles only with nvcc and fail with HIPCC and clang-cuda\n  CALL_SUBTEST( run_and_compare_to_gpu(eigenvalues<Matrix4f>(), nthreads, in, out) );\n  typedef Matrix<float,6,6> Matrix6f;\n  CALL_SUBTEST( run_and_compare_to_gpu(eigenvalues<Matrix6f>(), nthreads, in, out) );\n#endif\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/gpu_common.h",
    "content": "#ifndef EIGEN_TEST_GPU_COMMON_H\n#define EIGEN_TEST_GPU_COMMON_H\n\n#ifdef EIGEN_USE_HIP\n  #include <hip/hip_runtime.h>\n  #include <hip/hip_runtime_api.h>\n#else\n  #include <cuda.h>\n  #include <cuda_runtime.h>\n  #include <cuda_runtime_api.h>\n#endif\n\n#include <iostream>\n\n#define EIGEN_USE_GPU\n#include <unsupported/Eigen/CXX11/src/Tensor/TensorGpuHipCudaDefines.h>\n\n#if !defined(__CUDACC__) && !defined(__HIPCC__)\ndim3 threadIdx, blockDim, blockIdx;\n#endif\n\ntemplate<typename Kernel, typename Input, typename Output>\nvoid run_on_cpu(const Kernel& ker, int n, const Input& in, Output& out)\n{\n  for(int i=0; i<n; i++)\n    ker(i, in.data(), out.data());\n}\n\n\ntemplate<typename Kernel, typename Input, typename Output>\n__global__\nvoid run_on_gpu_meta_kernel(const Kernel ker, int n, const Input* in, Output* out)\n{\n  int i = threadIdx.x + blockIdx.x*blockDim.x;\n  if(i<n) {\n    ker(i, in, out);\n  }\n}\n\n\ntemplate<typename Kernel, typename Input, typename Output>\nvoid run_on_gpu(const Kernel& ker, int n, const Input& in, Output& out)\n{\n  typename Input::Scalar*  d_in;\n  typename Output::Scalar* d_out;\n  std::ptrdiff_t in_bytes  = in.size()  * sizeof(typename Input::Scalar);\n  std::ptrdiff_t out_bytes = out.size() * sizeof(typename Output::Scalar);\n  \n  gpuMalloc((void**)(&d_in),  in_bytes);\n  gpuMalloc((void**)(&d_out), out_bytes);\n  \n  gpuMemcpy(d_in,  in.data(),  in_bytes,  gpuMemcpyHostToDevice);\n  gpuMemcpy(d_out, out.data(), out_bytes, gpuMemcpyHostToDevice);\n  \n  // Simple and non-optimal 1D mapping assuming n is not too large\n  // That's only for unit testing!\n  dim3 Blocks(128);\n  dim3 Grids( (n+int(Blocks.x)-1)/int(Blocks.x) );\n\n  gpuDeviceSynchronize();\n  \n#ifdef EIGEN_USE_HIP\n  hipLaunchKernelGGL(HIP_KERNEL_NAME(run_on_gpu_meta_kernel<Kernel,\n\t\t\t\t     typename std::decay<decltype(*d_in)>::type,\n\t\t\t\t     typename std::decay<decltype(*d_out)>::type>), \n\t\t     dim3(Grids), dim3(Blocks), 0, 0, ker, n, d_in, d_out);\n#else\n  run_on_gpu_meta_kernel<<<Grids,Blocks>>>(ker, n, d_in, d_out);\n#endif\n  \n  gpuDeviceSynchronize();\n  \n  // check inputs have not been modified\n  gpuMemcpy(const_cast<typename Input::Scalar*>(in.data()),  d_in,  in_bytes,  gpuMemcpyDeviceToHost);\n  gpuMemcpy(out.data(), d_out, out_bytes, gpuMemcpyDeviceToHost);\n  \n  gpuFree(d_in);\n  gpuFree(d_out);\n}\n\n\ntemplate<typename Kernel, typename Input, typename Output>\nvoid run_and_compare_to_gpu(const Kernel& ker, int n, const Input& in, Output& out)\n{\n  Input  in_ref,  in_gpu;\n  Output out_ref, out_gpu;\n  #if !defined(__CUDA_ARCH__) && !defined(__HIP_DEVICE_COMPILE__)\n  in_ref = in_gpu = in;\n  out_ref = out_gpu = out;\n  #else\n  EIGEN_UNUSED_VARIABLE(in);\n  EIGEN_UNUSED_VARIABLE(out);\n  #endif\n  run_on_cpu (ker, n, in_ref,  out_ref);\n  run_on_gpu(ker, n, in_gpu, out_gpu);\n  #if !defined(__CUDA_ARCH__) && !defined(__HIP_DEVICE_COMPILE__)\n  VERIFY_IS_APPROX(in_ref, in_gpu);\n  VERIFY_IS_APPROX(out_ref, out_gpu);\n  #endif\n}\n\nstruct compile_time_device_info {\n  EIGEN_DEVICE_FUNC\n  void operator()(int /*i*/, const int* /*in*/, int* info) const\n  {\n    #if defined(__CUDA_ARCH__)\n    info[0] = int(__CUDA_ARCH__ +0);\n    #endif\n    #if defined(EIGEN_HIP_DEVICE_COMPILE)\n    info[1] = int(EIGEN_HIP_DEVICE_COMPILE +0);\n    #endif\n  }\n};\n\nvoid ei_test_init_gpu()\n{\n  int device = 0;\n  gpuDeviceProp_t deviceProp;\n  gpuGetDeviceProperties(&deviceProp, device);\n\n  ArrayXi dummy(1), info(10);\n  info = -1;\n  run_on_gpu(compile_time_device_info(),10,dummy,info);\n\n\n  std::cout << \"GPU compile-time info:\\n\";\n  \n  #ifdef EIGEN_CUDACC\n  std::cout << \"  EIGEN_CUDACC:                 \" << int(EIGEN_CUDACC) << \"\\n\";\n  #endif\n  \n  #ifdef EIGEN_CUDA_SDK_VER\n  std::cout << \"  EIGEN_CUDA_SDK_VER:             \" << int(EIGEN_CUDA_SDK_VER) << \"\\n\";\n  #endif\n\n  #ifdef EIGEN_COMP_NVCC\n  std::cout << \"  EIGEN_COMP_NVCC:             \" << int(EIGEN_COMP_NVCC) << \"\\n\";\n  #endif\n  \n  #ifdef EIGEN_HIPCC\n  std::cout << \"  EIGEN_HIPCC:                 \" << int(EIGEN_HIPCC) << \"\\n\";\n  #endif\n\n  std::cout << \"  EIGEN_CUDA_ARCH:             \" << info[0] << \"\\n\";  \n  std::cout << \"  EIGEN_HIP_DEVICE_COMPILE:    \" << info[1] << \"\\n\";\n\n  std::cout << \"GPU device info:\\n\";\n  std::cout << \"  name:                        \" << deviceProp.name << \"\\n\";\n  std::cout << \"  capability:                  \" << deviceProp.major << \".\" << deviceProp.minor << \"\\n\";\n  std::cout << \"  multiProcessorCount:         \" << deviceProp.multiProcessorCount << \"\\n\";\n  std::cout << \"  maxThreadsPerMultiProcessor: \" << deviceProp.maxThreadsPerMultiProcessor << \"\\n\";\n  std::cout << \"  warpSize:                    \" << deviceProp.warpSize << \"\\n\";\n  std::cout << \"  regsPerBlock:                \" << deviceProp.regsPerBlock << \"\\n\";\n  std::cout << \"  concurrentKernels:           \" << deviceProp.concurrentKernels << \"\\n\";\n  std::cout << \"  clockRate:                   \" << deviceProp.clockRate << \"\\n\";\n  std::cout << \"  canMapHostMemory:            \" << deviceProp.canMapHostMemory << \"\\n\";\n  std::cout << \"  computeMode:                 \" << deviceProp.computeMode << \"\\n\";\n}\n\n#endif // EIGEN_TEST_GPU_COMMON_H\n"
  },
  {
    "path": "3rdparty/eigen3/test/half_float.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include <sstream>\n\n#include \"main.h\"\n\n#include <Eigen/src/Core/arch/Default/Half.h>\n\n// Make sure it's possible to forward declare Eigen::half\nnamespace Eigen {\nstruct half;\n}\n\nusing Eigen::half;\n\nvoid test_conversion()\n{\n  using Eigen::half_impl::__half_raw;\n\n  // Conversion from float.\n  VERIFY_IS_EQUAL(half(1.0f).x, 0x3c00);\n  VERIFY_IS_EQUAL(half(0.5f).x, 0x3800);\n  VERIFY_IS_EQUAL(half(0.33333f).x, 0x3555);\n  VERIFY_IS_EQUAL(half(0.0f).x, 0x0000);\n  VERIFY_IS_EQUAL(half(-0.0f).x, 0x8000);\n  VERIFY_IS_EQUAL(half(65504.0f).x, 0x7bff);\n  VERIFY_IS_EQUAL(half(65536.0f).x, 0x7c00);  // Becomes infinity.\n\n  // Denormals.\n  VERIFY_IS_EQUAL(half(-5.96046e-08f).x, 0x8001);\n  VERIFY_IS_EQUAL(half(5.96046e-08f).x, 0x0001);\n  VERIFY_IS_EQUAL(half(1.19209e-07f).x, 0x0002);\n\n  // Verify round-to-nearest-even behavior.\n  float val1 = float(half(__half_raw(0x3c00)));\n  float val2 = float(half(__half_raw(0x3c01)));\n  float val3 = float(half(__half_raw(0x3c02)));\n  VERIFY_IS_EQUAL(half(0.5f * (val1 + val2)).x, 0x3c00);\n  VERIFY_IS_EQUAL(half(0.5f * (val2 + val3)).x, 0x3c02);\n\n  // Conversion from int.\n  VERIFY_IS_EQUAL(half(-1).x, 0xbc00);\n  VERIFY_IS_EQUAL(half(0).x, 0x0000);\n  VERIFY_IS_EQUAL(half(1).x, 0x3c00);\n  VERIFY_IS_EQUAL(half(2).x, 0x4000);\n  VERIFY_IS_EQUAL(half(3).x, 0x4200);\n\n  // Conversion from bool.\n  VERIFY_IS_EQUAL(half(false).x, 0x0000);\n  VERIFY_IS_EQUAL(half(true).x, 0x3c00);\n\n  // Conversion to float.\n  VERIFY_IS_EQUAL(float(half(__half_raw(0x0000))), 0.0f);\n  VERIFY_IS_EQUAL(float(half(__half_raw(0x3c00))), 1.0f);\n\n  // Denormals.\n  VERIFY_IS_APPROX(float(half(__half_raw(0x8001))), -5.96046e-08f);\n  VERIFY_IS_APPROX(float(half(__half_raw(0x0001))), 5.96046e-08f);\n  VERIFY_IS_APPROX(float(half(__half_raw(0x0002))), 1.19209e-07f);\n\n  // NaNs and infinities.\n  VERIFY(!(numext::isinf)(float(half(65504.0f))));  // Largest finite number.\n  VERIFY(!(numext::isnan)(float(half(0.0f))));\n  VERIFY((numext::isinf)(float(half(__half_raw(0xfc00)))));\n  VERIFY((numext::isnan)(float(half(__half_raw(0xfc01)))));\n  VERIFY((numext::isinf)(float(half(__half_raw(0x7c00)))));\n  VERIFY((numext::isnan)(float(half(__half_raw(0x7c01)))));\n\n#if !EIGEN_COMP_MSVC\n  // Visual Studio errors out on divisions by 0\n  VERIFY((numext::isnan)(float(half(0.0 / 0.0))));\n  VERIFY((numext::isinf)(float(half(1.0 / 0.0))));\n  VERIFY((numext::isinf)(float(half(-1.0 / 0.0))));\n#endif\n\n  // Exactly same checks as above, just directly on the half representation.\n  VERIFY(!(numext::isinf)(half(__half_raw(0x7bff))));\n  VERIFY(!(numext::isnan)(half(__half_raw(0x0000))));\n  VERIFY((numext::isinf)(half(__half_raw(0xfc00))));\n  VERIFY((numext::isnan)(half(__half_raw(0xfc01))));\n  VERIFY((numext::isinf)(half(__half_raw(0x7c00))));\n  VERIFY((numext::isnan)(half(__half_raw(0x7c01))));\n\n#if !EIGEN_COMP_MSVC\n  // Visual Studio errors out on divisions by 0\n  VERIFY((numext::isnan)(half(0.0 / 0.0)));\n  VERIFY((numext::isinf)(half(1.0 / 0.0)));\n  VERIFY((numext::isinf)(half(-1.0 / 0.0)));\n#endif\n}\n\nvoid test_numtraits()\n{\n  std::cout << \"epsilon       = \" << NumTraits<half>::epsilon() << \"  (0x\" << std::hex << NumTraits<half>::epsilon().x << \")\" << std::endl;\n  std::cout << \"highest       = \" << NumTraits<half>::highest() << \"  (0x\" << std::hex << NumTraits<half>::highest().x << \")\" << std::endl;\n  std::cout << \"lowest        = \" << NumTraits<half>::lowest() << \"  (0x\" << std::hex << NumTraits<half>::lowest().x << \")\" << std::endl;\n  std::cout << \"min           = \" << (std::numeric_limits<half>::min)() << \"  (0x\" << std::hex << half((std::numeric_limits<half>::min)()).x << \")\" << std::endl;\n  std::cout << \"denorm min    = \" << (std::numeric_limits<half>::denorm_min)() << \"  (0x\" << std::hex << half((std::numeric_limits<half>::denorm_min)()).x << \")\" << std::endl;\n  std::cout << \"infinity      = \" << NumTraits<half>::infinity() << \"  (0x\" << std::hex << NumTraits<half>::infinity().x << \")\" << std::endl;\n  std::cout << \"quiet nan     = \" << NumTraits<half>::quiet_NaN() << \"  (0x\" << std::hex << NumTraits<half>::quiet_NaN().x << \")\" << std::endl;\n  std::cout << \"signaling nan = \" << std::numeric_limits<half>::signaling_NaN() << \"  (0x\" << std::hex << std::numeric_limits<half>::signaling_NaN().x << \")\" << std::endl;\n\n  VERIFY(NumTraits<half>::IsSigned);\n\n  VERIFY_IS_EQUAL( std::numeric_limits<half>::infinity().x, half(std::numeric_limits<float>::infinity()).x );\n  VERIFY_IS_EQUAL( std::numeric_limits<half>::quiet_NaN().x, half(std::numeric_limits<float>::quiet_NaN()).x );\n  VERIFY_IS_EQUAL( std::numeric_limits<half>::signaling_NaN().x, half(std::numeric_limits<float>::signaling_NaN()).x );\n  VERIFY( (std::numeric_limits<half>::min)() > half(0.f) );\n  VERIFY( (std::numeric_limits<half>::denorm_min)() > half(0.f) );\n  VERIFY( (std::numeric_limits<half>::min)()/half(2) > half(0.f) );\n  VERIFY_IS_EQUAL( (std::numeric_limits<half>::denorm_min)()/half(2), half(0.f) );\n}\n\nvoid test_arithmetic()\n{\n  VERIFY_IS_EQUAL(float(half(2) + half(2)), 4);\n  VERIFY_IS_EQUAL(float(half(2) + half(-2)), 0);\n  VERIFY_IS_APPROX(float(half(0.33333f) + half(0.66667f)), 1.0f);\n  VERIFY_IS_EQUAL(float(half(2.0f) * half(-5.5f)), -11.0f);\n  VERIFY_IS_APPROX(float(half(1.0f) / half(3.0f)), 0.33333f);\n  VERIFY_IS_EQUAL(float(-half(4096.0f)), -4096.0f);\n  VERIFY_IS_EQUAL(float(-half(-4096.0f)), 4096.0f);\n}\n\nvoid test_comparison()\n{\n  VERIFY(half(1.0f) > half(0.5f));\n  VERIFY(half(0.5f) < half(1.0f));\n  VERIFY(!(half(1.0f) < half(0.5f)));\n  VERIFY(!(half(0.5f) > half(1.0f)));\n\n  VERIFY(!(half(4.0f) > half(4.0f)));\n  VERIFY(!(half(4.0f) < half(4.0f)));\n\n  VERIFY(!(half(0.0f) < half(-0.0f)));\n  VERIFY(!(half(-0.0f) < half(0.0f)));\n  VERIFY(!(half(0.0f) > half(-0.0f)));\n  VERIFY(!(half(-0.0f) > half(0.0f)));\n\n  VERIFY(half(0.2f) > half(-1.0f));\n  VERIFY(half(-1.0f) < half(0.2f));\n  VERIFY(half(-16.0f) < half(-15.0f));\n\n  VERIFY(half(1.0f) == half(1.0f));\n  VERIFY(half(1.0f) != half(2.0f));\n\n  // Comparisons with NaNs and infinities.\n#if !EIGEN_COMP_MSVC\n  // Visual Studio errors out on divisions by 0\n  VERIFY(!(half(0.0 / 0.0) == half(0.0 / 0.0)));\n  VERIFY(half(0.0 / 0.0) != half(0.0 / 0.0));\n\n  VERIFY(!(half(1.0) == half(0.0 / 0.0)));\n  VERIFY(!(half(1.0) < half(0.0 / 0.0)));\n  VERIFY(!(half(1.0) > half(0.0 / 0.0)));\n  VERIFY(half(1.0) != half(0.0 / 0.0));\n\n  VERIFY(half(1.0) < half(1.0 / 0.0));\n  VERIFY(half(1.0) > half(-1.0 / 0.0));\n#endif\n}\n\nvoid test_basic_functions()\n{\n  VERIFY_IS_EQUAL(float(numext::abs(half(3.5f))), 3.5f);\n  VERIFY_IS_EQUAL(float(abs(half(3.5f))), 3.5f);\n  VERIFY_IS_EQUAL(float(numext::abs(half(-3.5f))), 3.5f);\n  VERIFY_IS_EQUAL(float(abs(half(-3.5f))), 3.5f);\n\n  VERIFY_IS_EQUAL(float(numext::floor(half(3.5f))), 3.0f);\n  VERIFY_IS_EQUAL(float(floor(half(3.5f))), 3.0f);\n  VERIFY_IS_EQUAL(float(numext::floor(half(-3.5f))), -4.0f);\n  VERIFY_IS_EQUAL(float(floor(half(-3.5f))), -4.0f);\n\n  VERIFY_IS_EQUAL(float(numext::ceil(half(3.5f))), 4.0f);\n  VERIFY_IS_EQUAL(float(ceil(half(3.5f))), 4.0f);\n  VERIFY_IS_EQUAL(float(numext::ceil(half(-3.5f))), -3.0f);\n  VERIFY_IS_EQUAL(float(ceil(half(-3.5f))), -3.0f);\n\n  VERIFY_IS_APPROX(float(numext::sqrt(half(0.0f))), 0.0f);\n  VERIFY_IS_APPROX(float(sqrt(half(0.0f))), 0.0f);\n  VERIFY_IS_APPROX(float(numext::sqrt(half(4.0f))), 2.0f);\n  VERIFY_IS_APPROX(float(sqrt(half(4.0f))), 2.0f);\n\n  VERIFY_IS_APPROX(float(numext::pow(half(0.0f), half(1.0f))), 0.0f);\n  VERIFY_IS_APPROX(float(pow(half(0.0f), half(1.0f))), 0.0f);\n  VERIFY_IS_APPROX(float(numext::pow(half(2.0f), half(2.0f))), 4.0f);\n  VERIFY_IS_APPROX(float(pow(half(2.0f), half(2.0f))), 4.0f);\n\n  VERIFY_IS_EQUAL(float(numext::exp(half(0.0f))), 1.0f);\n  VERIFY_IS_EQUAL(float(exp(half(0.0f))), 1.0f);\n  VERIFY_IS_APPROX(float(numext::exp(half(EIGEN_PI))), 20.f + float(EIGEN_PI));\n  VERIFY_IS_APPROX(float(exp(half(EIGEN_PI))), 20.f + float(EIGEN_PI));\n\n  VERIFY_IS_EQUAL(float(numext::expm1(half(0.0f))), 0.0f);\n  VERIFY_IS_EQUAL(float(expm1(half(0.0f))), 0.0f);\n  VERIFY_IS_APPROX(float(numext::expm1(half(2.0f))), 6.3890561f);\n  VERIFY_IS_APPROX(float(expm1(half(2.0f))), 6.3890561f);\n\n  VERIFY_IS_EQUAL(float(numext::log(half(1.0f))), 0.0f);\n  VERIFY_IS_EQUAL(float(log(half(1.0f))), 0.0f);\n  VERIFY_IS_APPROX(float(numext::log(half(10.0f))), 2.30273f);\n  VERIFY_IS_APPROX(float(log(half(10.0f))), 2.30273f);\n\n  VERIFY_IS_EQUAL(float(numext::log1p(half(0.0f))), 0.0f);\n  VERIFY_IS_EQUAL(float(log1p(half(0.0f))), 0.0f);\n  VERIFY_IS_APPROX(float(numext::log1p(half(10.0f))), 2.3978953f);\n  VERIFY_IS_APPROX(float(log1p(half(10.0f))), 2.3978953f);\n}\n\nvoid test_trigonometric_functions()\n{\n  VERIFY_IS_APPROX(numext::cos(half(0.0f)), half(cosf(0.0f)));\n  VERIFY_IS_APPROX(cos(half(0.0f)), half(cosf(0.0f)));\n  VERIFY_IS_APPROX(numext::cos(half(EIGEN_PI)), half(cosf(EIGEN_PI)));\n  //VERIFY_IS_APPROX(numext::cos(half(EIGEN_PI/2)), half(cosf(EIGEN_PI/2)));\n  //VERIFY_IS_APPROX(numext::cos(half(3*EIGEN_PI/2)), half(cosf(3*EIGEN_PI/2)));\n  VERIFY_IS_APPROX(numext::cos(half(3.5f)), half(cosf(3.5f)));\n\n  VERIFY_IS_APPROX(numext::sin(half(0.0f)), half(sinf(0.0f)));\n  VERIFY_IS_APPROX(sin(half(0.0f)), half(sinf(0.0f)));\n  //  VERIFY_IS_APPROX(numext::sin(half(EIGEN_PI)), half(sinf(EIGEN_PI)));\n  VERIFY_IS_APPROX(numext::sin(half(EIGEN_PI/2)), half(sinf(EIGEN_PI/2)));\n  VERIFY_IS_APPROX(numext::sin(half(3*EIGEN_PI/2)), half(sinf(3*EIGEN_PI/2)));\n  VERIFY_IS_APPROX(numext::sin(half(3.5f)), half(sinf(3.5f)));\n\n  VERIFY_IS_APPROX(numext::tan(half(0.0f)), half(tanf(0.0f)));\n  VERIFY_IS_APPROX(tan(half(0.0f)), half(tanf(0.0f)));\n  //  VERIFY_IS_APPROX(numext::tan(half(EIGEN_PI)), half(tanf(EIGEN_PI)));\n  //  VERIFY_IS_APPROX(numext::tan(half(EIGEN_PI/2)), half(tanf(EIGEN_PI/2)));\n  //VERIFY_IS_APPROX(numext::tan(half(3*EIGEN_PI/2)), half(tanf(3*EIGEN_PI/2)));\n  VERIFY_IS_APPROX(numext::tan(half(3.5f)), half(tanf(3.5f)));\n}\n\nvoid test_array()\n{\n  typedef Array<half,1,Dynamic> ArrayXh;\n  Index size = internal::random<Index>(1,10);\n  Index i = internal::random<Index>(0,size-1);\n  ArrayXh a1 = ArrayXh::Random(size), a2 = ArrayXh::Random(size);\n  VERIFY_IS_APPROX( a1+a1, half(2)*a1 );\n  VERIFY( (a1.abs() >= half(0)).all() );\n  VERIFY_IS_APPROX( (a1*a1).sqrt(), a1.abs() );\n\n  VERIFY( ((a1.min)(a2) <= (a1.max)(a2)).all() );\n  a1(i) = half(-10.);\n  VERIFY_IS_EQUAL( a1.minCoeff(), half(-10.) );\n  a1(i) = half(10.);\n  VERIFY_IS_EQUAL( a1.maxCoeff(), half(10.) );\n\n  std::stringstream ss;\n  ss << a1;\n}\n\nvoid test_product()\n{\n  typedef Matrix<half,Dynamic,Dynamic> MatrixXh;\n  Index rows  = internal::random<Index>(1,EIGEN_TEST_MAX_SIZE);\n  Index cols  = internal::random<Index>(1,EIGEN_TEST_MAX_SIZE);\n  Index depth = internal::random<Index>(1,EIGEN_TEST_MAX_SIZE);\n  MatrixXh Ah = MatrixXh::Random(rows,depth);\n  MatrixXh Bh = MatrixXh::Random(depth,cols);\n  MatrixXh Ch = MatrixXh::Random(rows,cols);\n  MatrixXf Af = Ah.cast<float>();\n  MatrixXf Bf = Bh.cast<float>();\n  MatrixXf Cf = Ch.cast<float>();\n  VERIFY_IS_APPROX(Ch.noalias()+=Ah*Bh, (Cf.noalias()+=Af*Bf).cast<half>());\n}\n\nEIGEN_DECLARE_TEST(half_float)\n{\n  CALL_SUBTEST(test_numtraits());\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST(test_conversion());\n    CALL_SUBTEST(test_arithmetic());\n    CALL_SUBTEST(test_comparison());\n    CALL_SUBTEST(test_basic_functions());\n    CALL_SUBTEST(test_trigonometric_functions());\n    CALL_SUBTEST(test_array());\n    CALL_SUBTEST(test_product());\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/hessenberg.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2010 Jitse Niesen <jitse@maths.leeds.ac.uk>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <Eigen/Eigenvalues>\n\ntemplate<typename Scalar,int Size> void hessenberg(int size = Size)\n{\n  typedef Matrix<Scalar,Size,Size> MatrixType;\n\n  // Test basic functionality: A = U H U* and H is Hessenberg\n  for(int counter = 0; counter < g_repeat; ++counter) {\n    MatrixType m = MatrixType::Random(size,size);\n    HessenbergDecomposition<MatrixType> hess(m);\n    MatrixType Q = hess.matrixQ();\n    MatrixType H = hess.matrixH();\n    VERIFY_IS_APPROX(m, Q * H * Q.adjoint());\n    for(int row = 2; row < size; ++row) {\n      for(int col = 0; col < row-1; ++col) {\n\tVERIFY(H(row,col) == (typename MatrixType::Scalar)0);\n      }\n    }\n  }\n\n  // Test whether compute() and constructor returns same result\n  MatrixType A = MatrixType::Random(size, size);\n  HessenbergDecomposition<MatrixType> cs1;\n  cs1.compute(A);\n  HessenbergDecomposition<MatrixType> cs2(A);\n  VERIFY_IS_EQUAL(cs1.matrixH().eval(), cs2.matrixH().eval());\n  MatrixType cs1Q = cs1.matrixQ();\n  MatrixType cs2Q = cs2.matrixQ();  \n  VERIFY_IS_EQUAL(cs1Q, cs2Q);\n\n  // Test assertions for when used uninitialized\n  HessenbergDecomposition<MatrixType> hessUninitialized;\n  VERIFY_RAISES_ASSERT( hessUninitialized.matrixH() );\n  VERIFY_RAISES_ASSERT( hessUninitialized.matrixQ() );\n  VERIFY_RAISES_ASSERT( hessUninitialized.householderCoefficients() );\n  VERIFY_RAISES_ASSERT( hessUninitialized.packedMatrix() );\n\n  // TODO: Add tests for packedMatrix() and householderCoefficients()\n}\n\nEIGEN_DECLARE_TEST(hessenberg)\n{\n  CALL_SUBTEST_1(( hessenberg<std::complex<double>,1>() ));\n  CALL_SUBTEST_2(( hessenberg<std::complex<double>,2>() ));\n  CALL_SUBTEST_3(( hessenberg<std::complex<float>,4>() ));\n  CALL_SUBTEST_4(( hessenberg<float,Dynamic>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE)) ));\n  CALL_SUBTEST_5(( hessenberg<std::complex<double>,Dynamic>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE)) ));\n\n  // Test problem size constructors\n  CALL_SUBTEST_6(HessenbergDecomposition<MatrixXf>(10));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/householder.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009-2010 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <Eigen/QR>\n\ntemplate<typename MatrixType> void householder(const MatrixType& m)\n{\n  static bool even = true;\n  even = !even;\n  /* this test covers the following files:\n     Householder.h\n  */\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;\n  typedef Matrix<Scalar, internal::decrement_size<MatrixType::RowsAtCompileTime>::ret, 1> EssentialVectorType;\n  typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime> SquareMatrixType;\n  typedef Matrix<Scalar, Dynamic, MatrixType::ColsAtCompileTime> HBlockMatrixType;\n  typedef Matrix<Scalar, Dynamic, 1> HCoeffsVectorType;\n\n  typedef Matrix<Scalar, MatrixType::ColsAtCompileTime, MatrixType::RowsAtCompileTime> TMatrixType;\n  \n  Matrix<Scalar, EIGEN_SIZE_MAX(MatrixType::RowsAtCompileTime,MatrixType::ColsAtCompileTime), 1> _tmp((std::max)(rows,cols));\n  Scalar* tmp = &_tmp.coeffRef(0,0);\n\n  Scalar beta;\n  RealScalar alpha;\n  EssentialVectorType essential;\n\n  VectorType v1 = VectorType::Random(rows), v2;\n  v2 = v1;\n  v1.makeHouseholder(essential, beta, alpha);\n  v1.applyHouseholderOnTheLeft(essential,beta,tmp);\n  VERIFY_IS_APPROX(v1.norm(), v2.norm());\n  if(rows>=2) VERIFY_IS_MUCH_SMALLER_THAN(v1.tail(rows-1).norm(), v1.norm());\n  v1 = VectorType::Random(rows);\n  v2 = v1;\n  v1.applyHouseholderOnTheLeft(essential,beta,tmp);\n  VERIFY_IS_APPROX(v1.norm(), v2.norm());\n\n  // reconstruct householder matrix:\n  SquareMatrixType id, H1, H2;\n  id.setIdentity(rows, rows);\n  H1 = H2 = id;\n  VectorType vv(rows);\n  vv << Scalar(1), essential;\n  H1.applyHouseholderOnTheLeft(essential, beta, tmp);\n  H2.applyHouseholderOnTheRight(essential, beta, tmp);\n  VERIFY_IS_APPROX(H1, H2);\n  VERIFY_IS_APPROX(H1, id - beta * vv*vv.adjoint());\n\n  MatrixType m1(rows, cols),\n             m2(rows, cols);\n\n  v1 = VectorType::Random(rows);\n  if(even) v1.tail(rows-1).setZero();\n  m1.colwise() = v1;\n  m2 = m1;\n  m1.col(0).makeHouseholder(essential, beta, alpha);\n  m1.applyHouseholderOnTheLeft(essential,beta,tmp);\n  VERIFY_IS_APPROX(m1.norm(), m2.norm());\n  if(rows>=2) VERIFY_IS_MUCH_SMALLER_THAN(m1.block(1,0,rows-1,cols).norm(), m1.norm());\n  VERIFY_IS_MUCH_SMALLER_THAN(numext::imag(m1(0,0)), numext::real(m1(0,0)));\n  VERIFY_IS_APPROX(numext::real(m1(0,0)), alpha);\n\n  v1 = VectorType::Random(rows);\n  if(even) v1.tail(rows-1).setZero();\n  SquareMatrixType m3(rows,rows), m4(rows,rows);\n  m3.rowwise() = v1.transpose();\n  m4 = m3;\n  m3.row(0).makeHouseholder(essential, beta, alpha);\n  m3.applyHouseholderOnTheRight(essential.conjugate(),beta,tmp);\n  VERIFY_IS_APPROX(m3.norm(), m4.norm());\n  if(rows>=2) VERIFY_IS_MUCH_SMALLER_THAN(m3.block(0,1,rows,rows-1).norm(), m3.norm());\n  VERIFY_IS_MUCH_SMALLER_THAN(numext::imag(m3(0,0)), numext::real(m3(0,0)));\n  VERIFY_IS_APPROX(numext::real(m3(0,0)), alpha);\n\n  // test householder sequence on the left with a shift\n\n  Index shift = internal::random<Index>(0, std::max<Index>(rows-2,0));\n  Index brows = rows - shift;\n  m1.setRandom(rows, cols);\n  HBlockMatrixType hbm = m1.block(shift,0,brows,cols);\n  HouseholderQR<HBlockMatrixType> qr(hbm);\n  m2 = m1;\n  m2.block(shift,0,brows,cols) = qr.matrixQR();\n  HCoeffsVectorType hc = qr.hCoeffs().conjugate();\n  HouseholderSequence<MatrixType, HCoeffsVectorType> hseq(m2, hc);\n  hseq.setLength(hc.size()).setShift(shift);\n  VERIFY(hseq.length() == hc.size());\n  VERIFY(hseq.shift() == shift);\n  \n  MatrixType m5 = m2;\n  m5.block(shift,0,brows,cols).template triangularView<StrictlyLower>().setZero();\n  VERIFY_IS_APPROX(hseq * m5, m1); // test applying hseq directly\n  m3 = hseq;\n  VERIFY_IS_APPROX(m3 * m5, m1); // test evaluating hseq to a dense matrix, then applying\n  \n  SquareMatrixType hseq_mat = hseq;\n  SquareMatrixType hseq_mat_conj = hseq.conjugate();\n  SquareMatrixType hseq_mat_adj = hseq.adjoint();\n  SquareMatrixType hseq_mat_trans = hseq.transpose();\n  SquareMatrixType m6 = SquareMatrixType::Random(rows, rows);\n  VERIFY_IS_APPROX(hseq_mat.adjoint(),    hseq_mat_adj);\n  VERIFY_IS_APPROX(hseq_mat.conjugate(),  hseq_mat_conj);\n  VERIFY_IS_APPROX(hseq_mat.transpose(),  hseq_mat_trans);\n  VERIFY_IS_APPROX(hseq * m6,             hseq_mat * m6);\n  VERIFY_IS_APPROX(hseq.adjoint() * m6,   hseq_mat_adj * m6);\n  VERIFY_IS_APPROX(hseq.conjugate() * m6, hseq_mat_conj * m6);\n  VERIFY_IS_APPROX(hseq.transpose() * m6, hseq_mat_trans * m6);\n  VERIFY_IS_APPROX(m6 * hseq,             m6 * hseq_mat);\n  VERIFY_IS_APPROX(m6 * hseq.adjoint(),   m6 * hseq_mat_adj);\n  VERIFY_IS_APPROX(m6 * hseq.conjugate(), m6 * hseq_mat_conj);\n  VERIFY_IS_APPROX(m6 * hseq.transpose(), m6 * hseq_mat_trans);\n\n  // test householder sequence on the right with a shift\n\n  TMatrixType tm2 = m2.transpose();\n  HouseholderSequence<TMatrixType, HCoeffsVectorType, OnTheRight> rhseq(tm2, hc);\n  rhseq.setLength(hc.size()).setShift(shift);\n  VERIFY_IS_APPROX(rhseq * m5, m1); // test applying rhseq directly\n  m3 = rhseq;\n  VERIFY_IS_APPROX(m3 * m5, m1); // test evaluating rhseq to a dense matrix, then applying\n}\n\nEIGEN_DECLARE_TEST(householder)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( householder(Matrix<double,2,2>()) );\n    CALL_SUBTEST_2( householder(Matrix<float,2,3>()) );\n    CALL_SUBTEST_3( householder(Matrix<double,3,5>()) );\n    CALL_SUBTEST_4( householder(Matrix<float,4,4>()) );\n    CALL_SUBTEST_5( householder(MatrixXd(internal::random<int>(1,EIGEN_TEST_MAX_SIZE),internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_6( householder(MatrixXcf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE),internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_7( householder(MatrixXf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE),internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_8( householder(Matrix<double,1,1>()) );\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/incomplete_cholesky.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015-2016 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n// #define EIGEN_DONT_VECTORIZE\n// #define EIGEN_MAX_ALIGN_BYTES 0\n#include \"sparse_solver.h\"\n#include <Eigen/IterativeLinearSolvers>\n#include <unsupported/Eigen/IterativeSolvers>\n\ntemplate<typename T, typename I_> void test_incomplete_cholesky_T()\n{\n  typedef SparseMatrix<T,0,I_> SparseMatrixType;\n  ConjugateGradient<SparseMatrixType, Lower, IncompleteCholesky<T, Lower, AMDOrdering<I_> > >        cg_illt_lower_amd;\n  ConjugateGradient<SparseMatrixType, Lower, IncompleteCholesky<T, Lower, NaturalOrdering<I_> > >    cg_illt_lower_nat;\n  ConjugateGradient<SparseMatrixType, Upper, IncompleteCholesky<T, Upper, AMDOrdering<I_> > >        cg_illt_upper_amd;\n  ConjugateGradient<SparseMatrixType, Upper, IncompleteCholesky<T, Upper, NaturalOrdering<I_> > >    cg_illt_upper_nat;\n  ConjugateGradient<SparseMatrixType, Upper|Lower, IncompleteCholesky<T, Lower, AMDOrdering<I_> > >  cg_illt_uplo_amd;\n  \n\n  CALL_SUBTEST( check_sparse_spd_solving(cg_illt_lower_amd) );\n  CALL_SUBTEST( check_sparse_spd_solving(cg_illt_lower_nat) );\n  CALL_SUBTEST( check_sparse_spd_solving(cg_illt_upper_amd) );\n  CALL_SUBTEST( check_sparse_spd_solving(cg_illt_upper_nat) );\n  CALL_SUBTEST( check_sparse_spd_solving(cg_illt_uplo_amd) );\n}\n\ntemplate<int>\nvoid bug1150()\n{\n  // regression for bug 1150\n  for(int N = 1; N<20; ++N)\n  {\n    Eigen::MatrixXd b( N, N );\n    b.setOnes();\n\n    Eigen::SparseMatrix<double> m( N, N );\n    m.reserve(Eigen::VectorXi::Constant(N,4));\n    for( int i = 0; i < N; ++i )\n    {\n        m.insert( i, i ) = 1;\n        m.coeffRef( i, i / 2 ) = 2;\n        m.coeffRef( i, i / 3 ) = 2;\n        m.coeffRef( i, i / 4 ) = 2;\n    }\n\n    Eigen::SparseMatrix<double> A;\n    A = m * m.transpose();\n\n    Eigen::ConjugateGradient<Eigen::SparseMatrix<double>,\n        Eigen::Lower | Eigen::Upper,\n        Eigen::IncompleteCholesky<double> > solver( A );\n    VERIFY(solver.preconditioner().info() == Eigen::Success);\n    VERIFY(solver.info() == Eigen::Success);\n  }\n}\n\nEIGEN_DECLARE_TEST(incomplete_cholesky)\n{\n  CALL_SUBTEST_1(( test_incomplete_cholesky_T<double,int>() ));\n  CALL_SUBTEST_2(( test_incomplete_cholesky_T<std::complex<double>, int>() ));\n  CALL_SUBTEST_3(( test_incomplete_cholesky_T<double,long int>() ));\n\n  CALL_SUBTEST_1(( bug1150<0>() ));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/indexed_view.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2017 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifdef EIGEN_TEST_PART_2\n// Make sure we also check c++11 max implementation\n#define EIGEN_MAX_CPP_VER 11\n#endif\n\n#ifdef EIGEN_TEST_PART_3\n// Make sure we also check c++98 max implementation\n#define EIGEN_MAX_CPP_VER 03\n\n// We need to disable this warning when compiling with c++11 while limiting Eigen to c++98\n// Ideally we would rather configure the compiler to build in c++98 mode but this needs\n// to be done at the CMakeLists.txt level.\n#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))\n  #pragma GCC diagnostic ignored \"-Wdeprecated\"\n#endif\n\n#if defined(__GNUC__) && (__GNUC__ >=9)\n  #pragma GCC diagnostic ignored \"-Wdeprecated-copy\"\n#endif\n\n#endif\n\n#include <valarray>\n#include <vector>\n#include \"main.h\"\n\n#if EIGEN_HAS_CXX11\n#include <array>\n#endif\n\ntypedef std::pair<Index,Index> IndexPair;\n\nint encode(Index i, Index j) {\n  return int(i*100 + j);\n}\n\nIndexPair decode(Index ij) {\n  return IndexPair(ij / 100, ij % 100);\n}\n\ntemplate<typename T>\nbool match(const T& xpr, std::string ref, std::string str_xpr = \"\") {\n  EIGEN_UNUSED_VARIABLE(str_xpr);\n  std::stringstream str;\n  str << xpr;\n  if(!(str.str() == ref))\n    std::cout << str_xpr << \"\\n\" << xpr << \"\\n\\n\";\n  return str.str() == ref;\n}\n\n#define MATCH(X,R) match(X, R, #X)\n\ntemplate<typename T1,typename T2>\ntypename internal::enable_if<internal::is_same<T1,T2>::value,bool>::type\nis_same_eq(const T1& a, const T2& b)\n{\n  return (a == b).all();\n}\n\ntemplate<typename T1,typename T2>\nbool is_same_seq(const T1& a, const T2& b)\n{\n  bool ok = a.first()==b.first() && a.size() == b.size() && Index(a.incrObject())==Index(b.incrObject());;\n  if(!ok)\n  {\n    std::cerr << \"seqN(\" << a.first() << \", \" << a.size() << \", \" << Index(a.incrObject()) << \") != \";\n    std::cerr << \"seqN(\" << b.first() << \", \" << b.size() << \", \" << Index(b.incrObject()) << \")\\n\";\n  }\n  return ok;\n}\n\ntemplate<typename T1,typename T2>\ntypename internal::enable_if<internal::is_same<T1,T2>::value,bool>::type\nis_same_seq_type(const T1& a, const T2& b)\n{\n  return is_same_seq(a,b);\n}\n\n\n\n#define VERIFY_EQ_INT(A,B) VERIFY_IS_APPROX(int(A),int(B))\n\n// C++03 does not allow local or unnamed enums as index\nenum DummyEnum { XX=0, YY=1 };\n\nvoid check_indexed_view()\n{\n  Index n = 10;\n\n  ArrayXd a = ArrayXd::LinSpaced(n,0,n-1);\n  Array<double,1,Dynamic> b = a.transpose();\n\n  #if EIGEN_COMP_CXXVER>=14\n  ArrayXXi A = ArrayXXi::NullaryExpr(n,n, std::ref(encode));\n  #else\n  ArrayXXi A = ArrayXXi::NullaryExpr(n,n, std::ptr_fun(&encode));\n  #endif\n\n  for(Index i=0; i<n; ++i)\n    for(Index j=0; j<n; ++j)\n      VERIFY( decode(A(i,j)) == IndexPair(i,j) );\n\n  Array4i eii(4); eii << 3, 1, 6, 5;\n  std::valarray<int> vali(4); Map<ArrayXi>(&vali[0],4) = eii;\n  std::vector<int> veci(4); Map<ArrayXi>(veci.data(),4) = eii;\n\n  VERIFY( MATCH( A(3, seq(9,3,-1)),\n    \"309  308  307  306  305  304  303\")\n  );\n\n  VERIFY( MATCH( A(seqN(2,5), seq(9,3,-1)),\n    \"209  208  207  206  205  204  203\\n\"\n    \"309  308  307  306  305  304  303\\n\"\n    \"409  408  407  406  405  404  403\\n\"\n    \"509  508  507  506  505  504  503\\n\"\n    \"609  608  607  606  605  604  603\")\n  );\n\n  VERIFY( MATCH( A(seqN(2,5), 5),\n    \"205\\n\"\n    \"305\\n\"\n    \"405\\n\"\n    \"505\\n\"\n    \"605\")\n  );\n\n  VERIFY( MATCH( A(seqN(last,5,-1), seq(2,last)),\n    \"902  903  904  905  906  907  908  909\\n\"\n    \"802  803  804  805  806  807  808  809\\n\"\n    \"702  703  704  705  706  707  708  709\\n\"\n    \"602  603  604  605  606  607  608  609\\n\"\n    \"502  503  504  505  506  507  508  509\")\n  );\n\n  VERIFY( MATCH( A(eii, veci),\n    \"303  301  306  305\\n\"\n    \"103  101  106  105\\n\"\n    \"603  601  606  605\\n\"\n    \"503  501  506  505\")\n  );\n\n  VERIFY( MATCH( A(eii, all),\n    \"300  301  302  303  304  305  306  307  308  309\\n\"\n    \"100  101  102  103  104  105  106  107  108  109\\n\"\n    \"600  601  602  603  604  605  606  607  608  609\\n\"\n    \"500  501  502  503  504  505  506  507  508  509\")\n  );\n\n  // take row number 3, and repeat it 5 times\n  VERIFY( MATCH( A(seqN(3,5,0), all),\n    \"300  301  302  303  304  305  306  307  308  309\\n\"\n    \"300  301  302  303  304  305  306  307  308  309\\n\"\n    \"300  301  302  303  304  305  306  307  308  309\\n\"\n    \"300  301  302  303  304  305  306  307  308  309\\n\"\n    \"300  301  302  303  304  305  306  307  308  309\")\n  );\n\n  VERIFY( MATCH( a(seqN(3,3),0), \"3\\n4\\n5\" ) );\n  VERIFY( MATCH( a(seq(3,5)), \"3\\n4\\n5\" ) );\n  VERIFY( MATCH( a(seqN(3,3,1)), \"3\\n4\\n5\" ) );\n  VERIFY( MATCH( a(seqN(5,3,-1)), \"5\\n4\\n3\" ) );\n\n  VERIFY( MATCH( b(0,seqN(3,3)), \"3  4  5\" ) );\n  VERIFY( MATCH( b(seq(3,5)), \"3  4  5\" ) );\n  VERIFY( MATCH( b(seqN(3,3,1)), \"3  4  5\" ) );\n  VERIFY( MATCH( b(seqN(5,3,-1)), \"5  4  3\" ) );\n\n  VERIFY( MATCH( b(all), \"0  1  2  3  4  5  6  7  8  9\" ) );\n  VERIFY( MATCH( b(eii), \"3  1  6  5\" ) );\n\n  Array44i B;\n  B.setRandom();\n  VERIFY( (A(seqN(2,5), 5)).ColsAtCompileTime == 1);\n  VERIFY( (A(seqN(2,5), 5)).RowsAtCompileTime == Dynamic);\n  VERIFY_EQ_INT( (A(seqN(2,5), 5)).InnerStrideAtCompileTime , A.InnerStrideAtCompileTime);\n  VERIFY_EQ_INT( (A(seqN(2,5), 5)).OuterStrideAtCompileTime , A.col(5).OuterStrideAtCompileTime);\n\n  VERIFY_EQ_INT( (A(5,seqN(2,5))).InnerStrideAtCompileTime , A.row(5).InnerStrideAtCompileTime);\n  VERIFY_EQ_INT( (A(5,seqN(2,5))).OuterStrideAtCompileTime , A.row(5).OuterStrideAtCompileTime);\n  VERIFY_EQ_INT( (B(1,seqN(1,2))).InnerStrideAtCompileTime , B.row(1).InnerStrideAtCompileTime);\n  VERIFY_EQ_INT( (B(1,seqN(1,2))).OuterStrideAtCompileTime , B.row(1).OuterStrideAtCompileTime);\n\n  VERIFY_EQ_INT( (A(seqN(2,5), seq(1,3))).InnerStrideAtCompileTime , A.InnerStrideAtCompileTime);\n  VERIFY_EQ_INT( (A(seqN(2,5), seq(1,3))).OuterStrideAtCompileTime , A.OuterStrideAtCompileTime);\n  VERIFY_EQ_INT( (B(seqN(1,2), seq(1,3))).InnerStrideAtCompileTime , B.InnerStrideAtCompileTime);\n  VERIFY_EQ_INT( (B(seqN(1,2), seq(1,3))).OuterStrideAtCompileTime , B.OuterStrideAtCompileTime);\n  VERIFY_EQ_INT( (A(seqN(2,5,2), seq(1,3,2))).InnerStrideAtCompileTime , Dynamic);\n  VERIFY_EQ_INT( (A(seqN(2,5,2), seq(1,3,2))).OuterStrideAtCompileTime , Dynamic);\n  VERIFY_EQ_INT( (A(seqN(2,5,fix<2>), seq(1,3,fix<3>))).InnerStrideAtCompileTime , 2);\n  VERIFY_EQ_INT( (A(seqN(2,5,fix<2>), seq(1,3,fix<3>))).OuterStrideAtCompileTime , Dynamic);\n  VERIFY_EQ_INT( (B(seqN(1,2,fix<2>), seq(1,3,fix<3>))).InnerStrideAtCompileTime , 2);\n  VERIFY_EQ_INT( (B(seqN(1,2,fix<2>), seq(1,3,fix<3>))).OuterStrideAtCompileTime , 3*4);\n\n  VERIFY_EQ_INT( (A(seqN(2,fix<5>), seqN(1,fix<3>))).RowsAtCompileTime, 5);\n  VERIFY_EQ_INT( (A(seqN(2,fix<5>), seqN(1,fix<3>))).ColsAtCompileTime, 3);\n  VERIFY_EQ_INT( (A(seqN(2,fix<5>(5)), seqN(1,fix<3>(3)))).RowsAtCompileTime, 5);\n  VERIFY_EQ_INT( (A(seqN(2,fix<5>(5)), seqN(1,fix<3>(3)))).ColsAtCompileTime, 3);\n  VERIFY_EQ_INT( (A(seqN(2,fix<Dynamic>(5)), seqN(1,fix<Dynamic>(3)))).RowsAtCompileTime, Dynamic);\n  VERIFY_EQ_INT( (A(seqN(2,fix<Dynamic>(5)), seqN(1,fix<Dynamic>(3)))).ColsAtCompileTime, Dynamic);\n  VERIFY_EQ_INT( (A(seqN(2,fix<Dynamic>(5)), seqN(1,fix<Dynamic>(3)))).rows(), 5);\n  VERIFY_EQ_INT( (A(seqN(2,fix<Dynamic>(5)), seqN(1,fix<Dynamic>(3)))).cols(), 3);\n\n  VERIFY( is_same_seq_type( seqN(2,5,fix<-1>), seqN(2,5,fix<-1>(-1)) ) );\n  VERIFY( is_same_seq_type( seqN(2,5), seqN(2,5,fix<1>(1)) ) );\n  VERIFY( is_same_seq_type( seqN(2,5,3), seqN(2,5,fix<DynamicIndex>(3)) ) );\n  VERIFY( is_same_seq_type( seq(2,7,fix<3>), seqN(2,2,fix<3>) ) );\n  VERIFY( is_same_seq_type( seqN(2,fix<Dynamic>(5),3), seqN(2,5,fix<DynamicIndex>(3)) ) );\n  VERIFY( is_same_seq_type( seqN(2,fix<5>(5),fix<-2>), seqN(2,fix<5>,fix<-2>()) ) );\n\n  VERIFY( is_same_seq_type( seq(2,fix<5>), seqN(2,4) ) );\n#if EIGEN_HAS_CXX11\n  VERIFY( is_same_seq_type( seq(fix<2>,fix<5>), seqN(fix<2>,fix<4>) ) );\n  VERIFY( is_same_seq( seqN(2,std::integral_constant<int,5>(),std::integral_constant<int,-2>()), seqN(2,fix<5>,fix<-2>()) ) );\n  VERIFY( is_same_seq( seq(std::integral_constant<int,1>(),std::integral_constant<int,5>(),std::integral_constant<int,2>()),\n                       seq(fix<1>,fix<5>,fix<2>()) ) );\n  VERIFY( is_same_seq_type( seqN(2,std::integral_constant<int,5>(),std::integral_constant<int,-2>()), seqN(2,fix<5>,fix<-2>()) ) );\n  VERIFY( is_same_seq_type( seq(std::integral_constant<int,1>(),std::integral_constant<int,5>(),std::integral_constant<int,2>()),\n                            seq(fix<1>,fix<5>,fix<2>()) ) );\n\n  VERIFY( is_same_seq_type( seqN(2,std::integral_constant<int,5>()), seqN(2,fix<5>) ) );\n  VERIFY( is_same_seq_type( seq(std::integral_constant<int,1>(),std::integral_constant<int,5>()), seq(fix<1>,fix<5>) ) );\n#else\n  // sorry, no compile-time size recovery in c++98/03\n  VERIFY( is_same_seq( seq(fix<2>,fix<5>), seqN(fix<2>,fix<4>) ) );\n#endif\n\n  VERIFY( (A(seqN(2,fix<5>), 5)).RowsAtCompileTime == 5);\n  VERIFY( (A(4, all)).ColsAtCompileTime == Dynamic);\n  VERIFY( (A(4, all)).RowsAtCompileTime == 1);\n  VERIFY( (B(1, all)).ColsAtCompileTime == 4);\n  VERIFY( (B(1, all)).RowsAtCompileTime == 1);\n  VERIFY( (B(all,1)).ColsAtCompileTime == 1);\n  VERIFY( (B(all,1)).RowsAtCompileTime == 4);\n\n  VERIFY(int( (A(all, eii)).ColsAtCompileTime) == int(eii.SizeAtCompileTime));\n  VERIFY_EQ_INT( (A(eii, eii)).Flags&DirectAccessBit, (unsigned int)(0));\n  VERIFY_EQ_INT( (A(eii, eii)).InnerStrideAtCompileTime, 0);\n  VERIFY_EQ_INT( (A(eii, eii)).OuterStrideAtCompileTime, 0);\n\n  VERIFY_IS_APPROX( A(seq(n-1,2,-2), seqN(n-1-6,3,-1)), A(seq(last,2,fix<-2>), seqN(last-6,3,fix<-1>)) );\n\n  VERIFY_IS_APPROX( A(seq(n-1,2,-2), seqN(n-1-6,4)), A(seq(last,2,-2), seqN(last-6,4)) );\n  VERIFY_IS_APPROX( A(seq(n-1-6,n-1-2), seqN(n-1-6,4)), A(seq(last-6,last-2), seqN(6+last-6-6,4)) );\n  VERIFY_IS_APPROX( A(seq((n-1)/2,(n)/2+3), seqN(2,4)), A(seq(last/2,(last+1)/2+3), seqN(last+2-last,4)) );\n  VERIFY_IS_APPROX( A(seq(n-2,2,-2), seqN(n-8,4)), A(seq(lastp1-2,2,-2), seqN(lastp1-8,4)) );\n\n  // Check all combinations of seq:\n  VERIFY_IS_APPROX( A(seq(1,n-1-2,2), seq(1,n-1-2,2)), A(seq(1,last-2,2), seq(1,last-2,fix<2>)) );\n  VERIFY_IS_APPROX( A(seq(n-1-5,n-1-2,2), seq(n-1-5,n-1-2,2)), A(seq(last-5,last-2,2), seq(last-5,last-2,fix<2>)) );\n  VERIFY_IS_APPROX( A(seq(n-1-5,7,2), seq(n-1-5,7,2)), A(seq(last-5,7,2), seq(last-5,7,fix<2>)) );\n  VERIFY_IS_APPROX( A(seq(1,n-1-2), seq(n-1-5,7)), A(seq(1,last-2), seq(last-5,7)) );\n  VERIFY_IS_APPROX( A(seq(n-1-5,n-1-2), seq(n-1-5,n-1-2)), A(seq(last-5,last-2), seq(last-5,last-2)) );\n\n  VERIFY_IS_APPROX( A.col(A.cols()-1), A(all,last) );\n  VERIFY_IS_APPROX( A(A.rows()-2, A.cols()/2), A(last-1, lastp1/2) );\n  VERIFY_IS_APPROX( a(a.size()-2), a(last-1) );\n  VERIFY_IS_APPROX( a(a.size()/2), a((last+1)/2) );\n\n  // Check fall-back to Block\n  {\n    VERIFY( is_same_eq(A.col(0), A(all,0)) );\n    VERIFY( is_same_eq(A.row(0), A(0,all)) );\n    VERIFY( is_same_eq(A.block(0,0,2,2), A(seqN(0,2),seq(0,1))) );\n    VERIFY( is_same_eq(A.middleRows(2,4), A(seqN(2,4),all)) );\n    VERIFY( is_same_eq(A.middleCols(2,4), A(all,seqN(2,4))) );\n\n    VERIFY( is_same_eq(A.col(A.cols()-1), A(all,last)) );\n\n    const ArrayXXi& cA(A);\n    VERIFY( is_same_eq(cA.col(0), cA(all,0)) );\n    VERIFY( is_same_eq(cA.row(0), cA(0,all)) );\n    VERIFY( is_same_eq(cA.block(0,0,2,2), cA(seqN(0,2),seq(0,1))) );\n    VERIFY( is_same_eq(cA.middleRows(2,4), cA(seqN(2,4),all)) );\n    VERIFY( is_same_eq(cA.middleCols(2,4), cA(all,seqN(2,4))) );\n\n    VERIFY( is_same_eq(a.head(4), a(seq(0,3))) );\n    VERIFY( is_same_eq(a.tail(4), a(seqN(last-3,4))) );\n    VERIFY( is_same_eq(a.tail(4), a(seq(lastp1-4,last))) );\n    VERIFY( is_same_eq(a.segment<4>(3), a(seqN(3,fix<4>))) );\n  }\n\n  ArrayXXi A1=A, A2 = ArrayXXi::Random(4,4);\n  ArrayXi range25(4); range25 << 3,2,4,5;\n  A1(seqN(3,4),seq(2,5)) = A2;\n  VERIFY_IS_APPROX( A1.block(3,2,4,4), A2 );\n  A1 = A;\n  A2.setOnes();\n  A1(seq(6,3,-1),range25) = A2;\n  VERIFY_IS_APPROX( A1.block(3,2,4,4), A2 );\n\n  // check reverse\n  {\n    VERIFY( is_same_seq_type( seq(3,7).reverse(), seqN(7,5,fix<-1>)  ) );\n    VERIFY( is_same_seq_type( seq(7,3,fix<-2>).reverse(), seqN(3,3,fix<2>)  ) );\n    VERIFY_IS_APPROX( a(seqN(2,last/2).reverse()), a(seqN(2+(last/2-1)*1,last/2,fix<-1>)) );\n    VERIFY_IS_APPROX( a(seqN(last/2,fix<4>).reverse()),a(seqN(last/2,fix<4>)).reverse() );\n    VERIFY_IS_APPROX( A(seq(last-5,last-1,2).reverse(), seqN(last-3,3,fix<-2>).reverse()),\n                      A(seq(last-5,last-1,2), seqN(last-3,3,fix<-2>)).reverse() );\n  }\n\n#if EIGEN_HAS_CXX11\n  // check lastN\n  VERIFY_IS_APPROX( a(lastN(3)), a.tail(3) );\n  VERIFY( MATCH( a(lastN(3)), \"7\\n8\\n9\" ) );\n  VERIFY_IS_APPROX( a(lastN(fix<3>())), a.tail<3>() );\n  VERIFY( MATCH( a(lastN(3,2)), \"5\\n7\\n9\" ) );\n  VERIFY( MATCH( a(lastN(3,fix<2>())), \"5\\n7\\n9\" ) );\n  VERIFY( a(lastN(fix<3>())).SizeAtCompileTime == 3 );\n\n  VERIFY( (A(all, std::array<int,4>{{1,3,2,4}})).ColsAtCompileTime == 4);\n\n  VERIFY_IS_APPROX( (A(std::array<int,3>{{1,3,5}}, std::array<int,4>{{9,6,3,0}})), A(seqN(1,3,2), seqN(9,4,-3)) );\n\n#if EIGEN_HAS_STATIC_ARRAY_TEMPLATE\n  VERIFY_IS_APPROX( A({3, 1, 6, 5}, all), A(std::array<int,4>{{3, 1, 6, 5}}, all) );\n  VERIFY_IS_APPROX( A(all,{3, 1, 6, 5}), A(all,std::array<int,4>{{3, 1, 6, 5}}) );\n  VERIFY_IS_APPROX( A({1,3,5},{3, 1, 6, 5}), A(std::array<int,3>{{1,3,5}},std::array<int,4>{{3, 1, 6, 5}}) );\n\n  VERIFY_IS_EQUAL( A({1,3,5},{3, 1, 6, 5}).RowsAtCompileTime, 3 );\n  VERIFY_IS_EQUAL( A({1,3,5},{3, 1, 6, 5}).ColsAtCompileTime, 4 );\n\n  VERIFY_IS_APPROX( a({3, 1, 6, 5}), a(std::array<int,4>{{3, 1, 6, 5}}) );\n  VERIFY_IS_EQUAL( a({1,3,5}).SizeAtCompileTime, 3 );\n\n  VERIFY_IS_APPROX( b({3, 1, 6, 5}), b(std::array<int,4>{{3, 1, 6, 5}}) );\n  VERIFY_IS_EQUAL( b({1,3,5}).SizeAtCompileTime, 3 );\n#endif\n\n#endif\n\n  // check mat(i,j) with weird types for i and j\n  {\n    VERIFY_IS_APPROX( A(B.RowsAtCompileTime-1, 1), A(3,1) );\n    VERIFY_IS_APPROX( A(B.RowsAtCompileTime, 1), A(4,1) );\n    VERIFY_IS_APPROX( A(B.RowsAtCompileTime-1, B.ColsAtCompileTime-1), A(3,3) );\n    VERIFY_IS_APPROX( A(B.RowsAtCompileTime, B.ColsAtCompileTime), A(4,4) );\n    const Index I_ = 3, J_ = 4;\n    VERIFY_IS_APPROX( A(I_,J_), A(3,4) );\n  }\n\n  // check extended block API\n  {\n    VERIFY( is_same_eq( A.block<3,4>(1,1), A.block(1,1,fix<3>,fix<4>)) );\n    VERIFY( is_same_eq( A.block<3,4>(1,1,3,4), A.block(1,1,fix<3>(),fix<4>(4))) );\n    VERIFY( is_same_eq( A.block<3,Dynamic>(1,1,3,4), A.block(1,1,fix<3>,4)) );\n    VERIFY( is_same_eq( A.block<Dynamic,4>(1,1,3,4), A.block(1,1,fix<Dynamic>(3),fix<4>)) );\n    VERIFY( is_same_eq( A.block(1,1,3,4), A.block(1,1,fix<Dynamic>(3),fix<Dynamic>(4))) );\n\n    VERIFY( is_same_eq( A.topLeftCorner<3,4>(), A.topLeftCorner(fix<3>,fix<4>)) );\n    VERIFY( is_same_eq( A.bottomLeftCorner<3,4>(), A.bottomLeftCorner(fix<3>,fix<4>)) );\n    VERIFY( is_same_eq( A.bottomRightCorner<3,4>(), A.bottomRightCorner(fix<3>,fix<4>)) );\n    VERIFY( is_same_eq( A.topRightCorner<3,4>(), A.topRightCorner(fix<3>,fix<4>)) );\n\n    VERIFY( is_same_eq( A.leftCols<3>(), A.leftCols(fix<3>)) );\n    VERIFY( is_same_eq( A.rightCols<3>(), A.rightCols(fix<3>)) );\n    VERIFY( is_same_eq( A.middleCols<3>(1), A.middleCols(1,fix<3>)) );\n\n    VERIFY( is_same_eq( A.topRows<3>(), A.topRows(fix<3>)) );\n    VERIFY( is_same_eq( A.bottomRows<3>(), A.bottomRows(fix<3>)) );\n    VERIFY( is_same_eq( A.middleRows<3>(1), A.middleRows(1,fix<3>)) );\n\n    VERIFY( is_same_eq( a.segment<3>(1), a.segment(1,fix<3>)) );\n    VERIFY( is_same_eq( a.head<3>(), a.head(fix<3>)) );\n    VERIFY( is_same_eq( a.tail<3>(), a.tail(fix<3>)) );\n\n    const ArrayXXi& cA(A);\n    VERIFY( is_same_eq( cA.block<Dynamic,4>(1,1,3,4), cA.block(1,1,fix<Dynamic>(3),fix<4>)) );\n\n    VERIFY( is_same_eq( cA.topLeftCorner<3,4>(), cA.topLeftCorner(fix<3>,fix<4>)) );\n    VERIFY( is_same_eq( cA.bottomLeftCorner<3,4>(), cA.bottomLeftCorner(fix<3>,fix<4>)) );\n    VERIFY( is_same_eq( cA.bottomRightCorner<3,4>(), cA.bottomRightCorner(fix<3>,fix<4>)) );\n    VERIFY( is_same_eq( cA.topRightCorner<3,4>(), cA.topRightCorner(fix<3>,fix<4>)) );\n\n    VERIFY( is_same_eq( cA.leftCols<3>(), cA.leftCols(fix<3>)) );\n    VERIFY( is_same_eq( cA.rightCols<3>(), cA.rightCols(fix<3>)) );\n    VERIFY( is_same_eq( cA.middleCols<3>(1), cA.middleCols(1,fix<3>)) );\n\n    VERIFY( is_same_eq( cA.topRows<3>(), cA.topRows(fix<3>)) );\n    VERIFY( is_same_eq( cA.bottomRows<3>(), cA.bottomRows(fix<3>)) );\n    VERIFY( is_same_eq( cA.middleRows<3>(1), cA.middleRows(1,fix<3>)) );\n  }\n\n  // Check compilation of enums as index type:\n  a(XX) = 1;\n  A(XX,YY) = 1;\n  // Anonymous enums only work with C++11\n#if EIGEN_HAS_CXX11\n  enum { X=0, Y=1 };\n  a(X) = 1;\n  A(X,Y) = 1;\n  A(XX,Y) = 1;\n  A(X,YY) = 1;\n#endif\n\n  // Check compilation of varying integer types as index types:\n  Index i = n/2;\n  short i_short(i);\n  std::size_t i_sizet(i);\n  VERIFY_IS_EQUAL( a(i), a.coeff(i_short) );\n  VERIFY_IS_EQUAL( a(i), a.coeff(i_sizet) );\n\n  VERIFY_IS_EQUAL( A(i,i), A.coeff(i_short, i_short) );\n  VERIFY_IS_EQUAL( A(i,i), A.coeff(i_short, i) );\n  VERIFY_IS_EQUAL( A(i,i), A.coeff(i, i_short) );\n  VERIFY_IS_EQUAL( A(i,i), A.coeff(i, i_sizet) );\n  VERIFY_IS_EQUAL( A(i,i), A.coeff(i_sizet, i) );\n  VERIFY_IS_EQUAL( A(i,i), A.coeff(i_sizet, i_short) );\n  VERIFY_IS_EQUAL( A(i,i), A.coeff(5, i_sizet) );\n\n  // Regression test for Max{Rows,Cols}AtCompileTime\n  {\n    Matrix3i A3 = Matrix3i::Random();\n    ArrayXi ind(5); ind << 1,1,1,1,1;\n    VERIFY_IS_EQUAL( A3(ind,ind).eval(), MatrixXi::Constant(5,5,A3(1,1)) );\n  }\n\n  // Regression for bug 1736\n  {\n    VERIFY_IS_APPROX(A(all, eii).col(0).eval(), A.col(eii(0)));\n    A(all, eii).col(0) = A.col(eii(0));\n  }\n\n}\n\nEIGEN_DECLARE_TEST(indexed_view)\n{\n//   for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( check_indexed_view() );\n    CALL_SUBTEST_2( check_indexed_view() );\n    CALL_SUBTEST_3( check_indexed_view() );\n//   }\n\n  // static checks of some internals:\n  STATIC_CHECK(( internal::is_valid_index_type<int>::value ));\n  STATIC_CHECK(( internal::is_valid_index_type<unsigned int>::value ));\n  STATIC_CHECK(( internal::is_valid_index_type<short>::value ));\n  STATIC_CHECK(( internal::is_valid_index_type<std::ptrdiff_t>::value ));\n  STATIC_CHECK(( internal::is_valid_index_type<std::size_t>::value ));\n  STATIC_CHECK(( !internal::valid_indexed_view_overload<int,int>::value ));\n  STATIC_CHECK(( !internal::valid_indexed_view_overload<int,std::ptrdiff_t>::value ));\n  STATIC_CHECK(( !internal::valid_indexed_view_overload<std::ptrdiff_t,int>::value ));\n  STATIC_CHECK(( !internal::valid_indexed_view_overload<std::size_t,int>::value ));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/initializer_list_construction.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2019 David Tellenbach <david.tellenbach@tellnotes.org>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_NO_STATIC_ASSERT\n\n#include \"main.h\"\n\ntemplate<typename Scalar, bool is_integer = NumTraits<Scalar>::IsInteger>\nstruct TestMethodDispatching {\n  static void run() {}\n};\n\ntemplate<typename Scalar>\nstruct TestMethodDispatching<Scalar, 1> {\n  static void run()\n  {\n    {\n      Matrix<Scalar, Dynamic, Dynamic> m {3, 4};\n      Array<Scalar, Dynamic, Dynamic> a {3, 4};\n      VERIFY(m.rows() == 3);\n      VERIFY(m.cols() == 4);\n      VERIFY(a.rows() == 3);\n      VERIFY(a.cols() == 4);\n    }\n    {\n      Matrix<Scalar, 1, 2> m {3, 4};\n      Array<Scalar, 1, 2> a {3, 4};\n      VERIFY(m(0) == 3);\n      VERIFY(m(1) == 4);\n      VERIFY(a(0) == 3);\n      VERIFY(a(1) == 4);\n    }\n    {\n      Matrix<Scalar, 2, 1> m {3, 4};\n      Array<Scalar, 2, 1> a {3, 4};\n      VERIFY(m(0) == 3);\n      VERIFY(m(1) == 4);\n      VERIFY(a(0) == 3);\n      VERIFY(a(1) == 4);\n    }\n  }\n};\n\ntemplate<typename Vec4, typename Vec5> void fixedsizeVariadicVectorConstruction2()\n{\n  {\n    Vec4 ref = Vec4::Random();\n    Vec4 v{ ref[0], ref[1], ref[2], ref[3] };\n    VERIFY_IS_APPROX(v, ref);\n    VERIFY_IS_APPROX(v, (Vec4( ref[0], ref[1], ref[2], ref[3] )));\n    VERIFY_IS_APPROX(v, (Vec4({ref[0], ref[1], ref[2], ref[3]})));\n\n    Vec4 v2 = { ref[0], ref[1], ref[2], ref[3] };\n    VERIFY_IS_APPROX(v2, ref);\n  }\n  {\n    Vec5 ref = Vec5::Random();\n    Vec5 v{ ref[0], ref[1], ref[2], ref[3], ref[4] };\n    VERIFY_IS_APPROX(v, ref);\n    VERIFY_IS_APPROX(v, (Vec5( ref[0], ref[1], ref[2], ref[3], ref[4] )));\n    VERIFY_IS_APPROX(v, (Vec5({ref[0], ref[1], ref[2], ref[3], ref[4]})));\n\n    Vec5 v2 = { ref[0], ref[1], ref[2], ref[3], ref[4] };\n    VERIFY_IS_APPROX(v2, ref);\n  }\n}\n\n#define CHECK_MIXSCALAR_V5_APPROX(V, A0, A1, A2, A3, A4) { \\\n  VERIFY_IS_APPROX(V[0], Scalar(A0) ); \\\n  VERIFY_IS_APPROX(V[1], Scalar(A1) ); \\\n  VERIFY_IS_APPROX(V[2], Scalar(A2) ); \\\n  VERIFY_IS_APPROX(V[3], Scalar(A3) ); \\\n  VERIFY_IS_APPROX(V[4], Scalar(A4) ); \\\n}\n\n#define CHECK_MIXSCALAR_V5(VEC5, A0, A1, A2, A3, A4) { \\\n  typedef VEC5::Scalar Scalar; \\\n  VEC5 v = { A0 , A1 , A2 , A3 , A4 }; \\\n  CHECK_MIXSCALAR_V5_APPROX(v, A0 , A1 , A2 , A3 , A4); \\\n}\n\ntemplate<int> void fixedsizeVariadicVectorConstruction3()\n{\n  typedef Matrix<double,5,1> Vec5;\n  typedef Array<float,5,1> Arr5;\n  CHECK_MIXSCALAR_V5(Vec5, 1, 2., -3, 4.121, 5.53252);\n  CHECK_MIXSCALAR_V5(Arr5, 1, 2., 3.12f, 4.121, 5.53252);\n}\n\ntemplate<typename Scalar> void fixedsizeVariadicVectorConstruction()\n{\n  CALL_SUBTEST(( fixedsizeVariadicVectorConstruction2<Matrix<Scalar,4,1>, Matrix<Scalar,5,1> >() ));\n  CALL_SUBTEST(( fixedsizeVariadicVectorConstruction2<Matrix<Scalar,1,4>, Matrix<Scalar,1,5> >() ));\n  CALL_SUBTEST(( fixedsizeVariadicVectorConstruction2<Array<Scalar,4,1>,  Array<Scalar,5,1>  >() ));\n  CALL_SUBTEST(( fixedsizeVariadicVectorConstruction2<Array<Scalar,1,4>,  Array<Scalar,1,5>  >() ));\n}\n\n\ntemplate<typename Scalar> void initializerListVectorConstruction()\n{\n  Scalar raw[4];\n  for(int k = 0; k < 4; ++k) {\n    raw[k] = internal::random<Scalar>();\n  }\n  {\n    Matrix<Scalar, 4, 1> m { {raw[0]}, {raw[1]},{raw[2]},{raw[3]} };\n    Array<Scalar, 4, 1> a { {raw[0]}, {raw[1]}, {raw[2]}, {raw[3]} };\n    for(int k = 0; k < 4; ++k) {\n      VERIFY(m(k) == raw[k]);\n    }\n    for(int k = 0; k < 4; ++k) {\n      VERIFY(a(k) == raw[k]);\n    }\n    VERIFY_IS_EQUAL(m, (Matrix<Scalar,4,1>({ {raw[0]}, {raw[1]}, {raw[2]}, {raw[3]} })));\n    VERIFY((a == (Array<Scalar,4,1>({ {raw[0]}, {raw[1]}, {raw[2]}, {raw[3]} }))).all());\n  }\n  {\n    Matrix<Scalar, 1, 4> m { {raw[0], raw[1], raw[2], raw[3]} };\n    Array<Scalar, 1, 4> a { {raw[0], raw[1], raw[2], raw[3]} };\n    for(int k = 0; k < 4; ++k) {\n      VERIFY(m(k) == raw[k]);\n    }\n    for(int k = 0; k < 4; ++k) {\n      VERIFY(a(k) == raw[k]);\n    }\n    VERIFY_IS_EQUAL(m, (Matrix<Scalar, 1, 4>({{raw[0],raw[1],raw[2],raw[3]}})));\n    VERIFY((a == (Array<Scalar, 1, 4>({{raw[0],raw[1],raw[2],raw[3]}}))).all());\n  }\n  {\n    Matrix<Scalar, 4, Dynamic> m { {raw[0]}, {raw[1]}, {raw[2]}, {raw[3]} };\n    Array<Scalar, 4, Dynamic> a { {raw[0]}, {raw[1]}, {raw[2]}, {raw[3]} };\n    for(int k=0; k < 4; ++k) {\n      VERIFY(m(k) == raw[k]);\n    }\n    for(int k=0; k < 4; ++k) {\n      VERIFY(a(k) == raw[k]);\n    }\n    VERIFY_IS_EQUAL(m, (Matrix<Scalar, 4, Dynamic>({ {raw[0]}, {raw[1]}, {raw[2]}, {raw[3]} })));\n    VERIFY((a == (Array<Scalar, 4, Dynamic>({ {raw[0]}, {raw[1]}, {raw[2]}, {raw[3]} }))).all());\n  }\n  {\n    Matrix<Scalar, Dynamic, 4> m {{raw[0],raw[1],raw[2],raw[3]}};\n    Array<Scalar, Dynamic, 4> a {{raw[0],raw[1],raw[2],raw[3]}};\n    for(int k=0; k < 4; ++k) {\n      VERIFY(m(k) == raw[k]);\n    }\n    for(int k=0; k < 4; ++k) {\n      VERIFY(a(k) == raw[k]);\n    }\n    VERIFY_IS_EQUAL(m, (Matrix<Scalar, Dynamic, 4>({{raw[0],raw[1],raw[2],raw[3]}})));\n    VERIFY((a == (Array<Scalar, Dynamic, 4>({{raw[0],raw[1],raw[2],raw[3]}}))).all());\n  }\n}\n\ntemplate<typename Scalar> void initializerListMatrixConstruction()\n{\n  const Index RowsAtCompileTime = 5;\n  const Index ColsAtCompileTime = 4;\n  const Index SizeAtCompileTime = RowsAtCompileTime * ColsAtCompileTime;\n\n  Scalar raw[SizeAtCompileTime];\n  for (int i = 0; i < SizeAtCompileTime; ++i) {\n    raw[i] = internal::random<Scalar>();\n  }\n  {\n    Matrix<Scalar, Dynamic, Dynamic> m {};\n    VERIFY(m.cols() == 0);\n    VERIFY(m.rows() == 0);\n    VERIFY_IS_EQUAL(m, (Matrix<Scalar, Dynamic, Dynamic>()));\n  }\n  {\n    Matrix<Scalar, 5, 4> m {\n      {raw[0], raw[1], raw[2], raw[3]},\n      {raw[4], raw[5], raw[6], raw[7]},\n      {raw[8], raw[9], raw[10], raw[11]},\n      {raw[12], raw[13], raw[14], raw[15]},\n      {raw[16], raw[17], raw[18], raw[19]}\n    };\n\n    Matrix<Scalar, 5, 4> m2;\n    m2 << raw[0], raw[1], raw[2], raw[3],\n          raw[4], raw[5], raw[6], raw[7],\n          raw[8], raw[9], raw[10], raw[11],\n          raw[12], raw[13], raw[14], raw[15],\n          raw[16], raw[17], raw[18], raw[19];\n\n    int k = 0;\n    for(int i = 0; i < RowsAtCompileTime; ++i) {\n      for (int j = 0; j < ColsAtCompileTime; ++j) {\n        VERIFY(m(i, j) == raw[k]);\n        ++k;\n      }\n    }\n    VERIFY_IS_EQUAL(m, m2);\n  }\n  {\n    Matrix<Scalar, Dynamic, Dynamic> m{\n      {raw[0], raw[1], raw[2], raw[3]},\n      {raw[4], raw[5], raw[6], raw[7]},\n      {raw[8], raw[9], raw[10], raw[11]},\n      {raw[12], raw[13], raw[14], raw[15]},\n      {raw[16], raw[17], raw[18], raw[19]}\n    };\n\n    VERIFY(m.cols() == 4);\n    VERIFY(m.rows() == 5);\n    int k = 0;\n    for(int i = 0; i < RowsAtCompileTime; ++i) {\n      for (int j = 0; j < ColsAtCompileTime; ++j) {\n        VERIFY(m(i, j) == raw[k]);\n        ++k;\n      }\n    }\n\n    Matrix<Scalar, Dynamic, Dynamic> m2(RowsAtCompileTime, ColsAtCompileTime);\n    k = 0;\n    for(int i = 0; i < RowsAtCompileTime; ++i) {\n      for (int j = 0; j < ColsAtCompileTime; ++j) {\n        m2(i, j) = raw[k];\n        ++k;\n      }\n    }\n    VERIFY_IS_EQUAL(m, m2);\n  }\n}\n\ntemplate<typename Scalar> void initializerListArrayConstruction()\n{\n  const Index RowsAtCompileTime = 5;\n  const Index ColsAtCompileTime = 4;\n  const Index SizeAtCompileTime = RowsAtCompileTime * ColsAtCompileTime;\n\n  Scalar raw[SizeAtCompileTime];\n  for (int i = 0; i < SizeAtCompileTime; ++i) {\n    raw[i] = internal::random<Scalar>();\n  }\n  {\n    Array<Scalar, Dynamic, Dynamic> a {};\n    VERIFY(a.cols() == 0);\n    VERIFY(a.rows() == 0);\n  }\n  {\n    Array<Scalar, 5, 4> m {\n      {raw[0], raw[1], raw[2], raw[3]},\n      {raw[4], raw[5], raw[6], raw[7]},\n      {raw[8], raw[9], raw[10], raw[11]},\n      {raw[12], raw[13], raw[14], raw[15]},\n      {raw[16], raw[17], raw[18], raw[19]}\n    };\n\n    Array<Scalar, 5, 4> m2;\n    m2 << raw[0], raw[1], raw[2], raw[3],\n          raw[4], raw[5], raw[6], raw[7],\n          raw[8], raw[9], raw[10], raw[11],\n          raw[12], raw[13], raw[14], raw[15],\n          raw[16], raw[17], raw[18], raw[19];\n\n    int k = 0;\n    for(int i = 0; i < RowsAtCompileTime; ++i) {\n      for (int j = 0; j < ColsAtCompileTime; ++j) {\n        VERIFY(m(i, j) == raw[k]);\n        ++k;\n      }\n    }\n    VERIFY_IS_APPROX(m, m2);\n  }\n  {\n    Array<Scalar, Dynamic, Dynamic> m {\n      {raw[0], raw[1], raw[2], raw[3]},\n      {raw[4], raw[5], raw[6], raw[7]},\n      {raw[8], raw[9], raw[10], raw[11]},\n      {raw[12], raw[13], raw[14], raw[15]},\n      {raw[16], raw[17], raw[18], raw[19]}\n    };\n\n    VERIFY(m.cols() == 4);\n    VERIFY(m.rows() == 5);\n    int k = 0;\n    for(int i = 0; i < RowsAtCompileTime; ++i) {\n      for (int j = 0; j < ColsAtCompileTime; ++j) {\n        VERIFY(m(i, j) == raw[k]);\n        ++k;\n      }\n    }\n\n    Array<Scalar, Dynamic, Dynamic> m2(RowsAtCompileTime, ColsAtCompileTime);\n    k = 0;\n    for(int i = 0; i < RowsAtCompileTime; ++i) {\n      for (int j = 0; j < ColsAtCompileTime; ++j) {\n        m2(i, j) = raw[k];\n        ++k;\n      }\n    }\n    VERIFY_IS_APPROX(m, m2);\n  }\n}\n\ntemplate<typename Scalar> void dynamicVectorConstruction()\n{\n  const Index size = 4;\n  Scalar raw[size];\n  for (int i = 0; i < size; ++i) {\n    raw[i] = internal::random<Scalar>();\n  }\n\n  typedef Matrix<Scalar, Dynamic, 1>  VectorX;\n\n  {\n    VectorX v {{raw[0], raw[1], raw[2], raw[3]}};\n    for (int i = 0; i < size; ++i) {\n      VERIFY(v(i) == raw[i]);\n    }\n    VERIFY(v.rows() == size);\n    VERIFY(v.cols() == 1);\n    VERIFY_IS_EQUAL(v, (VectorX {{raw[0], raw[1], raw[2], raw[3]}}));\n  }\n\n  {\n    VERIFY_RAISES_ASSERT((VectorX {raw[0], raw[1], raw[2], raw[3]}));\n  }\n  {\n    VERIFY_RAISES_ASSERT((VectorX  {\n      {raw[0], raw[1], raw[2], raw[3]},\n      {raw[0], raw[1], raw[2], raw[3]},\n    }));\n  }\n}\n\nEIGEN_DECLARE_TEST(initializer_list_construction)\n{\n  CALL_SUBTEST_1(initializerListVectorConstruction<unsigned char>());\n  CALL_SUBTEST_1(initializerListVectorConstruction<float>());\n  CALL_SUBTEST_1(initializerListVectorConstruction<double>());\n  CALL_SUBTEST_1(initializerListVectorConstruction<int>());\n  CALL_SUBTEST_1(initializerListVectorConstruction<long int>());\n  CALL_SUBTEST_1(initializerListVectorConstruction<std::ptrdiff_t>());\n  CALL_SUBTEST_1(initializerListVectorConstruction<std::complex<double>>());\n  CALL_SUBTEST_1(initializerListVectorConstruction<std::complex<float>>());\n\n  CALL_SUBTEST_2(initializerListMatrixConstruction<unsigned char>());\n  CALL_SUBTEST_2(initializerListMatrixConstruction<float>());\n  CALL_SUBTEST_2(initializerListMatrixConstruction<double>());\n  CALL_SUBTEST_2(initializerListMatrixConstruction<int>());\n  CALL_SUBTEST_2(initializerListMatrixConstruction<long int>());\n  CALL_SUBTEST_2(initializerListMatrixConstruction<std::ptrdiff_t>());\n  CALL_SUBTEST_2(initializerListMatrixConstruction<std::complex<double>>());\n  CALL_SUBTEST_2(initializerListMatrixConstruction<std::complex<float>>());\n\n  CALL_SUBTEST_3(initializerListArrayConstruction<unsigned char>());\n  CALL_SUBTEST_3(initializerListArrayConstruction<float>());\n  CALL_SUBTEST_3(initializerListArrayConstruction<double>());\n  CALL_SUBTEST_3(initializerListArrayConstruction<int>());\n  CALL_SUBTEST_3(initializerListArrayConstruction<long int>());\n  CALL_SUBTEST_3(initializerListArrayConstruction<std::ptrdiff_t>());\n  CALL_SUBTEST_3(initializerListArrayConstruction<std::complex<double>>());\n  CALL_SUBTEST_3(initializerListArrayConstruction<std::complex<float>>());\n\n  CALL_SUBTEST_4(fixedsizeVariadicVectorConstruction<unsigned char>());\n  CALL_SUBTEST_4(fixedsizeVariadicVectorConstruction<float>());\n  CALL_SUBTEST_4(fixedsizeVariadicVectorConstruction<double>());\n  CALL_SUBTEST_4(fixedsizeVariadicVectorConstruction<int>());\n  CALL_SUBTEST_4(fixedsizeVariadicVectorConstruction<long int>());\n  CALL_SUBTEST_4(fixedsizeVariadicVectorConstruction<std::ptrdiff_t>());\n  CALL_SUBTEST_4(fixedsizeVariadicVectorConstruction<std::complex<double>>());\n  CALL_SUBTEST_4(fixedsizeVariadicVectorConstruction<std::complex<float>>());\n  CALL_SUBTEST_4(fixedsizeVariadicVectorConstruction3<0>());\n\n  CALL_SUBTEST_5(TestMethodDispatching<int>::run());\n  CALL_SUBTEST_5(TestMethodDispatching<long int>::run());\n\n  CALL_SUBTEST_6(dynamicVectorConstruction<unsigned char>());\n  CALL_SUBTEST_6(dynamicVectorConstruction<float>());\n  CALL_SUBTEST_6(dynamicVectorConstruction<double>());\n  CALL_SUBTEST_6(dynamicVectorConstruction<int>());\n  CALL_SUBTEST_6(dynamicVectorConstruction<long int>());\n  CALL_SUBTEST_6(dynamicVectorConstruction<std::ptrdiff_t>());\n  CALL_SUBTEST_6(dynamicVectorConstruction<std::complex<double>>());\n  CALL_SUBTEST_6(dynamicVectorConstruction<std::complex<float>>());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/inplace_decomposition.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <Eigen/LU>\n#include <Eigen/Cholesky>\n#include <Eigen/QR>\n\n// This file test inplace decomposition through Ref<>, as supported by Cholesky, LU, and QR decompositions.\n\ntemplate<typename DecType,typename MatrixType> void inplace(bool square = false, bool SPD = false)\n{\n  typedef typename MatrixType::Scalar Scalar;\n  typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> RhsType;\n  typedef Matrix<Scalar, MatrixType::ColsAtCompileTime, 1> ResType;\n\n  Index rows = MatrixType::RowsAtCompileTime==Dynamic ? internal::random<Index>(2,EIGEN_TEST_MAX_SIZE/2) : Index(MatrixType::RowsAtCompileTime);\n  Index cols = MatrixType::ColsAtCompileTime==Dynamic ? (square?rows:internal::random<Index>(2,rows))    : Index(MatrixType::ColsAtCompileTime);\n\n  MatrixType A = MatrixType::Random(rows,cols);\n  RhsType b = RhsType::Random(rows);\n  ResType x(cols);\n\n  if(SPD)\n  {\n    assert(square);\n    A.topRows(cols) = A.topRows(cols).adjoint() * A.topRows(cols);\n    A.diagonal().array() += 1e-3;\n  }\n\n  MatrixType A0 = A;\n  MatrixType A1 = A;\n\n  DecType dec(A);\n\n  // Check that the content of A has been modified\n  VERIFY_IS_NOT_APPROX( A, A0 );\n\n  // Check that the decomposition is correct:\n  if(rows==cols)\n  {\n    VERIFY_IS_APPROX( A0 * (x = dec.solve(b)), b );\n  }\n  else\n  {\n    VERIFY_IS_APPROX( A0.transpose() * A0 * (x = dec.solve(b)), A0.transpose() * b );\n  }\n\n  // Check that modifying A breaks the current dec:\n  A.setRandom();\n  if(rows==cols)\n  {\n    VERIFY_IS_NOT_APPROX( A0 * (x = dec.solve(b)), b );\n  }\n  else\n  {\n    VERIFY_IS_NOT_APPROX( A0.transpose() * A0 * (x = dec.solve(b)), A0.transpose() * b );\n  }\n\n  // Check that calling compute(A1) does not modify A1:\n  A = A0;\n  dec.compute(A1);\n  VERIFY_IS_EQUAL(A0,A1);\n  VERIFY_IS_NOT_APPROX( A, A0 );\n  if(rows==cols)\n  {\n    VERIFY_IS_APPROX( A0 * (x = dec.solve(b)), b );\n  }\n  else\n  {\n    VERIFY_IS_APPROX( A0.transpose() * A0 * (x = dec.solve(b)), A0.transpose() * b );\n  }\n}\n\n\nEIGEN_DECLARE_TEST(inplace_decomposition)\n{\n  EIGEN_UNUSED typedef Matrix<double,4,3> Matrix43d;\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1(( inplace<LLT<Ref<MatrixXd> >, MatrixXd>(true,true) ));\n    CALL_SUBTEST_1(( inplace<LLT<Ref<Matrix4d> >, Matrix4d>(true,true) ));\n\n    CALL_SUBTEST_2(( inplace<LDLT<Ref<MatrixXd> >, MatrixXd>(true,true) ));\n    CALL_SUBTEST_2(( inplace<LDLT<Ref<Matrix4d> >, Matrix4d>(true,true) ));\n\n    CALL_SUBTEST_3(( inplace<PartialPivLU<Ref<MatrixXd> >, MatrixXd>(true,false) ));\n    CALL_SUBTEST_3(( inplace<PartialPivLU<Ref<Matrix4d> >, Matrix4d>(true,false) ));\n\n    CALL_SUBTEST_4(( inplace<FullPivLU<Ref<MatrixXd> >, MatrixXd>(true,false) ));\n    CALL_SUBTEST_4(( inplace<FullPivLU<Ref<Matrix4d> >, Matrix4d>(true,false) ));\n\n    CALL_SUBTEST_5(( inplace<HouseholderQR<Ref<MatrixXd> >, MatrixXd>(false,false) ));\n    CALL_SUBTEST_5(( inplace<HouseholderQR<Ref<Matrix43d> >, Matrix43d>(false,false) ));\n\n    CALL_SUBTEST_6(( inplace<ColPivHouseholderQR<Ref<MatrixXd> >, MatrixXd>(false,false) ));\n    CALL_SUBTEST_6(( inplace<ColPivHouseholderQR<Ref<Matrix43d> >, Matrix43d>(false,false) ));\n\n    CALL_SUBTEST_7(( inplace<FullPivHouseholderQR<Ref<MatrixXd> >, MatrixXd>(false,false) ));\n    CALL_SUBTEST_7(( inplace<FullPivHouseholderQR<Ref<Matrix43d> >, Matrix43d>(false,false) ));\n\n    CALL_SUBTEST_8(( inplace<CompleteOrthogonalDecomposition<Ref<MatrixXd> >, MatrixXd>(false,false) ));\n    CALL_SUBTEST_8(( inplace<CompleteOrthogonalDecomposition<Ref<Matrix43d> >, Matrix43d>(false,false) ));\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/integer_types.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_NO_STATIC_ASSERT\n\n#include \"main.h\"\n\n#undef VERIFY_IS_APPROX\n#define VERIFY_IS_APPROX(a, b) VERIFY((a)==(b));\n#undef VERIFY_IS_NOT_APPROX\n#define VERIFY_IS_NOT_APPROX(a, b) VERIFY((a)!=(b));\n\ntemplate<typename MatrixType> void signed_integer_type_tests(const MatrixType& m)\n{\n  typedef typename MatrixType::Scalar Scalar;\n\n  enum { is_signed = (Scalar(-1) > Scalar(0)) ? 0 : 1 };\n  VERIFY(is_signed == 1);\n\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  MatrixType m1(rows, cols),\n             m2 = MatrixType::Random(rows, cols),\n             mzero = MatrixType::Zero(rows, cols);\n\n  do {\n    m1 = MatrixType::Random(rows, cols);\n  } while(m1 == mzero || m1 == m2);\n\n  // check linear structure\n\n  Scalar s1;\n  do {\n    s1 = internal::random<Scalar>();\n  } while(s1 == 0);\n\n  VERIFY_IS_EQUAL(-(-m1),                  m1);\n  VERIFY_IS_EQUAL(-m2+m1+m2,               m1);\n  VERIFY_IS_EQUAL((-m1+m2)*s1,             -s1*m1+s1*m2);\n}\n\ntemplate<typename MatrixType> void integer_type_tests(const MatrixType& m)\n{\n  typedef typename MatrixType::Scalar Scalar;\n\n  VERIFY(NumTraits<Scalar>::IsInteger);\n  enum { is_signed = (Scalar(-1) > Scalar(0)) ? 0 : 1 };\n  VERIFY(int(NumTraits<Scalar>::IsSigned) == is_signed);\n\n  typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;\n\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  // this test relies a lot on Random.h, and there's not much more that we can do\n  // to test it, hence I consider that we will have tested Random.h\n  MatrixType m1(rows, cols),\n             m2 = MatrixType::Random(rows, cols),\n             m3(rows, cols),\n             mzero = MatrixType::Zero(rows, cols);\n\n  typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime> SquareMatrixType;\n  SquareMatrixType identity = SquareMatrixType::Identity(rows, rows),\n                   square = SquareMatrixType::Random(rows, rows);\n  VectorType v1(rows),\n             v2 = VectorType::Random(rows),\n             vzero = VectorType::Zero(rows);\n\n  do {\n    m1 = MatrixType::Random(rows, cols);\n  } while(m1 == mzero || m1 == m2);\n\n  do {\n    v1 = VectorType::Random(rows);\n  } while(v1 == vzero || v1 == v2);\n\n  VERIFY_IS_APPROX(               v1,    v1);\n  VERIFY_IS_NOT_APPROX(           v1,    2*v1);\n  VERIFY_IS_APPROX(               vzero, v1-v1);\n  VERIFY_IS_APPROX(               m1,    m1);\n  VERIFY_IS_NOT_APPROX(           m1,    2*m1);\n  VERIFY_IS_APPROX(               mzero, m1-m1);\n\n  VERIFY_IS_APPROX(m3 = m1,m1);\n  MatrixType m4;\n  VERIFY_IS_APPROX(m4 = m1,m1);\n\n  m3.real() = m1.real();\n  VERIFY_IS_APPROX(static_cast<const MatrixType&>(m3).real(), static_cast<const MatrixType&>(m1).real());\n  VERIFY_IS_APPROX(static_cast<const MatrixType&>(m3).real(), m1.real());\n\n  // check == / != operators\n  VERIFY(m1==m1);\n  VERIFY(m1!=m2);\n  VERIFY(!(m1==m2));\n  VERIFY(!(m1!=m1));\n  m1 = m2;\n  VERIFY(m1==m2);\n  VERIFY(!(m1!=m2));\n\n  // check linear structure\n\n  Scalar s1;\n  do {\n    s1 = internal::random<Scalar>();\n  } while(s1 == 0);\n\n  VERIFY_IS_EQUAL(m1+m1,                   2*m1);\n  VERIFY_IS_EQUAL(m1+m2-m1,                m2);\n  VERIFY_IS_EQUAL(m1*s1,                   s1*m1);\n  VERIFY_IS_EQUAL((m1+m2)*s1,              s1*m1+s1*m2);\n  m3 = m2; m3 += m1;\n  VERIFY_IS_EQUAL(m3,                      m1+m2);\n  m3 = m2; m3 -= m1;\n  VERIFY_IS_EQUAL(m3,                      m2-m1);\n  m3 = m2; m3 *= s1;\n  VERIFY_IS_EQUAL(m3,                      s1*m2);\n\n  // check matrix product.\n\n  VERIFY_IS_APPROX(identity * m1, m1);\n  VERIFY_IS_APPROX(square * (m1 + m2), square * m1 + square * m2);\n  VERIFY_IS_APPROX((m1 + m2).transpose() * square, m1.transpose() * square + m2.transpose() * square);\n  VERIFY_IS_APPROX((m1 * m2.transpose()) * m1, m1 * (m2.transpose() * m1));\n}\n\ntemplate<int>\nvoid integer_types_extra()\n{\n  VERIFY_IS_EQUAL(int(internal::scalar_div_cost<int>::value), 8);\n  VERIFY_IS_EQUAL(int(internal::scalar_div_cost<unsigned int>::value), 8);\n  if(sizeof(long)>sizeof(int)) {\n    VERIFY(int(internal::scalar_div_cost<long>::value) > int(internal::scalar_div_cost<int>::value));\n    VERIFY(int(internal::scalar_div_cost<unsigned long>::value) > int(internal::scalar_div_cost<int>::value));\n  }\n}\n\nEIGEN_DECLARE_TEST(integer_types)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( integer_type_tests(Matrix<unsigned int, 1, 1>()) );\n    CALL_SUBTEST_1( integer_type_tests(Matrix<unsigned long, 3, 4>()) );\n\n    CALL_SUBTEST_2( integer_type_tests(Matrix<long, 2, 2>()) );\n    CALL_SUBTEST_2( signed_integer_type_tests(Matrix<long, 2, 2>()) );\n\n    CALL_SUBTEST_3( integer_type_tests(Matrix<char, 2, Dynamic>(2, 10)) );\n    CALL_SUBTEST_3( signed_integer_type_tests(Matrix<signed char, 2, Dynamic>(2, 10)) );\n\n    CALL_SUBTEST_4( integer_type_tests(Matrix<unsigned char, 3, 3>()) );\n    CALL_SUBTEST_4( integer_type_tests(Matrix<unsigned char, Dynamic, Dynamic>(20, 20)) );\n\n    CALL_SUBTEST_5( integer_type_tests(Matrix<short, Dynamic, 4>(7, 4)) );\n    CALL_SUBTEST_5( signed_integer_type_tests(Matrix<short, Dynamic, 4>(7, 4)) );\n\n    CALL_SUBTEST_6( integer_type_tests(Matrix<unsigned short, 4, 4>()) );\n\n#if EIGEN_HAS_CXX11\n    CALL_SUBTEST_7( integer_type_tests(Matrix<long long, 11, 13>()) );\n    CALL_SUBTEST_7( signed_integer_type_tests(Matrix<long long, 11, 13>()) );\n\n    CALL_SUBTEST_8( integer_type_tests(Matrix<unsigned long long, Dynamic, 5>(1, 5)) );\n#endif\n  }\n  CALL_SUBTEST_9( integer_types_extra<0>() );\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/inverse.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <Eigen/LU>\n\ntemplate<typename MatrixType>\nvoid inverse_for_fixed_size(const MatrixType&, typename internal::enable_if<MatrixType::SizeAtCompileTime==Dynamic>::type* = 0)\n{\n}\n\ntemplate<typename MatrixType>\nvoid inverse_for_fixed_size(const MatrixType& m1, typename internal::enable_if<MatrixType::SizeAtCompileTime!=Dynamic>::type* = 0)\n{\n  using std::abs;\n\n  MatrixType m2, identity = MatrixType::Identity();\n\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  typedef Matrix<Scalar, MatrixType::ColsAtCompileTime, 1> VectorType;\n  \n  //computeInverseAndDetWithCheck tests\n  //First: an invertible matrix\n  bool invertible;\n  Scalar det;\n\n  m2.setZero();\n  m1.computeInverseAndDetWithCheck(m2, det, invertible);\n  VERIFY(invertible);\n  VERIFY_IS_APPROX(identity, m1*m2);\n  VERIFY_IS_APPROX(det, m1.determinant());\n\n  m2.setZero();\n  m1.computeInverseWithCheck(m2, invertible);\n  VERIFY(invertible);\n  VERIFY_IS_APPROX(identity, m1*m2);\n\n  //Second: a rank one matrix (not invertible, except for 1x1 matrices)\n  VectorType v3 = VectorType::Random();\n  MatrixType m3 = v3*v3.transpose(), m4;\n  m3.computeInverseAndDetWithCheck(m4, det, invertible);\n  VERIFY( m1.rows()==1 ? invertible : !invertible );\n  VERIFY_IS_MUCH_SMALLER_THAN(abs(det-m3.determinant()), RealScalar(1));\n  m3.computeInverseWithCheck(m4, invertible);\n  VERIFY( m1.rows()==1 ? invertible : !invertible );\n  \n  // check with submatrices\n  {\n    Matrix<Scalar, MatrixType::RowsAtCompileTime+1, MatrixType::RowsAtCompileTime+1, MatrixType::Options> m5;\n    m5.setRandom();\n    m5.topLeftCorner(m1.rows(),m1.rows()) = m1;\n    m2 = m5.template topLeftCorner<MatrixType::RowsAtCompileTime,MatrixType::ColsAtCompileTime>().inverse();\n    VERIFY_IS_APPROX( (m5.template topLeftCorner<MatrixType::RowsAtCompileTime,MatrixType::ColsAtCompileTime>()), m2.inverse() );\n  }\n}\n\ntemplate<typename MatrixType> void inverse(const MatrixType& m)\n{\n  /* this test covers the following files:\n     Inverse.h\n  */\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  typedef typename MatrixType::Scalar Scalar;\n\n  MatrixType m1(rows, cols),\n             m2(rows, cols),\n             identity = MatrixType::Identity(rows, rows);\n  createRandomPIMatrixOfRank(rows,rows,rows,m1);\n  m2 = m1.inverse();\n  VERIFY_IS_APPROX(m1, m2.inverse() );\n\n  VERIFY_IS_APPROX((Scalar(2)*m2).inverse(), m2.inverse()*Scalar(0.5));\n\n  VERIFY_IS_APPROX(identity, m1.inverse() * m1 );\n  VERIFY_IS_APPROX(identity, m1 * m1.inverse() );\n\n  VERIFY_IS_APPROX(m1, m1.inverse().inverse() );\n\n  // since for the general case we implement separately row-major and col-major, test that\n  VERIFY_IS_APPROX(MatrixType(m1.transpose().inverse()), MatrixType(m1.inverse().transpose()));\n\n  inverse_for_fixed_size(m1);\n\n  // check in-place inversion\n  if(MatrixType::RowsAtCompileTime>=2 && MatrixType::RowsAtCompileTime<=4)\n  {\n    // in-place is forbidden\n    VERIFY_RAISES_ASSERT(m1 = m1.inverse());\n  }\n  else\n  {\n    m2 = m1.inverse();\n    m1 = m1.inverse();\n    VERIFY_IS_APPROX(m1,m2);\n  }\n}\n\ntemplate<typename Scalar>\nvoid inverse_zerosized()\n{\n  Matrix<Scalar,Dynamic,Dynamic> A(0,0);\n  {\n    Matrix<Scalar,0,1> b, x;\n    x = A.inverse() * b;\n  }\n  {\n    Matrix<Scalar,Dynamic,Dynamic> b(0,1), x;\n    x = A.inverse() * b;\n    VERIFY_IS_EQUAL(x.rows(), 0);\n    VERIFY_IS_EQUAL(x.cols(), 1);\n  }\n}\n\nEIGEN_DECLARE_TEST(inverse)\n{\n  int s = 0;\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( inverse(Matrix<double,1,1>()) );\n    CALL_SUBTEST_2( inverse(Matrix2d()) );\n    CALL_SUBTEST_3( inverse(Matrix3f()) );\n    CALL_SUBTEST_4( inverse(Matrix4f()) );\n    CALL_SUBTEST_4( inverse(Matrix<float,4,4,DontAlign>()) );\n    \n    s = internal::random<int>(50,320); \n    CALL_SUBTEST_5( inverse(MatrixXf(s,s)) );\n    TEST_SET_BUT_UNUSED_VARIABLE(s)\n    CALL_SUBTEST_5( inverse_zerosized<float>() );\n    \n    s = internal::random<int>(25,100);\n    CALL_SUBTEST_6( inverse(MatrixXcd(s,s)) );\n    TEST_SET_BUT_UNUSED_VARIABLE(s)\n    \n    CALL_SUBTEST_7( inverse(Matrix4d()) );\n    CALL_SUBTEST_7( inverse(Matrix<double,4,4,DontAlign>()) );\n\n    CALL_SUBTEST_8( inverse(Matrix4cd()) );\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/io.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2019 Joel Holdsworth <joel.holdsworth@vcatechnology.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include <sstream>\n\n#include \"main.h\"\n\ntemplate<typename Scalar>\nstruct check_ostream_impl\n{\n  static void run()\n  {\n    const Array<Scalar,1,1> array(123);\n    std::ostringstream ss;\n    ss << array;\n    VERIFY(ss.str() == \"123\");\n\n    check_ostream_impl< std::complex<Scalar> >::run();\n  };\n};\n\ntemplate<>\nstruct check_ostream_impl<bool>\n{\n  static void run()\n  {\n    const Array<bool,1,2> array(1, 0);\n    std::ostringstream ss;\n    ss << array;\n    VERIFY(ss.str() == \"1  0\");\n  };\n};\n\ntemplate<typename Scalar>\nstruct check_ostream_impl< std::complex<Scalar> >\n{\n  static void run()\n  {\n    const Array<std::complex<Scalar>,1,1> array(std::complex<Scalar>(12, 34));\n    std::ostringstream ss;\n    ss << array;\n    VERIFY(ss.str() == \"(12,34)\");\n  };\n};\n\ntemplate<typename Scalar>\nstatic void check_ostream()\n{\n  check_ostream_impl<Scalar>::run();\n}\n\nEIGEN_DECLARE_TEST(rand)\n{\n  CALL_SUBTEST(check_ostream<bool>());\n  CALL_SUBTEST(check_ostream<float>());\n  CALL_SUBTEST(check_ostream<double>());\n  CALL_SUBTEST(check_ostream<Eigen::numext::int8_t>());\n  CALL_SUBTEST(check_ostream<Eigen::numext::uint8_t>());\n  CALL_SUBTEST(check_ostream<Eigen::numext::int16_t>());\n  CALL_SUBTEST(check_ostream<Eigen::numext::uint16_t>());\n  CALL_SUBTEST(check_ostream<Eigen::numext::int32_t>());\n  CALL_SUBTEST(check_ostream<Eigen::numext::uint32_t>());\n  CALL_SUBTEST(check_ostream<Eigen::numext::int64_t>());\n  CALL_SUBTEST(check_ostream<Eigen::numext::uint64_t>());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/is_same_dense.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\nusing internal::is_same_dense;\n\nEIGEN_DECLARE_TEST(is_same_dense)\n{\n  typedef Matrix<double,Dynamic,Dynamic,ColMajor> ColMatrixXd;\n  typedef Matrix<std::complex<double>,Dynamic,Dynamic,ColMajor> ColMatrixXcd;\n  ColMatrixXd m1(10,10);\n  ColMatrixXcd m2(10,10);\n  Ref<ColMatrixXd> ref_m1(m1);\n  Ref<ColMatrixXd,0, Stride<Dynamic,Dynamic> >  ref_m2_real(m2.real());\n  Ref<const ColMatrixXd> const_ref_m1(m1);\n\n  VERIFY(is_same_dense(m1,m1));\n  VERIFY(is_same_dense(m1,ref_m1));\n  VERIFY(is_same_dense(const_ref_m1,m1));\n  VERIFY(is_same_dense(const_ref_m1,ref_m1));\n  \n  VERIFY(is_same_dense(m1.block(0,0,m1.rows(),m1.cols()),m1));\n  VERIFY(!is_same_dense(m1.row(0),m1.col(0)));\n  \n  Ref<const ColMatrixXd> const_ref_m1_row(m1.row(1));\n  VERIFY(!is_same_dense(m1.row(1),const_ref_m1_row));\n  \n  Ref<const ColMatrixXd> const_ref_m1_col(m1.col(1));\n  VERIFY(is_same_dense(m1.col(1),const_ref_m1_col));\n\n\n  VERIFY(!is_same_dense(m1, ref_m2_real));\n  VERIFY(!is_same_dense(m2, ref_m2_real));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/jacobi.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <Eigen/SVD>\n\ntemplate<typename MatrixType, typename JacobiScalar>\nvoid jacobi(const MatrixType& m = MatrixType())\n{\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  enum {\n    RowsAtCompileTime = MatrixType::RowsAtCompileTime,\n    ColsAtCompileTime = MatrixType::ColsAtCompileTime\n  };\n\n  typedef Matrix<JacobiScalar, 2, 1> JacobiVector;\n\n  const MatrixType a(MatrixType::Random(rows, cols));\n\n  JacobiVector v = JacobiVector::Random().normalized();\n  JacobiScalar c = v.x(), s = v.y();\n  JacobiRotation<JacobiScalar> rot(c, s);\n\n  {\n    Index p = internal::random<Index>(0, rows-1);\n    Index q;\n    do {\n      q = internal::random<Index>(0, rows-1);\n    } while (q == p);\n\n    MatrixType b = a;\n    b.applyOnTheLeft(p, q, rot);\n    VERIFY_IS_APPROX(b.row(p), c * a.row(p) + numext::conj(s) * a.row(q));\n    VERIFY_IS_APPROX(b.row(q), -s * a.row(p) + numext::conj(c) * a.row(q));\n  }\n\n  {\n    Index p = internal::random<Index>(0, cols-1);\n    Index q;\n    do {\n      q = internal::random<Index>(0, cols-1);\n    } while (q == p);\n\n    MatrixType b = a;\n    b.applyOnTheRight(p, q, rot);\n    VERIFY_IS_APPROX(b.col(p), c * a.col(p) - s * a.col(q));\n    VERIFY_IS_APPROX(b.col(q), numext::conj(s) * a.col(p) + numext::conj(c) * a.col(q));\n  }\n}\n\nEIGEN_DECLARE_TEST(jacobi)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1(( jacobi<Matrix3f, float>() ));\n    CALL_SUBTEST_2(( jacobi<Matrix4d, double>() ));\n    CALL_SUBTEST_3(( jacobi<Matrix4cf, float>() ));\n    CALL_SUBTEST_3(( jacobi<Matrix4cf, std::complex<float> >() ));\n\n    int r = internal::random<int>(2, internal::random<int>(1,EIGEN_TEST_MAX_SIZE)/2),\n        c = internal::random<int>(2, internal::random<int>(1,EIGEN_TEST_MAX_SIZE)/2);\n    CALL_SUBTEST_4(( jacobi<MatrixXf, float>(MatrixXf(r,c)) ));\n    CALL_SUBTEST_5(( jacobi<MatrixXcd, double>(MatrixXcd(r,c)) ));\n    CALL_SUBTEST_5(( jacobi<MatrixXcd, std::complex<double> >(MatrixXcd(r,c)) ));\n    // complex<float> is really important to test as it is the only way to cover conjugation issues in certain unaligned paths\n    CALL_SUBTEST_6(( jacobi<MatrixXcf, float>(MatrixXcf(r,c)) ));\n    CALL_SUBTEST_6(( jacobi<MatrixXcf, std::complex<float> >(MatrixXcf(r,c)) ));\n    \n    TEST_SET_BUT_UNUSED_VARIABLE(r);\n    TEST_SET_BUT_UNUSED_VARIABLE(c);\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/jacobisvd.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n// discard stack allocation as that too bypasses malloc\n#define EIGEN_STACK_ALLOCATION_LIMIT 0\n#define EIGEN_RUNTIME_NO_MALLOC\n#include \"main.h\"\n#include <Eigen/SVD>\n\n#define SVD_DEFAULT(M) JacobiSVD<M>\n#define SVD_FOR_MIN_NORM(M) JacobiSVD<M,ColPivHouseholderQRPreconditioner>\n#include \"svd_common.h\"\n\n// Check all variants of JacobiSVD\ntemplate<typename MatrixType>\nvoid jacobisvd(const MatrixType& a = MatrixType(), bool pickrandom = true)\n{\n  MatrixType m = a;\n  if(pickrandom)\n    svd_fill_random(m);\n\n  CALL_SUBTEST(( svd_test_all_computation_options<JacobiSVD<MatrixType, FullPivHouseholderQRPreconditioner> >(m, true)  )); // check full only\n  CALL_SUBTEST(( svd_test_all_computation_options<JacobiSVD<MatrixType, ColPivHouseholderQRPreconditioner>  >(m, false) ));\n  CALL_SUBTEST(( svd_test_all_computation_options<JacobiSVD<MatrixType, HouseholderQRPreconditioner>        >(m, false) ));\n  if(m.rows()==m.cols())\n    CALL_SUBTEST(( svd_test_all_computation_options<JacobiSVD<MatrixType, NoQRPreconditioner>               >(m, false) ));\n}\n\ntemplate<typename MatrixType> void jacobisvd_verify_assert(const MatrixType& m)\n{\n  svd_verify_assert<JacobiSVD<MatrixType> >(m);\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  enum {\n    ColsAtCompileTime = MatrixType::ColsAtCompileTime\n  };\n\n\n  MatrixType a = MatrixType::Zero(rows, cols);\n  a.setZero();\n\n  if (ColsAtCompileTime == Dynamic)\n  {\n    JacobiSVD<MatrixType, FullPivHouseholderQRPreconditioner> svd_fullqr;\n    VERIFY_RAISES_ASSERT(svd_fullqr.compute(a, ComputeFullU|ComputeThinV))\n    VERIFY_RAISES_ASSERT(svd_fullqr.compute(a, ComputeThinU|ComputeThinV))\n    VERIFY_RAISES_ASSERT(svd_fullqr.compute(a, ComputeThinU|ComputeFullV))\n  }\n}\n\ntemplate<typename MatrixType>\nvoid jacobisvd_method()\n{\n  enum { Size = MatrixType::RowsAtCompileTime };\n  typedef typename MatrixType::RealScalar RealScalar;\n  typedef Matrix<RealScalar, Size, 1> RealVecType;\n  MatrixType m = MatrixType::Identity();\n  VERIFY_IS_APPROX(m.jacobiSvd().singularValues(), RealVecType::Ones());\n  VERIFY_RAISES_ASSERT(m.jacobiSvd().matrixU());\n  VERIFY_RAISES_ASSERT(m.jacobiSvd().matrixV());\n  VERIFY_IS_APPROX(m.jacobiSvd(ComputeFullU|ComputeFullV).solve(m), m);\n  VERIFY_IS_APPROX(m.jacobiSvd(ComputeFullU|ComputeFullV).transpose().solve(m), m);\n  VERIFY_IS_APPROX(m.jacobiSvd(ComputeFullU|ComputeFullV).adjoint().solve(m), m);\n}\n\nnamespace Foo {\n// older compiler require a default constructor for Bar\n// cf: https://stackoverflow.com/questions/7411515/\nclass Bar {public: Bar() {}};\nbool operator<(const Bar&, const Bar&) { return true; }\n}\n// regression test for a very strange MSVC issue for which simply\n// including SVDBase.h messes up with std::max and custom scalar type\nvoid msvc_workaround()\n{\n  const Foo::Bar a;\n  const Foo::Bar b;\n  std::max EIGEN_NOT_A_MACRO (a,b);\n}\n\nEIGEN_DECLARE_TEST(jacobisvd)\n{\n  CALL_SUBTEST_3(( jacobisvd_verify_assert(Matrix3f()) ));\n  CALL_SUBTEST_4(( jacobisvd_verify_assert(Matrix4d()) ));\n  CALL_SUBTEST_7(( jacobisvd_verify_assert(MatrixXf(10,12)) ));\n  CALL_SUBTEST_8(( jacobisvd_verify_assert(MatrixXcd(7,5)) ));\n  \n  CALL_SUBTEST_11(svd_all_trivial_2x2(jacobisvd<Matrix2cd>));\n  CALL_SUBTEST_12(svd_all_trivial_2x2(jacobisvd<Matrix2d>));\n\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_3(( jacobisvd<Matrix3f>() ));\n    CALL_SUBTEST_4(( jacobisvd<Matrix4d>() ));\n    CALL_SUBTEST_5(( jacobisvd<Matrix<float,3,5> >() ));\n    CALL_SUBTEST_6(( jacobisvd<Matrix<double,Dynamic,2> >(Matrix<double,Dynamic,2>(10,2)) ));\n\n    int r = internal::random<int>(1, 30),\n        c = internal::random<int>(1, 30);\n    \n    TEST_SET_BUT_UNUSED_VARIABLE(r)\n    TEST_SET_BUT_UNUSED_VARIABLE(c)\n    \n    CALL_SUBTEST_10(( jacobisvd<MatrixXd>(MatrixXd(r,c)) ));\n    CALL_SUBTEST_7(( jacobisvd<MatrixXf>(MatrixXf(r,c)) ));\n    CALL_SUBTEST_8(( jacobisvd<MatrixXcd>(MatrixXcd(r,c)) ));\n    (void) r;\n    (void) c;\n\n    // Test on inf/nan matrix\n    CALL_SUBTEST_7(  (svd_inf_nan<JacobiSVD<MatrixXf>, MatrixXf>()) );\n    CALL_SUBTEST_10( (svd_inf_nan<JacobiSVD<MatrixXd>, MatrixXd>()) );\n\n    // bug1395 test compile-time vectors as input\n    CALL_SUBTEST_13(( jacobisvd_verify_assert(Matrix<double,6,1>()) ));\n    CALL_SUBTEST_13(( jacobisvd_verify_assert(Matrix<double,1,6>()) ));\n    CALL_SUBTEST_13(( jacobisvd_verify_assert(Matrix<double,Dynamic,1>(r)) ));\n    CALL_SUBTEST_13(( jacobisvd_verify_assert(Matrix<double,1,Dynamic>(c)) ));\n  }\n\n  CALL_SUBTEST_7(( jacobisvd<MatrixXf>(MatrixXf(internal::random<int>(EIGEN_TEST_MAX_SIZE/4, EIGEN_TEST_MAX_SIZE/2), internal::random<int>(EIGEN_TEST_MAX_SIZE/4, EIGEN_TEST_MAX_SIZE/2))) ));\n  CALL_SUBTEST_8(( jacobisvd<MatrixXcd>(MatrixXcd(internal::random<int>(EIGEN_TEST_MAX_SIZE/4, EIGEN_TEST_MAX_SIZE/3), internal::random<int>(EIGEN_TEST_MAX_SIZE/4, EIGEN_TEST_MAX_SIZE/3))) ));\n\n  // test matrixbase method\n  CALL_SUBTEST_1(( jacobisvd_method<Matrix2cd>() ));\n  CALL_SUBTEST_3(( jacobisvd_method<Matrix3f>() ));\n\n  // Test problem size constructors\n  CALL_SUBTEST_7( JacobiSVD<MatrixXf>(10,10) );\n\n  // Check that preallocation avoids subsequent mallocs\n  CALL_SUBTEST_9( svd_preallocate<void>() );\n\n  CALL_SUBTEST_2( svd_underoverflow<void>() );\n\n  msvc_workaround();\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/klu_support.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2011 Gael Guennebaud <g.gael@free.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_NO_DEBUG_SMALL_PRODUCT_BLOCKS\n#include \"sparse_solver.h\"\n\n#include <Eigen/KLUSupport>\n\ntemplate<typename T> void test_klu_support_T()\n{\n  KLU<SparseMatrix<T, ColMajor> > klu_colmajor;\n  KLU<SparseMatrix<T, RowMajor> > klu_rowmajor;\n  \n  check_sparse_square_solving(klu_colmajor);\n  check_sparse_square_solving(klu_rowmajor);\n  \n  //check_sparse_square_determinant(umfpack_colmajor);\n  //check_sparse_square_determinant(umfpack_rowmajor);\n}\n\nEIGEN_DECLARE_TEST(klu_support)\n{\n  CALL_SUBTEST_1(test_klu_support_T<double>());\n  CALL_SUBTEST_2(test_klu_support_T<std::complex<double> >());\n}\n\n"
  },
  {
    "path": "3rdparty/eigen3/test/linearstructure.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\nstatic bool g_called;\n#define EIGEN_SCALAR_BINARY_OP_PLUGIN { g_called |= (!internal::is_same<LhsScalar,RhsScalar>::value); }\n\n#include \"main.h\"\n\ntemplate<typename MatrixType> void linearStructure(const MatrixType& m)\n{\n  using std::abs;\n  /* this test covers the following files:\n     CwiseUnaryOp.h, CwiseBinaryOp.h, SelfCwiseBinaryOp.h \n  */\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename MatrixType::RealScalar RealScalar;\n\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  // this test relies a lot on Random.h, and there's not much more that we can do\n  // to test it, hence I consider that we will have tested Random.h\n  MatrixType m1 = MatrixType::Random(rows, cols),\n             m2 = MatrixType::Random(rows, cols),\n             m3(rows, cols);\n\n  Scalar s1 = internal::random<Scalar>();\n  while (abs(s1)<RealScalar(1e-3)) s1 = internal::random<Scalar>();\n\n  Index r = internal::random<Index>(0, rows-1),\n        c = internal::random<Index>(0, cols-1);\n\n  VERIFY_IS_APPROX(-(-m1),                  m1);\n  VERIFY_IS_APPROX(m1+m1,                   2*m1);\n  VERIFY_IS_APPROX(m1+m2-m1,                m2);\n  VERIFY_IS_APPROX(-m2+m1+m2,               m1);\n  VERIFY_IS_APPROX(m1*s1,                   s1*m1);\n  VERIFY_IS_APPROX((m1+m2)*s1,              s1*m1+s1*m2);\n  VERIFY_IS_APPROX((-m1+m2)*s1,             -s1*m1+s1*m2);\n  m3 = m2; m3 += m1;\n  VERIFY_IS_APPROX(m3,                      m1+m2);\n  m3 = m2; m3 -= m1;\n  VERIFY_IS_APPROX(m3,                      m2-m1);\n  m3 = m2; m3 *= s1;\n  VERIFY_IS_APPROX(m3,                      s1*m2);\n  if(!NumTraits<Scalar>::IsInteger)\n  {\n    m3 = m2; m3 /= s1;\n    VERIFY_IS_APPROX(m3,                    m2/s1);\n  }\n\n  // again, test operator() to check const-qualification\n  VERIFY_IS_APPROX((-m1)(r,c), -(m1(r,c)));\n  VERIFY_IS_APPROX((m1-m2)(r,c), (m1(r,c))-(m2(r,c)));\n  VERIFY_IS_APPROX((m1+m2)(r,c), (m1(r,c))+(m2(r,c)));\n  VERIFY_IS_APPROX((s1*m1)(r,c), s1*(m1(r,c)));\n  VERIFY_IS_APPROX((m1*s1)(r,c), (m1(r,c))*s1);\n  if(!NumTraits<Scalar>::IsInteger)\n    VERIFY_IS_APPROX((m1/s1)(r,c), (m1(r,c))/s1);\n\n  // use .block to disable vectorization and compare to the vectorized version\n  VERIFY_IS_APPROX(m1+m1.block(0,0,rows,cols), m1+m1);\n  VERIFY_IS_APPROX(m1.cwiseProduct(m1.block(0,0,rows,cols)), m1.cwiseProduct(m1));\n  VERIFY_IS_APPROX(m1 - m1.block(0,0,rows,cols), m1 - m1);\n  VERIFY_IS_APPROX(m1.block(0,0,rows,cols) * s1, m1 * s1);\n}\n\n// Make sure that complex * real and real * complex are properly optimized\ntemplate<typename MatrixType> void real_complex(DenseIndex rows = MatrixType::RowsAtCompileTime, DenseIndex cols = MatrixType::ColsAtCompileTime)\n{\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename MatrixType::RealScalar RealScalar;\n  \n  RealScalar s = internal::random<RealScalar>();\n  MatrixType m1 = MatrixType::Random(rows, cols);\n  \n  g_called = false;\n  VERIFY_IS_APPROX(s*m1, Scalar(s)*m1);\n  VERIFY(g_called && \"real * matrix<complex> not properly optimized\");\n  \n  g_called = false;\n  VERIFY_IS_APPROX(m1*s, m1*Scalar(s));\n  VERIFY(g_called && \"matrix<complex> * real not properly optimized\");\n  \n  g_called = false;\n  VERIFY_IS_APPROX(m1/s, m1/Scalar(s));\n  VERIFY(g_called && \"matrix<complex> / real not properly optimized\");\n\n  g_called = false;\n  VERIFY_IS_APPROX(s+m1.array(), Scalar(s)+m1.array());\n  VERIFY(g_called && \"real + matrix<complex> not properly optimized\");\n\n  g_called = false;\n  VERIFY_IS_APPROX(m1.array()+s, m1.array()+Scalar(s));\n  VERIFY(g_called && \"matrix<complex> + real not properly optimized\");\n\n  g_called = false;\n  VERIFY_IS_APPROX(s-m1.array(), Scalar(s)-m1.array());\n  VERIFY(g_called && \"real - matrix<complex> not properly optimized\");\n\n  g_called = false;\n  VERIFY_IS_APPROX(m1.array()-s, m1.array()-Scalar(s));\n  VERIFY(g_called && \"matrix<complex> - real not properly optimized\");\n}\n\ntemplate<int>\nvoid linearstructure_overflow()\n{\n  // make sure that /=scalar and /scalar do not overflow\n  // rational: 1.0/4.94e-320 overflow, but m/4.94e-320 should not\n  Matrix4d m2, m3;\n  m3 = m2 =  Matrix4d::Random()*1e-20;\n  m2 = m2 / 4.9e-320;\n  VERIFY_IS_APPROX(m2.cwiseQuotient(m2), Matrix4d::Ones());\n  m3 /= 4.9e-320;\n  VERIFY_IS_APPROX(m3.cwiseQuotient(m3), Matrix4d::Ones());\n}\n\nEIGEN_DECLARE_TEST(linearstructure)\n{\n  g_called = true;\n  VERIFY(g_called); // avoid `unneeded-internal-declaration` warning.\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( linearStructure(Matrix<float, 1, 1>()) );\n    CALL_SUBTEST_2( linearStructure(Matrix2f()) );\n    CALL_SUBTEST_3( linearStructure(Vector3d()) );\n    CALL_SUBTEST_4( linearStructure(Matrix4d()) );\n    CALL_SUBTEST_5( linearStructure(MatrixXcf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE/2), internal::random<int>(1,EIGEN_TEST_MAX_SIZE/2))) );\n    CALL_SUBTEST_6( linearStructure(MatrixXf (internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_7( linearStructure(MatrixXi (internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_8( linearStructure(MatrixXcd(internal::random<int>(1,EIGEN_TEST_MAX_SIZE/2), internal::random<int>(1,EIGEN_TEST_MAX_SIZE/2))) );\n    CALL_SUBTEST_9( linearStructure(ArrayXXf (internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_10( linearStructure(ArrayXXcf (internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    \n    CALL_SUBTEST_11( real_complex<Matrix4cd>() );\n    CALL_SUBTEST_11( real_complex<MatrixXcf>(10,10) );\n    CALL_SUBTEST_11( real_complex<ArrayXXcf>(10,10) );\n  }\n  CALL_SUBTEST_4( linearstructure_overflow<0>() );\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/lscg.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2011 Gael Guennebaud <g.gael@free.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"sparse_solver.h\"\n#include <Eigen/IterativeLinearSolvers>\n\ntemplate<typename T> void test_lscg_T()\n{\n  LeastSquaresConjugateGradient<SparseMatrix<T> > lscg_colmajor_diag;\n  LeastSquaresConjugateGradient<SparseMatrix<T>, IdentityPreconditioner> lscg_colmajor_I;\n  LeastSquaresConjugateGradient<SparseMatrix<T,RowMajor> > lscg_rowmajor_diag;\n  LeastSquaresConjugateGradient<SparseMatrix<T,RowMajor>, IdentityPreconditioner> lscg_rowmajor_I;\n\n  CALL_SUBTEST( check_sparse_square_solving(lscg_colmajor_diag)  );\n  CALL_SUBTEST( check_sparse_square_solving(lscg_colmajor_I)     );\n  \n  CALL_SUBTEST( check_sparse_leastsquare_solving(lscg_colmajor_diag)  );\n  CALL_SUBTEST( check_sparse_leastsquare_solving(lscg_colmajor_I)     );\n\n  CALL_SUBTEST( check_sparse_square_solving(lscg_rowmajor_diag)  );\n  CALL_SUBTEST( check_sparse_square_solving(lscg_rowmajor_I)     );\n\n  CALL_SUBTEST( check_sparse_leastsquare_solving(lscg_rowmajor_diag)  );\n  CALL_SUBTEST( check_sparse_leastsquare_solving(lscg_rowmajor_I)     );\n}\n\nEIGEN_DECLARE_TEST(lscg)\n{\n  CALL_SUBTEST_1(test_lscg_T<double>());\n  CALL_SUBTEST_2(test_lscg_T<std::complex<double> >());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/lu.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <Eigen/LU>\n#include \"solverbase.h\"\nusing namespace std;\n\ntemplate<typename MatrixType>\ntypename MatrixType::RealScalar matrix_l1_norm(const MatrixType& m) {\n  return m.cwiseAbs().colwise().sum().maxCoeff();\n}\n\ntemplate<typename MatrixType> void lu_non_invertible()\n{\n  STATIC_CHECK(( internal::is_same<typename FullPivLU<MatrixType>::StorageIndex,int>::value ));\n\n  typedef typename MatrixType::RealScalar RealScalar;\n  /* this test covers the following files:\n     LU.h\n  */\n  Index rows, cols, cols2;\n  if(MatrixType::RowsAtCompileTime==Dynamic)\n  {\n    rows = internal::random<Index>(2,EIGEN_TEST_MAX_SIZE);\n  }\n  else\n  {\n    rows = MatrixType::RowsAtCompileTime;\n  }\n  if(MatrixType::ColsAtCompileTime==Dynamic)\n  {\n    cols = internal::random<Index>(2,EIGEN_TEST_MAX_SIZE);\n    cols2 = internal::random<int>(2,EIGEN_TEST_MAX_SIZE);\n  }\n  else\n  {\n    cols2 = cols = MatrixType::ColsAtCompileTime;\n  }\n\n  enum {\n    RowsAtCompileTime = MatrixType::RowsAtCompileTime,\n    ColsAtCompileTime = MatrixType::ColsAtCompileTime\n  };\n  typedef typename internal::kernel_retval_base<FullPivLU<MatrixType> >::ReturnType KernelMatrixType;\n  typedef typename internal::image_retval_base<FullPivLU<MatrixType> >::ReturnType ImageMatrixType;\n  typedef Matrix<typename MatrixType::Scalar, ColsAtCompileTime, ColsAtCompileTime>\n          CMatrixType;\n  typedef Matrix<typename MatrixType::Scalar, RowsAtCompileTime, RowsAtCompileTime>\n          RMatrixType;\n\n  Index rank = internal::random<Index>(1, (std::min)(rows, cols)-1);\n\n  // The image of the zero matrix should consist of a single (zero) column vector\n  VERIFY((MatrixType::Zero(rows,cols).fullPivLu().image(MatrixType::Zero(rows,cols)).cols() == 1));\n\n  // The kernel of the zero matrix is the entire space, and thus is an invertible matrix of dimensions cols.\n  KernelMatrixType kernel = MatrixType::Zero(rows,cols).fullPivLu().kernel();\n  VERIFY((kernel.fullPivLu().isInvertible()));\n\n  MatrixType m1(rows, cols), m3(rows, cols2);\n  CMatrixType m2(cols, cols2);\n  createRandomPIMatrixOfRank(rank, rows, cols, m1);\n\n  FullPivLU<MatrixType> lu;\n\n  // The special value 0.01 below works well in tests. Keep in mind that we're only computing the rank\n  // of singular values are either 0 or 1.\n  // So it's not clear at all that the epsilon should play any role there.\n  lu.setThreshold(RealScalar(0.01));\n  lu.compute(m1);\n\n  MatrixType u(rows,cols);\n  u = lu.matrixLU().template triangularView<Upper>();\n  RMatrixType l = RMatrixType::Identity(rows,rows);\n  l.block(0,0,rows,(std::min)(rows,cols)).template triangularView<StrictlyLower>()\n    = lu.matrixLU().block(0,0,rows,(std::min)(rows,cols));\n\n  VERIFY_IS_APPROX(lu.permutationP() * m1 * lu.permutationQ(), l*u);\n\n  KernelMatrixType m1kernel = lu.kernel();\n  ImageMatrixType m1image = lu.image(m1);\n\n  VERIFY_IS_APPROX(m1, lu.reconstructedMatrix());\n  VERIFY(rank == lu.rank());\n  VERIFY(cols - lu.rank() == lu.dimensionOfKernel());\n  VERIFY(!lu.isInjective());\n  VERIFY(!lu.isInvertible());\n  VERIFY(!lu.isSurjective());\n  VERIFY_IS_MUCH_SMALLER_THAN((m1 * m1kernel), m1);\n  VERIFY(m1image.fullPivLu().rank() == rank);\n  VERIFY_IS_APPROX(m1 * m1.adjoint() * m1image, m1image);\n\n  check_solverbase<CMatrixType, MatrixType>(m1, lu, rows, cols, cols2);\n\n  m2 = CMatrixType::Random(cols,cols2);\n  m3 = m1*m2;\n  m2 = CMatrixType::Random(cols,cols2);\n  // test that the code, which does resize(), may be applied to an xpr\n  m2.block(0,0,m2.rows(),m2.cols()) = lu.solve(m3);\n  VERIFY_IS_APPROX(m3, m1*m2);\n}\n\ntemplate<typename MatrixType> void lu_invertible()\n{\n  /* this test covers the following files:\n     FullPivLU.h\n  */\n  typedef typename NumTraits<typename MatrixType::Scalar>::Real RealScalar;\n  Index size = MatrixType::RowsAtCompileTime;\n  if( size==Dynamic)\n    size = internal::random<Index>(1,EIGEN_TEST_MAX_SIZE);\n\n  MatrixType m1(size, size), m2(size, size), m3(size, size);\n  FullPivLU<MatrixType> lu;\n  lu.setThreshold(RealScalar(0.01));\n  do {\n    m1 = MatrixType::Random(size,size);\n    lu.compute(m1);\n  } while(!lu.isInvertible());\n\n  VERIFY_IS_APPROX(m1, lu.reconstructedMatrix());\n  VERIFY(0 == lu.dimensionOfKernel());\n  VERIFY(lu.kernel().cols() == 1); // the kernel() should consist of a single (zero) column vector\n  VERIFY(size == lu.rank());\n  VERIFY(lu.isInjective());\n  VERIFY(lu.isSurjective());\n  VERIFY(lu.isInvertible());\n  VERIFY(lu.image(m1).fullPivLu().isInvertible());\n\n  check_solverbase<MatrixType, MatrixType>(m1, lu, size, size, size);\n\n  MatrixType m1_inverse = lu.inverse();\n  m3 = MatrixType::Random(size,size);\n  m2 = lu.solve(m3);\n  VERIFY_IS_APPROX(m2, m1_inverse*m3);\n\n  RealScalar rcond = (RealScalar(1) / matrix_l1_norm(m1)) / matrix_l1_norm(m1_inverse);\n  const RealScalar rcond_est = lu.rcond();\n  // Verify that the estimated condition number is within a factor of 10 of the\n  // truth.\n  VERIFY(rcond_est > rcond / 10 && rcond_est < rcond * 10);\n\n  // Regression test for Bug 302\n  MatrixType m4 = MatrixType::Random(size,size);\n  VERIFY_IS_APPROX(lu.solve(m3*m4), lu.solve(m3)*m4);\n}\n\ntemplate<typename MatrixType> void lu_partial_piv(Index size = MatrixType::ColsAtCompileTime)\n{\n  /* this test covers the following files:\n     PartialPivLU.h\n  */\n  typedef typename NumTraits<typename MatrixType::Scalar>::Real RealScalar;\n\n  MatrixType m1(size, size), m2(size, size), m3(size, size);\n  m1.setRandom();\n  PartialPivLU<MatrixType> plu(m1);\n\n  STATIC_CHECK(( internal::is_same<typename PartialPivLU<MatrixType>::StorageIndex,int>::value ));\n\n  VERIFY_IS_APPROX(m1, plu.reconstructedMatrix());\n\n  check_solverbase<MatrixType, MatrixType>(m1, plu, size, size, size);\n\n  MatrixType m1_inverse = plu.inverse();\n  m3 = MatrixType::Random(size,size);\n  m2 = plu.solve(m3);\n  VERIFY_IS_APPROX(m2, m1_inverse*m3);\n\n  RealScalar rcond = (RealScalar(1) / matrix_l1_norm(m1)) / matrix_l1_norm(m1_inverse);\n  const RealScalar rcond_est = plu.rcond();\n  // Verify that the estimate is within a factor of 10 of the truth.\n  VERIFY(rcond_est > rcond / 10 && rcond_est < rcond * 10);\n}\n\ntemplate<typename MatrixType> void lu_verify_assert()\n{\n  MatrixType tmp;\n\n  FullPivLU<MatrixType> lu;\n  VERIFY_RAISES_ASSERT(lu.matrixLU())\n  VERIFY_RAISES_ASSERT(lu.permutationP())\n  VERIFY_RAISES_ASSERT(lu.permutationQ())\n  VERIFY_RAISES_ASSERT(lu.kernel())\n  VERIFY_RAISES_ASSERT(lu.image(tmp))\n  VERIFY_RAISES_ASSERT(lu.solve(tmp))\n  VERIFY_RAISES_ASSERT(lu.transpose().solve(tmp))\n  VERIFY_RAISES_ASSERT(lu.adjoint().solve(tmp))\n  VERIFY_RAISES_ASSERT(lu.determinant())\n  VERIFY_RAISES_ASSERT(lu.rank())\n  VERIFY_RAISES_ASSERT(lu.dimensionOfKernel())\n  VERIFY_RAISES_ASSERT(lu.isInjective())\n  VERIFY_RAISES_ASSERT(lu.isSurjective())\n  VERIFY_RAISES_ASSERT(lu.isInvertible())\n  VERIFY_RAISES_ASSERT(lu.inverse())\n\n  PartialPivLU<MatrixType> plu;\n  VERIFY_RAISES_ASSERT(plu.matrixLU())\n  VERIFY_RAISES_ASSERT(plu.permutationP())\n  VERIFY_RAISES_ASSERT(plu.solve(tmp))\n  VERIFY_RAISES_ASSERT(plu.transpose().solve(tmp))\n  VERIFY_RAISES_ASSERT(plu.adjoint().solve(tmp))\n  VERIFY_RAISES_ASSERT(plu.determinant())\n  VERIFY_RAISES_ASSERT(plu.inverse())\n}\n\nEIGEN_DECLARE_TEST(lu)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( lu_non_invertible<Matrix3f>() );\n    CALL_SUBTEST_1( lu_invertible<Matrix3f>() );\n    CALL_SUBTEST_1( lu_verify_assert<Matrix3f>() );\n    CALL_SUBTEST_1( lu_partial_piv<Matrix3f>() );\n\n    CALL_SUBTEST_2( (lu_non_invertible<Matrix<double, 4, 6> >()) );\n    CALL_SUBTEST_2( (lu_verify_assert<Matrix<double, 4, 6> >()) );\n    CALL_SUBTEST_2( lu_partial_piv<Matrix2d>() );\n    CALL_SUBTEST_2( lu_partial_piv<Matrix4d>() );\n    CALL_SUBTEST_2( (lu_partial_piv<Matrix<double,6,6> >()) );\n\n    CALL_SUBTEST_3( lu_non_invertible<MatrixXf>() );\n    CALL_SUBTEST_3( lu_invertible<MatrixXf>() );\n    CALL_SUBTEST_3( lu_verify_assert<MatrixXf>() );\n\n    CALL_SUBTEST_4( lu_non_invertible<MatrixXd>() );\n    CALL_SUBTEST_4( lu_invertible<MatrixXd>() );\n    CALL_SUBTEST_4( lu_partial_piv<MatrixXd>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE)) );\n    CALL_SUBTEST_4( lu_verify_assert<MatrixXd>() );\n\n    CALL_SUBTEST_5( lu_non_invertible<MatrixXcf>() );\n    CALL_SUBTEST_5( lu_invertible<MatrixXcf>() );\n    CALL_SUBTEST_5( lu_verify_assert<MatrixXcf>() );\n\n    CALL_SUBTEST_6( lu_non_invertible<MatrixXcd>() );\n    CALL_SUBTEST_6( lu_invertible<MatrixXcd>() );\n    CALL_SUBTEST_6( lu_partial_piv<MatrixXcd>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE)) );\n    CALL_SUBTEST_6( lu_verify_assert<MatrixXcd>() );\n\n    CALL_SUBTEST_7(( lu_non_invertible<Matrix<float,Dynamic,16> >() ));\n\n    // Test problem size constructors\n    CALL_SUBTEST_9( PartialPivLU<MatrixXf>(10) );\n    CALL_SUBTEST_9( FullPivLU<MatrixXf>(10, 20); );\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/main.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include <cstdlib>\n#include <cerrno>\n#include <ctime>\n#include <iostream>\n#include <fstream>\n#include <string>\n#include <sstream>\n#include <vector>\n#include <typeinfo>\n#include <functional>\n\n// The following includes of STL headers have to be done _before_ the\n// definition of macros min() and max().  The reason is that many STL\n// implementations will not work properly as the min and max symbols collide\n// with the STL functions std:min() and std::max().  The STL headers may check\n// for the macro definition of min/max and issue a warning or undefine the\n// macros.\n//\n// Still, Windows defines min() and max() in windef.h as part of the regular\n// Windows system interfaces and many other Windows APIs depend on these\n// macros being available.  To prevent the macro expansion of min/max and to\n// make Eigen compatible with the Windows environment all function calls of\n// std::min() and std::max() have to be written with parenthesis around the\n// function name.\n//\n// All STL headers used by Eigen should be included here.  Because main.h is\n// included before any Eigen header and because the STL headers are guarded\n// against multiple inclusions, no STL header will see our own min/max macro\n// definitions.\n#include <limits>\n#include <algorithm>\n#include <complex>\n#include <deque>\n#include <queue>\n#include <cassert>\n#include <list>\n#if __cplusplus >= 201103L\n#include <random>\n#ifdef EIGEN_USE_THREADS\n#include <future>\n#endif\n#endif\n\n// Same for cuda_fp16.h\n#if defined(__CUDACC__) && !defined(EIGEN_NO_CUDA)\n  // Means the compiler is either nvcc or clang with CUDA enabled\n  #define EIGEN_CUDACC __CUDACC__\n#endif\n#if defined(EIGEN_CUDACC)\n#include <cuda.h>\n  #define EIGEN_CUDA_SDK_VER (CUDA_VERSION * 10)\n#else\n  #define EIGEN_CUDA_SDK_VER 0\n#endif\n#if EIGEN_CUDA_SDK_VER >= 70500\n#include <cuda_fp16.h>\n#endif\n\n// To test that all calls from Eigen code to std::min() and std::max() are\n// protected by parenthesis against macro expansion, the min()/max() macros\n// are defined here and any not-parenthesized min/max call will cause a\n// compiler error.\n#if !defined(__HIPCC__) && !defined(EIGEN_USE_SYCL)\n  //\n  // HIP header files include the following files\n  //  <thread>\n  //  <regex>\n  //  <unordered_map>\n  // which seem to contain not-parenthesized calls to \"max\"/\"min\", triggering the following check and causing the compile to fail\n  //\n  // Including those header files before the following macro definition for \"min\" / \"max\", only partially resolves the issue\n  // This is because other HIP header files also define \"isnan\" / \"isinf\" / \"isfinite\" functions, which are needed in other\n  // headers.\n  //\n  // So instead choosing to simply disable this check for HIP\n  //\n  #define min(A,B) please_protect_your_min_with_parentheses\n  #define max(A,B) please_protect_your_max_with_parentheses\n  #define isnan(X) please_protect_your_isnan_with_parentheses\n  #define isinf(X) please_protect_your_isinf_with_parentheses\n  #define isfinite(X) please_protect_your_isfinite_with_parentheses\n#endif\n\n\n// test possible conflicts\nstruct real {};\nstruct imag {};\n\n#ifdef M_PI\n#undef M_PI\n#endif\n#define M_PI please_use_EIGEN_PI_instead_of_M_PI\n\n#define FORBIDDEN_IDENTIFIER (this_identifier_is_forbidden_to_avoid_clashes) this_identifier_is_forbidden_to_avoid_clashes\n// B0 is defined in POSIX header termios.h\n#define B0 FORBIDDEN_IDENTIFIER\n// `I` may be defined by complex.h:\n#define I  FORBIDDEN_IDENTIFIER\n\n// Unit tests calling Eigen's blas library must preserve the default blocking size\n// to avoid troubles.\n#ifndef EIGEN_NO_DEBUG_SMALL_PRODUCT_BLOCKS\n#define EIGEN_DEBUG_SMALL_PRODUCT_BLOCKS\n#endif\n\n// shuts down ICC's remark #593: variable \"XXX\" was set but never used\n#define TEST_SET_BUT_UNUSED_VARIABLE(X) EIGEN_UNUSED_VARIABLE(X)\n\n#ifdef TEST_ENABLE_TEMPORARY_TRACKING\n\nstatic long int nb_temporaries;\nstatic long int nb_temporaries_on_assert = -1;\n\ninline void on_temporary_creation(long int size) {\n  // here's a great place to set a breakpoint when debugging failures in this test!\n  if(size!=0) nb_temporaries++;\n  if(nb_temporaries_on_assert>0) assert(nb_temporaries<nb_temporaries_on_assert);\n}\n\n#define EIGEN_DENSE_STORAGE_CTOR_PLUGIN { on_temporary_creation(size); }\n\n#define VERIFY_EVALUATION_COUNT(XPR,N) {\\\n    nb_temporaries = 0; \\\n    XPR; \\\n    if(nb_temporaries!=(N)) { std::cerr << \"nb_temporaries == \" << nb_temporaries << \"\\n\"; }\\\n    VERIFY( (#XPR) && nb_temporaries==(N) ); \\\n  }\n\n#endif\n\n#include \"split_test_helper.h\"\n\n#ifdef NDEBUG\n#undef NDEBUG\n#endif\n\n// On windows CE, NDEBUG is automatically defined <assert.h> if NDEBUG is not defined.\n#ifndef DEBUG\n#define DEBUG\n#endif\n\n// bounds integer values for AltiVec\n#if defined(__ALTIVEC__) || defined(__VSX__)\n#define EIGEN_MAKING_DOCS\n#endif\n\n#define DEFAULT_REPEAT 10\n\nnamespace Eigen\n{\n  static std::vector<std::string> g_test_stack;\n  // level == 0 <=> abort if test fail\n  // level >= 1 <=> warning message to std::cerr if test fail\n  static int g_test_level = 0;\n  static int g_repeat = 1;\n  static unsigned int g_seed = 0;\n  static bool g_has_set_repeat = false, g_has_set_seed = false;\n\n  class EigenTest\n  {\n  public:\n    EigenTest() : m_func(0) {}\n    EigenTest(const char* a_name, void (*func)(void))\n      : m_name(a_name), m_func(func)\n    {\n      ms_registered_tests.push_back(this);\n    }\n    const std::string& name() const { return m_name; }\n    void operator()() const { m_func(); }\n\n    static const std::vector<EigenTest*>& all() { return ms_registered_tests; }\n  protected:\n    std::string m_name;\n    void (*m_func)(void);\n    static std::vector<EigenTest*> ms_registered_tests;\n  };\n\n  std::vector<EigenTest*> EigenTest::ms_registered_tests;\n\n  // Declare and register a test, e.g.:\n  //    EIGEN_DECLARE_TEST(mytest) { ... }\n  // will create a function:\n  //    void test_mytest() { ... }\n  // that will be automatically called.\n  #define EIGEN_DECLARE_TEST(X) \\\n    void EIGEN_CAT(test_,X) (); \\\n    static EigenTest EIGEN_CAT(test_handler_,X) (EIGEN_MAKESTRING(X), & EIGEN_CAT(test_,X)); \\\n    void EIGEN_CAT(test_,X) ()\n}\n\n#define TRACK std::cerr << __FILE__ << \" \" << __LINE__ << std::endl\n// #define TRACK while()\n\n#define EIGEN_DEFAULT_IO_FORMAT IOFormat(4, 0, \"  \", \"\\n\", \"\", \"\", \"\", \"\")\n\n#if (defined(_CPPUNWIND) || defined(__EXCEPTIONS)) && !defined(__CUDA_ARCH__) && !defined(__HIP_DEVICE_COMPILE__) && !defined(__SYCL_DEVICE_ONLY__)\n  #define EIGEN_EXCEPTIONS\n#endif\n\n#ifndef EIGEN_NO_ASSERTION_CHECKING\n\n  namespace Eigen\n  {\n    static const bool should_raise_an_assert = false;\n\n    // Used to avoid to raise two exceptions at a time in which\n    // case the exception is not properly caught.\n    // This may happen when a second exceptions is triggered in a destructor.\n    static bool no_more_assert = false;\n    static bool report_on_cerr_on_assert_failure = true;\n\n    struct eigen_assert_exception\n    {\n      eigen_assert_exception(void) {}\n      ~eigen_assert_exception() { Eigen::no_more_assert = false; }\n    };\n\n    struct eigen_static_assert_exception\n    {\n      eigen_static_assert_exception(void) {}\n      ~eigen_static_assert_exception() { Eigen::no_more_assert = false; }\n    };\n  }\n  // If EIGEN_DEBUG_ASSERTS is defined and if no assertion is triggered while\n  // one should have been, then the list of executed assertions is printed out.\n  //\n  // EIGEN_DEBUG_ASSERTS is not enabled by default as it\n  // significantly increases the compilation time\n  // and might even introduce side effects that would hide\n  // some memory errors.\n  #ifdef EIGEN_DEBUG_ASSERTS\n\n    namespace Eigen\n    {\n      namespace internal\n      {\n        static bool push_assert = false;\n      }\n      static std::vector<std::string> eigen_assert_list;\n    }\n    #define eigen_assert(a)                       \\\n      if( (!(a)) && (!no_more_assert) )     \\\n      { \\\n        if(report_on_cerr_on_assert_failure) \\\n          std::cerr <<  #a << \" \" __FILE__ << \"(\" << __LINE__ << \")\\n\"; \\\n        Eigen::no_more_assert = true;       \\\n        EIGEN_THROW_X(Eigen::eigen_assert_exception()); \\\n      }                                     \\\n      else if (Eigen::internal::push_assert)       \\\n      {                                     \\\n        eigen_assert_list.push_back(std::string(EIGEN_MAKESTRING(__FILE__) \" (\" EIGEN_MAKESTRING(__LINE__) \") : \" #a) ); \\\n      }\n\n    #ifdef EIGEN_EXCEPTIONS\n    #define VERIFY_RAISES_ASSERT(a)                                                   \\\n      {                                                                               \\\n        Eigen::no_more_assert = false;                                                \\\n        Eigen::eigen_assert_list.clear();                                             \\\n        Eigen::internal::push_assert = true;                                          \\\n        Eigen::report_on_cerr_on_assert_failure = false;                              \\\n        try {                                                                         \\\n          a;                                                                          \\\n          std::cerr << \"One of the following asserts should have been triggered:\\n\";  \\\n          for (uint ai=0 ; ai<eigen_assert_list.size() ; ++ai)                        \\\n            std::cerr << \"  \" << eigen_assert_list[ai] << \"\\n\";                       \\\n          VERIFY(Eigen::should_raise_an_assert && # a);                               \\\n        } catch (Eigen::eigen_assert_exception) {                                     \\\n          Eigen::internal::push_assert = false; VERIFY(true);                         \\\n        }                                                                             \\\n        Eigen::report_on_cerr_on_assert_failure = true;                               \\\n        Eigen::internal::push_assert = false;                                         \\\n      }\n    #endif //EIGEN_EXCEPTIONS\n\n  #elif !defined(__CUDACC__) && !defined(__HIPCC__) && !defined(SYCL_DEVICE_ONLY) // EIGEN_DEBUG_ASSERTS\n    // see bug 89. The copy_bool here is working around a bug in gcc <= 4.3\n    #define eigen_assert(a) \\\n      if( (!Eigen::internal::copy_bool(a)) && (!no_more_assert) )\\\n      {                                       \\\n        Eigen::no_more_assert = true;         \\\n        if(report_on_cerr_on_assert_failure)  \\\n          eigen_plain_assert(a);              \\\n        else                                  \\\n          EIGEN_THROW_X(Eigen::eigen_assert_exception()); \\\n      }\n\n    #ifdef EIGEN_EXCEPTIONS\n      #define VERIFY_RAISES_ASSERT(a) {                           \\\n        Eigen::no_more_assert = false;                            \\\n        Eigen::report_on_cerr_on_assert_failure = false;          \\\n        try {                                                     \\\n          a;                                                      \\\n          VERIFY(Eigen::should_raise_an_assert && # a);           \\\n        }                                                         \\\n        catch (Eigen::eigen_assert_exception&) { VERIFY(true); }  \\\n        Eigen::report_on_cerr_on_assert_failure = true;           \\\n      }\n    #endif // EIGEN_EXCEPTIONS\n  #endif // EIGEN_DEBUG_ASSERTS\n\n  #if defined(TEST_CHECK_STATIC_ASSERTIONS) && defined(EIGEN_EXCEPTIONS)\n    #define EIGEN_STATIC_ASSERT(a,MSG) \\\n      if( (!Eigen::internal::copy_bool(a)) && (!no_more_assert) )\\\n      {                                       \\\n        Eigen::no_more_assert = true;         \\\n        if(report_on_cerr_on_assert_failure)  \\\n          eigen_plain_assert((a) && #MSG);      \\\n        else                                  \\\n          EIGEN_THROW_X(Eigen::eigen_static_assert_exception()); \\\n      }\n    #define VERIFY_RAISES_STATIC_ASSERT(a) {                    \\\n      Eigen::no_more_assert = false;                            \\\n      Eigen::report_on_cerr_on_assert_failure = false;          \\\n      try {                                                     \\\n        a;                                                      \\\n        VERIFY(Eigen::should_raise_an_assert && # a);           \\\n      }                                                         \\\n      catch (Eigen::eigen_static_assert_exception&) { VERIFY(true); }  \\\n      Eigen::report_on_cerr_on_assert_failure = true;           \\\n    }\n  #endif // TEST_CHECK_STATIC_ASSERTIONS\n\n#ifndef VERIFY_RAISES_ASSERT\n  #define VERIFY_RAISES_ASSERT(a) \\\n    std::cout << \"Can't VERIFY_RAISES_ASSERT( \" #a \" ) with exceptions disabled\\n\";\n#endif\n#ifndef VERIFY_RAISES_STATIC_ASSERT\n  #define VERIFY_RAISES_STATIC_ASSERT(a) \\\n    std::cout << \"Can't VERIFY_RAISES_STATIC_ASSERT( \" #a \" ) with exceptions disabled\\n\";\n#endif\n\n  #if !defined(__CUDACC__) && !defined(__HIPCC__) && !defined(SYCL_DEVICE_ONLY)\n  #define EIGEN_USE_CUSTOM_ASSERT\n  #endif\n\n#else // EIGEN_NO_ASSERTION_CHECKING\n\n  #define VERIFY_RAISES_ASSERT(a) {}\n  #define VERIFY_RAISES_STATIC_ASSERT(a) {}\n\n#endif // EIGEN_NO_ASSERTION_CHECKING\n\n#define EIGEN_INTERNAL_DEBUGGING\n#include <Eigen/QR> // required for createRandomPIMatrixOfRank\n\ninline void verify_impl(bool condition, const char *testname, const char *file, int line, const char *condition_as_string)\n{\n  if (!condition)\n  {\n    if(Eigen::g_test_level>0)\n      std::cerr << \"WARNING: \";\n    std::cerr << \"Test \" << testname << \" failed in \" << file << \" (\" << line << \")\"\n      << std::endl << \"    \" << condition_as_string << std::endl;\n    std::cerr << \"Stack:\\n\";\n    const int test_stack_size = static_cast<int>(Eigen::g_test_stack.size());\n    for(int i=test_stack_size-1; i>=0; --i)\n      std::cerr << \"  - \" << Eigen::g_test_stack[i] << \"\\n\";\n    std::cerr << \"\\n\";\n    if(Eigen::g_test_level==0)\n      abort();\n  }\n}\n\n#define VERIFY(a) ::verify_impl(a, g_test_stack.back().c_str(), __FILE__, __LINE__, EIGEN_MAKESTRING(a))\n\n#define VERIFY_GE(a, b) ::verify_impl(a >= b, g_test_stack.back().c_str(), __FILE__, __LINE__, EIGEN_MAKESTRING(a >= b))\n#define VERIFY_LE(a, b) ::verify_impl(a <= b, g_test_stack.back().c_str(), __FILE__, __LINE__, EIGEN_MAKESTRING(a <= b))\n\n\n#define VERIFY_IS_EQUAL(a, b) VERIFY(test_is_equal(a, b, true))\n#define VERIFY_IS_NOT_EQUAL(a, b) VERIFY(test_is_equal(a, b, false))\n#define VERIFY_IS_APPROX(a, b) VERIFY(verifyIsApprox(a, b))\n#define VERIFY_IS_NOT_APPROX(a, b) VERIFY(!test_isApprox(a, b))\n#define VERIFY_IS_MUCH_SMALLER_THAN(a, b) VERIFY(test_isMuchSmallerThan(a, b))\n#define VERIFY_IS_NOT_MUCH_SMALLER_THAN(a, b) VERIFY(!test_isMuchSmallerThan(a, b))\n#define VERIFY_IS_APPROX_OR_LESS_THAN(a, b) VERIFY(test_isApproxOrLessThan(a, b))\n#define VERIFY_IS_NOT_APPROX_OR_LESS_THAN(a, b) VERIFY(!test_isApproxOrLessThan(a, b))\n\n#define VERIFY_IS_UNITARY(a) VERIFY(test_isUnitary(a))\n\n#define STATIC_CHECK(COND) EIGEN_STATIC_ASSERT( (COND) , EIGEN_INTERNAL_ERROR_PLEASE_FILE_A_BUG_REPORT )\n\n#define CALL_SUBTEST(FUNC) do { \\\n    g_test_stack.push_back(EIGEN_MAKESTRING(FUNC)); \\\n    FUNC; \\\n    g_test_stack.pop_back(); \\\n  } while (0)\n\n\nnamespace Eigen {\n\ntemplate<typename T1,typename T2>\ntypename internal::enable_if<internal::is_same<T1,T2>::value,bool>::type\nis_same_type(const T1&, const T2&)\n{\n  return true;\n}\n\ntemplate<typename T> inline typename NumTraits<T>::Real test_precision() { return NumTraits<T>::dummy_precision(); }\ntemplate<> inline float test_precision<float>() { return 1e-3f; }\ntemplate<> inline double test_precision<double>() { return 1e-6; }\ntemplate<> inline long double test_precision<long double>() { return 1e-6l; }\ntemplate<> inline float test_precision<std::complex<float> >() { return test_precision<float>(); }\ntemplate<> inline double test_precision<std::complex<double> >() { return test_precision<double>(); }\ntemplate<> inline long double test_precision<std::complex<long double> >() { return test_precision<long double>(); }\n\n#define EIGEN_TEST_SCALAR_TEST_OVERLOAD(TYPE)                             \\\n  inline bool test_isApprox(TYPE a, TYPE b)                               \\\n  { return internal::isApprox(a, b, test_precision<TYPE>()); }            \\\n  inline bool test_isMuchSmallerThan(TYPE a, TYPE b)                      \\\n  { return internal::isMuchSmallerThan(a, b, test_precision<TYPE>()); }   \\\n  inline bool test_isApproxOrLessThan(TYPE a, TYPE b)                     \\\n  { return internal::isApproxOrLessThan(a, b, test_precision<TYPE>()); }\n\nEIGEN_TEST_SCALAR_TEST_OVERLOAD(short)\nEIGEN_TEST_SCALAR_TEST_OVERLOAD(unsigned short)\nEIGEN_TEST_SCALAR_TEST_OVERLOAD(int)\nEIGEN_TEST_SCALAR_TEST_OVERLOAD(unsigned int)\nEIGEN_TEST_SCALAR_TEST_OVERLOAD(long)\nEIGEN_TEST_SCALAR_TEST_OVERLOAD(unsigned long)\n#if EIGEN_HAS_CXX11\nEIGEN_TEST_SCALAR_TEST_OVERLOAD(long long)\nEIGEN_TEST_SCALAR_TEST_OVERLOAD(unsigned long long)\n#endif\nEIGEN_TEST_SCALAR_TEST_OVERLOAD(float)\nEIGEN_TEST_SCALAR_TEST_OVERLOAD(double)\nEIGEN_TEST_SCALAR_TEST_OVERLOAD(half)\n\n#undef EIGEN_TEST_SCALAR_TEST_OVERLOAD\n\n#ifndef EIGEN_TEST_NO_COMPLEX\ninline bool test_isApprox(const std::complex<float>& a, const std::complex<float>& b)\n{ return internal::isApprox(a, b, test_precision<std::complex<float> >()); }\ninline bool test_isMuchSmallerThan(const std::complex<float>& a, const std::complex<float>& b)\n{ return internal::isMuchSmallerThan(a, b, test_precision<std::complex<float> >()); }\n\ninline bool test_isApprox(const std::complex<double>& a, const std::complex<double>& b)\n{ return internal::isApprox(a, b, test_precision<std::complex<double> >()); }\ninline bool test_isMuchSmallerThan(const std::complex<double>& a, const std::complex<double>& b)\n{ return internal::isMuchSmallerThan(a, b, test_precision<std::complex<double> >()); }\n\n#ifndef EIGEN_TEST_NO_LONGDOUBLE\ninline bool test_isApprox(const std::complex<long double>& a, const std::complex<long double>& b)\n{ return internal::isApprox(a, b, test_precision<std::complex<long double> >()); }\ninline bool test_isMuchSmallerThan(const std::complex<long double>& a, const std::complex<long double>& b)\n{ return internal::isMuchSmallerThan(a, b, test_precision<std::complex<long double> >()); }\n#endif\n#endif\n\n#ifndef EIGEN_TEST_NO_LONGDOUBLE\ninline bool test_isApprox(const long double& a, const long double& b)\n{\n    bool ret = internal::isApprox(a, b, test_precision<long double>());\n    if (!ret) std::cerr\n        << std::endl << \"    actual   = \" << a\n        << std::endl << \"    expected = \" << b << std::endl << std::endl;\n    return ret;\n}\n\ninline bool test_isMuchSmallerThan(const long double& a, const long double& b)\n{ return internal::isMuchSmallerThan(a, b, test_precision<long double>()); }\ninline bool test_isApproxOrLessThan(const long double& a, const long double& b)\n{ return internal::isApproxOrLessThan(a, b, test_precision<long double>()); }\n#endif // EIGEN_TEST_NO_LONGDOUBLE\n\n// test_relative_error returns the relative difference between a and b as a real scalar as used in isApprox.\ntemplate<typename T1,typename T2>\ntypename NumTraits<typename T1::RealScalar>::NonInteger test_relative_error(const EigenBase<T1> &a, const EigenBase<T2> &b)\n{\n  using std::sqrt;\n  typedef typename NumTraits<typename T1::RealScalar>::NonInteger RealScalar;\n  typename internal::nested_eval<T1,2>::type ea(a.derived());\n  typename internal::nested_eval<T2,2>::type eb(b.derived());\n  return sqrt(RealScalar((ea-eb).cwiseAbs2().sum()) / RealScalar((std::min)(eb.cwiseAbs2().sum(),ea.cwiseAbs2().sum())));\n}\n\ntemplate<typename T1,typename T2>\ntypename T1::RealScalar test_relative_error(const T1 &a, const T2 &b, const typename T1::Coefficients* = 0)\n{\n  return test_relative_error(a.coeffs(), b.coeffs());\n}\n\ntemplate<typename T1,typename T2>\ntypename T1::Scalar test_relative_error(const T1 &a, const T2 &b, const typename T1::MatrixType* = 0)\n{\n  return test_relative_error(a.matrix(), b.matrix());\n}\n\ntemplate<typename S, int D>\nS test_relative_error(const Translation<S,D> &a, const Translation<S,D> &b)\n{\n  return test_relative_error(a.vector(), b.vector());\n}\n\ntemplate <typename S, int D, int O>\nS test_relative_error(const ParametrizedLine<S,D,O> &a, const ParametrizedLine<S,D,O> &b)\n{\n  return (std::max)(test_relative_error(a.origin(), b.origin()), test_relative_error(a.origin(), b.origin()));\n}\n\ntemplate <typename S, int D>\nS test_relative_error(const AlignedBox<S,D> &a, const AlignedBox<S,D> &b)\n{\n  return (std::max)(test_relative_error((a.min)(), (b.min)()), test_relative_error((a.max)(), (b.max)()));\n}\n\ntemplate<typename Derived> class SparseMatrixBase;\ntemplate<typename T1,typename T2>\ntypename T1::RealScalar test_relative_error(const MatrixBase<T1> &a, const SparseMatrixBase<T2> &b)\n{\n  return test_relative_error(a,b.toDense());\n}\n\ntemplate<typename Derived> class SparseMatrixBase;\ntemplate<typename T1,typename T2>\ntypename T1::RealScalar test_relative_error(const SparseMatrixBase<T1> &a, const MatrixBase<T2> &b)\n{\n  return test_relative_error(a.toDense(),b);\n}\n\ntemplate<typename Derived> class SparseMatrixBase;\ntemplate<typename T1,typename T2>\ntypename T1::RealScalar test_relative_error(const SparseMatrixBase<T1> &a, const SparseMatrixBase<T2> &b)\n{\n  return test_relative_error(a.toDense(),b.toDense());\n}\n\ntemplate<typename T1,typename T2>\ntypename NumTraits<typename NumTraits<T1>::Real>::NonInteger test_relative_error(const T1 &a, const T2 &b, typename internal::enable_if<internal::is_arithmetic<typename NumTraits<T1>::Real>::value, T1>::type* = 0)\n{\n  typedef typename NumTraits<typename NumTraits<T1>::Real>::NonInteger RealScalar;\n  return numext::sqrt(RealScalar(numext::abs2(a-b))/RealScalar((numext::mini)(numext::abs2(a),numext::abs2(b))));\n}\n\ntemplate<typename T>\nT test_relative_error(const Rotation2D<T> &a, const Rotation2D<T> &b)\n{\n  return test_relative_error(a.angle(), b.angle());\n}\n\ntemplate<typename T>\nT test_relative_error(const AngleAxis<T> &a, const AngleAxis<T> &b)\n{\n  return (std::max)(test_relative_error(a.angle(), b.angle()), test_relative_error(a.axis(), b.axis()));\n}\n\ntemplate<typename Type1, typename Type2>\ninline bool test_isApprox(const Type1& a, const Type2& b, typename Type1::Scalar* = 0) // Enabled for Eigen's type only\n{\n  return a.isApprox(b, test_precision<typename Type1::Scalar>());\n}\n\n// get_test_precision is a small wrapper to test_precision allowing to return the scalar precision for either scalars or expressions\ntemplate<typename T>\ntypename NumTraits<typename T::Scalar>::Real get_test_precision(const T&, const typename T::Scalar* = 0)\n{\n  return test_precision<typename NumTraits<typename T::Scalar>::Real>();\n}\n\ntemplate<typename T>\ntypename NumTraits<T>::Real get_test_precision(const T&,typename internal::enable_if<internal::is_arithmetic<typename NumTraits<T>::Real>::value, T>::type* = 0)\n{\n  return test_precision<typename NumTraits<T>::Real>();\n}\n\n// verifyIsApprox is a wrapper to test_isApprox that outputs the relative difference magnitude if the test fails.\ntemplate<typename Type1, typename Type2>\ninline bool verifyIsApprox(const Type1& a, const Type2& b)\n{\n  bool ret = test_isApprox(a,b);\n  if(!ret)\n  {\n    std::cerr << \"Difference too large wrt tolerance \" << get_test_precision(a)  << \", relative error is: \" << test_relative_error(a,b) << std::endl;\n  }\n  return ret;\n}\n\n// The idea behind this function is to compare the two scalars a and b where\n// the scalar ref is a hint about the expected order of magnitude of a and b.\n// WARNING: the scalar a and b must be positive\n// Therefore, if for some reason a and b are very small compared to ref,\n// we won't issue a false negative.\n// This test could be: abs(a-b) <= eps * ref\n// However, it seems that simply comparing a+ref and b+ref is more sensitive to true error.\ntemplate<typename Scalar,typename ScalarRef>\ninline bool test_isApproxWithRef(const Scalar& a, const Scalar& b, const ScalarRef& ref)\n{\n  return test_isApprox(a+ref, b+ref);\n}\n\ntemplate<typename Derived1, typename Derived2>\ninline bool test_isMuchSmallerThan(const MatrixBase<Derived1>& m1,\n                                   const MatrixBase<Derived2>& m2)\n{\n  return m1.isMuchSmallerThan(m2, test_precision<typename internal::traits<Derived1>::Scalar>());\n}\n\ntemplate<typename Derived>\ninline bool test_isMuchSmallerThan(const MatrixBase<Derived>& m,\n                                   const typename NumTraits<typename internal::traits<Derived>::Scalar>::Real& s)\n{\n  return m.isMuchSmallerThan(s, test_precision<typename internal::traits<Derived>::Scalar>());\n}\n\ntemplate<typename Derived>\ninline bool test_isUnitary(const MatrixBase<Derived>& m)\n{\n  return m.isUnitary(test_precision<typename internal::traits<Derived>::Scalar>());\n}\n\n// Forward declaration to avoid ICC warning\ntemplate<typename T, typename U>\nbool test_is_equal(const T& actual, const U& expected, bool expect_equal=true);\n\ntemplate<typename T, typename U>\nbool test_is_equal(const T& actual, const U& expected, bool expect_equal)\n{\n    if ((actual==expected) == expect_equal)\n        return true;\n    // false:\n    std::cerr\n        << \"\\n    actual   = \" << actual\n        << \"\\n    expected \" << (expect_equal ? \"= \" : \"!=\") << expected << \"\\n\\n\";\n    return false;\n}\n\n/** Creates a random Partial Isometry matrix of given rank.\n  *\n  * A partial isometry is a matrix all of whose singular values are either 0 or 1.\n  * This is very useful to test rank-revealing algorithms.\n  */\n// Forward declaration to avoid ICC warning\ntemplate<typename MatrixType>\nvoid createRandomPIMatrixOfRank(Index desired_rank, Index rows, Index cols, MatrixType& m);\ntemplate<typename MatrixType>\nvoid createRandomPIMatrixOfRank(Index desired_rank, Index rows, Index cols, MatrixType& m)\n{\n  typedef typename internal::traits<MatrixType>::Scalar Scalar;\n  enum { Rows = MatrixType::RowsAtCompileTime, Cols = MatrixType::ColsAtCompileTime };\n\n  typedef Matrix<Scalar, Dynamic, 1> VectorType;\n  typedef Matrix<Scalar, Rows, Rows> MatrixAType;\n  typedef Matrix<Scalar, Cols, Cols> MatrixBType;\n\n  if(desired_rank == 0)\n  {\n    m.setZero(rows,cols);\n    return;\n  }\n\n  if(desired_rank == 1)\n  {\n    // here we normalize the vectors to get a partial isometry\n    m = VectorType::Random(rows).normalized() * VectorType::Random(cols).normalized().transpose();\n    return;\n  }\n\n  MatrixAType a = MatrixAType::Random(rows,rows);\n  MatrixType d = MatrixType::Identity(rows,cols);\n  MatrixBType  b = MatrixBType::Random(cols,cols);\n\n  // set the diagonal such that only desired_rank non-zero entries reamain\n  const Index diag_size = (std::min)(d.rows(),d.cols());\n  if(diag_size != desired_rank)\n    d.diagonal().segment(desired_rank, diag_size-desired_rank) = VectorType::Zero(diag_size-desired_rank);\n\n  HouseholderQR<MatrixAType> qra(a);\n  HouseholderQR<MatrixBType> qrb(b);\n  m = qra.householderQ() * d * qrb.householderQ();\n}\n\n// Forward declaration to avoid ICC warning\ntemplate<typename PermutationVectorType>\nvoid randomPermutationVector(PermutationVectorType& v, Index size);\ntemplate<typename PermutationVectorType>\nvoid randomPermutationVector(PermutationVectorType& v, Index size)\n{\n  typedef typename PermutationVectorType::Scalar Scalar;\n  v.resize(size);\n  for(Index i = 0; i < size; ++i) v(i) = Scalar(i);\n  if(size == 1) return;\n  for(Index n = 0; n < 3 * size; ++n)\n  {\n    Index i = internal::random<Index>(0, size-1);\n    Index j;\n    do j = internal::random<Index>(0, size-1); while(j==i);\n    std::swap(v(i), v(j));\n  }\n}\n\ntemplate<typename T> bool isNotNaN(const T& x)\n{\n  return x==x;\n}\n\ntemplate<typename T> bool isPlusInf(const T& x)\n{\n  return x > NumTraits<T>::highest();\n}\n\ntemplate<typename T> bool isMinusInf(const T& x)\n{\n  return x < NumTraits<T>::lowest();\n}\n\n} // end namespace Eigen\n\ntemplate<typename T> struct GetDifferentType;\n\ntemplate<> struct GetDifferentType<float> { typedef double type; };\ntemplate<> struct GetDifferentType<double> { typedef float type; };\ntemplate<typename T> struct GetDifferentType<std::complex<T> >\n{ typedef std::complex<typename GetDifferentType<T>::type> type; };\n\n// Forward declaration to avoid ICC warning\ntemplate<typename T> std::string type_name();\ntemplate<typename T> std::string type_name()                    { return \"other\"; }\ntemplate<> std::string type_name<float>()                       { return \"float\"; }\ntemplate<> std::string type_name<double>()                      { return \"double\"; }\ntemplate<> std::string type_name<long double>()                 { return \"long double\"; }\ntemplate<> std::string type_name<int>()                         { return \"int\"; }\ntemplate<> std::string type_name<std::complex<float> >()        { return \"complex<float>\"; }\ntemplate<> std::string type_name<std::complex<double> >()       { return \"complex<double>\"; }\ntemplate<> std::string type_name<std::complex<long double> >()  { return \"complex<long double>\"; }\ntemplate<> std::string type_name<std::complex<int> >()          { return \"complex<int>\"; }\n\nusing namespace Eigen;\n\ninline void set_repeat_from_string(const char *str)\n{\n  errno = 0;\n  g_repeat = int(strtoul(str, 0, 10));\n  if(errno || g_repeat <= 0)\n  {\n    std::cout << \"Invalid repeat value \" << str << std::endl;\n    exit(EXIT_FAILURE);\n  }\n  g_has_set_repeat = true;\n}\n\ninline void set_seed_from_string(const char *str)\n{\n  errno = 0;\n  g_seed = int(strtoul(str, 0, 10));\n  if(errno || g_seed == 0)\n  {\n    std::cout << \"Invalid seed value \" << str << std::endl;\n    exit(EXIT_FAILURE);\n  }\n  g_has_set_seed = true;\n}\n\nint main(int argc, char *argv[])\n{\n    g_has_set_repeat = false;\n    g_has_set_seed = false;\n    bool need_help = false;\n\n    for(int i = 1; i < argc; i++)\n    {\n      if(argv[i][0] == 'r')\n      {\n        if(g_has_set_repeat)\n        {\n          std::cout << \"Argument \" << argv[i] << \" conflicting with a former argument\" << std::endl;\n          return 1;\n        }\n        set_repeat_from_string(argv[i]+1);\n      }\n      else if(argv[i][0] == 's')\n      {\n        if(g_has_set_seed)\n        {\n          std::cout << \"Argument \" << argv[i] << \" conflicting with a former argument\" << std::endl;\n          return 1;\n        }\n         set_seed_from_string(argv[i]+1);\n      }\n      else\n      {\n        need_help = true;\n      }\n    }\n\n    if(need_help)\n    {\n      std::cout << \"This test application takes the following optional arguments:\" << std::endl;\n      std::cout << \"  rN     Repeat each test N times (default: \" << DEFAULT_REPEAT << \")\" << std::endl;\n      std::cout << \"  sN     Use N as seed for random numbers (default: based on current time)\" << std::endl;\n      std::cout << std::endl;\n      std::cout << \"If defined, the environment variables EIGEN_REPEAT and EIGEN_SEED\" << std::endl;\n      std::cout << \"will be used as default values for these parameters.\" << std::endl;\n      return 1;\n    }\n\n    char *env_EIGEN_REPEAT = getenv(\"EIGEN_REPEAT\");\n    if(!g_has_set_repeat && env_EIGEN_REPEAT)\n      set_repeat_from_string(env_EIGEN_REPEAT);\n    char *env_EIGEN_SEED = getenv(\"EIGEN_SEED\");\n    if(!g_has_set_seed && env_EIGEN_SEED)\n      set_seed_from_string(env_EIGEN_SEED);\n\n    if(!g_has_set_seed) g_seed = (unsigned int) time(NULL);\n    if(!g_has_set_repeat) g_repeat = DEFAULT_REPEAT;\n\n    std::cout << \"Initializing random number generator with seed \" << g_seed << std::endl;\n    std::stringstream ss;\n    ss << \"Seed: \" << g_seed;\n    g_test_stack.push_back(ss.str());\n    srand(g_seed);\n    std::cout << \"Repeating each test \" << g_repeat << \" times\" << std::endl;\n\n    VERIFY(EigenTest::all().size()>0);\n\n    for(std::size_t i=0; i<EigenTest::all().size(); ++i)\n    {\n      const EigenTest& current_test = *EigenTest::all()[i];\n      Eigen::g_test_stack.push_back(current_test.name());\n      current_test();\n      Eigen::g_test_stack.pop_back();\n    }\n\n    return 0;\n}\n\n// These warning are disabled here such that they are still ON when parsing Eigen's header files.\n#if defined __INTEL_COMPILER\n  // remark #383: value copied to temporary, reference to temporary used\n  //  -> this warning is raised even for legal usage as: g_test_stack.push_back(\"foo\"); where g_test_stack is a std::vector<std::string>\n  // remark #1418: external function definition with no prior declaration\n  //  -> this warning is raised for all our test functions. Declaring them static would fix the issue.\n  // warning #279: controlling expression is constant\n  // remark #1572: floating-point equality and inequality comparisons are unreliable\n  #pragma warning disable 279 383 1418 1572\n#endif\n\n#ifdef _MSC_VER\n  // 4503 - decorated name length exceeded, name was truncated\n  #pragma warning( disable : 4503)\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/test/mapped_matrix.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2010 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_NO_STATIC_ASSERT\n#define EIGEN_NO_STATIC_ASSERT // turn static asserts into runtime asserts in order to check them\n#endif\n\n#include \"main.h\"\n\n#define EIGEN_TESTMAP_MAX_SIZE 256\n\ntemplate<typename VectorType> void map_class_vector(const VectorType& m)\n{\n  typedef typename VectorType::Scalar Scalar;\n\n  Index size = m.size();\n\n  Scalar* array1 = internal::aligned_new<Scalar>(size);\n  Scalar* array2 = internal::aligned_new<Scalar>(size);\n  Scalar* array3 = new Scalar[size+1];\n  Scalar* array3unaligned = (internal::UIntPtr(array3)%EIGEN_MAX_ALIGN_BYTES) == 0 ? array3+1 : array3;\n  Scalar  array4[EIGEN_TESTMAP_MAX_SIZE];\n\n  Map<VectorType, AlignedMax>(array1, size) = VectorType::Random(size);\n  Map<VectorType, AlignedMax>(array2, size) = Map<VectorType,AlignedMax>(array1, size);\n  Map<VectorType>(array3unaligned, size) = Map<VectorType>(array1, size);\n  Map<VectorType>(array4, size)          = Map<VectorType,AlignedMax>(array1, size);\n  VectorType ma1 = Map<VectorType, AlignedMax>(array1, size);\n  VectorType ma2 = Map<VectorType, AlignedMax>(array2, size);\n  VectorType ma3 = Map<VectorType>(array3unaligned, size);\n  VectorType ma4 = Map<VectorType>(array4, size);\n  VERIFY_IS_EQUAL(ma1, ma2);\n  VERIFY_IS_EQUAL(ma1, ma3);\n  VERIFY_IS_EQUAL(ma1, ma4);\n  #ifdef EIGEN_VECTORIZE\n  if(internal::packet_traits<Scalar>::Vectorizable && size>=AlignedMax)\n    VERIFY_RAISES_ASSERT((Map<VectorType,AlignedMax>(array3unaligned, size)))\n  #endif\n\n  internal::aligned_delete(array1, size);\n  internal::aligned_delete(array2, size);\n  delete[] array3;\n}\n\ntemplate<typename MatrixType> void map_class_matrix(const MatrixType& m)\n{\n  typedef typename MatrixType::Scalar Scalar;\n\n  Index rows = m.rows(), cols = m.cols(), size = rows*cols;\n  Scalar s1 = internal::random<Scalar>();\n\n  // array1 and array2 -> aligned heap allocation\n  Scalar* array1 = internal::aligned_new<Scalar>(size);\n  for(int i = 0; i < size; i++) array1[i] = Scalar(1);\n  Scalar* array2 = internal::aligned_new<Scalar>(size);\n  for(int i = 0; i < size; i++) array2[i] = Scalar(1);\n  // array3unaligned -> unaligned pointer to heap\n  Scalar* array3 = new Scalar[size+1];\n  Index sizep1 = size + 1; // <- without this temporary MSVC 2103 generates bad code\n  for(Index i = 0; i < sizep1; i++) array3[i] = Scalar(1);\n  Scalar* array3unaligned = (internal::UIntPtr(array3)%EIGEN_MAX_ALIGN_BYTES) == 0 ? array3+1 : array3;\n  Scalar array4[256];\n  if(size<=256)\n    for(int i = 0; i < size; i++) array4[i] = Scalar(1);\n  \n  Map<MatrixType> map1(array1, rows, cols);\n  Map<MatrixType, AlignedMax> map2(array2, rows, cols);\n  Map<MatrixType> map3(array3unaligned, rows, cols);\n  Map<MatrixType> map4(array4, rows, cols);\n  \n  VERIFY_IS_EQUAL(map1, MatrixType::Ones(rows,cols));\n  VERIFY_IS_EQUAL(map2, MatrixType::Ones(rows,cols));\n  VERIFY_IS_EQUAL(map3, MatrixType::Ones(rows,cols));\n  map1 = MatrixType::Random(rows,cols);\n  map2 = map1;\n  map3 = map1;\n  MatrixType ma1 = map1;\n  MatrixType ma2 = map2;\n  MatrixType ma3 = map3;\n  VERIFY_IS_EQUAL(map1, map2);\n  VERIFY_IS_EQUAL(map1, map3);\n  VERIFY_IS_EQUAL(ma1, ma2);\n  VERIFY_IS_EQUAL(ma1, ma3);\n  VERIFY_IS_EQUAL(ma1, map3);\n  \n  VERIFY_IS_APPROX(s1*map1, s1*map2);\n  VERIFY_IS_APPROX(s1*ma1, s1*ma2);\n  VERIFY_IS_EQUAL(s1*ma1, s1*ma3);\n  VERIFY_IS_APPROX(s1*map1, s1*map3);\n  \n  map2 *= s1;\n  map3 *= s1;\n  VERIFY_IS_APPROX(s1*map1, map2);\n  VERIFY_IS_APPROX(s1*map1, map3);\n  \n  if(size<=256)\n  {\n    VERIFY_IS_EQUAL(map4, MatrixType::Ones(rows,cols));\n    map4 = map1;\n    MatrixType ma4 = map4;\n    VERIFY_IS_EQUAL(map1, map4);\n    VERIFY_IS_EQUAL(ma1, map4);\n    VERIFY_IS_EQUAL(ma1, ma4);\n    VERIFY_IS_APPROX(s1*map1, s1*map4);\n    \n    map4 *= s1;\n    VERIFY_IS_APPROX(s1*map1, map4);\n  }\n\n  internal::aligned_delete(array1, size);\n  internal::aligned_delete(array2, size);\n  delete[] array3;\n}\n\ntemplate<typename VectorType> void map_static_methods(const VectorType& m)\n{\n  typedef typename VectorType::Scalar Scalar;\n\n  Index size = m.size();\n\n  Scalar* array1 = internal::aligned_new<Scalar>(size);\n  Scalar* array2 = internal::aligned_new<Scalar>(size);\n  Scalar* array3 = new Scalar[size+1];\n  Scalar* array3unaligned = internal::UIntPtr(array3)%EIGEN_MAX_ALIGN_BYTES == 0 ? array3+1 : array3;\n\n  VectorType::MapAligned(array1, size) = VectorType::Random(size);\n  VectorType::Map(array2, size) = VectorType::Map(array1, size);\n  VectorType::Map(array3unaligned, size) = VectorType::Map(array1, size);\n  VectorType ma1 = VectorType::Map(array1, size);\n  VectorType ma2 = VectorType::MapAligned(array2, size);\n  VectorType ma3 = VectorType::Map(array3unaligned, size);\n  VERIFY_IS_EQUAL(ma1, ma2);\n  VERIFY_IS_EQUAL(ma1, ma3);\n\n  internal::aligned_delete(array1, size);\n  internal::aligned_delete(array2, size);\n  delete[] array3;\n}\n\ntemplate<typename PlainObjectType> void check_const_correctness(const PlainObjectType&)\n{\n  // there's a lot that we can't test here while still having this test compile!\n  // the only possible approach would be to run a script trying to compile stuff and checking that it fails.\n  // CMake can help with that.\n\n  // verify that map-to-const don't have LvalueBit\n  typedef typename internal::add_const<PlainObjectType>::type ConstPlainObjectType;\n  VERIFY( !(internal::traits<Map<ConstPlainObjectType> >::Flags & LvalueBit) );\n  VERIFY( !(internal::traits<Map<ConstPlainObjectType, AlignedMax> >::Flags & LvalueBit) );\n  VERIFY( !(Map<ConstPlainObjectType>::Flags & LvalueBit) );\n  VERIFY( !(Map<ConstPlainObjectType, AlignedMax>::Flags & LvalueBit) );\n}\n\ntemplate<typename Scalar>\nvoid map_not_aligned_on_scalar()\n{\n  typedef Matrix<Scalar,Dynamic,Dynamic> MatrixType;\n  Index size = 11;\n  Scalar* array1 = internal::aligned_new<Scalar>((size+1)*(size+1)+1);\n  Scalar* array2 = reinterpret_cast<Scalar*>(sizeof(Scalar)/2+std::size_t(array1));\n  Map<MatrixType,0,OuterStride<> > map2(array2, size, size, OuterStride<>(size+1));\n  MatrixType m2 = MatrixType::Random(size,size);\n  map2 = m2;\n  VERIFY_IS_EQUAL(m2, map2);\n  \n  typedef Matrix<Scalar,Dynamic,1> VectorType;\n  Map<VectorType> map3(array2, size);\n  MatrixType v3 = VectorType::Random(size);\n  map3 = v3;\n  VERIFY_IS_EQUAL(v3, map3);\n  \n  internal::aligned_delete(array1, (size+1)*(size+1)+1);\n}\n\nEIGEN_DECLARE_TEST(mapped_matrix)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( map_class_vector(Matrix<float, 1, 1>()) );\n    CALL_SUBTEST_1( check_const_correctness(Matrix<float, 1, 1>()) );\n    CALL_SUBTEST_2( map_class_vector(Vector4d()) );\n    CALL_SUBTEST_2( map_class_vector(VectorXd(13)) );\n    CALL_SUBTEST_2( check_const_correctness(Matrix4d()) );\n    CALL_SUBTEST_3( map_class_vector(RowVector4f()) );\n    CALL_SUBTEST_4( map_class_vector(VectorXcf(8)) );\n    CALL_SUBTEST_5( map_class_vector(VectorXi(12)) );\n    CALL_SUBTEST_5( check_const_correctness(VectorXi(12)) );\n\n    CALL_SUBTEST_1( map_class_matrix(Matrix<float, 1, 1>()) );\n    CALL_SUBTEST_2( map_class_matrix(Matrix4d()) );\n    CALL_SUBTEST_11( map_class_matrix(Matrix<float,3,5>()) );\n    CALL_SUBTEST_4( map_class_matrix(MatrixXcf(internal::random<int>(1,10),internal::random<int>(1,10))) );\n    CALL_SUBTEST_5( map_class_matrix(MatrixXi(internal::random<int>(1,10),internal::random<int>(1,10))) );\n\n    CALL_SUBTEST_6( map_static_methods(Matrix<double, 1, 1>()) );\n    CALL_SUBTEST_7( map_static_methods(Vector3f()) );\n    CALL_SUBTEST_8( map_static_methods(RowVector3d()) );\n    CALL_SUBTEST_9( map_static_methods(VectorXcd(8)) );\n    CALL_SUBTEST_10( map_static_methods(VectorXf(12)) );\n    CALL_SUBTEST_11( map_not_aligned_on_scalar<double>() );\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/mapstaticmethods.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2011 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n// GCC<=4.8 has spurious shadow warnings, because `ptr` re-appears inside template instantiations\n// workaround: put these in an anonymous namespace\nnamespace {\nfloat *ptr;\nconst float *const_ptr;\n}\n\ntemplate<typename PlainObjectType,\n         bool IsDynamicSize = PlainObjectType::SizeAtCompileTime == Dynamic,\n         bool IsVector = PlainObjectType::IsVectorAtCompileTime\n>\nstruct mapstaticmethods_impl {};\n\ntemplate<typename PlainObjectType, bool IsVector>\nstruct mapstaticmethods_impl<PlainObjectType, false, IsVector>\n{\n  static void run(const PlainObjectType& m)\n  {\n    mapstaticmethods_impl<PlainObjectType, true, IsVector>::run(m);\n\n    int i = internal::random<int>(2,5), j = internal::random<int>(2,5);\n\n    PlainObjectType::Map(ptr).setZero();\n    PlainObjectType::MapAligned(ptr).setZero();\n    PlainObjectType::Map(const_ptr).sum();\n    PlainObjectType::MapAligned(const_ptr).sum();\n\n    PlainObjectType::Map(ptr, InnerStride<>(i)).setZero();\n    PlainObjectType::MapAligned(ptr, InnerStride<>(i)).setZero();\n    PlainObjectType::Map(const_ptr, InnerStride<>(i)).sum();\n    PlainObjectType::MapAligned(const_ptr, InnerStride<>(i)).sum();\n\n    PlainObjectType::Map(ptr, InnerStride<2>()).setZero();\n    PlainObjectType::MapAligned(ptr, InnerStride<3>()).setZero();\n    PlainObjectType::Map(const_ptr, InnerStride<4>()).sum();\n    PlainObjectType::MapAligned(const_ptr, InnerStride<5>()).sum();\n\n    PlainObjectType::Map(ptr, OuterStride<>(i)).setZero();\n    PlainObjectType::MapAligned(ptr, OuterStride<>(i)).setZero();\n    PlainObjectType::Map(const_ptr, OuterStride<>(i)).sum();\n    PlainObjectType::MapAligned(const_ptr, OuterStride<>(i)).sum();\n\n    PlainObjectType::Map(ptr, OuterStride<2>()).setZero();\n    PlainObjectType::MapAligned(ptr, OuterStride<3>()).setZero();\n    PlainObjectType::Map(const_ptr, OuterStride<4>()).sum();\n    PlainObjectType::MapAligned(const_ptr, OuterStride<5>()).sum();\n\n    PlainObjectType::Map(ptr, Stride<Dynamic, Dynamic>(i,j)).setZero();\n    PlainObjectType::MapAligned(ptr, Stride<2,Dynamic>(2,i)).setZero();\n    PlainObjectType::Map(const_ptr, Stride<Dynamic,3>(i,3)).sum();\n    PlainObjectType::MapAligned(const_ptr, Stride<Dynamic, Dynamic>(i,j)).sum();\n\n    PlainObjectType::Map(ptr, Stride<2,3>()).setZero();\n    PlainObjectType::MapAligned(ptr, Stride<3,4>()).setZero();\n    PlainObjectType::Map(const_ptr, Stride<2,4>()).sum();\n    PlainObjectType::MapAligned(const_ptr, Stride<5,3>()).sum();\n  }\n};\n\ntemplate<typename PlainObjectType>\nstruct mapstaticmethods_impl<PlainObjectType, true, false>\n{\n  static void run(const PlainObjectType& m)\n  {\n    Index rows = m.rows(), cols = m.cols();\n\n    int i = internal::random<int>(2,5), j = internal::random<int>(2,5);\n\n    PlainObjectType::Map(ptr, rows, cols).setZero();\n    PlainObjectType::MapAligned(ptr, rows, cols).setZero();\n    PlainObjectType::Map(const_ptr, rows, cols).sum();\n    PlainObjectType::MapAligned(const_ptr, rows, cols).sum();\n\n    PlainObjectType::Map(ptr, rows, cols, InnerStride<>(i)).setZero();\n    PlainObjectType::MapAligned(ptr, rows, cols, InnerStride<>(i)).setZero();\n    PlainObjectType::Map(const_ptr, rows, cols, InnerStride<>(i)).sum();\n    PlainObjectType::MapAligned(const_ptr, rows, cols, InnerStride<>(i)).sum();\n\n    PlainObjectType::Map(ptr, rows, cols, InnerStride<2>()).setZero();\n    PlainObjectType::MapAligned(ptr, rows, cols, InnerStride<3>()).setZero();\n    PlainObjectType::Map(const_ptr, rows, cols, InnerStride<4>()).sum();\n    PlainObjectType::MapAligned(const_ptr, rows, cols, InnerStride<5>()).sum();\n\n    PlainObjectType::Map(ptr, rows, cols, OuterStride<>(i)).setZero();\n    PlainObjectType::MapAligned(ptr, rows, cols, OuterStride<>(i)).setZero();\n    PlainObjectType::Map(const_ptr, rows, cols, OuterStride<>(i)).sum();\n    PlainObjectType::MapAligned(const_ptr, rows, cols, OuterStride<>(i)).sum();\n\n    PlainObjectType::Map(ptr, rows, cols, OuterStride<2>()).setZero();\n    PlainObjectType::MapAligned(ptr, rows, cols, OuterStride<3>()).setZero();\n    PlainObjectType::Map(const_ptr, rows, cols, OuterStride<4>()).sum();\n    PlainObjectType::MapAligned(const_ptr, rows, cols, OuterStride<5>()).sum();\n\n    PlainObjectType::Map(ptr, rows, cols, Stride<Dynamic, Dynamic>(i,j)).setZero();\n    PlainObjectType::MapAligned(ptr, rows, cols, Stride<2,Dynamic>(2,i)).setZero();\n    PlainObjectType::Map(const_ptr, rows, cols, Stride<Dynamic,3>(i,3)).sum();\n    PlainObjectType::MapAligned(const_ptr, rows, cols, Stride<Dynamic, Dynamic>(i,j)).sum();\n\n    PlainObjectType::Map(ptr, rows, cols, Stride<2,3>()).setZero();\n    PlainObjectType::MapAligned(ptr, rows, cols, Stride<3,4>()).setZero();\n    PlainObjectType::Map(const_ptr, rows, cols, Stride<2,4>()).sum();\n    PlainObjectType::MapAligned(const_ptr, rows, cols, Stride<5,3>()).sum();\n  }\n};\n\ntemplate<typename PlainObjectType>\nstruct mapstaticmethods_impl<PlainObjectType, true, true>\n{\n  static void run(const PlainObjectType& v)\n  {\n    Index size = v.size();\n\n    int i = internal::random<int>(2,5);\n\n    PlainObjectType::Map(ptr, size).setZero();\n    PlainObjectType::MapAligned(ptr, size).setZero();\n    PlainObjectType::Map(const_ptr, size).sum();\n    PlainObjectType::MapAligned(const_ptr, size).sum();\n\n    PlainObjectType::Map(ptr, size, InnerStride<>(i)).setZero();\n    PlainObjectType::MapAligned(ptr, size, InnerStride<>(i)).setZero();\n    PlainObjectType::Map(const_ptr, size, InnerStride<>(i)).sum();\n    PlainObjectType::MapAligned(const_ptr, size, InnerStride<>(i)).sum();\n\n    PlainObjectType::Map(ptr, size, InnerStride<2>()).setZero();\n    PlainObjectType::MapAligned(ptr, size, InnerStride<3>()).setZero();\n    PlainObjectType::Map(const_ptr, size, InnerStride<4>()).sum();\n    PlainObjectType::MapAligned(const_ptr, size, InnerStride<5>()).sum();\n  }\n};\n\ntemplate<typename PlainObjectType>\nvoid mapstaticmethods(const PlainObjectType& m)\n{\n  mapstaticmethods_impl<PlainObjectType>::run(m);\n  VERIFY(true); // just to avoid 'unused function' warning\n}\n\nEIGEN_DECLARE_TEST(mapstaticmethods)\n{\n  ptr = internal::aligned_new<float>(1000);\n  for(int i = 0; i < 1000; i++) ptr[i] = float(i);\n\n  const_ptr = ptr;\n\n  CALL_SUBTEST_1(( mapstaticmethods(Matrix<float, 1, 1>()) ));\n  CALL_SUBTEST_1(( mapstaticmethods(Vector2f()) ));\n  CALL_SUBTEST_2(( mapstaticmethods(Vector3f()) ));\n  CALL_SUBTEST_2(( mapstaticmethods(Matrix2f()) ));\n  CALL_SUBTEST_3(( mapstaticmethods(Matrix4f()) ));\n  CALL_SUBTEST_3(( mapstaticmethods(Array4f()) ));\n  CALL_SUBTEST_4(( mapstaticmethods(Array3f()) ));\n  CALL_SUBTEST_4(( mapstaticmethods(Array33f()) ));\n  CALL_SUBTEST_5(( mapstaticmethods(Array44f()) ));\n  CALL_SUBTEST_5(( mapstaticmethods(VectorXf(1)) ));\n  CALL_SUBTEST_5(( mapstaticmethods(VectorXf(8)) ));\n  CALL_SUBTEST_6(( mapstaticmethods(MatrixXf(1,1)) ));\n  CALL_SUBTEST_6(( mapstaticmethods(MatrixXf(5,7)) ));\n  CALL_SUBTEST_7(( mapstaticmethods(ArrayXf(1)) ));\n  CALL_SUBTEST_7(( mapstaticmethods(ArrayXf(5)) ));\n  CALL_SUBTEST_8(( mapstaticmethods(ArrayXXf(1,1)) ));\n  CALL_SUBTEST_8(( mapstaticmethods(ArrayXXf(8,6)) ));\n\n  internal::aligned_delete(ptr, 1000);\n}\n\n"
  },
  {
    "path": "3rdparty/eigen3/test/mapstride.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\ntemplate<int Alignment,typename VectorType> void map_class_vector(const VectorType& m)\n{\n  typedef typename VectorType::Scalar Scalar;\n\n  Index size = m.size();\n\n  VectorType v = VectorType::Random(size);\n\n  Index arraysize = 3*size;\n  \n  Scalar* a_array = internal::aligned_new<Scalar>(arraysize+1);\n  Scalar* array = a_array;\n  if(Alignment!=Aligned)\n    array = (Scalar*)(internal::IntPtr(a_array) + (internal::packet_traits<Scalar>::AlignedOnScalar?sizeof(Scalar):sizeof(typename NumTraits<Scalar>::Real)));\n\n  {\n    Map<VectorType, Alignment, InnerStride<3> > map(array, size);\n    map = v;\n    for(int i = 0; i < size; ++i)\n    {\n      VERIFY(array[3*i] == v[i]);\n      VERIFY(map[i] == v[i]);\n    }\n  }\n\n  {\n    Map<VectorType, Unaligned, InnerStride<Dynamic> > map(array, size, InnerStride<Dynamic>(2));\n    map = v;\n    for(int i = 0; i < size; ++i)\n    {\n      VERIFY(array[2*i] == v[i]);\n      VERIFY(map[i] == v[i]);\n    }\n  }\n\n  internal::aligned_delete(a_array, arraysize+1);\n}\n\ntemplate<int Alignment,typename MatrixType> void map_class_matrix(const MatrixType& _m)\n{\n  typedef typename MatrixType::Scalar Scalar;\n\n  Index rows = _m.rows(), cols = _m.cols();\n\n  MatrixType m = MatrixType::Random(rows,cols);\n  Scalar s1 = internal::random<Scalar>();\n\n  Index arraysize = 4*(rows+4)*(cols+4);\n\n  Scalar* a_array1 = internal::aligned_new<Scalar>(arraysize+1);\n  Scalar* array1 = a_array1;\n  if(Alignment!=Aligned)\n    array1 = (Scalar*)(internal::IntPtr(a_array1) + (internal::packet_traits<Scalar>::AlignedOnScalar?sizeof(Scalar):sizeof(typename NumTraits<Scalar>::Real)));\n\n  Scalar a_array2[256];\n  Scalar* array2 = a_array2;\n  if(Alignment!=Aligned)\n    array2 = (Scalar*)(internal::IntPtr(a_array2) + (internal::packet_traits<Scalar>::AlignedOnScalar?sizeof(Scalar):sizeof(typename NumTraits<Scalar>::Real)));\n  else\n    array2 = (Scalar*)(((internal::UIntPtr(a_array2)+EIGEN_MAX_ALIGN_BYTES-1)/EIGEN_MAX_ALIGN_BYTES)*EIGEN_MAX_ALIGN_BYTES);\n  Index maxsize2 = a_array2 - array2 + 256;\n  \n  // test no inner stride and some dynamic outer stride\n  for(int k=0; k<2; ++k)\n  {\n    if(k==1 && (m.innerSize()+1)*m.outerSize() > maxsize2)\n      break;\n    Scalar* array = (k==0 ? array1 : array2);\n    \n    Map<MatrixType, Alignment, OuterStride<Dynamic> > map(array, rows, cols, OuterStride<Dynamic>(m.innerSize()+1));\n    map = m;\n    VERIFY(map.outerStride() == map.innerSize()+1);\n    for(int i = 0; i < m.outerSize(); ++i)\n      for(int j = 0; j < m.innerSize(); ++j)\n      {\n        VERIFY(array[map.outerStride()*i+j] == m.coeffByOuterInner(i,j));\n        VERIFY(map.coeffByOuterInner(i,j) == m.coeffByOuterInner(i,j));\n      }\n    VERIFY_IS_APPROX(s1*map,s1*m);\n    map *= s1;\n    VERIFY_IS_APPROX(map,s1*m);\n  }\n\n  // test no inner stride and an outer stride of +4. This is quite important as for fixed-size matrices,\n  // this allows to hit the special case where it's vectorizable.\n  for(int k=0; k<2; ++k)\n  {\n    if(k==1 && (m.innerSize()+4)*m.outerSize() > maxsize2)\n      break;\n    Scalar* array = (k==0 ? array1 : array2);\n    \n    enum {\n      InnerSize = MatrixType::InnerSizeAtCompileTime,\n      OuterStrideAtCompileTime = InnerSize==Dynamic ? Dynamic : InnerSize+4\n    };\n    Map<MatrixType, Alignment, OuterStride<OuterStrideAtCompileTime> >\n      map(array, rows, cols, OuterStride<OuterStrideAtCompileTime>(m.innerSize()+4));\n    map = m;\n    VERIFY(map.outerStride() == map.innerSize()+4);\n    for(int i = 0; i < m.outerSize(); ++i)\n      for(int j = 0; j < m.innerSize(); ++j)\n      {\n        VERIFY(array[map.outerStride()*i+j] == m.coeffByOuterInner(i,j));\n        VERIFY(map.coeffByOuterInner(i,j) == m.coeffByOuterInner(i,j));\n      }\n    VERIFY_IS_APPROX(s1*map,s1*m);\n    map *= s1;\n    VERIFY_IS_APPROX(map,s1*m);\n  }\n\n  // test both inner stride and outer stride\n  for(int k=0; k<2; ++k)\n  {\n    if(k==1 && (2*m.innerSize()+1)*(m.outerSize()*2) > maxsize2)\n      break;\n    Scalar* array = (k==0 ? array1 : array2);\n    \n    Map<MatrixType, Alignment, Stride<Dynamic,Dynamic> > map(array, rows, cols, Stride<Dynamic,Dynamic>(2*m.innerSize()+1, 2));\n    map = m;\n    VERIFY(map.outerStride() == 2*map.innerSize()+1);\n    VERIFY(map.innerStride() == 2);\n    for(int i = 0; i < m.outerSize(); ++i)\n      for(int j = 0; j < m.innerSize(); ++j)\n      {\n        VERIFY(array[map.outerStride()*i+map.innerStride()*j] == m.coeffByOuterInner(i,j));\n        VERIFY(map.coeffByOuterInner(i,j) == m.coeffByOuterInner(i,j));\n      }\n    VERIFY_IS_APPROX(s1*map,s1*m);\n    map *= s1;\n    VERIFY_IS_APPROX(map,s1*m);\n  }\n\n  // test inner stride and no outer stride\n  for(int k=0; k<2; ++k)\n  {\n    if(k==1 && (m.innerSize()*2)*m.outerSize() > maxsize2)\n      break;\n    Scalar* array = (k==0 ? array1 : array2);\n\n    Map<MatrixType, Alignment, InnerStride<Dynamic> > map(array, rows, cols, InnerStride<Dynamic>(2));\n    map = m;\n    VERIFY(map.outerStride() == map.innerSize()*2);\n    for(int i = 0; i < m.outerSize(); ++i)\n      for(int j = 0; j < m.innerSize(); ++j)\n      {\n        VERIFY(array[map.innerSize()*i*2+j*2] == m.coeffByOuterInner(i,j));\n        VERIFY(map.coeffByOuterInner(i,j) == m.coeffByOuterInner(i,j));\n      }\n    VERIFY_IS_APPROX(s1*map,s1*m);\n    map *= s1;\n    VERIFY_IS_APPROX(map,s1*m);\n  }\n\n  internal::aligned_delete(a_array1, arraysize+1);\n}\n\n// Additional tests for inner-stride but no outer-stride\ntemplate<int>\nvoid bug1453()\n{\n  const int data[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31};\n  typedef Matrix<int,Dynamic,Dynamic,RowMajor> RowMatrixXi;\n  typedef Matrix<int,2,3,ColMajor> ColMatrix23i;\n  typedef Matrix<int,3,2,ColMajor> ColMatrix32i;\n  typedef Matrix<int,2,3,RowMajor> RowMatrix23i;\n  typedef Matrix<int,3,2,RowMajor> RowMatrix32i;\n\n  VERIFY_IS_APPROX(MatrixXi::Map(data, 2, 3, InnerStride<2>()), MatrixXi::Map(data, 2, 3, Stride<4,2>()));\n  VERIFY_IS_APPROX(MatrixXi::Map(data, 2, 3, InnerStride<>(2)), MatrixXi::Map(data, 2, 3, Stride<4,2>()));\n  VERIFY_IS_APPROX(MatrixXi::Map(data, 3, 2, InnerStride<2>()), MatrixXi::Map(data, 3, 2, Stride<6,2>()));\n  VERIFY_IS_APPROX(MatrixXi::Map(data, 3, 2, InnerStride<>(2)), MatrixXi::Map(data, 3, 2, Stride<6,2>()));\n\n  VERIFY_IS_APPROX(RowMatrixXi::Map(data, 2, 3, InnerStride<2>()), RowMatrixXi::Map(data, 2, 3, Stride<6,2>()));\n  VERIFY_IS_APPROX(RowMatrixXi::Map(data, 2, 3, InnerStride<>(2)), RowMatrixXi::Map(data, 2, 3, Stride<6,2>()));\n  VERIFY_IS_APPROX(RowMatrixXi::Map(data, 3, 2, InnerStride<2>()), RowMatrixXi::Map(data, 3, 2, Stride<4,2>()));\n  VERIFY_IS_APPROX(RowMatrixXi::Map(data, 3, 2, InnerStride<>(2)), RowMatrixXi::Map(data, 3, 2, Stride<4,2>()));\n\n  VERIFY_IS_APPROX(ColMatrix23i::Map(data, InnerStride<2>()), MatrixXi::Map(data, 2, 3, Stride<4,2>()));\n  VERIFY_IS_APPROX(ColMatrix23i::Map(data, InnerStride<>(2)), MatrixXi::Map(data, 2, 3, Stride<4,2>()));\n  VERIFY_IS_APPROX(ColMatrix32i::Map(data, InnerStride<2>()), MatrixXi::Map(data, 3, 2, Stride<6,2>()));\n  VERIFY_IS_APPROX(ColMatrix32i::Map(data, InnerStride<>(2)), MatrixXi::Map(data, 3, 2, Stride<6,2>()));\n\n  VERIFY_IS_APPROX(RowMatrix23i::Map(data, InnerStride<2>()), RowMatrixXi::Map(data, 2, 3, Stride<6,2>()));\n  VERIFY_IS_APPROX(RowMatrix23i::Map(data, InnerStride<>(2)), RowMatrixXi::Map(data, 2, 3, Stride<6,2>()));\n  VERIFY_IS_APPROX(RowMatrix32i::Map(data, InnerStride<2>()), RowMatrixXi::Map(data, 3, 2, Stride<4,2>()));\n  VERIFY_IS_APPROX(RowMatrix32i::Map(data, InnerStride<>(2)), RowMatrixXi::Map(data, 3, 2, Stride<4,2>()));\n}\n\nEIGEN_DECLARE_TEST(mapstride)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    int maxn = 30;\n    CALL_SUBTEST_1( map_class_vector<Aligned>(Matrix<float, 1, 1>()) );\n    CALL_SUBTEST_1( map_class_vector<Unaligned>(Matrix<float, 1, 1>()) );\n    CALL_SUBTEST_2( map_class_vector<Aligned>(Vector4d()) );\n    CALL_SUBTEST_2( map_class_vector<Unaligned>(Vector4d()) );\n    CALL_SUBTEST_3( map_class_vector<Aligned>(RowVector4f()) );\n    CALL_SUBTEST_3( map_class_vector<Unaligned>(RowVector4f()) );\n    CALL_SUBTEST_4( map_class_vector<Aligned>(VectorXcf(internal::random<int>(1,maxn))) );\n    CALL_SUBTEST_4( map_class_vector<Unaligned>(VectorXcf(internal::random<int>(1,maxn))) );\n    CALL_SUBTEST_5( map_class_vector<Aligned>(VectorXi(internal::random<int>(1,maxn))) );\n    CALL_SUBTEST_5( map_class_vector<Unaligned>(VectorXi(internal::random<int>(1,maxn))) );\n\n    CALL_SUBTEST_1( map_class_matrix<Aligned>(Matrix<float, 1, 1>()) );\n    CALL_SUBTEST_1( map_class_matrix<Unaligned>(Matrix<float, 1, 1>()) );\n    CALL_SUBTEST_2( map_class_matrix<Aligned>(Matrix4d()) );\n    CALL_SUBTEST_2( map_class_matrix<Unaligned>(Matrix4d()) );\n    CALL_SUBTEST_3( map_class_matrix<Aligned>(Matrix<float,3,5>()) );\n    CALL_SUBTEST_3( map_class_matrix<Unaligned>(Matrix<float,3,5>()) );\n    CALL_SUBTEST_3( map_class_matrix<Aligned>(Matrix<float,4,8>()) );\n    CALL_SUBTEST_3( map_class_matrix<Unaligned>(Matrix<float,4,8>()) );\n    CALL_SUBTEST_4( map_class_matrix<Aligned>(MatrixXcf(internal::random<int>(1,maxn),internal::random<int>(1,maxn))) );\n    CALL_SUBTEST_4( map_class_matrix<Unaligned>(MatrixXcf(internal::random<int>(1,maxn),internal::random<int>(1,maxn))) );\n    CALL_SUBTEST_5( map_class_matrix<Aligned>(MatrixXi(internal::random<int>(1,maxn),internal::random<int>(1,maxn))) );\n    CALL_SUBTEST_5( map_class_matrix<Unaligned>(MatrixXi(internal::random<int>(1,maxn),internal::random<int>(1,maxn))) );\n    CALL_SUBTEST_6( map_class_matrix<Aligned>(MatrixXcd(internal::random<int>(1,maxn),internal::random<int>(1,maxn))) );\n    CALL_SUBTEST_6( map_class_matrix<Unaligned>(MatrixXcd(internal::random<int>(1,maxn),internal::random<int>(1,maxn))) );\n\n    CALL_SUBTEST_5( bug1453<0>() );\n    \n    TEST_SET_BUT_UNUSED_VARIABLE(maxn);\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/meta.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\ntemplate<typename From, typename To>\nbool check_is_convertible(const From&, const To&)\n{\n  return internal::is_convertible<From,To>::value;\n}\n\nstruct FooReturnType {\n  typedef int ReturnType;\n};\n\nstruct MyInterface {\n  virtual void func() = 0;\n  virtual ~MyInterface() {}\n};\nstruct MyImpl : public MyInterface {\n  void func() {}\n};\n\nEIGEN_DECLARE_TEST(meta)\n{\n  VERIFY((internal::conditional<(3<4),internal::true_type, internal::false_type>::type::value));\n  VERIFY(( internal::is_same<float,float>::value));\n  VERIFY((!internal::is_same<float,double>::value));\n  VERIFY((!internal::is_same<float,float&>::value));\n  VERIFY((!internal::is_same<float,const float&>::value));\n  \n  VERIFY(( internal::is_same<float,internal::remove_all<const float&>::type >::value));\n  VERIFY(( internal::is_same<float,internal::remove_all<const float*>::type >::value));\n  VERIFY(( internal::is_same<float,internal::remove_all<const float*&>::type >::value));\n  VERIFY(( internal::is_same<float,internal::remove_all<float**>::type >::value));\n  VERIFY(( internal::is_same<float,internal::remove_all<float**&>::type >::value));\n  VERIFY(( internal::is_same<float,internal::remove_all<float* const *&>::type >::value));\n  VERIFY(( internal::is_same<float,internal::remove_all<float* const>::type >::value));\n\n  // test add_const\n  VERIFY(( internal::is_same< internal::add_const<float>::type, const float >::value));\n  VERIFY(( internal::is_same< internal::add_const<float*>::type, float* const>::value));\n  VERIFY(( internal::is_same< internal::add_const<float const*>::type, float const* const>::value));\n  VERIFY(( internal::is_same< internal::add_const<float&>::type, float& >::value));\n\n  // test remove_const\n  VERIFY(( internal::is_same< internal::remove_const<float const* const>::type, float const* >::value));\n  VERIFY(( internal::is_same< internal::remove_const<float const*>::type, float const* >::value));\n  VERIFY(( internal::is_same< internal::remove_const<float* const>::type, float* >::value));\n\n  // test add_const_on_value_type\n  VERIFY(( internal::is_same< internal::add_const_on_value_type<float&>::type, float const& >::value));\n  VERIFY(( internal::is_same< internal::add_const_on_value_type<float*>::type, float const* >::value));\n\n  VERIFY(( internal::is_same< internal::add_const_on_value_type<float>::type, const float >::value));\n  VERIFY(( internal::is_same< internal::add_const_on_value_type<const float>::type, const float >::value));\n\n  VERIFY(( internal::is_same< internal::add_const_on_value_type<const float* const>::type, const float* const>::value));\n  VERIFY(( internal::is_same< internal::add_const_on_value_type<float* const>::type, const float* const>::value));\n  \n  VERIFY(( internal::is_same<float,internal::remove_reference<float&>::type >::value));\n  VERIFY(( internal::is_same<const float,internal::remove_reference<const float&>::type >::value));\n  VERIFY(( internal::is_same<float,internal::remove_pointer<float*>::type >::value));\n  VERIFY(( internal::is_same<const float,internal::remove_pointer<const float*>::type >::value));\n  VERIFY(( internal::is_same<float,internal::remove_pointer<float* const >::type >::value));\n  \n\n  // is_convertible\n  STATIC_CHECK(( internal::is_convertible<float,double>::value ));\n  STATIC_CHECK(( internal::is_convertible<int,double>::value ));\n  STATIC_CHECK(( internal::is_convertible<int, short>::value ));\n  STATIC_CHECK(( internal::is_convertible<short, int>::value ));\n  STATIC_CHECK(( internal::is_convertible<double,int>::value ));\n  STATIC_CHECK(( internal::is_convertible<double,std::complex<double> >::value ));\n  STATIC_CHECK((!internal::is_convertible<std::complex<double>,double>::value ));\n  STATIC_CHECK(( internal::is_convertible<Array33f,Matrix3f>::value ));\n  STATIC_CHECK(( internal::is_convertible<Matrix3f&,Matrix3f>::value ));\n  STATIC_CHECK(( internal::is_convertible<Matrix3f&,Matrix3f&>::value ));\n  STATIC_CHECK(( internal::is_convertible<Matrix3f&,const Matrix3f&>::value ));\n  STATIC_CHECK(( internal::is_convertible<const Matrix3f&,Matrix3f>::value ));\n  STATIC_CHECK(( internal::is_convertible<const Matrix3f&,const Matrix3f&>::value ));\n  STATIC_CHECK((!internal::is_convertible<const Matrix3f&,Matrix3f&>::value ));\n  STATIC_CHECK((!internal::is_convertible<const Matrix3f,Matrix3f&>::value ));\n  STATIC_CHECK(!( internal::is_convertible<Matrix3f,Matrix3f&>::value ));\n\n  STATIC_CHECK(!( internal::is_convertible<int,int&>::value ));\n  STATIC_CHECK(( internal::is_convertible<const int,const int& >::value ));\n\n  //STATIC_CHECK((!internal::is_convertible<Matrix3f,Matrix3d>::value )); //does not even compile because the conversion is prevented by a static assertion\n  STATIC_CHECK((!internal::is_convertible<Array33f,int>::value ));\n  STATIC_CHECK((!internal::is_convertible<MatrixXf,float>::value ));\n  {\n    float f;\n    MatrixXf A, B;\n    VectorXf a, b;\n    VERIFY(( check_is_convertible(a.dot(b), f) ));\n    VERIFY(( check_is_convertible(a.transpose()*b, f) ));\n    VERIFY((!check_is_convertible(A*B, f) ));\n    VERIFY(( check_is_convertible(A*B, A) ));\n  }\n\n  #if (EIGEN_COMP_GNUC  && EIGEN_COMP_GNUC  <=  99) \\\n   || (EIGEN_COMP_CLANG && EIGEN_COMP_CLANG <= 909) \\\n   || (EIGEN_COMP_MSVC  && EIGEN_COMP_MSVC  <=1914)\n  // See http://eigen.tuxfamily.org/bz/show_bug.cgi?id=1752,\n  // basically, a fix in the c++ standard breaks our c++98 implementation\n  // of is_convertible for abstract classes.\n  // So the following tests are expected to fail with recent compilers.\n\n  STATIC_CHECK(( !internal::is_convertible<MyInterface, MyImpl>::value ));\n  #if (!EIGEN_COMP_GNUC_STRICT) || (EIGEN_GNUC_AT_LEAST(4,8))\n  // GCC prior to 4.8 fails to compile this test:\n  // error: cannot allocate an object of abstract type 'MyInterface'\n  // In other word, it does not obey SFINAE.\n  // Nevertheless, we don't really care about supporting abstract type as scalar type!\n  STATIC_CHECK(( !internal::is_convertible<MyImpl, MyInterface>::value ));\n  #endif\n  STATIC_CHECK((  internal::is_convertible<MyImpl, const MyInterface&>::value ));\n\n  #endif\n\n  {\n    int i;\n    VERIFY(( check_is_convertible(fix<3>(), i) ));\n    VERIFY((!check_is_convertible(i, fix<DynamicIndex>()) ));\n  }\n\n\n  VERIFY((  internal::has_ReturnType<FooReturnType>::value ));\n  VERIFY((  internal::has_ReturnType<ScalarBinaryOpTraits<int,int> >::value ));\n  VERIFY(( !internal::has_ReturnType<MatrixXf>::value ));\n  VERIFY(( !internal::has_ReturnType<int>::value ));\n  \n  VERIFY(internal::meta_sqrt<1>::ret == 1);\n  #define VERIFY_META_SQRT(X) VERIFY(internal::meta_sqrt<X>::ret == int(std::sqrt(double(X))))\n  VERIFY_META_SQRT(2);\n  VERIFY_META_SQRT(3);\n  VERIFY_META_SQRT(4);\n  VERIFY_META_SQRT(5);\n  VERIFY_META_SQRT(6);\n  VERIFY_META_SQRT(8);\n  VERIFY_META_SQRT(9);\n  VERIFY_META_SQRT(15);\n  VERIFY_META_SQRT(16);\n  VERIFY_META_SQRT(17);\n  VERIFY_META_SQRT(255);\n  VERIFY_META_SQRT(256);\n  VERIFY_META_SQRT(257);\n  VERIFY_META_SQRT(1023);\n  VERIFY_META_SQRT(1024);\n  VERIFY_META_SQRT(1025);\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/metis_support.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"sparse_solver.h\"\n#include <Eigen/SparseLU>\n#include <Eigen/MetisSupport>\n#include <unsupported/Eigen/SparseExtra>\n\ntemplate<typename T> void test_metis_T()\n{\n  SparseLU<SparseMatrix<T, ColMajor>, MetisOrdering<int> > sparselu_metis;\n  \n  check_sparse_square_solving(sparselu_metis); \n}\n\nEIGEN_DECLARE_TEST(metis_support)\n{\n  CALL_SUBTEST_1(test_metis_T<double>());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/miscmatrices.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\ntemplate<typename MatrixType> void miscMatrices(const MatrixType& m)\n{\n  /* this test covers the following files:\n     DiagonalMatrix.h Ones.h\n  */\n  typedef typename MatrixType::Scalar Scalar;\n  typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  Index r = internal::random<Index>(0, rows-1), r2 = internal::random<Index>(0, rows-1), c = internal::random<Index>(0, cols-1);\n  VERIFY_IS_APPROX(MatrixType::Ones(rows,cols)(r,c), static_cast<Scalar>(1));\n  MatrixType m1 = MatrixType::Ones(rows,cols);\n  VERIFY_IS_APPROX(m1(r,c), static_cast<Scalar>(1));\n  VectorType v1 = VectorType::Random(rows);\n  v1[0];\n  Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime>\n  square(v1.asDiagonal());\n  if(r==r2) VERIFY_IS_APPROX(square(r,r2), v1[r]);\n  else VERIFY_IS_MUCH_SMALLER_THAN(square(r,r2), static_cast<Scalar>(1));\n  square = MatrixType::Zero(rows, rows);\n  square.diagonal() = VectorType::Ones(rows);\n  VERIFY_IS_APPROX(square, MatrixType::Identity(rows, rows));\n}\n\nEIGEN_DECLARE_TEST(miscmatrices)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( miscMatrices(Matrix<float, 1, 1>()) );\n    CALL_SUBTEST_2( miscMatrices(Matrix4d()) );\n    CALL_SUBTEST_3( miscMatrices(MatrixXcf(3, 3)) );\n    CALL_SUBTEST_4( miscMatrices(MatrixXi(8, 12)) );\n    CALL_SUBTEST_5( miscMatrices(MatrixXcd(20, 20)) );\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/mixingtypes.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2015 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#if defined(EIGEN_TEST_PART_7)\n\n#ifndef EIGEN_NO_STATIC_ASSERT\n#define EIGEN_NO_STATIC_ASSERT // turn static asserts into runtime asserts in order to check them\n#endif\n\n// ignore double-promotion diagnostic for clang and gcc, if we check for static assertion anyway:\n// TODO do the same for MSVC?\n#if defined(__clang__)\n#  if (__clang_major__ * 100 + __clang_minor__) >= 308\n#    pragma clang diagnostic ignored \"-Wdouble-promotion\"\n#  endif\n#elif defined(__GNUC__)\n  // TODO is there a minimal GCC version for this? At least g++-4.7 seems to be fine with this.\n#  pragma GCC diagnostic ignored \"-Wdouble-promotion\"\n#endif\n\n#endif\n\n\n\n#if defined(EIGEN_TEST_PART_1) || defined(EIGEN_TEST_PART_2) || defined(EIGEN_TEST_PART_3)\n\n#ifndef EIGEN_DONT_VECTORIZE\n#define EIGEN_DONT_VECTORIZE\n#endif\n\n#endif\n\nstatic bool g_called;\n#define EIGEN_SCALAR_BINARY_OP_PLUGIN { g_called |= (!internal::is_same<LhsScalar,RhsScalar>::value); }\n\n#include \"main.h\"\n\nusing namespace std;\n\n#define VERIFY_MIX_SCALAR(XPR,REF) \\\n  g_called = false; \\\n  VERIFY_IS_APPROX(XPR,REF); \\\n  VERIFY( g_called && #XPR\" not properly optimized\");\n\ntemplate<int SizeAtCompileType>\nvoid raise_assertion(Index size = SizeAtCompileType)\n{\n  // VERIFY_RAISES_ASSERT(mf+md); // does not even compile\n  Matrix<float, SizeAtCompileType, 1> vf; vf.setRandom(size);\n  Matrix<double, SizeAtCompileType, 1> vd; vd.setRandom(size);\n  VERIFY_RAISES_ASSERT(vf=vd);\n  VERIFY_RAISES_ASSERT(vf+=vd);\n  VERIFY_RAISES_ASSERT(vf-=vd);\n  VERIFY_RAISES_ASSERT(vd=vf);\n  VERIFY_RAISES_ASSERT(vd+=vf);\n  VERIFY_RAISES_ASSERT(vd-=vf);\n\n  //   vd.asDiagonal() * mf;    // does not even compile\n  //   vcd.asDiagonal() * mf;   // does not even compile\n\n#if 0 // we get other compilation errors here than just static asserts\n  VERIFY_RAISES_ASSERT(vd.dot(vf));\n#endif\n}\n\n\ntemplate<int SizeAtCompileType> void mixingtypes(int size = SizeAtCompileType)\n{\n  typedef std::complex<float>   CF;\n  typedef std::complex<double>  CD;\n  typedef Matrix<float, SizeAtCompileType, SizeAtCompileType> Mat_f;\n  typedef Matrix<double, SizeAtCompileType, SizeAtCompileType> Mat_d;\n  typedef Matrix<std::complex<float>, SizeAtCompileType, SizeAtCompileType> Mat_cf;\n  typedef Matrix<std::complex<double>, SizeAtCompileType, SizeAtCompileType> Mat_cd;\n  typedef Matrix<float, SizeAtCompileType, 1> Vec_f;\n  typedef Matrix<double, SizeAtCompileType, 1> Vec_d;\n  typedef Matrix<std::complex<float>, SizeAtCompileType, 1> Vec_cf;\n  typedef Matrix<std::complex<double>, SizeAtCompileType, 1> Vec_cd;\n\n  Mat_f mf    = Mat_f::Random(size,size);\n  Mat_d md    = mf.template cast<double>();\n  //Mat_d rd    = md;\n  Mat_cf mcf  = Mat_cf::Random(size,size);\n  Mat_cd mcd  = mcf.template cast<complex<double> >();\n  Mat_cd rcd = mcd;\n  Vec_f vf    = Vec_f::Random(size,1);\n  Vec_d vd    = vf.template cast<double>();\n  Vec_cf vcf  = Vec_cf::Random(size,1);\n  Vec_cd vcd  = vcf.template cast<complex<double> >();\n  float           sf  = internal::random<float>();\n  double          sd  = internal::random<double>();\n  complex<float>  scf = internal::random<complex<float> >();\n  complex<double> scd = internal::random<complex<double> >();\n\n  mf+mf;\n\n  float  epsf = std::sqrt(std::numeric_limits<float> ::min EIGEN_EMPTY ());\n  double epsd = std::sqrt(std::numeric_limits<double>::min EIGEN_EMPTY ());\n\n  while(std::abs(sf )<epsf) sf  = internal::random<float>();\n  while(std::abs(sd )<epsd) sd  = internal::random<double>();\n  while(std::abs(scf)<epsf) scf = internal::random<CF>();\n  while(std::abs(scd)<epsd) scd = internal::random<CD>();\n\n  // check scalar products\n  VERIFY_MIX_SCALAR(vcf * sf , vcf * complex<float>(sf));\n  VERIFY_MIX_SCALAR(sd * vcd , complex<double>(sd) * vcd);\n  VERIFY_MIX_SCALAR(vf * scf , vf.template cast<complex<float> >() * scf);\n  VERIFY_MIX_SCALAR(scd * vd , scd * vd.template cast<complex<double> >());\n\n  VERIFY_MIX_SCALAR(vcf * 2 , vcf * complex<float>(2));\n  VERIFY_MIX_SCALAR(vcf * 2.1 , vcf * complex<float>(2.1));\n  VERIFY_MIX_SCALAR(2 * vcf, vcf * complex<float>(2));\n  VERIFY_MIX_SCALAR(2.1 * vcf , vcf * complex<float>(2.1));\n\n  // check scalar quotients\n  VERIFY_MIX_SCALAR(vcf / sf , vcf / complex<float>(sf));\n  VERIFY_MIX_SCALAR(vf / scf , vf.template cast<complex<float> >() / scf);\n  VERIFY_MIX_SCALAR(vf.array()  / scf, vf.template cast<complex<float> >().array() / scf);\n  VERIFY_MIX_SCALAR(scd / vd.array() , scd / vd.template cast<complex<double> >().array());\n\n  // check scalar increment\n  VERIFY_MIX_SCALAR(vcf.array() + sf , vcf.array() + complex<float>(sf));\n  VERIFY_MIX_SCALAR(sd  + vcd.array(), complex<double>(sd) + vcd.array());\n  VERIFY_MIX_SCALAR(vf.array()  + scf, vf.template cast<complex<float> >().array() + scf);\n  VERIFY_MIX_SCALAR(scd + vd.array() , scd + vd.template cast<complex<double> >().array());\n\n  // check scalar subtractions\n  VERIFY_MIX_SCALAR(vcf.array() - sf , vcf.array() - complex<float>(sf));\n  VERIFY_MIX_SCALAR(sd  - vcd.array(), complex<double>(sd) - vcd.array());\n  VERIFY_MIX_SCALAR(vf.array()  - scf, vf.template cast<complex<float> >().array() - scf);\n  VERIFY_MIX_SCALAR(scd - vd.array() , scd - vd.template cast<complex<double> >().array());\n\n  // check scalar powers\n  VERIFY_MIX_SCALAR( pow(vcf.array(), sf),        Eigen::pow(vcf.array(), complex<float>(sf)) );\n  VERIFY_MIX_SCALAR( vcf.array().pow(sf) ,        Eigen::pow(vcf.array(), complex<float>(sf)) );\n  VERIFY_MIX_SCALAR( pow(sd, vcd.array()),        Eigen::pow(complex<double>(sd), vcd.array()) );\n  VERIFY_MIX_SCALAR( Eigen::pow(vf.array(), scf), Eigen::pow(vf.template cast<complex<float> >().array(), scf) );\n  VERIFY_MIX_SCALAR( vf.array().pow(scf) ,        Eigen::pow(vf.template cast<complex<float> >().array(), scf) );\n  VERIFY_MIX_SCALAR( Eigen::pow(scd, vd.array()), Eigen::pow(scd, vd.template cast<complex<double> >().array()) );\n\n  // check dot product\n  vf.dot(vf);\n  VERIFY_IS_APPROX(vcf.dot(vf), vcf.dot(vf.template cast<complex<float> >()));\n\n  // check diagonal product\n  VERIFY_IS_APPROX(vf.asDiagonal() * mcf, vf.template cast<complex<float> >().asDiagonal() * mcf);\n  VERIFY_IS_APPROX(vcd.asDiagonal() * md, vcd.asDiagonal() * md.template cast<complex<double> >());\n  VERIFY_IS_APPROX(mcf * vf.asDiagonal(), mcf * vf.template cast<complex<float> >().asDiagonal());\n  VERIFY_IS_APPROX(md * vcd.asDiagonal(), md.template cast<complex<double> >() * vcd.asDiagonal());\n\n  // check inner product\n  VERIFY_IS_APPROX((vf.transpose() * vcf).value(), (vf.template cast<complex<float> >().transpose() * vcf).value());\n\n  // check outer product\n  VERIFY_IS_APPROX((vf * vcf.transpose()).eval(), (vf.template cast<complex<float> >() * vcf.transpose()).eval());\n\n  // coeff wise product\n\n  VERIFY_IS_APPROX((vf * vcf.transpose()).eval(), (vf.template cast<complex<float> >() * vcf.transpose()).eval());\n\n  Mat_cd mcd2 = mcd;\n  VERIFY_IS_APPROX(mcd.array() *= md.array(), mcd2.array() *= md.array().template cast<std::complex<double> >());\n  \n  // check matrix-matrix products\n  VERIFY_IS_APPROX(sd*md*mcd, (sd*md).template cast<CD>().eval()*mcd);\n  VERIFY_IS_APPROX(sd*mcd*md, sd*mcd*md.template cast<CD>());\n  VERIFY_IS_APPROX(scd*md*mcd, scd*md.template cast<CD>().eval()*mcd);\n  VERIFY_IS_APPROX(scd*mcd*md, scd*mcd*md.template cast<CD>());\n\n  VERIFY_IS_APPROX(sf*mf*mcf, sf*mf.template cast<CF>()*mcf);\n  VERIFY_IS_APPROX(sf*mcf*mf, sf*mcf*mf.template cast<CF>());\n  VERIFY_IS_APPROX(scf*mf*mcf, scf*mf.template cast<CF>()*mcf);\n  VERIFY_IS_APPROX(scf*mcf*mf, scf*mcf*mf.template cast<CF>());\n\n  VERIFY_IS_APPROX(sd*md.adjoint()*mcd, (sd*md).template cast<CD>().eval().adjoint()*mcd);\n  VERIFY_IS_APPROX(sd*mcd.adjoint()*md, sd*mcd.adjoint()*md.template cast<CD>());\n  VERIFY_IS_APPROX(sd*md.adjoint()*mcd.adjoint(), (sd*md).template cast<CD>().eval().adjoint()*mcd.adjoint());\n  VERIFY_IS_APPROX(sd*mcd.adjoint()*md.adjoint(), sd*mcd.adjoint()*md.template cast<CD>().adjoint());\n  VERIFY_IS_APPROX(sd*md*mcd.adjoint(), (sd*md).template cast<CD>().eval()*mcd.adjoint());\n  VERIFY_IS_APPROX(sd*mcd*md.adjoint(), sd*mcd*md.template cast<CD>().adjoint());\n\n  VERIFY_IS_APPROX(sf*mf.adjoint()*mcf, (sf*mf).template cast<CF>().eval().adjoint()*mcf);\n  VERIFY_IS_APPROX(sf*mcf.adjoint()*mf, sf*mcf.adjoint()*mf.template cast<CF>());\n  VERIFY_IS_APPROX(sf*mf.adjoint()*mcf.adjoint(), (sf*mf).template cast<CF>().eval().adjoint()*mcf.adjoint());\n  VERIFY_IS_APPROX(sf*mcf.adjoint()*mf.adjoint(), sf*mcf.adjoint()*mf.template cast<CF>().adjoint());\n  VERIFY_IS_APPROX(sf*mf*mcf.adjoint(), (sf*mf).template cast<CF>().eval()*mcf.adjoint());\n  VERIFY_IS_APPROX(sf*mcf*mf.adjoint(), sf*mcf*mf.template cast<CF>().adjoint());\n\n  VERIFY_IS_APPROX(sf*mf*vcf, (sf*mf).template cast<CF>().eval()*vcf);\n  VERIFY_IS_APPROX(scf*mf*vcf,(scf*mf.template cast<CF>()).eval()*vcf);\n  VERIFY_IS_APPROX(sf*mcf*vf, sf*mcf*vf.template cast<CF>());\n  VERIFY_IS_APPROX(scf*mcf*vf,scf*mcf*vf.template cast<CF>());\n\n  VERIFY_IS_APPROX(sf*vcf.adjoint()*mf,  sf*vcf.adjoint()*mf.template cast<CF>().eval());\n  VERIFY_IS_APPROX(scf*vcf.adjoint()*mf, scf*vcf.adjoint()*mf.template cast<CF>().eval());\n  VERIFY_IS_APPROX(sf*vf.adjoint()*mcf,  sf*vf.adjoint().template cast<CF>().eval()*mcf);\n  VERIFY_IS_APPROX(scf*vf.adjoint()*mcf, scf*vf.adjoint().template cast<CF>().eval()*mcf);\n\n  VERIFY_IS_APPROX(sd*md*vcd, (sd*md).template cast<CD>().eval()*vcd);\n  VERIFY_IS_APPROX(scd*md*vcd,(scd*md.template cast<CD>()).eval()*vcd);\n  VERIFY_IS_APPROX(sd*mcd*vd, sd*mcd*vd.template cast<CD>().eval());\n  VERIFY_IS_APPROX(scd*mcd*vd,scd*mcd*vd.template cast<CD>().eval());\n\n  VERIFY_IS_APPROX(sd*vcd.adjoint()*md,  sd*vcd.adjoint()*md.template cast<CD>().eval());\n  VERIFY_IS_APPROX(scd*vcd.adjoint()*md, scd*vcd.adjoint()*md.template cast<CD>().eval());\n  VERIFY_IS_APPROX(sd*vd.adjoint()*mcd,  sd*vd.adjoint().template cast<CD>().eval()*mcd);\n  VERIFY_IS_APPROX(scd*vd.adjoint()*mcd, scd*vd.adjoint().template cast<CD>().eval()*mcd);\n\n  VERIFY_IS_APPROX( sd*vcd.adjoint()*md.template triangularView<Upper>(),  sd*vcd.adjoint()*md.template cast<CD>().eval().template triangularView<Upper>());\n  VERIFY_IS_APPROX(scd*vcd.adjoint()*md.template triangularView<Lower>(), scd*vcd.adjoint()*md.template cast<CD>().eval().template triangularView<Lower>());\n  VERIFY_IS_APPROX( sd*vcd.adjoint()*md.transpose().template triangularView<Upper>(),  sd*vcd.adjoint()*md.transpose().template cast<CD>().eval().template triangularView<Upper>());\n  VERIFY_IS_APPROX(scd*vcd.adjoint()*md.transpose().template triangularView<Lower>(), scd*vcd.adjoint()*md.transpose().template cast<CD>().eval().template triangularView<Lower>());\n  VERIFY_IS_APPROX( sd*vd.adjoint()*mcd.template triangularView<Lower>(),  sd*vd.adjoint().template cast<CD>().eval()*mcd.template triangularView<Lower>());\n  VERIFY_IS_APPROX(scd*vd.adjoint()*mcd.template triangularView<Upper>(), scd*vd.adjoint().template cast<CD>().eval()*mcd.template triangularView<Upper>());\n  VERIFY_IS_APPROX( sd*vd.adjoint()*mcd.transpose().template triangularView<Lower>(),  sd*vd.adjoint().template cast<CD>().eval()*mcd.transpose().template triangularView<Lower>());\n  VERIFY_IS_APPROX(scd*vd.adjoint()*mcd.transpose().template triangularView<Upper>(), scd*vd.adjoint().template cast<CD>().eval()*mcd.transpose().template triangularView<Upper>());\n\n  // Not supported yet: trmm\n//   VERIFY_IS_APPROX(sd*mcd*md.template triangularView<Lower>(),  sd*mcd*md.template cast<CD>().eval().template triangularView<Lower>());\n//   VERIFY_IS_APPROX(scd*mcd*md.template triangularView<Upper>(), scd*mcd*md.template cast<CD>().eval().template triangularView<Upper>());\n//   VERIFY_IS_APPROX(sd*md*mcd.template triangularView<Lower>(),  sd*md.template cast<CD>().eval()*mcd.template triangularView<Lower>());\n//   VERIFY_IS_APPROX(scd*md*mcd.template triangularView<Upper>(), scd*md.template cast<CD>().eval()*mcd.template triangularView<Upper>());\n\n  // Not supported yet: symv\n//   VERIFY_IS_APPROX(sd*vcd.adjoint()*md.template selfadjointView<Upper>(),  sd*vcd.adjoint()*md.template cast<CD>().eval().template selfadjointView<Upper>());\n//   VERIFY_IS_APPROX(scd*vcd.adjoint()*md.template selfadjointView<Lower>(), scd*vcd.adjoint()*md.template cast<CD>().eval().template selfadjointView<Lower>());\n//   VERIFY_IS_APPROX(sd*vd.adjoint()*mcd.template selfadjointView<Lower>(),  sd*vd.adjoint().template cast<CD>().eval()*mcd.template selfadjointView<Lower>());\n//   VERIFY_IS_APPROX(scd*vd.adjoint()*mcd.template selfadjointView<Upper>(), scd*vd.adjoint().template cast<CD>().eval()*mcd.template selfadjointView<Upper>());\n\n  // Not supported yet: symm\n//   VERIFY_IS_APPROX(sd*vcd.adjoint()*md.template selfadjointView<Upper>(),  sd*vcd.adjoint()*md.template cast<CD>().eval().template selfadjointView<Upper>());\n//   VERIFY_IS_APPROX(scd*vcd.adjoint()*md.template selfadjointView<Upper>(), scd*vcd.adjoint()*md.template cast<CD>().eval().template selfadjointView<Upper>());\n//   VERIFY_IS_APPROX(sd*vd.adjoint()*mcd.template selfadjointView<Upper>(),  sd*vd.adjoint().template cast<CD>().eval()*mcd.template selfadjointView<Upper>());\n//   VERIFY_IS_APPROX(scd*vd.adjoint()*mcd.template selfadjointView<Upper>(), scd*vd.adjoint().template cast<CD>().eval()*mcd.template selfadjointView<Upper>());\n\n  rcd.setZero();\n  VERIFY_IS_APPROX(Mat_cd(rcd.template triangularView<Upper>() = sd * mcd * md),\n                   Mat_cd((sd * mcd * md.template cast<CD>().eval()).template triangularView<Upper>()));\n  VERIFY_IS_APPROX(Mat_cd(rcd.template triangularView<Upper>() = sd * md * mcd),\n                   Mat_cd((sd * md.template cast<CD>().eval() * mcd).template triangularView<Upper>()));\n  VERIFY_IS_APPROX(Mat_cd(rcd.template triangularView<Upper>() = scd * mcd * md),\n                   Mat_cd((scd * mcd * md.template cast<CD>().eval()).template triangularView<Upper>()));\n  VERIFY_IS_APPROX(Mat_cd(rcd.template triangularView<Upper>() = scd * md * mcd),\n                   Mat_cd((scd * md.template cast<CD>().eval() * mcd).template triangularView<Upper>()));\n\n\n  VERIFY_IS_APPROX( md.array()  * mcd.array(), md.template cast<CD>().eval().array() * mcd.array() );\n  VERIFY_IS_APPROX( mcd.array() * md.array(),  mcd.array() * md.template cast<CD>().eval().array() );\n\n  VERIFY_IS_APPROX( md.array()  + mcd.array(), md.template cast<CD>().eval().array() + mcd.array() );\n  VERIFY_IS_APPROX( mcd.array() + md.array(),  mcd.array() + md.template cast<CD>().eval().array() );\n\n  VERIFY_IS_APPROX( md.array()  - mcd.array(), md.template cast<CD>().eval().array() - mcd.array() );\n  VERIFY_IS_APPROX( mcd.array() - md.array(),  mcd.array() - md.template cast<CD>().eval().array() );\n\n  if(mcd.array().abs().minCoeff()>epsd)\n  {\n    VERIFY_IS_APPROX( md.array() / mcd.array(), md.template cast<CD>().eval().array() / mcd.array() );\n  }\n  if(md.array().abs().minCoeff()>epsd)\n  {\n    VERIFY_IS_APPROX( mcd.array() / md.array(), mcd.array() / md.template cast<CD>().eval().array() );\n  }\n\n  if(md.array().abs().minCoeff()>epsd || mcd.array().abs().minCoeff()>epsd)\n  {\n    VERIFY_IS_APPROX( md.array().pow(mcd.array()), md.template cast<CD>().eval().array().pow(mcd.array()) );\n    VERIFY_IS_APPROX( mcd.array().pow(md.array()),  mcd.array().pow(md.template cast<CD>().eval().array()) );\n\n    VERIFY_IS_APPROX( pow(md.array(),mcd.array()), md.template cast<CD>().eval().array().pow(mcd.array()) );\n    VERIFY_IS_APPROX( pow(mcd.array(),md.array()),  mcd.array().pow(md.template cast<CD>().eval().array()) );\n  }\n\n  rcd = mcd;\n  VERIFY_IS_APPROX( rcd = md, md.template cast<CD>().eval() );\n  rcd = mcd;\n  VERIFY_IS_APPROX( rcd += md, mcd + md.template cast<CD>().eval() );\n  rcd = mcd;\n  VERIFY_IS_APPROX( rcd -= md, mcd - md.template cast<CD>().eval() );\n  rcd = mcd;\n  VERIFY_IS_APPROX( rcd.array() *= md.array(), mcd.array() * md.template cast<CD>().eval().array() );\n  rcd = mcd;\n  if(md.array().abs().minCoeff()>epsd)\n  {\n    VERIFY_IS_APPROX( rcd.array() /= md.array(), mcd.array() / md.template cast<CD>().eval().array() );\n  }\n\n  rcd = mcd;\n  VERIFY_IS_APPROX( rcd.noalias() += md + mcd*md, mcd + (md.template cast<CD>().eval()) + mcd*(md.template cast<CD>().eval()));\n\n  VERIFY_IS_APPROX( rcd.noalias()  = md*md,       ((md*md).eval().template cast<CD>()) );\n  rcd = mcd;\n  VERIFY_IS_APPROX( rcd.noalias() += md*md, mcd + ((md*md).eval().template cast<CD>()) );\n  rcd = mcd;\n  VERIFY_IS_APPROX( rcd.noalias() -= md*md, mcd - ((md*md).eval().template cast<CD>()) );\n\n  VERIFY_IS_APPROX( rcd.noalias()  = mcd + md*md,       mcd + ((md*md).eval().template cast<CD>()) );\n  rcd = mcd;\n  VERIFY_IS_APPROX( rcd.noalias() += mcd + md*md, mcd + mcd + ((md*md).eval().template cast<CD>()) );\n  rcd = mcd;\n  VERIFY_IS_APPROX( rcd.noalias() -= mcd + md*md,           - ((md*md).eval().template cast<CD>()) );\n}\n\nEIGEN_DECLARE_TEST(mixingtypes)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1(mixingtypes<3>());\n    CALL_SUBTEST_2(mixingtypes<4>());\n    CALL_SUBTEST_3(mixingtypes<Dynamic>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE)));\n\n    CALL_SUBTEST_4(mixingtypes<3>());\n    CALL_SUBTEST_5(mixingtypes<4>());\n    CALL_SUBTEST_6(mixingtypes<Dynamic>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE)));\n    CALL_SUBTEST_7(raise_assertion<Dynamic>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE)));\n  }\n  CALL_SUBTEST_7(raise_assertion<0>());\n  CALL_SUBTEST_7(raise_assertion<3>());\n  CALL_SUBTEST_7(raise_assertion<4>());\n  CALL_SUBTEST_7(raise_assertion<Dynamic>(0));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/mpl2only.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_MPL2_ONLY\n#define EIGEN_MPL2_ONLY\n#endif\n#include <Eigen/Dense>\n#include <Eigen/SparseCore>\n#include <Eigen/SparseLU>\n#include <Eigen/SparseQR>\n#include <Eigen/Sparse>\n#include <Eigen/IterativeLinearSolvers>\n#include <Eigen/Eigen>\n\nint main()\n{\n  return 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/nestbyvalue.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2019 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define TEST_ENABLE_TEMPORARY_TRACKING\n\n#include \"main.h\"\n\ntypedef NestByValue<MatrixXd> CpyMatrixXd;\ntypedef CwiseBinaryOp<internal::scalar_sum_op<double,double>,const CpyMatrixXd,const CpyMatrixXd> XprType;\n\nXprType get_xpr_with_temps(const MatrixXd& a)\n{\n  MatrixXd t1 = a.rowwise().reverse();\n  MatrixXd t2 = a+a;\n  return t1.nestByValue() + t2.nestByValue();\n}\n\nEIGEN_DECLARE_TEST(nestbyvalue)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    Index rows = internal::random<Index>(1,EIGEN_TEST_MAX_SIZE);\n    Index cols = internal::random<Index>(1,EIGEN_TEST_MAX_SIZE);\n    MatrixXd a = MatrixXd(rows,cols);\n    nb_temporaries = 0;\n    XprType x = get_xpr_with_temps(a);\n    VERIFY_IS_EQUAL(nb_temporaries,6);\n    MatrixXd b = x;\n    VERIFY_IS_EQUAL(nb_temporaries,6+1);\n    VERIFY_IS_APPROX(b, a.rowwise().reverse().eval() + (a+a).eval());\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/nesting_ops.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010 Hauke Heibel <hauke.heibel@gmail.com>\n// Copyright (C) 2015 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define TEST_ENABLE_TEMPORARY_TRACKING\n\n#include \"main.h\"\n\ntemplate <int N, typename XprType>\nvoid use_n_times(const XprType &xpr)\n{\n  typename internal::nested_eval<XprType,N>::type mat(xpr);\n  typename XprType::PlainObject res(mat.rows(), mat.cols());\n  nb_temporaries--; // remove res\n  res.setZero();\n  for(int i=0; i<N; ++i)\n    res += mat;\n}\n\ntemplate <int N, typename ReferenceType, typename XprType>\nbool verify_eval_type(const XprType &, const ReferenceType&)\n{\n  typedef typename internal::nested_eval<XprType,N>::type EvalType;\n  return internal::is_same<typename internal::remove_all<EvalType>::type, typename internal::remove_all<ReferenceType>::type>::value;\n}\n\ntemplate <typename MatrixType> void run_nesting_ops_1(const MatrixType& _m)\n{\n  typename internal::nested_eval<MatrixType,2>::type m(_m);\n\n  // Make really sure that we are in debug mode!\n  VERIFY_RAISES_ASSERT(eigen_assert(false));\n\n  // The only intention of these tests is to ensure that this code does\n  // not trigger any asserts or segmentation faults... more to come.\n  VERIFY_IS_APPROX( (m.transpose() * m).diagonal().sum(), (m.transpose() * m).diagonal().sum() );\n  VERIFY_IS_APPROX( (m.transpose() * m).diagonal().array().abs().sum(), (m.transpose() * m).diagonal().array().abs().sum() );\n\n  VERIFY_IS_APPROX( (m.transpose() * m).array().abs().sum(), (m.transpose() * m).array().abs().sum() );\n}\n\ntemplate <typename MatrixType> void run_nesting_ops_2(const MatrixType& _m)\n{\n  typedef typename MatrixType::Scalar Scalar;\n  Index rows = _m.rows();\n  Index cols = _m.cols();\n  MatrixType m1 = MatrixType::Random(rows,cols);\n  Matrix<Scalar,MatrixType::RowsAtCompileTime,MatrixType::ColsAtCompileTime,ColMajor> m2;\n\n  if((MatrixType::SizeAtCompileTime==Dynamic))\n  {\n    VERIFY_EVALUATION_COUNT( use_n_times<1>(m1 + m1*m1), 1 );\n    VERIFY_EVALUATION_COUNT( use_n_times<10>(m1 + m1*m1), 1 );\n\n    VERIFY_EVALUATION_COUNT( use_n_times<1>(m1.template triangularView<Lower>().solve(m1.col(0))), 1 );\n    VERIFY_EVALUATION_COUNT( use_n_times<10>(m1.template triangularView<Lower>().solve(m1.col(0))), 1 );\n\n    VERIFY_EVALUATION_COUNT( use_n_times<1>(Scalar(2)*m1.template triangularView<Lower>().solve(m1.col(0))), 2 ); // FIXME could be one by applying the scaling in-place on the solve result\n    VERIFY_EVALUATION_COUNT( use_n_times<1>(m1.col(0)+m1.template triangularView<Lower>().solve(m1.col(0))), 2 ); // FIXME could be one by adding m1.col() inplace\n    VERIFY_EVALUATION_COUNT( use_n_times<10>(m1.col(0)+m1.template triangularView<Lower>().solve(m1.col(0))), 2 );\n  }\n\n  {\n    VERIFY( verify_eval_type<10>(m1, m1) );\n    if(!NumTraits<Scalar>::IsComplex)\n    {\n      VERIFY( verify_eval_type<3>(2*m1, 2*m1) );\n      VERIFY( verify_eval_type<4>(2*m1, m1) );\n    }\n    else\n    {\n      VERIFY( verify_eval_type<2>(2*m1, 2*m1) );\n      VERIFY( verify_eval_type<3>(2*m1, m1) );\n    }\n    VERIFY( verify_eval_type<2>(m1+m1, m1+m1) );\n    VERIFY( verify_eval_type<3>(m1+m1, m1) );\n    VERIFY( verify_eval_type<1>(m1*m1.transpose(), m2) );\n    VERIFY( verify_eval_type<1>(m1*(m1+m1).transpose(), m2) );\n    VERIFY( verify_eval_type<2>(m1*m1.transpose(), m2) );\n    VERIFY( verify_eval_type<1>(m1+m1*m1, m1) );\n\n    VERIFY( verify_eval_type<1>(m1.template triangularView<Lower>().solve(m1), m1) );\n    VERIFY( verify_eval_type<1>(m1+m1.template triangularView<Lower>().solve(m1), m1) );\n  }\n}\n\n\nEIGEN_DECLARE_TEST(nesting_ops)\n{\n  CALL_SUBTEST_1(run_nesting_ops_1(MatrixXf::Random(25,25)));\n  CALL_SUBTEST_2(run_nesting_ops_1(MatrixXcd::Random(25,25)));\n  CALL_SUBTEST_3(run_nesting_ops_1(Matrix4f::Random()));\n  CALL_SUBTEST_4(run_nesting_ops_1(Matrix2d::Random()));\n\n  Index s = internal::random<int>(1,EIGEN_TEST_MAX_SIZE);\n  CALL_SUBTEST_1( run_nesting_ops_2(MatrixXf(s,s)) );\n  CALL_SUBTEST_2( run_nesting_ops_2(MatrixXcd(s,s)) );\n  CALL_SUBTEST_3( run_nesting_ops_2(Matrix4f()) );\n  CALL_SUBTEST_4( run_nesting_ops_2(Matrix2d()) );\n  TEST_SET_BUT_UNUSED_VARIABLE(s)\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/nomalloc.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n// discard stack allocation as that too bypasses malloc\n#define EIGEN_STACK_ALLOCATION_LIMIT 0\n// heap allocation will raise an assert if enabled at runtime\n#define EIGEN_RUNTIME_NO_MALLOC\n\n#include \"main.h\"\n#include <Eigen/Cholesky>\n#include <Eigen/Eigenvalues>\n#include <Eigen/LU>\n#include <Eigen/QR>\n#include <Eigen/SVD>\n\ntemplate<typename MatrixType> void nomalloc(const MatrixType& m)\n{\n  /* this test check no dynamic memory allocation are issued with fixed-size matrices\n  */\n  typedef typename MatrixType::Scalar Scalar;\n\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  MatrixType m1 = MatrixType::Random(rows, cols),\n             m2 = MatrixType::Random(rows, cols),\n             m3(rows, cols);\n\n  Scalar s1 = internal::random<Scalar>();\n\n  Index r = internal::random<Index>(0, rows-1),\n        c = internal::random<Index>(0, cols-1);\n\n  VERIFY_IS_APPROX((m1+m2)*s1,              s1*m1+s1*m2);\n  VERIFY_IS_APPROX((m1+m2)(r,c), (m1(r,c))+(m2(r,c)));\n  VERIFY_IS_APPROX(m1.cwiseProduct(m1.block(0,0,rows,cols)), (m1.array()*m1.array()).matrix());\n  VERIFY_IS_APPROX((m1*m1.transpose())*m2,  m1*(m1.transpose()*m2));\n  \n  m2.col(0).noalias() = m1 * m1.col(0);\n  m2.col(0).noalias() -= m1.adjoint() * m1.col(0);\n  m2.col(0).noalias() -= m1 * m1.row(0).adjoint();\n  m2.col(0).noalias() -= m1.adjoint() * m1.row(0).adjoint();\n\n  m2.row(0).noalias() = m1.row(0) * m1;\n  m2.row(0).noalias() -= m1.row(0) * m1.adjoint();\n  m2.row(0).noalias() -= m1.col(0).adjoint() * m1;\n  m2.row(0).noalias() -= m1.col(0).adjoint() * m1.adjoint();\n  VERIFY_IS_APPROX(m2,m2);\n  \n  m2.col(0).noalias() = m1.template triangularView<Upper>() * m1.col(0);\n  m2.col(0).noalias() -= m1.adjoint().template triangularView<Upper>() * m1.col(0);\n  m2.col(0).noalias() -= m1.template triangularView<Upper>() * m1.row(0).adjoint();\n  m2.col(0).noalias() -= m1.adjoint().template triangularView<Upper>() * m1.row(0).adjoint();\n\n  m2.row(0).noalias() = m1.row(0) * m1.template triangularView<Upper>();\n  m2.row(0).noalias() -= m1.row(0) * m1.adjoint().template triangularView<Upper>();\n  m2.row(0).noalias() -= m1.col(0).adjoint() * m1.template triangularView<Upper>();\n  m2.row(0).noalias() -= m1.col(0).adjoint() * m1.adjoint().template triangularView<Upper>();\n  VERIFY_IS_APPROX(m2,m2);\n  \n  m2.col(0).noalias() = m1.template selfadjointView<Upper>() * m1.col(0);\n  m2.col(0).noalias() -= m1.adjoint().template selfadjointView<Upper>() * m1.col(0);\n  m2.col(0).noalias() -= m1.template selfadjointView<Upper>() * m1.row(0).adjoint();\n  m2.col(0).noalias() -= m1.adjoint().template selfadjointView<Upper>() * m1.row(0).adjoint();\n\n  m2.row(0).noalias() = m1.row(0) * m1.template selfadjointView<Upper>();\n  m2.row(0).noalias() -= m1.row(0) * m1.adjoint().template selfadjointView<Upper>();\n  m2.row(0).noalias() -= m1.col(0).adjoint() * m1.template selfadjointView<Upper>();\n  m2.row(0).noalias() -= m1.col(0).adjoint() * m1.adjoint().template selfadjointView<Upper>();\n  VERIFY_IS_APPROX(m2,m2);\n  \n  m2.template selfadjointView<Lower>().rankUpdate(m1.col(0),-1);\n  m2.template selfadjointView<Upper>().rankUpdate(m1.row(0),-1);\n  m2.template selfadjointView<Lower>().rankUpdate(m1.col(0), m1.col(0)); // rank-2\n\n  // The following fancy matrix-matrix products are not safe yet regarding static allocation\n  m2.template selfadjointView<Lower>().rankUpdate(m1);\n  m2 += m2.template triangularView<Upper>() * m1;\n  m2.template triangularView<Upper>() = m2 * m2;\n  m1 += m1.template selfadjointView<Lower>() * m2;\n  VERIFY_IS_APPROX(m2,m2);\n}\n\ntemplate<typename Scalar>\nvoid ctms_decompositions()\n{\n  const int maxSize = 16;\n  const int size    = 12;\n\n  typedef Eigen::Matrix<Scalar,\n                        Eigen::Dynamic, Eigen::Dynamic,\n                        0,\n                        maxSize, maxSize> Matrix;\n\n  typedef Eigen::Matrix<Scalar,\n                        Eigen::Dynamic, 1,\n                        0,\n                        maxSize, 1> Vector;\n\n  typedef Eigen::Matrix<std::complex<Scalar>,\n                        Eigen::Dynamic, Eigen::Dynamic,\n                        0,\n                        maxSize, maxSize> ComplexMatrix;\n\n  const Matrix A(Matrix::Random(size, size)), B(Matrix::Random(size, size));\n  Matrix X(size,size);\n  const ComplexMatrix complexA(ComplexMatrix::Random(size, size));\n  const Matrix saA = A.adjoint() * A;\n  const Vector b(Vector::Random(size));\n  Vector x(size);\n\n  // Cholesky module\n  Eigen::LLT<Matrix>  LLT;  LLT.compute(A);\n  X = LLT.solve(B);\n  x = LLT.solve(b);\n  Eigen::LDLT<Matrix> LDLT; LDLT.compute(A);\n  X = LDLT.solve(B);\n  x = LDLT.solve(b);\n\n  // Eigenvalues module\n  Eigen::HessenbergDecomposition<ComplexMatrix> hessDecomp;        hessDecomp.compute(complexA);\n  Eigen::ComplexSchur<ComplexMatrix>            cSchur(size);      cSchur.compute(complexA);\n  Eigen::ComplexEigenSolver<ComplexMatrix>      cEigSolver;        cEigSolver.compute(complexA);\n  Eigen::EigenSolver<Matrix>                    eigSolver;         eigSolver.compute(A);\n  Eigen::SelfAdjointEigenSolver<Matrix>         saEigSolver(size); saEigSolver.compute(saA);\n  Eigen::Tridiagonalization<Matrix>             tridiag;           tridiag.compute(saA);\n\n  // LU module\n  Eigen::PartialPivLU<Matrix> ppLU; ppLU.compute(A);\n  X = ppLU.solve(B);\n  x = ppLU.solve(b);\n  Eigen::FullPivLU<Matrix>    fpLU; fpLU.compute(A);\n  X = fpLU.solve(B);\n  x = fpLU.solve(b);\n\n  // QR module\n  Eigen::HouseholderQR<Matrix>        hQR;  hQR.compute(A);\n  X = hQR.solve(B);\n  x = hQR.solve(b);\n  Eigen::ColPivHouseholderQR<Matrix>  cpQR; cpQR.compute(A);\n  X = cpQR.solve(B);\n  x = cpQR.solve(b);\n  Eigen::FullPivHouseholderQR<Matrix> fpQR; fpQR.compute(A);\n  // FIXME X = fpQR.solve(B);\n  x = fpQR.solve(b);\n\n  // SVD module\n  Eigen::JacobiSVD<Matrix> jSVD; jSVD.compute(A, ComputeFullU | ComputeFullV);\n}\n\nvoid test_zerosized() {\n  // default constructors:\n  Eigen::MatrixXd A;\n  Eigen::VectorXd v;\n  // explicit zero-sized:\n  Eigen::ArrayXXd A0(0,0);\n  Eigen::ArrayXd v0(0);\n\n  // assigning empty objects to each other:\n  A=A0;\n  v=v0;\n}\n\ntemplate<typename MatrixType> void test_reference(const MatrixType& m) {\n  typedef typename MatrixType::Scalar Scalar;\n  enum { Flag          =  MatrixType::IsRowMajor ? Eigen::RowMajor : Eigen::ColMajor};\n  enum { TransposeFlag = !MatrixType::IsRowMajor ? Eigen::RowMajor : Eigen::ColMajor};\n  Index rows = m.rows(), cols=m.cols();\n  typedef Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic, Flag         > MatrixX;\n  typedef Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic, TransposeFlag> MatrixXT;\n  // Dynamic reference:\n  typedef Eigen::Ref<const MatrixX  > Ref;\n  typedef Eigen::Ref<const MatrixXT > RefT;\n\n  Ref r1(m);\n  Ref r2(m.block(rows/3, cols/4, rows/2, cols/2));\n  RefT r3(m.transpose());\n  RefT r4(m.topLeftCorner(rows/2, cols/2).transpose());\n\n  VERIFY_RAISES_ASSERT(RefT r5(m));\n  VERIFY_RAISES_ASSERT(Ref r6(m.transpose()));\n  VERIFY_RAISES_ASSERT(Ref r7(Scalar(2) * m));\n\n  // Copy constructors shall also never malloc\n  Ref r8 = r1;\n  RefT r9 = r3;\n\n  // Initializing from a compatible Ref shall also never malloc\n  Eigen::Ref<const MatrixX, Unaligned, Stride<Dynamic, Dynamic> > r10=r8, r11=m;\n\n  // Initializing from an incompatible Ref will malloc:\n  typedef Eigen::Ref<const MatrixX, Aligned> RefAligned;\n  VERIFY_RAISES_ASSERT(RefAligned r12=r10);\n  VERIFY_RAISES_ASSERT(Ref r13=r10); // r10 has more dynamic strides\n\n}\n\nEIGEN_DECLARE_TEST(nomalloc)\n{\n  // create some dynamic objects\n  Eigen::MatrixXd M1 = MatrixXd::Random(3,3);\n  Ref<const MatrixXd> R1 = 2.0*M1; // Ref requires temporary\n\n  // from here on prohibit malloc:\n  Eigen::internal::set_is_malloc_allowed(false);\n\n  // check that our operator new is indeed called:\n  VERIFY_RAISES_ASSERT(MatrixXd dummy(MatrixXd::Random(3,3)));\n  CALL_SUBTEST_1(nomalloc(Matrix<float, 1, 1>()) );\n  CALL_SUBTEST_2(nomalloc(Matrix4d()) );\n  CALL_SUBTEST_3(nomalloc(Matrix<float,32,32>()) );\n  \n  // Check decomposition modules with dynamic matrices that have a known compile-time max size (ctms)\n  CALL_SUBTEST_4(ctms_decompositions<float>());\n\n  CALL_SUBTEST_5(test_zerosized());\n\n  CALL_SUBTEST_6(test_reference(Matrix<float,32,32>()));\n  CALL_SUBTEST_7(test_reference(R1));\n  CALL_SUBTEST_8(Ref<MatrixXd> R2 = M1.topRows<2>(); test_reference(R2));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/nullary.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010-2011 Jitse Niesen <jitse@maths.leeds.ac.uk>\n// Copyright (C) 2016 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\ntemplate<typename MatrixType>\nbool equalsIdentity(const MatrixType& A)\n{\n  typedef typename MatrixType::Scalar Scalar;\n  Scalar zero = static_cast<Scalar>(0);\n\n  bool offDiagOK = true;\n  for (Index i = 0; i < A.rows(); ++i) {\n    for (Index j = i+1; j < A.cols(); ++j) {\n      offDiagOK = offDiagOK && (A(i,j) == zero);\n    }\n  }\n  for (Index i = 0; i < A.rows(); ++i) {\n    for (Index j = 0; j < (std::min)(i, A.cols()); ++j) {\n      offDiagOK = offDiagOK && (A(i,j) == zero);\n    }\n  }\n\n  bool diagOK = (A.diagonal().array() == 1).all();\n  return offDiagOK && diagOK;\n\n}\n\ntemplate<typename VectorType>\nvoid check_extremity_accuracy(const VectorType &v, const typename VectorType::Scalar &low, const typename VectorType::Scalar &high)\n{\n  typedef typename VectorType::Scalar Scalar;\n  typedef typename VectorType::RealScalar RealScalar;\n\n  RealScalar prec = internal::is_same<RealScalar,float>::value ? NumTraits<RealScalar>::dummy_precision()*10 : NumTraits<RealScalar>::dummy_precision()/10;\n  Index size = v.size();\n\n  if(size<20)\n    return;\n\n  for (int i=0; i<size; ++i)\n  {\n    if(i<5 || i>size-6)\n    {\n      Scalar ref = (low*RealScalar(size-i-1))/RealScalar(size-1) + (high*RealScalar(i))/RealScalar(size-1);\n      if(std::abs(ref)>1)\n      {\n        if(!internal::isApprox(v(i), ref, prec))\n          std::cout << v(i) << \" != \" << ref << \"  ; relative error: \" << std::abs((v(i)-ref)/ref) << \"  ; required precision: \" << prec << \"  ; range: \" << low << \",\" << high << \"  ; i: \" << i << \"\\n\";\n        VERIFY(internal::isApprox(v(i), (low*RealScalar(size-i-1))/RealScalar(size-1) + (high*RealScalar(i))/RealScalar(size-1), prec));\n      }\n    }\n  }\n}\n\ntemplate<typename VectorType>\nvoid testVectorType(const VectorType& base)\n{\n  typedef typename VectorType::Scalar Scalar;\n  typedef typename VectorType::RealScalar RealScalar;\n\n  const Index size = base.size();\n  \n  Scalar high = internal::random<Scalar>(-500,500);\n  Scalar low = (size == 1 ? high : internal::random<Scalar>(-500,500));\n  if (numext::real(low)>numext::real(high)) std::swap(low,high);\n\n  // check low==high\n  if(internal::random<float>(0.f,1.f)<0.05f)\n    low = high;\n  // check abs(low) >> abs(high)\n  else if(size>2 && std::numeric_limits<RealScalar>::max_exponent10>0 && internal::random<float>(0.f,1.f)<0.1f)\n    low = -internal::random<Scalar>(1,2) * RealScalar(std::pow(RealScalar(10),std::numeric_limits<RealScalar>::max_exponent10/2));\n\n  const Scalar step = ((size == 1) ? 1 : (high-low)/RealScalar(size-1));\n\n  // check whether the result yields what we expect it to do\n  VectorType m(base);\n  m.setLinSpaced(size,low,high);\n\n  if(!NumTraits<Scalar>::IsInteger)\n  {\n    VectorType n(size);\n    for (int i=0; i<size; ++i)\n      n(i) = low+RealScalar(i)*step;\n    VERIFY_IS_APPROX(m,n);\n\n    CALL_SUBTEST( check_extremity_accuracy(m, low, high) );\n  }\n\n  RealScalar range_length = numext::real(high-low);\n  if((!NumTraits<Scalar>::IsInteger) || (range_length>=size && (Index(range_length)%(size-1))==0) || (Index(range_length+1)<size && (size%Index(range_length+1))==0))\n  {\n    VectorType n(size);\n    if((!NumTraits<Scalar>::IsInteger) || (range_length>=size))\n      for (int i=0; i<size; ++i)\n        n(i) = size==1 ? low : (low + ((high-low)*Scalar(i))/RealScalar(size-1));\n    else\n      for (int i=0; i<size; ++i)\n        n(i) = size==1 ? low : low + Scalar((double(range_length+1)*double(i))/double(size));\n    VERIFY_IS_APPROX(m,n);\n\n    // random access version\n    m = VectorType::LinSpaced(size,low,high);\n    VERIFY_IS_APPROX(m,n);\n    VERIFY( internal::isApprox(m(m.size()-1),high) );\n    VERIFY( size==1 || internal::isApprox(m(0),low) );\n    VERIFY_IS_EQUAL(m(m.size()-1) , high);\n    if(!NumTraits<Scalar>::IsInteger)\n      CALL_SUBTEST( check_extremity_accuracy(m, low, high) );\n  }\n\n  VERIFY( numext::real(m(m.size()-1)) <= numext::real(high) );\n  VERIFY( (m.array().real() <= numext::real(high)).all() );\n  VERIFY( (m.array().real() >= numext::real(low)).all() );\n\n\n  VERIFY( numext::real(m(m.size()-1)) >= numext::real(low) );\n  if(size>=1)\n  {\n    VERIFY( internal::isApprox(m(0),low) );\n    VERIFY_IS_EQUAL(m(0) , low);\n  }\n\n  // check whether everything works with row and col major vectors\n  Matrix<Scalar,Dynamic,1> row_vector(size);\n  Matrix<Scalar,1,Dynamic> col_vector(size);\n  row_vector.setLinSpaced(size,low,high);\n  col_vector.setLinSpaced(size,low,high);\n  // when using the extended precision (e.g., FPU) the relative error might exceed 1 bit\n  // when computing the squared sum in isApprox, thus the 2x factor.\n  VERIFY( row_vector.isApprox(col_vector.transpose(), RealScalar(2)*NumTraits<Scalar>::epsilon()));\n\n  Matrix<Scalar,Dynamic,1> size_changer(size+50);\n  size_changer.setLinSpaced(size,low,high);\n  VERIFY( size_changer.size() == size );\n\n  typedef Matrix<Scalar,1,1> ScalarMatrix;\n  ScalarMatrix scalar;\n  scalar.setLinSpaced(1,low,high);\n  VERIFY_IS_APPROX( scalar, ScalarMatrix::Constant(high) );\n  VERIFY_IS_APPROX( ScalarMatrix::LinSpaced(1,low,high), ScalarMatrix::Constant(high) );\n\n  // regression test for bug 526 (linear vectorized transversal)\n  if (size > 1 && (!NumTraits<Scalar>::IsInteger)) {\n    m.tail(size-1).setLinSpaced(low, high);\n    VERIFY_IS_APPROX(m(size-1), high);\n  }\n\n  // regression test for bug 1383 (LinSpaced with empty size/range)\n  {\n    Index n0 = VectorType::SizeAtCompileTime==Dynamic ? 0 : VectorType::SizeAtCompileTime;\n    low = internal::random<Scalar>();\n    m = VectorType::LinSpaced(n0,low,low-RealScalar(1));\n    VERIFY(m.size()==n0);\n\n    if(VectorType::SizeAtCompileTime==Dynamic)\n    {\n      VERIFY_IS_EQUAL(VectorType::LinSpaced(n0,0,Scalar(n0-1)).sum(),Scalar(0));\n      VERIFY_IS_EQUAL(VectorType::LinSpaced(n0,low,low-RealScalar(1)).sum(),Scalar(0));\n    }\n\n    m.setLinSpaced(n0,0,Scalar(n0-1));\n    VERIFY(m.size()==n0);\n    m.setLinSpaced(n0,low,low-RealScalar(1));\n    VERIFY(m.size()==n0);\n\n    // empty range only:\n    VERIFY_IS_APPROX(VectorType::LinSpaced(size,low,low),VectorType::Constant(size,low));\n    m.setLinSpaced(size,low,low);\n    VERIFY_IS_APPROX(m,VectorType::Constant(size,low));\n\n    if(NumTraits<Scalar>::IsInteger)\n    {\n      VERIFY_IS_APPROX( VectorType::LinSpaced(size,low,low+Scalar(size-1)), VectorType::LinSpaced(size,low+Scalar(size-1),low).reverse() );\n\n      if(VectorType::SizeAtCompileTime==Dynamic)\n      {\n        // Check negative multiplicator path:\n        for(Index k=1; k<5; ++k)\n          VERIFY_IS_APPROX( VectorType::LinSpaced(size,low,low+Scalar((size-1)*k)), VectorType::LinSpaced(size,low+Scalar((size-1)*k),low).reverse() );\n        // Check negative divisor path:\n        for(Index k=1; k<5; ++k)\n          VERIFY_IS_APPROX( VectorType::LinSpaced(size*k,low,low+Scalar(size-1)), VectorType::LinSpaced(size*k,low+Scalar(size-1),low).reverse() );\n      }\n    }\n  }\n\n  // test setUnit()\n  if(m.size()>0)\n  {\n    for(Index k=0; k<10; ++k)\n    {\n      Index i = internal::random<Index>(0,m.size()-1);\n      m.setUnit(i);\n      VERIFY_IS_APPROX( m, VectorType::Unit(m.size(), i) );\n    }\n    if(VectorType::SizeAtCompileTime==Dynamic)\n    {\n      Index i = internal::random<Index>(0,2*m.size()-1);\n      m.setUnit(2*m.size(),i);\n      VERIFY_IS_APPROX( m, VectorType::Unit(m.size(),i) );\n    }\n  }\n\n}\n\ntemplate<typename MatrixType>\nvoid testMatrixType(const MatrixType& m)\n{\n  using std::abs;\n  const Index rows = m.rows();\n  const Index cols = m.cols();\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename MatrixType::RealScalar RealScalar;\n\n  Scalar s1;\n  do {\n    s1 = internal::random<Scalar>();\n  } while(abs(s1)<RealScalar(1e-5) && (!NumTraits<Scalar>::IsInteger));\n\n  MatrixType A;\n  A.setIdentity(rows, cols);\n  VERIFY(equalsIdentity(A));\n  VERIFY(equalsIdentity(MatrixType::Identity(rows, cols)));\n\n\n  A = MatrixType::Constant(rows,cols,s1);\n  Index i = internal::random<Index>(0,rows-1);\n  Index j = internal::random<Index>(0,cols-1);\n  VERIFY_IS_APPROX( MatrixType::Constant(rows,cols,s1)(i,j), s1 );\n  VERIFY_IS_APPROX( MatrixType::Constant(rows,cols,s1).coeff(i,j), s1 );\n  VERIFY_IS_APPROX( A(i,j), s1 );\n}\n\ntemplate<int>\nvoid bug79()\n{\n  // Assignment of a RowVectorXd to a MatrixXd (regression test for bug #79).\n  VERIFY( (MatrixXd(RowVectorXd::LinSpaced(3, 0, 1)) - RowVector3d(0, 0.5, 1)).norm() < std::numeric_limits<double>::epsilon() );\n}\n\ntemplate<int>\nvoid bug1630()\n{\n  Array4d x4 = Array4d::LinSpaced(0.0, 1.0);\n  Array3d x3(Array4d::LinSpaced(0.0, 1.0).head(3));\n  VERIFY_IS_APPROX(x4.head(3), x3);\n}\n\ntemplate<int>\nvoid nullary_overflow()\n{\n  // Check possible overflow issue\n  int n = 60000;\n  ArrayXi a1(n), a2(n);\n  a1.setLinSpaced(n, 0, n-1);\n  for(int i=0; i<n; ++i)\n    a2(i) = i;\n  VERIFY_IS_APPROX(a1,a2);\n}\n\ntemplate<int>\nvoid nullary_internal_logic()\n{\n  // check some internal logic\n  VERIFY((  internal::has_nullary_operator<internal::scalar_constant_op<double> >::value ));\n  VERIFY(( !internal::has_unary_operator<internal::scalar_constant_op<double> >::value ));\n  VERIFY(( !internal::has_binary_operator<internal::scalar_constant_op<double> >::value ));\n  VERIFY((  internal::functor_has_linear_access<internal::scalar_constant_op<double> >::ret ));\n\n  VERIFY(( !internal::has_nullary_operator<internal::scalar_identity_op<double> >::value ));\n  VERIFY(( !internal::has_unary_operator<internal::scalar_identity_op<double> >::value ));\n  VERIFY((  internal::has_binary_operator<internal::scalar_identity_op<double> >::value ));\n  VERIFY(( !internal::functor_has_linear_access<internal::scalar_identity_op<double> >::ret ));\n\n  VERIFY(( !internal::has_nullary_operator<internal::linspaced_op<float> >::value ));\n  VERIFY((  internal::has_unary_operator<internal::linspaced_op<float> >::value ));\n  VERIFY(( !internal::has_binary_operator<internal::linspaced_op<float> >::value ));\n  VERIFY((  internal::functor_has_linear_access<internal::linspaced_op<float> >::ret ));\n\n  // Regression unit test for a weird MSVC bug.\n  // Search \"nullary_wrapper_workaround_msvc\" in CoreEvaluators.h for the details.\n  // See also traits<Ref>::match.\n  {\n    MatrixXf A = MatrixXf::Random(3,3);\n    Ref<const MatrixXf> R = 2.0*A;\n    VERIFY_IS_APPROX(R, A+A);\n\n    Ref<const MatrixXf> R1 = MatrixXf::Random(3,3)+A;\n\n    VectorXi V = VectorXi::Random(3);\n    Ref<const VectorXi> R2 = VectorXi::LinSpaced(3,1,3)+V;\n    VERIFY_IS_APPROX(R2, V+Vector3i(1,2,3));\n\n    VERIFY((  internal::has_nullary_operator<internal::scalar_constant_op<float> >::value ));\n    VERIFY(( !internal::has_unary_operator<internal::scalar_constant_op<float> >::value ));\n    VERIFY(( !internal::has_binary_operator<internal::scalar_constant_op<float> >::value ));\n    VERIFY((  internal::functor_has_linear_access<internal::scalar_constant_op<float> >::ret ));\n\n    VERIFY(( !internal::has_nullary_operator<internal::linspaced_op<int> >::value ));\n    VERIFY((  internal::has_unary_operator<internal::linspaced_op<int> >::value ));\n    VERIFY(( !internal::has_binary_operator<internal::linspaced_op<int> >::value ));\n    VERIFY((  internal::functor_has_linear_access<internal::linspaced_op<int> >::ret ));\n  }\n}\n\nEIGEN_DECLARE_TEST(nullary)\n{\n  CALL_SUBTEST_1( testMatrixType(Matrix2d()) );\n  CALL_SUBTEST_2( testMatrixType(MatrixXcf(internal::random<int>(1,300),internal::random<int>(1,300))) );\n  CALL_SUBTEST_3( testMatrixType(MatrixXf(internal::random<int>(1,300),internal::random<int>(1,300))) );\n  \n  for(int i = 0; i < g_repeat*10; i++) {\n    CALL_SUBTEST_3( testVectorType(VectorXcd(internal::random<int>(1,30000))) );\n    CALL_SUBTEST_4( testVectorType(VectorXd(internal::random<int>(1,30000))) );\n    CALL_SUBTEST_5( testVectorType(Vector4d()) );  // regression test for bug 232\n    CALL_SUBTEST_6( testVectorType(Vector3d()) );\n    CALL_SUBTEST_7( testVectorType(VectorXf(internal::random<int>(1,30000))) );\n    CALL_SUBTEST_8( testVectorType(Vector3f()) );\n    CALL_SUBTEST_8( testVectorType(Vector4f()) );\n    CALL_SUBTEST_8( testVectorType(Matrix<float,8,1>()) );\n    CALL_SUBTEST_8( testVectorType(Matrix<float,1,1>()) );\n\n    CALL_SUBTEST_9( testVectorType(VectorXi(internal::random<int>(1,10))) );\n    CALL_SUBTEST_9( testVectorType(VectorXi(internal::random<int>(9,300))) );\n    CALL_SUBTEST_9( testVectorType(Matrix<int,1,1>()) );\n  }\n\n  CALL_SUBTEST_6( bug79<0>() );\n  CALL_SUBTEST_6( bug1630<0>() );\n  CALL_SUBTEST_9( nullary_overflow<0>() );\n  CALL_SUBTEST_10( nullary_internal_logic<0>() );\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/num_dimensions.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2018 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <Eigen/SparseCore>\n\ntemplate<int ExpectedDim,typename Xpr>\nvoid check_dim(const Xpr& ) {\n  STATIC_CHECK( Xpr::NumDimensions == ExpectedDim );\n}\n\n#if EIGEN_HAS_CXX11\ntemplate<template <typename,int,int> class Object>\nvoid map_num_dimensions()\n{\n  typedef Object<double, 1, 1> ArrayScalarType;\n  typedef Object<double, 2, 1> ArrayVectorType;\n  typedef Object<double, 1, 2> TransposeArrayVectorType;\n  typedef Object<double, 2, 2> ArrayType;\n  typedef Object<double, Eigen::Dynamic, 1> DynamicArrayVectorType;\n  typedef Object<double, 1, Eigen::Dynamic> DynamicTransposeArrayVectorType;\n  typedef Object<double, Eigen::Dynamic, Eigen::Dynamic> DynamicArrayType;\n\n  STATIC_CHECK(ArrayScalarType::NumDimensions == 0);\n  STATIC_CHECK(ArrayVectorType::NumDimensions == 1);\n  STATIC_CHECK(TransposeArrayVectorType::NumDimensions == 1);\n  STATIC_CHECK(ArrayType::NumDimensions == 2);\n  STATIC_CHECK(DynamicArrayVectorType::NumDimensions == 1);\n  STATIC_CHECK(DynamicTransposeArrayVectorType::NumDimensions == 1);\n  STATIC_CHECK(DynamicArrayType::NumDimensions == 2);\n\n  typedef Eigen::Map<ArrayScalarType> ArrayScalarMap;\n  typedef Eigen::Map<ArrayVectorType> ArrayVectorMap;\n  typedef Eigen::Map<TransposeArrayVectorType> TransposeArrayVectorMap;\n  typedef Eigen::Map<ArrayType> ArrayMap;\n  typedef Eigen::Map<DynamicArrayVectorType> DynamicArrayVectorMap;\n  typedef Eigen::Map<DynamicTransposeArrayVectorType> DynamicTransposeArrayVectorMap;\n  typedef Eigen::Map<DynamicArrayType> DynamicArrayMap;\n\n  STATIC_CHECK(ArrayScalarMap::NumDimensions == 0);\n  STATIC_CHECK(ArrayVectorMap::NumDimensions == 1);\n  STATIC_CHECK(TransposeArrayVectorMap::NumDimensions == 1);\n  STATIC_CHECK(ArrayMap::NumDimensions == 2);\n  STATIC_CHECK(DynamicArrayVectorMap::NumDimensions == 1);\n  STATIC_CHECK(DynamicTransposeArrayVectorMap::NumDimensions == 1);\n  STATIC_CHECK(DynamicArrayMap::NumDimensions == 2);\n}\n\ntemplate<typename Scalar, int Rows, int Cols>\nusing TArray = Array<Scalar,Rows,Cols>;\n\ntemplate<typename Scalar, int Rows, int Cols>\nusing TMatrix = Matrix<Scalar,Rows,Cols>;\n\n#endif\n\nEIGEN_DECLARE_TEST(num_dimensions)\n{\n  int n = 10;\n  ArrayXXd A(n,n);\n  CALL_SUBTEST( check_dim<2>(A) );\n  CALL_SUBTEST( check_dim<2>(A.block(1,1,2,2)) );\n  CALL_SUBTEST( check_dim<1>(A.col(1)) );\n  CALL_SUBTEST( check_dim<1>(A.row(1)) );\n\n  MatrixXd M(n,n);\n  CALL_SUBTEST( check_dim<0>(M.row(1)*M.col(1)) );\n\n  SparseMatrix<double> S(n,n);\n  CALL_SUBTEST( check_dim<2>(S) );\n  CALL_SUBTEST( check_dim<2>(S.block(1,1,2,2)) );\n  CALL_SUBTEST( check_dim<1>(S.col(1)) );\n  CALL_SUBTEST( check_dim<1>(S.row(1)) );\n\n  SparseVector<double> s(n);\n  CALL_SUBTEST( check_dim<1>(s) );\n  CALL_SUBTEST( check_dim<1>(s.head(2)) );\n  \n\n  #if EIGEN_HAS_CXX11\n  CALL_SUBTEST( map_num_dimensions<TArray>() );\n  CALL_SUBTEST( map_num_dimensions<TMatrix>() );\n  #endif\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/numext.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2017 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\ntemplate<typename T>\nvoid check_abs() {\n  typedef typename NumTraits<T>::Real Real;\n  Real zero(0);\n\n  if(NumTraits<T>::IsSigned)\n    VERIFY_IS_EQUAL(numext::abs(-T(1)), T(1));\n  VERIFY_IS_EQUAL(numext::abs(T(0)), T(0));\n  VERIFY_IS_EQUAL(numext::abs(T(1)), T(1));\n\n  for(int k=0; k<g_repeat*100; ++k)\n  {\n    T x = internal::random<T>();\n    if(!internal::is_same<T,bool>::value)\n      x = x/Real(2);\n    if(NumTraits<T>::IsSigned)\n    {\n      VERIFY_IS_EQUAL(numext::abs(x), numext::abs(-x));\n      VERIFY( numext::abs(-x) >= zero );\n    }\n    VERIFY( numext::abs(x) >= zero );\n    VERIFY_IS_APPROX( numext::abs2(x), numext::abs2(numext::abs(x)) );\n  }\n}\n\nEIGEN_DECLARE_TEST(numext) {\n  CALL_SUBTEST( check_abs<bool>() );\n  CALL_SUBTEST( check_abs<signed char>() );\n  CALL_SUBTEST( check_abs<unsigned char>() );\n  CALL_SUBTEST( check_abs<short>() );\n  CALL_SUBTEST( check_abs<unsigned short>() );\n  CALL_SUBTEST( check_abs<int>() );\n  CALL_SUBTEST( check_abs<unsigned int>() );\n  CALL_SUBTEST( check_abs<long>() );\n  CALL_SUBTEST( check_abs<unsigned long>() );\n  CALL_SUBTEST( check_abs<half>() );\n  CALL_SUBTEST( check_abs<float>() );\n  CALL_SUBTEST( check_abs<double>() );\n  CALL_SUBTEST( check_abs<long double>() );\n\n  CALL_SUBTEST( check_abs<std::complex<float> >() );\n  CALL_SUBTEST( check_abs<std::complex<double> >() );\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/packetmath.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"packetmath_test_shared.h\"\n\n#define REF_ADD(a,b) ((a)+(b))\n#define REF_SUB(a,b) ((a)-(b))\n#define REF_MUL(a,b) ((a)*(b))\n#define REF_DIV(a,b) ((a)/(b))\n#define REF_ABS_DIFF(a,b) ((a)>(b)?(a)-(b):(b)-(a))\n\ntemplate<typename FromScalar, typename FromPacket, typename ToScalar, typename ToPacket, bool CanCast = false>\nstruct test_cast_helper;\n\ntemplate<typename FromScalar, typename FromPacket, typename ToScalar, typename ToPacket>\nstruct test_cast_helper<FromScalar, FromPacket, ToScalar, ToPacket, false> {\n  static void run() {}\n};\n\ntemplate<typename FromScalar, typename FromPacket, typename ToScalar, typename ToPacket>\nstruct test_cast_helper<FromScalar, FromPacket, ToScalar, ToPacket, true> {\n  static void run() {\n    static const int PacketSize = internal::unpacket_traits<FromPacket>::size;\n    EIGEN_ALIGN_MAX FromScalar data1[PacketSize];\n    EIGEN_ALIGN_MAX ToScalar data2[PacketSize];\n    EIGEN_ALIGN_MAX ToScalar ref[PacketSize];\n\n    // Construct a packet of scalars that will not overflow when casting\n    for (int i=0; i<PacketSize; ++i) {\n      const FromScalar from_scalar = Array<FromScalar,1,1>::Random().value();\n      const ToScalar to_scalar = Array<ToScalar,1,1>::Random().value();\n      const FromScalar c = sizeof(ToScalar) > sizeof(FromScalar) ? static_cast<FromScalar>(to_scalar) : from_scalar;\n      data1[i] = (NumTraits<FromScalar>::IsSigned && !NumTraits<ToScalar>::IsSigned) ? numext::abs(c) : c;\n    }\n\n    for (int i=0; i<PacketSize; ++i)\n      ref[i] = static_cast<const ToScalar>(data1[i]);\n    internal::pstore(data2, internal::pcast<FromPacket, ToPacket>(internal::pload<FromPacket>(data1)));\n\n    VERIFY(test::areApprox(ref, data2, PacketSize) && \"internal::pcast<>\");\n  }\n};\n\ntemplate<typename FromPacket, typename ToScalar>\nvoid test_cast() {\n  typedef typename internal::unpacket_traits<FromPacket>::type FromScalar;\n  typedef typename internal::packet_traits<FromScalar> FromPacketTraits;\n  typedef typename internal::packet_traits<ToScalar>::type Full;\n  typedef typename internal::unpacket_traits<Full>::half Half;\n  typedef typename internal::unpacket_traits<typename internal::unpacket_traits<Full>::half>::half Quarter;\n\n  static const int PacketSize = internal::unpacket_traits<FromPacket>::size;\n  static const bool CanCast =\n      FromPacketTraits::HasCast &&\n      (PacketSize == internal::unpacket_traits<Full>::size ||\n      PacketSize == internal::unpacket_traits<Half>::size ||\n      PacketSize == internal::unpacket_traits<Quarter>::size);\n\n  typedef typename internal::conditional<internal::unpacket_traits<Quarter>::size == PacketSize, Quarter,\n      typename internal::conditional<internal::unpacket_traits<Half>::size == PacketSize, Half, Full>::type>::type\n      ToPacket;\n\n  test_cast_helper<FromScalar, FromPacket, ToScalar, ToPacket, CanCast>::run();\n}\n\ntemplate<typename Scalar,typename Packet> void packetmath_boolean()\n{\n  const int PacketSize = internal::unpacket_traits<Packet>::size;\n  const int size = 2*PacketSize;\n  EIGEN_ALIGN_MAX Scalar data1[size];\n  EIGEN_ALIGN_MAX Scalar data2[size];\n  EIGEN_ALIGN_MAX Scalar ref[size];\n\n  for (int i=0; i<size; ++i)\n  {\n    data1[i] = internal::random<Scalar>();\n  }\n  CHECK_CWISE2_IF(true, internal::por, internal::por);\n  CHECK_CWISE2_IF(true, internal::pxor, internal::pxor);\n  CHECK_CWISE2_IF(true, internal::pand, internal::pand);\n}\n\ntemplate<typename Scalar,typename Packet> void packetmath()\n{\n  typedef internal::packet_traits<Scalar> PacketTraits;\n  const int PacketSize = internal::unpacket_traits<Packet>::size;\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n\n  if (g_first_pass)\n    std::cerr << \"=== Testing packet of type '\" << typeid(Packet).name()\n              << \"' and scalar type '\" << typeid(Scalar).name()\n              << \"' and size '\" << PacketSize << \"' ===\\n\" ;\n\n  const int max_size = PacketSize > 4 ? PacketSize : 4;\n  const int size = PacketSize*max_size;\n  EIGEN_ALIGN_MAX Scalar data1[size];\n  EIGEN_ALIGN_MAX Scalar data2[size];\n  EIGEN_ALIGN_MAX Scalar data3[size];\n  EIGEN_ALIGN_MAX Packet packets[PacketSize*2];\n  EIGEN_ALIGN_MAX Scalar ref[size];\n  RealScalar refvalue = RealScalar(0);\n  for (int i=0; i<size; ++i)\n  {\n    data1[i] = internal::random<Scalar>()/RealScalar(PacketSize);\n    data2[i] = internal::random<Scalar>()/RealScalar(PacketSize);\n    refvalue = (std::max)(refvalue, numext::abs(data1[i]));\n  }\n\n  internal::pstore(data2, internal::pload<Packet>(data1));\n  VERIFY(test::areApprox(data1, data2, PacketSize) && \"aligned load/store\");\n\n  for (int offset=0; offset<PacketSize; ++offset)\n  {\n    internal::pstore(data2, internal::ploadu<Packet>(data1+offset));\n    VERIFY(test::areApprox(data1+offset, data2, PacketSize) && \"internal::ploadu\");\n  }\n\n  for (int offset=0; offset<PacketSize; ++offset)\n  {\n    internal::pstoreu(data2+offset, internal::pload<Packet>(data1));\n    VERIFY(test::areApprox(data1, data2+offset, PacketSize) && \"internal::pstoreu\");\n  }\n\n  if (internal::unpacket_traits<Packet>::masked_load_available)\n  {\n    test::packet_helper<internal::unpacket_traits<Packet>::masked_load_available, Packet> h;\n    unsigned long long max_umask = (0x1ull << PacketSize);\n\n    for (int offset=0; offset<PacketSize; ++offset)\n    {\n      for (unsigned long long umask=0; umask<max_umask; ++umask)\n      {\n        h.store(data2, h.load(data1+offset, umask));\n        for (int k=0; k<PacketSize; ++k)\n          data3[k] = ((umask & ( 0x1ull << k )) >> k) ? data1[k+offset] : Scalar(0);\n        VERIFY(test::areApprox(data3, data2, PacketSize) && \"internal::ploadu masked\");\n      }\n    }\n  }\n\n  if (internal::unpacket_traits<Packet>::masked_store_available)\n  {\n    test::packet_helper<internal::unpacket_traits<Packet>::masked_store_available, Packet> h;\n    unsigned long long max_umask = (0x1ull << PacketSize);\n\n    for (int offset=0; offset<PacketSize; ++offset)\n    {\n      for (unsigned long long umask=0; umask<max_umask; ++umask)\n      {\n        internal::pstore(data2, internal::pset1<Packet>(Scalar(0)));\n        h.store(data2, h.loadu(data1+offset), umask);\n        for (int k=0; k<PacketSize; ++k)\n          data3[k] = ((umask & ( 0x1ull << k )) >> k) ? data1[k+offset] : Scalar(0);\n        VERIFY(test::areApprox(data3, data2, PacketSize) && \"internal::pstoreu masked\");\n      }\n    }\n  }\n\n  for (int offset=0; offset<PacketSize; ++offset)\n  {\n    #define MIN(A,B) (A<B?A:B)\n    packets[0] = internal::pload<Packet>(data1);\n    packets[1] = internal::pload<Packet>(data1+PacketSize);\n         if (offset==0) internal::palign<0>(packets[0], packets[1]);\n    else if (offset==1) internal::palign<MIN(1,PacketSize-1)>(packets[0], packets[1]);\n    else if (offset==2) internal::palign<MIN(2,PacketSize-1)>(packets[0], packets[1]);\n    else if (offset==3) internal::palign<MIN(3,PacketSize-1)>(packets[0], packets[1]);\n    else if (offset==4) internal::palign<MIN(4,PacketSize-1)>(packets[0], packets[1]);\n    else if (offset==5) internal::palign<MIN(5,PacketSize-1)>(packets[0], packets[1]);\n    else if (offset==6) internal::palign<MIN(6,PacketSize-1)>(packets[0], packets[1]);\n    else if (offset==7) internal::palign<MIN(7,PacketSize-1)>(packets[0], packets[1]);\n    else if (offset==8) internal::palign<MIN(8,PacketSize-1)>(packets[0], packets[1]);\n    else if (offset==9) internal::palign<MIN(9,PacketSize-1)>(packets[0], packets[1]);\n    else if (offset==10) internal::palign<MIN(10,PacketSize-1)>(packets[0], packets[1]);\n    else if (offset==11) internal::palign<MIN(11,PacketSize-1)>(packets[0], packets[1]);\n    else if (offset==12) internal::palign<MIN(12,PacketSize-1)>(packets[0], packets[1]);\n    else if (offset==13) internal::palign<MIN(13,PacketSize-1)>(packets[0], packets[1]);\n    else if (offset==14) internal::palign<MIN(14,PacketSize-1)>(packets[0], packets[1]);\n    else if (offset==15) internal::palign<MIN(15,PacketSize-1)>(packets[0], packets[1]);\n    internal::pstore(data2, packets[0]);\n\n    for (int i=0; i<PacketSize; ++i)\n      ref[i] = data1[i+offset];\n\n    // palign is not used anymore, so let's just put a warning if it fails\n    ++g_test_level;\n    VERIFY(test::areApprox(ref, data2, PacketSize) && \"internal::palign\");\n    --g_test_level;\n  }\n\n  VERIFY((!PacketTraits::Vectorizable) || PacketTraits::HasAdd);\n  VERIFY((!PacketTraits::Vectorizable) || PacketTraits::HasSub);\n  VERIFY((!PacketTraits::Vectorizable) || PacketTraits::HasMul);\n\n  CHECK_CWISE2_IF(PacketTraits::HasAdd, REF_ADD,  internal::padd);\n  CHECK_CWISE2_IF(PacketTraits::HasSub, REF_SUB,  internal::psub);\n  CHECK_CWISE2_IF(PacketTraits::HasMul, REF_MUL,  internal::pmul);\n  CHECK_CWISE2_IF(PacketTraits::HasDiv, REF_DIV, internal::pdiv);\n\n  CHECK_CWISE1(internal::pnot, internal::pnot);\n  CHECK_CWISE1(internal::pzero, internal::pzero);\n  CHECK_CWISE1(internal::ptrue, internal::ptrue);\n  if (PacketTraits::HasNegate)\n    CHECK_CWISE1(internal::negate, internal::pnegate);\n  CHECK_CWISE1(numext::conj, internal::pconj);\n\n  for(int offset=0;offset<3;++offset)\n  {\n    for (int i=0; i<PacketSize; ++i)\n      ref[i] = data1[offset];\n    internal::pstore(data2, internal::pset1<Packet>(data1[offset]));\n    VERIFY(test::areApprox(ref, data2, PacketSize) && \"internal::pset1\");\n  }\n\n  {\n    for (int i=0; i<PacketSize*4; ++i)\n      ref[i] = data1[i/PacketSize];\n    Packet A0, A1, A2, A3;\n    internal::pbroadcast4<Packet>(data1, A0, A1, A2, A3);\n    internal::pstore(data2+0*PacketSize, A0);\n    internal::pstore(data2+1*PacketSize, A1);\n    internal::pstore(data2+2*PacketSize, A2);\n    internal::pstore(data2+3*PacketSize, A3);\n    VERIFY(test::areApprox(ref, data2, 4*PacketSize) && \"internal::pbroadcast4\");\n  }\n\n  {\n    for (int i=0; i<PacketSize*2; ++i)\n      ref[i] = data1[i/PacketSize];\n    Packet A0, A1;\n    internal::pbroadcast2<Packet>(data1, A0, A1);\n    internal::pstore(data2+0*PacketSize, A0);\n    internal::pstore(data2+1*PacketSize, A1);\n    VERIFY(test::areApprox(ref, data2, 2*PacketSize) && \"internal::pbroadcast2\");\n  }\n\n  VERIFY(internal::isApprox(data1[0], internal::pfirst(internal::pload<Packet>(data1))) && \"internal::pfirst\");\n\n  if(PacketSize>1)\n  {\n    // apply different offsets to check that ploaddup is robust to unaligned inputs\n    for(int offset=0;offset<4;++offset)\n    {\n      for(int i=0;i<PacketSize/2;++i)\n        ref[2*i+0] = ref[2*i+1] = data1[offset+i];\n      internal::pstore(data2,internal::ploaddup<Packet>(data1+offset));\n      VERIFY(test::areApprox(ref, data2, PacketSize) && \"ploaddup\");\n    }\n  }\n\n  if(PacketSize>2)\n  {\n    // apply different offsets to check that ploadquad is robust to unaligned inputs\n    for(int offset=0;offset<4;++offset)\n    {\n      for(int i=0;i<PacketSize/4;++i)\n        ref[4*i+0] = ref[4*i+1] = ref[4*i+2] = ref[4*i+3] = data1[offset+i];\n      internal::pstore(data2,internal::ploadquad<Packet>(data1+offset));\n      VERIFY(test::areApprox(ref, data2, PacketSize) && \"ploadquad\");\n    }\n  }\n\n  ref[0] = Scalar(0);\n  for (int i=0; i<PacketSize; ++i)\n    ref[0] += data1[i];\n  VERIFY(test::isApproxAbs(ref[0], internal::predux(internal::pload<Packet>(data1)), refvalue) && \"internal::predux\");\n\n  if(PacketSize==8 && internal::unpacket_traits<typename internal::unpacket_traits<Packet>::half>::size ==4) // so far, predux_half_downto4 is only required in such a case\n  {\n    int HalfPacketSize = PacketSize>4 ? PacketSize/2 : PacketSize;\n    for (int i=0; i<HalfPacketSize; ++i)\n      ref[i] = Scalar(0);\n    for (int i=0; i<PacketSize; ++i)\n      ref[i%HalfPacketSize] += data1[i];\n    internal::pstore(data2, internal::predux_half_dowto4(internal::pload<Packet>(data1)));\n    VERIFY(test::areApprox(ref, data2, HalfPacketSize) && \"internal::predux_half_dowto4\");\n  }\n\n  ref[0] = Scalar(1);\n  for (int i=0; i<PacketSize; ++i)\n    ref[0] *= data1[i];\n  VERIFY(internal::isApprox(ref[0], internal::predux_mul(internal::pload<Packet>(data1))) && \"internal::predux_mul\");\n\n  if (PacketTraits::HasReduxp)\n  {\n    for (int j=0; j<PacketSize; ++j)\n    {\n      ref[j] = Scalar(0);\n      for (int i=0; i<PacketSize; ++i)\n        ref[j] += data1[i+j*PacketSize];\n      packets[j] = internal::pload<Packet>(data1+j*PacketSize);\n    }\n    internal::pstore(data2, internal::preduxp(packets));\n    VERIFY(test::areApproxAbs(ref, data2, PacketSize, refvalue) && \"internal::preduxp\");\n  }\n\n  for (int i=0; i<PacketSize; ++i)\n    ref[i] = data1[PacketSize-i-1];\n  internal::pstore(data2, internal::preverse(internal::pload<Packet>(data1)));\n  VERIFY(test::areApprox(ref, data2, PacketSize) && \"internal::preverse\");\n\n  internal::PacketBlock<Packet> kernel;\n  for (int i=0; i<PacketSize; ++i) {\n    kernel.packet[i] = internal::pload<Packet>(data1+i*PacketSize);\n  }\n  ptranspose(kernel);\n  for (int i=0; i<PacketSize; ++i) {\n    internal::pstore(data2, kernel.packet[i]);\n    for (int j = 0; j < PacketSize; ++j) {\n      VERIFY(test::isApproxAbs(data2[j], data1[i+j*PacketSize], refvalue) && \"ptranspose\");\n    }\n  }\n\n  if (PacketTraits::HasBlend) {\n    Packet thenPacket = internal::pload<Packet>(data1);\n    Packet elsePacket = internal::pload<Packet>(data2);\n    EIGEN_ALIGN_MAX internal::Selector<PacketSize> selector;\n    for (int i = 0; i < PacketSize; ++i) {\n      selector.select[i] = i;\n    }\n\n    Packet blend = internal::pblend(selector, thenPacket, elsePacket);\n    EIGEN_ALIGN_MAX Scalar result[size];\n    internal::pstore(result, blend);\n    for (int i = 0; i < PacketSize; ++i) {\n      VERIFY(test::isApproxAbs(result[i], (selector.select[i] ? data1[i] : data2[i]), refvalue));\n    }\n  }\n\n  if (PacketTraits::HasInsert || g_vectorize_sse) {\n    // pinsertfirst\n    for (int i=0; i<PacketSize; ++i)\n      ref[i] = data1[i];\n    Scalar s = internal::random<Scalar>();\n    ref[0] = s;\n    internal::pstore(data2, internal::pinsertfirst(internal::pload<Packet>(data1),s));\n    VERIFY(test::areApprox(ref, data2, PacketSize) && \"internal::pinsertfirst\");\n  }\n\n  if (PacketTraits::HasInsert || g_vectorize_sse) {\n    // pinsertlast\n    for (int i=0; i<PacketSize; ++i)\n      ref[i] = data1[i];\n    Scalar s = internal::random<Scalar>();\n    ref[PacketSize-1] = s;\n    internal::pstore(data2, internal::pinsertlast(internal::pload<Packet>(data1),s));\n    VERIFY(test::areApprox(ref, data2, PacketSize) && \"internal::pinsertlast\");\n  }\n\n  {\n    for (int i = 0; i < PacketSize; ++i) {\n      // \"if\" mask\n      unsigned char v = internal::random<bool>() ? 0xff : 0;\n      char* bytes = (char*)(data1+i);\n      for(int k=0; k<int(sizeof(Scalar)); ++k) {\n        bytes[k] = v;\n      }\n      // \"then\" packet\n      data1[i+PacketSize] = internal::random<Scalar>();\n      // \"else\" packet\n      data1[i+2*PacketSize] = internal::random<Scalar>();\n    }\n    CHECK_CWISE3_IF(true, internal::pselect, internal::pselect);\n  }\n\n  {\n    for (int i = 0; i < PacketSize; ++i) {\n      data1[i] = Scalar(i);\n      data1[i + PacketSize] = internal::random<bool>() ? data1[i] : Scalar(0);\n    }\n    CHECK_CWISE2_IF(true, internal::pcmp_eq, internal::pcmp_eq);\n  }\n\n  CHECK_CWISE1_IF(PacketTraits::HasSqrt, numext::sqrt, internal::psqrt);\n\n  for (int i=0; i<size; ++i)\n  {\n    data1[i] = internal::random<Scalar>();\n  }\n  CHECK_CWISE2_IF(true, internal::pandnot, internal::pandnot);\n\n  packetmath_boolean<Scalar, Packet>();\n}\n\n\ntemplate<typename Scalar,typename Packet> void packetmath_real()\n{\n  typedef internal::packet_traits<Scalar> PacketTraits;\n  const int PacketSize = internal::unpacket_traits<Packet>::size;\n\n  const int size = PacketSize*4;\n  EIGEN_ALIGN_MAX Scalar data1[PacketSize*4];\n  EIGEN_ALIGN_MAX Scalar data2[PacketSize*4];\n  EIGEN_ALIGN_MAX Scalar ref[PacketSize*4];\n\n  for (int i=0; i<size; ++i)\n  {\n    data1[i] = internal::random<Scalar>(0,1) * std::pow(Scalar(10), internal::random<Scalar>(-6,6));\n    data2[i] = internal::random<Scalar>(0,1) * std::pow(Scalar(10), internal::random<Scalar>(-6,6));\n  }\n\n  if(internal::random<float>(0,1)<0.1f)\n     data1[internal::random<int>(0, PacketSize)] = 0;\n\n  CHECK_CWISE1_IF(PacketTraits::HasLog, std::log, internal::plog);\n  CHECK_CWISE1_IF(PacketTraits::HasRsqrt, Scalar(1)/std::sqrt, internal::prsqrt);\n\n  for (int i=0; i<size; ++i)\n  {\n    data1[i] = internal::random<Scalar>(-1,1) * std::pow(Scalar(10), internal::random<Scalar>(-3,3));\n    data2[i] = internal::random<Scalar>(-1,1) * std::pow(Scalar(10), internal::random<Scalar>(-3,3));\n  }\n  CHECK_CWISE1_IF(PacketTraits::HasSin, std::sin, internal::psin);\n  CHECK_CWISE1_IF(PacketTraits::HasCos, std::cos, internal::pcos);\n  CHECK_CWISE1_IF(PacketTraits::HasTan, std::tan, internal::ptan);\n\n  CHECK_CWISE1_IF(PacketTraits::HasRound, numext::round, internal::pround);\n  CHECK_CWISE1_IF(PacketTraits::HasCeil, numext::ceil, internal::pceil);\n  CHECK_CWISE1_IF(PacketTraits::HasFloor, numext::floor, internal::pfloor);\n  CHECK_CWISE1_IF(PacketTraits::HasRint, numext::rint, internal::print);\n\n  // See bug 1785.\n  for (int i=0; i<size; ++i)\n   {\n     data1[i] = -1.5 + i;\n     data2[i] = -1.5 + i;\n   }\n  CHECK_CWISE1_IF(PacketTraits::HasRound, numext::round, internal::pround);\n  CHECK_CWISE1_IF(PacketTraits::HasRint, numext::rint, internal::print);\n\n  for (int i=0; i<size; ++i)\n  {\n    data1[i] = internal::random<Scalar>(-1,1);\n    data2[i] = internal::random<Scalar>(-1,1);\n  }\n  CHECK_CWISE1_IF(PacketTraits::HasASin, std::asin, internal::pasin);\n  CHECK_CWISE1_IF(PacketTraits::HasACos, std::acos, internal::pacos);\n\n  for (int i=0; i<size; ++i)\n  {\n    data1[i] = internal::random<Scalar>(-87,88);\n    data2[i] = internal::random<Scalar>(-87,88);\n  }\n  CHECK_CWISE1_IF(PacketTraits::HasExp, std::exp, internal::pexp);\n  for (int i=0; i<size; ++i)\n  {\n    data1[i] = internal::random<Scalar>(-1,1) * std::pow(Scalar(10), internal::random<Scalar>(-6,6));\n    data2[i] = internal::random<Scalar>(-1,1) * std::pow(Scalar(10), internal::random<Scalar>(-6,6));\n  }\n  data1[0] = 1e-20;\n  CHECK_CWISE1_IF(PacketTraits::HasTanh, std::tanh, internal::ptanh);\n  if(PacketTraits::HasExp && PacketSize>=2)\n  {\n    data1[0] = std::numeric_limits<Scalar>::quiet_NaN();\n    data1[1] = std::numeric_limits<Scalar>::epsilon();\n    test::packet_helper<PacketTraits::HasExp,Packet> h;\n    h.store(data2, internal::pexp(h.load(data1)));\n    VERIFY((numext::isnan)(data2[0]));\n    VERIFY_IS_EQUAL(std::exp(std::numeric_limits<Scalar>::epsilon()), data2[1]);\n\n    data1[0] = -std::numeric_limits<Scalar>::epsilon();\n    data1[1] = 0;\n    h.store(data2, internal::pexp(h.load(data1)));\n    VERIFY_IS_EQUAL(std::exp(-std::numeric_limits<Scalar>::epsilon()), data2[0]);\n    VERIFY_IS_EQUAL(std::exp(Scalar(0)), data2[1]);\n\n    data1[0] = (std::numeric_limits<Scalar>::min)();\n    data1[1] = -(std::numeric_limits<Scalar>::min)();\n    h.store(data2, internal::pexp(h.load(data1)));\n    VERIFY_IS_EQUAL(std::exp((std::numeric_limits<Scalar>::min)()), data2[0]);\n    VERIFY_IS_EQUAL(std::exp(-(std::numeric_limits<Scalar>::min)()), data2[1]);\n\n    data1[0] = std::numeric_limits<Scalar>::denorm_min();\n    data1[1] = -std::numeric_limits<Scalar>::denorm_min();\n    h.store(data2, internal::pexp(h.load(data1)));\n    VERIFY_IS_EQUAL(std::exp(std::numeric_limits<Scalar>::denorm_min()), data2[0]);\n    VERIFY_IS_EQUAL(std::exp(-std::numeric_limits<Scalar>::denorm_min()), data2[1]);\n  }\n\n  if (PacketTraits::HasTanh) {\n    // NOTE this test migh fail with GCC prior to 6.3, see MathFunctionsImpl.h for details.\n    data1[0] = std::numeric_limits<Scalar>::quiet_NaN();\n    test::packet_helper<internal::packet_traits<Scalar>::HasTanh,Packet> h;\n    h.store(data2, internal::ptanh(h.load(data1)));\n    VERIFY((numext::isnan)(data2[0]));\n  }\n\n#if EIGEN_HAS_C99_MATH && (__cplusplus > 199711L)\n  data1[0] = std::numeric_limits<Scalar>::infinity();\n  data1[1] = Scalar(-1);\n  CHECK_CWISE1_IF(PacketTraits::HasLog1p, std::log1p, internal::plog1p);\n  data1[0] = std::numeric_limits<Scalar>::infinity();\n  data1[1] = -std::numeric_limits<Scalar>::infinity();\n  CHECK_CWISE1_IF(PacketTraits::HasExpm1, std::expm1, internal::pexpm1);\n#endif\n\n  if(PacketSize>=2)\n  {\n    data1[0] = std::numeric_limits<Scalar>::quiet_NaN();\n    data1[1] = std::numeric_limits<Scalar>::epsilon();\n    if(PacketTraits::HasLog)\n    {\n      test::packet_helper<PacketTraits::HasLog,Packet> h;\n      h.store(data2, internal::plog(h.load(data1)));\n      VERIFY((numext::isnan)(data2[0]));\n      VERIFY_IS_EQUAL(std::log(std::numeric_limits<Scalar>::epsilon()), data2[1]);\n\n      data1[0] = -std::numeric_limits<Scalar>::epsilon();\n      data1[1] = 0;\n      h.store(data2, internal::plog(h.load(data1)));\n      VERIFY((numext::isnan)(data2[0]));\n      VERIFY_IS_EQUAL(std::log(Scalar(0)), data2[1]);\n\n      data1[0] = (std::numeric_limits<Scalar>::min)();\n      data1[1] = -(std::numeric_limits<Scalar>::min)();\n      h.store(data2, internal::plog(h.load(data1)));\n      VERIFY_IS_EQUAL(std::log((std::numeric_limits<Scalar>::min)()), data2[0]);\n      VERIFY((numext::isnan)(data2[1]));\n\n      data1[0] = std::numeric_limits<Scalar>::denorm_min();\n      data1[1] = -std::numeric_limits<Scalar>::denorm_min();\n      h.store(data2, internal::plog(h.load(data1)));\n      // VERIFY_IS_EQUAL(std::log(std::numeric_limits<Scalar>::denorm_min()), data2[0]);\n      VERIFY((numext::isnan)(data2[1]));\n\n      data1[0] = Scalar(-1.0f);\n      h.store(data2, internal::plog(h.load(data1)));\n      VERIFY((numext::isnan)(data2[0]));\n\n      data1[0] = std::numeric_limits<Scalar>::infinity();\n      h.store(data2, internal::plog(h.load(data1)));\n      VERIFY((numext::isinf)(data2[0]));\n    }\n    if(PacketTraits::HasLog1p) {\n      test::packet_helper<PacketTraits::HasLog1p,Packet> h;\n      data1[0] = Scalar(-2);\n      data1[1] = -std::numeric_limits<Scalar>::infinity();\n      h.store(data2, internal::plog1p(h.load(data1)));\n      VERIFY((numext::isnan)(data2[0]));\n      VERIFY((numext::isnan)(data2[1]));\n    }\n    if(PacketTraits::HasSqrt)\n    {\n      test::packet_helper<PacketTraits::HasSqrt,Packet> h;\n      data1[0] = Scalar(-1.0f);\n      data1[1] = -std::numeric_limits<Scalar>::denorm_min();\n      h.store(data2, internal::psqrt(h.load(data1)));\n      VERIFY((numext::isnan)(data2[0]));\n      VERIFY((numext::isnan)(data2[1]));\n    }\n    if(PacketTraits::HasCos)\n    {\n      test::packet_helper<PacketTraits::HasCos,Packet> h;\n      for(Scalar k = 1; k<Scalar(10000)/std::numeric_limits<Scalar>::epsilon(); k*=2)\n      {\n        for(int k1=0;k1<=1; ++k1)\n        {\n          data1[0] = (2*k+k1  )*Scalar(EIGEN_PI)/2 * internal::random<Scalar>(0.8,1.2);\n          data1[1] = (2*k+2+k1)*Scalar(EIGEN_PI)/2 * internal::random<Scalar>(0.8,1.2);\n          h.store(data2,            internal::pcos(h.load(data1)));\n          h.store(data2+PacketSize, internal::psin(h.load(data1)));\n          VERIFY(data2[0]<=Scalar(1.) && data2[0]>=Scalar(-1.));\n          VERIFY(data2[1]<=Scalar(1.) && data2[1]>=Scalar(-1.));\n          VERIFY(data2[PacketSize+0]<=Scalar(1.) && data2[PacketSize+0]>=Scalar(-1.));\n          VERIFY(data2[PacketSize+1]<=Scalar(1.) && data2[PacketSize+1]>=Scalar(-1.));\n\n          VERIFY_IS_APPROX(numext::abs2(data2[0])+numext::abs2(data2[PacketSize+0]), Scalar(1));\n          VERIFY_IS_APPROX(numext::abs2(data2[1])+numext::abs2(data2[PacketSize+1]), Scalar(1));\n        }\n      }\n\n      data1[0] =  std::numeric_limits<Scalar>::infinity();\n      data1[1] = -std::numeric_limits<Scalar>::infinity();\n      h.store(data2, internal::psin(h.load(data1)));\n      VERIFY((numext::isnan)(data2[0]));\n      VERIFY((numext::isnan)(data2[1]));\n\n      h.store(data2, internal::pcos(h.load(data1)));\n      VERIFY((numext::isnan)(data2[0]));\n      VERIFY((numext::isnan)(data2[1]));\n\n      data1[0] =  std::numeric_limits<Scalar>::quiet_NaN();\n      h.store(data2, internal::psin(h.load(data1)));\n      VERIFY((numext::isnan)(data2[0]));\n      h.store(data2, internal::pcos(h.load(data1)));\n      VERIFY((numext::isnan)(data2[0]));\n\n      data1[0] = -Scalar(0.);\n      h.store(data2, internal::psin(h.load(data1)));\n      VERIFY( internal::biteq(data2[0], data1[0]) );\n      h.store(data2, internal::pcos(h.load(data1)));\n      VERIFY_IS_EQUAL(data2[0], Scalar(1));\n    }\n  }\n}\n\ntemplate<typename Scalar,typename Packet> void packetmath_notcomplex()\n{\n  typedef internal::packet_traits<Scalar> PacketTraits;\n  const int PacketSize = internal::unpacket_traits<Packet>::size;\n\n  EIGEN_ALIGN_MAX Scalar data1[PacketSize*4];\n  EIGEN_ALIGN_MAX Scalar data2[PacketSize*4];\n  EIGEN_ALIGN_MAX Scalar ref[PacketSize*4];\n\n  Array<Scalar,Dynamic,1>::Map(data1, PacketSize*4).setRandom();\n\n  if (PacketTraits::HasCast) {\n    test_cast<Packet, float>();\n    test_cast<Packet, double>();\n    test_cast<Packet, int8_t>();\n    test_cast<Packet, uint8_t>();\n    test_cast<Packet, int16_t>();\n    test_cast<Packet, uint16_t>();\n    test_cast<Packet, int32_t>();\n    test_cast<Packet, uint32_t>();\n    test_cast<Packet, int64_t>();\n    test_cast<Packet, uint64_t>();\n  }\n\n  ref[0] = data1[0];\n  for (int i=0; i<PacketSize; ++i)\n    ref[0] = (std::min)(ref[0],data1[i]);\n  VERIFY(internal::isApprox(ref[0], internal::predux_min(internal::pload<Packet>(data1))) && \"internal::predux_min\");\n\n  VERIFY((!PacketTraits::Vectorizable) || PacketTraits::HasMin);\n  VERIFY((!PacketTraits::Vectorizable) || PacketTraits::HasMax);\n\n  CHECK_CWISE2_IF(PacketTraits::HasMin, (std::min), internal::pmin);\n  CHECK_CWISE2_IF(PacketTraits::HasMax, (std::max), internal::pmax);\n  CHECK_CWISE1(numext::abs, internal::pabs);\n  CHECK_CWISE2_IF(PacketTraits::HasAbsDiff, REF_ABS_DIFF, internal::pabsdiff);\n\n  ref[0] = data1[0];\n  for (int i=0; i<PacketSize; ++i)\n    ref[0] = (std::max)(ref[0],data1[i]);\n  VERIFY(internal::isApprox(ref[0], internal::predux_max(internal::pload<Packet>(data1))) && \"internal::predux_max\");\n\n  for (int i=0; i<PacketSize; ++i)\n    ref[i] = data1[0]+Scalar(i);\n  internal::pstore(data2, internal::plset<Packet>(data1[0]));\n  VERIFY(test::areApprox(ref, data2, PacketSize) && \"internal::plset\");\n\n  {\n    unsigned char* data1_bits = reinterpret_cast<unsigned char*>(data1);\n    // predux_all - not needed yet\n    // for (unsigned int i=0; i<PacketSize*sizeof(Scalar); ++i) data1_bits[i] = 0xff;\n    // VERIFY(internal::predux_all(internal::pload<Packet>(data1)) && \"internal::predux_all(1111)\");\n    // for(int k=0; k<PacketSize; ++k)\n    // {\n    //   for (unsigned int i=0; i<sizeof(Scalar); ++i) data1_bits[k*sizeof(Scalar)+i] = 0x0;\n    //   VERIFY( (!internal::predux_all(internal::pload<Packet>(data1))) && \"internal::predux_all(0101)\");\n    //   for (unsigned int i=0; i<sizeof(Scalar); ++i) data1_bits[k*sizeof(Scalar)+i] = 0xff;\n    // }\n\n    // predux_any\n    for (unsigned int i=0; i<PacketSize*sizeof(Scalar); ++i) data1_bits[i] = 0x0;\n    VERIFY( (!internal::predux_any(internal::pload<Packet>(data1))) && \"internal::predux_any(0000)\");\n    for(int k=0; k<PacketSize; ++k)\n    {\n      for (unsigned int i=0; i<sizeof(Scalar); ++i) data1_bits[k*sizeof(Scalar)+i] = 0xff;\n      VERIFY( internal::predux_any(internal::pload<Packet>(data1)) && \"internal::predux_any(0101)\");\n      for (unsigned int i=0; i<sizeof(Scalar); ++i) data1_bits[k*sizeof(Scalar)+i] = 0x00;\n    }\n  }\n}\n\ntemplate<typename Scalar,typename Packet,bool ConjLhs,bool ConjRhs> void test_conj_helper(Scalar* data1, Scalar* data2, Scalar* ref, Scalar* pval)\n{\n  const int PacketSize = internal::unpacket_traits<Packet>::size;\n\n  internal::conj_if<ConjLhs> cj0;\n  internal::conj_if<ConjRhs> cj1;\n  internal::conj_helper<Scalar,Scalar,ConjLhs,ConjRhs> cj;\n  internal::conj_helper<Packet,Packet,ConjLhs,ConjRhs> pcj;\n\n  for(int i=0;i<PacketSize;++i)\n  {\n    ref[i] = cj0(data1[i]) * cj1(data2[i]);\n    VERIFY(internal::isApprox(ref[i], cj.pmul(data1[i],data2[i])) && \"conj_helper pmul\");\n  }\n  internal::pstore(pval,pcj.pmul(internal::pload<Packet>(data1),internal::pload<Packet>(data2)));\n  VERIFY(test::areApprox(ref, pval, PacketSize) && \"conj_helper pmul\");\n\n  for(int i=0;i<PacketSize;++i)\n  {\n    Scalar tmp = ref[i];\n    ref[i] += cj0(data1[i]) * cj1(data2[i]);\n    VERIFY(internal::isApprox(ref[i], cj.pmadd(data1[i],data2[i],tmp)) && \"conj_helper pmadd\");\n  }\n  internal::pstore(pval,pcj.pmadd(internal::pload<Packet>(data1),internal::pload<Packet>(data2),internal::pload<Packet>(pval)));\n  VERIFY(test::areApprox(ref, pval, PacketSize) && \"conj_helper pmadd\");\n}\n\ntemplate<typename Scalar,typename Packet> void packetmath_complex()\n{\n  const int PacketSize = internal::unpacket_traits<Packet>::size;\n\n  const int size = PacketSize*4;\n  EIGEN_ALIGN_MAX Scalar data1[PacketSize*4];\n  EIGEN_ALIGN_MAX Scalar data2[PacketSize*4];\n  EIGEN_ALIGN_MAX Scalar ref[PacketSize*4];\n  EIGEN_ALIGN_MAX Scalar pval[PacketSize*4];\n\n  for (int i=0; i<size; ++i)\n  {\n    data1[i] = internal::random<Scalar>() * Scalar(1e2);\n    data2[i] = internal::random<Scalar>() * Scalar(1e2);\n  }\n\n  test_conj_helper<Scalar,Packet,false,false> (data1,data2,ref,pval);\n  test_conj_helper<Scalar,Packet,false,true>  (data1,data2,ref,pval);\n  test_conj_helper<Scalar,Packet,true,false>  (data1,data2,ref,pval);\n  test_conj_helper<Scalar,Packet,true,true>   (data1,data2,ref,pval);\n\n  {\n    for(int i=0;i<PacketSize;++i)\n      ref[i] = Scalar(std::imag(data1[i]),std::real(data1[i]));\n    internal::pstore(pval,internal::pcplxflip(internal::pload<Packet>(data1)));\n    VERIFY(test::areApprox(ref, pval, PacketSize) && \"pcplxflip\");\n  }\n}\n\ntemplate<typename Scalar,typename Packet> void packetmath_scatter_gather()\n{\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  const int PacketSize = internal::unpacket_traits<Packet>::size;\n  EIGEN_ALIGN_MAX Scalar data1[PacketSize];\n  RealScalar refvalue = 0;\n  for (int i=0; i<PacketSize; ++i) {\n    data1[i] = internal::random<Scalar>()/RealScalar(PacketSize);\n  }\n\n  int stride = internal::random<int>(1,20);\n\n  EIGEN_ALIGN_MAX Scalar buffer[PacketSize*20];\n  memset(buffer, 0, 20*PacketSize*sizeof(Scalar));\n  Packet packet = internal::pload<Packet>(data1);\n  internal::pscatter<Scalar, Packet>(buffer, packet, stride);\n\n  for (int i = 0; i < PacketSize*20; ++i) {\n    if ((i%stride) == 0 && i<stride*PacketSize) {\n      VERIFY(\n          test::isApproxAbs(buffer[i], data1[i/stride], refvalue) && \"pscatter\");\n    } else {\n      VERIFY(\n          test::isApproxAbs(buffer[i], Scalar(0), refvalue) && \"pscatter\");\n    }\n  }\n\n  for (int i=0; i<PacketSize*7; ++i) {\n    buffer[i] = internal::random<Scalar>()/RealScalar(PacketSize);\n  }\n  packet = internal::pgather<Scalar, Packet>(buffer, 7);\n  internal::pstore(data1, packet);\n  for (int i = 0; i < PacketSize; ++i) {\n    VERIFY(test::isApproxAbs(data1[i], buffer[i*7], refvalue) && \"pgather\");\n  }\n}\n\nnamespace Eigen {\nnamespace test {\n\ntemplate<typename Scalar,typename PacketType>\nstruct runall<Scalar,PacketType,false,false> { // i.e. float or double\n  static void run() {\n    packetmath<Scalar,PacketType>();\n    packetmath_scatter_gather<Scalar,PacketType>();\n    packetmath_notcomplex<Scalar,PacketType>();\n    packetmath_real<Scalar,PacketType>();\n  }\n};\n\ntemplate<typename Scalar,typename PacketType>\nstruct runall<Scalar,PacketType,false,true> { // i.e. int\n  static void run() {\n    packetmath<Scalar,PacketType>();\n    packetmath_scatter_gather<Scalar,PacketType>();\n    packetmath_notcomplex<Scalar,PacketType>();\n  }\n};\n\ntemplate<typename Scalar,typename PacketType>\nstruct runall<Scalar,PacketType,true,false> { // i.e. complex\n  static void run() {\n    packetmath<Scalar,PacketType>();\n    packetmath_scatter_gather<Scalar,PacketType>();\n    packetmath_complex<Scalar,PacketType>();\n  }\n};\n\n}\n}\n\n\nEIGEN_DECLARE_TEST(packetmath)\n{\n  g_first_pass = true;\n  for(int i = 0; i < g_repeat; i++) {\n\n    CALL_SUBTEST_1( test::runner<float>::run() );\n    CALL_SUBTEST_2( test::runner<double>::run() );\n    CALL_SUBTEST_3( test::runner<int8_t>::run() );\n    CALL_SUBTEST_4( test::runner<uint8_t>::run() );\n    CALL_SUBTEST_5( test::runner<int16_t>::run() );\n    CALL_SUBTEST_6( test::runner<uint16_t>::run() );\n    CALL_SUBTEST_7( test::runner<int32_t>::run() );\n    CALL_SUBTEST_8( test::runner<uint32_t>::run() );\n    CALL_SUBTEST_9( test::runner<int64_t>::run() );\n    CALL_SUBTEST_10( test::runner<uint64_t>::run() );\n    CALL_SUBTEST_11( test::runner<std::complex<float> >::run() );\n    CALL_SUBTEST_12( test::runner<std::complex<double> >::run() );\n    CALL_SUBTEST_13(( packetmath<half,internal::packet_traits<half>::type>() ));\n#ifdef EIGEN_PACKET_MATH_SSE_H\n    CALL_SUBTEST_14(( packetmath_boolean<bool,internal::packet_traits<bool>::type>() ));\n#endif\n    g_first_pass = false;\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/packetmath_test_shared.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <typeinfo>\n\n#if defined __GNUC__ && __GNUC__>=6\n  #pragma GCC diagnostic ignored \"-Wignored-attributes\"\n#endif\n// using namespace Eigen;\n\n#ifdef EIGEN_VECTORIZE_SSE\nconst bool g_vectorize_sse = true;\n#else\nconst bool g_vectorize_sse = false;\n#endif\n\nbool g_first_pass = true;\n\nnamespace Eigen {\nnamespace internal {\n\ntemplate<typename T> T negate(const T& x) { return -x; }\n\ntemplate<typename T>\nMap<const Array<unsigned char,sizeof(T),1> >\nbits(const T& x) {\n  return Map<const Array<unsigned char,sizeof(T),1> >(reinterpret_cast<const unsigned char *>(&x));\n}\n\n// The following implement bitwise operations on floating point types\ntemplate<typename T,typename Bits,typename Func>\nT apply_bit_op(Bits a, Bits b, Func f) {\n  Array<unsigned char,sizeof(T),1> data;\n  T res;\n  for(Index i = 0; i < data.size(); ++i)\n    data[i] = f(a[i], b[i]);\n  // Note: The reinterpret_cast works around GCC's class-memaccess warnings:\n  std::memcpy(reinterpret_cast<unsigned char*>(&res), data.data(), sizeof(T));\n  return res;\n}\n\n#define EIGEN_TEST_MAKE_BITWISE2(OP,FUNC,T)             \\\n  template<> T EIGEN_CAT(p,OP)(const T& a,const T& b) { \\\n    return apply_bit_op<T>(bits(a),bits(b),FUNC);     \\\n  }\n\n#define EIGEN_TEST_MAKE_BITWISE(OP,FUNC)                  \\\n  EIGEN_TEST_MAKE_BITWISE2(OP,FUNC,float)                 \\\n  EIGEN_TEST_MAKE_BITWISE2(OP,FUNC,double)                \\\n  EIGEN_TEST_MAKE_BITWISE2(OP,FUNC,half)                  \\\n  EIGEN_TEST_MAKE_BITWISE2(OP,FUNC,std::complex<float>)   \\\n  EIGEN_TEST_MAKE_BITWISE2(OP,FUNC,std::complex<double>)\n\nEIGEN_TEST_MAKE_BITWISE(xor,std::bit_xor<unsigned char>())\nEIGEN_TEST_MAKE_BITWISE(and,std::bit_and<unsigned char>())\nEIGEN_TEST_MAKE_BITWISE(or, std::bit_or<unsigned char>())\nstruct bit_andnot{\n  template<typename T> T\n  operator()(T a, T b) const { return a & (~b); }\n};\nEIGEN_TEST_MAKE_BITWISE(andnot, bit_andnot())\ntemplate<typename T>\nbool biteq(T a, T b) {\n  return (bits(a) == bits(b)).all();\n}\n\n}\n\nnamespace test {\n\n// NOTE: we disable inlining for this function to workaround a GCC issue when using -O3 and the i387 FPU.\ntemplate<typename Scalar> EIGEN_DONT_INLINE\nbool isApproxAbs(const Scalar& a, const Scalar& b, const typename NumTraits<Scalar>::Real& refvalue)\n{\n  return internal::isMuchSmallerThan(a-b, refvalue);\n}\n\ntemplate<typename Scalar> bool areApproxAbs(const Scalar* a, const Scalar* b, int size, const typename NumTraits<Scalar>::Real& refvalue)\n{\n  for (int i=0; i<size; ++i)\n  {\n    if (!isApproxAbs(a[i],b[i],refvalue))\n    {\n      std::cout << \"ref: [\" << Map<const Matrix<Scalar,1,Dynamic> >(a,size) << \"]\" << \" != vec: [\" << Map<const Matrix<Scalar,1,Dynamic> >(b,size) << \"]\\n\";\n      return false;\n    }\n  }\n  return true;\n}\n\ntemplate<typename Scalar> bool areApprox(const Scalar* a, const Scalar* b, int size)\n{\n  for (int i=0; i<size; ++i)\n  {\n    if (a[i]!=b[i] && !internal::isApprox(a[i],b[i]))\n    {\n      if((numext::isnan)(a[i]) && (numext::isnan)(b[i]))\n      {\n        continue;\n      }\n      std::cout << \"ref: [\" << Map<const Matrix<Scalar,1,Dynamic> >(a,size) << \"]\" << \" != vec: [\" << Map<const Matrix<Scalar,1,Dynamic> >(b,size) << \"]\\n\";\n      return false;\n    }\n  }\n  return true;\n}\n\n#define CHECK_CWISE1(REFOP, POP) { \\\n  for (int i=0; i<PacketSize; ++i) \\\n    ref[i] = REFOP(data1[i]); \\\n  internal::pstore(data2, POP(internal::pload<Packet>(data1))); \\\n  VERIFY(test::areApprox(ref, data2, PacketSize) && #POP); \\\n}\n\ntemplate<bool Cond,typename Packet>\nstruct packet_helper\n{\n  template<typename T>\n  inline Packet load(const T* from) const { return internal::pload<Packet>(from); }\n\n  template<typename T>\n  inline Packet loadu(const T* from) const { return internal::ploadu<Packet>(from); }\n\n  template<typename T>\n  inline Packet load(const T* from, unsigned long long umask) const { return internal::ploadu<Packet>(from, umask); }\n\n  template<typename T>\n  inline void store(T* to, const Packet& x) const { internal::pstore(to,x); }\n\n  template<typename T>\n  inline void store(T* to, const Packet& x, unsigned long long umask) const { internal::pstoreu(to, x, umask); }\n};\n\ntemplate<typename Packet>\nstruct packet_helper<false,Packet>\n{\n  template<typename T>\n  inline T load(const T* from) const { return *from; }\n\n  template<typename T>\n  inline T loadu(const T* from) const { return *from; }\n\n  template<typename T>\n  inline T load(const T* from, unsigned long long) const { return *from; }\n\n  template<typename T>\n  inline void store(T* to, const T& x) const { *to = x; }\n\n  template<typename T>\n  inline void store(T* to, const T& x, unsigned long long) const { *to = x; }\n};\n\n#define CHECK_CWISE1_IF(COND, REFOP, POP) if(COND) { \\\n  test::packet_helper<COND,Packet> h; \\\n  for (int i=0; i<PacketSize; ++i) \\\n    ref[i] = REFOP(data1[i]); \\\n  h.store(data2, POP(h.load(data1))); \\\n  VERIFY(test::areApprox(ref, data2, PacketSize) && #POP); \\\n}\n\n#define CHECK_CWISE2_IF(COND, REFOP, POP) if(COND) { \\\n  test::packet_helper<COND,Packet> h; \\\n  for (int i=0; i<PacketSize; ++i) \\\n    ref[i] = REFOP(data1[i], data1[i+PacketSize]); \\\n  h.store(data2, POP(h.load(data1),h.load(data1+PacketSize))); \\\n  VERIFY(test::areApprox(ref, data2, PacketSize) && #POP); \\\n}\n\n#define CHECK_CWISE3_IF(COND, REFOP, POP) if (COND) {                      \\\n  test::packet_helper<COND, Packet> h;                                     \\\n  for (int i = 0; i < PacketSize; ++i)                                     \\\n    ref[i] =                                                               \\\n        REFOP(data1[i], data1[i + PacketSize], data1[i + 2 * PacketSize]); \\\n  h.store(data2, POP(h.load(data1), h.load(data1 + PacketSize),            \\\n                     h.load(data1 + 2 * PacketSize)));                     \\\n  VERIFY(test::areApprox(ref, data2, PacketSize) && #POP);                 \\\n}\n\n// Specialize the runall struct in your test file by defining run().\ntemplate<\n  typename Scalar,\n  typename PacketType,\n  bool IsComplex = NumTraits<Scalar>::IsComplex,\n  bool IsInteger = NumTraits<Scalar>::IsInteger>\nstruct runall;\n\ntemplate<\n  typename Scalar,\n  typename PacketType = typename internal::packet_traits<Scalar>::type,\n  bool Vectorized = internal::packet_traits<Scalar>::Vectorizable,\n  bool HasHalf = !internal::is_same<typename internal::unpacket_traits<PacketType>::half,PacketType>::value >\nstruct runner;\n\ntemplate<typename Scalar,typename PacketType>\nstruct runner<Scalar,PacketType,true,true>\n{\n  static void run() {\n    runall<Scalar,PacketType>::run();\n    runner<Scalar,typename internal::unpacket_traits<PacketType>::half>::run();\n  }\n};\n\ntemplate<typename Scalar,typename PacketType>\nstruct runner<Scalar,PacketType,true,false>\n{\n  static void run() {\n    runall<Scalar,PacketType>::run();\n    runall<Scalar,Scalar>::run();\n  }\n};\n\ntemplate<typename Scalar,typename PacketType>\nstruct runner<Scalar,PacketType,false,false>\n{\n  static void run() {\n    runall<Scalar,PacketType>::run();\n  }\n};\n\n}\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/pardiso_support.cpp",
    "content": "/* \n   Intel Copyright (C) ....\n*/\n\n#include \"sparse_solver.h\"\n#include <Eigen/PardisoSupport>\n\ntemplate<typename T> void test_pardiso_T()\n{\n  PardisoLLT < SparseMatrix<T, RowMajor>, Lower> pardiso_llt_lower;\n  PardisoLLT < SparseMatrix<T, RowMajor>, Upper> pardiso_llt_upper;\n  PardisoLDLT < SparseMatrix<T, RowMajor>, Lower> pardiso_ldlt_lower;\n  PardisoLDLT < SparseMatrix<T, RowMajor>, Upper> pardiso_ldlt_upper;\n  PardisoLU  < SparseMatrix<T, RowMajor> > pardiso_lu;\n\n  check_sparse_spd_solving(pardiso_llt_lower);\n  check_sparse_spd_solving(pardiso_llt_upper);\n  check_sparse_spd_solving(pardiso_ldlt_lower);\n  check_sparse_spd_solving(pardiso_ldlt_upper);\n  check_sparse_square_solving(pardiso_lu);\n}\n\nEIGEN_DECLARE_TEST(pardiso_support)\n{\n  CALL_SUBTEST_1(test_pardiso_T<float>());\n  CALL_SUBTEST_2(test_pardiso_T<double>());\n  CALL_SUBTEST_3(test_pardiso_T< std::complex<float> >());\n  CALL_SUBTEST_4(test_pardiso_T< std::complex<double> >());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/pastix_support.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2012 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2012 Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_NO_DEBUG_SMALL_PRODUCT_BLOCKS\n#include \"sparse_solver.h\"\n#include <Eigen/PaStiXSupport>\n#include <unsupported/Eigen/SparseExtra>\n\n\ntemplate<typename T> void test_pastix_T()\n{\n  PastixLLT< SparseMatrix<T, ColMajor>, Eigen::Lower > pastix_llt_lower;\n  PastixLDLT< SparseMatrix<T, ColMajor>, Eigen::Lower > pastix_ldlt_lower;\n  PastixLLT< SparseMatrix<T, ColMajor>, Eigen::Upper > pastix_llt_upper;\n  PastixLDLT< SparseMatrix<T, ColMajor>, Eigen::Upper > pastix_ldlt_upper;\n  PastixLU< SparseMatrix<T, ColMajor> > pastix_lu;\n\n  check_sparse_spd_solving(pastix_llt_lower);\n  check_sparse_spd_solving(pastix_ldlt_lower);\n  check_sparse_spd_solving(pastix_llt_upper);\n  check_sparse_spd_solving(pastix_ldlt_upper);\n  check_sparse_square_solving(pastix_lu);\n\n  // Some compilation check:\n  pastix_llt_lower.iparm();\n  pastix_llt_lower.dparm();\n  pastix_ldlt_lower.iparm();\n  pastix_ldlt_lower.dparm();\n  pastix_lu.iparm();\n  pastix_lu.dparm();\n}\n\n// There is no support for selfadjoint matrices with PaStiX. \n// Complex symmetric matrices should pass though\ntemplate<typename T> void test_pastix_T_LU()\n{\n  PastixLU< SparseMatrix<T, ColMajor> > pastix_lu;\n  check_sparse_square_solving(pastix_lu);\n}\n\nEIGEN_DECLARE_TEST(pastix_support)\n{\n  CALL_SUBTEST_1(test_pastix_T<float>());\n  CALL_SUBTEST_2(test_pastix_T<double>());\n  CALL_SUBTEST_3( (test_pastix_T_LU<std::complex<float> >()) );\n  CALL_SUBTEST_4(test_pastix_T_LU<std::complex<double> >());\n} \n"
  },
  {
    "path": "3rdparty/eigen3/test/permutationmatrices.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define TEST_ENABLE_TEMPORARY_TRACKING\n  \n#include \"main.h\"\n\nusing namespace std;\ntemplate<typename MatrixType> void permutationmatrices(const MatrixType& m)\n{\n  typedef typename MatrixType::Scalar Scalar;\n  enum { Rows = MatrixType::RowsAtCompileTime, Cols = MatrixType::ColsAtCompileTime,\n         Options = MatrixType::Options };\n  typedef PermutationMatrix<Rows> LeftPermutationType;\n  typedef Transpositions<Rows> LeftTranspositionsType;\n  typedef Matrix<int, Rows, 1> LeftPermutationVectorType;\n  typedef Map<LeftPermutationType> MapLeftPerm;\n  typedef PermutationMatrix<Cols> RightPermutationType;\n  typedef Transpositions<Cols> RightTranspositionsType;\n  typedef Matrix<int, Cols, 1> RightPermutationVectorType;\n  typedef Map<RightPermutationType> MapRightPerm;\n\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  MatrixType m_original = MatrixType::Random(rows,cols);\n  LeftPermutationVectorType lv;\n  randomPermutationVector(lv, rows);\n  LeftPermutationType lp(lv);\n  RightPermutationVectorType rv;\n  randomPermutationVector(rv, cols);\n  RightPermutationType rp(rv);\n  LeftTranspositionsType lt(lv);\n  RightTranspositionsType rt(rv);\n  MatrixType m_permuted = MatrixType::Random(rows,cols);\n  \n  VERIFY_EVALUATION_COUNT(m_permuted = lp * m_original * rp, 1); // 1 temp for sub expression \"lp * m_original\"\n\n  for (int i=0; i<rows; i++)\n    for (int j=0; j<cols; j++)\n        VERIFY_IS_APPROX(m_permuted(lv(i),j), m_original(i,rv(j)));\n\n  Matrix<Scalar,Rows,Rows> lm(lp);\n  Matrix<Scalar,Cols,Cols> rm(rp);\n\n  VERIFY_IS_APPROX(m_permuted, lm*m_original*rm);\n  \n  m_permuted = m_original;\n  VERIFY_EVALUATION_COUNT(m_permuted = lp * m_permuted * rp, 1);\n  VERIFY_IS_APPROX(m_permuted, lm*m_original*rm);\n\n  LeftPermutationType lpi;\n  lpi = lp.inverse();\n  VERIFY_IS_APPROX(lpi*m_permuted,lp.inverse()*m_permuted);\n\n  VERIFY_IS_APPROX(lp.inverse()*m_permuted*rp.inverse(), m_original);\n  VERIFY_IS_APPROX(lv.asPermutation().inverse()*m_permuted*rv.asPermutation().inverse(), m_original);\n  VERIFY_IS_APPROX(MapLeftPerm(lv.data(),lv.size()).inverse()*m_permuted*MapRightPerm(rv.data(),rv.size()).inverse(), m_original);\n  \n  VERIFY((lp*lp.inverse()).toDenseMatrix().isIdentity());\n  VERIFY((lv.asPermutation()*lv.asPermutation().inverse()).toDenseMatrix().isIdentity());\n  VERIFY((MapLeftPerm(lv.data(),lv.size())*MapLeftPerm(lv.data(),lv.size()).inverse()).toDenseMatrix().isIdentity());\n\n  LeftPermutationVectorType lv2;\n  randomPermutationVector(lv2, rows);\n  LeftPermutationType lp2(lv2);\n  Matrix<Scalar,Rows,Rows> lm2(lp2);\n  VERIFY_IS_APPROX((lp*lp2).toDenseMatrix().template cast<Scalar>(), lm*lm2);\n  VERIFY_IS_APPROX((lv.asPermutation()*lv2.asPermutation()).toDenseMatrix().template cast<Scalar>(), lm*lm2);\n  VERIFY_IS_APPROX((MapLeftPerm(lv.data(),lv.size())*MapLeftPerm(lv2.data(),lv2.size())).toDenseMatrix().template cast<Scalar>(), lm*lm2);\n\n  LeftPermutationType identityp;\n  identityp.setIdentity(rows);\n  VERIFY_IS_APPROX(m_original, identityp*m_original);\n  \n  // check inplace permutations\n  m_permuted = m_original;\n  VERIFY_EVALUATION_COUNT(m_permuted.noalias()= lp.inverse() * m_permuted, 1); // 1 temp to allocate the mask\n  VERIFY_IS_APPROX(m_permuted, lp.inverse()*m_original);\n  \n  m_permuted = m_original;\n  VERIFY_EVALUATION_COUNT(m_permuted.noalias() = m_permuted * rp.inverse(), 1); // 1 temp to allocate the mask\n  VERIFY_IS_APPROX(m_permuted, m_original*rp.inverse());\n  \n  m_permuted = m_original;\n  VERIFY_EVALUATION_COUNT(m_permuted.noalias() = lp * m_permuted, 1); // 1 temp to allocate the mask\n  VERIFY_IS_APPROX(m_permuted, lp*m_original);\n  \n  m_permuted = m_original;\n  VERIFY_EVALUATION_COUNT(m_permuted.noalias() = m_permuted * rp, 1); // 1 temp to allocate the mask\n  VERIFY_IS_APPROX(m_permuted, m_original*rp);\n\n  if(rows>1 && cols>1)\n  {\n    lp2 = lp;\n    Index i = internal::random<Index>(0, rows-1);\n    Index j;\n    do j = internal::random<Index>(0, rows-1); while(j==i);\n    lp2.applyTranspositionOnTheLeft(i, j);\n    lm = lp;\n    lm.row(i).swap(lm.row(j));\n    VERIFY_IS_APPROX(lm, lp2.toDenseMatrix().template cast<Scalar>());\n\n    RightPermutationType rp2 = rp;\n    i = internal::random<Index>(0, cols-1);\n    do j = internal::random<Index>(0, cols-1); while(j==i);\n    rp2.applyTranspositionOnTheRight(i, j);\n    rm = rp;\n    rm.col(i).swap(rm.col(j));\n    VERIFY_IS_APPROX(rm, rp2.toDenseMatrix().template cast<Scalar>());\n  }\n\n  {\n    // simple compilation check\n    Matrix<Scalar, Cols, Cols> A = rp;\n    Matrix<Scalar, Cols, Cols> B = rp.transpose();\n    VERIFY_IS_APPROX(A, B.transpose());\n  }\n\n  m_permuted = m_original;\n  lp = lt;\n  rp = rt;\n  VERIFY_EVALUATION_COUNT(m_permuted = lt * m_permuted * rt, 1);\n  VERIFY_IS_APPROX(m_permuted, lp*m_original*rp.transpose());\n  \n  VERIFY_IS_APPROX(lt.inverse()*m_permuted*rt.inverse(), m_original);\n\n  // Check inplace transpositions\n  m_permuted = m_original;\n  VERIFY_IS_APPROX(m_permuted = lt * m_permuted, lp * m_original);\n  m_permuted = m_original;\n  VERIFY_IS_APPROX(m_permuted = lt.inverse() * m_permuted, lp.inverse() * m_original);\n  m_permuted = m_original;\n  VERIFY_IS_APPROX(m_permuted = m_permuted * rt, m_original * rt);\n  m_permuted = m_original;\n  VERIFY_IS_APPROX(m_permuted = m_permuted * rt.inverse(), m_original * rt.inverse());\n}\n\ntemplate<typename T>\nvoid bug890()\n{\n  typedef Matrix<T, Dynamic, Dynamic> MatrixType;\n  typedef Matrix<T, Dynamic, 1> VectorType;\n  typedef Stride<Dynamic,Dynamic> S;\n  typedef Map<MatrixType, Aligned, S> MapType;\n  typedef PermutationMatrix<Dynamic> Perm;\n  \n  VectorType v1(2), v2(2), op(4), rhs(2);\n  v1 << 666,667;\n  op << 1,0,0,1;\n  rhs << 42,42;\n  \n  Perm P(2);\n  P.indices() << 1, 0;\n\n  MapType(v1.data(),2,1,S(1,1)) = P * MapType(rhs.data(),2,1,S(1,1));\n  VERIFY_IS_APPROX(v1, (P * rhs).eval());\n\n  MapType(v1.data(),2,1,S(1,1)) = P.inverse() * MapType(rhs.data(),2,1,S(1,1));\n  VERIFY_IS_APPROX(v1, (P.inverse() * rhs).eval());\n}\n\nEIGEN_DECLARE_TEST(permutationmatrices)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( permutationmatrices(Matrix<float, 1, 1>()) );\n    CALL_SUBTEST_2( permutationmatrices(Matrix3f()) );\n    CALL_SUBTEST_3( permutationmatrices(Matrix<double,3,3,RowMajor>()) );\n    CALL_SUBTEST_4( permutationmatrices(Matrix4d()) );\n    CALL_SUBTEST_5( permutationmatrices(Matrix<double,40,60>()) );\n    CALL_SUBTEST_6( permutationmatrices(Matrix<double,Dynamic,Dynamic,RowMajor>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_7( permutationmatrices(MatrixXcf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n  }\n  CALL_SUBTEST_5( bug890<double>() );\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/prec_inverse_4x4.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <Eigen/LU>\n#include <algorithm>\n\ntemplate<typename MatrixType> void inverse_permutation_4x4()\n{\n  typedef typename MatrixType::Scalar Scalar;\n  Vector4i indices(0,1,2,3);\n  for(int i = 0; i < 24; ++i)\n  {\n    MatrixType m = PermutationMatrix<4>(indices);\n    MatrixType inv = m.inverse();\n    double error = double( (m*inv-MatrixType::Identity()).norm() / NumTraits<Scalar>::epsilon() );\n    EIGEN_DEBUG_VAR(error)\n    VERIFY(error == 0.0);\n    std::next_permutation(indices.data(),indices.data()+4);\n  }\n}\n\ntemplate<typename MatrixType> void inverse_general_4x4(int repeat)\n{\n  using std::abs;\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename MatrixType::RealScalar RealScalar;\n  double error_sum = 0., error_max = 0.;\n  for(int i = 0; i < repeat; ++i)\n  {\n    MatrixType m;\n    RealScalar absdet;\n    do {\n      m = MatrixType::Random();\n      absdet = abs(m.determinant());\n    } while(absdet < NumTraits<Scalar>::epsilon());\n    MatrixType inv = m.inverse();\n    double error = double( (m*inv-MatrixType::Identity()).norm() * absdet / NumTraits<Scalar>::epsilon() );\n    error_sum += error;\n    error_max = (std::max)(error_max, error);\n  }\n  std::cerr << \"inverse_general_4x4, Scalar = \" << type_name<Scalar>() << std::endl;\n  double error_avg = error_sum / repeat;\n  EIGEN_DEBUG_VAR(error_avg);\n  EIGEN_DEBUG_VAR(error_max);\n   // FIXME that 1.25 used to be a 1.0 until the NumTraits changes on 28 April 2010, what's going wrong??\n   // FIXME that 1.25 used to be 1.2 until we tested gcc 4.1 on 30 June 2010 and got 1.21.\n  VERIFY(error_avg < (NumTraits<Scalar>::IsComplex ? 8.0 : 1.25));\n  VERIFY(error_max < (NumTraits<Scalar>::IsComplex ? 64.0 : 20.0));\n\n  {\n    int s = 5;//internal::random<int>(4,10);\n    int i = 0;//internal::random<int>(0,s-4);\n    int j = 0;//internal::random<int>(0,s-4);\n    Matrix<Scalar,5,5> mat(s,s);\n    mat.setRandom();\n    MatrixType submat = mat.template block<4,4>(i,j);\n    MatrixType mat_inv = mat.template block<4,4>(i,j).inverse();\n    VERIFY_IS_APPROX(mat_inv, submat.inverse());\n    mat.template block<4,4>(i,j) = submat.inverse();\n    VERIFY_IS_APPROX(mat_inv, (mat.template block<4,4>(i,j)));\n  }\n}\n\nEIGEN_DECLARE_TEST(prec_inverse_4x4)\n{\n  CALL_SUBTEST_1((inverse_permutation_4x4<Matrix4f>()));\n  CALL_SUBTEST_1(( inverse_general_4x4<Matrix4f>(200000 * g_repeat) ));\n  CALL_SUBTEST_1(( inverse_general_4x4<Matrix<float,4,4,RowMajor> >(200000 * g_repeat) ));\n\n  CALL_SUBTEST_2((inverse_permutation_4x4<Matrix<double,4,4,RowMajor> >()));\n  CALL_SUBTEST_2(( inverse_general_4x4<Matrix<double,4,4,ColMajor> >(200000 * g_repeat) ));\n  CALL_SUBTEST_2(( inverse_general_4x4<Matrix<double,4,4,RowMajor> >(200000 * g_repeat) ));\n\n  CALL_SUBTEST_3((inverse_permutation_4x4<Matrix4cf>()));\n  CALL_SUBTEST_3((inverse_general_4x4<Matrix4cf>(50000 * g_repeat)));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/product.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <Eigen/QR>\n\ntemplate<typename Derived1, typename Derived2>\nbool areNotApprox(const MatrixBase<Derived1>& m1, const MatrixBase<Derived2>& m2, typename Derived1::RealScalar epsilon = NumTraits<typename Derived1::RealScalar>::dummy_precision())\n{\n  return !((m1-m2).cwiseAbs2().maxCoeff() < epsilon * epsilon\n                          * (std::max)(m1.cwiseAbs2().maxCoeff(), m2.cwiseAbs2().maxCoeff()));\n}\n\ntemplate<typename MatrixType> void product(const MatrixType& m)\n{\n  /* this test covers the following files:\n     Identity.h Product.h\n  */\n  typedef typename MatrixType::Scalar Scalar;\n  typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> RowVectorType;\n  typedef Matrix<Scalar, MatrixType::ColsAtCompileTime, 1> ColVectorType;\n  typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime> RowSquareMatrixType;\n  typedef Matrix<Scalar, MatrixType::ColsAtCompileTime, MatrixType::ColsAtCompileTime> ColSquareMatrixType;\n  typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::ColsAtCompileTime,\n                         MatrixType::Flags&RowMajorBit?ColMajor:RowMajor> OtherMajorMatrixType;\n\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  // this test relies a lot on Random.h, and there's not much more that we can do\n  // to test it, hence I consider that we will have tested Random.h\n  MatrixType m1 = MatrixType::Random(rows, cols),\n             m2 = MatrixType::Random(rows, cols),\n             m3(rows, cols);\n  RowSquareMatrixType\n             identity = RowSquareMatrixType::Identity(rows, rows),\n             square = RowSquareMatrixType::Random(rows, rows),\n             res = RowSquareMatrixType::Random(rows, rows);\n  ColSquareMatrixType\n             square2 = ColSquareMatrixType::Random(cols, cols),\n             res2 = ColSquareMatrixType::Random(cols, cols);\n  RowVectorType v1 = RowVectorType::Random(rows);\n  ColVectorType vc2 = ColVectorType::Random(cols), vcres(cols);\n  OtherMajorMatrixType tm1 = m1;\n\n  Scalar s1 = internal::random<Scalar>();\n\n  Index r  = internal::random<Index>(0, rows-1),\n        c  = internal::random<Index>(0, cols-1),\n        c2 = internal::random<Index>(0, cols-1);\n\n  // begin testing Product.h: only associativity for now\n  // (we use Transpose.h but this doesn't count as a test for it)\n  VERIFY_IS_APPROX((m1*m1.transpose())*m2,  m1*(m1.transpose()*m2));\n  m3 = m1;\n  m3 *= m1.transpose() * m2;\n  VERIFY_IS_APPROX(m3,                      m1 * (m1.transpose()*m2));\n  VERIFY_IS_APPROX(m3,                      m1 * (m1.transpose()*m2));\n\n  // continue testing Product.h: distributivity\n  VERIFY_IS_APPROX(square*(m1 + m2),        square*m1+square*m2);\n  VERIFY_IS_APPROX(square*(m1 - m2),        square*m1-square*m2);\n\n  // continue testing Product.h: compatibility with ScalarMultiple.h\n  VERIFY_IS_APPROX(s1*(square*m1),          (s1*square)*m1);\n  VERIFY_IS_APPROX(s1*(square*m1),          square*(m1*s1));\n\n  // test Product.h together with Identity.h\n  VERIFY_IS_APPROX(v1,                      identity*v1);\n  VERIFY_IS_APPROX(v1.transpose(),          v1.transpose() * identity);\n  // again, test operator() to check const-qualification\n  VERIFY_IS_APPROX(MatrixType::Identity(rows, cols)(r,c), static_cast<Scalar>(r==c));\n\n  if (rows!=cols)\n     VERIFY_RAISES_ASSERT(m3 = m1*m1);\n\n  // test the previous tests were not screwed up because operator* returns 0\n  // (we use the more accurate default epsilon)\n  if (!NumTraits<Scalar>::IsInteger && (std::min)(rows,cols)>1)\n  {\n    VERIFY(areNotApprox(m1.transpose()*m2,m2.transpose()*m1));\n  }\n\n  // test optimized operator+= path\n  res = square;\n  res.noalias() += m1 * m2.transpose();\n  VERIFY_IS_APPROX(res, square + m1 * m2.transpose());\n  if (!NumTraits<Scalar>::IsInteger && (std::min)(rows,cols)>1)\n  {\n    VERIFY(areNotApprox(res,square + m2 * m1.transpose()));\n  }\n  vcres = vc2;\n  vcres.noalias() += m1.transpose() * v1;\n  VERIFY_IS_APPROX(vcres, vc2 + m1.transpose() * v1);\n\n  // test optimized operator-= path\n  res = square;\n  res.noalias() -= m1 * m2.transpose();\n  VERIFY_IS_APPROX(res, square - (m1 * m2.transpose()));\n  if (!NumTraits<Scalar>::IsInteger && (std::min)(rows,cols)>1)\n  {\n    VERIFY(areNotApprox(res,square - m2 * m1.transpose()));\n  }\n  vcres = vc2;\n  vcres.noalias() -= m1.transpose() * v1;\n  VERIFY_IS_APPROX(vcres, vc2 - m1.transpose() * v1);\n\n  // test scaled products\n  res = square;\n  res.noalias() = s1 * m1 * m2.transpose();\n  VERIFY_IS_APPROX(res, ((s1*m1).eval() * m2.transpose()));\n  res = square;\n  res.noalias() += s1 * m1 * m2.transpose();\n  VERIFY_IS_APPROX(res, square + ((s1*m1).eval() * m2.transpose()));\n  res = square;\n  res.noalias() -= s1 * m1 * m2.transpose();\n  VERIFY_IS_APPROX(res, square - ((s1*m1).eval() * m2.transpose()));\n\n  // test d ?= a+b*c rules\n  res.noalias() = square + m1 * m2.transpose();\n  VERIFY_IS_APPROX(res, square + m1 * m2.transpose());\n  res.noalias() += square + m1 * m2.transpose();\n  VERIFY_IS_APPROX(res, 2*(square + m1 * m2.transpose()));\n  res.noalias() -= square + m1 * m2.transpose();\n  VERIFY_IS_APPROX(res, square + m1 * m2.transpose());\n\n  // test d ?= a-b*c rules\n  res.noalias() = square - m1 * m2.transpose();\n  VERIFY_IS_APPROX(res, square - m1 * m2.transpose());\n  res.noalias() += square - m1 * m2.transpose();\n  VERIFY_IS_APPROX(res, 2*(square - m1 * m2.transpose()));\n  res.noalias() -= square - m1 * m2.transpose();\n  VERIFY_IS_APPROX(res, square - m1 * m2.transpose());\n\n\n  tm1 = m1;\n  VERIFY_IS_APPROX(tm1.transpose() * v1, m1.transpose() * v1);\n  VERIFY_IS_APPROX(v1.transpose() * tm1, v1.transpose() * m1);\n\n  // test submatrix and matrix/vector product\n  for (int i=0; i<rows; ++i)\n    res.row(i) = m1.row(i) * m2.transpose();\n  VERIFY_IS_APPROX(res, m1 * m2.transpose());\n  // the other way round:\n  for (int i=0; i<rows; ++i)\n    res.col(i) = m1 * m2.transpose().col(i);\n  VERIFY_IS_APPROX(res, m1 * m2.transpose());\n\n  res2 = square2;\n  res2.noalias() += m1.transpose() * m2;\n  VERIFY_IS_APPROX(res2, square2 + m1.transpose() * m2);\n  if (!NumTraits<Scalar>::IsInteger && (std::min)(rows,cols)>1)\n  {\n    VERIFY(areNotApprox(res2,square2 + m2.transpose() * m1));\n  }\n\n  VERIFY_IS_APPROX(res.col(r).noalias() = square.adjoint() * square.col(r), (square.adjoint() * square.col(r)).eval());\n  VERIFY_IS_APPROX(res.col(r).noalias() = square * square.col(r), (square * square.col(r)).eval());\n\n  // vector at runtime (see bug 1166)\n  {\n    RowSquareMatrixType ref(square);\n    ColSquareMatrixType ref2(square2);\n    ref = res = square;\n    VERIFY_IS_APPROX(res.block(0,0,1,rows).noalias() = m1.col(0).transpose() * square.transpose(),            (ref.row(0) = m1.col(0).transpose() * square.transpose()));\n    VERIFY_IS_APPROX(res.block(0,0,1,rows).noalias() = m1.block(0,0,rows,1).transpose() * square.transpose(), (ref.row(0) = m1.col(0).transpose() * square.transpose()));\n    VERIFY_IS_APPROX(res.block(0,0,1,rows).noalias() = m1.col(0).transpose() * square,                        (ref.row(0) = m1.col(0).transpose() * square));\n    VERIFY_IS_APPROX(res.block(0,0,1,rows).noalias() = m1.block(0,0,rows,1).transpose() * square,             (ref.row(0) = m1.col(0).transpose() * square));\n    ref2 = res2 = square2;\n    VERIFY_IS_APPROX(res2.block(0,0,1,cols).noalias() = m1.row(0) * square2.transpose(),                      (ref2.row(0) = m1.row(0) * square2.transpose()));\n    VERIFY_IS_APPROX(res2.block(0,0,1,cols).noalias() = m1.block(0,0,1,cols) * square2.transpose(),           (ref2.row(0) = m1.row(0) * square2.transpose()));\n    VERIFY_IS_APPROX(res2.block(0,0,1,cols).noalias() = m1.row(0) * square2,                                  (ref2.row(0) = m1.row(0) * square2));\n    VERIFY_IS_APPROX(res2.block(0,0,1,cols).noalias() = m1.block(0,0,1,cols) * square2,                       (ref2.row(0) = m1.row(0) * square2));\n  }\n\n  // vector.block() (see bug 1283)\n  {\n    RowVectorType w1(rows);\n    VERIFY_IS_APPROX(square * v1.block(0,0,rows,1), square * v1);\n    VERIFY_IS_APPROX(w1.noalias() = square * v1.block(0,0,rows,1), square * v1);\n    VERIFY_IS_APPROX(w1.block(0,0,rows,1).noalias() = square * v1.block(0,0,rows,1), square * v1);\n\n    Matrix<Scalar,1,MatrixType::ColsAtCompileTime> w2(cols);\n    VERIFY_IS_APPROX(vc2.block(0,0,cols,1).transpose() * square2, vc2.transpose() * square2);\n    VERIFY_IS_APPROX(w2.noalias() = vc2.block(0,0,cols,1).transpose() * square2, vc2.transpose() * square2);\n    VERIFY_IS_APPROX(w2.block(0,0,1,cols).noalias() = vc2.block(0,0,cols,1).transpose() * square2, vc2.transpose() * square2);\n\n    vc2 = square2.block(0,0,1,cols).transpose();\n    VERIFY_IS_APPROX(square2.block(0,0,1,cols) * square2, vc2.transpose() * square2);\n    VERIFY_IS_APPROX(w2.noalias() = square2.block(0,0,1,cols) * square2, vc2.transpose() * square2);\n    VERIFY_IS_APPROX(w2.block(0,0,1,cols).noalias() = square2.block(0,0,1,cols) * square2, vc2.transpose() * square2);\n\n    vc2 = square2.block(0,0,cols,1);\n    VERIFY_IS_APPROX(square2.block(0,0,cols,1).transpose() * square2, vc2.transpose() * square2);\n    VERIFY_IS_APPROX(w2.noalias() = square2.block(0,0,cols,1).transpose() * square2, vc2.transpose() * square2);\n    VERIFY_IS_APPROX(w2.block(0,0,1,cols).noalias() = square2.block(0,0,cols,1).transpose() * square2, vc2.transpose() * square2);\n  }\n\n  // inner product\n  {\n    Scalar x = square2.row(c) * square2.col(c2);\n    VERIFY_IS_APPROX(x, square2.row(c).transpose().cwiseProduct(square2.col(c2)).sum());\n  }\n\n  // outer product\n  {\n    VERIFY_IS_APPROX(m1.col(c) * m1.row(r), m1.block(0,c,rows,1) * m1.block(r,0,1,cols));\n    VERIFY_IS_APPROX(m1.row(r).transpose() * m1.col(c).transpose(), m1.block(r,0,1,cols).transpose() * m1.block(0,c,rows,1).transpose());\n    VERIFY_IS_APPROX(m1.block(0,c,rows,1) * m1.row(r), m1.block(0,c,rows,1) * m1.block(r,0,1,cols));\n    VERIFY_IS_APPROX(m1.col(c) * m1.block(r,0,1,cols), m1.block(0,c,rows,1) * m1.block(r,0,1,cols));\n    VERIFY_IS_APPROX(m1.leftCols(1) * m1.row(r), m1.block(0,0,rows,1) * m1.block(r,0,1,cols));\n    VERIFY_IS_APPROX(m1.col(c) * m1.topRows(1), m1.block(0,c,rows,1) * m1.block(0,0,1,cols));\n  }\n\n  // Aliasing\n  {\n    ColVectorType x(cols); x.setRandom();\n    ColVectorType z(x);\n    ColVectorType y(cols); y.setZero();\n    ColSquareMatrixType A(cols,cols); A.setRandom();\n    // CwiseBinaryOp\n    VERIFY_IS_APPROX(x = y + A*x, A*z);\n    x = z;\n    VERIFY_IS_APPROX(x = y - A*x, A*(-z));\n    x = z;\n    // CwiseUnaryOp\n    VERIFY_IS_APPROX(x = Scalar(1.)*(A*x), A*z);\n  }\n\n  // regression for blas_trais\n  {\n    VERIFY_IS_APPROX(square * (square*square).transpose(), square * square.transpose() * square.transpose());\n    VERIFY_IS_APPROX(square * (-(square*square)), -square * square * square);\n    VERIFY_IS_APPROX(square * (s1*(square*square)), s1 * square * square * square);\n    VERIFY_IS_APPROX(square * (square*square).conjugate(), square * square.conjugate() * square.conjugate());\n  }\n\n  // destination with a non-default inner-stride\n  // see bug 1741\n  if(!MatrixType::IsRowMajor)\n  {\n    typedef Matrix<Scalar,Dynamic,Dynamic> MatrixX;\n    MatrixX buffer(2*rows,2*rows);\n    Map<RowSquareMatrixType,0,Stride<Dynamic,2> > map1(buffer.data(),rows,rows,Stride<Dynamic,2>(2*rows,2));\n    buffer.setZero();\n    VERIFY_IS_APPROX(map1 = m1 * m2.transpose(), (m1 * m2.transpose()).eval());\n    buffer.setZero();\n    VERIFY_IS_APPROX(map1.noalias() = m1 * m2.transpose(), (m1 * m2.transpose()).eval());\n    buffer.setZero();\n    VERIFY_IS_APPROX(map1.noalias() += m1 * m2.transpose(), (m1 * m2.transpose()).eval());\n  }\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/product_extra.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\ntemplate<typename MatrixType> void product_extra(const MatrixType& m)\n{\n  typedef typename MatrixType::Scalar Scalar;\n  typedef Matrix<Scalar, 1, Dynamic> RowVectorType;\n  typedef Matrix<Scalar, Dynamic, 1> ColVectorType;\n  typedef Matrix<Scalar, Dynamic, Dynamic,\n                         MatrixType::Flags&RowMajorBit> OtherMajorMatrixType;\n\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  MatrixType m1 = MatrixType::Random(rows, cols),\n             m2 = MatrixType::Random(rows, cols),\n             m3(rows, cols),\n             mzero = MatrixType::Zero(rows, cols),\n             identity = MatrixType::Identity(rows, rows),\n             square = MatrixType::Random(rows, rows),\n             res = MatrixType::Random(rows, rows),\n             square2 = MatrixType::Random(cols, cols),\n             res2 = MatrixType::Random(cols, cols);\n  RowVectorType v1 = RowVectorType::Random(rows), vrres(rows);\n  ColVectorType vc2 = ColVectorType::Random(cols), vcres(cols);\n  OtherMajorMatrixType tm1 = m1;\n\n  Scalar s1 = internal::random<Scalar>(),\n         s2 = internal::random<Scalar>(),\n         s3 = internal::random<Scalar>();\n\n  VERIFY_IS_APPROX(m3.noalias() = m1 * m2.adjoint(),                 m1 * m2.adjoint().eval());\n  VERIFY_IS_APPROX(m3.noalias() = m1.adjoint() * square.adjoint(),   m1.adjoint().eval() * square.adjoint().eval());\n  VERIFY_IS_APPROX(m3.noalias() = m1.adjoint() * m2,                 m1.adjoint().eval() * m2);\n  VERIFY_IS_APPROX(m3.noalias() = (s1 * m1.adjoint()) * m2,          (s1 * m1.adjoint()).eval() * m2);\n  VERIFY_IS_APPROX(m3.noalias() = ((s1 * m1).adjoint()) * m2,        (numext::conj(s1) * m1.adjoint()).eval() * m2);\n  VERIFY_IS_APPROX(m3.noalias() = (- m1.adjoint() * s1) * (s3 * m2), (- m1.adjoint()  * s1).eval() * (s3 * m2).eval());\n  VERIFY_IS_APPROX(m3.noalias() = (s2 * m1.adjoint() * s1) * m2,     (s2 * m1.adjoint()  * s1).eval() * m2);\n  VERIFY_IS_APPROX(m3.noalias() = (-m1*s2) * s1*m2.adjoint(),        (-m1*s2).eval() * (s1*m2.adjoint()).eval());\n\n  // a very tricky case where a scale factor has to be automatically conjugated:\n  VERIFY_IS_APPROX( m1.adjoint() * (s1*m2).conjugate(), (m1.adjoint()).eval() * ((s1*m2).conjugate()).eval());\n\n\n  // test all possible conjugate combinations for the four matrix-vector product cases:\n\n  VERIFY_IS_APPROX((-m1.conjugate() * s2) * (s1 * vc2),\n                   (-m1.conjugate()*s2).eval() * (s1 * vc2).eval());\n  VERIFY_IS_APPROX((-m1 * s2) * (s1 * vc2.conjugate()),\n                   (-m1*s2).eval() * (s1 * vc2.conjugate()).eval());\n  VERIFY_IS_APPROX((-m1.conjugate() * s2) * (s1 * vc2.conjugate()),\n                   (-m1.conjugate()*s2).eval() * (s1 * vc2.conjugate()).eval());\n\n  VERIFY_IS_APPROX((s1 * vc2.transpose()) * (-m1.adjoint() * s2),\n                   (s1 * vc2.transpose()).eval() * (-m1.adjoint()*s2).eval());\n  VERIFY_IS_APPROX((s1 * vc2.adjoint()) * (-m1.transpose() * s2),\n                   (s1 * vc2.adjoint()).eval() * (-m1.transpose()*s2).eval());\n  VERIFY_IS_APPROX((s1 * vc2.adjoint()) * (-m1.adjoint() * s2),\n                   (s1 * vc2.adjoint()).eval() * (-m1.adjoint()*s2).eval());\n\n  VERIFY_IS_APPROX((-m1.adjoint() * s2) * (s1 * v1.transpose()),\n                   (-m1.adjoint()*s2).eval() * (s1 * v1.transpose()).eval());\n  VERIFY_IS_APPROX((-m1.transpose() * s2) * (s1 * v1.adjoint()),\n                   (-m1.transpose()*s2).eval() * (s1 * v1.adjoint()).eval());\n  VERIFY_IS_APPROX((-m1.adjoint() * s2) * (s1 * v1.adjoint()),\n                   (-m1.adjoint()*s2).eval() * (s1 * v1.adjoint()).eval());\n\n  VERIFY_IS_APPROX((s1 * v1) * (-m1.conjugate() * s2),\n                   (s1 * v1).eval() * (-m1.conjugate()*s2).eval());\n  VERIFY_IS_APPROX((s1 * v1.conjugate()) * (-m1 * s2),\n                   (s1 * v1.conjugate()).eval() * (-m1*s2).eval());\n  VERIFY_IS_APPROX((s1 * v1.conjugate()) * (-m1.conjugate() * s2),\n                   (s1 * v1.conjugate()).eval() * (-m1.conjugate()*s2).eval());\n\n  VERIFY_IS_APPROX((-m1.adjoint() * s2) * (s1 * v1.adjoint()),\n                   (-m1.adjoint()*s2).eval() * (s1 * v1.adjoint()).eval());\n\n  // test the vector-matrix product with non aligned starts\n  Index i = internal::random<Index>(0,m1.rows()-2);\n  Index j = internal::random<Index>(0,m1.cols()-2);\n  Index r = internal::random<Index>(1,m1.rows()-i);\n  Index c = internal::random<Index>(1,m1.cols()-j);\n  Index i2 = internal::random<Index>(0,m1.rows()-1);\n  Index j2 = internal::random<Index>(0,m1.cols()-1);\n\n  VERIFY_IS_APPROX(m1.col(j2).adjoint() * m1.block(0,j,m1.rows(),c), m1.col(j2).adjoint().eval() * m1.block(0,j,m1.rows(),c).eval());\n  VERIFY_IS_APPROX(m1.block(i,0,r,m1.cols()) * m1.row(i2).adjoint(), m1.block(i,0,r,m1.cols()).eval() * m1.row(i2).adjoint().eval());\n  \n  // regression test\n  MatrixType tmp = m1 * m1.adjoint() * s1;\n  VERIFY_IS_APPROX(tmp, m1 * m1.adjoint() * s1);\n\n  // regression test for bug 1343, assignment to arrays\n  Array<Scalar,Dynamic,1> a1 = m1 * vc2;\n  VERIFY_IS_APPROX(a1.matrix(),m1*vc2);\n  Array<Scalar,Dynamic,1> a2 = s1 * (m1 * vc2);\n  VERIFY_IS_APPROX(a2.matrix(),s1*m1*vc2);\n  Array<Scalar,1,Dynamic> a3 = v1 * m1;\n  VERIFY_IS_APPROX(a3.matrix(),v1*m1);\n  Array<Scalar,Dynamic,Dynamic> a4 = m1 * m2.adjoint();\n  VERIFY_IS_APPROX(a4.matrix(),m1*m2.adjoint());\n}\n\n// Regression test for bug reported at http://forum.kde.org/viewtopic.php?f=74&t=96947\nvoid mat_mat_scalar_scalar_product()\n{\n  Eigen::Matrix2Xd dNdxy(2, 3);\n  dNdxy << -0.5, 0.5, 0,\n           -0.3, 0, 0.3;\n  double det = 6.0, wt = 0.5;\n  VERIFY_IS_APPROX(dNdxy.transpose()*dNdxy*det*wt, det*wt*dNdxy.transpose()*dNdxy);\n}\n\ntemplate <typename MatrixType> \nvoid zero_sized_objects(const MatrixType& m)\n{\n  typedef typename MatrixType::Scalar Scalar;\n  const int PacketSize  = internal::packet_traits<Scalar>::size;\n  const int PacketSize1 = PacketSize>1 ?  PacketSize-1 : 1;\n  Index rows = m.rows();\n  Index cols = m.cols();\n  \n  {\n    MatrixType res, a(rows,0), b(0,cols);\n    VERIFY_IS_APPROX( (res=a*b), MatrixType::Zero(rows,cols) );\n    VERIFY_IS_APPROX( (res=a*a.transpose()), MatrixType::Zero(rows,rows) );\n    VERIFY_IS_APPROX( (res=b.transpose()*b), MatrixType::Zero(cols,cols) );\n    VERIFY_IS_APPROX( (res=b.transpose()*a.transpose()), MatrixType::Zero(cols,rows) );\n  }\n  \n  {\n    MatrixType res, a(rows,cols), b(cols,0);\n    res = a*b;\n    VERIFY(res.rows()==rows && res.cols()==0);\n    b.resize(0,rows);\n    res = b*a;\n    VERIFY(res.rows()==0 && res.cols()==cols);\n  }\n  \n  {\n    Matrix<Scalar,PacketSize,0> a;\n    Matrix<Scalar,0,1> b;\n    Matrix<Scalar,PacketSize,1> res;\n    VERIFY_IS_APPROX( (res=a*b), MatrixType::Zero(PacketSize,1) );\n    VERIFY_IS_APPROX( (res=a.lazyProduct(b)), MatrixType::Zero(PacketSize,1) );\n  }\n  \n  {\n    Matrix<Scalar,PacketSize1,0> a;\n    Matrix<Scalar,0,1> b;\n    Matrix<Scalar,PacketSize1,1> res;\n    VERIFY_IS_APPROX( (res=a*b), MatrixType::Zero(PacketSize1,1) );\n    VERIFY_IS_APPROX( (res=a.lazyProduct(b)), MatrixType::Zero(PacketSize1,1) );\n  }\n  \n  {\n    Matrix<Scalar,PacketSize,Dynamic> a(PacketSize,0);\n    Matrix<Scalar,Dynamic,1> b(0,1);\n    Matrix<Scalar,PacketSize,1> res;\n    VERIFY_IS_APPROX( (res=a*b), MatrixType::Zero(PacketSize,1) );\n    VERIFY_IS_APPROX( (res=a.lazyProduct(b)), MatrixType::Zero(PacketSize,1) );\n  }\n  \n  {\n    Matrix<Scalar,PacketSize1,Dynamic> a(PacketSize1,0);\n    Matrix<Scalar,Dynamic,1> b(0,1);\n    Matrix<Scalar,PacketSize1,1> res;\n    VERIFY_IS_APPROX( (res=a*b), MatrixType::Zero(PacketSize1,1) );\n    VERIFY_IS_APPROX( (res=a.lazyProduct(b)), MatrixType::Zero(PacketSize1,1) );\n  }\n}\n\ntemplate<int>\nvoid bug_127()\n{\n  // Bug 127\n  //\n  // a product of the form lhs*rhs with\n  //\n  // lhs:\n  // rows = 1, cols = 4\n  // RowsAtCompileTime = 1, ColsAtCompileTime = -1\n  // MaxRowsAtCompileTime = 1, MaxColsAtCompileTime = 5\n  //\n  // rhs:\n  // rows = 4, cols = 0\n  // RowsAtCompileTime = -1, ColsAtCompileTime = -1\n  // MaxRowsAtCompileTime = 5, MaxColsAtCompileTime = 1\n  //\n  // was failing on a runtime assertion, because it had been mis-compiled as a dot product because Product.h was using the\n  // max-sizes to detect size 1 indicating vectors, and that didn't account for 0-sized object with max-size 1.\n\n  Matrix<float,1,Dynamic,RowMajor,1,5> a(1,4);\n  Matrix<float,Dynamic,Dynamic,ColMajor,5,1> b(4,0);\n  a*b;\n}\n\ntemplate<int> void bug_817()\n{\n  ArrayXXf B = ArrayXXf::Random(10,10), C;\n  VectorXf x = VectorXf::Random(10);\n  C = (x.transpose()*B.matrix());\n  B = (x.transpose()*B.matrix());\n  VERIFY_IS_APPROX(B,C);\n}\n\ntemplate<int>\nvoid unaligned_objects()\n{\n  // Regression test for the bug reported here:\n  // http://forum.kde.org/viewtopic.php?f=74&t=107541\n  // Recall the matrix*vector kernel avoid unaligned loads by loading two packets and then reassemble then.\n  // There was a mistake in the computation of the valid range for fully unaligned objects: in some rare cases,\n  // memory was read outside the allocated matrix memory. Though the values were not used, this might raise segfault.\n  for(int m=450;m<460;++m)\n  {\n    for(int n=8;n<12;++n)\n    {\n      MatrixXf M(m, n);\n      VectorXf v1(n), r1(500);\n      RowVectorXf v2(m), r2(16);\n\n      M.setRandom();\n      v1.setRandom();\n      v2.setRandom();\n      for(int o=0; o<4; ++o)\n      {\n        r1.segment(o,m).noalias() = M * v1;\n        VERIFY_IS_APPROX(r1.segment(o,m), M * MatrixXf(v1));\n        r2.segment(o,n).noalias() = v2 * M;\n        VERIFY_IS_APPROX(r2.segment(o,n), MatrixXf(v2) * M);\n      }\n    }\n  }\n}\n\ntemplate<typename T>\nEIGEN_DONT_INLINE\nIndex test_compute_block_size(Index m, Index n, Index k)\n{\n  Index mc(m), nc(n), kc(k);\n  internal::computeProductBlockingSizes<T,T>(kc, mc, nc);\n  return kc+mc+nc;\n}\n\ntemplate<typename T>\nIndex compute_block_size()\n{\n  Index ret = 0;\n  ret += test_compute_block_size<T>(0,1,1);\n  ret += test_compute_block_size<T>(1,0,1);\n  ret += test_compute_block_size<T>(1,1,0);\n  ret += test_compute_block_size<T>(0,0,1);\n  ret += test_compute_block_size<T>(0,1,0);\n  ret += test_compute_block_size<T>(1,0,0);\n  ret += test_compute_block_size<T>(0,0,0);\n  return ret;\n}\n\ntemplate<typename>\nvoid aliasing_with_resize()\n{\n  Index m = internal::random<Index>(10,50);\n  Index n = internal::random<Index>(10,50);\n  MatrixXd A, B, C(m,n), D(m,m);\n  VectorXd a, b, c(n);\n  C.setRandom();\n  D.setRandom();\n  c.setRandom();\n  double s = internal::random<double>(1,10);\n\n  A = C;\n  B = A * A.transpose();\n  A = A * A.transpose();\n  VERIFY_IS_APPROX(A,B);\n\n  A = C;\n  B = (A * A.transpose())/s;\n  A = (A * A.transpose())/s;\n  VERIFY_IS_APPROX(A,B);\n\n  A = C;\n  B = (A * A.transpose()) + D;\n  A = (A * A.transpose()) + D;\n  VERIFY_IS_APPROX(A,B);\n\n  A = C;\n  B = D + (A * A.transpose());\n  A = D + (A * A.transpose());\n  VERIFY_IS_APPROX(A,B);\n\n  A = C;\n  B = s * (A * A.transpose());\n  A = s * (A * A.transpose());\n  VERIFY_IS_APPROX(A,B);\n\n  A = C;\n  a = c;\n  b = (A * a)/s;\n  a = (A * a)/s;\n  VERIFY_IS_APPROX(a,b);\n}\n\ntemplate<int>\nvoid bug_1308()\n{\n  int n = 10;\n  MatrixXd r(n,n);\n  VectorXd v = VectorXd::Random(n);\n  r = v * RowVectorXd::Ones(n);\n  VERIFY_IS_APPROX(r, v.rowwise().replicate(n));\n  r = VectorXd::Ones(n) * v.transpose();\n  VERIFY_IS_APPROX(r, v.rowwise().replicate(n).transpose());\n\n  Matrix4d ones44 = Matrix4d::Ones();\n  Matrix4d m44 = Matrix4d::Ones() * Matrix4d::Ones();\n  VERIFY_IS_APPROX(m44,Matrix4d::Constant(4));\n  VERIFY_IS_APPROX(m44.noalias()=ones44*Matrix4d::Ones(), Matrix4d::Constant(4));\n  VERIFY_IS_APPROX(m44.noalias()=ones44.transpose()*Matrix4d::Ones(), Matrix4d::Constant(4));\n  VERIFY_IS_APPROX(m44.noalias()=Matrix4d::Ones()*ones44, Matrix4d::Constant(4));\n  VERIFY_IS_APPROX(m44.noalias()=Matrix4d::Ones()*ones44.transpose(), Matrix4d::Constant(4));\n\n  typedef Matrix<double,4,4,RowMajor> RMatrix4d;\n  RMatrix4d r44 = Matrix4d::Ones() * Matrix4d::Ones();\n  VERIFY_IS_APPROX(r44,Matrix4d::Constant(4));\n  VERIFY_IS_APPROX(r44.noalias()=ones44*Matrix4d::Ones(), Matrix4d::Constant(4));\n  VERIFY_IS_APPROX(r44.noalias()=ones44.transpose()*Matrix4d::Ones(), Matrix4d::Constant(4));\n  VERIFY_IS_APPROX(r44.noalias()=Matrix4d::Ones()*ones44, Matrix4d::Constant(4));\n  VERIFY_IS_APPROX(r44.noalias()=Matrix4d::Ones()*ones44.transpose(), Matrix4d::Constant(4));\n  VERIFY_IS_APPROX(r44.noalias()=ones44*RMatrix4d::Ones(), Matrix4d::Constant(4));\n  VERIFY_IS_APPROX(r44.noalias()=ones44.transpose()*RMatrix4d::Ones(), Matrix4d::Constant(4));\n  VERIFY_IS_APPROX(r44.noalias()=RMatrix4d::Ones()*ones44, Matrix4d::Constant(4));\n  VERIFY_IS_APPROX(r44.noalias()=RMatrix4d::Ones()*ones44.transpose(), Matrix4d::Constant(4));\n\n//   RowVector4d r4;\n  m44.setOnes();\n  r44.setZero();\n  VERIFY_IS_APPROX(r44.noalias() += m44.row(0).transpose() * RowVector4d::Ones(), ones44);\n  r44.setZero();\n  VERIFY_IS_APPROX(r44.noalias() += m44.col(0) * RowVector4d::Ones(), ones44);\n  r44.setZero();\n  VERIFY_IS_APPROX(r44.noalias() += Vector4d::Ones() * m44.row(0), ones44);\n  r44.setZero();\n  VERIFY_IS_APPROX(r44.noalias() += Vector4d::Ones() * m44.col(0).transpose(), ones44);\n}\n\nEIGEN_DECLARE_TEST(product_extra)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( product_extra(MatrixXf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_2( product_extra(MatrixXd(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_2( mat_mat_scalar_scalar_product() );\n    CALL_SUBTEST_3( product_extra(MatrixXcf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE/2), internal::random<int>(1,EIGEN_TEST_MAX_SIZE/2))) );\n    CALL_SUBTEST_4( product_extra(MatrixXcd(internal::random<int>(1,EIGEN_TEST_MAX_SIZE/2), internal::random<int>(1,EIGEN_TEST_MAX_SIZE/2))) );\n    CALL_SUBTEST_1( zero_sized_objects(MatrixXf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n  }\n  CALL_SUBTEST_5( bug_127<0>() );\n  CALL_SUBTEST_5( bug_817<0>() );\n  CALL_SUBTEST_5( bug_1308<0>() );\n  CALL_SUBTEST_6( unaligned_objects<0>() );\n  CALL_SUBTEST_7( compute_block_size<float>() );\n  CALL_SUBTEST_7( compute_block_size<double>() );\n  CALL_SUBTEST_7( compute_block_size<std::complex<double> >() );\n  CALL_SUBTEST_8( aliasing_with_resize<void>() );\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/product_large.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"product.h\"\n#include <Eigen/LU>\n\ntemplate<typename T>\nvoid test_aliasing()\n{\n  int rows = internal::random<int>(1,12);\n  int cols = internal::random<int>(1,12);\n  typedef Matrix<T,Dynamic,Dynamic> MatrixType;\n  typedef Matrix<T,Dynamic,1> VectorType;\n  VectorType x(cols); x.setRandom();\n  VectorType z(x);\n  VectorType y(rows); y.setZero();\n  MatrixType A(rows,cols); A.setRandom();\n  // CwiseBinaryOp\n  VERIFY_IS_APPROX(x = y + A*x, A*z);     // OK because \"y + A*x\" is marked as \"assume-aliasing\"\n  x = z;\n  // CwiseUnaryOp\n  VERIFY_IS_APPROX(x = T(1.)*(A*x), A*z); // OK because 1*(A*x) is replaced by (1*A*x) which is a Product<> expression\n  x = z;\n  // VERIFY_IS_APPROX(x = y-A*x, -A*z);   // Not OK in 3.3 because x is resized before A*x gets evaluated\n  x = z;\n}\n\ntemplate<int>\nvoid product_large_regressions()\n{\n  {\n    // test a specific issue in DiagonalProduct\n    int N = 1000000;\n    VectorXf v = VectorXf::Ones(N);\n    MatrixXf m = MatrixXf::Ones(N,3);\n    m = (v+v).asDiagonal() * m;\n    VERIFY_IS_APPROX(m, MatrixXf::Constant(N,3,2));\n  }\n\n  {\n    // test deferred resizing in Matrix::operator=\n    MatrixXf a = MatrixXf::Random(10,4), b = MatrixXf::Random(4,10), c = a;\n    VERIFY_IS_APPROX((a = a * b), (c * b).eval());\n  }\n\n  {\n    // check the functions to setup blocking sizes compile and do not segfault\n    // FIXME check they do what they are supposed to do !!\n    std::ptrdiff_t l1 = internal::random<int>(10000,20000);\n    std::ptrdiff_t l2 = internal::random<int>(100000,200000);\n    std::ptrdiff_t l3 = internal::random<int>(1000000,2000000);\n    setCpuCacheSizes(l1,l2,l3);\n    VERIFY(l1==l1CacheSize());\n    VERIFY(l2==l2CacheSize());\n    std::ptrdiff_t k1 = internal::random<int>(10,100)*16;\n    std::ptrdiff_t m1 = internal::random<int>(10,100)*16;\n    std::ptrdiff_t n1 = internal::random<int>(10,100)*16;\n    // only makes sure it compiles fine\n    internal::computeProductBlockingSizes<float,float,std::ptrdiff_t>(k1,m1,n1,1);\n  }\n\n  {\n    // test regression in row-vector by matrix (bad Map type)\n    MatrixXf mat1(10,32); mat1.setRandom();\n    MatrixXf mat2(32,32); mat2.setRandom();\n    MatrixXf r1 = mat1.row(2)*mat2.transpose();\n    VERIFY_IS_APPROX(r1, (mat1.row(2)*mat2.transpose()).eval());\n\n    MatrixXf r2 = mat1.row(2)*mat2;\n    VERIFY_IS_APPROX(r2, (mat1.row(2)*mat2).eval());\n  }\n\n  {\n    Eigen::MatrixXd A(10,10), B, C;\n    A.setRandom();\n    C = A;\n    for(int k=0; k<79; ++k)\n      C = C * A;\n    B.noalias() = (((A*A)*(A*A))*((A*A)*(A*A))*((A*A)*(A*A))*((A*A)*(A*A))*((A*A)*(A*A)) * ((A*A)*(A*A))*((A*A)*(A*A))*((A*A)*(A*A))*((A*A)*(A*A))*((A*A)*(A*A)))\n                * (((A*A)*(A*A))*((A*A)*(A*A))*((A*A)*(A*A))*((A*A)*(A*A))*((A*A)*(A*A)) * ((A*A)*(A*A))*((A*A)*(A*A))*((A*A)*(A*A))*((A*A)*(A*A))*((A*A)*(A*A)));\n    VERIFY_IS_APPROX(B,C);\n  }\n}\n\ntemplate<int>\nvoid bug_1622() {\n  typedef Matrix<double, 2, -1, 0, 2, -1> Mat2X;\n  Mat2X x(2,2); x.setRandom();\n  MatrixXd y(2,2); y.setRandom();\n  const Mat2X K1 = x * y.inverse();\n  const Matrix2d K2 = x * y.inverse();\n  VERIFY_IS_APPROX(K1,K2);\n}\n\nEIGEN_DECLARE_TEST(product_large)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( product(MatrixXf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_2( product(MatrixXd(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_2( product(MatrixXd(internal::random<int>(1,10), internal::random<int>(1,10))) );\n\n    CALL_SUBTEST_3( product(MatrixXi(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n    CALL_SUBTEST_4( product(MatrixXcf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE/2), internal::random<int>(1,EIGEN_TEST_MAX_SIZE/2))) );\n    CALL_SUBTEST_5( product(Matrix<float,Dynamic,Dynamic,RowMajor>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n\n    CALL_SUBTEST_1( test_aliasing<float>() );\n\n    CALL_SUBTEST_6( bug_1622<1>() );\n  }\n\n  CALL_SUBTEST_6( product_large_regressions<0>() );\n\n  // Regression test for bug 714:\n#if defined EIGEN_HAS_OPENMP\n  omp_set_dynamic(1);\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_6( product(Matrix<float,Dynamic,Dynamic>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n  }\n#endif\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/product_mmtr.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010-2017 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#define CHECK_MMTR(DEST, TRI, OP) {                   \\\n    ref3 = DEST;                                      \\\n    ref2 = ref1 = DEST;                               \\\n    DEST.template triangularView<TRI>() OP;           \\\n    ref1 OP;                                          \\\n    ref2.template triangularView<TRI>()               \\\n      = ref1.template triangularView<TRI>();          \\\n    VERIFY_IS_APPROX(DEST,ref2);                      \\\n    \\\n    DEST = ref3;                                      \\\n    ref3 = ref2;                                      \\\n    ref3.diagonal() = DEST.diagonal();                \\\n    DEST.template triangularView<TRI|ZeroDiag>() OP;  \\\n    VERIFY_IS_APPROX(DEST,ref3);                      \\\n  }\n\ntemplate<typename Scalar> void mmtr(int size)\n{\n  typedef Matrix<Scalar,Dynamic,Dynamic,ColMajor> MatrixColMaj;\n  typedef Matrix<Scalar,Dynamic,Dynamic,RowMajor> MatrixRowMaj;\n\n  DenseIndex othersize = internal::random<DenseIndex>(1,200);\n  \n  MatrixColMaj matc = MatrixColMaj::Zero(size, size);\n  MatrixRowMaj matr = MatrixRowMaj::Zero(size, size);\n  MatrixColMaj ref1(size, size), ref2(size, size), ref3(size,size);\n  \n  MatrixColMaj soc(size,othersize); soc.setRandom();\n  MatrixColMaj osc(othersize,size); osc.setRandom();\n  MatrixRowMaj sor(size,othersize); sor.setRandom();\n  MatrixRowMaj osr(othersize,size); osr.setRandom();\n  MatrixColMaj sqc(size,size); sqc.setRandom();\n  MatrixRowMaj sqr(size,size); sqr.setRandom();\n  \n  Scalar s = internal::random<Scalar>();\n  \n  CHECK_MMTR(matc, Lower, = s*soc*sor.adjoint());\n  CHECK_MMTR(matc, Upper, = s*(soc*soc.adjoint()));\n  CHECK_MMTR(matr, Lower, = s*soc*soc.adjoint());\n  CHECK_MMTR(matr, Upper, = soc*(s*sor.adjoint()));\n  \n  CHECK_MMTR(matc, Lower, += s*soc*soc.adjoint());\n  CHECK_MMTR(matc, Upper, += s*(soc*sor.transpose()));\n  CHECK_MMTR(matr, Lower, += s*sor*soc.adjoint());\n  CHECK_MMTR(matr, Upper, += soc*(s*soc.adjoint()));\n  \n  CHECK_MMTR(matc, Lower, -= s*soc*soc.adjoint());\n  CHECK_MMTR(matc, Upper, -= s*(osc.transpose()*osc.conjugate()));\n  CHECK_MMTR(matr, Lower, -= s*soc*soc.adjoint());\n  CHECK_MMTR(matr, Upper, -= soc*(s*soc.adjoint()));\n  \n  CHECK_MMTR(matc, Lower, -= s*sqr*sqc.template triangularView<Upper>());\n  CHECK_MMTR(matc, Upper, = s*sqc*sqr.template triangularView<Upper>());\n  CHECK_MMTR(matc, Lower, += s*sqr*sqc.template triangularView<Lower>());\n  CHECK_MMTR(matc, Upper, = s*sqc*sqc.template triangularView<Lower>());\n  \n  CHECK_MMTR(matc, Lower, = (s*sqr).template triangularView<Upper>()*sqc);\n  CHECK_MMTR(matc, Upper, -= (s*sqc).template triangularView<Upper>()*sqc);\n  CHECK_MMTR(matc, Lower, = (s*sqr).template triangularView<Lower>()*sqc);\n  CHECK_MMTR(matc, Upper, += (s*sqc).template triangularView<Lower>()*sqc);\n\n  // check aliasing\n  ref2 = ref1 = matc;\n  ref1 = sqc.adjoint() * matc * sqc;\n  ref2.template triangularView<Upper>() = ref1.template triangularView<Upper>();\n  matc.template triangularView<Upper>() = sqc.adjoint() * matc * sqc;\n  VERIFY_IS_APPROX(matc, ref2);\n\n  ref2 = ref1 = matc;\n  ref1 = sqc * matc * sqc.adjoint();\n  ref2.template triangularView<Lower>() = ref1.template triangularView<Lower>();\n  matc.template triangularView<Lower>() = sqc * matc * sqc.adjoint();\n  VERIFY_IS_APPROX(matc, ref2);\n\n  // destination with a non-default inner-stride\n  // see bug 1741\n  {\n    typedef Matrix<Scalar,Dynamic,Dynamic> MatrixX;\n    MatrixX buffer(2*size,2*size);\n    Map<MatrixColMaj,0,Stride<Dynamic,Dynamic> > map1(buffer.data(),size,size,Stride<Dynamic,Dynamic>(2*size,2));\n    buffer.setZero();\n    CHECK_MMTR(map1, Lower, = s*soc*sor.adjoint());\n  }\n}\n\nEIGEN_DECLARE_TEST(product_mmtr)\n{\n  for(int i = 0; i < g_repeat ; i++)\n  {\n    CALL_SUBTEST_1((mmtr<float>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE))));\n    CALL_SUBTEST_2((mmtr<double>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE))));\n    CALL_SUBTEST_3((mmtr<std::complex<float> >(internal::random<int>(1,EIGEN_TEST_MAX_SIZE/2))));\n    CALL_SUBTEST_4((mmtr<std::complex<double> >(internal::random<int>(1,EIGEN_TEST_MAX_SIZE/2))));\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/product_notemporary.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define TEST_ENABLE_TEMPORARY_TRACKING\n\n#include \"main.h\"\n\ntemplate<typename Dst, typename Lhs, typename Rhs>\nvoid check_scalar_multiple3(Dst &dst, const Lhs& A, const Rhs& B)\n{\n  VERIFY_EVALUATION_COUNT( (dst.noalias()  = A * B), 0);\n  VERIFY_IS_APPROX( dst, (A.eval() * B.eval()).eval() );\n  VERIFY_EVALUATION_COUNT( (dst.noalias() += A * B), 0);\n  VERIFY_IS_APPROX( dst, 2*(A.eval() * B.eval()).eval() );\n  VERIFY_EVALUATION_COUNT( (dst.noalias() -= A * B), 0);\n  VERIFY_IS_APPROX( dst, (A.eval() * B.eval()).eval() );\n}\n\ntemplate<typename Dst, typename Lhs, typename Rhs, typename S2>\nvoid check_scalar_multiple2(Dst &dst, const Lhs& A, const Rhs& B, S2 s2)\n{\n  CALL_SUBTEST( check_scalar_multiple3(dst, A,    B) );\n  CALL_SUBTEST( check_scalar_multiple3(dst, A,   -B) );\n  CALL_SUBTEST( check_scalar_multiple3(dst, A, s2*B) );\n  CALL_SUBTEST( check_scalar_multiple3(dst, A, B*s2) );\n  CALL_SUBTEST( check_scalar_multiple3(dst, A, (B*s2).conjugate()) );\n}\n\ntemplate<typename Dst, typename Lhs, typename Rhs, typename S1, typename S2>\nvoid check_scalar_multiple1(Dst &dst, const Lhs& A, const Rhs& B, S1 s1, S2 s2)\n{\n  CALL_SUBTEST( check_scalar_multiple2(dst,    A, B, s2) );\n  CALL_SUBTEST( check_scalar_multiple2(dst,   -A, B, s2) );\n  CALL_SUBTEST( check_scalar_multiple2(dst, s1*A, B, s2) );\n  CALL_SUBTEST( check_scalar_multiple2(dst, A*s1, B, s2) );\n  CALL_SUBTEST( check_scalar_multiple2(dst, (A*s1).conjugate(), B, s2) );\n}\n\ntemplate<typename MatrixType> void product_notemporary(const MatrixType& m)\n{\n  /* This test checks the number of temporaries created\n   * during the evaluation of a complex expression */\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename MatrixType::RealScalar RealScalar;\n  typedef Matrix<Scalar, 1, Dynamic> RowVectorType;\n  typedef Matrix<Scalar, Dynamic, 1> ColVectorType;\n  typedef Matrix<Scalar, Dynamic, Dynamic, ColMajor> ColMajorMatrixType;\n  typedef Matrix<Scalar, Dynamic, Dynamic, RowMajor> RowMajorMatrixType;\n\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  ColMajorMatrixType m1 = MatrixType::Random(rows, cols),\n                     m2 = MatrixType::Random(rows, cols),\n                     m3(rows, cols);\n  RowVectorType rv1 = RowVectorType::Random(rows), rvres(rows);\n  ColVectorType cv1 = ColVectorType::Random(cols), cvres(cols);\n  RowMajorMatrixType rm3(rows, cols);\n\n  Scalar s1 = internal::random<Scalar>(),\n         s2 = internal::random<Scalar>(),\n         s3 = internal::random<Scalar>();\n\n  Index c0 = internal::random<Index>(4,cols-8),\n        c1 = internal::random<Index>(8,cols-c0),\n        r0 = internal::random<Index>(4,cols-8),\n        r1 = internal::random<Index>(8,rows-r0);\n\n  VERIFY_EVALUATION_COUNT( m3 = (m1 * m2.adjoint()), 1);\n  VERIFY_EVALUATION_COUNT( m3 = (m1 * m2.adjoint()).transpose(), 1);\n  VERIFY_EVALUATION_COUNT( m3.noalias() = m1 * m2.adjoint(), 0);\n\n  VERIFY_EVALUATION_COUNT( m3 = s1 * (m1 * m2.transpose()), 1);\n//   VERIFY_EVALUATION_COUNT( m3 = m3 + s1 * (m1 * m2.transpose()), 1);\n  VERIFY_EVALUATION_COUNT( m3.noalias() = s1 * (m1 * m2.transpose()), 0);\n\n  VERIFY_EVALUATION_COUNT( m3 = m3 + (m1 * m2.adjoint()), 1);\n  VERIFY_EVALUATION_COUNT( m3 = m3 - (m1 * m2.adjoint()), 1);\n\n  VERIFY_EVALUATION_COUNT( m3 = m3 + (m1 * m2.adjoint()).transpose(), 1);\n  VERIFY_EVALUATION_COUNT( m3.noalias() = m3 + m1 * m2.transpose(), 0);\n  VERIFY_EVALUATION_COUNT( m3.noalias() += m3 + m1 * m2.transpose(), 0);\n  VERIFY_EVALUATION_COUNT( m3.noalias() -= m3 + m1 * m2.transpose(), 0);\n  VERIFY_EVALUATION_COUNT( m3.noalias() =  m3 - m1 * m2.transpose(), 0);\n  VERIFY_EVALUATION_COUNT( m3.noalias() += m3 - m1 * m2.transpose(), 0);\n  VERIFY_EVALUATION_COUNT( m3.noalias() -= m3 - m1 * m2.transpose(), 0);\n\n  VERIFY_EVALUATION_COUNT( m3.noalias() = s1 * m1 * s2 * m2.adjoint(), 0);\n  VERIFY_EVALUATION_COUNT( m3.noalias() = s1 * m1 * s2 * (m1*s3+m2*s2).adjoint(), 1);\n  VERIFY_EVALUATION_COUNT( m3.noalias() = (s1 * m1).adjoint() * s2 * m2, 0);\n  VERIFY_EVALUATION_COUNT( m3.noalias() += s1 * (-m1*s3).adjoint() * (s2 * m2 * s3), 0);\n  VERIFY_EVALUATION_COUNT( m3.noalias() -= s1 * (m1.transpose() * m2), 0);\n\n  VERIFY_EVALUATION_COUNT(( m3.block(r0,r0,r1,r1).noalias() += -m1.block(r0,c0,r1,c1) * (s2*m2.block(r0,c0,r1,c1)).adjoint() ), 0);\n  VERIFY_EVALUATION_COUNT(( m3.block(r0,r0,r1,r1).noalias() -= s1 * m1.block(r0,c0,r1,c1) * m2.block(c0,r0,c1,r1) ), 0);\n\n  // NOTE this is because the Block expression is not handled yet by our expression analyser\n  VERIFY_EVALUATION_COUNT(( m3.block(r0,r0,r1,r1).noalias() = s1 * m1.block(r0,c0,r1,c1) * (s1*m2).block(c0,r0,c1,r1) ), 1);\n\n  VERIFY_EVALUATION_COUNT( m3.noalias() -= (s1 * m1).template triangularView<Lower>() * m2, 0);\n  VERIFY_EVALUATION_COUNT( rm3.noalias() = (s1 * m1.adjoint()).template triangularView<Upper>() * (m2+m2), 1);\n  VERIFY_EVALUATION_COUNT( rm3.noalias() = (s1 * m1.adjoint()).template triangularView<UnitUpper>() * m2.adjoint(), 0);\n\n  VERIFY_EVALUATION_COUNT( m3.template triangularView<Upper>() = (m1 * m2.adjoint()), 0);\n  VERIFY_EVALUATION_COUNT( m3.template triangularView<Upper>() -= (m1 * m2.adjoint()), 0);\n\n  // NOTE this is because the blas_traits require innerstride==1 to avoid a temporary, but that doesn't seem to be actually needed for the triangular products\n  VERIFY_EVALUATION_COUNT( rm3.col(c0).noalias() = (s1 * m1.adjoint()).template triangularView<UnitUpper>() * (s2*m2.row(c0)).adjoint(), 1);\n\n  VERIFY_EVALUATION_COUNT( m1.template triangularView<Lower>().solveInPlace(m3), 0);\n  VERIFY_EVALUATION_COUNT( m1.adjoint().template triangularView<Lower>().solveInPlace(m3.transpose()), 0);\n\n  VERIFY_EVALUATION_COUNT( m3.noalias() -= (s1 * m1).adjoint().template selfadjointView<Lower>() * (-m2*s3).adjoint(), 0);\n  VERIFY_EVALUATION_COUNT( m3.noalias() = s2 * m2.adjoint() * (s1 * m1.adjoint()).template selfadjointView<Upper>(), 0);\n  VERIFY_EVALUATION_COUNT( rm3.noalias() = (s1 * m1.adjoint()).template selfadjointView<Lower>() * m2.adjoint(), 0);\n\n  // NOTE this is because the blas_traits require innerstride==1 to avoid a temporary, but that doesn't seem to be actually needed for the triangular products\n  VERIFY_EVALUATION_COUNT( m3.col(c0).noalias() = (s1 * m1).adjoint().template selfadjointView<Lower>() * (-m2.row(c0)*s3).adjoint(), 1);\n  VERIFY_EVALUATION_COUNT( m3.col(c0).noalias() -= (s1 * m1).adjoint().template selfadjointView<Upper>() * (-m2.row(c0)*s3).adjoint(), 1);\n\n  VERIFY_EVALUATION_COUNT( m3.block(r0,c0,r1,c1).noalias() += m1.block(r0,r0,r1,r1).template selfadjointView<Upper>() * (s1*m2.block(r0,c0,r1,c1)), 0);\n  VERIFY_EVALUATION_COUNT( m3.block(r0,c0,r1,c1).noalias() = m1.block(r0,r0,r1,r1).template selfadjointView<Upper>() * m2.block(r0,c0,r1,c1), 0);\n\n  VERIFY_EVALUATION_COUNT( m3.template selfadjointView<Lower>().rankUpdate(m2.adjoint()), 0);\n\n  // Here we will get 1 temporary for each resize operation of the lhs operator; resize(r1,c1) would lead to zero temporaries\n  m3.resize(1,1);\n  VERIFY_EVALUATION_COUNT( m3.noalias() = m1.block(r0,r0,r1,r1).template selfadjointView<Lower>() * m2.block(r0,c0,r1,c1), 1);\n  m3.resize(1,1);\n  VERIFY_EVALUATION_COUNT( m3.noalias() = m1.block(r0,r0,r1,r1).template triangularView<UnitUpper>()  * m2.block(r0,c0,r1,c1), 1);\n\n  // Zero temporaries for lazy products ...\n  m3.setRandom(rows,cols);\n  VERIFY_EVALUATION_COUNT( Scalar tmp = 0; tmp += Scalar(RealScalar(1)) /  (m3.transpose().lazyProduct(m3)).diagonal().sum(), 0 );\n  VERIFY_EVALUATION_COUNT( m3.noalias() = m1.conjugate().lazyProduct(m2.conjugate()), 0);\n\n  // ... and even no temporary for even deeply (>=2) nested products\n  VERIFY_EVALUATION_COUNT( Scalar tmp = 0; tmp += Scalar(RealScalar(1)) /  (m3.transpose() * m3).diagonal().sum(), 0 );\n  VERIFY_EVALUATION_COUNT( Scalar tmp = 0; tmp += Scalar(RealScalar(1)) /  (m3.transpose() * m3).diagonal().array().abs().sum(), 0 );\n\n  // Zero temporaries for ... CoeffBasedProductMode\n  VERIFY_EVALUATION_COUNT( m3.col(0).template head<5>() * m3.col(0).transpose() + m3.col(0).template head<5>() * m3.col(0).transpose(), 0 );\n\n  // Check matrix * vectors\n  VERIFY_EVALUATION_COUNT( cvres.noalias() = m1 * cv1, 0 );\n  VERIFY_EVALUATION_COUNT( cvres.noalias() -= m1 * cv1, 0 );\n  VERIFY_EVALUATION_COUNT( cvres.noalias() -= m1 * m2.col(0), 0 );\n  VERIFY_EVALUATION_COUNT( cvres.noalias() -= m1 * rv1.adjoint(), 0 );\n  VERIFY_EVALUATION_COUNT( cvres.noalias() -= m1 * m2.row(0).transpose(), 0 );\n\n  VERIFY_EVALUATION_COUNT( cvres.noalias() = (m1+m1) * cv1, 0 );\n  VERIFY_EVALUATION_COUNT( cvres.noalias() = (rm3+rm3) * cv1, 0 );\n  VERIFY_EVALUATION_COUNT( cvres.noalias() = (m1+m1) * (m1*cv1), 1 );\n  VERIFY_EVALUATION_COUNT( cvres.noalias() = (rm3+rm3) * (m1*cv1), 1 );\n\n  // Check outer products\n  #ifdef EIGEN_ALLOCA\n  bool temp_via_alloca = m3.rows()*sizeof(Scalar) <= EIGEN_STACK_ALLOCATION_LIMIT;\n  #else\n  bool temp_via_alloca = false;\n  #endif\n  m3 = cv1 * rv1;\n  VERIFY_EVALUATION_COUNT( m3.noalias() = cv1 * rv1, 0 );\n  VERIFY_EVALUATION_COUNT( m3.noalias() = (cv1+cv1) * (rv1+rv1), temp_via_alloca ? 0 : 1 );\n  VERIFY_EVALUATION_COUNT( m3.noalias() = (m1*cv1) * (rv1), 1 );\n  VERIFY_EVALUATION_COUNT( m3.noalias() += (m1*cv1) * (rv1), 1 );\n  rm3 = cv1 * rv1;\n  VERIFY_EVALUATION_COUNT( rm3.noalias() = cv1 * rv1, 0 );\n  VERIFY_EVALUATION_COUNT( rm3.noalias() = (cv1+cv1) * (rv1+rv1), temp_via_alloca ? 0 : 1 );\n  VERIFY_EVALUATION_COUNT( rm3.noalias() = (cv1) * (rv1 * m1), 1 );\n  VERIFY_EVALUATION_COUNT( rm3.noalias() -= (cv1) * (rv1 * m1), 1 );\n  VERIFY_EVALUATION_COUNT( rm3.noalias() = (m1*cv1) * (rv1 * m1), 2 );\n  VERIFY_EVALUATION_COUNT( rm3.noalias() += (m1*cv1) * (rv1 * m1), 2 );\n\n  // Check nested products\n  VERIFY_EVALUATION_COUNT( cvres.noalias() = m1.adjoint() * m1 * cv1, 1 );\n  VERIFY_EVALUATION_COUNT( rvres.noalias() = rv1 * (m1 * m2.adjoint()), 1 );\n\n  // exhaustively check all scalar multiple combinations:\n  {\n    // Generic path:\n    check_scalar_multiple1(m3, m1, m2, s1, s2);\n    // Force fall back to coeff-based:\n    typename ColMajorMatrixType::BlockXpr m3_blck = m3.block(r0,r0,1,1);\n    check_scalar_multiple1(m3_blck, m1.block(r0,c0,1,1), m2.block(c0,r0,1,1), s1, s2);\n  }\n}\n\nEIGEN_DECLARE_TEST(product_notemporary)\n{\n  int s;\n  for(int i = 0; i < g_repeat; i++) {\n    s = internal::random<int>(16,EIGEN_TEST_MAX_SIZE);\n    CALL_SUBTEST_1( product_notemporary(MatrixXf(s, s)) );\n    CALL_SUBTEST_2( product_notemporary(MatrixXd(s, s)) );\n    TEST_SET_BUT_UNUSED_VARIABLE(s)\n    \n    s = internal::random<int>(16,EIGEN_TEST_MAX_SIZE/2);\n    CALL_SUBTEST_3( product_notemporary(MatrixXcf(s,s)) );\n    CALL_SUBTEST_4( product_notemporary(MatrixXcd(s,s)) );\n    TEST_SET_BUT_UNUSED_VARIABLE(s)\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/product_selfadjoint.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\ntemplate<typename MatrixType> void product_selfadjoint(const MatrixType& m)\n{\n  typedef typename MatrixType::Scalar Scalar;\n  typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;\n  typedef Matrix<Scalar, 1, MatrixType::RowsAtCompileTime> RowVectorType;\n\n  typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, Dynamic, RowMajor> RhsMatrixType;\n\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  MatrixType m1 = MatrixType::Random(rows, cols),\n             m2 = MatrixType::Random(rows, cols),\n             m3;\n  VectorType v1 = VectorType::Random(rows),\n             v2 = VectorType::Random(rows),\n             v3(rows);\n  RowVectorType r1 = RowVectorType::Random(rows),\n                r2 = RowVectorType::Random(rows);\n  RhsMatrixType m4 = RhsMatrixType::Random(rows,10);\n\n  Scalar s1 = internal::random<Scalar>(),\n         s2 = internal::random<Scalar>(),\n         s3 = internal::random<Scalar>();\n\n  m1 = (m1.adjoint() + m1).eval();\n\n  // rank2 update\n  m2 = m1.template triangularView<Lower>();\n  m2.template selfadjointView<Lower>().rankUpdate(v1,v2);\n  VERIFY_IS_APPROX(m2, (m1 + v1 * v2.adjoint()+ v2 * v1.adjoint()).template triangularView<Lower>().toDenseMatrix());\n\n  m2 = m1.template triangularView<Upper>();\n  m2.template selfadjointView<Upper>().rankUpdate(-v1,s2*v2,s3);\n  VERIFY_IS_APPROX(m2, (m1 + (s3*(-v1)*(s2*v2).adjoint()+numext::conj(s3)*(s2*v2)*(-v1).adjoint())).template triangularView<Upper>().toDenseMatrix());\n\n  m2 = m1.template triangularView<Upper>();\n  m2.template selfadjointView<Upper>().rankUpdate(-s2*r1.adjoint(),r2.adjoint()*s3,s1);\n  VERIFY_IS_APPROX(m2, (m1 + s1*(-s2*r1.adjoint())*(r2.adjoint()*s3).adjoint() + numext::conj(s1)*(r2.adjoint()*s3) * (-s2*r1.adjoint()).adjoint()).template triangularView<Upper>().toDenseMatrix());\n\n  if (rows>1)\n  {\n    m2 = m1.template triangularView<Lower>();\n    m2.block(1,1,rows-1,cols-1).template selfadjointView<Lower>().rankUpdate(v1.tail(rows-1),v2.head(cols-1));\n    m3 = m1;\n    m3.block(1,1,rows-1,cols-1) += v1.tail(rows-1) * v2.head(cols-1).adjoint()+ v2.head(cols-1) * v1.tail(rows-1).adjoint();\n    VERIFY_IS_APPROX(m2, m3.template triangularView<Lower>().toDenseMatrix());\n  }\n}\n\nEIGEN_DECLARE_TEST(product_selfadjoint)\n{\n  int s = 0;\n  for(int i = 0; i < g_repeat ; i++) {\n    CALL_SUBTEST_1( product_selfadjoint(Matrix<float, 1, 1>()) );\n    CALL_SUBTEST_2( product_selfadjoint(Matrix<float, 2, 2>()) );\n    CALL_SUBTEST_3( product_selfadjoint(Matrix3d()) );\n    \n    s = internal::random<int>(1,EIGEN_TEST_MAX_SIZE/2);\n    CALL_SUBTEST_4( product_selfadjoint(MatrixXcf(s, s)) );\n    TEST_SET_BUT_UNUSED_VARIABLE(s)\n    \n    s = internal::random<int>(1,EIGEN_TEST_MAX_SIZE/2);\n    CALL_SUBTEST_5( product_selfadjoint(MatrixXcd(s,s)) );\n    TEST_SET_BUT_UNUSED_VARIABLE(s)\n    \n    s = internal::random<int>(1,EIGEN_TEST_MAX_SIZE);\n    CALL_SUBTEST_6( product_selfadjoint(MatrixXd(s,s)) );\n    TEST_SET_BUT_UNUSED_VARIABLE(s)\n    \n    s = internal::random<int>(1,EIGEN_TEST_MAX_SIZE);\n    CALL_SUBTEST_7( product_selfadjoint(Matrix<float,Dynamic,Dynamic,RowMajor>(s,s)) );\n    TEST_SET_BUT_UNUSED_VARIABLE(s)\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/product_small.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_NO_STATIC_ASSERT\n#include \"product.h\"\n#include <Eigen/LU>\n\n// regression test for bug 447\ntemplate<int>\nvoid product1x1()\n{\n  Matrix<float,1,3> matAstatic;\n  Matrix<float,3,1> matBstatic;\n  matAstatic.setRandom();\n  matBstatic.setRandom();\n  VERIFY_IS_APPROX( (matAstatic * matBstatic).coeff(0,0), \n                    matAstatic.cwiseProduct(matBstatic.transpose()).sum() );\n\n  MatrixXf matAdynamic(1,3);\n  MatrixXf matBdynamic(3,1);\n  matAdynamic.setRandom();\n  matBdynamic.setRandom();\n  VERIFY_IS_APPROX( (matAdynamic * matBdynamic).coeff(0,0), \n                    matAdynamic.cwiseProduct(matBdynamic.transpose()).sum() );\n}\n\ntemplate<typename TC, typename TA, typename TB>\nconst TC& ref_prod(TC &C, const TA &A, const TB &B)\n{\n  for(Index i=0;i<C.rows();++i)\n    for(Index j=0;j<C.cols();++j)\n      for(Index k=0;k<A.cols();++k)\n        C.coeffRef(i,j) += A.coeff(i,k) * B.coeff(k,j);\n  return C;\n}\n\ntemplate<typename T, int Rows, int Cols, int Depth, int OC, int OA, int OB>\ntypename internal::enable_if<! ( (Rows ==1&&Depth!=1&&OA==ColMajor)\n                              || (Depth==1&&Rows !=1&&OA==RowMajor)\n                              || (Cols ==1&&Depth!=1&&OB==RowMajor)\n                              || (Depth==1&&Cols !=1&&OB==ColMajor)\n                              || (Rows ==1&&Cols !=1&&OC==ColMajor)\n                              || (Cols ==1&&Rows !=1&&OC==RowMajor)),void>::type\ntest_lazy_single(int rows, int cols, int depth)\n{\n  Matrix<T,Rows,Depth,OA> A(rows,depth); A.setRandom();\n  Matrix<T,Depth,Cols,OB> B(depth,cols); B.setRandom();\n  Matrix<T,Rows,Cols,OC>  C(rows,cols);  C.setRandom();\n  Matrix<T,Rows,Cols,OC>  D(C);\n  VERIFY_IS_APPROX(C+=A.lazyProduct(B), ref_prod(D,A,B));\n}\n\ntemplate<typename T, int Rows, int Cols, int Depth, int OC, int OA, int OB>\ntypename internal::enable_if<  ( (Rows ==1&&Depth!=1&&OA==ColMajor)\n                              || (Depth==1&&Rows !=1&&OA==RowMajor)\n                              || (Cols ==1&&Depth!=1&&OB==RowMajor)\n                              || (Depth==1&&Cols !=1&&OB==ColMajor)\n                              || (Rows ==1&&Cols !=1&&OC==ColMajor)\n                              || (Cols ==1&&Rows !=1&&OC==RowMajor)),void>::type\ntest_lazy_single(int, int, int)\n{\n}\n\ntemplate<typename T, int Rows, int Cols, int Depth>\nvoid test_lazy_all_layout(int rows=Rows, int cols=Cols, int depth=Depth)\n{\n  CALL_SUBTEST(( test_lazy_single<T,Rows,Cols,Depth,ColMajor,ColMajor,ColMajor>(rows,cols,depth) ));\n  CALL_SUBTEST(( test_lazy_single<T,Rows,Cols,Depth,RowMajor,ColMajor,ColMajor>(rows,cols,depth) ));\n  CALL_SUBTEST(( test_lazy_single<T,Rows,Cols,Depth,ColMajor,RowMajor,ColMajor>(rows,cols,depth) ));\n  CALL_SUBTEST(( test_lazy_single<T,Rows,Cols,Depth,RowMajor,RowMajor,ColMajor>(rows,cols,depth) ));\n  CALL_SUBTEST(( test_lazy_single<T,Rows,Cols,Depth,ColMajor,ColMajor,RowMajor>(rows,cols,depth) ));\n  CALL_SUBTEST(( test_lazy_single<T,Rows,Cols,Depth,RowMajor,ColMajor,RowMajor>(rows,cols,depth) ));\n  CALL_SUBTEST(( test_lazy_single<T,Rows,Cols,Depth,ColMajor,RowMajor,RowMajor>(rows,cols,depth) ));\n  CALL_SUBTEST(( test_lazy_single<T,Rows,Cols,Depth,RowMajor,RowMajor,RowMajor>(rows,cols,depth) ));\n}\n\ntemplate<typename T>\nvoid test_lazy_l1()\n{\n  int rows = internal::random<int>(1,12);\n  int cols = internal::random<int>(1,12);\n  int depth = internal::random<int>(1,12);\n\n  // Inner\n  CALL_SUBTEST(( test_lazy_all_layout<T,1,1,1>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,1,1,2>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,1,1,3>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,1,1,8>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,1,1,9>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,1,1,-1>(1,1,depth) ));\n\n  // Outer\n  CALL_SUBTEST(( test_lazy_all_layout<T,2,1,1>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,1,2,1>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,2,2,1>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,3,3,1>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,4,4,1>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,4,8,1>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,4,-1,1>(4,cols) ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,7,-1,1>(7,cols) ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,-1,8,1>(rows) ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,-1,3,1>(rows) ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,-1,-1,1>(rows,cols) ));\n}\n\ntemplate<typename T>\nvoid test_lazy_l2()\n{\n  int rows = internal::random<int>(1,12);\n  int cols = internal::random<int>(1,12);\n  int depth = internal::random<int>(1,12);\n\n  // mat-vec\n  CALL_SUBTEST(( test_lazy_all_layout<T,2,1,2>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,2,1,4>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,4,1,2>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,4,1,4>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,5,1,4>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,4,1,5>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,4,1,6>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,6,1,4>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,8,1,8>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,-1,1,4>(rows) ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,4,1,-1>(4,1,depth) ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,-1,1,-1>(rows,1,depth) ));\n\n  // vec-mat\n  CALL_SUBTEST(( test_lazy_all_layout<T,1,2,2>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,1,2,4>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,1,4,2>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,1,4,4>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,1,5,4>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,1,4,5>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,1,4,6>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,1,6,4>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,1,8,8>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,1,-1, 4>(1,cols) ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,1, 4,-1>(1,4,depth) ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,1,-1,-1>(1,cols,depth) ));\n}\n\ntemplate<typename T>\nvoid test_lazy_l3()\n{\n  int rows = internal::random<int>(1,12);\n  int cols = internal::random<int>(1,12);\n  int depth = internal::random<int>(1,12);\n  // mat-mat\n  CALL_SUBTEST(( test_lazy_all_layout<T,2,4,2>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,2,6,4>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,4,3,2>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,4,8,4>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,5,6,4>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,4,2,5>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,4,7,6>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,6,8,4>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,8,3,8>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,-1,6,4>(rows) ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,4,3,-1>(4,3,depth) ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,-1,6,-1>(rows,6,depth) ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,8,2,2>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,5,2,4>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,4,4,2>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,8,4,4>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,6,5,4>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,4,4,5>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,3,4,6>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,2,6,4>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,7,8,8>() ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,8,-1, 4>(8,cols) ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,3, 4,-1>(3,4,depth) ));\n  CALL_SUBTEST(( test_lazy_all_layout<T,4,-1,-1>(4,cols,depth) ));\n}\n\ntemplate<typename T,int N,int M,int K>\nvoid test_linear_but_not_vectorizable()\n{\n  // Check tricky cases for which the result of the product is a vector and thus must exhibit the LinearBit flag,\n  // but is not vectorizable along the linear dimension.\n  Index n = N==Dynamic ? internal::random<Index>(1,32) : N;\n  Index m = M==Dynamic ? internal::random<Index>(1,32) : M;\n  Index k = K==Dynamic ? internal::random<Index>(1,32) : K;\n\n  {\n    Matrix<T,N,M+1> A; A.setRandom(n,m+1);\n    Matrix<T,M*2,K> B; B.setRandom(m*2,k);\n    Matrix<T,1,K> C;\n    Matrix<T,1,K> R;\n\n    C.noalias() = A.template topLeftCorner<1,M>() * (B.template topRows<M>()+B.template bottomRows<M>());\n    R.noalias() = A.template topLeftCorner<1,M>() * (B.template topRows<M>()+B.template bottomRows<M>()).eval();\n    VERIFY_IS_APPROX(C,R);\n  }\n\n  {\n    Matrix<T,M+1,N,RowMajor> A; A.setRandom(m+1,n);\n    Matrix<T,K,M*2,RowMajor> B; B.setRandom(k,m*2);\n    Matrix<T,K,1> C;\n    Matrix<T,K,1> R;\n\n    C.noalias() = (B.template leftCols<M>()+B.template rightCols<M>())        * A.template topLeftCorner<M,1>();\n    R.noalias() = (B.template leftCols<M>()+B.template rightCols<M>()).eval() * A.template topLeftCorner<M,1>();\n    VERIFY_IS_APPROX(C,R);\n  }\n}\n\ntemplate<int Rows>\nvoid bug_1311()\n{\n  Matrix< double, Rows, 2 > A;  A.setRandom();\n  Vector2d b = Vector2d::Random() ;\n  Matrix<double,Rows,1> res;\n  res.noalias() = 1. * (A * b);\n  VERIFY_IS_APPROX(res, A*b);\n  res.noalias() = 1.*A * b;\n  VERIFY_IS_APPROX(res, A*b);\n  res.noalias() = (1.*A).lazyProduct(b);\n  VERIFY_IS_APPROX(res, A*b);\n  res.noalias() = (1.*A).lazyProduct(1.*b);\n  VERIFY_IS_APPROX(res, A*b);\n  res.noalias() = (A).lazyProduct(1.*b);\n  VERIFY_IS_APPROX(res, A*b);\n}\n\ntemplate<int>\nvoid product_small_regressions()\n{\n  {\n    // test compilation of (outer_product) * vector\n    Vector3f v = Vector3f::Random();\n    VERIFY_IS_APPROX( (v * v.transpose()) * v, (v * v.transpose()).eval() * v);\n  }\n  \n  {\n    // regression test for pull-request #93\n    Eigen::Matrix<double, 1, 1> A;  A.setRandom();\n    Eigen::Matrix<double, 18, 1> B; B.setRandom();\n    Eigen::Matrix<double, 1, 18> C; C.setRandom();\n    VERIFY_IS_APPROX(B * A.inverse(), B * A.inverse()[0]);\n    VERIFY_IS_APPROX(A.inverse() * C, A.inverse()[0] * C);\n  }\n\n  {\n    Eigen::Matrix<double, 10, 10> A, B, C;\n    A.setRandom();\n    C = A;\n    for(int k=0; k<79; ++k)\n      C = C * A;\n    B.noalias() = (((A*A)*(A*A))*((A*A)*(A*A))*((A*A)*(A*A))*((A*A)*(A*A))*((A*A)*(A*A)) * ((A*A)*(A*A))*((A*A)*(A*A))*((A*A)*(A*A))*((A*A)*(A*A))*((A*A)*(A*A)))\n                * (((A*A)*(A*A))*((A*A)*(A*A))*((A*A)*(A*A))*((A*A)*(A*A))*((A*A)*(A*A)) * ((A*A)*(A*A))*((A*A)*(A*A))*((A*A)*(A*A))*((A*A)*(A*A))*((A*A)*(A*A)));\n    VERIFY_IS_APPROX(B,C);\n  }\n}\n\nEIGEN_DECLARE_TEST(product_small)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( product(Matrix<float, 3, 2>()) );\n    CALL_SUBTEST_2( product(Matrix<int, 3, 17>()) );\n    CALL_SUBTEST_8( product(Matrix<double, 3, 17>()) );\n    CALL_SUBTEST_3( product(Matrix3d()) );\n    CALL_SUBTEST_4( product(Matrix4d()) );\n    CALL_SUBTEST_5( product(Matrix4f()) );\n    CALL_SUBTEST_6( product1x1<0>() );\n\n    CALL_SUBTEST_11( test_lazy_l1<float>() );\n    CALL_SUBTEST_12( test_lazy_l2<float>() );\n    CALL_SUBTEST_13( test_lazy_l3<float>() );\n\n    CALL_SUBTEST_21( test_lazy_l1<double>() );\n    CALL_SUBTEST_22( test_lazy_l2<double>() );\n    CALL_SUBTEST_23( test_lazy_l3<double>() );\n\n    CALL_SUBTEST_31( test_lazy_l1<std::complex<float> >() );\n    CALL_SUBTEST_32( test_lazy_l2<std::complex<float> >() );\n    CALL_SUBTEST_33( test_lazy_l3<std::complex<float> >() );\n\n    CALL_SUBTEST_41( test_lazy_l1<std::complex<double> >() );\n    CALL_SUBTEST_42( test_lazy_l2<std::complex<double> >() );\n    CALL_SUBTEST_43( test_lazy_l3<std::complex<double> >() );\n\n    CALL_SUBTEST_7(( test_linear_but_not_vectorizable<float,2,1,Dynamic>() ));\n    CALL_SUBTEST_7(( test_linear_but_not_vectorizable<float,3,1,Dynamic>() ));\n    CALL_SUBTEST_7(( test_linear_but_not_vectorizable<float,2,1,16>() ));\n\n    CALL_SUBTEST_6( bug_1311<3>() );\n    CALL_SUBTEST_6( bug_1311<5>() );\n  }\n\n  CALL_SUBTEST_6( product_small_regressions<0>() );\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/product_symm.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\ntemplate<typename Scalar, int Size, int OtherSize> void symm(int size = Size, int othersize = OtherSize)\n{\n  typedef Matrix<Scalar, Size, Size> MatrixType;\n  typedef Matrix<Scalar, Size, OtherSize> Rhs1;\n  typedef Matrix<Scalar, OtherSize, Size> Rhs2;\n  enum { order = OtherSize==1 ? 0 : RowMajor };\n  typedef Matrix<Scalar, Size, OtherSize,order> Rhs3;\n\n  Index rows = size;\n  Index cols = size;\n\n  MatrixType m1 = MatrixType::Random(rows, cols),\n             m2 = MatrixType::Random(rows, cols), m3;\n\n  m1 = (m1+m1.adjoint()).eval();\n\n  Rhs1 rhs1 = Rhs1::Random(cols, othersize), rhs12(cols, othersize), rhs13(cols, othersize);\n  Rhs2 rhs2 = Rhs2::Random(othersize, rows), rhs22(othersize, rows), rhs23(othersize, rows);\n  Rhs3 rhs3 = Rhs3::Random(cols, othersize), rhs32(cols, othersize), rhs33(cols, othersize);\n\n  Scalar s1 = internal::random<Scalar>(),\n         s2 = internal::random<Scalar>();\n\n  m2 = m1.template triangularView<Lower>();\n  m3 = m2.template selfadjointView<Lower>();\n  VERIFY_IS_EQUAL(m1, m3);\n  VERIFY_IS_APPROX(rhs12 = (s1*m2).template selfadjointView<Lower>() * (s2*rhs1),\n                   rhs13 = (s1*m1) * (s2*rhs1));\n\n  VERIFY_IS_APPROX(rhs12 = (s1*m2).transpose().template selfadjointView<Upper>() * (s2*rhs1),\n                   rhs13 = (s1*m1.transpose()) * (s2*rhs1));\n\n  VERIFY_IS_APPROX(rhs12 = (s1*m2).template selfadjointView<Lower>().transpose() * (s2*rhs1),\n                   rhs13 = (s1*m1.transpose()) * (s2*rhs1));\n\n  VERIFY_IS_APPROX(rhs12 = (s1*m2).conjugate().template selfadjointView<Lower>() * (s2*rhs1),\n                   rhs13 = (s1*m1).conjugate() * (s2*rhs1));\n\n  VERIFY_IS_APPROX(rhs12 = (s1*m2).template selfadjointView<Lower>().conjugate() * (s2*rhs1),\n                   rhs13 = (s1*m1).conjugate() * (s2*rhs1));\n\n  VERIFY_IS_APPROX(rhs12 = (s1*m2).adjoint().template selfadjointView<Upper>() * (s2*rhs1),\n                   rhs13 = (s1*m1).adjoint() * (s2*rhs1));\n\n  VERIFY_IS_APPROX(rhs12 = (s1*m2).template selfadjointView<Lower>().adjoint() * (s2*rhs1),\n                   rhs13 = (s1*m1).adjoint() * (s2*rhs1));\n\n  m2 = m1.template triangularView<Upper>(); rhs12.setRandom(); rhs13 = rhs12;\n  m3 = m2.template selfadjointView<Upper>();\n  VERIFY_IS_EQUAL(m1, m3);\n  VERIFY_IS_APPROX(rhs12 += (s1*m2).template selfadjointView<Upper>() * (s2*rhs1),\n                   rhs13 += (s1*m1) * (s2*rhs1));\n\n  m2 = m1.template triangularView<Lower>();\n  VERIFY_IS_APPROX(rhs12 = (s1*m2).template selfadjointView<Lower>() * (s2*rhs2.adjoint()),\n                   rhs13 = (s1*m1) * (s2*rhs2.adjoint()));\n\n  m2 = m1.template triangularView<Upper>();\n  VERIFY_IS_APPROX(rhs12 = (s1*m2).template selfadjointView<Upper>() * (s2*rhs2.adjoint()),\n                   rhs13 = (s1*m1) * (s2*rhs2.adjoint()));\n\n  m2 = m1.template triangularView<Upper>();\n  VERIFY_IS_APPROX(rhs12 = (s1*m2.adjoint()).template selfadjointView<Lower>() * (s2*rhs2.adjoint()),\n                   rhs13 = (s1*m1.adjoint()) * (s2*rhs2.adjoint()));\n\n  // test row major = <...>\n  m2 = m1.template triangularView<Lower>(); rhs32.setRandom(); rhs13 = rhs32;\n  VERIFY_IS_APPROX(rhs32.noalias() -= (s1*m2).template selfadjointView<Lower>() * (s2*rhs3),\n                   rhs13 -= (s1*m1) * (s2 * rhs3));\n\n  m2 = m1.template triangularView<Upper>();\n  VERIFY_IS_APPROX(rhs32.noalias() = (s1*m2.adjoint()).template selfadjointView<Lower>() * (s2*rhs3).conjugate(),\n                   rhs13 = (s1*m1.adjoint()) * (s2*rhs3).conjugate());\n\n\n  m2 = m1.template triangularView<Upper>(); rhs13 = rhs12;\n  VERIFY_IS_APPROX(rhs12.noalias() += s1 * ((m2.adjoint()).template selfadjointView<Lower>() * (s2*rhs3).conjugate()),\n                   rhs13 += (s1*m1.adjoint()) * (s2*rhs3).conjugate());\n\n  m2 = m1.template triangularView<Lower>();\n  VERIFY_IS_APPROX(rhs22 = (rhs2) * (m2).template selfadjointView<Lower>(), rhs23 = (rhs2) * (m1));\n  VERIFY_IS_APPROX(rhs22 = (s2*rhs2) * (s1*m2).template selfadjointView<Lower>(), rhs23 = (s2*rhs2) * (s1*m1));\n\n  // destination with a non-default inner-stride\n  // see bug 1741\n  {\n    typedef Matrix<Scalar,Dynamic,Dynamic> MatrixX;\n    MatrixX buffer(2*cols,2*othersize);\n    Map<Rhs1,0,Stride<Dynamic,2> > map1(buffer.data(),cols,othersize,Stride<Dynamic,2>(2*rows,2));\n    buffer.setZero();\n    VERIFY_IS_APPROX( map1.noalias()  = (s1*m2).template selfadjointView<Lower>() * (s2*rhs1),\n                      rhs13 = (s1*m1) * (s2*rhs1));\n\n    Map<Rhs2,0,Stride<Dynamic,2> > map2(buffer.data(),rhs22.rows(),rhs22.cols(),Stride<Dynamic,2>(2*rhs22.outerStride(),2));\n    buffer.setZero();\n    VERIFY_IS_APPROX(map2 = (rhs2) * (m2).template selfadjointView<Lower>(), rhs23 = (rhs2) * (m1));\n  }\n}\n\nEIGEN_DECLARE_TEST(product_symm)\n{\n  for(int i = 0; i < g_repeat ; i++)\n  {\n    CALL_SUBTEST_1(( symm<float,Dynamic,Dynamic>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE),internal::random<int>(1,EIGEN_TEST_MAX_SIZE)) ));\n    CALL_SUBTEST_2(( symm<double,Dynamic,Dynamic>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE),internal::random<int>(1,EIGEN_TEST_MAX_SIZE)) ));\n    CALL_SUBTEST_3(( symm<std::complex<float>,Dynamic,Dynamic>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE/2),internal::random<int>(1,EIGEN_TEST_MAX_SIZE/2)) ));\n    CALL_SUBTEST_4(( symm<std::complex<double>,Dynamic,Dynamic>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE/2),internal::random<int>(1,EIGEN_TEST_MAX_SIZE/2)) ));\n\n    CALL_SUBTEST_5(( symm<float,Dynamic,1>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE)) ));\n    CALL_SUBTEST_6(( symm<double,Dynamic,1>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE)) ));\n    CALL_SUBTEST_7(( symm<std::complex<float>,Dynamic,1>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE)) ));\n    CALL_SUBTEST_8(( symm<std::complex<double>,Dynamic,1>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE)) ));\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/product_syrk.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\ntemplate<typename MatrixType> void syrk(const MatrixType& m)\n{\n  typedef typename MatrixType::Scalar Scalar;\n  typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::ColsAtCompileTime, RowMajor> RMatrixType;\n  typedef Matrix<Scalar, MatrixType::ColsAtCompileTime, Dynamic> Rhs1;\n  typedef Matrix<Scalar, Dynamic, MatrixType::RowsAtCompileTime> Rhs2;\n  typedef Matrix<Scalar, MatrixType::ColsAtCompileTime, Dynamic,RowMajor> Rhs3;\n\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  MatrixType m1 = MatrixType::Random(rows, cols),\n             m2 = MatrixType::Random(rows, cols),\n             m3 = MatrixType::Random(rows, cols);\n  RMatrixType rm2 = MatrixType::Random(rows, cols);\n\n  Rhs1 rhs1 = Rhs1::Random(internal::random<int>(1,320), cols); Rhs1 rhs11 = Rhs1::Random(rhs1.rows(), cols);\n  Rhs2 rhs2 = Rhs2::Random(rows, internal::random<int>(1,320)); Rhs2 rhs22 = Rhs2::Random(rows, rhs2.cols());\n  Rhs3 rhs3 = Rhs3::Random(internal::random<int>(1,320), rows);\n\n  Scalar s1 = internal::random<Scalar>();\n  \n  Index c = internal::random<Index>(0,cols-1);\n\n  m2.setZero();\n  VERIFY_IS_APPROX((m2.template selfadjointView<Lower>().rankUpdate(rhs2,s1)._expression()),\n                   ((s1 * rhs2 * rhs2.adjoint()).eval().template triangularView<Lower>().toDenseMatrix()));\n  m2.setZero();\n  VERIFY_IS_APPROX(((m2.template triangularView<Lower>() += s1 * rhs2  * rhs22.adjoint()).nestedExpression()),\n                   ((s1 * rhs2 * rhs22.adjoint()).eval().template triangularView<Lower>().toDenseMatrix()));\n\n  \n  m2.setZero();\n  VERIFY_IS_APPROX(m2.template selfadjointView<Upper>().rankUpdate(rhs2,s1)._expression(),\n                   (s1 * rhs2 * rhs2.adjoint()).eval().template triangularView<Upper>().toDenseMatrix());\n  m2.setZero();\n  VERIFY_IS_APPROX((m2.template triangularView<Upper>() += s1 * rhs22 * rhs2.adjoint()).nestedExpression(),\n                   (s1 * rhs22 * rhs2.adjoint()).eval().template triangularView<Upper>().toDenseMatrix());\n\n  \n  m2.setZero();\n  VERIFY_IS_APPROX(m2.template selfadjointView<Lower>().rankUpdate(rhs1.adjoint(),s1)._expression(),\n                   (s1 * rhs1.adjoint() * rhs1).eval().template triangularView<Lower>().toDenseMatrix());\n  m2.setZero();\n  VERIFY_IS_APPROX((m2.template triangularView<Lower>() += s1 * rhs11.adjoint() * rhs1).nestedExpression(),\n                   (s1 * rhs11.adjoint() * rhs1).eval().template triangularView<Lower>().toDenseMatrix());\n  \n  \n  m2.setZero();\n  VERIFY_IS_APPROX(m2.template selfadjointView<Upper>().rankUpdate(rhs1.adjoint(),s1)._expression(),\n                   (s1 * rhs1.adjoint() * rhs1).eval().template triangularView<Upper>().toDenseMatrix());\n  VERIFY_IS_APPROX((m2.template triangularView<Upper>() = s1 * rhs1.adjoint() * rhs11).nestedExpression(),\n                   (s1 * rhs1.adjoint() * rhs11).eval().template triangularView<Upper>().toDenseMatrix());\n\n  \n  m2.setZero();\n  VERIFY_IS_APPROX(m2.template selfadjointView<Lower>().rankUpdate(rhs3.adjoint(),s1)._expression(),\n                   (s1 * rhs3.adjoint() * rhs3).eval().template triangularView<Lower>().toDenseMatrix());\n\n  m2.setZero();\n  VERIFY_IS_APPROX(m2.template selfadjointView<Upper>().rankUpdate(rhs3.adjoint(),s1)._expression(),\n                   (s1 * rhs3.adjoint() * rhs3).eval().template triangularView<Upper>().toDenseMatrix());\n                   \n  m2.setZero();\n  VERIFY_IS_APPROX((m2.template selfadjointView<Lower>().rankUpdate(m1.col(c),s1)._expression()),\n                   ((s1 * m1.col(c) * m1.col(c).adjoint()).eval().template triangularView<Lower>().toDenseMatrix()));\n                   \n  m2.setZero();\n  VERIFY_IS_APPROX((m2.template selfadjointView<Upper>().rankUpdate(m1.col(c),s1)._expression()),\n                   ((s1 * m1.col(c) * m1.col(c).adjoint()).eval().template triangularView<Upper>().toDenseMatrix()));\n  rm2.setZero();\n  VERIFY_IS_APPROX((rm2.template selfadjointView<Upper>().rankUpdate(m1.col(c),s1)._expression()),\n                   ((s1 * m1.col(c) * m1.col(c).adjoint()).eval().template triangularView<Upper>().toDenseMatrix()));\n  m2.setZero();\n  VERIFY_IS_APPROX((m2.template triangularView<Upper>() += s1 * m3.col(c) * m1.col(c).adjoint()).nestedExpression(),\n                   ((s1 * m3.col(c) * m1.col(c).adjoint()).eval().template triangularView<Upper>().toDenseMatrix()));\n  rm2.setZero();\n  VERIFY_IS_APPROX((rm2.template triangularView<Upper>() += s1 * m1.col(c) * m3.col(c).adjoint()).nestedExpression(),\n                   ((s1 * m1.col(c) * m3.col(c).adjoint()).eval().template triangularView<Upper>().toDenseMatrix()));\n  \n  m2.setZero();\n  VERIFY_IS_APPROX((m2.template selfadjointView<Lower>().rankUpdate(m1.col(c).conjugate(),s1)._expression()),\n                   ((s1 * m1.col(c).conjugate() * m1.col(c).conjugate().adjoint()).eval().template triangularView<Lower>().toDenseMatrix()));\n                   \n  m2.setZero();\n  VERIFY_IS_APPROX((m2.template selfadjointView<Upper>().rankUpdate(m1.col(c).conjugate(),s1)._expression()),\n                   ((s1 * m1.col(c).conjugate() * m1.col(c).conjugate().adjoint()).eval().template triangularView<Upper>().toDenseMatrix()));\n  \n  \n  m2.setZero();\n  VERIFY_IS_APPROX((m2.template selfadjointView<Lower>().rankUpdate(m1.row(c),s1)._expression()),\n                   ((s1 * m1.row(c).transpose() * m1.row(c).transpose().adjoint()).eval().template triangularView<Lower>().toDenseMatrix()));\n  rm2.setZero();\n  VERIFY_IS_APPROX((rm2.template selfadjointView<Lower>().rankUpdate(m1.row(c),s1)._expression()),\n                   ((s1 * m1.row(c).transpose() * m1.row(c).transpose().adjoint()).eval().template triangularView<Lower>().toDenseMatrix()));\n  m2.setZero();\n  VERIFY_IS_APPROX((m2.template triangularView<Lower>() += s1 * m3.row(c).transpose() * m1.row(c).transpose().adjoint()).nestedExpression(),\n                   ((s1 * m3.row(c).transpose() * m1.row(c).transpose().adjoint()).eval().template triangularView<Lower>().toDenseMatrix()));\n  rm2.setZero();\n  VERIFY_IS_APPROX((rm2.template triangularView<Lower>() += s1 * m3.row(c).transpose() * m1.row(c).transpose().adjoint()).nestedExpression(),\n                   ((s1 * m3.row(c).transpose() * m1.row(c).transpose().adjoint()).eval().template triangularView<Lower>().toDenseMatrix()));\n  \n  \n  m2.setZero();\n  VERIFY_IS_APPROX((m2.template selfadjointView<Upper>().rankUpdate(m1.row(c).adjoint(),s1)._expression()),\n                   ((s1 * m1.row(c).adjoint() * m1.row(c).adjoint().adjoint()).eval().template triangularView<Upper>().toDenseMatrix()));\n\n  // destination with a non-default inner-stride\n  // see bug 1741\n  {\n    typedef Matrix<Scalar,Dynamic,Dynamic> MatrixX;\n    MatrixX buffer(2*rows,2*cols);\n    Map<MatrixType,0,Stride<Dynamic,2> > map1(buffer.data(),rows,cols,Stride<Dynamic,2>(2*rows,2));\n    buffer.setZero();\n    VERIFY_IS_APPROX((map1.template selfadjointView<Lower>().rankUpdate(rhs2,s1)._expression()),\n                      ((s1 * rhs2 * rhs2.adjoint()).eval().template triangularView<Lower>().toDenseMatrix()));\n  }\n}\n\nEIGEN_DECLARE_TEST(product_syrk)\n{\n  for(int i = 0; i < g_repeat ; i++)\n  {\n    int s;\n    s = internal::random<int>(1,EIGEN_TEST_MAX_SIZE);\n    CALL_SUBTEST_1( syrk(MatrixXf(s, s)) );\n    CALL_SUBTEST_2( syrk(MatrixXd(s, s)) );\n    TEST_SET_BUT_UNUSED_VARIABLE(s)\n    \n    s = internal::random<int>(1,EIGEN_TEST_MAX_SIZE/2);\n    CALL_SUBTEST_3( syrk(MatrixXcf(s, s)) );\n    CALL_SUBTEST_4( syrk(MatrixXcd(s, s)) );\n    TEST_SET_BUT_UNUSED_VARIABLE(s)\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/product_trmm.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\ntemplate<typename T>\nint get_random_size()\n{\n  const int factor = NumTraits<T>::ReadCost;\n  const int max_test_size = EIGEN_TEST_MAX_SIZE>2*factor ? EIGEN_TEST_MAX_SIZE/factor : EIGEN_TEST_MAX_SIZE;\n  return internal::random<int>(1,max_test_size);\n}\n\ntemplate<typename Scalar, int Mode, int TriOrder, int OtherOrder, int ResOrder, int OtherCols>\nvoid trmm(int rows=get_random_size<Scalar>(),\n          int cols=get_random_size<Scalar>(),\n          int otherCols = OtherCols==Dynamic?get_random_size<Scalar>():OtherCols)\n{\n  typedef Matrix<Scalar,Dynamic,Dynamic,TriOrder> TriMatrix;\n  typedef Matrix<Scalar,Dynamic,OtherCols,OtherCols==1?ColMajor:OtherOrder> OnTheRight;\n  typedef Matrix<Scalar,OtherCols,Dynamic,OtherCols==1?RowMajor:OtherOrder> OnTheLeft;\n  \n  typedef Matrix<Scalar,Dynamic,OtherCols,OtherCols==1?ColMajor:ResOrder> ResXS;\n  typedef Matrix<Scalar,OtherCols,Dynamic,OtherCols==1?RowMajor:ResOrder> ResSX;\n\n  TriMatrix  mat(rows,cols), tri(rows,cols), triTr(cols,rows), s1tri(rows,cols), s1triTr(cols,rows);\n  \n  OnTheRight  ge_right(cols,otherCols);\n  OnTheLeft   ge_left(otherCols,rows);\n  ResSX       ge_sx, ge_sx_save;\n  ResXS       ge_xs, ge_xs_save;\n\n  Scalar s1 = internal::random<Scalar>(),\n         s2 = internal::random<Scalar>();\n\n  mat.setRandom();\n  tri = mat.template triangularView<Mode>();\n  triTr = mat.transpose().template triangularView<Mode>();\n  s1tri = (s1*mat).template triangularView<Mode>();\n  s1triTr = (s1*mat).transpose().template triangularView<Mode>();\n  ge_right.setRandom();\n  ge_left.setRandom();\n\n  VERIFY_IS_APPROX( ge_xs = mat.template triangularView<Mode>() * ge_right, tri * ge_right);\n  VERIFY_IS_APPROX( ge_sx = ge_left * mat.template triangularView<Mode>(), ge_left * tri);\n  \n  VERIFY_IS_APPROX( ge_xs.noalias() = mat.template triangularView<Mode>() * ge_right, tri * ge_right);\n  VERIFY_IS_APPROX( ge_sx.noalias() = ge_left * mat.template triangularView<Mode>(), ge_left * tri);\n\n  if((Mode&UnitDiag)==0)\n    VERIFY_IS_APPROX( ge_xs.noalias() = (s1*mat.adjoint()).template triangularView<Mode>() * (s2*ge_left.transpose()), s1*triTr.conjugate() * (s2*ge_left.transpose()));\n  \n  VERIFY_IS_APPROX( ge_xs.noalias() = (s1*mat.transpose()).template triangularView<Mode>() * (s2*ge_left.transpose()), s1triTr * (s2*ge_left.transpose()));\n  VERIFY_IS_APPROX( ge_sx.noalias() = (s2*ge_left) * (s1*mat).template triangularView<Mode>(), (s2*ge_left)*s1tri);\n\n  VERIFY_IS_APPROX( ge_sx.noalias() = ge_right.transpose() * mat.adjoint().template triangularView<Mode>(), ge_right.transpose() * triTr.conjugate());\n  VERIFY_IS_APPROX( ge_sx.noalias() = ge_right.adjoint() * mat.adjoint().template triangularView<Mode>(), ge_right.adjoint() * triTr.conjugate());\n  \n  ge_xs_save = ge_xs;\n  if((Mode&UnitDiag)==0)\n    VERIFY_IS_APPROX( (ge_xs_save + s1*triTr.conjugate() * (s2*ge_left.adjoint())).eval(), ge_xs.noalias() += (s1*mat.adjoint()).template triangularView<Mode>() * (s2*ge_left.adjoint()) );\n  ge_xs_save = ge_xs;\n  VERIFY_IS_APPROX( (ge_xs_save + s1triTr * (s2*ge_left.adjoint())).eval(), ge_xs.noalias() += (s1*mat.transpose()).template triangularView<Mode>() * (s2*ge_left.adjoint()) );\n  ge_sx.setRandom();\n  ge_sx_save = ge_sx;\n  if((Mode&UnitDiag)==0)\n    VERIFY_IS_APPROX( ge_sx_save - (ge_right.adjoint() * (-s1 * triTr).conjugate()).eval(), ge_sx.noalias() -= (ge_right.adjoint() * (-s1 * mat).adjoint().template triangularView<Mode>()).eval());\n  \n  if((Mode&UnitDiag)==0)\n    VERIFY_IS_APPROX( ge_xs = (s1*mat).adjoint().template triangularView<Mode>() * ge_left.adjoint(), numext::conj(s1) * triTr.conjugate() * ge_left.adjoint());\n  VERIFY_IS_APPROX( ge_xs = (s1*mat).transpose().template triangularView<Mode>() * ge_left.adjoint(), s1triTr * ge_left.adjoint());\n\n  // TODO check with sub-matrix expressions ?\n\n  // destination with a non-default inner-stride\n  // see bug 1741\n  {\n    VERIFY_IS_APPROX( ge_xs.noalias() = mat.template triangularView<Mode>() * ge_right, tri * ge_right);\n    typedef Matrix<Scalar,Dynamic,Dynamic> MatrixX;\n    MatrixX buffer(2*ge_xs.rows(),2*ge_xs.cols());\n    Map<ResXS,0,Stride<Dynamic,2> > map1(buffer.data(),ge_xs.rows(),ge_xs.cols(),Stride<Dynamic,2>(2*ge_xs.outerStride(),2));\n    buffer.setZero();\n    VERIFY_IS_APPROX( map1.noalias() = mat.template triangularView<Mode>() * ge_right, tri * ge_right);\n  }\n}\n\ntemplate<typename Scalar, int Mode, int TriOrder>\nvoid trmv(int rows=get_random_size<Scalar>(), int cols=get_random_size<Scalar>())\n{\n  trmm<Scalar,Mode,TriOrder,ColMajor,ColMajor,1>(rows,cols,1);\n}\n\ntemplate<typename Scalar, int Mode, int TriOrder, int OtherOrder, int ResOrder>\nvoid trmm(int rows=get_random_size<Scalar>(), int cols=get_random_size<Scalar>(), int otherCols = get_random_size<Scalar>())\n{\n  trmm<Scalar,Mode,TriOrder,OtherOrder,ResOrder,Dynamic>(rows,cols,otherCols);\n}\n\n#define CALL_ALL_ORDERS(NB,SCALAR,MODE)                                             \\\n  EIGEN_CAT(CALL_SUBTEST_,NB)((trmm<SCALAR, MODE, ColMajor,ColMajor,ColMajor>()));  \\\n  EIGEN_CAT(CALL_SUBTEST_,NB)((trmm<SCALAR, MODE, ColMajor,ColMajor,RowMajor>()));  \\\n  EIGEN_CAT(CALL_SUBTEST_,NB)((trmm<SCALAR, MODE, ColMajor,RowMajor,ColMajor>()));  \\\n  EIGEN_CAT(CALL_SUBTEST_,NB)((trmm<SCALAR, MODE, ColMajor,RowMajor,RowMajor>()));  \\\n  EIGEN_CAT(CALL_SUBTEST_,NB)((trmm<SCALAR, MODE, RowMajor,ColMajor,ColMajor>()));  \\\n  EIGEN_CAT(CALL_SUBTEST_,NB)((trmm<SCALAR, MODE, RowMajor,ColMajor,RowMajor>()));  \\\n  EIGEN_CAT(CALL_SUBTEST_,NB)((trmm<SCALAR, MODE, RowMajor,RowMajor,ColMajor>()));  \\\n  EIGEN_CAT(CALL_SUBTEST_,NB)((trmm<SCALAR, MODE, RowMajor,RowMajor,RowMajor>()));  \\\n  \\\n  EIGEN_CAT(CALL_SUBTEST_1,NB)((trmv<SCALAR, MODE, ColMajor>()));                   \\\n  EIGEN_CAT(CALL_SUBTEST_1,NB)((trmv<SCALAR, MODE, RowMajor>()));\n\n  \n#define CALL_ALL(NB,SCALAR)                 \\\n  CALL_ALL_ORDERS(EIGEN_CAT(1,NB),SCALAR,Upper)          \\\n  CALL_ALL_ORDERS(EIGEN_CAT(2,NB),SCALAR,UnitUpper)      \\\n  CALL_ALL_ORDERS(EIGEN_CAT(3,NB),SCALAR,StrictlyUpper)  \\\n  CALL_ALL_ORDERS(EIGEN_CAT(1,NB),SCALAR,Lower)          \\\n  CALL_ALL_ORDERS(EIGEN_CAT(2,NB),SCALAR,UnitLower)      \\\n  CALL_ALL_ORDERS(EIGEN_CAT(3,NB),SCALAR,StrictlyLower)\n  \n\nEIGEN_DECLARE_TEST(product_trmm)\n{\n  for(int i = 0; i < g_repeat ; i++)\n  {\n    CALL_ALL(1,float);                //  EIGEN_SUFFIXES;11;111;21;121;31;131\n    CALL_ALL(2,double);               //  EIGEN_SUFFIXES;12;112;22;122;32;132\n    CALL_ALL(3,std::complex<float>);  //  EIGEN_SUFFIXES;13;113;23;123;33;133\n    CALL_ALL(4,std::complex<double>); //  EIGEN_SUFFIXES;14;114;24;124;34;134\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/product_trmv.cpp",
    "content": "// This file is triangularView of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\ntemplate<typename MatrixType> void trmv(const MatrixType& m)\n{\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;\n\n  RealScalar largerEps = 10*test_precision<RealScalar>();\n\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  MatrixType m1 = MatrixType::Random(rows, cols),\n             m3(rows, cols);\n  VectorType v1 = VectorType::Random(rows);\n\n  Scalar s1 = internal::random<Scalar>();\n\n  m1 = MatrixType::Random(rows, cols);\n\n  // check with a column-major matrix\n  m3 = m1.template triangularView<Eigen::Lower>();\n  VERIFY((m3 * v1).isApprox(m1.template triangularView<Eigen::Lower>() * v1, largerEps));\n  m3 = m1.template triangularView<Eigen::Upper>();\n  VERIFY((m3 * v1).isApprox(m1.template triangularView<Eigen::Upper>() * v1, largerEps));\n  m3 = m1.template triangularView<Eigen::UnitLower>();\n  VERIFY((m3 * v1).isApprox(m1.template triangularView<Eigen::UnitLower>() * v1, largerEps));\n  m3 = m1.template triangularView<Eigen::UnitUpper>();\n  VERIFY((m3 * v1).isApprox(m1.template triangularView<Eigen::UnitUpper>() * v1, largerEps));\n\n  // check conjugated and scalar multiple expressions (col-major)\n  m3 = m1.template triangularView<Eigen::Lower>();\n  VERIFY(((s1*m3).conjugate() * v1).isApprox((s1*m1).conjugate().template triangularView<Eigen::Lower>() * v1, largerEps));\n  m3 = m1.template triangularView<Eigen::Upper>();\n  VERIFY((m3.conjugate() * v1.conjugate()).isApprox(m1.conjugate().template triangularView<Eigen::Upper>() * v1.conjugate(), largerEps));\n\n  // check with a row-major matrix\n  m3 = m1.template triangularView<Eigen::Upper>();\n  VERIFY((m3.transpose() * v1).isApprox(m1.transpose().template triangularView<Eigen::Lower>() * v1, largerEps));\n  m3 = m1.template triangularView<Eigen::Lower>();\n  VERIFY((m3.transpose() * v1).isApprox(m1.transpose().template triangularView<Eigen::Upper>() * v1, largerEps));\n  m3 = m1.template triangularView<Eigen::UnitUpper>();\n  VERIFY((m3.transpose() * v1).isApprox(m1.transpose().template triangularView<Eigen::UnitLower>() * v1, largerEps));\n  m3 = m1.template triangularView<Eigen::UnitLower>();\n  VERIFY((m3.transpose() * v1).isApprox(m1.transpose().template triangularView<Eigen::UnitUpper>() * v1, largerEps));\n\n  // check conjugated and scalar multiple expressions (row-major)\n  m3 = m1.template triangularView<Eigen::Upper>();\n  VERIFY((m3.adjoint() * v1).isApprox(m1.adjoint().template triangularView<Eigen::Lower>() * v1, largerEps));\n  m3 = m1.template triangularView<Eigen::Lower>();\n  VERIFY((m3.adjoint() * (s1*v1.conjugate())).isApprox(m1.adjoint().template triangularView<Eigen::Upper>() * (s1*v1.conjugate()), largerEps));\n  m3 = m1.template triangularView<Eigen::UnitUpper>();\n\n  // check transposed cases:\n  m3 = m1.template triangularView<Eigen::Lower>();\n  VERIFY((v1.transpose() * m3).isApprox(v1.transpose() * m1.template triangularView<Eigen::Lower>(), largerEps));\n  VERIFY((v1.adjoint() * m3).isApprox(v1.adjoint() * m1.template triangularView<Eigen::Lower>(), largerEps));\n  VERIFY((v1.adjoint() * m3.adjoint()).isApprox(v1.adjoint() * m1.template triangularView<Eigen::Lower>().adjoint(), largerEps));\n\n  // TODO check with sub-matrices\n}\n\nEIGEN_DECLARE_TEST(product_trmv)\n{\n  int s = 0;\n  for(int i = 0; i < g_repeat ; i++) {\n    CALL_SUBTEST_1( trmv(Matrix<float, 1, 1>()) );\n    CALL_SUBTEST_2( trmv(Matrix<float, 2, 2>()) );\n    CALL_SUBTEST_3( trmv(Matrix3d()) );\n    \n    s = internal::random<int>(1,EIGEN_TEST_MAX_SIZE/2);\n    CALL_SUBTEST_4( trmv(MatrixXcf(s,s)) );\n    CALL_SUBTEST_5( trmv(MatrixXcd(s,s)) );\n    TEST_SET_BUT_UNUSED_VARIABLE(s)\n    \n    s = internal::random<int>(1,EIGEN_TEST_MAX_SIZE);\n    CALL_SUBTEST_6( trmv(Matrix<float,Dynamic,Dynamic,RowMajor>(s, s)) );\n    TEST_SET_BUT_UNUSED_VARIABLE(s)\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/product_trsolve.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#define VERIFY_TRSM(TRI,XB) { \\\n    (XB).setRandom(); ref = (XB); \\\n    (TRI).solveInPlace(XB); \\\n    VERIFY_IS_APPROX((TRI).toDenseMatrix() * (XB), ref); \\\n    (XB).setRandom(); ref = (XB); \\\n    (XB) = (TRI).solve(XB); \\\n    VERIFY_IS_APPROX((TRI).toDenseMatrix() * (XB), ref); \\\n  }\n\n#define VERIFY_TRSM_ONTHERIGHT(TRI,XB) { \\\n    (XB).setRandom(); ref = (XB); \\\n    (TRI).transpose().template solveInPlace<OnTheRight>(XB.transpose()); \\\n    VERIFY_IS_APPROX((XB).transpose() * (TRI).transpose().toDenseMatrix(), ref.transpose()); \\\n    (XB).setRandom(); ref = (XB); \\\n    (XB).transpose() = (TRI).transpose().template solve<OnTheRight>(XB.transpose()); \\\n    VERIFY_IS_APPROX((XB).transpose() * (TRI).transpose().toDenseMatrix(), ref.transpose()); \\\n  }\n\ntemplate<typename Scalar,int Size, int Cols> void trsolve(int size=Size,int cols=Cols)\n{\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n\n  Matrix<Scalar,Size,Size,ColMajor> cmLhs(size,size);\n  Matrix<Scalar,Size,Size,RowMajor> rmLhs(size,size);\n\n  enum {  colmajor = Size==1 ? RowMajor : ColMajor,\n          rowmajor = Cols==1 ? ColMajor : RowMajor };\n  Matrix<Scalar,Size,Cols,colmajor> cmRhs(size,cols);\n  Matrix<Scalar,Size,Cols,rowmajor> rmRhs(size,cols);\n  Matrix<Scalar,Dynamic,Dynamic,colmajor> ref(size,cols);\n\n  cmLhs.setRandom(); cmLhs *= static_cast<RealScalar>(0.1); cmLhs.diagonal().array() += static_cast<RealScalar>(1);\n  rmLhs.setRandom(); rmLhs *= static_cast<RealScalar>(0.1); rmLhs.diagonal().array() += static_cast<RealScalar>(1);\n\n  VERIFY_TRSM(cmLhs.conjugate().template triangularView<Lower>(), cmRhs);\n  VERIFY_TRSM(cmLhs.adjoint()  .template triangularView<Lower>(), cmRhs);\n  VERIFY_TRSM(cmLhs            .template triangularView<Upper>(), cmRhs);\n  VERIFY_TRSM(cmLhs            .template triangularView<Lower>(), rmRhs);\n  VERIFY_TRSM(cmLhs.conjugate().template triangularView<Upper>(), rmRhs);\n  VERIFY_TRSM(cmLhs.adjoint()  .template triangularView<Upper>(), rmRhs);\n\n  VERIFY_TRSM(cmLhs.conjugate().template triangularView<UnitLower>(), cmRhs);\n  VERIFY_TRSM(cmLhs            .template triangularView<UnitUpper>(), rmRhs);\n\n  VERIFY_TRSM(rmLhs            .template triangularView<Lower>(), cmRhs);\n  VERIFY_TRSM(rmLhs.conjugate().template triangularView<UnitUpper>(), rmRhs);\n\n\n  VERIFY_TRSM_ONTHERIGHT(cmLhs.conjugate().template triangularView<Lower>(), cmRhs);\n  VERIFY_TRSM_ONTHERIGHT(cmLhs            .template triangularView<Upper>(), cmRhs);\n  VERIFY_TRSM_ONTHERIGHT(cmLhs            .template triangularView<Lower>(), rmRhs);\n  VERIFY_TRSM_ONTHERIGHT(cmLhs.conjugate().template triangularView<Upper>(), rmRhs);\n\n  VERIFY_TRSM_ONTHERIGHT(cmLhs.conjugate().template triangularView<UnitLower>(), cmRhs);\n  VERIFY_TRSM_ONTHERIGHT(cmLhs            .template triangularView<UnitUpper>(), rmRhs);\n\n  VERIFY_TRSM_ONTHERIGHT(rmLhs            .template triangularView<Lower>(), cmRhs);\n  VERIFY_TRSM_ONTHERIGHT(rmLhs.conjugate().template triangularView<UnitUpper>(), rmRhs);\n\n  int c = internal::random<int>(0,cols-1);\n  VERIFY_TRSM(rmLhs.template triangularView<Lower>(), rmRhs.col(c));\n  VERIFY_TRSM(cmLhs.template triangularView<Lower>(), rmRhs.col(c));\n\n  // destination with a non-default inner-stride\n  // see bug 1741\n  {\n    typedef Matrix<Scalar,Dynamic,Dynamic> MatrixX;\n    MatrixX buffer(2*cmRhs.rows(),2*cmRhs.cols());\n    Map<Matrix<Scalar,Size,Cols,colmajor>,0,Stride<Dynamic,2> > map1(buffer.data(),cmRhs.rows(),cmRhs.cols(),Stride<Dynamic,2>(2*cmRhs.outerStride(),2));\n    Map<Matrix<Scalar,Size,Cols,rowmajor>,0,Stride<Dynamic,2> > map2(buffer.data(),rmRhs.rows(),rmRhs.cols(),Stride<Dynamic,2>(2*rmRhs.outerStride(),2));\n    buffer.setZero();\n    VERIFY_TRSM(cmLhs.conjugate().template triangularView<Lower>(), map1);\n    buffer.setZero();\n    VERIFY_TRSM(cmLhs            .template triangularView<Lower>(), map2);\n  }\n\n  if(Size==Dynamic)\n  {\n    cmLhs.resize(0,0);\n    cmRhs.resize(0,cmRhs.cols());\n    Matrix<Scalar,Size,Cols,colmajor> res = cmLhs.template triangularView<Lower>().solve(cmRhs);\n    VERIFY_IS_EQUAL(res.rows(),0);\n    VERIFY_IS_EQUAL(res.cols(),cmRhs.cols());\n    res = cmRhs;\n    cmLhs.template triangularView<Lower>().solveInPlace(res);\n    VERIFY_IS_EQUAL(res.rows(),0);\n    VERIFY_IS_EQUAL(res.cols(),cmRhs.cols());\n  }\n}\n\nEIGEN_DECLARE_TEST(product_trsolve)\n{\n  for(int i = 0; i < g_repeat ; i++)\n  {\n    // matrices\n    CALL_SUBTEST_1((trsolve<float,Dynamic,Dynamic>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE),internal::random<int>(1,EIGEN_TEST_MAX_SIZE))));\n    CALL_SUBTEST_2((trsolve<double,Dynamic,Dynamic>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE),internal::random<int>(1,EIGEN_TEST_MAX_SIZE))));\n    CALL_SUBTEST_3((trsolve<std::complex<float>,Dynamic,Dynamic>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE/2),internal::random<int>(1,EIGEN_TEST_MAX_SIZE/2))));\n    CALL_SUBTEST_4((trsolve<std::complex<double>,Dynamic,Dynamic>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE/2),internal::random<int>(1,EIGEN_TEST_MAX_SIZE/2))));\n\n    // vectors\n    CALL_SUBTEST_5((trsolve<float,Dynamic,1>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE))));\n    CALL_SUBTEST_6((trsolve<double,Dynamic,1>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE))));\n    CALL_SUBTEST_7((trsolve<std::complex<float>,Dynamic,1>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE))));\n    CALL_SUBTEST_8((trsolve<std::complex<double>,Dynamic,1>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE))));\n    \n    // meta-unrollers\n    CALL_SUBTEST_9((trsolve<float,4,1>()));\n    CALL_SUBTEST_10((trsolve<double,4,1>()));\n    CALL_SUBTEST_11((trsolve<std::complex<float>,4,1>()));\n    CALL_SUBTEST_12((trsolve<float,1,1>()));\n    CALL_SUBTEST_13((trsolve<float,1,2>()));\n    CALL_SUBTEST_14((trsolve<float,3,1>()));\n    \n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/qr.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <Eigen/QR>\n#include \"solverbase.h\"\n\ntemplate<typename MatrixType> void qr(const MatrixType& m)\n{\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  typedef typename MatrixType::Scalar Scalar;\n  typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime> MatrixQType;\n\n  MatrixType a = MatrixType::Random(rows,cols);\n  HouseholderQR<MatrixType> qrOfA(a);\n\n  MatrixQType q = qrOfA.householderQ();\n  VERIFY_IS_UNITARY(q);\n\n  MatrixType r = qrOfA.matrixQR().template triangularView<Upper>();\n  VERIFY_IS_APPROX(a, qrOfA.householderQ() * r);\n}\n\ntemplate<typename MatrixType, int Cols2> void qr_fixedsize()\n{\n  enum { Rows = MatrixType::RowsAtCompileTime, Cols = MatrixType::ColsAtCompileTime };\n  typedef typename MatrixType::Scalar Scalar;\n  Matrix<Scalar,Rows,Cols> m1 = Matrix<Scalar,Rows,Cols>::Random();\n  HouseholderQR<Matrix<Scalar,Rows,Cols> > qr(m1);\n\n  Matrix<Scalar,Rows,Cols> r = qr.matrixQR();\n  // FIXME need better way to construct trapezoid\n  for(int i = 0; i < Rows; i++) for(int j = 0; j < Cols; j++) if(i>j) r(i,j) = Scalar(0);\n\n  VERIFY_IS_APPROX(m1, qr.householderQ() * r);\n\n  check_solverbase<Matrix<Scalar,Cols,Cols2>, Matrix<Scalar,Rows,Cols2> >(m1, qr, Rows, Cols, Cols2);\n}\n\ntemplate<typename MatrixType> void qr_invertible()\n{\n  using std::log;\n  using std::abs;\n  using std::pow;\n  using std::max;\n  typedef typename NumTraits<typename MatrixType::Scalar>::Real RealScalar;\n  typedef typename MatrixType::Scalar Scalar;\n\n  STATIC_CHECK(( internal::is_same<typename HouseholderQR<MatrixType>::StorageIndex,int>::value ));\n\n  int size = internal::random<int>(10,50);\n\n  MatrixType m1(size, size), m2(size, size), m3(size, size);\n  m1 = MatrixType::Random(size,size);\n\n  if (internal::is_same<RealScalar,float>::value)\n  {\n    // let's build a matrix more stable to inverse\n    MatrixType a = MatrixType::Random(size,size*4);\n    m1 += a * a.adjoint();\n  }\n\n  HouseholderQR<MatrixType> qr(m1);\n\n  check_solverbase<MatrixType, MatrixType>(m1, qr, size, size, size);\n\n  // now construct a matrix with prescribed determinant\n  m1.setZero();\n  for(int i = 0; i < size; i++) m1(i,i) = internal::random<Scalar>();\n  RealScalar absdet = abs(m1.diagonal().prod());\n  m3 = qr.householderQ(); // get a unitary\n  m1 = m3 * m1 * m3;\n  qr.compute(m1);\n  VERIFY_IS_APPROX(log(absdet), qr.logAbsDeterminant());\n  // This test is tricky if the determinant becomes too small.\n  // Since we generate random numbers with magnitude range [0,1], the average determinant is 0.5^size\n  VERIFY_IS_MUCH_SMALLER_THAN( abs(absdet-qr.absDeterminant()), numext::maxi(RealScalar(pow(0.5,size)),numext::maxi<RealScalar>(abs(absdet),abs(qr.absDeterminant()))) );\n  \n}\n\ntemplate<typename MatrixType> void qr_verify_assert()\n{\n  MatrixType tmp;\n\n  HouseholderQR<MatrixType> qr;\n  VERIFY_RAISES_ASSERT(qr.matrixQR())\n  VERIFY_RAISES_ASSERT(qr.solve(tmp))\n  VERIFY_RAISES_ASSERT(qr.transpose().solve(tmp))\n  VERIFY_RAISES_ASSERT(qr.adjoint().solve(tmp))\n  VERIFY_RAISES_ASSERT(qr.householderQ())\n  VERIFY_RAISES_ASSERT(qr.absDeterminant())\n  VERIFY_RAISES_ASSERT(qr.logAbsDeterminant())\n}\n\nEIGEN_DECLARE_TEST(qr)\n{\n  for(int i = 0; i < g_repeat; i++) {\n   CALL_SUBTEST_1( qr(MatrixXf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE),internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n   CALL_SUBTEST_2( qr(MatrixXcd(internal::random<int>(1,EIGEN_TEST_MAX_SIZE/2),internal::random<int>(1,EIGEN_TEST_MAX_SIZE/2))) );\n   CALL_SUBTEST_3(( qr_fixedsize<Matrix<float,3,4>, 2 >() ));\n   CALL_SUBTEST_4(( qr_fixedsize<Matrix<double,6,2>, 4 >() ));\n   CALL_SUBTEST_5(( qr_fixedsize<Matrix<double,2,5>, 7 >() ));\n   CALL_SUBTEST_11( qr(Matrix<float,1,1>()) );\n  }\n\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( qr_invertible<MatrixXf>() );\n    CALL_SUBTEST_6( qr_invertible<MatrixXd>() );\n    CALL_SUBTEST_7( qr_invertible<MatrixXcf>() );\n    CALL_SUBTEST_8( qr_invertible<MatrixXcd>() );\n  }\n\n  CALL_SUBTEST_9(qr_verify_assert<Matrix3f>());\n  CALL_SUBTEST_10(qr_verify_assert<Matrix3d>());\n  CALL_SUBTEST_1(qr_verify_assert<MatrixXf>());\n  CALL_SUBTEST_6(qr_verify_assert<MatrixXd>());\n  CALL_SUBTEST_7(qr_verify_assert<MatrixXcf>());\n  CALL_SUBTEST_8(qr_verify_assert<MatrixXcd>());\n\n  // Test problem size constructors\n  CALL_SUBTEST_12(HouseholderQR<MatrixXf>(10, 20));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/qr_colpivoting.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <Eigen/QR>\n#include <Eigen/SVD>\n#include \"solverbase.h\"\n\ntemplate <typename MatrixType>\nvoid cod() {\n  STATIC_CHECK(( internal::is_same<typename CompleteOrthogonalDecomposition<MatrixType>::StorageIndex,int>::value ));\n\n  Index rows = internal::random<Index>(2, EIGEN_TEST_MAX_SIZE);\n  Index cols = internal::random<Index>(2, EIGEN_TEST_MAX_SIZE);\n  Index cols2 = internal::random<Index>(2, EIGEN_TEST_MAX_SIZE);\n  Index rank = internal::random<Index>(1, (std::min)(rows, cols) - 1);\n\n  typedef typename MatrixType::Scalar Scalar;\n  typedef Matrix<Scalar, MatrixType::RowsAtCompileTime,\n                 MatrixType::RowsAtCompileTime>\n      MatrixQType;\n  MatrixType matrix;\n  createRandomPIMatrixOfRank(rank, rows, cols, matrix);\n  CompleteOrthogonalDecomposition<MatrixType> cod(matrix);\n  VERIFY(rank == cod.rank());\n  VERIFY(cols - cod.rank() == cod.dimensionOfKernel());\n  VERIFY(!cod.isInjective());\n  VERIFY(!cod.isInvertible());\n  VERIFY(!cod.isSurjective());\n\n  MatrixQType q = cod.householderQ();\n  VERIFY_IS_UNITARY(q);\n\n  MatrixType z = cod.matrixZ();\n  VERIFY_IS_UNITARY(z);\n\n  MatrixType t;\n  t.setZero(rows, cols);\n  t.topLeftCorner(rank, rank) =\n      cod.matrixT().topLeftCorner(rank, rank).template triangularView<Upper>();\n\n  MatrixType c = q * t * z * cod.colsPermutation().inverse();\n  VERIFY_IS_APPROX(matrix, c);\n\n  check_solverbase<MatrixType, MatrixType>(matrix, cod, rows, cols, cols2);\n\n  // Verify that we get the same minimum-norm solution as the SVD.\n  MatrixType exact_solution = MatrixType::Random(cols, cols2);\n  MatrixType rhs = matrix * exact_solution;\n  MatrixType cod_solution = cod.solve(rhs);\n  JacobiSVD<MatrixType> svd(matrix, ComputeThinU | ComputeThinV);\n  MatrixType svd_solution = svd.solve(rhs);\n  VERIFY_IS_APPROX(cod_solution, svd_solution);\n\n  MatrixType pinv = cod.pseudoInverse();\n  VERIFY_IS_APPROX(cod_solution, pinv * rhs);\n}\n\ntemplate <typename MatrixType, int Cols2>\nvoid cod_fixedsize() {\n  enum {\n    Rows = MatrixType::RowsAtCompileTime,\n    Cols = MatrixType::ColsAtCompileTime\n  };\n  typedef typename MatrixType::Scalar Scalar;\n  typedef CompleteOrthogonalDecomposition<Matrix<Scalar, Rows, Cols> > COD;\n  int rank = internal::random<int>(1, (std::min)(int(Rows), int(Cols)) - 1);\n  Matrix<Scalar, Rows, Cols> matrix;\n  createRandomPIMatrixOfRank(rank, Rows, Cols, matrix);\n  COD cod(matrix);\n  VERIFY(rank == cod.rank());\n  VERIFY(Cols - cod.rank() == cod.dimensionOfKernel());\n  VERIFY(cod.isInjective() == (rank == Rows));\n  VERIFY(cod.isSurjective() == (rank == Cols));\n  VERIFY(cod.isInvertible() == (cod.isInjective() && cod.isSurjective()));\n\n  check_solverbase<Matrix<Scalar, Cols, Cols2>, Matrix<Scalar, Rows, Cols2> >(matrix, cod, Rows, Cols, Cols2);\n\n  // Verify that we get the same minimum-norm solution as the SVD.\n  Matrix<Scalar, Cols, Cols2> exact_solution;\n  exact_solution.setRandom(Cols, Cols2);\n  Matrix<Scalar, Rows, Cols2> rhs = matrix * exact_solution;\n  Matrix<Scalar, Cols, Cols2> cod_solution = cod.solve(rhs);\n  JacobiSVD<MatrixType> svd(matrix, ComputeFullU | ComputeFullV);\n  Matrix<Scalar, Cols, Cols2> svd_solution = svd.solve(rhs);\n  VERIFY_IS_APPROX(cod_solution, svd_solution);\n\n  typename Inverse<COD>::PlainObject pinv = cod.pseudoInverse();\n  VERIFY_IS_APPROX(cod_solution, pinv * rhs);\n}\n\ntemplate<typename MatrixType> void qr()\n{\n  using std::sqrt;\n\n  STATIC_CHECK(( internal::is_same<typename ColPivHouseholderQR<MatrixType>::StorageIndex,int>::value ));\n\n  Index rows = internal::random<Index>(2,EIGEN_TEST_MAX_SIZE), cols = internal::random<Index>(2,EIGEN_TEST_MAX_SIZE), cols2 = internal::random<Index>(2,EIGEN_TEST_MAX_SIZE);\n  Index rank = internal::random<Index>(1, (std::min)(rows, cols)-1);\n\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename MatrixType::RealScalar RealScalar;\n  typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime> MatrixQType;\n  MatrixType m1;\n  createRandomPIMatrixOfRank(rank,rows,cols,m1);\n  ColPivHouseholderQR<MatrixType> qr(m1);\n  VERIFY_IS_EQUAL(rank, qr.rank());\n  VERIFY_IS_EQUAL(cols - qr.rank(), qr.dimensionOfKernel());\n  VERIFY(!qr.isInjective());\n  VERIFY(!qr.isInvertible());\n  VERIFY(!qr.isSurjective());\n\n  MatrixQType q = qr.householderQ();\n  VERIFY_IS_UNITARY(q);\n\n  MatrixType r = qr.matrixQR().template triangularView<Upper>();\n  MatrixType c = q * r * qr.colsPermutation().inverse();\n  VERIFY_IS_APPROX(m1, c);\n\n  // Verify that the absolute value of the diagonal elements in R are\n  // non-increasing until they reach the singularity threshold.\n  RealScalar threshold =\n      sqrt(RealScalar(rows)) * numext::abs(r(0, 0)) * NumTraits<Scalar>::epsilon();\n  for (Index i = 0; i < (std::min)(rows, cols) - 1; ++i) {\n    RealScalar x = numext::abs(r(i, i));\n    RealScalar y = numext::abs(r(i + 1, i + 1));\n    if (x < threshold && y < threshold) continue;\n    if (!test_isApproxOrLessThan(y, x)) {\n      for (Index j = 0; j < (std::min)(rows, cols); ++j) {\n        std::cout << \"i = \" << j << \", |r_ii| = \" << numext::abs(r(j, j)) << std::endl;\n      }\n      std::cout << \"Failure at i=\" << i << \", rank=\" << rank\n                << \", threshold=\" << threshold << std::endl;\n    }\n    VERIFY_IS_APPROX_OR_LESS_THAN(y, x);\n  }\n\n  check_solverbase<MatrixType, MatrixType>(m1, qr, rows, cols, cols2);\n\n  {\n    MatrixType m2, m3;\n    Index size = rows;\n    do {\n      m1 = MatrixType::Random(size,size);\n      qr.compute(m1);\n    } while(!qr.isInvertible());\n    MatrixType m1_inv = qr.inverse();\n    m3 = m1 * MatrixType::Random(size,cols2);\n    m2 = qr.solve(m3);\n    VERIFY_IS_APPROX(m2, m1_inv*m3);\n  }\n}\n\ntemplate<typename MatrixType, int Cols2> void qr_fixedsize()\n{\n  using std::sqrt;\n  using std::abs;\n  enum { Rows = MatrixType::RowsAtCompileTime, Cols = MatrixType::ColsAtCompileTime };\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename MatrixType::RealScalar RealScalar;\n  int rank = internal::random<int>(1, (std::min)(int(Rows), int(Cols))-1);\n  Matrix<Scalar,Rows,Cols> m1;\n  createRandomPIMatrixOfRank(rank,Rows,Cols,m1);\n  ColPivHouseholderQR<Matrix<Scalar,Rows,Cols> > qr(m1);\n  VERIFY_IS_EQUAL(rank, qr.rank());\n  VERIFY_IS_EQUAL(Cols - qr.rank(), qr.dimensionOfKernel());\n  VERIFY_IS_EQUAL(qr.isInjective(), (rank == Rows));\n  VERIFY_IS_EQUAL(qr.isSurjective(), (rank == Cols));\n  VERIFY_IS_EQUAL(qr.isInvertible(), (qr.isInjective() && qr.isSurjective()));\n\n  Matrix<Scalar,Rows,Cols> r = qr.matrixQR().template triangularView<Upper>();\n  Matrix<Scalar,Rows,Cols> c = qr.householderQ() * r * qr.colsPermutation().inverse();\n  VERIFY_IS_APPROX(m1, c);\n\n  check_solverbase<Matrix<Scalar,Cols,Cols2>, Matrix<Scalar,Rows,Cols2> >(m1, qr, Rows, Cols, Cols2);\n\n  // Verify that the absolute value of the diagonal elements in R are\n  // non-increasing until they reache the singularity threshold.\n  RealScalar threshold =\n      sqrt(RealScalar(Rows)) * (std::abs)(r(0, 0)) * NumTraits<Scalar>::epsilon();\n  for (Index i = 0; i < (std::min)(int(Rows), int(Cols)) - 1; ++i) {\n    RealScalar x = numext::abs(r(i, i));\n    RealScalar y = numext::abs(r(i + 1, i + 1));\n    if (x < threshold && y < threshold) continue;\n    if (!test_isApproxOrLessThan(y, x)) {\n      for (Index j = 0; j < (std::min)(int(Rows), int(Cols)); ++j) {\n        std::cout << \"i = \" << j << \", |r_ii| = \" << numext::abs(r(j, j)) << std::endl;\n      }\n      std::cout << \"Failure at i=\" << i << \", rank=\" << rank\n                << \", threshold=\" << threshold << std::endl;\n    }\n    VERIFY_IS_APPROX_OR_LESS_THAN(y, x);\n  }\n}\n\n// This test is meant to verify that pivots are chosen such that\n// even for a graded matrix, the diagonal of R falls of roughly\n// monotonically until it reaches the threshold for singularity.\n// We use the so-called Kahan matrix, which is a famous counter-example\n// for rank-revealing QR. See\n// http://www.netlib.org/lapack/lawnspdf/lawn176.pdf\n// page 3 for more detail.\ntemplate<typename MatrixType> void qr_kahan_matrix()\n{\n  using std::sqrt;\n  using std::abs;\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename MatrixType::RealScalar RealScalar;\n\n  Index rows = 300, cols = rows;\n\n  MatrixType m1;\n  m1.setZero(rows,cols);\n  RealScalar s = std::pow(NumTraits<RealScalar>::epsilon(), 1.0 / rows);\n  RealScalar c = std::sqrt(1 - s*s);\n  RealScalar pow_s_i(1.0); // pow(s,i)\n  for (Index i = 0; i < rows; ++i) {\n    m1(i, i) = pow_s_i;\n    m1.row(i).tail(rows - i - 1) = -pow_s_i * c * MatrixType::Ones(1, rows - i - 1);\n    pow_s_i *= s;\n  }\n  m1 = (m1 + m1.transpose()).eval();\n  ColPivHouseholderQR<MatrixType> qr(m1);\n  MatrixType r = qr.matrixQR().template triangularView<Upper>();\n\n  RealScalar threshold =\n      std::sqrt(RealScalar(rows)) * numext::abs(r(0, 0)) * NumTraits<Scalar>::epsilon();\n  for (Index i = 0; i < (std::min)(rows, cols) - 1; ++i) {\n    RealScalar x = numext::abs(r(i, i));\n    RealScalar y = numext::abs(r(i + 1, i + 1));\n    if (x < threshold && y < threshold) continue;\n    if (!test_isApproxOrLessThan(y, x)) {\n      for (Index j = 0; j < (std::min)(rows, cols); ++j) {\n        std::cout << \"i = \" << j << \", |r_ii| = \" << numext::abs(r(j, j)) << std::endl;\n      }\n      std::cout << \"Failure at i=\" << i << \", rank=\" << qr.rank()\n                << \", threshold=\" << threshold << std::endl;\n    }\n    VERIFY_IS_APPROX_OR_LESS_THAN(y, x);\n  }\n}\n\ntemplate<typename MatrixType> void qr_invertible()\n{\n  using std::log;\n  using std::abs;\n  typedef typename NumTraits<typename MatrixType::Scalar>::Real RealScalar;\n  typedef typename MatrixType::Scalar Scalar;\n\n  int size = internal::random<int>(10,50);\n\n  MatrixType m1(size, size), m2(size, size), m3(size, size);\n  m1 = MatrixType::Random(size,size);\n\n  if (internal::is_same<RealScalar,float>::value)\n  {\n    // let's build a matrix more stable to inverse\n    MatrixType a = MatrixType::Random(size,size*2);\n    m1 += a * a.adjoint();\n  }\n\n  ColPivHouseholderQR<MatrixType> qr(m1);\n\n  check_solverbase<MatrixType, MatrixType>(m1, qr, size, size, size);\n\n  // now construct a matrix with prescribed determinant\n  m1.setZero();\n  for(int i = 0; i < size; i++) m1(i,i) = internal::random<Scalar>();\n  RealScalar absdet = abs(m1.diagonal().prod());\n  m3 = qr.householderQ(); // get a unitary\n  m1 = m3 * m1 * m3;\n  qr.compute(m1);\n  VERIFY_IS_APPROX(absdet, qr.absDeterminant());\n  VERIFY_IS_APPROX(log(absdet), qr.logAbsDeterminant());\n}\n\ntemplate<typename MatrixType> void qr_verify_assert()\n{\n  MatrixType tmp;\n\n  ColPivHouseholderQR<MatrixType> qr;\n  VERIFY_RAISES_ASSERT(qr.matrixQR())\n  VERIFY_RAISES_ASSERT(qr.solve(tmp))\n  VERIFY_RAISES_ASSERT(qr.transpose().solve(tmp))\n  VERIFY_RAISES_ASSERT(qr.adjoint().solve(tmp))\n  VERIFY_RAISES_ASSERT(qr.householderQ())\n  VERIFY_RAISES_ASSERT(qr.dimensionOfKernel())\n  VERIFY_RAISES_ASSERT(qr.isInjective())\n  VERIFY_RAISES_ASSERT(qr.isSurjective())\n  VERIFY_RAISES_ASSERT(qr.isInvertible())\n  VERIFY_RAISES_ASSERT(qr.inverse())\n  VERIFY_RAISES_ASSERT(qr.absDeterminant())\n  VERIFY_RAISES_ASSERT(qr.logAbsDeterminant())\n}\n\ntemplate<typename MatrixType> void cod_verify_assert()\n{\n  MatrixType tmp;\n\n  CompleteOrthogonalDecomposition<MatrixType> cod;\n  VERIFY_RAISES_ASSERT(cod.matrixQTZ())\n  VERIFY_RAISES_ASSERT(cod.solve(tmp))\n  VERIFY_RAISES_ASSERT(cod.transpose().solve(tmp))\n  VERIFY_RAISES_ASSERT(cod.adjoint().solve(tmp))\n  VERIFY_RAISES_ASSERT(cod.householderQ())\n  VERIFY_RAISES_ASSERT(cod.dimensionOfKernel())\n  VERIFY_RAISES_ASSERT(cod.isInjective())\n  VERIFY_RAISES_ASSERT(cod.isSurjective())\n  VERIFY_RAISES_ASSERT(cod.isInvertible())\n  VERIFY_RAISES_ASSERT(cod.pseudoInverse())\n  VERIFY_RAISES_ASSERT(cod.absDeterminant())\n  VERIFY_RAISES_ASSERT(cod.logAbsDeterminant())\n}\n\nEIGEN_DECLARE_TEST(qr_colpivoting)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( qr<MatrixXf>() );\n    CALL_SUBTEST_2( qr<MatrixXd>() );\n    CALL_SUBTEST_3( qr<MatrixXcd>() );\n    CALL_SUBTEST_4(( qr_fixedsize<Matrix<float,3,5>, 4 >() ));\n    CALL_SUBTEST_5(( qr_fixedsize<Matrix<double,6,2>, 3 >() ));\n    CALL_SUBTEST_5(( qr_fixedsize<Matrix<double,1,1>, 1 >() ));\n  }\n\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( cod<MatrixXf>() );\n    CALL_SUBTEST_2( cod<MatrixXd>() );\n    CALL_SUBTEST_3( cod<MatrixXcd>() );\n    CALL_SUBTEST_4(( cod_fixedsize<Matrix<float,3,5>, 4 >() ));\n    CALL_SUBTEST_5(( cod_fixedsize<Matrix<double,6,2>, 3 >() ));\n    CALL_SUBTEST_5(( cod_fixedsize<Matrix<double,1,1>, 1 >() ));\n  }\n\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( qr_invertible<MatrixXf>() );\n    CALL_SUBTEST_2( qr_invertible<MatrixXd>() );\n    CALL_SUBTEST_6( qr_invertible<MatrixXcf>() );\n    CALL_SUBTEST_3( qr_invertible<MatrixXcd>() );\n  }\n\n  CALL_SUBTEST_7(qr_verify_assert<Matrix3f>());\n  CALL_SUBTEST_8(qr_verify_assert<Matrix3d>());\n  CALL_SUBTEST_1(qr_verify_assert<MatrixXf>());\n  CALL_SUBTEST_2(qr_verify_assert<MatrixXd>());\n  CALL_SUBTEST_6(qr_verify_assert<MatrixXcf>());\n  CALL_SUBTEST_3(qr_verify_assert<MatrixXcd>());\n\n  CALL_SUBTEST_7(cod_verify_assert<Matrix3f>());\n  CALL_SUBTEST_8(cod_verify_assert<Matrix3d>());\n  CALL_SUBTEST_1(cod_verify_assert<MatrixXf>());\n  CALL_SUBTEST_2(cod_verify_assert<MatrixXd>());\n  CALL_SUBTEST_6(cod_verify_assert<MatrixXcf>());\n  CALL_SUBTEST_3(cod_verify_assert<MatrixXcd>());\n\n  // Test problem size constructors\n  CALL_SUBTEST_9(ColPivHouseholderQR<MatrixXf>(10, 20));\n\n  CALL_SUBTEST_1( qr_kahan_matrix<MatrixXf>() );\n  CALL_SUBTEST_2( qr_kahan_matrix<MatrixXd>() );\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/qr_fullpivoting.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <Eigen/QR>\n#include \"solverbase.h\"\n\ntemplate<typename MatrixType> void qr()\n{\n  STATIC_CHECK(( internal::is_same<typename FullPivHouseholderQR<MatrixType>::StorageIndex,int>::value ));\n\n  static const int Rows = MatrixType::RowsAtCompileTime, Cols = MatrixType::ColsAtCompileTime;\n  Index max_size = EIGEN_TEST_MAX_SIZE;\n  Index min_size = numext::maxi(1,EIGEN_TEST_MAX_SIZE/10);\n  Index rows  = Rows == Dynamic ? internal::random<Index>(min_size,max_size) : Rows,\n        cols  = Cols == Dynamic ? internal::random<Index>(min_size,max_size) : Cols,\n        cols2 = Cols == Dynamic ? internal::random<Index>(min_size,max_size) : Cols,\n        rank  = internal::random<Index>(1, (std::min)(rows, cols)-1);\n\n  typedef typename MatrixType::Scalar Scalar;\n  typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime> MatrixQType;\n  MatrixType m1;\n  createRandomPIMatrixOfRank(rank,rows,cols,m1);\n  FullPivHouseholderQR<MatrixType> qr(m1);\n  VERIFY_IS_EQUAL(rank, qr.rank());\n  VERIFY_IS_EQUAL(cols - qr.rank(), qr.dimensionOfKernel());\n  VERIFY(!qr.isInjective());\n  VERIFY(!qr.isInvertible());\n  VERIFY(!qr.isSurjective());\n\n  MatrixType r = qr.matrixQR();\n  \n  MatrixQType q = qr.matrixQ();\n  VERIFY_IS_UNITARY(q);\n  \n  // FIXME need better way to construct trapezoid\n  for(int i = 0; i < rows; i++) for(int j = 0; j < cols; j++) if(i>j) r(i,j) = Scalar(0);\n\n  MatrixType c = qr.matrixQ() * r * qr.colsPermutation().inverse();\n\n  VERIFY_IS_APPROX(m1, c);\n  \n  // stress the ReturnByValue mechanism\n  MatrixType tmp;\n  VERIFY_IS_APPROX(tmp.noalias() = qr.matrixQ() * r, (qr.matrixQ() * r).eval());\n  \n  check_solverbase<MatrixType, MatrixType>(m1, qr, rows, cols, cols2);\n\n  {\n    MatrixType m2, m3;\n    Index size = rows;\n    do {\n      m1 = MatrixType::Random(size,size);\n      qr.compute(m1);\n    } while(!qr.isInvertible());\n    MatrixType m1_inv = qr.inverse();\n    m3 = m1 * MatrixType::Random(size,cols2);\n    m2 = qr.solve(m3);\n    VERIFY_IS_APPROX(m2, m1_inv*m3);\n  }\n}\n\ntemplate<typename MatrixType> void qr_invertible()\n{\n  using std::log;\n  using std::abs;\n  typedef typename NumTraits<typename MatrixType::Scalar>::Real RealScalar;\n  typedef typename MatrixType::Scalar Scalar;\n\n  Index max_size = numext::mini(50,EIGEN_TEST_MAX_SIZE);\n  Index min_size = numext::maxi(1,EIGEN_TEST_MAX_SIZE/10);\n  Index size = internal::random<Index>(min_size,max_size);\n\n  MatrixType m1(size, size), m2(size, size), m3(size, size);\n  m1 = MatrixType::Random(size,size);\n\n  if (internal::is_same<RealScalar,float>::value)\n  {\n    // let's build a matrix more stable to inverse\n    MatrixType a = MatrixType::Random(size,size*2);\n    m1 += a * a.adjoint();\n  }\n\n  FullPivHouseholderQR<MatrixType> qr(m1);\n  VERIFY(qr.isInjective());\n  VERIFY(qr.isInvertible());\n  VERIFY(qr.isSurjective());\n\n  check_solverbase<MatrixType, MatrixType>(m1, qr, size, size, size);\n\n  // now construct a matrix with prescribed determinant\n  m1.setZero();\n  for(int i = 0; i < size; i++) m1(i,i) = internal::random<Scalar>();\n  RealScalar absdet = abs(m1.diagonal().prod());\n  m3 = qr.matrixQ(); // get a unitary\n  m1 = m3 * m1 * m3;\n  qr.compute(m1);\n  VERIFY_IS_APPROX(absdet, qr.absDeterminant());\n  VERIFY_IS_APPROX(log(absdet), qr.logAbsDeterminant());\n}\n\ntemplate<typename MatrixType> void qr_verify_assert()\n{\n  MatrixType tmp;\n\n  FullPivHouseholderQR<MatrixType> qr;\n  VERIFY_RAISES_ASSERT(qr.matrixQR())\n  VERIFY_RAISES_ASSERT(qr.solve(tmp))\n  VERIFY_RAISES_ASSERT(qr.transpose().solve(tmp))\n  VERIFY_RAISES_ASSERT(qr.adjoint().solve(tmp))\n  VERIFY_RAISES_ASSERT(qr.matrixQ())\n  VERIFY_RAISES_ASSERT(qr.dimensionOfKernel())\n  VERIFY_RAISES_ASSERT(qr.isInjective())\n  VERIFY_RAISES_ASSERT(qr.isSurjective())\n  VERIFY_RAISES_ASSERT(qr.isInvertible())\n  VERIFY_RAISES_ASSERT(qr.inverse())\n  VERIFY_RAISES_ASSERT(qr.absDeterminant())\n  VERIFY_RAISES_ASSERT(qr.logAbsDeterminant())\n}\n\nEIGEN_DECLARE_TEST(qr_fullpivoting)\n{\n  for(int i = 0; i < 1; i++) {\n    CALL_SUBTEST_5( qr<Matrix3f>() );\n    CALL_SUBTEST_6( qr<Matrix3d>() );\n    CALL_SUBTEST_8( qr<Matrix2f>() );\n    CALL_SUBTEST_1( qr<MatrixXf>() );\n    CALL_SUBTEST_2( qr<MatrixXd>() );\n    CALL_SUBTEST_3( qr<MatrixXcd>() );\n  }\n\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( qr_invertible<MatrixXf>() );\n    CALL_SUBTEST_2( qr_invertible<MatrixXd>() );\n    CALL_SUBTEST_4( qr_invertible<MatrixXcf>() );\n    CALL_SUBTEST_3( qr_invertible<MatrixXcd>() );\n  }\n\n  CALL_SUBTEST_5(qr_verify_assert<Matrix3f>());\n  CALL_SUBTEST_6(qr_verify_assert<Matrix3d>());\n  CALL_SUBTEST_1(qr_verify_assert<MatrixXf>());\n  CALL_SUBTEST_2(qr_verify_assert<MatrixXd>());\n  CALL_SUBTEST_4(qr_verify_assert<MatrixXcf>());\n  CALL_SUBTEST_3(qr_verify_assert<MatrixXcd>());\n\n  // Test problem size constructors\n  CALL_SUBTEST_7(FullPivHouseholderQR<MatrixXf>(10, 20));\n  CALL_SUBTEST_7((FullPivHouseholderQR<Matrix<float,10,20> >(10,20)));\n  CALL_SUBTEST_7((FullPivHouseholderQR<Matrix<float,10,20> >(Matrix<float,10,20>::Random())));\n  CALL_SUBTEST_7((FullPivHouseholderQR<Matrix<float,20,10> >(20,10)));\n  CALL_SUBTEST_7((FullPivHouseholderQR<Matrix<float,20,10> >(Matrix<float,20,10>::Random())));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/qtvector.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_WORK_AROUND_QT_BUG_CALLING_WRONG_OPERATOR_NEW_FIXED_IN_QT_4_5\n\n#include \"main.h\"\n#include <QtCore/QVector>\n#include <Eigen/Geometry>\n#include <Eigen/QtAlignedMalloc>\n\ntemplate<typename MatrixType>\nvoid check_qtvector_matrix(const MatrixType& m)\n{\n  Index rows = m.rows();\n  Index cols = m.cols();\n  MatrixType x = MatrixType::Random(rows,cols), y = MatrixType::Random(rows,cols);\n  QVector<MatrixType> v(10, MatrixType(rows,cols)), w(20, y);\n  for(int i = 0; i < 20; i++)\n  {\n    VERIFY_IS_APPROX(w[i], y);\n  }\n  v[5] = x;\n  w[6] = v[5];\n  VERIFY_IS_APPROX(w[6], v[5]);\n  v = w;\n  for(int i = 0; i < 20; i++)\n  {\n    VERIFY_IS_APPROX(w[i], v[i]);\n  }\n\n  v.resize(21);\n  v[20] = x;\n  VERIFY_IS_APPROX(v[20], x);\n  v.fill(y,22);\n  VERIFY_IS_APPROX(v[21], y);\n  v.push_back(x);\n  VERIFY_IS_APPROX(v[22], x);\n  VERIFY((size_t)&(v[22]) == (size_t)&(v[21]) + sizeof(MatrixType));\n\n  // do a lot of push_back such that the vector gets internally resized\n  // (with memory reallocation)\n  MatrixType* ref = &w[0];\n  for(int i=0; i<30 || ((ref==&w[0]) && i<300); ++i)\n    v.push_back(w[i%w.size()]);\n  for(int i=23; i<v.size(); ++i)\n  {\n    VERIFY(v[i]==w[(i-23)%w.size()]);\n  }\n}\n\ntemplate<typename TransformType>\nvoid check_qtvector_transform(const TransformType&)\n{\n  typedef typename TransformType::MatrixType MatrixType;\n  TransformType x(MatrixType::Random()), y(MatrixType::Random());\n  QVector<TransformType> v(10), w(20, y);\n  v[5] = x;\n  w[6] = v[5];\n  VERIFY_IS_APPROX(w[6], v[5]);\n  v = w;\n  for(int i = 0; i < 20; i++)\n  {\n    VERIFY_IS_APPROX(w[i], v[i]);\n  }\n\n  v.resize(21);\n  v[20] = x;\n  VERIFY_IS_APPROX(v[20], x);\n  v.fill(y,22);\n  VERIFY_IS_APPROX(v[21], y);\n  v.push_back(x);\n  VERIFY_IS_APPROX(v[22], x);\n  VERIFY((size_t)&(v[22]) == (size_t)&(v[21]) + sizeof(TransformType));\n\n  // do a lot of push_back such that the vector gets internally resized\n  // (with memory reallocation)\n  TransformType* ref = &w[0];\n  for(int i=0; i<30 || ((ref==&w[0]) && i<300); ++i)\n    v.push_back(w[i%w.size()]);\n  for(unsigned int i=23; int(i)<v.size(); ++i)\n  {\n    VERIFY(v[i].matrix()==w[(i-23)%w.size()].matrix());\n  }\n}\n\ntemplate<typename QuaternionType>\nvoid check_qtvector_quaternion(const QuaternionType&)\n{\n  typedef typename QuaternionType::Coefficients Coefficients;\n  QuaternionType x(Coefficients::Random()), y(Coefficients::Random());\n  QVector<QuaternionType> v(10), w(20, y);\n  v[5] = x;\n  w[6] = v[5];\n  VERIFY_IS_APPROX(w[6], v[5]);\n  v = w;\n  for(int i = 0; i < 20; i++)\n  {\n    VERIFY_IS_APPROX(w[i], v[i]);\n  }\n\n  v.resize(21);\n  v[20] = x;\n  VERIFY_IS_APPROX(v[20], x);\n  v.fill(y,22);\n  VERIFY_IS_APPROX(v[21], y);\n  v.push_back(x);\n  VERIFY_IS_APPROX(v[22], x);\n  VERIFY((size_t)&(v[22]) == (size_t)&(v[21]) + sizeof(QuaternionType));\n\n  // do a lot of push_back such that the vector gets internally resized\n  // (with memory reallocation)\n  QuaternionType* ref = &w[0];\n  for(int i=0; i<30 || ((ref==&w[0]) && i<300); ++i)\n    v.push_back(w[i%w.size()]);\n  for(unsigned int i=23; int(i)<v.size(); ++i)\n  {\n    VERIFY(v[i].coeffs()==w[(i-23)%w.size()].coeffs());\n  }\n}\n\nEIGEN_DECLARE_TEST(qtvector)\n{\n  // some non vectorizable fixed sizes\n  CALL_SUBTEST(check_qtvector_matrix(Vector2f()));\n  CALL_SUBTEST(check_qtvector_matrix(Matrix3f()));\n  CALL_SUBTEST(check_qtvector_matrix(Matrix3d()));\n\n  // some vectorizable fixed sizes\n  CALL_SUBTEST(check_qtvector_matrix(Matrix2f()));\n  CALL_SUBTEST(check_qtvector_matrix(Vector4f()));\n  CALL_SUBTEST(check_qtvector_matrix(Matrix4f()));\n  CALL_SUBTEST(check_qtvector_matrix(Matrix4d()));\n\n  // some dynamic sizes\n  CALL_SUBTEST(check_qtvector_matrix(MatrixXd(1,1)));\n  CALL_SUBTEST(check_qtvector_matrix(VectorXd(20)));\n  CALL_SUBTEST(check_qtvector_matrix(RowVectorXf(20)));\n  CALL_SUBTEST(check_qtvector_matrix(MatrixXcf(10,10)));\n\n  // some Transform\n  CALL_SUBTEST(check_qtvector_transform(Affine2f()));\n  CALL_SUBTEST(check_qtvector_transform(Affine3f()));\n  CALL_SUBTEST(check_qtvector_transform(Affine3d()));\n  //CALL_SUBTEST(check_qtvector_transform(Transform4d()));\n\n  // some Quaternion\n  CALL_SUBTEST(check_qtvector_quaternion(Quaternionf()));\n  CALL_SUBTEST(check_qtvector_quaternion(Quaternionf()));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/rand.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\ntypedef long long int64;\n\ntemplate<typename Scalar> Scalar check_in_range(Scalar x, Scalar y)\n{\n  Scalar r = internal::random<Scalar>(x,y);\n  VERIFY(r>=x);\n  if(y>=x)\n  {\n    VERIFY(r<=y);\n  }\n  return r;\n}\n\ntemplate<typename Scalar> void check_all_in_range(Scalar x, Scalar y)\n{\n  Array<int,1,Dynamic> mask(y-x+1);\n  mask.fill(0);\n  long n = (y-x+1)*32;\n  for(long k=0; k<n; ++k)\n  {\n    mask( check_in_range(x,y)-x )++;\n  }\n  for(Index i=0; i<mask.size(); ++i)\n    if(mask(i)==0)\n      std::cout << \"WARNING: value \" << x+i << \" not reached.\" << std::endl;\n  VERIFY( (mask>0).all() );\n}\n\ntemplate<typename Scalar> void check_histogram(Scalar x, Scalar y, int bins)\n{\n  Array<int,1,Dynamic> hist(bins);\n  hist.fill(0);\n  int f = 100000;\n  int n = bins*f;\n  int64 range = int64(y)-int64(x);\n  int divisor = int((range+1)/bins);\n  assert(((range+1)%bins)==0);\n  for(int k=0; k<n; ++k)\n  {\n    Scalar r = check_in_range(x,y);\n    hist( int((int64(r)-int64(x))/divisor) )++;\n  }\n  VERIFY( (((hist.cast<double>()/double(f))-1.0).abs()<0.02).all() );\n}\n\nEIGEN_DECLARE_TEST(rand)\n{\n  long long_ref = NumTraits<long>::highest()/10;\n  signed char char_offset = (std::min)(g_repeat,64);\n  signed char short_offset = (std::min)(g_repeat,16000);\n\n  for(int i = 0; i < g_repeat*10000; i++) {\n    CALL_SUBTEST(check_in_range<float>(10,11));\n    CALL_SUBTEST(check_in_range<float>(1.24234523,1.24234523));\n    CALL_SUBTEST(check_in_range<float>(-1,1));\n    CALL_SUBTEST(check_in_range<float>(-1432.2352,-1432.2352));\n\n    CALL_SUBTEST(check_in_range<double>(10,11));\n    CALL_SUBTEST(check_in_range<double>(1.24234523,1.24234523));\n    CALL_SUBTEST(check_in_range<double>(-1,1));\n    CALL_SUBTEST(check_in_range<double>(-1432.2352,-1432.2352));\n\n    CALL_SUBTEST(check_in_range<int>(0,-1));\n    CALL_SUBTEST(check_in_range<short>(0,-1));\n    CALL_SUBTEST(check_in_range<long>(0,-1));\n    CALL_SUBTEST(check_in_range<int>(-673456,673456));\n    CALL_SUBTEST(check_in_range<int>(-RAND_MAX+10,RAND_MAX-10));\n    CALL_SUBTEST(check_in_range<short>(-24345,24345));\n    CALL_SUBTEST(check_in_range<long>(-long_ref,long_ref));\n  }\n\n  CALL_SUBTEST(check_all_in_range<signed char>(11,11));\n  CALL_SUBTEST(check_all_in_range<signed char>(11,11+char_offset));\n  CALL_SUBTEST(check_all_in_range<signed char>(-5,5));\n  CALL_SUBTEST(check_all_in_range<signed char>(-11-char_offset,-11));\n  CALL_SUBTEST(check_all_in_range<signed char>(-126,-126+char_offset));\n  CALL_SUBTEST(check_all_in_range<signed char>(126-char_offset,126));\n  CALL_SUBTEST(check_all_in_range<signed char>(-126,126));\n\n  CALL_SUBTEST(check_all_in_range<short>(11,11));\n  CALL_SUBTEST(check_all_in_range<short>(11,11+short_offset));\n  CALL_SUBTEST(check_all_in_range<short>(-5,5));\n  CALL_SUBTEST(check_all_in_range<short>(-11-short_offset,-11));\n  CALL_SUBTEST(check_all_in_range<short>(-24345,-24345+short_offset));\n  CALL_SUBTEST(check_all_in_range<short>(24345,24345+short_offset));\n\n  CALL_SUBTEST(check_all_in_range<int>(11,11));\n  CALL_SUBTEST(check_all_in_range<int>(11,11+g_repeat));\n  CALL_SUBTEST(check_all_in_range<int>(-5,5));\n  CALL_SUBTEST(check_all_in_range<int>(-11-g_repeat,-11));\n  CALL_SUBTEST(check_all_in_range<int>(-673456,-673456+g_repeat));\n  CALL_SUBTEST(check_all_in_range<int>(673456,673456+g_repeat));\n\n  CALL_SUBTEST(check_all_in_range<long>(11,11));\n  CALL_SUBTEST(check_all_in_range<long>(11,11+g_repeat));\n  CALL_SUBTEST(check_all_in_range<long>(-5,5));\n  CALL_SUBTEST(check_all_in_range<long>(-11-g_repeat,-11));\n  CALL_SUBTEST(check_all_in_range<long>(-long_ref,-long_ref+g_repeat));\n  CALL_SUBTEST(check_all_in_range<long>( long_ref, long_ref+g_repeat));\n\n  CALL_SUBTEST(check_histogram<int>(-5,5,11));\n  int bins = 100;\n  CALL_SUBTEST(check_histogram<int>(-3333,-3333+bins*(3333/bins)-1,bins));\n  bins = 1000;\n  CALL_SUBTEST(check_histogram<int>(-RAND_MAX+10,-RAND_MAX+10+bins*(RAND_MAX/bins)-1,bins));\n  CALL_SUBTEST(check_histogram<int>(-RAND_MAX+10,-int64(RAND_MAX)+10+bins*(2*int64(RAND_MAX)/bins)-1,bins));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/real_qz.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Alexey Korepanov <kaikaikai@yandex.ru>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_RUNTIME_NO_MALLOC\n#include \"main.h\"\n#include <limits>\n#include <Eigen/Eigenvalues>\n\ntemplate<typename MatrixType> void real_qz(const MatrixType& m)\n{\n  /* this test covers the following files:\n     RealQZ.h\n  */\n  using std::abs;\n  typedef typename MatrixType::Scalar Scalar;\n  \n  Index dim = m.cols();\n  \n  MatrixType A = MatrixType::Random(dim,dim),\n             B = MatrixType::Random(dim,dim);\n\n\n  // Regression test for bug 985: Randomly set rows or columns to zero\n  Index k=internal::random<Index>(0, dim-1);\n  switch(internal::random<int>(0,10)) {\n  case 0:\n    A.row(k).setZero(); break;\n  case 1:\n    A.col(k).setZero(); break;\n  case 2:\n    B.row(k).setZero(); break;\n  case 3:\n    B.col(k).setZero(); break;\n  default:\n    break;\n  }\n\n  RealQZ<MatrixType> qz(dim);\n  // TODO enable full-prealocation of required memory, this probably requires an in-place mode for HessenbergDecomposition\n  //Eigen::internal::set_is_malloc_allowed(false);\n  qz.compute(A,B);\n  //Eigen::internal::set_is_malloc_allowed(true);\n  \n  VERIFY_IS_EQUAL(qz.info(), Success);\n  // check for zeros\n  bool all_zeros = true;\n  for (Index i=0; i<A.cols(); i++)\n    for (Index j=0; j<i; j++) {\n      if (abs(qz.matrixT()(i,j))!=Scalar(0.0))\n      {\n        std::cerr << \"Error: T(\" << i << \",\" << j << \") = \" << qz.matrixT()(i,j) << std::endl;\n        all_zeros = false;\n      }\n      if (j<i-1 && abs(qz.matrixS()(i,j))!=Scalar(0.0))\n      {\n        std::cerr << \"Error: S(\" << i << \",\" << j << \") = \" << qz.matrixS()(i,j) << std::endl;\n        all_zeros = false;\n      }\n      if (j==i-1 && j>0 && abs(qz.matrixS()(i,j))!=Scalar(0.0) && abs(qz.matrixS()(i-1,j-1))!=Scalar(0.0))\n      {\n        std::cerr << \"Error: S(\" << i << \",\" << j << \") = \" << qz.matrixS()(i,j)  << \" && S(\" << i-1 << \",\" << j-1 << \") = \" << qz.matrixS()(i-1,j-1) << std::endl;\n        all_zeros = false;\n      }\n    }\n  VERIFY_IS_EQUAL(all_zeros, true);\n  VERIFY_IS_APPROX(qz.matrixQ()*qz.matrixS()*qz.matrixZ(), A);\n  VERIFY_IS_APPROX(qz.matrixQ()*qz.matrixT()*qz.matrixZ(), B);\n  VERIFY_IS_APPROX(qz.matrixQ()*qz.matrixQ().adjoint(), MatrixType::Identity(dim,dim));\n  VERIFY_IS_APPROX(qz.matrixZ()*qz.matrixZ().adjoint(), MatrixType::Identity(dim,dim));\n}\n\nEIGEN_DECLARE_TEST(real_qz)\n{\n  int s = 0;\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( real_qz(Matrix4f()) );\n    s = internal::random<int>(1,EIGEN_TEST_MAX_SIZE/4);\n    CALL_SUBTEST_2( real_qz(MatrixXd(s,s)) );\n\n    // some trivial but implementation-wise tricky cases\n    CALL_SUBTEST_2( real_qz(MatrixXd(1,1)) );\n    CALL_SUBTEST_2( real_qz(MatrixXd(2,2)) );\n    CALL_SUBTEST_3( real_qz(Matrix<double,1,1>()) );\n    CALL_SUBTEST_4( real_qz(Matrix2d()) );\n  }\n  \n  TEST_SET_BUT_UNUSED_VARIABLE(s)\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/redux.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2015 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define TEST_ENABLE_TEMPORARY_TRACKING\n#define EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 8\n// ^^ see bug 1449\n\n#include \"main.h\"\n\ntemplate<typename MatrixType> void matrixRedux(const MatrixType& m)\n{\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename MatrixType::RealScalar RealScalar;\n\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  MatrixType m1 = MatrixType::Random(rows, cols);\n\n  // The entries of m1 are uniformly distributed in [0,1], so m1.prod() is very small. This may lead to test\n  // failures if we underflow into denormals. Thus, we scale so that entries are close to 1.\n  MatrixType m1_for_prod = MatrixType::Ones(rows, cols) + RealScalar(0.2) * m1;\n\n  Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime> m2(rows,rows);\n  m2.setRandom();\n\n  VERIFY_IS_MUCH_SMALLER_THAN(MatrixType::Zero(rows, cols).sum(), Scalar(1));\n  VERIFY_IS_APPROX(MatrixType::Ones(rows, cols).sum(), Scalar(float(rows*cols))); // the float() here to shut up excessive MSVC warning about int->complex conversion being lossy\n  Scalar s(0), p(1), minc(numext::real(m1.coeff(0))), maxc(numext::real(m1.coeff(0)));\n  for(int j = 0; j < cols; j++)\n  for(int i = 0; i < rows; i++)\n  {\n    s += m1(i,j);\n    p *= m1_for_prod(i,j);\n    minc = (std::min)(numext::real(minc), numext::real(m1(i,j)));\n    maxc = (std::max)(numext::real(maxc), numext::real(m1(i,j)));\n  }\n  const Scalar mean = s/Scalar(RealScalar(rows*cols));\n\n  VERIFY_IS_APPROX(m1.sum(), s);\n  VERIFY_IS_APPROX(m1.mean(), mean);\n  VERIFY_IS_APPROX(m1_for_prod.prod(), p);\n  VERIFY_IS_APPROX(m1.real().minCoeff(), numext::real(minc));\n  VERIFY_IS_APPROX(m1.real().maxCoeff(), numext::real(maxc));\n  \n  // test that partial reduction works if nested expressions is forced to evaluate early\n  VERIFY_IS_APPROX((m1.matrix() * m1.matrix().transpose())       .cwiseProduct(m2.matrix()).rowwise().sum().sum(), \n                   (m1.matrix() * m1.matrix().transpose()).eval().cwiseProduct(m2.matrix()).rowwise().sum().sum());\n\n  // test slice vectorization assuming assign is ok\n  Index r0 = internal::random<Index>(0,rows-1);\n  Index c0 = internal::random<Index>(0,cols-1);\n  Index r1 = internal::random<Index>(r0+1,rows)-r0;\n  Index c1 = internal::random<Index>(c0+1,cols)-c0;\n  VERIFY_IS_APPROX(m1.block(r0,c0,r1,c1).sum(), m1.block(r0,c0,r1,c1).eval().sum());\n  VERIFY_IS_APPROX(m1.block(r0,c0,r1,c1).mean(), m1.block(r0,c0,r1,c1).eval().mean());\n  VERIFY_IS_APPROX(m1_for_prod.block(r0,c0,r1,c1).prod(), m1_for_prod.block(r0,c0,r1,c1).eval().prod());\n  VERIFY_IS_APPROX(m1.block(r0,c0,r1,c1).real().minCoeff(), m1.block(r0,c0,r1,c1).real().eval().minCoeff());\n  VERIFY_IS_APPROX(m1.block(r0,c0,r1,c1).real().maxCoeff(), m1.block(r0,c0,r1,c1).real().eval().maxCoeff());\n\n  // regression for bug 1090\n  const int R1 = MatrixType::RowsAtCompileTime>=2 ? MatrixType::RowsAtCompileTime/2 : 6;\n  const int C1 = MatrixType::ColsAtCompileTime>=2 ? MatrixType::ColsAtCompileTime/2 : 6;\n  if(R1<=rows-r0 && C1<=cols-c0)\n  {\n    VERIFY_IS_APPROX( (m1.template block<R1,C1>(r0,c0).sum()), m1.block(r0,c0,R1,C1).sum() );\n  }\n  \n  // test empty objects\n  VERIFY_IS_APPROX(m1.block(r0,c0,0,0).sum(),   Scalar(0));\n  VERIFY_IS_APPROX(m1.block(r0,c0,0,0).prod(),  Scalar(1));\n\n  // test nesting complex expression\n  VERIFY_EVALUATION_COUNT( (m1.matrix()*m1.matrix().transpose()).sum(), (MatrixType::IsVectorAtCompileTime && MatrixType::SizeAtCompileTime!=1 ? 0 : 1) );\n  VERIFY_EVALUATION_COUNT( ((m1.matrix()*m1.matrix().transpose())+m2).sum(),(MatrixType::IsVectorAtCompileTime && MatrixType::SizeAtCompileTime!=1 ? 0 : 1));\n}\n\ntemplate<typename VectorType> void vectorRedux(const VectorType& w)\n{\n  using std::abs;\n  typedef typename VectorType::Scalar Scalar;\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  Index size = w.size();\n\n  VectorType v = VectorType::Random(size);\n  VectorType v_for_prod = VectorType::Ones(size) + Scalar(0.2) * v; // see comment above declaration of m1_for_prod\n\n  for(int i = 1; i < size; i++)\n  {\n    Scalar s(0), p(1);\n    RealScalar minc(numext::real(v.coeff(0))), maxc(numext::real(v.coeff(0)));\n    for(int j = 0; j < i; j++)\n    {\n      s += v[j];\n      p *= v_for_prod[j];\n      minc = (std::min)(minc, numext::real(v[j]));\n      maxc = (std::max)(maxc, numext::real(v[j]));\n    }\n    VERIFY_IS_MUCH_SMALLER_THAN(abs(s - v.head(i).sum()), Scalar(1));\n    VERIFY_IS_APPROX(p, v_for_prod.head(i).prod());\n    VERIFY_IS_APPROX(minc, v.real().head(i).minCoeff());\n    VERIFY_IS_APPROX(maxc, v.real().head(i).maxCoeff());\n  }\n\n  for(int i = 0; i < size-1; i++)\n  {\n    Scalar s(0), p(1);\n    RealScalar minc(numext::real(v.coeff(i))), maxc(numext::real(v.coeff(i)));\n    for(int j = i; j < size; j++)\n    {\n      s += v[j];\n      p *= v_for_prod[j];\n      minc = (std::min)(minc, numext::real(v[j]));\n      maxc = (std::max)(maxc, numext::real(v[j]));\n    }\n    VERIFY_IS_MUCH_SMALLER_THAN(abs(s - v.tail(size-i).sum()), Scalar(1));\n    VERIFY_IS_APPROX(p, v_for_prod.tail(size-i).prod());\n    VERIFY_IS_APPROX(minc, v.real().tail(size-i).minCoeff());\n    VERIFY_IS_APPROX(maxc, v.real().tail(size-i).maxCoeff());\n  }\n\n  for(int i = 0; i < size/2; i++)\n  {\n    Scalar s(0), p(1);\n    RealScalar minc(numext::real(v.coeff(i))), maxc(numext::real(v.coeff(i)));\n    for(int j = i; j < size-i; j++)\n    {\n      s += v[j];\n      p *= v_for_prod[j];\n      minc = (std::min)(minc, numext::real(v[j]));\n      maxc = (std::max)(maxc, numext::real(v[j]));\n    }\n    VERIFY_IS_MUCH_SMALLER_THAN(abs(s - v.segment(i, size-2*i).sum()), Scalar(1));\n    VERIFY_IS_APPROX(p, v_for_prod.segment(i, size-2*i).prod());\n    VERIFY_IS_APPROX(minc, v.real().segment(i, size-2*i).minCoeff());\n    VERIFY_IS_APPROX(maxc, v.real().segment(i, size-2*i).maxCoeff());\n  }\n  \n  // test empty objects\n  VERIFY_IS_APPROX(v.head(0).sum(),   Scalar(0));\n  VERIFY_IS_APPROX(v.tail(0).prod(),  Scalar(1));\n  VERIFY_RAISES_ASSERT(v.head(0).mean());\n  VERIFY_RAISES_ASSERT(v.head(0).minCoeff());\n  VERIFY_RAISES_ASSERT(v.head(0).maxCoeff());\n}\n\nEIGEN_DECLARE_TEST(redux)\n{\n  // the max size cannot be too large, otherwise reduxion operations obviously generate large errors.\n  int maxsize = (std::min)(100,EIGEN_TEST_MAX_SIZE);\n  TEST_SET_BUT_UNUSED_VARIABLE(maxsize);\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( matrixRedux(Matrix<float, 1, 1>()) );\n    CALL_SUBTEST_1( matrixRedux(Array<float, 1, 1>()) );\n    CALL_SUBTEST_2( matrixRedux(Matrix2f()) );\n    CALL_SUBTEST_2( matrixRedux(Array2f()) );\n    CALL_SUBTEST_2( matrixRedux(Array22f()) );\n    CALL_SUBTEST_3( matrixRedux(Matrix4d()) );\n    CALL_SUBTEST_3( matrixRedux(Array4d()) );\n    CALL_SUBTEST_3( matrixRedux(Array44d()) );\n    CALL_SUBTEST_4( matrixRedux(MatrixXcf(internal::random<int>(1,maxsize), internal::random<int>(1,maxsize))) );\n    CALL_SUBTEST_4( matrixRedux(ArrayXXcf(internal::random<int>(1,maxsize), internal::random<int>(1,maxsize))) );\n    CALL_SUBTEST_5( matrixRedux(MatrixXd (internal::random<int>(1,maxsize), internal::random<int>(1,maxsize))) );\n    CALL_SUBTEST_5( matrixRedux(ArrayXXd (internal::random<int>(1,maxsize), internal::random<int>(1,maxsize))) );\n    CALL_SUBTEST_6( matrixRedux(MatrixXi (internal::random<int>(1,maxsize), internal::random<int>(1,maxsize))) );\n    CALL_SUBTEST_6( matrixRedux(ArrayXXi (internal::random<int>(1,maxsize), internal::random<int>(1,maxsize))) );\n  }\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_7( vectorRedux(Vector4f()) );\n    CALL_SUBTEST_7( vectorRedux(Array4f()) );\n    CALL_SUBTEST_5( vectorRedux(VectorXd(internal::random<int>(1,maxsize))) );\n    CALL_SUBTEST_5( vectorRedux(ArrayXd(internal::random<int>(1,maxsize))) );\n    CALL_SUBTEST_8( vectorRedux(VectorXf(internal::random<int>(1,maxsize))) );\n    CALL_SUBTEST_8( vectorRedux(ArrayXf(internal::random<int>(1,maxsize))) );\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/ref.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 20013 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n// This unit test cannot be easily written to work with EIGEN_DEFAULT_TO_ROW_MAJOR\n#ifdef EIGEN_DEFAULT_TO_ROW_MAJOR\n#undef EIGEN_DEFAULT_TO_ROW_MAJOR\n#endif\n\n#define TEST_ENABLE_TEMPORARY_TRACKING\n#define TEST_CHECK_STATIC_ASSERTIONS\n#include \"main.h\"\n\n// test Ref.h\n\n// Deal with i387 extended precision\n#if EIGEN_ARCH_i386 && !(EIGEN_ARCH_x86_64)\n\n#if EIGEN_COMP_GNUC_STRICT && EIGEN_GNUC_AT_LEAST(4,4)\n#pragma GCC optimize (\"-ffloat-store\")\n#else\n#undef VERIFY_IS_EQUAL\n#define VERIFY_IS_EQUAL(X,Y) VERIFY_IS_APPROX(X,Y)\n#endif\n\n#endif\n\ntemplate<typename MatrixType> void ref_matrix(const MatrixType& m)\n{\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename MatrixType::RealScalar RealScalar;\n  typedef Matrix<Scalar,Dynamic,Dynamic,MatrixType::Options> DynMatrixType;\n  typedef Matrix<RealScalar,Dynamic,Dynamic,MatrixType::Options> RealDynMatrixType;\n  \n  typedef Ref<MatrixType> RefMat;\n  typedef Ref<DynMatrixType> RefDynMat;\n  typedef Ref<const DynMatrixType> ConstRefDynMat;\n  typedef Ref<RealDynMatrixType , 0, Stride<Dynamic,Dynamic> > RefRealMatWithStride;\n\n  Index rows = m.rows(), cols = m.cols();\n  \n  MatrixType  m1 = MatrixType::Random(rows, cols),\n              m2 = m1;\n  \n  Index i = internal::random<Index>(0,rows-1);\n  Index j = internal::random<Index>(0,cols-1);\n  Index brows = internal::random<Index>(1,rows-i);\n  Index bcols = internal::random<Index>(1,cols-j);\n  \n  RefMat rm0 = m1;\n  VERIFY_IS_EQUAL(rm0, m1);\n  RefDynMat rm1 = m1;\n  VERIFY_IS_EQUAL(rm1, m1);\n  RefDynMat rm2 = m1.block(i,j,brows,bcols);\n  VERIFY_IS_EQUAL(rm2, m1.block(i,j,brows,bcols));\n  rm2.setOnes();\n  m2.block(i,j,brows,bcols).setOnes();\n  VERIFY_IS_EQUAL(m1, m2);\n  \n  m2.block(i,j,brows,bcols).setRandom();\n  rm2 = m2.block(i,j,brows,bcols);\n  VERIFY_IS_EQUAL(m1, m2);\n  \n  ConstRefDynMat rm3 = m1.block(i,j,brows,bcols);\n  m1.block(i,j,brows,bcols) *= 2;\n  m2.block(i,j,brows,bcols) *= 2;\n  VERIFY_IS_EQUAL(rm3, m2.block(i,j,brows,bcols));\n  RefRealMatWithStride rm4 = m1.real();\n  VERIFY_IS_EQUAL(rm4, m2.real());\n  rm4.array() += 1;\n  m2.real().array() += 1;\n  VERIFY_IS_EQUAL(m1, m2);\n}\n\ntemplate<typename VectorType> void ref_vector(const VectorType& m)\n{\n  typedef typename VectorType::Scalar Scalar;\n  typedef typename VectorType::RealScalar RealScalar;\n  typedef Matrix<Scalar,Dynamic,1,VectorType::Options> DynMatrixType;\n  typedef Matrix<Scalar,Dynamic,Dynamic,ColMajor> MatrixType;\n  typedef Matrix<RealScalar,Dynamic,1,VectorType::Options> RealDynMatrixType;\n  \n  typedef Ref<VectorType> RefMat;\n  typedef Ref<DynMatrixType> RefDynMat;\n  typedef Ref<const DynMatrixType> ConstRefDynMat;\n  typedef Ref<RealDynMatrixType , 0, InnerStride<> > RefRealMatWithStride;\n  typedef Ref<DynMatrixType , 0, InnerStride<> > RefMatWithStride;\n\n  Index size = m.size();\n  \n  VectorType  v1 = VectorType::Random(size),\n              v2 = v1;\n  MatrixType mat1 = MatrixType::Random(size,size),\n             mat2 = mat1,\n             mat3 = MatrixType::Random(size,size);\n  \n  Index i = internal::random<Index>(0,size-1);\n  Index bsize = internal::random<Index>(1,size-i);\n  \n  { RefMat    rm0 = v1;                   VERIFY_IS_EQUAL(rm0, v1); }\n  { RefMat    rm0 = v1.block(0,0,size,1); VERIFY_IS_EQUAL(rm0, v1); }\n  { RefDynMat rv1 = v1;                   VERIFY_IS_EQUAL(rv1, v1); }\n  { RefDynMat rv1 = v1.block(0,0,size,1); VERIFY_IS_EQUAL(rv1, v1); }\n  { VERIFY_RAISES_ASSERT( RefMat    rm0 = v1.block(0, 0, size, 0); EIGEN_UNUSED_VARIABLE(rm0); ); }\n  if(VectorType::SizeAtCompileTime!=1)\n  { VERIFY_RAISES_ASSERT( RefDynMat rv1 = v1.block(0, 0, size, 0); EIGEN_UNUSED_VARIABLE(rv1); ); }\n\n  RefDynMat rv2 = v1.segment(i,bsize);\n  VERIFY_IS_EQUAL(rv2, v1.segment(i,bsize));\n  rv2.setOnes();\n  v2.segment(i,bsize).setOnes();\n  VERIFY_IS_EQUAL(v1, v2);\n  \n  v2.segment(i,bsize).setRandom();\n  rv2 = v2.segment(i,bsize);\n  VERIFY_IS_EQUAL(v1, v2);\n  \n  ConstRefDynMat rm3 = v1.segment(i,bsize);\n  v1.segment(i,bsize) *= 2;\n  v2.segment(i,bsize) *= 2;\n  VERIFY_IS_EQUAL(rm3, v2.segment(i,bsize));\n  \n  RefRealMatWithStride rm4 = v1.real();\n  VERIFY_IS_EQUAL(rm4, v2.real());\n  rm4.array() += 1;\n  v2.real().array() += 1;\n  VERIFY_IS_EQUAL(v1, v2);\n  \n  RefMatWithStride rm5 = mat1.row(i).transpose();\n  VERIFY_IS_EQUAL(rm5, mat1.row(i).transpose());\n  rm5.array() += 1;\n  mat2.row(i).array() += 1;\n  VERIFY_IS_EQUAL(mat1, mat2);\n  rm5.noalias() = rm4.transpose() * mat3;\n  mat2.row(i) = v2.real().transpose() * mat3;\n  VERIFY_IS_APPROX(mat1, mat2);\n}\n\ntemplate<typename PlainObjectType> void check_const_correctness(const PlainObjectType&)\n{\n  // verify that ref-to-const don't have LvalueBit\n  typedef typename internal::add_const<PlainObjectType>::type ConstPlainObjectType;\n  VERIFY( !(internal::traits<Ref<ConstPlainObjectType> >::Flags & LvalueBit) );\n  VERIFY( !(internal::traits<Ref<ConstPlainObjectType, Aligned> >::Flags & LvalueBit) );\n  VERIFY( !(Ref<ConstPlainObjectType>::Flags & LvalueBit) );\n  VERIFY( !(Ref<ConstPlainObjectType, Aligned>::Flags & LvalueBit) );\n}\n\ntemplate<typename B>\nEIGEN_DONT_INLINE void call_ref_1(Ref<VectorXf> a, const B &b) { VERIFY_IS_EQUAL(a,b); }\ntemplate<typename B>\nEIGEN_DONT_INLINE void call_ref_2(const Ref<const VectorXf>& a, const B &b) { VERIFY_IS_EQUAL(a,b); }\ntemplate<typename B>\nEIGEN_DONT_INLINE void call_ref_3(Ref<VectorXf,0,InnerStride<> > a, const B &b) { VERIFY_IS_EQUAL(a,b); }\ntemplate<typename B>\nEIGEN_DONT_INLINE void call_ref_4(const Ref<const VectorXf,0,InnerStride<> >& a, const B &b) { VERIFY_IS_EQUAL(a,b); }\ntemplate<typename B>\nEIGEN_DONT_INLINE void call_ref_5(Ref<MatrixXf,0,OuterStride<> > a, const B &b) { VERIFY_IS_EQUAL(a,b); }\ntemplate<typename B>\nEIGEN_DONT_INLINE void call_ref_6(const Ref<const MatrixXf,0,OuterStride<> >& a, const B &b) { VERIFY_IS_EQUAL(a,b); }\ntemplate<typename B>\nEIGEN_DONT_INLINE void call_ref_7(Ref<Matrix<float,Dynamic,3> > a, const B &b) { VERIFY_IS_EQUAL(a,b); }\n\nvoid call_ref()\n{\n  VectorXcf ca  = VectorXcf::Random(10);\n  VectorXf a    = VectorXf::Random(10);\n  RowVectorXf b = RowVectorXf::Random(10);\n  MatrixXf A    = MatrixXf::Random(10,10);\n  RowVector3f c = RowVector3f::Random();\n  const VectorXf& ac(a);\n  VectorBlock<VectorXf> ab(a,0,3);\n  const VectorBlock<VectorXf> abc(a,0,3);\n  \n\n  VERIFY_EVALUATION_COUNT( call_ref_1(a,a), 0);\n  VERIFY_EVALUATION_COUNT( call_ref_1(b,b.transpose()), 0);\n//   call_ref_1(ac,a<c);           // does not compile because ac is const\n  VERIFY_EVALUATION_COUNT( call_ref_1(ab,ab), 0);\n  VERIFY_EVALUATION_COUNT( call_ref_1(a.head(4),a.head(4)), 0);\n  VERIFY_EVALUATION_COUNT( call_ref_1(abc,abc), 0);\n  VERIFY_EVALUATION_COUNT( call_ref_1(A.col(3),A.col(3)), 0);\n//   call_ref_1(A.row(3),A.row(3));    // does not compile because innerstride!=1\n  VERIFY_EVALUATION_COUNT( call_ref_3(A.row(3),A.row(3).transpose()), 0);\n  VERIFY_EVALUATION_COUNT( call_ref_4(A.row(3),A.row(3).transpose()), 0);\n//   call_ref_1(a+a, a+a);          // does not compile for obvious reason\n\n  MatrixXf tmp = A*A.col(1);\n  VERIFY_EVALUATION_COUNT( call_ref_2(A*A.col(1), tmp), 1);     // evaluated into a temp\n  VERIFY_EVALUATION_COUNT( call_ref_2(ac.head(5),ac.head(5)), 0);\n  VERIFY_EVALUATION_COUNT( call_ref_2(ac,ac), 0);\n  VERIFY_EVALUATION_COUNT( call_ref_2(a,a), 0);\n  VERIFY_EVALUATION_COUNT( call_ref_2(ab,ab), 0);\n  VERIFY_EVALUATION_COUNT( call_ref_2(a.head(4),a.head(4)), 0);\n  tmp = a+a;\n  VERIFY_EVALUATION_COUNT( call_ref_2(a+a,tmp), 1);            // evaluated into a temp\n  VERIFY_EVALUATION_COUNT( call_ref_2(ca.imag(),ca.imag()), 1);      // evaluated into a temp\n\n  VERIFY_EVALUATION_COUNT( call_ref_4(ac.head(5),ac.head(5)), 0);\n  tmp = a+a;\n  VERIFY_EVALUATION_COUNT( call_ref_4(a+a,tmp), 1);           // evaluated into a temp\n  VERIFY_EVALUATION_COUNT( call_ref_4(ca.imag(),ca.imag()), 0);\n\n  VERIFY_EVALUATION_COUNT( call_ref_5(a,a), 0);\n  VERIFY_EVALUATION_COUNT( call_ref_5(a.head(3),a.head(3)), 0);\n  VERIFY_EVALUATION_COUNT( call_ref_5(A,A), 0);\n//   call_ref_5(A.transpose(),A.transpose());   // does not compile because storage order does not match\n  VERIFY_EVALUATION_COUNT( call_ref_5(A.block(1,1,2,2),A.block(1,1,2,2)), 0);\n  VERIFY_EVALUATION_COUNT( call_ref_5(b,b), 0);             // storage order do not match, but this is a degenerate case that should work\n  VERIFY_EVALUATION_COUNT( call_ref_5(a.row(3),a.row(3)), 0);\n\n  VERIFY_EVALUATION_COUNT( call_ref_6(a,a), 0);\n  VERIFY_EVALUATION_COUNT( call_ref_6(a.head(3),a.head(3)), 0);\n  VERIFY_EVALUATION_COUNT( call_ref_6(A.row(3),A.row(3)), 1);           // evaluated into a temp thouth it could be avoided by viewing it as a 1xn matrix\n  tmp = A+A;\n  VERIFY_EVALUATION_COUNT( call_ref_6(A+A,tmp), 1);                // evaluated into a temp\n  VERIFY_EVALUATION_COUNT( call_ref_6(A,A), 0);\n  VERIFY_EVALUATION_COUNT( call_ref_6(A.transpose(),A.transpose()), 1);      // evaluated into a temp because the storage orders do not match\n  VERIFY_EVALUATION_COUNT( call_ref_6(A.block(1,1,2,2),A.block(1,1,2,2)), 0);\n  \n  VERIFY_EVALUATION_COUNT( call_ref_7(c,c), 0);\n}\n\ntypedef Matrix<double,Dynamic,Dynamic,RowMajor> RowMatrixXd;\nint test_ref_overload_fun1(Ref<MatrixXd> )       { return 1; }\nint test_ref_overload_fun1(Ref<RowMatrixXd> )    { return 2; }\nint test_ref_overload_fun1(Ref<MatrixXf> )       { return 3; }\n\nint test_ref_overload_fun2(Ref<const MatrixXd> ) { return 4; }\nint test_ref_overload_fun2(Ref<const MatrixXf> ) { return 5; }\n\nvoid test_ref_ambiguous(const Ref<const ArrayXd> &A, Ref<ArrayXd> B)\n{\n  B = A;\n  B = A - A;\n}\n\n// See also bug 969\nvoid test_ref_overloads()\n{\n  MatrixXd Ad, Bd;\n  RowMatrixXd rAd, rBd;\n  VERIFY( test_ref_overload_fun1(Ad)==1 );\n  VERIFY( test_ref_overload_fun1(rAd)==2 );\n  \n  MatrixXf Af, Bf;\n  VERIFY( test_ref_overload_fun2(Ad)==4 );\n  VERIFY( test_ref_overload_fun2(Ad+Bd)==4 );\n  VERIFY( test_ref_overload_fun2(Af+Bf)==5 );\n  \n  ArrayXd A, B;\n  test_ref_ambiguous(A, B);\n}\n\nvoid test_ref_fixed_size_assert()\n{\n  Vector4f v4 = Vector4f::Random();\n  VectorXf vx = VectorXf::Random(10);\n  VERIFY_RAISES_STATIC_ASSERT( Ref<Vector3f> y = v4; (void)y; );\n  VERIFY_RAISES_STATIC_ASSERT( Ref<Vector3f> y = vx.head<4>(); (void)y; );\n  VERIFY_RAISES_STATIC_ASSERT( Ref<const Vector3f> y = v4; (void)y; );\n  VERIFY_RAISES_STATIC_ASSERT( Ref<const Vector3f> y = vx.head<4>(); (void)y; );\n  VERIFY_RAISES_STATIC_ASSERT( Ref<const Vector3f> y = 2*v4; (void)y; );\n}\n\nEIGEN_DECLARE_TEST(ref)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( ref_vector(Matrix<float, 1, 1>()) );\n    CALL_SUBTEST_1( check_const_correctness(Matrix<float, 1, 1>()) );\n    CALL_SUBTEST_2( ref_vector(Vector4d()) );\n    CALL_SUBTEST_2( check_const_correctness(Matrix4d()) );\n    CALL_SUBTEST_3( ref_vector(Vector4cf()) );\n    CALL_SUBTEST_4( ref_vector(VectorXcf(8)) );\n    CALL_SUBTEST_5( ref_vector(VectorXi(12)) );\n    CALL_SUBTEST_5( check_const_correctness(VectorXi(12)) );\n\n    CALL_SUBTEST_1( ref_matrix(Matrix<float, 1, 1>()) );\n    CALL_SUBTEST_2( ref_matrix(Matrix4d()) );\n    CALL_SUBTEST_1( ref_matrix(Matrix<float,3,5>()) );\n    CALL_SUBTEST_4( ref_matrix(MatrixXcf(internal::random<int>(1,10),internal::random<int>(1,10))) );\n    CALL_SUBTEST_4( ref_matrix(Matrix<std::complex<double>,10,15>()) );\n    CALL_SUBTEST_5( ref_matrix(MatrixXi(internal::random<int>(1,10),internal::random<int>(1,10))) );\n    CALL_SUBTEST_6( call_ref() );\n  }\n  \n  CALL_SUBTEST_7( test_ref_overloads() );\n  CALL_SUBTEST_7( test_ref_fixed_size_assert() );\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/reshape.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2017 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2014 yoco <peter.xiau@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\ntemplate<typename T1,typename T2>\ntypename internal::enable_if<internal::is_same<T1,T2>::value,bool>::type\nis_same_eq(const T1& a, const T2& b)\n{\n  return (a.array() == b.array()).all();\n}\n\ntemplate <int Order,typename MatType>\nvoid check_auto_reshape4x4(MatType m)\n{\n  internal::VariableAndFixedInt<MatType::SizeAtCompileTime==Dynamic?-1: 1>  v1( 1);\n  internal::VariableAndFixedInt<MatType::SizeAtCompileTime==Dynamic?-1: 2>  v2( 2);\n  internal::VariableAndFixedInt<MatType::SizeAtCompileTime==Dynamic?-1: 4>  v4( 4);\n  internal::VariableAndFixedInt<MatType::SizeAtCompileTime==Dynamic?-1: 8>  v8( 8);\n  internal::VariableAndFixedInt<MatType::SizeAtCompileTime==Dynamic?-1:16> v16(16);\n\n  VERIFY(is_same_eq(m.template reshaped<Order>( 1,       AutoSize), m.template reshaped<Order>( 1, 16)));\n  VERIFY(is_same_eq(m.template reshaped<Order>(AutoSize, 16      ), m.template reshaped<Order>( 1, 16)));\n  VERIFY(is_same_eq(m.template reshaped<Order>( 2,       AutoSize), m.template reshaped<Order>( 2,  8)));\n  VERIFY(is_same_eq(m.template reshaped<Order>(AutoSize, 8       ), m.template reshaped<Order>( 2,  8)));\n  VERIFY(is_same_eq(m.template reshaped<Order>( 4,       AutoSize), m.template reshaped<Order>( 4,  4)));\n  VERIFY(is_same_eq(m.template reshaped<Order>(AutoSize, 4       ), m.template reshaped<Order>( 4,  4)));\n  VERIFY(is_same_eq(m.template reshaped<Order>( 8,       AutoSize), m.template reshaped<Order>( 8,  2)));\n  VERIFY(is_same_eq(m.template reshaped<Order>(AutoSize, 2       ), m.template reshaped<Order>( 8,  2)));\n  VERIFY(is_same_eq(m.template reshaped<Order>(16,       AutoSize), m.template reshaped<Order>(16,  1)));\n  VERIFY(is_same_eq(m.template reshaped<Order>(AutoSize, 1       ), m.template reshaped<Order>(16,  1)));\n\n  VERIFY(is_same_eq(m.template reshaped<Order>(fix< 1>,   AutoSize),  m.template reshaped<Order>(fix< 1>, v16    )));\n  VERIFY(is_same_eq(m.template reshaped<Order>(AutoSize,  fix<16> ),  m.template reshaped<Order>( v1,     fix<16>)));\n  VERIFY(is_same_eq(m.template reshaped<Order>(fix< 2>,   AutoSize),  m.template reshaped<Order>(fix< 2>, v8     )));\n  VERIFY(is_same_eq(m.template reshaped<Order>(AutoSize,  fix< 8> ),  m.template reshaped<Order>( v2,     fix< 8>)));\n  VERIFY(is_same_eq(m.template reshaped<Order>(fix< 4>,   AutoSize),  m.template reshaped<Order>(fix< 4>, v4     )));\n  VERIFY(is_same_eq(m.template reshaped<Order>(AutoSize,  fix< 4> ),  m.template reshaped<Order>( v4,     fix< 4>)));\n  VERIFY(is_same_eq(m.template reshaped<Order>(fix< 8>,   AutoSize),  m.template reshaped<Order>(fix< 8>, v2     )));\n  VERIFY(is_same_eq(m.template reshaped<Order>(AutoSize,  fix< 2> ),  m.template reshaped<Order>( v8,     fix< 2>)));\n  VERIFY(is_same_eq(m.template reshaped<Order>(fix<16>,   AutoSize),  m.template reshaped<Order>(fix<16>, v1     )));\n  VERIFY(is_same_eq(m.template reshaped<Order>(AutoSize,  fix< 1> ),  m.template reshaped<Order>(v16,     fix< 1>)));\n}\n\ntemplate <typename MatType>\nvoid check_direct_access_reshape4x4(MatType , internal::FixedInt<RowMajorBit>) {}\n\ntemplate <typename MatType>\nvoid check_direct_access_reshape4x4(MatType m, internal::FixedInt<0>) {\n  VERIFY_IS_EQUAL(m.reshaped( 1, 16).data(), m.data());\n  VERIFY_IS_EQUAL(m.reshaped( 1, 16).innerStride(), 1);\n\n  VERIFY_IS_EQUAL(m.reshaped( 2, 8).data(), m.data());\n  VERIFY_IS_EQUAL(m.reshaped( 2, 8).innerStride(), 1);\n  VERIFY_IS_EQUAL(m.reshaped( 2, 8).outerStride(), 2);\n}\n\n// just test a 4x4 matrix, enumerate all combination manually\ntemplate <typename MatType>\nvoid reshape4x4(MatType m)\n{\n  typedef typename MatType::Scalar Scalar;\n\n  internal::VariableAndFixedInt<MatType::SizeAtCompileTime==Dynamic?-1: 1>  v1( 1);\n  internal::VariableAndFixedInt<MatType::SizeAtCompileTime==Dynamic?-1: 2>  v2( 2);\n  internal::VariableAndFixedInt<MatType::SizeAtCompileTime==Dynamic?-1: 4>  v4( 4);\n  internal::VariableAndFixedInt<MatType::SizeAtCompileTime==Dynamic?-1: 8>  v8( 8);\n  internal::VariableAndFixedInt<MatType::SizeAtCompileTime==Dynamic?-1:16> v16(16);\n\n  if((MatType::Flags&RowMajorBit)==0)\n  {\n    typedef Map<MatrixXi> MapMat;\n    // dynamic\n    VERIFY_IS_EQUAL((m.reshaped( 1, 16)), MapMat(m.data(),  1, 16));\n    VERIFY_IS_EQUAL((m.reshaped( 2,  8)), MapMat(m.data(),  2,  8));\n    VERIFY_IS_EQUAL((m.reshaped( 4,  4)), MapMat(m.data(),  4,  4));\n    VERIFY_IS_EQUAL((m.reshaped( 8,  2)), MapMat(m.data(),  8,  2));\n    VERIFY_IS_EQUAL((m.reshaped(16,  1)), MapMat(m.data(), 16,  1));\n\n    // static\n    VERIFY_IS_EQUAL(m.reshaped(fix< 1>, fix<16>), MapMat(m.data(),  1, 16));\n    VERIFY_IS_EQUAL(m.reshaped(fix< 2>, fix< 8>), MapMat(m.data(),  2,  8));\n    VERIFY_IS_EQUAL(m.reshaped(fix< 4>, fix< 4>), MapMat(m.data(),  4,  4));\n    VERIFY_IS_EQUAL(m.reshaped(fix< 8>, fix< 2>), MapMat(m.data(),  8,  2));\n    VERIFY_IS_EQUAL(m.reshaped(fix<16>, fix< 1>), MapMat(m.data(), 16,  1));\n\n\n    // reshape chain\n    VERIFY_IS_EQUAL(\n      (m\n      .reshaped( 1, 16)\n      .reshaped(fix< 2>,fix< 8>)\n      .reshaped(16,  1)\n      .reshaped(fix< 8>,fix< 2>)\n      .reshaped( 2,  8)\n      .reshaped(fix< 1>,fix<16>)\n      .reshaped( 4,  4)\n      .reshaped(fix<16>,fix< 1>)\n      .reshaped( 8,  2)\n      .reshaped(fix< 4>,fix< 4>)\n      ),\n      MapMat(m.data(), 4,  4)\n    );\n  }\n\n  VERIFY(is_same_eq(m.reshaped( 1,       AutoSize), m.reshaped( 1, 16)));\n  VERIFY(is_same_eq(m.reshaped(AutoSize, 16),       m.reshaped( 1, 16)));\n  VERIFY(is_same_eq(m.reshaped( 2,       AutoSize), m.reshaped( 2,  8)));\n  VERIFY(is_same_eq(m.reshaped(AutoSize, 8),        m.reshaped( 2,  8)));\n  VERIFY(is_same_eq(m.reshaped( 4,       AutoSize), m.reshaped( 4,  4)));\n  VERIFY(is_same_eq(m.reshaped(AutoSize, 4),        m.reshaped( 4,  4)));\n  VERIFY(is_same_eq(m.reshaped( 8,       AutoSize), m.reshaped( 8,  2)));\n  VERIFY(is_same_eq(m.reshaped(AutoSize, 2),        m.reshaped( 8,  2)));\n  VERIFY(is_same_eq(m.reshaped(16,       AutoSize), m.reshaped(16,  1)));\n  VERIFY(is_same_eq(m.reshaped(AutoSize,  1),       m.reshaped(16,  1)));\n\n  VERIFY(is_same_eq(m.reshaped(fix< 1>,   AutoSize),  m.reshaped(fix< 1>, v16)));\n  VERIFY(is_same_eq(m.reshaped(AutoSize,  fix<16>),   m.reshaped( v1,     fix<16>)));\n  VERIFY(is_same_eq(m.reshaped(fix< 2>,   AutoSize),  m.reshaped(fix< 2>, v8)));\n  VERIFY(is_same_eq(m.reshaped(AutoSize,  fix< 8>),   m.reshaped( v2,     fix< 8>)));\n  VERIFY(is_same_eq(m.reshaped(fix< 4>,   AutoSize),  m.reshaped(fix< 4>, v4)));\n  VERIFY(is_same_eq(m.reshaped(AutoSize,  fix< 4>),   m.reshaped( v4,     fix< 4>)));\n  VERIFY(is_same_eq(m.reshaped(fix< 8>,   AutoSize),  m.reshaped(fix< 8>, v2)));\n  VERIFY(is_same_eq(m.reshaped(AutoSize,  fix< 2>),   m.reshaped( v8,     fix< 2>)));\n  VERIFY(is_same_eq(m.reshaped(fix<16>,   AutoSize),  m.reshaped(fix<16>, v1)));\n  VERIFY(is_same_eq(m.reshaped(AutoSize,  fix< 1>),   m.reshaped(v16,     fix< 1>)));\n\n  check_auto_reshape4x4<ColMajor> (m);\n  check_auto_reshape4x4<RowMajor> (m);\n  check_auto_reshape4x4<AutoOrder>(m);\n  check_auto_reshape4x4<ColMajor> (m.transpose());\n  check_auto_reshape4x4<ColMajor> (m.transpose());\n  check_auto_reshape4x4<AutoOrder>(m.transpose());\n\n  check_direct_access_reshape4x4(m,fix<MatType::Flags&RowMajorBit>);\n\n  if((MatType::Flags&RowMajorBit)==0)\n  {\n    VERIFY_IS_EQUAL(m.template reshaped<ColMajor>(2,8),m.reshaped(2,8));\n    VERIFY_IS_EQUAL(m.template reshaped<ColMajor>(2,8),m.template reshaped<AutoOrder>(2,8));\n    VERIFY_IS_EQUAL(m.transpose().template reshaped<RowMajor>(2,8),m.transpose().template reshaped<AutoOrder>(2,8));\n  }\n  else\n  {\n    VERIFY_IS_EQUAL(m.template reshaped<ColMajor>(2,8),m.reshaped(2,8));\n    VERIFY_IS_EQUAL(m.template reshaped<RowMajor>(2,8),m.template reshaped<AutoOrder>(2,8));\n    VERIFY_IS_EQUAL(m.transpose().template reshaped<ColMajor>(2,8),m.transpose().template reshaped<AutoOrder>(2,8));\n    VERIFY_IS_EQUAL(m.transpose().reshaped(2,8),m.transpose().template reshaped<AutoOrder>(2,8));\n  }\n\n  MatrixXi m28r1 = m.template reshaped<RowMajor>(2,8);\n  MatrixXi m28r2 = m.transpose().template reshaped<ColMajor>(8,2).transpose();\n  VERIFY_IS_EQUAL( m28r1, m28r2);\n\n  VERIFY(is_same_eq(m.reshaped(v16,fix<1>), m.reshaped()));\n  VERIFY_IS_EQUAL(m.reshaped(16,1).eval(), m.reshaped().eval());\n  VERIFY_IS_EQUAL(m.reshaped(1,16).eval(), m.reshaped().transpose().eval());\n  VERIFY_IS_EQUAL(m.reshaped().reshaped(2,8), m.reshaped(2,8));\n  VERIFY_IS_EQUAL(m.reshaped().reshaped(4,4), m.reshaped(4,4));\n  VERIFY_IS_EQUAL(m.reshaped().reshaped(8,2), m.reshaped(8,2));\n\n  VERIFY_IS_EQUAL(m.reshaped(), m.template reshaped<ColMajor>());\n  VERIFY_IS_EQUAL(m.transpose().reshaped(), m.template reshaped<RowMajor>());\n  VERIFY_IS_EQUAL(m.template reshaped<RowMajor>(AutoSize,fix<1>), m.template reshaped<RowMajor>());\n  VERIFY_IS_EQUAL(m.template reshaped<AutoOrder>(AutoSize,fix<1>), m.template reshaped<AutoOrder>());\n\n  VERIFY(is_same_eq(m.reshaped(AutoSize,fix<1>), m.reshaped()));\n  VERIFY_IS_EQUAL(m.template reshaped<RowMajor>(fix<1>,AutoSize), m.transpose().reshaped().transpose());\n\n  // check assignment\n  {\n    Matrix<Scalar,Dynamic,1> m1x(m.size()); m1x.setRandom();\n    VERIFY_IS_APPROX(m.reshaped() = m1x, m1x);\n    VERIFY_IS_APPROX(m, m1x.reshaped(4,4));\n    \n    Matrix<Scalar,Dynamic,Dynamic> m28(2,8); m28.setRandom();\n    VERIFY_IS_APPROX(m.reshaped(2,8) = m28, m28);\n    VERIFY_IS_APPROX(m, m28.reshaped(4,4));\n    VERIFY_IS_APPROX(m.template reshaped<RowMajor>(2,8) = m28, m28);\n\n    Matrix<Scalar,Dynamic,Dynamic> m24(2,4); m24.setRandom();\n    VERIFY_IS_APPROX(m(seq(0,last,2),all).reshaped(2,4) = m24, m24);\n\n    // check constness:\n    m.reshaped(2,8).nestedExpression() = m;\n  }\n}\n\nEIGEN_DECLARE_TEST(reshape)\n{\n  typedef Matrix<int,Dynamic,Dynamic,RowMajor> RowMatrixXi;\n  typedef Matrix<int,4,4,RowMajor> RowMatrix4i;\n  MatrixXi mx = MatrixXi::Random(4, 4);\n  Matrix4i m4 = Matrix4i::Random(4, 4);\n  RowMatrixXi rmx = RowMatrixXi::Random(4, 4);\n  RowMatrix4i rm4 = RowMatrix4i::Random(4, 4);\n\n  // test dynamic-size matrix\n  CALL_SUBTEST(reshape4x4(mx));\n  // test static-size matrix\n  CALL_SUBTEST(reshape4x4(m4));\n  // test dynamic-size const matrix\n  CALL_SUBTEST(reshape4x4(static_cast<const MatrixXi>(mx)));\n  // test static-size const matrix\n  CALL_SUBTEST(reshape4x4(static_cast<const Matrix4i>(m4)));\n\n  CALL_SUBTEST(reshape4x4(rmx));\n  CALL_SUBTEST(reshape4x4(rm4));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/resize.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Keir Mierle <mierle@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\ntemplate<DenseIndex rows, DenseIndex cols>\nvoid resizeLikeTest()\n{\n  MatrixXf A(rows, cols);\n  MatrixXf B;\n  Matrix<double, rows, cols> C;\n  B.resizeLike(A);\n  C.resizeLike(B);  // Shouldn't crash.\n  VERIFY(B.rows() == rows && B.cols() == cols);\n\n  VectorXf x(rows);\n  RowVectorXf y;\n  y.resizeLike(x);\n  VERIFY(y.rows() == 1 && y.cols() == rows);\n\n  y.resize(cols);\n  x.resizeLike(y);\n  VERIFY(x.rows() == cols && x.cols() == 1);\n}\n\nvoid resizeLikeTest12() { resizeLikeTest<1,2>(); }\nvoid resizeLikeTest1020() { resizeLikeTest<10,20>(); }\nvoid resizeLikeTest31() { resizeLikeTest<3,1>(); }\n\nEIGEN_DECLARE_TEST(resize)\n{\n  CALL_SUBTEST(resizeLikeTest12() );\n  CALL_SUBTEST(resizeLikeTest1020() );\n  CALL_SUBTEST(resizeLikeTest31() );\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/rvalue_types.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2013 Hauke Heibel <hauke.heibel@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_RUNTIME_NO_MALLOC\n\n#include \"main.h\"\n\n#include <Eigen/Core>\n\nusing internal::UIntPtr;\n\n#if EIGEN_HAS_RVALUE_REFERENCES\ntemplate <typename MatrixType>\nvoid rvalue_copyassign(const MatrixType& m)\n{\n\n  typedef typename internal::traits<MatrixType>::Scalar Scalar;\n  \n  // create a temporary which we are about to destroy by moving\n  MatrixType tmp = m;\n  UIntPtr src_address = reinterpret_cast<UIntPtr>(tmp.data());\n  \n  Eigen::internal::set_is_malloc_allowed(false); // moving from an rvalue reference shall never allocate\n  // move the temporary to n\n  MatrixType n = std::move(tmp);\n  UIntPtr dst_address = reinterpret_cast<UIntPtr>(n.data());\n  if (MatrixType::RowsAtCompileTime==Dynamic|| MatrixType::ColsAtCompileTime==Dynamic)\n  {\n    // verify that we actually moved the guts\n    VERIFY_IS_EQUAL(src_address, dst_address);\n    VERIFY_IS_EQUAL(tmp.size(), 0);\n    VERIFY_IS_EQUAL(reinterpret_cast<UIntPtr>(tmp.data()), UIntPtr(0));\n  }\n\n  // verify that the content did not change\n  Scalar abs_diff = (m-n).array().abs().sum();\n  VERIFY_IS_EQUAL(abs_diff, Scalar(0));\n  Eigen::internal::set_is_malloc_allowed(true);\n}\ntemplate<typename TranspositionsType>\nvoid rvalue_transpositions(Index rows)\n{\n  typedef typename TranspositionsType::IndicesType PermutationVectorType;\n\n  PermutationVectorType vec;\n  randomPermutationVector(vec, rows);\n  TranspositionsType t0(vec);\n\n  Eigen::internal::set_is_malloc_allowed(false); // moving from an rvalue reference shall never allocate\n\n  UIntPtr t0_address = reinterpret_cast<UIntPtr>(t0.indices().data());\n\n  // Move constructors:\n  TranspositionsType t1 = std::move(t0);\n  UIntPtr t1_address = reinterpret_cast<UIntPtr>(t1.indices().data());\n  VERIFY_IS_EQUAL(t0_address, t1_address);\n  // t0 must be de-allocated:\n  VERIFY_IS_EQUAL(t0.size(), 0);\n  VERIFY_IS_EQUAL(reinterpret_cast<UIntPtr>(t0.indices().data()), UIntPtr(0));\n\n\n  // Move assignment:\n  t0 = std::move(t1);\n  t0_address = reinterpret_cast<UIntPtr>(t0.indices().data());\n  VERIFY_IS_EQUAL(t0_address, t1_address);\n  // t1 must be de-allocated:\n  VERIFY_IS_EQUAL(t1.size(), 0);\n  VERIFY_IS_EQUAL(reinterpret_cast<UIntPtr>(t1.indices().data()), UIntPtr(0));\n\n  Eigen::internal::set_is_malloc_allowed(true);\n}\n#else\ntemplate <typename MatrixType>\nvoid rvalue_copyassign(const MatrixType&) {}\ntemplate<typename TranspositionsType>\nvoid rvalue_transpositions(Index) {}\n#endif\n\nEIGEN_DECLARE_TEST(rvalue_types)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1(rvalue_copyassign( MatrixXf::Random(50,50).eval() ));\n    CALL_SUBTEST_1(rvalue_copyassign( ArrayXXf::Random(50,50).eval() ));\n\n    CALL_SUBTEST_1(rvalue_copyassign( Matrix<float,1,Dynamic>::Random(50).eval() ));\n    CALL_SUBTEST_1(rvalue_copyassign( Array<float,1,Dynamic>::Random(50).eval() ));\n\n    CALL_SUBTEST_1(rvalue_copyassign( Matrix<float,Dynamic,1>::Random(50).eval() ));\n    CALL_SUBTEST_1(rvalue_copyassign( Array<float,Dynamic,1>::Random(50).eval() ));\n\n    CALL_SUBTEST_2(rvalue_copyassign( Array<float,2,1>::Random().eval() ));\n    CALL_SUBTEST_2(rvalue_copyassign( Array<float,3,1>::Random().eval() ));\n    CALL_SUBTEST_2(rvalue_copyassign( Array<float,4,1>::Random().eval() ));\n\n    CALL_SUBTEST_2(rvalue_copyassign( Array<float,2,2>::Random().eval() ));\n    CALL_SUBTEST_2(rvalue_copyassign( Array<float,3,3>::Random().eval() ));\n    CALL_SUBTEST_2(rvalue_copyassign( Array<float,4,4>::Random().eval() ));\n  \n    CALL_SUBTEST_3((rvalue_transpositions<PermutationMatrix<Dynamic, Dynamic, int> >(internal::random<int>(1,EIGEN_TEST_MAX_SIZE))));\n    CALL_SUBTEST_3((rvalue_transpositions<PermutationMatrix<Dynamic, Dynamic, Index> >(internal::random<int>(1,EIGEN_TEST_MAX_SIZE))));\n    CALL_SUBTEST_4((rvalue_transpositions<Transpositions<Dynamic, Dynamic, int> >(internal::random<int>(1,EIGEN_TEST_MAX_SIZE))));\n    CALL_SUBTEST_4((rvalue_transpositions<Transpositions<Dynamic, Dynamic, Index> >(internal::random<int>(1,EIGEN_TEST_MAX_SIZE))));\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/schur_complex.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010,2012 Jitse Niesen <jitse@maths.leeds.ac.uk>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <limits>\n#include <Eigen/Eigenvalues>\n\ntemplate<typename MatrixType> void schur(int size = MatrixType::ColsAtCompileTime)\n{\n  typedef typename ComplexSchur<MatrixType>::ComplexScalar ComplexScalar;\n  typedef typename ComplexSchur<MatrixType>::ComplexMatrixType ComplexMatrixType;\n\n  // Test basic functionality: T is triangular and A = U T U*\n  for(int counter = 0; counter < g_repeat; ++counter) {\n    MatrixType A = MatrixType::Random(size, size);\n    ComplexSchur<MatrixType> schurOfA(A);\n    VERIFY_IS_EQUAL(schurOfA.info(), Success);\n    ComplexMatrixType U = schurOfA.matrixU();\n    ComplexMatrixType T = schurOfA.matrixT();\n    for(int row = 1; row < size; ++row) {\n      for(int col = 0; col < row; ++col) {\n        VERIFY(T(row,col) == (typename MatrixType::Scalar)0);\n      }\n    }\n    VERIFY_IS_APPROX(A.template cast<ComplexScalar>(), U * T * U.adjoint());\n  }\n\n  // Test asserts when not initialized\n  ComplexSchur<MatrixType> csUninitialized;\n  VERIFY_RAISES_ASSERT(csUninitialized.matrixT());\n  VERIFY_RAISES_ASSERT(csUninitialized.matrixU());\n  VERIFY_RAISES_ASSERT(csUninitialized.info());\n  \n  // Test whether compute() and constructor returns same result\n  MatrixType A = MatrixType::Random(size, size);\n  ComplexSchur<MatrixType> cs1;\n  cs1.compute(A);\n  ComplexSchur<MatrixType> cs2(A);\n  VERIFY_IS_EQUAL(cs1.info(), Success);\n  VERIFY_IS_EQUAL(cs2.info(), Success);\n  VERIFY_IS_EQUAL(cs1.matrixT(), cs2.matrixT());\n  VERIFY_IS_EQUAL(cs1.matrixU(), cs2.matrixU());\n\n  // Test maximum number of iterations\n  ComplexSchur<MatrixType> cs3;\n  cs3.setMaxIterations(ComplexSchur<MatrixType>::m_maxIterationsPerRow * size).compute(A);\n  VERIFY_IS_EQUAL(cs3.info(), Success);\n  VERIFY_IS_EQUAL(cs3.matrixT(), cs1.matrixT());\n  VERIFY_IS_EQUAL(cs3.matrixU(), cs1.matrixU());\n  cs3.setMaxIterations(1).compute(A);\n  VERIFY_IS_EQUAL(cs3.info(), size > 1 ? NoConvergence : Success);\n  VERIFY_IS_EQUAL(cs3.getMaxIterations(), 1);\n\n  MatrixType Atriangular = A;\n  Atriangular.template triangularView<StrictlyLower>().setZero(); \n  cs3.setMaxIterations(1).compute(Atriangular); // triangular matrices do not need any iterations\n  VERIFY_IS_EQUAL(cs3.info(), Success);\n  VERIFY_IS_EQUAL(cs3.matrixT(), Atriangular.template cast<ComplexScalar>());\n  VERIFY_IS_EQUAL(cs3.matrixU(), ComplexMatrixType::Identity(size, size));\n\n  // Test computation of only T, not U\n  ComplexSchur<MatrixType> csOnlyT(A, false);\n  VERIFY_IS_EQUAL(csOnlyT.info(), Success);\n  VERIFY_IS_EQUAL(cs1.matrixT(), csOnlyT.matrixT());\n  VERIFY_RAISES_ASSERT(csOnlyT.matrixU());\n\n  if (size > 1 && size < 20)\n  {\n    // Test matrix with NaN\n    A(0,0) = std::numeric_limits<typename MatrixType::RealScalar>::quiet_NaN();\n    ComplexSchur<MatrixType> csNaN(A);\n    VERIFY_IS_EQUAL(csNaN.info(), NoConvergence);\n  }\n}\n\nEIGEN_DECLARE_TEST(schur_complex)\n{\n  CALL_SUBTEST_1(( schur<Matrix4cd>() ));\n  CALL_SUBTEST_2(( schur<MatrixXcf>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE/4)) ));\n  CALL_SUBTEST_3(( schur<Matrix<std::complex<float>, 1, 1> >() ));\n  CALL_SUBTEST_4(( schur<Matrix<float, 3, 3, Eigen::RowMajor> >() ));\n\n  // Test problem size constructors\n  CALL_SUBTEST_5(ComplexSchur<MatrixXf>(10));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/schur_real.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010,2012 Jitse Niesen <jitse@maths.leeds.ac.uk>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <limits>\n#include <Eigen/Eigenvalues>\n\ntemplate<typename MatrixType> void verifyIsQuasiTriangular(const MatrixType& T)\n{\n  const Index size = T.cols();\n  typedef typename MatrixType::Scalar Scalar;\n\n  // Check T is lower Hessenberg\n  for(int row = 2; row < size; ++row) {\n    for(int col = 0; col < row - 1; ++col) {\n      VERIFY(T(row,col) == Scalar(0));\n    }\n  }\n\n  // Check that any non-zero on the subdiagonal is followed by a zero and is\n  // part of a 2x2 diagonal block with imaginary eigenvalues.\n  for(int row = 1; row < size; ++row) {\n    if (T(row,row-1) != Scalar(0)) {\n      VERIFY(row == size-1 || T(row+1,row) == 0);\n      Scalar tr = T(row-1,row-1) + T(row,row);\n      Scalar det = T(row-1,row-1) * T(row,row) - T(row-1,row) * T(row,row-1);\n      VERIFY(4 * det > tr * tr);\n    }\n  }\n}\n\ntemplate<typename MatrixType> void schur(int size = MatrixType::ColsAtCompileTime)\n{\n  // Test basic functionality: T is quasi-triangular and A = U T U*\n  for(int counter = 0; counter < g_repeat; ++counter) {\n    MatrixType A = MatrixType::Random(size, size);\n    RealSchur<MatrixType> schurOfA(A);\n    VERIFY_IS_EQUAL(schurOfA.info(), Success);\n    MatrixType U = schurOfA.matrixU();\n    MatrixType T = schurOfA.matrixT();\n    verifyIsQuasiTriangular(T);\n    VERIFY_IS_APPROX(A, U * T * U.transpose());\n  }\n\n  // Test asserts when not initialized\n  RealSchur<MatrixType> rsUninitialized;\n  VERIFY_RAISES_ASSERT(rsUninitialized.matrixT());\n  VERIFY_RAISES_ASSERT(rsUninitialized.matrixU());\n  VERIFY_RAISES_ASSERT(rsUninitialized.info());\n  \n  // Test whether compute() and constructor returns same result\n  MatrixType A = MatrixType::Random(size, size);\n  RealSchur<MatrixType> rs1;\n  rs1.compute(A);\n  RealSchur<MatrixType> rs2(A);\n  VERIFY_IS_EQUAL(rs1.info(), Success);\n  VERIFY_IS_EQUAL(rs2.info(), Success);\n  VERIFY_IS_EQUAL(rs1.matrixT(), rs2.matrixT());\n  VERIFY_IS_EQUAL(rs1.matrixU(), rs2.matrixU());\n\n  // Test maximum number of iterations\n  RealSchur<MatrixType> rs3;\n  rs3.setMaxIterations(RealSchur<MatrixType>::m_maxIterationsPerRow * size).compute(A);\n  VERIFY_IS_EQUAL(rs3.info(), Success);\n  VERIFY_IS_EQUAL(rs3.matrixT(), rs1.matrixT());\n  VERIFY_IS_EQUAL(rs3.matrixU(), rs1.matrixU());\n  if (size > 2) {\n    rs3.setMaxIterations(1).compute(A);\n    VERIFY_IS_EQUAL(rs3.info(), NoConvergence);\n    VERIFY_IS_EQUAL(rs3.getMaxIterations(), 1);\n  }\n\n  MatrixType Atriangular = A;\n  Atriangular.template triangularView<StrictlyLower>().setZero(); \n  rs3.setMaxIterations(1).compute(Atriangular); // triangular matrices do not need any iterations\n  VERIFY_IS_EQUAL(rs3.info(), Success);\n  VERIFY_IS_APPROX(rs3.matrixT(), Atriangular); // approx because of scaling...\n  VERIFY_IS_EQUAL(rs3.matrixU(), MatrixType::Identity(size, size));\n\n  // Test computation of only T, not U\n  RealSchur<MatrixType> rsOnlyT(A, false);\n  VERIFY_IS_EQUAL(rsOnlyT.info(), Success);\n  VERIFY_IS_EQUAL(rs1.matrixT(), rsOnlyT.matrixT());\n  VERIFY_RAISES_ASSERT(rsOnlyT.matrixU());\n\n  if (size > 2 && size < 20)\n  {\n    // Test matrix with NaN\n    A(0,0) = std::numeric_limits<typename MatrixType::Scalar>::quiet_NaN();\n    RealSchur<MatrixType> rsNaN(A);\n    VERIFY_IS_EQUAL(rsNaN.info(), NoConvergence);\n  }\n}\n\nEIGEN_DECLARE_TEST(schur_real)\n{\n  CALL_SUBTEST_1(( schur<Matrix4f>() ));\n  CALL_SUBTEST_2(( schur<MatrixXd>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE/4)) ));\n  CALL_SUBTEST_3(( schur<Matrix<float, 1, 1> >() ));\n  CALL_SUBTEST_4(( schur<Matrix<double, 3, 3, Eigen::RowMajor> >() ));\n\n  // Test problem size constructors\n  CALL_SUBTEST_5(RealSchur<MatrixXf>(10));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/selfadjoint.cpp",
    "content": "// This file is triangularView of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define TEST_CHECK_STATIC_ASSERTIONS\n#include \"main.h\"\n\n// This file tests the basic selfadjointView API,\n// the related products and decompositions are tested in specific files.\n\ntemplate<typename MatrixType> void selfadjoint(const MatrixType& m)\n{\n  typedef typename MatrixType::Scalar Scalar;\n\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  MatrixType m1 = MatrixType::Random(rows, cols),\n             m2 = MatrixType::Random(rows, cols),\n             m3(rows, cols),\n             m4(rows, cols);\n\n  m1.diagonal() = m1.diagonal().real().template cast<Scalar>();\n\n  // check selfadjoint to dense\n  m3 = m1.template selfadjointView<Upper>();\n  VERIFY_IS_APPROX(MatrixType(m3.template triangularView<Upper>()), MatrixType(m1.template triangularView<Upper>()));\n  VERIFY_IS_APPROX(m3, m3.adjoint());\n\n  m3 = m1.template selfadjointView<Lower>();\n  VERIFY_IS_APPROX(MatrixType(m3.template triangularView<Lower>()), MatrixType(m1.template triangularView<Lower>()));\n  VERIFY_IS_APPROX(m3, m3.adjoint());\n\n  m3 = m1.template selfadjointView<Upper>();\n  m4 = m2;\n  m4 += m1.template selfadjointView<Upper>();\n  VERIFY_IS_APPROX(m4, m2+m3);\n\n  m3 = m1.template selfadjointView<Lower>();\n  m4 = m2;\n  m4 -= m1.template selfadjointView<Lower>();\n  VERIFY_IS_APPROX(m4, m2-m3);\n\n  VERIFY_RAISES_STATIC_ASSERT(m2.template selfadjointView<StrictlyUpper>());\n  VERIFY_RAISES_STATIC_ASSERT(m2.template selfadjointView<UnitLower>());\n}\n\nvoid bug_159()\n{\n  Matrix3d m = Matrix3d::Random().selfadjointView<Lower>();\n  EIGEN_UNUSED_VARIABLE(m)\n}\n\nEIGEN_DECLARE_TEST(selfadjoint)\n{\n  for(int i = 0; i < g_repeat ; i++)\n  {\n    int s = internal::random<int>(1,EIGEN_TEST_MAX_SIZE);\n\n    CALL_SUBTEST_1( selfadjoint(Matrix<float, 1, 1>()) );\n    CALL_SUBTEST_2( selfadjoint(Matrix<float, 2, 2>()) );\n    CALL_SUBTEST_3( selfadjoint(Matrix3cf()) );\n    CALL_SUBTEST_4( selfadjoint(MatrixXcd(s,s)) );\n    CALL_SUBTEST_5( selfadjoint(Matrix<float,Dynamic,Dynamic,RowMajor>(s, s)) );\n    \n    TEST_SET_BUT_UNUSED_VARIABLE(s)\n  }\n  \n  CALL_SUBTEST_1( bug_159() );\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/simplicial_cholesky.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2011 Gael Guennebaud <g.gael@free.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"sparse_solver.h\"\n\ntemplate<typename T, typename I_> void test_simplicial_cholesky_T()\n{\n  typedef SparseMatrix<T,0,I_> SparseMatrixType;\n  SimplicialCholesky<SparseMatrixType, Lower> chol_colmajor_lower_amd;\n  SimplicialCholesky<SparseMatrixType, Upper> chol_colmajor_upper_amd;\n  SimplicialLLT<     SparseMatrixType, Lower> llt_colmajor_lower_amd;\n  SimplicialLLT<     SparseMatrixType, Upper> llt_colmajor_upper_amd;\n  SimplicialLDLT<    SparseMatrixType, Lower> ldlt_colmajor_lower_amd;\n  SimplicialLDLT<    SparseMatrixType, Upper> ldlt_colmajor_upper_amd;\n  SimplicialLDLT<    SparseMatrixType, Lower, NaturalOrdering<I_> > ldlt_colmajor_lower_nat;\n  SimplicialLDLT<    SparseMatrixType, Upper, NaturalOrdering<I_> > ldlt_colmajor_upper_nat;\n\n  check_sparse_spd_solving(chol_colmajor_lower_amd);\n  check_sparse_spd_solving(chol_colmajor_upper_amd);\n  check_sparse_spd_solving(llt_colmajor_lower_amd);\n  check_sparse_spd_solving(llt_colmajor_upper_amd);\n  check_sparse_spd_solving(ldlt_colmajor_lower_amd);\n  check_sparse_spd_solving(ldlt_colmajor_upper_amd);\n  \n  check_sparse_spd_determinant(chol_colmajor_lower_amd);\n  check_sparse_spd_determinant(chol_colmajor_upper_amd);\n  check_sparse_spd_determinant(llt_colmajor_lower_amd);\n  check_sparse_spd_determinant(llt_colmajor_upper_amd);\n  check_sparse_spd_determinant(ldlt_colmajor_lower_amd);\n  check_sparse_spd_determinant(ldlt_colmajor_upper_amd);\n  \n  check_sparse_spd_solving(ldlt_colmajor_lower_nat, (std::min)(300,EIGEN_TEST_MAX_SIZE), 1000);\n  check_sparse_spd_solving(ldlt_colmajor_upper_nat, (std::min)(300,EIGEN_TEST_MAX_SIZE), 1000);\n}\n\nEIGEN_DECLARE_TEST(simplicial_cholesky)\n{\n  CALL_SUBTEST_1(( test_simplicial_cholesky_T<double,int>() ));\n  CALL_SUBTEST_2(( test_simplicial_cholesky_T<std::complex<double>, int>() ));\n  CALL_SUBTEST_3(( test_simplicial_cholesky_T<double,long int>() ));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/sizeof.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\ntemplate<typename MatrixType> void verifySizeOf(const MatrixType&)\n{\n  typedef typename MatrixType::Scalar Scalar;\n  if (MatrixType::RowsAtCompileTime!=Dynamic && MatrixType::ColsAtCompileTime!=Dynamic)\n    VERIFY_IS_EQUAL(std::ptrdiff_t(sizeof(MatrixType)),std::ptrdiff_t(sizeof(Scalar))*std::ptrdiff_t(MatrixType::SizeAtCompileTime));\n  else\n    VERIFY_IS_EQUAL(sizeof(MatrixType),sizeof(Scalar*) + 2 * sizeof(Index));\n}\n\nEIGEN_DECLARE_TEST(sizeof)\n{\n  CALL_SUBTEST(verifySizeOf(Matrix<float, 1, 1>()) );\n  CALL_SUBTEST(verifySizeOf(Array<float, 2, 1>()) );\n  CALL_SUBTEST(verifySizeOf(Array<float, 3, 1>()) );\n  CALL_SUBTEST(verifySizeOf(Array<float, 4, 1>()) );\n  CALL_SUBTEST(verifySizeOf(Array<float, 5, 1>()) );\n  CALL_SUBTEST(verifySizeOf(Array<float, 6, 1>()) );\n  CALL_SUBTEST(verifySizeOf(Array<float, 7, 1>()) );\n  CALL_SUBTEST(verifySizeOf(Array<float, 8, 1>()) );\n  CALL_SUBTEST(verifySizeOf(Array<float, 9, 1>()) );\n  CALL_SUBTEST(verifySizeOf(Array<float, 10, 1>()) );\n  CALL_SUBTEST(verifySizeOf(Array<float, 11, 1>()) );\n  CALL_SUBTEST(verifySizeOf(Array<float, 12, 1>()) );\n  CALL_SUBTEST(verifySizeOf(Vector2d()) );\n  CALL_SUBTEST(verifySizeOf(Vector4f()) );\n  CALL_SUBTEST(verifySizeOf(Matrix4d()) );\n  CALL_SUBTEST(verifySizeOf(Matrix<double, 4, 2>()) );\n  CALL_SUBTEST(verifySizeOf(Matrix<bool, 7, 5>()) );\n  CALL_SUBTEST(verifySizeOf(MatrixXcf(3, 3)) );\n  CALL_SUBTEST(verifySizeOf(MatrixXi(8, 12)) );\n  CALL_SUBTEST(verifySizeOf(MatrixXcd(20, 20)) );\n  CALL_SUBTEST(verifySizeOf(Matrix<float, 100, 100>()) );\n  \n  VERIFY(sizeof(std::complex<float>) == 2*sizeof(float));\n  VERIFY(sizeof(std::complex<double>) == 2*sizeof(double));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/sizeoverflow.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2011 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#define VERIFY_THROWS_BADALLOC(a) {                           \\\n    bool threw = false;                                       \\\n    try {                                                     \\\n      a;                                                      \\\n    }                                                         \\\n    catch (std::bad_alloc&) { threw = true; }                 \\\n    VERIFY(threw && \"should have thrown bad_alloc: \" #a);     \\\n  }\n\ntemplate<typename MatrixType>\nvoid triggerMatrixBadAlloc(Index rows, Index cols)\n{\n  VERIFY_THROWS_BADALLOC( MatrixType m(rows, cols) );\n  VERIFY_THROWS_BADALLOC( MatrixType m; m.resize(rows, cols) );\n  VERIFY_THROWS_BADALLOC( MatrixType m; m.conservativeResize(rows, cols) );\n}\n\ntemplate<typename VectorType>\nvoid triggerVectorBadAlloc(Index size)\n{\n  VERIFY_THROWS_BADALLOC( VectorType v(size) );\n  VERIFY_THROWS_BADALLOC( VectorType v; v.resize(size) );\n  VERIFY_THROWS_BADALLOC( VectorType v; v.conservativeResize(size) );\n}\n\nEIGEN_DECLARE_TEST(sizeoverflow)\n{\n  // there are 2 levels of overflow checking. first in PlainObjectBase.h we check for overflow in rows*cols computations.\n  // this is tested in tests of the form times_itself_gives_0 * times_itself_gives_0\n  // Then in Memory.h we check for overflow in size * sizeof(T) computations.\n  // this is tested in tests of the form times_4_gives_0 * sizeof(float)\n  \n  size_t times_itself_gives_0 = size_t(1) << (8 * sizeof(Index) / 2);\n  VERIFY(times_itself_gives_0 * times_itself_gives_0 == 0);\n\n  size_t times_4_gives_0 = size_t(1) << (8 * sizeof(Index) - 2);\n  VERIFY(times_4_gives_0 * 4 == 0);\n\n  size_t times_8_gives_0 = size_t(1) << (8 * sizeof(Index) - 3);\n  VERIFY(times_8_gives_0 * 8 == 0);\n\n  triggerMatrixBadAlloc<MatrixXf>(times_itself_gives_0, times_itself_gives_0);\n  triggerMatrixBadAlloc<MatrixXf>(times_itself_gives_0 / 4, times_itself_gives_0);\n  triggerMatrixBadAlloc<MatrixXf>(times_4_gives_0, 1);\n\n  triggerMatrixBadAlloc<MatrixXd>(times_itself_gives_0, times_itself_gives_0);\n  triggerMatrixBadAlloc<MatrixXd>(times_itself_gives_0 / 8, times_itself_gives_0);\n  triggerMatrixBadAlloc<MatrixXd>(times_8_gives_0, 1);\n  \n  triggerVectorBadAlloc<VectorXf>(times_4_gives_0);\n  \n  triggerVectorBadAlloc<VectorXd>(times_8_gives_0);\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/smallvectors.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_NO_STATIC_ASSERT\n#include \"main.h\"\n\ntemplate<typename Scalar> void smallVectors()\n{\n  typedef Matrix<Scalar, 1, 2> V2;\n  typedef Matrix<Scalar, 3, 1> V3;\n  typedef Matrix<Scalar, 1, 4> V4;\n  typedef Matrix<Scalar, Dynamic, 1> VX;\n  Scalar x1 = internal::random<Scalar>(),\n         x2 = internal::random<Scalar>(),\n         x3 = internal::random<Scalar>(),\n         x4 = internal::random<Scalar>();\n  V2 v2(x1, x2);\n  V3 v3(x1, x2, x3);\n  V4 v4(x1, x2, x3, x4);\n  VERIFY_IS_APPROX(x1, v2.x());\n  VERIFY_IS_APPROX(x1, v3.x());\n  VERIFY_IS_APPROX(x1, v4.x());\n  VERIFY_IS_APPROX(x2, v2.y());\n  VERIFY_IS_APPROX(x2, v3.y());\n  VERIFY_IS_APPROX(x2, v4.y());\n  VERIFY_IS_APPROX(x3, v3.z());\n  VERIFY_IS_APPROX(x3, v4.z());\n  VERIFY_IS_APPROX(x4, v4.w());\n\n  if (!NumTraits<Scalar>::IsInteger)\n  {\n    VERIFY_RAISES_ASSERT(V3(2, 1))\n    VERIFY_RAISES_ASSERT(V3(3, 2))\n    VERIFY_RAISES_ASSERT(V3(Scalar(3), 1))\n    VERIFY_RAISES_ASSERT(V3(3, Scalar(1)))\n    VERIFY_RAISES_ASSERT(V3(Scalar(3), Scalar(1)))\n    VERIFY_RAISES_ASSERT(V3(Scalar(123), Scalar(123)))\n\n    VERIFY_RAISES_ASSERT(V4(1, 3))\n    VERIFY_RAISES_ASSERT(V4(2, 4))\n    VERIFY_RAISES_ASSERT(V4(1, Scalar(4)))\n    VERIFY_RAISES_ASSERT(V4(Scalar(1), 4))\n    VERIFY_RAISES_ASSERT(V4(Scalar(1), Scalar(4)))\n    VERIFY_RAISES_ASSERT(V4(Scalar(123), Scalar(123)))\n\n    VERIFY_RAISES_ASSERT(VX(3, 2))\n    VERIFY_RAISES_ASSERT(VX(Scalar(3), 1))\n    VERIFY_RAISES_ASSERT(VX(3, Scalar(1)))\n    VERIFY_RAISES_ASSERT(VX(Scalar(3), Scalar(1)))\n    VERIFY_RAISES_ASSERT(VX(Scalar(123), Scalar(123)))\n  }\n}\n\nEIGEN_DECLARE_TEST(smallvectors)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST(smallVectors<int>() );\n    CALL_SUBTEST(smallVectors<float>() );\n    CALL_SUBTEST(smallVectors<double>() );\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/solverbase.h",
    "content": "#ifndef TEST_SOLVERBASE_H\n#define TEST_SOLVERBASE_H\n\ntemplate<typename DstType, typename RhsType, typename MatrixType, typename SolverType>\nvoid check_solverbase(const MatrixType& matrix, const SolverType& solver, Index rows, Index cols, Index cols2)\n{\n  // solve\n  DstType m2               = DstType::Random(cols,cols2);\n  RhsType m3               = matrix*m2;\n  DstType solver_solution  = DstType::Random(cols,cols2);\n  solver._solve_impl(m3, solver_solution);\n  VERIFY_IS_APPROX(m3, matrix*solver_solution);\n  solver_solution          = DstType::Random(cols,cols2);\n  solver_solution          = solver.solve(m3);\n  VERIFY_IS_APPROX(m3, matrix*solver_solution);\n  // test solve with transposed\n  m3                       = RhsType::Random(rows,cols2);\n  m2                       = matrix.transpose()*m3;\n  RhsType solver_solution2 = RhsType::Random(rows,cols2);\n  solver.template _solve_impl_transposed<false>(m2, solver_solution2);\n  VERIFY_IS_APPROX(m2, matrix.transpose()*solver_solution2);\n  solver_solution2         = RhsType::Random(rows,cols2);\n  solver_solution2         = solver.transpose().solve(m2);\n  VERIFY_IS_APPROX(m2, matrix.transpose()*solver_solution2);\n  // test solve with conjugate transposed\n  m3                       = RhsType::Random(rows,cols2);\n  m2                       = matrix.adjoint()*m3;\n  solver_solution2         = RhsType::Random(rows,cols2);\n  solver.template _solve_impl_transposed<true>(m2, solver_solution2);\n  VERIFY_IS_APPROX(m2, matrix.adjoint()*solver_solution2);\n  solver_solution2         = RhsType::Random(rows,cols2);\n  solver_solution2         = solver.adjoint().solve(m2);\n  VERIFY_IS_APPROX(m2, matrix.adjoint()*solver_solution2);\n}\n\n#endif // TEST_SOLVERBASE_H\n"
  },
  {
    "path": "3rdparty/eigen3/test/sparse.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2011 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_TESTSPARSE_H\n#define EIGEN_TESTSPARSE_H\n\n#define EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET\n\n#include \"main.h\"\n\n#if EIGEN_HAS_CXX11\n\n#ifdef min\n#undef min\n#endif\n\n#ifdef max\n#undef max\n#endif\n\n#include <unordered_map>\n#define EIGEN_UNORDERED_MAP_SUPPORT\n\n#endif\n\n#ifdef EIGEN_GOOGLEHASH_SUPPORT\n  #include <google/sparse_hash_map>\n#endif\n\n#include <Eigen/Cholesky>\n#include <Eigen/LU>\n#include <Eigen/Sparse>\n\nenum {\n  ForceNonZeroDiag = 1,\n  MakeLowerTriangular = 2,\n  MakeUpperTriangular = 4,\n  ForceRealDiag = 8\n};\n\n/* Initializes both a sparse and dense matrix with same random values,\n * and a ratio of \\a density non zero entries.\n * \\param flags is a union of ForceNonZeroDiag, MakeLowerTriangular and MakeUpperTriangular\n *        allowing to control the shape of the matrix.\n * \\param zeroCoords and nonzeroCoords allows to get the coordinate lists of the non zero,\n *        and zero coefficients respectively.\n */\ntemplate<typename Scalar,int Opt1,int Opt2,typename StorageIndex> void\ninitSparse(double density,\n           Matrix<Scalar,Dynamic,Dynamic,Opt1>& refMat,\n           SparseMatrix<Scalar,Opt2,StorageIndex>& sparseMat,\n           int flags = 0,\n           std::vector<Matrix<StorageIndex,2,1> >* zeroCoords = 0,\n           std::vector<Matrix<StorageIndex,2,1> >* nonzeroCoords = 0)\n{\n  enum { IsRowMajor = SparseMatrix<Scalar,Opt2,StorageIndex>::IsRowMajor };\n  sparseMat.setZero();\n  //sparseMat.reserve(int(refMat.rows()*refMat.cols()*density));\n  sparseMat.reserve(VectorXi::Constant(IsRowMajor ? refMat.rows() : refMat.cols(), int((1.5*density)*(IsRowMajor?refMat.cols():refMat.rows()))));\n  \n  for(Index j=0; j<sparseMat.outerSize(); j++)\n  {\n    //sparseMat.startVec(j);\n    for(Index i=0; i<sparseMat.innerSize(); i++)\n    {\n      Index ai(i), aj(j);\n      if(IsRowMajor)\n        std::swap(ai,aj);\n      Scalar v = (internal::random<double>(0,1) < density) ? internal::random<Scalar>() : Scalar(0);\n      if ((flags&ForceNonZeroDiag) && (i==j))\n      {\n        // FIXME: the following is too conservative\n        v = internal::random<Scalar>()*Scalar(3.);\n        v = v*v;\n        if(numext::real(v)>0) v += Scalar(5);\n        else                  v -= Scalar(5);\n      }\n      if ((flags & MakeLowerTriangular) && aj>ai)\n        v = Scalar(0);\n      else if ((flags & MakeUpperTriangular) && aj<ai)\n        v = Scalar(0);\n\n      if ((flags&ForceRealDiag) && (i==j))\n        v = numext::real(v);\n\n      if (v!=Scalar(0))\n      {\n        //sparseMat.insertBackByOuterInner(j,i) = v;\n        sparseMat.insertByOuterInner(j,i) = v;\n        if (nonzeroCoords)\n          nonzeroCoords->push_back(Matrix<StorageIndex,2,1> (ai,aj));\n      }\n      else if (zeroCoords)\n      {\n        zeroCoords->push_back(Matrix<StorageIndex,2,1> (ai,aj));\n      }\n      refMat(ai,aj) = v;\n    }\n  }\n  //sparseMat.finalize();\n}\n\ntemplate<typename Scalar,int Opt1,int Opt2,typename Index> void\ninitSparse(double density,\n           Matrix<Scalar,Dynamic,Dynamic, Opt1>& refMat,\n           DynamicSparseMatrix<Scalar, Opt2, Index>& sparseMat,\n           int flags = 0,\n           std::vector<Matrix<Index,2,1> >* zeroCoords = 0,\n           std::vector<Matrix<Index,2,1> >* nonzeroCoords = 0)\n{\n  enum { IsRowMajor = DynamicSparseMatrix<Scalar,Opt2,Index>::IsRowMajor };\n  sparseMat.setZero();\n  sparseMat.reserve(int(refMat.rows()*refMat.cols()*density));\n  for(int j=0; j<sparseMat.outerSize(); j++)\n  {\n    sparseMat.startVec(j); // not needed for DynamicSparseMatrix\n    for(int i=0; i<sparseMat.innerSize(); i++)\n    {\n      int ai(i), aj(j);\n      if(IsRowMajor)\n        std::swap(ai,aj);\n      Scalar v = (internal::random<double>(0,1) < density) ? internal::random<Scalar>() : Scalar(0);\n      if ((flags&ForceNonZeroDiag) && (i==j))\n      {\n        v = internal::random<Scalar>()*Scalar(3.);\n        v = v*v + Scalar(5.);\n      }\n      if ((flags & MakeLowerTriangular) && aj>ai)\n        v = Scalar(0);\n      else if ((flags & MakeUpperTriangular) && aj<ai)\n        v = Scalar(0);\n\n      if ((flags&ForceRealDiag) && (i==j))\n        v = numext::real(v);\n\n      if (v!=Scalar(0))\n      {\n        sparseMat.insertBackByOuterInner(j,i) = v;\n        if (nonzeroCoords)\n          nonzeroCoords->push_back(Matrix<Index,2,1> (ai,aj));\n      }\n      else if (zeroCoords)\n      {\n        zeroCoords->push_back(Matrix<Index,2,1> (ai,aj));\n      }\n      refMat(ai,aj) = v;\n    }\n  }\n  sparseMat.finalize();\n}\n\ntemplate<typename Scalar,int Options,typename Index> void\ninitSparse(double density,\n           Matrix<Scalar,Dynamic,1>& refVec,\n           SparseVector<Scalar,Options,Index>& sparseVec,\n           std::vector<int>* zeroCoords = 0,\n           std::vector<int>* nonzeroCoords = 0)\n{\n  sparseVec.reserve(int(refVec.size()*density));\n  sparseVec.setZero();\n  for(int i=0; i<refVec.size(); i++)\n  {\n    Scalar v = (internal::random<double>(0,1) < density) ? internal::random<Scalar>() : Scalar(0);\n    if (v!=Scalar(0))\n    {\n      sparseVec.insertBack(i) = v;\n      if (nonzeroCoords)\n        nonzeroCoords->push_back(i);\n    }\n    else if (zeroCoords)\n        zeroCoords->push_back(i);\n    refVec[i] = v;\n  }\n}\n\ntemplate<typename Scalar,int Options,typename Index> void\ninitSparse(double density,\n           Matrix<Scalar,1,Dynamic>& refVec,\n           SparseVector<Scalar,Options,Index>& sparseVec,\n           std::vector<int>* zeroCoords = 0,\n           std::vector<int>* nonzeroCoords = 0)\n{\n  sparseVec.reserve(int(refVec.size()*density));\n  sparseVec.setZero();\n  for(int i=0; i<refVec.size(); i++)\n  {\n    Scalar v = (internal::random<double>(0,1) < density) ? internal::random<Scalar>() : Scalar(0);\n    if (v!=Scalar(0))\n    {\n      sparseVec.insertBack(i) = v;\n      if (nonzeroCoords)\n        nonzeroCoords->push_back(i);\n    }\n    else if (zeroCoords)\n        zeroCoords->push_back(i);\n    refVec[i] = v;\n  }\n}\n\n\n#include <unsupported/Eigen/SparseExtra>\n#endif // EIGEN_TESTSPARSE_H\n"
  },
  {
    "path": "3rdparty/eigen3/test/sparseLM.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Desire Nuentsa <desire.nuentsa_wakam@inria.fr>\n// Copyright (C) 2012 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n#include <iostream>\n#include <fstream>\n#include <iomanip>\n\n#include \"main.h\"\n#include <Eigen/LevenbergMarquardt>\n\nusing namespace std;\nusing namespace Eigen;\n\ntemplate <typename Scalar>\nstruct sparseGaussianTest : SparseFunctor<Scalar, int>\n{\n  typedef Matrix<Scalar,Dynamic,1> VectorType;\n  typedef SparseFunctor<Scalar,int> Base;\n  typedef typename Base::JacobianType JacobianType;\n  sparseGaussianTest(int inputs, int values) : SparseFunctor<Scalar,int>(inputs,values)\n  { }\n  \n  VectorType model(const VectorType& uv, VectorType& x)\n  {\n    VectorType y; //Change this to use expression template\n    int m = Base::values(); \n    int n = Base::inputs();\n    eigen_assert(uv.size()%2 == 0);\n    eigen_assert(uv.size() == n);\n    eigen_assert(x.size() == m);\n    y.setZero(m);\n    int half = n/2;\n    VectorBlock<const VectorType> u(uv, 0, half);\n    VectorBlock<const VectorType> v(uv, half, half);\n    Scalar coeff;\n    for (int j = 0; j < m; j++)\n    {\n      for (int i = 0; i < half; i++) \n      {\n        coeff = (x(j)-i)/v(i);\n        coeff *= coeff;\n        if (coeff < 1. && coeff > 0.)\n          y(j) += u(i)*std::pow((1-coeff), 2);\n      }\n    }\n    return y;\n  }\n  void initPoints(VectorType& uv_ref, VectorType& x)\n  {\n    m_x = x;\n    m_y = this->model(uv_ref,x);\n  }\n  int operator()(const VectorType& uv, VectorType& fvec)\n  {\n    int m = Base::values(); \n    int n = Base::inputs();\n    eigen_assert(uv.size()%2 == 0);\n    eigen_assert(uv.size() == n);\n    int half = n/2;\n    VectorBlock<const VectorType> u(uv, 0, half);\n    VectorBlock<const VectorType> v(uv, half, half);\n    fvec = m_y;\n    Scalar coeff;\n    for (int j = 0; j < m; j++)\n    {\n      for (int i = 0; i < half; i++)\n      {\n        coeff = (m_x(j)-i)/v(i);\n        coeff *= coeff;\n        if (coeff < 1. && coeff > 0.)\n          fvec(j) -= u(i)*std::pow((1-coeff), 2);\n      }\n    }\n    return 0;\n  }\n  \n  int df(const VectorType& uv, JacobianType& fjac)\n  {\n    int m = Base::values(); \n    int n = Base::inputs();\n    eigen_assert(n == uv.size());\n    eigen_assert(fjac.rows() == m);\n    eigen_assert(fjac.cols() == n);\n    int half = n/2;\n    VectorBlock<const VectorType> u(uv, 0, half);\n    VectorBlock<const VectorType> v(uv, half, half);\n    Scalar coeff;\n    \n    //Derivatives with respect to u\n    for (int col = 0; col < half; col++)\n    {\n      for (int row = 0; row < m; row++)\n      {\n        coeff = (m_x(row)-col)/v(col);\n          coeff = coeff*coeff;\n        if(coeff < 1. && coeff > 0.)\n        {\n          fjac.coeffRef(row,col) = -(1-coeff)*(1-coeff);\n        }\n      }\n    }\n    //Derivatives with respect to v\n    for (int col = 0; col < half; col++)\n    {\n      for (int row = 0; row < m; row++)\n      {\n        coeff = (m_x(row)-col)/v(col);\n        coeff = coeff*coeff;\n        if(coeff < 1. && coeff > 0.)\n        {\n          fjac.coeffRef(row,col+half) = -4 * (u(col)/v(col))*coeff*(1-coeff);\n        }\n      }\n    }\n    return 0;\n  }\n  \n  VectorType m_x, m_y; //Data points\n};\n\n\ntemplate<typename T>\nvoid test_sparseLM_T()\n{\n  typedef Matrix<T,Dynamic,1> VectorType;\n  \n  int inputs = 10;\n  int values = 2000;\n  sparseGaussianTest<T> sparse_gaussian(inputs, values);\n  VectorType uv(inputs),uv_ref(inputs);\n  VectorType x(values);\n  // Generate the reference solution \n  uv_ref << -2, 1, 4 ,8, 6, 1.8, 1.2, 1.1, 1.9 , 3;\n  //Generate the reference data points\n  x.setRandom();\n  x = 10*x;\n  x.array() += 10;\n  sparse_gaussian.initPoints(uv_ref, x);\n  \n  \n  // Generate the initial parameters \n  VectorBlock<VectorType> u(uv, 0, inputs/2); \n  VectorBlock<VectorType> v(uv, inputs/2, inputs/2);\n  v.setOnes();\n  //Generate u or Solve for u from v\n  u.setOnes();\n  \n  // Solve the optimization problem\n  LevenbergMarquardt<sparseGaussianTest<T> > lm(sparse_gaussian);\n  int info;\n//   info = lm.minimize(uv);\n  \n  VERIFY_IS_EQUAL(info,1);\n    // Do a step by step solution and save the residual \n  int maxiter = 200;\n  int iter = 0;\n  MatrixXd Err(values, maxiter);\n  MatrixXd Mod(values, maxiter);\n  LevenbergMarquardtSpace::Status status; \n  status = lm.minimizeInit(uv);\n  if (status==LevenbergMarquardtSpace::ImproperInputParameters)\n      return ;\n\n}\nEIGEN_DECLARE_TEST(sparseLM)\n{\n  CALL_SUBTEST_1(test_sparseLM_T<double>());\n  \n  // CALL_SUBTEST_2(test_sparseLM_T<std::complex<double>());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/sparse_basic.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2011 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2008 Daniel Gomez Ferro <dgomezferro@gmail.com>\n// Copyright (C) 2013 Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPARSE_TEST_INCLUDED_FROM_SPARSE_EXTRA\nstatic long g_realloc_count = 0;\n#define EIGEN_SPARSE_COMPRESSED_STORAGE_REALLOCATE_PLUGIN g_realloc_count++;\n\nstatic long g_dense_op_sparse_count = 0;\n#define EIGEN_SPARSE_ASSIGNMENT_FROM_DENSE_OP_SPARSE_PLUGIN g_dense_op_sparse_count++;\n#define EIGEN_SPARSE_ASSIGNMENT_FROM_SPARSE_ADD_DENSE_PLUGIN g_dense_op_sparse_count+=10;\n#define EIGEN_SPARSE_ASSIGNMENT_FROM_SPARSE_SUB_DENSE_PLUGIN g_dense_op_sparse_count+=20;\n#endif\n\n#include \"sparse.h\"\n\ntemplate<typename SparseMatrixType> void sparse_basic(const SparseMatrixType& ref)\n{\n  typedef typename SparseMatrixType::StorageIndex StorageIndex;\n  typedef Matrix<StorageIndex,2,1> Vector2;\n  \n  const Index rows = ref.rows();\n  const Index cols = ref.cols();\n  //const Index inner = ref.innerSize();\n  //const Index outer = ref.outerSize();\n\n  typedef typename SparseMatrixType::Scalar Scalar;\n  typedef typename SparseMatrixType::RealScalar RealScalar;\n  enum { Flags = SparseMatrixType::Flags };\n\n  double density = (std::max)(8./(rows*cols), 0.01);\n  typedef Matrix<Scalar,Dynamic,Dynamic> DenseMatrix;\n  typedef Matrix<Scalar,Dynamic,1> DenseVector;\n  Scalar eps = 1e-6;\n\n  Scalar s1 = internal::random<Scalar>();\n  {\n    SparseMatrixType m(rows, cols);\n    DenseMatrix refMat = DenseMatrix::Zero(rows, cols);\n    DenseVector vec1 = DenseVector::Random(rows);\n\n    std::vector<Vector2> zeroCoords;\n    std::vector<Vector2> nonzeroCoords;\n    initSparse<Scalar>(density, refMat, m, 0, &zeroCoords, &nonzeroCoords);\n\n    // test coeff and coeffRef\n    for (std::size_t i=0; i<zeroCoords.size(); ++i)\n    {\n      VERIFY_IS_MUCH_SMALLER_THAN( m.coeff(zeroCoords[i].x(),zeroCoords[i].y()), eps );\n      if(internal::is_same<SparseMatrixType,SparseMatrix<Scalar,Flags> >::value)\n        VERIFY_RAISES_ASSERT( m.coeffRef(zeroCoords[i].x(),zeroCoords[i].y()) = 5 );\n    }\n    VERIFY_IS_APPROX(m, refMat);\n\n    if(!nonzeroCoords.empty()) {\n      m.coeffRef(nonzeroCoords[0].x(), nonzeroCoords[0].y()) = Scalar(5);\n      refMat.coeffRef(nonzeroCoords[0].x(), nonzeroCoords[0].y()) = Scalar(5);\n    }\n\n    VERIFY_IS_APPROX(m, refMat);\n\n      // test assertion\n      VERIFY_RAISES_ASSERT( m.coeffRef(-1,1) = 0 );\n      VERIFY_RAISES_ASSERT( m.coeffRef(0,m.cols()) = 0 );\n    }\n\n    // test insert (inner random)\n    {\n      DenseMatrix m1(rows,cols);\n      m1.setZero();\n      SparseMatrixType m2(rows,cols);\n      bool call_reserve = internal::random<int>()%2;\n      Index nnz = internal::random<int>(1,int(rows)/2);\n      if(call_reserve)\n      {\n        if(internal::random<int>()%2)\n          m2.reserve(VectorXi::Constant(m2.outerSize(), int(nnz)));\n        else\n          m2.reserve(m2.outerSize() * nnz);\n      }\n      g_realloc_count = 0;\n      for (Index j=0; j<cols; ++j)\n      {\n        for (Index k=0; k<nnz; ++k)\n        {\n          Index i = internal::random<Index>(0,rows-1);\n          if (m1.coeff(i,j)==Scalar(0))\n            m2.insert(i,j) = m1(i,j) = internal::random<Scalar>();\n        }\n      }\n      \n      if(call_reserve && !SparseMatrixType::IsRowMajor)\n      {\n        VERIFY(g_realloc_count==0);\n      }\n      \n      m2.finalize();\n      VERIFY_IS_APPROX(m2,m1);\n    }\n\n    // test insert (fully random)\n    {\n      DenseMatrix m1(rows,cols);\n      m1.setZero();\n      SparseMatrixType m2(rows,cols);\n      if(internal::random<int>()%2)\n        m2.reserve(VectorXi::Constant(m2.outerSize(), 2));\n      for (int k=0; k<rows*cols; ++k)\n      {\n        Index i = internal::random<Index>(0,rows-1);\n        Index j = internal::random<Index>(0,cols-1);\n        if ((m1.coeff(i,j)==Scalar(0)) && (internal::random<int>()%2))\n          m2.insert(i,j) = m1(i,j) = internal::random<Scalar>();\n        else\n        {\n          Scalar v = internal::random<Scalar>();\n          m2.coeffRef(i,j) += v;\n          m1(i,j) += v;\n        }\n      }\n      VERIFY_IS_APPROX(m2,m1);\n    }\n    \n    // test insert (un-compressed)\n    for(int mode=0;mode<4;++mode)\n    {\n      DenseMatrix m1(rows,cols);\n      m1.setZero();\n      SparseMatrixType m2(rows,cols);\n      VectorXi r(VectorXi::Constant(m2.outerSize(), ((mode%2)==0) ? int(m2.innerSize()) : std::max<int>(1,int(m2.innerSize())/8)));\n      m2.reserve(r);\n      for (Index k=0; k<rows*cols; ++k)\n      {\n        Index i = internal::random<Index>(0,rows-1);\n        Index j = internal::random<Index>(0,cols-1);\n        if (m1.coeff(i,j)==Scalar(0))\n          m2.insert(i,j) = m1(i,j) = internal::random<Scalar>();\n        if(mode==3)\n          m2.reserve(r);\n      }\n      if(internal::random<int>()%2)\n        m2.makeCompressed();\n      VERIFY_IS_APPROX(m2,m1);\n    }\n\n  // test basic computations\n  {\n    DenseMatrix refM1 = DenseMatrix::Zero(rows, cols);\n    DenseMatrix refM2 = DenseMatrix::Zero(rows, cols);\n    DenseMatrix refM3 = DenseMatrix::Zero(rows, cols);\n    DenseMatrix refM4 = DenseMatrix::Zero(rows, cols);\n    SparseMatrixType m1(rows, cols);\n    SparseMatrixType m2(rows, cols);\n    SparseMatrixType m3(rows, cols);\n    SparseMatrixType m4(rows, cols);\n    initSparse<Scalar>(density, refM1, m1);\n    initSparse<Scalar>(density, refM2, m2);\n    initSparse<Scalar>(density, refM3, m3);\n    initSparse<Scalar>(density, refM4, m4);\n\n    if(internal::random<bool>())\n      m1.makeCompressed();\n\n    Index m1_nnz = m1.nonZeros();\n\n    VERIFY_IS_APPROX(m1*s1, refM1*s1);\n    VERIFY_IS_APPROX(m1+m2, refM1+refM2);\n    VERIFY_IS_APPROX(m1+m2+m3, refM1+refM2+refM3);\n    VERIFY_IS_APPROX(m3.cwiseProduct(m1+m2), refM3.cwiseProduct(refM1+refM2));\n    VERIFY_IS_APPROX(m1*s1-m2, refM1*s1-refM2);\n    VERIFY_IS_APPROX(m4=m1/s1, refM1/s1);\n    VERIFY_IS_EQUAL(m4.nonZeros(), m1_nnz);\n\n    if(SparseMatrixType::IsRowMajor)\n      VERIFY_IS_APPROX(m1.innerVector(0).dot(refM2.row(0)), refM1.row(0).dot(refM2.row(0)));\n    else\n      VERIFY_IS_APPROX(m1.innerVector(0).dot(refM2.col(0)), refM1.col(0).dot(refM2.col(0)));\n\n    DenseVector rv = DenseVector::Random(m1.cols());\n    DenseVector cv = DenseVector::Random(m1.rows());\n    Index r = internal::random<Index>(0,m1.rows()-2);\n    Index c = internal::random<Index>(0,m1.cols()-1);\n    VERIFY_IS_APPROX(( m1.template block<1,Dynamic>(r,0,1,m1.cols()).dot(rv)) , refM1.row(r).dot(rv));\n    VERIFY_IS_APPROX(m1.row(r).dot(rv), refM1.row(r).dot(rv));\n    VERIFY_IS_APPROX(m1.col(c).dot(cv), refM1.col(c).dot(cv));\n\n    VERIFY_IS_APPROX(m1.conjugate(), refM1.conjugate());\n    VERIFY_IS_APPROX(m1.real(), refM1.real());\n\n    refM4.setRandom();\n    // sparse cwise* dense\n    VERIFY_IS_APPROX(m3.cwiseProduct(refM4), refM3.cwiseProduct(refM4));\n    // dense cwise* sparse\n    VERIFY_IS_APPROX(refM4.cwiseProduct(m3), refM4.cwiseProduct(refM3));\n//     VERIFY_IS_APPROX(m3.cwise()/refM4, refM3.cwise()/refM4);\n\n    // mixed sparse-dense\n    VERIFY_IS_APPROX(refM4 + m3, refM4 + refM3);\n    VERIFY_IS_APPROX(m3 + refM4, refM3 + refM4);\n    VERIFY_IS_APPROX(refM4 - m3, refM4 - refM3);\n    VERIFY_IS_APPROX(m3 - refM4, refM3 - refM4);\n    VERIFY_IS_APPROX((RealScalar(0.5)*refM4 + RealScalar(0.5)*m3).eval(), RealScalar(0.5)*refM4 + RealScalar(0.5)*refM3);\n    VERIFY_IS_APPROX((RealScalar(0.5)*refM4 + m3*RealScalar(0.5)).eval(), RealScalar(0.5)*refM4 + RealScalar(0.5)*refM3);\n    VERIFY_IS_APPROX((RealScalar(0.5)*refM4 + m3.cwiseProduct(m3)).eval(), RealScalar(0.5)*refM4 + refM3.cwiseProduct(refM3));\n\n    VERIFY_IS_APPROX((RealScalar(0.5)*refM4 + RealScalar(0.5)*m3).eval(), RealScalar(0.5)*refM4 + RealScalar(0.5)*refM3);\n    VERIFY_IS_APPROX((RealScalar(0.5)*refM4 + m3*RealScalar(0.5)).eval(), RealScalar(0.5)*refM4 + RealScalar(0.5)*refM3);\n    VERIFY_IS_APPROX((RealScalar(0.5)*refM4 + (m3+m3)).eval(), RealScalar(0.5)*refM4 + (refM3+refM3));\n    VERIFY_IS_APPROX(((refM3+m3)+RealScalar(0.5)*m3).eval(), RealScalar(0.5)*refM3 + (refM3+refM3));\n    VERIFY_IS_APPROX((RealScalar(0.5)*refM4 + (refM3+m3)).eval(), RealScalar(0.5)*refM4 + (refM3+refM3));\n    VERIFY_IS_APPROX((RealScalar(0.5)*refM4 + (m3+refM3)).eval(), RealScalar(0.5)*refM4 + (refM3+refM3));\n\n\n    VERIFY_IS_APPROX(m1.sum(), refM1.sum());\n\n    m4 = m1; refM4 = m4;\n\n    VERIFY_IS_APPROX(m1*=s1, refM1*=s1);\n    VERIFY_IS_EQUAL(m1.nonZeros(), m1_nnz);\n    VERIFY_IS_APPROX(m1/=s1, refM1/=s1);\n    VERIFY_IS_EQUAL(m1.nonZeros(), m1_nnz);\n\n    VERIFY_IS_APPROX(m1+=m2, refM1+=refM2);\n    VERIFY_IS_APPROX(m1-=m2, refM1-=refM2);\n\n    refM3 = refM1;\n    \n    VERIFY_IS_APPROX(refM1+=m2, refM3+=refM2);\n    VERIFY_IS_APPROX(refM1-=m2, refM3-=refM2);\n\n    g_dense_op_sparse_count=0; VERIFY_IS_APPROX(refM1 =m2+refM4, refM3 =refM2+refM4);  VERIFY_IS_EQUAL(g_dense_op_sparse_count,10);\n    g_dense_op_sparse_count=0; VERIFY_IS_APPROX(refM1+=m2+refM4, refM3+=refM2+refM4);  VERIFY_IS_EQUAL(g_dense_op_sparse_count,1);\n    g_dense_op_sparse_count=0; VERIFY_IS_APPROX(refM1-=m2+refM4, refM3-=refM2+refM4);  VERIFY_IS_EQUAL(g_dense_op_sparse_count,1);\n    g_dense_op_sparse_count=0; VERIFY_IS_APPROX(refM1 =refM4+m2, refM3 =refM2+refM4);  VERIFY_IS_EQUAL(g_dense_op_sparse_count,1);\n    g_dense_op_sparse_count=0; VERIFY_IS_APPROX(refM1+=refM4+m2, refM3+=refM2+refM4);  VERIFY_IS_EQUAL(g_dense_op_sparse_count,1);\n    g_dense_op_sparse_count=0; VERIFY_IS_APPROX(refM1-=refM4+m2, refM3-=refM2+refM4);  VERIFY_IS_EQUAL(g_dense_op_sparse_count,1);\n\n    g_dense_op_sparse_count=0; VERIFY_IS_APPROX(refM1 =m2-refM4, refM3 =refM2-refM4);  VERIFY_IS_EQUAL(g_dense_op_sparse_count,20);\n    g_dense_op_sparse_count=0; VERIFY_IS_APPROX(refM1+=m2-refM4, refM3+=refM2-refM4);  VERIFY_IS_EQUAL(g_dense_op_sparse_count,1);\n    g_dense_op_sparse_count=0; VERIFY_IS_APPROX(refM1-=m2-refM4, refM3-=refM2-refM4);  VERIFY_IS_EQUAL(g_dense_op_sparse_count,1);\n    g_dense_op_sparse_count=0; VERIFY_IS_APPROX(refM1 =refM4-m2, refM3 =refM4-refM2);  VERIFY_IS_EQUAL(g_dense_op_sparse_count,1);\n    g_dense_op_sparse_count=0; VERIFY_IS_APPROX(refM1+=refM4-m2, refM3+=refM4-refM2);  VERIFY_IS_EQUAL(g_dense_op_sparse_count,1);\n    g_dense_op_sparse_count=0; VERIFY_IS_APPROX(refM1-=refM4-m2, refM3-=refM4-refM2);  VERIFY_IS_EQUAL(g_dense_op_sparse_count,1);\n    refM3 = m3;\n\n    if (rows>=2 && cols>=2)\n    {\n      VERIFY_RAISES_ASSERT( m1 += m1.innerVector(0) );\n      VERIFY_RAISES_ASSERT( m1 -= m1.innerVector(0) );\n      VERIFY_RAISES_ASSERT( refM1 -= m1.innerVector(0) );\n      VERIFY_RAISES_ASSERT( refM1 += m1.innerVector(0) );\n    }\n    m1 = m4; refM1 = refM4;\n\n    // test aliasing\n    VERIFY_IS_APPROX((m1 = -m1), (refM1 = -refM1));\n    VERIFY_IS_EQUAL(m1.nonZeros(), m1_nnz);\n    m1 = m4; refM1 = refM4;\n    VERIFY_IS_APPROX((m1 = m1.transpose()), (refM1 = refM1.transpose().eval()));\n    VERIFY_IS_EQUAL(m1.nonZeros(), m1_nnz);\n    m1 = m4; refM1 = refM4;\n    VERIFY_IS_APPROX((m1 = -m1.transpose()), (refM1 = -refM1.transpose().eval()));\n    VERIFY_IS_EQUAL(m1.nonZeros(), m1_nnz);\n    m1 = m4; refM1 = refM4;\n    VERIFY_IS_APPROX((m1 += -m1), (refM1 += -refM1));\n    VERIFY_IS_EQUAL(m1.nonZeros(), m1_nnz);\n    m1 = m4; refM1 = refM4;\n\n    if(m1.isCompressed())\n    {\n      VERIFY_IS_APPROX(m1.coeffs().sum(), m1.sum());\n      m1.coeffs() += s1;\n      for(Index j = 0; j<m1.outerSize(); ++j)\n        for(typename SparseMatrixType::InnerIterator it(m1,j); it; ++it)\n          refM1(it.row(), it.col()) += s1;\n      VERIFY_IS_APPROX(m1, refM1);\n    }\n\n    // and/or\n    {\n      typedef SparseMatrix<bool, SparseMatrixType::Options, typename SparseMatrixType::StorageIndex> SpBool;\n      SpBool mb1 = m1.real().template cast<bool>();\n      SpBool mb2 = m2.real().template cast<bool>();\n      VERIFY_IS_EQUAL(mb1.template cast<int>().sum(), refM1.real().template cast<bool>().count());\n      VERIFY_IS_EQUAL((mb1 && mb2).template cast<int>().sum(), (refM1.real().template cast<bool>() && refM2.real().template cast<bool>()).count());\n      VERIFY_IS_EQUAL((mb1 || mb2).template cast<int>().sum(), (refM1.real().template cast<bool>() || refM2.real().template cast<bool>()).count());\n      SpBool mb3 = mb1 && mb2;\n      if(mb1.coeffs().all() && mb2.coeffs().all())\n      {\n        VERIFY_IS_EQUAL(mb3.nonZeros(), (refM1.real().template cast<bool>() && refM2.real().template cast<bool>()).count());\n      }\n    }\n  }\n\n  // test reverse iterators\n  {\n    DenseMatrix refMat2 = DenseMatrix::Zero(rows, cols);\n    SparseMatrixType m2(rows, cols);\n    initSparse<Scalar>(density, refMat2, m2);\n    std::vector<Scalar> ref_value(m2.innerSize());\n    std::vector<Index> ref_index(m2.innerSize());\n    if(internal::random<bool>())\n      m2.makeCompressed();\n    for(Index j = 0; j<m2.outerSize(); ++j)\n    {\n      Index count_forward = 0;\n\n      for(typename SparseMatrixType::InnerIterator it(m2,j); it; ++it)\n      {\n        ref_value[ref_value.size()-1-count_forward] = it.value();\n        ref_index[ref_index.size()-1-count_forward] = it.index();\n        count_forward++;\n      }\n      Index count_reverse = 0;\n      for(typename SparseMatrixType::ReverseInnerIterator it(m2,j); it; --it)\n      {\n        VERIFY_IS_APPROX( std::abs(ref_value[ref_value.size()-count_forward+count_reverse])+1, std::abs(it.value())+1);\n        VERIFY_IS_EQUAL( ref_index[ref_index.size()-count_forward+count_reverse] , it.index());\n        count_reverse++;\n      }\n      VERIFY_IS_EQUAL(count_forward, count_reverse);\n    }\n  }\n\n  // test transpose\n  {\n    DenseMatrix refMat2 = DenseMatrix::Zero(rows, cols);\n    SparseMatrixType m2(rows, cols);\n    initSparse<Scalar>(density, refMat2, m2);\n    VERIFY_IS_APPROX(m2.transpose().eval(), refMat2.transpose().eval());\n    VERIFY_IS_APPROX(m2.transpose(), refMat2.transpose());\n\n    VERIFY_IS_APPROX(SparseMatrixType(m2.adjoint()), refMat2.adjoint());\n    \n    // check isApprox handles opposite storage order\n    typename Transpose<SparseMatrixType>::PlainObject m3(m2);\n    VERIFY(m2.isApprox(m3));\n  }\n\n  // test prune\n  {\n    SparseMatrixType m2(rows, cols);\n    DenseMatrix refM2(rows, cols);\n    refM2.setZero();\n    int countFalseNonZero = 0;\n    int countTrueNonZero = 0;\n    m2.reserve(VectorXi::Constant(m2.outerSize(), int(m2.innerSize())));\n    for (Index j=0; j<m2.cols(); ++j)\n    {\n      for (Index i=0; i<m2.rows(); ++i)\n      {\n        float x = internal::random<float>(0,1);\n        if (x<0.1f)\n        {\n          // do nothing\n        }\n        else if (x<0.5f)\n        {\n          countFalseNonZero++;\n          m2.insert(i,j) = Scalar(0);\n        }\n        else\n        {\n          countTrueNonZero++;\n          m2.insert(i,j) = Scalar(1);\n          refM2(i,j) = Scalar(1);\n        }\n      }\n    }\n    if(internal::random<bool>())\n      m2.makeCompressed();\n    VERIFY(countFalseNonZero+countTrueNonZero == m2.nonZeros());\n    if(countTrueNonZero>0)\n      VERIFY_IS_APPROX(m2, refM2);\n    m2.prune(Scalar(1));\n    VERIFY(countTrueNonZero==m2.nonZeros());\n    VERIFY_IS_APPROX(m2, refM2);\n  }\n\n  // test setFromTriplets\n  {\n    typedef Triplet<Scalar,StorageIndex> TripletType;\n    std::vector<TripletType> triplets;\n    Index ntriplets = rows*cols;\n    triplets.reserve(ntriplets);\n    DenseMatrix refMat_sum  = DenseMatrix::Zero(rows,cols);\n    DenseMatrix refMat_prod = DenseMatrix::Zero(rows,cols);\n    DenseMatrix refMat_last = DenseMatrix::Zero(rows,cols);\n\n    for(Index i=0;i<ntriplets;++i)\n    {\n      StorageIndex r = internal::random<StorageIndex>(0,StorageIndex(rows-1));\n      StorageIndex c = internal::random<StorageIndex>(0,StorageIndex(cols-1));\n      Scalar v = internal::random<Scalar>();\n      triplets.push_back(TripletType(r,c,v));\n      refMat_sum(r,c) += v;\n      if(std::abs(refMat_prod(r,c))==0)\n        refMat_prod(r,c) = v;\n      else\n        refMat_prod(r,c) *= v;\n      refMat_last(r,c) = v;\n    }\n    SparseMatrixType m(rows,cols);\n    m.setFromTriplets(triplets.begin(), triplets.end());\n    VERIFY_IS_APPROX(m, refMat_sum);\n\n    m.setFromTriplets(triplets.begin(), triplets.end(), std::multiplies<Scalar>());\n    VERIFY_IS_APPROX(m, refMat_prod);\n#if (defined(__cplusplus) && __cplusplus >= 201103L)\n    m.setFromTriplets(triplets.begin(), triplets.end(), [] (Scalar,Scalar b) { return b; });\n    VERIFY_IS_APPROX(m, refMat_last);\n#endif\n  }\n  \n  // test Map\n  {\n    DenseMatrix refMat2(rows, cols), refMat3(rows, cols);\n    SparseMatrixType m2(rows, cols), m3(rows, cols);\n    initSparse<Scalar>(density, refMat2, m2);\n    initSparse<Scalar>(density, refMat3, m3);\n    {\n      Map<SparseMatrixType> mapMat2(m2.rows(), m2.cols(), m2.nonZeros(), m2.outerIndexPtr(), m2.innerIndexPtr(), m2.valuePtr(), m2.innerNonZeroPtr());\n      Map<SparseMatrixType> mapMat3(m3.rows(), m3.cols(), m3.nonZeros(), m3.outerIndexPtr(), m3.innerIndexPtr(), m3.valuePtr(), m3.innerNonZeroPtr());\n      VERIFY_IS_APPROX(mapMat2+mapMat3, refMat2+refMat3);\n      VERIFY_IS_APPROX(mapMat2+mapMat3, refMat2+refMat3);\n    }\n    {\n      MappedSparseMatrix<Scalar,SparseMatrixType::Options,StorageIndex> mapMat2(m2.rows(), m2.cols(), m2.nonZeros(), m2.outerIndexPtr(), m2.innerIndexPtr(), m2.valuePtr(), m2.innerNonZeroPtr());\n      MappedSparseMatrix<Scalar,SparseMatrixType::Options,StorageIndex> mapMat3(m3.rows(), m3.cols(), m3.nonZeros(), m3.outerIndexPtr(), m3.innerIndexPtr(), m3.valuePtr(), m3.innerNonZeroPtr());\n      VERIFY_IS_APPROX(mapMat2+mapMat3, refMat2+refMat3);\n      VERIFY_IS_APPROX(mapMat2+mapMat3, refMat2+refMat3);\n    }\n\n    Index i = internal::random<Index>(0,rows-1);\n    Index j = internal::random<Index>(0,cols-1);\n    m2.coeffRef(i,j) = 123;\n    if(internal::random<bool>())\n      m2.makeCompressed();\n    Map<SparseMatrixType> mapMat2(rows, cols, m2.nonZeros(), m2.outerIndexPtr(), m2.innerIndexPtr(), m2.valuePtr(),  m2.innerNonZeroPtr());\n    VERIFY_IS_EQUAL(m2.coeff(i,j),Scalar(123));\n    VERIFY_IS_EQUAL(mapMat2.coeff(i,j),Scalar(123));\n    mapMat2.coeffRef(i,j) = -123;\n    VERIFY_IS_EQUAL(m2.coeff(i,j),Scalar(-123));\n  }\n\n  // test triangularView\n  {\n    DenseMatrix refMat2(rows, cols), refMat3(rows, cols);\n    SparseMatrixType m2(rows, cols), m3(rows, cols);\n    initSparse<Scalar>(density, refMat2, m2);\n    refMat3 = refMat2.template triangularView<Lower>();\n    m3 = m2.template triangularView<Lower>();\n    VERIFY_IS_APPROX(m3, refMat3);\n\n    refMat3 = refMat2.template triangularView<Upper>();\n    m3 = m2.template triangularView<Upper>();\n    VERIFY_IS_APPROX(m3, refMat3);\n\n    {\n      refMat3 = refMat2.template triangularView<UnitUpper>();\n      m3 = m2.template triangularView<UnitUpper>();\n      VERIFY_IS_APPROX(m3, refMat3);\n\n      refMat3 = refMat2.template triangularView<UnitLower>();\n      m3 = m2.template triangularView<UnitLower>();\n      VERIFY_IS_APPROX(m3, refMat3);\n    }\n\n    refMat3 = refMat2.template triangularView<StrictlyUpper>();\n    m3 = m2.template triangularView<StrictlyUpper>();\n    VERIFY_IS_APPROX(m3, refMat3);\n\n    refMat3 = refMat2.template triangularView<StrictlyLower>();\n    m3 = m2.template triangularView<StrictlyLower>();\n    VERIFY_IS_APPROX(m3, refMat3);\n\n    // check sparse-triangular to dense\n    refMat3 = m2.template triangularView<StrictlyUpper>();\n    VERIFY_IS_APPROX(refMat3, DenseMatrix(refMat2.template triangularView<StrictlyUpper>()));\n  }\n  \n  // test selfadjointView\n  if(!SparseMatrixType::IsRowMajor)\n  {\n    DenseMatrix refMat2(rows, rows), refMat3(rows, rows);\n    SparseMatrixType m2(rows, rows), m3(rows, rows);\n    initSparse<Scalar>(density, refMat2, m2);\n    refMat3 = refMat2.template selfadjointView<Lower>();\n    m3 = m2.template selfadjointView<Lower>();\n    VERIFY_IS_APPROX(m3, refMat3);\n\n    refMat3 += refMat2.template selfadjointView<Lower>();\n    m3 += m2.template selfadjointView<Lower>();\n    VERIFY_IS_APPROX(m3, refMat3);\n\n    refMat3 -= refMat2.template selfadjointView<Lower>();\n    m3 -= m2.template selfadjointView<Lower>();\n    VERIFY_IS_APPROX(m3, refMat3);\n\n    // selfadjointView only works for square matrices:\n    SparseMatrixType m4(rows, rows+1);\n    VERIFY_RAISES_ASSERT(m4.template selfadjointView<Lower>());\n    VERIFY_RAISES_ASSERT(m4.template selfadjointView<Upper>());\n  }\n  \n  // test sparseView\n  {\n    DenseMatrix refMat2 = DenseMatrix::Zero(rows, rows);\n    SparseMatrixType m2(rows, rows);\n    initSparse<Scalar>(density, refMat2, m2);\n    VERIFY_IS_APPROX(m2.eval(), refMat2.sparseView().eval());\n\n    // sparse view on expressions:\n    VERIFY_IS_APPROX((s1*m2).eval(), (s1*refMat2).sparseView().eval());\n    VERIFY_IS_APPROX((m2+m2).eval(), (refMat2+refMat2).sparseView().eval());\n    VERIFY_IS_APPROX((m2*m2).eval(), (refMat2.lazyProduct(refMat2)).sparseView().eval());\n    VERIFY_IS_APPROX((m2*m2).eval(), (refMat2*refMat2).sparseView().eval());\n  }\n\n  // test diagonal\n  {\n    DenseMatrix refMat2 = DenseMatrix::Zero(rows, cols);\n    SparseMatrixType m2(rows, cols);\n    initSparse<Scalar>(density, refMat2, m2);\n    VERIFY_IS_APPROX(m2.diagonal(), refMat2.diagonal().eval());\n    DenseVector d = m2.diagonal();\n    VERIFY_IS_APPROX(d, refMat2.diagonal().eval());\n    d = m2.diagonal().array();\n    VERIFY_IS_APPROX(d, refMat2.diagonal().eval());\n    VERIFY_IS_APPROX(const_cast<const SparseMatrixType&>(m2).diagonal(), refMat2.diagonal().eval());\n    \n    initSparse<Scalar>(density, refMat2, m2, ForceNonZeroDiag);\n    m2.diagonal()      += refMat2.diagonal();\n    refMat2.diagonal() += refMat2.diagonal();\n    VERIFY_IS_APPROX(m2, refMat2);\n  }\n  \n  // test diagonal to sparse\n  {\n    DenseVector d = DenseVector::Random(rows);\n    DenseMatrix refMat2 = d.asDiagonal();\n    SparseMatrixType m2;\n    m2 = d.asDiagonal();\n    VERIFY_IS_APPROX(m2, refMat2);\n    SparseMatrixType m3(d.asDiagonal());\n    VERIFY_IS_APPROX(m3, refMat2);\n    refMat2 += d.asDiagonal();\n    m2 += d.asDiagonal();\n    VERIFY_IS_APPROX(m2, refMat2);\n    m2.setZero();       m2 += d.asDiagonal();\n    refMat2.setZero();  refMat2 += d.asDiagonal();\n    VERIFY_IS_APPROX(m2, refMat2);\n    m2.setZero();       m2 -= d.asDiagonal();\n    refMat2.setZero();  refMat2 -= d.asDiagonal();\n    VERIFY_IS_APPROX(m2, refMat2);\n\n    initSparse<Scalar>(density, refMat2, m2);\n    m2.makeCompressed();\n    m2 += d.asDiagonal();\n    refMat2 += d.asDiagonal();\n    VERIFY_IS_APPROX(m2, refMat2);\n\n    initSparse<Scalar>(density, refMat2, m2);\n    m2.makeCompressed();\n    VectorXi res(rows);\n    for(Index i=0; i<rows; ++i)\n      res(i) = internal::random<int>(0,3);\n    m2.reserve(res);\n    m2 -= d.asDiagonal();\n    refMat2 -= d.asDiagonal();\n    VERIFY_IS_APPROX(m2, refMat2);\n  }\n  \n  // test conservative resize\n  {\n      std::vector< std::pair<StorageIndex,StorageIndex> > inc;\n      if(rows > 3 && cols > 2)\n        inc.push_back(std::pair<StorageIndex,StorageIndex>(-3,-2));\n      inc.push_back(std::pair<StorageIndex,StorageIndex>(0,0));\n      inc.push_back(std::pair<StorageIndex,StorageIndex>(3,2));\n      inc.push_back(std::pair<StorageIndex,StorageIndex>(3,0));\n      inc.push_back(std::pair<StorageIndex,StorageIndex>(0,3));\n      \n      for(size_t i = 0; i< inc.size(); i++) {\n        StorageIndex incRows = inc[i].first;\n        StorageIndex incCols = inc[i].second;\n        SparseMatrixType m1(rows, cols);\n        DenseMatrix refMat1 = DenseMatrix::Zero(rows, cols);\n        initSparse<Scalar>(density, refMat1, m1);\n        \n        m1.conservativeResize(rows+incRows, cols+incCols);\n        refMat1.conservativeResize(rows+incRows, cols+incCols);\n        if (incRows > 0) refMat1.bottomRows(incRows).setZero();\n        if (incCols > 0) refMat1.rightCols(incCols).setZero();\n        \n        VERIFY_IS_APPROX(m1, refMat1);\n        \n        // Insert new values\n        if (incRows > 0) \n          m1.insert(m1.rows()-1, 0) = refMat1(refMat1.rows()-1, 0) = 1;\n        if (incCols > 0) \n          m1.insert(0, m1.cols()-1) = refMat1(0, refMat1.cols()-1) = 1;\n          \n        VERIFY_IS_APPROX(m1, refMat1);\n          \n          \n      }\n  }\n\n  // test Identity matrix\n  {\n    DenseMatrix refMat1 = DenseMatrix::Identity(rows, rows);\n    SparseMatrixType m1(rows, rows);\n    m1.setIdentity();\n    VERIFY_IS_APPROX(m1, refMat1);\n    for(int k=0; k<rows*rows/4; ++k)\n    {\n      Index i = internal::random<Index>(0,rows-1);\n      Index j = internal::random<Index>(0,rows-1);\n      Scalar v = internal::random<Scalar>();\n      m1.coeffRef(i,j) = v;\n      refMat1.coeffRef(i,j) = v;\n      VERIFY_IS_APPROX(m1, refMat1);\n      if(internal::random<Index>(0,10)<2)\n        m1.makeCompressed();\n    }\n    m1.setIdentity();\n    refMat1.setIdentity();\n    VERIFY_IS_APPROX(m1, refMat1);\n  }\n\n  // test array/vector of InnerIterator\n  {\n    typedef typename SparseMatrixType::InnerIterator IteratorType;\n\n    DenseMatrix refMat2 = DenseMatrix::Zero(rows, cols);\n    SparseMatrixType m2(rows, cols);\n    initSparse<Scalar>(density, refMat2, m2);\n    IteratorType static_array[2];\n    static_array[0] = IteratorType(m2,0);\n    static_array[1] = IteratorType(m2,m2.outerSize()-1);\n    VERIFY( static_array[0] || m2.innerVector(static_array[0].outer()).nonZeros() == 0 );\n    VERIFY( static_array[1] || m2.innerVector(static_array[1].outer()).nonZeros() == 0 );\n    if(static_array[0] && static_array[1])\n    {\n      ++(static_array[1]);\n      static_array[1] = IteratorType(m2,0);\n      VERIFY( static_array[1] );\n      VERIFY( static_array[1].index() == static_array[0].index() );\n      VERIFY( static_array[1].outer() == static_array[0].outer() );\n      VERIFY( static_array[1].value() == static_array[0].value() );\n    }\n\n    std::vector<IteratorType> iters(2);\n    iters[0] = IteratorType(m2,0);\n    iters[1] = IteratorType(m2,m2.outerSize()-1);\n  }\n}\n\n\ntemplate<typename SparseMatrixType>\nvoid big_sparse_triplet(Index rows, Index cols, double density) {\n  typedef typename SparseMatrixType::StorageIndex StorageIndex;\n  typedef typename SparseMatrixType::Scalar Scalar;\n  typedef Triplet<Scalar,Index> TripletType;\n  std::vector<TripletType> triplets;\n  double nelements = density * rows*cols;\n  VERIFY(nelements>=0 && nelements <  NumTraits<StorageIndex>::highest());\n  Index ntriplets = Index(nelements);\n  triplets.reserve(ntriplets);\n  Scalar sum = Scalar(0);\n  for(Index i=0;i<ntriplets;++i)\n  {\n    Index r = internal::random<Index>(0,rows-1);\n    Index c = internal::random<Index>(0,cols-1);\n    // use positive values to prevent numerical cancellation errors in sum\n    Scalar v = numext::abs(internal::random<Scalar>());\n    triplets.push_back(TripletType(r,c,v));\n    sum += v;\n  }\n  SparseMatrixType m(rows,cols);\n  m.setFromTriplets(triplets.begin(), triplets.end());\n  VERIFY(m.nonZeros() <= ntriplets);\n  VERIFY_IS_APPROX(sum, m.sum());\n}\n\ntemplate<int>\nvoid bug1105()\n{\n  // Regression test for bug 1105\n  int n = Eigen::internal::random<int>(200,600);\n  SparseMatrix<std::complex<double>,0, long> mat(n, n);\n  std::complex<double> val;\n\n  for(int i=0; i<n; ++i)\n  {\n    mat.coeffRef(i, i%(n/10)) = val;\n    VERIFY(mat.data().allocatedSize()<20*n);\n  }\n}\n\n#ifndef EIGEN_SPARSE_TEST_INCLUDED_FROM_SPARSE_EXTRA\n\nEIGEN_DECLARE_TEST(sparse_basic)\n{\n  g_dense_op_sparse_count = 0;  // Suppresses compiler warning.\n  for(int i = 0; i < g_repeat; i++) {\n    int r = Eigen::internal::random<int>(1,200), c = Eigen::internal::random<int>(1,200);\n    if(Eigen::internal::random<int>(0,4) == 0) {\n      r = c; // check square matrices in 25% of tries\n    }\n    EIGEN_UNUSED_VARIABLE(r+c);\n    CALL_SUBTEST_1(( sparse_basic(SparseMatrix<double>(1, 1)) ));\n    CALL_SUBTEST_1(( sparse_basic(SparseMatrix<double>(8, 8)) ));\n    CALL_SUBTEST_2(( sparse_basic(SparseMatrix<std::complex<double>, ColMajor>(r, c)) ));\n    CALL_SUBTEST_2(( sparse_basic(SparseMatrix<std::complex<double>, RowMajor>(r, c)) ));\n    CALL_SUBTEST_1(( sparse_basic(SparseMatrix<double>(r, c)) ));\n    CALL_SUBTEST_5(( sparse_basic(SparseMatrix<double,ColMajor,long int>(r, c)) ));\n    CALL_SUBTEST_5(( sparse_basic(SparseMatrix<double,RowMajor,long int>(r, c)) ));\n    \n    r = Eigen::internal::random<int>(1,100);\n    c = Eigen::internal::random<int>(1,100);\n    if(Eigen::internal::random<int>(0,4) == 0) {\n      r = c; // check square matrices in 25% of tries\n    }\n    \n    CALL_SUBTEST_6(( sparse_basic(SparseMatrix<double,ColMajor,short int>(short(r), short(c))) ));\n    CALL_SUBTEST_6(( sparse_basic(SparseMatrix<double,RowMajor,short int>(short(r), short(c))) ));\n  }\n\n  // Regression test for bug 900: (manually insert higher values here, if you have enough RAM):\n  CALL_SUBTEST_3((big_sparse_triplet<SparseMatrix<float, RowMajor, int> >(10000, 10000, 0.125)));\n  CALL_SUBTEST_4((big_sparse_triplet<SparseMatrix<double, ColMajor, long int> >(10000, 10000, 0.125)));\n\n  CALL_SUBTEST_7( bug1105<0>() );\n}\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/test/sparse_block.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2015 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"sparse.h\"\n#include \"AnnoyingScalar.h\"\n\ntemplate<typename T>\ntypename Eigen::internal::enable_if<(T::Flags&RowMajorBit)==RowMajorBit, typename T::RowXpr>::type\ninnervec(T& A, Index i)\n{\n  return A.row(i);\n}\n\ntemplate<typename T>\ntypename Eigen::internal::enable_if<(T::Flags&RowMajorBit)==0, typename T::ColXpr>::type\ninnervec(T& A, Index i)\n{\n  return A.col(i);\n}\n\ntemplate<typename SparseMatrixType> void sparse_block(const SparseMatrixType& ref)\n{\n  const Index rows = ref.rows();\n  const Index cols = ref.cols();\n  const Index inner = ref.innerSize();\n  const Index outer = ref.outerSize();\n\n  typedef typename SparseMatrixType::Scalar Scalar;\n  typedef typename SparseMatrixType::RealScalar RealScalar;\n  typedef typename SparseMatrixType::StorageIndex StorageIndex;\n\n  double density = (std::max)(8./(rows*cols), 0.01);\n  typedef Matrix<Scalar,Dynamic,Dynamic,SparseMatrixType::IsRowMajor?RowMajor:ColMajor> DenseMatrix;\n  typedef Matrix<Scalar,Dynamic,1> DenseVector;\n  typedef Matrix<Scalar,1,Dynamic> RowDenseVector;\n  typedef SparseVector<Scalar> SparseVectorType;\n\n  Scalar s1 = internal::random<Scalar>();\n  {\n    SparseMatrixType m(rows, cols);\n    DenseMatrix refMat = DenseMatrix::Zero(rows, cols);\n    initSparse<Scalar>(density, refMat, m);\n\n    VERIFY_IS_APPROX(m, refMat);\n\n    // test InnerIterators and Block expressions\n    for (int t=0; t<10; ++t)\n    {\n      Index j = internal::random<Index>(0,cols-2);\n      Index i = internal::random<Index>(0,rows-2);\n      Index w = internal::random<Index>(1,cols-j);\n      Index h = internal::random<Index>(1,rows-i);\n\n      VERIFY_IS_APPROX(m.block(i,j,h,w), refMat.block(i,j,h,w));\n      for(Index c=0; c<w; c++)\n      {\n        VERIFY_IS_APPROX(m.block(i,j,h,w).col(c), refMat.block(i,j,h,w).col(c));\n        for(Index r=0; r<h; r++)\n        {\n          VERIFY_IS_APPROX(m.block(i,j,h,w).col(c).coeff(r), refMat.block(i,j,h,w).col(c).coeff(r));\n          VERIFY_IS_APPROX(m.block(i,j,h,w).coeff(r,c), refMat.block(i,j,h,w).coeff(r,c));\n        }\n      }\n      for(Index r=0; r<h; r++)\n      {\n        VERIFY_IS_APPROX(m.block(i,j,h,w).row(r), refMat.block(i,j,h,w).row(r));\n        for(Index c=0; c<w; c++)\n        {\n          VERIFY_IS_APPROX(m.block(i,j,h,w).row(r).coeff(c), refMat.block(i,j,h,w).row(r).coeff(c));\n          VERIFY_IS_APPROX(m.block(i,j,h,w).coeff(r,c), refMat.block(i,j,h,w).coeff(r,c));\n        }\n      }\n      \n      VERIFY_IS_APPROX(m.middleCols(j,w), refMat.middleCols(j,w));\n      VERIFY_IS_APPROX(m.middleRows(i,h), refMat.middleRows(i,h));\n      for(Index r=0; r<h; r++)\n      {\n        VERIFY_IS_APPROX(m.middleCols(j,w).row(r), refMat.middleCols(j,w).row(r));\n        VERIFY_IS_APPROX(m.middleRows(i,h).row(r), refMat.middleRows(i,h).row(r));\n        for(Index c=0; c<w; c++)\n        {\n          VERIFY_IS_APPROX(m.col(c).coeff(r), refMat.col(c).coeff(r));\n          VERIFY_IS_APPROX(m.row(r).coeff(c), refMat.row(r).coeff(c));\n          \n          VERIFY_IS_APPROX(m.middleCols(j,w).coeff(r,c), refMat.middleCols(j,w).coeff(r,c));\n          VERIFY_IS_APPROX(m.middleRows(i,h).coeff(r,c), refMat.middleRows(i,h).coeff(r,c));\n          if(m.middleCols(j,w).coeff(r,c) != Scalar(0))\n          {\n            VERIFY_IS_APPROX(m.middleCols(j,w).coeffRef(r,c), refMat.middleCols(j,w).coeff(r,c));\n          }\n          if(m.middleRows(i,h).coeff(r,c) != Scalar(0))\n          {\n            VERIFY_IS_APPROX(m.middleRows(i,h).coeff(r,c), refMat.middleRows(i,h).coeff(r,c));\n          }\n        }\n      }\n      for(Index c=0; c<w; c++)\n      {\n        VERIFY_IS_APPROX(m.middleCols(j,w).col(c), refMat.middleCols(j,w).col(c));\n        VERIFY_IS_APPROX(m.middleRows(i,h).col(c), refMat.middleRows(i,h).col(c));\n      }\n    }\n\n    for(Index c=0; c<cols; c++)\n    {\n      VERIFY_IS_APPROX(m.col(c) + m.col(c), (m + m).col(c));\n      VERIFY_IS_APPROX(m.col(c) + m.col(c), refMat.col(c) + refMat.col(c));\n    }\n\n    for(Index r=0; r<rows; r++)\n    {\n      VERIFY_IS_APPROX(m.row(r) + m.row(r), (m + m).row(r));\n      VERIFY_IS_APPROX(m.row(r) + m.row(r), refMat.row(r) + refMat.row(r));\n    }\n  }\n\n  // test innerVector()\n  {\n    DenseMatrix refMat2 = DenseMatrix::Zero(rows, cols);\n    SparseMatrixType m2(rows, cols);\n    initSparse<Scalar>(density, refMat2, m2);\n    Index j0 = internal::random<Index>(0,outer-1);\n    Index j1 = internal::random<Index>(0,outer-1);\n    Index r0 = internal::random<Index>(0,rows-1);\n    Index c0 = internal::random<Index>(0,cols-1);\n\n    VERIFY_IS_APPROX(m2.innerVector(j0), innervec(refMat2,j0));\n    VERIFY_IS_APPROX(m2.innerVector(j0)+m2.innerVector(j1), innervec(refMat2,j0)+innervec(refMat2,j1));\n\n    m2.innerVector(j0) *= Scalar(2);\n    innervec(refMat2,j0) *= Scalar(2);\n    VERIFY_IS_APPROX(m2, refMat2);\n\n    m2.row(r0) *= Scalar(3);\n    refMat2.row(r0) *= Scalar(3);\n    VERIFY_IS_APPROX(m2, refMat2);\n\n    m2.col(c0) *= Scalar(4);\n    refMat2.col(c0) *= Scalar(4);\n    VERIFY_IS_APPROX(m2, refMat2);\n\n    m2.row(r0) /= Scalar(3);\n    refMat2.row(r0) /= Scalar(3);\n    VERIFY_IS_APPROX(m2, refMat2);\n\n    m2.col(c0) /= Scalar(4);\n    refMat2.col(c0) /= Scalar(4);\n    VERIFY_IS_APPROX(m2, refMat2);\n\n    SparseVectorType v1;\n    VERIFY_IS_APPROX(v1 = m2.col(c0) * 4, refMat2.col(c0)*4);\n    VERIFY_IS_APPROX(v1 = m2.row(r0) * 4, refMat2.row(r0).transpose()*4);\n\n    SparseMatrixType m3(rows,cols);\n    m3.reserve(VectorXi::Constant(outer,int(inner/2)));\n    for(Index j=0; j<outer; ++j)\n      for(Index k=0; k<(std::min)(j,inner); ++k)\n        m3.insertByOuterInner(j,k) = internal::convert_index<StorageIndex>(k+1);\n    for(Index j=0; j<(std::min)(outer, inner); ++j)\n    {\n      VERIFY(j==numext::real(m3.innerVector(j).nonZeros()));\n      if(j>0)\n        VERIFY(RealScalar(j)==numext::real(m3.innerVector(j).lastCoeff()));\n    }\n    m3.makeCompressed();\n    for(Index j=0; j<(std::min)(outer, inner); ++j)\n    {\n      VERIFY(j==numext::real(m3.innerVector(j).nonZeros()));\n      if(j>0)\n        VERIFY(RealScalar(j)==numext::real(m3.innerVector(j).lastCoeff()));\n    }\n\n    VERIFY(m3.innerVector(j0).nonZeros() == m3.transpose().innerVector(j0).nonZeros());\n\n//     m2.innerVector(j0) = 2*m2.innerVector(j1);\n//     refMat2.col(j0) = 2*refMat2.col(j1);\n//     VERIFY_IS_APPROX(m2, refMat2);\n  }\n\n  // test innerVectors()\n  {\n    DenseMatrix refMat2 = DenseMatrix::Zero(rows, cols);\n    SparseMatrixType m2(rows, cols);\n    initSparse<Scalar>(density, refMat2, m2);\n    if(internal::random<float>(0,1)>0.5f) m2.makeCompressed();\n    Index j0 = internal::random<Index>(0,outer-2);\n    Index j1 = internal::random<Index>(0,outer-2);\n    Index n0 = internal::random<Index>(1,outer-(std::max)(j0,j1));\n    if(SparseMatrixType::IsRowMajor)\n      VERIFY_IS_APPROX(m2.innerVectors(j0,n0), refMat2.block(j0,0,n0,cols));\n    else\n      VERIFY_IS_APPROX(m2.innerVectors(j0,n0), refMat2.block(0,j0,rows,n0));\n    if(SparseMatrixType::IsRowMajor)\n      VERIFY_IS_APPROX(m2.innerVectors(j0,n0)+m2.innerVectors(j1,n0),\n                       refMat2.middleRows(j0,n0)+refMat2.middleRows(j1,n0));\n    else\n      VERIFY_IS_APPROX(m2.innerVectors(j0,n0)+m2.innerVectors(j1,n0),\n                      refMat2.block(0,j0,rows,n0)+refMat2.block(0,j1,rows,n0));\n    \n    VERIFY_IS_APPROX(m2, refMat2);\n    \n    VERIFY(m2.innerVectors(j0,n0).nonZeros() == m2.transpose().innerVectors(j0,n0).nonZeros());\n    \n    m2.innerVectors(j0,n0) = m2.innerVectors(j0,n0) + m2.innerVectors(j1,n0);\n    if(SparseMatrixType::IsRowMajor)\n      refMat2.middleRows(j0,n0) = (refMat2.middleRows(j0,n0) + refMat2.middleRows(j1,n0)).eval();\n    else\n      refMat2.middleCols(j0,n0) = (refMat2.middleCols(j0,n0) + refMat2.middleCols(j1,n0)).eval();\n    \n    VERIFY_IS_APPROX(m2, refMat2);\n  }\n\n  // test generic blocks\n  {\n    DenseMatrix refMat2 = DenseMatrix::Zero(rows, cols);\n    SparseMatrixType m2(rows, cols);\n    initSparse<Scalar>(density, refMat2, m2);\n    Index j0 = internal::random<Index>(0,outer-2);\n    Index j1 = internal::random<Index>(0,outer-2);\n    Index n0 = internal::random<Index>(1,outer-(std::max)(j0,j1));\n    if(SparseMatrixType::IsRowMajor)\n      VERIFY_IS_APPROX(m2.block(j0,0,n0,cols), refMat2.block(j0,0,n0,cols));\n    else\n      VERIFY_IS_APPROX(m2.block(0,j0,rows,n0), refMat2.block(0,j0,rows,n0));\n    \n    if(SparseMatrixType::IsRowMajor)\n      VERIFY_IS_APPROX(m2.block(j0,0,n0,cols)+m2.block(j1,0,n0,cols),\n                      refMat2.block(j0,0,n0,cols)+refMat2.block(j1,0,n0,cols));\n    else\n      VERIFY_IS_APPROX(m2.block(0,j0,rows,n0)+m2.block(0,j1,rows,n0),\n                      refMat2.block(0,j0,rows,n0)+refMat2.block(0,j1,rows,n0));\n      \n    Index i = internal::random<Index>(0,m2.outerSize()-1);\n    if(SparseMatrixType::IsRowMajor) {\n      m2.innerVector(i) = m2.innerVector(i) * s1;\n      refMat2.row(i) = refMat2.row(i) * s1;\n      VERIFY_IS_APPROX(m2,refMat2);\n    } else {\n      m2.innerVector(i) = m2.innerVector(i) * s1;\n      refMat2.col(i) = refMat2.col(i) * s1;\n      VERIFY_IS_APPROX(m2,refMat2);\n    }\n    \n    Index r0 = internal::random<Index>(0,rows-2);\n    Index c0 = internal::random<Index>(0,cols-2);\n    Index r1 = internal::random<Index>(1,rows-r0);\n    Index c1 = internal::random<Index>(1,cols-c0);\n    \n    VERIFY_IS_APPROX(DenseVector(m2.col(c0)), refMat2.col(c0));\n    VERIFY_IS_APPROX(m2.col(c0), refMat2.col(c0));\n    \n    VERIFY_IS_APPROX(RowDenseVector(m2.row(r0)), refMat2.row(r0));\n    VERIFY_IS_APPROX(m2.row(r0), refMat2.row(r0));\n\n    VERIFY_IS_APPROX(m2.block(r0,c0,r1,c1), refMat2.block(r0,c0,r1,c1));\n    VERIFY_IS_APPROX((2*m2).block(r0,c0,r1,c1), (2*refMat2).block(r0,c0,r1,c1));\n\n    if(m2.nonZeros()>0)\n    {\n      VERIFY_IS_APPROX(m2, refMat2);\n      SparseMatrixType m3(rows, cols);\n      DenseMatrix refMat3(rows, cols); refMat3.setZero();\n      Index n = internal::random<Index>(1,10);\n      for(Index k=0; k<n; ++k)\n      {\n        Index o1 = internal::random<Index>(0,outer-1);\n        Index o2 = internal::random<Index>(0,outer-1);\n        if(SparseMatrixType::IsRowMajor)\n        {\n          m3.innerVector(o1) = m2.row(o2);\n          refMat3.row(o1) = refMat2.row(o2);\n        }\n        else\n        {\n          m3.innerVector(o1) = m2.col(o2);\n          refMat3.col(o1) = refMat2.col(o2);\n        }\n        if(internal::random<bool>())\n          m3.makeCompressed();\n      }\n      if(m3.nonZeros()>0)\n      VERIFY_IS_APPROX(m3, refMat3);\n    }\n  }\n}\n\nEIGEN_DECLARE_TEST(sparse_block)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    int r = Eigen::internal::random<int>(1,200), c = Eigen::internal::random<int>(1,200);\n    if(Eigen::internal::random<int>(0,4) == 0) {\n      r = c; // check square matrices in 25% of tries\n    }\n    EIGEN_UNUSED_VARIABLE(r+c);\n    CALL_SUBTEST_1(( sparse_block(SparseMatrix<double>(1, 1)) ));\n    CALL_SUBTEST_1(( sparse_block(SparseMatrix<double>(8, 8)) ));\n    CALL_SUBTEST_1(( sparse_block(SparseMatrix<double>(r, c)) ));\n    CALL_SUBTEST_2(( sparse_block(SparseMatrix<std::complex<double>, ColMajor>(r, c)) ));\n    CALL_SUBTEST_2(( sparse_block(SparseMatrix<std::complex<double>, RowMajor>(r, c)) ));\n    \n    CALL_SUBTEST_3(( sparse_block(SparseMatrix<double,ColMajor,long int>(r, c)) ));\n    CALL_SUBTEST_3(( sparse_block(SparseMatrix<double,RowMajor,long int>(r, c)) ));\n    \n    r = Eigen::internal::random<int>(1,100);\n    c = Eigen::internal::random<int>(1,100);\n    if(Eigen::internal::random<int>(0,4) == 0) {\n      r = c; // check square matrices in 25% of tries\n    }\n    \n    CALL_SUBTEST_4(( sparse_block(SparseMatrix<double,ColMajor,short int>(short(r), short(c))) ));\n    CALL_SUBTEST_4(( sparse_block(SparseMatrix<double,RowMajor,short int>(short(r), short(c))) ));\n\n    AnnoyingScalar::dont_throw = true;\n    CALL_SUBTEST_5((  sparse_block(SparseMatrix<AnnoyingScalar>(r,c)) ));\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/sparse_permutations.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2011-2015 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n\nstatic long int nb_transposed_copies;\n#define EIGEN_SPARSE_TRANSPOSED_COPY_PLUGIN {nb_transposed_copies++;}\n#define VERIFY_TRANSPOSITION_COUNT(XPR,N) {\\\n    nb_transposed_copies = 0; \\\n    XPR; \\\n    if(nb_transposed_copies!=N) std::cerr << \"nb_transposed_copies == \" << nb_transposed_copies << \"\\n\"; \\\n    VERIFY( (#XPR) && nb_transposed_copies==N ); \\\n  }\n\n#include \"sparse.h\"\n\ntemplate<typename T>\nbool is_sorted(const T& mat) {\n  for(Index k = 0; k<mat.outerSize(); ++k)\n  {\n    Index prev = -1;\n    for(typename T::InnerIterator it(mat,k); it; ++it)\n    {\n      if(prev>=it.index())\n        return false;\n      prev = it.index();\n    }\n  }\n  return true;\n}\n\ntemplate<typename T>\ntypename internal::nested_eval<T,1>::type eval(const T &xpr)\n{\n  VERIFY( int(internal::nested_eval<T,1>::type::Flags&RowMajorBit) == int(internal::evaluator<T>::Flags&RowMajorBit) );\n  return xpr;\n}\n\ntemplate<int OtherStorage, typename SparseMatrixType> void sparse_permutations(const SparseMatrixType& ref)\n{\n  const Index rows = ref.rows();\n  const Index cols = ref.cols();\n  typedef typename SparseMatrixType::Scalar Scalar;\n  typedef typename SparseMatrixType::StorageIndex StorageIndex;\n  typedef SparseMatrix<Scalar, OtherStorage, StorageIndex> OtherSparseMatrixType;\n  typedef Matrix<Scalar,Dynamic,Dynamic> DenseMatrix;\n  typedef Matrix<StorageIndex,Dynamic,1> VectorI;\n//   bool IsRowMajor1 = SparseMatrixType::IsRowMajor;\n//   bool IsRowMajor2 = OtherSparseMatrixType::IsRowMajor;\n  \n  double density = (std::max)(8./(rows*cols), 0.01);\n  \n  SparseMatrixType mat(rows, cols), up(rows,cols), lo(rows,cols);\n  OtherSparseMatrixType res;\n  DenseMatrix mat_d = DenseMatrix::Zero(rows, cols), up_sym_d, lo_sym_d, res_d;\n  \n  initSparse<Scalar>(density, mat_d, mat, 0);\n\n  up = mat.template triangularView<Upper>();\n  lo = mat.template triangularView<Lower>();\n  \n  up_sym_d = mat_d.template selfadjointView<Upper>();\n  lo_sym_d = mat_d.template selfadjointView<Lower>();\n  \n  VERIFY_IS_APPROX(mat, mat_d);\n  VERIFY_IS_APPROX(up, DenseMatrix(mat_d.template triangularView<Upper>()));\n  VERIFY_IS_APPROX(lo, DenseMatrix(mat_d.template triangularView<Lower>()));\n  \n  PermutationMatrix<Dynamic> p, p_null;\n  VectorI pi;\n  randomPermutationVector(pi, cols);\n  p.indices() = pi;\n\n  VERIFY( is_sorted( ::eval(mat*p) ));\n  VERIFY( is_sorted( res = mat*p ));\n  VERIFY_TRANSPOSITION_COUNT( ::eval(mat*p), 0);\n  //VERIFY_TRANSPOSITION_COUNT( res = mat*p, IsRowMajor ? 1 : 0 );\n  res_d = mat_d*p;\n  VERIFY(res.isApprox(res_d) && \"mat*p\");\n\n  VERIFY( is_sorted( ::eval(p*mat) ));\n  VERIFY( is_sorted( res = p*mat ));\n  VERIFY_TRANSPOSITION_COUNT( ::eval(p*mat), 0);\n  res_d = p*mat_d;\n  VERIFY(res.isApprox(res_d) && \"p*mat\");\n\n  VERIFY( is_sorted( (mat*p).eval() ));\n  VERIFY( is_sorted( res = mat*p.inverse() ));\n  VERIFY_TRANSPOSITION_COUNT( ::eval(mat*p.inverse()), 0);\n  res_d = mat*p.inverse();\n  VERIFY(res.isApprox(res_d) && \"mat*inv(p)\");\n\n  VERIFY( is_sorted( (p*mat+p*mat).eval() ));\n  VERIFY( is_sorted( res = p.inverse()*mat ));\n  VERIFY_TRANSPOSITION_COUNT( ::eval(p.inverse()*mat), 0);\n  res_d = p.inverse()*mat_d;\n  VERIFY(res.isApprox(res_d) && \"inv(p)*mat\");\n\n  VERIFY( is_sorted( (p * mat * p.inverse()).eval() ));\n  VERIFY( is_sorted( res = mat.twistedBy(p) ));\n  VERIFY_TRANSPOSITION_COUNT( ::eval(p * mat * p.inverse()), 0);\n  res_d = (p * mat_d) * p.inverse();\n  VERIFY(res.isApprox(res_d) && \"p*mat*inv(p)\");\n\n  \n  VERIFY( is_sorted( res = mat.template selfadjointView<Upper>().twistedBy(p_null) ));\n  res_d = up_sym_d;\n  VERIFY(res.isApprox(res_d) && \"full selfadjoint upper to full\");\n  \n  VERIFY( is_sorted( res = mat.template selfadjointView<Lower>().twistedBy(p_null) ));\n  res_d = lo_sym_d;\n  VERIFY(res.isApprox(res_d) && \"full selfadjoint lower to full\");\n  \n  \n  VERIFY( is_sorted( res = up.template selfadjointView<Upper>().twistedBy(p_null) ));\n  res_d = up_sym_d;\n  VERIFY(res.isApprox(res_d) && \"upper selfadjoint to full\");\n  \n  VERIFY( is_sorted( res = lo.template selfadjointView<Lower>().twistedBy(p_null) ));\n  res_d = lo_sym_d;\n  VERIFY(res.isApprox(res_d) && \"lower selfadjoint full\");\n\n\n  VERIFY( is_sorted( res = mat.template selfadjointView<Upper>() ));\n  res_d = up_sym_d;\n  VERIFY(res.isApprox(res_d) && \"full selfadjoint upper to full\");\n\n  VERIFY( is_sorted( res = mat.template selfadjointView<Lower>() ));\n  res_d = lo_sym_d;\n  VERIFY(res.isApprox(res_d) && \"full selfadjoint lower to full\");\n\n  VERIFY( is_sorted( res = up.template selfadjointView<Upper>() ));\n  res_d = up_sym_d;\n  VERIFY(res.isApprox(res_d) && \"upper selfadjoint to full\");\n\n  VERIFY( is_sorted( res = lo.template selfadjointView<Lower>() ));\n  res_d = lo_sym_d;\n  VERIFY(res.isApprox(res_d) && \"lower selfadjoint full\");\n\n\n  res.template selfadjointView<Upper>() = mat.template selfadjointView<Upper>();\n  res_d = up_sym_d.template triangularView<Upper>();\n  VERIFY(res.isApprox(res_d) && \"full selfadjoint upper to upper\");\n\n  res.template selfadjointView<Lower>() = mat.template selfadjointView<Upper>();\n  res_d = up_sym_d.template triangularView<Lower>();\n  VERIFY(res.isApprox(res_d) && \"full selfadjoint upper to lower\");\n\n  res.template selfadjointView<Upper>() = mat.template selfadjointView<Lower>();\n  res_d = lo_sym_d.template triangularView<Upper>();\n  VERIFY(res.isApprox(res_d) && \"full selfadjoint lower to upper\");\n\n  res.template selfadjointView<Lower>() = mat.template selfadjointView<Lower>();\n  res_d = lo_sym_d.template triangularView<Lower>();\n  VERIFY(res.isApprox(res_d) && \"full selfadjoint lower to lower\");\n\n  \n  \n  res.template selfadjointView<Upper>() = mat.template selfadjointView<Upper>().twistedBy(p);\n  res_d = ((p * up_sym_d) * p.inverse()).eval().template triangularView<Upper>();\n  VERIFY(res.isApprox(res_d) && \"full selfadjoint upper twisted to upper\");\n  \n  res.template selfadjointView<Upper>() = mat.template selfadjointView<Lower>().twistedBy(p);\n  res_d = ((p * lo_sym_d) * p.inverse()).eval().template triangularView<Upper>();\n  VERIFY(res.isApprox(res_d) && \"full selfadjoint lower twisted to upper\");\n  \n  res.template selfadjointView<Lower>() = mat.template selfadjointView<Lower>().twistedBy(p);\n  res_d = ((p * lo_sym_d) * p.inverse()).eval().template triangularView<Lower>();\n  VERIFY(res.isApprox(res_d) && \"full selfadjoint lower twisted to lower\");\n  \n  res.template selfadjointView<Lower>() = mat.template selfadjointView<Upper>().twistedBy(p);\n  res_d = ((p * up_sym_d) * p.inverse()).eval().template triangularView<Lower>();\n  VERIFY(res.isApprox(res_d) && \"full selfadjoint upper twisted to lower\");\n  \n  \n  res.template selfadjointView<Upper>() = up.template selfadjointView<Upper>().twistedBy(p);\n  res_d = ((p * up_sym_d) * p.inverse()).eval().template triangularView<Upper>();\n  VERIFY(res.isApprox(res_d) && \"upper selfadjoint twisted to upper\");\n  \n  res.template selfadjointView<Upper>() = lo.template selfadjointView<Lower>().twistedBy(p);\n  res_d = ((p * lo_sym_d) * p.inverse()).eval().template triangularView<Upper>();\n  VERIFY(res.isApprox(res_d) && \"lower selfadjoint twisted to upper\");\n  \n  res.template selfadjointView<Lower>() = lo.template selfadjointView<Lower>().twistedBy(p);\n  res_d = ((p * lo_sym_d) * p.inverse()).eval().template triangularView<Lower>();\n  VERIFY(res.isApprox(res_d) && \"lower selfadjoint twisted to lower\");\n  \n  res.template selfadjointView<Lower>() = up.template selfadjointView<Upper>().twistedBy(p);\n  res_d = ((p * up_sym_d) * p.inverse()).eval().template triangularView<Lower>();\n  VERIFY(res.isApprox(res_d) && \"upper selfadjoint twisted to lower\");\n\n  \n  VERIFY( is_sorted( res = mat.template selfadjointView<Upper>().twistedBy(p) ));\n  res_d = (p * up_sym_d) * p.inverse();\n  VERIFY(res.isApprox(res_d) && \"full selfadjoint upper twisted to full\");\n  \n  VERIFY( is_sorted( res = mat.template selfadjointView<Lower>().twistedBy(p) ));\n  res_d = (p * lo_sym_d) * p.inverse();\n  VERIFY(res.isApprox(res_d) && \"full selfadjoint lower twisted to full\");\n  \n  VERIFY( is_sorted( res = up.template selfadjointView<Upper>().twistedBy(p) ));\n  res_d = (p * up_sym_d) * p.inverse();\n  VERIFY(res.isApprox(res_d) && \"upper selfadjoint twisted to full\");\n  \n  VERIFY( is_sorted( res = lo.template selfadjointView<Lower>().twistedBy(p) ));\n  res_d = (p * lo_sym_d) * p.inverse();\n  VERIFY(res.isApprox(res_d) && \"lower selfadjoint twisted to full\");\n}\n\ntemplate<typename Scalar> void sparse_permutations_all(int size)\n{\n  CALL_SUBTEST(( sparse_permutations<ColMajor>(SparseMatrix<Scalar, ColMajor>(size,size)) ));\n  CALL_SUBTEST(( sparse_permutations<ColMajor>(SparseMatrix<Scalar, RowMajor>(size,size)) ));\n  CALL_SUBTEST(( sparse_permutations<RowMajor>(SparseMatrix<Scalar, ColMajor>(size,size)) ));\n  CALL_SUBTEST(( sparse_permutations<RowMajor>(SparseMatrix<Scalar, RowMajor>(size,size)) ));\n}\n\nEIGEN_DECLARE_TEST(sparse_permutations)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    int s = Eigen::internal::random<int>(1,50);\n    CALL_SUBTEST_1((  sparse_permutations_all<double>(s) ));\n    CALL_SUBTEST_2((  sparse_permutations_all<std::complex<double> >(s) ));\n  }\n\n  VERIFY((internal::is_same<internal::permutation_matrix_product<SparseMatrix<double>,OnTheRight,false,SparseShape>::ReturnType,\n                            internal::nested_eval<Product<SparseMatrix<double>,PermutationMatrix<Dynamic,Dynamic>,AliasFreeProduct>,1>::type>::value));\n\n  VERIFY((internal::is_same<internal::permutation_matrix_product<SparseMatrix<double>,OnTheLeft,false,SparseShape>::ReturnType,\n                            internal::nested_eval<Product<PermutationMatrix<Dynamic,Dynamic>,SparseMatrix<double>,AliasFreeProduct>,1>::type>::value));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/sparse_product.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2011 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#if defined(_MSC_VER) && (_MSC_VER==1800)\n// This unit test takes forever to compile in Release mode with MSVC 2013,\n// multiple hours. So let's switch off optimization for this one.\n#pragma optimize(\"\",off)\n#endif\n\nstatic long int nb_temporaries;\n\ninline void on_temporary_creation() {\n  // here's a great place to set a breakpoint when debugging failures in this test!\n  nb_temporaries++;\n}\n\n#define EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN { on_temporary_creation(); }\n\n#include \"sparse.h\"\n\n#define VERIFY_EVALUATION_COUNT(XPR,N) {\\\n    nb_temporaries = 0; \\\n    CALL_SUBTEST( XPR ); \\\n    if(nb_temporaries!=N) std::cerr << \"nb_temporaries == \" << nb_temporaries << \"\\n\"; \\\n    VERIFY( (#XPR) && nb_temporaries==N ); \\\n  }\n\n\n\ntemplate<typename SparseMatrixType> void sparse_product()\n{\n  typedef typename SparseMatrixType::StorageIndex StorageIndex;\n  Index n = 100;\n  const Index rows  = internal::random<Index>(1,n);\n  const Index cols  = internal::random<Index>(1,n);\n  const Index depth = internal::random<Index>(1,n);\n  typedef typename SparseMatrixType::Scalar Scalar;\n  enum { Flags = SparseMatrixType::Flags };\n\n  double density = (std::max)(8./(rows*cols), 0.2);\n  typedef Matrix<Scalar,Dynamic,Dynamic> DenseMatrix;\n  typedef Matrix<Scalar,Dynamic,1> DenseVector;\n  typedef Matrix<Scalar,1,Dynamic> RowDenseVector;\n  typedef SparseVector<Scalar,0,StorageIndex> ColSpVector;\n  typedef SparseVector<Scalar,RowMajor,StorageIndex> RowSpVector;\n\n  Scalar s1 = internal::random<Scalar>();\n  Scalar s2 = internal::random<Scalar>();\n\n  // test matrix-matrix product\n  {\n    DenseMatrix refMat2  = DenseMatrix::Zero(rows, depth);\n    DenseMatrix refMat2t = DenseMatrix::Zero(depth, rows);\n    DenseMatrix refMat3  = DenseMatrix::Zero(depth, cols);\n    DenseMatrix refMat3t = DenseMatrix::Zero(cols, depth);\n    DenseMatrix refMat4  = DenseMatrix::Zero(rows, cols);\n    DenseMatrix refMat4t = DenseMatrix::Zero(cols, rows);\n    DenseMatrix refMat5  = DenseMatrix::Random(depth, cols);\n    DenseMatrix refMat6  = DenseMatrix::Random(rows, rows);\n    DenseMatrix dm4 = DenseMatrix::Zero(rows, rows);\n//     DenseVector dv1 = DenseVector::Random(rows);\n    SparseMatrixType m2 (rows, depth);\n    SparseMatrixType m2t(depth, rows);\n    SparseMatrixType m3 (depth, cols);\n    SparseMatrixType m3t(cols, depth);\n    SparseMatrixType m4 (rows, cols);\n    SparseMatrixType m4t(cols, rows);\n    SparseMatrixType m6(rows, rows);\n    initSparse(density, refMat2,  m2);\n    initSparse(density, refMat2t, m2t);\n    initSparse(density, refMat3,  m3);\n    initSparse(density, refMat3t, m3t);\n    initSparse(density, refMat4,  m4);\n    initSparse(density, refMat4t, m4t);\n    initSparse(density, refMat6, m6);\n\n//     int c = internal::random<int>(0,depth-1);\n\n    // sparse * sparse\n    VERIFY_IS_APPROX(m4=m2*m3, refMat4=refMat2*refMat3);\n    VERIFY_IS_APPROX(m4=m2t.transpose()*m3, refMat4=refMat2t.transpose()*refMat3);\n    VERIFY_IS_APPROX(m4=m2t.transpose()*m3t.transpose(), refMat4=refMat2t.transpose()*refMat3t.transpose());\n    VERIFY_IS_APPROX(m4=m2*m3t.transpose(), refMat4=refMat2*refMat3t.transpose());\n\n    VERIFY_IS_APPROX(m4 = m2*m3/s1, refMat4 = refMat2*refMat3/s1);\n    VERIFY_IS_APPROX(m4 = m2*m3*s1, refMat4 = refMat2*refMat3*s1);\n    VERIFY_IS_APPROX(m4 = s2*m2*m3*s1, refMat4 = s2*refMat2*refMat3*s1);\n    VERIFY_IS_APPROX(m4 = (m2+m2)*m3, refMat4 = (refMat2+refMat2)*refMat3);\n    VERIFY_IS_APPROX(m4 = m2*m3.leftCols(cols/2), refMat4 = refMat2*refMat3.leftCols(cols/2));\n    VERIFY_IS_APPROX(m4 = m2*(m3+m3).leftCols(cols/2), refMat4 = refMat2*(refMat3+refMat3).leftCols(cols/2));\n\n    VERIFY_IS_APPROX(m4=(m2*m3).pruned(0), refMat4=refMat2*refMat3);\n    VERIFY_IS_APPROX(m4=(m2t.transpose()*m3).pruned(0), refMat4=refMat2t.transpose()*refMat3);\n    VERIFY_IS_APPROX(m4=(m2t.transpose()*m3t.transpose()).pruned(0), refMat4=refMat2t.transpose()*refMat3t.transpose());\n    VERIFY_IS_APPROX(m4=(m2*m3t.transpose()).pruned(0), refMat4=refMat2*refMat3t.transpose());\n\n    // make sure the right product implementation is called:\n    if((!SparseMatrixType::IsRowMajor) && m2.rows()<=m3.cols())\n    {\n      VERIFY_EVALUATION_COUNT(m4 = m2*m3, 3); // 1 temp for the result + 2 for transposing and get a sorted result.\n      VERIFY_EVALUATION_COUNT(m4 = (m2*m3).pruned(0), 1);\n      VERIFY_EVALUATION_COUNT(m4 = (m2*m3).eval().pruned(0), 4);\n    }\n\n    // and that pruning is effective:\n    {\n      DenseMatrix Ad(2,2);\n      Ad << -1, 1, 1, 1;\n      SparseMatrixType As(Ad.sparseView()), B(2,2);\n      VERIFY_IS_EQUAL( (As*As.transpose()).eval().nonZeros(), 4);\n      VERIFY_IS_EQUAL( (Ad*Ad.transpose()).eval().sparseView().eval().nonZeros(), 2);\n      VERIFY_IS_EQUAL( (As*As.transpose()).pruned(1e-6).eval().nonZeros(), 2);\n    }\n\n    // dense ?= sparse * sparse\n    VERIFY_IS_APPROX(dm4 =m2*m3, refMat4 =refMat2*refMat3);\n    VERIFY_IS_APPROX(dm4+=m2*m3, refMat4+=refMat2*refMat3);\n    VERIFY_IS_APPROX(dm4-=m2*m3, refMat4-=refMat2*refMat3);\n    VERIFY_IS_APPROX(dm4 =m2t.transpose()*m3, refMat4 =refMat2t.transpose()*refMat3);\n    VERIFY_IS_APPROX(dm4+=m2t.transpose()*m3, refMat4+=refMat2t.transpose()*refMat3);\n    VERIFY_IS_APPROX(dm4-=m2t.transpose()*m3, refMat4-=refMat2t.transpose()*refMat3);\n    VERIFY_IS_APPROX(dm4 =m2t.transpose()*m3t.transpose(), refMat4 =refMat2t.transpose()*refMat3t.transpose());\n    VERIFY_IS_APPROX(dm4+=m2t.transpose()*m3t.transpose(), refMat4+=refMat2t.transpose()*refMat3t.transpose());\n    VERIFY_IS_APPROX(dm4-=m2t.transpose()*m3t.transpose(), refMat4-=refMat2t.transpose()*refMat3t.transpose());\n    VERIFY_IS_APPROX(dm4 =m2*m3t.transpose(), refMat4 =refMat2*refMat3t.transpose());\n    VERIFY_IS_APPROX(dm4+=m2*m3t.transpose(), refMat4+=refMat2*refMat3t.transpose());\n    VERIFY_IS_APPROX(dm4-=m2*m3t.transpose(), refMat4-=refMat2*refMat3t.transpose());\n    VERIFY_IS_APPROX(dm4 = m2*m3*s1, refMat4 = refMat2*refMat3*s1);\n\n    // test aliasing\n    m4 = m2; refMat4 = refMat2;\n    VERIFY_IS_APPROX(m4=m4*m3, refMat4=refMat4*refMat3);\n\n    // sparse * dense matrix\n    VERIFY_IS_APPROX(dm4=m2*refMat3, refMat4=refMat2*refMat3);\n    VERIFY_IS_APPROX(dm4=m2*refMat3t.transpose(), refMat4=refMat2*refMat3t.transpose());\n    VERIFY_IS_APPROX(dm4=m2t.transpose()*refMat3, refMat4=refMat2t.transpose()*refMat3);\n    VERIFY_IS_APPROX(dm4=m2t.transpose()*refMat3t.transpose(), refMat4=refMat2t.transpose()*refMat3t.transpose());\n\n    VERIFY_IS_APPROX(dm4=m2*refMat3, refMat4=refMat2*refMat3);\n    VERIFY_IS_APPROX(dm4=dm4+m2*refMat3, refMat4=refMat4+refMat2*refMat3);\n    VERIFY_IS_APPROX(dm4+=m2*refMat3, refMat4+=refMat2*refMat3);\n    VERIFY_IS_APPROX(dm4-=m2*refMat3, refMat4-=refMat2*refMat3);\n    VERIFY_IS_APPROX(dm4.noalias()+=m2*refMat3, refMat4+=refMat2*refMat3);\n    VERIFY_IS_APPROX(dm4.noalias()-=m2*refMat3, refMat4-=refMat2*refMat3);\n    VERIFY_IS_APPROX(dm4=m2*(refMat3+refMat3), refMat4=refMat2*(refMat3+refMat3));\n    VERIFY_IS_APPROX(dm4=m2t.transpose()*(refMat3+refMat5)*0.5, refMat4=refMat2t.transpose()*(refMat3+refMat5)*0.5);\n    \n    // sparse * dense vector\n    VERIFY_IS_APPROX(dm4.col(0)=m2*refMat3.col(0), refMat4.col(0)=refMat2*refMat3.col(0));\n    VERIFY_IS_APPROX(dm4.col(0)=m2*refMat3t.transpose().col(0), refMat4.col(0)=refMat2*refMat3t.transpose().col(0));\n    VERIFY_IS_APPROX(dm4.col(0)=m2t.transpose()*refMat3.col(0), refMat4.col(0)=refMat2t.transpose()*refMat3.col(0));\n    VERIFY_IS_APPROX(dm4.col(0)=m2t.transpose()*refMat3t.transpose().col(0), refMat4.col(0)=refMat2t.transpose()*refMat3t.transpose().col(0));\n\n    // dense * sparse\n    VERIFY_IS_APPROX(dm4=refMat2*m3, refMat4=refMat2*refMat3);\n    VERIFY_IS_APPROX(dm4=dm4+refMat2*m3, refMat4=refMat4+refMat2*refMat3);\n    VERIFY_IS_APPROX(dm4+=refMat2*m3, refMat4+=refMat2*refMat3);\n    VERIFY_IS_APPROX(dm4-=refMat2*m3, refMat4-=refMat2*refMat3);\n    VERIFY_IS_APPROX(dm4.noalias()+=refMat2*m3, refMat4+=refMat2*refMat3);\n    VERIFY_IS_APPROX(dm4.noalias()-=refMat2*m3, refMat4-=refMat2*refMat3);\n    VERIFY_IS_APPROX(dm4=refMat2*m3t.transpose(), refMat4=refMat2*refMat3t.transpose());\n    VERIFY_IS_APPROX(dm4=refMat2t.transpose()*m3, refMat4=refMat2t.transpose()*refMat3);\n    VERIFY_IS_APPROX(dm4=refMat2t.transpose()*m3t.transpose(), refMat4=refMat2t.transpose()*refMat3t.transpose());\n\n    // sparse * dense and dense * sparse outer product\n    {\n      Index c  = internal::random<Index>(0,depth-1);\n      Index r  = internal::random<Index>(0,rows-1);\n      Index c1 = internal::random<Index>(0,cols-1);\n      Index r1 = internal::random<Index>(0,depth-1);\n      DenseMatrix dm5  = DenseMatrix::Random(depth, cols);\n\n      VERIFY_IS_APPROX( m4=m2.col(c)*dm5.col(c1).transpose(), refMat4=refMat2.col(c)*dm5.col(c1).transpose());\n      VERIFY_IS_EQUAL(m4.nonZeros(), (refMat4.array()!=0).count());\n      VERIFY_IS_APPROX( m4=m2.middleCols(c,1)*dm5.col(c1).transpose(), refMat4=refMat2.col(c)*dm5.col(c1).transpose());\n      VERIFY_IS_EQUAL(m4.nonZeros(), (refMat4.array()!=0).count());\n      VERIFY_IS_APPROX(dm4=m2.col(c)*dm5.col(c1).transpose(), refMat4=refMat2.col(c)*dm5.col(c1).transpose());\n      \n      VERIFY_IS_APPROX(m4=dm5.col(c1)*m2.col(c).transpose(), refMat4=dm5.col(c1)*refMat2.col(c).transpose());\n      VERIFY_IS_EQUAL(m4.nonZeros(), (refMat4.array()!=0).count());\n      VERIFY_IS_APPROX(m4=dm5.col(c1)*m2.middleCols(c,1).transpose(), refMat4=dm5.col(c1)*refMat2.col(c).transpose());\n      VERIFY_IS_EQUAL(m4.nonZeros(), (refMat4.array()!=0).count());\n      VERIFY_IS_APPROX(dm4=dm5.col(c1)*m2.col(c).transpose(), refMat4=dm5.col(c1)*refMat2.col(c).transpose());\n\n      VERIFY_IS_APPROX( m4=dm5.row(r1).transpose()*m2.col(c).transpose(), refMat4=dm5.row(r1).transpose()*refMat2.col(c).transpose());\n      VERIFY_IS_EQUAL(m4.nonZeros(), (refMat4.array()!=0).count());\n      VERIFY_IS_APPROX(dm4=dm5.row(r1).transpose()*m2.col(c).transpose(), refMat4=dm5.row(r1).transpose()*refMat2.col(c).transpose());\n\n      VERIFY_IS_APPROX( m4=m2.row(r).transpose()*dm5.col(c1).transpose(), refMat4=refMat2.row(r).transpose()*dm5.col(c1).transpose());\n      VERIFY_IS_EQUAL(m4.nonZeros(), (refMat4.array()!=0).count());\n      VERIFY_IS_APPROX( m4=m2.middleRows(r,1).transpose()*dm5.col(c1).transpose(), refMat4=refMat2.row(r).transpose()*dm5.col(c1).transpose());\n      VERIFY_IS_EQUAL(m4.nonZeros(), (refMat4.array()!=0).count());\n      VERIFY_IS_APPROX(dm4=m2.row(r).transpose()*dm5.col(c1).transpose(), refMat4=refMat2.row(r).transpose()*dm5.col(c1).transpose());\n\n      VERIFY_IS_APPROX( m4=dm5.col(c1)*m2.row(r), refMat4=dm5.col(c1)*refMat2.row(r));\n      VERIFY_IS_EQUAL(m4.nonZeros(), (refMat4.array()!=0).count());\n      VERIFY_IS_APPROX( m4=dm5.col(c1)*m2.middleRows(r,1), refMat4=dm5.col(c1)*refMat2.row(r));\n      VERIFY_IS_EQUAL(m4.nonZeros(), (refMat4.array()!=0).count());\n      VERIFY_IS_APPROX(dm4=dm5.col(c1)*m2.row(r), refMat4=dm5.col(c1)*refMat2.row(r));\n\n      VERIFY_IS_APPROX( m4=dm5.row(r1).transpose()*m2.row(r), refMat4=dm5.row(r1).transpose()*refMat2.row(r));\n      VERIFY_IS_EQUAL(m4.nonZeros(), (refMat4.array()!=0).count());\n      VERIFY_IS_APPROX(dm4=dm5.row(r1).transpose()*m2.row(r), refMat4=dm5.row(r1).transpose()*refMat2.row(r));\n    }\n\n    VERIFY_IS_APPROX(m6=m6*m6, refMat6=refMat6*refMat6);\n    \n    // sparse matrix * sparse vector\n    ColSpVector cv0(cols), cv1;\n    DenseVector dcv0(cols), dcv1;\n    initSparse(2*density,dcv0, cv0);\n    \n    RowSpVector rv0(depth), rv1;\n    RowDenseVector drv0(depth), drv1(rv1);\n    initSparse(2*density,drv0, rv0);\n\n    VERIFY_IS_APPROX(cv1=m3*cv0, dcv1=refMat3*dcv0);    \n    VERIFY_IS_APPROX(rv1=rv0*m3, drv1=drv0*refMat3);\n    VERIFY_IS_APPROX(cv1=m3t.adjoint()*cv0, dcv1=refMat3t.adjoint()*dcv0);\n    VERIFY_IS_APPROX(cv1=rv0*m3, dcv1=drv0*refMat3);\n    VERIFY_IS_APPROX(rv1=m3*cv0, drv1=refMat3*dcv0);\n  }\n  \n  // test matrix - diagonal product\n  {\n    DenseMatrix refM2 = DenseMatrix::Zero(rows, cols);\n    DenseMatrix refM3 = DenseMatrix::Zero(rows, cols);\n    DenseMatrix d3 = DenseMatrix::Zero(rows, cols);\n    DiagonalMatrix<Scalar,Dynamic> d1(DenseVector::Random(cols));\n    DiagonalMatrix<Scalar,Dynamic> d2(DenseVector::Random(rows));\n    SparseMatrixType m2(rows, cols);\n    SparseMatrixType m3(rows, cols);\n    initSparse<Scalar>(density, refM2, m2);\n    initSparse<Scalar>(density, refM3, m3);\n    VERIFY_IS_APPROX(m3=m2*d1, refM3=refM2*d1);\n    VERIFY_IS_APPROX(m3=m2.transpose()*d2, refM3=refM2.transpose()*d2);\n    VERIFY_IS_APPROX(m3=d2*m2, refM3=d2*refM2);\n    VERIFY_IS_APPROX(m3=d1*m2.transpose(), refM3=d1*refM2.transpose());\n    \n    // also check with a SparseWrapper:\n    DenseVector v1 = DenseVector::Random(cols);\n    DenseVector v2 = DenseVector::Random(rows);\n    DenseVector v3 = DenseVector::Random(rows);\n    VERIFY_IS_APPROX(m3=m2*v1.asDiagonal(), refM3=refM2*v1.asDiagonal());\n    VERIFY_IS_APPROX(m3=m2.transpose()*v2.asDiagonal(), refM3=refM2.transpose()*v2.asDiagonal());\n    VERIFY_IS_APPROX(m3=v2.asDiagonal()*m2, refM3=v2.asDiagonal()*refM2);\n    VERIFY_IS_APPROX(m3=v1.asDiagonal()*m2.transpose(), refM3=v1.asDiagonal()*refM2.transpose());\n    \n    VERIFY_IS_APPROX(m3=v2.asDiagonal()*m2*v1.asDiagonal(), refM3=v2.asDiagonal()*refM2*v1.asDiagonal());\n\n    VERIFY_IS_APPROX(v2=m2*v1.asDiagonal()*v1, refM2*v1.asDiagonal()*v1);\n    VERIFY_IS_APPROX(v3=v2.asDiagonal()*m2*v1, v2.asDiagonal()*refM2*v1);\n    \n    // evaluate to a dense matrix to check the .row() and .col() iterator functions\n    VERIFY_IS_APPROX(d3=m2*d1, refM3=refM2*d1);\n    VERIFY_IS_APPROX(d3=m2.transpose()*d2, refM3=refM2.transpose()*d2);\n    VERIFY_IS_APPROX(d3=d2*m2, refM3=d2*refM2);\n    VERIFY_IS_APPROX(d3=d1*m2.transpose(), refM3=d1*refM2.transpose());\n  }\n\n  // test self-adjoint and triangular-view products\n  {\n    DenseMatrix b = DenseMatrix::Random(rows, rows);\n    DenseMatrix x = DenseMatrix::Random(rows, rows);\n    DenseMatrix refX = DenseMatrix::Random(rows, rows);\n    DenseMatrix refUp = DenseMatrix::Zero(rows, rows);\n    DenseMatrix refLo = DenseMatrix::Zero(rows, rows);\n    DenseMatrix refS = DenseMatrix::Zero(rows, rows);\n    DenseMatrix refA = DenseMatrix::Zero(rows, rows);\n    SparseMatrixType mUp(rows, rows);\n    SparseMatrixType mLo(rows, rows);\n    SparseMatrixType mS(rows, rows);\n    SparseMatrixType mA(rows, rows);\n    initSparse<Scalar>(density, refA, mA);\n    do {\n      initSparse<Scalar>(density, refUp, mUp, ForceRealDiag|/*ForceNonZeroDiag|*/MakeUpperTriangular);\n    } while (refUp.isZero());\n    refLo = refUp.adjoint();\n    mLo = mUp.adjoint();\n    refS = refUp + refLo;\n    refS.diagonal() *= 0.5;\n    mS = mUp + mLo;\n    // TODO be able to address the diagonal....\n    for (int k=0; k<mS.outerSize(); ++k)\n      for (typename SparseMatrixType::InnerIterator it(mS,k); it; ++it)\n        if (it.index() == k)\n          it.valueRef() *= Scalar(0.5);\n\n    VERIFY_IS_APPROX(refS.adjoint(), refS);\n    VERIFY_IS_APPROX(mS.adjoint(), mS);\n    VERIFY_IS_APPROX(mS, refS);\n    VERIFY_IS_APPROX(x=mS*b, refX=refS*b);\n\n    // sparse selfadjointView with dense matrices\n    VERIFY_IS_APPROX(x=mUp.template selfadjointView<Upper>()*b, refX=refS*b);\n    VERIFY_IS_APPROX(x=mLo.template selfadjointView<Lower>()*b, refX=refS*b);\n    VERIFY_IS_APPROX(x=mS.template selfadjointView<Upper|Lower>()*b, refX=refS*b);\n\n    VERIFY_IS_APPROX(x=b * mUp.template selfadjointView<Upper>(),       refX=b*refS);\n    VERIFY_IS_APPROX(x=b * mLo.template selfadjointView<Lower>(),       refX=b*refS);\n    VERIFY_IS_APPROX(x=b * mS.template selfadjointView<Upper|Lower>(),  refX=b*refS);\n\n    VERIFY_IS_APPROX(x.noalias()+=mUp.template selfadjointView<Upper>()*b, refX+=refS*b);\n    VERIFY_IS_APPROX(x.noalias()-=mLo.template selfadjointView<Lower>()*b, refX-=refS*b);\n    VERIFY_IS_APPROX(x.noalias()+=mS.template selfadjointView<Upper|Lower>()*b, refX+=refS*b);\n    \n    // sparse selfadjointView with sparse matrices\n    SparseMatrixType mSres(rows,rows);\n    VERIFY_IS_APPROX(mSres = mLo.template selfadjointView<Lower>()*mS,\n                     refX = refLo.template selfadjointView<Lower>()*refS);\n    VERIFY_IS_APPROX(mSres = mS * mLo.template selfadjointView<Lower>(),\n                     refX = refS * refLo.template selfadjointView<Lower>());\n    \n    // sparse triangularView with dense matrices\n    VERIFY_IS_APPROX(x=mA.template triangularView<Upper>()*b, refX=refA.template triangularView<Upper>()*b);\n    VERIFY_IS_APPROX(x=mA.template triangularView<Lower>()*b, refX=refA.template triangularView<Lower>()*b);\n    VERIFY_IS_APPROX(x=b*mA.template triangularView<Upper>(), refX=b*refA.template triangularView<Upper>());\n    VERIFY_IS_APPROX(x=b*mA.template triangularView<Lower>(), refX=b*refA.template triangularView<Lower>());\n    \n    // sparse triangularView with sparse matrices\n    VERIFY_IS_APPROX(mSres = mA.template triangularView<Lower>()*mS,   refX = refA.template triangularView<Lower>()*refS);\n    VERIFY_IS_APPROX(mSres = mS * mA.template triangularView<Lower>(), refX = refS * refA.template triangularView<Lower>());\n    VERIFY_IS_APPROX(mSres = mA.template triangularView<Upper>()*mS,   refX = refA.template triangularView<Upper>()*refS);\n    VERIFY_IS_APPROX(mSres = mS * mA.template triangularView<Upper>(), refX = refS * refA.template triangularView<Upper>());\n  }\n}\n\n// New test for Bug in SparseTimeDenseProduct\ntemplate<typename SparseMatrixType, typename DenseMatrixType> void sparse_product_regression_test()\n{\n  // This code does not compile with afflicted versions of the bug\n  SparseMatrixType sm1(3,2);\n  DenseMatrixType m2(2,2);\n  sm1.setZero();\n  m2.setZero();\n\n  DenseMatrixType m3 = sm1*m2;\n\n\n  // This code produces a segfault with afflicted versions of another SparseTimeDenseProduct\n  // bug\n\n  SparseMatrixType sm2(20000,2);\n  sm2.setZero();\n  DenseMatrixType m4(sm2*m2);\n\n  VERIFY_IS_APPROX( m4(0,0), 0.0 );\n}\n\ntemplate<typename Scalar>\nvoid bug_942()\n{\n  typedef Matrix<Scalar, Dynamic, 1>     Vector;\n  typedef SparseMatrix<Scalar, ColMajor> ColSpMat;\n  typedef SparseMatrix<Scalar, RowMajor> RowSpMat;\n  ColSpMat cmA(1,1);\n  cmA.insert(0,0) = 1;\n\n  RowSpMat rmA(1,1);\n  rmA.insert(0,0) = 1;\n\n  Vector d(1);\n  d[0] = 2;\n  \n  double res = 2;\n  \n  VERIFY_IS_APPROX( ( cmA*d.asDiagonal() ).eval().coeff(0,0), res );\n  VERIFY_IS_APPROX( ( d.asDiagonal()*rmA ).eval().coeff(0,0), res );\n  VERIFY_IS_APPROX( ( rmA*d.asDiagonal() ).eval().coeff(0,0), res );\n  VERIFY_IS_APPROX( ( d.asDiagonal()*cmA ).eval().coeff(0,0), res );\n}\n\ntemplate<typename Real>\nvoid test_mixing_types()\n{\n  typedef std::complex<Real> Cplx;\n  typedef SparseMatrix<Real> SpMatReal;\n  typedef SparseMatrix<Cplx> SpMatCplx;\n  typedef SparseMatrix<Cplx,RowMajor> SpRowMatCplx;\n  typedef Matrix<Real,Dynamic,Dynamic> DenseMatReal;\n  typedef Matrix<Cplx,Dynamic,Dynamic> DenseMatCplx;\n\n  Index n = internal::random<Index>(1,100);\n  double density = (std::max)(8./(n*n), 0.2);\n\n  SpMatReal sR1(n,n);\n  SpMatCplx sC1(n,n), sC2(n,n), sC3(n,n);\n  SpRowMatCplx sCR(n,n);\n  DenseMatReal dR1(n,n);\n  DenseMatCplx dC1(n,n), dC2(n,n), dC3(n,n);\n\n  initSparse<Real>(density, dR1, sR1);\n  initSparse<Cplx>(density, dC1, sC1);\n  initSparse<Cplx>(density, dC2, sC2);\n\n  VERIFY_IS_APPROX( sC2 = (sR1 * sC1),                         dC3 = dR1.template cast<Cplx>() * dC1 );\n  VERIFY_IS_APPROX( sC2 = (sC1 * sR1),                         dC3 = dC1 * dR1.template cast<Cplx>() );\n  VERIFY_IS_APPROX( sC2 = (sR1.transpose() * sC1),             dC3 = dR1.template cast<Cplx>().transpose() * dC1 );\n  VERIFY_IS_APPROX( sC2 = (sC1.transpose() * sR1),             dC3 = dC1.transpose() * dR1.template cast<Cplx>() );\n  VERIFY_IS_APPROX( sC2 = (sR1 * sC1.transpose()),             dC3 = dR1.template cast<Cplx>() * dC1.transpose() );\n  VERIFY_IS_APPROX( sC2 = (sC1 * sR1.transpose()),             dC3 = dC1 * dR1.template cast<Cplx>().transpose() );\n  VERIFY_IS_APPROX( sC2 = (sR1.transpose() * sC1.transpose()), dC3 = dR1.template cast<Cplx>().transpose() * dC1.transpose() );\n  VERIFY_IS_APPROX( sC2 = (sC1.transpose() * sR1.transpose()), dC3 = dC1.transpose() * dR1.template cast<Cplx>().transpose() );\n\n  VERIFY_IS_APPROX( sCR = (sR1 * sC1),                         dC3 = dR1.template cast<Cplx>() * dC1 );\n  VERIFY_IS_APPROX( sCR = (sC1 * sR1),                         dC3 = dC1 * dR1.template cast<Cplx>() );\n  VERIFY_IS_APPROX( sCR = (sR1.transpose() * sC1),             dC3 = dR1.template cast<Cplx>().transpose() * dC1 );\n  VERIFY_IS_APPROX( sCR = (sC1.transpose() * sR1),             dC3 = dC1.transpose() * dR1.template cast<Cplx>() );\n  VERIFY_IS_APPROX( sCR = (sR1 * sC1.transpose()),             dC3 = dR1.template cast<Cplx>() * dC1.transpose() );\n  VERIFY_IS_APPROX( sCR = (sC1 * sR1.transpose()),             dC3 = dC1 * dR1.template cast<Cplx>().transpose() );\n  VERIFY_IS_APPROX( sCR = (sR1.transpose() * sC1.transpose()), dC3 = dR1.template cast<Cplx>().transpose() * dC1.transpose() );\n  VERIFY_IS_APPROX( sCR = (sC1.transpose() * sR1.transpose()), dC3 = dC1.transpose() * dR1.template cast<Cplx>().transpose() );\n\n\n  VERIFY_IS_APPROX( sC2 = (sR1 * sC1).pruned(),                         dC3 = dR1.template cast<Cplx>() * dC1 );\n  VERIFY_IS_APPROX( sC2 = (sC1 * sR1).pruned(),                         dC3 = dC1 * dR1.template cast<Cplx>() );\n  VERIFY_IS_APPROX( sC2 = (sR1.transpose() * sC1).pruned(),             dC3 = dR1.template cast<Cplx>().transpose() * dC1 );\n  VERIFY_IS_APPROX( sC2 = (sC1.transpose() * sR1).pruned(),             dC3 = dC1.transpose() * dR1.template cast<Cplx>() );\n  VERIFY_IS_APPROX( sC2 = (sR1 * sC1.transpose()).pruned(),             dC3 = dR1.template cast<Cplx>() * dC1.transpose() );\n  VERIFY_IS_APPROX( sC2 = (sC1 * sR1.transpose()).pruned(),             dC3 = dC1 * dR1.template cast<Cplx>().transpose() );\n  VERIFY_IS_APPROX( sC2 = (sR1.transpose() * sC1.transpose()).pruned(), dC3 = dR1.template cast<Cplx>().transpose() * dC1.transpose() );\n  VERIFY_IS_APPROX( sC2 = (sC1.transpose() * sR1.transpose()).pruned(), dC3 = dC1.transpose() * dR1.template cast<Cplx>().transpose() );\n\n  VERIFY_IS_APPROX( sCR = (sR1 * sC1).pruned(),                         dC3 = dR1.template cast<Cplx>() * dC1 );\n  VERIFY_IS_APPROX( sCR = (sC1 * sR1).pruned(),                         dC3 = dC1 * dR1.template cast<Cplx>() );\n  VERIFY_IS_APPROX( sCR = (sR1.transpose() * sC1).pruned(),             dC3 = dR1.template cast<Cplx>().transpose() * dC1 );\n  VERIFY_IS_APPROX( sCR = (sC1.transpose() * sR1).pruned(),             dC3 = dC1.transpose() * dR1.template cast<Cplx>() );\n  VERIFY_IS_APPROX( sCR = (sR1 * sC1.transpose()).pruned(),             dC3 = dR1.template cast<Cplx>() * dC1.transpose() );\n  VERIFY_IS_APPROX( sCR = (sC1 * sR1.transpose()).pruned(),             dC3 = dC1 * dR1.template cast<Cplx>().transpose() );\n  VERIFY_IS_APPROX( sCR = (sR1.transpose() * sC1.transpose()).pruned(), dC3 = dR1.template cast<Cplx>().transpose() * dC1.transpose() );\n  VERIFY_IS_APPROX( sCR = (sC1.transpose() * sR1.transpose()).pruned(), dC3 = dC1.transpose() * dR1.template cast<Cplx>().transpose() );\n\n\n  VERIFY_IS_APPROX( dC2 = (sR1 * sC1),                         dC3 = dR1.template cast<Cplx>() * dC1 );\n  VERIFY_IS_APPROX( dC2 = (sC1 * sR1),                         dC3 = dC1 * dR1.template cast<Cplx>() );\n  VERIFY_IS_APPROX( dC2 = (sR1.transpose() * sC1),             dC3 = dR1.template cast<Cplx>().transpose() * dC1 );\n  VERIFY_IS_APPROX( dC2 = (sC1.transpose() * sR1),             dC3 = dC1.transpose() * dR1.template cast<Cplx>() );\n  VERIFY_IS_APPROX( dC2 = (sR1 * sC1.transpose()),             dC3 = dR1.template cast<Cplx>() * dC1.transpose() );\n  VERIFY_IS_APPROX( dC2 = (sC1 * sR1.transpose()),             dC3 = dC1 * dR1.template cast<Cplx>().transpose() );\n  VERIFY_IS_APPROX( dC2 = (sR1.transpose() * sC1.transpose()), dC3 = dR1.template cast<Cplx>().transpose() * dC1.transpose() );\n  VERIFY_IS_APPROX( dC2 = (sC1.transpose() * sR1.transpose()), dC3 = dC1.transpose() * dR1.template cast<Cplx>().transpose() );\n\n\n  VERIFY_IS_APPROX( dC2 = dR1 * sC1, dC3 = dR1.template cast<Cplx>() * sC1 );\n  VERIFY_IS_APPROX( dC2 = sR1 * dC1, dC3 = sR1.template cast<Cplx>() * dC1 );\n  VERIFY_IS_APPROX( dC2 = dC1 * sR1, dC3 = dC1 * sR1.template cast<Cplx>() );\n  VERIFY_IS_APPROX( dC2 = sC1 * dR1, dC3 = sC1 * dR1.template cast<Cplx>() );\n\n  VERIFY_IS_APPROX( dC2 = dR1.row(0) * sC1, dC3 = dR1.template cast<Cplx>().row(0) * sC1 );\n  VERIFY_IS_APPROX( dC2 = sR1 * dC1.col(0), dC3 = sR1.template cast<Cplx>() * dC1.col(0) );\n  VERIFY_IS_APPROX( dC2 = dC1.row(0) * sR1, dC3 = dC1.row(0) * sR1.template cast<Cplx>() );\n  VERIFY_IS_APPROX( dC2 = sC1 * dR1.col(0), dC3 = sC1 * dR1.template cast<Cplx>().col(0) );\n}\n\nEIGEN_DECLARE_TEST(sparse_product)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( (sparse_product<SparseMatrix<double,ColMajor> >()) );\n    CALL_SUBTEST_1( (sparse_product<SparseMatrix<double,RowMajor> >()) );\n    CALL_SUBTEST_1( (bug_942<double>()) );\n    CALL_SUBTEST_2( (sparse_product<SparseMatrix<std::complex<double>, ColMajor > >()) );\n    CALL_SUBTEST_2( (sparse_product<SparseMatrix<std::complex<double>, RowMajor > >()) );\n    CALL_SUBTEST_3( (sparse_product<SparseMatrix<float,ColMajor,long int> >()) );\n    CALL_SUBTEST_4( (sparse_product_regression_test<SparseMatrix<double,RowMajor>, Matrix<double, Dynamic, Dynamic, RowMajor> >()) );\n\n    CALL_SUBTEST_5( (test_mixing_types<float>()) );\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/sparse_ref.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 20015 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n// This unit test cannot be easily written to work with EIGEN_DEFAULT_TO_ROW_MAJOR\n#ifdef EIGEN_DEFAULT_TO_ROW_MAJOR\n#undef EIGEN_DEFAULT_TO_ROW_MAJOR\n#endif\n\nstatic long int nb_temporaries;\n\ninline void on_temporary_creation() {\n  // here's a great place to set a breakpoint when debugging failures in this test!\n  nb_temporaries++;\n}\n\n#define EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN { on_temporary_creation(); }\n\n#include \"main.h\"\n#include <Eigen/SparseCore>\n\n#define VERIFY_EVALUATION_COUNT(XPR,N) {\\\n    nb_temporaries = 0; \\\n    CALL_SUBTEST( XPR ); \\\n    if(nb_temporaries!=N) std::cerr << \"nb_temporaries == \" << nb_temporaries << \"\\n\"; \\\n    VERIFY( (#XPR) && nb_temporaries==N ); \\\n  }\n\ntemplate<typename PlainObjectType> void check_const_correctness(const PlainObjectType&)\n{\n  // verify that ref-to-const don't have LvalueBit\n  typedef typename internal::add_const<PlainObjectType>::type ConstPlainObjectType;\n  VERIFY( !(internal::traits<Ref<ConstPlainObjectType> >::Flags & LvalueBit) );\n  VERIFY( !(internal::traits<Ref<ConstPlainObjectType, Aligned> >::Flags & LvalueBit) );\n  VERIFY( !(Ref<ConstPlainObjectType>::Flags & LvalueBit) );\n  VERIFY( !(Ref<ConstPlainObjectType, Aligned>::Flags & LvalueBit) );\n}\n\ntemplate<typename B>\nEIGEN_DONT_INLINE void call_ref_1(Ref<SparseMatrix<float> > a, const B &b) { VERIFY_IS_EQUAL(a.toDense(),b.toDense()); }\n\ntemplate<typename B>\nEIGEN_DONT_INLINE void call_ref_2(const Ref<const SparseMatrix<float> >& a, const B &b) { VERIFY_IS_EQUAL(a.toDense(),b.toDense()); }\n\ntemplate<typename B>\nEIGEN_DONT_INLINE void call_ref_3(const Ref<const SparseMatrix<float>, StandardCompressedFormat>& a, const B &b) {\n  VERIFY(a.isCompressed());\n  VERIFY_IS_EQUAL(a.toDense(),b.toDense());\n}\n\ntemplate<typename B>\nEIGEN_DONT_INLINE void call_ref_4(Ref<SparseVector<float> > a, const B &b) { VERIFY_IS_EQUAL(a.toDense(),b.toDense()); }\n\ntemplate<typename B>\nEIGEN_DONT_INLINE void call_ref_5(const Ref<const SparseVector<float> >& a, const B &b) { VERIFY_IS_EQUAL(a.toDense(),b.toDense()); }\n\nvoid call_ref()\n{\n  SparseMatrix<float>               A = MatrixXf::Random(10,10).sparseView(0.5,1);\n  SparseMatrix<float,RowMajor>      B = MatrixXf::Random(10,10).sparseView(0.5,1);\n  SparseMatrix<float>               C = MatrixXf::Random(10,10).sparseView(0.5,1);\n  C.reserve(VectorXi::Constant(C.outerSize(), 2));\n  const SparseMatrix<float>&        Ac(A);\n  Block<SparseMatrix<float> >       Ab(A,0,1, 3,3);\n  const Block<SparseMatrix<float> > Abc(A,0,1,3,3);\n  SparseVector<float>               vc =  VectorXf::Random(10).sparseView(0.5,1);\n  SparseVector<float,RowMajor>      vr =  VectorXf::Random(10).sparseView(0.5,1);\n  SparseMatrix<float> AA = A*A;\n  \n\n  VERIFY_EVALUATION_COUNT( call_ref_1(A, A),  0);\n//   VERIFY_EVALUATION_COUNT( call_ref_1(Ac, Ac),  0); // does not compile on purpose\n  VERIFY_EVALUATION_COUNT( call_ref_2(A, A),  0);\n  VERIFY_EVALUATION_COUNT( call_ref_3(A, A),  0);\n  VERIFY_EVALUATION_COUNT( call_ref_2(A.transpose(), A.transpose()),  1);\n  VERIFY_EVALUATION_COUNT( call_ref_3(A.transpose(), A.transpose()),  1);\n  VERIFY_EVALUATION_COUNT( call_ref_2(Ac,Ac), 0);\n  VERIFY_EVALUATION_COUNT( call_ref_3(Ac,Ac), 0);\n  VERIFY_EVALUATION_COUNT( call_ref_2(A+A,2*Ac), 1);\n  VERIFY_EVALUATION_COUNT( call_ref_3(A+A,2*Ac), 1);\n  VERIFY_EVALUATION_COUNT( call_ref_2(B, B),  1);\n  VERIFY_EVALUATION_COUNT( call_ref_3(B, B),  1);\n  VERIFY_EVALUATION_COUNT( call_ref_2(B.transpose(), B.transpose()),  0);\n  VERIFY_EVALUATION_COUNT( call_ref_3(B.transpose(), B.transpose()),  0);\n  VERIFY_EVALUATION_COUNT( call_ref_2(A*A, AA),  3);\n  VERIFY_EVALUATION_COUNT( call_ref_3(A*A, AA),  3);\n  \n  VERIFY(!C.isCompressed());\n  VERIFY_EVALUATION_COUNT( call_ref_3(C, C),  1);\n  \n  Ref<SparseMatrix<float> > Ar(A);\n  VERIFY_IS_APPROX(Ar+Ar, A+A);\n  VERIFY_EVALUATION_COUNT( call_ref_1(Ar, A),  0);\n  VERIFY_EVALUATION_COUNT( call_ref_2(Ar, A),  0);\n  \n  Ref<SparseMatrix<float,RowMajor> > Br(B);\n  VERIFY_EVALUATION_COUNT( call_ref_1(Br.transpose(), Br.transpose()),  0);\n  VERIFY_EVALUATION_COUNT( call_ref_2(Br, Br),  1);\n  VERIFY_EVALUATION_COUNT( call_ref_2(Br.transpose(), Br.transpose()),  0);\n  \n  Ref<const SparseMatrix<float> > Arc(A);\n//   VERIFY_EVALUATION_COUNT( call_ref_1(Arc, Arc),  0); // does not compile on purpose\n  VERIFY_EVALUATION_COUNT( call_ref_2(Arc, Arc),  0);\n  \n  VERIFY_EVALUATION_COUNT( call_ref_2(A.middleCols(1,3), A.middleCols(1,3)),  0);\n  \n  VERIFY_EVALUATION_COUNT( call_ref_2(A.col(2), A.col(2)),  0);\n  VERIFY_EVALUATION_COUNT( call_ref_2(vc, vc),  0);\n  VERIFY_EVALUATION_COUNT( call_ref_2(vr.transpose(), vr.transpose()),  0);\n  VERIFY_EVALUATION_COUNT( call_ref_2(vr, vr.transpose()),  0);\n  \n  VERIFY_EVALUATION_COUNT( call_ref_2(A.block(1,1,3,3), A.block(1,1,3,3)),  1); // should be 0 (allocate starts/nnz only)\n\n  VERIFY_EVALUATION_COUNT( call_ref_4(vc, vc),  0);\n  VERIFY_EVALUATION_COUNT( call_ref_4(vr, vr.transpose()),  0);\n  VERIFY_EVALUATION_COUNT( call_ref_5(vc, vc),  0);\n  VERIFY_EVALUATION_COUNT( call_ref_5(vr, vr.transpose()),  0);\n  VERIFY_EVALUATION_COUNT( call_ref_4(A.col(2), A.col(2)),  0);\n  VERIFY_EVALUATION_COUNT( call_ref_5(A.col(2), A.col(2)),  0);\n  // VERIFY_EVALUATION_COUNT( call_ref_4(A.row(2), A.row(2).transpose()),  1); // does not compile on purpose\n  VERIFY_EVALUATION_COUNT( call_ref_5(A.row(2), A.row(2).transpose()),  1);\n}\n\nEIGEN_DECLARE_TEST(sparse_ref)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( check_const_correctness(SparseMatrix<float>()) );\n    CALL_SUBTEST_1( check_const_correctness(SparseMatrix<double,RowMajor>()) );\n    CALL_SUBTEST_2( call_ref() );\n\n    CALL_SUBTEST_3( check_const_correctness(SparseVector<float>()) );\n    CALL_SUBTEST_3( check_const_correctness(SparseVector<double,RowMajor>()) );\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/sparse_solver.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2011 Gael Guennebaud <g.gael@free.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"sparse.h\"\n#include <Eigen/SparseCore>\n#include <sstream>\n\ntemplate<typename Solver, typename Rhs, typename Guess,typename Result>\nvoid solve_with_guess(IterativeSolverBase<Solver>& solver, const MatrixBase<Rhs>& b, const Guess& g, Result &x) {\n  if(internal::random<bool>())\n  {\n    // With a temporary through evaluator<SolveWithGuess>\n    x = solver.derived().solveWithGuess(b,g) + Result::Zero(x.rows(), x.cols());\n  }\n  else\n  {\n    // direct evaluation within x through Assignment<Result,SolveWithGuess>\n    x = solver.derived().solveWithGuess(b.derived(),g);\n  }\n}\n\ntemplate<typename Solver, typename Rhs, typename Guess,typename Result>\nvoid solve_with_guess(SparseSolverBase<Solver>& solver, const MatrixBase<Rhs>& b, const Guess& , Result& x) {\n  if(internal::random<bool>())\n    x = solver.derived().solve(b) + Result::Zero(x.rows(), x.cols());\n  else\n    x = solver.derived().solve(b);\n}\n\ntemplate<typename Solver, typename Rhs, typename Guess,typename Result>\nvoid solve_with_guess(SparseSolverBase<Solver>& solver, const SparseMatrixBase<Rhs>& b, const Guess& , Result& x) {\n  x = solver.derived().solve(b);\n}\n\ntemplate<typename Solver, typename Rhs, typename DenseMat, typename DenseRhs>\nvoid check_sparse_solving(Solver& solver, const typename Solver::MatrixType& A, const Rhs& b, const DenseMat& dA, const DenseRhs& db)\n{\n  typedef typename Solver::MatrixType Mat;\n  typedef typename Mat::Scalar Scalar;\n  typedef typename Mat::StorageIndex StorageIndex;\n\n  DenseRhs refX = dA.householderQr().solve(db);\n  {\n    Rhs x(A.cols(), b.cols());\n    Rhs oldb = b;\n\n    solver.compute(A);\n    if (solver.info() != Success)\n    {\n      std::cerr << \"ERROR | sparse solver testing, factorization failed (\" << typeid(Solver).name() << \")\\n\";\n      VERIFY(solver.info() == Success);\n    }\n    x = solver.solve(b);\n    if (solver.info() != Success)\n    {\n      std::cerr << \"WARNING: sparse solver testing: solving failed (\" << typeid(Solver).name() << \")\\n\";\n      // dump call stack:\n      g_test_level++; \n      VERIFY(solver.info() == Success);\n      g_test_level--;\n      return;\n    }\n    VERIFY(oldb.isApprox(b) && \"sparse solver testing: the rhs should not be modified!\");\n    VERIFY(x.isApprox(refX,test_precision<Scalar>()));\n\n    x.setZero();\n    solve_with_guess(solver, b, x, x);\n    VERIFY(solver.info() == Success && \"solving failed when using solve_with_guess API\");\n    VERIFY(oldb.isApprox(b) && \"sparse solver testing: the rhs should not be modified!\");\n    VERIFY(x.isApprox(refX,test_precision<Scalar>()));\n    \n    x.setZero();\n    // test the analyze/factorize API\n    solver.analyzePattern(A);\n    solver.factorize(A);\n    VERIFY(solver.info() == Success && \"factorization failed when using analyzePattern/factorize API\");\n    x = solver.solve(b);\n    VERIFY(solver.info() == Success && \"solving failed when using analyzePattern/factorize API\");\n    VERIFY(oldb.isApprox(b) && \"sparse solver testing: the rhs should not be modified!\");\n    VERIFY(x.isApprox(refX,test_precision<Scalar>()));\n    \n    x.setZero();\n    // test with Map\n    MappedSparseMatrix<Scalar,Mat::Options,StorageIndex> Am(A.rows(), A.cols(), A.nonZeros(), const_cast<StorageIndex*>(A.outerIndexPtr()), const_cast<StorageIndex*>(A.innerIndexPtr()), const_cast<Scalar*>(A.valuePtr()));\n    solver.compute(Am);\n    VERIFY(solver.info() == Success && \"factorization failed when using Map\");\n    DenseRhs dx(refX);\n    dx.setZero();\n    Map<DenseRhs> xm(dx.data(), dx.rows(), dx.cols());\n    Map<const DenseRhs> bm(db.data(), db.rows(), db.cols());\n    xm = solver.solve(bm);\n    VERIFY(solver.info() == Success && \"solving failed when using Map\");\n    VERIFY(oldb.isApprox(bm) && \"sparse solver testing: the rhs should not be modified!\");\n    VERIFY(xm.isApprox(refX,test_precision<Scalar>()));\n  }\n  \n  // if not too large, do some extra check:\n  if(A.rows()<2000)\n  {\n    // test initialization ctor\n    {\n      Rhs x(b.rows(), b.cols());\n      Solver solver2(A);\n      VERIFY(solver2.info() == Success);\n      x = solver2.solve(b);\n      VERIFY(x.isApprox(refX,test_precision<Scalar>()));\n    }\n\n    // test dense Block as the result and rhs:\n    {\n      DenseRhs x(refX.rows(), refX.cols());\n      DenseRhs oldb(db);\n      x.setZero();\n      x.block(0,0,x.rows(),x.cols()) = solver.solve(db.block(0,0,db.rows(),db.cols()));\n      VERIFY(oldb.isApprox(db) && \"sparse solver testing: the rhs should not be modified!\");\n      VERIFY(x.isApprox(refX,test_precision<Scalar>()));\n    }\n\n    // test uncompressed inputs\n    {\n      Mat A2 = A;\n      A2.reserve((ArrayXf::Random(A.outerSize())+2).template cast<typename Mat::StorageIndex>().eval());\n      solver.compute(A2);\n      Rhs x = solver.solve(b);\n      VERIFY(x.isApprox(refX,test_precision<Scalar>()));\n    }\n\n    // test expression as input\n    {\n      solver.compute(0.5*(A+A));\n      Rhs x = solver.solve(b);\n      VERIFY(x.isApprox(refX,test_precision<Scalar>()));\n\n      Solver solver2(0.5*(A+A));\n      Rhs x2 = solver2.solve(b);\n      VERIFY(x2.isApprox(refX,test_precision<Scalar>()));\n    }\n  }\n}\n\ntemplate<typename Solver, typename Rhs>\nvoid check_sparse_solving_real_cases(Solver& solver, const typename Solver::MatrixType& A, const Rhs& b, const typename Solver::MatrixType& fullA, const Rhs& refX)\n{\n  typedef typename Solver::MatrixType Mat;\n  typedef typename Mat::Scalar Scalar;\n  typedef typename Mat::RealScalar RealScalar;\n  \n  Rhs x(A.cols(), b.cols());\n\n  solver.compute(A);\n  if (solver.info() != Success)\n  {\n    std::cerr << \"ERROR | sparse solver testing, factorization failed (\" << typeid(Solver).name() << \")\\n\";\n    VERIFY(solver.info() == Success);\n  }\n  x = solver.solve(b);\n  \n  if (solver.info() != Success)\n  {\n    std::cerr << \"WARNING | sparse solver testing, solving failed (\" << typeid(Solver).name() << \")\\n\";\n    return;\n  }\n  \n  RealScalar res_error = (fullA*x-b).norm()/b.norm();  \n  VERIFY( (res_error <= test_precision<Scalar>() ) && \"sparse solver failed without noticing it\"); \n\n  \n  if(refX.size() != 0 && (refX - x).norm()/refX.norm() > test_precision<Scalar>())\n  {\n    std::cerr << \"WARNING | found solution is different from the provided reference one\\n\";\n  }\n  \n}\ntemplate<typename Solver, typename DenseMat>\nvoid check_sparse_determinant(Solver& solver, const typename Solver::MatrixType& A, const DenseMat& dA)\n{\n  typedef typename Solver::MatrixType Mat;\n  typedef typename Mat::Scalar Scalar;\n  \n  solver.compute(A);\n  if (solver.info() != Success)\n  {\n    std::cerr << \"WARNING | sparse solver testing: factorization failed (check_sparse_determinant)\\n\";\n    return;\n  }\n\n  Scalar refDet = dA.determinant();\n  VERIFY_IS_APPROX(refDet,solver.determinant());\n}\ntemplate<typename Solver, typename DenseMat>\nvoid check_sparse_abs_determinant(Solver& solver, const typename Solver::MatrixType& A, const DenseMat& dA)\n{\n  using std::abs;\n  typedef typename Solver::MatrixType Mat;\n  typedef typename Mat::Scalar Scalar;\n  \n  solver.compute(A);\n  if (solver.info() != Success)\n  {\n    std::cerr << \"WARNING | sparse solver testing: factorization failed (check_sparse_abs_determinant)\\n\";\n    return;\n  }\n\n  Scalar refDet = abs(dA.determinant());\n  VERIFY_IS_APPROX(refDet,solver.absDeterminant());\n}\n\ntemplate<typename Solver, typename DenseMat>\nint generate_sparse_spd_problem(Solver& , typename Solver::MatrixType& A, typename Solver::MatrixType& halfA, DenseMat& dA, int maxSize = 300)\n{\n  typedef typename Solver::MatrixType Mat;\n  typedef typename Mat::Scalar Scalar;\n  typedef Matrix<Scalar,Dynamic,Dynamic> DenseMatrix;\n\n  int size = internal::random<int>(1,maxSize);\n  double density = (std::max)(8./(size*size), 0.01);\n\n  Mat M(size, size);\n  DenseMatrix dM(size, size);\n\n  initSparse<Scalar>(density, dM, M, ForceNonZeroDiag);\n\n  A = M * M.adjoint();\n  dA = dM * dM.adjoint();\n  \n  halfA.resize(size,size);\n  if(Solver::UpLo==(Lower|Upper))\n    halfA = A;\n  else\n    halfA.template selfadjointView<Solver::UpLo>().rankUpdate(M);\n  \n  return size;\n}\n\n\n#ifdef TEST_REAL_CASES\ntemplate<typename Scalar>\ninline std::string get_matrixfolder()\n{\n  std::string mat_folder = TEST_REAL_CASES; \n  if( internal::is_same<Scalar, std::complex<float> >::value || internal::is_same<Scalar, std::complex<double> >::value )\n    mat_folder  = mat_folder + static_cast<std::string>(\"/complex/\");\n  else\n    mat_folder = mat_folder + static_cast<std::string>(\"/real/\");\n  return mat_folder;\n}\nstd::string sym_to_string(int sym)\n{\n  if(sym==Symmetric) return \"Symmetric \";\n  if(sym==SPD)       return \"SPD \";\n  return \"\";\n}\ntemplate<typename Derived>\nstd::string solver_stats(const IterativeSolverBase<Derived> &solver)\n{\n  std::stringstream ss;\n  ss << solver.iterations() << \" iters, error: \" << solver.error();\n  return ss.str();\n}\ntemplate<typename Derived>\nstd::string solver_stats(const SparseSolverBase<Derived> &/*solver*/)\n{\n  return \"\";\n}\n#endif\n\ntemplate<typename Solver> void check_sparse_spd_solving(Solver& solver, int maxSize = (std::min)(300,EIGEN_TEST_MAX_SIZE), int maxRealWorldSize = 100000)\n{\n  typedef typename Solver::MatrixType Mat;\n  typedef typename Mat::Scalar Scalar;\n  typedef typename Mat::StorageIndex StorageIndex;\n  typedef SparseMatrix<Scalar,ColMajor, StorageIndex> SpMat;\n  typedef SparseVector<Scalar, 0, StorageIndex> SpVec;\n  typedef Matrix<Scalar,Dynamic,Dynamic> DenseMatrix;\n  typedef Matrix<Scalar,Dynamic,1> DenseVector;\n\n  // generate the problem\n  Mat A, halfA;\n  DenseMatrix dA;\n  for (int i = 0; i < g_repeat; i++) {\n    int size = generate_sparse_spd_problem(solver, A, halfA, dA, maxSize);\n\n    // generate the right hand sides\n    int rhsCols = internal::random<int>(1,16);\n    double density = (std::max)(8./(size*rhsCols), 0.1);\n    SpMat B(size,rhsCols);\n    DenseVector b = DenseVector::Random(size);\n    DenseMatrix dB(size,rhsCols);\n    initSparse<Scalar>(density, dB, B, ForceNonZeroDiag);\n    SpVec c = B.col(0);\n    DenseVector dc = dB.col(0);\n  \n    CALL_SUBTEST( check_sparse_solving(solver, A,     b,  dA, b)  );\n    CALL_SUBTEST( check_sparse_solving(solver, halfA, b,  dA, b)  );\n    CALL_SUBTEST( check_sparse_solving(solver, A,     dB, dA, dB) );\n    CALL_SUBTEST( check_sparse_solving(solver, halfA, dB, dA, dB) );\n    CALL_SUBTEST( check_sparse_solving(solver, A,     B,  dA, dB) );\n    CALL_SUBTEST( check_sparse_solving(solver, halfA, B,  dA, dB) );\n    CALL_SUBTEST( check_sparse_solving(solver, A,     c,  dA, dc) );\n    CALL_SUBTEST( check_sparse_solving(solver, halfA, c,  dA, dc) );\n    \n    // check only once\n    if(i==0)\n    {\n      b = DenseVector::Zero(size);\n      check_sparse_solving(solver, A, b, dA, b);\n    }\n  }\n  \n  // First, get the folder \n#ifdef TEST_REAL_CASES\n  // Test real problems with double precision only\n  if (internal::is_same<typename NumTraits<Scalar>::Real, double>::value)\n  {\n    std::string mat_folder = get_matrixfolder<Scalar>();\n    MatrixMarketIterator<Scalar> it(mat_folder);\n    for (; it; ++it)\n    {\n      if (it.sym() == SPD){\n        A = it.matrix();\n        if(A.diagonal().size() <= maxRealWorldSize)\n        {\n          DenseVector b = it.rhs();\n          DenseVector refX = it.refX();\n          PermutationMatrix<Dynamic, Dynamic, StorageIndex> pnull;\n          halfA.resize(A.rows(), A.cols());\n          if(Solver::UpLo == (Lower|Upper))\n            halfA = A;\n          else\n            halfA.template selfadjointView<Solver::UpLo>() = A.template triangularView<Eigen::Lower>().twistedBy(pnull);\n          \n          std::cout << \"INFO | Testing \" << sym_to_string(it.sym()) << \"sparse problem \" << it.matname()\n                  << \" (\" << A.rows() << \"x\" << A.cols() << \") using \" << typeid(Solver).name() << \"...\" << std::endl;\n          CALL_SUBTEST( check_sparse_solving_real_cases(solver, A,     b, A, refX) );\n          std::string stats = solver_stats(solver);\n          if(stats.size()>0)\n            std::cout << \"INFO |  \" << stats << std::endl;\n          CALL_SUBTEST( check_sparse_solving_real_cases(solver, halfA, b, A, refX) );\n        }\n        else\n        {\n          std::cout << \"INFO | Skip sparse problem \\\"\" << it.matname() << \"\\\" (too large)\" << std::endl;\n        }\n      }\n    }\n  }\n#else\n  EIGEN_UNUSED_VARIABLE(maxRealWorldSize);\n#endif\n}\n\ntemplate<typename Solver> void check_sparse_spd_determinant(Solver& solver)\n{\n  typedef typename Solver::MatrixType Mat;\n  typedef typename Mat::Scalar Scalar;\n  typedef Matrix<Scalar,Dynamic,Dynamic> DenseMatrix;\n\n  // generate the problem\n  Mat A, halfA;\n  DenseMatrix dA;\n  generate_sparse_spd_problem(solver, A, halfA, dA, 30);\n  \n  for (int i = 0; i < g_repeat; i++) {\n    check_sparse_determinant(solver, A,     dA);\n    check_sparse_determinant(solver, halfA, dA );\n  }\n}\n\ntemplate<typename Solver, typename DenseMat>\nIndex generate_sparse_square_problem(Solver&, typename Solver::MatrixType& A, DenseMat& dA, int maxSize = 300, int options = ForceNonZeroDiag)\n{\n  typedef typename Solver::MatrixType Mat;\n  typedef typename Mat::Scalar Scalar;\n\n  Index size = internal::random<int>(1,maxSize);\n  double density = (std::max)(8./(size*size), 0.01);\n  \n  A.resize(size,size);\n  dA.resize(size,size);\n\n  initSparse<Scalar>(density, dA, A, options);\n  \n  return size;\n}\n\n\nstruct prune_column {\n  Index m_col;\n  prune_column(Index col) : m_col(col) {}\n  template<class Scalar>\n  bool operator()(Index, Index col, const Scalar&) const {\n    return col != m_col;\n  }\n};\n\n\ntemplate<typename Solver> void check_sparse_square_solving(Solver& solver, int maxSize = 300, int maxRealWorldSize = 100000, bool checkDeficient = false)\n{\n  typedef typename Solver::MatrixType Mat;\n  typedef typename Mat::Scalar Scalar;\n  typedef SparseMatrix<Scalar,ColMajor, typename Mat::StorageIndex> SpMat;\n  typedef SparseVector<Scalar, 0, typename Mat::StorageIndex> SpVec;\n  typedef Matrix<Scalar,Dynamic,Dynamic> DenseMatrix;\n  typedef Matrix<Scalar,Dynamic,1> DenseVector;\n\n  int rhsCols = internal::random<int>(1,16);\n\n  Mat A;\n  DenseMatrix dA;\n  for (int i = 0; i < g_repeat; i++) {\n    Index size = generate_sparse_square_problem(solver, A, dA, maxSize);\n\n    A.makeCompressed();\n    DenseVector b = DenseVector::Random(size);\n    DenseMatrix dB(size,rhsCols);\n    SpMat B(size,rhsCols);\n    double density = (std::max)(8./(size*rhsCols), 0.1);\n    initSparse<Scalar>(density, dB, B, ForceNonZeroDiag);\n    B.makeCompressed();\n    SpVec c = B.col(0);\n    DenseVector dc = dB.col(0);\n    CALL_SUBTEST(check_sparse_solving(solver, A, b,  dA, b));\n    CALL_SUBTEST(check_sparse_solving(solver, A, dB, dA, dB));\n    CALL_SUBTEST(check_sparse_solving(solver, A, B,  dA, dB));\n    CALL_SUBTEST(check_sparse_solving(solver, A, c,  dA, dc));\n    \n    // check only once\n    if(i==0)\n    {\n      CALL_SUBTEST(b = DenseVector::Zero(size); check_sparse_solving(solver, A, b, dA, b));\n    }\n    // regression test for Bug 792 (structurally rank deficient matrices):\n    if(checkDeficient && size>1) {\n      Index col = internal::random<int>(0,int(size-1));\n      A.prune(prune_column(col));\n      solver.compute(A);\n      VERIFY_IS_EQUAL(solver.info(), NumericalIssue);\n    }\n  }\n  \n  // First, get the folder \n#ifdef TEST_REAL_CASES\n  // Test real problems with double precision only\n  if (internal::is_same<typename NumTraits<Scalar>::Real, double>::value)\n  {\n    std::string mat_folder = get_matrixfolder<Scalar>();\n    MatrixMarketIterator<Scalar> it(mat_folder);\n    for (; it; ++it)\n    {\n      A = it.matrix();\n      if(A.diagonal().size() <= maxRealWorldSize)\n      {\n        DenseVector b = it.rhs();\n        DenseVector refX = it.refX();\n        std::cout << \"INFO | Testing \" << sym_to_string(it.sym()) << \"sparse problem \" << it.matname()\n                  << \" (\" << A.rows() << \"x\" << A.cols() << \") using \" << typeid(Solver).name() << \"...\" << std::endl;\n        CALL_SUBTEST(check_sparse_solving_real_cases(solver, A, b, A, refX));\n        std::string stats = solver_stats(solver);\n        if(stats.size()>0)\n          std::cout << \"INFO |  \" << stats << std::endl;\n      }\n      else\n      {\n        std::cout << \"INFO | SKIP sparse problem \\\"\" << it.matname() << \"\\\" (too large)\" << std::endl;\n      }\n    }\n  }\n#else\n  EIGEN_UNUSED_VARIABLE(maxRealWorldSize);\n#endif\n\n}\n\ntemplate<typename Solver> void check_sparse_square_determinant(Solver& solver)\n{\n  typedef typename Solver::MatrixType Mat;\n  typedef typename Mat::Scalar Scalar;\n  typedef Matrix<Scalar,Dynamic,Dynamic> DenseMatrix;\n  \n  for (int i = 0; i < g_repeat; i++) {\n    // generate the problem\n    Mat A;\n    DenseMatrix dA;\n    \n    int size = internal::random<int>(1,30);\n    dA.setRandom(size,size);\n    \n    dA = (dA.array().abs()<0.3).select(0,dA);\n    dA.diagonal() = (dA.diagonal().array()==0).select(1,dA.diagonal());\n    A = dA.sparseView();\n    A.makeCompressed();\n  \n    check_sparse_determinant(solver, A, dA);\n  }\n}\n\ntemplate<typename Solver> void check_sparse_square_abs_determinant(Solver& solver)\n{\n  typedef typename Solver::MatrixType Mat;\n  typedef typename Mat::Scalar Scalar;\n  typedef Matrix<Scalar,Dynamic,Dynamic> DenseMatrix;\n\n  for (int i = 0; i < g_repeat; i++) {\n    // generate the problem\n    Mat A;\n    DenseMatrix dA;\n    generate_sparse_square_problem(solver, A, dA, 30);\n    A.makeCompressed();\n    check_sparse_abs_determinant(solver, A, dA);\n  }\n}\n\ntemplate<typename Solver, typename DenseMat>\nvoid generate_sparse_leastsquare_problem(Solver&, typename Solver::MatrixType& A, DenseMat& dA, int maxSize = 300, int options = ForceNonZeroDiag)\n{\n  typedef typename Solver::MatrixType Mat;\n  typedef typename Mat::Scalar Scalar;\n\n  int rows = internal::random<int>(1,maxSize);\n  int cols = internal::random<int>(1,rows);\n  double density = (std::max)(8./(rows*cols), 0.01);\n  \n  A.resize(rows,cols);\n  dA.resize(rows,cols);\n\n  initSparse<Scalar>(density, dA, A, options);\n}\n\ntemplate<typename Solver> void check_sparse_leastsquare_solving(Solver& solver)\n{\n  typedef typename Solver::MatrixType Mat;\n  typedef typename Mat::Scalar Scalar;\n  typedef SparseMatrix<Scalar,ColMajor, typename Mat::StorageIndex> SpMat;\n  typedef Matrix<Scalar,Dynamic,Dynamic> DenseMatrix;\n  typedef Matrix<Scalar,Dynamic,1> DenseVector;\n\n  int rhsCols = internal::random<int>(1,16);\n\n  Mat A;\n  DenseMatrix dA;\n  for (int i = 0; i < g_repeat; i++) {\n    generate_sparse_leastsquare_problem(solver, A, dA);\n\n    A.makeCompressed();\n    DenseVector b = DenseVector::Random(A.rows());\n    DenseMatrix dB(A.rows(),rhsCols);\n    SpMat B(A.rows(),rhsCols);\n    double density = (std::max)(8./(A.rows()*rhsCols), 0.1);\n    initSparse<Scalar>(density, dB, B, ForceNonZeroDiag);\n    B.makeCompressed();\n    check_sparse_solving(solver, A, b,  dA, b);\n    check_sparse_solving(solver, A, dB, dA, dB);\n    check_sparse_solving(solver, A, B,  dA, dB);\n    \n    // check only once\n    if(i==0)\n    {\n      b = DenseVector::Zero(A.rows());\n      check_sparse_solving(solver, A, b, dA, b);\n    }\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/sparse_solvers.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"sparse.h\"\n\ntemplate<typename Scalar> void\ninitSPD(double density,\n        Matrix<Scalar,Dynamic,Dynamic>& refMat,\n        SparseMatrix<Scalar>& sparseMat)\n{\n  Matrix<Scalar,Dynamic,Dynamic> aux(refMat.rows(),refMat.cols());\n  initSparse(density,refMat,sparseMat);\n  refMat = refMat * refMat.adjoint();\n  for (int k=0; k<2; ++k)\n  {\n    initSparse(density,aux,sparseMat,ForceNonZeroDiag);\n    refMat += aux * aux.adjoint();\n  }\n  sparseMat.setZero();\n  for (int j=0 ; j<sparseMat.cols(); ++j)\n    for (int i=j ; i<sparseMat.rows(); ++i)\n      if (refMat(i,j)!=Scalar(0))\n        sparseMat.insert(i,j) = refMat(i,j);\n  sparseMat.finalize();\n}\n\ntemplate<typename Scalar> void sparse_solvers(int rows, int cols)\n{\n  double density = (std::max)(8./(rows*cols), 0.01);\n  typedef Matrix<Scalar,Dynamic,Dynamic> DenseMatrix;\n  typedef Matrix<Scalar,Dynamic,1> DenseVector;\n  // Scalar eps = 1e-6;\n\n  DenseVector vec1 = DenseVector::Random(rows);\n\n  std::vector<Vector2i> zeroCoords;\n  std::vector<Vector2i> nonzeroCoords;\n\n  // test triangular solver\n  {\n    DenseVector vec2 = vec1, vec3 = vec1;\n    SparseMatrix<Scalar> m2(rows, cols);\n    DenseMatrix refMat2 = DenseMatrix::Zero(rows, cols);\n\n    // lower - dense\n    initSparse<Scalar>(density, refMat2, m2, ForceNonZeroDiag|MakeLowerTriangular, &zeroCoords, &nonzeroCoords);\n    VERIFY_IS_APPROX(refMat2.template triangularView<Lower>().solve(vec2),\n                     m2.template triangularView<Lower>().solve(vec3));\n\n    // upper - dense\n    initSparse<Scalar>(density, refMat2, m2, ForceNonZeroDiag|MakeUpperTriangular, &zeroCoords, &nonzeroCoords);\n    VERIFY_IS_APPROX(refMat2.template triangularView<Upper>().solve(vec2),\n                     m2.template triangularView<Upper>().solve(vec3));\n    VERIFY_IS_APPROX(refMat2.conjugate().template triangularView<Upper>().solve(vec2),\n                     m2.conjugate().template triangularView<Upper>().solve(vec3));\n    {\n      SparseMatrix<Scalar> cm2(m2);\n      //Index rows, Index cols, Index nnz, Index* outerIndexPtr, Index* innerIndexPtr, Scalar* valuePtr\n      MappedSparseMatrix<Scalar> mm2(rows, cols, cm2.nonZeros(), cm2.outerIndexPtr(), cm2.innerIndexPtr(), cm2.valuePtr());\n      VERIFY_IS_APPROX(refMat2.conjugate().template triangularView<Upper>().solve(vec2),\n                       mm2.conjugate().template triangularView<Upper>().solve(vec3));\n    }\n\n    // lower - transpose\n    initSparse<Scalar>(density, refMat2, m2, ForceNonZeroDiag|MakeLowerTriangular, &zeroCoords, &nonzeroCoords);\n    VERIFY_IS_APPROX(refMat2.transpose().template triangularView<Upper>().solve(vec2),\n                     m2.transpose().template triangularView<Upper>().solve(vec3));\n\n    // upper - transpose\n    initSparse<Scalar>(density, refMat2, m2, ForceNonZeroDiag|MakeUpperTriangular, &zeroCoords, &nonzeroCoords);\n    VERIFY_IS_APPROX(refMat2.transpose().template triangularView<Lower>().solve(vec2),\n                     m2.transpose().template triangularView<Lower>().solve(vec3));\n\n    SparseMatrix<Scalar> matB(rows, rows);\n    DenseMatrix refMatB = DenseMatrix::Zero(rows, rows);\n\n    // lower - sparse\n    initSparse<Scalar>(density, refMat2, m2, ForceNonZeroDiag|MakeLowerTriangular);\n    initSparse<Scalar>(density, refMatB, matB);\n    refMat2.template triangularView<Lower>().solveInPlace(refMatB);\n    m2.template triangularView<Lower>().solveInPlace(matB);\n    VERIFY_IS_APPROX(matB.toDense(), refMatB);\n\n    // upper - sparse\n    initSparse<Scalar>(density, refMat2, m2, ForceNonZeroDiag|MakeUpperTriangular);\n    initSparse<Scalar>(density, refMatB, matB);\n    refMat2.template triangularView<Upper>().solveInPlace(refMatB);\n    m2.template triangularView<Upper>().solveInPlace(matB);\n    VERIFY_IS_APPROX(matB, refMatB);\n\n    // test deprecated API\n    initSparse<Scalar>(density, refMat2, m2, ForceNonZeroDiag|MakeLowerTriangular, &zeroCoords, &nonzeroCoords);\n    VERIFY_IS_APPROX(refMat2.template triangularView<Lower>().solve(vec2),\n                     m2.template triangularView<Lower>().solve(vec3));\n\n    // test empty triangular matrix\n    {\n      m2.resize(0,0);\n      refMatB.resize(0,refMatB.cols());\n      DenseMatrix res = m2.template triangularView<Lower>().solve(refMatB);\n      VERIFY_IS_EQUAL(res.rows(),0);\n      VERIFY_IS_EQUAL(res.cols(),refMatB.cols());\n      res = refMatB;\n      m2.template triangularView<Lower>().solveInPlace(res);\n      VERIFY_IS_EQUAL(res.rows(),0);\n      VERIFY_IS_EQUAL(res.cols(),refMatB.cols());\n    }\n  }\n}\n\nEIGEN_DECLARE_TEST(sparse_solvers)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1(sparse_solvers<double>(8, 8) );\n    int s = internal::random<int>(1,300);\n    CALL_SUBTEST_2(sparse_solvers<std::complex<double> >(s,s) );\n    CALL_SUBTEST_1(sparse_solvers<double>(s,s) );\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/sparse_vector.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2011 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"sparse.h\"\n\ntemplate<typename Scalar,typename StorageIndex> void sparse_vector(int rows, int cols)\n{\n  double densityMat = (std::max)(8./(rows*cols), 0.01);\n  double densityVec = (std::max)(8./(rows), 0.1);\n  typedef Matrix<Scalar,Dynamic,Dynamic> DenseMatrix;\n  typedef Matrix<Scalar,Dynamic,1> DenseVector;\n  typedef SparseVector<Scalar,0,StorageIndex> SparseVectorType;\n  typedef SparseMatrix<Scalar,0,StorageIndex> SparseMatrixType;\n  Scalar eps = 1e-6;\n\n  SparseMatrixType m1(rows,rows);\n  SparseVectorType v1(rows), v2(rows), v3(rows);\n  DenseMatrix refM1 = DenseMatrix::Zero(rows, rows);\n  DenseVector refV1 = DenseVector::Random(rows),\n              refV2 = DenseVector::Random(rows),\n              refV3 = DenseVector::Random(rows);\n\n  std::vector<int> zerocoords, nonzerocoords;\n  initSparse<Scalar>(densityVec, refV1, v1, &zerocoords, &nonzerocoords);\n  initSparse<Scalar>(densityMat, refM1, m1);\n\n  initSparse<Scalar>(densityVec, refV2, v2);\n  initSparse<Scalar>(densityVec, refV3, v3);\n\n  Scalar s1 = internal::random<Scalar>();\n\n  // test coeff and coeffRef\n  for (unsigned int i=0; i<zerocoords.size(); ++i)\n  {\n    VERIFY_IS_MUCH_SMALLER_THAN( v1.coeff(zerocoords[i]), eps );\n    //VERIFY_RAISES_ASSERT( v1.coeffRef(zerocoords[i]) = 5 );\n  }\n  {\n    VERIFY(int(nonzerocoords.size()) == v1.nonZeros());\n    int j=0;\n    for (typename SparseVectorType::InnerIterator it(v1); it; ++it,++j)\n    {\n      VERIFY(nonzerocoords[j]==it.index());\n      VERIFY(it.value()==v1.coeff(it.index()));\n      VERIFY(it.value()==refV1.coeff(it.index()));\n    }\n  }\n  VERIFY_IS_APPROX(v1, refV1);\n  \n  // test coeffRef with reallocation\n  {\n    SparseVectorType v4(rows);\n    DenseVector v5 = DenseVector::Zero(rows);\n    for(int k=0; k<rows; ++k)\n    {\n      int i = internal::random<int>(0,rows-1);\n      Scalar v = internal::random<Scalar>();\n      v4.coeffRef(i) += v;\n      v5.coeffRef(i) += v;\n    }\n    VERIFY_IS_APPROX(v4,v5);\n  }\n\n  v1.coeffRef(nonzerocoords[0]) = Scalar(5);\n  refV1.coeffRef(nonzerocoords[0]) = Scalar(5);\n  VERIFY_IS_APPROX(v1, refV1);\n\n  VERIFY_IS_APPROX(v1+v2, refV1+refV2);\n  VERIFY_IS_APPROX(v1+v2+v3, refV1+refV2+refV3);\n\n  VERIFY_IS_APPROX(v1*s1-v2, refV1*s1-refV2);\n\n  VERIFY_IS_APPROX(v1*=s1, refV1*=s1);\n  VERIFY_IS_APPROX(v1/=s1, refV1/=s1);\n\n  VERIFY_IS_APPROX(v1+=v2, refV1+=refV2);\n  VERIFY_IS_APPROX(v1-=v2, refV1-=refV2);\n\n  VERIFY_IS_APPROX(v1.dot(v2), refV1.dot(refV2));\n  VERIFY_IS_APPROX(v1.dot(refV2), refV1.dot(refV2));\n\n  VERIFY_IS_APPROX(m1*v2, refM1*refV2);\n  VERIFY_IS_APPROX(v1.dot(m1*v2), refV1.dot(refM1*refV2));\n  {\n    int i = internal::random<int>(0,rows-1);\n    VERIFY_IS_APPROX(v1.dot(m1.col(i)), refV1.dot(refM1.col(i)));\n  }\n\n\n  VERIFY_IS_APPROX(v1.squaredNorm(), refV1.squaredNorm());\n  \n  VERIFY_IS_APPROX(v1.blueNorm(), refV1.blueNorm());\n\n  // test aliasing\n  VERIFY_IS_APPROX((v1 = -v1), (refV1 = -refV1));\n  VERIFY_IS_APPROX((v1 = v1.transpose()), (refV1 = refV1.transpose().eval()));\n  VERIFY_IS_APPROX((v1 += -v1), (refV1 += -refV1));\n  \n  // sparse matrix to sparse vector\n  SparseMatrixType mv1;\n  VERIFY_IS_APPROX((mv1=v1),v1);\n  VERIFY_IS_APPROX(mv1,(v1=mv1));\n  VERIFY_IS_APPROX(mv1,(v1=mv1.transpose()));\n  \n  // check copy to dense vector with transpose\n  refV3.resize(0);\n  VERIFY_IS_APPROX(refV3 = v1.transpose(),v1.toDense()); \n  VERIFY_IS_APPROX(DenseVector(v1),v1.toDense()); \n\n  // test conservative resize\n  {\n    std::vector<StorageIndex> inc;\n    if(rows > 3)\n      inc.push_back(-3);\n    inc.push_back(0);\n    inc.push_back(3);\n    inc.push_back(1);\n    inc.push_back(10);\n\n    for(std::size_t i = 0; i< inc.size(); i++) {\n      StorageIndex incRows = inc[i];\n      SparseVectorType vec1(rows);\n      DenseVector refVec1 = DenseVector::Zero(rows);\n      initSparse<Scalar>(densityVec, refVec1, vec1);\n\n      vec1.conservativeResize(rows+incRows);\n      refVec1.conservativeResize(rows+incRows);\n      if (incRows > 0) refVec1.tail(incRows).setZero();\n\n      VERIFY_IS_APPROX(vec1, refVec1);\n\n      // Insert new values\n      if (incRows > 0)\n        vec1.insert(vec1.rows()-1) = refVec1(refVec1.rows()-1) = 1;\n\n      VERIFY_IS_APPROX(vec1, refVec1);\n    }\n  }\n\n}\n\nEIGEN_DECLARE_TEST(sparse_vector)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    int r = Eigen::internal::random<int>(1,500), c = Eigen::internal::random<int>(1,500);\n    if(Eigen::internal::random<int>(0,4) == 0) {\n      r = c; // check square matrices in 25% of tries\n    }\n    EIGEN_UNUSED_VARIABLE(r+c);\n\n    CALL_SUBTEST_1(( sparse_vector<double,int>(8, 8) ));\n    CALL_SUBTEST_2(( sparse_vector<std::complex<double>, int>(r, c) ));\n    CALL_SUBTEST_1(( sparse_vector<double,long int>(r, c) ));\n    CALL_SUBTEST_1(( sparse_vector<double,short>(r, c) ));\n  }\n}\n\n"
  },
  {
    "path": "3rdparty/eigen3/test/sparselu.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n// SparseLU solve does not accept column major matrices for the destination.\n// However, as expected, the generic check_sparse_square_solving routines produces row-major\n// rhs and destination matrices when compiled with EIGEN_DEFAULT_TO_ROW_MAJOR\n\n#ifdef EIGEN_DEFAULT_TO_ROW_MAJOR\n#undef EIGEN_DEFAULT_TO_ROW_MAJOR\n#endif\n\n#include \"sparse_solver.h\"\n#include <Eigen/SparseLU>\n#include <unsupported/Eigen/SparseExtra>\n\ntemplate<typename T> void test_sparselu_T()\n{\n  SparseLU<SparseMatrix<T, ColMajor> /*, COLAMDOrdering<int>*/ > sparselu_colamd; // COLAMDOrdering is the default\n  SparseLU<SparseMatrix<T, ColMajor>, AMDOrdering<int> > sparselu_amd; \n  SparseLU<SparseMatrix<T, ColMajor, long int>, NaturalOrdering<long int> > sparselu_natural;\n  \n  check_sparse_square_solving(sparselu_colamd,  300, 100000, true); \n  check_sparse_square_solving(sparselu_amd,     300,  10000, true);\n  check_sparse_square_solving(sparselu_natural, 300,   2000, true);\n  \n  check_sparse_square_abs_determinant(sparselu_colamd);\n  check_sparse_square_abs_determinant(sparselu_amd);\n  \n  check_sparse_square_determinant(sparselu_colamd);\n  check_sparse_square_determinant(sparselu_amd);\n}\n\nEIGEN_DECLARE_TEST(sparselu)\n{\n  CALL_SUBTEST_1(test_sparselu_T<float>()); \n  CALL_SUBTEST_2(test_sparselu_T<double>());\n  CALL_SUBTEST_3(test_sparselu_T<std::complex<float> >()); \n  CALL_SUBTEST_4(test_sparselu_T<std::complex<double> >());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/sparseqr.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Desire Nuentsa Wakam <desire.nuentsa_wakam@inria.fr>\n// Copyright (C) 2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n#include \"sparse.h\"\n#include <Eigen/SparseQR>\n\ntemplate<typename MatrixType,typename DenseMat>\nint generate_sparse_rectangular_problem(MatrixType& A, DenseMat& dA, int maxRows = 300, int maxCols = 150)\n{\n  eigen_assert(maxRows >= maxCols);\n  typedef typename MatrixType::Scalar Scalar;\n  int rows = internal::random<int>(1,maxRows);\n  int cols = internal::random<int>(1,maxCols);\n  double density = (std::max)(8./(rows*cols), 0.01);\n  \n  A.resize(rows,cols);\n  dA.resize(rows,cols);\n  initSparse<Scalar>(density, dA, A,ForceNonZeroDiag);\n  A.makeCompressed();\n  int nop = internal::random<int>(0, internal::random<double>(0,1) > 0.5 ? cols/2 : 0);\n  for(int k=0; k<nop; ++k)\n  {\n    int j0 = internal::random<int>(0,cols-1);\n    int j1 = internal::random<int>(0,cols-1);\n    Scalar s = internal::random<Scalar>();\n    A.col(j0)  = s * A.col(j1);\n    dA.col(j0) = s * dA.col(j1);\n  }\n  \n//   if(rows<cols) {\n//     A.conservativeResize(cols,cols);\n//     dA.conservativeResize(cols,cols);\n//     dA.bottomRows(cols-rows).setZero();\n//   }\n  \n  return rows;\n}\n\ntemplate<typename Scalar> void test_sparseqr_scalar()\n{\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  typedef SparseMatrix<Scalar,ColMajor> MatrixType; \n  typedef Matrix<Scalar,Dynamic,Dynamic> DenseMat;\n  typedef Matrix<Scalar,Dynamic,1> DenseVector;\n  MatrixType A;\n  DenseMat dA;\n  DenseVector refX,x,b; \n  SparseQR<MatrixType, COLAMDOrdering<int> > solver; \n  generate_sparse_rectangular_problem(A,dA);\n  \n  b = dA * DenseVector::Random(A.cols());\n  solver.compute(A);\n\n  // Q should be MxM\n  VERIFY_IS_EQUAL(solver.matrixQ().rows(), A.rows());\n  VERIFY_IS_EQUAL(solver.matrixQ().cols(), A.rows());\n\n  // R should be MxN\n  VERIFY_IS_EQUAL(solver.matrixR().rows(), A.rows());\n  VERIFY_IS_EQUAL(solver.matrixR().cols(), A.cols());\n\n  // Q and R can be multiplied\n  DenseMat recoveredA = solver.matrixQ()\n                      * DenseMat(solver.matrixR().template triangularView<Upper>())\n                      * solver.colsPermutation().transpose();\n  VERIFY_IS_EQUAL(recoveredA.rows(), A.rows());\n  VERIFY_IS_EQUAL(recoveredA.cols(), A.cols());\n\n  // and in the full rank case the original matrix is recovered\n  if (solver.rank() == A.cols())\n  {\n      VERIFY_IS_APPROX(A, recoveredA);\n  }\n\n  if(internal::random<float>(0,1)>0.5f)\n    solver.factorize(A);  // this checks that calling analyzePattern is not needed if the pattern do not change.\n  if (solver.info() != Success)\n  {\n    std::cerr << \"sparse QR factorization failed\\n\";\n    exit(0);\n    return;\n  }\n  x = solver.solve(b);\n  if (solver.info() != Success)\n  {\n    std::cerr << \"sparse QR factorization failed\\n\";\n    exit(0);\n    return;\n  }\n\n  // Compare with a dense QR solver\n  ColPivHouseholderQR<DenseMat> dqr(dA);\n  refX = dqr.solve(b);\n  \n  bool rank_deficient = A.cols()>A.rows() || dqr.rank()<A.cols();\n  if(rank_deficient)\n  {\n    // rank deficient problem -> we might have to increase the threshold\n    // to get a correct solution.\n    RealScalar th = RealScalar(20)*dA.colwise().norm().maxCoeff()*(A.rows()+A.cols()) * NumTraits<RealScalar>::epsilon();\n    for(Index k=0; (k<16) && !test_isApprox(A*x,b); ++k)\n    {\n      th *= RealScalar(10);\n      solver.setPivotThreshold(th);\n      solver.compute(A);\n      x = solver.solve(b);\n    }\n  }\n\n  VERIFY_IS_APPROX(A * x, b);\n  \n  // For rank deficient problem, the estimated rank might\n  // be slightly off, so let's only raise a warning in such cases.\n  if(rank_deficient) ++g_test_level;\n  VERIFY_IS_EQUAL(solver.rank(), dqr.rank());\n  if(rank_deficient) --g_test_level;\n\n  if(solver.rank()==A.cols()) // full rank\n    VERIFY_IS_APPROX(x, refX);\n//   else\n//     VERIFY((dA * refX - b).norm() * 2 > (A * x - b).norm() );\n\n  // Compute explicitly the matrix Q\n  MatrixType Q, QtQ, idM;\n  Q = solver.matrixQ();\n  //Check  ||Q' * Q - I ||\n  QtQ = Q * Q.adjoint();\n  idM.resize(Q.rows(), Q.rows()); idM.setIdentity();\n  VERIFY(idM.isApprox(QtQ));\n  \n  // Q to dense\n  DenseMat dQ;\n  dQ = solver.matrixQ();\n  VERIFY_IS_APPROX(Q, dQ);\n}\nEIGEN_DECLARE_TEST(sparseqr)\n{\n  for(int i=0; i<g_repeat; ++i)\n  {\n    CALL_SUBTEST_1(test_sparseqr_scalar<double>());\n    CALL_SUBTEST_2(test_sparseqr_scalar<std::complex<double> >());\n  }\n}\n\n"
  },
  {
    "path": "3rdparty/eigen3/test/special_numbers.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2013 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\ntemplate<typename Scalar> void special_numbers()\n{\n  typedef Matrix<Scalar, Dynamic,Dynamic> MatType;\n  int rows = internal::random<int>(1,300);\n  int cols = internal::random<int>(1,300);\n  \n  Scalar nan = std::numeric_limits<Scalar>::quiet_NaN();\n  Scalar inf = std::numeric_limits<Scalar>::infinity();\n  Scalar s1 = internal::random<Scalar>();\n  \n  MatType m1    = MatType::Random(rows,cols),\n          mnan  = MatType::Random(rows,cols),\n          minf  = MatType::Random(rows,cols),\n          mboth = MatType::Random(rows,cols);\n          \n  int n = internal::random<int>(1,10);\n  for(int k=0; k<n; ++k)\n  {\n    mnan(internal::random<int>(0,rows-1), internal::random<int>(0,cols-1)) = nan;\n    minf(internal::random<int>(0,rows-1), internal::random<int>(0,cols-1)) = inf;\n  }\n  mboth = mnan + minf;\n  \n  VERIFY(!m1.hasNaN());\n  VERIFY(m1.allFinite());\n  \n  VERIFY(mnan.hasNaN());\n  VERIFY((s1*mnan).hasNaN());\n  VERIFY(!minf.hasNaN());\n  VERIFY(!(2*minf).hasNaN());\n  VERIFY(mboth.hasNaN());\n  VERIFY(mboth.array().hasNaN());\n  \n  VERIFY(!mnan.allFinite());\n  VERIFY(!minf.allFinite());\n  VERIFY(!(minf-mboth).allFinite());\n  VERIFY(!mboth.allFinite());\n  VERIFY(!mboth.array().allFinite());\n}\n\nEIGEN_DECLARE_TEST(special_numbers)\n{\n  for(int i = 0; i < 10*g_repeat; i++) {\n    CALL_SUBTEST_1( special_numbers<float>() );\n    CALL_SUBTEST_1( special_numbers<double>() );\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/split_test_helper.h",
    "content": "#if defined(EIGEN_TEST_PART_1) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_1(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_1(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_2) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_2(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_2(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_3) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_3(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_3(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_4) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_4(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_4(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_5) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_5(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_5(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_6) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_6(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_6(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_7) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_7(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_7(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_8) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_8(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_8(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_9) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_9(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_9(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_10) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_10(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_10(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_11) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_11(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_11(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_12) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_12(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_12(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_13) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_13(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_13(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_14) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_14(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_14(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_15) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_15(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_15(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_16) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_16(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_16(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_17) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_17(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_17(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_18) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_18(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_18(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_19) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_19(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_19(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_20) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_20(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_20(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_21) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_21(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_21(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_22) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_22(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_22(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_23) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_23(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_23(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_24) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_24(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_24(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_25) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_25(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_25(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_26) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_26(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_26(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_27) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_27(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_27(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_28) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_28(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_28(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_29) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_29(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_29(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_30) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_30(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_30(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_31) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_31(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_31(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_32) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_32(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_32(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_33) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_33(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_33(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_34) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_34(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_34(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_35) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_35(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_35(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_36) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_36(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_36(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_37) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_37(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_37(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_38) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_38(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_38(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_39) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_39(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_39(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_40) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_40(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_40(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_41) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_41(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_41(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_42) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_42(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_42(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_43) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_43(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_43(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_44) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_44(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_44(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_45) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_45(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_45(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_46) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_46(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_46(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_47) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_47(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_47(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_48) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_48(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_48(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_49) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_49(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_49(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_50) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_50(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_50(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_51) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_51(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_51(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_52) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_52(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_52(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_53) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_53(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_53(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_54) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_54(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_54(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_55) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_55(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_55(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_56) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_56(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_56(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_57) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_57(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_57(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_58) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_58(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_58(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_59) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_59(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_59(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_60) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_60(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_60(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_61) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_61(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_61(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_62) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_62(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_62(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_63) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_63(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_63(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_64) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_64(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_64(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_65) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_65(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_65(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_66) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_66(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_66(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_67) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_67(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_67(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_68) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_68(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_68(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_69) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_69(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_69(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_70) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_70(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_70(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_71) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_71(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_71(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_72) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_72(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_72(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_73) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_73(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_73(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_74) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_74(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_74(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_75) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_75(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_75(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_76) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_76(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_76(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_77) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_77(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_77(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_78) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_78(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_78(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_79) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_79(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_79(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_80) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_80(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_80(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_81) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_81(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_81(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_82) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_82(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_82(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_83) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_83(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_83(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_84) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_84(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_84(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_85) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_85(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_85(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_86) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_86(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_86(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_87) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_87(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_87(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_88) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_88(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_88(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_89) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_89(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_89(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_90) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_90(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_90(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_91) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_91(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_91(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_92) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_92(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_92(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_93) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_93(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_93(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_94) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_94(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_94(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_95) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_95(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_95(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_96) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_96(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_96(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_97) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_97(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_97(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_98) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_98(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_98(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_99) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_99(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_99(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_100) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_100(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_100(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_101) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_101(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_101(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_102) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_102(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_102(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_103) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_103(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_103(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_104) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_104(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_104(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_105) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_105(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_105(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_106) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_106(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_106(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_107) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_107(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_107(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_108) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_108(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_108(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_109) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_109(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_109(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_110) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_110(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_110(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_111) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_111(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_111(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_112) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_112(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_112(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_113) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_113(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_113(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_114) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_114(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_114(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_115) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_115(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_115(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_116) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_116(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_116(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_117) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_117(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_117(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_118) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_118(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_118(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_119) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_119(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_119(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_120) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_120(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_120(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_121) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_121(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_121(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_122) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_122(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_122(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_123) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_123(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_123(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_124) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_124(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_124(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_125) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_125(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_125(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_126) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_126(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_126(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_127) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_127(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_127(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_128) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_128(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_128(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_129) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_129(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_129(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_130) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_130(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_130(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_131) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_131(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_131(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_132) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_132(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_132(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_133) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_133(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_133(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_134) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_134(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_134(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_135) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_135(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_135(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_136) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_136(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_136(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_137) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_137(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_137(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_138) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_138(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_138(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_139) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_139(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_139(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_140) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_140(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_140(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_141) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_141(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_141(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_142) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_142(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_142(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_143) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_143(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_143(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_144) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_144(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_144(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_145) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_145(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_145(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_146) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_146(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_146(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_147) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_147(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_147(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_148) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_148(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_148(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_149) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_149(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_149(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_150) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_150(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_150(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_151) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_151(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_151(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_152) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_152(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_152(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_153) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_153(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_153(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_154) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_154(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_154(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_155) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_155(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_155(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_156) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_156(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_156(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_157) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_157(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_157(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_158) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_158(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_158(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_159) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_159(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_159(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_160) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_160(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_160(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_161) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_161(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_161(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_162) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_162(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_162(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_163) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_163(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_163(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_164) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_164(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_164(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_165) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_165(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_165(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_166) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_166(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_166(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_167) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_167(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_167(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_168) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_168(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_168(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_169) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_169(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_169(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_170) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_170(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_170(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_171) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_171(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_171(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_172) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_172(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_172(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_173) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_173(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_173(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_174) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_174(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_174(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_175) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_175(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_175(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_176) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_176(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_176(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_177) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_177(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_177(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_178) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_178(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_178(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_179) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_179(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_179(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_180) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_180(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_180(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_181) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_181(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_181(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_182) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_182(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_182(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_183) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_183(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_183(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_184) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_184(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_184(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_185) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_185(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_185(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_186) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_186(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_186(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_187) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_187(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_187(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_188) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_188(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_188(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_189) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_189(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_189(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_190) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_190(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_190(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_191) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_191(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_191(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_192) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_192(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_192(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_193) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_193(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_193(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_194) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_194(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_194(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_195) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_195(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_195(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_196) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_196(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_196(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_197) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_197(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_197(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_198) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_198(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_198(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_199) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_199(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_199(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_200) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_200(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_200(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_201) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_201(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_201(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_202) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_202(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_202(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_203) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_203(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_203(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_204) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_204(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_204(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_205) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_205(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_205(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_206) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_206(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_206(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_207) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_207(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_207(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_208) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_208(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_208(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_209) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_209(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_209(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_210) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_210(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_210(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_211) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_211(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_211(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_212) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_212(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_212(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_213) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_213(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_213(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_214) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_214(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_214(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_215) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_215(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_215(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_216) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_216(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_216(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_217) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_217(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_217(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_218) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_218(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_218(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_219) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_219(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_219(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_220) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_220(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_220(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_221) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_221(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_221(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_222) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_222(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_222(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_223) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_223(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_223(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_224) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_224(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_224(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_225) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_225(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_225(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_226) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_226(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_226(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_227) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_227(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_227(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_228) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_228(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_228(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_229) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_229(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_229(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_230) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_230(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_230(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_231) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_231(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_231(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_232) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_232(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_232(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_233) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_233(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_233(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_234) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_234(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_234(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_235) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_235(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_235(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_236) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_236(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_236(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_237) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_237(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_237(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_238) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_238(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_238(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_239) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_239(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_239(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_240) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_240(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_240(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_241) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_241(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_241(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_242) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_242(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_242(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_243) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_243(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_243(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_244) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_244(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_244(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_245) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_245(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_245(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_246) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_246(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_246(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_247) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_247(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_247(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_248) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_248(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_248(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_249) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_249(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_249(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_250) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_250(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_250(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_251) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_251(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_251(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_252) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_252(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_252(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_253) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_253(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_253(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_254) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_254(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_254(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_255) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_255(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_255(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_256) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_256(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_256(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_257) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_257(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_257(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_258) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_258(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_258(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_259) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_259(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_259(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_260) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_260(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_260(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_261) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_261(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_261(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_262) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_262(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_262(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_263) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_263(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_263(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_264) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_264(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_264(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_265) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_265(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_265(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_266) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_266(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_266(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_267) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_267(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_267(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_268) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_268(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_268(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_269) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_269(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_269(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_270) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_270(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_270(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_271) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_271(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_271(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_272) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_272(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_272(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_273) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_273(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_273(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_274) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_274(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_274(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_275) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_275(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_275(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_276) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_276(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_276(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_277) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_277(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_277(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_278) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_278(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_278(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_279) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_279(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_279(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_280) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_280(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_280(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_281) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_281(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_281(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_282) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_282(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_282(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_283) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_283(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_283(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_284) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_284(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_284(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_285) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_285(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_285(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_286) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_286(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_286(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_287) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_287(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_287(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_288) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_288(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_288(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_289) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_289(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_289(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_290) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_290(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_290(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_291) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_291(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_291(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_292) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_292(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_292(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_293) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_293(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_293(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_294) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_294(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_294(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_295) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_295(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_295(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_296) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_296(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_296(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_297) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_297(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_297(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_298) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_298(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_298(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_299) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_299(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_299(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_300) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_300(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_300(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_301) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_301(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_301(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_302) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_302(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_302(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_303) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_303(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_303(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_304) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_304(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_304(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_305) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_305(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_305(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_306) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_306(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_306(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_307) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_307(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_307(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_308) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_308(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_308(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_309) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_309(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_309(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_310) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_310(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_310(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_311) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_311(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_311(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_312) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_312(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_312(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_313) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_313(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_313(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_314) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_314(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_314(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_315) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_315(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_315(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_316) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_316(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_316(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_317) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_317(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_317(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_318) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_318(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_318(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_319) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_319(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_319(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_320) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_320(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_320(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_321) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_321(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_321(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_322) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_322(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_322(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_323) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_323(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_323(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_324) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_324(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_324(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_325) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_325(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_325(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_326) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_326(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_326(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_327) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_327(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_327(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_328) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_328(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_328(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_329) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_329(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_329(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_330) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_330(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_330(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_331) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_331(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_331(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_332) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_332(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_332(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_333) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_333(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_333(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_334) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_334(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_334(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_335) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_335(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_335(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_336) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_336(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_336(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_337) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_337(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_337(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_338) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_338(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_338(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_339) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_339(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_339(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_340) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_340(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_340(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_341) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_341(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_341(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_342) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_342(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_342(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_343) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_343(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_343(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_344) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_344(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_344(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_345) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_345(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_345(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_346) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_346(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_346(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_347) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_347(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_347(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_348) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_348(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_348(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_349) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_349(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_349(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_350) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_350(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_350(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_351) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_351(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_351(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_352) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_352(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_352(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_353) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_353(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_353(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_354) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_354(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_354(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_355) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_355(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_355(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_356) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_356(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_356(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_357) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_357(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_357(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_358) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_358(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_358(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_359) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_359(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_359(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_360) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_360(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_360(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_361) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_361(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_361(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_362) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_362(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_362(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_363) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_363(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_363(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_364) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_364(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_364(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_365) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_365(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_365(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_366) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_366(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_366(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_367) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_367(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_367(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_368) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_368(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_368(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_369) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_369(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_369(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_370) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_370(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_370(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_371) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_371(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_371(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_372) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_372(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_372(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_373) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_373(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_373(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_374) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_374(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_374(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_375) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_375(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_375(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_376) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_376(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_376(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_377) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_377(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_377(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_378) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_378(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_378(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_379) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_379(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_379(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_380) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_380(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_380(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_381) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_381(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_381(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_382) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_382(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_382(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_383) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_383(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_383(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_384) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_384(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_384(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_385) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_385(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_385(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_386) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_386(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_386(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_387) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_387(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_387(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_388) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_388(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_388(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_389) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_389(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_389(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_390) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_390(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_390(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_391) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_391(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_391(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_392) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_392(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_392(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_393) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_393(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_393(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_394) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_394(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_394(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_395) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_395(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_395(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_396) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_396(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_396(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_397) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_397(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_397(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_398) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_398(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_398(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_399) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_399(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_399(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_400) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_400(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_400(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_401) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_401(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_401(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_402) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_402(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_402(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_403) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_403(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_403(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_404) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_404(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_404(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_405) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_405(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_405(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_406) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_406(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_406(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_407) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_407(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_407(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_408) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_408(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_408(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_409) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_409(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_409(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_410) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_410(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_410(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_411) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_411(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_411(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_412) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_412(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_412(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_413) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_413(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_413(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_414) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_414(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_414(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_415) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_415(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_415(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_416) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_416(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_416(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_417) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_417(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_417(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_418) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_418(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_418(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_419) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_419(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_419(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_420) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_420(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_420(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_421) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_421(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_421(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_422) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_422(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_422(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_423) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_423(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_423(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_424) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_424(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_424(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_425) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_425(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_425(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_426) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_426(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_426(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_427) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_427(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_427(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_428) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_428(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_428(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_429) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_429(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_429(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_430) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_430(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_430(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_431) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_431(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_431(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_432) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_432(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_432(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_433) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_433(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_433(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_434) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_434(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_434(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_435) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_435(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_435(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_436) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_436(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_436(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_437) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_437(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_437(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_438) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_438(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_438(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_439) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_439(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_439(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_440) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_440(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_440(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_441) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_441(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_441(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_442) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_442(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_442(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_443) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_443(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_443(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_444) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_444(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_444(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_445) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_445(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_445(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_446) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_446(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_446(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_447) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_447(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_447(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_448) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_448(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_448(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_449) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_449(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_449(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_450) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_450(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_450(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_451) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_451(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_451(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_452) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_452(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_452(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_453) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_453(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_453(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_454) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_454(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_454(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_455) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_455(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_455(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_456) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_456(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_456(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_457) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_457(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_457(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_458) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_458(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_458(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_459) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_459(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_459(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_460) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_460(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_460(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_461) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_461(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_461(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_462) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_462(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_462(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_463) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_463(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_463(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_464) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_464(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_464(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_465) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_465(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_465(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_466) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_466(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_466(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_467) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_467(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_467(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_468) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_468(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_468(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_469) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_469(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_469(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_470) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_470(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_470(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_471) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_471(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_471(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_472) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_472(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_472(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_473) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_473(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_473(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_474) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_474(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_474(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_475) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_475(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_475(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_476) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_476(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_476(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_477) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_477(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_477(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_478) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_478(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_478(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_479) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_479(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_479(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_480) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_480(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_480(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_481) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_481(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_481(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_482) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_482(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_482(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_483) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_483(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_483(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_484) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_484(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_484(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_485) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_485(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_485(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_486) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_486(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_486(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_487) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_487(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_487(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_488) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_488(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_488(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_489) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_489(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_489(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_490) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_490(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_490(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_491) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_491(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_491(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_492) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_492(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_492(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_493) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_493(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_493(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_494) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_494(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_494(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_495) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_495(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_495(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_496) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_496(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_496(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_497) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_497(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_497(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_498) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_498(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_498(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_499) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_499(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_499(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_500) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_500(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_500(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_501) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_501(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_501(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_502) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_502(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_502(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_503) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_503(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_503(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_504) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_504(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_504(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_505) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_505(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_505(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_506) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_506(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_506(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_507) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_507(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_507(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_508) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_508(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_508(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_509) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_509(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_509(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_510) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_510(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_510(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_511) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_511(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_511(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_512) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_512(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_512(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_513) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_513(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_513(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_514) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_514(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_514(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_515) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_515(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_515(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_516) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_516(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_516(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_517) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_517(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_517(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_518) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_518(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_518(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_519) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_519(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_519(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_520) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_520(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_520(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_521) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_521(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_521(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_522) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_522(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_522(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_523) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_523(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_523(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_524) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_524(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_524(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_525) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_525(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_525(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_526) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_526(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_526(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_527) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_527(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_527(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_528) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_528(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_528(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_529) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_529(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_529(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_530) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_530(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_530(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_531) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_531(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_531(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_532) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_532(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_532(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_533) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_533(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_533(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_534) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_534(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_534(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_535) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_535(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_535(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_536) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_536(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_536(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_537) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_537(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_537(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_538) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_538(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_538(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_539) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_539(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_539(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_540) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_540(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_540(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_541) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_541(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_541(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_542) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_542(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_542(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_543) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_543(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_543(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_544) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_544(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_544(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_545) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_545(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_545(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_546) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_546(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_546(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_547) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_547(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_547(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_548) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_548(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_548(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_549) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_549(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_549(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_550) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_550(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_550(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_551) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_551(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_551(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_552) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_552(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_552(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_553) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_553(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_553(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_554) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_554(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_554(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_555) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_555(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_555(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_556) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_556(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_556(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_557) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_557(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_557(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_558) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_558(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_558(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_559) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_559(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_559(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_560) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_560(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_560(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_561) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_561(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_561(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_562) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_562(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_562(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_563) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_563(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_563(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_564) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_564(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_564(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_565) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_565(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_565(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_566) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_566(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_566(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_567) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_567(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_567(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_568) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_568(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_568(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_569) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_569(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_569(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_570) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_570(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_570(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_571) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_571(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_571(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_572) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_572(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_572(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_573) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_573(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_573(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_574) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_574(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_574(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_575) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_575(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_575(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_576) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_576(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_576(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_577) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_577(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_577(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_578) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_578(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_578(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_579) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_579(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_579(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_580) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_580(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_580(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_581) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_581(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_581(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_582) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_582(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_582(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_583) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_583(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_583(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_584) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_584(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_584(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_585) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_585(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_585(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_586) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_586(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_586(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_587) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_587(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_587(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_588) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_588(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_588(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_589) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_589(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_589(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_590) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_590(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_590(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_591) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_591(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_591(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_592) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_592(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_592(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_593) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_593(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_593(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_594) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_594(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_594(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_595) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_595(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_595(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_596) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_596(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_596(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_597) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_597(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_597(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_598) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_598(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_598(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_599) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_599(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_599(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_600) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_600(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_600(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_601) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_601(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_601(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_602) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_602(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_602(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_603) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_603(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_603(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_604) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_604(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_604(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_605) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_605(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_605(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_606) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_606(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_606(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_607) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_607(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_607(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_608) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_608(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_608(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_609) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_609(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_609(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_610) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_610(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_610(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_611) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_611(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_611(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_612) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_612(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_612(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_613) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_613(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_613(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_614) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_614(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_614(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_615) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_615(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_615(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_616) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_616(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_616(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_617) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_617(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_617(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_618) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_618(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_618(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_619) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_619(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_619(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_620) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_620(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_620(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_621) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_621(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_621(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_622) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_622(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_622(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_623) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_623(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_623(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_624) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_624(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_624(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_625) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_625(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_625(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_626) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_626(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_626(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_627) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_627(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_627(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_628) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_628(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_628(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_629) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_629(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_629(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_630) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_630(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_630(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_631) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_631(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_631(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_632) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_632(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_632(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_633) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_633(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_633(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_634) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_634(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_634(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_635) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_635(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_635(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_636) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_636(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_636(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_637) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_637(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_637(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_638) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_638(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_638(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_639) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_639(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_639(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_640) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_640(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_640(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_641) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_641(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_641(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_642) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_642(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_642(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_643) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_643(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_643(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_644) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_644(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_644(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_645) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_645(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_645(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_646) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_646(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_646(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_647) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_647(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_647(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_648) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_648(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_648(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_649) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_649(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_649(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_650) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_650(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_650(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_651) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_651(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_651(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_652) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_652(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_652(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_653) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_653(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_653(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_654) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_654(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_654(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_655) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_655(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_655(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_656) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_656(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_656(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_657) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_657(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_657(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_658) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_658(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_658(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_659) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_659(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_659(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_660) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_660(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_660(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_661) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_661(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_661(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_662) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_662(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_662(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_663) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_663(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_663(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_664) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_664(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_664(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_665) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_665(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_665(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_666) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_666(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_666(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_667) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_667(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_667(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_668) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_668(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_668(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_669) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_669(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_669(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_670) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_670(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_670(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_671) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_671(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_671(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_672) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_672(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_672(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_673) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_673(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_673(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_674) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_674(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_674(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_675) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_675(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_675(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_676) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_676(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_676(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_677) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_677(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_677(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_678) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_678(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_678(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_679) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_679(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_679(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_680) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_680(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_680(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_681) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_681(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_681(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_682) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_682(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_682(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_683) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_683(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_683(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_684) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_684(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_684(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_685) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_685(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_685(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_686) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_686(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_686(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_687) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_687(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_687(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_688) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_688(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_688(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_689) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_689(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_689(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_690) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_690(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_690(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_691) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_691(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_691(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_692) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_692(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_692(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_693) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_693(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_693(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_694) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_694(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_694(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_695) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_695(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_695(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_696) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_696(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_696(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_697) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_697(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_697(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_698) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_698(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_698(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_699) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_699(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_699(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_700) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_700(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_700(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_701) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_701(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_701(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_702) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_702(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_702(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_703) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_703(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_703(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_704) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_704(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_704(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_705) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_705(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_705(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_706) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_706(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_706(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_707) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_707(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_707(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_708) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_708(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_708(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_709) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_709(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_709(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_710) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_710(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_710(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_711) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_711(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_711(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_712) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_712(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_712(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_713) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_713(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_713(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_714) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_714(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_714(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_715) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_715(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_715(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_716) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_716(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_716(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_717) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_717(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_717(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_718) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_718(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_718(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_719) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_719(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_719(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_720) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_720(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_720(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_721) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_721(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_721(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_722) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_722(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_722(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_723) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_723(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_723(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_724) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_724(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_724(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_725) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_725(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_725(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_726) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_726(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_726(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_727) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_727(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_727(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_728) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_728(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_728(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_729) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_729(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_729(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_730) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_730(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_730(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_731) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_731(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_731(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_732) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_732(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_732(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_733) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_733(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_733(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_734) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_734(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_734(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_735) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_735(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_735(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_736) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_736(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_736(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_737) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_737(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_737(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_738) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_738(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_738(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_739) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_739(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_739(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_740) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_740(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_740(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_741) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_741(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_741(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_742) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_742(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_742(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_743) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_743(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_743(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_744) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_744(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_744(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_745) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_745(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_745(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_746) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_746(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_746(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_747) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_747(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_747(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_748) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_748(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_748(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_749) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_749(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_749(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_750) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_750(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_750(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_751) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_751(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_751(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_752) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_752(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_752(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_753) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_753(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_753(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_754) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_754(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_754(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_755) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_755(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_755(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_756) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_756(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_756(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_757) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_757(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_757(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_758) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_758(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_758(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_759) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_759(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_759(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_760) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_760(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_760(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_761) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_761(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_761(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_762) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_762(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_762(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_763) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_763(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_763(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_764) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_764(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_764(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_765) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_765(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_765(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_766) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_766(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_766(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_767) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_767(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_767(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_768) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_768(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_768(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_769) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_769(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_769(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_770) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_770(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_770(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_771) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_771(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_771(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_772) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_772(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_772(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_773) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_773(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_773(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_774) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_774(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_774(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_775) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_775(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_775(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_776) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_776(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_776(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_777) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_777(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_777(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_778) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_778(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_778(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_779) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_779(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_779(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_780) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_780(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_780(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_781) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_781(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_781(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_782) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_782(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_782(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_783) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_783(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_783(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_784) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_784(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_784(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_785) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_785(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_785(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_786) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_786(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_786(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_787) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_787(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_787(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_788) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_788(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_788(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_789) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_789(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_789(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_790) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_790(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_790(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_791) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_791(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_791(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_792) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_792(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_792(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_793) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_793(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_793(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_794) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_794(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_794(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_795) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_795(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_795(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_796) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_796(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_796(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_797) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_797(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_797(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_798) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_798(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_798(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_799) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_799(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_799(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_800) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_800(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_800(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_801) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_801(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_801(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_802) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_802(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_802(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_803) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_803(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_803(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_804) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_804(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_804(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_805) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_805(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_805(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_806) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_806(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_806(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_807) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_807(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_807(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_808) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_808(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_808(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_809) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_809(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_809(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_810) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_810(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_810(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_811) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_811(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_811(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_812) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_812(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_812(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_813) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_813(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_813(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_814) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_814(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_814(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_815) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_815(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_815(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_816) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_816(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_816(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_817) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_817(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_817(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_818) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_818(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_818(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_819) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_819(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_819(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_820) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_820(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_820(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_821) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_821(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_821(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_822) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_822(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_822(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_823) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_823(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_823(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_824) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_824(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_824(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_825) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_825(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_825(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_826) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_826(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_826(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_827) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_827(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_827(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_828) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_828(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_828(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_829) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_829(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_829(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_830) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_830(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_830(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_831) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_831(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_831(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_832) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_832(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_832(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_833) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_833(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_833(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_834) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_834(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_834(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_835) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_835(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_835(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_836) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_836(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_836(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_837) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_837(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_837(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_838) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_838(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_838(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_839) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_839(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_839(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_840) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_840(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_840(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_841) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_841(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_841(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_842) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_842(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_842(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_843) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_843(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_843(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_844) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_844(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_844(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_845) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_845(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_845(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_846) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_846(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_846(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_847) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_847(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_847(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_848) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_848(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_848(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_849) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_849(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_849(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_850) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_850(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_850(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_851) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_851(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_851(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_852) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_852(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_852(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_853) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_853(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_853(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_854) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_854(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_854(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_855) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_855(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_855(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_856) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_856(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_856(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_857) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_857(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_857(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_858) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_858(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_858(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_859) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_859(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_859(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_860) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_860(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_860(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_861) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_861(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_861(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_862) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_862(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_862(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_863) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_863(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_863(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_864) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_864(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_864(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_865) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_865(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_865(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_866) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_866(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_866(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_867) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_867(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_867(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_868) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_868(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_868(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_869) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_869(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_869(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_870) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_870(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_870(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_871) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_871(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_871(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_872) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_872(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_872(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_873) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_873(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_873(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_874) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_874(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_874(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_875) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_875(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_875(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_876) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_876(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_876(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_877) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_877(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_877(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_878) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_878(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_878(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_879) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_879(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_879(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_880) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_880(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_880(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_881) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_881(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_881(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_882) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_882(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_882(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_883) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_883(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_883(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_884) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_884(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_884(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_885) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_885(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_885(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_886) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_886(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_886(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_887) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_887(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_887(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_888) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_888(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_888(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_889) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_889(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_889(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_890) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_890(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_890(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_891) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_891(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_891(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_892) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_892(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_892(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_893) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_893(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_893(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_894) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_894(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_894(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_895) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_895(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_895(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_896) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_896(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_896(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_897) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_897(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_897(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_898) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_898(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_898(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_899) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_899(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_899(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_900) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_900(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_900(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_901) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_901(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_901(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_902) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_902(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_902(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_903) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_903(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_903(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_904) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_904(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_904(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_905) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_905(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_905(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_906) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_906(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_906(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_907) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_907(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_907(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_908) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_908(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_908(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_909) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_909(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_909(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_910) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_910(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_910(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_911) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_911(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_911(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_912) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_912(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_912(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_913) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_913(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_913(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_914) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_914(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_914(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_915) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_915(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_915(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_916) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_916(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_916(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_917) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_917(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_917(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_918) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_918(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_918(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_919) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_919(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_919(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_920) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_920(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_920(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_921) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_921(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_921(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_922) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_922(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_922(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_923) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_923(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_923(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_924) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_924(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_924(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_925) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_925(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_925(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_926) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_926(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_926(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_927) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_927(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_927(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_928) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_928(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_928(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_929) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_929(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_929(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_930) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_930(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_930(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_931) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_931(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_931(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_932) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_932(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_932(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_933) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_933(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_933(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_934) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_934(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_934(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_935) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_935(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_935(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_936) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_936(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_936(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_937) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_937(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_937(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_938) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_938(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_938(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_939) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_939(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_939(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_940) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_940(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_940(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_941) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_941(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_941(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_942) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_942(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_942(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_943) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_943(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_943(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_944) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_944(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_944(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_945) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_945(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_945(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_946) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_946(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_946(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_947) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_947(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_947(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_948) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_948(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_948(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_949) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_949(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_949(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_950) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_950(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_950(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_951) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_951(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_951(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_952) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_952(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_952(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_953) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_953(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_953(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_954) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_954(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_954(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_955) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_955(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_955(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_956) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_956(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_956(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_957) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_957(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_957(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_958) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_958(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_958(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_959) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_959(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_959(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_960) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_960(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_960(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_961) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_961(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_961(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_962) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_962(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_962(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_963) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_963(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_963(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_964) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_964(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_964(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_965) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_965(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_965(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_966) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_966(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_966(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_967) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_967(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_967(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_968) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_968(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_968(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_969) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_969(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_969(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_970) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_970(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_970(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_971) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_971(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_971(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_972) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_972(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_972(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_973) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_973(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_973(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_974) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_974(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_974(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_975) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_975(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_975(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_976) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_976(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_976(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_977) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_977(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_977(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_978) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_978(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_978(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_979) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_979(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_979(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_980) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_980(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_980(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_981) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_981(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_981(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_982) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_982(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_982(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_983) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_983(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_983(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_984) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_984(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_984(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_985) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_985(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_985(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_986) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_986(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_986(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_987) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_987(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_987(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_988) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_988(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_988(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_989) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_989(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_989(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_990) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_990(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_990(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_991) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_991(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_991(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_992) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_992(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_992(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_993) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_993(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_993(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_994) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_994(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_994(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_995) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_995(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_995(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_996) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_996(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_996(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_997) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_997(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_997(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_998) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_998(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_998(FUNC)\n#endif\n\n#if defined(EIGEN_TEST_PART_999) || defined(EIGEN_TEST_PART_ALL)\n#define CALL_SUBTEST_999(FUNC) CALL_SUBTEST(FUNC)\n#else\n#define CALL_SUBTEST_999(FUNC)\n#endif\n\n"
  },
  {
    "path": "3rdparty/eigen3/test/spqr_support.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Desire Nuentsa Wakam <desire.nuentsa_wakam@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n\n#define EIGEN_NO_DEBUG_SMALL_PRODUCT_BLOCKS\n#include \"sparse.h\"\n#include <Eigen/SPQRSupport>\n\n\ntemplate<typename MatrixType,typename DenseMat>\nint generate_sparse_rectangular_problem(MatrixType& A, DenseMat& dA, int maxRows = 300, int maxCols = 300)\n{\n  eigen_assert(maxRows >= maxCols);\n  typedef typename MatrixType::Scalar Scalar;\n  int rows = internal::random<int>(1,maxRows);\n  int cols = internal::random<int>(1,rows);\n  double density = (std::max)(8./(rows*cols), 0.01);\n  \n  A.resize(rows,cols);\n  dA.resize(rows,cols);\n  initSparse<Scalar>(density, dA, A,ForceNonZeroDiag);\n  A.makeCompressed();\n  return rows;\n}\n\ntemplate<typename Scalar> void test_spqr_scalar()\n{\n  typedef SparseMatrix<Scalar,ColMajor> MatrixType; \n  MatrixType A;\n  Matrix<Scalar,Dynamic,Dynamic> dA;\n  typedef Matrix<Scalar,Dynamic,1> DenseVector;\n  DenseVector refX,x,b; \n  SPQR<MatrixType> solver; \n  generate_sparse_rectangular_problem(A,dA);\n  \n  Index m = A.rows();\n  b = DenseVector::Random(m);\n  solver.compute(A);\n  if (solver.info() != Success)\n  {\n    std::cerr << \"sparse QR factorization failed\\n\";\n    exit(0);\n    return;\n  }\n  x = solver.solve(b);\n  if (solver.info() != Success)\n  {\n    std::cerr << \"sparse QR factorization failed\\n\";\n    exit(0);\n    return;\n  }  \n  //Compare with a dense solver\n  refX = dA.colPivHouseholderQr().solve(b);\n  VERIFY(x.isApprox(refX,test_precision<Scalar>()));\n}\nEIGEN_DECLARE_TEST(spqr_support)\n{\n  CALL_SUBTEST_1(test_spqr_scalar<double>());\n  CALL_SUBTEST_2(test_spqr_scalar<std::complex<double> >());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/stable_norm.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009-2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\ntemplate<typename T> EIGEN_DONT_INLINE T copy(const T& x)\n{\n  return x;\n}\n\ntemplate<typename MatrixType> void stable_norm(const MatrixType& m)\n{\n  /* this test covers the following files:\n     StableNorm.h\n  */\n  using std::sqrt;\n  using std::abs;\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  \n  bool complex_real_product_ok = true;\n\n  // Check the basic machine-dependent constants.\n  {\n    int ibeta, it, iemin, iemax;\n\n    ibeta = std::numeric_limits<RealScalar>::radix;         // base for floating-point numbers\n    it    = std::numeric_limits<RealScalar>::digits;        // number of base-beta digits in mantissa\n    iemin = std::numeric_limits<RealScalar>::min_exponent;  // minimum exponent\n    iemax = std::numeric_limits<RealScalar>::max_exponent;  // maximum exponent\n\n    VERIFY( (!(iemin > 1 - 2*it || 1+it>iemax || (it==2 && ibeta<5) || (it<=4 && ibeta <= 3 ) || it<2))\n           && \"the stable norm algorithm cannot be guaranteed on this computer\");\n    \n    Scalar inf = std::numeric_limits<RealScalar>::infinity();\n    if(NumTraits<Scalar>::IsComplex && (numext::isnan)(inf*RealScalar(1)) )\n    {\n      complex_real_product_ok = false;\n      static bool first = true;\n      if(first)\n        std::cerr << \"WARNING: compiler mess up complex*real product, \" << inf << \" * \" << 1.0 << \" = \" << inf*RealScalar(1) << std::endl;\n      first = false;\n    }\n  }\n\n\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  // get a non-zero random factor\n  Scalar factor = internal::random<Scalar>();\n  while(numext::abs2(factor)<RealScalar(1e-4))\n    factor = internal::random<Scalar>();\n  Scalar big = factor * ((std::numeric_limits<RealScalar>::max)() * RealScalar(1e-4));\n  \n  factor = internal::random<Scalar>();\n  while(numext::abs2(factor)<RealScalar(1e-4))\n    factor = internal::random<Scalar>();\n  Scalar small = factor * ((std::numeric_limits<RealScalar>::min)() * RealScalar(1e4));\n\n  Scalar one(1);\n\n  MatrixType  vzero = MatrixType::Zero(rows, cols),\n              vrand = MatrixType::Random(rows, cols),\n              vbig(rows, cols),\n              vsmall(rows,cols);\n\n  vbig.fill(big);\n  vsmall.fill(small);\n\n  VERIFY_IS_MUCH_SMALLER_THAN(vzero.norm(), static_cast<RealScalar>(1));\n  VERIFY_IS_APPROX(vrand.stableNorm(),      vrand.norm());\n  VERIFY_IS_APPROX(vrand.blueNorm(),        vrand.norm());\n  VERIFY_IS_APPROX(vrand.hypotNorm(),       vrand.norm());\n\n  // test with expressions as input\n  VERIFY_IS_APPROX((one*vrand).stableNorm(),      vrand.norm());\n  VERIFY_IS_APPROX((one*vrand).blueNorm(),        vrand.norm());\n  VERIFY_IS_APPROX((one*vrand).hypotNorm(),       vrand.norm());\n  VERIFY_IS_APPROX((one*vrand+one*vrand-one*vrand).stableNorm(),      vrand.norm());\n  VERIFY_IS_APPROX((one*vrand+one*vrand-one*vrand).blueNorm(),        vrand.norm());\n  VERIFY_IS_APPROX((one*vrand+one*vrand-one*vrand).hypotNorm(),       vrand.norm());\n\n  RealScalar size = static_cast<RealScalar>(m.size());\n\n  // test numext::isfinite\n  VERIFY(!(numext::isfinite)( std::numeric_limits<RealScalar>::infinity()));\n  VERIFY(!(numext::isfinite)(sqrt(-abs(big))));\n\n  // test overflow\n  VERIFY((numext::isfinite)(sqrt(size)*abs(big)));\n  VERIFY_IS_NOT_APPROX(sqrt(copy(vbig.squaredNorm())), abs(sqrt(size)*big)); // here the default norm must fail\n  VERIFY_IS_APPROX(vbig.stableNorm(), sqrt(size)*abs(big));\n  VERIFY_IS_APPROX(vbig.blueNorm(),   sqrt(size)*abs(big));\n  VERIFY_IS_APPROX(vbig.hypotNorm(),  sqrt(size)*abs(big));\n\n  // test underflow\n  VERIFY((numext::isfinite)(sqrt(size)*abs(small)));\n  VERIFY_IS_NOT_APPROX(sqrt(copy(vsmall.squaredNorm())),   abs(sqrt(size)*small)); // here the default norm must fail\n  VERIFY_IS_APPROX(vsmall.stableNorm(), sqrt(size)*abs(small));\n  VERIFY_IS_APPROX(vsmall.blueNorm(),   sqrt(size)*abs(small));\n  VERIFY_IS_APPROX(vsmall.hypotNorm(),  sqrt(size)*abs(small));\n\n  // Test compilation of cwise() version\n  VERIFY_IS_APPROX(vrand.colwise().stableNorm(),      vrand.colwise().norm());\n  VERIFY_IS_APPROX(vrand.colwise().blueNorm(),        vrand.colwise().norm());\n  VERIFY_IS_APPROX(vrand.colwise().hypotNorm(),       vrand.colwise().norm());\n  VERIFY_IS_APPROX(vrand.rowwise().stableNorm(),      vrand.rowwise().norm());\n  VERIFY_IS_APPROX(vrand.rowwise().blueNorm(),        vrand.rowwise().norm());\n  VERIFY_IS_APPROX(vrand.rowwise().hypotNorm(),       vrand.rowwise().norm());\n  \n  // test NaN, +inf, -inf \n  MatrixType v;\n  Index i = internal::random<Index>(0,rows-1);\n  Index j = internal::random<Index>(0,cols-1);\n\n  // NaN\n  {\n    v = vrand;\n    v(i,j) = std::numeric_limits<RealScalar>::quiet_NaN();\n    VERIFY(!(numext::isfinite)(v.squaredNorm()));   VERIFY((numext::isnan)(v.squaredNorm()));\n    VERIFY(!(numext::isfinite)(v.norm()));          VERIFY((numext::isnan)(v.norm()));\n    VERIFY(!(numext::isfinite)(v.stableNorm()));    VERIFY((numext::isnan)(v.stableNorm()));\n    VERIFY(!(numext::isfinite)(v.blueNorm()));      VERIFY((numext::isnan)(v.blueNorm()));\n    VERIFY(!(numext::isfinite)(v.hypotNorm()));     VERIFY((numext::isnan)(v.hypotNorm()));\n  }\n  \n  // +inf\n  {\n    v = vrand;\n    v(i,j) = std::numeric_limits<RealScalar>::infinity();\n    VERIFY(!(numext::isfinite)(v.squaredNorm()));   VERIFY(isPlusInf(v.squaredNorm()));\n    VERIFY(!(numext::isfinite)(v.norm()));          VERIFY(isPlusInf(v.norm()));\n    VERIFY(!(numext::isfinite)(v.stableNorm()));\n    if(complex_real_product_ok){\n      VERIFY(isPlusInf(v.stableNorm()));\n    }\n    VERIFY(!(numext::isfinite)(v.blueNorm()));      VERIFY(isPlusInf(v.blueNorm()));\n    VERIFY(!(numext::isfinite)(v.hypotNorm()));     VERIFY(isPlusInf(v.hypotNorm()));\n  }\n  \n  // -inf\n  {\n    v = vrand;\n    v(i,j) = -std::numeric_limits<RealScalar>::infinity();\n    VERIFY(!(numext::isfinite)(v.squaredNorm()));   VERIFY(isPlusInf(v.squaredNorm()));\n    VERIFY(!(numext::isfinite)(v.norm()));          VERIFY(isPlusInf(v.norm()));\n    VERIFY(!(numext::isfinite)(v.stableNorm()));\n    if(complex_real_product_ok) {\n      VERIFY(isPlusInf(v.stableNorm()));\n    }\n    VERIFY(!(numext::isfinite)(v.blueNorm()));      VERIFY(isPlusInf(v.blueNorm()));\n    VERIFY(!(numext::isfinite)(v.hypotNorm()));     VERIFY(isPlusInf(v.hypotNorm()));\n  }\n  \n  // mix\n  {\n    Index i2 = internal::random<Index>(0,rows-1);\n    Index j2 = internal::random<Index>(0,cols-1);\n    v = vrand;\n    v(i,j) = -std::numeric_limits<RealScalar>::infinity();\n    v(i2,j2) = std::numeric_limits<RealScalar>::quiet_NaN();\n    VERIFY(!(numext::isfinite)(v.squaredNorm()));   VERIFY((numext::isnan)(v.squaredNorm()));\n    VERIFY(!(numext::isfinite)(v.norm()));          VERIFY((numext::isnan)(v.norm()));\n    VERIFY(!(numext::isfinite)(v.stableNorm()));    VERIFY((numext::isnan)(v.stableNorm()));\n    VERIFY(!(numext::isfinite)(v.blueNorm()));      VERIFY((numext::isnan)(v.blueNorm()));\n    VERIFY(!(numext::isfinite)(v.hypotNorm()));     VERIFY((numext::isnan)(v.hypotNorm()));\n  }\n\n  // stableNormalize[d]\n  {\n    VERIFY_IS_APPROX(vrand.stableNormalized(), vrand.normalized());\n    MatrixType vcopy(vrand);\n    vcopy.stableNormalize();\n    VERIFY_IS_APPROX(vcopy, vrand.normalized());\n    VERIFY_IS_APPROX((vrand.stableNormalized()).norm(), RealScalar(1));\n    VERIFY_IS_APPROX(vcopy.norm(), RealScalar(1));\n    VERIFY_IS_APPROX((vbig.stableNormalized()).norm(), RealScalar(1));\n    VERIFY_IS_APPROX((vsmall.stableNormalized()).norm(), RealScalar(1));\n    RealScalar big_scaling = ((std::numeric_limits<RealScalar>::max)() * RealScalar(1e-4));\n    VERIFY_IS_APPROX(vbig/big_scaling, (vbig.stableNorm() * vbig.stableNormalized()).eval()/big_scaling);\n    VERIFY_IS_APPROX(vsmall, vsmall.stableNorm() * vsmall.stableNormalized());\n  }\n}\n\ntemplate<typename Scalar>\nvoid test_hypot()\n{\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  Scalar factor = internal::random<Scalar>();\n  while(numext::abs2(factor)<RealScalar(1e-4))\n    factor = internal::random<Scalar>();\n  Scalar big = factor * ((std::numeric_limits<RealScalar>::max)() * RealScalar(1e-4));\n  \n  factor = internal::random<Scalar>();\n  while(numext::abs2(factor)<RealScalar(1e-4))\n    factor = internal::random<Scalar>();\n  Scalar small = factor * ((std::numeric_limits<RealScalar>::min)() * RealScalar(1e4));\n\n  Scalar  one   (1),\n          zero  (0),\n          sqrt2 (std::sqrt(2)),\n          nan   (std::numeric_limits<RealScalar>::quiet_NaN());\n\n  Scalar a = internal::random<Scalar>(-1,1);\n  Scalar b = internal::random<Scalar>(-1,1);\n  VERIFY_IS_APPROX(numext::hypot(a,b),std::sqrt(numext::abs2(a)+numext::abs2(b)));\n  VERIFY_IS_EQUAL(numext::hypot(zero,zero), zero);\n  VERIFY_IS_APPROX(numext::hypot(one, one), sqrt2);\n  VERIFY_IS_APPROX(numext::hypot(big,big), sqrt2*numext::abs(big));\n  VERIFY_IS_APPROX(numext::hypot(small,small), sqrt2*numext::abs(small));\n  VERIFY_IS_APPROX(numext::hypot(small,big), numext::abs(big));\n  VERIFY((numext::isnan)(numext::hypot(nan,a)));\n  VERIFY((numext::isnan)(numext::hypot(a,nan)));\n}\n\nEIGEN_DECLARE_TEST(stable_norm)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_3( test_hypot<double>() );\n    CALL_SUBTEST_4( test_hypot<float>() );\n    CALL_SUBTEST_5( test_hypot<std::complex<double> >() );\n    CALL_SUBTEST_6( test_hypot<std::complex<float> >() );\n\n    CALL_SUBTEST_1( stable_norm(Matrix<float, 1, 1>()) );\n    CALL_SUBTEST_2( stable_norm(Vector4d()) );\n    CALL_SUBTEST_3( stable_norm(VectorXd(internal::random<int>(10,2000))) );\n    CALL_SUBTEST_3( stable_norm(MatrixXd(internal::random<int>(10,200), internal::random<int>(10,200))) );\n    CALL_SUBTEST_4( stable_norm(VectorXf(internal::random<int>(10,2000))) );\n    CALL_SUBTEST_5( stable_norm(VectorXcd(internal::random<int>(10,2000))) );\n    CALL_SUBTEST_6( stable_norm(VectorXcf(internal::random<int>(10,2000))) );\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/stddeque.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2010 Hauke Heibel <hauke.heibel@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <Eigen/StdDeque>\n#include <Eigen/Geometry>\n\ntemplate<typename MatrixType>\nvoid check_stddeque_matrix(const MatrixType& m)\n{\n  Index rows = m.rows();\n  Index cols = m.cols();\n  MatrixType x = MatrixType::Random(rows,cols), y = MatrixType::Random(rows,cols);\n  std::deque<MatrixType,Eigen::aligned_allocator<MatrixType> > v(10, MatrixType::Zero(rows,cols)), w(20, y);\n  v.front() = x;\n  w.front() = w.back();\n  VERIFY_IS_APPROX(w.front(), w.back());\n  v = w;\n\n  typename std::deque<MatrixType,Eigen::aligned_allocator<MatrixType> >::iterator vi = v.begin();\n  typename std::deque<MatrixType,Eigen::aligned_allocator<MatrixType> >::iterator wi = w.begin();\n  for(int i = 0; i < 20; i++)\n  {\n    VERIFY_IS_APPROX(*vi, *wi);\n    ++vi;\n    ++wi;\n  }\n\n  v.resize(21,MatrixType::Zero(rows,cols));  \n  v.back() = x;\n  VERIFY_IS_APPROX(v.back(), x);\n  v.resize(22,y);\n  VERIFY_IS_APPROX(v.back(), y);\n  v.push_back(x);\n  VERIFY_IS_APPROX(v.back(), x);\n}\n\ntemplate<typename TransformType>\nvoid check_stddeque_transform(const TransformType&)\n{\n  typedef typename TransformType::MatrixType MatrixType;\n  TransformType x(MatrixType::Random()), y(MatrixType::Random()), ti=TransformType::Identity();\n  std::deque<TransformType,Eigen::aligned_allocator<TransformType> > v(10,ti), w(20, y);\n  v.front() = x;\n  w.front() = w.back();\n  VERIFY_IS_APPROX(w.front(), w.back());\n  v = w;\n\n  typename std::deque<TransformType,Eigen::aligned_allocator<TransformType> >::iterator vi = v.begin();\n  typename std::deque<TransformType,Eigen::aligned_allocator<TransformType> >::iterator wi = w.begin();\n  for(int i = 0; i < 20; i++)\n  {\n    VERIFY_IS_APPROX(*vi, *wi);\n    ++vi;\n    ++wi;\n  }\n\n  v.resize(21,ti);\n  v.back() = x;\n  VERIFY_IS_APPROX(v.back(), x);\n  v.resize(22,y);\n  VERIFY_IS_APPROX(v.back(), y);\n  v.push_back(x);\n  VERIFY_IS_APPROX(v.back(), x);\n}\n\ntemplate<typename QuaternionType>\nvoid check_stddeque_quaternion(const QuaternionType&)\n{\n  typedef typename QuaternionType::Coefficients Coefficients;\n  QuaternionType x(Coefficients::Random()), y(Coefficients::Random()), qi=QuaternionType::Identity();\n  std::deque<QuaternionType,Eigen::aligned_allocator<QuaternionType> > v(10,qi), w(20, y);\n  v.front() = x;\n  w.front() = w.back();\n  VERIFY_IS_APPROX(w.front(), w.back());\n  v = w;\n\n  typename std::deque<QuaternionType,Eigen::aligned_allocator<QuaternionType> >::iterator vi = v.begin();\n  typename std::deque<QuaternionType,Eigen::aligned_allocator<QuaternionType> >::iterator wi = w.begin();\n  for(int i = 0; i < 20; i++)\n  {\n    VERIFY_IS_APPROX(*vi, *wi);\n    ++vi;\n    ++wi;\n  }\n\n  v.resize(21,qi);\n  v.back() = x;\n  VERIFY_IS_APPROX(v.back(), x);\n  v.resize(22,y);\n  VERIFY_IS_APPROX(v.back(), y);\n  v.push_back(x);\n  VERIFY_IS_APPROX(v.back(), x);\n}\n\nEIGEN_DECLARE_TEST(stddeque)\n{\n  // some non vectorizable fixed sizes\n  CALL_SUBTEST_1(check_stddeque_matrix(Vector2f()));\n  CALL_SUBTEST_1(check_stddeque_matrix(Matrix3f()));\n  CALL_SUBTEST_2(check_stddeque_matrix(Matrix3d()));\n\n  // some vectorizable fixed sizes\n  CALL_SUBTEST_1(check_stddeque_matrix(Matrix2f()));\n  CALL_SUBTEST_1(check_stddeque_matrix(Vector4f()));\n  CALL_SUBTEST_1(check_stddeque_matrix(Matrix4f()));\n  CALL_SUBTEST_2(check_stddeque_matrix(Matrix4d()));\n\n  // some dynamic sizes\n  CALL_SUBTEST_3(check_stddeque_matrix(MatrixXd(1,1)));\n  CALL_SUBTEST_3(check_stddeque_matrix(VectorXd(20)));\n  CALL_SUBTEST_3(check_stddeque_matrix(RowVectorXf(20)));\n  CALL_SUBTEST_3(check_stddeque_matrix(MatrixXcf(10,10)));\n\n  // some Transform\n  CALL_SUBTEST_4(check_stddeque_transform(Affine2f()));\n  CALL_SUBTEST_4(check_stddeque_transform(Affine3f()));\n  CALL_SUBTEST_4(check_stddeque_transform(Affine3d()));\n\n  // some Quaternion\n  CALL_SUBTEST_5(check_stddeque_quaternion(Quaternionf()));\n  CALL_SUBTEST_5(check_stddeque_quaternion(Quaterniond()));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/stddeque_overload.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2010 Hauke Heibel <hauke.heibel@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/StdDeque>\n#include <Eigen/Geometry>\n\nEIGEN_DEFINE_STL_DEQUE_SPECIALIZATION(Vector4f)\n\nEIGEN_DEFINE_STL_DEQUE_SPECIALIZATION(Matrix2f)\nEIGEN_DEFINE_STL_DEQUE_SPECIALIZATION(Matrix4f)\nEIGEN_DEFINE_STL_DEQUE_SPECIALIZATION(Matrix4d)\n\nEIGEN_DEFINE_STL_DEQUE_SPECIALIZATION(Affine3f)\nEIGEN_DEFINE_STL_DEQUE_SPECIALIZATION(Affine3d)\n\nEIGEN_DEFINE_STL_DEQUE_SPECIALIZATION(Quaternionf)\nEIGEN_DEFINE_STL_DEQUE_SPECIALIZATION(Quaterniond)\n\ntemplate<typename MatrixType>\nvoid check_stddeque_matrix(const MatrixType& m)\n{\n  Index rows = m.rows();\n  Index cols = m.cols();\n  MatrixType x = MatrixType::Random(rows,cols), y = MatrixType::Random(rows,cols);\n  std::deque<MatrixType> v(10, MatrixType::Zero(rows,cols)), w(20, y);\n  v[5] = x;\n  w[6] = v[5];\n  VERIFY_IS_APPROX(w[6], v[5]);\n  v = w;\n  for(int i = 0; i < 20; i++)\n  {\n    VERIFY_IS_APPROX(w[i], v[i]);\n  }\n\n  v.resize(21);\n  v[20] = x;\n  VERIFY_IS_APPROX(v[20], x);\n  v.resize(22,y);\n  VERIFY_IS_APPROX(v[21], y);\n  v.push_back(x);\n  VERIFY_IS_APPROX(v[22], x);\n\n  // do a lot of push_back such that the deque gets internally resized\n  // (with memory reallocation)\n  MatrixType* ref = &w[0];\n  for(int i=0; i<30 || ((ref==&w[0]) && i<300); ++i)\n    v.push_back(w[i%w.size()]);\n  for(unsigned int i=23; i<v.size(); ++i)\n  {\n    VERIFY(v[i]==w[(i-23)%w.size()]);\n  }\n}\n\ntemplate<typename TransformType>\nvoid check_stddeque_transform(const TransformType&)\n{\n  typedef typename TransformType::MatrixType MatrixType;\n  TransformType x(MatrixType::Random()), y(MatrixType::Random()), ti=TransformType::Identity();\n  std::deque<TransformType> v(10,ti), w(20, y);\n  v[5] = x;\n  w[6] = v[5];\n  VERIFY_IS_APPROX(w[6], v[5]);\n  v = w;\n  for(int i = 0; i < 20; i++)\n  {\n    VERIFY_IS_APPROX(w[i], v[i]);\n  }\n\n  v.resize(21,ti);\n  v[20] = x;\n  VERIFY_IS_APPROX(v[20], x);\n  v.resize(22,y);\n  VERIFY_IS_APPROX(v[21], y);\n  v.push_back(x);\n  VERIFY_IS_APPROX(v[22], x);\n\n  // do a lot of push_back such that the deque gets internally resized\n  // (with memory reallocation)\n  TransformType* ref = &w[0];\n  for(int i=0; i<30 || ((ref==&w[0]) && i<300); ++i)\n    v.push_back(w[i%w.size()]);\n  for(unsigned int i=23; i<v.size(); ++i)\n  {\n    VERIFY(v[i].matrix()==w[(i-23)%w.size()].matrix());\n  }\n}\n\ntemplate<typename QuaternionType>\nvoid check_stddeque_quaternion(const QuaternionType&)\n{\n  typedef typename QuaternionType::Coefficients Coefficients;\n  QuaternionType x(Coefficients::Random()), y(Coefficients::Random()), qi=QuaternionType::Identity();\n  std::deque<QuaternionType> v(10,qi), w(20, y);\n  v[5] = x;\n  w[6] = v[5];\n  VERIFY_IS_APPROX(w[6], v[5]);\n  v = w;\n  for(int i = 0; i < 20; i++)\n  {\n    VERIFY_IS_APPROX(w[i], v[i]);\n  }\n\n  v.resize(21,qi);\n  v[20] = x;\n  VERIFY_IS_APPROX(v[20], x);\n  v.resize(22,y);\n  VERIFY_IS_APPROX(v[21], y);\n  v.push_back(x);\n  VERIFY_IS_APPROX(v[22], x);\n\n  // do a lot of push_back such that the deque gets internally resized\n  // (with memory reallocation)\n  QuaternionType* ref = &w[0];\n  for(int i=0; i<30 || ((ref==&w[0]) && i<300); ++i)\n    v.push_back(w[i%w.size()]);\n  for(unsigned int i=23; i<v.size(); ++i)\n  {\n    VERIFY(v[i].coeffs()==w[(i-23)%w.size()].coeffs());\n  }\n}\n\nEIGEN_DECLARE_TEST(stddeque_overload)\n{\n  // some non vectorizable fixed sizes\n  CALL_SUBTEST_1(check_stddeque_matrix(Vector2f()));\n  CALL_SUBTEST_1(check_stddeque_matrix(Matrix3f()));\n  CALL_SUBTEST_2(check_stddeque_matrix(Matrix3d()));\n\n  // some vectorizable fixed sizes\n  CALL_SUBTEST_1(check_stddeque_matrix(Matrix2f()));\n  CALL_SUBTEST_1(check_stddeque_matrix(Vector4f()));\n  CALL_SUBTEST_1(check_stddeque_matrix(Matrix4f()));\n  CALL_SUBTEST_2(check_stddeque_matrix(Matrix4d()));\n\n  // some dynamic sizes\n  CALL_SUBTEST_3(check_stddeque_matrix(MatrixXd(1,1)));\n  CALL_SUBTEST_3(check_stddeque_matrix(VectorXd(20)));\n  CALL_SUBTEST_3(check_stddeque_matrix(RowVectorXf(20)));\n  CALL_SUBTEST_3(check_stddeque_matrix(MatrixXcf(10,10)));\n\n  // some Transform\n  CALL_SUBTEST_4(check_stddeque_transform(Affine2f())); // does not need the specialization (2+1)^2 = 9\n  CALL_SUBTEST_4(check_stddeque_transform(Affine3f()));\n  CALL_SUBTEST_4(check_stddeque_transform(Affine3d()));\n\n  // some Quaternion\n  CALL_SUBTEST_5(check_stddeque_quaternion(Quaternionf()));\n  CALL_SUBTEST_5(check_stddeque_quaternion(Quaterniond()));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/stdlist.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2010 Hauke Heibel <hauke.heibel@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <Eigen/StdList>\n#include <Eigen/Geometry>\n\ntemplate<typename MatrixType>\nvoid check_stdlist_matrix(const MatrixType& m)\n{\n  Index rows = m.rows();\n  Index cols = m.cols();\n  MatrixType x = MatrixType::Random(rows,cols), y = MatrixType::Random(rows,cols);\n  std::list<MatrixType,Eigen::aligned_allocator<MatrixType> > v(10, MatrixType::Zero(rows,cols)), w(20, y);\n  v.front() = x;\n  w.front() = w.back();\n  VERIFY_IS_APPROX(w.front(), w.back());\n  v = w;\n\n  typename std::list<MatrixType,Eigen::aligned_allocator<MatrixType> >::iterator vi = v.begin();\n  typename std::list<MatrixType,Eigen::aligned_allocator<MatrixType> >::iterator wi = w.begin();\n  for(int i = 0; i < 20; i++)\n  {\n    VERIFY_IS_APPROX(*vi, *wi);\n    ++vi;\n    ++wi;\n  }\n\n  v.resize(21, MatrixType::Zero(rows,cols));  \n  v.back() = x;\n  VERIFY_IS_APPROX(v.back(), x);\n  v.resize(22,y);\n  VERIFY_IS_APPROX(v.back(), y);\n  v.push_back(x);\n  VERIFY_IS_APPROX(v.back(), x);\n}\n\ntemplate<typename TransformType>\nvoid check_stdlist_transform(const TransformType&)\n{\n  typedef typename TransformType::MatrixType MatrixType;\n  TransformType x(MatrixType::Random()), y(MatrixType::Random()), ti=TransformType::Identity();\n  std::list<TransformType,Eigen::aligned_allocator<TransformType> > v(10,ti), w(20, y);\n  v.front() = x;\n  w.front() = w.back();\n  VERIFY_IS_APPROX(w.front(), w.back());\n  v = w;\n\n  typename std::list<TransformType,Eigen::aligned_allocator<TransformType> >::iterator vi = v.begin();\n  typename std::list<TransformType,Eigen::aligned_allocator<TransformType> >::iterator wi = w.begin();\n  for(int i = 0; i < 20; i++)\n  {\n    VERIFY_IS_APPROX(*vi, *wi);\n    ++vi;\n    ++wi;\n  }\n\n  v.resize(21, ti);\n  v.back() = x;\n  VERIFY_IS_APPROX(v.back(), x);\n  v.resize(22,y);\n  VERIFY_IS_APPROX(v.back(), y);\n  v.push_back(x);\n  VERIFY_IS_APPROX(v.back(), x);\n}\n\ntemplate<typename QuaternionType>\nvoid check_stdlist_quaternion(const QuaternionType&)\n{\n  typedef typename QuaternionType::Coefficients Coefficients;\n  QuaternionType x(Coefficients::Random()), y(Coefficients::Random()), qi=QuaternionType::Identity();\n  std::list<QuaternionType,Eigen::aligned_allocator<QuaternionType> > v(10,qi), w(20, y);\n  v.front() = x;\n  w.front() = w.back();\n  VERIFY_IS_APPROX(w.front(), w.back());\n  v = w;\n\n  typename std::list<QuaternionType,Eigen::aligned_allocator<QuaternionType> >::iterator vi = v.begin();\n  typename std::list<QuaternionType,Eigen::aligned_allocator<QuaternionType> >::iterator wi = w.begin();\n  for(int i = 0; i < 20; i++)\n  {\n    VERIFY_IS_APPROX(*vi, *wi);\n    ++vi;\n    ++wi;\n  }\n\n  v.resize(21,qi);\n  v.back() = x;\n  VERIFY_IS_APPROX(v.back(), x);\n  v.resize(22,y);\n  VERIFY_IS_APPROX(v.back(), y);\n  v.push_back(x);\n  VERIFY_IS_APPROX(v.back(), x);\n}\n\nEIGEN_DECLARE_TEST(stdlist)\n{\n  // some non vectorizable fixed sizes\n  CALL_SUBTEST_1(check_stdlist_matrix(Vector2f()));\n  CALL_SUBTEST_1(check_stdlist_matrix(Matrix3f()));\n  CALL_SUBTEST_2(check_stdlist_matrix(Matrix3d()));\n\n  // some vectorizable fixed sizes\n  CALL_SUBTEST_1(check_stdlist_matrix(Matrix2f()));\n  CALL_SUBTEST_1(check_stdlist_matrix(Vector4f()));\n  CALL_SUBTEST_1(check_stdlist_matrix(Matrix4f()));\n  CALL_SUBTEST_2(check_stdlist_matrix(Matrix4d()));\n\n  // some dynamic sizes\n  CALL_SUBTEST_3(check_stdlist_matrix(MatrixXd(1,1)));\n  CALL_SUBTEST_3(check_stdlist_matrix(VectorXd(20)));\n  CALL_SUBTEST_3(check_stdlist_matrix(RowVectorXf(20)));\n  CALL_SUBTEST_3(check_stdlist_matrix(MatrixXcf(10,10)));\n\n  // some Transform\n  CALL_SUBTEST_4(check_stdlist_transform(Affine2f()));\n  CALL_SUBTEST_4(check_stdlist_transform(Affine3f()));\n  CALL_SUBTEST_4(check_stdlist_transform(Affine3d()));\n\n  // some Quaternion\n  CALL_SUBTEST_5(check_stdlist_quaternion(Quaternionf()));\n  CALL_SUBTEST_5(check_stdlist_quaternion(Quaterniond()));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/stdlist_overload.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2010 Hauke Heibel <hauke.heibel@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/StdList>\n#include <Eigen/Geometry>\n\nEIGEN_DEFINE_STL_LIST_SPECIALIZATION(Vector4f)\n\nEIGEN_DEFINE_STL_LIST_SPECIALIZATION(Matrix2f)\nEIGEN_DEFINE_STL_LIST_SPECIALIZATION(Matrix4f)\nEIGEN_DEFINE_STL_LIST_SPECIALIZATION(Matrix4d)\n\nEIGEN_DEFINE_STL_LIST_SPECIALIZATION(Affine3f)\nEIGEN_DEFINE_STL_LIST_SPECIALIZATION(Affine3d)\n\nEIGEN_DEFINE_STL_LIST_SPECIALIZATION(Quaternionf)\nEIGEN_DEFINE_STL_LIST_SPECIALIZATION(Quaterniond)\n\ntemplate <class Container, class Position>\ntypename Container::iterator get(Container & c, Position position)\n{\n  typename Container::iterator it = c.begin();\n  std::advance(it, position);\n  return it;\n}\n\ntemplate <class Container, class Position, class Value>\nvoid set(Container & c, Position position, const Value & value)\n{\n  typename Container::iterator it = c.begin();\n  std::advance(it, position);\n  *it = value;\n}\n\ntemplate<typename MatrixType>\nvoid check_stdlist_matrix(const MatrixType& m)\n{\n  Index rows = m.rows();\n  Index cols = m.cols();\n  MatrixType x = MatrixType::Random(rows,cols), y = MatrixType::Random(rows,cols);\n  std::list<MatrixType> v(10, MatrixType::Zero(rows,cols)), w(20, y);\n  typename std::list<MatrixType>::iterator itv = get(v, 5);\n  typename std::list<MatrixType>::iterator itw = get(w, 6);\n  *itv = x;\n  *itw = *itv;\n  VERIFY_IS_APPROX(*itw, *itv);\n  v = w;\n  itv = v.begin();\n  itw = w.begin();\n  for(int i = 0; i < 20; i++)\n  {\n    VERIFY_IS_APPROX(*itw, *itv);\n    ++itv;\n    ++itw;\n  }\n\n  v.resize(21);\n  set(v, 20, x);\n  VERIFY_IS_APPROX(*get(v, 20), x);\n  v.resize(22,y);\n  VERIFY_IS_APPROX(*get(v, 21), y);\n  v.push_back(x);\n  VERIFY_IS_APPROX(*get(v, 22), x);\n\n  // do a lot of push_back such that the list gets internally resized\n  // (with memory reallocation)\n  MatrixType* ref = &(*get(w, 0));\n  for(int i=0; i<30 || ((ref==&(*get(w, 0))) && i<300); ++i)\n    v.push_back(*get(w, i%w.size()));\n  for(unsigned int i=23; i<v.size(); ++i)\n  {\n    VERIFY((*get(v, i))==(*get(w, (i-23)%w.size())));\n  }\n}\n\ntemplate<typename TransformType>\nvoid check_stdlist_transform(const TransformType&)\n{\n  typedef typename TransformType::MatrixType MatrixType;\n  TransformType x(MatrixType::Random()), y(MatrixType::Random()), ti=TransformType::Identity();\n  std::list<TransformType> v(10,ti), w(20, y);\n  typename std::list<TransformType>::iterator itv = get(v, 5);\n  typename std::list<TransformType>::iterator itw = get(w, 6);\n  *itv = x;\n  *itw = *itv;\n  VERIFY_IS_APPROX(*itw, *itv);\n  v = w;\n  itv = v.begin();\n  itw = w.begin();\n  for(int i = 0; i < 20; i++)\n  {\n    VERIFY_IS_APPROX(*itw, *itv);\n    ++itv;\n    ++itw;\n  }\n\n  v.resize(21, ti);\n  set(v, 20, x);\n  VERIFY_IS_APPROX(*get(v, 20), x);\n  v.resize(22,y);\n  VERIFY_IS_APPROX(*get(v, 21), y);\n  v.push_back(x);\n  VERIFY_IS_APPROX(*get(v, 22), x);\n\n  // do a lot of push_back such that the list gets internally resized\n  // (with memory reallocation)\n  TransformType* ref = &(*get(w, 0));\n  for(int i=0; i<30 || ((ref==&(*get(w, 0))) && i<300); ++i)\n    v.push_back(*get(w, i%w.size()));\n  for(unsigned int i=23; i<v.size(); ++i)\n  {\n    VERIFY(get(v, i)->matrix()==get(w, (i-23)%w.size())->matrix());\n  }\n}\n\ntemplate<typename QuaternionType>\nvoid check_stdlist_quaternion(const QuaternionType&)\n{\n  typedef typename QuaternionType::Coefficients Coefficients;\n  QuaternionType x(Coefficients::Random()), y(Coefficients::Random()), qi=QuaternionType::Identity();\n  std::list<QuaternionType> v(10,qi), w(20, y);\n  typename std::list<QuaternionType>::iterator itv = get(v, 5);\n  typename std::list<QuaternionType>::iterator itw = get(w, 6);\n  *itv = x;\n  *itw = *itv;\n  VERIFY_IS_APPROX(*itw, *itv);\n  v = w;\n  itv = v.begin();\n  itw = w.begin();\n  for(int i = 0; i < 20; i++)\n  {\n    VERIFY_IS_APPROX(*itw, *itv);\n    ++itv;\n    ++itw;\n  }\n\n  v.resize(21,qi);\n  set(v, 20, x);\n  VERIFY_IS_APPROX(*get(v, 20), x);\n  v.resize(22,y);\n  VERIFY_IS_APPROX(*get(v, 21), y);\n  v.push_back(x);\n  VERIFY_IS_APPROX(*get(v, 22), x);\n\n  // do a lot of push_back such that the list gets internally resized\n  // (with memory reallocation)\n  QuaternionType* ref = &(*get(w, 0));\n  for(int i=0; i<30 || ((ref==&(*get(w, 0))) && i<300); ++i)\n    v.push_back(*get(w, i%w.size()));\n  for(unsigned int i=23; i<v.size(); ++i)\n  {\n    VERIFY(get(v, i)->coeffs()==get(w, (i-23)%w.size())->coeffs());\n  }\n}\n\nEIGEN_DECLARE_TEST(stdlist_overload)\n{\n  // some non vectorizable fixed sizes\n  CALL_SUBTEST_1(check_stdlist_matrix(Vector2f()));\n  CALL_SUBTEST_1(check_stdlist_matrix(Matrix3f()));\n  CALL_SUBTEST_2(check_stdlist_matrix(Matrix3d()));\n\n  // some vectorizable fixed sizes\n  CALL_SUBTEST_1(check_stdlist_matrix(Matrix2f()));\n  CALL_SUBTEST_1(check_stdlist_matrix(Vector4f()));\n  CALL_SUBTEST_1(check_stdlist_matrix(Matrix4f()));\n  CALL_SUBTEST_2(check_stdlist_matrix(Matrix4d()));\n\n  // some dynamic sizes\n  CALL_SUBTEST_3(check_stdlist_matrix(MatrixXd(1,1)));\n  CALL_SUBTEST_3(check_stdlist_matrix(VectorXd(20)));\n  CALL_SUBTEST_3(check_stdlist_matrix(RowVectorXf(20)));\n  CALL_SUBTEST_3(check_stdlist_matrix(MatrixXcf(10,10)));\n\n  // some Transform\n  CALL_SUBTEST_4(check_stdlist_transform(Affine2f())); // does not need the specialization (2+1)^2 = 9\n  CALL_SUBTEST_4(check_stdlist_transform(Affine3f()));\n  CALL_SUBTEST_4(check_stdlist_transform(Affine3d()));\n\n  // some Quaternion\n  CALL_SUBTEST_5(check_stdlist_quaternion(Quaternionf()));\n  CALL_SUBTEST_5(check_stdlist_quaternion(Quaterniond()));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/stdvector.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <Eigen/StdVector>\n#include <Eigen/Geometry>\n\ntemplate<typename MatrixType>\nvoid check_stdvector_matrix(const MatrixType& m)\n{\n  Index rows = m.rows();\n  Index cols = m.cols();\n  MatrixType x = MatrixType::Random(rows,cols), y = MatrixType::Random(rows,cols);\n  std::vector<MatrixType,Eigen::aligned_allocator<MatrixType> > v(10, MatrixType::Zero(rows,cols)), w(20, y);\n  v[5] = x;\n  w[6] = v[5];\n  VERIFY_IS_APPROX(w[6], v[5]);\n  v = w;\n  for(int i = 0; i < 20; i++)\n  {\n    VERIFY_IS_APPROX(w[i], v[i]);\n  }\n\n  v.resize(21);\n  v[20] = x;\n  VERIFY_IS_APPROX(v[20], x);\n  v.resize(22,y);\n  VERIFY_IS_APPROX(v[21], y);\n  v.push_back(x);\n  VERIFY_IS_APPROX(v[22], x);\n  VERIFY((internal::UIntPtr)&(v[22]) == (internal::UIntPtr)&(v[21]) + sizeof(MatrixType));\n\n  // do a lot of push_back such that the vector gets internally resized\n  // (with memory reallocation)\n  MatrixType* ref = &w[0];\n  for(int i=0; i<30 || ((ref==&w[0]) && i<300); ++i)\n    v.push_back(w[i%w.size()]);\n  for(unsigned int i=23; i<v.size(); ++i)\n  {\n    VERIFY(v[i]==w[(i-23)%w.size()]);\n  }\n}\n\ntemplate<typename TransformType>\nvoid check_stdvector_transform(const TransformType&)\n{\n  typedef typename TransformType::MatrixType MatrixType;\n  TransformType x(MatrixType::Random()), y(MatrixType::Random());\n  std::vector<TransformType,Eigen::aligned_allocator<TransformType> > v(10), w(20, y);\n  v[5] = x;\n  w[6] = v[5];\n  VERIFY_IS_APPROX(w[6], v[5]);\n  v = w;\n  for(int i = 0; i < 20; i++)\n  {\n    VERIFY_IS_APPROX(w[i], v[i]);\n  }\n\n  v.resize(21);\n  v[20] = x;\n  VERIFY_IS_APPROX(v[20], x);\n  v.resize(22,y);\n  VERIFY_IS_APPROX(v[21], y);\n  v.push_back(x);\n  VERIFY_IS_APPROX(v[22], x);\n  VERIFY((internal::UIntPtr)&(v[22]) == (internal::UIntPtr)&(v[21]) + sizeof(TransformType));\n\n  // do a lot of push_back such that the vector gets internally resized\n  // (with memory reallocation)\n  TransformType* ref = &w[0];\n  for(int i=0; i<30 || ((ref==&w[0]) && i<300); ++i)\n    v.push_back(w[i%w.size()]);\n  for(unsigned int i=23; i<v.size(); ++i)\n  {\n    VERIFY(v[i].matrix()==w[(i-23)%w.size()].matrix());\n  }\n}\n\ntemplate<typename QuaternionType>\nvoid check_stdvector_quaternion(const QuaternionType&)\n{\n  typedef typename QuaternionType::Coefficients Coefficients;\n  QuaternionType x(Coefficients::Random()), y(Coefficients::Random()), qi=QuaternionType::Identity();\n  std::vector<QuaternionType,Eigen::aligned_allocator<QuaternionType> > v(10,qi), w(20, y);\n  v[5] = x;\n  w[6] = v[5];\n  VERIFY_IS_APPROX(w[6], v[5]);\n  v = w;\n  for(int i = 0; i < 20; i++)\n  {\n    VERIFY_IS_APPROX(w[i], v[i]);\n  }\n\n  v.resize(21);\n  v[20] = x;\n  VERIFY_IS_APPROX(v[20], x);\n  v.resize(22,y);\n  VERIFY_IS_APPROX(v[21], y);\n  v.push_back(x);\n  VERIFY_IS_APPROX(v[22], x);\n  VERIFY((internal::UIntPtr)&(v[22]) == (internal::UIntPtr)&(v[21]) + sizeof(QuaternionType));\n\n  // do a lot of push_back such that the vector gets internally resized\n  // (with memory reallocation)\n  QuaternionType* ref = &w[0];\n  for(int i=0; i<30 || ((ref==&w[0]) && i<300); ++i)\n    v.push_back(w[i%w.size()]);\n  for(unsigned int i=23; i<v.size(); ++i)\n  {\n    VERIFY(v[i].coeffs()==w[(i-23)%w.size()].coeffs());\n  }\n}\n\n// the code below triggered an invalid warning with gcc >= 7\n// eigen/Eigen/src/Core/util/Memory.h:189:12: warning: argument 1 value '18446744073709551612' exceeds maximum object size 9223372036854775807\n// This has been reported to gcc there: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87544\nvoid std_vector_gcc_warning()\n{\n  typedef Eigen::Vector3f T;\n  std::vector<T, Eigen::aligned_allocator<T> > v;\n  v.push_back(T());\n}\n\nEIGEN_DECLARE_TEST(stdvector)\n{\n  // some non vectorizable fixed sizes\n  CALL_SUBTEST_1(check_stdvector_matrix(Vector2f()));\n  CALL_SUBTEST_1(check_stdvector_matrix(Matrix3f()));\n  CALL_SUBTEST_2(check_stdvector_matrix(Matrix3d()));\n\n  // some vectorizable fixed sizes\n  CALL_SUBTEST_1(check_stdvector_matrix(Matrix2f()));\n  CALL_SUBTEST_1(check_stdvector_matrix(Vector4f()));\n  CALL_SUBTEST_1(check_stdvector_matrix(Matrix4f()));\n  CALL_SUBTEST_2(check_stdvector_matrix(Matrix4d()));\n\n  // some dynamic sizes\n  CALL_SUBTEST_3(check_stdvector_matrix(MatrixXd(1,1)));\n  CALL_SUBTEST_3(check_stdvector_matrix(VectorXd(20)));\n  CALL_SUBTEST_3(check_stdvector_matrix(RowVectorXf(20)));\n  CALL_SUBTEST_3(check_stdvector_matrix(MatrixXcf(10,10)));\n\n  // some Transform\n  CALL_SUBTEST_4(check_stdvector_transform(Projective2f()));\n  CALL_SUBTEST_4(check_stdvector_transform(Projective3f()));\n  CALL_SUBTEST_4(check_stdvector_transform(Projective3d()));\n  //CALL_SUBTEST(heck_stdvector_transform(Projective4d()));\n\n  // some Quaternion\n  CALL_SUBTEST_5(check_stdvector_quaternion(Quaternionf()));\n  CALL_SUBTEST_5(check_stdvector_quaternion(Quaterniond()));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/stdvector_overload.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2010 Hauke Heibel <hauke.heibel@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/StdVector>\n#include <Eigen/Geometry>\n\nEIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(Vector4f)\n\nEIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(Matrix2f)\nEIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(Matrix4f)\nEIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(Matrix4d)\n\nEIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(Affine3f)\nEIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(Affine3d)\n\nEIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(Quaternionf)\nEIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(Quaterniond)\n\ntemplate<typename MatrixType>\nvoid check_stdvector_matrix(const MatrixType& m)\n{\n  Index rows = m.rows();\n  Index cols = m.cols();\n  MatrixType x = MatrixType::Random(rows,cols), y = MatrixType::Random(rows,cols);\n  std::vector<MatrixType> v(10, MatrixType::Zero(rows,cols)), w(20, y);\n  v[5] = x;\n  w[6] = v[5];\n  VERIFY_IS_APPROX(w[6], v[5]);\n  v = w;\n  for(int i = 0; i < 20; i++)\n  {\n    VERIFY_IS_APPROX(w[i], v[i]);\n  }\n\n  v.resize(21);\n  v[20] = x;\n  VERIFY_IS_APPROX(v[20], x);\n  v.resize(22,y);\n  VERIFY_IS_APPROX(v[21], y);\n  v.push_back(x);\n  VERIFY_IS_APPROX(v[22], x);\n  VERIFY((internal::UIntPtr)&(v[22]) == (internal::UIntPtr)&(v[21]) + sizeof(MatrixType));\n\n  // do a lot of push_back such that the vector gets internally resized\n  // (with memory reallocation)\n  MatrixType* ref = &w[0];\n  for(int i=0; i<30 || ((ref==&w[0]) && i<300); ++i)\n    v.push_back(w[i%w.size()]);\n  for(unsigned int i=23; i<v.size(); ++i)\n  {\n    VERIFY(v[i]==w[(i-23)%w.size()]);\n  }\n}\n\ntemplate<typename TransformType>\nvoid check_stdvector_transform(const TransformType&)\n{\n  typedef typename TransformType::MatrixType MatrixType;\n  TransformType x(MatrixType::Random()), y(MatrixType::Random());\n  std::vector<TransformType> v(10), w(20, y);\n  v[5] = x;\n  w[6] = v[5];\n  VERIFY_IS_APPROX(w[6], v[5]);\n  v = w;\n  for(int i = 0; i < 20; i++)\n  {\n    VERIFY_IS_APPROX(w[i], v[i]);\n  }\n\n  v.resize(21);\n  v[20] = x;\n  VERIFY_IS_APPROX(v[20], x);\n  v.resize(22,y);\n  VERIFY_IS_APPROX(v[21], y);\n  v.push_back(x);\n  VERIFY_IS_APPROX(v[22], x);\n  VERIFY((internal::UIntPtr)&(v[22]) == (internal::UIntPtr)&(v[21]) + sizeof(TransformType));\n\n  // do a lot of push_back such that the vector gets internally resized\n  // (with memory reallocation)\n  TransformType* ref = &w[0];\n  for(int i=0; i<30 || ((ref==&w[0]) && i<300); ++i)\n    v.push_back(w[i%w.size()]);\n  for(unsigned int i=23; i<v.size(); ++i)\n  {\n    VERIFY(v[i].matrix()==w[(i-23)%w.size()].matrix());\n  }\n}\n\ntemplate<typename QuaternionType>\nvoid check_stdvector_quaternion(const QuaternionType&)\n{\n  typedef typename QuaternionType::Coefficients Coefficients;\n  QuaternionType x(Coefficients::Random()), y(Coefficients::Random()), qi=QuaternionType::Identity();\n  std::vector<QuaternionType> v(10,qi), w(20, y);\n  v[5] = x;\n  w[6] = v[5];\n  VERIFY_IS_APPROX(w[6], v[5]);\n  v = w;\n  for(int i = 0; i < 20; i++)\n  {\n    VERIFY_IS_APPROX(w[i], v[i]);\n  }\n\n  v.resize(21);\n  v[20] = x;\n  VERIFY_IS_APPROX(v[20], x);\n  v.resize(22,y);\n  VERIFY_IS_APPROX(v[21], y);\n  v.push_back(x);\n  VERIFY_IS_APPROX(v[22], x);\n  VERIFY((internal::UIntPtr)&(v[22]) == (internal::UIntPtr)&(v[21]) + sizeof(QuaternionType));\n\n  // do a lot of push_back such that the vector gets internally resized\n  // (with memory reallocation)\n  QuaternionType* ref = &w[0];\n  for(int i=0; i<30 || ((ref==&w[0]) && i<300); ++i)\n    v.push_back(w[i%w.size()]);\n  for(unsigned int i=23; i<v.size(); ++i)\n  {\n    VERIFY(v[i].coeffs()==w[(i-23)%w.size()].coeffs());\n  }\n}\n\nEIGEN_DECLARE_TEST(stdvector_overload)\n{\n  // some non vectorizable fixed sizes\n  CALL_SUBTEST_1(check_stdvector_matrix(Vector2f()));\n  CALL_SUBTEST_1(check_stdvector_matrix(Matrix3f()));\n  CALL_SUBTEST_2(check_stdvector_matrix(Matrix3d()));\n\n  // some vectorizable fixed sizes\n  CALL_SUBTEST_1(check_stdvector_matrix(Matrix2f()));\n  CALL_SUBTEST_1(check_stdvector_matrix(Vector4f()));\n  CALL_SUBTEST_1(check_stdvector_matrix(Matrix4f()));\n  CALL_SUBTEST_2(check_stdvector_matrix(Matrix4d()));\n\n  // some dynamic sizes\n  CALL_SUBTEST_3(check_stdvector_matrix(MatrixXd(1,1)));\n  CALL_SUBTEST_3(check_stdvector_matrix(VectorXd(20)));\n  CALL_SUBTEST_3(check_stdvector_matrix(RowVectorXf(20)));\n  CALL_SUBTEST_3(check_stdvector_matrix(MatrixXcf(10,10)));\n\n  // some Transform\n  CALL_SUBTEST_4(check_stdvector_transform(Affine2f())); // does not need the specialization (2+1)^2 = 9\n  CALL_SUBTEST_4(check_stdvector_transform(Affine3f()));\n  CALL_SUBTEST_4(check_stdvector_transform(Affine3d()));\n\n  // some Quaternion\n  CALL_SUBTEST_5(check_stdvector_quaternion(Quaternionf()));\n  CALL_SUBTEST_5(check_stdvector_quaternion(Quaterniond()));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/stl_iterators.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2018-2019 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include <iterator>\n#include <numeric>\n#include \"main.h\"\n\ntemplate< class Iterator >\nstd::reverse_iterator<Iterator>\nmake_reverse_iterator( Iterator i )\n{\n  return std::reverse_iterator<Iterator>(i);\n}\n\n#if !EIGEN_HAS_CXX11\ntemplate<class ForwardIt>\nForwardIt is_sorted_until(ForwardIt firstIt, ForwardIt lastIt)\n{\n    if (firstIt != lastIt) {\n        ForwardIt next = firstIt;\n        while (++next != lastIt) {\n            if (*next < *firstIt)\n                return next;\n            firstIt = next;\n        }\n    }\n    return lastIt;\n}\ntemplate<class ForwardIt>\nbool is_sorted(ForwardIt firstIt, ForwardIt lastIt)\n{\n    return ::is_sorted_until(firstIt, lastIt) == lastIt;\n}\n#else\nusing std::is_sorted;\n#endif\n\ntemplate<typename XprType>\nbool is_pointer_based_stl_iterator(const internal::pointer_based_stl_iterator<XprType> &) { return true; }\n\ntemplate<typename XprType>\nbool is_generic_randaccess_stl_iterator(const internal::generic_randaccess_stl_iterator<XprType> &) { return true; }\n\ntemplate<typename Xpr>\nvoid check_begin_end_for_loop(Xpr xpr)\n{\n  const Xpr& cxpr(xpr);\n  Index i = 0;\n\n  i = 0;\n  for(typename Xpr::iterator it = xpr.begin(); it!=xpr.end(); ++it) { VERIFY_IS_EQUAL(*it,xpr[i++]); }\n\n  i = 0;\n  for(typename Xpr::const_iterator it = xpr.cbegin(); it!=xpr.cend(); ++it) { VERIFY_IS_EQUAL(*it,xpr[i++]); }\n\n  i = 0;\n  for(typename Xpr::const_iterator it = cxpr.begin(); it!=cxpr.end(); ++it) { VERIFY_IS_EQUAL(*it,xpr[i++]); }\n\n  i = 0;\n  for(typename Xpr::const_iterator it = xpr.begin(); it!=xpr.end(); ++it) { VERIFY_IS_EQUAL(*it,xpr[i++]); }\n\n  {\n    // simple API check\n    typename Xpr::const_iterator cit = xpr.begin();\n    cit = xpr.cbegin();\n\n    #if EIGEN_HAS_CXX11\n    auto tmp1 = xpr.begin();\n    VERIFY(tmp1==xpr.begin());\n    auto tmp2 = xpr.cbegin();\n    VERIFY(tmp2==xpr.cbegin());\n    #endif\n  }\n\n  VERIFY( xpr.end() -xpr.begin()  == xpr.size() );\n  VERIFY( xpr.cend()-xpr.begin()  == xpr.size() );\n  VERIFY( xpr.end() -xpr.cbegin() == xpr.size() );\n  VERIFY( xpr.cend()-xpr.cbegin() == xpr.size() );\n\n  if(xpr.size()>0) {\n    VERIFY(xpr.begin() != xpr.end());\n    VERIFY(xpr.begin() < xpr.end());\n    VERIFY(xpr.begin() <= xpr.end());\n    VERIFY(!(xpr.begin() == xpr.end()));\n    VERIFY(!(xpr.begin() > xpr.end()));\n    VERIFY(!(xpr.begin() >= xpr.end()));\n    \n    VERIFY(xpr.cbegin() != xpr.end());\n    VERIFY(xpr.cbegin() < xpr.end());\n    VERIFY(xpr.cbegin() <= xpr.end());\n    VERIFY(!(xpr.cbegin() == xpr.end()));\n    VERIFY(!(xpr.cbegin() > xpr.end()));\n    VERIFY(!(xpr.cbegin() >= xpr.end()));\n\n    VERIFY(xpr.begin() != xpr.cend());\n    VERIFY(xpr.begin() < xpr.cend());\n    VERIFY(xpr.begin() <= xpr.cend());\n    VERIFY(!(xpr.begin() == xpr.cend()));\n    VERIFY(!(xpr.begin() > xpr.cend()));\n    VERIFY(!(xpr.begin() >= xpr.cend()));\n  }\n}\n\ntemplate<typename Scalar, int Rows, int Cols>\nvoid test_stl_iterators(int rows=Rows, int cols=Cols)\n{\n  typedef Matrix<Scalar,Rows,1> VectorType;\n  #if EIGEN_HAS_CXX11\n  typedef Matrix<Scalar,1,Cols> RowVectorType;\n  #endif\n  typedef Matrix<Scalar,Rows,Cols,ColMajor> ColMatrixType;\n  typedef Matrix<Scalar,Rows,Cols,RowMajor> RowMatrixType;\n  VectorType v = VectorType::Random(rows);\n  const VectorType& cv(v);\n  ColMatrixType A = ColMatrixType::Random(rows,cols);\n  const ColMatrixType& cA(A);\n  RowMatrixType B = RowMatrixType::Random(rows,cols);\n  \n  Index i, j;\n\n  // Check we got a fast pointer-based iterator when expected\n  {\n    VERIFY( is_pointer_based_stl_iterator(v.begin()) );\n    VERIFY( is_pointer_based_stl_iterator(v.end()) );\n    VERIFY( is_pointer_based_stl_iterator(cv.begin()) );\n    VERIFY( is_pointer_based_stl_iterator(cv.end()) );\n\n    j = internal::random<Index>(0,A.cols()-1);\n    VERIFY( is_pointer_based_stl_iterator(A.col(j).begin()) );\n    VERIFY( is_pointer_based_stl_iterator(A.col(j).end()) );\n    VERIFY( is_pointer_based_stl_iterator(cA.col(j).begin()) );\n    VERIFY( is_pointer_based_stl_iterator(cA.col(j).end()) );\n\n    i = internal::random<Index>(0,A.rows()-1);\n    VERIFY( is_pointer_based_stl_iterator(A.row(i).begin()) );\n    VERIFY( is_pointer_based_stl_iterator(A.row(i).end()) );\n    VERIFY( is_pointer_based_stl_iterator(cA.row(i).begin()) );\n    VERIFY( is_pointer_based_stl_iterator(cA.row(i).end()) );\n\n    VERIFY( is_pointer_based_stl_iterator(A.reshaped().begin()) );\n    VERIFY( is_pointer_based_stl_iterator(A.reshaped().end()) );\n    VERIFY( is_pointer_based_stl_iterator(cA.reshaped().begin()) );\n    VERIFY( is_pointer_based_stl_iterator(cA.reshaped().end()) );\n\n    VERIFY( is_pointer_based_stl_iterator(B.template reshaped<AutoOrder>().begin()) );\n    VERIFY( is_pointer_based_stl_iterator(B.template reshaped<AutoOrder>().end()) );\n\n    VERIFY( is_generic_randaccess_stl_iterator(A.template reshaped<RowMajor>().begin()) );\n    VERIFY( is_generic_randaccess_stl_iterator(A.template reshaped<RowMajor>().end()) );\n  }\n\n  {\n    check_begin_end_for_loop(v);\n    check_begin_end_for_loop(A.col(internal::random<Index>(0,A.cols()-1)));\n    check_begin_end_for_loop(A.row(internal::random<Index>(0,A.rows()-1)));\n    check_begin_end_for_loop(v+v);\n  }\n\n#if EIGEN_HAS_CXX11\n  // check swappable\n  {\n    using std::swap;\n    // pointer-based\n    {\n      VectorType v_copy = v;\n      auto a = v.begin();\n      auto b = v.end()-1;\n      swap(a,b);\n      VERIFY_IS_EQUAL(v,v_copy);\n      VERIFY_IS_EQUAL(*b,*v.begin());\n      VERIFY_IS_EQUAL(*b,v(0));\n      VERIFY_IS_EQUAL(*a,v.end()[-1]);\n      VERIFY_IS_EQUAL(*a,v(last));\n    }\n\n    // generic\n    {\n      RowMatrixType B_copy = B;\n      auto Br = B.reshaped();\n      auto a = Br.begin();\n      auto b = Br.end()-1;\n      swap(a,b);\n      VERIFY_IS_EQUAL(B,B_copy);\n      VERIFY_IS_EQUAL(*b,*Br.begin());\n      VERIFY_IS_EQUAL(*b,Br(0));\n      VERIFY_IS_EQUAL(*a,Br.end()[-1]);\n      VERIFY_IS_EQUAL(*a,Br(last));\n    }\n  }\n\n  // check non-const iterator with for-range loops\n  {\n    i = 0;\n    for(auto x : v) { VERIFY_IS_EQUAL(x,v[i++]); }\n\n    j = internal::random<Index>(0,A.cols()-1);\n    i = 0;\n    for(auto x : A.col(j)) { VERIFY_IS_EQUAL(x,A(i++,j)); }\n\n    i = 0;\n    for(auto x : (v+A.col(j))) { VERIFY_IS_APPROX(x,v(i)+A(i,j)); ++i; }\n\n    j = 0;\n    i = internal::random<Index>(0,A.rows()-1);\n    for(auto x : A.row(i)) { VERIFY_IS_EQUAL(x,A(i,j++)); }\n\n    i = 0;\n    for(auto x : A.reshaped()) { VERIFY_IS_EQUAL(x,A(i++)); }\n  }\n\n  // same for const_iterator\n  {\n    i = 0;\n    for(auto x : cv) { VERIFY_IS_EQUAL(x,v[i++]); }\n\n    i = 0;\n    for(auto x : cA.reshaped()) { VERIFY_IS_EQUAL(x,A(i++)); }\n\n    j = 0;\n    i = internal::random<Index>(0,A.rows()-1);\n    for(auto x : cA.row(i)) { VERIFY_IS_EQUAL(x,A(i,j++)); }\n  }\n\n  // check reshaped() on row-major\n  {\n    i = 0;\n    Matrix<Scalar,Dynamic,Dynamic,ColMajor> Bc = B;\n    for(auto x : B.reshaped()) { VERIFY_IS_EQUAL(x,Bc(i++)); }\n  }\n\n  // check write access\n  {\n    VectorType w(v.size());\n    i = 0;\n    for(auto& x : w) { x = v(i++); }\n    VERIFY_IS_EQUAL(v,w);\n  }\n\n  // check for dangling pointers\n  {\n    // no dangling because pointer-based\n    {\n      j = internal::random<Index>(0,A.cols()-1);\n      auto it = A.col(j).begin();\n      for(i=0;i<rows;++i) {\n        VERIFY_IS_EQUAL(it[i],A(i,j));\n      }\n    }\n\n    // no dangling because pointer-based\n    {\n      i = internal::random<Index>(0,A.rows()-1);\n      auto it = A.row(i).begin();\n      for(j=0;j<cols;++j) { VERIFY_IS_EQUAL(it[j],A(i,j)); }\n    }\n\n    {\n      j = internal::random<Index>(0,A.cols()-1);\n      // this would produce a dangling pointer:\n      // auto it = (A+2*A).col(j).begin(); \n      // we need to name the temporary expression:\n      auto tmp = (A+2*A).col(j);\n      auto it = tmp.begin();\n      for(i=0;i<rows;++i) {\n        VERIFY_IS_APPROX(it[i],3*A(i,j));\n      }\n    }\n  }\n\n  {\n    // check basic for loop on vector-wise iterators\n    j=0;\n    for (auto it = A.colwise().cbegin(); it != A.colwise().cend(); ++it, ++j) {\n      VERIFY_IS_APPROX( it->coeff(0), A(0,j) );\n      VERIFY_IS_APPROX( (*it).coeff(0), A(0,j) );\n    }\n    j=0;\n    for (auto it = A.colwise().begin(); it != A.colwise().end(); ++it, ++j) {\n      (*it).coeffRef(0) = (*it).coeff(0); // compilation check\n      it->coeffRef(0) = it->coeff(0);     // compilation check\n      VERIFY_IS_APPROX( it->coeff(0), A(0,j) );\n      VERIFY_IS_APPROX( (*it).coeff(0), A(0,j) );\n    }\n\n    // check valuetype gives us a copy\n    j=0;\n    for (auto it = A.colwise().cbegin(); it != A.colwise().cend(); ++it, ++j) {\n      typename decltype(it)::value_type tmp = *it;\n      VERIFY_IS_NOT_EQUAL( tmp.data() , it->data() );\n      VERIFY_IS_APPROX( tmp, A.col(j) );\n    }\n  }\n\n#endif\n\n  if(rows>=3) {\n    VERIFY_IS_EQUAL((v.begin()+rows/2)[1], v(rows/2+1));\n\n    VERIFY_IS_EQUAL((A.rowwise().begin()+rows/2)[1], A.row(rows/2+1));\n  }\n\n  if(cols>=3) {\n    VERIFY_IS_EQUAL((A.colwise().begin()+cols/2)[1], A.col(cols/2+1));\n  }\n\n  // check std::sort\n  {\n    // first check that is_sorted returns false when required\n    if(rows>=2)\n    {\n      v(1) = v(0)-Scalar(1);\n      #if EIGEN_HAS_CXX11\n      VERIFY(!is_sorted(std::begin(v),std::end(v)));\n      #else\n      VERIFY(!is_sorted(v.cbegin(),v.cend()));\n      #endif\n    }\n\n    // on a vector\n    {\n      std::sort(v.begin(),v.end());\n      VERIFY(is_sorted(v.begin(),v.end()));\n      VERIFY(!::is_sorted(make_reverse_iterator(v.end()),make_reverse_iterator(v.begin())));\n    }\n\n    // on a column of a column-major matrix -> pointer-based iterator and default increment\n    {\n      j = internal::random<Index>(0,A.cols()-1);\n      // std::sort(begin(A.col(j)),end(A.col(j))); // does not compile because this returns const iterators\n      typename ColMatrixType::ColXpr Acol = A.col(j);\n      std::sort(Acol.begin(),Acol.end());\n      VERIFY(is_sorted(Acol.cbegin(),Acol.cend()));\n      A.setRandom();\n\n      std::sort(A.col(j).begin(),A.col(j).end());\n      VERIFY(is_sorted(A.col(j).cbegin(),A.col(j).cend()));\n      A.setRandom();\n    }\n\n    // on a row of a rowmajor matrix -> pointer-based iterator and runtime increment\n    {\n      i = internal::random<Index>(0,A.rows()-1);\n      typename ColMatrixType::RowXpr Arow = A.row(i);\n      VERIFY_IS_EQUAL( std::distance(Arow.begin(),Arow.end()), cols);\n      std::sort(Arow.begin(),Arow.end());\n      VERIFY(is_sorted(Arow.cbegin(),Arow.cend()));\n      A.setRandom();\n\n      std::sort(A.row(i).begin(),A.row(i).end());\n      VERIFY(is_sorted(A.row(i).cbegin(),A.row(i).cend()));\n      A.setRandom();\n    }\n\n    // with a generic iterator\n    {\n      Reshaped<RowMatrixType,RowMatrixType::SizeAtCompileTime,1> B1 = B.reshaped();\n      std::sort(B1.begin(),B1.end());\n      VERIFY(is_sorted(B1.cbegin(),B1.cend()));\n      B.setRandom();\n\n      // assertion because nested expressions are different\n      // std::sort(B.reshaped().begin(),B.reshaped().end());\n      // VERIFY(is_sorted(B.reshaped().cbegin(),B.reshaped().cend()));\n      // B.setRandom();\n    }\n  }\n\n  // check with partial_sum\n  {\n    j = internal::random<Index>(0,A.cols()-1);\n    typename ColMatrixType::ColXpr Acol = A.col(j);\n    std::partial_sum(Acol.begin(), Acol.end(), v.begin());\n    VERIFY_IS_APPROX(v(seq(1,last)), v(seq(0,last-1))+Acol(seq(1,last)));\n\n    // inplace\n    std::partial_sum(Acol.begin(), Acol.end(), Acol.begin());\n    VERIFY_IS_APPROX(v, Acol);\n  }\n\n  // stress random access as required by std::nth_element\n  if(rows>=3)\n  {\n    v.setRandom();\n    VectorType v1 = v;\n    std::sort(v1.begin(),v1.end());\n    std::nth_element(v.begin(), v.begin()+rows/2, v.end());\n    VERIFY_IS_APPROX(v1(rows/2), v(rows/2));\n\n    v.setRandom();\n    v1 = v;\n    std::sort(v1.begin()+rows/2,v1.end());\n    std::nth_element(v.begin()+rows/2, v.begin()+rows/4, v.end());\n    VERIFY_IS_APPROX(v1(rows/4), v(rows/4));\n  }\n\n#if EIGEN_HAS_CXX11\n  // check rows/cols iterators with range-for loops\n  {\n    j = 0;\n    for(auto c : A.colwise()) { VERIFY_IS_APPROX(c.sum(), A.col(j).sum()); ++j; }\n    j = 0;\n    for(auto c : B.colwise()) { VERIFY_IS_APPROX(c.sum(), B.col(j).sum()); ++j; }\n\n    j = 0;\n    for(auto c : B.colwise()) {\n      i = 0;\n      for(auto& x : c) {\n        VERIFY_IS_EQUAL(x, B(i,j));\n        x = A(i,j);\n        ++i;\n      }\n      ++j;\n    }\n    VERIFY_IS_APPROX(A,B);\n    B.setRandom();\n    \n    i = 0;\n    for(auto r : A.rowwise()) { VERIFY_IS_APPROX(r.sum(), A.row(i).sum()); ++i; }\n    i = 0;\n    for(auto r : B.rowwise()) { VERIFY_IS_APPROX(r.sum(), B.row(i).sum()); ++i; }\n  }\n\n\n  // check rows/cols iterators with STL algorithms\n  {\n    RowVectorType row = RowVectorType::Random(cols);\n    A.rowwise() = row;\n    VERIFY( std::all_of(A.rowwise().begin(), A.rowwise().end(), [&row](typename ColMatrixType::RowXpr x) { return internal::isApprox(x.squaredNorm(),row.squaredNorm()); }) );\n\n    VectorType col = VectorType::Random(rows);\n    A.colwise() = col;\n    VERIFY( std::all_of(A.colwise().begin(),  A.colwise().end(),  [&col](typename ColMatrixType::ColXpr x) { return internal::isApprox(x.squaredNorm(),col.squaredNorm()); }) );\n    VERIFY( std::all_of(A.colwise().cbegin(), A.colwise().cend(), [&col](typename ColMatrixType::ConstColXpr x) { return internal::isApprox(x.squaredNorm(),col.squaredNorm()); }) );\n\n    i = internal::random<Index>(0,A.rows()-1);\n    A.setRandom();\n    A.row(i).setZero();\n    VERIFY_IS_EQUAL( std::find_if(A.rowwise().begin(), A.rowwise().end(), [](typename ColMatrixType::RowXpr x) { return x.squaredNorm() == Scalar(0); })-A.rowwise().begin(), i );\n\n    j = internal::random<Index>(0,A.cols()-1);\n    A.setRandom();\n    A.col(j).setZero();\n    VERIFY_IS_EQUAL( std::find_if(A.colwise().begin(), A.colwise().end(), [](typename ColMatrixType::ColXpr x) { return x.squaredNorm() == Scalar(0); })-A.colwise().begin(), j );\n  }\n\n  {\n    using VecOp = VectorwiseOp<ArrayXXi, 0>;\n    STATIC_CHECK(( internal::is_same<VecOp::const_iterator, decltype(std::declval<const VecOp&>().cbegin())>::value ));\n    STATIC_CHECK(( internal::is_same<VecOp::const_iterator, decltype(std::declval<const VecOp&>().cend  ())>::value ));\n    #if EIGEN_COMP_CXXVER>=14\n      STATIC_CHECK(( internal::is_same<VecOp::const_iterator, decltype(std::cbegin(std::declval<const VecOp&>()))>::value ));\n      STATIC_CHECK(( internal::is_same<VecOp::const_iterator, decltype(std::cend  (std::declval<const VecOp&>()))>::value ));\n    #endif\n  }\n\n#endif\n}\n\n\n#if EIGEN_HAS_CXX11\n// When the compiler sees expression IsContainerTest<C>(0), if C is an\n// STL-style container class, the first overload of IsContainerTest\n// will be viable (since both C::iterator* and C::const_iterator* are\n// valid types and NULL can be implicitly converted to them).  It will\n// be picked over the second overload as 'int' is a perfect match for\n// the type of argument 0.  If C::iterator or C::const_iterator is not\n// a valid type, the first overload is not viable, and the second\n// overload will be picked.\ntemplate <class C,\n          class Iterator = decltype(::std::declval<const C&>().begin()),\n          class = decltype(::std::declval<const C&>().end()),\n          class = decltype(++::std::declval<Iterator&>()),\n          class = decltype(*::std::declval<Iterator>()),\n          class = typename C::const_iterator>\nbool IsContainerType(int /* dummy */) { return true; }\n\ntemplate <class C>\nbool IsContainerType(long /* dummy */) { return false; }\n\ntemplate <typename Scalar, int Rows, int Cols>\nvoid test_stl_container_detection(int rows=Rows, int cols=Cols)\n{\n  typedef Matrix<Scalar,Rows,1> VectorType;\n  typedef Matrix<Scalar,Rows,Cols,ColMajor> ColMatrixType;\n  typedef Matrix<Scalar,Rows,Cols,RowMajor> RowMatrixType;\n\n  ColMatrixType A = ColMatrixType::Random(rows, cols);\n  RowMatrixType B = RowMatrixType::Random(rows, cols);\n\n  Index i = 1;\n\n  using ColMatrixColType = decltype(A.col(i));\n  using ColMatrixRowType = decltype(A.row(i));\n  using RowMatrixColType = decltype(B.col(i));\n  using RowMatrixRowType = decltype(B.row(i));\n\n  // Vector and matrix col/row are valid Stl-style container.\n  VERIFY_IS_EQUAL(IsContainerType<VectorType>(0), true);\n  VERIFY_IS_EQUAL(IsContainerType<ColMatrixColType>(0), true);\n  VERIFY_IS_EQUAL(IsContainerType<ColMatrixRowType>(0), true);\n  VERIFY_IS_EQUAL(IsContainerType<RowMatrixColType>(0), true);\n  VERIFY_IS_EQUAL(IsContainerType<RowMatrixRowType>(0), true);\n\n  // But the matrix itself is not a valid Stl-style container.\n  VERIFY_IS_EQUAL(IsContainerType<ColMatrixType>(0), rows == 1 || cols == 1);\n  VERIFY_IS_EQUAL(IsContainerType<RowMatrixType>(0), rows == 1 || cols == 1);\n}\n#endif\n\nEIGEN_DECLARE_TEST(stl_iterators)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1(( test_stl_iterators<double,2,3>() ));\n    CALL_SUBTEST_1(( test_stl_iterators<float,7,5>() ));\n    CALL_SUBTEST_1(( test_stl_iterators<int,Dynamic,Dynamic>(internal::random<int>(5,10), internal::random<int>(5,10)) ));\n    CALL_SUBTEST_1(( test_stl_iterators<int,Dynamic,Dynamic>(internal::random<int>(10,200), internal::random<int>(10,200)) ));\n  }\n  \n#if EIGEN_HAS_CXX11\n  CALL_SUBTEST_1(( test_stl_container_detection<float,1,1>() ));\n  CALL_SUBTEST_1(( test_stl_container_detection<float,5,5>() ));\n#endif  \n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/superlu_support.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2011 Gael Guennebaud <g.gael@free.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_NO_DEBUG_SMALL_PRODUCT_BLOCKS\n#include \"sparse_solver.h\"\n\n#include <Eigen/SuperLUSupport>\n\nEIGEN_DECLARE_TEST(superlu_support)\n{\n  SuperLU<SparseMatrix<double> > superlu_double_colmajor;\n  SuperLU<SparseMatrix<std::complex<double> > > superlu_cplxdouble_colmajor;\n  CALL_SUBTEST_1( check_sparse_square_solving(superlu_double_colmajor)      );\n  CALL_SUBTEST_2( check_sparse_square_solving(superlu_cplxdouble_colmajor)  );\n  CALL_SUBTEST_1( check_sparse_square_determinant(superlu_double_colmajor)      );\n  CALL_SUBTEST_2( check_sparse_square_determinant(superlu_cplxdouble_colmajor)  );\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/svd_common.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef SVD_DEFAULT\n#error a macro SVD_DEFAULT(MatrixType) must be defined prior to including svd_common.h\n#endif\n\n#ifndef SVD_FOR_MIN_NORM\n#error a macro SVD_FOR_MIN_NORM(MatrixType) must be defined prior to including svd_common.h\n#endif\n\n#include \"svd_fill.h\"\n#include \"solverbase.h\"\n\n// Check that the matrix m is properly reconstructed and that the U and V factors are unitary\n// The SVD must have already been computed.\ntemplate<typename SvdType, typename MatrixType>\nvoid svd_check_full(const MatrixType& m, const SvdType& svd)\n{\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  enum {\n    RowsAtCompileTime = MatrixType::RowsAtCompileTime,\n    ColsAtCompileTime = MatrixType::ColsAtCompileTime\n  };\n\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename MatrixType::RealScalar RealScalar;\n  typedef Matrix<Scalar, RowsAtCompileTime, RowsAtCompileTime> MatrixUType;\n  typedef Matrix<Scalar, ColsAtCompileTime, ColsAtCompileTime> MatrixVType;\n\n  MatrixType sigma = MatrixType::Zero(rows,cols);\n  sigma.diagonal() = svd.singularValues().template cast<Scalar>();\n  MatrixUType u = svd.matrixU();\n  MatrixVType v = svd.matrixV();\n  RealScalar scaling = m.cwiseAbs().maxCoeff();\n  if(scaling<(std::numeric_limits<RealScalar>::min)())\n  {\n    VERIFY(sigma.cwiseAbs().maxCoeff() <= (std::numeric_limits<RealScalar>::min)());\n  }\n  else\n  {\n    VERIFY_IS_APPROX(m/scaling, u * (sigma/scaling) * v.adjoint());\n  }\n  VERIFY_IS_UNITARY(u);\n  VERIFY_IS_UNITARY(v);\n}\n\n// Compare partial SVD defined by computationOptions to a full SVD referenceSvd\ntemplate<typename SvdType, typename MatrixType>\nvoid svd_compare_to_full(const MatrixType& m,\n                         unsigned int computationOptions,\n                         const SvdType& referenceSvd)\n{\n  typedef typename MatrixType::RealScalar RealScalar;\n  Index rows = m.rows();\n  Index cols = m.cols();\n  Index diagSize = (std::min)(rows, cols);\n  RealScalar prec = test_precision<RealScalar>();\n\n  SvdType svd(m, computationOptions);\n\n  VERIFY_IS_APPROX(svd.singularValues(), referenceSvd.singularValues());\n  \n  if(computationOptions & (ComputeFullV|ComputeThinV))\n  {\n    VERIFY( (svd.matrixV().adjoint()*svd.matrixV()).isIdentity(prec) );\n    VERIFY_IS_APPROX( svd.matrixV().leftCols(diagSize) * svd.singularValues().asDiagonal() * svd.matrixV().leftCols(diagSize).adjoint(),\n                      referenceSvd.matrixV().leftCols(diagSize) * referenceSvd.singularValues().asDiagonal() * referenceSvd.matrixV().leftCols(diagSize).adjoint());\n  }\n  \n  if(computationOptions & (ComputeFullU|ComputeThinU))\n  {\n    VERIFY( (svd.matrixU().adjoint()*svd.matrixU()).isIdentity(prec) );\n    VERIFY_IS_APPROX( svd.matrixU().leftCols(diagSize) * svd.singularValues().cwiseAbs2().asDiagonal() * svd.matrixU().leftCols(diagSize).adjoint(),\n                      referenceSvd.matrixU().leftCols(diagSize) * referenceSvd.singularValues().cwiseAbs2().asDiagonal() * referenceSvd.matrixU().leftCols(diagSize).adjoint());\n  }\n  \n  // The following checks are not critical.\n  // For instance, with Dived&Conquer SVD, if only the factor 'V' is computedt then different matrix-matrix product implementation will be used\n  // and the resulting 'V' factor might be significantly different when the SVD decomposition is not unique, especially with single precision float.\n  ++g_test_level;\n  if(computationOptions & ComputeFullU)  VERIFY_IS_APPROX(svd.matrixU(), referenceSvd.matrixU());\n  if(computationOptions & ComputeThinU)  VERIFY_IS_APPROX(svd.matrixU(), referenceSvd.matrixU().leftCols(diagSize));\n  if(computationOptions & ComputeFullV)  VERIFY_IS_APPROX(svd.matrixV().cwiseAbs(), referenceSvd.matrixV().cwiseAbs());\n  if(computationOptions & ComputeThinV)  VERIFY_IS_APPROX(svd.matrixV(), referenceSvd.matrixV().leftCols(diagSize));\n  --g_test_level;\n}\n\n//\ntemplate<typename SvdType, typename MatrixType>\nvoid svd_least_square(const MatrixType& m, unsigned int computationOptions)\n{\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename MatrixType::RealScalar RealScalar;\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  enum {\n    RowsAtCompileTime = MatrixType::RowsAtCompileTime,\n    ColsAtCompileTime = MatrixType::ColsAtCompileTime\n  };\n\n  typedef Matrix<Scalar, RowsAtCompileTime, Dynamic> RhsType;\n  typedef Matrix<Scalar, ColsAtCompileTime, Dynamic> SolutionType;\n\n  RhsType rhs = RhsType::Random(rows, internal::random<Index>(1, cols));\n  SvdType svd(m, computationOptions);\n\n       if(internal::is_same<RealScalar,double>::value) svd.setThreshold(1e-8);\n  else if(internal::is_same<RealScalar,float>::value)  svd.setThreshold(2e-4);\n\n  SolutionType x = svd.solve(rhs);\n   \n  RealScalar residual = (m*x-rhs).norm();\n  RealScalar rhs_norm = rhs.norm();\n  if(!test_isMuchSmallerThan(residual,rhs.norm()))\n  {\n    // ^^^ If the residual is very small, then we have an exact solution, so we are already good.\n    \n    // evaluate normal equation which works also for least-squares solutions\n    if(internal::is_same<RealScalar,double>::value || svd.rank()==m.diagonal().size())\n    {\n      using std::sqrt;\n      // This test is not stable with single precision.\n      // This is probably because squaring m signicantly affects the precision.      \n      if(internal::is_same<RealScalar,float>::value) ++g_test_level;\n      \n      VERIFY_IS_APPROX(m.adjoint()*(m*x),m.adjoint()*rhs);\n      \n      if(internal::is_same<RealScalar,float>::value) --g_test_level;\n    }\n    \n    // Check that there is no significantly better solution in the neighborhood of x\n    for(Index k=0;k<x.rows();++k)\n    {\n      using std::abs;\n      \n      SolutionType y(x);\n      y.row(k) = (RealScalar(1)+2*NumTraits<RealScalar>::epsilon())*x.row(k);\n      RealScalar residual_y = (m*y-rhs).norm();\n      VERIFY( test_isMuchSmallerThan(abs(residual_y-residual), rhs_norm) || residual < residual_y );\n      if(internal::is_same<RealScalar,float>::value) ++g_test_level;\n      VERIFY( test_isApprox(residual_y,residual) || residual < residual_y );\n      if(internal::is_same<RealScalar,float>::value) --g_test_level;\n      \n      y.row(k) = (RealScalar(1)-2*NumTraits<RealScalar>::epsilon())*x.row(k);\n      residual_y = (m*y-rhs).norm();\n      VERIFY( test_isMuchSmallerThan(abs(residual_y-residual), rhs_norm) || residual < residual_y );\n      if(internal::is_same<RealScalar,float>::value) ++g_test_level;\n      VERIFY( test_isApprox(residual_y,residual) || residual < residual_y );\n      if(internal::is_same<RealScalar,float>::value) --g_test_level;\n    }\n  }\n}\n\n// check minimal norm solutions, the inoput matrix m is only used to recover problem size\ntemplate<typename MatrixType>\nvoid svd_min_norm(const MatrixType& m, unsigned int computationOptions)\n{\n  typedef typename MatrixType::Scalar Scalar;\n  Index cols = m.cols();\n\n  enum {\n    ColsAtCompileTime = MatrixType::ColsAtCompileTime\n  };\n\n  typedef Matrix<Scalar, ColsAtCompileTime, Dynamic> SolutionType;\n\n  // generate a full-rank m x n problem with m<n\n  enum {\n    RankAtCompileTime2 = ColsAtCompileTime==Dynamic ? Dynamic : (ColsAtCompileTime)/2+1,\n    RowsAtCompileTime3 = ColsAtCompileTime==Dynamic ? Dynamic : ColsAtCompileTime+1\n  };\n  typedef Matrix<Scalar, RankAtCompileTime2, ColsAtCompileTime> MatrixType2;\n  typedef Matrix<Scalar, RankAtCompileTime2, 1> RhsType2;\n  typedef Matrix<Scalar, ColsAtCompileTime, RankAtCompileTime2> MatrixType2T;\n  Index rank = RankAtCompileTime2==Dynamic ? internal::random<Index>(1,cols) : Index(RankAtCompileTime2);\n  MatrixType2 m2(rank,cols);\n  int guard = 0;\n  do {\n    m2.setRandom();\n  } while(SVD_FOR_MIN_NORM(MatrixType2)(m2).setThreshold(test_precision<Scalar>()).rank()!=rank && (++guard)<10);\n  VERIFY(guard<10);\n\n  RhsType2 rhs2 = RhsType2::Random(rank);\n  // use QR to find a reference minimal norm solution\n  HouseholderQR<MatrixType2T> qr(m2.adjoint());\n  Matrix<Scalar,Dynamic,1> tmp = qr.matrixQR().topLeftCorner(rank,rank).template triangularView<Upper>().adjoint().solve(rhs2);\n  tmp.conservativeResize(cols);\n  tmp.tail(cols-rank).setZero();\n  SolutionType x21 = qr.householderQ() * tmp;\n  // now check with SVD\n  SVD_FOR_MIN_NORM(MatrixType2) svd2(m2, computationOptions);\n  SolutionType x22 = svd2.solve(rhs2);\n  VERIFY_IS_APPROX(m2*x21, rhs2);\n  VERIFY_IS_APPROX(m2*x22, rhs2);\n  VERIFY_IS_APPROX(x21, x22);\n\n  // Now check with a rank deficient matrix\n  typedef Matrix<Scalar, RowsAtCompileTime3, ColsAtCompileTime> MatrixType3;\n  typedef Matrix<Scalar, RowsAtCompileTime3, 1> RhsType3;\n  Index rows3 = RowsAtCompileTime3==Dynamic ? internal::random<Index>(rank+1,2*cols) : Index(RowsAtCompileTime3);\n  Matrix<Scalar,RowsAtCompileTime3,Dynamic> C = Matrix<Scalar,RowsAtCompileTime3,Dynamic>::Random(rows3,rank);\n  MatrixType3 m3 = C * m2;\n  RhsType3 rhs3 = C * rhs2;\n  SVD_FOR_MIN_NORM(MatrixType3) svd3(m3, computationOptions);\n  SolutionType x3 = svd3.solve(rhs3);\n  VERIFY_IS_APPROX(m3*x3, rhs3);\n  VERIFY_IS_APPROX(m3*x21, rhs3);\n  VERIFY_IS_APPROX(m2*x3, rhs2);\n  VERIFY_IS_APPROX(x21, x3);\n}\n\ntemplate<typename MatrixType, typename SolverType>\nvoid svd_test_solvers(const MatrixType& m, const SolverType& solver) {\n    Index rows, cols, cols2;\n\n    rows = m.rows();\n    cols = m.cols();\n\n    if(MatrixType::ColsAtCompileTime==Dynamic)\n    {\n      cols2 = internal::random<int>(2,EIGEN_TEST_MAX_SIZE);\n    }\n    else\n    {\n      cols2 = cols;\n    }\n    typedef Matrix<typename MatrixType::Scalar, MatrixType::ColsAtCompileTime, MatrixType::ColsAtCompileTime> CMatrixType;\n    check_solverbase<CMatrixType, MatrixType>(m, solver, rows, cols, cols2);\n}\n\n// Check full, compare_to_full, least_square, and min_norm for all possible compute-options\ntemplate<typename SvdType, typename MatrixType>\nvoid svd_test_all_computation_options(const MatrixType& m, bool full_only)\n{\n//   if (QRPreconditioner == NoQRPreconditioner && m.rows() != m.cols())\n//     return;\n  STATIC_CHECK(( internal::is_same<typename SvdType::StorageIndex,int>::value ));\n\n  SvdType fullSvd(m, ComputeFullU|ComputeFullV);\n  CALL_SUBTEST(( svd_check_full(m, fullSvd) ));\n  CALL_SUBTEST(( svd_least_square<SvdType>(m, ComputeFullU | ComputeFullV) ));\n  CALL_SUBTEST(( svd_min_norm(m, ComputeFullU | ComputeFullV) ));\n  \n  #if defined __INTEL_COMPILER\n  // remark #111: statement is unreachable\n  #pragma warning disable 111\n  #endif\n\n  svd_test_solvers(m, fullSvd);\n\n  if(full_only)\n    return;\n\n  CALL_SUBTEST(( svd_compare_to_full(m, ComputeFullU, fullSvd) ));\n  CALL_SUBTEST(( svd_compare_to_full(m, ComputeFullV, fullSvd) ));\n  CALL_SUBTEST(( svd_compare_to_full(m, 0, fullSvd) ));\n\n  if (MatrixType::ColsAtCompileTime == Dynamic) {\n    // thin U/V are only available with dynamic number of columns\n    CALL_SUBTEST(( svd_compare_to_full(m, ComputeFullU|ComputeThinV, fullSvd) ));\n    CALL_SUBTEST(( svd_compare_to_full(m,              ComputeThinV, fullSvd) ));\n    CALL_SUBTEST(( svd_compare_to_full(m, ComputeThinU|ComputeFullV, fullSvd) ));\n    CALL_SUBTEST(( svd_compare_to_full(m, ComputeThinU             , fullSvd) ));\n    CALL_SUBTEST(( svd_compare_to_full(m, ComputeThinU|ComputeThinV, fullSvd) ));\n    \n    CALL_SUBTEST(( svd_least_square<SvdType>(m, ComputeFullU | ComputeThinV) ));\n    CALL_SUBTEST(( svd_least_square<SvdType>(m, ComputeThinU | ComputeFullV) ));\n    CALL_SUBTEST(( svd_least_square<SvdType>(m, ComputeThinU | ComputeThinV) ));\n\n    CALL_SUBTEST(( svd_min_norm(m, ComputeFullU | ComputeThinV) ));\n    CALL_SUBTEST(( svd_min_norm(m, ComputeThinU | ComputeFullV) ));\n    CALL_SUBTEST(( svd_min_norm(m, ComputeThinU | ComputeThinV) ));\n\n    // test reconstruction\n    Index diagSize = (std::min)(m.rows(), m.cols());\n    SvdType svd(m, ComputeThinU | ComputeThinV);\n    VERIFY_IS_APPROX(m, svd.matrixU().leftCols(diagSize) * svd.singularValues().asDiagonal() * svd.matrixV().leftCols(diagSize).adjoint());\n  }\n}\n\n\n// work around stupid msvc error when constructing at compile time an expression that involves\n// a division by zero, even if the numeric type has floating point\ntemplate<typename Scalar>\nEIGEN_DONT_INLINE Scalar zero() { return Scalar(0); }\n\n// workaround aggressive optimization in ICC\ntemplate<typename T> EIGEN_DONT_INLINE  T sub(T a, T b) { return a - b; }\n\n// all this function does is verify we don't iterate infinitely on nan/inf values\ntemplate<typename SvdType, typename MatrixType>\nvoid svd_inf_nan()\n{\n  SvdType svd;\n  typedef typename MatrixType::Scalar Scalar;\n  Scalar some_inf = Scalar(1) / zero<Scalar>();\n  VERIFY(sub(some_inf, some_inf) != sub(some_inf, some_inf));\n  svd.compute(MatrixType::Constant(10,10,some_inf), ComputeFullU | ComputeFullV);\n\n  Scalar nan = std::numeric_limits<Scalar>::quiet_NaN();\n  VERIFY(nan != nan);\n  svd.compute(MatrixType::Constant(10,10,nan), ComputeFullU | ComputeFullV);\n\n  MatrixType m = MatrixType::Zero(10,10);\n  m(internal::random<int>(0,9), internal::random<int>(0,9)) = some_inf;\n  svd.compute(m, ComputeFullU | ComputeFullV);\n\n  m = MatrixType::Zero(10,10);\n  m(internal::random<int>(0,9), internal::random<int>(0,9)) = nan;\n  svd.compute(m, ComputeFullU | ComputeFullV);\n  \n  // regression test for bug 791\n  m.resize(3,3);\n  m << 0,    2*NumTraits<Scalar>::epsilon(),  0.5,\n       0,   -0.5,                             0,\n       nan,  0,                               0;\n  svd.compute(m, ComputeFullU | ComputeFullV);\n  \n  m.resize(4,4);\n  m <<  1, 0, 0, 0,\n        0, 3, 1, 2e-308,\n        1, 0, 1, nan,\n        0, nan, nan, 0;\n  svd.compute(m, ComputeFullU | ComputeFullV);\n}\n\n// Regression test for bug 286: JacobiSVD loops indefinitely with some\n// matrices containing denormal numbers.\ntemplate<typename>\nvoid svd_underoverflow()\n{\n#if defined __INTEL_COMPILER\n// shut up warning #239: floating point underflow\n#pragma warning push\n#pragma warning disable 239\n#endif\n  Matrix2d M;\n  M << -7.90884e-313, -4.94e-324,\n                 0, 5.60844e-313;\n  SVD_DEFAULT(Matrix2d) svd;\n  svd.compute(M,ComputeFullU|ComputeFullV);\n  CALL_SUBTEST( svd_check_full(M,svd) );\n  \n  // Check all 2x2 matrices made with the following coefficients:\n  VectorXd value_set(9);\n  value_set << 0, 1, -1, 5.60844e-313, -5.60844e-313, 4.94e-324, -4.94e-324, -4.94e-223, 4.94e-223;\n  Array4i id(0,0,0,0);\n  int k = 0;\n  do\n  {\n    M << value_set(id(0)), value_set(id(1)), value_set(id(2)), value_set(id(3));\n    svd.compute(M,ComputeFullU|ComputeFullV);\n    CALL_SUBTEST( svd_check_full(M,svd) );\n\n    id(k)++;\n    if(id(k)>=value_set.size())\n    {\n      while(k<3 && id(k)>=value_set.size()) id(++k)++;\n      id.head(k).setZero();\n      k=0;\n    }\n\n  } while((id<int(value_set.size())).all());\n  \n#if defined __INTEL_COMPILER\n#pragma warning pop\n#endif\n  \n  // Check for overflow:\n  Matrix3d M3;\n  M3 << 4.4331978442502944e+307, -5.8585363752028680e+307,  6.4527017443412964e+307,\n        3.7841695601406358e+307,  2.4331702789740617e+306, -3.5235707140272905e+307,\n       -8.7190887618028355e+307, -7.3453213709232193e+307, -2.4367363684472105e+307;\n\n  SVD_DEFAULT(Matrix3d) svd3;\n  svd3.compute(M3,ComputeFullU|ComputeFullV); // just check we don't loop indefinitely\n  CALL_SUBTEST( svd_check_full(M3,svd3) );\n}\n\n// void jacobisvd(const MatrixType& a = MatrixType(), bool pickrandom = true)\n\ntemplate<typename MatrixType>\nvoid svd_all_trivial_2x2( void (*cb)(const MatrixType&,bool) )\n{\n  MatrixType M;\n  VectorXd value_set(3);\n  value_set << 0, 1, -1;\n  Array4i id(0,0,0,0);\n  int k = 0;\n  do\n  {\n    M << value_set(id(0)), value_set(id(1)), value_set(id(2)), value_set(id(3));\n    \n    cb(M,false);\n    \n    id(k)++;\n    if(id(k)>=value_set.size())\n    {\n      while(k<3 && id(k)>=value_set.size()) id(++k)++;\n      id.head(k).setZero();\n      k=0;\n    }\n    \n  } while((id<int(value_set.size())).all());\n}\n\ntemplate<typename>\nvoid svd_preallocate()\n{\n  Vector3f v(3.f, 2.f, 1.f);\n  MatrixXf m = v.asDiagonal();\n\n  internal::set_is_malloc_allowed(false);\n  VERIFY_RAISES_ASSERT(VectorXf tmp(10);)\n  SVD_DEFAULT(MatrixXf) svd;\n  internal::set_is_malloc_allowed(true);\n  svd.compute(m);\n  VERIFY_IS_APPROX(svd.singularValues(), v);\n\n  SVD_DEFAULT(MatrixXf) svd2(3,3);\n  internal::set_is_malloc_allowed(false);\n  svd2.compute(m);\n  internal::set_is_malloc_allowed(true);\n  VERIFY_IS_APPROX(svd2.singularValues(), v);\n  VERIFY_RAISES_ASSERT(svd2.matrixU());\n  VERIFY_RAISES_ASSERT(svd2.matrixV());\n  svd2.compute(m, ComputeFullU | ComputeFullV);\n  VERIFY_IS_APPROX(svd2.matrixU(), Matrix3f::Identity());\n  VERIFY_IS_APPROX(svd2.matrixV(), Matrix3f::Identity());\n  internal::set_is_malloc_allowed(false);\n  svd2.compute(m);\n  internal::set_is_malloc_allowed(true);\n\n  SVD_DEFAULT(MatrixXf) svd3(3,3,ComputeFullU|ComputeFullV);\n  internal::set_is_malloc_allowed(false);\n  svd2.compute(m);\n  internal::set_is_malloc_allowed(true);\n  VERIFY_IS_APPROX(svd2.singularValues(), v);\n  VERIFY_IS_APPROX(svd2.matrixU(), Matrix3f::Identity());\n  VERIFY_IS_APPROX(svd2.matrixV(), Matrix3f::Identity());\n  internal::set_is_malloc_allowed(false);\n  svd2.compute(m, ComputeFullU|ComputeFullV);\n  internal::set_is_malloc_allowed(true);\n}\n\ntemplate<typename SvdType,typename MatrixType> \nvoid svd_verify_assert(const MatrixType& m)\n{\n  typedef typename MatrixType::Scalar Scalar;\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  enum {\n    RowsAtCompileTime = MatrixType::RowsAtCompileTime,\n    ColsAtCompileTime = MatrixType::ColsAtCompileTime\n  };\n\n  typedef Matrix<Scalar, RowsAtCompileTime, 1> RhsType;\n  RhsType rhs(rows);\n  SvdType svd;\n  VERIFY_RAISES_ASSERT(svd.matrixU())\n  VERIFY_RAISES_ASSERT(svd.singularValues())\n  VERIFY_RAISES_ASSERT(svd.matrixV())\n  VERIFY_RAISES_ASSERT(svd.solve(rhs))\n  VERIFY_RAISES_ASSERT(svd.transpose().solve(rhs))\n  VERIFY_RAISES_ASSERT(svd.adjoint().solve(rhs))\n  MatrixType a = MatrixType::Zero(rows, cols);\n  a.setZero();\n  svd.compute(a, 0);\n  VERIFY_RAISES_ASSERT(svd.matrixU())\n  VERIFY_RAISES_ASSERT(svd.matrixV())\n  svd.singularValues();\n  VERIFY_RAISES_ASSERT(svd.solve(rhs))\n    \n  if (ColsAtCompileTime == Dynamic)\n  {\n    svd.compute(a, ComputeThinU);\n    svd.matrixU();\n    VERIFY_RAISES_ASSERT(svd.matrixV())\n    VERIFY_RAISES_ASSERT(svd.solve(rhs))\n    svd.compute(a, ComputeThinV);\n    svd.matrixV();\n    VERIFY_RAISES_ASSERT(svd.matrixU())\n    VERIFY_RAISES_ASSERT(svd.solve(rhs))\n  }\n  else\n  {\n    VERIFY_RAISES_ASSERT(svd.compute(a, ComputeThinU))\n    VERIFY_RAISES_ASSERT(svd.compute(a, ComputeThinV))\n  }\n}\n\n#undef SVD_DEFAULT\n#undef SVD_FOR_MIN_NORM\n"
  },
  {
    "path": "3rdparty/eigen3/test/svd_fill.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014-2015 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\ntemplate<typename T>\nArray<T,4,1> four_denorms();\n\ntemplate<>\nArray4f four_denorms() { return Array4f(5.60844e-39f, -5.60844e-39f, 4.94e-44f, -4.94e-44f); }\ntemplate<>\nArray4d four_denorms() { return Array4d(5.60844e-313, -5.60844e-313, 4.94e-324, -4.94e-324); }\ntemplate<typename T>\nArray<T,4,1> four_denorms() { return four_denorms<double>().cast<T>(); }\n\ntemplate<typename MatrixType>\nvoid svd_fill_random(MatrixType &m, int Option = 0)\n{\n  using std::pow;\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename MatrixType::RealScalar RealScalar;\n  Index diagSize = (std::min)(m.rows(), m.cols());\n  RealScalar s = std::numeric_limits<RealScalar>::max_exponent10/4;\n  s = internal::random<RealScalar>(1,s);\n  Matrix<RealScalar,Dynamic,1> d =  Matrix<RealScalar,Dynamic,1>::Random(diagSize);\n  for(Index k=0; k<diagSize; ++k)\n    d(k) = d(k)*pow(RealScalar(10),internal::random<RealScalar>(-s,s));\n\n  bool dup     = internal::random<int>(0,10) < 3;\n  bool unit_uv = internal::random<int>(0,10) < (dup?7:3); // if we duplicate some diagonal entries, then increase the chance to preserve them using unitary U and V factors\n  \n  // duplicate some singular values\n  if(dup)\n  {\n    Index n = internal::random<Index>(0,d.size()-1);\n    for(Index i=0; i<n; ++i)\n      d(internal::random<Index>(0,d.size()-1)) = d(internal::random<Index>(0,d.size()-1));\n  }\n  \n  Matrix<Scalar,Dynamic,Dynamic> U(m.rows(),diagSize);\n  Matrix<Scalar,Dynamic,Dynamic> VT(diagSize,m.cols());\n  if(unit_uv)\n  {\n    // in very rare cases let's try with a pure diagonal matrix\n    if(internal::random<int>(0,10) < 1)\n    {\n      U.setIdentity();\n      VT.setIdentity();\n    }\n    else\n    {\n      createRandomPIMatrixOfRank(diagSize,U.rows(), U.cols(), U);\n      createRandomPIMatrixOfRank(diagSize,VT.rows(), VT.cols(), VT);\n    }\n  }\n  else\n  {\n    U.setRandom();\n    VT.setRandom();\n  }\n  \n  Matrix<Scalar,Dynamic,1> samples(9);\n  samples << 0, four_denorms<RealScalar>(),\n            -RealScalar(1)/NumTraits<RealScalar>::highest(), RealScalar(1)/NumTraits<RealScalar>::highest(), (std::numeric_limits<RealScalar>::min)(), pow((std::numeric_limits<RealScalar>::min)(),0.8);\n  \n  if(Option==Symmetric)\n  {\n    m = U * d.asDiagonal() * U.transpose();\n    \n    // randomly nullify some rows/columns\n    {\n      Index count = internal::random<Index>(-diagSize,diagSize);\n      for(Index k=0; k<count; ++k)\n      {\n        Index i = internal::random<Index>(0,diagSize-1);\n        m.row(i).setZero();\n        m.col(i).setZero();\n      }\n      if(count<0)\n      // (partly) cancel some coeffs\n      if(!(dup && unit_uv))\n      {\n        \n        Index n = internal::random<Index>(0,m.size()-1);\n        for(Index k=0; k<n; ++k)\n        {\n          Index i = internal::random<Index>(0,m.rows()-1);\n          Index j = internal::random<Index>(0,m.cols()-1);\n          m(j,i) = m(i,j) = samples(internal::random<Index>(0,samples.size()-1));\n          if(NumTraits<Scalar>::IsComplex)\n            *(&numext::real_ref(m(j,i))+1) = *(&numext::real_ref(m(i,j))+1) = samples.real()(internal::random<Index>(0,samples.size()-1));\n        }\n      }\n    }\n  }\n  else\n  {\n    m = U * d.asDiagonal() * VT;\n    // (partly) cancel some coeffs\n    if(!(dup && unit_uv))\n    {\n      Index n = internal::random<Index>(0,m.size()-1);\n      for(Index k=0; k<n; ++k)\n      {\n        Index i = internal::random<Index>(0,m.rows()-1);\n        Index j = internal::random<Index>(0,m.cols()-1);\n        m(i,j) = samples(internal::random<Index>(0,samples.size()-1));\n        if(NumTraits<Scalar>::IsComplex)\n          *(&numext::real_ref(m(i,j))+1) = samples.real()(internal::random<Index>(0,samples.size()-1));\n      }\n    }\n  }\n}\n\n"
  },
  {
    "path": "3rdparty/eigen3/test/swap.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_NO_STATIC_ASSERT\n#include \"main.h\"\n\ntemplate<typename T>\nstruct other_matrix_type\n{\n  typedef int type;\n};\n\ntemplate<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>\nstruct other_matrix_type<Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> >\n{\n  typedef Matrix<_Scalar, _Rows, _Cols, _Options^RowMajor, _MaxRows, _MaxCols> type;\n};\n\ntemplate<typename MatrixType> void swap(const MatrixType& m)\n{\n  typedef typename other_matrix_type<MatrixType>::type OtherMatrixType;\n  typedef typename MatrixType::Scalar Scalar;\n\n  eigen_assert((!internal::is_same<MatrixType,OtherMatrixType>::value));\n  Index rows = m.rows();\n  Index cols = m.cols();\n  \n  // construct 3 matrix guaranteed to be distinct\n  MatrixType m1 = MatrixType::Random(rows,cols);\n  MatrixType m2 = MatrixType::Random(rows,cols) + Scalar(100) * MatrixType::Identity(rows,cols);\n  OtherMatrixType m3 = OtherMatrixType::Random(rows,cols) + Scalar(200) * OtherMatrixType::Identity(rows,cols);\n  \n  MatrixType m1_copy = m1;\n  MatrixType m2_copy = m2;\n  OtherMatrixType m3_copy = m3;\n  \n  // test swapping 2 matrices of same type\n  Scalar *d1=m1.data(), *d2=m2.data();\n  m1.swap(m2);\n  VERIFY_IS_APPROX(m1,m2_copy);\n  VERIFY_IS_APPROX(m2,m1_copy);\n  if(MatrixType::SizeAtCompileTime==Dynamic)\n  {\n    VERIFY(m1.data()==d2);\n    VERIFY(m2.data()==d1);\n  }\n  m1 = m1_copy;\n  m2 = m2_copy;\n  \n  // test swapping 2 matrices of different types\n  m1.swap(m3);\n  VERIFY_IS_APPROX(m1,m3_copy);\n  VERIFY_IS_APPROX(m3,m1_copy);\n  m1 = m1_copy;\n  m3 = m3_copy;\n  \n  // test swapping matrix with expression\n  m1.swap(m2.block(0,0,rows,cols));\n  VERIFY_IS_APPROX(m1,m2_copy);\n  VERIFY_IS_APPROX(m2,m1_copy);\n  m1 = m1_copy;\n  m2 = m2_copy;\n\n  // test swapping two expressions of different types\n  m1.transpose().swap(m3.transpose());\n  VERIFY_IS_APPROX(m1,m3_copy);\n  VERIFY_IS_APPROX(m3,m1_copy);\n  m1 = m1_copy;\n  m3 = m3_copy;\n  \n  if(m1.rows()>1)\n  {\n    // test assertion on mismatching size -- matrix case\n    VERIFY_RAISES_ASSERT(m1.swap(m1.row(0)));\n    // test assertion on mismatching size -- xpr case\n    VERIFY_RAISES_ASSERT(m1.row(0).swap(m1));\n  }\n}\n\nEIGEN_DECLARE_TEST(swap)\n{\n  int s = internal::random<int>(1,EIGEN_TEST_MAX_SIZE);\n  CALL_SUBTEST_1( swap(Matrix3f()) ); // fixed size, no vectorization \n  CALL_SUBTEST_2( swap(Matrix4d()) ); // fixed size, possible vectorization \n  CALL_SUBTEST_3( swap(MatrixXd(s,s)) ); // dyn size, no vectorization \n  CALL_SUBTEST_4( swap(MatrixXf(s,s)) ); // dyn size, possible vectorization \n  TEST_SET_BUT_UNUSED_VARIABLE(s)\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/symbolic_index.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2017 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifdef EIGEN_TEST_PART_2\n#define EIGEN_MAX_CPP_VER 03\n\n// see indexed_view.cpp\n#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))\n  #pragma GCC diagnostic ignored \"-Wdeprecated\"\n#endif\n\n#endif\n\n#include \"main.h\"\n\ntemplate<typename T1,typename T2>\nbool is_same_symb(const T1& a, const T2& b, Index size)\n{\n  return a.eval(last=size-1) == b.eval(last=size-1);\n}\n\ntemplate<typename T>\nvoid check_is_symbolic(const T&) {\n  STATIC_CHECK(( symbolic::is_symbolic<T>::value ))\n}\n\ntemplate<typename T>\nvoid check_isnot_symbolic(const T&) {\n  STATIC_CHECK(( !symbolic::is_symbolic<T>::value ))\n}\n\n#define VERIFY_EQ_INT(A,B) VERIFY_IS_APPROX(int(A),int(B))\n\nvoid check_symbolic_index()\n{\n  check_is_symbolic(last);\n  check_is_symbolic(lastp1);\n  check_is_symbolic(last+1);\n  check_is_symbolic(last-lastp1);\n  check_is_symbolic(2*last-lastp1/2);\n  check_isnot_symbolic(fix<3>());\n\n  Index size=100;\n\n  // First, let's check FixedInt arithmetic:\n  VERIFY( is_same_type( (fix<5>()-fix<3>())*fix<9>()/(-fix<3>()), fix<-(5-3)*9/3>() ) );\n  VERIFY( is_same_type( (fix<5>()-fix<3>())*fix<9>()/fix<2>(), fix<(5-3)*9/2>() ) );\n  VERIFY( is_same_type( fix<9>()/fix<2>(), fix<9/2>() ) );\n  VERIFY( is_same_type( fix<9>()%fix<2>(), fix<9%2>() ) );\n  VERIFY( is_same_type( fix<9>()&fix<2>(), fix<9&2>() ) );\n  VERIFY( is_same_type( fix<9>()|fix<2>(), fix<9|2>() ) );\n  VERIFY( is_same_type( fix<9>()/2, int(9/2) ) );\n\n  VERIFY( is_same_symb( lastp1-1, last, size) );\n  VERIFY( is_same_symb( lastp1-fix<1>, last, size) );\n\n  VERIFY_IS_EQUAL( ( (last*5-2)/3 ).eval(last=size-1), ((size-1)*5-2)/3 );\n  VERIFY_IS_EQUAL( ( (last*fix<5>-fix<2>)/fix<3> ).eval(last=size-1), ((size-1)*5-2)/3 );\n  VERIFY_IS_EQUAL( ( -last*lastp1  ).eval(last=size-1), -(size-1)*size );\n  VERIFY_IS_EQUAL( ( lastp1-3*last  ).eval(last=size-1), size- 3*(size-1) );\n  VERIFY_IS_EQUAL( ( (lastp1-3*last)/lastp1  ).eval(last=size-1), (size- 3*(size-1))/size );\n\n#if EIGEN_HAS_CXX14\n  {\n    struct x_tag {};  static const symbolic::SymbolExpr<x_tag> x;\n    struct y_tag {};  static const symbolic::SymbolExpr<y_tag> y;\n    struct z_tag {};  static const symbolic::SymbolExpr<z_tag> z;\n\n    VERIFY_IS_APPROX( int(((x+3)/y+z).eval(x=6,y=3,z=-13)), (6+3)/3+(-13) );\n  }\n#endif\n}\n\nEIGEN_DECLARE_TEST(symbolic_index)\n{\n  CALL_SUBTEST_1( check_symbolic_index() );\n  CALL_SUBTEST_2( check_symbolic_index() );\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/triangular.cpp",
    "content": "// This file is triangularView of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifdef EIGEN_TEST_PART_100\n#  define EIGEN_NO_DEPRECATED_WARNING\n#endif\n\n#include \"main.h\"\n\n\ntemplate<typename MatrixType> void triangular_deprecated(const MatrixType &m)\n{\n  Index rows = m.rows();\n  Index cols = m.cols();\n  MatrixType m1, m2, m3, m4;\n  m1.setRandom(rows,cols);\n  m2.setRandom(rows,cols);\n  m3 = m1; m4 = m2;\n  // deprecated method:\n  m1.template triangularView<Eigen::Upper>().swap(m2);\n  // use this method instead:\n  m3.template triangularView<Eigen::Upper>().swap(m4.template triangularView<Eigen::Upper>());\n  VERIFY_IS_APPROX(m1,m3);\n  VERIFY_IS_APPROX(m2,m4);\n  // deprecated method:\n  m1.template triangularView<Eigen::Lower>().swap(m4);\n  // use this method instead:\n  m3.template triangularView<Eigen::Lower>().swap(m2.template triangularView<Eigen::Lower>());\n  VERIFY_IS_APPROX(m1,m3);\n  VERIFY_IS_APPROX(m2,m4);\n}\n\n\ntemplate<typename MatrixType> void triangular_square(const MatrixType& m)\n{\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;\n\n  RealScalar largerEps = 10*test_precision<RealScalar>();\n\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  MatrixType m1 = MatrixType::Random(rows, cols),\n             m2 = MatrixType::Random(rows, cols),\n             m3(rows, cols),\n             m4(rows, cols),\n             r1(rows, cols),\n             r2(rows, cols);\n  VectorType v2 = VectorType::Random(rows);\n\n  MatrixType m1up = m1.template triangularView<Upper>();\n  MatrixType m2up = m2.template triangularView<Upper>();\n\n  if (rows*cols>1)\n  {\n    VERIFY(m1up.isUpperTriangular());\n    VERIFY(m2up.transpose().isLowerTriangular());\n    VERIFY(!m2.isLowerTriangular());\n  }\n\n//   VERIFY_IS_APPROX(m1up.transpose() * m2, m1.upper().transpose().lower() * m2);\n\n  // test overloaded operator+=\n  r1.setZero();\n  r2.setZero();\n  r1.template triangularView<Upper>() +=  m1;\n  r2 += m1up;\n  VERIFY_IS_APPROX(r1,r2);\n\n  // test overloaded operator=\n  m1.setZero();\n  m1.template triangularView<Upper>() = m2.transpose() + m2;\n  m3 = m2.transpose() + m2;\n  VERIFY_IS_APPROX(m3.template triangularView<Lower>().transpose().toDenseMatrix(), m1);\n\n  // test overloaded operator=\n  m1.setZero();\n  m1.template triangularView<Lower>() = m2.transpose() + m2;\n  VERIFY_IS_APPROX(m3.template triangularView<Lower>().toDenseMatrix(), m1);\n\n  VERIFY_IS_APPROX(m3.template triangularView<Lower>().conjugate().toDenseMatrix(),\n                   m3.conjugate().template triangularView<Lower>().toDenseMatrix());\n\n  m1 = MatrixType::Random(rows, cols);\n  for (int i=0; i<rows; ++i)\n    while (numext::abs2(m1(i,i))<RealScalar(1e-1)) m1(i,i) = internal::random<Scalar>();\n\n  Transpose<MatrixType> trm4(m4);\n  // test back and forward substitution with a vector as the rhs\n  m3 = m1.template triangularView<Upper>();\n  VERIFY(v2.isApprox(m3.adjoint() * (m1.adjoint().template triangularView<Lower>().solve(v2)), largerEps));\n  m3 = m1.template triangularView<Lower>();\n  VERIFY(v2.isApprox(m3.transpose() * (m1.transpose().template triangularView<Upper>().solve(v2)), largerEps));\n  m3 = m1.template triangularView<Upper>();\n  VERIFY(v2.isApprox(m3 * (m1.template triangularView<Upper>().solve(v2)), largerEps));\n  m3 = m1.template triangularView<Lower>();\n  VERIFY(v2.isApprox(m3.conjugate() * (m1.conjugate().template triangularView<Lower>().solve(v2)), largerEps));\n\n  // test back and forward substitution with a matrix as the rhs\n  m3 = m1.template triangularView<Upper>();\n  VERIFY(m2.isApprox(m3.adjoint() * (m1.adjoint().template triangularView<Lower>().solve(m2)), largerEps));\n  m3 = m1.template triangularView<Lower>();\n  VERIFY(m2.isApprox(m3.transpose() * (m1.transpose().template triangularView<Upper>().solve(m2)), largerEps));\n  m3 = m1.template triangularView<Upper>();\n  VERIFY(m2.isApprox(m3 * (m1.template triangularView<Upper>().solve(m2)), largerEps));\n  m3 = m1.template triangularView<Lower>();\n  VERIFY(m2.isApprox(m3.conjugate() * (m1.conjugate().template triangularView<Lower>().solve(m2)), largerEps));\n\n  // check M * inv(L) using in place API\n  m4 = m3;\n  m1.transpose().template triangularView<Eigen::Upper>().solveInPlace(trm4);\n  VERIFY_IS_APPROX(m4 * m1.template triangularView<Eigen::Lower>(), m3);\n\n  // check M * inv(U) using in place API\n  m3 = m1.template triangularView<Upper>();\n  m4 = m3;\n  m3.transpose().template triangularView<Eigen::Lower>().solveInPlace(trm4);\n  VERIFY_IS_APPROX(m4 * m1.template triangularView<Eigen::Upper>(), m3);\n\n  // check solve with unit diagonal\n  m3 = m1.template triangularView<UnitUpper>();\n  VERIFY(m2.isApprox(m3 * (m1.template triangularView<UnitUpper>().solve(m2)), largerEps));\n\n//   VERIFY((  m1.template triangularView<Upper>()\n//           * m2.template triangularView<Upper>()).isUpperTriangular());\n\n  // test swap\n  m1.setOnes();\n  m2.setZero();\n  m2.template triangularView<Upper>().swap(m1.template triangularView<Eigen::Upper>());\n  m3.setZero();\n  m3.template triangularView<Upper>().setOnes();\n  VERIFY_IS_APPROX(m2,m3);\n  VERIFY_RAISES_STATIC_ASSERT(m1.template triangularView<Eigen::Lower>().swap(m2.template triangularView<Eigen::Upper>()));\n\n  m1.setRandom();\n  m3 = m1.template triangularView<Upper>();\n  Matrix<Scalar, MatrixType::ColsAtCompileTime, Dynamic> m5(cols, internal::random<int>(1,20));  m5.setRandom();\n  Matrix<Scalar, Dynamic, MatrixType::RowsAtCompileTime> m6(internal::random<int>(1,20), rows);  m6.setRandom();\n  VERIFY_IS_APPROX(m1.template triangularView<Upper>() * m5, m3*m5);\n  VERIFY_IS_APPROX(m6*m1.template triangularView<Upper>(), m6*m3);\n\n  m1up = m1.template triangularView<Upper>();\n  VERIFY_IS_APPROX(m1.template selfadjointView<Upper>().template triangularView<Upper>().toDenseMatrix(), m1up);\n  VERIFY_IS_APPROX(m1up.template selfadjointView<Upper>().template triangularView<Upper>().toDenseMatrix(), m1up);\n  VERIFY_IS_APPROX(m1.template selfadjointView<Upper>().template triangularView<Lower>().toDenseMatrix(), m1up.adjoint());\n  VERIFY_IS_APPROX(m1up.template selfadjointView<Upper>().template triangularView<Lower>().toDenseMatrix(), m1up.adjoint());\n\n  VERIFY_IS_APPROX(m1.template selfadjointView<Upper>().diagonal(), m1.diagonal());\n\n  m3.setRandom();\n  const MatrixType& m3c(m3);\n  VERIFY( is_same_type(m3c.template triangularView<Lower>(),m3.template triangularView<Lower>().template conjugateIf<false>()) );\n  VERIFY( is_same_type(m3c.template triangularView<Lower>().conjugate(),m3.template triangularView<Lower>().template conjugateIf<true>()) );\n  VERIFY_IS_APPROX(m3.template triangularView<Lower>().template conjugateIf<true>().toDenseMatrix(),\n                   m3.conjugate().template triangularView<Lower>().toDenseMatrix());\n  VERIFY_IS_APPROX(m3.template triangularView<Lower>().template conjugateIf<false>().toDenseMatrix(),\n                   m3.template triangularView<Lower>().toDenseMatrix());\n\n  VERIFY( is_same_type(m3c.template selfadjointView<Lower>(),m3.template selfadjointView<Lower>().template conjugateIf<false>()) );\n  VERIFY( is_same_type(m3c.template selfadjointView<Lower>().conjugate(),m3.template selfadjointView<Lower>().template conjugateIf<true>()) );\n  VERIFY_IS_APPROX(m3.template selfadjointView<Lower>().template conjugateIf<true>().toDenseMatrix(),\n                   m3.conjugate().template selfadjointView<Lower>().toDenseMatrix());\n  VERIFY_IS_APPROX(m3.template selfadjointView<Lower>().template conjugateIf<false>().toDenseMatrix(),\n                   m3.template selfadjointView<Lower>().toDenseMatrix());\n\n}\n\n\ntemplate<typename MatrixType> void triangular_rect(const MatrixType& m)\n{\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  enum { Rows =  MatrixType::RowsAtCompileTime, Cols =  MatrixType::ColsAtCompileTime };\n\n  Index rows = m.rows();\n  Index cols = m.cols();\n\n  MatrixType m1 = MatrixType::Random(rows, cols),\n             m2 = MatrixType::Random(rows, cols),\n             m3(rows, cols),\n             m4(rows, cols),\n             r1(rows, cols),\n             r2(rows, cols);\n\n  MatrixType m1up = m1.template triangularView<Upper>();\n  MatrixType m2up = m2.template triangularView<Upper>();\n\n  if (rows>1 && cols>1)\n  {\n    VERIFY(m1up.isUpperTriangular());\n    VERIFY(m2up.transpose().isLowerTriangular());\n    VERIFY(!m2.isLowerTriangular());\n  }\n\n  // test overloaded operator+=\n  r1.setZero();\n  r2.setZero();\n  r1.template triangularView<Upper>() +=  m1;\n  r2 += m1up;\n  VERIFY_IS_APPROX(r1,r2);\n\n  // test overloaded operator=\n  m1.setZero();\n  m1.template triangularView<Upper>() = 3 * m2;\n  m3 = 3 * m2;\n  VERIFY_IS_APPROX(m3.template triangularView<Upper>().toDenseMatrix(), m1);\n\n\n  m1.setZero();\n  m1.template triangularView<Lower>() = 3 * m2;\n  VERIFY_IS_APPROX(m3.template triangularView<Lower>().toDenseMatrix(), m1);\n\n  m1.setZero();\n  m1.template triangularView<StrictlyUpper>() = 3 * m2;\n  VERIFY_IS_APPROX(m3.template triangularView<StrictlyUpper>().toDenseMatrix(), m1);\n\n\n  m1.setZero();\n  m1.template triangularView<StrictlyLower>() = 3 * m2;\n  VERIFY_IS_APPROX(m3.template triangularView<StrictlyLower>().toDenseMatrix(), m1);\n  m1.setRandom();\n  m2 = m1.template triangularView<Upper>();\n  VERIFY(m2.isUpperTriangular());\n  VERIFY(!m2.isLowerTriangular());\n  m2 = m1.template triangularView<StrictlyUpper>();\n  VERIFY(m2.isUpperTriangular());\n  VERIFY(m2.diagonal().isMuchSmallerThan(RealScalar(1)));\n  m2 = m1.template triangularView<UnitUpper>();\n  VERIFY(m2.isUpperTriangular());\n  m2.diagonal().array() -= Scalar(1);\n  VERIFY(m2.diagonal().isMuchSmallerThan(RealScalar(1)));\n  m2 = m1.template triangularView<Lower>();\n  VERIFY(m2.isLowerTriangular());\n  VERIFY(!m2.isUpperTriangular());\n  m2 = m1.template triangularView<StrictlyLower>();\n  VERIFY(m2.isLowerTriangular());\n  VERIFY(m2.diagonal().isMuchSmallerThan(RealScalar(1)));\n  m2 = m1.template triangularView<UnitLower>();\n  VERIFY(m2.isLowerTriangular());\n  m2.diagonal().array() -= Scalar(1);\n  VERIFY(m2.diagonal().isMuchSmallerThan(RealScalar(1)));\n  // test swap\n  m1.setOnes();\n  m2.setZero();\n  m2.template triangularView<Upper>().swap(m1.template triangularView<Eigen::Upper>());\n  m3.setZero();\n  m3.template triangularView<Upper>().setOnes();\n  VERIFY_IS_APPROX(m2,m3);\n}\n\nvoid bug_159()\n{\n  Matrix3d m = Matrix3d::Random().triangularView<Lower>();\n  EIGEN_UNUSED_VARIABLE(m)\n}\n\nEIGEN_DECLARE_TEST(triangular)\n{\n  int maxsize = (std::min)(EIGEN_TEST_MAX_SIZE,20);\n  for(int i = 0; i < g_repeat ; i++)\n  {\n    int r = internal::random<int>(2,maxsize); TEST_SET_BUT_UNUSED_VARIABLE(r)\n    int c = internal::random<int>(2,maxsize); TEST_SET_BUT_UNUSED_VARIABLE(c)\n\n    CALL_SUBTEST_1( triangular_square(Matrix<float, 1, 1>()) );\n    CALL_SUBTEST_2( triangular_square(Matrix<float, 2, 2>()) );\n    CALL_SUBTEST_3( triangular_square(Matrix3d()) );\n    CALL_SUBTEST_4( triangular_square(Matrix<std::complex<float>,8, 8>()) );\n    CALL_SUBTEST_5( triangular_square(MatrixXcd(r,r)) );\n    CALL_SUBTEST_6( triangular_square(Matrix<float,Dynamic,Dynamic,RowMajor>(r, r)) );\n\n    CALL_SUBTEST_7( triangular_rect(Matrix<float, 4, 5>()) );\n    CALL_SUBTEST_8( triangular_rect(Matrix<double, 6, 2>()) );\n    CALL_SUBTEST_9( triangular_rect(MatrixXcf(r, c)) );\n    CALL_SUBTEST_5( triangular_rect(MatrixXcd(r, c)) );\n    CALL_SUBTEST_6( triangular_rect(Matrix<float,Dynamic,Dynamic,RowMajor>(r, c)) );\n\n    CALL_SUBTEST_100( triangular_deprecated(Matrix<float, 5, 7>()) );\n    CALL_SUBTEST_100( triangular_deprecated(MatrixXd(r,c)) );\n  }\n  \n  CALL_SUBTEST_1( bug_159() );\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/type_alias.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2019 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\nEIGEN_DECLARE_TEST(type_alias)\n{\n  using namespace internal;\n\n  // To warm up, some basic checks:\n  STATIC_CHECK((is_same<MatrixXd,Matrix<double,Dynamic,Dynamic> >::value));\n  STATIC_CHECK((is_same<Matrix2f,Matrix<float,2,2> >::value));\n  STATIC_CHECK((is_same<Array33i,Array<int,3,3> >::value));\n\n#if EIGEN_HAS_CXX11\n  \n  STATIC_CHECK((is_same<MatrixX<double>,    MatrixXd>::value));\n  STATIC_CHECK((is_same<MatrixX<int>,       MatrixXi>::value));\n  STATIC_CHECK((is_same<Matrix2<int>,       Matrix2i>::value));\n  STATIC_CHECK((is_same<Matrix2X<float>,    Matrix2Xf>::value));\n  STATIC_CHECK((is_same<MatrixX4<double>,   MatrixX4d>::value));\n  STATIC_CHECK((is_same<VectorX<int>,       VectorXi>::value));\n  STATIC_CHECK((is_same<Vector2<float>,     Vector2f>::value));\n  STATIC_CHECK((is_same<RowVectorX<int>,    RowVectorXi>::value));\n  STATIC_CHECK((is_same<RowVector2<float>,  RowVector2f>::value));\n\n  STATIC_CHECK((is_same<ArrayXX<float>,     ArrayXXf>::value));\n  STATIC_CHECK((is_same<Array33<int>,       Array33i>::value));\n  STATIC_CHECK((is_same<Array2X<float>,     Array2Xf>::value));\n  STATIC_CHECK((is_same<ArrayX4<double>,    ArrayX4d>::value));\n  STATIC_CHECK((is_same<ArrayX<double>,     ArrayXd>::value));\n  STATIC_CHECK((is_same<Array4<double>,     Array4d>::value));\n\n  STATIC_CHECK((is_same<Vector<float,3>,        Vector3f>::value));\n  STATIC_CHECK((is_same<Vector<int,Dynamic>,    VectorXi>::value));\n  STATIC_CHECK((is_same<RowVector<float,3>,     RowVector3f>::value));\n  STATIC_CHECK((is_same<RowVector<int,Dynamic>, RowVectorXi>::value));\n\n#else\n  std::cerr << \"WARNING: c++11 type aliases not tested.\\n\";\n#endif\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/umeyama.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Hauke Heibel <hauke.heibel@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/Core>\n#include <Eigen/Geometry>\n\n#include <Eigen/LU> // required for MatrixBase::determinant\n#include <Eigen/SVD> // required for SVD\n\nusing namespace Eigen;\n\n//  Constructs a random matrix from the unitary group U(size).\ntemplate <typename T>\nEigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> randMatrixUnitary(int size)\n{\n  typedef T Scalar;\n  typedef Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic> MatrixType;\n\n  MatrixType Q;\n\n  int max_tries = 40;\n  bool is_unitary = false;\n\n  while (!is_unitary && max_tries > 0)\n  {\n    // initialize random matrix\n    Q = MatrixType::Random(size, size);\n\n    // orthogonalize columns using the Gram-Schmidt algorithm\n    for (int col = 0; col < size; ++col)\n    {\n      typename MatrixType::ColXpr colVec = Q.col(col);\n      for (int prevCol = 0; prevCol < col; ++prevCol)\n      {\n        typename MatrixType::ColXpr prevColVec = Q.col(prevCol);\n        colVec -= colVec.dot(prevColVec)*prevColVec;\n      }\n      Q.col(col) = colVec.normalized();\n    }\n\n    // this additional orthogonalization is not necessary in theory but should enhance\n    // the numerical orthogonality of the matrix\n    for (int row = 0; row < size; ++row)\n    {\n      typename MatrixType::RowXpr rowVec = Q.row(row);\n      for (int prevRow = 0; prevRow < row; ++prevRow)\n      {\n        typename MatrixType::RowXpr prevRowVec = Q.row(prevRow);\n        rowVec -= rowVec.dot(prevRowVec)*prevRowVec;\n      }\n      Q.row(row) = rowVec.normalized();\n    }\n\n    // final check\n    is_unitary = Q.isUnitary();\n    --max_tries;\n  }\n\n  if (max_tries == 0)\n    eigen_assert(false && \"randMatrixUnitary: Could not construct unitary matrix!\");\n\n  return Q;\n}\n\n//  Constructs a random matrix from the special unitary group SU(size).\ntemplate <typename T>\nEigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> randMatrixSpecialUnitary(int size)\n{\n  typedef T Scalar;\n\n  typedef Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic> MatrixType;\n\n  // initialize unitary matrix\n  MatrixType Q = randMatrixUnitary<Scalar>(size);\n\n  // tweak the first column to make the determinant be 1\n  Q.col(0) *= numext::conj(Q.determinant());\n\n  return Q;\n}\n\ntemplate <typename MatrixType>\nvoid run_test(int dim, int num_elements)\n{\n  using std::abs;\n  typedef typename internal::traits<MatrixType>::Scalar Scalar;\n  typedef Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic> MatrixX;\n  typedef Matrix<Scalar, Eigen::Dynamic, 1> VectorX;\n\n  // MUST be positive because in any other case det(cR_t) may become negative for\n  // odd dimensions!\n  const Scalar c = abs(internal::random<Scalar>());\n\n  MatrixX R = randMatrixSpecialUnitary<Scalar>(dim);\n  VectorX t = Scalar(50)*VectorX::Random(dim,1);\n\n  MatrixX cR_t = MatrixX::Identity(dim+1,dim+1);\n  cR_t.block(0,0,dim,dim) = c*R;\n  cR_t.block(0,dim,dim,1) = t;\n\n  MatrixX src = MatrixX::Random(dim+1, num_elements);\n  src.row(dim) = Matrix<Scalar, 1, Dynamic>::Constant(num_elements, Scalar(1));\n\n  MatrixX dst = cR_t*src;\n\n  MatrixX cR_t_umeyama = umeyama(src.block(0,0,dim,num_elements), dst.block(0,0,dim,num_elements));\n\n  const Scalar error = ( cR_t_umeyama*src - dst ).norm() / dst.norm();\n  VERIFY(error < Scalar(40)*std::numeric_limits<Scalar>::epsilon());\n}\n\ntemplate<typename Scalar, int Dimension>\nvoid run_fixed_size_test(int num_elements)\n{\n  using std::abs;\n  typedef Matrix<Scalar, Dimension+1, Dynamic> MatrixX;\n  typedef Matrix<Scalar, Dimension+1, Dimension+1> HomMatrix;\n  typedef Matrix<Scalar, Dimension, Dimension> FixedMatrix;\n  typedef Matrix<Scalar, Dimension, 1> FixedVector;\n\n  const int dim = Dimension;\n\n  // MUST be positive because in any other case det(cR_t) may become negative for\n  // odd dimensions!\n  // Also if c is to small compared to t.norm(), problem is ill-posed (cf. Bug 744)\n  const Scalar c = internal::random<Scalar>(0.5, 2.0);\n\n  FixedMatrix R = randMatrixSpecialUnitary<Scalar>(dim);\n  FixedVector t = Scalar(32)*FixedVector::Random(dim,1);\n\n  HomMatrix cR_t = HomMatrix::Identity(dim+1,dim+1);\n  cR_t.block(0,0,dim,dim) = c*R;\n  cR_t.block(0,dim,dim,1) = t;\n\n  MatrixX src = MatrixX::Random(dim+1, num_elements);\n  src.row(dim) = Matrix<Scalar, 1, Dynamic>::Constant(num_elements, Scalar(1));\n\n  MatrixX dst = cR_t*src;\n\n  Block<MatrixX, Dimension, Dynamic> src_block(src,0,0,dim,num_elements);\n  Block<MatrixX, Dimension, Dynamic> dst_block(dst,0,0,dim,num_elements);\n\n  HomMatrix cR_t_umeyama = umeyama(src_block, dst_block);\n\n  const Scalar error = ( cR_t_umeyama*src - dst ).squaredNorm();\n\n  VERIFY(error < Scalar(16)*std::numeric_limits<Scalar>::epsilon());\n}\n\nEIGEN_DECLARE_TEST(umeyama)\n{\n  for (int i=0; i<g_repeat; ++i)\n  {\n    const int num_elements = internal::random<int>(40,500);\n\n    // works also for dimensions bigger than 3...\n    for (int dim=2; dim<8; ++dim)\n    {\n      CALL_SUBTEST_1(run_test<MatrixXd>(dim, num_elements));\n      CALL_SUBTEST_2(run_test<MatrixXf>(dim, num_elements));\n    }\n\n    CALL_SUBTEST_3((run_fixed_size_test<float, 2>(num_elements)));\n    CALL_SUBTEST_4((run_fixed_size_test<float, 3>(num_elements)));\n    CALL_SUBTEST_5((run_fixed_size_test<float, 4>(num_elements)));\n\n    CALL_SUBTEST_6((run_fixed_size_test<double, 2>(num_elements)));\n    CALL_SUBTEST_7((run_fixed_size_test<double, 3>(num_elements)));\n    CALL_SUBTEST_8((run_fixed_size_test<double, 4>(num_elements)));\n  }\n\n  // Those two calls don't compile and result in meaningful error messages!\n  // umeyama(MatrixXcf(),MatrixXcf());\n  // umeyama(MatrixXcd(),MatrixXcd());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/umfpack_support.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2011 Gael Guennebaud <g.gael@free.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_NO_DEBUG_SMALL_PRODUCT_BLOCKS\n#include \"sparse_solver.h\"\n\n#include <Eigen/UmfPackSupport>\n\ntemplate<typename T1, typename T2> void test_umfpack_support_T()\n{\n  UmfPackLU<SparseMatrix<T1, ColMajor, T2> > umfpack_colmajor;\n  UmfPackLU<SparseMatrix<T1, RowMajor, T2> > umfpack_rowmajor;\n  \n  check_sparse_square_solving(umfpack_colmajor);\n  check_sparse_square_solving(umfpack_rowmajor);\n  \n  check_sparse_square_determinant(umfpack_colmajor);\n  check_sparse_square_determinant(umfpack_rowmajor);\n}\n\nEIGEN_DECLARE_TEST(umfpack_support)\n{\n  CALL_SUBTEST_1((test_umfpack_support_T<double, int>()));\n  CALL_SUBTEST_2((test_umfpack_support_T<std::complex<double>, int>()));\n  CALL_SUBTEST_3((test_umfpack_support_T<double, long >()));\n  CALL_SUBTEST_4((test_umfpack_support_T<std::complex<double>, long>()));\n}\n\n"
  },
  {
    "path": "3rdparty/eigen3/test/unalignedassert.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2015 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#if defined(EIGEN_TEST_PART_1)\n  // default\n#elif defined(EIGEN_TEST_PART_2)\n  #define EIGEN_MAX_STATIC_ALIGN_BYTES 16\n  #define EIGEN_MAX_ALIGN_BYTES 16\n#elif defined(EIGEN_TEST_PART_3)\n  #define EIGEN_MAX_STATIC_ALIGN_BYTES 32\n  #define EIGEN_MAX_ALIGN_BYTES 32\n#elif defined(EIGEN_TEST_PART_4)\n  #define EIGEN_MAX_STATIC_ALIGN_BYTES 64\n  #define EIGEN_MAX_ALIGN_BYTES 64\n#endif\n\n#include \"main.h\"\n\ntypedef Matrix<float,  6,1> Vector6f;\ntypedef Matrix<float,  8,1> Vector8f;\ntypedef Matrix<float, 12,1> Vector12f;\n\ntypedef Matrix<double, 5,1> Vector5d;\ntypedef Matrix<double, 6,1> Vector6d;\ntypedef Matrix<double, 7,1> Vector7d;\ntypedef Matrix<double, 8,1> Vector8d;\ntypedef Matrix<double, 9,1> Vector9d;\ntypedef Matrix<double,10,1> Vector10d;\ntypedef Matrix<double,12,1> Vector12d;\n\nstruct TestNew1\n{\n  MatrixXd m; // good: m will allocate its own array, taking care of alignment.\n  TestNew1() : m(20,20) {}\n};\n\nstruct TestNew2\n{\n  Matrix3d m; // good: m's size isn't a multiple of 16 bytes, so m doesn't have to be 16-byte aligned,\n              // 8-byte alignment is good enough here, which we'll get automatically\n};\n\nstruct TestNew3\n{\n  Vector2f m; // good: m's size isn't a multiple of 16 bytes, so m doesn't have to be 16-byte aligned\n};\n\nstruct TestNew4\n{\n  EIGEN_MAKE_ALIGNED_OPERATOR_NEW\n  Vector2d m;\n  float f; // make the struct have sizeof%16!=0 to make it a little more tricky when we allow an array of 2 such objects\n};\n\nstruct TestNew5\n{\n  EIGEN_MAKE_ALIGNED_OPERATOR_NEW\n  float f; // try the f at first -- the EIGEN_ALIGN_MAX attribute of m should make that still work\n  Matrix4f m;\n};\n\nstruct TestNew6\n{\n  Matrix<float,2,2,DontAlign> m; // good: no alignment requested\n  float f;\n};\n\ntemplate<bool Align> struct Depends\n{\n  EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(Align)\n  Vector2d m;\n  float f;\n};\n\ntemplate<typename T>\nvoid check_unalignedassert_good()\n{\n  T *x, *y;\n  x = new T;\n  delete x;\n  y = new T[2];\n  delete[] y;\n}\n\n#if EIGEN_MAX_STATIC_ALIGN_BYTES>0\ntemplate<typename T>\nvoid construct_at_boundary(int boundary)\n{\n  char buf[sizeof(T)+256];\n  size_t _buf = reinterpret_cast<internal::UIntPtr>(buf);\n  _buf += (EIGEN_MAX_ALIGN_BYTES - (_buf % EIGEN_MAX_ALIGN_BYTES)); // make 16/32/...-byte aligned\n  _buf += boundary; // make exact boundary-aligned\n  T *x = ::new(reinterpret_cast<void*>(_buf)) T;\n  x[0].setZero(); // just in order to silence warnings\n  x->~T();\n}\n#endif\n\nvoid unalignedassert()\n{\n#if EIGEN_MAX_STATIC_ALIGN_BYTES>0\n  construct_at_boundary<Vector2f>(4);\n  construct_at_boundary<Vector3f>(4);\n  construct_at_boundary<Vector4f>(16);\n  construct_at_boundary<Vector6f>(4);\n  construct_at_boundary<Vector8f>(EIGEN_MAX_ALIGN_BYTES);\n  construct_at_boundary<Vector12f>(16);\n  construct_at_boundary<Matrix2f>(16);\n  construct_at_boundary<Matrix3f>(4);\n  construct_at_boundary<Matrix4f>(EIGEN_MAX_ALIGN_BYTES);\n\n  construct_at_boundary<Vector2d>(16);\n  construct_at_boundary<Vector3d>(4);\n  construct_at_boundary<Vector4d>(EIGEN_MAX_ALIGN_BYTES);\n  construct_at_boundary<Vector5d>(4);\n  construct_at_boundary<Vector6d>(16);\n  construct_at_boundary<Vector7d>(4);\n  construct_at_boundary<Vector8d>(EIGEN_MAX_ALIGN_BYTES);\n  construct_at_boundary<Vector9d>(4);\n  construct_at_boundary<Vector10d>(16);\n  construct_at_boundary<Vector12d>(EIGEN_MAX_ALIGN_BYTES);\n  construct_at_boundary<Matrix2d>(EIGEN_MAX_ALIGN_BYTES);\n  construct_at_boundary<Matrix3d>(4);\n  construct_at_boundary<Matrix4d>(EIGEN_MAX_ALIGN_BYTES);\n\n  construct_at_boundary<Vector2cf>(16);\n  construct_at_boundary<Vector3cf>(4);\n  construct_at_boundary<Vector2cd>(EIGEN_MAX_ALIGN_BYTES);\n  construct_at_boundary<Vector3cd>(16);\n#endif\n\n  check_unalignedassert_good<TestNew1>();\n  check_unalignedassert_good<TestNew2>();\n  check_unalignedassert_good<TestNew3>();\n\n  check_unalignedassert_good<TestNew4>();\n  check_unalignedassert_good<TestNew5>();\n  check_unalignedassert_good<TestNew6>();\n  check_unalignedassert_good<Depends<true> >();\n\n#if EIGEN_MAX_STATIC_ALIGN_BYTES>0\n  if(EIGEN_MAX_ALIGN_BYTES>=16)\n  {\n    VERIFY_RAISES_ASSERT(construct_at_boundary<Vector4f>(8));\n    VERIFY_RAISES_ASSERT(construct_at_boundary<Vector8f>(8));\n    VERIFY_RAISES_ASSERT(construct_at_boundary<Vector12f>(8));\n    VERIFY_RAISES_ASSERT(construct_at_boundary<Vector2d>(8));\n    VERIFY_RAISES_ASSERT(construct_at_boundary<Vector4d>(8));\n    VERIFY_RAISES_ASSERT(construct_at_boundary<Vector6d>(8));\n    VERIFY_RAISES_ASSERT(construct_at_boundary<Vector8d>(8));\n    VERIFY_RAISES_ASSERT(construct_at_boundary<Vector10d>(8));\n    VERIFY_RAISES_ASSERT(construct_at_boundary<Vector12d>(8));\n    // Complexes are disabled because the compiler might aggressively vectorize\n    // the initialization of complex coeffs to 0 before we can check for alignedness\n    //VERIFY_RAISES_ASSERT(construct_at_boundary<Vector2cf>(8));\n    VERIFY_RAISES_ASSERT(construct_at_boundary<Vector4i>(8));\n  }\n  for(int b=8; b<EIGEN_MAX_ALIGN_BYTES; b+=8)\n  {\n    if(b<32)  VERIFY_RAISES_ASSERT(construct_at_boundary<Vector8f>(b));\n    if(b<64)  VERIFY_RAISES_ASSERT(construct_at_boundary<Matrix4f>(b));\n    if(b<32)  VERIFY_RAISES_ASSERT(construct_at_boundary<Vector4d>(b));\n    if(b<32)  VERIFY_RAISES_ASSERT(construct_at_boundary<Matrix2d>(b));\n    if(b<128) VERIFY_RAISES_ASSERT(construct_at_boundary<Matrix4d>(b));\n    //if(b<32)  VERIFY_RAISES_ASSERT(construct_at_boundary<Vector2cd>(b));\n  }\n#endif\n}\n\nEIGEN_DECLARE_TEST(unalignedassert)\n{\n  CALL_SUBTEST(unalignedassert());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/unalignedcount.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\nstatic int nb_load;\nstatic int nb_loadu;\nstatic int nb_store;\nstatic int nb_storeu;\n\n#define EIGEN_DEBUG_ALIGNED_LOAD    { nb_load++;    }\n#define EIGEN_DEBUG_UNALIGNED_LOAD  { nb_loadu++;   }\n#define EIGEN_DEBUG_ALIGNED_STORE   { nb_store++;   }\n#define EIGEN_DEBUG_UNALIGNED_STORE { nb_storeu++;  }\n\n#define VERIFY_ALIGNED_UNALIGNED_COUNT(XPR,AL,UL,AS,US) {\\\n    nb_load = nb_loadu = nb_store = nb_storeu = 0; \\\n    XPR; \\\n    if(!(nb_load==AL && nb_loadu==UL && nb_store==AS && nb_storeu==US)) \\\n      std::cerr << \" >> \" << nb_load << \", \" << nb_loadu << \", \" << nb_store << \", \" << nb_storeu << \"\\n\"; \\\n    VERIFY( (#XPR) && nb_load==AL && nb_loadu==UL && nb_store==AS && nb_storeu==US ); \\\n  }\n\n\n#include \"main.h\"\n\nEIGEN_DECLARE_TEST(unalignedcount)\n{\n  #if defined(EIGEN_VECTORIZE_AVX512)\n  VectorXf a(48), b(48);\n  VERIFY_ALIGNED_UNALIGNED_COUNT(a += b, 6, 0, 3, 0);\n  VERIFY_ALIGNED_UNALIGNED_COUNT(a.segment(0,48) += b.segment(0,48), 3, 3, 3, 0);\n  VERIFY_ALIGNED_UNALIGNED_COUNT(a.segment(0,48) -= b.segment(0,48), 3, 3, 3, 0);\n  VERIFY_ALIGNED_UNALIGNED_COUNT(a.segment(0,48) *= 3.5, 3, 0, 3, 0);\n  VERIFY_ALIGNED_UNALIGNED_COUNT(a.segment(0,48) /= 3.5, 3, 0, 3, 0);\n  #elif defined(EIGEN_VECTORIZE_AVX)\n  VectorXf a(40), b(40);\n  VERIFY_ALIGNED_UNALIGNED_COUNT(a += b, 10, 0, 5, 0);\n  VERIFY_ALIGNED_UNALIGNED_COUNT(a.segment(0,40) += b.segment(0,40), 5, 5, 5, 0);\n  VERIFY_ALIGNED_UNALIGNED_COUNT(a.segment(0,40) -= b.segment(0,40), 5, 5, 5, 0);\n  VERIFY_ALIGNED_UNALIGNED_COUNT(a.segment(0,40) *= 3.5, 5, 0, 5, 0);\n  VERIFY_ALIGNED_UNALIGNED_COUNT(a.segment(0,40) /= 3.5, 5, 0, 5, 0);\n  #elif defined(EIGEN_VECTORIZE_SSE)\n  VectorXf a(40), b(40);\n  VERIFY_ALIGNED_UNALIGNED_COUNT(a += b, 20, 0, 10, 0);\n  VERIFY_ALIGNED_UNALIGNED_COUNT(a.segment(0,40) += b.segment(0,40), 10, 10, 10, 0);\n  VERIFY_ALIGNED_UNALIGNED_COUNT(a.segment(0,40) -= b.segment(0,40), 10, 10, 10, 0);\n  VERIFY_ALIGNED_UNALIGNED_COUNT(a.segment(0,40) *= 3.5, 10, 0, 10, 0);\n  VERIFY_ALIGNED_UNALIGNED_COUNT(a.segment(0,40) /= 3.5, 10, 0, 10, 0);\n  #else\n  // The following line is to eliminate \"variable not used\" warnings\n  nb_load = nb_loadu = nb_store = nb_storeu = 0;\n  int a(0), b(0);\n  VERIFY(a==b);\n  #endif\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/upperbidiagonalization.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <Eigen/SVD>\n\ntemplate<typename MatrixType> void upperbidiag(const MatrixType& m)\n{\n  const Index rows = m.rows();\n  const Index cols = m.cols();\n\n  typedef Matrix<typename MatrixType::RealScalar, MatrixType::RowsAtCompileTime,  MatrixType::ColsAtCompileTime> RealMatrixType;\n  typedef Matrix<typename MatrixType::Scalar, MatrixType::ColsAtCompileTime,  MatrixType::RowsAtCompileTime> TransposeMatrixType;\n\n  MatrixType a = MatrixType::Random(rows,cols);\n  internal::UpperBidiagonalization<MatrixType> ubd(a);\n  RealMatrixType b(rows, cols);\n  b.setZero();\n  b.block(0,0,cols,cols) = ubd.bidiagonal();\n  MatrixType c = ubd.householderU() * b * ubd.householderV().adjoint();\n  VERIFY_IS_APPROX(a,c);\n  TransposeMatrixType d = ubd.householderV() * b.adjoint() * ubd.householderU().adjoint();\n  VERIFY_IS_APPROX(a.adjoint(),d);\n}\n\nEIGEN_DECLARE_TEST(upperbidiagonalization)\n{\n  for(int i = 0; i < g_repeat; i++) {\n   CALL_SUBTEST_1( upperbidiag(MatrixXf(3,3)) );\n   CALL_SUBTEST_2( upperbidiag(MatrixXd(17,12)) );\n   CALL_SUBTEST_3( upperbidiag(MatrixXcf(20,20)) );\n   CALL_SUBTEST_4( upperbidiag(Matrix<std::complex<double>,Dynamic,Dynamic,RowMajor>(16,15)) );\n   CALL_SUBTEST_5( upperbidiag(Matrix<float,6,4>()) );\n   CALL_SUBTEST_6( upperbidiag(Matrix<float,5,5>()) );\n   CALL_SUBTEST_7( upperbidiag(Matrix<double,4,3>()) );\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/vectorization_logic.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifdef EIGEN_TEST_PART_1\n#define EIGEN_UNALIGNED_VECTORIZE 1\n#endif\n\n#ifdef EIGEN_TEST_PART_2\n#define EIGEN_UNALIGNED_VECTORIZE 0\n#endif\n\n#ifdef EIGEN_DEFAULT_TO_ROW_MAJOR\n#undef EIGEN_DEFAULT_TO_ROW_MAJOR\n#endif\n#define EIGEN_DEBUG_ASSIGN\n#include \"main.h\"\n#include <typeinfo>\n\n// Disable \"ignoring attributes on template argument\"\n// for packet_traits<Packet*>\n// => The only workaround would be to wrap _m128 and the likes\n//    within wrappers.\n#if EIGEN_GNUC_AT_LEAST(6,0)\n    #pragma GCC diagnostic ignored \"-Wignored-attributes\"\n#endif\n\nusing internal::demangle_flags;\nusing internal::demangle_traversal;\nusing internal::demangle_unrolling;\n\ntemplate<typename Dst, typename Src>\nbool test_assign(const Dst&, const Src&, int traversal, int unrolling)\n{\n  EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(Dst,Src);\n  typedef internal::copy_using_evaluator_traits<internal::evaluator<Dst>,internal::evaluator<Src>, internal::assign_op<typename Dst::Scalar,typename Src::Scalar> > traits;\n  bool res = traits::Traversal==traversal;\n  if(unrolling==InnerUnrolling+CompleteUnrolling)\n    res = res && (int(traits::Unrolling)==InnerUnrolling || int(traits::Unrolling)==CompleteUnrolling);\n  else\n    res = res && int(traits::Unrolling)==unrolling;\n  if(!res)\n  {\n    std::cerr << \"Src: \" << demangle_flags(Src::Flags) << std::endl;\n    std::cerr << \"     \" << demangle_flags(internal::evaluator<Src>::Flags) << std::endl;\n    std::cerr << \"Dst: \" << demangle_flags(Dst::Flags) << std::endl;\n    std::cerr << \"     \" << demangle_flags(internal::evaluator<Dst>::Flags) << std::endl;\n    traits::debug();\n    std::cerr << \" Expected Traversal == \" << demangle_traversal(traversal)\n              << \" got \" << demangle_traversal(traits::Traversal) << \"\\n\";\n    std::cerr << \" Expected Unrolling == \" << demangle_unrolling(unrolling)\n              << \" got \" << demangle_unrolling(traits::Unrolling) << \"\\n\";\n  }\n  return res;\n}\n\ntemplate<typename Dst, typename Src>\nbool test_assign(int traversal, int unrolling)\n{\n  EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(Dst,Src);\n  typedef internal::copy_using_evaluator_traits<internal::evaluator<Dst>,internal::evaluator<Src>, internal::assign_op<typename Dst::Scalar,typename Src::Scalar> > traits;\n  bool res = traits::Traversal==traversal && traits::Unrolling==unrolling;\n  if(!res)\n  {\n    std::cerr << \"Src: \" << demangle_flags(Src::Flags) << std::endl;\n    std::cerr << \"     \" << demangle_flags(internal::evaluator<Src>::Flags) << std::endl;\n    std::cerr << \"Dst: \" << demangle_flags(Dst::Flags) << std::endl;\n    std::cerr << \"     \" << demangle_flags(internal::evaluator<Dst>::Flags) << std::endl;\n    traits::debug();\n    std::cerr << \" Expected Traversal == \" << demangle_traversal(traversal)\n              << \" got \" << demangle_traversal(traits::Traversal) << \"\\n\";\n    std::cerr << \" Expected Unrolling == \" << demangle_unrolling(unrolling)\n              << \" got \" << demangle_unrolling(traits::Unrolling) << \"\\n\";\n  }\n  return res;\n}\n\ntemplate<typename Xpr>\nbool test_redux(const Xpr&, int traversal, int unrolling)\n{\n  typedef typename Xpr::Scalar Scalar;\n  typedef internal::redux_traits<internal::scalar_sum_op<Scalar,Scalar>,internal::redux_evaluator<Xpr> > traits;\n  \n  bool res = traits::Traversal==traversal && traits::Unrolling==unrolling;\n  if(!res)\n  {\n    std::cerr << demangle_flags(Xpr::Flags) << std::endl;\n    std::cerr << demangle_flags(internal::evaluator<Xpr>::Flags) << std::endl;\n    traits::debug();\n    \n    std::cerr << \" Expected Traversal == \" << demangle_traversal(traversal)\n              << \" got \" << demangle_traversal(traits::Traversal) << \"\\n\";\n    std::cerr << \" Expected Unrolling == \" << demangle_unrolling(unrolling)\n              << \" got \" << demangle_unrolling(traits::Unrolling) << \"\\n\";\n  }\n  return res;\n}\n\ntemplate<typename Scalar, bool Enable = internal::packet_traits<Scalar>::Vectorizable>\nstruct vectorization_logic\n{\n  typedef internal::packet_traits<Scalar> PacketTraits;\n  \n  typedef typename internal::packet_traits<Scalar>::type PacketType;\n  typedef typename internal::unpacket_traits<PacketType>::half HalfPacketType;\n  enum {\n    PacketSize = internal::unpacket_traits<PacketType>::size,\n    HalfPacketSize = internal::unpacket_traits<HalfPacketType>::size\n  };\n  static void run()\n  {\n    \n    typedef Matrix<Scalar,PacketSize,1> Vector1;\n    typedef Matrix<Scalar,Dynamic,1> VectorX;\n    typedef Matrix<Scalar,Dynamic,Dynamic> MatrixXX;\n    typedef Matrix<Scalar,PacketSize,PacketSize> Matrix11;\n    typedef Matrix<Scalar,(Matrix11::Flags&RowMajorBit)?8:2*PacketSize,(Matrix11::Flags&RowMajorBit)?2*PacketSize:8>   Matrix22;\n    typedef Matrix<Scalar,(Matrix11::Flags&RowMajorBit)?16:4*PacketSize,(Matrix11::Flags&RowMajorBit)?4*PacketSize:16> Matrix44;\n    typedef Matrix<Scalar,(Matrix11::Flags&RowMajorBit)?16:4*PacketSize,(Matrix11::Flags&RowMajorBit)?4*PacketSize:16,DontAlign|EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION> Matrix44u;\n    typedef Matrix<Scalar,4*PacketSize,4*PacketSize,ColMajor> Matrix44c;\n    typedef Matrix<Scalar,4*PacketSize,4*PacketSize,RowMajor> Matrix44r;\n\n    typedef Matrix<Scalar,\n        (PacketSize==16 ? 8 : PacketSize==8 ? 4 : PacketSize==4 ? 2 : PacketSize==2 ? 1 : /*PacketSize==1 ?*/ 1),\n        (PacketSize==16 ? 2 : PacketSize==8 ? 2 : PacketSize==4 ? 2 : PacketSize==2 ? 2 : /*PacketSize==1 ?*/ 1)\n      > Matrix1;\n\n    typedef Matrix<Scalar,\n        (PacketSize==16 ? 8 : PacketSize==8 ? 4 : PacketSize==4 ? 2 : PacketSize==2 ? 1 : /*PacketSize==1 ?*/ 1),\n        (PacketSize==16 ? 2 : PacketSize==8 ? 2 : PacketSize==4 ? 2 : PacketSize==2 ? 2 : /*PacketSize==1 ?*/ 1),\n      DontAlign|((Matrix1::Flags&RowMajorBit)?RowMajor:ColMajor)> Matrix1u;\n\n    // this type is made such that it can only be vectorized when viewed as a linear 1D vector\n    typedef Matrix<Scalar,\n        (PacketSize==16 ?  4 : PacketSize==8 ? 4 : PacketSize==4 ? 6 : PacketSize==2 ? ((Matrix11::Flags&RowMajorBit)?2:3) : /*PacketSize==1 ?*/ 1),\n        (PacketSize==16 ? 12 : PacketSize==8 ? 6 : PacketSize==4 ? 2 : PacketSize==2 ? ((Matrix11::Flags&RowMajorBit)?3:2) : /*PacketSize==1 ?*/ 3)\n      > Matrix3;\n    \n    #if !EIGEN_GCC_AND_ARCH_DOESNT_WANT_STACK_ALIGNMENT\n    VERIFY(test_assign(Vector1(),Vector1(),\n      InnerVectorizedTraversal,CompleteUnrolling));\n    VERIFY(test_assign(Vector1(),Vector1()+Vector1(),\n      InnerVectorizedTraversal,CompleteUnrolling));\n    VERIFY(test_assign(Vector1(),Vector1().cwiseProduct(Vector1()),\n      InnerVectorizedTraversal,CompleteUnrolling));\n    VERIFY(test_assign(Vector1(),Vector1().template cast<Scalar>(),\n      InnerVectorizedTraversal,CompleteUnrolling));\n\n\n    VERIFY(test_assign(Vector1(),Vector1(),\n      InnerVectorizedTraversal,CompleteUnrolling));\n    VERIFY(test_assign(Vector1(),Vector1()+Vector1(),\n      InnerVectorizedTraversal,CompleteUnrolling));\n    VERIFY(test_assign(Vector1(),Vector1().cwiseProduct(Vector1()),\n      InnerVectorizedTraversal,CompleteUnrolling));\n\n    VERIFY(test_assign(Matrix44(),Matrix44()+Matrix44(),\n      InnerVectorizedTraversal,InnerUnrolling));\n\n    VERIFY(test_assign(Matrix44u(),Matrix44()+Matrix44(),\n      EIGEN_UNALIGNED_VECTORIZE ? InnerVectorizedTraversal : LinearTraversal,\n      EIGEN_UNALIGNED_VECTORIZE ? InnerUnrolling : NoUnrolling));\n\n    VERIFY(test_assign(Matrix1(),Matrix1()+Matrix1(),\n      (Matrix1::InnerSizeAtCompileTime % PacketSize)==0 ? InnerVectorizedTraversal : LinearVectorizedTraversal,\n      CompleteUnrolling));\n\n    VERIFY(test_assign(Matrix1u(),Matrix1()+Matrix1(),\n      EIGEN_UNALIGNED_VECTORIZE ? ((Matrix1::InnerSizeAtCompileTime % PacketSize)==0 ? InnerVectorizedTraversal : LinearVectorizedTraversal)\n                                : LinearTraversal, CompleteUnrolling));\n\n    VERIFY(test_assign(Matrix44c().col(1),Matrix44c().col(2)+Matrix44c().col(3),\n      InnerVectorizedTraversal,CompleteUnrolling));\n\n    VERIFY(test_assign(Matrix44r().row(2),Matrix44r().row(1)+Matrix44r().row(1),\n      InnerVectorizedTraversal,CompleteUnrolling));\n\n    if(PacketSize>1)\n    {\n      typedef Matrix<Scalar,3,3,ColMajor> Matrix33c;\n      typedef Matrix<Scalar,3,1,ColMajor> Vector3;\n      VERIFY(test_assign(Matrix33c().row(2),Matrix33c().row(1)+Matrix33c().row(1),\n        LinearTraversal,CompleteUnrolling));\n      VERIFY(test_assign(Vector3(),Vector3()+Vector3(),\n        sizeof(Scalar)==16 ? InnerVectorizedTraversal : (EIGEN_UNALIGNED_VECTORIZE ? LinearVectorizedTraversal : LinearTraversal), CompleteUnrolling));\n      VERIFY(test_assign(Matrix33c().col(0),Matrix33c().col(1)+Matrix33c().col(1),\n        EIGEN_UNALIGNED_VECTORIZE ? (sizeof(Scalar)==16 ? InnerVectorizedTraversal : LinearVectorizedTraversal)\n                                  : (sizeof(Scalar)==16 ? SliceVectorizedTraversal : LinearTraversal),\n        ((!EIGEN_UNALIGNED_VECTORIZE) && (sizeof(Scalar)==16)) ? NoUnrolling : CompleteUnrolling));\n\n      VERIFY(test_assign(Matrix3(),Matrix3().cwiseProduct(Matrix3()),\n        LinearVectorizedTraversal,CompleteUnrolling));\n\n      VERIFY(test_assign(Matrix<Scalar,17,17>(),Matrix<Scalar,17,17>()+Matrix<Scalar,17,17>(),\n        sizeof(Scalar)==16        ? InnerVectorizedTraversal  :\n        EIGEN_UNALIGNED_VECTORIZE ? LinearVectorizedTraversal :\n                                    LinearTraversal,\n        NoUnrolling));\n\n      VERIFY(test_assign(Matrix11(), Matrix11()+Matrix11(),InnerVectorizedTraversal,CompleteUnrolling));\n\n\n      VERIFY(test_assign(Matrix11(),Matrix<Scalar,21,21>().template block<PacketSize,PacketSize>(2,3)+Matrix<Scalar,21,21>().template block<PacketSize,PacketSize>(3,2),\n        (EIGEN_UNALIGNED_VECTORIZE) ? InnerVectorizedTraversal : DefaultTraversal, CompleteUnrolling|InnerUnrolling));\n\n      VERIFY(test_assign(Vector1(),Matrix11()*Vector1(),\n                         InnerVectorizedTraversal,CompleteUnrolling));\n\n      VERIFY(test_assign(Matrix11(),Matrix11().lazyProduct(Matrix11()),\n                         InnerVectorizedTraversal,InnerUnrolling+CompleteUnrolling));\n    }\n\n    VERIFY(test_redux(Vector1(),\n      LinearVectorizedTraversal,CompleteUnrolling));\n\n    VERIFY(test_redux(Vector1().array()*Vector1().array(),\n      LinearVectorizedTraversal,CompleteUnrolling));\n\n    VERIFY(test_redux((Vector1().array()*Vector1().array()).col(0),\n      LinearVectorizedTraversal,CompleteUnrolling));\n\n    VERIFY(test_redux(Matrix<Scalar,PacketSize,3>(),\n      LinearVectorizedTraversal,CompleteUnrolling));\n\n    VERIFY(test_redux(Matrix3(),\n      LinearVectorizedTraversal,CompleteUnrolling));\n\n    VERIFY(test_redux(Matrix44(),\n      LinearVectorizedTraversal,NoUnrolling));\n\n    if(PacketSize>1) {\n      VERIFY(test_redux(Matrix44().template block<(Matrix1::Flags&RowMajorBit)?4:PacketSize,(Matrix1::Flags&RowMajorBit)?PacketSize:4>(1,2),\n        SliceVectorizedTraversal,CompleteUnrolling));\n\n      VERIFY(test_redux(Matrix44().template block<(Matrix1::Flags&RowMajorBit)?2:PacketSize,(Matrix1::Flags&RowMajorBit)?PacketSize:2>(1,2),\n        DefaultTraversal,CompleteUnrolling));\n    }\n\n    VERIFY(test_redux(Matrix44c().template block<2*PacketSize,1>(1,2),\n      LinearVectorizedTraversal,CompleteUnrolling));\n\n    VERIFY(test_redux(Matrix44r().template block<1,2*PacketSize>(2,1),\n      LinearVectorizedTraversal,CompleteUnrolling));\n\n    VERIFY((test_assign<\n            Map<Matrix22, AlignedMax, OuterStride<3*PacketSize> >,\n            Matrix22\n            >(InnerVectorizedTraversal,CompleteUnrolling)));\n\n    VERIFY((test_assign<\n            Map<Matrix<Scalar,EIGEN_PLAIN_ENUM_MAX(2,PacketSize),EIGEN_PLAIN_ENUM_MAX(2,PacketSize)>, AlignedMax, InnerStride<3*PacketSize> >,\n            Matrix<Scalar,EIGEN_PLAIN_ENUM_MAX(2,PacketSize),EIGEN_PLAIN_ENUM_MAX(2,PacketSize)>\n            >(DefaultTraversal,PacketSize>=8?InnerUnrolling:CompleteUnrolling)));\n\n    VERIFY((test_assign(Matrix11(), Matrix<Scalar,PacketSize,EIGEN_PLAIN_ENUM_MIN(2,PacketSize)>()*Matrix<Scalar,EIGEN_PLAIN_ENUM_MIN(2,PacketSize),PacketSize>(),\n                        InnerVectorizedTraversal, CompleteUnrolling)));\n    #endif\n\n    VERIFY(test_assign(MatrixXX(10,10),MatrixXX(20,20).block(10,10,2,3),\n      SliceVectorizedTraversal,NoUnrolling));\n\n    VERIFY(test_redux(VectorX(10),\n      LinearVectorizedTraversal,NoUnrolling));\n  }\n};\n\ntemplate<typename Scalar> struct vectorization_logic<Scalar,false>\n{\n  static void run() {}\n};\n\ntemplate<typename Scalar, bool Enable = !internal::is_same<typename internal::unpacket_traits<typename internal::packet_traits<Scalar>::type>::half,\n                                                           typename internal::packet_traits<Scalar>::type>::value >\nstruct vectorization_logic_half\n{\n  typedef internal::packet_traits<Scalar> PacketTraits;\n  typedef typename internal::unpacket_traits<typename internal::packet_traits<Scalar>::type>::half PacketType;\n  enum {\n    PacketSize = internal::unpacket_traits<PacketType>::size\n  };\n  static void run()\n  {\n    \n    typedef Matrix<Scalar,PacketSize,1> Vector1;\n    typedef Matrix<Scalar,PacketSize,PacketSize> Matrix11;\n    typedef Matrix<Scalar,5*PacketSize,7,ColMajor> Matrix57;\n    typedef Matrix<Scalar,3*PacketSize,5,ColMajor> Matrix35;\n    typedef Matrix<Scalar,5*PacketSize,7,DontAlign|ColMajor> Matrix57u;\n\n    typedef Matrix<Scalar,\n        (PacketSize==16 ? 8 : PacketSize==8 ? 4 : PacketSize==4 ? 2 : PacketSize==2 ? 1 : /*PacketSize==1 ?*/ 1),\n        (PacketSize==16 ? 2 : PacketSize==8 ? 2 : PacketSize==4 ? 2 : PacketSize==2 ? 2 : /*PacketSize==1 ?*/ 1)\n      > Matrix1;\n\n    typedef Matrix<Scalar,\n        (PacketSize==16 ? 8 : PacketSize==8 ? 4 : PacketSize==4 ? 2 : PacketSize==2 ? 1 : /*PacketSize==1 ?*/ 1),\n        (PacketSize==16 ? 2 : PacketSize==8 ? 2 : PacketSize==4 ? 2 : PacketSize==2 ? 2 : /*PacketSize==1 ?*/ 1),\n      DontAlign|((Matrix1::Flags&RowMajorBit)?RowMajor:ColMajor)> Matrix1u;\n\n    // this type is made such that it can only be vectorized when viewed as a linear 1D vector\n    typedef Matrix<Scalar,\n        (PacketSize==16 ?  4 : PacketSize==8 ? 4 : PacketSize==4 ? 6 : PacketSize==2 ? ((Matrix11::Flags&RowMajorBit)?2:3) : /*PacketSize==1 ?*/ 1),\n        (PacketSize==16 ? 12 : PacketSize==8 ? 6 : PacketSize==4 ? 2 : PacketSize==2 ? ((Matrix11::Flags&RowMajorBit)?3:2) : /*PacketSize==1 ?*/ 3)\n      > Matrix3;\n    \n    #if !EIGEN_GCC_AND_ARCH_DOESNT_WANT_STACK_ALIGNMENT\n    VERIFY(test_assign(Vector1(),Vector1(),\n      InnerVectorizedTraversal,CompleteUnrolling));\n    VERIFY(test_assign(Vector1(),Vector1()+Vector1(),\n      InnerVectorizedTraversal,CompleteUnrolling));\n    VERIFY(test_assign(Vector1(),Vector1().template segment<PacketSize>(0).derived(),\n      EIGEN_UNALIGNED_VECTORIZE ? InnerVectorizedTraversal : LinearVectorizedTraversal,CompleteUnrolling));\n    VERIFY(test_assign(Vector1(),Scalar(2.1)*Vector1()-Vector1(),\n      InnerVectorizedTraversal,CompleteUnrolling));\n    VERIFY(test_assign(Vector1(),(Scalar(2.1)*Vector1().template segment<PacketSize>(0)-Vector1().template segment<PacketSize>(0)).derived(),\n      EIGEN_UNALIGNED_VECTORIZE ? InnerVectorizedTraversal : LinearVectorizedTraversal,CompleteUnrolling));\n    VERIFY(test_assign(Vector1(),Vector1().cwiseProduct(Vector1()),\n      InnerVectorizedTraversal,CompleteUnrolling));\n    VERIFY(test_assign(Vector1(),Vector1().template cast<Scalar>(),\n      InnerVectorizedTraversal,CompleteUnrolling));\n\n\n    VERIFY(test_assign(Vector1(),Vector1(),\n      InnerVectorizedTraversal,CompleteUnrolling));\n    VERIFY(test_assign(Vector1(),Vector1()+Vector1(),\n      InnerVectorizedTraversal,CompleteUnrolling));\n    VERIFY(test_assign(Vector1(),Vector1().cwiseProduct(Vector1()),\n      InnerVectorizedTraversal,CompleteUnrolling));\n\n    VERIFY(test_assign(Matrix57(),Matrix57()+Matrix57(),\n      InnerVectorizedTraversal,InnerUnrolling));\n\n    VERIFY(test_assign(Matrix57u(),Matrix57()+Matrix57(),\n      EIGEN_UNALIGNED_VECTORIZE ? InnerVectorizedTraversal : LinearTraversal,\n      EIGEN_UNALIGNED_VECTORIZE ? InnerUnrolling : NoUnrolling));\n\n    VERIFY(test_assign(Matrix1u(),Matrix1()+Matrix1(),\n      EIGEN_UNALIGNED_VECTORIZE ? ((Matrix1::InnerSizeAtCompileTime % PacketSize)==0 ? InnerVectorizedTraversal : LinearVectorizedTraversal) : LinearTraversal,CompleteUnrolling));\n        \n    if(PacketSize>1)\n    {\n      typedef Matrix<Scalar,3,3,ColMajor> Matrix33c;\n      VERIFY(test_assign(Matrix33c().row(2),Matrix33c().row(1)+Matrix33c().row(1),\n        LinearTraversal,CompleteUnrolling));\n      VERIFY(test_assign(Matrix33c().col(0),Matrix33c().col(1)+Matrix33c().col(1),\n        EIGEN_UNALIGNED_VECTORIZE ? (sizeof(Scalar)==16 ? InnerVectorizedTraversal : LinearVectorizedTraversal)\n                                  : (sizeof(Scalar)==16 ? SliceVectorizedTraversal : LinearTraversal),\n        ((!EIGEN_UNALIGNED_VECTORIZE) && (sizeof(Scalar)==16)) ? NoUnrolling : CompleteUnrolling));\n              \n      VERIFY(test_assign(Matrix3(),Matrix3().cwiseQuotient(Matrix3()),\n        PacketTraits::HasDiv ? LinearVectorizedTraversal : LinearTraversal,CompleteUnrolling));\n        \n      VERIFY(test_assign(Matrix<Scalar,17,17>(),Matrix<Scalar,17,17>()+Matrix<Scalar,17,17>(),\n        sizeof(Scalar)==16 ? InnerVectorizedTraversal : (EIGEN_UNALIGNED_VECTORIZE ? LinearVectorizedTraversal : LinearTraversal),\n        NoUnrolling));\n        \n      VERIFY(test_assign(Matrix11(),Matrix<Scalar,17,17>().template block<PacketSize,PacketSize>(2,3)+Matrix<Scalar,17,17>().template block<PacketSize,PacketSize>(8,4),\n        EIGEN_UNALIGNED_VECTORIZE ? InnerVectorizedTraversal : DefaultTraversal,InnerUnrolling+CompleteUnrolling));\n  \n\n      VERIFY(test_assign(Vector1(),Matrix11()*Vector1(),\n                         InnerVectorizedTraversal,CompleteUnrolling));\n\n      VERIFY(test_assign(Matrix11(),Matrix11().lazyProduct(Matrix11()),\n                         InnerVectorizedTraversal,InnerUnrolling+CompleteUnrolling));\n    }\n    \n    VERIFY(test_redux(Vector1(),\n      LinearVectorizedTraversal,CompleteUnrolling));\n\n    VERIFY(test_redux(Matrix<Scalar,PacketSize,3>(),\n      LinearVectorizedTraversal,CompleteUnrolling));\n\n    VERIFY(test_redux(Matrix3(),\n      LinearVectorizedTraversal,CompleteUnrolling));\n\n    VERIFY(test_redux(Matrix35(),\n      LinearVectorizedTraversal,CompleteUnrolling));\n\n    VERIFY(test_redux(Matrix57().template block<PacketSize==1?2:PacketSize,3>(1,0),\n      SliceVectorizedTraversal,CompleteUnrolling));\n\n    if(PacketSize>1) {\n      VERIFY(test_redux(Matrix57().template block<PacketSize,2>(1,0),\n        DefaultTraversal,CompleteUnrolling));\n    }\n\n    VERIFY((test_assign<\n            Map<Matrix<Scalar,EIGEN_PLAIN_ENUM_MAX(2,PacketSize),EIGEN_PLAIN_ENUM_MAX(2,PacketSize)>, AlignedMax, InnerStride<3*PacketSize> >,\n            Matrix<Scalar,EIGEN_PLAIN_ENUM_MAX(2,PacketSize),EIGEN_PLAIN_ENUM_MAX(2,PacketSize)>\n            >(DefaultTraversal,PacketSize>4?InnerUnrolling:CompleteUnrolling)));\n\n    VERIFY((test_assign(Matrix57(), Matrix<Scalar,5*PacketSize,3>()*Matrix<Scalar,3,7>(),\n                        InnerVectorizedTraversal, InnerUnrolling+CompleteUnrolling)));\n    #endif\n  }\n};\n\ntemplate<typename Scalar> struct vectorization_logic_half<Scalar,false>\n{\n  static void run() {}\n};\n\nEIGEN_DECLARE_TEST(vectorization_logic)\n{\n\n#ifdef EIGEN_VECTORIZE\n\n  CALL_SUBTEST( vectorization_logic<int>::run() );\n  CALL_SUBTEST( vectorization_logic<float>::run() );\n  CALL_SUBTEST( vectorization_logic<double>::run() );\n  CALL_SUBTEST( vectorization_logic<std::complex<float> >::run() );\n  CALL_SUBTEST( vectorization_logic<std::complex<double> >::run() );\n  \n  CALL_SUBTEST( vectorization_logic_half<int>::run() );\n  CALL_SUBTEST( vectorization_logic_half<float>::run() );\n  CALL_SUBTEST( vectorization_logic_half<double>::run() );\n  CALL_SUBTEST( vectorization_logic_half<std::complex<float> >::run() );\n  CALL_SUBTEST( vectorization_logic_half<std::complex<double> >::run() );\n  \n  if(internal::packet_traits<float>::Vectorizable)\n  {\n    VERIFY(test_assign(Matrix<float,3,3>(),Matrix<float,3,3>()+Matrix<float,3,3>(),\n      EIGEN_UNALIGNED_VECTORIZE ? LinearVectorizedTraversal : LinearTraversal,CompleteUnrolling));\n      \n    VERIFY(test_redux(Matrix<float,5,2>(),\n      EIGEN_UNALIGNED_VECTORIZE ? LinearVectorizedTraversal : DefaultTraversal,CompleteUnrolling));\n  }\n  \n  if(internal::packet_traits<double>::Vectorizable)\n  {\n    VERIFY(test_assign(Matrix<double,3,3>(),Matrix<double,3,3>()+Matrix<double,3,3>(),\n      EIGEN_UNALIGNED_VECTORIZE ? LinearVectorizedTraversal : LinearTraversal,CompleteUnrolling));\n    \n    VERIFY(test_redux(Matrix<double,7,3>(),\n      EIGEN_UNALIGNED_VECTORIZE ? LinearVectorizedTraversal : DefaultTraversal,CompleteUnrolling));\n  }\n#endif // EIGEN_VECTORIZE\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/vectorwiseop.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2011 Benoit Jacob <jacob.benoit.1@gmail.com>\n// Copyright (C) 2015 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define TEST_ENABLE_TEMPORARY_TRACKING\n#define EIGEN_NO_STATIC_ASSERT\n\n#include \"main.h\"\n\ntemplate<typename ArrayType> void vectorwiseop_array(const ArrayType& m)\n{\n  typedef typename ArrayType::Scalar Scalar;\n  typedef Array<Scalar, ArrayType::RowsAtCompileTime, 1> ColVectorType;\n  typedef Array<Scalar, 1, ArrayType::ColsAtCompileTime> RowVectorType;\n\n  Index rows = m.rows();\n  Index cols = m.cols();\n  Index r = internal::random<Index>(0, rows-1),\n        c = internal::random<Index>(0, cols-1);\n\n  ArrayType m1 = ArrayType::Random(rows, cols),\n            m2(rows, cols),\n            m3(rows, cols);\n\n  ColVectorType colvec = ColVectorType::Random(rows);\n  RowVectorType rowvec = RowVectorType::Random(cols);\n\n  // test addition\n\n  m2 = m1;\n  m2.colwise() += colvec;\n  VERIFY_IS_APPROX(m2, m1.colwise() + colvec);\n  VERIFY_IS_APPROX(m2.col(c), m1.col(c) + colvec);\n\n  VERIFY_RAISES_ASSERT(m2.colwise() += colvec.transpose());\n  VERIFY_RAISES_ASSERT(m1.colwise() + colvec.transpose());\n\n  m2 = m1;\n  m2.rowwise() += rowvec;\n  VERIFY_IS_APPROX(m2, m1.rowwise() + rowvec);\n  VERIFY_IS_APPROX(m2.row(r), m1.row(r) + rowvec);\n\n  VERIFY_RAISES_ASSERT(m2.rowwise() += rowvec.transpose());\n  VERIFY_RAISES_ASSERT(m1.rowwise() + rowvec.transpose());\n\n  // test substraction\n\n  m2 = m1;\n  m2.colwise() -= colvec;\n  VERIFY_IS_APPROX(m2, m1.colwise() - colvec);\n  VERIFY_IS_APPROX(m2.col(c), m1.col(c) - colvec);\n\n  VERIFY_RAISES_ASSERT(m2.colwise() -= colvec.transpose());\n  VERIFY_RAISES_ASSERT(m1.colwise() - colvec.transpose());\n\n  m2 = m1;\n  m2.rowwise() -= rowvec;\n  VERIFY_IS_APPROX(m2, m1.rowwise() - rowvec);\n  VERIFY_IS_APPROX(m2.row(r), m1.row(r) - rowvec);\n\n  VERIFY_RAISES_ASSERT(m2.rowwise() -= rowvec.transpose());\n  VERIFY_RAISES_ASSERT(m1.rowwise() - rowvec.transpose());\n\n  // test multiplication\n\n  m2 = m1;\n  m2.colwise() *= colvec;\n  VERIFY_IS_APPROX(m2, m1.colwise() * colvec);\n  VERIFY_IS_APPROX(m2.col(c), m1.col(c) * colvec);\n\n  VERIFY_RAISES_ASSERT(m2.colwise() *= colvec.transpose());\n  VERIFY_RAISES_ASSERT(m1.colwise() * colvec.transpose());\n\n  m2 = m1;\n  m2.rowwise() *= rowvec;\n  VERIFY_IS_APPROX(m2, m1.rowwise() * rowvec);\n  VERIFY_IS_APPROX(m2.row(r), m1.row(r) * rowvec);\n\n  VERIFY_RAISES_ASSERT(m2.rowwise() *= rowvec.transpose());\n  VERIFY_RAISES_ASSERT(m1.rowwise() * rowvec.transpose());\n\n  // test quotient\n\n  m2 = m1;\n  m2.colwise() /= colvec;\n  VERIFY_IS_APPROX(m2, m1.colwise() / colvec);\n  VERIFY_IS_APPROX(m2.col(c), m1.col(c) / colvec);\n\n  VERIFY_RAISES_ASSERT(m2.colwise() /= colvec.transpose());\n  VERIFY_RAISES_ASSERT(m1.colwise() / colvec.transpose());\n\n  m2 = m1;\n  m2.rowwise() /= rowvec;\n  VERIFY_IS_APPROX(m2, m1.rowwise() / rowvec);\n  VERIFY_IS_APPROX(m2.row(r), m1.row(r) / rowvec);\n\n  VERIFY_RAISES_ASSERT(m2.rowwise() /= rowvec.transpose());\n  VERIFY_RAISES_ASSERT(m1.rowwise() / rowvec.transpose());\n\n  m2 = m1;\n  // yes, there might be an aliasing issue there but \".rowwise() /=\"\n  // is supposed to evaluate \" m2.colwise().sum()\" into a temporary to avoid\n  // evaluating the reduction multiple times\n  if(ArrayType::RowsAtCompileTime>2 || ArrayType::RowsAtCompileTime==Dynamic)\n  {\n    m2.rowwise() /= m2.colwise().sum();\n    VERIFY_IS_APPROX(m2, m1.rowwise() / m1.colwise().sum());\n  }\n\n  // all/any\n  Array<bool,Dynamic,Dynamic> mb(rows,cols);\n  mb = (m1.real()<=0.7).colwise().all();\n  VERIFY( (mb.col(c) == (m1.real().col(c)<=0.7).all()).all() );\n  mb = (m1.real()<=0.7).rowwise().all();\n  VERIFY( (mb.row(r) == (m1.real().row(r)<=0.7).all()).all() );\n\n  mb = (m1.real()>=0.7).colwise().any();\n  VERIFY( (mb.col(c) == (m1.real().col(c)>=0.7).any()).all() );\n  mb = (m1.real()>=0.7).rowwise().any();\n  VERIFY( (mb.row(r) == (m1.real().row(r)>=0.7).any()).all() );\n}\n\ntemplate<typename MatrixType> void vectorwiseop_matrix(const MatrixType& m)\n{\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> ColVectorType;\n  typedef Matrix<Scalar, 1, MatrixType::ColsAtCompileTime> RowVectorType;\n  typedef Matrix<RealScalar, MatrixType::RowsAtCompileTime, 1> RealColVectorType;\n  typedef Matrix<RealScalar, 1, MatrixType::ColsAtCompileTime> RealRowVectorType;\n  typedef Matrix<Scalar,Dynamic,Dynamic> MatrixX;\n\n  Index rows = m.rows();\n  Index cols = m.cols();\n  Index r = internal::random<Index>(0, rows-1),\n        c = internal::random<Index>(0, cols-1);\n\n  MatrixType m1 = MatrixType::Random(rows, cols),\n            m2(rows, cols),\n            m3(rows, cols);\n\n  ColVectorType colvec = ColVectorType::Random(rows);\n  RowVectorType rowvec = RowVectorType::Random(cols);\n  RealColVectorType rcres;\n  RealRowVectorType rrres;\n\n  // test broadcast assignment\n  m2 = m1;\n  m2.colwise() = colvec;\n  for(Index j=0; j<cols; ++j)\n    VERIFY_IS_APPROX(m2.col(j), colvec);\n  m2.rowwise() = rowvec;\n  for(Index i=0; i<rows; ++i)\n    VERIFY_IS_APPROX(m2.row(i), rowvec);\n  if(rows>1)\n    VERIFY_RAISES_ASSERT(m2.colwise() = colvec.transpose());\n  if(cols>1)\n    VERIFY_RAISES_ASSERT(m2.rowwise() = rowvec.transpose());\n\n  // test addition\n\n  m2 = m1;\n  m2.colwise() += colvec;\n  VERIFY_IS_APPROX(m2, m1.colwise() + colvec);\n  VERIFY_IS_APPROX(m2.col(c), m1.col(c) + colvec);\n\n  if(rows>1)\n  {\n    VERIFY_RAISES_ASSERT(m2.colwise() += colvec.transpose());\n    VERIFY_RAISES_ASSERT(m1.colwise() + colvec.transpose());\n  }\n\n  m2 = m1;\n  m2.rowwise() += rowvec;\n  VERIFY_IS_APPROX(m2, m1.rowwise() + rowvec);\n  VERIFY_IS_APPROX(m2.row(r), m1.row(r) + rowvec);\n\n  if(cols>1)\n  {\n    VERIFY_RAISES_ASSERT(m2.rowwise() += rowvec.transpose());\n    VERIFY_RAISES_ASSERT(m1.rowwise() + rowvec.transpose());\n  }\n\n  // test substraction\n\n  m2 = m1;\n  m2.colwise() -= colvec;\n  VERIFY_IS_APPROX(m2, m1.colwise() - colvec);\n  VERIFY_IS_APPROX(m2.col(c), m1.col(c) - colvec);\n\n  if(rows>1)\n  {\n    VERIFY_RAISES_ASSERT(m2.colwise() -= colvec.transpose());\n    VERIFY_RAISES_ASSERT(m1.colwise() - colvec.transpose());\n  }\n\n  m2 = m1;\n  m2.rowwise() -= rowvec;\n  VERIFY_IS_APPROX(m2, m1.rowwise() - rowvec);\n  VERIFY_IS_APPROX(m2.row(r), m1.row(r) - rowvec);\n\n  if(cols>1)\n  {\n    VERIFY_RAISES_ASSERT(m2.rowwise() -= rowvec.transpose());\n    VERIFY_RAISES_ASSERT(m1.rowwise() - rowvec.transpose());\n  }\n\n  // ------ partial reductions ------\n\n  #define TEST_PARTIAL_REDUX_BASIC(FUNC,ROW,COL,PREPROCESS) {                          \\\n    ROW = m1 PREPROCESS .colwise().FUNC ;                                              \\\n    for(Index k=0; k<cols; ++k) VERIFY_IS_APPROX(ROW(k), m1.col(k) PREPROCESS .FUNC ); \\\n    COL = m1 PREPROCESS .rowwise().FUNC ;                                              \\\n    for(Index k=0; k<rows; ++k) VERIFY_IS_APPROX(COL(k), m1.row(k) PREPROCESS .FUNC ); \\\n  }\n\n  TEST_PARTIAL_REDUX_BASIC(sum(),        rowvec,colvec,EIGEN_EMPTY);\n  TEST_PARTIAL_REDUX_BASIC(prod(),       rowvec,colvec,EIGEN_EMPTY);\n  TEST_PARTIAL_REDUX_BASIC(mean(),       rowvec,colvec,EIGEN_EMPTY);\n  TEST_PARTIAL_REDUX_BASIC(minCoeff(),   rrres, rcres, .real());\n  TEST_PARTIAL_REDUX_BASIC(maxCoeff(),   rrres, rcres, .real());\n  TEST_PARTIAL_REDUX_BASIC(norm(),       rrres, rcres, EIGEN_EMPTY);\n  TEST_PARTIAL_REDUX_BASIC(squaredNorm(),rrres, rcres, EIGEN_EMPTY);\n  TEST_PARTIAL_REDUX_BASIC(redux(internal::scalar_sum_op<Scalar,Scalar>()),rowvec,colvec,EIGEN_EMPTY);\n\n  VERIFY_IS_APPROX(m1.cwiseAbs().colwise().sum(), m1.colwise().template lpNorm<1>());\n  VERIFY_IS_APPROX(m1.cwiseAbs().rowwise().sum(), m1.rowwise().template lpNorm<1>());\n  VERIFY_IS_APPROX(m1.cwiseAbs().colwise().maxCoeff(), m1.colwise().template lpNorm<Infinity>());\n  VERIFY_IS_APPROX(m1.cwiseAbs().rowwise().maxCoeff(), m1.rowwise().template lpNorm<Infinity>());\n\n  // regression for bug 1158\n  VERIFY_IS_APPROX(m1.cwiseAbs().colwise().sum().x(), m1.col(0).cwiseAbs().sum());\n\n  // test normalized\n  m2 = m1.colwise().normalized();\n  VERIFY_IS_APPROX(m2.col(c), m1.col(c).normalized());\n  m2 = m1.rowwise().normalized();\n  VERIFY_IS_APPROX(m2.row(r), m1.row(r).normalized());\n\n  // test normalize\n  m2 = m1;\n  m2.colwise().normalize();\n  VERIFY_IS_APPROX(m2.col(c), m1.col(c).normalized());\n  m2 = m1;\n  m2.rowwise().normalize();\n  VERIFY_IS_APPROX(m2.row(r), m1.row(r).normalized());\n\n  // test with partial reduction of products\n  Matrix<Scalar,MatrixType::RowsAtCompileTime,MatrixType::RowsAtCompileTime> m1m1 = m1 * m1.transpose();\n  VERIFY_IS_APPROX( (m1 * m1.transpose()).colwise().sum(), m1m1.colwise().sum());\n  Matrix<Scalar,1,MatrixType::RowsAtCompileTime> tmp(rows);\n  VERIFY_EVALUATION_COUNT( tmp = (m1 * m1.transpose()).colwise().sum(), 1);\n\n  m2 = m1.rowwise() - (m1.colwise().sum()/RealScalar(m1.rows())).eval();\n  m1 = m1.rowwise() - (m1.colwise().sum()/RealScalar(m1.rows()));\n  VERIFY_IS_APPROX( m1, m2 );\n  VERIFY_EVALUATION_COUNT( m2 = (m1.rowwise() - m1.colwise().sum()/RealScalar(m1.rows())), (MatrixType::RowsAtCompileTime!=1 ? 1 : 0) );\n\n  // test empty expressions\n  VERIFY_IS_APPROX(m1.matrix().middleCols(0,0).rowwise().sum().eval(), MatrixX::Zero(rows,1));\n  VERIFY_IS_APPROX(m1.matrix().middleRows(0,0).colwise().sum().eval(), MatrixX::Zero(1,cols));\n  VERIFY_IS_APPROX(m1.matrix().middleCols(0,fix<0>).rowwise().sum().eval(), MatrixX::Zero(rows,1));\n  VERIFY_IS_APPROX(m1.matrix().middleRows(0,fix<0>).colwise().sum().eval(), MatrixX::Zero(1,cols));\n\n  VERIFY_IS_APPROX(m1.matrix().middleCols(0,0).rowwise().prod().eval(), MatrixX::Ones(rows,1));\n  VERIFY_IS_APPROX(m1.matrix().middleRows(0,0).colwise().prod().eval(), MatrixX::Ones(1,cols));\n  VERIFY_IS_APPROX(m1.matrix().middleCols(0,fix<0>).rowwise().prod().eval(), MatrixX::Ones(rows,1));\n  VERIFY_IS_APPROX(m1.matrix().middleRows(0,fix<0>).colwise().prod().eval(), MatrixX::Ones(1,cols));\n  \n  VERIFY_IS_APPROX(m1.matrix().middleCols(0,0).rowwise().squaredNorm().eval(), MatrixX::Zero(rows,1));\n\n  VERIFY_RAISES_ASSERT(m1.real().middleCols(0,0).rowwise().minCoeff().eval());\n  VERIFY_RAISES_ASSERT(m1.real().middleRows(0,0).colwise().maxCoeff().eval());\n  VERIFY_IS_EQUAL(m1.real().middleRows(0,0).rowwise().maxCoeff().eval().rows(),0);\n  VERIFY_IS_EQUAL(m1.real().middleCols(0,0).colwise().maxCoeff().eval().cols(),0);\n  VERIFY_IS_EQUAL(m1.real().middleRows(0,fix<0>).rowwise().maxCoeff().eval().rows(),0);\n  VERIFY_IS_EQUAL(m1.real().middleCols(0,fix<0>).colwise().maxCoeff().eval().cols(),0);\n}\n\nEIGEN_DECLARE_TEST(vectorwiseop)\n{\n  CALL_SUBTEST_1( vectorwiseop_array(Array22cd()) );\n  CALL_SUBTEST_2( vectorwiseop_array(Array<double, 3, 2>()) );\n  CALL_SUBTEST_3( vectorwiseop_array(ArrayXXf(3, 4)) );\n  CALL_SUBTEST_4( vectorwiseop_matrix(Matrix4cf()) );\n  CALL_SUBTEST_5( vectorwiseop_matrix(Matrix4f()) );\n  CALL_SUBTEST_5( vectorwiseop_matrix(Vector4f()) );\n  CALL_SUBTEST_5( vectorwiseop_matrix(Matrix<float,4,5>()) );\n  CALL_SUBTEST_6( vectorwiseop_matrix(MatrixXd(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n  CALL_SUBTEST_7( vectorwiseop_matrix(VectorXd(internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n  CALL_SUBTEST_7( vectorwiseop_matrix(RowVectorXd(internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/visitor.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\ntemplate<typename MatrixType> void matrixVisitor(const MatrixType& p)\n{\n  typedef typename MatrixType::Scalar Scalar;\n\n  Index rows = p.rows();\n  Index cols = p.cols();\n\n  // construct a random matrix where all coefficients are different\n  MatrixType m;\n  m = MatrixType::Random(rows, cols);\n  for(Index i = 0; i < m.size(); i++)\n    for(Index i2 = 0; i2 < i; i2++)\n      while(m(i) == m(i2)) // yes, ==\n        m(i) = internal::random<Scalar>();\n  \n  Scalar minc = Scalar(1000), maxc = Scalar(-1000);\n  Index minrow=0,mincol=0,maxrow=0,maxcol=0;\n  for(Index j = 0; j < cols; j++)\n  for(Index i = 0; i < rows; i++)\n  {\n    if(m(i,j) < minc)\n    {\n      minc = m(i,j);\n      minrow = i;\n      mincol = j;\n    }\n    if(m(i,j) > maxc)\n    {\n      maxc = m(i,j);\n      maxrow = i;\n      maxcol = j;\n    }\n  }\n  Index eigen_minrow, eigen_mincol, eigen_maxrow, eigen_maxcol;\n  Scalar eigen_minc, eigen_maxc;\n  eigen_minc = m.minCoeff(&eigen_minrow,&eigen_mincol);\n  eigen_maxc = m.maxCoeff(&eigen_maxrow,&eigen_maxcol);\n  VERIFY(minrow == eigen_minrow);\n  VERIFY(maxrow == eigen_maxrow);\n  VERIFY(mincol == eigen_mincol);\n  VERIFY(maxcol == eigen_maxcol);\n  VERIFY_IS_APPROX(minc, eigen_minc);\n  VERIFY_IS_APPROX(maxc, eigen_maxc);\n  VERIFY_IS_APPROX(minc, m.minCoeff());\n  VERIFY_IS_APPROX(maxc, m.maxCoeff());\n\n  eigen_maxc = (m.adjoint()*m).maxCoeff(&eigen_maxrow,&eigen_maxcol);\n  eigen_maxc = (m.adjoint()*m).eval().maxCoeff(&maxrow,&maxcol);\n  VERIFY(maxrow == eigen_maxrow);\n  VERIFY(maxcol == eigen_maxcol);\n}\n\ntemplate<typename VectorType> void vectorVisitor(const VectorType& w)\n{\n  typedef typename VectorType::Scalar Scalar;\n\n  Index size = w.size();\n\n  // construct a random vector where all coefficients are different\n  VectorType v;\n  v = VectorType::Random(size);\n  for(Index i = 0; i < size; i++)\n    for(Index i2 = 0; i2 < i; i2++)\n      while(v(i) == v(i2)) // yes, ==\n        v(i) = internal::random<Scalar>();\n  \n  Scalar minc = v(0), maxc = v(0);\n  Index minidx=0, maxidx=0;\n  for(Index i = 0; i < size; i++)\n  {\n    if(v(i) < minc)\n    {\n      minc = v(i);\n      minidx = i;\n    }\n    if(v(i) > maxc)\n    {\n      maxc = v(i);\n      maxidx = i;\n    }\n  }\n  Index eigen_minidx, eigen_maxidx;\n  Scalar eigen_minc, eigen_maxc;\n  eigen_minc = v.minCoeff(&eigen_minidx);\n  eigen_maxc = v.maxCoeff(&eigen_maxidx);\n  VERIFY(minidx == eigen_minidx);\n  VERIFY(maxidx == eigen_maxidx);\n  VERIFY_IS_APPROX(minc, eigen_minc);\n  VERIFY_IS_APPROX(maxc, eigen_maxc);\n  VERIFY_IS_APPROX(minc, v.minCoeff());\n  VERIFY_IS_APPROX(maxc, v.maxCoeff());\n  \n  Index idx0 = internal::random<Index>(0,size-1);\n  Index idx1 = eigen_minidx;\n  Index idx2 = eigen_maxidx;\n  VectorType v1(v), v2(v);\n  v1(idx0) = v1(idx1);\n  v2(idx0) = v2(idx2);\n  v1.minCoeff(&eigen_minidx);\n  v2.maxCoeff(&eigen_maxidx);\n  VERIFY(eigen_minidx == (std::min)(idx0,idx1));\n  VERIFY(eigen_maxidx == (std::min)(idx0,idx2));\n}\n\nEIGEN_DECLARE_TEST(visitor)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( matrixVisitor(Matrix<float, 1, 1>()) );\n    CALL_SUBTEST_2( matrixVisitor(Matrix2f()) );\n    CALL_SUBTEST_3( matrixVisitor(Matrix4d()) );\n    CALL_SUBTEST_4( matrixVisitor(MatrixXd(8, 12)) );\n    CALL_SUBTEST_5( matrixVisitor(Matrix<double,Dynamic,Dynamic,RowMajor>(20, 20)) );\n    CALL_SUBTEST_6( matrixVisitor(MatrixXi(8, 12)) );\n  }\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_7( vectorVisitor(Vector4f()) );\n    CALL_SUBTEST_7( vectorVisitor(Matrix<int,12,1>()) );\n    CALL_SUBTEST_8( vectorVisitor(VectorXd(10)) );\n    CALL_SUBTEST_9( vectorVisitor(RowVectorXd(10)) );\n    CALL_SUBTEST_10( vectorVisitor(VectorXf(33)) );\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/test/zerosized.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2011 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n\ntemplate<typename MatrixType> void zeroReduction(const MatrixType& m) {\n  // Reductions that must hold for zero sized objects\n  VERIFY(m.all());\n  VERIFY(!m.any());\n  VERIFY(m.prod()==1);\n  VERIFY(m.sum()==0);\n  VERIFY(m.norm()==0);\n  VERIFY(m.squaredNorm()==0);\n  VERIFY(m.count()==0);\n  VERIFY(m.allFinite());\n  VERIFY(!m.hasNaN());\n  VERIFY_RAISES_ASSERT( m.minCoeff() );\n  VERIFY_RAISES_ASSERT( m.maxCoeff() );\n  Index i,j;\n  VERIFY_RAISES_ASSERT( m.minCoeff(&i,&j) );\n  VERIFY_RAISES_ASSERT( m.maxCoeff(&i,&j) );\n  VERIFY_RAISES_ASSERT( m.reshaped().minCoeff(&i) );\n  VERIFY_RAISES_ASSERT( m.reshaped().maxCoeff(&i) );\n}\n\n\ntemplate<typename MatrixType> void zeroSizedMatrix()\n{\n  MatrixType t1;\n  typedef typename MatrixType::Scalar Scalar;\n\n  if (MatrixType::SizeAtCompileTime == Dynamic || MatrixType::SizeAtCompileTime == 0)\n  {\n    zeroReduction(t1);\n    if (MatrixType::RowsAtCompileTime == Dynamic)\n      VERIFY(t1.rows() == 0);\n    if (MatrixType::ColsAtCompileTime == Dynamic)\n      VERIFY(t1.cols() == 0);\n\n    if (MatrixType::RowsAtCompileTime == Dynamic && MatrixType::ColsAtCompileTime == Dynamic)\n    {\n\n      MatrixType t2(0, 0), t3(t1);\n      VERIFY(t2.rows() == 0);\n      VERIFY(t2.cols() == 0);\n\n      zeroReduction(t2);\n      VERIFY(t1==t2);\n    }\n  }\n\n  if(MatrixType::MaxColsAtCompileTime!=0 && MatrixType::MaxRowsAtCompileTime!=0)\n  {\n    Index rows = MatrixType::RowsAtCompileTime==Dynamic ? internal::random<Index>(1,10) : Index(MatrixType::RowsAtCompileTime);\n    Index cols = MatrixType::ColsAtCompileTime==Dynamic ? internal::random<Index>(1,10) : Index(MatrixType::ColsAtCompileTime);\n    MatrixType m(rows,cols);\n    zeroReduction(m.template block<0,MatrixType::ColsAtCompileTime>(0,0,0,cols));\n    zeroReduction(m.template block<MatrixType::RowsAtCompileTime,0>(0,0,rows,0));\n    zeroReduction(m.template block<0,1>(0,0));\n    zeroReduction(m.template block<1,0>(0,0));\n    Matrix<Scalar,Dynamic,Dynamic> prod = m.template block<MatrixType::RowsAtCompileTime,0>(0,0,rows,0) * m.template block<0,MatrixType::ColsAtCompileTime>(0,0,0,cols);\n    VERIFY(prod.rows()==rows && prod.cols()==cols);\n    VERIFY(prod.isZero());\n    prod = m.template block<1,0>(0,0) * m.template block<0,1>(0,0);\n    VERIFY(prod.size()==1);\n    VERIFY(prod.isZero());\n  }\n}\n\ntemplate<typename VectorType> void zeroSizedVector()\n{\n  VectorType t1;\n\n  if (VectorType::SizeAtCompileTime == Dynamic || VectorType::SizeAtCompileTime==0)\n  {\n    zeroReduction(t1);\n    VERIFY(t1.size() == 0);\n    VectorType t2(DenseIndex(0)); // DenseIndex disambiguates with 0-the-null-pointer (error with gcc 4.4 and MSVC8)\n    VERIFY(t2.size() == 0);\n    zeroReduction(t2);\n\n    VERIFY(t1==t2);\n  }\n}\n\nEIGEN_DECLARE_TEST(zerosized)\n{\n  zeroSizedMatrix<Matrix2d>();\n  zeroSizedMatrix<Matrix3i>();\n  zeroSizedMatrix<Matrix<float, 2, Dynamic> >();\n  zeroSizedMatrix<MatrixXf>();\n  zeroSizedMatrix<Matrix<float, 0, 0> >();\n  zeroSizedMatrix<Matrix<float, Dynamic, 0, 0, 0, 0> >();\n  zeroSizedMatrix<Matrix<float, 0, Dynamic, 0, 0, 0> >();\n  zeroSizedMatrix<Matrix<float, Dynamic, Dynamic, 0, 0, 0> >();\n  zeroSizedMatrix<Matrix<float, 0, 4> >();\n  zeroSizedMatrix<Matrix<float, 4, 0> >();\n\n  zeroSizedVector<Vector2d>();\n  zeroSizedVector<Vector3i>();\n  zeroSizedVector<VectorXf>();\n  zeroSizedVector<Matrix<float, 0, 1> >();\n  zeroSizedVector<Matrix<float, 1, 0> >();\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/CMakeLists.txt",
    "content": "add_subdirectory(Eigen)\nadd_subdirectory(doc EXCLUDE_FROM_ALL)\n# if(BUILD_TESTING)\n#   if(EIGEN_LEAVE_TEST_IN_ALL_TARGET)\n#     add_subdirectory(test) # can't do EXCLUDE_FROM_ALL here, breaks CTest\n#   else()\n#     add_subdirectory(test EXCLUDE_FROM_ALL)\n#   endif()\n# endif()\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/AdolcForward",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud <g.gael@free.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_ADLOC_FORWARD\n#define EIGEN_ADLOC_FORWARD\n\n//--------------------------------------------------------------------------------\n//\n// This file provides support for adolc's adouble type in forward mode.\n// ADOL-C is a C++ automatic differentiation library,\n// see https://projects.coin-or.org/ADOL-C for more information.\n//\n// Note that the maximal number of directions is controlled by\n// the preprocessor token NUMBER_DIRECTIONS. The default is 2.\n//\n//--------------------------------------------------------------------------------\n\n#define ADOLC_TAPELESS\n#ifndef NUMBER_DIRECTIONS\n# define NUMBER_DIRECTIONS 2\n#endif\n#include <adolc/adtl.h>\n\n// adolc defines some very stupid macros:\n#if defined(malloc)\n# undef malloc\n#endif\n\n#if defined(calloc)\n# undef calloc\n#endif\n\n#if defined(realloc)\n# undef realloc\n#endif\n\n#include \"../../Eigen/Core\"\n\nnamespace Eigen {\n\n/**\n  * \\defgroup AdolcForward_Module Adolc forward module\n  * This module provides support for adolc's adouble type in forward mode.\n  * ADOL-C is a C++ automatic differentiation library,\n  * see https://projects.coin-or.org/ADOL-C for more information.\n  * It mainly consists in:\n  *  - a struct Eigen::NumTraits<adtl::adouble> specialization\n  *  - overloads of internal::* math function for adtl::adouble type.\n  *\n  * Note that the maximal number of directions is controlled by\n  * the preprocessor token NUMBER_DIRECTIONS. The default is 2.\n  *\n  * \\code\n  * #include <unsupported/Eigen/AdolcSupport>\n  * \\endcode\n  */\n  //@{\n\n} // namespace Eigen\n\n// Eigen's require a few additional functions which must be defined in the same namespace\n// than the custom scalar type own namespace\nnamespace adtl {\n\ninline const adouble& conj(const adouble& x)  { return x; }\ninline const adouble& real(const adouble& x)  { return x; }\ninline adouble imag(const adouble&)    { return 0.; }\ninline adouble abs(const adouble&  x)  { return fabs(x); }\ninline adouble abs2(const adouble& x)  { return x*x; }\n\n}\n\nnamespace Eigen {\n\ntemplate<> struct NumTraits<adtl::adouble>\n    : NumTraits<double>\n{\n  typedef adtl::adouble Real;\n  typedef adtl::adouble NonInteger;\n  typedef adtl::adouble Nested;\n  enum {\n    IsComplex = 0,\n    IsInteger = 0,\n    IsSigned = 1,\n    RequireInitialization = 1,\n    ReadCost = 1,\n    AddCost = 1,\n    MulCost = 1\n  };\n};\n\ntemplate<typename Functor> class AdolcForwardJacobian : public Functor\n{\n  typedef adtl::adouble ActiveScalar;\npublic:\n\n  AdolcForwardJacobian() : Functor() {}\n  AdolcForwardJacobian(const Functor& f) : Functor(f) {}\n\n  // forward constructors\n  template<typename T0>\n  AdolcForwardJacobian(const T0& a0) : Functor(a0) {}\n  template<typename T0, typename T1>\n  AdolcForwardJacobian(const T0& a0, const T1& a1) : Functor(a0, a1) {}\n  template<typename T0, typename T1, typename T2>\n  AdolcForwardJacobian(const T0& a0, const T1& a1, const T1& a2) : Functor(a0, a1, a2) {}\n\n  typedef typename Functor::InputType InputType;\n  typedef typename Functor::ValueType ValueType;\n  typedef typename Functor::JacobianType JacobianType;\n\n  typedef Matrix<ActiveScalar, InputType::SizeAtCompileTime, 1> ActiveInput;\n  typedef Matrix<ActiveScalar, ValueType::SizeAtCompileTime, 1> ActiveValue;\n\n  void operator() (const InputType& x, ValueType* v, JacobianType* _jac) const\n  {\n    eigen_assert(v!=0);\n    if (!_jac)\n    {\n      Functor::operator()(x, v);\n      return;\n    }\n\n    JacobianType& jac = *_jac;\n\n    ActiveInput ax = x.template cast<ActiveScalar>();\n    ActiveValue av(jac.rows());\n\n    for (int j=0; j<jac.cols(); j++)\n      for (int i=0; i<jac.cols(); i++)\n        ax[i].setADValue(j, i==j ? 1 : 0);\n\n    Functor::operator()(ax, &av);\n\n    for (int i=0; i<jac.rows(); i++)\n    {\n      (*v)[i] = av[i].getValue();\n      for (int j=0; j<jac.cols(); j++)\n        jac.coeffRef(i,j) = av[i].getADValue(j);\n    }\n  }\nprotected:\n\n};\n\n//@}\n\n}\n\n#endif // EIGEN_ADLOC_FORWARD\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/AlignedVector3",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael Guennebaud <g.gael@free.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_ALIGNED_VECTOR3\n#define EIGEN_ALIGNED_VECTOR3\n\n#include \"../../Eigen/Geometry\"\n\n#include \"../../Eigen/src/Core/util/DisableStupidWarnings.h\"\n\nnamespace Eigen {\n\n/**\n  * \\defgroup AlignedVector3_Module Aligned vector3 module\n  *\n  * \\code\n  * #include <unsupported/Eigen/AlignedVector3>\n  * \\endcode\n  */\n  //@{\n\n\n/** \\class AlignedVector3\n  *\n  * \\brief A vectorization friendly 3D vector\n  *\n  * This class represents a 3D vector internally using a 4D vector\n  * such that vectorization can be seamlessly enabled. Of course,\n  * the same result can be achieved by directly using a 4D vector.\n  * This class makes this process simpler.\n  *\n  */\n// TODO specialize Cwise\ntemplate<typename _Scalar> class AlignedVector3;\n\nnamespace internal {\ntemplate<typename _Scalar> struct traits<AlignedVector3<_Scalar> >\n  : traits<Matrix<_Scalar,3,1,0,4,1> >\n{\n};\n}\n\ntemplate<typename _Scalar> class AlignedVector3\n  : public MatrixBase<AlignedVector3<_Scalar> >\n{\n    typedef Matrix<_Scalar,4,1> CoeffType;\n    CoeffType m_coeffs;\n  public:\n\n    typedef MatrixBase<AlignedVector3<_Scalar> > Base;\t\n    EIGEN_DENSE_PUBLIC_INTERFACE(AlignedVector3)\n    using Base::operator*;\n\n    inline Index rows() const { return 3; }\n    inline Index cols() const { return 1; }\n    \n    Scalar* data() { return m_coeffs.data(); }\n    const Scalar* data() const { return m_coeffs.data(); }\n    Index innerStride() const { return 1; }\n    Index outerStride() const { return 3; }\n\n    inline const Scalar& coeff(Index row, Index col) const\n    { return m_coeffs.coeff(row, col); }\n\n    inline Scalar& coeffRef(Index row, Index col)\n    { return m_coeffs.coeffRef(row, col); }\n\n    inline const Scalar& coeff(Index index) const\n    { return m_coeffs.coeff(index); }\n\n    inline Scalar& coeffRef(Index index)\n    { return m_coeffs.coeffRef(index);}\n\n\n    inline AlignedVector3()\n    {}\n\n    inline AlignedVector3(const Scalar& x, const Scalar& y, const Scalar& z)\n      : m_coeffs(x, y, z, Scalar(0))\n    {}\n\n    inline AlignedVector3(const AlignedVector3& other)\n      : Base(), m_coeffs(other.m_coeffs)\n    {}\n\n    template<typename XprType, int Size=XprType::SizeAtCompileTime>\n    struct generic_assign_selector {};\n\n    template<typename XprType> struct generic_assign_selector<XprType,4>\n    {\n      inline static void run(AlignedVector3& dest, const XprType& src)\n      {\n        dest.m_coeffs = src;\n      }\n    };\n\n    template<typename XprType> struct generic_assign_selector<XprType,3>\n    {\n      inline static void run(AlignedVector3& dest, const XprType& src)\n      {\n        dest.m_coeffs.template head<3>() = src;\n        dest.m_coeffs.w() = Scalar(0);\n      }\n    };\n\n    template<typename Derived>\n    inline AlignedVector3(const MatrixBase<Derived>& other)\n    {\n      generic_assign_selector<Derived>::run(*this,other.derived());\n    }\n\n    inline AlignedVector3& operator=(const AlignedVector3& other)\n    { m_coeffs = other.m_coeffs; return *this; }\n\n    template <typename Derived>\n    inline AlignedVector3& operator=(const MatrixBase<Derived>& other)\n    {\n      generic_assign_selector<Derived>::run(*this,other.derived());\n      return *this;\n    }\n\n    inline AlignedVector3 operator+(const AlignedVector3& other) const\n    { return AlignedVector3(m_coeffs + other.m_coeffs); }\n\n    inline AlignedVector3& operator+=(const AlignedVector3& other)\n    { m_coeffs += other.m_coeffs; return *this; }\n\n    inline AlignedVector3 operator-(const AlignedVector3& other) const\n    { return AlignedVector3(m_coeffs - other.m_coeffs); }\n\n    inline AlignedVector3 operator-() const\n    { return AlignedVector3(-m_coeffs); }\n\n    inline AlignedVector3 operator-=(const AlignedVector3& other)\n    { m_coeffs -= other.m_coeffs; return *this; }\n\n    inline AlignedVector3 operator*(const Scalar& s) const\n    { return AlignedVector3(m_coeffs * s); }\n\n    inline friend AlignedVector3 operator*(const Scalar& s,const AlignedVector3& vec)\n    { return AlignedVector3(s * vec.m_coeffs); }\n\n    inline AlignedVector3& operator*=(const Scalar& s)\n    { m_coeffs *= s; return *this; }\n\n    inline AlignedVector3 operator/(const Scalar& s) const\n    { return AlignedVector3(m_coeffs / s); }\n\n    inline AlignedVector3& operator/=(const Scalar& s)\n    { m_coeffs /= s; return *this; }\n\n    inline Scalar dot(const AlignedVector3& other) const\n    {\n      eigen_assert(m_coeffs.w()==Scalar(0));\n      eigen_assert(other.m_coeffs.w()==Scalar(0));\n      return m_coeffs.dot(other.m_coeffs);\n    }\n\n    inline void normalize()\n    {\n      m_coeffs /= norm();\n    }\n\n    inline AlignedVector3 normalized() const\n    {\n      return AlignedVector3(m_coeffs / norm());\n    }\n\n    inline Scalar sum() const\n    {\n      eigen_assert(m_coeffs.w()==Scalar(0));\n      return m_coeffs.sum();\n    }\n\n    inline Scalar squaredNorm() const\n    {\n      eigen_assert(m_coeffs.w()==Scalar(0));\n      return m_coeffs.squaredNorm();\n    }\n\n    inline Scalar norm() const\n    {\n      using std::sqrt;\n      return sqrt(squaredNorm());\n    }\n\n    inline AlignedVector3 cross(const AlignedVector3& other) const\n    {\n      return AlignedVector3(m_coeffs.cross3(other.m_coeffs));\n    }\n\n    template<typename Derived>\n    inline bool isApprox(const MatrixBase<Derived>& other, const RealScalar& eps=NumTraits<Scalar>::dummy_precision()) const\n    {\n      return m_coeffs.template head<3>().isApprox(other,eps);\n    }\n    \n    CoeffType& coeffs() { return m_coeffs; }\n    const CoeffType& coeffs() const { return m_coeffs; }\n};\n\nnamespace internal {\n\ntemplate<typename _Scalar>\nstruct eval<AlignedVector3<_Scalar>, Dense>\n{\n typedef const AlignedVector3<_Scalar>& type;\n};\n\ntemplate<typename Scalar>\nstruct evaluator<AlignedVector3<Scalar> >\n  : evaluator<Matrix<Scalar,4,1> >\n{\n  typedef AlignedVector3<Scalar> XprType;\n  typedef evaluator<Matrix<Scalar,4,1> > Base;\n  \n  evaluator(const XprType &m) : Base(m.coeffs()) {}  \n};\n\n}\n\n//@}\n\n}\n\n#include \"../../Eigen/src/Core/util/ReenableStupidWarnings.h\"\n\n#endif // EIGEN_ALIGNED_VECTOR3\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/ArpackSupport",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_ARPACKSUPPORT_MODULE_H\n#define EIGEN_ARPACKSUPPORT_MODULE_H\n\n#include \"../../Eigen/Core\"\n\n/** \\defgroup ArpackSupport_Module Arpack support module\n  *\n  * This module provides a wrapper to Arpack, a library for sparse eigenvalue decomposition.\n  *\n  * \\code\n  * #include <Eigen/ArpackSupport>\n  * \\endcode\n  */\n\n#include \"../../Eigen/SparseCholesky\"\n\n#include \"../../Eigen/src/Core/util/DisableStupidWarnings.h\"\n#include \"src/Eigenvalues/ArpackSelfAdjointEigenSolver.h\"\n\n#include \"../../Eigen/src/Core/util/ReenableStupidWarnings.h\"\n\n#endif // EIGEN_ARPACKSUPPORT_MODULE_H\n/* vim: set filetype=cpp et sw=2 ts=2 ai: */\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/AutoDiff",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud <g.gael@free.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_AUTODIFF_MODULE\n#define EIGEN_AUTODIFF_MODULE\n\nnamespace Eigen {\n\n/**\n  * \\defgroup AutoDiff_Module Auto Diff module\n  *\n  * This module features forward automatic differentation via a simple\n  * templated scalar type wrapper AutoDiffScalar.\n  *\n  * Warning : this should NOT be confused with numerical differentiation, which\n  * is a different method and has its own module in Eigen : \\ref NumericalDiff_Module.\n  *\n  * \\code\n  * #include <unsupported/Eigen/AutoDiff>\n  * \\endcode\n  */\n//@{\n\n}\n#include \"../../Eigen/src/Core/util/DisableStupidWarnings.h\"\n\n\n#include \"src/AutoDiff/AutoDiffScalar.h\"\n// #include \"src/AutoDiff/AutoDiffVector.h\"\n#include \"src/AutoDiff/AutoDiffJacobian.h\"\n\n#include \"../../Eigen/src/Core/util/ReenableStupidWarnings.h\"\n\n\n\nnamespace Eigen {\n//@}\n}\n\n#endif // EIGEN_AUTODIFF_MODULE\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/BVH",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Ilya Baran <ibaran@mit.edu>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_BVH_MODULE_H\n#define EIGEN_BVH_MODULE_H\n\n#include \"../../Eigen/Core\"\n#include \"../../Eigen/Geometry\"\n#include \"../../Eigen/StdVector\"\n#include <algorithm>\n#include <queue>\n\nnamespace Eigen {\n\n/**\n  * \\defgroup BVH_Module BVH module\n  * \\brief This module provides generic bounding volume hierarchy algorithms\n  * and reference tree implementations.\n  *\n  *\n  * \\code\n  * #include <unsupported/Eigen/BVH>\n  * \\endcode\n  *\n  * A bounding volume hierarchy (BVH) can accelerate many geometric queries.  This module provides a generic implementation\n  * of the two basic algorithms over a BVH: intersection of a query object against all objects in the hierarchy and minimization\n  * of a function over the objects in the hierarchy.  It also provides intersection and minimization over a cartesian product of\n  * two BVH's.  A BVH accelerates intersection by using the fact that if a query object does not intersect a volume, then it cannot\n  * intersect any object contained in that volume.  Similarly, a BVH accelerates minimization because the minimum of a function\n  * over a volume is no greater than the minimum of a function over any object contained in it.\n  *\n  * Some sample queries that can be written in terms of intersection are:\n  *   - Determine all points where a ray intersects a triangle mesh\n  *   - Given a set of points, determine which are contained in a query sphere\n  *   - Given a set of spheres, determine which contain the query point\n  *   - Given a set of disks, determine if any is completely contained in a query rectangle (represent each 2D disk as a point \\f$(x,y,r)\\f$\n  *     in 3D and represent the rectangle as a pyramid based on the original rectangle and shrinking in the \\f$r\\f$ direction)\n  *   - Given a set of points, count how many pairs are \\f$d\\pm\\epsilon\\f$ apart (done by looking at the cartesian product of the set\n  *     of points with itself)\n  *\n  * Some sample queries that can be written in terms of function minimization over a set of objects are:\n  *   - Find the intersection between a ray and a triangle mesh closest to the ray origin (function is infinite off the ray)\n  *   - Given a polyline and a query point, determine the closest point on the polyline to the query\n  *   - Find the diameter of a point cloud (done by looking at the cartesian product and using negative distance as the function)\n  *   - Determine how far two meshes are from colliding (this is also a cartesian product query)\n  *\n  * This implementation decouples the basic algorithms both from the type of hierarchy (and the types of the bounding volumes) and\n  * from the particulars of the query.  To enable abstraction from the BVH, the BVH is required to implement a generic mechanism\n  * for traversal.  To abstract from the query, the query is responsible for keeping track of results.\n  *\n  * To be used in the algorithms, a hierarchy must implement the following traversal mechanism (see KdBVH for a sample implementation): \\code\n      typedef Volume  //the type of bounding volume\n      typedef Object  //the type of object in the hierarchy\n      typedef Index   //a reference to a node in the hierarchy--typically an int or a pointer\n      typedef VolumeIterator //an iterator type over node children--returns Index\n      typedef ObjectIterator //an iterator over object (leaf) children--returns const Object &\n      Index getRootIndex() const //returns the index of the hierarchy root\n      const Volume &getVolume(Index index) const //returns the bounding volume of the node at given index\n      void getChildren(Index index, VolumeIterator &outVBegin, VolumeIterator &outVEnd,\n                      ObjectIterator &outOBegin, ObjectIterator &outOEnd) const\n      //getChildren takes a node index and makes [outVBegin, outVEnd) range over its node children\n      //and [outOBegin, outOEnd) range over its object children\n    \\endcode\n  *\n  * To use the hierarchy, call BVIntersect or BVMinimize, passing it a BVH (or two, for cartesian product) and a minimizer or intersector.\n  * For an intersection query on a single BVH, the intersector encapsulates the query and must provide two functions:\n  * \\code\n      bool intersectVolume(const Volume &volume) //returns true if the query intersects the volume\n      bool intersectObject(const Object &object) //returns true if the intersection search should terminate immediately\n    \\endcode\n  * The guarantee that BVIntersect provides is that intersectObject will be called on every object whose bounding volume\n  * intersects the query (but possibly on other objects too) unless the search is terminated prematurely.  It is the\n  * responsibility of the intersectObject function to keep track of the results in whatever manner is appropriate.\n  * The cartesian product intersection and the BVMinimize queries are similar--see their individual documentation.\n  *\n  * The following is a simple but complete example for how to use the BVH to accelerate the search for a closest red-blue point pair:\n  * \\include BVH_Example.cpp\n  * Output: \\verbinclude BVH_Example.out\n  */\n}\n\n//@{\n\n#include \"src/BVH/BVAlgorithms.h\"\n#include \"src/BVH/KdBVH.h\"\n\n//@}\n\n#endif // EIGEN_BVH_MODULE_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CMakeLists.txt",
    "content": "set(Eigen_HEADERS \n  AdolcForward\n  AlignedVector3\n  ArpackSupport\n  AutoDiff\n  BVH\n  EulerAngles\n  FFT\n  IterativeSolvers \n  KroneckerProduct\n  LevenbergMarquardt\n  MatrixFunctions \n  MoreVectorization\n  MPRealSupport\n  NonLinearOptimization\n  NumericalDiff\n  OpenGLSupport\n  Polynomials\n  Skyline \n  SparseExtra\n  SpecialFunctions\n  Splines\n  )\n\n# install(FILES\n#   ${Eigen_HEADERS}\n#   DESTINATION ${INCLUDE_INSTALL_DIR}/unsupported/Eigen COMPONENT Devel\n#   )\n\n# install(DIRECTORY src DESTINATION ${INCLUDE_INSTALL_DIR}/unsupported/Eigen COMPONENT Devel FILES_MATCHING PATTERN \"*.h\")\n\nadd_subdirectory(CXX11)\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/CMakeLists.txt",
    "content": "set(Eigen_CXX11_HEADERS Tensor TensorSymmetry ThreadPool)\n\n# install(FILES\n#   ${Eigen_CXX11_HEADERS}\n#   DESTINATION ${INCLUDE_INSTALL_DIR}/unsupported/Eigen/CXX11 COMPONENT Devel\n#   )\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/Tensor",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n// Copyright (C) 2013 Christian Seiler <christian@iwakd.de>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n//#ifndef EIGEN_CXX11_TENSOR_MODULE\n//#define EIGEN_CXX11_TENSOR_MODULE\n\n#include \"../../../Eigen/Core\"\n\n#if EIGEN_HAS_CXX11\n\n#include \"../SpecialFunctions\"\n\n#include \"../../../Eigen/src/Core/util/DisableStupidWarnings.h\"\n#include \"src/util/CXX11Meta.h\"\n#include \"src/util/MaxSizeVector.h\"\n\n/** \\defgroup CXX11_Tensor_Module Tensor Module\n  *\n  * This module provides a Tensor class for storing arbitrarily indexed\n  * objects.\n  *\n  * \\code\n  * #include <Eigen/CXX11/Tensor>\n  * \\endcode\n  *\n  * Much of the documentation can be found \\ref eigen_tensors \"here\".\n  */\n\n#include <cmath>\n#include <cstddef>\n#include <cstring>\n#include <random>\n\n#ifdef _WIN32\ntypedef __int16 int16_t;\ntypedef unsigned __int16 uint16_t;\ntypedef __int32 int32_t;\ntypedef unsigned __int32 uint32_t;\ntypedef __int64 int64_t;\ntypedef unsigned __int64 uint64_t;\n#include <windows.h>\n#else\n#include <stdint.h>\n#include <unistd.h>\n#endif\n\n#ifdef _WIN32\n#include <windows.h>\n#elif defined(__APPLE__)\n#include <mach/mach_time.h>\n#else\n#include <time.h>\n#endif\n\n#if defined(EIGEN_USE_THREADS) || defined(EIGEN_USE_SYCL)\n#include \"ThreadPool\"\n#endif\n\n#ifdef EIGEN_USE_GPU\n  #include <iostream>\n  #if defined(EIGEN_USE_HIP)\n    #include <hip/hip_runtime.h>\n  #else\n    #include <cuda_runtime.h>\n  #endif\n  #include <atomic>\n  #include <unistd.h>\n#endif\n\n#include \"src/Tensor/TensorMacros.h\"\n#include \"src/Tensor/TensorForwardDeclarations.h\"\n#include \"src/Tensor/TensorMeta.h\"\n#include \"src/Tensor/TensorFunctors.h\"\n#include \"src/Tensor/TensorCostModel.h\"\n#include \"src/Tensor/TensorDeviceDefault.h\"\n#include \"src/Tensor/TensorDeviceThreadPool.h\"\n#include \"src/Tensor/TensorDeviceGpu.h\"\n#ifndef gpu_assert\n#define gpu_assert(x)\n#endif\n#include \"src/Tensor/TensorDeviceSycl.h\"\n#include \"src/Tensor/TensorIndexList.h\"\n#include \"src/Tensor/TensorDimensionList.h\"\n#include \"src/Tensor/TensorDimensions.h\"\n#include \"src/Tensor/TensorInitializer.h\"\n#include \"src/Tensor/TensorTraits.h\"\n#include \"src/Tensor/TensorRandom.h\"\n#include \"src/Tensor/TensorUInt128.h\"\n#include \"src/Tensor/TensorIntDiv.h\"\n#include \"src/Tensor/TensorGlobalFunctions.h\"\n\n#include \"src/Tensor/TensorBase.h\"\n#include \"src/Tensor/TensorBlock.h\"\n\n#include \"src/Tensor/TensorEvaluator.h\"\n#include \"src/Tensor/TensorExpr.h\"\n#include \"src/Tensor/TensorReduction.h\"\n#include \"src/Tensor/TensorReductionGpu.h\"\n#include \"src/Tensor/TensorArgMax.h\"\n#include \"src/Tensor/TensorConcatenation.h\"\n#include \"src/Tensor/TensorContractionMapper.h\"\n#include \"src/Tensor/TensorContractionBlocking.h\"\n#include \"src/Tensor/TensorContraction.h\"\n#include \"src/Tensor/TensorContractionThreadPool.h\"\n#include \"src/Tensor/TensorContractionGpu.h\"\n#include \"src/Tensor/TensorConversion.h\"\n#include \"src/Tensor/TensorConvolution.h\"\n#include \"src/Tensor/TensorFFT.h\"\n#include \"src/Tensor/TensorPatch.h\"\n#include \"src/Tensor/TensorImagePatch.h\"\n#include \"src/Tensor/TensorVolumePatch.h\"\n#include \"src/Tensor/TensorBroadcasting.h\"\n#include \"src/Tensor/TensorChipping.h\"\n#include \"src/Tensor/TensorInflation.h\"\n#include \"src/Tensor/TensorLayoutSwap.h\"\n#include \"src/Tensor/TensorMorphing.h\"\n#include \"src/Tensor/TensorPadding.h\"\n#include \"src/Tensor/TensorReverse.h\"\n#include \"src/Tensor/TensorShuffling.h\"\n#include \"src/Tensor/TensorStriding.h\"\n#include \"src/Tensor/TensorCustomOp.h\"\n#include \"src/Tensor/TensorEvalTo.h\"\n#include \"src/Tensor/TensorForcedEval.h\"\n#include \"src/Tensor/TensorGenerator.h\"\n#include \"src/Tensor/TensorAssign.h\"\n#include \"src/Tensor/TensorScan.h\"\n#include \"src/Tensor/TensorTrace.h\"\n\n#ifdef EIGEN_USE_SYCL\n#include \"src/Tensor/TensorReductionSycl.h\"\n#include \"src/Tensor/TensorConvolutionSycl.h\"\n#include \"src/Tensor/TensorContractionSycl.h\"\n#include \"src/Tensor/TensorScanSycl.h\"\n#endif\n\n#include \"src/Tensor/TensorExecutor.h\"\n#include \"src/Tensor/TensorDevice.h\"\n\n#include \"src/Tensor/TensorStorage.h\"\n#include \"src/Tensor/Tensor.h\"\n#include \"src/Tensor/TensorFixedSize.h\"\n#include \"src/Tensor/TensorMap.h\"\n#include \"src/Tensor/TensorRef.h\"\n\n#include \"src/Tensor/TensorIO.h\"\n\n#include \"../../../Eigen/src/Core/util/ReenableStupidWarnings.h\"\n\n#endif  // EIGEN_HAS_CXX11\n//#endif // EIGEN_CXX11_TENSOR_MODULE\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/TensorSymmetry",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2013 Christian Seiler <christian@iwakd.de>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSORSYMMETRY_MODULE\n#define EIGEN_CXX11_TENSORSYMMETRY_MODULE\n\n#include \"Tensor\"\n\n#include \"../../../Eigen/src/Core/util/DisableStupidWarnings.h\"\n\n#include \"src/util/CXX11Meta.h\"\n\n/** \\defgroup CXX11_TensorSymmetry_Module Tensor Symmetry Module\n  *\n  * This module provides a classes that allow for the definition of\n  * symmetries w.r.t. tensor indices.\n  *\n  * Including this module will implicitly include the Tensor module.\n  *\n  * \\code\n  * #include <Eigen/TensorSymmetry>\n  * \\endcode\n  */\n\n#include \"src/TensorSymmetry/util/TemplateGroupTheory.h\"\n#include \"src/TensorSymmetry/Symmetry.h\"\n#include \"src/TensorSymmetry/StaticSymmetry.h\"\n#include \"src/TensorSymmetry/DynamicSymmetry.h\"\n\n#include \"../../../Eigen/src/Core/util/ReenableStupidWarnings.h\"\n\n#endif // EIGEN_CXX11_TENSORSYMMETRY_MODULE\n\n/*\n * kate: space-indent on; indent-width 2; mixedindent off; indent-mode cstyle;\n */\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/ThreadPool",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_THREADPOOL_MODULE\n#define EIGEN_CXX11_THREADPOOL_MODULE\n\n#include \"../../../Eigen/Core\"\n\n#include \"../../../Eigen/src/Core/util/DisableStupidWarnings.h\"\n\n/** \\defgroup CXX11_ThreadPool_Module C++11 ThreadPool Module\n  *\n  * This module provides 2 threadpool implementations\n  *  - a simple reference implementation\n  *  - a faster non blocking implementation\n  *\n  * This module requires C++11.\n  *\n  * \\code\n  * #include <Eigen/CXX11/ThreadPool>\n  * \\endcode\n  */\n\n\n// The code depends on CXX11, so only include the module if the\n// compiler supports it.\n#if __cplusplus > 199711L || EIGEN_COMP_MSVC >= 1900\n#include <cstddef>\n#include <cstring>\n#include <stdint.h>\n#include <time.h>\n\n#include <vector>\n#include <atomic>\n#include <condition_variable>\n#include <deque>\n#include <mutex>\n#include <thread>\n#include <functional>\n#include <memory>\n#include <utility>\n\n// There are non-parenthesized calls to \"max\" in the  <unordered_map> header,\n// which trigger a check in test/main.h causing compilation to fail.\n// We work around the check here by removing the check for max in\n// the case where we have to emulate thread_local.\n#ifdef max\n#undef max\n#endif\n#include <unordered_map>\n\n#include \"src/util/CXX11Meta.h\"\n#include \"src/util/MaxSizeVector.h\"\n\n#include \"src/ThreadPool/ThreadLocal.h\"\n#include \"src/ThreadPool/ThreadYield.h\"\n#include \"src/ThreadPool/ThreadCancel.h\"\n#include \"src/ThreadPool/EventCount.h\"\n#include \"src/ThreadPool/RunQueue.h\"\n#include \"src/ThreadPool/ThreadPoolInterface.h\"\n#include \"src/ThreadPool/ThreadEnvironment.h\"\n#include \"src/ThreadPool/Barrier.h\"\n#include \"src/ThreadPool/NonBlockingThreadPool.h\"\n\n#endif\n\n#include \"../../../Eigen/src/Core/util/ReenableStupidWarnings.h\"\n\n#endif // EIGEN_CXX11_THREADPOOL_MODULE\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/README.md",
    "content": "# Eigen Tensors {#eigen_tensors}\n\nTensors are multidimensional arrays of elements. Elements are typically scalars,\nbut more complex types such as strings are also supported.\n\n[TOC]\n\n## Tensor Classes\n\nYou can manipulate a tensor with one of the following classes.  They all are in\nthe namespace `::Eigen.`\n\n\n### Class Tensor<data_type, rank>\n\nThis is the class to use to create a tensor and allocate memory for it.  The\nclass is templatized with the tensor datatype, such as float or int, and the\ntensor rank.  The rank is the number of dimensions, for example rank 2 is a\nmatrix.\n\nTensors of this class are resizable.  For example, if you assign a tensor of a\ndifferent size to a Tensor, that tensor is resized to match its new value.\n\n#### Constructor `Tensor<data_type, rank>(size0, size1, ...)`\n\nConstructor for a Tensor.  The constructor must be passed `rank` integers\nindicating the sizes of the instance along each of the the `rank`\ndimensions.\n\n    // Create a tensor of rank 3 of sizes 2, 3, 4.  This tensor owns\n    // memory to hold 24 floating point values (24 = 2 x 3 x 4).\n    Tensor<float, 3> t_3d(2, 3, 4);\n\n    // Resize t_3d by assigning a tensor of different sizes, but same rank.\n    t_3d = Tensor<float, 3>(3, 4, 3);\n\n#### Constructor `Tensor<data_type, rank>(size_array)`\n\nConstructor where the sizes for the constructor are specified as an array of\nvalues instead of an explicitly list of parameters.  The array type to use is\n`Eigen::array<Eigen::Index>`.  The array can be constructed automatically\nfrom an initializer list.\n\n    // Create a tensor of strings of rank 2 with sizes 5, 7.\n    Tensor<string, 2> t_2d({5, 7});\n\n\n### Class `TensorFixedSize<data_type, Sizes<size0, size1, ...>>`\n\nClass to use for tensors of fixed size, where the size is known at compile\ntime.  Fixed sized tensors can provide very fast computations because all their\ndimensions are known by the compiler.  FixedSize tensors are not resizable.\n\nIf the total number of elements in a fixed size tensor is small enough the\ntensor data is held onto the stack and does not cause heap allocation and free.\n\n    // Create a 4 x 3 tensor of floats.\n    TensorFixedSize<float, Sizes<4, 3>> t_4x3;\n\n### Class `TensorMap<Tensor<data_type, rank>>`\n\nThis is the class to use to create a tensor on top of memory allocated and\nowned by another part of your code.  It allows to view any piece of allocated\nmemory as a Tensor.  Instances of this class do not own the memory where the\ndata are stored.\n\nA TensorMap is not resizable because it does not own the memory where its data\nare stored.\n\n#### Constructor `TensorMap<Tensor<data_type, rank>>(data, size0, size1, ...)`\n\nConstructor for a Tensor.  The constructor must be passed a pointer to the\nstorage for the data, and \"rank\" size attributes.  The storage has to be\nlarge enough to hold all the data.\n\n    // Map a tensor of ints on top of stack-allocated storage.\n    int storage[128];  // 2 x 4 x 2 x 8 = 128\n    TensorMap<Tensor<int, 4>> t_4d(storage, 2, 4, 2, 8);\n\n    // The same storage can be viewed as a different tensor.\n    // You can also pass the sizes as an array.\n    TensorMap<Tensor<int, 2>> t_2d(storage, 16, 8);\n\n    // You can also map fixed-size tensors.  Here we get a 1d view of\n    // the 2d fixed-size tensor.\n    TensorFixedSize<float, Sizes<4, 3>> t_4x3;\n    TensorMap<Tensor<float, 1>> t_12(t_4x3.data(), 12);\n\n\n#### Class `TensorRef`\n\nSee Assigning to a TensorRef below.\n\n## Accessing Tensor Elements\n\n#### `<data_type> tensor(index0, index1...)`\n\nReturn the element at position `(index0, index1...)` in tensor\n`tensor`.  You must pass as many parameters as the rank of `tensor`.\nThe expression can be used as an l-value to set the value of the element at the\nspecified position.  The value returned is of the datatype of the tensor.\n\n    // Set the value of the element at position (0, 1, 0);\n    Tensor<float, 3> t_3d(2, 3, 4);\n    t_3d(0, 1, 0) = 12.0f;\n\n    // Initialize all elements to random values.\n    for (int i = 0; i < 2; ++i) {\n      for (int j = 0; j < 3; ++j) {\n        for (int k = 0; k < 4; ++k) {\n          t_3d(i, j, k) = ...some random value...;\n        }\n      }\n    }\n\n    // Print elements of a tensor.\n    for (int i = 0; i < 2; ++i) {\n      LOG(INFO) << t_3d(i, 0, 0);\n    }\n\n\n## TensorLayout\n\nThe tensor library supports 2 layouts: `ColMajor` (the default) and\n`RowMajor`.  Only the default column major layout is currently fully\nsupported, and it is therefore not recommended to attempt to use the row major\nlayout at the moment.\n\nThe layout of a tensor is optionally specified as part of its type. If not\nspecified explicitly column major is assumed.\n\n    Tensor<float, 3, ColMajor> col_major;  // equivalent to Tensor<float, 3>\n    TensorMap<Tensor<float, 3, RowMajor> > row_major(data, ...);\n\nAll the arguments to an expression must use the same layout. Attempting to mix\ndifferent layouts will result in a compilation error.\n\nIt is possible to change the layout of a tensor or an expression using the\n`swap_layout()` method.  Note that this will also reverse the order of the\ndimensions.\n\n    Tensor<float, 2, ColMajor> col_major(2, 4);\n    Tensor<float, 2, RowMajor> row_major(2, 4);\n\n    Tensor<float, 2> col_major_result = col_major;  // ok, layouts match\n    Tensor<float, 2> col_major_result = row_major;  // will not compile\n\n    // Simple layout swap\n    col_major_result = row_major.swap_layout();\n    eigen_assert(col_major_result.dimension(0) == 4);\n    eigen_assert(col_major_result.dimension(1) == 2);\n\n    // Swap the layout and preserve the order of the dimensions\n    array<int, 2> shuffle(1, 0);\n    col_major_result = row_major.swap_layout().shuffle(shuffle);\n    eigen_assert(col_major_result.dimension(0) == 2);\n    eigen_assert(col_major_result.dimension(1) == 4);\n\n\n## Tensor Operations\n\nThe Eigen Tensor library provides a vast library of operations on Tensors:\nnumerical operations such as addition and multiplication, geometry operations\nsuch as slicing and shuffling, etc.  These operations are available as methods\nof the Tensor classes, and in some cases as operator overloads.  For example\nthe following code computes the elementwise addition of two tensors:\n\n    Tensor<float, 3> t1(2, 3, 4);\n    ...set some values in t1...\n    Tensor<float, 3> t2(2, 3, 4);\n    ...set some values in t2...\n    // Set t3 to the element wise sum of t1 and t2\n    Tensor<float, 3> t3 = t1 + t2;\n\nWhile the code above looks easy enough, it is important to understand that the\nexpression `t1 + t2` is not actually adding the values of the tensors.  The\nexpression instead constructs a \"tensor operator\" object of the class\nTensorCwiseBinaryOp<scalar_sum>, which has references to the tensors\n`t1` and `t2`.  This is a small C++ object that knows how to add\n`t1` and `t2`.  It is only when the value of the expression is assigned\nto the tensor `t3` that the addition is actually performed.  Technically,\nthis happens through the overloading of `operator=()` in the Tensor class.\n\nThis mechanism for computing tensor expressions allows for lazy evaluation and\noptimizations which are what make the tensor library very fast.\n\nOf course, the tensor operators do nest, and the expression `t1 + t2 * 0.3f`\nis actually represented with the (approximate) tree of operators:\n\n    TensorCwiseBinaryOp<scalar_sum>(t1, TensorCwiseUnaryOp<scalar_mul>(t2, 0.3f))\n\n\n### Tensor Operations and C++ \"auto\"\n\nBecause Tensor operations create tensor operators, the C++ `auto` keyword\ndoes not have its intuitive meaning.  Consider these 2 lines of code:\n\n    Tensor<float, 3> t3 = t1 + t2;\n    auto t4 = t1 + t2;\n\nIn the first line we allocate the tensor `t3` and it will contain the\nresult of the addition of `t1` and `t2`.  In the second line, `t4`\nis actually the tree of tensor operators that will compute the addition of\n`t1` and `t2`.  In fact, `t4` is *not* a tensor and you cannot get\nthe values of its elements:\n\n    Tensor<float, 3> t3 = t1 + t2;\n    cout << t3(0, 0, 0);  // OK prints the value of t1(0, 0, 0) + t2(0, 0, 0)\n\n    auto t4 = t1 + t2;\n    cout << t4(0, 0, 0);  // Compilation error!\n\nWhen you use `auto` you do not get a Tensor as a result but instead a\nnon-evaluated expression.  So only use `auto` to delay evaluation.\n\nUnfortunately, there is no single underlying concrete type for holding\nnon-evaluated expressions, hence you have to use auto in the case when you do\nwant to hold non-evaluated expressions.\n\nWhen you need the results of set of tensor computations you have to assign the\nresult to a Tensor that will be capable of holding onto them.  This can be\neither a normal Tensor, a fixed size Tensor, or a TensorMap on an existing\npiece of memory.  All the following will work:\n\n    auto t4 = t1 + t2;\n\n    Tensor<float, 3> result = t4;  // Could also be: result(t4);\n    cout << result(0, 0, 0);\n\n    TensorMap<float, 4> result(<a float* with enough space>, <size0>, ...) = t4;\n    cout << result(0, 0, 0);\n\n    TensorFixedSize<float, Sizes<size0, ...>> result = t4;\n    cout << result(0, 0, 0);\n\nUntil you need the results, you can keep the operation around, and even reuse\nit for additional operations.  As long as you keep the expression as an\noperation, no computation is performed.\n\n    // One way to compute exp((t1 + t2) * 0.2f);\n    auto t3 = t1 + t2;\n    auto t4 = t3 * 0.2f;\n    auto t5 = t4.exp();\n    Tensor<float, 3> result = t5;\n\n    // Another way, exactly as efficient as the previous one:\n    Tensor<float, 3> result = ((t1 + t2) * 0.2f).exp();\n\n### Controlling When Expression are Evaluated\n\nThere are several ways to control when expressions are evaluated:\n\n*   Assignment to a Tensor, TensorFixedSize, or TensorMap.\n*   Use of the eval() method.\n*   Assignment to a TensorRef.\n\n#### Assigning to a Tensor, TensorFixedSize, or TensorMap.\n\nThe most common way to evaluate an expression is to assign it to a Tensor.  In\nthe example below, the `auto` declarations make the intermediate values\n\"Operations\", not Tensors, and do not cause the expressions to be evaluated.\nThe assignment to the Tensor `result` causes the evaluation of all the\noperations.\n\n    auto t3 = t1 + t2;             // t3 is an Operation.\n    auto t4 = t3 * 0.2f;           // t4 is an Operation.\n    auto t5 = t4.exp();            // t5 is an Operation.\n    Tensor<float, 3> result = t5;  // The operations are evaluated.\n\nIf you know the ranks and sizes of the Operation value you can assign the\nOperation to a TensorFixedSize instead of a Tensor, which is a bit more\nefficient.\n\n    // We know that the result is a 4x4x2 tensor!\n    TensorFixedSize<float, Sizes<4, 4, 2>> result = t5;\n\nSimiarly, assigning an expression to a TensorMap causes its evaluation.  Like\ntensors of type TensorFixedSize, TensorMaps cannot be resized so they have to\nhave the rank and sizes of the expression that are assigned to them.\n\n#### Calling `eval()`.\n\nWhen you compute large composite expressions, you sometimes want to tell Eigen\nthat an intermediate value in the expression tree is worth evaluating ahead of\ntime.  This is done by inserting a call to the `eval()` method of the\nexpression Operation.\n\n    // The previous example could have been written:\n    Tensor<float, 3> result = ((t1 + t2) * 0.2f).exp();\n\n    // If you want to compute (t1 + t2) once ahead of time you can write:\n    Tensor<float, 3> result = ((t1 + t2).eval() * 0.2f).exp();\n\nSemantically, calling `eval()` is equivalent to materializing the value of\nthe expression in a temporary Tensor of the right size.  The code above in\neffect does:\n\n    // .eval() knows the size!\n    TensorFixedSize<float, Sizes<4, 4, 2>> tmp = t1 + t2;\n    Tensor<float, 3> result = (tmp * 0.2f).exp();\n\nNote that the return value of `eval()` is itself an Operation, so the\nfollowing code does not do what you may think:\n\n    // Here t3 is an evaluation Operation.  t3 has not been evaluated yet.\n    auto t3 = (t1 + t2).eval();\n\n    // You can use t3 in another expression.  Still no evaluation.\n    auto t4 = (t3 * 0.2f).exp();\n\n    // The value is evaluated when you assign the Operation to a Tensor, using\n    // an intermediate tensor to represent t3.x\n    Tensor<float, 3> result = t4;\n\nWhile in the examples above calling `eval()` does not make a difference in\nperformance, in other cases it can make a huge difference.  In the expression\nbelow the `broadcast()` expression causes the `X.maximum()` expression\nto be evaluated many times:\n\n    Tensor<...> X ...;\n    Tensor<...> Y = ((X - X.maximum(depth_dim).reshape(dims2d).broadcast(bcast))\n                     * beta).exp();\n\nInserting a call to `eval()` between the `maximum()` and\n`reshape()` calls guarantees that maximum() is only computed once and\ngreatly speeds-up execution:\n\n    Tensor<...> Y =\n      ((X - X.maximum(depth_dim).eval().reshape(dims2d).broadcast(bcast))\n        * beta).exp();\n\nIn the other example below, the tensor `Y` is both used in the expression\nand its assignment.  This is an aliasing problem and if the evaluation is not\ndone in the right order Y will be updated incrementally during the evaluation\nresulting in bogus results:\n\n     Tensor<...> Y ...;\n     Y = Y / (Y.sum(depth_dim).reshape(dims2d).broadcast(bcast));\n\nInserting a call to `eval()` between the `sum()` and `reshape()`\nexpressions ensures that the sum is computed before any updates to `Y` are\ndone.\n\n     Y = Y / (Y.sum(depth_dim).eval().reshape(dims2d).broadcast(bcast));\n\nNote that an eval around the full right hand side expression is not needed\nbecause the generated has to compute the i-th value of the right hand side\nbefore assigning it to the left hand side.\n\nHowever, if you were assigning the expression value to a shuffle of `Y`\nthen you would need to force an eval for correctness by adding an `eval()`\ncall for the right hand side:\n\n     Y.shuffle(...) =\n        (Y / (Y.sum(depth_dim).eval().reshape(dims2d).broadcast(bcast))).eval();\n\n\n#### Assigning to a `TensorRef`.\n\nIf you need to access only a few elements from the value of an expression you\ncan avoid materializing the value in a full tensor by using a TensorRef.\n\nA TensorRef is a small wrapper class for any Eigen Operation.  It provides\noverloads for the `()` operator that let you access individual values in\nthe expression.  TensorRef is convenient, because the Operation themselves do\nnot provide a way to access individual elements.\n\n    // Create a TensorRef for the expression.  The expression is not\n    // evaluated yet.\n    TensorRef<Tensor<float, 3> > ref = ((t1 + t2) * 0.2f).exp();\n\n    // Use \"ref\" to access individual elements.  The expression is evaluated\n    // on the fly.\n    float at_0 = ref(0, 0, 0);\n    cout << ref(0, 1, 0);\n\nOnly use TensorRef when you need a subset of the values of the expression.\nTensorRef only computes the values you access.  However note that if you are\ngoing to access all the values it will be much faster to materialize the\nresults in a Tensor first.\n\nIn some cases, if the full Tensor result would be very large, you may save\nmemory by accessing it as a TensorRef.  But not always.  So don't count on it.\n\n\n### Controlling How Expressions Are Evaluated\n\nThe tensor library provides several implementations of the various operations\nsuch as contractions and convolutions.  The implementations are optimized for\ndifferent environments: single threaded on CPU, multi threaded on CPU, or on a\nGPU using cuda.  Additional implementations may be added later.\n\nYou can choose which implementation to use with the `device()` call.  If\nyou do not choose an implementation explicitly the default implementation that\nuses a single thread on the CPU is used.\n\nThe default implementation has been optimized for recent Intel CPUs, taking\nadvantage of SSE, AVX, and FMA instructions.  Work is ongoing to tune the\nlibrary on ARM CPUs.  Note that you need to pass compiler-dependent flags\nto enable the use of SSE, AVX, and other instructions.\n\nFor example, the following code adds two tensors using the default\nsingle-threaded CPU implementation:\n\n    Tensor<float, 2> a(30, 40);\n    Tensor<float, 2> b(30, 40);\n    Tensor<float, 2> c = a + b;\n\nTo choose a different implementation you have to insert a `device()` call\nbefore the assignment of the result.  For technical C++ reasons this requires\nthat the Tensor for the result be declared on its own.  This means that you\nhave to know the size of the result.\n\n    Eigen::Tensor<float, 2> c(30, 40);\n    c.device(...) = a + b;\n\nThe call to `device()` must be the last call on the left of the operator=.\n\nYou must pass to the `device()` call an Eigen device object.  There are\npresently three devices you can use: DefaultDevice, ThreadPoolDevice and\nGpuDevice.\n\n\n#### Evaluating With the DefaultDevice\n\nThis is exactly the same as not inserting a `device()` call.\n\n    DefaultDevice my_device;\n    c.device(my_device) = a + b;\n\n#### Evaluating with a Thread Pool\n\n    // Create the Eigen ThreadPool\n    Eigen::ThreadPool pool(8 /* number of threads in pool */)\n\n    // Create the Eigen ThreadPoolDevice.\n    Eigen::ThreadPoolDevice my_device(&pool, 4 /* number of threads to use */);\n\n    // Now just use the device when evaluating expressions.\n    Eigen::Tensor<float, 2> c(30, 50);\n    c.device(my_device) = a.contract(b, dot_product_dims);\n\n\n#### Evaluating On GPU\n\nThis is presently a bit more complicated than just using a thread pool device.\nYou need to create a GPU device but you also need to explicitly allocate the\nmemory for tensors with cuda.\n\n\n## API Reference\n\n### Datatypes\n\nIn the documentation of the tensor methods and Operation we mention datatypes\nthat are tensor-type specific:\n\n#### `<Tensor-Type>::``Dimensions`\n\nActs like an array of ints.  Has an `int size` attribute, and can be\nindexed like an array to access individual values.  Used to represent the\ndimensions of a tensor.  See `dimensions()`.\n\n#### `<Tensor-Type>::``Index`\n\nActs like an `int`.  Used for indexing tensors along their dimensions.  See\n`operator()`, `dimension()`, and `size()`.\n\n#### `<Tensor-Type>::``Scalar`\n\nRepresents the datatype of individual tensor elements.  For example, for a\n`Tensor<float>`, `Scalar` is the type `float`.  See\n`setConstant()`.\n\n#### `<Operation>`\n\nWe use this pseudo type to indicate that a tensor Operation is returned by a\nmethod.  We indicate in the text the type and dimensions of the tensor that the\nOperation returns after evaluation.\n\nThe Operation will have to be evaluated, for example by assigning it to a\ntensor, before you can access the values of the resulting tensor.  You can also\naccess the values through a TensorRef.\n\n\n## Built-in Tensor Methods\n\nThese are usual C++ methods that act on tensors immediately.  They are not\nOperations which provide delayed evaluation of their results.  Unless specified\notherwise, all the methods listed below are available on all tensor classes:\nTensor, TensorFixedSize, and TensorMap.\n\n## Metadata\n\n### `int NumDimensions`\n\nConstant value indicating the number of dimensions of a Tensor.  This is also\nknown as the tensor \"rank\".\n\n      Eigen::Tensor<float, 2> a(3, 4);\n      cout << \"Dims \" << a.NumDimensions;\n      => Dims 2\n\n### `Dimensions dimensions()`\n\nReturns an array-like object representing the dimensions of the tensor.\nThe actual type of the `dimensions()` result is `<Tensor-Type>::``Dimensions`.\n\n    Eigen::Tensor<float, 2> a(3, 4);\n    const Eigen::Tensor<float, 2>::Dimensions& d = a.dimensions();\n    cout << \"Dim size: \" << d.size << \", dim 0: \" << d[0]\n         << \", dim 1: \" << d[1];\n    => Dim size: 2, dim 0: 3, dim 1: 4\n\nIf you use a C++11 compiler, you can use `auto` to simplify the code:\n\n    const auto& d = a.dimensions();\n    cout << \"Dim size: \" << d.size << \", dim 0: \" << d[0]\n         << \", dim 1: \" << d[1];\n    => Dim size: 2, dim 0: 3, dim 1: 4\n\n### `Index dimension(Index n)`\n\nReturns the n-th dimension of the tensor.  The actual type of the\n`dimension()` result is `<Tensor-Type>::``Index`, but you can\nalways use it like an int.\n\n      Eigen::Tensor<float, 2> a(3, 4);\n      int dim1 = a.dimension(1);\n      cout << \"Dim 1: \" << dim1;\n      => Dim 1: 4\n\n### `Index size()`\n\nReturns the total number of elements in the tensor.  This is the product of all\nthe tensor dimensions.  The actual type of the `size()` result is\n`<Tensor-Type>::``Index`, but you can always use it like an int.\n\n    Eigen::Tensor<float, 2> a(3, 4);\n    cout << \"Size: \" << a.size();\n    => Size: 12\n\n\n### Getting Dimensions From An Operation\n\nA few operations provide `dimensions()` directly,\ne.g. `TensorReslicingOp`.  Most operations defer calculating dimensions\nuntil the operation is being evaluated.  If you need access to the dimensions\nof a deferred operation, you can wrap it in a TensorRef (see Assigning to a\nTensorRef above), which provides `dimensions()` and `dimension()` as\nabove.\n\nTensorRef can also wrap the plain Tensor types, so this is a useful idiom in\ntemplated contexts where the underlying object could be either a raw Tensor\nor some deferred operation (e.g. a slice of a Tensor).  In this case, the\ntemplate code can wrap the object in a TensorRef and reason about its\ndimensionality while remaining agnostic to the underlying type.\n\n\n## Constructors\n\n### Tensor\n\nCreates a tensor of the specified size. The number of arguments must be equal\nto the rank of the tensor. The content of the tensor is not initialized.\n\n    Eigen::Tensor<float, 2> a(3, 4);\n    cout << \"NumRows: \" << a.dimension(0) << \" NumCols: \" << a.dimension(1) << endl;\n    => NumRows: 3 NumCols: 4\n\n### TensorFixedSize\n\nCreates a tensor of the specified size. The number of arguments in the Sizes<>\ntemplate parameter determines the rank of the tensor. The content of the tensor\nis not initialized.\n\n    Eigen::TensorFixedSize<float, Sizes<3, 4>> a;\n    cout << \"Rank: \" << a.rank() << endl;\n    => Rank: 2\n    cout << \"NumRows: \" << a.dimension(0) << \" NumCols: \" << a.dimension(1) << endl;\n    => NumRows: 3 NumCols: 4\n\n### TensorMap\n\nCreates a tensor mapping an existing array of data. The data must not be freed\nuntil the TensorMap is discarded, and the size of the data must be large enough\nto accommodate the coefficients of the tensor.\n\n    float data[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11};\n    Eigen::TensorMap<Tensor<float, 2>> a(data, 3, 4);\n    cout << \"NumRows: \" << a.dimension(0) << \" NumCols: \" << a.dimension(1) << endl;\n    => NumRows: 3 NumCols: 4\n    cout << \"a(1, 2): \" << a(1, 2) << endl;\n    => a(1, 2): 7\n\n\n## Contents Initialization\n\nWhen a new Tensor or a new TensorFixedSize are created, memory is allocated to\nhold all the tensor elements, but the memory is not initialized.  Similarly,\nwhen a new TensorMap is created on top of non-initialized memory the memory its\ncontents are not initialized.\n\nYou can use one of the methods below to initialize the tensor memory.  These\nhave an immediate effect on the tensor and return the tensor itself as a\nresult.  These are not tensor Operations which delay evaluation.\n\n### `<Tensor-Type> setConstant(const Scalar& val)`\n\nSets all elements of the tensor to the constant value `val`.  `Scalar`\nis the type of data stored in the tensor.  You can pass any value that is\nconvertible to that type.\n\nReturns the tensor itself in case you want to chain another call.\n\n    a.setConstant(12.3f);\n    cout << \"Constant: \" << endl << a << endl << endl;\n    =>\n    Constant:\n    12.3 12.3 12.3 12.3\n    12.3 12.3 12.3 12.3\n    12.3 12.3 12.3 12.3\n\nNote that `setConstant()` can be used on any tensor where the element type\nhas a copy constructor and an `operator=()`:\n\n    Eigen::Tensor<string, 2> a(2, 3);\n    a.setConstant(\"yolo\");\n    cout << \"String tensor: \" << endl << a << endl << endl;\n    =>\n    String tensor:\n    yolo yolo yolo\n    yolo yolo yolo\n\n\n### `<Tensor-Type> setZero()`\n\nFills the tensor with zeros.  Equivalent to `setConstant(Scalar(0))`.\nReturns the tensor itself in case you want to chain another call.\n\n    a.setZero();\n    cout << \"Zeros: \" << endl << a << endl << endl;\n    =>\n    Zeros:\n    0 0 0 0\n    0 0 0 0\n    0 0 0 0\n\n\n### `<Tensor-Type> setValues({..initializer_list})`\n\nFills the tensor with explicit values specified in a std::initializer_list.\nThe type of the initializer list depends on the type and rank of the tensor.\n\nIf the tensor has rank N, the initializer list must be nested N times.  The\nmost deeply nested lists must contains P scalars of the Tensor type where P is\nthe size of the last dimension of the Tensor.\n\nFor example, for a `TensorFixedSize<float, 2, 3>` the initializer list must\ncontains 2 lists of 3 floats each.\n\n`setValues()` returns the tensor itself in case you want to chain another\ncall.\n\n    Eigen::Tensor<float, 2> a(2, 3);\n    a.setValues({{0.0f, 1.0f, 2.0f}, {3.0f, 4.0f, 5.0f}});\n    cout << \"a\" << endl << a << endl << endl;\n    =>\n    a\n    0 1 2\n    3 4 5\n\nIf a list is too short, the corresponding elements of the tensor will not be\nchanged.  This is valid at each level of nesting.  For example the following\ncode only sets the values of the first row of the tensor.\n\n    Eigen::Tensor<int, 2> a(2, 3);\n    a.setConstant(1000);\n    a.setValues({{10, 20, 30}});\n    cout << \"a\" << endl << a << endl << endl;\n    =>\n    a\n    10   20   30\n    1000 1000 1000\n\n### `<Tensor-Type> setRandom()`\n\nFills the tensor with random values.  Returns the tensor itself in case you\nwant to chain another call.\n\n    a.setRandom();\n    cout << \"Random: \" << endl << a << endl << endl;\n    =>\n    Random:\n      0.680375    0.59688  -0.329554    0.10794\n     -0.211234   0.823295   0.536459 -0.0452059\n      0.566198  -0.604897  -0.444451   0.257742\n\nYou can customize `setRandom()` by providing your own random number\ngenerator as a template argument:\n\n    a.setRandom<MyRandomGenerator>();\n\nHere, `MyRandomGenerator` must be a struct with the following member\nfunctions, where Scalar and Index are the same as `<Tensor-Type>::``Scalar`\nand `<Tensor-Type>::``Index`.\n\nSee `struct UniformRandomGenerator` in TensorFunctors.h for an example.\n\n    // Custom number generator for use with setRandom().\n    struct MyRandomGenerator {\n      // Default and copy constructors. Both are needed\n      MyRandomGenerator() { }\n      MyRandomGenerator(const MyRandomGenerator& ) { }\n\n      // Return a random value to be used.  \"element_location\" is the\n      // location of the entry to set in the tensor, it can typically\n      // be ignored.\n      Scalar operator()(Eigen::DenseIndex element_location,\n                        Eigen::DenseIndex /*unused*/ = 0) const {\n        return <randomly generated value of type T>;\n      }\n\n      // Same as above but generates several numbers at a time.\n      typename internal::packet_traits<Scalar>::type packetOp(\n          Eigen::DenseIndex packet_location, Eigen::DenseIndex /*unused*/ = 0) const {\n        return <a packet of randomly generated values>;\n      }\n    };\n\nYou can also use one of the 2 random number generators that are part of the\ntensor library:\n*   UniformRandomGenerator\n*   NormalRandomGenerator\n\n\n## Data Access\n\nThe Tensor, TensorFixedSize, and TensorRef classes provide the following\naccessors to access the tensor coefficients:\n\n    const Scalar& operator()(const array<Index, NumIndices>& indices)\n    const Scalar& operator()(Index firstIndex, IndexTypes... otherIndices)\n    Scalar& operator()(const array<Index, NumIndices>& indices)\n    Scalar& operator()(Index firstIndex, IndexTypes... otherIndices)\n\nThe number of indices must be equal to the rank of the tensor. Moreover, these\naccessors are not available on tensor expressions. In order to access the\nvalues of a tensor expression, the expression must either be evaluated or\nwrapped in a TensorRef.\n\n\n### `Scalar* data()` and `const Scalar* data() const`\n\nReturns a pointer to the storage for the tensor.  The pointer is const if the\ntensor was const.  This allows direct access to the data.  The layout of the\ndata depends on the tensor layout: RowMajor or ColMajor.\n\nThis access is usually only needed for special cases, for example when mixing\nEigen Tensor code with other libraries.\n\nScalar is the type of data stored in the tensor.\n\n    Eigen::Tensor<float, 2> a(3, 4);\n    float* a_data = a.data();\n    a_data[0] = 123.45f;\n    cout << \"a(0, 0): \" << a(0, 0);\n    => a(0, 0): 123.45\n\n\n## Tensor Operations\n\nAll the methods documented below return non evaluated tensor `Operations`.\nThese can be chained: you can apply another Tensor Operation to the value\nreturned by the method.\n\nThe chain of Operation is evaluated lazily, typically when it is assigned to a\ntensor.  See \"Controlling when Expression are Evaluated\" for more details about\ntheir evaluation.\n\n### `<Operation> constant(const Scalar& val)`\n\nReturns a tensor of the same type and dimensions as the original tensor but\nwhere all elements have the value `val`.\n\nThis is useful, for example, when you want to add or subtract a constant from a\ntensor, or multiply every element of a tensor by a scalar.\n\n    Eigen::Tensor<float, 2> a(2, 3);\n    a.setConstant(1.0f);\n    Eigen::Tensor<float, 2> b = a + a.constant(2.0f);\n    Eigen::Tensor<float, 2> c = b * b.constant(0.2f);\n    cout << \"a\" << endl << a << endl << endl;\n    cout << \"b\" << endl << b << endl << endl;\n    cout << \"c\" << endl << c << endl << endl;\n    =>\n    a\n    1 1 1\n    1 1 1\n\n    b\n    3 3 3\n    3 3 3\n\n    c\n    0.6 0.6 0.6\n    0.6 0.6 0.6\n\n### `<Operation> random()`\n\nReturns a tensor of the same type and dimensions as the current tensor\nbut where all elements have random values.\n\nThis is for example useful to add random values to an existing tensor.\nThe generation of random values can be customized in the same manner\nas for `setRandom()`.\n\n    Eigen::Tensor<float, 2> a(2, 3);\n    a.setConstant(1.0f);\n    Eigen::Tensor<float, 2> b = a + a.random();\n    cout << \"a\" << endl << a << endl << endl;\n    cout << \"b\" << endl << b << endl << endl;\n    =>\n    a\n    1 1 1\n    1 1 1\n\n    b\n    1.68038   1.5662  1.82329\n    0.788766  1.59688 0.395103\n\n\n## Unary Element Wise Operations\n\nAll these operations take a single input tensor as argument and return a tensor\nof the same type and dimensions as the tensor to which they are applied.  The\nrequested operations are applied to each element independently.\n\n### `<Operation> operator-()`\n\nReturns a tensor of the same type and dimensions as the original tensor\ncontaining the opposite values of the original tensor.\n\n    Eigen::Tensor<float, 2> a(2, 3);\n    a.setConstant(1.0f);\n    Eigen::Tensor<float, 2> b = -a;\n    cout << \"a\" << endl << a << endl << endl;\n    cout << \"b\" << endl << b << endl << endl;\n    =>\n    a\n    1 1 1\n    1 1 1\n\n    b\n    -1 -1 -1\n    -1 -1 -1\n\n### `<Operation> sqrt()`\n\nReturns a tensor of the same type and dimensions as the original tensor\ncontaining the square roots of the original tensor.\n\n### `<Operation> rsqrt()`\n\nReturns a tensor of the same type and dimensions as the original tensor\ncontaining the inverse square roots of the original tensor.\n\n### `<Operation> square()`\n\nReturns a tensor of the same type and dimensions as the original tensor\ncontaining the squares of the original tensor values.\n\n### `<Operation> inverse()`\n\nReturns a tensor of the same type and dimensions as the original tensor\ncontaining the inverse of the original tensor values.\n\n### `<Operation> exp()`\n\nReturns a tensor of the same type and dimensions as the original tensor\ncontaining the exponential of the original tensor.\n\n### `<Operation> log()`\n\nReturns a tensor of the same type and dimensions as the original tensor\ncontaining the natural logarithms of the original tensor.\n\n### `<Operation> abs()`\n\nReturns a tensor of the same type and dimensions as the original tensor\ncontaining the absolute values of the original tensor.\n\n### `<Operation> pow(Scalar exponent)`\n\nReturns a tensor of the same type and dimensions as the original tensor\ncontaining the coefficients of the original tensor to the power of the\nexponent.\n\nThe type of the exponent, Scalar, is always the same as the type of the\ntensor coefficients.  For example, only integer exponents can be used in\nconjuntion with tensors of integer values.\n\nYou can use cast() to lift this restriction.  For example this computes\ncubic roots of an int Tensor:\n\n    Eigen::Tensor<int, 2> a(2, 3);\n    a.setValues({{0, 1, 8}, {27, 64, 125}});\n    Eigen::Tensor<double, 2> b = a.cast<double>().pow(1.0 / 3.0);\n    cout << \"a\" << endl << a << endl << endl;\n    cout << \"b\" << endl << b << endl << endl;\n    =>\n    a\n    0   1   8\n    27  64 125\n\n    b\n    0 1 2\n    3 4 5\n\n### `<Operation>  operator * (Scalar scale)`\n\nMultiplies all the coefficients of the input tensor by the provided scale.\n\n### `<Operation>  cwiseMax(Scalar threshold)`\nTODO\n\n### `<Operation>  cwiseMin(Scalar threshold)`\nTODO\n\n### `<Operation>  unaryExpr(const CustomUnaryOp& func)`\nTODO\n\n\n## Binary Element Wise Operations\n\nThese operations take two input tensors as arguments. The 2 input tensors should\nbe of the same type and dimensions. The result is a tensor of the same\ndimensions as the tensors to which they are applied, and unless otherwise\nspecified it is also of the same type. The requested operations are applied to\neach pair of elements independently.\n\n### `<Operation> operator+(const OtherDerived& other)`\n\nReturns a tensor of the same type and dimensions as the input tensors\ncontaining the coefficient wise sums of the inputs.\n\n### `<Operation> operator-(const OtherDerived& other)`\n\nReturns a tensor of the same type and dimensions as the input tensors\ncontaining the coefficient wise differences of the inputs.\n\n### `<Operation> operator*(const OtherDerived& other)`\n\nReturns a tensor of the same type and dimensions as the input tensors\ncontaining the coefficient wise products of the inputs.\n\n### `<Operation> operator/(const OtherDerived& other)`\n\nReturns a tensor of the same type and dimensions as the input tensors\ncontaining the coefficient wise quotients of the inputs.\n\nThis operator is not supported for integer types.\n\n### `<Operation> cwiseMax(const OtherDerived& other)`\n\nReturns a tensor of the same type and dimensions as the input tensors\ncontaining the coefficient wise maximums of the inputs.\n\n### `<Operation> cwiseMin(const OtherDerived& other)`\n\nReturns a tensor of the same type and dimensions as the input tensors\ncontaining the coefficient wise mimimums of the inputs.\n\n### `<Operation> Logical operators`\n\nThe following logical operators are supported as well:\n\n*   operator&&(const OtherDerived& other)\n*   operator||(const OtherDerived& other)\n*   operator<(const OtherDerived& other)\n*   operator<=(const OtherDerived& other)\n*   operator>(const OtherDerived& other)\n*   operator>=(const OtherDerived& other)\n*   operator==(const OtherDerived& other)\n*   operator!=(const OtherDerived& other)\n\nThey all return a tensor of boolean values.\n\n\n## Selection (select(const ThenDerived& thenTensor, const ElseDerived& elseTensor)\n\nSelection is a coefficient-wise ternary operator that is the tensor equivalent\nto the if-then-else operation.\n\n    Tensor<bool, 3> if = ...;\n    Tensor<float, 3> then = ...;\n    Tensor<float, 3> else = ...;\n    Tensor<float, 3> result = if.select(then, else);\n\nThe 3 arguments must be of the same dimensions, which will also be the dimension\nof the result.  The 'if' tensor must be of type boolean, the 'then' and the\n'else' tensor must be of the same type, which will also be the type of the\nresult.\n\nEach coefficient in the result is equal to the corresponding coefficient in the\n'then' tensor if the corresponding value in the 'if' tensor is true. If not, the\nresulting coefficient will come from the 'else' tensor.\n\n\n## Contraction\n\nTensor *contractions* are a generalization of the matrix product to the\nmultidimensional case.\n\n    // Create 2 matrices using tensors of rank 2\n    Eigen::Tensor<int, 2> a(2, 3);\n    a.setValues({{1, 2, 3}, {6, 5, 4}});\n    Eigen::Tensor<int, 2> b(3, 2);\n    b.setValues({{1, 2}, {4, 5}, {5, 6}});\n\n    // Compute the traditional matrix product\n    Eigen::array<Eigen::IndexPair<int>, 1> product_dims = { Eigen::IndexPair<int>(1, 0) };\n    Eigen::Tensor<int, 2> AB = a.contract(b, product_dims);\n\n    // Compute the product of the transpose of the matrices\n    Eigen::array<Eigen::IndexPair<int>, 1> transposed_product_dims = { Eigen::IndexPair<int>(0, 1) };\n    Eigen::Tensor<int, 2> AtBt = a.contract(b, transposed_product_dims);\n\n    // Contraction to scalar value using a double contraction.\n    // First coordinate of both tensors are contracted as well as both second coordinates, i.e., this computes the sum of the squares of the elements.\n    Eigen::array<Eigen::IndexPair<int>, 2> double_contraction_product_dims = { Eigen::IndexPair<int>(0, 0), Eigen::IndexPair<int>(1, 1) };\n    Eigen::Tensor<int, 0> AdoubleContractedA = a.contract(a, double_contraction_product_dims);\n\n    // Extracting the scalar value of the tensor contraction for further usage\n    int value = AdoubleContractedA(0);\n\n## Reduction Operations\n\nA *Reduction* operation returns a tensor with fewer dimensions than the\noriginal tensor.  The values in the returned tensor are computed by applying a\n*reduction operator* to slices of values from the original tensor.  You specify\nthe dimensions along which the slices are made.\n\nThe Eigen Tensor library provides a set of predefined reduction operators such\nas `maximum()` and `sum()` and lets you define additional operators by\nimplementing a few methods from a reductor template.\n\n### Reduction Dimensions\n\nAll reduction operations take a single parameter of type\n`<TensorType>::``Dimensions` which can always be specified as an array of\nints.  These are called the \"reduction dimensions.\"  The values are the indices\nof the dimensions of the input tensor over which the reduction is done.  The\nparameter can have at most as many element as the rank of the input tensor;\neach element must be less than the tensor rank, as it indicates one of the\ndimensions to reduce.\n\nEach dimension of the input tensor should occur at most once in the reduction\ndimensions as the implementation does not remove duplicates.\n\nThe order of the values in the reduction dimensions does not affect the\nresults, but the code may execute faster if you list the dimensions in\nincreasing order.\n\nExample: Reduction along one dimension.\n\n    // Create a tensor of 2 dimensions\n    Eigen::Tensor<int, 2> a(2, 3);\n    a.setValues({{1, 2, 3}, {6, 5, 4}});\n    // Reduce it along the second dimension (1)...\n    Eigen::array<int, 1> dims({1 /* dimension to reduce */});\n    // ...using the \"maximum\" operator.\n    // The result is a tensor with one dimension.  The size of\n    // that dimension is the same as the first (non-reduced) dimension of a.\n    Eigen::Tensor<int, 1> b = a.maximum(dims);\n    cout << \"a\" << endl << a << endl << endl;\n    cout << \"b\" << endl << b << endl << endl;\n    =>\n    a\n    1 2 3\n    6 5 4\n\n    b\n    3\n    6\n\nExample: Reduction along two dimensions.\n\n    Eigen::Tensor<float, 3, Eigen::ColMajor> a(2, 3, 4);\n    a.setValues({{{0.0f, 1.0f, 2.0f, 3.0f},\n                  {7.0f, 6.0f, 5.0f, 4.0f},\n                  {8.0f, 9.0f, 10.0f, 11.0f}},\n                 {{12.0f, 13.0f, 14.0f, 15.0f},\n                  {19.0f, 18.0f, 17.0f, 16.0f},\n                  {20.0f, 21.0f, 22.0f, 23.0f}}});\n    // The tensor a has 3 dimensions.  We reduce along the\n    // first 2, resulting in a tensor with a single dimension\n    // of size 4 (the last dimension of a.)\n    // Note that we pass the array of reduction dimensions\n    // directly to the maximum() call.\n    Eigen::Tensor<float, 1, Eigen::ColMajor> b =\n        a.maximum(Eigen::array<int, 2>({0, 1}));\n    cout << \"b\" << endl << b << endl << endl;\n    =>\n    b\n    20\n    21\n    22\n    23\n\n#### Reduction along all dimensions\n\nAs a special case, if you pass no parameter to a reduction operation the\noriginal tensor is reduced along *all* its dimensions.  The result is a\nscalar, represented as a zero-dimension tensor.\n\n    Eigen::Tensor<float, 3> a(2, 3, 4);\n    a.setValues({{{0.0f, 1.0f, 2.0f, 3.0f},\n                  {7.0f, 6.0f, 5.0f, 4.0f},\n                  {8.0f, 9.0f, 10.0f, 11.0f}},\n                 {{12.0f, 13.0f, 14.0f, 15.0f},\n                  {19.0f, 18.0f, 17.0f, 16.0f},\n                  {20.0f, 21.0f, 22.0f, 23.0f}}});\n    // Reduce along all dimensions using the sum() operator.\n    Eigen::Tensor<float, 0> b = a.sum();\n    cout << \"b\" << endl << b << endl << endl;\n    =>\n    b\n    276\n\n\n### `<Operation> sum(const Dimensions& new_dims)`\n### `<Operation> sum()`\n\nReduce a tensor using the sum() operator.  The resulting values\nare the sum of the reduced values.\n\n### `<Operation> mean(const Dimensions& new_dims)`\n### `<Operation> mean()`\n\nReduce a tensor using the mean() operator.  The resulting values\nare the mean of the reduced values.\n\n### `<Operation> maximum(const Dimensions& new_dims)`\n### `<Operation> maximum()`\n\nReduce a tensor using the maximum() operator.  The resulting values are the\nlargest of the reduced values.\n\n### `<Operation> minimum(const Dimensions& new_dims)`\n### `<Operation> minimum()`\n\nReduce a tensor using the minimum() operator.  The resulting values\nare the smallest of the reduced values.\n\n### `<Operation> prod(const Dimensions& new_dims)`\n### `<Operation> prod()`\n\nReduce a tensor using the prod() operator.  The resulting values\nare the product of the reduced values.\n\n### `<Operation> all(const Dimensions& new_dims)`\n### `<Operation> all()`\nReduce a tensor using the all() operator.  Casts tensor to bool and then checks\nwhether all elements are true.  Runs through all elements rather than\nshort-circuiting, so may be significantly inefficient.\n\n### `<Operation> any(const Dimensions& new_dims)`\n### `<Operation> any()`\nReduce a tensor using the any() operator.  Casts tensor to bool and then checks\nwhether any element is true.  Runs through all elements rather than\nshort-circuiting, so may be significantly inefficient.\n\n\n### `<Operation> reduce(const Dimensions& new_dims, const Reducer& reducer)`\n\nReduce a tensor using a user-defined reduction operator.  See `SumReducer`\nin TensorFunctors.h for information on how to implement a reduction operator.\n\n\n## Trace\n\nA *Trace* operation returns a tensor with fewer dimensions than the original\ntensor. It returns a tensor whose elements are the sum of the elements of the\noriginal tensor along the main diagonal for a list of specified dimensions, the\n\"trace dimensions\". Similar to the `Reduction Dimensions`, the trace dimensions\nare passed as an input parameter to the operation, are of type `<TensorType>::``Dimensions`\n, and have the same requirements when passed as an input parameter. In addition,\nthe trace dimensions must have the same size.\n\nExample: Trace along 2 dimensions.\n\n    // Create a tensor of 3 dimensions\n    Eigen::Tensor<int, 3> a(2, 2, 3);\n    a.setValues({{{1, 2, 3}, {4, 5, 6}}, {{7, 8, 9}, {10, 11, 12}}});\n    // Specify the dimensions along which the trace will be computed.\n    // In this example, the trace can only be computed along the dimensions\n    // with indices 0 and 1\n    Eigen::array<int, 2> dims({0, 1});\n    // The output tensor contains all but the trace dimensions.\n    Tensor<int, 1> a_trace = a.trace(dims);\n    cout << \"a_trace:\" << endl;\n    cout << a_trace << endl;\n    =>\n    a_trace:\n    11\n    13\n    15\n\n\n### `<Operation> trace(const Dimensions& new_dims)`\n### `<Operation> trace()`\n\nAs a special case, if no parameter is passed to the operation, trace is computed\nalong *all* dimensions of the input tensor.\n\nExample: Trace along all dimensions.\n\n    // Create a tensor of 3 dimensions, with all dimensions having the same size.\n    Eigen::Tensor<int, 3> a(3, 3, 3);\n    a.setValues({{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}},\n                {{10, 11, 12}, {13, 14, 15}, {16, 17, 18}},\n                {{19, 20, 21}, {22, 23, 24}, {25, 26, 27}}});\n    // Result is a zero dimension tensor\n    Tensor<int, 0> a_trace = a.trace();\n    cout<<\"a_trace:\"<<endl;\n    cout<<a_trace<<endl;\n    =>\n    a_trace:\n    42\n\n\n## Scan Operations\n\nA *Scan* operation returns a tensor with the same dimensions as the original\ntensor. The operation performs an inclusive scan along the specified\naxis, which means it computes a running total along the axis for a given\nreduction operation.\nIf the reduction operation corresponds to summation, then this computes the\nprefix sum of the tensor along the given axis.\n\nExample:\ndd a comment to this line\n\n    // Create a tensor of 2 dimensions\n    Eigen::Tensor<int, 2> a(2, 3);\n    a.setValues({{1, 2, 3}, {4, 5, 6}});\n    // Scan it along the second dimension (1) using summation\n    Eigen::Tensor<int, 2> b = a.cumsum(1);\n    // The result is a tensor with the same size as the input\n    cout << \"a\" << endl << a << endl << endl;\n    cout << \"b\" << endl << b << endl << endl;\n    =>\n    a\n    1 2 3\n    4 5 6\n\n    b\n    1  3  6\n    4  9 15\n\n### `<Operation> cumsum(const Index& axis)`\n\nPerform a scan by summing consecutive entries.\n\n### `<Operation> cumprod(const Index& axis)`\n\nPerform a scan by multiplying consecutive entries.\n\n\n## Convolutions\n\n### `<Operation> convolve(const Kernel& kernel, const Dimensions& dims)`\n\nReturns a tensor that is the output of the convolution of the input tensor with the kernel,\nalong the specified dimensions of the input tensor. The dimension size for dimensions of the output tensor\nwhich were part of the convolution will be reduced by the formula:\noutput_dim_size = input_dim_size - kernel_dim_size + 1 (requires: input_dim_size >= kernel_dim_size).\nThe dimension sizes for dimensions that were not part of the convolution will remain the same.\nPerformance of the convolution can depend on the length of the stride(s) of the input tensor dimension(s) along which the\nconvolution is computed (the first dimension has the shortest stride for ColMajor, whereas RowMajor's shortest stride is\nfor the last dimension).\n\n    // Compute convolution along the second and third dimension.\n    Tensor<float, 4, DataLayout> input(3, 3, 7, 11);\n    Tensor<float, 2, DataLayout> kernel(2, 2);\n    Tensor<float, 4, DataLayout> output(3, 2, 6, 11);\n    input.setRandom();\n    kernel.setRandom();\n\n    Eigen::array<ptrdiff_t, 2> dims({1, 2});  // Specify second and third dimension for convolution.\n    output = input.convolve(kernel, dims);\n\n    for (int i = 0; i < 3; ++i) {\n      for (int j = 0; j < 2; ++j) {\n        for (int k = 0; k < 6; ++k) {\n          for (int l = 0; l < 11; ++l) {\n            const float result = output(i,j,k,l);\n            const float expected = input(i,j+0,k+0,l) * kernel(0,0) +\n                                   input(i,j+1,k+0,l) * kernel(1,0) +\n                                   input(i,j+0,k+1,l) * kernel(0,1) +\n                                   input(i,j+1,k+1,l) * kernel(1,1);\n            VERIFY_IS_APPROX(result, expected);\n          }\n        }\n      }\n    }\n\n\n## Geometrical Operations\n\nThese operations return a Tensor with different dimensions than the original\nTensor.  They can be used to access slices of tensors, see them with different\ndimensions, or pad tensors with additional data.\n\n### `<Operation> reshape(const Dimensions& new_dims)`\n\nReturns a view of the input tensor that has been reshaped to the specified\nnew dimensions.  The argument new_dims is an array of Index values.  The\nrank of the resulting tensor is equal to the number of elements in new_dims.\n\nThe product of all the sizes in the new dimension array must be equal to\nthe number of elements in the input tensor.\n\n    // Increase the rank of the input tensor by introducing a new dimension\n    // of size 1.\n    Tensor<float, 2> input(7, 11);\n    array<int, 3> three_dims{{7, 11, 1}};\n    Tensor<float, 3> result = input.reshape(three_dims);\n\n    // Decrease the rank of the input tensor by merging 2 dimensions;\n    array<int, 1> one_dim{{7 * 11}};\n    Tensor<float, 1> result = input.reshape(one_dim);\n\nThis operation does not move any data in the input tensor, so the resulting\ncontents of a reshaped Tensor depend on the data layout of the original Tensor.\n\nFor example this is what happens when you `reshape()` a 2D ColMajor tensor\nto one dimension:\n\n    Eigen::Tensor<float, 2, Eigen::ColMajor> a(2, 3);\n    a.setValues({{0.0f, 100.0f, 200.0f}, {300.0f, 400.0f, 500.0f}});\n    Eigen::array<Eigen::DenseIndex, 1> one_dim({3 * 2});\n    Eigen::Tensor<float, 1, Eigen::ColMajor> b = a.reshape(one_dim);\n    cout << \"b\" << endl << b << endl;\n    =>\n    b\n      0\n    300\n    100\n    400\n    200\n    500\n\nThis is what happens when the 2D Tensor is RowMajor:\n\n    Eigen::Tensor<float, 2, Eigen::RowMajor> a(2, 3);\n    a.setValues({{0.0f, 100.0f, 200.0f}, {300.0f, 400.0f, 500.0f}});\n    Eigen::array<Eigen::DenseIndex, 1> one_dim({3 * 2});\n    Eigen::Tensor<float, 1, Eigen::RowMajor> b = a.reshape(one_dim);\n    cout << \"b\" << endl << b << endl;\n    =>\n    b\n      0\n    100\n    200\n    300\n    400\n    500\n\nThe reshape operation is a lvalue. In other words, it can be used on the left\nside of the assignment operator.\n\nThe previous example can be rewritten as follow:\n\n    Eigen::Tensor<float, 2, Eigen::ColMajor> a(2, 3);\n    a.setValues({{0.0f, 100.0f, 200.0f}, {300.0f, 400.0f, 500.0f}});\n    Eigen::array<Eigen::DenseIndex, 2> two_dim({2, 3});\n    Eigen::Tensor<float, 1, Eigen::ColMajor> b(6);\n    b.reshape(two_dim) = a;\n    cout << \"b\" << endl << b << endl;\n    =>\n    b\n      0\n    300\n    100\n    400\n    200\n    500\n\nNote that \"b\" itself was not reshaped but that instead the assignment is done to\nthe reshape view of b.\n\n\n### `<Operation> shuffle(const Shuffle& shuffle)`\n\nReturns a copy of the input tensor whose dimensions have been\nreordered according to the specified permutation. The argument shuffle\nis an array of Index values. Its size is the rank of the input\ntensor. It must contain a permutation of 0, 1, ..., rank - 1. The i-th\ndimension of the output tensor equals to the size of the shuffle[i]-th\ndimension of the input tensor. For example:\n\n    // Shuffle all dimensions to the left by 1.\n    Tensor<float, 3> input(20, 30, 50);\n    // ... set some values in input.\n    Tensor<float, 3> output = input.shuffle({1, 2, 0})\n\n    eigen_assert(output.dimension(0) == 30);\n    eigen_assert(output.dimension(1) == 50);\n    eigen_assert(output.dimension(2) == 20);\n\nIndices into the output tensor are shuffled accordingly to formulate\nindices into the input tensor. For example, one can assert in the above\ncode snippet that:\n\n    eigen_assert(output(3, 7, 11) == input(11, 3, 7));\n\nIn general, one can assert that\n\n    eigen_assert(output(..., indices[shuffle[i]], ...) ==\n                 input(..., indices[i], ...))\n\nThe shuffle operation results in a lvalue, which means that it can be assigned\nto. In other words, it can be used on the left side of the assignment operator.\n\nLet's rewrite the previous example to take advantage of this feature:\n\n    // Shuffle all dimensions to the left by 1.\n    Tensor<float, 3> input(20, 30, 50);\n    // ... set some values in input.\n    Tensor<float, 3> output(30, 50, 20);\n    output.shuffle({2, 0, 1}) = input;\n\n\n### `<Operation> stride(const Strides& strides)`\n\nReturns a view of the input tensor that strides (skips stride-1\nelements) along each of the dimensions.  The argument strides is an\narray of Index values.  The dimensions of the resulting tensor are\nceil(input_dimensions[i] / strides[i]).\n\nFor example this is what happens when you `stride()` a 2D tensor:\n\n    Eigen::Tensor<int, 2> a(4, 3);\n    a.setValues({{0, 100, 200}, {300, 400, 500}, {600, 700, 800}, {900, 1000, 1100}});\n    Eigen::array<Eigen::DenseIndex, 2> strides({3, 2});\n    Eigen::Tensor<int, 2> b = a.stride(strides);\n    cout << \"b\" << endl << b << endl;\n    =>\n    b\n       0   200\n     900  1100\n\nIt is possible to assign a tensor to a stride:\n    Tensor<float, 3> input(20, 30, 50);\n    // ... set some values in input.\n    Tensor<float, 3> output(40, 90, 200);\n    output.stride({2, 3, 4}) = input;\n\n\n### `<Operation> slice(const StartIndices& offsets, const Sizes& extents)`\n\nReturns a sub-tensor of the given tensor. For each dimension i, the slice is\nmade of the coefficients stored between offset[i] and offset[i] + extents[i] in\nthe input tensor.\n\n    Eigen::Tensor<int, 2> a(4, 3);\n    a.setValues({{0, 100, 200}, {300, 400, 500},\n                 {600, 700, 800}, {900, 1000, 1100}});\n    Eigen::array<int, 2> offsets = {1, 0};\n    Eigen::array<int, 2> extents = {2, 2};\n    Eigen::Tensor<int, 1> slice = a.slice(offsets, extents);\n    cout << \"a\" << endl << a << endl;\n    =>\n    a\n       0   100   200\n     300   400   500\n     600   700   800\n     900  1000  1100\n    cout << \"slice\" << endl << slice << endl;\n    =>\n    slice\n     300   400\n     600   700\n\n\n### `<Operation> chip(const Index offset, const Index dim)`\n\nA chip is a special kind of slice. It is the subtensor at the given offset in\nthe dimension dim. The returned tensor has one fewer dimension than the input\ntensor: the dimension dim is removed.\n\nFor example, a matrix chip would be either a row or a column of the input\nmatrix.\n\n    Eigen::Tensor<int, 2> a(4, 3);\n    a.setValues({{0, 100, 200}, {300, 400, 500},\n                 {600, 700, 800}, {900, 1000, 1100}});\n    Eigen::Tensor<int, 1> row_3 = a.chip(2, 0);\n    Eigen::Tensor<int, 1> col_2 = a.chip(1, 1);\n    cout << \"a\" << endl << a << endl;\n    =>\n    a\n       0   100   200\n     300   400   500\n     600   700   800\n     900  1000  1100\n    cout << \"row_3\" << endl << row_3 << endl;\n    =>\n    row_3\n       600   700   800\n    cout << \"col_2\" << endl << col_2 << endl;\n    =>\n    col_2\n       100   400   700    1000\n\nIt is possible to assign values to a tensor chip since the chip operation is a\nlvalue. For example:\n\n    Eigen::Tensor<int, 1> a(3);\n    a.setValues({{100, 200, 300}});\n    Eigen::Tensor<int, 2> b(2, 3);\n    b.setZero();\n    b.chip(0, 0) = a;\n    cout << \"a\" << endl << a << endl;\n    =>\n    a\n     100\n     200\n     300\n    cout << \"b\" << endl << b << endl;\n    =>\n    b\n       100   200   300\n         0     0     0\n\n\n### `<Operation> reverse(const ReverseDimensions& reverse)`\n\nReturns a view of the input tensor that reverses the order of the coefficients\nalong a subset of the dimensions.  The argument reverse is an array of boolean\nvalues that indicates whether or not the order of the coefficients should be\nreversed along each of the dimensions.  This operation preserves the dimensions\nof the input tensor.\n\nFor example this is what happens when you `reverse()` the first dimension\nof a 2D tensor:\n\n    Eigen::Tensor<int, 2> a(4, 3);\n    a.setValues({{0, 100, 200}, {300, 400, 500},\n                {600, 700, 800}, {900, 1000, 1100}});\n    Eigen::array<bool, 2> reverse({true, false});\n    Eigen::Tensor<int, 2> b = a.reverse(reverse);\n    cout << \"a\" << endl << a << endl << \"b\" << endl << b << endl;\n    =>\n    a\n       0   100   200\n     300   400   500\n     600   700   800\n     900  1000  1100\n    b\n     900  1000  1100\n     600   700   800\n     300   400   500\n       0   100   200\n\n\n### `<Operation> broadcast(const Broadcast& broadcast)`\n\nReturns a view of the input tensor in which the input is replicated one to many\ntimes.\nThe broadcast argument specifies how many copies of the input tensor need to be\nmade in each of the dimensions.\n\n    Eigen::Tensor<int, 2> a(2, 3);\n    a.setValues({{0, 100, 200}, {300, 400, 500}});\n    Eigen::array<int, 2> bcast({3, 2});\n    Eigen::Tensor<int, 2> b = a.broadcast(bcast);\n    cout << \"a\" << endl << a << endl << \"b\" << endl << b << endl;\n    =>\n    a\n       0   100   200\n     300   400   500\n    b\n       0   100   200    0   100   200\n     300   400   500  300   400   500\n       0   100   200    0   100   200\n     300   400   500  300   400   500\n       0   100   200    0   100   200\n     300   400   500  300   400   500\n\n### `<Operation> concatenate(const OtherDerived& other, Axis axis)`\n\nTODO\n\n### `<Operation>  pad(const PaddingDimensions& padding)`\n\nReturns a view of the input tensor in which the input is padded with zeros.\n\n    Eigen::Tensor<int, 2> a(2, 3);\n    a.setValues({{0, 100, 200}, {300, 400, 500}});\n    Eigen::array<pair<int, int>, 2> paddings;\n    paddings[0] = make_pair(0, 1);\n    paddings[1] = make_pair(2, 3);\n    Eigen::Tensor<int, 2> b = a.pad(paddings);\n    cout << \"a\" << endl << a << endl << \"b\" << endl << b << endl;\n    =>\n    a\n       0   100   200\n     300   400   500\n    b\n       0     0     0    0\n       0     0     0    0\n       0   100   200    0\n     300   400   500    0\n       0     0     0    0\n       0     0     0    0\n       0     0     0    0\n\n\n### `<Operation>  extract_patches(const PatchDims& patch_dims)`\n\nReturns a tensor of coefficient patches extracted from the input tensor, where\neach patch is of dimension specified by 'patch_dims'. The returned tensor has\none greater dimension than the input tensor, which is used to index each patch.\nThe patch index in the output tensor depends on the data layout of the input\ntensor: the patch index is the last dimension ColMajor layout, and the first\ndimension in RowMajor layout.\n\nFor example, given the following input tensor:\n\n    Eigen::Tensor<float, 2, DataLayout> tensor(3,4);\n    tensor.setValues({{0.0f, 1.0f, 2.0f, 3.0f},\n                      {4.0f, 5.0f, 6.0f, 7.0f},\n                      {8.0f, 9.0f, 10.0f, 11.0f}});\n\n    cout << \"tensor: \" << endl << tensor << endl;\n    =>\n    tensor:\n     0   1   2   3\n     4   5   6   7\n     8   9  10  11\n\nSix 2x2 patches can be extracted and indexed using the following code:\n\n    Eigen::Tensor<float, 3, DataLayout> patch;\n    Eigen::array<ptrdiff_t, 2> patch_dims;\n    patch_dims[0] = 2;\n    patch_dims[1] = 2;\n    patch = tensor.extract_patches(patch_dims);\n    for (int k = 0; k < 6; ++k) {\n      cout << \"patch index: \" << k << endl;\n      for (int i = 0; i < 2; ++i) {\n    \tfor (int j = 0; j < 2; ++j) {\n    \t  if (DataLayout == ColMajor) {\n    \t\tcout << patch(i, j, k) << \" \";\n    \t  } else {\n    \t\tcout << patch(k, i, j) << \" \";\n    \t  }\n    \t}\n    \tcout << endl;\n      }\n    }\n\nThis code results in the following output when the data layout is ColMajor:\n\n    patch index: 0\n    0 1\n    4 5\n    patch index: 1\n    4 5\n    8 9\n    patch index: 2\n    1 2\n    5 6\n    patch index: 3\n    5 6\n    9 10\n    patch index: 4\n    2 3\n    6 7\n    patch index: 5\n    6 7\n    10 11\n\nThis code results in the following output when the data layout is RowMajor:\n(NOTE: the set of patches is the same as in ColMajor, but are indexed differently).\n\n    patch index: 0\n    0 1\n    4 5\n    patch index: 1\n    1 2\n    5 6\n    patch index: 2\n    2 3\n    6 7\n    patch index: 3\n    4 5\n    8 9\n    patch index: 4\n    5 6\n    9 10\n    patch index: 5\n    6 7\n    10 11\n\n### `<Operation>  extract_image_patches(const Index patch_rows, const Index patch_cols, const Index row_stride, const Index col_stride, const PaddingType padding_type)`\n\nReturns a tensor of coefficient image patches extracted from the input tensor,\nwhich is expected to have dimensions ordered as follows (depending on the data\nlayout of the input tensor, and the number of additional dimensions 'N'):\n\n*) ColMajor\n1st dimension: channels (of size d)\n2nd dimension: rows (of size r)\n3rd dimension: columns (of size c)\n4th-Nth dimension: time (for video) or batch (for bulk processing).\n\n*) RowMajor (reverse order of ColMajor)\n1st-Nth dimension: time (for video) or batch (for bulk processing).\nN+1'th dimension: columns (of size c)\nN+2'th dimension: rows (of size r)\nN+3'th dimension: channels (of size d)\n\nThe returned tensor has one greater dimension than the input tensor, which is\nused to index each patch. The patch index in the output tensor depends on the\ndata layout of the input tensor: the patch index is the 4'th dimension in\nColMajor layout, and the 4'th from the last dimension in RowMajor layout.\n\nFor example, given the following input tensor with the following dimension\nsizes:\n *) depth:   2\n *) rows:    3\n *) columns: 5\n *) batch:   7\n\n    Tensor<float, 4> tensor(2,3,5,7);\n    Tensor<float, 4, RowMajor> tensor_row_major = tensor.swap_layout();\n\n2x2 image patches can be extracted and indexed using the following code:\n\n*) 2D patch: ColMajor (patch indexed by second-to-last dimension)\n\n    Tensor<float, 5> twod_patch;\n    twod_patch = tensor.extract_image_patches<2, 2>();\n    // twod_patch.dimension(0) == 2\n    // twod_patch.dimension(1) == 2\n    // twod_patch.dimension(2) == 2\n    // twod_patch.dimension(3) == 3*5\n    // twod_patch.dimension(4) == 7\n\n*) 2D patch: RowMajor (patch indexed by the second dimension)\n\n    Tensor<float, 5, RowMajor> twod_patch_row_major;\n    twod_patch_row_major = tensor_row_major.extract_image_patches<2, 2>();\n    // twod_patch_row_major.dimension(0) == 7\n    // twod_patch_row_major.dimension(1) == 3*5\n    // twod_patch_row_major.dimension(2) == 2\n    // twod_patch_row_major.dimension(3) == 2\n    // twod_patch_row_major.dimension(4) == 2\n\n## Special Operations\n\n### `<Operation> cast<T>()`\n\nReturns a tensor of type T with the same dimensions as the original tensor.\nThe returned tensor contains the values of the original tensor converted to\ntype T.\n\n    Eigen::Tensor<float, 2> a(2, 3);\n    Eigen::Tensor<int, 2> b = a.cast<int>();\n\nThis can be useful for example if you need to do element-wise division of\nTensors of integers.  This is not currently supported by the Tensor library\nbut you can easily cast the tensors to floats to do the division:\n\n    Eigen::Tensor<int, 2> a(2, 3);\n    a.setValues({{0, 1, 2}, {3, 4, 5}});\n    Eigen::Tensor<int, 2> b =\n        (a.cast<float>() / a.constant(2).cast<float>()).cast<int>();\n    cout << \"a\" << endl << a << endl << endl;\n    cout << \"b\" << endl << b << endl << endl;\n    =>\n    a\n    0 1 2\n    3 4 5\n\n    b\n    0 0 1\n    1 2 2\n\n\n### `<Operation>     eval()`\n\nTODO\n\n\n## Representation of scalar values\n\nScalar values are often represented by tensors of size 1 and rank 0.For example\nTensor<T, N>::maximum() currently returns a Tensor<T, 0>. Similarly, the inner\nproduct of 2 1d tensors (through contractions) returns a 0d tensor.\n\n## Limitations\n\n*   The number of tensor dimensions is currently limited to 250 when using a\n    compiler that supports cxx11. It is limited to only 5 for older compilers.\n*   The IndexList class requires a cxx11 compliant compiler. You can use an\n    array of indices instead if you don't have access to a modern compiler.\n*   On GPUs only floating point values are properly tested and optimized for.\n*   Complex and integer values are known to be broken on GPUs. If you try to use\n    them you'll most likely end up triggering a static assertion failure such as\n    EIGEN_STATIC_ASSERT(packetSize > 1, YOU_MADE_A_PROGRAMMING_MISTAKE)\n\n\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/Tensor.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n// Copyright (C) 2013 Christian Seiler <christian@iwakd.de>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_H\n#define EIGEN_CXX11_TENSOR_TENSOR_H\n\nnamespace Eigen {\n\n/** \\class Tensor\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief The tensor class.\n  *\n  * The %Tensor class is the work-horse for all \\em dense tensors within Eigen.\n  *\n  * The %Tensor class encompasses only dynamic-size objects so far.\n  *\n  * The first two template parameters are required:\n  * \\tparam Scalar_  Numeric type, e.g. float, double, int or `std::complex<float>`.\n  *                 User defined scalar types are supported as well (see \\ref user_defined_scalars \"here\").\n  * \\tparam NumIndices_ Number of indices (i.e. rank of the tensor)\n  *\n  * The remaining template parameters are optional -- in most cases you don't have to worry about them.\n  * \\tparam Options_  A combination of either \\b #RowMajor or \\b #ColMajor, and of either\n  *                 \\b #AutoAlign or \\b #DontAlign.\n  *                 The former controls \\ref TopicStorageOrders \"storage order\", and defaults to column-major. The latter controls alignment, which is required\n  *                 for vectorization. It defaults to aligning tensors. Note that tensors currently do not support any operations that profit from vectorization.\n  *                 Support for such operations (i.e. adding two tensors etc.) is planned.\n  *\n  * You can access elements of tensors using normal subscripting:\n  *\n  * \\code\n  * Eigen::Tensor<double, 4> t(10, 10, 10, 10);\n  * t(0, 1, 2, 3) = 42.0;\n  * \\endcode\n  *\n  * This class can be extended with the help of the plugin mechanism described on the page\n  * \\ref TopicCustomizing_Plugins by defining the preprocessor symbol \\c EIGEN_TENSOR_PLUGIN.\n  *\n  * <i><b>Some notes:</b></i>\n  *\n  * <dl>\n  * <dt><b>Relation to other parts of Eigen:</b></dt>\n  * <dd>The midterm development goal for this class is to have a similar hierarchy as Eigen uses for matrices, so that\n  * taking blocks or using tensors in expressions is easily possible, including an interface with the vector/matrix code\n  * by providing .asMatrix() and .asVector() (or similar) methods for rank 2 and 1 tensors. However, currently, the %Tensor\n  * class does not provide any of these features and is only available as a stand-alone class that just allows for\n  * coefficient access. Also, when fixed-size tensors are implemented, the number of template arguments is likely to\n  * change dramatically.</dd>\n  * </dl>\n  *\n  * \\ref TopicStorageOrders\n  */\n\ntemplate<typename Scalar_, int NumIndices_, int Options_, typename IndexType_>\nclass Tensor : public TensorBase<Tensor<Scalar_, NumIndices_, Options_, IndexType_> >\n{\n  public:\n    typedef Tensor<Scalar_, NumIndices_, Options_, IndexType_> Self;\n    typedef TensorBase<Tensor<Scalar_, NumIndices_, Options_, IndexType_> > Base;\n    typedef typename Eigen::internal::nested<Self>::type Nested;\n    typedef typename internal::traits<Self>::StorageKind StorageKind;\n    typedef typename internal::traits<Self>::Index Index;\n    typedef Scalar_ Scalar;\n    typedef typename NumTraits<Scalar>::Real RealScalar;\n    typedef typename Base::CoeffReturnType CoeffReturnType;\n\n    enum {\n      IsAligned = bool(EIGEN_MAX_ALIGN_BYTES>0) & !(Options_&DontAlign),\n      Layout = Options_ & RowMajor ? RowMajor : ColMajor,\n      CoordAccess = true,\n      RawAccess = true\n    };\n\n    static const int Options = Options_;\n    static const int NumIndices = NumIndices_;\n    typedef DSizes<Index, NumIndices_> Dimensions;\n\n  protected:\n    TensorStorage<Scalar, Dimensions, Options> m_storage;\n\n#ifdef EIGEN_HAS_SFINAE\n    template<typename CustomIndices>\n    struct isOfNormalIndex{\n      static const bool is_array = internal::is_base_of<array<Index, NumIndices>, CustomIndices>::value;\n      static const bool is_int = NumTraits<CustomIndices>::IsInteger;\n      static const bool value = is_array | is_int;\n    };\n#endif\n\n  public:\n    // Metadata\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index                         rank()                   const { return NumIndices; }\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index                         dimension(std::size_t n) const { return m_storage.dimensions()[n]; }\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions&             dimensions()             const { return m_storage.dimensions(); }\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index                         size()                   const { return m_storage.size(); }\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar                        *data()                        { return m_storage.data(); }\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar                  *data()                  const { return m_storage.data(); }\n\n    // This makes EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED\n    // work, because that uses base().coeffRef() - and we don't yet\n    // implement a similar class hierarchy\n    inline Self& base()             { return *this; }\n    inline const Self& base() const { return *this; }\n\n#if EIGEN_HAS_VARIADIC_TEMPLATES\n    template<typename... IndexTypes>\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar& coeff(Index firstIndex, Index secondIndex, IndexTypes... otherIndices) const\n    {\n      // The number of indices used to access a tensor coefficient must be equal to the rank of the tensor.\n      EIGEN_STATIC_ASSERT(sizeof...(otherIndices) + 2 == NumIndices, YOU_MADE_A_PROGRAMMING_MISTAKE)\n      return coeff(array<Index, NumIndices>{{firstIndex, secondIndex, otherIndices...}});\n    }\n#endif\n\n    // normal indices\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar& coeff(const array<Index, NumIndices>& indices) const\n    {\n      eigen_internal_assert(checkIndexRange(indices));\n      return m_storage.data()[linearizedIndex(indices)];\n    }\n\n    // custom indices\n#ifdef EIGEN_HAS_SFINAE\n    template<typename CustomIndices,\n             EIGEN_SFINAE_ENABLE_IF( !(isOfNormalIndex<CustomIndices>::value) )\n    >\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar& coeff(CustomIndices& indices) const\n    {\n        return coeff(internal::customIndices2Array<Index,NumIndices>(indices));\n    }\n#endif\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar& coeff() const\n    {\n      EIGEN_STATIC_ASSERT(NumIndices == 0, YOU_MADE_A_PROGRAMMING_MISTAKE);\n      return m_storage.data()[0];\n    }\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar& coeff(Index index) const\n    {\n      eigen_internal_assert(index >= 0 && index < size());\n      return m_storage.data()[index];\n    }\n\n#if EIGEN_HAS_VARIADIC_TEMPLATES\n    template<typename... IndexTypes>\n    inline Scalar& coeffRef(Index firstIndex, Index secondIndex, IndexTypes... otherIndices)\n    {\n      // The number of indices used to access a tensor coefficient must be equal to the rank of the tensor.\n      EIGEN_STATIC_ASSERT(sizeof...(otherIndices) + 2 == NumIndices, YOU_MADE_A_PROGRAMMING_MISTAKE)\n      return coeffRef(array<Index, NumIndices>{{firstIndex, secondIndex, otherIndices...}});\n    }\n#endif\n\n    // normal indices\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& coeffRef(const array<Index, NumIndices>& indices)\n    {\n      eigen_internal_assert(checkIndexRange(indices));\n      return m_storage.data()[linearizedIndex(indices)];\n    }\n\n    // custom indices\n#ifdef EIGEN_HAS_SFINAE\n    template<typename CustomIndices,\n             EIGEN_SFINAE_ENABLE_IF( !(isOfNormalIndex<CustomIndices>::value) )\n             >\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& coeffRef(CustomIndices& indices)\n    {\n        return coeffRef(internal::customIndices2Array<Index,NumIndices>(indices));\n    }\n#endif\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& coeffRef()\n    {\n      EIGEN_STATIC_ASSERT(NumIndices == 0, YOU_MADE_A_PROGRAMMING_MISTAKE);\n      return m_storage.data()[0];\n    }\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& coeffRef(Index index)\n    {\n      eigen_internal_assert(index >= 0 && index < size());\n      return m_storage.data()[index];\n    }\n\n#if EIGEN_HAS_VARIADIC_TEMPLATES\n    template<typename... IndexTypes>\n    inline const Scalar& operator()(Index firstIndex, Index secondIndex, IndexTypes... otherIndices) const\n    {\n      // The number of indices used to access a tensor coefficient must be equal to the rank of the tensor.\n      EIGEN_STATIC_ASSERT(sizeof...(otherIndices) + 2 == NumIndices, YOU_MADE_A_PROGRAMMING_MISTAKE)\n      return this->operator()(array<Index, NumIndices>{{firstIndex, secondIndex, otherIndices...}});\n    }\n#else\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const Scalar& operator()(Index i0, Index i1) const\n    {\n      return coeff(array<Index, 2>(i0, i1));\n    }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const Scalar& operator()(Index i0, Index i1, Index i2) const\n    {\n      return coeff(array<Index, 3>(i0, i1, i2));\n    }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const Scalar& operator()(Index i0, Index i1, Index i2, Index i3) const\n    {\n      return coeff(array<Index, 4>(i0, i1, i2, i3));\n    }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const Scalar& operator()(Index i0, Index i1, Index i2, Index i3, Index i4) const\n    {\n      return coeff(array<Index, 5>(i0, i1, i2, i3, i4));\n    }\n#endif\n\n    // custom indices\n#ifdef EIGEN_HAS_SFINAE\n    template<typename CustomIndices,\n             EIGEN_SFINAE_ENABLE_IF( !(isOfNormalIndex<CustomIndices>::value) )\n    >\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar& operator()(CustomIndices& indices) const\n    {\n        return coeff(internal::customIndices2Array<Index,NumIndices>(indices));\n    }\n#endif\n\n    // normal indices\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar& operator()(const array<Index, NumIndices>& indices) const\n    {\n      return coeff(indices);\n    }\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar& operator()(Index index) const\n    {\n      eigen_internal_assert(index >= 0 && index < size());\n      return coeff(index);\n    }\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar& operator()() const\n    {\n      EIGEN_STATIC_ASSERT(NumIndices == 0, YOU_MADE_A_PROGRAMMING_MISTAKE);\n      return coeff();\n    }\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar& operator[](Index index) const\n    {\n      // The bracket operator is only for vectors, use the parenthesis operator instead.\n      EIGEN_STATIC_ASSERT(NumIndices == 1, YOU_MADE_A_PROGRAMMING_MISTAKE);\n      return coeff(index);\n    }\n\n#if EIGEN_HAS_VARIADIC_TEMPLATES\n    template<typename... IndexTypes>\n    inline Scalar& operator()(Index firstIndex, Index secondIndex, IndexTypes... otherIndices)\n    {\n      // The number of indices used to access a tensor coefficient must be equal to the rank of the tensor.\n      EIGEN_STATIC_ASSERT(sizeof...(otherIndices) + 2 == NumIndices, YOU_MADE_A_PROGRAMMING_MISTAKE)\n      return operator()(array<Index, NumIndices>{{firstIndex, secondIndex, otherIndices...}});\n    }\n#else\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Scalar& operator()(Index i0, Index i1)\n    {\n      return coeffRef(array<Index, 2>(i0, i1));\n    }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Scalar& operator()(Index i0, Index i1, Index i2)\n    {\n      return coeffRef(array<Index, 3>(i0, i1, i2));\n    }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Scalar& operator()(Index i0, Index i1, Index i2, Index i3)\n    {\n      return coeffRef(array<Index, 4>(i0, i1, i2, i3));\n    }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Scalar& operator()(Index i0, Index i1, Index i2, Index i3, Index i4)\n    {\n      return coeffRef(array<Index, 5>(i0, i1, i2, i3, i4));\n    }\n#endif\n\n    // normal indices\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& operator()(const array<Index, NumIndices>& indices)\n    {\n      return coeffRef(indices);\n    }\n\n    // custom indices\n#ifdef EIGEN_HAS_SFINAE\n    template<typename CustomIndices,\n             EIGEN_SFINAE_ENABLE_IF( !(isOfNormalIndex<CustomIndices>::value) )\n    >\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& operator()(CustomIndices& indices)\n    {\n      return coeffRef(internal::customIndices2Array<Index,NumIndices>(indices));\n    }\n#endif\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& operator()(Index index)\n    {\n      eigen_assert(index >= 0 && index < size());\n      return coeffRef(index);\n    }\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& operator()()\n    {\n      EIGEN_STATIC_ASSERT(NumIndices == 0, YOU_MADE_A_PROGRAMMING_MISTAKE);\n      return coeffRef();\n    }\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& operator[](Index index)\n    {\n      // The bracket operator is only for vectors, use the parenthesis operator instead\n      EIGEN_STATIC_ASSERT(NumIndices == 1, YOU_MADE_A_PROGRAMMING_MISTAKE)\n      return coeffRef(index);\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Tensor()\n      : m_storage()\n    {\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Tensor(const Self& other)\n      : m_storage(other.m_storage)\n    {\n    }\n\n#if EIGEN_HAS_VARIADIC_TEMPLATES\n    template<typename... IndexTypes>\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Tensor(Index firstDimension, IndexTypes... otherDimensions)\n        : m_storage(firstDimension, otherDimensions...)\n    {\n      // The number of dimensions used to construct a tensor must be equal to the rank of the tensor.\n      EIGEN_STATIC_ASSERT(sizeof...(otherDimensions) + 1 == NumIndices, YOU_MADE_A_PROGRAMMING_MISTAKE)\n    }\n#else\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit Tensor(Index dim1)\n      : m_storage(dim1, array<Index, 1>(dim1))\n    {\n      EIGEN_STATIC_ASSERT(1 == NumIndices, YOU_MADE_A_PROGRAMMING_MISTAKE)\n    }\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Tensor(Index dim1, Index dim2)\n      : m_storage(dim1*dim2, array<Index, 2>(dim1, dim2))\n    {\n      EIGEN_STATIC_ASSERT(2 == NumIndices, YOU_MADE_A_PROGRAMMING_MISTAKE)\n    }\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Tensor(Index dim1, Index dim2, Index dim3)\n      : m_storage(dim1*dim2*dim3, array<Index, 3>(dim1, dim2, dim3))\n    {\n      EIGEN_STATIC_ASSERT(3 == NumIndices, YOU_MADE_A_PROGRAMMING_MISTAKE)\n    }\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Tensor(Index dim1, Index dim2, Index dim3, Index dim4)\n      : m_storage(dim1*dim2*dim3*dim4, array<Index, 4>(dim1, dim2, dim3, dim4))\n    {\n      EIGEN_STATIC_ASSERT(4 == NumIndices, YOU_MADE_A_PROGRAMMING_MISTAKE)\n    }\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Tensor(Index dim1, Index dim2, Index dim3, Index dim4, Index dim5)\n      : m_storage(dim1*dim2*dim3*dim4*dim5, array<Index, 5>(dim1, dim2, dim3, dim4, dim5))\n    {\n      EIGEN_STATIC_ASSERT(5 == NumIndices, YOU_MADE_A_PROGRAMMING_MISTAKE)\n    }\n#endif\n\n    /** Normal Dimension */\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit Tensor(const array<Index, NumIndices>& dimensions)\n        : m_storage(internal::array_prod(dimensions), dimensions)\n    {\n      EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED\n    }\n\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Tensor(const TensorBase<OtherDerived, ReadOnlyAccessors>& other)\n    {\n      typedef TensorAssignOp<Tensor, const OtherDerived> Assign;\n      Assign assign(*this, other.derived());\n      resize(TensorEvaluator<const Assign, DefaultDevice>(assign, DefaultDevice()).dimensions());\n      internal::TensorExecutor<const Assign, DefaultDevice>::run(assign, DefaultDevice());\n    }\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Tensor(const TensorBase<OtherDerived, WriteAccessors>& other)\n    {\n      typedef TensorAssignOp<Tensor, const OtherDerived> Assign;\n      Assign assign(*this, other.derived());\n      resize(TensorEvaluator<const Assign, DefaultDevice>(assign, DefaultDevice()).dimensions());\n      internal::TensorExecutor<const Assign, DefaultDevice>::run(assign, DefaultDevice());\n    }\n\n    #if EIGEN_HAS_RVALUE_REFERENCES\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Tensor(Self&& other)\n      : Tensor()\n    {\n      m_storage.swap(other.m_storage);\n    }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Tensor& operator=(Self&& other)\n    {\n      m_storage.swap(other.m_storage);\n      return *this;\n    }\n    #endif\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Tensor& operator=(const Tensor& other)\n    {\n      typedef TensorAssignOp<Tensor, const Tensor> Assign;\n      Assign assign(*this, other);\n      resize(TensorEvaluator<const Assign, DefaultDevice>(assign, DefaultDevice()).dimensions());\n      internal::TensorExecutor<const Assign, DefaultDevice>::run(assign, DefaultDevice());\n      return *this;\n    }\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Tensor& operator=(const OtherDerived& other)\n    {\n      typedef TensorAssignOp<Tensor, const OtherDerived> Assign;\n      Assign assign(*this, other);\n      resize(TensorEvaluator<const Assign, DefaultDevice>(assign, DefaultDevice()).dimensions());\n      internal::TensorExecutor<const Assign, DefaultDevice>::run(assign, DefaultDevice());\n      return *this;\n    }\n\n#if EIGEN_HAS_VARIADIC_TEMPLATES\n    template<typename... IndexTypes> EIGEN_DEVICE_FUNC\n    void resize(Index firstDimension, IndexTypes... otherDimensions)\n    {\n      // The number of dimensions used to resize a tensor must be equal to the rank of the tensor.\n      EIGEN_STATIC_ASSERT(sizeof...(otherDimensions) + 1 == NumIndices, YOU_MADE_A_PROGRAMMING_MISTAKE)\n      resize(array<Index, NumIndices>{{firstDimension, otherDimensions...}});\n    }\n#endif\n\n    /** Normal Dimension */\n    EIGEN_DEVICE_FUNC void resize(const array<Index, NumIndices>& dimensions)\n    {\n      int i;\n      Index size = Index(1);\n      for (i = 0; i < NumIndices; i++) {\n        internal::check_rows_cols_for_overflow<Dynamic>::run(size, dimensions[i]);\n        size *= dimensions[i];\n      }\n      #ifdef EIGEN_INITIALIZE_COEFFS\n        bool size_changed = size != this->size();\n        m_storage.resize(size, dimensions);\n        if(size_changed) EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED\n      #else\n        m_storage.resize(size, dimensions);\n      #endif\n    }\n\n    // Why this overload, DSizes is derived from array ??? //\n    EIGEN_DEVICE_FUNC void resize(const DSizes<Index, NumIndices>& dimensions) {\n      array<Index, NumIndices> dims;\n      for (int i = 0; i < NumIndices; ++i) {\n        dims[i] = dimensions[i];\n      }\n      resize(dims);\n    }\n\n    EIGEN_DEVICE_FUNC\n    void resize()\n    {\n      EIGEN_STATIC_ASSERT(NumIndices == 0, YOU_MADE_A_PROGRAMMING_MISTAKE);\n      // Nothing to do: rank 0 tensors have fixed size\n    }\n\n#ifdef EIGEN_HAS_INDEX_LIST\n    template <typename FirstType, typename... OtherTypes>\n    EIGEN_DEVICE_FUNC\n    void resize(const Eigen::IndexList<FirstType, OtherTypes...>& dimensions) {\n      array<Index, NumIndices> dims;\n      for (int i = 0; i < NumIndices; ++i) {\n        dims[i] = static_cast<Index>(dimensions[i]);\n      }\n      resize(dims);\n    }\n#endif\n\n    /** Custom Dimension */\n#ifdef EIGEN_HAS_SFINAE\n    template<typename CustomDimension,\n             EIGEN_SFINAE_ENABLE_IF( !(isOfNormalIndex<CustomDimension>::value) )\n    >\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void resize(CustomDimension& dimensions)\n    {\n      resize(internal::customIndices2Array<Index,NumIndices>(dimensions));\n    }\n#endif\n\n#ifndef EIGEN_EMULATE_CXX11_META_H\n    template <typename std::ptrdiff_t... Indices>\n    EIGEN_DEVICE_FUNC\n    void resize(const Sizes<Indices...>& dimensions) {\n      array<Index, NumIndices> dims;\n      for (int i = 0; i < NumIndices; ++i) {\n        dims[i] = static_cast<Index>(dimensions[i]);\n      }\n      resize(dims);\n    }\n#else\n    template <std::size_t V1, std::size_t V2, std::size_t V3, std::size_t V4, std::size_t V5>\n    EIGEN_DEVICE_FUNC\n    void resize(const Sizes<V1, V2, V3, V4, V5>& dimensions) {\n      array<Index, NumIndices> dims;\n      for (int i = 0; i < NumIndices; ++i) {\n        dims[i] = static_cast<Index>(dimensions[i]);\n      }\n      resize(dims);\n    }\n#endif\n\n  protected:\n\n    bool checkIndexRange(const array<Index, NumIndices>& indices) const\n    {\n      using internal::array_apply_and_reduce;\n      using internal::array_zip_and_reduce;\n      using internal::greater_equal_zero_op;\n      using internal::logical_and_op;\n      using internal::lesser_op;\n\n      return\n        // check whether the indices are all >= 0\n        array_apply_and_reduce<logical_and_op, greater_equal_zero_op>(indices) &&\n        // check whether the indices fit in the dimensions\n        array_zip_and_reduce<logical_and_op, lesser_op>(indices, m_storage.dimensions());\n    }\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index linearizedIndex(const array<Index, NumIndices>& indices) const\n    {\n      if (Options&RowMajor) {\n        return m_storage.dimensions().IndexOfRowMajor(indices);\n      } else {\n        return m_storage.dimensions().IndexOfColMajor(indices);\n      }\n    }\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorArgMax.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Eugene Brevdo <ebrevdo@gmail.com>\n//                    Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_ARG_MAX_H\n#define EIGEN_CXX11_TENSOR_TENSOR_ARG_MAX_H\n\nnamespace Eigen {\nnamespace internal {\n\n/** \\class TensorIndexTuple\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief Tensor + Index Tuple class.\n  *\n  *\n  */\ntemplate<typename XprType>\nstruct traits<TensorIndexTupleOp<XprType> > : public traits<XprType>\n{\n  typedef traits<XprType> XprTraits;\n  typedef typename XprTraits::StorageKind StorageKind;\n  typedef typename XprTraits::Index Index;\n  typedef Tuple<Index, typename XprTraits::Scalar> Scalar;\n  typedef typename XprType::Nested Nested;\n  typedef typename remove_reference<Nested>::type _Nested;\n  static const int NumDimensions = XprTraits::NumDimensions;\n  static const int Layout = XprTraits::Layout;\n};\n\ntemplate<typename XprType>\nstruct eval<TensorIndexTupleOp<XprType>, Eigen::Dense>\n{\n  typedef const TensorIndexTupleOp<XprType>EIGEN_DEVICE_REF type;\n};\n\ntemplate<typename XprType>\nstruct nested<TensorIndexTupleOp<XprType>, 1,\n              typename eval<TensorIndexTupleOp<XprType> >::type>\n{\n  typedef TensorIndexTupleOp<XprType> type;\n};\n\n}  // end namespace internal\n\ntemplate<typename XprType>\nclass TensorIndexTupleOp : public TensorBase<TensorIndexTupleOp<XprType>, ReadOnlyAccessors>\n{\n  public:\n  typedef typename Eigen::internal::traits<TensorIndexTupleOp>::Scalar Scalar;\n  typedef typename Eigen::NumTraits<Scalar>::Real RealScalar;\n  typedef typename Eigen::internal::nested<TensorIndexTupleOp>::type Nested;\n  typedef typename Eigen::internal::traits<TensorIndexTupleOp>::StorageKind StorageKind;\n  typedef typename Eigen::internal::traits<TensorIndexTupleOp>::Index Index;\n  typedef Tuple<Index, typename XprType::CoeffReturnType> CoeffReturnType;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorIndexTupleOp(const XprType& expr)\n      : m_xpr(expr) {}\n\n  EIGEN_DEVICE_FUNC\n  const typename internal::remove_all<typename XprType::Nested>::type&\n  expression() const { return m_xpr; }\n\n  protected:\n    typename XprType::Nested m_xpr;\n};\n\n// Eval as rvalue\ntemplate<typename ArgType, typename Device>\nstruct TensorEvaluator<const TensorIndexTupleOp<ArgType>, Device>\n{\n  typedef TensorIndexTupleOp<ArgType> XprType;\n  typedef typename XprType::Index Index;\n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n\n  typedef typename TensorEvaluator<ArgType, Device>::Dimensions Dimensions;\n  static const int NumDims = internal::array_size<Dimensions>::value;\n  typedef StorageMemory<CoeffReturnType, Device> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n\n  enum {\n    IsAligned = /*TensorEvaluator<ArgType, Device>::IsAligned*/ false,\n    PacketAccess = /*TensorEvaluator<ArgType, Device>::PacketAccess*/ false,\n    BlockAccess = false,\n    PreferBlockAccess = TensorEvaluator<ArgType, Device>::PreferBlockAccess,\n    Layout = TensorEvaluator<ArgType, Device>::Layout,\n    CoordAccess = false,  // to be implemented\n    RawAccess = false\n  };\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockNotImplemented TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)\n      : m_impl(op.expression(), device) { }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions& dimensions() const {\n    return m_impl.dimensions();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType /*data*/) {\n    m_impl.evalSubExprsIfNeeded(NULL);\n    return true;\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {\n    m_impl.cleanup();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const\n  {\n    return CoeffReturnType(index, m_impl.coeff(index));\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost\n  costPerCoeff(bool vectorized) const {\n    return m_impl.costPerCoeff(vectorized) + TensorOpCost(0, 0, 1);\n  }\n\n  EIGEN_DEVICE_FUNC EvaluatorPointerType data() const { return NULL; }\n\n#ifdef EIGEN_USE_SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {\n    m_impl.bind(cgh);\n  }\n#endif\n\n protected:\n  TensorEvaluator<ArgType, Device> m_impl;\n};\n\nnamespace internal {\n\n/** \\class TensorTupleIndex\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief Converts to Tensor<Tuple<Index, Scalar> > and reduces to Tensor<Index>.\n  *\n  */\ntemplate<typename ReduceOp, typename Dims, typename XprType>\nstruct traits<TensorTupleReducerOp<ReduceOp, Dims, XprType> > : public traits<XprType>\n{\n  typedef traits<XprType> XprTraits;\n  typedef typename XprTraits::StorageKind StorageKind;\n  typedef typename XprTraits::Index Index;\n  typedef Index Scalar;\n  typedef typename XprType::Nested Nested;\n  typedef typename remove_reference<Nested>::type _Nested;\n  static const int NumDimensions = XprTraits::NumDimensions - array_size<Dims>::value;\n  static const int Layout = XprTraits::Layout;\n};\n\ntemplate<typename ReduceOp, typename Dims, typename XprType>\nstruct eval<TensorTupleReducerOp<ReduceOp, Dims, XprType>, Eigen::Dense>\n{\n  typedef const TensorTupleReducerOp<ReduceOp, Dims, XprType>EIGEN_DEVICE_REF type;\n};\n\ntemplate<typename ReduceOp, typename Dims, typename XprType>\nstruct nested<TensorTupleReducerOp<ReduceOp, Dims, XprType>, 1,\n              typename eval<TensorTupleReducerOp<ReduceOp, Dims, XprType> >::type>\n{\n  typedef TensorTupleReducerOp<ReduceOp, Dims, XprType> type;\n};\n\n}  // end namespace internal\n\ntemplate<typename ReduceOp, typename Dims, typename XprType>\nclass TensorTupleReducerOp : public TensorBase<TensorTupleReducerOp<ReduceOp, Dims, XprType>, ReadOnlyAccessors>\n{\n  public:\n  typedef typename Eigen::internal::traits<TensorTupleReducerOp>::Scalar Scalar;\n  typedef typename Eigen::NumTraits<Scalar>::Real RealScalar;\n  typedef typename Eigen::internal::nested<TensorTupleReducerOp>::type Nested;\n  typedef typename Eigen::internal::traits<TensorTupleReducerOp>::StorageKind StorageKind;\n  typedef typename Eigen::internal::traits<TensorTupleReducerOp>::Index Index;\n  typedef Index CoeffReturnType;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorTupleReducerOp(const XprType& expr,\n                                                          const ReduceOp& reduce_op,\n                                                          const Index return_dim,\n                                                          const Dims& reduce_dims)\n      : m_xpr(expr), m_reduce_op(reduce_op), m_return_dim(return_dim), m_reduce_dims(reduce_dims) {}\n\n  EIGEN_DEVICE_FUNC\n  const typename internal::remove_all<typename XprType::Nested>::type&\n  expression() const { return m_xpr; }\n\n  EIGEN_DEVICE_FUNC\n  const ReduceOp& reduce_op() const { return m_reduce_op; }\n\n  EIGEN_DEVICE_FUNC\n  const Dims& reduce_dims() const { return m_reduce_dims; }\n\n  EIGEN_DEVICE_FUNC\n  Index return_dim() const { return m_return_dim; }\n\n  protected:\n    typename XprType::Nested m_xpr;\n    const ReduceOp m_reduce_op;\n    const Index m_return_dim;\n    const Dims m_reduce_dims;\n};\n\n// Eval as rvalue\ntemplate<typename ReduceOp, typename Dims, typename ArgType, typename Device>\nstruct TensorEvaluator<const TensorTupleReducerOp<ReduceOp, Dims, ArgType>, Device>\n{\n  typedef TensorTupleReducerOp<ReduceOp, Dims, ArgType> XprType;\n  typedef typename XprType::Index Index;\n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename TensorIndexTupleOp<ArgType>::CoeffReturnType TupleType;\n  typedef typename TensorEvaluator<const TensorReductionOp<ReduceOp, Dims, const TensorIndexTupleOp<ArgType> >, Device>::Dimensions Dimensions;\n  typedef typename TensorEvaluator<const TensorIndexTupleOp<ArgType> , Device>::Dimensions InputDimensions;\n  static const int NumDims = internal::array_size<InputDimensions>::value;\n  typedef array<Index, NumDims> StrideDims;\n  typedef StorageMemory<CoeffReturnType, Device> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n  typedef StorageMemory<TupleType, Device> TupleStorageMem;\n\n  enum {\n    IsAligned         = /*TensorEvaluator<ArgType, Device>::IsAligned*/ false,\n    PacketAccess      = /*TensorEvaluator<ArgType, Device>::PacketAccess*/ false,\n    BlockAccess       = false,\n    PreferBlockAccess = TensorEvaluator<ArgType, Device>::PreferBlockAccess,\n    Layout            = TensorEvaluator<const TensorReductionOp<ReduceOp, Dims, const TensorIndexTupleOp<ArgType> >, Device>::Layout,\n    CoordAccess       = false,  // to be implemented\n    RawAccess         = false\n  };\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockNotImplemented TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)\n      : m_orig_impl(op.expression(), device),\n        m_impl(op.expression().index_tuples().reduce(op.reduce_dims(), op.reduce_op()), device),\n        m_return_dim(op.return_dim())\n  {\n    gen_strides(m_orig_impl.dimensions(), m_strides);\n    if (Layout == static_cast<int>(ColMajor)) {\n      const Index total_size = internal::array_prod(m_orig_impl.dimensions());\n      m_stride_mod = (m_return_dim < NumDims - 1) ? m_strides[m_return_dim + 1] : total_size;\n    } else {\n      const Index total_size = internal::array_prod(m_orig_impl.dimensions());\n      m_stride_mod = (m_return_dim > 0) ? m_strides[m_return_dim - 1] : total_size;\n    }    \n    // If m_return_dim is not a valid index, returns 1 or this can crash on Windows.\n    m_stride_div = ((m_return_dim >= 0) &&\n                    (m_return_dim < static_cast<Index>(m_strides.size())))\n                   ? m_strides[m_return_dim] : 1;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions& dimensions() const {\n    return m_impl.dimensions();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType /*data*/) {\n    m_impl.evalSubExprsIfNeeded(NULL);\n    return true;\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {\n    m_impl.cleanup();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const {\n    const TupleType v = m_impl.coeff(index);\n    return (m_return_dim < 0) ? v.first : (v.first % m_stride_mod) / m_stride_div;\n  }\n\n  EIGEN_DEVICE_FUNC EvaluatorPointerType data() const { return NULL; }\n#ifdef EIGEN_USE_SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {\n    m_impl.bind(cgh);\n    m_orig_impl.bind(cgh);\n  }\n#endif\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost\n  costPerCoeff(bool vectorized) const {\n    const double compute_cost = 1.0 +\n        (m_return_dim < 0 ? 0.0 : (TensorOpCost::ModCost<Index>() + TensorOpCost::DivCost<Index>()));\n    return m_orig_impl.costPerCoeff(vectorized) +\n           m_impl.costPerCoeff(vectorized) + TensorOpCost(0, 0, compute_cost);\n  }\n\n private:\n  EIGEN_DEVICE_FUNC void gen_strides(const InputDimensions& dims, StrideDims& strides) {\n    if (m_return_dim < 0) {\n      return;  // Won't be using the strides.\n    }\n    eigen_assert(m_return_dim < NumDims &&\n                 \"Asking to convert index to a dimension outside of the rank\");\n\n    // Calculate m_stride_div and m_stride_mod, which are used to\n    // calculate the value of an index w.r.t. the m_return_dim.\n    if (Layout == static_cast<int>(ColMajor)) {\n      strides[0] = 1;\n      for (int i = 1; i < NumDims; ++i) {\n        strides[i] = strides[i-1] * dims[i-1];\n      }\n    } else {\n      strides[NumDims-1] = 1;\n      for (int i = NumDims - 2; i >= 0; --i) {\n        strides[i] = strides[i+1] * dims[i+1];\n      }\n    }\n  }\n\n protected:\n  TensorEvaluator<const TensorIndexTupleOp<ArgType>, Device> m_orig_impl;\n  TensorEvaluator<const TensorReductionOp<ReduceOp, Dims, const TensorIndexTupleOp<ArgType> >, Device> m_impl;\n  const Index m_return_dim;\n  StrideDims m_strides;\n  Index m_stride_mod;\n  Index m_stride_div;\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_ARG_MAX_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorAssign.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_ASSIGN_H\n#define EIGEN_CXX11_TENSOR_TENSOR_ASSIGN_H\n\nnamespace Eigen {\n\n/** \\class TensorAssign\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief The tensor assignment class.\n  *\n  * This class is represents the assignment of the values resulting from the evaluation of\n  * the rhs expression to the memory locations denoted by the lhs expression.\n  */\nnamespace internal {\ntemplate<typename LhsXprType, typename RhsXprType>\nstruct traits<TensorAssignOp<LhsXprType, RhsXprType> >\n{\n  typedef typename LhsXprType::Scalar Scalar;\n  typedef typename traits<LhsXprType>::StorageKind StorageKind;\n  typedef typename promote_index_type<typename traits<LhsXprType>::Index,\n                                      typename traits<RhsXprType>::Index>::type Index;\n  typedef typename LhsXprType::Nested LhsNested;\n  typedef typename RhsXprType::Nested RhsNested;\n  typedef typename remove_reference<LhsNested>::type _LhsNested;\n  typedef typename remove_reference<RhsNested>::type _RhsNested;\n  static const std::size_t NumDimensions = internal::traits<LhsXprType>::NumDimensions;\n  static const int Layout = internal::traits<LhsXprType>::Layout;\n  typedef typename traits<LhsXprType>::PointerType PointerType;\n\n  enum {\n    Flags = 0\n  };\n};\n\ntemplate<typename LhsXprType, typename RhsXprType>\nstruct eval<TensorAssignOp<LhsXprType, RhsXprType>, Eigen::Dense>\n{\n  typedef const TensorAssignOp<LhsXprType, RhsXprType>& type;\n};\n\ntemplate<typename LhsXprType, typename RhsXprType>\nstruct nested<TensorAssignOp<LhsXprType, RhsXprType>, 1, typename eval<TensorAssignOp<LhsXprType, RhsXprType> >::type>\n{\n  typedef TensorAssignOp<LhsXprType, RhsXprType> type;\n};\n\n}  // end namespace internal\n\n\n\ntemplate<typename LhsXprType, typename RhsXprType>\nclass TensorAssignOp : public TensorBase<TensorAssignOp<LhsXprType, RhsXprType> >\n{\n  public:\n  typedef typename Eigen::internal::traits<TensorAssignOp>::Scalar Scalar;\n  typedef typename Eigen::NumTraits<Scalar>::Real RealScalar;\n  typedef typename LhsXprType::CoeffReturnType CoeffReturnType;\n  typedef typename Eigen::internal::nested<TensorAssignOp>::type Nested;\n  typedef typename Eigen::internal::traits<TensorAssignOp>::StorageKind StorageKind;\n  typedef typename Eigen::internal::traits<TensorAssignOp>::Index Index;\n\n  static const int NumDims = Eigen::internal::traits<TensorAssignOp>::NumDimensions;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorAssignOp(LhsXprType& lhs, const RhsXprType& rhs)\n      : m_lhs_xpr(lhs), m_rhs_xpr(rhs) {}\n\n    /** \\returns the nested expressions */\n    EIGEN_DEVICE_FUNC\n    typename internal::remove_all<typename LhsXprType::Nested>::type&\n    lhsExpression() const { return *((typename internal::remove_all<typename LhsXprType::Nested>::type*)&m_lhs_xpr); }\n\n    EIGEN_DEVICE_FUNC\n    const typename internal::remove_all<typename RhsXprType::Nested>::type&\n    rhsExpression() const { return m_rhs_xpr; }\n\n  protected:\n    typename internal::remove_all<typename LhsXprType::Nested>::type& m_lhs_xpr;\n    const typename internal::remove_all<typename RhsXprType::Nested>::type& m_rhs_xpr;\n};\n\n\ntemplate<typename LeftArgType, typename RightArgType, typename Device>\nstruct TensorEvaluator<const TensorAssignOp<LeftArgType, RightArgType>, Device>\n{\n  typedef TensorAssignOp<LeftArgType, RightArgType> XprType;\n  typedef typename XprType::Index Index;\n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  typedef typename TensorEvaluator<RightArgType, Device>::Dimensions Dimensions;\n  typedef StorageMemory<CoeffReturnType, Device> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n\n  static const int PacketSize = PacketType<CoeffReturnType, Device>::size;\n  static const int NumDims = XprType::NumDims;\n\n  enum {\n    IsAligned         = TensorEvaluator<LeftArgType, Device>::IsAligned &\n                        TensorEvaluator<RightArgType, Device>::IsAligned,\n    PacketAccess      = TensorEvaluator<LeftArgType, Device>::PacketAccess &\n                        TensorEvaluator<RightArgType, Device>::PacketAccess,\n    BlockAccess       = TensorEvaluator<LeftArgType, Device>::BlockAccess &\n                        TensorEvaluator<RightArgType, Device>::BlockAccess,\n    PreferBlockAccess = TensorEvaluator<LeftArgType, Device>::PreferBlockAccess |\n                        TensorEvaluator<RightArgType, Device>::PreferBlockAccess,\n    Layout            = TensorEvaluator<LeftArgType, Device>::Layout,\n    RawAccess         = TensorEvaluator<LeftArgType, Device>::RawAccess\n  };\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockDescriptor<NumDims, Index> TensorBlockDesc;\n  typedef internal::TensorBlockScratchAllocator<Device> TensorBlockScratch;\n\n  typedef typename TensorEvaluator<const RightArgType, Device>::TensorBlock\n      RightTensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC TensorEvaluator(const XprType& op, const Device& device) :\n      m_leftImpl(op.lhsExpression(), device),\n      m_rightImpl(op.rhsExpression(), device)\n  {\n    EIGEN_STATIC_ASSERT(\n        (static_cast<int>(TensorEvaluator<LeftArgType, Device>::Layout) ==\n         static_cast<int>(TensorEvaluator<RightArgType, Device>::Layout)),\n        YOU_MADE_A_PROGRAMMING_MISTAKE);\n  }\n\n  EIGEN_DEVICE_FUNC const Dimensions& dimensions() const\n  {\n    // The dimensions of the lhs and the rhs tensors should be equal to prevent\n    // overflows and ensure the result is fully initialized.\n    // TODO: use left impl instead if right impl dimensions are known at compile time.\n    return m_rightImpl.dimensions();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType) {\n    eigen_assert(dimensions_match(m_leftImpl.dimensions(), m_rightImpl.dimensions()));\n    m_leftImpl.evalSubExprsIfNeeded(NULL);\n    // If the lhs provides raw access to its storage area (i.e. if m_leftImpl.data() returns a non\n    // null value), attempt to evaluate the rhs expression in place. Returns true iff in place\n    // evaluation isn't supported and the caller still needs to manually assign the values generated\n    // by the rhs to the lhs.\n    return m_rightImpl.evalSubExprsIfNeeded(m_leftImpl.data());\n  }\n\n#ifdef EIGEN_USE_THREADS\n  template <typename EvalSubExprsCallback>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalSubExprsIfNeededAsync(\n      EvaluatorPointerType, EvalSubExprsCallback done) {\n    m_leftImpl.evalSubExprsIfNeededAsync(nullptr, [this, done](bool) {\n      m_rightImpl.evalSubExprsIfNeededAsync(\n          m_leftImpl.data(), [done](bool need_assign) { done(need_assign); });\n    });\n  }\n#endif  // EIGEN_USE_THREADS\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {\n    m_leftImpl.cleanup();\n    m_rightImpl.cleanup();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalScalar(Index i) {\n    m_leftImpl.coeffRef(i) = m_rightImpl.coeff(i);\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalPacket(Index i) {\n\n    const int LhsStoreMode = TensorEvaluator<LeftArgType, Device>::IsAligned ? Aligned : Unaligned;\n    const int RhsLoadMode = TensorEvaluator<RightArgType, Device>::IsAligned ? Aligned : Unaligned;\n    m_leftImpl.template writePacket<LhsStoreMode>(i, m_rightImpl.template packet<RhsLoadMode>(i));\n  }\n  EIGEN_DEVICE_FUNC CoeffReturnType coeff(Index index) const\n  {\n    return m_leftImpl.coeff(index);\n  }\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC PacketReturnType packet(Index index) const\n  {\n    return m_leftImpl.template packet<LoadMode>(index);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost\n  costPerCoeff(bool vectorized) const {\n    // We assume that evalPacket or evalScalar is called to perform the\n    // assignment and account for the cost of the write here, but reduce left\n    // cost by one load because we are using m_leftImpl.coeffRef.\n    TensorOpCost left = m_leftImpl.costPerCoeff(vectorized);\n    return m_rightImpl.costPerCoeff(vectorized) +\n           TensorOpCost(\n               numext::maxi(0.0, left.bytes_loaded() - sizeof(CoeffReturnType)),\n               left.bytes_stored(), left.compute_cycles()) +\n           TensorOpCost(0, sizeof(CoeffReturnType), 0, vectorized, PacketSize);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  internal::TensorBlockResourceRequirements getResourceRequirements() const {\n    return internal::TensorBlockResourceRequirements::merge(\n        m_leftImpl.getResourceRequirements(),\n        m_rightImpl.getResourceRequirements());\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalBlock(\n      TensorBlockDesc& desc, TensorBlockScratch& scratch) {\n    if (TensorEvaluator<LeftArgType, Device>::RawAccess &&\n        m_leftImpl.data() != NULL) {\n      // If destination has raw data access, we pass it as a potential\n      // destination for a block descriptor evaluation.\n      desc.template AddDestinationBuffer<Layout>(\n          /*dst_base=*/m_leftImpl.data() + desc.offset(),\n          /*dst_strides=*/internal::strides<Layout>(m_leftImpl.dimensions()));\n    }\n\n    RightTensorBlock block = m_rightImpl.block(desc, scratch, /*root_of_expr_ast=*/true);\n    // If block was evaluated into a destination, there is no need to do assignment.\n    if (block.kind() != internal::TensorBlockKind::kMaterializedInOutput) {\n      m_leftImpl.writeBlock(desc, block);\n    }\n    block.cleanup();\n  }\n\n#ifdef EIGEN_USE_SYCL\n  // binding placeholder accessors to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {\n    m_leftImpl.bind(cgh);\n    m_rightImpl.bind(cgh);\n  }\n#endif\n\n  EIGEN_DEVICE_FUNC EvaluatorPointerType data() const { return m_leftImpl.data(); }\n\n private:\n  TensorEvaluator<LeftArgType, Device> m_leftImpl;\n  TensorEvaluator<RightArgType, Device> m_rightImpl;\n};\n\n}\n\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_ASSIGN_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorBase.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_BASE_H\n#define EIGEN_CXX11_TENSOR_TENSOR_BASE_H\n\n// clang-format off\n\nnamespace Eigen {\n\n/** \\class TensorBase\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief The tensor base class.\n  *\n  * This class is the common parent of the Tensor and TensorMap class, thus\n  * making it possible to use either class interchangeably in expressions.\n  */\n#ifndef EIGEN_PARSED_BY_DOXYGEN\n// FIXME Doxygen does not like the inheritance with different template parameters\n// Since there is no doxygen documentation inside, we disable it for now\ntemplate<typename Derived>\nclass TensorBase<Derived, ReadOnlyAccessors>\n{\n  public:\n    typedef internal::traits<Derived> DerivedTraits;\n    typedef typename DerivedTraits::Scalar Scalar;\n    typedef typename DerivedTraits::Index Index;\n    typedef typename internal::remove_const<Scalar>::type CoeffReturnType;\n    static const int NumDimensions = DerivedTraits::NumDimensions;\n\n    // Generic nullary operation support.\n    template <typename CustomNullaryOp> EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseNullaryOp<CustomNullaryOp, const Derived>\n    nullaryExpr(const CustomNullaryOp& func) const {\n      return TensorCwiseNullaryOp<CustomNullaryOp, const Derived>(derived(), func);\n    }\n\n    // Coefficient-wise nullary operators\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseNullaryOp<internal::scalar_constant_op<Scalar>, const Derived>\n    constant(const Scalar& value) const {\n      return nullaryExpr(internal::scalar_constant_op<Scalar>(value));\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseNullaryOp<internal::UniformRandomGenerator<Scalar>, const Derived>\n    random() const {\n      return nullaryExpr(internal::UniformRandomGenerator<Scalar>());\n    }\n    template <typename RandomGenerator> EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseNullaryOp<RandomGenerator, const Derived>\n    random(const RandomGenerator& gen = RandomGenerator()) const {\n      return nullaryExpr(gen);\n    }\n\n    // Tensor generation\n    template <typename Generator> EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorGeneratorOp<Generator, const Derived>\n    generate(const Generator& generator) const {\n      return TensorGeneratorOp<Generator, const Derived>(derived(), generator);\n    }\n\n    // Generic unary operation support.\n    template <typename CustomUnaryOp> EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<CustomUnaryOp, const Derived>\n    unaryExpr(const CustomUnaryOp& func) const {\n      return TensorCwiseUnaryOp<CustomUnaryOp, const Derived>(derived(), func);\n    }\n\n    // Coefficient-wise unary operators\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_opposite_op<Scalar>, const Derived>\n    operator-() const {\n      return unaryExpr(internal::scalar_opposite_op<Scalar>());\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_sqrt_op<Scalar>, const Derived>\n    sqrt() const {\n      return unaryExpr(internal::scalar_sqrt_op<Scalar>());\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_sign_op<Scalar>, const Derived>\n    sign() const {\n      return unaryExpr(internal::scalar_sign_op<Scalar>());\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_rsqrt_op<Scalar>, const Derived>\n    rsqrt() const {\n      return unaryExpr(internal::scalar_rsqrt_op<Scalar>());\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_square_op<Scalar>, const Derived>\n    square() const {\n      return unaryExpr(internal::scalar_square_op<Scalar>());\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_cube_op<Scalar>, const Derived>\n    cube() const {\n      return unaryExpr(internal::scalar_cube_op<Scalar>());\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_inverse_op<Scalar>, const Derived>\n    inverse() const {\n      return unaryExpr(internal::scalar_inverse_op<Scalar>());\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_tanh_op<Scalar>, const Derived>\n    tanh() const {\n      return unaryExpr(internal::scalar_tanh_op<Scalar>());\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_lgamma_op<Scalar>, const Derived>\n    lgamma() const {\n      return unaryExpr(internal::scalar_lgamma_op<Scalar>());\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_digamma_op<Scalar>, const Derived>\n    digamma() const {\n      return unaryExpr(internal::scalar_digamma_op<Scalar>());\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_bessel_i0_op<Scalar>, const Derived>\n    bessel_i0() const {\n      return unaryExpr(internal::scalar_bessel_i0_op<Scalar>());\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_bessel_i0e_op<Scalar>, const Derived>\n    bessel_i0e() const {\n      return unaryExpr(internal::scalar_bessel_i0e_op<Scalar>());\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_bessel_i1_op<Scalar>, const Derived>\n    bessel_i1() const {\n      return unaryExpr(internal::scalar_bessel_i1_op<Scalar>());\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_bessel_i1e_op<Scalar>, const Derived>\n    bessel_i1e() const {\n      return unaryExpr(internal::scalar_bessel_i1e_op<Scalar>());\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_bessel_j0_op<Scalar>, const Derived>\n    bessel_j0() const {\n      return unaryExpr(internal::scalar_bessel_j0_op<Scalar>());\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_bessel_y0_op<Scalar>, const Derived>\n    bessel_y0() const {\n      return unaryExpr(internal::scalar_bessel_y0_op<Scalar>());\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_bessel_j1_op<Scalar>, const Derived>\n    bessel_j1() const {\n      return unaryExpr(internal::scalar_bessel_j1_op<Scalar>());\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_bessel_y1_op<Scalar>, const Derived>\n    bessel_y1() const {\n      return unaryExpr(internal::scalar_bessel_y1_op<Scalar>());\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_bessel_k0_op<Scalar>, const Derived>\n    bessel_k0() const {\n      return unaryExpr(internal::scalar_bessel_k0_op<Scalar>());\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_bessel_k0e_op<Scalar>, const Derived>\n    bessel_k0e() const {\n      return unaryExpr(internal::scalar_bessel_k0e_op<Scalar>());\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_bessel_k1_op<Scalar>, const Derived>\n    bessel_k1() const {\n      return unaryExpr(internal::scalar_bessel_k1_op<Scalar>());\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_bessel_k1e_op<Scalar>, const Derived>\n    bessel_k1e() const {\n      return unaryExpr(internal::scalar_bessel_k1e_op<Scalar>());\n    }\n\n    // igamma(a = this, x = other)\n    template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorCwiseBinaryOp<internal::scalar_igamma_op<Scalar>, const Derived, const OtherDerived>\n    igamma(const OtherDerived& other) const {\n      return binaryExpr(other.derived(), internal::scalar_igamma_op<Scalar>());\n    }\n\n    // igamma_der_a(a = this, x = other)\n    template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorCwiseBinaryOp<internal::scalar_igamma_der_a_op<Scalar>, const Derived, const OtherDerived>\n    igamma_der_a(const OtherDerived& other) const {\n      return binaryExpr(other.derived(), internal::scalar_igamma_der_a_op<Scalar>());\n    }\n\n    // gamma_sample_der_alpha(alpha = this, sample = other)\n    template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorCwiseBinaryOp<internal::scalar_gamma_sample_der_alpha_op<Scalar>, const Derived, const OtherDerived>\n    gamma_sample_der_alpha(const OtherDerived& other) const {\n      return binaryExpr(other.derived(), internal::scalar_gamma_sample_der_alpha_op<Scalar>());\n    }\n\n    // igammac(a = this, x = other)\n    template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorCwiseBinaryOp<internal::scalar_igammac_op<Scalar>, const Derived, const OtherDerived>\n    igammac(const OtherDerived& other) const {\n      return binaryExpr(other.derived(), internal::scalar_igammac_op<Scalar>());\n    }\n\n    // zeta(x = this, q = other)\n    template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorCwiseBinaryOp<internal::scalar_zeta_op<Scalar>, const Derived, const OtherDerived>\n    zeta(const OtherDerived& other) const {\n      return binaryExpr(other.derived(), internal::scalar_zeta_op<Scalar>());\n    }\n\n    // polygamma(n = this, x = other)\n    template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorCwiseBinaryOp<internal::scalar_polygamma_op<Scalar>, const Derived, const OtherDerived>\n    polygamma(const OtherDerived& other) const {\n      return binaryExpr(other.derived(), internal::scalar_polygamma_op<Scalar>());\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_erf_op<Scalar>, const Derived>\n    erf() const {\n      return unaryExpr(internal::scalar_erf_op<Scalar>());\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_erfc_op<Scalar>, const Derived>\n    erfc() const {\n      return unaryExpr(internal::scalar_erfc_op<Scalar>());\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_ndtri_op<Scalar>, const Derived>\n    ndtri() const {\n      return unaryExpr(internal::scalar_ndtri_op<Scalar>());\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_logistic_op<Scalar>, const Derived>\n    sigmoid() const {\n      return unaryExpr(internal::scalar_logistic_op<Scalar>());\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_exp_op<Scalar>, const Derived>\n    exp() const {\n      return unaryExpr(internal::scalar_exp_op<Scalar>());\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_expm1_op<Scalar>, const Derived>\n    expm1() const {\n      return unaryExpr(internal::scalar_expm1_op<Scalar>());\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_log_op<Scalar>, const Derived>\n    log() const {\n      return unaryExpr(internal::scalar_log_op<Scalar>());\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_log1p_op<Scalar>, const Derived>\n    log1p() const {\n      return unaryExpr(internal::scalar_log1p_op<Scalar>());\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_abs_op<Scalar>, const Derived>\n    abs() const {\n      return unaryExpr(internal::scalar_abs_op<Scalar>());\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_clamp_op<Scalar>, const Derived>\n    clip(Scalar min, Scalar max) const {\n      return unaryExpr(internal::scalar_clamp_op<Scalar>(min, max));\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const typename internal::conditional<NumTraits<CoeffReturnType>::IsComplex,\n                                                             TensorCwiseUnaryOp<internal::scalar_conjugate_op<Scalar>, const Derived>,\n                                                             Derived>::type\n    conjugate() const {\n      return choose(Cond<NumTraits<CoeffReturnType>::IsComplex>(), unaryExpr(internal::scalar_conjugate_op<Scalar>()), derived());\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::bind2nd_op<internal::scalar_pow_op<Scalar,Scalar> >, const Derived>\n    pow(Scalar exponent) const {\n      return unaryExpr(internal::bind2nd_op<internal::scalar_pow_op<Scalar,Scalar> >(exponent));\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_real_op<Scalar>, const Derived>\n    real() const {\n      return unaryExpr(internal::scalar_real_op<Scalar>());\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_imag_op<Scalar>, const Derived>\n    imag() const {\n      return unaryExpr(internal::scalar_imag_op<Scalar>());\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::bind2nd_op<internal::scalar_sum_op<Scalar,Scalar> >, const Derived>\n    operator+ (Scalar rhs) const {\n      return unaryExpr(internal::bind2nd_op<internal::scalar_sum_op<Scalar,Scalar> >(rhs));\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE friend\n    const TensorCwiseUnaryOp<internal::bind1st_op<internal::scalar_sum_op<Scalar> >, const Derived>\n    operator+ (Scalar lhs, const Derived& rhs) {\n      return rhs.unaryExpr(internal::bind1st_op<internal::scalar_sum_op<Scalar> >(lhs));\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::bind2nd_op<internal::scalar_difference_op<Scalar,Scalar> >, const Derived>\n    operator- (Scalar rhs) const {\n      EIGEN_STATIC_ASSERT((NumTraits<Scalar>::IsSigned || internal::is_same<Scalar, const std::complex<float> >::value), YOU_MADE_A_PROGRAMMING_MISTAKE);\n      return unaryExpr(internal::bind2nd_op<internal::scalar_difference_op<Scalar,Scalar> >(rhs));\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE friend\n    const TensorCwiseUnaryOp<internal::bind1st_op<internal::scalar_difference_op<Scalar> >, const Derived>\n    operator- (Scalar lhs, const Derived& rhs) {\n      return rhs.unaryExpr(internal::bind1st_op<internal::scalar_difference_op<Scalar> >(lhs));\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::bind2nd_op<internal::scalar_product_op<Scalar,Scalar> >, const Derived>\n    operator* (Scalar rhs) const {\n      return unaryExpr(internal::bind2nd_op<internal::scalar_product_op<Scalar,Scalar> >(rhs));\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE friend\n    const TensorCwiseUnaryOp<internal::bind1st_op<internal::scalar_product_op<Scalar> >, const Derived>\n    operator* (Scalar lhs, const Derived& rhs) {\n      return rhs.unaryExpr(internal::bind1st_op<internal::scalar_product_op<Scalar> >(lhs));\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::bind2nd_op<internal::scalar_quotient_op<Scalar,Scalar> >, const Derived>\n    operator/ (Scalar rhs) const {\n      return unaryExpr(internal::bind2nd_op<internal::scalar_quotient_op<Scalar,Scalar> >(rhs));\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE friend\n    const TensorCwiseUnaryOp<internal::bind1st_op<internal::scalar_quotient_op<Scalar> >, const Derived>\n    operator/ (Scalar lhs, const Derived& rhs) {\n      return rhs.unaryExpr(internal::bind1st_op<internal::scalar_quotient_op<Scalar> >(lhs));\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_mod_op<Scalar>, const Derived>\n    operator% (Scalar rhs) const {\n      EIGEN_STATIC_ASSERT(NumTraits<Scalar>::IsInteger, YOU_MADE_A_PROGRAMMING_MISTAKE_TRY_MOD);\n      return unaryExpr(internal::scalar_mod_op<Scalar>(rhs));\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseBinaryOp<internal::scalar_max_op<Scalar>, const Derived, const TensorCwiseNullaryOp<internal::scalar_constant_op<Scalar>, const Derived> >\n    cwiseMax(Scalar threshold) const {\n      return cwiseMax(constant(threshold));\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseBinaryOp<internal::scalar_min_op<Scalar>, const Derived, const TensorCwiseNullaryOp<internal::scalar_constant_op<Scalar>, const Derived> >\n    cwiseMin(Scalar threshold) const {\n      return cwiseMin(constant(threshold));\n    }\n\n    template<typename NewType>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const typename internal::conditional<internal::is_same<NewType, CoeffReturnType>::value,\n                                                             Derived,\n                                                             TensorConversionOp<NewType, const Derived> >::type\n    cast() const {\n      return choose(Cond<internal::is_same<NewType, CoeffReturnType>::value>(), derived(), TensorConversionOp<NewType, const Derived>(derived()));\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_round_op<Scalar>, const Derived>\n    round() const {\n      return unaryExpr(internal::scalar_round_op<Scalar>());\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_rint_op<Scalar>, const Derived>\n    rint() const {\n      return unaryExpr(internal::scalar_rint_op<Scalar>());\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_ceil_op<Scalar>, const Derived>\n    ceil() const {\n      return unaryExpr(internal::scalar_ceil_op<Scalar>());\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_floor_op<Scalar>, const Derived>\n    floor() const {\n      return unaryExpr(internal::scalar_floor_op<Scalar>());\n    }\n\n    // Generic binary operation support.\n    template <typename CustomBinaryOp, typename OtherDerived> EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseBinaryOp<CustomBinaryOp, const Derived, const OtherDerived>\n    binaryExpr(const OtherDerived& other, const CustomBinaryOp& func) const {\n      return TensorCwiseBinaryOp<CustomBinaryOp, const Derived, const OtherDerived>(derived(), other, func);\n    }\n\n    // Coefficient-wise binary operators.\n    template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorCwiseBinaryOp<internal::scalar_sum_op<Scalar>, const Derived, const OtherDerived>\n    operator+(const OtherDerived& other) const {\n      return binaryExpr(other.derived(), internal::scalar_sum_op<Scalar>());\n    }\n\n    template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorCwiseBinaryOp<internal::scalar_difference_op<Scalar>, const Derived, const OtherDerived>\n    operator-(const OtherDerived& other) const {\n      return binaryExpr(other.derived(), internal::scalar_difference_op<Scalar>());\n    }\n\n    template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorCwiseBinaryOp<internal::scalar_product_op<Scalar>, const Derived, const OtherDerived>\n    operator*(const OtherDerived& other) const {\n      return binaryExpr(other.derived(), internal::scalar_product_op<Scalar>());\n    }\n\n    template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorCwiseBinaryOp<internal::scalar_quotient_op<Scalar>, const Derived, const OtherDerived>\n    operator/(const OtherDerived& other) const {\n      return binaryExpr(other.derived(), internal::scalar_quotient_op<Scalar>());\n    }\n\n    template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorCwiseBinaryOp<internal::scalar_max_op<Scalar>, const Derived, const OtherDerived>\n    cwiseMax(const OtherDerived& other) const {\n      return binaryExpr(other.derived(), internal::scalar_max_op<Scalar>());\n    }\n\n    template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorCwiseBinaryOp<internal::scalar_min_op<Scalar>, const Derived, const OtherDerived>\n    cwiseMin(const OtherDerived& other) const {\n      return binaryExpr(other.derived(), internal::scalar_min_op<Scalar>());\n    }\n\n    template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorCwiseBinaryOp<internal::scalar_boolean_and_op, const Derived, const OtherDerived>\n    operator&&(const OtherDerived& other) const {\n      return binaryExpr(other.derived(), internal::scalar_boolean_and_op());\n    }\n\n    template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorCwiseBinaryOp<internal::scalar_boolean_or_op, const Derived, const OtherDerived>\n    operator||(const OtherDerived& other) const {\n      return binaryExpr(other.derived(), internal::scalar_boolean_or_op());\n    }\n\n    template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorCwiseBinaryOp<internal::scalar_boolean_xor_op, const Derived, const OtherDerived>\n    operator^(const OtherDerived& other) const {\n      return binaryExpr(other.derived(), internal::scalar_boolean_xor_op());\n    }\n\n    // Comparisons and tests.\n    template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorCwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_LT>, const Derived, const OtherDerived>\n    operator<(const OtherDerived& other) const {\n      return binaryExpr(other.derived(), internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_LT>());\n    }\n    template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorCwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_LE>, const Derived, const OtherDerived>\n    operator<=(const OtherDerived& other) const {\n      return binaryExpr(other.derived(), internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_LE>());\n    }\n    template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorCwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_GT>, const Derived, const OtherDerived>\n    operator>(const OtherDerived& other) const {\n      return binaryExpr(other.derived(), internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_GT>());\n    }\n    template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorCwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_GE>, const Derived, const OtherDerived>\n    operator>=(const OtherDerived& other) const {\n      return binaryExpr(other.derived(), internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_GE>());\n    }\n\n    template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorCwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_EQ>, const Derived, const OtherDerived>\n    operator==(const OtherDerived& other) const {\n      return binaryExpr(other.derived(), internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_EQ>());\n    }\n\n    template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorCwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_NEQ>, const Derived, const OtherDerived>\n    operator!=(const OtherDerived& other) const {\n      return binaryExpr(other.derived(), internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_NEQ>());\n    }\n\n    // comparisons and tests for Scalars\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_LT>, const Derived, const TensorCwiseNullaryOp<internal::scalar_constant_op<Scalar>, const Derived> >\n    operator<(Scalar threshold) const {\n      return operator<(constant(threshold));\n    }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_LE>, const Derived, const TensorCwiseNullaryOp<internal::scalar_constant_op<Scalar>, const Derived> >\n    operator<=(Scalar threshold) const {\n      return operator<=(constant(threshold));\n    }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_GT>, const Derived, const TensorCwiseNullaryOp<internal::scalar_constant_op<Scalar>, const Derived> >\n    operator>(Scalar threshold) const {\n      return operator>(constant(threshold));\n    }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_GE>, const Derived, const TensorCwiseNullaryOp<internal::scalar_constant_op<Scalar>, const Derived> >\n    operator>=(Scalar threshold) const {\n      return operator>=(constant(threshold));\n    }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_EQ>, const Derived, const TensorCwiseNullaryOp<internal::scalar_constant_op<Scalar>, const Derived> >\n    operator==(Scalar threshold) const {\n      return operator==(constant(threshold));\n    }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_NEQ>, const Derived, const TensorCwiseNullaryOp<internal::scalar_constant_op<Scalar>, const Derived> >\n    operator!=(Scalar threshold) const {\n      return operator!=(constant(threshold));\n    }\n\n    // Checks\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_isnan_op<Scalar>, const Derived>\n    (isnan)() const {\n      return unaryExpr(internal::scalar_isnan_op<Scalar>());\n    }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_isinf_op<Scalar>, const Derived>\n    (isinf)() const {\n      return unaryExpr(internal::scalar_isinf_op<Scalar>());\n    }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_isfinite_op<Scalar>, const Derived>\n    (isfinite)() const {\n      return unaryExpr(internal::scalar_isfinite_op<Scalar>());\n    }\n\n    // Coefficient-wise ternary operators.\n    template<typename ThenDerived, typename ElseDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorSelectOp<const Derived, const ThenDerived, const ElseDerived>\n    select(const ThenDerived& thenTensor, const ElseDerived& elseTensor) const {\n      return TensorSelectOp<const Derived, const ThenDerived, const ElseDerived>(derived(), thenTensor.derived(), elseTensor.derived());\n    }\n\n    // Contractions.\n    typedef Eigen::IndexPair<Index> DimensionPair;\n\n    template<typename OtherDerived, typename Dimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorContractionOp<const Dimensions, const Derived, const OtherDerived, const NoOpOutputKernel>\n    contract(const OtherDerived& other, const Dimensions& dims) const {\n      return TensorContractionOp<const Dimensions, const Derived, const OtherDerived, const NoOpOutputKernel>(derived(), other.derived(), dims);\n    }\n\n    template<typename OtherDerived, typename Dimensions, typename OutputKernel> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorContractionOp<const Dimensions, const Derived, const OtherDerived, const OutputKernel>\n    contract(const OtherDerived& other, const Dimensions& dims, const OutputKernel& output_kernel) const {\n      return TensorContractionOp<const Dimensions, const Derived, const OtherDerived, const OutputKernel>(derived(), other.derived(), dims, output_kernel);\n    }\n\n    // Convolutions.\n    template<typename KernelDerived, typename Dimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorConvolutionOp<const Dimensions, const Derived, const KernelDerived>\n    convolve(const KernelDerived& kernel, const Dimensions& dims) const {\n      return TensorConvolutionOp<const Dimensions, const Derived, const KernelDerived>(derived(), kernel.derived(), dims);\n    }\n\n    // Fourier transforms\n    template <int FFTDataType, int FFTDirection, typename FFT> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorFFTOp<const FFT, const Derived, FFTDataType, FFTDirection>\n    fft(const FFT& dims) const {\n      return TensorFFTOp<const FFT, const Derived, FFTDataType, FFTDirection>(derived(), dims);\n    }\n\n    // Scan.\n    typedef TensorScanOp<internal::SumReducer<CoeffReturnType>, const Derived> TensorScanSumOp;\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorScanSumOp\n    cumsum(const Index& axis, bool exclusive = false) const {\n      return TensorScanSumOp(derived(), axis, exclusive);\n    }\n\n    typedef TensorScanOp<internal::ProdReducer<CoeffReturnType>, const Derived> TensorScanProdOp;\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorScanProdOp\n    cumprod(const Index& axis, bool exclusive = false) const {\n      return TensorScanProdOp(derived(), axis, exclusive);\n    }\n\n    template <typename Reducer>\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorScanOp<Reducer, const Derived>\n    scan(const Index& axis, const Reducer& reducer, bool exclusive = false) const {\n      return TensorScanOp<Reducer, const Derived>(derived(), axis, exclusive, reducer);\n    }\n\n    // Reductions.\n    template <typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorReductionOp<internal::SumReducer<CoeffReturnType>, const Dims, const Derived>\n    sum(const Dims& dims) const {\n      return TensorReductionOp<internal::SumReducer<CoeffReturnType>, const Dims, const Derived>(derived(), dims, internal::SumReducer<CoeffReturnType>());\n    }\n\n    const TensorReductionOp<internal::SumReducer<CoeffReturnType>, const DimensionList<Index, NumDimensions>, const Derived>\n    sum() const {\n      DimensionList<Index, NumDimensions> in_dims;\n      return TensorReductionOp<internal::SumReducer<CoeffReturnType>, const DimensionList<Index, NumDimensions>, const Derived>(derived(), in_dims, internal::SumReducer<CoeffReturnType>());\n    }\n\n    template <typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorReductionOp<internal::MeanReducer<CoeffReturnType>, const Dims, const Derived>\n    mean(const Dims& dims) const {\n      return TensorReductionOp<internal::MeanReducer<CoeffReturnType>, const Dims, const Derived>(derived(), dims, internal::MeanReducer<CoeffReturnType>());\n    }\n\n    const TensorReductionOp<internal::MeanReducer<CoeffReturnType>, const DimensionList<Index, NumDimensions>, const Derived>\n    mean() const {\n      DimensionList<Index, NumDimensions> in_dims;\n      return TensorReductionOp<internal::MeanReducer<CoeffReturnType>, const DimensionList<Index, NumDimensions>, const Derived>(derived(), in_dims, internal::MeanReducer<CoeffReturnType>());\n    }\n\n    template <typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorReductionOp<internal::ProdReducer<CoeffReturnType>, const Dims, const Derived>\n    prod(const Dims& dims) const {\n      return TensorReductionOp<internal::ProdReducer<CoeffReturnType>, const Dims, const Derived>(derived(), dims, internal::ProdReducer<CoeffReturnType>());\n    }\n\n    const TensorReductionOp<internal::ProdReducer<CoeffReturnType>, const DimensionList<Index, NumDimensions>, const Derived>\n    prod() const {\n      DimensionList<Index, NumDimensions> in_dims;\n      return TensorReductionOp<internal::ProdReducer<CoeffReturnType>, const DimensionList<Index, NumDimensions>, const Derived>(derived(), in_dims, internal::ProdReducer<CoeffReturnType>());\n    }\n\n    template <typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorReductionOp<internal::MaxReducer<CoeffReturnType>, const Dims, const Derived>\n    maximum(const Dims& dims) const {\n      return TensorReductionOp<internal::MaxReducer<CoeffReturnType>, const Dims, const Derived>(derived(), dims, internal::MaxReducer<CoeffReturnType>());\n    }\n\n    const TensorReductionOp<internal::MaxReducer<CoeffReturnType>, const DimensionList<Index, NumDimensions>, const Derived>\n    maximum() const {\n      DimensionList<Index, NumDimensions> in_dims;\n      return TensorReductionOp<internal::MaxReducer<CoeffReturnType>, const DimensionList<Index, NumDimensions>, const Derived>(derived(), in_dims, internal::MaxReducer<CoeffReturnType>());\n    }\n\n    template <typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorReductionOp<internal::MinReducer<CoeffReturnType>, const Dims, const Derived>\n    minimum(const Dims& dims) const {\n      return TensorReductionOp<internal::MinReducer<CoeffReturnType>, const Dims, const Derived>(derived(), dims, internal::MinReducer<CoeffReturnType>());\n    }\n\n    const TensorReductionOp<internal::MinReducer<CoeffReturnType>, const DimensionList<Index, NumDimensions>, const Derived>\n    minimum() const {\n      DimensionList<Index, NumDimensions> in_dims;\n      return TensorReductionOp<internal::MinReducer<CoeffReturnType>, const DimensionList<Index, NumDimensions>, const Derived>(derived(), in_dims, internal::MinReducer<CoeffReturnType>());\n    }\n\n    template <typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorReductionOp<internal::AndReducer, const Dims, const typename internal::conditional<internal::is_same<bool, CoeffReturnType>::value, Derived, TensorConversionOp<bool, const Derived> >::type >\n    all(const Dims& dims) const {\n      return cast<bool>().reduce(dims, internal::AndReducer());\n    }\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorReductionOp<internal::AndReducer, const DimensionList<Index, NumDimensions>, const typename internal::conditional<internal::is_same<bool, CoeffReturnType>::value, Derived, TensorConversionOp<bool, const Derived> >::type >\n    all() const {\n      DimensionList<Index, NumDimensions> in_dims;\n      return cast<bool>().reduce(in_dims, internal::AndReducer());\n    }\n\n    template <typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorReductionOp<internal::OrReducer, const Dims, const typename internal::conditional<internal::is_same<bool, CoeffReturnType>::value, Derived, TensorConversionOp<bool, const Derived> >::type >\n    any(const Dims& dims) const {\n      return cast<bool>().reduce(dims, internal::OrReducer());\n    }\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorReductionOp<internal::OrReducer, const DimensionList<Index, NumDimensions>, const typename internal::conditional<internal::is_same<bool, CoeffReturnType>::value, Derived, TensorConversionOp<bool, const Derived> >::type >\n    any() const {\n      DimensionList<Index, NumDimensions> in_dims;\n      return cast<bool>().reduce(in_dims, internal::OrReducer());\n    }\n\n   EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorTupleReducerOp<\n      internal::ArgMaxTupleReducer<Tuple<Index, CoeffReturnType> >,\n      const array<Index, NumDimensions>, const Derived>\n    argmax() const {\n      array<Index, NumDimensions> in_dims;\n      for (Index d = 0; d < NumDimensions; ++d) in_dims[d] = d;\n      return TensorTupleReducerOp<\n        internal::ArgMaxTupleReducer<Tuple<Index, CoeffReturnType> >,\n        const array<Index, NumDimensions>,\n        const Derived>(derived(), internal::ArgMaxTupleReducer<Tuple<Index, CoeffReturnType> >(), -1, in_dims);\n    }\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorTupleReducerOp<\n      internal::ArgMinTupleReducer<Tuple<Index, CoeffReturnType> >,\n      const array<Index, NumDimensions>, const Derived>\n    argmin() const {\n      array<Index, NumDimensions> in_dims;\n      for (Index d = 0; d < NumDimensions; ++d) in_dims[d] = d;\n      return TensorTupleReducerOp<\n        internal::ArgMinTupleReducer<Tuple<Index, CoeffReturnType> >,\n        const array<Index, NumDimensions>,\n        const Derived>(derived(), internal::ArgMinTupleReducer<Tuple<Index, CoeffReturnType> >(), -1, in_dims);\n    }\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorTupleReducerOp<\n      internal::ArgMaxTupleReducer<Tuple<Index, CoeffReturnType> >,\n      const array<Index, 1>, const Derived>\n    argmax(const Index return_dim) const {\n      array<Index, 1> in_dims;\n      in_dims[0] = return_dim;\n      return TensorTupleReducerOp<\n        internal::ArgMaxTupleReducer<Tuple<Index, CoeffReturnType> >,\n        const array<Index, 1>,\n        const Derived>(derived(), internal::ArgMaxTupleReducer<Tuple<Index, CoeffReturnType> >(), return_dim, in_dims);\n    }\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorTupleReducerOp<\n      internal::ArgMinTupleReducer<Tuple<Index, CoeffReturnType> >,\n      const array<Index, 1>, const Derived>\n    argmin(const Index return_dim) const {\n      array<Index, 1> in_dims;\n      in_dims[0] = return_dim;\n      return TensorTupleReducerOp<\n        internal::ArgMinTupleReducer<Tuple<Index, CoeffReturnType> >,\n        const array<Index, 1>,\n        const Derived>(derived(), internal::ArgMinTupleReducer<Tuple<Index, CoeffReturnType> >(), return_dim, in_dims);\n    }\n\n    template <typename Reducer, typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorReductionOp<Reducer, const Dims, const Derived>\n    reduce(const Dims& dims, const Reducer& reducer) const {\n      return TensorReductionOp<Reducer, const Dims, const Derived>(derived(), dims, reducer);\n    }\n\n    template <typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorTraceOp<const Dims, const Derived>\n    trace(const Dims& dims) const {\n      return TensorTraceOp<const Dims, const Derived>(derived(), dims);\n    }\n\n    const TensorTraceOp<const DimensionList<Index, NumDimensions>, const Derived>\n    trace() const {\n      DimensionList<Index, NumDimensions> in_dims;\n      return TensorTraceOp<const DimensionList<Index, NumDimensions>, const Derived>(derived(), in_dims);\n    }\n\n    template <typename Broadcast> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorBroadcastingOp<const Broadcast, const Derived>\n    broadcast(const Broadcast& bcast) const {\n      return TensorBroadcastingOp<const Broadcast, const Derived>(derived(), bcast);\n    }\n\n    template <typename Axis, typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorConcatenationOp<Axis, const Derived, const OtherDerived>\n    concatenate(const OtherDerived& other, Axis axis) const {\n      return TensorConcatenationOp<Axis, const Derived, const OtherDerived>(derived(), other.derived(), axis);\n    }\n\n    template <typename PatchDims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorPatchOp<const PatchDims, const Derived>\n    extract_patches(const PatchDims& patch_dims) const {\n      return TensorPatchOp<const PatchDims, const Derived>(derived(), patch_dims);\n    }\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorImagePatchOp<Dynamic, Dynamic, const Derived>\n    extract_image_patches(const Index patch_rows = 1, const Index patch_cols = 1,\n                          const Index row_stride = 1, const Index col_stride = 1,\n                          const Index in_row_stride = 1, const Index in_col_stride = 1,\n                          const PaddingType padding_type = PADDING_SAME, const Scalar padding_value = Scalar(0)) const {\n      return TensorImagePatchOp<Dynamic, Dynamic, const Derived>(derived(), patch_rows, patch_cols, row_stride, col_stride,\n                                                                 in_row_stride, in_col_stride, 1, 1, padding_type, padding_value);\n    }\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorImagePatchOp<Dynamic, Dynamic, const Derived>\n    extract_image_patches(const Index patch_rows, const Index patch_cols,\n                          const Index row_stride, const Index col_stride,\n                          const Index in_row_stride, const Index in_col_stride,\n                          const Index row_inflate_stride, const Index col_inflate_stride,\n                          const Index padding_top, const Index padding_bottom,\n                          const Index padding_left,const Index padding_right,\n                          const Scalar padding_value) const {\n      return TensorImagePatchOp<Dynamic, Dynamic, const Derived>(derived(), patch_rows, patch_cols, row_stride, col_stride,\n                                                                 in_row_stride, in_col_stride, row_inflate_stride, col_inflate_stride,\n                                                                 padding_top, padding_bottom, padding_left, padding_right, padding_value);\n    }\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorVolumePatchOp<Dynamic, Dynamic, Dynamic, const Derived>\n    extract_volume_patches(const Index patch_planes, const Index patch_rows, const Index patch_cols,\n                           const Index plane_stride = 1, const Index row_stride = 1, const Index col_stride = 1,\n                           const PaddingType padding_type = PADDING_SAME, const Scalar padding_value = Scalar(0)) const {\n      return TensorVolumePatchOp<Dynamic, Dynamic, Dynamic, const Derived>(derived(), patch_planes, patch_rows, patch_cols, plane_stride, row_stride, col_stride, 1, 1, 1, 1, 1, 1, padding_type, padding_value);\n    }\n\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorVolumePatchOp<Dynamic, Dynamic, Dynamic, const Derived>\n    extract_volume_patches(const Index patch_planes, const Index patch_rows, const Index patch_cols,\n                           const Index plane_stride, const Index row_stride, const Index col_stride,\n                           const Index plane_inflate_stride, const Index row_inflate_stride, const Index col_inflate_stride,\n                           const Index padding_top_z, const Index padding_bottom_z,\n                           const Index padding_top, const Index padding_bottom,\n                           const Index padding_left, const Index padding_right, const Scalar padding_value = Scalar(0)) const {\n      return TensorVolumePatchOp<Dynamic, Dynamic, Dynamic, const Derived>(derived(), patch_planes, patch_rows, patch_cols, plane_stride, row_stride, col_stride, 1, 1, 1, plane_inflate_stride, row_inflate_stride, col_inflate_stride, padding_top_z, padding_bottom_z, padding_top, padding_bottom, padding_left, padding_right, padding_value);\n    }\n\n    // Morphing operators.\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorLayoutSwapOp<const Derived>\n    swap_layout() const {\n      return TensorLayoutSwapOp<const Derived>(derived());\n    }\n    template <typename NewDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorReshapingOp<const NewDimensions, const Derived>\n    reshape(const NewDimensions& newDimensions) const {\n      return TensorReshapingOp<const NewDimensions, const Derived>(derived(), newDimensions);\n    }\n    template <typename StartIndices, typename Sizes> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorSlicingOp<const StartIndices, const Sizes, const Derived>\n    slice(const StartIndices& startIndices, const Sizes& sizes) const {\n      return TensorSlicingOp<const StartIndices, const Sizes, const Derived>(derived(), startIndices, sizes);\n    }\n    template <typename StartIndices, typename StopIndices, typename Strides> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorStridingSlicingOp<const StartIndices, const StopIndices, const Strides, const Derived>\n    stridedSlice(const StartIndices& startIndices, const StopIndices& stopIndices, const Strides& strides) const {\n      return TensorStridingSlicingOp<const StartIndices, const StopIndices, const Strides,\n                                const Derived>(derived(), startIndices, stopIndices, strides);\n    }\n    template <Index DimId> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorChippingOp<DimId, const Derived>\n    chip(const Index offset) const {\n      return TensorChippingOp<DimId, const Derived>(derived(), offset, DimId);\n    }\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorChippingOp<Dynamic, const Derived>\n    chip(const Index offset, const Index dim) const {\n      return TensorChippingOp<Dynamic, const Derived>(derived(), offset, dim);\n    }\n    template <typename ReverseDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorReverseOp<const ReverseDimensions, const Derived>\n    reverse(const ReverseDimensions& rev) const {\n      return TensorReverseOp<const ReverseDimensions, const Derived>(derived(), rev);\n    }\n    template <typename PaddingDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorPaddingOp<const PaddingDimensions, const Derived>\n    pad(const PaddingDimensions& padding) const {\n      return TensorPaddingOp<const PaddingDimensions, const Derived>(derived(), padding, internal::scalar_cast_op<int, Scalar>()(0));\n    }\n    template <typename PaddingDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorPaddingOp<const PaddingDimensions, const Derived>\n    pad(const PaddingDimensions& padding, const Scalar padding_value) const {\n      return TensorPaddingOp<const PaddingDimensions, const Derived>(derived(), padding, padding_value);\n    }\n    template <typename Shuffle> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorShufflingOp<const Shuffle, const Derived>\n    shuffle(const Shuffle& shfl) const {\n      return TensorShufflingOp<const Shuffle, const Derived>(derived(), shfl);\n    }\n    template <typename Strides> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorStridingOp<const Strides, const Derived>\n    stride(const Strides& strides) const {\n      return TensorStridingOp<const Strides, const Derived>(derived(), strides);\n    }\n    template <typename Strides> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorInflationOp<const Strides, const Derived>\n    inflate(const Strides& strides) const {\n      return TensorInflationOp<const Strides, const Derived>(derived(), strides);\n    }\n\n    // Returns a tensor containing index/value tuples\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorIndexTupleOp<const Derived>\n    index_tuples() const {\n      return TensorIndexTupleOp<const Derived>(derived());\n    }\n\n    // Support for custom unary and binary operations\n    template <typename CustomUnaryFunc>\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorCustomUnaryOp<const CustomUnaryFunc, const Derived> customOp(const CustomUnaryFunc& op) const {\n      return TensorCustomUnaryOp<const CustomUnaryFunc, const Derived>(derived(), op);\n    }\n    template <typename OtherDerived, typename CustomBinaryFunc>\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorCustomBinaryOp<const CustomBinaryFunc, const Derived, const OtherDerived> customOp(const OtherDerived& other, const CustomBinaryFunc& op) const {\n      return TensorCustomBinaryOp<const CustomBinaryFunc, const Derived, const OtherDerived>(derived(), other, op);\n    }\n\n    // Force the evaluation of the expression.\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorForcedEvalOp<const Derived> eval() const {\n      return TensorForcedEvalOp<const Derived>(derived());\n    }\n\n  protected:\n    template <typename Scalar, int NumIndices, int Options, typename IndexType> friend class Tensor;\n    template <typename Scalar, typename Dimensions, int Option, typename IndexTypes> friend class TensorFixedSize;\n    // the Eigen:: prefix is required to workaround a compilation issue with nvcc 9.0\n    template <typename OtherDerived, int AccessLevel> friend class Eigen::TensorBase;\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const Derived& derived() const { return *static_cast<const Derived*>(this); }\n};\n\ntemplate<typename Derived, int AccessLevel = internal::accessors_level<Derived>::value>\nclass TensorBase : public TensorBase<Derived, ReadOnlyAccessors> {\n public:\n    typedef internal::traits<Derived> DerivedTraits;\n    typedef typename DerivedTraits::Scalar Scalar;\n    typedef typename DerivedTraits::Index Index;\n    typedef Scalar CoeffReturnType;\n    static const int NumDimensions = DerivedTraits::NumDimensions;\n\n    template <typename Scalar, int NumIndices, int Options, typename IndexType> friend class Tensor;\n    template <typename Scalar, typename Dimensions, int Option, typename IndexTypes> friend class TensorFixedSize;\n    // the Eigen:: prefix is required to workaround a compilation issue with nvcc 9.0\n    template <typename OtherDerived, int OtherAccessLevel> friend class Eigen::TensorBase;\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Derived& setZero() {\n      return setConstant(Scalar(0));\n    }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Derived& setConstant(const Scalar& val) {\n      return derived() = this->constant(val);\n    }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Derived& setRandom() {\n      return derived() = this->random();\n    }\n    template <typename RandomGenerator> EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Derived& setRandom() {\n      return derived() = this->template random<RandomGenerator>();\n    }\n\n#if EIGEN_HAS_VARIADIC_TEMPLATES\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Derived& setValues(\n        const typename internal::Initializer<Derived, NumDimensions>::InitList& vals) {\n      TensorEvaluator<Derived, DefaultDevice> eval(derived(), DefaultDevice());\n      internal::initialize_tensor<Derived, NumDimensions>(eval, vals);\n      return derived();\n    }\n#endif  // EIGEN_HAS_VARIADIC_TEMPLATES\n\n    template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Derived& operator+=(const OtherDerived& other) {\n      return derived() = derived() + other.derived();\n    }\n    template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Derived& operator-=(const OtherDerived& other) {\n      return derived() = derived() - other.derived();\n    }\n    template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Derived& operator*=(const OtherDerived& other) {\n      return derived() = derived() * other.derived();\n    }\n    template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Derived& operator/=(const OtherDerived& other) {\n      return derived() = derived() / other.derived();\n    }\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorLayoutSwapOp<const Derived>\n    swap_layout() const {\n      return TensorLayoutSwapOp<const Derived>(derived());\n    }\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    TensorLayoutSwapOp<Derived>\n    swap_layout() {\n      return TensorLayoutSwapOp<Derived>(derived());\n    }\n\n    template <typename Axis, typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorConcatenationOp<const Axis, const Derived, const OtherDerived>\n    concatenate(const OtherDerived& other, const Axis& axis) const {\n      return TensorConcatenationOp<const Axis, const Derived, const OtherDerived>(derived(), other, axis);\n    }\n    template <typename Axis, typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    TensorConcatenationOp<const Axis, Derived, OtherDerived>\n    concatenate(const OtherDerived& other, const Axis& axis) {\n      return TensorConcatenationOp<const Axis, Derived, OtherDerived>(derived(), other, axis);\n    }\n\n    template <typename NewDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorReshapingOp<const NewDimensions, const Derived>\n    reshape(const NewDimensions& newDimensions) const {\n      return TensorReshapingOp<const NewDimensions, const Derived>(derived(), newDimensions);\n    }\n    template <typename NewDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    TensorReshapingOp<const NewDimensions, Derived>\n    reshape(const NewDimensions& newDimensions) {\n      return TensorReshapingOp<const NewDimensions, Derived>(derived(), newDimensions);\n    }\n\n    template <typename StartIndices, typename Sizes> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorSlicingOp<const StartIndices, const Sizes, const Derived>\n    slice(const StartIndices& startIndices, const Sizes& sizes) const {\n      return TensorSlicingOp<const StartIndices, const Sizes, const Derived>(derived(), startIndices, sizes);\n    }\n    template <typename StartIndices, typename Sizes> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    TensorSlicingOp<const StartIndices, const Sizes, Derived>\n    slice(const StartIndices& startIndices, const Sizes& sizes) {\n      return TensorSlicingOp<const StartIndices, const Sizes, Derived>(derived(), startIndices, sizes);\n    }\n\n    template <typename StartIndices, typename StopIndices, typename Strides> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorStridingSlicingOp<const StartIndices, const StopIndices, const Strides, const Derived>\n    stridedSlice(const StartIndices& startIndices, const StopIndices& stopIndices, const Strides& strides) const {\n      return TensorStridingSlicingOp<const StartIndices, const StopIndices, const Strides,\n                                const Derived>(derived(), startIndices, stopIndices, strides);\n    }\n    template <typename StartIndices, typename StopIndices, typename Strides> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    TensorStridingSlicingOp<const StartIndices, const StopIndices, const Strides, Derived>\n    stridedSlice(const StartIndices& startIndices, const StopIndices& stopIndices, const Strides& strides) {\n      return TensorStridingSlicingOp<const StartIndices, const StopIndices, const Strides,\n                                Derived>(derived(), startIndices, stopIndices, strides);\n    }\n\n    template <DenseIndex DimId> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorChippingOp<DimId, const Derived>\n    chip(const Index offset) const {\n      return TensorChippingOp<DimId, const Derived>(derived(), offset, DimId);\n    }\n    template <Index DimId> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    TensorChippingOp<DimId, Derived>\n    chip(const Index offset) {\n      return TensorChippingOp<DimId, Derived>(derived(), offset, DimId);\n    }\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorChippingOp<Dynamic, const Derived>\n    chip(const Index offset, const Index dim) const {\n      return TensorChippingOp<Dynamic, const Derived>(derived(), offset, dim);\n    }\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    TensorChippingOp<Dynamic, Derived>\n    chip(const Index offset, const Index dim) {\n      return TensorChippingOp<Dynamic, Derived>(derived(), offset, dim);\n    }\n\n    template <typename ReverseDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorReverseOp<const ReverseDimensions, const Derived>\n    reverse(const ReverseDimensions& rev) const {\n      return TensorReverseOp<const ReverseDimensions, const Derived>(derived(), rev);\n    }\n    template <typename ReverseDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    TensorReverseOp<const ReverseDimensions, Derived>\n    reverse(const ReverseDimensions& rev) {\n      return TensorReverseOp<const ReverseDimensions, Derived>(derived(), rev);\n    }\n\n    template <typename Shuffle> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorShufflingOp<const Shuffle, const Derived>\n    shuffle(const Shuffle& shfl) const {\n      return TensorShufflingOp<const Shuffle, const Derived>(derived(), shfl);\n    }\n    template <typename Shuffle> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    TensorShufflingOp<const Shuffle, Derived>\n    shuffle(const Shuffle& shfl) {\n      return TensorShufflingOp<const Shuffle, Derived>(derived(), shfl);\n    }\n\n    template <typename Strides> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const TensorStridingOp<const Strides, const Derived>\n    stride(const Strides& strides) const {\n      return TensorStridingOp<const Strides, const Derived>(derived(), strides);\n    }\n    template <typename Strides> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    TensorStridingOp<const Strides, Derived>\n    stride(const Strides& strides) {\n      return TensorStridingOp<const Strides, Derived>(derived(), strides);\n    }\n\n    // Select the device on which to evaluate the expression.\n    template <typename DeviceType>\n    TensorDevice<Derived, DeviceType> device(const DeviceType& dev) {\n      return TensorDevice<Derived, DeviceType>(dev, derived());\n    }\n\n    // Select the async device on which to evaluate the expression.\n    template <typename DeviceType, typename DoneCallback>\n    TensorAsyncDevice<Derived, DeviceType, DoneCallback> device(const DeviceType& dev, DoneCallback done) {\n      return TensorAsyncDevice<Derived, DeviceType, DoneCallback>(dev, derived(), std::move(done));\n    }\n\n protected:\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Derived& derived() { return *static_cast<Derived*>(this); }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const Derived& derived() const { return *static_cast<const Derived*>(this); }\n};\n#endif // EIGEN_PARSED_BY_DOXYGEN\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_BASE_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorBlock.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_BLOCK_H\n#define EIGEN_CXX11_TENSOR_TENSOR_BLOCK_H\n\nnamespace Eigen {\nnamespace internal {\n\n// -------------------------------------------------------------------------- //\n// Forward declarations for templates defined below.\ntemplate <typename Scalar, typename IndexType, int NumDims, int Layout>\nclass TensorBlockIO;\n\n// -------------------------------------------------------------------------- //\n// Helper function to compute strides for densely stored buffer of given\n// dimensions.\n\n// TODO(ezhulenev): We compute strides 1000 times in different evaluators, use\n// this function instead everywhere.\ntemplate <int Layout, typename IndexType, int NumDims>\nEIGEN_ALWAYS_INLINE DSizes<IndexType, NumDims> strides(\n    const DSizes<IndexType, NumDims>& dimensions) {\n  DSizes<IndexType, NumDims> strides;\n  if (NumDims == 0) return strides;\n\n  // TODO(ezhulenev): Use templates to unroll this loop (similar to\n  // h_array_reduce in CXX11meta.h)? Benchmark it.\n  if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n    strides[0] = 1;\n    for (int i = 1; i < NumDims; ++i) {\n      strides[i] = strides[i - 1] * dimensions[i - 1];\n    }\n  } else {\n    strides[NumDims - 1] = 1;\n    for (int i = NumDims - 2; i >= 0; --i) {\n      strides[i] = strides[i + 1] * dimensions[i + 1];\n    }\n  }\n\n  return strides;\n}\n\ntemplate <int Layout, typename IndexType, size_t NumDims>\nEIGEN_ALWAYS_INLINE DSizes<IndexType, NumDims> strides(\n    const Eigen::array<IndexType, NumDims>& dimensions) {\n  return strides<Layout>(DSizes<IndexType, NumDims>(dimensions));\n}\n\ntemplate <int Layout, std::ptrdiff_t... Indices>\nEIGEN_STRONG_INLINE DSizes<std::ptrdiff_t, sizeof...(Indices)> strides(\n    const Sizes<Indices...>& sizes) {\n  return strides<Layout>(DSizes<std::ptrdiff_t, sizeof...(Indices)>(sizes));\n}\n\n// -------------------------------------------------------------------------- //\n\n// Tensor block shape type defines what are the shape preference for the blocks\n// extracted from the larger tensor.\n//\n// Example: blocks of 100 elements from the large 100x100 tensor:\n// - tensor: 100x100\n// - target_block_size: 100\n//\n// TensorBlockShapeType:\n//  - kUniformAllDims: 100 blocks of size 10x10\n//  - kSkewedInnerDims: 100 blocks of size 100x1 (or 1x100 depending on a column\n//                      or row major layout)\nenum class TensorBlockShapeType { kUniformAllDims, kSkewedInnerDims };\n\nstruct TensorBlockResourceRequirements {\n  TensorBlockShapeType shape_type;  // target block shape\n  size_t size;                      // target block size\n  TensorOpCost cost_per_coeff;      // cost of computing a single block element\n\n#ifdef EIGEN_HIPCC\n  // For HIPCC, we need to explicitly declare as a \"device fun\", the constructor\n  // which is implicitly invoked in the \"merge\" / \"any\" routines. else HIPCC\n  // errors out complaining about the lack of a matching constructor\n  EIGEN_DEVICE_FUNC\n  TensorBlockResourceRequirements(TensorBlockShapeType shape_type_, size_t size_,\n\t\t\t\t  TensorOpCost cost_)\n    : shape_type(shape_type_), size(size_), cost_per_coeff(cost_)\n  {}\n#endif\n\n  template <typename Scalar>\n  EIGEN_DEVICE_FUNC static TensorBlockResourceRequirements withShapeAndSize(\n      TensorBlockShapeType shape_type, size_t size_in_bytes,\n      TensorOpCost cost) {\n    const size_t size = numext::maxi(size_t(1), size_in_bytes / sizeof(Scalar));\n    return {shape_type, size, cost};\n  }\n\n  template <typename Scalar>\n  EIGEN_DEVICE_FUNC static TensorBlockResourceRequirements withShapeAndSize(\n      TensorBlockShapeType shape_type, size_t size_in_bytes) {\n    // This default cost per coefficient is valid for most materialized tensor\n    // block evaluation implementations, because they typically just read\n    // coefficients from the underlying tensor storage, and write to the tensor\n    // block buffer (scratch or destination memory, reads and writes have linear\n    // access pattern). We ignore the fixed cost of block evaluation, because in\n    // practice it should negligible.\n    //\n    // Lazy block evaluation adds the cost of calling a functor for each\n    // coefficient.\n    //\n    // All non-trivial block evaluation implementations must provide their own\n    // cost approximation (e.g. shuffling inner dimension has a much higher cost\n    // because it reads memory randomly, although the total number of moved\n    // bytes is the same).\n    return withShapeAndSize<Scalar>(shape_type, size_in_bytes,\n                                    {/*bytes_loaded=*/sizeof(Scalar),\n                                     /*bytes_stored=*/sizeof(Scalar),\n                                     /*compute_cycles=*/0});\n  }\n\n  template <typename Scalar>\n  EIGEN_DEVICE_FUNC static TensorBlockResourceRequirements skewed(\n      size_t size_in_bytes) {\n    return withShapeAndSize<Scalar>(TensorBlockShapeType::kSkewedInnerDims,\n                                    size_in_bytes);\n  }\n\n  template <typename Scalar>\n  EIGEN_DEVICE_FUNC static TensorBlockResourceRequirements uniform(\n      size_t size_in_bytes) {\n    return withShapeAndSize<Scalar>(TensorBlockShapeType::kUniformAllDims,\n                                    size_in_bytes);\n  }\n\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE TensorBlockResourceRequirements\n  merge(const TensorBlockResourceRequirements& lhs,\n        const TensorBlockResourceRequirements& rhs) {\n    return {merge(lhs.shape_type, rhs.shape_type),           // shape_type\n            merge(lhs.size, rhs.size),                       // size\n            merge(lhs.cost_per_coeff, rhs.cost_per_coeff)};  // cost_per_coeff\n  }\n\n  EIGEN_DEVICE_FUNC TensorBlockResourceRequirements& addCostPerCoeff(\n      TensorOpCost cost) {\n    cost_per_coeff += cost;\n    return *this;\n  }\n\n  // This is a resource requirement that should be returned from expressions\n  // that do not have any block evaluation preference (e.g. default tensor\n  // expression with raw buffer access).\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE TensorBlockResourceRequirements any() {\n    return {TensorBlockShapeType::kUniformAllDims, 1, {0, 0, 0}};\n  }\n\n private:\n  using Requirements = TensorBlockResourceRequirements;\n\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE size_t merge(size_t lhs_size, size_t rhs_size) {\n    return numext::maxi(lhs_size, rhs_size);\n  }\n\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE TensorBlockShapeType\n  merge(TensorBlockShapeType lhs, TensorBlockShapeType rhs) {\n    return (lhs == TensorBlockShapeType::kSkewedInnerDims ||\n            rhs == TensorBlockShapeType::kSkewedInnerDims)\n               ? TensorBlockShapeType::kSkewedInnerDims\n               : TensorBlockShapeType::kUniformAllDims;\n  }\n\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE TensorOpCost merge(TensorOpCost lhs_cost,\n                                                TensorOpCost rhs_cost) {\n    return lhs_cost + rhs_cost;\n  }\n};\n\n// -------------------------------------------------------------------------- //\n// TensorBlockDescriptor specifies a block offset within a tensor and the block\n// sizes along each of the tensor dimensions.\n\ntemplate <int NumDims, typename IndexType = Eigen::Index>\nclass TensorBlockDescriptor {\n public:\n  typedef DSizes<IndexType, NumDims> Dimensions;\n\n  // If we evaluate a Tensor assignment, and expression on the left, already has\n  // a memory buffer, then we might do performance optimization, and evaluate\n  // the root expression directly into the final output memory. Some time it's\n  // possible to reuse it for materializing subexpressions inside an expression\n  // tree, to to avoid dynamic memory allocation.\n  //\n  // The pointer type of the underlying storage is erased, because passing\n  // Scalar type through all the expression evaluation layers is way too many\n  // templates. In practice destination buffer type should always match the\n  // evaluated expression scalar type.\n  class DestinationBuffer {\n   public:\n    enum DestinationBufferKind : int {\n      // The above explicit specification of \"int\" as the enum basetype is\n      // needed to get around a HIPCC link error (\"the field type is not\n      // amp-compatible\")\n      // which is issued for class members with the enum type.\n      // TODO(rocm):\n      // remove the \"int\" basetype once HIPCC has been fixed to not error out\n      // in the above scenario.\n\n      // Destination buffer is not defined (`m_data` == nullptr).\n      kEmpty,\n\n      // Tensor block defined by an owning tensor block descriptor can fit\n      // contiguously into the destination buffer. In this case it's safe to\n      // materialize tensor block in the destination buffer, wrap it in a\n      // TensorMap, and use to build Eigen expression on top of it.\n      kContiguous,\n\n      // Destination buffer strides do not match strides of the contiguously\n      // stored block, and it's impossible to define a TensorMap over this\n      // buffer. However if we are evaluating a root of an expression tree, we\n      // still can materialize an output into this destination, because we can\n      // guarantee that no one will ever access it through block API.\n      //\n      // In theory it is possible to build valid TensorStriding<TensorMap>\n      // expression on top of this destination buffer, however it has\n      // inefficient coeff/packet access, and defeats the purpose of fast block\n      // evaluation API.\n      kStrided\n    };\n\n    template <typename Scalar>\n    Scalar* data() const {\n      eigen_assert(m_data_type_size == sizeof(Scalar));\n      return static_cast<Scalar*>(m_data);\n    }\n\n    const Dimensions& strides() const { return m_strides; }\n    const DestinationBufferKind& kind() const { return m_kind; }\n\n   private:\n    friend class TensorBlockDescriptor;\n\n    DestinationBuffer() : m_data(NULL), m_data_type_size(0), m_kind(kEmpty) {}\n\n    template <typename Scalar>\n    DestinationBuffer(Scalar* data, const Dimensions& strides,\n                      DestinationBufferKind kind)\n        : m_data(static_cast<void*>(data)),\n          m_data_type_size(sizeof(Scalar)),\n          m_strides(strides),\n          m_kind(kind) {}\n\n    template <int Layout, typename Scalar>\n    static DestinationBuffer make(const TensorBlockDescriptor& desc,\n                                  Scalar* data, const Dimensions& strides) {\n      return DestinationBuffer(data, strides, kind<Layout>(desc, strides));\n    }\n\n    template <int Layout>\n    static DestinationBufferKind kind(const TensorBlockDescriptor& desc,\n                                      const Dimensions& strides) {\n      const Dimensions& desc_dims = desc.dimensions();\n      const Dimensions& desc_strides = internal::strides<Layout>(desc_dims);\n      for (int i = 0; i < NumDims; ++i) {\n        if (desc_dims[i] == 1) continue;\n        if (desc_strides[i] != strides[i]) return kStrided;\n      }\n      return kContiguous;\n    }\n\n    // Storage pointer is type erased, to reduce template bloat, but we still\n    // keep the size of the underlying element type for error checking.\n    void* m_data;\n    size_t m_data_type_size;\n\n    // Destination buffer dimensions always match the dimensions of a tensor\n    // block descriptor it belongs to, however strides might be different.\n    Dimensions m_strides;\n\n    DestinationBufferKind m_kind;\n  };\n\n  TensorBlockDescriptor(const IndexType offset, const Dimensions& dimensions,\n                        const DestinationBuffer& destination)\n      : m_offset(offset),\n        m_dimensions(dimensions),\n        m_destination(destination) {}\n\n  TensorBlockDescriptor(const IndexType offset, const Dimensions& dimensions)\n      : m_offset(offset),\n        m_dimensions(dimensions),\n        m_destination(DestinationBuffer()) {}\n\n  IndexType offset() const { return m_offset; }\n  const Dimensions& dimensions() const { return m_dimensions; }\n  IndexType dimension(int index) const { return m_dimensions[index]; }\n  IndexType size() const { return array_prod<IndexType>(m_dimensions); }\n\n  const DestinationBuffer& destination() const { return m_destination; }\n\n  template <int Layout, typename Scalar>\n  void AddDestinationBuffer(Scalar* dst_base, const Dimensions& dst_strides) {\n    eigen_assert(dst_base != NULL);\n    m_destination =\n        DestinationBuffer::template make<Layout>(*this, dst_base, dst_strides);\n  }\n\n  template <int Layout, typename Scalar, typename DstStridesIndexType>\n  void AddDestinationBuffer(\n      Scalar* dst_base,\n      const DSizes<DstStridesIndexType, NumDims>& dst_strides) {\n    // DSizes constructor will do index type promotion if it's safe.\n    AddDestinationBuffer<Layout>(dst_base, Dimensions(dst_strides));\n  }\n\n  TensorBlockDescriptor& DropDestinationBuffer() {\n    m_destination.m_data = NULL;\n    m_destination.m_kind = DestinationBuffer::kEmpty;\n    return *this;\n  }\n\n  bool HasDestinationBuffer() const {\n    return m_destination.kind() != DestinationBuffer::kEmpty;\n  }\n\n  // Returns a copy of `*this` with updated offset.\n  TensorBlockDescriptor WithOffset(IndexType offset) const {\n    return TensorBlockDescriptor(offset, m_dimensions, m_destination);\n  }\n\n private:\n  // Offset and dimensions are immutable after construction. Block descriptor\n  // can only be mutated by adding or dropping destination.\n  const IndexType m_offset;\n  const Dimensions m_dimensions;\n  DestinationBuffer m_destination;\n};\n\n// -------------------------------------------------------------------------- //\n// TensorBlockMapper is responsible for iterating over the blocks of a tensor.\n\ntemplate <int NumDims, int Layout, typename IndexType = Eigen::Index>\nclass TensorBlockMapper {\n  typedef TensorBlockDescriptor<NumDims, IndexType> BlockDescriptor;\n\n public:\n  typedef DSizes<IndexType, NumDims> Dimensions;\n\n  TensorBlockMapper() = default;\n  TensorBlockMapper(const DSizes<IndexType, NumDims>& dimensions,\n                    const TensorBlockResourceRequirements& requirements)\n      : m_tensor_dimensions(dimensions), m_requirements(requirements) {\n    // Compute block dimensions and the total number of blocks.\n    InitializeBlockDimensions();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE IndexType blockCount() const {\n    return m_total_block_count;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE IndexType blockTotalSize() const {\n    return m_block_dimensions.TotalSize();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const DSizes<IndexType, NumDims>&\n  blockDimensions() const {\n    return m_block_dimensions;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE BlockDescriptor\n  blockDescriptor(IndexType block_index) const {\n    static const bool isColMajor = Layout == static_cast<int>(ColMajor);\n\n    IndexType offset = 0;\n    DSizes<IndexType, NumDims> dimensions;\n\n    if (NumDims == 0) return BlockDescriptor(offset, dimensions);\n\n    // Iterate outer -> inner dimensions.\n    for (int i = NumDims - 1; i >= 0; --i) {\n      const int dim = isColMajor ? i : NumDims - i - 1;\n\n      const IndexType idx = block_index / m_block_strides[dim];\n      block_index -= idx * m_block_strides[dim];\n\n      const IndexType coord = idx * m_block_dimensions[dim];\n      dimensions[dim] = numext::mini(m_tensor_dimensions[dim] - coord,\n                                     m_block_dimensions[dim]);\n      offset += coord * m_tensor_strides[dim];\n    }\n\n    return {offset, dimensions};\n  }\n\n private:\n  void InitializeBlockDimensions() {\n    // Requested block shape and size.\n    const TensorBlockShapeType shape_type = m_requirements.shape_type;\n    IndexType target_block_size =\n        numext::maxi<IndexType>(1, static_cast<IndexType>(m_requirements.size));\n\n    IndexType tensor_size = m_tensor_dimensions.TotalSize();\n\n    // Corner case: one of the dimensions is zero. Logic below is too complex\n    // to handle this case on a general basis, just use unit block size.\n    // Note: we must not yield blocks with zero dimensions (recipe for\n    // overflows/underflows, divisions by zero and NaNs later).\n    if (tensor_size == 0) {\n      for (int i = 0; i < NumDims; ++i) {\n        m_block_dimensions[i] = 1;\n      }\n      m_total_block_count = 0;\n      return;\n    }\n\n    // If tensor fits into a target block size, evaluate it as a single block.\n    if (tensor_size <= target_block_size) {\n      m_block_dimensions = m_tensor_dimensions;\n      m_total_block_count = 1;\n      // The only valid block index is `0`, and in this case we do not need\n      // to compute real strides for tensor or blocks (see blockDescriptor).\n      for (int i = 0; i < NumDims; ++i) {\n        m_tensor_strides[i] = 0;\n        m_block_strides[i] = 1;\n      }\n      return;\n    }\n\n    static const bool isColMajor = Layout == static_cast<int>(ColMajor);\n\n    // Block shape skewed towards inner dimension.\n    if (shape_type == TensorBlockShapeType::kSkewedInnerDims) {\n      IndexType coeff_to_allocate = target_block_size;\n\n      for (int i = 0; i < NumDims; ++i) {\n        const int dim = isColMajor ? i : NumDims - i - 1;\n        m_block_dimensions[dim] =\n            numext::mini(coeff_to_allocate, m_tensor_dimensions[dim]);\n        coeff_to_allocate = divup(\n            coeff_to_allocate,\n            numext::maxi(static_cast<IndexType>(1), m_block_dimensions[dim]));\n      }\n      eigen_assert(coeff_to_allocate == 1);\n\n    } else if (shape_type == TensorBlockShapeType::kUniformAllDims) {\n      // Tensor will not fit within 'target_block_size' budget: calculate tensor\n      // block dimension sizes based on \"square\" dimension size target.\n      const IndexType dim_size_target = convert_index<IndexType>(\n          std::pow(static_cast<float>(target_block_size),\n                   1.0f / static_cast<float>(m_block_dimensions.rank())));\n\n      for (int i = 0; i < NumDims; ++i) {\n        // TODO(andydavis) Adjust the inner most 'block_dim_size' to make it\n        // a multiple of the packet size. Note that reducing\n        // 'block_dim_size' in this manner can increase the number of\n        // blocks, and so will amplify any per-block overhead.\n        m_block_dimensions[i] =\n            numext::mini(dim_size_target, m_tensor_dimensions[i]);\n      }\n\n      // Add any un-allocated coefficients to inner dimension(s).\n      IndexType total_size = m_block_dimensions.TotalSize();\n      for (int i = 0; i < NumDims; ++i) {\n        const int dim = isColMajor ? i : NumDims - i - 1;\n\n        if (m_block_dimensions[dim] < m_tensor_dimensions[dim]) {\n          const IndexType total_size_other_dims =\n              total_size / m_block_dimensions[dim];\n          const IndexType alloc_avail =\n              divup<IndexType>(target_block_size, total_size_other_dims);\n          if (alloc_avail == m_block_dimensions[dim]) {\n            // Insufficient excess coefficients to allocate.\n            break;\n          }\n          m_block_dimensions[dim] =\n              numext::mini(m_tensor_dimensions[dim], alloc_avail);\n          total_size = total_size_other_dims * m_block_dimensions[dim];\n        }\n      }\n\n    } else {\n      eigen_assert(false);  // unknown block shape\n    }\n\n    eigen_assert(m_block_dimensions.TotalSize() >=\n                 numext::mini<IndexType>(target_block_size,\n                                         m_tensor_dimensions.TotalSize()));\n\n    // Calculate block counts by dimension and total block count.\n    DSizes<IndexType, NumDims> block_count;\n    for (int i = 0; i < NumDims; ++i) {\n      block_count[i] = divup(m_tensor_dimensions[i], m_block_dimensions[i]);\n    }\n    m_total_block_count = array_prod(block_count);\n\n    // Calculate block strides (used for enumerating blocks).\n    m_tensor_strides = strides<Layout>(m_tensor_dimensions);\n    m_block_strides = strides<Layout>(block_count);\n  }\n\n  DSizes<IndexType, NumDims> m_tensor_dimensions;\n  TensorBlockResourceRequirements m_requirements;\n\n  DSizes<IndexType, NumDims> m_block_dimensions;\n  IndexType m_total_block_count;\n\n  DSizes<IndexType, NumDims> m_tensor_strides;\n  DSizes<IndexType, NumDims> m_block_strides;\n};\n\n// -------------------------------------------------------------------------- //\n// TensorBlockScratchAllocator is responsible for allocating temporary buffers\n// for block evaluation (output or input block materialization). Given that\n// Eigen expression traversal order is deterministic, all temporary allocations\n// are happening in the same order, and usually have exactly the same size.\n// Scratch allocator keeps a trace of all dynamic allocations, and after the\n// first block evaluation is completed, we should be able to reuse all the\n// temporary buffers for the next block evaluation.\n\ntemplate <typename Device>\nclass TensorBlockScratchAllocator {\n public:\n  explicit TensorBlockScratchAllocator(const Device& device)\n      : m_device(device), m_allocation_index(0) {}\n\n  ~TensorBlockScratchAllocator() {\n    for (size_t i = 0; i < m_allocations.size(); ++i) {\n      m_device.deallocate(m_allocations[i].ptr);\n    }\n  }\n\n  void* allocate(size_t size) {\n    // TODO(ezhulenev): Remove when replaced with inlined vector.\n    if (m_allocations.capacity() == 0) m_allocations.reserve(8);\n\n    // Check if we already have an existing allocation att current index.\n    const int num_allocations = static_cast<int>(m_allocations.size());\n    const bool has_allocation = m_allocation_index < num_allocations;\n\n    // Allocation index can't be larger than the number of allocations.\n    eigen_assert(m_allocation_index <= num_allocations);\n\n    // If we have existing allocation, and its size is larger or equal to\n    // requested size, we do nothing.\n\n    // If current allocation can't fit requested size, we deallocate it, and\n    // replace with a larger allocation.\n    if (has_allocation && m_allocations[m_allocation_index].size < size) {\n      m_device.deallocate(m_allocations[m_allocation_index].ptr);\n      m_allocations[m_allocation_index].ptr = m_device.allocate(size);\n      m_allocations[m_allocation_index].size = size;\n    }\n\n    // Make a new allocation if we don't have and existing one.\n    if (!has_allocation) {\n      Allocation allocation;\n      allocation.ptr = m_device.allocate(size);\n      allocation.size = size;\n      m_allocations.push_back(allocation);\n    }\n\n    eigen_assert(m_allocations[m_allocation_index].ptr != NULL);\n    eigen_assert(m_allocations[m_allocation_index].size >= size);\n\n    return m_allocations[m_allocation_index++].ptr;\n  }\n\n  void reset() { m_allocation_index = 0; }\n\n private:\n  struct Allocation {\n    void* ptr;\n    size_t size;\n  };\n\n  const Device& m_device;\n  int m_allocation_index;\n  // TODO(ezhulenev): This should be an inlined vector.\n  std::vector<Allocation> m_allocations;\n};\n\n// -------------------------------------------------------------------------- //\n// TensorBlockKind represents all possible block kinds, that can be produced by\n// TensorEvaluator::evalBlock function.\nenum TensorBlockKind {\n  // Tensor block that is a lazy expression that must be assigned to a\n  // destination using TensorBlockAssign.\n  kExpr,\n\n  // Tensor block that is a view into a memory buffer owned by an underlying\n  // Tensor expression (e.g. it can be a view into a Tensor buffer).\n  kView,\n\n  // Tensor block that was materialized in a scratch memory buffer, allocated\n  // with TensorBlockScratchAllocator. This block must be copied to a\n  // destination, similar to a block of `kExpr` type.\n  kMaterializedInScratch,\n\n  // Tensor block that was materialized directly into the final output memory\n  // buffer. For example if the left side of an assignment is a Tensor, we can\n  // directly materialize the block in the destination memory.\n  //\n  // If strides in the output buffer do not match tensor block strides, the\n  // Tensor expression will be invalid, and should not be used by\n  // TensorBlockAssign or for constructing another block expression.\n  kMaterializedInOutput\n};\n\n// -------------------------------------------------------------------------- //\n// TensorBlockNotImplemented should be used to defined TensorBlock typedef in\n// TensorEvaluators that do not support block evaluation.\n\nclass TensorBlockNotImplemented {\n public:\n  typedef void XprType;\n};\n\n// -------------------------------------------------------------------------- //\n// XprScalar extracts Scalar type from the Eigen expressions (if expression type\n// is not void). It's required to be able to define lazy block expression for\n// argument types, that do not support block evaluation.\n\ntemplate <typename XprType>\nstruct XprScalar {\n  typedef typename XprType::Scalar type;\n};\ntemplate <>\nstruct XprScalar<void> {\n  typedef void type;\n};\n\n// -------------------------------------------------------------------------- //\n// TensorMaterializedBlock is a fully evaluated block of the original tensor,\n// and XprType is just a TensorMap over the data. This block type is typically\n// used to materialize blocks of tensor expressions, that can't be efficiently\n// represented as lazy Tensor expressions with fast coeff/packet operations,\n// e.g. we materialize all broadcasts into evaluated blocks.\n//\n// TensorMaterializedBlock does not own its memory buffer, it's either a memory\n// buffer that backs the original expression (e.g. block is just a view into a\n// Tensor), or a memory buffer allocated with scratch allocator, and in this\n// case the scratch allocator will deallocate it at the end of block based\n// expression execution.\n//\n// If the block was evaluated directly into the output buffer, and strides in\n// the output buffer do not match block strides, the TensorMap expression will\n// be invalid, and should never be used in block assignment or any other tensor\n// expression.\n\ntemplate <typename Scalar, int NumDims, int Layout,\n          typename IndexType = Eigen::Index>\nclass TensorMaterializedBlock {\n public:\n  typedef DSizes<IndexType, NumDims> Dimensions;\n  typedef TensorMap<const Tensor<Scalar, NumDims, Layout> > XprType;\n\n  TensorMaterializedBlock(TensorBlockKind kind, const Scalar* data,\n                          const Dimensions& dimensions, bool valid_expr = true)\n      : m_kind(kind),\n        m_data(data),\n        m_dimensions(dimensions),\n        m_expr(m_data, m_dimensions),\n        m_valid_expr(valid_expr) {\n    eigen_assert(m_kind == internal::TensorBlockKind::kView ||\n                 m_kind == internal::TensorBlockKind::kMaterializedInScratch ||\n                 m_kind == internal::TensorBlockKind::kMaterializedInOutput);\n  }\n\n  TensorBlockKind kind() const { return m_kind; }\n  // NOTE(ezhulenev): Returning XprType by value like in other block types\n  // causes asan failures. The theory is that XprType::Nested doesn't work\n  // properly for TensorMap.\n  const XprType& expr() const {\n    eigen_assert(m_valid_expr);\n    return m_expr;\n  }\n  const Scalar* data() const { return m_data; }\n  void cleanup() {}\n\n  typedef internal::TensorBlockDescriptor<NumDims, IndexType> TensorBlockDesc;\n\n  // TensorMaterializedBlock can be backed by different types of storage:\n  //\n  //   (1) Contiguous block of memory allocated with scratch allocator.\n  //   (2) Contiguous block of memory reused from tensor block descriptor\n  //       destination buffer.\n  //   (3) Strided block of memory reused from tensor block descriptor\n  //       destination buffer.\n  //\n  class Storage {\n   public:\n    Scalar* data() const { return m_data; }\n    const Dimensions& dimensions() const { return m_dimensions; }\n    const Dimensions& strides() const { return m_strides; }\n\n    TensorMaterializedBlock AsTensorMaterializedBlock() const {\n      return TensorMaterializedBlock(\n          m_materialized_in_output\n              ? internal::TensorBlockKind::kMaterializedInOutput\n              : internal::TensorBlockKind::kMaterializedInScratch,\n          m_data, m_dimensions, !m_strided_storage);\n    }\n\n   private:\n    friend class TensorMaterializedBlock;\n\n    Storage(Scalar* data, const Dimensions& dimensions,\n            const Dimensions& strides, bool materialized_in_output,\n            bool strided_storage)\n        : m_data(data),\n          m_dimensions(dimensions),\n          m_strides(strides),\n          m_materialized_in_output(materialized_in_output),\n          m_strided_storage(strided_storage) {}\n\n    Scalar* m_data;\n    Dimensions m_dimensions;\n    Dimensions m_strides;\n    bool m_materialized_in_output;\n    bool m_strided_storage;\n  };\n\n  // Creates a storage for materialized block either from the block descriptor\n  // destination buffer, or allocates a new buffer with scratch allocator.\n  template <typename TensorBlockScratch>\n  EIGEN_STRONG_INLINE static Storage prepareStorage(\n      TensorBlockDesc& desc, TensorBlockScratch& scratch,\n      bool allow_strided_storage = false) {\n    // Try to reuse destination as an output block buffer.\n    typedef typename TensorBlockDesc::DestinationBuffer DestinationBuffer;\n\n    if (desc.destination().kind() == DestinationBuffer::kContiguous) {\n      Scalar* buffer = desc.destination().template data<Scalar>();\n      desc.DropDestinationBuffer();\n      return Storage(buffer, desc.dimensions(),\n                     internal::strides<Layout>(desc.dimensions()),\n                     /*materialized_in_output=*/true,\n                     /*strided_storage=*/false);\n\n    } else if (desc.destination().kind() == DestinationBuffer::kStrided &&\n               allow_strided_storage) {\n      Scalar* buffer = desc.destination().template data<Scalar>();\n      desc.DropDestinationBuffer();\n      return Storage(buffer, desc.dimensions(), desc.destination().strides(),\n                     /*materialized_in_output=*/true, /*strided_storage=*/true);\n\n    } else {\n      void* mem = scratch.allocate(desc.size() * sizeof(Scalar));\n      return Storage(static_cast<Scalar*>(mem), desc.dimensions(),\n                     internal::strides<Layout>(desc.dimensions()),\n                     /*materialized_in_output=*/false,\n                     /*strided_storage=*/false);\n    }\n  }\n\n  // Creates a materialized block for the given descriptor from a memory buffer.\n  template <typename DataDimensions, typename TensorBlockScratch>\n  EIGEN_STRONG_INLINE static TensorMaterializedBlock materialize(\n      const Scalar* data, const DataDimensions& data_dims,\n      TensorBlockDesc& desc, TensorBlockScratch& scratch) {\n    eigen_assert(array_size<DataDimensions>::value == desc.dimensions().size());\n\n    // If a tensor block dimensions covers a contiguous block of the underlying\n    // memory, we can skip block buffer memory allocation, and construct a block\n    // from existing `data` memory buffer.\n    //\n    // Example: (RowMajor layout)\n    //   data_dims:          [11, 12, 13, 14]\n    //   desc.dimensions():  [1,   1,  3, 14]\n    //\n    // In this case we can construct a TensorBlock starting at\n    // `data + desc.offset()`, with a `desc.dimensions()` block sizes.\n    static const bool is_col_major = Layout == ColMajor;\n\n    // Find out how many inner dimensions have a matching size.\n    int num_matching_inner_dims = 0;\n    for (int i = 0; i < NumDims; ++i) {\n      int dim = is_col_major ? i : NumDims - i - 1;\n      if (data_dims[dim] != desc.dimensions()[dim]) break;\n      ++num_matching_inner_dims;\n    }\n\n    // All the outer dimensions must be of size `1`, except a single dimension\n    // before the matching inner dimension (`3` in the example above).\n    bool can_use_direct_access = true;\n    for (int i = num_matching_inner_dims + 1; i < NumDims; ++i) {\n      int dim = is_col_major ? i : NumDims - i - 1;\n      if (desc.dimension(dim) != 1) {\n        can_use_direct_access = false;\n        break;\n      }\n    }\n\n    if (can_use_direct_access) {\n      const Scalar* block_start = data + desc.offset();\n      return TensorMaterializedBlock(internal::TensorBlockKind::kView,\n                                     block_start, desc.dimensions());\n\n    } else {\n      // Reuse destination buffer or allocate new buffer with scratch allocator.\n      const Storage storage = prepareStorage(desc, scratch);\n\n      typedef internal::TensorBlockIO<Scalar, IndexType, NumDims, Layout>\n          TensorBlockIO;\n      typedef typename TensorBlockIO::Dst TensorBlockIODst;\n      typedef typename TensorBlockIO::Src TensorBlockIOSrc;\n\n      TensorBlockIOSrc src(internal::strides<Layout>(Dimensions(data_dims)),\n                           data, desc.offset());\n      TensorBlockIODst dst(storage.dimensions(), storage.strides(),\n                           storage.data());\n\n      TensorBlockIO::Copy(dst, src);\n      return storage.AsTensorMaterializedBlock();\n    }\n  }\n\n private:\n  TensorBlockKind m_kind;\n  const Scalar* m_data;\n  Dimensions m_dimensions;\n  XprType m_expr;\n  bool m_valid_expr;\n};\n\n// -------------------------------------------------------------------------- //\n// TensorCwiseUnaryBlock is a lazy tensor expression block that applies UnaryOp\n// functor to the blocks produced by the underlying Tensor expression.\n\ntemplate <typename UnaryOp, typename ArgTensorBlock>\nclass TensorCwiseUnaryBlock {\n  static const bool NoArgBlockAccess =\n      internal::is_void<typename ArgTensorBlock::XprType>::value;\n\n public:\n  typedef typename conditional<\n      NoArgBlockAccess, void,\n      TensorCwiseUnaryOp<UnaryOp, const typename ArgTensorBlock::XprType> >::\n      type XprType;\n\n  typedef typename XprScalar<XprType>::type Scalar;\n\n  TensorCwiseUnaryBlock(const ArgTensorBlock& arg_block, const UnaryOp& functor)\n      : m_arg_block(arg_block), m_functor(functor) {}\n\n  TensorBlockKind kind() const { return internal::TensorBlockKind::kExpr; }\n\n  XprType expr() const { return XprType(m_arg_block.expr(), m_functor); }\n  const Scalar* data() const { return NULL; }\n  void cleanup() { m_arg_block.cleanup(); }\n\n private:\n  ArgTensorBlock m_arg_block;\n  UnaryOp m_functor;\n};\n\n// -------------------------------------------------------------------------- //\n// TensorCwiseUnaryBlock is a lazy tensor expression block that applies BinaryOp\n// functor to the blocks produced by the underlying Tensor expression.\n\ntemplate <typename BinaryOp, typename LhsTensorBlock, typename RhsTensorBlock>\nclass TensorCwiseBinaryBlock {\n  static const bool NoArgBlockAccess =\n      internal::is_void<typename LhsTensorBlock::XprType>::value ||\n      internal::is_void<typename RhsTensorBlock::XprType>::value;\n\n public:\n  typedef typename conditional<\n      NoArgBlockAccess, void,\n      TensorCwiseBinaryOp<BinaryOp, const typename LhsTensorBlock::XprType,\n                          const typename RhsTensorBlock::XprType> >::type\n      XprType;\n\n  typedef typename XprScalar<XprType>::type Scalar;\n\n  TensorCwiseBinaryBlock(const LhsTensorBlock& left_block,\n                         const RhsTensorBlock& right_block,\n                         const BinaryOp& functor)\n      : m_left_block(left_block),\n        m_right_block(right_block),\n        m_functor(functor) {}\n\n  TensorBlockKind kind() const { return internal::TensorBlockKind::kExpr; }\n\n  XprType expr() const {\n    return XprType(m_left_block.expr(), m_right_block.expr(), m_functor);\n  }\n\n  const Scalar* data() const { return NULL; }\n\n  void cleanup() {\n    m_left_block.cleanup();\n    m_right_block.cleanup();\n  }\n\n private:\n  LhsTensorBlock m_left_block;\n  RhsTensorBlock m_right_block;\n  BinaryOp m_functor;\n};\n\n// -------------------------------------------------------------------------- //\n// TensorUnaryExprBlock is a lazy tensor expression block that can construct\n// an arbitrary tensor expression from a block of the underlying type (this is a\n// generalization of the TensorCwiseUnaryBlock for arbitrary expressions).\n\ntemplate <typename BlockFactory, typename ArgTensorBlock>\nclass TensorUnaryExprBlock {\n  typedef typename ArgTensorBlock::XprType ArgXprType;\n  static const bool NoArgBlockAccess = internal::is_void<ArgXprType>::value;\n\n public:\n  typedef typename conditional<\n      NoArgBlockAccess, void,\n      typename BlockFactory::template XprType<ArgXprType>::type>::type XprType;\n\n  typedef typename XprScalar<XprType>::type Scalar;\n\n  TensorUnaryExprBlock(const ArgTensorBlock& arg_block,\n                       const BlockFactory& factory)\n      : m_arg_block(arg_block), m_factory(factory) {}\n\n  TensorBlockKind kind() const { return internal::TensorBlockKind::kExpr; }\n  XprType expr() const { return m_factory.expr(m_arg_block.expr()); }\n  const Scalar* data() const { return NULL; }\n  void cleanup() { m_arg_block.cleanup(); }\n\n private:\n  ArgTensorBlock m_arg_block;\n  BlockFactory m_factory;\n};\n\n// -------------------------------------------------------------------------- //\n// TensorTernaryExprBlock is a lazy tensor expression block that can construct\n// an arbitrary tensor expression from three blocks of the underlying type.\n\ntemplate <typename BlockFactory, typename Arg1TensorBlock,\n          typename Arg2TensorBlock, typename Arg3TensorBlock>\nclass TensorTernaryExprBlock {\n  typedef typename Arg1TensorBlock::XprType Arg1XprType;\n  typedef typename Arg2TensorBlock::XprType Arg2XprType;\n  typedef typename Arg3TensorBlock::XprType Arg3XprType;\n\n  static const bool NoArgBlockAccess = internal::is_void<Arg1XprType>::value ||\n                                       internal::is_void<Arg2XprType>::value ||\n                                       internal::is_void<Arg3XprType>::value;\n\n public:\n  typedef typename conditional<\n      NoArgBlockAccess, void,\n      typename BlockFactory::template XprType<Arg1XprType, Arg2XprType,\n                                              Arg3XprType>::type>::type XprType;\n\n  typedef typename XprScalar<XprType>::type Scalar;\n\n  TensorTernaryExprBlock(const Arg1TensorBlock& arg1_block,\n                         const Arg2TensorBlock& arg2_block,\n                         const Arg3TensorBlock& arg3_block,\n                         const BlockFactory& factory)\n      : m_arg1_block(arg1_block),\n        m_arg2_block(arg2_block),\n        m_arg3_block(arg3_block),\n        m_factory(factory) {}\n\n  TensorBlockKind kind() const { return internal::TensorBlockKind::kExpr; }\n  XprType expr() const {\n    return m_factory.expr(m_arg1_block.expr(), m_arg2_block.expr(),\n                          m_arg3_block.expr());\n  }\n  const Scalar* data() const { return NULL; }\n  void cleanup() {\n    m_arg1_block.cleanup();\n    m_arg2_block.cleanup();\n    m_arg3_block.cleanup();\n  }\n\n private:\n  Arg1TensorBlock m_arg1_block;\n  Arg2TensorBlock m_arg2_block;\n  Arg3TensorBlock m_arg3_block;\n  BlockFactory m_factory;\n};\n\n// -------------------------------------------------------------------------- //\n// StridedLinearBufferCopy provides a method to copy data between two linear\n// buffers with different strides, with optimized paths for scatter/gather.\n\ntemplate <typename Scalar, typename IndexType>\nclass StridedLinearBufferCopy {\n  typedef typename packet_traits<Scalar>::type Packet;\n  enum {\n    Vectorizable = packet_traits<Scalar>::Vectorizable,\n    PacketSize = packet_traits<Scalar>::size\n  };\n\n public:\n  // Specifying linear copy kind statically gives ~30% speedup for small sizes.\n  enum class Kind {\n    Linear = 0,       // src_stride == 1 && dst_stride == 1\n    Scatter = 1,      // src_stride == 1 && dst_stride != 1\n    FillLinear = 2,   // src_stride == 0 && dst_stride == 1\n    FillScatter = 3,  // src_stride == 0 && dst_stride != 1\n    Gather = 4,       // dst_stride == 1\n    Random = 5        // everything else\n  };\n\n  struct Dst {\n    Dst(IndexType o, IndexType s, Scalar* d) : offset(o), stride(s), data(d) {}\n\n    IndexType offset;\n    IndexType stride;\n    Scalar* data;\n  };\n\n  struct Src {\n    Src(IndexType o, IndexType s, const Scalar* d)\n        : offset(o), stride(s), data(d) {}\n\n    IndexType offset;\n    IndexType stride;\n    const Scalar* data;\n  };\n\n  template <typename StridedLinearBufferCopy::Kind kind>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Run(const Dst& dst,\n                                                        const Src& src,\n                                                        const size_t count) {\n    Run<kind>(count, dst.offset, dst.stride, dst.data, src.offset, src.stride,\n              src.data);\n  }\n\n private:\n  template <typename StridedLinearBufferCopy::Kind kind>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Run(\n      const IndexType count, const IndexType dst_offset,\n      const IndexType dst_stride, Scalar* EIGEN_RESTRICT dst_data,\n      const IndexType src_offset, const IndexType src_stride,\n      const Scalar* EIGEN_RESTRICT src_data) {\n    const Scalar* src = &src_data[src_offset];\n    Scalar* dst = &dst_data[dst_offset];\n\n    if (!Vectorizable) {\n      for (Index i = 0; i < count; ++i) {\n        dst[i * dst_stride] = src[i * src_stride];\n      }\n      return;\n    }\n\n    const IndexType vectorized_size = count - PacketSize;\n    IndexType i = 0;\n\n    if (kind == StridedLinearBufferCopy::Kind::Linear) {\n      // ******************************************************************** //\n      // Linear copy from `src` to `dst`.\n      const IndexType unrolled_size = count - 4 * PacketSize;\n      eigen_assert(src_stride == 1 && dst_stride == 1);\n      for (; i <= unrolled_size; i += 4 * PacketSize) {\n        for (int j = 0; j < 4; ++j) {\n          Packet p = ploadu<Packet>(src + i + j * PacketSize);\n          pstoreu<Scalar, Packet>(dst + i + j * PacketSize, p);\n        }\n      }\n      for (; i <= vectorized_size; i += PacketSize) {\n        Packet p = ploadu<Packet>(src + i);\n        pstoreu<Scalar, Packet>(dst + i, p);\n      }\n      for (; i < count; ++i) {\n        dst[i] = src[i];\n      }\n      // ******************************************************************** //\n    } else if (kind == StridedLinearBufferCopy::Kind::Scatter) {\n      // Scatter from `src` to `dst`.\n      eigen_assert(src_stride == 1 && dst_stride != 1);\n      for (; i <= vectorized_size; i += PacketSize) {\n        Packet p = ploadu<Packet>(src + i);\n        pscatter<Scalar, Packet>(dst + i * dst_stride, p, dst_stride);\n      }\n      for (; i < count; ++i) {\n        dst[i * dst_stride] = src[i];\n      }\n      // ******************************************************************** //\n    } else if (kind == StridedLinearBufferCopy::Kind::FillLinear) {\n      // Fill `dst` with value at `*src`.\n      eigen_assert(src_stride == 0 && dst_stride == 1);\n      const IndexType unrolled_size = count - 4 * PacketSize;\n      Packet p = pload1<Packet>(src);\n      for (; i <= unrolled_size; i += 4 * PacketSize) {\n        for (int j = 0; j < 4; ++j) {\n          pstoreu<Scalar, Packet>(dst + i + j * PacketSize, p);\n        }\n      }\n      for (; i <= vectorized_size; i += PacketSize) {\n        pstoreu<Scalar, Packet>(dst + i, p);\n      }\n      for (; i < count; ++i) {\n        dst[i] = *src;\n      }\n      // ******************************************************************** //\n    } else if (kind == StridedLinearBufferCopy::Kind::FillScatter) {\n      // Scatter `*src` into `dst`.\n      eigen_assert(src_stride == 0 && dst_stride != 1);\n      Packet p = pload1<Packet>(src);\n      for (; i <= vectorized_size; i += PacketSize) {\n        pscatter<Scalar, Packet>(dst + i * dst_stride, p, dst_stride);\n      }\n      for (; i < count; ++i) {\n        dst[i * dst_stride] = *src;\n      }\n      // ******************************************************************** //\n    } else if (kind == StridedLinearBufferCopy::Kind::Gather) {\n      // Gather from `src` into `dst`.\n      eigen_assert(dst_stride == 1);\n      for (; i <= vectorized_size; i += PacketSize) {\n        Packet p = pgather<Scalar, Packet>(src + i * src_stride, src_stride);\n        pstoreu<Scalar, Packet>(dst + i, p);\n      }\n      for (; i < count; ++i) {\n        dst[i] = src[i * src_stride];\n      }\n      // ******************************************************************** //\n    } else if (kind == StridedLinearBufferCopy::Kind::Random) {\n      // Random.\n      for (; i < count; ++i) {\n        dst[i * dst_stride] = src[i * src_stride];\n      }\n    } else {\n      eigen_assert(false);\n    }\n  }\n};\n\n// -------------------------------------------------------------------------- //\n// TensorBlockIO copies data from `src` tensor block, to the `dst` tensor block.\n// It's possible to specify src->dst dimension mapping for the copy operation.\n// Dimensions of `dst` specify how many elements have to be copied, for the\n// `src` we need to know only stride to navigate through source memory buffer.\n\ntemplate <typename Scalar, typename IndexType, int NumDims, int Layout>\nclass TensorBlockIO {\n  static const bool IsColMajor = (Layout == ColMajor);\n\n  typedef StridedLinearBufferCopy<Scalar, IndexType> LinCopy;\n\n public:\n  typedef DSizes<IndexType, NumDims> Dimensions;\n  typedef DSizes<int, NumDims> DimensionsMap;\n\n  struct Dst {\n    Dst(const Dimensions& dst_dims, const Dimensions& dst_strides, Scalar* dst,\n        IndexType dst_offset = 0)\n        : dims(dst_dims), strides(dst_strides), data(dst), offset(dst_offset) {}\n\n    Dimensions dims;\n    Dimensions strides;\n    Scalar* data;\n    IndexType offset;\n  };\n\n  struct Src {\n    Src(const Dimensions& src_strides, const Scalar* src,\n        IndexType src_offset = 0)\n        : strides(src_strides), data(src), offset(src_offset) {}\n\n    Dimensions strides;\n    const Scalar* data;\n    IndexType offset;\n  };\n\n  // Copies data to `dst` from `src`, using provided dimensions mapping:\n  //\n  //   src_dimension_index = dst_to_src_dim_map[dst_dimension_index]\n  //\n  // Returns the number of copied elements.\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE IndexType Copy(\n      const Dst& dst, const Src& src, const DimensionsMap& dst_to_src_dim_map) {\n    // Copy single scalar value from `src` to `dst`.\n    if (NumDims == 0) {\n      *(dst.data + dst.offset) = *(src.data + src.offset);\n      return 1;\n    }\n\n    // Both `dst` and `src` must have contiguous innermost dimension. We also\n    // accept the special case with stride '0', because it's used as a trick to\n    // implement broadcasting.\n    {\n      int inner_dim = IsColMajor ? 0 : NumDims - 1;\n      EIGEN_UNUSED_VARIABLE(inner_dim);\n      eigen_assert(dst.strides[inner_dim] == 1 || dst.strides[inner_dim] == 0);\n      eigen_assert(src.strides[inner_dim] == 1 || src.strides[inner_dim] == 0);\n    }\n\n    // Give a shorter name to `dst_to_src_dim_map`.\n    const DimensionsMap& dim_map = dst_to_src_dim_map;\n\n    // Do not squeeze reordered inner dimensions.\n    int num_squeezable_dims = NumSqueezableInnerDims(dim_map);\n\n    // NOTE: We find the innermost dimension (contiguous in memory) in the dst\n    // block, and we write data linearly into that dimension, reading it from\n    // the src. If dimensions are reordered, we might end up reading data from\n    // the src with `stride != 1`.\n    //\n    // NOTE: Random-Read/Linear-Write can be up to ~2X faster than\n    // Linear-Read/Random-Write: https://stackoverflow.com/a/54935680\n\n    // Find the innermost dimension in the dst whose size is not 1. This is the\n    // effective inner dim.\n    int num_size_one_inner_dims = 0;\n    for (int i = 0; i < num_squeezable_dims; ++i) {\n      const int dst_dim = IsColMajor ? i : NumDims - i - 1;\n      if (dst.dims[dst_dim] != 1) break;\n      num_size_one_inner_dims++;\n    }\n\n    // If all dimensions are of size 1, just copy a scalar from `src` to `dst`.\n    if (num_size_one_inner_dims == NumDims) {\n      *(dst.data + dst.offset) = *(src.data + src.offset);\n      return 1;\n    }\n\n    // Outermost dimension in the dst with `stride == 1` (contiguous in memory).\n    const int dst_stride1_dim = IsColMajor\n                                    ? num_size_one_inner_dims\n                                    : NumDims - num_size_one_inner_dims - 1;\n\n    // Dimension in the src that corresponds to the dst innermost dimension.\n    const int src_dim_for_dst_stride1_dim =\n        NumDims == 0 ? 1 : dim_map[dst_stride1_dim];\n\n    // Size of the innermost dimension (length of contiguous blocks of memory).\n    IndexType dst_inner_dim_size = NumDims == 0 ? 1 : dst.dims[dst_stride1_dim];\n\n    // Squeeze multiple inner dims into one if they are contiguous in `dst` and\n    // `src` memory, so we can do less linear copy calls.\n    for (int i = num_size_one_inner_dims + 1; i < num_squeezable_dims; ++i) {\n      const int dst_dim = IsColMajor ? i : NumDims - i - 1;\n      const IndexType dst_stride = dst.strides[dst_dim];\n      const IndexType src_stride = src.strides[dim_map[dst_dim]];\n      if (dst_inner_dim_size == dst_stride && dst_stride == src_stride) {\n        dst_inner_dim_size *= dst.dims[dst_dim];\n        ++num_size_one_inner_dims;\n      } else {\n        break;\n      }\n    }\n\n    // Setup strides to read data from `src` and write to `dst`.\n    IndexType input_offset = src.offset;\n    IndexType output_offset = dst.offset;\n    IndexType input_stride =\n        NumDims == 0 ? 1 : src.strides[src_dim_for_dst_stride1_dim];\n    IndexType output_stride = NumDims == 0 ? 1 : dst.strides[dst_stride1_dim];\n\n    const int at_least_1_dim = NumDims <= 1 ? 1 : NumDims - 1;\n    array<BlockIteratorState, at_least_1_dim> it;\n\n    // Initialize block iterator state. Squeeze away any dimension of size 1.\n    int idx = 0;  // currently initialized iterator state index\n    for (int i = num_size_one_inner_dims; i < NumDims - 1; ++i) {\n      const int dst_dim = IsColMajor ? i + 1 : NumDims - i - 2;\n      if (dst.dims[dst_dim] == 1) continue;\n\n      it[idx].size = dst.dims[dst_dim];\n      it[idx].input_stride = src.strides[dim_map[dst_dim]];\n      it[idx].output_stride = dst.strides[dst_dim];\n\n      it[idx].input_span = it[idx].input_stride * (it[idx].size - 1);\n      it[idx].output_span = it[idx].output_stride * (it[idx].size - 1);\n\n      idx++;\n    }\n\n    // Iterate copying data from src to dst.\n    const IndexType block_total_size = NumDims == 0 ? 1 : dst.dims.TotalSize();\n\n#define COPY_INNER_DIM(KIND)                                           \\\n  IndexType num_copied = 0;                                            \\\n  for (num_copied = 0; num_copied < block_total_size;                  \\\n       num_copied += dst_inner_dim_size) {                             \\\n    LinCopy::template Run<KIND>(                                       \\\n        typename LinCopy::Dst(output_offset, output_stride, dst.data), \\\n        typename LinCopy::Src(input_offset, input_stride, src.data),   \\\n        dst_inner_dim_size);                                           \\\n                                                                       \\\n    for (int j = 0; j < idx; ++j) {                                    \\\n      if (++it[j].count < it[j].size) {                                \\\n        input_offset += it[j].input_stride;                            \\\n        output_offset += it[j].output_stride;                          \\\n        break;                                                         \\\n      }                                                                \\\n      it[j].count = 0;                                                 \\\n      input_offset -= it[j].input_span;                                \\\n      output_offset -= it[j].output_span;                              \\\n    }                                                                  \\\n  }                                                                    \\\n  return num_copied;\n\n    if (input_stride == 1 && output_stride == 1) {\n      COPY_INNER_DIM(LinCopy::Kind::Linear);\n    } else if (input_stride == 1 && output_stride != 1) {\n      COPY_INNER_DIM(LinCopy::Kind::Scatter);\n    } else if (input_stride == 0 && output_stride == 1) {\n      COPY_INNER_DIM(LinCopy::Kind::FillLinear);\n    } else if (input_stride == 0 && output_stride != 1) {\n      COPY_INNER_DIM(LinCopy::Kind::FillScatter);\n    } else if (output_stride == 1) {\n      COPY_INNER_DIM(LinCopy::Kind::Gather);\n    } else {\n      COPY_INNER_DIM(LinCopy::Kind::Random);\n    }\n\n#undef COPY_INNER_DIM\n  }\n\n  // Copy from `src` to `dst` with an identity src->dst dimension map. Returns\n  // the number of copied elements.\n  static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE IndexType Copy(const Dst& dst,\n                                                              const Src& src) {\n    DimensionsMap dst_to_src_map;\n    for (int i = 0; i < NumDims; ++i) dst_to_src_map[i] = i;\n    return Copy(dst, src, dst_to_src_map);\n  }\n\n private:\n  struct BlockIteratorState {\n    BlockIteratorState()\n        : size(0),\n          count(0),\n          input_stride(0),\n          output_stride(0),\n          input_span(0),\n          output_span(0) {}\n\n    IndexType size;\n    IndexType count;\n    IndexType input_stride;\n    IndexType output_stride;\n    IndexType input_span;\n    IndexType output_span;\n  };\n\n  // Compute how many inner dimensions it's allowed to squeeze when doing IO\n  // between two tensor blocks. It's safe to squeeze inner dimensions, only\n  // if they are not reordered.\n  static int NumSqueezableInnerDims(const DimensionsMap& dim_map) {\n    int num_squeezable_dims = 0;\n    for (int i = 0; i < NumDims; ++i) {\n      const int dim = IsColMajor ? i : NumDims - i - 1;\n      if (dim_map[dim] != dim) break;\n      num_squeezable_dims++;\n    }\n    return num_squeezable_dims;\n  }\n};\n\n// -------------------------------------------------------------------------- //\n// TensorBlockAssignment assigns a block expression of type `TensorBlockExpr` to\n// a Tensor block defined by `desc`, backed by a memory buffer at `target`.\n//\n// Currently there is no way to write from a Tensor expression to a block of\n// memory, if dimensions are reordered. If you need to do that, you should\n// materialize a Tensor block expression into a memory buffer, and then use\n// TensorBlockIO to copy data between two memory buffers with a custom\n// `target->src` dimension map (see definition above).\n//\n// Also currently the innermost dimension of `target` must have a stride '1'\n// (contiguous in memory). This restriction could be lifted with a `pscatter`,\n// but in practice it's never needed, and there is a similar TensorBlockIO\n// workaround for that.\n//\n// TODO(ezhulenev): TensorBlockAssignment is a special case of TensorBlockIO\n// where `src` is a tensor expression. Explore if it is possible to rewrite IO\n// to use expressions instead of pointers, and after that TensorBlockAssignment\n// will become an alias to IO.\ntemplate <typename Scalar, int NumDims, typename TensorBlockExpr,\n          typename IndexType = Eigen::Index>\nclass TensorBlockAssignment {\n  // We will use coeff/packet path to evaluate block expressions.\n  typedef TensorEvaluator<const TensorBlockExpr, DefaultDevice>\n      TensorBlockEvaluator;\n\n  typedef DSizes<IndexType, NumDims> Dimensions;\n\n  enum {\n    Vectorizable = packet_traits<Scalar>::Vectorizable,\n    PacketSize = packet_traits<Scalar>::size\n  };\n\n  template <bool Vectorizable, typename Evaluator>\n  struct InnerDimAssign {\n    EIGEN_ALWAYS_INLINE static void Run(Scalar* target, IndexType count,\n                                        const Evaluator& eval,\n                                        IndexType eval_offset) {\n      for (IndexType i = 0; i < count; ++i) {\n        target[i] = eval.coeff(eval_offset + i);\n      }\n    }\n  };\n\n  template <typename Evaluator>\n  struct InnerDimAssign<true, Evaluator> {\n    EIGEN_ALWAYS_INLINE static void Run(Scalar* target, IndexType count,\n                                        const Evaluator& eval,\n                                        IndexType eval_offset) {\n      typedef typename packet_traits<Scalar>::type Packet;\n\n      const IndexType unrolled_size = count - 4 * PacketSize;\n      const IndexType vectorized_size = count - PacketSize;\n      IndexType i = 0;\n\n      for (; i <= unrolled_size; i += 4 * PacketSize) {\n        for (int j = 0; j < 4; ++j) {\n          const IndexType idx = eval_offset + i + j * PacketSize;\n          Packet p = eval.template packet<Unaligned>(idx);\n          pstoreu<Scalar>(target + i + j * PacketSize, p);\n        }\n      }\n\n      for (; i <= vectorized_size; i += PacketSize) {\n        Packet p = eval.template packet<Unaligned>(eval_offset + i);\n        pstoreu<Scalar>(target + i, p);\n      }\n\n      for (; i < count; ++i) {\n        target[i] = eval.coeff(eval_offset + i);\n      }\n    }\n  };\n\n public:\n  struct Target {\n    Target(const Dimensions& target_dims, const Dimensions& target_strides,\n           Scalar* target_data, IndexType target_offset = 0)\n        : dims(target_dims),\n          strides(target_strides),\n          data(target_data),\n          offset(target_offset) {}\n\n    Dimensions dims;\n    Dimensions strides;\n    Scalar* data;\n    IndexType offset;\n  };\n\n  static Target target(const Dimensions& target_dims,\n                       const Dimensions& target_strides, Scalar* target_data,\n                       IndexType target_offset = 0) {\n    return Target(target_dims, target_strides, target_data, target_offset);\n  }\n\n  template <typename TargetDimsIndexType, typename TargetStridesIndexType>\n  static Target target(\n      const DSizes<TargetDimsIndexType, NumDims>& target_dims,\n      const DSizes<TargetStridesIndexType, NumDims>& target_strides,\n      Scalar* target_data, IndexType target_offset = 0) {\n    // DSizes constructor will do index type promotion if it's safe.\n    return Target(Dimensions(target_dims), Dimensions(target_strides),\n                  target_data, target_offset);\n  }\n\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Run(\n      const Target& target, const TensorBlockExpr& expr) {\n    // Prepare evaluator for block expression.\n    DefaultDevice default_device;\n    TensorBlockEvaluator eval(expr, default_device);\n\n    // Tensor block expression dimension should match destination dimensions.\n    eigen_assert(dimensions_match(target.dims, eval.dimensions()));\n\n    static const int Layout = TensorBlockEvaluator::Layout;\n    static const bool is_col_major = Layout == ColMajor;\n\n    // Initialize output inner dimension size based on a layout.\n    const IndexType output_size = NumDims == 0 ? 1 : target.dims.TotalSize();\n    const int inner_dim_idx = is_col_major ? 0 : NumDims - 1;\n    IndexType output_inner_dim_size = target.dims[inner_dim_idx];\n\n    // Target inner dimension stride must be '1'.\n    eigen_assert(target.strides[inner_dim_idx] == 1);\n\n    // Squeeze multiple inner dims into one if they are contiguous in `target`.\n    IndexType num_squeezed_dims = 0;\n    for (Index i = 1; i < NumDims; ++i) {\n      const Index dim = is_col_major ? i : NumDims - i - 1;\n      const IndexType target_stride = target.strides[dim];\n\n      if (output_inner_dim_size == target_stride) {\n        output_inner_dim_size *= target.dims[dim];\n        num_squeezed_dims++;\n      } else {\n        break;\n      }\n    }\n\n    // Initialize output block iterator state. Dimension in this array are\n    // always in inner_most -> outer_most order (col major layout).\n    array<BlockIteratorState, NumDims> it;\n\n    int idx = 0;  // currently initialized iterator state index\n    for (Index i = num_squeezed_dims; i < NumDims - 1; ++i) {\n      const Index dim = is_col_major ? i + 1 : NumDims - i - 2;\n\n      it[idx].count = 0;\n      it[idx].size = target.dims[dim];\n      it[idx].output_stride = target.strides[dim];\n      it[idx].output_span = it[idx].output_stride * (it[idx].size - 1);\n      idx++;\n    }\n\n    // We read block expression from the beginning, and start writing data to\n    // `target` at given offset.\n    IndexType input_offset = 0;\n    IndexType output_offset = target.offset;\n\n    // Iterate copying data from `eval` to `target`.\n    for (IndexType i = 0; i < output_size; i += output_inner_dim_size) {\n      // Assign to `target` at current offset.\n      InnerDimAssign<Vectorizable && TensorBlockEvaluator::PacketAccess,\n                     TensorBlockEvaluator>::Run(target.data + output_offset,\n                                                output_inner_dim_size, eval,\n                                                input_offset);\n\n      // Move input offset forward by the number of assigned coefficients.\n      input_offset += output_inner_dim_size;\n\n      // Update index.\n      for (int j = 0; j < idx; ++j) {\n        if (++it[j].count < it[j].size) {\n          output_offset += it[j].output_stride;\n          break;\n        }\n        it[j].count = 0;\n        output_offset -= it[j].output_span;\n      }\n    }\n  }\n\n private:\n  struct BlockIteratorState {\n    BlockIteratorState()\n        : count(0), size(0), output_stride(0), output_span(0) {}\n\n    IndexType count;\n    IndexType size;\n    IndexType output_stride;\n    IndexType output_span;\n  };\n};\n\n// -------------------------------------------------------------------------- //\n\n}  // namespace internal\n}  // namespace Eigen\n\n#endif  // EIGEN_CXX11_TENSOR_TENSOR_BLOCK_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorBroadcasting.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_BROADCASTING_H\n#define EIGEN_CXX11_TENSOR_TENSOR_BROADCASTING_H\n\nnamespace Eigen {\n\n/** \\class TensorBroadcasting\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief Tensor broadcasting class.\n  *\n  *\n  */\nnamespace internal {\ntemplate<typename Broadcast, typename XprType>\nstruct traits<TensorBroadcastingOp<Broadcast, XprType> > : public traits<XprType>\n{\n  typedef typename XprType::Scalar Scalar;\n  typedef traits<XprType> XprTraits;\n  typedef typename XprTraits::StorageKind StorageKind;\n  typedef typename XprTraits::Index Index;\n  typedef typename XprType::Nested Nested;\n  typedef typename remove_reference<Nested>::type _Nested;\n  static const int NumDimensions = XprTraits::NumDimensions;\n  static const int Layout = XprTraits::Layout;\n  typedef typename XprTraits::PointerType PointerType;\n};\n\ntemplate<typename Broadcast, typename XprType>\nstruct eval<TensorBroadcastingOp<Broadcast, XprType>, Eigen::Dense>\n{\n  typedef const TensorBroadcastingOp<Broadcast, XprType> EIGEN_DEVICE_REF type;\n};\n\ntemplate<typename Broadcast, typename XprType>\nstruct nested<TensorBroadcastingOp<Broadcast, XprType>, 1, typename eval<TensorBroadcastingOp<Broadcast, XprType> >::type>\n{\n  typedef TensorBroadcastingOp<Broadcast, XprType> type;\n};\n\ntemplate <typename Dims>\nstruct is_input_scalar {\n  static const bool value = false;\n};\ntemplate <>\nstruct is_input_scalar<Sizes<> > {\n  static const bool value = true;\n};\n#ifndef EIGEN_EMULATE_CXX11_META_H\ntemplate <typename std::ptrdiff_t... Indices>\nstruct is_input_scalar<Sizes<Indices...> > {\n  static const bool value = (Sizes<Indices...>::total_size == 1);\n};\n#endif\n\n}  // end namespace internal\n\n\n\ntemplate<typename Broadcast, typename XprType>\nclass TensorBroadcastingOp : public TensorBase<TensorBroadcastingOp<Broadcast, XprType>, ReadOnlyAccessors>\n{\n  public:\n  typedef typename Eigen::internal::traits<TensorBroadcastingOp>::Scalar Scalar;\n  typedef typename Eigen::NumTraits<Scalar>::Real RealScalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename Eigen::internal::nested<TensorBroadcastingOp>::type Nested;\n  typedef typename Eigen::internal::traits<TensorBroadcastingOp>::StorageKind StorageKind;\n  typedef typename Eigen::internal::traits<TensorBroadcastingOp>::Index Index;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorBroadcastingOp(const XprType& expr, const Broadcast& broadcast)\n      : m_xpr(expr), m_broadcast(broadcast) {}\n\n    EIGEN_DEVICE_FUNC\n    const Broadcast& broadcast() const { return m_broadcast; }\n\n    EIGEN_DEVICE_FUNC\n    const typename internal::remove_all<typename XprType::Nested>::type&\n    expression() const { return m_xpr; }\n\n  protected:\n    typename XprType::Nested m_xpr;\n    const Broadcast m_broadcast;\n};\n\n\n// Eval as rvalue\ntemplate<typename Broadcast, typename ArgType, typename Device>\nstruct TensorEvaluator<const TensorBroadcastingOp<Broadcast, ArgType>, Device>\n{\n  typedef TensorBroadcastingOp<Broadcast, ArgType> XprType;\n  typedef typename XprType::Index Index;\n  static const int NumDims = internal::array_size<typename TensorEvaluator<ArgType, Device>::Dimensions>::value;\n  typedef DSizes<Index, NumDims> Dimensions;\n  typedef typename XprType::Scalar Scalar;\n  typedef typename TensorEvaluator<ArgType, Device>::Dimensions InputDimensions;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  static const int PacketSize = PacketType<CoeffReturnType, Device>::size;\n  protected: //  all the non-static fields must have the same access control, otherwise the TensorEvaluator wont be standard layout;\n  bool isCopy, nByOne, oneByN;\n  public:\n  typedef StorageMemory<CoeffReturnType, Device> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n\n  enum {\n    IsAligned         = true,\n    PacketAccess      = TensorEvaluator<ArgType, Device>::PacketAccess,\n    BlockAccess       = TensorEvaluator<ArgType, Device>::BlockAccess,\n    PreferBlockAccess = true,\n    Layout            = TensorEvaluator<ArgType, Device>::Layout,\n    RawAccess         = false\n  };\n\n  typedef typename internal::remove_const<Scalar>::type ScalarNoConst;\n\n  // We do block based broadcasting using a trick with 2x tensor rank and 0\n  // strides. See block method implementation for details.\n  typedef DSizes<Index, 2 * NumDims> BroadcastDimensions;\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n typedef internal::TensorBlockDescriptor<NumDims, Index> TensorBlockDesc;\n  typedef internal::TensorBlockScratchAllocator<Device> TensorBlockScratch;\n\n  typedef typename TensorEvaluator<const ArgType, Device>::TensorBlock\n      ArgTensorBlock;\n\n  typedef typename internal::TensorMaterializedBlock<ScalarNoConst, NumDims,\n                                                     Layout, Index>\n      TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op,\n                                                        const Device& device)\n      : isCopy(false), nByOne(false), oneByN(false),\n        m_device(device), m_broadcast(op.broadcast()), m_impl(op.expression(), device)\n  {\n\n    // The broadcasting op doesn't change the rank of the tensor. One can't broadcast a scalar\n    // and store the result in a scalar. Instead one should reshape the scalar into a a N-D\n    // tensor with N >= 1 of 1 element first and then broadcast.\n    EIGEN_STATIC_ASSERT((NumDims > 0), YOU_MADE_A_PROGRAMMING_MISTAKE);\n    const InputDimensions& input_dims = m_impl.dimensions();\n    isCopy = true;\n    for (int i = 0; i < NumDims; ++i) {\n      eigen_assert(input_dims[i] > 0);\n      m_dimensions[i] = input_dims[i] * m_broadcast[i];\n      if (m_broadcast[i] != 1) {\n        isCopy = false;\n      }\n    }\n\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      m_inputStrides[0] = 1;\n      m_outputStrides[0] = 1;\n      for (int i = 1; i < NumDims; ++i) {\n        m_inputStrides[i] = m_inputStrides[i-1] * input_dims[i-1];\n        m_outputStrides[i] = m_outputStrides[i-1] * m_dimensions[i-1];\n      }\n    } else {\n      m_inputStrides[NumDims-1] = 1;\n      m_outputStrides[NumDims-1] = 1;\n      for (int i = NumDims-2; i >= 0; --i) {\n        m_inputStrides[i] = m_inputStrides[i+1] * input_dims[i+1];\n        m_outputStrides[i] = m_outputStrides[i+1] * m_dimensions[i+1];\n      }\n    }\n\n    if (input_dims[0] == 1) {\n      oneByN = true;\n      for (int i = 1; i < NumDims; ++i) {\n        if (m_broadcast[i] != 1) {\n          oneByN = false;\n          break;\n        }\n      }\n    } else if (input_dims[NumDims-1] == 1) {\n      nByOne = true;\n      for (int i = 0; i < NumDims-1; ++i) {\n        if (m_broadcast[i] != 1) {\n          nByOne = false;\n          break;\n        }\n      }\n    }\n\n    // Handle special format like NCHW, its input shape is '[1, N..., 1]' and\n    // broadcast shape is '[N, 1..., N]'\n    if (!oneByN && !nByOne) {\n      if (input_dims[0] == 1 && input_dims[NumDims-1] == 1 && NumDims > 2) {\n        nByOne = true;\n        oneByN = true;\n        for (int i = 1; i < NumDims-1; ++i) {\n          if (m_broadcast[i] != 1) {\n            nByOne = false;\n            oneByN = false;\n            break;\n          }\n        }\n      }\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions& dimensions() const { return m_dimensions; }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType) {\n    m_impl.evalSubExprsIfNeeded(NULL);\n    return true;\n  }\n\n#ifdef EIGEN_USE_THREADS\n  template <typename EvalSubExprsCallback>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalSubExprsIfNeededAsync(\n      EvaluatorPointerType, EvalSubExprsCallback done) {\n    m_impl.evalSubExprsIfNeededAsync(nullptr, [done](bool) { done(true); });\n  }\n#endif  // EIGEN_USE_THREADS\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {\n    m_impl.cleanup();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE CoeffReturnType coeff(Index index) const\n  {\n    if (internal::is_input_scalar<typename internal::remove_all<InputDimensions>::type>::value) {\n      return m_impl.coeff(0);\n    }\n\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      if (isCopy) {\n        return m_impl.coeff(index);\n      } else {\n        return coeffColMajor(index);\n      }\n    } else {\n      if (isCopy) {\n        return m_impl.coeff(index);\n      } else {\n        return coeffRowMajor(index);\n      }\n    }\n  }\n\n  // TODO: attempt to speed this up. The integer divisions and modulo are slow\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index indexColMajor(Index index) const {\n    Index inputIndex = 0;\n    EIGEN_UNROLL_LOOP\n    for (int i = NumDims - 1; i > 0; --i) {\n      const Index idx = index / m_outputStrides[i];\n      if (internal::index_statically_eq<Broadcast>(i, 1)) {\n        eigen_assert(idx < m_impl.dimensions()[i]);\n        inputIndex += idx * m_inputStrides[i];\n      } else {\n        if (internal::index_statically_eq<InputDimensions>(i, 1)) {\n          eigen_assert(idx % m_impl.dimensions()[i] == 0);\n        } else {\n          inputIndex += (idx % m_impl.dimensions()[i]) * m_inputStrides[i];\n        }\n      }\n      index -= idx * m_outputStrides[i];\n    }\n    if (internal::index_statically_eq<Broadcast>(0, 1)) {\n      eigen_assert(index < m_impl.dimensions()[0]);\n      inputIndex += index;\n    } else {\n      if (internal::index_statically_eq<InputDimensions>(0, 1)) {\n        eigen_assert(index % m_impl.dimensions()[0] == 0);\n      } else {\n        inputIndex += (index % m_impl.dimensions()[0]);\n      }\n    }\n    return inputIndex;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeffColMajor(Index index) const\n  {\n    return m_impl.coeff(indexColMajor(index));\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index indexRowMajor(Index index) const {\n    Index inputIndex = 0;\n    EIGEN_UNROLL_LOOP\n    for (int i = 0; i < NumDims - 1; ++i) {\n      const Index idx = index / m_outputStrides[i];\n      if (internal::index_statically_eq<Broadcast>(i, 1)) {\n        eigen_assert(idx < m_impl.dimensions()[i]);\n        inputIndex += idx * m_inputStrides[i];\n      } else {\n        if (internal::index_statically_eq<InputDimensions>(i, 1)) {\n          eigen_assert(idx % m_impl.dimensions()[i] == 0);\n        } else {\n          inputIndex += (idx % m_impl.dimensions()[i]) * m_inputStrides[i];\n        }\n      }\n      index -= idx * m_outputStrides[i];\n    }\n    if (internal::index_statically_eq<Broadcast>(NumDims - 1, 1)) {\n      eigen_assert(index < m_impl.dimensions()[NumDims - 1]);\n      inputIndex += index;\n    } else {\n      if (internal::index_statically_eq<InputDimensions>(NumDims - 1, 1)) {\n        eigen_assert(index % m_impl.dimensions()[NumDims - 1] == 0);\n      } else {\n        inputIndex += (index % m_impl.dimensions()[NumDims - 1]);\n      }\n    }\n    return inputIndex;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeffRowMajor(Index index) const\n  {\n    return m_impl.coeff(indexRowMajor(index));\n  }\n\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE PacketReturnType packet(Index index) const\n  {\n    if (internal::is_input_scalar<typename internal::remove_all<InputDimensions>::type>::value) {\n      return internal::pset1<PacketReturnType>(m_impl.coeff(0));\n    }\n\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      if (isCopy) {\n        #ifdef EIGEN_GPU_COMPILE_PHASE\n        // See PR 437: on NVIDIA P100 and K20m we observed a x3-4 speed up by enforcing\n        // unaligned loads here. The reason is unclear though.\n        return m_impl.template packet<Unaligned>(index);\n        #else\n        return m_impl.template packet<LoadMode>(index);\n        #endif\n      } else if (oneByN && !nByOne) {\n        return packetNByOne<LoadMode>(index);\n      } else if (!oneByN && nByOne) {\n        return packetOneByN<LoadMode>(index);\n      } else if (oneByN && nByOne) {\n        return packetOneByNByOne<LoadMode>(index);\n      } else {\n        return packetColMajor<LoadMode>(index);\n      }\n    } else {\n      if (isCopy) {\n        #ifdef EIGEN_GPU_COMPILE_PHASE\n        // See above.\n        return m_impl.template packet<Unaligned>(index);\n        #else\n        return m_impl.template packet<LoadMode>(index);\n        #endif\n      } else if (oneByN && !nByOne) {\n        return packetOneByN<LoadMode>(index);\n      } else if (!oneByN && nByOne) {\n        return packetNByOne<LoadMode>(index);\n      } else if (oneByN && nByOne) {\n        return packetOneByNByOne<LoadMode>(index);\n      } else {\n        return packetRowMajor<LoadMode>(index);\n      }\n    }\n  }\n\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packetOneByNByOne\n  (Index index) const\n  {\n    EIGEN_STATIC_ASSERT((PacketSize > 1), YOU_MADE_A_PROGRAMMING_MISTAKE)\n    eigen_assert(index+PacketSize-1 < dimensions().TotalSize());\n\n    EIGEN_ALIGN_MAX typename internal::remove_const<CoeffReturnType>::type values[PacketSize];\n    Index startDim, endDim;\n    Index inputIndex, outputOffset, batchedIndex;\n\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      startDim = NumDims - 1;\n      endDim = 1;\n    } else {\n      startDim = 0;\n      endDim = NumDims - 2;\n    }\n\n    batchedIndex = index % m_outputStrides[startDim];\n    inputIndex   = batchedIndex / m_outputStrides[endDim];\n    outputOffset = batchedIndex % m_outputStrides[endDim];\n\n    if (outputOffset + PacketSize <= m_outputStrides[endDim]) {\n      values[0] = m_impl.coeff(inputIndex);\n      return internal::pload1<PacketReturnType>(values);\n    } else {\n      EIGEN_UNROLL_LOOP\n      for (int i = 0, cur = 0; i < PacketSize; ++i, ++cur) {\n        if (outputOffset + cur < m_outputStrides[endDim]) {\n          values[i] = m_impl.coeff(inputIndex);\n        } else {\n          ++inputIndex;\n          inputIndex = (inputIndex == m_inputStrides[startDim] ? 0 : inputIndex);\n          values[i] = m_impl.coeff(inputIndex);\n          outputOffset = 0;\n          cur = 0;\n        }\n      }\n      return internal::pload<PacketReturnType>(values);\n    }\n  }\n\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packetOneByN(Index index) const\n  {\n    EIGEN_STATIC_ASSERT((PacketSize > 1), YOU_MADE_A_PROGRAMMING_MISTAKE)\n    eigen_assert(index+PacketSize-1 < dimensions().TotalSize());\n\n    Index dim, inputIndex;\n\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      dim = NumDims - 1;\n    } else {\n      dim = 0;\n    }\n\n    inputIndex = index % m_inputStrides[dim];\n    if (inputIndex + PacketSize <= m_inputStrides[dim]) {\n      return m_impl.template packet<Unaligned>(inputIndex);\n    } else {\n      EIGEN_ALIGN_MAX typename internal::remove_const<CoeffReturnType>::type values[PacketSize];\n      EIGEN_UNROLL_LOOP\n      for (int i = 0; i < PacketSize; ++i) {\n        if (inputIndex > m_inputStrides[dim]-1) {\n          inputIndex = 0;\n        }\n        values[i] = m_impl.coeff(inputIndex++);\n      }\n      return internal::pload<PacketReturnType>(values);\n    }\n  }\n\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packetNByOne(Index index) const\n  {\n    EIGEN_STATIC_ASSERT((PacketSize > 1), YOU_MADE_A_PROGRAMMING_MISTAKE)\n    eigen_assert(index+PacketSize-1 < dimensions().TotalSize());\n\n    EIGEN_ALIGN_MAX typename internal::remove_const<CoeffReturnType>::type values[PacketSize];\n    Index dim, inputIndex, outputOffset;\n\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      dim = 1;\n    } else {\n      dim = NumDims - 2;\n    }\n\n    inputIndex   = index / m_outputStrides[dim];\n    outputOffset = index % m_outputStrides[dim];\n    if (outputOffset + PacketSize <= m_outputStrides[dim]) {\n      values[0] = m_impl.coeff(inputIndex);\n      return internal::pload1<PacketReturnType>(values);\n    } else {\n      EIGEN_UNROLL_LOOP\n      for (int i = 0, cur = 0; i < PacketSize; ++i, ++cur) {\n        if (outputOffset + cur < m_outputStrides[dim]) {\n          values[i] = m_impl.coeff(inputIndex);\n        } else {\n          values[i] = m_impl.coeff(++inputIndex);\n          outputOffset = 0;\n          cur = 0;\n        }\n      }\n      return internal::pload<PacketReturnType>(values);\n    }\n  }\n\n  // Ignore the LoadMode and always use unaligned loads since we can't guarantee\n  // the alignment at compile time.\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packetColMajor(Index index) const\n  {\n    EIGEN_STATIC_ASSERT((PacketSize > 1), YOU_MADE_A_PROGRAMMING_MISTAKE)\n    eigen_assert(index+PacketSize-1 < dimensions().TotalSize());\n\n    const Index originalIndex = index;\n\n    Index inputIndex = 0;\n    EIGEN_UNROLL_LOOP\n    for (int i = NumDims - 1; i > 0; --i) {\n      const Index idx = index / m_outputStrides[i];\n      if (internal::index_statically_eq<Broadcast>(i, 1)) {\n        eigen_assert(idx < m_impl.dimensions()[i]);\n        inputIndex += idx * m_inputStrides[i];\n      } else {\n        if (internal::index_statically_eq<InputDimensions>(i, 1)) {\n          eigen_assert(idx % m_impl.dimensions()[i] == 0);\n        } else {\n          inputIndex += (idx % m_impl.dimensions()[i]) * m_inputStrides[i];\n        }\n      }\n      index -= idx * m_outputStrides[i];\n    }\n    Index innermostLoc;\n    if (internal::index_statically_eq<Broadcast>(0, 1)) {\n      eigen_assert(index < m_impl.dimensions()[0]);\n      innermostLoc = index;\n    } else {\n      if (internal::index_statically_eq<InputDimensions>(0, 1)) {\n        eigen_assert(index % m_impl.dimensions()[0] == 0);\n        innermostLoc = 0;\n      } else {\n        innermostLoc = index % m_impl.dimensions()[0];\n      }\n    }\n    inputIndex += innermostLoc;\n\n    // Todo: this could be extended to the second dimension if we're not\n    // broadcasting alongside the first dimension, and so on.\n    if (innermostLoc + PacketSize <= m_impl.dimensions()[0]) {\n      return m_impl.template packet<Unaligned>(inputIndex);\n    } else {\n      EIGEN_ALIGN_MAX typename internal::remove_const<CoeffReturnType>::type values[PacketSize];\n      values[0] = m_impl.coeff(inputIndex);\n      EIGEN_UNROLL_LOOP\n      for (int i = 1; i < PacketSize; ++i) {\n        if (innermostLoc + i < m_impl.dimensions()[0]) {\n          values[i] = m_impl.coeff(inputIndex+i);\n        } else {\n          values[i] = coeffColMajor(originalIndex+i);\n        }\n      }\n      PacketReturnType rslt = internal::pload<PacketReturnType>(values);\n      return rslt;\n    }\n  }\n\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packetRowMajor(Index index) const\n  {\n    EIGEN_STATIC_ASSERT((PacketSize > 1), YOU_MADE_A_PROGRAMMING_MISTAKE)\n    eigen_assert(index+PacketSize-1 < dimensions().TotalSize());\n\n    const Index originalIndex = index;\n\n    Index inputIndex = 0;\n    EIGEN_UNROLL_LOOP\n    for (int i = 0; i < NumDims - 1; ++i) {\n      const Index idx = index / m_outputStrides[i];\n      if (internal::index_statically_eq<Broadcast>(i, 1)) {\n        eigen_assert(idx < m_impl.dimensions()[i]);\n        inputIndex += idx * m_inputStrides[i];\n      } else {\n        if (internal::index_statically_eq<InputDimensions>(i, 1)) {\n          eigen_assert(idx % m_impl.dimensions()[i] == 0);\n        } else {\n          inputIndex += (idx % m_impl.dimensions()[i]) * m_inputStrides[i];\n        }\n      }\n      index -= idx * m_outputStrides[i];\n    }\n    Index innermostLoc;\n    if (internal::index_statically_eq<Broadcast>(NumDims-1, 1)) {\n      eigen_assert(index < m_impl.dimensions()[NumDims-1]);\n      innermostLoc = index;\n    } else {\n      if (internal::index_statically_eq<InputDimensions>(NumDims-1, 1)) {\n        eigen_assert(index % m_impl.dimensions()[NumDims-1] == 0);\n        innermostLoc = 0;\n      } else {\n        innermostLoc = index % m_impl.dimensions()[NumDims-1];\n      }\n    }\n    inputIndex += innermostLoc;\n\n    // Todo: this could be extended to the second dimension if we're not\n    // broadcasting alongside the first dimension, and so on.\n    if (innermostLoc + PacketSize <= m_impl.dimensions()[NumDims-1]) {\n      return m_impl.template packet<Unaligned>(inputIndex);\n    } else {\n      EIGEN_ALIGN_MAX typename internal::remove_const<CoeffReturnType>::type values[PacketSize];\n      values[0] = m_impl.coeff(inputIndex);\n      EIGEN_UNROLL_LOOP\n      for (int i = 1; i < PacketSize; ++i) {\n        if (innermostLoc + i < m_impl.dimensions()[NumDims-1]) {\n          values[i] = m_impl.coeff(inputIndex+i);\n        } else {\n          values[i] = coeffRowMajor(originalIndex+i);\n        }\n      }\n      PacketReturnType rslt = internal::pload<PacketReturnType>(values);\n      return rslt;\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost\n  costPerCoeff(bool vectorized) const {\n    double compute_cost = TensorOpCost::AddCost<Index>();\n    if (!isCopy && NumDims > 0) {\n      EIGEN_UNROLL_LOOP\n      for (int i = NumDims - 1; i > 0; --i) {\n        compute_cost += TensorOpCost::DivCost<Index>();\n        if (internal::index_statically_eq<Broadcast>(i, 1)) {\n          compute_cost +=\n              TensorOpCost::MulCost<Index>() + TensorOpCost::AddCost<Index>();\n        } else {\n          if (!internal::index_statically_eq<InputDimensions>(i, 1)) {\n            compute_cost += TensorOpCost::MulCost<Index>() +\n                            TensorOpCost::ModCost<Index>() +\n                            TensorOpCost::AddCost<Index>();\n          }\n        }\n        compute_cost +=\n            TensorOpCost::MulCost<Index>() + TensorOpCost::AddCost<Index>();\n      }\n    }\n    return m_impl.costPerCoeff(vectorized) +\n           TensorOpCost(0, 0, compute_cost, vectorized, PacketSize);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  internal::TensorBlockResourceRequirements getResourceRequirements() const {\n    // TODO(wuke): Targeting L1 size is 30% faster than targeting L{-1} on large\n    // tensors. But this might need further tuning.\n    const size_t target_size = m_device.firstLevelCacheSize();\n    return internal::TensorBlockResourceRequirements::merge(\n        m_impl.getResourceRequirements(),\n        internal::TensorBlockResourceRequirements::skewed<Scalar>(target_size));\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorBlock\n  block(TensorBlockDesc& desc, TensorBlockScratch& scratch,\n          bool /*root_of_expr_ast*/ = false) const {\n    BlockBroadcastingParams params = blockBroadcastingParams(desc);\n\n    if (params.inner_dim_size == 0 || params.bcast_dim_size == 0) {\n      return emptyBlock();\n    }\n\n    // Prepare storage for the materialized broadcasting result.\n    const typename TensorBlock::Storage block_storage =\n        TensorBlock::prepareStorage(desc, scratch);\n    ScalarNoConst* materialized_output = block_storage.data();\n\n    // We potentially will need to materialize input blocks.\n    size_t materialized_input_size = 0;\n    ScalarNoConst* materialized_input = NULL;\n\n    // Initialize block broadcating iterator state for outer dimensions (outer\n    // with regard to bcast dimension). Dimension in this array are always in\n    // inner_most -> outer_most order (col major layout).\n    array<BlockBroadcastingIteratorState, NumDims> it;\n    int idx = 0;\n\n    for (int i = params.inner_dim_count + 1; i < NumDims; ++i) {\n      const Index dim = IsColMajor ? i : NumDims - 1 - i;\n      it[idx].size = params.output_dims[dim];\n      it[idx].count = 0;\n      it[idx].output_stride = m_outputStrides[dim];\n      it[idx].output_span = it[idx].output_stride * (it[idx].size - 1);\n      idx++;\n    }\n\n    // Write output into the beginning of `materialized_output`.\n    Index output_offset = 0;\n\n    // We will fill output block by broadcasting along the bcast dim, and\n    // iterating over outer dimension.\n    const Index output_size = NumDims == 0 ? 1 : params.output_dims.TotalSize();\n\n    for (Index num_output_coeffs = 0; num_output_coeffs < output_size;) {\n      ScalarNoConst* bcast_output = materialized_output + num_output_coeffs;\n      Index bcast_offset = desc.offset() + output_offset;\n\n      // Broadcast along the bcast dimension.\n      num_output_coeffs += BroadcastBlockAlongBcastDim(\n          params, bcast_offset, scratch, bcast_output, &materialized_input,\n          &materialized_input_size);\n\n      // Switch to the next outer dimension.\n      for (int j = 0; j < idx; ++j) {\n        if (++it[j].count < it[j].size) {\n          output_offset += it[j].output_stride;\n          break;\n        }\n        it[j].count = 0;\n        output_offset -= it[j].output_span;\n      }\n    }\n\n    return block_storage.AsTensorMaterializedBlock();\n  }\n\n  EIGEN_DEVICE_FUNC EvaluatorPointerType data() const { return NULL; }\n\n  const TensorEvaluator<ArgType, Device>& impl() const { return m_impl; }\n\n  Broadcast functor() const { return m_broadcast; }\n#ifdef EIGEN_USE_SYCL\n  // binding placeholder accessors to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(\n      cl::sycl::handler& cgh) const {\n    m_impl.bind(cgh);\n  }\n#endif\n private:\n  static const bool IsColMajor =\n      static_cast<int>(Layout) == static_cast<int>(ColMajor);\n\n  // We will build a general case block broadcasting on top of broadcasting\n  // primitive that will do broadcasting only for the inner dimension(s) along\n  // the first dimension smaller than the input size (it's called `bcast_dim`).\n  //\n  // Example:\n  //           dim:  0  1  2   (ColMajor)\n  //    input size: [9, 3, 6]\n  //    block size: [9, 2, 6]\n  //\n  // We will compute broadcasted block by iterating over the outer dimensions\n  // before `bcast_dim` (only dimension `2` in this example) and computing\n  // broadcasts along the `bcast_dim` (dimension `1` in this example).\n\n  // BlockBroadcastingParams holds precomputed parameters for broadcasting a\n  // single block along the broadcasting dimension. Sizes and strides along the\n  // `bcast_dim` might be invalid, they will be adjusted later in\n  // `BroadcastBlockAlongBcastDim`.\n  struct BlockBroadcastingParams {\n    Dimensions input_dims;      // input expression dimensions\n    Dimensions output_dims;     // output block sizes\n    Dimensions output_strides;  // output block strides\n\n    int inner_dim_count;   // count inner dimensions matching in size\n    int bcast_dim;         // broadcasting dimension index\n    Index bcast_dim_size;  // broadcasting dimension size\n    Index inner_dim_size;  // inner dimensions size\n\n    // Block sizes and strides for the input block where all dimensions before\n    // `bcast_dim` are equal to `1`.\n    Dimensions input_block_sizes;\n    Dimensions input_block_strides;\n\n    // Block sizes and strides for blocks with extra dimensions and strides `0`.\n    BroadcastDimensions bcast_block_sizes;\n    BroadcastDimensions bcast_block_strides;\n    BroadcastDimensions bcast_input_strides;\n  };\n\n  struct BlockBroadcastingIteratorState {\n    Index size;\n    Index count;\n    Index output_stride;\n    Index output_span;\n  };\n\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE BlockBroadcastingParams\n  blockBroadcastingParams(TensorBlockDesc& desc) const {\n    BlockBroadcastingParams params;\n\n    params.input_dims = Dimensions(m_impl.dimensions());\n\n    // Output block sizes and strides.\n    params.output_dims = desc.dimensions();\n    params.output_strides = internal::strides<Layout>(params.output_dims);\n\n    // Find the broadcasting dimension (first dimension with output size smaller\n    // that the input size).\n    params.bcast_dim = 0;\n    params.bcast_dim_size = 1;\n    params.inner_dim_size = 1;\n\n    // Count the number of inner dimensions that have the same size in the block\n    // and in the broadcast expression.\n    params.inner_dim_count = 0;\n\n    for (int i = 0; i < NumDims; ++i) {\n      const int dim = IsColMajor ? i : NumDims - i - 1;\n\n      if (params.output_dims[dim] == m_dimensions[dim]) {\n        params.inner_dim_size *= params.output_dims[dim];\n        ++params.inner_dim_count;\n        continue;\n      }\n\n      // First non-matching dimension is the broadcasting dimension.\n      eigen_assert(params.output_dims[dim] < m_dimensions[dim]);\n      params.bcast_dim = dim;\n      params.bcast_dim_size = params.output_dims[dim];\n      break;\n    }\n\n    // Calculate the input block size for looking into the input.\n    for (int i = 0; i < params.inner_dim_count; ++i) {\n      const int dim = IsColMajor ? i : NumDims - i - 1;\n      params.input_block_sizes[dim] = params.input_dims[dim];\n    }\n    for (int i = params.inner_dim_count; i < NumDims; ++i) {\n      const int dim = IsColMajor ? i : NumDims - i - 1;\n      params.input_block_sizes[dim] = 1;\n    }\n    params.input_block_strides =\n        internal::strides<Layout>(params.input_block_sizes);\n\n    // Broadcast with the 0-stride trick: Create 1 extra dim for each\n    // broadcast, set the input stride to 0.\n    //\n    // When ColMajor:\n    //\n    // - bcast_block_sizes:\n    //   [d_0, b_0, d_1, b_1, ...]\n    //\n    // - bcast_block_strides:\n    //   [output_block_strides[0], output_block_strides[0] * d_0,\n    //    output_block_strides[1], output_block_strides[1] * d_1,\n    //   ...]\n    //\n    // - bcast_input_strides:\n    //   [input_block_strides[0], 0,\n    //    input_block_strides[1], 0,\n    //   ...].\n    //\n    for (int i = 0; i < params.inner_dim_count; ++i) {\n      const int dim = IsColMajor ? i : NumDims - i - 1;\n\n      const int copy_dim = IsColMajor ? 2 * i : 2 * NumDims - 2 * i - 1;\n      const int broadcast_dim = IsColMajor ? copy_dim + 1 : copy_dim - 1;\n\n      params.bcast_block_sizes[copy_dim] = params.input_dims[dim];\n      params.bcast_block_sizes[broadcast_dim] = m_broadcast[dim];\n      params.bcast_block_strides[copy_dim] = params.output_strides[dim];\n      params.bcast_block_strides[broadcast_dim] =\n          params.output_strides[dim] * params.input_dims[dim];\n      params.bcast_input_strides[copy_dim] = params.input_block_strides[dim];\n      params.bcast_input_strides[broadcast_dim] = 0;\n    }\n\n    for (int i = 2 * params.inner_dim_count; i < 2 * NumDims; ++i) {\n      const int dim = IsColMajor ? i : 2 * NumDims - i - 1;\n      params.bcast_block_sizes[dim] = 1;\n      params.bcast_block_strides[dim] = 0;\n      params.bcast_input_strides[dim] = 0;\n    }\n\n    return params;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorBlock emptyBlock() const {\n    DSizes<Index, NumDims> dimensions;\n    for (int i = 0; i < NumDims; ++i) dimensions[i] = 0;\n    return TensorBlock(internal::TensorBlockKind::kView, NULL, dimensions);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index BroadcastBlockAlongBcastDim(\n      BlockBroadcastingParams params, Index bcast_offset,\n      TensorBlockScratch& scratch, ScalarNoConst* materialized_output,\n      ScalarNoConst** materialized_input,\n      size_t* materialized_input_size) const {\n    if (params.bcast_dim_size == 1) {\n      // We just need one block read using the ready-set values above.\n      return BroadcastBlock(\n          params.input_block_sizes, params.input_block_strides,\n          params.bcast_block_sizes, params.bcast_block_strides,\n          params.bcast_input_strides, bcast_offset, 0, scratch,\n          materialized_output, materialized_input, materialized_input_size);\n\n    } else if (params.input_dims[params.bcast_dim] == 1) {\n      // Broadcast bcast dimension (< NumDims) by bcast_dim_size.\n      const int broadcast_bcast_dim =\n          IsColMajor ? 2 * params.inner_dim_count + 1\n                     : 2 * NumDims - 2 * params.inner_dim_count - 2;\n\n      params.bcast_block_sizes[broadcast_bcast_dim] = params.bcast_dim_size;\n      params.bcast_input_strides[broadcast_bcast_dim] = 0;\n      params.bcast_block_strides[broadcast_bcast_dim] =\n          params.output_strides[params.bcast_dim];\n\n      return BroadcastBlock(\n          params.input_block_sizes, params.input_block_strides,\n          params.bcast_block_sizes, params.bcast_block_strides,\n          params.bcast_input_strides, bcast_offset, 0, scratch,\n          materialized_output, materialized_input, materialized_input_size);\n\n    } else {\n      // Keep track of the total number of the coefficients written to the\n      // output block.\n      Index num_output_coeffs = 0;\n\n      // The general case. Let's denote the output block as\n      //\n      //   x[..., a:a+bcast_dim_size, :, ..., :]\n      //\n      // where a:a+bcast_dim_size is a slice on the bcast_dim dimension\n      // (< NumDims). We need to split the a:a+bcast_dim_size into possibly 3\n      // sub-blocks:\n      //\n      // (1) a:b, where b is the smallest multiple of\n      //     input_dims[bcast_dim_start] in [a, a+bcast_dim_size].\n      //\n      // (2) b:c, where c is the largest multiple of input_dims[bcast_dim_start]\n      //     in [a, a+bcast_dim_size].\n      //\n      // (3) c:a+bcast_dim_size .\n      //\n      // Or, when b and c do not exist, we just need to process the whole block\n      // together.\n\n      // Find a.\n      const Index bcast_dim_left_index =\n          bcast_offset / m_outputStrides[params.bcast_dim];\n\n      // Find b and c.\n      const Index input_bcast_dim_size = params.input_dims[params.bcast_dim];\n\n      // First multiple after a. This is b when <= bcast_dim_left_index +\n      // bcast_dim_size.\n      const Index first_multiple =\n          divup<Index>(bcast_dim_left_index, input_bcast_dim_size) *\n          input_bcast_dim_size;\n\n      if (first_multiple <= bcast_dim_left_index + params.bcast_dim_size) {\n        // b exists, so does c. Find it.\n        const Index last_multiple =\n            (bcast_dim_left_index + params.bcast_dim_size) /\n            input_bcast_dim_size * input_bcast_dim_size;\n        const int copy_bcast_dim =\n            IsColMajor ? 2 * params.inner_dim_count\n                       : 2 * NumDims - 2 * params.inner_dim_count - 1;\n        const int broadcast_bcast_dim =\n            IsColMajor ? 2 * params.inner_dim_count + 1\n                       : 2 * NumDims - 2 * params.inner_dim_count - 2;\n\n        if (first_multiple > bcast_dim_left_index) {\n          const Index head_size = first_multiple - bcast_dim_left_index;\n          params.input_block_sizes[params.bcast_dim] = head_size;\n          params.bcast_block_sizes[copy_bcast_dim] = head_size;\n          params.bcast_input_strides[copy_bcast_dim] =\n              params.input_block_strides[params.bcast_dim];\n          params.bcast_block_strides[copy_bcast_dim] =\n              params.output_strides[params.bcast_dim];\n          params.bcast_block_sizes[broadcast_bcast_dim] = 1;\n          params.bcast_input_strides[broadcast_bcast_dim] = 0;\n          params.bcast_block_strides[broadcast_bcast_dim] =\n              params.output_strides[params.bcast_dim] *\n              params.input_dims[params.bcast_dim];\n\n          num_output_coeffs += BroadcastBlock(\n              params.input_block_sizes, params.input_block_strides,\n              params.bcast_block_sizes, params.bcast_block_strides,\n              params.bcast_input_strides, bcast_offset, 0, scratch,\n              materialized_output, materialized_input, materialized_input_size);\n        }\n        if (first_multiple < last_multiple) {\n          params.input_block_sizes[params.bcast_dim] = input_bcast_dim_size;\n          params.bcast_block_sizes[copy_bcast_dim] = input_bcast_dim_size;\n          params.bcast_input_strides[copy_bcast_dim] =\n              params.input_block_strides[params.bcast_dim];\n          params.bcast_block_strides[copy_bcast_dim] =\n              params.output_strides[params.bcast_dim];\n          params.bcast_block_sizes[broadcast_bcast_dim] =\n              (last_multiple - first_multiple) / input_bcast_dim_size;\n          params.bcast_input_strides[broadcast_bcast_dim] = 0;\n          params.bcast_block_strides[broadcast_bcast_dim] =\n              params.output_strides[params.bcast_dim] *\n              params.input_dims[params.bcast_dim];\n          const Index offset = (first_multiple - bcast_dim_left_index) *\n                               m_outputStrides[params.bcast_dim];\n\n          num_output_coeffs += BroadcastBlock(\n              params.input_block_sizes, params.input_block_strides,\n              params.bcast_block_sizes, params.bcast_block_strides,\n              params.bcast_input_strides, bcast_offset, offset, scratch,\n              materialized_output, materialized_input, materialized_input_size);\n        }\n        if (last_multiple < bcast_dim_left_index + params.bcast_dim_size) {\n          const Index tail_size =\n              bcast_dim_left_index + params.bcast_dim_size - last_multiple;\n          params.input_block_sizes[params.bcast_dim] = tail_size;\n          params.bcast_block_sizes[copy_bcast_dim] = tail_size;\n          params.bcast_input_strides[copy_bcast_dim] =\n              params.input_block_strides[params.bcast_dim];\n          params.bcast_block_strides[copy_bcast_dim] =\n              params.output_strides[params.bcast_dim];\n          params.bcast_block_sizes[broadcast_bcast_dim] = 1;\n          params.bcast_input_strides[broadcast_bcast_dim] = 0;\n          params.bcast_block_strides[broadcast_bcast_dim] =\n              params.output_strides[params.bcast_dim] *\n              params.input_dims[params.bcast_dim];\n          const Index offset = (last_multiple - bcast_dim_left_index) *\n                               m_outputStrides[params.bcast_dim];\n\n          num_output_coeffs += BroadcastBlock(\n              params.input_block_sizes, params.input_block_strides,\n              params.bcast_block_sizes, params.bcast_block_strides,\n              params.bcast_input_strides, bcast_offset, offset, scratch,\n              materialized_output, materialized_input, materialized_input_size);\n        }\n      } else {\n        // b and c do not exist.\n        const int copy_bcast_dim =\n            IsColMajor ? 2 * params.inner_dim_count\n                       : 2 * NumDims - 2 * params.inner_dim_count - 1;\n        params.input_block_sizes[params.bcast_dim] = params.bcast_dim_size;\n        params.bcast_block_sizes[copy_bcast_dim] = params.bcast_dim_size;\n        params.bcast_input_strides[copy_bcast_dim] =\n            params.input_block_strides[params.bcast_dim];\n        params.bcast_block_strides[copy_bcast_dim] =\n            params.output_strides[params.bcast_dim];\n\n        num_output_coeffs += BroadcastBlock(\n            params.input_block_sizes, params.input_block_strides,\n            params.bcast_block_sizes, params.bcast_block_strides,\n            params.bcast_input_strides, bcast_offset, 0, scratch,\n            materialized_output, materialized_input, materialized_input_size);\n      }\n\n      return num_output_coeffs;\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index BroadcastBlock(\n      const Dimensions& input_block_sizes,\n      const Dimensions& input_block_strides,\n      const BroadcastDimensions& bcast_block_sizes,\n      const BroadcastDimensions& bcast_block_strides,\n      const BroadcastDimensions& bcast_input_strides, Index bcast_offset,\n      Index offset, TensorBlockScratch& scratch,\n      ScalarNoConst* materialized_output, ScalarNoConst** materialized_input,\n      size_t* materialized_input_size) const {\n    // ---------------------------------------------------------------------- //\n    // Tensor block descriptor for reading block from the input.\n    const Index input_offset = bcast_offset + offset;\n    TensorBlockDesc input_desc(\n        IsColMajor ? indexColMajor(input_offset) : indexRowMajor(input_offset),\n        input_block_sizes);\n\n    ArgTensorBlock input_block = m_impl.block(input_desc, scratch);\n\n    // ---------------------------------------------------------------------- //\n    // Materialize input block into a temporary memory buffer only if it's not\n    // already available in the arg block.\n    const ScalarNoConst* input_buffer = NULL;\n\n    if (input_block.data() != NULL) {\n      // Input block already has raw data, there is no need to materialize it.\n      input_buffer = input_block.data();\n\n    } else {\n      // Otherwise we have to do block assignment into a temporary buffer.\n\n      // Maybe reuse previously allocated buffer, or allocate a new one with a\n      // scratch allocator.\n      const size_t input_total_size = input_block_sizes.TotalSize();\n      if (*materialized_input == NULL ||\n          *materialized_input_size < input_total_size) {\n        *materialized_input_size = input_total_size;\n        void* mem = scratch.allocate(*materialized_input_size * sizeof(Scalar));\n        *materialized_input = static_cast<ScalarNoConst*>(mem);\n      }\n\n      typedef internal::TensorBlockAssignment<\n          ScalarNoConst, NumDims, typename ArgTensorBlock::XprType, Index>\n          TensorBlockAssignment;\n\n      TensorBlockAssignment::Run(\n          TensorBlockAssignment::target(input_block_sizes, input_block_strides,\n                                        *materialized_input),\n          input_block.expr());\n\n      input_buffer = *materialized_input;\n    }\n\n    // ---------------------------------------------------------------------- //\n    // Copy data from materialized input block to the materialized output, using\n    // given broadcast strides (strides with zeroes).\n    typedef internal::TensorBlockIO<ScalarNoConst, Index, 2 * NumDims, Layout>\n        TensorBlockIO;\n\n    typename TensorBlockIO::Src src(bcast_input_strides, input_buffer);\n    typename TensorBlockIO::Dst dst(bcast_block_sizes, bcast_block_strides,\n                                      materialized_output + offset);\n\n    return TensorBlockIO::Copy(dst, src);\n  }\n\nprotected:\n  const Device EIGEN_DEVICE_REF m_device;\n  const typename internal::remove_reference<Broadcast>::type m_broadcast;\n  Dimensions m_dimensions;\n  array<Index, NumDims> m_outputStrides;\n  array<Index, NumDims> m_inputStrides;\n  TensorEvaluator<ArgType, Device> m_impl;\n};\n\n\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_BROADCASTING_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorChipping.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_CHIPPING_H\n#define EIGEN_CXX11_TENSOR_TENSOR_CHIPPING_H\n\nnamespace Eigen {\n\n/** \\class TensorKChippingReshaping\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief A chip is a thin slice, corresponding to a column or a row in a 2-d tensor.\n  *\n  *\n  */\n\nnamespace internal {\ntemplate<DenseIndex DimId, typename XprType>\nstruct traits<TensorChippingOp<DimId, XprType> > : public traits<XprType>\n{\n  typedef typename XprType::Scalar Scalar;\n  typedef traits<XprType> XprTraits;\n  typedef typename XprTraits::StorageKind StorageKind;\n  typedef typename XprTraits::Index Index;\n  typedef typename XprType::Nested Nested;\n  typedef typename remove_reference<Nested>::type _Nested;\n  static const int NumDimensions = XprTraits::NumDimensions - 1;\n  static const int Layout = XprTraits::Layout;\n  typedef typename XprTraits::PointerType PointerType;\n};\n\ntemplate<DenseIndex DimId, typename XprType>\nstruct eval<TensorChippingOp<DimId, XprType>, Eigen::Dense>\n{\n  typedef const TensorChippingOp<DimId, XprType> EIGEN_DEVICE_REF type;\n};\n\ntemplate<DenseIndex DimId, typename XprType>\nstruct nested<TensorChippingOp<DimId, XprType>, 1, typename eval<TensorChippingOp<DimId, XprType> >::type>\n{\n  typedef TensorChippingOp<DimId, XprType> type;\n};\n\ntemplate <DenseIndex DimId>\nstruct DimensionId\n{\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DimensionId(DenseIndex dim) {\n    EIGEN_UNUSED_VARIABLE(dim);\n    eigen_assert(dim == DimId);\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DenseIndex actualDim() const {\n    return DimId;\n  }\n};\ntemplate <>\nstruct DimensionId<Dynamic>\n{\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DimensionId(DenseIndex dim) : actual_dim(dim) {\n    eigen_assert(dim >= 0);\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DenseIndex actualDim() const {\n    return actual_dim;\n  }\n private:\n  const DenseIndex actual_dim;\n};\n\n\n}  // end namespace internal\n\n\n\ntemplate<DenseIndex DimId, typename XprType>\nclass TensorChippingOp : public TensorBase<TensorChippingOp<DimId, XprType> >\n{\n  public:\n  typedef typename Eigen::internal::traits<TensorChippingOp>::Scalar Scalar;\n  typedef typename Eigen::NumTraits<Scalar>::Real RealScalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename Eigen::internal::nested<TensorChippingOp>::type Nested;\n  typedef typename Eigen::internal::traits<TensorChippingOp>::StorageKind StorageKind;\n  typedef typename Eigen::internal::traits<TensorChippingOp>::Index Index;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorChippingOp(const XprType& expr, const Index offset, const Index dim)\n      : m_xpr(expr), m_offset(offset), m_dim(dim) {\n  }\n\n  EIGEN_DEVICE_FUNC\n  const Index offset() const { return m_offset; }\n  EIGEN_DEVICE_FUNC\n  const Index dim() const { return m_dim.actualDim(); }\n\n  EIGEN_DEVICE_FUNC\n  const typename internal::remove_all<typename XprType::Nested>::type&\n  expression() const { return m_xpr; }\n\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE TensorChippingOp& operator = (const TensorChippingOp& other)\n  {\n    typedef TensorAssignOp<TensorChippingOp, const TensorChippingOp> Assign;\n    Assign assign(*this, other);\n    internal::TensorExecutor<const Assign, DefaultDevice>::run(assign, DefaultDevice());\n    return *this;\n  }\n\n  template<typename OtherDerived>\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE TensorChippingOp& operator = (const OtherDerived& other)\n  {\n    typedef TensorAssignOp<TensorChippingOp, const OtherDerived> Assign;\n    Assign assign(*this, other);\n    internal::TensorExecutor<const Assign, DefaultDevice>::run(assign, DefaultDevice());\n    return *this;\n  }\n\n  protected:\n    typename XprType::Nested m_xpr;\n    const Index m_offset;\n    const internal::DimensionId<DimId> m_dim;\n};\n\n\n// Eval as rvalue\ntemplate<DenseIndex DimId, typename ArgType, typename Device>\nstruct TensorEvaluator<const TensorChippingOp<DimId, ArgType>, Device>\n{\n  typedef TensorChippingOp<DimId, ArgType> XprType;\n  static const int NumInputDims = internal::array_size<typename TensorEvaluator<ArgType, Device>::Dimensions>::value;\n  static const int NumDims = NumInputDims-1;\n  typedef typename XprType::Index Index;\n  typedef DSizes<Index, NumDims> Dimensions;\n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  static const int PacketSize = PacketType<CoeffReturnType, Device>::size;\n  typedef StorageMemory<CoeffReturnType, Device> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n\n  enum {\n    // Alignment can't be guaranteed at compile time since it depends on the\n    // slice offsets.\n    IsAligned         = false,\n    Layout            = TensorEvaluator<ArgType, Device>::Layout,\n    PacketAccess      = TensorEvaluator<ArgType, Device>::PacketAccess,\n    BlockAccess       = TensorEvaluator<ArgType, Device>::BlockAccess,\n    // Chipping of outer-most dimension is a trivial operation, because we can\n    // read and write directly from the underlying tensor using single offset.\n    IsOuterChipping   = (static_cast<int>(Layout) == ColMajor && DimId == NumInputDims - 1) ||\n                        (static_cast<int>(Layout) == RowMajor && DimId == 0),\n    // Chipping inner-most dimension.\n    IsInnerChipping   = (static_cast<int>(Layout) == ColMajor && DimId == 0) ||\n                        (static_cast<int>(Layout) == RowMajor && DimId == NumInputDims - 1),\n    // Prefer block access if the underlying expression prefers it, otherwise\n    // only if chipping is not trivial.\n    PreferBlockAccess = TensorEvaluator<ArgType, Device>::PreferBlockAccess ||\n                        !IsOuterChipping,\n    CoordAccess       = false,  // to be implemented\n    RawAccess         = false\n  };\n\n  typedef typename internal::remove_const<Scalar>::type ScalarNoConst;\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockDescriptor<NumDims, Index> TensorBlockDesc;\n  typedef internal::TensorBlockScratchAllocator<Device> TensorBlockScratch;\n\n  typedef internal::TensorBlockDescriptor<NumInputDims, Index>\n      ArgTensorBlockDesc;\n  typedef typename TensorEvaluator<const ArgType, Device>::TensorBlock\n      ArgTensorBlock;\n\n  typedef typename internal::TensorMaterializedBlock<ScalarNoConst, NumDims,\n                                                     Layout, Index>\n      TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)\n      : m_impl(op.expression(), device), m_dim(op.dim()), m_device(device)\n  {\n    EIGEN_STATIC_ASSERT((NumInputDims >= 1), YOU_MADE_A_PROGRAMMING_MISTAKE);\n    eigen_assert(NumInputDims > m_dim.actualDim());\n\n    const typename TensorEvaluator<ArgType, Device>::Dimensions& input_dims = m_impl.dimensions();\n    eigen_assert(op.offset() < input_dims[m_dim.actualDim()]);\n\n    int j = 0;\n    for (int i = 0; i < NumInputDims; ++i) {\n      if (i != m_dim.actualDim()) {\n        m_dimensions[j] = input_dims[i];\n        ++j;\n      }\n    }\n\n    m_stride = 1;\n    m_inputStride = 1;\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      for (int i = 0; i < m_dim.actualDim(); ++i) {\n        m_stride *= input_dims[i];\n        m_inputStride *= input_dims[i];\n      }\n    } else {\n      for (int i = NumInputDims-1; i > m_dim.actualDim(); --i) {\n        m_stride *= input_dims[i];\n        m_inputStride *= input_dims[i];\n      }\n    }\n    m_inputStride *= input_dims[m_dim.actualDim()];\n    m_inputOffset = m_stride * op.offset();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions& dimensions() const { return m_dimensions; }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType) {\n    m_impl.evalSubExprsIfNeeded(NULL);\n    return true;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {\n    m_impl.cleanup();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const\n  {\n    return m_impl.coeff(srcCoeff(index));\n  }\n\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const\n  {\n    EIGEN_STATIC_ASSERT((PacketSize > 1), YOU_MADE_A_PROGRAMMING_MISTAKE)\n    eigen_assert(index+PacketSize-1 < dimensions().TotalSize());\n\n    if (isInnerChipping()) {\n      // m_stride is equal to 1, so let's avoid the integer division.\n      eigen_assert(m_stride == 1);\n      Index inputIndex = index * m_inputStride + m_inputOffset;\n      EIGEN_ALIGN_MAX typename internal::remove_const<CoeffReturnType>::type values[PacketSize];\n      EIGEN_UNROLL_LOOP\n      for (int i = 0; i < PacketSize; ++i) {\n        values[i] = m_impl.coeff(inputIndex);\n        inputIndex += m_inputStride;\n      }\n      PacketReturnType rslt = internal::pload<PacketReturnType>(values);\n      return rslt;\n    } else if (isOuterChipping()) {\n      // m_stride is always greater than index, so let's avoid the integer division.\n      eigen_assert(m_stride > index);\n      return m_impl.template packet<LoadMode>(index + m_inputOffset);\n    } else {\n      const Index idx = index / m_stride;\n      const Index rem = index - idx * m_stride;\n      if (rem + PacketSize <= m_stride) {\n        Index inputIndex = idx * m_inputStride + m_inputOffset + rem;\n        return m_impl.template packet<LoadMode>(inputIndex);\n      } else {\n        // Cross the stride boundary. Fallback to slow path.\n        EIGEN_ALIGN_MAX typename internal::remove_const<CoeffReturnType>::type values[PacketSize];\n       EIGEN_UNROLL_LOOP\n        for (int i = 0; i < PacketSize; ++i) {\n          values[i] = coeff(index);\n          ++index;\n        }\n        PacketReturnType rslt = internal::pload<PacketReturnType>(values);\n        return rslt;\n      }\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost\n  costPerCoeff(bool vectorized) const {\n    double cost = 0;\n    if ((static_cast<int>(Layout) == static_cast<int>(ColMajor) &&\n         m_dim.actualDim() == 0) ||\n        (static_cast<int>(Layout) == static_cast<int>(RowMajor) &&\n         m_dim.actualDim() == NumInputDims - 1)) {\n      cost += TensorOpCost::MulCost<Index>() + TensorOpCost::AddCost<Index>();\n    } else if ((static_cast<int>(Layout) == static_cast<int>(ColMajor) &&\n                m_dim.actualDim() == NumInputDims - 1) ||\n               (static_cast<int>(Layout) == static_cast<int>(RowMajor) &&\n                m_dim.actualDim() == 0)) {\n      cost += TensorOpCost::AddCost<Index>();\n    } else {\n      cost += 3 * TensorOpCost::MulCost<Index>() + TensorOpCost::DivCost<Index>() +\n              3 * TensorOpCost::AddCost<Index>();\n    }\n\n    return m_impl.costPerCoeff(vectorized) +\n           TensorOpCost(0, 0, cost, vectorized, PacketSize);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  internal::TensorBlockResourceRequirements getResourceRequirements() const {\n    const size_t target_size = m_device.lastLevelCacheSize();\n    return internal::TensorBlockResourceRequirements::merge(\n        internal::TensorBlockResourceRequirements::skewed<Scalar>(target_size),\n        m_impl.getResourceRequirements());\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorBlock\n  block(TensorBlockDesc& desc, TensorBlockScratch& scratch,\n          bool root_of_expr_ast = false) const {\n    const Index chip_dim = m_dim.actualDim();\n\n    DSizes<Index, NumInputDims> input_block_dims;\n    for (int i = 0; i < NumInputDims; ++i) {\n      input_block_dims[i]\n            = i < chip_dim ? desc.dimension(i)\n            : i > chip_dim ? desc.dimension(i - 1)\n            : 1;\n    }\n\n    ArgTensorBlockDesc arg_desc(srcCoeff(desc.offset()), input_block_dims);\n\n    // Try to reuse destination buffer for materializing argument block.\n    if (desc.HasDestinationBuffer()) {\n      DSizes<Index, NumInputDims> arg_destination_strides;\n      for (int i = 0; i < NumInputDims; ++i) {\n      arg_destination_strides[i]\n            = i < chip_dim ? desc.destination().strides()[i]\n            : i > chip_dim ? desc.destination().strides()[i - 1]\n            : 0; // for dimensions of size `1` stride should never be used.\n      }\n\n      arg_desc.template AddDestinationBuffer<Layout>(\n          desc.destination().template data<ScalarNoConst>(),\n          arg_destination_strides);\n    }\n\n    ArgTensorBlock arg_block = m_impl.block(arg_desc, scratch, root_of_expr_ast);\n    if (!arg_desc.HasDestinationBuffer()) desc.DropDestinationBuffer();\n\n    if (arg_block.data() != NULL) {\n      // Forward argument block buffer if possible.\n      return TensorBlock(arg_block.kind(), arg_block.data(),\n                           desc.dimensions());\n\n    } else {\n      // Assign argument block expression to a buffer.\n\n      // Prepare storage for the materialized chipping result.\n      const typename TensorBlock::Storage block_storage =\n          TensorBlock::prepareStorage(desc, scratch);\n\n      typedef internal::TensorBlockAssignment<\n          ScalarNoConst, NumInputDims, typename ArgTensorBlock::XprType, Index>\n          TensorBlockAssignment;\n\n      TensorBlockAssignment::Run(\n          TensorBlockAssignment::target(\n              arg_desc.dimensions(),\n              internal::strides<Layout>(arg_desc.dimensions()),\n              block_storage.data()),\n          arg_block.expr());\n\n      return block_storage.AsTensorMaterializedBlock();\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename Storage::Type data() const {\n    typename Storage::Type result = constCast(m_impl.data());\n    if (isOuterChipping() && result) {\n      return result + m_inputOffset;\n    } else {\n      return NULL;\n    }\n  }\n#ifdef EIGEN_USE_SYCL\n  // binding placeholder accessors to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {\n    m_impl.bind(cgh);\n  }\n#endif\n\n protected:\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index srcCoeff(Index index) const\n  {\n    Index inputIndex;\n    if (isInnerChipping()) {\n      // m_stride is equal to 1, so let's avoid the integer division.\n      eigen_assert(m_stride == 1);\n      inputIndex = index * m_inputStride + m_inputOffset;\n    } else if (isOuterChipping()) {\n      // m_stride is always greater than index, so let's avoid the integer\n      // division.\n      eigen_assert(m_stride > index);\n      inputIndex = index + m_inputOffset;\n    } else {\n      const Index idx = index / m_stride;\n      inputIndex = idx * m_inputStride + m_inputOffset;\n      index -= idx * m_stride;\n      inputIndex += index;\n    }\n    return inputIndex;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool isInnerChipping() const {\n    return IsInnerChipping ||\n           (static_cast<int>(Layout) == ColMajor && m_dim.actualDim() == 0) ||\n           (static_cast<int>(Layout) == RowMajor && m_dim.actualDim() == NumInputDims - 1);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool isOuterChipping() const {\n    return IsOuterChipping ||\n           (static_cast<int>(Layout) == ColMajor && m_dim.actualDim() == NumInputDims-1) ||\n           (static_cast<int>(Layout) == RowMajor && m_dim.actualDim() == 0);\n  }\n\n  Dimensions m_dimensions;\n  Index m_stride;\n  Index m_inputOffset;\n  Index m_inputStride;\n  TensorEvaluator<ArgType, Device> m_impl;\n  const internal::DimensionId<DimId> m_dim;\n  const Device EIGEN_DEVICE_REF m_device;\n};\n\n\n// Eval as lvalue\ntemplate<DenseIndex DimId, typename ArgType, typename Device>\nstruct TensorEvaluator<TensorChippingOp<DimId, ArgType>, Device>\n  : public TensorEvaluator<const TensorChippingOp<DimId, ArgType>, Device>\n{\n  typedef TensorEvaluator<const TensorChippingOp<DimId, ArgType>, Device> Base;\n  typedef TensorChippingOp<DimId, ArgType> XprType;\n  static const int NumInputDims = internal::array_size<typename TensorEvaluator<ArgType, Device>::Dimensions>::value;\n  static const int NumDims = NumInputDims-1;\n  typedef typename XprType::Index Index;\n  typedef DSizes<Index, NumDims> Dimensions;\n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  static const int PacketSize = PacketType<CoeffReturnType, Device>::size;\n\n  enum {\n    IsAligned     = false,\n    PacketAccess  = TensorEvaluator<ArgType, Device>::PacketAccess,\n    BlockAccess   = TensorEvaluator<ArgType, Device>::RawAccess,\n    Layout        = TensorEvaluator<ArgType, Device>::Layout,\n    RawAccess     = false\n  };\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockDescriptor<NumDims, Index> TensorBlockDesc;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)\n    : Base(op, device)\n    { }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType& coeffRef(Index index)\n  {\n    return this->m_impl.coeffRef(this->srcCoeff(index));\n  }\n\n  template <int StoreMode> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  void writePacket(Index index, const PacketReturnType& x)\n  {\n    EIGEN_STATIC_ASSERT((PacketSize > 1), YOU_MADE_A_PROGRAMMING_MISTAKE)\n\n    if (this->isInnerChipping()) {\n      // m_stride is equal to 1, so let's avoid the integer division.\n      eigen_assert(this->m_stride == 1);\n      EIGEN_ALIGN_MAX typename internal::remove_const<CoeffReturnType>::type values[PacketSize];\n      internal::pstore<CoeffReturnType, PacketReturnType>(values, x);\n      Index inputIndex = index * this->m_inputStride + this->m_inputOffset;\n      EIGEN_UNROLL_LOOP\n      for (int i = 0; i < PacketSize; ++i) {\n        this->m_impl.coeffRef(inputIndex) = values[i];\n        inputIndex += this->m_inputStride;\n      }\n    } else if (this->isOuterChipping()) {\n      // m_stride is always greater than index, so let's avoid the integer division.\n      eigen_assert(this->m_stride > index);\n      this->m_impl.template writePacket<StoreMode>(index + this->m_inputOffset, x);\n    } else {\n      const Index idx = index / this->m_stride;\n      const Index rem = index - idx * this->m_stride;\n      if (rem + PacketSize <= this->m_stride) {\n        const Index inputIndex = idx * this->m_inputStride + this->m_inputOffset + rem;\n        this->m_impl.template writePacket<StoreMode>(inputIndex, x);\n      } else {\n        // Cross stride boundary. Fallback to slow path.\n        EIGEN_ALIGN_MAX typename internal::remove_const<CoeffReturnType>::type values[PacketSize];\n        internal::pstore<CoeffReturnType, PacketReturnType>(values, x);\n        EIGEN_UNROLL_LOOP\n        for (int i = 0; i < PacketSize; ++i) {\n          this->coeffRef(index) = values[i];\n          ++index;\n        }\n      }\n    }\n  }\n\n  template <typename TensorBlock>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void writeBlock(\n      const TensorBlockDesc& desc, const TensorBlock& block) {\n    assert(this->m_impl.data() != NULL);\n\n    const Index chip_dim = this->m_dim.actualDim();\n\n    DSizes<Index, NumInputDims> input_block_dims;\n    for (int i = 0; i < NumInputDims; ++i) {\n      input_block_dims[i] = i < chip_dim ? desc.dimension(i)\n                          : i > chip_dim ? desc.dimension(i - 1)\n                          : 1;\n    }\n\n    typedef TensorReshapingOp<const DSizes<Index, NumInputDims>,\n                              const typename TensorBlock::XprType>\n        TensorBlockExpr;\n\n    typedef internal::TensorBlockAssignment<Scalar, NumInputDims,\n                                            TensorBlockExpr, Index>\n        TensorBlockAssign;\n\n    TensorBlockAssign::Run(\n        TensorBlockAssign::target(\n            input_block_dims,\n            internal::strides<Layout>(this->m_impl.dimensions()),\n            this->m_impl.data(), this->srcCoeff(desc.offset())),\n        block.expr().reshape(input_block_dims));\n  }\n};\n\n\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_CHIPPING_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorConcatenation.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_CONCATENATION_H\n#define EIGEN_CXX11_TENSOR_TENSOR_CONCATENATION_H\n\nnamespace Eigen {\n\n/** \\class TensorConcatenationOp\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief Tensor concatenation class.\n  *\n  *\n  */\nnamespace internal {\ntemplate<typename Axis, typename LhsXprType, typename RhsXprType>\nstruct traits<TensorConcatenationOp<Axis, LhsXprType, RhsXprType> >\n{\n  // Type promotion to handle the case where the types of the lhs and the rhs are different.\n  typedef typename promote_storage_type<typename LhsXprType::Scalar,\n                                        typename RhsXprType::Scalar>::ret Scalar;\n  typedef typename promote_storage_type<typename traits<LhsXprType>::StorageKind,\n                                        typename traits<RhsXprType>::StorageKind>::ret StorageKind;\n  typedef typename promote_index_type<typename traits<LhsXprType>::Index,\n                                      typename traits<RhsXprType>::Index>::type Index;\n  typedef typename LhsXprType::Nested LhsNested;\n  typedef typename RhsXprType::Nested RhsNested;\n  typedef typename remove_reference<LhsNested>::type _LhsNested;\n  typedef typename remove_reference<RhsNested>::type _RhsNested;\n  static const int NumDimensions = traits<LhsXprType>::NumDimensions;\n  static const int Layout = traits<LhsXprType>::Layout;\n  enum { Flags = 0 };\n  typedef typename conditional<Pointer_type_promotion<typename LhsXprType::Scalar, Scalar>::val,\n                               typename traits<LhsXprType>::PointerType, typename traits<RhsXprType>::PointerType>::type PointerType;\n};\n\ntemplate<typename Axis, typename LhsXprType, typename RhsXprType>\nstruct eval<TensorConcatenationOp<Axis, LhsXprType, RhsXprType>, Eigen::Dense>\n{\n  typedef const TensorConcatenationOp<Axis, LhsXprType, RhsXprType>& type;\n};\n\ntemplate<typename Axis, typename LhsXprType, typename RhsXprType>\nstruct nested<TensorConcatenationOp<Axis, LhsXprType, RhsXprType>, 1, typename eval<TensorConcatenationOp<Axis, LhsXprType, RhsXprType> >::type>\n{\n  typedef TensorConcatenationOp<Axis, LhsXprType, RhsXprType> type;\n};\n\n}  // end namespace internal\n\n\ntemplate<typename Axis, typename LhsXprType, typename RhsXprType>\nclass TensorConcatenationOp : public TensorBase<TensorConcatenationOp<Axis, LhsXprType, RhsXprType>, WriteAccessors>\n{\n  public:\n    typedef typename internal::traits<TensorConcatenationOp>::Scalar Scalar;\n    typedef typename internal::traits<TensorConcatenationOp>::StorageKind StorageKind;\n    typedef typename internal::traits<TensorConcatenationOp>::Index Index;\n    typedef typename internal::nested<TensorConcatenationOp>::type Nested;\n    typedef typename internal::promote_storage_type<typename LhsXprType::CoeffReturnType,\n                                                    typename RhsXprType::CoeffReturnType>::ret CoeffReturnType;\n    typedef typename NumTraits<Scalar>::Real RealScalar;\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorConcatenationOp(const LhsXprType& lhs, const RhsXprType& rhs, Axis axis)\n        : m_lhs_xpr(lhs), m_rhs_xpr(rhs), m_axis(axis) {}\n\n    EIGEN_DEVICE_FUNC\n    const typename internal::remove_all<typename LhsXprType::Nested>::type&\n    lhsExpression() const { return m_lhs_xpr; }\n\n    EIGEN_DEVICE_FUNC\n    const typename internal::remove_all<typename RhsXprType::Nested>::type&\n    rhsExpression() const { return m_rhs_xpr; }\n\n    EIGEN_DEVICE_FUNC const Axis& axis() const { return m_axis; }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE TensorConcatenationOp& operator = (const TensorConcatenationOp& other)\n    {\n      typedef TensorAssignOp<TensorConcatenationOp, const TensorConcatenationOp> Assign;\n      Assign assign(*this, other);\n      internal::TensorExecutor<const Assign, DefaultDevice>::run(assign, DefaultDevice());\n      return *this;\n    }\n\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE TensorConcatenationOp& operator = (const OtherDerived& other)\n    {\n      typedef TensorAssignOp<TensorConcatenationOp, const OtherDerived> Assign;\n      Assign assign(*this, other);\n      internal::TensorExecutor<const Assign, DefaultDevice>::run(assign, DefaultDevice());\n      return *this;\n    }\n\n  protected:\n    typename LhsXprType::Nested m_lhs_xpr;\n    typename RhsXprType::Nested m_rhs_xpr;\n    const Axis m_axis;\n};\n\n\n// Eval as rvalue\ntemplate<typename Axis, typename LeftArgType, typename RightArgType, typename Device>\nstruct TensorEvaluator<const TensorConcatenationOp<Axis, LeftArgType, RightArgType>, Device>\n{\n  typedef TensorConcatenationOp<Axis, LeftArgType, RightArgType> XprType;\n  typedef typename XprType::Index Index;\n  static const int NumDims = internal::array_size<typename TensorEvaluator<LeftArgType, Device>::Dimensions>::value;\n  static const int RightNumDims = internal::array_size<typename TensorEvaluator<RightArgType, Device>::Dimensions>::value;\n  typedef DSizes<Index, NumDims> Dimensions;\n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  typedef StorageMemory<CoeffReturnType, Device> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n  enum {\n    IsAligned         = false,\n    PacketAccess      = TensorEvaluator<LeftArgType, Device>::PacketAccess &&\n                        TensorEvaluator<RightArgType, Device>::PacketAccess,\n    BlockAccess       = false,\n    PreferBlockAccess = TensorEvaluator<LeftArgType, Device>::PreferBlockAccess ||\n                        TensorEvaluator<RightArgType, Device>::PreferBlockAccess,\n    Layout            = TensorEvaluator<LeftArgType, Device>::Layout,\n    RawAccess         = false\n  };\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockNotImplemented TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)\n    : m_leftImpl(op.lhsExpression(), device), m_rightImpl(op.rhsExpression(), device), m_axis(op.axis())\n  {\n    EIGEN_STATIC_ASSERT((static_cast<int>(TensorEvaluator<LeftArgType, Device>::Layout) == static_cast<int>(TensorEvaluator<RightArgType, Device>::Layout) || NumDims == 1), YOU_MADE_A_PROGRAMMING_MISTAKE);\n    EIGEN_STATIC_ASSERT((NumDims == RightNumDims), YOU_MADE_A_PROGRAMMING_MISTAKE);\n    EIGEN_STATIC_ASSERT((NumDims > 0), YOU_MADE_A_PROGRAMMING_MISTAKE);\n\n    eigen_assert(0 <= m_axis && m_axis < NumDims);\n    const Dimensions& lhs_dims = m_leftImpl.dimensions();\n    const Dimensions& rhs_dims = m_rightImpl.dimensions();\n    {\n      int i = 0;\n      for (; i < m_axis; ++i) {\n        eigen_assert(lhs_dims[i] > 0);\n        eigen_assert(lhs_dims[i] == rhs_dims[i]);\n        m_dimensions[i] = lhs_dims[i];\n      }\n      eigen_assert(lhs_dims[i] > 0);  // Now i == m_axis.\n      eigen_assert(rhs_dims[i] > 0);\n      m_dimensions[i] = lhs_dims[i] + rhs_dims[i];\n      for (++i; i < NumDims; ++i) {\n        eigen_assert(lhs_dims[i] > 0);\n        eigen_assert(lhs_dims[i] == rhs_dims[i]);\n        m_dimensions[i] = lhs_dims[i];\n      }\n    }\n\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      m_leftStrides[0] = 1;\n      m_rightStrides[0] = 1;\n      m_outputStrides[0] = 1;\n\n      for (int j = 1; j < NumDims; ++j) {\n        m_leftStrides[j] = m_leftStrides[j-1] * lhs_dims[j-1];\n        m_rightStrides[j] = m_rightStrides[j-1] * rhs_dims[j-1];\n        m_outputStrides[j] = m_outputStrides[j-1] * m_dimensions[j-1];\n      }\n    } else {\n      m_leftStrides[NumDims - 1] = 1;\n      m_rightStrides[NumDims - 1] = 1;\n      m_outputStrides[NumDims - 1] = 1;\n\n      for (int j = NumDims - 2; j >= 0; --j) {\n        m_leftStrides[j] = m_leftStrides[j+1] * lhs_dims[j+1];\n        m_rightStrides[j] = m_rightStrides[j+1] * rhs_dims[j+1];\n        m_outputStrides[j] = m_outputStrides[j+1] * m_dimensions[j+1];\n      }\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions& dimensions() const { return m_dimensions; }\n\n  // TODO(phli): Add short-circuit memcpy evaluation if underlying data are linear?\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType)\n  {\n    m_leftImpl.evalSubExprsIfNeeded(NULL);\n    m_rightImpl.evalSubExprsIfNeeded(NULL);\n    return true;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup()\n  {\n    m_leftImpl.cleanup();\n    m_rightImpl.cleanup();\n  }\n\n  // TODO(phli): attempt to speed this up. The integer divisions and modulo are slow.\n  // See CL/76180724 comments for more ideas.\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const\n  {\n    // Collect dimension-wise indices (subs).\n    array<Index, NumDims> subs;\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      for (int i = NumDims - 1; i > 0; --i) {\n        subs[i] = index / m_outputStrides[i];\n        index -= subs[i] * m_outputStrides[i];\n      }\n      subs[0] = index;\n    } else {\n      for (int i = 0; i < NumDims - 1; ++i) {\n        subs[i] = index / m_outputStrides[i];\n        index -= subs[i] * m_outputStrides[i];\n      }\n      subs[NumDims - 1] = index;\n    }\n\n    const Dimensions& left_dims = m_leftImpl.dimensions();\n    if (subs[m_axis] < left_dims[m_axis]) {\n      Index left_index;\n      if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n        left_index = subs[0];\n        EIGEN_UNROLL_LOOP\n        for (int i = 1; i < NumDims; ++i) {\n          left_index += (subs[i] % left_dims[i]) * m_leftStrides[i];\n        }\n      } else {\n        left_index = subs[NumDims - 1];\n        EIGEN_UNROLL_LOOP\n        for (int i = NumDims - 2; i >= 0; --i) {\n          left_index += (subs[i] % left_dims[i]) * m_leftStrides[i];\n        }\n      }\n      return m_leftImpl.coeff(left_index);\n    } else {\n      subs[m_axis] -= left_dims[m_axis];\n      const Dimensions& right_dims = m_rightImpl.dimensions();\n      Index right_index;\n      if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n        right_index = subs[0];\n        EIGEN_UNROLL_LOOP\n        for (int i = 1; i < NumDims; ++i) {\n          right_index += (subs[i] % right_dims[i]) * m_rightStrides[i];\n        }\n      } else {\n        right_index = subs[NumDims - 1];\n        EIGEN_UNROLL_LOOP\n        for (int i = NumDims - 2; i >= 0; --i) {\n          right_index += (subs[i] % right_dims[i]) * m_rightStrides[i];\n        }\n      }\n      return m_rightImpl.coeff(right_index);\n    }\n  }\n\n  // TODO(phli): Add a real vectorization.\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const\n  {\n    const int packetSize = PacketType<CoeffReturnType, Device>::size;\n    EIGEN_STATIC_ASSERT((packetSize > 1), YOU_MADE_A_PROGRAMMING_MISTAKE)\n    eigen_assert(index + packetSize - 1 < dimensions().TotalSize());\n\n    EIGEN_ALIGN_MAX CoeffReturnType values[packetSize];\n    EIGEN_UNROLL_LOOP\n    for (int i = 0; i < packetSize; ++i) {\n      values[i] = coeff(index+i);\n    }\n    PacketReturnType rslt = internal::pload<PacketReturnType>(values);\n    return rslt;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost\n  costPerCoeff(bool vectorized) const {\n    const double compute_cost = NumDims * (2 * TensorOpCost::AddCost<Index>() +\n                                           2 * TensorOpCost::MulCost<Index>() +\n                                           TensorOpCost::DivCost<Index>() +\n                                           TensorOpCost::ModCost<Index>());\n    const double lhs_size = m_leftImpl.dimensions().TotalSize();\n    const double rhs_size = m_rightImpl.dimensions().TotalSize();\n    return (lhs_size / (lhs_size + rhs_size)) *\n               m_leftImpl.costPerCoeff(vectorized) +\n           (rhs_size / (lhs_size + rhs_size)) *\n               m_rightImpl.costPerCoeff(vectorized) +\n           TensorOpCost(0, 0, compute_cost);\n  }\n\n  EIGEN_DEVICE_FUNC EvaluatorPointerType data() const { return NULL; }\n\n  #ifdef EIGEN_USE_SYCL\n  // binding placeholder accessors to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {\n    m_leftImpl.bind(cgh);\n    m_rightImpl.bind(cgh);\n  }\n  #endif\n\n  protected:\n    Dimensions m_dimensions;\n    array<Index, NumDims> m_outputStrides;\n    array<Index, NumDims> m_leftStrides;\n    array<Index, NumDims> m_rightStrides;\n    TensorEvaluator<LeftArgType, Device> m_leftImpl;\n    TensorEvaluator<RightArgType, Device> m_rightImpl;\n    const Axis m_axis;\n};\n\n// Eval as lvalue\ntemplate<typename Axis, typename LeftArgType, typename RightArgType, typename Device>\n  struct TensorEvaluator<TensorConcatenationOp<Axis, LeftArgType, RightArgType>, Device>\n  : public TensorEvaluator<const TensorConcatenationOp<Axis, LeftArgType, RightArgType>, Device>\n{\n  typedef TensorEvaluator<const TensorConcatenationOp<Axis, LeftArgType, RightArgType>, Device> Base;\n  typedef TensorConcatenationOp<Axis, LeftArgType, RightArgType> XprType;\n  typedef typename Base::Dimensions Dimensions;\n  enum {\n    IsAligned         = false,\n    PacketAccess      = TensorEvaluator<LeftArgType, Device>::PacketAccess &&\n                        TensorEvaluator<RightArgType, Device>::PacketAccess,\n    BlockAccess       = false,\n    PreferBlockAccess = TensorEvaluator<LeftArgType, Device>::PreferBlockAccess ||\n                        TensorEvaluator<RightArgType, Device>::PreferBlockAccess,\n    Layout            = TensorEvaluator<LeftArgType, Device>::Layout,\n    RawAccess         = false\n  };\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockNotImplemented TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(XprType& op, const Device& device)\n    : Base(op, device)\n  {\n    EIGEN_STATIC_ASSERT((static_cast<int>(Layout) == static_cast<int>(ColMajor)), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  }\n\n  typedef typename XprType::Index Index;\n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType& coeffRef(Index index)\n  {\n    // Collect dimension-wise indices (subs).\n    array<Index, Base::NumDims> subs;\n    for (int i = Base::NumDims - 1; i > 0; --i) {\n      subs[i] = index / this->m_outputStrides[i];\n      index -= subs[i] * this->m_outputStrides[i];\n    }\n    subs[0] = index;\n\n    const Dimensions& left_dims = this->m_leftImpl.dimensions();\n    if (subs[this->m_axis] < left_dims[this->m_axis]) {\n      Index left_index = subs[0];\n      for (int i = 1; i < Base::NumDims; ++i) {\n        left_index += (subs[i] % left_dims[i]) * this->m_leftStrides[i];\n      }\n      return this->m_leftImpl.coeffRef(left_index);\n    } else {\n      subs[this->m_axis] -= left_dims[this->m_axis];\n      const Dimensions& right_dims = this->m_rightImpl.dimensions();\n      Index right_index = subs[0];\n      for (int i = 1; i < Base::NumDims; ++i) {\n        right_index += (subs[i] % right_dims[i]) * this->m_rightStrides[i];\n      }\n      return this->m_rightImpl.coeffRef(right_index);\n    }\n  }\n\n  template <int StoreMode> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  void writePacket(Index index, const PacketReturnType& x)\n  {\n    const int packetSize = PacketType<CoeffReturnType, Device>::size;\n    EIGEN_STATIC_ASSERT((packetSize > 1), YOU_MADE_A_PROGRAMMING_MISTAKE)\n    eigen_assert(index + packetSize - 1 < this->dimensions().TotalSize());\n\n    EIGEN_ALIGN_MAX CoeffReturnType values[packetSize];\n    internal::pstore<CoeffReturnType, PacketReturnType>(values, x);\n    for (int i = 0; i < packetSize; ++i) {\n      coeffRef(index+i) = values[i];\n    }\n  }\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_CONCATENATION_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorContraction.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_CONTRACTION_H\n#define EIGEN_CXX11_TENSOR_TENSOR_CONTRACTION_H\n\nnamespace Eigen {\n\n/** \\class TensorContraction\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief Tensor contraction class.\n  *\n  *\n  */\nnamespace internal {\n\ntemplate<typename Dimensions, typename LhsXprType, typename RhsXprType, typename OutputKernelType>\nstruct traits<TensorContractionOp<Dimensions, LhsXprType, RhsXprType, OutputKernelType> >\n{\n  // Type promotion to handle the case where the types of the lhs and the rhs are different.\n  typedef typename gebp_traits<typename remove_const<typename LhsXprType::Scalar>::type,\n                               typename remove_const<typename RhsXprType::Scalar>::type>::ResScalar Scalar;\n\n  typedef typename promote_storage_type<typename traits<LhsXprType>::StorageKind,\n                                        typename traits<RhsXprType>::StorageKind>::ret StorageKind;\n  typedef typename promote_index_type<typename traits<LhsXprType>::Index,\n                                      typename traits<RhsXprType>::Index>::type Index;\n  typedef typename LhsXprType::Nested LhsNested;\n  typedef typename RhsXprType::Nested RhsNested;\n  typedef typename remove_reference<LhsNested>::type _LhsNested;\n  typedef typename remove_reference<RhsNested>::type _RhsNested;\n\n  // From NumDims below.\n  static const int NumDimensions = traits<LhsXprType>::NumDimensions + traits<RhsXprType>::NumDimensions - 2 * array_size<Dimensions>::value;\n  static const int Layout = traits<LhsXprType>::Layout;\n  typedef typename conditional<Pointer_type_promotion<typename LhsXprType::Scalar, Scalar>::val,\n                               typename traits<LhsXprType>::PointerType,\n                               typename traits<RhsXprType>::PointerType>::type\n      PointerType;\n\n  enum {\n    Flags = 0\n  };\n};\n\ntemplate<typename Dimensions, typename LhsXprType, typename RhsXprType, typename OutputKernelType>\nstruct eval<TensorContractionOp<Dimensions, LhsXprType, RhsXprType, OutputKernelType>, Eigen::Dense>\n{\n  typedef const TensorContractionOp<Dimensions, LhsXprType, RhsXprType, OutputKernelType>& type;\n};\n\ntemplate<typename Dimensions, typename LhsXprType, typename RhsXprType, typename OutputKernelType>\nstruct nested<TensorContractionOp<Dimensions, LhsXprType, RhsXprType, OutputKernelType>, 1, typename eval<TensorContractionOp<Dimensions, LhsXprType, RhsXprType, OutputKernelType> >::type>\n{\n  typedef TensorContractionOp<Dimensions, LhsXprType, RhsXprType, OutputKernelType> type;\n};\n\ntemplate<typename Indices_, typename LeftArgType_, typename RightArgType_, typename OutputKernelType_, typename Device_>\nstruct traits<TensorEvaluator<const TensorContractionOp<Indices_, LeftArgType_, RightArgType_, OutputKernelType_>, Device_> > {\n  typedef Indices_ Indices;\n  typedef LeftArgType_ LeftArgType;\n  typedef RightArgType_ RightArgType;\n  typedef OutputKernelType_ OutputKernelType;\n  typedef Device_ Device;\n\n  // From NumDims below.\n  static const int NumDimensions = traits<LeftArgType_>::NumDimensions + traits<RightArgType_>::NumDimensions - 2 * array_size<Indices_>::value;\n};\n\n// Helper class to allocate and deallocate temporary memory for packed buffers.\ntemplate <typename LhsScalar, typename RhsScalar>\nstruct TensorContractionBlockMemAllocator {\n  typedef void* BlockMemHandle;\n\n  template <typename Device>\n  EIGEN_DEVICE_FUNC static BlockMemHandle allocate(Device& d, const Index bm,\n                                                   const Index bk,\n                                                   const Index bn,\n                                                   LhsScalar** lhs_block,\n                                                   RhsScalar** rhs_block) {\n    eigen_assert(lhs_block);\n    eigen_assert(rhs_block);\n    BlockSizes sz = ComputeLhsRhsBlockSizes(bm, bk, bn);\n    char* block_mem = static_cast<char*>(d.allocate(sz.lhs_size + sz.rhs_size));\n    eigen_assert(block_mem);\n    *lhs_block = reinterpret_cast<LhsScalar*>(block_mem);\n    *rhs_block = reinterpret_cast<RhsScalar*>(block_mem + sz.lhs_size);\n    return block_mem;\n  }\n\n  template <typename Device>\n  EIGEN_DEVICE_FUNC static BlockMemHandle allocateSlices(\n      Device& d, const Index bm, const Index bk, const Index bn,\n      const Index num_lhs, const Index num_rhs, const Index num_slices,\n      std::vector<LhsScalar*>* lhs_blocks,\n      std::vector<RhsScalar*>* rhs_blocks) {\n    eigen_assert(num_slices > 0);\n    eigen_assert(num_lhs >= 0 && num_rhs >= 0);\n    eigen_assert(num_lhs == 0 || lhs_blocks);\n    eigen_assert(num_rhs == 0 || rhs_blocks);\n    BlockSizes sz = ComputeLhsRhsBlockSizes(bm, bk, bn);\n    void* block_mem = d.allocate(\n        (num_lhs * sz.lhs_size + num_rhs * sz.rhs_size) * num_slices);\n    eigen_assert(block_mem);\n    char* mem = static_cast<char*>(block_mem);\n\n    for (Index x = 0; x < num_slices; x++) {\n      if (num_lhs > 0) lhs_blocks[x].resize(num_lhs);\n      for (Index m = 0; m < num_lhs; m++) {\n        lhs_blocks[x][m] = reinterpret_cast<LhsScalar*>(mem);\n        mem += sz.lhs_size;\n      }\n      if (num_rhs > 0) rhs_blocks[x].resize(num_rhs);\n      for (Index n = 0; n < num_rhs; n++) {\n        rhs_blocks[x][n] = reinterpret_cast<RhsScalar*>(mem);\n        mem += sz.rhs_size;\n      }\n    }\n\n    return block_mem;\n  }\n\n  template <typename Device>\n  EIGEN_DEVICE_FUNC static void deallocate(Device& d, BlockMemHandle handle) {\n    d.deallocate(handle);\n  }\n\n private:\n  struct BlockSizes {\n    Index lhs_size;\n    Index rhs_size;\n  };\n  EIGEN_DEVICE_FUNC static BlockSizes ComputeLhsRhsBlockSizes(const Index bm,\n                                                              const Index bk,\n                                                              const Index bn) {\n    Index align = numext::maxi(EIGEN_MAX_ALIGN_BYTES, 1);\n    BlockSizes sz;\n    sz.lhs_size = divup<Index>(bm * bk * sizeof(LhsScalar), align) * align;\n    sz.rhs_size = divup<Index>(bn * bk * sizeof(RhsScalar), align) * align;\n    return sz;\n  }\n};\n\n// WARNING: In this code we assume that Lhs and Rhs tensor expressions are in\n// ColMajor storage order. This property is guaranteed by the\n// TensorContractionOp evaluator. TensorContractionKernel specifies how we pack\n// blocks of Lhs and Rhs tensor expressions, and how we invoke matrix\n// multiplication for these blocks. Default tensor contraction uses\n// gemm_pack_rhs, gemm_pack_lhs and gebp_kernel from Eigen Core (see\n// GeneralBlocPanelKernel.h for details).\n//\n// By specializing contraction kernels we can use other low level libraries to\n// perform matrix multiplication, and still rely on Eigen contraction evaluator.\n// This also includes full support in TensorContractionThreadPool, assuming that\n// underlying gemm do not use it's own threading.\n//\n// - ResScalar/LhsScalar/RhsScalar - scalar type for the result of\n//   multiplication, lhs tensor and rhs tensor respectively.\n//\n// - StorageIndex - index type for the tensor expressions. In practice almost\n//   always is Eigen::Index.\n//\n// - OutputMapper provides access to the memory of the output matrix. In\n//   practice it's always column major blas_data_mapper (it must be of ResScalar\n//   type).\n//\n// - LhsMapper/RhsMapper similarly to blas_data_mapper provide a two dimensional\n//   view into the Lhs/Rhs tensor expressions. In practice it's\n//   TensorContractionInputMapper, or some specialization of it based on the\n//   type of tensor expression (e.g. TensorImagePatchOp has optimized input\n//   mapper).\ntemplate <typename ResScalar, typename LhsScalar, typename RhsScalar,\n    typename StorageIndex, typename OutputMapper, typename LhsMapper,\n    typename RhsMapper>\nstruct TensorContractionKernel {\n  // True if `invoke()` supports `beta` in `C <- alpha * A * B + beta * C`\n  // (otherwise beta should be always equal to 1).\n  enum { HasBeta = false };\n\n  EIGEN_DEVICE_FUNC\n  TensorContractionKernel(StorageIndex m_, StorageIndex k_, StorageIndex n_,\n                          StorageIndex bm_, StorageIndex bk_, StorageIndex bn_)\n      : m(m_), k(k_), n(n_), bm(bm_), bk(bk_), bn(bn_) {}\n\n  // Pack blocks of Lhs and Rhs into contiguous blocks in memory.\n  typedef LhsScalar* LhsBlock;\n  typedef RhsScalar* RhsBlock;\n\n  // Packed Lhs/Rhs block memory allocator.\n  typedef TensorContractionBlockMemAllocator<LhsScalar, RhsScalar>\n      BlockMemAllocator;\n  typedef typename BlockMemAllocator::BlockMemHandle BlockMemHandle;\n\n  typedef typename internal::gebp_traits<LhsScalar, RhsScalar> Traits;\n\n  typedef internal::gemm_pack_lhs<\n      LhsScalar, StorageIndex, typename LhsMapper::SubMapper, Traits::mr,\n      Traits::LhsProgress, typename Traits::LhsPacket4Packing, ColMajor>\n      LhsPacker;\n\n  typedef internal::gemm_pack_rhs<RhsScalar, StorageIndex,\n                                  typename RhsMapper::SubMapper, Traits::nr,\n                                  ColMajor>\n      RhsPacker;\n\n  typedef internal::gebp_kernel<LhsScalar, RhsScalar, StorageIndex,\n                                OutputMapper, Traits::mr, Traits::nr,\n      /*ConjugateLhs*/ false, /*ConjugateRhs*/ false>\n      GebpKernel;\n\n  template <typename Device>\n  EIGEN_DEVICE_FUNC BlockMemHandle allocate(Device& d, LhsBlock* lhs_block,\n                                            RhsBlock* rhs_block) {\n    return BlockMemAllocator::allocate(d, bm, bk, bn, lhs_block, rhs_block);\n  }\n\n  template <typename Device>\n  EIGEN_DEVICE_FUNC BlockMemHandle allocateSlices(\n      Device& d, const StorageIndex num_lhs, const StorageIndex num_rhs,\n      const StorageIndex num_slices, std::vector<LhsBlock>* lhs_blocks,\n      std::vector<RhsBlock>* rhs_blocks) {\n    return BlockMemAllocator::allocateSlices(\n        d, bm, bk, bn, num_lhs, num_rhs, num_slices, lhs_blocks, rhs_blocks);\n  }\n\n  template <typename Device>\n  EIGEN_DEVICE_FUNC static void deallocate(Device& d, BlockMemHandle handle) {\n    BlockMemAllocator::deallocate(d, handle);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_DONT_INLINE void packLhs(\n      LhsBlock* lhsBlock, const typename LhsMapper::SubMapper& data_mapper,\n      const StorageIndex depth, const StorageIndex rows) {\n    LhsPacker()(*lhsBlock, data_mapper, depth, rows, /*stride*/ 0,\n        /*offset*/ 0);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_DONT_INLINE void packRhs(\n      RhsBlock* rhsBlock, const typename RhsMapper::SubMapper& data_mapper,\n      const StorageIndex depth, const StorageIndex cols) {\n    RhsPacker()(*rhsBlock, data_mapper, depth, cols);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_DONT_INLINE void invoke(\n      const OutputMapper& output_mapper, const LhsBlock& lhsBlock,\n      const RhsBlock& rhsBlock, const StorageIndex rows,\n      const StorageIndex depth, const StorageIndex cols,\n      const ResScalar alpha, const ResScalar beta) {\n    // Default GEBP kernel does not support beta.\n    eigen_assert(beta == ResScalar(1));\n    static const int kComputeStrideFromBlockDimensions = -1;\n    GebpKernel()(output_mapper, lhsBlock, rhsBlock, rows, depth, cols, alpha,\n        /*strideA*/ kComputeStrideFromBlockDimensions,\n        /*strideB*/ kComputeStrideFromBlockDimensions,\n        /*offsetA*/ 0, /*offsetB*/ 0);\n  }\n\n private:\n  // These are dimensions of the original Tensors, and selected block sizes. The\n  // actual block sizes passed to all function above might be smaller because of\n  // the partial blocks at the end.\n  const StorageIndex m;\n  const StorageIndex k;\n  const StorageIndex n;\n  const StorageIndex bm;\n  const StorageIndex bk;\n  const StorageIndex bn;\n};\n\n}  // end namespace internal\n\n// Tensor contraction params that should enable to get from output matrix\n// 2-dimensional coordinates to the output tensor dimensions.\nstruct TensorContractionParams {\n  // TensorContraction evaluator assumes that both tensors are in ColMajor\n  // layout, if tensors are in RowMajor evaluator swap lhs with rhs.\n  bool swapped_arguments;\n};\n\n// Output kernel allows to fuse operations into the tensor contraction.\n//\n// Examples:\n//   1. Elementwise Relu transformation following Conv2D.\n//   2. AddBias to the Conv2D output channels dimension.\n//\n// The NoOpOutputKernel implements an output kernel that does absolutely nothing.\nstruct NoOpOutputKernel {\n  /**\n   * Tensor contraction evaluator calls this kernel after finishing each block\n   * of output matrix. Output blocks belong to the 2-dimensional output tensor.\n   *\n   * TensorContractionParams contains contraction dimensions information\n   * required to map output 2-d space into the expected output tensor space\n   * (potentially higher dimensional).\n   *\n   * \\param[in] output_mapper Access to output tensor memory\n   * \\param[in] params   Tensor contraction parameters\n   * \\param[in] i        Index of a first row available through output_mapper\n   * \\param[in] j        Index of a first column available through output_mapper\n   * \\param[in] num_rows Number of available rows\n   * \\param[in] num_cols Number of available columns\n   */\n  template <typename Index, typename Scalar>\n  EIGEN_ALWAYS_INLINE void operator()(\n      const internal::blas_data_mapper<Scalar, Index, ColMajor>& output_mapper,\n      const TensorContractionParams& params, Index i,\n      Index j, Index num_rows, Index num_cols) const {\n    EIGEN_UNUSED_VARIABLE(output_mapper);\n    EIGEN_UNUSED_VARIABLE(params);\n    EIGEN_UNUSED_VARIABLE(i);\n    EIGEN_UNUSED_VARIABLE(j);\n    EIGEN_UNUSED_VARIABLE(num_rows);\n    EIGEN_UNUSED_VARIABLE(num_cols);\n  }\n};\n\ntemplate<typename Indices, typename LhsXprType, typename RhsXprType, typename OutputKernelType = const NoOpOutputKernel>\nclass TensorContractionOp : public TensorBase<TensorContractionOp<Indices, LhsXprType, RhsXprType, OutputKernelType>, ReadOnlyAccessors>\n{\n  public:\n  typedef typename Eigen::internal::traits<TensorContractionOp>::Scalar Scalar;\n  typedef typename internal::gebp_traits<typename LhsXprType::CoeffReturnType,\n                                         typename RhsXprType::CoeffReturnType>::ResScalar CoeffReturnType;\n  typedef typename Eigen::internal::nested<TensorContractionOp>::type Nested;\n  typedef typename Eigen::internal::traits<TensorContractionOp>::StorageKind StorageKind;\n  typedef typename Eigen::internal::traits<TensorContractionOp>::Index Index;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorContractionOp(\n      const LhsXprType& lhs, const RhsXprType& rhs, const Indices& dims,\n      const OutputKernelType& output_kernel = OutputKernelType())\n      : m_lhs_xpr(lhs), m_rhs_xpr(rhs), m_indices(dims),\n        m_output_kernel(output_kernel) {}\n\n  EIGEN_DEVICE_FUNC\n  const Indices& indices() const { return m_indices; }\n\n  /** \\returns the nested expressions */\n  EIGEN_DEVICE_FUNC\n  const typename internal::remove_all<typename LhsXprType::Nested>::type&\n  lhsExpression() const { return m_lhs_xpr; }\n\n  EIGEN_DEVICE_FUNC\n  const typename internal::remove_all<typename RhsXprType::Nested>::type&\n  rhsExpression() const { return m_rhs_xpr; }\n\n  EIGEN_DEVICE_FUNC\n  const OutputKernelType& outputKernel() const { return m_output_kernel; }\n\n  protected:\n    typename LhsXprType::Nested m_lhs_xpr;\n    typename RhsXprType::Nested m_rhs_xpr;\n    const Indices m_indices;\n    const OutputKernelType m_output_kernel;\n};\n\n\ntemplate<typename Derived>\nstruct TensorContractionEvaluatorBase\n{\n  typedef typename internal::traits<Derived>::Indices Indices;\n  typedef typename internal::traits<Derived>::LeftArgType LeftArgType;\n  typedef typename internal::traits<Derived>::RightArgType RightArgType;\n  typedef typename internal::traits<Derived>::OutputKernelType OutputKernelType;\n  typedef typename internal::traits<Derived>::Device Device;\n\n  typedef TensorContractionOp<Indices, LeftArgType, RightArgType, OutputKernelType> XprType;\n  typedef typename internal::remove_const<typename XprType::Scalar>::type Scalar;\n  typedef typename XprType::Index Index;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  typedef StorageMemory<Scalar, Device> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n\n  enum {\n    IsAligned         = true,\n    PacketAccess      = (PacketType<CoeffReturnType, Device>::size > 1),\n    BlockAccess       = false,\n    PreferBlockAccess = false,\n    Layout            = TensorEvaluator<LeftArgType, Device>::Layout,\n    CoordAccess       = false,  // to be implemented\n    RawAccess         = true\n  };\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockNotImplemented TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  // Most of the code is assuming that both input tensors are ColMajor. If the\n  // inputs are RowMajor, we will \"cheat\" by swapping the LHS and RHS:\n  // If we want to compute A * B = C, where A is LHS and B is RHS, the code\n  // will pretend B is LHS and A is RHS.\n  typedef typename internal::conditional<\n    static_cast<int>(Layout) == static_cast<int>(ColMajor), LeftArgType, RightArgType>::type EvalLeftArgType;\n  typedef typename internal::conditional<\n    static_cast<int>(Layout) == static_cast<int>(ColMajor), RightArgType, LeftArgType>::type EvalRightArgType;\n\n  typedef TensorEvaluator<EvalLeftArgType, Device> LeftEvaluatorType;\n  typedef TensorEvaluator<EvalRightArgType, Device> RightEvaluatorType;\n\n  static const int LDims =\n      internal::array_size<typename TensorEvaluator<EvalLeftArgType, Device>::Dimensions>::value;\n  static const int RDims =\n      internal::array_size<typename TensorEvaluator<EvalRightArgType, Device>::Dimensions>::value;\n  static const int ContractDims = internal::array_size<Indices>::value;\n  static const int NumDims = LDims + RDims - 2 * ContractDims;\n\n  typedef array<Index, ContractDims> contract_t;\n  typedef array<Index, LDims - ContractDims> left_nocontract_t;\n  typedef array<Index, RDims - ContractDims> right_nocontract_t;\n\n  typedef DSizes<Index, NumDims> Dimensions;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  TensorContractionEvaluatorBase(const XprType& op, const Device& device)\n      : m_leftImpl(choose(Cond<static_cast<int>(Layout) == static_cast<int>(ColMajor)>(),\n                          op.lhsExpression(), op.rhsExpression()), device),\n        m_rightImpl(choose(Cond<static_cast<int>(Layout) == static_cast<int>(ColMajor)>(),\n                           op.rhsExpression(), op.lhsExpression()), device),\n        m_device(device),\n        m_output_kernel(op.outputKernel()),\n        m_result(NULL) {\n    EIGEN_STATIC_ASSERT((static_cast<int>(TensorEvaluator<LeftArgType, Device>::Layout) ==\n         static_cast<int>(TensorEvaluator<RightArgType, Device>::Layout)),\n                        YOU_MADE_A_PROGRAMMING_MISTAKE);\n\n\n    DSizes<Index, LDims> eval_left_dims;\n    DSizes<Index, RDims> eval_right_dims;\n    array<IndexPair<Index>, ContractDims> eval_op_indices;\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      // For ColMajor, we keep using the existing dimensions\n      for (int i = 0; i < LDims; i++) {\n        eval_left_dims[i] = m_leftImpl.dimensions()[i];\n      }\n      for (int i = 0; i < RDims; i++) {\n        eval_right_dims[i] = m_rightImpl.dimensions()[i];\n      }\n      // We keep the pairs of contracting indices.\n      for (int i = 0; i < ContractDims; i++) {\n        eval_op_indices[i].first = op.indices()[i].first;\n        eval_op_indices[i].second = op.indices()[i].second;\n      }\n    } else {\n      // For RowMajor, we need to reverse the existing dimensions\n      for (int i = 0; i < LDims; i++) {\n        eval_left_dims[i] = m_leftImpl.dimensions()[LDims - i - 1];\n      }\n      for (int i = 0; i < RDims; i++) {\n        eval_right_dims[i] = m_rightImpl.dimensions()[RDims - i - 1];\n      }\n      // We need to flip all the pairs of contracting indices as well as\n      // reversing the dimensions.\n      for (int i = 0; i < ContractDims; i++) {\n        eval_op_indices[i].first = LDims - 1 - op.indices()[ContractDims - 1 - i].second;\n        eval_op_indices[i].second = RDims - 1 - op.indices()[ContractDims - 1 - i].first;\n      }\n    }\n\n    // Check for duplicate axes and make sure the first index in eval_op_indices\n    // is increasing. Using O(n^2) sorting is OK since ContractDims is small\n    for (int i = 0; i < ContractDims; i++) {\n      for (int j = i + 1; j < ContractDims; j++) {\n        eigen_assert(eval_op_indices[j].first != eval_op_indices[i].first &&\n                     eval_op_indices[j].second != eval_op_indices[i].second &&\n                     \"contraction axes should be unique\");\n        if (eval_op_indices[j].first < eval_op_indices[i].first) {\n          numext::swap(eval_op_indices[j], eval_op_indices[i]);\n        }\n      }\n    }\n\n    array<Index, LDims> lhs_strides;\n    lhs_strides[0] = 1;\n    for (int i = 0; i < LDims-1; ++i) {\n      lhs_strides[i+1] = lhs_strides[i] * eval_left_dims[i];\n    }\n\n    array<Index, RDims> rhs_strides;\n    rhs_strides[0] = 1;\n    for (int i = 0; i < RDims-1; ++i) {\n      rhs_strides[i+1] = rhs_strides[i] * eval_right_dims[i];\n    }\n\n    if (m_i_strides.size() > 0) m_i_strides[0] = 1;\n    if (m_j_strides.size() > 0) m_j_strides[0] = 1;\n    if (m_k_strides.size() > 0) m_k_strides[0] = 1;\n\n    m_i_size = 1;\n    m_j_size = 1;\n    m_k_size = 1;\n\n    // To compute the dimension, we simply concatenate the non-contracting\n    // dimensions of the left and then the right tensor. Additionally, we also\n    // compute the strides corresponding to the left non-contracting\n    // dimensions and right non-contracting dimensions.\n    m_lhs_inner_dim_contiguous = true;\n    int dim_idx = 0;\n    Index nocontract_idx = 0;\n\n    for (int i = 0; i < LDims; i++) {\n      // find if we are contracting on index i of left tensor\n      bool contracting = false;\n      for (int j = 0; j < ContractDims; j++) {\n        if (eval_op_indices[j].first == i) {\n          contracting = true;\n          break;\n        }\n      }\n      if (!contracting) {\n        // add dimension size to output dimensions\n        m_dimensions[dim_idx] = eval_left_dims[i];\n        m_left_nocontract_strides[nocontract_idx] = lhs_strides[i];\n        if (dim_idx != i) {\n          m_lhs_inner_dim_contiguous = false;\n        }\n        if (nocontract_idx+1 < internal::array_size<left_nocontract_t>::value) {\n          m_i_strides[nocontract_idx+1] =\n              m_i_strides[nocontract_idx] * eval_left_dims[i];\n        } else {\n          m_i_size = m_i_strides[nocontract_idx] * eval_left_dims[i];\n        }\n        dim_idx++;\n        nocontract_idx++;\n      }\n    }\n\n    nocontract_idx = 0;\n    for (int i = 0; i < RDims; i++) {\n      bool contracting = false;\n      // find if we are contracting on index i of right tensor\n      for (int j = 0; j < ContractDims; j++) {\n        if (eval_op_indices[j].second == i) {\n          contracting = true;\n          break;\n        }\n      }\n      if (!contracting) {\n        m_dimensions[dim_idx] = eval_right_dims[i];\n        if (nocontract_idx+1 < internal::array_size<right_nocontract_t>::value) {\n          m_j_strides[nocontract_idx+1] =\n              m_j_strides[nocontract_idx] * eval_right_dims[i];\n        } else {\n          m_j_size = m_j_strides[nocontract_idx] * eval_right_dims[i];\n        }\n        m_right_nocontract_strides[nocontract_idx] = rhs_strides[i];\n        dim_idx++;\n        nocontract_idx++;\n      }\n    }\n\n    // Now compute the strides corresponding to the contracting dimensions. We\n    // assumed above that non-contracting axes are represented in the same order\n    // in the matrix as they are in the tensor. This is not the case for\n    // contracting axes. As the contracting axes must be of the same size in\n    // each tensor, we'll only look at the first tensor here.\n    m_rhs_inner_dim_contiguous = true;\n    m_rhs_inner_dim_reordered = false;\n    for (int i = 0; i < ContractDims; i++) {\n      Index left = eval_op_indices[i].first;\n      Index right = eval_op_indices[i].second;\n\n      Index size = eval_left_dims[left];\n      eigen_assert(size == eval_right_dims[right] &&\n                   \"Contraction axes must be same size\");\n\n      if (i+1 < static_cast<int>(internal::array_size<contract_t>::value)) {\n        m_k_strides[i+1] = m_k_strides[i] * size;\n      } else {\n        m_k_size = m_k_strides[i] * size;\n      }\n      m_left_contracting_strides[i] = lhs_strides[left];\n      m_right_contracting_strides[i] = rhs_strides[right];\n\n      if (i > 0 && right < eval_op_indices[i-1].second) {\n        m_rhs_inner_dim_reordered = true;\n      }\n      if (right != i) {\n        m_rhs_inner_dim_contiguous = false;\n      }\n    }\n\n    // If the layout is RowMajor, we need to reverse the m_dimensions\n    if (static_cast<int>(Layout) == static_cast<int>(RowMajor)) {\n      for (int i = 0, j = NumDims - 1; i < j; i++, j--) {\n        numext::swap(m_dimensions[i], m_dimensions[j]);\n      }\n    }\n\n    // A set of parameters that will allow output kernel to get from output\n    // tensor dimensions (i, j) into the original tensor dimensions.\n    // TODO(ezhulenev): Add parameters required to infer output tensor index for\n    // more complex contractions than 2x2 on internal dimension.\n    m_tensor_contraction_params.swapped_arguments = static_cast<int>(Layout) == RowMajor;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions& dimensions() const { return m_dimensions; }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType data) {\n    m_leftImpl.evalSubExprsIfNeeded(NULL);\n    m_rightImpl.evalSubExprsIfNeeded(NULL);\n    if (data) {\n      evalTo(data);\n      return false;\n    } else {\n      m_result = static_cast<EvaluatorPointerType>(m_device.allocate(dimensions().TotalSize() * sizeof(Scalar)));\n      evalTo(m_result);\n      return true;\n    }\n  }\n\n#ifdef EIGEN_USE_THREADS\n  template <typename EvalSubExprsCallback>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalSubExprsIfNeededAsync(\n      EvaluatorPointerType dest, EvalSubExprsCallback done) {\n    m_leftImpl.evalSubExprsIfNeededAsync(nullptr, [this, done, dest](bool) {\n      m_rightImpl.evalSubExprsIfNeededAsync(nullptr, [this, done, dest](bool) {\n        if (dest) {\n          evalToAsync(dest, [done]() { done(false); });\n        } else {\n          m_result = static_cast<EvaluatorPointerType>(\n              m_device.allocate(dimensions().TotalSize() * sizeof(Scalar)));\n          evalToAsync(m_result, [done]() { done(true); });\n        }\n      });\n    });\n  }\n#endif  // EIGEN_USE_THREADS\n\n#define TENSOR_CONTRACTION_DISPATCH(METHOD, ALIGNMENT, ARGS) \\\n  if (this->m_lhs_inner_dim_contiguous) {                    \\\n    if (this->m_rhs_inner_dim_contiguous) {                  \\\n      if (this->m_rhs_inner_dim_reordered) {                 \\\n        METHOD<true, true, true, ALIGNMENT> ARGS;            \\\n      } else {                                               \\\n        METHOD<true, true, false, ALIGNMENT> ARGS;           \\\n      }                                                      \\\n    } else {                                                 \\\n      if (this->m_rhs_inner_dim_reordered) {                 \\\n        METHOD<true, false, true, ALIGNMENT> ARGS;           \\\n      } else {                                               \\\n        METHOD<true, false, false, ALIGNMENT> ARGS;          \\\n      }                                                      \\\n    }                                                        \\\n  } else {                                                   \\\n    if (this->m_rhs_inner_dim_contiguous) {                  \\\n      if (this->m_rhs_inner_dim_reordered) {                 \\\n        METHOD<false, true, true, ALIGNMENT> ARGS;           \\\n      } else {                                               \\\n        METHOD<false, true, false, ALIGNMENT> ARGS;          \\\n      }                                                      \\\n    } else {                                                 \\\n      if (this->m_rhs_inner_dim_reordered) {                 \\\n        METHOD<false, false, true, ALIGNMENT> ARGS;          \\\n      } else {                                               \\\n        METHOD<false, false, false, ALIGNMENT> ARGS;         \\\n      }                                                      \\\n    }                                                        \\\n  }\n\n#define TENSOR_CONTRACTION_ASYNC_DISPATCH(METHOD, DONE, ALIGNMENT, ARGS, FN) \\\n  if (this->m_lhs_inner_dim_contiguous) {                                    \\\n    if (this->m_rhs_inner_dim_contiguous) {                                  \\\n      if (this->m_rhs_inner_dim_reordered) {                                 \\\n        (new METHOD<DONE, true, true, true, ALIGNMENT> ARGS)->FN;            \\\n      } else {                                                               \\\n        (new METHOD<DONE, true, true, false, ALIGNMENT> ARGS)->FN;           \\\n      }                                                                      \\\n    } else {                                                                 \\\n      if (this->m_rhs_inner_dim_reordered) {                                 \\\n        (new METHOD<DONE, true, false, true, ALIGNMENT> ARGS)->FN;           \\\n      } else {                                                               \\\n        (new METHOD<DONE, true, false, false, ALIGNMENT> ARGS)->FN;          \\\n      }                                                                      \\\n    }                                                                        \\\n  } else {                                                                   \\\n    if (this->m_rhs_inner_dim_contiguous) {                                  \\\n      if (this->m_rhs_inner_dim_reordered) {                                 \\\n        (new METHOD<DONE, false, true, true, ALIGNMENT> ARGS)->FN;           \\\n      } else {                                                               \\\n        (new METHOD<DONE, false, true, false, ALIGNMENT> ARGS)->FN;          \\\n      }                                                                      \\\n    } else {                                                                 \\\n      if (this->m_rhs_inner_dim_reordered) {                                 \\\n        (new METHOD<DONE, false, false, true, ALIGNMENT> ARGS)->FN;          \\\n      } else {                                                               \\\n        (new METHOD<DONE, false, false, false, ALIGNMENT> ARGS)->FN;         \\\n      }                                                                      \\\n    }                                                                        \\\n  }\n\n  EIGEN_DEVICE_FUNC void evalTo(Scalar* buffer) const {\n   static_cast<const Derived*>(this)->template evalProduct<Unaligned>(buffer);\n  }\n\n#ifdef EIGEN_USE_THREADS\n  template <typename EvalToCallback>\n  void evalToAsync(Scalar* buffer, EvalToCallback done) const {\n    static_cast<const Derived*>(this)\n        ->template evalProductAsync<EvalToCallback, Unaligned>(buffer,\n                                                               std::move(done));\n  }\n#endif  // EIGEN_USE_THREADS\n\n  template <bool lhs_inner_dim_contiguous, bool rhs_inner_dim_contiguous,\n            bool rhs_inner_dim_reordered, int Alignment>\n  void evalProductSequential(Scalar* buffer) const {\n    if (this->m_j_size == 1) {\n      this->template evalGemv<lhs_inner_dim_contiguous,\n                              rhs_inner_dim_contiguous, rhs_inner_dim_reordered,\n                              Alignment>(buffer);\n    } else {\n      this->template evalGemm<lhs_inner_dim_contiguous, rhs_inner_dim_contiguous,\n                              rhs_inner_dim_reordered, Alignment>(buffer);\n    }\n  }\n\n  template <bool lhs_inner_dim_contiguous, bool rhs_inner_dim_contiguous, bool rhs_inner_dim_reordered, int Alignment>\n  #if !defined(EIGEN_HIPCC)\n  EIGEN_DEVICE_FUNC\n  #endif\n  void evalGemv(Scalar* buffer) const {\n    const Index rows = m_i_size;\n    const Index cols = m_k_size;\n\n    typedef typename internal::remove_const<typename EvalLeftArgType::Scalar>::type LhsScalar;\n    typedef typename internal::remove_const<typename EvalRightArgType::Scalar>::type RhsScalar;\n    typedef TensorEvaluator<EvalLeftArgType, Device> LeftEvaluator;\n    typedef TensorEvaluator<EvalRightArgType, Device> RightEvaluator;\n    const Index lhs_packet_size = internal::unpacket_traits<typename LeftEvaluator::PacketReturnType>::size;\n    const Index rhs_packet_size = internal::unpacket_traits<typename RightEvaluator::PacketReturnType>::size;\n    const int lhs_alignment = LeftEvaluator::IsAligned ? Aligned : Unaligned;\n    const int rhs_alignment = RightEvaluator::IsAligned ? Aligned : Unaligned;\n    typedef internal::TensorContractionInputMapper<LhsScalar, Index, internal::Lhs,\n                                                   LeftEvaluator, left_nocontract_t,\n                                                   contract_t, lhs_packet_size,\n                                                   lhs_inner_dim_contiguous,\n                                                   false, lhs_alignment> LhsMapper;\n\n    typedef internal::TensorContractionInputMapper<RhsScalar, Index, internal::Rhs,\n                                                   RightEvaluator, right_nocontract_t,\n                                                   contract_t, rhs_packet_size,\n                                                   rhs_inner_dim_contiguous,\n                                                   rhs_inner_dim_reordered, rhs_alignment> RhsMapper;\n\n    LhsMapper lhs(m_leftImpl, m_left_nocontract_strides, m_i_strides,\n                  m_left_contracting_strides, m_k_strides);\n    RhsMapper rhs(m_rightImpl, m_right_nocontract_strides, m_j_strides,\n                  m_right_contracting_strides, m_k_strides);\n\n    const Scalar alpha(1);\n    const Index resIncr(1);\n\n    // zero out the result buffer (which must be of size at least rows * sizeof(Scalar)\n    m_device.memset(buffer, 0, rows * sizeof(Scalar));\n\n    internal::general_matrix_vector_product<Index,LhsScalar,LhsMapper,ColMajor,false,RhsScalar,RhsMapper,false>::run(\n        rows, cols, lhs, rhs,\n        buffer, resIncr, alpha);\n\n    typedef internal::blas_data_mapper<Scalar, Index, ColMajor> OutputMapper;\n    m_output_kernel(OutputMapper(buffer, rows), m_tensor_contraction_params,\n                    static_cast<Index>(0), static_cast<Index>(0), rows,\n                    static_cast<Index>(1));\n  }\n\n  template <bool lhs_inner_dim_contiguous, bool rhs_inner_dim_contiguous, bool rhs_inner_dim_reordered, int Alignment>\n  #if !defined(EIGEN_HIPCC)\n  EIGEN_DEVICE_FUNC\n  #endif\n  void evalGemm(Scalar* buffer) const {\n    // columns in left side, rows in right side\n    const Index k = this->m_k_size;\n    this->template evalGemmPartial<lhs_inner_dim_contiguous,\n                                   rhs_inner_dim_contiguous,\n                                   rhs_inner_dim_reordered,\n                                   Alignment, true>(buffer, 0, k, 1);\n  }\n\n  template <bool lhs_inner_dim_contiguous, bool rhs_inner_dim_contiguous,\n      bool rhs_inner_dim_reordered, int Alignment>\n  EIGEN_DEVICE_FUNC void evalGemmPartialWithoutOutputKernel(\n      Scalar* buffer, Index k_start, Index k_end, int num_threads) const {\n    evalGemmPartial<lhs_inner_dim_contiguous, rhs_inner_dim_contiguous,\n                    rhs_inner_dim_reordered, Alignment,\n        /*use_output_kernel*/ false>(buffer, k_start, k_end,\n                                     num_threads);\n  }\n\n  template <bool lhs_inner_dim_contiguous, bool rhs_inner_dim_contiguous, bool rhs_inner_dim_reordered, int Alignment, bool use_output_kernel>\n  EIGEN_DEVICE_FUNC void evalGemmPartial(Scalar* buffer, Index k_start, Index k_end, int num_threads) const {\n    eigen_assert(k_end >= k_start && k_start >= 0 && k_end <= this->m_k_size);\n    // columns in slice on left side, rows on right side\n    const Index k_slice = k_end - k_start;\n\n    // rows in left side\n    const Index m = this->m_i_size;\n\n    // columns in right side\n    const Index n = this->m_j_size;\n\n    // define data mappers for Lhs and Rhs\n    typedef typename internal::remove_const<typename EvalLeftArgType::Scalar>::type LhsScalar;\n    typedef typename internal::remove_const<typename EvalRightArgType::Scalar>::type RhsScalar;\n\n    typedef TensorEvaluator<EvalLeftArgType, Device> LeftEvaluator;\n    typedef TensorEvaluator<EvalRightArgType, Device> RightEvaluator;\n\n    const Index lhs_packet_size = internal::unpacket_traits<typename LeftEvaluator::PacketReturnType>::size;\n    const Index rhs_packet_size = internal::unpacket_traits<typename RightEvaluator::PacketReturnType>::size;\n\n    typedef internal::TensorContractionInputMapper<LhsScalar, Index, internal::Lhs,\n                                                   LeftEvaluator, left_nocontract_t,\n                                                   contract_t, lhs_packet_size,\n                                                   lhs_inner_dim_contiguous,\n                                                   false, Unaligned> LhsMapper;\n\n    typedef internal::TensorContractionInputMapper<RhsScalar, Index, internal::Rhs,\n                                                   RightEvaluator, right_nocontract_t,\n                                                   contract_t, rhs_packet_size,\n                                                   rhs_inner_dim_contiguous,\n                                                   rhs_inner_dim_reordered, Unaligned> RhsMapper;\n\n    typedef internal::blas_data_mapper<Scalar, Index, ColMajor> OutputMapper;\n\n    typedef internal::TensorContractionKernel<\n        Scalar, LhsScalar, RhsScalar, Index, OutputMapper, LhsMapper, RhsMapper>\n        TensorContractionKernel;\n\n    // initialize data mappers\n    LhsMapper lhs(this->m_leftImpl, this->m_left_nocontract_strides, this->m_i_strides,\n                  this->m_left_contracting_strides, this->m_k_strides);\n\n    RhsMapper rhs(this->m_rightImpl, this->m_right_nocontract_strides, this->m_j_strides,\n                  this->m_right_contracting_strides, this->m_k_strides);\n\n    OutputMapper output(buffer, m);\n\n    // Sizes of the blocks to load in cache. See the Goto paper for details.\n    internal::TensorContractionBlocking<Scalar, LhsScalar, RhsScalar,\n                                        Index, internal::ShardByCol>\n        blocking(k_slice, m, n, num_threads);\n    const Index kc = blocking.kc();\n    const Index mc = numext::mini(m, blocking.mc());\n    const Index nc = numext::mini(n, blocking.nc());\n\n    typedef typename TensorContractionKernel::LhsBlock LhsBlock;\n    typedef typename TensorContractionKernel::RhsBlock RhsBlock;\n\n    LhsBlock blockA;\n    RhsBlock blockB;\n\n    TensorContractionKernel kernel(m, k_slice, n, mc, kc, nc);\n\n    typedef typename TensorContractionKernel::BlockMemHandle BlockMemHandle;\n    const BlockMemHandle packed_mem =\n        kernel.allocate(this->m_device, &blockA, &blockB);\n\n    // If a contraction kernel does not support beta, explicitly initialize\n    // output buffer with zeroes.\n    if (!TensorContractionKernel::HasBeta) {\n      this->m_device.memset(buffer, 0, m * n * sizeof(Scalar));\n    }\n\n    for(Index i2=0; i2<m; i2+=mc)\n    {\n      const Index actual_mc = numext::mini(i2+mc,m)-i2;\n      for (Index k2 = k_start; k2 < k_end; k2 += kc) {\n        // make sure we don't overshoot right edge of left matrix, then pack vertical panel\n        const Index actual_kc = numext::mini(k2 + kc, k_end) - k2;\n        kernel.packLhs(&blockA, lhs.getSubMapper(i2, k2), actual_kc, actual_mc);\n\n        // If kernel supports beta, there is no need to initialize output\n        // buffer with zeroes.\n        const Scalar alpha = Scalar(1);\n        const Scalar beta = (TensorContractionKernel::HasBeta && k2 == k_start)\n                                ? Scalar(0)\n                                : Scalar(1);\n\n        // series of horizontal blocks\n        for (Index j2 = 0; j2 < n; j2 += nc) {\n          // make sure we don't overshoot right edge of right matrix, then pack block\n          const Index actual_nc = numext::mini(j2 + nc, n) - j2;\n          kernel.packRhs(&blockB, rhs.getSubMapper(k2, j2), actual_kc,\n                         actual_nc);\n\n          // call gebp (matrix kernel)\n          // The parameters here are copied from Eigen's GEMM implementation\n          const OutputMapper output_mapper = output.getSubMapper(i2, j2);\n          kernel.invoke(output_mapper, blockA, blockB, actual_mc, actual_kc,\n                        actual_nc, alpha, beta);\n\n          // We are done with this [i2, j2] output block.\n          if (use_output_kernel && k2 + kc >= k_end) {\n            m_output_kernel(output_mapper, m_tensor_contraction_params, i2, j2,\n                            actual_mc, actual_nc);\n          }\n        }\n      }\n    }\n\n    kernel.deallocate(this->m_device, packed_mem);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {\n    m_leftImpl.cleanup();\n    m_rightImpl.cleanup();\n\n    if (m_result != NULL) {\n      m_device.deallocate(m_result);\n      m_result = NULL;\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const {\n    return m_result[index];\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool) const {\n    return TensorOpCost(sizeof(CoeffReturnType), 0, 0);\n  }\n\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const {\n    return internal::ploadt<PacketReturnType, LoadMode>(m_result + index);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EvaluatorPointerType data() const { return m_result; }\n\nprotected:\n  // Prevent assignment\n  TensorContractionEvaluatorBase& operator = (const TensorContractionEvaluatorBase&);\n  Dimensions m_dimensions;\n\n  contract_t m_k_strides;\n  contract_t m_left_contracting_strides;\n  contract_t m_right_contracting_strides;\n\n  bool m_lhs_inner_dim_contiguous;\n  bool m_rhs_inner_dim_contiguous;\n  bool m_rhs_inner_dim_reordered;\n\n  left_nocontract_t m_i_strides;\n  right_nocontract_t m_j_strides;\n  left_nocontract_t m_left_nocontract_strides;\n  right_nocontract_t m_right_nocontract_strides;\n\n  Index m_i_size;\n  Index m_j_size;\n  Index m_k_size;\n\n  TensorContractionParams m_tensor_contraction_params;\n\n  TensorEvaluator<EvalLeftArgType, Device> m_leftImpl;\n  TensorEvaluator<EvalRightArgType, Device> m_rightImpl;\n  const Device EIGEN_DEVICE_REF m_device;\n  OutputKernelType m_output_kernel;\n  EvaluatorPointerType m_result;\n};\n\n\n// evaluator for default device\ntemplate<typename Indices, typename LeftArgType, typename RightArgType, typename OutputKernelType, typename Device>\nstruct TensorEvaluator<const TensorContractionOp<Indices, LeftArgType, RightArgType, OutputKernelType>, Device> :\n    public TensorContractionEvaluatorBase<\n      TensorEvaluator<const TensorContractionOp<Indices, LeftArgType, RightArgType, OutputKernelType>, Device> > {\n  typedef TensorEvaluator<const TensorContractionOp<Indices, LeftArgType, RightArgType, OutputKernelType>, Device> Self;\n  typedef TensorContractionEvaluatorBase<Self> Base;\n\n  typedef TensorContractionOp<Indices, LeftArgType, RightArgType, OutputKernelType> XprType;\n  typedef typename internal::remove_const<typename XprType::Scalar>::type Scalar;\n  typedef typename XprType::Index Index;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n\n  enum {\n    Layout = TensorEvaluator<LeftArgType, Device>::Layout\n  };\n\n  // Most of the code is assuming that both input tensors are ColMajor. If the\n  // inputs are RowMajor, we will \"cheat\" by swapping the LHS and RHS:\n  // If we want to compute A * B = C, where A is LHS and B is RHS, the code\n  // will pretend B is LHS and A is RHS.\n  typedef typename internal::conditional<\n    static_cast<int>(Layout) == static_cast<int>(ColMajor), LeftArgType, RightArgType>::type EvalLeftArgType;\n  typedef typename internal::conditional<\n    static_cast<int>(Layout) == static_cast<int>(ColMajor), RightArgType, LeftArgType>::type EvalRightArgType;\n\n  static const int LDims =\n      internal::array_size<typename TensorEvaluator<EvalLeftArgType, Device>::Dimensions>::value;\n  static const int RDims =\n      internal::array_size<typename TensorEvaluator<EvalRightArgType, Device>::Dimensions>::value;\n  static const int ContractDims = internal::array_size<Indices>::value;\n\n  typedef array<Index, ContractDims> contract_t;\n  typedef array<Index, LDims - ContractDims> left_nocontract_t;\n  typedef array<Index, RDims - ContractDims> right_nocontract_t;\n\n  static const int NumDims = LDims + RDims - 2 * ContractDims;\n\n  // Could we use NumDimensions here?\n  typedef DSizes<Index, NumDims> Dimensions;\n\n  EIGEN_DEVICE_FUNC TensorEvaluator(const XprType& op, const Device& device) :\n      Base(op, device) { }\n\n  template <int Alignment>\n  void evalProduct(Scalar* buffer) const {\n    TENSOR_CONTRACTION_DISPATCH(this->template evalProductSequential, Alignment, (buffer));\n  }\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_CONTRACTION_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorContractionBlocking.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_CONTRACTION_BLOCKING_H\n#define EIGEN_CXX11_TENSOR_TENSOR_CONTRACTION_BLOCKING_H\n\n\nnamespace Eigen {\nnamespace internal {\n\nenum {\n  ShardByRow = 0,\n  ShardByCol = 1\n};\n\n\n// Default Blocking Strategy\ntemplate<typename ResScalar, typename LhsScalar, typename RhsScalar, typename StorageIndex, int ShardingType = ShardByCol>\nclass TensorContractionBlocking {\n public:\n\n /*\n   adding EIGEN_DEVICE_FUNC unconditionally to 'TensorContractionBlocking' constructor in `TensorContractionBlocking.h`\n     requires adding EIGEN_DEVICE_FUNC to `computeProductBlockingSizes` in `GeneralBlockPanelKernel.h`\n     which in turn, requires adding EIGEN_DEVICE_FUNC to `evaluateProductBlockingSizesHeuristic` in `GeneralBlockPanelKernel.h`\n     which in turn, requires adding EIGEN_DEVICE_FUNC to `manage_caching_sizes` in `GeneralBlockPanelKernel.h`\n     (else HIPCC will error out)\n\n   However adding EIGEN_DEVICE_FUNC to `manage_caching_sizes` in `GeneralBlockPanelKernel.h`\n   results in NVCC erroring out with the following error\n\n   ../Eigen/src/Core/products/GeneralBlockPanelKernel.h(57): error #2901:\n      dynamic initialization is not supported for function-scope static variables within a __device__/__global__ function\n */\n\n  #if !defined(EIGEN_HIPCC)\n  EIGEN_DEVICE_FUNC\n  #endif\n TensorContractionBlocking(StorageIndex k, StorageIndex m, StorageIndex n, StorageIndex num_threads = 1) :\n      kc_(k), mc_(m), nc_(n)\n  {\n    if (ShardingType == ShardByCol) {\n      computeProductBlockingSizes<LhsScalar, RhsScalar, 1>(kc_, mc_, nc_, num_threads);\n    }\n    else {\n      computeProductBlockingSizes<LhsScalar, RhsScalar, 1>(kc_, nc_, mc_, num_threads);\n    }\n\n    const int rhs_packet_size = internal::packet_traits<RhsScalar>::size;\n    kc_ = (rhs_packet_size <= 8 || kc_ <= rhs_packet_size) ?\n      kc_ : (kc_ / rhs_packet_size) * rhs_packet_size;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE StorageIndex kc() const { return kc_; }\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE StorageIndex mc() const { return mc_; }\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE StorageIndex nc() const { return nc_; }\n\n private:\n  StorageIndex kc_;\n  StorageIndex mc_;\n  StorageIndex nc_;\n};\n\n} // end namespace internal\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_CONTRACTION_BLOCKING_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorContractionCuda.h",
    "content": "\n#if defined(__clang__) || defined(__GNUC__)\n#warning \"Deprecated header file, please either include the main Eigen/CXX11/Tensor header or the respective TensorContractionGpu.h file\"\n#endif\n\n#include \"TensorContractionGpu.h\"\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorContractionGpu.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014-2015 Benoit Steiner <benoit.steiner.goog@gmail.com>\n// Copyright (C) 2015 Navdeep Jaitly <ndjaitly@google.com>\n// Copyright (C) 2014 Eric Martin <eric@ericmart.in>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_CONTRACTION_GPU_H\n#define EIGEN_CXX11_TENSOR_TENSOR_CONTRACTION_GPU_H\n\n#if defined(EIGEN_USE_GPU) && defined(EIGEN_GPUCC)\n\nnamespace Eigen {\n\ntemplate<typename Scalar, typename Index, typename LhsMapper,\n         typename RhsMapper, typename OutputMapper, bool needs_edge_check>\n__device__ EIGEN_STRONG_INLINE void\nEigenContractionKernelInternal(const LhsMapper lhs, const RhsMapper rhs,\n                               const OutputMapper output, Scalar* lhs_shmem, Scalar* rhs_shmem,\n                       const Index m_size, const Index n_size, const Index k_size) {\n\n  const Index m_block_idx = blockIdx.x;\n  const Index n_block_idx = blockIdx.y;\n\n  const Index base_m = 64 * m_block_idx;\n  const Index base_n = 64 * n_block_idx;\n\n  // declare and initialize 64 registers for output 8x8 block\n\n  // prefetch registers\n  Scalar lhs_pf0;\n  Scalar lhs_pf1;\n  Scalar lhs_pf2;\n  Scalar lhs_pf3;\n  Scalar lhs_pf4;\n  Scalar lhs_pf5;\n  Scalar lhs_pf6;\n  Scalar lhs_pf7;\n\n  Scalar rhs_pf0;\n  Scalar rhs_pf1;\n  Scalar rhs_pf2;\n  Scalar rhs_pf3;\n  Scalar rhs_pf4;\n  Scalar rhs_pf5;\n  Scalar rhs_pf6;\n  Scalar rhs_pf7;\n\n  // shared memory is formatted\n  // (contract idx in block, nocontract idx in block, block idx)\n  // where block idx is column major. This transposition limits the number of\n  // bank conflicts when reading the LHS. The core idea is that since the contracting\n  // index is shared by both sides, then the contracting index should be in threadIdx.x.\n\n  // On the LHS, we pad each row inside of each block with an extra element. This makes\n  // each block 8 rows of 9 elements, which is 72 elements. This gives no bank conflicts\n  // on writes and very few 2-way conflicts on reads. There is an 8x8 grid of these blocks.\n\n  // On the RHS we just add 8 padding elements to the end of each block. This gives no bank\n  // conflicts on writes and also none on reads.\n\n  // storage indices\n  const Index lhs_store_idx_base = threadIdx.y * 72 + threadIdx.x * 9 + threadIdx.z;\n  const Index rhs_store_idx_base = threadIdx.y * 72 + threadIdx.z * 8 + threadIdx.x;\n\n  const Index lhs_store_idx_0 = lhs_store_idx_base + 576 * 0;\n  const Index lhs_store_idx_1 = lhs_store_idx_base + 576 * 1;\n  const Index lhs_store_idx_2 = lhs_store_idx_base + 576 * 2;\n  const Index lhs_store_idx_3 = lhs_store_idx_base + 576 * 3;\n  const Index lhs_store_idx_4 = lhs_store_idx_base + 576 * 4;\n  const Index lhs_store_idx_5 = lhs_store_idx_base + 576 * 5;\n  const Index lhs_store_idx_6 = lhs_store_idx_base + 576 * 6;\n  const Index lhs_store_idx_7 = lhs_store_idx_base + 576 * 7;\n\n  const Index rhs_store_idx_0 = rhs_store_idx_base + 576 * 0;\n  const Index rhs_store_idx_1 = rhs_store_idx_base + 576 * 1;\n  const Index rhs_store_idx_2 = rhs_store_idx_base + 576 * 2;\n  const Index rhs_store_idx_3 = rhs_store_idx_base + 576 * 3;\n  const Index rhs_store_idx_4 = rhs_store_idx_base + 576 * 4;\n  const Index rhs_store_idx_5 = rhs_store_idx_base + 576 * 5;\n  const Index rhs_store_idx_6 = rhs_store_idx_base + 576 * 6;\n  const Index rhs_store_idx_7 = rhs_store_idx_base + 576 * 7;\n\n  // in the loading code, the following variables are important:\n  // threadIdx.x: the vertical position in an 8x8 block\n  // threadIdx.y: the vertical index of the 8x8 block in the grid\n  // threadIdx.z: the horizontal position in an 8x8 block\n  // k: the horizontal index of the 8x8 block in the grid\n  //\n  // The k parameter is implicit (it was the loop counter for a loop that went\n  // from 0 to <8, but now that loop is unrolled in the below code.\n\n  const Index load_idx_vert = threadIdx.x + 8 * threadIdx.y;\n  const Index lhs_vert = base_m + load_idx_vert;\n\n#define prefetchIntoRegisters(base_k)                           \\\n  {                                                             \\\n    lhs_pf0 = conv(0);                                          \\\n    lhs_pf1 = conv(0);                                          \\\n    lhs_pf2 = conv(0);                                          \\\n    lhs_pf3 = conv(0);                                          \\\n    lhs_pf4 = conv(0);                                          \\\n    lhs_pf5 = conv(0);                                          \\\n    lhs_pf6 = conv(0);                                          \\\n    lhs_pf7 = conv(0);                                          \\\n                                                                \\\n    rhs_pf0 = conv(0);                                          \\\n    rhs_pf1 = conv(0);                                          \\\n    rhs_pf2 = conv(0);                                          \\\n    rhs_pf3 = conv(0);                                          \\\n    rhs_pf4 = conv(0);                                          \\\n    rhs_pf5 = conv(0);                                          \\\n    rhs_pf6 = conv(0);                                          \\\n    rhs_pf7 = conv(0);                                          \\\n                                                                \\\n    if (!needs_edge_check || lhs_vert < m_size) {               \\\n      const Index lhs_horiz_0 = base_k + threadIdx.z + 0 * 8;   \\\n      const Index lhs_horiz_1 = base_k + threadIdx.z + 1 * 8;   \\\n      const Index lhs_horiz_2 = base_k + threadIdx.z + 2 * 8;   \\\n      const Index lhs_horiz_3 = base_k + threadIdx.z + 3 * 8;   \\\n      const Index lhs_horiz_4 = base_k + threadIdx.z + 4 * 8;   \\\n      const Index lhs_horiz_5 = base_k + threadIdx.z + 5 * 8;   \\\n      const Index lhs_horiz_6 = base_k + threadIdx.z + 6 * 8;   \\\n      const Index lhs_horiz_7 = base_k + threadIdx.z + 7 * 8;   \\\n                                                                \\\n      if (!needs_edge_check || lhs_horiz_7 < k_size) {          \\\n        lhs_pf0 = lhs(lhs_vert, lhs_horiz_0);                   \\\n        lhs_pf1 = lhs(lhs_vert, lhs_horiz_1);                   \\\n        lhs_pf2 = lhs(lhs_vert, lhs_horiz_2);                   \\\n        lhs_pf3 = lhs(lhs_vert, lhs_horiz_3);                   \\\n        lhs_pf4 = lhs(lhs_vert, lhs_horiz_4);                   \\\n        lhs_pf5 = lhs(lhs_vert, lhs_horiz_5);                   \\\n        lhs_pf6 = lhs(lhs_vert, lhs_horiz_6);                   \\\n        lhs_pf7 = lhs(lhs_vert, lhs_horiz_7);                   \\\n      } else if (lhs_horiz_6 < k_size) {                        \\\n        lhs_pf0 = lhs(lhs_vert, lhs_horiz_0);                   \\\n        lhs_pf1 = lhs(lhs_vert, lhs_horiz_1);                   \\\n        lhs_pf2 = lhs(lhs_vert, lhs_horiz_2);                   \\\n        lhs_pf3 = lhs(lhs_vert, lhs_horiz_3);                   \\\n        lhs_pf4 = lhs(lhs_vert, lhs_horiz_4);                   \\\n        lhs_pf5 = lhs(lhs_vert, lhs_horiz_5);                   \\\n        lhs_pf6 = lhs(lhs_vert, lhs_horiz_6);                   \\\n      } else if (lhs_horiz_5 < k_size) {                        \\\n        lhs_pf0 = lhs(lhs_vert, lhs_horiz_0);                   \\\n        lhs_pf1 = lhs(lhs_vert, lhs_horiz_1);                   \\\n        lhs_pf2 = lhs(lhs_vert, lhs_horiz_2);                   \\\n        lhs_pf3 = lhs(lhs_vert, lhs_horiz_3);                   \\\n        lhs_pf4 = lhs(lhs_vert, lhs_horiz_4);                   \\\n        lhs_pf5 = lhs(lhs_vert, lhs_horiz_5);                   \\\n      } else if (lhs_horiz_4 < k_size) {                        \\\n        lhs_pf0 = lhs(lhs_vert, lhs_horiz_0);                   \\\n        lhs_pf1 = lhs(lhs_vert, lhs_horiz_1);                   \\\n        lhs_pf2 = lhs(lhs_vert, lhs_horiz_2);                   \\\n        lhs_pf3 = lhs(lhs_vert, lhs_horiz_3);                   \\\n        lhs_pf4 = lhs(lhs_vert, lhs_horiz_4);                   \\\n      } else if (lhs_horiz_3 < k_size) {                        \\\n        lhs_pf0 = lhs(lhs_vert, lhs_horiz_0);                   \\\n        lhs_pf1 = lhs(lhs_vert, lhs_horiz_1);                   \\\n        lhs_pf2 = lhs(lhs_vert, lhs_horiz_2);                   \\\n        lhs_pf3 = lhs(lhs_vert, lhs_horiz_3);                   \\\n      } else if (lhs_horiz_2 < k_size) {                        \\\n        lhs_pf0 = lhs(lhs_vert, lhs_horiz_0);                   \\\n        lhs_pf1 = lhs(lhs_vert, lhs_horiz_1);                   \\\n        lhs_pf2 = lhs(lhs_vert, lhs_horiz_2);                   \\\n      } else if (lhs_horiz_1 < k_size) {                        \\\n        lhs_pf0 = lhs(lhs_vert, lhs_horiz_0);                   \\\n        lhs_pf1 = lhs(lhs_vert, lhs_horiz_1);                   \\\n      } else if (lhs_horiz_0 < k_size) {                        \\\n        lhs_pf0 = lhs(lhs_vert, lhs_horiz_0);                   \\\n      }                                                         \\\n    }                                                           \\\n                                                                \\\n    const Index rhs_vert = base_k + load_idx_vert;              \\\n    if (!needs_edge_check || rhs_vert < k_size) {               \\\n      const Index rhs_horiz_0 = base_n + threadIdx.z + 0 * 8;   \\\n      const Index rhs_horiz_1 = base_n + threadIdx.z + 1 * 8;   \\\n      const Index rhs_horiz_2 = base_n + threadIdx.z + 2 * 8;   \\\n      const Index rhs_horiz_3 = base_n + threadIdx.z + 3 * 8;   \\\n      const Index rhs_horiz_4 = base_n + threadIdx.z + 4 * 8;   \\\n      const Index rhs_horiz_5 = base_n + threadIdx.z + 5 * 8;   \\\n      const Index rhs_horiz_6 = base_n + threadIdx.z + 6 * 8;   \\\n      const Index rhs_horiz_7 = base_n + threadIdx.z + 7 * 8;   \\\n                                                                \\\n      if (rhs_horiz_7 < n_size) {                               \\\n        rhs_pf0 = rhs(rhs_vert, rhs_horiz_0);                   \\\n        rhs_pf1 = rhs(rhs_vert, rhs_horiz_1);                   \\\n        rhs_pf2 = rhs(rhs_vert, rhs_horiz_2);                   \\\n        rhs_pf3 = rhs(rhs_vert, rhs_horiz_3);                   \\\n        rhs_pf4 = rhs(rhs_vert, rhs_horiz_4);                   \\\n        rhs_pf5 = rhs(rhs_vert, rhs_horiz_5);                   \\\n        rhs_pf6 = rhs(rhs_vert, rhs_horiz_6);                   \\\n        rhs_pf7 = rhs(rhs_vert, rhs_horiz_7);                   \\\n      } else if (rhs_horiz_6 < n_size) {                        \\\n        rhs_pf0 = rhs(rhs_vert, rhs_horiz_0);                   \\\n        rhs_pf1 = rhs(rhs_vert, rhs_horiz_1);                   \\\n        rhs_pf2 = rhs(rhs_vert, rhs_horiz_2);                   \\\n        rhs_pf3 = rhs(rhs_vert, rhs_horiz_3);                   \\\n        rhs_pf4 = rhs(rhs_vert, rhs_horiz_4);                   \\\n        rhs_pf5 = rhs(rhs_vert, rhs_horiz_5);                   \\\n        rhs_pf6 = rhs(rhs_vert, rhs_horiz_6);                   \\\n      } else if (rhs_horiz_5 < n_size) {                        \\\n        rhs_pf0 = rhs(rhs_vert, rhs_horiz_0);                   \\\n        rhs_pf1 = rhs(rhs_vert, rhs_horiz_1);                   \\\n        rhs_pf2 = rhs(rhs_vert, rhs_horiz_2);                   \\\n        rhs_pf3 = rhs(rhs_vert, rhs_horiz_3);                   \\\n        rhs_pf4 = rhs(rhs_vert, rhs_horiz_4);                   \\\n        rhs_pf5 = rhs(rhs_vert, rhs_horiz_5);                   \\\n      } else if (rhs_horiz_4 < n_size) {                        \\\n        rhs_pf0 = rhs(rhs_vert, rhs_horiz_0);                   \\\n        rhs_pf1 = rhs(rhs_vert, rhs_horiz_1);                   \\\n        rhs_pf2 = rhs(rhs_vert, rhs_horiz_2);                   \\\n        rhs_pf3 = rhs(rhs_vert, rhs_horiz_3);                   \\\n        rhs_pf4 = rhs(rhs_vert, rhs_horiz_4);                   \\\n      } else if (rhs_horiz_3 < n_size) {                        \\\n        rhs_pf0 = rhs(rhs_vert, rhs_horiz_0);                   \\\n        rhs_pf1 = rhs(rhs_vert, rhs_horiz_1);                   \\\n        rhs_pf2 = rhs(rhs_vert, rhs_horiz_2);                   \\\n        rhs_pf3 = rhs(rhs_vert, rhs_horiz_3);                   \\\n      } else if (rhs_horiz_2 < n_size) {                        \\\n        rhs_pf0 = rhs(rhs_vert, rhs_horiz_0);                   \\\n        rhs_pf1 = rhs(rhs_vert, rhs_horiz_1);                   \\\n        rhs_pf2 = rhs(rhs_vert, rhs_horiz_2);                   \\\n      } else if (rhs_horiz_1 < n_size) {                        \\\n        rhs_pf0 = rhs(rhs_vert, rhs_horiz_0);                   \\\n        rhs_pf1 = rhs(rhs_vert, rhs_horiz_1);                   \\\n      } else if (rhs_horiz_0 < n_size) {                        \\\n        rhs_pf0 = rhs(rhs_vert, rhs_horiz_0);                   \\\n      }                                                         \\\n    }                                                           \\\n  }                                                             \\\n\n#define writeRegToShmem(_)                      \\\n  lhs_shmem[lhs_store_idx_0] = lhs_pf0;         \\\n  rhs_shmem[rhs_store_idx_0] = rhs_pf0;         \\\n                                                \\\n  lhs_shmem[lhs_store_idx_1] = lhs_pf1;         \\\n  rhs_shmem[rhs_store_idx_1] = rhs_pf1;         \\\n                                                \\\n  lhs_shmem[lhs_store_idx_2] = lhs_pf2;         \\\n  rhs_shmem[rhs_store_idx_2] = rhs_pf2;         \\\n                                                \\\n  lhs_shmem[lhs_store_idx_3] = lhs_pf3;         \\\n  rhs_shmem[rhs_store_idx_3] = rhs_pf3;         \\\n                                                \\\n  lhs_shmem[lhs_store_idx_4] = lhs_pf4;         \\\n  rhs_shmem[rhs_store_idx_4] = rhs_pf4;         \\\n                                                \\\n  lhs_shmem[lhs_store_idx_5] = lhs_pf5;         \\\n  rhs_shmem[rhs_store_idx_5] = rhs_pf5;         \\\n                                                \\\n  lhs_shmem[lhs_store_idx_6] = lhs_pf6;         \\\n  rhs_shmem[rhs_store_idx_6] = rhs_pf6;         \\\n                                                \\\n  lhs_shmem[lhs_store_idx_7] = lhs_pf7;         \\\n  rhs_shmem[rhs_store_idx_7] = rhs_pf7;         \\\n\n  // declare and initialize result array\n#define res(i, j) _res_##i##j\n#define initResultRow(i)                        \\\n  Scalar res(i, 0) = conv(0);                   \\\n  Scalar res(i, 1) = conv(0);                   \\\n  Scalar res(i, 2) = conv(0);                   \\\n  Scalar res(i, 3) = conv(0);                   \\\n  Scalar res(i, 4) = conv(0);                   \\\n  Scalar res(i, 5) = conv(0);                   \\\n  Scalar res(i, 6) = conv(0);                   \\\n  Scalar res(i, 7) = conv(0);                   \\\n\n  internal::scalar_cast_op<int, Scalar> conv;\n  initResultRow(0);\n  initResultRow(1);\n  initResultRow(2);\n  initResultRow(3);\n  initResultRow(4);\n  initResultRow(5);\n  initResultRow(6);\n  initResultRow(7);\n#undef initResultRow\n\n  for (Index base_k = 0; base_k < k_size; base_k += 64) {\n    // wait for previous iteration to finish with shmem. Despite common sense,\n    // the code is a bit faster with this here then at bottom of loop\n    __syncthreads();\n\n    prefetchIntoRegisters(base_k);\n    writeRegToShmem();\n\n    #undef prefetchIntoRegisters\n    #undef writeRegToShmem\n\n    // wait for shared mem packing to be done before starting computation\n    __syncthreads();\n\n    // compute 8x8 matrix product by outer product. This involves packing one column\n    // of LHS and one row of RHS into registers (takes 16 registers).\n\n#define lcol(i) _lcol##i\n    Scalar lcol(0);\n    Scalar lcol(1);\n    Scalar lcol(2);\n    Scalar lcol(3);\n    Scalar lcol(4);\n    Scalar lcol(5);\n    Scalar lcol(6);\n    Scalar lcol(7);\n\n#define rrow(j) _rrow##j\n    Scalar rrow(0);\n    Scalar rrow(1);\n    Scalar rrow(2);\n    Scalar rrow(3);\n    Scalar rrow(4);\n    Scalar rrow(5);\n    Scalar rrow(6);\n    Scalar rrow(7);\n\n    // Now x corresponds to k, y to m, and z to n\n    const Scalar* lhs_block = &lhs_shmem[threadIdx.x + 9 * threadIdx.y];\n    const Scalar* rhs_block = &rhs_shmem[threadIdx.x + 8 * threadIdx.z];\n\n#define lhs_element(i, j) lhs_block[72 * ((i) + 8 * (j))]\n#define rhs_element(i, j) rhs_block[72 * ((i) + 8 * (j))]\n\n#define loadData(i, j)                          \\\n    lcol(0) = lhs_element(0, j);               \\\n    rrow(0) = rhs_element(i, 0);               \\\n    lcol(1) = lhs_element(1, j);               \\\n    rrow(1) = rhs_element(i, 1);               \\\n    lcol(2) = lhs_element(2, j);               \\\n    rrow(2) = rhs_element(i, 2);               \\\n    lcol(3) = lhs_element(3, j);               \\\n    rrow(3) = rhs_element(i, 3);               \\\n    lcol(4) = lhs_element(4, j);               \\\n    rrow(4) = rhs_element(i, 4);               \\\n    lcol(5) = lhs_element(5, j);               \\\n    rrow(5) = rhs_element(i, 5);               \\\n    lcol(6) = lhs_element(6, j);               \\\n    rrow(6) = rhs_element(i, 6);               \\\n    lcol(7) = lhs_element(7, j);               \\\n    rrow(7) = rhs_element(i, 7);               \\\n\n#define computeCol(j)                           \\\n    res(0, j) += lcol(0) * rrow(j);             \\\n    res(1, j) += lcol(1) * rrow(j);             \\\n    res(2, j) += lcol(2) * rrow(j);             \\\n    res(3, j) += lcol(3) * rrow(j);             \\\n    res(4, j) += lcol(4) * rrow(j);             \\\n    res(5, j) += lcol(5) * rrow(j);             \\\n    res(6, j) += lcol(6) * rrow(j);             \\\n    res(7, j) += lcol(7) * rrow(j);             \\\n\n#define computePass(i)                          \\\n    loadData(i, i);                             \\\n                                                \\\n    computeCol(0);                              \\\n    computeCol(1);                              \\\n    computeCol(2);                              \\\n    computeCol(3);                              \\\n    computeCol(4);                              \\\n    computeCol(5);                              \\\n    computeCol(6);                              \\\n    computeCol(7);                              \\\n\n    computePass(0);\n    computePass(1);\n    computePass(2);\n    computePass(3);\n    computePass(4);\n    computePass(5);\n    computePass(6);\n    computePass(7);\n\n#undef lcol\n#undef rrow\n#undef lhs_element\n#undef rhs_element\n#undef loadData\n#undef computeCol\n#undef computePass\n  } // end loop over k\n\n  // we've now iterated over all of the large (ie width 64) k blocks and\n  // accumulated results in registers. At this point thread (x, y, z) contains\n  // the sum across all big k blocks of the product of little k block of index (x, y)\n  // with block of index (y, z). To compute the final output, we need to reduce\n  // the 8 threads over y by summation.\n#if defined(EIGEN_HIPCC) || (defined(EIGEN_CUDA_SDK_VER) && EIGEN_CUDA_SDK_VER < 90000)\n#define shuffleInc(i, j, mask) res(i, j) += __shfl_xor(res(i, j), mask)\n#else\n#define shuffleInc(i, j, mask) res(i, j) += __shfl_xor_sync(0xFFFFFFFF, res(i, j), mask)\n#endif\n\n#define reduceRow(i, mask)                      \\\n  shuffleInc(i, 0, mask);                       \\\n  shuffleInc(i, 1, mask);                       \\\n  shuffleInc(i, 2, mask);                       \\\n  shuffleInc(i, 3, mask);                       \\\n  shuffleInc(i, 4, mask);                       \\\n  shuffleInc(i, 5, mask);                       \\\n  shuffleInc(i, 6, mask);                       \\\n  shuffleInc(i, 7, mask);                       \\\n\n#define reduceMatrix(mask)                      \\\n  reduceRow(0, mask);                           \\\n  reduceRow(1, mask);                           \\\n  reduceRow(2, mask);                           \\\n  reduceRow(3, mask);                           \\\n  reduceRow(4, mask);                           \\\n  reduceRow(5, mask);                           \\\n  reduceRow(6, mask);                           \\\n  reduceRow(7, mask);                           \\\n\n  // actually perform the reduction, now each thread of index (_, y, z)\n  // contains the correct values in its registers that belong in the output\n  // block\n  reduceMatrix(1);\n  reduceMatrix(2);\n  reduceMatrix(4);\n\n#undef shuffleInc\n#undef reduceRow\n#undef reduceMatrix\n\n  // now we need to copy the 64 values into main memory. We can't split work\n  // among threads because all variables are in registers. There's 2 ways\n  // to do this:\n  // (1) have 1 thread do 64 writes from registers into global memory\n  // (2) have 1 thread do 64 writes into shared memory, and then 8 threads\n  //     each do 8 writes into global memory. We can just overwrite the shared\n  //     memory from the problem we just solved.\n  // (2) is slightly faster than (1) due to less branching and more ILP\n\n  // TODO: won't yield much gain, but could just use currently unused shared mem\n  //       and then we won't have to sync\n  // wait for shared mem to be out of use\n  __syncthreads();\n\n#define writeResultShmem(i, j)                                          \\\n  lhs_shmem[i + 8 * threadIdx.y + 64 * threadIdx.z + 512 * j] = res(i, j); \\\n\n#define writeRow(i)                             \\\n  writeResultShmem(i, 0);                       \\\n  writeResultShmem(i, 1);                       \\\n  writeResultShmem(i, 2);                       \\\n  writeResultShmem(i, 3);                       \\\n  writeResultShmem(i, 4);                       \\\n  writeResultShmem(i, 5);                       \\\n  writeResultShmem(i, 6);                       \\\n  writeResultShmem(i, 7);                       \\\n\n  if (threadIdx.x == 0) {\n    writeRow(0);\n    writeRow(1);\n    writeRow(2);\n    writeRow(3);\n    writeRow(4);\n    writeRow(5);\n    writeRow(6);\n    writeRow(7);\n  }\n#undef writeResultShmem\n#undef writeRow\n\n  const int max_i_write = numext::mini((int)((m_size - base_m - threadIdx.y + 7) / 8), 8);\n  const int max_j_write = numext::mini((int)((n_size - base_n - threadIdx.z + 7) / 8), 8);\n\n  if (threadIdx.x < max_i_write) {\n    if (max_j_write == 8) {\n      // TODO: can i trade bank conflicts for coalesced writes?\n      Scalar val0 = lhs_shmem[threadIdx.x + 8 * threadIdx.y + 64 * threadIdx.z + 512 * 0];\n      Scalar val1 = lhs_shmem[threadIdx.x + 8 * threadIdx.y + 64 * threadIdx.z + 512 * 1];\n      Scalar val2 = lhs_shmem[threadIdx.x + 8 * threadIdx.y + 64 * threadIdx.z + 512 * 2];\n      Scalar val3 = lhs_shmem[threadIdx.x + 8 * threadIdx.y + 64 * threadIdx.z + 512 * 3];\n      Scalar val4 = lhs_shmem[threadIdx.x + 8 * threadIdx.y + 64 * threadIdx.z + 512 * 4];\n      Scalar val5 = lhs_shmem[threadIdx.x + 8 * threadIdx.y + 64 * threadIdx.z + 512 * 5];\n      Scalar val6 = lhs_shmem[threadIdx.x + 8 * threadIdx.y + 64 * threadIdx.z + 512 * 6];\n      Scalar val7 = lhs_shmem[threadIdx.x + 8 * threadIdx.y + 64 * threadIdx.z + 512 * 7];\n\n      output(base_m + threadIdx.y + 8 * threadIdx.x, base_n + threadIdx.z + 8 * 0) = val0;\n      output(base_m + threadIdx.y + 8 * threadIdx.x, base_n + threadIdx.z + 8 * 1) = val1;\n      output(base_m + threadIdx.y + 8 * threadIdx.x, base_n + threadIdx.z + 8 * 2) = val2;\n      output(base_m + threadIdx.y + 8 * threadIdx.x, base_n + threadIdx.z + 8 * 3) = val3;\n      output(base_m + threadIdx.y + 8 * threadIdx.x, base_n + threadIdx.z + 8 * 4) = val4;\n      output(base_m + threadIdx.y + 8 * threadIdx.x, base_n + threadIdx.z + 8 * 5) = val5;\n      output(base_m + threadIdx.y + 8 * threadIdx.x, base_n + threadIdx.z + 8 * 6) = val6;\n      output(base_m + threadIdx.y + 8 * threadIdx.x, base_n + threadIdx.z + 8 * 7) = val7;\n    } else {\n#pragma unroll 7\n      for (int j = 0; j < max_j_write; j++) {\n        Scalar val = lhs_shmem[threadIdx.x + 8 * threadIdx.y + 64 * threadIdx.z + 512 * j];\n        output(base_m + threadIdx.y + 8 * threadIdx.x, base_n + threadIdx.z + 8 * j) = val;\n      }\n    }\n  }\n#undef res\n}\n\n\ntemplate<typename Scalar, typename Index, typename LhsMapper,\n         typename RhsMapper, typename OutputMapper>\n__global__ void\n#if defined(EIGEN_HIPCC)\n__launch_bounds__(512, 1)\n#else\n__launch_bounds__(512)\n#endif\nEigenContractionKernel(const LhsMapper lhs, const RhsMapper rhs,\n                       const OutputMapper output,\n                       const Index m_size, const Index n_size, const Index k_size) {\n  __shared__ Scalar lhs_shmem[72 * 64];\n  __shared__ Scalar rhs_shmem[72 * 64];\n\n  const Index m_block_idx = blockIdx.x;\n  const Index n_block_idx = blockIdx.y;\n\n  const Index base_m = 64 * m_block_idx;\n  const Index base_n = 64 * n_block_idx;\n\n  if (base_m + 63 < m_size && base_n + 63 < n_size) {\n    EigenContractionKernelInternal<Scalar, Index, LhsMapper, RhsMapper, OutputMapper, false>(lhs, rhs, output, lhs_shmem, rhs_shmem, m_size, n_size, k_size);\n  } else {\n    EigenContractionKernelInternal<Scalar, Index, LhsMapper, RhsMapper, OutputMapper, true>(lhs, rhs, output, lhs_shmem, rhs_shmem, m_size, n_size, k_size);\n  }\n}\n\n\ntemplate<typename Index, typename LhsMapper,\n         typename RhsMapper, typename OutputMapper, bool CHECK_LHS_BOUNDARY,\n         bool CHECK_RHS_BOUNDARY>\n__device__ __forceinline__ void\nEigenFloatContractionKernelInternal16x16(const LhsMapper lhs, const RhsMapper rhs,\n                       const OutputMapper output, float2 lhs_shmem2[][16],\n                       float2 rhs_shmem2[][8], const Index m_size,\n                       const Index n_size, const Index k_size,\n                       const Index base_m, const Index base_n) {\n\n  // prefetch registers\n  float4 lhs_pf0, rhs_pf0;\n\n  float4 results[4];\n  for (int i=0; i < 4; i++) {\n    results[i].x = results[i].y = results[i].z = results[i].w = 0;\n  }\n\n#define prefetch_lhs(reg, row, col)                            \\\n    if (!CHECK_LHS_BOUNDARY) {                                 \\\n      if (col < k_size) {                                      \\\n        reg =lhs.template loadPacket<float4,Unaligned>(row, col);     \\\n      }                                                        \\\n    } else {                                                   \\\n      if (col < k_size) {                                      \\\n        if (row + 3 < m_size) {                                \\\n          reg =lhs.template loadPacket<float4,Unaligned>(row, col);   \\\n        } else if (row + 2 < m_size) {                         \\\n          reg.x =lhs(row + 0, col);                            \\\n          reg.y =lhs(row + 1, col);                            \\\n          reg.z =lhs(row + 2, col);                            \\\n        } else if (row + 1 < m_size) {                         \\\n          reg.x =lhs(row + 0, col);                            \\\n          reg.y =lhs(row + 1, col);                            \\\n        } else if (row  < m_size) {                            \\\n          reg.x =lhs(row + 0, col);                            \\\n        }                                                      \\\n      }                                                        \\\n    }\t\t\t\t\t\t\t       \\\n\n  Index lhs_vert = base_m+threadIdx.x*4;\n\n  for (Index k = 0; k < k_size; k += 16) {\n\n    lhs_pf0 = internal::pset1<float4>(0);\n    rhs_pf0 = internal::pset1<float4>(0);\n\n    Index lhs_horiz = threadIdx.y+k;\n    prefetch_lhs(lhs_pf0, lhs_vert, lhs_horiz)\n\n    Index rhs_vert = k+(threadIdx.x%4)*4;\n    Index rhs_horiz0 = (threadIdx.x>>2)+threadIdx.y*4+base_n;\n\n    if (!CHECK_RHS_BOUNDARY) {\n      if ((rhs_vert + 3) < k_size) {\n        // just CHECK_RHS_BOUNDARY\n        rhs_pf0 = rhs.template loadPacket<float4,Unaligned>(rhs_vert, rhs_horiz0);\n      } else if (rhs_vert + 2 < k_size) {\n        // just CHECK_RHS_BOUNDARY\n        rhs_pf0.x = rhs(rhs_vert, rhs_horiz0);\n        rhs_pf0.y = rhs(rhs_vert + 1, rhs_horiz0);\n        rhs_pf0.z = rhs(rhs_vert + 2, rhs_horiz0);\n      } else if (rhs_vert + 1 < k_size) {\n        rhs_pf0.x = rhs(rhs_vert, rhs_horiz0);\n        rhs_pf0.y = rhs(rhs_vert + 1, rhs_horiz0);\n      } else if (rhs_vert  < k_size) {\n        rhs_pf0.x = rhs(rhs_vert, rhs_horiz0);\n      }\n    } else {\n      if (rhs_horiz0 < n_size) {\n        if ((rhs_vert + 3) < k_size) {\n          rhs_pf0 = rhs.template loadPacket<float4,Unaligned>(rhs_vert, rhs_horiz0);\n        } else if ((rhs_vert + 2) < k_size) {\n          rhs_pf0.x = rhs(rhs_vert, rhs_horiz0);\n          rhs_pf0.y = rhs(rhs_vert + 1, rhs_horiz0);\n          rhs_pf0.z = rhs(rhs_vert + 2, rhs_horiz0);\n        } else if ((rhs_vert + 1) < k_size) {\n          rhs_pf0.x = rhs(rhs_vert, rhs_horiz0);\n          rhs_pf0.y = rhs(rhs_vert + 1, rhs_horiz0);\n        } else if (rhs_vert  < k_size) {\n          rhs_pf0.x = rhs(rhs_vert, rhs_horiz0);\n        }\n      }\n    }\n    float x1, x2 ;\n    // the following can be a bitwise operation..... some day.\n    if((threadIdx.x%8) < 4) {\n      x1 = rhs_pf0.y;\n      x2 = rhs_pf0.w;\n    } else {\n      x1 = rhs_pf0.x;\n      x2 = rhs_pf0.z;\n    }\n    #if defined(EIGEN_HIPCC) || (defined(EIGEN_CUDA_SDK_VER) && EIGEN_CUDA_SDK_VER < 90000)\n    x1 = __shfl_xor(x1, 4);\n    x2 = __shfl_xor(x2, 4);\n    #else\n    x1 = __shfl_xor_sync(0xFFFFFFFF, x1, 4);\n    x2 = __shfl_xor_sync(0xFFFFFFFF, x2, 4);\n    #endif\n    if((threadIdx.x%8) < 4) {\n      rhs_pf0.y = x1;\n      rhs_pf0.w = x2;\n    } else {\n      rhs_pf0.x = x1;\n      rhs_pf0.z = x2;\n    }\n\n    // We have 64 features.\n    // Row 0 -> times (0, 4, 8, 12, 1, 5, 9, 13) for features 0, 1.\n    // Row 1 -> times (0, 4, 8, 12, 1, 5, 9, 13) for features 2, 3.\n    // ...\n    // Row 31 -> times (0, 4, 8, 12, 1, 5, 9, 13) for features 62, 63\n    // Row 32 -> times (2, 6, 10, 14, 3, 7, 11, 15) for features 0, 1\n    // ...\n    rhs_shmem2[(threadIdx.x>>3)+ threadIdx.y*2][threadIdx.x%8] = make_float2(rhs_pf0.x, rhs_pf0.y);\n    rhs_shmem2[(threadIdx.x>>3)+ threadIdx.y*2+32][threadIdx.x%8] = make_float2(rhs_pf0.z, rhs_pf0.w);\n\n    // Row 0 (time 0) -> features (0, 1), (4, 5), .. (28, 29), (32, 33), ..  (60, 61)\n    // Row 1 (time 1) -> features (0, 1), (4, 5), .. (28, 29), (32, 33), ..  (60, 61)\n    // ...\n    // Row 15 (time 15) -> features (0, 1), (4, 5), .. (28, 29), (32, 33), ..  (60, 61)\n    // Row 16 (time 0) -> features (2, 3), (6, 7), .. (30, 31), (34, 35), ..  (62, 63)\n    // ...\n\n    lhs_shmem2[threadIdx.y][threadIdx.x] = make_float2(lhs_pf0.x, lhs_pf0.y);\n    lhs_shmem2[threadIdx.y+16][threadIdx.x] = make_float2(lhs_pf0.z, lhs_pf0.w);\n\n\n#define add_vals(fl1, fl2, fr1, fr2)\\\n    results[0].x += fl1.x * fr1.x;\\\n    results[0].y += fl1.y * fr1.x;\\\n    results[0].z += fl2.x * fr1.x;\\\n    results[0].w += fl2.y * fr1.x;\\\n\\\n    results[1].x += fl1.x * fr1.y;\\\n    results[1].y += fl1.y * fr1.y;\\\n    results[1].z += fl2.x * fr1.y;\\\n    results[1].w += fl2.y * fr1.y;\\\n\\\n    results[2].x += fl1.x * fr2.x;\\\n    results[2].y += fl1.y * fr2.x;\\\n    results[2].z += fl2.x * fr2.x;\\\n    results[2].w += fl2.y * fr2.x;\\\n\\\n    results[3].x += fl1.x * fr2.y;\\\n    results[3].y += fl1.y * fr2.y;\\\n    results[3].z += fl2.x * fr2.y;\\\n    results[3].w += fl2.y * fr2.y;\\\n\n    __syncthreads();\n\n    // Do the multiplies.\n    #pragma unroll\n    for (int koff = 0; koff < 16; koff ++) {\n      // 32 x threads.\n      float2 fl1 = lhs_shmem2[koff][threadIdx.x];\n      float2 fl2 = lhs_shmem2[koff + 16][threadIdx.x];\n\n      int start_feature = threadIdx.y * 4;\n      float2 fr1 = rhs_shmem2[(start_feature>>1) + 32*((koff%4)/2)][koff/4 + (koff%2)*4];\n      float2 fr2 = rhs_shmem2[(start_feature>>1) + 1 + 32*((koff%4)/2)][koff/4 + (koff%2)*4];\n\n      add_vals(fl1, fl2, fr1, fr2)\n    }\n    __syncthreads();\n  }\n\n#undef prefetch_lhs\n#undef add_vals\n\n  Index horiz_base = threadIdx.y*4+base_n;\n  if (!CHECK_LHS_BOUNDARY && !CHECK_RHS_BOUNDARY) {\n    for (int i = 0; i < 4; i++) {\n      output(lhs_vert, horiz_base + i) = results[i].x;\n      output(lhs_vert + 1, horiz_base + i) = results[i].y;\n      output(lhs_vert + 2, horiz_base + i) = results[i].z;\n      output(lhs_vert + 3, horiz_base + i) = results[i].w;\n    }\n  } else if (!CHECK_RHS_BOUNDARY) {\n    // CHECK LHS\n    if (lhs_vert + 3 < m_size) {\n      for (int i = 0; i < 4; i++) {\n        output(lhs_vert, horiz_base + i) = results[i].x;\n        output(lhs_vert + 1, horiz_base + i) = results[i].y;\n        output(lhs_vert + 2, horiz_base + i) = results[i].z;\n        output(lhs_vert + 3, horiz_base + i) = results[i].w;\n      }\n    } else if (lhs_vert + 2 < m_size) {\n      for (int i = 0; i < 4; i++) {\n        output(lhs_vert, horiz_base + i) = results[i].x;\n        output(lhs_vert + 1, horiz_base + i) = results[i].y;\n        output(lhs_vert + 2, horiz_base + i) = results[i].z;\n      }\n    } else if (lhs_vert + 1 < m_size) {\n      for (int i = 0; i < 4; i++) {\n        output(lhs_vert, horiz_base + i) = results[i].x;\n        output(lhs_vert + 1, horiz_base + i) = results[i].y;\n      }\n    } else if (lhs_vert  < m_size) {\n      for (int i = 0; i < 4; i++) {\n        output(lhs_vert, horiz_base + i) = results[i].x;\n      }\n    }\n  } else if (!CHECK_LHS_BOUNDARY) {\n    // CHECK RHS\n    /*\n    int ncols_rem = fminf(n_size- horiz_base, 4);\n    for (int i = 0; i < ncols_rem; i++) {\n      output(lhs_vert, horiz_base + i) = results[i].x;\n      output(lhs_vert + 1, horiz_base + i) = results[i].y;\n      output(lhs_vert + 2, horiz_base + i) = results[i].z;\n      output(lhs_vert + 3, horiz_base + i) = results[i].w;\n    }*/\n    for (int i = 0; i < 4; i++) {\n      if (horiz_base+i < n_size) {\n        output(lhs_vert, horiz_base + i) = results[i].x;\n        output(lhs_vert + 1, horiz_base + i) = results[i].y;\n        output(lhs_vert + 2, horiz_base + i) = results[i].z;\n        output(lhs_vert + 3, horiz_base + i) = results[i].w;\n       }\n    }\n  } else {\n    // CHECK both boundaries.\n    for (int i = 0; i < 4; i++) {\n      if (horiz_base+i < n_size) {\n        if (lhs_vert < m_size)\n          output(lhs_vert, horiz_base + i) = results[i].x;\n        if (lhs_vert + 1 < m_size)\n          output(lhs_vert + 1, horiz_base + i) = results[i].y;\n        if (lhs_vert + 2 < m_size)\n          output(lhs_vert + 2, horiz_base + i) = results[i].z;\n        if (lhs_vert + 3 < m_size)\n          output(lhs_vert + 3, horiz_base + i) = results[i].w;\n      }\n    }\n  }\n}\n\n\ntemplate<typename Index, typename LhsMapper,\n         typename RhsMapper, typename OutputMapper, bool CHECK_LHS_BOUNDARY,\n         bool CHECK_RHS_BOUNDARY>\n__device__ __forceinline__ void\nEigenFloatContractionKernelInternal(const LhsMapper lhs, const RhsMapper rhs,\n                       const OutputMapper output, float2 lhs_shmem2[][32],\n                       float2 rhs_shmem2[][8], const Index m_size,\n                       const Index n_size, const Index k_size,\n                       const Index base_m, const Index base_n) {\n\n  // prefetch registers\n  float4 lhs_pf0, lhs_pf1, lhs_pf2, lhs_pf3;\n  float4 rhs_pf0, rhs_pf1;\n\n  float4 results[8];\n  for (int i=0; i < 8; i++) {\n    results[i].x = results[i].y = results[i].z = results[i].w = 0;\n  }\n\n  Index lhs_vert = base_m+threadIdx.x*4+(threadIdx.y%4)*32;\n  for (Index k = 0; k < k_size; k += 32) {\n    lhs_pf0 = internal::pset1<float4>(0);\n    lhs_pf1 = internal::pset1<float4>(0);\n    lhs_pf2 = internal::pset1<float4>(0);\n    lhs_pf3 = internal::pset1<float4>(0);\n\n    rhs_pf0 = internal::pset1<float4>(0);\n    rhs_pf1 = internal::pset1<float4>(0);\n\n     if (!CHECK_LHS_BOUNDARY) {\n      if ((threadIdx.y/4+k+24) < k_size) {\n        lhs_pf0 =lhs.template loadPacket<float4,Unaligned>(lhs_vert, (threadIdx.y/4+k));\n        lhs_pf1 =lhs.template loadPacket<float4,Unaligned>(lhs_vert, (threadIdx.y/4+k+8));\n        lhs_pf2 =lhs.template loadPacket<float4,Unaligned>(lhs_vert, (threadIdx.y/4+k+16));\n        lhs_pf3 =lhs.template loadPacket<float4,Unaligned>(lhs_vert, (threadIdx.y/4+k+24));\n      } else if ((threadIdx.y/4+k+16) < k_size) {\n        lhs_pf0 =lhs.template loadPacket<float4,Unaligned>(lhs_vert, (threadIdx.y/4+k));\n        lhs_pf1 =lhs.template loadPacket<float4,Unaligned>(lhs_vert, (threadIdx.y/4+k+8));\n        lhs_pf2 =lhs.template loadPacket<float4,Unaligned>(lhs_vert, (threadIdx.y/4+k+16));\n      } else if ((threadIdx.y/4+k+8) < k_size) {\n        lhs_pf0 =lhs.template loadPacket<float4,Unaligned>(lhs_vert, (threadIdx.y/4+k));\n        lhs_pf1 =lhs.template loadPacket<float4,Unaligned>(lhs_vert, (threadIdx.y/4+k+8));\n      } else if ((threadIdx.y/4+k) < k_size) {\n        lhs_pf0 =lhs.template loadPacket<float4,Unaligned>(lhs_vert, (threadIdx.y/4+k));\n      }\n    } else {\n      // just CHECK_LHS_BOUNDARY\n      if (lhs_vert + 3 < m_size) {\n        if ((threadIdx.y/4+k+24) < k_size) {\n          lhs_pf0 =lhs.template loadPacket<float4,Unaligned>(lhs_vert, (threadIdx.y/4+k));\n          lhs_pf1 =lhs.template loadPacket<float4,Unaligned>(lhs_vert, (threadIdx.y/4+k+8));\n          lhs_pf2 =lhs.template loadPacket<float4,Unaligned>(lhs_vert, (threadIdx.y/4+k+16));\n          lhs_pf3 =lhs.template loadPacket<float4,Unaligned>(lhs_vert, (threadIdx.y/4+k+24));\n        } else if ((threadIdx.y/4+k+16) < k_size) {\n          lhs_pf0 =lhs.template loadPacket<float4,Unaligned>(lhs_vert, (threadIdx.y/4+k));\n          lhs_pf1 =lhs.template loadPacket<float4,Unaligned>(lhs_vert, (threadIdx.y/4+k+8));\n          lhs_pf2 =lhs.template loadPacket<float4,Unaligned>(lhs_vert, (threadIdx.y/4+k+16));\n        } else if ((threadIdx.y/4+k+8) < k_size) {\n          lhs_pf0 =lhs.template loadPacket<float4,Unaligned>(lhs_vert, (threadIdx.y/4+k));\n          lhs_pf1 =lhs.template loadPacket<float4,Unaligned>(lhs_vert, (threadIdx.y/4+k+8));\n        } else if ((threadIdx.y/4+k) < k_size) {\n          lhs_pf0 =lhs.template loadPacket<float4,Unaligned>(lhs_vert, (threadIdx.y/4+k));\n        }\n      } else if (lhs_vert + 2 < m_size) {\n        if ((threadIdx.y/4+k+24) < k_size) {\n          lhs_pf0.x =lhs(lhs_vert + 0, (threadIdx.y/4+k));\n          lhs_pf0.y =lhs(lhs_vert + 1, (threadIdx.y/4+k));\n          lhs_pf0.z =lhs(lhs_vert + 2, (threadIdx.y/4+k));\n          lhs_pf1.x =lhs(lhs_vert + 0, (threadIdx.y/4+k+8));\n          lhs_pf1.y =lhs(lhs_vert + 1, (threadIdx.y/4+k+8));\n          lhs_pf1.z =lhs(lhs_vert + 2, (threadIdx.y/4+k+8));\n          lhs_pf2.x =lhs(lhs_vert + 0, (threadIdx.y/4+k+16));\n          lhs_pf2.y =lhs(lhs_vert + 1, (threadIdx.y/4+k+16));\n          lhs_pf2.z =lhs(lhs_vert + 2, (threadIdx.y/4+k+16));\n          lhs_pf3.x =lhs(lhs_vert + 0, (threadIdx.y/4+k+24));\n          lhs_pf3.y =lhs(lhs_vert + 1, (threadIdx.y/4+k+24));\n          lhs_pf3.z =lhs(lhs_vert + 2, (threadIdx.y/4+k+24));\n        } else if ((threadIdx.y/4+k+16) < k_size) {\n          lhs_pf0.x =lhs(lhs_vert + 0, (threadIdx.y/4+k));\n          lhs_pf0.y =lhs(lhs_vert + 1, (threadIdx.y/4+k));\n          lhs_pf0.z =lhs(lhs_vert + 2, (threadIdx.y/4+k));\n          lhs_pf1.x =lhs(lhs_vert + 0, (threadIdx.y/4+k+8));\n          lhs_pf1.y =lhs(lhs_vert + 1, (threadIdx.y/4+k+8));\n          lhs_pf1.z =lhs(lhs_vert + 2, (threadIdx.y/4+k+8));\n          lhs_pf2.x =lhs(lhs_vert + 0, (threadIdx.y/4+k+16));\n          lhs_pf2.y =lhs(lhs_vert + 1, (threadIdx.y/4+k+16));\n          lhs_pf2.z =lhs(lhs_vert + 2, (threadIdx.y/4+k+16));\n        } else if ((threadIdx.y/4+k+8) < k_size) {\n          lhs_pf0.x =lhs(lhs_vert + 0, (threadIdx.y/4+k));\n          lhs_pf0.y =lhs(lhs_vert + 1, (threadIdx.y/4+k));\n          lhs_pf0.z =lhs(lhs_vert + 2, (threadIdx.y/4+k));\n          lhs_pf1.x =lhs(lhs_vert + 0, (threadIdx.y/4+k+8));\n          lhs_pf1.y =lhs(lhs_vert + 1, (threadIdx.y/4+k+8));\n          lhs_pf1.z =lhs(lhs_vert + 2, (threadIdx.y/4+k+8));\n        } else if ((threadIdx.y/4+k) < k_size) {\n          lhs_pf0.x =lhs(lhs_vert + 0, (threadIdx.y/4+k));\n          lhs_pf0.y =lhs(lhs_vert + 1, (threadIdx.y/4+k));\n          lhs_pf0.z =lhs(lhs_vert + 2, (threadIdx.y/4+k));\n        }\n      } else if (lhs_vert + 1 < m_size) {\n        if ((threadIdx.y/4+k+24) < k_size) {\n          lhs_pf0.x =lhs(lhs_vert + 0, (threadIdx.y/4+k));\n          lhs_pf0.y =lhs(lhs_vert + 1, (threadIdx.y/4+k));\n          lhs_pf1.x =lhs(lhs_vert + 0, (threadIdx.y/4+k+8));\n          lhs_pf1.y =lhs(lhs_vert + 1, (threadIdx.y/4+k+8));\n          lhs_pf2.x =lhs(lhs_vert + 0, (threadIdx.y/4+k+16));\n          lhs_pf2.y =lhs(lhs_vert + 1, (threadIdx.y/4+k+16));\n          lhs_pf3.x =lhs(lhs_vert + 0, (threadIdx.y/4+k+24));\n          lhs_pf3.y =lhs(lhs_vert + 1, (threadIdx.y/4+k+24));\n        } else if ((threadIdx.y/4+k+16) < k_size) {\n          lhs_pf0.x =lhs(lhs_vert + 0, (threadIdx.y/4+k));\n          lhs_pf0.y =lhs(lhs_vert + 1, (threadIdx.y/4+k));\n          lhs_pf1.x =lhs(lhs_vert + 0, (threadIdx.y/4+k+8));\n          lhs_pf1.y =lhs(lhs_vert + 1, (threadIdx.y/4+k+8));\n          lhs_pf2.x =lhs(lhs_vert + 0, (threadIdx.y/4+k+16));\n          lhs_pf2.y =lhs(lhs_vert + 1, (threadIdx.y/4+k+16));\n        } else if ((threadIdx.y/4+k+8) < k_size) {\n          lhs_pf0.x =lhs(lhs_vert + 0, (threadIdx.y/4+k));\n          lhs_pf0.y =lhs(lhs_vert + 1, (threadIdx.y/4+k));\n          lhs_pf1.x =lhs(lhs_vert + 0, (threadIdx.y/4+k+8));\n          lhs_pf1.y =lhs(lhs_vert + 1, (threadIdx.y/4+k+8));\n        } else if ((threadIdx.y/4+k) < k_size) {\n          lhs_pf0.x =lhs(lhs_vert + 0, (threadIdx.y/4+k));\n          lhs_pf0.y =lhs(lhs_vert + 1, (threadIdx.y/4+k));\n        }\n      } else if (lhs_vert < m_size) {\n        if ((threadIdx.y/4+k+24) < k_size) {\n          lhs_pf0.x =lhs(lhs_vert + 0, (threadIdx.y/4+k));\n          lhs_pf1.x =lhs(lhs_vert + 0, (threadIdx.y/4+k+8));\n          lhs_pf2.x =lhs(lhs_vert + 0, (threadIdx.y/4+k+16));\n          lhs_pf3.x =lhs(lhs_vert + 0, (threadIdx.y/4+k+24));\n        } else if ((threadIdx.y/4+k+16) < k_size) {\n          lhs_pf0.x =lhs(lhs_vert + 0, (threadIdx.y/4+k));\n          lhs_pf1.x =lhs(lhs_vert + 0, (threadIdx.y/4+k+8));\n          lhs_pf2.x =lhs(lhs_vert + 0, (threadIdx.y/4+k+16));\n        } else if ((threadIdx.y/4+k+8) < k_size) {\n          lhs_pf0.x =lhs(lhs_vert + 0, (threadIdx.y/4+k));\n          lhs_pf1.x =lhs(lhs_vert + 0, (threadIdx.y/4+k+8));\n        } else if ((threadIdx.y/4+k) < k_size) {\n          lhs_pf0.x =lhs(lhs_vert + 0, (threadIdx.y/4+k));\n        }\n      }\n    }\n    __syncthreads();\n    Index rhs_vert = k+threadIdx.x*4;\n    Index rhs_horiz0 = threadIdx.y*2+base_n;\n    Index rhs_horiz1 = threadIdx.y*2+1+base_n;\n    if (!CHECK_RHS_BOUNDARY) {\n      if ((rhs_vert + 3) < k_size) {\n        // just CHECK_RHS_BOUNDARY\n        rhs_pf0 = rhs.template loadPacket<float4,Unaligned>(rhs_vert, rhs_horiz0);\n        rhs_pf1 = rhs.template loadPacket<float4,Unaligned>(rhs_vert, rhs_horiz1);\n      } else if (rhs_vert + 2 < k_size) {\n        // just CHECK_RHS_BOUNDARY\n        rhs_pf0.x = rhs(rhs_vert, rhs_horiz0);\n        rhs_pf0.y = rhs(rhs_vert + 1, rhs_horiz0);\n        rhs_pf0.z = rhs(rhs_vert + 2, rhs_horiz0);\n        rhs_pf1.x = rhs(rhs_vert, rhs_horiz1);\n        rhs_pf1.y = rhs(rhs_vert + 1, rhs_horiz1);\n        rhs_pf1.z = rhs(rhs_vert + 2, rhs_horiz1);\n      } else if (rhs_vert + 1 < k_size) {\n        rhs_pf0.x = rhs(rhs_vert, rhs_horiz0);\n        rhs_pf0.y = rhs(rhs_vert + 1, rhs_horiz0);\n        rhs_pf1.x = rhs(rhs_vert, rhs_horiz1);\n        rhs_pf1.y = rhs(rhs_vert + 1, rhs_horiz1);\n      } else if (rhs_vert  < k_size) {\n        rhs_pf0.x = rhs(rhs_vert, rhs_horiz0);\n        rhs_pf1.x = rhs(rhs_vert, rhs_horiz1);\n      }\n    } else {\n      if (rhs_horiz1 < n_size) {\n        if ((rhs_vert + 3) < k_size) {\n          // just CHECK_RHS_BOUNDARY\n          rhs_pf0 = rhs.template loadPacket<float4,Unaligned>(rhs_vert, rhs_horiz0);\n          rhs_pf1 = rhs.template loadPacket<float4,Unaligned>(rhs_vert, rhs_horiz1);\n        } else if (rhs_vert + 2 < k_size) {\n          // just CHECK_RHS_BOUNDARY\n          rhs_pf0.x = rhs(rhs_vert, rhs_horiz0);\n          rhs_pf0.y = rhs(rhs_vert + 1, rhs_horiz0);\n          rhs_pf0.z = rhs(rhs_vert + 2, rhs_horiz0);\n          rhs_pf1.x = rhs(rhs_vert, rhs_horiz1);\n          rhs_pf1.y = rhs(rhs_vert + 1, rhs_horiz1);\n          rhs_pf1.z = rhs(rhs_vert + 2, rhs_horiz1);\n        } else if (k+threadIdx.x*4 + 1 < k_size) {\n          rhs_pf0.x = rhs(rhs_vert, rhs_horiz0);\n          rhs_pf0.y = rhs(rhs_vert + 1, rhs_horiz0);\n          rhs_pf1.x = rhs(rhs_vert, rhs_horiz1);\n          rhs_pf1.y = rhs(rhs_vert + 1, rhs_horiz1);\n        } else if (k+threadIdx.x*4  < k_size) {\n          rhs_pf0.x = rhs(rhs_vert, rhs_horiz0);\n          rhs_pf1.x = rhs(rhs_vert, rhs_horiz1);\n        }\n      } else if (rhs_horiz0 < n_size) {\n        if ((rhs_vert + 3) < k_size) {\n          // just CHECK_RHS_BOUNDARY\n          rhs_pf0 = rhs.template loadPacket<float4,Unaligned>(rhs_vert, rhs_horiz0);\n        } else if ((rhs_vert + 2) < k_size) {\n          // just CHECK_RHS_BOUNDARY\n          rhs_pf0.x = rhs(rhs_vert, rhs_horiz0);\n          rhs_pf0.y = rhs(rhs_vert + 1, rhs_horiz0);\n          rhs_pf0.z = rhs(rhs_vert + 2, rhs_horiz0);\n        } else if ((rhs_vert + 1) < k_size) {\n          rhs_pf0.x = rhs(rhs_vert, rhs_horiz0);\n          rhs_pf0.y = rhs(rhs_vert + 1, rhs_horiz0);\n        } else if (rhs_vert  < k_size) {\n          rhs_pf0.x = rhs(rhs_vert, rhs_horiz0);\n        }\n      }\n    }\n    __syncthreads();\n    // Loaded. Do computation\n    // Row 0 -> times (0, 4, 8, .. 28) for features 0, 1.\n    // Row 1 -> times (0, 4, 8, .. 28) for features 2, 3.\n    // ..\n    // Row 31 -> times (0, 4, 8, .. 28) for features 62, 63\n    rhs_shmem2[threadIdx.y][threadIdx.x] = make_float2(rhs_pf0.x, rhs_pf1.x);\n    // Row 32 -> times (1, 5, 9, .. 29) for features 0, 1.\n    // Row 33 -> times (1, 5, 9, .. 29) for features 2, 3.\n    // ..\n    rhs_shmem2[threadIdx.y+32][threadIdx.x] = make_float2(rhs_pf0.y, rhs_pf1.y);\n    // Row 64 -> times (2, 6, 10, .. 30) for features 0, 1.\n    // Row 65 -> times (2, 6, 10, .. 30) for features 2, 3.\n    rhs_shmem2[threadIdx.y+64][threadIdx.x] = make_float2(rhs_pf0.z, rhs_pf1.z);\n    // Row 96 -> times (3, 7, 11, .. 31) for features 0, 1.\n    // Row 97 -> times (3, 7, 11, .. 31) for features 2, 3.\n    rhs_shmem2[threadIdx.y+96][threadIdx.x] = make_float2(rhs_pf0.w, rhs_pf1.w);\n\n    // LHS.\n    // Row 0 (time 0) -> features (0, 1), (4, 5), .. (28, 29), (32, 33), ..  (60, 61) .. (124, 125)\n    // Row 1 (time 1) -> features (0, 1), (4, 5), .. (28, 29), (32, 33), ..  (60, 61) .. (124, 125)\n    // ...\n    // Row 8 (time 0) -> features (2, 3), (6, 7), .. (30, 31), (34, 35), ..  (62, 63) .. (126, 127)\n    // Row 15 (time 7) -> features (2, 3), (6, 7), .. (30, 31), (34, 35), ..  (62, 63) .. (126, 127)\n\n\n#define add_vals(a_feat1, a_feat2, f1, f2, f3, f4)\\\n      results[0].x += a_feat1.x * f1.x;\\\n      results[1].x += a_feat1.x * f1.y;\\\n      results[2].x += a_feat1.x * f2.x;\\\n      results[3].x += a_feat1.x * f2.y;\\\n      results[4].x += a_feat1.x * f3.x;\\\n      results[5].x += a_feat1.x * f3.y;\\\n      results[6].x += a_feat1.x * f4.x;\\\n      results[7].x += a_feat1.x * f4.y;\\\n\\\n      results[0].y += a_feat1.y * f1.x;\\\n      results[1].y += a_feat1.y * f1.y;\\\n      results[2].y += a_feat1.y * f2.x;\\\n      results[3].y += a_feat1.y * f2.y;\\\n      results[4].y += a_feat1.y * f3.x;\\\n      results[5].y += a_feat1.y * f3.y;\\\n      results[6].y += a_feat1.y * f4.x;\\\n      results[7].y += a_feat1.y * f4.y;\\\n\\\n      results[0].z += a_feat2.x * f1.x;\\\n      results[1].z += a_feat2.x * f1.y;\\\n      results[2].z += a_feat2.x * f2.x;\\\n      results[3].z += a_feat2.x * f2.y;\\\n      results[4].z += a_feat2.x * f3.x;\\\n      results[5].z += a_feat2.x * f3.y;\\\n      results[6].z += a_feat2.x * f4.x;\\\n      results[7].z += a_feat2.x * f4.y;\\\n\\\n      results[0].w += a_feat2.y * f1.x;\\\n      results[1].w += a_feat2.y * f1.y;\\\n      results[2].w += a_feat2.y * f2.x;\\\n      results[3].w += a_feat2.y * f2.y;\\\n      results[4].w += a_feat2.y * f3.x;\\\n      results[5].w += a_feat2.y * f3.y;\\\n      results[6].w += a_feat2.y * f4.x;\\\n      results[7].w += a_feat2.y * f4.y;\\\n\n    lhs_shmem2[threadIdx.y/4][threadIdx.x+(threadIdx.y%4)*8] = make_float2(lhs_pf0.x, lhs_pf0.y);\n    lhs_shmem2[threadIdx.y/4+8][threadIdx.x+(threadIdx.y%4)*8] = make_float2(lhs_pf1.x, lhs_pf1.y);\n    lhs_shmem2[threadIdx.y/4+16][threadIdx.x+(threadIdx.y%4)*8] = make_float2(lhs_pf2.x, lhs_pf2.y);\n    lhs_shmem2[threadIdx.y/4+24][threadIdx.x+(threadIdx.y%4)*8] = make_float2(lhs_pf3.x, lhs_pf3.y);\n\n    lhs_shmem2[threadIdx.y/4 + 32][threadIdx.x+(threadIdx.y%4)*8] = make_float2(lhs_pf0.z, lhs_pf0.w);\n    lhs_shmem2[threadIdx.y/4 + 40][threadIdx.x+(threadIdx.y%4)*8] = make_float2(lhs_pf1.z, lhs_pf1.w);\n    lhs_shmem2[threadIdx.y/4 + 48][threadIdx.x+(threadIdx.y%4)*8] = make_float2(lhs_pf2.z, lhs_pf2.w);\n    lhs_shmem2[threadIdx.y/4 + 56][threadIdx.x+(threadIdx.y%4)*8] = make_float2(lhs_pf3.z, lhs_pf3.w);\n\n    __syncthreads();\n\n    // Do the multiplies.\n    #pragma unroll\n    for (int koff = 0; koff < 32; koff ++) {\n      float2 a3 = lhs_shmem2[koff][threadIdx.x + (threadIdx.y % 4) * 8];\n      float2 a4 = lhs_shmem2[koff + 32][threadIdx.x + (threadIdx.y % 4) * 8];\n\n      // first feature is at (threadIdx.y/4) * 8 last is at start + 8.\n      int start_feature = (threadIdx.y / 4) * 8;\n\n      float2 br1 = rhs_shmem2[start_feature/2 +     (koff % 4) * 32][koff/4];\n      float2 br2 = rhs_shmem2[start_feature/2 + 1 + (koff % 4) * 32][koff/4];\n      float2 br3 = rhs_shmem2[start_feature/2 + 2 + (koff % 4) * 32][koff/4];\n      float2 br4 = rhs_shmem2[start_feature/2 + 3 + (koff % 4) * 32][koff/4];\n\n      add_vals(a3, a4, br1, br2, br3, br4)\n    }\n    __syncthreads();\n  } // end loop over k\n\n  __syncthreads();\n  Index horiz_base = (threadIdx.y/4)*8+base_n;\n  if (!CHECK_LHS_BOUNDARY && !CHECK_RHS_BOUNDARY) {\n    for (int i = 0; i < 8; i++) {\n      output(lhs_vert, horiz_base + i) = results[i].x;\n      output(lhs_vert + 1, horiz_base + i) = results[i].y;\n      output(lhs_vert + 2, horiz_base + i) = results[i].z;\n      output(lhs_vert + 3, horiz_base + i) = results[i].w;\n    }\n  } else if (!CHECK_RHS_BOUNDARY) {\n    if (lhs_vert + 3 < m_size) {\n      for (int i = 0; i < 8; i++) {\n        output(lhs_vert, horiz_base + i) = results[i].x;\n        output(lhs_vert + 1, horiz_base + i) = results[i].y;\n        output(lhs_vert + 2, horiz_base + i) = results[i].z;\n        output(lhs_vert + 3, horiz_base + i) = results[i].w;\n      }\n    } else if (lhs_vert + 2 < m_size) {\n      for (int i = 0; i < 8; i++) {\n        output(lhs_vert, horiz_base + i) = results[i].x;\n        output(lhs_vert + 1, horiz_base + i) = results[i].y;\n        output(lhs_vert + 2, horiz_base + i) = results[i].z;\n      }\n    } else if (lhs_vert + 1 < m_size) {\n      for (int i = 0; i < 8; i++) {\n        output(lhs_vert, horiz_base + i) = results[i].x;\n        output(lhs_vert + 1, horiz_base + i) = results[i].y;\n      }\n    } else if (lhs_vert  < m_size) {\n      for (int i = 0; i < 8; i++) {\n        output(lhs_vert, horiz_base + i) = results[i].x;\n      }\n    }\n  } else if (!CHECK_LHS_BOUNDARY) {\n    // CHECK BOUNDARY_B\n    for (int i = 0; i < 8; i++) {\n      if (horiz_base + i < n_size) {\n        output(lhs_vert, horiz_base + i) = results[i].x;\n        output(lhs_vert + 1, horiz_base + i) = results[i].y;\n        output(lhs_vert + 2, horiz_base + i) = results[i].z;\n        output(lhs_vert + 3, horiz_base + i) = results[i].w;\n      }\n    }\n  } else {\n    // CHECK both boundaries.\n    for (int i = 0; i < 8; i++) {\n      if (horiz_base + i < n_size) {\n        if (lhs_vert < m_size)\n          output(lhs_vert, horiz_base + i) = results[i].x;\n        if (lhs_vert + 1 < m_size)\n          output(lhs_vert + 1, horiz_base + i) = results[i].y;\n        if (lhs_vert + 2 < m_size)\n          output(lhs_vert + 2, horiz_base + i) = results[i].z;\n        if (lhs_vert + 3 < m_size)\n          output(lhs_vert + 3, horiz_base + i) = results[i].w;\n      }\n    }\n  }\n}\n\n\ntemplate<typename Index, typename LhsMapper,\n         typename RhsMapper, typename OutputMapper>\n__global__ void\n#if defined(EIGEN_HIPCC)\n__launch_bounds__(256, 1)\n#else\n__launch_bounds__(256)\n#endif\nEigenFloatContractionKernel(const LhsMapper lhs, const RhsMapper rhs,\n                       const OutputMapper output,\n                       const Index m_size, const Index n_size, const Index k_size) {\n  __shared__ float2 lhs_shmem[64*32];\n  __shared__ float2 rhs_shmem[128*8];\n\n  typedef float2 LHS_MEM[64][32];\n  typedef float2 RHS_MEM[128][8];\n\n  const Index m_block_idx = blockIdx.x;\n  const Index n_block_idx = blockIdx.y;\n\n  const Index base_m = 128 * m_block_idx;\n  const Index base_n = 64 * n_block_idx;\n\n  bool check_rhs = (base_n + 63) >= n_size;\n  bool check_lhs128 = (base_m + 127) >= m_size;\n\n  if (!check_rhs) {\n    if (!check_lhs128) {\n      // >= 128 rows left\n      EigenFloatContractionKernelInternal<Index, LhsMapper, RhsMapper, OutputMapper, false, false>(\n                     lhs, rhs, output, *((LHS_MEM *) lhs_shmem), *((RHS_MEM *) rhs_shmem), m_size, n_size, k_size, base_m, base_n);\n    } else {\n      EigenFloatContractionKernelInternal<Index, LhsMapper, RhsMapper, OutputMapper, true, false>(\n                     lhs, rhs, output, *((LHS_MEM *) lhs_shmem), *((RHS_MEM *) rhs_shmem), m_size, n_size, k_size, base_m, base_n);\n    }\n  } else {\n    if (!check_lhs128) {\n      // >= 128 rows left\n      EigenFloatContractionKernelInternal<Index, LhsMapper, RhsMapper, OutputMapper, false, true>(\n                     lhs, rhs, output, *((LHS_MEM *) lhs_shmem), *((RHS_MEM *) rhs_shmem), m_size, n_size, k_size, base_m, base_n);\n    } else {\n      EigenFloatContractionKernelInternal<Index, LhsMapper, RhsMapper, OutputMapper, true, true>(\n                     lhs, rhs, output, *((LHS_MEM *) lhs_shmem), *((RHS_MEM *) rhs_shmem), m_size, n_size, k_size, base_m, base_n);\n    }\n  }\n}\n\ntemplate<typename Index, typename LhsMapper,\n         typename RhsMapper, typename OutputMapper>\n__global__ void\n#if defined(EIGEN_HIPCC)\n__launch_bounds__(256, 1)\n#else\n__launch_bounds__(256)\n#endif\nEigenFloatContractionKernel16x16(const LhsMapper lhs, const RhsMapper rhs,\n                       const OutputMapper output,\n                       const Index m_size, const Index n_size, const Index k_size) {\n  __shared__ float2 lhs_shmem[32][16];\n  __shared__ float2 rhs_shmem[64][8];\n\n  const Index m_block_idx = blockIdx.x;\n  const Index n_block_idx = blockIdx.y;\n\n  const Index base_m = 64 * m_block_idx;\n  const Index base_n = 64 * n_block_idx;\n\n  if (base_m + 63 < m_size) {\n    if (base_n + 63 < n_size) {\n      EigenFloatContractionKernelInternal16x16<Index, LhsMapper, RhsMapper, OutputMapper, false, false>(lhs, rhs, output, lhs_shmem, rhs_shmem, m_size, n_size, k_size, base_m, base_n);\n    } else {\n      EigenFloatContractionKernelInternal16x16<Index, LhsMapper, RhsMapper, OutputMapper, false, true>(lhs, rhs, output, lhs_shmem, rhs_shmem, m_size, n_size, k_size, base_m, base_n);\n    }\n  } else {\n    if (base_n + 63 < n_size) {\n      EigenFloatContractionKernelInternal16x16<Index, LhsMapper, RhsMapper, OutputMapper, true, false>(lhs, rhs, output, lhs_shmem, rhs_shmem, m_size, n_size, k_size, base_m, base_n);\n    } else {\n      EigenFloatContractionKernelInternal16x16<Index, LhsMapper, RhsMapper, OutputMapper, true, true>(lhs, rhs, output, lhs_shmem, rhs_shmem, m_size, n_size, k_size, base_m, base_n);\n    }\n  }\n}\n\n\ntemplate<typename Indices, typename LeftArgType, typename RightArgType, typename OutputKernelType>\nstruct TensorEvaluator<const TensorContractionOp<Indices, LeftArgType, RightArgType, OutputKernelType>, GpuDevice> :\n    public TensorContractionEvaluatorBase<TensorEvaluator<const TensorContractionOp<Indices, LeftArgType, RightArgType, OutputKernelType>, GpuDevice> > {\n\n  typedef GpuDevice Device;\n\n  typedef TensorEvaluator<const TensorContractionOp<Indices, LeftArgType, RightArgType, OutputKernelType>, Device> Self;\n  typedef TensorContractionEvaluatorBase<Self> Base;\n\n  typedef TensorContractionOp<Indices, LeftArgType, RightArgType, OutputKernelType> XprType;\n  typedef typename internal::remove_const<typename XprType::Scalar>::type Scalar;\n  typedef typename XprType::Index Index;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, GpuDevice>::type PacketReturnType;\n\n  enum {\n    Layout = TensorEvaluator<LeftArgType, Device>::Layout,\n  };\n\n  // Most of the code is assuming that both input tensors are ColMajor. If the\n  // inputs are RowMajor, we will \"cheat\" by swapping the LHS and RHS:\n  // If we want to compute A * B = C, where A is LHS and B is RHS, the code\n  // will pretend B is LHS and A is RHS.\n  typedef typename internal::conditional<\n    static_cast<int>(Layout) == static_cast<int>(ColMajor), LeftArgType, RightArgType>::type EvalLeftArgType;\n  typedef typename internal::conditional<\n    static_cast<int>(Layout) == static_cast<int>(ColMajor), RightArgType, LeftArgType>::type EvalRightArgType;\n\n  static const int LDims =\n      internal::array_size<typename TensorEvaluator<EvalLeftArgType, Device>::Dimensions>::value;\n  static const int RDims =\n      internal::array_size<typename TensorEvaluator<EvalRightArgType, Device>::Dimensions>::value;\n  static const int ContractDims = internal::array_size<Indices>::value;\n\n  typedef array<Index, LDims> left_dim_mapper_t;\n  typedef array<Index, RDims> right_dim_mapper_t;\n\n  typedef array<Index, ContractDims> contract_t;\n  typedef array<Index, LDims - ContractDims> left_nocontract_t;\n  typedef array<Index, RDims - ContractDims> right_nocontract_t;\n\n  static const int NumDims = LDims + RDims - 2 * ContractDims;\n\n  typedef DSizes<Index, NumDims> Dimensions;\n\n  // typedefs needed in evalTo\n  typedef typename internal::remove_const<typename EvalLeftArgType::Scalar>::type LhsScalar;\n  typedef typename internal::remove_const<typename EvalRightArgType::Scalar>::type RhsScalar;\n\n  typedef TensorEvaluator<EvalLeftArgType, Device> LeftEvaluator;\n  typedef TensorEvaluator<EvalRightArgType, Device> RightEvaluator;\n\n  typedef typename LeftEvaluator::Dimensions LeftDimensions;\n  typedef typename RightEvaluator::Dimensions RightDimensions;\n\n  EIGEN_DEVICE_FUNC TensorEvaluator(const XprType& op, const Device& device) :\n      Base(op, device)\n  {\n    EIGEN_STATIC_ASSERT( (internal::is_same<OutputKernelType, const NoOpOutputKernel>::value),\n                          GPU_TENSOR_CONTRACTION_DOES_NOT_SUPPORT_OUTPUT_KERNELS);\n  }\n\n  // We need to redefine this method to make nvcc happy\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(Scalar* data) {\n    this->m_leftImpl.evalSubExprsIfNeeded(NULL);\n    this->m_rightImpl.evalSubExprsIfNeeded(NULL);\n    if (data) {\n      evalTo(data);\n      return false;\n    } else {\n      this->m_result = static_cast<Scalar *>(this->m_device.allocate(this->dimensions().TotalSize() * sizeof(Scalar)));\n      evalTo(this->m_result);\n      return true;\n    }\n  }\n\n  void evalTo(Scalar* buffer) const {\n    if (this->m_lhs_inner_dim_contiguous) {\n      if (this->m_rhs_inner_dim_contiguous) {\n        if (this->m_rhs_inner_dim_reordered) {\n          evalTyped<true, true, true, Unaligned>(buffer);\n        }\n        else {\n          evalTyped<true, true, false, Unaligned>(buffer);\n        }\n      }\n      else {\n       if (this->m_rhs_inner_dim_reordered) {\n          evalTyped<true, false, true, Unaligned>(buffer);\n        }\n        else {\n          evalTyped<true, false, false, Unaligned>(buffer);\n        }\n      }\n    }\n    else {\n      if (this->m_rhs_inner_dim_contiguous) {\n        if (this->m_rhs_inner_dim_reordered) {\n          evalTyped<false, true, true, Unaligned>(buffer);\n        }\n        else {\n          evalTyped<false, true, false, Unaligned>(buffer);\n        }\n      }\n      else {\n       if (this->m_rhs_inner_dim_reordered) {\n          evalTyped<false, false, true, Unaligned>(buffer);\n        }\n        else {\n          evalTyped<false, false, false, Unaligned>(buffer);\n        }\n      }\n    }\n  }\n\n  template <typename LhsScalar, typename RhsScalar, typename Index, typename LhsMapper, typename RhsMapper, typename OutputMapper> struct LaunchKernels {\n    static void Run(const LhsMapper& lhs, const RhsMapper& rhs, const OutputMapper& output, Index m, Index n, Index k, const GpuDevice& device) {\n    const Index m_blocks = (m + 63) / 64;\n    const Index n_blocks = (n + 63) / 64;\n    const dim3 num_blocks(m_blocks, n_blocks, 1);\n    const dim3 block_size(8, 8, 8);\n    LAUNCH_GPU_KERNEL((EigenContractionKernel<Scalar, Index, LhsMapper, RhsMapper, OutputMapper>), num_blocks, block_size, 0, device, lhs, rhs, output, m, n, k);\n    }\n  };\n\n  template <typename Index, typename LhsMapper, typename RhsMapper, typename OutputMapper> struct LaunchKernels<float, float, Index, LhsMapper, RhsMapper, OutputMapper> {\n    static void Run(const LhsMapper& lhs, const RhsMapper& rhs, const OutputMapper& output, Index m, Index n, Index k, const GpuDevice& device) {\n      if (m < 768 || n < 768) {\n        const Index m_blocks = (m + 63) / 64;\n        const Index n_blocks = (n + 63) / 64;\n        const dim3 num_blocks(m_blocks, n_blocks, 1);\n        const dim3 block_size(16, 16, 1);\n        LAUNCH_GPU_KERNEL((EigenFloatContractionKernel16x16<Index, LhsMapper, RhsMapper, OutputMapper>), num_blocks, block_size, 0, device, lhs, rhs, output, m, n, k);\n      } else {\n        const Index m_blocks = (m + 127) / 128;\n        const Index n_blocks = (n + 63) / 64;\n        const dim3 num_blocks(m_blocks, n_blocks, 1);\n        const dim3 block_size(8, 32, 1);\n        LAUNCH_GPU_KERNEL((EigenFloatContractionKernel<Index, LhsMapper, RhsMapper, OutputMapper>), num_blocks, block_size, 0, device, lhs, rhs, output, m, n, k);\n      }\n    }\n  };\n\n  template <bool lhs_inner_dim_contiguous, bool rhs_inner_dim_contiguous, bool rhs_inner_dim_reordered, int Alignment>\n  void evalTyped(Scalar* buffer) const {\n    // columns in left side, rows in right side\n    const Index k = this->m_k_size;\n    EIGEN_UNUSED_VARIABLE(k)\n\n    // rows in left side\n    const Index m = this->m_i_size;\n\n    // columns in right side\n    const Index n = this->m_j_size;\n\n    // zero out the result buffer (which must be of size at least m * n * sizeof(Scalar)\n    this->m_device.memset(buffer, 0, m * n * sizeof(Scalar));\n\n    typedef internal::TensorContractionInputMapper<LhsScalar, Index, internal::Lhs,\n                                                   LeftEvaluator, left_nocontract_t,\n                                                   contract_t, 4,\n                                                   lhs_inner_dim_contiguous,\n                                                   false, Unaligned> LhsMapper;\n\n    typedef internal::TensorContractionInputMapper<RhsScalar, Index, internal::Rhs,\n                                                   RightEvaluator, right_nocontract_t,\n                                                   contract_t, 4,\n                                                   rhs_inner_dim_contiguous,\n                                                   rhs_inner_dim_reordered, Unaligned> RhsMapper;\n\n    typedef internal::blas_data_mapper<Scalar, Index, ColMajor> OutputMapper;\n\n\n    // initialize data mappers\n    LhsMapper lhs(this->m_leftImpl, this->m_left_nocontract_strides, this->m_i_strides,\n                  this->m_left_contracting_strides, this->m_k_strides);\n\n    RhsMapper rhs(this->m_rightImpl, this->m_right_nocontract_strides, this->m_j_strides,\n                  this->m_right_contracting_strides, this->m_k_strides);\n\n    OutputMapper output(buffer, m);\n\n#if defined(EIGEN_USE_HIP)\n    setGpuSharedMemConfig(hipSharedMemBankSizeEightByte);\n#else\n    setGpuSharedMemConfig(cudaSharedMemBankSizeEightByte);\n#endif\n\n    LaunchKernels<LhsScalar, RhsScalar, Index, LhsMapper, RhsMapper, OutputMapper>::Run(lhs, rhs, output,  m, n, k, this->m_device);\n  }\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_USE_GPU and EIGEN_GPUCC\n#endif // EIGEN_CXX11_TENSOR_TENSOR_CONTRACTION_GPU_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorContractionMapper.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_CONTRACTION_MAPPER_H\n#define EIGEN_CXX11_TENSOR_TENSOR_CONTRACTION_MAPPER_H\n\nnamespace Eigen {\n\nnamespace internal {\n\nenum {\n  Rhs = 0,\n  Lhs = 1\n};\n\n/*\n * Implementation of the Eigen blas_data_mapper class for tensors.\n */\n/// The make pointer class is used by sycl in order to build the mapper class on the device. For other platform the default make pointer is used which\n/// is scalar * for CoeffLoader.\ntemplate <typename Tensor, bool HasRawAccess, template <class> class MakePointer_ = MakePointer>\nstruct CoeffLoader;\n\ntemplate <typename Scalar, typename Index, int side, typename Tensor,\n          typename nocontract_t, typename contract_t, int packet_size,\n          bool inner_dim_contiguous, bool inner_dim_reordered, int Alignment,\n          template <class> class MakePointer_ = MakePointer>\nclass BaseTensorContractionMapper;\n\ntemplate <typename Tensor, bool HasRawAccess, template <class> class MakePointer_>\nstruct CoeffLoader {\n  enum {\n    DirectOffsets = false\n  };\n\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE CoeffLoader(const Tensor& tensor) : m_tensor(tensor) { }\n\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void offsetBuffer(typename Tensor::Index) {\n    eigen_assert(false && \"unsupported\");\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE const typename MakePointer_<const typename Tensor::Scalar>::Type\n  data() const {\n    eigen_assert(false && \"unsupported\");\n    return NULL;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE typename Tensor::Scalar coeff(typename Tensor::Index index) const { return m_tensor.coeff(index); }\n\n template<int LoadMode> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n typename Tensor::PacketReturnType packet(typename Tensor::Index index) const\n  {\n    return m_tensor.template packet<LoadMode>(index);\n  }\n\n  #ifdef EIGEN_USE_SYCL\n  // The placeholder accessors require to be bound to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {\n    m_tensor.bind(cgh);\n  }\n  #endif\n\n private:\n  const Tensor m_tensor;\n};\n\ntemplate <typename Tensor, template <class> class MakePointer_>\nstruct CoeffLoader<Tensor, true, MakePointer_> {\n  enum {\n    DirectOffsets = true\n  };\n\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE CoeffLoader(const Tensor& tensor) : m_data(tensor.data()) {}\n\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void offsetBuffer(typename Tensor::Index offset) {\n    m_data += offset;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE const typename MakePointer_<const typename Tensor::Scalar>::Type\n  data() const {\n    return m_data;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE typename Tensor::Scalar coeff(typename Tensor::Index index) const { return loadConstant(m_data+index); }\n\n template<int LoadMode> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n typename Tensor::PacketReturnType packet(typename Tensor::Index index) const\n  {\n    return internal::ploadt_ro<typename Tensor::PacketReturnType, LoadMode>(m_data + index);\n  }\n\n  #ifdef EIGEN_USE_SYCL\n  // The placeholder accessors require to be bound to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {\n    m_data.bind(cgh);\n  }\n  #endif\n private:\n  typedef typename Tensor::Scalar Scalar;\n\n  typename MakePointer_<const Scalar>::Type m_data;\n};\n\ntemplate<typename Scalar, typename Index, int side,\n         typename Tensor,\n         typename nocontract_t, typename contract_t,\n         int packet_size, bool inner_dim_contiguous, int Alignment, template <class> class MakePointer_ = MakePointer>\nclass SimpleTensorContractionMapper {\n  public:\n  EIGEN_DEVICE_FUNC\n  SimpleTensorContractionMapper(const Tensor& tensor,\n                                const nocontract_t& nocontract_strides,\n                                const nocontract_t& ij_strides,\n                                const contract_t& contract_strides,\n                                const contract_t& k_strides) :\n      m_tensor(tensor),\n      m_nocontract_strides(nocontract_strides),\n      m_ij_strides(ij_strides),\n      m_contract_strides(contract_strides),\n      m_k_strides(k_strides) { }\n\n  enum {\n    DirectOffsets = CoeffLoader<Tensor, Tensor::RawAccess, MakePointer_>::DirectOffsets\n  };\n\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void offsetBuffer(typename Tensor::Index offset) {\n    m_tensor.offsetBuffer(offset);\n  }\n\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE void prefetch(Index /*i*/) { }\n\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE Scalar operator()(Index row) const {\n    // column major assumption\n    return operator()(row, 0);\n  }\n\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE Scalar operator()(Index row, Index col) const {\n    return m_tensor.coeff(computeIndex(row, col));\n  }\n\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE Index computeIndex(Index row, Index col) const {\n    const bool left = (side == Lhs);\n    EIGEN_UNUSED_VARIABLE(left); // annoying bug in g++8.1: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85963\n    Index nocontract_val = left ? row : col;\n    Index linidx = 0;\n    EIGEN_UNROLL_LOOP\n    for (int i = static_cast<int>(array_size<nocontract_t>::value) - 1; i > 0; i--) {\n      const Index idx = nocontract_val / m_ij_strides[i];\n      linidx += idx * m_nocontract_strides[i];\n      nocontract_val -= idx * m_ij_strides[i];\n    }\n    if (array_size<typename Tensor::Dimensions>::value > array_size<contract_t>::value) {\n      if (side == Lhs && inner_dim_contiguous) {\n        eigen_assert(m_nocontract_strides[0] == 1);\n        linidx += nocontract_val;\n      } else {\n        linidx += nocontract_val * m_nocontract_strides[0];\n      }\n    }\n\n    Index contract_val = left ? col : row;\n    if(array_size<contract_t>::value > 0) {\n      EIGEN_UNROLL_LOOP\n      for (int i = static_cast<int>(array_size<contract_t>::value) - 1; i > 0; i--) {\n        const Index idx = contract_val / m_k_strides[i];\n        linidx += idx * m_contract_strides[i];\n        contract_val -= idx * m_k_strides[i];\n      }\n\n      if (side == Rhs && inner_dim_contiguous) {\n        eigen_assert(m_contract_strides[0] == 1);\n        linidx += contract_val;\n      } else {\n        linidx += contract_val * m_contract_strides[0];\n      }\n    }\n\n    return linidx;\n  }\n\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE IndexPair<Index> computeIndexPair(Index row, Index col, const Index distance) const {\n    const bool left = (side == Lhs);\n    EIGEN_UNUSED_VARIABLE(left); // annoying bug in g++8.1: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85963\n    Index nocontract_val[2] = {left ? row : col, left ? row + distance : col};\n    Index linidx[2] = {0, 0};\n    if (array_size<typename Tensor::Dimensions>::value > array_size<contract_t>::value) {\n      EIGEN_UNROLL_LOOP\n      for (int i = static_cast<int>(array_size<nocontract_t>::value) - 1; i > 0; i--) {\n        const Index idx0 = nocontract_val[0] / m_ij_strides[i];\n        const Index idx1 = nocontract_val[1] / m_ij_strides[i];\n        linidx[0] += idx0 * m_nocontract_strides[i];\n        linidx[1] += idx1 * m_nocontract_strides[i];\n        nocontract_val[0] -= idx0 * m_ij_strides[i];\n        nocontract_val[1] -= idx1 * m_ij_strides[i];\n      }\n      if (side == Lhs && inner_dim_contiguous) {\n        eigen_assert(m_nocontract_strides[0] == 1);\n        linidx[0] += nocontract_val[0];\n        linidx[1] += nocontract_val[1];\n      } else {\n        linidx[0] += nocontract_val[0] * m_nocontract_strides[0];\n        linidx[1] += nocontract_val[1] * m_nocontract_strides[0];\n      }\n    }\n\n    Index contract_val[2] = {left ? col : row, left ? col : row + distance};\n    if (array_size<contract_t>::value> 0) {\n      EIGEN_UNROLL_LOOP\n      for (int i = static_cast<int>(array_size<contract_t>::value) - 1; i > 0; i--) {\n        const Index idx0 = contract_val[0] / m_k_strides[i];\n        const Index idx1 = contract_val[1] / m_k_strides[i];\n        linidx[0] += idx0 * m_contract_strides[i];\n        linidx[1] += idx1 * m_contract_strides[i];\n        contract_val[0] -= idx0 * m_k_strides[i];\n        contract_val[1] -= idx1 * m_k_strides[i];\n      }\n\n      if (side == Rhs && inner_dim_contiguous) {\n        eigen_assert(m_contract_strides[0] == 1);\n        linidx[0] += contract_val[0];\n        linidx[1] += contract_val[1];\n      } else {\n        linidx[0] += contract_val[0] * m_contract_strides[0];\n        linidx[1] += contract_val[1] * m_contract_strides[0];\n      }\n    }\n    return IndexPair<Index>(linidx[0], linidx[1]);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Index firstAligned(Index size) const {\n    // Only claim alignment when we can compute the actual stride (ie when we're\n    // dealing with the lhs with inner_dim_contiguous. This is because the\n    // matrix-vector product relies on the stride when dealing with aligned inputs.\n    return (Alignment == Aligned) && (side == Lhs) && inner_dim_contiguous ? 0 : size;\n  }\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Index stride() const {\n    return ((side == Lhs) && inner_dim_contiguous && array_size<contract_t>::value > 0) ? m_contract_strides[0] : 1;\n  }\n\n  #ifdef EIGEN_USE_SYCL\n  // The placeholder accessors require to be bound to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {\n    m_tensor.bind(cgh);\n  }\n  #endif\n\n  const CoeffLoader<Tensor, Tensor::RawAccess, MakePointer_>& tensor() const {\n    return m_tensor;\n  }\n\n  const nocontract_t& nocontract_strides() const {\n    return m_nocontract_strides;\n  }\n  const nocontract_t& ij_strides() const { return m_ij_strides; }\n  const contract_t& contract_strides() const { return m_contract_strides; }\n  const contract_t& k_strides() const { return m_k_strides; }\n\n protected:\n  CoeffLoader<Tensor, Tensor::RawAccess, MakePointer_> m_tensor;\n  const nocontract_t m_nocontract_strides;\n  const nocontract_t m_ij_strides;\n  const contract_t m_contract_strides;\n  const contract_t m_k_strides;\n};\n\ntemplate<typename Scalar, typename Index, int side,\n         typename Tensor,\n         typename nocontract_t, typename contract_t,\n         int packet_size, bool inner_dim_contiguous,\n         bool inner_dim_reordered, int Alignment, template <class> class MakePointer_>\nclass BaseTensorContractionMapper : public SimpleTensorContractionMapper<Scalar, Index, side, Tensor, nocontract_t, contract_t, packet_size, inner_dim_contiguous, Alignment, MakePointer_>\n{\n public:\n  typedef SimpleTensorContractionMapper<Scalar, Index, side, Tensor, nocontract_t, contract_t, packet_size, inner_dim_contiguous, Alignment, MakePointer_> ParentMapper;\n\n  EIGEN_DEVICE_FUNC\n  BaseTensorContractionMapper(const Tensor& tensor,\n                              const nocontract_t& nocontract_strides,\n                              const nocontract_t& ij_strides,\n                              const contract_t& contract_strides,\n                              const contract_t& k_strides) :\n  ParentMapper(tensor, nocontract_strides, ij_strides, contract_strides, k_strides) { }\n\n  template <typename PacketT,int AlignmentType>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  typename internal::enable_if<internal::unpacket_traits<PacketT>::size==packet_size,PacketT>::type\n  load(Index i, Index j) const\n  {\n    // whole method makes column major assumption\n\n    // don't need to add offsets for now (because operator handles that)\n    // current code assumes packet size must be a multiple of 2\n    EIGEN_STATIC_ASSERT(packet_size % 2 == 0, YOU_MADE_A_PROGRAMMING_MISTAKE);\n\n    if (Tensor::PacketAccess && inner_dim_contiguous && !inner_dim_reordered) {\n      const Index index = this->computeIndex(i, j);\n      eigen_assert(this->computeIndex(i+packet_size-1, j) == index + packet_size-1);\n      return this->m_tensor.template packet<AlignmentType>(index);\n    }\n\n    const IndexPair<Index> indexPair = this->computeIndexPair(i, j, packet_size - 1);\n    const Index first = indexPair.first;\n    const Index lastIdx = indexPair.second;\n\n    // We can always do optimized packet reads from left hand side right now, because\n    // the vertical matrix dimension on the left hand side is never contracting.\n    // On the right hand side we need to check if the contracting dimensions may have\n    // been shuffled first.\n    if (Tensor::PacketAccess &&\n        (side == Lhs || internal::array_size<contract_t>::value <= 1 || !inner_dim_reordered) &&\n        (lastIdx - first) == (packet_size - 1)) {\n\n      return this->m_tensor.template packet<AlignmentType>(first);\n    }\n\n    EIGEN_ALIGN_MAX Scalar data[packet_size];\n\n    data[0] = this->m_tensor.coeff(first);\n    EIGEN_UNROLL_LOOP\n    for (Index k = 1; k < packet_size - 1; k += 2) {\n      const IndexPair<Index> internal_pair = this->computeIndexPair(i + k, j, 1);\n      data[k] = this->m_tensor.coeff(internal_pair.first);\n      data[k + 1] = this->m_tensor.coeff(internal_pair.second);\n    }\n    data[packet_size - 1] = this->m_tensor.coeff(lastIdx);\n\n    return pload<PacketT>(data);\n  }\n\n  template <typename PacketT,int AlignmentType>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  typename internal::enable_if<internal::unpacket_traits<PacketT>::size!=packet_size,PacketT>::type\n  load(Index i, Index j) const\n  {\n    const Index requested_packet_size = internal::unpacket_traits<PacketT>::size;\n    EIGEN_ALIGN_MAX Scalar data[requested_packet_size];\n\n    const IndexPair<Index> indexPair = this->computeIndexPair(i, j, requested_packet_size - 1);\n    const Index first = indexPair.first;\n    const Index lastIdx = indexPair.second;\n\n    data[0] = this->m_tensor.coeff(first);\n    for (Index k = 1; k < requested_packet_size - 1; k += 2) {\n      const IndexPair<Index> internal_pair = this->computeIndexPair(i + k, j, 1);\n      data[k] = this->m_tensor.coeff(internal_pair.first);\n      data[k + 1] = this->m_tensor.coeff(internal_pair.second);\n    }\n    data[requested_packet_size - 1] = this->m_tensor.coeff(lastIdx);\n\n    return pload<PacketT>(data);\n  }\n\n  template <typename PacketT,int AlignmentType>\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE PacketT loadPacket(Index i, Index j) const {\n    return this->load<PacketT,AlignmentType>(i,j);\n  }\n};\n\n\ntemplate<typename Scalar, typename Index, int side,\n         typename Tensor,\n         typename nocontract_t, typename contract_t,\n         bool inner_dim_contiguous,\n         bool inner_dim_reordered, int Alignment, template <class> class MakePointer_>\nclass BaseTensorContractionMapper<Scalar, Index, side, Tensor, nocontract_t, contract_t, 1, inner_dim_contiguous, inner_dim_reordered, Alignment, MakePointer_>\n  : public SimpleTensorContractionMapper<Scalar, Index, side, Tensor, nocontract_t, contract_t, 1, inner_dim_contiguous, Alignment, MakePointer_>\n{\n public:\n  typedef SimpleTensorContractionMapper<Scalar, Index, side, Tensor, nocontract_t, contract_t, 1, inner_dim_contiguous, Alignment, MakePointer_> ParentMapper;\n\n  EIGEN_DEVICE_FUNC\n  BaseTensorContractionMapper(const Tensor& tensor,\n                              const nocontract_t& nocontract_strides,\n                              const nocontract_t& ij_strides,\n                              const contract_t& contract_strides,\n                              const contract_t& k_strides) :\n  ParentMapper(tensor, nocontract_strides, ij_strides, contract_strides, k_strides) { }\n\n  template <typename PacketT,int> EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE PacketT loadPacket(Index i, Index j) const {\n    EIGEN_ALIGN_MAX Scalar data[1];\n    data[0] = this->m_tensor.coeff(this->computeIndex(i, j));\n    return pload<PacketT>(data);\n  }\n  template <typename PacketT,int> EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE PacketT load(Index i, Index j) const {\n    EIGEN_ALIGN_MAX Scalar data[1];\n    data[0] = this->m_tensor.coeff(this->computeIndex(i, j));\n    return pload<PacketT>(data);\n  }\n};\n\n\ntemplate<typename Scalar, typename Index, int side,\n         typename Tensor,\n         typename nocontract_t, typename contract_t,\n         int packet_size,\n         bool inner_dim_contiguous, bool inner_dim_reordered, int Alignment, template <class> class MakePointer_=MakePointer>\nclass TensorContractionSubMapper {\n public:\n\n  typedef BaseTensorContractionMapper<Scalar, Index, side, Tensor, nocontract_t, contract_t, packet_size, inner_dim_contiguous, inner_dim_reordered, Alignment, MakePointer_> ParentMapper;\n  typedef TensorContractionSubMapper<Scalar, Index, side, Tensor, nocontract_t, contract_t, packet_size, inner_dim_contiguous, inner_dim_reordered, Alignment, MakePointer_> Self;\n  typedef Self LinearMapper;\n\n  enum {\n    // We can use direct offsets iff the parent mapper supports then and we can compute the strides.\n    // TODO: we should also enable direct offsets for the Rhs case.\n    UseDirectOffsets = ParentMapper::DirectOffsets && (side == Lhs) && inner_dim_contiguous && (array_size<contract_t>::value > 0)\n  };\n\n  EIGEN_DEVICE_FUNC TensorContractionSubMapper(const ParentMapper& base_mapper, Index vert_offset, Index horiz_offset)\n      : m_base_mapper(base_mapper), m_vert_offset(vert_offset), m_horiz_offset(horiz_offset) {\n    // Bake the offsets into the buffer used by the base mapper whenever possible. This avoids the need to recompute\n    // this offset every time we attempt to access a coefficient.\n    if (UseDirectOffsets) {\n      Index stride = m_base_mapper.stride();\n      m_base_mapper.offsetBuffer(vert_offset + horiz_offset * stride);\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Scalar operator()(Index i) const {\n    if (UseDirectOffsets) {\n      return m_base_mapper(i, 0);\n    }\n    return m_base_mapper(i + m_vert_offset, m_horiz_offset);\n  }\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Scalar operator()(Index i, Index j) const {\n    if (UseDirectOffsets) {\n      return m_base_mapper(i, j);\n    }\n    return m_base_mapper(i + m_vert_offset, j + m_horiz_offset);\n  }\n\n  template <typename PacketT>\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE PacketT loadPacket(Index i) const {\n    if (UseDirectOffsets) {\n      return m_base_mapper.template loadPacket<PacketT,Alignment>(i, 0);\n    }\n    return m_base_mapper.template loadPacket<PacketT,Alignment>(i + m_vert_offset, m_horiz_offset);\n  }\n\n  template <typename PacketT>\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE PacketT loadPacket(Index i, Index j) const {\n    if (UseDirectOffsets) {\n      return m_base_mapper.template loadPacket<PacketT,Alignment>(i, j);\n    }\n    return m_base_mapper.template loadPacket<PacketT,Alignment>(i + m_vert_offset, j + m_horiz_offset);\n  }\n\n  template <typename PacketT, int AlignmentType>\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE PacketT loadPacket(Index i, Index j) const {\n    if (UseDirectOffsets) {\n      return m_base_mapper.template load<PacketT,AlignmentType>(i, j);\n    }\n    return m_base_mapper.template loadPacket<PacketT,AlignmentType>(i + m_vert_offset, j + m_horiz_offset);\n  }\n\n  template <typename PacketT>\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void storePacket(Index i, const PacketT& p) const {\n    if (UseDirectOffsets) {\n      m_base_mapper.storePacket(i, 0, p);\n    }\n    m_base_mapper.storePacket(i + m_vert_offset, m_horiz_offset, p);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE LinearMapper getLinearMapper(Index i, Index j) const {\n    if (UseDirectOffsets) {\n      return LinearMapper(m_base_mapper, i, j);\n    }\n    return LinearMapper(m_base_mapper, i + m_vert_offset, j + m_horiz_offset);\n  }\n\n  template <typename PacketT, int AlignmentType>\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE PacketT load(Index i) const {\n    EIGEN_STATIC_ASSERT((internal::is_same<PacketT, PacketT>::value), YOU_MADE_A_PROGRAMMING_MISTAKE);\n    const int ActualAlignment = (AlignmentType == Aligned) && (Alignment == Aligned) ? Aligned : Unaligned;\n    if (UseDirectOffsets) {\n     return m_base_mapper.template loadPacket<PacketT,ActualAlignment>(i, 0);\n    }\n    return m_base_mapper.template loadPacket<PacketT,ActualAlignment>(i + m_vert_offset, m_horiz_offset);\n  }\n\n  template <typename PacketT>\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool aligned(Index) const {\n    return false;\n  }\n\n  #ifdef EIGEN_USE_SYCL\n  // The placeholder accessors require to be bound to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {\n    m_base_mapper.bind(cgh);\n  }\n  #endif\n\n  const ParentMapper& base_mapper() const { return m_base_mapper; }\n  Index vert_offset() const { return m_vert_offset; }\n  Index horiz_offset() const { return m_horiz_offset; }\n\n private:\n  ParentMapper m_base_mapper;\n  const Index m_vert_offset;\n  const Index m_horiz_offset;\n};\n\n\ntemplate<typename Scalar_, typename Index, int side,\n         typename Tensor,\n         typename nocontract_t, typename contract_t,\n         int packet_size,\n         bool inner_dim_contiguous, bool inner_dim_reordered, int Alignment,  template <class> class MakePointer_=MakePointer>\nclass TensorContractionInputMapper\n  : public BaseTensorContractionMapper<Scalar_, Index, side, Tensor, nocontract_t, contract_t, packet_size, inner_dim_contiguous, inner_dim_reordered, Alignment, MakePointer_> {\n\n public:\n  typedef Scalar_ Scalar;\n  typedef BaseTensorContractionMapper<Scalar, Index, side, Tensor, nocontract_t, contract_t, packet_size, inner_dim_contiguous, inner_dim_reordered, Alignment, MakePointer_> Base;\n  typedef TensorContractionSubMapper<Scalar, Index, side, Tensor, nocontract_t, contract_t, packet_size, inner_dim_contiguous, inner_dim_reordered, Alignment, MakePointer_> SubMapper;\n  typedef SubMapper VectorMapper;\n\n  EIGEN_DEVICE_FUNC TensorContractionInputMapper(const Tensor& tensor,\n                               const nocontract_t& nocontract_strides,\n                               const nocontract_t& ij_strides,\n                               const contract_t& contract_strides,\n                               const contract_t& k_strides)\n      : Base(tensor, nocontract_strides, ij_strides, contract_strides, k_strides) { }\n\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE SubMapper getSubMapper(Index i, Index j) const {\n    return SubMapper(*this, i, j);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE VectorMapper getVectorMapper(Index i, Index j) const {\n    return VectorMapper(*this, i, j);\n  }\n  \n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE const CoeffLoader<Tensor, Tensor::RawAccess, MakePointer_>& get_tensor() const {\n    return Base::m_tensor;\n  }\n};\n\n\ntemplate <typename T> struct TensorContractionInputMapperTrait;\n\ntemplate<typename Scalar_, typename Index_, int side_,\n         typename Tensor_,\n         typename nocontract_t_, typename contract_t_,\n         int packet_size_,\n         bool inner_dim_contiguous_, bool inner_dim_reordered_, int Alignment_,  template <class> class MakePointer_>\nstruct TensorContractionInputMapperTrait<TensorContractionInputMapper<Scalar_, Index_, side_, Tensor_, \n                                                    nocontract_t_, contract_t_, packet_size_, inner_dim_contiguous_, \n                                                    inner_dim_reordered_, Alignment_, MakePointer_> > {\n\n      typedef Tensor_ XprType;\n      static const bool  inner_dim_contiguous = inner_dim_contiguous_;\n      static const bool  inner_dim_reordered = inner_dim_reordered_;\n  };  \n\n\n}  // end namespace internal\n}  // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_CONTRACTION_MAPPER_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorContractionSycl.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library for linear algebra.\n//\n// Mehdi Goli    Codeplay Software Ltd.\n// Ralph Potter  Codeplay Software Ltd.\n// Luke Iwanski  Codeplay Software Ltd.\n// Contact: <eigen@codeplay.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla Public License v. 2.0. If a copy of the MPL was not\n// distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n/*****************************************************************\n * TensorContractionSycl.h\n *\n * \\brief:\n *  TensorContractionSycl.h, provides various tensor contraction kernel for SYCL backend\n *\n *****************************************************************/\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_CONTRACTION_SYCL_H\n#define EIGEN_CXX11_TENSOR_TENSOR_CONTRACTION_SYCL_H\n\nnamespace Eigen {\n\nnamespace TensorSycl {\nnamespace internal {\n\n#ifndef EIGEN_SYCL_DISABLE_GEMV\n/*!\n * \\brief TVPanelSize, a template class used for setting the panel size required for launching General TensorVector\n * contraction kernel on various hardware devices.\n *\n * \\tparam Scalar: determines the element type of the tensor/vector\n *\n * \\tparam StorageIndex  determines the Index type.\n *\n * \\tparam NCWindow: determines the number of non-contracting element to be process by each work-group\n *\n * \\tparam CFactor: determines the number of contracting element to be process by each thread\n *\n * \\tparam NCFactor: determines the number of non-contracting element to be process by each thread\n */\ntemplate <typename Scalar, typename StorageIndex, StorageIndex NCWindow, StorageIndex CFactor, StorageIndex NCFactor>\nstruct TVPanelSize {\n  // LocalThreadSizeC: determines total number of thread per workgroup for the contracting dimension\n  static EIGEN_CONSTEXPR StorageIndex LocalThreadSizeC = EIGEN_SYCL_LOCAL_THREAD_DIM0;\n  // LocalThreadSizeNC: determines total number of thread per workgroup for the non-contracting dimension\n  static EIGEN_CONSTEXPR StorageIndex LocalThreadSizeNC = EIGEN_SYCL_LOCAL_THREAD_DIM1;\n  // TileSizeDimNC: determines the tile size for the non-contracting dimension\n  static EIGEN_CONSTEXPR StorageIndex TileSizeDimNC = NCWindow / NCFactor;\n  // TileSizeDimC: determines the tile size for the contracting dimension\n  static EIGEN_CONSTEXPR StorageIndex TileSizeDimC = CFactor * LocalThreadSizeNC * LocalThreadSizeC;\n  // WorkLoadPerThreadNC : determines workload per thread for loading the non-contracting dimension\n  static EIGEN_CONSTEXPR StorageIndex WorkLoadPerThreadNC = TileSizeDimNC / LocalThreadSizeNC;\n  // WorkLoadPerThreadC: determines workload per thread for loading the non-contracting dimension\n  static EIGEN_CONSTEXPR StorageIndex WorkLoadPerThreadC = TileSizeDimC / LocalThreadSizeC;\n  // BC : determines if supporting bank conflict is required\n  static EIGEN_CONSTEXPR bool BC = false;\n};\n#endif\n\n/*!\n * \\brief TTPanelSize, a template class used for setting the panel size required for launching General Tensor Tensor\n contraction kernel on various hardware devices.\n *\n * \\tparam Scalar: determines the element type of the tensor\n *\n * \\tparam StorageIndex: determines the Index type.\n *\n * \\tparam REG_SIZE_M: determines workload per thread for loading the M dimension This can be varied based on the\n available register on a chosen device(can be controlled by EIGEN_SYCL_REG_M macro).\n *\n * \\tparam REG_SIZE_N: determines workload per thread for loading the N dimension This can be varied based on the\n available register on a chosen device(can be controlled by EIGEN_SYCL_REG_N macro).\n *\n * \\tparam TSDK: determines Tile size for dimension K. The packet size is assumed to be considered\n */\n\ntemplate <typename Scalar, typename StorageIndex, StorageIndex REG_SIZE_M, StorageIndex REG_SIZE_N, StorageIndex TSDK>\nstruct TTPanelSize {\n  // TileSizeDimK: determines Tile size for dimension K. The packet size is assumed to be considered\n  static EIGEN_CONSTEXPR StorageIndex TileSizeDimK = TSDK;\n  // WorkLoadPerThreadM : determines workload per thread for loading the M dimension This can be varied based on the\n  // available register on a chosen device(can be controlled by EIGEN_SYCL_REG_M macro//\n#ifndef EIGEN_SYCL_REG_M\n  static EIGEN_CONSTEXPR StorageIndex WorkLoadPerThreadM = REG_SIZE_M;\n#else\n  static EIGEN_CONSTEXPR StorageIndex WorkLoadPerThreadM = EIGEN_SYCL_REG_M;\n#endif\n// WorkLoadPerThreadN : determines workload per thread for loading the N dimension This can be varied based on the\n// available register on a chosen device(can be controlled by EIGEN_SYCL_REG_N macro\n#ifndef EIGEN_SYCL_REG_N\n  static EIGEN_CONSTEXPR StorageIndex WorkLoadPerThreadN = REG_SIZE_N;\n#else\n  static EIGEN_CONSTEXPR StorageIndex WorkLoadPerThreadN = EIGEN_SYCL_REG_N;\n#endif\n  // LocalThreadSizeM: determines total number of thread per workgroup for the m dimension\n  static EIGEN_CONSTEXPR StorageIndex LocalThreadSizeM = EIGEN_SYCL_LOCAL_THREAD_DIM0;\n  // LocalThreadSizeN: determines total number of thread per workgroup for the n dimension\n  static EIGEN_CONSTEXPR StorageIndex LocalThreadSizeN = EIGEN_SYCL_LOCAL_THREAD_DIM1;\n  // TileSizeDimM: determines the tile size for the m dimension\n  static EIGEN_CONSTEXPR StorageIndex TileSizeDimM = LocalThreadSizeM * WorkLoadPerThreadM;\n  // TileSizeDimN: determines the tile size for the n dimension\n  static EIGEN_CONSTEXPR StorageIndex TileSizeDimN = LocalThreadSizeN * WorkLoadPerThreadN;\n  // LoadPerThreadLhs: determines workload per thread for loading Lhs Tensor. This must be divisable by packetsize\n  static EIGEN_CONSTEXPR StorageIndex LoadPerThreadLhs =\n      ((TileSizeDimK * WorkLoadPerThreadM * WorkLoadPerThreadN) / (TileSizeDimN));\n  // LoadPerThreadRhs: determines workload per thread for loading Rhs Tensor. This must be divisable by packetsize\n  static EIGEN_CONSTEXPR StorageIndex LoadPerThreadRhs =\n      ((TileSizeDimK * WorkLoadPerThreadM * WorkLoadPerThreadN) / (TileSizeDimM));\n  // BC : determines if supporting bank conflict is required\n  static EIGEN_CONSTEXPR bool BC = true;\n  // DoubleBuffer: determines if double buffering technique should be used (This can be disabled by\n  // EIGEN_SYCL_DISABLE_DOUBLE_BUFFER macro when the device doesnot have sufficient  local memory)\n  static EIGEN_CONSTEXPR bool DoubleBuffer =\n#ifdef EIGEN_SYCL_DISABLE_DOUBLE_BUFFER\n      false;\n#else\n      true;\n#endif\n};\n\n/* !\n * \\brief contraction_type: an enum class representing the Tensor Contraction implementation algorithm. This is used to\n * specialize the contraction algorithm based on device support for dedicated local memory.\n */\nenum class contraction_type { local, no_local };\n/* !\n * \\brief data_source an enum class determining the location of the data in a memory hierarchy (global, local, private).\n */\nenum class data_source { global_mem, local_mem, private_mem };\n\n/*!\n * \\brief read, a template function used for loading the data from global\n memory. This function is used to guarantee coalesced and vectorized load whenever possible\n *\n * \\tparam PacketLoad: determines if the each element of this tensor block should be loaded in a packet mode\n *\n * \\param is_coalesced_layout: determines whether or not the Tensor data in a memory can be access coalesced and\n vectorized when possible. Coalesced memory access is a key factor in Kernel performance. When a tensor is 2d and the\n contracting dimension is 1, it is always possible to accessed tensor data coalesced and vectorized. This is the case\n when RHS(right hand side) Tensor is transposed or when LHS(left hand side) Tensor is not transposed.\n *\n * \\tparam PacketType:  determines the type of packet\n *\n * \\tparam TensorMapper: determines the input tensor mapper type\n *\n * \\tparam StorageIndex: determines the Index type\n\n * \\param tensorMapper: is the input tensor\n *\n * \\param NCIndex: is the non-contracting dim index\n *\n * \\param CIndex is the contracting dim index\n *\n * \\param ld: is the leading dimension of the flattened tensor\n */\ntemplate <bool PacketLoad, bool is_coalesced_layout, bool, typename PacketType, typename TensorMapper,\n          typename StorageIndex>\nstatic EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename ::Eigen::internal::enable_if<PacketLoad, PacketType>::type read(\n    const TensorMapper &tensorMapper, const StorageIndex &NCIndex, const StorageIndex &CIndex, const StorageIndex &ld) {\n  const StorageIndex row = (is_coalesced_layout) ? NCIndex : CIndex;\n  const StorageIndex col = (is_coalesced_layout) ? CIndex : NCIndex;\n  return tensorMapper.get_tensor().template packet<Unaligned>(row + (col * ld));\n}\n\n/*!\n * \\brief read, special overload of read function, when the read access is not vectorized\n *\n * \\tparam PacketLoad: determines if the each element of this tensor block should be loaded in a packet mode\n *\n * \\param is_coalesced_layout: determines whether or not the Tensor data in a memory can be access coalesced and\n  vectorized when possible. Coalesced memory access is a key factor in Kernel performance. When a tensor is 2d and the\n  contracting dimension is 1, it is always possible to accessed tensor data coalesced and vectorized. This is the case\n  when RHS(right hand side) Tensor is transposed or when LHS(left hand side) Tensor is not transposed.\n *\n * \\tparam PacketType: determines the type of packet\n *\n * \\tparam TensorMapper: determines the input tensor mapper type\n *\n * \\tparam StorageIndex: determines the Index type\n\n * \\param tensorMapper: is the input tensor\n *\n * \\param NCIndex: is the non-contracting dim index\n *\n * \\param CIndex: is the contracting dim index\n */\ntemplate <bool PacketLoad, bool, bool IsRhs, typename PacketType, typename TensorMapper, typename StorageIndex>\nstatic EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename ::Eigen::internal::enable_if<!PacketLoad, PacketType>::type read(\n    const TensorMapper &tensorMapper, const StorageIndex &NCIndex, const StorageIndex &CIndex, const StorageIndex &) {\n  const StorageIndex row = (IsRhs) ? CIndex : NCIndex;\n  const StorageIndex col = (IsRhs) ? NCIndex : CIndex;\n  return tensorMapper(row, col);\n}\n\n/*!\n * \\brief write, a template function used for storing the data to local memory. This function is used to guarantee\n * coalesced and vectorized store whenever possible.\n *\n * \\tparam StorageIndex: determines the Index type\n *\n * \\param ld is the leading dimension of the local memory. ld is a compile time value for the local memory\n *\n * \\tparam data_source: an enum value representing if the location of the data in a memory hierarchy.\n *\n * \\tparam PacketType:  determines the type of packet\n *\n * \\tparam DataScalar: determines the output data type\n *\n * \\param packet_data: the data to be written in the local memory\n *\n * \\param ptr: a pointer to the local memory\n *\n * \\param CIndex is the contracting dim index\n */\n\ntemplate <typename StorageIndex, StorageIndex ld, data_source dt, typename PacketType, typename DataScalar>\nstatic EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    typename ::Eigen::internal::enable_if<dt != data_source::global_mem, void>::type\n    write(PacketType &packet_data, DataScalar ptr) {\n  EIGEN_CONSTEXPR int PacketSize = Eigen::internal::unpacket_traits<PacketType>::size;\n  EIGEN_UNROLL_LOOP\n  for (int i = 0; i < PacketSize; i++) {\n    *ptr = PacketWrapper<PacketType, PacketSize>::scalarize(i, packet_data);\n    ptr += ld;\n  }\n}\n\n/*!\n * \\brief Overloading the write function for storing the data to global memory, when vectorization enabled This function\n * is used to guarantee coalesced and vectorized store whenever possible.\n *\n * \\tparam data_source: an enum value representing if the location of the data in a memory hierarchy.\n *\n * \\tparam PacketType:  determines the type of packet\n *\n * \\tparam DataScalar: determines the output data type\n *\n * \\param packet_data: the data to be written in the local memory\n *\n * \\param ptr: a pointer to the local memory\n */\n\ntemplate <data_source dt, typename PacketType, typename DataScalar>\nstatic EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename ::Eigen::internal::enable_if<\n    Eigen::internal::unpacket_traits<PacketType>::size != 1 && dt == data_source::global_mem, void>::type\nwrite(PacketType &packet_data, DataScalar *ptr) {\n  ::Eigen::internal::pstoreu<DataScalar, PacketType>(ptr, packet_data);\n}\n\n/*!\n * \\brief Overloading the write function for storing the data to global memory, when vectorization is disabled.\n *\n * \\tparam data_source: an enum value representing if the location of the data in a memory hierarchy.\n *\n * \\tparam PacketType:  determines the type of packet\n *\n * \\tparam DataScalar: determines the output data type\n *\n * \\param packet_data: the data to be written in the local memory\n *\n * \\param ptr: a pointer to the local memory\n */\ntemplate <data_source dt, typename PacketType, typename DataScalar>\nstatic EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename ::Eigen::internal::enable_if<\n    Eigen::internal::unpacket_traits<PacketType>::size == 1 && dt == data_source::global_mem, void>::type\nwrite(PacketType &packet_data, DataScalar *ptr) {\n  *ptr = packet_data;\n}\n\n/*!\n * \\brief check_boundary: is used to check the edge condition for non-internal blocks.\n *\n * \\tparam is_internal: determines if the block is internal\n */\ntemplate <bool is_internal>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool check_boundary(bool) {\n  return true;\n}\n\n/*!\n * \\brief check_boundary: specialization of the check_boundary for non-internal blocks.\n *\n * \\param cond: true when the data is in range. Otherwise false\n */\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool check_boundary<false>(bool cond) {\n  return cond;\n}\n\n/*!\n * \\brief BlockProperties is a template class that provides different characteristic of a block of each Tensor processed\n * by each workgroup.\n *\n * \\tparam is_transposed: iff true, determines whether or not the block of the Tensor is transposed\n *\n * \\tparam packet_load_: determines if the each element of this tensor block should be loaded in a packet mode\n *\n * \\tparam PacketType:  determines the type of packet\n *\n * \\tparam OutType: determines the type of each element for this block of tensor. If packet load is true, it will be\n * packetType; Otherwise it will be scalar Type\n *\n * \\param elements_per_access determines the size of each element based on OutType\n *\n * \\param is_coalesced_layout  determines whether or not the Tensor data in a memory can be access coalesced and\n * vectorized when possible. Coalesced memory access is a key factor in Kernel performance. When a tensor is 2d and the\n * contracting dimension is 1, it is always possible to accessed tensor data coalesced and vectorized. This is the case\n * when RHS(right hand side) Tensor is transposed or when LHS(left hand side) Tensor is not transposed.\n *\n * \\param nc_stride determines the stride of non-contracting dimension to access the next adjustment element within the\n * Tensor Block for each workgroup\n *\n * \\param c_stride  determines the stride of contracting dimension to access the next adjustment element within the\n * Tensor Block for each workgroup\n */\ntemplate <bool is_transposed, bool is_rhs_, bool packet_load_, typename PacketType>\nstruct BlockProperties {\n  static EIGEN_CONSTEXPR bool packet_load = packet_load_;\n  typedef typename Eigen::internal::unpacket_traits<PacketType>::type OutScalar;\n  static EIGEN_CONSTEXPR bool is_rhs = is_rhs_;\n  typedef typename Eigen::internal::conditional<packet_load, PacketType, OutScalar>::type OutType;\n  static EIGEN_CONSTEXPR int elements_per_access = Eigen::internal::unpacket_traits<OutType>::size;\n  static EIGEN_CONSTEXPR bool is_coalesced_layout = !(is_transposed ^ is_rhs);\n  static EIGEN_CONSTEXPR int nc_stride = (is_coalesced_layout ? elements_per_access : 1);\n  static EIGEN_CONSTEXPR int c_stride = (is_coalesced_layout ? 1 : elements_per_access);\n};\n\n/*!\n * \\brief ThreadProperties is a template class that provides each thread's properties within a workgroup.  Please see\n * the sycl-1.2.1 specification (https://www.khronos.org/registry/SYCL/specs/sycl-1.2.1.pdf) for the workgroup,\n * work-items\n *\n * \\tparam StorageIndex: determines the StorageIndex Type\n *\n * \\param linearLocalThreadId: determines the linearized location of a thread within a work-group\n *\n * \\param kGroupId: determines the logical group id in a k dimension of the flattened tensor. It will be > 1 when\n * tall/skinny algorithm is used\n *\n * \\param mGroupOffset: determines the logical start position of all thread within a workgroup for the m dimension of\n * the flattened tensor.\n *\n * \\param kGroupOffset determines the logical start position of all thread within a workgroup for the k dimension of the\n * flattened tensor. It will be > 1 when tall/skinny algorithm is used.\n *\n * \\param mLocalOffset: determines the logical start position of each thread within a workgroup for the m dimension of a\n * flattened tensor. The position determines the distance of each thread within the workgroup from each other\n * independent from their global position.\n *\n * \\param nLocalOffset: determines the logical start position of each thread within a workgroup for the n dimension of a\n * flattened tensor. The position determines the distance of each thread within the workgroup from each other\n * independent from their global position.\n *\n * \\param mGlobalOffset: determines the logical start position of each thread a thread for the m dimension on a\n * flattened tensor\n *\n * \\param nGlobalOffset: determines the logical start position of each thread a thread for the n dimension on a\n * flattened tensor\n *\n * \\param kSize : determine the number of the k elements of the flattened Tensor to be processed by each thread for the\n * given tensor block. This is !=K dimension of Flattened Tensor when Tall/Skinny matrix is used.\n *\n * \\param is_internal : this will determined if the thread within the work-group computes an internal block of tensor or\n * the edge blocks. When it is internal, there is no need to check the boundaries and all the if stantement can be\n * resolve by compiler.\n */\ntemplate <typename StorageIndex>\nstruct ThreadProperties {\n  const StorageIndex linearLocalThreadId;\n  const StorageIndex kGroupId;\n  const StorageIndex mGroupOffset;\n  const StorageIndex nGroupOffset;\n  const StorageIndex kGroupOffset;\n  const StorageIndex mLocalOffset;\n  const StorageIndex nLocalOffset;\n  const StorageIndex mGlobalOffset;\n  const StorageIndex nGlobalOffset;\n  StorageIndex kSize;\n  const bool is_internal;\n  // this is used to adjust the last block\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ThreadProperties(\n      const StorageIndex linearLocalThreadId_, const StorageIndex kGroupId_, const StorageIndex mGroupOffset_,\n      const StorageIndex nGroupOffset_, const StorageIndex kGroupOffset_, const StorageIndex mLocalOffset_,\n      const StorageIndex nLocalOffset_, const StorageIndex mGlobalOffset_, const StorageIndex nGlobalOffset_,\n      StorageIndex kSize_, const bool is_internal_)\n      : linearLocalThreadId(linearLocalThreadId_),\n        kGroupId(kGroupId_),\n        mGroupOffset(mGroupOffset_),\n        nGroupOffset(nGroupOffset_),\n        kGroupOffset(kGroupOffset_),\n        mLocalOffset(mLocalOffset_),\n        nLocalOffset(nLocalOffset_),\n        mGlobalOffset(mGlobalOffset_),\n        nGlobalOffset(nGlobalOffset_),\n        kSize(kSize_),\n        is_internal(is_internal_) {}\n};\n\n/*!\n * \\brief TensorContractionKernel is a template class that provides Tensor -Tensor contraction operation.\n *\n * \\tparam OutScalar: determines the output scalar type\n *\n * \\tparam LhsScalar: determines the left-hand-side scalar type\n *\n * \\tparam RhsScalar: determines the right-hand-side scalar type\n *\n * \\tparam OutAccessor: determines the sycl accessor type for out put (please see the sycl-1.2.1 specification\n (https://www.khronos.org/registry/SYCL/specs/sycl-1.2.1.pdf) for accessor definition)\n *\n * \\tparam LhsMapper determines the tensor contraction mapper type for left-hand-side matrix\n *\n * \\tparam RhsMapper determines the tensor contraction mapper type for right-hand-side matrix\n *\n * \\tparam StorageIndex: determines the StorageIndex Type\n *\n * \\tparam Properties: determines the Contraction Panel properties\n *\n * \\tparam TripleDim: determines the M, K, N dimensions for the flatten tensors in order to treat them as a matrix\n *\n * \\tparam Vectorizable: determines whether or not the vectorization is enabled for the Eigen expression.\n *\n * \\tparam input_mapper_properties : determine if the input tensors are matrix. If they are matrix, special memory\n access is used to guarantee that always the memory access are coalesced.\n *\n * \\tptaram IsFinal : determine if this is the final kernel. If so, the result will be written in a final output.\n Otherwise, the result of contraction will be written iin a temporary buffer. This is the case when Tall/Skinny\n contraction is used. So in this case, a final reduction step is required to compute final output.\n\n * \\tparam contraction_tp: it is an enum value representing whether the local memroy/no local memory implementation of\n the algorithm to be used\n *\n * \\param scratch: local memory containing tiles of LHS and RHS tensors for each work-group\n *\n * \\param lhs: determines the left-hand-side flattened tensor (tensor mapper)\n *\n * \\param rhs: determines the right-hand-side flattened tensor (tensor mapper)\n *\n * \\param out_res: determines the output tensor containing the contraction result\n *\n * \\param groupSizeM: a logical number determining the number of work-group for m dimension\n *\n * \\param groupSizeN: a logical number determining the number of work-group for n dimension\n *\n * \\param numTiles: determines total number of tiles on the k dimension\n *\n * \\param TripleDim: determines the M, K, N dimensions for the flatten tensors in order to treat them as a matrix\n */\ntemplate <typename OutScalar, typename LhsScalar, typename RhsScalar, typename OutAccessor, typename LhsMapper,\n          typename RhsMapper, typename StorageIndex, typename Properties, typename TripleDim, bool Vectorizable,\n          typename input_mapper_properties, bool IsFinal, contraction_type contraction_tp>\nclass TensorContractionKernel {\n public:\n  typedef typename Eigen::TensorSycl::internal::Vectorise<OutScalar, Eigen::SyclDevice, Vectorizable>::PacketReturnType\n      PacketReturnType;\n  static EIGEN_CONSTEXPR int PacketSize =\n      Eigen::TensorSycl::internal::Vectorise<OutScalar, Eigen::SyclDevice, Vectorizable>::PacketSize;\n  static EIGEN_CONSTEXPR bool is_lhs_transposed =\n      !::Eigen::internal::TensorContractionInputMapperTrait<LhsMapper>::inner_dim_contiguous;\n  static EIGEN_CONSTEXPR bool is_rhs_transposed =\n      !::Eigen::internal::TensorContractionInputMapperTrait<RhsMapper>::inner_dim_contiguous;\n\n  typedef BlockProperties<is_lhs_transposed, false, input_mapper_properties::is_lhs_matrix && Vectorizable,\n                          PacketReturnType>\n      LHSBlockProperties;\n\n  typedef BlockProperties<is_rhs_transposed, true, input_mapper_properties::is_rhs_matrix && Vectorizable,\n                          PacketReturnType>\n      RHSBlockProperties;\n\n  static EIGEN_CONSTEXPR StorageIndex NStride =\n      contraction_tp == contraction_type::local ? Properties::WorkLoadPerThreadN : RHSBlockProperties::nc_stride;\n\n  typedef cl::sycl::accessor<OutScalar, 1, cl::sycl::access::mode::read_write, cl::sycl::access::target::local> Scratch;\n  typedef cl::sycl::multi_ptr<OutScalar, cl::sycl::access::address_space::local_space> local_ptr;\n  typedef OutScalar * /*cl::sycl::multi_ptr<OutScalar, cl::sycl::access::address_space::private_space>*/ private_ptr;\n  typedef\n      typename ::Eigen::internal::conditional<contraction_tp == contraction_type::local, local_ptr, private_ptr>::type\n          tile_ptr;\n  static EIGEN_CONSTEXPR StorageIndex LSDL = contraction_tp == contraction_type::local\n                                                 ? Properties::TileSizeDimM + Properties::BC\n                                                 : Properties::WorkLoadPerThreadM;\n  static EIGEN_CONSTEXPR StorageIndex LSDR = contraction_tp == contraction_type::local\n                                                 ? Properties::TileSizeDimN + Properties::BC\n                                                 : Properties::WorkLoadPerThreadN;\n  static EIGEN_CONSTEXPR StorageIndex LocalOffset = Properties::LocalThreadSizeM * Properties::LocalThreadSizeN;\n\n  /**\n   * \\brief MemHolder this is a place holder struct for creating memory hierarchy in SYCL. Inside SYCL kernel it is not\n   * allowed to have dynamic memory allocation. While the local memory is created outside of the kernel and passed to\n   * the kernel as an accessor, the private memory can only allowed to be allocated statically. Since we are abstracting\n   * the TiledMemory for both local and private memory, the MemHolder structs is used as a helper to abstract out\n   * different type of memory needed when local/no_local memory computation is called.\n   *\n   * \\tparam contraction_type: it is an enum value representing whether the local memroy/no local memory implementation\n   of the algorithm to be used\n   * \\tparam the private memory size\n   * \\param ptr the tile memory pointer type\n   */\n  template <contraction_type, StorageIndex>\n  struct MemHolder {\n    tile_ptr ptr;\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE MemHolder(local_ptr block_start_ptr) : ptr(block_start_ptr) {}\n  };\n  /**\n   * \\brief specialization of memHolder class when no local memory kernel is used.\n   */\n  template <StorageIndex MemSize>\n  struct MemHolder<contraction_type::no_local, MemSize> {\n    OutScalar ptr[MemSize] = {OutScalar{0}};\n  };\n  /**\n   * \\brief TiledMemory: contains required memory pointer for loading  each tile of the TensorContraction panel from\n   * global memory to local/private memory when local/no_local algorithm used.\n   *\n   * \\param lhs_scratch_extract : determines the LHS tile memory. It is either private or local memory based on the\n   * selected contraction_type.\n   *\n   * \\param rhs_scratch_extract : determines the RHS tile memory. It is either private or local memory based on the\n   * selected contraction_type.\n   *\n   * \\param lhs_extract_index: determins the position of each thread on a local memory for lhs input. When private\n   * memory is used this is set to zero as this is not applicable in case of private memory.\n   *\n   * \\param rhs_extract_index: determins the position of each thread on a local memory for rhs input. When private\n   * memory is used this is set to zero as this is not applicable in case of private memory.\n   *\n   * \\param lhs_scratch_compute : determines the  location to load for computation for lhs_local memory. This is the\n   * same as lhs_scratch_extract for private memory.\n   *\n   * \\param rhs_scratch_compute : determines the  location to load for computation for rhs_local memory. This is the\n   * same as rhs_scratch_extract for private memory.\n   */\n  struct TiledMemory {\n    MemHolder<contraction_tp, Properties::WorkLoadPerThreadM * Properties::TileSizeDimK> lhs_scratch_extract;\n    MemHolder<contraction_tp, Properties::WorkLoadPerThreadN * Properties::TileSizeDimK> rhs_scratch_extract;\n    tile_ptr lhs_scratch_ptr_compute;\n    tile_ptr rhs_scratch_ptr_compute;\n    const std::pair<StorageIndex, StorageIndex> lhs_extract_index;\n    const std::pair<StorageIndex, StorageIndex> rhs_extract_index;\n    template <contraction_type tp = contraction_tp>\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    TiledMemory(const ThreadProperties<StorageIndex> &, local_ptr,\n                typename ::Eigen::internal::enable_if<tp == contraction_type::no_local>::type * = 0)\n        : lhs_scratch_extract{},\n          rhs_scratch_extract{},\n          lhs_scratch_ptr_compute(lhs_scratch_extract.ptr),\n          rhs_scratch_ptr_compute(rhs_scratch_extract.ptr),\n          lhs_extract_index(std::pair<StorageIndex, StorageIndex>(StorageIndex{0}, StorageIndex{0})),\n          rhs_extract_index(std::pair<StorageIndex, StorageIndex>(StorageIndex{0}, StorageIndex{0})) {}\n\n    template <contraction_type tp = contraction_tp>\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    TiledMemory(const ThreadProperties<StorageIndex> &thread_properties, local_ptr block_start_ptr,\n                typename ::Eigen::internal::enable_if<tp == contraction_type::local>::type * = 0)\n        : lhs_scratch_extract{block_start_ptr},\n          rhs_scratch_extract{lhs_scratch_extract.ptr +\n                              ((Properties::DoubleBuffer + 1) * LSDL * Properties::TileSizeDimK)},\n          lhs_scratch_ptr_compute(lhs_scratch_extract.ptr + thread_properties.mLocalOffset),\n          rhs_scratch_ptr_compute(rhs_scratch_extract.ptr + thread_properties.nLocalOffset),\n          lhs_extract_index(\n              local_id_extract<LHSBlockProperties, Properties::TileSizeDimM>(thread_properties.linearLocalThreadId)),\n          rhs_extract_index(\n              local_id_extract<RHSBlockProperties, Properties::TileSizeDimN>(thread_properties.linearLocalThreadId)) {}\n  };\n\n  Scratch scratch;\n  const LhsMapper lhs;\n  const RhsMapper rhs;\n  OutAccessor out_res;\n  const StorageIndex groupSizeM;\n  const StorageIndex groupSizeN;\n  const StorageIndex numTiles;\n  const TripleDim triple_dim;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorContractionKernel(Scratch scratch_, const LhsMapper lhs_,\n                                                                const RhsMapper rhs_, OutAccessor out_res_,\n                                                                const StorageIndex groupSizeM_,\n                                                                const StorageIndex groupSizeN_,\n                                                                const StorageIndex numTiles_,\n                                                                const TripleDim triple_dim_)\n      : scratch(scratch_),\n        lhs(lhs_),\n        rhs(rhs_),\n        out_res(out_res_),\n        groupSizeM(groupSizeM_),\n        groupSizeN(groupSizeN_),\n        numTiles(numTiles_),\n        triple_dim(triple_dim_) {}\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorContractionKernel(Scratch scratch_, const LhsMapper lhs_,\n                                                                const RhsMapper rhs_, OutAccessor out_res_,\n                                                                const StorageIndex groupSizeM_,\n                                                                const StorageIndex numTiles_,\n                                                                const TripleDim triple_dim_)\n      : TensorContractionKernel(scratch_, lhs_, rhs_, out_res_, groupSizeM_, 1, numTiles_, triple_dim_) {}\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void operator()(cl::sycl::nd_item<1> itemID) {\n    const StorageIndex linearLocalThreadId = itemID.get_local_id(0);\n    const StorageIndex nLocalThreadId = linearLocalThreadId / Properties::LocalThreadSizeM;\n    const StorageIndex mLocalThreadId = linearLocalThreadId % Properties::LocalThreadSizeM;\n    const StorageIndex mGroupId = itemID.get_group(0) % groupSizeM;\n    const StorageIndex tmp = itemID.get_group(0) / groupSizeM;\n    const StorageIndex nGroupId = IsFinal ? tmp : tmp % groupSizeN;\n    const StorageIndex kGroupId = IsFinal ? 0 : tmp / groupSizeN;\n    const StorageIndex mGroupOffset = mGroupId * Properties::TileSizeDimM;\n    const StorageIndex nGroupOffset = nGroupId * Properties::TileSizeDimN;\n    const StorageIndex mLocalOffset = PacketSize * mLocalThreadId;\n    const StorageIndex nLocalOffset = NStride * nLocalThreadId;\n    const StorageIndex mGlobalOffset = mGroupOffset + mLocalOffset;\n    const StorageIndex nGlobalOffset = nGroupOffset + nLocalOffset;\n\n    const StorageIndex kSizePerWG = IsFinal ? triple_dim.K : numTiles * Properties::TileSizeDimK;\n    StorageIndex kGroupOffset = kGroupId * kSizePerWG;\n    const bool is_internal = triple_dim.M - mGroupOffset >= Properties::TileSizeDimM &&\n                             triple_dim.N - nGroupOffset >= Properties::TileSizeDimN &&\n                             triple_dim.K - kGroupOffset >= kSizePerWG;\n    // this is used to adjust the last block\n    StorageIndex kSize = IsFinal ? triple_dim.K : std::min(kSizePerWG, triple_dim.K - kGroupOffset);\n    // This is used to find out the lats K offset so that kGroupOffset -kSize can compute the coffset for loading to\n    // tile\n    kGroupOffset += kSize;\n\n    auto thread_properties =\n        ThreadProperties<StorageIndex>(linearLocalThreadId, kGroupId, mGroupOffset, nGroupOffset, kGroupOffset,\n                                       mLocalOffset, nLocalOffset, mGlobalOffset, nGlobalOffset, kSize, is_internal);\n\n    auto out_ptr = out_res.get_pointer() + (IsFinal ? 0 : thread_properties.kGroupId * triple_dim.M * triple_dim.N);\n\n    (thread_properties.is_internal) ? compute_panel<true>(itemID, thread_properties, out_ptr)\n                                    : compute_panel<false>(itemID, thread_properties, out_ptr);\n  }\n  // The compute block computes the contraction operation private block for each thread and store the resutl in the\n  // privateRes memory of Each computation the compute block function is independent of local and no local concepts as\n  // it only compute the block on each thread's private memory space\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void compute_block_per_tile(OutScalar *lhs_block_ptr, OutScalar *rhs_block_ptr,\n                                                                    PacketReturnType *privateRes) {\n    StorageIndex idx = 0;\n    EIGEN_CONSTEXPR StorageIndex lhs_stride =\n        contraction_tp == contraction_type::local ? (PacketSize * Properties::LocalThreadSizeM) : 1;\n    EIGEN_UNROLL_LOOP\n    for (StorageIndex wLPTN = 0; wLPTN < Properties::WorkLoadPerThreadN; wLPTN++) {\n      auto rhsPacket = PacketReturnType{*(rhs_block_ptr + wLPTN)};\n      StorageIndex lhs_index = 0;\n      EIGEN_UNROLL_LOOP\n      for (StorageIndex wLPTM = 0; wLPTM < Properties::WorkLoadPerThreadM / PacketSize; wLPTM++) {\n        PacketReturnType lhsPack{};\n        Eigen::TensorSycl::internal::PacketWrapper<PacketReturnType, PacketSize>::set_packet(lhsPack,\n                                                                                             lhs_block_ptr + lhs_index);\n        privateRes[idx] = ::Eigen::internal::pmadd(lhsPack, rhsPacket, privateRes[idx]);\n\n        lhs_index += lhs_stride;\n        idx++;\n      }\n    }\n  }\n  // The store function write the computed contraction operation in the private memory of each thread to the global\n  // memory. The store function is independent of local and no local concepts s that it can be abstract out in the base\n  // class.\n  template <bool is_internal_block, StorageIndex PrivateNStride, typename OutPtr>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void store(OutPtr *out_ptr, PacketReturnType *privateRes,\n                                                   StorageIndex mGlobalOffset, StorageIndex nGlobalOffset) {\n    auto chk_bound = [&](const StorageIndex &mIndex, const StorageIndex &nIndex) EIGEN_DEVICE_FUNC {\n      return (mIndex + PacketSize - 1 < triple_dim.M && nGlobalOffset + nIndex < triple_dim.N);\n    };\n    // when local memory is not used M and N are both accessed in a coalesced way. However, when local memory is\n    // available the k*N is transposed in the local to N*K therefore, each blocks operates on blockId*\n    // WorkLoadPerThreadN slice of N\n    EIGEN_CONSTEXPR StorageIndex GlobalNStride =\n        contraction_tp == contraction_type::local ? 1 : Properties::LocalThreadSizeN;\n    EIGEN_UNROLL_LOOP\n    for (StorageIndex wLPTN = 0; wLPTN < Properties::WorkLoadPerThreadN / PrivateNStride; wLPTN++) {\n      // output leading dimension\n      StorageIndex outputLD = 0;\n      // When local memory is used the PrivateNstride is always 1 because the coalesed access on N is loaded into Local\n      // memory and extracting from local to global is the same as no transposed version. However, when local memory is\n      // not used and RHS is transposed we packetize the load for RHS.\n      EIGEN_UNROLL_LOOP\n      for (StorageIndex nId = 0; nId < PrivateNStride; nId++) {\n        StorageIndex globalRow = mGlobalOffset;\n        EIGEN_UNROLL_LOOP\n        for (StorageIndex wLPTM = 0; wLPTM < Properties::WorkLoadPerThreadM / PacketSize; wLPTM++) {\n          PacketReturnType privetOut = privateRes[wLPTM];\n          if (check_boundary<is_internal_block>(chk_bound(globalRow, nId))) {\n            // Store the final results in C. The C matrix has always M as a first StorageIndex and N as a second\n            // StorageIndex Therefore it is always coalesced layout\n            write<data_source::global_mem>(privetOut, out_ptr + outputLD + globalRow);\n          } else {\n            EIGEN_UNROLL_LOOP\n            for (StorageIndex mId = 0; mId < PacketSize; mId++) {\n              StorageIndex mOffset = globalRow + mId;\n              if (mOffset < triple_dim.M && (nGlobalOffset + nId < triple_dim.N)) {\n                out_ptr[mOffset + outputLD] =\n                    Eigen::TensorSycl::internal::PacketWrapper<PacketReturnType, PacketSize>::scalarize(mId, privetOut);\n              }\n            }\n          }\n          globalRow += (PacketSize * Properties::LocalThreadSizeM);\n        }\n        outputLD += triple_dim.M;\n        privateRes += Properties::WorkLoadPerThreadM / PacketSize;\n      }\n      out_ptr += (GlobalNStride * outputLD);\n\n      nGlobalOffset += (PrivateNStride * GlobalNStride);\n    }\n  }\n  // when no local memory is used the following extract_block will be enabled\n  template <typename InputBlockProperties, bool is_internal_block, typename Input, typename PrivateReg,\n            contraction_type contract_tp = contraction_tp>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n      typename ::Eigen::internal::enable_if<contract_tp == contraction_type::no_local>::type\n      extract_block(const Input &inpt, PrivateReg private_ptr, const std::pair<StorageIndex, StorageIndex> &,\n                    const StorageIndex &ncOffset, const StorageIndex cOffset) {\n    EIGEN_CONSTEXPR StorageIndex LocalThreadSizeNC =\n        InputBlockProperties::is_rhs ? Properties::LocalThreadSizeN : Properties::LocalThreadSizeM;\n    EIGEN_CONSTEXPR StorageIndex WorkLoadPerThreadNC =\n        InputBlockProperties::is_rhs ? Properties::WorkLoadPerThreadN : Properties::WorkLoadPerThreadM;\n    const StorageIndex &NC = InputBlockProperties::is_rhs ? triple_dim.N : triple_dim.M;\n\n    auto chk_bound = [&](const StorageIndex &CIndex, const StorageIndex &NCIndex) EIGEN_DEVICE_FUNC {\n      return ((CIndex + InputBlockProperties::c_stride - 1 < triple_dim.K) &&\n              (NCIndex + InputBlockProperties::nc_stride - 1 < NC));\n    };\n    const StorageIndex ld = InputBlockProperties::is_coalesced_layout ? NC : triple_dim.K;\n    StorageIndex cIndex = cOffset;\n\n    EIGEN_UNROLL_LOOP\n    for (StorageIndex cId = 0; cId < Properties::TileSizeDimK / InputBlockProperties::c_stride; cId++) {\n      StorageIndex ncIndex = ncOffset;\n      EIGEN_UNROLL_LOOP\n      for (StorageIndex ncId = 0; ncId < WorkLoadPerThreadNC / InputBlockProperties::nc_stride; ncId++) {\n        if (check_boundary<is_internal_block>(chk_bound(cIndex, ncIndex))) {\n          auto val =\n              read<InputBlockProperties::packet_load, InputBlockProperties::is_coalesced_layout,\n                   InputBlockProperties::is_rhs, typename InputBlockProperties::OutType>(inpt, ncIndex, cIndex, ld);\n\n          write<StorageIndex, (InputBlockProperties::is_coalesced_layout ? 1 : WorkLoadPerThreadNC),\n                data_source::private_mem>(val, private_ptr);\n        } else {\n          EIGEN_UNROLL_LOOP\n          for (StorageIndex i = 0; i < InputBlockProperties::elements_per_access; i++) {\n            const StorageIndex ncInd = ncIndex + (InputBlockProperties::is_coalesced_layout ? i : 0);\n            const StorageIndex cInd = cIndex + (InputBlockProperties::is_coalesced_layout ? 0 : i);\n            OutScalar val =\n                (ncInd < NC && cInd < triple_dim.K)\n                    ? read<false, InputBlockProperties::is_coalesced_layout, InputBlockProperties::is_rhs, OutScalar>(\n                          inpt, ncInd, cInd, ld)\n                    : OutScalar(0);\n            write<StorageIndex, (InputBlockProperties::is_coalesced_layout ? 1 : WorkLoadPerThreadNC),\n                  data_source::private_mem>(\n                val, private_ptr + (InputBlockProperties::is_coalesced_layout ? i : 0) +\n                         ((InputBlockProperties::is_coalesced_layout ? 0 : i) * WorkLoadPerThreadNC));\n          }\n        }\n\n        // if it is lhs we have to load it packetised when the packet size is > 1, because the output is coalesced. So\n        // even if M is not accessed in a coalesced mode, we have to load packet_size number of m per thread.\n        ncIndex = (!InputBlockProperties::is_rhs && InputBlockProperties::nc_stride == 1 && PacketSize != 1)\n                      ? ncOffset + (ncId + 1) % PacketSize + ((ncId + 1) / PacketSize) * LocalThreadSizeNC\n                      : (ncIndex + InputBlockProperties::nc_stride * LocalThreadSizeNC);\n        private_ptr += InputBlockProperties::nc_stride;\n      }\n      // the previous for loop ( private_ptr += (ncId * nc_stride)) has already moved ptr with one WorkLoadPerThreadNC\n      private_ptr += (InputBlockProperties::c_stride - 1) * WorkLoadPerThreadNC;\n      cIndex += InputBlockProperties::c_stride;\n    }\n  }\n  template <typename InputBlockProperties, StorageIndex TileSizeDimNC>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::pair<StorageIndex, StorageIndex> local_id_extract(\n      const StorageIndex &linearLocalThreadId) {\n    const StorageIndex localThreadNC =\n        (InputBlockProperties::is_coalesced_layout)\n            ? linearLocalThreadId % (TileSizeDimNC / InputBlockProperties::nc_stride)\n            : linearLocalThreadId / (Properties::TileSizeDimK / InputBlockProperties::c_stride);\n    const StorageIndex localThreadC =\n        (InputBlockProperties::is_coalesced_layout)\n            ? linearLocalThreadId / (TileSizeDimNC / InputBlockProperties::nc_stride)\n            : linearLocalThreadId % (Properties::TileSizeDimK / InputBlockProperties::c_stride);\n    return std::pair<StorageIndex, StorageIndex>(localThreadNC, localThreadC);\n  }\n\n  template <bool db = Properties::DoubleBuffer, contraction_type ctp = contraction_tp>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n      typename ::Eigen::internal::enable_if<db && ctp == contraction_type::local>::type\n      sync_mem(const cl::sycl::nd_item<1> &, bool &db_offset) noexcept {\n    db_offset = !db_offset;\n  }\n\n  template <bool db = Properties::DoubleBuffer, contraction_type ctp = contraction_tp>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n      typename ::Eigen::internal::enable_if<!db && ctp == contraction_type::local>::type\n      sync_mem(const cl::sycl::nd_item<1> &itemID, bool &) noexcept {\n    itemID.barrier(cl::sycl::access::fence_space::local_space);\n  }\n\n  template <contraction_type ctp = contraction_tp>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n      typename ::Eigen::internal::enable_if<ctp == contraction_type::no_local>::type\n      sync_mem(const cl::sycl::nd_item<1> &, bool &) noexcept {\n    return;\n  }\n\n  template <bool need_sync, contraction_type ctp = contraction_tp>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n      typename ::Eigen::internal::enable_if<need_sync && ctp == contraction_type::no_local>::type\n      sync_thread(const cl::sycl::nd_item<1> &\n#ifdef EIGEN_SYCL_ARM_GPU_CACHE_OPTIMISATION\n                      itemID\n#endif\n                  ) noexcept {\n#ifdef EIGEN_SYCL_ARM_GPU_CACHE_OPTIMISATION\n    itemID.barrier(cl::sycl::access::fence_spacce::local_space);\n#else\n    return;\n#endif\n  }\n  template <bool need_sync, contraction_type ctp = contraction_tp>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n      typename ::Eigen::internal::enable_if<need_sync && ctp == contraction_type::local>::type\n      sync_thread(const cl::sycl::nd_item<1> &itemID) {\n    itemID.barrier(cl::sycl::access::fence_space::local_space);\n  }\n  template <bool need_sync>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename ::Eigen::internal::enable_if<!need_sync>::type sync_thread(\n      const cl::sycl::nd_item<1> &) {\n    return;\n  }\n\n  template <bool is_internal_block>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void compute_tile_per_panel(const cl::sycl::nd_item<1> &itemID,\n                                                                    ThreadProperties<StorageIndex> &thread_properties,\n                                                                    TiledMemory &tiled_input_block,\n                                                                    PacketReturnType *privateRes, bool &db_offset) {\n    // Tiling the Rhs block from global to local memory\n    extract_block<RHSBlockProperties, is_internal_block>(\n        rhs, tiled_input_block.rhs_scratch_extract.ptr + (db_offset * Properties::TileSizeDimK * LSDR),\n        tiled_input_block.rhs_extract_index,\n        contraction_tp == contraction_type::local ? thread_properties.nGroupOffset : thread_properties.nGlobalOffset,\n        thread_properties.kGroupOffset - thread_properties.kSize);\n\n    sync_thread<contraction_tp == contraction_type::no_local>(itemID);\n\n    // Tiling the Lhs block from global to local memory\n    extract_block<LHSBlockProperties, is_internal_block>(\n        lhs, tiled_input_block.lhs_scratch_extract.ptr + (db_offset * LSDL * Properties::TileSizeDimK),\n        tiled_input_block.lhs_extract_index,\n        contraction_tp == contraction_type::local ? thread_properties.mGroupOffset : thread_properties.mGlobalOffset,\n        thread_properties.kGroupOffset - thread_properties.kSize);\n\n    // itemID.barrier(cl::sycl::access::fence_space::local_space);\n    sync_thread<contraction_tp == contraction_type::local>(itemID);\n    // switch to compute mede\n    StorageIndex lhs_offset = (db_offset * LSDL * Properties::TileSizeDimK);\n    StorageIndex rhs_offset = (db_offset * Properties::TileSizeDimK * LSDR);\n    // Loop over the values of a single tile\n    for (StorageIndex k = 0; k < Properties::TileSizeDimK; k++) {\n      compute_block_per_tile(tiled_input_block.lhs_scratch_ptr_compute + lhs_offset,\n                             tiled_input_block.rhs_scratch_ptr_compute + rhs_offset, privateRes);\n      lhs_offset += LSDL;\n      rhs_offset += LSDR;\n    }\n    // computing the K index for the next tile\n    thread_properties.kSize -= Properties::TileSizeDimK;\n    sync_mem(itemID, db_offset);\n  }\n\n  // when local memory is available the following compute_panel will be enabled\n  template <bool is_internal_block, typename OutPtr>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void compute_panel(const cl::sycl::nd_item<1> &itemID,\n                                                           ThreadProperties<StorageIndex> &thread_properties,\n                                                           OutPtr out_ptr) {\n    auto tiled_input_block = TiledMemory{thread_properties, scratch.get_pointer()};\n    // Allocate register space\n    PacketReturnType privateRes[Properties::WorkLoadPerThreadM * Properties::WorkLoadPerThreadN / PacketSize] = {\n        PacketReturnType{0}};\n    bool db_offset = 0;\n\n    while (thread_properties.kSize >= Properties::TileSizeDimK) {\n      compute_tile_per_panel<is_internal_block>(itemID, thread_properties, tiled_input_block, privateRes, db_offset);\n    }\n    if (thread_properties.kSize > 0) {\n      compute_tile_per_panel<false>(itemID, thread_properties, tiled_input_block, privateRes, db_offset);\n    }\n\n    // Storing the final results in the output\n    store<is_internal_block,\n          contraction_tp == contraction_type::local ? static_cast<StorageIndex>(1) : RHSBlockProperties::nc_stride>(\n        out_ptr + thread_properties.nGlobalOffset * triple_dim.M, privateRes, thread_properties.mGlobalOffset,\n        thread_properties.nGlobalOffset);\n  }\n  // When local memory is available the following extract_block will be enabled\n  template <typename InputBlockProperties, bool is_internal_block, typename Input, typename Local,\n            contraction_type contract_tp = contraction_tp>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n      typename ::Eigen::internal::enable_if<contract_tp == contraction_type::local>::type\n      extract_block(const Input &inpt, Local local_ptr, const std::pair<StorageIndex, StorageIndex>& local_index,\n                    const StorageIndex &ncOffset, const StorageIndex cOffset) {\n    EIGEN_CONSTEXPR StorageIndex TileSizeDimNC =\n        InputBlockProperties::is_rhs ? Properties::TileSizeDimN : Properties::TileSizeDimM;\n    EIGEN_CONSTEXPR StorageIndex LoadPerThread =\n        InputBlockProperties::is_rhs ? Properties::LoadPerThreadRhs : Properties::LoadPerThreadLhs;\n    EIGEN_CONSTEXPR StorageIndex LSD = InputBlockProperties::is_rhs ? LSDR : LSDL;\n    static_assert(((LocalOffset % (TileSizeDimNC / InputBlockProperties::nc_stride) == 0) &&\n                   (LocalOffset % (Properties::TileSizeDimK / InputBlockProperties::c_stride) == 0)),\n                  \" LocalOffset must be divisable by stride\");\n    const StorageIndex &NC = InputBlockProperties::is_rhs ? triple_dim.N : triple_dim.M;\n    StorageIndex localThreadNC = local_index.first;\n    StorageIndex localThreadC = local_index.second;\n    auto chk_bound = [&](const StorageIndex &CIndex, const StorageIndex &NCIndex) EIGEN_DEVICE_FUNC {\n      return ((CIndex + InputBlockProperties::c_stride - 1 < triple_dim.K) &&\n              (NCIndex + InputBlockProperties::nc_stride - 1 < NC));\n    };\n    EIGEN_UNROLL_LOOP\n    for (StorageIndex lPT = 0; lPT < LoadPerThread / InputBlockProperties::elements_per_access; lPT++) {\n      const StorageIndex CIndex = cOffset + (InputBlockProperties::c_stride * localThreadC);\n      const StorageIndex NCIndex = ncOffset + (InputBlockProperties::nc_stride * localThreadNC);\n      const StorageIndex ld = InputBlockProperties::is_coalesced_layout ? NC : triple_dim.K;\n      if (check_boundary<is_internal_block>(chk_bound(CIndex, NCIndex))) {\n        auto val =\n            read<InputBlockProperties::packet_load, InputBlockProperties::is_coalesced_layout,\n                 InputBlockProperties::is_rhs, typename InputBlockProperties::OutType>(inpt, NCIndex, CIndex, ld);\n        write<StorageIndex, (InputBlockProperties::is_coalesced_layout ? 1 : LSD), data_source::local_mem>(\n            val, local_ptr + (InputBlockProperties::nc_stride * localThreadNC) +\n                     (InputBlockProperties::c_stride * localThreadC * LSD));\n      } else {\n        EIGEN_UNROLL_LOOP\n        for (StorageIndex i = 0; i < InputBlockProperties::elements_per_access; i++) {\n          const StorageIndex nCInd = NCIndex + (InputBlockProperties::is_coalesced_layout ? i : 0);\n          const StorageIndex cInd = CIndex + (InputBlockProperties::is_coalesced_layout ? 0 : i);\n          OutScalar val =\n              (nCInd < NC && cInd < triple_dim.K)\n                  ? read<false, InputBlockProperties::is_coalesced_layout, InputBlockProperties::is_rhs, OutScalar>(\n                        inpt, nCInd, cInd, ld)\n                  : OutScalar(0);\n\n          write<StorageIndex, (InputBlockProperties::is_coalesced_layout ? 1 : LSD), data_source::local_mem>(\n              val, local_ptr + (InputBlockProperties::nc_stride * localThreadNC) +\n                       (InputBlockProperties::is_coalesced_layout ? i : 0) +\n                       ((InputBlockProperties::c_stride * localThreadC +\n                         (InputBlockProperties::is_coalesced_layout ? 0 : i)) *\n                        LSD));\n        }\n      }\n      localThreadNC += (InputBlockProperties::is_coalesced_layout)\n                           ? LocalOffset % (TileSizeDimNC / InputBlockProperties::nc_stride)\n                           : LocalOffset / (Properties::TileSizeDimK / InputBlockProperties::c_stride);\n      localThreadC += (InputBlockProperties::is_coalesced_layout)\n                          ? LocalOffset / (TileSizeDimNC / InputBlockProperties::nc_stride)\n                          : LocalOffset % (Properties::TileSizeDimK / InputBlockProperties::c_stride);\n    }\n  }\n};\n\n#ifndef EIGEN_SYCL_DISABLE_GEMV\n\n/*!\n * \\brief GeneralVectorTensor is a template class that provides Tensor -vector contraction operation, which is a special\n * case of Tensor Tensor contraction.\n *\n * \\tparam OutScalar: determines the output scalar type\n *\n * \\tparam OutAccessor: determines the sycl accessor type for out put (please see the sycl-1.2.1 specification\n * (https://www.khronos.org/registry/SYCL/specs/sycl-1.2.1.pdf) for accessor definition)\n *\n * \\tparam VectorMapper: determines the tensor contraction mapper for the vector input (can be lhs or rhs)\n *\n * \\tparam TensorMapper: determines the tensor contraction mapper for the tensor input (can be lhs or rhs)\n *\n * \\tparam StorageIndex: determines the StorageIndex Type\n *\n * \\tparam Properties: determines the Contraction Panel properties\n *\n * \\tparam KFactor: determines the number of elements in K dimension in a Tile\n *\n * \\tparam Vectorizable: determines whether or not the vectorization is enabled for the Eigen expression.\n *\n * \\tparam is_lhs_vec: determines whether lhs is a vector or rhs is a vector\n *\n * \\tparam IsFinal: determine if this is the final kernel. If so, the result will be written in a final output.\n * Otherwise, the result of contraction will be written iin a temporary buffer.\n *\n * \\param scratch: determines the local memory containing the vector block for each work-group\n *\n * \\param vec: determines the vector input (tensor mapper)\n *\n * \\param mat: determines the tensor input (tensor mapper)\n *\n * \\param out_res: determines the output vector containing the contraction result\n *\n * \\param nonContractGroupSize: a logical number determining the number of work-group for non-contracting dimension\n *\n * \\param nonContractDim: determines the size of non contracting dimension for the flattened tensor\n *\n * \\param contractDim: determines the size of non contracting dimension for the flattened tensor\n *\n */\ntemplate <typename OutScalar, typename OutAccessor, typename VectorMapper, typename TensorMapper, typename StorageIndex,\n          typename Properties, StorageIndex KFactor, bool Vectorizable, bool is_lhs_vec, bool IsFinal>\nstruct GeneralVectorTensor {\n  typedef typename Eigen::TensorSycl::internal::Vectorise<OutScalar, Eigen::SyclDevice, Vectorizable>::PacketReturnType\n      PacketReturnType;\n  static EIGEN_CONSTEXPR int PacketSize =\n      Eigen::TensorSycl::internal::Vectorise<OutScalar, Eigen::SyclDevice, Vectorizable>::PacketSize;\n  typedef cl::sycl::accessor<OutScalar, 1, cl::sycl::access::mode::read_write, cl::sycl::access::target::local> Scratch;\n\n  static EIGEN_CONSTEXPR StorageIndex OutScratchOffset =\n      KFactor * Properties::LocalThreadSizeC * Properties::LocalThreadSizeNC;\n\n  // Since the access layout for a vector can always be coalesced, when LHS is a vector, we pass false and false to make\n  // sure that the !^ is true When RHS is a vector, we pass true and true to make sure that the !^ is true.\n  typedef BlockProperties<is_lhs_vec ? false : true, is_lhs_vec ? false : true, Vectorizable, PacketReturnType>\n      VecBlockProperties;\n\n  Scratch scratch;\n  const VectorMapper vec;\n  const TensorMapper mat;\n  OutAccessor out_res;\n  const StorageIndex nonContractGroupSize;\n  const StorageIndex nonContractDim;\n  const StorageIndex contractDim;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE GeneralVectorTensor(Scratch scratch_, const VectorMapper vec_,\n                                                            const TensorMapper mat_, OutAccessor out_res_,\n                                                            const StorageIndex nonContractGroupSize_,\n                                                            const StorageIndex nonContractDim_,\n                                                            const StorageIndex contractDim_)\n      : scratch(scratch_),\n        vec(vec_),\n        mat(mat_),\n        out_res(out_res_),\n        nonContractGroupSize(nonContractGroupSize_),\n        nonContractDim(nonContractDim_),\n        contractDim(contractDim_) {}\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void operator()(cl::sycl::nd_item<1> itemID) {\n    auto scratch_ptr = scratch.get_pointer();\n    const StorageIndex linearLocalThreadId = itemID.get_local_id(0);\n    StorageIndex nonContractId = is_lhs_vec ? linearLocalThreadId / Properties::LocalThreadSizeC\n                                            : linearLocalThreadId % Properties::LocalThreadSizeNC;\n    StorageIndex contractId = is_lhs_vec ? linearLocalThreadId % Properties::LocalThreadSizeC\n                                         : linearLocalThreadId / Properties::LocalThreadSizeNC;\n    const StorageIndex cGroupSize = itemID.get_group_range(0) / nonContractGroupSize;\n    const StorageIndex nonContractGroupId =\n        is_lhs_vec ? itemID.get_group(0) / cGroupSize : itemID.get_group(0) % nonContractGroupSize;\n    const StorageIndex contractGroupId =\n        is_lhs_vec ? itemID.get_group(0) % cGroupSize : itemID.get_group(0) / nonContractGroupSize;\n    auto out_ptr = out_res.get_pointer() + (IsFinal ? 0 : contractGroupId * nonContractDim);\n\n    const StorageIndex nonContractGroupOffset = nonContractGroupId * Properties::TileSizeDimNC;\n    const StorageIndex contractGroupOffset = contractGroupId * Properties::TileSizeDimC;\n    auto outScratchIndex = nonContractId + contractId * Properties::LocalThreadSizeNC;\n    const StorageIndex globalNonContractDimOffset = nonContractGroupOffset + nonContractId;\n    const StorageIndex globalContractDimOffset = contractGroupOffset + contractId;\n    auto local_output = scratch_ptr + OutScratchOffset;\n    const bool is_internal = nonContractDim - nonContractGroupOffset >= Properties::TileSizeDimNC &&\n                             contractDim - contractGroupOffset >= Properties::TileSizeDimC;\n    is_internal\n        ? compute_panel<true>(itemID, vec, mat, local_output, out_ptr,\n#ifdef EIGEN_SYCL_LOCAL_MEM_UNSET_OR_ON\n                              scratch_ptr, contractGroupOffset,\n#endif\n                              nonContractGroupOffset, linearLocalThreadId, contractDim, nonContractDim, contractId,\n                              nonContractId, globalContractDimOffset, globalNonContractDimOffset, outScratchIndex)\n        : compute_panel<false>(itemID, vec, mat, local_output, out_ptr,\n#ifdef EIGEN_SYCL_LOCAL_MEM_UNSET_OR_ON\n                               scratch_ptr, contractGroupOffset,\n#endif\n                               nonContractGroupOffset, linearLocalThreadId, contractDim, nonContractDim, contractId,\n                               nonContractId, globalContractDimOffset, globalNonContractDimOffset, outScratchIndex);\n  }\n  template <bool is_internal_block, typename OutPtr>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void compute_panel(\n      const cl::sycl::nd_item<1> &itemID, const VectorMapper &vec, const TensorMapper &mat, OutScalar *local_output,\n      OutPtr out_ptr,\n#ifdef EIGEN_SYCL_LOCAL_MEM_UNSET_OR_ON\n      OutScalar *scratch_ptr, const StorageIndex contractGroupOffset,\n#endif\n      const StorageIndex nonContractGroupOffset, const StorageIndex linearLocalThreadId, StorageIndex contractDim,\n      StorageIndex nonContractDim, StorageIndex contractId, StorageIndex nonContractId,\n      StorageIndex globalContractDimOffset, StorageIndex globalNonContractDimOffset, StorageIndex outScratchIndex) {\n    OutScalar outScalar[Properties::WorkLoadPerThreadNC] = {OutScalar(0)};\n    // Reading the vector\n#ifdef EIGEN_SYCL_LOCAL_MEM_UNSET_OR_ON\n    const StorageIndex vectorOffset = contractGroupOffset + linearLocalThreadId;\n    extract_block<VecBlockProperties, is_internal_block, KFactor,\n                  Properties::LocalThreadSizeNC * Properties::LocalThreadSizeC>(vec, scratch_ptr, linearLocalThreadId,\n                                                                                vectorOffset, contractDim);\n\n    itemID.barrier(cl::sycl::access::fence_space::local_space);\n    auto in_scratch_ptr = scratch_ptr + contractId;\n#endif\n\n    StorageIndex privateOffsetC = 0;\n    EIGEN_UNROLL_LOOP\n    for (StorageIndex i = 0; i < Properties::WorkLoadPerThreadC; i++) {\n      StorageIndex privateOffsetNC = 0;\n      bool contract_conds = ((globalContractDimOffset + privateOffsetC) < contractDim);\n#ifdef EIGEN_SYCL_LOCAL_MEM_UNSET_OR_ON\n      auto vecScalar = *in_scratch_ptr;\n#else\n      auto vecScalar = (check_boundary<is_internal_block>(contract_conds))\n                           ? vec(is_lhs_vec ? StorageIndex(0) : globalContractDimOffset + privateOffsetC,\n                                 is_lhs_vec ? globalContractDimOffset + privateOffsetC : StorageIndex(0))\n                           : OutScalar(0);\n#endif\n      EIGEN_UNROLL_LOOP\n      for (StorageIndex j = 0; j < Properties::WorkLoadPerThreadNC; j++) {\n        auto matScalar = (check_boundary<is_internal_block>(\n                             contract_conds && ((globalNonContractDimOffset + privateOffsetNC) < nonContractDim)))\n                             ? mat(is_lhs_vec ? globalContractDimOffset + privateOffsetC\n                                              : globalNonContractDimOffset + privateOffsetNC,\n                                   is_lhs_vec ? globalNonContractDimOffset + privateOffsetNC\n                                              : globalContractDimOffset + privateOffsetC)\n                             : OutScalar(0);\n\n        outScalar[j] = cl::sycl::mad(matScalar, vecScalar, outScalar[j]);\n        privateOffsetNC += Properties::LocalThreadSizeNC;\n      }\n      privateOffsetC += Properties::LocalThreadSizeC;\n#ifdef EIGEN_SYCL_LOCAL_MEM_UNSET_OR_ON\n      in_scratch_ptr += Properties::LocalThreadSizeC;\n#endif\n    }\n\n    auto out_scratch_ptr = local_output + outScratchIndex;\n    // Each block of 16*16 element in shared memory should reduce to 16*1\n    EIGEN_UNROLL_LOOP\n    for (StorageIndex j = 0; j < Properties::WorkLoadPerThreadNC; j++) {\n      *out_scratch_ptr = outScalar[j];\n\n      out_scratch_ptr += (Properties::LocalThreadSizeNC * Properties::LocalThreadSizeC);\n    }\n    if (is_lhs_vec) {\n      nonContractId = linearLocalThreadId % Properties::LocalThreadSizeNC;\n      contractId = linearLocalThreadId / Properties::LocalThreadSizeNC;\n      outScratchIndex = nonContractId + contractId * Properties::LocalThreadSizeNC;\n    }\n\n    out_scratch_ptr = local_output + outScratchIndex;\n    EIGEN_UNROLL_LOOP\n    for (StorageIndex j = 0; j < Properties::WorkLoadPerThreadNC; j++) {\n      EIGEN_UNROLL_LOOP\n      for (StorageIndex offset = Properties::LocalThreadSizeC >> 1; offset > 0; offset >>= 1) {\n        itemID.barrier(cl::sycl::access::fence_space::local_space);\n        if (contractId < offset) {\n          StorageIndex myNeigbourId = (Properties::LocalThreadSizeNC * offset);\n          *out_scratch_ptr += out_scratch_ptr[myNeigbourId];\n        }\n      }\n      // moving to next 16 by 16 block\n      out_scratch_ptr += (Properties::LocalThreadSizeNC * Properties::LocalThreadSizeC);\n    }\n\n    if (contractId == 0) {\n      out_scratch_ptr = local_output + nonContractId;\n      StorageIndex global_final_offset = nonContractGroupOffset + nonContractId;\n      out_ptr += global_final_offset;\n      EIGEN_UNROLL_LOOP\n      for (StorageIndex j = 0; j < Properties::WorkLoadPerThreadNC; j++) {\n        if (check_boundary<is_internal_block>(global_final_offset < nonContractDim)) {\n          auto res = *out_scratch_ptr;\n\n          *out_ptr = res;\n          out_ptr += Properties::LocalThreadSizeNC;\n        }\n        // moving to next 16 by 16 block to ge the next 16 reduced elements\n        out_scratch_ptr += (Properties::LocalThreadSizeNC * Properties::LocalThreadSizeC);\n        if (!(is_internal_block)) global_final_offset += Properties::LocalThreadSizeNC;\n      }\n    }\n  }\n\n  template <typename InputBlockProperties, bool is_internal_block, int CFactor, int GroupSize, typename Input,\n            typename Local>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void extract_block(const Input &inpt, Local *local_ptr,\n                                                                  const StorageIndex &linearLocalThreadId,\n                                                                  const StorageIndex &cOffset, const StorageIndex &C) {\n    local_ptr += InputBlockProperties::c_stride * linearLocalThreadId;\n    StorageIndex cIndex = cOffset;\n    for (StorageIndex cId = 0; cId < CFactor / InputBlockProperties::c_stride; cId++) {\n      if (check_boundary<is_internal_block>(cIndex + InputBlockProperties::c_stride - 1 < C)) {\n        auto val = read<InputBlockProperties::packet_load, InputBlockProperties::is_coalesced_layout,\n                        InputBlockProperties::is_rhs, typename InputBlockProperties::OutType>(inpt, StorageIndex(0),\n                                                                                              cIndex, StorageIndex(1));\n        write<StorageIndex, 1, data_source::local_mem>(val, local_ptr);\n      } else {\n        EIGEN_UNROLL_LOOP\n        for (StorageIndex i = 0; i < InputBlockProperties::elements_per_access; i++) {\n          OutScalar val =\n              (cIndex + i < C)\n                  ? read<false, InputBlockProperties::is_coalesced_layout, InputBlockProperties::is_rhs, OutScalar>(\n                        inpt, StorageIndex(0), cIndex + i, StorageIndex(1))\n                  : OutScalar(0);\n          write<StorageIndex, 1, data_source::local_mem>(val, local_ptr + i);\n        }\n      }\n      local_ptr += InputBlockProperties::c_stride * GroupSize;\n      cIndex += InputBlockProperties::c_stride * GroupSize;\n    }\n  }\n};\n#endif\n\n#ifndef EIGEN_SYCL_DISABLE_SCALAR\n\n/*!\n * \\brief GeneralScalarContraction is a template class that provides the scalar value of Tensor -Tensor contraction\n * operation, when all the dimensions are contracting dimensions. This Kernel reduces two tensors to an scalar\n *\n * \\tparam OutScalar: determines the output scalar type\n *\n * \\tparam LhsScalar: determines the left-hand-side scalar type\n *\n * \\tparam RhsScalar: determines the right-hand-side scalar type\n *\n * \\tparam OutAccessor: determines the sycl accessor type for out put (please see the sycl-1.2.1 specification\n * (https://www.khronos.org/registry/SYCL/specs/sycl-1.2.1.pdf) for accessor definition)\n *\n * \\tparam LhsMapper: determines the tensor contraction mapper type for left-hand-side matrix\n *\n * \\tparam RhsMapper: determines the tensor contraction mapper type for right-hand-side matrix\n *\n * \\tparam StorageIndex: determines the StorageIndex Type\n *\n * \\tparam Vectorizable: determines whether or not the vectorization is enabled for the Eigen expression.\n *\n * \\param scratch: local memory containing tiles of LHS and RHS tensors for each work-group\n *\n * \\param lhs: determines the left-hand-side flattened tensor (tensor mapper)\n *\n * \\param rhs: determines the right-hand-side flattened tensor (tensor mapper)\n *\n * \\param out_res: determines the output tensor containing the contraction result\n *\n * \\param rng: determins the total input data size\n */\ntemplate <typename OutScalar, typename LhsScalar, typename RhsScalar, typename OutAccessor, typename LhsMapper,\n          typename RhsMapper, typename StorageIndex, bool Vectorizable>\nstruct GeneralScalarContraction {\n  typedef cl::sycl::accessor<OutScalar, 1, cl::sycl::access::mode::read_write, cl::sycl::access::target::local> Scratch;\n  Scratch scratch;\n  const LhsMapper lhs;\n  const RhsMapper rhs;\n  OutAccessor out_res;\n  const StorageIndex rng;\n\n  EIGEN_DEVICE_FUNC\n  GeneralScalarContraction(Scratch scratch_, const LhsMapper lhs_, const RhsMapper rhs_, OutAccessor out_res_,\n                           const StorageIndex rng_)\n      : scratch(scratch_), lhs(lhs_), rhs(rhs_), out_res(out_res_), rng(rng_) {}\n\n  EIGEN_DEVICE_FUNC void operator()(cl::sycl::nd_item<1> itemID) {\n    auto out_ptr = out_res.get_pointer();\n    auto scratch_ptr = scratch.get_pointer().get();\n\n    StorageIndex globalid = itemID.get_global_id(0);\n    StorageIndex localid = itemID.get_local_id(0);\n    OutScalar accumulator = OutScalar(0);\n    for (StorageIndex i = globalid; i < rng; i += itemID.get_global_range(0)) {\n      accumulator = cl::sycl::mad(lhs(0, i), rhs(i, 0), accumulator);\n    }\n    auto out_scratch_ptr = scratch_ptr + localid;\n    *out_scratch_ptr = accumulator;\n    for (StorageIndex offset = itemID.get_local_range(0) >> 1; offset > 0; offset >>= 1) {\n      itemID.barrier(cl::sycl::access::fence_space::local_space);\n      if (localid < offset) {\n        *out_scratch_ptr = (accumulator += out_scratch_ptr[offset]);\n      }\n    }\n    if (localid == 0) {\n      out_ptr[itemID.get_group(0)] = accumulator;\n    }\n  }\n};\n#endif\n\n}  // namespace internal\n}  // namespace TensorSycl\n\ntemplate <typename Indices, typename LeftArgType, typename RightArgType, typename OutputKernelType>\nstruct TensorEvaluator<const TensorContractionOp<Indices, LeftArgType, RightArgType, OutputKernelType>,\n                       Eigen::SyclDevice>\n    : public TensorContractionEvaluatorBase<TensorEvaluator<\n          const TensorContractionOp<Indices, LeftArgType, RightArgType, OutputKernelType>, Eigen::SyclDevice>> {\n  static_assert(std::is_same<OutputKernelType, const NoOpOutputKernel>::value,\n                \"SYCL tensor contraction does not support output kernels.\");\n\n  typedef Eigen::SyclDevice Device;\n\n  typedef TensorEvaluator<const TensorContractionOp<Indices, LeftArgType, RightArgType, OutputKernelType>, Device> Self;\n  typedef TensorContractionEvaluatorBase<Self> Base;\n  typedef TensorContractionOp<Indices, LeftArgType, RightArgType, OutputKernelType> XprType;\n  typedef typename internal::remove_const<typename XprType::Scalar>::type Scalar;\n  typedef typename XprType::Index StorageIndex;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  typedef typename Base::Storage Storage;\n  typedef typename Base::EvaluatorPointerType EvaluatorPointerType;\n  struct TripleDim {\n    const StorageIndex M;\n    const StorageIndex N;\n    const StorageIndex K;\n    TripleDim(const StorageIndex M_, const StorageIndex N_, const StorageIndex K_) : M(M_), N(N_), K(K_) {}\n  };\n  enum {\n    Layout = TensorEvaluator<LeftArgType, Device>::Layout,\n    PacketAccess = (PacketType<CoeffReturnType, Device>::size > 1),\n    BlockAccess = false,\n  };\n\n  static EIGEN_CONSTEXPR int LDims = Base::LDims;\n  static EIGEN_CONSTEXPR int RDims = Base::RDims;\n  static EIGEN_CONSTEXPR int ContractDims = Base::ContractDims;\n\n  typedef array<StorageIndex, LDims> left_dim_mapper_t;\n  typedef array<StorageIndex, RDims> right_dim_mapper_t;\n\n  typedef array<StorageIndex, ContractDims> contract_t;\n  typedef array<StorageIndex, LDims - ContractDims> left_nocontract_t;\n  typedef array<StorageIndex, RDims - ContractDims> right_nocontract_t;\n\n  static const int NumDims = LDims + RDims - 2 * ContractDims;\n\n  typedef DSizes<StorageIndex, NumDims> Dimensions;\n\n  typedef TensorEvaluator<typename Base::EvalLeftArgType, Device> LeftEvaluator;\n  typedef TensorEvaluator<typename Base::EvalRightArgType, Device> RightEvaluator;\n  typedef typename Eigen::internal::remove_const<typename LeftEvaluator::CoeffReturnType>::type LhsScalar;\n  typedef typename Eigen::internal::remove_const<typename RightEvaluator::CoeffReturnType>::type RhsScalar;\n\n  typedef typename LeftEvaluator::Dimensions LeftDimensions;\n  typedef typename RightEvaluator::Dimensions RightDimensions;\n\n  template <bool lhs_inner_dim_contiguous, bool rhs_inner_dim_contiguous, bool rhs_inner_dim_reordered>\n  struct input_mapper_propertis {\n    static EIGEN_CONSTEXPR bool is_lhs_matrix = (LDims == 2 && ContractDims == 1) || lhs_inner_dim_contiguous;\n    static EIGEN_CONSTEXPR bool is_rhs_matrix =\n        (RDims == 2 && ContractDims == 1) || (rhs_inner_dim_contiguous && !rhs_inner_dim_reordered);\n  };\n\n  EIGEN_DEVICE_FUNC TensorEvaluator(const XprType &op, const Device &device) : Base(op, device) {}\n\n  // We need to redefine this method to make nvcc happy\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(typename Base::EvaluatorPointerType data) {\n    this->m_leftImpl.evalSubExprsIfNeeded(NULL);\n    this->m_rightImpl.evalSubExprsIfNeeded(NULL);\n    if (!data) {\n      this->m_result = this->m_device.get(\n          static_cast<Scalar *>(this->m_device.allocate_temp(this->dimensions().TotalSize() * sizeof(Scalar))));\n      data = this->m_result;\n    }\n    evalToSycl(data);\n    return (this->m_result != NULL);\n  }\n  const Eigen::SyclDevice &device() const { return this->m_device; }\n  void evalToSycl(typename Base::EvaluatorPointerType buffer) const {\n    if (this->m_lhs_inner_dim_contiguous) {\n      if (this->m_rhs_inner_dim_contiguous) {\n        if (this->m_rhs_inner_dim_reordered) {\n          evalTyped<true, true, true, Unaligned>(buffer);\n        } else {\n          evalTyped<true, true, false, Unaligned>(buffer);\n        }\n      } else {\n        if (this->m_rhs_inner_dim_reordered) {\n          evalTyped<true, false, true, Unaligned>(buffer);\n        } else {\n          evalTyped<true, false, false, Unaligned>(buffer);\n        }\n      }\n    } else {\n      if (this->m_rhs_inner_dim_contiguous) {\n        if (this->m_rhs_inner_dim_reordered) {\n          evalTyped<false, true, true, Unaligned>(buffer);\n        } else {\n          evalTyped<false, true, false, Unaligned>(buffer);\n        }\n      } else {\n        if (this->m_rhs_inner_dim_reordered) {\n          evalTyped<false, false, true, Unaligned>(buffer);\n        } else {\n          evalTyped<false, false, false, Unaligned>(buffer);\n        }\n      }\n    }\n  }\n\n  template <bool lhs_inner_dim_contiguous, bool rhs_inner_dim_contiguous, bool rhs_inner_dim_reordered, int Alignment>\n  void evalTyped(typename Base::EvaluatorPointerType buffer) const {\n    const auto triple_dim = TripleDim{this->m_i_size, this->m_j_size, this->m_k_size};\n    typedef internal::TensorContractionInputMapper<\n        LhsScalar, StorageIndex, internal::Lhs, LeftEvaluator, left_nocontract_t, contract_t,\n        PacketType<CoeffReturnType, Device>::size, lhs_inner_dim_contiguous, false, Unaligned, MakeSYCLPointer>\n        LhsMapper;\n\n    typedef internal::TensorContractionInputMapper<RhsScalar, StorageIndex, internal::Rhs, RightEvaluator,\n                                                   right_nocontract_t, contract_t,\n                                                   PacketType<CoeffReturnType, Device>::size, rhs_inner_dim_contiguous,\n                                                   rhs_inner_dim_reordered, Unaligned, MakeSYCLPointer>\n        RhsMapper;\n\n    // initialize data mappers\n    LhsMapper lhs(this->m_leftImpl, this->m_left_nocontract_strides, this->m_i_strides,\n                  this->m_left_contracting_strides, this->m_k_strides);\n\n    RhsMapper rhs(this->m_rightImpl, this->m_right_nocontract_strides, this->m_j_strides,\n                  this->m_right_contracting_strides, this->m_k_strides);\n\n#ifndef EIGEN_SYCL_DISABLE_SCALAR\n    if (triple_dim.M == 1 && triple_dim.N == 1) {\n      launchSC(buffer, lhs, rhs, triple_dim.K);\n    } else\n#endif\n#ifndef EIGEN_SYCL_DISABLE_GEMV\n        if (triple_dim.M != 1 && triple_dim.N == 1) {\n      LaunchVT<false>(buffer, rhs, lhs, triple_dim.M, triple_dim.K);\n    } else if (triple_dim.M == 1 && triple_dim.N != 1) {\n      LaunchVT<true>(buffer, lhs, rhs, triple_dim.N, triple_dim.K);\n    } else  // This is equivalent of if (m!=1 && n!=1)\n#endif\n    {\n      typedef input_mapper_propertis<lhs_inner_dim_contiguous, rhs_inner_dim_contiguous, rhs_inner_dim_reordered>\n          inpt_mapper_properties;\n#ifndef EIGEN_SYCL_DISABLE_SKINNY\n      bool skinny = false;\n      auto platform_name = this->device().getPlatformName();\n      // This is based on empirical calculation for AMD r9-nano and Fiji\n      if (platform_name.find(\"AMD\") == 0) {\n        skinny = (triple_dim.M < triple_dim.K || triple_dim.N < triple_dim.K) &&\n                 ((triple_dim.M < 1024 && triple_dim.N < 1024) ||\n                  (uint64_t(triple_dim.M * triple_dim.N) < uint64_t(triple_dim.K)));\n      } else {\n        skinny = (((std::max(triple_dim.K, triple_dim.N) / std::min(triple_dim.K, triple_dim.N)) > 100) ||\n                  ((std::max(triple_dim.K, triple_dim.M) / std::min(triple_dim.K, triple_dim.M)) > 100) ||\n                  ((std::max(triple_dim.N, triple_dim.M) / std::min(triple_dim.N, triple_dim.M)) > 100));\n      }\n      if (skinny)\n        adjustTT<true, inpt_mapper_properties>(buffer, lhs, rhs, triple_dim);\n      else\n#endif  // EIGEN_SYCL_DISABLE_SKINNY\n        adjustTT<false, inpt_mapper_properties>(buffer, lhs, rhs, triple_dim);\n    }\n  }\n\n  template <bool skinny, typename input_mapper_properties, typename LhsMapper, typename RhsMapper>\n  void EIGEN_ALWAYS_INLINE adjustTT(EvaluatorPointerType buffer, const LhsMapper &lhs, const RhsMapper &rhs,\n                                    const TripleDim &triple_dim) const {\n#ifdef EIGEN_SYCL_LOCAL_MEM_UNSET_OR_ON\n    if (device().has_local_memory()) {\n      typedef TensorSycl::internal::TTPanelSize<CoeffReturnType, StorageIndex, 4, 4, 16> PanelParameters;\n      launchTT<TensorSycl::internal::contraction_type::local, skinny, input_mapper_properties, PanelParameters>(\n          buffer, lhs, rhs, triple_dim);\n    }\n#endif\n#ifdef EIGEN_SYCL_LOCAL_MEM_UNSET_OR_OFF\n    if (!(device().has_local_memory())) {\n      typedef TensorSycl::internal::TTPanelSize<CoeffReturnType, StorageIndex, 4, 4, 4> PanelParameters;\n      launchTT<TensorSycl::internal::contraction_type::no_local, skinny, input_mapper_properties, PanelParameters>(\n          buffer, lhs, rhs, triple_dim);\n    }\n#endif\n  }\n\n  template <TensorSycl::internal::contraction_type ct, bool skinny, typename input_mapper_properties,\n            typename Properties, typename LhsMapper, typename RhsMapper>\n  void launchTT(EvaluatorPointerType buffer, const LhsMapper &lhs, const RhsMapper &rhs,\n                const TripleDim &triple_dim) const {\n    const StorageIndex roundUpM = Eigen::TensorSycl::internal::roundUp(triple_dim.M, Properties::TileSizeDimM);\n    const StorageIndex roundUpN = Eigen::TensorSycl::internal::roundUp(triple_dim.N, Properties::TileSizeDimN);\n    const StorageIndex groupSizeM = roundUpM / Properties::TileSizeDimM;\n    const StorageIndex groupSizeN = roundUpN / Properties::TileSizeDimN;\n\n    const StorageIndex roundUpK = Eigen::TensorSycl::internal::roundUp(triple_dim.K, Properties::TileSizeDimK);\n    StorageIndex totalTilesK = roundUpK / Properties::TileSizeDimK;\n    StorageIndex groupSizeK =\n        skinny\n            ? std::max(std::min(totalTilesK,\n                                (StorageIndex)(device().getPowerOfTwo(device().getNumSyclMultiProcessors(), true) * 4) /\n                                    (groupSizeM * groupSizeN)),\n                       StorageIndex(1))\n            : StorageIndex(1);\n\n    const StorageIndex numTilesPerGroup = Eigen::TensorSycl::internal::roundUp(totalTilesK, groupSizeK) / groupSizeK;\n\n    const StorageIndex totalGroupSize = groupSizeM * groupSizeN * groupSizeK;\n\n    const StorageIndex localRange = Properties::LocalThreadSizeM * Properties::LocalThreadSizeN;\n    const StorageIndex globalRange = totalGroupSize * localRange;\n\n    const StorageIndex scratchSize = (ct == TensorSycl::internal::contraction_type::local)\n                                         ? ((Properties::DoubleBuffer + 1) *\n                                            (Properties::TileSizeDimM + Properties::BC) * (Properties::TileSizeDimK)) +\n                                               ((Properties::DoubleBuffer + 1) * (Properties::TileSizeDimK) *\n                                                (Properties::TileSizeDimN + Properties::BC))\n                                         : StorageIndex(1);\n\n    auto thread_range = cl::sycl::nd_range<1>(cl::sycl::range<1>(globalRange), cl::sycl::range<1>(localRange));\n    if (groupSizeK == 1) {\n      typedef TensorSycl::internal::TensorContractionKernel<CoeffReturnType, LhsScalar, RhsScalar, EvaluatorPointerType,\n                                                            LhsMapper, RhsMapper, StorageIndex, Properties, TripleDim,\n                                                            PacketAccess, input_mapper_properties, true, ct>\n          ContractKernelName;\n      device().template binary_kernel_launcher<CoeffReturnType, ContractKernelName>(\n          lhs, rhs, buffer, thread_range, scratchSize, groupSizeM, groupSizeN, numTilesPerGroup, triple_dim);\n    } else {\n      typedef TensorSycl::internal::TensorContractionKernel<CoeffReturnType, LhsScalar, RhsScalar, EvaluatorPointerType,\n                                                            LhsMapper, RhsMapper, StorageIndex, Properties, TripleDim,\n                                                            PacketAccess, input_mapper_properties, false, ct>\n          ContractKernelName;\n      CoeffReturnType *temp_pointer = static_cast<CoeffReturnType *>(\n          device().allocate_temp(triple_dim.M * triple_dim.N * groupSizeK * sizeof(CoeffReturnType)));\n      EvaluatorPointerType tmp_global_accessor = device().get(temp_pointer);\n\n      device().template binary_kernel_launcher<CoeffReturnType, ContractKernelName>(\n          lhs, rhs, tmp_global_accessor, thread_range, scratchSize, groupSizeM, groupSizeN, numTilesPerGroup,\n          triple_dim);\n\n      typedef Eigen::internal::SumReducer<CoeffReturnType> Op;\n      auto op = Op();\n      typedef TensorSycl::internal::SecondStepPartialReduction<CoeffReturnType, StorageIndex, EvaluatorPointerType,\n                                                               EvaluatorPointerType, Op>\n          ReductionKernel;\n\n      device().template unary_kernel_launcher<CoeffReturnType, ReductionKernel>(\n          tmp_global_accessor, buffer,\n          cl::sycl::nd_range<1>(cl::sycl::range<1>(StorageIndex(\n                                    Eigen::TensorSycl::internal::roundUp(triple_dim.M * triple_dim.N, localRange))),\n                                cl::sycl::range<1>(localRange)),\n          StorageIndex(1), op, StorageIndex(triple_dim.M * triple_dim.N), groupSizeK);\n\n      device().deallocate_temp(temp_pointer);\n    }\n  }\n\n#ifndef EIGEN_SYCL_DISABLE_GEMV\n  template <bool is_lhs_vec, typename VectorMapper, typename TensorMapper, typename StorageIndex>\n  void EIGEN_ALWAYS_INLINE LaunchVT(EvaluatorPointerType buffer, const VectorMapper &vec, const TensorMapper &mat,\n                                    StorageIndex NC, StorageIndex C) const {\n    const StorageIndex nonContractDim = NC;\n    EIGEN_CONSTEXPR StorageIndex NCFactor = 1;\n    EIGEN_CONSTEXPR StorageIndex CFactor = 1;\n    EIGEN_CONSTEXPR StorageIndex NCWindow = 16;\n    typedef Eigen::TensorSycl::internal::TVPanelSize<CoeffReturnType, StorageIndex, NCWindow, CFactor, NCFactor>\n        Properties;\n    const StorageIndex roundUpC = Eigen::TensorSycl::internal::roundUp(C, Properties::TileSizeDimC);\n    const StorageIndex cNumGroups = roundUpC / (Properties::LocalThreadSizeC * Properties::WorkLoadPerThreadC);\n    const StorageIndex roundUpNC = Eigen::TensorSycl::internal::roundUp(nonContractDim, Properties::TileSizeDimNC);\n    const StorageIndex nCNumGroups = roundUpNC / (Properties::LocalThreadSizeNC * Properties::WorkLoadPerThreadNC);\n    const StorageIndex globalRange =\n        (roundUpNC / (Properties::WorkLoadPerThreadNC)) * (roundUpC / (Properties::WorkLoadPerThreadC));\n    const StorageIndex localRange = Properties::LocalThreadSizeNC * Properties::LocalThreadSizeC;\n    const StorageIndex scratchSize =\n        (Properties::WorkLoadPerThreadNC + CFactor) * Properties::LocalThreadSizeC * Properties::LocalThreadSizeNC;\n    auto thread_range = cl::sycl::nd_range<1>(cl::sycl::range<1>(globalRange), cl::sycl::range<1>(localRange));\n    if (cNumGroups > 1) {\n      typedef Eigen::TensorSycl::internal::GeneralVectorTensor<CoeffReturnType, EvaluatorPointerType, VectorMapper,\n                                                               TensorMapper, StorageIndex, Properties, CFactor, false,\n                                                               is_lhs_vec, false>\n          ContractKernelName;\n      CoeffReturnType *temp_pointer =\n          static_cast<CoeffReturnType *>(device().allocate_temp(nonContractDim * cNumGroups * sizeof(CoeffReturnType)));\n      EvaluatorPointerType tmp_global_accessor = device().get(temp_pointer);\n\n      device().template binary_kernel_launcher<CoeffReturnType, ContractKernelName>(\n          vec, mat, tmp_global_accessor, thread_range, scratchSize, nCNumGroups, nonContractDim, C);\n\n      typedef Eigen::internal::SumReducer<CoeffReturnType> Op;\n      typedef TensorSycl::internal::SecondStepPartialReduction<CoeffReturnType, StorageIndex, EvaluatorPointerType,\n                                                               EvaluatorPointerType, Op>\n          ReductionKernel;\n\n      device().template unary_kernel_launcher<CoeffReturnType, ReductionKernel>(\n          tmp_global_accessor, buffer,\n          cl::sycl::nd_range<1>(cl::sycl::range<1>(Eigen::TensorSycl::internal::roundUp(nonContractDim, localRange)),\n                                cl::sycl::range<1>(localRange)),\n          StorageIndex(1), Op(), nonContractDim, cNumGroups);\n\n      device().deallocate_temp(temp_pointer);\n    } else {\n      typedef Eigen::TensorSycl::internal::GeneralVectorTensor<CoeffReturnType, EvaluatorPointerType, VectorMapper,\n                                                               TensorMapper, StorageIndex, Properties, CFactor, false,\n                                                               is_lhs_vec, true>\n          ContractKernelName;\n      device().template binary_kernel_launcher<CoeffReturnType, ContractKernelName>(\n          vec, mat, buffer, thread_range, scratchSize, nCNumGroups, nonContractDim, C);\n    }\n  }\n#endif\n\n#ifndef EIGEN_SYCL_DISABLE_SCALAR\n  template <typename LhsMapper, typename RhsMapper>\n  EIGEN_ALWAYS_INLINE void launchSC(EvaluatorPointerType buffer, const LhsMapper &lhs, const RhsMapper &rhs,\n                                    StorageIndex K) const {\n    EIGEN_STATIC_ASSERT(!((EIGEN_SYCL_LOCAL_THREAD_DIM0 * EIGEN_SYCL_LOCAL_THREAD_DIM1) &\n                          (EIGEN_SYCL_LOCAL_THREAD_DIM0 * EIGEN_SYCL_LOCAL_THREAD_DIM1 - 1)),\n                        \"The Local thread size must be a power of 2 for the reduction \"\n                        \"operation\");\n    EIGEN_CONSTEXPR StorageIndex local_range = EIGEN_SYCL_LOCAL_THREAD_DIM0 * EIGEN_SYCL_LOCAL_THREAD_DIM1;\n\n    // Here we force the code not to be more than 2-step reduction: Our empirical research shows that if each thread\n    // reduces at least 512 elementss individually, we get better performance.\n    const StorageIndex num_work_group = ((K + (512 * local_range - 1)) / (512 * local_range) > 1 ? local_range : 1);\n    const StorageIndex global_range = num_work_group * local_range;\n\n    typedef Eigen::TensorSycl::internal::GeneralScalarContraction<\n        CoeffReturnType, LhsScalar, RhsScalar, EvaluatorPointerType, LhsMapper, RhsMapper, StorageIndex, false>\n        ContractKernelName;\n    auto thread_range = cl::sycl::nd_range<1>(cl::sycl::range<1>(global_range), cl::sycl::range<1>(local_range));\n    if (num_work_group > 1) {\n      CoeffReturnType *temp_pointer =\n          static_cast<CoeffReturnType *>(device().allocate_temp(num_work_group * sizeof(CoeffReturnType)));\n      EvaluatorPointerType tmp_global_accessor = device().get(temp_pointer);\n      device().template binary_kernel_launcher<CoeffReturnType, ContractKernelName>(lhs, rhs, tmp_global_accessor,\n                                                                                    thread_range, local_range, K);\n      typedef Eigen::internal::SumReducer<CoeffReturnType> Op;\n      typedef TensorSycl::internal::SecondStepFullReducer<CoeffReturnType, Op, EvaluatorPointerType,\n                                                          EvaluatorPointerType, StorageIndex, local_range>\n          GenericRKernel;\n      device().template unary_kernel_launcher<CoeffReturnType, GenericRKernel>(\n          tmp_global_accessor, buffer,\n          cl::sycl::nd_range<1>(cl::sycl::range<1>(local_range), cl::sycl::range<1>(local_range)), local_range, Op());\n\n      device().deallocate_temp(temp_pointer);\n    } else {\n      device().template binary_kernel_launcher<CoeffReturnType, ContractKernelName>(lhs, rhs, buffer, thread_range,\n                                                                                    local_range, K);\n    }\n  }\n#endif\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {\n    this->m_leftImpl.cleanup();\n    this->m_rightImpl.cleanup();\n\n    if (this->m_result) {\n      this->m_device.deallocate_temp(this->m_result);\n      this->m_result = NULL;\n    }\n  }\n  // The placeholder accessors must bound to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {\n    this->m_leftImpl.bind(cgh);\n    this->m_rightImpl.bind(cgh);\n    this->m_result.bind(cgh);\n  }\n};\n}  // namespace Eigen\n#endif  // EIGEN_CXX11_TENSOR_TENSOR_CONTRACTION_SYCL_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_CONTRACTION_THREAD_POOL_H\n#define EIGEN_CXX11_TENSOR_TENSOR_CONTRACTION_THREAD_POOL_H\n\n// evaluator for thread pool device\n#ifdef EIGEN_USE_THREADS\n\nnamespace Eigen {\n\ntemplate<typename Indices, typename LeftArgType, typename RightArgType, typename OutputKernelType>\nstruct TensorEvaluator<const TensorContractionOp<Indices, LeftArgType, RightArgType, OutputKernelType>, ThreadPoolDevice> :\n    public TensorContractionEvaluatorBase<TensorEvaluator<const TensorContractionOp<Indices, LeftArgType, RightArgType, OutputKernelType>, ThreadPoolDevice> > {\n\n  typedef ThreadPoolDevice Device;\n\n  typedef TensorEvaluator<const TensorContractionOp<Indices, LeftArgType, RightArgType, OutputKernelType>, Device> Self;\n  typedef TensorContractionEvaluatorBase<Self> Base;\n\n  typedef TensorContractionOp<Indices, LeftArgType, RightArgType, OutputKernelType> XprType;\n  typedef typename internal::remove_const<typename XprType::Scalar>::type Scalar;\n  typedef typename XprType::Index Index;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n\n  enum {\n    Layout = TensorEvaluator<LeftArgType, Device>::Layout,\n  };\n\n  // Most of the code is assuming that both input tensors are ColMajor. If the\n  // inputs are RowMajor, we will \"cheat\" by swapping the LHS and RHS:\n  // If we want to compute A * B = C, where A is LHS and B is RHS, the code\n  // will pretend B is LHS and A is RHS.\n  typedef typename internal::conditional<\n    static_cast<int>(Layout) == static_cast<int>(ColMajor), LeftArgType, RightArgType>::type EvalLeftArgType;\n  typedef typename internal::conditional<\n    static_cast<int>(Layout) == static_cast<int>(ColMajor), RightArgType, LeftArgType>::type EvalRightArgType;\n\n  static const int LDims =\n      internal::array_size<typename TensorEvaluator<EvalLeftArgType, Device>::Dimensions>::value;\n  static const int RDims =\n      internal::array_size<typename TensorEvaluator<EvalRightArgType, Device>::Dimensions>::value;\n  static const int ContractDims = internal::array_size<Indices>::value;\n\n  typedef array<Index, LDims> left_dim_mapper_t;\n  typedef array<Index, RDims> right_dim_mapper_t;\n\n  typedef array<Index, ContractDims> contract_t;\n  typedef array<Index, LDims - ContractDims> left_nocontract_t;\n  typedef array<Index, RDims - ContractDims> right_nocontract_t;\n\n  static const int NumDims = LDims + RDims - 2 * ContractDims;\n\n  typedef DSizes<Index, NumDims> Dimensions;\n\n  // typedefs needed in evalTo\n  typedef typename internal::remove_const<typename EvalLeftArgType::Scalar>::type LhsScalar;\n  typedef typename internal::remove_const<typename EvalRightArgType::Scalar>::type RhsScalar;\n  typedef typename internal::gebp_traits<LhsScalar, RhsScalar> Traits;\n\n  typedef TensorEvaluator<EvalLeftArgType, Device> LeftEvaluator;\n  typedef TensorEvaluator<EvalRightArgType, Device> RightEvaluator;\n\n  TensorEvaluator(const XprType& op, const Device& device) :\n      Base(op, device) {}\n\n  template <int Alignment>\n  void evalProduct(Scalar* buffer) const {\n    evalProductImpl<NoCallback, Alignment>(buffer, NoCallback());\n  }\n\n  template <typename EvalToCallback, int Alignment>\n  void evalProductAsync(Scalar* buffer, EvalToCallback done) const {\n    evalProductImpl<EvalToCallback, Alignment>(buffer, std::move(done));\n  }\n\n  template <typename DoneCallback, int Alignment>\n  void evalProductImpl(Scalar* buffer, DoneCallback done) const {\n    // This function computes a lot of heuristics in multiple steps, and it\n    // also has multiple exit points. To keep it sane, readable and all in one\n    // place, sync/async execution decision is made at runtime at the very end.\n    //\n    // (1) In sync mode we allocate Context on the stack, submit computations\n    //     to the device thread pool, and block on a barrier until it is\n    //     completed.\n    //\n    // (2) In async mode we allocate Context on the heap, and after all tasks\n    //     are finished, we call provided the done callback, and delete a\n    //     context from the heap.\n    //\n    // (*) EvalParallelContext & EvalShardedByInnerDimContext owns all the state\n    // and temporary buffers, requried for executing the tensor contraction.\n    // They are responsible for cleaning it up after contraction is done.\n    static const bool IsEvalInSyncMode =\n        std::is_same<DoneCallback, NoCallback>::value;\n\n    const Index m = this->m_i_size;\n    const Index n = this->m_j_size;\n    const Index k = this->m_k_size;\n    if (m == 0 || n == 0 || k == 0) return;\n\n    // Compute a set of algorithm parameters:\n    // - kernel block sizes (bm, bn, bk)\n    // - task grain sizes (number of kernels executed per task: gm, gn)\n    // - number of threads\n    // - sharding by row/column\n    // - parallel packing or first lhs then rhs\n    // and some derived parameters:\n    // - number of tasks (nm, nn, nk)\n    // - number of kernels (nm0, nn0)\n    // Unfortunately, all these parameters are tightly interdependent.\n    // So in some cases we first compute approximate values, then compute other\n    // values based on these approximations and then refine the approximations.\n\n    // There are lots of heuristics here. There is some reasoning behind them,\n    // but ultimately they are just tuned on contraction benchmarks for\n    // different input configurations, thread counts and instruction sets.\n    // So feel free to question any of them.\n\n    // Compute whether we want to shard by row or by column.\n    // This is a first approximation, it will be refined later. Since we don't\n    // know number of threads yet we use 2, because what's we are most\n    // interested in at this point is whether it makes sense to use\n    // parallelization at all or not.\n    bool shard_by_col = shardByCol(m, n, 2);\n\n    // First approximation of kernel blocking sizes.\n    // Again, we don't know number of threads yet, so we use 2.\n    Index bm, bn, bk;\n    if (shard_by_col) {\n      internal::TensorContractionBlocking<Scalar, LhsScalar, RhsScalar, Index,\n                                          internal::ShardByCol>\n          blocking(k, m, n, 2);\n      bm = blocking.mc();\n      bn = blocking.nc();\n      bk = blocking.kc();\n    } else {\n      internal::TensorContractionBlocking<Scalar, LhsScalar, RhsScalar, Index,\n                                          internal::ShardByRow>\n          blocking(k, m, n, 2);\n      bm = blocking.mc();\n      bn = blocking.nc();\n      bk = blocking.kc();\n    }\n\n    // Compute optimal number of threads.\n    // Note: we use bk instead of k here because we are interested in amount of\n    // _parallelizable_ computations, and computations are not parallelizable\n    // across k dimension.\n    const TensorOpCost cost =\n        contractionCost(m, n, bm, bn, bk, shard_by_col, false);\n    int num_threads = TensorCostModel<ThreadPoolDevice>::numThreads(\n        static_cast<double>(n) * m, cost, this->m_device.numThreads());\n    int num_threads_by_k = numThreadsInnerDim(m, n, k);\n    if (shardByInnerDim(m, n, k, num_threads, num_threads_by_k)) {\n      // We are in the scenario where it is more effective to shard by the\n      // inner dimension.\n      if (IsEvalInSyncMode) {\n        EvalShardedByInnerDimContext<DoneCallback> ctx(\n            this, num_threads_by_k, buffer, m, n, k, std::move(done));\n        ctx.template run<Alignment>();\n      } else {\n        auto* ctx = new EvalShardedByInnerDimContext<DoneCallback>(\n            this, num_threads_by_k, buffer, m, n, k, std::move(done));\n        ctx->template runAsync<Alignment>();\n      }\n\n      return;\n    }\n\n    // TODO(dvyukov): this is a stop-gap to prevent regressions while the cost\n    // model is not tuned. Remove this when the cost model is tuned.\n    if (n == 1) num_threads = 1;\n\n    if (num_threads == 1) {\n      TENSOR_CONTRACTION_DISPATCH(this->template evalProductSequential,\n                                  Unaligned, (buffer));\n      if (!IsEvalInSyncMode) done();\n      return;\n    }\n\n    // Now that we know number of threads, recalculate sharding and blocking.\n    shard_by_col = shardByCol(m, n, num_threads);\n    if (shard_by_col) {\n      internal::TensorContractionBlocking<Scalar, LhsScalar, RhsScalar, Index,\n                                          internal::ShardByCol>\n          blocking(k, m, n, num_threads);\n      bm = blocking.mc();\n      bn = blocking.nc();\n      bk = blocking.kc();\n    } else {\n      internal::TensorContractionBlocking<Scalar, LhsScalar, RhsScalar, Index,\n                                          internal::ShardByRow>\n          blocking(k, m, n, num_threads);\n      bm = blocking.mc();\n      bn = blocking.nc();\n      bk = blocking.kc();\n    }\n\n    // Number of kernels for each dimension.\n    Index nm0 = divup(m, bm);\n    Index nn0 = divup(n, bn);\n    Index nk = divup(k, bk);\n\n    // Calculate task grain size (number of kernels executed per task).\n    // This task size coarsening serves two purposes:\n    // 1. It reduces per-task overheads including synchronization overheads.\n    // 2. It allows to use caches better (reuse the same packed rhs in several\n    // consecutive kernels).\n    Index gm = 1;\n    Index gn = 1;\n    // If we are sharding by column, then we prefer to reduce rows first.\n    if (shard_by_col) {\n      gm = coarsenM(m, n, bm, bn, bk, gn, num_threads, shard_by_col);\n      gn = coarsenN(m, n, bm, bn, bk, gm, num_threads, shard_by_col);\n    } else {\n      gn = coarsenN(m, n, bm, bn, bk, gm, num_threads, shard_by_col);\n      gm = coarsenM(m, n, bm, bn, bk, gn, num_threads, shard_by_col);\n    }\n    // Number of tasks in each dimension.\n    Index nm = divup(nm0, gm);\n    Index nn = divup(nn0, gn);\n\n    // If there is enough concurrency in the sharding dimension, we choose not\n    // to paralellize by the other dimension, and execute all kernels in sync\n    // mode. This reduces parallelism from the nm x nn down to nn\n    // (shard_by_col==true) or nm (shard_by_col==false).\n    const Index sharding_dim_tasks = shard_by_col ? nn : nm;\n    const int num_worker_threads = this->m_device.numThreadsInPool();\n\n    // With small number of threads we want to make sure that we do not reduce\n    // parallelism too much. With large number of threads we trade maximum\n    // parallelism for better memory locality.\n    const float oversharding_factor =\n        num_worker_threads <= 4  ? 8.0 :\n        num_worker_threads <= 8  ? 4.0 :\n        num_worker_threads <= 16 ? 2.0 :\n        num_worker_threads <= 32 ? 1.0 :\n        num_worker_threads <= 64 ? 0.8 : /* num_worker_threads > 64 */ 0.6;\n\n    const bool parallelize_by_sharding_dim_only =\n        sharding_dim_tasks >= oversharding_factor * num_worker_threads;\n\n    // Last by not least, decide whether we want to issue both lhs and rhs\n    // packing in parallel; or issue lhs packing first, and then issue rhs\n    // packing when lhs packing completes (for !shard_by_col lhs and rhs are\n    // swapped). Parallel packing allows more parallelism (for both packing and\n    // kernels), while sequential packing provides better locality (once\n    // a thread finishes rhs packing it proceed to kernels with that rhs).\n    // First, we are interested in parallel packing if there are few tasks.\n    bool parallel_pack = num_threads >= nm * nn;\n    // Also do parallel packing if all data fits into L2$.\n    if (m * bk * Index(sizeof(LhsScalar)) + n * bk * Index(sizeof(RhsScalar)) <=\n        l2CacheSize() * num_threads)\n      parallel_pack = true;\n    // But don't do it if we will use each rhs only once. Locality seems to be\n    // more important in this case.\n    if ((shard_by_col ? nm : nn) == 1) parallel_pack = false;\n    // Also don't get in the way of parallelize_by_sharding_dim_only\n    // optimization.\n    if (parallelize_by_sharding_dim_only) parallel_pack = false;\n\n    // TODO(ezhulnev): With if contexpr we don't need SyncEvalParallelContext.\n    if (IsEvalInSyncMode) {\n#define CONTEXT_ARGS                                                        \\\n  (this, num_threads, buffer, m, n, k, bm, bn, bk, nm, nn, nk, gm, gn, nm0, \\\n   nn0, shard_by_col, parallel_pack, parallelize_by_sharding_dim_only,      \\\n   NoCallback())                                                            \\\n      .run()\n      TENSOR_CONTRACTION_DISPATCH(SyncEvalParallelContext, Alignment,\n                                  CONTEXT_ARGS);\n#undef CONTEXT_ARGS\n\n    } else {\n#define CONTEXT_ARGS                                                        \\\n  (this, num_threads, buffer, m, n, k, bm, bn, bk, nm, nn, nk, gm, gn, nm0, \\\n   nn0, shard_by_col, parallel_pack, parallelize_by_sharding_dim_only,      \\\n   std::move(done))\n      TENSOR_CONTRACTION_ASYNC_DISPATCH(EvalParallelContext, DoneCallback,\n                                        Alignment, CONTEXT_ARGS, run());\n#undef CONTEXT_ARGS\n    }\n  }\n\n  // ------------------------------------------------------------------------ //\n\n  // Dummy struct to represent an empty DoneCallback.\n\n  struct NoCallback {\n    void operator()() {\n      eigen_assert(false && \"NoCallback should never be called\");\n    }\n  };\n\n  // ------------------------------------------------------------------------ //\n\n  template <typename DoneCallback, typename Context>\n  class EvalParallelNotification;\n\n  // Synchronous evaluation notification that blocks caller thread in Wait().\n  template <typename Context>\n  class EvalParallelNotification<NoCallback, Context> {\n   public:\n    EvalParallelNotification(Context*, NoCallback) {}\n    void Notify() { done_.Notify(); }\n    void Wait() { done_.Wait(); }\n   private:\n    Eigen::Notification done_;\n  };\n\n  // Asynchronous evaluation notification that does not block in Wait().\n  template <typename DoneCallback, typename Context>\n  class EvalParallelNotification {\n   public:\n    EvalParallelNotification(Context* ctx, DoneCallback done)\n        : ctx_(ctx), done_(std::move(done)) {}\n\n    void Notify() {\n      // Make a copy of done callback, because it will be destructed when we\n      // will delete context in the next line (EvalParallelNotification is a\n      // data member of EvalParallelContext class).\n      DoneCallback done_copy = std::move(done_);\n\n      // Delete parallel evaluation context.\n      delete ctx_;\n\n      // Now safely call the done callback.\n      done_copy();\n    }\n\n    void Wait() {}\n\n   private:\n    Context* ctx_;\n    DoneCallback done_;\n  };\n\n  // Context orchestrates sync/async parallel contraction evaluation. When it is\n  // executed in asynchronous mode, it owns all the shared state that might be\n  // accessible by block packing and kernel tasks.\n\n  template <typename DoneCallback, bool lhs_inner_dim_contiguous,\n            bool rhs_inner_dim_contiguous, bool rhs_inner_dim_reordered,\n            int Alignment>\n  class EvalParallelContext {\n   public:\n    typedef internal::TensorContractionInputMapper<\n        LhsScalar, Index, internal::Lhs, LeftEvaluator, left_nocontract_t,\n        contract_t, internal::packet_traits<LhsScalar>::size,\n        lhs_inner_dim_contiguous, false, Unaligned>\n        LhsMapper;\n    typedef internal::TensorContractionInputMapper<\n        RhsScalar, Index, internal::Rhs, RightEvaluator, right_nocontract_t,\n        contract_t, internal::packet_traits<RhsScalar>::size,\n        rhs_inner_dim_contiguous, rhs_inner_dim_reordered, Unaligned>\n        RhsMapper;\n\n    typedef internal::blas_data_mapper<Scalar, Index, ColMajor> OutputMapper;\n\n    typedef internal::TensorContractionKernel<\n        Scalar, LhsScalar, RhsScalar, Index, OutputMapper, LhsMapper, RhsMapper>\n        TensorContractionKernel;\n\n    typedef typename TensorContractionKernel::LhsBlock LhsBlock;\n    typedef typename TensorContractionKernel::RhsBlock RhsBlock;\n    typedef typename TensorContractionKernel::BlockMemHandle BlockMemHandle;\n\n    EvalParallelContext(const Self* self, int num_threads, Scalar* buffer,\n                        Index tm, Index tn, Index tk, Index bm, Index bn,\n                        Index bk, Index nm, Index nn, Index nk, Index gm,\n                        Index gn, Index nm0, Index nn0, bool shard_by_col,\n                        bool parallel_pack,\n                        bool parallelize_by_sharding_dim_only,\n                        DoneCallback done)\n        : created_by_thread_id_(std::this_thread::get_id()),\n          done_(this, std::move(done)),\n          device_(self->m_device),\n          lhs_(self->m_leftImpl, self->m_left_nocontract_strides,\n               self->m_i_strides, self->m_left_contracting_strides,\n               self->m_k_strides),\n          rhs_(self->m_rightImpl, self->m_right_nocontract_strides,\n               self->m_j_strides, self->m_right_contracting_strides,\n               self->m_k_strides),\n          buffer_(buffer),\n          output_(buffer, tm),\n          output_kernel_(self->m_output_kernel),\n          tensor_contraction_params_(self->m_tensor_contraction_params),\n          num_threads_(num_threads),\n          shard_by_col_(shard_by_col),\n          parallel_pack_(parallel_pack),\n          parallelize_by_sharding_dim_only_(parallelize_by_sharding_dim_only),\n          m_(tm),\n          n_(tn),\n          k_(tk),\n          bm_(bm),\n          bn_(bn),\n          bk_(bk),\n          nm_(nm),\n          nn_(nn),\n          nk_(nk),\n          gm_(gm),\n          gn_(gn),\n          nm0_(nm0),\n          nn0_(nn0),\n          kernel_(m_, k_, n_, bm_, bk_, bn_),\n          num_thread_local_allocations_(0),\n          // We reserve 2X more capacity for a thread local values, than the\n          // number of threads in the pool to efficiently handle task stealing\n          // by threads that are not managed by the pool.\n          thread_local_capacity(2 * (parallelize_by_sharding_dim_only_\n                                         ? device_.numThreadsInPool()\n                                         : 0)),\n          // We will use only one of the Lhs/Rhs thread local storage depending\n          // on the shard_by_col value and we parallelize by sharding dim ONLY.\n          lhs_thread_local_blocks_(shard_by_col_ ? 0 : thread_local_capacity,\n                                   {*this}, {*this}),\n          rhs_thread_local_blocks_(shard_by_col_ ? thread_local_capacity : 0,\n                                   {*this}, {*this}) {\n      // These two options are mutually exclusive.\n      eigen_assert(!(parallel_pack && parallelize_by_sharding_dim_only));\n\n      for (Index x = 0; x < P; x++) {\n        // Normal number of notifications for k slice switch is\n        // nm_ + nn_ + nm_ * nn_. However, first P - 1 slices will receive only\n        // nm_ + nn_ notifications, because they will not receive notifications\n        // from preceding kernels.\n        state_switch_[x] =\n            x == 0\n                ? 1\n                : (parallel_pack_ ? nn_ + nm_ : (shard_by_col_ ? nn_ : nm_)) +\n                      (x == P - 1 ? nm_ * nn_ : 0);\n        state_packing_ready_[x] =\n            parallel_pack_ ? 0 : (shard_by_col_ ? nm_ : nn_);\n        state_kernel_[x] = new std::atomic<uint8_t>*[nm_];\n        for (Index m = 0; m < nm_; m++) {\n          state_kernel_[x][m] = new std::atomic<uint8_t>[nn_];\n          // Kernels generally receive 3 notifications (previous kernel + 2\n          // packing), but the first slice won't get notifications from previous\n          // kernels.\n          for (Index n = 0; n < nn_; n++)\n            state_kernel_[x][m][n].store(\n                (x == 0 ? 0 : 1) + (parallel_pack_ ? 2 : 1),\n                std::memory_order_relaxed);\n        }\n      }\n\n      // Allocate memory for packed rhs/lhs matrices.\n      packed_mem_ = kernel_.allocateSlices(            //\n          device_,                                     //\n          /*num_lhs=*/nm0_,                            //\n          /*num_rhs=*/nn0_,                            //\n          /*num_slices=*/std::min<Index>(nk_, P - 1),  //\n          packed_lhs_, packed_rhs_);\n\n      if (parallelize_by_sharding_dim_only_) {\n        const int num_worker_threads = device_.numThreadsInPool();\n\n        if (shard_by_col) {\n          can_use_thread_local_packed_ = new std::atomic<bool>[nn_];\n          for (int i = 0; i < nn_; ++i)\n            can_use_thread_local_packed_[i].store(true,\n                                                  std::memory_order_relaxed);\n\n          Index num_blocks = num_worker_threads * gn_;\n          thread_local_pre_alocated_mem_ = kernel_.allocateSlices(  //\n              device_,                                              //\n              /*num_lhs=*/0,                                        //\n              /*num_rhs=*/num_blocks,                               //\n              /*num_slices=*/1,                                     //\n              /*lhs_blocks=*/nullptr, &rhs_thread_local_pre_allocated_);\n\n        } else {\n          can_use_thread_local_packed_ = new std::atomic<bool>[nm_];\n          for (int i = 0; i < nm_; ++i)\n            can_use_thread_local_packed_[i].store(true,\n                                                  std::memory_order_relaxed);\n\n          Index num_blocks = num_worker_threads * gm_;\n          thread_local_pre_alocated_mem_ = kernel_.allocateSlices(  //\n              device_,                                              //\n              /*num_lhs=*/num_blocks,                               //\n              /*num_rhs=*/0,                                        //\n              /*num_slices=*/1, &lhs_thread_local_pre_allocated_,   //\n              /*rhs_blocks=*/nullptr);\n        }\n      }\n    }\n\n    ~EvalParallelContext() {\n      for (Index x = 0; x < P; x++) {\n        for (Index m = 0; m < nm_; m++) delete[] state_kernel_[x][m];\n        delete[] state_kernel_[x];\n      }\n      kernel_.deallocate(device_, packed_mem_);\n      if (parallelize_by_sharding_dim_only_) {\n        kernel_.deallocate(device_, thread_local_pre_alocated_mem_);\n        delete[] can_use_thread_local_packed_;\n      }\n    }\n\n    void run() {\n      // Kick off packing of the first slice.\n      signal_switch(0, 1);\n\n      // Wait for overall completion.\n      //\n      // If parallel evaluation is executed in async mode, this is a no-op, and\n      // Wait() will return immediately. In synchronous mode it will block the\n      // caller thread until it will receive notification from last task.\n      //\n      // In async mode, last task when completed will call done callback from\n      // the same thread, and will delete this context.\n      //\n      // TODO(dvyukov): This wait can lead to deadlock if contraction is\n      // evaluated in synchronous mode. If nthreads contractions are\n      // concurrently submitted from worker threads, this wait will block all\n      // worker threads and the system will deadlock.\n      done_.Wait();\n    }\n\n   private:\n    std::thread::id created_by_thread_id_;\n\n    // This notification is specialized on the type of DoneCallback and can be\n    // blocking or non-blocking.\n    EvalParallelNotification<DoneCallback, EvalParallelContext> done_;\n\n    const Device& device_;\n    LhsMapper lhs_;\n    RhsMapper rhs_;\n    Scalar* const buffer_;\n    OutputMapper output_;\n    OutputKernelType output_kernel_;\n    TensorContractionParams tensor_contraction_params_;\n    const int num_threads_;\n    const bool shard_by_col_;\n    const bool parallel_pack_;\n    const bool parallelize_by_sharding_dim_only_;\n    // Matrix sizes.\n    const Index m_;\n    const Index n_;\n    const Index k_;\n    // Block sizes.\n    const Index bm_;\n    const Index bn_;\n    const Index bk_;\n    // Number of tasks.\n    const Index nm_;\n    const Index nn_;\n    const Index nk_;\n    // Task grain sizes (number of kernels executed per task).\n    const Index gm_;\n    const Index gn_;\n    // Number of blocks (this is different from ni_/nn_ because of task size\n    // coarsening).\n    const Index nm0_;\n    const Index nn0_;\n    // Tensor contraction kernel.\n    TensorContractionKernel kernel_;\n\n    // Parallelization strategy.\n    //\n    // Blocks related to the same k block can run in parallel because they write\n    // to different output blocks. So we parallelize within k slices, this\n    // gives us parallelism level of m x n. Before we can start any kernels\n    // related to k-th slice, we need to issue m lhs packing tasks and n rhs\n    // packing tasks.\n    //\n    // However, there is a bottleneck when we are finishing kernels for k-th\n    // slice (at the very end there is only 1 runnable kernel). To mitigate this\n    // bottleneck we allow kernels from k-th and k+1-th slices to run in\n    // parallel. Note that (m, n, k) and (m, n, k+1) kernels write to the same\n    // output block, so they must not run in parallel.\n    //\n    // This gives us the following dependency graph.\n    // On each k slice we have m x n kernel tasks, m lhs paking tasks and n rhs\n    // packing tasks.\n    // Kernel (m, n, k) can start when:\n    //  - kernel (m, n, k-1) has finished\n    //  - lhs packing (m, k) has finished\n    //  - rhs packing (n, k) has finished\n    // Lhs/rhs packing can start when:\n    //  - all k-1 packing has finished (artificially imposed to limit amount of\n    //  parallel packing)\n    //\n    // On top of that we limit runnable tasks to two consecutive k slices.\n    // This is done to limit amount of memory we need for packed lhs/rhs\n    // (for each k slice we need m*bk + n*bk memory in packed_lhs_/packed_rhs_).\n    //\n    // state_switch_ tracks when we are ready to switch to the next k slice.\n    // state_kernel_[m][n] tracks when we are ready to kick off kernel (m, n).\n    // These variable are rolling over 3 consecutive k slices: first two we are\n    // actively executing + one to track completion of kernels in the second\n    // slice.\n    static const Index P = 3;\n\n    // Handle to the allocated temporary storage for Lhs/Rhs blocks.\n    BlockMemHandle packed_mem_;\n    std::vector<LhsBlock> packed_lhs_[P - 1];\n    std::vector<RhsBlock> packed_rhs_[P - 1];\n\n    // If we choose to parallelize only by the sharding dimension, each thread\n    // will have it's own \"thead local\" (not a c++ thread local storage) memory\n    // for packed_lhs or packed_rhs (shard_by_col = false of true). This memory\n    // can't be passed to a kernel that might execute on a different thread.\n    //\n    // In practice when we are ready to pack memory for the sharding dimension\n    // (rhs if shard_by_col==true) of the K-th slice, all kernels for K-1 slice\n    // already computed (99% of the time), and we can pack data into the thread\n    // local storage, and guarantee that all the kernels will be executed\n    // immediately in the same thread. This significantly increases L1 cache hit\n    // ratio and reduces pressure on the memory bus.\n    //\n    // It's still possible that kernel for the K-th slice will be ready before\n    // completion of the K-1 kernel, so we have to allocate \"global\" packed_lhs_\n    // and packed_rhs_ to allow kernels to be executed later on a thread\n    // different from the thread that was used for packing.\n\n    // Handle for pre-allocated thread local memory buffers.\n    BlockMemHandle thread_local_pre_alocated_mem_;\n\n    // Only one of these will be initialized depending on shard_by_col value\n    // (the size will be `num_worker_threads * num_grains_in_the_sharding_dim`).\n    std::vector<LhsBlock> lhs_thread_local_pre_allocated_;\n    std::vector<RhsBlock> rhs_thread_local_pre_allocated_;\n\n    // How many thread local blocks were already allocated.\n    std::atomic<int> num_thread_local_allocations_;\n    const int thread_local_capacity;\n\n    // We will use pre-allocated Lhs/Rhs blocks defined above, if the number of\n    // unique threads in a system is below or equal to the number of threads in\n    // a thread pool. We will fallback on dynamic memory allocation after that.\n\n    // ThreadLocalBlocks is a container for Lhs or Rhs thread local buffers. Its\n    // size is equal to the grain size in Lhs/Rhs sharding dimension.\n    template <typename BlockType>\n    class ThreadLocalBlocks {\n     public:\n      ThreadLocalBlocks() = default;\n\n      ThreadLocalBlocks(BlockType* base, size_t grain_size)\n          : is_pre_allocated_(true),\n            thread_local_pre_allocated_base_(base),\n            grain_size_(grain_size) {}\n\n      ThreadLocalBlocks(BlockMemHandle mem_handle,\n                        std::vector<BlockType> blocks)\n          : is_pre_allocated_(false),\n            mem_handle_(std::move(mem_handle)),\n            blocks_(std::move(blocks)) {}\n\n      BlockType& block(int grain_index) {\n        eigen_assert(grain_index >= 0);\n        eigen_assert(static_cast<size_t>(grain_index) < size());\n        return is_pre_allocated_ ? thread_local_pre_allocated_base_[grain_index]\n                                 : blocks_[grain_index];\n      }\n\n      void Release(EvalParallelContext& ctx) const {\n        if (!is_pre_allocated_) {\n          ctx.kernel_.deallocate(ctx.device_, mem_handle_);\n        }\n      }\n\n      size_t size() const {\n        return is_pre_allocated_ ? grain_size_ : blocks_.size();\n      }\n\n     private:\n      bool is_pre_allocated_;\n\n      // Reuse pre-allocated thread local buffers.\n      BlockType* thread_local_pre_allocated_base_ = nullptr;\n      size_t grain_size_ = 0;\n\n      // These will be initialized only if `is_pre_allocated == false`.\n      BlockMemHandle mem_handle_{};\n      std::vector<BlockType> blocks_;\n    };\n\n    // ThreadLocalBlocksInitialize callable does custom thread local blocks\n    // initialization, and will reuse pre-allocated buffers if possible, or will\n    // dynamically allocate new memory.\n    //\n    // Lhs/Rhs blocks might be of the same type, so we have to pass explicitly\n    // for what side do we plan to do block allocation.\n    template <typename BlockType, bool is_rhs>\n    class ThreadLocalBlocksInitialize {\n      static constexpr bool kIsLhs =\n          !is_rhs && std::is_same<BlockType, LhsBlock>::value;\n      static const bool kIsRhs =\n          is_rhs && std::is_same<BlockType, RhsBlock>::value;\n      static_assert(kIsLhs || kIsRhs, \"Unkown block type\");\n\n      using Blocks = ThreadLocalBlocks<BlockType>;\n\n     public:\n      ThreadLocalBlocksInitialize(EvalParallelContext& ctx)\n          : ctx_(ctx),\n            num_worker_threads_(ctx_.device_.numThreadsInPool()) {}\n\n      void operator()(Blocks& blocks) {\n        const int n = ctx_.num_thread_local_allocations_.fetch_add(\n            1, std::memory_order_relaxed);\n\n        if (n >= num_worker_threads_) {\n          ThreadLocalBlocksAllocator<is_rhs>::allocate(ctx_, blocks);\n        } else {\n          ThreadLocalBlocksAllocator<is_rhs>::reuse(ctx_, n, blocks);\n        }\n      }\n\n     private:\n      // NOTE(ezhulenev): Without 'if constexpr' we have to put calls to\n      // TensorContractionKernel::allocateSlices into template specializations.\n      // Also explicit specializations are not allowed at class scope in C++03,\n      // EvalCtx type parameter is just a workaround for that limitation.\n      template <bool pack_rhs, typename EvalCtx = EvalParallelContext>\n      struct ThreadLocalBlocksAllocator;\n\n      template <typename EvalCtx>\n      struct ThreadLocalBlocksAllocator</*pack_rhs=*/true, EvalCtx> {\n        static void allocate(EvalCtx& ctx, Blocks& blocks) {\n          std::vector<RhsBlock> rhs_blocks;\n          BlockMemHandle mem_handle = ctx.kernel_.allocateSlices(\n              ctx.device_,\n              /*num_lhs=*/0,\n              /*num_rhs=*/ctx.gn_,\n              /*num_slices=*/1,\n              /*lhs_blocks=*/nullptr, /*rhs_blocks=*/&rhs_blocks);\n\n          blocks = ThreadLocalBlocks<RhsBlock>(std::move(mem_handle),\n                                               std::move(rhs_blocks));\n        }\n\n        static void reuse(EvalCtx& ctx, int index, Blocks& blocks) {\n          RhsBlock* ptr = &ctx.rhs_thread_local_pre_allocated_[ctx.gn_ * index];\n          blocks = ThreadLocalBlocks<RhsBlock>(ptr, ctx.gn_);\n        }\n      };\n\n      template <typename EvalCtx>\n      struct ThreadLocalBlocksAllocator</*pack_rhs=*/false, EvalCtx> {\n        static void allocate(EvalCtx& ctx, Blocks& blocks) {\n          std::vector<LhsBlock> lhs_blocks;\n          BlockMemHandle mem_handle = ctx.kernel_.allocateSlices(\n              ctx.device_,\n              /*num_lhs=*/ctx.gm_,\n              /*num_rhs=*/0,\n              /*num_slices=*/1,\n              /*lhs_blocks=*/&lhs_blocks, /*rhs_blocks=*/nullptr);\n\n          blocks = ThreadLocalBlocks<LhsBlock>(std::move(mem_handle),\n                                               std::move(lhs_blocks));\n        }\n\n        static void reuse(EvalCtx& ctx, int index, Blocks& blocks) {\n          LhsBlock* ptr = &ctx.lhs_thread_local_pre_allocated_[ctx.gm_ * index];\n          blocks = ThreadLocalBlocks<LhsBlock>(ptr, ctx.gm_);\n        }\n      };\n\n      EvalParallelContext& ctx_;\n      const int num_worker_threads_;\n    };\n\n    template <typename BlockType>\n    class ThreadLocalBlocksRelease {\n     public:\n      using Blocks = ThreadLocalBlocks<BlockType>;\n      ThreadLocalBlocksRelease(EvalParallelContext& ctx) : ctx_(ctx) {}\n      void operator()(Blocks& blocks) { blocks.Release(ctx_); }\n\n     private:\n      EvalParallelContext& ctx_;\n    };\n\n    // ThreadLocalBlocks initialization callables.\n    using ThreadLocalLhsInit =\n        ThreadLocalBlocksInitialize<LhsBlock, /*is_rhs=*/false>;\n    using ThreadLocalRhsInit =\n        ThreadLocalBlocksInitialize<RhsBlock, /*is_rhs=*/true>;\n\n    // ThreadLocalBlocks release callables.\n    using ThreadLocalLhsRelease = ThreadLocalBlocksRelease<LhsBlock>;\n    using ThreadLocalRhsRelease = ThreadLocalBlocksRelease<RhsBlock>;\n\n    // Thread local containers for Lhs/Rhs block packs. In practice only one of\n    // them will be used, depending on the shard_by_col value.\n    Eigen::ThreadLocal<ThreadLocalBlocks<LhsBlock>, ThreadLocalLhsInit,\n                       ThreadLocalLhsRelease>\n        lhs_thread_local_blocks_;\n    Eigen::ThreadLocal<ThreadLocalBlocks<RhsBlock>, ThreadLocalRhsInit,\n                       ThreadLocalRhsRelease>\n        rhs_thread_local_blocks_;\n\n    // After a particular shard for Kth slice missed thread local execution\n    // opportunity (K-1 slice didn't complete kernels execution), we can no\n    // longer schedule K+1 and following slices in thread local mode, because\n    // there is no more guarantee that previous kernels were executed\n    // sequentially in the same thread (size is nn_ or nm_).\n    std::atomic<bool>* can_use_thread_local_packed_;\n\n    std::atomic<uint8_t>** state_kernel_[P];\n    // state_switch_ is frequently modified by worker threads, while other\n    // fields are read-only after constructor. Let's move it to a separate cache\n    // line to reduce cache-coherency traffic.\n    char pad_[128];\n    std::atomic<Index> state_packing_ready_[P];\n    std::atomic<Index> state_switch_[P];\n\n    LhsBlock& packed_lhs(Index m, Index k, Index m1, bool use_thread_local) {\n      if (use_thread_local) {\n        eigen_assert(!shard_by_col_);\n        ThreadLocalBlocks<LhsBlock>& blocks = lhs_thread_local_blocks_.local();\n\n        Index grain_index = m1 - m * gm_;\n        return blocks.block(internal::convert_index<int>(grain_index)); // FIXME better make ThreadLocalBlocks use Eigen::Index?\n      } else {\n        return packed_lhs_[k % (P - 1)][m1];\n      }\n    }\n\n    RhsBlock& packed_rhs(Index n, Index k, Index n1, bool use_thread_local) {\n      if (use_thread_local) {\n        eigen_assert(shard_by_col_);\n        ThreadLocalBlocks<RhsBlock>& blocks = rhs_thread_local_blocks_.local();\n\n        Index grain_index = n1 - n * gn_;\n        return blocks.block(internal::convert_index<int>(grain_index)); // FIXME better make ThreadLocalBlocks use Eigen::Index?\n      } else {\n        return packed_rhs_[k % (P - 1)][n1];\n      }\n    }\n\n    // In following two methods (pack_lhs and pack_rhs), if we know for sure\n    // that we'll be able to immediately call a kernel with packed data, and do\n    // not submit it to the thread pool, we can use thread local memory for\n    // packed data.\n    //\n    // We can only reliably check it if we are running all kernels in sync mode\n    // (parallelize only by sharding dim). If kernel for m==0 (n==0) is ready to\n    // run, it's guaranteed that all kernels with larger values of m (n) are\n    // also ready, because we execute them in the same order for all K slices.\n\n    void pack_lhs(Index m, Index k) {\n      bool use_thread_local = false;\n\n      if (parallelize_by_sharding_dim_only_ && !shard_by_col_ &&\n          can_use_thread_local_packed_[m].load(std::memory_order_relaxed)) {\n        if (state_kernel_[k % P][m][0].load(std::memory_order_relaxed) == 1) {\n          use_thread_local = true;\n        } else {\n          // If we can't guarantee that all kernels in `k` slice will be\n          // executed sequentially in current thread, it's no longer safe to use\n          // thread local memory in following slices along the k dimensions.\n          eigen_assert(k > 0);\n          can_use_thread_local_packed_[m].store(false,\n                                                std::memory_order_relaxed);\n        }\n      }\n\n      const Index mend = m * gm_ + gm(m);\n      for (Index m1 = m * gm_; m1 < mend; m1++)\n        kernel_.packLhs(&packed_lhs(m, k, m1, use_thread_local),\n                        lhs_.getSubMapper(m1 * bm_, k * bk_), bk(k), bm(m1));\n\n      if (!parallel_pack_ && shard_by_col_) {\n        assert(!use_thread_local);\n        signal_packing(k);\n      } else {\n        signal_switch(k + 1);\n        for (Index n = nn_ - 1; n >= 0; n--) {\n          bool sync = parallelize_by_sharding_dim_only_ || n == 0;\n          signal_kernel(m, n, k, sync, use_thread_local);\n        }\n      }\n    }\n\n    void pack_rhs(Index n, Index k) {\n      bool use_thread_local = false;\n\n      if (parallelize_by_sharding_dim_only_ && shard_by_col_ &&\n          can_use_thread_local_packed_[n].load(std::memory_order_relaxed)) {\n        if (state_kernel_[k % P][0][n].load(std::memory_order_relaxed) == 1) {\n          use_thread_local = true;\n        } else {\n          // If we can't guarantee that all kernels in `k` slice will be\n          // executed sequentially in current thread, it's no longer safe to use\n          // thread local memory in followig slices along the k dimensions.\n          eigen_assert(k > 0);\n          can_use_thread_local_packed_[n].store(false,\n                                                std::memory_order_relaxed);\n        }\n      }\n\n      const Index nend = n * gn_ + gn(n);\n      for (Index n1 = n * gn_; n1 < nend; n1++) {\n        if (!TensorContractionKernel::HasBeta && k == 0) {\n          // Zero the output memory in parallel, only if contraction kernel does\n          // not support `beta`. Otherwise we will pass beta 0.0 to the first\n          // call to the `TensorContractionKernel::invoke()`.\n          //\n          // On 10000x2x10000 mm zeroing can easily take half of time. Zero (bn\n          // x m) row. Safe to do here because all kernels that will write to\n          // this memory depend on completion of this task. Note: don't call\n          // device_.memset() here. device_.memset() blocks on thread pool\n          // worker thread, which can lead to underutilization and deadlocks.\n          memset(buffer_ + n1 * bn_ * m_, 0, bn(n1) * m_ * sizeof(Scalar));\n        }\n        kernel_.packRhs(&packed_rhs(n, k, n1, use_thread_local),\n                        rhs_.getSubMapper(k * bk_, n1 * bn_), bk(k), bn(n1));\n      }\n\n      if (parallel_pack_ || shard_by_col_) {\n        signal_switch(k + 1);\n        for (Index m = nm_ - 1; m >= 0; m--) {\n          bool sync = parallelize_by_sharding_dim_only_ || m == 0;\n          signal_kernel(m, n, k, sync, use_thread_local);\n        }\n      } else {\n        assert(!use_thread_local);\n        signal_packing(k);\n      }\n    }\n\n    void kernel(Index m, Index n, Index k, bool use_thread_local) {\n      // Note: order of iteration matters here. Iteration over m is innermost\n      // because we want to reuse the same packed rhs in consecutive tasks\n      // (rhs fits into L2$ while lhs only into L3$).\n      const Index nend = n * gn_ + gn(n);\n      const Index mend = m * gm_ + gm(m);\n\n      // NOTE: output = alpha * LHS * RHS + beta * output.\n      const Scalar alpha = Scalar(1);\n      const Scalar beta =\n          (TensorContractionKernel::HasBeta && k == 0) ? Scalar(0) : Scalar(1);\n\n      if (shard_by_col_) {\n        for (Index n1 = n * gn_; n1 < nend; n1++) {\n          for (Index m1 = m * gm_; m1 < mend; m1++) {\n            const auto output_mapper = output_.getSubMapper(m1 * bm_, n1 * bn_);\n            kernel_.invoke(\n                output_mapper,\n                packed_lhs(m, k, m1, !shard_by_col_ && use_thread_local),\n                packed_rhs(n, k, n1, shard_by_col_ && use_thread_local), bm(m1),\n                bk(k), bn(n1), alpha, beta);\n\n            // We are done with the last task for the [m1, n1] block.\n            if (k + 1 == nk_) {\n              output_kernel_(output_mapper, tensor_contraction_params_,\n                             m1 * bm_, n1 * bn_, bm(m1), bn(n1));\n            }\n          }\n        }\n      } else {\n        for (Index m1 = m * gm_; m1 < mend; m1++)\n          for (Index n1 = n * gn_; n1 < nend; n1++) {\n            const auto output_mapper = output_.getSubMapper(m1 * bm_, n1 * bn_);\n            kernel_.invoke(\n                output_mapper,\n                packed_lhs(m, k, m1, !shard_by_col_ && use_thread_local),\n                packed_rhs(n, k, n1, shard_by_col_ && use_thread_local), bm(m1),\n                bk(k), bn(n1), alpha, beta);\n\n            // We are done with the last task for the [m1, n1] block.\n            if (k + 1 == nk_) {\n              output_kernel_(output_mapper, tensor_contraction_params_,\n                             m1 * bm_, n1 * bn_, bm(m1), bn(n1));\n            }\n          }\n      }\n      signal_kernel(m, n, k + 1, /*sync=*/false, /*use_thread_local=*/false);\n      signal_switch(k + 2);\n    }\n\n    void signal_packing(Index k) {\n      eigen_assert(!parallel_pack_);\n      Index s = state_packing_ready_[k % P].fetch_sub(1);\n      eigen_assert(s > 0);\n      if (s != 1) return;\n      state_packing_ready_[k % P] = shard_by_col_ ? nm_ : nn_;\n      enqueue_packing(k, shard_by_col_);\n    }\n\n    void signal_kernel(Index m, Index n, Index k, bool sync,\n                       bool use_thread_local) {\n      std::atomic<uint8_t>* state = &state_kernel_[k % P][m][n];\n      Index s = state->load();\n      eigen_assert(s > 0);\n      if (s != 1 && state->fetch_sub(1) != 1) {\n        eigen_assert(!use_thread_local);\n        return;\n      }\n      state->store(parallel_pack_ ? 3 : 2, std::memory_order_relaxed);\n      if (sync) {\n        kernel(m, n, k, use_thread_local);\n      } else {\n        eigen_assert(!use_thread_local);\n        device_.enqueueNoNotification(\n            [=]() { kernel(m, n, k, use_thread_local); });\n      }\n    }\n\n    void signal_switch(Index k, Index v = 1) {\n      Index s = state_switch_[k % P].fetch_sub(v);\n      eigen_assert(s >= v);\n      if (s != v) return;\n\n      // Ready to switch to the next k slice.\n      // Reset counter for the next iteration.\n      state_switch_[k % P] =\n          (parallel_pack_ ? nm_ + nn_ : (shard_by_col_ ? nn_ : nm_)) +\n          nm_ * nn_;\n      if (k < nk_) {\n        // Issue lhs/rhs packing. Their completion will in turn kick off\n        // kernels.\n        if (parallel_pack_) {\n          enqueue_packing(k, !shard_by_col_);\n          enqueue_packing(k, shard_by_col_);\n        } else if (shard_by_col_) {\n          enqueue_packing(k, false);\n        } else {\n          enqueue_packing(k, true);\n        }\n\n        // Termination handling.\n        // Because kernel completion signals k + 2 switch, we need to finish nk\n        // + 2 slices without issuing any tasks on nk + 1 slice. So here we\n        // pretend that all nk + 1 packing tasks just finish instantly; so that\n        // nk + 2 switch only waits for completion of nk kernels.\n      } else if (k == nk_) {\n        signal_switch(k + 1,\n                      parallel_pack_ ? nm_ + nn_ : (shard_by_col_ ? nn_ : nm_));\n      } else {\n        done_.Notify();\n      }\n    }\n\n    // Enqueue all rhs/lhs packing for k-th slice.\n    void enqueue_packing(Index k, bool rhs) {\n      enqueue_packing_helper(0, rhs ? nn_ : nm_, k, rhs);\n    }\n\n    void enqueue_packing_helper(Index start, Index end, Index k, bool rhs) {\n      if (end - start == 1) {\n        if (rhs)\n          pack_rhs(start, k);\n        else\n          pack_lhs(start, k);\n      } else {\n        while (end - start > 1) {\n          Index mid = (start + end) / 2;\n          device_.enqueueNoNotification(\n              [=]() { enqueue_packing_helper(mid, end, k, rhs); });\n          end = mid;\n        }\n\n        // Decide if we want to run first packing task (start == 0) in\n        // async mode if we parallelize only by sharding dim:\n        // (1) pack_lhs and pack_rhs call signal_switch before completing\n        //     all calls to signal_kernel, which in sync mode might lead\n        //     to the execution of the first kernel of the k+1 slice, before\n        //     completing a call to the last kernel of the k slice.\n        // (2) all pack tasks for sharded dim must be executed in a thread\n        //     pool to get pre-allocated thead local buffers.\n        bool pack_async =\n          (start == 0) &&\n          (parallelize_by_sharding_dim_only_&& shard_by_col_ == rhs) &&\n          (k > 0 || std::this_thread::get_id() == created_by_thread_id_);\n\n        if (pack_async) {\n          device_.enqueueNoNotification(\n              [=]() { enqueue_packing_helper(start, end, k, rhs); });\n        } else {\n          enqueue_packing_helper(start, end, k, rhs);\n        }\n      }\n    }\n\n    // Block sizes with accounting for potentially incomplete last block.\n    Index bm(Index m) const { return m + 1 < nm0_ ? bm_ : m_ + bm_ - bm_ * nm0_; }\n    Index bn(Index n) const { return n + 1 < nn0_ ? bn_ : n_ + bn_ - bn_ * nn0_; }\n    Index bk(Index k) const { return k + 1 < nk_ ? bk_ : k_ + bk_ - bk_ * nk_; }\n    // Task grain sizes accounting for potentially incomplete last task.\n    Index gm(Index m) const { return m + 1 < nm_ ? gm_ : nm0_ + gm_ - gm_ * nm_; }\n    Index gn(Index n) const { return n + 1 < nn_ ? gn_ : nn0_ + gn_ - gn_ * nn_; }\n\n    EvalParallelContext(const EvalParallelContext&) = delete;\n    void operator=(const EvalParallelContext&) = delete;\n  };\n\n  template <bool lhs_inner_dim_contiguous, bool rhs_inner_dim_contiguous,\n            bool rhs_inner_dim_reordered, int Alignment>\n  using SyncEvalParallelContext =\n      EvalParallelContext<NoCallback, lhs_inner_dim_contiguous,\n                          rhs_inner_dim_contiguous, rhs_inner_dim_reordered,\n                          Alignment>;\n\n  // ------------------------------------------------------------------------ //\n\n  // EvalShardedByInnerDimContext orchestrates sync/async contraction\n  // evaluation, when we shard by inner dimension. When it is executed in\n  // asynchronous mode, it owns all the shared state that might be accessible by\n  // block processing tasks.\n\n  template <typename DoneCallback>\n  struct EvalShardedByInnerDimContext {\n    EvalShardedByInnerDimContext(const Self* self, int num_threads,\n                                 Scalar* result_buffer,\n                                 Index m_size, Index n_size, Index k_size,\n                                 DoneCallback done_callback)\n        : evaluator(self),\n          m_lhs_inner_dim_contiguous(evaluator->m_lhs_inner_dim_contiguous),\n          m_rhs_inner_dim_contiguous(evaluator->m_rhs_inner_dim_contiguous),\n          m_rhs_inner_dim_reordered(evaluator->m_rhs_inner_dim_reordered),\n          result(result_buffer),\n          m(m_size),\n          n(n_size),\n          k(k_size),\n          done(std::move(done_callback)),\n          buffer_size_bytes(m * n * sizeof(Scalar)),\n          block_size(blockSize(k, num_threads)),\n          num_blocks(divup<Index>(k, block_size)),\n          num_pending_blocks(internal::convert_index<int>(num_blocks)),\n          l0_ranges(divup<Index>(num_blocks, l0_size)),\n          l0_state(l0_ranges),\n          block_buffers(num_blocks) {\n      // Keep count of pending gemm tasks for each l0 range.\n      for (int i = 0; i < l0_ranges; ++i) {\n        const Index num_pending_tasks = actualRangeSize(l0_ranges, l0_size, i);\n        l0_state.emplace_back(internal::convert_index<int>(num_pending_tasks));\n      }\n\n      // Allocate temporary buffers for each block.\n      for (Index block_idx = 0; block_idx < num_blocks; ++block_idx) {\n        Scalar* buf = block_idx == 0\n                          ? result\n                          : static_cast<Scalar*>(evaluator->m_device.allocate(\n                                buffer_size_bytes));\n        block_buffers.emplace_back(buf);\n      }\n    }\n\n    ~EvalShardedByInnerDimContext() {\n      for (Index i = 1; i < num_blocks; ++i) {\n        evaluator->m_device.deallocate(block_buffers[i]);\n      }\n    }\n\n    template <int Alignment>\n    void run() {\n      Barrier barrier(internal::convert_index<int>(num_blocks));\n      eval<Alignment>(barrier, 0, num_blocks);\n      barrier.Wait();\n\n      // Aggregate partial sums from l0 ranges.\n      aggregateL0Blocks<Alignment>();\n\n      // Apply output kernel.\n      applyOutputKernel();\n    }\n\n    template <int Alignment>\n    void runAsync() {\n      evalAsync<Alignment>(0, num_blocks);\n    }\n\n   private:\n    // The underlying GEMM kernel assumes that k is a multiple of\n    // the packet size and subtle breakage occurs if this is violated.\n    static const Index packet_size = internal::packet_traits<RhsScalar>::size;\n\n    const Self* evaluator;  // TensorContraction evaluator\n\n    // These fields required fromTENSOR_CONTRACTION_DISPATCH macro.\n    bool m_lhs_inner_dim_contiguous;\n    bool m_rhs_inner_dim_contiguous;\n    bool m_rhs_inner_dim_reordered;\n\n    Scalar* result;\n\n    Index m;\n    Index n;\n    Index k;\n\n    DoneCallback done;\n\n    // ----------------------------------------------------------------------//\n    // Algorithm parameters.\n\n    // We will compute partial results into the buffers of this size.\n    Index buffer_size_bytes;\n\n    Index block_size;\n    Index num_blocks;\n\n    // Keep track of pending tasks when evaluate in async mode.\n    std::atomic<int> num_pending_blocks;\n\n    // We compute partial gemm results in parallel, and to get the final result\n    // we need to add them all together. For the large number of threads (>= 48)\n    // this adds a very expensive sequential step at the end.\n    //\n    // We split the [0, num_blocks) into small ranges, and when a task for the\n    // block finishes its partial gemm computation, it checks if it was the last\n    // gemm in the range, and if so, it will add all blocks of the range.\n    //\n    // After all tasks done, we need to add only these pre-aggregated blocks.\n\n    // For now we use just a single level of ranges to compute pre-aggregated\n    // partial sums, but in general we can use more layers to compute tree\n    // aggregation in parallel and reduce the size of the sequential step.\n    //\n    // TODO(ezhulenev): Add multilevel tree aggregation? Probably will make\n    // sense only if number of threads >= ~128?\n    static const Index l0_size = 4;\n    Index l0_ranges;\n\n    // Keep count of pending gemm tasks for each l0 range.\n    MaxSizeVector<std::atomic<int>> l0_state;  // [0, l0_ranges)\n\n    // Buffers allocated for each temporary block computation.\n    MaxSizeVector<Scalar*> block_buffers;  // [0, num_blocks)\n\n    template <int Alignment>\n    void processBlock(Index block_idx, Index begin, Index end) {\n      Scalar* buf = block_buffers[block_idx];\n\n      TENSOR_CONTRACTION_DISPATCH(\n          evaluator->template evalGemmPartialWithoutOutputKernel, Alignment,\n          (buf, begin, end,\n           /*num_threads=*/internal::convert_index<int>(num_blocks)));\n\n      // Check if it was the last task in l0 range.\n      const Index l0_index = block_idx / l0_size;\n      const int v = l0_state[l0_index].fetch_sub(1);\n      eigen_assert(v >= 1);\n\n      // If we processed the last block of the range, we can aggregate all\n      // partial results into the first block of the range.\n      if (v == 1) {\n        const Index rng_size = actualRangeSize(l0_ranges, l0_size, l0_index);\n        const Index dst_block_idx = l0_index * l0_size;\n\n        if (rng_size == l0_size) {\n          addAllToBuffer<Alignment>(\n              m * n,\n              /*src_buf0=*/block_buffers[dst_block_idx + 1],\n              /*src_buf1=*/block_buffers[dst_block_idx + 2],\n              /*src_buf2=*/block_buffers[dst_block_idx + 3],\n              /*dst_buf= */ block_buffers[dst_block_idx]);\n        } else {\n          // Aggregate blocks of potentially incomplete last range.\n          for (int i = 1; i < rng_size; ++i) {\n            addToBuffer<Alignment>(m * n,\n                                   /*src_buf=*/block_buffers[dst_block_idx + i],\n                                   /*dst_buf=*/block_buffers[dst_block_idx]);\n          }\n        }\n      }\n    }\n\n    // Aggregate partial sums from l0 ranges.\n    template <int Alignment>\n    void aggregateL0Blocks() const {\n      Index l0_index = 1;\n\n      for (; l0_index + 2 < l0_ranges; l0_index += 3) {\n        addAllToBuffer<Alignment>(\n            m * n,\n            /*src_buf0=*/block_buffers[(l0_index + 0) * l0_size],\n            /*src_buf1=*/block_buffers[(l0_index + 1) * l0_size],\n            /*src_buf2=*/block_buffers[(l0_index + 2) * l0_size],\n            /*dst_buf= */ block_buffers[0]);\n      }\n\n      for (; l0_index < l0_ranges; ++l0_index) {\n        addToBuffer<Alignment>(m * n, block_buffers[l0_index * l0_size],\n                               block_buffers[0]);\n      }\n    }\n\n    void applyOutputKernel() const {\n      typedef internal::blas_data_mapper<Scalar, Index, ColMajor> OutputMapper;\n      evaluator->m_output_kernel(\n          OutputMapper(result, m), evaluator->m_tensor_contraction_params,\n          static_cast<Eigen::Index>(0), static_cast<Eigen::Index>(0), m, n);\n    }\n\n    // Compute block size with accounting for potentially incomplete last block.\n    Index actualBlockSize(Index block_idx) const {\n      return block_idx + 1 < num_blocks\n                 ? block_size\n                 : k + block_size - block_size * num_blocks;\n    };\n\n    // Compute range size with accounting for potentially incomplete last range.\n    Index actualRangeSize(Index num_ranges, Index range_size,\n                          Index range_idx) const {\n      eigen_assert(range_idx < num_ranges);\n      return range_idx + 1 < num_ranges\n                 ? range_size\n                 : num_blocks + range_size - range_size * num_ranges;\n    };\n\n    template <int Alignment>\n    EIGEN_STRONG_INLINE static void addToBuffer(size_t n, const Scalar* src_buf,\n                                                Scalar* tgt_buf) {\n      const int output_packet_size =\n          internal::unpacket_traits<PacketReturnType>::size;\n      size_t i = 0;\n      const size_t num_packets = n / output_packet_size;\n      for (; i < output_packet_size * num_packets; i += output_packet_size) {\n        const PacketReturnType src_val =\n            internal::pload<PacketReturnType>(src_buf + i);\n        const PacketReturnType tgt_val =\n            internal::ploadt<PacketReturnType, Alignment>(tgt_buf + i);\n        const PacketReturnType sum = internal::padd(src_val, tgt_val);\n        internal::pstoret<Scalar, PacketReturnType, Alignment>(tgt_buf + i,\n                                                               sum);\n      }\n      for (; i < n; ++i) {\n        tgt_buf[i] += src_buf[i];\n      }\n    }\n\n    template <int Alignment>\n    EIGEN_STRONG_INLINE static void addAllToBuffer(size_t n,\n                                                   const Scalar* src_buf0,\n                                                   const Scalar* src_buf1,\n                                                   const Scalar* src_buf2,\n                                                   Scalar* dst_buf) {\n      using ::Eigen::internal::padd;\n      using ::Eigen::internal::pload;\n      using ::Eigen::internal::ploadt;\n      using ::Eigen::internal::pstoret;\n\n      const int output_packet_size =\n          internal::unpacket_traits<PacketReturnType>::size;\n\n      size_t i = 0;\n      const size_t num_packets = n / output_packet_size;\n      for (; i < output_packet_size * num_packets; i += output_packet_size) {\n        const auto src_val0 = pload<PacketReturnType>(src_buf0 + i);\n        const auto src_val1 = pload<PacketReturnType>(src_buf1 + i);\n        const auto src_val2 = pload<PacketReturnType>(src_buf2 + i);\n\n        const auto dst_val = ploadt<PacketReturnType, Alignment>(dst_buf + i);\n        const auto sum =\n            padd(padd(dst_val, src_val0), padd(src_val1, src_val2));\n\n        pstoret<Scalar, PacketReturnType, Alignment>(dst_buf + i, sum);\n      }\n      for (; i < n; ++i) {\n        dst_buf[i] += src_buf0[i] + src_buf1[i] + src_buf2[i];\n      }\n    }\n\n    template <int Alignment>\n    void eval(Barrier& barrier, Index start_block_idx, Index end_block_idx) {\n      while (end_block_idx - start_block_idx > 1) {\n        Index mid_block_idx = (start_block_idx + end_block_idx) / 2;\n        evaluator->m_device.enqueueNoNotification(\n            [this, &barrier, mid_block_idx, end_block_idx]() {\n              eval<Alignment>(barrier, mid_block_idx, end_block_idx);\n            });\n        end_block_idx = mid_block_idx;\n      }\n\n      Index block_idx = start_block_idx;\n      Index block_start = block_idx * block_size;\n      Index block_end = block_start + actualBlockSize(block_idx);\n\n      processBlock<Alignment>(block_idx, block_start, block_end);\n      barrier.Notify();\n    }\n\n    template <int Alignment>\n    void evalAsync(Index start_block_idx, Index end_block_idx) {\n      while (end_block_idx - start_block_idx > 1) {\n        Index mid_block_idx = (start_block_idx + end_block_idx) / 2;\n        evaluator->m_device.enqueueNoNotification(\n            [this, mid_block_idx, end_block_idx]() {\n              evalAsync<Alignment>(mid_block_idx, end_block_idx);\n            });\n        end_block_idx = mid_block_idx;\n      }\n\n      Index block_idx = start_block_idx;\n\n      Index block_start = block_idx * block_size;\n      Index block_end = block_start + actualBlockSize(block_idx);\n\n      processBlock<Alignment>(block_idx, block_start, block_end);\n\n      int v = num_pending_blocks.fetch_sub(1);\n      eigen_assert(v >= 1);\n\n      if (v == 1) {\n        // Aggregate partial sums from l0 ranges.\n        aggregateL0Blocks<Alignment>();\n\n        // Apply output kernel.\n        applyOutputKernel();\n\n        // NOTE: If we call `done` callback before deleting this (context),\n        // it might deallocate Self* pointer captured by context, and we'll\n        // fail in destructor trying to deallocate temporary buffers.\n\n        // Move done call back from context before it will be destructed.\n        DoneCallback done_copy = std::move(done);\n\n        // We are confident that we are the last one who touches context.\n        delete this;\n\n        // Now safely call the done callback.\n        done_copy();\n      }\n    }\n\n    // Cost model doesn't capture well the cost associated with constructing\n    // tensor contraction mappers and computing loop bounds in gemm_pack_lhs\n    // and gemm_pack_rhs, so we specify minimum desired block size.\n    static Index blockSize(Index k, int num_threads) {\n      const auto round_up = [=](Index index) -> Index {\n        const Index kmultiple = packet_size <= 8 ? 8 : packet_size;\n        return divup<Index>(index, kmultiple) * kmultiple;\n      };\n\n      const Index target_block_size = round_up(divup<Index>(k, num_threads));\n      const Index desired_min_block_size = 12 * packet_size;\n\n      return numext::mini<Index>(\n          k, numext::maxi<Index>(desired_min_block_size, target_block_size));\n    }\n\n    EvalShardedByInnerDimContext(const EvalShardedByInnerDimContext&) = delete;\n    void operator=(const EvalShardedByInnerDimContext&) = delete;\n  };\n\n  // ------------------------------------------------------------------------ //\n\n  // Below are the function used by evalProductImpl heuristics, trying to select\n  // optimcal parameters for parallelization algorithm.\n\n  // Decide whether we want to shard m x n contraction by columns or by rows.\n  static bool shardByCol(Index m, Index n, Index num_threads) {\n    // Note: we are comparing both n and m against Traits::nr, it is not\n    // a mistake. We are trying to figure out how both n and m will fit into\n    // the main sharding dimension.\n\n    // Sharding by column is the default\n    // ... unless there is enough data for vectorization over rows\n    if (m / num_threads >= Traits::nr &&\n        // and not enough data for vectorization over columns\n        (n / num_threads < Traits::nr ||\n         // ... or barely enough data for vectorization over columns,\n         // but it is not evenly dividable across threads\n         (n / num_threads < 4 * Traits::nr &&\n          (n % (num_threads * Traits::nr)) != 0 &&\n          // ... and it is evenly dividable across threads for rows\n          ((m % (num_threads * Traits::nr)) == 0 ||\n           // .. or it is not evenly dividable for both dimensions but\n           // there is much more data over rows so that corner effects are\n           // mitigated.\n           (m / n >= 6)))))\n      return false;\n    // Wait, or if matrices are just substantially prolonged over the other\n    // dimension.\n    if (n / num_threads < 16 * Traits::nr && m > n * 32) return false;\n    return true;\n  }\n\n  Index coarsenM(Index m, Index n, Index bm, Index bn, Index bk, Index gn,\n                 int num_threads, bool shard_by_col) const {\n    Index gm = 1;\n    Index gm1 = 1;\n    Index nm0 = divup(m, bm);\n    Index nm1 = nm0;\n    for (;;) {\n      // Find the next candidate for m grain size. It needs to result in\n      // different number of blocks. E.g. if we have 10 kernels, we want to try\n      // 5 and 10, but not 6, 7, 8 and 9.\n      while (gm1 <= nm0 && nm1 == divup(nm0, gm1)) gm1++;\n      if (gm1 > nm0) break;\n      // Check the candidate.\n      int res = checkGrain(m, n, bm, bn, bk, gm1, gn, gm, gn, num_threads,\n                           shard_by_col);\n      if (res < 0) break;\n      nm1 = divup(nm0, gm1);\n      if (res == 0) continue;\n      // Commit new grain size.\n      gm = gm1;\n    }\n    return gm;\n  }\n\n  Index coarsenN(Index m, Index n, Index bm, Index bn, Index bk, Index gm,\n                 int num_threads, bool shard_by_col) const {\n    Index gn = 1;\n    Index gn1 = 1;\n    Index nn0 = divup(n, bn);\n    Index nn1 = nn0;\n    for (;;) {\n      while (gn1 <= nn0 && nn1 == divup(nn0, gn1)) gn1++;\n      if (gn1 > nn0) break;\n      int res = checkGrain(m, n, bm, bn, bk, gm, gn1, gm, gn, num_threads,\n                           shard_by_col);\n      if (res < 0) break;\n      nn1 = divup(nn0, gn1);\n      if (res == 0) continue;\n      gn = gn1;\n    }\n    return gn;\n  }\n\n  // checkGrain checks whether grain (gm, gn) is suitable and is better than\n  // (oldgm, oldgn).\n  int checkGrain(Index m, Index n, Index bm, Index bn, Index bk, Index gm,\n                 Index gn, Index oldgm, Index oldgn, int num_threads,\n                 bool shard_by_col) const {\n    const TensorOpCost cost =\n        contractionCost(bm * gm, bn * gn, bm, bn, bk, shard_by_col, true);\n    double taskSize = TensorCostModel<ThreadPoolDevice>::taskSize(\n        static_cast<double>(bm) * gm * bn * gn, cost);\n    // If the task is too small, then we agree on it regardless of anything\n    // else. Otherwise synchronization overheads will dominate.\n    if (taskSize < 1) return 1;\n    // If it is too large, then we reject it and all larger tasks.\n    if (taskSize > 2) return -1;\n    // Now we are in presumably good task size range.\n    // The main deciding factor here is parallelism. Consider that we have 12\n    // kernels and 4 threads. Grains of 2, 3 and 4 all yield good task sizes.\n    // But 2/4 yield 6/3 tasks, which gives us parallelism of 0.75 (at most 3/4\n    // of cores will be busy). While grain size 3 gives us 4 tasks, which gives\n    // us parallelism of 1 (we can load all cores).\n    Index nm0 = divup(m, bm);\n    Index nn0 = divup(n, bn);\n    Index new_tasks = divup(nm0, gm) * divup(nn0, gn);\n    double new_parallelism = static_cast<double>(new_tasks) /\n                             (divup<int>(new_tasks, num_threads) * num_threads);\n    Index old_tasks = divup(nm0, oldgm) * divup(nn0, oldgn);\n    double old_parallelism = static_cast<double>(old_tasks) /\n                             (divup<int>(old_tasks, num_threads) * num_threads);\n    if (new_parallelism > old_parallelism || new_parallelism == 1) return 1;\n    return 0;\n  }\n\n  TensorOpCost contractionCost(Index m, Index n, Index bm, Index bn, Index bk,\n                               bool shard_by_col, bool prepacked) const {\n    const int packed_size = std::min<int>(PacketType<LhsScalar, Device>::size,\n                                          PacketType<RhsScalar, Device>::size);\n    const int output_packet_size = internal::unpacket_traits<PacketReturnType>::size;\n    const double kd = static_cast<double>(bk);\n    double compute_bandwidth = computeBandwidth(false, bm, bn, bk);\n    // Computations.\n    TensorOpCost cost = TensorOpCost(0, 0, kd * compute_bandwidth, true, packed_size);\n    // Output stores.\n    cost += TensorOpCost(0, sizeof(CoeffReturnType), 0, true, output_packet_size);\n    if (prepacked) {\n      // Packing and kernels are executed in different tasks. When we calculate\n      // task grain size we look only at kernel cost assuming that kernel\n      // is more expensive than packing.\n      return cost;\n    }\n    // Lhs/rhs loads + computations.\n    TensorOpCost lhsCost = this->m_leftImpl.costPerCoeff(true) * (kd / n);\n    TensorOpCost rhsCost = this->m_rightImpl.costPerCoeff(true) * (kd / m);\n    // Lhs packing memory cost does not contribute considerably to overall\n    // execution time because lhs is prefetched early and accessed sequentially.\n    if (shard_by_col)\n      lhsCost.dropMemoryCost();\n    else\n      rhsCost.dropMemoryCost();\n    return cost + lhsCost + rhsCost;\n  }\n\n  // Decide whether we want to shard m x k x n contraction over the inner\n  // (contraction) dimension (k).\n  static bool shardByInnerDim(Index m, Index n, Index k, int num_threads,\n                              int num_threads_by_k) {\n    std::ptrdiff_t bufsize = m * n * sizeof(Scalar);\n    bool shard_by_k = false;\n    if (n == 1 ||                // If mat*vec or...\n        num_threads_by_k < 2 ||  // running single threaded or...\n        num_threads_by_k <\n            num_threads ||  // sharding by k gives less parallelism or...\n        bufsize > l3CacheSize() / num_threads_by_k ||  // need more buffer space\n        // than L3 cache or...\n        k / num_threads_by_k < 2 * Traits::nr) {  // k per thread is tiny.\n      shard_by_k = false;\n    } else if (numext::maxi(m, n) / num_threads <\n                   Traits::nr ||  // both other dimensions are tiny or...\n               // k per thread is not small and...\n               (k / num_threads_by_k > 8 * Traits::nr &&\n                // one of the outer dimensions is tiny or sharding by k offers\n                // more parallelism.\n                (numext::mini(m, n) < 2 * Traits::nr ||\n                 num_threads_by_k > num_threads))) {\n      shard_by_k = true;\n    }\n    return shard_by_k;\n  }\n\n  TensorOpCost contractionCostPerInnerDim(Index m, Index n, Index k) const {\n    // Compute cost.\n    const int output_packet_size = internal::unpacket_traits<PacketReturnType>::size;\n    TensorOpCost cost(0, 0, (computeBandwidth(true, m, n, k) * m) * n, true, output_packet_size);\n    // Output stores.\n    cost += TensorOpCost(0, sizeof(CoeffReturnType), 0, true, output_packet_size);\n    TensorOpCost lhsCost = this->m_leftImpl.costPerCoeff(true) * m;\n    TensorOpCost rhsCost = this->m_rightImpl.costPerCoeff(true) * n;\n    // Since the inner gemm kernel is always sharded by column, the lhs\n    // load cost is negligible.\n    lhsCost.dropMemoryCost();\n    return cost + lhsCost + rhsCost;\n  }\n\n  int numThreadsInnerDim(Index m, Index n, Index k) const {\n    const int output_packet_size = internal::unpacket_traits<PacketReturnType>::size;\n    TensorOpCost cost = contractionCostPerInnerDim(m, n, k);\n    double total_parallel_cost =\n        TensorCostModel<ThreadPoolDevice>::totalCost(k, cost);\n    // Cost of reduction step accumulating the m*n per-thread buffers into the\n    // result.\n    double reduction_cost = TensorCostModel<ThreadPoolDevice>::totalCost(\n        m * n, TensorOpCost(2, 1, 1, true, output_packet_size));\n    int num_threads = 1;\n    double min_cost = total_parallel_cost;\n    double kPerThreadOverHead = 3000;\n    double kFixedOverHead = 100000;\n    for (int nt = 2; nt <= this->m_device.numThreads(); nt += 2) {\n      double sequential_cost =\n          kFixedOverHead + nt * (reduction_cost + kPerThreadOverHead);\n      double parallel_cost = total_parallel_cost / nt + sequential_cost;\n      if (parallel_cost < min_cost) {\n        num_threads = nt;\n        min_cost = parallel_cost;\n      }\n    }\n    return num_threads;\n  }\n\n  double computeBandwidth(bool shard_by_col, Index bm, Index bn,\n                          Index bk) const {\n    // Peak VFMA bandwidth is 0.5. However if we have not enough data for\n    // vectorization bandwidth drops. The 4.0 and 2.0 bandwidth is determined\n    // experimentally.\n    double computeBandwidth =\n        bk == 1 ? 4.0\n                : (shard_by_col ? bn : bm) < Traits::nr ||\n                          (shard_by_col ? bm : bn) < Traits::mr\n                      ? 2.0\n                      : 0.5;\n#ifndef EIGEN_VECTORIZE_FMA\n    // Bandwidth of all of VFMA/MULPS/ADDPS is 0.5 on latest Intel processors.\n    // However for MULPS/ADDPS we have dependent sequence of 2 such\n    // instructions,\n    // so overall bandwidth is 1.0.\n    if (computeBandwidth == 0.5) computeBandwidth = 1.0;\n#endif\n    return computeBandwidth;\n  }\n\n};\n\n} // end namespace Eigen\n\n#endif  // EIGEN_USE_THREADS\n#endif // EIGEN_CXX11_TENSOR_TENSOR_CONTRACTION_THREAD_POOL_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorConversion.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_CONVERSION_H\n#define EIGEN_CXX11_TENSOR_TENSOR_CONVERSION_H\n\nnamespace Eigen {\n\n/** \\class TensorConversionOp\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief Tensor conversion class. This class makes it possible to vectorize\n  * type casting operations when the number of scalars per packet in the source\n  * and the destination type differ\n  */\nnamespace internal {\ntemplate<typename TargetType, typename XprType>\nstruct traits<TensorConversionOp<TargetType, XprType> >\n{\n  // Type promotion to handle the case where the types of the lhs and the rhs are different.\n  typedef TargetType Scalar;\n  typedef typename traits<XprType>::StorageKind StorageKind;\n  typedef typename traits<XprType>::Index Index;\n  typedef typename XprType::Nested Nested;\n  typedef typename remove_reference<Nested>::type _Nested;\n  static const int NumDimensions = traits<XprType>::NumDimensions;\n  static const int Layout = traits<XprType>::Layout;\n  enum { Flags = 0 };\n  typedef typename TypeConversion<Scalar, typename traits<XprType>::PointerType>::type PointerType;\n};\n\ntemplate<typename TargetType, typename XprType>\nstruct eval<TensorConversionOp<TargetType, XprType>, Eigen::Dense>\n{\n  typedef const TensorConversionOp<TargetType, XprType>& type;\n};\n\ntemplate<typename TargetType, typename XprType>\nstruct nested<TensorConversionOp<TargetType, XprType>, 1, typename eval<TensorConversionOp<TargetType, XprType> >::type>\n{\n  typedef TensorConversionOp<TargetType, XprType> type;\n};\n\n}  // end namespace internal\n\n\ntemplate <typename TensorEvaluator, typename SrcPacket, typename TgtPacket, int SrcCoeffRatio, int TgtCoeffRatio>\nstruct PacketConverter {\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  PacketConverter(const TensorEvaluator& impl)\n      : m_impl(impl) {}\n\n  template<int LoadMode, typename Index>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TgtPacket packet(Index index) const {\n    return internal::pcast<SrcPacket, TgtPacket>(m_impl.template packet<LoadMode>(index));\n  }\n\n private:\n  const TensorEvaluator& m_impl;\n};\n\n\ntemplate <typename TensorEvaluator, typename SrcPacket, typename TgtPacket>\nstruct PacketConverter<TensorEvaluator, SrcPacket, TgtPacket, 2, 1> {\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  PacketConverter(const TensorEvaluator& impl)\n      : m_impl(impl) {}\n\n  template<int LoadMode, typename Index>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TgtPacket packet(Index index) const {\n    const int SrcPacketSize = internal::unpacket_traits<SrcPacket>::size;\n\n    SrcPacket src1 = m_impl.template packet<LoadMode>(index);\n    SrcPacket src2 = m_impl.template packet<LoadMode>(index + SrcPacketSize);\n    TgtPacket result = internal::pcast<SrcPacket, TgtPacket>(src1, src2);\n    return result;\n  }\n\n private:\n  const TensorEvaluator& m_impl;\n};\n\ntemplate <typename TensorEvaluator, typename SrcPacket, typename TgtPacket>\nstruct PacketConverter<TensorEvaluator, SrcPacket, TgtPacket, 4, 1> {\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  PacketConverter(const TensorEvaluator& impl)\n      : m_impl(impl) {}\n\n  template<int LoadMode, typename Index>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TgtPacket packet(Index index) const {\n    const int SrcPacketSize = internal::unpacket_traits<SrcPacket>::size;\n\n    SrcPacket src1 = m_impl.template packet<LoadMode>(index);\n    SrcPacket src2 = m_impl.template packet<LoadMode>(index + SrcPacketSize);\n    SrcPacket src3 = m_impl.template packet<LoadMode>(index + 2 * SrcPacketSize);\n    SrcPacket src4 = m_impl.template packet<LoadMode>(index + 3 * SrcPacketSize);\n    TgtPacket result = internal::pcast<SrcPacket, TgtPacket>(src1, src2, src3, src4);\n    return result;\n  }\n\n private:\n  const TensorEvaluator& m_impl;\n};\n\ntemplate <typename TensorEvaluator, typename SrcPacket, typename TgtPacket>\nstruct PacketConverter<TensorEvaluator, SrcPacket, TgtPacket, 1, 2> {\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  PacketConverter(const TensorEvaluator& impl)\n      : m_impl(impl), m_maxIndex(impl.dimensions().TotalSize()) {}\n\n  template<int LoadMode, typename Index>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TgtPacket packet(Index index) const {\n    const int SrcPacketSize = internal::unpacket_traits<SrcPacket>::size;\n    // Only call m_impl.packet() when we have direct access to the underlying data. This\n    // ensures that we don't compute the subexpression twice. We may however load some\n    // coefficients twice, but in practice this doesn't negatively impact performance.\n    if (m_impl.data() && (index + SrcPacketSize < m_maxIndex)) {\n      // Force unaligned memory loads since we can't ensure alignment anymore\n      return internal::pcast<SrcPacket, TgtPacket>(m_impl.template packet<Unaligned>(index));\n    } else {\n      const int TgtPacketSize = internal::unpacket_traits<TgtPacket>::size;\n      typedef typename internal::unpacket_traits<SrcPacket>::type SrcType;\n      typedef typename internal::unpacket_traits<TgtPacket>::type TgtType;\n      internal::scalar_cast_op<SrcType, TgtType> converter;\n      EIGEN_ALIGN_MAX typename internal::unpacket_traits<TgtPacket>::type values[TgtPacketSize];\n      EIGEN_UNROLL_LOOP\n      for (int i = 0; i < TgtPacketSize; ++i) {\n        values[i] = converter(m_impl.coeff(index+i));\n      }\n      TgtPacket rslt = internal::pload<TgtPacket>(values);\n      return rslt;\n    }\n  }\n\n private:\n  const TensorEvaluator& m_impl;\n  const typename TensorEvaluator::Index m_maxIndex;\n};\n\ntemplate<typename TargetType, typename XprType>\nclass TensorConversionOp : public TensorBase<TensorConversionOp<TargetType, XprType>, ReadOnlyAccessors>\n{\n  public:\n    typedef typename internal::traits<TensorConversionOp>::Scalar Scalar;\n    typedef typename internal::traits<TensorConversionOp>::StorageKind StorageKind;\n    typedef typename internal::traits<TensorConversionOp>::Index Index;\n    typedef typename internal::nested<TensorConversionOp>::type Nested;\n    typedef Scalar CoeffReturnType;\n    typedef typename NumTraits<Scalar>::Real RealScalar;\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorConversionOp(const XprType& xpr)\n        : m_xpr(xpr) {}\n\n    EIGEN_DEVICE_FUNC\n    const typename internal::remove_all<typename XprType::Nested>::type&\n    expression() const { return m_xpr; }\n\n  protected:\n    typename XprType::Nested m_xpr;\n};\n\ntemplate <bool SameType, typename Eval, typename EvalPointerType> struct ConversionSubExprEval {\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool run(Eval& impl, EvalPointerType) {\n    impl.evalSubExprsIfNeeded(NULL);\n    return true;\n  }\n};\n\ntemplate <typename Eval, typename EvalPointerType> struct ConversionSubExprEval<true, Eval, EvalPointerType> {\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool run(Eval& impl, EvalPointerType data) {\n    return impl.evalSubExprsIfNeeded(data);\n  }\n};\n\n#ifdef EIGEN_USE_THREADS\ntemplate <bool SameType, typename Eval, typename EvalPointerType,\n          typename EvalSubExprsCallback>\nstruct ConversionSubExprEvalAsync {\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(\n      Eval& impl, EvalPointerType, EvalSubExprsCallback done) {\n    impl.evalSubExprsIfNeededAsync(nullptr, std::move(done));\n  }\n};\n\ntemplate <typename Eval, typename EvalPointerType,\n          typename EvalSubExprsCallback>\nstruct ConversionSubExprEvalAsync<true, Eval, EvalPointerType,\n                                  EvalSubExprsCallback> {\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(\n      Eval& impl, EvalPointerType data, EvalSubExprsCallback done) {\n    impl.evalSubExprsIfNeededAsync(data, std::move(done));\n  }\n};\n#endif\n\nnamespace internal {\n\ntemplate <typename SrcType, typename TargetType, bool IsSameT>\nstruct CoeffConv {\n  template <typename ArgType, typename Device>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TargetType run(const TensorEvaluator<ArgType, Device>& impl, Index index) {\n    internal::scalar_cast_op<SrcType, TargetType> converter;\n    return converter(impl.coeff(index));\n  }\n};\n\ntemplate <typename SrcType, typename TargetType>\nstruct CoeffConv<SrcType, TargetType, true> {\n  template <typename ArgType, typename Device>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TargetType run(const TensorEvaluator<ArgType, Device>& impl, Index index) {\n    return impl.coeff(index);\n  }\n};\n\ntemplate <typename SrcPacket, typename TargetPacket, int LoadMode, bool ActuallyVectorize, bool IsSameT>\nstruct PacketConv {\n  typedef typename internal::unpacket_traits<SrcPacket>::type SrcType;\n  typedef typename internal::unpacket_traits<TargetPacket>::type TargetType;\n\n  static const int PacketSize = internal::unpacket_traits<TargetPacket>::size;\n\n  template <typename ArgType, typename Device>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TargetPacket run(const TensorEvaluator<ArgType, Device>& impl, Index index) {\n    internal::scalar_cast_op<SrcType, TargetType> converter;\n    EIGEN_ALIGN_MAX typename internal::remove_const<TargetType>::type values[PacketSize];\n    EIGEN_UNROLL_LOOP\n    for (int i = 0; i < PacketSize; ++i) {\n      values[i] = converter(impl.coeff(index+i));\n    }\n    TargetPacket rslt = internal::pload<TargetPacket>(values);\n    return rslt;\n  }\n};\n\ntemplate <typename SrcPacket, typename TargetPacket, int LoadMode, bool IsSameT>\nstruct PacketConv<SrcPacket, TargetPacket, LoadMode, true, IsSameT> {\n  typedef typename internal::unpacket_traits<SrcPacket>::type SrcType;\n  typedef typename internal::unpacket_traits<TargetPacket>::type TargetType;\n\n  template <typename ArgType, typename Device>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TargetPacket run(const TensorEvaluator<ArgType, Device>& impl, Index index) {\n    const int SrcCoeffRatio = internal::type_casting_traits<SrcType, TargetType>::SrcCoeffRatio;\n    const int TgtCoeffRatio = internal::type_casting_traits<SrcType, TargetType>::TgtCoeffRatio;\n    PacketConverter<TensorEvaluator<ArgType, Device>, SrcPacket, TargetPacket,\n                    SrcCoeffRatio, TgtCoeffRatio> converter(impl);\n    return converter.template packet<LoadMode>(index);\n  }\n};\n\ntemplate <typename SrcPacket, typename TargetPacket, int LoadMode>\nstruct PacketConv<SrcPacket, TargetPacket, LoadMode, /*ActuallyVectorize=*/false, /*IsSameT=*/true> {\n  typedef typename internal::unpacket_traits<TargetPacket>::type TargetType;\n  static const int PacketSize = internal::unpacket_traits<TargetPacket>::size;\n\n  template <typename ArgType, typename Device>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TargetPacket run(const TensorEvaluator<ArgType, Device>& impl, Index index) {\n    EIGEN_ALIGN_MAX typename internal::remove_const<TargetType>::type values[PacketSize];\n    for (int i = 0; i < PacketSize; ++i) values[i] = impl.coeff(index+i);\n    return internal::pload<TargetPacket>(values);\n  }\n};\n\ntemplate <typename SrcPacket, typename TargetPacket, int LoadMode>\nstruct PacketConv<SrcPacket, TargetPacket, LoadMode, /*ActuallyVectorize=*/true, /*IsSameT=*/true> {\n  template <typename ArgType, typename Device>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TargetPacket run(const TensorEvaluator<ArgType, Device>& impl, Index index) {\n    return impl.template packet<LoadMode>(index);\n  }\n};\n\n}  // namespace internal\n\n// Eval as rvalue\ntemplate<typename TargetType, typename ArgType, typename Device>\nstruct TensorEvaluator<const TensorConversionOp<TargetType, ArgType>, Device>\n{\n  typedef TensorConversionOp<TargetType, ArgType> XprType;\n  typedef typename XprType::Index Index;\n  typedef typename TensorEvaluator<ArgType, Device>::Dimensions Dimensions;\n  typedef TargetType Scalar;\n  typedef TargetType CoeffReturnType;\n  typedef typename internal::remove_all<typename internal::traits<ArgType>::Scalar>::type SrcType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  typedef typename PacketType<SrcType, Device>::type PacketSourceType;\n  static const int PacketSize = PacketType<CoeffReturnType, Device>::size;\n  static const bool IsSameType = internal::is_same<TargetType, SrcType>::value;\n  typedef StorageMemory<CoeffReturnType, Device> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n\n  enum {\n    IsAligned         = false,\n    PacketAccess      =\n    #ifndef EIGEN_USE_SYCL\n                        true,\n    #else\n                        TensorEvaluator<ArgType, Device>::PacketAccess &\n                        internal::type_casting_traits<SrcType, TargetType>::VectorizedCast,\n    #endif\n    BlockAccess       = TensorEvaluator<ArgType, Device>::BlockAccess,\n    PreferBlockAccess = TensorEvaluator<ArgType, Device>::PreferBlockAccess,\n    Layout            = TensorEvaluator<ArgType, Device>::Layout,\n    RawAccess         = false\n  };\n\n  static const int NumDims = internal::array_size<Dimensions>::value;\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockDescriptor<NumDims, Index> TensorBlockDesc;\n  typedef internal::TensorBlockScratchAllocator<Device> TensorBlockScratch;\n\n  typedef typename TensorEvaluator<const ArgType, Device>::TensorBlock\n      ArgTensorBlock;\n\n  struct TensorConversionOpBlockFactory {\n    template <typename ArgXprType>\n    struct XprType {\n      typedef TensorConversionOp<TargetType, const ArgXprType> type;\n    };\n\n    template <typename ArgXprType>\n    typename XprType<ArgXprType>::type expr(const ArgXprType& expr) const {\n      return typename XprType<ArgXprType>::type(expr);\n    }\n  };\n\n  typedef internal::TensorUnaryExprBlock<TensorConversionOpBlockFactory,\n                                         ArgTensorBlock>\n      TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)\n    : m_impl(op.expression(), device)\n  {\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions& dimensions() const { return m_impl.dimensions(); }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType data)\n  {\n    return ConversionSubExprEval<IsSameType, TensorEvaluator<ArgType, Device>, EvaluatorPointerType>::run(m_impl, data);\n  }\n\n#ifdef EIGEN_USE_THREADS\n  template <typename EvalSubExprsCallback>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalSubExprsIfNeededAsync(\n      EvaluatorPointerType data, EvalSubExprsCallback done) {\n    ConversionSubExprEvalAsync<IsSameType, TensorEvaluator<ArgType, Device>,\n                               EvaluatorPointerType,\n        EvalSubExprsCallback>::run(m_impl, data, std::move(done));\n  }\n#endif\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup()\n  {\n    m_impl.cleanup();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const\n  {\n    return internal::CoeffConv<SrcType, TargetType, IsSameType>::run(m_impl,index);\n  }\n\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType\n  packet(Index index) const {\n    // If we are not going to do the cast, we just need to check that base\n    // TensorEvaluator has packet access. Otherwise we also need to make sure,\n    // that we have an implementation of vectorized cast.\n    const bool Vectorizable =\n        IsSameType\n        ? TensorEvaluator<ArgType, Device>::PacketAccess\n        : TensorEvaluator<ArgType, Device>::PacketAccess &\n          internal::type_casting_traits<SrcType, TargetType>::VectorizedCast;\n\n    return internal::PacketConv<PacketSourceType, PacketReturnType, LoadMode,\n                                Vectorizable, IsSameType>::run(m_impl, index);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost\n  costPerCoeff(bool vectorized) const {\n    const double cast_cost = TensorOpCost::CastCost<SrcType, TargetType>();\n    if (vectorized) {\n      const double SrcCoeffRatio =\n          internal::type_casting_traits<SrcType, TargetType>::SrcCoeffRatio;\n      const double TgtCoeffRatio =\n          internal::type_casting_traits<SrcType, TargetType>::TgtCoeffRatio;\n      return m_impl.costPerCoeff(vectorized) * (SrcCoeffRatio / PacketSize) +\n          TensorOpCost(0, 0, TgtCoeffRatio * (cast_cost / PacketSize));\n    } else {\n      return m_impl.costPerCoeff(vectorized) + TensorOpCost(0, 0, cast_cost);\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  internal::TensorBlockResourceRequirements getResourceRequirements() const {\n    return m_impl.getResourceRequirements();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorBlock\n  block(TensorBlockDesc& desc, TensorBlockScratch& scratch,\n          bool /*root_of_expr_ast*/ = false) const {\n    return TensorBlock(m_impl.block(desc, scratch),\n                         TensorConversionOpBlockFactory());\n  }\n\n  EIGEN_DEVICE_FUNC EvaluatorPointerType data() const { return NULL; }\n\n  /// required by sycl in order to extract the sycl accessor\n  const TensorEvaluator<ArgType, Device>& impl() const { return m_impl; }\n#ifdef EIGEN_USE_SYCL\n  // binding placeholder accessors to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {\n    m_impl.bind(cgh);\n  }\n#endif\n\n protected:\n  TensorEvaluator<ArgType, Device> m_impl;\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_CONVERSION_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorConvolution.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_CONVOLUTION_H\n#define EIGEN_CXX11_TENSOR_TENSOR_CONVOLUTION_H\n\nnamespace Eigen {\n\n/** \\class TensorConvolution\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief Tensor convolution class.\n  *\n  *\n  */\nnamespace internal {\n\ntemplate <typename Index, typename InputDims, int NumKernelDims, int Layout>\nclass IndexMapper {\n public:\n  IndexMapper(const InputDims& input_dims, const array<Index, NumKernelDims>& kernel_dims,\n              const array<Index, NumKernelDims>& indices) {\n\n    array<Index, NumDims> dimensions = input_dims;\n    for (int i = 0; i < NumKernelDims; ++i) {\n      const Index index = indices[i];\n      const Index input_dim = input_dims[index];\n      const Index kernel_dim = kernel_dims[i];\n      const Index result_dim = input_dim - kernel_dim + 1;\n      dimensions[index] = result_dim;\n    }\n\n    array<Index, NumDims> inputStrides;\n    array<Index, NumDims> outputStrides;\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      inputStrides[0] = 1;\n      outputStrides[0] = 1;\n      for (int i = 1; i < NumDims; ++i) {\n        inputStrides[i] = inputStrides[i-1] * input_dims[i-1];\n        outputStrides[i] = outputStrides[i-1] * dimensions[i-1];\n      }\n    } else {\n      inputStrides[NumDims - 1] = 1;\n      outputStrides[NumDims - 1] = 1;\n      for (int i = static_cast<int>(NumDims) - 2; i >= 0; --i) {\n        inputStrides[i] = inputStrides[i + 1] * input_dims[i + 1];\n        outputStrides[i] = outputStrides[i + 1] * dimensions[i + 1];\n      }\n    }\n\n    array<Index, NumDims> gpuInputDimensions;\n    array<Index, NumDims> gpuOutputDimensions;\n    array<Index, NumDims> tmp = dimensions;\n    array<Index, NumDims> ordering;\n    const size_t offset = static_cast<int>(Layout) == static_cast<int>(ColMajor)\n                              ? 0\n                              : NumDims - NumKernelDims;\n    for (int i = 0; i < NumKernelDims; ++i) {\n      const Index index = i + offset;\n      ordering[index] = indices[i];\n      tmp[indices[i]] = -1;\n      gpuInputDimensions[index] = input_dims[indices[i]];\n      gpuOutputDimensions[index] = dimensions[indices[i]];\n    }\n\n    int written = static_cast<int>(Layout) == static_cast<int>(ColMajor)\n                      ? NumKernelDims\n                      : 0;\n    for (int i = 0; i < NumDims; ++i) {\n      if (tmp[i] >= 0) {\n        ordering[written] = i;\n        gpuInputDimensions[written] = input_dims[i];\n        gpuOutputDimensions[written] = dimensions[i];\n        ++written;\n      }\n    }\n\n    for (int i = 0; i < NumDims; ++i) {\n      m_inputStrides[i] = inputStrides[ordering[i]];\n      m_outputStrides[i] = outputStrides[ordering[i]];\n    }\n\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      for (int i = 0; i < NumDims; ++i) {\n        if (i > NumKernelDims) {\n          m_gpuInputStrides[i] =\n              m_gpuInputStrides[i - 1] * gpuInputDimensions[i - 1];\n          m_gpuOutputStrides[i] =\n              m_gpuOutputStrides[i - 1] * gpuOutputDimensions[i - 1];\n        } else {\n          m_gpuInputStrides[i] = 1;\n          m_gpuOutputStrides[i] = 1;\n        }\n      }\n    } else {\n      for (int i = NumDims - 1; i >= 0; --i) {\n        if (static_cast<size_t>(i + 1) < offset) {\n          m_gpuInputStrides[i] =\n              m_gpuInputStrides[i + 1] * gpuInputDimensions[i + 1];\n          m_gpuOutputStrides[i] =\n              m_gpuOutputStrides[i + 1] * gpuOutputDimensions[i + 1];\n        } else {\n          m_gpuInputStrides[i] = 1;\n          m_gpuOutputStrides[i] = 1;\n        }\n      }\n    }\n  }\n\n  EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Index mapGpuInputPlaneToTensorInputOffset(Index p) const {\n    Index inputIndex = 0;\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      for (int d = NumDims - 1; d > NumKernelDims; --d) {\n        const Index idx = p / m_gpuInputStrides[d];\n        inputIndex += idx * m_inputStrides[d];\n        p -= idx * m_gpuInputStrides[d];\n      }\n      inputIndex += p * m_inputStrides[NumKernelDims];\n    } else {\n      std::ptrdiff_t limit = 0;\n      if (NumKernelDims < NumDims) {\n        limit = NumDims - NumKernelDims - 1;\n      }\n      for (int d = 0; d < limit; ++d) {\n        const Index idx = p / m_gpuInputStrides[d];\n        inputIndex += idx * m_inputStrides[d];\n        p -= idx * m_gpuInputStrides[d];\n      }\n      inputIndex += p * m_inputStrides[limit];\n    }\n    return inputIndex;\n  }\n\n  EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Index mapGpuOutputPlaneToTensorOutputOffset(Index p) const {\n    Index outputIndex = 0;\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      for (int d = NumDims - 1; d > NumKernelDims; --d) {\n        const Index idx = p / m_gpuOutputStrides[d];\n        outputIndex += idx * m_outputStrides[d];\n        p -= idx * m_gpuOutputStrides[d];\n      }\n      outputIndex += p * m_outputStrides[NumKernelDims];\n    } else {\n      std::ptrdiff_t limit = 0;\n      if (NumKernelDims < NumDims) {\n        limit = NumDims - NumKernelDims - 1;\n      }\n      for (int d = 0; d < limit; ++d) {\n        const Index idx = p / m_gpuOutputStrides[d];\n        outputIndex += idx * m_outputStrides[d];\n        p -= idx * m_gpuOutputStrides[d];\n      }\n      outputIndex += p * m_outputStrides[limit];\n    }\n    return outputIndex;\n  }\n\n  EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Index mapGpuInputKernelToTensorInputOffset(Index i) const {\n    const size_t offset = static_cast<int>(Layout) == static_cast<int>(ColMajor)\n                              ? 0\n                              : NumDims - NumKernelDims;\n    return i * m_inputStrides[offset];\n  }\n\n  EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Index mapGpuOutputKernelToTensorOutputOffset(Index i) const {\n    const size_t offset = static_cast<int>(Layout) == static_cast<int>(ColMajor)\n                              ? 0\n                              : NumDims - NumKernelDims;\n    return i * m_outputStrides[offset];\n  }\n\n  EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Index mapGpuInputKernelToTensorInputOffset(Index i, Index j) const {\n    const size_t offset = static_cast<int>(Layout) == static_cast<int>(ColMajor)\n                              ? 0\n                              : NumDims - NumKernelDims;\n    return i * m_inputStrides[offset] + j * m_inputStrides[offset + 1];\n  }\n\n  EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Index mapGpuOutputKernelToTensorOutputOffset(Index i, Index j) const {\n    const size_t offset = static_cast<int>(Layout) == static_cast<int>(ColMajor)\n                              ? 0\n                              : NumDims - NumKernelDims;\n    return i * m_outputStrides[offset] + j * m_outputStrides[offset + 1];\n  }\n\n  EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Index mapGpuInputKernelToTensorInputOffset(Index i, Index j, Index k) const {\n    const size_t offset = static_cast<int>(Layout) == static_cast<int>(ColMajor)\n                              ? 0\n                              : NumDims - NumKernelDims;\n    return i * m_inputStrides[offset] + j * m_inputStrides[offset + 1] +\n           k * m_inputStrides[offset + 2];\n  }\n\n  EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Index mapGpuOutputKernelToTensorOutputOffset(Index i, Index j, Index k) const {\n    const size_t offset = static_cast<int>(Layout) == static_cast<int>(ColMajor)\n                              ? 0\n                              : NumDims - NumKernelDims;\n    return i * m_outputStrides[offset] + j * m_outputStrides[offset + 1] +\n           k * m_outputStrides[offset + 2];\n  }\n\n private:\n  static const int NumDims = internal::array_size<InputDims>::value;\n  array<Index, NumDims> m_inputStrides;\n  array<Index, NumDims> m_outputStrides;\n  array<Index, NumDims> m_gpuInputStrides;\n  array<Index, NumDims> m_gpuOutputStrides;\n};\n\n\n\ntemplate<typename Dimensions, typename InputXprType, typename KernelXprType>\nstruct traits<TensorConvolutionOp<Dimensions, InputXprType, KernelXprType> >\n{\n  // Type promotion to handle the case where the types of the lhs and the rhs are different.\n  typedef typename promote_storage_type<typename InputXprType::Scalar,\n                                        typename KernelXprType::Scalar>::ret Scalar;\n  typedef typename promote_storage_type<typename traits<InputXprType>::StorageKind,\n                                        typename traits<KernelXprType>::StorageKind>::ret StorageKind;\n  typedef typename promote_index_type<typename traits<InputXprType>::Index,\n                                      typename traits<KernelXprType>::Index>::type Index;\n  typedef typename InputXprType::Nested LhsNested;\n  typedef typename KernelXprType::Nested RhsNested;\n  typedef typename remove_reference<LhsNested>::type _LhsNested;\n  typedef typename remove_reference<RhsNested>::type _RhsNested;\n  static const int NumDimensions = traits<InputXprType>::NumDimensions;\n  static const int Layout = traits<InputXprType>::Layout;\n  typedef typename conditional<Pointer_type_promotion<typename InputXprType::Scalar, Scalar>::val,\n  typename traits<InputXprType>::PointerType, typename traits<KernelXprType>::PointerType>::type PointerType;\n\n  enum {\n    Flags = 0\n  };\n};\n\ntemplate<typename Dimensions, typename InputXprType, typename KernelXprType>\nstruct eval<TensorConvolutionOp<Dimensions, InputXprType, KernelXprType>, Eigen::Dense>\n{\n  typedef const TensorConvolutionOp<Dimensions, InputXprType, KernelXprType>& type;\n};\n\ntemplate<typename Dimensions, typename InputXprType, typename KernelXprType>\nstruct nested<TensorConvolutionOp<Dimensions, InputXprType, KernelXprType>, 1, typename eval<TensorConvolutionOp<Dimensions, InputXprType, KernelXprType> >::type>\n{\n  typedef TensorConvolutionOp<Dimensions, InputXprType, KernelXprType> type;\n};\n\n}  // end namespace internal\n\n\n\ntemplate<typename Indices, typename InputXprType, typename KernelXprType>\nclass TensorConvolutionOp : public TensorBase<TensorConvolutionOp<Indices, InputXprType, KernelXprType>, ReadOnlyAccessors>\n{\n  public:\n  typedef typename Eigen::internal::traits<TensorConvolutionOp>::Scalar Scalar;\n  typedef typename Eigen::NumTraits<Scalar>::Real RealScalar;\n  typedef typename internal::promote_storage_type<typename InputXprType::CoeffReturnType,\n                                                  typename KernelXprType::CoeffReturnType>::ret CoeffReturnType;\n  typedef typename Eigen::internal::nested<TensorConvolutionOp>::type Nested;\n  typedef typename Eigen::internal::traits<TensorConvolutionOp>::StorageKind StorageKind;\n  typedef typename Eigen::internal::traits<TensorConvolutionOp>::Index Index;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorConvolutionOp(const InputXprType& input, const KernelXprType& kernel, const Indices& dims)\n      : m_input_xpr(input), m_kernel_xpr(kernel), m_indices(dims) {}\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const Indices& indices() const { return m_indices; }\n\n    /** \\returns the nested expressions */\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const typename internal::remove_all<typename InputXprType::Nested>::type&\n    inputExpression() const { return m_input_xpr; }\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const typename internal::remove_all<typename KernelXprType::Nested>::type&\n    kernelExpression() const { return m_kernel_xpr; }\n\n  protected:\n    typename InputXprType::Nested m_input_xpr;\n    typename KernelXprType::Nested m_kernel_xpr;\n    const Indices m_indices;\n};\n\n\ntemplate<typename Indices, typename InputArgType, typename KernelArgType, typename Device>\nstruct TensorEvaluator<const TensorConvolutionOp<Indices, InputArgType, KernelArgType>, Device>\n{\n  typedef TensorConvolutionOp<Indices, InputArgType, KernelArgType> XprType;\n\n  static const int NumDims = internal::array_size<typename TensorEvaluator<InputArgType, Device>::Dimensions>::value;\n  static const int NumKernelDims = internal::array_size<Indices>::value;\n  typedef typename XprType::Index Index;\n  typedef DSizes<Index, NumDims> Dimensions;\n\n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  static const int PacketSize = PacketType<CoeffReturnType, Device>::size;\n  typedef StorageMemory<Scalar, Device> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n\n  enum {\n    IsAligned = TensorEvaluator<InputArgType, Device>::IsAligned & TensorEvaluator<KernelArgType, Device>::IsAligned,\n    PacketAccess = TensorEvaluator<InputArgType, Device>::PacketAccess & TensorEvaluator<KernelArgType, Device>::PacketAccess,\n    BlockAccess = false,\n    PreferBlockAccess = false,\n    Layout = TensorEvaluator<InputArgType, Device>::Layout,\n    CoordAccess = false,  // to be implemented\n    RawAccess = false\n  };\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockNotImplemented TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)\n      : m_inputImpl(op.inputExpression(), device), m_kernelImpl(op.kernelExpression(), device), m_kernelArg(op.kernelExpression()), m_kernel(NULL), m_local_kernel(false), m_device(device)\n  {\n    EIGEN_STATIC_ASSERT((static_cast<int>(TensorEvaluator<InputArgType, Device>::Layout) == static_cast<int>(TensorEvaluator<KernelArgType, Device>::Layout)), YOU_MADE_A_PROGRAMMING_MISTAKE);\n\n    const typename TensorEvaluator<InputArgType, Device>::Dimensions& input_dims = m_inputImpl.dimensions();\n    const typename TensorEvaluator<KernelArgType, Device>::Dimensions& kernel_dims = m_kernelImpl.dimensions();\n\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      m_inputStride[0] = 1;\n      for (int i = 1; i < NumDims; ++i) {\n        m_inputStride[i] = m_inputStride[i - 1] * input_dims[i - 1];\n      }\n    } else {\n      m_inputStride[NumDims - 1] = 1;\n      for (int i = NumDims - 2; i >= 0; --i) {\n        m_inputStride[i] = m_inputStride[i + 1] * input_dims[i + 1];\n      }\n    }\n\n    m_dimensions = m_inputImpl.dimensions();\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      for (int i = 0; i < NumKernelDims; ++i) {\n        const Index index = op.indices()[i];\n        const Index input_dim = input_dims[index];\n        const Index kernel_dim = kernel_dims[i];\n        const Index result_dim = input_dim - kernel_dim + 1;\n        m_dimensions[index] = result_dim;\n        if (i > 0) {\n          m_kernelStride[i] = m_kernelStride[i - 1] * kernel_dims[i - 1];\n        } else {\n          m_kernelStride[0] = 1;\n        }\n        m_indexStride[i] = m_inputStride[index];\n      }\n\n      m_outputStride[0] = 1;\n      for (int i = 1; i < NumDims; ++i) {\n        m_outputStride[i] = m_outputStride[i - 1] * m_dimensions[i - 1];\n      }\n    } else {\n      for (int i = NumKernelDims - 1; i >= 0; --i) {\n        const Index index = op.indices()[i];\n        const Index input_dim = input_dims[index];\n        const Index kernel_dim = kernel_dims[i];\n        const Index result_dim = input_dim - kernel_dim + 1;\n        m_dimensions[index] = result_dim;\n        if (i < NumKernelDims - 1) {\n          m_kernelStride[i] = m_kernelStride[i + 1] * kernel_dims[i + 1];\n        } else {\n          m_kernelStride[NumKernelDims - 1] = 1;\n        }\n        m_indexStride[i] = m_inputStride[index];\n      }\n\n      m_outputStride[NumDims - 1] = 1;\n      for (int i = NumDims - 2; i >= 0; --i) {\n        m_outputStride[i] = m_outputStride[i + 1] * m_dimensions[i + 1];\n      }\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions& dimensions() const { return m_dimensions; }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(Scalar*) {\n    m_inputImpl.evalSubExprsIfNeeded(NULL);\n    preloadKernel();\n    return true;\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {\n    m_inputImpl.cleanup();\n    if (m_local_kernel) {\n      m_device.deallocate((void*)m_kernel);\n      m_local_kernel = false;\n    }\n    m_kernel = NULL;\n  }\n\n  void evalTo(typename XprType::Scalar* buffer) {\n    evalSubExprsIfNeeded(NULL);\n    for (int i = 0; i < dimensions().TotalSize(); ++i) {\n      buffer[i] += coeff(i);\n    }\n    cleanup();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const\n  {\n    CoeffReturnType result = CoeffReturnType(0);\n    convolve(firstInput(index), 0, NumKernelDims-1, result);\n    return result;\n  }\n\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC PacketReturnType packet(const Index index) const\n  {\n    Index indices[2] = {index, index+PacketSize-1};\n    Index startInputs[2] = {0, 0};\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      for (int i = NumDims - 1; i > 0; --i) {\n        const Index idx0 = indices[0] / m_outputStride[i];\n        const Index idx1 = indices[1] / m_outputStride[i];\n        startInputs[0] += idx0 * m_inputStride[i];\n        startInputs[1] += idx1 * m_inputStride[i];\n        indices[0] -= idx0 * m_outputStride[i];\n        indices[1] -= idx1 * m_outputStride[i];\n      }\n    } else {\n      for (int i = 0; i < NumDims - 1; ++i) {\n        const Index idx0 = indices[0] / m_outputStride[i];\n        const Index idx1 = indices[1] / m_outputStride[i];\n        startInputs[0] += idx0 * m_inputStride[i];\n        startInputs[1] += idx1 * m_inputStride[i];\n        indices[0] -= idx0 * m_outputStride[i];\n        indices[1] -= idx1 * m_outputStride[i];\n      }\n    }\n    startInputs[0] += indices[0];\n    startInputs[1] += indices[1];\n\n    if (startInputs[1]-startInputs[0] == PacketSize-1) {\n      PacketReturnType result = internal::pset1<PacketReturnType>(0);\n      convolvePacket(startInputs[0], 0, NumKernelDims-1, result);\n      return result;\n    } else {\n      EIGEN_ALIGN_MAX Scalar data[PacketSize];\n      data[0] = Scalar(0);\n      convolve(startInputs[0], 0, NumKernelDims-1, data[0]);\n      for (int i = 1; i < PacketSize-1; ++i) {\n        data[i] = Scalar(0);\n        convolve(firstInput(index+i), 0, NumKernelDims-1, data[i]);\n      }\n      data[PacketSize-1] = Scalar(0);\n      convolve(startInputs[1], 0, NumKernelDims-1, data[PacketSize-1]);\n      return internal::pload<PacketReturnType>(data);\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost\n  costPerCoeff(bool vectorized) const {\n    const double kernel_size = m_kernelImpl.dimensions().TotalSize();\n    // We ignore the use of fused multiply-add.\n    const double convolve_compute_cost =\n        TensorOpCost::AddCost<Scalar>() + TensorOpCost::MulCost<Scalar>();\n    const double firstIndex_compute_cost =\n        NumDims *\n        (2 * TensorOpCost::AddCost<Index>() + 2 * TensorOpCost::MulCost<Index>() +\n         TensorOpCost::DivCost<Index>());\n    return TensorOpCost(0, 0, firstIndex_compute_cost, vectorized, PacketSize) +\n           kernel_size * (m_inputImpl.costPerCoeff(vectorized) +\n                          m_kernelImpl.costPerCoeff(vectorized) +\n                          TensorOpCost(0, 0, convolve_compute_cost, vectorized,\n                                       PacketSize));\n  }\n\n  EIGEN_DEVICE_FUNC EvaluatorPointerType data() const { return NULL; }\n\n private:\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index firstInput(Index index) const {\n    Index startInput = 0;\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      for (int i = NumDims - 1; i > 0; --i) {\n        const Index idx = index / m_outputStride[i];\n        startInput += idx * m_inputStride[i];\n        index -= idx * m_outputStride[i];\n      }\n    } else {\n      for (int i = 0; i < NumDims - 1; ++i) {\n        const Index idx = index / m_outputStride[i];\n        startInput += idx * m_inputStride[i];\n        index -= idx * m_outputStride[i];\n      }\n    }\n    startInput += index;\n    return startInput;\n  }\n\n  EIGEN_DEVICE_FUNC void convolve(Index firstIndex, Index firstKernel, int DimIndex, CoeffReturnType& accum) const {\n    for (int j = 0; j < m_kernelImpl.dimensions()[DimIndex]; ++j) {\n      const Index input = firstIndex + j * m_indexStride[DimIndex];\n      const Index kernel = firstKernel + j * m_kernelStride[DimIndex];\n      if (DimIndex > 0) {\n        convolve(input, kernel, DimIndex-1, accum);\n      } else {\n        accum += m_inputImpl.coeff(input) * m_kernel[kernel];\n      }\n    }\n  }\n\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC void convolvePacket(Index firstIndex, Index firstKernel, int DimIndex, Packet& accum) const {\n    for (int j = 0; j < m_kernelImpl.dimensions()[DimIndex]; ++j) {\n      const Index input = firstIndex + j * m_indexStride[DimIndex];\n      const Index kernel = firstKernel + j * m_kernelStride[DimIndex];\n      if (DimIndex > 0) {\n        convolvePacket(input, kernel, DimIndex-1, accum);\n      } else {\n        accum = internal::pmadd<Packet>(m_inputImpl.template packet<Unaligned>(input), internal::pset1<Packet>(m_kernel[kernel]), accum);\n      }\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void preloadKernel() {\n    // Don't make a local copy of the kernel unless we have to (i.e. it's an\n    // expression that needs to be evaluated)\n    const Scalar* in_place = m_kernelImpl.data();\n    if (in_place) {\n      m_kernel = in_place;\n      m_local_kernel = false;\n    } else {\n      size_t kernel_sz = m_kernelImpl.dimensions().TotalSize() * sizeof(Scalar);\n      Scalar* local = (Scalar*)m_device.allocate_temp(kernel_sz);\n      typedef TensorEvalToOp<const KernelArgType> EvalTo;\n      EvalTo evalToTmp(local, m_kernelArg);\n      const bool Vectorize = internal::IsVectorizable<Device, KernelArgType>::value;\n      internal::TensorExecutor<const EvalTo, Device, Vectorize>::run(evalToTmp, m_device);\n\n      m_kernel = local;\n      m_local_kernel = true;\n    }\n  }\n\n  array<Index, NumDims> m_inputStride;\n  array<Index, NumDims> m_outputStride;\n\n  array<Index, NumKernelDims> m_indexStride;\n  array<Index, NumKernelDims> m_kernelStride;\n  TensorEvaluator<InputArgType, Device> m_inputImpl;\n  TensorEvaluator<KernelArgType, Device> m_kernelImpl;\n  Dimensions m_dimensions;\n\n  KernelArgType m_kernelArg;\n  const Scalar* m_kernel;\n  bool m_local_kernel;\n  const Device EIGEN_DEVICE_REF m_device;\n};\n\n\n\n\n// Use an optimized implementation of the evaluation code for GPUs whenever possible.\n#if defined(EIGEN_USE_GPU) && defined(EIGEN_GPUCC)\n\ntemplate <int StaticKernelSize>\nstruct GetKernelSize {\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE int operator() (const int /*kernelSize*/) const {\n    return StaticKernelSize;\n  }\n};\ntemplate <>\nstruct GetKernelSize<Dynamic> {\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE int operator() (const int kernelSize) const {\n    return kernelSize;\n  }\n};\n\ntemplate <typename InputEvaluator, typename Index, typename InputDims,\n          int StaticKernelSize>\n__global__ void EigenConvolutionKernel1D(\n    InputEvaluator eval,\n    const internal::IndexMapper<Index, InputDims, 1, InputEvaluator::Layout>\n        indexMapper,\n    const float* __restrict kernel, const int numPlanes, const int numX,\n    const int maxX, const int kernelSize, float* buffer) {\n#if defined(EIGEN_HIPCC)\n  HIP_DYNAMIC_SHARED(float, s)\n#else\n  extern __shared__ float s[];\n#endif\n\n  const int first_x = blockIdx.x * maxX;\n  const int last_x = (first_x + maxX < numX ? first_x + maxX : numX) - 1;\n  const int num_x_input = last_x - first_x + GetKernelSize<StaticKernelSize>()(kernelSize);\n  const int num_x_output = last_x - first_x + 1;\n\n  const int first_plane = blockIdx.y * blockDim.y;\n  const int plane_stride = blockDim.y * gridDim.y;\n\n  for (int p = first_plane + threadIdx.y; p < numPlanes; p += plane_stride) {\n    // Load inputs to shared memory\n    const int plane_input_offset = indexMapper.mapGpuInputPlaneToTensorInputOffset(p);\n    const int plane_kernel_offset = threadIdx.y * num_x_input;\n    #pragma unroll\n    for (int i = threadIdx.x; i < num_x_input; i += blockDim.x) {\n      const int tensor_index = plane_input_offset + indexMapper.mapGpuInputKernelToTensorInputOffset(i+first_x);\n      s[i + plane_kernel_offset] = eval.coeff(tensor_index);\n    }\n\n    __syncthreads();\n\n    // Compute the convolution\n    const int plane_output_offset = indexMapper.mapGpuOutputPlaneToTensorOutputOffset(p);\n\n    #pragma unroll\n    for (int i = threadIdx.x; i < num_x_output; i += blockDim.x) {\n      const int kernel_offset = plane_kernel_offset + i;\n      float result = 0.0f;\n      #pragma unroll\n      for (int k = 0; k < GetKernelSize<StaticKernelSize>()(kernelSize); ++k) {\n        result += s[k + kernel_offset] * kernel[k];\n      }\n      const int tensor_index = plane_output_offset + indexMapper.mapGpuOutputKernelToTensorOutputOffset(i+first_x);\n      buffer[tensor_index] = result;\n    }\n    __syncthreads();\n  }\n};\n\ntemplate <typename InputEvaluator, typename Index, typename InputDims,\n          int StaticKernelSizeX, int StaticKernelSizeY>\n__global__ void EigenConvolutionKernel2D(\n    InputEvaluator eval,\n    const internal::IndexMapper<Index, InputDims, 2, InputEvaluator::Layout>\n        indexMapper,\n    const float* __restrict kernel, const int numPlanes, const int numX,\n    const int maxX, const int numY, const int maxY, const int kernelSizeX,\n    const int kernelSizeY, float* buffer) {\n#if defined(EIGEN_HIPCC)\n  HIP_DYNAMIC_SHARED(float, s)\n#else\n  extern __shared__ float s[];\n#endif\n\n  const int first_x = blockIdx.x * maxX;\n  const int last_x = (first_x + maxX < numX ? first_x + maxX : numX) - 1;\n  const int num_x_input = last_x - first_x + GetKernelSize<StaticKernelSizeX>()(kernelSizeX);\n  const int num_x_output = last_x - first_x + 1;\n\n  const int first_y = blockIdx.y * maxY;\n  const int last_y = (first_y + maxY < numY ? first_y + maxY : numY) - 1;\n  const int num_y_input = last_y - first_y + GetKernelSize<StaticKernelSizeY>()(kernelSizeY);\n  const int num_y_output = last_y - first_y + 1;\n\n  const int first_plane = blockIdx.z * blockDim.z;\n  const int plane_stride = blockDim.z * gridDim.z;\n\n  for (int p = first_plane + threadIdx.z; p < numPlanes; p += plane_stride) {\n\n    const int plane_input_offset = indexMapper.mapGpuInputPlaneToTensorInputOffset(p);\n    const int plane_kernel_offset = threadIdx.z * num_y_input;\n\n    // Load inputs to shared memory\n    #pragma unroll\n    for (int j = threadIdx.y; j < num_y_input; j += blockDim.y) {\n      const int input_offset = num_x_input * (j + plane_kernel_offset);\n      #pragma unroll\n      for (int i = threadIdx.x; i < num_x_input; i += blockDim.x) {\n        const int tensor_index = plane_input_offset + indexMapper.mapGpuInputKernelToTensorInputOffset(i+first_x, j+first_y);\n        s[i + input_offset] = eval.coeff(tensor_index);\n      }\n    }\n\n    __syncthreads();\n\n    // Convolution\n    const int plane_output_offset = indexMapper.mapGpuOutputPlaneToTensorOutputOffset(p);\n\n    #pragma unroll\n    for (int j = threadIdx.y; j < num_y_output; j += blockDim.y) {\n      #pragma unroll\n      for (int i = threadIdx.x; i < num_x_output; i += blockDim.x) {\n        float result = 0.0f;\n        #pragma unroll\n        for (int l = 0; l < GetKernelSize<StaticKernelSizeY>()(kernelSizeY); ++l) {\n          const int kernel_offset = kernelSizeX * l;\n          const int input_offset = i + num_x_input * (j + l + plane_kernel_offset);\n          #pragma unroll\n          for (int k = 0; k < GetKernelSize<StaticKernelSizeX>()(kernelSizeX); ++k) {\n            result += s[k + input_offset] * kernel[k + kernel_offset];\n          }\n        }\n        const int tensor_index = plane_output_offset + indexMapper.mapGpuOutputKernelToTensorOutputOffset(i+first_x, j+first_y);\n        buffer[tensor_index] = result;\n      }\n    }\n\n    __syncthreads();\n  }\n};\n\ntemplate <typename InputEvaluator, typename Index, typename InputDims>\n__global__ void EigenConvolutionKernel3D(\n    InputEvaluator eval,\n    const internal::IndexMapper<Index, InputDims, 3, InputEvaluator::Layout>\n        indexMapper,\n    const float* __restrict kernel, const size_t numPlanes, const size_t numX,\n    const size_t maxX, const size_t numY, const size_t maxY, const size_t numZ,\n    const size_t maxZ, const size_t kernelSizeX, const size_t kernelSizeY,\n    const size_t kernelSizeZ, float* buffer) {\n#if defined(EIGEN_HIPCC)\n  HIP_DYNAMIC_SHARED(float, s)\n#else\n  extern __shared__ float s[];\n#endif\n\n  // Load inputs to shared memory\n  const int first_x = blockIdx.x * maxX;\n  const int last_x = (first_x + maxX < numX ? first_x + maxX : numX) - 1;\n  const int num_x_input = last_x - first_x + kernelSizeX;\n\n  const int first_y = blockIdx.y * maxY;\n  const int last_y = (first_y + maxY < numY ? first_y + maxY : numY) - 1;\n  const int num_y_input = last_y - first_y + kernelSizeY;\n\n  const int first_z = blockIdx.z * maxZ;\n  const int last_z = (first_z + maxZ < numZ ? first_z + maxZ : numZ) - 1;\n  const int num_z_input = last_z - first_z + kernelSizeZ;\n\n  for (int p = 0; p < numPlanes; ++p) {\n\n    const int plane_input_offset = indexMapper.mapGpuInputPlaneToTensorInputOffset(p);\n    const int plane_kernel_offset = 0;\n\n    for (int k = threadIdx.z; k < num_z_input; k += blockDim.z) {\n      for (int j = threadIdx.y; j < num_y_input; j += blockDim.y) {\n        for (int i = threadIdx.x; i < num_x_input; i += blockDim.x) {\n          const int tensor_index = plane_input_offset + indexMapper.mapGpuInputKernelToTensorInputOffset(i+first_x, j+first_y, k+first_z);\n          s[i + num_x_input * (j + num_y_input * (k + plane_kernel_offset))] = eval.coeff(tensor_index);\n        }\n      }\n    }\n\n    __syncthreads();\n\n    // Convolution\n    const int num_z_output = last_z - first_z + 1;\n    const int num_y_output = last_y - first_y + 1;\n    const int num_x_output = last_x - first_x + 1;\n    const int plane_output_offset = indexMapper.mapGpuOutputPlaneToTensorOutputOffset(p);\n\n    for (int k = threadIdx.z; k < num_z_output; k += blockDim.z) {\n      for (int j = threadIdx.y; j < num_y_output; j += blockDim.y) {\n        for (int i = threadIdx.x; i < num_x_output; i += blockDim.x) {\n          float result = 0.0f;\n          for (int n = 0; n < kernelSizeZ; ++n) {\n            for (int m = 0; m < kernelSizeY; ++m) {\n              for (int l = 0; l < kernelSizeX; ++l) {\n                result += s[i + l + num_x_input * (j + m + num_y_input * (k + n + plane_kernel_offset))] * kernel[l + kernelSizeX * (m + kernelSizeY * n)];\n              }\n            }\n          }\n          const int tensor_index = plane_output_offset + indexMapper.mapGpuOutputKernelToTensorOutputOffset(i+first_x, j+first_y, k+first_z);\n          buffer[tensor_index] = result;\n        }\n      }\n    }\n    __syncthreads();\n  }\n};\n\n\n\ntemplate<typename Indices, typename InputArgType, typename KernelArgType>\nstruct TensorEvaluator<const TensorConvolutionOp<Indices, InputArgType, KernelArgType>, GpuDevice>\n{\n  typedef TensorConvolutionOp<Indices, InputArgType, KernelArgType> XprType;\n\n  static const int NumDims =  internal::array_size<typename TensorEvaluator<InputArgType, GpuDevice>::Dimensions>::value;\n  static const int NumKernelDims = internal::array_size<Indices>::value;\n  typedef typename XprType::Index Index;\n  typedef DSizes<Index, NumDims> Dimensions;\n  typedef typename TensorEvaluator<KernelArgType, GpuDevice>::Dimensions KernelDimensions;\n\n  enum {\n    IsAligned = TensorEvaluator<InputArgType, GpuDevice>::IsAligned & TensorEvaluator<KernelArgType, GpuDevice>::IsAligned,\n    PacketAccess = false,\n    BlockAccess = false,\n    PreferBlockAccess = false,\n    Layout = TensorEvaluator<InputArgType, GpuDevice>::Layout,\n    CoordAccess = false,  // to be implemented\n    RawAccess = false\n  };\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockNotImplemented TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC TensorEvaluator(const XprType& op, const GpuDevice& device)\n      : m_inputImpl(op.inputExpression(), device), m_kernelImpl(op.kernelExpression(), device), m_kernelArg(op.kernelExpression()), m_indices(op.indices()), m_buf(NULL), m_kernel(NULL), m_local_kernel(false), m_device(device)\n  {\n    EIGEN_STATIC_ASSERT((static_cast<int>(TensorEvaluator<InputArgType, GpuDevice>::Layout) == static_cast<int>(TensorEvaluator<KernelArgType, GpuDevice>::Layout)), YOU_MADE_A_PROGRAMMING_MISTAKE);\n\n    const typename TensorEvaluator<InputArgType, GpuDevice>::Dimensions& input_dims = m_inputImpl.dimensions();\n    const typename TensorEvaluator<KernelArgType, GpuDevice>::Dimensions& kernel_dims = m_kernelImpl.dimensions();\n\n    m_dimensions = m_inputImpl.dimensions();\n    for (int i = 0; i < NumKernelDims; ++i) {\n      const Index index = op.indices()[i];\n      const Index input_dim = input_dims[index];\n      const Index kernel_dim = kernel_dims[i];\n      const Index result_dim = input_dim - kernel_dim + 1;\n      m_dimensions[index] = result_dim;\n    }\n  }\n\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, GpuDevice>::type PacketReturnType;\n  typedef typename InputArgType::Scalar Scalar;\n  static const int PacketSize = internal::unpacket_traits<PacketReturnType>::size;\n\n  EIGEN_DEVICE_FUNC const Dimensions& dimensions() const { return m_dimensions; }\n\n  EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(Scalar* data) {\n    preloadKernel();\n    m_inputImpl.evalSubExprsIfNeeded(NULL);\n    if (data) {\n      executeEval(data);\n      return false;\n    } else {\n      m_buf = (Scalar*)m_device.allocate(dimensions().TotalSize() * sizeof(Scalar));\n      executeEval(m_buf);\n      return true;\n    }\n  }\n\n  EIGEN_STRONG_INLINE void cleanup() {\n    m_inputImpl.cleanup();\n    if (m_buf) {\n      m_device.deallocate(m_buf);\n      m_buf = NULL;\n    }\n    if (m_local_kernel) {\n      m_device.deallocate((void*)m_kernel);\n      m_local_kernel = false;\n    }\n    m_kernel = NULL;\n  }\n\n  EIGEN_STRONG_INLINE void preloadKernel() {\n    // Don't make a local copy of the kernel unless we have to (i.e. it's an\n    // expression that needs to be evaluated)\n    const Scalar* in_place = m_kernelImpl.data();\n    if (in_place) {\n      m_kernel = in_place;\n      m_local_kernel = false;\n    } else {\n      size_t kernel_sz = m_kernelImpl.dimensions().TotalSize() * sizeof(Scalar);\n      Scalar* local = (Scalar*)m_device.allocate(kernel_sz);\n      typedef TensorEvalToOp<const KernelArgType> EvalTo;\n      EvalTo evalToTmp(local, m_kernelArg);\n      const bool PacketAccess = internal::IsVectorizable<GpuDevice, KernelArgType>::value;\n      internal::TensorExecutor<const EvalTo, GpuDevice, PacketAccess>::run(evalToTmp, m_device);\n\n      m_kernel = local;\n      m_local_kernel = true;\n    }\n  }\n\n  static unsigned int ceil(unsigned int num, unsigned int denom) {\n    const unsigned int rounded_toward_zero = num / denom;\n    if (num > rounded_toward_zero * denom) {\n      return rounded_toward_zero + 1;\n    }\n    return rounded_toward_zero;\n  }\n\n  void executeEval(Scalar* data) const {\n    typedef typename TensorEvaluator<InputArgType, GpuDevice>::Dimensions InputDims;\n\n    const int maxSharedMem = m_device.sharedMemPerBlock();\n    const int maxThreadsPerBlock = m_device.maxGpuThreadsPerBlock();\n    const int maxBlocksPerProcessor = m_device.maxGpuThreadsPerMultiProcessor() / maxThreadsPerBlock;\n    const int numMultiProcessors = m_device.getNumGpuMultiProcessors();\n    const int warpSize = 32;\n\n    switch (NumKernelDims) {\n      case 1: {\n        const int kernel_size = m_kernelImpl.dimensions().TotalSize();\n\n        const int numX = dimensions()[m_indices[0]];\n        const int numP = dimensions().TotalSize() / numX;\n        int maxX;\n        dim3 block_size;\n\n        const int single_stride_dim =\n            static_cast<int>(Layout) == static_cast<int>(ColMajor)\n                ? 0\n                : m_inputImpl.dimensions().rank() - 1;\n        if (m_indices[0] == single_stride_dim) {\n          // Maximum the reuse\n          const int inner_dim = ((maxSharedMem / (sizeof(Scalar)) - kernel_size + 1 + 31) / 32) * 32;\n          maxX = numext::mini<int>(inner_dim, numX);\n          const int maxP = numext::mini<int>(maxSharedMem / ((kernel_size - 1 + maxX) * sizeof(Scalar)), numP);\n          block_size.x = numext::mini(maxThreadsPerBlock, maxX);\n          block_size.y = numext::mini<int>(maxThreadsPerBlock / block_size.x, maxP);\n        }\n        else {\n          // Read as much as possible alongside the inner most dimension, that is the plane\n          const int inner_dim = maxSharedMem / ((warpSize + kernel_size) * sizeof(Scalar));\n          const int maxP = numext::mini<int>(inner_dim, numP);\n          maxX = numext::mini<int>(maxSharedMem / (inner_dim * sizeof(Scalar)) - kernel_size + 1, numX);\n\n          block_size.x = numext::mini(warpSize, maxX);\n          block_size.y = numext::mini<int>(maxThreadsPerBlock/block_size.x, maxP);\n        }\n\n        const int shared_mem = block_size.y * (maxX + kernel_size - 1) * sizeof(Scalar);\n        gpu_assert(shared_mem <= maxSharedMem);\n\n        const int num_x_blocks = ceil(numX, maxX);\n        const int blocksPerProcessor = numext::mini(maxBlocksPerProcessor, maxSharedMem / shared_mem);\n        const int num_y_blocks = ceil(numMultiProcessors * blocksPerProcessor, num_x_blocks);\n\n        dim3 num_blocks(num_x_blocks, numext::mini<int>(num_y_blocks, ceil(numP, block_size.y)));\n\n\n        //cout << \"launching 1D kernel with block_size.x: \" << block_size.x << \" block_size.y: \" << block_size.y << \" num_blocks.x: \" << num_blocks.x << \" num_blocks.y: \" << num_blocks.y << \" maxX: \" << maxX << \" shared_mem: \" << shared_mem << \" in stream \" << m_device.stream() << endl;\n\n        const array<Index, 1> indices(m_indices[0]);\n        const array<Index, 1> kernel_dims(m_kernelImpl.dimensions()[0]);\n        internal::IndexMapper<Index, InputDims, 1, Layout> indexMapper(\n            m_inputImpl.dimensions(), kernel_dims, indices);\n        switch(kernel_size) {\n          case 4: {\n            LAUNCH_GPU_KERNEL((EigenConvolutionKernel1D<TensorEvaluator<InputArgType, GpuDevice>, Index, InputDims, 4>), num_blocks, block_size, shared_mem, m_device, m_inputImpl, indexMapper, m_kernel, numP, numX, maxX, 4, data);\n            break;\n          }\n          case 7: {\n            LAUNCH_GPU_KERNEL((EigenConvolutionKernel1D<TensorEvaluator<InputArgType, GpuDevice>, Index, InputDims, 7>), num_blocks, block_size, shared_mem, m_device, m_inputImpl, indexMapper, m_kernel, numP, numX, maxX, 7, data);\n            break;\n          }\n          default: {\n            LAUNCH_GPU_KERNEL((EigenConvolutionKernel1D<TensorEvaluator<InputArgType, GpuDevice>, Index, InputDims, Dynamic>), num_blocks, block_size, shared_mem, m_device, m_inputImpl, indexMapper, m_kernel, numP, numX, maxX, kernel_size, data);\n          }\n        }\n        break;\n      }\n\n      case 2: {\n        const int idxX =\n            static_cast<int>(Layout) == static_cast<int>(ColMajor) ? 0 : 1;\n        const int idxY =\n            static_cast<int>(Layout) == static_cast<int>(ColMajor) ? 1 : 0;\n        const int kernel_size_x = m_kernelImpl.dimensions()[idxX];\n        const int kernel_size_y = m_kernelImpl.dimensions()[idxY];\n\n        const int numX = dimensions()[m_indices[idxX]];\n        const int numY = dimensions()[m_indices[idxY]];\n        const int numP = dimensions().TotalSize() / (numX*numY);\n\n        const float scaling_factor = sqrtf(static_cast<float>(maxSharedMem) / (sizeof(Scalar) * kernel_size_y * kernel_size_x));\n\n        // Snap maxX to warp size\n        int inner_dim = ((static_cast<int>(scaling_factor * kernel_size_x) - kernel_size_x + 1 + 32) / 32) * 32;\n        const int maxX = numext::mini<int>(inner_dim, numX);\n        const int maxY = numext::mini<int>(maxSharedMem / (sizeof(Scalar) * (maxX + kernel_size_x - 1)) - kernel_size_y + 1, numY);\n        const int maxP = numext::mini<int>(maxSharedMem / ((kernel_size_x - 1 + maxX) * (kernel_size_y - 1 + maxY) * sizeof(Scalar)), numP);\n\n        dim3 block_size;\n        block_size.x = numext::mini(1024, maxX);\n        block_size.y = numext::mini<int>(1024/block_size.x, maxY);\n        block_size.z = numext::mini<int>(1024/(block_size.x*block_size.y), maxP);\n\n        const int shared_mem = block_size.z * (maxX + kernel_size_x - 1) * (maxY + kernel_size_y - 1) * sizeof(Scalar);\n        gpu_assert(shared_mem <= maxSharedMem);\n\n        const int num_x_blocks = ceil(numX, maxX);\n        const int num_y_blocks = ceil(numY, maxY);\n        const int blocksPerProcessor = numext::mini(maxBlocksPerProcessor, maxSharedMem / shared_mem);\n        const int num_z_blocks = ceil(numMultiProcessors * blocksPerProcessor, num_x_blocks * num_y_blocks);\n\n        dim3 num_blocks(num_x_blocks, num_y_blocks, numext::mini<int>(num_z_blocks, ceil(numP, block_size.z)));\n\n\n        //cout << \"launching 2D kernel with block_size.x: \" << block_size.x << \" block_size.y: \" << block_size.y  << \" block_size.z: \" << block_size.z << \" num_blocks.x: \" << num_blocks.x << \" num_blocks.y: \" << num_blocks.y << \" num_blocks.z: \" << num_blocks.z << \" maxX: \" << maxX << \" maxY: \" << maxY << \" maxP: \" << maxP << \" shared_mem: \" << shared_mem << \" in stream \" << m_device.stream() << endl;\n\n        const array<Index, 2> indices(m_indices[idxX], m_indices[idxY]);\n        const array<Index, 2> kernel_dims(m_kernelImpl.dimensions()[idxX],\n                                          m_kernelImpl.dimensions()[idxY]);\n        internal::IndexMapper<Index, InputDims, 2, Layout> indexMapper(\n            m_inputImpl.dimensions(), kernel_dims, indices);\n        switch (kernel_size_x) {\n          case 4: {\n            switch (kernel_size_y) {\n              case 7: {\n                LAUNCH_GPU_KERNEL((EigenConvolutionKernel2D<TensorEvaluator<InputArgType, GpuDevice>, Index, InputDims, 4, 7>), num_blocks, block_size, shared_mem, m_device, m_inputImpl, indexMapper, m_kernel, numP, numX, maxX, numY, maxY, 4, 7, data);\n                break;\n              }\n              default: {\n                LAUNCH_GPU_KERNEL((EigenConvolutionKernel2D<TensorEvaluator<InputArgType, GpuDevice>, Index, InputDims, 4, Dynamic>), num_blocks, block_size, shared_mem, m_device, m_inputImpl, indexMapper, m_kernel, numP, numX, maxX, numY, maxY, 4, kernel_size_y, data);\n                break;\n              }\n            }\n            break;\n          }\n          case 7: {\n            switch (kernel_size_y) {\n              case 4: {\n                LAUNCH_GPU_KERNEL((EigenConvolutionKernel2D<TensorEvaluator<InputArgType, GpuDevice>, Index, InputDims, 7, 4>), num_blocks, block_size, shared_mem, m_device, m_inputImpl, indexMapper, m_kernel, numP, numX, maxX, numY, maxY, 7, 4, data);\n                break;\n              }\n              default: {\n                LAUNCH_GPU_KERNEL((EigenConvolutionKernel2D<TensorEvaluator<InputArgType, GpuDevice>, Index, InputDims, 7, Dynamic>), num_blocks, block_size, shared_mem, m_device, m_inputImpl, indexMapper, m_kernel, numP, numX, maxX, numY, maxY, 7, kernel_size_y, data);\n                break;\n              }\n            }\n            break;\n          }\n          default: {\n            LAUNCH_GPU_KERNEL((EigenConvolutionKernel2D<TensorEvaluator<InputArgType, GpuDevice>, Index, InputDims, Dynamic, Dynamic>), num_blocks, block_size, shared_mem, m_device, m_inputImpl, indexMapper, m_kernel, numP, numX, maxX, numY, maxY, kernel_size_x, kernel_size_y, data);\n            break;\n          }\n        }\n        break;\n      }\n\n      case 3: {\n        const int idxX =\n            static_cast<int>(Layout) == static_cast<int>(ColMajor) ? 0 : 2;\n        const int idxY =\n            static_cast<int>(Layout) == static_cast<int>(ColMajor) ? 1 : 1;\n        const int idxZ =\n            static_cast<int>(Layout) == static_cast<int>(ColMajor) ? 2 : 0;\n\n        const int kernel_size_x = m_kernelImpl.dimensions()[idxX];\n        const int kernel_size_y = m_kernelImpl.dimensions()[idxY];\n        const int kernel_size_z = m_kernelImpl.dimensions()[idxZ];\n\n        const int numX = dimensions()[m_indices[idxX]];\n        const int numY = dimensions()[m_indices[idxY]];\n        const int numZ = dimensions()[m_indices[idxZ]];\n        const int numP = dimensions().TotalSize() / (numX*numY*numZ);\n\n        const int maxX = numext::mini<int>(128, numext::mini<int>(maxSharedMem / (sizeof(Scalar) * kernel_size_y * kernel_size_z) - kernel_size_x + 1, numX));\n        const int maxY = numext::mini<int>(128, numext::mini<int>(maxSharedMem / (sizeof(Scalar) * (maxX + kernel_size_x - 1) * kernel_size_z) - kernel_size_y + 1, numY));\n        const int maxZ = numext::mini<int>(128, numext::mini<int>(maxSharedMem / (sizeof(Scalar) * (maxX + kernel_size_x - 1) * (maxY + kernel_size_y - 1)) - kernel_size_z + 1, numZ));\n\n        dim3 block_size;\n        block_size.x = numext::mini(32, maxX);\n        block_size.y = numext::mini(32, maxY);\n        block_size.z = numext::mini<int>(1024/(block_size.x*block_size.y), maxZ);\n        dim3 num_blocks(ceil(numX, maxX), ceil(numY, maxY), ceil(numZ, maxZ));\n\n        const int shared_mem = (maxX + kernel_size_x - 1) * (maxY + kernel_size_y - 1) * (maxZ + kernel_size_z - 1) * sizeof(Scalar);\n        gpu_assert(shared_mem <= maxSharedMem);\n\n        //cout << \"launching 3D kernel with block_size.x: \" << block_size.x << \" block_size.y: \" << block_size.y  << \" block_size.z: \" << block_size.z << \" num_blocks.x: \" << num_blocks.x << \" num_blocks.y: \" << num_blocks.y << \" num_blocks.z: \" << num_blocks.z  << \" shared_mem: \" << shared_mem << \" in stream \" << m_device.stream() << endl;\n        const array<Index, 3> indices(m_indices[idxX], m_indices[idxY],\n                                      m_indices[idxZ]);\n        const array<Index, 3> kernel_dims(m_kernelImpl.dimensions()[idxX],\n                                          m_kernelImpl.dimensions()[idxY],\n                                          m_kernelImpl.dimensions()[idxZ]);\n        internal::IndexMapper<Index, InputDims, 3, Layout> indexMapper(\n            m_inputImpl.dimensions(), kernel_dims, indices);\n\n        LAUNCH_GPU_KERNEL((EigenConvolutionKernel3D<TensorEvaluator<InputArgType, GpuDevice>, Index, InputDims>), num_blocks, block_size, shared_mem, m_device, m_inputImpl, indexMapper, m_kernel, numP, numX, maxX, numY, maxY, numZ, maxZ, kernel_size_x, kernel_size_y, kernel_size_z, data);\n        break;\n      }\n\n      default: {\n        EIGEN_STATIC_ASSERT((NumKernelDims >= 1 && NumKernelDims <= 3), THIS_METHOD_IS_ONLY_FOR_OBJECTS_OF_A_SPECIFIC_SIZE);\n      }\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const\n  {\n    eigen_assert(m_buf);\n    eigen_assert(index < m_dimensions.TotalSize());\n    return m_buf[index];\n  }\n\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(const Index index) const\n  {\n    eigen_assert(m_buf);\n    eigen_assert(index < m_dimensions.TotalSize());\n    return internal::ploadt<PacketReturnType, LoadMode>(m_buf+index);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost\n  costPerCoeff(bool vectorized) const {\n    // TODO(rmlarsen): FIXME: For now, this is just a copy of the CPU cost\n    // model.\n    const double kernel_size = m_kernelImpl.dimensions().TotalSize();\n    // We ignore the use of fused multiply-add.\n    const double convolve_compute_cost =\n        TensorOpCost::AddCost<Scalar>() + TensorOpCost::MulCost<Scalar>();\n    const double firstIndex_compute_cost =\n        NumDims *\n        (2 * TensorOpCost::AddCost<Index>() + 2 * TensorOpCost::MulCost<Index>() +\n         TensorOpCost::DivCost<Index>());\n    return TensorOpCost(0, 0, firstIndex_compute_cost, vectorized, PacketSize) +\n           kernel_size * (m_inputImpl.costPerCoeff(vectorized) +\n                          m_kernelImpl.costPerCoeff(vectorized) +\n                          TensorOpCost(0, 0, convolve_compute_cost, vectorized,\n                                       PacketSize));\n  }\n\n private:\n  // No assignment (copies are needed by the kernels)\n  TensorEvaluator& operator = (const TensorEvaluator&);\n\n  TensorEvaluator<InputArgType, GpuDevice> m_inputImpl;\n  TensorEvaluator<KernelArgType, GpuDevice> m_kernelImpl;\n  KernelArgType m_kernelArg;\n  Indices m_indices;\n  Dimensions m_dimensions;\n  Scalar* m_buf;\n  const Scalar* m_kernel;\n  bool m_local_kernel;\n\n  const GpuDevice& m_device;\n};\n#endif\n\n\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_CONVOLUTION_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorConvolutionSycl.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Mehdi Goli    Codeplay Software Ltd.\n// Ralph Potter  Codeplay Software Ltd.\n// Luke Iwanski  Codeplay Software Ltd.\n// Contact: <eigen@codeplay.com>\n// Copyright (C) 2016 Benoit Steiner <benoit.steiner.goog@gmail.com>\n\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_CONVOLUTION_SYCL_H\n#define EIGEN_CXX11_TENSOR_TENSOR_CONVOLUTION_SYCL_H\n\nnamespace Eigen {\n\n/** \\class TensorConvolution\n * \\ingroup CXX11_Tensor_Module\n *\n * \\brief Tensor convolution class.\n *\n *\n */\n\nenum class convolution_type { CONV1D, CONV2D, CONV3D };\ntemplate <typename Evaluator, typename CoeffReturnType, typename KernelType, typename Index, typename InputDims,\n          typename Kernel_accessor, typename Buffer_accessor, convolution_type Conv_Dim>\nstruct EigenConvolutionKernel;\ntemplate <typename Evaluator, typename CoeffReturnType, typename KernelType, typename Index, typename InputDims,\n          typename Kernel_accessor, typename Buffer_accessor>\nstruct EigenConvolutionKernel<Evaluator, CoeffReturnType, KernelType, Index, InputDims, Kernel_accessor,\n                              Buffer_accessor, convolution_type::CONV1D> {\n  typedef cl::sycl::accessor<CoeffReturnType, 1, cl::sycl::access::mode::read_write, cl::sycl::access::target::local>\n      Local_accessor;\n  Local_accessor local_acc;\n  Evaluator device_evaluator;\n  Kernel_accessor kernel_filter;\n  Buffer_accessor buffer_acc;\n  internal::IndexMapper<Index, InputDims, 1, Evaluator::Layout> indexMapper;\n  const size_t kernelSize;\n  const cl::sycl::range<2> input_range;\n  EigenConvolutionKernel(Local_accessor local_acc_, Evaluator device_evaluator_, Kernel_accessor kernel_filter_,\n                         Buffer_accessor buffer_acc_,\n                         internal::IndexMapper<Index, InputDims, 1, Evaluator::Layout> indexMapper_,\n                         const size_t kernelSize_, const cl::sycl::range<2> input_range_)\n      : local_acc(local_acc_),\n        device_evaluator(device_evaluator_),\n        kernel_filter(kernel_filter_),\n        buffer_acc(buffer_acc_),\n        indexMapper(indexMapper_),\n        kernelSize(kernelSize_),\n        input_range(input_range_) {}\n\n  template <typename BooleanDim2>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool boundary_check(const BooleanDim2 boolean_check) {\n    return (boolean_check[0] && boolean_check[1]);\n  }\n  void operator()(cl::sycl::nd_item<2> itemID) {\n    auto buffer_ptr = buffer_acc.get_pointer();\n    auto kernel_ptr = kernel_filter.get_pointer();\n    // the required row to be calculated for the for each plane in shered memory\n    const size_t num_input = (itemID.get_local_range()[0] + kernelSize - 1);\n    const size_t plane_kernel_offset = itemID.get_local_id(1) * num_input;\n    const size_t input_offset = itemID.get_group(0) * itemID.get_local_range()[0];\n    const size_t plane_tensor_offset = indexMapper.mapGpuInputPlaneToTensorInputOffset(itemID.get_global_id(1));\n    /// fill the shared memory\n    for (size_t i = itemID.get_local_id(0); i < num_input; i += itemID.get_local_range()[0]) {\n      const size_t local_index = i + plane_kernel_offset;\n      const size_t tensor_index =\n          plane_tensor_offset + indexMapper.mapGpuInputKernelToTensorInputOffset(i + input_offset);\n\n      local_acc[local_index] =\n          (((i + input_offset) < (input_range[0] + kernelSize - 1)) && itemID.get_global_id(1) < input_range[1])\n              ? device_evaluator.coeff(tensor_index)\n              : CoeffReturnType(0);\n    }\n\n    itemID.barrier(cl::sycl::access::fence_space::local_space);\n\n    // calculate the convolution // output start x\n    const size_t first_output_start = itemID.get_group(0) * (itemID.get_local_range()[0]);\n    if (boundary_check(itemID.get_global_id() < input_range)) {\n      CoeffReturnType result = static_cast<CoeffReturnType>(0);\n      const size_t index = plane_kernel_offset + itemID.get_local_id(0);\n      for (size_t k = 0; k < kernelSize; ++k) {\n        result += (local_acc[k + index] * kernel_ptr[k]);\n      }\n      const size_t tensor_index =\n          indexMapper.mapGpuOutputPlaneToTensorOutputOffset(itemID.get_global_id(1)) +\n          indexMapper.mapGpuOutputKernelToTensorOutputOffset(itemID.get_local_id(0) + first_output_start);\n      buffer_ptr[tensor_index] = result;\n    }\n  }\n};\n\ntemplate <typename Evaluator, typename CoeffReturnType, typename KernelType, typename Index, typename InputDims,\n          typename Kernel_accessor, typename Buffer_accessor>\nstruct EigenConvolutionKernel<Evaluator, CoeffReturnType, KernelType, Index, InputDims, Kernel_accessor,\n                              Buffer_accessor, convolution_type::CONV2D> {\n  typedef cl::sycl::accessor<CoeffReturnType, 1, cl::sycl::access::mode::read_write, cl::sycl::access::target::local>\n      Local_accessor;\n  Local_accessor local_acc;\n  Evaluator device_evaluator;\n  Kernel_accessor kernel_filter;\n  Buffer_accessor buffer_acc;\n  internal::IndexMapper<Index, InputDims, 2, Evaluator::Layout> indexMapper;\n  const cl::sycl::range<2> kernel_size;\n  const cl::sycl::range<3> input_range;\n  EigenConvolutionKernel(Local_accessor local_acc_, Evaluator device_evaluator_, Kernel_accessor kernel_filter_,\n                         Buffer_accessor buffer_acc_,\n                         internal::IndexMapper<Index, InputDims, 2, Evaluator::Layout> indexMapper_,\n                         const cl::sycl::range<2> kernel_size_, const cl::sycl::range<3> input_range_)\n      : local_acc(local_acc_),\n        device_evaluator(device_evaluator_),\n        kernel_filter(kernel_filter_),\n        buffer_acc(buffer_acc_),\n        indexMapper(indexMapper_),\n        kernel_size(kernel_size_),\n        input_range(input_range_) {}\n  template <typename BooleanDim3>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool boundary_check(const BooleanDim3 boolean_check) {\n    return (boolean_check[0] && boolean_check[1] && boolean_check[2]);\n  }\n\n  void operator()(cl::sycl::nd_item<3> itemID) {\n    auto buffer_ptr = buffer_acc.get_pointer();\n    auto kernel_ptr = kernel_filter.get_pointer();\n    // the required row to be calculated for the for each plane in shered memory\n    const auto num_input = cl::sycl::range<2>{\n        (cl::sycl::range<2>(itemID.get_local_range()[0], itemID.get_local_range()[1]) + kernel_size - 1)};\n\n    const size_t plane_input_offset = indexMapper.mapGpuInputPlaneToTensorInputOffset(itemID.get_global_id(2));\n    const size_t plane_kernel_offset = itemID.get_local_id(2) * num_input[1];\n\n    const auto input_offset = cl::sycl::range<2>{itemID.get_group(0) * itemID.get_local_range()[0],\n                                                 itemID.get_group(1) * itemID.get_local_range()[1]};\n      \n    // fill the local memory\n    bool in_range_dim2 = itemID.get_global_id(2) < input_range[2];\n    for (size_t j = itemID.get_local_id(1); j < num_input[1]; j += itemID.get_local_range()[1]) {\n      const size_t local_input_offset = num_input[0] * (j + plane_kernel_offset);\n      bool in_range_dim1 = ((j + input_offset[1]) < (input_range[1] + kernel_size[1] - 1)); \n      for (size_t i = itemID.get_local_id(0); i < num_input[0]; i += itemID.get_local_range()[0]) {\n        const size_t local_index = i + local_input_offset;\n        const size_t tensor_index = plane_input_offset + indexMapper.mapGpuInputKernelToTensorInputOffset(\n                                                             i + input_offset[0], j + input_offset[1]);\n        local_acc[local_index] = (((i + input_offset[0]) < (input_range[0] + kernel_size[0] - 1)) &&\n                                  in_range_dim1 && in_range_dim2)\n                                     ? device_evaluator.coeff(tensor_index)\n                                     : CoeffReturnType(0);\n      }\n    }\n\n    itemID.barrier(cl::sycl::access::fence_space::local_space);\n\n    // output offset start for each thread\n    const auto output_offset = cl::sycl::range<2>{itemID.get_group(0) * itemID.get_local_range()[0],\n                                                  itemID.get_group(1) * itemID.get_local_range()[1]};\n\n    if (boundary_check(itemID.get_global_id() < input_range)) {\n      CoeffReturnType result = static_cast<CoeffReturnType>(0);\n\n      for (size_t j = 0; j < kernel_size[1]; j++) {\n        size_t kernel_offset = kernel_size[0] * j;\n        const size_t index =\n            (num_input[0] * (plane_kernel_offset + j + itemID.get_local_id(1))) + itemID.get_local_id(0);\n        for (size_t i = 0; i < kernel_size[0]; i++) {\n          result += (local_acc[i + index] * kernel_ptr[i + kernel_offset]);\n        }\n      }\n      const size_t tensor_index =\n          indexMapper.mapGpuOutputPlaneToTensorOutputOffset(itemID.get_global_id(2)) +\n          indexMapper.mapGpuOutputKernelToTensorOutputOffset(itemID.get_local_id(0) + output_offset[0],\n                                                             itemID.get_local_id(1) + output_offset[1]);\n\n      buffer_ptr[tensor_index] = result;\n    }\n  }\n};\n\ntemplate <typename Evaluator, typename CoeffReturnType, typename KernelType, typename Index, typename InputDims,\n          typename Kernel_accessor, typename Buffer_accessor>\nstruct EigenConvolutionKernel<Evaluator, CoeffReturnType, KernelType, Index, InputDims, Kernel_accessor,\n                              Buffer_accessor, convolution_type::CONV3D> {\n  typedef cl::sycl::accessor<CoeffReturnType, 1, cl::sycl::access::mode::read_write, cl::sycl::access::target::local>\n      Local_accessor;\n  Local_accessor local_acc;\n  Evaluator device_evaluator;\n  Kernel_accessor kernel_filter;\n  Buffer_accessor buffer_acc;\n  internal::IndexMapper<Index, InputDims, 3, Evaluator::Layout> indexMapper;\n  const cl::sycl::range<3> kernel_size;\n  const cl::sycl::range<3> input_range;\n  const size_t numP;\n\n  EigenConvolutionKernel(Local_accessor local_acc_, Evaluator device_evaluator_, Kernel_accessor kernel_filter_,\n                         Buffer_accessor buffer_acc_,\n                         internal::IndexMapper<Index, InputDims, 3, Evaluator::Layout> indexMapper_,\n                         const cl::sycl::range<3> kernel_size_, const cl::sycl::range<3> input_range_,\n                         const size_t numP_)\n      : local_acc(local_acc_),\n        device_evaluator(device_evaluator_),\n        kernel_filter(kernel_filter_),\n        buffer_acc(buffer_acc_),\n        indexMapper(indexMapper_),\n        kernel_size(kernel_size_),\n        input_range(input_range_),\n        numP(numP_) {}\n  template <typename BooleanDim3>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool boundary_check(const BooleanDim3 boolean_check) {\n    return (boolean_check[0] && boolean_check[1] && boolean_check[2]);\n  }\n  void operator()(cl::sycl::nd_item<3> itemID) {\n    auto buffer_ptr = buffer_acc.get_pointer();\n    auto kernel_ptr = kernel_filter.get_pointer();\n    const auto num_input = cl::sycl::range<3>{itemID.get_local_range() + kernel_size - 1};\n\n    const auto input_offset = cl::sycl::range<3>{itemID.get_group().get_id() * itemID.get_local_range()};\n\n    const auto output_offset =\n          cl::sycl::range<3>{itemID.get_group().get_id() * itemID.get_local_range() + itemID.get_local_id()};\n\n    for (size_t p = 0; p < numP; p++) {\n      /// fill the shared memory\n      const size_t plane_input_offset = indexMapper.mapGpuInputPlaneToTensorInputOffset(p);\n      for (size_t k = itemID.get_local_id(2); k < num_input[2]; k += itemID.get_local_range()[2]) {\n        size_t local_index_dim2 = num_input[0] * num_input[1] * k;\n        bool cond_k_dim = (k + input_offset[2] < (input_range[2] + kernel_size[2] - 1));\n        for (size_t j = itemID.get_local_id(1); j < num_input[1]; j += itemID.get_local_range()[1]) {\n          bool cond_j_dim = cond_k_dim && (j + input_offset[1] < (input_range[1] + kernel_size[1] - 1));\n          size_t local_index_dim1 = (num_input[0] * j)  + local_index_dim2;\n          for (size_t i = itemID.get_local_id(0); i < num_input[0]; i += itemID.get_local_range()[0]) {\n            bool conds = cond_j_dim && (i + input_offset[0] < (input_range[0] + kernel_size[0] - 1));\n            const size_t local_index = local_index_dim1 + i;\n            const size_t tensor_index =\n                plane_input_offset + indexMapper.mapGpuInputKernelToTensorInputOffset(\n                                         i + input_offset[0], j + input_offset[1], k + input_offset[2]);\n            local_acc[local_index] = conds ? device_evaluator.coeff(tensor_index) : CoeffReturnType(0);\n          }\n        }\n      }\n      itemID.barrier(cl::sycl::access::fence_space::local_space);\n\n      // calculate the convolution\n\n      if (boundary_check(itemID.get_global_id() < input_range)) {\n        CoeffReturnType result = static_cast<CoeffReturnType>(0);\n        for (size_t k = 0; k < kernel_size[2]; k++) {\n          for (size_t j = 0; j < kernel_size[1]; j++) {\n            for (size_t i = 0; i < kernel_size[0]; i++) {\n              const size_t kernel_index = i + kernel_size[0] * (j + kernel_size[1] * k);\n              const size_t local_index =\n                  ((i + itemID.get_local_id(0)) +\n                   num_input[0] * ((j + itemID.get_local_id(1)) + num_input[1] * (k + itemID.get_local_id(2))));\n\n              result += (local_acc[local_index] * kernel_ptr[kernel_index]);\n            }\n          }\n        }\n        const size_t tensor_index =\n            indexMapper.mapGpuOutputPlaneToTensorOutputOffset(p) +\n            indexMapper.mapGpuOutputKernelToTensorOutputOffset(output_offset[0], output_offset[1], output_offset[2]);\n        buffer_ptr[tensor_index] = result;\n      }\n\n      itemID.barrier(cl::sycl::access::fence_space::local_space);\n    }\n  }\n};\n\ntemplate <typename Indices, typename InputArgType, typename KernelArgType>\nstruct TensorEvaluator<const TensorConvolutionOp<Indices, InputArgType, KernelArgType>, Eigen::SyclDevice> {\n  typedef TensorConvolutionOp<Indices, InputArgType, KernelArgType> XprType;\n\n  static const int NumDims =\n      internal::array_size<typename TensorEvaluator<InputArgType, Eigen::SyclDevice>::Dimensions>::value;\n  static const int NumKernelDims = internal::array_size<Indices>::value;\n  typedef typename XprType::Index Index;\n  typedef DSizes<Index, NumDims> Dimensions;\n  typedef typename TensorEvaluator<KernelArgType, Eigen::SyclDevice>::Dimensions KernelDimensions;\n  typedef const Eigen::SyclDevice Device;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Eigen::SyclDevice>::type PacketReturnType;\n  typedef typename InputArgType::Scalar Scalar;\n  static const int PacketSize = PacketType<CoeffReturnType, Device>::size;\n  typedef StorageMemory<CoeffReturnType, Eigen::SyclDevice> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n  typedef StorageMemory<const CoeffReturnType, Eigen::SyclDevice> KernelStorage;\n\n  enum {\n    IsAligned = TensorEvaluator<InputArgType, Eigen::SyclDevice>::IsAligned &\n                TensorEvaluator<KernelArgType, Eigen::SyclDevice>::IsAligned,\n    PacketAccess = false,\n    BlockAccess = false,\n    PreferBlockAccess = false,\n    Layout = TensorEvaluator<InputArgType, Eigen::SyclDevice>::Layout,\n    CoordAccess = false,  // to be implemented\n    RawAccess = false\n  };\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockNotImplemented TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC TensorEvaluator(const XprType &op, const Eigen::SyclDevice &device)\n      : m_inputImpl(op.inputExpression(), device),\n        m_kernelArg(op.kernelExpression()),\n        m_kernelImpl(op.kernelExpression(), device),\n        m_indices(op.indices()),\n        m_buf(NULL),\n        m_kernel(NULL),\n        m_local_kernel(false),\n        m_device(device) {\n    EIGEN_STATIC_ASSERT((static_cast<int>(TensorEvaluator<InputArgType, Eigen::SyclDevice>::Layout) ==\n                         static_cast<int>(TensorEvaluator<KernelArgType, Eigen::SyclDevice>::Layout)),\n                        YOU_MADE_A_PROGRAMMING_MISTAKE);\n\n    const typename TensorEvaluator<InputArgType, Eigen::SyclDevice>::Dimensions &input_dims = m_inputImpl.dimensions();\n    const typename TensorEvaluator<KernelArgType, Eigen::SyclDevice>::Dimensions &kernel_dims =\n        m_kernelImpl.dimensions();\n\n    m_dimensions = m_inputImpl.dimensions();\n    for (int i = 0; i < NumKernelDims; ++i) {\n      const Index index = op.indices()[i];\n      const Index input_dim = input_dims[index];\n      const Index kernel_dim = kernel_dims[i];\n      const Index result_dim = input_dim - kernel_dim + 1;\n      m_dimensions[index] = result_dim;\n    }\n  }\n\n  EIGEN_DEVICE_FUNC const Dimensions &dimensions() const { return m_dimensions; }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType data) {\n    preloadKernel();\n    m_inputImpl.evalSubExprsIfNeeded(NULL);\n    if (data) {\n      executeEval(data);\n      return false;\n    } else {\n      m_buf = (EvaluatorPointerType)m_device.get(\n          (Scalar *)m_device.allocate_temp(dimensions().TotalSize() * sizeof(Scalar)));\n      executeEval(m_buf);\n      return true;\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {\n    m_inputImpl.cleanup();\n    if (m_buf) {\n      m_device.deallocate_temp(m_buf);\n      m_buf = NULL;\n    }\n    if (m_local_kernel) {\n      m_device.deallocate_temp(m_kernel);\n      m_local_kernel = false;\n    }\n    m_kernel = NULL;\n  }\n  /// used by sycl in order to build the sycl buffer\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Device &device() const { return m_device; }\n  /// used by sycl in order to build the sycl buffer\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EvaluatorPointerType data() const { return m_buf; }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void preloadKernel() {\n    // Don't make a local copy of the kernel unless we have to (i.e. it's an\n    // expression that needs to be evaluated)\n    typename KernelStorage::Type in_place = m_kernelImpl.data();\n    if (in_place) {\n      m_kernel = in_place;\n      m_local_kernel = false;\n    } else {\n      ptrdiff_t kernel_sz = m_kernelImpl.dimensions().TotalSize() * sizeof(Scalar);\n      EvaluatorPointerType local = (EvaluatorPointerType)m_device.get((Scalar *)m_device.allocate_temp(kernel_sz));\n      typedef TensorEvalToOp<const KernelArgType> EvalTo;\n      EvalTo evalToTmp(m_device.get(local), m_kernelArg);\n      const bool PacketAccess = internal::IsVectorizable<Eigen::SyclDevice, KernelArgType>::value;\n      internal::TensorExecutor<const EvalTo, Eigen::SyclDevice, PacketAccess>::run(evalToTmp, m_device);\n      m_kernel = local;\n      m_local_kernel = true;\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void executeEval(EvaluatorPointerType data) const {\n    typedef TensorEvaluator<InputArgType, Eigen::SyclDevice> InputEvaluator;\n    typedef typename InputEvaluator::Dimensions InputDims;\n    switch (NumKernelDims) {\n      case 1: {\n        const size_t numX = dimensions()[m_indices[0]];\n        const size_t numP = dimensions().TotalSize() / numX;\n        const auto input_dim = std::array<size_t, 2>{numX, numP};\n        auto global_range = cl::sycl::range<2>{};\n        auto local_range = cl::sycl::range<2>{};\n        const size_t kernel_size = m_kernelImpl.dimensions().TotalSize();\n\n        m_device.parallel_for_setup(input_dim, global_range, local_range);\n        const size_t local_memory_size = (local_range[0] + kernel_size - 1) * (local_range[1]);\n        gpu_assert(static_cast<unsigned long>(local_memory_size) <= m_device.sharedMemPerBlock());\n        const array<Index, 1> indices{{m_indices[0]}};\n        const array<Index, 1> kernel_dims{{m_kernelImpl.dimensions()[0]}};\n        internal::IndexMapper<Index, InputDims, 1, Layout> indexMapper(m_inputImpl.dimensions(), kernel_dims, indices);\n\n        typedef EigenConvolutionKernel<InputEvaluator, CoeffReturnType, Scalar, Index, InputDims,\n                                       typename KernelStorage::Type, EvaluatorPointerType, convolution_type::CONV1D>\n            ConvKernel;\n\n        m_device.template binary_kernel_launcher<CoeffReturnType, ConvKernel>(\n            m_inputImpl, m_kernel, data, cl::sycl::nd_range<2>(global_range, local_range), local_memory_size,\n            indexMapper, kernel_size, cl::sycl::range<2>(input_dim[0], input_dim[1]));\n        break;\n      }\n\n      case 2: {\n        auto kernel_index = std::array<size_t, 2>{static_cast<int>(Layout) == static_cast<int>(ColMajor) ? 0 : 1,\n                                                  static_cast<int>(Layout) == static_cast<int>(ColMajor) ? 1 : 0};\n        auto kernel_size = cl::sycl::range<2>{(size_t)m_kernelImpl.dimensions()[kernel_index[0]],\n                                              (size_t)m_kernelImpl.dimensions()[kernel_index[1]]};\n        const size_t numX = dimensions()[m_indices[kernel_index[0]]];\n        const size_t numY = dimensions()[m_indices[kernel_index[1]]];\n        const size_t numP = dimensions().TotalSize() / (numX * numY);\n        auto input_dim = std::array<size_t, 3>{numX, numY, numP};\n\n        auto global_range = cl::sycl::range<3>{};\n        auto local_range = cl::sycl::range<3>{};\n\n        m_device.parallel_for_setup(input_dim, global_range, local_range);\n\n        const size_t local_memory_size =\n            (local_range[0] + kernel_size[0] - 1) * (local_range[1] + kernel_size[1] - 1) * local_range[2];\n        gpu_assert(static_cast<unsigned long>(local_memory_size) <= m_device.sharedMemPerBlock());\n        const array<Index, 2> indices{{m_indices[kernel_index[0]], m_indices[kernel_index[1]]}};\n        const array<Index, 2> kernel_dims{\n            {m_kernelImpl.dimensions()[kernel_index[0]], m_kernelImpl.dimensions()[kernel_index[1]]}};\n        internal::IndexMapper<Index, InputDims, 2, Layout> indexMapper(m_inputImpl.dimensions(), kernel_dims, indices);\n        typedef EigenConvolutionKernel<InputEvaluator, CoeffReturnType, Scalar, Index, InputDims,\n                                       typename KernelStorage::Type, EvaluatorPointerType, convolution_type::CONV2D>\n            ConvKernel;\n        m_device.template binary_kernel_launcher<CoeffReturnType, ConvKernel>(\n            m_inputImpl, m_kernel, data, cl::sycl::nd_range<3>(global_range, local_range), local_memory_size,\n            indexMapper, kernel_size, cl::sycl::range<3>{input_dim[0], input_dim[1], input_dim[2]});\n        break;\n      }\n\n      case 3: {\n        auto kernel_index = std::array<size_t, 3>{static_cast<int>(Layout) == static_cast<int>(ColMajor) ? 0 : 2,\n                                                  static_cast<int>(Layout) == static_cast<int>(ColMajor) ? 1 : 1,\n                                                  static_cast<int>(Layout) == static_cast<int>(ColMajor) ? 2 : 0};\n\n        auto kernel_size = cl::sycl::range<3>{(size_t)m_kernelImpl.dimensions()[kernel_index[0]],\n                                              (size_t)m_kernelImpl.dimensions()[kernel_index[1]],\n                                              (size_t)m_kernelImpl.dimensions()[kernel_index[2]]};\n\n        const size_t numX = dimensions()[m_indices[kernel_index[0]]];\n        const size_t numY = dimensions()[m_indices[kernel_index[1]]];\n        const size_t numZ = dimensions()[m_indices[kernel_index[2]]];\n        auto input_dim = std::array<size_t, 3>{numX, numY, numZ};\n        const size_t numP = dimensions().TotalSize() / (numX * numY * numZ);\n\n        const array<Index, 3> indices{\n            {m_indices[kernel_index[0]], m_indices[kernel_index[1]], m_indices[kernel_index[2]]}};\n        const array<Index, 3> kernel_dims{{m_kernelImpl.dimensions()[kernel_index[0]],\n                                           m_kernelImpl.dimensions()[kernel_index[1]],\n                                           m_kernelImpl.dimensions()[kernel_index[2]]}};\n\n        internal::IndexMapper<Index, InputDims, 3, Layout> indexMapper(m_inputImpl.dimensions(), kernel_dims, indices);\n\n        auto global_range = cl::sycl::range<3>{};\n        auto local_range = cl::sycl::range<3>{};\n\n        m_device.parallel_for_setup(input_dim, global_range, local_range);\n        auto local_memory_range = (local_range + kernel_size - 1);\n        const size_t local_memory_size = local_memory_range[0] * local_memory_range[1] * local_memory_range[2];\n\n        gpu_assert(static_cast<unsigned long>(local_memory_size) <= m_device.sharedMemPerBlock());\n        typedef EigenConvolutionKernel<InputEvaluator, CoeffReturnType, Scalar, Index, InputDims,\n                                       typename KernelStorage::Type, EvaluatorPointerType, convolution_type::CONV3D>\n            ConvKernel;\n        m_device.template binary_kernel_launcher<CoeffReturnType, ConvKernel>(\n            m_inputImpl, m_kernel, data, cl::sycl::nd_range<3>(global_range, local_range), local_memory_size,\n            indexMapper, kernel_size, cl::sycl::range<3>(input_dim[0], input_dim[1], input_dim[2]), numP);\n        break;\n      }\n\n      default: {\n        EIGEN_STATIC_ASSERT((NumKernelDims >= 1 && NumKernelDims <= 3),\n                            THIS_METHOD_IS_ONLY_FOR_OBJECTS_OF_A_SPECIFIC_SIZE);\n      }\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const {\n    eigen_assert(m_buf != NULL);\n    eigen_assert(index < m_dimensions.TotalSize());\n    return m_buf[index];\n  }\n\n  template <int LoadMode>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(const Index index) const {\n    eigen_assert(m_buf != NULL);\n    eigen_assert(index < m_dimensions.TotalSize());\n    return internal::ploadt<PacketReturnType, LoadMode>(m_buf + index);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool vectorized) const {\n    // TODO(rmlarsen): FIXME: For now, this is just a copy of the CPU cost\n    // model.\n    const double kernel_size = m_kernelImpl.dimensions().TotalSize();\n    // We ignore the use of fused multiply-add.\n    const double convolve_compute_cost = TensorOpCost::AddCost<Scalar>() + TensorOpCost::MulCost<Scalar>();\n    const double firstIndex_compute_cost =\n        NumDims *\n        (2 * TensorOpCost::AddCost<Index>() + 2 * TensorOpCost::MulCost<Index>() + TensorOpCost::DivCost<Index>());\n    return TensorOpCost(0, 0, firstIndex_compute_cost, vectorized, PacketSize) +\n           kernel_size * (m_inputImpl.costPerCoeff(vectorized) + m_kernelImpl.costPerCoeff(vectorized) +\n                          TensorOpCost(0, 0, convolve_compute_cost, vectorized, PacketSize));\n  }\n  // binding placeholder accessors to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {\n    m_kernelImpl.bind(cgh);\n    m_inputImpl.bind(cgh);\n    m_buf.bind(cgh);\n    m_kernel.bind(cgh);\n  }\n\n private:\n  // No assignment (copies are needed by the kernels)\n  TensorEvaluator &operator=(const TensorEvaluator &);\n  TensorEvaluator<InputArgType, Eigen::SyclDevice> m_inputImpl;\n  KernelArgType m_kernelArg;\n  TensorEvaluator<KernelArgType, Eigen::SyclDevice> m_kernelImpl;\n  Indices m_indices;\n  Dimensions m_dimensions;\n  EvaluatorPointerType m_buf;\n  typename KernelStorage::Type m_kernel;\n  bool m_local_kernel;\n  const Eigen::SyclDevice EIGEN_DEVICE_REF m_device;\n};  // namespace Eigen\n\n}  // end namespace Eigen\n\n#endif  // EIGEN_CXX11_TENSOR_TENSOR_CONVOLUTION_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorCostModel.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Rasmus Munk Larsen <rmlarsen@google.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_COST_MODEL_H\n#define EIGEN_CXX11_TENSOR_TENSOR_COST_MODEL_H\n\nnamespace Eigen {\n\n/** \\class TensorEvaluator\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief A cost model used to limit the number of threads used for evaluating\n  * tensor expression.\n  *\n  */\n\n// Class storing the cost of evaluating a tensor expression in terms of the\n// estimated number of operand bytes loads, bytes stored, and compute cycles.\nclass TensorOpCost {\n public:\n  // TODO(rmlarsen): Fix the scalar op costs in Eigen proper. Even a simple\n  // model based on minimal reciprocal throughput numbers from Intel or\n  // Agner Fog's tables would be better than what is there now.\n  template <typename ArgType>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE int MulCost() {\n    return internal::functor_traits<\n        internal::scalar_product_op<ArgType, ArgType> >::Cost;\n  }\n  template <typename ArgType>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE int AddCost() {\n    return internal::functor_traits<internal::scalar_sum_op<ArgType> >::Cost;\n  }\n  template <typename ArgType>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE int DivCost() {\n    return internal::functor_traits<\n        internal::scalar_quotient_op<ArgType, ArgType> >::Cost;\n  }\n  template <typename ArgType>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE int ModCost() {\n    return internal::functor_traits<internal::scalar_mod_op<ArgType> >::Cost;\n  }\n  template <typename SrcType, typename TargetType>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE int CastCost() {\n    return internal::functor_traits<\n        internal::scalar_cast_op<SrcType, TargetType> >::Cost;\n  }\n\n  EIGEN_DEVICE_FUNC\n  TensorOpCost() : bytes_loaded_(0), bytes_stored_(0), compute_cycles_(0) {}\n  EIGEN_DEVICE_FUNC\n  TensorOpCost(double bytes_loaded, double bytes_stored, double compute_cycles)\n      : bytes_loaded_(bytes_loaded),\n        bytes_stored_(bytes_stored),\n        compute_cycles_(compute_cycles) {}\n\n  EIGEN_DEVICE_FUNC\n  TensorOpCost(double bytes_loaded, double bytes_stored, double compute_cycles,\n               bool vectorized, double packet_size)\n      : bytes_loaded_(bytes_loaded),\n        bytes_stored_(bytes_stored),\n        compute_cycles_(vectorized ? compute_cycles / packet_size\n                                   : compute_cycles) {\n    eigen_assert(bytes_loaded >= 0 && (numext::isfinite)(bytes_loaded));\n    eigen_assert(bytes_stored >= 0 && (numext::isfinite)(bytes_stored));\n    eigen_assert(compute_cycles >= 0 && (numext::isfinite)(compute_cycles));\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double bytes_loaded() const {\n    return bytes_loaded_;\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double bytes_stored() const {\n    return bytes_stored_;\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double compute_cycles() const {\n    return compute_cycles_;\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double total_cost(\n      double load_cost, double store_cost, double compute_cost) const {\n    return load_cost * bytes_loaded_ + store_cost * bytes_stored_ +\n           compute_cost * compute_cycles_;\n  }\n\n  // Drop memory access component. Intended for cases when memory accesses are\n  // sequential or are completely masked by computations.\n  EIGEN_DEVICE_FUNC void dropMemoryCost() {\n    bytes_loaded_ = 0;\n    bytes_stored_ = 0;\n  }\n\n  // TODO(rmlarsen): Define min in terms of total cost, not elementwise.\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost cwiseMin(\n      const TensorOpCost& rhs) const {\n    double bytes_loaded = numext::mini(bytes_loaded_, rhs.bytes_loaded());\n    double bytes_stored = numext::mini(bytes_stored_, rhs.bytes_stored());\n    double compute_cycles = numext::mini(compute_cycles_, rhs.compute_cycles());\n    return TensorOpCost(bytes_loaded, bytes_stored, compute_cycles);\n  }\n\n  // TODO(rmlarsen): Define max in terms of total cost, not elementwise.\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost cwiseMax(\n      const TensorOpCost& rhs) const {\n    double bytes_loaded = numext::maxi(bytes_loaded_, rhs.bytes_loaded());\n    double bytes_stored = numext::maxi(bytes_stored_, rhs.bytes_stored());\n    double compute_cycles = numext::maxi(compute_cycles_, rhs.compute_cycles());\n    return TensorOpCost(bytes_loaded, bytes_stored, compute_cycles);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost& operator+=(\n      const TensorOpCost& rhs) {\n    bytes_loaded_ += rhs.bytes_loaded();\n    bytes_stored_ += rhs.bytes_stored();\n    compute_cycles_ += rhs.compute_cycles();\n    return *this;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost& operator*=(double rhs) {\n    bytes_loaded_ *= rhs;\n    bytes_stored_ *= rhs;\n    compute_cycles_ *= rhs;\n    return *this;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE friend TensorOpCost operator+(\n      TensorOpCost lhs, const TensorOpCost& rhs) {\n    lhs += rhs;\n    return lhs;\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE friend TensorOpCost operator*(\n      TensorOpCost lhs, double rhs) {\n    lhs *= rhs;\n    return lhs;\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE friend TensorOpCost operator*(\n      double lhs, TensorOpCost rhs) {\n    rhs *= lhs;\n    return rhs;\n  }\n\n  friend std::ostream& operator<<(std::ostream& os, const TensorOpCost& tc) {\n    return os << \"[bytes_loaded = \" << tc.bytes_loaded()\n              << \", bytes_stored = \" << tc.bytes_stored()\n              << \", compute_cycles = \" << tc.compute_cycles() << \"]\";\n  }\n\n private:\n  double bytes_loaded_;\n  double bytes_stored_;\n  double compute_cycles_;\n};\n\n// TODO(rmlarsen): Implement a policy that chooses an \"optimal\" number of theads\n// in [1:max_threads] instead of just switching multi-threading off for small\n// work units.\ntemplate <typename Device>\nclass TensorCostModel {\n public:\n  // Scaling from Eigen compute cost to device cycles.\n  static const int kDeviceCyclesPerComputeCycle = 1;\n\n // Costs in device cycles.\n  static const int kStartupCycles = 100000;\n  static const int kPerThreadCycles = 100000;\n  static const int kTaskSize = 40000;\n\n  // Returns the number of threads in [1:max_threads] to use for\n  // evaluating an expression with the given output size and cost per\n  // coefficient.\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE int numThreads(\n      double output_size, const TensorOpCost& cost_per_coeff, int max_threads) {\n    double cost = totalCost(output_size, cost_per_coeff);\n    double threads = (cost - kStartupCycles) / kPerThreadCycles + 0.9;\n    // Make sure we don't invoke undefined behavior when we convert to an int.\n    threads = numext::mini<double>(threads, GenericNumTraits<int>::highest());\n    return numext::mini(max_threads,\n                        numext::maxi<int>(1, static_cast<int>(threads)));\n  }\n\n  // taskSize assesses parallel task size.\n  // Value of 1.0 means ideal parallel task size. Values < 1.0 mean that task\n  // granularity needs to be increased to mitigate parallelization overheads.\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double taskSize(\n      double output_size, const TensorOpCost& cost_per_coeff) {\n    return totalCost(output_size, cost_per_coeff) / kTaskSize;\n  }\n\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double totalCost(\n      double output_size, const TensorOpCost& cost_per_coeff) {\n    // Cost of memory fetches from L2 cache. 64 is typical cache line size.\n    // 11 is L2 cache latency on Haswell.\n    // We don't know whether data is in L1, L2 or L3. But we are most interested\n    // in single-threaded computational time around 100us-10ms (smaller time\n    // is too small for parallelization, larger time is not interesting\n    // either because we are probably using all available threads already).\n    // And for the target time range, L2 seems to be what matters. Data set\n    // fitting into L1 is too small to take noticeable time. Data set fitting\n    // only into L3 presumably will take more than 10ms to load and process.\n    const double kLoadCycles = 1.0 / 64 * 11;\n    const double kStoreCycles = 1.0 / 64 * 11;\n    // Scaling from Eigen compute cost to device cycles.\n    return output_size *\n        cost_per_coeff.total_cost(kLoadCycles, kStoreCycles,\n                                  kDeviceCyclesPerComputeCycle);\n  }\n};\n\n}  // namespace Eigen\n\n#endif  // EIGEN_CXX11_TENSOR_TENSOR_COST_MODEL_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorCustomOp.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_CUSTOM_OP_H\n#define EIGEN_CXX11_TENSOR_TENSOR_CUSTOM_OP_H\n\nnamespace Eigen {\n\n/** \\class TensorCustomUnaryOp\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief Tensor custom class.\n  *\n  *\n  */\nnamespace internal {\ntemplate<typename CustomUnaryFunc, typename XprType>\nstruct traits<TensorCustomUnaryOp<CustomUnaryFunc, XprType> >\n{\n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::StorageKind StorageKind;\n  typedef typename XprType::Index Index;\n  typedef typename XprType::Nested Nested;\n  typedef typename remove_reference<Nested>::type _Nested;\n  static const int NumDimensions = traits<XprType>::NumDimensions;\n  static const int Layout = traits<XprType>::Layout;\n  typedef typename traits<XprType>::PointerType PointerType;\n};\n\ntemplate<typename CustomUnaryFunc, typename XprType>\nstruct eval<TensorCustomUnaryOp<CustomUnaryFunc, XprType>, Eigen::Dense>\n{\n  typedef const TensorCustomUnaryOp<CustomUnaryFunc, XprType>EIGEN_DEVICE_REF type;\n};\n\ntemplate<typename CustomUnaryFunc, typename XprType>\nstruct nested<TensorCustomUnaryOp<CustomUnaryFunc, XprType> >\n{\n  typedef TensorCustomUnaryOp<CustomUnaryFunc, XprType> type;\n};\n\n}  // end namespace internal\n\n\n\ntemplate<typename CustomUnaryFunc, typename XprType>\nclass TensorCustomUnaryOp : public TensorBase<TensorCustomUnaryOp<CustomUnaryFunc, XprType>, ReadOnlyAccessors>\n{\n  public:\n  typedef typename internal::traits<TensorCustomUnaryOp>::Scalar Scalar;\n  typedef typename Eigen::NumTraits<Scalar>::Real RealScalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename internal::nested<TensorCustomUnaryOp>::type Nested;\n  typedef typename internal::traits<TensorCustomUnaryOp>::StorageKind StorageKind;\n  typedef typename internal::traits<TensorCustomUnaryOp>::Index Index;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorCustomUnaryOp(const XprType& expr, const CustomUnaryFunc& func)\n      : m_expr(expr), m_func(func) {}\n\n  EIGEN_DEVICE_FUNC\n  const CustomUnaryFunc& func() const { return m_func; }\n\n  EIGEN_DEVICE_FUNC\n  const typename internal::remove_all<typename XprType::Nested>::type&\n  expression() const { return m_expr; }\n\n  protected:\n    typename XprType::Nested m_expr;\n    const CustomUnaryFunc m_func;\n};\n\n\n// Eval as rvalue\ntemplate<typename CustomUnaryFunc, typename XprType, typename Device>\nstruct TensorEvaluator<const TensorCustomUnaryOp<CustomUnaryFunc, XprType>, Device>\n{\n  typedef TensorCustomUnaryOp<CustomUnaryFunc, XprType> ArgType;\n  typedef typename internal::traits<ArgType>::Index Index;\n  static const int NumDims = internal::traits<ArgType>::NumDimensions;\n  typedef DSizes<Index, NumDims> Dimensions;\n  typedef typename internal::remove_const<typename ArgType::Scalar>::type Scalar;\n  typedef typename internal::remove_const<typename XprType::CoeffReturnType>::type CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  static const int PacketSize = PacketType<CoeffReturnType, Device>::size;\n  typedef typename Eigen::internal::traits<XprType>::PointerType TensorPointerType;\n  typedef StorageMemory<CoeffReturnType, Device> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n\n  enum {\n    IsAligned = false,\n    PacketAccess = (PacketType<CoeffReturnType, Device>::size > 1),\n    BlockAccess = false,\n    PreferBlockAccess = false,\n    Layout = TensorEvaluator<XprType, Device>::Layout,\n    CoordAccess = false,  // to be implemented\n    RawAccess = false\n  };\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockNotImplemented TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const ArgType& op, const Device& device)\n      : m_op(op), m_device(device), m_result(NULL)\n  {\n    m_dimensions = op.func().dimensions(op.expression());\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions& dimensions() const { return m_dimensions; }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType data) {\n    if (data) {\n      evalTo(data);\n      return false;\n    } else {\n      m_result = static_cast<EvaluatorPointerType>(m_device.get( (CoeffReturnType*)\n          m_device.allocate_temp(dimensions().TotalSize() * sizeof(Scalar))));\n      evalTo(m_result);\n      return true;\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {\n    if (m_result) {\n      m_device.deallocate_temp(m_result);\n      m_result = NULL;\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const {\n    return m_result[index];\n  }\n\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC PacketReturnType packet(Index index) const {\n    return internal::ploadt<PacketReturnType, LoadMode>(m_result + index);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool vectorized) const {\n    // TODO(rmlarsen): Extend CustomOp API to return its cost estimate.\n    return TensorOpCost(sizeof(CoeffReturnType), 0, 0, vectorized, PacketSize);\n  }\n\n  EIGEN_DEVICE_FUNC EvaluatorPointerType data() const { return m_result; }\n\n#ifdef EIGEN_USE_SYCL\n  // binding placeholder accessors to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {\n    m_result.bind(cgh);\n  }\n#endif\n\n protected:\n  EIGEN_DEVICE_FUNC void evalTo(EvaluatorPointerType data) {\n    TensorMap<Tensor<CoeffReturnType, NumDims, Layout, Index> > result(m_device.get(data), m_dimensions);\n    m_op.func().eval(m_op.expression(), result, m_device);\n  }\n\n  Dimensions m_dimensions;\n  const ArgType m_op;\n  const Device EIGEN_DEVICE_REF m_device;\n  EvaluatorPointerType m_result;\n};\n\n\n\n/** \\class TensorCustomBinaryOp\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief Tensor custom class.\n  *\n  *\n  */\nnamespace internal {\ntemplate<typename CustomBinaryFunc, typename LhsXprType, typename RhsXprType>\nstruct traits<TensorCustomBinaryOp<CustomBinaryFunc, LhsXprType, RhsXprType> >\n{\n  typedef typename internal::promote_storage_type<typename LhsXprType::Scalar,\n                                                  typename RhsXprType::Scalar>::ret Scalar;\n  typedef typename internal::promote_storage_type<typename LhsXprType::CoeffReturnType,\n                                                  typename RhsXprType::CoeffReturnType>::ret CoeffReturnType;\n  typedef typename promote_storage_type<typename traits<LhsXprType>::StorageKind,\n                                        typename traits<RhsXprType>::StorageKind>::ret StorageKind;\n  typedef typename promote_index_type<typename traits<LhsXprType>::Index,\n                                      typename traits<RhsXprType>::Index>::type Index;\n  typedef typename LhsXprType::Nested LhsNested;\n  typedef typename RhsXprType::Nested RhsNested;\n  typedef typename remove_reference<LhsNested>::type _LhsNested;\n  typedef typename remove_reference<RhsNested>::type _RhsNested;\n  static const int NumDimensions = traits<LhsXprType>::NumDimensions;\n  static const int Layout = traits<LhsXprType>::Layout;\n  typedef typename conditional<Pointer_type_promotion<typename LhsXprType::Scalar, Scalar>::val,\n                                typename traits<LhsXprType>::PointerType, typename traits<RhsXprType>::PointerType>::type PointerType;\n};\n\ntemplate<typename CustomBinaryFunc, typename LhsXprType, typename RhsXprType>\nstruct eval<TensorCustomBinaryOp<CustomBinaryFunc, LhsXprType, RhsXprType>, Eigen::Dense>\n{\n  typedef const TensorCustomBinaryOp<CustomBinaryFunc, LhsXprType, RhsXprType>& type;\n};\n\ntemplate<typename CustomBinaryFunc, typename LhsXprType, typename RhsXprType>\nstruct nested<TensorCustomBinaryOp<CustomBinaryFunc, LhsXprType, RhsXprType> >\n{\n  typedef TensorCustomBinaryOp<CustomBinaryFunc, LhsXprType, RhsXprType> type;\n};\n\n}  // end namespace internal\n\n\n\ntemplate<typename CustomBinaryFunc, typename LhsXprType, typename RhsXprType>\nclass TensorCustomBinaryOp : public TensorBase<TensorCustomBinaryOp<CustomBinaryFunc, LhsXprType, RhsXprType>, ReadOnlyAccessors>\n{\n  public:\n  typedef typename internal::traits<TensorCustomBinaryOp>::Scalar Scalar;\n  typedef typename Eigen::NumTraits<Scalar>::Real RealScalar;\n  typedef typename internal::traits<TensorCustomBinaryOp>::CoeffReturnType CoeffReturnType;\n  typedef typename internal::nested<TensorCustomBinaryOp>::type Nested;\n  typedef typename internal::traits<TensorCustomBinaryOp>::StorageKind StorageKind;\n  typedef typename internal::traits<TensorCustomBinaryOp>::Index Index;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorCustomBinaryOp(const LhsXprType& lhs, const RhsXprType& rhs, const CustomBinaryFunc& func)\n\n      : m_lhs_xpr(lhs), m_rhs_xpr(rhs), m_func(func) {}\n\n  EIGEN_DEVICE_FUNC\n  const CustomBinaryFunc& func() const { return m_func; }\n\n  EIGEN_DEVICE_FUNC\n  const typename internal::remove_all<typename LhsXprType::Nested>::type&\n  lhsExpression() const { return m_lhs_xpr; }\n\n  EIGEN_DEVICE_FUNC\n  const typename internal::remove_all<typename RhsXprType::Nested>::type&\n  rhsExpression() const { return m_rhs_xpr; }\n\n  protected:\n    typename LhsXprType::Nested m_lhs_xpr;\n    typename RhsXprType::Nested m_rhs_xpr;\n    const CustomBinaryFunc m_func;\n};\n\n\n// Eval as rvalue\ntemplate<typename CustomBinaryFunc, typename LhsXprType, typename RhsXprType, typename Device>\nstruct TensorEvaluator<const TensorCustomBinaryOp<CustomBinaryFunc, LhsXprType, RhsXprType>, Device>\n{\n  typedef TensorCustomBinaryOp<CustomBinaryFunc, LhsXprType, RhsXprType> XprType;\n  typedef typename internal::traits<XprType>::Index Index;\n  static const int NumDims = internal::traits<XprType>::NumDimensions;\n  typedef DSizes<Index, NumDims> Dimensions;\n  typedef typename XprType::Scalar Scalar;\n  typedef typename internal::remove_const<typename XprType::CoeffReturnType>::type CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  static const int PacketSize = PacketType<CoeffReturnType, Device>::size;\n\n  typedef typename Eigen::internal::traits<XprType>::PointerType TensorPointerType;\n  typedef StorageMemory<CoeffReturnType, Device> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n\n  enum {\n    IsAligned = false,\n    PacketAccess = (PacketType<CoeffReturnType, Device>::size > 1),\n    BlockAccess = false,\n    PreferBlockAccess = false,\n    Layout = TensorEvaluator<LhsXprType, Device>::Layout,\n    CoordAccess = false,  // to be implemented\n    RawAccess = false\n  };\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockNotImplemented TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)\n      : m_op(op), m_device(device), m_result(NULL)\n  {\n    m_dimensions = op.func().dimensions(op.lhsExpression(), op.rhsExpression());\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions& dimensions() const { return m_dimensions; }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType data) {\n    if (data) {\n      evalTo(data);\n      return false;\n    } else {\n      m_result = static_cast<EvaluatorPointerType>(m_device.get( (CoeffReturnType*)\n        m_device.allocate_temp(dimensions().TotalSize() * sizeof(CoeffReturnType))));\n      evalTo(m_result);\n      return true;\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {\n    if (m_result != NULL) {\n      m_device.deallocate_temp(m_result);\n      m_result = NULL;\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const {\n    return m_result[index];\n  }\n\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC PacketReturnType packet(Index index) const {\n    return internal::ploadt<PacketReturnType, LoadMode>(m_result + index);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool vectorized) const {\n    // TODO(rmlarsen): Extend CustomOp API to return its cost estimate.\n    return TensorOpCost(sizeof(CoeffReturnType), 0, 0, vectorized, PacketSize);\n  }\n\n  EIGEN_DEVICE_FUNC EvaluatorPointerType data() const { return m_result; }\n\n#ifdef EIGEN_USE_SYCL\n  // binding placeholder accessors to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {\n    m_result.bind(cgh);\n  }\n#endif\n\n protected:\n  EIGEN_DEVICE_FUNC void evalTo(EvaluatorPointerType data) {\n    TensorMap<Tensor<CoeffReturnType, NumDims, Layout> > result(m_device.get(data), m_dimensions);\n    m_op.func().eval(m_op.lhsExpression(), m_op.rhsExpression(), result, m_device);\n  }\n\n  Dimensions m_dimensions;\n  const XprType m_op;\n  const Device EIGEN_DEVICE_REF m_device;\n  EvaluatorPointerType m_result;\n};\n\n\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_CUSTOM_OP_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDevice.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_DEVICE_H\n#define EIGEN_CXX11_TENSOR_TENSOR_DEVICE_H\n\nnamespace Eigen {\n\n/** \\class TensorDevice\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief Pseudo expression providing an operator = that will evaluate its argument\n  * on the specified computing 'device' (GPU, thread pool, ...)\n  *\n  * Example:\n  *    C.device(EIGEN_GPU) = A + B;\n  *\n  * Todo: operator *= and /=.\n  */\n\ntemplate <typename ExpressionType, typename DeviceType> class TensorDevice {\n  public:\n    TensorDevice(const DeviceType& device, ExpressionType& expression) : m_device(device), m_expression(expression) {}\n\n    template<typename OtherDerived>\n    EIGEN_STRONG_INLINE TensorDevice& operator=(const OtherDerived& other) {\n      typedef TensorAssignOp<ExpressionType, const OtherDerived> Assign;\n      Assign assign(m_expression, other);\n      internal::TensorExecutor<const Assign, DeviceType>::run(assign, m_device);\n      return *this;\n    }\n\n    template<typename OtherDerived>\n    EIGEN_STRONG_INLINE TensorDevice& operator+=(const OtherDerived& other) {\n      typedef typename OtherDerived::Scalar Scalar;\n      typedef TensorCwiseBinaryOp<internal::scalar_sum_op<Scalar>, const ExpressionType, const OtherDerived> Sum;\n      Sum sum(m_expression, other);\n      typedef TensorAssignOp<ExpressionType, const Sum> Assign;\n      Assign assign(m_expression, sum);\n      internal::TensorExecutor<const Assign, DeviceType>::run(assign, m_device);\n      return *this;\n    }\n\n    template<typename OtherDerived>\n    EIGEN_STRONG_INLINE TensorDevice& operator-=(const OtherDerived& other) {\n      typedef typename OtherDerived::Scalar Scalar;\n      typedef TensorCwiseBinaryOp<internal::scalar_difference_op<Scalar>, const ExpressionType, const OtherDerived> Difference;\n      Difference difference(m_expression, other);\n      typedef TensorAssignOp<ExpressionType, const Difference> Assign;\n      Assign assign(m_expression, difference);\n      internal::TensorExecutor<const Assign, DeviceType>::run(assign, m_device);\n      return *this;\n    }\n\n  protected:\n    const DeviceType& m_device;\n    ExpressionType& m_expression;\n};\n\n/** \\class TensorAsyncDevice\n * \\ingroup CXX11_Tensor_Module\n *\n * \\brief Pseudo expression providing an operator = that will evaluate its\n * argument asynchronously on the specified device. Currently only\n * ThreadPoolDevice implements proper asynchronous execution, while the default\n * and GPU devices just run the expression synchronously and call m_done() on\n * completion..\n *\n * Example:\n *    auto done = []() { ... expression evaluation done ... };\n *    C.device(thread_pool_device, std::move(done)) = A + B;\n */\n\ntemplate <typename ExpressionType, typename DeviceType, typename DoneCallback>\nclass TensorAsyncDevice {\n public:\n  TensorAsyncDevice(const DeviceType& device, ExpressionType& expression,\n                    DoneCallback done)\n      : m_device(device), m_expression(expression), m_done(std::move(done)) {}\n\n  template <typename OtherDerived>\n  EIGEN_STRONG_INLINE TensorAsyncDevice& operator=(const OtherDerived& other) {\n    typedef TensorAssignOp<ExpressionType, const OtherDerived> Assign;\n    typedef internal::TensorExecutor<const Assign, DeviceType> Executor;\n\n    Assign assign(m_expression, other);\n    Executor::run(assign, m_device);\n    m_done();\n\n    return *this;\n  }\n\n protected:\n  const DeviceType& m_device;\n  ExpressionType& m_expression;\n  DoneCallback m_done;\n};\n\n\n#ifdef EIGEN_USE_THREADS\ntemplate <typename ExpressionType, typename DoneCallback>\nclass TensorAsyncDevice<ExpressionType, ThreadPoolDevice, DoneCallback> {\n public:\n  TensorAsyncDevice(const ThreadPoolDevice& device, ExpressionType& expression,\n                    DoneCallback done)\n      : m_device(device), m_expression(expression), m_done(std::move(done)) {}\n\n  template <typename OtherDerived>\n  EIGEN_STRONG_INLINE TensorAsyncDevice& operator=(const OtherDerived& other) {\n    typedef TensorAssignOp<ExpressionType, const OtherDerived> Assign;\n    typedef internal::TensorAsyncExecutor<const Assign, ThreadPoolDevice, DoneCallback> Executor;\n\n    // WARNING: After assignment 'm_done' callback will be in undefined state.\n    Assign assign(m_expression, other);\n    Executor::runAsync(assign, m_device, std::move(m_done));\n\n    return *this;\n  }\n\n protected:\n  const ThreadPoolDevice& m_device;\n  ExpressionType& m_expression;\n  DoneCallback m_done;\n};\n#endif\n\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_DEVICE_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceCuda.h",
    "content": "\n#if defined(__clang__) || defined(__GNUC__)\n#warning \"Deprecated header file, please either include the main Eigen/CXX11/Tensor header or the respective TensorDeviceGpu.h file\"\n#endif\n\n#include \"TensorDeviceGpu.h\"\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceDefault.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_DEVICE_DEFAULT_H\n#define EIGEN_CXX11_TENSOR_TENSOR_DEVICE_DEFAULT_H\n\n\nnamespace Eigen {\n\n// Default device for the machine (typically a single cpu core)\nstruct DefaultDevice {\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void* allocate(size_t num_bytes) const {\n    return internal::aligned_malloc(num_bytes);\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void deallocate(void* buffer) const {\n    internal::aligned_free(buffer);\n  }\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void* allocate_temp(size_t num_bytes) const {\n    return allocate(num_bytes);\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void deallocate_temp(void* buffer) const {\n    deallocate(buffer);\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void memcpy(void* dst, const void* src, size_t n) const {\n    ::memcpy(dst, src, n);\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void memcpyHostToDevice(void* dst, const void* src, size_t n) const {\n    memcpy(dst, src, n);\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void memcpyDeviceToHost(void* dst, const void* src, size_t n) const {\n    memcpy(dst, src, n);\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void memset(void* buffer, int c, size_t n) const {\n    ::memset(buffer, c, n);\n  }\n  template<typename Type>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Type get(Type data) const { \n    return data;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE size_t numThreads() const {\n#if !defined(EIGEN_GPU_COMPILE_PHASE)\n    // Running on the host CPU\n    return 1;\n#elif defined(EIGEN_HIP_DEVICE_COMPILE)\n    // Running on a HIP device\n    return 64;\n#else\n    // Running on a CUDA device\n    return 32;\n#endif\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE size_t firstLevelCacheSize() const {\n#if !defined(EIGEN_GPU_COMPILE_PHASE) && !defined(SYCL_DEVICE_ONLY)\n    // Running on the host CPU\n    return l1CacheSize();\n#elif defined(EIGEN_HIP_DEVICE_COMPILE)\n    // Running on a HIP device\n    return 48*1024; // FIXME : update this number for HIP\n#else\n    // Running on a CUDA device, return the amount of shared memory available.\n    return 48*1024;\n#endif\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE size_t lastLevelCacheSize() const {\n#if !defined(EIGEN_GPU_COMPILE_PHASE) && !defined(SYCL_DEVICE_ONLY)\n    // Running single threaded on the host CPU\n    return l3CacheSize();\n#elif defined(EIGEN_HIP_DEVICE_COMPILE)\n    // Running on a HIP device\n    return firstLevelCacheSize(); // FIXME : update this number for HIP\n#else\n    // Running on a CUDA device\n    return firstLevelCacheSize();\n#endif\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE int majorDeviceVersion() const {\n#if !defined(EIGEN_GPU_COMPILE_PHASE)\n    // Running single threaded on the host CPU\n    // Should return an enum that encodes the ISA supported by the CPU\n    return 1;\n#elif defined(EIGEN_HIP_DEVICE_COMPILE)\n    // Running on a HIP device\n    // return 1 as major for HIP\n    return 1;\n#else\n    // Running on a CUDA device\n    return EIGEN_CUDA_ARCH / 100;\n#endif\n  }\n};\n\n}  // namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_DEVICE_DEFAULT_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceGpu.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#if defined(EIGEN_USE_GPU) && !defined(EIGEN_CXX11_TENSOR_TENSOR_DEVICE_GPU_H)\n#define EIGEN_CXX11_TENSOR_TENSOR_DEVICE_GPU_H\n\n// This header file container defines fo gpu* macros which will resolve to\n// their equivalent hip* or cuda* versions depending on the compiler in use\n// A separate header (included at the end of this file) will undefine all \n#include \"TensorGpuHipCudaDefines.h\"\n\nnamespace Eigen {\n\nstatic const int kGpuScratchSize = 1024;\n\n// This defines an interface that GPUDevice can take to use\n// HIP / CUDA streams underneath.\nclass StreamInterface {\n public:\n  virtual ~StreamInterface() {}\n\n  virtual const gpuStream_t& stream() const = 0;\n  virtual const gpuDeviceProp_t& deviceProperties() const = 0;\n\n  // Allocate memory on the actual device where the computation will run\n  virtual void* allocate(size_t num_bytes) const = 0;\n  virtual void deallocate(void* buffer) const = 0;\n\n  // Return a scratchpad buffer of size 1k\n  virtual void* scratchpad() const = 0;\n\n  // Return a semaphore. The semaphore is initially initialized to 0, and\n  // each kernel using it is responsible for resetting to 0 upon completion\n  // to maintain the invariant that the semaphore is always equal to 0 upon\n  // each kernel start.\n  virtual unsigned int* semaphore() const = 0;\n};\n\nstatic gpuDeviceProp_t* m_deviceProperties;\nstatic bool m_devicePropInitialized = false;\n\nstatic void initializeDeviceProp() {\n  if (!m_devicePropInitialized) {\n    // Attempts to ensure proper behavior in the case of multiple threads\n    // calling this function simultaneously. This would be trivial to\n    // implement if we could use std::mutex, but unfortunately mutex don't\n    // compile with nvcc, so we resort to atomics and thread fences instead.\n    // Note that if the caller uses a compiler that doesn't support c++11 we\n    // can't ensure that the initialization is thread safe.\n    static std::atomic<bool> first(true);\n    if (first.exchange(false)) {\n      // We're the first thread to reach this point.\n      int num_devices;\n      gpuError_t status = gpuGetDeviceCount(&num_devices);\n      if (status != gpuSuccess) {\n        std::cerr << \"Failed to get the number of GPU devices: \"\n                  << gpuGetErrorString(status)\n                  << std::endl;\n        gpu_assert(status == gpuSuccess);\n      }\n      m_deviceProperties = new gpuDeviceProp_t[num_devices];\n      for (int i = 0; i < num_devices; ++i) {\n        status = gpuGetDeviceProperties(&m_deviceProperties[i], i);\n        if (status != gpuSuccess) {\n          std::cerr << \"Failed to initialize GPU device #\"\n                    << i\n                    << \": \"\n                    << gpuGetErrorString(status)\n                    << std::endl;\n          gpu_assert(status == gpuSuccess);\n        }\n      }\n\n      std::atomic_thread_fence(std::memory_order_release);\n      m_devicePropInitialized = true;\n    } else {\n      // Wait for the other thread to inititialize the properties.\n      while (!m_devicePropInitialized) {\n        std::atomic_thread_fence(std::memory_order_acquire);\n        EIGEN_SLEEP(1000);\n      }\n    }\n  }\n}\n\nstatic const gpuStream_t default_stream = gpuStreamDefault;\n\nclass GpuStreamDevice : public StreamInterface {\n public:\n  // Use the default stream on the current device\n  GpuStreamDevice() : stream_(&default_stream), scratch_(NULL), semaphore_(NULL) {\n    gpuGetDevice(&device_);\n    initializeDeviceProp();\n  }\n  // Use the default stream on the specified device\n  GpuStreamDevice(int device) : stream_(&default_stream), device_(device), scratch_(NULL), semaphore_(NULL) {\n    initializeDeviceProp();\n  }\n  // Use the specified stream. Note that it's the\n  // caller responsibility to ensure that the stream can run on\n  // the specified device. If no device is specified the code\n  // assumes that the stream is associated to the current gpu device.\n  GpuStreamDevice(const gpuStream_t* stream, int device = -1)\n      : stream_(stream), device_(device), scratch_(NULL), semaphore_(NULL) {\n    if (device < 0) {\n      gpuGetDevice(&device_);\n    } else {\n      int num_devices;\n      gpuError_t err = gpuGetDeviceCount(&num_devices);\n      EIGEN_UNUSED_VARIABLE(err)\n      gpu_assert(err == gpuSuccess);\n      gpu_assert(device < num_devices);\n      device_ = device;\n    }\n    initializeDeviceProp();\n  }\n\n  virtual ~GpuStreamDevice() {\n    if (scratch_) {\n      deallocate(scratch_);\n    }\n  }\n\n  const gpuStream_t& stream() const { return *stream_; }\n  const gpuDeviceProp_t& deviceProperties() const {\n    return m_deviceProperties[device_];\n  }\n  virtual void* allocate(size_t num_bytes) const {\n    gpuError_t err = gpuSetDevice(device_);\n    EIGEN_UNUSED_VARIABLE(err)\n    gpu_assert(err == gpuSuccess);\n    void* result;\n    err = gpuMalloc(&result, num_bytes);\n    gpu_assert(err == gpuSuccess);\n    gpu_assert(result != NULL);\n    return result;\n  }\n  virtual void deallocate(void* buffer) const {\n    gpuError_t err = gpuSetDevice(device_);\n    EIGEN_UNUSED_VARIABLE(err)\n    gpu_assert(err == gpuSuccess);\n    gpu_assert(buffer != NULL);\n    err = gpuFree(buffer);\n    gpu_assert(err == gpuSuccess);\n  }\n\n  virtual void* scratchpad() const {\n    if (scratch_ == NULL) {\n      scratch_ = allocate(kGpuScratchSize + sizeof(unsigned int));\n    }\n    return scratch_;\n  }\n\n  virtual unsigned int* semaphore() const {\n    if (semaphore_ == NULL) {\n      char* scratch = static_cast<char*>(scratchpad()) + kGpuScratchSize;\n      semaphore_ = reinterpret_cast<unsigned int*>(scratch);\n      gpuError_t err = gpuMemsetAsync(semaphore_, 0, sizeof(unsigned int), *stream_);\n      EIGEN_UNUSED_VARIABLE(err)\n      gpu_assert(err == gpuSuccess);\n    }\n    return semaphore_;\n  }\n\n private:\n  const gpuStream_t* stream_;\n  int device_;\n  mutable void* scratch_;\n  mutable unsigned int* semaphore_;\n};\n\nstruct GpuDevice {\n  // The StreamInterface is not owned: the caller is\n  // responsible for its initialization and eventual destruction.\n  explicit GpuDevice(const StreamInterface* stream) : stream_(stream), max_blocks_(INT_MAX) {\n    eigen_assert(stream);\n  }\n  explicit GpuDevice(const StreamInterface* stream, int num_blocks) : stream_(stream), max_blocks_(num_blocks) {\n    eigen_assert(stream);\n  }\n  // TODO(bsteiner): This is an internal API, we should not expose it.\n  EIGEN_STRONG_INLINE const gpuStream_t& stream() const {\n    return stream_->stream();\n  }\n\n  EIGEN_STRONG_INLINE void* allocate(size_t num_bytes) const {\n    return stream_->allocate(num_bytes);\n  }\n\n  EIGEN_STRONG_INLINE void deallocate(void* buffer) const {\n    stream_->deallocate(buffer);\n  }\n\n  EIGEN_STRONG_INLINE void* allocate_temp(size_t num_bytes) const {\n    return stream_->allocate(num_bytes);\n  }\n\n  EIGEN_STRONG_INLINE void deallocate_temp(void* buffer) const {\n    stream_->deallocate(buffer);\n  }\n\n  template<typename Type>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Type get(Type data) const { \n    return data;\n  }\n\n  EIGEN_STRONG_INLINE void* scratchpad() const {\n    return stream_->scratchpad();\n  }\n\n  EIGEN_STRONG_INLINE unsigned int* semaphore() const {\n    return stream_->semaphore();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void memcpy(void* dst, const void* src, size_t n) const {\n#ifndef EIGEN_GPU_COMPILE_PHASE\n    gpuError_t err = gpuMemcpyAsync(dst, src, n, gpuMemcpyDeviceToDevice,\n                                      stream_->stream());\n    EIGEN_UNUSED_VARIABLE(err)\n    gpu_assert(err == gpuSuccess);\n#else\n    EIGEN_UNUSED_VARIABLE(dst);\n    EIGEN_UNUSED_VARIABLE(src);\n    EIGEN_UNUSED_VARIABLE(n);\n    eigen_assert(false && \"The default device should be used instead to generate kernel code\");\n#endif\n  }\n\n  EIGEN_STRONG_INLINE void memcpyHostToDevice(void* dst, const void* src, size_t n) const {\n    gpuError_t err =\n        gpuMemcpyAsync(dst, src, n, gpuMemcpyHostToDevice, stream_->stream());\n    EIGEN_UNUSED_VARIABLE(err)\n    gpu_assert(err == gpuSuccess);\n  }\n\n  EIGEN_STRONG_INLINE void memcpyDeviceToHost(void* dst, const void* src, size_t n) const {\n    gpuError_t err =\n        gpuMemcpyAsync(dst, src, n, gpuMemcpyDeviceToHost, stream_->stream());\n    EIGEN_UNUSED_VARIABLE(err)\n    gpu_assert(err == gpuSuccess);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void memset(void* buffer, int c, size_t n) const {\n#ifndef EIGEN_GPU_COMPILE_PHASE\n    gpuError_t err = gpuMemsetAsync(buffer, c, n, stream_->stream());\n    EIGEN_UNUSED_VARIABLE(err)\n    gpu_assert(err == gpuSuccess);\n#else\n  eigen_assert(false && \"The default device should be used instead to generate kernel code\");\n#endif\n  }\n\n  EIGEN_STRONG_INLINE size_t numThreads() const {\n    // FIXME\n    return 32;\n  }\n\n  EIGEN_STRONG_INLINE size_t firstLevelCacheSize() const {\n    // FIXME\n    return 48*1024;\n  }\n\n  EIGEN_STRONG_INLINE size_t lastLevelCacheSize() const {\n    // We won't try to take advantage of the l2 cache for the time being, and\n    // there is no l3 cache on hip/cuda devices.\n    return firstLevelCacheSize();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void synchronize() const {\n#ifndef EIGEN_GPU_COMPILE_PHASE\n    gpuError_t err = gpuStreamSynchronize(stream_->stream());\n    if (err != gpuSuccess) {\n      std::cerr << \"Error detected in GPU stream: \"\n                << gpuGetErrorString(err)\n                << std::endl;\n      gpu_assert(err == gpuSuccess);\n    }\n#else\n    gpu_assert(false && \"The default device should be used instead to generate kernel code\");\n#endif\n  }\n\n  EIGEN_STRONG_INLINE int getNumGpuMultiProcessors() const {\n    return stream_->deviceProperties().multiProcessorCount;\n  }\n  EIGEN_STRONG_INLINE int maxGpuThreadsPerBlock() const {\n    return stream_->deviceProperties().maxThreadsPerBlock;\n  }\n  EIGEN_STRONG_INLINE int maxGpuThreadsPerMultiProcessor() const {\n    return stream_->deviceProperties().maxThreadsPerMultiProcessor;\n  }\n  EIGEN_STRONG_INLINE int sharedMemPerBlock() const {\n    return stream_->deviceProperties().sharedMemPerBlock;\n  }\n  EIGEN_STRONG_INLINE int majorDeviceVersion() const {\n    return stream_->deviceProperties().major;\n  }\n  EIGEN_STRONG_INLINE int minorDeviceVersion() const {\n    return stream_->deviceProperties().minor;\n  }\n\n  EIGEN_STRONG_INLINE int maxBlocks() const {\n    return max_blocks_;\n  }\n\n  // This function checks if the GPU runtime recorded an error for the\n  // underlying stream device.\n  inline bool ok() const {\n#ifdef EIGEN_GPUCC\n    gpuError_t error = gpuStreamQuery(stream_->stream());\n    return (error == gpuSuccess) || (error == gpuErrorNotReady);\n#else\n    return false;\n#endif\n  }\n\n private:\n  const StreamInterface* stream_;\n  int max_blocks_;\n};\n\n#if defined(EIGEN_HIPCC)\n\n#define LAUNCH_GPU_KERNEL(kernel, gridsize, blocksize, sharedmem, device, ...)             \\\n  hipLaunchKernelGGL(kernel, dim3(gridsize), dim3(blocksize), (sharedmem), (device).stream(), __VA_ARGS__); \\\n  gpu_assert(hipGetLastError() == hipSuccess);\n\n#else\n \n#define LAUNCH_GPU_KERNEL(kernel, gridsize, blocksize, sharedmem, device, ...)             \\\n  (kernel) <<< (gridsize), (blocksize), (sharedmem), (device).stream() >>> (__VA_ARGS__);   \\\n  gpu_assert(cudaGetLastError() == cudaSuccess);\n\n#endif\n \n// FIXME: Should be device and kernel specific.\n#ifdef EIGEN_GPUCC\nstatic EIGEN_DEVICE_FUNC inline void setGpuSharedMemConfig(gpuSharedMemConfig config) {\n#ifndef EIGEN_GPU_COMPILE_PHASE\n  gpuError_t status = gpuDeviceSetSharedMemConfig(config);\n  EIGEN_UNUSED_VARIABLE(status)\n  gpu_assert(status == gpuSuccess);\n#else\n  EIGEN_UNUSED_VARIABLE(config)\n#endif\n}\n#endif\n\n}  // end namespace Eigen\n\n// undefine all the gpu* macros we defined at the beginning of the file\n#include \"TensorGpuHipCudaUndefines.h\"\n\n#endif  // EIGEN_CXX11_TENSOR_TENSOR_DEVICE_GPU_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Mehdi Goli    Codeplay Software Ltd.\n// Ralph Potter  Codeplay Software Ltd.\n// Luke Iwanski  Codeplay Software Ltd.\n// Contact: <eigen@codeplay.com>\n// Copyright (C) 2016 Benoit Steiner <benoit.steiner.goog@gmail.com>\n\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#if defined(EIGEN_USE_SYCL) && !defined(EIGEN_CXX11_TENSOR_TENSOR_DEVICE_SYCL_H)\n#define EIGEN_CXX11_TENSOR_TENSOR_DEVICE_SYCL_H\n#include <unordered_set>\n\nnamespace Eigen {\n\nnamespace TensorSycl {\nnamespace internal {\n\n/// Cache all the device information needed\nstruct SyclDeviceInfo {\n  SyclDeviceInfo(cl::sycl::queue queue)\n      : local_mem_type(\n            queue.get_device()\n                .template get_info<cl::sycl::info::device::local_mem_type>()),\n        max_work_item_sizes(\n            queue.get_device()\n                .template get_info<\n                    cl::sycl::info::device::max_work_item_sizes>()),\n        max_mem_alloc_size(\n            queue.get_device()\n                .template get_info<\n                    cl::sycl::info::device::max_mem_alloc_size>()),\n        max_compute_units(queue.get_device()\n                              .template get_info<\n                                  cl::sycl::info::device::max_compute_units>()),\n        max_work_group_size(\n            queue.get_device()\n                .template get_info<\n                    cl::sycl::info::device::max_work_group_size>()),\n        local_mem_size(\n            queue.get_device()\n                .template get_info<cl::sycl::info::device::local_mem_size>()),\n        platform_name(queue.get_device()\n                          .get_platform()\n                          .template get_info<cl::sycl::info::platform::name>()),\n        device_name(queue.get_device()\n                        .template get_info<cl::sycl::info::device::name>()),\n        device_vendor(\n            queue.get_device()\n                .template get_info<cl::sycl::info::device::vendor>()) {}\n\n  cl::sycl::info::local_mem_type local_mem_type;\n  cl::sycl::id<3> max_work_item_sizes;\n  unsigned long max_mem_alloc_size;\n  unsigned long max_compute_units;\n  unsigned long max_work_group_size;\n  size_t local_mem_size;\n  std::string platform_name;\n  std::string device_name;\n  std::string device_vendor;\n};\n\n}  // end namespace internal\n}  // end namespace TensorSycl\n\ntypedef TensorSycl::internal::buffer_data_type_t buffer_scalar_t;\n// All devices (even AMD CPU with intel OpenCL runtime) that support OpenCL and\n// can consume SPIR or SPIRV can use the Eigen SYCL backend and consequently\n// TensorFlow via the Eigen SYCL Backend.\nEIGEN_STRONG_INLINE auto get_sycl_supported_devices()\n    -> decltype(cl::sycl::device::get_devices()) {\n#ifdef EIGEN_SYCL_USE_DEFAULT_SELECTOR\n  return {cl::sycl::device(cl::sycl::default_selector())};\n#else\n  std::vector<cl::sycl::device> supported_devices;\n  auto platform_list = cl::sycl::platform::get_platforms();\n  for (const auto &platform : platform_list) {\n    auto device_list = platform.get_devices();\n    auto platform_name =\n        platform.template get_info<cl::sycl::info::platform::name>();\n    std::transform(platform_name.begin(), platform_name.end(),\n                   platform_name.begin(), ::tolower);\n    for (const auto &device : device_list) {\n      auto vendor = device.template get_info<cl::sycl::info::device::vendor>();\n      std::transform(vendor.begin(), vendor.end(), vendor.begin(), ::tolower);\n      bool unsupported_condition =\n          (device.is_cpu() && platform_name.find(\"amd\") != std::string::npos &&\n           vendor.find(\"apu\") == std::string::npos) ||\n          (platform_name.find(\"experimental\") != std::string::npos) ||\n          device.is_host();\n      if (!unsupported_condition) {\n        supported_devices.push_back(device);\n      }\n    }\n  }\n  return supported_devices;\n#endif\n}\n\nclass QueueInterface {\n public:\n  /// Creating device by using cl::sycl::selector or cl::sycl::device.\n  template <typename DeviceOrSelector>\n  explicit QueueInterface(\n      const DeviceOrSelector &dev_or_sel, cl::sycl::async_handler handler,\n      unsigned num_threads = std::thread::hardware_concurrency())\n      : m_queue(dev_or_sel, handler),\n#ifdef EIGEN_SYCL_USE_PROGRAM_CLASS\n        m_prog(m_queue.get_context(), get_sycl_supported_devices()),\n#endif\n        m_thread_pool(num_threads),\n        m_device_info(m_queue) {\n#ifdef EIGEN_SYCL_USE_PROGRAM_CLASS\n    m_prog.build_with_kernel_type<DeviceOrSelector>();\n    auto f = [&](cl::sycl::handler &cgh) {\n      cgh.single_task<DeviceOrSelector>(m_prog.get_kernel<DeviceOrSelector>(),\n                                        [=]() {})\n    };\n    EIGEN_SYCL_TRY_CATCH(m_queue.submit(f));\n#endif\n  }\n\n  template <typename DeviceOrSelector>\n  explicit QueueInterface(\n      const DeviceOrSelector &dev_or_sel,\n      unsigned num_threads = std::thread::hardware_concurrency())\n      : QueueInterface(dev_or_sel,\n                       [this](cl::sycl::exception_list l) {\n                         this->exception_caught_ = this->sycl_async_handler(l);\n                       },\n                       num_threads) {}\n\n#ifdef EIGEN_SYCL_USE_PROGRAM_CLASS\n  EIGEN_STRONG_INLINE cl::sycl::program &program() const { return m_prog; }\n#endif\n\n  /// Attach an existing buffer to the pointer map, Eigen will not reuse it\n  EIGEN_STRONG_INLINE void *attach_buffer(\n      cl::sycl::buffer<buffer_scalar_t, 1> &buf) const {\n    std::lock_guard<std::mutex> lock(pmapper_mutex_);\n    return static_cast<void *>(pMapper.add_pointer(buf));\n  }\n\n  /// Detach previously attached buffer\n  EIGEN_STRONG_INLINE void detach_buffer(void *p) const {\n    std::lock_guard<std::mutex> lock(pmapper_mutex_);\n    TensorSycl::internal::SYCLfree<false>(p, pMapper);\n  }\n\n  /// Allocating device pointer. This pointer is actually an 8 bytes host\n  /// pointer used as key to access the sycl device buffer. The reason is that\n  /// we cannot use device buffer as a pointer as a m_data in Eigen leafNode\n  /// expressions. So we create a key pointer to be used in Eigen expression\n  /// construction. When we convert the Eigen construction into the sycl\n  /// construction we use this pointer as a key in our buffer_map and we make\n  /// sure that we dedicate only one buffer only for this pointer. The device\n  /// pointer would be deleted by calling deallocate function.\n  EIGEN_STRONG_INLINE void *allocate(size_t num_bytes) const {\n#if EIGEN_MAX_ALIGN_BYTES > 0\n    size_t align = num_bytes % EIGEN_MAX_ALIGN_BYTES;\n    if (align > 0) {\n      num_bytes += EIGEN_MAX_ALIGN_BYTES - align;\n    }\n#endif\n    std::lock_guard<std::mutex> lock(pmapper_mutex_);\n    return TensorSycl::internal::SYCLmalloc(num_bytes, pMapper);\n  }\n\n  EIGEN_STRONG_INLINE void *allocate_temp(size_t num_bytes) const {\n#if EIGEN_MAX_ALIGN_BYTES > 0\n    size_t align = num_bytes % EIGEN_MAX_ALIGN_BYTES;\n    if (align > 0) {\n      num_bytes += EIGEN_MAX_ALIGN_BYTES - align;\n    }\n#endif\n    std::lock_guard<std::mutex> lock(pmapper_mutex_);\n#ifndef EIGEN_SYCL_NO_REUSE_BUFFERS\n    if (scratch_buffers.empty()) {\n      return TensorSycl::internal::SYCLmalloc(num_bytes, pMapper);\n      ;\n    } else {\n      for (auto it = scratch_buffers.begin(); it != scratch_buffers.end();) {\n        auto buff = pMapper.get_buffer(*it);\n        if (buff.get_size() >= num_bytes) {\n          auto ptr = *it;\n          scratch_buffers.erase(it);\n          return ptr;\n        } else {\n          ++it;\n        }\n      }\n      return TensorSycl::internal::SYCLmalloc(num_bytes, pMapper);\n    }\n#else\n    return TensorSycl::internal::SYCLmalloc(num_bytes, pMapper);\n#endif\n  }\n  template <typename data_t>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorSycl::internal::RangeAccess<\n      cl::sycl::access::mode::read_write, data_t>\n  get(data_t *data) const {\n    return get_range_accessor<cl::sycl::access::mode::read_write, data_t>(data);\n  }\n  template <typename data_t>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE data_t *get(\n      TensorSycl::internal::RangeAccess<cl::sycl::access::mode::read_write,\n                                        data_t>\n          data) const {\n    return static_cast<data_t *>(data.get_virtual_pointer());\n  }\n\n  EIGEN_STRONG_INLINE void deallocate_temp(void *p) const {\n    std::lock_guard<std::mutex> lock(pmapper_mutex_);\n#ifndef EIGEN_SYCL_NO_REUSE_BUFFERS\n    scratch_buffers.insert(p);\n#else\n    TensorSycl::internal::SYCLfree(p, pMapper);\n#endif\n  }\n  template <cl::sycl::access::mode AcMd, typename T>\n  EIGEN_STRONG_INLINE void deallocate_temp(\n      const TensorSycl::internal::RangeAccess<AcMd, T> &p) const {\n    deallocate_temp(p.get_virtual_pointer());\n  }\n\n  /// This is used to deallocate the device pointer. p is used as a key inside\n  /// the map to find the device buffer and delete it.\n  EIGEN_STRONG_INLINE void deallocate(void *p) const {\n    std::lock_guard<std::mutex> lock(pmapper_mutex_);\n    TensorSycl::internal::SYCLfree(p, pMapper);\n  }\n\n  EIGEN_STRONG_INLINE void deallocate_all() const {\n    std::lock_guard<std::mutex> lock(pmapper_mutex_);\n    TensorSycl::internal::SYCLfreeAll(pMapper);\n#ifndef EIGEN_SYCL_NO_REUSE_BUFFERS\n    scratch_buffers.clear();\n#endif\n  }\n\n  /// The memcpyHostToDevice is used to copy the data from host to device\n  /// The destination pointer could be deleted before the copy happend which is\n  /// why a callback function is needed. By default if none is provided, the\n  /// function is blocking.\n  EIGEN_STRONG_INLINE void memcpyHostToDevice(\n      void *dst, const void *src, size_t n,\n      std::function<void()> callback) const {\n    static const auto write_mode = cl::sycl::access::mode::discard_write;\n    static const auto global_access = cl::sycl::access::target::global_buffer;\n    typedef cl::sycl::accessor<buffer_scalar_t, 1, write_mode, global_access>\n        write_accessor;\n    if (n == 0) {\n      if (callback) callback();\n      return;\n    }\n    n /= sizeof(buffer_scalar_t);\n    auto f = [&](cl::sycl::handler &cgh) {\n      write_accessor dst_acc = get_range_accessor<write_mode>(cgh, dst, n);\n      buffer_scalar_t const *ptr = static_cast<buffer_scalar_t const *>(src);\n      auto non_deleter = [](buffer_scalar_t const *) {};\n      std::shared_ptr<const buffer_scalar_t> s_ptr(ptr, non_deleter);\n      cgh.copy(s_ptr, dst_acc);\n    };\n    cl::sycl::event e;\n    EIGEN_SYCL_TRY_CATCH(e = m_queue.submit(f));\n    synchronize_and_callback(e, callback);\n  }\n\n  /// The memcpyDeviceToHost is used to copy the data from device to host.\n  /// The source pointer could be deleted before the copy happend which is\n  /// why a callback function is needed. By default if none is provided, the\n  /// function is blocking.\n  EIGEN_STRONG_INLINE void memcpyDeviceToHost(\n      void *dst, const void *src, size_t n,\n      std::function<void()> callback) const {\n    static const auto read_mode = cl::sycl::access::mode::read;\n    static const auto global_access = cl::sycl::access::target::global_buffer;\n    typedef cl::sycl::accessor<buffer_scalar_t, 1, read_mode, global_access>\n        read_accessor;\n    if (n == 0) {\n      if (callback) callback();\n      return;\n    }\n    n /= sizeof(buffer_scalar_t);\n    auto f = [&](cl::sycl::handler &cgh) {\n      read_accessor src_acc = get_range_accessor<read_mode>(cgh, src, n);\n      buffer_scalar_t *ptr = static_cast<buffer_scalar_t *>(dst);\n      auto non_deleter = [](buffer_scalar_t *) {};\n      std::shared_ptr<buffer_scalar_t> s_ptr(ptr, non_deleter);\n      cgh.copy(src_acc, s_ptr);\n    };\n    cl::sycl::event e;\n    EIGEN_SYCL_TRY_CATCH(e = m_queue.submit(f));\n    synchronize_and_callback(e, callback);\n  }\n\n  /// The memcpy function.\n  /// No callback is required here as both arguments are on the device\n  /// and SYCL can handle the dependency.\n  EIGEN_STRONG_INLINE void memcpy(void *dst, const void *src, size_t n) const {\n    static const auto read_mode = cl::sycl::access::mode::read;\n    static const auto write_mode = cl::sycl::access::mode::discard_write;\n    if (n == 0) {\n      return;\n    }\n    n /= sizeof(buffer_scalar_t);\n    auto f = [&](cl::sycl::handler &cgh) {\n      auto src_acc = get_range_accessor<read_mode>(cgh, src, n);\n      auto dst_acc = get_range_accessor<write_mode>(cgh, dst, n);\n      cgh.copy(src_acc, dst_acc);\n    };\n    cl::sycl::event e;\n    EIGEN_SYCL_TRY_CATCH(e = m_queue.submit(f));\n    async_synchronize(e);\n  }\n\n  /// the memset function.\n  /// No callback is required here as both arguments are on the device\n  /// and SYCL can handle the dependency.\n  EIGEN_STRONG_INLINE void memset(void *data, int c, size_t n) const {\n    static const auto write_mode = cl::sycl::access::mode::discard_write;\n    if (n == 0) {\n      return;\n    }\n    n /= sizeof(buffer_scalar_t);\n    auto f = [&](cl::sycl::handler &cgh) {\n      auto dst_acc = get_range_accessor<write_mode>(cgh, data, n);\n      // The cast to uint8_t is here to match the behaviour of the standard\n      // memset. The cast to buffer_scalar_t is needed to match the type of the\n      // accessor (in case buffer_scalar_t is not uint8_t)\n      cgh.fill(dst_acc, static_cast<buffer_scalar_t>(static_cast<uint8_t>(c)));\n    };\n    cl::sycl::event e;\n    EIGEN_SYCL_TRY_CATCH(e = m_queue.submit(f));\n    async_synchronize(e);\n  }\n\n  /// Get a range accessor to the virtual pointer's device memory. This range\n  /// accessor will allow access to the memory from the pointer to the end of\n  /// the buffer.\n  ///\n  /// NOTE: Inside a kernel the range accessor will always be indexed from the\n  /// start of the buffer, so the offset in the accessor is only used by\n  /// methods like handler::copy and will not be available inside a kernel.\n  template <cl::sycl::access::mode AcMd, typename T>\n  EIGEN_STRONG_INLINE TensorSycl::internal::RangeAccess<AcMd, T>\n  get_range_accessor(const void *ptr) const {\n    static const auto global_access = cl::sycl::access::target::global_buffer;\n    static const auto is_place_holder = cl::sycl::access::placeholder::true_t;\n    typedef TensorSycl::internal::RangeAccess<AcMd, T> ret_type;\n    typedef const TensorSycl::internal::buffer_data_type_t *internal_ptr_t;\n\n    std::lock_guard<std::mutex> lock(pmapper_mutex_);\n\n    auto original_buffer = pMapper.get_buffer(ptr);\n    const ptrdiff_t offset = pMapper.get_offset(ptr);\n    const ptrdiff_t typed_offset = offset / sizeof(T);\n    eigen_assert(typed_offset >= 0);\n    const auto typed_size = original_buffer.get_size() / sizeof(T);\n    auto buffer = original_buffer.template reinterpret<\n        typename Eigen::internal::remove_const<T>::type>(\n        cl::sycl::range<1>(typed_size));\n    const ptrdiff_t size = buffer.get_count() - typed_offset;\n    eigen_assert(size >= 0);\n    typedef cl::sycl::accessor<typename Eigen::internal::remove_const<T>::type,\n                               1, AcMd, global_access, is_place_holder>\n        placeholder_accessor_t;\n    const auto start_ptr = static_cast<internal_ptr_t>(ptr) - offset;\n    return ret_type(placeholder_accessor_t(buffer, cl::sycl::range<1>(size),\n                                           cl::sycl::id<1>(typed_offset)),\n                    static_cast<size_t>(typed_offset),\n                    reinterpret_cast<std::intptr_t>(start_ptr));\n  }\n\n  /// Get a range accessor to the virtual pointer's device memory with a\n  /// specified size.\n  template <cl::sycl::access::mode AcMd, typename Index>\n  EIGEN_STRONG_INLINE cl::sycl::accessor<\n      buffer_scalar_t, 1, AcMd, cl::sycl::access::target::global_buffer>\n  get_range_accessor(cl::sycl::handler &cgh, const void *ptr,\n                     const Index n_bytes) const {\n    static const auto global_access = cl::sycl::access::target::global_buffer;\n    eigen_assert(n_bytes >= 0);\n    std::lock_guard<std::mutex> lock(pmapper_mutex_);\n    auto buffer = pMapper.get_buffer(ptr);\n    const ptrdiff_t offset = pMapper.get_offset(ptr);\n    eigen_assert(offset >= 0);\n    eigen_assert(offset + n_bytes <= buffer.get_size());\n    return buffer.template get_access<AcMd, global_access>(\n        cgh, cl::sycl::range<1>(n_bytes), cl::sycl::id<1>(offset));\n  }\n\n  /// Creation of sycl accessor for a buffer. This function first tries to find\n  /// the buffer in the buffer_map. If found it gets the accessor from it, if\n  /// not, the function then adds an entry by creating a sycl buffer for that\n  /// particular pointer.\n  template <cl::sycl::access::mode AcMd>\n  EIGEN_STRONG_INLINE cl::sycl::accessor<\n      buffer_scalar_t, 1, AcMd, cl::sycl::access::target::global_buffer>\n  get_sycl_accessor(cl::sycl::handler &cgh, const void *ptr) const {\n    std::lock_guard<std::mutex> lock(pmapper_mutex_);\n    return pMapper.get_buffer(ptr)\n        .template get_access<AcMd, cl::sycl::access::target::global_buffer>(\n            cgh);\n  }\n\n  EIGEN_STRONG_INLINE cl::sycl::buffer<buffer_scalar_t, 1> get_sycl_buffer(\n      const void *ptr) const {\n    std::lock_guard<std::mutex> lock(pmapper_mutex_);\n    return pMapper.get_buffer(ptr);\n  }\n\n  EIGEN_STRONG_INLINE ptrdiff_t get_offset(const void *ptr) const {\n    std::lock_guard<std::mutex> lock(pmapper_mutex_);\n    return pMapper.get_offset(ptr);\n  }\n\n  template <typename OutScalar, typename sycl_kernel, typename Lhs,\n            typename Rhs, typename OutPtr, typename Range, typename Index,\n            typename... T>\n  EIGEN_ALWAYS_INLINE void binary_kernel_launcher(const Lhs &lhs,\n                                                  const Rhs &rhs, OutPtr outptr,\n                                                  Range thread_range,\n                                                  Index scratchSize,\n                                                  T... var) const {\n    auto kernel_functor = [=](cl::sycl::handler &cgh) {\n      // binding the placeholder accessors to a commandgroup handler\n      lhs.bind(cgh);\n      rhs.bind(cgh);\n      outptr.bind(cgh);\n      typedef cl::sycl::accessor<OutScalar, 1,\n                                 cl::sycl::access::mode::read_write,\n                                 cl::sycl::access::target::local>\n          LocalAccessor;\n\n      LocalAccessor scratch(cl::sycl::range<1>(scratchSize), cgh);\n      cgh.parallel_for(\n#ifdef EIGEN_SYCL_USE_PROGRAM_CLASS\n          program().template get_kernel<sycl_kernel>(),\n#endif\n          thread_range, sycl_kernel(scratch, lhs, rhs, outptr, var...));\n    };\n    cl::sycl::event e;\n    EIGEN_SYCL_TRY_CATCH(e = m_queue.submit(kernel_functor));\n    async_synchronize(e);\n  }\n\n  template <typename OutScalar, typename sycl_kernel, typename InPtr,\n            typename OutPtr, typename Range, typename Index, typename... T>\n  EIGEN_ALWAYS_INLINE void unary_kernel_launcher(const InPtr &inptr,\n                                                 OutPtr &outptr,\n                                                 Range thread_range,\n                                                 Index scratchSize,\n                                                 T... var) const {\n    auto kernel_functor = [=](cl::sycl::handler &cgh) {\n      // binding the placeholder accessors to a commandgroup handler\n      inptr.bind(cgh);\n      outptr.bind(cgh);\n      typedef cl::sycl::accessor<OutScalar, 1,\n                                 cl::sycl::access::mode::read_write,\n                                 cl::sycl::access::target::local>\n          LocalAccessor;\n\n      LocalAccessor scratch(cl::sycl::range<1>(scratchSize), cgh);\n      cgh.parallel_for(\n#ifdef EIGEN_SYCL_USE_PROGRAM_CLASS\n          program().template get_kernel<sycl_kernel>(),\n#endif\n          thread_range, sycl_kernel(scratch, inptr, outptr, var...));\n    };\n    cl::sycl::event e;\n    EIGEN_SYCL_TRY_CATCH(e = m_queue.submit(kernel_functor));\n    async_synchronize(e);\n  }\n\n    template <typename OutScalar, typename sycl_kernel, typename InPtr,\n           typename Range, typename Index, typename... T>\n  EIGEN_ALWAYS_INLINE void nullary_kernel_launcher(const InPtr &inptr,\n                                                 Range thread_range,\n                                                 Index scratchSize,\n                                                 T... var) const {\n    auto kernel_functor = [=](cl::sycl::handler &cgh) {\n      // binding the placeholder accessors to a commandgroup handler\n      inptr.bind(cgh);\n      typedef cl::sycl::accessor<OutScalar, 1,\n                                 cl::sycl::access::mode::read_write,\n                                 cl::sycl::access::target::local>\n          LocalAccessor;\n\n      LocalAccessor scratch(cl::sycl::range<1>(scratchSize), cgh);\n      cgh.parallel_for(\n#ifdef EIGEN_SYCL_USE_PROGRAM_CLASS\n          program().template get_kernel<sycl_kernel>(),\n#endif\n          thread_range, sycl_kernel(scratch, inptr, var...));\n    };\n    cl::sycl::event e;\n    EIGEN_SYCL_TRY_CATCH(e = m_queue.submit(kernel_functor));\n    async_synchronize(e);\n  }\n\n\n  EIGEN_STRONG_INLINE void synchronize() const {\n#ifdef EIGEN_EXCEPTIONS\n    m_queue.wait_and_throw();\n#else\n    m_queue.wait();\n#endif\n  }\n\n\n  EIGEN_STRONG_INLINE void async_synchronize(cl::sycl::event e) const {\n    set_latest_event(e);\n#ifndef EIGEN_SYCL_ASYNC_EXECUTION\n    synchronize();\n#endif\n  }\n\n  template <typename Index>\n  EIGEN_STRONG_INLINE void parallel_for_setup(Index n, Index &tileSize,\n                                              Index &rng, Index &GRange) const {\n    tileSize = static_cast<Index>(getNearestPowerOfTwoWorkGroupSize());\n    tileSize = std::min(static_cast<Index>(EIGEN_SYCL_LOCAL_THREAD_DIM0 *\n                                           EIGEN_SYCL_LOCAL_THREAD_DIM1),\n                        static_cast<Index>(tileSize));\n    rng = n;\n    if (rng == 0) rng = static_cast<Index>(1);\n    GRange = rng;\n    if (tileSize > GRange)\n      tileSize = GRange;\n    else if (GRange > tileSize) {\n      Index xMode = static_cast<Index>(GRange % tileSize);\n      if (xMode != 0) GRange += static_cast<Index>(tileSize - xMode);\n    }\n  }\n\n  /// This is used to prepare the number of threads and also the number of\n  /// threads per block for sycl kernels\n  template <typename Index>\n  EIGEN_STRONG_INLINE void parallel_for_setup(\n      const std::array<Index, 2> &input_dim, cl::sycl::range<2> &global_range,\n      cl::sycl::range<2> &local_range) const {\n    std::array<Index, 2> input_range = input_dim;\n    Index max_workgroup_Size =\n        static_cast<Index>(getNearestPowerOfTwoWorkGroupSize());\n    max_workgroup_Size =\n        std::min(static_cast<Index>(EIGEN_SYCL_LOCAL_THREAD_DIM0 *\n                                    EIGEN_SYCL_LOCAL_THREAD_DIM1),\n                 static_cast<Index>(max_workgroup_Size));\n    Index pow_of_2 = static_cast<Index>(std::log2(max_workgroup_Size));\n    local_range[1] =\n        static_cast<Index>(std::pow(2, static_cast<Index>(pow_of_2 / 2)));\n    input_range[1] = input_dim[1];\n    if (input_range[1] == 0) input_range[1] = static_cast<Index>(1);\n    global_range[1] = input_range[1];\n    if (local_range[1] > global_range[1])\n      local_range[1] = global_range[1];\n    else if (global_range[1] > local_range[1]) {\n      Index xMode = static_cast<Index>(global_range[1] % local_range[1]);\n      if (xMode != 0)\n        global_range[1] += static_cast<Index>(local_range[1] - xMode);\n    }\n    local_range[0] = static_cast<Index>(max_workgroup_Size / local_range[1]);\n    input_range[0] = input_dim[0];\n    if (input_range[0] == 0) input_range[0] = static_cast<Index>(1);\n    global_range[0] = input_range[0];\n    if (local_range[0] > global_range[0])\n      local_range[0] = global_range[0];\n    else if (global_range[0] > local_range[0]) {\n      Index xMode = static_cast<Index>(global_range[0] % local_range[0]);\n      if (xMode != 0)\n        global_range[0] += static_cast<Index>(local_range[0] - xMode);\n    }\n  }\n\n  /// This is used to prepare the number of threads and also the number of\n  /// threads per block for sycl kernels\n  template <typename Index>\n  EIGEN_STRONG_INLINE void parallel_for_setup(\n      const std::array<Index, 3> &input_dim, cl::sycl::range<3> &global_range,\n      cl::sycl::range<3> &local_range) const {\n    std::array<Index, 3> input_range = input_dim;\n    Index max_workgroup_Size =\n        static_cast<Index>(getNearestPowerOfTwoWorkGroupSize());\n    max_workgroup_Size =\n        std::min(static_cast<Index>(EIGEN_SYCL_LOCAL_THREAD_DIM0 *\n                                    EIGEN_SYCL_LOCAL_THREAD_DIM1),\n                 static_cast<Index>(max_workgroup_Size));\n    Index pow_of_2 = static_cast<Index>(std::log2(max_workgroup_Size));\n    local_range[2] =\n        static_cast<Index>(std::pow(2, static_cast<Index>(pow_of_2 / 3)));\n    input_range[2] = input_dim[2];\n    if (input_range[2] == 0) input_range[1] = static_cast<Index>(1);\n    global_range[2] = input_range[2];\n    if (local_range[2] > global_range[2])\n      local_range[2] = global_range[2];\n    else if (global_range[2] > local_range[2]) {\n      Index xMode = static_cast<Index>(global_range[2] % local_range[2]);\n      if (xMode != 0)\n        global_range[2] += static_cast<Index>(local_range[2] - xMode);\n    }\n    pow_of_2 = static_cast<Index>(\n        std::log2(static_cast<Index>(max_workgroup_Size / local_range[2])));\n    local_range[1] =\n        static_cast<Index>(std::pow(2, static_cast<Index>(pow_of_2 / 2)));\n    input_range[1] = input_dim[1];\n    if (input_range[1] == 0) input_range[1] = static_cast<Index>(1);\n    global_range[1] = input_range[1];\n    if (local_range[1] > global_range[1])\n      local_range[1] = global_range[1];\n    else if (global_range[1] > local_range[1]) {\n      Index xMode = static_cast<Index>(global_range[1] % local_range[1]);\n      if (xMode != 0)\n        global_range[1] += static_cast<Index>(local_range[1] - xMode);\n    }\n    local_range[0] = static_cast<Index>(max_workgroup_Size /\n                                        (local_range[1] * local_range[2]));\n    input_range[0] = input_dim[0];\n    if (input_range[0] == 0) input_range[0] = static_cast<Index>(1);\n    global_range[0] = input_range[0];\n    if (local_range[0] > global_range[0])\n      local_range[0] = global_range[0];\n    else if (global_range[0] > local_range[0]) {\n      Index xMode = static_cast<Index>(global_range[0] % local_range[0]);\n      if (xMode != 0)\n        global_range[0] += static_cast<Index>(local_range[0] - xMode);\n    }\n  }\n\n  EIGEN_STRONG_INLINE bool has_local_memory() const {\n#if !defined(EIGEN_SYCL_LOCAL_MEM) && defined(EIGEN_SYCL_NO_LOCAL_MEM)\n    return false;\n#elif defined(EIGEN_SYCL_LOCAL_MEM) && !defined(EIGEN_SYCL_NO_LOCAL_MEM)\n    return true;\n#else\n    return m_device_info.local_mem_type ==\n           cl::sycl::info::local_mem_type::local;\n#endif\n  }\n\n  EIGEN_STRONG_INLINE unsigned long max_buffer_size() const {\n    return m_device_info.max_mem_alloc_size;\n  }\n\n  EIGEN_STRONG_INLINE unsigned long getNumSyclMultiProcessors() const {\n    return m_device_info.max_compute_units;\n  }\n\n  EIGEN_STRONG_INLINE unsigned long maxSyclThreadsPerBlock() const {\n    return m_device_info.max_work_group_size;\n  }\n\n  EIGEN_STRONG_INLINE cl::sycl::id<3> maxWorkItemSizes() const {\n    return m_device_info.max_work_item_sizes;\n  }\n\n  /// No need for sycl it should act the same as CPU version\n  EIGEN_STRONG_INLINE int majorDeviceVersion() const { return 1; }\n\n  EIGEN_STRONG_INLINE unsigned long maxSyclThreadsPerMultiProcessor() const {\n    // OpenCL doesnot have such concept\n    return 2;\n  }\n\n  EIGEN_STRONG_INLINE size_t sharedMemPerBlock() const {\n    return m_device_info.local_mem_size;\n  }\n\n  // This function returns the nearest power of 2 Work-group size which is <=\n  // maximum device workgroup size.\n  EIGEN_STRONG_INLINE size_t getNearestPowerOfTwoWorkGroupSize() const {\n    return getPowerOfTwo(m_device_info.max_work_group_size, false);\n  }\n\n  EIGEN_STRONG_INLINE std::string getPlatformName() const {\n    return m_device_info.platform_name;\n  }\n\n  EIGEN_STRONG_INLINE std::string getDeviceName() const {\n    return m_device_info.device_name;\n  }\n\n  EIGEN_STRONG_INLINE std::string getDeviceVendor() const {\n    return m_device_info.device_vendor;\n  }\n\n  // This function returns the nearest power of 2\n  // if roundup is true returns result>=wgsize\n  // else it return result <= wgsize\n  EIGEN_STRONG_INLINE size_t getPowerOfTwo(size_t wGSize, bool roundUp) const {\n    if (roundUp) --wGSize;\n    wGSize |= (wGSize >> 1);\n    wGSize |= (wGSize >> 2);\n    wGSize |= (wGSize >> 4);\n    wGSize |= (wGSize >> 8);\n    wGSize |= (wGSize >> 16);\n#if EIGEN_ARCH_x86_64 || EIGEN_ARCH_ARM64 || EIGEN_OS_WIN64\n    wGSize |= (wGSize >> 32);\n#endif\n    return ((!roundUp) ? (wGSize - (wGSize >> 1)) : ++wGSize);\n  }\n\n  EIGEN_STRONG_INLINE cl::sycl::queue &sycl_queue() const { return m_queue; }\n\n  // This function checks if the runtime recorded an error for the\n  // underlying stream device.\n  EIGEN_STRONG_INLINE bool ok() const {\n    if (!exception_caught_) {\n      synchronize();\n    }\n    return !exception_caught_;\n  }\n\n  EIGEN_STRONG_INLINE cl::sycl::event get_latest_event() const {\n#ifdef EIGEN_SYCL_STORE_LATEST_EVENT\n    std::lock_guard<std::mutex> lock(event_mutex_);\n    return latest_events_[std::this_thread::get_id()];\n#else\n    eigen_assert(false);\n    return cl::sycl::event();\n#endif\n  }\n\n  // destructor\n  ~QueueInterface() {\n    pMapper.clear();\n#ifndef EIGEN_SYCL_NO_REUSE_BUFFERS\n    scratch_buffers.clear();\n#endif\n  }\n\n protected:\n  EIGEN_STRONG_INLINE void set_latest_event(cl::sycl::event e) const {\n#ifdef EIGEN_SYCL_STORE_LATEST_EVENT\n    std::lock_guard<std::mutex> lock(event_mutex_);\n    latest_events_[std::this_thread::get_id()] = e;\n#else\n    EIGEN_UNUSED_VARIABLE(e);\n#endif\n  }\n\n  void synchronize_and_callback(cl::sycl::event e,\n                                const std::function<void()> &callback) const {\n    set_latest_event(e);\n    if (callback) {\n      auto callback_ = [=]() {\n#ifdef EIGEN_EXCEPTIONS\n        cl::sycl::event(e).wait_and_throw();\n#else\n        cl::sycl::event(e).wait();\n#endif\n        callback();\n      };\n      m_thread_pool.Schedule(std::move(callback_));\n    } else {\n#ifdef EIGEN_EXCEPTIONS\n      m_queue.wait_and_throw();\n#else\n      m_queue.wait();\n#endif\n    }\n  }\n\n  bool sycl_async_handler(cl::sycl::exception_list exceptions) const {\n    bool exception_caught = false;\n    for (const auto &e : exceptions) {\n      if (e) {\n        exception_caught = true;\n        EIGEN_THROW_X(e);\n      }\n    }\n    return exception_caught;\n  }\n\n  /// class members:\n  bool exception_caught_ = false;\n\n  mutable std::mutex pmapper_mutex_;\n\n#ifdef EIGEN_SYCL_STORE_LATEST_EVENT\n  mutable std::mutex event_mutex_;\n  mutable std::unordered_map<std::thread::id, cl::sycl::event> latest_events_;\n#endif\n\n  /// std::map is the container used to make sure that we create only one buffer\n  /// per pointer. The lifespan of the buffer now depends on the lifespan of\n  /// SyclDevice. If a non-read-only pointer is needed to be accessed on the\n  /// host we should manually deallocate it.\n  mutable TensorSycl::internal::PointerMapper pMapper;\n#ifndef EIGEN_SYCL_NO_REUSE_BUFFERS\n  mutable std::unordered_set<void *> scratch_buffers;\n#endif\n  /// sycl queue\n  mutable cl::sycl::queue m_queue;\n#ifdef EIGEN_SYCL_USE_PROGRAM_CLASS\n  mutable cl::sycl::program m_prog;\n#endif\n\n  /// The thread pool is used to wait on events and call callbacks\n  /// asynchronously\n  mutable Eigen::ThreadPool m_thread_pool;\n\n  const TensorSycl::internal::SyclDeviceInfo m_device_info;\n};\n\nstruct SyclDeviceBase {\n  /// QueueInterface is not owned. it is the caller's responsibility to destroy\n  /// it\n  const QueueInterface *m_queue_stream;\n  explicit SyclDeviceBase(const QueueInterface *queue_stream)\n      : m_queue_stream(queue_stream) {}\n  EIGEN_STRONG_INLINE const QueueInterface *queue_stream() const {\n    return m_queue_stream;\n  }\n};\n\n// Here is a sycl device struct which accept the sycl queue interface\n// as an input\nstruct SyclDevice : public SyclDeviceBase {\n  explicit SyclDevice(const QueueInterface *queue_stream)\n      : SyclDeviceBase(queue_stream) {}\n\n  // this is the accessor used to construct the evaluator\n  template <cl::sycl::access::mode AcMd, typename T>\n  EIGEN_STRONG_INLINE TensorSycl::internal::RangeAccess<AcMd, T>\n  get_range_accessor(const void *ptr) const {\n    return queue_stream()->template get_range_accessor<AcMd, T>(ptr);\n  }\n\n  // get sycl accessor\n  template <cl::sycl::access::mode AcMd>\n  EIGEN_STRONG_INLINE cl::sycl::accessor<\n      buffer_scalar_t, 1, AcMd, cl::sycl::access::target::global_buffer>\n  get_sycl_accessor(cl::sycl::handler &cgh, const void *ptr) const {\n    return queue_stream()->template get_sycl_accessor<AcMd>(cgh, ptr);\n  }\n\n  /// Accessing the created sycl device buffer for the device pointer\n  EIGEN_STRONG_INLINE cl::sycl::buffer<buffer_scalar_t, 1> get_sycl_buffer(\n      const void *ptr) const {\n    return queue_stream()->get_sycl_buffer(ptr);\n  }\n\n  /// This is used to prepare the number of threads and also the number of\n  /// threads per block for sycl kernels\n  template <typename Index>\n  EIGEN_STRONG_INLINE void parallel_for_setup(Index n, Index &tileSize,\n                                              Index &rng, Index &GRange) const {\n    queue_stream()->parallel_for_setup(n, tileSize, rng, GRange);\n  }\n\n  /// This is used to prepare the number of threads and also the number of\n  /// threads per block for sycl kernels\n  template <typename Index>\n  EIGEN_STRONG_INLINE void parallel_for_setup(\n      const std::array<Index, 2> &input_dim, cl::sycl::range<2> &global_range,\n      cl::sycl::range<2> &local_range) const {\n    queue_stream()->parallel_for_setup(input_dim, global_range, local_range);\n  }\n\n  /// This is used to prepare the number of threads and also the number of\n  /// threads per block for sycl kernels\n  template <typename Index>\n  EIGEN_STRONG_INLINE void parallel_for_setup(\n      const std::array<Index, 3> &input_dim, cl::sycl::range<3> &global_range,\n      cl::sycl::range<3> &local_range) const {\n    queue_stream()->parallel_for_setup(input_dim, global_range, local_range);\n  }\n\n  /// allocate device memory\n  EIGEN_STRONG_INLINE void *allocate(size_t num_bytes) const {\n    return queue_stream()->allocate(num_bytes);\n  }\n\n  EIGEN_STRONG_INLINE void *allocate_temp(size_t num_bytes) const {\n    return queue_stream()->allocate_temp(num_bytes);\n  }\n\n  /// deallocate device memory\n  EIGEN_STRONG_INLINE void deallocate(void *p) const {\n    queue_stream()->deallocate(p);\n  }\n\n  EIGEN_STRONG_INLINE void deallocate_temp(void *buffer) const {\n    queue_stream()->deallocate_temp(buffer);\n  }\n  template <cl::sycl::access::mode AcMd, typename T>\n  EIGEN_STRONG_INLINE void deallocate_temp(\n      const TensorSycl::internal::RangeAccess<AcMd, T> &buffer) const {\n    queue_stream()->deallocate_temp(buffer);\n  }\n  EIGEN_STRONG_INLINE void deallocate_all() const {\n    queue_stream()->deallocate_all();\n  }\n\n  template <typename data_t>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorSycl::internal::RangeAccess<\n      cl::sycl::access::mode::read_write, data_t>\n  get(data_t *data) const {\n    return queue_stream()->get(data);\n  }\n  template <typename data_t>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE data_t *get(\n      TensorSycl::internal::RangeAccess<cl::sycl::access::mode::read_write,\n                                        data_t>\n          data) const {\n    return queue_stream()->get(data);\n  }\n\n  /// attach existing buffer\n  EIGEN_STRONG_INLINE void *attach_buffer(\n      cl::sycl::buffer<buffer_scalar_t, 1> &buf) const {\n    return queue_stream()->attach_buffer(buf);\n  }\n  /// detach buffer\n  EIGEN_STRONG_INLINE void detach_buffer(void *p) const {\n    queue_stream()->detach_buffer(p);\n  }\n  EIGEN_STRONG_INLINE ptrdiff_t get_offset(const void *ptr) const {\n    return queue_stream()->get_offset(ptr);\n  }\n\n  // some runtime conditions that can be applied here\n  EIGEN_STRONG_INLINE bool isDeviceSuitable() const { return true; }\n\n  /// memcpyHostToDevice\n  template <typename Index>\n  EIGEN_STRONG_INLINE void memcpyHostToDevice(\n      Index *dst, const Index *src, size_t n,\n      std::function<void()> callback = {}) const {\n    queue_stream()->memcpyHostToDevice(dst, src, n, callback);\n  }\n  /// memcpyDeviceToHost\n  template <typename Index>\n  EIGEN_STRONG_INLINE void memcpyDeviceToHost(\n      void *dst, const Index *src, size_t n,\n      std::function<void()> callback = {}) const {\n    queue_stream()->memcpyDeviceToHost(dst, src, n, callback);\n  }\n  /// the memcpy function\n  template <typename Index>\n  EIGEN_STRONG_INLINE void memcpy(void *dst, const Index *src, size_t n) const {\n    queue_stream()->memcpy(dst, src, n);\n  }\n  /// the memset function\n  EIGEN_STRONG_INLINE void memset(void *data, int c, size_t n) const {\n    queue_stream()->memset(data, c, n);\n  }\n  /// returning the sycl queue\n  EIGEN_STRONG_INLINE cl::sycl::queue &sycl_queue() const {\n    return queue_stream()->sycl_queue();\n  }\n#ifdef EIGEN_SYCL_USE_PROGRAM_CLASS\n  EIGEN_STRONG_INLINE cl::sycl::program &program() const {\n    return queue_stream()->program();\n  }\n#endif\n\n  EIGEN_STRONG_INLINE size_t firstLevelCacheSize() const { return 48 * 1024; }\n\n  EIGEN_STRONG_INLINE size_t lastLevelCacheSize() const {\n    // We won't try to take advantage of the l2 cache for the time being, and\n    // there is no l3 cache on sycl devices.\n    return firstLevelCacheSize();\n  }\n  EIGEN_STRONG_INLINE unsigned long getNumSyclMultiProcessors() const {\n    return queue_stream()->getNumSyclMultiProcessors();\n  }\n  EIGEN_STRONG_INLINE unsigned long maxSyclThreadsPerBlock() const {\n    return queue_stream()->maxSyclThreadsPerBlock();\n  }\n  EIGEN_STRONG_INLINE cl::sycl::id<3> maxWorkItemSizes() const {\n    return queue_stream()->maxWorkItemSizes();\n  }\n  EIGEN_STRONG_INLINE unsigned long maxSyclThreadsPerMultiProcessor() const {\n    // OpenCL doesnot have such concept\n    return queue_stream()->maxSyclThreadsPerMultiProcessor();\n  }\n  EIGEN_STRONG_INLINE size_t sharedMemPerBlock() const {\n    return queue_stream()->sharedMemPerBlock();\n  }\n  EIGEN_STRONG_INLINE size_t getNearestPowerOfTwoWorkGroupSize() const {\n    return queue_stream()->getNearestPowerOfTwoWorkGroupSize();\n  }\n\n  EIGEN_STRONG_INLINE size_t getPowerOfTwo(size_t val, bool roundUp) const {\n    return queue_stream()->getPowerOfTwo(val, roundUp);\n  }\n  /// No need for sycl it should act the same as CPU version\n  EIGEN_STRONG_INLINE int majorDeviceVersion() const {\n    return queue_stream()->majorDeviceVersion();\n  }\n\n  EIGEN_STRONG_INLINE void synchronize() const {\n    queue_stream()->synchronize();\n  }\n  EIGEN_STRONG_INLINE void async_synchronize(\n      cl::sycl::event e = cl::sycl::event()) const {\n    queue_stream()->async_synchronize(e);\n  }\n  EIGEN_STRONG_INLINE cl::sycl::event get_latest_event() const {\n    return queue_stream()->get_latest_event();\n  }\n\n  // This function checks if the runtime recorded an error for the\n  // underlying stream device.\n  EIGEN_STRONG_INLINE bool ok() const { return queue_stream()->ok(); }\n\n  EIGEN_STRONG_INLINE bool has_local_memory() const {\n    return queue_stream()->has_local_memory();\n  }\n  EIGEN_STRONG_INLINE long max_buffer_size() const {\n    return queue_stream()->max_buffer_size();\n  }\n  EIGEN_STRONG_INLINE std::string getPlatformName() const {\n    return queue_stream()->getPlatformName();\n  }\n  EIGEN_STRONG_INLINE std::string getDeviceName() const {\n    return queue_stream()->getDeviceName();\n  }\n  EIGEN_STRONG_INLINE std::string getDeviceVendor() const {\n    return queue_stream()->getDeviceVendor();\n  }\n  template <typename OutScalar, typename KernelType, typename... T>\n  EIGEN_ALWAYS_INLINE void binary_kernel_launcher(T... var) const {\n    queue_stream()->template binary_kernel_launcher<OutScalar, KernelType>(\n        var...);\n  }\n  template <typename OutScalar, typename KernelType, typename... T>\n  EIGEN_ALWAYS_INLINE void unary_kernel_launcher(T... var) const {\n    queue_stream()->template unary_kernel_launcher<OutScalar, KernelType>(\n        var...);\n  }\n\n  template <typename OutScalar, typename KernelType, typename... T>\n  EIGEN_ALWAYS_INLINE void nullary_kernel_launcher(T... var) const {\n    queue_stream()->template nullary_kernel_launcher<OutScalar, KernelType>(\n        var...);\n  }\n};\n}  // end namespace Eigen\n\n#endif  // EIGEN_CXX11_TENSOR_TENSOR_DEVICE_SYCL_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceThreadPool.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#if defined(EIGEN_USE_THREADS) && !defined(EIGEN_CXX11_TENSOR_TENSOR_DEVICE_THREAD_POOL_H)\n#define EIGEN_CXX11_TENSOR_TENSOR_DEVICE_THREAD_POOL_H\n\nnamespace Eigen {\n\n// Runs an arbitrary function and then calls Notify() on the passed in\n// Notification.\ntemplate <typename Function, typename... Args> struct FunctionWrapperWithNotification\n{\n  static void run(Notification* n, Function f, Args... args) {\n    f(args...);\n    if (n) {\n      n->Notify();\n    }\n  }\n};\n\ntemplate <typename Function, typename... Args> struct FunctionWrapperWithBarrier\n{\n  static void run(Barrier* b, Function f, Args... args) {\n    f(args...);\n    if (b) {\n      b->Notify();\n    }\n  }\n};\n\ntemplate <typename SyncType>\nstatic EIGEN_STRONG_INLINE void wait_until_ready(SyncType* n) {\n  if (n) {\n    n->Wait();\n  }\n}\n\n// An abstract interface to a device specific memory allocator.\nclass Allocator {\n public:\n  virtual ~Allocator() {}\n  virtual void* allocate(size_t num_bytes) const = 0;\n  virtual void deallocate(void* buffer) const = 0;\n};\n\n// Build a thread pool device on top the an existing pool of threads.\nstruct ThreadPoolDevice {\n  // The ownership of the thread pool remains with the caller.\n  ThreadPoolDevice(ThreadPoolInterface* pool, int num_cores, Allocator* allocator = nullptr)\n      : pool_(pool), num_threads_(num_cores), allocator_(allocator) { }\n\n  EIGEN_STRONG_INLINE void* allocate(size_t num_bytes) const {\n    return allocator_ ? allocator_->allocate(num_bytes)\n        : internal::aligned_malloc(num_bytes);\n  }\n\n  EIGEN_STRONG_INLINE void deallocate(void* buffer) const {\n    if (allocator_) {\n      allocator_->deallocate(buffer);\n    } else {\n      internal::aligned_free(buffer);\n    }\n  }\n\n    EIGEN_STRONG_INLINE void* allocate_temp(size_t num_bytes) const {\n    return allocate(num_bytes);\n  }\n\n  EIGEN_STRONG_INLINE void deallocate_temp(void* buffer) const {\n    deallocate(buffer);\n  }\n\n  template<typename Type>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Type get(Type data) const {\n    return data;\n  }\n\n  EIGEN_STRONG_INLINE void memcpy(void* dst, const void* src, size_t n) const {\n#ifdef __ANDROID__\n    ::memcpy(dst, src, n);\n#else\n    // TODO(rmlarsen): Align blocks on cache lines.\n    // We have observed that going beyond 4 threads usually just wastes\n    // CPU cycles due to the threads competing for memory bandwidth, so we\n    // statically schedule at most 4 block copies here.\n    const size_t kMinBlockSize = 32768;\n    const size_t num_threads = CostModel::numThreads(n, TensorOpCost(1.0, 1.0, 0), 4);\n    if (n <= kMinBlockSize || num_threads < 2) {\n      ::memcpy(dst, src, n);\n    } else {\n      const char* src_ptr = static_cast<const char*>(src);\n      char* dst_ptr = static_cast<char*>(dst);\n      const size_t blocksize = (n + (num_threads - 1)) / num_threads;\n      Barrier barrier(static_cast<int>(num_threads - 1));\n      // Launch the last 3 blocks on worker threads.\n      for (size_t i = 1; i < num_threads; ++i) {\n        enqueue_with_barrier(&barrier, [n, i, src_ptr, dst_ptr, blocksize] {\n          ::memcpy(dst_ptr + i * blocksize, src_ptr + i * blocksize,\n                   numext::mini(blocksize, n - (i * blocksize)));\n        });\n      }\n      // Launch the first block on the main thread.\n      ::memcpy(dst_ptr, src_ptr, blocksize);\n      barrier.Wait();\n    }\n#endif\n  }\n  EIGEN_STRONG_INLINE void memcpyHostToDevice(void* dst, const void* src, size_t n) const {\n    memcpy(dst, src, n);\n  }\n  EIGEN_STRONG_INLINE void memcpyDeviceToHost(void* dst, const void* src, size_t n) const {\n    memcpy(dst, src, n);\n  }\n\n  EIGEN_STRONG_INLINE void memset(void* buffer, int c, size_t n) const {\n    ::memset(buffer, c, n);\n  }\n\n  EIGEN_STRONG_INLINE int numThreads() const {\n    return num_threads_;\n  }\n\n  // Number of theads available in the underlying thread pool. This number can\n  // be different from the value returned by numThreads().\n  EIGEN_STRONG_INLINE int numThreadsInPool() const {\n    return pool_->NumThreads();\n  }\n\n  EIGEN_STRONG_INLINE size_t firstLevelCacheSize() const {\n    return l1CacheSize();\n  }\n\n  EIGEN_STRONG_INLINE size_t lastLevelCacheSize() const {\n    // The l3 cache size is shared between all the cores.\n    return l3CacheSize() / num_threads_;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE int majorDeviceVersion() const {\n    // Should return an enum that encodes the ISA supported by the CPU\n    return 1;\n  }\n\n  template <class Function, class... Args>\n  EIGEN_STRONG_INLINE Notification* enqueue(Function&& f,\n                                            Args&&... args) const {\n    Notification* n = new Notification();\n    pool_->Schedule(\n        std::bind(&FunctionWrapperWithNotification<Function, Args...>::run, n,\n                  std::move(f), args...));\n    return n;\n  }\n\n  template <class Function, class... Args>\n  EIGEN_STRONG_INLINE void enqueue_with_barrier(Barrier* b, Function&& f,\n                                                Args&&... args) const {\n    pool_->Schedule(\n        std::bind(&FunctionWrapperWithBarrier<Function, Args...>::run, b,\n                  std::move(f), args...));\n  }\n\n  template <class Function, class... Args>\n  EIGEN_STRONG_INLINE void enqueueNoNotification(Function&& f,\n                                                 Args&&... args) const {\n    if (sizeof...(args) > 0) {\n      pool_->Schedule(std::bind(std::move(f), args...));\n    } else {\n      pool_->Schedule(std::move(f));\n    }\n  }\n\n  // Returns a logical thread index between 0 and pool_->NumThreads() - 1 if\n  // called from one of the threads in pool_. Returns -1 otherwise.\n  EIGEN_STRONG_INLINE int currentThreadId() const {\n    return pool_->CurrentThreadId();\n  }\n\n  // WARNING: This function is synchronous and will block the calling thread.\n  //\n  // Synchronous parallelFor executes f with [0, n) arguments in parallel and\n  // waits for completion. F accepts a half-open interval [first, last). Block\n  // size is chosen based on the iteration cost and resulting parallel\n  // efficiency. If block_align is not nullptr, it is called to round up the\n  // block size.\n  void parallelFor(Index n, const TensorOpCost& cost,\n                   std::function<Index(Index)> block_align,\n                   std::function<void(Index, Index)> f) const {\n    // Compute small problems directly in the caller thread.\n    if (n <= 1 || numThreads() == 1 ||\n        CostModel::numThreads(n, cost, static_cast<int>(numThreads())) == 1) {\n      f(0, n);\n      return;\n    }\n\n    // Compute block size and total count of blocks.\n    ParallelForBlock block = CalculateParallelForBlock(n, cost, block_align);\n\n    // Recursively divide size into halves until we reach block_size.\n    // Division code rounds mid to block_size, so we are guaranteed to get\n    // block_count leaves that do actual computations.\n    Barrier barrier(static_cast<unsigned int>(block.count));\n    std::function<void(Index, Index)> handleRange;\n    handleRange = [=, &handleRange, &barrier, &f](Index firstIdx,\n                                                  Index lastIdx) {\n      while (lastIdx - firstIdx > block.size) {\n        // Split into halves and schedule the second half on a different thread.\n        const Index midIdx = firstIdx + divup((lastIdx - firstIdx) / 2, block.size) * block.size;\n        pool_->Schedule([=, &handleRange]() { handleRange(midIdx, lastIdx); });\n        lastIdx = midIdx;\n      }\n      // Single block or less, execute directly.\n      f(firstIdx, lastIdx);\n      barrier.Notify();\n    };\n\n    if (block.count <= numThreads()) {\n      // Avoid a thread hop by running the root of the tree and one block on the\n      // main thread.\n      handleRange(0, n);\n    } else {\n      // Execute the root in the thread pool to avoid running work on more than\n      // numThreads() threads.\n      pool_->Schedule([=, &handleRange]() { handleRange(0, n); });\n    }\n\n    barrier.Wait();\n  }\n\n  // Convenience wrapper for parallelFor that does not align blocks.\n  void parallelFor(Index n, const TensorOpCost& cost,\n                   std::function<void(Index, Index)> f) const {\n    parallelFor(n, cost, nullptr, std::move(f));\n  }\n\n  // WARNING: This function is asynchronous and will not block the calling thread.\n  //\n  // Asynchronous parallelFor executes f with [0, n) arguments in parallel\n  // without waiting for completion. When the last block finished, it will call\n  // 'done' callback. F accepts a half-open interval [first, last). Block size\n  // is chosen based on the iteration cost and resulting parallel efficiency. If\n  // block_align is not nullptr, it is called to round up the block size.\n  void parallelForAsync(Index n, const TensorOpCost& cost,\n                        std::function<Index(Index)> block_align,\n                        std::function<void(Index, Index)> f,\n                        std::function<void()> done) const {\n    // Compute small problems directly in the caller thread.\n    if (n <= 1 || numThreads() == 1 ||\n        CostModel::numThreads(n, cost, static_cast<int>(numThreads())) == 1) {\n      f(0, n);\n      done();\n      return;\n    }\n\n    // Compute block size and total count of blocks.\n    ParallelForBlock block = CalculateParallelForBlock(n, cost, block_align);\n\n    ParallelForAsyncContext* const ctx =\n        new ParallelForAsyncContext(block.count, std::move(f), std::move(done));\n\n    // Recursively divide size into halves until we reach block_size.\n    // Division code rounds mid to block_size, so we are guaranteed to get\n    // block_count leaves that do actual computations.\n    ctx->handle_range = [this, ctx, block](Index firstIdx, Index lastIdx) {\n      while (lastIdx - firstIdx > block.size) {\n        // Split into halves and schedule the second half on a different thread.\n        const Index midIdx = firstIdx + divup((lastIdx - firstIdx) / 2, block.size) * block.size;\n        pool_->Schedule(\n            [ctx, midIdx, lastIdx]() { ctx->handle_range(midIdx, lastIdx); });\n        lastIdx = midIdx;\n      }\n\n      // Single block or less, execute directly.\n      ctx->f(firstIdx, lastIdx);\n\n      // Delete async context if it was the last block.\n      if (ctx->count.fetch_sub(1) == 1) delete ctx;\n    };\n\n    if (block.count <= numThreads()) {\n      // Avoid a thread hop by running the root of the tree and one block on the\n      // main thread.\n      ctx->handle_range(0, n);\n    } else {\n      // Execute the root in the thread pool to avoid running work on more than\n      // numThreads() threads.\n      pool_->Schedule([ctx, n]() { ctx->handle_range(0, n); });\n    }\n  }\n\n  // Convenience wrapper for parallelForAsync that does not align blocks.\n  void parallelForAsync(Index n, const TensorOpCost& cost,\n                        std::function<void(Index, Index)> f,\n                        std::function<void()> done) const {\n    parallelForAsync(n, cost, nullptr, std::move(f), std::move(done));\n  }\n\n  // Thread pool accessor.\n  ThreadPoolInterface* getPool() const { return pool_; }\n\n  // Allocator accessor.\n  Allocator* allocator() const { return allocator_; }\n\n private:\n  typedef TensorCostModel<ThreadPoolDevice> CostModel;\n\n  // For parallelForAsync we must keep passed in closures on the heap, and\n  // delete them only after `done` callback finished.\n  struct ParallelForAsyncContext {\n    ParallelForAsyncContext(Index block_count,\n                            std::function<void(Index, Index)> block_f,\n                            std::function<void()> done_callback)\n        : count(block_count),\n          f(std::move(block_f)),\n          done(std::move(done_callback)) {}\n    ~ParallelForAsyncContext() { done(); }\n\n    std::atomic<Index> count;\n    std::function<void(Index, Index)> f;\n    std::function<void()> done;\n\n    std::function<void(Index, Index)> handle_range;\n  };\n\n  struct ParallelForBlock {\n    Index size;   // block size\n    Index count;  // number of blocks\n  };\n\n  // Calculates block size based on (1) the iteration cost and (2) parallel\n  // efficiency. We want blocks to be not too small to mitigate parallelization\n  // overheads; not too large to mitigate tail effect and potential load\n  // imbalance and we also want number of blocks to be evenly dividable across\n  // threads.\n  ParallelForBlock CalculateParallelForBlock(\n      const Index n, const TensorOpCost& cost,\n      std::function<Index(Index)> block_align) const {\n    const double block_size_f = 1.0 / CostModel::taskSize(1, cost);\n    const Index max_oversharding_factor = 4;\n    Index block_size = numext::mini(\n        n, numext::maxi<Index>(\n               divup<Index>(n, max_oversharding_factor * numThreads()),\n               block_size_f));\n    const Index max_block_size = numext::mini(n, 2 * block_size);\n\n    if (block_align) {\n      Index new_block_size = block_align(block_size);\n      eigen_assert(new_block_size >= block_size);\n      block_size = numext::mini(n, new_block_size);\n    }\n\n    Index block_count = divup(n, block_size);\n\n    // Calculate parallel efficiency as fraction of total CPU time used for\n    // computations:\n    double max_efficiency =\n        static_cast<double>(block_count) /\n        (divup<int>(block_count, numThreads()) * numThreads());\n\n    // Now try to increase block size up to max_block_size as long as it\n    // doesn't decrease parallel efficiency.\n    for (Index prev_block_count = block_count;\n         max_efficiency < 1.0 && prev_block_count > 1;) {\n      // This is the next block size that divides size into a smaller number\n      // of blocks than the current block_size.\n      Index coarser_block_size = divup(n, prev_block_count - 1);\n      if (block_align) {\n        Index new_block_size = block_align(coarser_block_size);\n        eigen_assert(new_block_size >= coarser_block_size);\n        coarser_block_size = numext::mini(n, new_block_size);\n      }\n      if (coarser_block_size > max_block_size) {\n        break;  // Reached max block size. Stop.\n      }\n      // Recalculate parallel efficiency.\n      const Index coarser_block_count = divup(n, coarser_block_size);\n      eigen_assert(coarser_block_count < prev_block_count);\n      prev_block_count = coarser_block_count;\n      const double coarser_efficiency =\n          static_cast<double>(coarser_block_count) /\n          (divup<int>(coarser_block_count, numThreads()) * numThreads());\n      if (coarser_efficiency + 0.01 >= max_efficiency) {\n        // Taking it.\n        block_size = coarser_block_size;\n        block_count = coarser_block_count;\n        if (max_efficiency < coarser_efficiency) {\n          max_efficiency = coarser_efficiency;\n        }\n      }\n    }\n\n    return {block_size, block_count};\n  }\n\n  ThreadPoolInterface* pool_;\n  int num_threads_;\n  Allocator* allocator_;\n};\n\n\n}  // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_DEVICE_THREAD_POOL_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDimensionList.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_DIMENSION_LIST_H\n#define EIGEN_CXX11_TENSOR_TENSOR_DIMENSION_LIST_H\n\nnamespace Eigen {\n\n/** \\internal\n  *\n  * \\class TensorDimensionList\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief Special case of tensor index list used to list all the dimensions of a tensor of rank n.\n  *\n  * \\sa Tensor\n  */\n\ntemplate <typename Index, std::size_t Rank> struct DimensionList {\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\n  const Index operator[] (const Index i) const { return i; }\n};\n\nnamespace internal {\n\ntemplate<typename Index, std::size_t Rank> struct array_size<DimensionList<Index, Rank> > {\n  static const size_t value = Rank;\n};\ntemplate<typename Index, std::size_t Rank> struct array_size<const DimensionList<Index, Rank> > {\n  static const size_t value = Rank;\n};\n\ntemplate<DenseIndex n, typename Index, std::size_t Rank> const Index array_get(DimensionList<Index, Rank>&) {\n  return n;\n}\ntemplate<DenseIndex n, typename Index, std::size_t Rank> const Index array_get(const DimensionList<Index, Rank>&) {\n  return n;\n}\n\n\n#if EIGEN_HAS_CONSTEXPR\ntemplate <typename Index, std::size_t Rank>\nstruct index_known_statically_impl<DimensionList<Index, Rank> > {\n  EIGEN_DEVICE_FUNC static constexpr bool run(const DenseIndex) {\n    return true;\n  }\n};\ntemplate <typename Index, std::size_t Rank>\nstruct index_known_statically_impl<const DimensionList<Index, Rank> > {\n  EIGEN_DEVICE_FUNC static constexpr bool run(const DenseIndex) {\n    return true;\n  }\n};\n\ntemplate <typename Index, std::size_t Rank>\nstruct all_indices_known_statically_impl<DimensionList<Index, Rank> > {\n  EIGEN_DEVICE_FUNC static constexpr bool run() {\n    return true;\n  }\n};\ntemplate <typename Index, std::size_t Rank>\nstruct all_indices_known_statically_impl<const DimensionList<Index, Rank> > {\n  EIGEN_DEVICE_FUNC static constexpr bool run() {\n    return true;\n  }\n};\n\ntemplate <typename Index, std::size_t Rank>\nstruct indices_statically_known_to_increase_impl<DimensionList<Index, Rank> > {\n  EIGEN_DEVICE_FUNC static constexpr bool run() {\n    return true;\n  }\n};\ntemplate <typename Index, std::size_t Rank>\nstruct indices_statically_known_to_increase_impl<const DimensionList<Index, Rank> > {\n  EIGEN_DEVICE_FUNC static constexpr bool run() {\n    return true;\n  }\n};\n\ntemplate <typename Index, std::size_t Rank>\nstruct index_statically_eq_impl<DimensionList<Index, Rank> > {\n  static constexpr bool run(const DenseIndex i, const DenseIndex value) {\n    return i == value;\n  }\n};\ntemplate <typename Index, std::size_t Rank>\nstruct index_statically_eq_impl<const DimensionList<Index, Rank> > {\n  EIGEN_DEVICE_FUNC static constexpr bool run(const DenseIndex i, const DenseIndex value) {\n    return i == value;\n  }\n};\n\ntemplate <typename Index, std::size_t Rank>\nstruct index_statically_ne_impl<DimensionList<Index, Rank> > {\n  EIGEN_DEVICE_FUNC static constexpr bool run(const DenseIndex i, const DenseIndex value) {\n    return i != value;\n  }\n};\ntemplate <typename Index, std::size_t Rank>\nstruct index_statically_ne_impl<const DimensionList<Index, Rank> > {\n  static constexpr bool run(const DenseIndex i, const DenseIndex value) {\n    return i != value;\n  }\n};\n\ntemplate <typename Index, std::size_t Rank>\nstruct index_statically_gt_impl<DimensionList<Index, Rank> > {\n  EIGEN_DEVICE_FUNC static constexpr bool run(const DenseIndex i, const DenseIndex value) {\n    return i > value;\n  }\n};\ntemplate <typename Index, std::size_t Rank>\nstruct index_statically_gt_impl<const DimensionList<Index, Rank> > {\n  EIGEN_DEVICE_FUNC static constexpr bool run(const DenseIndex i, const DenseIndex value) {\n    return i > value;\n  }\n};\n\ntemplate <typename Index, std::size_t Rank>\nstruct index_statically_lt_impl<DimensionList<Index, Rank> > {\n  EIGEN_DEVICE_FUNC static constexpr bool run(const DenseIndex i, const DenseIndex value) {\n    return i < value;\n  }\n};\ntemplate <typename Index, std::size_t Rank>\nstruct index_statically_lt_impl<const DimensionList<Index, Rank> > {\n  EIGEN_DEVICE_FUNC static constexpr bool run(const DenseIndex i, const DenseIndex value) {\n    return i < value;\n  }\n};\n\n#else\ntemplate <typename Index, std::size_t Rank>\nstruct index_known_statically_impl<DimensionList<Index, Rank> > {\n  EIGEN_DEVICE_FUNC static EIGEN_ALWAYS_INLINE bool run(const DenseIndex) {\n    return true;\n  }\n};\ntemplate <typename Index, std::size_t Rank>\nstruct index_known_statically_impl<const DimensionList<Index, Rank> > {\n  EIGEN_DEVICE_FUNC static EIGEN_ALWAYS_INLINE bool run(const DenseIndex) {\n    return true;\n  }\n};\n\ntemplate <typename Index, std::size_t Rank>\nstruct all_indices_known_statically_impl<DimensionList<Index, Rank> > {\n  EIGEN_DEVICE_FUNC static EIGEN_ALWAYS_INLINE bool run() {\n    return true;\n  }\n};\ntemplate <typename Index, std::size_t Rank>\nstruct all_indices_known_statically_impl<const DimensionList<Index, Rank> > {\n  EIGEN_DEVICE_FUNC static EIGEN_ALWAYS_INLINE bool run() {\n    return true;\n  }\n};\n\ntemplate <typename Index, std::size_t Rank>\nstruct indices_statically_known_to_increase_impl<DimensionList<Index, Rank> > {\n  static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run() {\n    return true;\n  }\n};\ntemplate <typename Index, std::size_t Rank>\nstruct indices_statically_known_to_increase_impl<const DimensionList<Index, Rank> > {\n  static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run() {\n    return true;\n  }\n};\n\ntemplate <typename Index, std::size_t Rank>\nstruct index_statically_eq_impl<DimensionList<Index, Rank> > {\n  static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(const DenseIndex, const DenseIndex) {\n    return false;\n  }\n};\ntemplate <typename Index, std::size_t Rank>\nstruct index_statically_eq_impl<const DimensionList<Index, Rank> > {\n  static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(const DenseIndex, const DenseIndex) {\n    return false;\n  }\n};\n\ntemplate <typename Index, std::size_t Rank>\nstruct index_statically_ne_impl<DimensionList<Index, Rank> > {\n  static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(const DenseIndex, const DenseIndex){\n    return false;\n  }\n};\ntemplate <typename Index, std::size_t Rank>\nstruct index_statically_ne_impl<const DimensionList<Index, Rank> > {\n  static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(const DenseIndex, const DenseIndex) {\n    return false;\n  }\n};\n\ntemplate <typename Index, std::size_t Rank>\nstruct index_statically_gt_impl<DimensionList<Index, Rank> > {\n  static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(const DenseIndex, const DenseIndex) {\n    return false;\n  }\n};\ntemplate <typename Index, std::size_t Rank>\nstruct index_statically_gt_impl<const DimensionList<Index, Rank> > {\n  static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(const DenseIndex, const DenseIndex) {\n    return false;\n  }\n};\n\ntemplate <typename Index, std::size_t Rank>\nstruct index_statically_lt_impl<DimensionList<Index, Rank> > {\n  static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(const DenseIndex, const DenseIndex) {\n    return false;\n  }\n};\ntemplate <typename Index, std::size_t Rank>\nstruct index_statically_lt_impl<const DimensionList<Index, Rank> > {\n  static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(const DenseIndex, const DenseIndex) {\n    return false;\n  }\n};\n#endif\n\n}  // end namespace internal\n}  // end namespace Eigen\n\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_DIMENSION_LIST_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_DIMENSIONS_H\n#define EIGEN_CXX11_TENSOR_TENSOR_DIMENSIONS_H\n\n\nnamespace Eigen {\n\n/** \\internal\n  *\n  * \\class TensorDimensions\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief Set of classes used to encode and store the dimensions of a Tensor.\n  *\n  * The Sizes class encodes as part of the type the number of dimensions and the\n  * sizes corresponding to each dimension. It uses no storage space since it is\n  * entirely known at compile time.\n  * The DSizes class is its dynamic sibling: the number of dimensions is known\n  * at compile time but the sizes are set during execution.\n  *\n  * \\sa Tensor\n  */\n\n// Boilerplate code\nnamespace internal {\n\ntemplate<std::ptrdiff_t n, typename Dimension> struct dget {\n  static const std::ptrdiff_t value = get<n, Dimension>::value;\n};\n\n\ntemplate<typename Index, std::ptrdiff_t NumIndices, std::ptrdiff_t n, bool RowMajor>\nstruct fixed_size_tensor_index_linearization_helper\n{\n  template <typename Dimensions> EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE Index run(array<Index, NumIndices> const& indices,\n                          const Dimensions& dimensions)\n  {\n    return array_get<RowMajor ? n - 1 : (NumIndices - n)>(indices) +\n        dget<RowMajor ? n - 1 : (NumIndices - n), Dimensions>::value *\n        fixed_size_tensor_index_linearization_helper<Index, NumIndices, n - 1, RowMajor>::run(indices, dimensions);\n  }\n};\n\ntemplate<typename Index, std::ptrdiff_t NumIndices, bool RowMajor>\nstruct fixed_size_tensor_index_linearization_helper<Index, NumIndices, 0, RowMajor>\n{\n  template <typename Dimensions> EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE Index run(array<Index, NumIndices> const&, const Dimensions&)\n  {\n    return 0;\n  }\n};\n\ntemplate<typename Index, std::ptrdiff_t n>\nstruct fixed_size_tensor_index_extraction_helper\n{\n  template <typename Dimensions> EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE Index run(const Index index,\n                          const Dimensions& dimensions)\n  {\n    const Index mult = (index == n-1) ? 1 : 0;\n    return array_get<n-1>(dimensions) * mult +\n        fixed_size_tensor_index_extraction_helper<Index, n - 1>::run(index, dimensions);\n  }\n};\n\ntemplate<typename Index>\nstruct fixed_size_tensor_index_extraction_helper<Index, 0>\n{\n  template <typename Dimensions> EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE Index run(const Index,\n                          const Dimensions&)\n  {\n    return 0;\n  }\n  };\n\n}  // end namespace internal\n\n\n// Fixed size\n#ifndef EIGEN_EMULATE_CXX11_META_H\ntemplate <typename std::ptrdiff_t... Indices>\nstruct Sizes {\n  typedef internal::numeric_list<std::ptrdiff_t, Indices...> Base;\n  const Base t = Base();\n  static const std::ptrdiff_t total_size = internal::arg_prod(Indices...);\n  static const ptrdiff_t count = Base::count;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::ptrdiff_t rank() const {\n    return Base::count;\n  }\n\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::ptrdiff_t TotalSize() {\n    return internal::arg_prod(Indices...);\n  }\n\n  EIGEN_DEVICE_FUNC Sizes() { }\n  template <typename DenseIndex>\n  explicit EIGEN_DEVICE_FUNC Sizes(const array<DenseIndex, Base::count>& /*indices*/) {\n    // todo: add assertion\n  }\n#if EIGEN_HAS_VARIADIC_TEMPLATES\n  template <typename... DenseIndex> EIGEN_DEVICE_FUNC Sizes(DenseIndex...) { }\n  explicit EIGEN_DEVICE_FUNC Sizes(std::initializer_list<std::ptrdiff_t> /*l*/) {\n    // todo: add assertion\n  }\n#endif\n\n  template <typename T> Sizes& operator = (const T& /*other*/) {\n    // add assertion failure if the size of other is different\n    return *this;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::ptrdiff_t operator[] (const std::ptrdiff_t index) const {\n    return internal::fixed_size_tensor_index_extraction_helper<std::ptrdiff_t, Base::count>::run(index, t);\n  }\n\n  template <typename DenseIndex> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  ptrdiff_t IndexOfColMajor(const array<DenseIndex, Base::count>& indices) const {\n    return internal::fixed_size_tensor_index_linearization_helper<DenseIndex, Base::count, Base::count, false>::run(indices, t);\n  }\n  template <typename DenseIndex> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  ptrdiff_t IndexOfRowMajor(const array<DenseIndex, Base::count>& indices) const {\n    return internal::fixed_size_tensor_index_linearization_helper<DenseIndex, Base::count, Base::count, true>::run(indices, t);\n  }\n};\n\nnamespace internal {\ntemplate <typename std::ptrdiff_t... Indices>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::ptrdiff_t array_prod(const Sizes<Indices...>&) {\n  return Sizes<Indices...>::total_size;\n}\n}\n\n#else\n\ntemplate <std::ptrdiff_t n>\nstruct non_zero_size {\n  typedef internal::type2val<std::ptrdiff_t, n> type;\n};\ntemplate <>\nstruct non_zero_size<0> {\n  typedef internal::null_type type;\n};\n\ntemplate <std::ptrdiff_t V1=0, std::ptrdiff_t V2=0, std::ptrdiff_t V3=0, std::ptrdiff_t V4=0, std::ptrdiff_t V5=0> struct Sizes {\n  typedef typename internal::make_type_list<typename non_zero_size<V1>::type, typename non_zero_size<V2>::type, typename non_zero_size<V3>::type, typename non_zero_size<V4>::type, typename non_zero_size<V5>::type >::type Base;\n  static const std::ptrdiff_t count = Base::count;\n  static const std::ptrdiff_t total_size = internal::arg_prod<Base>::value;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ptrdiff_t rank() const {\n    return count;\n  }\n\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ptrdiff_t TotalSize() {\n    return internal::arg_prod<Base>::value;\n  }\n\n  Sizes() { }\n  template <typename DenseIndex>\n  explicit Sizes(const array<DenseIndex, Base::count>& /*indices*/) {\n    // todo: add assertion\n  }\n  template <typename T> Sizes& operator = (const T& /*other*/) {\n    // add assertion failure if the size of other is different\n    return *this;\n  }\n\n#if EIGEN_HAS_VARIADIC_TEMPLATES\n  template <typename... DenseIndex> Sizes(DenseIndex... /*indices*/) { }\n  explicit Sizes(std::initializer_list<std::ptrdiff_t>) {\n    // todo: add assertion\n  }\n#else\n  EIGEN_DEVICE_FUNC explicit Sizes(const DenseIndex) {\n  }\n  EIGEN_DEVICE_FUNC Sizes(const DenseIndex, const DenseIndex) {\n  }\n  EIGEN_DEVICE_FUNC Sizes(const DenseIndex, const DenseIndex, const DenseIndex) {\n  }\n  EIGEN_DEVICE_FUNC Sizes(const DenseIndex, const DenseIndex, const DenseIndex, const DenseIndex) {\n  }\n  EIGEN_DEVICE_FUNC Sizes(const DenseIndex, const DenseIndex, const DenseIndex, const DenseIndex, const DenseIndex) {\n  }\n#endif\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index operator[] (const Index index) const {\n    switch (index) {\n      case 0:\n        return internal::get<0, Base>::value;\n      case 1:\n        return internal::get<1, Base>::value;\n      case 2:\n        return internal::get<2, Base>::value;\n      case 3:\n        return internal::get<3, Base>::value;\n      case 4:\n        return internal::get<4, Base>::value;\n      default:\n        eigen_assert(false && \"index overflow\");\n        return static_cast<Index>(-1);\n    }\n  }\n\n  template <typename DenseIndex> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  ptrdiff_t IndexOfColMajor(const array<DenseIndex, Base::count>& indices) const {\n    return internal::fixed_size_tensor_index_linearization_helper<DenseIndex, Base::count, Base::count, false>::run(indices, *reinterpret_cast<const Base*>(this));\n  }\n  template <typename DenseIndex> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  ptrdiff_t IndexOfRowMajor(const array<DenseIndex, Base::count>& indices) const {\n    return internal::fixed_size_tensor_index_linearization_helper<DenseIndex, Base::count, Base::count, true>::run(indices, *reinterpret_cast<const Base*>(this));\n  }\n};\n\nnamespace internal {\ntemplate <std::ptrdiff_t V1, std::ptrdiff_t V2, std::ptrdiff_t V3, std::ptrdiff_t V4, std::ptrdiff_t V5>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::ptrdiff_t array_prod(const Sizes<V1, V2, V3, V4, V5>&) {\n  return Sizes<V1, V2, V3, V4, V5>::total_size;\n}\n}\n\n#endif\n\n// Boilerplate\nnamespace internal {\ntemplate<typename Index, std::ptrdiff_t NumIndices, std::ptrdiff_t n, bool RowMajor>\nstruct tensor_index_linearization_helper\n{\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  Index run(array<Index, NumIndices> const& indices, array<Index, NumIndices> const& dimensions)\n  {\n    return array_get<RowMajor ? n : (NumIndices - n - 1)>(indices) +\n      array_get<RowMajor ? n : (NumIndices - n - 1)>(dimensions) *\n        tensor_index_linearization_helper<Index, NumIndices, n - 1, RowMajor>::run(indices, dimensions);\n  }\n};\n\ntemplate<typename Index, std::ptrdiff_t NumIndices, bool RowMajor>\nstruct tensor_index_linearization_helper<Index, NumIndices, 0, RowMajor>\n{\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  Index run(array<Index, NumIndices> const& indices, array<Index, NumIndices> const&)\n  {\n    return array_get<RowMajor ? 0 : NumIndices - 1>(indices);\n  }\n};\n}  // end namespace internal\n\n\n\n// Dynamic size\ntemplate <typename DenseIndex, int NumDims>\nstruct DSizes : array<DenseIndex, NumDims> {\n  typedef array<DenseIndex, NumDims> Base;\n  static const int count = NumDims;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index rank() const {\n    return NumDims;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DenseIndex TotalSize() const {\n    return (NumDims == 0) ? 1 : internal::array_prod(*static_cast<const Base*>(this));\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DSizes() {\n    for (int i = 0 ; i < NumDims; ++i) {\n      (*this)[i] = 0;\n    }\n  }\n  EIGEN_DEVICE_FUNC explicit DSizes(const array<DenseIndex, NumDims>& a) : Base(a) { }\n\n  EIGEN_DEVICE_FUNC explicit DSizes(const DenseIndex i0) {\n    eigen_assert(NumDims == 1);\n    (*this)[0] = i0;\n  }\n\n  EIGEN_DEVICE_FUNC DSizes(const DimensionList<DenseIndex, NumDims>& a) {\n    for (int i = 0 ; i < NumDims; ++i) {\n      (*this)[i] = a[i];\n    }\n  }\n\n  // Enable DSizes index type promotion only if we are promoting to the\n  // larger type, e.g. allow to promote dimensions of type int to long.\n  template<typename OtherIndex>\n  EIGEN_DEVICE_FUNC\n  explicit DSizes(const array<OtherIndex, NumDims>& other,\n                  // Default template parameters require c++11.\n                  typename internal::enable_if<\n                     internal::is_same<\n                         DenseIndex,\n                         typename internal::promote_index_type<\n                             DenseIndex,\n                             OtherIndex\n                         >::type\n                     >::value, void*>::type = 0) {\n    for (int i = 0; i < NumDims; ++i) {\n      (*this)[i] = static_cast<DenseIndex>(other[i]);\n    }\n  }\n\n#ifdef EIGEN_HAS_INDEX_LIST\n  template <typename FirstType, typename... OtherTypes>\n  EIGEN_DEVICE_FUNC\n  explicit DSizes(const Eigen::IndexList<FirstType, OtherTypes...>& dimensions) {\n    for (int i = 0; i < dimensions.count; ++i) {\n      (*this)[i] = dimensions[i];\n    }\n  }\n#endif\n\n#ifndef EIGEN_EMULATE_CXX11_META_H\n  template <typename std::ptrdiff_t... Indices>\n  EIGEN_DEVICE_FUNC DSizes(const Sizes<Indices...>& a) {\n    for (int i = 0 ; i < NumDims; ++i) {\n      (*this)[i] = a[i];\n    }\n  }\n#else\n  template <std::ptrdiff_t V1, std::ptrdiff_t V2, std::ptrdiff_t V3, std::ptrdiff_t V4, std::ptrdiff_t V5>\n  EIGEN_DEVICE_FUNC DSizes(const Sizes<V1, V2, V3, V4, V5>& a) {\n    for (int i = 0 ; i < NumDims; ++i) {\n      (*this)[i] = a[i];\n    }\n  }\n#endif\n\n#if EIGEN_HAS_VARIADIC_TEMPLATES\n  template<typename... IndexTypes> EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE explicit DSizes(DenseIndex firstDimension, DenseIndex secondDimension, IndexTypes... otherDimensions) : Base({{firstDimension, secondDimension, otherDimensions...}}) {\n    EIGEN_STATIC_ASSERT(sizeof...(otherDimensions) + 2 == NumDims, YOU_MADE_A_PROGRAMMING_MISTAKE)\n  }\n#else\n  EIGEN_DEVICE_FUNC DSizes(const DenseIndex i0, const DenseIndex i1) {\n    eigen_assert(NumDims == 2);\n    (*this)[0] = i0;\n    (*this)[1] = i1;\n  }\n  EIGEN_DEVICE_FUNC DSizes(const DenseIndex i0, const DenseIndex i1, const DenseIndex i2) {\n    eigen_assert(NumDims == 3);\n    (*this)[0] = i0;\n    (*this)[1] = i1;\n    (*this)[2] = i2;\n  }\n  EIGEN_DEVICE_FUNC DSizes(const DenseIndex i0, const DenseIndex i1, const DenseIndex i2, const DenseIndex i3) {\n    eigen_assert(NumDims == 4);\n    (*this)[0] = i0;\n    (*this)[1] = i1;\n    (*this)[2] = i2;\n    (*this)[3] = i3;\n  }\n  EIGEN_DEVICE_FUNC DSizes(const DenseIndex i0, const DenseIndex i1, const DenseIndex i2, const DenseIndex i3, const DenseIndex i4) {\n    eigen_assert(NumDims == 5);\n    (*this)[0] = i0;\n    (*this)[1] = i1;\n    (*this)[2] = i2;\n    (*this)[3] = i3;\n    (*this)[4] = i4;\n  }\n#endif\n\n  EIGEN_DEVICE_FUNC DSizes& operator = (const array<DenseIndex, NumDims>& other) {\n    *static_cast<Base*>(this) = other;\n    return *this;\n  }\n\n  // A constexpr would be so much better here\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DenseIndex IndexOfColMajor(const array<DenseIndex, NumDims>& indices) const {\n    return internal::tensor_index_linearization_helper<DenseIndex, NumDims, NumDims - 1, false>::run(indices, *static_cast<const Base*>(this));\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DenseIndex IndexOfRowMajor(const array<DenseIndex, NumDims>& indices) const {\n    return internal::tensor_index_linearization_helper<DenseIndex, NumDims, NumDims - 1, true>::run(indices, *static_cast<const Base*>(this));\n  }\n};\n\ntemplate <typename IndexType, int NumDims>\nstd::ostream& operator<<(std::ostream& os,\n                         const DSizes<IndexType, NumDims>& dims) {\n  os << \"[\";\n  for (int i = 0; i < NumDims; ++i) {\n    if (i > 0) os << \", \";\n    os << dims[i];\n  }\n  os << \"]\";\n  return os;\n}\n\n// Boilerplate\nnamespace internal {\ntemplate<typename Index, std::ptrdiff_t NumIndices, std::ptrdiff_t n, bool RowMajor>\nstruct tensor_vsize_index_linearization_helper\n{\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  Index run(array<Index, NumIndices> const& indices, std::vector<DenseIndex> const& dimensions)\n  {\n    return array_get<RowMajor ? n : (NumIndices - n - 1)>(indices) +\n      array_get<RowMajor ? n : (NumIndices - n - 1)>(dimensions) *\n        tensor_vsize_index_linearization_helper<Index, NumIndices, n - 1, RowMajor>::run(indices, dimensions);\n  }\n};\n\ntemplate<typename Index, std::ptrdiff_t NumIndices, bool RowMajor>\nstruct tensor_vsize_index_linearization_helper<Index, NumIndices, 0, RowMajor>\n{\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  Index run(array<Index, NumIndices> const& indices, std::vector<DenseIndex> const&)\n  {\n    return array_get<RowMajor ? 0 : NumIndices - 1>(indices);\n  }\n};\n}  // end namespace internal\n\n\nnamespace internal {\n\ntemplate <typename DenseIndex, int NumDims> struct array_size<const DSizes<DenseIndex, NumDims> > {\n  static const ptrdiff_t value = NumDims;\n};\ntemplate <typename DenseIndex, int NumDims> struct array_size<DSizes<DenseIndex, NumDims> > {\n  static const ptrdiff_t value = NumDims;\n};\n#ifndef EIGEN_EMULATE_CXX11_META_H\ntemplate <typename std::ptrdiff_t... Indices> struct array_size<const Sizes<Indices...> > {\nstatic const std::ptrdiff_t value = Sizes<Indices...>::count;\n};\ntemplate <typename std::ptrdiff_t... Indices> struct array_size<Sizes<Indices...> > {\nstatic const std::ptrdiff_t value = Sizes<Indices...>::count;\n};\ntemplate <std::ptrdiff_t n, typename std::ptrdiff_t... Indices> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::ptrdiff_t array_get(const Sizes<Indices...>&) {\n  return get<n, internal::numeric_list<std::ptrdiff_t, Indices...> >::value;\n}\ntemplate <std::ptrdiff_t n> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::ptrdiff_t array_get(const Sizes<>&) {\n  eigen_assert(false && \"should never be called\");\n  return -1;\n}\n#else\ntemplate <std::ptrdiff_t V1, std::ptrdiff_t V2, std::ptrdiff_t V3, std::ptrdiff_t V4, std::ptrdiff_t V5> struct array_size<const Sizes<V1,V2,V3,V4,V5> > {\n  static const ptrdiff_t value = Sizes<V1,V2,V3,V4,V5>::count;\n};\ntemplate <std::ptrdiff_t V1, std::ptrdiff_t V2, std::ptrdiff_t V3, std::ptrdiff_t V4, std::ptrdiff_t V5> struct array_size<Sizes<V1,V2,V3,V4,V5> > {\n  static const ptrdiff_t value = Sizes<V1,V2,V3,V4,V5>::count;\n};\ntemplate <std::ptrdiff_t n, std::ptrdiff_t V1, std::ptrdiff_t V2, std::ptrdiff_t V3, std::ptrdiff_t V4, std::ptrdiff_t V5> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::ptrdiff_t array_get(const Sizes<V1,V2,V3,V4,V5>&) {\n  return get<n, typename Sizes<V1,V2,V3,V4,V5>::Base>::value;\n}\n\n#endif\n\n\ntemplate <typename Dims1, typename Dims2, ptrdiff_t n, ptrdiff_t m>\nstruct sizes_match_below_dim {\n  static EIGEN_DEVICE_FUNC  EIGEN_STRONG_INLINE bool run(Dims1&, Dims2&) {\n    return false;\n  }\n};\ntemplate <typename Dims1, typename Dims2, ptrdiff_t n>\nstruct sizes_match_below_dim<Dims1, Dims2, n, n> {\n  static EIGEN_DEVICE_FUNC  EIGEN_STRONG_INLINE bool run(Dims1& dims1, Dims2& dims2) {\n    return (array_get<n-1>(dims1) == array_get<n-1>(dims2)) &\n        sizes_match_below_dim<Dims1, Dims2, n-1, n-1>::run(dims1, dims2);\n  }\n};\ntemplate <typename Dims1, typename Dims2>\nstruct sizes_match_below_dim<Dims1, Dims2, 0, 0> {\n  static EIGEN_DEVICE_FUNC  EIGEN_STRONG_INLINE bool run(Dims1&, Dims2&) {\n    return true;\n  }\n};\n\n} // end namespace internal\n\n\ntemplate <typename Dims1, typename Dims2>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool dimensions_match(Dims1 dims1, Dims2 dims2) {\n  return internal::sizes_match_below_dim<Dims1, Dims2, internal::array_size<Dims1>::value, internal::array_size<Dims2>::value>::run(dims1, dims2);\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_DIMENSIONS_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorEvalTo.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_EVAL_TO_H\n#define EIGEN_CXX11_TENSOR_TENSOR_EVAL_TO_H\n\nnamespace Eigen {\n\n/** \\class TensorForcedEval\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief Tensor reshaping class.\n  *\n  *\n  */\nnamespace internal {\ntemplate<typename XprType, template <class> class MakePointer_>\nstruct traits<TensorEvalToOp<XprType, MakePointer_> >\n{\n  // Type promotion to handle the case where the types of the lhs and the rhs are different.\n  typedef typename XprType::Scalar Scalar;\n  typedef traits<XprType> XprTraits;\n  typedef typename XprTraits::StorageKind StorageKind;\n  typedef typename XprTraits::Index Index;\n  typedef typename XprType::Nested Nested;\n  typedef typename remove_reference<Nested>::type _Nested;\n  static const int NumDimensions = XprTraits::NumDimensions;\n  static const int Layout = XprTraits::Layout;\n  typedef typename MakePointer_<Scalar>::Type PointerType;\n\n  enum {\n    Flags = 0\n  };\n  template <class T>\n  struct MakePointer {\n    // Intermediate typedef to workaround MSVC issue.\n    typedef MakePointer_<T> MakePointerT;\n    typedef typename MakePointerT::Type Type;\n\n\n  };\n};\n\ntemplate<typename XprType, template <class> class MakePointer_>\nstruct eval<TensorEvalToOp<XprType, MakePointer_>, Eigen::Dense>\n{\n  typedef const TensorEvalToOp<XprType, MakePointer_>& type;\n};\n\ntemplate<typename XprType, template <class> class MakePointer_>\nstruct nested<TensorEvalToOp<XprType, MakePointer_>, 1, typename eval<TensorEvalToOp<XprType, MakePointer_> >::type>\n{\n  typedef TensorEvalToOp<XprType, MakePointer_> type;\n};\n\n}  // end namespace internal\n\n\n\n\ntemplate<typename XprType, template <class> class MakePointer_>\nclass TensorEvalToOp : public TensorBase<TensorEvalToOp<XprType, MakePointer_>, ReadOnlyAccessors>\n{\n  public:\n  typedef typename Eigen::internal::traits<TensorEvalToOp>::Scalar Scalar;\n  typedef typename Eigen::NumTraits<Scalar>::Real RealScalar;\n  typedef typename internal::remove_const<typename XprType::CoeffReturnType>::type CoeffReturnType;\n  typedef typename MakePointer_<CoeffReturnType>::Type PointerType;\n  typedef typename Eigen::internal::nested<TensorEvalToOp>::type Nested;\n  typedef typename Eigen::internal::traits<TensorEvalToOp>::StorageKind StorageKind;\n  typedef typename Eigen::internal::traits<TensorEvalToOp>::Index Index;\n\n  static const int NumDims = Eigen::internal::traits<TensorEvalToOp>::NumDimensions;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvalToOp(PointerType buffer, const XprType& expr)\n      : m_xpr(expr), m_buffer(buffer) {}\n\n    EIGEN_DEVICE_FUNC\n    const typename internal::remove_all<typename XprType::Nested>::type&\n    expression() const { return m_xpr; }\n\n    EIGEN_DEVICE_FUNC PointerType buffer() const { return m_buffer; }\n\n  protected:\n    typename XprType::Nested m_xpr;\n    PointerType m_buffer;\n};\n\n\n\ntemplate<typename ArgType, typename Device, template <class> class MakePointer_>\nstruct TensorEvaluator<const TensorEvalToOp<ArgType, MakePointer_>, Device>\n{\n  typedef TensorEvalToOp<ArgType, MakePointer_> XprType;\n  typedef typename ArgType::Scalar Scalar;\n  typedef typename TensorEvaluator<ArgType, Device>::Dimensions Dimensions;\n  typedef typename XprType::Index Index;\n  typedef typename internal::remove_const<typename XprType::CoeffReturnType>::type CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  static const int PacketSize = PacketType<CoeffReturnType, Device>::size;\n  typedef typename Eigen::internal::traits<XprType>::PointerType TensorPointerType;\n  typedef StorageMemory<CoeffReturnType, Device> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n  enum {\n    IsAligned         = TensorEvaluator<ArgType, Device>::IsAligned,\n    PacketAccess      = TensorEvaluator<ArgType, Device>::PacketAccess,\n    BlockAccess       = true,\n    PreferBlockAccess = false,\n    Layout            = TensorEvaluator<ArgType, Device>::Layout,\n    CoordAccess       = false,  // to be implemented\n    RawAccess         = true\n  };\n\n  static const int NumDims = internal::traits<ArgType>::NumDimensions;\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockDescriptor<NumDims, Index> TensorBlockDesc;\n  typedef internal::TensorBlockScratchAllocator<Device> TensorBlockScratch;\n\n  typedef typename TensorEvaluator<const ArgType, Device>::TensorBlock\n      ArgTensorBlock;\n\n  typedef internal::TensorBlockAssignment<\n      CoeffReturnType, NumDims, typename ArgTensorBlock::XprType, Index>\n      TensorBlockAssignment;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)\n      : m_impl(op.expression(), device), m_buffer(device.get(op.buffer())), m_expression(op.expression()){}\n\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ~TensorEvaluator() {\n  }\n\n\n  EIGEN_DEVICE_FUNC const Dimensions& dimensions() const { return m_impl.dimensions(); }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType scalar) {\n    EIGEN_UNUSED_VARIABLE(scalar);\n    eigen_assert(scalar == NULL);\n    return m_impl.evalSubExprsIfNeeded(m_buffer);\n  }\n\n#ifdef EIGEN_USE_THREADS\n  template <typename EvalSubExprsCallback>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalSubExprsIfNeededAsync(\n      EvaluatorPointerType scalar, EvalSubExprsCallback done) {\n    EIGEN_UNUSED_VARIABLE(scalar);\n    eigen_assert(scalar == NULL);\n    m_impl.evalSubExprsIfNeededAsync(m_buffer, std::move(done));\n  }\n#endif\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalScalar(Index i) {\n    m_buffer[i] = m_impl.coeff(i);\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalPacket(Index i) {\n    internal::pstoret<CoeffReturnType, PacketReturnType, Aligned>(m_buffer + i, m_impl.template packet<TensorEvaluator<ArgType, Device>::IsAligned ? Aligned : Unaligned>(i));\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  internal::TensorBlockResourceRequirements getResourceRequirements() const {\n    return m_impl.getResourceRequirements();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalBlock(\n      TensorBlockDesc& desc, TensorBlockScratch& scratch) {\n    // Add `m_buffer` as destination buffer to the block descriptor.\n    desc.template AddDestinationBuffer<Layout>(\n        /*dst_base=*/m_buffer + desc.offset(),\n        /*dst_strides=*/internal::strides<Layout>(m_impl.dimensions()));\n\n    ArgTensorBlock block =\n        m_impl.block(desc, scratch, /*root_of_expr_ast=*/true);\n\n    // If block was evaluated into a destination buffer, there is no need to do\n    // an assignment.\n    if (block.kind() != internal::TensorBlockKind::kMaterializedInOutput) {\n      TensorBlockAssignment::Run(\n          TensorBlockAssignment::target(\n              desc.dimensions(), internal::strides<Layout>(m_impl.dimensions()),\n              m_buffer, desc.offset()),\n          block.expr());\n    }\n    block.cleanup();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {\n    m_impl.cleanup();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const\n  {\n    return m_buffer[index];\n  }\n\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const\n  {\n    return internal::ploadt<PacketReturnType, LoadMode>(m_buffer + index);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool vectorized) const {\n    // We assume that evalPacket or evalScalar is called to perform the\n    // assignment and account for the cost of the write here.\n    return m_impl.costPerCoeff(vectorized) +\n        TensorOpCost(0, sizeof(CoeffReturnType), 0, vectorized, PacketSize);\n  }\n\n  EIGEN_DEVICE_FUNC EvaluatorPointerType data() const { return m_buffer; }\n  ArgType expression() const { return m_expression; }\n  #ifdef EIGEN_USE_SYCL\n  // binding placeholder accessors to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {\n    m_impl.bind(cgh);\n    m_buffer.bind(cgh);\n  }\n  #endif\n\n\n private:\n  TensorEvaluator<ArgType, Device> m_impl;\n  EvaluatorPointerType m_buffer;\n  const ArgType m_expression;\n};\n\n\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_EVAL_TO_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_EVALUATOR_H\n#define EIGEN_CXX11_TENSOR_TENSOR_EVALUATOR_H\n\nnamespace Eigen {\n\n/** \\class TensorEvaluator\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief The tensor evaluator classes.\n  *\n  * These classes are responsible for the evaluation of the tensor expression.\n  *\n  * TODO: add support for more types of expressions, in particular expressions\n  * leading to lvalues (slicing, reshaping, etc...)\n  */\n\n// Generic evaluator\ntemplate<typename Derived, typename Device>\nstruct TensorEvaluator\n{\n  typedef typename Derived::Index Index;\n  typedef typename Derived::Scalar Scalar;\n  typedef typename Derived::Scalar CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  typedef typename Derived::Dimensions Dimensions;\n  typedef Derived XprType;\n  static const int PacketSize =  PacketType<CoeffReturnType, Device>::size;\n  typedef typename internal::traits<Derived>::template MakePointer<Scalar>::Type TensorPointerType;\n  typedef StorageMemory<Scalar, Device> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n\n  // NumDimensions is -1 for variable dim tensors\n  static const int NumCoords = internal::traits<Derived>::NumDimensions > 0 ?\n                               internal::traits<Derived>::NumDimensions : 0;\n\n  enum {\n    IsAligned          = Derived::IsAligned,\n    PacketAccess       = (PacketType<CoeffReturnType, Device>::size > 1),\n    BlockAccess        = internal::is_arithmetic<typename internal::remove_const<Scalar>::type>::value,\n    PreferBlockAccess  = false,\n    Layout             = Derived::Layout,\n    CoordAccess        = NumCoords > 0,\n    RawAccess          = true\n  };\n\n  typedef typename internal::remove_const<Scalar>::type ScalarNoConst;\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockDescriptor<NumCoords, Index> TensorBlockDesc;\n  typedef internal::TensorBlockScratchAllocator<Device> TensorBlockScratch;\n\n  typedef typename internal::TensorMaterializedBlock<ScalarNoConst, NumCoords,\n                                                     Layout, Index>\n      TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const Derived& m, const Device& device)\n      : m_data(device.get((const_cast<TensorPointerType>(m.data())))),\n        m_dims(m.dimensions()),\n        m_device(device)\n  { }\n\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions& dimensions() const { return m_dims; }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType dest) {\n    if (!NumTraits<typename internal::remove_const<Scalar>::type>::RequireInitialization && dest) {\n      m_device.memcpy((void*)(m_device.get(dest)), m_device.get(m_data), m_dims.TotalSize() * sizeof(Scalar));\n      return false;\n    }\n    return true;\n  }\n\n#ifdef EIGEN_USE_THREADS\n  template <typename EvalSubExprsCallback>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalSubExprsIfNeededAsync(\n      EvaluatorPointerType dest, EvalSubExprsCallback done) {\n    // TODO(ezhulenev): ThreadPoolDevice memcpy is blockign operation.\n    done(evalSubExprsIfNeeded(dest));\n  }\n#endif  // EIGEN_USE_THREADS\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {}\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const {\n    eigen_assert(m_data != NULL);\n    return m_data[index];\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType& coeffRef(Index index) {\n    eigen_assert(m_data != NULL);\n    return m_data[index];\n  }\n\n  template<int LoadMode> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  PacketReturnType packet(Index index) const\n  {\n    return internal::ploadt<PacketReturnType, LoadMode>(m_data + index);\n  }\n\n  // Return a packet starting at `index` where `umask` specifies which elements\n  // have to be loaded. Type/size of mask depends on PacketReturnType, e.g. for\n  // Packet16f, `umask` is of type uint16_t and if a bit is 1, corresponding\n  // float element will be loaded, otherwise 0 will be loaded.\n  // Function has been templatized to enable Sfinae.\n  template <typename PacketReturnTypeT> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  typename internal::enable_if<internal::unpacket_traits<PacketReturnTypeT>::masked_load_available, PacketReturnTypeT>::type\n  partialPacket(Index index, typename internal::unpacket_traits<PacketReturnTypeT>::mask_t umask) const\n  {\n    return internal::ploadu<PacketReturnTypeT>(m_data + index, umask);\n  }\n\n  template <int StoreMode> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  void writePacket(Index index, const PacketReturnType& x)\n  {\n    return internal::pstoret<Scalar, PacketReturnType, StoreMode>(m_data + index, x);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(const array<DenseIndex, NumCoords>& coords) const {\n    eigen_assert(m_data != NULL);\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      return m_data[m_dims.IndexOfColMajor(coords)];\n    } else {\n      return m_data[m_dims.IndexOfRowMajor(coords)];\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType&\n  coeffRef(const array<DenseIndex, NumCoords>& coords) {\n    eigen_assert(m_data != NULL);\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      return m_data[m_dims.IndexOfColMajor(coords)];\n    } else {\n      return m_data[m_dims.IndexOfRowMajor(coords)];\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool vectorized) const {\n    return TensorOpCost(sizeof(CoeffReturnType), 0, 0, vectorized,\n                        PacketType<CoeffReturnType, Device>::size);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  internal::TensorBlockResourceRequirements getResourceRequirements() const {\n    return internal::TensorBlockResourceRequirements::any();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorBlock\n  block(TensorBlockDesc& desc, TensorBlockScratch& scratch,\n          bool /*root_of_expr_ast*/ = false) const {\n    assert(m_data != NULL);\n    return TensorBlock::materialize(m_data, m_dims, desc, scratch);\n  }\n\n  template<typename TensorBlock>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void writeBlock(\n      const TensorBlockDesc& desc, const TensorBlock& block) {\n    assert(m_data != NULL);\n\n    typedef typename TensorBlock::XprType TensorBlockExpr;\n    typedef internal::TensorBlockAssignment<Scalar, NumCoords, TensorBlockExpr,\n                                            Index>\n        TensorBlockAssign;\n\n    TensorBlockAssign::Run(\n        TensorBlockAssign::target(desc.dimensions(),\n                                  internal::strides<Layout>(m_dims), m_data,\n                                  desc.offset()),\n        block.expr());\n  }\n\n  EIGEN_DEVICE_FUNC EvaluatorPointerType data() const { return m_data; }\n\n#ifdef EIGEN_USE_SYCL\n  // binding placeholder accessors to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {\n    m_data.bind(cgh);\n  }\n#endif\n protected:\n  EvaluatorPointerType m_data;\n  Dimensions m_dims;\n  const Device EIGEN_DEVICE_REF m_device;\n};\n\nnamespace {\ntemplate <typename T> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nT loadConstant(const T* address) {\n  return *address;\n}\n// Use the texture cache on CUDA devices whenever possible\n#if defined(EIGEN_CUDA_ARCH) && EIGEN_CUDA_ARCH >= 350\ntemplate <> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nfloat loadConstant(const float* address) {\n  return __ldg(address);\n}\ntemplate <> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\ndouble loadConstant(const double* address) {\n  return __ldg(address);\n}\ntemplate <> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nEigen::half loadConstant(const Eigen::half* address) {\n  return Eigen::half(half_impl::raw_uint16_to_half(__ldg(&address->x)));\n}\n#endif\n#ifdef EIGEN_USE_SYCL\n// overload of load constant should be implemented here based on range access\ntemplate <cl::sycl::access::mode AcMd, typename T>\nT &loadConstant(const Eigen::TensorSycl::internal::RangeAccess<AcMd, T> &address) {\n  return *address;\n}\n#endif\n}\n\n\n// Default evaluator for rvalues\ntemplate<typename Derived, typename Device>\nstruct TensorEvaluator<const Derived, Device>\n{\n  typedef typename Derived::Index Index;\n  typedef typename Derived::Scalar Scalar;\n  typedef typename Derived::Scalar CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  typedef typename Derived::Dimensions Dimensions;\n  typedef const Derived XprType;\n  typedef typename internal::traits<Derived>::template MakePointer<const Scalar>::Type TensorPointerType;\n  typedef StorageMemory<const Scalar, Device> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n\n  typedef typename internal::remove_const<Scalar>::type ScalarNoConst;\n\n  // NumDimensions is -1 for variable dim tensors\n  static const int NumCoords = internal::traits<Derived>::NumDimensions > 0 ?\n                               internal::traits<Derived>::NumDimensions : 0;\n  static const int PacketSize = PacketType<CoeffReturnType, Device>::size;\n\n  enum {\n    IsAligned         = Derived::IsAligned,\n    PacketAccess      = (PacketType<CoeffReturnType, Device>::size > 1),\n    BlockAccess       = internal::is_arithmetic<ScalarNoConst>::value,\n    PreferBlockAccess = false,\n    Layout            = Derived::Layout,\n    CoordAccess       = NumCoords > 0,\n    RawAccess         = true\n  };\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockDescriptor<NumCoords, Index> TensorBlockDesc;\n  typedef internal::TensorBlockScratchAllocator<Device> TensorBlockScratch;\n\n  typedef typename internal::TensorMaterializedBlock<ScalarNoConst, NumCoords,\n                                                     Layout, Index>\n      TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const Derived& m, const Device& device)\n      : m_data(device.get(m.data())), m_dims(m.dimensions()), m_device(device)\n  { }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions& dimensions() const { return m_dims; }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType data) {\n    if (!NumTraits<typename internal::remove_const<Scalar>::type>::RequireInitialization && data) {\n      m_device.memcpy((void*)(m_device.get(data)),m_device.get(m_data), m_dims.TotalSize() * sizeof(Scalar));\n      return false;\n    }\n    return true;\n  }\n\n#ifdef EIGEN_USE_THREADS\n  template <typename EvalSubExprsCallback>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalSubExprsIfNeededAsync(\n      EvaluatorPointerType dest, EvalSubExprsCallback done) {\n    // TODO(ezhulenev): ThreadPoolDevice memcpy is a blockign operation.\n    done(evalSubExprsIfNeeded(dest));\n  }\n#endif  // EIGEN_USE_THREADS\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() { }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const {\n    eigen_assert(m_data != NULL);\n    return loadConstant(m_data+index);\n  }\n\n  template<int LoadMode> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  PacketReturnType packet(Index index) const\n  {\n    return internal::ploadt_ro<PacketReturnType, LoadMode>(m_data + index);\n  }\n\n  // Return a packet starting at `index` where `umask` specifies which elements\n  // have to be loaded. Type/size of mask depends on PacketReturnType, e.g. for\n  // Packet16f, `umask` is of type uint16_t and if a bit is 1, corresponding\n  // float element will be loaded, otherwise 0 will be loaded.\n  // Function has been templatized to enable Sfinae.\n  template <typename PacketReturnTypeT> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  typename internal::enable_if<internal::unpacket_traits<PacketReturnTypeT>::masked_load_available, PacketReturnTypeT>::type\n  partialPacket(Index index, typename internal::unpacket_traits<PacketReturnTypeT>::mask_t umask) const\n  {\n    return internal::ploadu<PacketReturnTypeT>(m_data + index, umask);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(const array<DenseIndex, NumCoords>& coords) const {\n    eigen_assert(m_data != NULL);\n    const Index index = (static_cast<int>(Layout) == static_cast<int>(ColMajor)) ? m_dims.IndexOfColMajor(coords)\n                        : m_dims.IndexOfRowMajor(coords);\n    return loadConstant(m_data+index);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool vectorized) const {\n    return TensorOpCost(sizeof(CoeffReturnType), 0, 0, vectorized,\n                        PacketType<CoeffReturnType, Device>::size);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  internal::TensorBlockResourceRequirements getResourceRequirements() const {\n    return internal::TensorBlockResourceRequirements::any();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorBlock\n  block(TensorBlockDesc& desc, TensorBlockScratch& scratch,\n          bool /*root_of_expr_ast*/ = false) const {\n    assert(m_data != NULL);\n    return TensorBlock::materialize(m_data, m_dims, desc, scratch);\n  }\n\n  EIGEN_DEVICE_FUNC EvaluatorPointerType data() const { return m_data; }\n#ifdef EIGEN_USE_SYCL\n  // binding placeholder accessors to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {\n    m_data.bind(cgh);\n  }\n#endif\n protected:\n  EvaluatorPointerType m_data;\n  Dimensions m_dims;\n  const Device EIGEN_DEVICE_REF m_device;\n};\n\n\n\n\n// -------------------- CwiseNullaryOp --------------------\n\ntemplate<typename NullaryOp, typename ArgType, typename Device>\nstruct TensorEvaluator<const TensorCwiseNullaryOp<NullaryOp, ArgType>, Device>\n{\n  typedef TensorCwiseNullaryOp<NullaryOp, ArgType> XprType;\n\n  EIGEN_DEVICE_FUNC\n  TensorEvaluator(const XprType& op, const Device& device)\n      : m_functor(op.functor()), m_argImpl(op.nestedExpression(), device), m_wrapper()\n  { }\n\n  typedef typename XprType::Index Index;\n  typedef typename XprType::Scalar Scalar;\n  typedef typename internal::traits<XprType>::Scalar CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  static const int PacketSize = PacketType<CoeffReturnType, Device>::size;\n  typedef typename TensorEvaluator<ArgType, Device>::Dimensions Dimensions;\n  typedef StorageMemory<CoeffReturnType, Device> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n\n  enum {\n    IsAligned = true,\n    PacketAccess = internal::functor_traits<NullaryOp>::PacketAccess\n    #ifdef EIGEN_USE_SYCL\n    &&  (PacketType<CoeffReturnType, Device>::size >1)\n    #endif\n    ,\n    BlockAccess = false,\n    PreferBlockAccess = false,\n    Layout = TensorEvaluator<ArgType, Device>::Layout,\n    CoordAccess = false,  // to be implemented\n    RawAccess = false\n  };\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockNotImplemented TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC const Dimensions& dimensions() const { return m_argImpl.dimensions(); }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType) { return true; }\n\n#ifdef EIGEN_USE_THREADS\n  template <typename EvalSubExprsCallback>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalSubExprsIfNeededAsync(\n      EvaluatorPointerType, EvalSubExprsCallback done) {\n    done(true);\n  }\n#endif  // EIGEN_USE_THREADS\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() { }\n\n  EIGEN_DEVICE_FUNC CoeffReturnType coeff(Index index) const\n  {\n    return m_wrapper(m_functor, index);\n  }\n\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const\n  {\n    return m_wrapper.template packetOp<PacketReturnType, Index>(m_functor, index);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost\n  costPerCoeff(bool vectorized) const {\n    return TensorOpCost(sizeof(CoeffReturnType), 0, 0, vectorized,\n                        PacketType<CoeffReturnType, Device>::size);\n  }\n\n  EIGEN_DEVICE_FUNC  EvaluatorPointerType data() const { return NULL; }\n\n#ifdef EIGEN_USE_SYCL\n   // binding placeholder accessors to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {\n    m_argImpl.bind(cgh);\n  }\n#endif\n\n private:\n  const NullaryOp m_functor;\n  TensorEvaluator<ArgType, Device> m_argImpl;\n  const internal::nullary_wrapper<CoeffReturnType,NullaryOp> m_wrapper;\n};\n\n\n\n// -------------------- CwiseUnaryOp --------------------\n\ntemplate<typename UnaryOp, typename ArgType, typename Device>\nstruct TensorEvaluator<const TensorCwiseUnaryOp<UnaryOp, ArgType>, Device>\n{\n  typedef TensorCwiseUnaryOp<UnaryOp, ArgType> XprType;\n\n  enum {\n    IsAligned          = TensorEvaluator<ArgType, Device>::IsAligned,\n    PacketAccess       = TensorEvaluator<ArgType, Device>::PacketAccess &\n                         internal::functor_traits<UnaryOp>::PacketAccess,\n    BlockAccess        = TensorEvaluator<ArgType, Device>::BlockAccess,\n    PreferBlockAccess  = TensorEvaluator<ArgType, Device>::PreferBlockAccess,\n    Layout             = TensorEvaluator<ArgType, Device>::Layout,\n    CoordAccess        = false,  // to be implemented\n    RawAccess          = false\n  };\n\n  EIGEN_DEVICE_FUNC TensorEvaluator(const XprType& op, const Device& device)\n    : m_device(device),\n      m_functor(op.functor()),\n      m_argImpl(op.nestedExpression(), device)\n  { }\n\n  typedef typename XprType::Index Index;\n  typedef typename XprType::Scalar Scalar;\n  typedef typename internal::remove_const<Scalar>::type ScalarNoConst;\n  typedef typename internal::traits<XprType>::Scalar CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  static const int PacketSize = PacketType<CoeffReturnType, Device>::size;\n  typedef typename TensorEvaluator<ArgType, Device>::Dimensions Dimensions;\n  typedef StorageMemory<CoeffReturnType, Device> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n  static const int NumDims = internal::array_size<Dimensions>::value;\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockDescriptor<NumDims, Index> TensorBlockDesc;\n  typedef internal::TensorBlockScratchAllocator<Device> TensorBlockScratch;\n\n  typedef typename TensorEvaluator<const ArgType, Device>::TensorBlock\n      ArgTensorBlock;\n\n  typedef internal::TensorCwiseUnaryBlock<UnaryOp, ArgTensorBlock>\n      TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC const Dimensions& dimensions() const { return m_argImpl.dimensions(); }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType) {\n    m_argImpl.evalSubExprsIfNeeded(NULL);\n    return true;\n  }\n\n#ifdef EIGEN_USE_THREADS\n  template <typename EvalSubExprsCallback>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalSubExprsIfNeededAsync(\n      EvaluatorPointerType, EvalSubExprsCallback done) {\n    m_argImpl.evalSubExprsIfNeededAsync(nullptr, [done](bool) { done(true); });\n  }\n#endif  // EIGEN_USE_THREADS\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {\n    m_argImpl.cleanup();\n  }\n\n  EIGEN_DEVICE_FUNC CoeffReturnType coeff(Index index) const\n  {\n    return m_functor(m_argImpl.coeff(index));\n  }\n\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const\n  {\n    return m_functor.packetOp(m_argImpl.template packet<LoadMode>(index));\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool vectorized) const {\n    const double functor_cost = internal::functor_traits<UnaryOp>::Cost;\n    return m_argImpl.costPerCoeff(vectorized) +\n        TensorOpCost(0, 0, functor_cost, vectorized, PacketSize);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  internal::TensorBlockResourceRequirements getResourceRequirements() const {\n    static const double functor_cost = internal::functor_traits<UnaryOp>::Cost;\n    return m_argImpl.getResourceRequirements().addCostPerCoeff(\n        {0, 0, functor_cost / PacketSize});\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorBlock\n  block(TensorBlockDesc& desc, TensorBlockScratch& scratch,\n          bool /*root_of_expr_ast*/ = false) const {\n    return TensorBlock(m_argImpl.block(desc, scratch), m_functor);\n  }\n\n  EIGEN_DEVICE_FUNC EvaluatorPointerType data() const { return NULL; }\n\n#ifdef EIGEN_USE_SYCL\n  // binding placeholder accessors to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const{\n    m_argImpl.bind(cgh);\n  }\n#endif\n\n\n private:\n  const Device EIGEN_DEVICE_REF m_device;\n  const UnaryOp m_functor;\n  TensorEvaluator<ArgType, Device> m_argImpl;\n};\n\n\n// -------------------- CwiseBinaryOp --------------------\n\ntemplate<typename BinaryOp, typename LeftArgType, typename RightArgType, typename Device>\nstruct TensorEvaluator<const TensorCwiseBinaryOp<BinaryOp, LeftArgType, RightArgType>, Device>\n{\n  typedef TensorCwiseBinaryOp<BinaryOp, LeftArgType, RightArgType> XprType;\n\n  enum {\n    IsAligned         = TensorEvaluator<LeftArgType, Device>::IsAligned &\n                        TensorEvaluator<RightArgType, Device>::IsAligned,\n    PacketAccess      = TensorEvaluator<LeftArgType, Device>::PacketAccess &\n                        TensorEvaluator<RightArgType, Device>::PacketAccess &\n                        internal::functor_traits<BinaryOp>::PacketAccess,\n    BlockAccess       = TensorEvaluator<LeftArgType, Device>::BlockAccess &\n                        TensorEvaluator<RightArgType, Device>::BlockAccess,\n    PreferBlockAccess = TensorEvaluator<LeftArgType, Device>::PreferBlockAccess |\n                        TensorEvaluator<RightArgType, Device>::PreferBlockAccess,\n    Layout            = TensorEvaluator<LeftArgType, Device>::Layout,\n    CoordAccess       = false,  // to be implemented\n    RawAccess         = false\n  };\n\n  EIGEN_DEVICE_FUNC TensorEvaluator(const XprType& op, const Device& device)\n    : m_device(device),\n      m_functor(op.functor()),\n      m_leftImpl(op.lhsExpression(), device),\n      m_rightImpl(op.rhsExpression(), device)\n  {\n    EIGEN_STATIC_ASSERT((static_cast<int>(TensorEvaluator<LeftArgType, Device>::Layout) == static_cast<int>(TensorEvaluator<RightArgType, Device>::Layout) || internal::traits<XprType>::NumDimensions <= 1), YOU_MADE_A_PROGRAMMING_MISTAKE);\n    eigen_assert(dimensions_match(m_leftImpl.dimensions(), m_rightImpl.dimensions()));\n  }\n\n  typedef typename XprType::Index Index;\n  typedef typename XprType::Scalar Scalar;\n  typedef typename internal::traits<XprType>::Scalar CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  static const int PacketSize = PacketType<CoeffReturnType, Device>::size;\n  typedef typename TensorEvaluator<LeftArgType, Device>::Dimensions Dimensions;\n  typedef StorageMemory<CoeffReturnType, Device> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n\n  static const int NumDims = internal::array_size<\n      typename TensorEvaluator<LeftArgType, Device>::Dimensions>::value;\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockDescriptor<NumDims, Index> TensorBlockDesc;\n  typedef internal::TensorBlockScratchAllocator<Device> TensorBlockScratch;\n\n  typedef typename TensorEvaluator<const LeftArgType, Device>::TensorBlock\n      LeftTensorBlock;\n  typedef typename TensorEvaluator<const RightArgType, Device>::TensorBlock\n      RightTensorBlock;\n\n  typedef internal::TensorCwiseBinaryBlock<BinaryOp, LeftTensorBlock,\n                                           RightTensorBlock>\n      TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC const Dimensions& dimensions() const\n  {\n    // TODO: use right impl instead if right impl dimensions are known at compile time.\n    return m_leftImpl.dimensions();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType) {\n    m_leftImpl.evalSubExprsIfNeeded(NULL);\n    m_rightImpl.evalSubExprsIfNeeded(NULL);\n    return true;\n  }\n\n#ifdef EIGEN_USE_THREADS\n  template <typename EvalSubExprsCallback>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalSubExprsIfNeededAsync(\n      EvaluatorPointerType, EvalSubExprsCallback done) {\n    // TODO(ezhulenev): Evaluate two expression in parallel?\n    m_leftImpl.evalSubExprsIfNeededAsync(nullptr, [this, done](bool) {\n      m_rightImpl.evalSubExprsIfNeededAsync(nullptr,\n                                            [done](bool) { done(true); });\n    });\n  }\n#endif  // EIGEN_USE_THREADS\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {\n    m_leftImpl.cleanup();\n    m_rightImpl.cleanup();\n  }\n\n  EIGEN_DEVICE_FUNC CoeffReturnType coeff(Index index) const\n  {\n    return m_functor(m_leftImpl.coeff(index), m_rightImpl.coeff(index));\n  }\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const\n  {\n    return m_functor.packetOp(m_leftImpl.template packet<LoadMode>(index), m_rightImpl.template packet<LoadMode>(index));\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost\n  costPerCoeff(bool vectorized) const {\n    const double functor_cost = internal::functor_traits<BinaryOp>::Cost;\n    return m_leftImpl.costPerCoeff(vectorized) +\n           m_rightImpl.costPerCoeff(vectorized) +\n           TensorOpCost(0, 0, functor_cost, vectorized, PacketSize);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  internal::TensorBlockResourceRequirements getResourceRequirements() const {\n    static const double functor_cost = internal::functor_traits<BinaryOp>::Cost;\n    return internal::TensorBlockResourceRequirements::merge(\n               m_leftImpl.getResourceRequirements(),\n               m_rightImpl.getResourceRequirements())\n        .addCostPerCoeff({0, 0, functor_cost / PacketSize});\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorBlock\n  block(TensorBlockDesc& desc, TensorBlockScratch& scratch,\n          bool /*root_of_expr_ast*/ = false) const {\n    desc.DropDestinationBuffer();\n    return TensorBlock(m_leftImpl.block(desc, scratch),\n                         m_rightImpl.block(desc, scratch), m_functor);\n  }\n\n  EIGEN_DEVICE_FUNC EvaluatorPointerType data() const { return NULL; }\n\n  #ifdef EIGEN_USE_SYCL\n  // binding placeholder accessors to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {\n    m_leftImpl.bind(cgh);\n    m_rightImpl.bind(cgh);\n  }\n  #endif\n private:\n  const Device EIGEN_DEVICE_REF m_device;\n  const BinaryOp m_functor;\n  TensorEvaluator<LeftArgType, Device> m_leftImpl;\n  TensorEvaluator<RightArgType, Device> m_rightImpl;\n};\n\n// -------------------- CwiseTernaryOp --------------------\n\ntemplate<typename TernaryOp, typename Arg1Type, typename Arg2Type, typename Arg3Type, typename Device>\nstruct TensorEvaluator<const TensorCwiseTernaryOp<TernaryOp, Arg1Type, Arg2Type, Arg3Type>, Device>\n{\n  typedef TensorCwiseTernaryOp<TernaryOp, Arg1Type, Arg2Type, Arg3Type> XprType;\n\n  enum {\n    IsAligned = TensorEvaluator<Arg1Type, Device>::IsAligned & TensorEvaluator<Arg2Type, Device>::IsAligned & TensorEvaluator<Arg3Type, Device>::IsAligned,\n    PacketAccess      = TensorEvaluator<Arg1Type, Device>::PacketAccess &&\n                        TensorEvaluator<Arg2Type, Device>::PacketAccess &&\n                        TensorEvaluator<Arg3Type, Device>::PacketAccess &&\n                        internal::functor_traits<TernaryOp>::PacketAccess,\n    BlockAccess       = false,\n    PreferBlockAccess = TensorEvaluator<Arg1Type, Device>::PreferBlockAccess ||\n                        TensorEvaluator<Arg2Type, Device>::PreferBlockAccess ||\n                        TensorEvaluator<Arg3Type, Device>::PreferBlockAccess,\n    Layout            = TensorEvaluator<Arg1Type, Device>::Layout,\n    CoordAccess       = false,  // to be implemented\n    RawAccess         = false\n  };\n\n  EIGEN_DEVICE_FUNC TensorEvaluator(const XprType& op, const Device& device)\n    : m_functor(op.functor()),\n      m_arg1Impl(op.arg1Expression(), device),\n      m_arg2Impl(op.arg2Expression(), device),\n      m_arg3Impl(op.arg3Expression(), device)\n  {\n    EIGEN_STATIC_ASSERT((static_cast<int>(TensorEvaluator<Arg1Type, Device>::Layout) == static_cast<int>(TensorEvaluator<Arg3Type, Device>::Layout) || internal::traits<XprType>::NumDimensions <= 1), YOU_MADE_A_PROGRAMMING_MISTAKE);\n\n    EIGEN_STATIC_ASSERT((internal::is_same<typename internal::traits<Arg1Type>::StorageKind,\n                         typename internal::traits<Arg2Type>::StorageKind>::value),\n                        STORAGE_KIND_MUST_MATCH)\n    EIGEN_STATIC_ASSERT((internal::is_same<typename internal::traits<Arg1Type>::StorageKind,\n                         typename internal::traits<Arg3Type>::StorageKind>::value),\n                        STORAGE_KIND_MUST_MATCH)\n    EIGEN_STATIC_ASSERT((internal::is_same<typename internal::traits<Arg1Type>::Index,\n                         typename internal::traits<Arg2Type>::Index>::value),\n                        STORAGE_INDEX_MUST_MATCH)\n    EIGEN_STATIC_ASSERT((internal::is_same<typename internal::traits<Arg1Type>::Index,\n                         typename internal::traits<Arg3Type>::Index>::value),\n                        STORAGE_INDEX_MUST_MATCH)\n\n    eigen_assert(dimensions_match(m_arg1Impl.dimensions(), m_arg2Impl.dimensions()) && dimensions_match(m_arg1Impl.dimensions(), m_arg3Impl.dimensions()));\n  }\n\n  typedef typename XprType::Index Index;\n  typedef typename XprType::Scalar Scalar;\n  typedef typename internal::traits<XprType>::Scalar CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  static const int PacketSize = PacketType<CoeffReturnType, Device>::size;\n  typedef typename TensorEvaluator<Arg1Type, Device>::Dimensions Dimensions;\n  typedef StorageMemory<CoeffReturnType, Device> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockNotImplemented TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC const Dimensions& dimensions() const\n  {\n    // TODO: use arg2 or arg3 dimensions if they are known at compile time.\n    return m_arg1Impl.dimensions();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType) {\n    m_arg1Impl.evalSubExprsIfNeeded(NULL);\n    m_arg2Impl.evalSubExprsIfNeeded(NULL);\n    m_arg3Impl.evalSubExprsIfNeeded(NULL);\n    return true;\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {\n    m_arg1Impl.cleanup();\n    m_arg2Impl.cleanup();\n    m_arg3Impl.cleanup();\n  }\n\n  EIGEN_DEVICE_FUNC CoeffReturnType coeff(Index index) const\n  {\n    return m_functor(m_arg1Impl.coeff(index), m_arg2Impl.coeff(index), m_arg3Impl.coeff(index));\n  }\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const\n  {\n    return m_functor.packetOp(m_arg1Impl.template packet<LoadMode>(index),\n                              m_arg2Impl.template packet<LoadMode>(index),\n                              m_arg3Impl.template packet<LoadMode>(index));\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost\n  costPerCoeff(bool vectorized) const {\n    const double functor_cost = internal::functor_traits<TernaryOp>::Cost;\n    return m_arg1Impl.costPerCoeff(vectorized) +\n           m_arg2Impl.costPerCoeff(vectorized) +\n           m_arg3Impl.costPerCoeff(vectorized) +\n           TensorOpCost(0, 0, functor_cost, vectorized, PacketSize);\n  }\n\n  EIGEN_DEVICE_FUNC EvaluatorPointerType data() const { return NULL; }\n\n#ifdef EIGEN_USE_SYCL\n   // binding placeholder accessors to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {\n    m_arg1Impl.bind(cgh);\n    m_arg2Impl.bind(cgh);\n    m_arg3Impl.bind(cgh);\n  }\n#endif\n\n private:\n  const TernaryOp m_functor;\n  TensorEvaluator<Arg1Type, Device> m_arg1Impl;\n  TensorEvaluator<Arg2Type, Device> m_arg2Impl;\n  TensorEvaluator<Arg3Type, Device> m_arg3Impl;\n};\n\n\n// -------------------- SelectOp --------------------\n\ntemplate<typename IfArgType, typename ThenArgType, typename ElseArgType, typename Device>\nstruct TensorEvaluator<const TensorSelectOp<IfArgType, ThenArgType, ElseArgType>, Device>\n{\n  typedef TensorSelectOp<IfArgType, ThenArgType, ElseArgType> XprType;\n  typedef typename XprType::Scalar Scalar;\n\n  enum {\n    IsAligned         = TensorEvaluator<ThenArgType, Device>::IsAligned &\n                        TensorEvaluator<ElseArgType, Device>::IsAligned,\n    PacketAccess      = TensorEvaluator<ThenArgType, Device>::PacketAccess &\n                        TensorEvaluator<ElseArgType, Device>::PacketAccess &\n                        PacketType<Scalar, Device>::HasBlend,\n    BlockAccess       = TensorEvaluator<IfArgType, Device>::BlockAccess &&\n                        TensorEvaluator<ThenArgType, Device>::BlockAccess &&\n                        TensorEvaluator<ElseArgType, Device>::BlockAccess,\n    PreferBlockAccess = TensorEvaluator<IfArgType, Device>::PreferBlockAccess ||\n                        TensorEvaluator<ThenArgType, Device>::PreferBlockAccess ||\n                        TensorEvaluator<ElseArgType, Device>::PreferBlockAccess,\n    Layout            = TensorEvaluator<IfArgType, Device>::Layout,\n    CoordAccess       = false,  // to be implemented\n    RawAccess         = false\n  };\n\n  EIGEN_DEVICE_FUNC TensorEvaluator(const XprType& op, const Device& device)\n    : m_condImpl(op.ifExpression(), device),\n      m_thenImpl(op.thenExpression(), device),\n      m_elseImpl(op.elseExpression(), device)\n  {\n    EIGEN_STATIC_ASSERT((static_cast<int>(TensorEvaluator<IfArgType, Device>::Layout) == static_cast<int>(TensorEvaluator<ThenArgType, Device>::Layout)), YOU_MADE_A_PROGRAMMING_MISTAKE);\n    EIGEN_STATIC_ASSERT((static_cast<int>(TensorEvaluator<IfArgType, Device>::Layout) == static_cast<int>(TensorEvaluator<ElseArgType, Device>::Layout)), YOU_MADE_A_PROGRAMMING_MISTAKE);\n    eigen_assert(dimensions_match(m_condImpl.dimensions(), m_thenImpl.dimensions()));\n    eigen_assert(dimensions_match(m_thenImpl.dimensions(), m_elseImpl.dimensions()));\n  }\n\n  typedef typename XprType::Index Index;\n  typedef typename internal::traits<XprType>::Scalar CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  static const int PacketSize = PacketType<CoeffReturnType, Device>::size;\n  typedef typename TensorEvaluator<IfArgType, Device>::Dimensions Dimensions;\n  typedef StorageMemory<CoeffReturnType, Device> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n\n  static const int NumDims = internal::array_size<Dimensions>::value;\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n    typedef internal::TensorBlockDescriptor<NumDims, Index> TensorBlockDesc;\n  typedef internal::TensorBlockScratchAllocator<Device> TensorBlockScratch;\n\n  typedef typename TensorEvaluator<const IfArgType, Device>::TensorBlock\n      IfArgTensorBlock;\n  typedef typename TensorEvaluator<const ThenArgType, Device>::TensorBlock\n      ThenArgTensorBlock;\n  typedef typename TensorEvaluator<const ElseArgType, Device>::TensorBlock\n      ElseArgTensorBlock;\n\n  struct TensorSelectOpBlockFactory {\n    template <typename IfArgXprType, typename ThenArgXprType, typename ElseArgXprType>\n    struct XprType {\n      typedef TensorSelectOp<const IfArgXprType, const ThenArgXprType, const ElseArgXprType> type;\n    };\n\n    template <typename IfArgXprType, typename ThenArgXprType, typename ElseArgXprType>\n    typename XprType<IfArgXprType, ThenArgXprType, ElseArgXprType>::type expr(\n        const IfArgXprType& if_expr, const ThenArgXprType& then_expr, const ElseArgXprType& else_expr) const {\n      return typename XprType<IfArgXprType, ThenArgXprType, ElseArgXprType>::type(if_expr, then_expr, else_expr);\n    }\n  };\n\n  typedef internal::TensorTernaryExprBlock<TensorSelectOpBlockFactory,\n                                           IfArgTensorBlock, ThenArgTensorBlock,\n                                           ElseArgTensorBlock>\n      TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC const Dimensions& dimensions() const\n  {\n    // TODO: use then or else impl instead if they happen to be known at compile time.\n    return m_condImpl.dimensions();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType) {\n    m_condImpl.evalSubExprsIfNeeded(NULL);\n    m_thenImpl.evalSubExprsIfNeeded(NULL);\n    m_elseImpl.evalSubExprsIfNeeded(NULL);\n    return true;\n  }\n\n#ifdef EIGEN_USE_THREADS\n  template <typename EvalSubExprsCallback>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalSubExprsIfNeededAsync(\n      EvaluatorPointerType, EvalSubExprsCallback done) {\n    m_condImpl.evalSubExprsIfNeeded(nullptr, [this, done](bool) {\n      m_thenImpl.evalSubExprsIfNeeded(nullptr, [this, done](bool) {\n        m_elseImpl.evalSubExprsIfNeeded(nullptr, [done](bool) { done(true); });\n      });\n    });\n  }\n#endif  // EIGEN_USE_THREADS\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {\n    m_condImpl.cleanup();\n    m_thenImpl.cleanup();\n    m_elseImpl.cleanup();\n  }\n\n  EIGEN_DEVICE_FUNC CoeffReturnType coeff(Index index) const\n  {\n    return m_condImpl.coeff(index) ? m_thenImpl.coeff(index) : m_elseImpl.coeff(index);\n  }\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC PacketReturnType packet(Index index) const\n  {\n     internal::Selector<PacketSize> select;\n     EIGEN_UNROLL_LOOP\n     for (Index i = 0; i < PacketSize; ++i) {\n       select.select[i] = m_condImpl.coeff(index+i);\n     }\n     return internal::pblend(select,\n                             m_thenImpl.template packet<LoadMode>(index),\n                             m_elseImpl.template packet<LoadMode>(index));\n\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost\n  costPerCoeff(bool vectorized) const {\n    return m_condImpl.costPerCoeff(vectorized) +\n           m_thenImpl.costPerCoeff(vectorized)\n        .cwiseMax(m_elseImpl.costPerCoeff(vectorized));\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  internal::TensorBlockResourceRequirements getResourceRequirements() const {\n    auto then_req = m_thenImpl.getResourceRequirements();\n    auto else_req = m_elseImpl.getResourceRequirements();\n\n    auto merged_req =\n        internal::TensorBlockResourceRequirements::merge(then_req, else_req);\n    merged_req.cost_per_coeff =\n        then_req.cost_per_coeff.cwiseMax(else_req.cost_per_coeff);\n\n    return internal::TensorBlockResourceRequirements::merge(\n        m_condImpl.getResourceRequirements(), merged_req);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorBlock\n  block(TensorBlockDesc& desc, TensorBlockScratch& scratch,\n          bool /*root_of_expr_ast*/ = false) const {\n    // It's unsafe to pass destination buffer to underlying expressions, because\n    // output might be aliased with one of the inputs.\n    desc.DropDestinationBuffer();\n\n    return TensorBlock(\n        m_condImpl.block(desc, scratch), m_thenImpl.block(desc, scratch),\n        m_elseImpl.block(desc, scratch), TensorSelectOpBlockFactory());\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EvaluatorPointerType data() const { return NULL; }\n\n#ifdef EIGEN_USE_SYCL\n // binding placeholder accessors to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {\n    m_condImpl.bind(cgh);\n    m_thenImpl.bind(cgh);\n    m_elseImpl.bind(cgh);\n  }\n#endif\n private:\n  TensorEvaluator<IfArgType, Device> m_condImpl;\n  TensorEvaluator<ThenArgType, Device> m_thenImpl;\n  TensorEvaluator<ElseArgType, Device> m_elseImpl;\n};\n\n\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_EVALUATOR_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_EXECUTOR_H\n#define EIGEN_CXX11_TENSOR_TENSOR_EXECUTOR_H\n\nnamespace Eigen {\n\n/**\n * \\class TensorExecutor\n * \\ingroup CXX11_Tensor_Module\n *\n * \\brief The tensor executor class.\n *\n * This class is responsible for launch the evaluation of the expression on\n * the specified computing device.\n *\n * @tparam Vectorizable can use packet math (SSE/AVX/etc... registers and\n *                      instructions)\n * @tparam Tiling       can use block based tensor evaluation\n *                      (see TensorBlock.h)\n */\nnamespace internal {\n\n/**\n * Evaluating TensorBroadcastingOp via coefficient of packet path is extremely\n * expensive. If expression has at least one broadcast op in it, and it supports\n * block based evaluation, we always prefer it, even for the small tensors. For\n * all other tileable ops, block evaluation overhead for small tensors (fits\n * into L1) is too large, and we fallback on vectorized evaluation.\n */\n\n// TODO(ezhulenev): Add specializations for all other types of Tensor ops.\n\ntemplate<typename Expression>\nstruct ExpressionHasTensorBroadcastingOp {\n  enum { value = false };\n};\n\ntemplate<typename LhsXprType, typename RhsXprType>\nstruct ExpressionHasTensorBroadcastingOp<\n    const TensorAssignOp<LhsXprType, RhsXprType> > {\n  enum { value = ExpressionHasTensorBroadcastingOp<RhsXprType>::value };\n};\n\ntemplate<typename UnaryOp, typename XprType>\nstruct ExpressionHasTensorBroadcastingOp<\n    const TensorCwiseUnaryOp<UnaryOp, XprType> > {\n  enum { value = ExpressionHasTensorBroadcastingOp<XprType>::value };\n};\n\ntemplate<typename BinaryOp, typename LhsXprType, typename RhsXprType>\nstruct ExpressionHasTensorBroadcastingOp<\n    const TensorCwiseBinaryOp<BinaryOp, LhsXprType, RhsXprType> > {\n  enum {\n    value = ExpressionHasTensorBroadcastingOp<LhsXprType>::value ||\n        ExpressionHasTensorBroadcastingOp<RhsXprType>::value\n  };\n};\n\ntemplate<typename Broadcast, typename XprType>\nstruct ExpressionHasTensorBroadcastingOp<\n    const TensorBroadcastingOp<Broadcast, XprType> > {\n  enum { value = true };\n};\n\n// -------------------------------------------------------------------------- //\n\n/**\n * Default strategy: the expression is evaluated sequentially with a single cpu\n * thread, without vectorization and block evaluation.\n */\ntemplate <typename Expression, typename Device, bool Vectorizable,\n          TiledEvaluation Tiling>\nclass TensorExecutor {\n public:\n  typedef typename Expression::Index StorageIndex;\n\n  // Including `unsupported/Eigen/CXX11/Tensor` in different translation units\n  // with/without `EIGEN_USE_THREADS` or `EIGEN_USE_GPU` is a potential ODR\n  // violation. If this template is instantiated with a non-default device, it\n  // means that this header file was included without defining\n  // `EIGEN_USE_THREADS`, `EIGEN_USE_GPU` or `EIGEN_USE_SYCL`.\n  static_assert(std::is_same<Device, DefaultDevice>::value,\n                \"Default executor instantiated with non-default device. \"\n                \"You must #define EIGEN_USE_THREADS, EIGEN_USE_GPU or \"\n                \"EIGEN_USE_SYCL before including Eigen headers.\");\n\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE void run(const Expression& expr,\n                                      const Device& device = Device()) {\n    TensorEvaluator<Expression, Device> evaluator(expr, device);\n    const bool needs_assign = evaluator.evalSubExprsIfNeeded(NULL);\n    if (needs_assign) {\n      const StorageIndex size = array_prod(evaluator.dimensions());\n      for (StorageIndex i = 0; i < size; ++i) {\n        evaluator.evalScalar(i);\n      }\n    }\n    evaluator.cleanup();\n  }\n};\n\n/**\n * Default async execution strategy is not implemented. Currently it's only\n * available for ThreadPoolDevice (see definition below).\n */\ntemplate <typename Expression, typename Device, typename DoneCallback,\n          bool Vectorizable, TiledEvaluation Tiling>\nclass TensorAsyncExecutor {};\n\n/**\n * Process all the data with a single cpu thread, using vectorized instructions.\n */\ntemplate <typename Expression>\nclass TensorExecutor<Expression, DefaultDevice, /*Vectorizable=*/true,\n                     /*Tiling=*/TiledEvaluation::Off> {\n public:\n  typedef typename Expression::Index StorageIndex;\n\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE void run(\n      const Expression& expr, const DefaultDevice& device = DefaultDevice()) {\n    TensorEvaluator<Expression, DefaultDevice> evaluator(expr, device);\n    const bool needs_assign = evaluator.evalSubExprsIfNeeded(NULL);\n    if (needs_assign) {\n      const StorageIndex size = array_prod(evaluator.dimensions());\n      const int PacketSize = unpacket_traits<typename TensorEvaluator<\n          Expression, DefaultDevice>::PacketReturnType>::size;\n\n      // Give compiler a strong possibility to unroll the loop. But don't insist\n      // on unrolling, because if the function is expensive compiler should not\n      // unroll the loop at the expense of inlining.\n      const StorageIndex UnrolledSize =\n          (size / (4 * PacketSize)) * 4 * PacketSize;\n      for (StorageIndex i = 0; i < UnrolledSize; i += 4 * PacketSize) {\n        for (StorageIndex j = 0; j < 4; j++) {\n          evaluator.evalPacket(i + j * PacketSize);\n        }\n      }\n      const StorageIndex VectorizedSize = (size / PacketSize) * PacketSize;\n      for (StorageIndex i = UnrolledSize; i < VectorizedSize; i += PacketSize) {\n        evaluator.evalPacket(i);\n      }\n      for (StorageIndex i = VectorizedSize; i < size; ++i) {\n        evaluator.evalScalar(i);\n      }\n    }\n    evaluator.cleanup();\n  }\n};\n\n/**\n * Process all the data with a single cpu thread, using blocks of data. By\n * sizing a block to fit L1 cache we get better cache performance.\n */\ntemplate <typename Expression, bool Vectorizable>\nclass TensorExecutor<Expression, DefaultDevice, Vectorizable,\n                     /*Tiling=*/TiledEvaluation::On> {\n public:\n  typedef typename traits<Expression>::Scalar Scalar;\n  typedef typename remove_const<Scalar>::type ScalarNoConst;\n\n  typedef TensorEvaluator<Expression, DefaultDevice> Evaluator;\n  typedef typename traits<Expression>::Index StorageIndex;\n\n  static const int NumDims = traits<Expression>::NumDimensions;\n\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE void run(const Expression& expr,\n                         const DefaultDevice& device = DefaultDevice()) {\n    typedef TensorBlockMapper<NumDims, Evaluator::Layout, StorageIndex>\n        TensorBlockMapper;\n\n    typedef internal::TensorBlockDescriptor<NumDims, StorageIndex>\n        TensorBlockDesc;\n    typedef internal::TensorBlockScratchAllocator<DefaultDevice>\n        TensorBlockScratch;\n\n    Evaluator evaluator(expr, device);\n\n    // TODO(ezhulenev): Do not use tiling for small tensors?\n    const bool needs_assign = evaluator.evalSubExprsIfNeeded(NULL);\n\n    if (needs_assign) {\n      // Query expression tree for desired block size/shape.\n      const TensorBlockResourceRequirements requirements =\n          evaluator.getResourceRequirements();\n\n      const TensorBlockMapper block_mapper(\n          typename TensorBlockDesc::Dimensions(evaluator.dimensions()),\n          requirements);\n\n      // Share scratch memory allocator between all blocks.\n      TensorBlockScratch scratch(device);\n\n      const StorageIndex total_block_count = block_mapper.blockCount();\n      for (StorageIndex i = 0; i < total_block_count; ++i) {\n        TensorBlockDesc desc = block_mapper.blockDescriptor(i);\n        evaluator.evalBlock(desc, scratch);\n        scratch.reset();\n      }\n    }\n    evaluator.cleanup();\n  }\n};\n\n/**\n * Multicore strategy: the index space is partitioned and each partition is\n * executed on a single core.\n *\n * (1) TensorExecutor will submit work to the ThreadPoolDevice managed thread\n *     pool, and will block the caller thread until all tasks are finished.\n *\n * (2) TensorAsyncExecutor is a non-blocking version, that will submit work to\n *     the ThreadPoolDevice managed thread pool, and will return immediately.\n *     It will call 'done' callback after all tasks are finished.\n */\n#ifdef EIGEN_USE_THREADS\n\ntemplate <typename TensorBlockMapper>\nstruct TensorExecutorTilingContext {\n  TensorExecutorTilingContext() = default;\n  TensorExecutorTilingContext(const TensorBlockMapper& b_mapper,\n                              const TensorOpCost& b_cost, size_t b_aligned_size)\n      : block_mapper(b_mapper),\n        cost(b_cost),\n        aligned_blocksize(b_aligned_size) {}\n\n  TensorBlockMapper block_mapper;  // navigate through blocks\n  TensorOpCost cost;               // cost of computing a single block\n  size_t aligned_blocksize;        // block size after memory alignment\n};\n\n// Computes a block evaluation parameters, and allocates temporary memory buffer\n// for blocks. See TensorExecutor/TensorAsyncExecutor (Tiling=On) below.\ntemplate <typename Evaluator, typename TensorBlockMapper, bool Vectorizable>\nTensorExecutorTilingContext<TensorBlockMapper> GetTensorExecutorTilingContext(\n    const Evaluator& evaluator) {\n  // Query expression tree for desired block size/shape.\n  TensorBlockResourceRequirements requirements =\n      evaluator.getResourceRequirements();\n\n  // Update target block size based on cost model.\n  double taskSize = TensorCostModel<ThreadPoolDevice>::taskSize(\n      1, requirements.cost_per_coeff);\n  requirements.size = static_cast<size_t>(1.0 / taskSize);\n\n  TensorBlockMapper block_mapper(\n      typename TensorBlockMapper::Dimensions(evaluator.dimensions()),\n      requirements);\n\n  size_t block_size = block_mapper.blockTotalSize();\n  const size_t align = numext::maxi(EIGEN_MAX_ALIGN_BYTES, 1);\n  const size_t aligned_blocksize =\n      align *\n      divup<size_t>(block_size * sizeof(typename Evaluator::Scalar), align);\n\n  return {block_mapper, requirements.cost_per_coeff * block_size,\n          aligned_blocksize};\n}\n\ntemplate <typename Evaluator, typename StorageIndex, bool Vectorizable>\nstruct EvalRange {\n  static void run(Evaluator* evaluator_in, const StorageIndex firstIdx,\n                  const StorageIndex lastIdx) {\n    Evaluator evaluator = *evaluator_in;\n    eigen_assert(lastIdx >= firstIdx);\n    for (StorageIndex i = firstIdx; i < lastIdx; ++i) {\n      evaluator.evalScalar(i);\n    }\n  }\n\n  static StorageIndex alignBlockSize(StorageIndex size) { return size; }\n};\n\ntemplate <typename Evaluator, typename StorageIndex>\nstruct EvalRange<Evaluator, StorageIndex, /*Vectorizable*/ true> {\n  static const int PacketSize =\n      unpacket_traits<typename Evaluator::PacketReturnType>::size;\n\n  static void run(Evaluator* evaluator_in, const StorageIndex firstIdx,\n                  const StorageIndex lastIdx) {\n    Evaluator evaluator = *evaluator_in;\n    eigen_assert(lastIdx >= firstIdx);\n    StorageIndex i = firstIdx;\n    if (lastIdx - firstIdx >= PacketSize) {\n      eigen_assert(firstIdx % PacketSize == 0);\n      StorageIndex last_chunk_offset = lastIdx - 4 * PacketSize;\n      // Give compiler a strong possibility to unroll the loop. But don't insist\n      // on unrolling, because if the function is expensive compiler should not\n      // unroll the loop at the expense of inlining.\n      for (; i <= last_chunk_offset; i += 4 * PacketSize) {\n        for (StorageIndex j = 0; j < 4; j++) {\n          evaluator.evalPacket(i + j * PacketSize);\n        }\n      }\n      last_chunk_offset = lastIdx - PacketSize;\n      for (; i <= last_chunk_offset; i += PacketSize) {\n        evaluator.evalPacket(i);\n      }\n    }\n    for (; i < lastIdx; ++i) {\n      evaluator.evalScalar(i);\n    }\n  }\n\n  static StorageIndex alignBlockSize(StorageIndex size) {\n    // Align block size to packet size and account for unrolling in run above.\n    if (size >= 16 * PacketSize) {\n      return (size + 4 * PacketSize - 1) & ~(4 * PacketSize - 1);\n    }\n    // Aligning to 4 * PacketSize would increase block size by more than 25%.\n    return (size + PacketSize - 1) & ~(PacketSize - 1);\n  }\n};\n\ntemplate <typename Expression, bool Vectorizable, TiledEvaluation Tiling>\nclass TensorExecutor<Expression, ThreadPoolDevice, Vectorizable, Tiling> {\n public:\n  typedef typename Expression::Index StorageIndex;\n\n  static EIGEN_STRONG_INLINE void run(const Expression& expr,\n                         const ThreadPoolDevice& device) {\n    typedef TensorEvaluator<Expression, ThreadPoolDevice> Evaluator;\n    typedef EvalRange<Evaluator, StorageIndex, Vectorizable> EvalRange;\n\n    Evaluator evaluator(expr, device);\n    const bool needs_assign = evaluator.evalSubExprsIfNeeded(nullptr);\n    if (needs_assign) {\n      const StorageIndex size = array_prod(evaluator.dimensions());\n      device.parallelFor(size, evaluator.costPerCoeff(Vectorizable),\n                         EvalRange::alignBlockSize,\n                         [&evaluator](StorageIndex firstIdx, StorageIndex lastIdx) {\n                           EvalRange::run(&evaluator, firstIdx, lastIdx);\n                         });\n    }\n    evaluator.cleanup();\n  }\n};\n\ntemplate <typename Expression, bool Vectorizable>\nclass TensorExecutor<Expression, ThreadPoolDevice, Vectorizable,\n                     /*Tiling=*/TiledEvaluation::On> {\n public:\n  typedef typename traits<Expression>::Index IndexType;\n  typedef typename traits<Expression>::Scalar Scalar;\n  typedef typename remove_const<Scalar>::type ScalarNoConst;\n\n  static const int NumDims = traits<Expression>::NumDimensions;\n\n  typedef TensorEvaluator<Expression, ThreadPoolDevice> Evaluator;\n  typedef TensorBlockMapper<NumDims, Evaluator::Layout, IndexType> BlockMapper;\n  typedef TensorExecutorTilingContext<BlockMapper> TilingContext;\n\n  typedef internal::TensorBlockDescriptor<NumDims, IndexType>\n      TensorBlockDesc;\n  typedef internal::TensorBlockScratchAllocator<ThreadPoolDevice>\n      TensorBlockScratch;\n\n  static EIGEN_STRONG_INLINE void run(const Expression& expr,\n                                      const ThreadPoolDevice& device) {\n    Evaluator evaluator(expr, device);\n\n    const bool needs_assign = evaluator.evalSubExprsIfNeeded(nullptr);\n    if (needs_assign) {\n      const TilingContext tiling =\n          internal::GetTensorExecutorTilingContext<Evaluator, BlockMapper,\n                                                   Vectorizable>(evaluator);\n\n      auto eval_block = [&device, &evaluator, &tiling](IndexType firstBlockIdx,\n                                                       IndexType lastBlockIdx) {\n        TensorBlockScratch scratch(device);\n\n        for (IndexType block_idx = firstBlockIdx; block_idx < lastBlockIdx;\n             ++block_idx) {\n          TensorBlockDesc desc = tiling.block_mapper.blockDescriptor(block_idx);\n          evaluator.evalBlock(desc, scratch);\n          scratch.reset();\n        }\n      };\n\n      // Evaluate small expressions directly as a single block.\n      if (tiling.block_mapper.blockCount() == 1) {\n        TensorBlockScratch scratch(device);\n        TensorBlockDesc desc(0, tiling.block_mapper.blockDimensions());\n        evaluator.evalBlock(desc, scratch);\n      } else {\n        device.parallelFor(tiling.block_mapper.blockCount(), tiling.cost,\n                           eval_block);\n      }\n    }\n    evaluator.cleanup();\n  }\n};\n\ntemplate <typename Expression, typename DoneCallback, bool Vectorizable,\n          TiledEvaluation Tiling>\nclass TensorAsyncExecutor<Expression, ThreadPoolDevice, DoneCallback,\n                          Vectorizable, Tiling> {\n public:\n  typedef typename Expression::Index StorageIndex;\n  typedef TensorEvaluator<Expression, ThreadPoolDevice> Evaluator;\n\n  static EIGEN_STRONG_INLINE void runAsync(const Expression& expr,\n                                           const ThreadPoolDevice& device,\n                                           DoneCallback done) {\n    TensorAsyncExecutorContext* const ctx =\n        new TensorAsyncExecutorContext(expr, device, std::move(done));\n\n    const auto on_eval_subexprs = [ctx, &device](bool need_assign) -> void {\n      if (!need_assign) {\n        delete ctx;\n        return;\n      }\n\n      typedef EvalRange<Evaluator, StorageIndex, Vectorizable> EvalRange;\n      const StorageIndex size = array_prod(ctx->evaluator.dimensions());\n      device.parallelForAsync(\n          size, ctx->evaluator.costPerCoeff(Vectorizable),\n          EvalRange::alignBlockSize,\n          [ctx](StorageIndex firstIdx, StorageIndex lastIdx) {\n            EvalRange::run(&ctx->evaluator, firstIdx, lastIdx);\n          },\n          [ctx]() { delete ctx; });\n    };\n\n    ctx->evaluator.evalSubExprsIfNeededAsync(nullptr, on_eval_subexprs);\n  }\n\n private:\n  struct TensorAsyncExecutorContext {\n    TensorAsyncExecutorContext(const Expression& expr,\n                               const ThreadPoolDevice& thread_pool,\n                               DoneCallback done)\n        : evaluator(expr, thread_pool), on_done(std::move(done)) {}\n\n    ~TensorAsyncExecutorContext() {\n      evaluator.cleanup();\n      on_done();\n    }\n\n    Evaluator evaluator;\n\n   private:\n    DoneCallback on_done;\n  };\n};\n\ntemplate <typename Expression, typename DoneCallback, bool Vectorizable>\nclass TensorAsyncExecutor<Expression, ThreadPoolDevice, DoneCallback,\n                          Vectorizable, /*Tileable*/ TiledEvaluation::On> {\n public:\n  typedef typename traits<Expression>::Index IndexType;\n  typedef typename traits<Expression>::Scalar Scalar;\n  typedef typename remove_const<Scalar>::type ScalarNoConst;\n\n  static const int NumDims = traits<Expression>::NumDimensions;\n\n  typedef TensorEvaluator<Expression, ThreadPoolDevice> Evaluator;\n  typedef TensorBlockMapper<NumDims, Evaluator::Layout, IndexType> BlockMapper;\n  typedef TensorExecutorTilingContext<BlockMapper> TilingContext;\n\n  typedef internal::TensorBlockDescriptor<NumDims, IndexType> TensorBlockDesc;\n  typedef internal::TensorBlockScratchAllocator<ThreadPoolDevice>\n      TensorBlockScratch;\n\n  static EIGEN_STRONG_INLINE void runAsync(const Expression& expr,\n                                           const ThreadPoolDevice& device,\n                                           DoneCallback done) {\n\n    TensorAsyncExecutorContext* const ctx =\n        new TensorAsyncExecutorContext(expr, device, std::move(done));\n\n    const auto on_eval_subexprs = [ctx](bool need_assign) -> void {\n      if (!need_assign) {\n        delete ctx;\n        return;\n      }\n\n      ctx->tiling = internal::GetTensorExecutorTilingContext<\n          Evaluator, BlockMapper, Vectorizable>(ctx->evaluator);\n\n      auto eval_block = [ctx](IndexType firstBlockIdx, IndexType lastBlockIdx) {\n        TensorBlockScratch scratch(ctx->device);\n\n        for (IndexType block_idx = firstBlockIdx; block_idx < lastBlockIdx;\n             ++block_idx) {\n          TensorBlockDesc desc =\n              ctx->tiling.block_mapper.blockDescriptor(block_idx);\n          ctx->evaluator.evalBlock(desc, scratch);\n          scratch.reset();\n        }\n      };\n\n      // Evaluate small expressions directly as a single block.\n      if (ctx->tiling.block_mapper.blockCount() == 1) {\n        TensorBlockScratch scratch(ctx->device);\n        TensorBlockDesc desc(0, ctx->tiling.block_mapper.blockDimensions());\n        ctx->evaluator.evalBlock(desc, scratch);\n        delete ctx;\n      } else {\n        ctx->device.parallelForAsync(ctx->tiling.block_mapper.blockCount(),\n                                     ctx->tiling.cost, eval_block,\n                                     [ctx]() { delete ctx; });\n      }\n    };\n\n    ctx->evaluator.evalSubExprsIfNeededAsync(nullptr, on_eval_subexprs);\n  }\n\n private:\n  struct TensorAsyncExecutorContext {\n    TensorAsyncExecutorContext(const Expression& expr,\n                               const ThreadPoolDevice& thread_pool,\n                               DoneCallback done)\n        : device(thread_pool),\n          evaluator(expr, thread_pool),\n          on_done(std::move(done)) {}\n\n    ~TensorAsyncExecutorContext() {\n      evaluator.cleanup();\n      on_done();\n    }\n\n    const ThreadPoolDevice& device;\n    Evaluator evaluator;\n    TilingContext tiling;\n\n   private:\n    DoneCallback on_done;\n  };\n};\n\n#endif  // EIGEN_USE_THREADS\n\n// GPU: the evaluation of the expression is offloaded to a GPU.\n#if defined(EIGEN_USE_GPU)\n\ntemplate <typename Expression, bool Vectorizable, TiledEvaluation Tiling>\nclass TensorExecutor<Expression, GpuDevice, Vectorizable, Tiling> {\n public:\n  typedef typename Expression::Index StorageIndex;\n  static void run(const Expression& expr, const GpuDevice& device);\n};\n\n#if defined(EIGEN_GPUCC)\ntemplate <typename Evaluator, typename StorageIndex, bool Vectorizable>\nstruct EigenMetaKernelEval {\n  static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\n  void run(Evaluator& eval, StorageIndex firstIdx, StorageIndex lastIdx, StorageIndex step_size) {\n    for (StorageIndex i = firstIdx; i < lastIdx; i += step_size) {\n      eval.evalScalar(i);\n    }\n  }\n};\n\ntemplate <typename Evaluator, typename StorageIndex>\nstruct EigenMetaKernelEval<Evaluator, StorageIndex, true> {\n  static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\n  void run(Evaluator& eval, StorageIndex firstIdx, StorageIndex lastIdx, StorageIndex step_size) {\n    const StorageIndex PacketSize = unpacket_traits<typename Evaluator::PacketReturnType>::size;\n    const StorageIndex vectorized_size = (lastIdx / PacketSize) * PacketSize;\n    const StorageIndex vectorized_step_size = step_size * PacketSize;\n\n    // Use the vector path\n    for (StorageIndex i = firstIdx * PacketSize; i < vectorized_size;\n         i += vectorized_step_size) {\n      eval.evalPacket(i);\n    }\n    for (StorageIndex i = vectorized_size + firstIdx; i < lastIdx; i += step_size) {\n      eval.evalScalar(i);\n    }\n  }\n};\n\ntemplate <typename Evaluator, typename StorageIndex>\n__global__ void\n__launch_bounds__(1024)\nEigenMetaKernel(Evaluator eval, StorageIndex size) {\n\n  const StorageIndex first_index = blockIdx.x * blockDim.x + threadIdx.x;\n  const StorageIndex step_size = blockDim.x * gridDim.x;\n\n  const bool vectorizable = Evaluator::PacketAccess & Evaluator::IsAligned;\n  EigenMetaKernelEval<Evaluator, StorageIndex, vectorizable>::run(eval, first_index, size, step_size);\n}\n\n/*static*/\ntemplate <typename Expression, bool Vectorizable, TiledEvaluation Tiling>\nEIGEN_STRONG_INLINE void TensorExecutor<Expression, GpuDevice, Vectorizable, Tiling>::run(\n    const Expression& expr, const GpuDevice& device) {\n  TensorEvaluator<Expression, GpuDevice> evaluator(expr, device);\n  const bool needs_assign = evaluator.evalSubExprsIfNeeded(nullptr);\n  if (needs_assign) {\n\n    const int block_size = device.maxGpuThreadsPerBlock();\n    const int max_blocks = device.getNumGpuMultiProcessors() *\n                           device.maxGpuThreadsPerMultiProcessor() / block_size;\n    const StorageIndex size = array_prod(evaluator.dimensions());\n    // Create a least one block to ensure we won't crash when tensorflow calls with tensors of size 0.\n    const int num_blocks = numext::maxi<int>(numext::mini<int>(max_blocks, divup<int>(size, block_size)), 1);\n\n    LAUNCH_GPU_KERNEL(\n        (EigenMetaKernel<TensorEvaluator<Expression, GpuDevice>, StorageIndex>),\n        num_blocks, block_size, 0, device, evaluator, size);\n  }\n  evaluator.cleanup();\n}\n\n#endif  // EIGEN_GPUCC\n#endif  // EIGEN_USE_GPU\n\n// SYCL Executor policy\n#ifdef EIGEN_USE_SYCL\n\ntemplate <typename Evaluator>\nstruct ExecExprFunctorKernel {\n  typedef typename Evaluator::Index Index;\n  Evaluator evaluator;\n  const Index range;\n  template <typename Scratch>\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE ExecExprFunctorKernel(\n      const Scratch, Evaluator evaluator_, const Index range_)\n      : evaluator(evaluator_), range(range_) {}\n\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void operator()(\n      cl::sycl::nd_item<1> itemID) {\n    compute(itemID);\n  }\n  template <bool is_vec = Evaluator::PacketAccess>\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE typename std::enable_if<!is_vec>::type\n  compute(const cl::sycl::nd_item<1>& itemID) {\n    Index gId = static_cast<Index>(itemID.get_global_linear_id());\n    Index total_threads = itemID.get_global_range(0);\n\n    for (Index i = gId; i < range; i += total_threads) {\n      evaluator.evalScalar(i);\n    }\n  }\n  template <bool is_vec = Evaluator::PacketAccess>\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE typename std::enable_if<is_vec>::type\n  compute(const cl::sycl::nd_item<1>& itemID) {\n    const Index vectorizedRange =\n        (range / Evaluator::PacketSize) * Evaluator::PacketSize;\n    Index gId = static_cast<Index>(itemID.get_global_linear_id());\n    const Index step = Evaluator::PacketSize * itemID.get_global_range(0);\n    const Index start = Evaluator::PacketSize * gId;\n    for (Index i = start; i < vectorizedRange; i += step) {\n      evaluator.evalPacket(i);\n    }\n    gId += vectorizedRange;\n    for (Index i = gId; i < range; i += itemID.get_global_range(0)) {\n      evaluator.evalScalar(i);\n    }\n  }\n};\n\ntemplate <typename Expression, bool Vectorizable, TiledEvaluation Tiling>\nclass TensorExecutor<Expression, Eigen::SyclDevice, Vectorizable, Tiling> {\n public:\n  typedef typename Expression::Index Index;\n  static EIGEN_STRONG_INLINE void run(const Expression& expr,\n                                      const Eigen::SyclDevice& dev) {\n    typedef Eigen::TensorEvaluator<Expression, Eigen::SyclDevice> Evaluator;\n    Evaluator evaluator(expr, dev);\n    const bool needs_assign = evaluator.evalSubExprsIfNeeded(NULL);\n    if (needs_assign) {\n      Index range, GRange, tileSize;\n      Index total_size = ::Eigen::internal::array_prod(evaluator.dimensions());\n      total_size = (total_size == 0) ? 1 : total_size;\n      const int PacketSize =\n          Eigen::PacketType<typename Evaluator::CoeffReturnType,\n                            Eigen::SyclDevice>::size;\n      Index vectorizable_threads = static_cast<Index>(total_size / PacketSize);\n      dev.parallel_for_setup(vectorizable_threads, tileSize, range, GRange);\n      range = total_size;\n\n      dev.template nullary_kernel_launcher<\n          typename Evaluator::CoeffReturnType,\n          ExecExprFunctorKernel<Evaluator> >(\n          evaluator,\n          cl::sycl::nd_range<1>(cl::sycl::range<1>(GRange),\n                                cl::sycl::range<1>(tileSize)),\n          Index(1), range);\n    }\n    evaluator.cleanup();\n  }\n};\n\n#endif\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_EXECUTOR_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorExpr.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_EXPR_H\n#define EIGEN_CXX11_TENSOR_TENSOR_EXPR_H\n\nnamespace Eigen {\n\n/** \\class TensorExpr\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief Tensor expression classes.\n  *\n  * The TensorCwiseNullaryOp class applies a nullary operators to an expression.\n  * This is typically used to generate constants.\n  *\n  * The TensorCwiseUnaryOp class represents an expression where a unary operator\n  * (e.g. cwiseSqrt) is applied to an expression.\n  *\n  * The TensorCwiseBinaryOp class represents an expression where a binary\n  * operator (e.g. addition) is applied to a lhs and a rhs expression.\n  *\n  */\nnamespace internal {\ntemplate<typename NullaryOp, typename XprType>\nstruct traits<TensorCwiseNullaryOp<NullaryOp, XprType> >\n    : traits<XprType>\n{\n  typedef traits<XprType> XprTraits;\n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::Nested XprTypeNested;\n  typedef typename remove_reference<XprTypeNested>::type _XprTypeNested;\n  static const int NumDimensions = XprTraits::NumDimensions;\n  static const int Layout = XprTraits::Layout;\n  typedef typename XprTraits::PointerType PointerType;\n  enum {\n    Flags = 0\n  };\n};\n\n}  // end namespace internal\n\n\n\ntemplate<typename NullaryOp, typename XprType>\nclass TensorCwiseNullaryOp : public TensorBase<TensorCwiseNullaryOp<NullaryOp, XprType>, ReadOnlyAccessors>\n{\n  public:\n    typedef typename Eigen::internal::traits<TensorCwiseNullaryOp>::Scalar Scalar;\n    typedef typename Eigen::NumTraits<Scalar>::Real RealScalar;\n    typedef typename XprType::CoeffReturnType CoeffReturnType;\n    typedef TensorCwiseNullaryOp<NullaryOp, XprType> Nested;\n    typedef typename Eigen::internal::traits<TensorCwiseNullaryOp>::StorageKind StorageKind;\n    typedef typename Eigen::internal::traits<TensorCwiseNullaryOp>::Index Index;\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorCwiseNullaryOp(const XprType& xpr, const NullaryOp& func = NullaryOp())\n        : m_xpr(xpr), m_functor(func) {}\n\n    EIGEN_DEVICE_FUNC\n    const typename internal::remove_all<typename XprType::Nested>::type&\n    nestedExpression() const { return m_xpr; }\n\n    EIGEN_DEVICE_FUNC\n    const NullaryOp& functor() const { return m_functor; }\n\n  protected:\n    typename XprType::Nested m_xpr;\n    const NullaryOp m_functor;\n};\n\n\n\nnamespace internal {\ntemplate<typename UnaryOp, typename XprType>\nstruct traits<TensorCwiseUnaryOp<UnaryOp, XprType> >\n    : traits<XprType>\n{\n  // TODO(phli): Add InputScalar, InputPacket.  Check references to\n  // current Scalar/Packet to see if the intent is Input or Output.\n  typedef typename result_of<UnaryOp(typename XprType::Scalar)>::type Scalar;\n  typedef traits<XprType> XprTraits;\n  typedef typename XprType::Nested XprTypeNested;\n  typedef typename remove_reference<XprTypeNested>::type _XprTypeNested;\n  static const int NumDimensions = XprTraits::NumDimensions;\n  static const int Layout = XprTraits::Layout;\n  typedef typename TypeConversion<Scalar, \n                                  typename XprTraits::PointerType\n                                  >::type \n                                  PointerType;\n};\n\ntemplate<typename UnaryOp, typename XprType>\nstruct eval<TensorCwiseUnaryOp<UnaryOp, XprType>, Eigen::Dense>\n{\n  typedef const TensorCwiseUnaryOp<UnaryOp, XprType>& type;\n};\n\ntemplate<typename UnaryOp, typename XprType>\nstruct nested<TensorCwiseUnaryOp<UnaryOp, XprType>, 1, typename eval<TensorCwiseUnaryOp<UnaryOp, XprType> >::type>\n{\n  typedef TensorCwiseUnaryOp<UnaryOp, XprType> type;\n};\n\n}  // end namespace internal\n\n\n\ntemplate<typename UnaryOp, typename XprType>\nclass TensorCwiseUnaryOp : public TensorBase<TensorCwiseUnaryOp<UnaryOp, XprType>, ReadOnlyAccessors>\n{\n  public:\n    // TODO(phli): Add InputScalar, InputPacket.  Check references to\n    // current Scalar/Packet to see if the intent is Input or Output.\n    typedef typename Eigen::internal::traits<TensorCwiseUnaryOp>::Scalar Scalar;\n    typedef typename Eigen::NumTraits<Scalar>::Real RealScalar;\n    typedef Scalar CoeffReturnType;\n    typedef typename Eigen::internal::nested<TensorCwiseUnaryOp>::type Nested;\n    typedef typename Eigen::internal::traits<TensorCwiseUnaryOp>::StorageKind StorageKind;\n    typedef typename Eigen::internal::traits<TensorCwiseUnaryOp>::Index Index;\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorCwiseUnaryOp(const XprType& xpr, const UnaryOp& func = UnaryOp())\n      : m_xpr(xpr), m_functor(func) {}\n\n    EIGEN_DEVICE_FUNC\n    const UnaryOp& functor() const { return m_functor; }\n\n    /** \\returns the nested expression */\n    EIGEN_DEVICE_FUNC\n    const typename internal::remove_all<typename XprType::Nested>::type&\n    nestedExpression() const { return m_xpr; }\n\n  protected:\n    typename XprType::Nested m_xpr;\n    const UnaryOp m_functor;\n};\n\n\nnamespace internal {\ntemplate<typename BinaryOp, typename LhsXprType, typename RhsXprType>\nstruct traits<TensorCwiseBinaryOp<BinaryOp, LhsXprType, RhsXprType> >\n{\n  // Type promotion to handle the case where the types of the lhs and the rhs\n  // are different.\n  // TODO(phli): Add Lhs/RhsScalar, Lhs/RhsPacket.  Check references to\n  // current Scalar/Packet to see if the intent is Inputs or Output.\n  typedef typename result_of<\n      BinaryOp(typename LhsXprType::Scalar,\n               typename RhsXprType::Scalar)>::type Scalar;\n  typedef traits<LhsXprType> XprTraits;\n  typedef typename promote_storage_type<\n      typename traits<LhsXprType>::StorageKind,\n      typename traits<RhsXprType>::StorageKind>::ret StorageKind;\n  typedef typename promote_index_type<\n      typename traits<LhsXprType>::Index,\n      typename traits<RhsXprType>::Index>::type Index;\n  typedef typename LhsXprType::Nested LhsNested;\n  typedef typename RhsXprType::Nested RhsNested;\n  typedef typename remove_reference<LhsNested>::type _LhsNested;\n  typedef typename remove_reference<RhsNested>::type _RhsNested;\n  static const int NumDimensions = XprTraits::NumDimensions;\n  static const int Layout = XprTraits::Layout;\n  typedef typename TypeConversion<Scalar,\n                                  typename conditional<Pointer_type_promotion<typename LhsXprType::Scalar, Scalar>::val,\n                                                      typename traits<LhsXprType>::PointerType,\n                                                      typename traits<RhsXprType>::PointerType>::type\n                                  >::type \n                                  PointerType;\n  enum {\n    Flags = 0\n  };\n};\n\ntemplate<typename BinaryOp, typename LhsXprType, typename RhsXprType>\nstruct eval<TensorCwiseBinaryOp<BinaryOp, LhsXprType, RhsXprType>, Eigen::Dense>\n{\n  typedef const TensorCwiseBinaryOp<BinaryOp, LhsXprType, RhsXprType>& type;\n};\n\ntemplate<typename BinaryOp, typename LhsXprType, typename RhsXprType>\nstruct nested<TensorCwiseBinaryOp<BinaryOp, LhsXprType, RhsXprType>, 1, typename eval<TensorCwiseBinaryOp<BinaryOp, LhsXprType, RhsXprType> >::type>\n{\n  typedef TensorCwiseBinaryOp<BinaryOp, LhsXprType, RhsXprType> type;\n};\n\n}  // end namespace internal\n\n\n\ntemplate<typename BinaryOp, typename LhsXprType, typename RhsXprType>\nclass TensorCwiseBinaryOp : public TensorBase<TensorCwiseBinaryOp<BinaryOp, LhsXprType, RhsXprType>, ReadOnlyAccessors>\n{\n  public:\n    // TODO(phli): Add Lhs/RhsScalar, Lhs/RhsPacket.  Check references to\n    // current Scalar/Packet to see if the intent is Inputs or Output.\n    typedef typename Eigen::internal::traits<TensorCwiseBinaryOp>::Scalar Scalar;\n    typedef typename Eigen::NumTraits<Scalar>::Real RealScalar;\n    typedef Scalar CoeffReturnType;\n    typedef typename Eigen::internal::nested<TensorCwiseBinaryOp>::type Nested;\n    typedef typename Eigen::internal::traits<TensorCwiseBinaryOp>::StorageKind StorageKind;\n    typedef typename Eigen::internal::traits<TensorCwiseBinaryOp>::Index Index;\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorCwiseBinaryOp(const LhsXprType& lhs, const RhsXprType& rhs, const BinaryOp& func = BinaryOp())\n        : m_lhs_xpr(lhs), m_rhs_xpr(rhs), m_functor(func) {}\n\n    EIGEN_DEVICE_FUNC\n    const BinaryOp& functor() const { return m_functor; }\n\n    /** \\returns the nested expressions */\n    EIGEN_DEVICE_FUNC\n    const typename internal::remove_all<typename LhsXprType::Nested>::type&\n    lhsExpression() const { return m_lhs_xpr; }\n\n    EIGEN_DEVICE_FUNC\n    const typename internal::remove_all<typename RhsXprType::Nested>::type&\n    rhsExpression() const { return m_rhs_xpr; }\n\n  protected:\n    typename LhsXprType::Nested m_lhs_xpr;\n    typename RhsXprType::Nested m_rhs_xpr;\n    const BinaryOp m_functor;\n};\n\n\nnamespace internal {\ntemplate<typename TernaryOp, typename Arg1XprType, typename Arg2XprType, typename Arg3XprType>\nstruct traits<TensorCwiseTernaryOp<TernaryOp, Arg1XprType, Arg2XprType, Arg3XprType> >\n{\n  // Type promotion to handle the case where the types of the args are different.\n  typedef typename result_of<\n      TernaryOp(typename Arg1XprType::Scalar,\n                typename Arg2XprType::Scalar,\n                typename Arg3XprType::Scalar)>::type Scalar;\n  typedef traits<Arg1XprType> XprTraits;\n  typedef typename traits<Arg1XprType>::StorageKind StorageKind;\n  typedef typename traits<Arg1XprType>::Index Index;\n  typedef typename Arg1XprType::Nested Arg1Nested;\n  typedef typename Arg2XprType::Nested Arg2Nested;\n  typedef typename Arg3XprType::Nested Arg3Nested;\n  typedef typename remove_reference<Arg1Nested>::type _Arg1Nested;\n  typedef typename remove_reference<Arg2Nested>::type _Arg2Nested;\n  typedef typename remove_reference<Arg3Nested>::type _Arg3Nested;\n  static const int NumDimensions = XprTraits::NumDimensions;\n  static const int Layout = XprTraits::Layout;\n  typedef typename TypeConversion<Scalar,\n                                  typename conditional<Pointer_type_promotion<typename Arg2XprType::Scalar, Scalar>::val,\n                                                      typename traits<Arg2XprType>::PointerType,\n                                                      typename traits<Arg3XprType>::PointerType>::type\n                                  >::type \n                                  PointerType;\n  enum {\n    Flags = 0\n  };\n};\n\ntemplate<typename TernaryOp, typename Arg1XprType, typename Arg2XprType, typename Arg3XprType>\nstruct eval<TensorCwiseTernaryOp<TernaryOp, Arg1XprType, Arg2XprType, Arg3XprType>, Eigen::Dense>\n{\n  typedef const TensorCwiseTernaryOp<TernaryOp, Arg1XprType, Arg2XprType, Arg3XprType>& type;\n};\n\ntemplate<typename TernaryOp, typename Arg1XprType, typename Arg2XprType, typename Arg3XprType>\nstruct nested<TensorCwiseTernaryOp<TernaryOp, Arg1XprType, Arg2XprType, Arg3XprType>, 1, typename eval<TensorCwiseTernaryOp<TernaryOp, Arg1XprType, Arg2XprType, Arg3XprType> >::type>\n{\n  typedef TensorCwiseTernaryOp<TernaryOp, Arg1XprType, Arg2XprType, Arg3XprType> type;\n};\n\n}  // end namespace internal\n\n\n\ntemplate<typename TernaryOp, typename Arg1XprType, typename Arg2XprType, typename Arg3XprType>\nclass TensorCwiseTernaryOp : public TensorBase<TensorCwiseTernaryOp<TernaryOp, Arg1XprType, Arg2XprType, Arg3XprType>, ReadOnlyAccessors>\n{\n  public:\n    typedef typename Eigen::internal::traits<TensorCwiseTernaryOp>::Scalar Scalar;\n    typedef typename Eigen::NumTraits<Scalar>::Real RealScalar;\n    typedef Scalar CoeffReturnType;\n    typedef typename Eigen::internal::nested<TensorCwiseTernaryOp>::type Nested;\n    typedef typename Eigen::internal::traits<TensorCwiseTernaryOp>::StorageKind StorageKind;\n    typedef typename Eigen::internal::traits<TensorCwiseTernaryOp>::Index Index;\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorCwiseTernaryOp(const Arg1XprType& arg1, const Arg2XprType& arg2, const Arg3XprType& arg3, const TernaryOp& func = TernaryOp())\n        : m_arg1_xpr(arg1), m_arg2_xpr(arg2), m_arg3_xpr(arg3), m_functor(func) {}\n\n    EIGEN_DEVICE_FUNC\n    const TernaryOp& functor() const { return m_functor; }\n\n    /** \\returns the nested expressions */\n    EIGEN_DEVICE_FUNC\n    const typename internal::remove_all<typename Arg1XprType::Nested>::type&\n    arg1Expression() const { return m_arg1_xpr; }\n\n    EIGEN_DEVICE_FUNC\n    const typename internal::remove_all<typename Arg2XprType::Nested>::type&\n    arg2Expression() const { return m_arg2_xpr; }\n\n    EIGEN_DEVICE_FUNC\n    const typename internal::remove_all<typename Arg3XprType::Nested>::type&\n    arg3Expression() const { return m_arg3_xpr; }\n\n  protected:\n    typename Arg1XprType::Nested m_arg1_xpr;\n    typename Arg2XprType::Nested m_arg2_xpr;\n    typename Arg3XprType::Nested m_arg3_xpr;\n    const TernaryOp m_functor;\n};\n\n\nnamespace internal {\ntemplate<typename IfXprType, typename ThenXprType, typename ElseXprType>\nstruct traits<TensorSelectOp<IfXprType, ThenXprType, ElseXprType> >\n    : traits<ThenXprType>\n{\n  typedef typename traits<ThenXprType>::Scalar Scalar;\n  typedef traits<ThenXprType> XprTraits;\n  typedef typename promote_storage_type<typename traits<ThenXprType>::StorageKind,\n                                        typename traits<ElseXprType>::StorageKind>::ret StorageKind;\n  typedef typename promote_index_type<typename traits<ElseXprType>::Index,\n                                      typename traits<ThenXprType>::Index>::type Index;\n  typedef typename IfXprType::Nested IfNested;\n  typedef typename ThenXprType::Nested ThenNested;\n  typedef typename ElseXprType::Nested ElseNested;\n  static const int NumDimensions = XprTraits::NumDimensions;\n  static const int Layout = XprTraits::Layout;\n  typedef typename conditional<Pointer_type_promotion<typename ThenXprType::Scalar, Scalar>::val,\n                               typename traits<ThenXprType>::PointerType,\n                               typename traits<ElseXprType>::PointerType>::type PointerType;\n};\n\ntemplate<typename IfXprType, typename ThenXprType, typename ElseXprType>\nstruct eval<TensorSelectOp<IfXprType, ThenXprType, ElseXprType>, Eigen::Dense>\n{\n  typedef const TensorSelectOp<IfXprType, ThenXprType, ElseXprType>& type;\n};\n\ntemplate<typename IfXprType, typename ThenXprType, typename ElseXprType>\nstruct nested<TensorSelectOp<IfXprType, ThenXprType, ElseXprType>, 1, typename eval<TensorSelectOp<IfXprType, ThenXprType, ElseXprType> >::type>\n{\n  typedef TensorSelectOp<IfXprType, ThenXprType, ElseXprType> type;\n};\n\n}  // end namespace internal\n\n\ntemplate<typename IfXprType, typename ThenXprType, typename ElseXprType>\nclass TensorSelectOp : public TensorBase<TensorSelectOp<IfXprType, ThenXprType, ElseXprType>, ReadOnlyAccessors>\n{\n  public:\n    typedef typename Eigen::internal::traits<TensorSelectOp>::Scalar Scalar;\n    typedef typename Eigen::NumTraits<Scalar>::Real RealScalar;\n    typedef typename internal::promote_storage_type<typename ThenXprType::CoeffReturnType,\n                                                    typename ElseXprType::CoeffReturnType>::ret CoeffReturnType;\n    typedef typename Eigen::internal::nested<TensorSelectOp>::type Nested;\n    typedef typename Eigen::internal::traits<TensorSelectOp>::StorageKind StorageKind;\n    typedef typename Eigen::internal::traits<TensorSelectOp>::Index Index;\n\n    EIGEN_DEVICE_FUNC\n    TensorSelectOp(const IfXprType& a_condition,\n                   const ThenXprType& a_then,\n                   const ElseXprType& a_else)\n      : m_condition(a_condition), m_then(a_then), m_else(a_else)\n    { }\n\n    EIGEN_DEVICE_FUNC\n    const IfXprType& ifExpression() const { return m_condition; }\n\n    EIGEN_DEVICE_FUNC\n    const ThenXprType& thenExpression() const { return m_then; }\n\n    EIGEN_DEVICE_FUNC\n    const ElseXprType& elseExpression() const { return m_else; }\n\n  protected:\n    typename IfXprType::Nested m_condition;\n    typename ThenXprType::Nested m_then;\n    typename ElseXprType::Nested m_else;\n};\n\n\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_EXPR_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorFFT.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Jianwei Cui <thucjw@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_FFT_H\n#define EIGEN_CXX11_TENSOR_TENSOR_FFT_H\n\nnamespace Eigen {\n\n/** \\class TensorFFT\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief Tensor FFT class.\n  *\n  * TODO:\n  * Vectorize the Cooley Tukey and the Bluestein algorithm\n  * Add support for multithreaded evaluation\n  * Improve the performance on GPU\n  */\n\ntemplate <bool NeedUprade> struct MakeComplex {\n  template <typename T>\n  EIGEN_DEVICE_FUNC\n  T operator() (const T& val) const { return val; }\n};\n\ntemplate <> struct MakeComplex<true> {\n  template <typename T>\n  EIGEN_DEVICE_FUNC\n  std::complex<T> operator() (const T& val) const { return std::complex<T>(val, 0); }\n};\n\ntemplate <> struct MakeComplex<false> {\n  template <typename T>\n  EIGEN_DEVICE_FUNC\n  std::complex<T> operator() (const std::complex<T>& val) const { return val; }\n};\n\ntemplate <int ResultType> struct PartOf {\n  template <typename T> T operator() (const T& val) const { return val; }\n};\n\ntemplate <> struct PartOf<RealPart> {\n  template <typename T> T operator() (const std::complex<T>& val) const { return val.real(); }\n};\n\ntemplate <> struct PartOf<ImagPart> {\n  template <typename T> T operator() (const std::complex<T>& val) const { return val.imag(); }\n};\n\nnamespace internal {\ntemplate <typename FFT, typename XprType, int FFTResultType, int FFTDir>\nstruct traits<TensorFFTOp<FFT, XprType, FFTResultType, FFTDir> > : public traits<XprType> {\n  typedef traits<XprType> XprTraits;\n  typedef typename NumTraits<typename XprTraits::Scalar>::Real RealScalar;\n  typedef typename std::complex<RealScalar> ComplexScalar;\n  typedef typename XprTraits::Scalar InputScalar;\n  typedef typename conditional<FFTResultType == RealPart || FFTResultType == ImagPart, RealScalar, ComplexScalar>::type OutputScalar;\n  typedef typename XprTraits::StorageKind StorageKind;\n  typedef typename XprTraits::Index Index;\n  typedef typename XprType::Nested Nested;\n  typedef typename remove_reference<Nested>::type _Nested;\n  static const int NumDimensions = XprTraits::NumDimensions;\n  static const int Layout = XprTraits::Layout;\n  typedef typename traits<XprType>::PointerType PointerType;\n};\n\ntemplate <typename FFT, typename XprType, int FFTResultType, int FFTDirection>\nstruct eval<TensorFFTOp<FFT, XprType, FFTResultType, FFTDirection>, Eigen::Dense> {\n  typedef const TensorFFTOp<FFT, XprType, FFTResultType, FFTDirection>& type;\n};\n\ntemplate <typename FFT, typename XprType, int FFTResultType, int FFTDirection>\nstruct nested<TensorFFTOp<FFT, XprType, FFTResultType, FFTDirection>, 1, typename eval<TensorFFTOp<FFT, XprType, FFTResultType, FFTDirection> >::type> {\n  typedef TensorFFTOp<FFT, XprType, FFTResultType, FFTDirection> type;\n};\n\n}  // end namespace internal\n\ntemplate <typename FFT, typename XprType, int FFTResultType, int FFTDir>\nclass TensorFFTOp : public TensorBase<TensorFFTOp<FFT, XprType, FFTResultType, FFTDir>, ReadOnlyAccessors> {\n public:\n  typedef typename Eigen::internal::traits<TensorFFTOp>::Scalar Scalar;\n  typedef typename Eigen::NumTraits<Scalar>::Real RealScalar;\n  typedef typename std::complex<RealScalar> ComplexScalar;\n  typedef typename internal::conditional<FFTResultType == RealPart || FFTResultType == ImagPart, RealScalar, ComplexScalar>::type OutputScalar;\n  typedef OutputScalar CoeffReturnType;\n  typedef typename Eigen::internal::nested<TensorFFTOp>::type Nested;\n  typedef typename Eigen::internal::traits<TensorFFTOp>::StorageKind StorageKind;\n  typedef typename Eigen::internal::traits<TensorFFTOp>::Index Index;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorFFTOp(const XprType& expr, const FFT& fft)\n      : m_xpr(expr), m_fft(fft) {}\n\n  EIGEN_DEVICE_FUNC\n  const FFT& fft() const { return m_fft; }\n\n  EIGEN_DEVICE_FUNC\n  const typename internal::remove_all<typename XprType::Nested>::type& expression() const {\n    return m_xpr;\n  }\n\n protected:\n  typename XprType::Nested m_xpr;\n  const FFT m_fft;\n};\n\n// Eval as rvalue\ntemplate <typename FFT, typename ArgType, typename Device, int FFTResultType, int FFTDir>\nstruct TensorEvaluator<const TensorFFTOp<FFT, ArgType, FFTResultType, FFTDir>, Device> {\n  typedef TensorFFTOp<FFT, ArgType, FFTResultType, FFTDir> XprType;\n  typedef typename XprType::Index Index;\n  static const int NumDims = internal::array_size<typename TensorEvaluator<ArgType, Device>::Dimensions>::value;\n  typedef DSizes<Index, NumDims> Dimensions;\n  typedef typename XprType::Scalar Scalar;\n  typedef typename Eigen::NumTraits<Scalar>::Real RealScalar;\n  typedef typename std::complex<RealScalar> ComplexScalar;\n  typedef typename TensorEvaluator<ArgType, Device>::Dimensions InputDimensions;\n  typedef internal::traits<XprType> XprTraits;\n  typedef typename XprTraits::Scalar InputScalar;\n  typedef typename internal::conditional<FFTResultType == RealPart || FFTResultType == ImagPart, RealScalar, ComplexScalar>::type OutputScalar;\n  typedef OutputScalar CoeffReturnType;\n  typedef typename PacketType<OutputScalar, Device>::type PacketReturnType;\n  static const int PacketSize = internal::unpacket_traits<PacketReturnType>::size;\n    typedef StorageMemory<CoeffReturnType, Device> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n\n  enum {\n    IsAligned = false,\n    PacketAccess = true,\n    BlockAccess = false,\n    PreferBlockAccess = false,\n    Layout = TensorEvaluator<ArgType, Device>::Layout,\n    CoordAccess = false,\n    RawAccess = false\n  };\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockNotImplemented TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device) : m_fft(op.fft()), m_impl(op.expression(), device), m_data(NULL), m_device(device) {\n    const typename TensorEvaluator<ArgType, Device>::Dimensions& input_dims = m_impl.dimensions();\n    for (int i = 0; i < NumDims; ++i) {\n      eigen_assert(input_dims[i] > 0);\n      m_dimensions[i] = input_dims[i];\n    }\n\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      m_strides[0] = 1;\n      for (int i = 1; i < NumDims; ++i) {\n        m_strides[i] = m_strides[i - 1] * m_dimensions[i - 1];\n      }\n    } else {\n      m_strides[NumDims - 1] = 1;\n      for (int i = NumDims - 2; i >= 0; --i) {\n        m_strides[i] = m_strides[i + 1] * m_dimensions[i + 1];\n      }\n    }\n    m_size = m_dimensions.TotalSize();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions& dimensions() const {\n    return m_dimensions;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType data) {\n    m_impl.evalSubExprsIfNeeded(NULL);\n    if (data) {\n      evalToBuf(data);\n      return false;\n    } else {\n      m_data = (EvaluatorPointerType)m_device.get((CoeffReturnType*)(m_device.allocate_temp(sizeof(CoeffReturnType) * m_size)));\n      evalToBuf(m_data);\n      return true;\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {\n    if (m_data) {\n      m_device.deallocate(m_data);\n      m_data = NULL;\n    }\n    m_impl.cleanup();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE CoeffReturnType coeff(Index index) const {\n    return m_data[index];\n  }\n\n  template <int LoadMode>\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE PacketReturnType\n  packet(Index index) const {\n    return internal::ploadt<PacketReturnType, LoadMode>(m_data + index);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost\n  costPerCoeff(bool vectorized) const {\n    return TensorOpCost(sizeof(CoeffReturnType), 0, 0, vectorized, PacketSize);\n  }\n\n  EIGEN_DEVICE_FUNC EvaluatorPointerType data() const { return m_data; }\n#ifdef EIGEN_USE_SYCL\n  // binding placeholder accessors to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {\n    m_data.bind(cgh);\n  }\n#endif\n\n private:\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalToBuf(EvaluatorPointerType data) {\n    const bool write_to_out = internal::is_same<OutputScalar, ComplexScalar>::value;\n    ComplexScalar* buf = write_to_out ? (ComplexScalar*)data : (ComplexScalar*)m_device.allocate(sizeof(ComplexScalar) * m_size);\n\n    for (Index i = 0; i < m_size; ++i) {\n      buf[i] = MakeComplex<internal::is_same<InputScalar, RealScalar>::value>()(m_impl.coeff(i));\n    }\n\n    for (size_t i = 0; i < m_fft.size(); ++i) {\n      Index dim = m_fft[i];\n      eigen_assert(dim >= 0 && dim < NumDims);\n      Index line_len = m_dimensions[dim];\n      eigen_assert(line_len >= 1);\n      ComplexScalar* line_buf = (ComplexScalar*)m_device.allocate(sizeof(ComplexScalar) * line_len);\n      const bool is_power_of_two = isPowerOfTwo(line_len);\n      const Index good_composite = is_power_of_two ? 0 : findGoodComposite(line_len);\n      const Index log_len = is_power_of_two ? getLog2(line_len) : getLog2(good_composite);\n\n      ComplexScalar* a = is_power_of_two ? NULL : (ComplexScalar*)m_device.allocate(sizeof(ComplexScalar) * good_composite);\n      ComplexScalar* b = is_power_of_two ? NULL : (ComplexScalar*)m_device.allocate(sizeof(ComplexScalar) * good_composite);\n      ComplexScalar* pos_j_base_powered = is_power_of_two ? NULL : (ComplexScalar*)m_device.allocate(sizeof(ComplexScalar) * (line_len + 1));\n      if (!is_power_of_two) {\n        // Compute twiddle factors\n        //   t_n = exp(sqrt(-1) * pi * n^2 / line_len)\n        // for n = 0, 1,..., line_len-1.\n        // For n > 2 we use the recurrence t_n = t_{n-1}^2 / t_{n-2} * t_1^2\n\n        // The recurrence is correct in exact arithmetic, but causes\n        // numerical issues for large transforms, especially in\n        // single-precision floating point.\n        //\n        // pos_j_base_powered[0] = ComplexScalar(1, 0);\n        // if (line_len > 1) {\n        //   const ComplexScalar pos_j_base = ComplexScalar(\n        //       numext::cos(M_PI / line_len), numext::sin(M_PI / line_len));\n        //   pos_j_base_powered[1] = pos_j_base;\n        //   if (line_len > 2) {\n        //     const ComplexScalar pos_j_base_sq = pos_j_base * pos_j_base;\n        //     for (int i = 2; i < line_len + 1; ++i) {\n        //       pos_j_base_powered[i] = pos_j_base_powered[i - 1] *\n        //           pos_j_base_powered[i - 1] /\n        //           pos_j_base_powered[i - 2] *\n        //           pos_j_base_sq;\n        //     }\n        //   }\n        // }\n        // TODO(rmlarsen): Find a way to use Eigen's vectorized sin\n        // and cosine functions here.\n        for (int j = 0; j < line_len + 1; ++j) {\n          double arg = ((EIGEN_PI * j) * j) / line_len;\n          std::complex<double> tmp(numext::cos(arg), numext::sin(arg));\n          pos_j_base_powered[j] = static_cast<ComplexScalar>(tmp);\n        }\n      }\n\n      for (Index partial_index = 0; partial_index < m_size / line_len; ++partial_index) {\n        const Index base_offset = getBaseOffsetFromIndex(partial_index, dim);\n\n        // get data into line_buf\n        const Index stride = m_strides[dim];\n        if (stride == 1) {\n          m_device.memcpy(line_buf, &buf[base_offset], line_len*sizeof(ComplexScalar));\n        } else {\n          Index offset = base_offset;\n          for (int j = 0; j < line_len; ++j, offset += stride) {\n            line_buf[j] = buf[offset];\n          }\n        }\n\n        // process the line\n        if (is_power_of_two) {\n          processDataLineCooleyTukey(line_buf, line_len, log_len);\n        }\n        else {\n          processDataLineBluestein(line_buf, line_len, good_composite, log_len, a, b, pos_j_base_powered);\n        }\n\n        // write back\n        if (FFTDir == FFT_FORWARD && stride == 1) {\n          m_device.memcpy(&buf[base_offset], line_buf, line_len*sizeof(ComplexScalar));\n        } else {\n          Index offset = base_offset;\n          const ComplexScalar div_factor =  ComplexScalar(1.0 / line_len, 0);\n          for (int j = 0; j < line_len; ++j, offset += stride) {\n             buf[offset] = (FFTDir == FFT_FORWARD) ? line_buf[j] : line_buf[j] * div_factor;\n          }\n        }\n      }\n      m_device.deallocate(line_buf);\n      if (!is_power_of_two) {\n        m_device.deallocate(a);\n        m_device.deallocate(b);\n        m_device.deallocate(pos_j_base_powered);\n      }\n    }\n\n    if(!write_to_out) {\n      for (Index i = 0; i < m_size; ++i) {\n        data[i] = PartOf<FFTResultType>()(buf[i]);\n      }\n      m_device.deallocate(buf);\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE static bool isPowerOfTwo(Index x) {\n    eigen_assert(x > 0);\n    return !(x & (x - 1));\n  }\n\n  // The composite number for padding, used in Bluestein's FFT algorithm\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE static Index findGoodComposite(Index n) {\n    Index i = 2;\n    while (i < 2 * n - 1) i *= 2;\n    return i;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE static Index getLog2(Index m) {\n    Index log2m = 0;\n    while (m >>= 1) log2m++;\n    return log2m;\n  }\n\n  // Call Cooley Tukey algorithm directly, data length must be power of 2\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void processDataLineCooleyTukey(ComplexScalar* line_buf, Index line_len, Index log_len) {\n    eigen_assert(isPowerOfTwo(line_len));\n    scramble_FFT(line_buf, line_len);\n    compute_1D_Butterfly<FFTDir>(line_buf, line_len, log_len);\n  }\n\n  // Call Bluestein's FFT algorithm, m is a good composite number greater than (2 * n - 1), used as the padding length\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void processDataLineBluestein(ComplexScalar* line_buf, Index line_len, Index good_composite, Index log_len, ComplexScalar* a, ComplexScalar* b, const ComplexScalar* pos_j_base_powered) {\n    Index n = line_len;\n    Index m = good_composite;\n    ComplexScalar* data = line_buf;\n\n    for (Index i = 0; i < n; ++i) {\n      if(FFTDir == FFT_FORWARD) {\n        a[i] = data[i] * numext::conj(pos_j_base_powered[i]);\n      }\n      else {\n        a[i] = data[i] * pos_j_base_powered[i];\n      }\n    }\n    for (Index i = n; i < m; ++i) {\n      a[i] = ComplexScalar(0, 0);\n    }\n\n    for (Index i = 0; i < n; ++i) {\n      if(FFTDir == FFT_FORWARD) {\n        b[i] = pos_j_base_powered[i];\n      }\n      else {\n        b[i] = numext::conj(pos_j_base_powered[i]);\n      }\n    }\n    for (Index i = n; i < m - n; ++i) {\n      b[i] = ComplexScalar(0, 0);\n    }\n    for (Index i = m - n; i < m; ++i) {\n      if(FFTDir == FFT_FORWARD) {\n        b[i] = pos_j_base_powered[m-i];\n      }\n      else {\n        b[i] = numext::conj(pos_j_base_powered[m-i]);\n      }\n    }\n\n    scramble_FFT(a, m);\n    compute_1D_Butterfly<FFT_FORWARD>(a, m, log_len);\n\n    scramble_FFT(b, m);\n    compute_1D_Butterfly<FFT_FORWARD>(b, m, log_len);\n\n    for (Index i = 0; i < m; ++i) {\n      a[i] *= b[i];\n    }\n\n    scramble_FFT(a, m);\n    compute_1D_Butterfly<FFT_REVERSE>(a, m, log_len);\n\n    //Do the scaling after ifft\n    for (Index i = 0; i < m; ++i) {\n      a[i] /= m;\n    }\n\n    for (Index i = 0; i < n; ++i) {\n      if(FFTDir == FFT_FORWARD) {\n        data[i] = a[i] * numext::conj(pos_j_base_powered[i]);\n      }\n      else {\n        data[i] = a[i] * pos_j_base_powered[i];\n      }\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE static void scramble_FFT(ComplexScalar* data, Index n) {\n    eigen_assert(isPowerOfTwo(n));\n    Index j = 1;\n    for (Index i = 1; i < n; ++i){\n      if (j > i) {\n        std::swap(data[j-1], data[i-1]);\n      }\n      Index m = n >> 1;\n      while (m >= 2 && j > m) {\n        j -= m;\n        m >>= 1;\n      }\n      j += m;\n    }\n  }\n\n  template <int Dir>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void butterfly_2(ComplexScalar* data) {\n    ComplexScalar tmp = data[1];\n    data[1] = data[0] - data[1];\n    data[0] += tmp;\n  }\n\n  template <int Dir>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void butterfly_4(ComplexScalar* data) {\n    ComplexScalar tmp[4];\n    tmp[0] = data[0] + data[1];\n    tmp[1] = data[0] - data[1];\n    tmp[2] = data[2] + data[3];\n    if (Dir == FFT_FORWARD) {\n      tmp[3] = ComplexScalar(0.0, -1.0) * (data[2] - data[3]);\n    } else {\n      tmp[3] = ComplexScalar(0.0, 1.0) * (data[2] - data[3]);\n    }\n    data[0] = tmp[0] + tmp[2];\n    data[1] = tmp[1] + tmp[3];\n    data[2] = tmp[0] - tmp[2];\n    data[3] = tmp[1] - tmp[3];\n  }\n\n  template <int Dir>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void butterfly_8(ComplexScalar* data) {\n    ComplexScalar tmp_1[8];\n    ComplexScalar tmp_2[8];\n\n    tmp_1[0] = data[0] + data[1];\n    tmp_1[1] = data[0] - data[1];\n    tmp_1[2] = data[2] + data[3];\n    if (Dir == FFT_FORWARD) {\n      tmp_1[3] = (data[2] - data[3]) * ComplexScalar(0, -1);\n    } else {\n      tmp_1[3] = (data[2] - data[3]) * ComplexScalar(0, 1);\n    }\n    tmp_1[4] = data[4] + data[5];\n    tmp_1[5] = data[4] - data[5];\n    tmp_1[6] = data[6] + data[7];\n    if (Dir == FFT_FORWARD) {\n      tmp_1[7] = (data[6] - data[7]) * ComplexScalar(0, -1);\n    } else {\n      tmp_1[7] = (data[6] - data[7]) * ComplexScalar(0, 1);\n    }\n    tmp_2[0] = tmp_1[0] + tmp_1[2];\n    tmp_2[1] = tmp_1[1] + tmp_1[3];\n    tmp_2[2] = tmp_1[0] - tmp_1[2];\n    tmp_2[3] = tmp_1[1] - tmp_1[3];\n    tmp_2[4] = tmp_1[4] + tmp_1[6];\n// SQRT2DIV2 = sqrt(2)/2\n#define SQRT2DIV2 0.7071067811865476\n    if (Dir == FFT_FORWARD) {\n      tmp_2[5] = (tmp_1[5] + tmp_1[7]) * ComplexScalar(SQRT2DIV2, -SQRT2DIV2);\n      tmp_2[6] = (tmp_1[4] - tmp_1[6]) * ComplexScalar(0, -1);\n      tmp_2[7] = (tmp_1[5] - tmp_1[7]) * ComplexScalar(-SQRT2DIV2, -SQRT2DIV2);\n    } else {\n      tmp_2[5] = (tmp_1[5] + tmp_1[7]) * ComplexScalar(SQRT2DIV2, SQRT2DIV2);\n      tmp_2[6] = (tmp_1[4] - tmp_1[6]) * ComplexScalar(0, 1);\n      tmp_2[7] = (tmp_1[5] - tmp_1[7]) * ComplexScalar(-SQRT2DIV2, SQRT2DIV2);\n    }\n    data[0] = tmp_2[0] + tmp_2[4];\n    data[1] = tmp_2[1] + tmp_2[5];\n    data[2] = tmp_2[2] + tmp_2[6];\n    data[3] = tmp_2[3] + tmp_2[7];\n    data[4] = tmp_2[0] - tmp_2[4];\n    data[5] = tmp_2[1] - tmp_2[5];\n    data[6] = tmp_2[2] - tmp_2[6];\n    data[7] = tmp_2[3] - tmp_2[7];\n  }\n\n  template <int Dir>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void butterfly_1D_merge(\n      ComplexScalar* data, Index n, Index n_power_of_2) {\n    // Original code:\n    // RealScalar wtemp = std::sin(M_PI/n);\n    // RealScalar wpi =  -std::sin(2 * M_PI/n);\n    const RealScalar wtemp = m_sin_PI_div_n_LUT[n_power_of_2];\n    const RealScalar wpi = (Dir == FFT_FORWARD)\n                               ? m_minus_sin_2_PI_div_n_LUT[n_power_of_2]\n                               : -m_minus_sin_2_PI_div_n_LUT[n_power_of_2];\n\n    const ComplexScalar wp(wtemp, wpi);\n    const ComplexScalar wp_one = wp + ComplexScalar(1, 0);\n    const ComplexScalar wp_one_2 = wp_one * wp_one;\n    const ComplexScalar wp_one_3 = wp_one_2 * wp_one;\n    const ComplexScalar wp_one_4 = wp_one_3 * wp_one;\n    const Index n2 = n / 2;\n    ComplexScalar w(1.0, 0.0);\n    for (Index i = 0; i < n2; i += 4) {\n       ComplexScalar temp0(data[i + n2] * w);\n       ComplexScalar temp1(data[i + 1 + n2] * w * wp_one);\n       ComplexScalar temp2(data[i + 2 + n2] * w * wp_one_2);\n       ComplexScalar temp3(data[i + 3 + n2] * w * wp_one_3);\n       w = w * wp_one_4;\n\n       data[i + n2] = data[i] - temp0;\n       data[i] += temp0;\n\n       data[i + 1 + n2] = data[i + 1] - temp1;\n       data[i + 1] += temp1;\n\n       data[i + 2 + n2] = data[i + 2] - temp2;\n       data[i + 2] += temp2;\n\n       data[i + 3 + n2] = data[i + 3] - temp3;\n       data[i + 3] += temp3;\n    }\n  }\n\n template <int Dir>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void compute_1D_Butterfly(\n      ComplexScalar* data, Index n, Index n_power_of_2) {\n    eigen_assert(isPowerOfTwo(n));\n    if (n > 8) {\n      compute_1D_Butterfly<Dir>(data, n / 2, n_power_of_2 - 1);\n      compute_1D_Butterfly<Dir>(data + n / 2, n / 2, n_power_of_2 - 1);\n      butterfly_1D_merge<Dir>(data, n, n_power_of_2);\n    } else if (n == 8) {\n      butterfly_8<Dir>(data);\n    } else if (n == 4) {\n      butterfly_4<Dir>(data);\n    } else if (n == 2) {\n      butterfly_2<Dir>(data);\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index getBaseOffsetFromIndex(Index index, Index omitted_dim) const {\n    Index result = 0;\n\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      for (int i = NumDims - 1; i > omitted_dim; --i) {\n        const Index partial_m_stride = m_strides[i] / m_dimensions[omitted_dim];\n        const Index idx = index / partial_m_stride;\n        index -= idx * partial_m_stride;\n        result += idx * m_strides[i];\n      }\n      result += index;\n    }\n    else {\n      for (Index i = 0; i < omitted_dim; ++i) {\n        const Index partial_m_stride = m_strides[i] / m_dimensions[omitted_dim];\n        const Index idx = index / partial_m_stride;\n        index -= idx * partial_m_stride;\n        result += idx * m_strides[i];\n      }\n      result += index;\n    }\n    // Value of index_coords[omitted_dim] is not determined to this step\n    return result;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index getIndexFromOffset(Index base, Index omitted_dim, Index offset) const {\n    Index result = base + offset * m_strides[omitted_dim] ;\n    return result;\n  }\n\n protected:\n  Index m_size;\n  const FFT EIGEN_DEVICE_REF m_fft;\n  Dimensions m_dimensions;\n  array<Index, NumDims> m_strides;\n  TensorEvaluator<ArgType, Device> m_impl;\n  EvaluatorPointerType m_data;\n  const Device EIGEN_DEVICE_REF m_device;\n\n  // This will support a maximum FFT size of 2^32 for each dimension\n  // m_sin_PI_div_n_LUT[i] = (-2) * std::sin(M_PI / std::pow(2,i)) ^ 2;\n  const RealScalar m_sin_PI_div_n_LUT[32] = {\n    RealScalar(0.0),\n    RealScalar(-2),\n    RealScalar(-0.999999999999999),\n    RealScalar(-0.292893218813453),\n    RealScalar(-0.0761204674887130),\n    RealScalar(-0.0192147195967696),\n    RealScalar(-0.00481527332780311),\n    RealScalar(-0.00120454379482761),\n    RealScalar(-3.01181303795779e-04),\n    RealScalar(-7.52981608554592e-05),\n    RealScalar(-1.88247173988574e-05),\n    RealScalar(-4.70619042382852e-06),\n    RealScalar(-1.17654829809007e-06),\n    RealScalar(-2.94137117780840e-07),\n    RealScalar(-7.35342821488550e-08),\n    RealScalar(-1.83835707061916e-08),\n    RealScalar(-4.59589268710903e-09),\n    RealScalar(-1.14897317243732e-09),\n    RealScalar(-2.87243293150586e-10),\n    RealScalar( -7.18108232902250e-11),\n    RealScalar(-1.79527058227174e-11),\n    RealScalar(-4.48817645568941e-12),\n    RealScalar(-1.12204411392298e-12),\n    RealScalar(-2.80511028480785e-13),\n    RealScalar(-7.01277571201985e-14),\n    RealScalar(-1.75319392800498e-14),\n    RealScalar(-4.38298482001247e-15),\n    RealScalar(-1.09574620500312e-15),\n    RealScalar(-2.73936551250781e-16),\n    RealScalar(-6.84841378126949e-17),\n    RealScalar(-1.71210344531737e-17),\n    RealScalar(-4.28025861329343e-18)\n  };\n\n  // m_minus_sin_2_PI_div_n_LUT[i] = -std::sin(2 * M_PI / std::pow(2,i));\n  const RealScalar m_minus_sin_2_PI_div_n_LUT[32] = {\n    RealScalar(0.0),\n    RealScalar(0.0),\n    RealScalar(-1.00000000000000e+00),\n    RealScalar(-7.07106781186547e-01),\n    RealScalar(-3.82683432365090e-01),\n    RealScalar(-1.95090322016128e-01),\n    RealScalar(-9.80171403295606e-02),\n    RealScalar(-4.90676743274180e-02),\n    RealScalar(-2.45412285229123e-02),\n    RealScalar(-1.22715382857199e-02),\n    RealScalar(-6.13588464915448e-03),\n    RealScalar(-3.06795676296598e-03),\n    RealScalar(-1.53398018628477e-03),\n    RealScalar(-7.66990318742704e-04),\n    RealScalar(-3.83495187571396e-04),\n    RealScalar(-1.91747597310703e-04),\n    RealScalar(-9.58737990959773e-05),\n    RealScalar(-4.79368996030669e-05),\n    RealScalar(-2.39684498084182e-05),\n    RealScalar(-1.19842249050697e-05),\n    RealScalar(-5.99211245264243e-06),\n    RealScalar(-2.99605622633466e-06),\n    RealScalar(-1.49802811316901e-06),\n    RealScalar(-7.49014056584716e-07),\n    RealScalar(-3.74507028292384e-07),\n    RealScalar(-1.87253514146195e-07),\n    RealScalar(-9.36267570730981e-08),\n    RealScalar(-4.68133785365491e-08),\n    RealScalar(-2.34066892682746e-08),\n    RealScalar(-1.17033446341373e-08),\n    RealScalar(-5.85167231706864e-09),\n    RealScalar(-2.92583615853432e-09)\n  };\n};\n\n}  // end namespace Eigen\n\n#endif  // EIGEN_CXX11_TENSOR_TENSOR_FFT_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorFixedSize.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_FIXED_SIZE_H\n#define EIGEN_CXX11_TENSOR_TENSOR_FIXED_SIZE_H\n\nnamespace Eigen {\n\n/** \\class TensorFixedSize\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief The fixed sized version of the tensor class.\n  *\n  * The fixed sized equivalent of\n  * Eigen::Tensor<float, 3> t(3, 5, 7);\n  * is\n  * Eigen::TensorFixedSize<float, Sizes<3,5,7>> t;\n  */\n\ntemplate<typename Scalar_, typename Dimensions_, int Options_, typename IndexType>\nclass TensorFixedSize : public TensorBase<TensorFixedSize<Scalar_, Dimensions_, Options_, IndexType> >\n{\n  public:\n    typedef TensorFixedSize<Scalar_, Dimensions_, Options_, IndexType> Self;\n    typedef TensorBase<TensorFixedSize<Scalar_, Dimensions_, Options_, IndexType> > Base;\n    typedef typename Eigen::internal::nested<Self>::type Nested;\n    typedef typename internal::traits<Self>::StorageKind StorageKind;\n    typedef typename internal::traits<Self>::Index Index;\n    typedef Scalar_ Scalar;\n    typedef typename NumTraits<Scalar>::Real RealScalar;\n    typedef typename Base::CoeffReturnType CoeffReturnType;\n\n    static const int Options = Options_;\n\n    enum {\n      IsAligned = bool(EIGEN_MAX_ALIGN_BYTES>0),\n      PacketAccess = (internal::packet_traits<Scalar>::size > 1),\n      BlockAccess = false,\n      PreferBlockAccess = false,\n      Layout = Options_ & RowMajor ? RowMajor : ColMajor,\n      CoordAccess = true,\n      RawAccess = true\n    };\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockNotImplemented TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  typedef Dimensions_ Dimensions;\n  static const std::size_t NumIndices = Dimensions::count;\n\n  protected:\n  TensorStorage<Scalar, Dimensions, Options> m_storage;\n\n  public:\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index                    rank()                   const { return NumIndices; }\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index                    dimension(std::size_t n) const { return m_storage.dimensions()[n]; }\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions&        dimensions()             const { return m_storage.dimensions(); }\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index                    size()                   const { return m_storage.size(); }\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar                   *data()                        { return m_storage.data(); }\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar             *data()                  const { return m_storage.data(); }\n\n    // This makes EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED\n    // work, because that uses base().coeffRef() - and we don't yet\n    // implement a similar class hierarchy\n    inline Self& base()             { return *this; }\n    inline const Self& base() const { return *this; }\n\n#if EIGEN_HAS_VARIADIC_TEMPLATES\n    template<typename... IndexTypes>\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar& coeff(Index firstIndex, IndexTypes... otherIndices) const\n    {\n      // The number of indices used to access a tensor coefficient must be equal to the rank of the tensor.\n      EIGEN_STATIC_ASSERT(sizeof...(otherIndices) + 1 == NumIndices, YOU_MADE_A_PROGRAMMING_MISTAKE)\n      return coeff(array<Index, NumIndices>{{firstIndex, otherIndices...}});\n    }\n#endif\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const Scalar& coeff(const array<Index, NumIndices>& indices) const\n    {\n      eigen_internal_assert(checkIndexRange(indices));\n      return m_storage.data()[linearizedIndex(indices)];\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const Scalar& coeff(Index index) const\n    {\n      eigen_internal_assert(index >= 0 && index < size());\n      return m_storage.data()[index];\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const Scalar& coeff() const\n    {\n      EIGEN_STATIC_ASSERT(NumIndices == 0, YOU_MADE_A_PROGRAMMING_MISTAKE);\n      return m_storage.data()[0];\n    }\n\n\n#if EIGEN_HAS_VARIADIC_TEMPLATES\n    template<typename... IndexTypes>\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& coeffRef(Index firstIndex, IndexTypes... otherIndices)\n    {\n      // The number of indices used to access a tensor coefficient must be equal to the rank of the tensor.\n      EIGEN_STATIC_ASSERT(sizeof...(otherIndices) + 1 == NumIndices, YOU_MADE_A_PROGRAMMING_MISTAKE)\n      return coeffRef(array<Index, NumIndices>{{firstIndex, otherIndices...}});\n    }\n#endif\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Scalar& coeffRef(const array<Index, NumIndices>& indices)\n    {\n      eigen_internal_assert(checkIndexRange(indices));\n      return m_storage.data()[linearizedIndex(indices)];\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Scalar& coeffRef(Index index)\n    {\n      eigen_internal_assert(index >= 0 && index < size());\n      return m_storage.data()[index];\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Scalar& coeffRef()\n    {\n      EIGEN_STATIC_ASSERT(NumIndices == 0, YOU_MADE_A_PROGRAMMING_MISTAKE);\n      return m_storage.data()[0];\n    }\n\n#if EIGEN_HAS_VARIADIC_TEMPLATES\n    template<typename... IndexTypes>\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar& operator()(Index firstIndex, IndexTypes... otherIndices) const\n    {\n      // The number of indices used to access a tensor coefficient must be equal to the rank of the tensor.\n      EIGEN_STATIC_ASSERT(sizeof...(otherIndices) + 1 == NumIndices, YOU_MADE_A_PROGRAMMING_MISTAKE)\n      return this->operator()(array<Index, NumIndices>{{firstIndex, otherIndices...}});\n    }\n#else\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const Scalar& operator()(Index i0, Index i1) const\n    {\n      if (Options&RowMajor) {\n        const Index index = i1 + i0 * m_storage.dimensions()[1];\n        return m_storage.data()[index];\n      } else {\n        const Index index = i0 + i1 * m_storage.dimensions()[0];\n        return m_storage.data()[index];\n      }\n    }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const Scalar& operator()(Index i0, Index i1, Index i2) const\n    {\n      if (Options&RowMajor) {\n         const Index index = i2 + m_storage.dimensions()[2] * (i1 + m_storage.dimensions()[1] * i0);\n         return m_storage.data()[index];\n      } else {\n         const Index index = i0 + m_storage.dimensions()[0] * (i1 + m_storage.dimensions()[1] * i2);\n        return m_storage.data()[index];\n      }\n    }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const Scalar& operator()(Index i0, Index i1, Index i2, Index i3) const\n    {\n      if (Options&RowMajor) {\n        const Index index = i3 + m_storage.dimensions()[3] * (i2 + m_storage.dimensions()[2] * (i1 + m_storage.dimensions()[1] * i0));\n        return m_storage.data()[index];\n      } else {\n        const Index index = i0 + m_storage.dimensions()[0] * (i1 + m_storage.dimensions()[1] * (i2 + m_storage.dimensions()[2] * i3));\n        return m_storage.data()[index];\n      }\n    }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const Scalar& operator()(Index i0, Index i1, Index i2, Index i3, Index i4) const\n    {\n      if (Options&RowMajor) {\n        const Index index = i4 + m_storage.dimensions()[4] * (i3 + m_storage.dimensions()[3] * (i2 + m_storage.dimensions()[2] * (i1 + m_storage.dimensions()[1] * i0)));\n        return m_storage.data()[index];\n      } else {\n        const Index index = i0 + m_storage.dimensions()[0] * (i1 + m_storage.dimensions()[1] * (i2 + m_storage.dimensions()[2] * (i3 + m_storage.dimensions()[3] * i4)));\n        return m_storage.data()[index];\n      }\n    }\n#endif\n\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const Scalar& operator()(const array<Index, NumIndices>& indices) const\n    {\n      eigen_assert(checkIndexRange(indices));\n      return coeff(indices);\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const Scalar& operator()(Index index) const\n    {\n      eigen_internal_assert(index >= 0 && index < size());\n      return coeff(index);\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const Scalar& operator()() const\n    {\n      EIGEN_STATIC_ASSERT(NumIndices == 0, YOU_MADE_A_PROGRAMMING_MISTAKE);\n      return coeff();\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const Scalar& operator[](Index index) const\n    {\n      // The bracket operator is only for vectors, use the parenthesis operator instead.\n      EIGEN_STATIC_ASSERT(NumIndices == 1, YOU_MADE_A_PROGRAMMING_MISTAKE);\n      return coeff(index);\n    }\n\n#if EIGEN_HAS_VARIADIC_TEMPLATES\n    template<typename... IndexTypes>\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& operator()(Index firstIndex, IndexTypes... otherIndices)\n    {\n      // The number of indices used to access a tensor coefficient must be equal to the rank of the tensor.\n      EIGEN_STATIC_ASSERT(sizeof...(otherIndices) + 1 == NumIndices, YOU_MADE_A_PROGRAMMING_MISTAKE)\n      return operator()(array<Index, NumIndices>{{firstIndex, otherIndices...}});\n    }\n#else\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Scalar& operator()(Index i0, Index i1)\n    {\n       if (Options&RowMajor) {\n         const Index index = i1 + i0 * m_storage.dimensions()[1];\n        return m_storage.data()[index];\n      } else {\n        const Index index = i0 + i1 * m_storage.dimensions()[0];\n        return m_storage.data()[index];\n      }\n    }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Scalar& operator()(Index i0, Index i1, Index i2)\n    {\n       if (Options&RowMajor) {\n         const Index index = i2 + m_storage.dimensions()[2] * (i1 + m_storage.dimensions()[1] * i0);\n        return m_storage.data()[index];\n      } else {\n         const Index index = i0 + m_storage.dimensions()[0] * (i1 + m_storage.dimensions()[1] * i2);\n        return m_storage.data()[index];\n      }\n    }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Scalar& operator()(Index i0, Index i1, Index i2, Index i3)\n    {\n      if (Options&RowMajor) {\n        const Index index = i3 + m_storage.dimensions()[3] * (i2 + m_storage.dimensions()[2] * (i1 + m_storage.dimensions()[1] * i0));\n        return m_storage.data()[index];\n      } else {\n        const Index index = i0 + m_storage.dimensions()[0] * (i1 + m_storage.dimensions()[1] * (i2 + m_storage.dimensions()[2] * i3));\n        return m_storage.data()[index];\n      }\n    }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Scalar& operator()(Index i0, Index i1, Index i2, Index i3, Index i4)\n    {\n      if (Options&RowMajor) {\n        const Index index = i4 + m_storage.dimensions()[4] * (i3 + m_storage.dimensions()[3] * (i2 + m_storage.dimensions()[2] * (i1 + m_storage.dimensions()[1] * i0)));\n        return m_storage.data()[index];\n      } else {\n        const Index index = i0 + m_storage.dimensions()[0] * (i1 + m_storage.dimensions()[1] * (i2 + m_storage.dimensions()[2] * (i3 + m_storage.dimensions()[3] * i4)));\n        return m_storage.data()[index];\n      }\n    }\n#endif\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Scalar& operator()(const array<Index, NumIndices>& indices)\n    {\n      eigen_assert(checkIndexRange(indices));\n      return coeffRef(indices);\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Scalar& operator()(Index index)\n    {\n      eigen_assert(index >= 0 && index < size());\n      return coeffRef(index);\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Scalar& operator()()\n    {\n      EIGEN_STATIC_ASSERT(NumIndices == 0, YOU_MADE_A_PROGRAMMING_MISTAKE);\n      return coeffRef();\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Scalar& operator[](Index index)\n    {\n      // The bracket operator is only for vectors, use the parenthesis operator instead\n      EIGEN_STATIC_ASSERT(NumIndices == 1, YOU_MADE_A_PROGRAMMING_MISTAKE)\n      return coeffRef(index);\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE TensorFixedSize()\n      : m_storage()\n    {\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE TensorFixedSize(const Self& other)\n      : m_storage(other.m_storage)\n    {\n    }\n\n#if EIGEN_HAS_RVALUE_REFERENCES\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorFixedSize(Self&& other)\n      : m_storage(other.m_storage)\n    {\n    }\n#endif\n\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE TensorFixedSize(const TensorBase<OtherDerived, ReadOnlyAccessors>& other)\n    {\n      typedef TensorAssignOp<TensorFixedSize, const OtherDerived> Assign;\n      Assign assign(*this, other.derived());\n      internal::TensorExecutor<const Assign, DefaultDevice>::run(assign, DefaultDevice());\n    }\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE TensorFixedSize(const TensorBase<OtherDerived, WriteAccessors>& other)\n    {\n      typedef TensorAssignOp<TensorFixedSize, const OtherDerived> Assign;\n      Assign assign(*this, other.derived());\n      internal::TensorExecutor<const Assign, DefaultDevice>::run(assign, DefaultDevice());\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE TensorFixedSize& operator=(const TensorFixedSize& other)\n    {\n      // FIXME: check that the dimensions of other match the dimensions of *this.\n      // Unfortunately this isn't possible yet when the rhs is an expression.\n      typedef TensorAssignOp<Self, const TensorFixedSize> Assign;\n      Assign assign(*this, other);\n      internal::TensorExecutor<const Assign, DefaultDevice>::run(assign, DefaultDevice());\n      return *this;\n    }\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE TensorFixedSize& operator=(const OtherDerived& other)\n    {\n      // FIXME: check that the dimensions of other match the dimensions of *this.\n      // Unfortunately this isn't possible yet when the rhs is an expression.\n      typedef TensorAssignOp<Self, const OtherDerived> Assign;\n      Assign assign(*this, other);\n      internal::TensorExecutor<const Assign, DefaultDevice>::run(assign, DefaultDevice());\n      return *this;\n    }\n\n  protected:\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE bool checkIndexRange(const array<Index, NumIndices>& /*indices*/) const\n    {\n      using internal::array_apply_and_reduce;\n      using internal::array_zip_and_reduce;\n      using internal::greater_equal_zero_op;\n      using internal::logical_and_op;\n      using internal::lesser_op;\n\n      return true;\n        // check whether the indices are all >= 0\n          /*       array_apply_and_reduce<logical_and_op, greater_equal_zero_op>(indices) &&\n        // check whether the indices fit in the dimensions\n        array_zip_and_reduce<logical_and_op, lesser_op>(indices, m_storage.dimensions());*/\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Index linearizedIndex(const array<Index, NumIndices>& indices) const\n    {\n      if (Options&RowMajor) {\n        return m_storage.dimensions().IndexOfRowMajor(indices);\n      } else {\n        return m_storage.dimensions().IndexOfColMajor(indices);\n      }\n    }\n};\n\n\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_FIXED_SIZE_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorForcedEval.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_FORCED_EVAL_H\n#define EIGEN_CXX11_TENSOR_TENSOR_FORCED_EVAL_H\n\nnamespace Eigen {\n\n/** \\class TensorForcedEval\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief Tensor reshaping class.\n  *\n  *\n  */\nnamespace internal {\ntemplate<typename XprType>\nstruct traits<TensorForcedEvalOp<XprType> >\n{\n  // Type promotion to handle the case where the types of the lhs and the rhs are different.\n  typedef typename XprType::Scalar Scalar;\n  typedef traits<XprType> XprTraits;\n  typedef typename traits<XprType>::StorageKind StorageKind;\n  typedef typename traits<XprType>::Index Index;\n  typedef typename XprType::Nested Nested;\n  typedef typename remove_reference<Nested>::type _Nested;\n  static const int NumDimensions = XprTraits::NumDimensions;\n  static const int Layout = XprTraits::Layout;\n  typedef typename XprTraits::PointerType PointerType;\n\n  enum {\n    Flags = 0\n  };\n};\n\ntemplate<typename XprType>\nstruct eval<TensorForcedEvalOp<XprType>, Eigen::Dense>\n{\n  typedef const TensorForcedEvalOp<XprType>& type;\n};\n\ntemplate<typename XprType>\nstruct nested<TensorForcedEvalOp<XprType>, 1, typename eval<TensorForcedEvalOp<XprType> >::type>\n{\n  typedef TensorForcedEvalOp<XprType> type;\n};\n\n}  // end namespace internal\n\n\n\ntemplate<typename XprType>\nclass TensorForcedEvalOp : public TensorBase<TensorForcedEvalOp<XprType>, ReadOnlyAccessors>\n{\n  public:\n  typedef typename Eigen::internal::traits<TensorForcedEvalOp>::Scalar Scalar;\n  typedef typename Eigen::NumTraits<Scalar>::Real RealScalar;\n  typedef typename internal::remove_const<typename XprType::CoeffReturnType>::type CoeffReturnType;\n  typedef typename Eigen::internal::nested<TensorForcedEvalOp>::type Nested;\n  typedef typename Eigen::internal::traits<TensorForcedEvalOp>::StorageKind StorageKind;\n  typedef typename Eigen::internal::traits<TensorForcedEvalOp>::Index Index;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorForcedEvalOp(const XprType& expr)\n      : m_xpr(expr) {}\n\n    EIGEN_DEVICE_FUNC\n    const typename internal::remove_all<typename XprType::Nested>::type&\n    expression() const { return m_xpr; }\n\n  protected:\n    typename XprType::Nested m_xpr;\n};\n\nnamespace internal {\ntemplate <typename Device, typename CoeffReturnType>\nstruct non_integral_type_placement_new{\n  template <typename StorageType>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void operator()(Index numValues, StorageType m_buffer) {\n   // Initialize non-trivially constructible types.\n    if (!internal::is_arithmetic<CoeffReturnType>::value) {\n      for (Index i = 0; i < numValues; ++i) new (m_buffer + i) CoeffReturnType();\n    }\n}\n};\n\n// SYCL does not support non-integral types \n// having new (m_buffer + i) CoeffReturnType() causes the following compiler error for SYCL Devices \n// no matching function for call to 'operator new'\ntemplate <typename CoeffReturnType>\nstruct non_integral_type_placement_new<Eigen::SyclDevice, CoeffReturnType> {\n  template <typename StorageType>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void operator()(Index, StorageType) {\n}\n};\n} // end namespace internal\n\ntemplate<typename ArgType_, typename Device>\nstruct TensorEvaluator<const TensorForcedEvalOp<ArgType_>, Device>\n{\n  typedef const typename internal::remove_all<ArgType_>::type ArgType;\n  typedef TensorForcedEvalOp<ArgType> XprType;\n  typedef typename ArgType::Scalar Scalar;\n  typedef typename TensorEvaluator<ArgType, Device>::Dimensions Dimensions;\n  typedef typename XprType::Index Index;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  static const int PacketSize = PacketType<CoeffReturnType, Device>::size;\n  typedef typename Eigen::internal::traits<XprType>::PointerType TensorPointerType;\n  typedef StorageMemory<CoeffReturnType, Device> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n\n  enum {\n    IsAligned         = true,\n    PacketAccess      = (PacketType<CoeffReturnType, Device>::size > 1),\n    BlockAccess       = internal::is_arithmetic<CoeffReturnType>::value,\n    PreferBlockAccess = false,\n    Layout            = TensorEvaluator<ArgType, Device>::Layout,\n    RawAccess         = true\n  };\n\n  static const int NumDims = internal::traits<ArgType>::NumDimensions;\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockDescriptor<NumDims, Index> TensorBlockDesc;\n  typedef internal::TensorBlockScratchAllocator<Device> TensorBlockScratch;\n\n  typedef typename internal::TensorMaterializedBlock<CoeffReturnType, NumDims,\n                                                     Layout, Index>\n      TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC TensorEvaluator(const XprType& op, const Device& device)\n      : m_impl(op.expression(), device), m_op(op.expression()),\n      m_device(device), m_buffer(NULL)\n  { }\n\n  EIGEN_DEVICE_FUNC const Dimensions& dimensions() const { return m_impl.dimensions(); }\n\n  #if !defined(EIGEN_HIPCC)\n  EIGEN_DEVICE_FUNC\n  #endif\n  EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType) {\n    const Index numValues =  internal::array_prod(m_impl.dimensions());\n    m_buffer = m_device.get((CoeffReturnType*)m_device.allocate_temp(numValues * sizeof(CoeffReturnType)));\n\n   internal::non_integral_type_placement_new<Device, CoeffReturnType>()(numValues, m_buffer);\n\n    typedef TensorEvalToOp< const typename internal::remove_const<ArgType>::type > EvalTo;\n    EvalTo evalToTmp(m_device.get(m_buffer), m_op);\n\n    internal::TensorExecutor<\n        const EvalTo, typename internal::remove_const<Device>::type,\n        /*Vectorizable=*/internal::IsVectorizable<Device, const ArgType>::value,\n        /*Tiling=*/internal::IsTileable<Device, const ArgType>::value>::\n        run(evalToTmp, m_device);\n\n    return true;\n  }\n\n#ifdef EIGEN_USE_THREADS\n  template <typename EvalSubExprsCallback>\n  EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC void evalSubExprsIfNeededAsync(\n      EvaluatorPointerType, EvalSubExprsCallback done) {\n    const Index numValues = internal::array_prod(m_impl.dimensions());\n    m_buffer = m_device.get((CoeffReturnType*)m_device.allocate_temp(\n        numValues * sizeof(CoeffReturnType)));\n    typedef TensorEvalToOp<const typename internal::remove_const<ArgType>::type>\n        EvalTo;\n    EvalTo evalToTmp(m_device.get(m_buffer), m_op);\n\n    auto on_done = std::bind([](EvalSubExprsCallback done_) { done_(true); },\n                             std::move(done));\n    internal::TensorAsyncExecutor<\n        const EvalTo, typename internal::remove_const<Device>::type,\n        decltype(on_done),\n        /*Vectorizable=*/internal::IsVectorizable<Device, const ArgType>::value,\n        /*Tiling=*/internal::IsTileable<Device, const ArgType>::value>::\n        runAsync(evalToTmp, m_device, std::move(on_done));\n  }\n#endif\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {\n    m_device.deallocate_temp(m_buffer);\n    m_buffer = NULL;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const\n  {\n    return m_buffer[index];\n  }\n\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const\n  {\n    return internal::ploadt<PacketReturnType, LoadMode>(m_buffer + index);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  internal::TensorBlockResourceRequirements getResourceRequirements() const {\n    return internal::TensorBlockResourceRequirements::any();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorBlock\n  block(TensorBlockDesc& desc, TensorBlockScratch& scratch,\n          bool /*root_of_expr_ast*/ = false) const {\n    assert(m_buffer != NULL);\n    return TensorBlock::materialize(m_buffer, m_impl.dimensions(), desc, scratch);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool vectorized) const {\n    return TensorOpCost(sizeof(CoeffReturnType), 0, 0, vectorized, PacketSize);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  EvaluatorPointerType data() const { return m_buffer; }\n\n#ifdef EIGEN_USE_SYCL\n  // binding placeholder accessors to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {\n    m_buffer.bind(cgh);\n    m_impl.bind(cgh);\n  }\n#endif\n private:\n  TensorEvaluator<ArgType, Device> m_impl;\n  const ArgType m_op;\n  const Device EIGEN_DEVICE_REF m_device;\n  EvaluatorPointerType m_buffer;\n};\n\n\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_FORCED_EVAL_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorForwardDeclarations.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_FORWARD_DECLARATIONS_H\n#define EIGEN_CXX11_TENSOR_TENSOR_FORWARD_DECLARATIONS_H\n\nnamespace Eigen {\n\n// MakePointer class is used as a container of the address space of the pointer\n// on the host and on the device. From the host side it generates the T* pointer\n// and when EIGEN_USE_SYCL is used it construct a buffer with a map_allocator to\n// T* m_data on the host. It is always called on the device.\n// Specialisation of MakePointer class for creating the sycl buffer with\n// map_allocator.\ntemplate<typename T> struct MakePointer {\n  typedef T* Type;\n  typedef const T* ConstType;\n};\n\ntemplate <typename T>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T* constCast(const T* data) {\n  return const_cast<T*>(data);\n}\n\n// The StorageMemory class is a container of the device specific pointer\n// used for refering to a Pointer on TensorEvaluator class. While the TensorExpression\n// is a device-agnostic type and need MakePointer class for type conversion,\n// the TensorEvaluator class can be specialized for a device, hence it is possible\n// to construct different types of temproray storage memory in TensorEvaluator\n// for different devices by specializing the following StorageMemory class.\ntemplate<typename T, typename device> struct StorageMemory: MakePointer <T> {};\n\nnamespace internal{\ntemplate<typename A, typename B> struct Pointer_type_promotion {\n  static const bool val=false;\n};\ntemplate<typename A> struct Pointer_type_promotion<A, A> {\n  static const bool val = true;\n};\ntemplate<typename A, typename B> struct TypeConversion {\n  typedef A* type;\n};\n}\n\n\ntemplate<typename PlainObjectType, int Options_ = Unaligned, template <class> class MakePointer_ = MakePointer> class TensorMap;\ntemplate<typename Scalar_, int NumIndices_, int Options_ = 0, typename IndexType = DenseIndex> class Tensor;\ntemplate<typename Scalar_, typename Dimensions, int Options_ = 0, typename IndexType = DenseIndex> class TensorFixedSize;\ntemplate<typename PlainObjectType> class TensorRef;\ntemplate<typename Derived, int AccessLevel> class TensorBase;\n\ntemplate<typename NullaryOp, typename PlainObjectType> class TensorCwiseNullaryOp;\ntemplate<typename UnaryOp, typename XprType> class TensorCwiseUnaryOp;\ntemplate<typename BinaryOp, typename LeftXprType, typename RightXprType> class TensorCwiseBinaryOp;\ntemplate<typename TernaryOp, typename Arg1XprType, typename Arg2XprType, typename Arg3XprType> class TensorCwiseTernaryOp;\ntemplate<typename IfXprType, typename ThenXprType, typename ElseXprType> class TensorSelectOp;\ntemplate<typename Op, typename Dims, typename XprType, template <class> class MakePointer_ = MakePointer > class TensorReductionOp;\ntemplate<typename XprType> class TensorIndexTupleOp;\ntemplate<typename ReduceOp, typename Dims, typename XprType> class TensorTupleReducerOp;\ntemplate<typename Axis, typename LeftXprType, typename RightXprType> class TensorConcatenationOp;\ntemplate<typename Dimensions, typename LeftXprType, typename RightXprType, typename OutputKernelType> class TensorContractionOp;\ntemplate<typename TargetType, typename XprType> class TensorConversionOp;\ntemplate<typename Dimensions, typename InputXprType, typename KernelXprType> class TensorConvolutionOp;\ntemplate<typename FFT, typename XprType, int FFTDataType, int FFTDirection> class TensorFFTOp;\ntemplate<typename PatchDim, typename XprType> class TensorPatchOp;\ntemplate<DenseIndex Rows, DenseIndex Cols, typename XprType> class TensorImagePatchOp;\ntemplate<DenseIndex Planes, DenseIndex Rows, DenseIndex Cols, typename XprType> class TensorVolumePatchOp;\ntemplate<typename Broadcast, typename XprType> class TensorBroadcastingOp;\ntemplate<DenseIndex DimId, typename XprType> class TensorChippingOp;\ntemplate<typename NewDimensions, typename XprType> class TensorReshapingOp;\ntemplate<typename XprType> class TensorLayoutSwapOp;\ntemplate<typename StartIndices, typename Sizes, typename XprType> class TensorSlicingOp;\ntemplate<typename ReverseDimensions, typename XprType> class TensorReverseOp;\ntemplate<typename PaddingDimensions, typename XprType> class TensorPaddingOp;\ntemplate<typename Shuffle, typename XprType> class TensorShufflingOp;\ntemplate<typename Strides, typename XprType> class TensorStridingOp;\ntemplate<typename StartIndices, typename StopIndices, typename Strides, typename XprType> class TensorStridingSlicingOp;\ntemplate<typename Strides, typename XprType> class TensorInflationOp;\ntemplate<typename Generator, typename XprType> class TensorGeneratorOp;\ntemplate<typename LeftXprType, typename RightXprType> class TensorAssignOp;\ntemplate<typename Op, typename XprType> class TensorScanOp;\ntemplate<typename Dims, typename XprType> class TensorTraceOp;\n\ntemplate<typename CustomUnaryFunc, typename XprType> class TensorCustomUnaryOp;\ntemplate<typename CustomBinaryFunc, typename LhsXprType, typename RhsXprType> class TensorCustomBinaryOp;\n\ntemplate<typename XprType, template <class> class MakePointer_ = MakePointer> class TensorEvalToOp;\ntemplate<typename XprType> class TensorForcedEvalOp;\n\ntemplate<typename ExpressionType, typename DeviceType> class TensorDevice;\ntemplate<typename ExpressionType, typename DeviceType, typename DoneCallback> class TensorAsyncDevice;\ntemplate<typename Derived, typename Device> struct TensorEvaluator;\n\nstruct NoOpOutputKernel;\n\nstruct DefaultDevice;\nstruct ThreadPoolDevice;\nstruct GpuDevice;\nstruct SyclDevice;\n\n#ifdef EIGEN_USE_SYCL\n\ntemplate <typename T> struct MakeSYCLPointer {\n  typedef Eigen::TensorSycl::internal::RangeAccess<cl::sycl::access::mode::read_write, T> Type;\n};\n\ntemplate <typename T>\nEIGEN_STRONG_INLINE const Eigen::TensorSycl::internal::RangeAccess<cl::sycl::access::mode::read_write, T>&\nconstCast(const Eigen::TensorSycl::internal::RangeAccess<cl::sycl::access::mode::read_write, T>& data) {\n  return data;\n}\n\ntemplate <typename T>\nstruct StorageMemory<T, SyclDevice> : MakeSYCLPointer<T> {};\ntemplate <typename T>\nstruct StorageMemory<T, const SyclDevice> : StorageMemory<T, SyclDevice> {};\n\nnamespace TensorSycl {\nnamespace internal{\ntemplate <typename Evaluator, typename Op> class GenericNondeterministicReducer;\n}\n}\n#endif\n\n\nenum FFTResultType {\n  RealPart = 0,\n  ImagPart = 1,\n  BothParts = 2\n};\n\nenum FFTDirection {\n    FFT_FORWARD = 0,\n    FFT_REVERSE = 1\n};\n\n\nnamespace internal {\n\ntemplate <typename Device, typename Expression>\nstruct IsVectorizable {\n  static const bool value = TensorEvaluator<Expression, Device>::PacketAccess;\n};\n\ntemplate <typename Expression>\nstruct IsVectorizable<GpuDevice, Expression> {\n  static const bool value = TensorEvaluator<Expression, GpuDevice>::PacketAccess &&\n                            TensorEvaluator<Expression, GpuDevice>::IsAligned;\n};\n\n// Tiled evaluation strategy.\nenum TiledEvaluation {\n  Off = 0,    // tiled evaluation is not supported\n  On = 1,     // still work in progress (see TensorBlock.h)\n};\n\ntemplate <typename Device, typename Expression>\nstruct IsTileable {\n  // Check that block evaluation is supported and it's a preferred option (at\n  // least one sub-expression has much faster block evaluation, e.g.\n  // broadcasting).\n  static const bool BlockAccess =\n      TensorEvaluator<Expression, Device>::BlockAccess &&\n      TensorEvaluator<Expression, Device>::PreferBlockAccess;\n\n  static const TiledEvaluation value =\n      BlockAccess ? TiledEvaluation::On : TiledEvaluation::Off;\n};\n\ntemplate <typename Expression, typename Device,\n          bool Vectorizable      = IsVectorizable<Device, Expression>::value,\n          TiledEvaluation Tiling = IsTileable<Device, Expression>::value>\nclass TensorExecutor;\n\ntemplate <typename Expression, typename Device, typename DoneCallback,\n          bool Vectorizable = IsVectorizable<Device, Expression>::value,\n          TiledEvaluation Tiling = IsTileable<Device, Expression>::value>\nclass TensorAsyncExecutor;\n\n\n}  // end namespace internal\n\n}  // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_FORWARD_DECLARATIONS_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorFunctors.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_FUNCTORS_H\n#define EIGEN_CXX11_TENSOR_TENSOR_FUNCTORS_H\n\nnamespace Eigen {\nnamespace internal {\n\n\n/** \\internal\n * \\brief Template functor to compute the modulo between an array and a scalar.\n */\ntemplate <typename Scalar>\nstruct scalar_mod_op {\n  EIGEN_DEVICE_FUNC scalar_mod_op(const Scalar& divisor) : m_divisor(divisor) {}\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar operator() (const Scalar& a) const { return a % m_divisor; }\n  const Scalar m_divisor;\n};\ntemplate <typename Scalar>\nstruct functor_traits<scalar_mod_op<Scalar> >\n{ enum { Cost = scalar_div_cost<Scalar,false>::value, PacketAccess = false }; };\n\n\n/** \\internal\n * \\brief Template functor to compute the modulo between 2 arrays.\n */\ntemplate <typename Scalar>\nstruct scalar_mod2_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_mod2_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar operator() (const Scalar& a, const Scalar& b) const { return a % b; }\n};\ntemplate <typename Scalar>\nstruct functor_traits<scalar_mod2_op<Scalar> >\n{ enum { Cost = scalar_div_cost<Scalar,false>::value, PacketAccess = false }; };\n\ntemplate <typename Scalar>\nstruct scalar_fmod_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_fmod_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar\n  operator()(const Scalar& a, const Scalar& b) const {\n    return numext::fmod(a, b);\n  }\n};\ntemplate <typename Scalar>\nstruct functor_traits<scalar_fmod_op<Scalar> > {\n  enum { Cost = 13,  // Reciprocal throughput of FPREM on Haswell.\n         PacketAccess = false };\n};\n\ntemplate<typename Reducer, typename Device>\nstruct reducer_traits {\n  enum {\n    Cost = 1,\n    PacketAccess = false,\n    IsStateful = false,\n    IsExactlyAssociative = true\n  };\n};\n\n// Standard reduction functors\ntemplate <typename T> struct SumReducer\n{\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void reduce(const T t, T* accum) const {\n    internal::scalar_sum_op<T> sum_op;\n    *accum = sum_op(*accum, t);\n  }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void reducePacket(const Packet& p, Packet* accum) const {\n    (*accum) = padd<Packet>(*accum, p);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T initialize() const {\n    internal::scalar_cast_op<int, T> conv;\n    return conv(0);\n  }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet initializePacket() const {\n    return pset1<Packet>(initialize());\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T finalize(const T accum) const {\n    return accum;\n  }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet finalizePacket(const Packet& vaccum) const {\n    return vaccum;\n  }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T finalizeBoth(const T saccum, const Packet& vaccum) const {\n    internal::scalar_sum_op<T> sum_op;\n    return sum_op(saccum, predux(vaccum));\n  }\n};\n\ntemplate <typename T, typename Device>\nstruct reducer_traits<SumReducer<T>, Device> {\n  enum {\n    Cost = NumTraits<T>::AddCost,\n    PacketAccess = PacketType<T, Device>::HasAdd,\n    IsStateful = false,\n    IsExactlyAssociative = NumTraits<T>::IsInteger\n  };\n};\n\ntemplate <typename T> struct MeanReducer\n{\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  MeanReducer() : scalarCount_(0), packetCount_(0) { }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void reduce(const T t, T* accum) {\n    internal::scalar_sum_op<T> sum_op;\n    *accum = sum_op(*accum, t);\n    scalarCount_++;\n  }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void reducePacket(const Packet& p, Packet* accum) {\n    (*accum) = padd<Packet>(*accum, p);\n    packetCount_++;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T initialize() const {\n    internal::scalar_cast_op<int, T> conv;\n    return conv(0);\n  }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet initializePacket() const {\n    return pset1<Packet>(initialize());\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T finalize(const T accum) const {\n    internal::scalar_quotient_op<T> quotient_op;\n    return quotient_op(accum, T(scalarCount_));\n  }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet finalizePacket(const Packet& vaccum) const {\n    return pdiv(vaccum, pset1<Packet>(T(packetCount_)));\n  }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T finalizeBoth(const T saccum, const Packet& vaccum) const {\n    internal::scalar_sum_op<T> sum_op;\n    internal::scalar_quotient_op<T> quotient_op;\n    return quotient_op(\n        sum_op(saccum, predux(vaccum)),\n        T(scalarCount_ + packetCount_ * unpacket_traits<Packet>::size));\n  }\n\n  protected:\n    DenseIndex scalarCount_;\n    DenseIndex packetCount_;\n};\n\ntemplate <typename T, typename Device>\nstruct reducer_traits<MeanReducer<T>, Device> {\n  enum {\n    Cost = NumTraits<T>::AddCost,\n    PacketAccess = PacketType<T, Device>::HasAdd &&\n                   PacketType<T, Device>::HasDiv && !NumTraits<T>::IsInteger,\n    IsStateful = true,\n    IsExactlyAssociative = NumTraits<T>::IsInteger\n  };\n};\n\n\ntemplate <typename T, bool IsMax = true, bool IsInteger = true>\nstruct MinMaxBottomValue {\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE T bottom_value() {\n    return Eigen::NumTraits<T>::lowest();\n  }\n};\ntemplate <typename T>\nstruct MinMaxBottomValue<T, true, false> {\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE T bottom_value() {\n    return -Eigen::NumTraits<T>::infinity();\n  }\n};\ntemplate <typename T>\nstruct MinMaxBottomValue<T, false, true> {\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE T bottom_value() {\n    return Eigen::NumTraits<T>::highest();\n  }\n};\ntemplate <typename T>\nstruct MinMaxBottomValue<T, false, false> {\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE T bottom_value() {\n    return Eigen::NumTraits<T>::infinity();\n  }\n};\n\n\ntemplate <typename T> struct MaxReducer\n{\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void reduce(const T t, T* accum) const {\n    if (t > *accum) { *accum = t; }\n  }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void reducePacket(const Packet& p, Packet* accum) const {\n    (*accum) = pmax<Packet>(*accum, p);\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T initialize() const {\n    return MinMaxBottomValue<T, true, Eigen::NumTraits<T>::IsInteger>::bottom_value();\n  }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet initializePacket() const {\n    return pset1<Packet>(initialize());\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T finalize(const T accum) const {\n    return accum;\n  }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet finalizePacket(const Packet& vaccum) const {\n    return vaccum;\n  }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T finalizeBoth(const T saccum, const Packet& vaccum) const {\n    return numext::maxi(saccum, predux_max(vaccum));\n  }\n};\n\ntemplate <typename T, typename Device>\nstruct reducer_traits<MaxReducer<T>, Device> {\n  enum {\n    Cost = NumTraits<T>::AddCost,\n    PacketAccess = PacketType<T, Device>::HasMax,\n    IsStateful = false,\n    IsExactlyAssociative = true\n  };\n};\n\n\ntemplate <typename T> struct MinReducer\n{\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void reduce(const T t, T* accum) const {\n    if (t < *accum) { *accum = t; }\n  }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void reducePacket(const Packet& p, Packet* accum) const {\n    (*accum) = pmin<Packet>(*accum, p);\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T initialize() const {\n    return MinMaxBottomValue<T, false, Eigen::NumTraits<T>::IsInteger>::bottom_value();\n  }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet initializePacket() const {\n    return pset1<Packet>(initialize());\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T finalize(const T accum) const {\n    return accum;\n  }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet finalizePacket(const Packet& vaccum) const {\n    return vaccum;\n  }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T finalizeBoth(const T saccum, const Packet& vaccum) const {\n    return numext::mini(saccum, predux_min(vaccum));\n  }\n};\n\ntemplate <typename T, typename Device>\nstruct reducer_traits<MinReducer<T>, Device> {\n  enum {\n    Cost = NumTraits<T>::AddCost,\n    PacketAccess = PacketType<T, Device>::HasMin,\n    IsStateful = false,\n    IsExactlyAssociative = true\n  };\n};\n\n\ntemplate <typename T> struct ProdReducer\n{\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void reduce(const T t, T* accum) const {\n    internal::scalar_product_op<T> prod_op;\n    (*accum) = prod_op(*accum, t);\n  }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void reducePacket(const Packet& p, Packet* accum) const {\n    (*accum) = pmul<Packet>(*accum, p);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T initialize() const {\n    internal::scalar_cast_op<int, T> conv;\n    return conv(1);\n  }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet initializePacket() const {\n    return pset1<Packet>(initialize());\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T finalize(const T accum) const {\n    return accum;\n  }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet finalizePacket(const Packet& vaccum) const {\n    return vaccum;\n  }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T finalizeBoth(const T saccum, const Packet& vaccum) const {\n    internal::scalar_product_op<T> prod_op;\n    return prod_op(saccum, predux_mul(vaccum));\n  }\n};\n\ntemplate <typename T, typename Device>\nstruct reducer_traits<ProdReducer<T>, Device> {\n  enum {\n    Cost = NumTraits<T>::MulCost,\n    PacketAccess = PacketType<T, Device>::HasMul,\n    IsStateful = false,\n    IsExactlyAssociative = true\n  };\n};\n\n\nstruct AndReducer\n{\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void reduce(bool t, bool* accum) const {\n    *accum = *accum && t;\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool initialize() const {\n    return true;\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool finalize(bool accum) const {\n    return accum;\n  }\n};\n\ntemplate <typename Device>\nstruct reducer_traits<AndReducer, Device> {\n  enum {\n    Cost = 1,\n    PacketAccess = false,\n    IsStateful = false,\n    IsExactlyAssociative = true\n  };\n};\n\n\nstruct OrReducer {\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void reduce(bool t, bool* accum) const {\n    *accum = *accum || t;\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool initialize() const {\n    return false;\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool finalize(bool accum) const {\n    return accum;\n  }\n};\n\ntemplate <typename Device>\nstruct reducer_traits<OrReducer, Device> {\n  enum {\n    Cost = 1,\n    PacketAccess = false,\n    IsStateful = false,\n    IsExactlyAssociative = true\n  };\n};\n\n\n// Argmin/Argmax reducers\ntemplate <typename T> struct ArgMaxTupleReducer\n{\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void reduce(const T t, T* accum) const {\n    if (t.second > accum->second) { *accum = t; }\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T initialize() const {\n    return T(0, NumTraits<typename T::second_type>::lowest());\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T finalize(const T& accum) const {\n    return accum;\n  }\n};\n\ntemplate <typename T, typename Device>\nstruct reducer_traits<ArgMaxTupleReducer<T>, Device> {\n  enum {\n    Cost = NumTraits<T>::AddCost,\n    PacketAccess = false,\n    IsStateful = false,\n    IsExactlyAssociative = true\n  };\n};\n\n\ntemplate <typename T> struct ArgMinTupleReducer\n{\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void reduce(const T& t, T* accum) const {\n    if (t.second < accum->second) { *accum = t; }\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T initialize() const {\n    return T(0, NumTraits<typename T::second_type>::highest());\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T finalize(const T& accum) const {\n    return accum;\n  }\n};\n\ntemplate <typename T, typename Device>\nstruct reducer_traits<ArgMinTupleReducer<T>, Device> {\n  enum {\n    Cost = NumTraits<T>::AddCost,\n    PacketAccess = false,\n    IsStateful = false,\n    IsExactlyAssociative = true\n  };\n};\n\n\ntemplate <typename T, typename Index, size_t NumDims>\nclass GaussianGenerator {\n public:\n  static const bool PacketAccess = false;\n\n  EIGEN_DEVICE_FUNC GaussianGenerator(const array<T, NumDims>& means,\n                                      const array<T, NumDims>& std_devs)\n      : m_means(means)\n  {\n    EIGEN_UNROLL_LOOP\n    for (size_t i = 0; i < NumDims; ++i) {\n      m_two_sigmas[i] = std_devs[i] * std_devs[i] * 2;\n    }\n  }\n\n  EIGEN_DEVICE_FUNC T operator()(const array<Index, NumDims>& coordinates) const {\n    T tmp = T(0);\n    EIGEN_UNROLL_LOOP\n    for (size_t i = 0; i < NumDims; ++i) {\n      T offset = coordinates[i] - m_means[i];\n      tmp += offset * offset / m_two_sigmas[i];\n    }\n    return numext::exp(-tmp);\n  }\n\n private:\n  array<T, NumDims> m_means;\n  array<T, NumDims> m_two_sigmas;\n};\n\ntemplate <typename T, typename Index, size_t NumDims>\nstruct functor_traits<GaussianGenerator<T, Index, NumDims> > {\n  enum {\n    Cost = NumDims * (2 * NumTraits<T>::AddCost + NumTraits<T>::MulCost +\n                      functor_traits<scalar_quotient_op<T, T> >::Cost) +\n           functor_traits<scalar_exp_op<T> >::Cost,\n    PacketAccess = GaussianGenerator<T, Index, NumDims>::PacketAccess\n  };\n};\n\ntemplate <typename Scalar>\nstruct scalar_clamp_op {\n  EIGEN_DEVICE_FUNC inline scalar_clamp_op(const Scalar& _min, const Scalar& _max) : m_min(_min), m_max(_max) {}\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar\n  operator()(const Scalar& x) const {\n    return numext::mini(numext::maxi(x, m_min), m_max);\n  }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet\n  packetOp(const Packet& x) const {\n    return internal::pmin(internal::pmax(x, pset1<Packet>(m_min)), pset1<Packet>(m_max));\n  }\n  const Scalar m_min;\n  const Scalar m_max;\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_clamp_op<Scalar> >\n{ enum { Cost = 2 * NumTraits<Scalar>::AddCost, PacketAccess = (packet_traits<Scalar>::HasMin && packet_traits<Scalar>::HasMax)}; };\n\n} // end namespace internal\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_FUNCTORS_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorGenerator.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_GENERATOR_H\n#define EIGEN_CXX11_TENSOR_TENSOR_GENERATOR_H\n\nnamespace Eigen {\n\n/** \\class TensorGeneratorOp\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief Tensor generator class.\n  *\n  *\n  */\nnamespace internal {\ntemplate<typename Generator, typename XprType>\nstruct traits<TensorGeneratorOp<Generator, XprType> > : public traits<XprType>\n{\n  typedef typename XprType::Scalar Scalar;\n  typedef traits<XprType> XprTraits;\n  typedef typename XprTraits::StorageKind StorageKind;\n  typedef typename XprTraits::Index Index;\n  typedef typename XprType::Nested Nested;\n  typedef typename remove_reference<Nested>::type _Nested;\n  static const int NumDimensions = XprTraits::NumDimensions;\n  static const int Layout = XprTraits::Layout;\n  typedef typename XprTraits::PointerType PointerType;\n};\n\ntemplate<typename Generator, typename XprType>\nstruct eval<TensorGeneratorOp<Generator, XprType>, Eigen::Dense>\n{\n  typedef const TensorGeneratorOp<Generator, XprType>& type;\n};\n\ntemplate<typename Generator, typename XprType>\nstruct nested<TensorGeneratorOp<Generator, XprType>, 1, typename eval<TensorGeneratorOp<Generator, XprType> >::type>\n{\n  typedef TensorGeneratorOp<Generator, XprType> type;\n};\n\n}  // end namespace internal\n\n\n\ntemplate<typename Generator, typename XprType>\nclass TensorGeneratorOp : public TensorBase<TensorGeneratorOp<Generator, XprType>, ReadOnlyAccessors>\n{\n  public:\n  typedef typename Eigen::internal::traits<TensorGeneratorOp>::Scalar Scalar;\n  typedef typename Eigen::NumTraits<Scalar>::Real RealScalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename Eigen::internal::nested<TensorGeneratorOp>::type Nested;\n  typedef typename Eigen::internal::traits<TensorGeneratorOp>::StorageKind StorageKind;\n  typedef typename Eigen::internal::traits<TensorGeneratorOp>::Index Index;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorGeneratorOp(const XprType& expr, const Generator& generator)\n      : m_xpr(expr), m_generator(generator) {}\n\n    EIGEN_DEVICE_FUNC\n    const Generator& generator() const { return m_generator; }\n\n    EIGEN_DEVICE_FUNC\n    const typename internal::remove_all<typename XprType::Nested>::type&\n    expression() const { return m_xpr; }\n\n  protected:\n    typename XprType::Nested m_xpr;\n    const Generator m_generator;\n};\n\n\n// Eval as rvalue\ntemplate<typename Generator, typename ArgType, typename Device>\nstruct TensorEvaluator<const TensorGeneratorOp<Generator, ArgType>, Device>\n{\n  typedef TensorGeneratorOp<Generator, ArgType> XprType;\n  typedef typename XprType::Index Index;\n  typedef typename TensorEvaluator<ArgType, Device>::Dimensions Dimensions;\n  static const int NumDims = internal::array_size<Dimensions>::value;\n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  typedef StorageMemory<CoeffReturnType, Device> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n  enum {\n    IsAligned         = false,\n    PacketAccess      = (PacketType<CoeffReturnType, Device>::size > 1),\n    BlockAccess       = true,\n    PreferBlockAccess = true,\n    Layout            = TensorEvaluator<ArgType, Device>::Layout,\n    CoordAccess       = false,  // to be implemented\n    RawAccess         = false\n  };\n\n  typedef internal::TensorIntDivisor<Index> IndexDivisor;\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockDescriptor<NumDims, Index> TensorBlockDesc;\n  typedef internal::TensorBlockScratchAllocator<Device> TensorBlockScratch;\n\n  typedef typename internal::TensorMaterializedBlock<CoeffReturnType, NumDims,\n                                                     Layout, Index>\n      TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)\n      :  m_device(device), m_generator(op.generator())\n  {\n    TensorEvaluator<ArgType, Device> argImpl(op.expression(), device);\n    m_dimensions = argImpl.dimensions();\n\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      m_strides[0] = 1;\n      EIGEN_UNROLL_LOOP\n      for (int i = 1; i < NumDims; ++i) {\n        m_strides[i] = m_strides[i - 1] * m_dimensions[i - 1];\n        if (m_strides[i] != 0) m_fast_strides[i] = IndexDivisor(m_strides[i]);\n      }\n    } else {\n      m_strides[NumDims - 1] = 1;\n      EIGEN_UNROLL_LOOP\n      for (int i = NumDims - 2; i >= 0; --i) {\n        m_strides[i] = m_strides[i + 1] * m_dimensions[i + 1];\n        if (m_strides[i] != 0) m_fast_strides[i] = IndexDivisor(m_strides[i]);\n      }\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions& dimensions() const { return m_dimensions; }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType /*data*/) {\n    return true;\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const\n  {\n    array<Index, NumDims> coords;\n    extract_coordinates(index, coords);\n    return m_generator(coords);\n  }\n\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const\n  {\n    const int packetSize = PacketType<CoeffReturnType, Device>::size;\n    EIGEN_STATIC_ASSERT((packetSize > 1), YOU_MADE_A_PROGRAMMING_MISTAKE)\n    eigen_assert(index+packetSize-1 < dimensions().TotalSize());\n\n    EIGEN_ALIGN_MAX typename internal::remove_const<CoeffReturnType>::type values[packetSize];\n    for (int i = 0; i < packetSize; ++i) {\n      values[i] = coeff(index+i);\n    }\n    PacketReturnType rslt = internal::pload<PacketReturnType>(values);\n    return rslt;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  internal::TensorBlockResourceRequirements getResourceRequirements() const {\n    const size_t target_size = m_device.firstLevelCacheSize();\n    // TODO(ezhulenev): Generator should have a cost.\n    return internal::TensorBlockResourceRequirements::skewed<Scalar>(\n        target_size);\n  }\n\n  struct BlockIteratorState {\n    Index stride;\n    Index span;\n    Index size;\n    Index count;\n  };\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorBlock\n  block(TensorBlockDesc& desc, TensorBlockScratch& scratch,\n          bool /*root_of_expr_ast*/ = false) const {\n    static const bool is_col_major =\n        static_cast<int>(Layout) == static_cast<int>(ColMajor);\n\n    // Compute spatial coordinates for the first block element.\n    array<Index, NumDims> coords;\n    extract_coordinates(desc.offset(), coords);\n    array<Index, NumDims> initial_coords = coords;\n\n    // Offset in the output block buffer.\n    Index offset = 0;\n\n    // Initialize output block iterator state. Dimension in this array are\n    // always in inner_most -> outer_most order (col major layout).\n    array<BlockIteratorState, NumDims> it;\n    for (int i = 0; i < NumDims; ++i) {\n      const int dim = is_col_major ? i : NumDims - 1 - i;\n      it[i].size = desc.dimension(dim);\n      it[i].stride = i == 0 ? 1 : (it[i - 1].size * it[i - 1].stride);\n      it[i].span = it[i].stride * (it[i].size - 1);\n      it[i].count = 0;\n    }\n    eigen_assert(it[0].stride == 1);\n\n    // Prepare storage for the materialized generator result.\n    const typename TensorBlock::Storage block_storage =\n        TensorBlock::prepareStorage(desc, scratch);\n\n    CoeffReturnType* block_buffer = block_storage.data();\n\n    static const int packet_size = PacketType<CoeffReturnType, Device>::size;\n\n    static const int inner_dim = is_col_major ? 0 : NumDims - 1;\n    const Index inner_dim_size = it[0].size;\n    const Index inner_dim_vectorized = inner_dim_size - packet_size;\n\n    while (it[NumDims - 1].count < it[NumDims - 1].size) {\n      Index i = 0;\n      // Generate data for the vectorized part of the inner-most dimension.\n      for (; i <= inner_dim_vectorized; i += packet_size) {\n        for (Index j = 0; j < packet_size; ++j) {\n          array<Index, NumDims> j_coords = coords;  // Break loop dependence.\n          j_coords[inner_dim] += j;\n          *(block_buffer + offset + i + j) = m_generator(j_coords);\n        }\n        coords[inner_dim] += packet_size;\n      }\n      // Finalize non-vectorized part of the inner-most dimension.\n      for (; i < inner_dim_size; ++i) {\n        *(block_buffer + offset + i) = m_generator(coords);\n        coords[inner_dim]++;\n      }\n      coords[inner_dim] = initial_coords[inner_dim];\n\n      // For the 1d tensor we need to generate only one inner-most dimension.\n      if (NumDims == 1) break;\n\n      // Update offset.\n      for (i = 1; i < NumDims; ++i) {\n        if (++it[i].count < it[i].size) {\n          offset += it[i].stride;\n          coords[is_col_major ? i : NumDims - 1 - i]++;\n          break;\n        }\n        if (i != NumDims - 1) it[i].count = 0;\n        coords[is_col_major ? i : NumDims - 1 - i] =\n            initial_coords[is_col_major ? i : NumDims - 1 - i];\n        offset -= it[i].span;\n      }\n    }\n\n    return block_storage.AsTensorMaterializedBlock();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost\n  costPerCoeff(bool) const {\n    // TODO(rmlarsen): This is just a placeholder. Define interface to make\n    // generators return their cost.\n    return TensorOpCost(0, 0, TensorOpCost::AddCost<Scalar>() +\n                                  TensorOpCost::MulCost<Scalar>());\n  }\n\n  EIGEN_DEVICE_FUNC EvaluatorPointerType  data() const { return NULL; }\n\n#ifdef EIGEN_USE_SYCL\n  // binding placeholder accessors to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler&) const {}\n#endif\n\n protected:\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  void extract_coordinates(Index index, array<Index, NumDims>& coords) const {\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      for (int i = NumDims - 1; i > 0; --i) {\n        const Index idx = index / m_fast_strides[i];\n        index -= idx * m_strides[i];\n        coords[i] = idx;\n      }\n      coords[0] = index;\n    } else {\n      for (int i = 0; i < NumDims - 1; ++i) {\n        const Index idx = index / m_fast_strides[i];\n        index -= idx * m_strides[i];\n        coords[i] = idx;\n      }\n      coords[NumDims-1] = index;\n    }\n  }\n\n  const Device EIGEN_DEVICE_REF m_device;\n  Dimensions m_dimensions;\n  array<Index, NumDims> m_strides;\n  array<IndexDivisor, NumDims> m_fast_strides;\n  Generator m_generator;\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_GENERATOR_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorGlobalFunctions.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Eugene Brevdo <ebrevdo@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_GLOBAL_FUNCTIONS_H\n#define EIGEN_CXX11_TENSOR_TENSOR_GLOBAL_FUNCTIONS_H\n\nnamespace Eigen {\n\n/** \\cpp11 \\returns an expression of the coefficient-wise betainc(\\a x, \\a a, \\a b) to the given tensors.\n *\n * This function computes the regularized incomplete beta function (integral).\n *\n */\ntemplate <typename ADerived, typename BDerived, typename XDerived>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const\n    TensorCwiseTernaryOp<internal::scalar_betainc_op<typename XDerived::Scalar>,\n                         const ADerived, const BDerived, const XDerived>\n    betainc(const ADerived& a, const BDerived& b, const XDerived& x) {\n  return TensorCwiseTernaryOp<\n      internal::scalar_betainc_op<typename XDerived::Scalar>, const ADerived,\n      const BDerived, const XDerived>(\n      a, b, x, internal::scalar_betainc_op<typename XDerived::Scalar>());\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_GLOBAL_FUNCTIONS_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorGpuHipCudaDefines.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n// Copyright (C) 2018 Deven Desai <deven.desai.amd@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#if defined(EIGEN_USE_GPU) && !defined(EIGEN_CXX11_TENSOR_GPU_HIP_CUDA_DEFINES_H)\n#define EIGEN_CXX11_TENSOR_GPU_HIP_CUDA_DEFINES_H\n\n// Note that we are using EIGEN_USE_HIP here instead of EIGEN_HIPCC...this is by design\n// There is code in the Tensorflow codebase that will define EIGEN_USE_GPU,  but\n// for some reason gets sent to the gcc/host compiler instead of the gpu/nvcc/hipcc compiler\n// When compiling such files, gcc will end up trying to pick up the CUDA headers by \n// default (see the code within \"unsupported/Eigen/CXX11/Tensor\" that is guarded by EIGEN_USE_GPU)\n// This will obsviously not work when trying to compile tensorflow on a system with no CUDA\n// To work around this issue for HIP systems (and leave the default behaviour intact), the\n// HIP tensorflow build defines EIGEN_USE_HIP when compiling all source files, and \n// \"unsupported/Eigen/CXX11/Tensor\" has been updated to use HIP header when EIGEN_USE_HIP is\n// defined. In continuation of that requirement, the guard here needs to be EIGEN_USE_HIP as well\n\n#if defined(EIGEN_USE_HIP)\n\n#define gpuStream_t hipStream_t\n#define gpuDeviceProp_t hipDeviceProp_t\n#define gpuError_t hipError_t\n#define gpuSuccess hipSuccess\n#define gpuErrorNotReady hipErrorNotReady\n#define gpuGetDeviceCount hipGetDeviceCount\n#define gpuGetErrorString hipGetErrorString\n#define gpuGetDeviceProperties hipGetDeviceProperties\n#define gpuStreamDefault hipStreamDefault\n#define gpuGetDevice hipGetDevice\n#define gpuSetDevice hipSetDevice\n#define gpuMalloc hipMalloc\n#define gpuFree hipFree\n#define gpuMemsetAsync hipMemsetAsync\n#define gpuMemcpyAsync hipMemcpyAsync\n#define gpuMemcpyDeviceToDevice hipMemcpyDeviceToDevice\n#define gpuMemcpyDeviceToHost hipMemcpyDeviceToHost\n#define gpuMemcpyHostToDevice hipMemcpyHostToDevice\n#define gpuStreamQuery hipStreamQuery\n#define gpuSharedMemConfig hipSharedMemConfig\n#define gpuDeviceSetSharedMemConfig hipDeviceSetSharedMemConfig\n#define gpuStreamSynchronize hipStreamSynchronize\n#define gpuDeviceSynchronize hipDeviceSynchronize\n#define gpuMemcpy hipMemcpy\n\n#else\n\n#define gpuStream_t cudaStream_t\n#define gpuDeviceProp_t cudaDeviceProp\n#define gpuError_t cudaError_t\n#define gpuSuccess cudaSuccess\n#define gpuErrorNotReady cudaErrorNotReady\n#define gpuGetDeviceCount cudaGetDeviceCount\n#define gpuGetErrorString cudaGetErrorString\n#define gpuGetDeviceProperties cudaGetDeviceProperties\n#define gpuStreamDefault cudaStreamDefault\n#define gpuGetDevice cudaGetDevice\n#define gpuSetDevice cudaSetDevice\n#define gpuMalloc cudaMalloc\n#define gpuFree cudaFree\n#define gpuMemsetAsync cudaMemsetAsync\n#define gpuMemcpyAsync cudaMemcpyAsync\n#define gpuMemcpyDeviceToDevice cudaMemcpyDeviceToDevice\n#define gpuMemcpyDeviceToHost cudaMemcpyDeviceToHost\n#define gpuMemcpyHostToDevice cudaMemcpyHostToDevice\n#define gpuStreamQuery cudaStreamQuery\n#define gpuSharedMemConfig cudaSharedMemConfig\n#define gpuDeviceSetSharedMemConfig cudaDeviceSetSharedMemConfig\n#define gpuStreamSynchronize cudaStreamSynchronize\n#define gpuDeviceSynchronize cudaDeviceSynchronize\n#define gpuMemcpy cudaMemcpy\n\n#endif\n\n// gpu_assert can be overridden\n#ifndef gpu_assert\n\n#if defined(EIGEN_HIP_DEVICE_COMPILE)\n// HIPCC do not support the use of assert on the GPU side.\n#define gpu_assert(COND)\n#else\n#define gpu_assert(COND) assert(COND)\n#endif\n\n#endif // gpu_assert\n\n#endif  // EIGEN_CXX11_TENSOR_GPU_HIP_CUDA_DEFINES_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorGpuHipCudaUndefines.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n// Copyright (C) 2018 Deven Desai <deven.desai.amd@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#if defined(EIGEN_CXX11_TENSOR_GPU_HIP_CUDA_DEFINES_H)\n\n#undef gpuStream_t\n#undef gpuDeviceProp_t \n#undef gpuError_t\n#undef gpuSuccess\n#undef gpuErrorNotReady\n#undef gpuGetDeviceCount\n#undef gpuGetErrorString\n#undef gpuGetDeviceProperties\n#undef gpuStreamDefault\n#undef gpuGetDevice\n#undef gpuSetDevice\n#undef gpuMalloc\n#undef gpuFree\n#undef gpuMemsetAsync\n#undef gpuMemcpyAsync\n#undef gpuMemcpyDeviceToDevice\n#undef gpuMemcpyDeviceToHost\n#undef gpuMemcpyHostToDevice\n#undef gpuStreamQuery\n#undef gpuSharedMemConfig\n#undef gpuDeviceSetSharedMemConfig\n#undef gpuStreamSynchronize\n#undef gpuDeviceSynchronize\n#undef gpuMemcpy\n\n#undef EIGEN_CXX11_TENSOR_GPU_HIP_CUDA_DEFINES_H\n\n#endif // EIGEN_CXX11_TENSOR_GPU_HIP_CUDA_DEFINES_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorIO.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_IO_H\n#define EIGEN_CXX11_TENSOR_TENSOR_IO_H\n\nnamespace Eigen {\n\nnamespace internal {\n\n// Print the tensor as a 2d matrix\ntemplate <typename Tensor, int Rank>\nstruct TensorPrinter {\n  static void run (std::ostream& os, const Tensor& tensor) {\n    typedef typename internal::remove_const<typename Tensor::Scalar>::type Scalar;\n    typedef typename Tensor::Index Index;\n    const Index total_size = internal::array_prod(tensor.dimensions());\n    if (total_size > 0) {\n      const Index first_dim = Eigen::internal::array_get<0>(tensor.dimensions());\n      static const int layout = Tensor::Layout;\n      Map<const Array<Scalar, Dynamic, Dynamic, layout> > matrix(const_cast<Scalar*>(tensor.data()), first_dim, total_size/first_dim);\n      os << matrix;\n    }\n  }\n};\n\n\n// Print the tensor as a vector\ntemplate <typename Tensor>\nstruct TensorPrinter<Tensor, 1> {\n  static void run (std::ostream& os, const Tensor& tensor) {\n    typedef typename internal::remove_const<typename Tensor::Scalar>::type Scalar;\n    typedef typename Tensor::Index Index;\n    const Index total_size = internal::array_prod(tensor.dimensions());\n    if (total_size > 0) {\n      Map<const Array<Scalar, Dynamic, 1> > array(const_cast<Scalar*>(tensor.data()), total_size);\n      os << array;\n    }\n  }\n};\n\n\n// Print the tensor as a scalar\ntemplate <typename Tensor>\nstruct TensorPrinter<Tensor, 0> {\n  static void run (std::ostream& os, const Tensor& tensor) {\n    os << tensor.coeff(0);\n  }\n};\n}\n\ntemplate <typename T>\nstd::ostream& operator << (std::ostream& os, const TensorBase<T, ReadOnlyAccessors>& expr) {\n  typedef TensorEvaluator<const TensorForcedEvalOp<const T>, DefaultDevice> Evaluator;\n  typedef typename Evaluator::Dimensions Dimensions;\n\n  // Evaluate the expression if needed\n  TensorForcedEvalOp<const T> eval = expr.eval();\n  Evaluator tensor(eval, DefaultDevice());\n  tensor.evalSubExprsIfNeeded(NULL);\n\n  // Print the result\n  static const int rank = internal::array_size<Dimensions>::value;\n  internal::TensorPrinter<Evaluator, rank>::run(os, tensor);\n\n  // Cleanup.\n  tensor.cleanup();\n  return os;\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_IO_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorImagePatch.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_IMAGE_PATCH_H\n#define EIGEN_CXX11_TENSOR_TENSOR_IMAGE_PATCH_H\n\nnamespace Eigen {\n\n/** \\class TensorImagePatch\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief Patch extraction specialized for image processing.\n  * This assumes that the input has a least 3 dimensions ordered as follow:\n  *  1st dimension: channels (of size d)\n  *  2nd dimension: rows (of size r)\n  *  3rd dimension: columns (of size c)\n  *  There can be additional dimensions such as time (for video) or batch (for\n  * bulk processing after the first 3.\n  * Calling the image patch code with patch_rows and patch_cols is equivalent\n  * to calling the regular patch extraction code with parameters d, patch_rows,\n  * patch_cols, and 1 for all the additional dimensions.\n  */\nnamespace internal {\n\ntemplate<DenseIndex Rows, DenseIndex Cols, typename XprType>\nstruct traits<TensorImagePatchOp<Rows, Cols, XprType> > : public traits<XprType>\n{\n  typedef typename internal::remove_const<typename XprType::Scalar>::type Scalar;\n  typedef traits<XprType> XprTraits;\n  typedef typename XprTraits::StorageKind StorageKind;\n  typedef typename XprTraits::Index Index;\n  typedef typename XprType::Nested Nested;\n  typedef typename remove_reference<Nested>::type _Nested;\n  static const int NumDimensions = XprTraits::NumDimensions + 1;\n  static const int Layout = XprTraits::Layout;\n  typedef typename XprTraits::PointerType PointerType;\n};\n\ntemplate<DenseIndex Rows, DenseIndex Cols, typename XprType>\nstruct eval<TensorImagePatchOp<Rows, Cols, XprType>, Eigen::Dense>\n{\n  typedef const TensorImagePatchOp<Rows, Cols, XprType>& type;\n};\n\ntemplate<DenseIndex Rows, DenseIndex Cols, typename XprType>\nstruct nested<TensorImagePatchOp<Rows, Cols, XprType>, 1, typename eval<TensorImagePatchOp<Rows, Cols, XprType> >::type>\n{\n  typedef TensorImagePatchOp<Rows, Cols, XprType> type;\n};\n\ntemplate <typename Self, bool Vectorizable>\nstruct ImagePatchCopyOp {\n  typedef typename Self::Index Index;\n  typedef typename Self::Scalar Scalar;\n  typedef typename Self::Impl Impl;\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Run(\n      const Self& self, const Index num_coeff_to_copy, const Index dst_index,\n      Scalar* dst_data, const Index src_index) {\n    const Impl& impl = self.impl();\n    for (Index i = 0; i < num_coeff_to_copy; ++i) {\n      dst_data[dst_index + i] = impl.coeff(src_index + i);\n    }\n  }\n};\n\ntemplate <typename Self>\nstruct ImagePatchCopyOp<Self, true> {\n  typedef typename Self::Index Index;\n  typedef typename Self::Scalar Scalar;\n  typedef typename Self::Impl Impl;\n  typedef typename packet_traits<Scalar>::type Packet;\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Run(\n      const Self& self, const Index num_coeff_to_copy, const Index dst_index,\n      Scalar* dst_data, const Index src_index) {\n    const Impl& impl = self.impl();\n    const Index packet_size = internal::unpacket_traits<Packet>::size;\n    const Index vectorized_size =\n        (num_coeff_to_copy / packet_size) * packet_size;\n    for (Index i = 0; i < vectorized_size; i += packet_size) {\n      Packet p = impl.template packet<Unaligned>(src_index + i);\n      internal::pstoret<Scalar, Packet, Unaligned>(dst_data + dst_index + i, p);\n    }\n    for (Index i = vectorized_size; i < num_coeff_to_copy; ++i) {\n      dst_data[dst_index + i] = impl.coeff(src_index + i);\n    }\n  }\n};\n\ntemplate <typename Self>\nstruct ImagePatchPaddingOp {\n  typedef typename Self::Index Index;\n  typedef typename Self::Scalar Scalar;\n  typedef typename packet_traits<Scalar>::type Packet;\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Run(\n      const Index num_coeff_to_pad, const Scalar padding_value,\n      const Index dst_index, Scalar* dst_data) {\n    const Index packet_size = internal::unpacket_traits<Packet>::size;\n    const Packet padded_packet = internal::pset1<Packet>(padding_value);\n    const Index vectorized_size =\n        (num_coeff_to_pad / packet_size) * packet_size;\n    for (Index i = 0; i < vectorized_size; i += packet_size) {\n      internal::pstoret<Scalar, Packet, Unaligned>(dst_data + dst_index + i,\n                                                   padded_packet);\n    }\n    for (Index i = vectorized_size; i < num_coeff_to_pad; ++i) {\n      dst_data[dst_index + i] = padding_value;\n    }\n  }\n};\n\n}  // end namespace internal\n\ntemplate<DenseIndex Rows, DenseIndex Cols, typename XprType>\nclass TensorImagePatchOp : public TensorBase<TensorImagePatchOp<Rows, Cols, XprType>, ReadOnlyAccessors>\n{\n  public:\n  typedef typename Eigen::internal::traits<TensorImagePatchOp>::Scalar Scalar;\n  typedef typename Eigen::NumTraits<Scalar>::Real RealScalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename Eigen::internal::nested<TensorImagePatchOp>::type Nested;\n  typedef typename Eigen::internal::traits<TensorImagePatchOp>::StorageKind StorageKind;\n  typedef typename Eigen::internal::traits<TensorImagePatchOp>::Index Index;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorImagePatchOp(const XprType& expr, DenseIndex patch_rows, DenseIndex patch_cols,\n                                                           DenseIndex row_strides, DenseIndex col_strides,\n                                                           DenseIndex in_row_strides, DenseIndex in_col_strides,\n                                                           DenseIndex row_inflate_strides, DenseIndex col_inflate_strides,\n                                                           PaddingType padding_type, Scalar padding_value)\n                                                           : m_xpr(expr), m_patch_rows(patch_rows), m_patch_cols(patch_cols),\n                                                           m_row_strides(row_strides), m_col_strides(col_strides),\n                                                           m_in_row_strides(in_row_strides), m_in_col_strides(in_col_strides),\n                                                           m_row_inflate_strides(row_inflate_strides), m_col_inflate_strides(col_inflate_strides),\n                                                           m_padding_explicit(false), m_padding_top(0), m_padding_bottom(0), m_padding_left(0), m_padding_right(0),\n                                                           m_padding_type(padding_type), m_padding_value(padding_value) {}\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorImagePatchOp(const XprType& expr, DenseIndex patch_rows, DenseIndex patch_cols,\n                                                           DenseIndex row_strides, DenseIndex col_strides,\n                                                           DenseIndex in_row_strides, DenseIndex in_col_strides,\n                                                           DenseIndex row_inflate_strides, DenseIndex col_inflate_strides,\n                                                           DenseIndex padding_top, DenseIndex padding_bottom,\n                                                           DenseIndex padding_left, DenseIndex padding_right,\n                                                           Scalar padding_value)\n                                                           : m_xpr(expr), m_patch_rows(patch_rows), m_patch_cols(patch_cols),\n                                                           m_row_strides(row_strides), m_col_strides(col_strides),\n                                                           m_in_row_strides(in_row_strides), m_in_col_strides(in_col_strides),\n                                                           m_row_inflate_strides(row_inflate_strides), m_col_inflate_strides(col_inflate_strides),\n                                                           m_padding_explicit(true), m_padding_top(padding_top), m_padding_bottom(padding_bottom),\n                                                           m_padding_left(padding_left), m_padding_right(padding_right),\n                                                           m_padding_type(PADDING_VALID), m_padding_value(padding_value) {}\n\n\n    EIGEN_DEVICE_FUNC\n    DenseIndex patch_rows() const { return m_patch_rows; }\n    EIGEN_DEVICE_FUNC\n    DenseIndex patch_cols() const { return m_patch_cols; }\n    EIGEN_DEVICE_FUNC\n    DenseIndex row_strides() const { return m_row_strides; }\n    EIGEN_DEVICE_FUNC\n    DenseIndex col_strides() const { return m_col_strides; }\n    EIGEN_DEVICE_FUNC\n    DenseIndex in_row_strides() const { return m_in_row_strides; }\n    EIGEN_DEVICE_FUNC\n    DenseIndex in_col_strides() const { return m_in_col_strides; }\n    EIGEN_DEVICE_FUNC\n    DenseIndex row_inflate_strides() const { return m_row_inflate_strides; }\n    EIGEN_DEVICE_FUNC\n    DenseIndex col_inflate_strides() const { return m_col_inflate_strides; }\n    EIGEN_DEVICE_FUNC\n    bool padding_explicit() const { return m_padding_explicit; }\n    EIGEN_DEVICE_FUNC\n    DenseIndex padding_top() const { return m_padding_top; }\n    EIGEN_DEVICE_FUNC\n    DenseIndex padding_bottom() const { return m_padding_bottom; }\n    EIGEN_DEVICE_FUNC\n    DenseIndex padding_left() const { return m_padding_left; }\n    EIGEN_DEVICE_FUNC\n    DenseIndex padding_right() const { return m_padding_right; }\n    EIGEN_DEVICE_FUNC\n    PaddingType padding_type() const { return m_padding_type; }\n    EIGEN_DEVICE_FUNC\n    Scalar padding_value() const { return m_padding_value; }\n\n    EIGEN_DEVICE_FUNC\n    const typename internal::remove_all<typename XprType::Nested>::type&\n    expression() const { return m_xpr; }\n\n  protected:\n    typename XprType::Nested m_xpr;\n    const DenseIndex m_patch_rows;\n    const DenseIndex m_patch_cols;\n    const DenseIndex m_row_strides;\n    const DenseIndex m_col_strides;\n    const DenseIndex m_in_row_strides;\n    const DenseIndex m_in_col_strides;\n    const DenseIndex m_row_inflate_strides;\n    const DenseIndex m_col_inflate_strides;\n    const bool m_padding_explicit;\n    const DenseIndex m_padding_top;\n    const DenseIndex m_padding_bottom;\n    const DenseIndex m_padding_left;\n    const DenseIndex m_padding_right;\n    const PaddingType m_padding_type;\n    const Scalar m_padding_value;\n};\n\n// Eval as rvalue\ntemplate<DenseIndex Rows, DenseIndex Cols, typename ArgType, typename Device>\nstruct TensorEvaluator<const TensorImagePatchOp<Rows, Cols, ArgType>, Device>\n{\n  typedef TensorImagePatchOp<Rows, Cols, ArgType> XprType;\n  typedef typename XprType::Index Index;\n  static const int NumInputDims = internal::array_size<typename TensorEvaluator<ArgType, Device>::Dimensions>::value;\n  static const int NumDims = NumInputDims + 1;\n  typedef DSizes<Index, NumDims> Dimensions;\n  typedef typename internal::remove_const<typename XprType::Scalar>::type Scalar;\n  typedef TensorEvaluator<const TensorImagePatchOp<Rows, Cols, ArgType>,\n                          Device> Self;\n  typedef TensorEvaluator<ArgType, Device> Impl;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  static const int PacketSize = PacketType<CoeffReturnType, Device>::size;\n  typedef StorageMemory<CoeffReturnType, Device> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n\n  enum {\n    IsAligned         = false,\n    PacketAccess      = TensorEvaluator<ArgType, Device>::PacketAccess,\n    BlockAccess       = false,\n    PreferBlockAccess = true,\n    Layout            = TensorEvaluator<ArgType, Device>::Layout,\n    CoordAccess       = false,\n    RawAccess         = false\n  };\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockNotImplemented TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator( const XprType& op, const Device& device)\n      : m_device(device), m_impl(op.expression(), device)\n  {\n    EIGEN_STATIC_ASSERT((NumDims >= 4), YOU_MADE_A_PROGRAMMING_MISTAKE);\n\n    m_paddingValue = op.padding_value();\n\n    const typename TensorEvaluator<ArgType, Device>::Dimensions& input_dims = m_impl.dimensions();\n\n    // Caches a few variables.\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      m_inputDepth = input_dims[0];\n      m_inputRows = input_dims[1];\n      m_inputCols = input_dims[2];\n    } else {\n      m_inputDepth = input_dims[NumInputDims-1];\n      m_inputRows = input_dims[NumInputDims-2];\n      m_inputCols = input_dims[NumInputDims-3];\n    }\n\n    m_row_strides = op.row_strides();\n    m_col_strides = op.col_strides();\n\n    // Input strides and effective input/patch size\n    m_in_row_strides = op.in_row_strides();\n    m_in_col_strides = op.in_col_strides();\n    m_row_inflate_strides = op.row_inflate_strides();\n    m_col_inflate_strides = op.col_inflate_strides();\n    // The \"effective\" input rows and input cols are the input rows and cols\n    // after inflating them with zeros.\n    // For examples, a 2x3 matrix with row_inflate_strides and\n    // col_inflate_strides of 2 comes from:\n    //   A B C\n    //   D E F\n    //\n    // to a matrix is 3 x 5:\n    //\n    //   A . B . C\n    //   . . . . .\n    //   D . E . F\n\n    m_input_rows_eff = (m_inputRows - 1) * m_row_inflate_strides + 1;\n    m_input_cols_eff = (m_inputCols - 1) * m_col_inflate_strides + 1;\n    m_patch_rows_eff = op.patch_rows() + (op.patch_rows() - 1) * (m_in_row_strides - 1);\n    m_patch_cols_eff = op.patch_cols() + (op.patch_cols() - 1) * (m_in_col_strides - 1);\n\n    if (op.padding_explicit()) {\n      m_outputRows = numext::ceil((m_input_rows_eff + op.padding_top() + op.padding_bottom() - m_patch_rows_eff + 1.f) / static_cast<float>(m_row_strides));\n      m_outputCols = numext::ceil((m_input_cols_eff + op.padding_left() + op.padding_right() - m_patch_cols_eff + 1.f) / static_cast<float>(m_col_strides));\n      m_rowPaddingTop = op.padding_top();\n      m_colPaddingLeft = op.padding_left();\n    } else {\n      // Computing padding from the type\n      switch (op.padding_type()) {\n        case PADDING_VALID:\n          m_outputRows = numext::ceil((m_input_rows_eff - m_patch_rows_eff + 1.f) / static_cast<float>(m_row_strides));\n          m_outputCols = numext::ceil((m_input_cols_eff - m_patch_cols_eff + 1.f) / static_cast<float>(m_col_strides));\n          // Calculate the padding\n          m_rowPaddingTop = numext::maxi<Index>(0, ((m_outputRows - 1) * m_row_strides + m_patch_rows_eff - m_input_rows_eff) / 2);\n          m_colPaddingLeft = numext::maxi<Index>(0, ((m_outputCols - 1) * m_col_strides + m_patch_cols_eff - m_input_cols_eff) / 2);\n          break;\n        case PADDING_SAME:\n          m_outputRows = numext::ceil(m_input_rows_eff / static_cast<float>(m_row_strides));\n          m_outputCols = numext::ceil(m_input_cols_eff / static_cast<float>(m_col_strides));\n          // Calculate the padding\n          m_rowPaddingTop = ((m_outputRows - 1) * m_row_strides + m_patch_rows_eff - m_input_rows_eff) / 2;\n          m_colPaddingLeft = ((m_outputCols - 1) * m_col_strides + m_patch_cols_eff - m_input_cols_eff) / 2;\n          // The padding size calculation for PADDING_SAME has been updated to\n          // be consistent with how TensorFlow extracts its paddings.\n          m_rowPaddingTop = numext::maxi<Index>(0, m_rowPaddingTop);\n          m_colPaddingLeft = numext::maxi<Index>(0, m_colPaddingLeft);\n          break;\n        default:\n          eigen_assert(false && \"unexpected padding\");\n          m_outputCols=0; // silence the uninitialised warning;\n          m_outputRows=0; //// silence the uninitialised warning;\n      }\n    }\n    eigen_assert(m_outputRows > 0);\n    eigen_assert(m_outputCols > 0);\n\n    // Dimensions for result of extraction.\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      // ColMajor\n      // 0: depth\n      // 1: patch_rows\n      // 2: patch_cols\n      // 3: number of patches\n      // 4 and beyond: anything else (such as batch).\n      m_dimensions[0] = input_dims[0];\n      m_dimensions[1] = op.patch_rows();\n      m_dimensions[2] = op.patch_cols();\n      m_dimensions[3] = m_outputRows * m_outputCols;\n      for (int i = 4; i < NumDims; ++i) {\n        m_dimensions[i] = input_dims[i-1];\n      }\n    } else {\n      // RowMajor\n      // NumDims-1: depth\n      // NumDims-2: patch_rows\n      // NumDims-3: patch_cols\n      // NumDims-4: number of patches\n      // NumDims-5 and beyond: anything else (such as batch).\n      m_dimensions[NumDims-1] = input_dims[NumInputDims-1];\n      m_dimensions[NumDims-2] = op.patch_rows();\n      m_dimensions[NumDims-3] = op.patch_cols();\n      m_dimensions[NumDims-4] = m_outputRows * m_outputCols;\n      for (int i = NumDims-5; i >= 0; --i) {\n        m_dimensions[i] = input_dims[i];\n      }\n    }\n\n    // Strides for moving the patch in various dimensions.\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      m_colStride = m_dimensions[1];\n      m_patchStride = m_colStride * m_dimensions[2] * m_dimensions[0];\n      m_otherStride = m_patchStride * m_dimensions[3];\n    } else {\n      m_colStride = m_dimensions[NumDims-2];\n      m_patchStride = m_colStride * m_dimensions[NumDims-3] * m_dimensions[NumDims-1];\n      m_otherStride = m_patchStride * m_dimensions[NumDims-4];\n    }\n\n    // Strides for navigating through the input tensor.\n    m_rowInputStride = m_inputDepth;\n    m_colInputStride = m_inputDepth * m_inputRows;\n    m_patchInputStride = m_inputDepth * m_inputRows * m_inputCols;\n\n    // Fast representations of different variables.\n    m_fastOtherStride = internal::TensorIntDivisor<Index>(m_otherStride);\n    m_fastPatchStride = internal::TensorIntDivisor<Index>(m_patchStride);\n    m_fastColStride = internal::TensorIntDivisor<Index>(m_colStride);\n    m_fastInflateRowStride = internal::TensorIntDivisor<Index>(m_row_inflate_strides);\n    m_fastInflateColStride = internal::TensorIntDivisor<Index>(m_col_inflate_strides);\n    m_fastInputColsEff = internal::TensorIntDivisor<Index>(m_input_cols_eff);\n\n    // Number of patches in the width dimension.\n    m_fastOutputRows = internal::TensorIntDivisor<Index>(m_outputRows);\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      m_fastOutputDepth = internal::TensorIntDivisor<Index>(m_dimensions[0]);\n    } else {\n      m_fastOutputDepth = internal::TensorIntDivisor<Index>(m_dimensions[NumDims-1]);\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions& dimensions() const { return m_dimensions; }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType /*data*/) {\n    m_impl.evalSubExprsIfNeeded(NULL);\n    return true;\n  }\n\n#ifdef EIGEN_USE_THREADS\n  template <typename EvalSubExprsCallback>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalSubExprsIfNeededAsync(\n      EvaluatorPointerType, EvalSubExprsCallback done) {\n    m_impl.evalSubExprsIfNeededAsync(nullptr, [done](bool) { done(true); });\n  }\n#endif  // EIGEN_USE_THREADS\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {\n    m_impl.cleanup();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const\n  {\n    // Patch index corresponding to the passed in index.\n    const Index patchIndex = index / m_fastPatchStride;\n    // Find the offset of the element wrt the location of the first element.\n    const Index patchOffset = (index - patchIndex * m_patchStride) / m_fastOutputDepth;\n\n    // Other ways to index this element.\n    const Index otherIndex = (NumDims == 4) ? 0 : index / m_fastOtherStride;\n    const Index patch2DIndex = (NumDims == 4) ? patchIndex : (index - otherIndex * m_otherStride) / m_fastPatchStride;\n\n    // Calculate col index in the input original tensor.\n    const Index colIndex = patch2DIndex / m_fastOutputRows;\n    const Index colOffset = patchOffset / m_fastColStride;\n    const Index inputCol = colIndex * m_col_strides + colOffset * m_in_col_strides - m_colPaddingLeft;\n    const Index origInputCol = (m_col_inflate_strides == 1) ? inputCol : ((inputCol >= 0) ? (inputCol / m_fastInflateColStride) : 0);\n    if (inputCol < 0 || inputCol >= m_input_cols_eff ||\n        ((m_col_inflate_strides != 1) && (inputCol != origInputCol * m_col_inflate_strides))) {\n      return Scalar(m_paddingValue);\n    }\n\n    // Calculate row index in the original input tensor.\n    const Index rowIndex = patch2DIndex - colIndex * m_outputRows;\n    const Index rowOffset = patchOffset - colOffset * m_colStride;\n    const Index inputRow = rowIndex * m_row_strides + rowOffset * m_in_row_strides - m_rowPaddingTop;\n    const Index origInputRow = (m_row_inflate_strides == 1) ? inputRow : ((inputRow >= 0) ? (inputRow / m_fastInflateRowStride) : 0);\n    if (inputRow < 0 || inputRow >= m_input_rows_eff ||\n        ((m_row_inflate_strides != 1) && (inputRow != origInputRow * m_row_inflate_strides))) {\n      return Scalar(m_paddingValue);\n    }\n\n    const int depth_index = static_cast<int>(Layout) == static_cast<int>(ColMajor) ? 0 : NumDims - 1;\n    const Index depth = index - (index / m_fastOutputDepth) * m_dimensions[depth_index];\n\n    const Index inputIndex = depth + origInputRow * m_rowInputStride + origInputCol * m_colInputStride + otherIndex * m_patchInputStride;\n    return m_impl.coeff(inputIndex);\n  }\n\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const\n  {\n    EIGEN_STATIC_ASSERT((PacketSize > 1), YOU_MADE_A_PROGRAMMING_MISTAKE)\n    eigen_assert(index+PacketSize-1 < dimensions().TotalSize());\n\n    if (m_in_row_strides != 1 || m_in_col_strides != 1 || m_row_inflate_strides != 1 || m_col_inflate_strides != 1) {\n      return packetWithPossibleZero(index);\n    }\n\n    const Index indices[2] = {index, index + PacketSize - 1};\n    const Index patchIndex = indices[0] / m_fastPatchStride;\n    if (patchIndex != indices[1] / m_fastPatchStride) {\n      return packetWithPossibleZero(index);\n    }\n    const Index otherIndex = (NumDims == 4) ? 0 : indices[0] / m_fastOtherStride;\n    eigen_assert(otherIndex == indices[1] / m_fastOtherStride);\n\n    // Find the offset of the element wrt the location of the first element.\n    const Index patchOffsets[2] = {(indices[0] - patchIndex * m_patchStride) / m_fastOutputDepth,\n                                   (indices[1] - patchIndex * m_patchStride) / m_fastOutputDepth};\n\n    const Index patch2DIndex = (NumDims == 4) ? patchIndex : (indices[0] - otherIndex * m_otherStride) / m_fastPatchStride;\n    eigen_assert(patch2DIndex == (indices[1] - otherIndex * m_otherStride) / m_fastPatchStride);\n\n    const Index colIndex = patch2DIndex / m_fastOutputRows;\n    const Index colOffsets[2] = {patchOffsets[0] / m_fastColStride, patchOffsets[1] / m_fastColStride};\n\n    // Calculate col indices in the original input tensor.\n    const Index inputCols[2] = {colIndex * m_col_strides + colOffsets[0] -\n      m_colPaddingLeft, colIndex * m_col_strides + colOffsets[1] - m_colPaddingLeft};\n    if (inputCols[1] < 0 || inputCols[0] >= m_inputCols) {\n      return internal::pset1<PacketReturnType>(Scalar(m_paddingValue));\n    }\n\n    if (inputCols[0] == inputCols[1]) {\n      const Index rowIndex = patch2DIndex - colIndex * m_outputRows;\n      const Index rowOffsets[2] = {patchOffsets[0] - colOffsets[0]*m_colStride, patchOffsets[1] - colOffsets[1]*m_colStride};\n      eigen_assert(rowOffsets[0] <= rowOffsets[1]);\n      // Calculate col indices in the original input tensor.\n      const Index inputRows[2] = {rowIndex * m_row_strides + rowOffsets[0] -\n        m_rowPaddingTop, rowIndex * m_row_strides + rowOffsets[1] - m_rowPaddingTop};\n\n      if (inputRows[1] < 0 || inputRows[0] >= m_inputRows) {\n        return internal::pset1<PacketReturnType>(Scalar(m_paddingValue));\n      }\n\n      if (inputRows[0] >= 0 && inputRows[1] < m_inputRows) {\n        // no padding\n        const int depth_index = static_cast<int>(Layout) == static_cast<int>(ColMajor) ? 0 : NumDims - 1;\n        const Index depth = index - (index / m_fastOutputDepth) * m_dimensions[depth_index];\n        const Index inputIndex = depth + inputRows[0] * m_rowInputStride + inputCols[0] * m_colInputStride + otherIndex * m_patchInputStride;\n        return m_impl.template packet<Unaligned>(inputIndex);\n      }\n    }\n\n    return packetWithPossibleZero(index);\n  }\n\n  EIGEN_DEVICE_FUNC EvaluatorPointerType data() const { return NULL; }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorEvaluator<ArgType, Device>& impl() const { return m_impl; }\n\n#ifdef EIGEN_USE_SYCL\n  // binding placeholder accessors to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {\n    m_impl.bind(cgh);\n  }\n#endif\n\n  Index rowPaddingTop() const { return m_rowPaddingTop; }\n  Index colPaddingLeft() const { return m_colPaddingLeft; }\n  Index outputRows() const { return m_outputRows; }\n  Index outputCols() const { return m_outputCols; }\n  Index userRowStride() const { return m_row_strides; }\n  Index userColStride() const { return m_col_strides; }\n  Index userInRowStride() const { return m_in_row_strides; }\n  Index userInColStride() const { return m_in_col_strides; }\n  Index rowInflateStride() const { return m_row_inflate_strides; }\n  Index colInflateStride() const { return m_col_inflate_strides; }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost\n  costPerCoeff(bool vectorized) const {\n    // We conservatively estimate the cost for the code path where the computed\n    // index is inside the original image and\n    // TensorEvaluator<ArgType, Device>::CoordAccess is false.\n    const double compute_cost = 3 * TensorOpCost::DivCost<Index>() +\n                                6 * TensorOpCost::MulCost<Index>() +\n                                8 * TensorOpCost::MulCost<Index>();\n    return m_impl.costPerCoeff(vectorized) +\n           TensorOpCost(0, 0, compute_cost, vectorized, PacketSize);\n  }\n\n protected:\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packetWithPossibleZero(Index index) const\n  {\n    EIGEN_ALIGN_MAX typename internal::remove_const<CoeffReturnType>::type values[PacketSize];\n    EIGEN_UNROLL_LOOP\n    for (int i = 0; i < PacketSize; ++i) {\n      values[i] = coeff(index+i);\n    }\n    PacketReturnType rslt = internal::pload<PacketReturnType>(values);\n    return rslt;\n  }\n\n  Dimensions m_dimensions;\n\n  Index m_otherStride;\n  Index m_patchStride;\n  Index m_colStride;\n  Index m_row_strides;\n  Index m_col_strides;\n\n  Index m_in_row_strides;\n  Index m_in_col_strides;\n  Index m_row_inflate_strides;\n  Index m_col_inflate_strides;\n\n  Index m_input_rows_eff;\n  Index m_input_cols_eff;\n  Index m_patch_rows_eff;\n  Index m_patch_cols_eff;\n\n  internal::TensorIntDivisor<Index> m_fastOtherStride;\n  internal::TensorIntDivisor<Index> m_fastPatchStride;\n  internal::TensorIntDivisor<Index> m_fastColStride;\n  internal::TensorIntDivisor<Index> m_fastInflateRowStride;\n  internal::TensorIntDivisor<Index> m_fastInflateColStride;\n  internal::TensorIntDivisor<Index> m_fastInputColsEff;\n\n  Index m_rowInputStride;\n  Index m_colInputStride;\n  Index m_patchInputStride;\n\n  Index m_inputDepth;\n  Index m_inputRows;\n  Index m_inputCols;\n\n  Index m_outputRows;\n  Index m_outputCols;\n\n  Index m_rowPaddingTop;\n  Index m_colPaddingLeft;\n\n  internal::TensorIntDivisor<Index> m_fastOutputRows;\n  internal::TensorIntDivisor<Index> m_fastOutputDepth;\n\n  Scalar m_paddingValue;\n\n  const Device EIGEN_DEVICE_REF m_device;\n  TensorEvaluator<ArgType, Device> m_impl;\n};\n\n\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_IMAGE_PATCH_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorIndexList.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_INDEX_LIST_H\n#define EIGEN_CXX11_TENSOR_TENSOR_INDEX_LIST_H\n\n\n#if EIGEN_HAS_CONSTEXPR && EIGEN_HAS_VARIADIC_TEMPLATES\n\n#define EIGEN_HAS_INDEX_LIST\n\nnamespace Eigen {\n\n/** \\internal\n  *\n  * \\class TensorIndexList\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief Set of classes used to encode a set of Tensor dimensions/indices.\n  *\n  * The indices in the list can be known at compile time or at runtime. A mix\n  * of static and dynamic indices can also be provided if needed. The tensor\n  * code will attempt to take advantage of the indices that are known at\n  * compile time to optimize the code it generates.\n  *\n  * This functionality requires a c++11 compliant compiler. If your compiler\n  * is older you need to use arrays of indices instead.\n  *\n  * Several examples are provided in the cxx11_tensor_index_list.cpp file.\n  *\n  * \\sa Tensor\n  */\n\ntemplate <Index n>\nstruct type2index {\n  static const Index value = n;\n  EIGEN_DEVICE_FUNC constexpr operator Index() const { return n; }\n  EIGEN_DEVICE_FUNC void set(Index val) {\n    eigen_assert(val == n);\n  }\n};\n\n// This can be used with IndexPairList to get compile-time constant pairs,\n// such as IndexPairList<type2indexpair<1,2>, type2indexpair<3,4>>().\ntemplate <Index f, Index s>\nstruct type2indexpair {\n  static const Index first = f;\n  static const Index second = s;\n\n  constexpr EIGEN_DEVICE_FUNC operator IndexPair<Index>() const {\n    return IndexPair<Index>(f, s);\n  }\n\n  EIGEN_DEVICE_FUNC void set(const IndexPair<Index>& val) {\n    eigen_assert(val.first == f);\n    eigen_assert(val.second == s);\n  }\n};\n\n\ntemplate<Index n> struct NumTraits<type2index<n> >\n{\n  typedef Index Real;\n  enum {\n    IsComplex = 0,\n    RequireInitialization = false,\n    ReadCost = 1,\n    AddCost = 1,\n    MulCost = 1\n  };\n\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Real epsilon() { return 0; }\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Real dummy_precision() { return 0; }\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Real highest() { return n; }\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Real lowest() { return n; }\n};\n\nnamespace internal {\ntemplate <typename T>\nEIGEN_DEVICE_FUNC void update_value(T& val, Index new_val) {\n  val = internal::convert_index<T>(new_val);\n}\ntemplate <Index n>\nEIGEN_DEVICE_FUNC void update_value(type2index<n>& val, Index new_val) {\n  val.set(new_val);\n}\n\ntemplate <typename T>\nEIGEN_DEVICE_FUNC void update_value(T& val, IndexPair<Index> new_val) {\n  val = new_val;\n}\ntemplate <Index f, Index s>\nEIGEN_DEVICE_FUNC void update_value(type2indexpair<f, s>& val, IndexPair<Index> new_val) {\n  val.set(new_val);\n}\n\n\ntemplate <typename T>\nstruct is_compile_time_constant {\n  static constexpr bool value = false;\n};\n\ntemplate <Index idx>\nstruct is_compile_time_constant<type2index<idx> > {\n  static constexpr bool value = true;\n};\ntemplate <Index idx>\nstruct is_compile_time_constant<const type2index<idx> > {\n  static constexpr bool value = true;\n};\ntemplate <Index idx>\nstruct is_compile_time_constant<type2index<idx>& > {\n  static constexpr bool value = true;\n};\ntemplate <Index idx>\nstruct is_compile_time_constant<const type2index<idx>& > {\n  static constexpr bool value = true;\n};\n\ntemplate <Index f, Index s>\nstruct is_compile_time_constant<type2indexpair<f, s> > {\n  static constexpr bool value = true;\n};\ntemplate <Index f, Index s>\nstruct is_compile_time_constant<const type2indexpair<f, s> > {\n  static constexpr bool value = true;\n};\ntemplate <Index f, Index s>\nstruct is_compile_time_constant<type2indexpair<f, s>& > {\n  static constexpr bool value = true;\n};\ntemplate <Index f, Index s>\nstruct is_compile_time_constant<const type2indexpair<f, s>& > {\n  static constexpr bool value = true;\n};\n\n\ntemplate<typename... T>\nstruct IndexTuple;\n\ntemplate<typename T, typename... O>\nstruct IndexTuple<T, O...> {\n  EIGEN_DEVICE_FUNC constexpr IndexTuple() : head(), others() { }\n  EIGEN_DEVICE_FUNC constexpr IndexTuple(const T& v, const O... o) : head(v), others(o...) { }\n\n  constexpr static int count = 1 + sizeof...(O);\n  T head;\n  IndexTuple<O...> others;\n  typedef T Head;\n  typedef IndexTuple<O...> Other;\n};\n\ntemplate<typename T>\n  struct IndexTuple<T> {\n  EIGEN_DEVICE_FUNC constexpr IndexTuple() : head() { }\n  EIGEN_DEVICE_FUNC constexpr IndexTuple(const T& v) : head(v) { }\n\n  constexpr static int count = 1;\n  T head;\n  typedef T Head;\n};\n\n\ntemplate<int N, typename... T>\nstruct IndexTupleExtractor;\n\ntemplate<int N, typename T, typename... O>\nstruct IndexTupleExtractor<N, T, O...> {\n\n  typedef typename IndexTupleExtractor<N-1, O...>::ValType ValType;\n\n  EIGEN_DEVICE_FUNC static constexpr ValType& get_val(IndexTuple<T, O...>& val) {\n    return IndexTupleExtractor<N-1, O...>::get_val(val.others);\n  }\n\n  EIGEN_DEVICE_FUNC static constexpr const ValType& get_val(const IndexTuple<T, O...>& val) {\n    return IndexTupleExtractor<N-1, O...>::get_val(val.others);\n  }\n  template <typename V>\n  EIGEN_DEVICE_FUNC static void set_val(IndexTuple<T, O...>& val, V& new_val) {\n    IndexTupleExtractor<N-1, O...>::set_val(val.others, new_val);\n  }\n\n};\n\ntemplate<typename T, typename... O>\n  struct IndexTupleExtractor<0, T, O...> {\n\n  typedef T ValType;\n\n  EIGEN_DEVICE_FUNC static constexpr ValType& get_val(IndexTuple<T, O...>& val) {\n    return val.head;\n  }\n  EIGEN_DEVICE_FUNC static constexpr const ValType& get_val(const IndexTuple<T, O...>& val) {\n    return val.head;\n  }\n  template <typename V>\n  EIGEN_DEVICE_FUNC static void set_val(IndexTuple<T, O...>& val, V& new_val) {\n    val.head = new_val;\n  }\n};\n\n\n\ntemplate <int N, typename T, typename... O>\nEIGEN_DEVICE_FUNC constexpr typename IndexTupleExtractor<N, T, O...>::ValType& array_get(IndexTuple<T, O...>& tuple) {\n  return IndexTupleExtractor<N, T, O...>::get_val(tuple);\n}\ntemplate <int N, typename T, typename... O>\nEIGEN_DEVICE_FUNC constexpr const typename IndexTupleExtractor<N, T, O...>::ValType& array_get(const IndexTuple<T, O...>& tuple) {\n  return IndexTupleExtractor<N, T, O...>::get_val(tuple);\n}\ntemplate <typename T, typename... O>\n  struct array_size<IndexTuple<T, O...> > {\n  static const size_t value = IndexTuple<T, O...>::count;\n};\ntemplate <typename T, typename... O>\n  struct array_size<const IndexTuple<T, O...> > {\n  static const size_t value = IndexTuple<T, O...>::count;\n};\n\n\n\n\ntemplate <Index Idx, typename ValueT>\nstruct tuple_coeff {\n  template <typename... T>\n  EIGEN_DEVICE_FUNC static constexpr ValueT get(const Index i, const IndexTuple<T...>& t) {\n    //    return array_get<Idx>(t) * (i == Idx) + tuple_coeff<Idx-1>::get(i, t) * (i != Idx);\n    return (i == Idx ? array_get<Idx>(t) : tuple_coeff<Idx-1, ValueT>::get(i, t));\n  }\n  template <typename... T>\n  EIGEN_DEVICE_FUNC static void set(const Index i, IndexTuple<T...>& t, const ValueT& value) {\n    if (i == Idx) {\n      update_value(array_get<Idx>(t), value);\n    } else {\n      tuple_coeff<Idx-1, ValueT>::set(i, t, value);\n    }\n  }\n\n  template <typename... T>\n  EIGEN_DEVICE_FUNC static constexpr bool value_known_statically(const Index i, const IndexTuple<T...>& t) {\n    return ((i == Idx) & is_compile_time_constant<typename IndexTupleExtractor<Idx, T...>::ValType>::value) ||\n        tuple_coeff<Idx-1, ValueT>::value_known_statically(i, t);\n  }\n\n  template <typename... T>\n  EIGEN_DEVICE_FUNC static constexpr bool values_up_to_known_statically(const IndexTuple<T...>& t) {\n    return is_compile_time_constant<typename IndexTupleExtractor<Idx, T...>::ValType>::value &&\n        tuple_coeff<Idx-1, ValueT>::values_up_to_known_statically(t);\n  }\n\n  template <typename... T>\n  EIGEN_DEVICE_FUNC static constexpr bool values_up_to_statically_known_to_increase(const IndexTuple<T...>& t) {\n    return is_compile_time_constant<typename IndexTupleExtractor<Idx, T...>::ValType>::value &&\n           is_compile_time_constant<typename IndexTupleExtractor<Idx, T...>::ValType>::value &&\n           array_get<Idx>(t) > array_get<Idx-1>(t) &&\n           tuple_coeff<Idx-1, ValueT>::values_up_to_statically_known_to_increase(t);\n  }\n};\n\ntemplate <typename ValueT>\nstruct tuple_coeff<0, ValueT> {\n  template <typename... T>\n  EIGEN_DEVICE_FUNC static constexpr ValueT get(const Index /*i*/, const IndexTuple<T...>& t) {\n    //  eigen_assert (i == 0);  // gcc fails to compile assertions in constexpr\n    return array_get<0>(t)/* * (i == 0)*/;\n  }\n  template <typename... T>\n  EIGEN_DEVICE_FUNC static void set(const Index i, IndexTuple<T...>& t, const ValueT value) {\n    eigen_assert (i == 0);\n    update_value(array_get<0>(t), value);\n  }\n  template <typename... T>\n  EIGEN_DEVICE_FUNC static constexpr bool value_known_statically(const Index i, const IndexTuple<T...>&) {\n    return is_compile_time_constant<typename IndexTupleExtractor<0, T...>::ValType>::value && (i == 0);\n  }\n\n  template <typename... T>\n  EIGEN_DEVICE_FUNC static constexpr bool values_up_to_known_statically(const IndexTuple<T...>&) {\n    return is_compile_time_constant<typename IndexTupleExtractor<0, T...>::ValType>::value;\n  }\n\n  template <typename... T>\n  EIGEN_DEVICE_FUNC static constexpr bool values_up_to_statically_known_to_increase(const IndexTuple<T...>&) {\n    return true;\n  }\n};\n}  // namespace internal\n\n\n\ntemplate<typename FirstType, typename... OtherTypes>\nstruct IndexList : internal::IndexTuple<FirstType, OtherTypes...> {\n  EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC constexpr Index operator[] (const Index i) const {\n    return internal::tuple_coeff<internal::array_size<internal::IndexTuple<FirstType, OtherTypes...> >::value-1, Index>::get(i, *this);\n  }\n  EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC constexpr Index get(const Index i) const {\n    return internal::tuple_coeff<internal::array_size<internal::IndexTuple<FirstType, OtherTypes...> >::value-1, Index>::get(i, *this);\n  }\n  EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC void set(const Index i, const Index value) {\n    return internal::tuple_coeff<internal::array_size<internal::IndexTuple<FirstType, OtherTypes...> >::value-1, Index>::set(i, *this, value);\n  }\n\n  EIGEN_DEVICE_FUNC constexpr IndexList(const internal::IndexTuple<FirstType, OtherTypes...>& other) : internal::IndexTuple<FirstType, OtherTypes...>(other) { }\n  EIGEN_DEVICE_FUNC constexpr IndexList(FirstType& first, OtherTypes... other) : internal::IndexTuple<FirstType, OtherTypes...>(first, other...) { }\n  EIGEN_DEVICE_FUNC constexpr IndexList() : internal::IndexTuple<FirstType, OtherTypes...>() { }\n\n  EIGEN_DEVICE_FUNC constexpr bool value_known_statically(const Index i) const {\n    return internal::tuple_coeff<internal::array_size<internal::IndexTuple<FirstType, OtherTypes...> >::value-1, Index>::value_known_statically(i, *this);\n  }\n  EIGEN_DEVICE_FUNC constexpr bool all_values_known_statically() const {\n    return internal::tuple_coeff<internal::array_size<internal::IndexTuple<FirstType, OtherTypes...> >::value-1, Index>::values_up_to_known_statically(*this);\n  }\n\n  EIGEN_DEVICE_FUNC constexpr bool values_statically_known_to_increase() const {\n    return internal::tuple_coeff<internal::array_size<internal::IndexTuple<FirstType, OtherTypes...> >::value-1, Index>::values_up_to_statically_known_to_increase(*this);\n  }\n};\n\ntemplate <typename FirstType, typename... OtherTypes>\nstd::ostream& operator<<(std::ostream& os,\n                         const IndexList<FirstType, OtherTypes...>& dims) {\n  os << \"[\";\n  for (size_t i = 0; i < 1 + sizeof...(OtherTypes); ++i) {\n    if (i > 0) os << \", \";\n    os << dims[i];\n  }\n  os << \"]\";\n  return os;\n}\n\ntemplate<typename FirstType, typename... OtherTypes>\nconstexpr IndexList<FirstType, OtherTypes...> make_index_list(FirstType val1, OtherTypes... other_vals) {\n  return IndexList<FirstType, OtherTypes...>(val1, other_vals...);\n}\n\n\ntemplate<typename FirstType, typename... OtherTypes>\nstruct IndexPairList : internal::IndexTuple<FirstType, OtherTypes...> {\n  EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC constexpr IndexPair<Index> operator[] (const Index i) const {\n    return internal::tuple_coeff<internal::array_size<internal::IndexTuple<FirstType, OtherTypes...> >::value-1, IndexPair<Index>>::get(i, *this);\n  }\n  EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC void set(const Index i, const IndexPair<Index> value) {\n    return internal::tuple_coeff<internal::array_size<internal::IndexTuple<FirstType, OtherTypes...>>::value-1, IndexPair<Index> >::set(i, *this, value);\n  }\n\n  EIGEN_DEVICE_FUNC  constexpr IndexPairList(const internal::IndexTuple<FirstType, OtherTypes...>& other) : internal::IndexTuple<FirstType, OtherTypes...>(other) { }\n  EIGEN_DEVICE_FUNC  constexpr IndexPairList() : internal::IndexTuple<FirstType, OtherTypes...>() { }\n\n  EIGEN_DEVICE_FUNC constexpr bool value_known_statically(const Index i) const {\n    return internal::tuple_coeff<internal::array_size<internal::IndexTuple<FirstType, OtherTypes...> >::value-1, Index>::value_known_statically(i, *this);\n  }\n};\n\nnamespace internal {\n\ntemplate<typename FirstType, typename... OtherTypes>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index array_prod(const IndexList<FirstType, OtherTypes...>& sizes) {\n  Index result = 1;\n  EIGEN_UNROLL_LOOP\n  for (size_t i = 0; i < array_size<IndexList<FirstType, OtherTypes...> >::value; ++i) {\n    result *= sizes[i];\n  }\n  return result;\n}\n\ntemplate<typename FirstType, typename... OtherTypes> struct array_size<IndexList<FirstType, OtherTypes...> > {\n  static const size_t value = array_size<IndexTuple<FirstType, OtherTypes...> >::value;\n};\ntemplate<typename FirstType, typename... OtherTypes> struct array_size<const IndexList<FirstType, OtherTypes...> > {\n  static const size_t value = array_size<IndexTuple<FirstType, OtherTypes...> >::value;\n};\n\ntemplate<typename FirstType, typename... OtherTypes> struct array_size<IndexPairList<FirstType, OtherTypes...> > {\n  static const size_t value = std::tuple_size<std::tuple<FirstType, OtherTypes...> >::value;\n};\ntemplate<typename FirstType, typename... OtherTypes> struct array_size<const IndexPairList<FirstType, OtherTypes...> > {\n  static const size_t value = std::tuple_size<std::tuple<FirstType, OtherTypes...> >::value;\n};\n\ntemplate<Index N, typename FirstType, typename... OtherTypes> EIGEN_DEVICE_FUNC constexpr Index array_get(IndexList<FirstType, OtherTypes...>& a) {\n  return IndexTupleExtractor<N, FirstType, OtherTypes...>::get_val(a);\n}\ntemplate<Index N, typename FirstType, typename... OtherTypes> EIGEN_DEVICE_FUNC constexpr Index array_get(const IndexList<FirstType, OtherTypes...>& a) {\n  return IndexTupleExtractor<N, FirstType, OtherTypes...>::get_val(a);\n}\n\ntemplate <typename T>\nstruct index_known_statically_impl {\n  EIGEN_DEVICE_FUNC static constexpr bool run(const Index) {\n    return false;\n  }\n};\n\ntemplate <typename FirstType, typename... OtherTypes>\nstruct index_known_statically_impl<IndexList<FirstType, OtherTypes...> > {\n  EIGEN_DEVICE_FUNC static constexpr bool run(const Index i) {\n    return IndexList<FirstType, OtherTypes...>().value_known_statically(i);\n  }\n};\n\ntemplate <typename FirstType, typename... OtherTypes>\nstruct index_known_statically_impl<const IndexList<FirstType, OtherTypes...> > {\n  EIGEN_DEVICE_FUNC static constexpr bool run(const Index i) {\n    return IndexList<FirstType, OtherTypes...>().value_known_statically(i);\n  }\n};\n\n\ntemplate <typename T>\nstruct all_indices_known_statically_impl {\n  static constexpr bool run() {\n    return false;\n  }\n};\n\ntemplate <typename FirstType, typename... OtherTypes>\nstruct all_indices_known_statically_impl<IndexList<FirstType, OtherTypes...> > {\n  EIGEN_DEVICE_FUNC static constexpr bool run() {\n    return IndexList<FirstType, OtherTypes...>().all_values_known_statically();\n  }\n};\n\ntemplate <typename FirstType, typename... OtherTypes>\nstruct all_indices_known_statically_impl<const IndexList<FirstType, OtherTypes...> > {\n  EIGEN_DEVICE_FUNC static constexpr bool run() {\n    return IndexList<FirstType, OtherTypes...>().all_values_known_statically();\n  }\n};\n\n\ntemplate <typename T>\nstruct indices_statically_known_to_increase_impl {\n  EIGEN_DEVICE_FUNC static constexpr bool run() {\n    return false;\n  }\n};\n\ntemplate <typename FirstType, typename... OtherTypes>\n  struct indices_statically_known_to_increase_impl<IndexList<FirstType, OtherTypes...> > {\n  EIGEN_DEVICE_FUNC static constexpr bool run() {\n    return Eigen::IndexList<FirstType, OtherTypes...>().values_statically_known_to_increase();\n  }\n};\n\ntemplate <typename FirstType, typename... OtherTypes>\n  struct indices_statically_known_to_increase_impl<const IndexList<FirstType, OtherTypes...> > {\n  EIGEN_DEVICE_FUNC static constexpr bool run() {\n    return Eigen::IndexList<FirstType, OtherTypes...>().values_statically_known_to_increase();\n  }\n};\n\n\ntemplate <typename Tx>\nstruct index_statically_eq_impl {\n  EIGEN_DEVICE_FUNC static constexpr bool run(Index, Index) {\n    return false;\n  }\n};\n\ntemplate <typename FirstType, typename... OtherTypes>\nstruct index_statically_eq_impl<IndexList<FirstType, OtherTypes...> > {\n  EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) {\n    return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &\n        (IndexList<FirstType, OtherTypes...>().get(i) == value);\n  }\n};\n\ntemplate <typename FirstType, typename... OtherTypes>\nstruct index_statically_eq_impl<const IndexList<FirstType, OtherTypes...> > {\n  EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) {\n    return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &\n        (IndexList<FirstType, OtherTypes...>().get(i) == value);\n  }\n};\n\n\ntemplate <typename T>\nstruct index_statically_ne_impl {\n  EIGEN_DEVICE_FUNC static constexpr bool run(Index, Index) {\n    return false;\n  }\n};\n\ntemplate <typename FirstType, typename... OtherTypes>\nstruct index_statically_ne_impl<IndexList<FirstType, OtherTypes...> > {\n  EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) {\n    return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &\n        (IndexList<FirstType, OtherTypes...>().get(i) != value);\n  }\n};\n\ntemplate <typename FirstType, typename... OtherTypes>\nstruct index_statically_ne_impl<const IndexList<FirstType, OtherTypes...> > {\n  EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) {\n    return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &\n        (IndexList<FirstType, OtherTypes...>().get(i) != value);\n  }\n};\n\n\ntemplate <typename T>\nstruct index_statically_gt_impl {\n  EIGEN_DEVICE_FUNC static constexpr bool run(Index, Index) {\n    return false;\n  }\n};\n\ntemplate <typename FirstType, typename... OtherTypes>\nstruct index_statically_gt_impl<IndexList<FirstType, OtherTypes...> > {\n  EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) {\n    return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &\n        (IndexList<FirstType, OtherTypes...>().get(i) > value);\n  }\n};\n\ntemplate <typename FirstType, typename... OtherTypes>\nstruct index_statically_gt_impl<const IndexList<FirstType, OtherTypes...> > {\n  EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) {\n    return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &\n        (IndexList<FirstType, OtherTypes...>().get(i) > value);\n  }\n};\n\n\n\ntemplate <typename T>\nstruct index_statically_lt_impl {\n  EIGEN_DEVICE_FUNC static constexpr bool run(Index, Index) {\n    return false;\n  }\n};\n\ntemplate <typename FirstType, typename... OtherTypes>\nstruct index_statically_lt_impl<IndexList<FirstType, OtherTypes...> > {\n  EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) {\n    return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &\n        (IndexList<FirstType, OtherTypes...>().get(i) < value);\n  }\n};\n\ntemplate <typename FirstType, typename... OtherTypes>\nstruct index_statically_lt_impl<const IndexList<FirstType, OtherTypes...> > {\n  EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) {\n    return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &\n        (IndexList<FirstType, OtherTypes...>().get(i) < value);\n  }\n};\n\n\n\ntemplate <typename Tx>\nstruct index_pair_first_statically_eq_impl {\n  EIGEN_DEVICE_FUNC static constexpr bool run(Index, Index) {\n    return false;\n  }\n};\n\ntemplate <typename FirstType, typename... OtherTypes>\nstruct index_pair_first_statically_eq_impl<IndexPairList<FirstType, OtherTypes...> > {\n  EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) {\n    return IndexPairList<FirstType, OtherTypes...>().value_known_statically(i) &\n        (IndexPairList<FirstType, OtherTypes...>().operator[](i).first == value);\n  }\n};\n\ntemplate <typename FirstType, typename... OtherTypes>\nstruct index_pair_first_statically_eq_impl<const IndexPairList<FirstType, OtherTypes...> > {\n  EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) {\n    return IndexPairList<FirstType, OtherTypes...>().value_known_statically(i) &\n        (IndexPairList<FirstType, OtherTypes...>().operator[](i).first == value);\n  }\n};\n\n\n\ntemplate <typename Tx>\nstruct index_pair_second_statically_eq_impl {\n  EIGEN_DEVICE_FUNC static constexpr bool run(Index, Index) {\n    return false;\n  }\n};\n\ntemplate <typename FirstType, typename... OtherTypes>\nstruct index_pair_second_statically_eq_impl<IndexPairList<FirstType, OtherTypes...> > {\n  EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) {\n    return IndexPairList<FirstType, OtherTypes...>().value_known_statically(i) &\n        (IndexPairList<FirstType, OtherTypes...>().operator[](i).second == value);\n  }\n};\n\ntemplate <typename FirstType, typename... OtherTypes>\nstruct index_pair_second_statically_eq_impl<const IndexPairList<FirstType, OtherTypes...> > {\n  EIGEN_DEVICE_FUNC static constexpr bool run(const Index i, const Index value) {\n    return IndexPairList<FirstType, OtherTypes...>().value_known_statically(i) &\n        (IndexPairList<FirstType, OtherTypes...>().operator[](i).second == value);\n  }\n};\n\n\n}  // end namespace internal\n}  // end namespace Eigen\n\n#else\n\nnamespace Eigen {\nnamespace internal {\n\ntemplate <typename T>\nstruct index_known_statically_impl {\n  static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(const Index) {\n    return false;\n  }\n};\n\ntemplate <typename T>\nstruct all_indices_known_statically_impl {\n  static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run() {\n    return false;\n  }\n};\n\ntemplate <typename T>\nstruct indices_statically_known_to_increase_impl {\n  static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run() {\n    return false;\n  }\n};\n\ntemplate <typename T>\nstruct index_statically_eq_impl {\n  static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(Index, Index) {\n    return false;\n  }\n};\n\ntemplate <typename T>\nstruct index_statically_ne_impl {\n  static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(Index, Index) {\n    return false;\n  }\n};\n\ntemplate <typename T>\nstruct index_statically_gt_impl {\n  static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(Index, Index) {\n    return false;\n  }\n};\n\ntemplate <typename T>\nstruct index_statically_lt_impl {\n  static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(Index, Index) {\n    return false;\n  }\n};\n\ntemplate <typename Tx>\nstruct index_pair_first_statically_eq_impl {\n  static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(Index, Index) {\n    return false;\n  }\n};\n\ntemplate <typename Tx>\nstruct index_pair_second_statically_eq_impl {\n  static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(Index, Index) {\n    return false;\n  }\n};\n\n\n\n}  // end namespace internal\n}  // end namespace Eigen\n\n#endif\n\n\nnamespace Eigen {\nnamespace internal {\ntemplate <typename T>\nstatic EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR bool index_known_statically(Index i) {\n  return index_known_statically_impl<T>::run(i);\n}\n\ntemplate <typename T>\nstatic EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR bool all_indices_known_statically() {\n  return all_indices_known_statically_impl<T>::run();\n}\n\ntemplate <typename T>\nstatic EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR bool indices_statically_known_to_increase() {\n  return indices_statically_known_to_increase_impl<T>::run();\n}\n\ntemplate <typename T>\nstatic EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR bool index_statically_eq(Index i, Index value) {\n  return index_statically_eq_impl<T>::run(i, value);\n}\n\ntemplate <typename T>\nstatic EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR bool index_statically_ne(Index i, Index value) {\n  return index_statically_ne_impl<T>::run(i, value);\n}\n\ntemplate <typename T>\nstatic EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR bool index_statically_gt(Index i, Index value) {\n  return index_statically_gt_impl<T>::run(i, value);\n}\n\ntemplate <typename T>\nstatic EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR bool index_statically_lt(Index i, Index value) {\n  return index_statically_lt_impl<T>::run(i, value);\n}\n\ntemplate <typename T>\nstatic EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR bool index_pair_first_statically_eq(Index i, Index value) {\n  return index_pair_first_statically_eq_impl<T>::run(i, value);\n}\n\ntemplate <typename T>\nstatic EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR bool index_pair_second_statically_eq(Index i, Index value) {\n  return index_pair_second_statically_eq_impl<T>::run(i, value);\n}\n\n}  // end namespace internal\n}  // end namespace Eigen\n\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_INDEX_LIST_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorInflation.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Ke Yang <yangke@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_INFLATION_H\n#define EIGEN_CXX11_TENSOR_TENSOR_INFLATION_H\n\nnamespace Eigen {\n\n/** \\class TensorInflation\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief Tensor inflation class.\n  *\n  *\n  */\nnamespace internal {\ntemplate<typename Strides, typename XprType>\nstruct traits<TensorInflationOp<Strides, XprType> > : public traits<XprType>\n{\n  typedef typename XprType::Scalar Scalar;\n  typedef traits<XprType> XprTraits;\n  typedef typename XprTraits::StorageKind StorageKind;\n  typedef typename XprTraits::Index Index;\n  typedef typename XprType::Nested Nested;\n  typedef typename remove_reference<Nested>::type _Nested;\n  static const int NumDimensions = XprTraits::NumDimensions;\n  static const int Layout = XprTraits::Layout;\n  typedef typename XprTraits::PointerType PointerType;\n};\n\ntemplate<typename Strides, typename XprType>\nstruct eval<TensorInflationOp<Strides, XprType>, Eigen::Dense>\n{\n  typedef const TensorInflationOp<Strides, XprType>& type;\n};\n\ntemplate<typename Strides, typename XprType>\nstruct nested<TensorInflationOp<Strides, XprType>, 1, typename eval<TensorInflationOp<Strides, XprType> >::type>\n{\n  typedef TensorInflationOp<Strides, XprType> type;\n};\n\n}  // end namespace internal\n\ntemplate<typename Strides, typename XprType>\nclass TensorInflationOp : public TensorBase<TensorInflationOp<Strides, XprType>, ReadOnlyAccessors>\n{\n  public:\n  typedef typename Eigen::internal::traits<TensorInflationOp>::Scalar Scalar;\n  typedef typename Eigen::NumTraits<Scalar>::Real RealScalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename Eigen::internal::nested<TensorInflationOp>::type Nested;\n  typedef typename Eigen::internal::traits<TensorInflationOp>::StorageKind StorageKind;\n  typedef typename Eigen::internal::traits<TensorInflationOp>::Index Index;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorInflationOp(const XprType& expr, const Strides& strides)\n      : m_xpr(expr), m_strides(strides) {}\n\n    EIGEN_DEVICE_FUNC\n    const Strides& strides() const { return m_strides; }\n\n    EIGEN_DEVICE_FUNC\n    const typename internal::remove_all<typename XprType::Nested>::type&\n    expression() const { return m_xpr; }\n\n  protected:\n    typename XprType::Nested m_xpr;\n    const Strides m_strides;\n};\n\n// Eval as rvalue\ntemplate<typename Strides, typename ArgType, typename Device>\nstruct TensorEvaluator<const TensorInflationOp<Strides, ArgType>, Device>\n{\n  typedef TensorInflationOp<Strides, ArgType> XprType;\n  typedef typename XprType::Index Index;\n  static const int NumDims = internal::array_size<typename TensorEvaluator<ArgType, Device>::Dimensions>::value;\n  typedef DSizes<Index, NumDims> Dimensions;\n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  static const int PacketSize = PacketType<CoeffReturnType, Device>::size;\n  typedef StorageMemory<CoeffReturnType, Device> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n\n  enum {\n    IsAligned = /*TensorEvaluator<ArgType, Device>::IsAligned*/ false,\n    PacketAccess = TensorEvaluator<ArgType, Device>::PacketAccess,\n    BlockAccess = false,\n    PreferBlockAccess = false,\n    Layout = TensorEvaluator<ArgType, Device>::Layout,\n    CoordAccess = false,  // to be implemented\n    RawAccess = false\n  };\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockNotImplemented TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)\n      : m_impl(op.expression(), device), m_strides(op.strides())\n  {\n    m_dimensions = m_impl.dimensions();\n    // Expand each dimension to the inflated dimension.\n    for (int i = 0; i < NumDims; ++i) {\n      m_dimensions[i] = (m_dimensions[i] - 1) * op.strides()[i] + 1;\n    }\n\n    // Remember the strides for fast division.\n    for (int i = 0; i < NumDims; ++i) {\n      m_fastStrides[i] = internal::TensorIntDivisor<Index>(m_strides[i]);\n    }\n\n    const typename TensorEvaluator<ArgType, Device>::Dimensions& input_dims = m_impl.dimensions();\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      m_outputStrides[0] = 1;\n      m_inputStrides[0] = 1;\n      for (int i = 1; i < NumDims; ++i) {\n        m_outputStrides[i] = m_outputStrides[i-1] * m_dimensions[i-1];\n        m_inputStrides[i] = m_inputStrides[i-1] * input_dims[i-1];\n      }\n    } else {  // RowMajor\n      m_outputStrides[NumDims-1] = 1;\n      m_inputStrides[NumDims-1] = 1;\n      for (int i = NumDims - 2; i >= 0; --i) {\n        m_outputStrides[i] = m_outputStrides[i+1] * m_dimensions[i+1];\n        m_inputStrides[i] = m_inputStrides[i+1] * input_dims[i+1];\n      }\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions& dimensions() const { return m_dimensions; }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType /*data*/) {\n    m_impl.evalSubExprsIfNeeded(NULL);\n    return true;\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {\n    m_impl.cleanup();\n  }\n\n  // Computes the input index given the output index. Returns true if the output\n  // index doesn't fall into a hole.\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool getInputIndex(Index index, Index* inputIndex) const\n  {\n    eigen_assert(index < dimensions().TotalSize());\n    *inputIndex = 0;\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      EIGEN_UNROLL_LOOP\n      for (int i = NumDims - 1; i > 0; --i) {\n        const Index idx = index / m_outputStrides[i];\n        if (idx != idx / m_fastStrides[i] * m_strides[i]) {\n          return false;\n        }\n        *inputIndex += idx / m_strides[i] * m_inputStrides[i];\n        index -= idx * m_outputStrides[i];\n      }\n      if (index != index / m_fastStrides[0] * m_strides[0]) {\n        return false;\n      }\n      *inputIndex += index / m_strides[0];\n      return true;\n    } else {\n      EIGEN_UNROLL_LOOP\n      for (int i = 0; i < NumDims - 1; ++i) {\n        const Index idx = index / m_outputStrides[i];\n        if (idx != idx / m_fastStrides[i] * m_strides[i]) {\n          return false;\n        }\n        *inputIndex += idx / m_strides[i] * m_inputStrides[i];\n        index -= idx * m_outputStrides[i];\n      }\n      if (index != index / m_fastStrides[NumDims-1] * m_strides[NumDims-1]) {\n        return false;\n      }\n      *inputIndex += index / m_strides[NumDims - 1];\n    }\n    return true;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const\n  {\n    Index inputIndex = 0;\n    if (getInputIndex(index, &inputIndex)) {\n     return m_impl.coeff(inputIndex);\n    } else {\n     return Scalar(0);\n    }\n  }\n\n  // TODO(yangke): optimize this function so that we can detect and produce\n  // all-zero packets\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const\n  {\n    EIGEN_STATIC_ASSERT((PacketSize > 1), YOU_MADE_A_PROGRAMMING_MISTAKE)\n    eigen_assert(index+PacketSize-1 < dimensions().TotalSize());\n\n    EIGEN_ALIGN_MAX typename internal::remove_const<CoeffReturnType>::type values[PacketSize];\n    EIGEN_UNROLL_LOOP\n    for (int i = 0; i < PacketSize; ++i) {\n      values[i] = coeff(index+i);\n    }\n    PacketReturnType rslt = internal::pload<PacketReturnType>(values);\n    return rslt;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool vectorized) const {\n    const double compute_cost = NumDims * (3 * TensorOpCost::DivCost<Index>() +\n                                           3 * TensorOpCost::MulCost<Index>() +\n                                           2 * TensorOpCost::AddCost<Index>());\n    const double input_size = m_impl.dimensions().TotalSize();\n    const double output_size = m_dimensions.TotalSize();\n    if (output_size == 0)\n      return TensorOpCost();\n    return m_impl.costPerCoeff(vectorized) +\n           TensorOpCost(sizeof(CoeffReturnType) * input_size / output_size, 0,\n                        compute_cost, vectorized, PacketSize);\n  }\n\n  EIGEN_DEVICE_FUNC EvaluatorPointerType data() const { return NULL; }\n\n#ifdef EIGEN_USE_SYCL\n  // binding placeholder accessors to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {\n    m_impl.bind(cgh);\n  }\n#endif\n\n protected:\n  Dimensions m_dimensions;\n  array<Index, NumDims> m_outputStrides;\n  array<Index, NumDims> m_inputStrides;\n  TensorEvaluator<ArgType, Device> m_impl;\n  const Strides m_strides;\n  array<internal::TensorIntDivisor<Index>, NumDims> m_fastStrides;\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_INFLATION_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorInitializer.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_INITIALIZER_H\n#define EIGEN_CXX11_TENSOR_TENSOR_INITIALIZER_H\n\n#if EIGEN_HAS_VARIADIC_TEMPLATES\n\n#include <initializer_list>\n\nnamespace Eigen {\n\n/** \\class TensorInitializer\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief Helper template to initialize Tensors from std::initializer_lists.\n  */\nnamespace internal {\n\ntemplate <typename Derived, int N>\nstruct Initializer {\n  typedef std::initializer_list<\n    typename Initializer<Derived, N - 1>::InitList> InitList;\n\n  static void run(TensorEvaluator<Derived, DefaultDevice>& tensor,\n                  Eigen::array<typename traits<Derived>::Index, traits<Derived>::NumDimensions>* indices,\n                  const InitList& vals) {\n    int i = 0;\n    for (auto v : vals) {\n      (*indices)[traits<Derived>::NumDimensions - N] = i++;\n      Initializer<Derived, N - 1>::run(tensor, indices, v);\n    }\n  }\n};\n\ntemplate <typename Derived>\nstruct Initializer<Derived, 1> {\n  typedef std::initializer_list<typename traits<Derived>::Scalar> InitList;\n\n  static void run(TensorEvaluator<Derived, DefaultDevice>& tensor,\n                  Eigen::array<typename traits<Derived>::Index, traits<Derived>::NumDimensions>* indices,\n                  const InitList& vals) {\n    int i = 0;\n    // There is likely a faster way to do that than iterating.\n    for (auto v : vals) {\n      (*indices)[traits<Derived>::NumDimensions - 1] = i++;\n      tensor.coeffRef(*indices) = v;\n    }\n  }\n};\n\ntemplate <typename Derived>\nstruct Initializer<Derived, 0> {\n  typedef typename traits<Derived>::Scalar InitList;\n\n  static void run(TensorEvaluator<Derived, DefaultDevice>& tensor,\n                  Eigen::array<typename traits<Derived>::Index, traits<Derived>::NumDimensions>*,\n                  const InitList& v) {\n    tensor.coeffRef(0) = v;\n  }\n};\n\n\ntemplate <typename Derived, int N>\nvoid initialize_tensor(TensorEvaluator<Derived, DefaultDevice>& tensor,\n                       const typename Initializer<Derived, traits<Derived>::NumDimensions>::InitList& vals) {\n  Eigen::array<typename traits<Derived>::Index, traits<Derived>::NumDimensions> indices;\n  Initializer<Derived, traits<Derived>::NumDimensions>::run(tensor, &indices, vals);\n}\n\n}  // namespace internal\n}  // namespace Eigen\n\n#endif  // EIGEN_HAS_VARIADIC_TEMPLATES\n\n#endif  // EIGEN_CXX11_TENSOR_TENSOR_INITIALIZER_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorIntDiv.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_INTDIV_H\n#define EIGEN_CXX11_TENSOR_TENSOR_INTDIV_H\n\n\nnamespace Eigen {\n\n/** \\internal\n  *\n  * \\class TensorIntDiv\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief Fast integer division by a constant.\n  *\n  * See the paper from Granlund and Montgomery for explanation.\n  *   (at https://doi.org/10.1145/773473.178249)\n  *\n  * \\sa Tensor\n  */\n\nnamespace internal {\n\nnamespace {\n\n  // Note: result is undefined if val == 0\n  template <typename T>\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\n  typename internal::enable_if<sizeof(T)==4,int>::type count_leading_zeros(const T val)\n  {\n#ifdef EIGEN_GPU_COMPILE_PHASE\n    return __clz(val);\n#elif defined(SYCL_DEVICE_ONLY)\n    return cl::sycl::clz(val);\n#elif EIGEN_COMP_MSVC\n    unsigned long index;\n    _BitScanReverse(&index, val);\n    return 31 - index;\n#else\n    EIGEN_STATIC_ASSERT(sizeof(unsigned long long) == 8, YOU_MADE_A_PROGRAMMING_MISTAKE);\n    return __builtin_clz(static_cast<uint32_t>(val));\n#endif\n  }\n\n  template <typename T>\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\n  typename internal::enable_if<sizeof(T)==8,int>::type count_leading_zeros(const T val)\n  {\n#ifdef EIGEN_GPU_COMPILE_PHASE\n    return __clzll(val);\n#elif defined(SYCL_DEVICE_ONLY)\n    return static_cast<int>(cl::sycl::clz(val));\n#elif EIGEN_COMP_MSVC && EIGEN_ARCH_x86_64\n    unsigned long index;\n    _BitScanReverse64(&index, val);\n    return 63 - index;\n#elif EIGEN_COMP_MSVC\n    // MSVC's _BitScanReverse64 is not available for 32bits builds.\n    unsigned int lo = (unsigned int)(val&0xffffffff);\n    unsigned int hi = (unsigned int)((val>>32)&0xffffffff);\n    int n;\n    if(hi==0)\n      n = 32 + count_leading_zeros<unsigned int>(lo);\n    else\n      n = count_leading_zeros<unsigned int>(hi);\n    return n;\n#else\n    EIGEN_STATIC_ASSERT(sizeof(unsigned long long) == 8, YOU_MADE_A_PROGRAMMING_MISTAKE);\n    return __builtin_clzll(static_cast<uint64_t>(val));\n#endif\n  }\n\n  template <typename T>\n  struct UnsignedTraits {\n    typedef typename conditional<sizeof(T) == 8, uint64_t, uint32_t>::type type;\n  };\n\n  template <typename T>\n  struct DividerTraits {\n    typedef typename UnsignedTraits<T>::type type;\n    static const int N = sizeof(T) * 8;\n  };\n\n  template <typename T>\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE uint32_t muluh(const uint32_t a, const T b) {\n#if defined(EIGEN_GPU_COMPILE_PHASE)\n    return __umulhi(a, b);\n#elif defined(SYCL_DEVICE_ONLY)\n    return cl::sycl::mul_hi(a, static_cast<uint32_t>(b));\n#else\n    return (static_cast<uint64_t>(a) * b) >> 32;\n#endif\n  }\n\n  template <typename T>\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE uint64_t muluh(const uint64_t a, const T b) {\n#if defined(EIGEN_GPU_COMPILE_PHASE)\n    return __umul64hi(a, b);\n#elif defined(SYCL_DEVICE_ONLY)\n    return cl::sycl::mul_hi(a, static_cast<uint64_t>(b));\n#elif EIGEN_HAS_BUILTIN_INT128\n    __uint128_t v = static_cast<__uint128_t>(a) * static_cast<__uint128_t>(b);\n    return static_cast<uint64_t>(v >> 64);\n#else\n    return (TensorUInt128<static_val<0>, uint64_t>(a) * TensorUInt128<static_val<0>, uint64_t>(b)).upper();\n#endif\n  }\n\n  template <int N, typename T>\n  struct DividerHelper {\n    static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE uint32_t computeMultiplier(const int log_div, const T divider) {\n      EIGEN_STATIC_ASSERT(N == 32, YOU_MADE_A_PROGRAMMING_MISTAKE);\n      return static_cast<uint32_t>((static_cast<uint64_t>(1) << (N+log_div)) / divider - (static_cast<uint64_t>(1) << N) + 1);\n    }\n  };\n\n  template <typename T>\n  struct DividerHelper<64, T> {\n    static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE uint64_t computeMultiplier(const int log_div, const T divider) {\n#if EIGEN_HAS_BUILTIN_INT128 && !defined(EIGEN_GPU_COMPILE_PHASE) && !defined(SYCL_DEVICE_ONLY)\n      return static_cast<uint64_t>((static_cast<__uint128_t>(1) << (64+log_div)) / static_cast<__uint128_t>(divider) - (static_cast<__uint128_t>(1) << 64) + 1);\n#else\n      const uint64_t shift = 1ULL << log_div;\n      TensorUInt128<uint64_t, uint64_t> result = TensorUInt128<uint64_t, static_val<0> >(shift, 0) / TensorUInt128<static_val<0>, uint64_t>(divider)\n                                               - TensorUInt128<static_val<1>, static_val<0> >(1, 0)\n                                               + TensorUInt128<static_val<0>, static_val<1> >(1);\n      return static_cast<uint64_t>(result);\n#endif\n    }\n  };\n}\n\n\ntemplate <typename T, bool div_gt_one = false>\nstruct TensorIntDivisor {\n public:\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorIntDivisor() {\n    multiplier = 0;\n    shift1 = 0;\n    shift2 = 0;\n  }\n\n  // Must have 0 < divider < 2^31. This is relaxed to\n  // 0 < divider < 2^63 when using 64-bit indices on platforms that support\n  // the __uint128_t type.\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorIntDivisor(const T divider) {\n    const int N = DividerTraits<T>::N;\n    eigen_assert(static_cast<typename UnsignedTraits<T>::type>(divider) < NumTraits<UnsignedType>::highest()/2);\n    eigen_assert(divider > 0);\n\n    // fast ln2\n    const int leading_zeros = count_leading_zeros(static_cast<UnsignedType>(divider));\n    int log_div = N - leading_zeros;\n    // if divider is a power of two then log_div is 1 more than it should be.\n    if ((static_cast<typename UnsignedTraits<T>::type>(1) << (log_div-1)) == static_cast<typename UnsignedTraits<T>::type>(divider))\n      log_div--;\n\n    multiplier = DividerHelper<N, T>::computeMultiplier(log_div, divider);\n    shift1 = log_div > 1 ? 1 : log_div;\n    shift2 = log_div > 1 ? log_div-1 : 0;\n  }\n\n  // Must have 0 <= numerator. On platforms that don't support the __uint128_t\n  // type numerator should also be less than 2^32-1.\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T divide(const T numerator) const {\n    eigen_assert(static_cast<typename UnsignedTraits<T>::type>(numerator) < NumTraits<UnsignedType>::highest()/2);\n    //eigen_assert(numerator >= 0); // this is implicitly asserted by the line above\n\n    UnsignedType t1 = muluh(multiplier, numerator);\n    UnsignedType t = (static_cast<UnsignedType>(numerator) - t1) >> shift1;\n    return (t1 + t) >> shift2;\n  }\n\n private:\n  typedef typename DividerTraits<T>::type UnsignedType;\n  UnsignedType multiplier;\n  int32_t shift1;\n  int32_t shift2;\n};\n\n\n// Optimized version for signed 32 bit integers.\n// Derived from Hacker's Delight.\n// Only works for divisors strictly greater than one\ntemplate <>\nclass TensorIntDivisor<int32_t, true> {\n public:\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorIntDivisor() {\n    magic = 0;\n    shift = 0;\n  }\n  // Must have 2 <= divider\n  EIGEN_DEVICE_FUNC TensorIntDivisor(int32_t divider)  {\n    eigen_assert(divider >= 2);\n    calcMagic(divider);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE int divide(const int32_t n) const {\n#ifdef EIGEN_GPU_COMPILE_PHASE\n    return (__umulhi(magic, n) >> shift);\n#elif defined(SYCL_DEVICE_ONLY)\n    return (cl::sycl::mul_hi(magic, static_cast<uint32_t>(n)) >> shift);\n#else\n    uint64_t v = static_cast<uint64_t>(magic) * static_cast<uint64_t>(n);\n    return (static_cast<uint32_t>(v >> 32) >> shift);\n#endif\n  }\n\nprivate:\n  // Compute the magic numbers. See Hacker's Delight section 10 for an in\n  // depth explanation.\n  EIGEN_DEVICE_FUNC void calcMagic(int32_t d) {\n   const unsigned two31 = 0x80000000;     // 2**31.\n   unsigned ad = d;\n   unsigned t = two31 + (ad >> 31);\n   unsigned anc = t - 1 - t%ad;     // Absolute value of nc.\n   int p = 31;                      // Init. p.\n   unsigned q1 = two31/anc;         // Init. q1 = 2**p/|nc|.\n   unsigned r1 = two31 - q1*anc;    // Init. r1 = rem(2**p, |nc|).\n   unsigned q2 = two31/ad;          // Init. q2 = 2**p/|d|.\n   unsigned r2 = two31 - q2*ad;     // Init. r2 = rem(2**p, |d|).\n   unsigned delta = 0;\n   do {\n      p = p + 1;\n      q1 = 2*q1;           // Update q1 = 2**p/|nc|.\n      r1 = 2*r1;           // Update r1 = rem(2**p, |nc|).\n      if (r1 >= anc) {     // (Must be an unsigned\n         q1 = q1 + 1;      // comparison here).\n         r1 = r1 - anc;}\n      q2 = 2*q2;           // Update q2 = 2**p/|d|.\n      r2 = 2*r2;           // Update r2 = rem(2**p, |d|).\n      if (r2 >= ad) {      // (Must be an unsigned\n         q2 = q2 + 1;      // comparison here).\n         r2 = r2 - ad;}\n      delta = ad - r2;\n   } while (q1 < delta || (q1 == delta && r1 == 0));\n\n   magic = (unsigned)(q2 + 1);\n   shift = p - 32;\n  }\n\n  uint32_t magic;\n  int32_t shift;\n};\n\n\ntemplate <typename T, bool div_gt_one>\nstatic EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T operator / (const T& numerator, const TensorIntDivisor<T, div_gt_one>& divisor) {\n  return divisor.divide(numerator);\n}\n\n\n} // end namespace internal\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_INTDIV_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorLayoutSwap.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_LAYOUT_SWAP_H\n#define EIGEN_CXX11_TENSOR_TENSOR_LAYOUT_SWAP_H\n\nnamespace Eigen {\n\n/** \\class TensorLayoutSwap\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief Swap the layout from col-major to row-major, or row-major\n  * to col-major, and invert the order of the dimensions.\n  *\n  * Beware: the dimensions are reversed by this operation. If you want to\n  * preserve the ordering of the dimensions, you need to combine this\n  * operation with a shuffle.\n  *\n  * \\example:\n  * Tensor<float, 2, ColMajor> input(2, 4);\n  * Tensor<float, 2, RowMajor> output = input.swap_layout();\n  * eigen_assert(output.dimension(0) == 4);\n  * eigen_assert(output.dimension(1) == 2);\n  *\n  * array<int, 2> shuffle(1, 0);\n  * output = input.swap_layout().shuffle(shuffle);\n  * eigen_assert(output.dimension(0) == 2);\n  * eigen_assert(output.dimension(1) == 4);\n  *\n  */\nnamespace internal {\ntemplate<typename XprType>\nstruct traits<TensorLayoutSwapOp<XprType> > : public traits<XprType>\n{\n  typedef typename XprType::Scalar Scalar;\n  typedef traits<XprType> XprTraits;\n  typedef typename XprTraits::StorageKind StorageKind;\n  typedef typename XprTraits::Index Index;\n  typedef typename XprType::Nested Nested;\n  typedef typename remove_reference<Nested>::type _Nested;\n  static const int NumDimensions = traits<XprType>::NumDimensions;\n  static const int Layout = (traits<XprType>::Layout == ColMajor) ? RowMajor : ColMajor;\n  typedef typename XprTraits::PointerType PointerType;\n};\n\ntemplate<typename XprType>\nstruct eval<TensorLayoutSwapOp<XprType>, Eigen::Dense>\n{\n  typedef const TensorLayoutSwapOp<XprType>& type;\n};\n\ntemplate<typename XprType>\nstruct nested<TensorLayoutSwapOp<XprType>, 1, typename eval<TensorLayoutSwapOp<XprType> >::type>\n{\n  typedef TensorLayoutSwapOp<XprType> type;\n};\n\n}  // end namespace internal\n\n\n\ntemplate<typename XprType>\nclass TensorLayoutSwapOp : public TensorBase<TensorLayoutSwapOp<XprType>, WriteAccessors>\n{\n  public:\n  typedef typename Eigen::internal::traits<TensorLayoutSwapOp>::Scalar Scalar;\n  typedef typename Eigen::NumTraits<Scalar>::Real RealScalar;\n  typedef typename internal::remove_const<typename XprType::CoeffReturnType>::type CoeffReturnType;\n  typedef typename Eigen::internal::nested<TensorLayoutSwapOp>::type Nested;\n  typedef typename Eigen::internal::traits<TensorLayoutSwapOp>::StorageKind StorageKind;\n  typedef typename Eigen::internal::traits<TensorLayoutSwapOp>::Index Index;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorLayoutSwapOp(const XprType& expr)\n      : m_xpr(expr) {}\n\n    EIGEN_DEVICE_FUNC\n    const typename internal::remove_all<typename XprType::Nested>::type&\n    expression() const { return m_xpr; }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE TensorLayoutSwapOp& operator = (const TensorLayoutSwapOp& other)\n    {\n      typedef TensorAssignOp<TensorLayoutSwapOp, const TensorLayoutSwapOp> Assign;\n      Assign assign(*this, other);\n      internal::TensorExecutor<const Assign, DefaultDevice>::run(assign, DefaultDevice());\n      return *this;\n    }\n\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE TensorLayoutSwapOp& operator = (const OtherDerived& other)\n    {\n      typedef TensorAssignOp<TensorLayoutSwapOp, const OtherDerived> Assign;\n      Assign assign(*this, other);\n      internal::TensorExecutor<const Assign, DefaultDevice>::run(assign, DefaultDevice());\n      return *this;\n    }\n\n  protected:\n    typename XprType::Nested m_xpr;\n};\n\n\n// Eval as rvalue\ntemplate<typename ArgType, typename Device>\nstruct TensorEvaluator<const TensorLayoutSwapOp<ArgType>, Device>\n{\n  typedef TensorLayoutSwapOp<ArgType> XprType;\n  typedef typename XprType::Index Index;\n  static const int NumDims = internal::array_size<typename TensorEvaluator<ArgType, Device>::Dimensions>::value;\n  typedef DSizes<Index, NumDims> Dimensions;\n\n  enum {\n    IsAligned = TensorEvaluator<ArgType, Device>::IsAligned,\n    PacketAccess = TensorEvaluator<ArgType, Device>::PacketAccess,\n    BlockAccess = false,\n    PreferBlockAccess = TensorEvaluator<ArgType, Device>::PreferBlockAccess,\n    Layout = (static_cast<int>(TensorEvaluator<ArgType, Device>::Layout) == static_cast<int>(ColMajor)) ? RowMajor : ColMajor,\n    CoordAccess = false,  // to be implemented\n    RawAccess = TensorEvaluator<ArgType, Device>::RawAccess\n  };\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockNotImplemented TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)\n      : m_impl(op.expression(), device)\n  {\n    for(int i = 0; i < NumDims; ++i) {\n      m_dimensions[i] = m_impl.dimensions()[NumDims-1-i];\n    }\n  }\n\n#ifdef EIGEN_USE_SYCL\n  // binding placeholder accessors to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {\n    m_impl.bind(cgh);\n  }\n#endif\n\n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  typedef StorageMemory<CoeffReturnType, Device> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions& dimensions() const { return m_dimensions; }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType data) {\n    return m_impl.evalSubExprsIfNeeded(data);\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {\n    m_impl.cleanup();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const\n  {\n    return m_impl.coeff(index);\n  }\n\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const\n  {\n    return m_impl.template packet<LoadMode>(index);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool vectorized) const {\n    return m_impl.costPerCoeff(vectorized);\n  }\n\n  EIGEN_DEVICE_FUNC typename Storage::Type data() const {\n    return constCast(m_impl.data());\n  }\n\n  const TensorEvaluator<ArgType, Device>& impl() const { return m_impl; }\n\n protected:\n  TensorEvaluator<ArgType, Device> m_impl;\n  Dimensions m_dimensions;\n};\n\n\n// Eval as lvalue\ntemplate<typename ArgType, typename Device>\n  struct TensorEvaluator<TensorLayoutSwapOp<ArgType>, Device>\n  : public TensorEvaluator<const TensorLayoutSwapOp<ArgType>, Device>\n{\n  typedef TensorEvaluator<const TensorLayoutSwapOp<ArgType>, Device> Base;\n  typedef TensorLayoutSwapOp<ArgType> XprType;\n\n  enum {\n    IsAligned = TensorEvaluator<ArgType, Device>::IsAligned,\n    PacketAccess = TensorEvaluator<ArgType, Device>::PacketAccess,\n    BlockAccess = false,\n    PreferBlockAccess = TensorEvaluator<ArgType, Device>::PreferBlockAccess,\n    Layout = (static_cast<int>(TensorEvaluator<ArgType, Device>::Layout) == static_cast<int>(ColMajor)) ? RowMajor : ColMajor,\n    CoordAccess = false  // to be implemented\n  };\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockNotImplemented TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)\n    : Base(op, device)\n  { }\n  \n  typedef typename XprType::Index Index;\n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType& coeffRef(Index index)\n  {\n    return this->m_impl.coeffRef(index);\n  }\n  template <int StoreMode> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  void writePacket(Index index, const PacketReturnType& x)\n  {\n    this->m_impl.template writePacket<StoreMode>(index, x);\n  }\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_LAYOUT_SWAP_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorMacros.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_META_MACROS_H\n#define EIGEN_CXX11_TENSOR_TENSOR_META_MACROS_H\n\n\n/** use this macro in sfinae selection in templated functions\n *\n *   template<typename T,\n *            typename std::enable_if< isBanana<T>::value , int >::type = 0\n *   >\n *   void foo(){}\n *\n *   becomes =>\n *\n *   template<typename TopoType,\n *           SFINAE_ENABLE_IF( isBanana<T>::value )\n *   >\n *   void foo(){}\n */\n\n// SFINAE requires variadic templates\n#if !defined(EIGEN_GPUCC)\n#if EIGEN_HAS_VARIADIC_TEMPLATES\n  // SFINAE doesn't work for gcc <= 4.7\n  #ifdef EIGEN_COMP_GNUC\n    #if EIGEN_GNUC_AT_LEAST(4,8)\n      #define EIGEN_HAS_SFINAE\n    #endif\n  #else\n    #define EIGEN_HAS_SFINAE\n  #endif\n#endif\n#endif\n\n#define EIGEN_SFINAE_ENABLE_IF( __condition__ ) \\\n    typename internal::enable_if< ( __condition__ ) , int >::type = 0\n\n\n#if EIGEN_HAS_CONSTEXPR\n#define EIGEN_CONSTEXPR constexpr\n#else\n#define EIGEN_CONSTEXPR\n#endif\n\n\n#if EIGEN_OS_WIN || EIGEN_OS_WIN64\n#define EIGEN_SLEEP(n) Sleep(n)\n#elif EIGEN_OS_GNULINUX\n#define EIGEN_SLEEP(n) usleep(n * 1000);\n#else\n#define EIGEN_SLEEP(n) sleep(std::max<unsigned>(1, n/1000))\n#endif\n\n// Define a macro to use a reference on the host but a value on the device\n#if defined(SYCL_DEVICE_ONLY)\n  #define EIGEN_DEVICE_REF\n#else\n  #define EIGEN_DEVICE_REF &\n#endif\n\n// Define a macro for catching SYCL exceptions if exceptions are enabled\n#define EIGEN_SYCL_TRY_CATCH(X) \\\n  do { \\\n    EIGEN_TRY {X;} \\\n    EIGEN_CATCH(const cl::sycl::exception& e) { \\\n      EIGEN_THROW_X(std::runtime_error(\"SYCL exception at \" + \\\n                                       std::string(__FILE__) + \":\" + \\\n                                       std::to_string(__LINE__) + \"\\n\" + \\\n                                       e.what())); \\\n    } \\\n  } while (false)\n\n// Define a macro if local memory flags are unset or one of them is set\n// Setting both flags is the same as unsetting them\n#if (!defined(EIGEN_SYCL_LOCAL_MEM) && !defined(EIGEN_SYCL_NO_LOCAL_MEM)) || \\\n     (defined(EIGEN_SYCL_LOCAL_MEM) &&  defined(EIGEN_SYCL_NO_LOCAL_MEM))\n  #define EIGEN_SYCL_LOCAL_MEM_UNSET_OR_ON 1\n  #define EIGEN_SYCL_LOCAL_MEM_UNSET_OR_OFF 1\n#elif defined(EIGEN_SYCL_LOCAL_MEM) && !defined(EIGEN_SYCL_NO_LOCAL_MEM)\n  #define EIGEN_SYCL_LOCAL_MEM_UNSET_OR_ON 1\n#elif !defined(EIGEN_SYCL_LOCAL_MEM) && defined(EIGEN_SYCL_NO_LOCAL_MEM)\n  #define EIGEN_SYCL_LOCAL_MEM_UNSET_OR_OFF 1\n#endif\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorMap.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_MAP_H\n#define EIGEN_CXX11_TENSOR_TENSOR_MAP_H\n\nnamespace Eigen {\n\n// FIXME use proper doxygen documentation (e.g. \\tparam MakePointer_)\n\n/** \\class TensorMap\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief A tensor expression mapping an existing array of data.\n  *\n  */\n/// `template <class> class MakePointer_` is added to convert the host pointer to the device pointer.\n/// It is added due to the fact that for our device compiler `T*` is not allowed.\n/// If we wanted to use the same Evaluator functions we have to convert that type to our pointer `T`.\n/// This is done through our `MakePointer_` class. By default the Type in the `MakePointer_<T>` is `T*` .\n/// Therefore, by adding the default value, we managed to convert the type and it does not break any\n/// existing code as its default value is `T*`.\ntemplate<typename PlainObjectType, int Options_, template <class> class MakePointer_> class TensorMap : public TensorBase<TensorMap<PlainObjectType, Options_, MakePointer_> >\n{\n  public:\n    typedef TensorMap<PlainObjectType, Options_, MakePointer_> Self;\n    typedef typename PlainObjectType::Base Base;\n  #ifdef EIGEN_USE_SYCL\n    typedef  typename Eigen::internal::remove_reference<typename Eigen::internal::nested<Self>::type>::type Nested;\n  #else\n     typedef typename Eigen::internal::nested<Self>::type Nested;\n  #endif\n   typedef typename internal::traits<PlainObjectType>::StorageKind StorageKind;\n    typedef typename internal::traits<PlainObjectType>::Index Index;\n    typedef typename internal::traits<PlainObjectType>::Scalar Scalar;\n    typedef typename NumTraits<Scalar>::Real RealScalar;\n    typedef typename Base::CoeffReturnType CoeffReturnType;\n\n    typedef typename MakePointer_<Scalar>::Type PointerType;\n    typedef typename MakePointer_<Scalar>::ConstType PointerConstType;\n\n    // WARN: PointerType still can be a pointer to const (const Scalar*), for\n    // example in TensorMap<Tensor<const Scalar, ...>> expression. This type of\n    // expression should be illegal, but adding this restriction is not possible\n    // in practice (see https://bitbucket.org/eigen/eigen/pull-requests/488).\n    typedef typename internal::conditional<\n        bool(internal::is_lvalue<PlainObjectType>::value),\n        PointerType,      // use simple pointer in lvalue expressions\n        PointerConstType  // use const pointer in rvalue expressions\n        >::type StoragePointerType;\n\n    // If TensorMap was constructed over rvalue expression (e.g. const Tensor),\n    // we should return a reference to const from operator() (and others), even\n    // if TensorMap itself is not const.\n    typedef typename internal::conditional<\n        bool(internal::is_lvalue<PlainObjectType>::value),\n        Scalar&,\n        const Scalar&\n        >::type StorageRefType;\n\n    static const int Options = Options_;\n\n    static const Index NumIndices = PlainObjectType::NumIndices;\n    typedef typename PlainObjectType::Dimensions Dimensions;\n\n    enum {\n      IsAligned = ((int(Options_)&Aligned)==Aligned),\n      Layout = PlainObjectType::Layout,\n      CoordAccess = true,\n      RawAccess = true\n    };\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE TensorMap(StoragePointerType dataPtr) : m_data(dataPtr), m_dimensions() {\n      // The number of dimensions used to construct a tensor must be equal to the rank of the tensor.\n      EIGEN_STATIC_ASSERT((0 == NumIndices || NumIndices == Dynamic), YOU_MADE_A_PROGRAMMING_MISTAKE)\n    }\n\n#if EIGEN_HAS_VARIADIC_TEMPLATES\n    template<typename... IndexTypes> EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE TensorMap(StoragePointerType dataPtr, Index firstDimension, IndexTypes... otherDimensions) : m_data(dataPtr), m_dimensions(firstDimension, otherDimensions...) {\n      // The number of dimensions used to construct a tensor must be equal to the rank of the tensor.\n      EIGEN_STATIC_ASSERT((sizeof...(otherDimensions) + 1 == NumIndices || NumIndices == Dynamic), YOU_MADE_A_PROGRAMMING_MISTAKE)\n    }\n#else\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE TensorMap(StoragePointerType dataPtr, Index firstDimension) : m_data(dataPtr), m_dimensions(firstDimension) {\n      // The number of dimensions used to construct a tensor must be equal to the rank of the tensor.\n      EIGEN_STATIC_ASSERT((1 == NumIndices || NumIndices == Dynamic), YOU_MADE_A_PROGRAMMING_MISTAKE)\n    }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE TensorMap(StoragePointerType dataPtr, Index dim1, Index dim2) : m_data(dataPtr), m_dimensions(dim1, dim2) {\n      EIGEN_STATIC_ASSERT(2 == NumIndices || NumIndices == Dynamic, YOU_MADE_A_PROGRAMMING_MISTAKE)\n    }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE TensorMap(StoragePointerType dataPtr, Index dim1, Index dim2, Index dim3) : m_data(dataPtr), m_dimensions(dim1, dim2, dim3) {\n      EIGEN_STATIC_ASSERT(3 == NumIndices || NumIndices == Dynamic, YOU_MADE_A_PROGRAMMING_MISTAKE)\n    }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE TensorMap(StoragePointerType dataPtr, Index dim1, Index dim2, Index dim3, Index dim4) : m_data(dataPtr), m_dimensions(dim1, dim2, dim3, dim4) {\n      EIGEN_STATIC_ASSERT(4 == NumIndices || NumIndices == Dynamic, YOU_MADE_A_PROGRAMMING_MISTAKE)\n    }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE TensorMap(StoragePointerType dataPtr, Index dim1, Index dim2, Index dim3, Index dim4, Index dim5) : m_data(dataPtr), m_dimensions(dim1, dim2, dim3, dim4, dim5) {\n      EIGEN_STATIC_ASSERT(5 == NumIndices || NumIndices == Dynamic, YOU_MADE_A_PROGRAMMING_MISTAKE)\n    }\n#endif\n\n   EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorMap(StoragePointerType dataPtr, const array<Index, NumIndices>& dimensions)\n      : m_data(dataPtr), m_dimensions(dimensions)\n    { }\n\n    template <typename Dimensions>\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorMap(StoragePointerType dataPtr, const Dimensions& dimensions)\n      : m_data(dataPtr), m_dimensions(dimensions)\n    { }\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorMap(PlainObjectType& tensor)\n      : m_data(tensor.data()), m_dimensions(tensor.dimensions())\n    { }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Index rank() const { return m_dimensions.rank(); }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Index dimension(Index n) const { return m_dimensions[n]; }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const Dimensions& dimensions() const { return m_dimensions; }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Index size() const { return m_dimensions.TotalSize(); }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE StoragePointerType data() { return m_data; }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE StoragePointerType data() const { return m_data; }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE StorageRefType operator()(const array<Index, NumIndices>& indices) const\n    {\n      //      eigen_assert(checkIndexRange(indices));\n      if (PlainObjectType::Options&RowMajor) {\n        const Index index = m_dimensions.IndexOfRowMajor(indices);\n        return m_data[index];\n      } else {\n        const Index index = m_dimensions.IndexOfColMajor(indices);\n        return m_data[index];\n      }\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE StorageRefType operator()() const\n    {\n      EIGEN_STATIC_ASSERT(NumIndices == 0, YOU_MADE_A_PROGRAMMING_MISTAKE)\n      return m_data[0];\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE StorageRefType operator()(Index index) const\n    {\n      eigen_internal_assert(index >= 0 && index < size());\n      return m_data[index];\n    }\n\n#if EIGEN_HAS_VARIADIC_TEMPLATES\n    template<typename... IndexTypes> EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE StorageRefType operator()(Index firstIndex, Index secondIndex, IndexTypes... otherIndices) const\n    {\n      EIGEN_STATIC_ASSERT(sizeof...(otherIndices) + 2 == NumIndices, YOU_MADE_A_PROGRAMMING_MISTAKE)\n      eigen_assert(internal::all((Eigen::NumTraits<Index>::highest() >= otherIndices)...));\n      if (PlainObjectType::Options&RowMajor) {\n        const Index index = m_dimensions.IndexOfRowMajor(array<Index, NumIndices>{{firstIndex, secondIndex, otherIndices...}});\n        return m_data[index];\n      } else {\n        const Index index = m_dimensions.IndexOfColMajor(array<Index, NumIndices>{{firstIndex, secondIndex, otherIndices...}});\n        return m_data[index];\n      }\n    }\n#else\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE StorageRefType operator()(Index i0, Index i1) const\n    {\n      if (PlainObjectType::Options&RowMajor) {\n        const Index index = i1 + i0 * m_dimensions[1];\n        return m_data[index];\n      } else {\n        const Index index = i0 + i1 * m_dimensions[0];\n        return m_data[index];\n      }\n    }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE StorageRefType operator()(Index i0, Index i1, Index i2) const\n    {\n      if (PlainObjectType::Options&RowMajor) {\n         const Index index = i2 + m_dimensions[2] * (i1 + m_dimensions[1] * i0);\n         return m_data[index];\n      } else {\n         const Index index = i0 + m_dimensions[0] * (i1 + m_dimensions[1] * i2);\n        return m_data[index];\n      }\n    }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE StorageRefType operator()(Index i0, Index i1, Index i2, Index i3) const\n    {\n      if (PlainObjectType::Options&RowMajor) {\n        const Index index = i3 + m_dimensions[3] * (i2 + m_dimensions[2] * (i1 + m_dimensions[1] * i0));\n        return m_data[index];\n      } else {\n        const Index index = i0 + m_dimensions[0] * (i1 + m_dimensions[1] * (i2 + m_dimensions[2] * i3));\n        return m_data[index];\n      }\n    }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE StorageRefType operator()(Index i0, Index i1, Index i2, Index i3, Index i4) const\n    {\n      if (PlainObjectType::Options&RowMajor) {\n        const Index index = i4 + m_dimensions[4] * (i3 + m_dimensions[3] * (i2 + m_dimensions[2] * (i1 + m_dimensions[1] * i0)));\n        return m_data[index];\n      } else {\n        const Index index = i0 + m_dimensions[0] * (i1 + m_dimensions[1] * (i2 + m_dimensions[2] * (i3 + m_dimensions[3] * i4)));\n        return m_data[index];\n      }\n    }\n#endif\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE StorageRefType operator()(const array<Index, NumIndices>& indices)\n    {\n      //      eigen_assert(checkIndexRange(indices));\n      if (PlainObjectType::Options&RowMajor) {\n        const Index index = m_dimensions.IndexOfRowMajor(indices);\n        return m_data[index];\n      } else {\n        const Index index = m_dimensions.IndexOfColMajor(indices);\n        return m_data[index];\n      }\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE StorageRefType operator()()\n    {\n      EIGEN_STATIC_ASSERT(NumIndices == 0, YOU_MADE_A_PROGRAMMING_MISTAKE)\n      return m_data[0];\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE StorageRefType operator()(Index index)\n    {\n      eigen_internal_assert(index >= 0 && index < size());\n      return m_data[index];\n    }\n\n#if EIGEN_HAS_VARIADIC_TEMPLATES\n    template<typename... IndexTypes> EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE StorageRefType operator()(Index firstIndex, Index secondIndex, IndexTypes... otherIndices)\n    {\n      static_assert(sizeof...(otherIndices) + 2 == NumIndices || NumIndices == Dynamic, \"Number of indices used to access a tensor coefficient must be equal to the rank of the tensor.\");\n       eigen_assert(internal::all((Eigen::NumTraits<Index>::highest() >= otherIndices)...));\n      const std::size_t NumDims = sizeof...(otherIndices) + 2;\n      if (PlainObjectType::Options&RowMajor) {\n        const Index index = m_dimensions.IndexOfRowMajor(array<Index, NumDims>{{firstIndex, secondIndex, otherIndices...}});\n        return m_data[index];\n      } else {\n        const Index index = m_dimensions.IndexOfColMajor(array<Index, NumDims>{{firstIndex, secondIndex, otherIndices...}});\n        return m_data[index];\n      }\n    }\n#else\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE StorageRefType operator()(Index i0, Index i1)\n    {\n       if (PlainObjectType::Options&RowMajor) {\n         const Index index = i1 + i0 * m_dimensions[1];\n        return m_data[index];\n      } else {\n        const Index index = i0 + i1 * m_dimensions[0];\n        return m_data[index];\n      }\n    }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE StorageRefType operator()(Index i0, Index i1, Index i2)\n    {\n       if (PlainObjectType::Options&RowMajor) {\n         const Index index = i2 + m_dimensions[2] * (i1 + m_dimensions[1] * i0);\n        return m_data[index];\n      } else {\n         const Index index = i0 + m_dimensions[0] * (i1 + m_dimensions[1] * i2);\n        return m_data[index];\n      }\n    }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE StorageRefType operator()(Index i0, Index i1, Index i2, Index i3)\n    {\n      if (PlainObjectType::Options&RowMajor) {\n        const Index index = i3 + m_dimensions[3] * (i2 + m_dimensions[2] * (i1 + m_dimensions[1] * i0));\n        return m_data[index];\n      } else {\n        const Index index = i0 + m_dimensions[0] * (i1 + m_dimensions[1] * (i2 + m_dimensions[2] * i3));\n        return m_data[index];\n      }\n    }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE StorageRefType operator()(Index i0, Index i1, Index i2, Index i3, Index i4)\n    {\n      if (PlainObjectType::Options&RowMajor) {\n        const Index index = i4 + m_dimensions[4] * (i3 + m_dimensions[3] * (i2 + m_dimensions[2] * (i1 + m_dimensions[1] * i0)));\n        return m_data[index];\n      } else {\n        const Index index = i0 + m_dimensions[0] * (i1 + m_dimensions[1] * (i2 + m_dimensions[2] * (i3 + m_dimensions[3] * i4)));\n        return m_data[index];\n      }\n    }\n#endif\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Self& operator=(const Self& other)\n    {\n      typedef TensorAssignOp<Self, const Self> Assign;\n      Assign assign(*this, other);\n      internal::TensorExecutor<const Assign, DefaultDevice>::run(assign, DefaultDevice());\n      return *this;\n    }\n\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    Self& operator=(const OtherDerived& other)\n    {\n      typedef TensorAssignOp<Self, const OtherDerived> Assign;\n      Assign assign(*this, other);\n      internal::TensorExecutor<const Assign, DefaultDevice>::run(assign, DefaultDevice());\n      return *this;\n    }\n\n  private:\n    StoragePointerType m_data;\n    Dimensions m_dimensions;\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_MAP_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorMeta.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_META_H\n#define EIGEN_CXX11_TENSOR_TENSOR_META_H\n\nnamespace Eigen {\n\ntemplate<bool cond> struct Cond {};\n\ntemplate<typename T1, typename T2> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nconst T1& choose(Cond<true>, const T1& first, const T2&) {\n  return first;\n}\n\ntemplate<typename T1, typename T2> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nconst T2& choose(Cond<false>, const T1&, const T2& second) {\n  return second;\n}\n\n\ntemplate <typename T, typename X, typename Y>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nT divup(const X x, const Y y) {\n  return static_cast<T>((x + y - 1) / y);\n}\n\ntemplate <typename T>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nT divup(const T x, const T y) {\n  return static_cast<T>((x + y - 1) / y);\n}\n\ntemplate <size_t n> struct max_n_1 {\n  static const size_t size = n;\n};\ntemplate <> struct max_n_1<0> {\n  static const size_t size = 1;\n};\n\n\n// Default packet types\ntemplate <typename Scalar, typename Device>\nstruct PacketType : internal::packet_traits<Scalar> {\n  typedef typename internal::packet_traits<Scalar>::type type;\n};\n\n// For CUDA packet types when using a GpuDevice\n#if defined(EIGEN_USE_GPU) && defined(EIGEN_HAS_GPU_FP16)\n\ntypedef ulonglong2 Packet4h2;\ntemplate<>\nstruct PacketType<half, GpuDevice> {\n  typedef Packet4h2 type;\n  static const int size = 8;\n  enum {\n    HasAdd    = 1,\n    HasSub    = 1,\n    HasMul    = 1,\n    HasNegate = 1,\n    HasAbs    = 1,\n    HasArg    = 0,\n    HasAbs2   = 0,\n    HasMin    = 1,\n    HasMax    = 1,\n    HasConj   = 0,\n    HasSetLinear = 0,\n    HasBlend  = 0,\n\n    HasDiv    = 1,\n    HasSqrt   = 1,\n    HasRsqrt  = 1,\n    HasExp    = 1,\n    HasExpm1  = 0,\n    HasLog    = 1,\n    HasLog1p  = 0,\n    HasLog10  = 0,\n    HasPow    = 1,\n  };\n};\n#endif\n\n#if defined(EIGEN_USE_SYCL)\n\nnamespace TensorSycl {\nnamespace internal {\n\ntemplate <typename Index, Index A, Index B> struct PlusOp {\n  static constexpr Index Value = A + B;\n};\n\ntemplate <typename Index, Index A, Index B> struct DivOp {\n  static constexpr Index Value = A / B;\n};\n\ntemplate <typename Index, Index start, Index end, Index step,\n          template <class Indx, Indx...> class StepOp>\nstruct static_for {\n  template <typename UnaryOperator>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void loop(UnaryOperator op) {\n    op(start);\n    static_for<Index, StepOp<Index, start, step>::Value, end, step,\n               StepOp>::loop(op);\n  }\n};\ntemplate <typename Index, Index end, Index step,\n          template <class Indx, Indx...> class StepOp>\nstruct static_for<Index, end, end, step, StepOp> {\n  template <typename UnaryOperator>\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void loop(UnaryOperator) {}\n};\n\ntemplate <typename OutScalar, typename Device, bool Vectorizable>\nstruct Vectorise {\n  static const int PacketSize = 1;\n  typedef OutScalar PacketReturnType;\n};\n\ntemplate <typename OutScalar, typename Device>\nstruct Vectorise<OutScalar, Device, true> {\n  static const int PacketSize = Eigen::PacketType<OutScalar, Device>::size;\n  typedef typename Eigen::PacketType<OutScalar, Device>::type PacketReturnType;\n};\n\nstatic EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Index roundUp(Index x, Index y) {\n  return ((((x) + (y)-1) / (y)) * (y));\n}\n\n} // namespace internal\n} // namespace TensorSycl\n\ntemplate <>\n  struct PacketType<half, SyclDevice> {\n  typedef half type;\n  static const int size = 1;\n  enum {\n    HasAdd    = 0,\n    HasSub    = 0,\n    HasMul    = 0,\n    HasNegate = 0,\n    HasAbs    = 0,\n    HasArg    = 0,\n    HasAbs2   = 0,\n    HasMin    = 0,\n    HasMax    = 0,\n    HasConj   = 0,\n    HasSetLinear = 0,\n    HasBlend  = 0\n  };\n};\ntemplate <typename Scalar>\nstruct PacketType<Scalar, SyclDevice> : internal::default_packet_traits {\n  typedef Scalar type;\n  typedef Scalar half;\n  enum {\n    Vectorizable = 0,\n    size = 1,\n    AlignedOnScalar = 0,\n    HasHalfPacket = 0\n  };\n  enum {\n    HasAdd    = 0,\n    HasSub    = 0,\n    HasMul    = 0,\n    HasNegate = 0,\n    HasAbs    = 0,\n    HasAbs2   = 0,\n    HasMin    = 0,\n    HasMax    = 0,\n    HasConj   = 0,\n    HasSetLinear = 0\n  };\n\n};\n\ntemplate <typename Scalar>\nstruct PacketType<Scalar, const SyclDevice> : PacketType<Scalar, SyclDevice>{};\n\n#ifndef EIGEN_DONT_VECTORIZE_SYCL\n#define PACKET_TYPE(CVQual, Type, val, lengths, DEV)\\\ntemplate<> struct PacketType<CVQual Type, DEV> : internal::sycl_packet_traits<val, lengths> \\\n{\\\n  typedef typename internal::packet_traits<Type>::type type;\\\n  typedef typename internal::packet_traits<Type>::half half;\\\n};\n\n\nPACKET_TYPE(const, float, 1, 4, SyclDevice)\nPACKET_TYPE(, float, 1, 4, SyclDevice)\nPACKET_TYPE(const, float, 1, 4, const SyclDevice)\nPACKET_TYPE(, float, 1, 4, const SyclDevice)\n\nPACKET_TYPE(const, double, 0, 2, SyclDevice)\nPACKET_TYPE(, double, 0, 2, SyclDevice)\nPACKET_TYPE(const, double, 0, 2, const SyclDevice)\nPACKET_TYPE(, double, 0, 2, const SyclDevice)\n#undef PACKET_TYPE\n\ntemplate<> struct PacketType<half, const SyclDevice>: PacketType<half, SyclDevice>{};\ntemplate<> struct PacketType<const half, const SyclDevice>: PacketType<half, SyclDevice>{};\n#endif\n#endif\n\n// Tuple mimics std::pair but works on e.g. nvcc.\ntemplate <typename U, typename V> struct Tuple {\n public:\n  U first;\n  V second;\n\n  typedef U first_type;\n  typedef V second_type;\n\n  EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  Tuple() : first(), second() {}\n\n  EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  Tuple(const U& f, const V& s) : first(f), second(s) {}\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  Tuple& operator= (const Tuple& rhs) {\n  #ifndef SYCL_DEVICE_ONLY\n    if (&rhs == this) return *this;\n  #endif\n    first = rhs.first;\n    second = rhs.second;\n    return *this;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  void swap(Tuple& rhs) {\n    using numext::swap;\n    swap(first, rhs.first);\n    swap(second, rhs.second);\n  }\n};\n\ntemplate <typename U, typename V>\nEIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nbool operator==(const Tuple<U, V>& x, const Tuple<U, V>& y) {\n  return (x.first == y.first && x.second == y.second);\n}\n\ntemplate <typename U, typename V>\nEIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nbool operator!=(const Tuple<U, V>& x, const Tuple<U, V>& y) {\n  return !(x == y);\n}\n\n\n// Can't use std::pairs on cuda devices\ntemplate <typename Idx> struct IndexPair {\n  EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE IndexPair() : first(0), second(0) {}\n  EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE IndexPair(Idx f, Idx s) : first(f), second(s) {}\n\n  EIGEN_DEVICE_FUNC void set(IndexPair<Idx> val) {\n    first = val.first;\n    second = val.second;\n  }\n\n  Idx first;\n  Idx second;\n};\n\n\n#ifdef EIGEN_HAS_SFINAE\nnamespace internal {\n\n  template<typename IndexType, typename Index, Index... Is>\n  EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  array<Index, sizeof...(Is)> customIndices2Array(IndexType& idx, numeric_list<Index, Is...>) {\n    return { idx[Is]... };\n  }\n  template<typename IndexType, typename Index>\n  EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  array<Index, 0> customIndices2Array(IndexType&, numeric_list<Index>) {\n    return array<Index, 0>();\n  }\n\n  /** Make an array (for index/dimensions) out of a custom index */\n  template<typename Index, std::size_t NumIndices, typename IndexType>\n  EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  array<Index, NumIndices> customIndices2Array(IndexType& idx) {\n    return customIndices2Array(idx, typename gen_numeric_list<Index, NumIndices>::type{});\n  }\n\n\n  template <typename B, typename D>\n  struct is_base_of\n  {\n\n    typedef char (&yes)[1];\n    typedef char (&no)[2];\n\n    template <typename BB, typename DD>\n    struct Host\n    {\n      operator BB*() const;\n      operator DD*();\n    };\n\n    template<typename T>\n    static yes check(D*, T);\n    static no check(B*, int);\n\n    static const bool value = sizeof(check(Host<B,D>(), int())) == sizeof(yes);\n  };\n\n}\n#endif\n\n\n\n}  // namespace Eigen\n\n#endif  // EIGEN_CXX11_TENSOR_TENSOR_META_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_MORPHING_H\n#define EIGEN_CXX11_TENSOR_TENSOR_MORPHING_H\n\nnamespace Eigen {\n\n/** \\class TensorReshaping\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief Tensor reshaping class.\n  *\n  *\n  */\nnamespace internal {\ntemplate<typename NewDimensions, typename XprType>\nstruct traits<TensorReshapingOp<NewDimensions, XprType> > : public traits<XprType>\n{\n  typedef typename XprType::Scalar Scalar;\n  typedef traits<XprType> XprTraits;\n  typedef typename XprTraits::StorageKind StorageKind;\n  typedef typename XprTraits::Index Index;\n  typedef typename XprType::Nested Nested;\n  typedef typename remove_reference<Nested>::type _Nested;\n  static const int NumDimensions = array_size<NewDimensions>::value;\n  static const int Layout = XprTraits::Layout;\n  typedef typename XprTraits::PointerType PointerType;\n};\n\ntemplate<typename NewDimensions, typename XprType>\nstruct eval<TensorReshapingOp<NewDimensions, XprType>, Eigen::Dense>\n{\n  typedef const TensorReshapingOp<NewDimensions, XprType>EIGEN_DEVICE_REF type;\n};\n\ntemplate<typename NewDimensions, typename XprType>\nstruct nested<TensorReshapingOp<NewDimensions, XprType>, 1, typename eval<TensorReshapingOp<NewDimensions, XprType> >::type>\n{\n  typedef TensorReshapingOp<NewDimensions, XprType> type;\n};\n\n}  // end namespace internal\n\n\n\ntemplate<typename NewDimensions, typename XprType>\nclass TensorReshapingOp : public TensorBase<TensorReshapingOp<NewDimensions, XprType>, WriteAccessors>\n{\n  public:\n  typedef typename Eigen::internal::traits<TensorReshapingOp>::Scalar Scalar;\n  typedef typename internal::remove_const<typename XprType::CoeffReturnType>::type CoeffReturnType;\n  typedef typename Eigen::internal::nested<TensorReshapingOp>::type Nested;\n  typedef typename Eigen::internal::traits<TensorReshapingOp>::StorageKind StorageKind;\n  typedef typename Eigen::internal::traits<TensorReshapingOp>::Index Index;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorReshapingOp(const XprType& expr, const NewDimensions& dims)\n      : m_xpr(expr), m_dims(dims) {}\n\n    EIGEN_DEVICE_FUNC\n    const NewDimensions& dimensions() const { return m_dims; }\n\n    EIGEN_DEVICE_FUNC\n    const typename internal::remove_all<typename XprType::Nested>::type&\n    expression() const { return m_xpr; }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE TensorReshapingOp& operator = (const TensorReshapingOp& other)\n    {\n      typedef TensorAssignOp<TensorReshapingOp, const TensorReshapingOp> Assign;\n      Assign assign(*this, other);\n      internal::TensorExecutor<const Assign, DefaultDevice>::run(assign, DefaultDevice());\n      return *this;\n    }\n\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE TensorReshapingOp& operator = (const OtherDerived& other)\n    {\n      typedef TensorAssignOp<TensorReshapingOp, const OtherDerived> Assign;\n      Assign assign(*this, other);\n      internal::TensorExecutor<const Assign, DefaultDevice>::run(assign, DefaultDevice());\n      return *this;\n    }\n\n  protected:\n    typename XprType::Nested m_xpr;\n    const NewDimensions m_dims;\n};\n\n\n// Eval as rvalue\ntemplate<typename NewDimensions, typename ArgType, typename Device>\nstruct TensorEvaluator<const TensorReshapingOp<NewDimensions, ArgType>, Device>\n{\n  typedef TensorReshapingOp<NewDimensions, ArgType> XprType;\n  typedef NewDimensions Dimensions;\n\n  typedef typename XprType::Index Index;\n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  typedef StorageMemory<CoeffReturnType, Device> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n  typedef StorageMemory<typename internal::remove_const<CoeffReturnType>::type, Device> ConstCastStorage;\n\n  static const int NumOutputDims = internal::array_size<Dimensions>::value;\n  static const int NumInputDims  = internal::array_size<typename TensorEvaluator<ArgType, Device>::Dimensions>::value;\n\n  enum ReshapingKind {\n    // We do not use layout information to determine reshaping kind.\n    // Depending on the layout `N` can be inner or outer dimension.\n    OneByN = 0,  // expr.reshape(1, N)\n    NByOne = 1,  // expr.reshape(N, 1)\n    Runtime = 2  // Reshape dimensions are dynamic (specified at runtime).\n  };\n\n  // clang-format off\n  static const ReshapingKind kind =\n#if defined(EIGEN_HAS_INDEX_LIST)\n        (NumOutputDims == 2 && internal::index_statically_eq<NewDimensions>(/*index=*/0, /*value=*/1)) ? OneByN\n      : (NumOutputDims == 2 && internal::index_statically_eq<NewDimensions>(/*index=*/1, /*value=*/1)) ? NByOne\n      : Runtime;\n#else\n        Runtime;\n#endif\n  // clang-format on\n\n  enum {\n    IsAligned         = TensorEvaluator<ArgType, Device>::IsAligned,\n    PacketAccess      = TensorEvaluator<ArgType, Device>::PacketAccess,\n    // For trivial reshapes with raw access to underlying data we will provide\n    // zero overhead block access.\n    // TODO(ezhulenev): Consider adding block access without raw access?\n    BlockAccess       = TensorEvaluator<ArgType, Device>::RawAccess &&\n                        NumInputDims > 0 && NumOutputDims > 0,\n    PreferBlockAccess = false,\n    Layout            = TensorEvaluator<ArgType, Device>::Layout,\n    CoordAccess       = false,  // to be implemented\n    RawAccess         = TensorEvaluator<ArgType, Device>::RawAccess\n  };\n\n  typedef typename internal::remove_const<Scalar>::type ScalarNoConst;\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockDescriptor<NumOutputDims, Index> TensorBlockDesc;\n  typedef internal::TensorBlockScratchAllocator<Device> TensorBlockScratch;\n\n  typedef\n      typename internal::TensorMaterializedBlock<ScalarNoConst, NumOutputDims,\n                                                 Layout, Index>\n          TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)\n      : m_impl(op.expression(), device), m_dimensions(op.dimensions())\n  {\n    // The total size of the reshaped tensor must be equal to the total size\n    // of the input tensor.\n    eigen_assert(internal::array_prod(m_impl.dimensions()) == internal::array_prod(op.dimensions()));\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions& dimensions() const { return m_dimensions; }\n\n#ifdef EIGEN_USE_THREADS\n  template <typename EvalSubExprsCallback>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalSubExprsIfNeededAsync(\n      EvaluatorPointerType data, EvalSubExprsCallback done) {\n    m_impl.evalSubExprsIfNeededAsync(data, std::move(done));\n  }\n#endif\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType data) {\n    return m_impl.evalSubExprsIfNeeded(data);\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {\n    m_impl.cleanup();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const\n  {\n    return m_impl.coeff(index);\n  }\n\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const\n  {\n    return m_impl.template packet<LoadMode>(index);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool vectorized) const {\n    return m_impl.costPerCoeff(vectorized);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  internal::TensorBlockResourceRequirements getResourceRequirements() const {\n    return internal::TensorBlockResourceRequirements::any();\n  }\n\n  // required in block(OutputTensorBlock* output_block) const\n  // For C++03 compatibility this must be defined outside the method\n  struct BlockIteratorState {\n    Index stride;\n    Index span;\n    Index size;\n    Index count;\n  };\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorBlock\n  block(TensorBlockDesc& desc, TensorBlockScratch& scratch,\n          bool /*root_of_expr_ast*/ = false) const {\n    eigen_assert(m_impl.data() != NULL);\n    eigen_assert((kind == Runtime) ||\n                 (kind == OneByN && desc.dimensions()[0] == 1) ||\n                 (kind == NByOne && desc.dimensions()[1] == 1));\n\n    if (kind == OneByN || kind == NByOne) {\n      // We can guarantee at compile time that block is just a contiguous slice\n      // of the underlying expression memory buffer.\n      return TensorBlock(internal::TensorBlockKind::kView,\n                           m_impl.data() + desc.offset(), desc.dimensions());\n    } else {\n      // This will do additional runtime checks, and in the end it might be also\n      // a view, or it might be a block materialized in the temporary buffer.\n      return TensorBlock::materialize(m_impl.data(), m_dimensions, desc,\n                                        scratch);\n    }\n  }\n\n  EIGEN_DEVICE_FUNC typename Storage::Type data() const {\n    return constCast(m_impl.data());\n  }\n\n  EIGEN_DEVICE_FUNC const TensorEvaluator<ArgType, Device>& impl() const { return m_impl; }\n\n  #ifdef EIGEN_USE_SYCL\n  // binding placeholder accessors to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {\n    m_impl.bind(cgh);\n  }\n  #endif\n protected:\n  TensorEvaluator<ArgType, Device> m_impl;\n  NewDimensions m_dimensions;\n};\n\n\n// Eval as lvalue\ntemplate<typename NewDimensions, typename ArgType, typename Device>\n  struct TensorEvaluator<TensorReshapingOp<NewDimensions, ArgType>, Device>\n  : public TensorEvaluator<const TensorReshapingOp<NewDimensions, ArgType>, Device>\n\n{\n  typedef TensorEvaluator<const TensorReshapingOp<NewDimensions, ArgType>, Device> Base;\n  typedef TensorReshapingOp<NewDimensions, ArgType> XprType;\n  typedef NewDimensions Dimensions;\n\n  enum {\n    IsAligned         = TensorEvaluator<ArgType, Device>::IsAligned,\n    PacketAccess      = TensorEvaluator<ArgType, Device>::PacketAccess,\n    BlockAccess       = TensorEvaluator<ArgType, Device>::RawAccess,\n    PreferBlockAccess = false,\n    Layout            = TensorEvaluator<ArgType, Device>::Layout,\n    CoordAccess       = false,  // to be implemented\n    RawAccess         = TensorEvaluator<ArgType, Device>::RawAccess\n  };\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)\n    : Base(op, device)\n  { }\n\n  typedef typename XprType::Index Index;\n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockDescriptor<TensorEvaluator::NumOutputDims, Index>\n      TensorBlockDesc;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType& coeffRef(Index index)\n  {\n    return this->m_impl.coeffRef(index);\n  }\n\n  template <int StoreMode> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  void writePacket(Index index, const PacketReturnType& x)\n  {\n    this->m_impl.template writePacket<StoreMode>(index, x);\n  }\n\n  template <typename TensorBlock>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void writeBlock(\n      const TensorBlockDesc& desc, const TensorBlock& block) {\n    assert(this->m_impl.data() != NULL);\n\n    typedef typename TensorBlock::XprType TensorBlockExpr;\n    typedef internal::TensorBlockAssignment<\n        Scalar, TensorEvaluator::NumOutputDims, TensorBlockExpr, Index>\n        TensorBlockAssign;\n\n    TensorBlockAssign::Run(\n        TensorBlockAssign::target(desc.dimensions(),\n                                  internal::strides<Layout>(this->dimensions()),\n                                  this->m_impl.data(), desc.offset()),\n        block.expr());\n  }\n};\n\n\n/** \\class TensorSlicing\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief Tensor slicing class.\n  *\n  *\n  */\nnamespace internal {\ntemplate<typename StartIndices, typename Sizes, typename XprType>\nstruct traits<TensorSlicingOp<StartIndices, Sizes, XprType> > : public traits<XprType>\n{\n  typedef typename XprType::Scalar Scalar;\n  typedef traits<XprType> XprTraits;\n  typedef typename XprTraits::StorageKind StorageKind;\n  typedef typename XprTraits::Index Index;\n  typedef typename XprType::Nested Nested;\n  typedef typename remove_reference<Nested>::type _Nested;\n  static const int NumDimensions = array_size<StartIndices>::value;\n  static const int Layout = XprTraits::Layout;\n  typedef typename XprTraits::PointerType PointerType;\n};\n\ntemplate<typename StartIndices, typename Sizes, typename XprType>\nstruct eval<TensorSlicingOp<StartIndices, Sizes, XprType>, Eigen::Dense>\n{\n  typedef const TensorSlicingOp<StartIndices, Sizes, XprType>EIGEN_DEVICE_REF type;\n};\n\ntemplate<typename StartIndices, typename Sizes, typename XprType>\nstruct nested<TensorSlicingOp<StartIndices, Sizes, XprType>, 1, typename eval<TensorSlicingOp<StartIndices, Sizes, XprType> >::type>\n{\n  typedef TensorSlicingOp<StartIndices, Sizes, XprType> type;\n};\n\n}  // end namespace internal\n\n\n\ntemplate<typename StartIndices, typename Sizes, typename XprType>\nclass TensorSlicingOp : public TensorBase<TensorSlicingOp<StartIndices, Sizes, XprType> >\n{\n  public:\n  typedef typename Eigen::internal::traits<TensorSlicingOp>::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename Eigen::internal::nested<TensorSlicingOp>::type Nested;\n  typedef typename Eigen::internal::traits<TensorSlicingOp>::StorageKind StorageKind;\n  typedef typename Eigen::internal::traits<TensorSlicingOp>::Index Index;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorSlicingOp(const XprType& expr, const StartIndices& indices, const Sizes& sizes)\n      : m_xpr(expr), m_indices(indices), m_sizes(sizes) {}\n\n    EIGEN_DEVICE_FUNC\n    const StartIndices& startIndices() const { return m_indices; }\n    EIGEN_DEVICE_FUNC\n    const Sizes& sizes() const { return m_sizes; }\n\n    EIGEN_DEVICE_FUNC\n    const typename internal::remove_all<typename XprType::Nested>::type&\n    expression() const { return m_xpr; }\n\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE TensorSlicingOp& operator = (const OtherDerived& other)\n    {\n      typedef TensorAssignOp<TensorSlicingOp, const OtherDerived> Assign;\n      Assign assign(*this, other);\n      internal::TensorExecutor<const Assign, DefaultDevice>::run(assign, DefaultDevice());\n      return *this;\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE TensorSlicingOp& operator = (const TensorSlicingOp& other)\n    {\n      typedef TensorAssignOp<TensorSlicingOp, const TensorSlicingOp> Assign;\n      Assign assign(*this, other);\n      internal::TensorExecutor<const Assign, DefaultDevice>::run(assign, DefaultDevice());\n      return *this;\n    }\n\n\n  protected:\n    typename XprType::Nested m_xpr;\n    const StartIndices m_indices;\n    const Sizes m_sizes;\n};\n\n\n// Fixme: figure out the exact threshold\nnamespace {\ntemplate <typename Index, typename Device, bool BlockAccess> struct MemcpyTriggerForSlicing {\n  EIGEN_DEVICE_FUNC MemcpyTriggerForSlicing(const Device& device) : threshold_(2 * device.numThreads()) { }\n  EIGEN_DEVICE_FUNC bool operator ()(Index total, Index contiguous) const {\n    const bool prefer_block_evaluation = BlockAccess && total > 32*1024;\n    return !prefer_block_evaluation && contiguous > threshold_;\n  }\n\n private:\n  Index threshold_;\n};\n\n// It is very expensive to start the memcpy kernel on GPU: we therefore only\n// use it for large copies.\n#ifdef EIGEN_USE_GPU\ntemplate <typename Index, bool BlockAccess> struct MemcpyTriggerForSlicing<Index, GpuDevice, BlockAccess>  {\n  EIGEN_DEVICE_FUNC MemcpyTriggerForSlicing(const GpuDevice&) { }\n  EIGEN_DEVICE_FUNC bool operator ()(Index, Index contiguous) const { return contiguous > 4*1024*1024; }\n};\n#endif\n\n// It is very expensive to start the memcpy kernel on GPU: we therefore only\n// use it for large copies.\n#ifdef EIGEN_USE_SYCL\ntemplate <typename Index, bool BlockAccess> struct MemcpyTriggerForSlicing<Index, Eigen::SyclDevice, BlockAccess>  {\n  EIGEN_DEVICE_FUNC MemcpyTriggerForSlicing(const SyclDevice&) { }\n  EIGEN_DEVICE_FUNC bool operator ()(Index, Index contiguous) const { return contiguous > 4*1024*1024; }\n};\n#endif\n\n}\n\n// Eval as rvalue\ntemplate<typename StartIndices, typename Sizes, typename ArgType, typename Device>\nstruct TensorEvaluator<const TensorSlicingOp<StartIndices, Sizes, ArgType>, Device>\n{\n  typedef TensorSlicingOp<StartIndices, Sizes, ArgType> XprType;\n  static const int NumDims = internal::array_size<Sizes>::value;\n\n  typedef typename XprType::Index Index;\n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  typedef Sizes Dimensions;\n  typedef StorageMemory<CoeffReturnType, Device> Storage;\n  typedef StorageMemory<typename internal::remove_const<CoeffReturnType>::type, Device> ConstCastStorage;\n  typedef typename Storage::Type EvaluatorPointerType;\n\n  enum {\n    // Alignment can't be guaranteed at compile time since it depends on the\n    // slice offsets and sizes.\n    IsAligned         = false,\n    PacketAccess      = TensorEvaluator<ArgType, Device>::PacketAccess,\n    BlockAccess       = TensorEvaluator<ArgType, Device>::BlockAccess,\n    PreferBlockAccess = true,\n    Layout            = TensorEvaluator<ArgType, Device>::Layout,\n    CoordAccess       = false,\n    RawAccess         = false\n  };\n\n  typedef typename internal::remove_const<Scalar>::type ScalarNoConst;\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockDescriptor<NumDims, Index> TensorBlockDesc;\n  typedef internal::TensorBlockScratchAllocator<Device> TensorBlockScratch;\n\n  // Tensor slicing does not change the block type.\n  typedef typename TensorEvaluator<const ArgType, Device>::TensorBlock\n      TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)\n      : m_impl(op.expression(), device), m_device(device), m_dimensions(op.sizes()), m_offsets(op.startIndices())\n  {\n    for (Index i = 0; i < internal::array_size<Dimensions>::value; ++i) {\n      eigen_assert(m_impl.dimensions()[i] >= op.sizes()[i] + op.startIndices()[i]);\n    }\n\n    m_is_identity = true;\n    for (int i = 0; i < internal::array_size<Dimensions>::value; ++i) {\n      eigen_assert(m_impl.dimensions()[i] >=\n                   op.sizes()[i] + op.startIndices()[i]);\n      if (m_impl.dimensions()[i] != op.sizes()[i] ||\n          op.startIndices()[i] != 0) {\n        m_is_identity = false;\n      }\n    }\n\n    // No strides for scalars.\n    if (NumDims == 0) return;\n\n    const typename TensorEvaluator<ArgType, Device>::Dimensions& input_dims = m_impl.dimensions();\n    const Sizes& output_dims = op.sizes();\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      m_inputStrides[0] = 1;\n      for (int i = 1; i < NumDims; ++i) {\n        m_inputStrides[i] = m_inputStrides[i-1] * input_dims[i-1];\n      }\n\n     // Don't initialize m_fastOutputStrides[0] since it won't ever be accessed.\n      m_outputStrides[0] = 1;\n      for (int i = 1; i < NumDims; ++i) {\n        m_outputStrides[i] = m_outputStrides[i-1] * output_dims[i-1];\n        m_fastOutputStrides[i] = internal::TensorIntDivisor<Index>(m_outputStrides[i]);\n      }\n    } else {\n      m_inputStrides[NumDims-1] = 1;\n      for (int i = NumDims - 2; i >= 0; --i) {\n        m_inputStrides[i] = m_inputStrides[i+1] * input_dims[i+1];\n      }\n\n     // Don't initialize m_fastOutputStrides[NumDims-1] since it won't ever be accessed.\n      m_outputStrides[NumDims-1] = 1;\n      for (int i = NumDims - 2; i >= 0; --i) {\n        m_outputStrides[i] = m_outputStrides[i+1] * output_dims[i+1];\n        m_fastOutputStrides[i] = internal::TensorIntDivisor<Index>(m_outputStrides[i]);\n      }\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions& dimensions() const { return m_dimensions; }\n\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType data) {\n    m_impl.evalSubExprsIfNeeded(NULL);\n    if (!NumTraits<typename internal::remove_const<Scalar>::type>::RequireInitialization\n        && data && m_impl.data()) {\n      Index contiguous_values = 1;\n      if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n        for (int i = 0; i < NumDims; ++i) {\n          contiguous_values *= dimensions()[i];\n          if (dimensions()[i] != m_impl.dimensions()[i]) {\n            break;\n          }\n        }\n      } else {\n        for (int i = NumDims-1; i >= 0; --i) {\n          contiguous_values *= dimensions()[i];\n          if (dimensions()[i] != m_impl.dimensions()[i]) {\n            break;\n          }\n        }\n      }\n      // Use memcpy if it's going to be faster than using the regular evaluation.\n      const MemcpyTriggerForSlicing<Index, Device, BlockAccess> trigger(m_device);\n      if (trigger(internal::array_prod(dimensions()), contiguous_values)) {\n        EvaluatorPointerType src = (EvaluatorPointerType)m_impl.data();\n        for (Index i = 0; i < internal::array_prod(dimensions()); i += contiguous_values) {\n          Index offset = srcCoeff(i);\n          m_device.memcpy((void*)(m_device.get(data + i)), m_device.get(src+offset), contiguous_values * sizeof(Scalar));\n        }\n        return false;\n      }\n    }\n    return true;\n  }\n  \n#ifdef EIGEN_USE_THREADS\n  template <typename EvalSubExprsCallback>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalSubExprsIfNeededAsync(\n      EvaluatorPointerType data, EvalSubExprsCallback done) {\n    m_impl.evalSubExprsIfNeededAsync(nullptr, [done](bool) { done(true); });\n  }\n#endif  // EIGEN_USE_THREADS  \n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {\n    m_impl.cleanup();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const\n  {\n    if (m_is_identity) {\n      return m_impl.coeff(index);\n    } else {\n      return m_impl.coeff(srcCoeff(index));\n    }\n  }\n\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const\n  {\n    const int packetSize = PacketType<CoeffReturnType, Device>::size;\n    EIGEN_STATIC_ASSERT((packetSize > 1), YOU_MADE_A_PROGRAMMING_MISTAKE)\n    eigen_assert(index+packetSize-1 < internal::array_prod(dimensions()));\n\n    if (m_is_identity) {\n      return m_impl.template packet<LoadMode>(index);\n    }\n\n    Index inputIndices[] = {0, 0};\n    Index indices[] = {index, index + packetSize - 1};\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      EIGEN_UNROLL_LOOP\n      for (int i = NumDims - 1; i > 0; --i) {\n        const Index idx0 = indices[0] / m_fastOutputStrides[i];\n        const Index idx1 = indices[1] / m_fastOutputStrides[i];\n        inputIndices[0] += (idx0 + m_offsets[i]) * m_inputStrides[i];\n        inputIndices[1] += (idx1 + m_offsets[i]) * m_inputStrides[i];\n        indices[0] -= idx0 * m_outputStrides[i];\n        indices[1] -= idx1 * m_outputStrides[i];\n      }\n      inputIndices[0] += (indices[0] + m_offsets[0]);\n      inputIndices[1] += (indices[1] + m_offsets[0]);\n    } else {\n      EIGEN_UNROLL_LOOP\n      for (int i = 0; i < NumDims - 1; ++i) {\n        const Index idx0 = indices[0] / m_fastOutputStrides[i];\n        const Index idx1 = indices[1] / m_fastOutputStrides[i];\n        inputIndices[0] += (idx0 + m_offsets[i]) * m_inputStrides[i];\n        inputIndices[1] += (idx1 + m_offsets[i]) * m_inputStrides[i];\n        indices[0] -= idx0 * m_outputStrides[i];\n        indices[1] -= idx1 * m_outputStrides[i];\n      }\n      inputIndices[0] += (indices[0] + m_offsets[NumDims-1]);\n      inputIndices[1] += (indices[1] + m_offsets[NumDims-1]);\n    }\n    if (inputIndices[1] - inputIndices[0] == packetSize - 1) {\n      PacketReturnType rslt = m_impl.template packet<Unaligned>(inputIndices[0]);\n      return rslt;\n    }\n    else {\n      EIGEN_ALIGN_MAX typename internal::remove_const<CoeffReturnType>::type values[packetSize];\n      values[0] = m_impl.coeff(inputIndices[0]);\n      values[packetSize-1] = m_impl.coeff(inputIndices[1]);\n      EIGEN_UNROLL_LOOP\n      for (int i = 1; i < packetSize-1; ++i) {\n        values[i] = coeff(index+i);\n      }\n      PacketReturnType rslt = internal::pload<PacketReturnType>(values);\n      return rslt;\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool vectorized) const {\n    return m_impl.costPerCoeff(vectorized) + TensorOpCost(0, 0, m_is_identity ? 1 : NumDims);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  internal::TensorBlockResourceRequirements getResourceRequirements() const {\n    const size_t target_size = m_device.lastLevelCacheSize();\n    return internal::TensorBlockResourceRequirements::merge(\n        internal::TensorBlockResourceRequirements::skewed<Scalar>(target_size),\n        m_impl.getResourceRequirements());\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorBlock\n  block(TensorBlockDesc& desc, TensorBlockScratch& scratch,\n          bool /*root_of_expr_ast*/ = false) const {\n    TensorBlockDesc arg_desc = desc.WithOffset(srcCoeff(desc.offset()));\n    TensorBlock block = m_impl.block(arg_desc, scratch);\n    if (!arg_desc.HasDestinationBuffer()) desc.DropDestinationBuffer();\n    return block;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename Storage::Type data() const {\n    typename Storage::Type result = constCast(m_impl.data());\n    if (result) {\n      Index offset = 0;\n      if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n        for (int i = 0; i < NumDims; ++i) {\n          if (m_dimensions[i] != m_impl.dimensions()[i]) {\n            offset += m_offsets[i] * m_inputStrides[i];\n            for (int j = i+1; j < NumDims; ++j) {\n              if (m_dimensions[j] > 1) {\n                return NULL;\n              }\n              offset += m_offsets[j] * m_inputStrides[j];\n            }\n            break;\n          }\n        }\n      } else {\n        for (int i = NumDims - 1; i >= 0; --i) {\n          if (m_dimensions[i] != m_impl.dimensions()[i]) {\n            offset += m_offsets[i] * m_inputStrides[i];\n            for (int j = i-1; j >= 0; --j) {\n              if (m_dimensions[j] > 1) {\n                return NULL;\n              }\n              offset += m_offsets[j] * m_inputStrides[j];\n            }\n            break;\n          }\n        }\n      }\n      return result + offset;\n    }\n    return NULL;\n  }\n#ifdef EIGEN_USE_SYCL\n  // binding placeholder accessors to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {\n    m_impl.bind(cgh);\n  }\n#endif\n\n protected:\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index srcCoeff(Index index) const\n  {\n    Index inputIndex = 0;\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      EIGEN_UNROLL_LOOP\n      for (int i = NumDims - 1; i > 0; --i) {\n        const Index idx = index / m_fastOutputStrides[i];\n        inputIndex += (idx + m_offsets[i]) * m_inputStrides[i];\n        index -= idx * m_outputStrides[i];\n      }\n      inputIndex += (index + m_offsets[0]);\n    } else {\n      EIGEN_UNROLL_LOOP\n      for (int i = 0; i < NumDims - 1; ++i) {\n        const Index idx = index / m_fastOutputStrides[i];\n        inputIndex += (idx + m_offsets[i]) * m_inputStrides[i];\n        index -= idx * m_outputStrides[i];\n      }\n      inputIndex += (index + m_offsets[NumDims-1]);\n    }\n    return inputIndex;\n  }\n\n  array<Index, NumDims> m_outputStrides;\n  array<internal::TensorIntDivisor<Index>, NumDims> m_fastOutputStrides;\n  array<Index, NumDims> m_inputStrides;\n  TensorEvaluator<ArgType, Device> m_impl;\n  const Device EIGEN_DEVICE_REF m_device;\n  Dimensions m_dimensions;\n  bool m_is_identity;\n  const StartIndices m_offsets;\n};\n\n\n// Eval as lvalue\ntemplate<typename StartIndices, typename Sizes, typename ArgType, typename Device>\nstruct TensorEvaluator<TensorSlicingOp<StartIndices, Sizes, ArgType>, Device>\n  : public TensorEvaluator<const TensorSlicingOp<StartIndices, Sizes, ArgType>, Device>\n{\n  typedef TensorEvaluator<const TensorSlicingOp<StartIndices, Sizes, ArgType>, Device> Base;\n  typedef TensorSlicingOp<StartIndices, Sizes, ArgType> XprType;\n  static const int NumDims = internal::array_size<Sizes>::value;\n\n  typedef typename XprType::Index Index;\n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  typedef Sizes Dimensions;\n\n  enum {\n    IsAligned         = false,\n    PacketAccess      = TensorEvaluator<ArgType, Device>::PacketAccess,\n    BlockAccess       = TensorEvaluator<ArgType, Device>::BlockAccess,\n    PreferBlockAccess = true,\n    Layout            = TensorEvaluator<ArgType, Device>::Layout,\n    CoordAccess       = false,\n    RawAccess         = (NumDims == 1) & TensorEvaluator<ArgType, Device>::RawAccess\n  };\n\n  typedef typename internal::remove_const<Scalar>::type ScalarNoConst;\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockDescriptor<NumDims, Index> TensorBlockDesc;\n  typedef internal::TensorBlockScratchAllocator<Device> TensorBlockScratch;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)\n    : Base(op, device)\n    { }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType& coeffRef(Index index)\n  {\n    if (this->m_is_identity) {\n      return this->m_impl.coeffRef(index);\n    } else {\n      return this->m_impl.coeffRef(this->srcCoeff(index));\n    }\n  }\n\n  template <int StoreMode> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  void writePacket(Index index, const PacketReturnType& x)\n  {\n    if (this->m_is_identity) {\n      this->m_impl.template writePacket<StoreMode>(index, x);\n      return;\n    }\n\n    const int packetSize = PacketType<CoeffReturnType, Device>::size;\n    Index inputIndices[] = {0, 0};\n    Index indices[] = {index, index + packetSize - 1};\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      EIGEN_UNROLL_LOOP\n      for (int i = NumDims - 1; i > 0; --i) {\n        const Index idx0 = indices[0] / this->m_fastOutputStrides[i];\n        const Index idx1 = indices[1] / this->m_fastOutputStrides[i];\n        inputIndices[0] += (idx0 + this->m_offsets[i]) * this->m_inputStrides[i];\n        inputIndices[1] += (idx1 + this->m_offsets[i]) * this->m_inputStrides[i];\n        indices[0] -= idx0 * this->m_outputStrides[i];\n        indices[1] -= idx1 * this->m_outputStrides[i];\n      }\n      inputIndices[0] += (indices[0] + this->m_offsets[0]);\n      inputIndices[1] += (indices[1] + this->m_offsets[0]);\n    } else {\n      EIGEN_UNROLL_LOOP\n      for (int i = 0; i < NumDims - 1; ++i) {\n        const Index idx0 = indices[0] / this->m_fastOutputStrides[i];\n        const Index idx1 = indices[1] / this->m_fastOutputStrides[i];\n        inputIndices[0] += (idx0 + this->m_offsets[i]) * this->m_inputStrides[i];\n        inputIndices[1] += (idx1 + this->m_offsets[i]) * this->m_inputStrides[i];\n        indices[0] -= idx0 * this->m_outputStrides[i];\n        indices[1] -= idx1 * this->m_outputStrides[i];\n      }\n      inputIndices[0] += (indices[0] + this->m_offsets[NumDims-1]);\n      inputIndices[1] += (indices[1] + this->m_offsets[NumDims-1]);\n    }\n    if (inputIndices[1] - inputIndices[0] == packetSize - 1) {\n      this->m_impl.template writePacket<StoreMode>(inputIndices[0], x);\n    }\n    else {\n      EIGEN_ALIGN_MAX CoeffReturnType values[packetSize];\n      internal::pstore<CoeffReturnType, PacketReturnType>(values, x);\n      this->m_impl.coeffRef(inputIndices[0]) = values[0];\n      this->m_impl.coeffRef(inputIndices[1]) = values[packetSize-1];\n      EIGEN_UNROLL_LOOP\n      for (int i = 1; i < packetSize-1; ++i) {\n        this->coeffRef(index+i) = values[i];\n      }\n    }\n  }\n\n  template<typename TensorBlock>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void writeBlock(\n      const TensorBlockDesc& desc, const TensorBlock& block) {\n    TensorBlockDesc arg_desc = desc.WithOffset(this->srcCoeff(desc.offset()));\n    this->m_impl.writeBlock(arg_desc, block);\n  }\n};\n\nnamespace internal {\ntemplate<typename StartIndices, typename StopIndices, typename Strides, typename XprType>\nstruct traits<TensorStridingSlicingOp<StartIndices, StopIndices, Strides, XprType> > : public traits<XprType>\n{\n  typedef typename XprType::Scalar Scalar;\n  typedef traits<XprType> XprTraits;\n  typedef typename XprTraits::StorageKind StorageKind;\n  typedef typename XprTraits::Index Index;\n  typedef typename XprType::Nested Nested;\n  typedef typename remove_reference<Nested>::type _Nested;\n  static const int NumDimensions = array_size<StartIndices>::value;\n  static const int Layout = XprTraits::Layout;\n  typedef typename XprTraits::PointerType PointerType;\n};\n\ntemplate<typename StartIndices, typename StopIndices, typename Strides, typename XprType>\nstruct eval<TensorStridingSlicingOp<StartIndices, StopIndices, Strides, XprType>, Eigen::Dense>\n{\n  typedef const TensorStridingSlicingOp<StartIndices, StopIndices, Strides, XprType>EIGEN_DEVICE_REF type;\n};\n\ntemplate<typename StartIndices, typename StopIndices, typename Strides, typename XprType>\nstruct nested<TensorStridingSlicingOp<StartIndices, StopIndices, Strides, XprType>, 1, typename eval<TensorStridingSlicingOp<StartIndices, StopIndices, Strides, XprType> >::type>\n{\n  typedef TensorStridingSlicingOp<StartIndices, StopIndices, Strides, XprType> type;\n};\n\n}  // end namespace internal\n\n\ntemplate<typename StartIndices, typename StopIndices, typename Strides, typename XprType>\nclass TensorStridingSlicingOp : public TensorBase<TensorStridingSlicingOp<StartIndices, StopIndices, Strides, XprType> >\n{\n  public:\n  typedef typename internal::traits<TensorStridingSlicingOp>::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename internal::nested<TensorStridingSlicingOp>::type Nested;\n  typedef typename internal::traits<TensorStridingSlicingOp>::StorageKind StorageKind;\n  typedef typename internal::traits<TensorStridingSlicingOp>::Index Index;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorStridingSlicingOp(\n    const XprType& expr, const StartIndices& startIndices,\n    const StopIndices& stopIndices, const Strides& strides)\n      : m_xpr(expr), m_startIndices(startIndices), m_stopIndices(stopIndices),\n        m_strides(strides) {}\n\n    EIGEN_DEVICE_FUNC\n    const StartIndices& startIndices() const { return m_startIndices; }\n    EIGEN_DEVICE_FUNC\n    const StartIndices& stopIndices() const { return m_stopIndices; }\n    EIGEN_DEVICE_FUNC\n    const StartIndices& strides() const { return m_strides; }\n\n    EIGEN_DEVICE_FUNC\n    const typename internal::remove_all<typename XprType::Nested>::type&\n    expression() const { return m_xpr; }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE TensorStridingSlicingOp& operator = (const TensorStridingSlicingOp& other)\n    {\n      typedef TensorAssignOp<TensorStridingSlicingOp, const TensorStridingSlicingOp> Assign;\n      Assign assign(*this, other);\n      internal::TensorExecutor<const Assign, DefaultDevice>::run(\n          assign, DefaultDevice());\n      return *this;\n    }\n\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE TensorStridingSlicingOp& operator = (const OtherDerived& other)\n    {\n      typedef TensorAssignOp<TensorStridingSlicingOp, const OtherDerived> Assign;\n      Assign assign(*this, other);\n      internal::TensorExecutor<const Assign, DefaultDevice>::run(\n          assign, DefaultDevice());\n      return *this;\n    }\n\n  protected:\n    typename XprType::Nested m_xpr;\n    const StartIndices m_startIndices;\n    const StopIndices m_stopIndices;\n    const Strides m_strides;\n};\n\n// Eval as rvalue\ntemplate<typename StartIndices, typename StopIndices, typename Strides, typename ArgType, typename Device>\nstruct TensorEvaluator<const TensorStridingSlicingOp<StartIndices, StopIndices, Strides, ArgType>, Device>\n{\n  typedef TensorStridingSlicingOp<StartIndices, StopIndices, Strides, ArgType> XprType;\n  static const int NumDims = internal::array_size<Strides>::value;\n  typedef typename XprType::Index Index;\n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  typedef StorageMemory<CoeffReturnType, Device> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n  typedef Strides Dimensions;\n\n  enum {\n    // Alignment can't be guaranteed at compile time since it depends on the\n    // slice offsets and sizes.\n    IsAligned = false,\n    PacketAccess = false,\n    BlockAccess = false,\n    PreferBlockAccess = TensorEvaluator<ArgType, Device>::PreferBlockAccess,\n    Layout = TensorEvaluator<ArgType, Device>::Layout,\n    RawAccess = false\n  };\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockNotImplemented TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)\n      : m_impl(op.expression(), device),\n        m_device(device),\n        m_strides(op.strides())\n  {\n    // Handle degenerate intervals by gracefully clamping and allowing m_dimensions to be zero\n    DSizes<Index, NumDims> startIndicesClamped, stopIndicesClamped;\n    for (ptrdiff_t i = 0; i < internal::array_size<Dimensions>::value; ++i) {\n      eigen_assert(m_strides[i] != 0 && \"0 stride is invalid\");\n      if (m_strides[i] > 0) {\n        startIndicesClamped[i] =\n            clamp(op.startIndices()[i], 0, m_impl.dimensions()[i]);\n        stopIndicesClamped[i] =\n            clamp(op.stopIndices()[i], 0, m_impl.dimensions()[i]);\n      } else {\n        /* implies m_strides[i] < 0 by assert */\n        startIndicesClamped[i] =\n            clamp(op.startIndices()[i], -1, m_impl.dimensions()[i] - 1);\n        stopIndicesClamped[i] =\n            clamp(op.stopIndices()[i], -1, m_impl.dimensions()[i] - 1);\n      }\n      m_startIndices[i] = startIndicesClamped[i];\n    }\n\n    typedef typename TensorEvaluator<ArgType, Device>::Dimensions InputDimensions;\n    const InputDimensions& input_dims = m_impl.dimensions();\n\n    // check for degenerate intervals and compute output tensor shape\n    bool degenerate = false;\n    m_is_identity = true;\n    for (int i = 0; i < NumDims; i++) {\n      Index interval = stopIndicesClamped[i] - startIndicesClamped[i];\n      if (interval == 0 || ((interval < 0) != (m_strides[i] < 0))) {\n        m_dimensions[i] = 0;\n        degenerate = true;\n      } else {\n        m_dimensions[i] =\n            (interval / m_strides[i]) + (interval % m_strides[i] != 0 ? 1 : 0);\n        eigen_assert(m_dimensions[i] >= 0);\n      }\n      if (m_strides[i] != 1 || interval != m_impl.dimensions()[i]) {\n        m_is_identity = false;\n      }\n    }\n\n    Strides output_dims = m_dimensions;\n\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      m_inputStrides[0] = m_strides[0];\n      m_offsets[0] = startIndicesClamped[0];\n      Index previousDimProduct = 1;\n      for (int i = 1; i < NumDims; ++i) {\n        previousDimProduct *= input_dims[i-1];\n        m_inputStrides[i] = previousDimProduct * m_strides[i];\n        m_offsets[i] = startIndicesClamped[i] * previousDimProduct;\n      }\n\n      // Don't initialize m_fastOutputStrides[0] since it won't ever be accessed.\n      m_outputStrides[0] = 1;\n      for (int i = 1; i < NumDims; ++i) {\n        m_outputStrides[i] = m_outputStrides[i-1] * output_dims[i-1];\n        // NOTE: if tensor is degenerate, we send 1 to prevent TensorIntDivisor constructor crash\n        m_fastOutputStrides[i] = internal::TensorIntDivisor<Index>(degenerate ? 1 : m_outputStrides[i]);\n      }\n    } else {\n      m_inputStrides[NumDims-1] = m_strides[NumDims-1];\n      m_offsets[NumDims-1] = startIndicesClamped[NumDims-1];\n      Index previousDimProduct = 1;\n      for (int i = NumDims - 2; i >= 0; --i) {\n        previousDimProduct *= input_dims[i+1];\n        m_inputStrides[i] = previousDimProduct * m_strides[i];\n        m_offsets[i] = startIndicesClamped[i] * previousDimProduct;\n      }\n\n      m_outputStrides[NumDims-1] = 1;\n      for (int i = NumDims - 2; i >= 0; --i) {\n        m_outputStrides[i] = m_outputStrides[i+1] * output_dims[i+1];\n        // NOTE: if tensor is degenerate, we send 1 to prevent TensorIntDivisor constructor crash\n        m_fastOutputStrides[i] = internal::TensorIntDivisor<Index>(degenerate ? 1 : m_outputStrides[i]);\n      }\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions& dimensions() const { return m_dimensions; }\n\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType) {\n    m_impl.evalSubExprsIfNeeded(NULL);\n    return true;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {\n    m_impl.cleanup();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const\n  {\n    if (m_is_identity) {\n      return m_impl.coeff(index);\n    } else {\n      return m_impl.coeff(srcCoeff(index));\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool vectorized) const {\n    return m_impl.costPerCoeff(vectorized) + TensorOpCost(0, 0, m_is_identity ? 1 : NumDims);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename Storage::Type data() const {\n    return NULL;\n  }\n#ifdef EIGEN_USE_SYCL\n  // binding placeholder accessors to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {\n    m_impl.bind(cgh);\n  }\n#endif\n protected:\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index srcCoeff(Index index) const\n  {\n    Index inputIndex = 0;\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      EIGEN_UNROLL_LOOP\n      for (int i = NumDims - 1; i >= 0; --i) {\n        const Index idx = index / m_fastOutputStrides[i];\n        inputIndex += idx * m_inputStrides[i] + m_offsets[i];\n        index -= idx * m_outputStrides[i];\n      }\n    } else {\n      EIGEN_UNROLL_LOOP\n      for (int i = 0; i < NumDims; ++i) {\n        const Index idx = index / m_fastOutputStrides[i];\n        inputIndex += idx * m_inputStrides[i] + m_offsets[i];\n        index -= idx * m_outputStrides[i];\n      }\n    }\n    return inputIndex;\n  }\n\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index clamp(Index value, Index min, Index max) {\n#ifndef SYCL_DEVICE_ONLY\n    return numext::maxi(min, numext::mini(max,value));\n#else\n    return cl::sycl::clamp(value, min, max);\n#endif\n  }\n\n  array<Index, NumDims> m_outputStrides;\n  array<internal::TensorIntDivisor<Index>, NumDims> m_fastOutputStrides;\n  array<Index, NumDims> m_inputStrides;\n  bool m_is_identity;\n  TensorEvaluator<ArgType, Device> m_impl;\n  const Device EIGEN_DEVICE_REF m_device;\n  DSizes<Index, NumDims> m_startIndices; // clamped startIndices\n  DSizes<Index, NumDims> m_dimensions;\n  DSizes<Index, NumDims> m_offsets; // offset in a flattened shape\n  const Strides m_strides;\n};\n\n// Eval as lvalue\ntemplate<typename StartIndices, typename StopIndices, typename Strides, typename ArgType, typename Device>\nstruct TensorEvaluator<TensorStridingSlicingOp<StartIndices, StopIndices, Strides, ArgType>, Device>\n  : public TensorEvaluator<const TensorStridingSlicingOp<StartIndices, StopIndices, Strides, ArgType>, Device>\n{\n  typedef TensorEvaluator<const TensorStridingSlicingOp<StartIndices, StopIndices, Strides, ArgType>, Device> Base;\n  typedef TensorStridingSlicingOp<StartIndices, StopIndices, Strides, ArgType> XprType;\n  static const int NumDims = internal::array_size<Strides>::value;\n\n  enum {\n    IsAligned = false,\n    PacketAccess = false,\n    BlockAccess = false,\n    PreferBlockAccess = TensorEvaluator<ArgType, Device>::PreferBlockAccess,\n    Layout = TensorEvaluator<ArgType, Device>::Layout,\n    CoordAccess = TensorEvaluator<ArgType, Device>::CoordAccess,\n    RawAccess = false\n  };\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockNotImplemented TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)\n    : Base(op, device)\n    { }\n\n  typedef typename XprType::Index Index;\n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  typedef Strides Dimensions;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType& coeffRef(Index index)\n  {\n    if (this->m_is_identity) {\n      return this->m_impl.coeffRef(index);\n    } else {\n      return this->m_impl.coeffRef(this->srcCoeff(index));\n    }\n  }\n};\n\n\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_MORPHING_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorPadding.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_PADDING_H\n#define EIGEN_CXX11_TENSOR_TENSOR_PADDING_H\n\nnamespace Eigen {\n\n/** \\class TensorPadding\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief Tensor padding class.\n  * At the moment only padding with a constant value is supported.\n  *\n  */\nnamespace internal {\ntemplate<typename PaddingDimensions, typename XprType>\nstruct traits<TensorPaddingOp<PaddingDimensions, XprType> > : public traits<XprType>\n{\n  typedef typename XprType::Scalar Scalar;\n  typedef traits<XprType> XprTraits;\n  typedef typename XprTraits::StorageKind StorageKind;\n  typedef typename XprTraits::Index Index;\n  typedef typename XprType::Nested Nested;\n  typedef typename remove_reference<Nested>::type _Nested;\n  static const int NumDimensions = XprTraits::NumDimensions;\n  static const int Layout = XprTraits::Layout;\n  typedef typename XprTraits::PointerType PointerType;\n};\n\ntemplate<typename PaddingDimensions, typename XprType>\nstruct eval<TensorPaddingOp<PaddingDimensions, XprType>, Eigen::Dense>\n{\n  typedef const TensorPaddingOp<PaddingDimensions, XprType>& type;\n};\n\ntemplate<typename PaddingDimensions, typename XprType>\nstruct nested<TensorPaddingOp<PaddingDimensions, XprType>, 1, typename eval<TensorPaddingOp<PaddingDimensions, XprType> >::type>\n{\n  typedef TensorPaddingOp<PaddingDimensions, XprType> type;\n};\n\n}  // end namespace internal\n\n\n\ntemplate<typename PaddingDimensions, typename XprType>\nclass TensorPaddingOp : public TensorBase<TensorPaddingOp<PaddingDimensions, XprType>, ReadOnlyAccessors>\n{\n  public:\n  typedef typename Eigen::internal::traits<TensorPaddingOp>::Scalar Scalar;\n  typedef typename Eigen::NumTraits<Scalar>::Real RealScalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename Eigen::internal::nested<TensorPaddingOp>::type Nested;\n  typedef typename Eigen::internal::traits<TensorPaddingOp>::StorageKind StorageKind;\n  typedef typename Eigen::internal::traits<TensorPaddingOp>::Index Index;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorPaddingOp(const XprType& expr, const PaddingDimensions& padding_dims, const Scalar padding_value)\n      : m_xpr(expr), m_padding_dims(padding_dims), m_padding_value(padding_value) {}\n\n    EIGEN_DEVICE_FUNC\n    const PaddingDimensions& padding() const { return m_padding_dims; }\n    EIGEN_DEVICE_FUNC\n    Scalar padding_value() const { return m_padding_value; }\n\n    EIGEN_DEVICE_FUNC\n    const typename internal::remove_all<typename XprType::Nested>::type&\n    expression() const { return m_xpr; }\n\n  protected:\n    typename XprType::Nested m_xpr;\n    const PaddingDimensions m_padding_dims;\n    const Scalar m_padding_value;\n};\n\n\n// Eval as rvalue\ntemplate<typename PaddingDimensions, typename ArgType, typename Device>\nstruct TensorEvaluator<const TensorPaddingOp<PaddingDimensions, ArgType>, Device>\n{\n  typedef TensorPaddingOp<PaddingDimensions, ArgType> XprType;\n  typedef typename XprType::Index Index;\n  static const int NumDims = internal::array_size<PaddingDimensions>::value;\n  typedef DSizes<Index, NumDims> Dimensions;\n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  static const int PacketSize = PacketType<CoeffReturnType, Device>::size;\n  typedef StorageMemory<CoeffReturnType, Device> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n\n  enum {\n    IsAligned         = true,\n    PacketAccess      = TensorEvaluator<ArgType, Device>::PacketAccess,\n    BlockAccess       = TensorEvaluator<ArgType, Device>::RawAccess,\n    PreferBlockAccess = true,\n    Layout            = TensorEvaluator<ArgType, Device>::Layout,\n    CoordAccess       = true,\n    RawAccess         = false\n  };\n\n  typedef typename internal::remove_const<Scalar>::type ScalarNoConst;\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockDescriptor<NumDims, Index> TensorBlockDesc;\n  typedef internal::TensorBlockScratchAllocator<Device> TensorBlockScratch;\n\n  typedef typename internal::TensorMaterializedBlock<ScalarNoConst, NumDims,\n                                                     Layout, Index>\n      TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)\n      : m_impl(op.expression(), device), m_padding(op.padding()), m_paddingValue(op.padding_value()), m_device(device)\n  {\n    // The padding op doesn't change the rank of the tensor. Directly padding a scalar would lead\n    // to a vector, which doesn't make sense. Instead one should reshape the scalar into a vector\n    // of 1 element first and then pad.\n    EIGEN_STATIC_ASSERT((NumDims > 0), YOU_MADE_A_PROGRAMMING_MISTAKE);\n\n    // Compute dimensions\n    m_dimensions = m_impl.dimensions();\n    for (int i = 0; i < NumDims; ++i) {\n      m_dimensions[i] += m_padding[i].first + m_padding[i].second;\n    }\n    const typename TensorEvaluator<ArgType, Device>::Dimensions& input_dims = m_impl.dimensions();\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      m_inputStrides[0] = 1;\n      m_outputStrides[0] = 1;\n      for (int i = 1; i < NumDims; ++i) {\n        m_inputStrides[i] = m_inputStrides[i-1] * input_dims[i-1];\n        m_outputStrides[i] = m_outputStrides[i-1] * m_dimensions[i-1];\n      }\n      m_outputStrides[NumDims] = m_outputStrides[NumDims-1] * m_dimensions[NumDims-1];\n    } else {\n      m_inputStrides[NumDims - 1] = 1;\n      m_outputStrides[NumDims] = 1;\n      for (int i = NumDims - 2; i >= 0; --i) {\n        m_inputStrides[i] = m_inputStrides[i+1] * input_dims[i+1];\n        m_outputStrides[i+1] = m_outputStrides[i+2] * m_dimensions[i+1];\n      }\n      m_outputStrides[0] = m_outputStrides[1] * m_dimensions[0];\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions& dimensions() const { return m_dimensions; }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType) {\n    m_impl.evalSubExprsIfNeeded(NULL);\n    return true;\n  }\n\n#ifdef EIGEN_USE_THREADS\n  template <typename EvalSubExprsCallback>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalSubExprsIfNeededAsync(\n      EvaluatorPointerType, EvalSubExprsCallback done) {\n    m_impl.evalSubExprsIfNeededAsync(nullptr, [done](bool) { done(true); });\n  }\n#endif  // EIGEN_USE_THREADS\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {\n    m_impl.cleanup();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const\n  {\n    eigen_assert(index < dimensions().TotalSize());\n    Index inputIndex = 0;\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      EIGEN_UNROLL_LOOP\n      for (int i = NumDims - 1; i > 0; --i) {\n        const Index idx = index / m_outputStrides[i];\n        if (isPaddingAtIndexForDim(idx, i)) {\n          return m_paddingValue;\n        }\n        inputIndex += (idx - m_padding[i].first) * m_inputStrides[i];\n        index -= idx * m_outputStrides[i];\n      }\n      if (isPaddingAtIndexForDim(index, 0)) {\n        return m_paddingValue;\n      }\n      inputIndex += (index - m_padding[0].first);\n    } else {\n      EIGEN_UNROLL_LOOP\n      for (int i = 0; i < NumDims - 1; ++i) {\n        const Index idx = index / m_outputStrides[i+1];\n        if (isPaddingAtIndexForDim(idx, i)) {\n          return m_paddingValue;\n        }\n        inputIndex += (idx - m_padding[i].first) * m_inputStrides[i];\n        index -= idx * m_outputStrides[i+1];\n      }\n      if (isPaddingAtIndexForDim(index, NumDims-1)) {\n        return m_paddingValue;\n      }\n      inputIndex += (index - m_padding[NumDims-1].first);\n    }\n    return m_impl.coeff(inputIndex);\n  }\n\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const\n  {\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      return packetColMajor(index);\n    }\n    return packetRowMajor(index);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool vectorized) const {\n    TensorOpCost cost = m_impl.costPerCoeff(vectorized);\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      EIGEN_UNROLL_LOOP\n      for (int i = 0; i < NumDims; ++i)\n        updateCostPerDimension(cost, i, i == 0);\n    } else {\n      EIGEN_UNROLL_LOOP\n      for (int i = NumDims - 1; i >= 0; --i)\n        updateCostPerDimension(cost, i, i == NumDims - 1);\n    }\n    return cost;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  internal::TensorBlockResourceRequirements getResourceRequirements() const {\n    const size_t target_size = m_device.lastLevelCacheSize();\n    return internal::TensorBlockResourceRequirements::merge(\n        internal::TensorBlockResourceRequirements::skewed<Scalar>(target_size),\n        m_impl.getResourceRequirements());\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorBlock\n  block(TensorBlockDesc& desc, TensorBlockScratch& scratch,\n          bool /*root_of_expr_ast*/ = false) const {\n    // If one of the dimensions is zero, return empty block view.\n    if (desc.size() == 0) {\n      return TensorBlock(internal::TensorBlockKind::kView, NULL,\n                           desc.dimensions());\n    }\n\n    static const bool IsColMajor = Layout == static_cast<int>(ColMajor);\n    const int inner_dim_idx = IsColMajor ? 0 : NumDims - 1;\n\n    Index offset = desc.offset();\n\n    // Compute offsets in the output tensor corresponding to the desc.offset().\n    DSizes<Index, NumDims> output_offsets;\n    for (int i = NumDims - 1; i > 0; --i) {\n      const int dim = IsColMajor ? i : NumDims - i - 1;\n      const int stride_dim = IsColMajor ? dim : dim + 1;\n      output_offsets[dim] = offset / m_outputStrides[stride_dim];\n      offset -= output_offsets[dim] * m_outputStrides[stride_dim];\n    }\n    output_offsets[inner_dim_idx] = offset;\n\n    // Offsets in the input corresponding to output offsets.\n    DSizes<Index, NumDims> input_offsets = output_offsets;\n    for (int i = 0; i < NumDims; ++i) {\n      const int dim = IsColMajor ? i : NumDims - i - 1;\n      input_offsets[dim] = input_offsets[dim] - m_padding[dim].first;\n    }\n\n    // Compute offset in the input buffer (at this point it might be illegal and\n    // point outside of the input buffer, because we don't check for negative\n    // offsets, it will be autocorrected in the block iteration loop below).\n    Index input_offset = 0;\n    for (int i = 0; i < NumDims; ++i) {\n      const int dim = IsColMajor ? i : NumDims - i - 1;\n      input_offset += input_offsets[dim] * m_inputStrides[dim];\n    }\n\n    // Destination buffer and scratch buffer both indexed from 0 and have the\n    // same dimensions as the requested block (for destination buffer this\n    // property is guaranteed by `desc.destination()`).\n    Index output_offset = 0;\n    const DSizes<Index, NumDims> output_strides =\n        internal::strides<Layout>(desc.dimensions());\n\n    // NOTE(ezhulenev): We initialize bock iteration state for `NumDims - 1`\n    // dimensions, skipping innermost dimension. In theory it should be possible\n    // to squeeze matching innermost dimensions, however in practice that did\n    // not show any improvements in benchmarks. Also in practice first outer\n    // dimension usually has padding, and will prevent squeezing.\n\n    // Initialize output block iterator state. Dimension in this array are\n    // always in inner_most -> outer_most order (col major layout).\n    array<BlockIteratorState, NumDims - 1> it;\n    for (int i = 0; i < NumDims - 1; ++i) {\n      const int dim = IsColMajor ? i + 1 : NumDims - i - 2;\n      it[i].count = 0;\n      it[i].size = desc.dimension(dim);\n\n      it[i].input_stride = m_inputStrides[dim];\n      it[i].input_span = it[i].input_stride * (it[i].size - 1);\n\n      it[i].output_stride = output_strides[dim];\n      it[i].output_span = it[i].output_stride * (it[i].size - 1);\n    }\n\n    const Index input_inner_dim_size =\n        static_cast<Index>(m_impl.dimensions()[inner_dim_idx]);\n\n    // Total output size.\n    const Index output_size = desc.size();\n\n    // We will fill inner dimension of this size in the output. It might be\n    // larger than the inner dimension in the input, so we might have to pad\n    // before/after we copy values from the input inner dimension.\n    const Index output_inner_dim_size = desc.dimension(inner_dim_idx);\n\n    // How many values to fill with padding BEFORE reading from the input inner\n    // dimension.\n    const Index output_inner_pad_before_size =\n        input_offsets[inner_dim_idx] < 0\n            ? numext::mini(numext::abs(input_offsets[inner_dim_idx]),\n                           output_inner_dim_size)\n            : 0;\n\n    // How many values we can actually copy from the input inner dimension.\n    const Index output_inner_copy_size = numext::mini(\n        // Want to copy from input.\n        (output_inner_dim_size - output_inner_pad_before_size),\n        // Can copy from input.\n        numext::maxi(input_inner_dim_size - (input_offsets[inner_dim_idx] +\n                                             output_inner_pad_before_size),\n                     Index(0)));\n\n    eigen_assert(output_inner_copy_size >= 0);\n\n    // How many values to fill with padding AFTER reading from the input inner\n    // dimension.\n    const Index output_inner_pad_after_size =\n        (output_inner_dim_size - output_inner_copy_size -\n         output_inner_pad_before_size);\n\n    // Sanity check, sum of all sizes must be equal to the output size.\n    eigen_assert(output_inner_dim_size ==\n                 (output_inner_pad_before_size + output_inner_copy_size +\n                  output_inner_pad_after_size));\n\n    // Keep track of current coordinates and padding in the output.\n    DSizes<Index, NumDims> output_coord = output_offsets;\n    DSizes<Index, NumDims> output_padded;\n    for (int i = 0; i < NumDims; ++i) {\n      const int dim = IsColMajor ? i : NumDims - i - 1;\n      output_padded[dim] = isPaddingAtIndexForDim(output_coord[dim], dim);\n    }\n\n    typedef internal::StridedLinearBufferCopy<ScalarNoConst, Index> LinCopy;\n\n    // Prepare storage for the materialized padding result.\n    const typename TensorBlock::Storage block_storage =\n        TensorBlock::prepareStorage(desc, scratch);\n\n    // TODO(ezhulenev): Squeeze multiple non-padded inner dimensions into a\n    // single logical inner dimension.\n\n    // When possible we squeeze writes for the innermost (only if non-padded)\n    // dimension with the first padded dimension. This allows to reduce the\n    // number of calls to LinCopy and better utilize vector instructions.\n    const bool squeeze_writes =\n        NumDims > 1 &&\n        // inner dimension is not padded\n        (input_inner_dim_size == m_dimensions[inner_dim_idx]) &&\n        // and equal to the block inner dimension\n        (input_inner_dim_size == output_inner_dim_size);\n\n    const int squeeze_dim = IsColMajor ? inner_dim_idx + 1 : inner_dim_idx - 1;\n\n    // Maximum coordinate on a squeeze dimension that we can write to.\n    const Index squeeze_max_coord =\n        squeeze_writes ? numext::mini(\n                             // max non-padded element in the input\n                             static_cast<Index>(m_dimensions[squeeze_dim] -\n                                                m_padding[squeeze_dim].second),\n                             // max element in the output buffer\n                             static_cast<Index>(output_offsets[squeeze_dim] +\n                                                desc.dimension(squeeze_dim)))\n                       : static_cast<Index>(0);\n\n    // Iterate copying data from `m_impl.data()` to the output buffer.\n    for (Index size = 0; size < output_size;) {\n      // Detect if we are in the padded region (exclude innermost dimension).\n      bool is_padded = false;\n      for (int j = 1; j < NumDims; ++j) {\n        const int dim = IsColMajor ? j : NumDims - j - 1;\n        is_padded = output_padded[dim];\n        if (is_padded) break;\n      }\n\n      if (is_padded) {\n        // Fill single innermost dimension with padding value.\n        size += output_inner_dim_size;\n\n        LinCopy::template Run<LinCopy::Kind::FillLinear>(\n            typename LinCopy::Dst(output_offset, 1, block_storage.data()),\n            typename LinCopy::Src(0, 0, &m_paddingValue),\n            output_inner_dim_size);\n\n\n      } else if (squeeze_writes) {\n        // Squeeze multiple reads from innermost dimensions.\n        const Index squeeze_num = squeeze_max_coord - output_coord[squeeze_dim];\n        size += output_inner_dim_size * squeeze_num;\n\n        // Copy `squeeze_num` inner dimensions from input to output.\n        LinCopy::template Run<LinCopy::Kind::Linear>(\n            typename LinCopy::Dst(output_offset, 1, block_storage.data()),\n            typename LinCopy::Src(input_offset, 1, m_impl.data()),\n            output_inner_dim_size * squeeze_num);\n\n        // Update iteration state for only `squeeze_num - 1` processed inner\n        // dimensions, because we have another iteration state update at the end\n        // of the loop that will update iteration state for the last inner\n        // processed dimension.\n        it[0].count += (squeeze_num - 1);\n        input_offset += it[0].input_stride * (squeeze_num - 1);\n        output_offset += it[0].output_stride * (squeeze_num - 1);\n        output_coord[squeeze_dim] += (squeeze_num - 1);\n\n      } else {\n        // Single read from innermost dimension.\n        size += output_inner_dim_size;\n\n        {  // Fill with padding before copying from input inner dimension.\n          const Index out = output_offset;\n\n          LinCopy::template Run<LinCopy::Kind::FillLinear>(\n              typename LinCopy::Dst(out, 1, block_storage.data()),\n              typename LinCopy::Src(0, 0, &m_paddingValue),\n              output_inner_pad_before_size);\n        }\n\n        {  // Copy data from input inner dimension.\n          const Index out = output_offset + output_inner_pad_before_size;\n          const Index in = input_offset + output_inner_pad_before_size;\n\n          eigen_assert(output_inner_copy_size == 0 || m_impl.data() != NULL);\n\n          LinCopy::template Run<LinCopy::Kind::Linear>(\n              typename LinCopy::Dst(out, 1, block_storage.data()),\n              typename LinCopy::Src(in, 1, m_impl.data()),\n              output_inner_copy_size);\n        }\n\n        {  // Fill with padding after copying from input inner dimension.\n          const Index out = output_offset + output_inner_pad_before_size +\n                            output_inner_copy_size;\n\n          LinCopy::template Run<LinCopy::Kind::FillLinear>(\n              typename LinCopy::Dst(out, 1, block_storage.data()),\n              typename LinCopy::Src(0, 0, &m_paddingValue),\n              output_inner_pad_after_size);\n        }\n      }\n\n      for (int j = 0; j < NumDims - 1; ++j) {\n        const int dim = IsColMajor ? j + 1 : NumDims - j - 2;\n\n        if (++it[j].count < it[j].size) {\n          input_offset += it[j].input_stride;\n          output_offset += it[j].output_stride;\n          output_coord[dim] += 1;\n          output_padded[dim] = isPaddingAtIndexForDim(output_coord[dim], dim);\n          break;\n        }\n        it[j].count = 0;\n        input_offset -= it[j].input_span;\n        output_offset -= it[j].output_span;\n        output_coord[dim] -= it[j].size - 1;\n        output_padded[dim] = isPaddingAtIndexForDim(output_coord[dim], dim);\n      }\n    }\n\n    return block_storage.AsTensorMaterializedBlock();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EvaluatorPointerType data() const { return NULL; }\n\n#ifdef EIGEN_USE_SYCL\n  // binding placeholder accessors to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {\n    m_impl.bind(cgh);\n  }\n#endif\n\n private:\n  struct BlockIteratorState {\n    BlockIteratorState()\n        : count(0),\n          size(0),\n          input_stride(0),\n          input_span(0),\n          output_stride(0),\n          output_span(0) {}\n\n    Index count;\n    Index size;\n    Index input_stride;\n    Index input_span;\n    Index output_stride;\n    Index output_span;\n  };\n\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool isPaddingAtIndexForDim(\n      Index index, int dim_index) const {\n#if defined(EIGEN_HAS_INDEX_LIST)\n    return (!internal::index_pair_first_statically_eq<PaddingDimensions>(dim_index, 0) &&\n            index < m_padding[dim_index].first) ||\n        (!internal::index_pair_second_statically_eq<PaddingDimensions>(dim_index, 0) &&\n         index >= m_dimensions[dim_index] - m_padding[dim_index].second);\n#else\n    return (index < m_padding[dim_index].first) ||\n           (index >= m_dimensions[dim_index] - m_padding[dim_index].second);\n#endif\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool isLeftPaddingCompileTimeZero(\n      int dim_index) const {\n#if defined(EIGEN_HAS_INDEX_LIST)\n    return internal::index_pair_first_statically_eq<PaddingDimensions>(dim_index, 0);\n#else\n    EIGEN_UNUSED_VARIABLE(dim_index);\n    return false;\n#endif\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool isRightPaddingCompileTimeZero(\n      int dim_index) const {\n#if defined(EIGEN_HAS_INDEX_LIST)\n    return internal::index_pair_second_statically_eq<PaddingDimensions>(dim_index, 0);\n#else\n    EIGEN_UNUSED_VARIABLE(dim_index);\n    return false;\n#endif\n  }\n\n\n  void updateCostPerDimension(TensorOpCost& cost, int i, bool first) const {\n    const double in = static_cast<double>(m_impl.dimensions()[i]);\n    const double out = in + m_padding[i].first + m_padding[i].second;\n    if (out == 0)\n      return;\n    const double reduction = in / out;\n    cost *= reduction;\n    if (first) {\n      cost += TensorOpCost(0, 0, 2 * TensorOpCost::AddCost<Index>() +\n                    reduction * (1 * TensorOpCost::AddCost<Index>()));\n    } else {\n      cost += TensorOpCost(0, 0, 2 * TensorOpCost::AddCost<Index>() +\n                                 2 * TensorOpCost::MulCost<Index>() +\n                    reduction * (2 * TensorOpCost::MulCost<Index>() +\n                                 1 * TensorOpCost::DivCost<Index>()));\n    }\n  }\n\n protected:\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packetColMajor(Index index) const\n  {\n    EIGEN_STATIC_ASSERT((PacketSize > 1), YOU_MADE_A_PROGRAMMING_MISTAKE)\n    eigen_assert(index+PacketSize-1 < dimensions().TotalSize());\n\n    const Index initialIndex = index;\n    Index inputIndex = 0;\n    EIGEN_UNROLL_LOOP\n    for (int i = NumDims - 1; i > 0; --i) {\n      const Index firstIdx = index;\n      const Index lastIdx = index + PacketSize - 1;\n      const Index lastPaddedLeft = m_padding[i].first * m_outputStrides[i];\n      const Index firstPaddedRight = (m_dimensions[i] - m_padding[i].second) * m_outputStrides[i];\n      const Index lastPaddedRight = m_outputStrides[i+1];\n\n      if (!isLeftPaddingCompileTimeZero(i) && lastIdx < lastPaddedLeft) {\n        // all the coefficient are in the padding zone.\n        return internal::pset1<PacketReturnType>(m_paddingValue);\n      }\n      else if (!isRightPaddingCompileTimeZero(i) && firstIdx >= firstPaddedRight && lastIdx < lastPaddedRight) {\n        // all the coefficient are in the padding zone.\n        return internal::pset1<PacketReturnType>(m_paddingValue);\n      }\n      else if ((isLeftPaddingCompileTimeZero(i) && isRightPaddingCompileTimeZero(i)) || (firstIdx >= lastPaddedLeft && lastIdx < firstPaddedRight)) {\n        // all the coefficient are between the 2 padding zones.\n        const Index idx = index / m_outputStrides[i];\n        inputIndex += (idx - m_padding[i].first) * m_inputStrides[i];\n        index -= idx * m_outputStrides[i];\n      }\n      else {\n        // Every other case\n        return packetWithPossibleZero(initialIndex);\n      }\n    }\n\n    const Index lastIdx = index + PacketSize - 1;\n    const Index firstIdx = index;\n    const Index lastPaddedLeft = m_padding[0].first;\n    const Index firstPaddedRight = (m_dimensions[0] - m_padding[0].second);\n    const Index lastPaddedRight = m_outputStrides[1];\n\n    if (!isLeftPaddingCompileTimeZero(0) && lastIdx < lastPaddedLeft) {\n      // all the coefficient are in the padding zone.\n      return internal::pset1<PacketReturnType>(m_paddingValue);\n    }\n    else if (!isRightPaddingCompileTimeZero(0) && firstIdx >= firstPaddedRight && lastIdx < lastPaddedRight) {\n      // all the coefficient are in the padding zone.\n      return internal::pset1<PacketReturnType>(m_paddingValue);\n    }\n    else if ((isLeftPaddingCompileTimeZero(0) && isRightPaddingCompileTimeZero(0)) || (firstIdx >= lastPaddedLeft && lastIdx < firstPaddedRight)) {\n      // all the coefficient are between the 2 padding zones.\n      inputIndex += (index - m_padding[0].first);\n      return m_impl.template packet<Unaligned>(inputIndex);\n    }\n    // Every other case\n    return packetWithPossibleZero(initialIndex);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packetRowMajor(Index index) const\n  {\n    EIGEN_STATIC_ASSERT((PacketSize > 1), YOU_MADE_A_PROGRAMMING_MISTAKE)\n    eigen_assert(index+PacketSize-1 < dimensions().TotalSize());\n\n    const Index initialIndex = index;\n    Index inputIndex = 0;\n    EIGEN_UNROLL_LOOP\n    for (int i = 0; i < NumDims - 1; ++i) {\n      const Index firstIdx = index;\n      const Index lastIdx = index + PacketSize - 1;\n      const Index lastPaddedLeft = m_padding[i].first * m_outputStrides[i+1];\n      const Index firstPaddedRight = (m_dimensions[i] - m_padding[i].second) * m_outputStrides[i+1];\n      const Index lastPaddedRight = m_outputStrides[i];\n\n      if (!isLeftPaddingCompileTimeZero(i) && lastIdx < lastPaddedLeft) {\n        // all the coefficient are in the padding zone.\n        return internal::pset1<PacketReturnType>(m_paddingValue);\n      }\n      else if (!isRightPaddingCompileTimeZero(i) && firstIdx >= firstPaddedRight && lastIdx < lastPaddedRight) {\n        // all the coefficient are in the padding zone.\n        return internal::pset1<PacketReturnType>(m_paddingValue);\n      }\n      else if ((isLeftPaddingCompileTimeZero(i) && isRightPaddingCompileTimeZero(i)) || (firstIdx >= lastPaddedLeft && lastIdx < firstPaddedRight)) {\n        // all the coefficient are between the 2 padding zones.\n        const Index idx = index / m_outputStrides[i+1];\n        inputIndex += (idx - m_padding[i].first) * m_inputStrides[i];\n        index -= idx * m_outputStrides[i+1];\n      }\n      else {\n        // Every other case\n        return packetWithPossibleZero(initialIndex);\n      }\n    }\n\n    const Index lastIdx = index + PacketSize - 1;\n    const Index firstIdx = index;\n    const Index lastPaddedLeft = m_padding[NumDims-1].first;\n    const Index firstPaddedRight = (m_dimensions[NumDims-1] - m_padding[NumDims-1].second);\n    const Index lastPaddedRight = m_outputStrides[NumDims-1];\n\n    if (!isLeftPaddingCompileTimeZero(NumDims-1) && lastIdx < lastPaddedLeft) {\n      // all the coefficient are in the padding zone.\n      return internal::pset1<PacketReturnType>(m_paddingValue);\n    }\n    else if (!isRightPaddingCompileTimeZero(NumDims-1) && firstIdx >= firstPaddedRight && lastIdx < lastPaddedRight) {\n      // all the coefficient are in the padding zone.\n      return internal::pset1<PacketReturnType>(m_paddingValue);\n    }\n    else if ((isLeftPaddingCompileTimeZero(NumDims-1) && isRightPaddingCompileTimeZero(NumDims-1)) || (firstIdx >= lastPaddedLeft && lastIdx < firstPaddedRight)) {\n      // all the coefficient are between the 2 padding zones.\n      inputIndex += (index - m_padding[NumDims-1].first);\n      return m_impl.template packet<Unaligned>(inputIndex);\n    }\n    // Every other case\n    return packetWithPossibleZero(initialIndex);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packetWithPossibleZero(Index index) const\n  {\n    EIGEN_ALIGN_MAX typename internal::remove_const<CoeffReturnType>::type values[PacketSize];\n    EIGEN_UNROLL_LOOP\n    for (int i = 0; i < PacketSize; ++i) {\n      values[i] = coeff(index+i);\n    }\n    PacketReturnType rslt = internal::pload<PacketReturnType>(values);\n    return rslt;\n  }\n\n  Dimensions m_dimensions;\n  array<Index, NumDims+1> m_outputStrides;\n  array<Index, NumDims> m_inputStrides;\n  TensorEvaluator<ArgType, Device> m_impl;\n  PaddingDimensions m_padding;\n\n  Scalar m_paddingValue;\n\n  const Device EIGEN_DEVICE_REF m_device;\n};\n\n\n\n\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_PADDING_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorPatch.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_PATCH_H\n#define EIGEN_CXX11_TENSOR_TENSOR_PATCH_H\n\nnamespace Eigen {\n\n/** \\class TensorPatch\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief Tensor patch class.\n  *\n  *\n  */\nnamespace internal {\ntemplate<typename PatchDim, typename XprType>\nstruct traits<TensorPatchOp<PatchDim, XprType> > : public traits<XprType>\n{\n  typedef typename XprType::Scalar Scalar;\n  typedef traits<XprType> XprTraits;\n  typedef typename XprTraits::StorageKind StorageKind;\n  typedef typename XprTraits::Index Index;\n  typedef typename XprType::Nested Nested;\n  typedef typename remove_reference<Nested>::type _Nested;\n  static const int NumDimensions = XprTraits::NumDimensions + 1;\n  static const int Layout = XprTraits::Layout;\n  typedef typename XprTraits::PointerType PointerType;\n};\n\ntemplate<typename PatchDim, typename XprType>\nstruct eval<TensorPatchOp<PatchDim, XprType>, Eigen::Dense>\n{\n  typedef const TensorPatchOp<PatchDim, XprType>& type;\n};\n\ntemplate<typename PatchDim, typename XprType>\nstruct nested<TensorPatchOp<PatchDim, XprType>, 1, typename eval<TensorPatchOp<PatchDim, XprType> >::type>\n{\n  typedef TensorPatchOp<PatchDim, XprType> type;\n};\n\n}  // end namespace internal\n\n\n\ntemplate<typename PatchDim, typename XprType>\nclass TensorPatchOp : public TensorBase<TensorPatchOp<PatchDim, XprType>, ReadOnlyAccessors>\n{\n  public:\n  typedef typename Eigen::internal::traits<TensorPatchOp>::Scalar Scalar;\n  typedef typename Eigen::NumTraits<Scalar>::Real RealScalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename Eigen::internal::nested<TensorPatchOp>::type Nested;\n  typedef typename Eigen::internal::traits<TensorPatchOp>::StorageKind StorageKind;\n  typedef typename Eigen::internal::traits<TensorPatchOp>::Index Index;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorPatchOp(const XprType& expr, const PatchDim& patch_dims)\n      : m_xpr(expr), m_patch_dims(patch_dims) {}\n\n    EIGEN_DEVICE_FUNC\n    const PatchDim& patch_dims() const { return m_patch_dims; }\n\n    EIGEN_DEVICE_FUNC\n    const typename internal::remove_all<typename XprType::Nested>::type&\n    expression() const { return m_xpr; }\n\n  protected:\n    typename XprType::Nested m_xpr;\n    const PatchDim m_patch_dims;\n};\n\n\n// Eval as rvalue\ntemplate<typename PatchDim, typename ArgType, typename Device>\nstruct TensorEvaluator<const TensorPatchOp<PatchDim, ArgType>, Device>\n{\n  typedef TensorPatchOp<PatchDim, ArgType> XprType;\n  typedef typename XprType::Index Index;\n  static const int NumDims = internal::array_size<typename TensorEvaluator<ArgType, Device>::Dimensions>::value + 1;\n  typedef DSizes<Index, NumDims> Dimensions;\n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  static const int PacketSize = PacketType<CoeffReturnType, Device>::size;\n  typedef StorageMemory<CoeffReturnType, Device> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n\n\n  enum {\n    IsAligned = false,\n    PacketAccess = TensorEvaluator<ArgType, Device>::PacketAccess,\n    BlockAccess = false,\n    PreferBlockAccess = TensorEvaluator<ArgType, Device>::PreferBlockAccess,\n    Layout = TensorEvaluator<ArgType, Device>::Layout,\n    CoordAccess = false,\n    RawAccess = false\n };\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockNotImplemented TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)\n      : m_impl(op.expression(), device)\n  {\n    Index num_patches = 1;\n    const typename TensorEvaluator<ArgType, Device>::Dimensions& input_dims = m_impl.dimensions();\n    const PatchDim& patch_dims = op.patch_dims();\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      for (int i = 0; i < NumDims-1; ++i) {\n        m_dimensions[i] = patch_dims[i];\n        num_patches *= (input_dims[i] - patch_dims[i] + 1);\n      }\n      m_dimensions[NumDims-1] = num_patches;\n\n      m_inputStrides[0] = 1;\n      m_patchStrides[0] = 1;\n      for (int i = 1; i < NumDims-1; ++i) {\n        m_inputStrides[i] = m_inputStrides[i-1] * input_dims[i-1];\n        m_patchStrides[i] = m_patchStrides[i-1] * (input_dims[i-1] - patch_dims[i-1] + 1);\n      }\n      m_outputStrides[0] = 1;\n      for (int i = 1; i < NumDims; ++i) {\n        m_outputStrides[i] = m_outputStrides[i-1] * m_dimensions[i-1];\n      }\n    } else {\n      for (int i = 0; i < NumDims-1; ++i) {\n        m_dimensions[i+1] = patch_dims[i];\n        num_patches *= (input_dims[i] - patch_dims[i] + 1);\n      }\n      m_dimensions[0] = num_patches;\n\n      m_inputStrides[NumDims-2] = 1;\n      m_patchStrides[NumDims-2] = 1;\n      for (int i = NumDims-3; i >= 0; --i) {\n        m_inputStrides[i] = m_inputStrides[i+1] * input_dims[i+1];\n        m_patchStrides[i] = m_patchStrides[i+1] * (input_dims[i+1] - patch_dims[i+1] + 1);\n      }\n      m_outputStrides[NumDims-1] = 1;\n      for (int i = NumDims-2; i >= 0; --i) {\n        m_outputStrides[i] = m_outputStrides[i+1] * m_dimensions[i+1];\n      }\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions& dimensions() const { return m_dimensions; }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType /*data*/) {\n    m_impl.evalSubExprsIfNeeded(NULL);\n    return true;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {\n    m_impl.cleanup();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const\n  {\n    Index output_stride_index = (static_cast<int>(Layout) == static_cast<int>(ColMajor)) ? NumDims - 1 : 0;\n    // Find the location of the first element of the patch.\n    Index patchIndex = index / m_outputStrides[output_stride_index];\n    // Find the offset of the element wrt the location of the first element.\n    Index patchOffset = index - patchIndex * m_outputStrides[output_stride_index];\n    Index inputIndex = 0;\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      EIGEN_UNROLL_LOOP\n      for (int i = NumDims - 2; i > 0; --i) {\n        const Index patchIdx = patchIndex / m_patchStrides[i];\n        patchIndex -= patchIdx * m_patchStrides[i];\n        const Index offsetIdx = patchOffset / m_outputStrides[i];\n        patchOffset -= offsetIdx * m_outputStrides[i];\n        inputIndex += (patchIdx + offsetIdx) * m_inputStrides[i];\n      }\n    } else {\n      EIGEN_UNROLL_LOOP\n      for (int i = 0; i < NumDims - 2; ++i) {\n        const Index patchIdx = patchIndex / m_patchStrides[i];\n        patchIndex -= patchIdx * m_patchStrides[i];\n        const Index offsetIdx = patchOffset / m_outputStrides[i+1];\n        patchOffset -= offsetIdx * m_outputStrides[i+1];\n        inputIndex += (patchIdx + offsetIdx) * m_inputStrides[i];\n      }\n    }\n    inputIndex += (patchIndex + patchOffset);\n    return m_impl.coeff(inputIndex);\n  }\n\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const\n  {\n    EIGEN_STATIC_ASSERT((PacketSize > 1), YOU_MADE_A_PROGRAMMING_MISTAKE)\n    eigen_assert(index+PacketSize-1 < dimensions().TotalSize());\n\n    Index output_stride_index = (static_cast<int>(Layout) == static_cast<int>(ColMajor)) ? NumDims - 1 : 0;\n    Index indices[2] = {index, index + PacketSize - 1};\n    Index patchIndices[2] = {indices[0] / m_outputStrides[output_stride_index],\n                             indices[1] / m_outputStrides[output_stride_index]};\n    Index patchOffsets[2] = {indices[0] - patchIndices[0] * m_outputStrides[output_stride_index],\n                             indices[1] - patchIndices[1] * m_outputStrides[output_stride_index]};\n\n    Index inputIndices[2] = {0, 0};\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      EIGEN_UNROLL_LOOP\n      for (int i = NumDims - 2; i > 0; --i) {\n        const Index patchIdx[2] = {patchIndices[0] / m_patchStrides[i],\n                                   patchIndices[1] / m_patchStrides[i]};\n        patchIndices[0] -= patchIdx[0] * m_patchStrides[i];\n        patchIndices[1] -= patchIdx[1] * m_patchStrides[i];\n\n        const Index offsetIdx[2] = {patchOffsets[0] / m_outputStrides[i],\n                                    patchOffsets[1] / m_outputStrides[i]};\n        patchOffsets[0] -= offsetIdx[0] * m_outputStrides[i];\n        patchOffsets[1] -= offsetIdx[1] * m_outputStrides[i];\n\n        inputIndices[0] += (patchIdx[0] + offsetIdx[0]) * m_inputStrides[i];\n        inputIndices[1] += (patchIdx[1] + offsetIdx[1]) * m_inputStrides[i];\n      }\n    } else {\n      EIGEN_UNROLL_LOOP\n      for (int i = 0; i < NumDims - 2; ++i) {\n        const Index patchIdx[2] = {patchIndices[0] / m_patchStrides[i],\n                                   patchIndices[1] / m_patchStrides[i]};\n        patchIndices[0] -= patchIdx[0] * m_patchStrides[i];\n        patchIndices[1] -= patchIdx[1] * m_patchStrides[i];\n\n        const Index offsetIdx[2] = {patchOffsets[0] / m_outputStrides[i+1],\n                                    patchOffsets[1] / m_outputStrides[i+1]};\n        patchOffsets[0] -= offsetIdx[0] * m_outputStrides[i+1];\n        patchOffsets[1] -= offsetIdx[1] * m_outputStrides[i+1];\n\n        inputIndices[0] += (patchIdx[0] + offsetIdx[0]) * m_inputStrides[i];\n        inputIndices[1] += (patchIdx[1] + offsetIdx[1]) * m_inputStrides[i];\n      }\n    }\n    inputIndices[0] += (patchIndices[0] + patchOffsets[0]);\n    inputIndices[1] += (patchIndices[1] + patchOffsets[1]);\n\n    if (inputIndices[1] - inputIndices[0] == PacketSize - 1) {\n      PacketReturnType rslt = m_impl.template packet<Unaligned>(inputIndices[0]);\n      return rslt;\n    }\n    else {\n      EIGEN_ALIGN_MAX CoeffReturnType values[PacketSize];\n      values[0] = m_impl.coeff(inputIndices[0]);\n      values[PacketSize-1] = m_impl.coeff(inputIndices[1]);\n      EIGEN_UNROLL_LOOP\n      for (int i = 1; i < PacketSize-1; ++i) {\n        values[i] = coeff(index+i);\n      }\n      PacketReturnType rslt = internal::pload<PacketReturnType>(values);\n      return rslt;\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool vectorized) const {\n    const double compute_cost = NumDims * (TensorOpCost::DivCost<Index>() +\n                                           TensorOpCost::MulCost<Index>() +\n                                           2 * TensorOpCost::AddCost<Index>());\n    return m_impl.costPerCoeff(vectorized) +\n           TensorOpCost(0, 0, compute_cost, vectorized, PacketSize);\n  }\n\n  EIGEN_DEVICE_FUNC EvaluatorPointerType data() const { return NULL; }\n\n#ifdef EIGEN_USE_SYCL\n  // binding placeholder accessors to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {\n    m_impl.bind(cgh); \n  }\n#endif\n\n protected:\n  Dimensions m_dimensions;\n  array<Index, NumDims> m_outputStrides;\n  array<Index, NumDims-1> m_inputStrides;\n  array<Index, NumDims-1> m_patchStrides;\n\n  TensorEvaluator<ArgType, Device> m_impl;\n\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_PATCH_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Benoit Steiner <benoit.steiner.goog@gmail.com>\n// Copyright (C) 2018 Mehdi Goli <eigen@codeplay.com> Codeplay Software Ltd.\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_RANDOM_H\n#define EIGEN_CXX11_TENSOR_TENSOR_RANDOM_H\n\nnamespace Eigen {\nnamespace internal {\n\nnamespace {\n\nEIGEN_DEVICE_FUNC uint64_t get_random_seed() {\n#if defined(EIGEN_GPU_COMPILE_PHASE)\n  // We don't support 3d kernels since we currently only use 1 and\n  // 2d kernels.\n  gpu_assert(threadIdx.z == 0);\n  return clock64() +\n      blockIdx.x * blockDim.x + threadIdx.x +\n      gridDim.x * blockDim.x * (blockIdx.y * blockDim.y + threadIdx.y);\n\n#elif defined _WIN32\n  // Use the current time as a baseline.\n  SYSTEMTIME st;\n  GetSystemTime(&st);\n  int time = st.wSecond + 1000 * st.wMilliseconds;\n  // Mix in a random number to make sure that we get different seeds if\n  // we try to generate seeds faster than the clock resolution.\n  // We need 2 random values since the generator only generate 16 bits at\n  // a time (https://msdn.microsoft.com/en-us/library/398ax69y.aspx)\n  int rnd1 = ::rand();\n  int rnd2 = ::rand();\n  uint64_t rnd = (rnd1 | rnd2 << 16) ^ time;\n  return rnd;\n\n#elif defined __APPLE__\n  // Same approach as for win32, except that the random number generator\n  // is better (// https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man3/random.3.html#//apple_ref/doc/man/3/random).\n  uint64_t rnd = ::random() ^ mach_absolute_time();\n  return rnd;\n\n#elif defined __native_client__\n  // Same approach as for win32, except using clock_gettime\n  timespec ts;\n  clock_gettime(CLOCK_REALTIME, &ts);\n  int rnd1 = ::rand();\n  int rnd2 = ::rand();\n  uint64_t rnd = (rnd1 | rnd2 << 16) ^ ts.tv_nsec;\n  return rnd;\n\n#else\n  // Augment the current time with pseudo random number generation\n  // to ensure that we get different seeds if we try to generate seeds\n  // faster than the clock resolution.\n  timespec ts;\n  clock_gettime(CLOCK_REALTIME, &ts);\n  uint64_t rnd = ::random() ^ ts.tv_nsec;\n  return rnd;\n#endif\n}\n\nstatic EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE unsigned PCG_XSH_RS_generator(uint64_t* state, uint64_t stream) {\n  // TODO: Unify with the implementation in the non blocking thread pool.\n  uint64_t current = *state;\n  // Update the internal state\n  *state = current * 6364136223846793005ULL + (stream << 1 | 1);\n  // Generate the random output (using the PCG-XSH-RS scheme)\n  return static_cast<unsigned>((current ^ (current >> 22)) >> (22 + (current >> 61)));\n}\n\nstatic EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE uint64_t PCG_XSH_RS_state(uint64_t seed) {\n  seed = seed ? seed : get_random_seed();\n  return seed * 6364136223846793005ULL + 0xda3e39cb94b95bdbULL;\n}\n\n}  // namespace\n\n\ntemplate <typename T> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nT RandomToTypeUniform(uint64_t* state, uint64_t stream) {\n  unsigned rnd = PCG_XSH_RS_generator(state, stream);\n  return static_cast<T>(rnd);\n}\n\n\ntemplate <> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nEigen::half RandomToTypeUniform<Eigen::half>(uint64_t* state, uint64_t stream) {\n  Eigen::half result;\n  // Generate 10 random bits for the mantissa\n  unsigned rnd = PCG_XSH_RS_generator(state, stream);\n  result.x = static_cast<uint16_t>(rnd & 0x3ffu);\n  // Set the exponent\n  result.x |= (static_cast<uint16_t>(15) << 10);\n  // Return the final result\n  return result - Eigen::half(1.0f);\n}\n\n\ntemplate <> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nfloat RandomToTypeUniform<float>(uint64_t* state, uint64_t stream) {\n  typedef union {\n    uint32_t raw;\n    float fp;\n  } internal;\n  internal result;\n  // Generate 23 random bits for the mantissa mantissa\n  const unsigned rnd = PCG_XSH_RS_generator(state, stream);\n  result.raw = rnd & 0x7fffffu;\n  // Set the exponent\n  result.raw |= (static_cast<uint32_t>(127) << 23);\n  // Return the final result\n  return result.fp - 1.0f;\n}\n\ntemplate <> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ndouble RandomToTypeUniform<double>(uint64_t* state, uint64_t stream) {\n  typedef union {\n    uint64_t raw;\n    double dp;\n  } internal;\n  internal result;\n  result.raw = 0;\n  // Generate 52 random bits for the mantissa\n  // First generate the upper 20 bits\n  unsigned rnd1 = PCG_XSH_RS_generator(state, stream) & 0xfffffu;\n  // The generate the lower 32 bits\n  unsigned rnd2 = PCG_XSH_RS_generator(state, stream);\n  result.raw = (static_cast<uint64_t>(rnd1) << 32) | rnd2;\n  // Set the exponent\n  result.raw |= (static_cast<uint64_t>(1023) << 52);\n  // Return the final result\n  return result.dp - 1.0;\n}\n\ntemplate <> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nstd::complex<float> RandomToTypeUniform<std::complex<float> >(uint64_t* state, uint64_t stream) {\n  return std::complex<float>(RandomToTypeUniform<float>(state, stream),\n                             RandomToTypeUniform<float>(state, stream));\n}\ntemplate <> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nstd::complex<double> RandomToTypeUniform<std::complex<double> >(uint64_t* state, uint64_t stream) {\n  return std::complex<double>(RandomToTypeUniform<double>(state, stream),\n                              RandomToTypeUniform<double>(state, stream));\n}\n\ntemplate <typename T> class UniformRandomGenerator {\n public:\n  static const bool PacketAccess = true;\n\n  // Uses the given \"seed\" if non-zero, otherwise uses a random seed.\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE UniformRandomGenerator(\n      uint64_t seed = 0) {\n    m_state = PCG_XSH_RS_state(seed);\n    #ifdef EIGEN_USE_SYCL\n    // In SYCL it is not possible to build PCG_XSH_RS_state in one step. \n    // Therefor, we need two step to initializate the m_state.\n    // IN SYCL, the constructor of the functor is s called on the CPU\n    // and we get the clock seed here from the CPU. However, This seed is \n    //the same for all the thread. As unlike CUDA, the thread.ID, BlockID, etc is not a global function.\n    // and only  available on the Operator() function (which is called on the GPU).\n    // Thus for CUDA (((CLOCK  + global_thread_id)* 6364136223846793005ULL) + 0xda3e39cb94b95bdbULL) is passed to each thread \n    // but for SYCL ((CLOCK * 6364136223846793005ULL) + 0xda3e39cb94b95bdbULL) is passed to each thread and each thread adds  \n    // the  (global_thread_id* 6364136223846793005ULL) for itself only once, in order to complete the construction \n    // similar to CUDA Therefore, the thread Id injection is not available at this stage. \n    //However when the operator() is called the thread ID will be avilable. So inside the opeator, \n    // we add the thrreadID, BlockId,... (which is equivalent of i) \n    //to the seed and construct the unique m_state per thead similar to cuda.  \n    m_exec_once =false;\n   #endif\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE UniformRandomGenerator(\n      const UniformRandomGenerator& other) {\n    m_state = other.m_state;\n    #ifdef EIGEN_USE_SYCL\n     m_exec_once =other.m_exec_once;\n    #endif\n  }\n\n  template<typename Index> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  T operator()(Index i) const {\n    #ifdef EIGEN_USE_SYCL\n      if(!m_exec_once) {\n      // This is the second stage of adding thread Id to the CPU clock seed and build unique seed per thread\n      // The (i * 6364136223846793005ULL) is the remaining part of the PCG_XSH_RS_state on the GPU side\n       m_state += (i * 6364136223846793005ULL);\n       m_exec_once =true;\n      }\n    #endif\n    T result = RandomToTypeUniform<T>(&m_state, i);\n    return result;\n  }\n\n  template<typename Packet, typename Index> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  Packet packetOp(Index i) const {\n    const int packetSize = internal::unpacket_traits<Packet>::size;\n    EIGEN_ALIGN_MAX T values[packetSize];\n      #ifdef EIGEN_USE_SYCL\n      if(!m_exec_once) {\n      // This is the second stage of adding thread Id to the CPU clock seed and build unique seed per thread\n       m_state += (i * 6364136223846793005ULL);\n       m_exec_once =true;\n      }\n    #endif\n    EIGEN_UNROLL_LOOP\n    for (int j = 0; j < packetSize; ++j) {\n      values[j] = RandomToTypeUniform<T>(&m_state, i);\n    }\n    return internal::pload<Packet>(values);\n  }\n\n private:\n  mutable uint64_t m_state;\n  #ifdef EIGEN_USE_SYCL\n  mutable bool m_exec_once;\n  #endif\n};\n\ntemplate <typename Scalar>\nstruct functor_traits<UniformRandomGenerator<Scalar> > {\n  enum {\n    // Rough estimate for floating point, multiplied by ceil(sizeof(T) / sizeof(float)).\n    Cost = 12 * NumTraits<Scalar>::AddCost *\n           ((sizeof(Scalar) + sizeof(float) - 1) / sizeof(float)),\n    PacketAccess = UniformRandomGenerator<Scalar>::PacketAccess\n  };\n};\n\n\n\ntemplate <typename T> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nT RandomToTypeNormal(uint64_t* state, uint64_t stream) {\n  // Use the ratio of uniform method to generate numbers following a normal\n  // distribution. See for example Numerical Recipes chapter 7.3.9 for the\n  // details.\n  T u, v, q;\n  do {\n    u = RandomToTypeUniform<T>(state, stream);\n    v = T(1.7156) * (RandomToTypeUniform<T>(state, stream) - T(0.5));\n    const T x = u - T(0.449871);\n    const T y = numext::abs(v) + T(0.386595);\n    q = x*x + y * (T(0.196)*y - T(0.25472)*x);\n  } while (q > T(0.27597) &&\n           (q > T(0.27846) || v*v > T(-4) * numext::log(u) * u*u));\n\n  return v/u;\n}\n\ntemplate <> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nstd::complex<float> RandomToTypeNormal<std::complex<float> >(uint64_t* state, uint64_t stream) {\n  return std::complex<float>(RandomToTypeNormal<float>(state, stream),\n                             RandomToTypeNormal<float>(state, stream));\n}\ntemplate <> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nstd::complex<double> RandomToTypeNormal<std::complex<double> >(uint64_t* state, uint64_t stream) {\n  return std::complex<double>(RandomToTypeNormal<double>(state, stream),\n                              RandomToTypeNormal<double>(state, stream));\n}\n\n\ntemplate <typename T> class NormalRandomGenerator {\n public:\n  static const bool PacketAccess = true;\n\n  // Uses the given \"seed\" if non-zero, otherwise uses a random seed.\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE NormalRandomGenerator(uint64_t seed = 0) {\n    m_state = PCG_XSH_RS_state(seed);\n    #ifdef EIGEN_USE_SYCL\n    // In SYCL it is not possible to build PCG_XSH_RS_state in one step. \n    // Therefor, we need two steps to initializate the m_state.\n    // IN SYCL, the constructor of the functor is s called on the CPU\n    // and we get the clock seed here from the CPU. However, This seed is \n    //the same for all the thread. As unlike CUDA, the thread.ID, BlockID, etc is not a global function.\n    // and only  available on the Operator() function (which is called on the GPU).\n    // Therefore, the thread Id injection is not available at this stage. However when the operator() \n    //is called the thread ID will be avilable. So inside the opeator, \n    // we add the thrreadID, BlockId,... (which is equivalent of i) \n    //to the seed and construct the unique m_state per thead similar to cuda.  \n    m_exec_once =false;\n   #endif\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE NormalRandomGenerator(\n      const NormalRandomGenerator& other) {\n    m_state = other.m_state;\n#ifdef EIGEN_USE_SYCL\n    m_exec_once=other.m_exec_once;\n#endif\n  }\n\n template<typename Index> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  T operator()(Index i) const {\n    #ifdef EIGEN_USE_SYCL\n    if(!m_exec_once) {\n      // This is the second stage of adding thread Id to the CPU clock seed and build unique seed per thread\n      m_state += (i * 6364136223846793005ULL);\n      m_exec_once =true;\n    }\n    #endif\n    T result = RandomToTypeNormal<T>(&m_state, i);\n    return result;\n  }\n\n  template<typename Packet, typename Index> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  Packet packetOp(Index i) const {\n    const int packetSize = internal::unpacket_traits<Packet>::size;\n    EIGEN_ALIGN_MAX T values[packetSize];\n    #ifdef EIGEN_USE_SYCL\n    if(!m_exec_once) {\n      // This is the second stage of adding thread Id to the CPU clock seed and build unique seed per thread\n      m_state += (i * 6364136223846793005ULL);\n      m_exec_once =true;\n    }\n    #endif\n    EIGEN_UNROLL_LOOP\n    for (int j = 0; j < packetSize; ++j) {\n      values[j] = RandomToTypeNormal<T>(&m_state, i);\n    }\n    return internal::pload<Packet>(values);\n  }\n\n private:\n  mutable uint64_t m_state;\n   #ifdef EIGEN_USE_SYCL\n  mutable bool m_exec_once;\n  #endif\n};\n\n\ntemplate <typename Scalar>\nstruct functor_traits<NormalRandomGenerator<Scalar> > {\n  enum {\n    // On average, we need to generate about 3 random numbers\n    // 15 mul, 8 add, 1.5 logs\n    Cost = 3 * functor_traits<UniformRandomGenerator<Scalar> >::Cost +\n           15 * NumTraits<Scalar>::AddCost + 8 * NumTraits<Scalar>::AddCost +\n           3 * functor_traits<scalar_log_op<Scalar> >::Cost / 2,\n    PacketAccess = NormalRandomGenerator<Scalar>::PacketAccess\n  };\n};\n\n\n} // end namespace internal\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_RANDOM_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n// Copyright (C) 2016 Mehdi Goli, Codeplay Software Ltd <eigen@codeplay.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_REDUCTION_H\n#define EIGEN_CXX11_TENSOR_TENSOR_REDUCTION_H\n\n// clang is incompatible with the CUDA syntax wrt making a kernel a class friend,\n// so we'll use a macro to make clang happy.\n#ifndef KERNEL_FRIEND\n#if defined(__clang__) && (defined(__CUDA__) || defined(__HIP__))\n#define KERNEL_FRIEND friend __global__\n#else\n#define KERNEL_FRIEND friend\n#endif\n#endif\n\n\nnamespace Eigen {\n\n\n/** \\class TensorReduction\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief Tensor reduction class.\n  *\n  */\n\nnamespace internal {\n  template<typename Op, typename Dims, typename XprType,template <class> class MakePointer_ >\n  struct traits<TensorReductionOp<Op, Dims, XprType, MakePointer_> >\n : traits<XprType>\n{\n  typedef traits<XprType> XprTraits;\n  typedef typename XprTraits::Scalar Scalar;\n  typedef typename XprTraits::StorageKind StorageKind;\n  typedef typename XprTraits::Index Index;\n  typedef typename XprType::Nested Nested;\n  static const int NumDimensions = XprTraits::NumDimensions - array_size<Dims>::value;\n  static const int Layout = XprTraits::Layout;\n  typedef typename XprTraits::PointerType PointerType;\n\n  template <class T> struct MakePointer {\n    // Intermediate typedef to workaround MSVC issue.\n    typedef MakePointer_<T> MakePointerT;\n    typedef typename MakePointerT::Type Type;\n  };\n};\n\ntemplate<typename Op, typename Dims, typename XprType, template <class> class MakePointer_>\nstruct eval<TensorReductionOp<Op, Dims, XprType, MakePointer_>, Eigen::Dense>\n{\n  typedef const TensorReductionOp<Op, Dims, XprType, MakePointer_>& type;\n};\n\ntemplate<typename Op, typename Dims, typename XprType, template <class> class MakePointer_>\nstruct nested<TensorReductionOp<Op, Dims, XprType, MakePointer_>, 1, typename eval<TensorReductionOp<Op, Dims, XprType, MakePointer_> >::type>\n{\n  typedef TensorReductionOp<Op, Dims, XprType, MakePointer_> type;\n};\n\n\ntemplate <typename OutputDims> struct DimInitializer {\n  template <typename InputDims, typename ReducedDims> EIGEN_DEVICE_FUNC\n  static void run(const InputDims& input_dims,\n                  const array<bool, internal::array_size<InputDims>::value>& reduced,\n                  OutputDims* output_dims, ReducedDims* reduced_dims) {\n    const int NumInputDims = internal::array_size<InputDims>::value;\n    int outputIndex = 0;\n    int reduceIndex = 0;\n    for (int i = 0; i < NumInputDims; ++i) {\n      if (reduced[i]) {\n        (*reduced_dims)[reduceIndex] = input_dims[i];\n        ++reduceIndex;\n      } else {\n        (*output_dims)[outputIndex] = input_dims[i];\n        ++outputIndex;\n      }\n    }\n  }\n};\n\ntemplate <> struct DimInitializer<Sizes<> > {\n  template <typename InputDims, typename Index, size_t Rank> EIGEN_DEVICE_FUNC\n  static void run(const InputDims& input_dims, const array<bool, Rank>&,\n                  Sizes<>*, array<Index, Rank>* reduced_dims) {\n    const int NumInputDims = internal::array_size<InputDims>::value;\n    for (int i = 0; i < NumInputDims; ++i) {\n      (*reduced_dims)[i] = input_dims[i];\n    }\n  }\n};\n\n\ntemplate <typename ReducedDims, int NumTensorDims, int Layout>\nstruct are_inner_most_dims {\n  static const bool value = false;\n};\ntemplate <typename ReducedDims, int NumTensorDims, int Layout>\nstruct preserve_inner_most_dims {\n  static const bool value = false;\n};\n\n#if EIGEN_HAS_CONSTEXPR && EIGEN_HAS_VARIADIC_TEMPLATES\ntemplate <typename ReducedDims, int NumTensorDims>\nstruct are_inner_most_dims<ReducedDims, NumTensorDims, ColMajor>{\n  static const bool tmp1 = indices_statically_known_to_increase<ReducedDims>();\n  static const bool tmp2 = index_statically_eq<ReducedDims>(0, 0);\n  static const bool tmp3 = index_statically_eq<ReducedDims>(array_size<ReducedDims>::value-1, array_size<ReducedDims>::value-1);\n  static const bool value = tmp1 & tmp2 & tmp3;\n};\ntemplate <typename ReducedDims, int NumTensorDims>\nstruct are_inner_most_dims<ReducedDims, NumTensorDims, RowMajor>{\n  static const bool tmp1 = indices_statically_known_to_increase<ReducedDims>();\n  static const bool tmp2 = index_statically_eq<ReducedDims>(0, NumTensorDims - array_size<ReducedDims>::value);\n  static const bool tmp3 = index_statically_eq<ReducedDims>(array_size<ReducedDims>::value - 1, NumTensorDims - 1);\n  static const bool value = tmp1 & tmp2 & tmp3;\n\n};\ntemplate <typename ReducedDims, int NumTensorDims>\nstruct preserve_inner_most_dims<ReducedDims, NumTensorDims, ColMajor>{\n  static const bool tmp1 = indices_statically_known_to_increase<ReducedDims>();\n  static const bool tmp2 = index_statically_gt<ReducedDims>(0, 0);\n  static const bool value = tmp1 & tmp2;\n\n};\ntemplate <typename ReducedDims, int NumTensorDims>\nstruct preserve_inner_most_dims<ReducedDims, NumTensorDims, RowMajor>{\n  static const bool tmp1 = indices_statically_known_to_increase<ReducedDims>();\n  static const bool tmp2 = index_statically_lt<ReducedDims>(array_size<ReducedDims>::value - 1, NumTensorDims - 1);\n  static const bool value = tmp1 & tmp2;\n};\n#endif\n\n\ntemplate <int DimIndex, typename Self, typename Op>\nstruct GenericDimReducer {\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void reduce(const Self& self, typename Self::Index firstIndex, Op& reducer, typename Self::CoeffReturnType* accum) {\n    EIGEN_STATIC_ASSERT((DimIndex > 0), YOU_MADE_A_PROGRAMMING_MISTAKE);\n    for (int j = 0; j < self.m_reducedDims[DimIndex]; ++j) {\n      const typename Self::Index input = firstIndex + j * self.m_reducedStrides[DimIndex];\n      GenericDimReducer<DimIndex-1, Self, Op>::reduce(self, input, reducer, accum);\n    }\n  }\n};\ntemplate <typename Self, typename Op>\nstruct GenericDimReducer<0, Self, Op> {\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void reduce(const Self& self, typename Self::Index firstIndex, Op& reducer, typename Self::CoeffReturnType* accum) {\n    for (int j = 0; j < self.m_reducedDims[0]; ++j) {\n      const typename Self::Index input = firstIndex + j * self.m_reducedStrides[0];\n      reducer.reduce(self.m_impl.coeff(input), accum);\n    }\n  }\n};\ntemplate <typename Self, typename Op>\nstruct GenericDimReducer<-1, Self, Op> {\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void reduce(const Self& self, typename Self::Index index, Op& reducer, typename Self::CoeffReturnType* accum) {\n    reducer.reduce(self.m_impl.coeff(index), accum);\n  }\n};\n\ntemplate <typename Self, typename Op, bool Vectorizable = (Self::InputPacketAccess && Self::ReducerTraits::PacketAccess),\n          bool UseTreeReduction = (!Self::ReducerTraits::IsStateful &&\n                                   !Self::ReducerTraits::IsExactlyAssociative)>\nstruct InnerMostDimReducer {\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename Self::CoeffReturnType reduce(const Self& self, typename Self::Index firstIndex, typename Self::Index numValuesToReduce, Op& reducer) {\n    typename Self::CoeffReturnType accum = reducer.initialize();\n    for (typename Self::Index j = 0; j < numValuesToReduce; ++j) {\n      reducer.reduce(self.m_impl.coeff(firstIndex + j), &accum);\n    }\n    return reducer.finalize(accum);\n  }\n};\n\ntemplate <typename Self, typename Op>\nstruct InnerMostDimReducer<Self, Op, true, false> {\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename Self::CoeffReturnType reduce(const Self& self, typename Self::Index firstIndex, typename Self::Index numValuesToReduce, Op& reducer) {\n    const typename Self::Index packetSize = internal::unpacket_traits<typename Self::PacketReturnType>::size;\n    const typename Self::Index VectorizedSize = (numValuesToReduce / packetSize) * packetSize;\n    typename Self::PacketReturnType paccum = reducer.template initializePacket<typename Self::PacketReturnType>();\n    for (typename Self::Index j = 0; j < VectorizedSize; j += packetSize) {\n      reducer.reducePacket(self.m_impl.template packet<Unaligned>(firstIndex + j), &paccum);\n    }\n    typename Self::CoeffReturnType accum = reducer.initialize();\n    for (typename Self::Index j = VectorizedSize; j < numValuesToReduce; ++j) {\n      reducer.reduce(self.m_impl.coeff(firstIndex + j), &accum);\n    }\n    return reducer.finalizeBoth(accum, paccum);\n  }\n};\n\n#if !defined(EIGEN_HIPCC) \nstatic const int kLeafSize = 1024;\n\ntemplate <typename Self, typename Op>\nstruct InnerMostDimReducer<Self, Op, false, true> {\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename Self::CoeffReturnType\n  reduce(const Self& self, typename Self::Index firstIndex,\n         typename Self::Index numValuesToReduce, Op& reducer) {\n    typename Self::CoeffReturnType accum = reducer.initialize();\n    if (numValuesToReduce > kLeafSize) {\n      const typename Self::Index half = numValuesToReduce / 2;\n      reducer.reduce(reduce(self, firstIndex, half, reducer), &accum);\n      reducer.reduce(\n          reduce(self, firstIndex + half, numValuesToReduce - half, reducer),\n          &accum);\n    } else {\n      for (typename Self::Index j = 0; j < numValuesToReduce; ++j) {\n        reducer.reduce(self.m_impl.coeff(firstIndex + j), &accum);\n      }\n    }\n    return reducer.finalize(accum);\n  }\n};\n\ntemplate <typename Self, typename Op>\nstruct InnerMostDimReducer<Self, Op, true, true> {\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename Self::CoeffReturnType\n  reduce(const Self& self, typename Self::Index firstIndex,\n         typename Self::Index numValuesToReduce, Op& reducer) {\n    const typename Self::Index packetSize =\n        internal::unpacket_traits<typename Self::PacketReturnType>::size;\n    typename Self::CoeffReturnType accum = reducer.initialize();\n    if (numValuesToReduce > packetSize * kLeafSize) {\n      // Make sure the split point is aligned on a packet boundary.\n      const typename Self::Index split =\n          packetSize *\n          divup(firstIndex + divup(numValuesToReduce, typename Self::Index(2)),\n                packetSize);\n      const typename Self::Index num_left =\n          numext::mini(split - firstIndex, numValuesToReduce);\n      reducer.reduce(reduce(self, firstIndex, num_left, reducer), &accum);\n      if (num_left < numValuesToReduce) {\n        reducer.reduce(\n            reduce(self, split, numValuesToReduce - num_left, reducer), &accum);\n      }\n      return reducer.finalize(accum);\n    } else {\n      const typename Self::Index VectorizedSize =\n          (numValuesToReduce / packetSize) * packetSize;\n      typename Self::PacketReturnType paccum =\n          reducer.template initializePacket<typename Self::PacketReturnType>();\n      for (typename Self::Index j = 0; j < VectorizedSize; j += packetSize) {\n        reducer.reducePacket(\n            self.m_impl.template packet<Unaligned>(firstIndex + j), &paccum);\n      }\n      for (typename Self::Index j = VectorizedSize; j < numValuesToReduce;\n           ++j) {\n        reducer.reduce(self.m_impl.coeff(firstIndex + j), &accum);\n      }\n      return reducer.finalizeBoth(accum, paccum);\n    }\n  }\n};\n#endif\n \ntemplate <int DimIndex, typename Self, typename Op, bool vectorizable = (Self::InputPacketAccess && Self::ReducerTraits::PacketAccess)>\nstruct InnerMostDimPreserver {\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void reduce(const Self&, typename Self::Index, Op&, typename Self::PacketReturnType*) {\n    eigen_assert(false && \"should never be called\");\n  }\n};\n\ntemplate <int DimIndex, typename Self, typename Op>\nstruct InnerMostDimPreserver<DimIndex, Self, Op, true> {\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void reduce(const Self& self, typename Self::Index firstIndex, Op& reducer, typename Self::PacketReturnType* accum) {\n    EIGEN_STATIC_ASSERT((DimIndex > 0), YOU_MADE_A_PROGRAMMING_MISTAKE);\n    for (typename Self::Index j = 0; j < self.m_reducedDims[DimIndex]; ++j) {\n      const typename Self::Index input = firstIndex + j * self.m_reducedStrides[DimIndex];\n      InnerMostDimPreserver<DimIndex-1, Self, Op>::reduce(self, input, reducer, accum);\n    }\n  }\n};\n\ntemplate <typename Self, typename Op>\nstruct InnerMostDimPreserver<0, Self, Op, true> {\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void reduce(const Self& self, typename Self::Index firstIndex, Op& reducer, typename Self::PacketReturnType* accum) {\n    for (typename Self::Index j = 0; j < self.m_reducedDims[0]; ++j) {\n      const typename Self::Index input = firstIndex + j * self.m_reducedStrides[0];\n      reducer.reducePacket(self.m_impl.template packet<Unaligned>(input), accum);\n    }\n  }\n};\ntemplate <typename Self, typename Op>\nstruct InnerMostDimPreserver<-1, Self, Op, true> {\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void reduce(const Self&, typename Self::Index, Op&, typename Self::PacketReturnType*) {\n    eigen_assert(false && \"should never be called\");\n  }\n};\n\n// Default full reducer\ntemplate <typename Self, typename Op, typename Device, bool Vectorizable = (Self::InputPacketAccess && Self::ReducerTraits::PacketAccess)>\nstruct FullReducer {\n  static const bool HasOptimizedImplementation = false;\n\n  static EIGEN_DEVICE_FUNC void run(const Self& self, Op& reducer, const Device&, typename Self::EvaluatorPointerType output) {\n    const typename Self::Index num_coeffs = array_prod(self.m_impl.dimensions());\n    *output = InnerMostDimReducer<Self, Op, Vectorizable>::reduce(self, 0, num_coeffs, reducer);\n  }\n};\n\n\n#ifdef EIGEN_USE_THREADS\n// Multithreaded full reducers\ntemplate <typename Self, typename Op,\n          bool Vectorizable = (Self::InputPacketAccess && Self::ReducerTraits::PacketAccess)>\nstruct FullReducerShard {\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(const Self& self, typename Self::Index firstIndex,\n                  typename Self::Index numValuesToReduce, Op& reducer,\n                  typename Self::CoeffReturnType* output) {\n    *output = InnerMostDimReducer<Self, Op, Vectorizable>::reduce(\n        self, firstIndex, numValuesToReduce, reducer);\n  }\n};\n\n// Multithreaded full reducer\ntemplate <typename Self, typename Op, bool Vectorizable>\nstruct FullReducer<Self, Op, ThreadPoolDevice, Vectorizable> {\n  static const bool HasOptimizedImplementation = !Self::ReducerTraits::IsStateful;\n  static const Index PacketSize =\n      unpacket_traits<typename Self::PacketReturnType>::size;\n\n  // launch one reducer per thread and accumulate the result.\n  static void run(const Self& self, Op& reducer, const ThreadPoolDevice& device,\n                  typename Self::CoeffReturnType* output) {\n    typedef typename Self::Index Index;\n    const Index num_coeffs = array_prod(self.m_impl.dimensions());\n    if (num_coeffs == 0) {\n      *output = reducer.finalize(reducer.initialize());\n      return;\n    }\n    const TensorOpCost cost =\n        self.m_impl.costPerCoeff(Vectorizable) +\n        TensorOpCost(0, 0, internal::functor_traits<Op>::Cost, Vectorizable,\n                     PacketSize);\n    const int num_threads = TensorCostModel<ThreadPoolDevice>::numThreads(\n        num_coeffs, cost, device.numThreads());\n    if (num_threads == 1) {\n      *output =\n          InnerMostDimReducer<Self, Op, Vectorizable>::reduce(self, 0, num_coeffs, reducer);\n      return;\n    }\n    const Index blocksize =\n        std::floor<Index>(static_cast<float>(num_coeffs) / num_threads);\n    const Index numblocks = blocksize > 0 ? num_coeffs / blocksize : 0;\n    eigen_assert(num_coeffs >= numblocks * blocksize);\n\n    Barrier barrier(internal::convert_index<unsigned int>(numblocks));\n    MaxSizeVector<typename Self::CoeffReturnType> shards(numblocks, reducer.initialize());\n    for (Index i = 0; i < numblocks; ++i) {\n      device.enqueue_with_barrier(&barrier, &FullReducerShard<Self, Op, Vectorizable>::run,\n                                  self, i * blocksize, blocksize, reducer,\n                                  &shards[i]);\n    }\n    typename Self::CoeffReturnType finalShard;\n    if (numblocks * blocksize < num_coeffs) {\n      finalShard = InnerMostDimReducer<Self, Op, Vectorizable>::reduce(\n          self, numblocks * blocksize, num_coeffs - numblocks * blocksize,\n          reducer);\n    } else {\n      finalShard = reducer.initialize();\n    }\n    barrier.Wait();\n\n    for (Index i = 0; i < numblocks; ++i) {\n      reducer.reduce(shards[i], &finalShard);\n    }\n    *output = reducer.finalize(finalShard);\n  }\n};\n\n#endif\n\n\n// Default inner reducer\ntemplate <typename Self, typename Op, typename Device>\nstruct InnerReducer {\n  static const bool HasOptimizedImplementation = false;\n\n  EIGEN_DEVICE_FUNC static bool run(const Self&, Op&, const Device&, typename Self::CoeffReturnType*, typename Self::Index, typename Self::Index) {\n    eigen_assert(false && \"Not implemented\");\n    return true;\n  }\n};\n\n// Default outer reducer\ntemplate <typename Self, typename Op, typename Device>\nstruct OuterReducer {\n  static const bool HasOptimizedImplementation = false;\n\n  EIGEN_DEVICE_FUNC static bool run(const Self&, Op&, const Device&, typename Self::CoeffReturnType*, typename Self::Index, typename Self::Index) {\n    eigen_assert(false && \"Not implemented\");\n    return true;\n  }\n};\n\n#ifdef EIGEN_USE_SYCL\n// Default Generic reducer\ntemplate <typename Self, typename Op, typename Device>\nstruct GenericReducer {\n  static const bool HasOptimizedImplementation = false;\n\n  EIGEN_DEVICE_FUNC static bool run(const Self&, Op&, const Device&, typename Self::CoeffReturnType*, typename Self::Index, typename Self::Index) {\n    eigen_assert(false && \"Not implemented\");\n    return true;\n  }\n};\n#endif\n\n#if defined(EIGEN_USE_GPU) && (defined(EIGEN_GPUCC))\ntemplate <int B, int N, typename S, typename R, typename I_>\n__global__ void FullReductionKernel(R, const S, I_, typename S::CoeffReturnType*, unsigned int*);\n\n\n#if defined(EIGEN_HAS_GPU_FP16)\ntemplate <typename S, typename R, typename I_>\n__global__ void ReductionInitFullReduxKernelHalfFloat(R, const S, I_, internal::packet_traits<half>::type*);\ntemplate <int B, int N, typename S, typename R, typename I_>\n__global__ void FullReductionKernelHalfFloat(R, const S, I_, half*, internal::packet_traits<half>::type*);\ntemplate <int NPT, typename S, typename R, typename I_>\n__global__ void InnerReductionKernelHalfFloat(R, const S, I_, I_, half*);\n\n#endif\n\ntemplate <int NPT, typename S, typename R, typename I_>\n__global__ void InnerReductionKernel(R, const S, I_, I_, typename S::CoeffReturnType*);\n\ntemplate <int NPT, typename S, typename R, typename I_>\n__global__ void OuterReductionKernel(R, const S, I_, I_, typename S::CoeffReturnType*);\n#endif\n\n/**\n * For SYCL, the return type of the reduction is deduced from the initialize method of the given Op.\n * This allows the reduction to have a different type for the accumulator than the input data type.\n * If this is the case, the functor needs to have two reduce method: one for reducing an element of the input\n * with the accumulator and the other for reducing two accumulators.\n * Such a reducer can be useful for instance when the accumulator is a boolean or a bitset that checks for\n * some properties of the input.\n */\ntemplate <typename Op, typename CoeffReturnType>\nstruct ReductionReturnType {\n#if defined(EIGEN_USE_SYCL)\n  typedef typename remove_const<decltype(std::declval<Op>().initialize())>::type type;\n#else\n  typedef typename remove_const<CoeffReturnType>::type type;\n#endif\n};\n\n}  // end namespace internal\n\n\ntemplate <typename Op, typename Dims, typename XprType,  template <class> class MakePointer_>\nclass TensorReductionOp : public TensorBase<TensorReductionOp<Op, Dims, XprType, MakePointer_>, ReadOnlyAccessors> {\n  public:\n    typedef typename Eigen::internal::traits<TensorReductionOp>::Scalar Scalar;\n    typedef typename Eigen::NumTraits<Scalar>::Real RealScalar;\n    typedef typename internal::remove_const<typename XprType::CoeffReturnType>::type CoeffReturnType;\n    typedef typename Eigen::internal::nested<TensorReductionOp>::type Nested;\n    typedef typename Eigen::internal::traits<TensorReductionOp>::StorageKind StorageKind;\n    typedef typename Eigen::internal::traits<TensorReductionOp>::Index Index;\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    TensorReductionOp(const XprType& expr, const Dims& dims) : m_expr(expr), m_dims(dims)\n    { }\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    TensorReductionOp(const XprType& expr, const Dims& dims, const Op& reducer) : m_expr(expr), m_dims(dims), m_reducer(reducer)\n    { }\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const XprType& expression() const { return m_expr; }\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const Dims& dims() const { return m_dims; }\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const Op& reducer() const { return m_reducer; }\n\n  protected:\n    typename XprType::Nested m_expr;\n    const Dims m_dims;\n    const Op m_reducer;\n};\n\ntemplate<typename ArgType, typename Device>\nstruct TensorReductionEvaluatorBase;\n\n// Eval as rvalue\ntemplate<typename Op, typename Dims, typename ArgType, template <class> class MakePointer_, typename Device>\nstruct TensorReductionEvaluatorBase<const TensorReductionOp<Op, Dims, ArgType, MakePointer_>, Device>\n{\n  typedef internal::reducer_traits<Op, Device> ReducerTraits;\n  typedef Dims ReducedDims;\n  typedef TensorReductionOp<Op, Dims, ArgType, MakePointer_> XprType;\n  typedef typename XprType::Index Index;\n  typedef ArgType ChildType;\n  typedef typename TensorEvaluator<ArgType, Device>::Dimensions InputDimensions;\n  static const int NumInputDims = internal::array_size<InputDimensions>::value;\n  static const int NumReducedDims = internal::array_size<Dims>::value;\n  static const int NumOutputDims = NumInputDims - NumReducedDims;\n  typedef typename internal::conditional<NumOutputDims==0, Sizes<>, DSizes<Index, NumOutputDims> >::type Dimensions;\n  typedef typename XprType::Scalar Scalar;\n  typedef TensorReductionEvaluatorBase<const TensorReductionOp<Op, Dims, ArgType, MakePointer_>, Device> Self;\n  static const bool InputPacketAccess = TensorEvaluator<ArgType, Device>::PacketAccess;\n  typedef typename internal::ReductionReturnType<Op, typename XprType::CoeffReturnType>::type CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  static const Index PacketSize = PacketType<CoeffReturnType, Device>::size;\n\n  typedef typename Eigen::internal::traits<XprType>::PointerType TensorPointerType;\n  typedef StorageMemory<CoeffReturnType, Device> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n\n    // Subset of strides of the input tensor for the non-reduced dimensions.\n  // Indexed by output dimensions.\n  static const int NumPreservedStrides = max_n_1<NumOutputDims>::size;\n\n  enum {\n    IsAligned = false,\n    PacketAccess = Self::InputPacketAccess && ReducerTraits::PacketAccess,\n    BlockAccess = false,\n    PreferBlockAccess = true,\n    Layout = TensorEvaluator<ArgType, Device>::Layout,\n    CoordAccess = false,  // to be implemented\n    RawAccess = false\n  };\n\n  typedef typename internal::remove_const<Scalar>::type ScalarNoConst;\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockNotImplemented TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  static const bool ReducingInnerMostDims = internal::are_inner_most_dims<Dims, NumInputDims, Layout>::value;\n  static const bool PreservingInnerMostDims = internal::preserve_inner_most_dims<Dims, NumInputDims, Layout>::value;\n  static const bool RunningFullReduction = (NumOutputDims==0);\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorReductionEvaluatorBase(const XprType& op, const Device& device)\n      : m_impl(op.expression(), device), m_reducer(op.reducer()), m_result(NULL), m_device(device)\n  {\n    EIGEN_STATIC_ASSERT((NumInputDims >= NumReducedDims), YOU_MADE_A_PROGRAMMING_MISTAKE);\n    EIGEN_STATIC_ASSERT((!ReducingInnerMostDims | !PreservingInnerMostDims | (NumReducedDims == NumInputDims)),\n                        YOU_MADE_A_PROGRAMMING_MISTAKE);\n\n    // Build the bitmap indicating if an input dimension is reduced or not.\n    for (int i = 0; i < NumInputDims; ++i) {\n      m_reduced[i] = false;\n    }\n    for (int i = 0; i < NumReducedDims; ++i) {\n      eigen_assert(op.dims()[i] >= 0);\n      eigen_assert(op.dims()[i] < NumInputDims);\n      m_reduced[op.dims()[i]] = true;\n    }\n\n    const typename TensorEvaluator<ArgType, Device>::Dimensions& input_dims = m_impl.dimensions();\n    internal::DimInitializer<Dimensions>::run(input_dims, m_reduced, &m_dimensions, &m_reducedDims);\n\n    // Precompute output strides.\n    if (NumOutputDims > 0) {\n      if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n        m_outputStrides[0] = 1;\n        for (int i = 1; i < NumOutputDims; ++i) {\n          m_outputStrides[i] = m_outputStrides[i - 1] * m_dimensions[i - 1];\n          m_fastOutputStrides[i] = internal::TensorIntDivisor<Index>(m_outputStrides[i]);\n        }\n      } else {\n        m_outputStrides[NumOutputDims - 1] = 1;\n        for (int i = NumOutputDims - 2; i >= 0; --i) {\n          m_outputStrides[i] = m_outputStrides[i + 1] * m_dimensions[i + 1];\n          m_fastOutputStrides[i] = internal::TensorIntDivisor<Index>(m_outputStrides[i]);\n        }\n      }\n    }\n\n    // Precompute input strides.\n    if (NumInputDims > 0) {\n      array<Index, NumInputDims> input_strides;\n      if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n        input_strides[0] = 1;\n        for (int i = 1; i < NumInputDims; ++i) {\n          input_strides[i] = input_strides[i-1] * input_dims[i-1];\n        }\n      } else {\n        input_strides.back() = 1;\n        for (int i = NumInputDims - 2; i >= 0; --i) {\n          input_strides[i] = input_strides[i + 1] * input_dims[i + 1];\n        }\n      }\n\n      int outputIndex = 0;\n      int reduceIndex = 0;\n      for (int i = 0; i < NumInputDims; ++i) {\n        if (m_reduced[i]) {\n          m_reducedStrides[reduceIndex] = input_strides[i];\n          ++reduceIndex;\n        } else {\n          m_preservedStrides[outputIndex] = input_strides[i];\n          m_output_to_input_dim_map[outputIndex] = i;\n          ++outputIndex;\n        }\n      }\n    }\n\n    // Special case for full reductions\n    if (NumOutputDims == 0) {\n      m_preservedStrides[0] = internal::array_prod(input_dims);\n    }\n\n    m_numValuesToReduce =\n        NumOutputDims == 0\n            ? internal::array_prod(input_dims)\n            : (static_cast<int>(Layout) == static_cast<int>(ColMajor))\n                  ? m_preservedStrides[0]\n                  : m_preservedStrides[NumOutputDims - 1];\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions& dimensions() const { return m_dimensions; }\n\n  EIGEN_STRONG_INLINE\n#if !defined(EIGEN_HIPCC)\n  // Marking this as EIGEN_DEVICE_FUNC for HIPCC requires also doing the same\n  // for all the functions being called within here, which then leads to\n  // proliferation of EIGEN_DEVICE_FUNC markings, one of which will eventually\n  // result in an NVCC error\n  EIGEN_DEVICE_FUNC\n#endif\n  bool evalSubExprsIfNeededCommon(EvaluatorPointerType data) {\n    // Use the FullReducer if possible.\n    if ((RunningFullReduction && RunningOnSycl) ||(RunningFullReduction &&\n        internal::FullReducer<Self, Op, Device>::HasOptimizedImplementation &&\n        ((RunningOnGPU && (m_device.majorDeviceVersion() >= 3)) ||\n         !RunningOnGPU))) {\n      bool need_assign = false;\n      if (!data) {\n        m_result = static_cast<EvaluatorPointerType>(m_device.get((CoeffReturnType*)m_device.allocate_temp(sizeof(CoeffReturnType))));\n        data = m_result;\n        need_assign = true;\n      }\n      Op reducer(m_reducer);\n      internal::FullReducer<Self, Op, Device>::run(*this, reducer, m_device, data);\n      return need_assign;\n    }\n\n    // Attempt to use an optimized reduction.\n    else if ((RunningOnGPU && (m_device.majorDeviceVersion() >= 3)) || (RunningOnSycl)) {\n      bool reducing_inner_dims = true;\n      for (int i = 0; i < NumReducedDims; ++i) {\n        if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n          reducing_inner_dims &= m_reduced[i];\n        } else {\n          reducing_inner_dims &= m_reduced[NumInputDims - 1 - i];\n        }\n      }\n      if (internal::InnerReducer<Self, Op, Device>::HasOptimizedImplementation &&\n          (reducing_inner_dims || ReducingInnerMostDims)) {\n        const Index num_values_to_reduce = internal::array_prod(m_reducedDims);\n        const Index num_coeffs_to_preserve = internal::array_prod(m_dimensions);\n        if (!data) {\n          if ((num_coeffs_to_preserve < 1024 && num_values_to_reduce > num_coeffs_to_preserve && num_values_to_reduce > 128) || (RunningOnSycl)) {\n            data = static_cast<EvaluatorPointerType>(m_device.get((CoeffReturnType*)m_device.allocate_temp(sizeof(CoeffReturnType) * num_coeffs_to_preserve)));\n            m_result = data;\n          }\n          else {\n            return true;\n          }\n        }\n        Op reducer(m_reducer);\n        // For SYCL this if always return false\n        if (internal::InnerReducer<Self, Op, Device>::run(*this, reducer, m_device, data, num_values_to_reduce, num_coeffs_to_preserve)) {\n          if (m_result) {\n            m_device.deallocate_temp(m_result);\n            m_result = NULL;\n          }\n          return true;\n        } else {\n          return (m_result != NULL);\n        }\n      }\n\n      bool preserving_inner_dims = true;\n      for (int i = 0; i < NumReducedDims; ++i) {\n        if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n          preserving_inner_dims &= m_reduced[NumInputDims - 1 - i];\n        } else {\n          preserving_inner_dims &= m_reduced[i];\n        }\n      }\n      if (internal::OuterReducer<Self, Op, Device>::HasOptimizedImplementation &&\n          preserving_inner_dims) {\n        const Index num_values_to_reduce = internal::array_prod(m_reducedDims);\n        const Index num_coeffs_to_preserve = internal::array_prod(m_dimensions);\n        if (!data) {\n          if ((num_coeffs_to_preserve < 1024 && num_values_to_reduce > num_coeffs_to_preserve && num_values_to_reduce > 32) || (RunningOnSycl)) {\n            data = static_cast<EvaluatorPointerType>(m_device.get((CoeffReturnType*)m_device.allocate_temp(sizeof(CoeffReturnType) * num_coeffs_to_preserve)));\n            m_result = data;\n          }\n          else {\n            return true;\n          }\n        }\n        Op reducer(m_reducer);\n        // For SYCL this if always return false\n        if (internal::OuterReducer<Self, Op, Device>::run(*this, reducer, m_device, data, num_values_to_reduce, num_coeffs_to_preserve)) {\n          if (m_result) {\n            m_device.deallocate_temp(m_result);\n            m_result = NULL;\n          }\n          return true;\n        } else {\n          return (m_result != NULL);\n        }\n      }\n      #if defined(EIGEN_USE_SYCL)\n      // If there is no Optimised version for SYCL, the reduction expression \n      // must break into two subexpression and use the SYCL generic Reducer on the device.\n      if(RunningOnSycl) {\n         const Index num_values_to_reduce = internal::array_prod(m_reducedDims);\n         const Index num_coeffs_to_preserve = internal::array_prod(m_dimensions);\n         if (!data) {\n           data = static_cast<EvaluatorPointerType>(m_device.get((CoeffReturnType*)m_device.allocate_temp(sizeof(CoeffReturnType) * num_coeffs_to_preserve)));\n           m_result = data;\n         }\n         Op reducer(m_reducer);\n         internal::GenericReducer<Self, Op, Device>::run(*this, reducer, m_device, data, num_values_to_reduce, num_coeffs_to_preserve);\n         return (m_result != NULL);\n       }\n      #endif\n    }\n    return true;\n  }\n\n#ifdef EIGEN_USE_THREADS\n  template <typename EvalSubExprsCallback>\n  EIGEN_STRONG_INLINE\n#if !defined(EIGEN_HIPCC)\n      EIGEN_DEVICE_FUNC\n#endif\n      void\n      evalSubExprsIfNeededAsync(EvaluatorPointerType data,\n                                EvalSubExprsCallback done) {\n    m_impl.evalSubExprsIfNeededAsync(NULL, [this, data, done](bool) {\n      done(evalSubExprsIfNeededCommon(data));\n    });\n  }\n#endif\n\n  EIGEN_STRONG_INLINE\n#if !defined(EIGEN_HIPCC)\n  // Marking this as EIGEN_DEVICE_FUNC for HIPCC requires also doing the same\n  // for all the functions being called within here, which then leads to\n  // proliferation of EIGEN_DEVICE_FUNC markings, one of which will eventually\n  // result in an NVCC error\n  EIGEN_DEVICE_FUNC\n#endif\n  bool evalSubExprsIfNeeded(EvaluatorPointerType data) {\n    m_impl.evalSubExprsIfNeeded(NULL);\n    return evalSubExprsIfNeededCommon(data);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {\n    m_impl.cleanup();\n    if (m_result) {\n      m_device.deallocate_temp(m_result);\n      m_result = NULL;\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const\n  {\n    if (( RunningFullReduction || RunningOnGPU) && m_result ) {\n      return *(m_result + index);\n    }\n    Op reducer(m_reducer);\n    if (ReducingInnerMostDims || RunningFullReduction) {\n      const Index num_values_to_reduce =\n        (static_cast<int>(Layout) == static_cast<int>(ColMajor)) ? m_preservedStrides[0] : m_preservedStrides[NumPreservedStrides - 1];\n      return internal::InnerMostDimReducer<Self, Op>::reduce(*this, firstInput(index),\n                                                             num_values_to_reduce, reducer);\n    } else {\n      typename Self::CoeffReturnType accum = reducer.initialize();\n      internal::GenericDimReducer<NumReducedDims-1, Self, Op>::reduce(*this, firstInput(index), reducer, &accum);\n      return reducer.finalize(accum);\n    }\n  }\n\n  // TODO(bsteiner): provide a more efficient implementation.\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const\n  {\n    EIGEN_STATIC_ASSERT((PacketSize > 1), YOU_MADE_A_PROGRAMMING_MISTAKE)\n    eigen_assert(index + PacketSize - 1 < Index(internal::array_prod(dimensions())));\n\n    if (RunningOnGPU && m_result) {\n      return internal::pload<PacketReturnType>(m_result + index);\n    }\n\n    EIGEN_ALIGN_MAX typename internal::remove_const<CoeffReturnType>::type values[PacketSize];\n    if (ReducingInnerMostDims) {\n      const Index num_values_to_reduce =\n        (static_cast<int>(Layout) == static_cast<int>(ColMajor)) ? m_preservedStrides[0] : m_preservedStrides[NumPreservedStrides - 1];\n      const Index firstIndex = firstInput(index);\n      for (Index i = 0; i < PacketSize; ++i) {\n        Op reducer(m_reducer);\n        values[i] = internal::InnerMostDimReducer<Self, Op>::reduce(*this, firstIndex + i * num_values_to_reduce,\n                                                                    num_values_to_reduce, reducer);\n      }\n    } else if (PreservingInnerMostDims) {\n      const Index firstIndex = firstInput(index);\n      const int innermost_dim = (static_cast<int>(Layout) == static_cast<int>(ColMajor)) ? 0 : NumOutputDims - 1;\n      // TBD: extend this the the n innermost dimensions that we preserve.\n      if (((firstIndex % m_dimensions[innermost_dim]) + PacketSize - 1) < m_dimensions[innermost_dim]) {\n        Op reducer(m_reducer);\n        typename Self::PacketReturnType accum = reducer.template initializePacket<typename Self::PacketReturnType>();\n        internal::InnerMostDimPreserver<NumReducedDims-1, Self, Op>::reduce(*this, firstIndex, reducer, &accum);\n        return reducer.finalizePacket(accum);\n      } else {\n        for (int i = 0; i < PacketSize; ++i) {\n          values[i] = coeff(index + i);\n        }\n      }\n    } else {\n      for (int i = 0; i < PacketSize; ++i) {\n        values[i] = coeff(index + i);\n      }\n    }\n    PacketReturnType rslt = internal::pload<PacketReturnType>(values);\n    return rslt;\n  }\n\n  // Must be called after evalSubExprsIfNeeded().\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool vectorized) const {\n    if (RunningFullReduction && m_result) {\n      return TensorOpCost(sizeof(CoeffReturnType), 0, 0, vectorized, PacketSize);\n    } else {\n      const Index num_values_to_reduce = internal::array_prod(m_reducedDims);\n      const double compute_cost = num_values_to_reduce * internal::functor_traits<Op>::Cost;\n      return m_impl.costPerCoeff(vectorized) * num_values_to_reduce +\n          TensorOpCost(0, 0, compute_cost, vectorized, PacketSize);\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EvaluatorPointerType data() const { return m_result; }\n  EIGEN_DEVICE_FUNC const TensorEvaluator<ArgType, Device>& impl() const { return m_impl; }\n  EIGEN_DEVICE_FUNC const Device& device() const { return m_device; }\n#ifdef EIGEN_USE_SYCL\n  // binding placeholder accessors to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {\n    m_impl.bind(cgh);\n    m_result.bind(cgh);\n  }\n#endif\n\n  private:\n  template <int, typename, typename> friend struct internal::GenericDimReducer;\n  template <typename, typename, bool, bool> friend struct internal::InnerMostDimReducer;\n  template <int, typename, typename, bool> friend struct internal::InnerMostDimPreserver;\n  template <typename S, typename O, typename D, bool V> friend struct internal::FullReducer;\n#ifdef EIGEN_USE_THREADS\n  template <typename S, typename O, bool V> friend struct internal::FullReducerShard;\n#endif\n#if defined(EIGEN_USE_GPU) && (defined(EIGEN_GPUCC))\n  template <int B, int N, typename S, typename R, typename I_> KERNEL_FRIEND void internal::FullReductionKernel(R, const S, I_, typename S::CoeffReturnType*, unsigned int*);\n#if defined(EIGEN_HAS_GPU_FP16)\n  template <typename S, typename R, typename I_> KERNEL_FRIEND void internal::ReductionInitFullReduxKernelHalfFloat(R, const S, I_, internal::packet_traits<Eigen::half>::type*);\n  template <int B, int N, typename S, typename R, typename I_> KERNEL_FRIEND void internal::FullReductionKernelHalfFloat(R, const S, I_, half*, internal::packet_traits<Eigen::half>::type*);\n  template <int NPT, typename S, typename R, typename I_> KERNEL_FRIEND void internal::InnerReductionKernelHalfFloat(R, const S, I_, I_, half*);\n#endif\n  template <int NPT, typename S, typename R, typename I_> KERNEL_FRIEND void internal::InnerReductionKernel(R, const S, I_, I_, typename S::CoeffReturnType*);\n\n  template <int NPT, typename S, typename R, typename I_> KERNEL_FRIEND void internal::OuterReductionKernel(R, const S, I_, I_, typename S::CoeffReturnType*);\n#endif\n\n#if defined(EIGEN_USE_SYCL)\n template < typename Evaluator_, typename Op__> friend class TensorSycl::internal::GenericNondeterministicReducer;\n // SYCL need the Generic reducer for the case the recution algorithm is neither inner, outer, and full reducer\n template <typename, typename, typename> friend struct internal::GenericReducer;\n#endif\n\n\n  template <typename S, typename O, typename D> friend struct internal::InnerReducer;\n\n  struct BlockIteratorState {\n    Index input_dim;\n    Index output_size;\n    Index output_count;\n  };\n\n  // Returns the Index in the input tensor of the first value that needs to be\n  // used to compute the reduction at output index \"index\".\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index firstInput(Index index) const {\n    if (ReducingInnerMostDims) {\n      if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n        return index * m_preservedStrides[0];\n      } else {\n        return index * m_preservedStrides[NumPreservedStrides - 1];\n      }\n    }\n    // TBD: optimize the case where we preserve the innermost dimensions.\n    Index startInput = 0;\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      for (int i = NumOutputDims - 1; i > 0; --i) {\n        // This is index_i in the output tensor.\n        const Index idx = index / m_outputStrides[i];\n        startInput += idx * m_preservedStrides[i];\n        index -= idx * m_outputStrides[i];\n      }\n      if (PreservingInnerMostDims) {\n        eigen_assert(m_preservedStrides[0] == 1);\n        startInput += index;\n      } else {\n        startInput += index * m_preservedStrides[0];\n      }\n    } else {\n      for (int i = 0; i < NumOutputDims - 1; ++i) {\n        // This is index_i in the output tensor.\n        const Index idx = index / m_outputStrides[i];\n        startInput += idx * m_preservedStrides[i];\n        index -= idx * m_outputStrides[i];\n      }\n      if (PreservingInnerMostDims) {\n        eigen_assert(m_preservedStrides[NumPreservedStrides - 1] == 1);\n        startInput += index;\n      } else {\n        startInput += index * m_preservedStrides[NumPreservedStrides - 1];\n      }\n    }\n    return startInput;\n  }\n\n  // Bitmap indicating if an input dimension is reduced or not.\n  array<bool, NumInputDims> m_reduced;\n  // Dimensions of the output of the operation.\n  Dimensions m_dimensions;\n  // Precomputed strides for the output tensor.\n  array<Index, NumOutputDims> m_outputStrides;\n  array<internal::TensorIntDivisor<Index>, NumOutputDims> m_fastOutputStrides;\n  array<Index, NumPreservedStrides> m_preservedStrides;\n  // Map from output to input dimension index.\n  array<Index, NumOutputDims> m_output_to_input_dim_map;\n  // How many values go into each reduction\n  Index m_numValuesToReduce;\n\n  // Subset of strides of the input tensor for the reduced dimensions.\n  // Indexed by reduced dimensions.\n  array<Index, NumReducedDims> m_reducedStrides;\n  // Size of the input dimensions that are reduced.\n  // Indexed by reduced dimensions.\n  array<Index, NumReducedDims> m_reducedDims;\n\n  // Evaluator for the input expression.\n  TensorEvaluator<ArgType, Device> m_impl;\n\n  // Operation to apply for computing the reduction.\n  Op m_reducer;\n\n  // For full reductions\n#if defined(EIGEN_USE_GPU) && (defined(EIGEN_GPUCC))\n  static const bool RunningOnGPU = internal::is_same<Device, Eigen::GpuDevice>::value;\n  static const bool RunningOnSycl = false;\n#elif defined(EIGEN_USE_SYCL)\nstatic const bool RunningOnSycl = internal::is_same<typename internal::remove_all<Device>::type, Eigen::SyclDevice>::value;\nstatic const bool RunningOnGPU = false;\n#else\n  static const bool RunningOnGPU = false;\n  static const bool RunningOnSycl = false;\n#endif\n  EvaluatorPointerType m_result;\n\n  const Device EIGEN_DEVICE_REF m_device;\n};\n\ntemplate<typename Op, typename Dims, typename ArgType, template <class> class MakePointer_, typename Device>\nstruct TensorEvaluator<const TensorReductionOp<Op, Dims, ArgType, MakePointer_>, Device>\n: public TensorReductionEvaluatorBase<const TensorReductionOp<Op, Dims, ArgType, MakePointer_>, Device> {\n  typedef TensorReductionEvaluatorBase<const TensorReductionOp<Op, Dims, ArgType, MakePointer_>, Device> Base;\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const typename Base::XprType& op, const Device& device) : Base(op, device){}\n};\n\n\ntemplate<typename Op, typename Dims, typename ArgType, template <class> class MakePointer_>\nstruct TensorEvaluator<const TensorReductionOp<Op, Dims, ArgType, MakePointer_>, Eigen::SyclDevice>\n: public TensorReductionEvaluatorBase<const TensorReductionOp<Op, Dims, ArgType, MakePointer_>, Eigen::SyclDevice> {\n\n  typedef TensorReductionEvaluatorBase<const TensorReductionOp<Op, Dims, ArgType, MakePointer_>, Eigen::SyclDevice> Base;\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const typename Base::XprType& op, const Eigen::SyclDevice& device) : Base(op, device){}\n  // The coeff function in the base the recursive method which is not an standard layout and cannot be used in the SYCL kernel\n  //Therefore the coeff function should be overridden by for SYCL kernel\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename Base::CoeffReturnType coeff(typename Base::Index index) const {\n    return *(this->data() + index);\n  }\n  // The packet function in the base the recursive method which is not an standard layout and cannot be used in the SYCL kernel\n  //Therefore the packet function should be overridden by for SYCL kernel\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename Base::PacketReturnType packet(typename Base::Index index) const {\n    return internal::pload<typename Base::PacketReturnType>(this->data() + index);\n  }\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_REDUCTION_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorReductionCuda.h",
    "content": "\n#if defined(__clang__) || defined(__GNUC__)\n#warning \"Deprecated header file, please either include the main Eigen/CXX11/Tensor header or the respective TensorReductionGpu.h file\"\n#endif\n\n#include \"TensorReductionGpu.h\"\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_REDUCTION_GPU_H\n#define EIGEN_CXX11_TENSOR_TENSOR_REDUCTION_GPU_H\n\nnamespace Eigen {\nnamespace internal {\n\n\n#if defined(EIGEN_USE_GPU) && defined(EIGEN_GPUCC)\n// Full reducers for GPU, don't vectorize for now\n\n// Reducer function that enables multiple gpu thread to safely accumulate at the same\n// output address. It basically reads the current value of the output variable, and\n// attempts to update it with the new value. If in the meantime another gpu thread\n// updated the content of the output address it will try again.\ntemplate <typename T, typename R>\n__device__ EIGEN_ALWAYS_INLINE void atomicReduce(T* output, T accum, R& reducer) {\n#if (defined(EIGEN_HIP_DEVICE_COMPILE) && defined(__HIP_ARCH_HAS_WARP_SHUFFLE__)) || (EIGEN_CUDA_ARCH >= 300)\n  if (sizeof(T) == 4)\n  {\n    unsigned int oldval = *reinterpret_cast<unsigned int*>(output);\n    unsigned int newval = oldval;\n    reducer.reduce(accum, reinterpret_cast<T*>(&newval));\n    if (newval == oldval) {\n      return;\n    }\n    unsigned int readback;\n    while ((readback = atomicCAS((unsigned int*)output, oldval, newval)) != oldval) {\n      oldval = readback;\n      newval = oldval;\n      reducer.reduce(accum, reinterpret_cast<T*>(&newval));\n      if (newval == oldval) {\n        return;\n      }\n    }\n  }\n  else if (sizeof(T) == 8) {\n    unsigned long long oldval = *reinterpret_cast<unsigned long long*>(output);\n    unsigned long long newval = oldval;\n    reducer.reduce(accum, reinterpret_cast<T*>(&newval));\n    if (newval == oldval) {\n      return;\n    }\n    unsigned long long readback;\n    while ((readback = atomicCAS((unsigned long long*)output, oldval, newval)) != oldval) {\n      oldval = readback;\n      newval = oldval;\n      reducer.reduce(accum, reinterpret_cast<T*>(&newval));\n      if (newval == oldval) {\n        return;\n      }\n    }\n  }\n  else {\n    gpu_assert(0 && \"Wordsize not supported\");\n  }\n#else // EIGEN_CUDA_ARCH >= 300\n  gpu_assert(0 && \"Shouldn't be called on unsupported device\");\n#endif // EIGEN_CUDA_ARCH >= 300\n}\n\n// We extend atomicExch to support extra data types\ntemplate <typename Type>\n__device__ inline Type atomicExchCustom(Type* address, Type val) {\n  return atomicExch(address, val);\n}\n\ntemplate <>\n__device__ inline double atomicExchCustom(double* address, double val) {\n  unsigned long long int* address_as_ull = reinterpret_cast<unsigned long long int*>(address);\n  return __longlong_as_double(atomicExch(address_as_ull, __double_as_longlong(val)));\n}\n\n#ifdef EIGEN_HAS_GPU_FP16\ntemplate <template <typename T> class R>\n__device__ inline void atomicReduce(half2* output, half2 accum, R<half>& reducer) {\n  unsigned int oldval = *reinterpret_cast<unsigned int*>(output);\n  unsigned int newval = oldval;\n  reducer.reducePacket(accum, reinterpret_cast<half2*>(&newval));\n  if (newval == oldval) {\n    return;\n  }\n  unsigned int readback;\n  while ((readback = atomicCAS((unsigned int*)output, oldval, newval)) != oldval) {\n    oldval = readback;\n    newval = oldval;\n    reducer.reducePacket(accum, reinterpret_cast<half2*>(&newval));\n    if (newval == oldval) {\n      return;\n    }\n  }\n}\n// reduction should be associative since reduction is not atomic in wide vector but atomic in half2 operations\ntemplate <template <typename T> class R>\n__device__ inline void atomicReduce(Packet4h2* output, Packet4h2 accum,\n                                    R<half>& reducer) {\n  half2* houtput=reinterpret_cast<half2*>(output);\n  half2* haccum=reinterpret_cast<half2*>(&accum);\n  for(int i=0;i<4;++i){\n    atomicReduce(houtput+i,*(haccum+i),reducer);\n  }\n}\n#endif  // EIGEN_HAS_GPU_FP16\n\ntemplate <>\n__device__ inline void atomicReduce(float* output, float accum, SumReducer<float>&) {\n#if (defined(EIGEN_HIP_DEVICE_COMPILE) && defined(__HIP_ARCH_HAS_WARP_SHUFFLE__)) || (EIGEN_CUDA_ARCH >= 300)\n  atomicAdd(output, accum);\n#else // EIGEN_CUDA_ARCH >= 300\n  gpu_assert(0 && \"Shouldn't be called on unsupported device\");\n#endif // EIGEN_CUDA_ARCH >= 300\n}\n\n\ntemplate <typename CoeffType, typename Index>\n__global__ void ReductionInitKernel(const CoeffType val, Index num_preserved_coeffs, CoeffType* output) {\n  const Index thread_id = blockIdx.x * blockDim.x + threadIdx.x;\n  const Index num_threads = blockDim.x * gridDim.x;\n  for (Index i = thread_id; i < num_preserved_coeffs; i += num_threads) {\n    output[i] = val;\n  }\n}\n\n\ntemplate <int BlockSize, int NumPerThread, typename Self,\n          typename Reducer, typename Index>\n__global__ void FullReductionKernel(Reducer reducer, const Self input, Index num_coeffs,\n                                    typename Self::CoeffReturnType* output, unsigned int* semaphore) {\n#if (defined(EIGEN_HIP_DEVICE_COMPILE) && defined(__HIP_ARCH_HAS_WARP_SHUFFLE__)) || (EIGEN_CUDA_ARCH >= 300)\n  // Initialize the output value\n  const Index first_index = blockIdx.x * BlockSize * NumPerThread + threadIdx.x;\n  if (gridDim.x == 1) {\n    if (first_index == 0) {\n      *output = reducer.initialize();\n    }\n  }\n  else {\n    if (threadIdx.x == 0) {\n      unsigned int block = atomicCAS(semaphore, 0u, 1u);\n      if (block == 0) {\n        // We're the first block to run, initialize the output value\n        atomicExchCustom(output, reducer.initialize());\n        __threadfence();\n        atomicExch(semaphore, 2u);\n      }\n      else {\n        // Wait for the first block to initialize the output value.\n        // Use atomicCAS here to ensure that the reads aren't cached\n        unsigned int val;\n        do {\n          val = atomicCAS(semaphore, 2u, 2u);\n        }\n        while (val < 2u);\n      }\n    }\n  }\n\n  __syncthreads();\n\n  eigen_assert(gridDim.x == 1 || *semaphore >= 2u);\n\n  typename Self::CoeffReturnType accum = reducer.initialize();\n  Index max_iter = numext::mini<Index>(num_coeffs - first_index, NumPerThread*BlockSize);\n  for (Index i = 0; i < max_iter; i+=BlockSize) {\n    const Index index = first_index + i;\n    eigen_assert(index < num_coeffs);\n    typename Self::CoeffReturnType val = input.m_impl.coeff(index);\n    reducer.reduce(val, &accum);\n  }\n\n#pragma unroll\n  for (int offset = warpSize/2; offset > 0; offset /= 2) {\n  #if defined(EIGEN_HIPCC)\n    // use std::is_floating_point to determine the type of reduced_val \n    // This is needed because when Type == double, hipcc will give a \"call to __shfl_down is ambguous\" error \n    // and list the float and int versions of __shfl_down as the candidate functions. \n    if (std::is_floating_point<typename Self::CoeffReturnType>::value) {\n      reducer.reduce(__shfl_down(static_cast<float>(accum), offset, warpSize), &accum);\n    } else {\n      reducer.reduce(__shfl_down(static_cast<int>(accum), offset, warpSize), &accum);\n    }\n  #elif defined(EIGEN_CUDA_SDK_VER) && EIGEN_CUDA_SDK_VER < 90000\n    reducer.reduce(__shfl_down(accum, offset, warpSize), &accum);\n  #else\n    reducer.reduce(__shfl_down_sync(0xFFFFFFFF, accum, offset, warpSize), &accum);\n  #endif\n  }\n\n  if ((threadIdx.x & (warpSize - 1)) == 0) {\n    atomicReduce(output, accum, reducer);\n  }\n\n  if (gridDim.x > 1 && threadIdx.x == 0) {\n    // Let the last block reset the semaphore\n    atomicInc(semaphore, gridDim.x + 1);\n#if defined(EIGEN_HIPCC)\n    __threadfence_system();\n#endif\n  }\n#else // EIGEN_CUDA_ARCH >= 300\n  gpu_assert(0 && \"Shouldn't be called on unsupported device\");\n#endif // EIGEN_CUDA_ARCH >= 300\n}\n\n\n#ifdef EIGEN_HAS_GPU_FP16\ntemplate <typename Self,\n          typename Reducer, typename Index>\n__global__ void ReductionInitFullReduxKernelHalfFloat(Reducer reducer, const Self input, Index num_coeffs,\n                                                      packet_traits<Eigen::half>::type* scratch) {\n  eigen_assert(blockDim.x == 1);\n  eigen_assert(gridDim.x == 1);\n  typedef packet_traits<Eigen::half>::type packet_type;\n  Index packet_remainder =\n      num_coeffs % Index(unpacket_traits<packet_type>::size);\n  if (packet_remainder != 0) {\n    half2* h2scratch = reinterpret_cast<half2*>(scratch);\n    for (Index i = num_coeffs - packet_remainder; i + 2 <= num_coeffs; i += 2) {\n      *h2scratch =\n          __halves2half2(input.m_impl.coeff(i), input.m_impl.coeff(i + 1));\n      h2scratch++;\n    }\n    if ((num_coeffs & 1) != 0) {\n      half lastCoeff = input.m_impl.coeff(num_coeffs - 1);\n      *h2scratch = __halves2half2(lastCoeff, reducer.initialize());\n    }\n  } else {\n    *scratch = reducer.template initializePacket<packet_type>();\n  }\n}\n\ntemplate <typename Self,\n          typename Reducer, typename Index>\n__global__ void ReductionInitKernelHalfFloat(Reducer reducer, const Self input, Index num_coeffs, half* output) {\n  const Index thread_id = blockIdx.x * blockDim.x + threadIdx.x;\n  const Index num_threads = blockDim.x * gridDim.x;\n  typedef typename packet_traits<Eigen::half>::type PacketType;\n\n  const Index num_packets =\n      num_coeffs / Index(unpacket_traits<PacketType>::size);\n  PacketType* p_output = reinterpret_cast<PacketType*>(output);\n  for (Index i = thread_id; i < num_packets; i += num_threads) {\n    p_output[i] = reducer.template initializePacket<PacketType>();\n  }\n  Index packet_remainder =\n      num_coeffs % Index(unpacket_traits<PacketType>::size);\n  if (thread_id < packet_remainder) {\n    output[num_coeffs - packet_remainder + thread_id] = reducer.initialize();\n  }\n}\n\ntemplate <int BlockSize, int NumPerThread, typename Self,\n          typename Reducer, typename Index>\n__global__ void FullReductionKernelHalfFloat(Reducer reducer, const Self input, Index num_coeffs,\n                                    half* output, packet_traits<Eigen::half>::type* scratch) {\n  typedef typename packet_traits<Eigen::half>::type PacketType;\n  const int packet_width = unpacket_traits<PacketType>::size;\n  eigen_assert(NumPerThread % packet_width == 0);\n  const Index first_index =\n      blockIdx.x * BlockSize * NumPerThread + packet_width * threadIdx.x;\n\n  // Initialize the output value if it wasn't initialized by the ReductionInitKernel\n\n  if (gridDim.x == 1) {\n    if (first_index == 0) {\n      int rem = num_coeffs % packet_width;\n      if (rem != 0) {\n        half2* p_scratch = reinterpret_cast<half2*>(scratch);\n        *scratch = reducer.template initializePacket<PacketType>();\n        for (int i = 0; i < rem / 2; i++) {\n          *p_scratch = __halves2half2(\n              input.m_impl.coeff(num_coeffs - packet_width + 2 * i),\n              input.m_impl.coeff(num_coeffs - packet_width + 2 * i + 1));\n          p_scratch++;\n        }\n        if ((num_coeffs & 1) != 0) {\n          half last = input.m_impl.coeff(num_coeffs - 1);\n          *p_scratch = __halves2half2(last, reducer.initialize());\n        }\n      } else {\n        *scratch = reducer.template initializePacket<PacketType>();\n      }\n    }\n    __syncthreads();\n  }\n\n  PacketType accum = reducer.template initializePacket<PacketType>();\n  const Index max_iter =\n      numext::mini<Index>((num_coeffs - first_index) / packet_width,\n                          NumPerThread * BlockSize / packet_width);\n  for (Index i = 0; i < max_iter; i += BlockSize) {\n    const Index index = first_index + packet_width * i;\n    eigen_assert(index + packet_width < num_coeffs);\n    PacketType val = input.m_impl.template packet<Unaligned>(index);\n    reducer.reducePacket(val, &accum);\n  }\n\n#pragma unroll\n  for (int offset = warpSize/2; offset > 0; offset /= 2) {\n  #if defined(EIGEN_HIPCC)\n    PacketType r1;\n    half2* hr = reinterpret_cast<half2*>(&r1);\n    half2* hacc = reinterpret_cast<half2*>(&accum);\n    for (int i = 0; i < packet_width / 2; i++) {\n      // FIXME : remove this workaround once we have native half/half2 support for __shfl_down\n      union { int i; half2 h; } wka_in, wka_out;\n      wka_in.h = hacc[i];\n      wka_out.i = __shfl_down(wka_in.i, offset, warpSize);\n      hr[i] = wka_out.h;\n    }\n    reducer.reducePacket(r1, &accum);\n  #elif defined(EIGEN_CUDA_SDK_VER) && EIGEN_CUDA_SDK_VER < 90000\n    PacketType r1;\n    half2* hr = reinterpret_cast<half2*>(&r1);\n    half2* hacc = reinterpret_cast<half2*>(&accum);\n    for (int i = 0; i < packet_width / 2; i++) {\n      hr[i] = __shfl_down(hacc[i], offset, warpSize);\n    }\n    reducer.reducePacket(r1, &accum);\n  #else\n    PacketType r1;\n    half2* hr = reinterpret_cast<half2*>(&r1);\n    half2* hacc = reinterpret_cast<half2*>(&accum);\n    for (int i = 0; i < packet_width / 2; i++) {\n      hr[i] = __shfl_down_sync(0xFFFFFFFF, hacc[i], (unsigned)offset, warpSize);\n    }\n    reducer.reducePacket(r1, &accum);\n\n  #endif\n  }\n\n  if ((threadIdx.x & (warpSize - 1)) == 0) {\n    atomicReduce(scratch, accum, reducer);\n  }\n\n  __syncthreads();\n  half2* rv1 = reinterpret_cast<half2*>(scratch);\n  if (packet_width > 2) {\n    reducer.reducePacket(rv1[2], rv1);\n    reducer.reducePacket(rv1[3], rv1 + 1);\n    reducer.reducePacket(rv1[1], rv1);\n  }\n  if (gridDim.x == 1) {\n    if (first_index == 0) {\n      half tmp = __low2half(*rv1);\n      reducer.reduce(__high2half(*rv1), &tmp);\n      *output = tmp;\n    }\n  }\n}\n\ntemplate <typename Op>\n__global__ void ReductionCleanupKernelHalfFloat(Op reducer, half* output, packet_traits<Eigen::half>::type* scratch) {\n  eigen_assert(threadIdx.x == 1);\n  half2* pscratch = reinterpret_cast<half2*>(scratch);\n  half tmp = __float2half(0.f);\n  typedef packet_traits<Eigen::half>::type packet_type;\n  for (int i = 0; i < unpacket_traits<packet_type>::size; i += 2) {\n    reducer.reduce(__low2half(*pscratch), &tmp);\n    reducer.reduce(__high2half(*pscratch), &tmp);\n    pscratch++;\n  }\n  *output = tmp;\n}\n\n#endif // EIGEN_HAS_GPU_FP16\n\ntemplate <typename Self, typename Op, typename OutputType, bool PacketAccess, typename Enabled = void>\nstruct FullReductionLauncher {\n  static void run(const Self&, Op&, const GpuDevice&, OutputType*, typename Self::Index) {\n    gpu_assert(false && \"Should only be called on doubles, floats and half floats\");\n  }\n};\n\n// Specialization for float and double\ntemplate <typename Self, typename Op, typename OutputType, bool PacketAccess>\nstruct FullReductionLauncher<\n    Self, Op, OutputType, PacketAccess,\n    typename internal::enable_if<\n      internal::is_same<float, OutputType>::value ||\n      internal::is_same<double, OutputType>::value,\n    void>::type> {\n  static void run(const Self& self, Op& reducer, const GpuDevice& device, OutputType* output, typename Self::Index num_coeffs) {\n\n    typedef typename Self::Index Index;\n    const int block_size = 256;\n    const int num_per_thread = 128;\n    const int num_blocks = divup<int>(num_coeffs, block_size * num_per_thread);\n\n    unsigned int* semaphore = NULL;\n    if (num_blocks > 1) {\n      semaphore = device.semaphore();\n    }\n\n    LAUNCH_GPU_KERNEL((FullReductionKernel<block_size, num_per_thread, Self, Op, Index>),\n                       num_blocks, block_size, 0, device, reducer, self, num_coeffs, output, semaphore);\n  }\n};\n\n#ifdef EIGEN_HAS_GPU_FP16\ntemplate <typename Self, typename Op>\nstruct FullReductionLauncher<Self, Op, Eigen::half, false> {\n  static void run(const Self&, Op&, const GpuDevice&, half*, typename Self::Index) {\n    gpu_assert(false && \"Should not be called since there is no packet accessor\");\n  }\n};\n\ntemplate <typename Self, typename Op>\nstruct FullReductionLauncher<Self, Op, Eigen::half, true> {\n  static void run(const Self& self, Op& reducer, const GpuDevice& device, half* output, typename Self::Index num_coeffs) {\n    typedef typename Self::Index Index;\n    typedef typename packet_traits<Eigen::half>::type PacketType;\n\n    const int block_size = 256;\n    const int num_per_thread = 128;\n    const int num_blocks = divup<int>(num_coeffs, block_size * num_per_thread);\n    PacketType* scratch = static_cast<PacketType*>(device.scratchpad());\n    // half2* scratch = static_cast<half2*>(device.scratchpad());\n\n    if (num_blocks > 1) {\n      // We initialize the output and the scrathpad outside the reduction kernel when we can't be sure that there\n      // won't be a race conditions between multiple thread blocks.\n      LAUNCH_GPU_KERNEL((ReductionInitFullReduxKernelHalfFloat<Self, Op, Index>),\n                         1, 1, 0, device, reducer, self, num_coeffs, scratch);\n    }\n\n    LAUNCH_GPU_KERNEL((FullReductionKernelHalfFloat<block_size, num_per_thread, Self, Op, Index>),\n                       num_blocks, block_size, 0, device, reducer, self, num_coeffs, output, scratch);\n\n    if (num_blocks > 1) {\n      LAUNCH_GPU_KERNEL((ReductionCleanupKernelHalfFloat<Op>),\n                         1, 1, 0, device, reducer, output, scratch);\n    }\n  }\n};\n#endif // EIGEN_HAS_GPU_FP16\n\n\ntemplate <typename Self, typename Op, bool Vectorizable>\nstruct FullReducer<Self, Op, GpuDevice, Vectorizable> {\n  // Unfortunately nvidia doesn't support well exotic types such as complex,\n  // so reduce the scope of the optimized version of the code to the simple cases\n  // of doubles, floats and half floats\n#ifdef EIGEN_HAS_GPU_FP16\n  static const bool HasOptimizedImplementation = !Self::ReducerTraits::IsStateful &&\n      (internal::is_same<typename Self::CoeffReturnType, float>::value ||\n       internal::is_same<typename Self::CoeffReturnType, double>::value ||\n       (internal::is_same<typename Self::CoeffReturnType, Eigen::half>::value && reducer_traits<Op, GpuDevice>::PacketAccess));\n#else // EIGEN_HAS_GPU_FP16\n  static const bool HasOptimizedImplementation = !Self::ReducerTraits::IsStateful &&\n                                                (internal::is_same<typename Self::CoeffReturnType, float>::value ||\n                                                 internal::is_same<typename Self::CoeffReturnType, double>::value);\n#endif // EIGEN_HAS_GPU_FP16\n\n  template <typename OutputType>\n  static void run(const Self& self, Op& reducer, const GpuDevice& device, OutputType* output) {\n    gpu_assert(HasOptimizedImplementation && \"Should only be called on doubles, floats or half floats\");\n    const Index num_coeffs = array_prod(self.m_impl.dimensions());\n    // Don't crash when we're called with an input tensor of size 0.\n    if (num_coeffs == 0) {\n      return;\n    }\n\n    FullReductionLauncher<Self, Op, OutputType, reducer_traits<Op, GpuDevice>::PacketAccess>::run(self, reducer, device, output, num_coeffs);\n  }\n};\n\n\ntemplate <int NumPerThread, typename Self,\n          typename Reducer, typename Index>\n__global__ void InnerReductionKernel(Reducer reducer, const Self input, Index num_coeffs_to_reduce, Index num_preserved_coeffs,\n                                         typename Self::CoeffReturnType* output) {\n#if (defined(EIGEN_HIP_DEVICE_COMPILE) && defined(__HIP_ARCH_HAS_WARP_SHUFFLE__)) || (EIGEN_CUDA_ARCH >= 300)\n  typedef typename Self::CoeffReturnType Type;\n  eigen_assert(blockDim.y == 1);\n  eigen_assert(blockDim.z == 1);\n  eigen_assert(gridDim.y == 1);\n  eigen_assert(gridDim.z == 1);\n\n  const int unroll_times = 16;\n  eigen_assert(NumPerThread % unroll_times == 0);\n\n  const Index input_col_blocks = divup<Index>(num_coeffs_to_reduce, blockDim.x * NumPerThread);\n  const Index num_input_blocks = input_col_blocks * num_preserved_coeffs;\n\n  const Index num_threads = blockDim.x * gridDim.x;\n  const Index thread_id = blockIdx.x * blockDim.x + threadIdx.x;\n\n  // Initialize the output values if they weren't initialized by the ReductionInitKernel\n  if (gridDim.x == 1) {\n    for (Index i = thread_id; i < num_preserved_coeffs; i += num_threads) {\n      output[i] = reducer.initialize();\n    }\n    __syncthreads();\n  }\n\n  for (Index i = blockIdx.x; i < num_input_blocks; i += gridDim.x) {\n    const Index row = i / input_col_blocks;\n\n    if (row < num_preserved_coeffs) {\n      const Index col_block = i % input_col_blocks;\n      const Index col_begin = col_block * blockDim.x * NumPerThread + threadIdx.x;\n\n      Type reduced_val = reducer.initialize();\n\n      for (Index j = 0; j < NumPerThread; j += unroll_times) {\n        const Index last_col = col_begin + blockDim.x * (j + unroll_times - 1);\n        if (last_col >= num_coeffs_to_reduce) {\n          for (Index col = col_begin + blockDim.x * j; col < num_coeffs_to_reduce; col += blockDim.x) {\n            const Type val = input.m_impl.coeff(row * num_coeffs_to_reduce + col);\n            reducer.reduce(val, &reduced_val);\n          }\n          break;\n        } else {\n          // Faster version of the loop with no branches after unrolling.\n#pragma unroll\n          for (int k = 0; k < unroll_times; ++k) {\n            const Index col = col_begin + blockDim.x * (j + k);\n            reducer.reduce(input.m_impl.coeff(row * num_coeffs_to_reduce + col), &reduced_val);\n          }\n        }\n      }\n\n#pragma unroll\n      for (int offset = warpSize/2; offset > 0; offset /= 2) {\n      #if defined(EIGEN_HIPCC)\n        // use std::is_floating_point to determine the type of reduced_val \n       // This is needed because when Type == double, hipcc will give a \"call to __shfl_down is ambguous\" error \n       // and list the float and int versions of __shfl_down as the candidate functions. \n        if (std::is_floating_point<Type>::value) {\n          reducer.reduce(__shfl_down(static_cast<float>(reduced_val), offset), &reduced_val);\n        } else {\n          reducer.reduce(__shfl_down(static_cast<int>(reduced_val), offset), &reduced_val);\n        }\n      #elif defined(EIGEN_CUDA_SDK_VER) && EIGEN_CUDA_SDK_VER < 90000\n        reducer.reduce(__shfl_down(reduced_val, offset), &reduced_val);\n      #else\n        reducer.reduce(__shfl_down_sync(0xFFFFFFFF, reduced_val, offset), &reduced_val);\n      #endif\n      }\n\n      if ((threadIdx.x & (warpSize - 1)) == 0) {\n        atomicReduce(&(output[row]), reduced_val, reducer);\n      }\n    }\n  }\n#else // EIGEN_CUDA_ARCH >= 300\n  gpu_assert(0 && \"Shouldn't be called on unsupported device\");\n#endif // EIGEN_CUDA_ARCH >= 300\n}\n\n#ifdef EIGEN_HAS_GPU_FP16\n\ntemplate <int NumPerThread, typename Self,\n          typename Reducer, typename Index>\n__global__ void InnerReductionKernelHalfFloat(Reducer reducer, const Self input, Index num_coeffs_to_reduce, Index num_preserved_coeffs,\n                                              half* output) {\n  eigen_assert(blockDim.y == 1);\n  eigen_assert(blockDim.z == 1);\n  eigen_assert(gridDim.y == 1);\n  eigen_assert(gridDim.z == 1);\n\n  typedef typename packet_traits<Eigen::half>::type PacketType;\n  const int packet_width = unpacket_traits<PacketType>::size;\n  const int unroll_times = 16 / packet_width;\n  eigen_assert(NumPerThread % unroll_times == 0);\n  eigen_assert(unroll_times % 2 == 0);\n\n  const Index input_col_blocks = divup<Index>(num_coeffs_to_reduce, blockDim.x * NumPerThread * 2);\n  const Index num_input_blocks = divup<Index>(input_col_blocks * num_preserved_coeffs, 2);\n\n  const Index num_threads = blockDim.x * gridDim.x;\n  const Index thread_id = blockIdx.x * blockDim.x + threadIdx.x;\n\n  // Initialize the output values if they weren't initialized by the ReductionInitKernel\n  if (gridDim.x == 1) {\n    Index i = packet_width * thread_id;\n    for (; i + packet_width <= num_preserved_coeffs;\n         i += packet_width * num_threads) {\n      PacketType* poutput = reinterpret_cast<PacketType*>(output + i);\n      *poutput = reducer.template initializePacket<PacketType>();\n    }\n    if (i < num_preserved_coeffs) {\n      output[i] = reducer.initialize();\n    }\n    __syncthreads();\n  }\n\n  for (Index i = blockIdx.x; i < num_input_blocks; i += gridDim.x) {\n    const Index row = 2 * (i / input_col_blocks);  // everybody takes 2 rows\n\n    if (row + 1 < num_preserved_coeffs) {\n      const Index col_block = i % input_col_blocks;\n      const Index col_begin =\n          packet_width * (col_block * blockDim.x * NumPerThread + threadIdx.x);\n\n      PacketType reduced_val1 = reducer.template initializePacket<PacketType>();\n      PacketType reduced_val2 = reducer.template initializePacket<PacketType>();\n\n      for (Index j = 0; j < NumPerThread; j += unroll_times) {\n        const Index last_col =\n            col_begin + blockDim.x * (j + unroll_times - 1) * packet_width;\n        if (last_col >= num_coeffs_to_reduce) {\n          Index col = col_begin + blockDim.x * j;\n          for (; col + packet_width <= num_coeffs_to_reduce;\n               col += blockDim.x) {\n            const PacketType val1 = input.m_impl.template packet<Unaligned>(\n                row * num_coeffs_to_reduce + col);\n            reducer.reducePacket(val1, &reduced_val1);\n            const PacketType val2 = input.m_impl.template packet<Unaligned>(\n                (row + 1) * num_coeffs_to_reduce + col);\n            reducer.reducePacket(val2, &reduced_val2);\n          }\n          if (col < num_coeffs_to_reduce) {\n            PacketType r1 = reducer.template initializePacket<PacketType>();\n            PacketType r2 = reducer.template initializePacket<PacketType>();\n            half2* hr1 = reinterpret_cast<half2*>(&r1);\n            half2* hr2 = reinterpret_cast<half2*>(&r2);\n            while (col + 1 < num_coeffs_to_reduce) {\n              *hr1 = __halves2half2(\n                  input.m_impl.coeff(row * num_coeffs_to_reduce + col),\n                  input.m_impl.coeff(row * num_coeffs_to_reduce + col + 1));\n              *hr2 = __halves2half2(\n                  input.m_impl.coeff((row + 1) * num_coeffs_to_reduce + col),\n                  input.m_impl.coeff((row + 1) * num_coeffs_to_reduce + col +\n                                     1));\n              hr1++;\n              hr2++;\n              col += 2;\n            }\n            if (col < num_coeffs_to_reduce) {\n              // Peel;\n              const half last1 =\n                  input.m_impl.coeff(row * num_coeffs_to_reduce + col);\n              *hr1 = __halves2half2(last1, reducer.initialize());\n              const half last2 =\n                  input.m_impl.coeff((row + 1) * num_coeffs_to_reduce + col);\n              *hr2 = __halves2half2(last2, reducer.initialize());\n            }\n            reducer.reducePacket(r1, &reduced_val1);\n            reducer.reducePacket(r2, &reduced_val2);\n          }\n          break;\n        } else {\n          // Faster version of the loop with no branches after unrolling.\n#pragma unroll\n          for (int k = 0; k < unroll_times; ++k) {\n            const Index col = col_begin + blockDim.x * (j + k) * packet_width;\n            reducer.reducePacket(input.m_impl.template packet<Unaligned>(\n                                     row * num_coeffs_to_reduce + col),\n                                 &reduced_val1);\n            reducer.reducePacket(input.m_impl.template packet<Unaligned>(\n                                     (row + 1) * num_coeffs_to_reduce + col),\n                                 &reduced_val2);\n          }\n        }\n      }\n\n#pragma unroll\n      for (int offset = warpSize/2; offset > 0; offset /= 2) {\n      #if defined(EIGEN_HIPCC)\n        PacketType r1;\n        PacketType r2;\n        half2* hr1 = reinterpret_cast<half2*>(&r1);\n        half2* hr2 = reinterpret_cast<half2*>(&r2);\n        half2* rv1 = reinterpret_cast<half2*>(&reduced_val1);\n        half2* rv2 = reinterpret_cast<half2*>(&reduced_val2);\n        for (int i = 0; i < packet_width / 2; i++) {\n\t  // FIXME : remove this workaround once we have native half/half2 support for __shfl_down\n\t  union { int i; half2 h; } wka_in1, wka_out1;\n\t  wka_in1.h = rv1[i];\n\t  wka_out1.i = __shfl_down(wka_in1.i, offset, warpSize);\n\t  hr1[i] = wka_out1.h;\n\n\t  union { int i; half2 h; } wka_in2, wka_out2;\n\t  wka_in2.h = rv2[i];\n\t  wka_out2.i = __shfl_down(wka_in2.i, offset, warpSize);\n\t  hr2[i] = wka_out2.h;\n        }\n        reducer.reducePacket(r1, &reduced_val1);\n        reducer.reducePacket(r2, &reduced_val2);\n      #elif defined(EIGEN_CUDA_SDK_VER) && EIGEN_CUDA_SDK_VER < 90000\n        PacketType r1;\n        PacketType r2;\n        half2* hr1 = reinterpret_cast<half2*>(&r1);\n        half2* hr2 = reinterpret_cast<half2*>(&r2);\n        half2* rv1 = reinterpret_cast<half2*>(&reduced_val1);\n        half2* rv2 = reinterpret_cast<half2*>(&reduced_val2);\n        for (int i = 0; i < packet_width / 2; i++) {\n          hr1[i] = __shfl_down(rv1[i], offset, warpSize);\n          hr2[i] = __shfl_down(rv2[i], offset, warpSize);\n        }\n        reducer.reducePacket(r1, &reduced_val1);\n        reducer.reducePacket(r2, &reduced_val2);\n      #else\n        PacketType r1;\n        PacketType r2;\n        half2* hr1 = reinterpret_cast<half2*>(&r1);\n        half2* hr2 = reinterpret_cast<half2*>(&r2);\n        half2* rr1 = reinterpret_cast<half2*>(&reduced_val1);\n        half2* rr2 = reinterpret_cast<half2*>(&reduced_val2);\n        for (int i = 0; i < packet_width / 2; i++) {\n          hr1[i] =\n              __shfl_down_sync(0xFFFFFFFF, rr1[i], (unsigned)offset, warpSize);\n          hr2[i] =\n              __shfl_down_sync(0xFFFFFFFF, rr2[i], (unsigned)offset, warpSize);\n        }\n        reducer.reducePacket(r1, &reduced_val1);\n        reducer.reducePacket(r2, &reduced_val2);\n\n      #endif\n      }\n      half2* rv1 = reinterpret_cast<half2*>(&reduced_val1);\n      half2* rv2 = reinterpret_cast<half2*>(&reduced_val2);\n      half2 val;\n      if (packet_width > 2) {\n        reducer.reducePacket(rv1[2], rv1);\n        reducer.reducePacket(rv1[3], rv1 + 1);\n        reducer.reducePacket(rv1[1], rv1);\n        reducer.reducePacket(rv2[2], rv2);\n        reducer.reducePacket(rv2[3], rv2 + 1);\n        reducer.reducePacket(rv2[1], rv2);\n      }\n      half val1 = __low2half(*rv1);\n      reducer.reduce(__high2half(*rv1), &val1);\n      half val2 = __low2half(*rv2);\n      reducer.reduce(__high2half(*rv2), &val2);\n      val = __halves2half2(val1, val2);\n      if ((threadIdx.x & (warpSize - 1)) == 0) {\n        half* loc = output + row;\n        atomicReduce((half2*)loc, val, reducer);\n      }\n    }\n  }\n}\n\n#endif // EIGEN_HAS_GPU_FP16\n\ntemplate <typename Self, typename Op, typename OutputType, bool PacketAccess, typename Enabled = void>\nstruct InnerReductionLauncher {\n  static EIGEN_DEVICE_FUNC bool run(const Self&, Op&, const GpuDevice&, OutputType*, typename Self::Index, typename Self::Index) {\n    gpu_assert(false && \"Should only be called to reduce doubles, floats and half floats on a gpu device\");\n    return true;\n  }\n};\n\n// Specialization for float and double\ntemplate <typename Self, typename Op, typename OutputType, bool PacketAccess>\nstruct InnerReductionLauncher<\n  Self, Op, OutputType, PacketAccess,\n  typename internal::enable_if<\n    internal::is_same<float, OutputType>::value ||\n    internal::is_same<double, OutputType>::value,\n  void>::type> {\n  static bool run(const Self& self, Op& reducer, const GpuDevice& device, OutputType* output, typename Self::Index num_coeffs_to_reduce, typename Self::Index num_preserved_vals) {\n    typedef typename Self::Index Index;\n\n    const Index num_coeffs = num_coeffs_to_reduce * num_preserved_vals;\n    const int block_size = 256;\n    const int num_per_thread = 128;\n    const int dyn_blocks = divup<int>(num_coeffs, block_size * num_per_thread);\n    const int max_blocks = device.getNumGpuMultiProcessors() *\n                           device.maxGpuThreadsPerMultiProcessor() / block_size;\n    const int num_blocks = numext::mini<int>(max_blocks, dyn_blocks);\n\n    if (num_blocks > 1) {\n      // We initialize the outputs outside the reduction kernel when we can't be sure that there\n      // won't be a race conditions between multiple thread blocks.\n      const int dyn_blocks = divup<int>(num_preserved_vals, 1024);\n      const int max_blocks = device.getNumGpuMultiProcessors() *\n                           device.maxGpuThreadsPerMultiProcessor() / 1024;\n      const int num_blocks = numext::mini<int>(max_blocks, dyn_blocks);\n      LAUNCH_GPU_KERNEL((ReductionInitKernel<OutputType, Index>),\n                         num_blocks, 1024, 0, device, reducer.initialize(),\n                         num_preserved_vals, output);\n    }\n\n    LAUNCH_GPU_KERNEL((InnerReductionKernel<num_per_thread, Self, Op, Index>),\n                       num_blocks, block_size, 0, device, reducer, self, num_coeffs_to_reduce, num_preserved_vals, output);\n\n    return false;\n  }\n};\n\n#ifdef EIGEN_HAS_GPU_FP16\ntemplate <typename Self, typename Op>\nstruct InnerReductionLauncher<Self, Op, Eigen::half, false> {\n  static bool run(const Self&, Op&, const GpuDevice&, half*, typename Self::Index, typename Self::Index) {\n    gpu_assert(false && \"Should not be called since there is no packet accessor\");\n    return true;\n  }\n};\n\ntemplate <typename Self, typename Op>\nstruct InnerReductionLauncher<Self, Op, Eigen::half, true> {\n  static bool run(const Self& self, Op& reducer, const GpuDevice& device, half* output, typename Self::Index num_coeffs_to_reduce, typename Self::Index num_preserved_vals) {\n    typedef typename Self::Index Index;\n\n    if (num_preserved_vals % 2 != 0) {\n      // Not supported yet, revert to the slower code path\n      return true;\n    }\n\n    const Index num_coeffs = num_coeffs_to_reduce * num_preserved_vals;\n    const int block_size = /*256*/128;\n    const int num_per_thread = /*128*/64;\n    const int dyn_blocks = divup<int>(num_coeffs, block_size * num_per_thread);\n    const int max_blocks = device.getNumGpuMultiProcessors() *\n                           device.maxGpuThreadsPerMultiProcessor() / block_size;\n    const int num_blocks = numext::mini<int>(max_blocks, dyn_blocks);\n\n    if (num_blocks > 1) {\n      // We initialize the outputs outside the reduction kernel when we can't be sure that there\n      // won't be a race conditions between multiple thread blocks.\n      LAUNCH_GPU_KERNEL((ReductionInitKernelHalfFloat<Self, Op, Index>),\n                         1, 1, 0, device, reducer, self, num_preserved_vals, output);\n    }\n\n    LAUNCH_GPU_KERNEL((InnerReductionKernelHalfFloat<num_per_thread, Self, Op, Index>),\n                       num_blocks, block_size, 0, device, reducer, self, num_coeffs_to_reduce, num_preserved_vals, output);\n\n    return false;\n  }\n};\n#endif // EIGEN_HAS_GPU_FP16\n\n\ntemplate <typename Self, typename Op>\nstruct InnerReducer<Self, Op, GpuDevice> {\n  // Unfortunately nvidia doesn't support well exotic types such as complex,\n  // so reduce the scope of the optimized version of the code to the simple case\n  // of floats and half floats.\n#ifdef EIGEN_HAS_GPU_FP16\n  static const bool HasOptimizedImplementation = !Self::ReducerTraits::IsStateful &&\n      (internal::is_same<typename Self::CoeffReturnType, float>::value ||\n       internal::is_same<typename Self::CoeffReturnType, double>::value ||\n       (internal::is_same<typename Self::CoeffReturnType, Eigen::half>::value && reducer_traits<Op, GpuDevice>::PacketAccess));\n#else // EIGEN_HAS_GPU_FP16\n  static const bool HasOptimizedImplementation = !Self::ReducerTraits::IsStateful &&\n                                                 (internal::is_same<typename Self::CoeffReturnType, float>::value ||\n                                                  internal::is_same<typename Self::CoeffReturnType, double>::value);\n#endif // EIGEN_HAS_GPU_FP16\n\n  template <typename OutputType>\n  static bool run(const Self& self, Op& reducer, const GpuDevice& device, OutputType* output, typename Self::Index num_coeffs_to_reduce, typename Self::Index num_preserved_vals) {\n    gpu_assert(HasOptimizedImplementation && \"Should only be called on doubles, floats or half floats\");\n    const Index num_coeffs = array_prod(self.m_impl.dimensions());\n    // Don't crash when we're called with an input tensor of size 0.\n    if (num_coeffs == 0) {\n      return true;\n    }\n    // It's faster to use the usual code.\n    if (num_coeffs_to_reduce <= 128) {\n      return true;\n    }\n\n    return InnerReductionLauncher<Self, Op, OutputType, reducer_traits<Op, GpuDevice>::PacketAccess>::run(self, reducer, device, output, num_coeffs_to_reduce, num_preserved_vals);\n  }\n};\n\ntemplate <int NumPerThread, typename Self,\n          typename Reducer, typename Index>\n__global__ void OuterReductionKernel(Reducer reducer, const Self input, Index num_coeffs_to_reduce, Index num_preserved_coeffs,\n                                     typename Self::CoeffReturnType* output) {\n  const Index num_threads = blockDim.x * gridDim.x;\n  const Index thread_id = blockIdx.x * blockDim.x + threadIdx.x;\n  // Initialize the output values if they weren't initialized by the ReductionInitKernel\n  if (gridDim.x == 1) {\n    for (Index i = thread_id; i < num_preserved_coeffs; i += num_threads) {\n      output[i] = reducer.initialize();\n    }\n    __syncthreads();\n  }\n\n  // Do the reduction.\n  const Index max_iter = num_preserved_coeffs * divup<Index>(num_coeffs_to_reduce, NumPerThread);\n  for (Index i = thread_id; i < max_iter; i += num_threads) {\n    const Index input_col = i % num_preserved_coeffs;\n    const Index input_row = (i / num_preserved_coeffs) * NumPerThread;\n    typename Self::CoeffReturnType reduced_val = reducer.initialize();\n    const Index max_row = numext::mini(input_row + NumPerThread, num_coeffs_to_reduce);\n    for (Index j = input_row; j < max_row; j++) {\n      typename Self::CoeffReturnType val = input.m_impl.coeff(j * num_preserved_coeffs + input_col);\n      reducer.reduce(val, &reduced_val);\n    }\n    atomicReduce(&(output[input_col]), reduced_val, reducer);\n  }\n}\n\n\ntemplate <typename Self, typename Op>\nstruct OuterReducer<Self, Op, GpuDevice> {\n  // Unfortunately nvidia doesn't support well exotic types such as complex,\n  // so reduce the scope of the optimized version of the code to the simple case\n  // of floats.\n  static const bool HasOptimizedImplementation = !Self::ReducerTraits::IsStateful &&\n                                                 (internal::is_same<typename Self::CoeffReturnType, float>::value ||\n                                                  internal::is_same<typename Self::CoeffReturnType, double>::value);\n  template <typename Device, typename OutputType>\n  static\n    #if !defined(EIGEN_HIPCC)\n    // FIXME :  leaving this EIGEN_DEVICE_FUNC in, results in the following runtime error\n    //          (in the cxx11_tensor_reduction_gpu test)\n    //\n    // terminate called after throwing an instance of 'std::runtime_error'\n    //   what():  No device code available for function: _ZN5Eigen8internal20OuterReductionKernelIL...\n    //\n    // don't know why this happens (and why is it a runtime error instead of a compile time error)\n    //\n    // this will be fixed by HIP PR#457\n    EIGEN_DEVICE_FUNC\n    #endif\n    bool run(const Self&, Op&, const Device&, OutputType*, typename Self::Index, typename Self::Index) {\n    gpu_assert(false && \"Should only be called to reduce doubles or floats on a gpu device\");\n    return true;\n  }\n\n  static bool run(const Self& self, Op& reducer, const GpuDevice& device, float* output, typename Self::Index num_coeffs_to_reduce, typename Self::Index num_preserved_vals) {\n    typedef typename Self::Index Index;\n\n    // It's faster to use the usual code.\n    if (num_coeffs_to_reduce <= 32) {\n      return true;\n    }\n\n    const Index num_coeffs = num_coeffs_to_reduce * num_preserved_vals;\n    const int block_size = 256;\n    const int num_per_thread = 16;\n    const int dyn_blocks = divup<int>(num_coeffs, block_size * num_per_thread);\n    const int max_blocks = device.getNumGpuMultiProcessors() *\n                           device.maxGpuThreadsPerMultiProcessor() / block_size;\n    const int num_blocks = numext::mini<int>(max_blocks, dyn_blocks);\n\n    if (num_blocks > 1) {\n      // We initialize the outputs in the reduction kernel itself when we don't have to worry\n      // about race conditions between multiple thread blocks.\n      const int dyn_blocks = divup<int>(num_preserved_vals, 1024);\n      const int max_blocks = device.getNumGpuMultiProcessors() *\n                             device.maxGpuThreadsPerMultiProcessor() / 1024;\n      const int num_blocks = numext::mini<int>(max_blocks, dyn_blocks);\n      LAUNCH_GPU_KERNEL((ReductionInitKernel<float, Index>),\n                         num_blocks, 1024, 0, device, reducer.initialize(),\n                         num_preserved_vals, output);\n    }\n\n    LAUNCH_GPU_KERNEL((OuterReductionKernel<num_per_thread, Self, Op, Index>),\n                       num_blocks, block_size, 0, device, reducer, self, num_coeffs_to_reduce, num_preserved_vals, output);\n\n    return false;\n  }\n};\n\n#endif // defined(EIGEN_USE_GPU) && defined(EIGEN_GPUCC)\n\n\n} // end namespace internal\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_REDUCTION_GPU_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorReductionSycl.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Mehdi Goli    Codeplay Software Ltd.\n// Ralph Potter  Codeplay Software Ltd.\n// Luke Iwanski  Codeplay Software Ltd.\n// Contact: <eigen@codeplay.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n/*****************************************************************\n * TensorReductionSycl.h\n *\n * \\brief:\n *  This is the specialization of the reduction operation. Two phase reduction approach \n * is used since the GPU does not have Global Synchronization for global memory among \n * different work-group/thread block. To solve the problem, we need to create two kernels \n * to reduce the data, where the first kernel reduce the data locally and each local \n * workgroup/thread-block save the input data into global memory. In the second phase (global reduction)\n * one work-group uses one work-group/thread-block to reduces the intermediate data into one single element. \n * Here is an NVIDIA presentation explaining the optimized two phase reduction algorithm on GPU:\n * https://developer.download.nvidia.com/assets/cuda/files/reduction.pdf\n *\n *****************************************************************/\n\n#ifndef UNSUPPORTED_EIGEN_CXX11_SRC_TENSOR_TENSOR_REDUCTION_SYCL_HPP\n#define UNSUPPORTED_EIGEN_CXX11_SRC_TENSOR_TENSOR_REDUCTION_SYCL_HPP\nnamespace Eigen {\nnamespace TensorSycl {\nnamespace internal {\n\ntemplate <typename Op, typename CoeffReturnType, typename Index, bool Vectorizable>\nstruct OpDefiner {\n  typedef typename Vectorise<CoeffReturnType, Eigen::SyclDevice, Vectorizable>::PacketReturnType PacketReturnType;\n  typedef Op type;\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE type get_op(Op &op) { return op; }\n\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType finalise_op(const PacketReturnType &accumulator,\n                                                                            const Index &) {\n    return accumulator;\n  }\n};\n\ntemplate <typename CoeffReturnType, typename Index>\nstruct OpDefiner<Eigen::internal::MeanReducer<CoeffReturnType>, CoeffReturnType, Index, false> {\n  typedef Eigen::internal::SumReducer<CoeffReturnType> type;\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE type get_op(Eigen::internal::MeanReducer<CoeffReturnType> &) {\n    return type();\n  }\n\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType finalise_op(const CoeffReturnType &accumulator,\n                                                                           const Index &scale) {\n    ::Eigen::internal::scalar_quotient_op<CoeffReturnType> quotient_op;\n    return quotient_op(accumulator, CoeffReturnType(scale));\n  }\n};\n\ntemplate <typename CoeffReturnType, typename Index>\nstruct OpDefiner<Eigen::internal::MeanReducer<CoeffReturnType>, CoeffReturnType, Index, true> {\n  typedef typename Vectorise<CoeffReturnType, Eigen::SyclDevice, true>::PacketReturnType PacketReturnType;\n  typedef Eigen::internal::SumReducer<CoeffReturnType> type;\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE type get_op(Eigen::internal::MeanReducer<CoeffReturnType> &) {\n    return type();\n  }\n\n  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType finalise_op(const PacketReturnType &accumulator,\n                                                                            const Index &scale) {\n    return ::Eigen::internal::pdiv(accumulator, ::Eigen::internal::pset1<PacketReturnType>(CoeffReturnType(scale)));\n  }\n};\n\ntemplate <typename CoeffReturnType, typename OpType, typename InputAccessor, typename OutputAccessor, typename Index,\n          Index local_range>\nstruct SecondStepFullReducer {\n  typedef cl::sycl::accessor<CoeffReturnType, 1, cl::sycl::access::mode::read_write, cl::sycl::access::target::local>\n      LocalAccessor;\n  typedef OpDefiner<OpType, CoeffReturnType, Index, true> OpDef;\n  typedef typename OpDef::type Op;\n  LocalAccessor scratch;\n  InputAccessor aI;\n  OutputAccessor outAcc;\n  Op op;\n  SecondStepFullReducer(LocalAccessor scratch_, InputAccessor aI_, OutputAccessor outAcc_, OpType op_)\n      : scratch(scratch_), aI(aI_), outAcc(outAcc_), op(OpDef::get_op(op_)) {}\n\n  void operator()(cl::sycl::nd_item<1> itemID) {\n    // Our empirical research shows that the best performance will be achieved\n    // when there is only one element per thread to reduce in the second step.\n    // in this step the second step reduction time is almost negligible.\n    // Hence, in the second step of reduction the input size is fixed to the\n    // local size, thus, there is only one element read per thread. The\n    // algorithm must be changed if the number of reduce per thread in the\n    // second step is greater than 1. Otherwise, the result will be wrong.\n    const Index localid = itemID.get_local_id(0);\n    auto aInPtr = aI.get_pointer() + localid;\n    auto aOutPtr = outAcc.get_pointer();\n    CoeffReturnType *scratchptr = scratch.get_pointer();\n    CoeffReturnType accumulator = *aInPtr;\n\n    scratchptr[localid] = op.finalize(accumulator);\n#pragma unroll 8\n    for (Index offset = itemID.get_local_range(0) / 2; offset > 0; offset /= 2) {\n      itemID.barrier(cl::sycl::access::fence_space::local_space);\n      if (localid < offset) {\n        op.reduce(scratchptr[localid + offset], &accumulator);\n        scratchptr[localid] = op.finalize(accumulator);\n      }\n    }\n    if (localid == 0) *aOutPtr = op.finalize(accumulator);\n  }\n};\n\n// Full reduction first phase. In this version the vectorization is true and the reduction accept \n// any generic reducerOp  e.g( max, min, sum, mean, iamax, iamin, etc ). \ntemplate <typename Evaluator, typename OpType, typename Evaluator::Index local_range>\nclass FullReductionKernelFunctor {\n public:\n  typedef typename Evaluator::CoeffReturnType CoeffReturnType;\n  typedef typename Evaluator::Index Index;\n  typedef OpDefiner<OpType, typename Evaluator::CoeffReturnType, Index,\n                    (Evaluator::ReducerTraits::PacketAccess & Evaluator::InputPacketAccess)>\n      OpDef;\n\n  typedef typename OpDef::type Op;\n  typedef typename Evaluator::EvaluatorPointerType EvaluatorPointerType;\n  typedef typename Evaluator::PacketReturnType PacketReturnType;\n  typedef\n      typename ::Eigen::internal::conditional<(Evaluator::ReducerTraits::PacketAccess & Evaluator::InputPacketAccess),\n                                              PacketReturnType, CoeffReturnType>::type OutType;\n  typedef cl::sycl::accessor<OutType, 1, cl::sycl::access::mode::read_write, cl::sycl::access::target::local>\n      LocalAccessor;\n  LocalAccessor scratch;\n  Evaluator evaluator;\n  EvaluatorPointerType final_output;\n  Index rng;\n  Op op;\n\n  FullReductionKernelFunctor(LocalAccessor scratch_, Evaluator evaluator_, EvaluatorPointerType final_output_,\n                             Index rng_, OpType op_)\n      : scratch(scratch_), evaluator(evaluator_), final_output(final_output_), rng(rng_), op(OpDef::get_op(op_)) {}\n\n  void operator()(cl::sycl::nd_item<1> itemID) { compute_reduction(itemID); }\n\n  template <bool Vect = (Evaluator::ReducerTraits::PacketAccess & Evaluator::InputPacketAccess)>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename ::Eigen::internal::enable_if<Vect>::type compute_reduction(\n      const cl::sycl::nd_item<1> &itemID) {\n    auto output_ptr = final_output.get_pointer();\n    Index VectorizedRange = (rng / Evaluator::PacketSize) * Evaluator::PacketSize;\n    Index globalid = itemID.get_global_id(0);\n    Index localid = itemID.get_local_id(0);\n    Index step = Evaluator::PacketSize * itemID.get_global_range(0);\n    Index start = Evaluator::PacketSize * globalid;\n    // vectorizable parts\n    PacketReturnType packetAccumulator = op.template initializePacket<PacketReturnType>();\n#pragma unroll(8 / Evaluator::PacketSize)\n    for (Index i = start; i < VectorizedRange; i += step) {\n      op.template reducePacket<PacketReturnType>(evaluator.impl().template packet<Unaligned>(i), &packetAccumulator);\n    }\n    globalid += VectorizedRange;\n    // non vectorizable parts\n    for (Index i = globalid; i < rng; i += itemID.get_global_range(0)) {\n      op.template reducePacket<PacketReturnType>(\n          ::Eigen::TensorSycl::internal::PacketWrapper<PacketReturnType, Evaluator::PacketSize>::convert_to_packet_type(\n              evaluator.impl().coeff(i), op.initialize()),\n          &packetAccumulator);\n    }\n    scratch[localid] = packetAccumulator =\n        OpDef::finalise_op(op.template finalizePacket<PacketReturnType>(packetAccumulator), rng);\n    // reduction parts // Local size is always power of 2\n    EIGEN_UNROLL_LOOP\n    for (Index offset = local_range / 2; offset > 0; offset /= 2) {\n      itemID.barrier(cl::sycl::access::fence_space::local_space);\n      if (localid < offset) {\n        op.template reducePacket<PacketReturnType>(scratch[localid + offset], &packetAccumulator);\n        scratch[localid] = op.template finalizePacket<PacketReturnType>(packetAccumulator);\n      }\n    }\n    if (localid == 0) {\n      output_ptr[itemID.get_group(0)] =\n          op.finalizeBoth(op.initialize(), op.template finalizePacket<PacketReturnType>(packetAccumulator));\n    }\n  }\n\n  template <bool Vect = (Evaluator::ReducerTraits::PacketAccess & Evaluator::InputPacketAccess)>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename ::Eigen::internal::enable_if<!Vect>::type compute_reduction(\n      const cl::sycl::nd_item<1> &itemID) {\n    auto output_ptr = final_output.get_pointer();\n    Index globalid = itemID.get_global_id(0);\n    Index localid = itemID.get_local_id(0);\n    // vectorizable parts\n    CoeffReturnType accumulator = op.initialize();\n    // non vectorizable parts\n    for (Index i = globalid; i < rng; i += itemID.get_global_range(0)) {\n      op.reduce(evaluator.impl().coeff(i), &accumulator);\n    }\n    scratch[localid] = accumulator = OpDef::finalise_op(op.finalize(accumulator), rng);\n\n    // reduction parts. the local size is always power of 2\n    EIGEN_UNROLL_LOOP\n    for (Index offset = local_range / 2; offset > 0; offset /= 2) {\n      itemID.barrier(cl::sycl::access::fence_space::local_space);\n      if (localid < offset) {\n        op.reduce(scratch[localid + offset], &accumulator);\n        scratch[localid] = op.finalize(accumulator);\n      }\n    }\n    if (localid == 0) {\n      output_ptr[itemID.get_group(0)] = op.finalize(accumulator);\n    }\n  }\n};\n\ntemplate <typename Evaluator, typename OpType>\nclass GenericNondeterministicReducer {\n public:\n  typedef typename Evaluator::CoeffReturnType CoeffReturnType;\n  typedef typename Evaluator::EvaluatorPointerType EvaluatorPointerType;\n  typedef typename Evaluator::Index Index;\n  typedef OpDefiner<OpType, CoeffReturnType, Index, false> OpDef;\n  typedef typename OpDef::type Op;\n  template <typename Scratch>\n  GenericNondeterministicReducer(Scratch, Evaluator evaluator_, EvaluatorPointerType output_accessor_, OpType functor_,\n                       Index range_, Index num_values_to_reduce_)\n      : evaluator(evaluator_),\n        output_accessor(output_accessor_),\n        functor(OpDef::get_op(functor_)),\n        range(range_),\n        num_values_to_reduce(num_values_to_reduce_) {}\n\n  void operator()(cl::sycl::nd_item<1> itemID) {\n    auto output_accessor_ptr = output_accessor.get_pointer();\n    /// const cast added as a naive solution to solve the qualifier drop error\n    Index globalid = static_cast<Index>(itemID.get_global_linear_id());\n    if (globalid < range) {\n      CoeffReturnType accum = functor.initialize();\n      Eigen::internal::GenericDimReducer<Evaluator::NumReducedDims - 1, Evaluator, Op>::reduce(\n          evaluator, evaluator.firstInput(globalid), functor, &accum);\n      output_accessor_ptr[globalid] = OpDef::finalise_op(functor.finalize(accum), num_values_to_reduce);\n    }\n  }\n\n private:\n  Evaluator evaluator;\n  EvaluatorPointerType output_accessor;\n  Op functor;\n  Index range;\n  Index num_values_to_reduce;\n};\n\nenum class reduction_dim { inner_most, outer_most };\n// default is preserver\ntemplate <typename Evaluator, typename OpType, typename PannelParameters, reduction_dim rt>\nstruct PartialReductionKernel {\n  typedef typename Evaluator::CoeffReturnType CoeffReturnType;\n  typedef typename Evaluator::EvaluatorPointerType EvaluatorPointerType;\n  typedef typename Evaluator::Index Index;\n  typedef OpDefiner<OpType, CoeffReturnType, Index, false> OpDef;\n  typedef typename OpDef::type Op;\n  typedef cl::sycl::accessor<CoeffReturnType, 1, cl::sycl::access::mode::read_write, cl::sycl::access::target::local>\n      ScratchAcc;\n  ScratchAcc scratch;\n  Evaluator evaluator;\n  EvaluatorPointerType output_accessor;\n  Op op;\n  const Index preserve_elements_num_groups;\n  const Index reduce_elements_num_groups;\n  const Index num_coeffs_to_preserve;\n  const Index num_coeffs_to_reduce;\n\n  PartialReductionKernel(ScratchAcc scratch_, Evaluator evaluator_, EvaluatorPointerType output_accessor_, OpType op_,\n                         const Index preserve_elements_num_groups_, const Index reduce_elements_num_groups_,\n                         const Index num_coeffs_to_preserve_, const Index num_coeffs_to_reduce_)\n      : scratch(scratch_),\n        evaluator(evaluator_),\n        output_accessor(output_accessor_),\n        op(OpDef::get_op(op_)),\n        preserve_elements_num_groups(preserve_elements_num_groups_),\n        reduce_elements_num_groups(reduce_elements_num_groups_),\n        num_coeffs_to_preserve(num_coeffs_to_preserve_),\n        num_coeffs_to_reduce(num_coeffs_to_reduce_) {}\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void element_wise_reduce(Index globalRId, Index globalPId,\n                                                                 CoeffReturnType &accumulator) {\n    if (globalPId >= num_coeffs_to_preserve) {\n      return;\n    }\n    Index global_offset = rt == reduction_dim::outer_most ? globalPId + (globalRId * num_coeffs_to_preserve)\n                                                          : globalRId + (globalPId * num_coeffs_to_reduce);\n    Index localOffset = globalRId;\n\n    const Index per_thread_local_stride = PannelParameters::LocalThreadSizeR * reduce_elements_num_groups;\n    const Index per_thread_global_stride =\n        rt == reduction_dim::outer_most ? num_coeffs_to_preserve * per_thread_local_stride : per_thread_local_stride;\n#pragma unroll 8\n    for (Index i = globalRId; i < num_coeffs_to_reduce; i += per_thread_local_stride) {\n      op.reduce(evaluator.impl().coeff(global_offset), &accumulator);\n      localOffset += per_thread_local_stride;\n      global_offset += per_thread_global_stride;\n    }\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void operator()(cl::sycl::nd_item<1> itemID) {\n    const Index linearLocalThreadId = itemID.get_local_id(0);\n    Index pLocalThreadId = rt == reduction_dim::outer_most ? linearLocalThreadId % PannelParameters::LocalThreadSizeP\n                                                           : linearLocalThreadId / PannelParameters::LocalThreadSizeR;\n    Index rLocalThreadId = rt == reduction_dim::outer_most ? linearLocalThreadId / PannelParameters::LocalThreadSizeP\n                                                           : linearLocalThreadId % PannelParameters::LocalThreadSizeR;\n    const Index pGroupId = rt == reduction_dim::outer_most ? itemID.get_group(0) % preserve_elements_num_groups\n                                                           : itemID.get_group(0) / reduce_elements_num_groups;\n    const Index rGroupId = rt == reduction_dim::outer_most ? itemID.get_group(0) / preserve_elements_num_groups\n                                                           : itemID.get_group(0) % reduce_elements_num_groups;\n\n    Index globalPId = pGroupId * PannelParameters::LocalThreadSizeP + pLocalThreadId;\n    const Index globalRId = rGroupId * PannelParameters::LocalThreadSizeR + rLocalThreadId;\n    auto scratchPtr = scratch.get_pointer().get();\n    auto outPtr =\n        output_accessor.get_pointer() + (reduce_elements_num_groups > 1 ? rGroupId * num_coeffs_to_preserve : 0);\n    CoeffReturnType accumulator = op.initialize();\n\n    element_wise_reduce(globalRId, globalPId, accumulator);\n\n    accumulator = OpDef::finalise_op(op.finalize(accumulator), num_coeffs_to_reduce);\n    scratchPtr[pLocalThreadId + rLocalThreadId * (PannelParameters::LocalThreadSizeP + PannelParameters::BC)] =\n        accumulator;\n    if (rt == reduction_dim::inner_most) {\n      pLocalThreadId = linearLocalThreadId % PannelParameters::LocalThreadSizeP;\n      rLocalThreadId = linearLocalThreadId / PannelParameters::LocalThreadSizeP;\n      globalPId = pGroupId * PannelParameters::LocalThreadSizeP + pLocalThreadId;\n    }\n\n    /* Apply the reduction operation between the current local\n     * id and the one on the other half of the vector. */\n    auto out_scratch_ptr =\n        scratchPtr + (pLocalThreadId + (rLocalThreadId * (PannelParameters::LocalThreadSizeP + PannelParameters::BC)));\n    itemID.barrier(cl::sycl::access::fence_space::local_space);\n    if (rt == reduction_dim::inner_most) {\n      accumulator = *out_scratch_ptr;\n    }\n    // The Local LocalThreadSizeR is always power of 2\n    EIGEN_UNROLL_LOOP\n    for (Index offset = PannelParameters::LocalThreadSizeR >> 1; offset > 0; offset >>= 1) {\n      if (rLocalThreadId < offset) {\n        op.reduce(out_scratch_ptr[(PannelParameters::LocalThreadSizeP + PannelParameters::BC) * offset], &accumulator);\n        // The result has already been divided for mean reducer in the\n        // previous reduction so no need to divide furthermore\n        *out_scratch_ptr = op.finalize(accumulator);\n      }\n      /* All threads collectively read from global memory into local.\n       * The barrier ensures all threads' IO is resolved before\n       * execution continues (strictly speaking, all threads within\n       * a single work-group - there is no co-ordination between\n       * work-groups, only work-items). */\n      itemID.barrier(cl::sycl::access::fence_space::local_space);\n    }\n\n    if (rLocalThreadId == 0 && (globalPId < num_coeffs_to_preserve)) {\n      outPtr[globalPId] = op.finalize(accumulator);\n    }\n  }\n};\n\ntemplate <typename OutScalar, typename Index, typename InputAccessor, typename OutputAccessor, typename OpType>\nstruct SecondStepPartialReduction {\n  typedef OpDefiner<OpType, OutScalar, Index, false> OpDef;\n  typedef typename OpDef::type Op;\n  typedef cl::sycl::accessor<OutScalar, 1, cl::sycl::access::mode::read_write, cl::sycl::access::target::local>\n      ScratchAccessor;\n  InputAccessor input_accessor;\n  OutputAccessor output_accessor;\n  Op op;\n  const Index num_coeffs_to_preserve;\n  const Index num_coeffs_to_reduce;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE SecondStepPartialReduction(ScratchAccessor, InputAccessor input_accessor_,\n                                                                   OutputAccessor output_accessor_, OpType op_,\n                                                                   const Index num_coeffs_to_preserve_,\n                                                                   const Index num_coeffs_to_reduce_)\n      : input_accessor(input_accessor_),\n        output_accessor(output_accessor_),\n        op(OpDef::get_op(op_)),\n        num_coeffs_to_preserve(num_coeffs_to_preserve_),\n        num_coeffs_to_reduce(num_coeffs_to_reduce_) {}\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void operator()(cl::sycl::nd_item<1> itemID) {\n    const Index globalId = itemID.get_global_id(0);\n\n    if (globalId >= num_coeffs_to_preserve) return;\n\n    auto in_ptr = input_accessor.get_pointer() + globalId;\n\n    OutScalar accumulator = op.initialize();\n// num_coeffs_to_reduce is not bigger that 256\n#pragma unroll 8\n    for (Index i = 0; i < num_coeffs_to_reduce; i++) {\n      op.reduce(*in_ptr, &accumulator);\n      in_ptr += num_coeffs_to_preserve;\n    }\n    output_accessor.get_pointer()[globalId] = op.finalize(accumulator);\n  }\n};  // namespace internal\n\ntemplate <typename Index, Index LTP, Index LTR, bool BC_>\nstruct ReductionPannel {\n  static EIGEN_CONSTEXPR Index LocalThreadSizeP = LTP;\n  static EIGEN_CONSTEXPR Index LocalThreadSizeR = LTR;\n  static EIGEN_CONSTEXPR bool BC = BC_;\n};\n\ntemplate <typename Self, typename Op, TensorSycl::internal::reduction_dim rt>\nstruct PartialReducerLauncher {\n  typedef typename Self::EvaluatorPointerType EvaluatorPointerType;\n  typedef typename Self::CoeffReturnType CoeffReturnType;\n  typedef typename Self::Storage Storage;\n  typedef typename Self::Index Index;\n  typedef ReductionPannel<typename Self::Index, EIGEN_SYCL_LOCAL_THREAD_DIM0, EIGEN_SYCL_LOCAL_THREAD_DIM1, true>\n      PannelParameters;\n\n  typedef PartialReductionKernel<Self, Op, PannelParameters, rt> SyclReducerKerneType;\n\n  static bool run(const Self &self, const Op &reducer, const Eigen::SyclDevice &dev, EvaluatorPointerType output,\n                  Index num_coeffs_to_reduce, Index num_coeffs_to_preserve) {\n    Index roundUpP = roundUp(num_coeffs_to_preserve, PannelParameters::LocalThreadSizeP);\n\n    // getPowerOfTwo makes sure local range is power of 2 and <=\n    // maxSyclThreadPerBlock this will help us to avoid extra check on the\n    // kernel\n    static_assert(!((PannelParameters::LocalThreadSizeP * PannelParameters::LocalThreadSizeR) &\n                    (PannelParameters::LocalThreadSizeP * PannelParameters::LocalThreadSizeR - 1)),\n                  \"The Local thread size must be a power of 2 for the reduction \"\n                  \"operation\");\n\n    EIGEN_CONSTEXPR Index localRange = PannelParameters::LocalThreadSizeP * PannelParameters::LocalThreadSizeR;\n    // In this step, we force the code not to be more than 2-step reduction:\n    // Our empirical research shows that if each thread reduces at least 64\n    // elemnts individually, we get better performance. However, this can change\n    // on different platforms. In this step we force the code not to be\n    // morthan step reduction: Our empirical research shows that for inner_most\n    // dim reducer, it is better to have 8 group in a reduce dimension for sizes\n    // > 1024 to achieve the best performance.\n    const Index reductionPerThread = 64;\n    Index cu = dev.getPowerOfTwo(dev.getNumSyclMultiProcessors(), true);\n    const Index pNumGroups = roundUpP / PannelParameters::LocalThreadSizeP;\n    Index rGroups = (cu + pNumGroups - 1) / pNumGroups;\n    const Index rNumGroups = num_coeffs_to_reduce > reductionPerThread * localRange ? std::min(rGroups, localRange) : 1;\n    const Index globalRange = pNumGroups * rNumGroups * localRange;\n\n    EIGEN_CONSTEXPR Index scratchSize =\n        PannelParameters::LocalThreadSizeR * (PannelParameters::LocalThreadSizeP + PannelParameters::BC);\n    auto thread_range = cl::sycl::nd_range<1>(cl::sycl::range<1>(globalRange), cl::sycl::range<1>(localRange));\n    if (rNumGroups > 1) {\n      CoeffReturnType *temp_pointer = static_cast<CoeffReturnType *>(\n          dev.allocate_temp(num_coeffs_to_preserve * rNumGroups * sizeof(CoeffReturnType)));\n      EvaluatorPointerType temp_accessor = dev.get(temp_pointer);\n      dev.template unary_kernel_launcher<CoeffReturnType, SyclReducerKerneType>(\n          self, temp_accessor, thread_range, scratchSize, reducer, pNumGroups, rNumGroups, num_coeffs_to_preserve,\n          num_coeffs_to_reduce);\n\n      typedef SecondStepPartialReduction<CoeffReturnType, Index, EvaluatorPointerType, EvaluatorPointerType, Op>\n          SecondStepPartialReductionKernel;\n\n      dev.template unary_kernel_launcher<CoeffReturnType, SecondStepPartialReductionKernel>(\n          temp_accessor, output,\n          cl::sycl::nd_range<1>(cl::sycl::range<1>(pNumGroups * localRange), cl::sycl::range<1>(localRange)), Index(1),\n          reducer, num_coeffs_to_preserve, rNumGroups);\n\n      self.device().deallocate_temp(temp_pointer);\n    } else {\n      dev.template unary_kernel_launcher<CoeffReturnType, SyclReducerKerneType>(\n          self, output, thread_range, scratchSize, reducer, pNumGroups, rNumGroups, num_coeffs_to_preserve,\n          num_coeffs_to_reduce);\n    }\n    return false;\n  }\n};\n}  // namespace internal\n}  // namespace TensorSycl\n\nnamespace internal {\n\ntemplate <typename Self, typename Op, bool Vectorizable>\nstruct FullReducer<Self, Op, Eigen::SyclDevice, Vectorizable> {\n  typedef typename Self::CoeffReturnType CoeffReturnType;\n  typedef typename Self::EvaluatorPointerType EvaluatorPointerType;\n  static EIGEN_CONSTEXPR bool HasOptimizedImplementation = true;\n  static EIGEN_CONSTEXPR int PacketSize = Self::PacketAccess ? Self::PacketSize : 1;\n  static void run(const Self &self, Op &reducer, const Eigen::SyclDevice &dev, EvaluatorPointerType data) {\n    typedef typename conditional<Self::PacketAccess, typename Self::PacketReturnType, CoeffReturnType>::type OutType;\n    static_assert(!((EIGEN_SYCL_LOCAL_THREAD_DIM0 * EIGEN_SYCL_LOCAL_THREAD_DIM1) &\n                    (EIGEN_SYCL_LOCAL_THREAD_DIM0 * EIGEN_SYCL_LOCAL_THREAD_DIM1 - 1)),\n                  \"The Local thread size must be a power of 2 for the reduction \"\n                  \"operation\");\n    EIGEN_CONSTEXPR Index local_range = EIGEN_SYCL_LOCAL_THREAD_DIM0 * EIGEN_SYCL_LOCAL_THREAD_DIM1;\n\n    typename Self::Index inputSize = self.impl().dimensions().TotalSize();\n    // In this step we force the code not to be more than 2-step reduction:\n    // Our empirical research shows that if each thread reduces at least 512\n    // elemnts individually, we get better performance.\n    const Index reductionPerThread = 2048;\n    // const Index num_work_group =\n    Index reductionGroup = dev.getPowerOfTwo(\n        (inputSize + (reductionPerThread * local_range - 1)) / (reductionPerThread * local_range), true);\n    const Index num_work_group = std::min(reductionGroup, local_range);\n    // 1\n    // ? local_range\n    // : 1);\n    const Index global_range = num_work_group * local_range;\n\n    auto thread_range = cl::sycl::nd_range<1>(cl::sycl::range<1>(global_range), cl::sycl::range<1>(local_range));\n    typedef TensorSycl::internal::FullReductionKernelFunctor<Self, Op, local_range> reduction_kernel_t;\n    if (num_work_group > 1) {\n      CoeffReturnType *temp_pointer =\n          static_cast<CoeffReturnType *>(dev.allocate_temp(num_work_group * sizeof(CoeffReturnType)));\n      typename Self::EvaluatorPointerType tmp_global_accessor = dev.get(temp_pointer);\n      dev.template unary_kernel_launcher<OutType, reduction_kernel_t>(self, tmp_global_accessor, thread_range,\n                                                                      local_range, inputSize, reducer);\n\n      typedef TensorSycl::internal::SecondStepFullReducer<CoeffReturnType, Op, EvaluatorPointerType,\n                                                          EvaluatorPointerType, Index, local_range>\n          GenericRKernel;\n      dev.template unary_kernel_launcher<CoeffReturnType, GenericRKernel>(\n          tmp_global_accessor, data,\n          cl::sycl::nd_range<1>(cl::sycl::range<1>(num_work_group), cl::sycl::range<1>(num_work_group)), num_work_group,\n          reducer);\n\n      dev.deallocate_temp(temp_pointer);\n    } else {\n      dev.template unary_kernel_launcher<OutType, reduction_kernel_t>(self, data, thread_range, local_range, inputSize,\n                                                                      reducer);\n    }\n  }\n};\n// vectorizable inner_most most dim preserver\n// col reduction\ntemplate <typename Self, typename Op>\nstruct OuterReducer<Self, Op, Eigen::SyclDevice> {\n  static EIGEN_CONSTEXPR bool HasOptimizedImplementation = true;\n\n  static bool run(const Self &self, const Op &reducer, const Eigen::SyclDevice &dev,\n                  typename Self::EvaluatorPointerType output, typename Self::Index num_coeffs_to_reduce,\n                  typename Self::Index num_coeffs_to_preserve) {\n    return ::Eigen::TensorSycl::internal::PartialReducerLauncher<\n        Self, Op, ::Eigen::TensorSycl::internal::reduction_dim::outer_most>::run(self, reducer, dev, output,\n                                                                                 num_coeffs_to_reduce,\n                                                                                 num_coeffs_to_preserve);\n  }\n};\n// row reduction\ntemplate <typename Self, typename Op>\nstruct InnerReducer<Self, Op, Eigen::SyclDevice> {\n  static EIGEN_CONSTEXPR bool HasOptimizedImplementation = true;\n\n  static bool run(const Self &self, const Op &reducer, const Eigen::SyclDevice &dev,\n                  typename Self::EvaluatorPointerType output, typename Self::Index num_coeffs_to_reduce,\n                  typename Self::Index num_coeffs_to_preserve) {\n    return ::Eigen::TensorSycl::internal::PartialReducerLauncher<\n        Self, Op, ::Eigen::TensorSycl::internal::reduction_dim::inner_most>::run(self, reducer, dev, output,\n                                                                                 num_coeffs_to_reduce,\n                                                                                 num_coeffs_to_preserve);\n  }\n};\n\n// ArmgMax uses this kernel for partial reduction//\n// TODO(@mehdi.goli) come up with a better kernel\n// generic partial reduction\ntemplate <typename Self, typename Op>\nstruct GenericReducer<Self, Op, Eigen::SyclDevice> {\n  static EIGEN_CONSTEXPR bool HasOptimizedImplementation = false;\n  static bool run(const Self &self, const Op &reducer, const Eigen::SyclDevice &dev,\n                  typename Self::EvaluatorPointerType output, typename Self::Index num_values_to_reduce,\n                  typename Self::Index num_coeffs_to_preserve) {\n    typename Self::Index range, GRange, tileSize;\n    dev.parallel_for_setup(num_coeffs_to_preserve, tileSize, range, GRange);\n\n    dev.template unary_kernel_launcher<typename Self::CoeffReturnType,\n                                       TensorSycl::internal::GenericNondeterministicReducer<Self, Op>>(\n        self, output, cl::sycl::nd_range<1>(cl::sycl::range<1>(GRange), cl::sycl::range<1>(tileSize)), Index(1),\n        reducer, range, (num_values_to_reduce != 0) ? num_values_to_reduce : static_cast<Index>(1));\n    return false;\n  }\n};\n\n}  // namespace internal\n}  // namespace Eigen\n\n#endif  // UNSUPPORTED_EIGEN_CXX11_SRC_TENSOR_TENSOR_REDUCTION_SYCL_HPP\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorRef.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_REF_H\n#define EIGEN_CXX11_TENSOR_TENSOR_REF_H\n\nnamespace Eigen {\n\nnamespace internal {\n\ntemplate <typename Dimensions, typename Scalar>\nclass TensorLazyBaseEvaluator {\n public:\n  TensorLazyBaseEvaluator() : m_refcount(0) { }\n  virtual ~TensorLazyBaseEvaluator() { }\n\n  EIGEN_DEVICE_FUNC virtual const Dimensions& dimensions() const = 0;\n  EIGEN_DEVICE_FUNC virtual const Scalar* data() const = 0;\n\n  EIGEN_DEVICE_FUNC virtual const Scalar coeff(DenseIndex index) const = 0;\n  EIGEN_DEVICE_FUNC virtual Scalar& coeffRef(DenseIndex index) = 0;\n\n  void incrRefCount() { ++m_refcount; }\n  void decrRefCount() { --m_refcount; }\n  int refCount() const { return m_refcount; }\n\n private:\n  // No copy, no assignment;\n  TensorLazyBaseEvaluator(const TensorLazyBaseEvaluator& other);\n  TensorLazyBaseEvaluator& operator = (const TensorLazyBaseEvaluator& other);\n\n  int m_refcount;\n};\n\n\ntemplate <typename Dimensions, typename Expr, typename Device>\nclass TensorLazyEvaluatorReadOnly : public TensorLazyBaseEvaluator<Dimensions, typename TensorEvaluator<Expr, Device>::Scalar> {\n public:\n  //  typedef typename TensorEvaluator<Expr, Device>::Dimensions Dimensions;\n  typedef typename TensorEvaluator<Expr, Device>::Scalar Scalar;\n  typedef StorageMemory<Scalar, Device> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n  typedef  TensorEvaluator<Expr, Device> EvalType;\n\n  TensorLazyEvaluatorReadOnly(const Expr& expr, const Device& device) : m_impl(expr, device), m_dummy(Scalar(0)) {\n    m_dims = m_impl.dimensions();\n    m_impl.evalSubExprsIfNeeded(NULL);\n  }\n  virtual ~TensorLazyEvaluatorReadOnly() {\n    m_impl.cleanup();\n  }\n\n  EIGEN_DEVICE_FUNC virtual const Dimensions& dimensions() const {\n    return m_dims;\n  }\n  EIGEN_DEVICE_FUNC virtual const Scalar* data() const {\n    return m_impl.data();\n  }\n\n  EIGEN_DEVICE_FUNC virtual const Scalar coeff(DenseIndex index) const {\n    return m_impl.coeff(index);\n  }\n  EIGEN_DEVICE_FUNC virtual Scalar& coeffRef(DenseIndex /*index*/) {\n    eigen_assert(false && \"can't reference the coefficient of a rvalue\");\n    return m_dummy;\n  };\n\n protected:\n  TensorEvaluator<Expr, Device> m_impl;\n  Dimensions m_dims;\n  Scalar m_dummy;\n};\n\ntemplate <typename Dimensions, typename Expr, typename Device>\nclass TensorLazyEvaluatorWritable : public TensorLazyEvaluatorReadOnly<Dimensions, Expr, Device> {\n public:\n  typedef TensorLazyEvaluatorReadOnly<Dimensions, Expr, Device> Base;\n  typedef typename Base::Scalar Scalar;\n  typedef StorageMemory<Scalar, Device> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n\n  TensorLazyEvaluatorWritable(const Expr& expr, const Device& device) : Base(expr, device) {\n  }\n  virtual ~TensorLazyEvaluatorWritable() {\n  }\n\n  EIGEN_DEVICE_FUNC virtual Scalar& coeffRef(DenseIndex index) {\n    return this->m_impl.coeffRef(index);\n  }\n};\n\ntemplate <typename Dimensions, typename Expr, typename Device>\nclass TensorLazyEvaluator : public internal::conditional<bool(internal::is_lvalue<Expr>::value),\n                            TensorLazyEvaluatorWritable<Dimensions, Expr, Device>,\n                            TensorLazyEvaluatorReadOnly<Dimensions, const Expr, Device> >::type {\n public:\n  typedef typename internal::conditional<bool(internal::is_lvalue<Expr>::value),\n                                         TensorLazyEvaluatorWritable<Dimensions, Expr, Device>,\n                                         TensorLazyEvaluatorReadOnly<Dimensions, const Expr, Device> >::type Base;\n  typedef typename Base::Scalar Scalar;\n\n  TensorLazyEvaluator(const Expr& expr, const Device& device) : Base(expr, device) {\n  }\n  virtual ~TensorLazyEvaluator() {\n  }\n};\n\n}  // namespace internal\n\n\n/** \\class TensorRef\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief A reference to a tensor expression\n  * The expression will be evaluated lazily (as much as possible).\n  *\n  */\ntemplate<typename PlainObjectType> class TensorRef : public TensorBase<TensorRef<PlainObjectType> >\n{\n  public:\n    typedef TensorRef<PlainObjectType> Self;\n    typedef typename PlainObjectType::Base Base;\n    typedef typename Eigen::internal::nested<Self>::type Nested;\n    typedef typename internal::traits<PlainObjectType>::StorageKind StorageKind;\n    typedef typename internal::traits<PlainObjectType>::Index Index;\n    typedef typename internal::traits<PlainObjectType>::Scalar Scalar;\n    typedef typename NumTraits<Scalar>::Real RealScalar;\n    typedef typename Base::CoeffReturnType CoeffReturnType;\n    typedef Scalar* PointerType;\n    typedef PointerType PointerArgType;\n\n    static const Index NumIndices = PlainObjectType::NumIndices;\n    typedef typename PlainObjectType::Dimensions Dimensions;\n\n    enum {\n      IsAligned = false,\n      PacketAccess = false,\n      BlockAccess = false,\n      PreferBlockAccess = false,\n      Layout = PlainObjectType::Layout,\n      CoordAccess = false,  // to be implemented\n      RawAccess = false\n    };\n\n    //===- Tensor block evaluation strategy (see TensorBlock.h) -----------===//\n    typedef internal::TensorBlockNotImplemented TensorBlock;\n    //===------------------------------------------------------------------===//\n\n    EIGEN_STRONG_INLINE TensorRef() : m_evaluator(NULL) {\n    }\n\n    template <typename Expression>\n    EIGEN_STRONG_INLINE TensorRef(const Expression& expr) : m_evaluator(new internal::TensorLazyEvaluator<Dimensions, Expression, DefaultDevice>(expr, DefaultDevice())) {\n      m_evaluator->incrRefCount();\n    }\n\n    template <typename Expression>\n    EIGEN_STRONG_INLINE TensorRef& operator = (const Expression& expr) {\n      unrefEvaluator();\n      m_evaluator = new internal::TensorLazyEvaluator<Dimensions, Expression, DefaultDevice>(expr, DefaultDevice());\n      m_evaluator->incrRefCount();\n      return *this;\n    }\n\n    ~TensorRef() {\n      unrefEvaluator();\n    }\n\n    TensorRef(const TensorRef& other) : m_evaluator(other.m_evaluator) {\n      eigen_assert(m_evaluator->refCount() > 0);\n      m_evaluator->incrRefCount();\n    }\n\n    TensorRef& operator = (const TensorRef& other) {\n      if (this != &other) {\n        unrefEvaluator();\n        m_evaluator = other.m_evaluator;\n        eigen_assert(m_evaluator->refCount() > 0);\n        m_evaluator->incrRefCount();\n      }\n      return *this;\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Index rank() const { return m_evaluator->dimensions().size(); }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Index dimension(Index n) const { return m_evaluator->dimensions()[n]; }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const Dimensions& dimensions() const { return m_evaluator->dimensions(); }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Index size() const { return m_evaluator->dimensions().TotalSize(); }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const Scalar* data() const { return m_evaluator->data(); }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const Scalar operator()(Index index) const\n    {\n      return m_evaluator->coeff(index);\n    }\n\n#if EIGEN_HAS_VARIADIC_TEMPLATES\n    template<typename... IndexTypes> EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const Scalar operator()(Index firstIndex, IndexTypes... otherIndices) const\n    {\n      const std::size_t num_indices = (sizeof...(otherIndices) + 1);\n      const array<Index, num_indices> indices{{firstIndex, otherIndices...}};\n      return coeff(indices);\n    }\n    template<typename... IndexTypes> EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Scalar& coeffRef(Index firstIndex, IndexTypes... otherIndices)\n    {\n      const std::size_t num_indices = (sizeof...(otherIndices) + 1);\n      const array<Index, num_indices> indices{{firstIndex, otherIndices...}};\n      return coeffRef(indices);\n    }\n#else\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const Scalar operator()(Index i0, Index i1) const\n    {\n      array<Index, 2> indices;\n      indices[0] = i0;\n      indices[1] = i1;\n      return coeff(indices);\n    }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const Scalar operator()(Index i0, Index i1, Index i2) const\n    {\n      array<Index, 3> indices;\n      indices[0] = i0;\n      indices[1] = i1;\n      indices[2] = i2;\n      return coeff(indices);\n    }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const Scalar operator()(Index i0, Index i1, Index i2, Index i3) const\n    {\n      array<Index, 4> indices;\n      indices[0] = i0;\n      indices[1] = i1;\n      indices[2] = i2;\n      indices[3] = i3;\n      return coeff(indices);\n    }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const Scalar operator()(Index i0, Index i1, Index i2, Index i3, Index i4) const\n    {\n      array<Index, 5> indices;\n      indices[0] = i0;\n      indices[1] = i1;\n      indices[2] = i2;\n      indices[3] = i3;\n      indices[4] = i4;\n      return coeff(indices);\n    }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Scalar& coeffRef(Index i0, Index i1)\n    {\n      array<Index, 2> indices;\n      indices[0] = i0;\n      indices[1] = i1;\n      return coeffRef(indices);\n    }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Scalar& coeffRef(Index i0, Index i1, Index i2)\n    {\n      array<Index, 3> indices;\n      indices[0] = i0;\n      indices[1] = i1;\n      indices[2] = i2;\n      return coeffRef(indices);\n    }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Scalar& operator()(Index i0, Index i1, Index i2, Index i3)\n    {\n      array<Index, 4> indices;\n      indices[0] = i0;\n      indices[1] = i1;\n      indices[2] = i2;\n      indices[3] = i3;\n      return coeffRef(indices);\n    }\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Scalar& coeffRef(Index i0, Index i1, Index i2, Index i3, Index i4)\n    {\n      array<Index, 5> indices;\n      indices[0] = i0;\n      indices[1] = i1;\n      indices[2] = i2;\n      indices[3] = i3;\n      indices[4] = i4;\n      return coeffRef(indices);\n    }\n#endif\n\n    template <std::size_t NumIndices> EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const Scalar coeff(const array<Index, NumIndices>& indices) const\n    {\n      const Dimensions& dims = this->dimensions();\n      Index index = 0;\n      if (PlainObjectType::Options & RowMajor) {\n        index += indices[0];\n        for (size_t i = 1; i < NumIndices; ++i) {\n          index = index * dims[i] + indices[i];\n        }\n      } else {\n        index += indices[NumIndices-1];\n        for (int i = NumIndices-2; i >= 0; --i) {\n          index = index * dims[i] + indices[i];\n        }\n      }\n      return m_evaluator->coeff(index);\n    }\n    template <std::size_t NumIndices> EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Scalar& coeffRef(const array<Index, NumIndices>& indices)\n    {\n      const Dimensions& dims = this->dimensions();\n      Index index = 0;\n      if (PlainObjectType::Options & RowMajor) {\n        index += indices[0];\n        for (size_t i = 1; i < NumIndices; ++i) {\n          index = index * dims[i] + indices[i];\n        }\n      } else {\n        index += indices[NumIndices-1];\n        for (int i = NumIndices-2; i >= 0; --i) {\n          index = index * dims[i] + indices[i];\n        }\n      }\n      return m_evaluator->coeffRef(index);\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE const Scalar coeff(Index index) const\n    {\n      return m_evaluator->coeff(index);\n    }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE Scalar& coeffRef(Index index)\n    {\n      return m_evaluator->coeffRef(index);\n    }\n\n  private:\n    EIGEN_STRONG_INLINE void unrefEvaluator() {\n      if (m_evaluator) {\n        m_evaluator->decrRefCount();\n        if (m_evaluator->refCount() == 0) {\n          delete m_evaluator;\n        }\n      }\n    }\n\n  internal::TensorLazyBaseEvaluator<Dimensions, Scalar>* m_evaluator;\n};\n\n\n// evaluator for rvalues\ntemplate<typename Derived, typename Device>\nstruct TensorEvaluator<const TensorRef<Derived>, Device>\n{\n  typedef typename Derived::Index Index;\n  typedef typename Derived::Scalar Scalar;\n  typedef typename Derived::Scalar CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  typedef typename Derived::Dimensions Dimensions;\n  typedef StorageMemory<CoeffReturnType, Device> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n\n  enum {\n    IsAligned = false,\n    PacketAccess = false,\n    BlockAccess = false,\n    PreferBlockAccess = false,\n    Layout = TensorRef<Derived>::Layout,\n    CoordAccess = false,  // to be implemented\n    RawAccess = false\n  };\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockNotImplemented TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const TensorRef<Derived>& m, const Device&)\n      : m_ref(m)\n  { }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions& dimensions() const { return m_ref.dimensions(); }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType) {\n    return true;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() { }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const {\n    return m_ref.coeff(index);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& coeffRef(Index index) {\n    return m_ref.coeffRef(index);\n  }\n\n  EIGEN_DEVICE_FUNC const Scalar* data() const { return m_ref.data(); }\n\n protected:\n  TensorRef<Derived> m_ref;\n};\n\n\n// evaluator for lvalues\ntemplate<typename Derived, typename Device>\nstruct TensorEvaluator<TensorRef<Derived>, Device> : public TensorEvaluator<const TensorRef<Derived>, Device>\n{\n  typedef typename Derived::Index Index;\n  typedef typename Derived::Scalar Scalar;\n  typedef typename Derived::Scalar CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  typedef typename Derived::Dimensions Dimensions;\n\n  typedef TensorEvaluator<const TensorRef<Derived>, Device> Base;\n\n  enum {\n    IsAligned = false,\n    PacketAccess = false,\n    BlockAccess = false,\n    PreferBlockAccess = false,\n    RawAccess = false\n  };\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockNotImplemented TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(TensorRef<Derived>& m, const Device& d) : Base(m, d)\n  { }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& coeffRef(Index index) {\n    return this->m_ref.coeffRef(index);\n  }\n};\n\n\n\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_REF_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorReverse.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Navdeep Jaitly <ndjaitly@google.com>\n//                    Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_REVERSE_H\n#define EIGEN_CXX11_TENSOR_TENSOR_REVERSE_H\nnamespace Eigen {\n\n/** \\class TensorReverse\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief Tensor reverse elements class.\n  *\n  */\nnamespace internal {\ntemplate<typename ReverseDimensions, typename XprType>\nstruct traits<TensorReverseOp<ReverseDimensions,\n                              XprType> > : public traits<XprType>\n{\n  typedef typename XprType::Scalar Scalar;\n  typedef traits<XprType> XprTraits;\n  typedef typename XprTraits::StorageKind StorageKind;\n  typedef typename XprTraits::Index Index;\n  typedef typename XprType::Nested Nested;\n  typedef typename remove_reference<Nested>::type _Nested;\n  static const int NumDimensions = XprTraits::NumDimensions;\n  static const int Layout = XprTraits::Layout;\n  typedef typename XprTraits::PointerType PointerType;\n};\n\ntemplate<typename ReverseDimensions, typename XprType>\nstruct eval<TensorReverseOp<ReverseDimensions, XprType>, Eigen::Dense>\n{\n  typedef const TensorReverseOp<ReverseDimensions, XprType>& type;\n};\n\ntemplate<typename ReverseDimensions, typename XprType>\nstruct nested<TensorReverseOp<ReverseDimensions, XprType>, 1,\n            typename eval<TensorReverseOp<ReverseDimensions, XprType> >::type>\n{\n  typedef TensorReverseOp<ReverseDimensions, XprType> type;\n};\n\n}  // end namespace internal\n\ntemplate<typename ReverseDimensions, typename XprType>\nclass TensorReverseOp : public TensorBase<TensorReverseOp<ReverseDimensions,\n                                          XprType>, WriteAccessors>\n{\n  public:\n  typedef typename Eigen::internal::traits<TensorReverseOp>::Scalar Scalar;\n  typedef typename Eigen::NumTraits<Scalar>::Real RealScalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename Eigen::internal::nested<TensorReverseOp>::type Nested;\n  typedef typename Eigen::internal::traits<TensorReverseOp>::StorageKind\n                                                                    StorageKind;\n  typedef typename Eigen::internal::traits<TensorReverseOp>::Index Index;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorReverseOp(\n      const XprType& expr, const ReverseDimensions& reverse_dims)\n      : m_xpr(expr), m_reverse_dims(reverse_dims) { }\n\n    EIGEN_DEVICE_FUNC\n    const ReverseDimensions& reverse() const { return m_reverse_dims; }\n\n    EIGEN_DEVICE_FUNC\n    const typename internal::remove_all<typename XprType::Nested>::type&\n    expression() const { return m_xpr; }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE TensorReverseOp& operator = (const TensorReverseOp& other)\n    {\n      typedef TensorAssignOp<TensorReverseOp, const TensorReverseOp> Assign;\n      Assign assign(*this, other);\n      internal::TensorExecutor<const Assign, DefaultDevice>::run(assign, DefaultDevice());\n      return *this;\n    }\n\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE TensorReverseOp& operator = (const OtherDerived& other)\n    {\n      typedef TensorAssignOp<TensorReverseOp, const OtherDerived> Assign;\n      Assign assign(*this, other);\n      internal::TensorExecutor<const Assign, DefaultDevice>::run(assign, DefaultDevice());\n      return *this;\n    }\n\n  protected:\n    typename XprType::Nested m_xpr;\n    const ReverseDimensions m_reverse_dims;\n};\n\n// Eval as rvalue\ntemplate<typename ReverseDimensions, typename ArgType, typename Device>\nstruct TensorEvaluator<const TensorReverseOp<ReverseDimensions, ArgType>, Device>\n{\n  typedef TensorReverseOp<ReverseDimensions, ArgType> XprType;\n  typedef typename XprType::Index Index;\n  static const int NumDims = internal::array_size<ReverseDimensions>::value;\n  typedef DSizes<Index, NumDims> Dimensions;\n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  static const int PacketSize = PacketType<CoeffReturnType, Device>::size;\n  typedef StorageMemory<CoeffReturnType, Device> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n\n  enum {\n    IsAligned         = false,\n    PacketAccess      = TensorEvaluator<ArgType, Device>::PacketAccess,\n    BlockAccess       = NumDims > 0,\n    PreferBlockAccess = true,\n    Layout            = TensorEvaluator<ArgType, Device>::Layout,\n    CoordAccess       = false,  // to be implemented\n    RawAccess         = false\n  };\n\n  typedef internal::TensorIntDivisor<Index> IndexDivisor;\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockDescriptor<NumDims, Index> TensorBlockDesc;\n  typedef internal::TensorBlockScratchAllocator<Device> TensorBlockScratch;\n\n  typedef typename TensorEvaluator<const ArgType, Device>::TensorBlock\n      ArgTensorBlock;\n\n  typedef typename internal::TensorMaterializedBlock<CoeffReturnType, NumDims,\n                                                     Layout, Index>\n      TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op,\n                                                        const Device& device)\n      : m_impl(op.expression(), device),\n        m_reverse(op.reverse()),\n        m_device(device)\n  {\n    // Reversing a scalar isn't supported yet. It would be a no-op anyway.\n    EIGEN_STATIC_ASSERT((NumDims > 0), YOU_MADE_A_PROGRAMMING_MISTAKE);\n\n    // Compute strides\n    m_dimensions = m_impl.dimensions();\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      m_strides[0] = 1;\n      for (int i = 1; i < NumDims; ++i) {\n        m_strides[i] = m_strides[i-1] * m_dimensions[i-1];\n        if (m_strides[i] > 0) m_fastStrides[i] = IndexDivisor(m_strides[i]);\n      }\n    } else {\n      m_strides[NumDims-1] = 1;\n      for (int i = NumDims - 2; i >= 0; --i) {\n        m_strides[i] = m_strides[i+1] * m_dimensions[i+1];\n        if (m_strides[i] > 0) m_fastStrides[i] = IndexDivisor(m_strides[i]);\n      }\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  const Dimensions& dimensions() const { return m_dimensions; }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType) {\n    m_impl.evalSubExprsIfNeeded(NULL);\n    return true;\n  }\n\n#ifdef EIGEN_USE_THREADS\n  template <typename EvalSubExprsCallback>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalSubExprsIfNeededAsync(\n      EvaluatorPointerType, EvalSubExprsCallback done) {\n    m_impl.evalSubExprsIfNeededAsync(nullptr, [done](bool) { done(true); });\n  }\n#endif  // EIGEN_USE_THREADS\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {\n    m_impl.cleanup();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index reverseIndex(\n      Index index) const {\n    eigen_assert(index < dimensions().TotalSize());\n    Index inputIndex = 0;\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      EIGEN_UNROLL_LOOP\n      for (int i = NumDims - 1; i > 0; --i) {\n        Index idx = index / m_fastStrides[i];\n        index -= idx * m_strides[i];\n        if (m_reverse[i]) {\n          idx = m_dimensions[i] - idx - 1;\n        }\n        inputIndex += idx * m_strides[i] ;\n      }\n      if (m_reverse[0]) {\n        inputIndex += (m_dimensions[0] - index - 1);\n      } else {\n        inputIndex += index;\n      }\n    } else {\n      EIGEN_UNROLL_LOOP\n      for (int i = 0; i < NumDims - 1; ++i) {\n        Index idx = index / m_fastStrides[i];\n        index -= idx * m_strides[i];\n        if (m_reverse[i]) {\n          idx = m_dimensions[i] - idx - 1;\n        }\n        inputIndex += idx * m_strides[i] ;\n      }\n      if (m_reverse[NumDims-1]) {\n        inputIndex += (m_dimensions[NumDims-1] - index - 1);\n      } else {\n        inputIndex += index;\n      }\n    }\n    return inputIndex;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(\n      Index index) const  {\n    return m_impl.coeff(reverseIndex(index));\n  }\n\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  PacketReturnType packet(Index index) const\n  {\n    EIGEN_STATIC_ASSERT((PacketSize > 1), YOU_MADE_A_PROGRAMMING_MISTAKE)\n    eigen_assert(index+PacketSize-1 < dimensions().TotalSize());\n\n    // TODO(ndjaitly): write a better packing routine that uses\n    // local structure.\n    EIGEN_ALIGN_MAX typename internal::remove_const<CoeffReturnType>::type\n                                                            values[PacketSize];\n    EIGEN_UNROLL_LOOP\n    for (int i = 0; i < PacketSize; ++i) {\n      values[i] = coeff(index+i);\n    }\n    PacketReturnType rslt = internal::pload<PacketReturnType>(values);\n    return rslt;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  internal::TensorBlockResourceRequirements getResourceRequirements() const {\n    const size_t target_size = m_device.lastLevelCacheSize();\n    // Block evaluation reads underlying memory in reverse order, and default\n    // cost model does not properly catch this in bytes stored/loaded.\n    return internal::TensorBlockResourceRequirements::skewed<Scalar>(\n               target_size)\n        .addCostPerCoeff({0, 0, 24});\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorBlock\n  block(TensorBlockDesc& desc, TensorBlockScratch& scratch,\n          bool /*root_of_expr_ast*/ = false) const {\n    // TODO(ezhulenev): If underlying tensor expression supports and prefers\n    // block evaluation we must use it. Currently we use coeff and packet\n    // access into the underlying tensor expression.\n    // static const bool useBlockAccessForArgType =\n    //     TensorEvaluator<ArgType, Device>::BlockAccess &&\n    //     TensorEvaluator<ArgType, Device>::PreferBlockAccess;\n\n    static const bool isColMajor =\n        static_cast<int>(Layout) == static_cast<int>(ColMajor);\n\n    static const Index inner_dim_idx = isColMajor ? 0 : NumDims - 1;\n    const bool inner_dim_reversed = m_reverse[inner_dim_idx];\n\n    // Offset in the output block.\n    Index block_offset = 0;\n\n    // Offset in the input Tensor.\n    Index input_offset = reverseIndex(desc.offset());\n\n    // Initialize output block iterator state. Dimension in this array are\n    // always in inner_most -> outer_most order (col major layout).\n    array<BlockIteratorState, NumDims> it;\n    for (int i = 0; i < NumDims; ++i) {\n      const int dim = isColMajor ? i : NumDims - 1 - i;\n      it[i].size = desc.dimension(dim);\n      it[i].count = 0;\n      it[i].reverse = m_reverse[dim];\n\n      it[i].block_stride =\n          i == 0 ? 1 : (it[i - 1].size * it[i - 1].block_stride);\n      it[i].block_span = it[i].block_stride * (it[i].size - 1);\n\n      it[i].input_stride = m_strides[dim];\n      it[i].input_span = it[i].input_stride * (it[i].size - 1);\n\n      if (it[i].reverse) {\n        it[i].input_stride = -1 * it[i].input_stride;\n        it[i].input_span = -1 * it[i].input_span;\n      }\n    }\n\n    // If multiple inner dimensions have the same reverse flag, check if we can\n    // merge them into a single virtual inner dimension.\n    int effective_inner_dim = 0;\n    for (int i = 1; i < NumDims; ++i) {\n      if (it[i].reverse != it[effective_inner_dim].reverse) break;\n      if (it[i].block_stride != it[effective_inner_dim].size) break;\n      if (it[i].block_stride != numext::abs(it[i].input_stride)) break;\n\n      it[i].size = it[effective_inner_dim].size * it[i].size;\n\n      it[i].block_stride = 1;\n      it[i].input_stride = (inner_dim_reversed ? -1 : 1);\n\n      it[i].block_span = it[i].block_stride * (it[i].size - 1);\n      it[i].input_span = it[i].input_stride * (it[i].size - 1);\n\n      effective_inner_dim = i;\n    }\n\n    eigen_assert(it[effective_inner_dim].block_stride == 1);\n    eigen_assert(it[effective_inner_dim].input_stride ==\n                 (inner_dim_reversed ? -1 : 1));\n\n    const Index inner_dim_size = it[effective_inner_dim].size;\n\n    // Prepare storage for the materialized reverse result.\n    const typename TensorBlock::Storage block_storage =\n        TensorBlock::prepareStorage(desc, scratch);\n    CoeffReturnType* block_buffer = block_storage.data();\n\n    while (it[NumDims - 1].count < it[NumDims - 1].size) {\n      // Copy inner-most dimension data from reversed location in input.\n      Index dst = block_offset;\n      Index src = input_offset;\n\n      // NOTE(ezhulenev): Adding vectorized path with internal::preverse showed\n      // worse results in benchmarks than a simple coefficient loop.\n      if (inner_dim_reversed) {\n        for (Index i = 0; i < inner_dim_size; ++i) {\n          block_buffer[dst] = m_impl.coeff(src);\n          ++dst;\n          --src;\n        }\n      } else {\n        for (Index i = 0; i < inner_dim_size; ++i) {\n          block_buffer[dst] = m_impl.coeff(src);\n          ++dst;\n          ++src;\n        }\n      }\n\n      // For the 1d tensor we need to generate only one inner-most dimension.\n      if ((NumDims - effective_inner_dim) == 1) break;\n\n      // Update offset.\n      for (Index i = effective_inner_dim + 1; i < NumDims; ++i) {\n        if (++it[i].count < it[i].size) {\n          block_offset += it[i].block_stride;\n          input_offset += it[i].input_stride;\n          break;\n        }\n        if (i != NumDims - 1) it[i].count = 0;\n        block_offset -= it[i].block_span;\n        input_offset -= it[i].input_span;\n      }\n    }\n\n    return block_storage.AsTensorMaterializedBlock();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool vectorized) const {\n    double compute_cost = NumDims * (2 * TensorOpCost::AddCost<Index>() +\n                                     2 * TensorOpCost::MulCost<Index>() +\n                                     TensorOpCost::DivCost<Index>());\n    for (int i = 0; i < NumDims; ++i) {\n      if (m_reverse[i]) {\n        compute_cost += 2 * TensorOpCost::AddCost<Index>();\n      }\n    }\n    return m_impl.costPerCoeff(vectorized) +\n           TensorOpCost(0, 0, compute_cost, false /* vectorized */, PacketSize);\n  }\n\n  EIGEN_DEVICE_FUNC typename Storage::Type data() const { return NULL; }\n\n#ifdef EIGEN_USE_SYCL\n  // binding placeholder accessors to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {\n    m_impl.bind(cgh);\n  }\n#endif\n\n protected:\n  Dimensions m_dimensions;\n  array<Index, NumDims> m_strides;\n  array<IndexDivisor, NumDims> m_fastStrides;\n  TensorEvaluator<ArgType, Device> m_impl;\n  ReverseDimensions m_reverse;\n  const Device EIGEN_DEVICE_REF m_device;\n\n private:\n  struct BlockIteratorState {\n    BlockIteratorState()\n        : size(0),\n          count(0),\n          reverse(false),\n          block_stride(0),\n          block_span(0),\n          input_stride(0),\n          input_span(0) {}\n\n    Index size;\n    Index count;\n    bool reverse;\n    Index block_stride;\n    Index block_span;\n    Index input_stride;\n    Index input_span;\n  };\n};\n\n// Eval as lvalue\n\ntemplate <typename ReverseDimensions, typename ArgType, typename Device>\nstruct TensorEvaluator<TensorReverseOp<ReverseDimensions, ArgType>, Device>\n    : public TensorEvaluator<const TensorReverseOp<ReverseDimensions, ArgType>,\n                             Device> {\n  typedef TensorEvaluator<const TensorReverseOp<ReverseDimensions, ArgType>,\n                          Device> Base;\n  typedef TensorReverseOp<ReverseDimensions, ArgType> XprType;\n  typedef typename XprType::Index Index;\n  static const int NumDims = internal::array_size<ReverseDimensions>::value;\n  typedef DSizes<Index, NumDims> Dimensions;\n\n  enum {\n    IsAligned = false,\n    PacketAccess = TensorEvaluator<ArgType, Device>::PacketAccess,\n    BlockAccess = false,\n    PreferBlockAccess = false,\n    Layout = TensorEvaluator<ArgType, Device>::Layout,\n    CoordAccess = false,  // to be implemented\n    RawAccess = false\n  };\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op,\n                                                        const Device& device)\n      : Base(op, device) {}\n\n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  static const int PacketSize = PacketType<CoeffReturnType, Device>::size;\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockNotImplemented TensorBlock;\n  //===--------------------------------------------------------------------===//\n  \n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  const Dimensions& dimensions() const { return this->m_dimensions; }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& coeffRef(Index index) {\n    return this->m_impl.coeffRef(this->reverseIndex(index));\n  }\n\n  template <int StoreMode> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  void writePacket(Index index, const PacketReturnType& x) {\n    EIGEN_STATIC_ASSERT((PacketSize > 1), YOU_MADE_A_PROGRAMMING_MISTAKE)\n    eigen_assert(index+PacketSize-1 < dimensions().TotalSize());\n\n    // This code is pilfered from TensorMorphing.h\n    EIGEN_ALIGN_MAX CoeffReturnType values[PacketSize];\n    internal::pstore<CoeffReturnType, PacketReturnType>(values, x);\n    EIGEN_UNROLL_LOOP\n    for (int i = 0; i < PacketSize; ++i) {\n      this->coeffRef(index+i) = values[i];\n    }\n  }\n};\n\n\n}  // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_REVERSE_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorScan.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Igor Babuschkin <igor@babuschk.in>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_SCAN_H\n#define EIGEN_CXX11_TENSOR_TENSOR_SCAN_H\n\nnamespace Eigen {\n\nnamespace internal {\n\ntemplate <typename Op, typename XprType>\nstruct traits<TensorScanOp<Op, XprType> >\n    : public traits<XprType> {\n  typedef typename XprType::Scalar Scalar;\n  typedef traits<XprType> XprTraits;\n  typedef typename XprTraits::StorageKind StorageKind;\n  typedef typename XprType::Nested Nested;\n  typedef typename remove_reference<Nested>::type _Nested;\n  static const int NumDimensions = XprTraits::NumDimensions;\n  static const int Layout = XprTraits::Layout;\n  typedef typename XprTraits::PointerType PointerType;\n};\n\ntemplate<typename Op, typename XprType>\nstruct eval<TensorScanOp<Op, XprType>, Eigen::Dense>\n{\n  typedef const TensorScanOp<Op, XprType>& type;\n};\n\ntemplate<typename Op, typename XprType>\nstruct nested<TensorScanOp<Op, XprType>, 1,\n            typename eval<TensorScanOp<Op, XprType> >::type>\n{\n  typedef TensorScanOp<Op, XprType> type;\n};\n} // end namespace internal\n\n/** \\class TensorScan\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief Tensor scan class.\n  */\ntemplate <typename Op, typename XprType>\nclass TensorScanOp\n    : public TensorBase<TensorScanOp<Op, XprType>, ReadOnlyAccessors> {\npublic:\n  typedef typename Eigen::internal::traits<TensorScanOp>::Scalar Scalar;\n  typedef typename Eigen::NumTraits<Scalar>::Real RealScalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename Eigen::internal::nested<TensorScanOp>::type Nested;\n  typedef typename Eigen::internal::traits<TensorScanOp>::StorageKind StorageKind;\n  typedef typename Eigen::internal::traits<TensorScanOp>::Index Index;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorScanOp(\n      const XprType& expr, const Index& axis, bool exclusive = false, const Op& op = Op())\n      : m_expr(expr), m_axis(axis), m_accumulator(op), m_exclusive(exclusive) {}\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  const Index axis() const { return m_axis; }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  const XprType& expression() const { return m_expr; }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  const Op accumulator() const { return m_accumulator; }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  bool exclusive() const { return m_exclusive; }\n\nprotected:\n  typename XprType::Nested m_expr;\n  const Index m_axis;\n  const Op m_accumulator;\n  const bool m_exclusive;\n};\n\ntemplate <typename Self, typename Reducer, typename Device>\nstruct ScanLauncher;\n\n// Eval as rvalue\ntemplate <typename Op, typename ArgType, typename Device>\nstruct TensorEvaluator<const TensorScanOp<Op, ArgType>, Device> {\n\n  typedef TensorScanOp<Op, ArgType> XprType;\n  typedef typename XprType::Index Index;\n  typedef const ArgType ChildType;\n  static const int NumDims = internal::array_size<typename TensorEvaluator<ArgType, Device>::Dimensions>::value;\n  typedef DSizes<Index, NumDims> Dimensions;\n  typedef typename internal::remove_const<typename XprType::Scalar>::type Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  typedef TensorEvaluator<const TensorScanOp<Op, ArgType>, Device> Self;\n  typedef StorageMemory<Scalar, Device> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n\n  enum {\n    IsAligned = false,\n    PacketAccess = (PacketType<CoeffReturnType, Device>::size > 1),\n    BlockAccess = false,\n    PreferBlockAccess = false,\n    Layout = TensorEvaluator<ArgType, Device>::Layout,\n    CoordAccess = false,\n    RawAccess = true\n  };\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockNotImplemented TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op,\n                                                        const Device& device)\n      : m_impl(op.expression(), device),\n        m_device(device),\n        m_exclusive(op.exclusive()),\n        m_accumulator(op.accumulator()),\n        m_size(m_impl.dimensions()[op.axis()]),\n        m_stride(1), m_consume_dim(op.axis()),\n        m_output(NULL) {\n\n    // Accumulating a scalar isn't supported.\n    EIGEN_STATIC_ASSERT((NumDims > 0), YOU_MADE_A_PROGRAMMING_MISTAKE);\n    eigen_assert(op.axis() >= 0 && op.axis() < NumDims);\n\n    // Compute stride of scan axis\n    const Dimensions& dims = m_impl.dimensions();\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      for (int i = 0; i < op.axis(); ++i) {\n        m_stride = m_stride * dims[i];\n      }\n    } else {\n      // dims can only be indexed through unsigned integers,\n      // so let's use an unsigned type to let the compiler knows.\n      // This prevents stupid warnings: \"\"'*((void*)(& evaluator)+64)[18446744073709551615]' may be used uninitialized in this function\"\n      unsigned int axis = internal::convert_index<unsigned int>(op.axis());\n      for (unsigned int i = NumDims - 1; i > axis; --i) {\n        m_stride = m_stride * dims[i];\n      }\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions& dimensions() const {\n    return m_impl.dimensions();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Index& stride() const {\n    return m_stride;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Index& consume_dim() const {\n    return m_consume_dim;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Index& size() const {\n    return m_size;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Op& accumulator() const {\n    return m_accumulator;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool exclusive() const {\n    return m_exclusive;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorEvaluator<ArgType, Device>& inner() const {\n    return m_impl;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Device& device() const {\n    return m_device;\n  }\n\n  EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType data) {\n    m_impl.evalSubExprsIfNeeded(NULL);\n    ScanLauncher<Self, Op, Device> launcher;\n    if (data) {\n      launcher(*this, data);\n      return false;\n    }\n\n    const Index total_size = internal::array_prod(dimensions());\n    m_output = static_cast<EvaluatorPointerType>(m_device.get((Scalar*) m_device.allocate_temp(total_size * sizeof(Scalar))));\n    launcher(*this, m_output);\n    return true;\n  }\n\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC PacketReturnType packet(Index index) const {\n    return internal::ploadt<PacketReturnType, LoadMode>(m_output + index);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EvaluatorPointerType data() const\n  {\n    return m_output;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const\n  {\n    return m_output[index];\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool) const {\n    return TensorOpCost(sizeof(CoeffReturnType), 0, 0);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {\n    if (m_output) {\n      m_device.deallocate_temp(m_output);\n      m_output = NULL;\n    }\n    m_impl.cleanup();\n  }\n\n#ifdef EIGEN_USE_SYCL\n // binding placeholder accessors to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {\n    m_impl.bind(cgh);\n    m_output.bind(cgh);\n  }\n#endif\nprotected:\n  TensorEvaluator<ArgType, Device> m_impl;\n  const Device EIGEN_DEVICE_REF m_device;\n  const bool m_exclusive;\n  Op m_accumulator;\n  const Index m_size;\n  Index m_stride;\n  Index m_consume_dim;\n  EvaluatorPointerType m_output;\n};\n\n// CPU implementation of scan\n// TODO(ibab) This single-threaded implementation should be parallelized,\n// at least by running multiple scans at the same time.\ntemplate <typename Self, typename Reducer, typename Device>\nstruct ScanLauncher {\n  void operator()(Self& self, typename Self::CoeffReturnType *data) {\n    Index total_size = internal::array_prod(self.dimensions());\n\n    // We fix the index along the scan axis to 0 and perform a\n    // scan per remaining entry. The iteration is split into two nested\n    // loops to avoid an integer division by keeping track of each idx1 and idx2.\n    for (Index idx1 = 0; idx1 < total_size; idx1 += self.stride() * self.size()) {\n      for (Index idx2 = 0; idx2 < self.stride(); idx2++) {\n        // Calculate the starting offset for the scan\n        Index offset = idx1 + idx2;\n\n        // Compute the scan along the axis, starting at the calculated offset\n        typename Self::CoeffReturnType accum = self.accumulator().initialize();\n        for (Index idx3 = 0; idx3 < self.size(); idx3++) {\n          Index curr = offset + idx3 * self.stride();\n\n          if (self.exclusive()) {\n            data[curr] = self.accumulator().finalize(accum);\n            self.accumulator().reduce(self.inner().coeff(curr), &accum);\n          } else {\n            self.accumulator().reduce(self.inner().coeff(curr), &accum);\n            data[curr] = self.accumulator().finalize(accum);\n          }\n        }\n      }\n    }\n  }\n};\n\n#if defined(EIGEN_USE_GPU) && (defined(EIGEN_GPUCC))\n\n// GPU implementation of scan\n// TODO(ibab) This placeholder implementation performs multiple scans in\n// parallel, but it would be better to use a parallel scan algorithm and\n// optimize memory access.\ntemplate <typename Self, typename Reducer>\n__global__ void ScanKernel(Self self, Index total_size, typename Self::CoeffReturnType* data) {\n  // Compute offset as in the CPU version\n  Index val = threadIdx.x + blockIdx.x * blockDim.x;\n  Index offset = (val / self.stride()) * self.stride() * self.size() + val % self.stride();\n\n  if (offset + (self.size() - 1) * self.stride() < total_size) {\n    // Compute the scan along the axis, starting at the calculated offset\n    typename Self::CoeffReturnType accum = self.accumulator().initialize();\n    for (Index idx = 0; idx < self.size(); idx++) {\n      Index curr = offset + idx * self.stride();\n      if (self.exclusive()) {\n        data[curr] = self.accumulator().finalize(accum);\n        self.accumulator().reduce(self.inner().coeff(curr), &accum);\n      } else {\n        self.accumulator().reduce(self.inner().coeff(curr), &accum);\n        data[curr] = self.accumulator().finalize(accum);\n      }\n    }\n  }\n  __syncthreads();\n\n}\n\ntemplate <typename Self, typename Reducer>\nstruct ScanLauncher<Self, Reducer, GpuDevice> {\n  void operator()(const Self& self, typename Self::CoeffReturnType* data) {\n     Index total_size = internal::array_prod(self.dimensions());\n     Index num_blocks = (total_size / self.size() + 63) / 64;\n     Index block_size = 64;\n\n     LAUNCH_GPU_KERNEL((ScanKernel<Self, Reducer>), num_blocks, block_size, 0, self.device(), self, total_size, data);\n  }\n};\n#endif  // EIGEN_USE_GPU && (EIGEN_GPUCC)\n\n}  // end namespace Eigen\n\n#endif  // EIGEN_CXX11_TENSOR_TENSOR_SCAN_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorScanSycl.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Mehdi Goli    Codeplay Software Ltd.\n// Ralph Potter  Codeplay Software Ltd.\n// Luke Iwanski  Codeplay Software Ltd.\n// Contact: <eigen@codeplay.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n/*****************************************************************\n * TensorScanSycl.h\n *\n * \\brief:\n *  Tensor Scan Sycl implement the extend  version of\n * \"Efficient parallel scan algorithms for GPUs.\" .for Tensor operations.\n * The algorithm requires up to 3 stage (consequently 3 kernels) depending on\n * the size of the tensor. In the first kernel (ScanKernelFunctor), each\n * threads within the work-group individually reduces the allocated elements per\n * thread in order to reduces the total number of blocks. In the next step all\n * thread within the work-group will reduce the associated blocks into the\n * temporary buffers. In the next kernel(ScanBlockKernelFunctor), the temporary\n * buffer is given as an input and all the threads within a work-group scan and\n * reduces the boundaries between the blocks (generated from the previous\n * kernel). and write the data on the temporary buffer. If the second kernel is\n * required, the third and final kerenl (ScanAdjustmentKernelFunctor) will\n * adjust the final result into the output buffer.\n * The original algorithm for the parallel prefix sum can be found here:\n *\n * Sengupta, Shubhabrata, Mark Harris, and Michael Garland. \"Efficient parallel\n * scan algorithms for GPUs.\" NVIDIA, Santa Clara, CA, Tech. Rep. NVR-2008-003\n *1, no. 1 (2008): 1-17.\n *****************************************************************/\n\n#ifndef UNSUPPORTED_EIGEN_CXX11_SRC_TENSOR_TENSOR_SYCL_SYCL_HPP\n#define UNSUPPORTED_EIGEN_CXX11_SRC_TENSOR_TENSOR_SYCL_SYCL_HPP\n\nnamespace Eigen {\nnamespace TensorSycl {\nnamespace internal {\n\n#ifndef EIGEN_SYCL_MAX_GLOBAL_RANGE\n#define EIGEN_SYCL_MAX_GLOBAL_RANGE (EIGEN_SYCL_LOCAL_THREAD_DIM0 * EIGEN_SYCL_LOCAL_THREAD_DIM1 * 4)\n#endif\n\ntemplate <typename index_t>\nstruct ScanParameters {\n  // must be power of 2\n  static EIGEN_CONSTEXPR index_t ScanPerThread = 8;\n  const index_t total_size;\n  const index_t non_scan_size;\n  const index_t scan_size;\n  const index_t non_scan_stride;\n  const index_t scan_stride;\n  const index_t panel_threads;\n  const index_t group_threads;\n  const index_t block_threads;\n  const index_t elements_per_group;\n  const index_t elements_per_block;\n  const index_t loop_range;\n\n  ScanParameters(index_t total_size_, index_t non_scan_size_, index_t scan_size_, index_t non_scan_stride_,\n                 index_t scan_stride_, index_t panel_threads_, index_t group_threads_, index_t block_threads_,\n                 index_t elements_per_group_, index_t elements_per_block_, index_t loop_range_)\n      : total_size(total_size_),\n        non_scan_size(non_scan_size_),\n        scan_size(scan_size_),\n        non_scan_stride(non_scan_stride_),\n        scan_stride(scan_stride_),\n        panel_threads(panel_threads_),\n        group_threads(group_threads_),\n        block_threads(block_threads_),\n        elements_per_group(elements_per_group_),\n        elements_per_block(elements_per_block_),\n        loop_range(loop_range_) {}\n};\n\nenum class scan_step { first, second };\ntemplate <typename Evaluator, typename CoeffReturnType, typename OutAccessor, typename Op, typename Index,\n          scan_step stp>\nstruct ScanKernelFunctor {\n  typedef cl::sycl::accessor<CoeffReturnType, 1, cl::sycl::access::mode::read_write, cl::sycl::access::target::local>\n      LocalAccessor;\n  static EIGEN_CONSTEXPR int PacketSize = ScanParameters<Index>::ScanPerThread / 2;\n\n  LocalAccessor scratch;\n  Evaluator dev_eval;\n  OutAccessor out_accessor;\n  OutAccessor temp_accessor;\n  const ScanParameters<Index> scanParameters;\n  Op accumulator;\n  const bool inclusive;\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ScanKernelFunctor(LocalAccessor scratch_, const Evaluator dev_eval_,\n                                                          OutAccessor out_accessor_, OutAccessor temp_accessor_,\n                                                          const ScanParameters<Index> scanParameters_, Op accumulator_,\n                                                          const bool inclusive_)\n      : scratch(scratch_),\n        dev_eval(dev_eval_),\n        out_accessor(out_accessor_),\n        temp_accessor(temp_accessor_),\n        scanParameters(scanParameters_),\n        accumulator(accumulator_),\n        inclusive(inclusive_) {}\n\n  template <scan_step sst = stp, typename Input>\n  typename ::Eigen::internal::enable_if<sst == scan_step::first, CoeffReturnType>::type EIGEN_DEVICE_FUNC\n      EIGEN_STRONG_INLINE\n      read(const Input &inpt, Index global_id) {\n    return inpt.coeff(global_id);\n  }\n\n  template <scan_step sst = stp, typename Input>\n  typename ::Eigen::internal::enable_if<sst != scan_step::first, CoeffReturnType>::type EIGEN_DEVICE_FUNC\n      EIGEN_STRONG_INLINE\n      read(const Input &inpt, Index global_id) {\n    return inpt[global_id];\n  }\n\n  template <scan_step sst = stp, typename InclusiveOp>\n  typename ::Eigen::internal::enable_if<sst == scan_step::first>::type EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  first_step_inclusive_Operation(InclusiveOp inclusive_op) {\n    inclusive_op();\n  }\n\n  template <scan_step sst = stp, typename InclusiveOp>\n  typename ::Eigen::internal::enable_if<sst != scan_step::first>::type EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  first_step_inclusive_Operation(InclusiveOp) {}\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void operator()(cl::sycl::nd_item<1> itemID) {\n    auto out_ptr = out_accessor.get_pointer();\n    auto tmp_ptr = temp_accessor.get_pointer();\n    auto scratch_ptr = scratch.get_pointer().get();\n\n    for (Index loop_offset = 0; loop_offset < scanParameters.loop_range; loop_offset++) {\n      Index data_offset = (itemID.get_global_id(0) + (itemID.get_global_range(0) * loop_offset));\n      Index tmp = data_offset % scanParameters.panel_threads;\n      const Index panel_id = data_offset / scanParameters.panel_threads;\n      const Index group_id = tmp / scanParameters.group_threads;\n      tmp = tmp % scanParameters.group_threads;\n      const Index block_id = tmp / scanParameters.block_threads;\n      const Index local_id = tmp % scanParameters.block_threads;\n      // we put one element per packet in scratch_mem\n      const Index scratch_stride = scanParameters.elements_per_block / PacketSize;\n      const Index scratch_offset = (itemID.get_local_id(0) / scanParameters.block_threads) * scratch_stride;\n      CoeffReturnType private_scan[ScanParameters<Index>::ScanPerThread];\n      CoeffReturnType inclusive_scan;\n      // the actual panel size is scan_size * non_scan_size.\n      // elements_per_panel is roundup to power of 2 for binary tree\n      const Index panel_offset = panel_id * scanParameters.scan_size * scanParameters.non_scan_size;\n      const Index group_offset = group_id * scanParameters.non_scan_stride;\n      // This will be effective when the size is bigger than elements_per_block\n      const Index block_offset = block_id * scanParameters.elements_per_block * scanParameters.scan_stride;\n      const Index thread_offset = (ScanParameters<Index>::ScanPerThread * local_id * scanParameters.scan_stride);\n      const Index global_offset = panel_offset + group_offset + block_offset + thread_offset;\n      Index next_elements = 0;\n      EIGEN_UNROLL_LOOP\n      for (int i = 0; i < ScanParameters<Index>::ScanPerThread; i++) {\n        Index global_id = global_offset + next_elements;\n        private_scan[i] = ((((block_id * scanParameters.elements_per_block) +\n                             (ScanParameters<Index>::ScanPerThread * local_id) + i) < scanParameters.scan_size) &&\n                           (global_id < scanParameters.total_size))\n                              ? read(dev_eval, global_id)\n                              : accumulator.initialize();\n        next_elements += scanParameters.scan_stride;\n      }\n      first_step_inclusive_Operation([&]() EIGEN_DEVICE_FUNC {\n        if (inclusive) {\n          inclusive_scan = private_scan[ScanParameters<Index>::ScanPerThread - 1];\n        }\n      });\n      // This for loop must be 2\n      EIGEN_UNROLL_LOOP\n      for (int packetIndex = 0; packetIndex < ScanParameters<Index>::ScanPerThread; packetIndex += PacketSize) {\n        Index private_offset = 1;\n        // build sum in place up the tree\n        EIGEN_UNROLL_LOOP\n        for (Index d = PacketSize >> 1; d > 0; d >>= 1) {\n          EIGEN_UNROLL_LOOP\n          for (Index l = 0; l < d; l++) {\n            Index ai = private_offset * (2 * l + 1) - 1 + packetIndex;\n            Index bi = private_offset * (2 * l + 2) - 1 + packetIndex;\n            CoeffReturnType accum = accumulator.initialize();\n            accumulator.reduce(private_scan[ai], &accum);\n            accumulator.reduce(private_scan[bi], &accum);\n            private_scan[bi] = accumulator.finalize(accum);\n          }\n          private_offset *= 2;\n        }\n        scratch_ptr[2 * local_id + (packetIndex / PacketSize) + scratch_offset] =\n            private_scan[PacketSize - 1 + packetIndex];\n        private_scan[PacketSize - 1 + packetIndex] = accumulator.initialize();\n        // traverse down tree & build scan\n        EIGEN_UNROLL_LOOP\n        for (Index d = 1; d < PacketSize; d *= 2) {\n          private_offset >>= 1;\n          EIGEN_UNROLL_LOOP\n          for (Index l = 0; l < d; l++) {\n            Index ai = private_offset * (2 * l + 1) - 1 + packetIndex;\n            Index bi = private_offset * (2 * l + 2) - 1 + packetIndex;\n            CoeffReturnType accum = accumulator.initialize();\n            accumulator.reduce(private_scan[ai], &accum);\n            accumulator.reduce(private_scan[bi], &accum);\n            private_scan[ai] = private_scan[bi];\n            private_scan[bi] = accumulator.finalize(accum);\n          }\n        }\n      }\n\n      Index offset = 1;\n      // build sum in place up the tree\n      for (Index d = scratch_stride >> 1; d > 0; d >>= 1) {\n        // Synchronise\n        itemID.barrier(cl::sycl::access::fence_space::local_space);\n        if (local_id < d) {\n          Index ai = offset * (2 * local_id + 1) - 1 + scratch_offset;\n          Index bi = offset * (2 * local_id + 2) - 1 + scratch_offset;\n          CoeffReturnType accum = accumulator.initialize();\n          accumulator.reduce(scratch_ptr[ai], &accum);\n          accumulator.reduce(scratch_ptr[bi], &accum);\n          scratch_ptr[bi] = accumulator.finalize(accum);\n        }\n        offset *= 2;\n      }\n      // Synchronise\n      itemID.barrier(cl::sycl::access::fence_space::local_space);\n      // next step optimisation\n      if (local_id == 0) {\n        if (((scanParameters.elements_per_group / scanParameters.elements_per_block) > 1)) {\n          const Index temp_id = panel_id * (scanParameters.elements_per_group / scanParameters.elements_per_block) *\n                                    scanParameters.non_scan_size +\n                                group_id * (scanParameters.elements_per_group / scanParameters.elements_per_block) +\n                                block_id;\n          tmp_ptr[temp_id] = scratch_ptr[scratch_stride - 1 + scratch_offset];\n        }\n        // clear the last element\n        scratch_ptr[scratch_stride - 1 + scratch_offset] = accumulator.initialize();\n      }\n      // traverse down tree & build scan\n      for (Index d = 1; d < scratch_stride; d *= 2) {\n        offset >>= 1;\n        // Synchronise\n        itemID.barrier(cl::sycl::access::fence_space::local_space);\n        if (local_id < d) {\n          Index ai = offset * (2 * local_id + 1) - 1 + scratch_offset;\n          Index bi = offset * (2 * local_id + 2) - 1 + scratch_offset;\n          CoeffReturnType accum = accumulator.initialize();\n          accumulator.reduce(scratch_ptr[ai], &accum);\n          accumulator.reduce(scratch_ptr[bi], &accum);\n          scratch_ptr[ai] = scratch_ptr[bi];\n          scratch_ptr[bi] = accumulator.finalize(accum);\n        }\n      }\n      // Synchronise\n      itemID.barrier(cl::sycl::access::fence_space::local_space);\n      // This for loop must be 2\n      EIGEN_UNROLL_LOOP\n      for (int packetIndex = 0; packetIndex < ScanParameters<Index>::ScanPerThread; packetIndex += PacketSize) {\n        EIGEN_UNROLL_LOOP\n        for (Index i = 0; i < PacketSize; i++) {\n          CoeffReturnType accum = private_scan[packetIndex + i];\n          accumulator.reduce(scratch_ptr[2 * local_id + (packetIndex / PacketSize) + scratch_offset], &accum);\n          private_scan[packetIndex + i] = accumulator.finalize(accum);\n        }\n      }\n      first_step_inclusive_Operation([&]() EIGEN_DEVICE_FUNC {\n        if (inclusive) {\n          accumulator.reduce(private_scan[ScanParameters<Index>::ScanPerThread - 1], &inclusive_scan);\n          private_scan[0] = accumulator.finalize(inclusive_scan);\n        }\n      });\n      next_elements = 0;\n      // right the first set of private param\n      EIGEN_UNROLL_LOOP\n      for (Index i = 0; i < ScanParameters<Index>::ScanPerThread; i++) {\n        Index global_id = global_offset + next_elements;\n        if ((((block_id * scanParameters.elements_per_block) + (ScanParameters<Index>::ScanPerThread * local_id) + i) <\n             scanParameters.scan_size) &&\n            (global_id < scanParameters.total_size)) {\n          Index private_id = (i * !inclusive) + (((i + 1) % ScanParameters<Index>::ScanPerThread) * (inclusive));\n          out_ptr[global_id] = private_scan[private_id];\n        }\n        next_elements += scanParameters.scan_stride;\n      }\n    }  // end for loop\n  }\n};\n\ntemplate <typename CoeffReturnType, typename InAccessor, typename OutAccessor, typename Op, typename Index>\nstruct ScanAdjustmentKernelFunctor {\n  typedef cl::sycl::accessor<CoeffReturnType, 1, cl::sycl::access::mode::read_write, cl::sycl::access::target::local>\n      LocalAccessor;\n  static EIGEN_CONSTEXPR int PacketSize = ScanParameters<Index>::ScanPerThread / 2;\n  InAccessor in_accessor;\n  OutAccessor out_accessor;\n  const ScanParameters<Index> scanParameters;\n  Op accumulator;\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ScanAdjustmentKernelFunctor(LocalAccessor, InAccessor in_accessor_,\n                                                                    OutAccessor out_accessor_,\n                                                                    const ScanParameters<Index> scanParameters_,\n                                                                    Op accumulator_)\n      : in_accessor(in_accessor_),\n        out_accessor(out_accessor_),\n        scanParameters(scanParameters_),\n        accumulator(accumulator_) {}\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void operator()(cl::sycl::nd_item<1> itemID) {\n    auto in_ptr = in_accessor.get_pointer();\n    auto out_ptr = out_accessor.get_pointer();\n\n    for (Index loop_offset = 0; loop_offset < scanParameters.loop_range; loop_offset++) {\n      Index data_offset = (itemID.get_global_id(0) + (itemID.get_global_range(0) * loop_offset));\n      Index tmp = data_offset % scanParameters.panel_threads;\n      const Index panel_id = data_offset / scanParameters.panel_threads;\n      const Index group_id = tmp / scanParameters.group_threads;\n      tmp = tmp % scanParameters.group_threads;\n      const Index block_id = tmp / scanParameters.block_threads;\n      const Index local_id = tmp % scanParameters.block_threads;\n\n      // the actual panel size is scan_size * non_scan_size.\n      // elements_per_panel is roundup to power of 2 for binary tree\n      const Index panel_offset = panel_id * scanParameters.scan_size * scanParameters.non_scan_size;\n      const Index group_offset = group_id * scanParameters.non_scan_stride;\n      // This will be effective when the size is bigger than elements_per_block\n      const Index block_offset = block_id * scanParameters.elements_per_block * scanParameters.scan_stride;\n      const Index thread_offset = ScanParameters<Index>::ScanPerThread * local_id * scanParameters.scan_stride;\n\n      const Index global_offset = panel_offset + group_offset + block_offset + thread_offset;\n      const Index block_size = scanParameters.elements_per_group / scanParameters.elements_per_block;\n      const Index in_id = (panel_id * block_size * scanParameters.non_scan_size) + (group_id * block_size) + block_id;\n      CoeffReturnType adjust_val = in_ptr[in_id];\n\n      Index next_elements = 0;\n      EIGEN_UNROLL_LOOP\n      for (Index i = 0; i < ScanParameters<Index>::ScanPerThread; i++) {\n        Index global_id = global_offset + next_elements;\n        if ((((block_id * scanParameters.elements_per_block) + (ScanParameters<Index>::ScanPerThread * local_id) + i) <\n             scanParameters.scan_size) &&\n            (global_id < scanParameters.total_size)) {\n          CoeffReturnType accum = adjust_val;\n          accumulator.reduce(out_ptr[global_id], &accum);\n          out_ptr[global_id] = accumulator.finalize(accum);\n        }\n        next_elements += scanParameters.scan_stride;\n      }\n    }\n  }\n};\n\ntemplate <typename Index>\nstruct ScanInfo {\n  const Index &total_size;\n  const Index &scan_size;\n  const Index &panel_size;\n  const Index &non_scan_size;\n  const Index &scan_stride;\n  const Index &non_scan_stride;\n\n  Index max_elements_per_block;\n  Index block_size;\n  Index panel_threads;\n  Index group_threads;\n  Index block_threads;\n  Index elements_per_group;\n  Index elements_per_block;\n  Index loop_range;\n  Index global_range;\n  Index local_range;\n  const Eigen::SyclDevice &dev;\n  EIGEN_STRONG_INLINE ScanInfo(const Index &total_size_, const Index &scan_size_, const Index &panel_size_,\n                               const Index &non_scan_size_, const Index &scan_stride_, const Index &non_scan_stride_,\n                               const Eigen::SyclDevice &dev_)\n      : total_size(total_size_),\n        scan_size(scan_size_),\n        panel_size(panel_size_),\n        non_scan_size(non_scan_size_),\n        scan_stride(scan_stride_),\n        non_scan_stride(non_scan_stride_),\n        dev(dev_) {\n    // must be power of 2\n    local_range = std::min(Index(dev.getNearestPowerOfTwoWorkGroupSize()),\n                           Index(EIGEN_SYCL_LOCAL_THREAD_DIM0 * EIGEN_SYCL_LOCAL_THREAD_DIM1));\n\n    max_elements_per_block = local_range * ScanParameters<Index>::ScanPerThread;\n\n    elements_per_group =\n        dev.getPowerOfTwo(Index(roundUp(Index(scan_size), ScanParameters<Index>::ScanPerThread)), true);\n    const Index elements_per_panel = elements_per_group * non_scan_size;\n    elements_per_block = std::min(Index(elements_per_group), Index(max_elements_per_block));\n    panel_threads = elements_per_panel / ScanParameters<Index>::ScanPerThread;\n    group_threads = elements_per_group / ScanParameters<Index>::ScanPerThread;\n    block_threads = elements_per_block / ScanParameters<Index>::ScanPerThread;\n    block_size = elements_per_group / elements_per_block;\n#ifdef EIGEN_SYCL_MAX_GLOBAL_RANGE\n    const Index max_threads = std::min(Index(panel_threads * panel_size), Index(EIGEN_SYCL_MAX_GLOBAL_RANGE));\n#else\n    const Index max_threads = panel_threads * panel_size;\n#endif\n    global_range = roundUp(max_threads, local_range);\n    loop_range = Index(\n        std::ceil(double(elements_per_panel * panel_size) / (global_range * ScanParameters<Index>::ScanPerThread)));\n  }\n  inline ScanParameters<Index> get_scan_parameter() {\n    return ScanParameters<Index>(total_size, non_scan_size, scan_size, non_scan_stride, scan_stride, panel_threads,\n                                 group_threads, block_threads, elements_per_group, elements_per_block, loop_range);\n  }\n  inline cl::sycl::nd_range<1> get_thread_range() {\n    return cl::sycl::nd_range<1>(cl::sycl::range<1>(global_range), cl::sycl::range<1>(local_range));\n  }\n};\n\ntemplate <typename EvaluatorPointerType, typename CoeffReturnType, typename Reducer, typename Index>\nstruct SYCLAdjustBlockOffset {\n  EIGEN_STRONG_INLINE static void adjust_scan_block_offset(EvaluatorPointerType in_ptr, EvaluatorPointerType out_ptr,\n                                                           Reducer &accumulator, const Index total_size,\n                                                           const Index scan_size, const Index panel_size,\n                                                           const Index non_scan_size, const Index scan_stride,\n                                                           const Index non_scan_stride, const Eigen::SyclDevice &dev) {\n    auto scan_info =\n        ScanInfo<Index>(total_size, scan_size, panel_size, non_scan_size, scan_stride, non_scan_stride, dev);\n\n    typedef ScanAdjustmentKernelFunctor<CoeffReturnType, EvaluatorPointerType, EvaluatorPointerType, Reducer, Index>\n        AdjustFuctor;\n    dev.template unary_kernel_launcher<CoeffReturnType, AdjustFuctor>(in_ptr, out_ptr, scan_info.get_thread_range(),\n                                                                      scan_info.max_elements_per_block,\n                                                                      scan_info.get_scan_parameter(), accumulator);\n  }\n};\n\ntemplate <typename CoeffReturnType, scan_step stp>\nstruct ScanLauncher_impl {\n  template <typename Input, typename EvaluatorPointerType, typename Reducer, typename Index>\n  EIGEN_STRONG_INLINE static void scan_block(Input in_ptr, EvaluatorPointerType out_ptr, Reducer &accumulator,\n                                             const Index total_size, const Index scan_size, const Index panel_size,\n                                             const Index non_scan_size, const Index scan_stride,\n                                             const Index non_scan_stride, const bool inclusive,\n                                             const Eigen::SyclDevice &dev) {\n    auto scan_info =\n        ScanInfo<Index>(total_size, scan_size, panel_size, non_scan_size, scan_stride, non_scan_stride, dev);\n    const Index temp_pointer_size = scan_info.block_size * non_scan_size * panel_size;\n    const Index scratch_size = scan_info.max_elements_per_block / (ScanParameters<Index>::ScanPerThread / 2);\n    CoeffReturnType *temp_pointer =\n        static_cast<CoeffReturnType *>(dev.allocate_temp(temp_pointer_size * sizeof(CoeffReturnType)));\n    EvaluatorPointerType tmp_global_accessor = dev.get(temp_pointer);\n\n    typedef ScanKernelFunctor<Input, CoeffReturnType, EvaluatorPointerType, Reducer, Index, stp> ScanFunctor;\n    dev.template binary_kernel_launcher<CoeffReturnType, ScanFunctor>(\n        in_ptr, out_ptr, tmp_global_accessor, scan_info.get_thread_range(), scratch_size,\n        scan_info.get_scan_parameter(), accumulator, inclusive);\n\n    if (scan_info.block_size > 1) {\n      ScanLauncher_impl<CoeffReturnType, scan_step::second>::scan_block(\n          tmp_global_accessor, tmp_global_accessor, accumulator, temp_pointer_size, scan_info.block_size, panel_size,\n          non_scan_size, Index(1), scan_info.block_size, false, dev);\n\n      SYCLAdjustBlockOffset<EvaluatorPointerType, CoeffReturnType, Reducer, Index>::adjust_scan_block_offset(\n          tmp_global_accessor, out_ptr, accumulator, total_size, scan_size, panel_size, non_scan_size, scan_stride,\n          non_scan_stride, dev);\n    }\n    dev.deallocate_temp(temp_pointer);\n  }\n};\n\n}  // namespace internal\n}  // namespace TensorSycl\n\ntemplate <typename Self, typename Reducer>\nstruct ScanLauncher<Self, Reducer, Eigen::SyclDevice> {\n  typedef typename Self::Index Index;\n  typedef typename Self::CoeffReturnType CoeffReturnType;\n  typedef typename Self::Storage Storage;\n  typedef typename Self::EvaluatorPointerType EvaluatorPointerType;\n  void operator()(Self &self, EvaluatorPointerType data) {\n    const Index total_size = internal::array_prod(self.dimensions());\n    const Index scan_size = self.size();\n    const Index scan_stride = self.stride();\n    // this is the scan op (can be sum or ...)\n    auto accumulator = self.accumulator();\n    auto inclusive = !self.exclusive();\n    auto consume_dim = self.consume_dim();\n    auto dev = self.device();\n\n    auto dims = self.inner().dimensions();\n\n    Index non_scan_size = 1;\n    Index panel_size = 1;\n    if (static_cast<int>(Self::Layout) == static_cast<int>(ColMajor)) {\n      for (int i = 0; i < consume_dim; i++) {\n        non_scan_size *= dims[i];\n      }\n      for (int i = consume_dim + 1; i < Self::NumDims; i++) {\n        panel_size *= dims[i];\n      }\n    } else {\n      for (int i = Self::NumDims - 1; i > consume_dim; i--) {\n        non_scan_size *= dims[i];\n      }\n      for (int i = consume_dim - 1; i >= 0; i--) {\n        panel_size *= dims[i];\n      }\n    }\n    const Index non_scan_stride = (scan_stride > 1) ? 1 : scan_size;\n    auto eval_impl = self.inner();\n    TensorSycl::internal::ScanLauncher_impl<CoeffReturnType, TensorSycl::internal::scan_step::first>::scan_block(\n        eval_impl, data, accumulator, total_size, scan_size, panel_size, non_scan_size, scan_stride, non_scan_stride,\n        inclusive, dev);\n  }\n};\n}  // namespace Eigen\n\n#endif  // UNSUPPORTED_EIGEN_CXX11_SRC_TENSOR_TENSOR_SYCL_SYCL_HPP\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorShuffling.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_SHUFFLING_H\n#define EIGEN_CXX11_TENSOR_TENSOR_SHUFFLING_H\n\nnamespace Eigen {\n\n/** \\class TensorShuffling\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief Tensor shuffling class.\n  *\n  *\n  */\nnamespace internal {\ntemplate<typename Shuffle, typename XprType>\nstruct traits<TensorShufflingOp<Shuffle, XprType> > : public traits<XprType>\n{\n  typedef typename XprType::Scalar Scalar;\n  typedef traits<XprType> XprTraits;\n  typedef typename XprTraits::StorageKind StorageKind;\n  typedef typename XprTraits::Index Index;\n  typedef typename XprType::Nested Nested;\n  typedef typename remove_reference<Nested>::type _Nested;\n  static const int NumDimensions = XprTraits::NumDimensions;\n  static const int Layout = XprTraits::Layout;\n  typedef typename XprTraits::PointerType PointerType;\n};\n\ntemplate<typename Shuffle, typename XprType>\nstruct eval<TensorShufflingOp<Shuffle, XprType>, Eigen::Dense>\n{\n  typedef const TensorShufflingOp<Shuffle, XprType>& type;\n};\n\ntemplate<typename Shuffle, typename XprType>\nstruct nested<TensorShufflingOp<Shuffle, XprType>, 1, typename eval<TensorShufflingOp<Shuffle, XprType> >::type>\n{\n  typedef TensorShufflingOp<Shuffle, XprType> type;\n};\n\n}  // end namespace internal\n\n\n\ntemplate<typename Shuffle, typename XprType>\nclass TensorShufflingOp : public TensorBase<TensorShufflingOp<Shuffle, XprType> >\n{\n  public:\n  typedef typename Eigen::internal::traits<TensorShufflingOp>::Scalar Scalar;\n  typedef typename Eigen::NumTraits<Scalar>::Real RealScalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename Eigen::internal::nested<TensorShufflingOp>::type Nested;\n  typedef typename Eigen::internal::traits<TensorShufflingOp>::StorageKind StorageKind;\n  typedef typename Eigen::internal::traits<TensorShufflingOp>::Index Index;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorShufflingOp(const XprType& expr, const Shuffle& shfl)\n      : m_xpr(expr), m_shuffle(shfl) {}\n\n    EIGEN_DEVICE_FUNC\n    const Shuffle& shufflePermutation() const { return m_shuffle; }\n\n    EIGEN_DEVICE_FUNC\n    const typename internal::remove_all<typename XprType::Nested>::type&\n    expression() const { return m_xpr; }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE TensorShufflingOp& operator = (const TensorShufflingOp& other)\n    {\n      typedef TensorAssignOp<TensorShufflingOp, const TensorShufflingOp> Assign;\n      Assign assign(*this, other);\n      internal::TensorExecutor<const Assign, DefaultDevice>::run(assign, DefaultDevice());\n      return *this;\n    }\n\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE TensorShufflingOp& operator = (const OtherDerived& other)\n    {\n      typedef TensorAssignOp<TensorShufflingOp, const OtherDerived> Assign;\n      Assign assign(*this, other);\n      internal::TensorExecutor<const Assign, DefaultDevice>::run(assign, DefaultDevice());\n      return *this;\n    }\n\n  protected:\n    typename XprType::Nested m_xpr;\n    const Shuffle m_shuffle;\n};\n\n\n// Eval as rvalue\ntemplate<typename Shuffle, typename ArgType, typename Device>\nstruct TensorEvaluator<const TensorShufflingOp<Shuffle, ArgType>, Device>\n{\n  typedef TensorEvaluator<const TensorShufflingOp<Shuffle, ArgType>, Device> Self;\n  typedef TensorShufflingOp<Shuffle, ArgType> XprType;\n  typedef typename XprType::Index Index;\n  static const int NumDims = internal::array_size<typename TensorEvaluator<ArgType, Device>::Dimensions>::value;\n  typedef DSizes<Index, NumDims> Dimensions;\n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  static const int PacketSize = PacketType<CoeffReturnType, Device>::size;\n  typedef StorageMemory<CoeffReturnType, Device> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n\n  enum {\n    IsAligned         = false,\n    PacketAccess      = (PacketType<CoeffReturnType, Device>::size > 1),\n    BlockAccess       = TensorEvaluator<ArgType, Device>::RawAccess,\n    PreferBlockAccess = true,\n    Layout            = TensorEvaluator<ArgType, Device>::Layout,\n    CoordAccess       = false,  // to be implemented\n    RawAccess         = false\n  };\n\n  typedef typename internal::remove_const<Scalar>::type ScalarNoConst;\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockDescriptor<NumDims, Index> TensorBlockDesc;\n  typedef internal::TensorBlockScratchAllocator<Device> TensorBlockScratch;\n\n  typedef typename internal::TensorMaterializedBlock<ScalarNoConst, NumDims,\n                                                     Layout, Index>\n      TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op,\n                                                        const Device& device)\n      : m_device(device),\n        m_impl(op.expression(), device)\n  {\n    const typename TensorEvaluator<ArgType, Device>::Dimensions& input_dims = m_impl.dimensions();\n    const Shuffle& shuffle = op.shufflePermutation();\n    m_is_identity = true;\n    for (int i = 0; i < NumDims; ++i) {\n      m_shuffle[i] = static_cast<int>(shuffle[i]);\n      m_dimensions[i] = input_dims[shuffle[i]];\n      m_inverseShuffle[shuffle[i]] = i;\n      if (m_is_identity && shuffle[i] != i) {\n        m_is_identity = false;\n      }\n    }\n\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      m_unshuffledInputStrides[0] = 1;\n      m_outputStrides[0] = 1;\n\n      for (int i = 1; i < NumDims; ++i) {\n        m_unshuffledInputStrides[i] =\n            m_unshuffledInputStrides[i - 1] * input_dims[i - 1];\n        m_outputStrides[i] = m_outputStrides[i - 1] * m_dimensions[i - 1];\n        m_fastOutputStrides[i] = internal::TensorIntDivisor<Index>(m_outputStrides[i]);\n      }\n    } else {\n      m_unshuffledInputStrides[NumDims - 1] = 1;\n      m_outputStrides[NumDims - 1] = 1;\n      for (int i = NumDims - 2; i >= 0; --i) {\n        m_unshuffledInputStrides[i] =\n            m_unshuffledInputStrides[i + 1] * input_dims[i + 1];\n        m_outputStrides[i] = m_outputStrides[i + 1] * m_dimensions[i + 1];\n        m_fastOutputStrides[i] = internal::TensorIntDivisor<Index>(m_outputStrides[i]);\n      }\n    }\n\n    for (int i = 0; i < NumDims; ++i) {\n      m_inputStrides[i] = m_unshuffledInputStrides[shuffle[i]];\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions& dimensions() const { return m_dimensions; }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType /*data*/) {\n    m_impl.evalSubExprsIfNeeded(NULL);\n    return true;\n  }\n\n#ifdef EIGEN_USE_THREADS\n  template <typename EvalSubExprsCallback>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalSubExprsIfNeededAsync(\n      EvaluatorPointerType, EvalSubExprsCallback done) {\n    m_impl.evalSubExprsIfNeededAsync(nullptr, [done](bool) { done(true); });\n  }\n#endif  // EIGEN_USE_THREADS\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {\n    m_impl.cleanup();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const\n  {\n    if (m_is_identity) {\n      return m_impl.coeff(index);\n    } else {\n      return m_impl.coeff(srcCoeff(index));\n    }\n  }\n\n  template <int LoadMode, typename Self, bool ImplPacketAccess>\n  struct PacketLoader {\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    static PacketReturnType Run(const Self& self, Index index) {\n      EIGEN_ALIGN_MAX typename internal::remove_const<CoeffReturnType>::type values[PacketSize];\n      EIGEN_UNROLL_LOOP\n      for (int i = 0; i < PacketSize; ++i) {\n        values[i] = self.coeff(index + i);\n      }\n      PacketReturnType rslt = internal::pload<PacketReturnType>(values);\n      return rslt;\n    }\n  };\n\n  template<int LoadMode, typename Self>\n  struct PacketLoader<LoadMode, Self, true> {\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    static PacketReturnType Run(const Self& self, Index index) {\n      if (self.m_is_identity) {\n        return self.m_impl.template packet<LoadMode>(index);\n      } else {\n        EIGEN_ALIGN_MAX typename internal::remove_const<CoeffReturnType>::type values[PacketSize];\n        EIGEN_UNROLL_LOOP\n        for (int i = 0; i < PacketSize; ++i) {\n          values[i] = self.coeff(index + i);\n        }\n        PacketReturnType rslt = internal::pload<PacketReturnType>(values);\n        return rslt;\n      }\n    }\n  };\n\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const\n  {\n    EIGEN_STATIC_ASSERT((PacketSize > 1), YOU_MADE_A_PROGRAMMING_MISTAKE)\n        eigen_assert(index + PacketSize - 1 < dimensions().TotalSize());\n    return PacketLoader<LoadMode, Self, TensorEvaluator<ArgType, Device>::PacketAccess>::Run(*this, index);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  internal::TensorBlockResourceRequirements getResourceRequirements() const {\n    static const int inner_dim =\n        Layout == static_cast<int>(ColMajor) ? 0 : NumDims - 1;\n\n    const size_t target_size = m_device.firstLevelCacheSize();\n    const bool inner_dim_shuffled = m_shuffle[inner_dim] != inner_dim;\n\n    // Shuffled inner dimensions leads to a random memory access, which is not\n    // captured by default cost model bytes loaded/stored. We add this cost\n    // explicitly. The number of cycles picked based on the benchmarks.\n    // TODO(ezhulenev): This number was picked based on a very questionable\n    // benchmarks, add benchmarks that are representative of real workloads.\n    using BlockRequirements = internal::TensorBlockResourceRequirements;\n    if (inner_dim_shuffled) {\n      return BlockRequirements::uniform<Scalar>(target_size)\n          .addCostPerCoeff({0, 0, NumDims * 28});\n    } else {\n      return BlockRequirements::skewed<Scalar>(target_size);\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorBlock\n  block(TensorBlockDesc& desc, TensorBlockScratch& scratch,\n          bool root_of_expr_ast = false) const {\n    assert(m_impl.data() != NULL);\n\n    typedef internal::TensorBlockIO<ScalarNoConst, Index, NumDims, Layout>\n        TensorBlockIO;\n    typedef typename TensorBlockIO::Dst TensorBlockIODst;\n    typedef typename TensorBlockIO::Src TensorBlockIOSrc;\n\n    const typename TensorBlock::Storage block_storage =\n        TensorBlock::prepareStorage(\n            desc, scratch, /*allow_strided_storage=*/root_of_expr_ast);\n\n    typename TensorBlockIO::Dimensions input_strides(m_unshuffledInputStrides);\n    TensorBlockIOSrc src(input_strides, m_impl.data(), srcCoeff(desc.offset()));\n\n    TensorBlockIODst dst(block_storage.dimensions(), block_storage.strides(),\n                         block_storage.data());\n\n    typename TensorBlockIO::DimensionsMap dst_to_src_dim_map(m_shuffle);\n    TensorBlockIO::Copy(dst, src, dst_to_src_dim_map);\n\n    return block_storage.AsTensorMaterializedBlock();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool vectorized) const {\n    const double compute_cost = m_is_identity ? TensorOpCost::AddCost<Index>() :\n                                NumDims * (2 * TensorOpCost::AddCost<Index>() +\n                                           2 * TensorOpCost::MulCost<Index>() +\n                                           TensorOpCost::DivCost<Index>());\n    return m_impl.costPerCoeff(vectorized) +\n           TensorOpCost(0, 0, compute_cost, m_is_identity /* vectorized */, PacketSize);\n  }\n\n  EIGEN_DEVICE_FUNC typename Storage::Type data() const { return NULL; }\n\n#ifdef EIGEN_USE_SYCL\n   // binding placeholder accessors to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {\n    m_impl.bind(cgh);\n  }\n#endif\n protected:\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index GetBlockOutputIndex(\n      Index input_index,\n      const DSizes<Index, NumDims>& input_block_strides,\n      const DSizes<Index, NumDims>& output_block_strides,\n      const DSizes<internal::TensorIntDivisor<Index>, NumDims>& fast_input_block_strides) const {\n    Index output_index = 0;\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      for (int i = NumDims - 1; i > 0; --i) {\n        const Index idx = input_index / fast_input_block_strides[i];\n        output_index += idx * output_block_strides[m_inverseShuffle[i]];\n        input_index -= idx * input_block_strides[i];\n      }\n      return output_index + input_index *\n          output_block_strides[m_inverseShuffle[0]];\n    } else {\n      for (int i = 0; i < NumDims - 1; ++i) {\n        const Index idx = input_index / fast_input_block_strides[i];\n        output_index += idx * output_block_strides[m_inverseShuffle[i]];\n        input_index -= idx * input_block_strides[i];\n      }\n      return output_index + input_index *\n          output_block_strides[m_inverseShuffle[NumDims - 1]];\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index srcCoeff(Index index) const {\n    Index inputIndex = 0;\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      for (int i = NumDims - 1; i > 0; --i) {\n        const Index idx = index / m_fastOutputStrides[i];\n        inputIndex += idx * m_inputStrides[i];\n        index -= idx * m_outputStrides[i];\n      }\n      return inputIndex + index * m_inputStrides[0];\n    } else {\n      for (int i = 0; i < NumDims - 1; ++i) {\n        const Index idx = index / m_fastOutputStrides[i];\n        inputIndex += idx * m_inputStrides[i];\n        index -= idx * m_outputStrides[i];\n      }\n      return inputIndex + index * m_inputStrides[NumDims - 1];\n    }\n  }\n\n  Dimensions m_dimensions;\n  bool m_is_identity;\n  array<int, NumDims> m_shuffle;\n  array<Index, NumDims> m_inverseShuffle;  // TODO(ezhulenev): Make it int type.\n  array<Index, NumDims> m_outputStrides;\n  array<internal::TensorIntDivisor<Index>, NumDims> m_fastOutputStrides;\n  array<Index, NumDims> m_inputStrides;\n  array<Index, NumDims> m_unshuffledInputStrides;\n\n  const Device EIGEN_DEVICE_REF m_device;\n  TensorEvaluator<ArgType, Device> m_impl;\n};\n\n\n// Eval as lvalue\ntemplate<typename Shuffle, typename ArgType, typename Device>\nstruct TensorEvaluator<TensorShufflingOp<Shuffle, ArgType>, Device>\n    : public TensorEvaluator<const TensorShufflingOp<Shuffle, ArgType>, Device>\n{\n  typedef TensorEvaluator<const TensorShufflingOp<Shuffle, ArgType>, Device> Base;\n\n  typedef TensorShufflingOp<Shuffle, ArgType> XprType;\n  typedef typename XprType::Index Index;\n  static const int NumDims = internal::array_size<typename TensorEvaluator<ArgType, Device>::Dimensions>::value;\n  typedef DSizes<Index, NumDims> Dimensions;\n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  static const int PacketSize = PacketType<CoeffReturnType, Device>::size;\n\n  enum {\n    IsAligned         = false,\n    PacketAccess      = (PacketType<CoeffReturnType, Device>::size > 1),\n    BlockAccess       = TensorEvaluator<ArgType, Device>::RawAccess,\n    PreferBlockAccess = true,\n    Layout            = TensorEvaluator<ArgType, Device>::Layout,\n    RawAccess         = false\n  };\n\n  typedef typename internal::remove_const<Scalar>::type ScalarNoConst;\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockDescriptor<NumDims, Index> TensorBlockDesc;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)\n      : Base(op, device)\n  { }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType& coeffRef(Index index)\n  {\n    return this->m_impl.coeffRef(this->srcCoeff(index));\n  }\n\n  template <int StoreMode> EIGEN_STRONG_INLINE\n  void writePacket(Index index, const PacketReturnType& x)\n  {\n    EIGEN_STATIC_ASSERT((PacketSize > 1), YOU_MADE_A_PROGRAMMING_MISTAKE)\n\n    EIGEN_ALIGN_MAX typename internal::remove_const<CoeffReturnType>::type values[PacketSize];\n    internal::pstore<CoeffReturnType, PacketReturnType>(values, x);\n    EIGEN_UNROLL_LOOP\n    for (int i = 0; i < PacketSize; ++i) {\n      this->coeffRef(index+i) = values[i];\n    }\n  }\n\n  template <typename TensorBlock>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void writeBlock(\n      const TensorBlockDesc& desc, const TensorBlock& block) {\n    eigen_assert(this->m_impl.data() != NULL);\n\n    typedef internal::TensorBlockIO<ScalarNoConst, Index, NumDims, Layout>\n        TensorBlockIO;\n    typedef typename TensorBlockIO::Dst TensorBlockIODst;\n    typedef typename TensorBlockIO::Src TensorBlockIOSrc;\n\n    const Scalar* block_buffer = block.data();\n\n    // TODO(ezhulenev): TensorBlockIO should be able to read from any Eigen\n    // expression with coefficient and packet access as `src`.\n    void* mem = NULL;\n    if (block_buffer == NULL) {\n      mem = this->m_device.allocate(desc.size() * sizeof(Scalar));\n      ScalarNoConst* buf = static_cast<ScalarNoConst*>(mem);\n\n      typedef internal::TensorBlockAssignment<\n          ScalarNoConst, NumDims, typename TensorBlock::XprType, Index>\n          TensorBlockAssignment;\n\n      TensorBlockAssignment::Run(\n          TensorBlockAssignment::target(\n              desc.dimensions(), internal::strides<Layout>(desc.dimensions()),\n              buf),\n          block.expr());\n\n      block_buffer = buf;\n    }\n\n    // Read from block.\n    TensorBlockIOSrc src(internal::strides<Layout>(desc.dimensions()),\n                         block_buffer);\n\n    // Write to the output buffer.\n    typename TensorBlockIO::Dimensions output_strides(\n        this->m_unshuffledInputStrides);\n    typename TensorBlockIO::Dimensions output_dimensions;\n    for (int i = 0; i < NumDims; ++i) {\n      output_dimensions[this->m_shuffle[i]] = desc.dimension(i);\n    }\n    TensorBlockIODst dst(output_dimensions, output_strides, this->m_impl.data(),\n                         this->srcCoeff(desc.offset()));\n\n    // Reorder dimensions according to the shuffle.\n    typename TensorBlockIO::DimensionsMap dst_to_src_dim_map;\n    for (int i = 0; i < NumDims; ++i) {\n      dst_to_src_dim_map[i] = static_cast<int>(this->m_inverseShuffle[i]);\n    }\n    TensorBlockIO::Copy(dst, src, dst_to_src_dim_map);\n\n    // Deallocate temporary buffer used for the block materialization.\n    if (mem != NULL) this->m_device.deallocate(mem);\n  }\n};\n\n\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_SHUFFLING_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2013 Christian Seiler <christian@iwakd.de>\n// Copyright (C) 2014-2015 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSORSTORAGE_H\n#define EIGEN_CXX11_TENSOR_TENSORSTORAGE_H\n\n#ifdef EIGEN_TENSOR_STORAGE_CTOR_PLUGIN\n  #define EIGEN_INTERNAL_TENSOR_STORAGE_CTOR_PLUGIN EIGEN_TENSOR_STORAGE_CTOR_PLUGIN;\n#else\n  #define EIGEN_INTERNAL_TENSOR_STORAGE_CTOR_PLUGIN\n#endif\n\nnamespace Eigen {\n\n/** \\internal\n  *\n  * \\class TensorStorage\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief Stores the data of a tensor\n  *\n  * This class stores the data of fixed-size, dynamic-size or mixed tensors\n  * in a way as compact as possible.\n  *\n  * \\sa Tensor\n  */\ntemplate<typename T, typename Dimensions, int Options> class TensorStorage;\n\n\n// Pure fixed-size storage\ntemplate<typename T, typename FixedDimensions, int Options_>\nclass TensorStorage\n{\n private:\n  static const std::size_t Size = FixedDimensions::total_size;\n\n  // Allocate an array of size at least one to prevent compiler warnings.\n  static const std::size_t MinSize = max_n_1<Size>::size;\n  EIGEN_ALIGN_MAX T m_data[MinSize];\n\n  FixedDimensions m_dimensions;\n\n public:\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE TensorStorage() {\n  }\n\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE T *data() { return m_data; }\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE const T *data() const { return m_data; }\n\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE const FixedDimensions& dimensions() const { return m_dimensions; }\n\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE DenseIndex size() const { return m_dimensions.TotalSize(); }\n};\n\n\n// pure dynamic\ntemplate<typename T, typename IndexType, int NumIndices_, int Options_>\nclass TensorStorage<T, DSizes<IndexType, NumIndices_>, Options_>\n{\n  public:\n    typedef IndexType Index;\n    typedef DSizes<IndexType, NumIndices_> Dimensions;\n    typedef TensorStorage<T, DSizes<IndexType, NumIndices_>, Options_> Self;\n\n    EIGEN_DEVICE_FUNC TensorStorage() : m_data(0), m_dimensions() {\n      if (NumIndices_ == 0) {\n\tm_data = internal::conditional_aligned_new_auto<T,(Options_&DontAlign)==0>(1);\n      }\n    }\n    EIGEN_DEVICE_FUNC TensorStorage(internal::constructor_without_unaligned_array_assert)\n      : m_data(0), m_dimensions(internal::template repeat<NumIndices_, Index>(0)) {}\n    EIGEN_DEVICE_FUNC TensorStorage(Index size, const array<Index, NumIndices_>& dimensions)\n        : m_data(internal::conditional_aligned_new_auto<T,(Options_&DontAlign)==0>(size)), m_dimensions(dimensions)\n      { EIGEN_INTERNAL_TENSOR_STORAGE_CTOR_PLUGIN }\n\n#if EIGEN_HAS_VARIADIC_TEMPLATES\n    template <typename... DenseIndex>\n    EIGEN_DEVICE_FUNC TensorStorage(DenseIndex... indices) : m_dimensions(indices...) {\n      m_data = internal::conditional_aligned_new_auto<T,(Options_&DontAlign)==0>(internal::array_prod(m_dimensions));\n    }\n#endif\n\n    EIGEN_DEVICE_FUNC TensorStorage(const Self& other)\n      : m_data(internal::conditional_aligned_new_auto<T,(Options_&DontAlign)==0>(internal::array_prod(other.m_dimensions)))\n      , m_dimensions(other.m_dimensions)\n    {\n      internal::smart_copy(other.m_data, other.m_data+internal::array_prod(other.m_dimensions), m_data);\n    }\n    EIGEN_DEVICE_FUNC Self& operator=(const Self& other)\n    {\n      if (this != &other) {\n        Self tmp(other);\n        this->swap(tmp);\n      }\n      return *this;\n    }\n\n    EIGEN_DEVICE_FUNC  ~TensorStorage() { internal::conditional_aligned_delete_auto<T,(Options_&DontAlign)==0>(m_data, internal::array_prod(m_dimensions)); }\n    EIGEN_DEVICE_FUNC  void swap(Self& other)\n    { numext::swap(m_data,other.m_data); numext::swap(m_dimensions,other.m_dimensions); }\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions& dimensions() const {return m_dimensions;}\n\n    EIGEN_DEVICE_FUNC void resize(Index size, const array<Index, NumIndices_>& nbDimensions)\n    {\n      const Index currentSz = internal::array_prod(m_dimensions);\n      if(size != currentSz)\n      {\n        internal::conditional_aligned_delete_auto<T,(Options_&DontAlign)==0>(m_data, currentSz);\n        if (size)\n          m_data = internal::conditional_aligned_new_auto<T,(Options_&DontAlign)==0>(size);\n        else if (NumIndices_ == 0) {\n\t  m_data = internal::conditional_aligned_new_auto<T,(Options_&DontAlign)==0>(1);\n\t}\n\telse \n          m_data = 0;\n        EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN({})\n      }\n      m_dimensions = nbDimensions;\n    }\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T *data() { return m_data; }\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const T *data() const { return m_data; }\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index size() const { return m_dimensions.TotalSize(); }\n\n private:\n  T *m_data;\n  Dimensions m_dimensions;\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSORSTORAGE_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorStriding.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_STRIDING_H\n#define EIGEN_CXX11_TENSOR_TENSOR_STRIDING_H\n\nnamespace Eigen {\n\n/** \\class TensorStriding\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief Tensor striding class.\n  *\n  *\n  */\nnamespace internal {\ntemplate<typename Strides, typename XprType>\nstruct traits<TensorStridingOp<Strides, XprType> > : public traits<XprType>\n{\n  typedef typename XprType::Scalar Scalar;\n  typedef traits<XprType> XprTraits;\n  typedef typename XprTraits::StorageKind StorageKind;\n  typedef typename XprTraits::Index Index;\n  typedef typename XprType::Nested Nested;\n  typedef typename remove_reference<Nested>::type _Nested;\n  static const int NumDimensions = XprTraits::NumDimensions;\n  static const int Layout = XprTraits::Layout;\n  typedef typename XprTraits::PointerType PointerType;\n};\n\ntemplate<typename Strides, typename XprType>\nstruct eval<TensorStridingOp<Strides, XprType>, Eigen::Dense>\n{\n  typedef const TensorStridingOp<Strides, XprType>EIGEN_DEVICE_REF type;\n};\n\ntemplate<typename Strides, typename XprType>\nstruct nested<TensorStridingOp<Strides, XprType>, 1, typename eval<TensorStridingOp<Strides, XprType> >::type>\n{\n  typedef TensorStridingOp<Strides, XprType> type;\n};\n\n}  // end namespace internal\n\n\n\ntemplate<typename Strides, typename XprType>\nclass TensorStridingOp : public TensorBase<TensorStridingOp<Strides, XprType> >\n{\n  public:\n  typedef typename Eigen::internal::traits<TensorStridingOp>::Scalar Scalar;\n  typedef typename Eigen::NumTraits<Scalar>::Real RealScalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename Eigen::internal::nested<TensorStridingOp>::type Nested;\n  typedef typename Eigen::internal::traits<TensorStridingOp>::StorageKind StorageKind;\n  typedef typename Eigen::internal::traits<TensorStridingOp>::Index Index;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorStridingOp(const XprType& expr, const Strides& dims)\n      : m_xpr(expr), m_dims(dims) {}\n\n    EIGEN_DEVICE_FUNC\n    const Strides& strides() const { return m_dims; }\n\n    EIGEN_DEVICE_FUNC\n    const typename internal::remove_all<typename XprType::Nested>::type&\n    expression() const { return m_xpr; }\n\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE TensorStridingOp& operator = (const TensorStridingOp& other)\n    {\n      typedef TensorAssignOp<TensorStridingOp, const TensorStridingOp> Assign;\n      Assign assign(*this, other);\n      internal::TensorExecutor<const Assign, DefaultDevice>::run(assign, DefaultDevice());\n      return *this;\n    }\n\n    template<typename OtherDerived>\n    EIGEN_DEVICE_FUNC\n    EIGEN_STRONG_INLINE TensorStridingOp& operator = (const OtherDerived& other)\n    {\n      typedef TensorAssignOp<TensorStridingOp, const OtherDerived> Assign;\n      Assign assign(*this, other);\n      internal::TensorExecutor<const Assign, DefaultDevice>::run(assign, DefaultDevice());\n      return *this;\n    }\n\n  protected:\n    typename XprType::Nested m_xpr;\n    const Strides m_dims;\n};\n\n\n// Eval as rvalue\ntemplate<typename Strides, typename ArgType, typename Device>\nstruct TensorEvaluator<const TensorStridingOp<Strides, ArgType>, Device>\n{\n  typedef TensorStridingOp<Strides, ArgType> XprType;\n  typedef typename XprType::Index Index;\n  static const int NumDims = internal::array_size<typename TensorEvaluator<ArgType, Device>::Dimensions>::value;\n  typedef DSizes<Index, NumDims> Dimensions;\n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  static const int PacketSize = PacketType<CoeffReturnType, Device>::size;\n  typedef StorageMemory<CoeffReturnType, Device> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n\n  enum {\n    IsAligned = /*TensorEvaluator<ArgType, Device>::IsAligned*/false,\n    PacketAccess = TensorEvaluator<ArgType, Device>::PacketAccess,\n    BlockAccess = false,\n    PreferBlockAccess = TensorEvaluator<ArgType, Device>::PreferBlockAccess,\n    Layout = TensorEvaluator<ArgType, Device>::Layout,\n    CoordAccess = false,  // to be implemented\n    RawAccess = false\n  };\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockNotImplemented TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)\n      : m_impl(op.expression(), device)\n  {\n    m_dimensions = m_impl.dimensions();\n    for (int i = 0; i < NumDims; ++i) {\n      m_dimensions[i] =Eigen::numext::ceil(static_cast<float>(m_dimensions[i]) / op.strides()[i]);\n    }\n\n    const typename TensorEvaluator<ArgType, Device>::Dimensions& input_dims = m_impl.dimensions();\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      m_outputStrides[0] = 1;\n      m_inputStrides[0] = 1;\n      for (int i = 1; i < NumDims; ++i) {\n        m_outputStrides[i] = m_outputStrides[i-1] * m_dimensions[i-1];\n        m_inputStrides[i] = m_inputStrides[i-1] * input_dims[i-1];\n        m_inputStrides[i-1] *= op.strides()[i-1];\n      }\n      m_inputStrides[NumDims-1] *= op.strides()[NumDims-1];\n    } else {  // RowMajor\n      m_outputStrides[NumDims-1] = 1;\n      m_inputStrides[NumDims-1] = 1;\n      for (int i = NumDims - 2; i >= 0; --i) {\n        m_outputStrides[i] = m_outputStrides[i+1] * m_dimensions[i+1];\n        m_inputStrides[i] = m_inputStrides[i+1] * input_dims[i+1];\n        m_inputStrides[i+1] *= op.strides()[i+1];\n      }\n      m_inputStrides[0] *= op.strides()[0];\n    }\n  }\n\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions& dimensions() const { return m_dimensions; }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType/*data*/) {\n    m_impl.evalSubExprsIfNeeded(NULL);\n    return true;\n  }\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {\n    m_impl.cleanup();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const\n  {\n    return m_impl.coeff(srcCoeff(index));\n  }\n\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const\n  {\n    EIGEN_STATIC_ASSERT((PacketSize > 1), YOU_MADE_A_PROGRAMMING_MISTAKE)\n    eigen_assert(index+PacketSize-1 < dimensions().TotalSize());\n\n    Index inputIndices[] = {0, 0};\n    Index indices[] = {index, index + PacketSize - 1};\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      EIGEN_UNROLL_LOOP\n      for (int i = NumDims - 1; i > 0; --i) {\n        const Index idx0 = indices[0] / m_outputStrides[i];\n        const Index idx1 = indices[1] / m_outputStrides[i];\n        inputIndices[0] += idx0 * m_inputStrides[i];\n        inputIndices[1] += idx1 * m_inputStrides[i];\n        indices[0] -= idx0 * m_outputStrides[i];\n        indices[1] -= idx1 * m_outputStrides[i];\n      }\n      inputIndices[0] += indices[0] * m_inputStrides[0];\n      inputIndices[1] += indices[1] * m_inputStrides[0];\n    } else {  // RowMajor\n      EIGEN_UNROLL_LOOP\n      for (int i = 0; i < NumDims - 1; ++i) {\n        const Index idx0 = indices[0] / m_outputStrides[i];\n        const Index idx1 = indices[1] / m_outputStrides[i];\n        inputIndices[0] += idx0 * m_inputStrides[i];\n        inputIndices[1] += idx1 * m_inputStrides[i];\n        indices[0] -= idx0 * m_outputStrides[i];\n        indices[1] -= idx1 * m_outputStrides[i];\n      }\n      inputIndices[0] += indices[0] * m_inputStrides[NumDims-1];\n      inputIndices[1] += indices[1] * m_inputStrides[NumDims-1];\n    }\n    if (inputIndices[1] - inputIndices[0] == PacketSize - 1) {\n      PacketReturnType rslt = m_impl.template packet<Unaligned>(inputIndices[0]);\n      return rslt;\n    }\n    else {\n      EIGEN_ALIGN_MAX typename internal::remove_const<CoeffReturnType>::type values[PacketSize];\n      values[0] = m_impl.coeff(inputIndices[0]);\n      values[PacketSize-1] = m_impl.coeff(inputIndices[1]);\n      EIGEN_UNROLL_LOOP\n      for (int i = 1; i < PacketSize-1; ++i) {\n        values[i] = coeff(index+i);\n      }\n      PacketReturnType rslt = internal::pload<PacketReturnType>(values);\n      return rslt;\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool vectorized) const {\n    double compute_cost = (NumDims - 1) * (TensorOpCost::AddCost<Index>() +\n                                           TensorOpCost::MulCost<Index>() +\n                                           TensorOpCost::DivCost<Index>()) +\n        TensorOpCost::MulCost<Index>();\n    if (vectorized) {\n      compute_cost *= 2;  // packet() computes two indices\n    }\n    const int innerDim = (static_cast<int>(Layout) == static_cast<int>(ColMajor)) ? 0 : (NumDims - 1);\n    return m_impl.costPerCoeff(vectorized && m_inputStrides[innerDim] == 1) +\n        // Computation is not vectorized per se, but it is done once per packet.\n        TensorOpCost(0, 0, compute_cost, vectorized, PacketSize);\n  }\n\n  EIGEN_DEVICE_FUNC typename Storage::Type data() const { return NULL; }\n\n#ifdef EIGEN_USE_SYCL\n  // binding placeholder accessors to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {\n    m_impl.bind(cgh);\n  }\n#endif\n protected:\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index srcCoeff(Index index) const\n  {\n    Index inputIndex = 0;\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      EIGEN_UNROLL_LOOP\n      for (int i = NumDims - 1; i > 0; --i) {\n        const Index idx = index / m_outputStrides[i];\n        inputIndex += idx * m_inputStrides[i];\n        index -= idx * m_outputStrides[i];\n      }\n      inputIndex += index * m_inputStrides[0];\n    } else {  // RowMajor\n      EIGEN_UNROLL_LOOP\n      for (int i = 0; i < NumDims - 1; ++i) {\n        const Index idx = index / m_outputStrides[i];\n        inputIndex += idx * m_inputStrides[i];\n        index -= idx * m_outputStrides[i];\n      }\n      inputIndex += index * m_inputStrides[NumDims-1];\n    }\n    return inputIndex;\n  }\n\n  Dimensions m_dimensions;\n  array<Index, NumDims> m_outputStrides;\n  array<Index, NumDims> m_inputStrides;\n  TensorEvaluator<ArgType, Device> m_impl;\n};\n\n// Eval as lvalue\ntemplate<typename Strides, typename ArgType, typename Device>\nstruct TensorEvaluator<TensorStridingOp<Strides, ArgType>, Device>\n    : public TensorEvaluator<const TensorStridingOp<Strides, ArgType>, Device>\n{\n  typedef TensorStridingOp<Strides, ArgType> XprType;\n  typedef TensorEvaluator<const XprType, Device> Base;\n  //  typedef typename XprType::Index Index;\n  static const int NumDims = internal::array_size<typename TensorEvaluator<ArgType, Device>::Dimensions>::value;\n  //  typedef DSizes<Index, NumDims> Dimensions;\n\n  enum {\n    IsAligned = /*TensorEvaluator<ArgType, Device>::IsAligned*/false,\n    PacketAccess = TensorEvaluator<ArgType, Device>::PacketAccess,\n    PreferBlockAccess = false,\n    Layout = TensorEvaluator<ArgType, Device>::Layout,\n    CoordAccess = false,  // to be implemented\n    RawAccess = false\n  };\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)\n      : Base(op, device) { }\n\n  typedef typename XprType::Index Index;\n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  static const int PacketSize = PacketType<CoeffReturnType, Device>::size;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& coeffRef(Index index)\n  {\n    return this->m_impl.coeffRef(this->srcCoeff(index));\n  }\n\n  template <int StoreMode> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  void writePacket(Index index, const PacketReturnType& x)\n  {\n    EIGEN_STATIC_ASSERT((PacketSize > 1), YOU_MADE_A_PROGRAMMING_MISTAKE)\n    eigen_assert(index+PacketSize-1 < this->dimensions().TotalSize());\n\n    Index inputIndices[] = {0, 0};\n    Index indices[] = {index, index + PacketSize - 1};\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      EIGEN_UNROLL_LOOP\n      for (int i = NumDims - 1; i > 0; --i) {\n        const Index idx0 = indices[0] / this->m_outputStrides[i];\n        const Index idx1 = indices[1] / this->m_outputStrides[i];\n        inputIndices[0] += idx0 * this->m_inputStrides[i];\n        inputIndices[1] += idx1 * this->m_inputStrides[i];\n        indices[0] -= idx0 * this->m_outputStrides[i];\n        indices[1] -= idx1 * this->m_outputStrides[i];\n      }\n      inputIndices[0] += indices[0] * this->m_inputStrides[0];\n      inputIndices[1] += indices[1] * this->m_inputStrides[0];\n    } else {  // RowMajor\n      EIGEN_UNROLL_LOOP\n      for (int i = 0; i < NumDims - 1; ++i) {\n        const Index idx0 = indices[0] / this->m_outputStrides[i];\n        const Index idx1 = indices[1] / this->m_outputStrides[i];\n        inputIndices[0] += idx0 * this->m_inputStrides[i];\n        inputIndices[1] += idx1 * this->m_inputStrides[i];\n        indices[0] -= idx0 * this->m_outputStrides[i];\n        indices[1] -= idx1 * this->m_outputStrides[i];\n      }\n      inputIndices[0] += indices[0] * this->m_inputStrides[NumDims-1];\n      inputIndices[1] += indices[1] * this->m_inputStrides[NumDims-1];\n    }\n    if (inputIndices[1] - inputIndices[0] == PacketSize - 1) {\n      this->m_impl.template writePacket<Unaligned>(inputIndices[0], x);\n    }\n    else {\n      EIGEN_ALIGN_MAX Scalar values[PacketSize];\n      internal::pstore<Scalar, PacketReturnType>(values, x);\n      this->m_impl.coeffRef(inputIndices[0]) = values[0];\n      this->m_impl.coeffRef(inputIndices[1]) = values[PacketSize-1];\n      EIGEN_UNROLL_LOOP\n      for (int i = 1; i < PacketSize-1; ++i) {\n        this->coeffRef(index+i) = values[i];\n      }\n    }\n  }\n};\n\n\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_STRIDING_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorTrace.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2017 Gagan Goel <gagan.nith@gmail.com>\n// Copyright (C) 2017 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_TRACE_H\n#define EIGEN_CXX11_TENSOR_TENSOR_TRACE_H\n\nnamespace Eigen {\n\n/** \\class TensorTrace\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief Tensor Trace class.\n  *\n  *\n  */\n\nnamespace internal {\ntemplate<typename Dims, typename XprType>\nstruct traits<TensorTraceOp<Dims, XprType> > : public traits<XprType>\n{\n  typedef typename XprType::Scalar Scalar;\n  typedef traits<XprType> XprTraits;\n  typedef typename XprTraits::StorageKind StorageKind;\n  typedef typename XprTraits::Index Index;\n  typedef typename XprType::Nested Nested;\n  typedef typename remove_reference<Nested>::type _Nested;\n  static const int NumDimensions = XprTraits::NumDimensions - array_size<Dims>::value;\n  static const int Layout = XprTraits::Layout;\n};\n\ntemplate<typename Dims, typename XprType>\nstruct eval<TensorTraceOp<Dims, XprType>, Eigen::Dense>\n{\n  typedef const TensorTraceOp<Dims, XprType>& type;\n};\n\ntemplate<typename Dims, typename XprType>\nstruct nested<TensorTraceOp<Dims, XprType>, 1, typename eval<TensorTraceOp<Dims, XprType> >::type>\n{\n  typedef TensorTraceOp<Dims, XprType> type;\n};\n\n} // end namespace internal\n\n\ntemplate<typename Dims, typename XprType>\nclass TensorTraceOp : public TensorBase<TensorTraceOp<Dims, XprType> >\n{\n  public:\n    typedef typename Eigen::internal::traits<TensorTraceOp>::Scalar Scalar;\n    typedef typename Eigen::NumTraits<Scalar>::Real RealScalar;\n    typedef typename XprType::CoeffReturnType CoeffReturnType;\n    typedef typename Eigen::internal::nested<TensorTraceOp>::type Nested;\n    typedef typename Eigen::internal::traits<TensorTraceOp>::StorageKind StorageKind;\n    typedef typename Eigen::internal::traits<TensorTraceOp>::Index Index;\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorTraceOp(const XprType& expr, const Dims& dims)\n      : m_xpr(expr), m_dims(dims) {\n    }\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const Dims& dims() const { return m_dims; }\n\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n    const typename internal::remove_all<typename XprType::Nested>::type& expression() const { return m_xpr; }\n\n  protected:\n    typename XprType::Nested m_xpr;\n    const Dims m_dims;\n};\n\n\n// Eval as rvalue\ntemplate<typename Dims, typename ArgType, typename Device>\nstruct TensorEvaluator<const TensorTraceOp<Dims, ArgType>, Device>\n{\n  typedef TensorTraceOp<Dims, ArgType> XprType;\n  static const int NumInputDims = internal::array_size<typename TensorEvaluator<ArgType, Device>::Dimensions>::value;\n  static const int NumReducedDims = internal::array_size<Dims>::value;\n  static const int NumOutputDims = NumInputDims - NumReducedDims;\n  typedef typename XprType::Index Index;\n  typedef DSizes<Index, NumOutputDims> Dimensions;\n  typedef typename XprType::Scalar Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  static const int PacketSize = internal::unpacket_traits<PacketReturnType>::size;\n  typedef StorageMemory<CoeffReturnType, Device> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n\n  enum {\n    IsAligned = false,\n    PacketAccess = TensorEvaluator<ArgType, Device>::PacketAccess,\n    BlockAccess = false,\n    PreferBlockAccess = TensorEvaluator<ArgType, Device>::PreferBlockAccess,\n    Layout = TensorEvaluator<ArgType, Device>::Layout,\n    CoordAccess = false,\n    RawAccess = false\n  };\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockNotImplemented TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)\n    : m_impl(op.expression(), device), m_traceDim(1), m_device(device)\n  {\n\n    EIGEN_STATIC_ASSERT((NumOutputDims >= 0), YOU_MADE_A_PROGRAMMING_MISTAKE);\n    EIGEN_STATIC_ASSERT((NumReducedDims >= 2) || ((NumReducedDims == 0) && (NumInputDims == 0)), YOU_MADE_A_PROGRAMMING_MISTAKE);\n\n    for (int i = 0; i < NumInputDims; ++i) {\n      m_reduced[i] = false;\n    }\n\n    const Dims& op_dims = op.dims();\n    for (int i = 0; i < NumReducedDims; ++i) {\n      eigen_assert(op_dims[i] >= 0);\n      eigen_assert(op_dims[i] < NumInputDims);\n      m_reduced[op_dims[i]] = true;\n    }\n\n    // All the dimensions should be distinct to compute the trace\n    int num_distinct_reduce_dims = 0;\n    for (int i = 0; i < NumInputDims; ++i) {\n      if (m_reduced[i]) {\n        ++num_distinct_reduce_dims;\n      }\n    }\n\n    eigen_assert(num_distinct_reduce_dims == NumReducedDims);\n\n    // Compute the dimensions of the result.\n    const typename TensorEvaluator<ArgType, Device>::Dimensions& input_dims = m_impl.dimensions();\n\n    int output_index = 0;\n    int reduced_index = 0;\n    for (int i = 0; i < NumInputDims; ++i) {\n      if (m_reduced[i]) {\n        m_reducedDims[reduced_index] = input_dims[i];\n        if (reduced_index > 0) {\n          // All the trace dimensions must have the same size\n          eigen_assert(m_reducedDims[0] == m_reducedDims[reduced_index]);\n        }\n        ++reduced_index;\n      }\n      else {\n        m_dimensions[output_index] = input_dims[i];\n        ++output_index;\n      }\n    }\n\n    if (NumReducedDims != 0) {\n      m_traceDim = m_reducedDims[0];\n    }\n\n    // Compute the output strides\n    if (NumOutputDims > 0) {\n      if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n        m_outputStrides[0] = 1;\n        for (int i = 1; i < NumOutputDims; ++i) {\n          m_outputStrides[i] = m_outputStrides[i - 1] * m_dimensions[i - 1];\n        }\n      }\n      else {\n        m_outputStrides.back() = 1;\n        for (int i = NumOutputDims - 2; i >= 0; --i) {\n          m_outputStrides[i] = m_outputStrides[i + 1] * m_dimensions[i + 1];\n        }\n      }\n    }\n\n    // Compute the input strides\n    if (NumInputDims > 0) {\n      array<Index, NumInputDims> input_strides;\n      if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n        input_strides[0] = 1;\n        for (int i = 1; i < NumInputDims; ++i) {\n          input_strides[i] = input_strides[i - 1] * input_dims[i - 1];\n        }\n      }\n      else {\n        input_strides.back() = 1;\n        for (int i = NumInputDims - 2; i >= 0; --i) {\n          input_strides[i] = input_strides[i + 1] * input_dims[i + 1];\n        }\n      }\n\n      output_index = 0;\n      reduced_index = 0;\n      for (int i = 0; i < NumInputDims; ++i) {\n        if(m_reduced[i]) {\n          m_reducedStrides[reduced_index] = input_strides[i];\n          ++reduced_index;\n        }\n        else {\n          m_preservedStrides[output_index] = input_strides[i];\n          ++output_index;\n        }\n      }\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions& dimensions() const {\n    return m_dimensions;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType /*data*/) {\n    m_impl.evalSubExprsIfNeeded(NULL);\n    return true;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {\n    m_impl.cleanup();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const\n  {\n    // Initialize the result\n    CoeffReturnType result = internal::cast<int, CoeffReturnType>(0);\n    Index index_stride = 0;\n    for (int i = 0; i < NumReducedDims; ++i) {\n      index_stride += m_reducedStrides[i];\n    }\n\n    // If trace is requested along all dimensions, starting index would be 0\n    Index cur_index = 0;\n    if (NumOutputDims != 0)\n      cur_index = firstInput(index);\n    for (Index i = 0; i < m_traceDim; ++i) {\n        result += m_impl.coeff(cur_index);\n        cur_index += index_stride;\n    }\n\n    return result;\n  }\n\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const {\n\n    EIGEN_STATIC_ASSERT((PacketSize > 1), YOU_MADE_A_PROGRAMMING_MISTAKE);\n    eigen_assert(index + PacketSize - 1 < dimensions().TotalSize());\n\n    EIGEN_ALIGN_MAX typename internal::remove_const<CoeffReturnType>::type values[PacketSize];\n    for (int i = 0; i < PacketSize; ++i) {\n        values[i] = coeff(index + i);\n    }\n    PacketReturnType result = internal::ploadt<PacketReturnType, LoadMode>(values);\n    return result;\n  }\n\n#ifdef EIGEN_USE_SYCL\n  // binding placeholder accessors to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {\n    m_impl.bind(cgh);\n  }\n#endif\n\n protected:\n  // Given the output index, finds the first index in the input tensor used to compute the trace\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index firstInput(Index index) const {\n    Index startInput = 0;\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      for (int i = NumOutputDims - 1; i > 0; --i) {\n        const Index idx = index / m_outputStrides[i];\n        startInput += idx * m_preservedStrides[i];\n        index -= idx * m_outputStrides[i];\n      }\n      startInput += index * m_preservedStrides[0];\n    }\n    else {\n      for (int i = 0; i < NumOutputDims - 1; ++i) {\n        const Index idx = index / m_outputStrides[i];\n        startInput += idx * m_preservedStrides[i];\n        index -= idx * m_outputStrides[i];\n      }\n      startInput += index * m_preservedStrides[NumOutputDims - 1];\n    }\n    return startInput;\n  }\n\n  Dimensions m_dimensions;\n  TensorEvaluator<ArgType, Device> m_impl;\n  // Initialize the size of the trace dimension\n  Index m_traceDim;\n  const Device EIGEN_DEVICE_REF m_device;\n  array<bool, NumInputDims> m_reduced;\n  array<Index, NumReducedDims> m_reducedDims;\n  array<Index, NumOutputDims> m_outputStrides;\n  array<Index, NumReducedDims> m_reducedStrides;\n  array<Index, NumOutputDims> m_preservedStrides;\n};\n\n\n} // End namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_TRACE_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorTraits.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_TRAITS_H\n#define EIGEN_CXX11_TENSOR_TENSOR_TRAITS_H\n\nnamespace Eigen {\nnamespace internal {\n\n\ntemplate<typename Scalar, int Options>\nclass compute_tensor_flags\n{\n  enum {\n    is_dynamic_size_storage = 1,\n\n    is_aligned =\n    (\n        ((Options&DontAlign)==0) && (\n#if EIGEN_MAX_STATIC_ALIGN_BYTES>0\n            (!is_dynamic_size_storage)\n#else\n            0\n#endif\n            |\n#if EIGEN_MAX_ALIGN_BYTES>0\n            is_dynamic_size_storage\n#else\n            0\n#endif\n      )\n     ),\n    packet_access_bit = packet_traits<Scalar>::Vectorizable && is_aligned ? PacketAccessBit : 0\n  };\n\n  public:\n    enum { ret = packet_access_bit };\n};\n\n\ntemplate<typename Scalar_, int NumIndices_, int Options_, typename IndexType_>\nstruct traits<Tensor<Scalar_, NumIndices_, Options_, IndexType_> >\n{\n  typedef Scalar_ Scalar;\n  typedef Dense StorageKind;\n  typedef IndexType_ Index;\n  static const int NumDimensions = NumIndices_;\n  static const int Layout = Options_ & RowMajor ? RowMajor : ColMajor;\n  enum {\n    Options = Options_,\n    Flags = compute_tensor_flags<Scalar_, Options_>::ret | (is_const<Scalar_>::value ? 0 : LvalueBit)\n  };\n  template <typename T> struct MakePointer {\n    typedef T* Type;\n  };\n  typedef typename MakePointer<Scalar>::Type PointerType;\n};\n\n\ntemplate<typename Scalar_, typename Dimensions, int Options_, typename IndexType_>\nstruct traits<TensorFixedSize<Scalar_, Dimensions, Options_, IndexType_> >\n{\n  typedef Scalar_ Scalar;\n  typedef Dense StorageKind;\n  typedef IndexType_ Index;\n  static const int NumDimensions = array_size<Dimensions>::value;\n  static const int Layout = Options_ & RowMajor ? RowMajor : ColMajor;\n  enum {\n    Options = Options_,\n    Flags = compute_tensor_flags<Scalar_, Options_>::ret | (is_const<Scalar_>::value ? 0: LvalueBit)\n  };\n  template <typename T> struct MakePointer {\n    typedef T* Type;\n  };\n  typedef typename MakePointer<Scalar>::Type PointerType;\n};\n\n\ntemplate<typename PlainObjectType, int Options_, template <class> class MakePointer_>\nstruct traits<TensorMap<PlainObjectType, Options_, MakePointer_> >\n  : public traits<PlainObjectType>\n{\n  typedef traits<PlainObjectType> BaseTraits;\n  typedef typename BaseTraits::Scalar Scalar;\n  typedef typename BaseTraits::StorageKind StorageKind;\n  typedef typename BaseTraits::Index Index;\n  static const int NumDimensions = BaseTraits::NumDimensions;\n  static const int Layout = BaseTraits::Layout;\n  enum {\n    Options = Options_,\n    Flags = BaseTraits::Flags\n  };\n  template <class T> struct MakePointer {\n    // Intermediate typedef to workaround MSVC issue.\n    typedef MakePointer_<T> MakePointerT;\n    typedef typename MakePointerT::Type Type;\n  };\n  typedef typename MakePointer<Scalar>::Type PointerType;\n};\n\ntemplate<typename PlainObjectType>\nstruct traits<TensorRef<PlainObjectType> >\n  : public traits<PlainObjectType>\n{\n  typedef traits<PlainObjectType> BaseTraits;\n  typedef typename BaseTraits::Scalar Scalar;\n  typedef typename BaseTraits::StorageKind StorageKind;\n  typedef typename BaseTraits::Index Index;\n  static const int NumDimensions = BaseTraits::NumDimensions;\n  static const int Layout = BaseTraits::Layout;\n  enum {\n    Options = BaseTraits::Options,\n    Flags = BaseTraits::Flags\n  };\n  typedef typename BaseTraits::PointerType PointerType;\n};\n\n\ntemplate<typename _Scalar, int NumIndices_, int Options, typename IndexType_>\nstruct eval<Tensor<_Scalar, NumIndices_, Options, IndexType_>, Eigen::Dense>\n{\n  typedef const Tensor<_Scalar, NumIndices_, Options, IndexType_>EIGEN_DEVICE_REF type;\n};\n\ntemplate<typename _Scalar, int NumIndices_, int Options, typename IndexType_>\nstruct eval<const Tensor<_Scalar, NumIndices_, Options, IndexType_>, Eigen::Dense>\n{\n  typedef const Tensor<_Scalar, NumIndices_, Options, IndexType_>EIGEN_DEVICE_REF type;\n};\n\ntemplate<typename Scalar_, typename Dimensions, int Options, typename IndexType_>\nstruct eval<TensorFixedSize<Scalar_, Dimensions, Options, IndexType_>, Eigen::Dense>\n{\n  typedef const TensorFixedSize<Scalar_, Dimensions, Options, IndexType_>EIGEN_DEVICE_REF type;\n};\n\ntemplate<typename Scalar_, typename Dimensions, int Options, typename IndexType_>\nstruct eval<const TensorFixedSize<Scalar_, Dimensions, Options, IndexType_>, Eigen::Dense>\n{\n  typedef const TensorFixedSize<Scalar_, Dimensions, Options, IndexType_>EIGEN_DEVICE_REF type;\n};\n\ntemplate<typename PlainObjectType, int Options, template <class> class MakePointer>\nstruct eval<TensorMap<PlainObjectType, Options, MakePointer>, Eigen::Dense>\n{\n  typedef const TensorMap<PlainObjectType, Options, MakePointer>EIGEN_DEVICE_REF type;\n};\n\ntemplate<typename PlainObjectType, int Options, template <class> class MakePointer>\nstruct eval<const TensorMap<PlainObjectType, Options, MakePointer>, Eigen::Dense>\n{\n  typedef const TensorMap<PlainObjectType, Options, MakePointer>EIGEN_DEVICE_REF type;\n};\n\ntemplate<typename PlainObjectType>\nstruct eval<TensorRef<PlainObjectType>, Eigen::Dense>\n{\n  typedef const TensorRef<PlainObjectType>EIGEN_DEVICE_REF type;\n};\n\ntemplate<typename PlainObjectType>\nstruct eval<const TensorRef<PlainObjectType>, Eigen::Dense>\n{\n  typedef const TensorRef<PlainObjectType>EIGEN_DEVICE_REF type;\n};\n\n// TODO nested<> does not exist anymore in Eigen/Core, and it thus has to be removed in favor of ref_selector.\ntemplate<typename T, int n=1, typename PlainObject = void> struct nested\n{\n  typedef typename ref_selector<T>::type type;\n};\n\ntemplate <typename Scalar_, int NumIndices_, int Options_, typename IndexType_>\nstruct nested<Tensor<Scalar_, NumIndices_, Options_, IndexType_> >\n{\n  typedef const Tensor<Scalar_, NumIndices_, Options_, IndexType_>EIGEN_DEVICE_REF type;\n};\n\ntemplate <typename Scalar_, int NumIndices_, int Options_, typename IndexType_>\nstruct nested<const Tensor<Scalar_, NumIndices_, Options_, IndexType_> >\n{\n  typedef const Tensor<Scalar_, NumIndices_, Options_, IndexType_>EIGEN_DEVICE_REF type;\n};\n\ntemplate <typename Scalar_, typename Dimensions, int Options, typename IndexType_>\nstruct nested<TensorFixedSize<Scalar_, Dimensions, Options, IndexType_> >\n{\n  typedef const TensorFixedSize<Scalar_, Dimensions, Options, IndexType_>EIGEN_DEVICE_REF type;\n};\n\ntemplate <typename Scalar_, typename Dimensions, int Options, typename IndexType_>\nstruct nested<const TensorFixedSize<Scalar_, Dimensions, Options, IndexType_> >\n{\n  typedef const TensorFixedSize<Scalar_, Dimensions, Options, IndexType_>EIGEN_DEVICE_REF type;\n};\n\n\ntemplate <typename PlainObjectType>\nstruct nested<TensorRef<PlainObjectType> >\n{\n  typedef const TensorRef<PlainObjectType>EIGEN_DEVICE_REF type;\n};\n\ntemplate <typename PlainObjectType>\nstruct nested<const TensorRef<PlainObjectType> >\n{\n  typedef const TensorRef<PlainObjectType>EIGEN_DEVICE_REF type;\n};\n\n}  // end namespace internal\n\n// Convolutional layers take in an input tensor of shape (D, R, C, B), or (D, C,\n// R, B), and convolve it with a set of filters, which can also be presented as\n// a tensor (D, K, K, M), where M is the number of filters, K is the filter\n// size, and each 3-dimensional tensor of size (D, K, K) is a filter. For\n// simplicity we assume that we always use square filters (which is usually the\n// case in images), hence the two Ks in the tensor dimension.  It also takes in\n// a few additional parameters:\n// Stride (S): The convolution stride is the offset between locations where we\n//             apply the filters.  A larger stride means that the output will be\n//             spatially smaller.\n// Padding (P): The padding we apply to the input tensor along the R and C\n//              dimensions.  This is usually used to make sure that the spatial\n//              dimensions of the output matches our intention.\n//\n// Two types of padding are often used:\n//   SAME: The pad value is computed so that the output will have size\n//         R/S and C/S.\n//   VALID: no padding is carried out.\n// When we do padding, the padded values at the padded locations are usually\n// zero.\n//\n// The output dimensions for convolution, when given all the parameters above,\n// are as follows:\n// When Padding = SAME: the output size is (B, R', C', M), where\n//   R' = ceil(float(R) / float(S))\n//   C' = ceil(float(C) / float(S))\n// where ceil is the ceiling function.  The input tensor is padded with 0 as\n// needed.  The number of padded rows and columns are computed as:\n//   Pr = ((R' - 1) * S + K - R) / 2\n//   Pc = ((C' - 1) * S + K - C) / 2\n// when the stride is 1, we have the simplified case R'=R, C'=C, Pr=Pc=(K-1)/2.\n// This is where SAME comes from - the output has the same size as the input has.\n// When Padding = VALID: the output size is computed as\n//   R' = ceil(float(R - K + 1) / float(S))\n//   C' = ceil(float(C - K + 1) / float(S))\n// and the number of padded rows and columns are computed in the same way as in\n// the SAME case.\n// When the stride is 1, we have the simplified case R'=R-K+1, C'=C-K+1, Pr=0,\n// Pc=0.\ntypedef enum {\n  PADDING_VALID = 1,\n  PADDING_SAME = 2\n} PaddingType;\n\n}  // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_TRAITS_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorUInt128.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_UINT128_H\n#define EIGEN_CXX11_TENSOR_TENSOR_UINT128_H\n\nnamespace Eigen {\nnamespace internal {\n\n\ntemplate <uint64_t n>\nstruct static_val {\n  static const uint64_t value = n;\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE operator uint64_t() const { return n; }\n\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE static_val() { }\n\n  template <typename T>\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE static_val(const T& v) {\n    EIGEN_UNUSED_VARIABLE(v);\n    eigen_assert(v == n);\n  }\n};\n\n\ntemplate <typename HIGH = uint64_t, typename LOW = uint64_t>\nstruct TensorUInt128\n{\n  HIGH high;\n  LOW low;\n\n  template<typename OTHER_HIGH, typename OTHER_LOW>\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\n  TensorUInt128(const TensorUInt128<OTHER_HIGH, OTHER_LOW>& other) : high(other.high), low(other.low) {\n    EIGEN_STATIC_ASSERT(sizeof(OTHER_HIGH) <= sizeof(HIGH), YOU_MADE_A_PROGRAMMING_MISTAKE);\n    EIGEN_STATIC_ASSERT(sizeof(OTHER_LOW) <= sizeof(LOW), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  }\n\n  template<typename OTHER_HIGH, typename OTHER_LOW>\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\n  TensorUInt128& operator = (const TensorUInt128<OTHER_HIGH, OTHER_LOW>& other) {\n    EIGEN_STATIC_ASSERT(sizeof(OTHER_HIGH) <= sizeof(HIGH), YOU_MADE_A_PROGRAMMING_MISTAKE);\n    EIGEN_STATIC_ASSERT(sizeof(OTHER_LOW) <= sizeof(LOW), YOU_MADE_A_PROGRAMMING_MISTAKE);\n    high = other.high;\n    low = other.low;\n    return *this;\n  }\n\n  template<typename T>\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\n  explicit TensorUInt128(const T& x) : high(0), low(x) {\n    eigen_assert((static_cast<typename conditional<sizeof(T) == 8, uint64_t, uint32_t>::type>(x) <= NumTraits<uint64_t>::highest()));\n    eigen_assert(x >= 0);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\n  TensorUInt128(HIGH y, LOW x) : high(y), low(x) { }\n\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE operator LOW() const {\n    return low;\n  }\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE LOW lower() const {\n    return low;\n  }\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE HIGH upper() const {\n    return high;\n  }\n};\n\n\ntemplate <typename HL, typename LL, typename HR, typename LR>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nbool operator == (const TensorUInt128<HL, LL>& lhs, const TensorUInt128<HR, LR>& rhs)\n{\n  return (lhs.high == rhs.high) & (lhs.low == rhs.low);\n}\n\ntemplate <typename HL, typename LL, typename HR, typename LR>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nbool operator != (const TensorUInt128<HL, LL>& lhs, const TensorUInt128<HR, LR>& rhs)\n{\n  return (lhs.high != rhs.high) | (lhs.low != rhs.low);\n}\n\ntemplate <typename HL, typename LL, typename HR, typename LR>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nbool operator >= (const TensorUInt128<HL, LL>& lhs, const TensorUInt128<HR, LR>& rhs)\n{\n  if (lhs.high != rhs.high) {\n    return lhs.high > rhs.high;\n  }\n  return lhs.low >= rhs.low;\n}\n\ntemplate <typename HL, typename LL, typename HR, typename LR>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nbool operator < (const TensorUInt128<HL, LL>& lhs, const TensorUInt128<HR, LR>& rhs)\n{\n  if (lhs.high != rhs.high) {\n    return lhs.high < rhs.high;\n  }\n  return lhs.low < rhs.low;\n}\n\ntemplate <typename HL, typename LL, typename HR, typename LR>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nTensorUInt128<uint64_t, uint64_t> operator + (const TensorUInt128<HL, LL>& lhs, const TensorUInt128<HR, LR>& rhs)\n{\n  TensorUInt128<uint64_t, uint64_t> result(lhs.high + rhs.high, lhs.low + rhs.low);\n  if (result.low < rhs.low) {\n    result.high += 1;\n  }\n  return result;\n}\n\ntemplate <typename HL, typename LL, typename HR, typename LR>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nTensorUInt128<uint64_t, uint64_t> operator - (const TensorUInt128<HL, LL>& lhs, const TensorUInt128<HR, LR>& rhs)\n{\n  TensorUInt128<uint64_t, uint64_t> result(lhs.high - rhs.high, lhs.low - rhs.low);\n  if (result.low > lhs.low) {\n    result.high -= 1;\n  }\n  return result;\n}\n\n\ntemplate <typename HL, typename LL, typename HR, typename LR>\nstatic EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nTensorUInt128<uint64_t, uint64_t> operator * (const TensorUInt128<HL, LL>& lhs, const TensorUInt128<HR, LR>& rhs)\n{\n  // Split each 128-bit integer into 4 32-bit integers, and then do the\n  // multiplications by hand as follow:\n  //   lhs      a  b  c  d\n  //   rhs      e  f  g  h\n  //           -----------\n  //           ah bh ch dh\n  //           bg cg dg\n  //           cf df\n  //           de\n  // The result is stored in 2 64bit integers, high and low.\n\n  const uint64_t LOW = 0x00000000FFFFFFFFLL;\n  const uint64_t HIGH = 0xFFFFFFFF00000000LL;\n\n  uint64_t d = lhs.low & LOW;\n  uint64_t c = (lhs.low & HIGH) >> 32LL;\n  uint64_t b = lhs.high & LOW;\n  uint64_t a = (lhs.high & HIGH) >> 32LL;\n\n  uint64_t h = rhs.low & LOW;\n  uint64_t g = (rhs.low & HIGH) >> 32LL;\n  uint64_t f = rhs.high & LOW;\n  uint64_t e = (rhs.high & HIGH) >> 32LL;\n\n  // Compute the low 32 bits of low\n  uint64_t acc = d * h;\n  uint64_t low = acc & LOW;\n  //  Compute the high 32 bits of low. Add a carry every time we wrap around\n  acc >>= 32LL;\n  uint64_t carry = 0;\n  uint64_t acc2 = acc + c * h;\n  if (acc2 < acc) {\n    carry++;\n  }\n  acc = acc2 + d * g;\n  if (acc < acc2) {\n    carry++;\n  }\n  low |= (acc << 32LL);\n\n  // Carry forward the high bits of acc to initiate the computation of the\n  // low 32 bits of high\n  acc2 = (acc >> 32LL) | (carry << 32LL);\n  carry = 0;\n\n  acc = acc2 + b * h;\n  if (acc < acc2) {\n    carry++;\n  }\n  acc2 = acc + c * g;\n  if (acc2 < acc) {\n    carry++;\n  }\n  acc = acc2 + d * f;\n  if (acc < acc2) {\n    carry++;\n  }\n  uint64_t high = acc & LOW;\n\n  // Start to compute the high 32 bits of high.\n  acc2 = (acc >> 32LL) | (carry << 32LL);\n\n  acc = acc2 + a * h;\n  acc2 = acc + b * g;\n  acc = acc2 + c * f;\n  acc2 = acc + d * e;\n  high |= (acc2 << 32LL);\n\n  return TensorUInt128<uint64_t, uint64_t>(high, low);\n}\n\ntemplate <typename HL, typename LL, typename HR, typename LR>\nstatic EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nTensorUInt128<uint64_t, uint64_t> operator / (const TensorUInt128<HL, LL>& lhs, const TensorUInt128<HR, LR>& rhs)\n{\n  if (rhs == TensorUInt128<static_val<0>, static_val<1> >(1)) {\n    return TensorUInt128<uint64_t, uint64_t>(lhs.high, lhs.low);\n  } else if (lhs < rhs) {\n    return TensorUInt128<uint64_t, uint64_t>(0);\n  } else {\n    // calculate the biggest power of 2 times rhs that's less than or equal to lhs\n    TensorUInt128<uint64_t, uint64_t> power2(1);\n    TensorUInt128<uint64_t, uint64_t> d(rhs);\n    TensorUInt128<uint64_t, uint64_t> tmp(lhs - d);\n    while (lhs >= d) {\n      tmp = tmp - d;\n      d = d + d;\n      power2 = power2 + power2;\n    }\n\n    tmp = TensorUInt128<uint64_t, uint64_t>(lhs.high, lhs.low);\n    TensorUInt128<uint64_t, uint64_t> result(0);\n    while (power2 != TensorUInt128<static_val<0>, static_val<0> >(0)) {\n      if (tmp >= d) {\n        tmp = tmp - d;\n        result = result + power2;\n      }\n      // Shift right\n      power2 = TensorUInt128<uint64_t, uint64_t>(power2.high >> 1, (power2.low >> 1) | (power2.high << 63));\n      d = TensorUInt128<uint64_t, uint64_t>(d.high >> 1, (d.low >> 1) | (d.high << 63));\n    }\n\n    return result;\n  }\n}\n\n\n}  // namespace internal\n}  // namespace Eigen\n\n\n#endif  // EIGEN_CXX11_TENSOR_TENSOR_UINT128_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorVolumePatch.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n\n#ifndef EIGEN_CXX11_TENSOR_TENSOR_VOLUME_PATCH_H\n#define EIGEN_CXX11_TENSOR_TENSOR_VOLUME_PATCH_H\n\nnamespace Eigen {\n\n/** \\class TensorVolumePatch\n  * \\ingroup CXX11_Tensor_Module\n  *\n  * \\brief Patch extraction specialized for processing of volumetric data.\n  * This assumes that the input has a least 4 dimensions ordered as follows:\n  *  - channels\n  *  - planes\n  *  - rows\n  *  - columns\n  *  - (optional) additional dimensions such as time or batch size.\n  * Calling the volume patch code with patch_planes, patch_rows, and patch_cols\n  * is equivalent to calling the regular patch extraction code with parameters\n  * d, patch_planes, patch_rows, patch_cols, and 1 for all the additional\n  * dimensions.\n  */\nnamespace internal {\n\ntemplate<DenseIndex Planes, DenseIndex Rows, DenseIndex Cols, typename XprType>\nstruct traits<TensorVolumePatchOp<Planes, Rows, Cols, XprType> > : public traits<XprType>\n{\n  typedef typename internal::remove_const<typename XprType::Scalar>::type Scalar;\n  typedef traits<XprType> XprTraits;\n  typedef typename XprTraits::StorageKind StorageKind;\n  typedef typename XprTraits::Index Index;\n  typedef typename XprType::Nested Nested;\n  typedef typename remove_reference<Nested>::type _Nested;\n  static const int NumDimensions = XprTraits::NumDimensions + 1;\n  static const int Layout = XprTraits::Layout;\n  typedef typename XprTraits::PointerType PointerType;\n\n};\n\ntemplate<DenseIndex Planes, DenseIndex Rows, DenseIndex Cols, typename XprType>\nstruct eval<TensorVolumePatchOp<Planes, Rows, Cols, XprType>, Eigen::Dense>\n{\n  typedef const TensorVolumePatchOp<Planes, Rows, Cols, XprType>& type;\n};\n\ntemplate<DenseIndex Planes, DenseIndex Rows, DenseIndex Cols, typename XprType>\nstruct nested<TensorVolumePatchOp<Planes, Rows, Cols, XprType>, 1, typename eval<TensorVolumePatchOp<Planes, Rows, Cols, XprType> >::type>\n{\n  typedef TensorVolumePatchOp<Planes, Rows, Cols, XprType> type;\n};\n\n}  // end namespace internal\n\ntemplate<DenseIndex Planes, DenseIndex Rows, DenseIndex Cols, typename XprType>\nclass TensorVolumePatchOp : public TensorBase<TensorVolumePatchOp<Planes, Rows, Cols, XprType>, ReadOnlyAccessors>\n{\n  public:\n  typedef typename Eigen::internal::traits<TensorVolumePatchOp>::Scalar Scalar;\n  typedef typename Eigen::NumTraits<Scalar>::Real RealScalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename Eigen::internal::nested<TensorVolumePatchOp>::type Nested;\n  typedef typename Eigen::internal::traits<TensorVolumePatchOp>::StorageKind StorageKind;\n  typedef typename Eigen::internal::traits<TensorVolumePatchOp>::Index Index;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorVolumePatchOp(const XprType& expr, DenseIndex patch_planes, DenseIndex patch_rows, DenseIndex patch_cols,\n                                                            DenseIndex plane_strides, DenseIndex row_strides, DenseIndex col_strides,\n                                                            DenseIndex in_plane_strides, DenseIndex in_row_strides, DenseIndex in_col_strides,\n                                                            DenseIndex plane_inflate_strides, DenseIndex row_inflate_strides, DenseIndex col_inflate_strides,\n                                                            PaddingType padding_type, Scalar padding_value)\n                                                            : m_xpr(expr), m_patch_planes(patch_planes), m_patch_rows(patch_rows), m_patch_cols(patch_cols),\n                                                            m_plane_strides(plane_strides), m_row_strides(row_strides), m_col_strides(col_strides),\n                                                            m_in_plane_strides(in_plane_strides), m_in_row_strides(in_row_strides), m_in_col_strides(in_col_strides),\n                                                            m_plane_inflate_strides(plane_inflate_strides), m_row_inflate_strides(row_inflate_strides), m_col_inflate_strides(col_inflate_strides),\n                                                            m_padding_explicit(false), m_padding_top_z(0), m_padding_bottom_z(0), m_padding_top(0), m_padding_bottom(0), m_padding_left(0), m_padding_right(0),\n                                                            m_padding_type(padding_type), m_padding_value(padding_value) {}\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorVolumePatchOp(const XprType& expr, DenseIndex patch_planes, DenseIndex patch_rows, DenseIndex patch_cols,\n                                                           DenseIndex plane_strides, DenseIndex row_strides, DenseIndex col_strides,\n                                                           DenseIndex in_plane_strides, DenseIndex in_row_strides, DenseIndex in_col_strides,\n                                                           DenseIndex plane_inflate_strides, DenseIndex row_inflate_strides, DenseIndex col_inflate_strides,\n                                                           DenseIndex padding_top_z, DenseIndex padding_bottom_z,\n                                                           DenseIndex padding_top, DenseIndex padding_bottom,\n                                                           DenseIndex padding_left, DenseIndex padding_right,\n                                                           Scalar padding_value)\n                                                           : m_xpr(expr), m_patch_planes(patch_planes), m_patch_rows(patch_rows), m_patch_cols(patch_cols),\n                                                           m_plane_strides(plane_strides), m_row_strides(row_strides), m_col_strides(col_strides),\n                                                           m_in_plane_strides(in_plane_strides), m_in_row_strides(in_row_strides), m_in_col_strides(in_col_strides),\n                                                           m_plane_inflate_strides(plane_inflate_strides), m_row_inflate_strides(row_inflate_strides), m_col_inflate_strides(col_inflate_strides),\n                                                           m_padding_explicit(true), m_padding_top_z(padding_top_z), m_padding_bottom_z(padding_bottom_z), m_padding_top(padding_top), m_padding_bottom(padding_bottom),\n                                                           m_padding_left(padding_left), m_padding_right(padding_right),\n                                                           m_padding_type(PADDING_VALID), m_padding_value(padding_value) {}\n\n    EIGEN_DEVICE_FUNC\n    DenseIndex patch_planes() const { return m_patch_planes; }\n    EIGEN_DEVICE_FUNC\n    DenseIndex patch_rows() const { return m_patch_rows; }\n    EIGEN_DEVICE_FUNC\n    DenseIndex patch_cols() const { return m_patch_cols; }\n    EIGEN_DEVICE_FUNC\n    DenseIndex plane_strides() const { return m_plane_strides; }\n    EIGEN_DEVICE_FUNC\n    DenseIndex row_strides() const { return m_row_strides; }\n    EIGEN_DEVICE_FUNC\n    DenseIndex col_strides() const { return m_col_strides; }\n    EIGEN_DEVICE_FUNC\n    DenseIndex in_plane_strides() const { return m_in_plane_strides; }\n    EIGEN_DEVICE_FUNC\n    DenseIndex in_row_strides() const { return m_in_row_strides; }\n    EIGEN_DEVICE_FUNC\n    DenseIndex in_col_strides() const { return m_in_col_strides; }\n    EIGEN_DEVICE_FUNC\n    DenseIndex plane_inflate_strides() const { return m_plane_inflate_strides; }\n    EIGEN_DEVICE_FUNC\n    DenseIndex row_inflate_strides() const { return m_row_inflate_strides; }\n    EIGEN_DEVICE_FUNC\n    DenseIndex col_inflate_strides() const { return m_col_inflate_strides; }\n    EIGEN_DEVICE_FUNC\n    bool padding_explicit() const { return m_padding_explicit; }\n    EIGEN_DEVICE_FUNC\n    DenseIndex padding_top_z() const { return m_padding_top_z; }\n    EIGEN_DEVICE_FUNC\n    DenseIndex padding_bottom_z() const { return m_padding_bottom_z; }\n    EIGEN_DEVICE_FUNC\n    DenseIndex padding_top() const { return m_padding_top; }\n    EIGEN_DEVICE_FUNC\n    DenseIndex padding_bottom() const { return m_padding_bottom; }\n    EIGEN_DEVICE_FUNC\n    DenseIndex padding_left() const { return m_padding_left; }\n    EIGEN_DEVICE_FUNC\n    DenseIndex padding_right() const { return m_padding_right; }\n    EIGEN_DEVICE_FUNC\n    PaddingType padding_type() const { return m_padding_type; }\n    EIGEN_DEVICE_FUNC\n    Scalar padding_value() const { return m_padding_value; }\n\n    EIGEN_DEVICE_FUNC\n    const typename internal::remove_all<typename XprType::Nested>::type&\n    expression() const { return m_xpr; }\n\n  protected:\n    typename XprType::Nested m_xpr;\n    const DenseIndex m_patch_planes;\n    const DenseIndex m_patch_rows;\n    const DenseIndex m_patch_cols;\n    const DenseIndex m_plane_strides;\n    const DenseIndex m_row_strides;\n    const DenseIndex m_col_strides;\n    const DenseIndex m_in_plane_strides;\n    const DenseIndex m_in_row_strides;\n    const DenseIndex m_in_col_strides;\n    const DenseIndex m_plane_inflate_strides;\n    const DenseIndex m_row_inflate_strides;\n    const DenseIndex m_col_inflate_strides;\n    const bool m_padding_explicit;\n    const DenseIndex m_padding_top_z;\n    const DenseIndex m_padding_bottom_z;\n    const DenseIndex m_padding_top;\n    const DenseIndex m_padding_bottom;\n    const DenseIndex m_padding_left;\n    const DenseIndex m_padding_right;\n    const PaddingType m_padding_type;\n    const Scalar m_padding_value;\n};\n\n\n// Eval as rvalue\ntemplate<DenseIndex Planes, DenseIndex Rows, DenseIndex Cols, typename ArgType, typename Device>\nstruct TensorEvaluator<const TensorVolumePatchOp<Planes, Rows, Cols, ArgType>, Device>\n{\n  typedef TensorVolumePatchOp<Planes, Rows, Cols, ArgType> XprType;\n  typedef typename XprType::Index Index;\n  static const int NumInputDims = internal::array_size<typename TensorEvaluator<ArgType, Device>::Dimensions>::value;\n  static const int NumDims = NumInputDims + 1;\n  typedef DSizes<Index, NumDims> Dimensions;\n  typedef typename internal::remove_const<typename XprType::Scalar>::type Scalar;\n  typedef typename XprType::CoeffReturnType CoeffReturnType;\n  typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;\n  static const int PacketSize = PacketType<CoeffReturnType, Device>::size;\n  typedef StorageMemory<CoeffReturnType, Device> Storage;\n  typedef typename Storage::Type EvaluatorPointerType;\n\n  enum {\n    IsAligned = false,\n    PacketAccess = TensorEvaluator<ArgType, Device>::PacketAccess,\n    BlockAccess = false,\n    PreferBlockAccess = TensorEvaluator<ArgType, Device>::PreferBlockAccess,\n    Layout = TensorEvaluator<ArgType, Device>::Layout,\n    CoordAccess = false,\n    RawAccess = false\n  };\n\n  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//\n  typedef internal::TensorBlockNotImplemented TensorBlock;\n  //===--------------------------------------------------------------------===//\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device) :\n m_impl(op.expression(), device)\n  {\n    EIGEN_STATIC_ASSERT((NumDims >= 5), YOU_MADE_A_PROGRAMMING_MISTAKE);\n\n    m_paddingValue = op.padding_value();\n\n    const typename TensorEvaluator<ArgType, Device>::Dimensions& input_dims = m_impl.dimensions();\n\n    // Cache a few variables.\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      m_inputDepth = input_dims[0];\n      m_inputPlanes = input_dims[1];\n      m_inputRows = input_dims[2];\n      m_inputCols = input_dims[3];\n    } else {\n      m_inputDepth = input_dims[NumInputDims-1];\n      m_inputPlanes = input_dims[NumInputDims-2];\n      m_inputRows = input_dims[NumInputDims-3];\n      m_inputCols = input_dims[NumInputDims-4];\n    }\n\n    m_plane_strides = op.plane_strides();\n    m_row_strides = op.row_strides();\n    m_col_strides = op.col_strides();\n\n    // Input strides and effective input/patch size\n    m_in_plane_strides = op.in_plane_strides();\n    m_in_row_strides = op.in_row_strides();\n    m_in_col_strides = op.in_col_strides();\n    m_plane_inflate_strides = op.plane_inflate_strides();\n    m_row_inflate_strides = op.row_inflate_strides();\n    m_col_inflate_strides = op.col_inflate_strides();\n\n    // The \"effective\" spatial size after inflating data with zeros.\n    m_input_planes_eff = (m_inputPlanes - 1) * m_plane_inflate_strides + 1;\n    m_input_rows_eff = (m_inputRows - 1) * m_row_inflate_strides + 1;\n    m_input_cols_eff = (m_inputCols - 1) * m_col_inflate_strides + 1;\n    m_patch_planes_eff = op.patch_planes() + (op.patch_planes() - 1) * (m_in_plane_strides - 1);\n    m_patch_rows_eff = op.patch_rows() + (op.patch_rows() - 1) * (m_in_row_strides - 1);\n    m_patch_cols_eff = op.patch_cols() + (op.patch_cols() - 1) * (m_in_col_strides - 1);\n\n    if (op.padding_explicit()) {\n      m_outputPlanes = numext::ceil((m_input_planes_eff + op.padding_top_z() + op.padding_bottom_z() - m_patch_planes_eff + 1.f) / static_cast<float>(m_plane_strides));\n      m_outputRows = numext::ceil((m_input_rows_eff + op.padding_top() + op.padding_bottom() - m_patch_rows_eff + 1.f) / static_cast<float>(m_row_strides));\n      m_outputCols = numext::ceil((m_input_cols_eff + op.padding_left() + op.padding_right() - m_patch_cols_eff + 1.f) / static_cast<float>(m_col_strides));\n      m_planePaddingTop = op.padding_top_z();\n      m_rowPaddingTop = op.padding_top();\n      m_colPaddingLeft = op.padding_left();\n    } else {\n      // Computing padding from the type\n      switch (op.padding_type()) {\n        case PADDING_VALID:\n          m_outputPlanes = numext::ceil((m_input_planes_eff - m_patch_planes_eff + 1.f) / static_cast<float>(m_plane_strides));\n          m_outputRows = numext::ceil((m_input_rows_eff - m_patch_rows_eff + 1.f) / static_cast<float>(m_row_strides));\n          m_outputCols = numext::ceil((m_input_cols_eff - m_patch_cols_eff + 1.f) / static_cast<float>(m_col_strides));\n          m_planePaddingTop = 0;\n          m_rowPaddingTop = 0;\n          m_colPaddingLeft = 0;\n          break;\n        case PADDING_SAME: {\n          m_outputPlanes = numext::ceil(m_input_planes_eff / static_cast<float>(m_plane_strides));\n          m_outputRows = numext::ceil(m_input_rows_eff / static_cast<float>(m_row_strides));\n          m_outputCols = numext::ceil(m_input_cols_eff / static_cast<float>(m_col_strides));\n          const Index dz = m_outputPlanes * m_plane_strides + m_patch_planes_eff - 1 - m_input_planes_eff;\n          const Index dy = m_outputRows * m_row_strides + m_patch_rows_eff - 1 - m_input_rows_eff;\n          const Index dx = m_outputCols * m_col_strides + m_patch_cols_eff - 1 - m_input_cols_eff;\n          m_planePaddingTop = dz - dz / 2;\n          m_rowPaddingTop = dy - dy / 2;\n          m_colPaddingLeft = dx - dx / 2;\n          break;\n        }\n        default:\n          eigen_assert(false && \"unexpected padding\");\n      }\n    }\n    eigen_assert(m_outputRows > 0);\n    eigen_assert(m_outputCols > 0);\n    eigen_assert(m_outputPlanes > 0);\n\n    // Dimensions for result of extraction.\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      // ColMajor\n      // 0: depth\n      // 1: patch_planes\n      // 2: patch_rows\n      // 3: patch_cols\n      // 4: number of patches\n      // 5 and beyond: anything else (such as batch).\n      m_dimensions[0] = input_dims[0];\n      m_dimensions[1] = op.patch_planes();\n      m_dimensions[2] = op.patch_rows();\n      m_dimensions[3] = op.patch_cols();\n      m_dimensions[4] = m_outputPlanes * m_outputRows * m_outputCols;\n      for (int i = 5; i < NumDims; ++i) {\n        m_dimensions[i] = input_dims[i-1];\n      }\n    } else {\n      // RowMajor\n      // NumDims-1: depth\n      // NumDims-2: patch_planes\n      // NumDims-3: patch_rows\n      // NumDims-4: patch_cols\n      // NumDims-5: number of patches\n      // NumDims-6 and beyond: anything else (such as batch).\n      m_dimensions[NumDims-1] = input_dims[NumInputDims-1];\n      m_dimensions[NumDims-2] = op.patch_planes();\n      m_dimensions[NumDims-3] = op.patch_rows();\n      m_dimensions[NumDims-4] = op.patch_cols();\n      m_dimensions[NumDims-5] = m_outputPlanes * m_outputRows * m_outputCols;\n      for (int i = NumDims-6; i >= 0; --i) {\n        m_dimensions[i] = input_dims[i];\n      }\n    }\n\n    // Strides for the output tensor.\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      m_rowStride = m_dimensions[1];\n      m_colStride = m_dimensions[2] * m_rowStride;\n      m_patchStride = m_colStride * m_dimensions[3] * m_dimensions[0];\n      m_otherStride = m_patchStride * m_dimensions[4];\n    } else {\n      m_rowStride = m_dimensions[NumDims-2];\n      m_colStride = m_dimensions[NumDims-3] * m_rowStride;\n      m_patchStride = m_colStride * m_dimensions[NumDims-4] * m_dimensions[NumDims-1];\n      m_otherStride = m_patchStride * m_dimensions[NumDims-5];\n    }\n\n    // Strides for navigating through the input tensor.\n    m_planeInputStride = m_inputDepth;\n    m_rowInputStride = m_inputDepth * m_inputPlanes;\n    m_colInputStride = m_inputDepth * m_inputRows * m_inputPlanes;\n    m_otherInputStride = m_inputDepth * m_inputRows * m_inputCols * m_inputPlanes;\n\n    m_outputPlanesRows = m_outputPlanes * m_outputRows;\n\n    // Fast representations of different variables.\n    m_fastOtherStride = internal::TensorIntDivisor<Index>(m_otherStride);\n\n    m_fastPatchStride = internal::TensorIntDivisor<Index>(m_patchStride);\n    m_fastColStride = internal::TensorIntDivisor<Index>(m_colStride);\n    m_fastRowStride = internal::TensorIntDivisor<Index>(m_rowStride);\n    m_fastInputRowStride = internal::TensorIntDivisor<Index>(m_row_inflate_strides);\n    m_fastInputColStride = internal::TensorIntDivisor<Index>(m_col_inflate_strides);\n    m_fastInputPlaneStride = internal::TensorIntDivisor<Index>(m_plane_inflate_strides);\n    m_fastInputColsEff = internal::TensorIntDivisor<Index>(m_input_cols_eff);\n    m_fastOutputPlanes = internal::TensorIntDivisor<Index>(m_outputPlanes);\n    m_fastOutputPlanesRows = internal::TensorIntDivisor<Index>(m_outputPlanesRows);\n\n    if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n      m_fastOutputDepth = internal::TensorIntDivisor<Index>(m_dimensions[0]);\n    } else {\n      m_fastOutputDepth = internal::TensorIntDivisor<Index>(m_dimensions[NumDims-1]);\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions& dimensions() const { return m_dimensions; }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType /*data*/) {\n    m_impl.evalSubExprsIfNeeded(NULL);\n    return true;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {\n    m_impl.cleanup();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const\n  {\n    // Patch index corresponding to the passed in index.\n    const Index patchIndex = index / m_fastPatchStride;\n\n    // Spatial offset within the patch. This has to be translated into 3D\n    // coordinates within the patch.\n    const Index patchOffset = (index - patchIndex * m_patchStride) / m_fastOutputDepth;\n\n    // Batch, etc.\n    const Index otherIndex = (NumDims == 5) ? 0 : index / m_fastOtherStride;\n    const Index patch3DIndex = (NumDims == 5) ? patchIndex : (index - otherIndex * m_otherStride) / m_fastPatchStride;\n\n    // Calculate column index in the input original tensor.\n    const Index colIndex = patch3DIndex / m_fastOutputPlanesRows;\n    const Index colOffset = patchOffset / m_fastColStride;\n    const Index inputCol = colIndex * m_col_strides + colOffset * m_in_col_strides - m_colPaddingLeft;\n    const Index origInputCol = (m_col_inflate_strides == 1) ? inputCol : ((inputCol >= 0) ? (inputCol / m_fastInputColStride) : 0);\n    if (inputCol < 0 || inputCol >= m_input_cols_eff ||\n        ((m_col_inflate_strides != 1) && (inputCol != origInputCol * m_col_inflate_strides))) {\n      return Scalar(m_paddingValue);\n    }\n\n    // Calculate row index in the original input tensor.\n    const Index rowIndex = (patch3DIndex - colIndex * m_outputPlanesRows) / m_fastOutputPlanes;\n    const Index rowOffset = (patchOffset - colOffset * m_colStride) / m_fastRowStride;\n    const Index inputRow = rowIndex * m_row_strides + rowOffset * m_in_row_strides - m_rowPaddingTop;\n    const Index origInputRow = (m_row_inflate_strides == 1) ? inputRow : ((inputRow >= 0) ? (inputRow / m_fastInputRowStride) : 0);\n    if (inputRow < 0 || inputRow >= m_input_rows_eff ||\n        ((m_row_inflate_strides != 1) && (inputRow != origInputRow * m_row_inflate_strides))) {\n      return Scalar(m_paddingValue);\n    }\n\n    // Calculate plane index in the original input tensor.\n    const Index planeIndex = (patch3DIndex - m_outputPlanes * (colIndex * m_outputRows + rowIndex));\n    const Index planeOffset = patchOffset - colOffset * m_colStride - rowOffset * m_rowStride;\n    const Index inputPlane = planeIndex * m_plane_strides + planeOffset * m_in_plane_strides - m_planePaddingTop;\n    const Index origInputPlane = (m_plane_inflate_strides == 1) ? inputPlane : ((inputPlane >= 0) ? (inputPlane / m_fastInputPlaneStride) : 0);\n    if (inputPlane < 0 || inputPlane >= m_input_planes_eff ||\n        ((m_plane_inflate_strides != 1) && (inputPlane != origInputPlane * m_plane_inflate_strides))) {\n      return Scalar(m_paddingValue);\n    }\n\n    const int depth_index = static_cast<int>(Layout) == static_cast<int>(ColMajor) ? 0 : NumDims - 1;\n    const Index depth = index - (index / m_fastOutputDepth) * m_dimensions[depth_index];\n\n    const Index inputIndex = depth +\n        origInputRow * m_rowInputStride +\n        origInputCol * m_colInputStride +\n        origInputPlane * m_planeInputStride +\n        otherIndex * m_otherInputStride;\n\n    return m_impl.coeff(inputIndex);\n  }\n\n  template<int LoadMode>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const\n  {\n    EIGEN_STATIC_ASSERT((PacketSize > 1), YOU_MADE_A_PROGRAMMING_MISTAKE)\n    eigen_assert(index+PacketSize-1 < dimensions().TotalSize());\n\n    if (m_in_row_strides != 1 || m_in_col_strides != 1 || m_row_inflate_strides != 1 || m_col_inflate_strides != 1 ||\n        m_in_plane_strides != 1 || m_plane_inflate_strides != 1) {\n      return packetWithPossibleZero(index);\n    }\n\n    const Index indices[2] = {index, index + PacketSize - 1};\n    const Index patchIndex = indices[0] / m_fastPatchStride;\n    if (patchIndex != indices[1] / m_fastPatchStride) {\n      return packetWithPossibleZero(index);\n    }\n    const Index otherIndex = (NumDims == 5) ? 0 : indices[0] / m_fastOtherStride;\n    eigen_assert(otherIndex == indices[1] / m_fastOtherStride);\n\n    // Find the offset of the element wrt the location of the first element.\n    const Index patchOffsets[2] = {(indices[0] - patchIndex * m_patchStride) / m_fastOutputDepth,\n                                   (indices[1] - patchIndex * m_patchStride) / m_fastOutputDepth};\n\n    const Index patch3DIndex = (NumDims == 5) ? patchIndex : (indices[0] - otherIndex * m_otherStride) / m_fastPatchStride;\n    eigen_assert(patch3DIndex == (indices[1] - otherIndex * m_otherStride) / m_fastPatchStride);\n\n    const Index colIndex = patch3DIndex / m_fastOutputPlanesRows;\n    const Index colOffsets[2] = {\n      patchOffsets[0] / m_fastColStride,\n      patchOffsets[1] / m_fastColStride};\n\n    // Calculate col indices in the original input tensor.\n    const Index inputCols[2] = {\n      colIndex * m_col_strides + colOffsets[0] - m_colPaddingLeft,\n      colIndex * m_col_strides + colOffsets[1] - m_colPaddingLeft};\n    if (inputCols[1] < 0 || inputCols[0] >= m_inputCols) {\n      return internal::pset1<PacketReturnType>(Scalar(m_paddingValue));\n    }\n\n    if (inputCols[0] != inputCols[1]) {\n      return packetWithPossibleZero(index);\n    }\n\n    const Index rowIndex = (patch3DIndex - colIndex * m_outputPlanesRows) / m_fastOutputPlanes;\n    const Index rowOffsets[2] = {\n      (patchOffsets[0] - colOffsets[0] * m_colStride) / m_fastRowStride,\n      (patchOffsets[1] - colOffsets[1] * m_colStride) / m_fastRowStride};\n    eigen_assert(rowOffsets[0] <= rowOffsets[1]);\n    // Calculate col indices in the original input tensor.\n    const Index inputRows[2] = {\n      rowIndex * m_row_strides + rowOffsets[0] - m_rowPaddingTop,\n      rowIndex * m_row_strides + rowOffsets[1] - m_rowPaddingTop};\n\n    if (inputRows[1] < 0 || inputRows[0] >= m_inputRows) {\n      return internal::pset1<PacketReturnType>(Scalar(m_paddingValue));\n    }\n\n    if (inputRows[0] != inputRows[1]) {\n      return packetWithPossibleZero(index);\n    }\n\n    const Index planeIndex = (patch3DIndex - m_outputPlanes * (colIndex * m_outputRows + rowIndex));\n    const Index planeOffsets[2] = {\n      patchOffsets[0] - colOffsets[0] * m_colStride - rowOffsets[0] * m_rowStride,\n      patchOffsets[1] - colOffsets[1] * m_colStride - rowOffsets[1] * m_rowStride};\n    eigen_assert(planeOffsets[0] <= planeOffsets[1]);\n    const Index inputPlanes[2] = {\n      planeIndex * m_plane_strides + planeOffsets[0] - m_planePaddingTop,\n      planeIndex * m_plane_strides + planeOffsets[1] - m_planePaddingTop};\n\n    if (inputPlanes[1] < 0 || inputPlanes[0] >= m_inputPlanes) {\n      return internal::pset1<PacketReturnType>(Scalar(m_paddingValue));\n    }\n\n    if (inputPlanes[0] >= 0 && inputPlanes[1] < m_inputPlanes) {\n      // no padding\n      const int depth_index = static_cast<int>(Layout) == static_cast<int>(ColMajor) ? 0 : NumDims - 1;\n      const Index depth = index - (index / m_fastOutputDepth) * m_dimensions[depth_index];\n      const Index inputIndex = depth +\n          inputRows[0] * m_rowInputStride +\n          inputCols[0] * m_colInputStride +\n          m_planeInputStride * inputPlanes[0] +\n          otherIndex * m_otherInputStride;\n      return m_impl.template packet<Unaligned>(inputIndex);\n    }\n\n    return packetWithPossibleZero(index);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost\n  costPerCoeff(bool vectorized) const {\n    const double compute_cost =\n        10 * TensorOpCost::DivCost<Index>() + 21 * TensorOpCost::MulCost<Index>() +\n        8 * TensorOpCost::AddCost<Index>();\n    return TensorOpCost(0, 0, compute_cost, vectorized, PacketSize);\n  }\n\n  EIGEN_DEVICE_FUNC EvaluatorPointerType data() const { return NULL; }\n\n  const TensorEvaluator<ArgType, Device>& impl() const { return m_impl; }\n\n\n  Index planePaddingTop() const { return m_planePaddingTop; }\n  Index rowPaddingTop() const { return m_rowPaddingTop; }\n  Index colPaddingLeft() const { return m_colPaddingLeft; }\n  Index outputPlanes() const { return m_outputPlanes; }\n  Index outputRows() const { return m_outputRows; }\n  Index outputCols() const { return m_outputCols; }\n  Index userPlaneStride() const { return m_plane_strides; }\n  Index userRowStride() const { return m_row_strides; }\n  Index userColStride() const { return m_col_strides; }\n  Index userInPlaneStride() const { return m_in_plane_strides; }\n  Index userInRowStride() const { return m_in_row_strides; }\n  Index userInColStride() const { return m_in_col_strides; }\n  Index planeInflateStride() const { return m_plane_inflate_strides; }\n  Index rowInflateStride() const { return m_row_inflate_strides; }\n  Index colInflateStride() const { return m_col_inflate_strides; }\n\n#ifdef EIGEN_USE_SYCL\n  // binding placeholder accessors to a command group handler for SYCL\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {\n    m_impl.bind(cgh);\n  }\n#endif\n protected:\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packetWithPossibleZero(Index index) const\n  {\n    EIGEN_ALIGN_MAX typename internal::remove_const<CoeffReturnType>::type values[PacketSize];\n    EIGEN_UNROLL_LOOP\n    for (int i = 0; i < PacketSize; ++i) {\n      values[i] = coeff(index+i);\n    }\n    PacketReturnType rslt = internal::pload<PacketReturnType>(values);\n    return rslt;\n  }\n\n  Dimensions m_dimensions;\n\n  // Parameters passed to the constructor.\n  Index m_plane_strides;\n  Index m_row_strides;\n  Index m_col_strides;\n\n  Index m_outputPlanes;\n  Index m_outputRows;\n  Index m_outputCols;\n\n  Index m_planePaddingTop;\n  Index m_rowPaddingTop;\n  Index m_colPaddingLeft;\n\n  Index m_in_plane_strides;\n  Index m_in_row_strides;\n  Index m_in_col_strides;\n\n  Index m_plane_inflate_strides;\n  Index m_row_inflate_strides;\n  Index m_col_inflate_strides;\n\n  // Cached input size.\n  Index m_inputDepth;\n  Index m_inputPlanes;\n  Index m_inputRows;\n  Index m_inputCols;\n\n  // Other cached variables.\n  Index m_outputPlanesRows;\n\n  // Effective input/patch post-inflation size.\n  Index m_input_planes_eff;\n  Index m_input_rows_eff;\n  Index m_input_cols_eff;\n  Index m_patch_planes_eff;\n  Index m_patch_rows_eff;\n  Index m_patch_cols_eff;\n\n  // Strides for the output tensor.\n  Index m_otherStride;\n  Index m_patchStride;\n  Index m_rowStride;\n  Index m_colStride;\n\n  // Strides for the input tensor.\n  Index m_planeInputStride;\n  Index m_rowInputStride;\n  Index m_colInputStride;\n  Index m_otherInputStride;\n\n  internal::TensorIntDivisor<Index> m_fastOtherStride;\n  internal::TensorIntDivisor<Index> m_fastPatchStride;\n  internal::TensorIntDivisor<Index> m_fastColStride;\n  internal::TensorIntDivisor<Index> m_fastRowStride;\n  internal::TensorIntDivisor<Index> m_fastInputPlaneStride;\n  internal::TensorIntDivisor<Index> m_fastInputRowStride;\n  internal::TensorIntDivisor<Index> m_fastInputColStride;\n  internal::TensorIntDivisor<Index> m_fastInputColsEff;\n  internal::TensorIntDivisor<Index> m_fastOutputPlanesRows;\n  internal::TensorIntDivisor<Index> m_fastOutputPlanes;\n  internal::TensorIntDivisor<Index> m_fastOutputDepth;\n\n  Scalar m_paddingValue;\n\n  TensorEvaluator<ArgType, Device> m_impl;\n\n\n};\n\n\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSOR_TENSOR_VOLUME_PATCH_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/TensorSymmetry/DynamicSymmetry.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2013 Christian Seiler <christian@iwakd.de>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSORSYMMETRY_DYNAMICSYMMETRY_H\n#define EIGEN_CXX11_TENSORSYMMETRY_DYNAMICSYMMETRY_H\n\nnamespace Eigen {\n\nclass DynamicSGroup\n{\n  public:\n    inline explicit DynamicSGroup() : m_numIndices(1), m_elements(), m_generators(), m_globalFlags(0) { m_elements.push_back(ge(Generator(0, 0, 0))); }\n    inline DynamicSGroup(const DynamicSGroup& o) : m_numIndices(o.m_numIndices), m_elements(o.m_elements), m_generators(o.m_generators), m_globalFlags(o.m_globalFlags) { }\n    inline DynamicSGroup(DynamicSGroup&& o) : m_numIndices(o.m_numIndices), m_elements(), m_generators(o.m_generators), m_globalFlags(o.m_globalFlags) { std::swap(m_elements, o.m_elements); }\n    inline DynamicSGroup& operator=(const DynamicSGroup& o) { m_numIndices = o.m_numIndices; m_elements = o.m_elements; m_generators = o.m_generators; m_globalFlags = o.m_globalFlags; return *this; }\n    inline DynamicSGroup& operator=(DynamicSGroup&& o) { m_numIndices = o.m_numIndices; std::swap(m_elements, o.m_elements); m_generators = o.m_generators; m_globalFlags = o.m_globalFlags; return *this; }\n\n    void add(int one, int two, int flags = 0);\n\n    template<typename Gen_>\n    inline void add(Gen_) { add(Gen_::One, Gen_::Two, Gen_::Flags); }\n    inline void addSymmetry(int one, int two) { add(one, two, 0); }\n    inline void addAntiSymmetry(int one, int two) { add(one, two, NegationFlag); }\n    inline void addHermiticity(int one, int two) { add(one, two, ConjugationFlag); }\n    inline void addAntiHermiticity(int one, int two) { add(one, two, NegationFlag | ConjugationFlag); }\n\n    template<typename Op, typename RV, typename Index, std::size_t N, typename... Args>\n    inline RV apply(const std::array<Index, N>& idx, RV initial, Args&&... args) const\n    {\n      eigen_assert(N >= m_numIndices && \"Can only apply symmetry group to objects that have at least the required amount of indices.\");\n      for (std::size_t i = 0; i < size(); i++)\n        initial = Op::run(h_permute(i, idx, typename internal::gen_numeric_list<int, N>::type()), m_elements[i].flags, initial, std::forward<Args>(args)...);\n      return initial;\n    }\n\n    template<typename Op, typename RV, typename Index, typename... Args>\n    inline RV apply(const std::vector<Index>& idx, RV initial, Args&&... args) const\n    {\n      eigen_assert(idx.size() >= m_numIndices && \"Can only apply symmetry group to objects that have at least the required amount of indices.\");\n      for (std::size_t i = 0; i < size(); i++)\n        initial = Op::run(h_permute(i, idx), m_elements[i].flags, initial, std::forward<Args>(args)...);\n      return initial;\n    }\n\n    inline int globalFlags() const { return m_globalFlags; }\n    inline std::size_t size() const { return m_elements.size(); }\n\n    template<typename Tensor_, typename... IndexTypes>\n    inline internal::tensor_symmetry_value_setter<Tensor_, DynamicSGroup> operator()(Tensor_& tensor, typename Tensor_::Index firstIndex, IndexTypes... otherIndices) const\n    {\n      static_assert(sizeof...(otherIndices) + 1 == Tensor_::NumIndices, \"Number of indices used to access a tensor coefficient must be equal to the rank of the tensor.\");\n      return operator()(tensor, std::array<typename Tensor_::Index, Tensor_::NumIndices>{{firstIndex, otherIndices...}});\n    }\n\n    template<typename Tensor_>\n    inline internal::tensor_symmetry_value_setter<Tensor_, DynamicSGroup> operator()(Tensor_& tensor, std::array<typename Tensor_::Index, Tensor_::NumIndices> const& indices) const\n    {\n      return internal::tensor_symmetry_value_setter<Tensor_, DynamicSGroup>(tensor, *this, indices);\n    }\n  private:\n    struct GroupElement {\n      std::vector<int> representation;\n      int flags;\n      bool isId() const\n      {\n        for (std::size_t i = 0; i < representation.size(); i++)\n          if (i != (size_t)representation[i])\n            return false;\n        return true;\n      }\n    };\n    struct Generator {\n      int one;\n      int two;\n      int flags;\n      constexpr inline Generator(int one_, int two_, int flags_) : one(one_), two(two_), flags(flags_) {}\n    };\n\n    std::size_t m_numIndices;\n    std::vector<GroupElement> m_elements;\n    std::vector<Generator> m_generators;\n    int m_globalFlags;\n\n    template<typename Index, std::size_t N, int... n>\n    inline std::array<Index, N> h_permute(std::size_t which, const std::array<Index, N>& idx, internal::numeric_list<int, n...>) const\n    {\n      return std::array<Index, N>{{ idx[n >= m_numIndices ? n : m_elements[which].representation[n]]... }};\n    }\n\n    template<typename Index>\n    inline std::vector<Index> h_permute(std::size_t which, std::vector<Index> idx) const\n    {\n      std::vector<Index> result;\n      result.reserve(idx.size());\n      for (auto k : m_elements[which].representation)\n        result.push_back(idx[k]);\n      for (std::size_t i = m_numIndices; i < idx.size(); i++)\n        result.push_back(idx[i]);\n      return result;\n    }\n\n    inline GroupElement ge(Generator const& g) const\n    {\n      GroupElement result;\n      result.representation.reserve(m_numIndices);\n      result.flags = g.flags;\n      for (std::size_t k = 0; k < m_numIndices; k++) {\n        if (k == (std::size_t)g.one)\n          result.representation.push_back(g.two);\n        else if (k == (std::size_t)g.two)\n          result.representation.push_back(g.one);\n        else\n          result.representation.push_back(int(k));\n      }\n      return result;\n    }\n\n    GroupElement mul(GroupElement, GroupElement) const;\n    inline GroupElement mul(Generator g1, GroupElement g2) const\n    {\n      return mul(ge(g1), g2);\n    }\n\n    inline GroupElement mul(GroupElement g1, Generator g2) const\n    {\n      return mul(g1, ge(g2));\n    }\n\n    inline GroupElement mul(Generator g1, Generator g2) const\n    {\n      return mul(ge(g1), ge(g2));\n    }\n\n    inline int findElement(GroupElement e) const\n    {\n      for (auto ee : m_elements) {\n        if (ee.representation == e.representation)\n          return ee.flags ^ e.flags;\n      }\n      return -1;\n    }\n\n    void updateGlobalFlags(int flagDiffOfSameGenerator);\n};\n\n// dynamic symmetry group that auto-adds the template parameters in the constructor\ntemplate<typename... Gen>\nclass DynamicSGroupFromTemplateArgs : public DynamicSGroup\n{\n  public:\n    inline DynamicSGroupFromTemplateArgs() : DynamicSGroup()\n    {\n      add_all(internal::type_list<Gen...>());\n    }\n    inline DynamicSGroupFromTemplateArgs(DynamicSGroupFromTemplateArgs const& other) : DynamicSGroup(other) { }\n    inline DynamicSGroupFromTemplateArgs(DynamicSGroupFromTemplateArgs&& other) : DynamicSGroup(other) { }\n    inline DynamicSGroupFromTemplateArgs<Gen...>& operator=(const DynamicSGroupFromTemplateArgs<Gen...>& o) { DynamicSGroup::operator=(o); return *this; }\n    inline DynamicSGroupFromTemplateArgs<Gen...>& operator=(DynamicSGroupFromTemplateArgs<Gen...>&& o) { DynamicSGroup::operator=(o); return *this; }\n  \n  private:\n    template<typename Gen1, typename... GenNext>\n    inline void add_all(internal::type_list<Gen1, GenNext...>)\n    {\n      add(Gen1());\n      add_all(internal::type_list<GenNext...>());\n    }\n\n    inline void add_all(internal::type_list<>)\n    {\n    }\n};\n\ninline DynamicSGroup::GroupElement DynamicSGroup::mul(GroupElement g1, GroupElement g2) const\n{\n  eigen_internal_assert(g1.representation.size() == m_numIndices);\n  eigen_internal_assert(g2.representation.size() == m_numIndices);\n\n  GroupElement result;\n  result.representation.reserve(m_numIndices);\n  for (std::size_t i = 0; i < m_numIndices; i++) {\n    int v = g2.representation[g1.representation[i]];\n    eigen_assert(v >= 0);\n    result.representation.push_back(v);\n  }\n  result.flags = g1.flags ^ g2.flags;\n  return result;\n}\n\ninline void DynamicSGroup::add(int one, int two, int flags)\n{\n  eigen_assert(one >= 0);\n  eigen_assert(two >= 0);\n  eigen_assert(one != two);\n\n  if ((std::size_t)one >= m_numIndices || (std::size_t)two >= m_numIndices) {\n    std::size_t newNumIndices = (one > two) ? one : two + 1;\n    for (auto& gelem : m_elements) {\n      gelem.representation.reserve(newNumIndices);\n      for (std::size_t i = m_numIndices; i < newNumIndices; i++)\n        gelem.representation.push_back(i);\n    }\n    m_numIndices = newNumIndices;\n  }\n\n  Generator g{one, two, flags};\n  GroupElement e = ge(g);\n\n  /* special case for first generator */\n  if (m_elements.size() == 1) {\n    while (!e.isId()) {\n      m_elements.push_back(e);\n      e = mul(e, g);\n    }\n\n    if (e.flags > 0)\n      updateGlobalFlags(e.flags);\n\n    // only add in case we didn't have identity\n    if (m_elements.size() > 1)\n      m_generators.push_back(g);\n    return;\n  }\n\n  int p = findElement(e);\n  if (p >= 0) {\n    updateGlobalFlags(p);\n    return;\n  }\n\n  std::size_t coset_order = m_elements.size();\n  m_elements.push_back(e);\n  for (std::size_t i = 1; i < coset_order; i++)\n    m_elements.push_back(mul(m_elements[i], e));\n  m_generators.push_back(g);\n\n  std::size_t coset_rep = coset_order;\n  do {\n    for (auto g : m_generators) {\n      e = mul(m_elements[coset_rep], g);\n      p = findElement(e);\n      if (p < 0) {\n        // element not yet in group\n        m_elements.push_back(e);\n        for (std::size_t i = 1; i < coset_order; i++)\n          m_elements.push_back(mul(m_elements[i], e));\n      } else if (p > 0) {\n        updateGlobalFlags(p);\n      }\n    }\n    coset_rep += coset_order;\n  } while (coset_rep < m_elements.size());\n}\n\ninline void DynamicSGroup::updateGlobalFlags(int flagDiffOfSameGenerator)\n{\n    switch (flagDiffOfSameGenerator) {\n      case 0:\n      default:\n        // nothing happened\n        break;\n      case NegationFlag:\n        // every element is it's own negative => whole tensor is zero\n        m_globalFlags |= GlobalZeroFlag;\n        break;\n      case ConjugationFlag:\n        // every element is it's own conjugate => whole tensor is real\n        m_globalFlags |= GlobalRealFlag;\n        break;\n      case (NegationFlag | ConjugationFlag):\n        // every element is it's own negative conjugate => whole tensor is imaginary\n        m_globalFlags |= GlobalImagFlag;\n        break;\n      /* NOTE:\n       *   since GlobalZeroFlag == GlobalRealFlag | GlobalImagFlag, if one generator\n       *   causes the tensor to be real and the next one to be imaginary, this will\n       *   trivially give the correct result\n       */\n    }\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSORSYMMETRY_DYNAMICSYMMETRY_H\n\n/*\n * kate: space-indent on; indent-width 2; mixedindent off; indent-mode cstyle;\n */\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/TensorSymmetry/StaticSymmetry.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2013 Christian Seiler <christian@iwakd.de>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSORSYMMETRY_STATICSYMMETRY_H\n#define EIGEN_CXX11_TENSORSYMMETRY_STATICSYMMETRY_H\n\nnamespace Eigen {\n\nnamespace internal {\n\ntemplate<typename list> struct tensor_static_symgroup_permutate;\n\ntemplate<int... nn>\nstruct tensor_static_symgroup_permutate<numeric_list<int, nn...>>\n{\n  constexpr static std::size_t N = sizeof...(nn);\n\n  template<typename T>\n  constexpr static inline std::array<T, N> run(const std::array<T, N>& indices)\n  {\n    return {{indices[nn]...}};\n  }\n};\n\ntemplate<typename indices_, int flags_>\nstruct tensor_static_symgroup_element\n{\n  typedef indices_ indices;\n  constexpr static int flags = flags_;\n};\n\ntemplate<typename Gen, int N>\nstruct tensor_static_symgroup_element_ctor\n{\n  typedef tensor_static_symgroup_element<\n    typename gen_numeric_list_swapped_pair<int, N, Gen::One, Gen::Two>::type,\n    Gen::Flags\n  > type;\n};\n\ntemplate<int N>\nstruct tensor_static_symgroup_identity_ctor\n{\n  typedef tensor_static_symgroup_element<\n    typename gen_numeric_list<int, N>::type,\n    0\n  > type;\n};\n\ntemplate<typename iib>\nstruct tensor_static_symgroup_multiply_helper\n{\n  template<int... iia>\n  constexpr static inline numeric_list<int, get<iia, iib>::value...> helper(numeric_list<int, iia...>) {\n    return numeric_list<int, get<iia, iib>::value...>();\n  }\n};\n\ntemplate<typename A, typename B>\nstruct tensor_static_symgroup_multiply\n{\n  private:\n    typedef typename A::indices iia;\n    typedef typename B::indices iib;\n    constexpr static int ffa = A::flags;\n    constexpr static int ffb = B::flags;\n  \n  public:\n    static_assert(iia::count == iib::count, \"Cannot multiply symmetry elements with different number of indices.\");\n\n    typedef tensor_static_symgroup_element<\n      decltype(tensor_static_symgroup_multiply_helper<iib>::helper(iia())),\n      ffa ^ ffb\n    > type;\n};\n\ntemplate<typename A, typename B>\nstruct tensor_static_symgroup_equality\n{\n    typedef typename A::indices iia;\n    typedef typename B::indices iib;\n    constexpr static int ffa = A::flags;\n    constexpr static int ffb = B::flags;\n    static_assert(iia::count == iib::count, \"Cannot compare symmetry elements with different number of indices.\");\n\n    constexpr static bool value = is_same<iia, iib>::value;\n\n  private:\n    /* this should be zero if they are identical, or else the tensor\n     * will be forced to be pure real, pure imaginary or even pure zero\n     */\n    constexpr static int flags_cmp_ = ffa ^ ffb;\n\n    /* either they are not equal, then we don't care whether the flags\n     * match, or they are equal, and then we have to check\n     */\n    constexpr static bool is_zero      = value && flags_cmp_ == NegationFlag;\n    constexpr static bool is_real      = value && flags_cmp_ == ConjugationFlag;\n    constexpr static bool is_imag      = value && flags_cmp_ == (NegationFlag | ConjugationFlag);\n\n  public:\n    constexpr static int global_flags = \n      (is_real ? GlobalRealFlag : 0) |\n      (is_imag ? GlobalImagFlag : 0) |\n      (is_zero ? GlobalZeroFlag : 0);\n};\n\ntemplate<std::size_t NumIndices, typename... Gen>\nstruct tensor_static_symgroup\n{\n  typedef StaticSGroup<Gen...> type;\n  constexpr static std::size_t size = type::static_size;\n};\n\ntemplate<typename Index, std::size_t N, int... ii, int... jj>\nconstexpr static inline std::array<Index, N> tensor_static_symgroup_index_permute(std::array<Index, N> idx, internal::numeric_list<int, ii...>, internal::numeric_list<int, jj...>)\n{\n  return {{ idx[ii]..., idx[jj]... }};\n}\n\ntemplate<typename Index, int... ii>\nstatic inline std::vector<Index> tensor_static_symgroup_index_permute(std::vector<Index> idx, internal::numeric_list<int, ii...>)\n{\n  std::vector<Index> result{{ idx[ii]... }};\n  std::size_t target_size = idx.size();\n  for (std::size_t i = result.size(); i < target_size; i++)\n    result.push_back(idx[i]);\n  return result;\n}\n\ntemplate<typename T> struct tensor_static_symgroup_do_apply;\n\ntemplate<typename first, typename... next>\nstruct tensor_static_symgroup_do_apply<internal::type_list<first, next...>>\n{\n  template<typename Op, typename RV, std::size_t SGNumIndices, typename Index, std::size_t NumIndices, typename... Args>\n  static inline RV run(const std::array<Index, NumIndices>& idx, RV initial, Args&&... args)\n  {\n    static_assert(NumIndices >= SGNumIndices, \"Can only apply symmetry group to objects that have at least the required amount of indices.\");\n    typedef typename internal::gen_numeric_list<int, NumIndices - SGNumIndices, SGNumIndices>::type remaining_indices;\n    initial = Op::run(tensor_static_symgroup_index_permute(idx, typename first::indices(), remaining_indices()), first::flags, initial, std::forward<Args>(args)...);\n    return tensor_static_symgroup_do_apply<internal::type_list<next...>>::template run<Op, RV, SGNumIndices>(idx, initial, args...);\n  }\n\n  template<typename Op, typename RV, std::size_t SGNumIndices, typename Index, typename... Args>\n  static inline RV run(const std::vector<Index>& idx, RV initial, Args&&... args)\n  {\n    eigen_assert(idx.size() >= SGNumIndices && \"Can only apply symmetry group to objects that have at least the required amount of indices.\");\n    initial = Op::run(tensor_static_symgroup_index_permute(idx, typename first::indices()), first::flags, initial, std::forward<Args>(args)...);\n    return tensor_static_symgroup_do_apply<internal::type_list<next...>>::template run<Op, RV, SGNumIndices>(idx, initial, args...);\n  }\n};\n\ntemplate<EIGEN_TPL_PP_SPEC_HACK_DEF(typename, empty)>\nstruct tensor_static_symgroup_do_apply<internal::type_list<EIGEN_TPL_PP_SPEC_HACK_USE(empty)>>\n{\n  template<typename Op, typename RV, std::size_t SGNumIndices, typename Index, std::size_t NumIndices, typename... Args>\n  static inline RV run(const std::array<Index, NumIndices>&, RV initial, Args&&...)\n  {\n    // do nothing\n    return initial;\n  }\n\n  template<typename Op, typename RV, std::size_t SGNumIndices, typename Index, typename... Args>\n  static inline RV run(const std::vector<Index>&, RV initial, Args&&...)\n  {\n    // do nothing\n    return initial;\n  }\n};\n\n} // end namespace internal\n\ntemplate<typename... Gen>\nclass StaticSGroup\n{\n    constexpr static std::size_t NumIndices = internal::tensor_symmetry_num_indices<Gen...>::value;\n    typedef internal::group_theory::enumerate_group_elements<\n      internal::tensor_static_symgroup_multiply,\n      internal::tensor_static_symgroup_equality,\n      typename internal::tensor_static_symgroup_identity_ctor<NumIndices>::type,\n      internal::type_list<typename internal::tensor_static_symgroup_element_ctor<Gen, NumIndices>::type...>\n    > group_elements;\n    typedef typename group_elements::type ge;\n  public:\n    constexpr inline StaticSGroup() {}\n    constexpr inline StaticSGroup(const StaticSGroup<Gen...>&) {}\n    constexpr inline StaticSGroup(StaticSGroup<Gen...>&&) {}\n\n    template<typename Op, typename RV, typename Index, std::size_t N, typename... Args>\n    static inline RV apply(const std::array<Index, N>& idx, RV initial, Args&&... args)\n    {\n      return internal::tensor_static_symgroup_do_apply<ge>::template run<Op, RV, NumIndices>(idx, initial, args...);\n    }\n\n    template<typename Op, typename RV, typename Index, typename... Args>\n    static inline RV apply(const std::vector<Index>& idx, RV initial, Args&&... args)\n    {\n      eigen_assert(idx.size() == NumIndices);\n      return internal::tensor_static_symgroup_do_apply<ge>::template run<Op, RV, NumIndices>(idx, initial, args...);\n    }\n\n    constexpr static std::size_t static_size = ge::count;\n\n    constexpr static inline std::size_t size() {\n      return ge::count;\n    }\n    constexpr static inline int globalFlags() { return group_elements::global_flags; }\n\n    template<typename Tensor_, typename... IndexTypes>\n    inline internal::tensor_symmetry_value_setter<Tensor_, StaticSGroup<Gen...>> operator()(Tensor_& tensor, typename Tensor_::Index firstIndex, IndexTypes... otherIndices) const\n    {\n      static_assert(sizeof...(otherIndices) + 1 == Tensor_::NumIndices, \"Number of indices used to access a tensor coefficient must be equal to the rank of the tensor.\");\n      return operator()(tensor, std::array<typename Tensor_::Index, Tensor_::NumIndices>{{firstIndex, otherIndices...}});\n    }\n\n    template<typename Tensor_>\n    inline internal::tensor_symmetry_value_setter<Tensor_, StaticSGroup<Gen...>> operator()(Tensor_& tensor, std::array<typename Tensor_::Index, Tensor_::NumIndices> const& indices) const\n    {\n      return internal::tensor_symmetry_value_setter<Tensor_, StaticSGroup<Gen...>>(tensor, *this, indices);\n    }\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSORSYMMETRY_STATICSYMMETRY_H\n\n/*\n * kate: space-indent on; indent-width 2; mixedindent off; indent-mode cstyle;\n */\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/TensorSymmetry/Symmetry.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2013 Christian Seiler <christian@iwakd.de>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSORSYMMETRY_SYMMETRY_H\n#define EIGEN_CXX11_TENSORSYMMETRY_SYMMETRY_H\n\nnamespace Eigen {\n\nenum {\n  NegationFlag           = 0x01,\n  ConjugationFlag        = 0x02\n};\n\nenum {\n  GlobalRealFlag         = 0x01,\n  GlobalImagFlag         = 0x02,\n  GlobalZeroFlag         = 0x03\n};\n\nnamespace internal {\n\ntemplate<std::size_t NumIndices, typename... Sym>                   struct tensor_symmetry_pre_analysis;\ntemplate<std::size_t NumIndices, typename... Sym>                   struct tensor_static_symgroup;\ntemplate<bool instantiate, std::size_t NumIndices, typename... Sym> struct tensor_static_symgroup_if;\ntemplate<typename Tensor_> struct tensor_symmetry_calculate_flags;\ntemplate<typename Tensor_> struct tensor_symmetry_assign_value;\ntemplate<typename... Sym> struct tensor_symmetry_num_indices;\n\n} // end namespace internal\n\ntemplate<int One_, int Two_>\nstruct Symmetry\n{\n  static_assert(One_ != Two_, \"Symmetries must cover distinct indices.\");\n  constexpr static int One = One_;\n  constexpr static int Two = Two_;\n  constexpr static int Flags = 0;\n};\n\ntemplate<int One_, int Two_>\nstruct AntiSymmetry\n{\n  static_assert(One_ != Two_, \"Symmetries must cover distinct indices.\");\n  constexpr static int One = One_;\n  constexpr static int Two = Two_;\n  constexpr static int Flags = NegationFlag;\n};\n\ntemplate<int One_, int Two_>\nstruct Hermiticity\n{\n  static_assert(One_ != Two_, \"Symmetries must cover distinct indices.\");\n  constexpr static int One = One_;\n  constexpr static int Two = Two_;\n  constexpr static int Flags = ConjugationFlag;\n};\n\ntemplate<int One_, int Two_>\nstruct AntiHermiticity\n{\n  static_assert(One_ != Two_, \"Symmetries must cover distinct indices.\");\n  constexpr static int One = One_;\n  constexpr static int Two = Two_;\n  constexpr static int Flags = ConjugationFlag | NegationFlag;\n};\n\n/** \\class DynamicSGroup\n  * \\ingroup TensorSymmetry_Module\n  *\n  * \\brief Dynamic symmetry group\n  *\n  * The %DynamicSGroup class represents a symmetry group that need not be known at\n  * compile time. It is useful if one wants to support arbitrary run-time defineable\n  * symmetries for tensors, but it is also instantiated if a symmetry group is defined\n  * at compile time that would be either too large for the compiler to reasonably\n  * generate (using templates to calculate this at compile time is very inefficient)\n  * or that the compiler could generate the group but that it wouldn't make sense to\n  * unroll the loop for setting coefficients anymore.\n  */\nclass DynamicSGroup;\n\n/** \\internal\n  *\n  * \\class DynamicSGroupFromTemplateArgs\n  * \\ingroup TensorSymmetry_Module\n  *\n  * \\brief Dynamic symmetry group, initialized from template arguments\n  *\n  * This class is a child class of DynamicSGroup. It uses the template arguments\n  * specified to initialize itself.\n  */\ntemplate<typename... Gen>\nclass DynamicSGroupFromTemplateArgs;\n\n/** \\class StaticSGroup\n  * \\ingroup TensorSymmetry_Module\n  *\n  * \\brief Static symmetry group\n  *\n  * This class represents a symmetry group that is known and resolved completely\n  * at compile time. Ideally, no run-time penalty is incurred compared to the\n  * manual unrolling of the symmetry.\n  *\n  * <b><i>CAUTION:</i></b>\n  *\n  * Do not use this class directly for large symmetry groups. The compiler\n  * may run into a limit, or segfault or in the very least will take a very,\n  * very, very long time to compile the code. Use the SGroup class instead\n  * if you want a static group. That class contains logic that will\n  * automatically select the DynamicSGroup class instead if the symmetry\n  * group becomes too large. (In that case, unrolling may not even be\n  * beneficial.)\n  */\ntemplate<typename... Gen>\nclass StaticSGroup;\n\n/** \\class SGroup\n  * \\ingroup TensorSymmetry_Module\n  *\n  * \\brief Symmetry group, initialized from template arguments\n  *\n  * This class represents a symmetry group whose generators are already\n  * known at compile time. It may or may not be resolved at compile time,\n  * depending on the estimated size of the group.\n  *\n  * \\sa StaticSGroup\n  * \\sa DynamicSGroup\n  */\ntemplate<typename... Gen>\nclass SGroup : public internal::tensor_symmetry_pre_analysis<internal::tensor_symmetry_num_indices<Gen...>::value, Gen...>::root_type\n{\n  public:\n    constexpr static std::size_t NumIndices = internal::tensor_symmetry_num_indices<Gen...>::value;\n    typedef typename internal::tensor_symmetry_pre_analysis<NumIndices, Gen...>::root_type Base;\n\n    // make standard constructors + assignment operators public\n    inline SGroup() : Base() { }\n    inline SGroup(const SGroup<Gen...>& other) : Base(other) { }\n    inline SGroup(SGroup<Gen...>&& other) : Base(other) { }\n    inline SGroup<Gen...>& operator=(const SGroup<Gen...>& other) { Base::operator=(other); return *this; }\n    inline SGroup<Gen...>& operator=(SGroup<Gen...>&& other) { Base::operator=(other); return *this; }\n\n    // all else is defined in the base class\n};\n\nnamespace internal {\n\ntemplate<typename... Sym> struct tensor_symmetry_num_indices\n{\n  constexpr static std::size_t value = 1;\n};\n\ntemplate<int One_, int Two_, typename... Sym> struct tensor_symmetry_num_indices<Symmetry<One_, Two_>, Sym...>\n{\nprivate:\n  constexpr static std::size_t One = static_cast<std::size_t>(One_);\n  constexpr static std::size_t Two = static_cast<std::size_t>(Two_);\n  constexpr static std::size_t Three = tensor_symmetry_num_indices<Sym...>::value;\n\n  // don't use std::max, since it's not constexpr until C++14...\n  constexpr static std::size_t maxOneTwoPlusOne = ((One > Two) ? One : Two) + 1;\npublic:\n  constexpr static std::size_t value = (maxOneTwoPlusOne > Three) ? maxOneTwoPlusOne : Three;\n};\n\ntemplate<int One_, int Two_, typename... Sym> struct tensor_symmetry_num_indices<AntiSymmetry<One_, Two_>, Sym...>\n  : public tensor_symmetry_num_indices<Symmetry<One_, Two_>, Sym...> {};\ntemplate<int One_, int Two_, typename... Sym> struct tensor_symmetry_num_indices<Hermiticity<One_, Two_>, Sym...>\n  : public tensor_symmetry_num_indices<Symmetry<One_, Two_>, Sym...> {};\ntemplate<int One_, int Two_, typename... Sym> struct tensor_symmetry_num_indices<AntiHermiticity<One_, Two_>, Sym...>\n  : public tensor_symmetry_num_indices<Symmetry<One_, Two_>, Sym...> {};\n\n/** \\internal\n  *\n  * \\class tensor_symmetry_pre_analysis\n  * \\ingroup TensorSymmetry_Module\n  *\n  * \\brief Pre-select whether to use a static or dynamic symmetry group\n  *\n  * When a symmetry group could in principle be determined at compile time,\n  * this template implements the logic whether to actually do that or whether\n  * to rather defer that to runtime.\n  *\n  * The logic is as follows:\n  * <dl>\n  * <dt><b>No generators (trivial symmetry):</b></dt>\n  * <dd>Use a trivial static group. Ideally, this has no performance impact\n  *     compared to not using symmetry at all. In practice, this might not\n  *     be the case.</dd>\n  * <dt><b>More than 4 generators:</b></dt>\n  * <dd>Calculate the group at run time, it is likely far too large for the\n  *     compiler to be able to properly generate it in a realistic time.</dd>\n  * <dt><b>Up to and including 4 generators:</b></dt>\n  * <dd>Actually enumerate all group elements, but then check how many there\n  *     are. If there are more than 16, it is unlikely that unrolling the\n  *     loop (as is done in the static compile-time case) is sensible, so\n  *     use a dynamic group instead. If there are at most 16 elements, actually\n  *     use that static group. Note that the largest group with 4 generators\n  *     still compiles with reasonable resources.</dd>\n  * </dl>\n  *\n  * Note: Example compile time performance with g++-4.6 on an Intenl Core i5-3470\n  *       with 16 GiB RAM (all generators non-redundant and the subgroups don't\n  *       factorize):\n  *\n  *          # Generators          -O0 -ggdb               -O2\n  *          -------------------------------------------------------------------\n  *          1                 0.5 s  /   250 MiB     0.45s /   230 MiB\n  *          2                 0.5 s  /   260 MiB     0.5 s /   250 MiB\n  *          3                 0.65s  /   310 MiB     0.62s /   310 MiB\n  *          4                 2.2 s  /   860 MiB     1.7 s /   770 MiB\n  *          5               130   s  / 13000 MiB   120   s / 11000 MiB\n  *\n  * It is clear that everything is still very efficient up to 4 generators, then\n  * the memory and CPU requirements become unreasonable. Thus we only instantiate\n  * the template group theory logic if the number of generators supplied is 4 or\n  * lower, otherwise this will be forced to be done during runtime, where the\n  * algorithm is reasonably fast.\n  */\ntemplate<std::size_t NumIndices>\nstruct tensor_symmetry_pre_analysis<NumIndices>\n{\n  typedef StaticSGroup<> root_type;\n};\n\ntemplate<std::size_t NumIndices, typename Gen_, typename... Gens_>\nstruct tensor_symmetry_pre_analysis<NumIndices, Gen_, Gens_...>\n{\n  constexpr static std::size_t max_static_generators = 4;\n  constexpr static std::size_t max_static_elements = 16;\n  typedef tensor_static_symgroup_if<(sizeof...(Gens_) + 1 <= max_static_generators), NumIndices, Gen_, Gens_...> helper;\n  constexpr static std::size_t possible_size = helper::size;\n\n  typedef typename conditional<\n    possible_size == 0 || possible_size >= max_static_elements,\n    DynamicSGroupFromTemplateArgs<Gen_, Gens_...>,\n    typename helper::type\n  >::type root_type;\n};\n\ntemplate<bool instantiate, std::size_t NumIndices, typename... Gens>\nstruct tensor_static_symgroup_if\n{\n  constexpr static std::size_t size = 0;\n  typedef void type;\n};\n\ntemplate<std::size_t NumIndices, typename... Gens>\nstruct tensor_static_symgroup_if<true, NumIndices, Gens...> : tensor_static_symgroup<NumIndices, Gens...> {};\n\ntemplate<typename Tensor_>\nstruct tensor_symmetry_assign_value\n{\n  typedef typename Tensor_::Index Index;\n  typedef typename Tensor_::Scalar Scalar;\n  constexpr static std::size_t NumIndices = Tensor_::NumIndices;\n\n  static inline int run(const std::array<Index, NumIndices>& transformed_indices, int transformation_flags, int dummy, Tensor_& tensor, const Scalar& value_)\n  {\n    Scalar value(value_);\n    if (transformation_flags & ConjugationFlag)\n      value = numext::conj(value);\n    if (transformation_flags & NegationFlag)\n      value = -value;\n    tensor.coeffRef(transformed_indices) = value;\n    return dummy;\n  }\n};\n\ntemplate<typename Tensor_>\nstruct tensor_symmetry_calculate_flags\n{\n  typedef typename Tensor_::Index Index;\n  constexpr static std::size_t NumIndices = Tensor_::NumIndices;\n\n  static inline int run(const std::array<Index, NumIndices>& transformed_indices, int transform_flags, int current_flags, const std::array<Index, NumIndices>& orig_indices)\n  {\n    if (transformed_indices == orig_indices) {\n      if (transform_flags & (ConjugationFlag | NegationFlag))\n        return current_flags | GlobalImagFlag; // anti-hermitian diagonal\n      else if (transform_flags & ConjugationFlag)\n        return current_flags | GlobalRealFlag; // hermitian diagonal\n      else if (transform_flags & NegationFlag)\n        return current_flags | GlobalZeroFlag; // anti-symmetric diagonal\n    }\n    return current_flags;\n  }\n};\n\ntemplate<typename Tensor_, typename Symmetry_, int Flags = 0>\nclass tensor_symmetry_value_setter\n{\n  public:\n    typedef typename Tensor_::Index Index;\n    typedef typename Tensor_::Scalar Scalar;\n    constexpr static std::size_t NumIndices = Tensor_::NumIndices;\n\n    inline tensor_symmetry_value_setter(Tensor_& tensor, Symmetry_ const& symmetry, std::array<Index, NumIndices> const& indices)\n      : m_tensor(tensor), m_symmetry(symmetry), m_indices(indices) { }\n\n    inline tensor_symmetry_value_setter<Tensor_, Symmetry_, Flags>& operator=(Scalar const& value)\n    {\n      doAssign(value);\n      return *this;\n    }\n  private:\n    Tensor_& m_tensor;\n    Symmetry_ m_symmetry;\n    std::array<Index, NumIndices> m_indices;\n\n    inline void doAssign(Scalar const& value)\n    {\n      #ifdef EIGEN_TENSOR_SYMMETRY_CHECK_VALUES\n        int value_flags = m_symmetry.template apply<internal::tensor_symmetry_calculate_flags<Tensor_>, int>(m_indices, m_symmetry.globalFlags(), m_indices);\n        if (value_flags & GlobalRealFlag)\n          eigen_assert(numext::imag(value) == 0);\n        if (value_flags & GlobalImagFlag)\n          eigen_assert(numext::real(value) == 0);\n      #endif\n      m_symmetry.template apply<internal::tensor_symmetry_assign_value<Tensor_>, int>(m_indices, 0, m_tensor, value);\n    }\n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSORSYMMETRY_SYMMETRY_H\n\n/*\n * kate: space-indent on; indent-width 2; mixedindent off; indent-mode cstyle;\n */\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/TensorSymmetry/util/TemplateGroupTheory.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2013 Christian Seiler <christian@iwakd.de>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_TENSORSYMMETRY_TEMPLATEGROUPTHEORY_H\n#define EIGEN_CXX11_TENSORSYMMETRY_TEMPLATEGROUPTHEORY_H\n\nnamespace Eigen {\n\nnamespace internal {\n\nnamespace group_theory {\n\n/** \\internal\n  * \\file CXX11/src/TensorSymmetry/util/TemplateGroupTheory.h\n  * This file contains C++ templates that implement group theory algorithms.\n  *\n  * The algorithms allow for a compile-time analysis of finite groups.\n  *\n  * Currently only Dimino's algorithm is implemented, which returns a list\n  * of all elements in a group given a set of (possibly redundant) generators.\n  * (One could also do that with the so-called orbital algorithm, but that\n  * is much more expensive and usually has no advantages.)\n  */\n\n/**********************************************************************\n *                \"Ok kid, here is where it gets complicated.\"\n *                         - Amelia Pond in the \"Doctor Who\" episode\n *                           \"The Big Bang\"\n *\n * Dimino's algorithm\n * ==================\n *\n * The following is Dimino's algorithm in sequential form:\n *\n * Input: identity element, list of generators, equality check,\n *        multiplication operation\n * Output: list of group elements\n *\n * 1. add identity element\n * 2. remove identities from list of generators\n * 3. add all powers of first generator that aren't the\n *    identity element\n * 4. go through all remaining generators:\n *        a. if generator is already in the list of elements\n *                -> do nothing\n *        b. otherwise\n *                i.   remember current # of elements\n *                     (i.e. the size of the current subgroup)\n *                ii.  add all current elements (which includes\n *                     the identity) each multiplied from right\n *                     with the current generator to the group\n *                iii. add all remaining cosets that are generated\n *                     by products of the new generator with itself\n *                     and all other generators seen so far\n *\n * In functional form, this is implemented as a long set of recursive\n * templates that have a complicated relationship.\n *\n * The main interface for Dimino's algorithm is the template\n * enumerate_group_elements. All lists are implemented as variadic\n * type_list<typename...> and numeric_list<typename = int, int...>\n * templates.\n *\n * 'Calling' templates is usually done via typedefs.\n *\n * This algorithm is an extended version of the basic version. The\n * extension consists in the fact that each group element has a set\n * of flags associated with it. Multiplication of two group elements\n * with each other results in a group element whose flags are the\n * XOR of the flags of the previous elements. Each time the algorithm\n * notices that a group element it just calculated is already in the\n * list of current elements, the flags of both will be compared and\n * added to the so-called 'global flags' of the group.\n *\n * The rationale behind this extension is that this allows not only\n * for the description of symmetries between tensor indices, but\n * also allows for the description of hermiticity, antisymmetry and\n * antihermiticity. Negation and conjugation each are specific bit\n * in the flags value and if two different ways to reach a group\n * element lead to two different flags, this poses a constraint on\n * the allowed values of the resulting tensor. For example, if a\n * group element is reach both with and without the conjugation\n * flags, it is clear that the resulting tensor has to be real.\n *\n * Note that this flag mechanism is quite generic and may have other\n * uses beyond tensor properties.\n *\n * IMPORTANT: \n *     This algorithm assumes the group to be finite. If you try to\n *     run it with a group that's infinite, the algorithm will only\n *     terminate once you hit a compiler limit (max template depth).\n *     Also note that trying to use this implementation to create a\n *     very large group will probably either make you hit the same\n *     limit, cause the compiler to segfault or at the very least\n *     take a *really* long time (hours, days, weeks - sic!) to\n *     compile. It is not recommended to plug in more than 4\n *     generators, unless they are independent of each other.\n */\n\n/** \\internal\n  *\n  * \\class strip_identities\n  * \\ingroup CXX11_TensorSymmetry_Module\n  *\n  * \\brief Cleanse a list of group elements of the identity element\n  *\n  * This template is used to make a first pass through all initial\n  * generators of Dimino's algorithm and remove the identity\n  * elements.\n  *\n  * \\sa enumerate_group_elements\n  */\ntemplate<template<typename, typename> class Equality, typename id, typename L> struct strip_identities;\n\ntemplate<\n  template<typename, typename> class Equality,\n  typename id,\n  typename t,\n  typename... ts\n>\nstruct strip_identities<Equality, id, type_list<t, ts...>>\n{\n  typedef typename conditional<\n    Equality<id, t>::value,\n    typename strip_identities<Equality, id, type_list<ts...>>::type,\n    typename concat<type_list<t>, typename strip_identities<Equality, id, type_list<ts...>>::type>::type\n  >::type type;\n  constexpr static int global_flags = Equality<id, t>::global_flags | strip_identities<Equality, id, type_list<ts...>>::global_flags;\n};\n\ntemplate<\n  template<typename, typename> class Equality,\n  typename id\n  EIGEN_TPL_PP_SPEC_HACK_DEFC(typename, ts)\n>\nstruct strip_identities<Equality, id, type_list<EIGEN_TPL_PP_SPEC_HACK_USE(ts)>>\n{\n  typedef type_list<> type;\n  constexpr static int global_flags = 0;\n};\n\n/** \\internal\n  *\n  * \\class dimino_first_step_elements_helper \n  * \\ingroup CXX11_TensorSymmetry_Module\n  *\n  * \\brief Recursive template that adds powers of the first generator to the list of group elements\n  *\n  * This template calls itself recursively to add powers of the first\n  * generator to the list of group elements. It stops if it reaches\n  * the identity element again.\n  *\n  * \\sa enumerate_group_elements, dimino_first_step_elements\n  */\ntemplate<\n  template<typename, typename> class Multiply,\n  template<typename, typename> class Equality,\n  typename id,\n  typename g,\n  typename current_element,\n  typename elements,\n  bool dont_add_current_element   // = false\n>\nstruct dimino_first_step_elements_helper\n#ifndef EIGEN_PARSED_BY_DOXYGEN\n  : // recursive inheritance is too difficult for Doxygen\n  public dimino_first_step_elements_helper<\n    Multiply,\n    Equality,\n    id,\n    g,\n    typename Multiply<current_element, g>::type,\n    typename concat<elements, type_list<current_element>>::type,\n    Equality<typename Multiply<current_element, g>::type, id>::value\n  > {};\n\ntemplate<\n  template<typename, typename> class Multiply,\n  template<typename, typename> class Equality,\n  typename id,\n  typename g,\n  typename current_element,\n  typename elements\n>\nstruct dimino_first_step_elements_helper<Multiply, Equality, id, g, current_element, elements, true>\n#endif // EIGEN_PARSED_BY_DOXYGEN\n{\n  typedef elements type;\n  constexpr static int global_flags = Equality<current_element, id>::global_flags;\n};\n\n/** \\internal\n  *\n  * \\class dimino_first_step_elements\n  * \\ingroup CXX11_TensorSymmetry_Module\n  *\n  * \\brief Add all powers of the first generator to the list of group elements\n  *\n  * This template takes the first non-identity generator and generates the initial\n  * list of elements which consists of all powers of that generator. For a group\n  * with just one generated, it would be enumerated after this.\n  *\n  * \\sa enumerate_group_elements\n  */\ntemplate<\n  template<typename, typename> class Multiply,\n  template<typename, typename> class Equality,\n  typename id,\n  typename generators\n>\nstruct dimino_first_step_elements\n{\n  typedef typename get<0, generators>::type first_generator;\n  typedef typename skip<1, generators>::type next_generators;\n  typedef type_list<first_generator> generators_done;\n\n  typedef dimino_first_step_elements_helper<\n    Multiply,\n    Equality,\n    id,\n    first_generator,\n    first_generator,\n    type_list<id>,\n    false\n  > helper;\n  typedef typename helper::type type;\n  constexpr static int global_flags = helper::global_flags;\n};\n\n/** \\internal\n  *\n  * \\class dimino_get_coset_elements\n  * \\ingroup CXX11_TensorSymmetry_Module\n  *\n  * \\brief Generate all elements of a specific coset\n  *\n  * This template generates all the elements of a specific coset by\n  * multiplying all elements in the given subgroup with the new\n  * coset representative. Note that the first element of the\n  * subgroup is always the identity element, so the first element of\n  * the result of this template is going to be the coset\n  * representative itself.\n  *\n  * Note that this template accepts an additional boolean parameter\n  * that specifies whether to actually generate the coset (true) or\n  * just return an empty list (false).\n  *\n  * \\sa enumerate_group_elements, dimino_add_cosets_for_rep\n  */\ntemplate<\n  template<typename, typename> class Multiply,\n  typename sub_group_elements,\n  typename new_coset_rep,\n  bool generate_coset      // = true\n>\nstruct dimino_get_coset_elements\n{\n  typedef typename apply_op_from_right<Multiply, new_coset_rep, sub_group_elements>::type type;\n};\n\ntemplate<\n  template<typename, typename> class Multiply,\n  typename sub_group_elements,\n  typename new_coset_rep\n>\nstruct dimino_get_coset_elements<Multiply, sub_group_elements, new_coset_rep, false>\n{\n  typedef type_list<> type;\n};\n\n/** \\internal\n  *\n  * \\class dimino_add_cosets_for_rep\n  * \\ingroup CXX11_TensorSymmetry_Module\n  *\n  * \\brief Recursive template for adding coset spaces\n  *\n  * This template multiplies the coset representative with a generator\n  * from the list of previous generators. If the new element is not in\n  * the group already, it adds the corresponding coset. Finally it\n  * proceeds to call itself with the next generator from the list.\n  *\n  * \\sa enumerate_group_elements, dimino_add_all_coset_spaces\n  */\ntemplate<\n  template<typename, typename> class Multiply,\n  template<typename, typename> class Equality,\n  typename id,\n  typename sub_group_elements,\n  typename elements,\n  typename generators,\n  typename rep_element,\n  int sub_group_size\n>\nstruct dimino_add_cosets_for_rep;\n\ntemplate<\n  template<typename, typename> class Multiply,\n  template<typename, typename> class Equality,\n  typename id,\n  typename sub_group_elements,\n  typename elements,\n  typename g,\n  typename... gs,\n  typename rep_element,\n  int sub_group_size\n>\nstruct dimino_add_cosets_for_rep<Multiply, Equality, id, sub_group_elements, elements, type_list<g, gs...>, rep_element, sub_group_size>\n{\n  typedef typename Multiply<rep_element, g>::type new_coset_rep;\n  typedef contained_in_list_gf<Equality, new_coset_rep, elements> _cil;\n  constexpr static bool add_coset = !_cil::value;\n\n  typedef typename dimino_get_coset_elements<\n    Multiply,\n    sub_group_elements,\n    new_coset_rep,\n    add_coset\n  >::type coset_elements;\n\n  typedef dimino_add_cosets_for_rep<\n    Multiply,\n    Equality,\n    id,\n    sub_group_elements,\n    typename concat<elements, coset_elements>::type,\n    type_list<gs...>,\n    rep_element,\n    sub_group_size\n  > _helper;\n\n  typedef typename _helper::type type;\n  constexpr static int global_flags = _cil::global_flags | _helper::global_flags;\n\n  /* Note that we don't have to update global flags here, since\n   * we will only add these elements if they are not part of\n   * the group already. But that only happens if the coset rep\n   * is not already in the group, so the check for the coset rep\n   * will catch this.\n   */\n};\n\ntemplate<\n  template<typename, typename> class Multiply,\n  template<typename, typename> class Equality,\n  typename id,\n  typename sub_group_elements,\n  typename elements\n  EIGEN_TPL_PP_SPEC_HACK_DEFC(typename, empty),\n  typename rep_element,\n  int sub_group_size\n>\nstruct dimino_add_cosets_for_rep<Multiply, Equality, id, sub_group_elements, elements, type_list<EIGEN_TPL_PP_SPEC_HACK_USE(empty)>, rep_element, sub_group_size>\n{\n  typedef elements type;\n  constexpr static int global_flags = 0;\n};\n\n/** \\internal\n  *\n  * \\class dimino_add_all_coset_spaces\n  * \\ingroup CXX11_TensorSymmetry_Module\n  *\n  * \\brief Recursive template for adding all coset spaces for a new generator\n  *\n  * This template tries to go through the list of generators (with\n  * the help of the dimino_add_cosets_for_rep template) as long as\n  * it still finds elements that are not part of the group and add\n  * the corresponding cosets.\n  *\n  * \\sa enumerate_group_elements, dimino_add_cosets_for_rep\n  */\ntemplate<\n  template<typename, typename> class Multiply,\n  template<typename, typename> class Equality,\n  typename id,\n  typename sub_group_elements,\n  typename elements,\n  typename generators,\n  int sub_group_size,\n  int rep_pos,\n  bool stop_condition        // = false\n>\nstruct dimino_add_all_coset_spaces\n{\n  typedef typename get<rep_pos, elements>::type rep_element;\n  typedef dimino_add_cosets_for_rep<\n    Multiply,\n    Equality,\n    id,\n    sub_group_elements,\n    elements,\n    generators,\n    rep_element,\n    sub_group_elements::count\n  > _ac4r;\n  typedef typename _ac4r::type new_elements;\n  \n  constexpr static int new_rep_pos = rep_pos + sub_group_elements::count;\n  constexpr static bool new_stop_condition = new_rep_pos >= new_elements::count;\n\n  typedef dimino_add_all_coset_spaces<\n    Multiply,\n    Equality,\n    id,\n    sub_group_elements,\n    new_elements,\n    generators,\n    sub_group_size,\n    new_rep_pos,\n    new_stop_condition\n  > _helper;\n\n  typedef typename _helper::type type;\n  constexpr static int global_flags = _helper::global_flags | _ac4r::global_flags;\n};\n\ntemplate<\n  template<typename, typename> class Multiply,\n  template<typename, typename> class Equality,\n  typename id,\n  typename sub_group_elements,\n  typename elements,\n  typename generators,\n  int sub_group_size,\n  int rep_pos\n>\nstruct dimino_add_all_coset_spaces<Multiply, Equality, id, sub_group_elements, elements, generators, sub_group_size, rep_pos, true>\n{\n  typedef elements type;\n  constexpr static int global_flags = 0;\n};\n\n/** \\internal\n  *\n  * \\class dimino_add_generator\n  * \\ingroup CXX11_TensorSymmetry_Module\n  *\n  * \\brief Enlarge the group by adding a new generator.\n  *\n  * It accepts a boolean parameter that determines if the generator is redundant,\n  * i.e. was already seen in the group. In that case, it reduces to a no-op.\n  *\n  * \\sa enumerate_group_elements, dimino_add_all_coset_spaces\n  */\ntemplate<\n  template<typename, typename> class Multiply,\n  template<typename, typename> class Equality,\n  typename id,\n  typename elements,\n  typename generators_done,\n  typename current_generator,\n  bool redundant          // = false\n>\nstruct dimino_add_generator\n{\n  /* this template is only called if the generator is not redundant\n   * => all elements of the group multiplied with the new generator\n   *    are going to be new elements of the most trivial coset space\n   */\n  typedef typename apply_op_from_right<Multiply, current_generator, elements>::type multiplied_elements;\n  typedef typename concat<elements, multiplied_elements>::type new_elements;\n\n  constexpr static int rep_pos = elements::count;\n\n  typedef dimino_add_all_coset_spaces<\n    Multiply,\n    Equality,\n    id,\n    elements, // elements of previous subgroup\n    new_elements,\n    typename concat<generators_done, type_list<current_generator>>::type,\n    elements::count, // size of previous subgroup\n    rep_pos,\n    false // don't stop (because rep_pos >= new_elements::count is always false at this point)\n  > _helper;\n  typedef typename _helper::type type;\n  constexpr static int global_flags = _helper::global_flags;\n};\n\ntemplate<\n  template<typename, typename> class Multiply,\n  template<typename, typename> class Equality,\n  typename id,\n  typename elements,\n  typename generators_done,\n  typename current_generator\n>\nstruct dimino_add_generator<Multiply, Equality, id, elements, generators_done, current_generator, true>\n{\n  // redundant case\n  typedef elements type;\n  constexpr static int global_flags = 0;\n};\n\n/** \\internal\n  *\n  * \\class dimino_add_remaining_generators\n  * \\ingroup CXX11_TensorSymmetry_Module\n  *\n  * \\brief Recursive template that adds all remaining generators to a group\n  *\n  * Loop through the list of generators that remain and successively\n  * add them to the group.\n  *\n  * \\sa enumerate_group_elements, dimino_add_generator\n  */\ntemplate<\n  template<typename, typename> class Multiply,\n  template<typename, typename> class Equality,\n  typename id,\n  typename generators_done,\n  typename remaining_generators,\n  typename elements\n>\nstruct dimino_add_remaining_generators\n{\n  typedef typename get<0, remaining_generators>::type first_generator;\n  typedef typename skip<1, remaining_generators>::type next_generators;\n\n  typedef contained_in_list_gf<Equality, first_generator, elements> _cil;\n\n  typedef dimino_add_generator<\n    Multiply,\n    Equality,\n    id,\n    elements,\n    generators_done,\n    first_generator,\n    _cil::value\n  > _helper;\n\n  typedef typename _helper::type new_elements;\n\n  typedef dimino_add_remaining_generators<\n    Multiply,\n    Equality,\n    id,\n    typename concat<generators_done, type_list<first_generator>>::type,\n    next_generators,\n    new_elements\n  > _next_iter;\n\n  typedef typename _next_iter::type type;\n  constexpr static int global_flags =\n    _cil::global_flags |\n    _helper::global_flags |\n    _next_iter::global_flags;\n};\n\ntemplate<\n  template<typename, typename> class Multiply,\n  template<typename, typename> class Equality,\n  typename id,\n  typename generators_done,\n  typename elements\n>\nstruct dimino_add_remaining_generators<Multiply, Equality, id, generators_done, type_list<>, elements>\n{\n  typedef elements type;\n  constexpr static int global_flags = 0;\n};\n\n/** \\internal\n  *\n  * \\class enumerate_group_elements_noid\n  * \\ingroup CXX11_TensorSymmetry_Module\n  *\n  * \\brief Helper template that implements group element enumeration\n  *\n  * This is a helper template that implements the actual enumeration\n  * of group elements. This has been split so that the list of\n  * generators can be cleansed of the identity element before\n  * performing the actual operation.\n  *\n  * \\sa enumerate_group_elements\n  */\ntemplate<\n  template<typename, typename> class Multiply,\n  template<typename, typename> class Equality,\n  typename id,\n  typename generators,\n  int initial_global_flags = 0\n>\nstruct enumerate_group_elements_noid\n{\n  typedef dimino_first_step_elements<Multiply, Equality, id, generators> first_step;\n  typedef typename first_step::type first_step_elements;\n\n  typedef dimino_add_remaining_generators<\n    Multiply,\n    Equality,\n    id,\n    typename first_step::generators_done,\n    typename first_step::next_generators, // remaining_generators\n    typename first_step::type // first_step elements\n  > _helper;\n\n  typedef typename _helper::type type;\n  constexpr static int global_flags =\n    initial_global_flags |\n    first_step::global_flags |\n    _helper::global_flags;\n};\n\n// in case when no generators are specified\ntemplate<\n  template<typename, typename> class Multiply,\n  template<typename, typename> class Equality,\n  typename id,\n  int initial_global_flags\n>\nstruct enumerate_group_elements_noid<Multiply, Equality, id, type_list<>, initial_global_flags>\n{\n  typedef type_list<id> type;\n  constexpr static int global_flags = initial_global_flags;\n};\n\n/** \\internal\n  *\n  * \\class enumerate_group_elements\n  * \\ingroup CXX11_TensorSymmetry_Module\n  *\n  * \\brief Enumerate all elements in a finite group\n  *\n  * This template enumerates all elements in a finite group. It accepts\n  * the following template parameters:\n  *\n  * \\tparam Multiply      The multiplication operation that multiplies two group elements\n  *                       with each other.\n  * \\tparam Equality      The equality check operation that checks if two group elements\n  *                       are equal to another.\n  * \\tparam id            The identity element\n  * \\tparam _generators   A list of (possibly redundant) generators of the group\n  */\ntemplate<\n  template<typename, typename> class Multiply,\n  template<typename, typename> class Equality,\n  typename id,\n  typename _generators\n>\nstruct enumerate_group_elements\n  : public enumerate_group_elements_noid<\n      Multiply,\n      Equality,\n      id,\n      typename strip_identities<Equality, id, _generators>::type,\n      strip_identities<Equality, id, _generators>::global_flags\n    >\n{\n};\n\n} // end namespace group_theory\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11_TENSORSYMMETRY_TEMPLATEGROUPTHEORY_H\n\n/*\n * kate: space-indent on; indent-width 2; mixedindent off; indent-mode cstyle;\n */\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/ThreadPool/Barrier.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2018 Rasmus Munk Larsen <rmlarsen@google.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n// Barrier is an object that allows one or more threads to wait until\n// Notify has been called a specified number of times.\n\n#ifndef EIGEN_CXX11_THREADPOOL_BARRIER_H\n#define EIGEN_CXX11_THREADPOOL_BARRIER_H\n\nnamespace Eigen {\n\nclass Barrier {\n public:\n  Barrier(unsigned int count) : state_(count << 1), notified_(false) {\n    eigen_plain_assert(((count << 1) >> 1) == count);\n  }\n  ~Barrier() { eigen_plain_assert((state_ >> 1) == 0); }\n\n  void Notify() {\n    unsigned int v = state_.fetch_sub(2, std::memory_order_acq_rel) - 2;\n    if (v != 1) {\n      // Clear the lowest bit (waiter flag) and check that the original state\n      // value was not zero. If it was zero, it means that notify was called\n      // more times than the original count.\n      eigen_plain_assert(((v + 2) & ~1) != 0);\n      return;  // either count has not dropped to 0, or waiter is not waiting\n    }\n    std::unique_lock<std::mutex> l(mu_);\n    eigen_plain_assert(!notified_);\n    notified_ = true;\n    cv_.notify_all();\n  }\n\n  void Wait() {\n    unsigned int v = state_.fetch_or(1, std::memory_order_acq_rel);\n    if ((v >> 1) == 0) return;\n    std::unique_lock<std::mutex> l(mu_);\n    while (!notified_) {\n      cv_.wait(l);\n    }\n  }\n\n private:\n  std::mutex mu_;\n  std::condition_variable cv_;\n  std::atomic<unsigned int> state_;  // low bit is waiter flag\n  bool notified_;\n};\n\n// Notification is an object that allows a user to to wait for another\n// thread to signal a notification that an event has occurred.\n//\n// Multiple threads can wait on the same Notification object,\n// but only one caller must call Notify() on the object.\nstruct Notification : Barrier {\n  Notification() : Barrier(1){};\n};\n\n}  // namespace Eigen\n\n#endif  // EIGEN_CXX11_THREADPOOL_BARRIER_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/ThreadPool/EventCount.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Dmitry Vyukov <dvyukov@google.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_THREADPOOL_EVENTCOUNT_H_\n#define EIGEN_CXX11_THREADPOOL_EVENTCOUNT_H_\n\nnamespace Eigen {\n\n// EventCount allows to wait for arbitrary predicates in non-blocking\n// algorithms. Think of condition variable, but wait predicate does not need to\n// be protected by a mutex. Usage:\n// Waiting thread does:\n//\n//   if (predicate)\n//     return act();\n//   EventCount::Waiter& w = waiters[my_index];\n//   ec.Prewait(&w);\n//   if (predicate) {\n//     ec.CancelWait(&w);\n//     return act();\n//   }\n//   ec.CommitWait(&w);\n//\n// Notifying thread does:\n//\n//   predicate = true;\n//   ec.Notify(true);\n//\n// Notify is cheap if there are no waiting threads. Prewait/CommitWait are not\n// cheap, but they are executed only if the preceding predicate check has\n// failed.\n//\n// Algorithm outline:\n// There are two main variables: predicate (managed by user) and state_.\n// Operation closely resembles Dekker mutual algorithm:\n// https://en.wikipedia.org/wiki/Dekker%27s_algorithm\n// Waiting thread sets state_ then checks predicate, Notifying thread sets\n// predicate then checks state_. Due to seq_cst fences in between these\n// operations it is guaranteed than either waiter will see predicate change\n// and won't block, or notifying thread will see state_ change and will unblock\n// the waiter, or both. But it can't happen that both threads don't see each\n// other changes, which would lead to deadlock.\nclass EventCount {\n public:\n  class Waiter;\n\n  EventCount(MaxSizeVector<Waiter>& waiters)\n      : state_(kStackMask), waiters_(waiters) {\n    eigen_plain_assert(waiters.size() < (1 << kWaiterBits) - 1);\n  }\n\n  ~EventCount() {\n    // Ensure there are no waiters.\n    eigen_plain_assert(state_.load() == kStackMask);\n  }\n\n  // Prewait prepares for waiting.\n  // After calling Prewait, the thread must re-check the wait predicate\n  // and then call either CancelWait or CommitWait.\n  void Prewait() {\n    uint64_t state = state_.load(std::memory_order_relaxed);\n    for (;;) {\n      CheckState(state);\n      uint64_t newstate = state + kWaiterInc;\n      CheckState(newstate);\n      if (state_.compare_exchange_weak(state, newstate,\n                                       std::memory_order_seq_cst))\n        return;\n    }\n  }\n\n  // CommitWait commits waiting after Prewait.\n  void CommitWait(Waiter* w) {\n    eigen_plain_assert((w->epoch & ~kEpochMask) == 0);\n    w->state = Waiter::kNotSignaled;\n    const uint64_t me = (w - &waiters_[0]) | w->epoch;\n    uint64_t state = state_.load(std::memory_order_seq_cst);\n    for (;;) {\n      CheckState(state, true);\n      uint64_t newstate;\n      if ((state & kSignalMask) != 0) {\n        // Consume the signal and return immidiately.\n        newstate = state - kWaiterInc - kSignalInc;\n      } else {\n        // Remove this thread from pre-wait counter and add to the waiter stack.\n        newstate = ((state & kWaiterMask) - kWaiterInc) | me;\n        w->next.store(state & (kStackMask | kEpochMask),\n                      std::memory_order_relaxed);\n      }\n      CheckState(newstate);\n      if (state_.compare_exchange_weak(state, newstate,\n                                       std::memory_order_acq_rel)) {\n        if ((state & kSignalMask) == 0) {\n          w->epoch += kEpochInc;\n          Park(w);\n        }\n        return;\n      }\n    }\n  }\n\n  // CancelWait cancels effects of the previous Prewait call.\n  void CancelWait() {\n    uint64_t state = state_.load(std::memory_order_relaxed);\n    for (;;) {\n      CheckState(state, true);\n      uint64_t newstate = state - kWaiterInc;\n      // We don't know if the thread was also notified or not,\n      // so we should not consume a signal unconditionaly.\n      // Only if number of waiters is equal to number of signals,\n      // we know that the thread was notified and we must take away the signal.\n      if (((state & kWaiterMask) >> kWaiterShift) ==\n          ((state & kSignalMask) >> kSignalShift))\n        newstate -= kSignalInc;\n      CheckState(newstate);\n      if (state_.compare_exchange_weak(state, newstate,\n                                       std::memory_order_acq_rel))\n        return;\n    }\n  }\n\n  // Notify wakes one or all waiting threads.\n  // Must be called after changing the associated wait predicate.\n  void Notify(bool notifyAll) {\n    std::atomic_thread_fence(std::memory_order_seq_cst);\n    uint64_t state = state_.load(std::memory_order_acquire);\n    for (;;) {\n      CheckState(state);\n      const uint64_t waiters = (state & kWaiterMask) >> kWaiterShift;\n      const uint64_t signals = (state & kSignalMask) >> kSignalShift;\n      // Easy case: no waiters.\n      if ((state & kStackMask) == kStackMask && waiters == signals) return;\n      uint64_t newstate;\n      if (notifyAll) {\n        // Empty wait stack and set signal to number of pre-wait threads.\n        newstate =\n            (state & kWaiterMask) | (waiters << kSignalShift) | kStackMask;\n      } else if (signals < waiters) {\n        // There is a thread in pre-wait state, unblock it.\n        newstate = state + kSignalInc;\n      } else {\n        // Pop a waiter from list and unpark it.\n        Waiter* w = &waiters_[state & kStackMask];\n        uint64_t next = w->next.load(std::memory_order_relaxed);\n        newstate = (state & (kWaiterMask | kSignalMask)) | next;\n      }\n      CheckState(newstate);\n      if (state_.compare_exchange_weak(state, newstate,\n                                       std::memory_order_acq_rel)) {\n        if (!notifyAll && (signals < waiters))\n          return;  // unblocked pre-wait thread\n        if ((state & kStackMask) == kStackMask) return;\n        Waiter* w = &waiters_[state & kStackMask];\n        if (!notifyAll) w->next.store(kStackMask, std::memory_order_relaxed);\n        Unpark(w);\n        return;\n      }\n    }\n  }\n\n  class Waiter {\n    friend class EventCount;\n    // Align to 128 byte boundary to prevent false sharing with other Waiter\n    // objects in the same vector.\n    EIGEN_ALIGN_TO_BOUNDARY(128) std::atomic<uint64_t> next;\n    std::mutex mu;\n    std::condition_variable cv;\n    uint64_t epoch = 0;\n    unsigned state = kNotSignaled;\n    enum {\n      kNotSignaled,\n      kWaiting,\n      kSignaled,\n    };\n  };\n\n private:\n  // State_ layout:\n  // - low kWaiterBits is a stack of waiters committed wait\n  //   (indexes in waiters_ array are used as stack elements,\n  //   kStackMask means empty stack).\n  // - next kWaiterBits is count of waiters in prewait state.\n  // - next kWaiterBits is count of pending signals.\n  // - remaining bits are ABA counter for the stack.\n  //   (stored in Waiter node and incremented on push).\n  static const uint64_t kWaiterBits = 14;\n  static const uint64_t kStackMask = (1ull << kWaiterBits) - 1;\n  static const uint64_t kWaiterShift = kWaiterBits;\n  static const uint64_t kWaiterMask = ((1ull << kWaiterBits) - 1)\n                                      << kWaiterShift;\n  static const uint64_t kWaiterInc = 1ull << kWaiterShift;\n  static const uint64_t kSignalShift = 2 * kWaiterBits;\n  static const uint64_t kSignalMask = ((1ull << kWaiterBits) - 1)\n                                      << kSignalShift;\n  static const uint64_t kSignalInc = 1ull << kSignalShift;\n  static const uint64_t kEpochShift = 3 * kWaiterBits;\n  static const uint64_t kEpochBits = 64 - kEpochShift;\n  static const uint64_t kEpochMask = ((1ull << kEpochBits) - 1) << kEpochShift;\n  static const uint64_t kEpochInc = 1ull << kEpochShift;\n  std::atomic<uint64_t> state_;\n  MaxSizeVector<Waiter>& waiters_;\n\n  static void CheckState(uint64_t state, bool waiter = false) {\n    static_assert(kEpochBits >= 20, \"not enough bits to prevent ABA problem\");\n    const uint64_t waiters = (state & kWaiterMask) >> kWaiterShift;\n    const uint64_t signals = (state & kSignalMask) >> kSignalShift;\n    eigen_plain_assert(waiters >= signals);\n    eigen_plain_assert(waiters < (1 << kWaiterBits) - 1);\n    eigen_plain_assert(!waiter || waiters > 0);\n    (void)waiters;\n    (void)signals;\n  }\n\n  void Park(Waiter* w) {\n    std::unique_lock<std::mutex> lock(w->mu);\n    while (w->state != Waiter::kSignaled) {\n      w->state = Waiter::kWaiting;\n      w->cv.wait(lock);\n    }\n  }\n\n  void Unpark(Waiter* w) {\n    for (Waiter* next; w; w = next) {\n      uint64_t wnext = w->next.load(std::memory_order_relaxed) & kStackMask;\n      next = wnext == kStackMask ? nullptr : &waiters_[wnext];\n      unsigned state;\n      {\n        std::unique_lock<std::mutex> lock(w->mu);\n        state = w->state;\n        w->state = Waiter::kSignaled;\n      }\n      // Avoid notifying if it wasn't waiting.\n      if (state == Waiter::kWaiting) w->cv.notify_one();\n    }\n  }\n\n  EventCount(const EventCount&) = delete;\n  void operator=(const EventCount&) = delete;\n};\n\n}  // namespace Eigen\n\n#endif  // EIGEN_CXX11_THREADPOOL_EVENTCOUNT_H_\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/ThreadPool/NonBlockingThreadPool.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Dmitry Vyukov <dvyukov@google.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_THREADPOOL_NONBLOCKING_THREAD_POOL_H\n#define EIGEN_CXX11_THREADPOOL_NONBLOCKING_THREAD_POOL_H\n\nnamespace Eigen {\n\ntemplate <typename Environment>\nclass ThreadPoolTempl : public Eigen::ThreadPoolInterface {\n public:\n  typedef typename Environment::Task Task;\n  typedef RunQueue<Task, 1024> Queue;\n\n  ThreadPoolTempl(int num_threads, Environment env = Environment())\n      : ThreadPoolTempl(num_threads, true, env) {}\n\n  ThreadPoolTempl(int num_threads, bool allow_spinning,\n                  Environment env = Environment())\n      : env_(env),\n        num_threads_(num_threads),\n        allow_spinning_(allow_spinning),\n        thread_data_(num_threads),\n        all_coprimes_(num_threads),\n        waiters_(num_threads),\n        global_steal_partition_(EncodePartition(0, num_threads_)),\n        blocked_(0),\n        spinning_(0),\n        done_(false),\n        cancelled_(false),\n        ec_(waiters_) {\n    waiters_.resize(num_threads_);\n    // Calculate coprimes of all numbers [1, num_threads].\n    // Coprimes are used for random walks over all threads in Steal\n    // and NonEmptyQueueIndex. Iteration is based on the fact that if we take\n    // a random starting thread index t and calculate num_threads - 1 subsequent\n    // indices as (t + coprime) % num_threads, we will cover all threads without\n    // repetitions (effectively getting a presudo-random permutation of thread\n    // indices).\n    eigen_plain_assert(num_threads_ < kMaxThreads);\n    for (int i = 1; i <= num_threads_; ++i) {\n      all_coprimes_.emplace_back(i);\n      ComputeCoprimes(i, &all_coprimes_.back());\n    }\n#ifndef EIGEN_THREAD_LOCAL\n    init_barrier_.reset(new Barrier(num_threads_));\n#endif\n    thread_data_.resize(num_threads_);\n    for (int i = 0; i < num_threads_; i++) {\n      SetStealPartition(i, EncodePartition(0, num_threads_));\n      thread_data_[i].thread.reset(\n          env_.CreateThread([this, i]() { WorkerLoop(i); }));\n    }\n#ifndef EIGEN_THREAD_LOCAL\n    // Wait for workers to initialize per_thread_map_. Otherwise we might race\n    // with them in Schedule or CurrentThreadId.\n    init_barrier_->Wait();\n#endif\n  }\n\n  ~ThreadPoolTempl() {\n    done_ = true;\n\n    // Now if all threads block without work, they will start exiting.\n    // But note that threads can continue to work arbitrary long,\n    // block, submit new work, unblock and otherwise live full life.\n    if (!cancelled_) {\n      ec_.Notify(true);\n    } else {\n      // Since we were cancelled, there might be entries in the queues.\n      // Empty them to prevent their destructor from asserting.\n      for (size_t i = 0; i < thread_data_.size(); i++) {\n        thread_data_[i].queue.Flush();\n      }\n    }\n    // Join threads explicitly (by destroying) to avoid destruction order within\n    // this class.\n    for (size_t i = 0; i < thread_data_.size(); ++i)\n      thread_data_[i].thread.reset();\n  }\n\n  void SetStealPartitions(const std::vector<std::pair<unsigned, unsigned>>& partitions) {\n    eigen_plain_assert(partitions.size() == static_cast<std::size_t>(num_threads_));\n\n    // Pass this information to each thread queue.\n    for (int i = 0; i < num_threads_; i++) {\n      const auto& pair = partitions[i];\n      unsigned start = pair.first, end = pair.second;\n      AssertBounds(start, end);\n      unsigned val = EncodePartition(start, end);\n      SetStealPartition(i, val);\n    }\n  }\n\n  void Schedule(std::function<void()> fn) EIGEN_OVERRIDE {\n    ScheduleWithHint(std::move(fn), 0, num_threads_);\n  }\n\n  void ScheduleWithHint(std::function<void()> fn, int start,\n                        int limit) override {\n    Task t = env_.CreateTask(std::move(fn));\n    PerThread* pt = GetPerThread();\n    if (pt->pool == this) {\n      // Worker thread of this pool, push onto the thread's queue.\n      Queue& q = thread_data_[pt->thread_id].queue;\n      t = q.PushFront(std::move(t));\n    } else {\n      // A free-standing thread (or worker of another pool), push onto a random\n      // queue.\n      eigen_plain_assert(start < limit);\n      eigen_plain_assert(limit <= num_threads_);\n      int num_queues = limit - start;\n      int rnd = Rand(&pt->rand) % num_queues;\n      eigen_plain_assert(start + rnd < limit);\n      Queue& q = thread_data_[start + rnd].queue;\n      t = q.PushBack(std::move(t));\n    }\n    // Note: below we touch this after making w available to worker threads.\n    // Strictly speaking, this can lead to a racy-use-after-free. Consider that\n    // Schedule is called from a thread that is neither main thread nor a worker\n    // thread of this pool. Then, execution of w directly or indirectly\n    // completes overall computations, which in turn leads to destruction of\n    // this. We expect that such scenario is prevented by program, that is,\n    // this is kept alive while any threads can potentially be in Schedule.\n    if (!t.f) {\n      ec_.Notify(false);\n    } else {\n      env_.ExecuteTask(t);  // Push failed, execute directly.\n    }\n  }\n\n  void Cancel() EIGEN_OVERRIDE {\n    cancelled_ = true;\n    done_ = true;\n\n    // Let each thread know it's been cancelled.\n#ifdef EIGEN_THREAD_ENV_SUPPORTS_CANCELLATION\n    for (size_t i = 0; i < thread_data_.size(); i++) {\n      thread_data_[i].thread->OnCancel();\n    }\n#endif\n\n    // Wake up the threads without work to let them exit on their own.\n    ec_.Notify(true);\n  }\n\n  int NumThreads() const EIGEN_FINAL { return num_threads_; }\n\n  int CurrentThreadId() const EIGEN_FINAL {\n    const PerThread* pt = const_cast<ThreadPoolTempl*>(this)->GetPerThread();\n    if (pt->pool == this) {\n      return pt->thread_id;\n    } else {\n      return -1;\n    }\n  }\n\n private:\n  // Create a single atomic<int> that encodes start and limit information for\n  // each thread.\n  // We expect num_threads_ < 65536, so we can store them in a single\n  // std::atomic<unsigned>.\n  // Exposed publicly as static functions so that external callers can reuse\n  // this encode/decode logic for maintaining their own thread-safe copies of\n  // scheduling and steal domain(s).\n  static const int kMaxPartitionBits = 16;\n  static const int kMaxThreads = 1 << kMaxPartitionBits;\n\n  inline unsigned EncodePartition(unsigned start, unsigned limit) {\n    return (start << kMaxPartitionBits) | limit;\n  }\n\n  inline void DecodePartition(unsigned val, unsigned* start, unsigned* limit) {\n    *limit = val & (kMaxThreads - 1);\n    val >>= kMaxPartitionBits;\n    *start = val;\n  }\n\n  void AssertBounds(int start, int end) {\n    eigen_plain_assert(start >= 0);\n    eigen_plain_assert(start < end);  // non-zero sized partition\n    eigen_plain_assert(end <= num_threads_);\n  }\n\n  inline void SetStealPartition(size_t i, unsigned val) {\n    thread_data_[i].steal_partition.store(val, std::memory_order_relaxed);\n  }\n\n  inline unsigned GetStealPartition(int i) {\n    return thread_data_[i].steal_partition.load(std::memory_order_relaxed);\n  }\n\n  void ComputeCoprimes(int N, MaxSizeVector<unsigned>* coprimes) {\n    for (int i = 1; i <= N; i++) {\n      unsigned a = i;\n      unsigned b = N;\n      // If GCD(a, b) == 1, then a and b are coprimes.\n      while (b != 0) {\n        unsigned tmp = a;\n        a = b;\n        b = tmp % b;\n      }\n      if (a == 1) {\n        coprimes->push_back(i);\n      }\n    }\n  }\n\n  typedef typename Environment::EnvThread Thread;\n\n  struct PerThread {\n    constexpr PerThread() : pool(NULL), rand(0), thread_id(-1) {}\n    ThreadPoolTempl* pool;  // Parent pool, or null for normal threads.\n    uint64_t rand;          // Random generator state.\n    int thread_id;          // Worker thread index in pool.\n#ifndef EIGEN_THREAD_LOCAL\n    // Prevent false sharing.\n    char pad_[128];\n#endif\n  };\n\n  struct ThreadData {\n    constexpr ThreadData() : thread(), steal_partition(0), queue() {}\n    std::unique_ptr<Thread> thread;\n    std::atomic<unsigned> steal_partition;\n    Queue queue;\n  };\n\n  Environment env_;\n  const int num_threads_;\n  const bool allow_spinning_;\n  MaxSizeVector<ThreadData> thread_data_;\n  MaxSizeVector<MaxSizeVector<unsigned>> all_coprimes_;\n  MaxSizeVector<EventCount::Waiter> waiters_;\n  unsigned global_steal_partition_;\n  std::atomic<unsigned> blocked_;\n  std::atomic<bool> spinning_;\n  std::atomic<bool> done_;\n  std::atomic<bool> cancelled_;\n  EventCount ec_;\n#ifndef EIGEN_THREAD_LOCAL\n  std::unique_ptr<Barrier> init_barrier_;\n  std::mutex per_thread_map_mutex_;  // Protects per_thread_map_.\n  std::unordered_map<uint64_t, std::unique_ptr<PerThread>> per_thread_map_;\n#endif\n\n  // Main worker thread loop.\n  void WorkerLoop(int thread_id) {\n#ifndef EIGEN_THREAD_LOCAL\n    std::unique_ptr<PerThread> new_pt(new PerThread());\n    per_thread_map_mutex_.lock();\n    eigen_plain_assert(per_thread_map_.emplace(GlobalThreadIdHash(), std::move(new_pt)).second);\n    per_thread_map_mutex_.unlock();\n    init_barrier_->Notify();\n    init_barrier_->Wait();\n#endif\n    PerThread* pt = GetPerThread();\n    pt->pool = this;\n    pt->rand = GlobalThreadIdHash();\n    pt->thread_id = thread_id;\n    Queue& q = thread_data_[thread_id].queue;\n    EventCount::Waiter* waiter = &waiters_[thread_id];\n    // TODO(dvyukov,rmlarsen): The time spent in NonEmptyQueueIndex() is\n    // proportional to num_threads_ and we assume that new work is scheduled at\n    // a constant rate, so we set spin_count to 5000 / num_threads_. The\n    // constant was picked based on a fair dice roll, tune it.\n    const int spin_count =\n        allow_spinning_ && num_threads_ > 0 ? 5000 / num_threads_ : 0;\n    if (num_threads_ == 1) {\n      // For num_threads_ == 1 there is no point in going through the expensive\n      // steal loop. Moreover, since NonEmptyQueueIndex() calls PopBack() on the\n      // victim queues it might reverse the order in which ops are executed\n      // compared to the order in which they are scheduled, which tends to be\n      // counter-productive for the types of I/O workloads the single thread\n      // pools tend to be used for.\n      while (!cancelled_) {\n        Task t = q.PopFront();\n        for (int i = 0; i < spin_count && !t.f; i++) {\n          if (!cancelled_.load(std::memory_order_relaxed)) {\n            t = q.PopFront();\n          }\n        }\n        if (!t.f) {\n          if (!WaitForWork(waiter, &t)) {\n            return;\n          }\n        }\n        if (t.f) {\n          env_.ExecuteTask(t);\n        }\n      }\n    } else {\n      while (!cancelled_) {\n        Task t = q.PopFront();\n        if (!t.f) {\n          t = LocalSteal();\n          if (!t.f) {\n            t = GlobalSteal();\n            if (!t.f) {\n              // Leave one thread spinning. This reduces latency.\n              if (allow_spinning_ && !spinning_ && !spinning_.exchange(true)) {\n                for (int i = 0; i < spin_count && !t.f; i++) {\n                  if (!cancelled_.load(std::memory_order_relaxed)) {\n                    t = GlobalSteal();\n                  } else {\n                    return;\n                  }\n                }\n                spinning_ = false;\n              }\n              if (!t.f) {\n                if (!WaitForWork(waiter, &t)) {\n                  return;\n                }\n              }\n            }\n          }\n        }\n        if (t.f) {\n          env_.ExecuteTask(t);\n        }\n      }\n    }\n  }\n\n  // Steal tries to steal work from other worker threads in the range [start,\n  // limit) in best-effort manner.\n  Task Steal(unsigned start, unsigned limit) {\n    PerThread* pt = GetPerThread();\n    const size_t size = limit - start;\n    unsigned r = Rand(&pt->rand);\n    // Reduce r into [0, size) range, this utilizes trick from\n    // https://lemire.me/blog/2016/06/27/a-fast-alternative-to-the-modulo-reduction/\n    eigen_plain_assert(all_coprimes_[size - 1].size() < (1<<30));\n    unsigned victim = ((uint64_t)r * (uint64_t)size) >> 32;\n    unsigned index = ((uint64_t) all_coprimes_[size - 1].size() * (uint64_t)r) >> 32;\n    unsigned inc = all_coprimes_[size - 1][index];\n\n    for (unsigned i = 0; i < size; i++) {\n      eigen_plain_assert(start + victim < limit);\n      Task t = thread_data_[start + victim].queue.PopBack();\n      if (t.f) {\n        return t;\n      }\n      victim += inc;\n      if (victim >= size) {\n        victim -= size;\n      }\n    }\n    return Task();\n  }\n\n  // Steals work within threads belonging to the partition.\n  Task LocalSteal() {\n    PerThread* pt = GetPerThread();\n    unsigned partition = GetStealPartition(pt->thread_id);\n    // If thread steal partition is the same as global partition, there is no\n    // need to go through the steal loop twice.\n    if (global_steal_partition_ == partition) return Task();\n    unsigned start, limit;\n    DecodePartition(partition, &start, &limit);\n    AssertBounds(start, limit);\n\n    return Steal(start, limit);\n  }\n\n  // Steals work from any other thread in the pool.\n  Task GlobalSteal() {\n    return Steal(0, num_threads_);\n  }\n\n\n  // WaitForWork blocks until new work is available (returns true), or if it is\n  // time to exit (returns false). Can optionally return a task to execute in t\n  // (in such case t.f != nullptr on return).\n  bool WaitForWork(EventCount::Waiter* waiter, Task* t) {\n    eigen_plain_assert(!t->f);\n    // We already did best-effort emptiness check in Steal, so prepare for\n    // blocking.\n    ec_.Prewait();\n    // Now do a reliable emptiness check.\n    int victim = NonEmptyQueueIndex();\n    if (victim != -1) {\n      ec_.CancelWait();\n      if (cancelled_) {\n        return false;\n      } else {\n        *t = thread_data_[victim].queue.PopBack();\n        return true;\n      }\n    }\n    // Number of blocked threads is used as termination condition.\n    // If we are shutting down and all worker threads blocked without work,\n    // that's we are done.\n    blocked_++;\n    // TODO is blocked_ required to be unsigned?\n    if (done_ && blocked_ == static_cast<unsigned>(num_threads_)) {\n      ec_.CancelWait();\n      // Almost done, but need to re-check queues.\n      // Consider that all queues are empty and all worker threads are preempted\n      // right after incrementing blocked_ above. Now a free-standing thread\n      // submits work and calls destructor (which sets done_). If we don't\n      // re-check queues, we will exit leaving the work unexecuted.\n      if (NonEmptyQueueIndex() != -1) {\n        // Note: we must not pop from queues before we decrement blocked_,\n        // otherwise the following scenario is possible. Consider that instead\n        // of checking for emptiness we popped the only element from queues.\n        // Now other worker threads can start exiting, which is bad if the\n        // work item submits other work. So we just check emptiness here,\n        // which ensures that all worker threads exit at the same time.\n        blocked_--;\n        return true;\n      }\n      // Reached stable termination state.\n      ec_.Notify(true);\n      return false;\n    }\n    ec_.CommitWait(waiter);\n    blocked_--;\n    return true;\n  }\n\n  int NonEmptyQueueIndex() {\n    PerThread* pt = GetPerThread();\n    // We intentionally design NonEmptyQueueIndex to steal work from\n    // anywhere in the queue so threads don't block in WaitForWork() forever\n    // when all threads in their partition go to sleep. Steal is still local.\n    const size_t size = thread_data_.size();\n    unsigned r = Rand(&pt->rand);\n    unsigned inc = all_coprimes_[size - 1][r % all_coprimes_[size - 1].size()];\n    unsigned victim = r % size;\n    for (unsigned i = 0; i < size; i++) {\n      if (!thread_data_[victim].queue.Empty()) {\n        return victim;\n      }\n      victim += inc;\n      if (victim >= size) {\n        victim -= size;\n      }\n    }\n    return -1;\n  }\n\n  static EIGEN_STRONG_INLINE uint64_t GlobalThreadIdHash() {\n    return std::hash<std::thread::id>()(std::this_thread::get_id());\n  }\n\n  EIGEN_STRONG_INLINE PerThread* GetPerThread() {\n#ifndef EIGEN_THREAD_LOCAL\n    static PerThread dummy;\n    auto it = per_thread_map_.find(GlobalThreadIdHash());\n    if (it == per_thread_map_.end()) {\n      return &dummy;\n    } else {\n      return it->second.get();\n    }\n#else\n    EIGEN_THREAD_LOCAL PerThread per_thread_;\n    PerThread* pt = &per_thread_;\n    return pt;\n#endif\n  }\n\n  static EIGEN_STRONG_INLINE unsigned Rand(uint64_t* state) {\n    uint64_t current = *state;\n    // Update the internal state\n    *state = current * 6364136223846793005ULL + 0xda3e39cb94b95bdbULL;\n    // Generate the random output (using the PCG-XSH-RS scheme)\n    return static_cast<unsigned>((current ^ (current >> 22)) >>\n                                 (22 + (current >> 61)));\n  }\n};\n\ntypedef ThreadPoolTempl<StlThreadEnvironment> ThreadPool;\n\n}  // namespace Eigen\n\n#endif  // EIGEN_CXX11_THREADPOOL_NONBLOCKING_THREAD_POOL_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/ThreadPool/RunQueue.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Dmitry Vyukov <dvyukov@google.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_THREADPOOL_RUNQUEUE_H_\n#define EIGEN_CXX11_THREADPOOL_RUNQUEUE_H_\n\nnamespace Eigen {\n\n// RunQueue is a fixed-size, partially non-blocking deque or Work items.\n// Operations on front of the queue must be done by a single thread (owner),\n// operations on back of the queue can be done by multiple threads concurrently.\n//\n// Algorithm outline:\n// All remote threads operating on the queue back are serialized by a mutex.\n// This ensures that at most two threads access state: owner and one remote\n// thread (Size aside). The algorithm ensures that the occupied region of the\n// underlying array is logically continuous (can wraparound, but no stray\n// occupied elements). Owner operates on one end of this region, remote thread\n// operates on the other end. Synchronization between these threads\n// (potential consumption of the last element and take up of the last empty\n// element) happens by means of state variable in each element. States are:\n// empty, busy (in process of insertion of removal) and ready. Threads claim\n// elements (empty->busy and ready->busy transitions) by means of a CAS\n// operation. The finishing transition (busy->empty and busy->ready) are done\n// with plain store as the element is exclusively owned by the current thread.\n//\n// Note: we could permit only pointers as elements, then we would not need\n// separate state variable as null/non-null pointer value would serve as state,\n// but that would require malloc/free per operation for large, complex values\n// (and this is designed to store std::function<()>).\ntemplate <typename Work, unsigned kSize>\nclass RunQueue {\n public:\n  RunQueue() : front_(0), back_(0) {\n    // require power-of-two for fast masking\n    eigen_plain_assert((kSize & (kSize - 1)) == 0);\n    eigen_plain_assert(kSize > 2);            // why would you do this?\n    eigen_plain_assert(kSize <= (64 << 10));  // leave enough space for counter\n    for (unsigned i = 0; i < kSize; i++)\n      array_[i].state.store(kEmpty, std::memory_order_relaxed);\n  }\n\n  ~RunQueue() { eigen_plain_assert(Size() == 0); }\n\n  // PushFront inserts w at the beginning of the queue.\n  // If queue is full returns w, otherwise returns default-constructed Work.\n  Work PushFront(Work w) {\n    unsigned front = front_.load(std::memory_order_relaxed);\n    Elem* e = &array_[front & kMask];\n    uint8_t s = e->state.load(std::memory_order_relaxed);\n    if (s != kEmpty ||\n        !e->state.compare_exchange_strong(s, kBusy, std::memory_order_acquire))\n      return w;\n    front_.store(front + 1 + (kSize << 1), std::memory_order_relaxed);\n    e->w = std::move(w);\n    e->state.store(kReady, std::memory_order_release);\n    return Work();\n  }\n\n  // PopFront removes and returns the first element in the queue.\n  // If the queue was empty returns default-constructed Work.\n  Work PopFront() {\n    unsigned front = front_.load(std::memory_order_relaxed);\n    Elem* e = &array_[(front - 1) & kMask];\n    uint8_t s = e->state.load(std::memory_order_relaxed);\n    if (s != kReady ||\n        !e->state.compare_exchange_strong(s, kBusy, std::memory_order_acquire))\n      return Work();\n    Work w = std::move(e->w);\n    e->state.store(kEmpty, std::memory_order_release);\n    front = ((front - 1) & kMask2) | (front & ~kMask2);\n    front_.store(front, std::memory_order_relaxed);\n    return w;\n  }\n\n  // PushBack adds w at the end of the queue.\n  // If queue is full returns w, otherwise returns default-constructed Work.\n  Work PushBack(Work w) {\n    std::unique_lock<std::mutex> lock(mutex_);\n    unsigned back = back_.load(std::memory_order_relaxed);\n    Elem* e = &array_[(back - 1) & kMask];\n    uint8_t s = e->state.load(std::memory_order_relaxed);\n    if (s != kEmpty ||\n        !e->state.compare_exchange_strong(s, kBusy, std::memory_order_acquire))\n      return w;\n    back = ((back - 1) & kMask2) | (back & ~kMask2);\n    back_.store(back, std::memory_order_relaxed);\n    e->w = std::move(w);\n    e->state.store(kReady, std::memory_order_release);\n    return Work();\n  }\n\n  // PopBack removes and returns the last elements in the queue.\n  Work PopBack() {\n    if (Empty()) return Work();\n    std::unique_lock<std::mutex> lock(mutex_);\n    unsigned back = back_.load(std::memory_order_relaxed);\n    Elem* e = &array_[back & kMask];\n    uint8_t s = e->state.load(std::memory_order_relaxed);\n    if (s != kReady ||\n        !e->state.compare_exchange_strong(s, kBusy, std::memory_order_acquire))\n      return Work();\n    Work w = std::move(e->w);\n    e->state.store(kEmpty, std::memory_order_release);\n    back_.store(back + 1 + (kSize << 1), std::memory_order_relaxed);\n    return w;\n  }\n\n  // PopBackHalf removes and returns half last elements in the queue.\n  // Returns number of elements removed.\n  unsigned PopBackHalf(std::vector<Work>* result) {\n    if (Empty()) return 0;\n    std::unique_lock<std::mutex> lock(mutex_);\n    unsigned back = back_.load(std::memory_order_relaxed);\n    unsigned size = Size();\n    unsigned mid = back;\n    if (size > 1) mid = back + (size - 1) / 2;\n    unsigned n = 0;\n    unsigned start = 0;\n    for (; static_cast<int>(mid - back) >= 0; mid--) {\n      Elem* e = &array_[mid & kMask];\n      uint8_t s = e->state.load(std::memory_order_relaxed);\n      if (n == 0) {\n        if (s != kReady || !e->state.compare_exchange_strong(\n                               s, kBusy, std::memory_order_acquire))\n          continue;\n        start = mid;\n      } else {\n        // Note: no need to store temporal kBusy, we exclusively own these\n        // elements.\n        eigen_plain_assert(s == kReady);\n      }\n      result->push_back(std::move(e->w));\n      e->state.store(kEmpty, std::memory_order_release);\n      n++;\n    }\n    if (n != 0)\n      back_.store(start + 1 + (kSize << 1), std::memory_order_relaxed);\n    return n;\n  }\n\n  // Size returns current queue size.\n  // Can be called by any thread at any time.\n  unsigned Size() const { return SizeOrNotEmpty<true>(); }\n\n  // Empty tests whether container is empty.\n  // Can be called by any thread at any time.\n  bool Empty() const { return SizeOrNotEmpty<false>() == 0; }\n\n  // Delete all the elements from the queue.\n  void Flush() {\n    while (!Empty()) {\n      PopFront();\n    }\n  }\n\n private:\n  static const unsigned kMask = kSize - 1;\n  static const unsigned kMask2 = (kSize << 1) - 1;\n  struct Elem {\n    std::atomic<uint8_t> state;\n    Work w;\n  };\n  enum {\n    kEmpty,\n    kBusy,\n    kReady,\n  };\n  std::mutex mutex_;\n  // Low log(kSize) + 1 bits in front_ and back_ contain rolling index of\n  // front/back, respectively. The remaining bits contain modification counters\n  // that are incremented on Push operations. This allows us to (1) distinguish\n  // between empty and full conditions (if we would use log(kSize) bits for\n  // position, these conditions would be indistinguishable); (2) obtain\n  // consistent snapshot of front_/back_ for Size operation using the\n  // modification counters.\n  std::atomic<unsigned> front_;\n  std::atomic<unsigned> back_;\n  Elem array_[kSize];\n\n  // SizeOrNotEmpty returns current queue size; if NeedSizeEstimate is false,\n  // only whether the size is 0 is guaranteed to be correct.\n  // Can be called by any thread at any time.\n  template<bool NeedSizeEstimate>\n  unsigned SizeOrNotEmpty() const {\n    // Emptiness plays critical role in thread pool blocking. So we go to great\n    // effort to not produce false positives (claim non-empty queue as empty).\n    unsigned front = front_.load(std::memory_order_acquire);\n    for (;;) {\n      // Capture a consistent snapshot of front/tail.\n      unsigned back = back_.load(std::memory_order_acquire);\n      unsigned front1 = front_.load(std::memory_order_relaxed);\n      if (front != front1) {\n        front = front1;\n        std::atomic_thread_fence(std::memory_order_acquire);\n        continue;\n      }\n      if (NeedSizeEstimate) {\n        return CalculateSize(front, back);\n      } else {\n        // This value will be 0 if the queue is empty, and undefined otherwise.\n        unsigned maybe_zero = ((front ^ back) & kMask2);\n        // Queue size estimate must agree with maybe zero check on the queue\n        // empty/non-empty state.\n        eigen_assert((CalculateSize(front, back) == 0) == (maybe_zero == 0));\n        return maybe_zero;\n      }\n    }\n  }\n\n  EIGEN_ALWAYS_INLINE\n  unsigned CalculateSize(unsigned front, unsigned back) const {\n    int size = (front & kMask2) - (back & kMask2);\n    // Fix overflow.\n    if (size < 0) size += 2 * kSize;\n    // Order of modification in push/pop is crafted to make the queue look\n    // larger than it is during concurrent modifications. E.g. push can\n    // increment size before the corresponding pop has decremented it.\n    // So the computed size can be up to kSize + 1, fix it.\n    if (size > static_cast<int>(kSize)) size = kSize;\n    return static_cast<unsigned>(size);\n  }\n\n  RunQueue(const RunQueue&) = delete;\n  void operator=(const RunQueue&) = delete;\n};\n\n}  // namespace Eigen\n\n#endif  // EIGEN_CXX11_THREADPOOL_RUNQUEUE_H_\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/ThreadPool/ThreadCancel.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_THREADPOOL_THREAD_CANCEL_H\n#define EIGEN_CXX11_THREADPOOL_THREAD_CANCEL_H\n\n// Try to come up with a portable way to cancel a thread\n#if EIGEN_OS_GNULINUX\n  #define EIGEN_THREAD_CANCEL(t)                  \\\n    pthread_cancel(t.native_handle());\n  #define EIGEN_SUPPORTS_THREAD_CANCELLATION 1\n#else\n#define EIGEN_THREAD_CANCEL(t)\n#endif\n\n\n#endif  // EIGEN_CXX11_THREADPOOL_THREAD_CANCEL_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/ThreadPool/ThreadEnvironment.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_THREADPOOL_THREAD_ENVIRONMENT_H\n#define EIGEN_CXX11_THREADPOOL_THREAD_ENVIRONMENT_H\n\nnamespace Eigen {\n\nstruct StlThreadEnvironment {\n  struct Task {\n    std::function<void()> f;\n  };\n\n  // EnvThread constructor must start the thread,\n  // destructor must join the thread.\n  class EnvThread {\n   public:\n    EnvThread(std::function<void()> f) : thr_(std::move(f)) {}\n    ~EnvThread() { thr_.join(); }\n    // This function is called when the threadpool is cancelled.\n    void OnCancel() { }\n\n   private:\n    std::thread thr_;\n  };\n\n  EnvThread* CreateThread(std::function<void()> f) { return new EnvThread(std::move(f)); }\n  Task CreateTask(std::function<void()> f) { return Task{std::move(f)}; }\n  void ExecuteTask(const Task& t) { t.f(); }\n};\n\n}  // namespace Eigen\n\n#endif  // EIGEN_CXX11_THREADPOOL_THREAD_ENVIRONMENT_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/ThreadPool/ThreadLocal.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_THREADPOOL_THREAD_LOCAL_H\n#define EIGEN_CXX11_THREADPOOL_THREAD_LOCAL_H\n\n#ifdef EIGEN_AVOID_THREAD_LOCAL\n\n#ifdef EIGEN_THREAD_LOCAL\n#undef EIGEN_THREAD_LOCAL\n#endif\n\n#else\n\n#if EIGEN_MAX_CPP_VER >= 11 &&                         \\\n    ((EIGEN_COMP_GNUC && EIGEN_GNUC_AT_LEAST(4, 8)) || \\\n     __has_feature(cxx_thread_local)                || \\\n     (EIGEN_COMP_MSVC >= 1900) )\n#define EIGEN_THREAD_LOCAL static thread_local\n#endif\n\n// Disable TLS for Apple and Android builds with older toolchains.\n#if defined(__APPLE__)\n// Included for TARGET_OS_IPHONE, __IPHONE_OS_VERSION_MIN_REQUIRED,\n// __IPHONE_8_0.\n#include <Availability.h>\n#include <TargetConditionals.h>\n#endif\n// Checks whether C++11's `thread_local` storage duration specifier is\n// supported.\n#if defined(__apple_build_version__) &&     \\\n    ((__apple_build_version__ < 8000042) || \\\n     (TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_9_0))\n// Notes: Xcode's clang did not support `thread_local` until version\n// 8, and even then not for all iOS < 9.0.\n#undef EIGEN_THREAD_LOCAL\n\n#elif defined(__ANDROID__) && EIGEN_COMP_CLANG\n// There are platforms for which TLS should not be used even though the compiler\n// makes it seem like it's supported (Android NDK < r12b for example).\n// This is primarily because of linker problems and toolchain misconfiguration:\n// TLS isn't supported until NDK r12b per\n// https://developer.android.com/ndk/downloads/revision_history.html\n// Since NDK r16, `__NDK_MAJOR__` and `__NDK_MINOR__` are defined in\n// <android/ndk-version.h>. For NDK < r16, users should define these macros,\n// e.g. `-D__NDK_MAJOR__=11 -D__NKD_MINOR__=0` for NDK r11.\n#if __has_include(<android/ndk-version.h>)\n#include <android/ndk-version.h>\n#endif  // __has_include(<android/ndk-version.h>)\n#if defined(__ANDROID__) && defined(__clang__) && defined(__NDK_MAJOR__) && \\\n    defined(__NDK_MINOR__) &&                                               \\\n    ((__NDK_MAJOR__ < 12) || ((__NDK_MAJOR__ == 12) && (__NDK_MINOR__ < 1)))\n#undef EIGEN_THREAD_LOCAL\n#endif\n#endif  // defined(__ANDROID__) && defined(__clang__)\n\n#endif  // EIGEN_AVOID_THREAD_LOCAL\n\nnamespace Eigen {\n\nnamespace internal {\ntemplate <typename T>\nstruct ThreadLocalNoOpInitialize {\n  void operator()(T&) const {}\n};\n\ntemplate <typename T>\nstruct ThreadLocalNoOpRelease {\n  void operator()(T&) const {}\n};\n\n}  // namespace internal\n\n// Thread local container for elements of type T, that does not use thread local\n// storage. As long as the number of unique threads accessing this storage\n// is smaller than `capacity_`, it is lock-free and wait-free. Otherwise it will\n// use a mutex for synchronization.\n//\n// Type `T` has to be default constructible, and by default each thread will get\n// a default constructed value. It is possible to specify custom `initialize`\n// callable, that will be called lazily from each thread accessing this object,\n// and will be passed a default initialized object of type `T`. Also it's\n// possible to pass a custom `release` callable, that will be invoked before\n// calling ~T().\n//\n// Example:\n//\n//   struct Counter {\n//     int value = 0;\n//   }\n//\n//   Eigen::ThreadLocal<Counter> counter(10);\n//\n//   // Each thread will have access to it's own counter object.\n//   Counter& cnt = counter.local();\n//   cnt++;\n//\n// WARNING: Eigen::ThreadLocal uses the OS-specific value returned by\n// std::this_thread::get_id() to identify threads. This value is not guaranteed\n// to be unique except for the life of the thread. A newly created thread may\n// get an OS-specific ID equal to that of an already destroyed thread.\n//\n// Somewhat similar to TBB thread local storage, with similar restrictions:\n// https://www.threadingbuildingblocks.org/docs/help/reference/thread_local_storage/enumerable_thread_specific_cls.html\n//\ntemplate <typename T,\n          typename Initialize = internal::ThreadLocalNoOpInitialize<T>,\n          typename Release = internal::ThreadLocalNoOpRelease<T>>\nclass ThreadLocal {\n  // We preallocate default constructed elements in MaxSizedVector.\n  static_assert(std::is_default_constructible<T>::value,\n                \"ThreadLocal data type must be default constructible\");\n\n public:\n  explicit ThreadLocal(int capacity)\n      : ThreadLocal(capacity, internal::ThreadLocalNoOpInitialize<T>(),\n                    internal::ThreadLocalNoOpRelease<T>()) {}\n\n  ThreadLocal(int capacity, Initialize initialize)\n      : ThreadLocal(capacity, std::move(initialize),\n                    internal::ThreadLocalNoOpRelease<T>()) {}\n\n  ThreadLocal(int capacity, Initialize initialize, Release release)\n      : initialize_(std::move(initialize)),\n        release_(std::move(release)),\n        capacity_(capacity),\n        data_(capacity_),\n        ptr_(capacity_),\n        filled_records_(0) {\n    eigen_assert(capacity_ >= 0);\n    data_.resize(capacity_);\n    for (int i = 0; i < capacity_; ++i) {\n      ptr_.emplace_back(nullptr);\n    }\n  }\n\n  T& local() {\n    std::thread::id this_thread = std::this_thread::get_id();\n    if (capacity_ == 0) return SpilledLocal(this_thread);\n\n    std::size_t h = std::hash<std::thread::id>()(this_thread);\n    const int start_idx = h % capacity_;\n\n    // NOTE: From the definition of `std::this_thread::get_id()` it is\n    // guaranteed that we never can have concurrent insertions with the same key\n    // to our hash-map like data structure. If we didn't find an element during\n    // the initial traversal, it's guaranteed that no one else could have\n    // inserted it while we are in this function. This allows to massively\n    // simplify out lock-free insert-only hash map.\n\n    // Check if we already have an element for `this_thread`.\n    int idx = start_idx;\n    while (ptr_[idx].load() != nullptr) {\n      ThreadIdAndValue& record = *(ptr_[idx].load());\n      if (record.thread_id == this_thread) return record.value;\n\n      idx += 1;\n      if (idx >= capacity_) idx -= capacity_;\n      if (idx == start_idx) break;\n    }\n\n    // If we are here, it means that we found an insertion point in lookup\n    // table at `idx`, or we did a full traversal and table is full.\n\n    // If lock-free storage is full, fallback on mutex.\n    if (filled_records_.load() >= capacity_) return SpilledLocal(this_thread);\n\n    // We double check that we still have space to insert an element into a lock\n    // free storage. If old value in `filled_records_` is larger than the\n    // records capacity, it means that some other thread added an element while\n    // we were traversing lookup table.\n    int insertion_index =\n        filled_records_.fetch_add(1, std::memory_order_relaxed);\n    if (insertion_index >= capacity_) return SpilledLocal(this_thread);\n\n    // At this point it's guaranteed that we can access to\n    // data_[insertion_index_] without a data race.\n    data_[insertion_index].thread_id = this_thread;\n    initialize_(data_[insertion_index].value);\n\n    // That's the pointer we'll put into the lookup table.\n    ThreadIdAndValue* inserted = &data_[insertion_index];\n\n    // We'll use nullptr pointer to ThreadIdAndValue in a compare-and-swap loop.\n    ThreadIdAndValue* empty = nullptr;\n\n    // Now we have to find an insertion point into the lookup table. We start\n    // from the `idx` that was identified as an insertion point above, it's\n    // guaranteed that we will have an empty record somewhere in a lookup table\n    // (because we created a record in the `data_`).\n    const int insertion_idx = idx;\n\n    do {\n      // Always start search from the original insertion candidate.\n      idx = insertion_idx;\n      while (ptr_[idx].load() != nullptr) {\n        idx += 1;\n        if (idx >= capacity_) idx -= capacity_;\n        // If we did a full loop, it means that we don't have any free entries\n        // in the lookup table, and this means that something is terribly wrong.\n        eigen_assert(idx != insertion_idx);\n      }\n      // Atomic CAS of the pointer guarantees that any other thread, that will\n      // follow this pointer will see all the mutations in the `data_`.\n    } while (!ptr_[idx].compare_exchange_weak(empty, inserted));\n\n    return inserted->value;\n  }\n\n  // WARN: It's not thread safe to call it concurrently with `local()`.\n  void ForEach(std::function<void(std::thread::id, T&)> f) {\n    // Reading directly from `data_` is unsafe, because only CAS to the\n    // record in `ptr_` makes all changes visible to other threads.\n    for (auto& ptr : ptr_) {\n      ThreadIdAndValue* record = ptr.load();\n      if (record == nullptr) continue;\n      f(record->thread_id, record->value);\n    }\n\n    // We did not spill into the map based storage.\n    if (filled_records_.load(std::memory_order_relaxed) < capacity_) return;\n\n    // Adds a happens before edge from the last call to SpilledLocal().\n    std::unique_lock<std::mutex> lock(mu_);\n    for (auto& kv : per_thread_map_) {\n      f(kv.first, kv.second);\n    }\n  }\n\n  // WARN: It's not thread safe to call it concurrently with `local()`.\n  ~ThreadLocal() {\n    // Reading directly from `data_` is unsafe, because only CAS to the record\n    // in `ptr_` makes all changes visible to other threads.\n    for (auto& ptr : ptr_) {\n      ThreadIdAndValue* record = ptr.load();\n      if (record == nullptr) continue;\n      release_(record->value);\n    }\n\n    // We did not spill into the map based storage.\n    if (filled_records_.load(std::memory_order_relaxed) < capacity_) return;\n\n    // Adds a happens before edge from the last call to SpilledLocal().\n    std::unique_lock<std::mutex> lock(mu_);\n    for (auto& kv : per_thread_map_) {\n      release_(kv.second);\n    }\n  }\n\n private:\n  struct ThreadIdAndValue {\n    std::thread::id thread_id;\n    T value;\n  };\n\n  // Use unordered map guarded by a mutex when lock free storage is full.\n  T& SpilledLocal(std::thread::id this_thread) {\n    std::unique_lock<std::mutex> lock(mu_);\n\n    auto it = per_thread_map_.find(this_thread);\n    if (it == per_thread_map_.end()) {\n      auto result = per_thread_map_.emplace(this_thread, T());\n      eigen_assert(result.second);\n      initialize_((*result.first).second);\n      return (*result.first).second;\n    } else {\n      return it->second;\n    }\n  }\n\n  Initialize initialize_;\n  Release release_;\n  const int capacity_;\n\n  // Storage that backs lock-free lookup table `ptr_`. Records stored in this\n  // storage contiguously starting from index 0.\n  MaxSizeVector<ThreadIdAndValue> data_;\n\n  // Atomic pointers to the data stored in `data_`. Used as a lookup table for\n  // linear probing hash map (https://en.wikipedia.org/wiki/Linear_probing).\n  MaxSizeVector<std::atomic<ThreadIdAndValue*>> ptr_;\n\n  // Number of records stored in the `data_`.\n  std::atomic<int> filled_records_;\n\n  // We fallback on per thread map if lock-free storage is full. In practice\n  // this should never happen, if `capacity_` is a reasonable estimate of the\n  // number of threads running in a system.\n  std::mutex mu_;  // Protects per_thread_map_.\n  std::unordered_map<std::thread::id, T> per_thread_map_;\n};\n\n}  // namespace Eigen\n\n#endif  // EIGEN_CXX11_THREADPOOL_THREAD_LOCAL_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/ThreadPool/ThreadPoolInterface.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_THREADPOOL_THREAD_POOL_INTERFACE_H\n#define EIGEN_CXX11_THREADPOOL_THREAD_POOL_INTERFACE_H\n\nnamespace Eigen {\n\n// This defines an interface that ThreadPoolDevice can take to use\n// custom thread pools underneath.\nclass ThreadPoolInterface {\n public:\n  // Submits a closure to be run by a thread in the pool.\n  virtual void Schedule(std::function<void()> fn) = 0;\n\n  // Submits a closure to be run by threads in the range [start, end) in the\n  // pool.\n  virtual void ScheduleWithHint(std::function<void()> fn, int /*start*/,\n                                int /*end*/) {\n    // Just defer to Schedule in case sub-classes aren't interested in\n    // overriding this functionality.\n    Schedule(fn);\n  }\n\n  // If implemented, stop processing the closures that have been enqueued.\n  // Currently running closures may still be processed.\n  // If not implemented, does nothing.\n  virtual void Cancel() {}\n\n  // Returns the number of threads in the pool.\n  virtual int NumThreads() const = 0;\n\n  // Returns a logical thread index between 0 and NumThreads() - 1 if called\n  // from one of the threads in the pool. Returns -1 otherwise.\n  virtual int CurrentThreadId() const = 0;\n\n  virtual ~ThreadPoolInterface() {}\n};\n\n}  // namespace Eigen\n\n#endif  // EIGEN_CXX11_THREADPOOL_THREAD_POOL_INTERFACE_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/ThreadPool/ThreadYield.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11_THREADPOOL_THREAD_YIELD_H\n#define EIGEN_CXX11_THREADPOOL_THREAD_YIELD_H\n\n// Try to come up with a portable way to yield\n#if EIGEN_COMP_GNUC && EIGEN_GNUC_AT_MOST(4, 7)\n#define EIGEN_THREAD_YIELD() sched_yield()\n#else\n#define EIGEN_THREAD_YIELD() std::this_thread::yield()\n#endif\n\n#endif  // EIGEN_CXX11_THREADPOOL_THREAD_YIELD_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/util/CXX11Meta.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2013 Christian Seiler <christian@iwakd.de>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11META_H\n#define EIGEN_CXX11META_H\n\n#include <vector>\n#include \"EmulateArray.h\"\n\n#include \"CXX11Workarounds.h\"\n\nnamespace Eigen {\n\nnamespace internal {\n\n/** \\internal\n  * \\file CXX11/util/CXX11Meta.h\n  * This file contains generic metaprogramming classes which are not specifically related to Eigen.\n  * This file expands upon Core/util/Meta.h and adds support for C++11 specific features.\n  */\n\ntemplate<typename... tt>\nstruct type_list { constexpr static int count = sizeof...(tt); };\n\ntemplate<typename t, typename... tt>\nstruct type_list<t, tt...> { constexpr static int count = sizeof...(tt) + 1; typedef t first_type; };\n\ntemplate<typename T, T... nn>\nstruct numeric_list { constexpr static std::size_t count = sizeof...(nn); };\n\ntemplate<typename T, T n, T... nn>\nstruct numeric_list<T, n, nn...> { static const std::size_t count = sizeof...(nn) + 1; const static T first_value = n; };\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\n/* numeric list constructors\n *\n * equivalencies:\n *     constructor                                              result\n *     typename gen_numeric_list<int, 5>::type                  numeric_list<int, 0,1,2,3,4>\n *     typename gen_numeric_list_reversed<int, 5>::type         numeric_list<int, 4,3,2,1,0>\n *     typename gen_numeric_list_swapped_pair<int, 5,1,2>::type numeric_list<int, 0,2,1,3,4>\n *     typename gen_numeric_list_repeated<int, 0, 5>::type      numeric_list<int, 0,0,0,0,0>\n */\n\ntemplate<typename T, std::size_t n, T start = 0, T... ii> struct gen_numeric_list                     : gen_numeric_list<T, n-1, start, start + n-1, ii...> {};\ntemplate<typename T, T start, T... ii>                    struct gen_numeric_list<T, 0, start, ii...> { typedef numeric_list<T, ii...> type; };\n\ntemplate<typename T, std::size_t n, T start = 0, T... ii> struct gen_numeric_list_reversed                     : gen_numeric_list_reversed<T, n-1, start, ii..., start + n-1> {};\ntemplate<typename T, T start, T... ii>                    struct gen_numeric_list_reversed<T, 0, start, ii...> { typedef numeric_list<T, ii...> type; };\n\ntemplate<typename T, std::size_t n, T a, T b, T start = 0, T... ii> struct gen_numeric_list_swapped_pair                           : gen_numeric_list_swapped_pair<T, n-1, a, b, start, (start + n-1) == a ? b : ((start + n-1) == b ? a : (start + n-1)), ii...> {};\ntemplate<typename T, T a, T b, T start, T... ii>                    struct gen_numeric_list_swapped_pair<T, 0, a, b, start, ii...> { typedef numeric_list<T, ii...> type; };\n\ntemplate<typename T, std::size_t n, T V, T... nn> struct gen_numeric_list_repeated                 : gen_numeric_list_repeated<T, n-1, V, V, nn...> {};\ntemplate<typename T, T V, T... nn>                struct gen_numeric_list_repeated<T, 0, V, nn...> { typedef numeric_list<T, nn...> type; };\n\n/* list manipulation: concatenate */\n\ntemplate<class a, class b> struct concat;\n\ntemplate<typename... as, typename... bs> struct concat<type_list<as...>,       type_list<bs...>>        { typedef type_list<as..., bs...> type; };\ntemplate<typename T, T... as, T... bs>   struct concat<numeric_list<T, as...>, numeric_list<T, bs...> > { typedef numeric_list<T, as..., bs...> type; };\n\ntemplate<typename... p> struct mconcat;\ntemplate<typename a>                             struct mconcat<a>           { typedef a type; };\ntemplate<typename a, typename b>                 struct mconcat<a, b>        : concat<a, b> {};\ntemplate<typename a, typename b, typename... cs> struct mconcat<a, b, cs...> : concat<a, typename mconcat<b, cs...>::type> {};\n\n/* list manipulation: extract slices */\n\ntemplate<int n, typename x> struct take;\ntemplate<int n, typename a, typename... as> struct take<n, type_list<a, as...>> : concat<type_list<a>, typename take<n-1, type_list<as...>>::type> {};\ntemplate<int n>                             struct take<n, type_list<>>         { typedef type_list<> type; };\ntemplate<typename a, typename... as>        struct take<0, type_list<a, as...>> { typedef type_list<> type; };\ntemplate<>                                  struct take<0, type_list<>>         { typedef type_list<> type; };\n\ntemplate<typename T, int n, T a, T... as> struct take<n, numeric_list<T, a, as...>> : concat<numeric_list<T, a>, typename take<n-1, numeric_list<T, as...>>::type> {};\ntemplate<typename T, int n>               struct take<n, numeric_list<T>>           { typedef numeric_list<T> type; };\ntemplate<typename T, T a, T... as>        struct take<0, numeric_list<T, a, as...>> { typedef numeric_list<T> type; };\ntemplate<typename T>                      struct take<0, numeric_list<T>>           { typedef numeric_list<T> type; };\n\ntemplate<typename T, int n, T... ii>      struct h_skip_helper_numeric;\ntemplate<typename T, int n, T i, T... ii> struct h_skip_helper_numeric<T, n, i, ii...> : h_skip_helper_numeric<T, n-1, ii...> {};\ntemplate<typename T, T i, T... ii>        struct h_skip_helper_numeric<T, 0, i, ii...> { typedef numeric_list<T, i, ii...> type; };\ntemplate<typename T, int n>               struct h_skip_helper_numeric<T, n>           { typedef numeric_list<T> type; };\ntemplate<typename T>                      struct h_skip_helper_numeric<T, 0>           { typedef numeric_list<T> type; };\n\ntemplate<int n, typename... tt>             struct h_skip_helper_type;\ntemplate<int n, typename t, typename... tt> struct h_skip_helper_type<n, t, tt...> : h_skip_helper_type<n-1, tt...> {};\ntemplate<typename t, typename... tt>        struct h_skip_helper_type<0, t, tt...> { typedef type_list<t, tt...> type; };\ntemplate<int n>                             struct h_skip_helper_type<n>           { typedef type_list<> type; };\ntemplate<>                                  struct h_skip_helper_type<0>           { typedef type_list<> type; };\n#endif //not EIGEN_PARSED_BY_DOXYGEN\n\ntemplate<int n>\nstruct h_skip {\n  template<typename T, T... ii>\n  constexpr static EIGEN_STRONG_INLINE typename h_skip_helper_numeric<T, n, ii...>::type helper(numeric_list<T, ii...>) { return typename h_skip_helper_numeric<T, n, ii...>::type(); }\n  template<typename... tt>\n  constexpr static EIGEN_STRONG_INLINE typename h_skip_helper_type<n, tt...>::type helper(type_list<tt...>) { return typename h_skip_helper_type<n, tt...>::type(); }\n};\n\ntemplate<int n, typename a> struct skip { typedef decltype(h_skip<n>::helper(a())) type; };\n\ntemplate<int start, int count, typename a> struct slice : take<count, typename skip<start, a>::type> {};\n\n/* list manipulation: retrieve single element from list */\n\ntemplate<int n, typename x> struct get;\n\ntemplate<int n, typename a, typename... as>               struct get<n, type_list<a, as...>>   : get<n-1, type_list<as...>> {};\ntemplate<typename a, typename... as>                      struct get<0, type_list<a, as...>>   { typedef a type; };\n\ntemplate<typename T, int n, T a, T... as>                        struct get<n, numeric_list<T, a, as...>>   : get<n-1, numeric_list<T, as...>> {};\ntemplate<typename T, T a, T... as>                               struct get<0, numeric_list<T, a, as...>>   { constexpr static T value = a; };\n\ntemplate<std::size_t n, typename T, T a, T... as> constexpr T       array_get(const numeric_list<T, a, as...>&) {\n   return get<(int)n, numeric_list<T, a, as...>>::value;\n}\n\n/* always get type, regardless of dummy; good for parameter pack expansion */\n\ntemplate<typename T, T dummy, typename t> struct id_numeric  { typedef t type; };\ntemplate<typename dummy, typename t>      struct id_type     { typedef t type; };\n\n/* equality checking, flagged version */\n\ntemplate<typename a, typename b> struct is_same_gf : is_same<a, b> { constexpr static int global_flags = 0; };\n\n/* apply_op to list */\n\ntemplate<\n  bool from_left, // false\n  template<typename, typename> class op,\n  typename additional_param,\n  typename... values\n>\nstruct h_apply_op_helper                                        { typedef type_list<typename op<values, additional_param>::type...> type; };\ntemplate<\n  template<typename, typename> class op,\n  typename additional_param,\n  typename... values\n>\nstruct h_apply_op_helper<true, op, additional_param, values...> { typedef type_list<typename op<additional_param, values>::type...> type; };\n\ntemplate<\n  bool from_left,\n  template<typename, typename> class op,\n  typename additional_param\n>\nstruct h_apply_op\n{\n  template<typename... values>\n  constexpr static typename h_apply_op_helper<from_left, op, additional_param, values...>::type helper(type_list<values...>)\n  { return typename h_apply_op_helper<from_left, op, additional_param, values...>::type(); }\n};\n\ntemplate<\n  template<typename, typename> class op,\n  typename additional_param,\n  typename a\n>\nstruct apply_op_from_left { typedef decltype(h_apply_op<true, op, additional_param>::helper(a())) type; };\n\ntemplate<\n  template<typename, typename> class op,\n  typename additional_param,\n  typename a\n>\nstruct apply_op_from_right { typedef decltype(h_apply_op<false, op, additional_param>::helper(a())) type; };\n\n/* see if an element is in a list */\n\ntemplate<\n  template<typename, typename> class test,\n  typename check_against,\n  typename h_list,\n  bool last_check_positive = false\n>\nstruct contained_in_list;\n\ntemplate<\n  template<typename, typename> class test,\n  typename check_against,\n  typename h_list\n>\nstruct contained_in_list<test, check_against, h_list, true>\n{\n  constexpr static bool value = true;\n};\n\ntemplate<\n  template<typename, typename> class test,\n  typename check_against,\n  typename a,\n  typename... as\n>\nstruct contained_in_list<test, check_against, type_list<a, as...>, false> : contained_in_list<test, check_against, type_list<as...>, test<check_against, a>::value> {};\n\ntemplate<\n  template<typename, typename> class test,\n  typename check_against\n  EIGEN_TPL_PP_SPEC_HACK_DEFC(typename, empty)\n>\nstruct contained_in_list<test, check_against, type_list<EIGEN_TPL_PP_SPEC_HACK_USE(empty)>, false> { constexpr static bool value = false; };\n\n/* see if an element is in a list and check for global flags */\n\ntemplate<\n  template<typename, typename> class test,\n  typename check_against,\n  typename h_list,\n  int default_flags = 0,\n  bool last_check_positive = false,\n  int last_check_flags = default_flags\n>\nstruct contained_in_list_gf;\n\ntemplate<\n  template<typename, typename> class test,\n  typename check_against,\n  typename h_list,\n  int default_flags,\n  int last_check_flags\n>\nstruct contained_in_list_gf<test, check_against, h_list, default_flags, true, last_check_flags>\n{\n  constexpr static bool value = true;\n  constexpr static int global_flags = last_check_flags;\n};\n\ntemplate<\n  template<typename, typename> class test,\n  typename check_against,\n  typename a,\n  typename... as,\n  int default_flags,\n  int last_check_flags\n>\nstruct contained_in_list_gf<test, check_against, type_list<a, as...>, default_flags, false, last_check_flags> : contained_in_list_gf<test, check_against, type_list<as...>, default_flags, test<check_against, a>::value, test<check_against, a>::global_flags> {};\n\ntemplate<\n  template<typename, typename> class test,\n  typename check_against\n  EIGEN_TPL_PP_SPEC_HACK_DEFC(typename, empty),\n  int default_flags,\n  int last_check_flags\n>\nstruct contained_in_list_gf<test, check_against, type_list<EIGEN_TPL_PP_SPEC_HACK_USE(empty)>, default_flags, false, last_check_flags> { constexpr static bool value = false; constexpr static int global_flags = default_flags; };\n\n/* generic reductions */\n\ntemplate<\n  typename Reducer,\n  typename... Ts\n> struct reduce;\n\ntemplate<\n  typename Reducer\n> struct reduce<Reducer>\n{\n  EIGEN_DEVICE_FUNC constexpr static EIGEN_STRONG_INLINE int run() { return Reducer::Identity; }\n};\n\ntemplate<\n  typename Reducer,\n  typename A\n> struct reduce<Reducer, A>\n{\n  EIGEN_DEVICE_FUNC constexpr static EIGEN_STRONG_INLINE A run(A a) { return a; }\n};\n\ntemplate<\n  typename Reducer,\n  typename A,\n  typename... Ts\n> struct reduce<Reducer, A, Ts...>\n{\n  EIGEN_DEVICE_FUNC constexpr static EIGEN_STRONG_INLINE auto run(A a, Ts... ts) -> decltype(Reducer::run(a, reduce<Reducer, Ts...>::run(ts...))) {\n    return Reducer::run(a, reduce<Reducer, Ts...>::run(ts...));\n  }\n};\n\n/* generic binary operations */\n\nstruct sum_op           {\n  template<typename A, typename B> EIGEN_DEVICE_FUNC constexpr static EIGEN_STRONG_INLINE auto run(A a, B b) -> decltype(a + b)   { return a + b;   }\n  static constexpr int Identity = 0;\n};\nstruct product_op       {\n  template<typename A, typename B> EIGEN_DEVICE_FUNC constexpr static EIGEN_STRONG_INLINE auto run(A a, B b) -> decltype(a * b)   { return a * b;   }\n  static constexpr int Identity = 1;\n};\n\nstruct logical_and_op   { template<typename A, typename B> constexpr static EIGEN_STRONG_INLINE auto run(A a, B b) -> decltype(a && b)  { return a && b;  } };\nstruct logical_or_op    { template<typename A, typename B> constexpr static EIGEN_STRONG_INLINE auto run(A a, B b) -> decltype(a || b)  { return a || b;  } };\n\nstruct equal_op         { template<typename A, typename B> constexpr static EIGEN_STRONG_INLINE auto run(A a, B b) -> decltype(a == b)  { return a == b;  } };\nstruct not_equal_op     { template<typename A, typename B> constexpr static EIGEN_STRONG_INLINE auto run(A a, B b) -> decltype(a != b)  { return a != b;  } };\nstruct lesser_op        { template<typename A, typename B> constexpr static EIGEN_STRONG_INLINE auto run(A a, B b) -> decltype(a < b)   { return a < b;   } };\nstruct lesser_equal_op  { template<typename A, typename B> constexpr static EIGEN_STRONG_INLINE auto run(A a, B b) -> decltype(a <= b)  { return a <= b;  } };\nstruct greater_op       { template<typename A, typename B> constexpr static EIGEN_STRONG_INLINE auto run(A a, B b) -> decltype(a > b)   { return a > b;   } };\nstruct greater_equal_op { template<typename A, typename B> constexpr static EIGEN_STRONG_INLINE auto run(A a, B b) -> decltype(a >= b)  { return a >= b;  } };\n\n/* generic unary operations */\n\nstruct not_op                { template<typename A> constexpr static EIGEN_STRONG_INLINE auto run(A a) -> decltype(!a)      { return !a;      } };\nstruct negation_op           { template<typename A> constexpr static EIGEN_STRONG_INLINE auto run(A a) -> decltype(-a)      { return -a;      } };\nstruct greater_equal_zero_op { template<typename A> constexpr static EIGEN_STRONG_INLINE auto run(A a) -> decltype(a >= 0)  { return a >= 0;  } };\n\n\n/* reductions for lists */\n\n// using auto -> return value spec makes ICC 13.0 and 13.1 crash here, so we have to hack it\n// together in front... (13.0 doesn't work with array_prod/array_reduce/... anyway, but 13.1\n// does...\ntemplate<typename... Ts>\nEIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE decltype(reduce<product_op, Ts...>::run((*((Ts*)0))...)) arg_prod(Ts... ts)\n{\n  return reduce<product_op, Ts...>::run(ts...);\n}\n\ntemplate<typename... Ts>\nconstexpr EIGEN_STRONG_INLINE decltype(reduce<sum_op, Ts...>::run((*((Ts*)0))...)) arg_sum(Ts... ts)\n{\n  return reduce<sum_op, Ts...>::run(ts...);\n}\n\n/* reverse arrays */\n\ntemplate<typename Array, int... n>\nconstexpr EIGEN_STRONG_INLINE Array h_array_reverse(Array arr, numeric_list<int, n...>)\n{\n  return {{array_get<sizeof...(n) - n - 1>(arr)...}};\n}\n\ntemplate<typename T, std::size_t N>\nconstexpr EIGEN_STRONG_INLINE array<T, N> array_reverse(array<T, N> arr)\n{\n  return h_array_reverse(arr, typename gen_numeric_list<int, N>::type());\n}\n\n\n/* generic array reductions */\n\n// can't reuse standard reduce() interface above because Intel's Compiler\n// *really* doesn't like it, so we just reimplement the stuff\n// (start from N - 1 and work down to 0 because specialization for\n// n == N - 1 also doesn't work in Intel's compiler, so it goes into\n// an infinite loop)\ntemplate<typename Reducer, typename T, std::size_t N, std::size_t n = N - 1>\nstruct h_array_reduce {\n  EIGEN_DEVICE_FUNC constexpr static EIGEN_STRONG_INLINE auto run(array<T, N> arr, T identity) -> decltype(Reducer::run(h_array_reduce<Reducer, T, N, n - 1>::run(arr, identity), array_get<n>(arr)))\n  {\n    return Reducer::run(h_array_reduce<Reducer, T, N, n - 1>::run(arr, identity), array_get<n>(arr));\n  }\n};\n\ntemplate<typename Reducer, typename T, std::size_t N>\nstruct h_array_reduce<Reducer, T, N, 0>\n{\n  EIGEN_DEVICE_FUNC constexpr static EIGEN_STRONG_INLINE T run(const array<T, N>& arr, T)\n  {\n    return array_get<0>(arr);\n  }\n};\n\ntemplate<typename Reducer, typename T>\nstruct h_array_reduce<Reducer, T, 0>\n{\n  EIGEN_DEVICE_FUNC constexpr static EIGEN_STRONG_INLINE T run(const array<T, 0>&, T identity)\n  {\n    return identity;\n  }\n};\n\ntemplate<typename Reducer, typename T, std::size_t N>\nEIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE auto array_reduce(const array<T, N>& arr, T identity) -> decltype(h_array_reduce<Reducer, T, N>::run(arr, identity))\n{\n  return h_array_reduce<Reducer, T, N>::run(arr, identity);\n}\n\n/* standard array reductions */\n\ntemplate<typename T, std::size_t N>\nEIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE auto array_sum(const array<T, N>& arr) -> decltype(array_reduce<sum_op, T, N>(arr, static_cast<T>(0)))\n{\n  return array_reduce<sum_op, T, N>(arr, static_cast<T>(0));\n}\n\ntemplate<typename T, std::size_t N>\nEIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE auto array_prod(const array<T, N>& arr) -> decltype(array_reduce<product_op, T, N>(arr, static_cast<T>(1)))\n{\n  return array_reduce<product_op, T, N>(arr, static_cast<T>(1));\n}\n\ntemplate<typename t>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE t array_prod(const std::vector<t>& a) {\n  eigen_assert(a.size() > 0);\n  t prod = 1;\n  for (size_t i = 0; i < a.size(); ++i) { prod *= a[i]; }\n  return prod;\n}\n\n/* zip an array */\n\ntemplate<typename Op, typename A, typename B, std::size_t N, int... n>\nconstexpr EIGEN_STRONG_INLINE array<decltype(Op::run(A(), B())),N> h_array_zip(array<A, N> a, array<B, N> b, numeric_list<int, n...>)\n{\n  return array<decltype(Op::run(A(), B())),N>{{ Op::run(array_get<n>(a), array_get<n>(b))... }};\n}\n\ntemplate<typename Op, typename A, typename B, std::size_t N>\nconstexpr EIGEN_STRONG_INLINE array<decltype(Op::run(A(), B())),N> array_zip(array<A, N> a, array<B, N> b)\n{\n  return h_array_zip<Op>(a, b, typename gen_numeric_list<int, N>::type());\n}\n\n/* zip an array and reduce the result */\n\ntemplate<typename Reducer, typename Op, typename A, typename B, std::size_t N, int... n>\nconstexpr EIGEN_STRONG_INLINE auto h_array_zip_and_reduce(array<A, N> a, array<B, N> b, numeric_list<int, n...>) -> decltype(reduce<Reducer, typename id_numeric<int,n,decltype(Op::run(A(), B()))>::type...>::run(Op::run(array_get<n>(a), array_get<n>(b))...))\n{\n  return reduce<Reducer, typename id_numeric<int,n,decltype(Op::run(A(), B()))>::type...>::run(Op::run(array_get<n>(a), array_get<n>(b))...);\n}\n\ntemplate<typename Reducer, typename Op, typename A, typename B, std::size_t N>\nconstexpr EIGEN_STRONG_INLINE auto array_zip_and_reduce(array<A, N> a, array<B, N> b) -> decltype(h_array_zip_and_reduce<Reducer, Op, A, B, N>(a, b, typename gen_numeric_list<int, N>::type()))\n{\n  return h_array_zip_and_reduce<Reducer, Op, A, B, N>(a, b, typename gen_numeric_list<int, N>::type());\n}\n\n/* apply stuff to an array */\n\ntemplate<typename Op, typename A, std::size_t N, int... n>\nconstexpr EIGEN_STRONG_INLINE array<decltype(Op::run(A())),N> h_array_apply(array<A, N> a, numeric_list<int, n...>)\n{\n  return array<decltype(Op::run(A())),N>{{ Op::run(array_get<n>(a))... }};\n}\n\ntemplate<typename Op, typename A, std::size_t N>\nconstexpr EIGEN_STRONG_INLINE array<decltype(Op::run(A())),N> array_apply(array<A, N> a)\n{\n  return h_array_apply<Op>(a, typename gen_numeric_list<int, N>::type());\n}\n\n/* apply stuff to an array and reduce */\n\ntemplate<typename Reducer, typename Op, typename A, std::size_t N, int... n>\nconstexpr EIGEN_STRONG_INLINE auto h_array_apply_and_reduce(array<A, N> arr, numeric_list<int, n...>) -> decltype(reduce<Reducer, typename id_numeric<int,n,decltype(Op::run(A()))>::type...>::run(Op::run(array_get<n>(arr))...))\n{\n  return reduce<Reducer, typename id_numeric<int,n,decltype(Op::run(A()))>::type...>::run(Op::run(array_get<n>(arr))...);\n}\n\ntemplate<typename Reducer, typename Op, typename A, std::size_t N>\nconstexpr EIGEN_STRONG_INLINE auto array_apply_and_reduce(array<A, N> a) -> decltype(h_array_apply_and_reduce<Reducer, Op, A, N>(a, typename gen_numeric_list<int, N>::type()))\n{\n  return h_array_apply_and_reduce<Reducer, Op, A, N>(a, typename gen_numeric_list<int, N>::type());\n}\n\n/* repeat a value n times (and make an array out of it\n * usage:\n *   array<int, 16> = repeat<16>(42);\n */\n\ntemplate<int n>\nstruct h_repeat\n{\n  template<typename t, int... ii>\n  constexpr static EIGEN_STRONG_INLINE array<t, n> run(t v, numeric_list<int, ii...>)\n  {\n    return {{ typename id_numeric<int, ii, t>::type(v)... }};\n  }\n};\n\ntemplate<int n, typename t>\nconstexpr array<t, n> repeat(t v) { return h_repeat<n>::run(v, typename gen_numeric_list<int, n>::type()); }\n\n/* instantiate a class by a C-style array */\ntemplate<class InstType, typename ArrType, std::size_t N, bool Reverse, typename... Ps>\nstruct h_instantiate_by_c_array;\n\ntemplate<class InstType, typename ArrType, std::size_t N, typename... Ps>\nstruct h_instantiate_by_c_array<InstType, ArrType, N, false, Ps...>\n{\n  static InstType run(ArrType* arr, Ps... args)\n  {\n    return h_instantiate_by_c_array<InstType, ArrType, N - 1, false, Ps..., ArrType>::run(arr + 1, args..., arr[0]);\n  }\n};\n\ntemplate<class InstType, typename ArrType, std::size_t N, typename... Ps>\nstruct h_instantiate_by_c_array<InstType, ArrType, N, true, Ps...>\n{\n  static InstType run(ArrType* arr, Ps... args)\n  {\n    return h_instantiate_by_c_array<InstType, ArrType, N - 1, false, ArrType, Ps...>::run(arr + 1, arr[0], args...);\n  }\n};\n\ntemplate<class InstType, typename ArrType, typename... Ps>\nstruct h_instantiate_by_c_array<InstType, ArrType, 0, false, Ps...>\n{\n  static InstType run(ArrType* arr, Ps... args)\n  {\n    (void)arr;\n    return InstType(args...);\n  }\n};\n\ntemplate<class InstType, typename ArrType, typename... Ps>\nstruct h_instantiate_by_c_array<InstType, ArrType, 0, true, Ps...>\n{\n  static InstType run(ArrType* arr, Ps... args)\n  {\n    (void)arr;\n    return InstType(args...);\n  }\n};\n\ntemplate<class InstType, typename ArrType, std::size_t N, bool Reverse = false>\nInstType instantiate_by_c_array(ArrType* arr)\n{\n  return h_instantiate_by_c_array<InstType, ArrType, N, Reverse>::run(arr);\n}\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11META_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/util/CXX11Workarounds.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2013 Christian Seiler <christian@iwakd.de>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_CXX11WORKAROUNDS_H\n#define EIGEN_CXX11WORKAROUNDS_H\n\n/* COMPATIBILITY CHECKS\n * (so users of compilers that are too old get some realistic error messages)\n */\n#if defined(__INTEL_COMPILER) && (__INTEL_COMPILER < 1310)\n#error Intel Compiler only supports required C++ features since version 13.1.\n// note that most stuff in principle works with 13.0 but when combining\n// some features, at some point 13.0 will just fail with an internal assertion\n#elif defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6))\n// G++ < 4.6 by default will continue processing the source files - even if we use #error to make\n// it error out. For this reason, we use the pragma to make sure G++ aborts at the first error\n// it sees. Unfortunately, that is still not our #error directive, but at least the output is\n// short enough the user has a chance to see that the compiler version is not sufficient for\n// the funky template mojo we use.\n#pragma GCC diagnostic error \"-Wfatal-errors\"\n#error GNU C++ Compiler (g++) only supports required C++ features since version 4.6.\n#endif\n\n/* Check that the compiler at least claims to support C++11. It might not be sufficient\n * because the compiler may not implement it correctly, but at least we'll know.\n * On the other hand, visual studio still doesn't claim to support C++11 although it's\n * compliant enugh for our purpose.\n */\n#if (__cplusplus <= 199711L) && (EIGEN_COMP_MSVC < 1900)\n#if defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER)\n#pragma GCC diagnostic error \"-Wfatal-errors\"\n#endif\n#error This library needs at least a C++11 compliant compiler. If you use g++/clang, please enable the -std=c++11 compiler flag. (-std=c++0x on older versions.)\n#endif\n\nnamespace Eigen {\n\nnamespace internal {\n\n/* std::get is only constexpr in C++14, not yet in C++11\n */\n\n\ntemplate<std::size_t I_, class T> constexpr inline T&       array_get(std::vector<T>&       a) { return a[I_]; }\ntemplate<std::size_t I_, class T> constexpr inline T&&      array_get(std::vector<T>&&      a) { return a[I_]; }\ntemplate<std::size_t I_, class T> constexpr inline T const& array_get(std::vector<T> const& a) { return a[I_]; }\n\n/* Suppose you have a template of the form\n * template<typename T> struct X;\n * And you want to specialize it in such a way:\n *    template<typename S1, typename... SN> struct X<Foo<S1, SN...>> { ::: };\n *    template<>                            struct X<Foo<>>          { ::: };\n * This will work in Intel's compiler 13.0, but only to some extent in g++ 4.6, since\n * g++ can only match templates called with parameter packs if the number of template\n * arguments is not a fixed size (so inside the first specialization, referencing\n * X<Foo<Sn...>> will fail in g++). On the other hand, g++ will accept the following:\n *    template<typename S...> struct X<Foo<S...>> { ::: }:\n * as an additional (!) specialization, which will then only match the empty case.\n * But Intel's compiler 13.0 won't accept that, it will only accept the empty syntax,\n * so we have to create a workaround for this.\n */\n#if defined(__GNUC__) && !defined(__INTEL_COMPILER)\n#define EIGEN_TPL_PP_SPEC_HACK_DEF(mt, n)    mt... n\n#define EIGEN_TPL_PP_SPEC_HACK_DEFC(mt, n)   , EIGEN_TPL_PP_SPEC_HACK_DEF(mt, n)\n#define EIGEN_TPL_PP_SPEC_HACK_USE(n)        n...\n#define EIGEN_TPL_PP_SPEC_HACK_USEC(n)       , n...\n#else\n#define EIGEN_TPL_PP_SPEC_HACK_DEF(mt, n)\n#define EIGEN_TPL_PP_SPEC_HACK_DEFC(mt, n)\n#define EIGEN_TPL_PP_SPEC_HACK_USE(n)\n#define EIGEN_TPL_PP_SPEC_HACK_USEC(n)\n#endif\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_CXX11WORKAROUNDS_H\n\n/*\n * kate: space-indent on; indent-width 2; mixedindent off; indent-mode cstyle;\n */\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/util/EmulateArray.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_EMULATE_ARRAY_H\n#define EIGEN_EMULATE_ARRAY_H\n\n\n\n// The array class is only available starting with cxx11. Emulate our own here\n// if needed. Beware, msvc still doesn't advertise itself as a c++11 compiler!\n// Moreover, CUDA doesn't support the STL containers, so we use our own instead.\n#if (__cplusplus <= 199711L && EIGEN_COMP_MSVC < 1900) || defined(EIGEN_GPUCC) || defined(EIGEN_AVOID_STL_ARRAY)\n\nnamespace Eigen {\ntemplate <typename T, size_t n> class array {\n public:\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE T& operator[] (size_t index) { eigen_internal_assert(index < size()); return values[index]; }\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE const T& operator[] (size_t index) const { eigen_internal_assert(index < size()); return values[index]; }\n\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE T& at(size_t index) { eigen_assert(index < size()); return values[index]; }\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE const T& at(size_t index) const { eigen_assert(index < size()); return values[index]; }\n\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE T& front() { return values[0]; }\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE const T& front() const { return values[0]; }\n\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE T& back() { return values[n-1]; }\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE const T& back() const { return values[n-1]; }\n\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\n  static std::size_t size() { return n; }\n\n  T values[n];\n\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE array() { }\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE array(const T& v) {\n    EIGEN_STATIC_ASSERT(n==1, YOU_MADE_A_PROGRAMMING_MISTAKE)\n    values[0] = v;\n  }\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE array(const T& v1, const T& v2) {\n    EIGEN_STATIC_ASSERT(n==2, YOU_MADE_A_PROGRAMMING_MISTAKE)\n    values[0] = v1;\n    values[1] = v2;\n  }\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE array(const T& v1, const T& v2, const T& v3) {\n    EIGEN_STATIC_ASSERT(n==3, YOU_MADE_A_PROGRAMMING_MISTAKE)\n    values[0] = v1;\n    values[1] = v2;\n    values[2] = v3;\n  }\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE array(const T& v1, const T& v2, const T& v3,\n                            const T& v4) {\n    EIGEN_STATIC_ASSERT(n==4, YOU_MADE_A_PROGRAMMING_MISTAKE)\n    values[0] = v1;\n    values[1] = v2;\n    values[2] = v3;\n    values[3] = v4;\n  }\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE array(const T& v1, const T& v2, const T& v3, const T& v4,\n                            const T& v5) {\n    EIGEN_STATIC_ASSERT(n==5, YOU_MADE_A_PROGRAMMING_MISTAKE)\n    values[0] = v1;\n    values[1] = v2;\n    values[2] = v3;\n    values[3] = v4;\n    values[4] = v5;\n  }\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE array(const T& v1, const T& v2, const T& v3, const T& v4,\n                            const T& v5, const T& v6) {\n    EIGEN_STATIC_ASSERT(n==6, YOU_MADE_A_PROGRAMMING_MISTAKE)\n    values[0] = v1;\n    values[1] = v2;\n    values[2] = v3;\n    values[3] = v4;\n    values[4] = v5;\n    values[5] = v6;\n  }\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE array(const T& v1, const T& v2, const T& v3, const T& v4,\n                            const T& v5, const T& v6, const T& v7) {\n    EIGEN_STATIC_ASSERT(n==7, YOU_MADE_A_PROGRAMMING_MISTAKE)\n    values[0] = v1;\n    values[1] = v2;\n    values[2] = v3;\n    values[3] = v4;\n    values[4] = v5;\n    values[5] = v6;\n    values[6] = v7;\n  }\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE array(\n      const T& v1, const T& v2, const T& v3, const T& v4,\n      const T& v5, const T& v6, const T& v7, const T& v8) {\n    EIGEN_STATIC_ASSERT(n==8, YOU_MADE_A_PROGRAMMING_MISTAKE)\n    values[0] = v1;\n    values[1] = v2;\n    values[2] = v3;\n    values[3] = v4;\n    values[4] = v5;\n    values[5] = v6;\n    values[6] = v7;\n    values[7] = v8;\n  }\n\n#if EIGEN_HAS_VARIADIC_TEMPLATES\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE array(std::initializer_list<T> l) {\n    eigen_assert(l.size() == n);\n    internal::smart_copy(l.begin(), l.end(), values);\n  }\n#endif\n};\n\n\n// Specialize array for zero size\ntemplate <typename T> class array<T, 0> {\n public:\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE T& operator[] (size_t) {\n    eigen_assert(false && \"Can't index a zero size array\");\n    return dummy;\n  }\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE const T& operator[] (size_t) const {\n    eigen_assert(false && \"Can't index a zero size array\");\n    return dummy;\n  }\n\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE T& front() {\n    eigen_assert(false && \"Can't index a zero size array\");\n    return dummy;\n  }\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE const T& front() const {\n    eigen_assert(false && \"Can't index a zero size array\");\n    return dummy;\n  }\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE T& back() {\n    eigen_assert(false && \"Can't index a zero size array\");\n    return dummy;\n  }\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE const T& back() const {\n    eigen_assert(false && \"Can't index a zero size array\");\n    return dummy;\n  }\n\n  static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE std::size_t size() { return 0; }\n\n  EIGEN_DEVICE_FUNC\n  EIGEN_STRONG_INLINE array() : dummy() { }\n\n#if EIGEN_HAS_VARIADIC_TEMPLATES\n  EIGEN_DEVICE_FUNC array(std::initializer_list<T> l) : dummy() {\n    EIGEN_UNUSED_VARIABLE(l);\n    eigen_assert(l.size() == 0);\n  }\n#endif\n\n private:\n  T dummy;\n};\n\n// Comparison operator\n// Todo: implement !=, <, <=, >,  and >=\ntemplate<class T, std::size_t N>\nEIGEN_DEVICE_FUNC bool operator==(const array<T,N>& lhs, const array<T,N>& rhs) {\n  for (std::size_t i = 0; i < N; ++i) {\n    if (lhs[i] != rhs[i]) {\n      return false;\n    }\n  }\n  return true;\n}\n\n\nnamespace internal {\ntemplate<std::size_t I_, class T, std::size_t N>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T& array_get(array<T,N>& a) {\n  return a[I_];\n}\ntemplate<std::size_t I_, class T, std::size_t N>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const T& array_get(const array<T,N>& a) {\n  return a[I_];\n}\n\ntemplate<class T, std::size_t N> struct array_size<array<T,N> > {\n  enum { value = N };\n};\ntemplate<class T, std::size_t N> struct array_size<array<T,N>& > {\n  enum { value = N };\n};\ntemplate<class T, std::size_t N> struct array_size<const array<T,N> > {\n  enum { value = N };\n};\ntemplate<class T, std::size_t N> struct array_size<const array<T,N>& > {\n  enum { value = N };\n};\n\n}  // end namespace internal\n}  // end namespace Eigen\n\n#else\n\n// The compiler supports c++11, and we're not targeting cuda: use std::array as Eigen::array\n#include <array>\nnamespace Eigen {\n\ntemplate <typename T, std::size_t N> using array = std::array<T, N>;\n\nnamespace internal {\n/* std::get is only constexpr in C++14, not yet in C++11\n *     - libstdc++ from version 4.7 onwards has it nevertheless,\n *                                          so use that\n *     - libstdc++ older versions: use _M_instance directly\n *     - libc++ all versions so far: use __elems_ directly\n *     - all other libs: use std::get to be portable, but\n *                       this may not be constexpr\n */\n#if defined(__GLIBCXX__) && __GLIBCXX__ < 20120322\n#define STD_GET_ARR_HACK             a._M_instance[I_]\n#elif defined(_LIBCPP_VERSION)\n#define STD_GET_ARR_HACK             a.__elems_[I_]\n#else\n#define STD_GET_ARR_HACK             std::template get<I_, T, N>(a)\n#endif\n\ntemplate<std::size_t I_, class T, std::size_t N> constexpr inline T&       array_get(std::array<T,N>&       a) { return (T&)       STD_GET_ARR_HACK; }\ntemplate<std::size_t I_, class T, std::size_t N> constexpr inline T&&      array_get(std::array<T,N>&&      a) { return (T&&)      STD_GET_ARR_HACK; }\ntemplate<std::size_t I_, class T, std::size_t N> constexpr inline T const& array_get(std::array<T,N> const& a) { return (T const&) STD_GET_ARR_HACK; }\n\n#undef STD_GET_ARR_HACK\n\n}  // end namespace internal\n}  // end namespace Eigen\n\n#endif\n\n#endif  // EIGEN_EMULATE_ARRAY_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/CXX11/src/util/MaxSizeVector.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_FIXEDSIZEVECTOR_H\n#define EIGEN_FIXEDSIZEVECTOR_H\n\nnamespace Eigen {\n\n/** \\class MaxSizeVector\n  * \\ingroup Core\n  *\n  * \\brief The MaxSizeVector class.\n  *\n  * The %MaxSizeVector provides a subset of std::vector functionality.\n  *\n  * The goal is to provide basic std::vector operations when using\n  * std::vector is not an option (e.g. on GPU or when compiling using\n  * FMA/AVX, as this can cause either compilation failures or illegal\n  * instruction failures).\n  *\n  * Beware: The constructors are not API compatible with these of\n  * std::vector.\n  */\ntemplate <typename T>\nclass MaxSizeVector {\n  static const size_t alignment = EIGEN_PLAIN_ENUM_MAX(EIGEN_ALIGNOF(T), sizeof(void*));\n public:\n  // Construct a new MaxSizeVector, reserve n elements.\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  explicit MaxSizeVector(size_t n)\n      : reserve_(n), size_(0),\n        data_(static_cast<T*>(internal::handmade_aligned_malloc(n * sizeof(T), alignment))) {\n  }\n\n  // Construct a new MaxSizeVector, reserve and resize to n.\n  // Copy the init value to all elements.\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  MaxSizeVector(size_t n, const T& init)\n      : reserve_(n), size_(n),\n        data_(static_cast<T*>(internal::handmade_aligned_malloc(n * sizeof(T), alignment))) {\n    size_t i = 0;\n    EIGEN_TRY\n    {\n      for(; i < size_; ++i) { new (&data_[i]) T(init); }\n    }\n    EIGEN_CATCH(...)\n    {\n      // Construction failed, destruct in reverse order:\n      for(; (i+1) > 0; --i) { data_[i-1].~T(); }\n      internal::handmade_aligned_free(data_);\n      EIGEN_THROW;\n    }\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  ~MaxSizeVector() {\n    for (size_t i = size_; i > 0; --i) {\n      data_[i-1].~T();\n    }\n    internal::handmade_aligned_free(data_);\n  }\n\n  void resize(size_t n) {\n    eigen_assert(n <= reserve_);\n    for (; size_ < n; ++size_) {\n      new (&data_[size_]) T;\n    }\n    for (; size_ > n; --size_) {\n      data_[size_-1].~T();\n    }\n    eigen_assert(size_ == n);\n  }\n\n  // Append new elements (up to reserved size).\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  void push_back(const T& t) {\n    eigen_assert(size_ < reserve_);\n    new (&data_[size_++]) T(t);\n  }\n\n  // For C++03 compatibility this only takes one argument\n  template<class X>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  void emplace_back(const X& x) {\n    eigen_assert(size_ < reserve_);\n    new (&data_[size_++]) T(x);\n  }\n\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  const T& operator[] (size_t i) const {\n    eigen_assert(i < size_);\n    return data_[i];\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  T& operator[] (size_t i) {\n    eigen_assert(i < size_);\n    return data_[i];\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  T& back() {\n    eigen_assert(size_ > 0);\n    return data_[size_ - 1];\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  const T& back() const {\n    eigen_assert(size_ > 0);\n    return data_[size_ - 1];\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  void pop_back() {\n    eigen_assert(size_ > 0);\n    data_[--size_].~T();\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  size_t size() const { return size_; }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  bool empty() const { return size_ == 0; }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  T* data() { return data_; }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  const T* data() const { return data_; }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  T* begin() { return data_; }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  T* end() { return data_ + size_; }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  const T* begin() const { return data_; }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\n  const T* end() const { return data_ + size_; }\n\n private:\n  size_t reserve_;\n  size_t size_;\n  T* data_;\n};\n\n}  // namespace Eigen\n\n#endif  // EIGEN_FIXEDSIZEVECTOR_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/EulerAngles",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Tal Hadad <tal_hd@hotmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_EULERANGLES_MODULE_H\n#define EIGEN_EULERANGLES_MODULE_H\n\n\n#include \"../../Eigen/Core\"\n#include \"../../Eigen/Geometry\"\n\n#include \"../../Eigen/src/Core/util/DisableStupidWarnings.h\"\n\nnamespace Eigen {\n\n/**\n  * \\defgroup EulerAngles_Module EulerAngles module\n  * \\brief This module provides generic euler angles rotation.\n  *\n  * Euler angles are a way to represent 3D rotation.\n  *\n  * In order to use this module in your code, include this header:\n  * \\code\n  * #include <unsupported/Eigen/EulerAngles>\n  * \\endcode\n  *\n  * See \\ref EulerAngles for more information.\n  *\n  */\n\n}\n\n#include \"src/EulerAngles/EulerSystem.h\"\n#include \"src/EulerAngles/EulerAngles.h\"\n\n#include \"../../Eigen/src/Core/util/ReenableStupidWarnings.h\"\n\n#endif // EIGEN_EULERANGLES_MODULE_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/FFT",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra. \n//\n// Copyright (C) 2009 Mark Borgerding mark a borgerding net\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_FFT_H\n#define EIGEN_FFT_H\n\n#include <complex>\n#include <vector>\n#include <map>\n#include \"../../Eigen/Core\"\n\n\n/**\n  * \\defgroup FFT_Module Fast Fourier Transform module\n  *\n  * \\code\n  * #include <unsupported/Eigen/FFT>\n  * \\endcode\n  *\n  * This module provides Fast Fourier transformation, with a configurable backend\n  * implementation.\n  *\n  * The default implementation is based on kissfft. It is a small, free, and\n  * reasonably efficient default.\n  *\n  * There are currently two implementation backend:\n  *\n  * - fftw (http://www.fftw.org) : faster, GPL -- incompatible with Eigen in LGPL form, bigger code size.\n  * - MKL (http://en.wikipedia.org/wiki/Math_Kernel_Library) : fastest, commercial -- may be incompatible with Eigen in GPL form.\n  *\n  * \\section FFTDesign Design\n  *\n  * The following design decisions were made concerning scaling and\n  * half-spectrum for real FFT.\n  *\n  * The intent is to facilitate generic programming and ease migrating code\n  * from  Matlab/octave.\n  * We think the default behavior of Eigen/FFT should favor correctness and\n  * generality over speed. Of course, the caller should be able to \"opt-out\" from this\n  * behavior and get the speed increase if they want it.\n  *\n  * 1) %Scaling:\n  * Other libraries (FFTW,IMKL,KISSFFT)  do not perform scaling, so there\n  * is a constant gain incurred after the forward&inverse transforms , so \n  * IFFT(FFT(x)) = Kx;  this is done to avoid a vector-by-value multiply.  \n  * The downside is that algorithms that worked correctly in Matlab/octave \n  * don't behave the same way once implemented in C++.\n  *\n  * How Eigen/FFT differs: invertible scaling is performed so IFFT( FFT(x) ) = x. \n  *\n  * 2) Real FFT half-spectrum\n  * Other libraries use only half the frequency spectrum (plus one extra \n  * sample for the Nyquist bin) for a real FFT, the other half is the \n  * conjugate-symmetric of the first half.  This saves them a copy and some \n  * memory.  The downside is the caller needs to have special logic for the \n  * number of bins in complex vs real.\n  *\n  * How Eigen/FFT differs: The full spectrum is returned from the forward \n  * transform.  This facilitates generic template programming by obviating \n  * separate specializations for real vs complex.  On the inverse\n  * transform, only half the spectrum is actually used if the output type is real.\n  */\n \n\n#include \"../../Eigen/src/Core/util/DisableStupidWarnings.h\"\n\n#ifdef EIGEN_FFTW_DEFAULT\n// FFTW: faster, GPL -- incompatible with Eigen in LGPL form, bigger code size\n#  include <fftw3.h>\n#  include \"src/FFT/ei_fftw_impl.h\"\n   namespace Eigen {\n     //template <typename T> typedef struct internal::fftw_impl  default_fft_impl; this does not work\n     template <typename T> struct default_fft_impl : public internal::fftw_impl<T> {};\n   }\n#elif defined EIGEN_MKL_DEFAULT\n// TODO \n// intel Math Kernel Library: fastest, commercial -- may be incompatible with Eigen in GPL form\n#  include \"src/FFT/ei_imklfft_impl.h\"\n   namespace Eigen {\n     template <typename T> struct default_fft_impl : public internal::imklfft_impl {};\n   }\n#else\n// internal::kissfft_impl:  small, free, reasonably efficient default, derived from kissfft\n//\n# include \"src/FFT/ei_kissfft_impl.h\"\n  namespace Eigen {\n     template <typename T> \n       struct default_fft_impl : public internal::kissfft_impl<T> {};\n  }\n#endif\n\nnamespace Eigen {\n\n \n// \ntemplate<typename T_SrcMat,typename T_FftIfc> struct fft_fwd_proxy;\ntemplate<typename T_SrcMat,typename T_FftIfc> struct fft_inv_proxy;\n\nnamespace internal {\ntemplate<typename T_SrcMat,typename T_FftIfc>\nstruct traits< fft_fwd_proxy<T_SrcMat,T_FftIfc> >\n{\n  typedef typename T_SrcMat::PlainObject ReturnType;\n};\ntemplate<typename T_SrcMat,typename T_FftIfc>\nstruct traits< fft_inv_proxy<T_SrcMat,T_FftIfc> >\n{\n  typedef typename T_SrcMat::PlainObject ReturnType;\n};\n}\n\ntemplate<typename T_SrcMat,typename T_FftIfc> \nstruct fft_fwd_proxy\n : public ReturnByValue<fft_fwd_proxy<T_SrcMat,T_FftIfc> >\n{\n  typedef DenseIndex Index;\n\n  fft_fwd_proxy(const T_SrcMat& src,T_FftIfc & fft, Index nfft) : m_src(src),m_ifc(fft), m_nfft(nfft) {}\n\n  template<typename T_DestMat> void evalTo(T_DestMat& dst) const;\n\n  Index rows() const { return m_src.rows(); }\n  Index cols() const { return m_src.cols(); }\nprotected:\n  const T_SrcMat & m_src;\n  T_FftIfc & m_ifc;\n  Index m_nfft;\nprivate:\n  fft_fwd_proxy& operator=(const fft_fwd_proxy&);\n};\n\ntemplate<typename T_SrcMat,typename T_FftIfc> \nstruct fft_inv_proxy\n : public ReturnByValue<fft_inv_proxy<T_SrcMat,T_FftIfc> >\n{\n  typedef DenseIndex Index;\n\n  fft_inv_proxy(const T_SrcMat& src,T_FftIfc & fft, Index nfft) : m_src(src),m_ifc(fft), m_nfft(nfft) {}\n\n  template<typename T_DestMat> void evalTo(T_DestMat& dst) const;\n\n  Index rows() const { return m_src.rows(); }\n  Index cols() const { return m_src.cols(); }\nprotected:\n  const T_SrcMat & m_src;\n  T_FftIfc & m_ifc;\n  Index m_nfft;\nprivate:\n  fft_inv_proxy& operator=(const fft_inv_proxy&);\n};\n\n\ntemplate <typename T_Scalar,\n         typename T_Impl=default_fft_impl<T_Scalar> >\nclass FFT\n{\n  public:\n    typedef T_Impl impl_type;\n    typedef DenseIndex Index;\n    typedef typename impl_type::Scalar Scalar;\n    typedef typename impl_type::Complex Complex;\n\n    enum Flag {\n      Default=0, // goof proof\n      Unscaled=1,\n      HalfSpectrum=2,\n      // SomeOtherSpeedOptimization=4\n      Speedy=32767\n    };\n\n    FFT( const impl_type & impl=impl_type() , Flag flags=Default ) :m_impl(impl),m_flag(flags) { }\n\n    inline\n    bool HasFlag(Flag f) const { return (m_flag & (int)f) == f;}\n\n    inline\n    void SetFlag(Flag f) { m_flag |= (int)f;}\n\n    inline\n    void ClearFlag(Flag f) { m_flag &= (~(int)f);}\n\n    inline\n    void fwd( Complex * dst, const Scalar * src, Index nfft)\n    {\n        m_impl.fwd(dst,src,static_cast<int>(nfft));\n        if ( HasFlag(HalfSpectrum) == false)\n          ReflectSpectrum(dst,nfft);\n    }\n\n    inline\n    void fwd( Complex * dst, const Complex * src, Index nfft)\n    {\n        m_impl.fwd(dst,src,static_cast<int>(nfft));\n    }\n\n    /*\n    inline \n    void fwd2(Complex * dst, const Complex * src, int n0,int n1)\n    {\n      m_impl.fwd2(dst,src,n0,n1);\n    }\n    */\n\n    template <typename _Input>\n    inline\n    void fwd( std::vector<Complex> & dst, const std::vector<_Input> & src) \n    {\n      if ( NumTraits<_Input>::IsComplex == 0 && HasFlag(HalfSpectrum) )\n        dst.resize( (src.size()>>1)+1); // half the bins + Nyquist bin\n      else\n        dst.resize(src.size());\n      fwd(&dst[0],&src[0],src.size());\n    }\n\n    template<typename InputDerived, typename ComplexDerived>\n    inline\n    void fwd( MatrixBase<ComplexDerived> & dst, const MatrixBase<InputDerived> & src, Index nfft=-1)\n    {\n      typedef typename ComplexDerived::Scalar dst_type;\n      typedef typename InputDerived::Scalar src_type;\n      EIGEN_STATIC_ASSERT_VECTOR_ONLY(InputDerived)\n      EIGEN_STATIC_ASSERT_VECTOR_ONLY(ComplexDerived)\n      EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(ComplexDerived,InputDerived) // size at compile-time\n      EIGEN_STATIC_ASSERT((internal::is_same<dst_type, Complex>::value),\n            YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)\n      EIGEN_STATIC_ASSERT(int(InputDerived::Flags)&int(ComplexDerived::Flags)&DirectAccessBit,\n            THIS_METHOD_IS_ONLY_FOR_EXPRESSIONS_WITH_DIRECT_MEMORY_ACCESS_SUCH_AS_MAP_OR_PLAIN_MATRICES)\n\n      if (nfft<1)\n        nfft = src.size();\n\n      if ( NumTraits< src_type >::IsComplex == 0 && HasFlag(HalfSpectrum) )\n        dst.derived().resize( (nfft>>1)+1);\n      else\n        dst.derived().resize(nfft);\n\n      if ( src.innerStride() != 1 || src.size() < nfft ) {\n        Matrix<src_type,1,Dynamic> tmp;\n        if (src.size()<nfft) {\n          tmp.setZero(nfft);\n          tmp.block(0,0,src.size(),1 ) = src;\n        }else{\n          tmp = src;\n        }\n        fwd( &dst[0],&tmp[0],nfft );\n      }else{\n        fwd( &dst[0],&src[0],nfft );\n      }\n    }\n \n    template<typename InputDerived>\n    inline\n    fft_fwd_proxy< MatrixBase<InputDerived>, FFT<T_Scalar,T_Impl> >\n    fwd( const MatrixBase<InputDerived> & src, Index nfft=-1)\n    {\n      return fft_fwd_proxy< MatrixBase<InputDerived> ,FFT<T_Scalar,T_Impl> >( src, *this,nfft );\n    }\n\n    template<typename InputDerived>\n    inline\n    fft_inv_proxy< MatrixBase<InputDerived>, FFT<T_Scalar,T_Impl> >\n    inv( const MatrixBase<InputDerived> & src, Index nfft=-1)\n    {\n      return  fft_inv_proxy< MatrixBase<InputDerived> ,FFT<T_Scalar,T_Impl> >( src, *this,nfft );\n    }\n\n    inline\n    void inv( Complex * dst, const Complex * src, Index nfft)\n    {\n      m_impl.inv( dst,src,static_cast<int>(nfft) );\n      if ( HasFlag( Unscaled ) == false)\n        scale(dst,Scalar(1./nfft),nfft); // scale the time series\n    }\n\n    inline\n    void inv( Scalar * dst, const Complex * src, Index nfft)\n    {\n      m_impl.inv( dst,src,static_cast<int>(nfft) );\n      if ( HasFlag( Unscaled ) == false)\n        scale(dst,Scalar(1./nfft),nfft); // scale the time series\n    }\n\n    template<typename OutputDerived, typename ComplexDerived>\n    inline\n    void inv( MatrixBase<OutputDerived> & dst, const MatrixBase<ComplexDerived> & src, Index nfft=-1)\n    {\n      typedef typename ComplexDerived::Scalar src_type;\n      typedef typename ComplexDerived::RealScalar real_type;\n      typedef typename OutputDerived::Scalar dst_type;\n      const bool realfft= (NumTraits<dst_type>::IsComplex == 0);\n      EIGEN_STATIC_ASSERT_VECTOR_ONLY(OutputDerived)\n      EIGEN_STATIC_ASSERT_VECTOR_ONLY(ComplexDerived)\n      EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(ComplexDerived,OutputDerived) // size at compile-time\n      EIGEN_STATIC_ASSERT((internal::is_same<src_type, Complex>::value),\n            YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)\n      EIGEN_STATIC_ASSERT(int(OutputDerived::Flags)&int(ComplexDerived::Flags)&DirectAccessBit,\n            THIS_METHOD_IS_ONLY_FOR_EXPRESSIONS_WITH_DIRECT_MEMORY_ACCESS_SUCH_AS_MAP_OR_PLAIN_MATRICES)\n\n      if (nfft<1) { //automatic FFT size determination\n        if ( realfft && HasFlag(HalfSpectrum) ) \n          nfft = 2*(src.size()-1); //assume even fft size\n        else\n          nfft = src.size();\n      }\n      dst.derived().resize( nfft );\n\n      // check for nfft that does not fit the input data size\n      Index resize_input= ( realfft && HasFlag(HalfSpectrum) )\n        ? ( (nfft/2+1) - src.size() )\n        : ( nfft - src.size() );\n\n      if ( src.innerStride() != 1 || resize_input ) {\n        // if the vector is strided, then we need to copy it to a packed temporary\n        Matrix<src_type,1,Dynamic> tmp;\n        if ( resize_input ) {\n          size_t ncopy = (std::min)(src.size(),src.size() + resize_input);\n          tmp.setZero(src.size() + resize_input);\n          if ( realfft && HasFlag(HalfSpectrum) ) {\n            // pad at the Nyquist bin\n            tmp.head(ncopy) = src.head(ncopy);\n            tmp(ncopy-1) = real(tmp(ncopy-1)); // enforce real-only Nyquist bin\n          }else{\n            size_t nhead,ntail;\n            nhead = 1+ncopy/2-1; // range  [0:pi)\n            ntail = ncopy/2-1;   // range (-pi:0)\n            tmp.head(nhead) = src.head(nhead);\n            tmp.tail(ntail) = src.tail(ntail);\n            if (resize_input<0) { //shrinking -- create the Nyquist bin as the average of the two bins that fold into it\n              tmp(nhead) = ( src(nfft/2) + src( src.size() - nfft/2 ) )*real_type(.5);\n            }else{ // expanding -- split the old Nyquist bin into two halves\n              tmp(nhead) = src(nhead) * real_type(.5);\n              tmp(tmp.size()-nhead) = tmp(nhead);\n            }\n          }\n        }else{\n          tmp = src;\n        }\n        inv( &dst[0],&tmp[0], nfft);\n      }else{\n        inv( &dst[0],&src[0], nfft);\n      }\n    }\n\n    template <typename _Output>\n    inline\n    void inv( std::vector<_Output> & dst, const std::vector<Complex> & src,Index nfft=-1)\n    {\n      if (nfft<1)\n        nfft = ( NumTraits<_Output>::IsComplex == 0 && HasFlag(HalfSpectrum) ) ? 2*(src.size()-1) : src.size();\n      dst.resize( nfft );\n      inv( &dst[0],&src[0],nfft);\n    }\n\n\n    /*\n    // TODO: multi-dimensional FFTs\n    inline \n    void inv2(Complex * dst, const Complex * src, int n0,int n1)\n    {\n      m_impl.inv2(dst,src,n0,n1);\n      if ( HasFlag( Unscaled ) == false)\n          scale(dst,1./(n0*n1),n0*n1);\n    }\n  */\n\n    inline\n    impl_type & impl() {return m_impl;}\n  private:\n\n    template <typename T_Data>\n    inline\n    void scale(T_Data * x,Scalar s,Index nx)\n    {\n#if 1\n      for (int k=0;k<nx;++k)\n        *x++ *= s;\n#else\n      if ( ((ptrdiff_t)x) & 15 )\n        Matrix<T_Data, Dynamic, 1>::Map(x,nx) *= s;\n      else\n        Matrix<T_Data, Dynamic, 1>::MapAligned(x,nx) *= s;\n         //Matrix<T_Data, Dynamic, Dynamic>::Map(x,nx) * s;\n#endif  \n    }\n\n    inline\n    void ReflectSpectrum(Complex * freq, Index nfft)\n    {\n      // create the implicit right-half spectrum (conjugate-mirror of the left-half)\n      Index nhbins=(nfft>>1)+1;\n      for (Index k=nhbins;k < nfft; ++k )\n        freq[k] = conj(freq[nfft-k]);\n    }\n\n    impl_type m_impl;\n    int m_flag;\n};\n\ntemplate<typename T_SrcMat,typename T_FftIfc> \ntemplate<typename T_DestMat> inline \nvoid fft_fwd_proxy<T_SrcMat,T_FftIfc>::evalTo(T_DestMat& dst) const\n{\n    m_ifc.fwd( dst, m_src, m_nfft);\n}\n\ntemplate<typename T_SrcMat,typename T_FftIfc> \ntemplate<typename T_DestMat> inline \nvoid fft_inv_proxy<T_SrcMat,T_FftIfc>::evalTo(T_DestMat& dst) const\n{\n    m_ifc.inv( dst, m_src, m_nfft);\n}\n\n}\n\n#include \"../../Eigen/src/Core/util/ReenableStupidWarnings.h\"\n\n#endif\n/* vim: set filetype=cpp et sw=2 ts=2 ai: */\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/IterativeSolvers",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud <g.gael@free.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_ITERATIVE_SOLVERS_MODULE_H\n#define EIGEN_ITERATIVE_SOLVERS_MODULE_H\n\n#include \"../../Eigen/Sparse\"\n#include \"../../Eigen/Jacobi\"\n#include \"../../Eigen/Householder\"\n\n/**\n  * \\defgroup IterativeSolvers_Module Iterative solvers module\n  * This module aims to provide various iterative linear and non linear solver algorithms.\n  * It currently provides:\n  *  - a constrained conjugate gradient\n  *  - a Householder GMRES implementation\n  * \\code\n  * #include <unsupported/Eigen/IterativeSolvers>\n  * \\endcode\n  */\n//@{\n\n#include \"../../Eigen/src/Core/util/DisableStupidWarnings.h\"\n\n#ifndef EIGEN_MPL2_ONLY\n#include \"src/IterativeSolvers/IterationController.h\"\n#include \"src/IterativeSolvers/ConstrainedConjGrad.h\"\n#endif\n\n#include \"src/IterativeSolvers/IncompleteLU.h\"\n#include \"src/IterativeSolvers/GMRES.h\"\n#include \"src/IterativeSolvers/DGMRES.h\"\n//#include \"src/IterativeSolvers/SSORPreconditioner.h\"\n#include \"src/IterativeSolvers/MINRES.h\"\n\n#include \"../../Eigen/src/Core/util/ReenableStupidWarnings.h\"\n\n//@}\n\n#endif // EIGEN_ITERATIVE_SOLVERS_MODULE_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/KroneckerProduct",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_KRONECKER_PRODUCT_MODULE_H\n#define EIGEN_KRONECKER_PRODUCT_MODULE_H\n\n#include \"../../Eigen/Core\"\n\n#include \"../../Eigen/src/Core/util/DisableStupidWarnings.h\"\n\n#include \"../../Eigen/src/SparseCore/SparseUtil.h\"\n\nnamespace Eigen {\n\n/**\n  * \\defgroup KroneckerProduct_Module KroneckerProduct module\n  *\n  * This module contains an experimental Kronecker product implementation.\n  *\n  * \\code\n  * #include <Eigen/KroneckerProduct>\n  * \\endcode\n  */\n\n} // namespace Eigen\n\n#include \"src/KroneckerProduct/KroneckerTensorProduct.h\"\n\n#include \"../../Eigen/src/Core/util/ReenableStupidWarnings.h\"\n\n#endif // EIGEN_KRONECKER_PRODUCT_MODULE_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/LevenbergMarquardt",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Thomas Capricelli <orzel@freehackers.org>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_LEVENBERGMARQUARDT_MODULE\n#define EIGEN_LEVENBERGMARQUARDT_MODULE\n\n// #include <vector>\n\n#include \"../../Eigen/Core\"\n#include \"../../Eigen/Jacobi\"\n#include \"../../Eigen/QR\"\n#include \"NumericalDiff\"\n\n#include \"../../Eigen/SparseQR\"\n\n/**\n  * \\defgroup LevenbergMarquardt_Module Levenberg-Marquardt module\n  *\n  * \\code\n  * #include </Eigen/LevenbergMarquardt>\n  * \\endcode\n  *\n  * \n  */\n\n#include \"../../Eigen/SparseCore\"\n\n#include \"../../Eigen/src/Core/util/DisableStupidWarnings.h\"\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\n\n#include \"src/LevenbergMarquardt/LMqrsolv.h\"\n#include \"src/LevenbergMarquardt/LMcovar.h\"\n#include \"src/LevenbergMarquardt/LMpar.h\"\n\n#endif\n\n#include \"src/LevenbergMarquardt/LevenbergMarquardt.h\"\n#include \"src/LevenbergMarquardt/LMonestep.h\"\n\n#include \"../../Eigen/src/Core/util/ReenableStupidWarnings.h\"\n\n#endif // EIGEN_LEVENBERGMARQUARDT_MODULE\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/MPRealSupport",
    "content": "// This file is part of a joint effort between Eigen, a lightweight C++ template library\n// for linear algebra, and MPFR C++, a C++ interface to MPFR library (http://www.holoborodko.com/pavel/)\n//\n// Copyright (C) 2010-2012 Pavel Holoborodko <pavel@holoborodko.com>\n// Copyright (C) 2010 Konstantin Holoborodko <konstantin@holoborodko.com>\n// Copyright (C) 2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_MPREALSUPPORT_MODULE_H\n#define EIGEN_MPREALSUPPORT_MODULE_H\n\n#include \"../../Eigen/Core\"\n#include <mpreal.h>\n\nnamespace Eigen {\n  \n/**\n  * \\defgroup MPRealSupport_Module MPFRC++ Support module\n  * \\code\n  * #include <Eigen/MPRealSupport>\n  * \\endcode\n  *\n  * This module provides support for multi precision floating point numbers\n  * via the <a href=\"http://www.holoborodko.com/pavel/mpfr\">MPFR C++</a>\n  * library which itself is built upon <a href=\"http://www.mpfr.org/\">MPFR</a>/<a href=\"http://gmplib.org/\">GMP</a>.\n  *\n  * \\warning MPFR C++ is licensed under the GPL.\n  *\n  * You can find a copy of MPFR C++ that is known to be compatible in the unsupported/test/mpreal folder.\n  *\n  * Here is an example:\n  *\n\\code\n#include <iostream>\n#include <Eigen/MPRealSupport>\n#include <Eigen/LU>\nusing namespace mpfr;\nusing namespace Eigen;\nint main()\n{\n  // set precision to 256 bits (double has only 53 bits)\n  mpreal::set_default_prec(256);\n  // Declare matrix and vector types with multi-precision scalar type\n  typedef Matrix<mpreal,Dynamic,Dynamic>  MatrixXmp;\n  typedef Matrix<mpreal,Dynamic,1>        VectorXmp;\n\n  MatrixXmp A = MatrixXmp::Random(100,100);\n  VectorXmp b = VectorXmp::Random(100);\n\n  // Solve Ax=b using LU\n  VectorXmp x = A.lu().solve(b);\n  std::cout << \"relative error: \" << (A*x - b).norm() / b.norm() << std::endl;\n  return 0;\n}\n\\endcode\n  *\n  */\n\t\n  template<> struct NumTraits<mpfr::mpreal>\n    : GenericNumTraits<mpfr::mpreal>\n  {\n    enum {\n      IsInteger = 0,\n      IsSigned = 1,\n      IsComplex = 0,\n      RequireInitialization = 1,\n      ReadCost = HugeCost,\n      AddCost  = HugeCost,\n      MulCost  = HugeCost\n    };\n\n    typedef mpfr::mpreal Real;\n    typedef mpfr::mpreal NonInteger;\n    \n    static inline Real highest  (long Precision = mpfr::mpreal::get_default_prec()) { return  mpfr::maxval(Precision); }\n    static inline Real lowest   (long Precision = mpfr::mpreal::get_default_prec()) { return -mpfr::maxval(Precision); }\n\n    // Constants\n    static inline Real Pi      (long Precision = mpfr::mpreal::get_default_prec())  { return mpfr::const_pi(Precision);        }\n    static inline Real Euler   (long Precision = mpfr::mpreal::get_default_prec())  { return mpfr::const_euler(Precision);     }\n    static inline Real Log2    (long Precision = mpfr::mpreal::get_default_prec())  { return mpfr::const_log2(Precision);      }\n    static inline Real Catalan (long Precision = mpfr::mpreal::get_default_prec())  { return mpfr::const_catalan(Precision);   }\n\n    static inline Real epsilon (long Precision = mpfr::mpreal::get_default_prec())  { return mpfr::machine_epsilon(Precision); }\n    static inline Real epsilon (const Real& x)                                      { return mpfr::machine_epsilon(x); }\n\n#ifdef MPREAL_HAVE_DYNAMIC_STD_NUMERIC_LIMITS\n    static inline int digits10 (long Precision = mpfr::mpreal::get_default_prec())  { return std::numeric_limits<Real>::digits10(Precision); }\n    static inline int digits10 (const Real& x)                                      { return std::numeric_limits<Real>::digits10(x); }\n    \n    static inline int digits ()               { return std::numeric_limits<Real>::digits(); }\n    static inline int digits (const Real& x)  { return std::numeric_limits<Real>::digits(x); }\n#endif\n\n    static inline Real dummy_precision()\n    {\n      mpfr_prec_t weak_prec = ((mpfr::mpreal::get_default_prec()-1) * 90) / 100;\n      return mpfr::machine_epsilon(weak_prec);\n    }\n  };\n\n  namespace internal {\n\n  template<> inline mpfr::mpreal random<mpfr::mpreal>()\n  {\n    return mpfr::random();\n  }\n\n  template<> inline mpfr::mpreal random<mpfr::mpreal>(const mpfr::mpreal& a, const mpfr::mpreal& b)\n  {\n    return a + (b-a) * random<mpfr::mpreal>();\n  }\n\n  inline bool isMuchSmallerThan(const mpfr::mpreal& a, const mpfr::mpreal& b, const mpfr::mpreal& eps)\n  {\n    return mpfr::abs(a) <= mpfr::abs(b) * eps;\n  }\n\n  inline bool isApprox(const mpfr::mpreal& a, const mpfr::mpreal& b, const mpfr::mpreal& eps)\n  {\n    return mpfr::isEqualFuzzy(a,b,eps);\n  }\n\n  inline bool isApproxOrLessThan(const mpfr::mpreal& a, const mpfr::mpreal& b, const mpfr::mpreal& eps)\n  {\n    return a <= b || mpfr::isEqualFuzzy(a,b,eps);\n  }\n\n  template<> inline long double cast<mpfr::mpreal,long double>(const mpfr::mpreal& x)\n  { return x.toLDouble(); }\n\n  template<> inline double cast<mpfr::mpreal,double>(const mpfr::mpreal& x)\n  { return x.toDouble(); }\n\n  template<> inline long cast<mpfr::mpreal,long>(const mpfr::mpreal& x)\n  { return x.toLong(); }\n\n  template<> inline int cast<mpfr::mpreal,int>(const mpfr::mpreal& x)\n  { return int(x.toLong()); }\n\n  // Specialize GEBP kernel and traits for mpreal (no need for peeling, nor complicated stuff)\n  // This also permits to directly call mpfr's routines and avoid many temporaries produced by mpreal\n    template<>\n    class gebp_traits<mpfr::mpreal, mpfr::mpreal, false, false>\n    {\n    public:\n      typedef mpfr::mpreal ResScalar;\n      enum {\n        Vectorizable = false,\n        LhsPacketSize = 1,\n        RhsPacketSize = 1,\n        ResPacketSize = 1,\n        NumberOfRegisters = 1,\n        nr = 1,\n        mr = 1,\n        LhsProgress = 1,\n        RhsProgress = 1\n      };\n      typedef ResScalar LhsPacket;\n      typedef ResScalar RhsPacket;\n      typedef ResScalar ResPacket;\n      typedef LhsPacket LhsPacket4Packing;\n      \n    };\n\n\n\n    template<typename Index, typename DataMapper, bool ConjugateLhs, bool ConjugateRhs>\n    struct gebp_kernel<mpfr::mpreal,mpfr::mpreal,Index,DataMapper,1,1,ConjugateLhs,ConjugateRhs>\n    {\n      typedef mpfr::mpreal mpreal;\n\n      EIGEN_DONT_INLINE\n      void operator()(const DataMapper& res, const mpreal* blockA, const mpreal* blockB, \n                      Index rows, Index depth, Index cols, const mpreal& alpha,\n                      Index strideA=-1, Index strideB=-1, Index offsetA=0, Index offsetB=0)\n      {\n        if(rows==0 || cols==0 || depth==0)\n          return;\n\n        mpreal  acc1(0,mpfr_get_prec(blockA[0].mpfr_srcptr())),\n                tmp (0,mpfr_get_prec(blockA[0].mpfr_srcptr()));\n\n        if(strideA==-1) strideA = depth;\n        if(strideB==-1) strideB = depth;\n\n        for(Index i=0; i<rows; ++i)\n        {\n          for(Index j=0; j<cols; ++j)\n          {\n            const mpreal *A = blockA + i*strideA + offsetA;\n            const mpreal *B = blockB + j*strideB + offsetB;\n            \n            acc1 = 0;\n            for(Index k=0; k<depth; k++)\n            {\n              mpfr_mul(tmp.mpfr_ptr(), A[k].mpfr_srcptr(), B[k].mpfr_srcptr(), mpreal::get_default_rnd());\n              mpfr_add(acc1.mpfr_ptr(), acc1.mpfr_ptr(), tmp.mpfr_ptr(),  mpreal::get_default_rnd());\n            }\n            \n            mpfr_mul(acc1.mpfr_ptr(), acc1.mpfr_srcptr(), alpha.mpfr_srcptr(), mpreal::get_default_rnd());\n            mpfr_add(res(i,j).mpfr_ptr(), res(i,j).mpfr_srcptr(), acc1.mpfr_srcptr(),  mpreal::get_default_rnd());\n          }\n        }\n      }\n    };\n  } // end namespace internal\n}\n\n#endif // EIGEN_MPREALSUPPORT_MODULE_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/MatrixFunctions",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Jitse Niesen <jitse@maths.leeds.ac.uk>\n// Copyright (C) 2012 Chen-Pang He <jdh8@ms63.hinet.net>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_MATRIX_FUNCTIONS\n#define EIGEN_MATRIX_FUNCTIONS\n\n#include <cfloat>\n#include <list>\n\n#include \"../../Eigen/Core\"\n#include \"../../Eigen/LU\"\n#include \"../../Eigen/Eigenvalues\"\n\n/**\n  * \\defgroup MatrixFunctions_Module Matrix functions module\n  * \\brief This module aims to provide various methods for the computation of\n  * matrix functions. \n  *\n  * To use this module, add \n  * \\code\n  * #include <unsupported/Eigen/MatrixFunctions>\n  * \\endcode\n  * at the start of your source file.\n  *\n  * This module defines the following MatrixBase methods.\n  *  - \\ref matrixbase_cos \"MatrixBase::cos()\", for computing the matrix cosine\n  *  - \\ref matrixbase_cosh \"MatrixBase::cosh()\", for computing the matrix hyperbolic cosine\n  *  - \\ref matrixbase_exp \"MatrixBase::exp()\", for computing the matrix exponential\n  *  - \\ref matrixbase_log \"MatrixBase::log()\", for computing the matrix logarithm\n  *  - \\ref matrixbase_pow \"MatrixBase::pow()\", for computing the matrix power\n  *  - \\ref matrixbase_matrixfunction \"MatrixBase::matrixFunction()\", for computing general matrix functions\n  *  - \\ref matrixbase_sin \"MatrixBase::sin()\", for computing the matrix sine\n  *  - \\ref matrixbase_sinh \"MatrixBase::sinh()\", for computing the matrix hyperbolic sine\n  *  - \\ref matrixbase_sqrt \"MatrixBase::sqrt()\", for computing the matrix square root\n  *\n  * These methods are the main entry points to this module. \n  *\n  * %Matrix functions are defined as follows.  Suppose that \\f$ f \\f$\n  * is an entire function (that is, a function on the complex plane\n  * that is everywhere complex differentiable).  Then its Taylor\n  * series\n  * \\f[ f(0) + f'(0) x + \\frac{f''(0)}{2} x^2 + \\frac{f'''(0)}{3!} x^3 + \\cdots \\f]\n  * converges to \\f$ f(x) \\f$. In this case, we can define the matrix\n  * function by the same series:\n  * \\f[ f(M) = f(0) + f'(0) M + \\frac{f''(0)}{2} M^2 + \\frac{f'''(0)}{3!} M^3 + \\cdots \\f]\n  *\n  */\n\n#include \"../../Eigen/src/Core/util/DisableStupidWarnings.h\"\n\n#include \"src/MatrixFunctions/MatrixExponential.h\"\n#include \"src/MatrixFunctions/MatrixFunction.h\"\n#include \"src/MatrixFunctions/MatrixSquareRoot.h\"\n#include \"src/MatrixFunctions/MatrixLogarithm.h\"\n#include \"src/MatrixFunctions/MatrixPower.h\"\n\n#include \"../../Eigen/src/Core/util/ReenableStupidWarnings.h\"\n\n\n/** \n\\page matrixbaseextra_page\n\\ingroup MatrixFunctions_Module\n\n\\section matrixbaseextra MatrixBase methods defined in the MatrixFunctions module\n\nThe remainder of the page documents the following MatrixBase methods\nwhich are defined in the MatrixFunctions module.\n\n\n\n\\subsection matrixbase_cos MatrixBase::cos()\n\nCompute the matrix cosine.\n\n\\code\nconst MatrixFunctionReturnValue<Derived> MatrixBase<Derived>::cos() const\n\\endcode\n\n\\param[in]  M  a square matrix.\n\\returns  expression representing \\f$ \\cos(M) \\f$.\n\nThis function computes the matrix cosine. Use ArrayBase::cos() for computing the entry-wise cosine.\n\nThe implementation calls \\ref matrixbase_matrixfunction \"matrixFunction()\" with StdStemFunctions::cos().\n\n\\sa \\ref matrixbase_sin \"sin()\" for an example.\n\n\n\n\\subsection matrixbase_cosh MatrixBase::cosh()\n\nCompute the matrix hyberbolic cosine.\n\n\\code\nconst MatrixFunctionReturnValue<Derived> MatrixBase<Derived>::cosh() const\n\\endcode\n\n\\param[in]  M  a square matrix.\n\\returns  expression representing \\f$ \\cosh(M) \\f$\n\nThis function calls \\ref matrixbase_matrixfunction \"matrixFunction()\" with StdStemFunctions::cosh().\n\n\\sa \\ref matrixbase_sinh \"sinh()\" for an example.\n\n\n\n\\subsection matrixbase_exp MatrixBase::exp()\n\nCompute the matrix exponential.\n\n\\code\nconst MatrixExponentialReturnValue<Derived> MatrixBase<Derived>::exp() const\n\\endcode\n\n\\param[in]  M  matrix whose exponential is to be computed.\n\\returns    expression representing the matrix exponential of \\p M.\n\nThe matrix exponential of \\f$ M \\f$ is defined by\n\\f[ \\exp(M) = \\sum_{k=0}^\\infty \\frac{M^k}{k!}. \\f]\nThe matrix exponential can be used to solve linear ordinary\ndifferential equations: the solution of \\f$ y' = My \\f$ with the\ninitial condition \\f$ y(0) = y_0 \\f$ is given by\n\\f$ y(t) = \\exp(M) y_0 \\f$.\n\nThe matrix exponential is different from applying the exp function to all the entries in the matrix.\nUse ArrayBase::exp() if you want to do the latter.\n\nThe cost of the computation is approximately \\f$ 20 n^3 \\f$ for\nmatrices of size \\f$ n \\f$. The number 20 depends weakly on the\nnorm of the matrix.\n\nThe matrix exponential is computed using the scaling-and-squaring\nmethod combined with Pad&eacute; approximation. The matrix is first\nrescaled, then the exponential of the reduced matrix is computed\napproximant, and then the rescaling is undone by repeated\nsquaring. The degree of the Pad&eacute; approximant is chosen such\nthat the approximation error is less than the round-off\nerror. However, errors may accumulate during the squaring phase.\n\nDetails of the algorithm can be found in: Nicholas J. Higham, \"The\nscaling and squaring method for the matrix exponential revisited,\"\n<em>SIAM J. %Matrix Anal. Applic.</em>, <b>26</b>:1179&ndash;1193,\n2005.\n\nExample: The following program checks that\n\\f[ \\exp \\left[ \\begin{array}{ccc}\n      0 & \\frac14\\pi & 0 \\\\\n      -\\frac14\\pi & 0 & 0 \\\\\n      0 & 0 & 0\n    \\end{array} \\right] = \\left[ \\begin{array}{ccc}\n      \\frac12\\sqrt2 & -\\frac12\\sqrt2 & 0 \\\\\n      \\frac12\\sqrt2 & \\frac12\\sqrt2 & 0 \\\\\n      0 & 0 & 1\n    \\end{array} \\right]. \\f]\nThis corresponds to a rotation of \\f$ \\frac14\\pi \\f$ radians around\nthe z-axis.\n\n\\include MatrixExponential.cpp\nOutput: \\verbinclude MatrixExponential.out\n\n\\note \\p M has to be a matrix of \\c float, \\c double, `long double`\n\\c complex<float>, \\c complex<double>, or `complex<long double>` .\n\n\n\\subsection matrixbase_log MatrixBase::log()\n\nCompute the matrix logarithm.\n\n\\code\nconst MatrixLogarithmReturnValue<Derived> MatrixBase<Derived>::log() const\n\\endcode\n\n\\param[in]  M  invertible matrix whose logarithm is to be computed.\n\\returns    expression representing the matrix logarithm root of \\p M.\n\nThe matrix logarithm of \\f$ M \\f$ is a matrix \\f$ X \\f$ such that \n\\f$ \\exp(X) = M \\f$ where exp denotes the matrix exponential. As for\nthe scalar logarithm, the equation \\f$ \\exp(X) = M \\f$ may have\nmultiple solutions; this function returns a matrix whose eigenvalues\nhave imaginary part in the interval \\f$ (-\\pi,\\pi] \\f$.\n\nThe matrix logarithm is different from applying the log function to all the entries in the matrix.\nUse ArrayBase::log() if you want to do the latter.\n\nIn the real case, the matrix \\f$ M \\f$ should be invertible and\nit should have no eigenvalues which are real and negative (pairs of\ncomplex conjugate eigenvalues are allowed). In the complex case, it\nonly needs to be invertible.\n\nThis function computes the matrix logarithm using the Schur-Parlett\nalgorithm as implemented by MatrixBase::matrixFunction(). The\nlogarithm of an atomic block is computed by MatrixLogarithmAtomic,\nwhich uses direct computation for 1-by-1 and 2-by-2 blocks and an\ninverse scaling-and-squaring algorithm for bigger blocks, with the\nsquare roots computed by MatrixBase::sqrt().\n\nDetails of the algorithm can be found in Section 11.6.2 of:\nNicholas J. Higham,\n<em>Functions of Matrices: Theory and Computation</em>,\nSIAM 2008. ISBN 978-0-898716-46-7.\n\nExample: The following program checks that\n\\f[ \\log \\left[ \\begin{array}{ccc} \n      \\frac12\\sqrt2 & -\\frac12\\sqrt2 & 0 \\\\\n      \\frac12\\sqrt2 & \\frac12\\sqrt2 & 0 \\\\\n      0 & 0 & 1\n    \\end{array} \\right] = \\left[ \\begin{array}{ccc}\n      0 & \\frac14\\pi & 0 \\\\ \n      -\\frac14\\pi & 0 & 0 \\\\\n      0 & 0 & 0 \n    \\end{array} \\right]. \\f]\nThis corresponds to a rotation of \\f$ \\frac14\\pi \\f$ radians around\nthe z-axis. This is the inverse of the example used in the\ndocumentation of \\ref matrixbase_exp \"exp()\".\n\n\\include MatrixLogarithm.cpp\nOutput: \\verbinclude MatrixLogarithm.out\n\n\\note \\p M has to be a matrix of \\c float, \\c double, `long\ndouble`, \\c complex<float>, \\c complex<double>, or `complex<long double>`.\n\n\\sa MatrixBase::exp(), MatrixBase::matrixFunction(), \n    class MatrixLogarithmAtomic, MatrixBase::sqrt().\n\n\n\\subsection matrixbase_pow MatrixBase::pow()\n\nCompute the matrix raised to arbitrary real power.\n\n\\code\nconst MatrixPowerReturnValue<Derived> MatrixBase<Derived>::pow(RealScalar p) const\n\\endcode\n\n\\param[in]  M  base of the matrix power, should be a square matrix.\n\\param[in]  p  exponent of the matrix power.\n\nThe matrix power \\f$ M^p \\f$ is defined as \\f$ \\exp(p \\log(M)) \\f$,\nwhere exp denotes the matrix exponential, and log denotes the matrix\nlogarithm. This is different from raising all the entries in the matrix\nto the p-th power. Use ArrayBase::pow() if you want to do the latter.\n\nIf \\p p is complex, the scalar type of \\p M should be the type of \\p\np . \\f$ M^p \\f$ simply evaluates into \\f$ \\exp(p \\log(M)) \\f$.\nTherefore, the matrix \\f$ M \\f$ should meet the conditions to be an\nargument of matrix logarithm.\n\nIf \\p p is real, it is casted into the real scalar type of \\p M. Then\nthis function computes the matrix power using the Schur-Pad&eacute;\nalgorithm as implemented by class MatrixPower. The exponent is split\ninto integral part and fractional part, where the fractional part is\nin the interval \\f$ (-1, 1) \\f$. The main diagonal and the first\nsuper-diagonal is directly computed.\n\nIf \\p M is singular with a semisimple zero eigenvalue and \\p p is\npositive, the Schur factor \\f$ T \\f$ is reordered with Givens\nrotations, i.e.\n\n\\f[ T = \\left[ \\begin{array}{cc}\n      T_1 & T_2 \\\\\n      0   & 0\n    \\end{array} \\right] \\f]\n\nwhere \\f$ T_1 \\f$ is invertible. Then \\f$ T^p \\f$ is given by\n\n\\f[ T^p = \\left[ \\begin{array}{cc}\n      T_1^p & T_1^{-1} T_1^p T_2 \\\\\n      0     & 0\n    \\end{array}. \\right] \\f]\n\n\\warning Fractional power of a matrix with a non-semisimple zero\neigenvalue is not well-defined. We introduce an assertion failure\nagainst inaccurate result, e.g. \\code\n#include <unsupported/Eigen/MatrixFunctions>\n#include <iostream>\n\nint main()\n{\n  Eigen::Matrix4d A;\n  A << 0, 0, 2, 3,\n       0, 0, 4, 5,\n       0, 0, 6, 7,\n       0, 0, 8, 9;\n  std::cout << A.pow(0.37) << std::endl;\n  \n  // The 1 makes eigenvalue 0 non-semisimple.\n  A.coeffRef(0, 1) = 1;\n\n  // This fails if EIGEN_NO_DEBUG is undefined.\n  std::cout << A.pow(0.37) << std::endl;\n\n  return 0;\n}\n\\endcode\n\nDetails of the algorithm can be found in: Nicholas J. Higham and\nLijing Lin, \"A Schur-Pad&eacute; algorithm for fractional powers of a\nmatrix,\" <em>SIAM J. %Matrix Anal. Applic.</em>,\n<b>32(3)</b>:1056&ndash;1078, 2011.\n\nExample: The following program checks that\n\\f[ \\left[ \\begin{array}{ccc}\n      \\cos1 & -\\sin1 & 0 \\\\\n      \\sin1 & \\cos1 & 0 \\\\\n      0 & 0 & 1\n    \\end{array} \\right]^{\\frac14\\pi} = \\left[ \\begin{array}{ccc}\n      \\frac12\\sqrt2 & -\\frac12\\sqrt2 & 0 \\\\\n      \\frac12\\sqrt2 & \\frac12\\sqrt2 & 0 \\\\\n      0 & 0 & 1\n    \\end{array} \\right]. \\f]\nThis corresponds to \\f$ \\frac14\\pi \\f$ rotations of 1 radian around\nthe z-axis.\n\n\\include MatrixPower.cpp\nOutput: \\verbinclude MatrixPower.out\n\nMatrixBase::pow() is user-friendly. However, there are some\ncircumstances under which you should use class MatrixPower directly.\nMatrixPower can save the result of Schur decomposition, so it's\nbetter for computing various powers for the same matrix.\n\nExample:\n\\include MatrixPower_optimal.cpp\nOutput: \\verbinclude MatrixPower_optimal.out\n\n\\note \\p M has to be a matrix of \\c float, \\c double, `long\ndouble`, \\c complex<float>, \\c complex<double>, or\n\\c complex<long double> .\n\n\\sa MatrixBase::exp(), MatrixBase::log(), class MatrixPower.\n\n\n\\subsection matrixbase_matrixfunction MatrixBase::matrixFunction()\n\nCompute a matrix function.\n\n\\code\nconst MatrixFunctionReturnValue<Derived> MatrixBase<Derived>::matrixFunction(typename internal::stem_function<typename internal::traits<Derived>::Scalar>::type f) const\n\\endcode\n\n\\param[in]  M  argument of matrix function, should be a square matrix.\n\\param[in]  f  an entire function; \\c f(x,n) should compute the n-th\nderivative of f at x.\n\\returns  expression representing \\p f applied to \\p M.\n\nSuppose that \\p M is a matrix whose entries have type \\c Scalar. \nThen, the second argument, \\p f, should be a function with prototype\n\\code \nComplexScalar f(ComplexScalar, int) \n\\endcode\nwhere \\c ComplexScalar = \\c std::complex<Scalar> if \\c Scalar is\nreal (e.g., \\c float or \\c double) and \\c ComplexScalar =\n\\c Scalar if \\c Scalar is complex. The return value of \\c f(x,n)\nshould be \\f$ f^{(n)}(x) \\f$, the n-th derivative of f at x.\n\nThis routine uses the algorithm described in:\nPhilip Davies and Nicholas J. Higham, \n\"A Schur-Parlett algorithm for computing matrix functions\", \n<em>SIAM J. %Matrix Anal. Applic.</em>, <b>25</b>:464&ndash;485, 2003.\n\nThe actual work is done by the MatrixFunction class.\n\nExample: The following program checks that\n\\f[ \\exp \\left[ \\begin{array}{ccc} \n      0 & \\frac14\\pi & 0 \\\\ \n      -\\frac14\\pi & 0 & 0 \\\\\n      0 & 0 & 0 \n    \\end{array} \\right] = \\left[ \\begin{array}{ccc}\n      \\frac12\\sqrt2 & -\\frac12\\sqrt2 & 0 \\\\\n      \\frac12\\sqrt2 & \\frac12\\sqrt2 & 0 \\\\\n      0 & 0 & 1\n    \\end{array} \\right]. \\f]\nThis corresponds to a rotation of \\f$ \\frac14\\pi \\f$ radians around\nthe z-axis. This is the same example as used in the documentation\nof \\ref matrixbase_exp \"exp()\".\n\n\\include MatrixFunction.cpp\nOutput: \\verbinclude MatrixFunction.out\n\nNote that the function \\c expfn is defined for complex numbers \n\\c x, even though the matrix \\c A is over the reals. Instead of\n\\c expfn, we could also have used StdStemFunctions::exp:\n\\code\nA.matrixFunction(StdStemFunctions<std::complex<double> >::exp, &B);\n\\endcode\n\n\n\n\\subsection matrixbase_sin MatrixBase::sin()\n\nCompute the matrix sine.\n\n\\code\nconst MatrixFunctionReturnValue<Derived> MatrixBase<Derived>::sin() const\n\\endcode\n\n\\param[in]  M  a square matrix.\n\\returns  expression representing \\f$ \\sin(M) \\f$.\n\nThis function computes the matrix sine. Use ArrayBase::sin() for computing the entry-wise sine.\n\nThe implementation calls \\ref matrixbase_matrixfunction \"matrixFunction()\" with StdStemFunctions::sin().\n\nExample: \\include MatrixSine.cpp\nOutput: \\verbinclude MatrixSine.out\n\n\n\n\\subsection matrixbase_sinh MatrixBase::sinh()\n\nCompute the matrix hyperbolic sine.\n\n\\code\nMatrixFunctionReturnValue<Derived> MatrixBase<Derived>::sinh() const\n\\endcode\n\n\\param[in]  M  a square matrix.\n\\returns  expression representing \\f$ \\sinh(M) \\f$\n\nThis function calls \\ref matrixbase_matrixfunction \"matrixFunction()\" with StdStemFunctions::sinh().\n\nExample: \\include MatrixSinh.cpp\nOutput: \\verbinclude MatrixSinh.out\n\n\n\\subsection matrixbase_sqrt MatrixBase::sqrt()\n\nCompute the matrix square root.\n\n\\code\nconst MatrixSquareRootReturnValue<Derived> MatrixBase<Derived>::sqrt() const\n\\endcode\n\n\\param[in]  M  invertible matrix whose square root is to be computed.\n\\returns    expression representing the matrix square root of \\p M.\n\nThe matrix square root of \\f$ M \\f$ is the matrix \\f$ M^{1/2} \\f$\nwhose square is the original matrix; so if \\f$ S = M^{1/2} \\f$ then\n\\f$ S^2 = M \\f$. This is different from taking the square root of all\nthe entries in the matrix; use ArrayBase::sqrt() if you want to do the\nlatter.\n\nIn the <b>real case</b>, the matrix \\f$ M \\f$ should be invertible and\nit should have no eigenvalues which are real and negative (pairs of\ncomplex conjugate eigenvalues are allowed). In that case, the matrix\nhas a square root which is also real, and this is the square root\ncomputed by this function. \n\nThe matrix square root is computed by first reducing the matrix to\nquasi-triangular form with the real Schur decomposition. The square\nroot of the quasi-triangular matrix can then be computed directly. The\ncost is approximately \\f$ 25 n^3 \\f$ real flops for the real Schur\ndecomposition and \\f$ 3\\frac13 n^3 \\f$ real flops for the remainder\n(though the computation time in practice is likely more than this\nindicates).\n\nDetails of the algorithm can be found in: Nicholas J. Highan,\n\"Computing real square roots of a real matrix\", <em>Linear Algebra\nAppl.</em>, 88/89:405&ndash;430, 1987.\n\nIf the matrix is <b>positive-definite symmetric</b>, then the square\nroot is also positive-definite symmetric. In this case, it is best to\nuse SelfAdjointEigenSolver::operatorSqrt() to compute it.\n\nIn the <b>complex case</b>, the matrix \\f$ M \\f$ should be invertible;\nthis is a restriction of the algorithm. The square root computed by\nthis algorithm is the one whose eigenvalues have an argument in the\ninterval \\f$ (-\\frac12\\pi, \\frac12\\pi] \\f$. This is the usual branch\ncut.\n\nThe computation is the same as in the real case, except that the\ncomplex Schur decomposition is used to reduce the matrix to a\ntriangular matrix. The theoretical cost is the same. Details are in:\n&Aring;ke Bj&ouml;rck and Sven Hammarling, \"A Schur method for the\nsquare root of a matrix\", <em>Linear Algebra Appl.</em>,\n52/53:127&ndash;140, 1983.\n\nExample: The following program checks that the square root of\n\\f[ \\left[ \\begin{array}{cc} \n              \\cos(\\frac13\\pi) & -\\sin(\\frac13\\pi) \\\\\n              \\sin(\\frac13\\pi) & \\cos(\\frac13\\pi)\n    \\end{array} \\right], \\f]\ncorresponding to a rotation over 60 degrees, is a rotation over 30 degrees:\n\\f[ \\left[ \\begin{array}{cc} \n              \\cos(\\frac16\\pi) & -\\sin(\\frac16\\pi) \\\\\n              \\sin(\\frac16\\pi) & \\cos(\\frac16\\pi)\n    \\end{array} \\right]. \\f]\n\n\\include MatrixSquareRoot.cpp\nOutput: \\verbinclude MatrixSquareRoot.out\n\n\\sa class RealSchur, class ComplexSchur, class MatrixSquareRoot,\n    SelfAdjointEigenSolver::operatorSqrt().\n\n*/\n\n#endif // EIGEN_MATRIX_FUNCTIONS\n\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/MoreVectorization",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_MOREVECTORIZATION_MODULE_H\n#define EIGEN_MOREVECTORIZATION_MODULE_H\n\n#include \"../../Eigen/Core\"\n\nnamespace Eigen {\n\n/**\n  * \\defgroup MoreVectorization More vectorization module\n  */\n\n}\n\n#include \"src/MoreVectorization/MathFunctions.h\"\n\n#endif // EIGEN_MOREVECTORIZATION_MODULE_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/NonLinearOptimization",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Thomas Capricelli <orzel@freehackers.org>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_NONLINEAROPTIMIZATION_MODULE\n#define EIGEN_NONLINEAROPTIMIZATION_MODULE\n\n#include <vector>\n\n#include \"../../Eigen/Core\"\n#include \"../../Eigen/Jacobi\"\n#include \"../../Eigen/QR\"\n#include \"NumericalDiff\"\n\n/**\n  * \\defgroup NonLinearOptimization_Module Non linear optimization module\n  *\n  * \\code\n  * #include <unsupported/Eigen/NonLinearOptimization>\n  * \\endcode\n  *\n  * This module provides implementation of two important algorithms in non linear\n  * optimization. In both cases, we consider a system of non linear functions. Of\n  * course, this should work, and even work very well if those functions are\n  * actually linear. But if this is so, you should probably better use other\n  * methods more fitted to this special case.\n  *\n  * One algorithm allows to find a least-squares solution of such a system\n  * (Levenberg-Marquardt algorithm) and the second one is used to find \n  * a zero for the system (Powell hybrid \"dogleg\" method).\n  *\n  * This code is a port of minpack (http://en.wikipedia.org/wiki/MINPACK).\n  * Minpack is a very famous, old, robust and well renowned package, written in\n  * fortran. Those implementations have been carefully tuned, tested, and used\n  * for several decades.\n  *\n  * The original fortran code was automatically translated using f2c (http://en.wikipedia.org/wiki/F2c) in C,\n  * then c++, and then cleaned by several different authors.\n  * The last one of those cleanings being our starting point : \n  * http://devernay.free.fr/hacks/cminpack.html\n  * \n  * Finally, we ported this code to Eigen, creating classes and API\n  * coherent with Eigen. When possible, we switched to Eigen\n  * implementation, such as most linear algebra (vectors, matrices, stable norms).\n  *\n  * Doing so, we were very careful to check the tests we setup at the very\n  * beginning, which ensure that the same results are found.\n  *\n  * \\section Tests Tests\n  * \n  * The tests are placed in the file unsupported/test/NonLinear.cpp.\n  * \n  * There are two kinds of tests : those that come from examples bundled with cminpack.\n  * They guaranty we get the same results as the original algorithms (value for 'x',\n  * for the number of evaluations of the function, and for the number of evaluations\n  * of the Jacobian if ever).\n  * \n  * Other tests were added by myself at the very beginning of the \n  * process and check the results for Levenberg-Marquardt using the reference data \n  * on http://www.itl.nist.gov/div898/strd/nls/nls_main.shtml. Since then i've \n  * carefully checked that the same results were obtained when modifying the\n  * code. Please note that we do not always get the exact same decimals as they do,\n  * but this is ok : they use 128bits float, and we do the tests using the C type 'double',\n  * which is 64 bits on most platforms (x86 and amd64, at least).\n  * I've performed those tests on several other implementations of Levenberg-Marquardt, and\n  * (c)minpack performs VERY well compared to those, both in accuracy and speed.\n  * \n  * The documentation for running the tests is on the wiki\n  * http://eigen.tuxfamily.org/index.php?title=Tests\n  * \n  * \\section API API: overview of methods\n  * \n  * Both algorithms needs a functor computing the Jacobian. It can be computed by\n  * hand, using auto-differentiation (see \\ref AutoDiff_Module), or using numerical\n  * differences (see \\ref NumericalDiff_Module). For instance:\n  *\\code\n  * MyFunc func;\n  * NumericalDiff<MyFunc> func_with_num_diff(func);\n  * LevenbergMarquardt<NumericalDiff<MyFunc> > lm(func_with_num_diff);\n  * \\endcode\n  * For HybridNonLinearSolver, the method solveNumericalDiff() does the above wrapping for\n  * you.\n  * \n  * The methods LevenbergMarquardt.lmder1()/lmdif1()/lmstr1() and \n  * HybridNonLinearSolver.hybrj1()/hybrd1() are specific methods from the original \n  * minpack package that you probably should NOT use until you are porting a code that\n  * was previously using minpack. They just define a 'simple' API with default values \n  * for some parameters.\n  * \n  * All algorithms are provided using two APIs :\n  *     - one where the user inits the algorithm, and uses '*OneStep()' as much as he wants : \n  * this way the caller have control over the steps\n  *     - one where the user just calls a method (optimize() or solve()) which will \n  * handle the loop: init + loop until a stop condition is met. Those are provided for\n  *  convenience.\n  * \n  * As an example, the method LevenbergMarquardt::minimize() is \n  * implemented as follow: \n  * \\code\n  * Status LevenbergMarquardt<FunctorType,Scalar>::minimize(FVectorType  &x, const int mode)\n  * {\n  *     Status status = minimizeInit(x, mode);\n  *     do {\n  *         status = minimizeOneStep(x, mode);\n  *     } while (status==Running);\n  *     return status;\n  * }\n  * \\endcode\n  * \n  * \\section examples Examples\n  * \n  * The easiest way to understand how to use this module is by looking at the many examples in the file\n  * unsupported/test/NonLinearOptimization.cpp.\n  */\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\n\n#include \"src/NonLinearOptimization/qrsolv.h\"\n#include \"src/NonLinearOptimization/r1updt.h\"\n#include \"src/NonLinearOptimization/r1mpyq.h\"\n#include \"src/NonLinearOptimization/rwupdt.h\"\n#include \"src/NonLinearOptimization/fdjac1.h\"\n#include \"src/NonLinearOptimization/lmpar.h\"\n#include \"src/NonLinearOptimization/dogleg.h\"\n#include \"src/NonLinearOptimization/covar.h\"\n\n#include \"src/NonLinearOptimization/chkder.h\"\n\n#endif\n\n#include \"src/NonLinearOptimization/HybridNonLinearSolver.h\"\n#include \"src/NonLinearOptimization/LevenbergMarquardt.h\"\n\n\n#endif // EIGEN_NONLINEAROPTIMIZATION_MODULE\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/NumericalDiff",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Thomas Capricelli <orzel@freehackers.org>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_NUMERICALDIFF_MODULE\n#define EIGEN_NUMERICALDIFF_MODULE\n\n#include \"../../Eigen/Core\"\n\nnamespace Eigen {\n\n/**\n  * \\defgroup NumericalDiff_Module Numerical differentiation module\n  *\n  * \\code\n  * #include <unsupported/Eigen/NumericalDiff>\n  * \\endcode\n  *\n  * See http://en.wikipedia.org/wiki/Numerical_differentiation\n  *\n  * Warning : this should NOT be confused with automatic differentiation, which\n  * is a different method and has its own module in Eigen : \\ref\n  * AutoDiff_Module.\n  *\n  * Currently only \"Forward\" and \"Central\" schemes are implemented. Those\n  * are basic methods, and there exist some more elaborated way of\n  * computing such approximates. They are implemented using both\n  * proprietary and free software, and usually requires linking to an\n  * external library. It is very easy for you to write a functor\n  * using such software, and the purpose is quite orthogonal to what we\n  * want to achieve with Eigen.\n  *\n  * This is why we will not provide wrappers for every great numerical\n  * differentiation software that exist, but should rather stick with those\n  * basic ones, that still are useful for testing.\n  *\n  * Also, the \\ref NonLinearOptimization_Module needs this in order to\n  * provide full features compatibility with the original (c)minpack\n  * package.\n  *\n  */\n}\n\n//@{\n\n#include \"src/NumericalDiff/NumericalDiff.h\"\n\n//@}\n\n\n#endif // EIGEN_NUMERICALDIFF_MODULE\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/OpenGLSupport",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_OPENGL_MODULE\n#define EIGEN_OPENGL_MODULE\n\n#include \"../../Eigen/Geometry\"\n\n#if defined(__APPLE_CC__)\n  #include <OpenGL/gl.h>\n#else\n  #include <GL/gl.h>\n#endif\n\nnamespace Eigen {\n\n/**\n  * \\defgroup OpenGLSUpport_Module OpenGL Support module\n  *\n  * This module provides wrapper functions for a couple of OpenGL functions\n  * which simplify the way to pass Eigen's object to openGL.\n  * Here is an example:\n  * \n  * \\code\n  * // You need to add path_to_eigen/unsupported to your include path.\n  * #include <Eigen/OpenGLSupport>\n  * // ...\n  * Vector3f x, y;\n  * Matrix3f rot;\n  * \n  * glVertex(y + x * rot);\n  * \n  * Quaternion q;\n  * glRotate(q);\n  * \n  * // ...\n  * \\endcode\n  *\n  */\n//@{\n\n#define EIGEN_GL_FUNC_DECLARATION(FUNC)                                                                             \\\nnamespace internal {                                                                                                \\\n  template< typename XprType,                                                                                       \\\n            typename Scalar = typename XprType::Scalar,                                                             \\\n            int Rows = XprType::RowsAtCompileTime,                                                                  \\\n            int Cols = XprType::ColsAtCompileTime,                                                                  \\\n            bool IsGLCompatible = bool(internal::evaluator<XprType>::Flags&LinearAccessBit)                         \\\n                              && bool(XprType::Flags&DirectAccessBit)                                               \\\n                              && (XprType::IsVectorAtCompileTime || (XprType::Flags&RowMajorBit)==0)>               \\\n  struct EIGEN_CAT(EIGEN_CAT(gl_,FUNC),_impl);                                                                      \\\n                                                                                                                    \\\n  template<typename XprType, typename Scalar, int Rows, int Cols>                                                   \\\n  struct EIGEN_CAT(EIGEN_CAT(gl_,FUNC),_impl)<XprType,Scalar,Rows,Cols,false> {                                     \\\n    inline static void run(const XprType& p) {                                                                      \\\n      EIGEN_CAT(EIGEN_CAT(gl_,FUNC),_impl)<typename plain_matrix_type_column_major<XprType>::type>::run(p); }       \\\n  };                                                                                                                \\\n}                                                                                                                   \\\n                                                                                                                    \\\ntemplate<typename Derived> inline void FUNC(const Eigen::DenseBase<Derived>& p) {                                   \\\n  EIGEN_CAT(EIGEN_CAT(internal::gl_,FUNC),_impl)<Derived>::run(p.derived());                                        \\\n}\n\n\n#define EIGEN_GL_FUNC_SPECIALIZATION_MAT(FUNC,SCALAR,ROWS,COLS,SUFFIX)                                              \\\nnamespace internal {                                                                                                \\\n  template< typename XprType> struct EIGEN_CAT(EIGEN_CAT(gl_,FUNC),_impl)<XprType, SCALAR, ROWS, COLS, true> {      \\\n    inline static void run(const XprType& p) { FUNC##SUFFIX(p.data()); }                                            \\\n  };                                                                                                                \\\n}\n\n  \n#define EIGEN_GL_FUNC_SPECIALIZATION_VEC(FUNC,SCALAR,SIZE,SUFFIX)                                                   \\\nnamespace internal {                                                                                                \\\n  template< typename XprType> struct EIGEN_CAT(EIGEN_CAT(gl_,FUNC),_impl)<XprType, SCALAR, SIZE, 1, true> {         \\\n    inline static void run(const XprType& p) { FUNC##SUFFIX(p.data()); }                                            \\\n  };                                                                                                                \\\n  template< typename XprType> struct EIGEN_CAT(EIGEN_CAT(gl_,FUNC),_impl)<XprType, SCALAR, 1, SIZE, true> {         \\\n    inline static void run(const XprType& p) { FUNC##SUFFIX(p.data()); }                                            \\\n  };                                                                                                                \\\n}\n\n  \nEIGEN_GL_FUNC_DECLARATION       (glVertex)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glVertex,int,    2,2iv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glVertex,short,  2,2sv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glVertex,float,  2,2fv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glVertex,double, 2,2dv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glVertex,int,    3,3iv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glVertex,short,  3,3sv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glVertex,float,  3,3fv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glVertex,double, 3,3dv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glVertex,int,    4,4iv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glVertex,short,  4,4sv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glVertex,float,  4,4fv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glVertex,double, 4,4dv)\n\nEIGEN_GL_FUNC_DECLARATION       (glTexCoord)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glTexCoord,int,    2,2iv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glTexCoord,short,  2,2sv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glTexCoord,float,  2,2fv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glTexCoord,double, 2,2dv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glTexCoord,int,    3,3iv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glTexCoord,short,  3,3sv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glTexCoord,float,  3,3fv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glTexCoord,double, 3,3dv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glTexCoord,int,    4,4iv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glTexCoord,short,  4,4sv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glTexCoord,float,  4,4fv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glTexCoord,double, 4,4dv)\n\nEIGEN_GL_FUNC_DECLARATION       (glColor)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glColor,int,    2,2iv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glColor,short,  2,2sv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glColor,float,  2,2fv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glColor,double, 2,2dv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glColor,int,    3,3iv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glColor,short,  3,3sv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glColor,float,  3,3fv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glColor,double, 3,3dv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glColor,int,    4,4iv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glColor,short,  4,4sv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glColor,float,  4,4fv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glColor,double, 4,4dv)\n\nEIGEN_GL_FUNC_DECLARATION       (glNormal)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glNormal,int,    3,3iv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glNormal,short,  3,3sv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glNormal,float,  3,3fv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glNormal,double, 3,3dv)\n\ninline void glScale2fv(const float*  v) { glScalef(v[0], v[1], 1.f);  }\ninline void glScale2dv(const double* v) { glScaled(v[0], v[1], 1.0);  }\ninline void glScale3fv(const float*  v) { glScalef(v[0], v[1], v[2]); }\ninline void glScale3dv(const double* v) { glScaled(v[0], v[1], v[2]); }\n\nEIGEN_GL_FUNC_DECLARATION       (glScale)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glScale,float,  2,2fv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glScale,double, 2,2dv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glScale,float,  3,3fv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glScale,double, 3,3dv)\n\ntemplate<typename Scalar> void glScale(const UniformScaling<Scalar>& s)  { glScale(Matrix<Scalar,3,1>::Constant(s.factor())); }\n\ninline void glTranslate2fv(const float*  v) { glTranslatef(v[0], v[1], 0.f);  }\ninline void glTranslate2dv(const double* v) { glTranslated(v[0], v[1], 0.0);  }\ninline void glTranslate3fv(const float*  v) { glTranslatef(v[0], v[1], v[2]); }\ninline void glTranslate3dv(const double* v) { glTranslated(v[0], v[1], v[2]); }\n\nEIGEN_GL_FUNC_DECLARATION       (glTranslate)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glTranslate,float,  2,2fv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glTranslate,double, 2,2dv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glTranslate,float,  3,3fv)\nEIGEN_GL_FUNC_SPECIALIZATION_VEC(glTranslate,double, 3,3dv)\n\ntemplate<typename Scalar> void glTranslate(const Translation<Scalar,2>& t)  { glTranslate(t.vector()); }\ntemplate<typename Scalar> void glTranslate(const Translation<Scalar,3>& t)  { glTranslate(t.vector()); }\n\nEIGEN_GL_FUNC_DECLARATION       (glMultMatrix)\nEIGEN_GL_FUNC_SPECIALIZATION_MAT(glMultMatrix,float,  4,4,f)\nEIGEN_GL_FUNC_SPECIALIZATION_MAT(glMultMatrix,double, 4,4,d)\n\ntemplate<typename Scalar> void glMultMatrix(const Transform<Scalar,3,Affine>& t)        { glMultMatrix(t.matrix()); }\ntemplate<typename Scalar> void glMultMatrix(const Transform<Scalar,3,Projective>& t)    { glMultMatrix(t.matrix()); }\ntemplate<typename Scalar> void glMultMatrix(const Transform<Scalar,3,AffineCompact>& t) { glMultMatrix(Transform<Scalar,3,Affine>(t).matrix()); }\n\nEIGEN_GL_FUNC_DECLARATION       (glLoadMatrix)\nEIGEN_GL_FUNC_SPECIALIZATION_MAT(glLoadMatrix,float,  4,4,f)\nEIGEN_GL_FUNC_SPECIALIZATION_MAT(glLoadMatrix,double, 4,4,d)\n\ntemplate<typename Scalar> void glLoadMatrix(const Transform<Scalar,3,Affine>& t)        { glLoadMatrix(t.matrix()); }\ntemplate<typename Scalar> void glLoadMatrix(const Transform<Scalar,3,Projective>& t)    { glLoadMatrix(t.matrix()); }\ntemplate<typename Scalar> void glLoadMatrix(const Transform<Scalar,3,AffineCompact>& t) { glLoadMatrix(Transform<Scalar,3,Affine>(t).matrix()); }\n\ninline void glRotate(const Rotation2D<float>& rot)\n{\n  glRotatef(rot.angle()*180.f/float(EIGEN_PI), 0.f, 0.f, 1.f);\n}\ninline void glRotate(const Rotation2D<double>& rot)\n{\n  glRotated(rot.angle()*180.0/double(EIGEN_PI), 0.0, 0.0, 1.0);\n}\n\ntemplate<typename Derived> void glRotate(const RotationBase<Derived,3>& rot)\n{  \n  Transform<typename Derived::Scalar,3,Projective> tr(rot);\n  glMultMatrix(tr.matrix());\n}\n\n#define EIGEN_GL_MAKE_CONST_const const\n#define EIGEN_GL_MAKE_CONST__ \n#define EIGEN_GL_EVAL(X) X\n\n#define EIGEN_GL_FUNC1_DECLARATION(FUNC,ARG1,CONST)                                                                             \\\nnamespace internal {                                                                                                            \\\n  template< typename XprType,                                                                                                   \\\n            typename Scalar = typename XprType::Scalar,                                                                         \\\n            int Rows = XprType::RowsAtCompileTime,                                                                              \\\n            int Cols = XprType::ColsAtCompileTime,                                                                              \\\n            bool IsGLCompatible = bool(internal::evaluator<XprType>::Flags&LinearAccessBit)                                     \\\n                              && bool(XprType::Flags&DirectAccessBit)                                                           \\\n                              && (XprType::IsVectorAtCompileTime || (XprType::Flags&RowMajorBit)==0)>                           \\\n  struct EIGEN_CAT(EIGEN_CAT(gl_,FUNC),_impl);                                                                                  \\\n                                                                                                                                \\\n  template<typename XprType, typename Scalar, int Rows, int Cols>                                                               \\\n  struct EIGEN_CAT(EIGEN_CAT(gl_,FUNC),_impl)<XprType,Scalar,Rows,Cols,false> {                                                 \\\n    inline static void run(ARG1 a,EIGEN_GL_EVAL(EIGEN_GL_MAKE_CONST_##CONST) XprType& p) {                                      \\\n      EIGEN_CAT(EIGEN_CAT(gl_,FUNC),_impl)<typename plain_matrix_type_column_major<XprType>::type>::run(a,p); }                 \\\n  };                                                                                                                            \\\n}                                                                                                                               \\\n                                                                                                                                \\\ntemplate<typename Derived> inline void FUNC(ARG1 a,EIGEN_GL_EVAL(EIGEN_GL_MAKE_CONST_##CONST) Eigen::DenseBase<Derived>& p) {   \\\n  EIGEN_CAT(EIGEN_CAT(internal::gl_,FUNC),_impl)<Derived>::run(a,p.derived());                                                  \\\n}\n\n\n#define EIGEN_GL_FUNC1_SPECIALIZATION_MAT(FUNC,ARG1,CONST,SCALAR,ROWS,COLS,SUFFIX)                                              \\\nnamespace internal {                                                                                                            \\\n  template< typename XprType> struct EIGEN_CAT(EIGEN_CAT(gl_,FUNC),_impl)<XprType, SCALAR, ROWS, COLS, true> {                  \\\n    inline static void run(ARG1 a, EIGEN_GL_EVAL(EIGEN_GL_MAKE_CONST_##CONST) XprType& p) { FUNC##SUFFIX(a,p.data()); }         \\\n  }; \\\n}\n\n  \n#define EIGEN_GL_FUNC1_SPECIALIZATION_VEC(FUNC,ARG1,CONST,SCALAR,SIZE,SUFFIX)                                                   \\\nnamespace internal {                                                                                                            \\\n  template< typename XprType> struct EIGEN_CAT(EIGEN_CAT(gl_,FUNC),_impl)<XprType, SCALAR, SIZE, 1, true> {                     \\\n    inline static void run(ARG1 a, EIGEN_GL_EVAL(EIGEN_GL_MAKE_CONST_##CONST) XprType& p) { FUNC##SUFFIX(a,p.data()); }         \\\n  };                                                                                                                            \\\n  template< typename XprType> struct EIGEN_CAT(EIGEN_CAT(gl_,FUNC),_impl)<XprType, SCALAR, 1, SIZE, true> {                     \\\n    inline static void run(ARG1 a, EIGEN_GL_EVAL(EIGEN_GL_MAKE_CONST_##CONST) XprType& p) { FUNC##SUFFIX(a,p.data()); }         \\\n  };                                                                                                                            \\\n}\n\nEIGEN_GL_FUNC1_DECLARATION       (glGet,GLenum,_)\nEIGEN_GL_FUNC1_SPECIALIZATION_MAT(glGet,GLenum,_,float,  4,4,Floatv)\nEIGEN_GL_FUNC1_SPECIALIZATION_MAT(glGet,GLenum,_,double, 4,4,Doublev)\n\n// glUniform API\n\n#ifdef GL_VERSION_2_0\n\ninline void glUniform2fv_ei  (GLint loc, const float* v)         { glUniform2fv(loc,1,v); }\ninline void glUniform2iv_ei  (GLint loc, const int* v)           { glUniform2iv(loc,1,v); }\n\ninline void glUniform3fv_ei  (GLint loc, const float* v)         { glUniform3fv(loc,1,v); }\ninline void glUniform3iv_ei  (GLint loc, const int* v)           { glUniform3iv(loc,1,v); }\n\ninline void glUniform4fv_ei  (GLint loc, const float* v)         { glUniform4fv(loc,1,v); }\ninline void glUniform4iv_ei  (GLint loc, const int* v)           { glUniform4iv(loc,1,v); }\n\ninline void glUniformMatrix2fv_ei  (GLint loc, const float* v)         { glUniformMatrix2fv(loc,1,false,v); }\ninline void glUniformMatrix3fv_ei  (GLint loc, const float* v)         { glUniformMatrix3fv(loc,1,false,v); }\ninline void glUniformMatrix4fv_ei  (GLint loc, const float* v)         { glUniformMatrix4fv(loc,1,false,v); }\n\n\nEIGEN_GL_FUNC1_DECLARATION       (glUniform,GLint,const)\nEIGEN_GL_FUNC1_SPECIALIZATION_VEC(glUniform,GLint,const,float,        2,2fv_ei)\nEIGEN_GL_FUNC1_SPECIALIZATION_VEC(glUniform,GLint,const,int,          2,2iv_ei)\nEIGEN_GL_FUNC1_SPECIALIZATION_VEC(glUniform,GLint,const,float,        3,3fv_ei)\nEIGEN_GL_FUNC1_SPECIALIZATION_VEC(glUniform,GLint,const,int,          3,3iv_ei)\nEIGEN_GL_FUNC1_SPECIALIZATION_VEC(glUniform,GLint,const,float,        4,4fv_ei)\nEIGEN_GL_FUNC1_SPECIALIZATION_VEC(glUniform,GLint,const,int,          4,4iv_ei)\n\nEIGEN_GL_FUNC1_SPECIALIZATION_MAT(glUniform,GLint,const,float,        2,2,Matrix2fv_ei)\nEIGEN_GL_FUNC1_SPECIALIZATION_MAT(glUniform,GLint,const,float,        3,3,Matrix3fv_ei)\nEIGEN_GL_FUNC1_SPECIALIZATION_MAT(glUniform,GLint,const,float,        4,4,Matrix4fv_ei)\n\n#endif\n\n#ifdef GL_VERSION_2_1\n\ninline void glUniformMatrix2x3fv_ei(GLint loc, const float* v)         { glUniformMatrix2x3fv(loc,1,false,v); }\ninline void glUniformMatrix3x2fv_ei(GLint loc, const float* v)         { glUniformMatrix3x2fv(loc,1,false,v); }\ninline void glUniformMatrix2x4fv_ei(GLint loc, const float* v)         { glUniformMatrix2x4fv(loc,1,false,v); }\ninline void glUniformMatrix4x2fv_ei(GLint loc, const float* v)         { glUniformMatrix4x2fv(loc,1,false,v); }\ninline void glUniformMatrix3x4fv_ei(GLint loc, const float* v)         { glUniformMatrix3x4fv(loc,1,false,v); }\ninline void glUniformMatrix4x3fv_ei(GLint loc, const float* v)         { glUniformMatrix4x3fv(loc,1,false,v); }\n\nEIGEN_GL_FUNC1_SPECIALIZATION_MAT(glUniform,GLint,const,float,        2,3,Matrix2x3fv_ei)\nEIGEN_GL_FUNC1_SPECIALIZATION_MAT(glUniform,GLint,const,float,        3,2,Matrix3x2fv_ei)\nEIGEN_GL_FUNC1_SPECIALIZATION_MAT(glUniform,GLint,const,float,        2,4,Matrix2x4fv_ei)\nEIGEN_GL_FUNC1_SPECIALIZATION_MAT(glUniform,GLint,const,float,        4,2,Matrix4x2fv_ei)\nEIGEN_GL_FUNC1_SPECIALIZATION_MAT(glUniform,GLint,const,float,        3,4,Matrix3x4fv_ei)\nEIGEN_GL_FUNC1_SPECIALIZATION_MAT(glUniform,GLint,const,float,        4,3,Matrix4x3fv_ei)\n\n#endif\n\n#ifdef GL_VERSION_3_0\n\ninline void glUniform2uiv_ei (GLint loc, const unsigned int* v)  { glUniform2uiv(loc,1,v); }\ninline void glUniform3uiv_ei (GLint loc, const unsigned int* v)  { glUniform3uiv(loc,1,v); }\ninline void glUniform4uiv_ei (GLint loc, const unsigned int* v)  { glUniform4uiv(loc,1,v); }\n\nEIGEN_GL_FUNC1_SPECIALIZATION_VEC(glUniform,GLint,const,unsigned int, 2,2uiv_ei)\nEIGEN_GL_FUNC1_SPECIALIZATION_VEC(glUniform,GLint,const,unsigned int, 3,3uiv_ei)\nEIGEN_GL_FUNC1_SPECIALIZATION_VEC(glUniform,GLint,const,unsigned int, 4,4uiv_ei)\n\n#endif\n\n#ifdef GL_ARB_gpu_shader_fp64\ninline void glUniform2dv_ei  (GLint loc, const double* v)        { glUniform2dv(loc,1,v); }\ninline void glUniform3dv_ei  (GLint loc, const double* v)        { glUniform3dv(loc,1,v); }\ninline void glUniform4dv_ei  (GLint loc, const double* v)        { glUniform4dv(loc,1,v); }\n\nEIGEN_GL_FUNC1_SPECIALIZATION_VEC(glUniform,GLint,const,double,       2,2dv_ei)\nEIGEN_GL_FUNC1_SPECIALIZATION_VEC(glUniform,GLint,const,double,       3,3dv_ei)\nEIGEN_GL_FUNC1_SPECIALIZATION_VEC(glUniform,GLint,const,double,       4,4dv_ei)\n#endif\n\n\n//@}\n\n}\n\n#endif // EIGEN_OPENGL_MODULE\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/Polynomials",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_POLYNOMIALS_MODULE_H\n#define EIGEN_POLYNOMIALS_MODULE_H\n\n#include \"../../Eigen/Core\"\n\n#include \"../../Eigen/Eigenvalues\"\n\n#include \"../../Eigen/src/Core/util/DisableStupidWarnings.h\"\n\n// Note that EIGEN_HIDE_HEAVY_CODE has to be defined per module\n#if (defined EIGEN_EXTERN_INSTANTIATIONS) && (EIGEN_EXTERN_INSTANTIATIONS>=2)\n  #ifndef EIGEN_HIDE_HEAVY_CODE\n  #define EIGEN_HIDE_HEAVY_CODE\n  #endif\n#elif defined EIGEN_HIDE_HEAVY_CODE\n  #undef EIGEN_HIDE_HEAVY_CODE\n#endif\n\n/**\n  * \\defgroup Polynomials_Module Polynomials module\n  * \\brief This module provides a QR based polynomial solver.\n\t*\n  * To use this module, add\n  * \\code\n  * #include <unsupported/Eigen/Polynomials>\n  * \\endcode\n\t* at the start of your source file.\n  */\n\n#include \"src/Polynomials/PolynomialUtils.h\"\n#include \"src/Polynomials/Companion.h\"\n#include \"src/Polynomials/PolynomialSolver.h\"\n\n/**\n\t\\page polynomials Polynomials defines functions for dealing with polynomials\n\tand a QR based polynomial solver.\n\t\\ingroup Polynomials_Module\n\n\tThe remainder of the page documents first the functions for evaluating, computing\n\tpolynomials, computing estimates about polynomials and next the QR based polynomial\n\tsolver.\n\n\t\\section polynomialUtils convenient functions to deal with polynomials\n\t\\subsection roots_to_monicPolynomial\n\tThe function\n\t\\code\n\tvoid roots_to_monicPolynomial( const RootVector& rv, Polynomial& poly )\n\t\\endcode\n\tcomputes the coefficients \\f$ a_i \\f$ of\n\n\t\\f$ p(x) = a_0 + a_{1}x + ... + a_{n-1}x^{n-1} + x^n \\f$\n\n\twhere \\f$ p \\f$ is known through its roots i.e. \\f$ p(x) = (x-r_1)(x-r_2)...(x-r_n) \\f$.\n\n\t\\subsection poly_eval\n\tThe function\n\t\\code\n\tT poly_eval( const Polynomials& poly, const T& x )\n\t\\endcode\n\tevaluates a polynomial at a given point using stabilized H&ouml;rner method.\n\n\tThe following code: first computes the coefficients in the monomial basis of the monic polynomial that has the provided roots;\n\tthen, it evaluates the computed polynomial, using a stabilized H&ouml;rner method.\n\n\t\\include PolynomialUtils1.cpp\n  Output: \\verbinclude PolynomialUtils1.out\n\n\t\\subsection Cauchy bounds\n\tThe function\n\t\\code\n\tReal cauchy_max_bound( const Polynomial& poly )\n\t\\endcode\n\tprovides a maximum bound (the Cauchy one: \\f$C(p)\\f$) for the absolute value of a root of the given polynomial i.e.\n\t\\f$ \\forall r_i \\f$ root of \\f$ p(x) = \\sum_{k=0}^d a_k x^k \\f$,\n\t\\f$ |r_i| \\le C(p) = \\sum_{k=0}^{d} \\left | \\frac{a_k}{a_d} \\right | \\f$\n\tThe leading coefficient \\f$ p \\f$: should be non zero \\f$a_d \\neq 0\\f$.\n\n\n\tThe function\n\t\\code\n\tReal cauchy_min_bound( const Polynomial& poly )\n\t\\endcode\n\tprovides a minimum bound (the Cauchy one: \\f$c(p)\\f$) for the absolute value of a non zero root of the given polynomial i.e.\n\t\\f$ \\forall r_i \\neq 0 \\f$ root of \\f$ p(x) = \\sum_{k=0}^d a_k x^k \\f$,\n\t\\f$ |r_i| \\ge c(p) = \\left( \\sum_{k=0}^{d} \\left | \\frac{a_k}{a_0} \\right | \\right)^{-1} \\f$\n\n\n\n\n\t\\section QR polynomial solver class\n\tComputes the complex roots of a polynomial by computing the eigenvalues of the associated companion matrix with the QR algorithm.\n\t\n\tThe roots of \\f$ p(x) = a_0 + a_1 x + a_2 x^2 + a_{3} x^3 + x^4 \\f$ are the eigenvalues of\n\t\\f$\n\t\\left [\n\t\\begin{array}{cccc}\n\t0 & 0 &  0 & a_0 \\\\\n\t1 & 0 &  0 & a_1 \\\\\n\t0 & 1 &  0 & a_2 \\\\\n\t0 & 0 &  1 & a_3\n\t\\end{array} \\right ]\n\t\\f$\n\n\tHowever, the QR algorithm is not guaranteed to converge when there are several eigenvalues with same modulus.\n\n\tTherefore the current polynomial solver is guaranteed to provide a correct result only when the complex roots \\f$r_1,r_2,...,r_d\\f$ have distinct moduli i.e.\n\t\n\t\\f$ \\forall i,j \\in [1;d],~ \\| r_i \\| \\neq \\| r_j \\| \\f$.\n\n\tWith 32bit (float) floating types this problem shows up frequently.\n  However, almost always, correct accuracy is reached even in these cases for 64bit\n  (double) floating types and small polynomial degree (<20).\n\n\t\\include PolynomialSolver1.cpp\n\t\n\tIn the above example:\n\t\n\t-# a simple use of the polynomial solver is shown;\n\t-# the accuracy problem with the QR algorithm is presented: a polynomial with almost conjugate roots is provided to the solver.\n\tThose roots have almost same module therefore the QR algorithm failed to converge: the accuracy\n\tof the last root is bad;\n\t-# a simple way to circumvent the problem is shown: use doubles instead of floats.\n\n  Output: \\verbinclude PolynomialSolver1.out\n*/\n\n#include \"../../Eigen/src/Core/util/ReenableStupidWarnings.h\"\n\n#endif // EIGEN_POLYNOMIALS_MODULE_H\n/* vim: set filetype=cpp et sw=2 ts=2 ai: */\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/Skyline",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SKYLINE_MODULE_H\n#define EIGEN_SKYLINE_MODULE_H\n\n\n#include \"../../Eigen/Core\"\n\n#include \"../../Eigen/src/Core/util/DisableStupidWarnings.h\"\n\n#include <map>\n#include <cstdlib>\n#include <cstring>\n#include <algorithm>\n\n/**\n *  \\defgroup Skyline_Module Skyline module\n *\n *\n *\n *\n */\n\n#include \"src/Skyline/SkylineUtil.h\"\n#include \"src/Skyline/SkylineMatrixBase.h\"\n#include \"src/Skyline/SkylineStorage.h\"\n#include \"src/Skyline/SkylineMatrix.h\"\n#include \"src/Skyline/SkylineInplaceLU.h\"\n#include \"src/Skyline/SkylineProduct.h\"\n\n#include \"../../Eigen/src/Core/util/ReenableStupidWarnings.h\"\n\n#endif // EIGEN_SKYLINE_MODULE_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/SparseExtra",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud <g.gael@free.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPARSE_EXTRA_MODULE_H\n#define EIGEN_SPARSE_EXTRA_MODULE_H\n\n#include \"../../Eigen/Sparse\"\n\n#include \"../../Eigen/src/Core/util/DisableStupidWarnings.h\"\n\n#include <vector>\n#include <map>\n#include <cstdlib>\n#include <cstring>\n#include <algorithm>\n#include <fstream>\n#include <sstream>\n\n#ifdef EIGEN_GOOGLEHASH_SUPPORT\n  #include <google/dense_hash_map>\n#endif\n\n/**\n  * \\defgroup SparseExtra_Module SparseExtra module\n  *\n  * This module contains some experimental features extending the sparse module.\n  *\n  * \\code\n  * #include <Eigen/SparseExtra>\n  * \\endcode\n  */\n\n\n#include \"src/SparseExtra/DynamicSparseMatrix.h\"\n#include \"src/SparseExtra/BlockOfDynamicSparseMatrix.h\"\n#include \"src/SparseExtra/RandomSetter.h\"\n\n#include \"src/SparseExtra/MarketIO.h\"\n\n#if !defined(_WIN32)\n#include <dirent.h>\n#include \"src/SparseExtra/MatrixMarketIterator.h\"\n#endif\n\n#include \"../../Eigen/src/Core/util/ReenableStupidWarnings.h\"\n\n#endif // EIGEN_SPARSE_EXTRA_MODULE_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/SpecialFunctions",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Gael Guennebaud <g.gael@free.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPECIALFUNCTIONS_MODULE\n#define EIGEN_SPECIALFUNCTIONS_MODULE\n\n#include <math.h>\n\n#include \"../../Eigen/Core\"\n\n#include \"../../Eigen/src/Core/util/DisableStupidWarnings.h\"\n\nnamespace Eigen {\n\n/**\n  * \\defgroup SpecialFunctions_Module Special math functions module\n  *\n  * This module features additional coefficient-wise math functions available\n  * within the numext:: namespace for the scalar version, and as method and/or free\n  * functions of Array. Those include:\n  *\n  * - erf\n  * - erfc\n  * - lgamma\n  * - igamma\n  * - igamma_der_a\n  * - gamma_sample_der_alpha\n  * - igammac\n  * - digamma\n  * - ndtri\n  * - polygamma\n  * - zeta\n  * - betainc\n  *\n  * Bessel Functions\n  * - bessel_i0\n  * - bessel_i0e\n  * - bessel_i1\n  * - bessel_i1e\n  * - bessel_j0\n  * - bessel_j1\n  * - bessel_k0\n  * - bessel_k0e\n  * - bessel_k1\n  * - bessel_k1e\n  * - bessel_y0\n  * - bessel_y1\n  *\n  * \\code\n  * #include <unsupported/Eigen/SpecialFunctions>\n  * \\endcode\n  */\n//@{\n\n}\n\n#include \"src/SpecialFunctions/BesselFunctionsImpl.h\"\n#include \"src/SpecialFunctions/BesselFunctionsPacketMath.h\"\n#include \"src/SpecialFunctions/BesselFunctionsHalf.h\"\n#include \"src/SpecialFunctions/BesselFunctionsFunctors.h\"\n#include \"src/SpecialFunctions/BesselFunctionsArrayAPI.h\"\n#include \"src/SpecialFunctions/SpecialFunctionsImpl.h\"\n#if defined(EIGEN_HIPCC)\n#include \"src/SpecialFunctions/HipVectorCompatibility.h\"\n#endif\n#include \"src/SpecialFunctions/SpecialFunctionsPacketMath.h\"\n#include \"src/SpecialFunctions/SpecialFunctionsHalf.h\"\n#include \"src/SpecialFunctions/SpecialFunctionsFunctors.h\"\n#include \"src/SpecialFunctions/SpecialFunctionsArrayAPI.h\"\n\n#if defined EIGEN_VECTORIZE_GPU\n  #include \"src/SpecialFunctions/arch/GPU/GpuSpecialFunctions.h\"\n#endif\n\nnamespace Eigen {\n//@}\n}\n\n\n#include \"../../Eigen/src/Core/util/ReenableStupidWarnings.h\"\n\n#endif // EIGEN_SPECIALFUNCTIONS_MODULE\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/Splines",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 20010-2011 Hauke Heibel <hauke.heibel@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPLINES_MODULE_H\n#define EIGEN_SPLINES_MODULE_H\n\nnamespace Eigen \n{\n/**\n  * \\defgroup Splines_Module Spline and spline fitting module\n  *\n  * This module provides a simple multi-dimensional spline class while\n  * offering most basic functionality to fit a spline to point sets.\n  *\n  * \\code\n  * #include <unsupported/Eigen/Splines>\n  * \\endcode\n  */\n}\n\n#include \"../../Eigen/src/Core/util/DisableStupidWarnings.h\"\n\n#include \"src/Splines/SplineFwd.h\"\n#include \"src/Splines/Spline.h\"\n#include \"src/Splines/SplineFitting.h\"\n\n#include \"../../Eigen/src/Core/util/ReenableStupidWarnings.h\"\n\n#endif // EIGEN_SPLINES_MODULE_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_AUTODIFF_JACOBIAN_H\n#define EIGEN_AUTODIFF_JACOBIAN_H\n\nnamespace Eigen\n{\n\ntemplate<typename Functor> class AutoDiffJacobian : public Functor\n{\npublic:\n  AutoDiffJacobian() : Functor() {}\n  AutoDiffJacobian(const Functor& f) : Functor(f) {}\n\n  // forward constructors\n#if EIGEN_HAS_VARIADIC_TEMPLATES\n  template<typename... T>\n  AutoDiffJacobian(const T& ...Values) : Functor(Values...) {}\n#else\n  template<typename T0>\n  AutoDiffJacobian(const T0& a0) : Functor(a0) {}\n  template<typename T0, typename T1>\n  AutoDiffJacobian(const T0& a0, const T1& a1) : Functor(a0, a1) {}\n  template<typename T0, typename T1, typename T2>\n  AutoDiffJacobian(const T0& a0, const T1& a1, const T2& a2) : Functor(a0, a1, a2) {}\n#endif\n\n  typedef typename Functor::InputType InputType;\n  typedef typename Functor::ValueType ValueType;\n  typedef typename ValueType::Scalar Scalar;\n\n  enum {\n    InputsAtCompileTime = InputType::RowsAtCompileTime,\n    ValuesAtCompileTime = ValueType::RowsAtCompileTime\n  };\n\n  typedef Matrix<Scalar, ValuesAtCompileTime, InputsAtCompileTime> JacobianType;\n  typedef typename JacobianType::Index Index;\n\n  typedef Matrix<Scalar, InputsAtCompileTime, 1> DerivativeType;\n  typedef AutoDiffScalar<DerivativeType> ActiveScalar;\n\n  typedef Matrix<ActiveScalar, InputsAtCompileTime, 1> ActiveInput;\n  typedef Matrix<ActiveScalar, ValuesAtCompileTime, 1> ActiveValue;\n\n#if EIGEN_HAS_VARIADIC_TEMPLATES\n  // Some compilers don't accept variadic parameters after a default parameter,\n  // i.e., we can't just write _jac=0 but we need to overload operator():\n  EIGEN_STRONG_INLINE\n  void operator() (const InputType& x, ValueType* v) const\n  {\n      this->operator()(x, v, 0);\n  }\n  template<typename... ParamsType>\n  void operator() (const InputType& x, ValueType* v, JacobianType* _jac,\n                   const ParamsType&... Params) const\n#else\n  void operator() (const InputType& x, ValueType* v, JacobianType* _jac=0) const\n#endif\n  {\n    eigen_assert(v!=0);\n\n    if (!_jac)\n    {\n#if EIGEN_HAS_VARIADIC_TEMPLATES\n      Functor::operator()(x, v, Params...);\n#else\n      Functor::operator()(x, v);\n#endif\n      return;\n    }\n\n    JacobianType& jac = *_jac;\n\n    ActiveInput ax = x.template cast<ActiveScalar>();\n    ActiveValue av(jac.rows());\n\n    if(InputsAtCompileTime==Dynamic)\n      for (Index j=0; j<jac.rows(); j++)\n        av[j].derivatives().resize(x.rows());\n\n    for (Index i=0; i<jac.cols(); i++)\n      ax[i].derivatives() = DerivativeType::Unit(x.rows(),i);\n\n#if EIGEN_HAS_VARIADIC_TEMPLATES\n    Functor::operator()(ax, &av, Params...);\n#else\n    Functor::operator()(ax, &av);\n#endif\n\n    for (Index i=0; i<jac.rows(); i++)\n    {\n      (*v)[i] = av[i].value();\n      jac.row(i) = av[i].derivatives();\n    }\n  }\n};\n\n}\n\n#endif // EIGEN_AUTODIFF_JACOBIAN_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_AUTODIFF_SCALAR_H\n#define EIGEN_AUTODIFF_SCALAR_H\n\nnamespace Eigen {\n\nnamespace internal {\n\ntemplate<typename A, typename B>\nstruct make_coherent_impl {\n  static void run(A&, B&) {}\n};\n\n// resize a to match b is a.size()==0, and conversely.\ntemplate<typename A, typename B>\nvoid make_coherent(const A& a, const B&b)\n{\n  make_coherent_impl<A,B>::run(a.const_cast_derived(), b.const_cast_derived());\n}\n\ntemplate<typename _DerType, bool Enable> struct auto_diff_special_op;\n\n} // end namespace internal\n\ntemplate<typename _DerType> class AutoDiffScalar;\n\ntemplate<typename NewDerType>\ninline AutoDiffScalar<NewDerType> MakeAutoDiffScalar(const typename NewDerType::Scalar& value, const NewDerType &der) {\n  return AutoDiffScalar<NewDerType>(value,der);\n}\n\n/** \\class AutoDiffScalar\n  * \\brief A scalar type replacement with automatic differentation capability\n  *\n  * \\param _DerType the vector type used to store/represent the derivatives. The base scalar type\n  *                 as well as the number of derivatives to compute are determined from this type.\n  *                 Typical choices include, e.g., \\c Vector4f for 4 derivatives, or \\c VectorXf\n  *                 if the number of derivatives is not known at compile time, and/or, the number\n  *                 of derivatives is large.\n  *                 Note that _DerType can also be a reference (e.g., \\c VectorXf&) to wrap a\n  *                 existing vector into an AutoDiffScalar.\n  *                 Finally, _DerType can also be any Eigen compatible expression.\n  *\n  * This class represents a scalar value while tracking its respective derivatives using Eigen's expression\n  * template mechanism.\n  *\n  * It supports the following list of global math function:\n  *  - std::abs, std::sqrt, std::pow, std::exp, std::log, std::sin, std::cos,\n  *  - internal::abs, internal::sqrt, numext::pow, internal::exp, internal::log, internal::sin, internal::cos,\n  *  - internal::conj, internal::real, internal::imag, numext::abs2.\n  *\n  * AutoDiffScalar can be used as the scalar type of an Eigen::Matrix object. However,\n  * in that case, the expression template mechanism only occurs at the top Matrix level,\n  * while derivatives are computed right away.\n  *\n  */\n\ntemplate<typename _DerType>\nclass AutoDiffScalar\n  : public internal::auto_diff_special_op\n            <_DerType, !internal::is_same<typename internal::traits<typename internal::remove_all<_DerType>::type>::Scalar,\n                                          typename NumTraits<typename internal::traits<typename internal::remove_all<_DerType>::type>::Scalar>::Real>::value>\n{\n  public:\n    typedef internal::auto_diff_special_op\n            <_DerType, !internal::is_same<typename internal::traits<typename internal::remove_all<_DerType>::type>::Scalar,\n                       typename NumTraits<typename internal::traits<typename internal::remove_all<_DerType>::type>::Scalar>::Real>::value> Base;\n    typedef typename internal::remove_all<_DerType>::type DerType;\n    typedef typename internal::traits<DerType>::Scalar Scalar;\n    typedef typename NumTraits<Scalar>::Real Real;\n\n    using Base::operator+;\n    using Base::operator*;\n\n    /** Default constructor without any initialization. */\n    AutoDiffScalar() {}\n\n    /** Constructs an active scalar from its \\a value,\n        and initializes the \\a nbDer derivatives such that it corresponds to the \\a derNumber -th variable */\n    AutoDiffScalar(const Scalar& value, int nbDer, int derNumber)\n      : m_value(value), m_derivatives(DerType::Zero(nbDer))\n    {\n      m_derivatives.coeffRef(derNumber) = Scalar(1);\n    }\n\n    /** Conversion from a scalar constant to an active scalar.\n      * The derivatives are set to zero. */\n    /*explicit*/ AutoDiffScalar(const Real& value)\n      : m_value(value)\n    {\n      if(m_derivatives.size()>0)\n        m_derivatives.setZero();\n    }\n\n    /** Constructs an active scalar from its \\a value and derivatives \\a der */\n    AutoDiffScalar(const Scalar& value, const DerType& der)\n      : m_value(value), m_derivatives(der)\n    {}\n\n    template<typename OtherDerType>\n    AutoDiffScalar(const AutoDiffScalar<OtherDerType>& other\n#ifndef EIGEN_PARSED_BY_DOXYGEN\n    , typename internal::enable_if<\n            internal::is_same<Scalar, typename internal::traits<typename internal::remove_all<OtherDerType>::type>::Scalar>::value\n        &&  internal::is_convertible<OtherDerType,DerType>::value , void*>::type = 0\n#endif\n    )\n      : m_value(other.value()), m_derivatives(other.derivatives())\n    {}\n\n    friend  std::ostream & operator << (std::ostream & s, const AutoDiffScalar& a)\n    {\n      return s << a.value();\n    }\n\n    AutoDiffScalar(const AutoDiffScalar& other)\n      : m_value(other.value()), m_derivatives(other.derivatives())\n    {}\n\n    template<typename OtherDerType>\n    inline AutoDiffScalar& operator=(const AutoDiffScalar<OtherDerType>& other)\n    {\n      m_value = other.value();\n      m_derivatives = other.derivatives();\n      return *this;\n    }\n\n    inline AutoDiffScalar& operator=(const AutoDiffScalar& other)\n    {\n      m_value = other.value();\n      m_derivatives = other.derivatives();\n      return *this;\n    }\n\n    inline AutoDiffScalar& operator=(const Scalar& other)\n    {\n      m_value = other;\n      if(m_derivatives.size()>0)\n        m_derivatives.setZero();\n      return *this;\n    }\n\n//     inline operator const Scalar& () const { return m_value; }\n//     inline operator Scalar& () { return m_value; }\n\n    inline const Scalar& value() const { return m_value; }\n    inline Scalar& value() { return m_value; }\n\n    inline const DerType& derivatives() const { return m_derivatives; }\n    inline DerType& derivatives() { return m_derivatives; }\n\n    inline bool operator< (const Scalar& other) const  { return m_value <  other; }\n    inline bool operator<=(const Scalar& other) const  { return m_value <= other; }\n    inline bool operator> (const Scalar& other) const  { return m_value >  other; }\n    inline bool operator>=(const Scalar& other) const  { return m_value >= other; }\n    inline bool operator==(const Scalar& other) const  { return m_value == other; }\n    inline bool operator!=(const Scalar& other) const  { return m_value != other; }\n\n    friend inline bool operator< (const Scalar& a, const AutoDiffScalar& b) { return a <  b.value(); }\n    friend inline bool operator<=(const Scalar& a, const AutoDiffScalar& b) { return a <= b.value(); }\n    friend inline bool operator> (const Scalar& a, const AutoDiffScalar& b) { return a >  b.value(); }\n    friend inline bool operator>=(const Scalar& a, const AutoDiffScalar& b) { return a >= b.value(); }\n    friend inline bool operator==(const Scalar& a, const AutoDiffScalar& b) { return a == b.value(); }\n    friend inline bool operator!=(const Scalar& a, const AutoDiffScalar& b) { return a != b.value(); }\n\n    template<typename OtherDerType> inline bool operator< (const AutoDiffScalar<OtherDerType>& b) const  { return m_value <  b.value(); }\n    template<typename OtherDerType> inline bool operator<=(const AutoDiffScalar<OtherDerType>& b) const  { return m_value <= b.value(); }\n    template<typename OtherDerType> inline bool operator> (const AutoDiffScalar<OtherDerType>& b) const  { return m_value >  b.value(); }\n    template<typename OtherDerType> inline bool operator>=(const AutoDiffScalar<OtherDerType>& b) const  { return m_value >= b.value(); }\n    template<typename OtherDerType> inline bool operator==(const AutoDiffScalar<OtherDerType>& b) const  { return m_value == b.value(); }\n    template<typename OtherDerType> inline bool operator!=(const AutoDiffScalar<OtherDerType>& b) const  { return m_value != b.value(); }\n\n    inline const AutoDiffScalar<DerType&> operator+(const Scalar& other) const\n    {\n      return AutoDiffScalar<DerType&>(m_value + other, m_derivatives);\n    }\n\n    friend inline const AutoDiffScalar<DerType&> operator+(const Scalar& a, const AutoDiffScalar& b)\n    {\n      return AutoDiffScalar<DerType&>(a + b.value(), b.derivatives());\n    }\n\n//     inline const AutoDiffScalar<DerType&> operator+(const Real& other) const\n//     {\n//       return AutoDiffScalar<DerType&>(m_value + other, m_derivatives);\n//     }\n\n//     friend inline const AutoDiffScalar<DerType&> operator+(const Real& a, const AutoDiffScalar& b)\n//     {\n//       return AutoDiffScalar<DerType&>(a + b.value(), b.derivatives());\n//     }\n\n    inline AutoDiffScalar& operator+=(const Scalar& other)\n    {\n      value() += other;\n      return *this;\n    }\n\n    template<typename OtherDerType>\n    inline const AutoDiffScalar<CwiseBinaryOp<internal::scalar_sum_op<Scalar>,const DerType,const typename internal::remove_all<OtherDerType>::type> >\n    operator+(const AutoDiffScalar<OtherDerType>& other) const\n    {\n      internal::make_coherent(m_derivatives, other.derivatives());\n      return AutoDiffScalar<CwiseBinaryOp<internal::scalar_sum_op<Scalar>,const DerType,const typename internal::remove_all<OtherDerType>::type> >(\n        m_value + other.value(),\n        m_derivatives + other.derivatives());\n    }\n\n    template<typename OtherDerType>\n    inline AutoDiffScalar&\n    operator+=(const AutoDiffScalar<OtherDerType>& other)\n    {\n      (*this) = (*this) + other;\n      return *this;\n    }\n\n    inline const AutoDiffScalar<DerType&> operator-(const Scalar& b) const\n    {\n      return AutoDiffScalar<DerType&>(m_value - b, m_derivatives);\n    }\n\n    friend inline const AutoDiffScalar<CwiseUnaryOp<internal::scalar_opposite_op<Scalar>, const DerType> >\n    operator-(const Scalar& a, const AutoDiffScalar& b)\n    {\n      return AutoDiffScalar<CwiseUnaryOp<internal::scalar_opposite_op<Scalar>, const DerType> >\n            (a - b.value(), -b.derivatives());\n    }\n\n    inline AutoDiffScalar& operator-=(const Scalar& other)\n    {\n      value() -= other;\n      return *this;\n    }\n\n    template<typename OtherDerType>\n    inline const AutoDiffScalar<CwiseBinaryOp<internal::scalar_difference_op<Scalar>, const DerType,const typename internal::remove_all<OtherDerType>::type> >\n    operator-(const AutoDiffScalar<OtherDerType>& other) const\n    {\n      internal::make_coherent(m_derivatives, other.derivatives());\n      return AutoDiffScalar<CwiseBinaryOp<internal::scalar_difference_op<Scalar>, const DerType,const typename internal::remove_all<OtherDerType>::type> >(\n        m_value - other.value(),\n        m_derivatives - other.derivatives());\n    }\n\n    template<typename OtherDerType>\n    inline AutoDiffScalar&\n    operator-=(const AutoDiffScalar<OtherDerType>& other)\n    {\n      *this = *this - other;\n      return *this;\n    }\n\n    inline const AutoDiffScalar<CwiseUnaryOp<internal::scalar_opposite_op<Scalar>, const DerType> >\n    operator-() const\n    {\n      return AutoDiffScalar<CwiseUnaryOp<internal::scalar_opposite_op<Scalar>, const DerType> >(\n        -m_value,\n        -m_derivatives);\n    }\n\n    inline const AutoDiffScalar<EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DerType,Scalar,product) >\n    operator*(const Scalar& other) const\n    {\n      return MakeAutoDiffScalar(m_value * other, m_derivatives * other);\n    }\n\n    friend inline const AutoDiffScalar<EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DerType,Scalar,product) >\n    operator*(const Scalar& other, const AutoDiffScalar& a)\n    {\n      return MakeAutoDiffScalar(a.value() * other, a.derivatives() * other);\n    }\n\n//     inline const AutoDiffScalar<typename CwiseUnaryOp<internal::scalar_multiple_op<Real>, DerType>::Type >\n//     operator*(const Real& other) const\n//     {\n//       return AutoDiffScalar<typename CwiseUnaryOp<internal::scalar_multiple_op<Real>, DerType>::Type >(\n//         m_value * other,\n//         (m_derivatives * other));\n//     }\n//\n//     friend inline const AutoDiffScalar<typename CwiseUnaryOp<internal::scalar_multiple_op<Real>, DerType>::Type >\n//     operator*(const Real& other, const AutoDiffScalar& a)\n//     {\n//       return AutoDiffScalar<typename CwiseUnaryOp<internal::scalar_multiple_op<Real>, DerType>::Type >(\n//         a.value() * other,\n//         a.derivatives() * other);\n//     }\n\n    inline const AutoDiffScalar<EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DerType,Scalar,product) >\n    operator/(const Scalar& other) const\n    {\n      return MakeAutoDiffScalar(m_value / other, (m_derivatives * (Scalar(1)/other)));\n    }\n\n    friend inline const AutoDiffScalar<EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DerType,Scalar,product) >\n    operator/(const Scalar& other, const AutoDiffScalar& a)\n    {\n      return MakeAutoDiffScalar(other / a.value(), a.derivatives() * (Scalar(-other) / (a.value()*a.value())));\n    }\n\n//     inline const AutoDiffScalar<typename CwiseUnaryOp<internal::scalar_multiple_op<Real>, DerType>::Type >\n//     operator/(const Real& other) const\n//     {\n//       return AutoDiffScalar<typename CwiseUnaryOp<internal::scalar_multiple_op<Real>, DerType>::Type >(\n//         m_value / other,\n//         (m_derivatives * (Real(1)/other)));\n//     }\n//\n//     friend inline const AutoDiffScalar<typename CwiseUnaryOp<internal::scalar_multiple_op<Real>, DerType>::Type >\n//     operator/(const Real& other, const AutoDiffScalar& a)\n//     {\n//       return AutoDiffScalar<typename CwiseUnaryOp<internal::scalar_multiple_op<Real>, DerType>::Type >(\n//         other / a.value(),\n//         a.derivatives() * (-Real(1)/other));\n//     }\n\n    template<typename OtherDerType>\n    inline const AutoDiffScalar<EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(\n        CwiseBinaryOp<internal::scalar_difference_op<Scalar> EIGEN_COMMA\n          const EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DerType,Scalar,product) EIGEN_COMMA\n          const EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(typename internal::remove_all<OtherDerType>::type,Scalar,product) >,Scalar,product) >\n    operator/(const AutoDiffScalar<OtherDerType>& other) const\n    {\n      internal::make_coherent(m_derivatives, other.derivatives());\n      return MakeAutoDiffScalar(\n        m_value / other.value(),\n          ((m_derivatives * other.value()) - (other.derivatives() * m_value))\n        * (Scalar(1)/(other.value()*other.value())));\n    }\n\n    template<typename OtherDerType>\n    inline const AutoDiffScalar<CwiseBinaryOp<internal::scalar_sum_op<Scalar>,\n        const EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DerType,Scalar,product),\n        const EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(typename internal::remove_all<OtherDerType>::type,Scalar,product) > >\n    operator*(const AutoDiffScalar<OtherDerType>& other) const\n    {\n      internal::make_coherent(m_derivatives, other.derivatives());\n      return MakeAutoDiffScalar(\n        m_value * other.value(),\n        (m_derivatives * other.value()) + (other.derivatives() * m_value));\n    }\n\n    inline AutoDiffScalar& operator*=(const Scalar& other)\n    {\n      *this = *this * other;\n      return *this;\n    }\n\n    template<typename OtherDerType>\n    inline AutoDiffScalar& operator*=(const AutoDiffScalar<OtherDerType>& other)\n    {\n      *this = *this * other;\n      return *this;\n    }\n\n    inline AutoDiffScalar& operator/=(const Scalar& other)\n    {\n      *this = *this / other;\n      return *this;\n    }\n\n    template<typename OtherDerType>\n    inline AutoDiffScalar& operator/=(const AutoDiffScalar<OtherDerType>& other)\n    {\n      *this = *this / other;\n      return *this;\n    }\n\n  protected:\n    Scalar m_value;\n    DerType m_derivatives;\n\n};\n\nnamespace internal {\n\ntemplate<typename _DerType>\nstruct auto_diff_special_op<_DerType, true>\n//   : auto_diff_scalar_op<_DerType, typename NumTraits<Scalar>::Real,\n//                            is_same<Scalar,typename NumTraits<Scalar>::Real>::value>\n{\n  typedef typename remove_all<_DerType>::type DerType;\n  typedef typename traits<DerType>::Scalar Scalar;\n  typedef typename NumTraits<Scalar>::Real Real;\n\n//   typedef auto_diff_scalar_op<_DerType, typename NumTraits<Scalar>::Real,\n//                            is_same<Scalar,typename NumTraits<Scalar>::Real>::value> Base;\n\n//   using Base::operator+;\n//   using Base::operator+=;\n//   using Base::operator-;\n//   using Base::operator-=;\n//   using Base::operator*;\n//   using Base::operator*=;\n\n  const AutoDiffScalar<_DerType>& derived() const { return *static_cast<const AutoDiffScalar<_DerType>*>(this); }\n  AutoDiffScalar<_DerType>& derived() { return *static_cast<AutoDiffScalar<_DerType>*>(this); }\n\n\n  inline const AutoDiffScalar<DerType&> operator+(const Real& other) const\n  {\n    return AutoDiffScalar<DerType&>(derived().value() + other, derived().derivatives());\n  }\n\n  friend inline const AutoDiffScalar<DerType&> operator+(const Real& a, const AutoDiffScalar<_DerType>& b)\n  {\n    return AutoDiffScalar<DerType&>(a + b.value(), b.derivatives());\n  }\n\n  inline AutoDiffScalar<_DerType>& operator+=(const Real& other)\n  {\n    derived().value() += other;\n    return derived();\n  }\n\n\n  inline const AutoDiffScalar<typename CwiseUnaryOp<bind2nd_op<scalar_product_op<Scalar,Real> >, DerType>::Type >\n  operator*(const Real& other) const\n  {\n    return AutoDiffScalar<typename CwiseUnaryOp<bind2nd_op<scalar_product_op<Scalar,Real> >, DerType>::Type >(\n      derived().value() * other,\n      derived().derivatives() * other);\n  }\n\n  friend inline const AutoDiffScalar<typename CwiseUnaryOp<bind1st_op<scalar_product_op<Real,Scalar> >, DerType>::Type >\n  operator*(const Real& other, const AutoDiffScalar<_DerType>& a)\n  {\n    return AutoDiffScalar<typename CwiseUnaryOp<bind1st_op<scalar_product_op<Real,Scalar> >, DerType>::Type >(\n      a.value() * other,\n      a.derivatives() * other);\n  }\n\n  inline AutoDiffScalar<_DerType>& operator*=(const Scalar& other)\n  {\n    *this = *this * other;\n    return derived();\n  }\n};\n\ntemplate<typename _DerType>\nstruct auto_diff_special_op<_DerType, false>\n{\n  void operator*() const;\n  void operator-() const;\n  void operator+() const;\n};\n\ntemplate<typename BinOp, typename A, typename B, typename RefType>\nvoid make_coherent_expression(CwiseBinaryOp<BinOp,A,B> xpr, const RefType &ref)\n{\n  make_coherent(xpr.const_cast_derived().lhs(), ref);\n  make_coherent(xpr.const_cast_derived().rhs(), ref);\n}\n\ntemplate<typename UnaryOp, typename A, typename RefType>\nvoid make_coherent_expression(const CwiseUnaryOp<UnaryOp,A> &xpr, const RefType &ref)\n{\n  make_coherent(xpr.nestedExpression().const_cast_derived(), ref);\n}\n\n// needed for compilation only\ntemplate<typename UnaryOp, typename A, typename RefType>\nvoid make_coherent_expression(const CwiseNullaryOp<UnaryOp,A> &, const RefType &)\n{}\n\ntemplate<typename A_Scalar, int A_Rows, int A_Cols, int A_Options, int A_MaxRows, int A_MaxCols, typename B>\nstruct make_coherent_impl<Matrix<A_Scalar, A_Rows, A_Cols, A_Options, A_MaxRows, A_MaxCols>, B> {\n  typedef Matrix<A_Scalar, A_Rows, A_Cols, A_Options, A_MaxRows, A_MaxCols> A;\n  static void run(A& a, B& b) {\n    if((A_Rows==Dynamic || A_Cols==Dynamic) && (a.size()==0))\n    {\n      a.resize(b.size());\n      a.setZero();\n    }\n    else if (B::SizeAtCompileTime==Dynamic && a.size()!=0 && b.size()==0)\n    {\n      make_coherent_expression(b,a);\n    }\n  }\n};\n\ntemplate<typename A, typename B_Scalar, int B_Rows, int B_Cols, int B_Options, int B_MaxRows, int B_MaxCols>\nstruct make_coherent_impl<A, Matrix<B_Scalar, B_Rows, B_Cols, B_Options, B_MaxRows, B_MaxCols> > {\n  typedef Matrix<B_Scalar, B_Rows, B_Cols, B_Options, B_MaxRows, B_MaxCols> B;\n  static void run(A& a, B& b) {\n    if((B_Rows==Dynamic || B_Cols==Dynamic) && (b.size()==0))\n    {\n      b.resize(a.size());\n      b.setZero();\n    }\n    else if (A::SizeAtCompileTime==Dynamic && b.size()!=0 && a.size()==0)\n    {\n      make_coherent_expression(a,b);\n    }\n  }\n};\n\ntemplate<typename A_Scalar, int A_Rows, int A_Cols, int A_Options, int A_MaxRows, int A_MaxCols,\n         typename B_Scalar, int B_Rows, int B_Cols, int B_Options, int B_MaxRows, int B_MaxCols>\nstruct make_coherent_impl<Matrix<A_Scalar, A_Rows, A_Cols, A_Options, A_MaxRows, A_MaxCols>,\n                          Matrix<B_Scalar, B_Rows, B_Cols, B_Options, B_MaxRows, B_MaxCols> > {\n  typedef Matrix<A_Scalar, A_Rows, A_Cols, A_Options, A_MaxRows, A_MaxCols> A;\n  typedef Matrix<B_Scalar, B_Rows, B_Cols, B_Options, B_MaxRows, B_MaxCols> B;\n  static void run(A& a, B& b) {\n    if((A_Rows==Dynamic || A_Cols==Dynamic) && (a.size()==0))\n    {\n      a.resize(b.size());\n      a.setZero();\n    }\n    else if((B_Rows==Dynamic || B_Cols==Dynamic) && (b.size()==0))\n    {\n      b.resize(a.size());\n      b.setZero();\n    }\n  }\n};\n\n} // end namespace internal\n\ntemplate<typename DerType, typename BinOp>\nstruct ScalarBinaryOpTraits<AutoDiffScalar<DerType>,typename DerType::Scalar,BinOp>\n{\n  typedef AutoDiffScalar<DerType> ReturnType;\n};\n\ntemplate<typename DerType, typename BinOp>\nstruct ScalarBinaryOpTraits<typename DerType::Scalar,AutoDiffScalar<DerType>, BinOp>\n{\n  typedef AutoDiffScalar<DerType> ReturnType;\n};\n\n\n// The following is an attempt to let Eigen's known about expression template, but that's more tricky!\n\n// template<typename DerType, typename BinOp>\n// struct ScalarBinaryOpTraits<AutoDiffScalar<DerType>,AutoDiffScalar<DerType>, BinOp>\n// {\n//   enum { Defined = 1 };\n//   typedef AutoDiffScalar<typename DerType::PlainObject> ReturnType;\n// };\n//\n// template<typename DerType1,typename DerType2, typename BinOp>\n// struct ScalarBinaryOpTraits<AutoDiffScalar<DerType1>,AutoDiffScalar<DerType2>, BinOp>\n// {\n//   enum { Defined = 1 };//internal::is_same<typename DerType1::Scalar,typename DerType2::Scalar>::value };\n//   typedef AutoDiffScalar<typename DerType1::PlainObject> ReturnType;\n// };\n\n#define EIGEN_AUTODIFF_DECLARE_GLOBAL_UNARY(FUNC,CODE) \\\n  template<typename DerType> \\\n  inline const Eigen::AutoDiffScalar< \\\n  EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(typename Eigen::internal::remove_all<DerType>::type, typename Eigen::internal::traits<typename Eigen::internal::remove_all<DerType>::type>::Scalar, product) > \\\n  FUNC(const Eigen::AutoDiffScalar<DerType>& x) { \\\n    using namespace Eigen; \\\n    typedef typename Eigen::internal::traits<typename Eigen::internal::remove_all<DerType>::type>::Scalar Scalar; \\\n    EIGEN_UNUSED_VARIABLE(sizeof(Scalar)); \\\n    CODE; \\\n  }\n\ntemplate<typename DerType>\nstruct CleanedUpDerType {\n  typedef AutoDiffScalar<typename Eigen::internal::remove_all<DerType>::type::PlainObject> type;\n};\n\ntemplate<typename DerType>\ninline const AutoDiffScalar<DerType>& conj(const AutoDiffScalar<DerType>& x)  { return x; }\ntemplate<typename DerType>\ninline const AutoDiffScalar<DerType>& real(const AutoDiffScalar<DerType>& x)  { return x; }\ntemplate<typename DerType>\ninline typename DerType::Scalar imag(const AutoDiffScalar<DerType>&)    { return 0.; }\ntemplate<typename DerType, typename T>\ninline typename CleanedUpDerType<DerType>::type (min)(const AutoDiffScalar<DerType>& x, const T& y) {\n  typedef typename CleanedUpDerType<DerType>::type ADS;\n  return (x <= y ? ADS(x) : ADS(y));\n}\ntemplate<typename DerType, typename T>\ninline typename CleanedUpDerType<DerType>::type (max)(const AutoDiffScalar<DerType>& x, const T& y) {\n  typedef typename CleanedUpDerType<DerType>::type ADS;\n  return (x >= y ? ADS(x) : ADS(y));\n}\ntemplate<typename DerType, typename T>\ninline typename CleanedUpDerType<DerType>::type (min)(const T& x, const AutoDiffScalar<DerType>& y) {\n  typedef typename CleanedUpDerType<DerType>::type ADS;\n  return (x < y ? ADS(x) : ADS(y));\n}\ntemplate<typename DerType, typename T>\ninline typename CleanedUpDerType<DerType>::type (max)(const T& x, const AutoDiffScalar<DerType>& y) {\n  typedef typename CleanedUpDerType<DerType>::type ADS;\n  return (x > y ? ADS(x) : ADS(y));\n}\ntemplate<typename DerType>\ninline typename CleanedUpDerType<DerType>::type (min)(const AutoDiffScalar<DerType>& x, const AutoDiffScalar<DerType>& y) {\n  return (x.value() < y.value() ? x : y);\n}\ntemplate<typename DerType>\ninline typename CleanedUpDerType<DerType>::type (max)(const AutoDiffScalar<DerType>& x, const AutoDiffScalar<DerType>& y) {\n  return (x.value() >= y.value() ? x : y);\n}\n\n\nEIGEN_AUTODIFF_DECLARE_GLOBAL_UNARY(abs,\n  using std::abs;\n  return Eigen::MakeAutoDiffScalar(abs(x.value()), x.derivatives() * (x.value()<0 ? -1 : 1) );)\n\nEIGEN_AUTODIFF_DECLARE_GLOBAL_UNARY(abs2,\n  using numext::abs2;\n  return Eigen::MakeAutoDiffScalar(abs2(x.value()), x.derivatives() * (Scalar(2)*x.value()));)\n\nEIGEN_AUTODIFF_DECLARE_GLOBAL_UNARY(sqrt,\n  using std::sqrt;\n  Scalar sqrtx = sqrt(x.value());\n  return Eigen::MakeAutoDiffScalar(sqrtx,x.derivatives() * (Scalar(0.5) / sqrtx));)\n\nEIGEN_AUTODIFF_DECLARE_GLOBAL_UNARY(cos,\n  using std::cos;\n  using std::sin;\n  return Eigen::MakeAutoDiffScalar(cos(x.value()), x.derivatives() * (-sin(x.value())));)\n\nEIGEN_AUTODIFF_DECLARE_GLOBAL_UNARY(sin,\n  using std::sin;\n  using std::cos;\n  return Eigen::MakeAutoDiffScalar(sin(x.value()),x.derivatives() * cos(x.value()));)\n\nEIGEN_AUTODIFF_DECLARE_GLOBAL_UNARY(exp,\n  using std::exp;\n  Scalar expx = exp(x.value());\n  return Eigen::MakeAutoDiffScalar(expx,x.derivatives() * expx);)\n\nEIGEN_AUTODIFF_DECLARE_GLOBAL_UNARY(log,\n  using std::log;\n  return Eigen::MakeAutoDiffScalar(log(x.value()),x.derivatives() * (Scalar(1)/x.value()));)\n\ntemplate<typename DerType>\ninline const Eigen::AutoDiffScalar<\nEIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(typename internal::remove_all<DerType>::type,typename internal::traits<typename internal::remove_all<DerType>::type>::Scalar,product) >\npow(const Eigen::AutoDiffScalar<DerType> &x, const typename internal::traits<typename internal::remove_all<DerType>::type>::Scalar &y)\n{\n  using namespace Eigen;\n  using std::pow;\n  return Eigen::MakeAutoDiffScalar(pow(x.value(),y), x.derivatives() * (y * pow(x.value(),y-1)));\n}\n\n\ntemplate<typename DerTypeA,typename DerTypeB>\ninline const AutoDiffScalar<Matrix<typename internal::traits<typename internal::remove_all<DerTypeA>::type>::Scalar,Dynamic,1> >\natan2(const AutoDiffScalar<DerTypeA>& a, const AutoDiffScalar<DerTypeB>& b)\n{\n  using std::atan2;\n  typedef typename internal::traits<typename internal::remove_all<DerTypeA>::type>::Scalar Scalar;\n  typedef AutoDiffScalar<Matrix<Scalar,Dynamic,1> > PlainADS;\n  PlainADS ret;\n  ret.value() = atan2(a.value(), b.value());\n  \n  Scalar squared_hypot = a.value() * a.value() + b.value() * b.value();\n  \n  // if (squared_hypot==0) the derivation is undefined and the following results in a NaN:\n  ret.derivatives() = (a.derivatives() * b.value() - a.value() * b.derivatives()) / squared_hypot;\n\n  return ret;\n}\n\nEIGEN_AUTODIFF_DECLARE_GLOBAL_UNARY(tan,\n  using std::tan;\n  using std::cos;\n  return Eigen::MakeAutoDiffScalar(tan(x.value()),x.derivatives() * (Scalar(1)/numext::abs2(cos(x.value()))));)\n\nEIGEN_AUTODIFF_DECLARE_GLOBAL_UNARY(asin,\n  using std::sqrt;\n  using std::asin;\n  return Eigen::MakeAutoDiffScalar(asin(x.value()),x.derivatives() * (Scalar(1)/sqrt(1-numext::abs2(x.value()))));)\n  \nEIGEN_AUTODIFF_DECLARE_GLOBAL_UNARY(acos,\n  using std::sqrt;\n  using std::acos;\n  return Eigen::MakeAutoDiffScalar(acos(x.value()),x.derivatives() * (Scalar(-1)/sqrt(1-numext::abs2(x.value()))));)\n\nEIGEN_AUTODIFF_DECLARE_GLOBAL_UNARY(tanh,\n  using std::cosh;\n  using std::tanh;\n  return Eigen::MakeAutoDiffScalar(tanh(x.value()),x.derivatives() * (Scalar(1)/numext::abs2(cosh(x.value()))));)\n\nEIGEN_AUTODIFF_DECLARE_GLOBAL_UNARY(sinh,\n  using std::sinh;\n  using std::cosh;\n  return Eigen::MakeAutoDiffScalar(sinh(x.value()),x.derivatives() * cosh(x.value()));)\n\nEIGEN_AUTODIFF_DECLARE_GLOBAL_UNARY(cosh,\n  using std::sinh;\n  using std::cosh;\n  return Eigen::MakeAutoDiffScalar(cosh(x.value()),x.derivatives() * sinh(x.value()));)\n\n#undef EIGEN_AUTODIFF_DECLARE_GLOBAL_UNARY\n\ntemplate<typename DerType> struct NumTraits<AutoDiffScalar<DerType> >\n  : NumTraits< typename NumTraits<typename internal::remove_all<DerType>::type::Scalar>::Real >\n{\n  typedef typename internal::remove_all<DerType>::type DerTypeCleaned;\n  typedef AutoDiffScalar<Matrix<typename NumTraits<typename DerTypeCleaned::Scalar>::Real,DerTypeCleaned::RowsAtCompileTime,DerTypeCleaned::ColsAtCompileTime,\n                                0, DerTypeCleaned::MaxRowsAtCompileTime, DerTypeCleaned::MaxColsAtCompileTime> > Real;\n  typedef AutoDiffScalar<DerType> NonInteger;\n  typedef AutoDiffScalar<DerType> Nested;\n  typedef typename NumTraits<typename DerTypeCleaned::Scalar>::Literal Literal;\n  enum{\n    RequireInitialization = 1\n  };\n};\n\n}\n\nnamespace std {\n\ntemplate <typename T>\nclass numeric_limits<Eigen::AutoDiffScalar<T> >\n  : public numeric_limits<typename T::Scalar> {};\n\ntemplate <typename T>\nclass numeric_limits<Eigen::AutoDiffScalar<T&> >\n  : public numeric_limits<typename T::Scalar> {};\n\n}  // namespace std\n\n#endif // EIGEN_AUTODIFF_SCALAR_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/AutoDiff/AutoDiffVector.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_AUTODIFF_VECTOR_H\n#define EIGEN_AUTODIFF_VECTOR_H\n\nnamespace Eigen {\n\n/* \\class AutoDiffScalar\n  * \\brief A scalar type replacement with automatic differentation capability\n  *\n  * \\param DerType the vector type used to store/represent the derivatives (e.g. Vector3f)\n  *\n  * This class represents a scalar value while tracking its respective derivatives.\n  *\n  * It supports the following list of global math function:\n  *  - std::abs, std::sqrt, std::pow, std::exp, std::log, std::sin, std::cos,\n  *  - internal::abs, internal::sqrt, numext::pow, internal::exp, internal::log, internal::sin, internal::cos,\n  *  - internal::conj, internal::real, internal::imag, numext::abs2.\n  *\n  * AutoDiffScalar can be used as the scalar type of an Eigen::Matrix object. However,\n  * in that case, the expression template mechanism only occurs at the top Matrix level,\n  * while derivatives are computed right away.\n  *\n  */\ntemplate<typename ValueType, typename JacobianType>\nclass AutoDiffVector\n{\n  public:\n    //typedef typename internal::traits<ValueType>::Scalar Scalar;\n    typedef typename internal::traits<ValueType>::Scalar BaseScalar;\n    typedef AutoDiffScalar<Matrix<BaseScalar,JacobianType::RowsAtCompileTime,1> > ActiveScalar;\n    typedef ActiveScalar Scalar;\n    typedef AutoDiffScalar<typename JacobianType::ColXpr> CoeffType;\n    typedef typename JacobianType::Index Index;\n\n    inline AutoDiffVector() {}\n\n    inline AutoDiffVector(const ValueType& values)\n      : m_values(values)\n    {\n      m_jacobian.setZero();\n    }\n\n\n    CoeffType operator[] (Index i) { return CoeffType(m_values[i], m_jacobian.col(i)); }\n    const CoeffType operator[] (Index i) const { return CoeffType(m_values[i], m_jacobian.col(i)); }\n\n    CoeffType operator() (Index i) { return CoeffType(m_values[i], m_jacobian.col(i)); }\n    const CoeffType operator() (Index i) const { return CoeffType(m_values[i], m_jacobian.col(i)); }\n\n    CoeffType coeffRef(Index i) { return CoeffType(m_values[i], m_jacobian.col(i)); }\n    const CoeffType coeffRef(Index i) const { return CoeffType(m_values[i], m_jacobian.col(i)); }\n\n    Index size() const { return m_values.size(); }\n\n    // FIXME here we could return an expression of the sum\n    Scalar sum() const { /*std::cerr << \"sum \\n\\n\";*/ /*std::cerr << m_jacobian.rowwise().sum() << \"\\n\\n\";*/ return Scalar(m_values.sum(), m_jacobian.rowwise().sum()); }\n\n\n    inline AutoDiffVector(const ValueType& values, const JacobianType& jac)\n      : m_values(values), m_jacobian(jac)\n    {}\n\n    template<typename OtherValueType, typename OtherJacobianType>\n    inline AutoDiffVector(const AutoDiffVector<OtherValueType, OtherJacobianType>& other)\n      : m_values(other.values()), m_jacobian(other.jacobian())\n    {}\n\n    inline AutoDiffVector(const AutoDiffVector& other)\n      : m_values(other.values()), m_jacobian(other.jacobian())\n    {}\n\n    template<typename OtherValueType, typename OtherJacobianType>\n    inline AutoDiffVector& operator=(const AutoDiffVector<OtherValueType, OtherJacobianType>& other)\n    {\n      m_values = other.values();\n      m_jacobian = other.jacobian();\n      return *this;\n    }\n\n    inline AutoDiffVector& operator=(const AutoDiffVector& other)\n    {\n      m_values = other.values();\n      m_jacobian = other.jacobian();\n      return *this;\n    }\n\n    inline const ValueType& values() const { return m_values; }\n    inline ValueType& values() { return m_values; }\n\n    inline const JacobianType& jacobian() const { return m_jacobian; }\n    inline JacobianType& jacobian() { return m_jacobian; }\n\n    template<typename OtherValueType,typename OtherJacobianType>\n    inline const AutoDiffVector<\n      typename MakeCwiseBinaryOp<internal::scalar_sum_op<BaseScalar>,ValueType,OtherValueType>::Type,\n      typename MakeCwiseBinaryOp<internal::scalar_sum_op<BaseScalar>,JacobianType,OtherJacobianType>::Type >\n    operator+(const AutoDiffVector<OtherValueType,OtherJacobianType>& other) const\n    {\n      return AutoDiffVector<\n      typename MakeCwiseBinaryOp<internal::scalar_sum_op<BaseScalar>,ValueType,OtherValueType>::Type,\n      typename MakeCwiseBinaryOp<internal::scalar_sum_op<BaseScalar>,JacobianType,OtherJacobianType>::Type >(\n        m_values + other.values(),\n        m_jacobian + other.jacobian());\n    }\n\n    template<typename OtherValueType, typename OtherJacobianType>\n    inline AutoDiffVector&\n    operator+=(const AutoDiffVector<OtherValueType,OtherJacobianType>& other)\n    {\n      m_values += other.values();\n      m_jacobian += other.jacobian();\n      return *this;\n    }\n\n    template<typename OtherValueType,typename OtherJacobianType>\n    inline const AutoDiffVector<\n      typename MakeCwiseBinaryOp<internal::scalar_difference_op<Scalar>,ValueType,OtherValueType>::Type,\n      typename MakeCwiseBinaryOp<internal::scalar_difference_op<Scalar>,JacobianType,OtherJacobianType>::Type >\n    operator-(const AutoDiffVector<OtherValueType,OtherJacobianType>& other) const\n    {\n      return AutoDiffVector<\n        typename MakeCwiseBinaryOp<internal::scalar_difference_op<Scalar>,ValueType,OtherValueType>::Type,\n        typename MakeCwiseBinaryOp<internal::scalar_difference_op<Scalar>,JacobianType,OtherJacobianType>::Type >(\n          m_values - other.values(),\n          m_jacobian - other.jacobian());\n    }\n\n    template<typename OtherValueType, typename OtherJacobianType>\n    inline AutoDiffVector&\n    operator-=(const AutoDiffVector<OtherValueType,OtherJacobianType>& other)\n    {\n      m_values -= other.values();\n      m_jacobian -= other.jacobian();\n      return *this;\n    }\n\n    inline const AutoDiffVector<\n      typename MakeCwiseUnaryOp<internal::scalar_opposite_op<Scalar>, ValueType>::Type,\n      typename MakeCwiseUnaryOp<internal::scalar_opposite_op<Scalar>, JacobianType>::Type >\n    operator-() const\n    {\n      return AutoDiffVector<\n        typename MakeCwiseUnaryOp<internal::scalar_opposite_op<Scalar>, ValueType>::Type,\n        typename MakeCwiseUnaryOp<internal::scalar_opposite_op<Scalar>, JacobianType>::Type >(\n          -m_values,\n          -m_jacobian);\n    }\n\n    inline const AutoDiffVector<\n      typename MakeCwiseUnaryOp<internal::scalar_multiple_op<Scalar>, ValueType>::Type,\n      typename MakeCwiseUnaryOp<internal::scalar_multiple_op<Scalar>, JacobianType>::Type>\n    operator*(const BaseScalar& other) const\n    {\n      return AutoDiffVector<\n        typename MakeCwiseUnaryOp<internal::scalar_multiple_op<Scalar>, ValueType>::Type,\n        typename MakeCwiseUnaryOp<internal::scalar_multiple_op<Scalar>, JacobianType>::Type >(\n          m_values * other,\n          m_jacobian * other);\n    }\n\n    friend inline const AutoDiffVector<\n      typename MakeCwiseUnaryOp<internal::scalar_multiple_op<Scalar>, ValueType>::Type,\n      typename MakeCwiseUnaryOp<internal::scalar_multiple_op<Scalar>, JacobianType>::Type >\n    operator*(const Scalar& other, const AutoDiffVector& v)\n    {\n      return AutoDiffVector<\n        typename MakeCwiseUnaryOp<internal::scalar_multiple_op<Scalar>, ValueType>::Type,\n        typename MakeCwiseUnaryOp<internal::scalar_multiple_op<Scalar>, JacobianType>::Type >(\n          v.values() * other,\n          v.jacobian() * other);\n    }\n\n//     template<typename OtherValueType,typename OtherJacobianType>\n//     inline const AutoDiffVector<\n//       CwiseBinaryOp<internal::scalar_multiple_op<Scalar>, ValueType, OtherValueType>\n//       CwiseBinaryOp<internal::scalar_sum_op<Scalar>,\n//         CwiseUnaryOp<internal::scalar_multiple_op<Scalar>, JacobianType>,\n//         CwiseUnaryOp<internal::scalar_multiple_op<Scalar>, OtherJacobianType> > >\n//     operator*(const AutoDiffVector<OtherValueType,OtherJacobianType>& other) const\n//     {\n//       return AutoDiffVector<\n//         CwiseBinaryOp<internal::scalar_multiple_op<Scalar>, ValueType, OtherValueType>\n//         CwiseBinaryOp<internal::scalar_sum_op<Scalar>,\n//           CwiseUnaryOp<internal::scalar_multiple_op<Scalar>, JacobianType>,\n//           CwiseUnaryOp<internal::scalar_multiple_op<Scalar>, OtherJacobianType> > >(\n//             m_values.cwise() * other.values(),\n//             (m_jacobian * other.values()) + (m_values * other.jacobian()));\n//     }\n\n    inline AutoDiffVector& operator*=(const Scalar& other)\n    {\n      m_values *= other;\n      m_jacobian *= other;\n      return *this;\n    }\n\n    template<typename OtherValueType,typename OtherJacobianType>\n    inline AutoDiffVector& operator*=(const AutoDiffVector<OtherValueType,OtherJacobianType>& other)\n    {\n      *this = *this * other;\n      return *this;\n    }\n\n  protected:\n    ValueType m_values;\n    JacobianType m_jacobian;\n\n};\n\n}\n\n#endif // EIGEN_AUTODIFF_VECTOR_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/BVH/BVAlgorithms.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Ilya Baran <ibaran@mit.edu>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_BVALGORITHMS_H\n#define EIGEN_BVALGORITHMS_H\n\nnamespace Eigen { \n\nnamespace internal {\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\ntemplate<typename BVH, typename Intersector>\nbool intersect_helper(const BVH &tree, Intersector &intersector, typename BVH::Index root)\n{\n  typedef typename BVH::Index Index;\n  typedef typename BVH::VolumeIterator VolIter;\n  typedef typename BVH::ObjectIterator ObjIter;\n\n  VolIter vBegin = VolIter(), vEnd = VolIter();\n  ObjIter oBegin = ObjIter(), oEnd = ObjIter();\n\n  std::vector<Index> todo(1, root);\n\n  while(!todo.empty()) {\n    tree.getChildren(todo.back(), vBegin, vEnd, oBegin, oEnd);\n    todo.pop_back();\n\n    for(; vBegin != vEnd; ++vBegin) //go through child volumes\n      if(intersector.intersectVolume(tree.getVolume(*vBegin)))\n        todo.push_back(*vBegin);\n\n    for(; oBegin != oEnd; ++oBegin) //go through child objects\n      if(intersector.intersectObject(*oBegin))\n        return true; //intersector said to stop query\n  }\n  return false;\n}\n#endif //not EIGEN_PARSED_BY_DOXYGEN\n\ntemplate<typename Volume1, typename Object1, typename Object2, typename Intersector>\nstruct intersector_helper1\n{\n  intersector_helper1(const Object2 &inStored, Intersector &in) : stored(inStored), intersector(in) {}\n  bool intersectVolume(const Volume1 &vol) { return intersector.intersectVolumeObject(vol, stored); }\n  bool intersectObject(const Object1 &obj) { return intersector.intersectObjectObject(obj, stored); }\n  Object2 stored;\n  Intersector &intersector;\nprivate:\n  intersector_helper1& operator=(const intersector_helper1&);\n};\n\ntemplate<typename Volume2, typename Object2, typename Object1, typename Intersector>\nstruct intersector_helper2\n{\n  intersector_helper2(const Object1 &inStored, Intersector &in) : stored(inStored), intersector(in) {}\n  bool intersectVolume(const Volume2 &vol) { return intersector.intersectObjectVolume(stored, vol); }\n  bool intersectObject(const Object2 &obj) { return intersector.intersectObjectObject(stored, obj); }\n  Object1 stored;\n  Intersector &intersector;\nprivate:\n  intersector_helper2& operator=(const intersector_helper2&);\n};\n\n} // end namespace internal\n\n/**  Given a BVH, runs the query encapsulated by \\a intersector.\n  *  The Intersector type must provide the following members: \\code\n     bool intersectVolume(const BVH::Volume &volume) //returns true if volume intersects the query\n     bool intersectObject(const BVH::Object &object) //returns true if the search should terminate immediately\n  \\endcode\n  */\ntemplate<typename BVH, typename Intersector>\nvoid BVIntersect(const BVH &tree, Intersector &intersector)\n{\n  internal::intersect_helper(tree, intersector, tree.getRootIndex());\n}\n\n/**  Given two BVH's, runs the query on their Cartesian product encapsulated by \\a intersector.\n  *  The Intersector type must provide the following members: \\code\n     bool intersectVolumeVolume(const BVH1::Volume &v1, const BVH2::Volume &v2) //returns true if product of volumes intersects the query\n     bool intersectVolumeObject(const BVH1::Volume &v1, const BVH2::Object &o2) //returns true if the volume-object product intersects the query\n     bool intersectObjectVolume(const BVH1::Object &o1, const BVH2::Volume &v2) //returns true if the volume-object product intersects the query\n     bool intersectObjectObject(const BVH1::Object &o1, const BVH2::Object &o2) //returns true if the search should terminate immediately\n  \\endcode\n  */\ntemplate<typename BVH1, typename BVH2, typename Intersector>\nvoid BVIntersect(const BVH1 &tree1, const BVH2 &tree2, Intersector &intersector) //TODO: tandem descent when it makes sense\n{\n  typedef typename BVH1::Index Index1;\n  typedef typename BVH2::Index Index2;\n  typedef internal::intersector_helper1<typename BVH1::Volume, typename BVH1::Object, typename BVH2::Object, Intersector> Helper1;\n  typedef internal::intersector_helper2<typename BVH2::Volume, typename BVH2::Object, typename BVH1::Object, Intersector> Helper2;\n  typedef typename BVH1::VolumeIterator VolIter1;\n  typedef typename BVH1::ObjectIterator ObjIter1;\n  typedef typename BVH2::VolumeIterator VolIter2;\n  typedef typename BVH2::ObjectIterator ObjIter2;\n\n  VolIter1 vBegin1 = VolIter1(), vEnd1 = VolIter1();\n  ObjIter1 oBegin1 = ObjIter1(), oEnd1 = ObjIter1();\n  VolIter2 vBegin2 = VolIter2(), vEnd2 = VolIter2(), vCur2 = VolIter2();\n  ObjIter2 oBegin2 = ObjIter2(), oEnd2 = ObjIter2(), oCur2 = ObjIter2();\n\n  std::vector<std::pair<Index1, Index2> > todo(1, std::make_pair(tree1.getRootIndex(), tree2.getRootIndex()));\n\n  while(!todo.empty()) {\n    tree1.getChildren(todo.back().first, vBegin1, vEnd1, oBegin1, oEnd1);\n    tree2.getChildren(todo.back().second, vBegin2, vEnd2, oBegin2, oEnd2);\n    todo.pop_back();\n\n    for(; vBegin1 != vEnd1; ++vBegin1) { //go through child volumes of first tree\n      const typename BVH1::Volume &vol1 = tree1.getVolume(*vBegin1);\n      for(vCur2 = vBegin2; vCur2 != vEnd2; ++vCur2) { //go through child volumes of second tree\n        if(intersector.intersectVolumeVolume(vol1, tree2.getVolume(*vCur2)))\n          todo.push_back(std::make_pair(*vBegin1, *vCur2));\n      }\n\n      for(oCur2 = oBegin2; oCur2 != oEnd2; ++oCur2) {//go through child objects of second tree\n        Helper1 helper(*oCur2, intersector);\n        if(internal::intersect_helper(tree1, helper, *vBegin1))\n          return; //intersector said to stop query\n      }\n    }\n\n    for(; oBegin1 != oEnd1; ++oBegin1) { //go through child objects of first tree\n      for(vCur2 = vBegin2; vCur2 != vEnd2; ++vCur2) { //go through child volumes of second tree\n        Helper2 helper(*oBegin1, intersector);\n        if(internal::intersect_helper(tree2, helper, *vCur2))\n          return; //intersector said to stop query\n      }\n\n      for(oCur2 = oBegin2; oCur2 != oEnd2; ++oCur2) {//go through child objects of second tree\n        if(intersector.intersectObjectObject(*oBegin1, *oCur2))\n          return; //intersector said to stop query\n      }\n    }\n  }\n}\n\nnamespace internal {\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\ntemplate<typename BVH, typename Minimizer>\ntypename Minimizer::Scalar minimize_helper(const BVH &tree, Minimizer &minimizer, typename BVH::Index root, typename Minimizer::Scalar minimum)\n{\n  typedef typename Minimizer::Scalar Scalar;\n  typedef typename BVH::Index Index;\n  typedef std::pair<Scalar, Index> QueueElement; //first element is priority\n  typedef typename BVH::VolumeIterator VolIter;\n  typedef typename BVH::ObjectIterator ObjIter;\n\n  VolIter vBegin = VolIter(), vEnd = VolIter();\n  ObjIter oBegin = ObjIter(), oEnd = ObjIter();\n  std::priority_queue<QueueElement, std::vector<QueueElement>, std::greater<QueueElement> > todo; //smallest is at the top\n\n  todo.push(std::make_pair(Scalar(), root));\n\n  while(!todo.empty()) {\n    tree.getChildren(todo.top().second, vBegin, vEnd, oBegin, oEnd);\n    todo.pop();\n\n    for(; oBegin != oEnd; ++oBegin) //go through child objects\n      minimum = (std::min)(minimum, minimizer.minimumOnObject(*oBegin));\n\n    for(; vBegin != vEnd; ++vBegin) { //go through child volumes\n      Scalar val = minimizer.minimumOnVolume(tree.getVolume(*vBegin));\n      if(val < minimum)\n        todo.push(std::make_pair(val, *vBegin));\n    }\n  }\n\n  return minimum;\n}\n#endif //not EIGEN_PARSED_BY_DOXYGEN\n\n\ntemplate<typename Volume1, typename Object1, typename Object2, typename Minimizer>\nstruct minimizer_helper1\n{\n  typedef typename Minimizer::Scalar Scalar;\n  minimizer_helper1(const Object2 &inStored, Minimizer &m) : stored(inStored), minimizer(m) {}\n  Scalar minimumOnVolume(const Volume1 &vol) { return minimizer.minimumOnVolumeObject(vol, stored); }\n  Scalar minimumOnObject(const Object1 &obj) { return minimizer.minimumOnObjectObject(obj, stored); }\n  Object2 stored;\n  Minimizer &minimizer;\nprivate:\n  minimizer_helper1& operator=(const minimizer_helper1&);\n};\n\ntemplate<typename Volume2, typename Object2, typename Object1, typename Minimizer>\nstruct minimizer_helper2\n{\n  typedef typename Minimizer::Scalar Scalar;\n  minimizer_helper2(const Object1 &inStored, Minimizer &m) : stored(inStored), minimizer(m) {}\n  Scalar minimumOnVolume(const Volume2 &vol) { return minimizer.minimumOnObjectVolume(stored, vol); }\n  Scalar minimumOnObject(const Object2 &obj) { return minimizer.minimumOnObjectObject(stored, obj); }\n  Object1 stored;\n  Minimizer &minimizer;\nprivate:\n  minimizer_helper2& operator=(const minimizer_helper2&);\n};\n\n} // end namespace internal\n\n/**  Given a BVH, runs the query encapsulated by \\a minimizer.\n  *  \\returns the minimum value.\n  *  The Minimizer type must provide the following members: \\code\n     typedef Scalar //the numeric type of what is being minimized--not necessarily the Scalar type of the BVH (if it has one)\n     Scalar minimumOnVolume(const BVH::Volume &volume)\n     Scalar minimumOnObject(const BVH::Object &object)\n  \\endcode\n  */\ntemplate<typename BVH, typename Minimizer>\ntypename Minimizer::Scalar BVMinimize(const BVH &tree, Minimizer &minimizer)\n{\n  return internal::minimize_helper(tree, minimizer, tree.getRootIndex(), (std::numeric_limits<typename Minimizer::Scalar>::max)());\n}\n\n/**  Given two BVH's, runs the query on their cartesian product encapsulated by \\a minimizer.\n  *  \\returns the minimum value.\n  *  The Minimizer type must provide the following members: \\code\n     typedef Scalar //the numeric type of what is being minimized--not necessarily the Scalar type of the BVH (if it has one)\n     Scalar minimumOnVolumeVolume(const BVH1::Volume &v1, const BVH2::Volume &v2)\n     Scalar minimumOnVolumeObject(const BVH1::Volume &v1, const BVH2::Object &o2)\n     Scalar minimumOnObjectVolume(const BVH1::Object &o1, const BVH2::Volume &v2)\n     Scalar minimumOnObjectObject(const BVH1::Object &o1, const BVH2::Object &o2)\n  \\endcode\n  */\ntemplate<typename BVH1, typename BVH2, typename Minimizer>\ntypename Minimizer::Scalar BVMinimize(const BVH1 &tree1, const BVH2 &tree2, Minimizer &minimizer)\n{\n  typedef typename Minimizer::Scalar Scalar;\n  typedef typename BVH1::Index Index1;\n  typedef typename BVH2::Index Index2;\n  typedef internal::minimizer_helper1<typename BVH1::Volume, typename BVH1::Object, typename BVH2::Object, Minimizer> Helper1;\n  typedef internal::minimizer_helper2<typename BVH2::Volume, typename BVH2::Object, typename BVH1::Object, Minimizer> Helper2;\n  typedef std::pair<Scalar, std::pair<Index1, Index2> > QueueElement; //first element is priority\n  typedef typename BVH1::VolumeIterator VolIter1;\n  typedef typename BVH1::ObjectIterator ObjIter1;\n  typedef typename BVH2::VolumeIterator VolIter2;\n  typedef typename BVH2::ObjectIterator ObjIter2;\n\n  VolIter1 vBegin1 = VolIter1(), vEnd1 = VolIter1();\n  ObjIter1 oBegin1 = ObjIter1(), oEnd1 = ObjIter1();\n  VolIter2 vBegin2 = VolIter2(), vEnd2 = VolIter2(), vCur2 = VolIter2();\n  ObjIter2 oBegin2 = ObjIter2(), oEnd2 = ObjIter2(), oCur2 = ObjIter2();\n  std::priority_queue<QueueElement, std::vector<QueueElement>, std::greater<QueueElement> > todo; //smallest is at the top\n\n  Scalar minimum = (std::numeric_limits<Scalar>::max)();\n  todo.push(std::make_pair(Scalar(), std::make_pair(tree1.getRootIndex(), tree2.getRootIndex())));\n\n  while(!todo.empty()) {\n    tree1.getChildren(todo.top().second.first, vBegin1, vEnd1, oBegin1, oEnd1);\n    tree2.getChildren(todo.top().second.second, vBegin2, vEnd2, oBegin2, oEnd2);\n    todo.pop();\n\n    for(; oBegin1 != oEnd1; ++oBegin1) { //go through child objects of first tree\n      for(oCur2 = oBegin2; oCur2 != oEnd2; ++oCur2) {//go through child objects of second tree\n        minimum = (std::min)(minimum, minimizer.minimumOnObjectObject(*oBegin1, *oCur2));\n      }\n\n      for(vCur2 = vBegin2; vCur2 != vEnd2; ++vCur2) { //go through child volumes of second tree\n        Helper2 helper(*oBegin1, minimizer);\n        minimum = (std::min)(minimum, internal::minimize_helper(tree2, helper, *vCur2, minimum));\n      }\n    }\n\n    for(; vBegin1 != vEnd1; ++vBegin1) { //go through child volumes of first tree\n      const typename BVH1::Volume &vol1 = tree1.getVolume(*vBegin1);\n\n      for(oCur2 = oBegin2; oCur2 != oEnd2; ++oCur2) {//go through child objects of second tree\n        Helper1 helper(*oCur2, minimizer);\n        minimum = (std::min)(minimum, internal::minimize_helper(tree1, helper, *vBegin1, minimum));\n      }\n\n      for(vCur2 = vBegin2; vCur2 != vEnd2; ++vCur2) { //go through child volumes of second tree\n        Scalar val = minimizer.minimumOnVolumeVolume(vol1, tree2.getVolume(*vCur2));\n        if(val < minimum)\n          todo.push(std::make_pair(val, std::make_pair(*vBegin1, *vCur2)));\n      }\n    }\n  }\n  return minimum;\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_BVALGORITHMS_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/BVH/KdBVH.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Ilya Baran <ibaran@mit.edu>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef KDBVH_H_INCLUDED\n#define KDBVH_H_INCLUDED\n\nnamespace Eigen { \n\nnamespace internal {\n\n//internal pair class for the BVH--used instead of std::pair because of alignment\ntemplate<typename Scalar, int Dim>\nstruct vector_int_pair\n{\nEIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar, Dim)\n  typedef Matrix<Scalar, Dim, 1> VectorType;\n\n  vector_int_pair(const VectorType &v, int i) : first(v), second(i) {}\n\n  VectorType first;\n  int second;\n};\n\n//these templates help the tree initializer get the bounding boxes either from a provided\n//iterator range or using bounding_box in a unified way\ntemplate<typename ObjectList, typename VolumeList, typename BoxIter>\nstruct get_boxes_helper {\n  void operator()(const ObjectList &objects, BoxIter boxBegin, BoxIter boxEnd, VolumeList &outBoxes)\n  {\n    outBoxes.insert(outBoxes.end(), boxBegin, boxEnd);\n    eigen_assert(outBoxes.size() == objects.size());\n    EIGEN_ONLY_USED_FOR_DEBUG(objects);\n  }\n};\n\ntemplate<typename ObjectList, typename VolumeList>\nstruct get_boxes_helper<ObjectList, VolumeList, int> {\n  void operator()(const ObjectList &objects, int, int, VolumeList &outBoxes)\n  {\n    outBoxes.reserve(objects.size());\n    for(int i = 0; i < (int)objects.size(); ++i)\n      outBoxes.push_back(bounding_box(objects[i]));\n  }\n};\n\n} // end namespace internal\n\n\n/** \\class KdBVH\n *  \\brief A simple bounding volume hierarchy based on AlignedBox\n *\n *  \\param _Scalar The underlying scalar type of the bounding boxes\n *  \\param _Dim The dimension of the space in which the hierarchy lives\n *  \\param _Object The object type that lives in the hierarchy.  It must have value semantics.  Either bounding_box(_Object) must\n *                 be defined and return an AlignedBox<_Scalar, _Dim> or bounding boxes must be provided to the tree initializer.\n *\n *  This class provides a simple (as opposed to optimized) implementation of a bounding volume hierarchy analogous to a Kd-tree.\n *  Given a sequence of objects, it computes their bounding boxes, constructs a Kd-tree of their centers\n *  and builds a BVH with the structure of that Kd-tree.  When the elements of the tree are too expensive to be copied around,\n *  it is useful for _Object to be a pointer.\n */\ntemplate<typename _Scalar, int _Dim, typename _Object> class KdBVH\n{\npublic:\n  enum { Dim = _Dim };\n  typedef _Object Object;\n  typedef std::vector<Object, aligned_allocator<Object> > ObjectList;\n  typedef _Scalar Scalar;\n  typedef AlignedBox<Scalar, Dim> Volume;\n  typedef std::vector<Volume, aligned_allocator<Volume> > VolumeList;\n  typedef int Index;\n  typedef const int *VolumeIterator; //the iterators are just pointers into the tree's vectors\n  typedef const Object *ObjectIterator;\n\n  KdBVH() {}\n\n  /** Given an iterator range over \\a Object references, constructs the BVH.  Requires that bounding_box(Object) return a Volume. */\n  template<typename Iter> KdBVH(Iter begin, Iter end) { init(begin, end, 0, 0); } //int is recognized by init as not being an iterator type\n\n  /** Given an iterator range over \\a Object references and an iterator range over their bounding boxes, constructs the BVH */\n  template<typename OIter, typename BIter> KdBVH(OIter begin, OIter end, BIter boxBegin, BIter boxEnd) { init(begin, end, boxBegin, boxEnd); }\n\n  /** Given an iterator range over \\a Object references, constructs the BVH, overwriting whatever is in there currently.\n    * Requires that bounding_box(Object) return a Volume. */\n  template<typename Iter> void init(Iter begin, Iter end) { init(begin, end, 0, 0); }\n\n  /** Given an iterator range over \\a Object references and an iterator range over their bounding boxes,\n    * constructs the BVH, overwriting whatever is in there currently. */\n  template<typename OIter, typename BIter> void init(OIter begin, OIter end, BIter boxBegin, BIter boxEnd)\n  {\n    objects.clear();\n    boxes.clear();\n    children.clear();\n\n    objects.insert(objects.end(), begin, end);\n    int n = static_cast<int>(objects.size());\n\n    if(n < 2)\n      return; //if we have at most one object, we don't need any internal nodes\n\n    VolumeList objBoxes;\n    VIPairList objCenters;\n\n    //compute the bounding boxes depending on BIter type\n    internal::get_boxes_helper<ObjectList, VolumeList, BIter>()(objects, boxBegin, boxEnd, objBoxes);\n\n    objCenters.reserve(n);\n    boxes.reserve(n - 1);\n    children.reserve(2 * n - 2);\n\n    for(int i = 0; i < n; ++i)\n      objCenters.push_back(VIPair(objBoxes[i].center(), i));\n\n    build(objCenters, 0, n, objBoxes, 0); //the recursive part of the algorithm\n\n    ObjectList tmp(n);\n    tmp.swap(objects);\n    for(int i = 0; i < n; ++i)\n      objects[i] = tmp[objCenters[i].second];\n  }\n\n  /** \\returns the index of the root of the hierarchy */\n  inline Index getRootIndex() const { return (int)boxes.size() - 1; }\n\n  /** Given an \\a index of a node, on exit, \\a outVBegin and \\a outVEnd range over the indices of the volume children of the node\n    * and \\a outOBegin and \\a outOEnd range over the object children of the node */\n  EIGEN_STRONG_INLINE void getChildren(Index index, VolumeIterator &outVBegin, VolumeIterator &outVEnd,\n                                       ObjectIterator &outOBegin, ObjectIterator &outOEnd) const\n  { //inlining this function should open lots of optimization opportunities to the compiler\n    if(index < 0) {\n      outVBegin = outVEnd;\n      if(!objects.empty())\n        outOBegin = &(objects[0]);\n      outOEnd = outOBegin + objects.size(); //output all objects--necessary when the tree has only one object\n      return;\n    }\n\n    int numBoxes = static_cast<int>(boxes.size());\n\n    int idx = index * 2;\n    if(children[idx + 1] < numBoxes) { //second index is always bigger\n      outVBegin = &(children[idx]);\n      outVEnd = outVBegin + 2;\n      outOBegin = outOEnd;\n    }\n    else if(children[idx] >= numBoxes) { //if both children are objects\n      outVBegin = outVEnd;\n      outOBegin = &(objects[children[idx] - numBoxes]);\n      outOEnd = outOBegin + 2;\n    } else { //if the first child is a volume and the second is an object\n      outVBegin = &(children[idx]);\n      outVEnd = outVBegin + 1;\n      outOBegin = &(objects[children[idx + 1] - numBoxes]);\n      outOEnd = outOBegin + 1;\n    }\n  }\n\n  /** \\returns the bounding box of the node at \\a index */\n  inline const Volume &getVolume(Index index) const\n  {\n    return boxes[index];\n  }\n\nprivate:\n  typedef internal::vector_int_pair<Scalar, Dim> VIPair;\n  typedef std::vector<VIPair, aligned_allocator<VIPair> > VIPairList;\n  typedef Matrix<Scalar, Dim, 1> VectorType;\n  struct VectorComparator //compares vectors, or more specifically, VIPairs along a particular dimension\n  {\n    VectorComparator(int inDim) : dim(inDim) {}\n    inline bool operator()(const VIPair &v1, const VIPair &v2) const { return v1.first[dim] < v2.first[dim]; }\n    int dim;\n  };\n\n  //Build the part of the tree between objects[from] and objects[to] (not including objects[to]).\n  //This routine partitions the objCenters in [from, to) along the dimension dim, recursively constructs\n  //the two halves, and adds their parent node.  TODO: a cache-friendlier layout\n  void build(VIPairList &objCenters, int from, int to, const VolumeList &objBoxes, int dim)\n  {\n    eigen_assert(to - from > 1);\n    if(to - from == 2) {\n      boxes.push_back(objBoxes[objCenters[from].second].merged(objBoxes[objCenters[from + 1].second]));\n      children.push_back(from + (int)objects.size() - 1); //there are objects.size() - 1 tree nodes\n      children.push_back(from + (int)objects.size());\n    }\n    else if(to - from == 3) {\n      int mid = from + 2;\n      std::nth_element(objCenters.begin() + from, objCenters.begin() + mid,\n                        objCenters.begin() + to, VectorComparator(dim)); //partition\n      build(objCenters, from, mid, objBoxes, (dim + 1) % Dim);\n      int idx1 = (int)boxes.size() - 1;\n      boxes.push_back(boxes[idx1].merged(objBoxes[objCenters[mid].second]));\n      children.push_back(idx1);\n      children.push_back(mid + (int)objects.size() - 1);\n    }\n    else {\n      int mid = from + (to - from) / 2;\n      nth_element(objCenters.begin() + from, objCenters.begin() + mid,\n                  objCenters.begin() + to, VectorComparator(dim)); //partition\n      build(objCenters, from, mid, objBoxes, (dim + 1) % Dim);\n      int idx1 = (int)boxes.size() - 1;\n      build(objCenters, mid, to, objBoxes, (dim + 1) % Dim);\n      int idx2 = (int)boxes.size() - 1;\n      boxes.push_back(boxes[idx1].merged(boxes[idx2]));\n      children.push_back(idx1);\n      children.push_back(idx2);\n    }\n  }\n\n  std::vector<int> children; //children of x are children[2x] and children[2x+1], indices bigger than boxes.size() index into objects.\n  VolumeList boxes;\n  ObjectList objects;\n};\n\n} // end namespace Eigen\n\n#endif //KDBVH_H_INCLUDED\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/Eigenvalues/ArpackSelfAdjointEigenSolver.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 David Harmon <dharmon@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_ARPACKGENERALIZEDSELFADJOINTEIGENSOLVER_H\n#define EIGEN_ARPACKGENERALIZEDSELFADJOINTEIGENSOLVER_H\n\n#include \"../../../../Eigen/Dense\"\n\nnamespace Eigen { \n\nnamespace internal {\n  template<typename Scalar, typename RealScalar> struct arpack_wrapper;\n  template<typename MatrixSolver, typename MatrixType, typename Scalar, bool BisSPD> struct OP;\n}\n\n\n\ntemplate<typename MatrixType, typename MatrixSolver=SimplicialLLT<MatrixType>, bool BisSPD=false>\nclass ArpackGeneralizedSelfAdjointEigenSolver\n{\npublic:\n  //typedef typename MatrixSolver::MatrixType MatrixType;\n\n  /** \\brief Scalar type for matrices of type \\p MatrixType. */\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename MatrixType::Index Index;\n\n  /** \\brief Real scalar type for \\p MatrixType.\n   *\n   * This is just \\c Scalar if #Scalar is real (e.g., \\c float or\n   * \\c Scalar), and the type of the real part of \\c Scalar if #Scalar is\n   * complex.\n   */\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n\n  /** \\brief Type for vector of eigenvalues as returned by eigenvalues().\n   *\n   * This is a column vector with entries of type #RealScalar.\n   * The length of the vector is the size of \\p nbrEigenvalues.\n   */\n  typedef typename internal::plain_col_type<MatrixType, RealScalar>::type RealVectorType;\n\n  /** \\brief Default constructor.\n   *\n   * The default constructor is for cases in which the user intends to\n   * perform decompositions via compute().\n   *\n   */\n  ArpackGeneralizedSelfAdjointEigenSolver()\n   : m_eivec(),\n     m_eivalues(),\n     m_isInitialized(false),\n     m_eigenvectorsOk(false),\n     m_nbrConverged(0),\n     m_nbrIterations(0)\n  { }\n\n  /** \\brief Constructor; computes generalized eigenvalues of given matrix with respect to another matrix.\n   *\n   * \\param[in] A Self-adjoint matrix whose eigenvalues / eigenvectors will\n   *    computed. By default, the upper triangular part is used, but can be changed\n   *    through the template parameter.\n   * \\param[in] B Self-adjoint matrix for the generalized eigenvalue problem.\n   * \\param[in] nbrEigenvalues The number of eigenvalues / eigenvectors to compute.\n   *    Must be less than the size of the input matrix, or an error is returned.\n   * \\param[in] eigs_sigma String containing either \"LM\", \"SM\", \"LA\", or \"SA\", with\n   *    respective meanings to find the largest magnitude , smallest magnitude,\n   *    largest algebraic, or smallest algebraic eigenvalues. Alternatively, this\n   *    value can contain floating point value in string form, in which case the\n   *    eigenvalues closest to this value will be found.\n   * \\param[in]  options Can be #ComputeEigenvectors (default) or #EigenvaluesOnly.\n   * \\param[in] tol What tolerance to find the eigenvalues to. Default is 0, which\n   *    means machine precision.\n   *\n   * This constructor calls compute(const MatrixType&, const MatrixType&, Index, string, int, RealScalar)\n   * to compute the eigenvalues of the matrix \\p A with respect to \\p B. The eigenvectors are computed if\n   * \\p options equals #ComputeEigenvectors.\n   *\n   */\n  ArpackGeneralizedSelfAdjointEigenSolver(const MatrixType& A, const MatrixType& B,\n                                          Index nbrEigenvalues, std::string eigs_sigma=\"LM\",\n                               int options=ComputeEigenvectors, RealScalar tol=0.0)\n    : m_eivec(),\n      m_eivalues(),\n      m_isInitialized(false),\n      m_eigenvectorsOk(false),\n      m_nbrConverged(0),\n      m_nbrIterations(0)\n  {\n    compute(A, B, nbrEigenvalues, eigs_sigma, options, tol);\n  }\n\n  /** \\brief Constructor; computes eigenvalues of given matrix.\n   *\n   * \\param[in] A Self-adjoint matrix whose eigenvalues / eigenvectors will\n   *    computed. By default, the upper triangular part is used, but can be changed\n   *    through the template parameter.\n   * \\param[in] nbrEigenvalues The number of eigenvalues / eigenvectors to compute.\n   *    Must be less than the size of the input matrix, or an error is returned.\n   * \\param[in] eigs_sigma String containing either \"LM\", \"SM\", \"LA\", or \"SA\", with\n   *    respective meanings to find the largest magnitude , smallest magnitude,\n   *    largest algebraic, or smallest algebraic eigenvalues. Alternatively, this\n   *    value can contain floating point value in string form, in which case the\n   *    eigenvalues closest to this value will be found.\n   * \\param[in]  options Can be #ComputeEigenvectors (default) or #EigenvaluesOnly.\n   * \\param[in] tol What tolerance to find the eigenvalues to. Default is 0, which\n   *    means machine precision.\n   *\n   * This constructor calls compute(const MatrixType&, Index, string, int, RealScalar)\n   * to compute the eigenvalues of the matrix \\p A. The eigenvectors are computed if\n   * \\p options equals #ComputeEigenvectors.\n   *\n   */\n\n  ArpackGeneralizedSelfAdjointEigenSolver(const MatrixType& A,\n                                          Index nbrEigenvalues, std::string eigs_sigma=\"LM\",\n                               int options=ComputeEigenvectors, RealScalar tol=0.0)\n    : m_eivec(),\n      m_eivalues(),\n      m_isInitialized(false),\n      m_eigenvectorsOk(false),\n      m_nbrConverged(0),\n      m_nbrIterations(0)\n  {\n    compute(A, nbrEigenvalues, eigs_sigma, options, tol);\n  }\n\n\n  /** \\brief Computes generalized eigenvalues / eigenvectors of given matrix using the external ARPACK library.\n   *\n   * \\param[in]  A  Selfadjoint matrix whose eigendecomposition is to be computed.\n   * \\param[in]  B  Selfadjoint matrix for generalized eigenvalues.\n   * \\param[in] nbrEigenvalues The number of eigenvalues / eigenvectors to compute.\n   *    Must be less than the size of the input matrix, or an error is returned.\n   * \\param[in] eigs_sigma String containing either \"LM\", \"SM\", \"LA\", or \"SA\", with\n   *    respective meanings to find the largest magnitude , smallest magnitude,\n   *    largest algebraic, or smallest algebraic eigenvalues. Alternatively, this\n   *    value can contain floating point value in string form, in which case the\n   *    eigenvalues closest to this value will be found.\n   * \\param[in]  options Can be #ComputeEigenvectors (default) or #EigenvaluesOnly.\n   * \\param[in] tol What tolerance to find the eigenvalues to. Default is 0, which\n   *    means machine precision.\n   *\n   * \\returns    Reference to \\c *this\n   *\n   * This function computes the generalized eigenvalues of \\p A with respect to \\p B using ARPACK.  The eigenvalues()\n   * function can be used to retrieve them.  If \\p options equals #ComputeEigenvectors,\n   * then the eigenvectors are also computed and can be retrieved by\n   * calling eigenvectors().\n   *\n   */\n  ArpackGeneralizedSelfAdjointEigenSolver& compute(const MatrixType& A, const MatrixType& B,\n                                                   Index nbrEigenvalues, std::string eigs_sigma=\"LM\",\n                                        int options=ComputeEigenvectors, RealScalar tol=0.0);\n  \n  /** \\brief Computes eigenvalues / eigenvectors of given matrix using the external ARPACK library.\n   *\n   * \\param[in]  A  Selfadjoint matrix whose eigendecomposition is to be computed.\n   * \\param[in] nbrEigenvalues The number of eigenvalues / eigenvectors to compute.\n   *    Must be less than the size of the input matrix, or an error is returned.\n   * \\param[in] eigs_sigma String containing either \"LM\", \"SM\", \"LA\", or \"SA\", with\n   *    respective meanings to find the largest magnitude , smallest magnitude,\n   *    largest algebraic, or smallest algebraic eigenvalues. Alternatively, this\n   *    value can contain floating point value in string form, in which case the\n   *    eigenvalues closest to this value will be found.\n   * \\param[in]  options Can be #ComputeEigenvectors (default) or #EigenvaluesOnly.\n   * \\param[in] tol What tolerance to find the eigenvalues to. Default is 0, which\n   *    means machine precision.\n   *\n   * \\returns    Reference to \\c *this\n   *\n   * This function computes the eigenvalues of \\p A using ARPACK.  The eigenvalues()\n   * function can be used to retrieve them.  If \\p options equals #ComputeEigenvectors,\n   * then the eigenvectors are also computed and can be retrieved by\n   * calling eigenvectors().\n   *\n   */\n  ArpackGeneralizedSelfAdjointEigenSolver& compute(const MatrixType& A,\n                                                   Index nbrEigenvalues, std::string eigs_sigma=\"LM\",\n                                        int options=ComputeEigenvectors, RealScalar tol=0.0);\n\n\n  /** \\brief Returns the eigenvectors of given matrix.\n   *\n   * \\returns  A const reference to the matrix whose columns are the eigenvectors.\n   *\n   * \\pre The eigenvectors have been computed before.\n   *\n   * Column \\f$ k \\f$ of the returned matrix is an eigenvector corresponding\n   * to eigenvalue number \\f$ k \\f$ as returned by eigenvalues().  The\n   * eigenvectors are normalized to have (Euclidean) norm equal to one. If\n   * this object was used to solve the eigenproblem for the selfadjoint\n   * matrix \\f$ A \\f$, then the matrix returned by this function is the\n   * matrix \\f$ V \\f$ in the eigendecomposition \\f$ A V = D V \\f$.\n   * For the generalized eigenproblem, the matrix returned is the solution \\f$ A V = D B V \\f$\n   *\n   * Example: \\include SelfAdjointEigenSolver_eigenvectors.cpp\n   * Output: \\verbinclude SelfAdjointEigenSolver_eigenvectors.out\n   *\n   * \\sa eigenvalues()\n   */\n  const Matrix<Scalar, Dynamic, Dynamic>& eigenvectors() const\n  {\n    eigen_assert(m_isInitialized && \"ArpackGeneralizedSelfAdjointEigenSolver is not initialized.\");\n    eigen_assert(m_eigenvectorsOk && \"The eigenvectors have not been computed together with the eigenvalues.\");\n    return m_eivec;\n  }\n\n  /** \\brief Returns the eigenvalues of given matrix.\n   *\n   * \\returns A const reference to the column vector containing the eigenvalues.\n   *\n   * \\pre The eigenvalues have been computed before.\n   *\n   * The eigenvalues are repeated according to their algebraic multiplicity,\n   * so there are as many eigenvalues as rows in the matrix. The eigenvalues\n   * are sorted in increasing order.\n   *\n   * Example: \\include SelfAdjointEigenSolver_eigenvalues.cpp\n   * Output: \\verbinclude SelfAdjointEigenSolver_eigenvalues.out\n   *\n   * \\sa eigenvectors(), MatrixBase::eigenvalues()\n   */\n  const Matrix<Scalar, Dynamic, 1>& eigenvalues() const\n  {\n    eigen_assert(m_isInitialized && \"ArpackGeneralizedSelfAdjointEigenSolver is not initialized.\");\n    return m_eivalues;\n  }\n\n  /** \\brief Computes the positive-definite square root of the matrix.\n   *\n   * \\returns the positive-definite square root of the matrix\n   *\n   * \\pre The eigenvalues and eigenvectors of a positive-definite matrix\n   * have been computed before.\n   *\n   * The square root of a positive-definite matrix \\f$ A \\f$ is the\n   * positive-definite matrix whose square equals \\f$ A \\f$. This function\n   * uses the eigendecomposition \\f$ A = V D V^{-1} \\f$ to compute the\n   * square root as \\f$ A^{1/2} = V D^{1/2} V^{-1} \\f$.\n   *\n   * Example: \\include SelfAdjointEigenSolver_operatorSqrt.cpp\n   * Output: \\verbinclude SelfAdjointEigenSolver_operatorSqrt.out\n   *\n   * \\sa operatorInverseSqrt(),\n   *     \\ref MatrixFunctions_Module \"MatrixFunctions Module\"\n   */\n  Matrix<Scalar, Dynamic, Dynamic> operatorSqrt() const\n  {\n    eigen_assert(m_isInitialized && \"SelfAdjointEigenSolver is not initialized.\");\n    eigen_assert(m_eigenvectorsOk && \"The eigenvectors have not been computed together with the eigenvalues.\");\n    return m_eivec * m_eivalues.cwiseSqrt().asDiagonal() * m_eivec.adjoint();\n  }\n\n  /** \\brief Computes the inverse square root of the matrix.\n   *\n   * \\returns the inverse positive-definite square root of the matrix\n   *\n   * \\pre The eigenvalues and eigenvectors of a positive-definite matrix\n   * have been computed before.\n   *\n   * This function uses the eigendecomposition \\f$ A = V D V^{-1} \\f$ to\n   * compute the inverse square root as \\f$ V D^{-1/2} V^{-1} \\f$. This is\n   * cheaper than first computing the square root with operatorSqrt() and\n   * then its inverse with MatrixBase::inverse().\n   *\n   * Example: \\include SelfAdjointEigenSolver_operatorInverseSqrt.cpp\n   * Output: \\verbinclude SelfAdjointEigenSolver_operatorInverseSqrt.out\n   *\n   * \\sa operatorSqrt(), MatrixBase::inverse(),\n   *     \\ref MatrixFunctions_Module \"MatrixFunctions Module\"\n   */\n  Matrix<Scalar, Dynamic, Dynamic> operatorInverseSqrt() const\n  {\n    eigen_assert(m_isInitialized && \"SelfAdjointEigenSolver is not initialized.\");\n    eigen_assert(m_eigenvectorsOk && \"The eigenvectors have not been computed together with the eigenvalues.\");\n    return m_eivec * m_eivalues.cwiseInverse().cwiseSqrt().asDiagonal() * m_eivec.adjoint();\n  }\n\n  /** \\brief Reports whether previous computation was successful.\n   *\n   * \\returns \\c Success if computation was successful, \\c NoConvergence otherwise.\n   */\n  ComputationInfo info() const\n  {\n    eigen_assert(m_isInitialized && \"ArpackGeneralizedSelfAdjointEigenSolver is not initialized.\");\n    return m_info;\n  }\n\n  size_t getNbrConvergedEigenValues() const\n  { return m_nbrConverged; }\n\n  size_t getNbrIterations() const\n  { return m_nbrIterations; }\n\nprotected:\n  Matrix<Scalar, Dynamic, Dynamic> m_eivec;\n  Matrix<Scalar, Dynamic, 1> m_eivalues;\n  ComputationInfo m_info;\n  bool m_isInitialized;\n  bool m_eigenvectorsOk;\n\n  size_t m_nbrConverged;\n  size_t m_nbrIterations;\n};\n\n\n\n\n\ntemplate<typename MatrixType, typename MatrixSolver, bool BisSPD>\nArpackGeneralizedSelfAdjointEigenSolver<MatrixType, MatrixSolver, BisSPD>&\n    ArpackGeneralizedSelfAdjointEigenSolver<MatrixType, MatrixSolver, BisSPD>\n::compute(const MatrixType& A, Index nbrEigenvalues,\n          std::string eigs_sigma, int options, RealScalar tol)\n{\n    MatrixType B(0,0);\n    compute(A, B, nbrEigenvalues, eigs_sigma, options, tol);\n    \n    return *this;\n}\n\n\ntemplate<typename MatrixType, typename MatrixSolver, bool BisSPD>\nArpackGeneralizedSelfAdjointEigenSolver<MatrixType, MatrixSolver, BisSPD>&\n    ArpackGeneralizedSelfAdjointEigenSolver<MatrixType, MatrixSolver, BisSPD>\n::compute(const MatrixType& A, const MatrixType& B, Index nbrEigenvalues,\n          std::string eigs_sigma, int options, RealScalar tol)\n{\n  eigen_assert(A.cols() == A.rows());\n  eigen_assert(B.cols() == B.rows());\n  eigen_assert(B.rows() == 0 || A.cols() == B.rows());\n  eigen_assert((options &~ (EigVecMask | GenEigMask)) == 0\n            && (options & EigVecMask) != EigVecMask\n            && \"invalid option parameter\");\n\n  bool isBempty = (B.rows() == 0) || (B.cols() == 0);\n\n  // For clarity, all parameters match their ARPACK name\n  //\n  // Always 0 on the first call\n  //\n  int ido = 0;\n\n  int n = (int)A.cols();\n\n  // User options: \"LA\", \"SA\", \"SM\", \"LM\", \"BE\"\n  //\n  char whch[3] = \"LM\";\n    \n  // Specifies the shift if iparam[6] = { 3, 4, 5 }, not used if iparam[6] = { 1, 2 }\n  //\n  RealScalar sigma = 0.0;\n\n  if (eigs_sigma.length() >= 2 && isalpha(eigs_sigma[0]) && isalpha(eigs_sigma[1]))\n  {\n      eigs_sigma[0] = toupper(eigs_sigma[0]);\n      eigs_sigma[1] = toupper(eigs_sigma[1]);\n\n      // In the following special case we're going to invert the problem, since solving\n      // for larger magnitude is much much faster\n      // i.e., if 'SM' is specified, we're going to really use 'LM', the default\n      //\n      if (eigs_sigma.substr(0,2) != \"SM\")\n      {\n          whch[0] = eigs_sigma[0];\n          whch[1] = eigs_sigma[1];\n      }\n  }\n  else\n  {\n      eigen_assert(false && \"Specifying clustered eigenvalues is not yet supported!\");\n\n      // If it's not scalar values, then the user may be explicitly\n      // specifying the sigma value to cluster the evs around\n      //\n      sigma = atof(eigs_sigma.c_str());\n\n      // If atof fails, it returns 0.0, which is a fine default\n      //\n  }\n\n  // \"I\" means normal eigenvalue problem, \"G\" means generalized\n  //\n  char bmat[2] = \"I\";\n  if (eigs_sigma.substr(0,2) == \"SM\" || !(isalpha(eigs_sigma[0]) && isalpha(eigs_sigma[1])) || (!isBempty && !BisSPD))\n      bmat[0] = 'G';\n\n  // Now we determine the mode to use\n  //\n  int mode = (bmat[0] == 'G') + 1;\n  if (eigs_sigma.substr(0,2) == \"SM\" || !(isalpha(eigs_sigma[0]) && isalpha(eigs_sigma[1])))\n  {\n      // We're going to use shift-and-invert mode, and basically find\n      // the largest eigenvalues of the inverse operator\n      //\n      mode = 3;\n  }\n\n  // The user-specified number of eigenvalues/vectors to compute\n  //\n  int nev = (int)nbrEigenvalues;\n\n  // Allocate space for ARPACK to store the residual\n  //\n  Scalar *resid = new Scalar[n];\n\n  // Number of Lanczos vectors, must satisfy nev < ncv <= n\n  // Note that this indicates that nev != n, and we cannot compute\n  // all eigenvalues of a mtrix\n  //\n  int ncv = std::min(std::max(2*nev, 20), n);\n\n  // The working n x ncv matrix, also store the final eigenvectors (if computed)\n  //\n  Scalar *v = new Scalar[n*ncv];\n  int ldv = n;\n\n  // Working space\n  //\n  Scalar *workd = new Scalar[3*n];\n  int lworkl = ncv*ncv+8*ncv; // Must be at least this length\n  Scalar *workl = new Scalar[lworkl];\n\n  int *iparam= new int[11];\n  iparam[0] = 1; // 1 means we let ARPACK perform the shifts, 0 means we'd have to do it\n  iparam[2] = std::max(300, (int)std::ceil(2*n/std::max(ncv,1)));\n  iparam[6] = mode; // The mode, 1 is standard ev problem, 2 for generalized ev, 3 for shift-and-invert\n\n  // Used during reverse communicate to notify where arrays start\n  //\n  int *ipntr = new int[11]; \n\n  // Error codes are returned in here, initial value of 0 indicates a random initial\n  // residual vector is used, any other values means resid contains the initial residual\n  // vector, possibly from a previous run\n  //\n  int info = 0;\n\n  Scalar scale = 1.0;\n  //if (!isBempty)\n  //{\n  //Scalar scale = B.norm() / std::sqrt(n);\n  //scale = std::pow(2, std::floor(std::log(scale+1)));\n  ////M /= scale;\n  //for (size_t i=0; i<(size_t)B.outerSize(); i++)\n  //    for (typename MatrixType::InnerIterator it(B, i); it; ++it)\n  //        it.valueRef() /= scale;\n  //}\n\n  MatrixSolver OP;\n  if (mode == 1 || mode == 2)\n  {\n      if (!isBempty)\n          OP.compute(B);\n  }\n  else if (mode == 3)\n  {\n      if (sigma == 0.0)\n      {\n          OP.compute(A);\n      }\n      else\n      {\n          // Note: We will never enter here because sigma must be 0.0\n          //\n          if (isBempty)\n          {\n            MatrixType AminusSigmaB(A);\n            for (Index i=0; i<A.rows(); ++i)\n                AminusSigmaB.coeffRef(i,i) -= sigma;\n            \n            OP.compute(AminusSigmaB);\n          }\n          else\n          {\n              MatrixType AminusSigmaB = A - sigma * B;\n              OP.compute(AminusSigmaB);\n          }\n      }\n  }\n \n  if (!(mode == 1 && isBempty) && !(mode == 2 && isBempty) && OP.info() != Success)\n      std::cout << \"Error factoring matrix\" << std::endl;\n\n  do\n  {\n    internal::arpack_wrapper<Scalar, RealScalar>::saupd(&ido, bmat, &n, whch, &nev, &tol, resid, \n                                                        &ncv, v, &ldv, iparam, ipntr, workd, workl,\n                                                        &lworkl, &info);\n\n    if (ido == -1 || ido == 1)\n    {\n      Scalar *in  = workd + ipntr[0] - 1;\n      Scalar *out = workd + ipntr[1] - 1;\n\n      if (ido == 1 && mode != 2)\n      {\n          Scalar *out2 = workd + ipntr[2] - 1;\n          if (isBempty || mode == 1)\n            Matrix<Scalar, Dynamic, 1>::Map(out2, n) = Matrix<Scalar, Dynamic, 1>::Map(in, n);\n          else\n            Matrix<Scalar, Dynamic, 1>::Map(out2, n) = B * Matrix<Scalar, Dynamic, 1>::Map(in, n);\n          \n          in = workd + ipntr[2] - 1;\n      }\n\n      if (mode == 1)\n      {\n        if (isBempty)\n        {\n          // OP = A\n          //\n          Matrix<Scalar, Dynamic, 1>::Map(out, n) = A * Matrix<Scalar, Dynamic, 1>::Map(in, n);\n        }\n        else\n        {\n          // OP = L^{-1}AL^{-T}\n          //\n          internal::OP<MatrixSolver, MatrixType, Scalar, BisSPD>::applyOP(OP, A, n, in, out);\n        }\n      }\n      else if (mode == 2)\n      {\n        if (ido == 1)\n          Matrix<Scalar, Dynamic, 1>::Map(in, n)  = A * Matrix<Scalar, Dynamic, 1>::Map(in, n);\n        \n        // OP = B^{-1} A\n        //\n        Matrix<Scalar, Dynamic, 1>::Map(out, n) = OP.solve(Matrix<Scalar, Dynamic, 1>::Map(in, n));\n      }\n      else if (mode == 3)\n      {\n        // OP = (A-\\sigmaB)B (\\sigma could be 0, and B could be I)\n        // The B * in is already computed and stored at in if ido == 1\n        //\n        if (ido == 1 || isBempty)\n          Matrix<Scalar, Dynamic, 1>::Map(out, n) = OP.solve(Matrix<Scalar, Dynamic, 1>::Map(in, n));\n        else\n          Matrix<Scalar, Dynamic, 1>::Map(out, n) = OP.solve(B * Matrix<Scalar, Dynamic, 1>::Map(in, n));\n      }\n    }\n    else if (ido == 2)\n    {\n      Scalar *in  = workd + ipntr[0] - 1;\n      Scalar *out = workd + ipntr[1] - 1;\n\n      if (isBempty || mode == 1)\n        Matrix<Scalar, Dynamic, 1>::Map(out, n) = Matrix<Scalar, Dynamic, 1>::Map(in, n);\n      else\n        Matrix<Scalar, Dynamic, 1>::Map(out, n) = B * Matrix<Scalar, Dynamic, 1>::Map(in, n);\n    }\n  } while (ido != 99);\n\n  if (info == 1)\n    m_info = NoConvergence;\n  else if (info == 3)\n    m_info = NumericalIssue;\n  else if (info < 0)\n    m_info = InvalidInput;\n  else if (info != 0)\n    eigen_assert(false && \"Unknown ARPACK return value!\");\n  else\n  {\n    // Do we compute eigenvectors or not?\n    //\n    int rvec = (options & ComputeEigenvectors) == ComputeEigenvectors;\n\n    // \"A\" means \"All\", use \"S\" to choose specific eigenvalues (not yet supported in ARPACK))\n    //\n    char howmny[2] = \"A\"; \n\n    // if howmny == \"S\", specifies the eigenvalues to compute (not implemented in ARPACK)\n    //\n    int *select = new int[ncv];\n\n    // Final eigenvalues\n    //\n    m_eivalues.resize(nev, 1);\n\n    internal::arpack_wrapper<Scalar, RealScalar>::seupd(&rvec, howmny, select, m_eivalues.data(), v, &ldv,\n                                                        &sigma, bmat, &n, whch, &nev, &tol, resid, &ncv,\n                                                        v, &ldv, iparam, ipntr, workd, workl, &lworkl, &info);\n\n    if (info == -14)\n      m_info = NoConvergence;\n    else if (info != 0)\n      m_info = InvalidInput;\n    else\n    {\n      if (rvec)\n      {\n        m_eivec.resize(A.rows(), nev);\n        for (int i=0; i<nev; i++)\n          for (int j=0; j<n; j++)\n            m_eivec(j,i) = v[i*n+j] / scale;\n      \n        if (mode == 1 && !isBempty && BisSPD)\n          internal::OP<MatrixSolver, MatrixType, Scalar, BisSPD>::project(OP, n, nev, m_eivec.data());\n\n        m_eigenvectorsOk = true;\n      }\n\n      m_nbrIterations = iparam[2];\n      m_nbrConverged  = iparam[4];\n\n      m_info = Success;\n    }\n\n    delete[] select;\n  }\n\n  delete[] v;\n  delete[] iparam;\n  delete[] ipntr;\n  delete[] workd;\n  delete[] workl;\n  delete[] resid;\n\n  m_isInitialized = true;\n\n  return *this;\n}\n\n\n// Single precision\n//\nextern \"C\" void ssaupd_(int *ido, char *bmat, int *n, char *which,\n    int *nev, float *tol, float *resid, int *ncv,\n    float *v, int *ldv, int *iparam, int *ipntr,\n    float *workd, float *workl, int *lworkl,\n    int *info);\n\nextern \"C\" void sseupd_(int *rvec, char *All, int *select, float *d,\n    float *z, int *ldz, float *sigma, \n    char *bmat, int *n, char *which, int *nev,\n    float *tol, float *resid, int *ncv, float *v,\n    int *ldv, int *iparam, int *ipntr, float *workd,\n    float *workl, int *lworkl, int *ierr);\n\n// Double precision\n//\nextern \"C\" void dsaupd_(int *ido, char *bmat, int *n, char *which,\n    int *nev, double *tol, double *resid, int *ncv,\n    double *v, int *ldv, int *iparam, int *ipntr,\n    double *workd, double *workl, int *lworkl,\n    int *info);\n\nextern \"C\" void dseupd_(int *rvec, char *All, int *select, double *d,\n    double *z, int *ldz, double *sigma, \n    char *bmat, int *n, char *which, int *nev,\n    double *tol, double *resid, int *ncv, double *v,\n    int *ldv, int *iparam, int *ipntr, double *workd,\n    double *workl, int *lworkl, int *ierr);\n\n\nnamespace internal {\n\ntemplate<typename Scalar, typename RealScalar> struct arpack_wrapper\n{\n  static inline void saupd(int *ido, char *bmat, int *n, char *which,\n      int *nev, RealScalar *tol, Scalar *resid, int *ncv,\n      Scalar *v, int *ldv, int *iparam, int *ipntr,\n      Scalar *workd, Scalar *workl, int *lworkl, int *info)\n  { \n    EIGEN_STATIC_ASSERT(!NumTraits<Scalar>::IsComplex, NUMERIC_TYPE_MUST_BE_REAL)\n  }\n\n  static inline void seupd(int *rvec, char *All, int *select, Scalar *d,\n      Scalar *z, int *ldz, RealScalar *sigma,\n      char *bmat, int *n, char *which, int *nev,\n      RealScalar *tol, Scalar *resid, int *ncv, Scalar *v,\n      int *ldv, int *iparam, int *ipntr, Scalar *workd,\n      Scalar *workl, int *lworkl, int *ierr)\n  {\n    EIGEN_STATIC_ASSERT(!NumTraits<Scalar>::IsComplex, NUMERIC_TYPE_MUST_BE_REAL)\n  }\n};\n\ntemplate <> struct arpack_wrapper<float, float>\n{\n  static inline void saupd(int *ido, char *bmat, int *n, char *which,\n      int *nev, float *tol, float *resid, int *ncv,\n      float *v, int *ldv, int *iparam, int *ipntr,\n      float *workd, float *workl, int *lworkl, int *info)\n  {\n    ssaupd_(ido, bmat, n, which, nev, tol, resid, ncv, v, ldv, iparam, ipntr, workd, workl, lworkl, info);\n  }\n\n  static inline void seupd(int *rvec, char *All, int *select, float *d,\n      float *z, int *ldz, float *sigma,\n      char *bmat, int *n, char *which, int *nev,\n      float *tol, float *resid, int *ncv, float *v,\n      int *ldv, int *iparam, int *ipntr, float *workd,\n      float *workl, int *lworkl, int *ierr)\n  {\n    sseupd_(rvec, All, select, d, z, ldz, sigma, bmat, n, which, nev, tol, resid, ncv, v, ldv, iparam, ipntr,\n        workd, workl, lworkl, ierr);\n  }\n};\n\ntemplate <> struct arpack_wrapper<double, double>\n{\n  static inline void saupd(int *ido, char *bmat, int *n, char *which,\n      int *nev, double *tol, double *resid, int *ncv,\n      double *v, int *ldv, int *iparam, int *ipntr,\n      double *workd, double *workl, int *lworkl, int *info)\n  {\n    dsaupd_(ido, bmat, n, which, nev, tol, resid, ncv, v, ldv, iparam, ipntr, workd, workl, lworkl, info);\n  }\n\n  static inline void seupd(int *rvec, char *All, int *select, double *d,\n      double *z, int *ldz, double *sigma,\n      char *bmat, int *n, char *which, int *nev,\n      double *tol, double *resid, int *ncv, double *v,\n      int *ldv, int *iparam, int *ipntr, double *workd,\n      double *workl, int *lworkl, int *ierr)\n  {\n    dseupd_(rvec, All, select, d, v, ldv, sigma, bmat, n, which, nev, tol, resid, ncv, v, ldv, iparam, ipntr,\n        workd, workl, lworkl, ierr);\n  }\n};\n\n\ntemplate<typename MatrixSolver, typename MatrixType, typename Scalar, bool BisSPD>\nstruct OP\n{\n    static inline void applyOP(MatrixSolver &OP, const MatrixType &A, int n, Scalar *in, Scalar *out);\n    static inline void project(MatrixSolver &OP, int n, int k, Scalar *vecs);\n};\n\ntemplate<typename MatrixSolver, typename MatrixType, typename Scalar>\nstruct OP<MatrixSolver, MatrixType, Scalar, true>\n{\n  static inline void applyOP(MatrixSolver &OP, const MatrixType &A, int n, Scalar *in, Scalar *out)\n{\n    // OP = L^{-1} A L^{-T}  (B = LL^T)\n    //\n    // First solve L^T out = in\n    //\n    Matrix<Scalar, Dynamic, 1>::Map(out, n) = OP.matrixU().solve(Matrix<Scalar, Dynamic, 1>::Map(in, n));\n    Matrix<Scalar, Dynamic, 1>::Map(out, n) = OP.permutationPinv() * Matrix<Scalar, Dynamic, 1>::Map(out, n);\n\n    // Then compute out = A out\n    //\n    Matrix<Scalar, Dynamic, 1>::Map(out, n) = A * Matrix<Scalar, Dynamic, 1>::Map(out, n);\n\n    // Then solve L out = out\n    //\n    Matrix<Scalar, Dynamic, 1>::Map(out, n) = OP.permutationP() * Matrix<Scalar, Dynamic, 1>::Map(out, n);\n    Matrix<Scalar, Dynamic, 1>::Map(out, n) = OP.matrixL().solve(Matrix<Scalar, Dynamic, 1>::Map(out, n));\n}\n\n  static inline void project(MatrixSolver &OP, int n, int k, Scalar *vecs)\n{\n    // Solve L^T out = in\n    //\n    Matrix<Scalar, Dynamic, Dynamic>::Map(vecs, n, k) = OP.matrixU().solve(Matrix<Scalar, Dynamic, Dynamic>::Map(vecs, n, k));\n    Matrix<Scalar, Dynamic, Dynamic>::Map(vecs, n, k) = OP.permutationPinv() * Matrix<Scalar, Dynamic, Dynamic>::Map(vecs, n, k);\n}\n\n};\n\ntemplate<typename MatrixSolver, typename MatrixType, typename Scalar>\nstruct OP<MatrixSolver, MatrixType, Scalar, false>\n{\n  static inline void applyOP(MatrixSolver &OP, const MatrixType &A, int n, Scalar *in, Scalar *out)\n{\n    eigen_assert(false && \"Should never be in here...\");\n}\n\n  static inline void project(MatrixSolver &OP, int n, int k, Scalar *vecs)\n{\n    eigen_assert(false && \"Should never be in here...\");\n}\n\n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_ARPACKSELFADJOINTEIGENSOLVER_H\n\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/EulerAngles/CMakeLists.txt",
    "content": "file(GLOB Eigen_EulerAngles_SRCS \"*.h\")\n\ninstall(FILES\n  ${Eigen_EulerAngles_SRCS}\n  DESTINATION ${INCLUDE_INSTALL_DIR}/unsupported/Eigen/src/EulerAngles COMPONENT Devel\n  )\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/EulerAngles/EulerAngles.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Tal Hadad <tal_hd@hotmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_EULERANGLESCLASS_H// TODO: Fix previous \"EIGEN_EULERANGLES_H\" definition?\n#define EIGEN_EULERANGLESCLASS_H\n\nnamespace Eigen\n{\n  /** \\class EulerAngles\n    *\n    * \\ingroup EulerAngles_Module\n    *\n    * \\brief Represents a rotation in a 3 dimensional space as three Euler angles.\n    *\n    * Euler rotation is a set of three rotation of three angles over three fixed axes, defined by the EulerSystem given as a template parameter.\n    * \n    * Here is how intrinsic Euler angles works:\n    *  - first, rotate the axes system over the alpha axis in angle alpha\n    *  - then, rotate the axes system over the beta axis(which was rotated in the first stage) in angle beta\n    *  - then, rotate the axes system over the gamma axis(which was rotated in the two stages above) in angle gamma\n    *\n    * \\note This class support only intrinsic Euler angles for simplicity,\n    *  see EulerSystem how to easily overcome this for extrinsic systems.\n    *\n    * ### Rotation representation and conversions ###\n    *\n    * It has been proved(see Wikipedia link below) that every rotation can be represented\n    *  by Euler angles, but there is no single representation (e.g. unlike rotation matrices).\n    * Therefore, you can convert from Eigen rotation and to them\n    *  (including rotation matrices, which is not called \"rotations\" by Eigen design).\n    *\n    * Euler angles usually used for:\n    *  - convenient human representation of rotation, especially in interactive GUI.\n    *  - gimbal systems and robotics\n    *  - efficient encoding(i.e. 3 floats only) of rotation for network protocols.\n    *\n    * However, Euler angles are slow comparing to quaternion or matrices,\n    *  because their unnatural math definition, although it's simple for human.\n    * To overcome this, this class provide easy movement from the math friendly representation\n    *  to the human friendly representation, and vise-versa.\n    *\n    * All the user need to do is a safe simple C++ type conversion,\n    *  and this class take care for the math.\n    * Additionally, some axes related computation is done in compile time.\n    *\n    * #### Euler angles ranges in conversions ####\n    * Rotations representation as EulerAngles are not single (unlike matrices),\n    *  and even have infinite EulerAngles representations.<BR>\n    * For example, add or subtract 2*PI from either angle of EulerAngles\n    *  and you'll get the same rotation.\n    * This is the general reason for infinite representation,\n    *  but it's not the only general reason for not having a single representation.\n    *\n    * When converting rotation to EulerAngles, this class convert it to specific ranges\n    * When converting some rotation to EulerAngles, the rules for ranges are as follow:\n    * - If the rotation we converting from is an EulerAngles\n    *  (even when it represented as RotationBase explicitly), angles ranges are __undefined__.\n    * - otherwise, alpha and gamma angles will be in the range [-PI, PI].<BR>\n    *   As for Beta angle:\n    *    - If the system is Tait-Bryan, the beta angle will be in the range [-PI/2, PI/2].\n    *    - otherwise:\n    *      - If the beta axis is positive, the beta angle will be in the range [0, PI]\n    *      - If the beta axis is negative, the beta angle will be in the range [-PI, 0]\n    *\n    * \\sa EulerAngles(const MatrixBase<Derived>&)\n    * \\sa EulerAngles(const RotationBase<Derived, 3>&)\n    *\n    * ### Convenient user typedefs ###\n    *\n    * Convenient typedefs for EulerAngles exist for float and double scalar,\n    *  in a form of EulerAngles{A}{B}{C}{scalar},\n    *  e.g. \\ref EulerAnglesXYZd, \\ref EulerAnglesZYZf.\n    *\n    * Only for positive axes{+x,+y,+z} Euler systems are have convenient typedef.\n    * If you need negative axes{-x,-y,-z}, it is recommended to create you own typedef with\n    *  a word that represent what you need.\n    *\n    * ### Example ###\n    *\n    * \\include EulerAngles.cpp\n    * Output: \\verbinclude EulerAngles.out\n    *\n    * ### Additional reading ###\n    *\n    * If you're want to get more idea about how Euler system work in Eigen see EulerSystem.\n    *\n    * More information about Euler angles: https://en.wikipedia.org/wiki/Euler_angles\n    *\n    * \\tparam _Scalar the scalar type, i.e. the type of the angles.\n    *\n    * \\tparam _System the EulerSystem to use, which represents the axes of rotation.\n    */\n  template <typename _Scalar, class _System>\n  class EulerAngles : public RotationBase<EulerAngles<_Scalar, _System>, 3>\n  {\n    public:\n      typedef RotationBase<EulerAngles<_Scalar, _System>, 3> Base;\n      \n      /** the scalar type of the angles */\n      typedef _Scalar Scalar;\n      typedef typename NumTraits<Scalar>::Real RealScalar;\n      \n      /** the EulerSystem to use, which represents the axes of rotation. */\n      typedef _System System;\n    \n      typedef Matrix<Scalar,3,3> Matrix3; /*!< the equivalent rotation matrix type */\n      typedef Matrix<Scalar,3,1> Vector3; /*!< the equivalent 3 dimension vector type */\n      typedef Quaternion<Scalar> QuaternionType; /*!< the equivalent quaternion type */\n      typedef AngleAxis<Scalar> AngleAxisType; /*!< the equivalent angle-axis type */\n      \n      /** \\returns the axis vector of the first (alpha) rotation */\n      static Vector3 AlphaAxisVector() {\n        const Vector3& u = Vector3::Unit(System::AlphaAxisAbs - 1);\n        return System::IsAlphaOpposite ? -u : u;\n      }\n      \n      /** \\returns the axis vector of the second (beta) rotation */\n      static Vector3 BetaAxisVector() {\n        const Vector3& u = Vector3::Unit(System::BetaAxisAbs - 1);\n        return System::IsBetaOpposite ? -u : u;\n      }\n      \n      /** \\returns the axis vector of the third (gamma) rotation */\n      static Vector3 GammaAxisVector() {\n        const Vector3& u = Vector3::Unit(System::GammaAxisAbs - 1);\n        return System::IsGammaOpposite ? -u : u;\n      }\n\n    private:\n      Vector3 m_angles;\n\n    public:\n      /** Default constructor without initialization. */\n      EulerAngles() {}\n      /** Constructs and initialize an EulerAngles (\\p alpha, \\p beta, \\p gamma). */\n      EulerAngles(const Scalar& alpha, const Scalar& beta, const Scalar& gamma) :\n        m_angles(alpha, beta, gamma) {}\n      \n      // TODO: Test this constructor\n      /** Constructs and initialize an EulerAngles from the array data {alpha, beta, gamma} */\n      explicit EulerAngles(const Scalar* data) : m_angles(data) {}\n      \n      /** Constructs and initializes an EulerAngles from either:\n        *  - a 3x3 rotation matrix expression(i.e. pure orthogonal matrix with determinant of +1),\n        *  - a 3D vector expression representing Euler angles.\n        *\n        * \\note If \\p other is a 3x3 rotation matrix, the angles range rules will be as follow:<BR>\n        *  Alpha and gamma angles will be in the range [-PI, PI].<BR>\n        *  As for Beta angle:\n        *   - If the system is Tait-Bryan, the beta angle will be in the range [-PI/2, PI/2].\n        *   - otherwise:\n        *     - If the beta axis is positive, the beta angle will be in the range [0, PI]\n        *     - If the beta axis is negative, the beta angle will be in the range [-PI, 0]\n       */\n      template<typename Derived>\n      explicit EulerAngles(const MatrixBase<Derived>& other) { *this = other; }\n      \n      /** Constructs and initialize Euler angles from a rotation \\p rot.\n        *\n        * \\note If \\p rot is an EulerAngles (even when it represented as RotationBase explicitly),\n        *  angles ranges are __undefined__.\n        *  Otherwise, alpha and gamma angles will be in the range [-PI, PI].<BR>\n        *  As for Beta angle:\n        *   - If the system is Tait-Bryan, the beta angle will be in the range [-PI/2, PI/2].\n        *   - otherwise:\n        *     - If the beta axis is positive, the beta angle will be in the range [0, PI]\n        *     - If the beta axis is negative, the beta angle will be in the range [-PI, 0]\n      */\n      template<typename Derived>\n      EulerAngles(const RotationBase<Derived, 3>& rot) { System::CalcEulerAngles(*this, rot.toRotationMatrix()); }\n      \n      /*EulerAngles(const QuaternionType& q)\n      {\n        // TODO: Implement it in a faster way for quaternions\n        // According to http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToEuler/\n        //  we can compute only the needed matrix cells and then convert to euler angles. (see ZYX example below)\n        // Currently we compute all matrix cells from quaternion.\n\n        // Special case only for ZYX\n        //Scalar y2 = q.y() * q.y();\n        //m_angles[0] = std::atan2(2*(q.w()*q.z() + q.x()*q.y()), (1 - 2*(y2 + q.z()*q.z())));\n        //m_angles[1] = std::asin( 2*(q.w()*q.y() - q.z()*q.x()));\n        //m_angles[2] = std::atan2(2*(q.w()*q.x() + q.y()*q.z()), (1 - 2*(q.x()*q.x() + y2)));\n      }*/\n\n      /** \\returns The angle values stored in a vector (alpha, beta, gamma). */\n      const Vector3& angles() const { return m_angles; }\n      /** \\returns A read-write reference to the angle values stored in a vector (alpha, beta, gamma). */\n      Vector3& angles() { return m_angles; }\n\n      /** \\returns The value of the first angle. */\n      Scalar alpha() const { return m_angles[0]; }\n      /** \\returns A read-write reference to the angle of the first angle. */\n      Scalar& alpha() { return m_angles[0]; }\n\n      /** \\returns The value of the second angle. */\n      Scalar beta() const { return m_angles[1]; }\n      /** \\returns A read-write reference to the angle of the second angle. */\n      Scalar& beta() { return m_angles[1]; }\n\n      /** \\returns The value of the third angle. */\n      Scalar gamma() const { return m_angles[2]; }\n      /** \\returns A read-write reference to the angle of the third angle. */\n      Scalar& gamma() { return m_angles[2]; }\n\n      /** \\returns The Euler angles rotation inverse (which is as same as the negative),\n        *  (-alpha, -beta, -gamma).\n      */\n      EulerAngles inverse() const\n      {\n        EulerAngles res;\n        res.m_angles = -m_angles;\n        return res;\n      }\n\n      /** \\returns The Euler angles rotation negative (which is as same as the inverse),\n        *  (-alpha, -beta, -gamma).\n      */\n      EulerAngles operator -() const\n      {\n        return inverse();\n      }\n      \n      /** Set \\c *this from either:\n        *  - a 3x3 rotation matrix expression(i.e. pure orthogonal matrix with determinant of +1),\n        *  - a 3D vector expression representing Euler angles.\n        *\n        * See EulerAngles(const MatrixBase<Derived, 3>&) for more information about\n        *  angles ranges output.\n      */\n      template<class Derived>\n      EulerAngles& operator=(const MatrixBase<Derived>& other)\n      {\n        EIGEN_STATIC_ASSERT((internal::is_same<Scalar, typename Derived::Scalar>::value),\n         YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)\n        \n        internal::eulerangles_assign_impl<System, Derived>::run(*this, other.derived());\n        return *this;\n      }\n\n      // TODO: Assign and construct from another EulerAngles (with different system)\n      \n      /** Set \\c *this from a rotation.\n        *\n        * See EulerAngles(const RotationBase<Derived, 3>&) for more information about\n        *  angles ranges output.\n      */\n      template<typename Derived>\n      EulerAngles& operator=(const RotationBase<Derived, 3>& rot) {\n        System::CalcEulerAngles(*this, rot.toRotationMatrix());\n        return *this;\n      }\n      \n      /** \\returns \\c true if \\c *this is approximately equal to \\a other, within the precision\n        * determined by \\a prec.\n        *\n        * \\sa MatrixBase::isApprox() */\n      bool isApprox(const EulerAngles& other,\n        const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const\n      { return angles().isApprox(other.angles(), prec); }\n\n      /** \\returns an equivalent 3x3 rotation matrix. */\n      Matrix3 toRotationMatrix() const\n      {\n        // TODO: Calc it faster\n        return static_cast<QuaternionType>(*this).toRotationMatrix();\n      }\n\n      /** Convert the Euler angles to quaternion. */\n      operator QuaternionType() const\n      {\n        return\n          AngleAxisType(alpha(), AlphaAxisVector()) *\n          AngleAxisType(beta(), BetaAxisVector())   *\n          AngleAxisType(gamma(), GammaAxisVector());\n      }\n      \n      friend std::ostream& operator<<(std::ostream& s, const EulerAngles<Scalar, System>& eulerAngles)\n      {\n        s << eulerAngles.angles().transpose();\n        return s;\n      }\n      \n      /** \\returns \\c *this with scalar type casted to \\a NewScalarType */\n      template <typename NewScalarType>\n      EulerAngles<NewScalarType, System> cast() const\n      {\n        EulerAngles<NewScalarType, System> e;\n        e.angles() = angles().template cast<NewScalarType>();\n        return e;\n      }\n  };\n\n#define EIGEN_EULER_ANGLES_SINGLE_TYPEDEF(AXES, SCALAR_TYPE, SCALAR_POSTFIX) \\\n  /** \\ingroup EulerAngles_Module */ \\\n  typedef EulerAngles<SCALAR_TYPE, EulerSystem##AXES> EulerAngles##AXES##SCALAR_POSTFIX;\n\n#define EIGEN_EULER_ANGLES_TYPEDEFS(SCALAR_TYPE, SCALAR_POSTFIX) \\\n  EIGEN_EULER_ANGLES_SINGLE_TYPEDEF(XYZ, SCALAR_TYPE, SCALAR_POSTFIX) \\\n  EIGEN_EULER_ANGLES_SINGLE_TYPEDEF(XYX, SCALAR_TYPE, SCALAR_POSTFIX) \\\n  EIGEN_EULER_ANGLES_SINGLE_TYPEDEF(XZY, SCALAR_TYPE, SCALAR_POSTFIX) \\\n  EIGEN_EULER_ANGLES_SINGLE_TYPEDEF(XZX, SCALAR_TYPE, SCALAR_POSTFIX) \\\n \\\n  EIGEN_EULER_ANGLES_SINGLE_TYPEDEF(YZX, SCALAR_TYPE, SCALAR_POSTFIX) \\\n  EIGEN_EULER_ANGLES_SINGLE_TYPEDEF(YZY, SCALAR_TYPE, SCALAR_POSTFIX) \\\n  EIGEN_EULER_ANGLES_SINGLE_TYPEDEF(YXZ, SCALAR_TYPE, SCALAR_POSTFIX) \\\n  EIGEN_EULER_ANGLES_SINGLE_TYPEDEF(YXY, SCALAR_TYPE, SCALAR_POSTFIX) \\\n \\\n  EIGEN_EULER_ANGLES_SINGLE_TYPEDEF(ZXY, SCALAR_TYPE, SCALAR_POSTFIX) \\\n  EIGEN_EULER_ANGLES_SINGLE_TYPEDEF(ZXZ, SCALAR_TYPE, SCALAR_POSTFIX) \\\n  EIGEN_EULER_ANGLES_SINGLE_TYPEDEF(ZYX, SCALAR_TYPE, SCALAR_POSTFIX) \\\n  EIGEN_EULER_ANGLES_SINGLE_TYPEDEF(ZYZ, SCALAR_TYPE, SCALAR_POSTFIX)\n\nEIGEN_EULER_ANGLES_TYPEDEFS(float, f)\nEIGEN_EULER_ANGLES_TYPEDEFS(double, d)\n\n  namespace internal\n  {\n    template<typename _Scalar, class _System>\n    struct traits<EulerAngles<_Scalar, _System> >\n    {\n      typedef _Scalar Scalar;\n    };\n    \n    // set from a rotation matrix\n    template<class System, class Other>\n    struct eulerangles_assign_impl<System,Other,3,3>\n    {\n      typedef typename Other::Scalar Scalar;\n      static void run(EulerAngles<Scalar, System>& e, const Other& m)\n      {\n        System::CalcEulerAngles(e, m);\n      }\n    };\n    \n    // set from a vector of Euler angles\n    template<class System, class Other>\n    struct eulerangles_assign_impl<System,Other,3,1>\n    {\n      typedef typename Other::Scalar Scalar;\n      static void run(EulerAngles<Scalar, System>& e, const Other& vec)\n      {\n        e.angles() = vec;\n      }\n    };\n  }\n}\n\n#endif // EIGEN_EULERANGLESCLASS_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/EulerAngles/EulerSystem.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Tal Hadad <tal_hd@hotmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_EULERSYSTEM_H\n#define EIGEN_EULERSYSTEM_H\n\nnamespace Eigen\n{\n  // Forward declarations\n  template <typename _Scalar, class _System>\n  class EulerAngles;\n  \n  namespace internal\n  {\n    // TODO: Add this trait to the Eigen internal API?\n    template <int Num, bool IsPositive = (Num > 0)>\n    struct Abs\n    {\n      enum { value = Num };\n    };\n  \n    template <int Num>\n    struct Abs<Num, false>\n    {\n      enum { value = -Num };\n    };\n\n    template <int Axis>\n    struct IsValidAxis\n    {\n      enum { value = Axis != 0 && Abs<Axis>::value <= 3 };\n    };\n    \n    template<typename System,\n            typename Other,\n            int OtherRows=Other::RowsAtCompileTime,\n            int OtherCols=Other::ColsAtCompileTime>\n    struct eulerangles_assign_impl;\n  }\n  \n  #define EIGEN_EULER_ANGLES_CLASS_STATIC_ASSERT(COND,MSG) typedef char static_assertion_##MSG[(COND)?1:-1]\n  \n  /** \\brief Representation of a fixed signed rotation axis for EulerSystem.\n    *\n    * \\ingroup EulerAngles_Module\n    *\n    * Values here represent:\n    *  - The axis of the rotation: X, Y or Z.\n    *  - The sign (i.e. direction of the rotation along the axis): positive(+) or negative(-)\n    *\n    * Therefore, this could express all the axes {+X,+Y,+Z,-X,-Y,-Z}\n    *\n    * For positive axis, use +EULER_{axis}, and for negative axis use -EULER_{axis}.\n    */\n  enum EulerAxis\n  {\n    EULER_X = 1, /*!< the X axis */\n    EULER_Y = 2, /*!< the Y axis */\n    EULER_Z = 3  /*!< the Z axis */\n  };\n  \n  /** \\class EulerSystem\n    *\n    * \\ingroup EulerAngles_Module\n    *\n    * \\brief Represents a fixed Euler rotation system.\n    *\n    * This meta-class goal is to represent the Euler system in compilation time, for EulerAngles.\n    *\n    * You can use this class to get two things:\n    *  - Build an Euler system, and then pass it as a template parameter to EulerAngles.\n    *  - Query some compile time data about an Euler system. (e.g. Whether it's Tait-Bryan)\n    *\n    * Euler rotation is a set of three rotation on fixed axes. (see \\ref EulerAngles)\n    * This meta-class store constantly those signed axes. (see \\ref EulerAxis)\n    *\n    * ### Types of Euler systems ###\n    *\n    * All and only valid 3 dimension Euler rotation over standard\n    *  signed axes{+X,+Y,+Z,-X,-Y,-Z} are supported:\n    *  - all axes X, Y, Z in each valid order (see below what order is valid)\n    *  - rotation over the axis is supported both over the positive and negative directions.\n    *  - both Tait-Bryan and proper/classic Euler angles (i.e. the opposite).\n    *\n    * Since EulerSystem support both positive and negative directions,\n    *  you may call this rotation distinction in other names:\n    *  - _right handed_ or _left handed_\n    *  - _counterclockwise_ or _clockwise_\n    *\n    * Notice all axed combination are valid, and would trigger a static assertion.\n    * Same unsigned axes can't be neighbors, e.g. {X,X,Y} is invalid.\n    * This yield two and only two classes:\n    *  - _Tait-Bryan_ - all unsigned axes are distinct, e.g. {X,Y,Z}\n    *  - _proper/classic Euler angles_ - The first and the third unsigned axes is equal,\n    *     and the second is different, e.g. {X,Y,X}\n    *\n    * ### Intrinsic vs extrinsic Euler systems ###\n    *\n    * Only intrinsic Euler systems are supported for simplicity.\n    *  If you want to use extrinsic Euler systems,\n    *   just use the equal intrinsic opposite order for axes and angles.\n    *  I.e axes (A,B,C) becomes (C,B,A), and angles (a,b,c) becomes (c,b,a).\n    *\n    * ### Convenient user typedefs ###\n    *\n    * Convenient typedefs for EulerSystem exist (only for positive axes Euler systems),\n    *  in a form of EulerSystem{A}{B}{C}, e.g. \\ref EulerSystemXYZ.\n    *\n    * ### Additional reading ###\n    *\n    * More information about Euler angles: https://en.wikipedia.org/wiki/Euler_angles\n    *\n    * \\tparam _AlphaAxis the first fixed EulerAxis\n    *\n    * \\tparam _BetaAxis the second fixed EulerAxis\n    *\n    * \\tparam _GammaAxis the third fixed EulerAxis\n    */\n  template <int _AlphaAxis, int _BetaAxis, int _GammaAxis>\n  class EulerSystem\n  {\n    public:\n    // It's defined this way and not as enum, because I think\n    //  that enum is not guerantee to support negative numbers\n    \n    /** The first rotation axis */\n    static const int AlphaAxis = _AlphaAxis;\n    \n    /** The second rotation axis */\n    static const int BetaAxis = _BetaAxis;\n    \n    /** The third rotation axis */\n    static const int GammaAxis = _GammaAxis;\n\n    enum\n    {\n      AlphaAxisAbs = internal::Abs<AlphaAxis>::value, /*!< the first rotation axis unsigned */\n      BetaAxisAbs = internal::Abs<BetaAxis>::value, /*!< the second rotation axis unsigned */\n      GammaAxisAbs = internal::Abs<GammaAxis>::value, /*!< the third rotation axis unsigned */\n      \n      IsAlphaOpposite = (AlphaAxis < 0) ? 1 : 0, /*!< whether alpha axis is negative */\n      IsBetaOpposite = (BetaAxis < 0) ? 1 : 0, /*!< whether beta axis is negative */\n      IsGammaOpposite = (GammaAxis < 0) ? 1 : 0, /*!< whether gamma axis is negative */\n\n      // Parity is even if alpha axis X is followed by beta axis Y, or Y is followed\n      // by Z, or Z is followed by X; otherwise it is odd.\n      IsOdd = ((AlphaAxisAbs)%3 == (BetaAxisAbs - 1)%3) ? 0 : 1, /*!< whether the Euler system is odd */\n      IsEven = IsOdd ? 0 : 1, /*!< whether the Euler system is even */\n\n      IsTaitBryan = ((unsigned)AlphaAxisAbs != (unsigned)GammaAxisAbs) ? 1 : 0 /*!< whether the Euler system is Tait-Bryan */\n    };\n    \n    private:\n    \n    EIGEN_EULER_ANGLES_CLASS_STATIC_ASSERT(internal::IsValidAxis<AlphaAxis>::value,\n      ALPHA_AXIS_IS_INVALID);\n      \n    EIGEN_EULER_ANGLES_CLASS_STATIC_ASSERT(internal::IsValidAxis<BetaAxis>::value,\n      BETA_AXIS_IS_INVALID);\n      \n    EIGEN_EULER_ANGLES_CLASS_STATIC_ASSERT(internal::IsValidAxis<GammaAxis>::value,\n      GAMMA_AXIS_IS_INVALID);\n      \n    EIGEN_EULER_ANGLES_CLASS_STATIC_ASSERT((unsigned)AlphaAxisAbs != (unsigned)BetaAxisAbs,\n      ALPHA_AXIS_CANT_BE_EQUAL_TO_BETA_AXIS);\n      \n    EIGEN_EULER_ANGLES_CLASS_STATIC_ASSERT((unsigned)BetaAxisAbs != (unsigned)GammaAxisAbs,\n      BETA_AXIS_CANT_BE_EQUAL_TO_GAMMA_AXIS);\n\n    static const int\n      // I, J, K are the pivot indexes permutation for the rotation matrix, that match this Euler system. \n      // They are used in this class converters.\n      // They are always different from each other, and their possible values are: 0, 1, or 2.\n      I_ = AlphaAxisAbs - 1,\n      J_ = (AlphaAxisAbs - 1 + 1 + IsOdd)%3,\n      K_ = (AlphaAxisAbs - 1 + 2 - IsOdd)%3\n    ;\n    \n    // TODO: Get @mat parameter in form that avoids double evaluation.\n    template <typename Derived>\n    static void CalcEulerAngles_imp(Matrix<typename MatrixBase<Derived>::Scalar, 3, 1>& res, const MatrixBase<Derived>& mat, internal::true_type /*isTaitBryan*/)\n    {\n      using std::atan2;\n      using std::sqrt;\n      \n      typedef typename Derived::Scalar Scalar;\n\n      const Scalar plusMinus = IsEven? 1 : -1;\n      const Scalar minusPlus = IsOdd?  1 : -1;\n\n      const Scalar Rsum = sqrt((mat(I_,I_) * mat(I_,I_) + mat(I_,J_) * mat(I_,J_) + mat(J_,K_) * mat(J_,K_) + mat(K_,K_) * mat(K_,K_))/2);\n      res[1] = atan2(plusMinus * mat(I_,K_), Rsum);\n\n      // There is a singularity when cos(beta) == 0\n      if(Rsum > 4 * NumTraits<Scalar>::epsilon()) {// cos(beta) != 0\n        res[0] = atan2(minusPlus * mat(J_, K_), mat(K_, K_));\n        res[2] = atan2(minusPlus * mat(I_, J_), mat(I_, I_));\n      }\n      else if(plusMinus * mat(I_, K_) > 0) {// cos(beta) == 0 and sin(beta) == 1\n        Scalar spos = mat(J_, I_) + plusMinus * mat(K_, J_); // 2*sin(alpha + plusMinus * gamma\n        Scalar cpos = mat(J_, J_) + minusPlus * mat(K_, I_); // 2*cos(alpha + plusMinus * gamma)\n        Scalar alphaPlusMinusGamma = atan2(spos, cpos);\n        res[0] = alphaPlusMinusGamma;\n        res[2] = 0;\n      }\n      else {// cos(beta) == 0 and sin(beta) == -1\n        Scalar sneg = plusMinus * (mat(K_, J_) + minusPlus * mat(J_, I_)); // 2*sin(alpha + minusPlus*gamma)\n        Scalar cneg = mat(J_, J_) + plusMinus * mat(K_, I_);               // 2*cos(alpha + minusPlus*gamma)\n        Scalar alphaMinusPlusBeta = atan2(sneg, cneg);\n        res[0] = alphaMinusPlusBeta;\n        res[2] = 0;\n      }\n    }\n\n    template <typename Derived>\n    static void CalcEulerAngles_imp(Matrix<typename MatrixBase<Derived>::Scalar,3,1>& res,\n                                    const MatrixBase<Derived>& mat, internal::false_type /*isTaitBryan*/)\n    {\n      using std::atan2;\n      using std::sqrt;\n\n      typedef typename Derived::Scalar Scalar;\n\n      const Scalar plusMinus = IsEven? 1 : -1;\n      const Scalar minusPlus = IsOdd?  1 : -1;\n\n      const Scalar Rsum = sqrt((mat(I_, J_) * mat(I_, J_) + mat(I_, K_) * mat(I_, K_) + mat(J_, I_) * mat(J_, I_) + mat(K_, I_) * mat(K_, I_)) / 2);\n\n      res[1] = atan2(Rsum, mat(I_, I_));\n\n      // There is a singularity when sin(beta) == 0\n      if(Rsum > 4 * NumTraits<Scalar>::epsilon()) {// sin(beta) != 0\n        res[0] = atan2(mat(J_, I_), minusPlus * mat(K_, I_));\n        res[2] = atan2(mat(I_, J_), plusMinus * mat(I_, K_));\n      }\n      else if(mat(I_, I_) > 0) {// sin(beta) == 0 and cos(beta) == 1\n        Scalar spos = plusMinus * mat(K_, J_) + minusPlus * mat(J_, K_); // 2*sin(alpha + gamma)\n        Scalar cpos = mat(J_, J_) + mat(K_, K_);                         // 2*cos(alpha + gamma)\n        res[0] = atan2(spos, cpos);\n        res[2] = 0;\n      }\n      else {// sin(beta) == 0 and cos(beta) == -1\n        Scalar sneg = plusMinus * mat(K_, J_) + plusMinus * mat(J_, K_); // 2*sin(alpha - gamma)\n        Scalar cneg = mat(J_, J_) - mat(K_, K_);                         // 2*cos(alpha - gamma)\n        res[0] = atan2(sneg, cneg);\n        res[2] = 0;\n      }\n    }\n    \n    template<typename Scalar>\n    static void CalcEulerAngles(\n      EulerAngles<Scalar, EulerSystem>& res,\n      const typename EulerAngles<Scalar, EulerSystem>::Matrix3& mat)\n    {\n      CalcEulerAngles_imp(\n        res.angles(), mat,\n        typename internal::conditional<IsTaitBryan, internal::true_type, internal::false_type>::type());\n\n      if (IsAlphaOpposite)\n        res.alpha() = -res.alpha();\n        \n      if (IsBetaOpposite)\n        res.beta() = -res.beta();\n        \n      if (IsGammaOpposite)\n        res.gamma() = -res.gamma();\n    }\n    \n    template <typename _Scalar, class _System>\n    friend class Eigen::EulerAngles;\n    \n    template<typename System,\n            typename Other,\n            int OtherRows,\n            int OtherCols>\n    friend struct internal::eulerangles_assign_impl;\n  };\n\n#define EIGEN_EULER_SYSTEM_TYPEDEF(A, B, C) \\\n  /** \\ingroup EulerAngles_Module */ \\\n  typedef EulerSystem<EULER_##A, EULER_##B, EULER_##C> EulerSystem##A##B##C;\n  \n  EIGEN_EULER_SYSTEM_TYPEDEF(X,Y,Z)\n  EIGEN_EULER_SYSTEM_TYPEDEF(X,Y,X)\n  EIGEN_EULER_SYSTEM_TYPEDEF(X,Z,Y)\n  EIGEN_EULER_SYSTEM_TYPEDEF(X,Z,X)\n  \n  EIGEN_EULER_SYSTEM_TYPEDEF(Y,Z,X)\n  EIGEN_EULER_SYSTEM_TYPEDEF(Y,Z,Y)\n  EIGEN_EULER_SYSTEM_TYPEDEF(Y,X,Z)\n  EIGEN_EULER_SYSTEM_TYPEDEF(Y,X,Y)\n  \n  EIGEN_EULER_SYSTEM_TYPEDEF(Z,X,Y)\n  EIGEN_EULER_SYSTEM_TYPEDEF(Z,X,Z)\n  EIGEN_EULER_SYSTEM_TYPEDEF(Z,Y,X)\n  EIGEN_EULER_SYSTEM_TYPEDEF(Z,Y,Z)\n}\n\n#endif // EIGEN_EULERSYSTEM_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/FFT/ei_fftw_impl.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra. \n//\n// Copyright (C) 2009 Mark Borgerding mark a borgerding net\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\nnamespace Eigen { \n\nnamespace internal {\n\n  // FFTW uses non-const arguments\n  // so we must use ugly const_cast calls for all the args it uses\n  //\n  // This should be safe as long as \n  // 1. we use FFTW_ESTIMATE for all our planning\n  //       see the FFTW docs section 4.3.2 \"Planner Flags\"\n  // 2. fftw_complex is compatible with std::complex\n  //    This assumes std::complex<T> layout is array of size 2 with real,imag\n  template <typename T> \n  inline \n  T * fftw_cast(const T* p)\n  { \n      return const_cast<T*>( p); \n  }\n\n  inline \n  fftw_complex * fftw_cast( const std::complex<double> * p)\n  {\n      return const_cast<fftw_complex*>( reinterpret_cast<const fftw_complex*>(p) ); \n  }\n\n  inline \n  fftwf_complex * fftw_cast( const std::complex<float> * p)\n  { \n      return const_cast<fftwf_complex*>( reinterpret_cast<const fftwf_complex*>(p) ); \n  }\n\n  inline \n  fftwl_complex * fftw_cast( const std::complex<long double> * p)\n  { \n      return const_cast<fftwl_complex*>( reinterpret_cast<const fftwl_complex*>(p) ); \n  }\n\n  template <typename T> \n  struct fftw_plan {};\n\n  template <> \n  struct fftw_plan<float>\n  {\n      typedef float scalar_type;\n      typedef fftwf_complex complex_type;\n      fftwf_plan m_plan;\n      fftw_plan() :m_plan(NULL) {}\n      ~fftw_plan() {if (m_plan) fftwf_destroy_plan(m_plan);}\n\n      inline\n      void fwd(complex_type * dst,complex_type * src,int nfft) {\n          if (m_plan==NULL) m_plan = fftwf_plan_dft_1d(nfft,src,dst, FFTW_FORWARD, FFTW_ESTIMATE|FFTW_PRESERVE_INPUT);\n          fftwf_execute_dft( m_plan, src,dst);\n      }\n      inline\n      void inv(complex_type * dst,complex_type * src,int nfft) {\n          if (m_plan==NULL) m_plan = fftwf_plan_dft_1d(nfft,src,dst, FFTW_BACKWARD , FFTW_ESTIMATE|FFTW_PRESERVE_INPUT);\n          fftwf_execute_dft( m_plan, src,dst);\n      }\n      inline\n      void fwd(complex_type * dst,scalar_type * src,int nfft) {\n          if (m_plan==NULL) m_plan = fftwf_plan_dft_r2c_1d(nfft,src,dst,FFTW_ESTIMATE|FFTW_PRESERVE_INPUT);\n          fftwf_execute_dft_r2c( m_plan,src,dst);\n      }\n      inline\n      void inv(scalar_type * dst,complex_type * src,int nfft) {\n          if (m_plan==NULL)\n              m_plan = fftwf_plan_dft_c2r_1d(nfft,src,dst,FFTW_ESTIMATE|FFTW_PRESERVE_INPUT);\n          fftwf_execute_dft_c2r( m_plan, src,dst);\n      }\n\n      inline \n      void fwd2( complex_type * dst,complex_type * src,int n0,int n1) {\n          if (m_plan==NULL) m_plan = fftwf_plan_dft_2d(n0,n1,src,dst,FFTW_FORWARD,FFTW_ESTIMATE|FFTW_PRESERVE_INPUT);\n          fftwf_execute_dft( m_plan, src,dst);\n      }\n      inline \n      void inv2( complex_type * dst,complex_type * src,int n0,int n1) {\n          if (m_plan==NULL) m_plan = fftwf_plan_dft_2d(n0,n1,src,dst,FFTW_BACKWARD,FFTW_ESTIMATE|FFTW_PRESERVE_INPUT);\n          fftwf_execute_dft( m_plan, src,dst);\n      }\n\n  };\n  template <> \n  struct fftw_plan<double>\n  {\n      typedef double scalar_type;\n      typedef fftw_complex complex_type;\n      ::fftw_plan m_plan;\n      fftw_plan() :m_plan(NULL) {}\n      ~fftw_plan() {if (m_plan) fftw_destroy_plan(m_plan);}\n\n      inline\n      void fwd(complex_type * dst,complex_type * src,int nfft) {\n          if (m_plan==NULL) m_plan = fftw_plan_dft_1d(nfft,src,dst, FFTW_FORWARD, FFTW_ESTIMATE|FFTW_PRESERVE_INPUT);\n          fftw_execute_dft( m_plan, src,dst);\n      }\n      inline\n      void inv(complex_type * dst,complex_type * src,int nfft) {\n          if (m_plan==NULL) m_plan = fftw_plan_dft_1d(nfft,src,dst, FFTW_BACKWARD , FFTW_ESTIMATE|FFTW_PRESERVE_INPUT);\n          fftw_execute_dft( m_plan, src,dst);\n      }\n      inline\n      void fwd(complex_type * dst,scalar_type * src,int nfft) {\n          if (m_plan==NULL) m_plan = fftw_plan_dft_r2c_1d(nfft,src,dst,FFTW_ESTIMATE|FFTW_PRESERVE_INPUT);\n          fftw_execute_dft_r2c( m_plan,src,dst);\n      }\n      inline\n      void inv(scalar_type * dst,complex_type * src,int nfft) {\n          if (m_plan==NULL)\n              m_plan = fftw_plan_dft_c2r_1d(nfft,src,dst,FFTW_ESTIMATE|FFTW_PRESERVE_INPUT);\n          fftw_execute_dft_c2r( m_plan, src,dst);\n      }\n      inline \n      void fwd2( complex_type * dst,complex_type * src,int n0,int n1) {\n          if (m_plan==NULL) m_plan = fftw_plan_dft_2d(n0,n1,src,dst,FFTW_FORWARD,FFTW_ESTIMATE|FFTW_PRESERVE_INPUT);\n          fftw_execute_dft( m_plan, src,dst);\n      }\n      inline \n      void inv2( complex_type * dst,complex_type * src,int n0,int n1) {\n          if (m_plan==NULL) m_plan = fftw_plan_dft_2d(n0,n1,src,dst,FFTW_BACKWARD,FFTW_ESTIMATE|FFTW_PRESERVE_INPUT);\n          fftw_execute_dft( m_plan, src,dst);\n      }\n  };\n  template <> \n  struct fftw_plan<long double>\n  {\n      typedef long double scalar_type;\n      typedef fftwl_complex complex_type;\n      fftwl_plan m_plan;\n      fftw_plan() :m_plan(NULL) {}\n      ~fftw_plan() {if (m_plan) fftwl_destroy_plan(m_plan);}\n\n      inline\n      void fwd(complex_type * dst,complex_type * src,int nfft) {\n          if (m_plan==NULL) m_plan = fftwl_plan_dft_1d(nfft,src,dst, FFTW_FORWARD, FFTW_ESTIMATE|FFTW_PRESERVE_INPUT);\n          fftwl_execute_dft( m_plan, src,dst);\n      }\n      inline\n      void inv(complex_type * dst,complex_type * src,int nfft) {\n          if (m_plan==NULL) m_plan = fftwl_plan_dft_1d(nfft,src,dst, FFTW_BACKWARD , FFTW_ESTIMATE|FFTW_PRESERVE_INPUT);\n          fftwl_execute_dft( m_plan, src,dst);\n      }\n      inline\n      void fwd(complex_type * dst,scalar_type * src,int nfft) {\n          if (m_plan==NULL) m_plan = fftwl_plan_dft_r2c_1d(nfft,src,dst,FFTW_ESTIMATE|FFTW_PRESERVE_INPUT);\n          fftwl_execute_dft_r2c( m_plan,src,dst);\n      }\n      inline\n      void inv(scalar_type * dst,complex_type * src,int nfft) {\n          if (m_plan==NULL)\n              m_plan = fftwl_plan_dft_c2r_1d(nfft,src,dst,FFTW_ESTIMATE|FFTW_PRESERVE_INPUT);\n          fftwl_execute_dft_c2r( m_plan, src,dst);\n      }\n      inline \n      void fwd2( complex_type * dst,complex_type * src,int n0,int n1) {\n          if (m_plan==NULL) m_plan = fftwl_plan_dft_2d(n0,n1,src,dst,FFTW_FORWARD,FFTW_ESTIMATE|FFTW_PRESERVE_INPUT);\n          fftwl_execute_dft( m_plan, src,dst);\n      }\n      inline \n      void inv2( complex_type * dst,complex_type * src,int n0,int n1) {\n          if (m_plan==NULL) m_plan = fftwl_plan_dft_2d(n0,n1,src,dst,FFTW_BACKWARD,FFTW_ESTIMATE|FFTW_PRESERVE_INPUT);\n          fftwl_execute_dft( m_plan, src,dst);\n      }\n  };\n\n  template <typename _Scalar>\n  struct fftw_impl\n  {\n      typedef _Scalar Scalar;\n      typedef std::complex<Scalar> Complex;\n\n      inline\n      void clear() \n      {\n        m_plans.clear();\n      }\n\n      // complex-to-complex forward FFT\n      inline\n      void fwd( Complex * dst,const Complex *src,int nfft)\n      {\n        get_plan(nfft,false,dst,src).fwd(fftw_cast(dst), fftw_cast(src),nfft );\n      }\n\n      // real-to-complex forward FFT\n      inline\n      void fwd( Complex * dst,const Scalar * src,int nfft) \n      {\n          get_plan(nfft,false,dst,src).fwd(fftw_cast(dst), fftw_cast(src) ,nfft);\n      }\n\n      // 2-d complex-to-complex\n      inline\n      void fwd2(Complex * dst, const Complex * src, int n0,int n1)\n      {\n          get_plan(n0,n1,false,dst,src).fwd2(fftw_cast(dst), fftw_cast(src) ,n0,n1);\n      }\n\n      // inverse complex-to-complex\n      inline\n      void inv(Complex * dst,const Complex  *src,int nfft)\n      {\n        get_plan(nfft,true,dst,src).inv(fftw_cast(dst), fftw_cast(src),nfft );\n      }\n\n      // half-complex to scalar\n      inline\n      void inv( Scalar * dst,const Complex * src,int nfft) \n      {\n        get_plan(nfft,true,dst,src).inv(fftw_cast(dst), fftw_cast(src),nfft );\n      }\n\n      // 2-d complex-to-complex\n      inline\n      void inv2(Complex * dst, const Complex * src, int n0,int n1)\n      {\n        get_plan(n0,n1,true,dst,src).inv2(fftw_cast(dst), fftw_cast(src) ,n0,n1);\n      }\n\n\n  protected:\n      typedef fftw_plan<Scalar> PlanData;\n\n      typedef Eigen::numext::int64_t int64_t;\n\n      typedef std::map<int64_t,PlanData> PlanMap;\n\n      PlanMap m_plans;\n\n      inline\n      PlanData & get_plan(int nfft,bool inverse,void * dst,const void * src)\n      {\n          bool inplace = (dst==src);\n          bool aligned = ( (reinterpret_cast<size_t>(src)&15) | (reinterpret_cast<size_t>(dst)&15) ) == 0;\n          int64_t key = ( (nfft<<3 ) | (inverse<<2) | (inplace<<1) | aligned ) << 1;\n          return m_plans[key];\n      }\n\n      inline\n      PlanData & get_plan(int n0,int n1,bool inverse,void * dst,const void * src)\n      {\n          bool inplace = (dst==src);\n          bool aligned = ( (reinterpret_cast<size_t>(src)&15) | (reinterpret_cast<size_t>(dst)&15) ) == 0;\n          int64_t key = ( ( (((int64_t)n0) << 30)|(n1<<3 ) | (inverse<<2) | (inplace<<1) | aligned ) << 1 ) + 1;\n          return m_plans[key];\n      }\n  };\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n/* vim: set filetype=cpp et sw=2 ts=2 ai: */\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/FFT/ei_kissfft_impl.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Mark Borgerding mark a borgerding net\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\nnamespace Eigen { \n\nnamespace internal {\n\n  // This FFT implementation was derived from kissfft http:sourceforge.net/projects/kissfft\n  // Copyright 2003-2009 Mark Borgerding\n\ntemplate <typename _Scalar>\nstruct kiss_cpx_fft\n{\n  typedef _Scalar Scalar;\n  typedef std::complex<Scalar> Complex;\n  std::vector<Complex> m_twiddles;\n  std::vector<int> m_stageRadix;\n  std::vector<int> m_stageRemainder;\n  std::vector<Complex> m_scratchBuf;\n  bool m_inverse;\n\n  inline\n    void make_twiddles(int nfft,bool inverse)\n    {\n      using std::acos;\n      m_inverse = inverse;\n      m_twiddles.resize(nfft);\n      Scalar phinc =  (inverse?2:-2)* acos( (Scalar) -1)  / nfft;\n      for (int i=0;i<nfft;++i)\n        m_twiddles[i] = exp( Complex(0,i*phinc) );\n    }\n\n  void factorize(int nfft)\n  {\n    //start factoring out 4's, then 2's, then 3,5,7,9,...\n    int n= nfft;\n    int p=4;\n    do {\n      while (n % p) {\n        switch (p) {\n          case 4: p = 2; break;\n          case 2: p = 3; break;\n          default: p += 2; break;\n        }\n        if (p*p>n)\n          p=n;// impossible to have a factor > sqrt(n)\n      }\n      n /= p;\n      m_stageRadix.push_back(p);\n      m_stageRemainder.push_back(n);\n      if ( p > 5 )\n        m_scratchBuf.resize(p); // scratchbuf will be needed in bfly_generic\n    }while(n>1);\n  }\n\n  template <typename _Src>\n    inline\n    void work( int stage,Complex * xout, const _Src * xin, size_t fstride,size_t in_stride)\n    {\n      int p = m_stageRadix[stage];\n      int m = m_stageRemainder[stage];\n      Complex * Fout_beg = xout;\n      Complex * Fout_end = xout + p*m;\n\n      if (m>1) {\n        do{\n          // recursive call:\n          // DFT of size m*p performed by doing\n          // p instances of smaller DFTs of size m, \n          // each one takes a decimated version of the input\n          work(stage+1, xout , xin, fstride*p,in_stride);\n          xin += fstride*in_stride;\n        }while( (xout += m) != Fout_end );\n      }else{\n        do{\n          *xout = *xin;\n          xin += fstride*in_stride;\n        }while(++xout != Fout_end );\n      }\n      xout=Fout_beg;\n\n      // recombine the p smaller DFTs \n      switch (p) {\n        case 2: bfly2(xout,fstride,m); break;\n        case 3: bfly3(xout,fstride,m); break;\n        case 4: bfly4(xout,fstride,m); break;\n        case 5: bfly5(xout,fstride,m); break;\n        default: bfly_generic(xout,fstride,m,p); break;\n      }\n    }\n\n  inline\n    void bfly2( Complex * Fout, const size_t fstride, int m)\n    {\n      for (int k=0;k<m;++k) {\n        Complex t = Fout[m+k] * m_twiddles[k*fstride];\n        Fout[m+k] = Fout[k] - t;\n        Fout[k] += t;\n      }\n    }\n\n  inline\n    void bfly4( Complex * Fout, const size_t fstride, const size_t m)\n    {\n      Complex scratch[6];\n      int negative_if_inverse = m_inverse * -2 +1;\n      for (size_t k=0;k<m;++k) {\n        scratch[0] = Fout[k+m] * m_twiddles[k*fstride];\n        scratch[1] = Fout[k+2*m] * m_twiddles[k*fstride*2];\n        scratch[2] = Fout[k+3*m] * m_twiddles[k*fstride*3];\n        scratch[5] = Fout[k] - scratch[1];\n\n        Fout[k] += scratch[1];\n        scratch[3] = scratch[0] + scratch[2];\n        scratch[4] = scratch[0] - scratch[2];\n        scratch[4] = Complex( scratch[4].imag()*negative_if_inverse , -scratch[4].real()* negative_if_inverse );\n\n        Fout[k+2*m]  = Fout[k] - scratch[3];\n        Fout[k] += scratch[3];\n        Fout[k+m] = scratch[5] + scratch[4];\n        Fout[k+3*m] = scratch[5] - scratch[4];\n      }\n    }\n\n  inline\n    void bfly3( Complex * Fout, const size_t fstride, const size_t m)\n    {\n      size_t k=m;\n      const size_t m2 = 2*m;\n      Complex *tw1,*tw2;\n      Complex scratch[5];\n      Complex epi3;\n      epi3 = m_twiddles[fstride*m];\n\n      tw1=tw2=&m_twiddles[0];\n\n      do{\n        scratch[1]=Fout[m] * *tw1;\n        scratch[2]=Fout[m2] * *tw2;\n\n        scratch[3]=scratch[1]+scratch[2];\n        scratch[0]=scratch[1]-scratch[2];\n        tw1 += fstride;\n        tw2 += fstride*2;\n        Fout[m] = Complex( Fout->real() - Scalar(.5)*scratch[3].real() , Fout->imag() - Scalar(.5)*scratch[3].imag() );\n        scratch[0] *= epi3.imag();\n        *Fout += scratch[3];\n        Fout[m2] = Complex(  Fout[m].real() + scratch[0].imag() , Fout[m].imag() - scratch[0].real() );\n        Fout[m] += Complex( -scratch[0].imag(),scratch[0].real() );\n        ++Fout;\n      }while(--k);\n    }\n\n  inline\n    void bfly5( Complex * Fout, const size_t fstride, const size_t m)\n    {\n      Complex *Fout0,*Fout1,*Fout2,*Fout3,*Fout4;\n      size_t u;\n      Complex scratch[13];\n      Complex * twiddles = &m_twiddles[0];\n      Complex *tw;\n      Complex ya,yb;\n      ya = twiddles[fstride*m];\n      yb = twiddles[fstride*2*m];\n\n      Fout0=Fout;\n      Fout1=Fout0+m;\n      Fout2=Fout0+2*m;\n      Fout3=Fout0+3*m;\n      Fout4=Fout0+4*m;\n\n      tw=twiddles;\n      for ( u=0; u<m; ++u ) {\n        scratch[0] = *Fout0;\n\n        scratch[1]  = *Fout1 * tw[u*fstride];\n        scratch[2]  = *Fout2 * tw[2*u*fstride];\n        scratch[3]  = *Fout3 * tw[3*u*fstride];\n        scratch[4]  = *Fout4 * tw[4*u*fstride];\n\n        scratch[7] = scratch[1] + scratch[4];\n        scratch[10] = scratch[1] - scratch[4];\n        scratch[8] = scratch[2] + scratch[3];\n        scratch[9] = scratch[2] - scratch[3];\n\n        *Fout0 +=  scratch[7];\n        *Fout0 +=  scratch[8];\n\n        scratch[5] = scratch[0] + Complex(\n            (scratch[7].real()*ya.real() ) + (scratch[8].real() *yb.real() ),\n            (scratch[7].imag()*ya.real()) + (scratch[8].imag()*yb.real())\n            );\n\n        scratch[6] = Complex(\n            (scratch[10].imag()*ya.imag()) + (scratch[9].imag()*yb.imag()),\n            -(scratch[10].real()*ya.imag()) - (scratch[9].real()*yb.imag())\n            );\n\n        *Fout1 = scratch[5] - scratch[6];\n        *Fout4 = scratch[5] + scratch[6];\n\n        scratch[11] = scratch[0] +\n          Complex(\n              (scratch[7].real()*yb.real()) + (scratch[8].real()*ya.real()),\n              (scratch[7].imag()*yb.real()) + (scratch[8].imag()*ya.real())\n              );\n\n        scratch[12] = Complex(\n            -(scratch[10].imag()*yb.imag()) + (scratch[9].imag()*ya.imag()),\n            (scratch[10].real()*yb.imag()) - (scratch[9].real()*ya.imag())\n            );\n\n        *Fout2=scratch[11]+scratch[12];\n        *Fout3=scratch[11]-scratch[12];\n\n        ++Fout0;++Fout1;++Fout2;++Fout3;++Fout4;\n      }\n    }\n\n  /* perform the butterfly for one stage of a mixed radix FFT */\n  inline\n    void bfly_generic(\n        Complex * Fout,\n        const size_t fstride,\n        int m,\n        int p\n        )\n    {\n      int u,k,q1,q;\n      Complex * twiddles = &m_twiddles[0];\n      Complex t;\n      int Norig = static_cast<int>(m_twiddles.size());\n      Complex * scratchbuf = &m_scratchBuf[0];\n\n      for ( u=0; u<m; ++u ) {\n        k=u;\n        for ( q1=0 ; q1<p ; ++q1 ) {\n          scratchbuf[q1] = Fout[ k  ];\n          k += m;\n        }\n\n        k=u;\n        for ( q1=0 ; q1<p ; ++q1 ) {\n          int twidx=0;\n          Fout[ k ] = scratchbuf[0];\n          for (q=1;q<p;++q ) {\n            twidx += static_cast<int>(fstride) * k;\n            if (twidx>=Norig) twidx-=Norig;\n            t=scratchbuf[q] * twiddles[twidx];\n            Fout[ k ] += t;\n          }\n          k += m;\n        }\n      }\n    }\n};\n\ntemplate <typename _Scalar>\nstruct kissfft_impl\n{\n  typedef _Scalar Scalar;\n  typedef std::complex<Scalar> Complex;\n\n  void clear() \n  {\n    m_plans.clear();\n    m_realTwiddles.clear();\n  }\n\n  inline\n    void fwd( Complex * dst,const Complex *src,int nfft)\n    {\n      get_plan(nfft,false).work(0, dst, src, 1,1);\n    }\n\n  inline\n    void fwd2( Complex * dst,const Complex *src,int n0,int n1)\n    {\n        EIGEN_UNUSED_VARIABLE(dst);\n        EIGEN_UNUSED_VARIABLE(src);\n        EIGEN_UNUSED_VARIABLE(n0);\n        EIGEN_UNUSED_VARIABLE(n1);\n    }\n\n  inline\n    void inv2( Complex * dst,const Complex *src,int n0,int n1)\n    {\n        EIGEN_UNUSED_VARIABLE(dst);\n        EIGEN_UNUSED_VARIABLE(src);\n        EIGEN_UNUSED_VARIABLE(n0);\n        EIGEN_UNUSED_VARIABLE(n1);\n    }\n\n  // real-to-complex forward FFT\n  // perform two FFTs of src even and src odd\n  // then twiddle to recombine them into the half-spectrum format\n  // then fill in the conjugate symmetric half\n  inline\n    void fwd( Complex * dst,const Scalar * src,int nfft) \n    {\n      if ( nfft&3  ) {\n        // use generic mode for odd\n        m_tmpBuf1.resize(nfft);\n        get_plan(nfft,false).work(0, &m_tmpBuf1[0], src, 1,1);\n        std::copy(m_tmpBuf1.begin(),m_tmpBuf1.begin()+(nfft>>1)+1,dst );\n      }else{\n        int ncfft = nfft>>1;\n        int ncfft2 = nfft>>2;\n        Complex * rtw = real_twiddles(ncfft2);\n\n        // use optimized mode for even real\n        fwd( dst, reinterpret_cast<const Complex*> (src), ncfft);\n        Complex dc(dst[0].real() +  dst[0].imag());\n        Complex nyquist(dst[0].real() -  dst[0].imag());\n        int k;\n        for ( k=1;k <= ncfft2 ; ++k ) {\n          Complex fpk = dst[k];\n          Complex fpnk = conj(dst[ncfft-k]);\n          Complex f1k = fpk + fpnk;\n          Complex f2k = fpk - fpnk;\n          Complex tw= f2k * rtw[k-1];\n          dst[k] =  (f1k + tw) * Scalar(.5);\n          dst[ncfft-k] =  conj(f1k -tw)*Scalar(.5);\n        }\n        dst[0] = dc;\n        dst[ncfft] = nyquist;\n      }\n    }\n\n  // inverse complex-to-complex\n  inline\n    void inv(Complex * dst,const Complex  *src,int nfft)\n    {\n      get_plan(nfft,true).work(0, dst, src, 1,1);\n    }\n\n  // half-complex to scalar\n  inline\n    void inv( Scalar * dst,const Complex * src,int nfft) \n    {\n      if (nfft&3) {\n        m_tmpBuf1.resize(nfft);\n        m_tmpBuf2.resize(nfft);\n        std::copy(src,src+(nfft>>1)+1,m_tmpBuf1.begin() );\n        for (int k=1;k<(nfft>>1)+1;++k)\n          m_tmpBuf1[nfft-k] = conj(m_tmpBuf1[k]);\n        inv(&m_tmpBuf2[0],&m_tmpBuf1[0],nfft);\n        for (int k=0;k<nfft;++k)\n          dst[k] = m_tmpBuf2[k].real();\n      }else{\n        // optimized version for multiple of 4\n        int ncfft = nfft>>1;\n        int ncfft2 = nfft>>2;\n        Complex * rtw = real_twiddles(ncfft2);\n        m_tmpBuf1.resize(ncfft);\n        m_tmpBuf1[0] = Complex( src[0].real() + src[ncfft].real(), src[0].real() - src[ncfft].real() );\n        for (int k = 1; k <= ncfft / 2; ++k) {\n          Complex fk = src[k];\n          Complex fnkc = conj(src[ncfft-k]);\n          Complex fek = fk + fnkc;\n          Complex tmp = fk - fnkc;\n          Complex fok = tmp * conj(rtw[k-1]);\n          m_tmpBuf1[k] = fek + fok;\n          m_tmpBuf1[ncfft-k] = conj(fek - fok);\n        }\n        get_plan(ncfft,true).work(0, reinterpret_cast<Complex*>(dst), &m_tmpBuf1[0], 1,1);\n      }\n    }\n\n  protected:\n  typedef kiss_cpx_fft<Scalar> PlanData;\n  typedef std::map<int,PlanData> PlanMap;\n\n  PlanMap m_plans;\n  std::map<int, std::vector<Complex> > m_realTwiddles;\n  std::vector<Complex> m_tmpBuf1;\n  std::vector<Complex> m_tmpBuf2;\n\n  inline\n    int PlanKey(int nfft, bool isinverse) const { return (nfft<<1) | int(isinverse); }\n\n  inline\n    PlanData & get_plan(int nfft, bool inverse)\n    {\n      // TODO look for PlanKey(nfft, ! inverse) and conjugate the twiddles\n      PlanData & pd = m_plans[ PlanKey(nfft,inverse) ];\n      if ( pd.m_twiddles.size() == 0 ) {\n        pd.make_twiddles(nfft,inverse);\n        pd.factorize(nfft);\n      }\n      return pd;\n    }\n\n  inline\n    Complex * real_twiddles(int ncfft2)\n    {\n      using std::acos;\n      std::vector<Complex> & twidref = m_realTwiddles[ncfft2];// creates new if not there\n      if ( (int)twidref.size() != ncfft2 ) {\n        twidref.resize(ncfft2);\n        int ncfft= ncfft2<<1;\n        Scalar pi =  acos( Scalar(-1) );\n        for (int k=1;k<=ncfft2;++k) \n          twidref[k-1] = exp( Complex(0,-pi * (Scalar(k) / ncfft + Scalar(.5)) ) );\n      }\n      return &twidref[0];\n    }\n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n/* vim: set filetype=cpp et sw=2 ts=2 ai: */\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/IterativeSolvers/ConstrainedConjGrad.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n\n/* NOTE The functions of this file have been adapted from the GMM++ library */\n\n//========================================================================\n//\n// Copyright (C) 2002-2007 Yves Renard\n//\n// This file is a part of GETFEM++\n//\n// Getfem++ is free software; you can redistribute it and/or modify\n// it under the terms of the GNU Lesser General Public License as\n// published by the Free Software Foundation; version 2.1 of the License.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU Lesser General Public License for more details.\n// You should have received a copy of the GNU Lesser General Public\n// License along with this program; if not, write to the Free Software\n// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301,\n// USA.\n//\n//========================================================================\n\n#include \"../../../../Eigen/src/Core/util/NonMPL2.h\"\n\n#ifndef EIGEN_CONSTRAINEDCG_H\n#define EIGEN_CONSTRAINEDCG_H\n\n#include \"../../../../Eigen/Core\"\n\nnamespace Eigen { \n\nnamespace internal {\n\n/** \\ingroup IterativeSolvers_Module\n  * Compute the pseudo inverse of the non-square matrix C such that\n  * \\f$ CINV = (C * C^T)^{-1} * C \\f$ based on a conjugate gradient method.\n  *\n  * This function is internally used by constrained_cg.\n  */\ntemplate <typename CMatrix, typename CINVMatrix>\nvoid pseudo_inverse(const CMatrix &C, CINVMatrix &CINV)\n{\n  // optimisable : copie de la ligne, precalcul de C * trans(C).\n  typedef typename CMatrix::Scalar Scalar;\n  typedef typename CMatrix::Index Index;\n  // FIXME use sparse vectors ?\n  typedef Matrix<Scalar,Dynamic,1> TmpVec;\n\n  Index rows = C.rows(), cols = C.cols();\n\n  TmpVec d(rows), e(rows), l(cols), p(rows), q(rows), r(rows);\n  Scalar rho, rho_1, alpha;\n  d.setZero();\n\n  typedef Triplet<double> T;\n  std::vector<T> tripletList;\n    \n  for (Index i = 0; i < rows; ++i)\n  {\n    d[i] = 1.0;\n    rho = 1.0;\n    e.setZero();\n    r = d;\n    p = d;\n\n    while (rho >= 1e-38)\n    { /* conjugate gradient to compute e             */\n      /* which is the i-th row of inv(C * trans(C))  */\n      l = C.transpose() * p;\n      q = C * l;\n      alpha = rho / p.dot(q);\n      e +=  alpha * p;\n      r += -alpha * q;\n      rho_1 = rho;\n      rho = r.dot(r);\n      p = (rho/rho_1) * p + r;\n    }\n\n    l = C.transpose() * e; // l is the i-th row of CINV\n    // FIXME add a generic \"prune/filter\" expression for both dense and sparse object to sparse\n    for (Index j=0; j<l.size(); ++j)\n      if (l[j]<1e-15)\n\ttripletList.push_back(T(i,j,l(j)));\n\n\t\n    d[i] = 0.0;\n  }\n  CINV.setFromTriplets(tripletList.begin(), tripletList.end());\n}\n\n\n\n/** \\ingroup IterativeSolvers_Module\n  * Constrained conjugate gradient\n  *\n  * Computes the minimum of \\f$ 1/2((Ax).x) - bx \\f$ under the constraint \\f$ Cx \\le f \\f$\n  */\ntemplate<typename TMatrix, typename CMatrix,\n         typename VectorX, typename VectorB, typename VectorF>\nvoid constrained_cg(const TMatrix& A, const CMatrix& C, VectorX& x,\n                       const VectorB& b, const VectorF& f, IterationController &iter)\n{\n  using std::sqrt;\n  typedef typename TMatrix::Scalar Scalar;\n  typedef typename TMatrix::Index Index;\n  typedef Matrix<Scalar,Dynamic,1>  TmpVec;\n\n  Scalar rho = 1.0, rho_1, lambda, gamma;\n  Index xSize = x.size();\n  TmpVec  p(xSize), q(xSize), q2(xSize),\n          r(xSize), old_z(xSize), z(xSize),\n          memox(xSize);\n  std::vector<bool> satured(C.rows());\n  p.setZero();\n  iter.setRhsNorm(sqrt(b.dot(b))); // gael vect_sp(PS, b, b)\n  if (iter.rhsNorm() == 0.0) iter.setRhsNorm(1.0);\n\n  SparseMatrix<Scalar,RowMajor> CINV(C.rows(), C.cols());\n  pseudo_inverse(C, CINV);\n\n  while(true)\n  {\n    // computation of residual\n    old_z = z;\n    memox = x;\n    r = b;\n    r += A * -x;\n    z = r;\n    bool transition = false;\n    for (Index i = 0; i < C.rows(); ++i)\n    {\n      Scalar al = C.row(i).dot(x) - f.coeff(i);\n      if (al >= -1.0E-15)\n      {\n        if (!satured[i])\n        {\n          satured[i] = true;\n          transition = true;\n        }\n        Scalar bb = CINV.row(i).dot(z);\n        if (bb > 0.0)\n          // FIXME: we should allow that: z += -bb * C.row(i);\n          for (typename CMatrix::InnerIterator it(C,i); it; ++it)\n            z.coeffRef(it.index()) -= bb*it.value();\n      }\n      else\n        satured[i] = false;\n    }\n\n    // descent direction\n    rho_1 = rho;\n    rho = r.dot(z);\n\n    if (iter.finished(rho)) break;\n\n    if (iter.noiseLevel() > 0 && transition) std::cerr << \"CCG: transition\\n\";\n    if (transition || iter.first()) gamma = 0.0;\n    else gamma = (std::max)(0.0, (rho - old_z.dot(z)) / rho_1);\n    p = z + gamma*p;\n\n    ++iter;\n    // one dimensionnal optimization\n    q = A * p;\n    lambda = rho / q.dot(p);\n    for (Index i = 0; i < C.rows(); ++i)\n    {\n      if (!satured[i])\n      {\n        Scalar bb = C.row(i).dot(p) - f[i];\n        if (bb > 0.0)\n          lambda = (std::min)(lambda, (f.coeff(i)-C.row(i).dot(x)) / bb);\n      }\n    }\n    x += lambda * p;\n    memox -= x;\n  }\n}\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_CONSTRAINEDCG_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/IterativeSolvers/DGMRES.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_DGMRES_H\n#define EIGEN_DGMRES_H\n\n#include \"../../../../Eigen/Eigenvalues\"\n\nnamespace Eigen { \n  \ntemplate< typename _MatrixType,\n          typename _Preconditioner = DiagonalPreconditioner<typename _MatrixType::Scalar> >\nclass DGMRES;\n\nnamespace internal {\n\ntemplate< typename _MatrixType, typename _Preconditioner>\nstruct traits<DGMRES<_MatrixType,_Preconditioner> >\n{\n  typedef _MatrixType MatrixType;\n  typedef _Preconditioner Preconditioner;\n};\n\n/** \\brief Computes a permutation vector to have a sorted sequence\n  * \\param vec The vector to reorder.\n  * \\param perm gives the sorted sequence on output. Must be initialized with 0..n-1\n  * \\param ncut Put  the ncut smallest elements at the end of the vector\n  * WARNING This is an expensive sort, so should be used only \n  * for small size vectors\n  * TODO Use modified QuickSplit or std::nth_element to get the smallest values \n  */\ntemplate <typename VectorType, typename IndexType>\nvoid sortWithPermutation (VectorType& vec, IndexType& perm, typename IndexType::Scalar& ncut)\n{\n  eigen_assert(vec.size() == perm.size());\n  bool flag; \n  for (Index k  = 0; k < ncut; k++)\n  {\n    flag = false;\n    for (Index j = 0; j < vec.size()-1; j++)\n    {\n      if ( vec(perm(j)) < vec(perm(j+1)) )\n      {\n        std::swap(perm(j),perm(j+1)); \n        flag = true;\n      }\n      if (!flag) break; // The vector is in sorted order\n    }\n  }\n}\n\n}\n/**\n * \\ingroup IterativeLInearSolvers_Module\n * \\brief A Restarted GMRES with deflation.\n * This class implements a modification of the GMRES solver for\n * sparse linear systems. The basis is built with modified \n * Gram-Schmidt. At each restart, a few approximated eigenvectors\n * corresponding to the smallest eigenvalues are used to build a\n * preconditioner for the next cycle. This preconditioner \n * for deflation can be combined with any other preconditioner, \n * the IncompleteLUT for instance. The preconditioner is applied \n * at right of the matrix and the combination is multiplicative.\n * \n * \\tparam _MatrixType the type of the sparse matrix A, can be a dense or a sparse matrix.\n * \\tparam _Preconditioner the type of the preconditioner. Default is DiagonalPreconditioner\n * Typical usage :\n * \\code\n * SparseMatrix<double> A;\n * VectorXd x, b; \n * //Fill A and b ...\n * DGMRES<SparseMatrix<double> > solver;\n * solver.set_restart(30); // Set restarting value\n * solver.setEigenv(1); // Set the number of eigenvalues to deflate\n * solver.compute(A);\n * x = solver.solve(b);\n * \\endcode\n * \n * DGMRES can also be used in a matrix-free context, see the following \\link MatrixfreeSolverExample example \\endlink.\n *\n * References :\n * [1] D. NUENTSA WAKAM and F. PACULL, Memory Efficient Hybrid\n *  Algebraic Solvers for Linear Systems Arising from Compressible\n *  Flows, Computers and Fluids, In Press,\n *  https://doi.org/10.1016/j.compfluid.2012.03.023   \n * [2] K. Burrage and J. Erhel, On the performance of various \n * adaptive preconditioned GMRES strategies, 5(1998), 101-121.\n * [3] J. Erhel, K. Burrage and B. Pohl, Restarted GMRES \n *  preconditioned by deflation,J. Computational and Applied\n *  Mathematics, 69(1996), 303-318. \n\n * \n */\ntemplate< typename _MatrixType, typename _Preconditioner>\nclass DGMRES : public IterativeSolverBase<DGMRES<_MatrixType,_Preconditioner> >\n{\n    typedef IterativeSolverBase<DGMRES> Base;\n    using Base::matrix;\n    using Base::m_error;\n    using Base::m_iterations;\n    using Base::m_info;\n    using Base::m_isInitialized;\n    using Base::m_tolerance; \n  public:\n    using Base::_solve_impl;\n    using Base::_solve_with_guess_impl;\n    typedef _MatrixType MatrixType;\n    typedef typename MatrixType::Scalar Scalar;\n    typedef typename MatrixType::StorageIndex StorageIndex;\n    typedef typename MatrixType::RealScalar RealScalar;\n    typedef _Preconditioner Preconditioner;\n    typedef Matrix<Scalar,Dynamic,Dynamic> DenseMatrix; \n    typedef Matrix<RealScalar,Dynamic,Dynamic> DenseRealMatrix; \n    typedef Matrix<Scalar,Dynamic,1> DenseVector;\n    typedef Matrix<RealScalar,Dynamic,1> DenseRealVector; \n    typedef Matrix<std::complex<RealScalar>, Dynamic, 1> ComplexVector;\n \n    \n  /** Default constructor. */\n  DGMRES() : Base(),m_restart(30),m_neig(0),m_r(0),m_maxNeig(5),m_isDeflAllocated(false),m_isDeflInitialized(false) {}\n\n  /** Initialize the solver with matrix \\a A for further \\c Ax=b solving.\n    * \n    * This constructor is a shortcut for the default constructor followed\n    * by a call to compute().\n    * \n    * \\warning this class stores a reference to the matrix A as well as some\n    * precomputed values that depend on it. Therefore, if \\a A is changed\n    * this class becomes invalid. Call compute() to update it with the new\n    * matrix A, or modify a copy of A.\n    */\n  template<typename MatrixDerived>\n  explicit DGMRES(const EigenBase<MatrixDerived>& A) : Base(A.derived()), m_restart(30),m_neig(0),m_r(0),m_maxNeig(5),m_isDeflAllocated(false),m_isDeflInitialized(false) {}\n\n  ~DGMRES() {}\n  \n  /** \\internal */\n  template<typename Rhs,typename Dest>\n  void _solve_vector_with_guess_impl(const Rhs& b, Dest& x) const\n  {\n    EIGEN_STATIC_ASSERT(Rhs::ColsAtCompileTime==1 || Dest::ColsAtCompileTime==1, YOU_TRIED_CALLING_A_VECTOR_METHOD_ON_A_MATRIX);\n    \n    m_iterations = Base::maxIterations();\n    m_error = Base::m_tolerance;\n    \n    dgmres(matrix(), b, x, Base::m_preconditioner);\n  }\n\n  /** \n   * Get the restart value\n    */\n  Index restart() { return m_restart; }\n  \n  /** \n   * Set the restart value (default is 30)  \n   */\n  void set_restart(const Index restart) { m_restart=restart; }\n  \n  /** \n   * Set the number of eigenvalues to deflate at each restart \n   */\n  void setEigenv(const Index neig) \n  {\n    m_neig = neig;\n    if (neig+1 > m_maxNeig) m_maxNeig = neig+1; // To allow for complex conjugates\n  }\n  \n  /** \n   * Get the size of the deflation subspace size\n   */ \n  Index deflSize() {return m_r; }\n  \n  /**\n   * Set the maximum size of the deflation subspace\n   */\n  void setMaxEigenv(const Index maxNeig) { m_maxNeig = maxNeig; }\n  \n  protected:\n    // DGMRES algorithm \n    template<typename Rhs, typename Dest>\n    void dgmres(const MatrixType& mat,const Rhs& rhs, Dest& x, const Preconditioner& precond) const;\n    // Perform one cycle of GMRES\n    template<typename Dest>\n    Index dgmresCycle(const MatrixType& mat, const Preconditioner& precond, Dest& x, DenseVector& r0, RealScalar& beta, const RealScalar& normRhs, Index& nbIts) const; \n    // Compute data to use for deflation \n    Index dgmresComputeDeflationData(const MatrixType& mat, const Preconditioner& precond, const Index& it, StorageIndex& neig) const;\n    // Apply deflation to a vector\n    template<typename RhsType, typename DestType>\n    Index dgmresApplyDeflation(const RhsType& In, DestType& Out) const; \n    ComplexVector schurValues(const ComplexSchur<DenseMatrix>& schurofH) const;\n    ComplexVector schurValues(const RealSchur<DenseMatrix>& schurofH) const;\n    // Init data for deflation\n    void dgmresInitDeflation(Index& rows) const; \n    mutable DenseMatrix m_V; // Krylov basis vectors\n    mutable DenseMatrix m_H; // Hessenberg matrix \n    mutable DenseMatrix m_Hes; // Initial hessenberg matrix without Givens rotations applied\n    mutable Index m_restart; // Maximum size of the Krylov subspace\n    mutable DenseMatrix m_U; // Vectors that form the basis of the invariant subspace \n    mutable DenseMatrix m_MU; // matrix operator applied to m_U (for next cycles)\n    mutable DenseMatrix m_T; /* T=U^T*M^{-1}*A*U */\n    mutable PartialPivLU<DenseMatrix> m_luT; // LU factorization of m_T\n    mutable StorageIndex m_neig; //Number of eigenvalues to extract at each restart\n    mutable Index m_r; // Current number of deflated eigenvalues, size of m_U\n    mutable Index m_maxNeig; // Maximum number of eigenvalues to deflate\n    mutable RealScalar m_lambdaN; //Modulus of the largest eigenvalue of A\n    mutable bool m_isDeflAllocated;\n    mutable bool m_isDeflInitialized;\n    \n    //Adaptive strategy \n    mutable RealScalar m_smv; // Smaller multiple of the remaining number of steps allowed\n    mutable bool m_force; // Force the use of deflation at each restart\n    \n}; \n/** \n * \\brief Perform several cycles of restarted GMRES with modified Gram Schmidt, \n * \n * A right preconditioner is used combined with deflation.\n * \n */\ntemplate< typename _MatrixType, typename _Preconditioner>\ntemplate<typename Rhs, typename Dest>\nvoid DGMRES<_MatrixType, _Preconditioner>::dgmres(const MatrixType& mat,const Rhs& rhs, Dest& x,\n              const Preconditioner& precond) const\n{\n  const RealScalar considerAsZero = (std::numeric_limits<RealScalar>::min)();\n\n  RealScalar normRhs = rhs.norm();\n  if(normRhs <= considerAsZero) \n  {\n    x.setZero();\n    m_error = 0;\n    return;\n  }\n\n  //Initialization\n  m_isDeflInitialized = false;\n  Index n = mat.rows(); \n  DenseVector r0(n); \n  Index nbIts = 0; \n  m_H.resize(m_restart+1, m_restart);\n  m_Hes.resize(m_restart, m_restart);\n  m_V.resize(n,m_restart+1);\n  //Initial residual vector and initial norm\n  if(x.squaredNorm()==0) \n    x = precond.solve(rhs);\n  r0 = rhs - mat * x; \n  RealScalar beta = r0.norm(); \n  \n  m_error = beta/normRhs; \n  if(m_error < m_tolerance)\n    m_info = Success; \n  else\n    m_info = NoConvergence;\n  \n  // Iterative process\n  while (nbIts < m_iterations && m_info == NoConvergence)\n  {\n    dgmresCycle(mat, precond, x, r0, beta, normRhs, nbIts); \n    \n    // Compute the new residual vector for the restart \n    if (nbIts < m_iterations && m_info == NoConvergence) {\n      r0 = rhs - mat * x;\n      beta = r0.norm();\n    }\n  }\n} \n\n/**\n * \\brief Perform one restart cycle of DGMRES\n * \\param mat The coefficient matrix\n * \\param precond The preconditioner\n * \\param x the new approximated solution\n * \\param r0 The initial residual vector\n * \\param beta The norm of the residual computed so far\n * \\param normRhs The norm of the right hand side vector\n * \\param nbIts The number of iterations\n */\ntemplate< typename _MatrixType, typename _Preconditioner>\ntemplate<typename Dest>\nIndex DGMRES<_MatrixType, _Preconditioner>::dgmresCycle(const MatrixType& mat, const Preconditioner& precond, Dest& x, DenseVector& r0, RealScalar& beta, const RealScalar& normRhs, Index& nbIts) const\n{\n  //Initialization \n  DenseVector g(m_restart+1); // Right hand side of the least square problem\n  g.setZero();  \n  g(0) = Scalar(beta); \n  m_V.col(0) = r0/beta; \n  m_info = NoConvergence; \n  std::vector<JacobiRotation<Scalar> >gr(m_restart); // Givens rotations\n  Index it = 0; // Number of inner iterations \n  Index n = mat.rows();\n  DenseVector tv1(n), tv2(n);  //Temporary vectors\n  while (m_info == NoConvergence && it < m_restart && nbIts < m_iterations)\n  {    \n    // Apply preconditioner(s) at right\n    if (m_isDeflInitialized )\n    {\n      dgmresApplyDeflation(m_V.col(it), tv1); // Deflation\n      tv2 = precond.solve(tv1); \n    }\n    else\n    {\n      tv2 = precond.solve(m_V.col(it)); // User's selected preconditioner\n    }\n    tv1 = mat * tv2; \n   \n    // Orthogonalize it with the previous basis in the basis using modified Gram-Schmidt\n    Scalar coef; \n    for (Index i = 0; i <= it; ++i)\n    { \n      coef = tv1.dot(m_V.col(i));\n      tv1 = tv1 - coef * m_V.col(i); \n      m_H(i,it) = coef; \n      m_Hes(i,it) = coef; \n    }\n    // Normalize the vector \n    coef = tv1.norm(); \n    m_V.col(it+1) = tv1/coef;\n    m_H(it+1, it) = coef;\n//     m_Hes(it+1,it) = coef; \n    \n    // FIXME Check for happy breakdown \n    \n    // Update Hessenberg matrix with Givens rotations\n    for (Index i = 1; i <= it; ++i) \n    {\n      m_H.col(it).applyOnTheLeft(i-1,i,gr[i-1].adjoint());\n    }\n    // Compute the new plane rotation \n    gr[it].makeGivens(m_H(it, it), m_H(it+1,it)); \n    // Apply the new rotation\n    m_H.col(it).applyOnTheLeft(it,it+1,gr[it].adjoint());\n    g.applyOnTheLeft(it,it+1, gr[it].adjoint()); \n    \n    beta = std::abs(g(it+1));\n    m_error = beta/normRhs; \n    // std::cerr << nbIts << \" Relative Residual Norm \" << m_error << std::endl;\n    it++; nbIts++; \n    \n    if (m_error < m_tolerance)\n    {\n      // The method has converged\n      m_info = Success;\n      break;\n    }\n  }\n  \n  // Compute the new coefficients by solving the least square problem\n//   it++;\n  //FIXME  Check first if the matrix is singular ... zero diagonal\n  DenseVector nrs(m_restart); \n  nrs = m_H.topLeftCorner(it,it).template triangularView<Upper>().solve(g.head(it)); \n  \n  // Form the new solution\n  if (m_isDeflInitialized)\n  {\n    tv1 = m_V.leftCols(it) * nrs; \n    dgmresApplyDeflation(tv1, tv2); \n    x = x + precond.solve(tv2);\n  }\n  else\n    x = x + precond.solve(m_V.leftCols(it) * nrs); \n  \n  // Go for a new cycle and compute data for deflation\n  if(nbIts < m_iterations && m_info == NoConvergence && m_neig > 0 && (m_r+m_neig) < m_maxNeig)\n    dgmresComputeDeflationData(mat, precond, it, m_neig); \n  return 0; \n  \n}\n\n\ntemplate< typename _MatrixType, typename _Preconditioner>\nvoid DGMRES<_MatrixType, _Preconditioner>::dgmresInitDeflation(Index& rows) const\n{\n  m_U.resize(rows, m_maxNeig);\n  m_MU.resize(rows, m_maxNeig); \n  m_T.resize(m_maxNeig, m_maxNeig);\n  m_lambdaN = 0.0; \n  m_isDeflAllocated = true; \n}\n\ntemplate< typename _MatrixType, typename _Preconditioner>\ninline typename DGMRES<_MatrixType, _Preconditioner>::ComplexVector DGMRES<_MatrixType, _Preconditioner>::schurValues(const ComplexSchur<DenseMatrix>& schurofH) const\n{\n  return schurofH.matrixT().diagonal();\n}\n\ntemplate< typename _MatrixType, typename _Preconditioner>\ninline typename DGMRES<_MatrixType, _Preconditioner>::ComplexVector DGMRES<_MatrixType, _Preconditioner>::schurValues(const RealSchur<DenseMatrix>& schurofH) const\n{\n  const DenseMatrix& T = schurofH.matrixT();\n  Index it = T.rows();\n  ComplexVector eig(it);\n  Index j = 0;\n  while (j < it-1)\n  {\n    if (T(j+1,j) ==Scalar(0))\n    {\n      eig(j) = std::complex<RealScalar>(T(j,j),RealScalar(0)); \n      j++; \n    }\n    else\n    {\n      eig(j) = std::complex<RealScalar>(T(j,j),T(j+1,j)); \n      eig(j+1) = std::complex<RealScalar>(T(j,j+1),T(j+1,j+1));\n      j++;\n    }\n  }\n  if (j < it-1) eig(j) = std::complex<RealScalar>(T(j,j),RealScalar(0));\n  return eig;\n}\n\ntemplate< typename _MatrixType, typename _Preconditioner>\nIndex DGMRES<_MatrixType, _Preconditioner>::dgmresComputeDeflationData(const MatrixType& mat, const Preconditioner& precond, const Index& it, StorageIndex& neig) const\n{\n  // First, find the Schur form of the Hessenberg matrix H\n  typename internal::conditional<NumTraits<Scalar>::IsComplex, ComplexSchur<DenseMatrix>, RealSchur<DenseMatrix> >::type schurofH; \n  bool computeU = true;\n  DenseMatrix matrixQ(it,it); \n  matrixQ.setIdentity();\n  schurofH.computeFromHessenberg(m_Hes.topLeftCorner(it,it), matrixQ, computeU); \n  \n  ComplexVector eig(it);\n  Matrix<StorageIndex,Dynamic,1>perm(it);\n  eig = this->schurValues(schurofH);\n  \n  // Reorder the absolute values of Schur values\n  DenseRealVector modulEig(it); \n  for (Index j=0; j<it; ++j) modulEig(j) = std::abs(eig(j)); \n  perm.setLinSpaced(it,0,internal::convert_index<StorageIndex>(it-1));\n  internal::sortWithPermutation(modulEig, perm, neig);\n  \n  if (!m_lambdaN)\n  {\n    m_lambdaN = (std::max)(modulEig.maxCoeff(), m_lambdaN);\n  }\n  //Count the real number of extracted eigenvalues (with complex conjugates)\n  Index nbrEig = 0; \n  while (nbrEig < neig)\n  {\n    if(eig(perm(it-nbrEig-1)).imag() == RealScalar(0)) nbrEig++; \n    else nbrEig += 2; \n  }\n  // Extract the  Schur vectors corresponding to the smallest Ritz values\n  DenseMatrix Sr(it, nbrEig); \n  Sr.setZero();\n  for (Index j = 0; j < nbrEig; j++)\n  {\n    Sr.col(j) = schurofH.matrixU().col(perm(it-j-1));\n  }\n  \n  // Form the Schur vectors of the initial matrix using the Krylov basis\n  DenseMatrix X; \n  X = m_V.leftCols(it) * Sr;\n  if (m_r)\n  {\n   // Orthogonalize X against m_U using modified Gram-Schmidt\n   for (Index j = 0; j < nbrEig; j++)\n     for (Index k =0; k < m_r; k++)\n      X.col(j) = X.col(j) - (m_U.col(k).dot(X.col(j)))*m_U.col(k); \n  }\n  \n  // Compute m_MX = A * M^-1 * X\n  Index m = m_V.rows();\n  if (!m_isDeflAllocated) \n    dgmresInitDeflation(m); \n  DenseMatrix MX(m, nbrEig);\n  DenseVector tv1(m);\n  for (Index j = 0; j < nbrEig; j++)\n  {\n    tv1 = mat * X.col(j);\n    MX.col(j) = precond.solve(tv1);\n  }\n  \n  //Update m_T = [U'MU U'MX; X'MU X'MX]\n  m_T.block(m_r, m_r, nbrEig, nbrEig) = X.transpose() * MX; \n  if(m_r)\n  {\n    m_T.block(0, m_r, m_r, nbrEig) = m_U.leftCols(m_r).transpose() * MX; \n    m_T.block(m_r, 0, nbrEig, m_r) = X.transpose() * m_MU.leftCols(m_r);\n  }\n  \n  // Save X into m_U and m_MX in m_MU\n  for (Index j = 0; j < nbrEig; j++) m_U.col(m_r+j) = X.col(j);\n  for (Index j = 0; j < nbrEig; j++) m_MU.col(m_r+j) = MX.col(j);\n  // Increase the size of the invariant subspace\n  m_r += nbrEig; \n  \n  // Factorize m_T into m_luT\n  m_luT.compute(m_T.topLeftCorner(m_r, m_r));\n  \n  //FIXME CHeck if the factorization was correctly done (nonsingular matrix)\n  m_isDeflInitialized = true;\n  return 0; \n}\ntemplate<typename _MatrixType, typename _Preconditioner>\ntemplate<typename RhsType, typename DestType>\nIndex DGMRES<_MatrixType, _Preconditioner>::dgmresApplyDeflation(const RhsType &x, DestType &y) const\n{\n  DenseVector x1 = m_U.leftCols(m_r).transpose() * x; \n  y = x + m_U.leftCols(m_r) * ( m_lambdaN * m_luT.solve(x1) - x1);\n  return 0; \n}\n\n} // end namespace Eigen\n#endif \n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/IterativeSolvers/GMRES.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2011 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2012, 2014 Kolja Brix <brix@igpm.rwth-aaachen.de>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_GMRES_H\n#define EIGEN_GMRES_H\n\nnamespace Eigen {\n\nnamespace internal {\n\n/**\n* Generalized Minimal Residual Algorithm based on the\n* Arnoldi algorithm implemented with Householder reflections.\n*\n* Parameters:\n*  \\param mat       matrix of linear system of equations\n*  \\param rhs       right hand side vector of linear system of equations\n*  \\param x         on input: initial guess, on output: solution\n*  \\param precond   preconditioner used\n*  \\param iters     on input: maximum number of iterations to perform\n*                   on output: number of iterations performed\n*  \\param restart   number of iterations for a restart\n*  \\param tol_error on input: relative residual tolerance\n*                   on output: residuum achieved\n*\n* \\sa IterativeMethods::bicgstab()\n*\n*\n* For references, please see:\n*\n* Saad, Y. and Schultz, M. H.\n* GMRES: A Generalized Minimal Residual Algorithm for Solving Nonsymmetric Linear Systems.\n* SIAM J.Sci.Stat.Comp. 7, 1986, pp. 856 - 869.\n*\n* Saad, Y.\n* Iterative Methods for Sparse Linear Systems.\n* Society for Industrial and Applied Mathematics, Philadelphia, 2003.\n*\n* Walker, H. F.\n* Implementations of the GMRES method.\n* Comput.Phys.Comm. 53, 1989, pp. 311 - 320.\n*\n* Walker, H. F.\n* Implementation of the GMRES Method using Householder Transformations.\n* SIAM J.Sci.Stat.Comp. 9, 1988, pp. 152 - 163.\n*\n*/\ntemplate<typename MatrixType, typename Rhs, typename Dest, typename Preconditioner>\nbool gmres(const MatrixType & mat, const Rhs & rhs, Dest & x, const Preconditioner & precond,\n    Index &iters, const Index &restart, typename Dest::RealScalar & tol_error) {\n\n  using std::sqrt;\n  using std::abs;\n\n  typedef typename Dest::RealScalar RealScalar;\n  typedef typename Dest::Scalar Scalar;\n  typedef Matrix < Scalar, Dynamic, 1 > VectorType;\n  typedef Matrix < Scalar, Dynamic, Dynamic, ColMajor> FMatrixType;\n\n  const RealScalar considerAsZero = (std::numeric_limits<RealScalar>::min)();\n\n  if(rhs.norm() <= considerAsZero) \n  {\n    x.setZero();\n    tol_error = 0;\n    return true;\n  }\n\n  RealScalar tol = tol_error;\n  const Index maxIters = iters;\n  iters = 0;\n\n  const Index m = mat.rows();\n\n  // residual and preconditioned residual\n  VectorType p0 = rhs - mat*x;\n  VectorType r0 = precond.solve(p0);\n\n  const RealScalar r0Norm = r0.norm();\n\n  // is initial guess already good enough?\n  if(r0Norm == 0)\n  {\n    tol_error = 0;\n    return true;\n  }\n\n  // storage for Hessenberg matrix and Householder data\n  FMatrixType H   = FMatrixType::Zero(m, restart + 1);\n  VectorType w    = VectorType::Zero(restart + 1);\n  VectorType tau  = VectorType::Zero(restart + 1);\n\n  // storage for Jacobi rotations\n  std::vector < JacobiRotation < Scalar > > G(restart);\n  \n  // storage for temporaries\n  VectorType t(m), v(m), workspace(m), x_new(m);\n\n  // generate first Householder vector\n  Ref<VectorType> H0_tail = H.col(0).tail(m - 1);\n  RealScalar beta;\n  r0.makeHouseholder(H0_tail, tau.coeffRef(0), beta);\n  w(0) = Scalar(beta);\n  \n  for (Index k = 1; k <= restart; ++k)\n  {\n    ++iters;\n\n    v = VectorType::Unit(m, k - 1);\n\n    // apply Householder reflections H_{1} ... H_{k-1} to v\n    // TODO: use a HouseholderSequence\n    for (Index i = k - 1; i >= 0; --i) {\n      v.tail(m - i).applyHouseholderOnTheLeft(H.col(i).tail(m - i - 1), tau.coeffRef(i), workspace.data());\n    }\n\n    // apply matrix M to v:  v = mat * v;\n    t.noalias() = mat * v;\n    v = precond.solve(t);\n\n    // apply Householder reflections H_{k-1} ... H_{1} to v\n    // TODO: use a HouseholderSequence\n    for (Index i = 0; i < k; ++i) {\n      v.tail(m - i).applyHouseholderOnTheLeft(H.col(i).tail(m - i - 1), tau.coeffRef(i), workspace.data());\n    }\n\n    if (v.tail(m - k).norm() != 0.0)\n    {\n      if (k <= restart)\n      {\n        // generate new Householder vector\n        Ref<VectorType> Hk_tail = H.col(k).tail(m - k - 1);\n        v.tail(m - k).makeHouseholder(Hk_tail, tau.coeffRef(k), beta);\n\n        // apply Householder reflection H_{k} to v\n        v.tail(m - k).applyHouseholderOnTheLeft(Hk_tail, tau.coeffRef(k), workspace.data());\n      }\n    }\n\n    if (k > 1)\n    {\n      for (Index i = 0; i < k - 1; ++i)\n      {\n        // apply old Givens rotations to v\n        v.applyOnTheLeft(i, i + 1, G[i].adjoint());\n      }\n    }\n\n    if (k<m && v(k) != (Scalar) 0)\n    {\n      // determine next Givens rotation\n      G[k - 1].makeGivens(v(k - 1), v(k));\n\n      // apply Givens rotation to v and w\n      v.applyOnTheLeft(k - 1, k, G[k - 1].adjoint());\n      w.applyOnTheLeft(k - 1, k, G[k - 1].adjoint());\n    }\n\n    // insert coefficients into upper matrix triangle\n    H.col(k-1).head(k) = v.head(k);\n\n    tol_error = abs(w(k)) / r0Norm;\n    bool stop = (k==m || tol_error < tol || iters == maxIters);\n\n    if (stop || k == restart)\n    {\n      // solve upper triangular system\n      Ref<VectorType> y = w.head(k);\n      H.topLeftCorner(k, k).template triangularView <Upper>().solveInPlace(y);\n\n      // use Horner-like scheme to calculate solution vector\n      x_new.setZero();\n      for (Index i = k - 1; i >= 0; --i)\n      {\n        x_new(i) += y(i);\n        // apply Householder reflection H_{i} to x_new\n        x_new.tail(m - i).applyHouseholderOnTheLeft(H.col(i).tail(m - i - 1), tau.coeffRef(i), workspace.data());\n      }\n\n      x += x_new;\n\n      if(stop)\n      {\n        return true;\n      }\n      else\n      {\n        k=0;\n\n        // reset data for restart\n        p0.noalias() = rhs - mat*x;\n        r0 = precond.solve(p0);\n\n        // clear Hessenberg matrix and Householder data\n        H.setZero();\n        w.setZero();\n        tau.setZero();\n\n        // generate first Householder vector\n        r0.makeHouseholder(H0_tail, tau.coeffRef(0), beta);\n        w(0) = Scalar(beta);\n      }\n    }\n  }\n\n  return false;\n\n}\n\n}\n\ntemplate< typename _MatrixType,\n          typename _Preconditioner = DiagonalPreconditioner<typename _MatrixType::Scalar> >\nclass GMRES;\n\nnamespace internal {\n\ntemplate< typename _MatrixType, typename _Preconditioner>\nstruct traits<GMRES<_MatrixType,_Preconditioner> >\n{\n  typedef _MatrixType MatrixType;\n  typedef _Preconditioner Preconditioner;\n};\n\n}\n\n/** \\ingroup IterativeLinearSolvers_Module\n  * \\brief A GMRES solver for sparse square problems\n  *\n  * This class allows to solve for A.x = b sparse linear problems using a generalized minimal\n  * residual method. The vectors x and b can be either dense or sparse.\n  *\n  * \\tparam _MatrixType the type of the sparse matrix A, can be a dense or a sparse matrix.\n  * \\tparam _Preconditioner the type of the preconditioner. Default is DiagonalPreconditioner\n  *\n  * The maximal number of iterations and tolerance value can be controlled via the setMaxIterations()\n  * and setTolerance() methods. The defaults are the size of the problem for the maximal number of iterations\n  * and NumTraits<Scalar>::epsilon() for the tolerance.\n  *\n  * This class can be used as the direct solver classes. Here is a typical usage example:\n  * \\code\n  * int n = 10000;\n  * VectorXd x(n), b(n);\n  * SparseMatrix<double> A(n,n);\n  * // fill A and b\n  * GMRES<SparseMatrix<double> > solver(A);\n  * x = solver.solve(b);\n  * std::cout << \"#iterations:     \" << solver.iterations() << std::endl;\n  * std::cout << \"estimated error: \" << solver.error()      << std::endl;\n  * // update b, and solve again\n  * x = solver.solve(b);\n  * \\endcode\n  *\n  * By default the iterations start with x=0 as an initial guess of the solution.\n  * One can control the start using the solveWithGuess() method.\n  * \n  * GMRES can also be used in a matrix-free context, see the following \\link MatrixfreeSolverExample example \\endlink.\n  *\n  * \\sa class SimplicialCholesky, DiagonalPreconditioner, IdentityPreconditioner\n  */\ntemplate< typename _MatrixType, typename _Preconditioner>\nclass GMRES : public IterativeSolverBase<GMRES<_MatrixType,_Preconditioner> >\n{\n  typedef IterativeSolverBase<GMRES> Base;\n  using Base::matrix;\n  using Base::m_error;\n  using Base::m_iterations;\n  using Base::m_info;\n  using Base::m_isInitialized;\n\nprivate:\n  Index m_restart;\n\npublic:\n  using Base::_solve_impl;\n  typedef _MatrixType MatrixType;\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename MatrixType::RealScalar RealScalar;\n  typedef _Preconditioner Preconditioner;\n\npublic:\n\n  /** Default constructor. */\n  GMRES() : Base(), m_restart(30) {}\n\n  /** Initialize the solver with matrix \\a A for further \\c Ax=b solving.\n    *\n    * This constructor is a shortcut for the default constructor followed\n    * by a call to compute().\n    *\n    * \\warning this class stores a reference to the matrix A as well as some\n    * precomputed values that depend on it. Therefore, if \\a A is changed\n    * this class becomes invalid. Call compute() to update it with the new\n    * matrix A, or modify a copy of A.\n    */\n  template<typename MatrixDerived>\n  explicit GMRES(const EigenBase<MatrixDerived>& A) : Base(A.derived()), m_restart(30) {}\n\n  ~GMRES() {}\n\n  /** Get the number of iterations after that a restart is performed.\n    */\n  Index get_restart() { return m_restart; }\n\n  /** Set the number of iterations after that a restart is performed.\n    *  \\param restart   number of iterations for a restarti, default is 30.\n    */\n  void set_restart(const Index restart) { m_restart=restart; }\n\n  /** \\internal */\n  template<typename Rhs,typename Dest>\n  void _solve_vector_with_guess_impl(const Rhs& b, Dest& x) const\n  {\n    m_iterations = Base::maxIterations();\n    m_error = Base::m_tolerance;\n    bool ret = internal::gmres(matrix(), b, x, Base::m_preconditioner, m_iterations, m_restart, m_error);\n    m_info = (!ret) ? NumericalIssue\n          : m_error <= Base::m_tolerance ? Success\n          : NoConvergence;\n  }\n\nprotected:\n\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_GMRES_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/IterativeSolvers/IncompleteLU.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2011 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_INCOMPLETE_LU_H\n#define EIGEN_INCOMPLETE_LU_H\n\nnamespace Eigen { \n\ntemplate <typename _Scalar>\nclass IncompleteLU : public SparseSolverBase<IncompleteLU<_Scalar> >\n{\n  protected:\n    typedef SparseSolverBase<IncompleteLU<_Scalar> > Base;\n    using Base::m_isInitialized;\n    \n    typedef _Scalar Scalar;\n    typedef Matrix<Scalar,Dynamic,1> Vector;\n    typedef typename Vector::Index Index;\n    typedef SparseMatrix<Scalar,RowMajor> FactorType;\n\n  public:\n    typedef Matrix<Scalar,Dynamic,Dynamic> MatrixType;\n\n    IncompleteLU() {}\n\n    template<typename MatrixType>\n    IncompleteLU(const MatrixType& mat)\n    {\n      compute(mat);\n    }\n\n    Index rows() const { return m_lu.rows(); }\n    Index cols() const { return m_lu.cols(); }\n\n    template<typename MatrixType>\n    IncompleteLU& compute(const MatrixType& mat)\n    {\n      m_lu = mat;\n      int size = mat.cols();\n      Vector diag(size);\n      for(int i=0; i<size; ++i)\n      {\n        typename FactorType::InnerIterator k_it(m_lu,i);\n        for(; k_it && k_it.index()<i; ++k_it)\n        {\n          int k = k_it.index();\n          k_it.valueRef() /= diag(k);\n\n          typename FactorType::InnerIterator j_it(k_it);\n          typename FactorType::InnerIterator kj_it(m_lu, k);\n          while(kj_it && kj_it.index()<=k) ++kj_it;\n          for(++j_it; j_it; )\n          {\n            if(kj_it.index()==j_it.index())\n            {\n              j_it.valueRef() -= k_it.value() * kj_it.value();\n              ++j_it;\n              ++kj_it;\n            }\n            else if(kj_it.index()<j_it.index()) ++kj_it;\n            else                                ++j_it;\n          }\n        }\n        if(k_it && k_it.index()==i) diag(i) = k_it.value();\n        else                        diag(i) = 1;\n      }\n      m_isInitialized = true;\n      return *this;\n    }\n\n    template<typename Rhs, typename Dest>\n    void _solve_impl(const Rhs& b, Dest& x) const\n    {\n      x = m_lu.template triangularView<UnitLower>().solve(b);\n      x = m_lu.template triangularView<Upper>().solve(x);\n    }\n\n  protected:\n    FactorType m_lu;\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_INCOMPLETE_LU_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/IterativeSolvers/IterationController.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n\n/* NOTE The class IterationController has been adapted from the iteration\n *      class of the GMM++ and ITL libraries.\n */\n\n//=======================================================================\n// Copyright (C) 1997-2001\n// Authors: Andrew Lumsdaine <lums@osl.iu.edu> \n//          Lie-Quan Lee     <llee@osl.iu.edu>\n//\n// This file is part of the Iterative Template Library\n//\n// You should have received a copy of the License Agreement for the\n// Iterative Template Library along with the software;  see the\n// file LICENSE.  \n//\n// Permission to modify the code and to distribute modified code is\n// granted, provided the text of this NOTICE is retained, a notice that\n// the code was modified is included with the above COPYRIGHT NOTICE and\n// with the COPYRIGHT NOTICE in the LICENSE file, and that the LICENSE\n// file is distributed with the modified code.\n//\n// LICENSOR MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED.\n// By way of example, but not limitation, Licensor MAKES NO\n// REPRESENTATIONS OR WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY\n// PARTICULAR PURPOSE OR THAT THE USE OF THE LICENSED SOFTWARE COMPONENTS\n// OR DOCUMENTATION WILL NOT INFRINGE ANY PATENTS, COPYRIGHTS, TRADEMARKS\n// OR OTHER RIGHTS.\n//=======================================================================\n\n//========================================================================\n//\n// Copyright (C) 2002-2007 Yves Renard\n//\n// This file is a part of GETFEM++\n//\n// Getfem++ is free software; you can redistribute it and/or modify\n// it under the terms of the GNU Lesser General Public License as\n// published by the Free Software Foundation; version 2.1 of the License.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU Lesser General Public License for more details.\n// You should have received a copy of the GNU Lesser General Public\n// License along with this program; if not, write to the Free Software\n// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301,\n// USA.\n//\n//========================================================================\n\n#include \"../../../../Eigen/src/Core/util/NonMPL2.h\"\n\n#ifndef EIGEN_ITERATION_CONTROLLER_H\n#define EIGEN_ITERATION_CONTROLLER_H\n\nnamespace Eigen { \n\n/** \\ingroup IterativeSolvers_Module\n  * \\class IterationController\n  *\n  * \\brief Controls the iterations of the iterative solvers\n  *\n  * This class has been adapted from the iteration class of GMM++ and ITL libraries.\n  *\n  */\nclass IterationController\n{\n  protected :\n    double m_rhsn;        ///< Right hand side norm\n    size_t m_maxiter;     ///< Max. number of iterations\n    int m_noise;          ///< if noise > 0 iterations are printed\n    double m_resmax;      ///< maximum residual\n    double m_resminreach, m_resadd;\n    size_t m_nit;         ///< iteration number\n    double m_res;         ///< last computed residual\n    bool m_written;\n    void (*m_callback)(const IterationController&);\n  public :\n\n    void init()\n    {\n      m_nit = 0; m_res = 0.0; m_written = false;\n      m_resminreach = 1E50; m_resadd = 0.0;\n      m_callback = 0;\n    }\n\n    IterationController(double r = 1.0E-8, int noi = 0, size_t mit = size_t(-1))\n      : m_rhsn(1.0), m_maxiter(mit), m_noise(noi), m_resmax(r) { init(); }\n\n    void operator ++(int) { m_nit++; m_written = false; m_resadd += m_res; }\n    void operator ++() { (*this)++; }\n\n    bool first() { return m_nit == 0; }\n\n    /* get/set the \"noisyness\" (verbosity) of the solvers */\n    int noiseLevel() const { return m_noise; }\n    void setNoiseLevel(int n) { m_noise = n; }\n    void reduceNoiseLevel() { if (m_noise > 0) m_noise--; }\n\n    double maxResidual() const { return m_resmax; }\n    void setMaxResidual(double r) { m_resmax = r; }\n\n    double residual() const { return m_res; }\n\n    /* change the user-definable callback, called after each iteration */\n    void setCallback(void (*t)(const IterationController&))\n    {\n      m_callback = t;\n    }\n\n    size_t iteration() const { return m_nit; }\n    void setIteration(size_t i) { m_nit = i; }\n\n    size_t maxIterarions() const { return m_maxiter; }\n    void setMaxIterations(size_t i) { m_maxiter = i; }\n\n    double rhsNorm() const { return m_rhsn; }\n    void setRhsNorm(double r) { m_rhsn = r; }\n\n    bool converged() const { return m_res <= m_rhsn * m_resmax; }\n    bool converged(double nr)\n    {\n      using std::abs;\n      m_res = abs(nr); \n      m_resminreach = (std::min)(m_resminreach, m_res);\n      return converged();\n    }\n    template<typename VectorType> bool converged(const VectorType &v)\n    { return converged(v.squaredNorm()); }\n\n    bool finished(double nr)\n    {\n      if (m_callback) m_callback(*this);\n      if (m_noise > 0 && !m_written)\n      {\n        converged(nr);\n        m_written = true;\n      }\n      return (m_nit >= m_maxiter || converged(nr));\n    }\n    template <typename VectorType>\n    bool finished(const MatrixBase<VectorType> &v)\n    { return finished(double(v.squaredNorm())); }\n\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_ITERATION_CONTROLLER_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/IterativeSolvers/MINRES.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Giacomo Po <gpo@ucla.edu>\n// Copyright (C) 2011-2014 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2018 David Hyde <dabh@stanford.edu>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n\n#ifndef EIGEN_MINRES_H_\n#define EIGEN_MINRES_H_\n\n\nnamespace Eigen {\n    \n    namespace internal {\n        \n        /** \\internal Low-level MINRES algorithm\n         * \\param mat The matrix A\n         * \\param rhs The right hand side vector b\n         * \\param x On input and initial solution, on output the computed solution.\n         * \\param precond A right preconditioner being able to efficiently solve for an\n         *                approximation of Ax=b (regardless of b)\n         * \\param iters On input the max number of iteration, on output the number of performed iterations.\n         * \\param tol_error On input the tolerance error, on output an estimation of the relative error.\n         */\n        template<typename MatrixType, typename Rhs, typename Dest, typename Preconditioner>\n        EIGEN_DONT_INLINE\n        void minres(const MatrixType& mat, const Rhs& rhs, Dest& x,\n                    const Preconditioner& precond, Index& iters,\n                    typename Dest::RealScalar& tol_error)\n        {\n            using std::sqrt;\n            typedef typename Dest::RealScalar RealScalar;\n            typedef typename Dest::Scalar Scalar;\n            typedef Matrix<Scalar,Dynamic,1> VectorType;\n\n            // Check for zero rhs\n            const RealScalar rhsNorm2(rhs.squaredNorm());\n            if(rhsNorm2 == 0)\n            {\n                x.setZero();\n                iters = 0;\n                tol_error = 0;\n                return;\n            }\n            \n            // initialize\n            const Index maxIters(iters);  // initialize maxIters to iters\n            const Index N(mat.cols());    // the size of the matrix\n            const RealScalar threshold2(tol_error*tol_error*rhsNorm2); // convergence threshold (compared to residualNorm2)\n            \n            // Initialize preconditioned Lanczos\n            VectorType v_old(N); // will be initialized inside loop\n            VectorType v( VectorType::Zero(N) ); //initialize v\n            VectorType v_new(rhs-mat*x); //initialize v_new\n            RealScalar residualNorm2(v_new.squaredNorm());\n            VectorType w(N); // will be initialized inside loop\n            VectorType w_new(precond.solve(v_new)); // initialize w_new\n//            RealScalar beta; // will be initialized inside loop\n            RealScalar beta_new2(v_new.dot(w_new));\n            eigen_assert(beta_new2 >= 0.0 && \"PRECONDITIONER IS NOT POSITIVE DEFINITE\");\n            RealScalar beta_new(sqrt(beta_new2));\n            const RealScalar beta_one(beta_new);\n            // Initialize other variables\n            RealScalar c(1.0); // the cosine of the Givens rotation\n            RealScalar c_old(1.0);\n            RealScalar s(0.0); // the sine of the Givens rotation\n            RealScalar s_old(0.0); // the sine of the Givens rotation\n            VectorType p_oold(N); // will be initialized in loop\n            VectorType p_old(VectorType::Zero(N)); // initialize p_old=0\n            VectorType p(p_old); // initialize p=0\n            RealScalar eta(1.0);\n                        \n            iters = 0; // reset iters\n            while ( iters < maxIters )\n            {\n                // Preconditioned Lanczos\n                /* Note that there are 4 variants on the Lanczos algorithm. These are\n                 * described in Paige, C. C. (1972). Computational variants of\n                 * the Lanczos method for the eigenproblem. IMA Journal of Applied\n                 * Mathematics, 10(3), 373-381. The current implementation corresponds \n                 * to the case A(2,7) in the paper. It also corresponds to \n                 * algorithm 6.14 in Y. Saad, Iterative Methods for Sparse Linear\n                 * Systems, 2003 p.173. For the preconditioned version see \n                 * A. Greenbaum, Iterative Methods for Solving Linear Systems, SIAM (1987).\n                 */\n                const RealScalar beta(beta_new);\n                v_old = v; // update: at first time step, this makes v_old = 0 so value of beta doesn't matter\n                v_new /= beta_new; // overwrite v_new for next iteration\n                w_new /= beta_new; // overwrite w_new for next iteration\n                v = v_new; // update\n                w = w_new; // update\n                v_new.noalias() = mat*w - beta*v_old; // compute v_new\n                const RealScalar alpha = v_new.dot(w);\n                v_new -= alpha*v; // overwrite v_new\n                w_new = precond.solve(v_new); // overwrite w_new\n                beta_new2 = v_new.dot(w_new); // compute beta_new\n                eigen_assert(beta_new2 >= 0.0 && \"PRECONDITIONER IS NOT POSITIVE DEFINITE\");\n                beta_new = sqrt(beta_new2); // compute beta_new\n                \n                // Givens rotation\n                const RealScalar r2 =s*alpha+c*c_old*beta; // s, s_old, c and c_old are still from previous iteration\n                const RealScalar r3 =s_old*beta; // s, s_old, c and c_old are still from previous iteration\n                const RealScalar r1_hat=c*alpha-c_old*s*beta;\n                const RealScalar r1 =sqrt( std::pow(r1_hat,2) + std::pow(beta_new,2) );\n                c_old = c; // store for next iteration\n                s_old = s; // store for next iteration\n                c=r1_hat/r1; // new cosine\n                s=beta_new/r1; // new sine\n                \n                // Update solution\n                p_oold = p_old;\n                p_old = p;\n                p.noalias()=(w-r2*p_old-r3*p_oold) /r1; // IS NOALIAS REQUIRED?\n                x += beta_one*c*eta*p;\n                \n                /* Update the squared residual. Note that this is the estimated residual.\n                The real residual |Ax-b|^2 may be slightly larger */\n                residualNorm2 *= s*s;\n                \n                if ( residualNorm2 < threshold2)\n                {\n                    break;\n                }\n                \n                eta=-s*eta; // update eta\n                iters++; // increment iteration number (for output purposes)\n            }\n            \n            /* Compute error. Note that this is the estimated error. The real \n             error |Ax-b|/|b| may be slightly larger */\n            tol_error = std::sqrt(residualNorm2 / rhsNorm2);\n        }\n        \n    }\n    \n    template< typename _MatrixType, int _UpLo=Lower,\n    typename _Preconditioner = IdentityPreconditioner>\n    class MINRES;\n    \n    namespace internal {\n        \n        template< typename _MatrixType, int _UpLo, typename _Preconditioner>\n        struct traits<MINRES<_MatrixType,_UpLo,_Preconditioner> >\n        {\n            typedef _MatrixType MatrixType;\n            typedef _Preconditioner Preconditioner;\n        };\n        \n    }\n    \n    /** \\ingroup IterativeLinearSolvers_Module\n     * \\brief A minimal residual solver for sparse symmetric problems\n     *\n     * This class allows to solve for A.x = b sparse linear problems using the MINRES algorithm\n     * of Paige and Saunders (1975). The sparse matrix A must be symmetric (possibly indefinite).\n     * The vectors x and b can be either dense or sparse.\n     *\n     * \\tparam _MatrixType the type of the sparse matrix A, can be a dense or a sparse matrix.\n     * \\tparam _UpLo the triangular part that will be used for the computations. It can be Lower,\n     *               Upper, or Lower|Upper in which the full matrix entries will be considered. Default is Lower.\n     * \\tparam _Preconditioner the type of the preconditioner. Default is DiagonalPreconditioner\n     *\n     * The maximal number of iterations and tolerance value can be controlled via the setMaxIterations()\n     * and setTolerance() methods. The defaults are the size of the problem for the maximal number of iterations\n     * and NumTraits<Scalar>::epsilon() for the tolerance.\n     *\n     * This class can be used as the direct solver classes. Here is a typical usage example:\n     * \\code\n     * int n = 10000;\n     * VectorXd x(n), b(n);\n     * SparseMatrix<double> A(n,n);\n     * // fill A and b\n     * MINRES<SparseMatrix<double> > mr;\n     * mr.compute(A);\n     * x = mr.solve(b);\n     * std::cout << \"#iterations:     \" << mr.iterations() << std::endl;\n     * std::cout << \"estimated error: \" << mr.error()      << std::endl;\n     * // update b, and solve again\n     * x = mr.solve(b);\n     * \\endcode\n     *\n     * By default the iterations start with x=0 as an initial guess of the solution.\n     * One can control the start using the solveWithGuess() method.\n     *\n     * MINRES can also be used in a matrix-free context, see the following \\link MatrixfreeSolverExample example \\endlink.\n     *\n     * \\sa class ConjugateGradient, BiCGSTAB, SimplicialCholesky, DiagonalPreconditioner, IdentityPreconditioner\n     */\n    template< typename _MatrixType, int _UpLo, typename _Preconditioner>\n    class MINRES : public IterativeSolverBase<MINRES<_MatrixType,_UpLo,_Preconditioner> >\n    {\n        \n        typedef IterativeSolverBase<MINRES> Base;\n        using Base::matrix;\n        using Base::m_error;\n        using Base::m_iterations;\n        using Base::m_info;\n        using Base::m_isInitialized;\n    public:\n        using Base::_solve_impl;\n        typedef _MatrixType MatrixType;\n        typedef typename MatrixType::Scalar Scalar;\n        typedef typename MatrixType::RealScalar RealScalar;\n        typedef _Preconditioner Preconditioner;\n        \n        enum {UpLo = _UpLo};\n        \n    public:\n        \n        /** Default constructor. */\n        MINRES() : Base() {}\n        \n        /** Initialize the solver with matrix \\a A for further \\c Ax=b solving.\n         *\n         * This constructor is a shortcut for the default constructor followed\n         * by a call to compute().\n         *\n         * \\warning this class stores a reference to the matrix A as well as some\n         * precomputed values that depend on it. Therefore, if \\a A is changed\n         * this class becomes invalid. Call compute() to update it with the new\n         * matrix A, or modify a copy of A.\n         */\n        template<typename MatrixDerived>\n        explicit MINRES(const EigenBase<MatrixDerived>& A) : Base(A.derived()) {}\n        \n        /** Destructor. */\n        ~MINRES(){}\n\n        /** \\internal */\n        template<typename Rhs,typename Dest>\n        void _solve_vector_with_guess_impl(const Rhs& b, Dest& x) const\n        {\n            typedef typename Base::MatrixWrapper MatrixWrapper;\n            typedef typename Base::ActualMatrixType ActualMatrixType;\n            enum {\n              TransposeInput  =   (!MatrixWrapper::MatrixFree)\n                              &&  (UpLo==(Lower|Upper))\n                              &&  (!MatrixType::IsRowMajor)\n                              &&  (!NumTraits<Scalar>::IsComplex)\n            };\n            typedef typename internal::conditional<TransposeInput,Transpose<const ActualMatrixType>, ActualMatrixType const&>::type RowMajorWrapper;\n            EIGEN_STATIC_ASSERT(EIGEN_IMPLIES(MatrixWrapper::MatrixFree,UpLo==(Lower|Upper)),MATRIX_FREE_CONJUGATE_GRADIENT_IS_COMPATIBLE_WITH_UPPER_UNION_LOWER_MODE_ONLY);\n            typedef typename internal::conditional<UpLo==(Lower|Upper),\n                                                  RowMajorWrapper,\n                                                  typename MatrixWrapper::template ConstSelfAdjointViewReturnType<UpLo>::Type\n                                            >::type SelfAdjointWrapper;\n\n            m_iterations = Base::maxIterations();\n            m_error = Base::m_tolerance;\n            RowMajorWrapper row_mat(matrix());\n            internal::minres(SelfAdjointWrapper(row_mat), b, x,\n                             Base::m_preconditioner, m_iterations, m_error);\n            m_info = m_error <= Base::m_tolerance ? Success : NoConvergence;\n        }\n        \n    protected:\n        \n    };\n\n} // end namespace Eigen\n\n#endif // EIGEN_MINRES_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/IterativeSolvers/Scaling.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Desire NUENTSA WAKAM <desire.nuentsa_wakam@inria.fr\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_ITERSCALING_H\n#define EIGEN_ITERSCALING_H\n\nnamespace Eigen {\n\n/**\n  * \\ingroup IterativeSolvers_Module\n  * \\brief iterative scaling algorithm to equilibrate rows and column norms in matrices\n  * \n  * This class can be used as a preprocessing tool to accelerate the convergence of iterative methods \n  * \n  * This feature is  useful to limit the pivoting amount during LU/ILU factorization\n  * The  scaling strategy as presented here preserves the symmetry of the problem\n  * NOTE It is assumed that the matrix does not have empty row or column, \n  * \n  * Example with key steps \n  * \\code\n  * VectorXd x(n), b(n);\n  * SparseMatrix<double> A;\n  * // fill A and b;\n  * IterScaling<SparseMatrix<double> > scal; \n  * // Compute the left and right scaling vectors. The matrix is equilibrated at output\n  * scal.computeRef(A); \n  * // Scale the right hand side\n  * b = scal.LeftScaling().cwiseProduct(b); \n  * // Now, solve the equilibrated linear system with any available solver\n  * \n  * // Scale back the computed solution\n  * x = scal.RightScaling().cwiseProduct(x); \n  * \\endcode\n  * \n  * \\tparam _MatrixType the type of the matrix. It should be a real square sparsematrix\n  * \n  * References : D. Ruiz and B. Ucar, A Symmetry Preserving Algorithm for Matrix Scaling, INRIA Research report RR-7552\n  * \n  * \\sa \\ref IncompleteLUT \n  */\ntemplate<typename _MatrixType>\nclass IterScaling\n{\n  public:\n    typedef _MatrixType MatrixType; \n    typedef typename MatrixType::Scalar Scalar;\n    typedef typename MatrixType::Index Index;\n    \n  public:\n    IterScaling() { init(); }\n    \n    IterScaling(const MatrixType& matrix)\n    {\n      init();\n      compute(matrix);\n    }\n    \n    ~IterScaling() { }\n    \n    /** \n     * Compute the left and right diagonal matrices to scale the input matrix @p mat\n     * \n     * FIXME This algorithm will be modified such that the diagonal elements are permuted on the diagonal. \n     * \n     * \\sa LeftScaling() RightScaling()\n     */\n    void compute (const MatrixType& mat)\n    {\n      using std::abs;\n      int m = mat.rows(); \n      int n = mat.cols();\n      eigen_assert((m>0 && m == n) && \"Please give a non - empty matrix\");\n      m_left.resize(m); \n      m_right.resize(n);\n      m_left.setOnes();\n      m_right.setOnes();\n      m_matrix = mat;\n      VectorXd Dr, Dc, DrRes, DcRes; // Temporary Left and right scaling vectors\n      Dr.resize(m); Dc.resize(n);\n      DrRes.resize(m); DcRes.resize(n);\n      double EpsRow = 1.0, EpsCol = 1.0;\n      int its = 0; \n      do\n      { // Iterate until the infinite norm of each row and column is approximately 1\n        // Get the maximum value in each row and column\n        Dr.setZero(); Dc.setZero();\n        for (int k=0; k<m_matrix.outerSize(); ++k)\n        {\n          for (typename MatrixType::InnerIterator it(m_matrix, k); it; ++it)\n          {\n            if ( Dr(it.row()) < abs(it.value()) )\n              Dr(it.row()) = abs(it.value());\n            \n            if ( Dc(it.col()) < abs(it.value()) )\n              Dc(it.col()) = abs(it.value());\n          }\n        }\n        for (int i = 0; i < m; ++i) \n        {\n          Dr(i) = std::sqrt(Dr(i));\n        }\n        for (int i = 0; i < n; ++i) \n        {\n          Dc(i) = std::sqrt(Dc(i));\n        }\n        // Save the scaling factors \n        for (int i = 0; i < m; ++i) \n        {\n          m_left(i) /= Dr(i);\n        }\n        for (int i = 0; i < n; ++i) \n        {\n          m_right(i) /= Dc(i);\n        }\n        // Scale the rows and the columns of the matrix\n        DrRes.setZero(); DcRes.setZero(); \n        for (int k=0; k<m_matrix.outerSize(); ++k)\n        {\n          for (typename MatrixType::InnerIterator it(m_matrix, k); it; ++it)\n          {\n            it.valueRef() = it.value()/( Dr(it.row()) * Dc(it.col()) );\n            // Accumulate the norms of the row and column vectors   \n            if ( DrRes(it.row()) < abs(it.value()) )\n              DrRes(it.row()) = abs(it.value());\n            \n            if ( DcRes(it.col()) < abs(it.value()) )\n              DcRes(it.col()) = abs(it.value());\n          }\n        }  \n        DrRes.array() = (1-DrRes.array()).abs();\n        EpsRow = DrRes.maxCoeff();\n        DcRes.array() = (1-DcRes.array()).abs();\n        EpsCol = DcRes.maxCoeff();\n        its++;\n      }while ( (EpsRow >m_tol || EpsCol > m_tol) && (its < m_maxits) );\n      m_isInitialized = true;\n    }\n    /** Compute the left and right vectors to scale the vectors\n     * the input matrix is scaled with the computed vectors at output\n     * \n     * \\sa compute()\n     */\n    void computeRef (MatrixType& mat)\n    {\n      compute (mat);\n      mat = m_matrix;\n    }\n    /** Get the vector to scale the rows of the matrix \n     */\n    VectorXd& LeftScaling()\n    {\n      return m_left;\n    }\n    \n    /** Get the vector to scale the columns of the matrix \n     */\n    VectorXd& RightScaling()\n    {\n      return m_right;\n    }\n    \n    /** Set the tolerance for the convergence of the iterative scaling algorithm\n     */\n    void setTolerance(double tol)\n    {\n      m_tol = tol; \n    }\n      \n  protected:\n    \n    void init()\n    {\n      m_tol = 1e-10;\n      m_maxits = 5;\n      m_isInitialized = false;\n    }\n    \n    MatrixType m_matrix;\n    mutable ComputationInfo m_info; \n    bool m_isInitialized; \n    VectorXd m_left; // Left scaling vector\n    VectorXd m_right; // m_right scaling vector\n    double m_tol; \n    int m_maxits; // Maximum number of iterations allowed\n};\n}\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/KroneckerProduct/KroneckerTensorProduct.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2011 Kolja Brix <brix@igpm.rwth-aachen.de>\n// Copyright (C) 2011 Andreas Platen <andiplaten@gmx.de>\n// Copyright (C) 2012 Chen-Pang He <jdh8@ms63.hinet.net>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef KRONECKER_TENSOR_PRODUCT_H\n#define KRONECKER_TENSOR_PRODUCT_H\n\nnamespace Eigen {\n\n/*!\n * \\ingroup KroneckerProduct_Module\n *\n * \\brief The base class of dense and sparse Kronecker product.\n *\n * \\tparam Derived is the derived type.\n */\ntemplate<typename Derived>\nclass KroneckerProductBase : public ReturnByValue<Derived>\n{\n  private:\n    typedef typename internal::traits<Derived> Traits;\n    typedef typename Traits::Scalar Scalar;\n\n  protected:\n    typedef typename Traits::Lhs Lhs;\n    typedef typename Traits::Rhs Rhs;\n\n  public:\n    /*! \\brief Constructor. */\n    KroneckerProductBase(const Lhs& A, const Rhs& B)\n      : m_A(A), m_B(B)\n    {}\n\n    inline Index rows() const { return m_A.rows() * m_B.rows(); }\n    inline Index cols() const { return m_A.cols() * m_B.cols(); }\n\n    /*!\n     * This overrides ReturnByValue::coeff because this function is\n     * efficient enough.\n     */\n    Scalar coeff(Index row, Index col) const\n    {\n      return m_A.coeff(row / m_B.rows(), col / m_B.cols()) *\n             m_B.coeff(row % m_B.rows(), col % m_B.cols());\n    }\n\n    /*!\n     * This overrides ReturnByValue::coeff because this function is\n     * efficient enough.\n     */\n    Scalar coeff(Index i) const\n    {\n      EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived);\n      return m_A.coeff(i / m_A.size()) * m_B.coeff(i % m_A.size());\n    }\n\n  protected:\n    typename Lhs::Nested m_A;\n    typename Rhs::Nested m_B;\n};\n\n/*!\n * \\ingroup KroneckerProduct_Module\n *\n * \\brief Kronecker tensor product helper class for dense matrices\n *\n * This class is the return value of kroneckerProduct(MatrixBase,\n * MatrixBase). Use the function rather than construct this class\n * directly to avoid specifying template prarameters.\n *\n * \\tparam Lhs  Type of the left-hand side, a matrix expression.\n * \\tparam Rhs  Type of the rignt-hand side, a matrix expression.\n */\ntemplate<typename Lhs, typename Rhs>\nclass KroneckerProduct : public KroneckerProductBase<KroneckerProduct<Lhs,Rhs> >\n{\n  private:\n    typedef KroneckerProductBase<KroneckerProduct> Base;\n    using Base::m_A;\n    using Base::m_B;\n\n  public:\n    /*! \\brief Constructor. */\n    KroneckerProduct(const Lhs& A, const Rhs& B)\n      : Base(A, B)\n    {}\n\n    /*! \\brief Evaluate the Kronecker tensor product. */\n    template<typename Dest> void evalTo(Dest& dst) const;\n};\n\n/*!\n * \\ingroup KroneckerProduct_Module\n *\n * \\brief Kronecker tensor product helper class for sparse matrices\n *\n * If at least one of the operands is a sparse matrix expression,\n * then this class is returned and evaluates into a sparse matrix.\n *\n * This class is the return value of kroneckerProduct(EigenBase,\n * EigenBase). Use the function rather than construct this class\n * directly to avoid specifying template prarameters.\n *\n * \\tparam Lhs  Type of the left-hand side, a matrix expression.\n * \\tparam Rhs  Type of the rignt-hand side, a matrix expression.\n */\ntemplate<typename Lhs, typename Rhs>\nclass KroneckerProductSparse : public KroneckerProductBase<KroneckerProductSparse<Lhs,Rhs> >\n{\n  private:\n    typedef KroneckerProductBase<KroneckerProductSparse> Base;\n    using Base::m_A;\n    using Base::m_B;\n\n  public:\n    /*! \\brief Constructor. */\n    KroneckerProductSparse(const Lhs& A, const Rhs& B)\n      : Base(A, B)\n    {}\n\n    /*! \\brief Evaluate the Kronecker tensor product. */\n    template<typename Dest> void evalTo(Dest& dst) const;\n};\n\ntemplate<typename Lhs, typename Rhs>\ntemplate<typename Dest>\nvoid KroneckerProduct<Lhs,Rhs>::evalTo(Dest& dst) const\n{\n  const int BlockRows = Rhs::RowsAtCompileTime,\n            BlockCols = Rhs::ColsAtCompileTime;\n  const Index Br = m_B.rows(),\n              Bc = m_B.cols();\n  for (Index i=0; i < m_A.rows(); ++i)\n    for (Index j=0; j < m_A.cols(); ++j)\n      Block<Dest,BlockRows,BlockCols>(dst,i*Br,j*Bc,Br,Bc) = m_A.coeff(i,j) * m_B;\n}\n\ntemplate<typename Lhs, typename Rhs>\ntemplate<typename Dest>\nvoid KroneckerProductSparse<Lhs,Rhs>::evalTo(Dest& dst) const\n{\n  Index Br = m_B.rows(), Bc = m_B.cols();\n  dst.resize(this->rows(), this->cols());\n  dst.resizeNonZeros(0);\n  \n  // 1 - evaluate the operands if needed:\n  typedef typename internal::nested_eval<Lhs,Dynamic>::type Lhs1;\n  typedef typename internal::remove_all<Lhs1>::type Lhs1Cleaned;\n  const Lhs1 lhs1(m_A);\n  typedef typename internal::nested_eval<Rhs,Dynamic>::type Rhs1;\n  typedef typename internal::remove_all<Rhs1>::type Rhs1Cleaned;\n  const Rhs1 rhs1(m_B);\n    \n  // 2 - construct respective iterators\n  typedef Eigen::InnerIterator<Lhs1Cleaned> LhsInnerIterator;\n  typedef Eigen::InnerIterator<Rhs1Cleaned> RhsInnerIterator;\n  \n  // compute number of non-zeros per innervectors of dst\n  {\n    // TODO VectorXi is not necessarily big enough!\n    VectorXi nnzA = VectorXi::Zero(Dest::IsRowMajor ? m_A.rows() : m_A.cols());\n    for (Index kA=0; kA < m_A.outerSize(); ++kA)\n      for (LhsInnerIterator itA(lhs1,kA); itA; ++itA)\n        nnzA(Dest::IsRowMajor ? itA.row() : itA.col())++;\n      \n    VectorXi nnzB = VectorXi::Zero(Dest::IsRowMajor ? m_B.rows() : m_B.cols());\n    for (Index kB=0; kB < m_B.outerSize(); ++kB)\n      for (RhsInnerIterator itB(rhs1,kB); itB; ++itB)\n        nnzB(Dest::IsRowMajor ? itB.row() : itB.col())++;\n    \n    Matrix<int,Dynamic,Dynamic,ColMajor> nnzAB = nnzB * nnzA.transpose();\n    dst.reserve(VectorXi::Map(nnzAB.data(), nnzAB.size()));\n  }\n\n  for (Index kA=0; kA < m_A.outerSize(); ++kA)\n  {\n    for (Index kB=0; kB < m_B.outerSize(); ++kB)\n    {\n      for (LhsInnerIterator itA(lhs1,kA); itA; ++itA)\n      {\n        for (RhsInnerIterator itB(rhs1,kB); itB; ++itB)\n        {\n          Index i = itA.row() * Br + itB.row(),\n                j = itA.col() * Bc + itB.col();\n          dst.insert(i,j) = itA.value() * itB.value();\n        }\n      }\n    }\n  }\n}\n\nnamespace internal {\n\ntemplate<typename _Lhs, typename _Rhs>\nstruct traits<KroneckerProduct<_Lhs,_Rhs> >\n{\n  typedef typename remove_all<_Lhs>::type Lhs;\n  typedef typename remove_all<_Rhs>::type Rhs;\n  typedef typename ScalarBinaryOpTraits<typename Lhs::Scalar, typename Rhs::Scalar>::ReturnType Scalar;\n  typedef typename promote_index_type<typename Lhs::StorageIndex, typename Rhs::StorageIndex>::type StorageIndex;\n\n  enum {\n    Rows = size_at_compile_time<traits<Lhs>::RowsAtCompileTime, traits<Rhs>::RowsAtCompileTime>::ret,\n    Cols = size_at_compile_time<traits<Lhs>::ColsAtCompileTime, traits<Rhs>::ColsAtCompileTime>::ret,\n    MaxRows = size_at_compile_time<traits<Lhs>::MaxRowsAtCompileTime, traits<Rhs>::MaxRowsAtCompileTime>::ret,\n    MaxCols = size_at_compile_time<traits<Lhs>::MaxColsAtCompileTime, traits<Rhs>::MaxColsAtCompileTime>::ret\n  };\n\n  typedef Matrix<Scalar,Rows,Cols> ReturnType;\n};\n\ntemplate<typename _Lhs, typename _Rhs>\nstruct traits<KroneckerProductSparse<_Lhs,_Rhs> >\n{\n  typedef MatrixXpr XprKind;\n  typedef typename remove_all<_Lhs>::type Lhs;\n  typedef typename remove_all<_Rhs>::type Rhs;\n  typedef typename ScalarBinaryOpTraits<typename Lhs::Scalar, typename Rhs::Scalar>::ReturnType Scalar;\n  typedef typename cwise_promote_storage_type<typename traits<Lhs>::StorageKind, typename traits<Rhs>::StorageKind, scalar_product_op<typename Lhs::Scalar, typename Rhs::Scalar> >::ret StorageKind;\n  typedef typename promote_index_type<typename Lhs::StorageIndex, typename Rhs::StorageIndex>::type StorageIndex;\n\n  enum {\n    LhsFlags = Lhs::Flags,\n    RhsFlags = Rhs::Flags,\n\n    RowsAtCompileTime = size_at_compile_time<traits<Lhs>::RowsAtCompileTime, traits<Rhs>::RowsAtCompileTime>::ret,\n    ColsAtCompileTime = size_at_compile_time<traits<Lhs>::ColsAtCompileTime, traits<Rhs>::ColsAtCompileTime>::ret,\n    MaxRowsAtCompileTime = size_at_compile_time<traits<Lhs>::MaxRowsAtCompileTime, traits<Rhs>::MaxRowsAtCompileTime>::ret,\n    MaxColsAtCompileTime = size_at_compile_time<traits<Lhs>::MaxColsAtCompileTime, traits<Rhs>::MaxColsAtCompileTime>::ret,\n\n    EvalToRowMajor = (LhsFlags & RhsFlags & RowMajorBit),\n    RemovedBits = ~(EvalToRowMajor ? 0 : RowMajorBit),\n\n    Flags = ((LhsFlags | RhsFlags) & HereditaryBits & RemovedBits)\n          | EvalBeforeNestingBit,\n    CoeffReadCost = HugeCost\n  };\n\n  typedef SparseMatrix<Scalar, 0, StorageIndex> ReturnType;\n};\n\n} // end namespace internal\n\n/*!\n * \\ingroup KroneckerProduct_Module\n *\n * Computes Kronecker tensor product of two dense matrices\n *\n * \\warning If you want to replace a matrix by its Kronecker product\n *          with some matrix, do \\b NOT do this:\n * \\code\n * A = kroneckerProduct(A,B); // bug!!! caused by aliasing effect\n * \\endcode\n * instead, use eval() to work around this:\n * \\code\n * A = kroneckerProduct(A,B).eval();\n * \\endcode\n *\n * \\param a  Dense matrix a\n * \\param b  Dense matrix b\n * \\return   Kronecker tensor product of a and b\n */\ntemplate<typename A, typename B>\nKroneckerProduct<A,B> kroneckerProduct(const MatrixBase<A>& a, const MatrixBase<B>& b)\n{\n  return KroneckerProduct<A, B>(a.derived(), b.derived());\n}\n\n/*!\n * \\ingroup KroneckerProduct_Module\n *\n * Computes Kronecker tensor product of two matrices, at least one of\n * which is sparse\n *\n * \\warning If you want to replace a matrix by its Kronecker product\n *          with some matrix, do \\b NOT do this:\n * \\code\n * A = kroneckerProduct(A,B); // bug!!! caused by aliasing effect\n * \\endcode\n * instead, use eval() to work around this:\n * \\code\n * A = kroneckerProduct(A,B).eval();\n * \\endcode\n *\n * \\param a  Dense/sparse matrix a\n * \\param b  Dense/sparse matrix b\n * \\return   Kronecker tensor product of a and b, stored in a sparse\n *           matrix\n */\ntemplate<typename A, typename B>\nKroneckerProductSparse<A,B> kroneckerProduct(const EigenBase<A>& a, const EigenBase<B>& b)\n{\n  return KroneckerProductSparse<A,B>(a.derived(), b.derived());\n}\n\n} // end namespace Eigen\n\n#endif // KRONECKER_TENSOR_PRODUCT_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/LevenbergMarquardt/CopyrightMINPACK.txt",
    "content": "Minpack Copyright Notice (1999) University of Chicago.  All rights reserved\n\nRedistribution and use in source and binary forms, with or\nwithout modification, are permitted provided that the\nfollowing conditions are met:\n\n1. Redistributions of source code must retain the above\ncopyright notice, this list of conditions and the following\ndisclaimer.\n\n2. Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following\ndisclaimer in the documentation and/or other materials\nprovided with the distribution.\n\n3. The end-user documentation included with the\nredistribution, if any, must include the following\nacknowledgment:\n\n   \"This product includes software developed by the\n   University of Chicago, as Operator of Argonne National\n   Laboratory.\n\nAlternately, this acknowledgment may appear in the software\nitself, if and wherever such third-party acknowledgments\nnormally appear.\n\n4. WARRANTY DISCLAIMER. THE SOFTWARE IS SUPPLIED \"AS IS\"\nWITHOUT WARRANTY OF ANY KIND. THE COPYRIGHT HOLDER, THE\nUNITED STATES, THE UNITED STATES DEPARTMENT OF ENERGY, AND\nTHEIR EMPLOYEES: (1) DISCLAIM ANY WARRANTIES, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE\nOR NON-INFRINGEMENT, (2) DO NOT ASSUME ANY LEGAL LIABILITY\nOR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR\nUSEFULNESS OF THE SOFTWARE, (3) DO NOT REPRESENT THAT USE OF\nTHE SOFTWARE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS, (4)\nDO NOT WARRANT THAT THE SOFTWARE WILL FUNCTION\nUNINTERRUPTED, THAT IT IS ERROR-FREE OR THAT ANY ERRORS WILL\nBE CORRECTED.\n\n5. LIMITATION OF LIABILITY. IN NO EVENT WILL THE COPYRIGHT\nHOLDER, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF\nENERGY, OR THEIR EMPLOYEES: BE LIABLE FOR ANY INDIRECT,\nINCIDENTAL, CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES OF\nANY KIND OR NATURE, INCLUDING BUT NOT LIMITED TO LOSS OF\nPROFITS OR LOSS OF DATA, FOR ANY REASON WHATSOEVER, WHETHER\nSUCH LIABILITY IS ASSERTED ON THE BASIS OF CONTRACT, TORT\n(INCLUDING NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE,\nEVEN IF ANY OF SAID PARTIES HAS BEEN WARNED OF THE\nPOSSIBILITY OF SUCH LOSS OR DAMAGES.\n\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/LevenbergMarquardt/LMcovar.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This code initially comes from MINPACK whose original authors are:\n// Copyright Jorge More - Argonne National Laboratory\n// Copyright Burt Garbow - Argonne National Laboratory\n// Copyright Ken Hillstrom - Argonne National Laboratory\n//\n// This Source Code Form is subject to the terms of the Minpack license\n// (a BSD-like license) described in the campaigned CopyrightMINPACK.txt file.\n\n#ifndef EIGEN_LMCOVAR_H\n#define EIGEN_LMCOVAR_H\n\nnamespace Eigen { \n\nnamespace internal {\n\ntemplate <typename Scalar>\nvoid covar(\n        Matrix< Scalar, Dynamic, Dynamic > &r,\n        const VectorXi& ipvt,\n        Scalar tol = std::sqrt(NumTraits<Scalar>::epsilon()) )\n{\n    using std::abs;\n    /* Local variables */\n    Index i, j, k, l, ii, jj;\n    bool sing;\n    Scalar temp;\n\n    /* Function Body */\n    const Index n = r.cols();\n    const Scalar tolr = tol * abs(r(0,0));\n    Matrix< Scalar, Dynamic, 1 > wa(n);\n    eigen_assert(ipvt.size()==n);\n\n    /* form the inverse of r in the full upper triangle of r. */\n    l = -1;\n    for (k = 0; k < n; ++k)\n        if (abs(r(k,k)) > tolr) {\n            r(k,k) = 1. / r(k,k);\n            for (j = 0; j <= k-1; ++j) {\n                temp = r(k,k) * r(j,k);\n                r(j,k) = 0.;\n                r.col(k).head(j+1) -= r.col(j).head(j+1) * temp;\n            }\n            l = k;\n        }\n\n    /* form the full upper triangle of the inverse of (r transpose)*r */\n    /* in the full upper triangle of r. */\n    for (k = 0; k <= l; ++k) {\n        for (j = 0; j <= k-1; ++j)\n            r.col(j).head(j+1) += r.col(k).head(j+1) * r(j,k);\n        r.col(k).head(k+1) *= r(k,k);\n    }\n\n    /* form the full lower triangle of the covariance matrix */\n    /* in the strict lower triangle of r and in wa. */\n    for (j = 0; j < n; ++j) {\n        jj = ipvt[j];\n        sing = j > l;\n        for (i = 0; i <= j; ++i) {\n            if (sing)\n                r(i,j) = 0.;\n            ii = ipvt[i];\n            if (ii > jj)\n                r(ii,jj) = r(i,j);\n            if (ii < jj)\n                r(jj,ii) = r(i,j);\n        }\n        wa[jj] = r(j,j);\n    }\n\n    /* symmetrize the covariance matrix in r. */\n    r.topLeftCorner(n,n).template triangularView<StrictlyUpper>() = r.topLeftCorner(n,n).transpose();\n    r.diagonal() = wa;\n}\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_LMCOVAR_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/LevenbergMarquardt/LMonestep.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Thomas Capricelli <orzel@freehackers.org>\n//\n// This code initially comes from MINPACK whose original authors are:\n// Copyright Jorge More - Argonne National Laboratory\n// Copyright Burt Garbow - Argonne National Laboratory\n// Copyright Ken Hillstrom - Argonne National Laboratory\n//\n// This Source Code Form is subject to the terms of the Minpack license\n// (a BSD-like license) described in the campaigned CopyrightMINPACK.txt file.\n\n#ifndef EIGEN_LMONESTEP_H\n#define EIGEN_LMONESTEP_H\n\nnamespace Eigen {\n\ntemplate<typename FunctorType>\nLevenbergMarquardtSpace::Status\nLevenbergMarquardt<FunctorType>::minimizeOneStep(FVectorType  &x)\n{\n  using std::abs;\n  using std::sqrt;\n  RealScalar temp, temp1,temp2; \n  RealScalar ratio; \n  RealScalar pnorm, xnorm, fnorm1, actred, dirder, prered;\n  eigen_assert(x.size()==n); // check the caller is not cheating us\n\n  temp = 0.0; xnorm = 0.0;\n  /* calculate the jacobian matrix. */\n  Index df_ret = m_functor.df(x, m_fjac);\n  if (df_ret<0)\n      return LevenbergMarquardtSpace::UserAsked;\n  if (df_ret>0)\n      // numerical diff, we evaluated the function df_ret times\n      m_nfev += df_ret;\n  else m_njev++;\n\n  /* compute the qr factorization of the jacobian. */\n  for (int j = 0; j < x.size(); ++j)\n    m_wa2(j) = m_fjac.col(j).blueNorm();\n  QRSolver qrfac(m_fjac);\n  if(qrfac.info() != Success) {\n    m_info = NumericalIssue;\n    return LevenbergMarquardtSpace::ImproperInputParameters;\n  }\n  // Make a copy of the first factor with the associated permutation\n  m_rfactor = qrfac.matrixR();\n  m_permutation = (qrfac.colsPermutation());\n\n  /* on the first iteration and if external scaling is not used, scale according */\n  /* to the norms of the columns of the initial jacobian. */\n  if (m_iter == 1) {\n      if (!m_useExternalScaling)\n          for (Index j = 0; j < n; ++j)\n              m_diag[j] = (m_wa2[j]==0.)? 1. : m_wa2[j];\n\n      /* on the first iteration, calculate the norm of the scaled x */\n      /* and initialize the step bound m_delta. */\n      xnorm = m_diag.cwiseProduct(x).stableNorm();\n      m_delta = m_factor * xnorm;\n      if (m_delta == 0.)\n          m_delta = m_factor;\n  }\n\n  /* form (q transpose)*m_fvec and store the first n components in */\n  /* m_qtf. */\n  m_wa4 = m_fvec;\n  m_wa4 = qrfac.matrixQ().adjoint() * m_fvec; \n  m_qtf = m_wa4.head(n);\n\n  /* compute the norm of the scaled gradient. */\n  m_gnorm = 0.;\n  if (m_fnorm != 0.)\n      for (Index j = 0; j < n; ++j)\n          if (m_wa2[m_permutation.indices()[j]] != 0.)\n              m_gnorm = (std::max)(m_gnorm, abs( m_rfactor.col(j).head(j+1).dot(m_qtf.head(j+1)/m_fnorm) / m_wa2[m_permutation.indices()[j]]));\n\n  /* test for convergence of the gradient norm. */\n  if (m_gnorm <= m_gtol) {\n    m_info = Success;\n    return LevenbergMarquardtSpace::CosinusTooSmall;\n  }\n\n  /* rescale if necessary. */\n  if (!m_useExternalScaling)\n      m_diag = m_diag.cwiseMax(m_wa2);\n\n  do {\n    /* determine the levenberg-marquardt parameter. */\n    internal::lmpar2(qrfac, m_diag, m_qtf, m_delta, m_par, m_wa1);\n\n    /* store the direction p and x + p. calculate the norm of p. */\n    m_wa1 = -m_wa1;\n    m_wa2 = x + m_wa1;\n    pnorm = m_diag.cwiseProduct(m_wa1).stableNorm();\n\n    /* on the first iteration, adjust the initial step bound. */\n    if (m_iter == 1)\n        m_delta = (std::min)(m_delta,pnorm);\n\n    /* evaluate the function at x + p and calculate its norm. */\n    if ( m_functor(m_wa2, m_wa4) < 0)\n        return LevenbergMarquardtSpace::UserAsked;\n    ++m_nfev;\n    fnorm1 = m_wa4.stableNorm();\n\n    /* compute the scaled actual reduction. */\n    actred = -1.;\n    if (Scalar(.1) * fnorm1 < m_fnorm)\n        actred = 1. - numext::abs2(fnorm1 / m_fnorm);\n\n    /* compute the scaled predicted reduction and */\n    /* the scaled directional derivative. */\n    m_wa3 = m_rfactor.template triangularView<Upper>() * (m_permutation.inverse() *m_wa1);\n    temp1 = numext::abs2(m_wa3.stableNorm() / m_fnorm);\n    temp2 = numext::abs2(sqrt(m_par) * pnorm / m_fnorm);\n    prered = temp1 + temp2 / Scalar(.5);\n    dirder = -(temp1 + temp2);\n\n    /* compute the ratio of the actual to the predicted */\n    /* reduction. */\n    ratio = 0.;\n    if (prered != 0.)\n        ratio = actred / prered;\n\n    /* update the step bound. */\n    if (ratio <= Scalar(.25)) {\n        if (actred >= 0.)\n            temp = RealScalar(.5);\n        if (actred < 0.)\n            temp = RealScalar(.5) * dirder / (dirder + RealScalar(.5) * actred);\n        if (RealScalar(.1) * fnorm1 >= m_fnorm || temp < RealScalar(.1))\n            temp = Scalar(.1);\n        /* Computing MIN */\n        m_delta = temp * (std::min)(m_delta, pnorm / RealScalar(.1));\n        m_par /= temp;\n    } else if (!(m_par != 0. && ratio < RealScalar(.75))) {\n        m_delta = pnorm / RealScalar(.5);\n        m_par = RealScalar(.5) * m_par;\n    }\n\n    /* test for successful iteration. */\n    if (ratio >= RealScalar(1e-4)) {\n        /* successful iteration. update x, m_fvec, and their norms. */\n        x = m_wa2;\n        m_wa2 = m_diag.cwiseProduct(x);\n        m_fvec = m_wa4;\n        xnorm = m_wa2.stableNorm();\n        m_fnorm = fnorm1;\n        ++m_iter;\n    }\n\n    /* tests for convergence. */\n    if (abs(actred) <= m_ftol && prered <= m_ftol && Scalar(.5) * ratio <= 1. && m_delta <= m_xtol * xnorm)\n    {\n       m_info = Success;\n      return LevenbergMarquardtSpace::RelativeErrorAndReductionTooSmall;\n    }\n    if (abs(actred) <= m_ftol && prered <= m_ftol && Scalar(.5) * ratio <= 1.) \n    {\n      m_info = Success;\n      return LevenbergMarquardtSpace::RelativeReductionTooSmall;\n    }\n    if (m_delta <= m_xtol * xnorm)\n    {\n      m_info = Success;\n      return LevenbergMarquardtSpace::RelativeErrorTooSmall;\n    }\n\n    /* tests for termination and stringent tolerances. */\n    if (m_nfev >= m_maxfev) \n    {\n      m_info = NoConvergence;\n      return LevenbergMarquardtSpace::TooManyFunctionEvaluation;\n    }\n    if (abs(actred) <= NumTraits<Scalar>::epsilon() && prered <= NumTraits<Scalar>::epsilon() && Scalar(.5) * ratio <= 1.)\n    {\n      m_info = Success;\n      return LevenbergMarquardtSpace::FtolTooSmall;\n    }\n    if (m_delta <= NumTraits<Scalar>::epsilon() * xnorm) \n    {\n      m_info = Success;\n      return LevenbergMarquardtSpace::XtolTooSmall;\n    }\n    if (m_gnorm <= NumTraits<Scalar>::epsilon())\n    {\n      m_info = Success;\n      return LevenbergMarquardtSpace::GtolTooSmall;\n    }\n\n  } while (ratio < Scalar(1e-4));\n\n  return LevenbergMarquardtSpace::Running;\n}\n\n  \n} // end namespace Eigen\n\n#endif // EIGEN_LMONESTEP_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/LevenbergMarquardt/LMpar.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This code initially comes from MINPACK whose original authors are:\n// Copyright Jorge More - Argonne National Laboratory\n// Copyright Burt Garbow - Argonne National Laboratory\n// Copyright Ken Hillstrom - Argonne National Laboratory\n//\n// This Source Code Form is subject to the terms of the Minpack license\n// (a BSD-like license) described in the campaigned CopyrightMINPACK.txt file.\n\n#ifndef EIGEN_LMPAR_H\n#define EIGEN_LMPAR_H\n\nnamespace Eigen {\n\nnamespace internal {\n  \n  template <typename QRSolver, typename VectorType>\n    void lmpar2(\n    const QRSolver &qr,\n    const VectorType  &diag,\n    const VectorType  &qtb,\n    typename VectorType::Scalar m_delta,\n    typename VectorType::Scalar &par,\n    VectorType  &x)\n\n  {\n    using std::sqrt;\n    using std::abs;\n    typedef typename QRSolver::MatrixType MatrixType;\n    typedef typename QRSolver::Scalar Scalar;\n//    typedef typename QRSolver::StorageIndex StorageIndex;\n\n    /* Local variables */\n    Index j;\n    Scalar fp;\n    Scalar parc, parl;\n    Index iter;\n    Scalar temp, paru;\n    Scalar gnorm;\n    Scalar dxnorm;\n    \n    // Make a copy of the triangular factor. \n    // This copy is modified during call the qrsolv\n    MatrixType s;\n    s = qr.matrixR();\n\n    /* Function Body */\n    const Scalar dwarf = (std::numeric_limits<Scalar>::min)();\n    const Index n = qr.matrixR().cols();\n    eigen_assert(n==diag.size());\n    eigen_assert(n==qtb.size());\n\n    VectorType  wa1, wa2;\n\n    /* compute and store in x the gauss-newton direction. if the */\n    /* jacobian is rank-deficient, obtain a least squares solution. */\n\n    //    const Index rank = qr.nonzeroPivots(); // exactly double(0.)\n    const Index rank = qr.rank(); // use a threshold\n    wa1 = qtb;\n    wa1.tail(n-rank).setZero();\n    //FIXME There is no solve in place for sparse triangularView\n    wa1.head(rank) = s.topLeftCorner(rank,rank).template triangularView<Upper>().solve(qtb.head(rank));\n\n    x = qr.colsPermutation()*wa1;\n\n    /* initialize the iteration counter. */\n    /* evaluate the function at the origin, and test */\n    /* for acceptance of the gauss-newton direction. */\n    iter = 0;\n    wa2 = diag.cwiseProduct(x);\n    dxnorm = wa2.blueNorm();\n    fp = dxnorm - m_delta;\n    if (fp <= Scalar(0.1) * m_delta) {\n      par = 0;\n      return;\n    }\n\n    /* if the jacobian is not rank deficient, the newton */\n    /* step provides a lower bound, parl, for the zero of */\n    /* the function. otherwise set this bound to zero. */\n    parl = 0.;\n    if (rank==n) {\n      wa1 = qr.colsPermutation().inverse() *  diag.cwiseProduct(wa2)/dxnorm;\n      s.topLeftCorner(n,n).transpose().template triangularView<Lower>().solveInPlace(wa1);\n      temp = wa1.blueNorm();\n      parl = fp / m_delta / temp / temp;\n    }\n\n    /* calculate an upper bound, paru, for the zero of the function. */\n    for (j = 0; j < n; ++j)\n      wa1[j] = s.col(j).head(j+1).dot(qtb.head(j+1)) / diag[qr.colsPermutation().indices()(j)];\n\n    gnorm = wa1.stableNorm();\n    paru = gnorm / m_delta;\n    if (paru == 0.)\n      paru = dwarf / (std::min)(m_delta,Scalar(0.1));\n\n    /* if the input par lies outside of the interval (parl,paru), */\n    /* set par to the closer endpoint. */\n    par = (std::max)(par,parl);\n    par = (std::min)(par,paru);\n    if (par == 0.)\n      par = gnorm / dxnorm;\n\n    /* beginning of an iteration. */\n    while (true) {\n      ++iter;\n\n      /* evaluate the function at the current value of par. */\n      if (par == 0.)\n        par = (std::max)(dwarf,Scalar(.001) * paru); /* Computing MAX */\n      wa1 = sqrt(par)* diag;\n\n      VectorType sdiag(n);\n      lmqrsolv(s, qr.colsPermutation(), wa1, qtb, x, sdiag);\n\n      wa2 = diag.cwiseProduct(x);\n      dxnorm = wa2.blueNorm();\n      temp = fp;\n      fp = dxnorm - m_delta;\n\n      /* if the function is small enough, accept the current value */\n      /* of par. also test for the exceptional cases where parl */\n      /* is zero or the number of iterations has reached 10. */\n      if (abs(fp) <= Scalar(0.1) * m_delta || (parl == 0. && fp <= temp && temp < 0.) || iter == 10)\n        break;\n\n      /* compute the newton correction. */\n      wa1 = qr.colsPermutation().inverse() * diag.cwiseProduct(wa2/dxnorm);\n      // we could almost use this here, but the diagonal is outside qr, in sdiag[]\n      for (j = 0; j < n; ++j) {\n        wa1[j] /= sdiag[j];\n        temp = wa1[j];\n        for (Index i = j+1; i < n; ++i)\n          wa1[i] -= s.coeff(i,j) * temp;\n      }\n      temp = wa1.blueNorm();\n      parc = fp / m_delta / temp / temp;\n\n      /* depending on the sign of the function, update parl or paru. */\n      if (fp > 0.)\n        parl = (std::max)(parl,par);\n      if (fp < 0.)\n        paru = (std::min)(paru,par);\n\n      /* compute an improved estimate for par. */\n      par = (std::max)(parl,par+parc);\n    }\n    if (iter == 0)\n      par = 0.;\n    return;\n  }\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_LMPAR_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/LevenbergMarquardt/LMqrsolv.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Thomas Capricelli <orzel@freehackers.org>\n// Copyright (C) 2012 Desire Nuentsa <desire.nuentsa_wakam@inria.fr>\n//\n// This code initially comes from MINPACK whose original authors are:\n// Copyright Jorge More - Argonne National Laboratory\n// Copyright Burt Garbow - Argonne National Laboratory\n// Copyright Ken Hillstrom - Argonne National Laboratory\n//\n// This Source Code Form is subject to the terms of the Minpack license\n// (a BSD-like license) described in the campaigned CopyrightMINPACK.txt file.\n\n#ifndef EIGEN_LMQRSOLV_H\n#define EIGEN_LMQRSOLV_H\n\nnamespace Eigen { \n\nnamespace internal {\n\ntemplate <typename Scalar,int Rows, int Cols, typename PermIndex>\nvoid lmqrsolv(\n  Matrix<Scalar,Rows,Cols> &s,\n  const PermutationMatrix<Dynamic,Dynamic,PermIndex> &iPerm,\n  const Matrix<Scalar,Dynamic,1> &diag,\n  const Matrix<Scalar,Dynamic,1> &qtb,\n  Matrix<Scalar,Dynamic,1> &x,\n  Matrix<Scalar,Dynamic,1> &sdiag)\n{\n    /* Local variables */\n    Index i, j, k;\n    Scalar temp;\n    Index n = s.cols();\n    Matrix<Scalar,Dynamic,1>  wa(n);\n    JacobiRotation<Scalar> givens;\n\n    /* Function Body */\n    // the following will only change the lower triangular part of s, including\n    // the diagonal, though the diagonal is restored afterward\n\n    /*     copy r and (q transpose)*b to preserve input and initialize s. */\n    /*     in particular, save the diagonal elements of r in x. */\n    x = s.diagonal();\n    wa = qtb;\n    \n   \n    s.topLeftCorner(n,n).template triangularView<StrictlyLower>() = s.topLeftCorner(n,n).transpose();\n    /*     eliminate the diagonal matrix d using a givens rotation. */\n    for (j = 0; j < n; ++j) {\n\n        /*        prepare the row of d to be eliminated, locating the */\n        /*        diagonal element using p from the qr factorization. */\n        const PermIndex l = iPerm.indices()(j);\n        if (diag[l] == 0.)\n            break;\n        sdiag.tail(n-j).setZero();\n        sdiag[j] = diag[l];\n\n        /*        the transformations to eliminate the row of d */\n        /*        modify only a single element of (q transpose)*b */\n        /*        beyond the first n, which is initially zero. */\n        Scalar qtbpj = 0.;\n        for (k = j; k < n; ++k) {\n            /*           determine a givens rotation which eliminates the */\n            /*           appropriate element in the current row of d. */\n            givens.makeGivens(-s(k,k), sdiag[k]);\n\n            /*           compute the modified diagonal element of r and */\n            /*           the modified element of ((q transpose)*b,0). */\n            s(k,k) = givens.c() * s(k,k) + givens.s() * sdiag[k];\n            temp = givens.c() * wa[k] + givens.s() * qtbpj;\n            qtbpj = -givens.s() * wa[k] + givens.c() * qtbpj;\n            wa[k] = temp;\n\n            /*           accumulate the transformation in the row of s. */\n            for (i = k+1; i<n; ++i) {\n                temp = givens.c() * s(i,k) + givens.s() * sdiag[i];\n                sdiag[i] = -givens.s() * s(i,k) + givens.c() * sdiag[i];\n                s(i,k) = temp;\n            }\n        }\n    }\n  \n    /*     solve the triangular system for z. if the system is */\n    /*     singular, then obtain a least squares solution. */\n    Index nsing;\n    for(nsing=0; nsing<n && sdiag[nsing]!=0; nsing++) {}\n\n    wa.tail(n-nsing).setZero();\n    s.topLeftCorner(nsing, nsing).transpose().template triangularView<Upper>().solveInPlace(wa.head(nsing));\n  \n    // restore\n    sdiag = s.diagonal();\n    s.diagonal() = x;\n\n    /* permute the components of z back to components of x. */\n    x = iPerm * wa; \n}\n\ntemplate <typename Scalar, int _Options, typename Index>\nvoid lmqrsolv(\n  SparseMatrix<Scalar,_Options,Index> &s,\n  const PermutationMatrix<Dynamic,Dynamic> &iPerm,\n  const Matrix<Scalar,Dynamic,1> &diag,\n  const Matrix<Scalar,Dynamic,1> &qtb,\n  Matrix<Scalar,Dynamic,1> &x,\n  Matrix<Scalar,Dynamic,1> &sdiag)\n{\n  /* Local variables */\n  typedef SparseMatrix<Scalar,RowMajor,Index> FactorType;\n    Index i, j, k, l;\n    Scalar temp;\n    Index n = s.cols();\n    Matrix<Scalar,Dynamic,1>  wa(n);\n    JacobiRotation<Scalar> givens;\n\n    /* Function Body */\n    // the following will only change the lower triangular part of s, including\n    // the diagonal, though the diagonal is restored afterward\n\n    /*     copy r and (q transpose)*b to preserve input and initialize R. */\n    wa = qtb;\n    FactorType R(s);\n    // Eliminate the diagonal matrix d using a givens rotation\n    for (j = 0; j < n; ++j)\n    {\n      // Prepare the row of d to be eliminated, locating the \n      // diagonal element using p from the qr factorization\n      l = iPerm.indices()(j);\n      if (diag(l) == Scalar(0)) \n        break; \n      sdiag.tail(n-j).setZero();\n      sdiag[j] = diag[l];\n      // the transformations to eliminate the row of d\n      // modify only a single element of (q transpose)*b\n      // beyond the first n, which is initially zero. \n      \n      Scalar qtbpj = 0; \n      // Browse the nonzero elements of row j of the upper triangular s\n      for (k = j; k < n; ++k)\n      {\n        typename FactorType::InnerIterator itk(R,k);\n        for (; itk; ++itk){\n          if (itk.index() < k) continue;\n          else break;\n        }\n        //At this point, we have the diagonal element R(k,k)\n        // Determine a givens rotation which eliminates \n        // the appropriate element in the current row of d\n        givens.makeGivens(-itk.value(), sdiag(k));\n        \n        // Compute the modified diagonal element of r and \n        // the modified element of ((q transpose)*b,0).\n        itk.valueRef() = givens.c() * itk.value() + givens.s() * sdiag(k);\n        temp = givens.c() * wa(k) + givens.s() * qtbpj; \n        qtbpj = -givens.s() * wa(k) + givens.c() * qtbpj;\n        wa(k) = temp;\n        \n        // Accumulate the transformation in the remaining k row/column of R\n        for (++itk; itk; ++itk)\n        {\n          i = itk.index();\n          temp = givens.c() *  itk.value() + givens.s() * sdiag(i);\n          sdiag(i) = -givens.s() * itk.value() + givens.c() * sdiag(i);\n          itk.valueRef() = temp;\n        }\n      }\n    }\n    \n    // Solve the triangular system for z. If the system is \n    // singular, then obtain a least squares solution\n    Index nsing;\n    for(nsing = 0; nsing<n && sdiag(nsing) !=0; nsing++) {}\n    \n    wa.tail(n-nsing).setZero();\n//     x = wa; \n    wa.head(nsing) = R.topLeftCorner(nsing,nsing).template triangularView<Upper>().solve/*InPlace*/(wa.head(nsing));\n    \n    sdiag = R.diagonal();\n    // Permute the components of z back to components of x\n    x = iPerm * wa; \n}\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_LMQRSOLV_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/LevenbergMarquardt/LevenbergMarquardt.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Thomas Capricelli <orzel@freehackers.org>\n// Copyright (C) 2012 Desire Nuentsa <desire.nuentsa_wakam@inria.fr>\n//\n// The algorithm of this class initially comes from MINPACK whose original authors are:\n// Copyright Jorge More - Argonne National Laboratory\n// Copyright Burt Garbow - Argonne National Laboratory\n// Copyright Ken Hillstrom - Argonne National Laboratory\n//\n// This Source Code Form is subject to the terms of the Minpack license\n// (a BSD-like license) described in the campaigned CopyrightMINPACK.txt file.\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_LEVENBERGMARQUARDT_H\n#define EIGEN_LEVENBERGMARQUARDT_H\n\n\nnamespace Eigen {\nnamespace LevenbergMarquardtSpace {\n    enum Status {\n        NotStarted = -2,\n        Running = -1,\n        ImproperInputParameters = 0,\n        RelativeReductionTooSmall = 1,\n        RelativeErrorTooSmall = 2,\n        RelativeErrorAndReductionTooSmall = 3,\n        CosinusTooSmall = 4,\n        TooManyFunctionEvaluation = 5,\n        FtolTooSmall = 6,\n        XtolTooSmall = 7,\n        GtolTooSmall = 8,\n        UserAsked = 9\n    };\n}\n\ntemplate <typename _Scalar, int NX=Dynamic, int NY=Dynamic>\nstruct DenseFunctor\n{\n  typedef _Scalar Scalar;\n  enum {\n    InputsAtCompileTime = NX,\n    ValuesAtCompileTime = NY\n  };\n  typedef Matrix<Scalar,InputsAtCompileTime,1> InputType;\n  typedef Matrix<Scalar,ValuesAtCompileTime,1> ValueType;\n  typedef Matrix<Scalar,ValuesAtCompileTime,InputsAtCompileTime> JacobianType;\n  typedef ColPivHouseholderQR<JacobianType> QRSolver;\n  const int m_inputs, m_values;\n\n  DenseFunctor() : m_inputs(InputsAtCompileTime), m_values(ValuesAtCompileTime) {}\n  DenseFunctor(int inputs, int values) : m_inputs(inputs), m_values(values) {}\n\n  int inputs() const { return m_inputs; }\n  int values() const { return m_values; }\n\n  //int operator()(const InputType &x, ValueType& fvec) { }\n  // should be defined in derived classes\n  \n  //int df(const InputType &x, JacobianType& fjac) { }\n  // should be defined in derived classes\n};\n\ntemplate <typename _Scalar, typename _Index>\nstruct SparseFunctor\n{\n  typedef _Scalar Scalar;\n  typedef _Index Index;\n  typedef Matrix<Scalar,Dynamic,1> InputType;\n  typedef Matrix<Scalar,Dynamic,1> ValueType;\n  typedef SparseMatrix<Scalar, ColMajor, Index> JacobianType;\n  typedef SparseQR<JacobianType, COLAMDOrdering<int> > QRSolver;\n  enum {\n    InputsAtCompileTime = Dynamic,\n    ValuesAtCompileTime = Dynamic\n  };\n  \n  SparseFunctor(int inputs, int values) : m_inputs(inputs), m_values(values) {}\n\n  int inputs() const { return m_inputs; }\n  int values() const { return m_values; }\n  \n  const int m_inputs, m_values;\n  //int operator()(const InputType &x, ValueType& fvec) { }\n  // to be defined in the functor\n  \n  //int df(const InputType &x, JacobianType& fjac) { }\n  // to be defined in the functor if no automatic differentiation\n  \n};\nnamespace internal {\ntemplate <typename QRSolver, typename VectorType>\nvoid lmpar2(const QRSolver &qr, const VectorType  &diag, const VectorType  &qtb,\n\t    typename VectorType::Scalar m_delta, typename VectorType::Scalar &par,\n\t    VectorType  &x);\n    }\n/**\n  * \\ingroup NonLinearOptimization_Module\n  * \\brief Performs non linear optimization over a non-linear function,\n  * using a variant of the Levenberg Marquardt algorithm.\n  *\n  * Check wikipedia for more information.\n  * http://en.wikipedia.org/wiki/Levenberg%E2%80%93Marquardt_algorithm\n  */\ntemplate<typename _FunctorType>\nclass LevenbergMarquardt : internal::no_assignment_operator\n{\n  public:\n    typedef _FunctorType FunctorType;\n    typedef typename FunctorType::QRSolver QRSolver;\n    typedef typename FunctorType::JacobianType JacobianType;\n    typedef typename JacobianType::Scalar Scalar;\n    typedef typename JacobianType::RealScalar RealScalar; \n    typedef typename QRSolver::StorageIndex PermIndex;\n    typedef Matrix<Scalar,Dynamic,1> FVectorType;\n    typedef PermutationMatrix<Dynamic,Dynamic,int> PermutationType;\n  public:\n    LevenbergMarquardt(FunctorType& functor) \n    : m_functor(functor),m_nfev(0),m_njev(0),m_fnorm(0.0),m_gnorm(0),\n      m_isInitialized(false),m_info(InvalidInput)\n    {\n      resetParameters();\n      m_useExternalScaling=false; \n    }\n    \n    LevenbergMarquardtSpace::Status minimize(FVectorType &x);\n    LevenbergMarquardtSpace::Status minimizeInit(FVectorType &x);\n    LevenbergMarquardtSpace::Status minimizeOneStep(FVectorType &x);\n    LevenbergMarquardtSpace::Status lmder1(\n      FVectorType  &x, \n      const Scalar tol = std::sqrt(NumTraits<Scalar>::epsilon())\n    );\n    static LevenbergMarquardtSpace::Status lmdif1(\n            FunctorType &functor,\n            FVectorType  &x,\n            Index *nfev,\n            const Scalar tol = std::sqrt(NumTraits<Scalar>::epsilon())\n            );\n    \n    /** Sets the default parameters */\n    void resetParameters() \n    {\n      using std::sqrt;        \n\n      m_factor = 100.; \n      m_maxfev = 400; \n      m_ftol = sqrt(NumTraits<RealScalar>::epsilon());\n      m_xtol = sqrt(NumTraits<RealScalar>::epsilon());\n      m_gtol = 0. ; \n      m_epsfcn = 0. ;\n    }\n    \n    /** Sets the tolerance for the norm of the solution vector*/\n    void setXtol(RealScalar xtol) { m_xtol = xtol; }\n    \n    /** Sets the tolerance for the norm of the vector function*/\n    void setFtol(RealScalar ftol) { m_ftol = ftol; }\n    \n    /** Sets the tolerance for the norm of the gradient of the error vector*/\n    void setGtol(RealScalar gtol) { m_gtol = gtol; }\n    \n    /** Sets the step bound for the diagonal shift */\n    void setFactor(RealScalar factor) { m_factor = factor; }    \n    \n    /** Sets the error precision  */\n    void setEpsilon (RealScalar epsfcn) { m_epsfcn = epsfcn; }\n    \n    /** Sets the maximum number of function evaluation */\n    void setMaxfev(Index maxfev) {m_maxfev = maxfev; }\n    \n    /** Use an external Scaling. If set to true, pass a nonzero diagonal to diag() */\n    void setExternalScaling(bool value) {m_useExternalScaling  = value; }\n    \n    /** \\returns the tolerance for the norm of the solution vector */\n    RealScalar xtol() const {return m_xtol; }\n    \n    /** \\returns the tolerance for the norm of the vector function */\n    RealScalar ftol() const {return m_ftol; }\n    \n    /** \\returns the tolerance for the norm of the gradient of the error vector */\n    RealScalar gtol() const {return m_gtol; }\n    \n    /** \\returns the step bound for the diagonal shift */\n    RealScalar factor() const {return m_factor; }\n    \n    /** \\returns the error precision */\n    RealScalar epsilon() const {return m_epsfcn; }\n    \n    /** \\returns the maximum number of function evaluation */\n    Index maxfev() const {return m_maxfev; }\n    \n    /** \\returns a reference to the diagonal of the jacobian */\n    FVectorType& diag() {return m_diag; }\n    \n    /** \\returns the number of iterations performed */\n    Index iterations() { return m_iter; }\n    \n    /** \\returns the number of functions evaluation */\n    Index nfev() { return m_nfev; }\n    \n    /** \\returns the number of jacobian evaluation */\n    Index njev() { return m_njev; }\n    \n    /** \\returns the norm of current vector function */\n    RealScalar fnorm() {return m_fnorm; }\n    \n    /** \\returns the norm of the gradient of the error */\n    RealScalar gnorm() {return m_gnorm; }\n    \n    /** \\returns the LevenbergMarquardt parameter */\n    RealScalar lm_param(void) { return m_par; }\n    \n    /** \\returns a reference to the  current vector function \n     */\n    FVectorType& fvec() {return m_fvec; }\n    \n    /** \\returns a reference to the matrix where the current Jacobian matrix is stored\n     */\n    JacobianType& jacobian() {return m_fjac; }\n    \n    /** \\returns a reference to the triangular matrix R from the QR of the jacobian matrix.\n     * \\sa jacobian()\n     */\n    JacobianType& matrixR() {return m_rfactor; }\n    \n    /** the permutation used in the QR factorization\n     */\n    PermutationType permutation() {return m_permutation; }\n    \n    /** \n     * \\brief Reports whether the minimization was successful\n     * \\returns \\c Success if the minimization was successful,\n     *         \\c NumericalIssue if a numerical problem arises during the \n     *          minimization process, for example during the QR factorization\n     *         \\c NoConvergence if the minimization did not converge after \n     *          the maximum number of function evaluation allowed\n     *          \\c InvalidInput if the input matrix is invalid\n     */\n    ComputationInfo info() const\n    {\n      \n      return m_info;\n    }\n  private:\n    JacobianType m_fjac; \n    JacobianType m_rfactor; // The triangular matrix R from the QR of the jacobian matrix m_fjac\n    FunctorType &m_functor;\n    FVectorType m_fvec, m_qtf, m_diag; \n    Index n;\n    Index m; \n    Index m_nfev;\n    Index m_njev; \n    RealScalar m_fnorm; // Norm of the current vector function\n    RealScalar m_gnorm; //Norm of the gradient of the error \n    RealScalar m_factor; //\n    Index m_maxfev; // Maximum number of function evaluation\n    RealScalar m_ftol; //Tolerance in the norm of the vector function\n    RealScalar m_xtol; // \n    RealScalar m_gtol; //tolerance of the norm of the error gradient\n    RealScalar m_epsfcn; //\n    Index m_iter; // Number of iterations performed\n    RealScalar m_delta;\n    bool m_useExternalScaling;\n    PermutationType m_permutation;\n    FVectorType m_wa1, m_wa2, m_wa3, m_wa4; //Temporary vectors\n    RealScalar m_par;\n    bool m_isInitialized; // Check whether the minimization step has been called\n    ComputationInfo m_info; \n};\n\ntemplate<typename FunctorType>\nLevenbergMarquardtSpace::Status\nLevenbergMarquardt<FunctorType>::minimize(FVectorType  &x)\n{\n    LevenbergMarquardtSpace::Status status = minimizeInit(x);\n    if (status==LevenbergMarquardtSpace::ImproperInputParameters) {\n      m_isInitialized = true;\n      return status;\n    }\n    do {\n//       std::cout << \" uv \" << x.transpose() << \"\\n\";\n        status = minimizeOneStep(x);\n    } while (status==LevenbergMarquardtSpace::Running);\n     m_isInitialized = true;\n     return status;\n}\n\ntemplate<typename FunctorType>\nLevenbergMarquardtSpace::Status\nLevenbergMarquardt<FunctorType>::minimizeInit(FVectorType  &x)\n{\n    n = x.size();\n    m = m_functor.values();\n\n    m_wa1.resize(n); m_wa2.resize(n); m_wa3.resize(n);\n    m_wa4.resize(m);\n    m_fvec.resize(m);\n    //FIXME Sparse Case : Allocate space for the jacobian\n    m_fjac.resize(m, n);\n//     m_fjac.reserve(VectorXi::Constant(n,5)); // FIXME Find a better alternative\n    if (!m_useExternalScaling)\n        m_diag.resize(n);\n    eigen_assert( (!m_useExternalScaling || m_diag.size()==n) && \"When m_useExternalScaling is set, the caller must provide a valid 'm_diag'\");\n    m_qtf.resize(n);\n\n    /* Function Body */\n    m_nfev = 0;\n    m_njev = 0;\n\n    /*     check the input parameters for errors. */\n    if (n <= 0 || m < n || m_ftol < 0. || m_xtol < 0. || m_gtol < 0. || m_maxfev <= 0 || m_factor <= 0.){\n      m_info = InvalidInput;\n      return LevenbergMarquardtSpace::ImproperInputParameters;\n    }\n\n    if (m_useExternalScaling)\n        for (Index j = 0; j < n; ++j)\n            if (m_diag[j] <= 0.) \n            {\n              m_info = InvalidInput;\n              return LevenbergMarquardtSpace::ImproperInputParameters;\n            }\n\n    /*     evaluate the function at the starting point */\n    /*     and calculate its norm. */\n    m_nfev = 1;\n    if ( m_functor(x, m_fvec) < 0)\n        return LevenbergMarquardtSpace::UserAsked;\n    m_fnorm = m_fvec.stableNorm();\n\n    /*     initialize levenberg-marquardt parameter and iteration counter. */\n    m_par = 0.;\n    m_iter = 1;\n\n    return LevenbergMarquardtSpace::NotStarted;\n}\n\ntemplate<typename FunctorType>\nLevenbergMarquardtSpace::Status\nLevenbergMarquardt<FunctorType>::lmder1(\n        FVectorType  &x,\n        const Scalar tol\n        )\n{\n    n = x.size();\n    m = m_functor.values();\n\n    /* check the input parameters for errors. */\n    if (n <= 0 || m < n || tol < 0.)\n        return LevenbergMarquardtSpace::ImproperInputParameters;\n\n    resetParameters();\n    m_ftol = tol;\n    m_xtol = tol;\n    m_maxfev = 100*(n+1);\n\n    return minimize(x);\n}\n\n\ntemplate<typename FunctorType>\nLevenbergMarquardtSpace::Status\nLevenbergMarquardt<FunctorType>::lmdif1(\n        FunctorType &functor,\n        FVectorType  &x,\n        Index *nfev,\n        const Scalar tol\n        )\n{\n    Index n = x.size();\n    Index m = functor.values();\n\n    /* check the input parameters for errors. */\n    if (n <= 0 || m < n || tol < 0.)\n        return LevenbergMarquardtSpace::ImproperInputParameters;\n\n    NumericalDiff<FunctorType> numDiff(functor);\n    // embedded LevenbergMarquardt\n    LevenbergMarquardt<NumericalDiff<FunctorType> > lm(numDiff);\n    lm.setFtol(tol);\n    lm.setXtol(tol);\n    lm.setMaxfev(200*(n+1));\n\n    LevenbergMarquardtSpace::Status info = LevenbergMarquardtSpace::Status(lm.minimize(x));\n    if (nfev)\n        * nfev = lm.nfev();\n    return info;\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_LEVENBERGMARQUARDT_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009, 2010, 2013 Jitse Niesen <jitse@maths.leeds.ac.uk>\n// Copyright (C) 2011, 2013 Chen-Pang He <jdh8@ms63.hinet.net>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_MATRIX_EXPONENTIAL\n#define EIGEN_MATRIX_EXPONENTIAL\n\n#include \"StemFunction.h\"\n\nnamespace Eigen {\nnamespace internal {\n\n/** \\brief Scaling operator.\n *\n * This struct is used by CwiseUnaryOp to scale a matrix by \\f$ 2^{-s} \\f$.\n */\ntemplate <typename RealScalar>\nstruct MatrixExponentialScalingOp\n{\n  /** \\brief Constructor.\n   *\n   * \\param[in] squarings  The integer \\f$ s \\f$ in this document.\n   */\n  MatrixExponentialScalingOp(int squarings) : m_squarings(squarings) { }\n\n\n  /** \\brief Scale a matrix coefficient.\n   *\n   * \\param[in,out] x  The scalar to be scaled, becoming \\f$ 2^{-s} x \\f$.\n   */\n  inline const RealScalar operator() (const RealScalar& x) const\n  {\n    using std::ldexp;\n    return ldexp(x, -m_squarings);\n  }\n\n  typedef std::complex<RealScalar> ComplexScalar;\n\n  /** \\brief Scale a matrix coefficient.\n   *\n   * \\param[in,out] x  The scalar to be scaled, becoming \\f$ 2^{-s} x \\f$.\n   */\n  inline const ComplexScalar operator() (const ComplexScalar& x) const\n  {\n    using std::ldexp;\n    return ComplexScalar(ldexp(x.real(), -m_squarings), ldexp(x.imag(), -m_squarings));\n  }\n\n  private:\n    int m_squarings;\n};\n\n/** \\brief Compute the (3,3)-Pad&eacute; approximant to the exponential.\n *\n *  After exit, \\f$ (V+U)(V-U)^{-1} \\f$ is the Pad&eacute;\n *  approximant of \\f$ \\exp(A) \\f$ around \\f$ A = 0 \\f$.\n */\ntemplate <typename MatA, typename MatU, typename MatV>\nvoid matrix_exp_pade3(const MatA& A, MatU& U, MatV& V)\n{\n  typedef typename MatA::PlainObject MatrixType;\n  typedef typename NumTraits<typename traits<MatA>::Scalar>::Real RealScalar;\n  const RealScalar b[] = {120.L, 60.L, 12.L, 1.L};\n  const MatrixType A2 = A * A;\n  const MatrixType tmp = b[3] * A2 + b[1] * MatrixType::Identity(A.rows(), A.cols());\n  U.noalias() = A * tmp;\n  V = b[2] * A2 + b[0] * MatrixType::Identity(A.rows(), A.cols());\n}\n\n/** \\brief Compute the (5,5)-Pad&eacute; approximant to the exponential.\n *\n *  After exit, \\f$ (V+U)(V-U)^{-1} \\f$ is the Pad&eacute;\n *  approximant of \\f$ \\exp(A) \\f$ around \\f$ A = 0 \\f$.\n */\ntemplate <typename MatA, typename MatU, typename MatV>\nvoid matrix_exp_pade5(const MatA& A, MatU& U, MatV& V)\n{\n  typedef typename MatA::PlainObject MatrixType;\n  typedef typename NumTraits<typename traits<MatrixType>::Scalar>::Real RealScalar;\n  const RealScalar b[] = {30240.L, 15120.L, 3360.L, 420.L, 30.L, 1.L};\n  const MatrixType A2 = A * A;\n  const MatrixType A4 = A2 * A2;\n  const MatrixType tmp = b[5] * A4 + b[3] * A2 + b[1] * MatrixType::Identity(A.rows(), A.cols());\n  U.noalias() = A * tmp;\n  V = b[4] * A4 + b[2] * A2 + b[0] * MatrixType::Identity(A.rows(), A.cols());\n}\n\n/** \\brief Compute the (7,7)-Pad&eacute; approximant to the exponential.\n *\n *  After exit, \\f$ (V+U)(V-U)^{-1} \\f$ is the Pad&eacute;\n *  approximant of \\f$ \\exp(A) \\f$ around \\f$ A = 0 \\f$.\n */\ntemplate <typename MatA, typename MatU, typename MatV>\nvoid matrix_exp_pade7(const MatA& A, MatU& U, MatV& V)\n{\n  typedef typename MatA::PlainObject MatrixType;\n  typedef typename NumTraits<typename traits<MatrixType>::Scalar>::Real RealScalar;\n  const RealScalar b[] = {17297280.L, 8648640.L, 1995840.L, 277200.L, 25200.L, 1512.L, 56.L, 1.L};\n  const MatrixType A2 = A * A;\n  const MatrixType A4 = A2 * A2;\n  const MatrixType A6 = A4 * A2;\n  const MatrixType tmp = b[7] * A6 + b[5] * A4 + b[3] * A2 \n    + b[1] * MatrixType::Identity(A.rows(), A.cols());\n  U.noalias() = A * tmp;\n  V = b[6] * A6 + b[4] * A4 + b[2] * A2 + b[0] * MatrixType::Identity(A.rows(), A.cols());\n\n}\n\n/** \\brief Compute the (9,9)-Pad&eacute; approximant to the exponential.\n *\n *  After exit, \\f$ (V+U)(V-U)^{-1} \\f$ is the Pad&eacute;\n *  approximant of \\f$ \\exp(A) \\f$ around \\f$ A = 0 \\f$.\n */\ntemplate <typename MatA, typename MatU, typename MatV>\nvoid matrix_exp_pade9(const MatA& A, MatU& U, MatV& V)\n{\n  typedef typename MatA::PlainObject MatrixType;\n  typedef typename NumTraits<typename traits<MatrixType>::Scalar>::Real RealScalar;\n  const RealScalar b[] = {17643225600.L, 8821612800.L, 2075673600.L, 302702400.L, 30270240.L,\n                          2162160.L, 110880.L, 3960.L, 90.L, 1.L};\n  const MatrixType A2 = A * A;\n  const MatrixType A4 = A2 * A2;\n  const MatrixType A6 = A4 * A2;\n  const MatrixType A8 = A6 * A2;\n  const MatrixType tmp = b[9] * A8 + b[7] * A6 + b[5] * A4 + b[3] * A2 \n    + b[1] * MatrixType::Identity(A.rows(), A.cols());\n  U.noalias() = A * tmp;\n  V = b[8] * A8 + b[6] * A6 + b[4] * A4 + b[2] * A2 + b[0] * MatrixType::Identity(A.rows(), A.cols());\n}\n\n/** \\brief Compute the (13,13)-Pad&eacute; approximant to the exponential.\n *\n *  After exit, \\f$ (V+U)(V-U)^{-1} \\f$ is the Pad&eacute;\n *  approximant of \\f$ \\exp(A) \\f$ around \\f$ A = 0 \\f$.\n */\ntemplate <typename MatA, typename MatU, typename MatV>\nvoid matrix_exp_pade13(const MatA& A, MatU& U, MatV& V)\n{\n  typedef typename MatA::PlainObject MatrixType;\n  typedef typename NumTraits<typename traits<MatrixType>::Scalar>::Real RealScalar;\n  const RealScalar b[] = {64764752532480000.L, 32382376266240000.L, 7771770303897600.L,\n                          1187353796428800.L, 129060195264000.L, 10559470521600.L, 670442572800.L,\n                          33522128640.L, 1323241920.L, 40840800.L, 960960.L, 16380.L, 182.L, 1.L};\n  const MatrixType A2 = A * A;\n  const MatrixType A4 = A2 * A2;\n  const MatrixType A6 = A4 * A2;\n  V = b[13] * A6 + b[11] * A4 + b[9] * A2; // used for temporary storage\n  MatrixType tmp = A6 * V;\n  tmp += b[7] * A6 + b[5] * A4 + b[3] * A2 + b[1] * MatrixType::Identity(A.rows(), A.cols());\n  U.noalias() = A * tmp;\n  tmp = b[12] * A6 + b[10] * A4 + b[8] * A2;\n  V.noalias() = A6 * tmp;\n  V += b[6] * A6 + b[4] * A4 + b[2] * A2 + b[0] * MatrixType::Identity(A.rows(), A.cols());\n}\n\n/** \\brief Compute the (17,17)-Pad&eacute; approximant to the exponential.\n *\n *  After exit, \\f$ (V+U)(V-U)^{-1} \\f$ is the Pad&eacute;\n *  approximant of \\f$ \\exp(A) \\f$ around \\f$ A = 0 \\f$.\n *\n *  This function activates only if your long double is double-double or quadruple.\n */\n#if LDBL_MANT_DIG > 64\ntemplate <typename MatA, typename MatU, typename MatV>\nvoid matrix_exp_pade17(const MatA& A, MatU& U, MatV& V)\n{\n  typedef typename MatA::PlainObject MatrixType;\n  typedef typename NumTraits<typename traits<MatrixType>::Scalar>::Real RealScalar;\n  const RealScalar b[] = {830034394580628357120000.L, 415017197290314178560000.L,\n                          100610229646136770560000.L, 15720348382208870400000.L,\n                          1774878043152614400000.L, 153822763739893248000.L, 10608466464820224000.L,\n                          595373117923584000.L, 27563570274240000.L, 1060137318240000.L,\n                          33924394183680.L, 899510451840.L, 19554575040.L, 341863200.L, 4651200.L,\n                          46512.L, 306.L, 1.L};\n  const MatrixType A2 = A * A;\n  const MatrixType A4 = A2 * A2;\n  const MatrixType A6 = A4 * A2;\n  const MatrixType A8 = A4 * A4;\n  V = b[17] * A8 + b[15] * A6 + b[13] * A4 + b[11] * A2; // used for temporary storage\n  MatrixType tmp = A8 * V;\n  tmp += b[9] * A8 + b[7] * A6 + b[5] * A4 + b[3] * A2 \n    + b[1] * MatrixType::Identity(A.rows(), A.cols());\n  U.noalias() = A * tmp;\n  tmp = b[16] * A8 + b[14] * A6 + b[12] * A4 + b[10] * A2;\n  V.noalias() = tmp * A8;\n  V += b[8] * A8 + b[6] * A6 + b[4] * A4 + b[2] * A2 \n    + b[0] * MatrixType::Identity(A.rows(), A.cols());\n}\n#endif\n\ntemplate <typename MatrixType, typename RealScalar = typename NumTraits<typename traits<MatrixType>::Scalar>::Real>\nstruct matrix_exp_computeUV\n{\n  /** \\brief Compute Pad&eacute; approximant to the exponential.\n    *\n    * Computes \\c U, \\c V and \\c squarings such that \\f$ (V+U)(V-U)^{-1} \\f$ is a Pad&eacute;\n    * approximant of \\f$ \\exp(2^{-\\mbox{squarings}}M) \\f$ around \\f$ M = 0 \\f$, where \\f$ M \\f$\n    * denotes the matrix \\c arg. The degree of the Pad&eacute; approximant and the value of squarings\n    * are chosen such that the approximation error is no more than the round-off error.\n    */\n  static void run(const MatrixType& arg, MatrixType& U, MatrixType& V, int& squarings);\n};\n\ntemplate <typename MatrixType>\nstruct matrix_exp_computeUV<MatrixType, float>\n{\n  template <typename ArgType>\n  static void run(const ArgType& arg, MatrixType& U, MatrixType& V, int& squarings)\n  {\n    using std::frexp;\n    using std::pow;\n    const float l1norm = arg.cwiseAbs().colwise().sum().maxCoeff();\n    squarings = 0;\n    if (l1norm < 4.258730016922831e-001f) {\n      matrix_exp_pade3(arg, U, V);\n    } else if (l1norm < 1.880152677804762e+000f) {\n      matrix_exp_pade5(arg, U, V);\n    } else {\n      const float maxnorm = 3.925724783138660f;\n      frexp(l1norm / maxnorm, &squarings);\n      if (squarings < 0) squarings = 0;\n      MatrixType A = arg.unaryExpr(MatrixExponentialScalingOp<float>(squarings));\n      matrix_exp_pade7(A, U, V);\n    }\n  }\n};\n\ntemplate <typename MatrixType>\nstruct matrix_exp_computeUV<MatrixType, double>\n{\n  typedef typename NumTraits<typename traits<MatrixType>::Scalar>::Real RealScalar;\n  template <typename ArgType>\n  static void run(const ArgType& arg, MatrixType& U, MatrixType& V, int& squarings)\n  {\n    using std::frexp;\n    using std::pow;\n    const RealScalar l1norm = arg.cwiseAbs().colwise().sum().maxCoeff();\n    squarings = 0;\n    if (l1norm < 1.495585217958292e-002) {\n      matrix_exp_pade3(arg, U, V);\n    } else if (l1norm < 2.539398330063230e-001) {\n      matrix_exp_pade5(arg, U, V);\n    } else if (l1norm < 9.504178996162932e-001) {\n      matrix_exp_pade7(arg, U, V);\n    } else if (l1norm < 2.097847961257068e+000) {\n      matrix_exp_pade9(arg, U, V);\n    } else {\n      const RealScalar maxnorm = 5.371920351148152;\n      frexp(l1norm / maxnorm, &squarings);\n      if (squarings < 0) squarings = 0;\n      MatrixType A = arg.unaryExpr(MatrixExponentialScalingOp<RealScalar>(squarings));\n      matrix_exp_pade13(A, U, V);\n    }\n  }\n};\n  \ntemplate <typename MatrixType>\nstruct matrix_exp_computeUV<MatrixType, long double>\n{\n  template <typename ArgType>\n  static void run(const ArgType& arg, MatrixType& U, MatrixType& V, int& squarings)\n  {\n#if   LDBL_MANT_DIG == 53   // double precision\n    matrix_exp_computeUV<MatrixType, double>::run(arg, U, V, squarings);\n  \n#else\n  \n    using std::frexp;\n    using std::pow;\n    const long double l1norm = arg.cwiseAbs().colwise().sum().maxCoeff();\n    squarings = 0;\n  \n#if LDBL_MANT_DIG <= 64   // extended precision\n  \n    if (l1norm < 4.1968497232266989671e-003L) {\n      matrix_exp_pade3(arg, U, V);\n    } else if (l1norm < 1.1848116734693823091e-001L) {\n      matrix_exp_pade5(arg, U, V);\n    } else if (l1norm < 5.5170388480686700274e-001L) {\n      matrix_exp_pade7(arg, U, V);\n    } else if (l1norm < 1.3759868875587845383e+000L) {\n      matrix_exp_pade9(arg, U, V);\n    } else {\n      const long double maxnorm = 4.0246098906697353063L;\n      frexp(l1norm / maxnorm, &squarings);\n      if (squarings < 0) squarings = 0;\n      MatrixType A = arg.unaryExpr(MatrixExponentialScalingOp<long double>(squarings));\n      matrix_exp_pade13(A, U, V);\n    }\n  \n#elif LDBL_MANT_DIG <= 106  // double-double\n  \n    if (l1norm < 3.2787892205607026992947488108213e-005L) {\n      matrix_exp_pade3(arg, U, V);\n    } else if (l1norm < 6.4467025060072760084130906076332e-003L) {\n      matrix_exp_pade5(arg, U, V);\n    } else if (l1norm < 6.8988028496595374751374122881143e-002L) {\n      matrix_exp_pade7(arg, U, V);\n    } else if (l1norm < 2.7339737518502231741495857201670e-001L) {\n      matrix_exp_pade9(arg, U, V);\n    } else if (l1norm < 1.3203382096514474905666448850278e+000L) {\n      matrix_exp_pade13(arg, U, V);\n    } else {\n      const long double maxnorm = 3.2579440895405400856599663723517L;\n      frexp(l1norm / maxnorm, &squarings);\n      if (squarings < 0) squarings = 0;\n      MatrixType A = arg.unaryExpr(MatrixExponentialScalingOp<long double>(squarings));\n      matrix_exp_pade17(A, U, V);\n    }\n  \n#elif LDBL_MANT_DIG <= 113  // quadruple precision\n  \n    if (l1norm < 1.639394610288918690547467954466970e-005L) {\n      matrix_exp_pade3(arg, U, V);\n    } else if (l1norm < 4.253237712165275566025884344433009e-003L) {\n      matrix_exp_pade5(arg, U, V);\n    } else if (l1norm < 5.125804063165764409885122032933142e-002L) {\n      matrix_exp_pade7(arg, U, V);\n    } else if (l1norm < 2.170000765161155195453205651889853e-001L) {\n      matrix_exp_pade9(arg, U, V);\n    } else if (l1norm < 1.125358383453143065081397882891878e+000L) {\n      matrix_exp_pade13(arg, U, V);\n    } else {\n      const long double maxnorm = 2.884233277829519311757165057717815L;\n      frexp(l1norm / maxnorm, &squarings);\n      if (squarings < 0) squarings = 0;\n      MatrixType A = arg.unaryExpr(MatrixExponentialScalingOp<long double>(squarings));\n      matrix_exp_pade17(A, U, V);\n    }\n  \n#else\n  \n    // this case should be handled in compute()\n    eigen_assert(false && \"Bug in MatrixExponential\"); \n  \n#endif\n#endif  // LDBL_MANT_DIG\n  }\n};\n\ntemplate<typename T> struct is_exp_known_type : false_type {};\ntemplate<> struct is_exp_known_type<float> : true_type {};\ntemplate<> struct is_exp_known_type<double> : true_type {};\n#if LDBL_MANT_DIG <= 113\ntemplate<> struct is_exp_known_type<long double> : true_type {};\n#endif\n\ntemplate <typename ArgType, typename ResultType>\nvoid matrix_exp_compute(const ArgType& arg, ResultType &result, true_type) // natively supported scalar type\n{\n  typedef typename ArgType::PlainObject MatrixType;\n  MatrixType U, V;\n  int squarings;\n  matrix_exp_computeUV<MatrixType>::run(arg, U, V, squarings); // Pade approximant is (U+V) / (-U+V)\n  MatrixType numer = U + V;\n  MatrixType denom = -U + V;\n  result = denom.partialPivLu().solve(numer);\n  for (int i=0; i<squarings; i++)\n    result *= result;   // undo scaling by repeated squaring\n}\n\n\n/* Computes the matrix exponential\n *\n * \\param arg    argument of matrix exponential (should be plain object)\n * \\param result variable in which result will be stored\n */\ntemplate <typename ArgType, typename ResultType>\nvoid matrix_exp_compute(const ArgType& arg, ResultType &result, false_type) // default\n{\n  typedef typename ArgType::PlainObject MatrixType;\n  typedef typename traits<MatrixType>::Scalar Scalar;\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  typedef typename std::complex<RealScalar> ComplexScalar;\n  result = arg.matrixFunction(internal::stem_function_exp<ComplexScalar>);\n}\n\n} // end namespace Eigen::internal\n\n/** \\ingroup MatrixFunctions_Module\n  *\n  * \\brief Proxy for the matrix exponential of some matrix (expression).\n  *\n  * \\tparam Derived  Type of the argument to the matrix exponential.\n  *\n  * This class holds the argument to the matrix exponential until it is assigned or evaluated for\n  * some other reason (so the argument should not be changed in the meantime). It is the return type\n  * of MatrixBase::exp() and most of the time this is the only way it is used.\n  */\ntemplate<typename Derived> struct MatrixExponentialReturnValue\n: public ReturnByValue<MatrixExponentialReturnValue<Derived> >\n{\n  public:\n    /** \\brief Constructor.\n      *\n      * \\param src %Matrix (expression) forming the argument of the matrix exponential.\n      */\n    MatrixExponentialReturnValue(const Derived& src) : m_src(src) { }\n\n    /** \\brief Compute the matrix exponential.\n      *\n      * \\param result the matrix exponential of \\p src in the constructor.\n      */\n    template <typename ResultType>\n    inline void evalTo(ResultType& result) const\n    {\n      const typename internal::nested_eval<Derived, 10>::type tmp(m_src);\n      internal::matrix_exp_compute(tmp, result, internal::is_exp_known_type<typename Derived::RealScalar>());\n    }\n\n    Index rows() const { return m_src.rows(); }\n    Index cols() const { return m_src.cols(); }\n\n  protected:\n    const typename internal::ref_selector<Derived>::type m_src;\n};\n\nnamespace internal {\ntemplate<typename Derived>\nstruct traits<MatrixExponentialReturnValue<Derived> >\n{\n  typedef typename Derived::PlainObject ReturnType;\n};\n}\n\ntemplate <typename Derived>\nconst MatrixExponentialReturnValue<Derived> MatrixBase<Derived>::exp() const\n{\n  eigen_assert(rows() == cols());\n  return MatrixExponentialReturnValue<Derived>(derived());\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_MATRIX_EXPONENTIAL\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/MatrixFunctions/MatrixFunction.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009-2011, 2013 Jitse Niesen <jitse@maths.leeds.ac.uk>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_MATRIX_FUNCTION_H\n#define EIGEN_MATRIX_FUNCTION_H\n\n#include \"StemFunction.h\"\n\n\nnamespace Eigen { \n\nnamespace internal {\n\n/** \\brief Maximum distance allowed between eigenvalues to be considered \"close\". */\nstatic const float matrix_function_separation = 0.1f;\n\n/** \\ingroup MatrixFunctions_Module\n  * \\class MatrixFunctionAtomic\n  * \\brief Helper class for computing matrix functions of atomic matrices.\n  *\n  * Here, an atomic matrix is a triangular matrix whose diagonal entries are close to each other.\n  */\ntemplate <typename MatrixType>\nclass MatrixFunctionAtomic \n{\n  public:\n\n    typedef typename MatrixType::Scalar Scalar;\n    typedef typename stem_function<Scalar>::type StemFunction;\n\n    /** \\brief Constructor\n      * \\param[in]  f  matrix function to compute.\n      */\n    MatrixFunctionAtomic(StemFunction f) : m_f(f) { }\n\n    /** \\brief Compute matrix function of atomic matrix\n      * \\param[in]  A  argument of matrix function, should be upper triangular and atomic\n      * \\returns  f(A), the matrix function evaluated at the given matrix\n      */\n    MatrixType compute(const MatrixType& A);\n\n  private:\n    StemFunction* m_f;\n};\n\ntemplate <typename MatrixType>\ntypename NumTraits<typename MatrixType::Scalar>::Real matrix_function_compute_mu(const MatrixType& A)\n{\n  typedef typename plain_col_type<MatrixType>::type VectorType;\n  Index rows = A.rows();\n  const MatrixType N = MatrixType::Identity(rows, rows) - A;\n  VectorType e = VectorType::Ones(rows);\n  N.template triangularView<Upper>().solveInPlace(e);\n  return e.cwiseAbs().maxCoeff();\n}\n\ntemplate <typename MatrixType>\nMatrixType MatrixFunctionAtomic<MatrixType>::compute(const MatrixType& A)\n{\n  // TODO: Use that A is upper triangular\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  Index rows = A.rows();\n  Scalar avgEival = A.trace() / Scalar(RealScalar(rows));\n  MatrixType Ashifted = A - avgEival * MatrixType::Identity(rows, rows);\n  RealScalar mu = matrix_function_compute_mu(Ashifted);\n  MatrixType F = m_f(avgEival, 0) * MatrixType::Identity(rows, rows);\n  MatrixType P = Ashifted;\n  MatrixType Fincr;\n  for (Index s = 1; double(s) < 1.1 * double(rows) + 10.0; s++) { // upper limit is fairly arbitrary\n    Fincr = m_f(avgEival, static_cast<int>(s)) * P;\n    F += Fincr;\n    P = Scalar(RealScalar(1)/RealScalar(s + 1)) * P * Ashifted;\n\n    // test whether Taylor series converged\n    const RealScalar F_norm = F.cwiseAbs().rowwise().sum().maxCoeff();\n    const RealScalar Fincr_norm = Fincr.cwiseAbs().rowwise().sum().maxCoeff();\n    if (Fincr_norm < NumTraits<Scalar>::epsilon() * F_norm) {\n      RealScalar delta = 0;\n      RealScalar rfactorial = 1;\n      for (Index r = 0; r < rows; r++) {\n        RealScalar mx = 0;\n        for (Index i = 0; i < rows; i++)\n          mx = (std::max)(mx, std::abs(m_f(Ashifted(i, i) + avgEival, static_cast<int>(s+r))));\n        if (r != 0)\n          rfactorial *= RealScalar(r);\n        delta = (std::max)(delta, mx / rfactorial);\n      }\n      const RealScalar P_norm = P.cwiseAbs().rowwise().sum().maxCoeff();\n      if (mu * delta * P_norm < NumTraits<Scalar>::epsilon() * F_norm) // series converged\n        break;\n    }\n  }\n  return F;\n}\n\n/** \\brief Find cluster in \\p clusters containing some value \n  * \\param[in] key Value to find\n  * \\returns Iterator to cluster containing \\p key, or \\c clusters.end() if no cluster in \\p m_clusters\n  * contains \\p key.\n  */\ntemplate <typename Index, typename ListOfClusters>\ntypename ListOfClusters::iterator matrix_function_find_cluster(Index key, ListOfClusters& clusters)\n{\n  typename std::list<Index>::iterator j;\n  for (typename ListOfClusters::iterator i = clusters.begin(); i != clusters.end(); ++i) {\n    j = std::find(i->begin(), i->end(), key);\n    if (j != i->end())\n      return i;\n  }\n  return clusters.end();\n}\n\n/** \\brief Partition eigenvalues in clusters of ei'vals close to each other\n  * \n  * \\param[in]  eivals    Eigenvalues\n  * \\param[out] clusters  Resulting partition of eigenvalues\n  *\n  * The partition satisfies the following two properties:\n  * # Any eigenvalue in a certain cluster is at most matrix_function_separation() away from another eigenvalue\n  *   in the same cluster.\n  * # The distance between two eigenvalues in different clusters is more than matrix_function_separation().  \n  * The implementation follows Algorithm 4.1 in the paper of Davies and Higham.\n  */\ntemplate <typename EivalsType, typename Cluster>\nvoid matrix_function_partition_eigenvalues(const EivalsType& eivals, std::list<Cluster>& clusters)\n{\n  typedef typename EivalsType::RealScalar RealScalar;\n  for (Index i=0; i<eivals.rows(); ++i) {\n    // Find cluster containing i-th ei'val, adding a new cluster if necessary\n    typename std::list<Cluster>::iterator qi = matrix_function_find_cluster(i, clusters);\n    if (qi == clusters.end()) {\n      Cluster l;\n      l.push_back(i);\n      clusters.push_back(l);\n      qi = clusters.end();\n      --qi;\n    }\n\n    // Look for other element to add to the set\n    for (Index j=i+1; j<eivals.rows(); ++j) {\n      if (abs(eivals(j) - eivals(i)) <= RealScalar(matrix_function_separation)\n          && std::find(qi->begin(), qi->end(), j) == qi->end()) {\n        typename std::list<Cluster>::iterator qj = matrix_function_find_cluster(j, clusters);\n        if (qj == clusters.end()) {\n          qi->push_back(j);\n        } else {\n          qi->insert(qi->end(), qj->begin(), qj->end());\n          clusters.erase(qj);\n        }\n      }\n    }\n  }\n}\n\n/** \\brief Compute size of each cluster given a partitioning */\ntemplate <typename ListOfClusters, typename Index>\nvoid matrix_function_compute_cluster_size(const ListOfClusters& clusters, Matrix<Index, Dynamic, 1>& clusterSize)\n{\n  const Index numClusters = static_cast<Index>(clusters.size());\n  clusterSize.setZero(numClusters);\n  Index clusterIndex = 0;\n  for (typename ListOfClusters::const_iterator cluster = clusters.begin(); cluster != clusters.end(); ++cluster) {\n    clusterSize[clusterIndex] = cluster->size();\n    ++clusterIndex;\n  }\n}\n\n/** \\brief Compute start of each block using clusterSize */\ntemplate <typename VectorType>\nvoid matrix_function_compute_block_start(const VectorType& clusterSize, VectorType& blockStart)\n{\n  blockStart.resize(clusterSize.rows());\n  blockStart(0) = 0;\n  for (Index i = 1; i < clusterSize.rows(); i++) {\n    blockStart(i) = blockStart(i-1) + clusterSize(i-1);\n  }\n}\n\n/** \\brief Compute mapping of eigenvalue indices to cluster indices */\ntemplate <typename EivalsType, typename ListOfClusters, typename VectorType>\nvoid matrix_function_compute_map(const EivalsType& eivals, const ListOfClusters& clusters, VectorType& eivalToCluster)\n{\n  eivalToCluster.resize(eivals.rows());\n  Index clusterIndex = 0;\n  for (typename ListOfClusters::const_iterator cluster = clusters.begin(); cluster != clusters.end(); ++cluster) {\n    for (Index i = 0; i < eivals.rows(); ++i) {\n      if (std::find(cluster->begin(), cluster->end(), i) != cluster->end()) {\n        eivalToCluster[i] = clusterIndex;\n      }\n    }\n    ++clusterIndex;\n  }\n}\n\n/** \\brief Compute permutation which groups ei'vals in same cluster together */\ntemplate <typename DynVectorType, typename VectorType>\nvoid matrix_function_compute_permutation(const DynVectorType& blockStart, const DynVectorType& eivalToCluster, VectorType& permutation)\n{\n  DynVectorType indexNextEntry = blockStart;\n  permutation.resize(eivalToCluster.rows());\n  for (Index i = 0; i < eivalToCluster.rows(); i++) {\n    Index cluster = eivalToCluster[i];\n    permutation[i] = indexNextEntry[cluster];\n    ++indexNextEntry[cluster];\n  }\n}  \n\n/** \\brief Permute Schur decomposition in U and T according to permutation */\ntemplate <typename VectorType, typename MatrixType>\nvoid matrix_function_permute_schur(VectorType& permutation, MatrixType& U, MatrixType& T)\n{\n  for (Index i = 0; i < permutation.rows() - 1; i++) {\n    Index j;\n    for (j = i; j < permutation.rows(); j++) {\n      if (permutation(j) == i) break;\n    }\n    eigen_assert(permutation(j) == i);\n    for (Index k = j-1; k >= i; k--) {\n      JacobiRotation<typename MatrixType::Scalar> rotation;\n      rotation.makeGivens(T(k, k+1), T(k+1, k+1) - T(k, k));\n      T.applyOnTheLeft(k, k+1, rotation.adjoint());\n      T.applyOnTheRight(k, k+1, rotation);\n      U.applyOnTheRight(k, k+1, rotation);\n      std::swap(permutation.coeffRef(k), permutation.coeffRef(k+1));\n    }\n  }\n}\n\n/** \\brief Compute block diagonal part of matrix function.\n  *\n  * This routine computes the matrix function applied to the block diagonal part of \\p T (which should be\n  * upper triangular), with the blocking given by \\p blockStart and \\p clusterSize. The matrix function of\n  * each diagonal block is computed by \\p atomic. The off-diagonal parts of \\p fT are set to zero.\n  */\ntemplate <typename MatrixType, typename AtomicType, typename VectorType>\nvoid matrix_function_compute_block_atomic(const MatrixType& T, AtomicType& atomic, const VectorType& blockStart, const VectorType& clusterSize, MatrixType& fT)\n{ \n  fT.setZero(T.rows(), T.cols());\n  for (Index i = 0; i < clusterSize.rows(); ++i) {\n    fT.block(blockStart(i), blockStart(i), clusterSize(i), clusterSize(i))\n      = atomic.compute(T.block(blockStart(i), blockStart(i), clusterSize(i), clusterSize(i)));\n  }\n}\n\n/** \\brief Solve a triangular Sylvester equation AX + XB = C \n  *\n  * \\param[in]  A  the matrix A; should be square and upper triangular\n  * \\param[in]  B  the matrix B; should be square and upper triangular\n  * \\param[in]  C  the matrix C; should have correct size.\n  *\n  * \\returns the solution X.\n  *\n  * If A is m-by-m and B is n-by-n, then both C and X are m-by-n.  The (i,j)-th component of the Sylvester\n  * equation is\n  * \\f[ \n  *     \\sum_{k=i}^m A_{ik} X_{kj} + \\sum_{k=1}^j X_{ik} B_{kj} = C_{ij}. \n  * \\f]\n  * This can be re-arranged to yield:\n  * \\f[ \n  *     X_{ij} = \\frac{1}{A_{ii} + B_{jj}} \\Bigl( C_{ij}\n  *     - \\sum_{k=i+1}^m A_{ik} X_{kj} - \\sum_{k=1}^{j-1} X_{ik} B_{kj} \\Bigr).\n  * \\f]\n  * It is assumed that A and B are such that the numerator is never zero (otherwise the Sylvester equation\n  * does not have a unique solution). In that case, these equations can be evaluated in the order \n  * \\f$ i=m,\\ldots,1 \\f$ and \\f$ j=1,\\ldots,n \\f$.\n  */\ntemplate <typename MatrixType>\nMatrixType matrix_function_solve_triangular_sylvester(const MatrixType& A, const MatrixType& B, const MatrixType& C)\n{\n  eigen_assert(A.rows() == A.cols());\n  eigen_assert(A.isUpperTriangular());\n  eigen_assert(B.rows() == B.cols());\n  eigen_assert(B.isUpperTriangular());\n  eigen_assert(C.rows() == A.rows());\n  eigen_assert(C.cols() == B.rows());\n\n  typedef typename MatrixType::Scalar Scalar;\n\n  Index m = A.rows();\n  Index n = B.rows();\n  MatrixType X(m, n);\n\n  for (Index i = m - 1; i >= 0; --i) {\n    for (Index j = 0; j < n; ++j) {\n\n      // Compute AX = \\sum_{k=i+1}^m A_{ik} X_{kj}\n      Scalar AX;\n      if (i == m - 1) {\n\tAX = 0; \n      } else {\n\tMatrix<Scalar,1,1> AXmatrix = A.row(i).tail(m-1-i) * X.col(j).tail(m-1-i);\n\tAX = AXmatrix(0,0);\n      }\n\n      // Compute XB = \\sum_{k=1}^{j-1} X_{ik} B_{kj}\n      Scalar XB;\n      if (j == 0) {\n\tXB = 0; \n      } else {\n\tMatrix<Scalar,1,1> XBmatrix = X.row(i).head(j) * B.col(j).head(j);\n\tXB = XBmatrix(0,0);\n      }\n\n      X(i,j) = (C(i,j) - AX - XB) / (A(i,i) + B(j,j));\n    }\n  }\n  return X;\n}\n\n/** \\brief Compute part of matrix function above block diagonal.\n  *\n  * This routine completes the computation of \\p fT, denoting a matrix function applied to the triangular\n  * matrix \\p T. It assumes that the block diagonal part of \\p fT has already been computed. The part below\n  * the diagonal is zero, because \\p T is upper triangular.\n  */\ntemplate <typename MatrixType, typename VectorType>\nvoid matrix_function_compute_above_diagonal(const MatrixType& T, const VectorType& blockStart, const VectorType& clusterSize, MatrixType& fT)\n{ \n  typedef internal::traits<MatrixType> Traits;\n  typedef typename MatrixType::Scalar Scalar;\n  static const int Options = MatrixType::Options;\n  typedef Matrix<Scalar, Dynamic, Dynamic, Options, Traits::RowsAtCompileTime, Traits::ColsAtCompileTime> DynMatrixType;\n\n  for (Index k = 1; k < clusterSize.rows(); k++) {\n    for (Index i = 0; i < clusterSize.rows() - k; i++) {\n      // compute (i, i+k) block\n      DynMatrixType A = T.block(blockStart(i), blockStart(i), clusterSize(i), clusterSize(i));\n      DynMatrixType B = -T.block(blockStart(i+k), blockStart(i+k), clusterSize(i+k), clusterSize(i+k));\n      DynMatrixType C = fT.block(blockStart(i), blockStart(i), clusterSize(i), clusterSize(i))\n        * T.block(blockStart(i), blockStart(i+k), clusterSize(i), clusterSize(i+k));\n      C -= T.block(blockStart(i), blockStart(i+k), clusterSize(i), clusterSize(i+k))\n        * fT.block(blockStart(i+k), blockStart(i+k), clusterSize(i+k), clusterSize(i+k));\n      for (Index m = i + 1; m < i + k; m++) {\n        C += fT.block(blockStart(i), blockStart(m), clusterSize(i), clusterSize(m))\n          * T.block(blockStart(m), blockStart(i+k), clusterSize(m), clusterSize(i+k));\n        C -= T.block(blockStart(i), blockStart(m), clusterSize(i), clusterSize(m))\n          * fT.block(blockStart(m), blockStart(i+k), clusterSize(m), clusterSize(i+k));\n      }\n      fT.block(blockStart(i), blockStart(i+k), clusterSize(i), clusterSize(i+k))\n        = matrix_function_solve_triangular_sylvester(A, B, C);\n    }\n  }\n}\n\n/** \\ingroup MatrixFunctions_Module\n  * \\brief Class for computing matrix functions.\n  * \\tparam  MatrixType  type of the argument of the matrix function,\n  *                      expected to be an instantiation of the Matrix class template.\n  * \\tparam  AtomicType  type for computing matrix function of atomic blocks.\n  * \\tparam  IsComplex   used internally to select correct specialization.\n  *\n  * This class implements the Schur-Parlett algorithm for computing matrix functions. The spectrum of the\n  * matrix is divided in clustered of eigenvalues that lies close together. This class delegates the\n  * computation of the matrix function on every block corresponding to these clusters to an object of type\n  * \\p AtomicType and uses these results to compute the matrix function of the whole matrix. The class\n  * \\p AtomicType should have a \\p compute() member function for computing the matrix function of a block.\n  *\n  * \\sa class MatrixFunctionAtomic, class MatrixLogarithmAtomic\n  */\ntemplate <typename MatrixType, int IsComplex = NumTraits<typename internal::traits<MatrixType>::Scalar>::IsComplex>\nstruct matrix_function_compute\n{  \n    /** \\brief Compute the matrix function.\n      *\n      * \\param[in]  A       argument of matrix function, should be a square matrix.\n      * \\param[in]  atomic  class for computing matrix function of atomic blocks.\n      * \\param[out] result  the function \\p f applied to \\p A, as\n      * specified in the constructor.\n      *\n      * See MatrixBase::matrixFunction() for details on how this computation\n      * is implemented.\n      */\n    template <typename AtomicType, typename ResultType> \n    static void run(const MatrixType& A, AtomicType& atomic, ResultType &result);    \n};\n\n/** \\internal \\ingroup MatrixFunctions_Module \n  * \\brief Partial specialization of MatrixFunction for real matrices\n  *\n  * This converts the real matrix to a complex matrix, compute the matrix function of that matrix, and then\n  * converts the result back to a real matrix.\n  */\ntemplate <typename MatrixType>\nstruct matrix_function_compute<MatrixType, 0>\n{  \n  template <typename MatA, typename AtomicType, typename ResultType>\n  static void run(const MatA& A, AtomicType& atomic, ResultType &result)\n  {\n    typedef internal::traits<MatrixType> Traits;\n    typedef typename Traits::Scalar Scalar;\n    static const int Rows = Traits::RowsAtCompileTime, Cols = Traits::ColsAtCompileTime;\n    static const int MaxRows = Traits::MaxRowsAtCompileTime, MaxCols = Traits::MaxColsAtCompileTime;\n\n    typedef std::complex<Scalar> ComplexScalar;\n    typedef Matrix<ComplexScalar, Rows, Cols, 0, MaxRows, MaxCols> ComplexMatrix;\n\n    ComplexMatrix CA = A.template cast<ComplexScalar>();\n    ComplexMatrix Cresult;\n    matrix_function_compute<ComplexMatrix>::run(CA, atomic, Cresult);\n    result = Cresult.real();\n  }\n};\n\n/** \\internal \\ingroup MatrixFunctions_Module \n  * \\brief Partial specialization of MatrixFunction for complex matrices\n  */\ntemplate <typename MatrixType>\nstruct matrix_function_compute<MatrixType, 1>\n{\n  template <typename MatA, typename AtomicType, typename ResultType>\n  static void run(const MatA& A, AtomicType& atomic, ResultType &result)\n  {\n    typedef internal::traits<MatrixType> Traits;\n    \n    // compute Schur decomposition of A\n    const ComplexSchur<MatrixType> schurOfA(A);\n    eigen_assert(schurOfA.info()==Success);\n    MatrixType T = schurOfA.matrixT();\n    MatrixType U = schurOfA.matrixU();\n\n    // partition eigenvalues into clusters of ei'vals \"close\" to each other\n    std::list<std::list<Index> > clusters; \n    matrix_function_partition_eigenvalues(T.diagonal(), clusters);\n\n    // compute size of each cluster\n    Matrix<Index, Dynamic, 1> clusterSize;\n    matrix_function_compute_cluster_size(clusters, clusterSize);\n\n    // blockStart[i] is row index at which block corresponding to i-th cluster starts \n    Matrix<Index, Dynamic, 1> blockStart; \n    matrix_function_compute_block_start(clusterSize, blockStart);\n\n    // compute map so that eivalToCluster[i] = j means that i-th ei'val is in j-th cluster \n    Matrix<Index, Dynamic, 1> eivalToCluster;\n    matrix_function_compute_map(T.diagonal(), clusters, eivalToCluster);\n\n    // compute permutation which groups ei'vals in same cluster together \n    Matrix<Index, Traits::RowsAtCompileTime, 1> permutation;\n    matrix_function_compute_permutation(blockStart, eivalToCluster, permutation);\n\n    // permute Schur decomposition\n    matrix_function_permute_schur(permutation, U, T);\n\n    // compute result\n    MatrixType fT; // matrix function applied to T\n    matrix_function_compute_block_atomic(T, atomic, blockStart, clusterSize, fT);\n    matrix_function_compute_above_diagonal(T, blockStart, clusterSize, fT);\n    result = U * (fT.template triangularView<Upper>() * U.adjoint());\n  }\n};\n\n} // end of namespace internal\n\n/** \\ingroup MatrixFunctions_Module\n  *\n  * \\brief Proxy for the matrix function of some matrix (expression).\n  *\n  * \\tparam Derived  Type of the argument to the matrix function.\n  *\n  * This class holds the argument to the matrix function until it is assigned or evaluated for some other\n  * reason (so the argument should not be changed in the meantime). It is the return type of\n  * matrixBase::matrixFunction() and related functions and most of the time this is the only way it is used.\n  */\ntemplate<typename Derived> class MatrixFunctionReturnValue\n: public ReturnByValue<MatrixFunctionReturnValue<Derived> >\n{\n  public:\n    typedef typename Derived::Scalar Scalar;\n    typedef typename internal::stem_function<Scalar>::type StemFunction;\n\n  protected:\n    typedef typename internal::ref_selector<Derived>::type DerivedNested;\n\n  public:\n\n    /** \\brief Constructor.\n      *\n      * \\param[in] A  %Matrix (expression) forming the argument of the matrix function.\n      * \\param[in] f  Stem function for matrix function under consideration.\n      */\n    MatrixFunctionReturnValue(const Derived& A, StemFunction f) : m_A(A), m_f(f) { }\n\n    /** \\brief Compute the matrix function.\n      *\n      * \\param[out] result \\p f applied to \\p A, where \\p f and \\p A are as in the constructor.\n      */\n    template <typename ResultType>\n    inline void evalTo(ResultType& result) const\n    {\n      typedef typename internal::nested_eval<Derived, 10>::type NestedEvalType;\n      typedef typename internal::remove_all<NestedEvalType>::type NestedEvalTypeClean;\n      typedef internal::traits<NestedEvalTypeClean> Traits;\n      typedef std::complex<typename NumTraits<Scalar>::Real> ComplexScalar;\n      typedef Matrix<ComplexScalar, Dynamic, Dynamic, 0, Traits::RowsAtCompileTime, Traits::ColsAtCompileTime> DynMatrixType;\n\n      typedef internal::MatrixFunctionAtomic<DynMatrixType> AtomicType;\n      AtomicType atomic(m_f);\n\n      internal::matrix_function_compute<typename NestedEvalTypeClean::PlainObject>::run(m_A, atomic, result);\n    }\n\n    Index rows() const { return m_A.rows(); }\n    Index cols() const { return m_A.cols(); }\n\n  private:\n    const DerivedNested m_A;\n    StemFunction *m_f;\n};\n\nnamespace internal {\ntemplate<typename Derived>\nstruct traits<MatrixFunctionReturnValue<Derived> >\n{\n  typedef typename Derived::PlainObject ReturnType;\n};\n}\n\n\n/********** MatrixBase methods **********/\n\n\ntemplate <typename Derived>\nconst MatrixFunctionReturnValue<Derived> MatrixBase<Derived>::matrixFunction(typename internal::stem_function<typename internal::traits<Derived>::Scalar>::type f) const\n{\n  eigen_assert(rows() == cols());\n  return MatrixFunctionReturnValue<Derived>(derived(), f);\n}\n\ntemplate <typename Derived>\nconst MatrixFunctionReturnValue<Derived> MatrixBase<Derived>::sin() const\n{\n  eigen_assert(rows() == cols());\n  typedef typename internal::stem_function<Scalar>::ComplexScalar ComplexScalar;\n  return MatrixFunctionReturnValue<Derived>(derived(), internal::stem_function_sin<ComplexScalar>);\n}\n\ntemplate <typename Derived>\nconst MatrixFunctionReturnValue<Derived> MatrixBase<Derived>::cos() const\n{\n  eigen_assert(rows() == cols());\n  typedef typename internal::stem_function<Scalar>::ComplexScalar ComplexScalar;\n  return MatrixFunctionReturnValue<Derived>(derived(), internal::stem_function_cos<ComplexScalar>);\n}\n\ntemplate <typename Derived>\nconst MatrixFunctionReturnValue<Derived> MatrixBase<Derived>::sinh() const\n{\n  eigen_assert(rows() == cols());\n  typedef typename internal::stem_function<Scalar>::ComplexScalar ComplexScalar;\n  return MatrixFunctionReturnValue<Derived>(derived(), internal::stem_function_sinh<ComplexScalar>);\n}\n\ntemplate <typename Derived>\nconst MatrixFunctionReturnValue<Derived> MatrixBase<Derived>::cosh() const\n{\n  eigen_assert(rows() == cols());\n  typedef typename internal::stem_function<Scalar>::ComplexScalar ComplexScalar;\n  return MatrixFunctionReturnValue<Derived>(derived(), internal::stem_function_cosh<ComplexScalar>);\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_MATRIX_FUNCTION_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/MatrixFunctions/MatrixLogarithm.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2011, 2013 Jitse Niesen <jitse@maths.leeds.ac.uk>\n// Copyright (C) 2011 Chen-Pang He <jdh8@ms63.hinet.net>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_MATRIX_LOGARITHM\n#define EIGEN_MATRIX_LOGARITHM\n\nnamespace Eigen { \n\nnamespace internal { \n\ntemplate <typename Scalar>\nstruct matrix_log_min_pade_degree \n{\n  static const int value = 3;\n};\n\ntemplate <typename Scalar>\nstruct matrix_log_max_pade_degree \n{\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  static const int value = std::numeric_limits<RealScalar>::digits<= 24?  5:  // single precision\n                           std::numeric_limits<RealScalar>::digits<= 53?  7:  // double precision\n                           std::numeric_limits<RealScalar>::digits<= 64?  8:  // extended precision\n                           std::numeric_limits<RealScalar>::digits<=106? 10:  // double-double\n                                                                         11;  // quadruple precision\n};\n\n/** \\brief Compute logarithm of 2x2 triangular matrix. */\ntemplate <typename MatrixType>\nvoid matrix_log_compute_2x2(const MatrixType& A, MatrixType& result)\n{\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename MatrixType::RealScalar RealScalar;\n  using std::abs;\n  using std::ceil;\n  using std::imag;\n  using std::log;\n\n  Scalar logA00 = log(A(0,0));\n  Scalar logA11 = log(A(1,1));\n\n  result(0,0) = logA00;\n  result(1,0) = Scalar(0);\n  result(1,1) = logA11;\n\n  Scalar y = A(1,1) - A(0,0);\n  if (y==Scalar(0))\n  {\n    result(0,1) = A(0,1) / A(0,0);\n  }\n  else if ((abs(A(0,0)) < RealScalar(0.5)*abs(A(1,1))) || (abs(A(0,0)) > 2*abs(A(1,1))))\n  {\n    result(0,1) = A(0,1) * (logA11 - logA00) / y;\n  }\n  else\n  {\n    // computation in previous branch is inaccurate if A(1,1) \\approx A(0,0)\n    RealScalar unwindingNumber = ceil((imag(logA11 - logA00) - RealScalar(EIGEN_PI)) / RealScalar(2*EIGEN_PI));\n    result(0,1) = A(0,1) * (numext::log1p(y/A(0,0)) + Scalar(0,RealScalar(2*EIGEN_PI)*unwindingNumber)) / y;\n  }\n}\n\n/* \\brief Get suitable degree for Pade approximation. (specialized for RealScalar = float) */\ninline int matrix_log_get_pade_degree(float normTminusI)\n{\n  const float maxNormForPade[] = { 2.5111573934555054e-1 /* degree = 3 */ , 4.0535837411880493e-1,\n            5.3149729967117310e-1 };\n  const int minPadeDegree = matrix_log_min_pade_degree<float>::value;\n  const int maxPadeDegree = matrix_log_max_pade_degree<float>::value;\n  int degree = minPadeDegree;\n  for (; degree <= maxPadeDegree; ++degree) \n    if (normTminusI <= maxNormForPade[degree - minPadeDegree])\n      break;\n  return degree;\n}\n\n/* \\brief Get suitable degree for Pade approximation. (specialized for RealScalar = double) */\ninline int matrix_log_get_pade_degree(double normTminusI)\n{\n  const double maxNormForPade[] = { 1.6206284795015624e-2 /* degree = 3 */ , 5.3873532631381171e-2,\n            1.1352802267628681e-1, 1.8662860613541288e-1, 2.642960831111435e-1 };\n  const int minPadeDegree = matrix_log_min_pade_degree<double>::value;\n  const int maxPadeDegree = matrix_log_max_pade_degree<double>::value;\n  int degree = minPadeDegree;\n  for (; degree <= maxPadeDegree; ++degree)\n    if (normTminusI <= maxNormForPade[degree - minPadeDegree])\n      break;\n  return degree;\n}\n\n/* \\brief Get suitable degree for Pade approximation. (specialized for RealScalar = long double) */\ninline int matrix_log_get_pade_degree(long double normTminusI)\n{\n#if   LDBL_MANT_DIG == 53         // double precision\n  const long double maxNormForPade[] = { 1.6206284795015624e-2L /* degree = 3 */ , 5.3873532631381171e-2L,\n            1.1352802267628681e-1L, 1.8662860613541288e-1L, 2.642960831111435e-1L };\n#elif LDBL_MANT_DIG <= 64         // extended precision\n  const long double maxNormForPade[] = { 5.48256690357782863103e-3L /* degree = 3 */, 2.34559162387971167321e-2L,\n            5.84603923897347449857e-2L, 1.08486423756725170223e-1L, 1.68385767881294446649e-1L,\n            2.32777776523703892094e-1L };\n#elif LDBL_MANT_DIG <= 106        // double-double\n  const long double maxNormForPade[] = { 8.58970550342939562202529664318890e-5L /* degree = 3 */,\n            9.34074328446359654039446552677759e-4L, 4.26117194647672175773064114582860e-3L,\n            1.21546224740281848743149666560464e-2L, 2.61100544998339436713088248557444e-2L,\n            4.66170074627052749243018566390567e-2L, 7.32585144444135027565872014932387e-2L,\n            1.05026503471351080481093652651105e-1L };\n#else                             // quadruple precision\n  const long double maxNormForPade[] = { 4.7419931187193005048501568167858103e-5L /* degree = 3 */,\n            5.8853168473544560470387769480192666e-4L, 2.9216120366601315391789493628113520e-3L,\n            8.8415758124319434347116734705174308e-3L, 1.9850836029449446668518049562565291e-2L,\n            3.6688019729653446926585242192447447e-2L, 5.9290962294020186998954055264528393e-2L,\n            8.6998436081634343903250580992127677e-2L, 1.1880960220216759245467951592883642e-1L };\n#endif\n  const int minPadeDegree = matrix_log_min_pade_degree<long double>::value;\n  const int maxPadeDegree = matrix_log_max_pade_degree<long double>::value;\n  int degree = minPadeDegree;\n  for (; degree <= maxPadeDegree; ++degree)\n    if (normTminusI <= maxNormForPade[degree - minPadeDegree])\n      break;\n  return degree;\n}\n\n/* \\brief Compute Pade approximation to matrix logarithm */\ntemplate <typename MatrixType>\nvoid matrix_log_compute_pade(MatrixType& result, const MatrixType& T, int degree)\n{\n  typedef typename NumTraits<typename MatrixType::Scalar>::Real RealScalar;\n  const int minPadeDegree = 3;\n  const int maxPadeDegree = 11;\n  assert(degree >= minPadeDegree && degree <= maxPadeDegree);\n  // FIXME this creates float-conversion-warnings if these are enabled.\n  // Either manually convert each value, or disable the warning locally\n  const RealScalar nodes[][maxPadeDegree] = { \n    { 0.1127016653792583114820734600217600L, 0.5000000000000000000000000000000000L,  // degree 3\n      0.8872983346207416885179265399782400L }, \n    { 0.0694318442029737123880267555535953L, 0.3300094782075718675986671204483777L,  // degree 4\n      0.6699905217924281324013328795516223L, 0.9305681557970262876119732444464048L },\n    { 0.0469100770306680036011865608503035L, 0.2307653449471584544818427896498956L,  // degree 5\n      0.5000000000000000000000000000000000L, 0.7692346550528415455181572103501044L,\n      0.9530899229693319963988134391496965L },\n    { 0.0337652428984239860938492227530027L, 0.1693953067668677431693002024900473L,  // degree 6\n      0.3806904069584015456847491391596440L, 0.6193095930415984543152508608403560L,\n      0.8306046932331322568306997975099527L, 0.9662347571015760139061507772469973L },\n    { 0.0254460438286207377369051579760744L, 0.1292344072003027800680676133596058L,  // degree 7\n      0.2970774243113014165466967939615193L, 0.5000000000000000000000000000000000L,\n      0.7029225756886985834533032060384807L, 0.8707655927996972199319323866403942L,\n      0.9745539561713792622630948420239256L },\n    { 0.0198550717512318841582195657152635L, 0.1016667612931866302042230317620848L,  // degree 8\n      0.2372337950418355070911304754053768L, 0.4082826787521750975302619288199080L,\n      0.5917173212478249024697380711800920L, 0.7627662049581644929088695245946232L,\n      0.8983332387068133697957769682379152L, 0.9801449282487681158417804342847365L },\n    { 0.0159198802461869550822118985481636L, 0.0819844463366821028502851059651326L,  // degree 9\n      0.1933142836497048013456489803292629L, 0.3378732882980955354807309926783317L,\n      0.5000000000000000000000000000000000L, 0.6621267117019044645192690073216683L,\n      0.8066857163502951986543510196707371L, 0.9180155536633178971497148940348674L,\n      0.9840801197538130449177881014518364L },\n    { 0.0130467357414141399610179939577740L, 0.0674683166555077446339516557882535L,  // degree 10\n      0.1602952158504877968828363174425632L, 0.2833023029353764046003670284171079L,\n      0.4255628305091843945575869994351400L, 0.5744371694908156054424130005648600L,\n      0.7166976970646235953996329715828921L, 0.8397047841495122031171636825574368L,\n      0.9325316833444922553660483442117465L, 0.9869532642585858600389820060422260L },\n    { 0.0108856709269715035980309994385713L, 0.0564687001159523504624211153480364L,  // degree 11\n      0.1349239972129753379532918739844233L, 0.2404519353965940920371371652706952L,\n      0.3652284220238275138342340072995692L, 0.5000000000000000000000000000000000L,\n      0.6347715779761724861657659927004308L, 0.7595480646034059079628628347293048L,\n      0.8650760027870246620467081260155767L, 0.9435312998840476495375788846519636L,\n      0.9891143290730284964019690005614287L } };\n\n  const RealScalar weights[][maxPadeDegree] = { \n    { 0.2777777777777777777777777777777778L, 0.4444444444444444444444444444444444L,  // degree 3\n      0.2777777777777777777777777777777778L },\n    { 0.1739274225687269286865319746109997L, 0.3260725774312730713134680253890003L,  // degree 4\n      0.3260725774312730713134680253890003L, 0.1739274225687269286865319746109997L },\n    { 0.1184634425280945437571320203599587L, 0.2393143352496832340206457574178191L,  // degree 5\n      0.2844444444444444444444444444444444L, 0.2393143352496832340206457574178191L,\n      0.1184634425280945437571320203599587L },\n    { 0.0856622461895851725201480710863665L, 0.1803807865240693037849167569188581L,  // degree 6\n      0.2339569672863455236949351719947755L, 0.2339569672863455236949351719947755L,\n      0.1803807865240693037849167569188581L, 0.0856622461895851725201480710863665L },\n    { 0.0647424830844348466353057163395410L, 0.1398526957446383339507338857118898L,  // degree 7\n      0.1909150252525594724751848877444876L, 0.2089795918367346938775510204081633L,\n      0.1909150252525594724751848877444876L, 0.1398526957446383339507338857118898L,\n      0.0647424830844348466353057163395410L },\n    { 0.0506142681451881295762656771549811L, 0.1111905172266872352721779972131204L,  // degree 8\n      0.1568533229389436436689811009933007L, 0.1813418916891809914825752246385978L,\n      0.1813418916891809914825752246385978L, 0.1568533229389436436689811009933007L,\n      0.1111905172266872352721779972131204L, 0.0506142681451881295762656771549811L },\n    { 0.0406371941807872059859460790552618L, 0.0903240803474287020292360156214564L,  // degree 9\n      0.1303053482014677311593714347093164L, 0.1561735385200014200343152032922218L,\n      0.1651196775006298815822625346434870L, 0.1561735385200014200343152032922218L,\n      0.1303053482014677311593714347093164L, 0.0903240803474287020292360156214564L,\n      0.0406371941807872059859460790552618L },\n    { 0.0333356721543440687967844049466659L, 0.0747256745752902965728881698288487L,  // degree 10\n      0.1095431812579910219977674671140816L, 0.1346333596549981775456134607847347L,\n      0.1477621123573764350869464973256692L, 0.1477621123573764350869464973256692L,\n      0.1346333596549981775456134607847347L, 0.1095431812579910219977674671140816L,\n      0.0747256745752902965728881698288487L, 0.0333356721543440687967844049466659L },\n    { 0.0278342835580868332413768602212743L, 0.0627901847324523123173471496119701L,  // degree 11\n      0.0931451054638671257130488207158280L, 0.1165968822959952399592618524215876L,\n      0.1314022722551233310903444349452546L, 0.1364625433889503153572417641681711L,\n      0.1314022722551233310903444349452546L, 0.1165968822959952399592618524215876L,\n      0.0931451054638671257130488207158280L, 0.0627901847324523123173471496119701L,\n      0.0278342835580868332413768602212743L } };\n\n  MatrixType TminusI = T - MatrixType::Identity(T.rows(), T.rows());\n  result.setZero(T.rows(), T.rows());\n  for (int k = 0; k < degree; ++k) {\n    RealScalar weight = weights[degree-minPadeDegree][k];\n    RealScalar node = nodes[degree-minPadeDegree][k];\n    result += weight * (MatrixType::Identity(T.rows(), T.rows()) + node * TminusI)\n                       .template triangularView<Upper>().solve(TminusI);\n  }\n} \n\n/** \\brief Compute logarithm of triangular matrices with size > 2. \n  * \\details This uses a inverse scale-and-square algorithm. */\ntemplate <typename MatrixType>\nvoid matrix_log_compute_big(const MatrixType& A, MatrixType& result)\n{\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  using std::pow;\n\n  int numberOfSquareRoots = 0;\n  int numberOfExtraSquareRoots = 0;\n  int degree;\n  MatrixType T = A, sqrtT;\n\n  const int maxPadeDegree = matrix_log_max_pade_degree<Scalar>::value;\n  const RealScalar maxNormForPade = RealScalar(\n                                    maxPadeDegree<= 5? 5.3149729967117310e-1L:                    // single precision\n                                    maxPadeDegree<= 7? 2.6429608311114350e-1L:                    // double precision\n                                    maxPadeDegree<= 8? 2.32777776523703892094e-1L:                // extended precision\n                                    maxPadeDegree<=10? 1.05026503471351080481093652651105e-1L:    // double-double\n                                                       1.1880960220216759245467951592883642e-1L); // quadruple precision\n\n  while (true) {\n    RealScalar normTminusI = (T - MatrixType::Identity(T.rows(), T.rows())).cwiseAbs().colwise().sum().maxCoeff();\n    if (normTminusI < maxNormForPade) {\n      degree = matrix_log_get_pade_degree(normTminusI);\n      int degree2 = matrix_log_get_pade_degree(normTminusI / RealScalar(2));\n      if ((degree - degree2 <= 1) || (numberOfExtraSquareRoots == 1)) \n        break;\n      ++numberOfExtraSquareRoots;\n    }\n    matrix_sqrt_triangular(T, sqrtT);\n    T = sqrtT.template triangularView<Upper>();\n    ++numberOfSquareRoots;\n  }\n\n  matrix_log_compute_pade(result, T, degree);\n  result *= pow(RealScalar(2), RealScalar(numberOfSquareRoots)); // TODO replace by bitshift if possible\n}\n\n/** \\ingroup MatrixFunctions_Module\n  * \\class MatrixLogarithmAtomic\n  * \\brief Helper class for computing matrix logarithm of atomic matrices.\n  *\n  * Here, an atomic matrix is a triangular matrix whose diagonal entries are close to each other.\n  *\n  * \\sa class MatrixFunctionAtomic, MatrixBase::log()\n  */\ntemplate <typename MatrixType>\nclass MatrixLogarithmAtomic\n{\npublic:\n  /** \\brief Compute matrix logarithm of atomic matrix\n    * \\param[in]  A  argument of matrix logarithm, should be upper triangular and atomic\n    * \\returns  The logarithm of \\p A.\n    */\n  MatrixType compute(const MatrixType& A);\n};\n\ntemplate <typename MatrixType>\nMatrixType MatrixLogarithmAtomic<MatrixType>::compute(const MatrixType& A)\n{\n  using std::log;\n  MatrixType result(A.rows(), A.rows());\n  if (A.rows() == 1)\n    result(0,0) = log(A(0,0));\n  else if (A.rows() == 2)\n    matrix_log_compute_2x2(A, result);\n  else\n    matrix_log_compute_big(A, result);\n  return result;\n}\n\n} // end of namespace internal\n\n/** \\ingroup MatrixFunctions_Module\n  *\n  * \\brief Proxy for the matrix logarithm of some matrix (expression).\n  *\n  * \\tparam Derived  Type of the argument to the matrix function.\n  *\n  * This class holds the argument to the matrix function until it is\n  * assigned or evaluated for some other reason (so the argument\n  * should not be changed in the meantime). It is the return type of\n  * MatrixBase::log() and most of the time this is the only way it\n  * is used.\n  */\ntemplate<typename Derived> class MatrixLogarithmReturnValue\n: public ReturnByValue<MatrixLogarithmReturnValue<Derived> >\n{\npublic:\n  typedef typename Derived::Scalar Scalar;\n  typedef typename Derived::Index Index;\n\nprotected:\n  typedef typename internal::ref_selector<Derived>::type DerivedNested;\n\npublic:\n\n  /** \\brief Constructor.\n    *\n    * \\param[in]  A  %Matrix (expression) forming the argument of the matrix logarithm.\n    */\n  explicit MatrixLogarithmReturnValue(const Derived& A) : m_A(A) { }\n  \n  /** \\brief Compute the matrix logarithm.\n    *\n    * \\param[out]  result  Logarithm of \\c A, where \\c A is as specified in the constructor.\n    */\n  template <typename ResultType>\n  inline void evalTo(ResultType& result) const\n  {\n    typedef typename internal::nested_eval<Derived, 10>::type DerivedEvalType;\n    typedef typename internal::remove_all<DerivedEvalType>::type DerivedEvalTypeClean;\n    typedef internal::traits<DerivedEvalTypeClean> Traits;\n    typedef std::complex<typename NumTraits<Scalar>::Real> ComplexScalar;\n    typedef Matrix<ComplexScalar, Dynamic, Dynamic, 0, Traits::RowsAtCompileTime, Traits::ColsAtCompileTime> DynMatrixType;\n    typedef internal::MatrixLogarithmAtomic<DynMatrixType> AtomicType;\n    AtomicType atomic;\n    \n    internal::matrix_function_compute<typename DerivedEvalTypeClean::PlainObject>::run(m_A, atomic, result);\n  }\n\n  Index rows() const { return m_A.rows(); }\n  Index cols() const { return m_A.cols(); }\n  \nprivate:\n  const DerivedNested m_A;\n};\n\nnamespace internal {\n  template<typename Derived>\n  struct traits<MatrixLogarithmReturnValue<Derived> >\n  {\n    typedef typename Derived::PlainObject ReturnType;\n  };\n}\n\n\n/********** MatrixBase method **********/\n\n\ntemplate <typename Derived>\nconst MatrixLogarithmReturnValue<Derived> MatrixBase<Derived>::log() const\n{\n  eigen_assert(rows() == cols());\n  return MatrixLogarithmReturnValue<Derived>(derived());\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_MATRIX_LOGARITHM\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/MatrixFunctions/MatrixPower.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012, 2013 Chen-Pang He <jdh8@ms63.hinet.net>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_MATRIX_POWER\n#define EIGEN_MATRIX_POWER\n\nnamespace Eigen {\n\ntemplate<typename MatrixType> class MatrixPower;\n\n/**\n * \\ingroup MatrixFunctions_Module\n *\n * \\brief Proxy for the matrix power of some matrix.\n *\n * \\tparam MatrixType  type of the base, a matrix.\n *\n * This class holds the arguments to the matrix power until it is\n * assigned or evaluated for some other reason (so the argument\n * should not be changed in the meantime). It is the return type of\n * MatrixPower::operator() and related functions and most of the\n * time this is the only way it is used.\n */\n/* TODO This class is only used by MatrixPower, so it should be nested\n * into MatrixPower, like MatrixPower::ReturnValue. However, my\n * compiler complained about unused template parameter in the\n * following declaration in namespace internal.\n *\n * template<typename MatrixType>\n * struct traits<MatrixPower<MatrixType>::ReturnValue>;\n */\ntemplate<typename MatrixType>\nclass MatrixPowerParenthesesReturnValue : public ReturnByValue< MatrixPowerParenthesesReturnValue<MatrixType> >\n{\n  public:\n    typedef typename MatrixType::RealScalar RealScalar;\n\n    /**\n     * \\brief Constructor.\n     *\n     * \\param[in] pow  %MatrixPower storing the base.\n     * \\param[in] p    scalar, the exponent of the matrix power.\n     */\n    MatrixPowerParenthesesReturnValue(MatrixPower<MatrixType>& pow, RealScalar p) : m_pow(pow), m_p(p)\n    { }\n\n    /**\n     * \\brief Compute the matrix power.\n     *\n     * \\param[out] result\n     */\n    template<typename ResultType>\n    inline void evalTo(ResultType& result) const\n    { m_pow.compute(result, m_p); }\n\n    Index rows() const { return m_pow.rows(); }\n    Index cols() const { return m_pow.cols(); }\n\n  private:\n    MatrixPower<MatrixType>& m_pow;\n    const RealScalar m_p;\n};\n\n/**\n * \\ingroup MatrixFunctions_Module\n *\n * \\brief Class for computing matrix powers.\n *\n * \\tparam MatrixType  type of the base, expected to be an instantiation\n * of the Matrix class template.\n *\n * This class is capable of computing triangular real/complex matrices\n * raised to a power in the interval \\f$ (-1, 1) \\f$.\n *\n * \\note Currently this class is only used by MatrixPower. One may\n * insist that this be nested into MatrixPower. This class is here to\n * facilitate future development of triangular matrix functions.\n */\ntemplate<typename MatrixType>\nclass MatrixPowerAtomic : internal::noncopyable\n{\n  private:\n    enum {\n      RowsAtCompileTime = MatrixType::RowsAtCompileTime,\n      MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime\n    };\n    typedef typename MatrixType::Scalar Scalar;\n    typedef typename MatrixType::RealScalar RealScalar;\n    typedef std::complex<RealScalar> ComplexScalar;\n    typedef Block<MatrixType,Dynamic,Dynamic> ResultType;\n\n    const MatrixType& m_A;\n    RealScalar m_p;\n\n    void computePade(int degree, const MatrixType& IminusT, ResultType& res) const;\n    void compute2x2(ResultType& res, RealScalar p) const;\n    void computeBig(ResultType& res) const;\n    static int getPadeDegree(float normIminusT);\n    static int getPadeDegree(double normIminusT);\n    static int getPadeDegree(long double normIminusT);\n    static ComplexScalar computeSuperDiag(const ComplexScalar&, const ComplexScalar&, RealScalar p);\n    static RealScalar computeSuperDiag(RealScalar, RealScalar, RealScalar p);\n\n  public:\n    /**\n     * \\brief Constructor.\n     *\n     * \\param[in] T  the base of the matrix power.\n     * \\param[in] p  the exponent of the matrix power, should be in\n     * \\f$ (-1, 1) \\f$.\n     *\n     * The class stores a reference to T, so it should not be changed\n     * (or destroyed) before evaluation. Only the upper triangular\n     * part of T is read.\n     */\n    MatrixPowerAtomic(const MatrixType& T, RealScalar p);\n    \n    /**\n     * \\brief Compute the matrix power.\n     *\n     * \\param[out] res  \\f$ A^p \\f$ where A and p are specified in the\n     * constructor.\n     */\n    void compute(ResultType& res) const;\n};\n\ntemplate<typename MatrixType>\nMatrixPowerAtomic<MatrixType>::MatrixPowerAtomic(const MatrixType& T, RealScalar p) :\n  m_A(T), m_p(p)\n{\n  eigen_assert(T.rows() == T.cols());\n  eigen_assert(p > -1 && p < 1);\n}\n\ntemplate<typename MatrixType>\nvoid MatrixPowerAtomic<MatrixType>::compute(ResultType& res) const\n{\n  using std::pow;\n  switch (m_A.rows()) {\n    case 0:\n      break;\n    case 1:\n      res(0,0) = pow(m_A(0,0), m_p);\n      break;\n    case 2:\n      compute2x2(res, m_p);\n      break;\n    default:\n      computeBig(res);\n  }\n}\n\ntemplate<typename MatrixType>\nvoid MatrixPowerAtomic<MatrixType>::computePade(int degree, const MatrixType& IminusT, ResultType& res) const\n{\n  int i = 2*degree;\n  res = (m_p-RealScalar(degree)) / RealScalar(2*i-2) * IminusT;\n\n  for (--i; i; --i) {\n    res = (MatrixType::Identity(IminusT.rows(), IminusT.cols()) + res).template triangularView<Upper>()\n\t.solve((i==1 ? -m_p : i&1 ? (-m_p-RealScalar(i/2))/RealScalar(2*i) : (m_p-RealScalar(i/2))/RealScalar(2*i-2)) * IminusT).eval();\n  }\n  res += MatrixType::Identity(IminusT.rows(), IminusT.cols());\n}\n\n// This function assumes that res has the correct size (see bug 614)\ntemplate<typename MatrixType>\nvoid MatrixPowerAtomic<MatrixType>::compute2x2(ResultType& res, RealScalar p) const\n{\n  using std::abs;\n  using std::pow;\n  res.coeffRef(0,0) = pow(m_A.coeff(0,0), p);\n\n  for (Index i=1; i < m_A.cols(); ++i) {\n    res.coeffRef(i,i) = pow(m_A.coeff(i,i), p);\n    if (m_A.coeff(i-1,i-1) == m_A.coeff(i,i))\n      res.coeffRef(i-1,i) = p * pow(m_A.coeff(i,i), p-1);\n    else if (2*abs(m_A.coeff(i-1,i-1)) < abs(m_A.coeff(i,i)) || 2*abs(m_A.coeff(i,i)) < abs(m_A.coeff(i-1,i-1)))\n      res.coeffRef(i-1,i) = (res.coeff(i,i)-res.coeff(i-1,i-1)) / (m_A.coeff(i,i)-m_A.coeff(i-1,i-1));\n    else\n      res.coeffRef(i-1,i) = computeSuperDiag(m_A.coeff(i,i), m_A.coeff(i-1,i-1), p);\n    res.coeffRef(i-1,i) *= m_A.coeff(i-1,i);\n  }\n}\n\ntemplate<typename MatrixType>\nvoid MatrixPowerAtomic<MatrixType>::computeBig(ResultType& res) const\n{\n  using std::ldexp;\n  const int digits = std::numeric_limits<RealScalar>::digits;\n  const RealScalar maxNormForPade = RealScalar(\n                                    digits <=  24? 4.3386528e-1L                            // single precision\n                                  : digits <=  53? 2.789358995219730e-1L                    // double precision\n                                  : digits <=  64? 2.4471944416607995472e-1L                // extended precision\n                                  : digits <= 106? 1.1016843812851143391275867258512e-1L    // double-double\n                                  :                9.134603732914548552537150753385375e-2L); // quadruple precision\n  MatrixType IminusT, sqrtT, T = m_A.template triangularView<Upper>();\n  RealScalar normIminusT;\n  int degree, degree2, numberOfSquareRoots = 0;\n  bool hasExtraSquareRoot = false;\n\n  for (Index i=0; i < m_A.cols(); ++i)\n    eigen_assert(m_A(i,i) != RealScalar(0));\n\n  while (true) {\n    IminusT = MatrixType::Identity(m_A.rows(), m_A.cols()) - T;\n    normIminusT = IminusT.cwiseAbs().colwise().sum().maxCoeff();\n    if (normIminusT < maxNormForPade) {\n      degree = getPadeDegree(normIminusT);\n      degree2 = getPadeDegree(normIminusT/2);\n      if (degree - degree2 <= 1 || hasExtraSquareRoot)\n\tbreak;\n      hasExtraSquareRoot = true;\n    }\n    matrix_sqrt_triangular(T, sqrtT);\n    T = sqrtT.template triangularView<Upper>();\n    ++numberOfSquareRoots;\n  }\n  computePade(degree, IminusT, res);\n\n  for (; numberOfSquareRoots; --numberOfSquareRoots) {\n    compute2x2(res, ldexp(m_p, -numberOfSquareRoots));\n    res = res.template triangularView<Upper>() * res;\n  }\n  compute2x2(res, m_p);\n}\n  \ntemplate<typename MatrixType>\ninline int MatrixPowerAtomic<MatrixType>::getPadeDegree(float normIminusT)\n{\n  const float maxNormForPade[] = { 2.8064004e-1f /* degree = 3 */ , 4.3386528e-1f };\n  int degree = 3;\n  for (; degree <= 4; ++degree)\n    if (normIminusT <= maxNormForPade[degree - 3])\n      break;\n  return degree;\n}\n\ntemplate<typename MatrixType>\ninline int MatrixPowerAtomic<MatrixType>::getPadeDegree(double normIminusT)\n{\n  const double maxNormForPade[] = { 1.884160592658218e-2 /* degree = 3 */ , 6.038881904059573e-2, 1.239917516308172e-1,\n      1.999045567181744e-1, 2.789358995219730e-1 };\n  int degree = 3;\n  for (; degree <= 7; ++degree)\n    if (normIminusT <= maxNormForPade[degree - 3])\n      break;\n  return degree;\n}\n\ntemplate<typename MatrixType>\ninline int MatrixPowerAtomic<MatrixType>::getPadeDegree(long double normIminusT)\n{\n#if   LDBL_MANT_DIG == 53\n  const int maxPadeDegree = 7;\n  const double maxNormForPade[] = { 1.884160592658218e-2L /* degree = 3 */ , 6.038881904059573e-2L, 1.239917516308172e-1L,\n      1.999045567181744e-1L, 2.789358995219730e-1L };\n#elif LDBL_MANT_DIG <= 64\n  const int maxPadeDegree = 8;\n  const long double maxNormForPade[] = { 6.3854693117491799460e-3L /* degree = 3 */ , 2.6394893435456973676e-2L,\n      6.4216043030404063729e-2L, 1.1701165502926694307e-1L, 1.7904284231268670284e-1L, 2.4471944416607995472e-1L };\n#elif LDBL_MANT_DIG <= 106\n  const int maxPadeDegree = 10;\n  const double maxNormForPade[] = { 1.0007161601787493236741409687186e-4L /* degree = 3 */ ,\n      1.0007161601787493236741409687186e-3L, 4.7069769360887572939882574746264e-3L, 1.3220386624169159689406653101695e-2L,\n      2.8063482381631737920612944054906e-2L, 4.9625993951953473052385361085058e-2L, 7.7367040706027886224557538328171e-2L,\n      1.1016843812851143391275867258512e-1L };\n#else\n  const int maxPadeDegree = 10;\n  const double maxNormForPade[] = { 5.524506147036624377378713555116378e-5L /* degree = 3 */ ,\n      6.640600568157479679823602193345995e-4L, 3.227716520106894279249709728084626e-3L,\n      9.619593944683432960546978734646284e-3L, 2.134595382433742403911124458161147e-2L,\n      3.908166513900489428442993794761185e-2L, 6.266780814639442865832535460550138e-2L,\n      9.134603732914548552537150753385375e-2L };\n#endif\n  int degree = 3;\n  for (; degree <= maxPadeDegree; ++degree)\n    if (normIminusT <= maxNormForPade[degree - 3])\n      break;\n  return degree;\n}\n\ntemplate<typename MatrixType>\ninline typename MatrixPowerAtomic<MatrixType>::ComplexScalar\nMatrixPowerAtomic<MatrixType>::computeSuperDiag(const ComplexScalar& curr, const ComplexScalar& prev, RealScalar p)\n{\n  using std::ceil;\n  using std::exp;\n  using std::log;\n  using std::sinh;\n\n  ComplexScalar logCurr = log(curr);\n  ComplexScalar logPrev = log(prev);\n  RealScalar unwindingNumber = ceil((numext::imag(logCurr - logPrev) - RealScalar(EIGEN_PI)) / RealScalar(2*EIGEN_PI));\n  ComplexScalar w = numext::log1p((curr-prev)/prev)/RealScalar(2) + ComplexScalar(0, RealScalar(EIGEN_PI)*unwindingNumber);\n  return RealScalar(2) * exp(RealScalar(0.5) * p * (logCurr + logPrev)) * sinh(p * w) / (curr - prev);\n}\n\ntemplate<typename MatrixType>\ninline typename MatrixPowerAtomic<MatrixType>::RealScalar\nMatrixPowerAtomic<MatrixType>::computeSuperDiag(RealScalar curr, RealScalar prev, RealScalar p)\n{\n  using std::exp;\n  using std::log;\n  using std::sinh;\n\n  RealScalar w = numext::log1p((curr-prev)/prev)/RealScalar(2);\n  return 2 * exp(p * (log(curr) + log(prev)) / 2) * sinh(p * w) / (curr - prev);\n}\n\n/**\n * \\ingroup MatrixFunctions_Module\n *\n * \\brief Class for computing matrix powers.\n *\n * \\tparam MatrixType  type of the base, expected to be an instantiation\n * of the Matrix class template.\n *\n * This class is capable of computing real/complex matrices raised to\n * an arbitrary real power. Meanwhile, it saves the result of Schur\n * decomposition if an non-integral power has even been calculated.\n * Therefore, if you want to compute multiple (>= 2) matrix powers\n * for the same matrix, using the class directly is more efficient than\n * calling MatrixBase::pow().\n *\n * Example:\n * \\include MatrixPower_optimal.cpp\n * Output: \\verbinclude MatrixPower_optimal.out\n */\ntemplate<typename MatrixType>\nclass MatrixPower : internal::noncopyable\n{\n  private:\n    typedef typename MatrixType::Scalar Scalar;\n    typedef typename MatrixType::RealScalar RealScalar;\n\n  public:\n    /**\n     * \\brief Constructor.\n     *\n     * \\param[in] A  the base of the matrix power.\n     *\n     * The class stores a reference to A, so it should not be changed\n     * (or destroyed) before evaluation.\n     */\n    explicit MatrixPower(const MatrixType& A) :\n      m_A(A),\n      m_conditionNumber(0),\n      m_rank(A.cols()),\n      m_nulls(0)\n    { eigen_assert(A.rows() == A.cols()); }\n\n    /**\n     * \\brief Returns the matrix power.\n     *\n     * \\param[in] p  exponent, a real scalar.\n     * \\return The expression \\f$ A^p \\f$, where A is specified in the\n     * constructor.\n     */\n    const MatrixPowerParenthesesReturnValue<MatrixType> operator()(RealScalar p)\n    { return MatrixPowerParenthesesReturnValue<MatrixType>(*this, p); }\n\n    /**\n     * \\brief Compute the matrix power.\n     *\n     * \\param[in]  p    exponent, a real scalar.\n     * \\param[out] res  \\f$ A^p \\f$ where A is specified in the\n     * constructor.\n     */\n    template<typename ResultType>\n    void compute(ResultType& res, RealScalar p);\n    \n    Index rows() const { return m_A.rows(); }\n    Index cols() const { return m_A.cols(); }\n\n  private:\n    typedef std::complex<RealScalar> ComplexScalar;\n    typedef Matrix<ComplexScalar, Dynamic, Dynamic, 0,\n              MatrixType::RowsAtCompileTime, MatrixType::ColsAtCompileTime> ComplexMatrix;\n\n    /** \\brief Reference to the base of matrix power. */\n    typename MatrixType::Nested m_A;\n\n    /** \\brief Temporary storage. */\n    MatrixType m_tmp;\n\n    /** \\brief Store the result of Schur decomposition. */\n    ComplexMatrix m_T, m_U;\n    \n    /** \\brief Store fractional power of m_T. */\n    ComplexMatrix m_fT;\n\n    /**\n     * \\brief Condition number of m_A.\n     *\n     * It is initialized as 0 to avoid performing unnecessary Schur\n     * decomposition, which is the bottleneck.\n     */\n    RealScalar m_conditionNumber;\n\n    /** \\brief Rank of m_A. */\n    Index m_rank;\n    \n    /** \\brief Rank deficiency of m_A. */\n    Index m_nulls;\n\n    /**\n     * \\brief Split p into integral part and fractional part.\n     *\n     * \\param[in]  p        The exponent.\n     * \\param[out] p        The fractional part ranging in \\f$ (-1, 1) \\f$.\n     * \\param[out] intpart  The integral part.\n     *\n     * Only if the fractional part is nonzero, it calls initialize().\n     */\n    void split(RealScalar& p, RealScalar& intpart);\n\n    /** \\brief Perform Schur decomposition for fractional power. */\n    void initialize();\n\n    template<typename ResultType>\n    void computeIntPower(ResultType& res, RealScalar p);\n\n    template<typename ResultType>\n    void computeFracPower(ResultType& res, RealScalar p);\n\n    template<int Rows, int Cols, int Options, int MaxRows, int MaxCols>\n    static void revertSchur(\n        Matrix<ComplexScalar, Rows, Cols, Options, MaxRows, MaxCols>& res,\n        const ComplexMatrix& T,\n        const ComplexMatrix& U);\n\n    template<int Rows, int Cols, int Options, int MaxRows, int MaxCols>\n    static void revertSchur(\n        Matrix<RealScalar, Rows, Cols, Options, MaxRows, MaxCols>& res,\n        const ComplexMatrix& T,\n        const ComplexMatrix& U);\n};\n\ntemplate<typename MatrixType>\ntemplate<typename ResultType>\nvoid MatrixPower<MatrixType>::compute(ResultType& res, RealScalar p)\n{\n  using std::pow;\n  switch (cols()) {\n    case 0:\n      break;\n    case 1:\n      res(0,0) = pow(m_A.coeff(0,0), p);\n      break;\n    default:\n      RealScalar intpart;\n      split(p, intpart);\n\n      res = MatrixType::Identity(rows(), cols());\n      computeIntPower(res, intpart);\n      if (p) computeFracPower(res, p);\n  }\n}\n\ntemplate<typename MatrixType>\nvoid MatrixPower<MatrixType>::split(RealScalar& p, RealScalar& intpart)\n{\n  using std::floor;\n  using std::pow;\n\n  intpart = floor(p);\n  p -= intpart;\n\n  // Perform Schur decomposition if it is not yet performed and the power is\n  // not an integer.\n  if (!m_conditionNumber && p)\n    initialize();\n\n  // Choose the more stable of intpart = floor(p) and intpart = ceil(p).\n  if (p > RealScalar(0.5) && p > (1-p) * pow(m_conditionNumber, p)) {\n    --p;\n    ++intpart;\n  }\n}\n\ntemplate<typename MatrixType>\nvoid MatrixPower<MatrixType>::initialize()\n{\n  const ComplexSchur<MatrixType> schurOfA(m_A);\n  JacobiRotation<ComplexScalar> rot;\n  ComplexScalar eigenvalue;\n\n  m_fT.resizeLike(m_A);\n  m_T = schurOfA.matrixT();\n  m_U = schurOfA.matrixU();\n  m_conditionNumber = m_T.diagonal().array().abs().maxCoeff() / m_T.diagonal().array().abs().minCoeff();\n\n  // Move zero eigenvalues to the bottom right corner.\n  for (Index i = cols()-1; i>=0; --i) {\n    if (m_rank <= 2)\n      return;\n    if (m_T.coeff(i,i) == RealScalar(0)) {\n      for (Index j=i+1; j < m_rank; ++j) {\n        eigenvalue = m_T.coeff(j,j);\n        rot.makeGivens(m_T.coeff(j-1,j), eigenvalue);\n        m_T.applyOnTheRight(j-1, j, rot);\n        m_T.applyOnTheLeft(j-1, j, rot.adjoint());\n        m_T.coeffRef(j-1,j-1) = eigenvalue;\n        m_T.coeffRef(j,j) = RealScalar(0);\n        m_U.applyOnTheRight(j-1, j, rot);\n      }\n      --m_rank;\n    }\n  }\n\n  m_nulls = rows() - m_rank;\n  if (m_nulls) {\n    eigen_assert(m_T.bottomRightCorner(m_nulls, m_nulls).isZero()\n        && \"Base of matrix power should be invertible or with a semisimple zero eigenvalue.\");\n    m_fT.bottomRows(m_nulls).fill(RealScalar(0));\n  }\n}\n\ntemplate<typename MatrixType>\ntemplate<typename ResultType>\nvoid MatrixPower<MatrixType>::computeIntPower(ResultType& res, RealScalar p)\n{\n  using std::abs;\n  using std::fmod;\n  RealScalar pp = abs(p);\n\n  if (p<0) \n    m_tmp = m_A.inverse();\n  else     \n    m_tmp = m_A;\n\n  while (true) {\n    if (fmod(pp, 2) >= 1)\n      res = m_tmp * res;\n    pp /= 2;\n    if (pp < 1)\n      break;\n    m_tmp *= m_tmp;\n  }\n}\n\ntemplate<typename MatrixType>\ntemplate<typename ResultType>\nvoid MatrixPower<MatrixType>::computeFracPower(ResultType& res, RealScalar p)\n{\n  Block<ComplexMatrix,Dynamic,Dynamic> blockTp(m_fT, 0, 0, m_rank, m_rank);\n  eigen_assert(m_conditionNumber);\n  eigen_assert(m_rank + m_nulls == rows());\n\n  MatrixPowerAtomic<ComplexMatrix>(m_T.topLeftCorner(m_rank, m_rank), p).compute(blockTp);\n  if (m_nulls) {\n    m_fT.topRightCorner(m_rank, m_nulls) = m_T.topLeftCorner(m_rank, m_rank).template triangularView<Upper>()\n        .solve(blockTp * m_T.topRightCorner(m_rank, m_nulls));\n  }\n  revertSchur(m_tmp, m_fT, m_U);\n  res = m_tmp * res;\n}\n\ntemplate<typename MatrixType>\ntemplate<int Rows, int Cols, int Options, int MaxRows, int MaxCols>\ninline void MatrixPower<MatrixType>::revertSchur(\n    Matrix<ComplexScalar, Rows, Cols, Options, MaxRows, MaxCols>& res,\n    const ComplexMatrix& T,\n    const ComplexMatrix& U)\n{ res.noalias() = U * (T.template triangularView<Upper>() * U.adjoint()); }\n\ntemplate<typename MatrixType>\ntemplate<int Rows, int Cols, int Options, int MaxRows, int MaxCols>\ninline void MatrixPower<MatrixType>::revertSchur(\n    Matrix<RealScalar, Rows, Cols, Options, MaxRows, MaxCols>& res,\n    const ComplexMatrix& T,\n    const ComplexMatrix& U)\n{ res.noalias() = (U * (T.template triangularView<Upper>() * U.adjoint())).real(); }\n\n/**\n * \\ingroup MatrixFunctions_Module\n *\n * \\brief Proxy for the matrix power of some matrix (expression).\n *\n * \\tparam Derived  type of the base, a matrix (expression).\n *\n * This class holds the arguments to the matrix power until it is\n * assigned or evaluated for some other reason (so the argument\n * should not be changed in the meantime). It is the return type of\n * MatrixBase::pow() and related functions and most of the\n * time this is the only way it is used.\n */\ntemplate<typename Derived>\nclass MatrixPowerReturnValue : public ReturnByValue< MatrixPowerReturnValue<Derived> >\n{\n  public:\n    typedef typename Derived::PlainObject PlainObject;\n    typedef typename Derived::RealScalar RealScalar;\n\n    /**\n     * \\brief Constructor.\n     *\n     * \\param[in] A  %Matrix (expression), the base of the matrix power.\n     * \\param[in] p  real scalar, the exponent of the matrix power.\n     */\n    MatrixPowerReturnValue(const Derived& A, RealScalar p) : m_A(A), m_p(p)\n    { }\n\n    /**\n     * \\brief Compute the matrix power.\n     *\n     * \\param[out] result  \\f$ A^p \\f$ where \\p A and \\p p are as in the\n     * constructor.\n     */\n    template<typename ResultType>\n    inline void evalTo(ResultType& result) const\n    { MatrixPower<PlainObject>(m_A.eval()).compute(result, m_p); }\n\n    Index rows() const { return m_A.rows(); }\n    Index cols() const { return m_A.cols(); }\n\n  private:\n    const Derived& m_A;\n    const RealScalar m_p;\n};\n\n/**\n * \\ingroup MatrixFunctions_Module\n *\n * \\brief Proxy for the matrix power of some matrix (expression).\n *\n * \\tparam Derived  type of the base, a matrix (expression).\n *\n * This class holds the arguments to the matrix power until it is\n * assigned or evaluated for some other reason (so the argument\n * should not be changed in the meantime). It is the return type of\n * MatrixBase::pow() and related functions and most of the\n * time this is the only way it is used.\n */\ntemplate<typename Derived>\nclass MatrixComplexPowerReturnValue : public ReturnByValue< MatrixComplexPowerReturnValue<Derived> >\n{\n  public:\n    typedef typename Derived::PlainObject PlainObject;\n    typedef typename std::complex<typename Derived::RealScalar> ComplexScalar;\n\n    /**\n     * \\brief Constructor.\n     *\n     * \\param[in] A  %Matrix (expression), the base of the matrix power.\n     * \\param[in] p  complex scalar, the exponent of the matrix power.\n     */\n    MatrixComplexPowerReturnValue(const Derived& A, const ComplexScalar& p) : m_A(A), m_p(p)\n    { }\n\n    /**\n     * \\brief Compute the matrix power.\n     *\n     * Because \\p p is complex, \\f$ A^p \\f$ is simply evaluated as \\f$\n     * \\exp(p \\log(A)) \\f$.\n     *\n     * \\param[out] result  \\f$ A^p \\f$ where \\p A and \\p p are as in the\n     * constructor.\n     */\n    template<typename ResultType>\n    inline void evalTo(ResultType& result) const\n    { result = (m_p * m_A.log()).exp(); }\n\n    Index rows() const { return m_A.rows(); }\n    Index cols() const { return m_A.cols(); }\n\n  private:\n    const Derived& m_A;\n    const ComplexScalar m_p;\n};\n\nnamespace internal {\n\ntemplate<typename MatrixPowerType>\nstruct traits< MatrixPowerParenthesesReturnValue<MatrixPowerType> >\n{ typedef typename MatrixPowerType::PlainObject ReturnType; };\n\ntemplate<typename Derived>\nstruct traits< MatrixPowerReturnValue<Derived> >\n{ typedef typename Derived::PlainObject ReturnType; };\n\ntemplate<typename Derived>\nstruct traits< MatrixComplexPowerReturnValue<Derived> >\n{ typedef typename Derived::PlainObject ReturnType; };\n\n}\n\ntemplate<typename Derived>\nconst MatrixPowerReturnValue<Derived> MatrixBase<Derived>::pow(const RealScalar& p) const\n{ return MatrixPowerReturnValue<Derived>(derived(), p); }\n\ntemplate<typename Derived>\nconst MatrixComplexPowerReturnValue<Derived> MatrixBase<Derived>::pow(const std::complex<RealScalar>& p) const\n{ return MatrixComplexPowerReturnValue<Derived>(derived(), p); }\n\n} // namespace Eigen\n\n#endif // EIGEN_MATRIX_POWER\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/MatrixFunctions/MatrixSquareRoot.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2011, 2013 Jitse Niesen <jitse@maths.leeds.ac.uk>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_MATRIX_SQUARE_ROOT\n#define EIGEN_MATRIX_SQUARE_ROOT\n\nnamespace Eigen { \n\nnamespace internal {\n\n// pre:  T.block(i,i,2,2) has complex conjugate eigenvalues\n// post: sqrtT.block(i,i,2,2) is square root of T.block(i,i,2,2)\ntemplate <typename MatrixType, typename ResultType>\nvoid matrix_sqrt_quasi_triangular_2x2_diagonal_block(const MatrixType& T, Index i, ResultType& sqrtT)\n{\n  // TODO: This case (2-by-2 blocks with complex conjugate eigenvalues) is probably hidden somewhere\n  //       in EigenSolver. If we expose it, we could call it directly from here.\n  typedef typename traits<MatrixType>::Scalar Scalar;\n  Matrix<Scalar,2,2> block = T.template block<2,2>(i,i);\n  EigenSolver<Matrix<Scalar,2,2> > es(block);\n  sqrtT.template block<2,2>(i,i)\n    = (es.eigenvectors() * es.eigenvalues().cwiseSqrt().asDiagonal() * es.eigenvectors().inverse()).real();\n}\n\n// pre:  block structure of T is such that (i,j) is a 1x1 block,\n//       all blocks of sqrtT to left of and below (i,j) are correct\n// post: sqrtT(i,j) has the correct value\ntemplate <typename MatrixType, typename ResultType>\nvoid matrix_sqrt_quasi_triangular_1x1_off_diagonal_block(const MatrixType& T, Index i, Index j, ResultType& sqrtT)\n{\n  typedef typename traits<MatrixType>::Scalar Scalar;\n  Scalar tmp = (sqrtT.row(i).segment(i+1,j-i-1) * sqrtT.col(j).segment(i+1,j-i-1)).value();\n  sqrtT.coeffRef(i,j) = (T.coeff(i,j) - tmp) / (sqrtT.coeff(i,i) + sqrtT.coeff(j,j));\n}\n\n// similar to compute1x1offDiagonalBlock()\ntemplate <typename MatrixType, typename ResultType>\nvoid matrix_sqrt_quasi_triangular_1x2_off_diagonal_block(const MatrixType& T, Index i, Index j, ResultType& sqrtT)\n{\n  typedef typename traits<MatrixType>::Scalar Scalar;\n  Matrix<Scalar,1,2> rhs = T.template block<1,2>(i,j);\n  if (j-i > 1)\n    rhs -= sqrtT.block(i, i+1, 1, j-i-1) * sqrtT.block(i+1, j, j-i-1, 2);\n  Matrix<Scalar,2,2> A = sqrtT.coeff(i,i) * Matrix<Scalar,2,2>::Identity();\n  A += sqrtT.template block<2,2>(j,j).transpose();\n  sqrtT.template block<1,2>(i,j).transpose() = A.fullPivLu().solve(rhs.transpose());\n}\n\n// similar to compute1x1offDiagonalBlock()\ntemplate <typename MatrixType, typename ResultType>\nvoid matrix_sqrt_quasi_triangular_2x1_off_diagonal_block(const MatrixType& T, Index i, Index j, ResultType& sqrtT)\n{\n  typedef typename traits<MatrixType>::Scalar Scalar;\n  Matrix<Scalar,2,1> rhs = T.template block<2,1>(i,j);\n  if (j-i > 2)\n    rhs -= sqrtT.block(i, i+2, 2, j-i-2) * sqrtT.block(i+2, j, j-i-2, 1);\n  Matrix<Scalar,2,2> A = sqrtT.coeff(j,j) * Matrix<Scalar,2,2>::Identity();\n  A += sqrtT.template block<2,2>(i,i);\n  sqrtT.template block<2,1>(i,j) = A.fullPivLu().solve(rhs);\n}\n\n// solves the equation A X + X B = C where all matrices are 2-by-2\ntemplate <typename MatrixType>\nvoid matrix_sqrt_quasi_triangular_solve_auxiliary_equation(MatrixType& X, const MatrixType& A, const MatrixType& B, const MatrixType& C)\n{\n  typedef typename traits<MatrixType>::Scalar Scalar;\n  Matrix<Scalar,4,4> coeffMatrix = Matrix<Scalar,4,4>::Zero();\n  coeffMatrix.coeffRef(0,0) = A.coeff(0,0) + B.coeff(0,0);\n  coeffMatrix.coeffRef(1,1) = A.coeff(0,0) + B.coeff(1,1);\n  coeffMatrix.coeffRef(2,2) = A.coeff(1,1) + B.coeff(0,0);\n  coeffMatrix.coeffRef(3,3) = A.coeff(1,1) + B.coeff(1,1);\n  coeffMatrix.coeffRef(0,1) = B.coeff(1,0);\n  coeffMatrix.coeffRef(0,2) = A.coeff(0,1);\n  coeffMatrix.coeffRef(1,0) = B.coeff(0,1);\n  coeffMatrix.coeffRef(1,3) = A.coeff(0,1);\n  coeffMatrix.coeffRef(2,0) = A.coeff(1,0);\n  coeffMatrix.coeffRef(2,3) = B.coeff(1,0);\n  coeffMatrix.coeffRef(3,1) = A.coeff(1,0);\n  coeffMatrix.coeffRef(3,2) = B.coeff(0,1);\n\n  Matrix<Scalar,4,1> rhs;\n  rhs.coeffRef(0) = C.coeff(0,0);\n  rhs.coeffRef(1) = C.coeff(0,1);\n  rhs.coeffRef(2) = C.coeff(1,0);\n  rhs.coeffRef(3) = C.coeff(1,1);\n\n  Matrix<Scalar,4,1> result;\n  result = coeffMatrix.fullPivLu().solve(rhs);\n\n  X.coeffRef(0,0) = result.coeff(0);\n  X.coeffRef(0,1) = result.coeff(1);\n  X.coeffRef(1,0) = result.coeff(2);\n  X.coeffRef(1,1) = result.coeff(3);\n}\n\n// similar to compute1x1offDiagonalBlock()\ntemplate <typename MatrixType, typename ResultType>\nvoid matrix_sqrt_quasi_triangular_2x2_off_diagonal_block(const MatrixType& T, Index i, Index j, ResultType& sqrtT)\n{\n  typedef typename traits<MatrixType>::Scalar Scalar;\n  Matrix<Scalar,2,2> A = sqrtT.template block<2,2>(i,i);\n  Matrix<Scalar,2,2> B = sqrtT.template block<2,2>(j,j);\n  Matrix<Scalar,2,2> C = T.template block<2,2>(i,j);\n  if (j-i > 2)\n    C -= sqrtT.block(i, i+2, 2, j-i-2) * sqrtT.block(i+2, j, j-i-2, 2);\n  Matrix<Scalar,2,2> X;\n  matrix_sqrt_quasi_triangular_solve_auxiliary_equation(X, A, B, C);\n  sqrtT.template block<2,2>(i,j) = X;\n}\n\n// pre:  T is quasi-upper-triangular and sqrtT is a zero matrix of the same size\n// post: the diagonal blocks of sqrtT are the square roots of the diagonal blocks of T\ntemplate <typename MatrixType, typename ResultType>\nvoid matrix_sqrt_quasi_triangular_diagonal(const MatrixType& T, ResultType& sqrtT)\n{\n  using std::sqrt;\n  const Index size = T.rows();\n  for (Index i = 0; i < size; i++) {\n    if (i == size - 1 || T.coeff(i+1, i) == 0) {\n      eigen_assert(T(i,i) >= 0);\n      sqrtT.coeffRef(i,i) = sqrt(T.coeff(i,i));\n    }\n    else {\n      matrix_sqrt_quasi_triangular_2x2_diagonal_block(T, i, sqrtT);\n      ++i;\n    }\n  }\n}\n\n// pre:  T is quasi-upper-triangular and diagonal blocks of sqrtT are square root of diagonal blocks of T.\n// post: sqrtT is the square root of T.\ntemplate <typename MatrixType, typename ResultType>\nvoid matrix_sqrt_quasi_triangular_off_diagonal(const MatrixType& T, ResultType& sqrtT)\n{\n  const Index size = T.rows();\n  for (Index j = 1; j < size; j++) {\n      if (T.coeff(j, j-1) != 0)  // if T(j-1:j, j-1:j) is a 2-by-2 block\n\tcontinue;\n    for (Index i = j-1; i >= 0; i--) {\n      if (i > 0 && T.coeff(i, i-1) != 0)  // if T(i-1:i, i-1:i) is a 2-by-2 block\n\tcontinue;\n      bool iBlockIs2x2 = (i < size - 1) && (T.coeff(i+1, i) != 0);\n      bool jBlockIs2x2 = (j < size - 1) && (T.coeff(j+1, j) != 0);\n      if (iBlockIs2x2 && jBlockIs2x2) \n        matrix_sqrt_quasi_triangular_2x2_off_diagonal_block(T, i, j, sqrtT);\n      else if (iBlockIs2x2 && !jBlockIs2x2) \n        matrix_sqrt_quasi_triangular_2x1_off_diagonal_block(T, i, j, sqrtT);\n      else if (!iBlockIs2x2 && jBlockIs2x2) \n        matrix_sqrt_quasi_triangular_1x2_off_diagonal_block(T, i, j, sqrtT);\n      else if (!iBlockIs2x2 && !jBlockIs2x2) \n        matrix_sqrt_quasi_triangular_1x1_off_diagonal_block(T, i, j, sqrtT);\n    }\n  }\n}\n\n} // end of namespace internal\n\n/** \\ingroup MatrixFunctions_Module\n  * \\brief Compute matrix square root of quasi-triangular matrix.\n  *\n  * \\tparam  MatrixType  type of \\p arg, the argument of matrix square root,\n  *                      expected to be an instantiation of the Matrix class template.\n  * \\tparam  ResultType  type of \\p result, where result is to be stored.\n  * \\param[in]  arg      argument of matrix square root.\n  * \\param[out] result   matrix square root of upper Hessenberg part of \\p arg.\n  *\n  * This function computes the square root of the upper quasi-triangular matrix stored in the upper\n  * Hessenberg part of \\p arg.  Only the upper Hessenberg part of \\p result is updated, the rest is\n  * not touched.  See MatrixBase::sqrt() for details on how this computation is implemented.\n  *\n  * \\sa MatrixSquareRoot, MatrixSquareRootQuasiTriangular\n  */\ntemplate <typename MatrixType, typename ResultType> \nvoid matrix_sqrt_quasi_triangular(const MatrixType &arg, ResultType &result)\n{\n  eigen_assert(arg.rows() == arg.cols());\n  result.resize(arg.rows(), arg.cols());\n  internal::matrix_sqrt_quasi_triangular_diagonal(arg, result);\n  internal::matrix_sqrt_quasi_triangular_off_diagonal(arg, result);\n}\n\n\n/** \\ingroup MatrixFunctions_Module\n  * \\brief Compute matrix square root of triangular matrix.\n  *\n  * \\tparam  MatrixType  type of \\p arg, the argument of matrix square root,\n  *                      expected to be an instantiation of the Matrix class template.\n  * \\tparam  ResultType  type of \\p result, where result is to be stored.\n  * \\param[in]  arg      argument of matrix square root.\n  * \\param[out] result   matrix square root of upper triangular part of \\p arg.\n  *\n  * Only the upper triangular part (including the diagonal) of \\p result is updated, the rest is not\n  * touched.  See MatrixBase::sqrt() for details on how this computation is implemented.\n  *\n  * \\sa MatrixSquareRoot, MatrixSquareRootQuasiTriangular\n  */\ntemplate <typename MatrixType, typename ResultType> \nvoid matrix_sqrt_triangular(const MatrixType &arg, ResultType &result)\n{\n  using std::sqrt;\n  typedef typename MatrixType::Scalar Scalar;\n\n  eigen_assert(arg.rows() == arg.cols());\n\n  // Compute square root of arg and store it in upper triangular part of result\n  // This uses that the square root of triangular matrices can be computed directly.\n  result.resize(arg.rows(), arg.cols());\n  for (Index i = 0; i < arg.rows(); i++) {\n    result.coeffRef(i,i) = sqrt(arg.coeff(i,i));\n  }\n  for (Index j = 1; j < arg.cols(); j++) {\n    for (Index i = j-1; i >= 0; i--) {\n      // if i = j-1, then segment has length 0 so tmp = 0\n      Scalar tmp = (result.row(i).segment(i+1,j-i-1) * result.col(j).segment(i+1,j-i-1)).value();\n      // denominator may be zero if original matrix is singular\n      result.coeffRef(i,j) = (arg.coeff(i,j) - tmp) / (result.coeff(i,i) + result.coeff(j,j));\n    }\n  }\n}\n\n\nnamespace internal {\n\n/** \\ingroup MatrixFunctions_Module\n  * \\brief Helper struct for computing matrix square roots of general matrices.\n  * \\tparam  MatrixType  type of the argument of the matrix square root,\n  *                      expected to be an instantiation of the Matrix class template.\n  *\n  * \\sa MatrixSquareRootTriangular, MatrixSquareRootQuasiTriangular, MatrixBase::sqrt()\n  */\ntemplate <typename MatrixType, int IsComplex = NumTraits<typename internal::traits<MatrixType>::Scalar>::IsComplex>\nstruct matrix_sqrt_compute\n{\n  /** \\brief Compute the matrix square root\n    *\n    * \\param[in]  arg     matrix whose square root is to be computed.\n    * \\param[out] result  square root of \\p arg.\n    *\n    * See MatrixBase::sqrt() for details on how this computation is implemented.\n    */\n  template <typename ResultType> static void run(const MatrixType &arg, ResultType &result);    \n};\n\n\n// ********** Partial specialization for real matrices **********\n\ntemplate <typename MatrixType>\nstruct matrix_sqrt_compute<MatrixType, 0>\n{\n  typedef typename MatrixType::PlainObject PlainType;\n  template <typename ResultType>\n  static void run(const MatrixType &arg, ResultType &result)\n  {\n    eigen_assert(arg.rows() == arg.cols());\n\n    // Compute Schur decomposition of arg\n    const RealSchur<PlainType> schurOfA(arg);\n    const PlainType& T = schurOfA.matrixT();\n    const PlainType& U = schurOfA.matrixU();\n    \n    // Compute square root of T\n    PlainType sqrtT = PlainType::Zero(arg.rows(), arg.cols());\n    matrix_sqrt_quasi_triangular(T, sqrtT);\n    \n    // Compute square root of arg\n    result = U * sqrtT * U.adjoint();\n  }\n};\n\n\n// ********** Partial specialization for complex matrices **********\n\ntemplate <typename MatrixType>\nstruct matrix_sqrt_compute<MatrixType, 1>\n{\n  typedef typename MatrixType::PlainObject PlainType;\n  template <typename ResultType>\n  static void run(const MatrixType &arg, ResultType &result)\n  {\n    eigen_assert(arg.rows() == arg.cols());\n\n    // Compute Schur decomposition of arg\n    const ComplexSchur<PlainType> schurOfA(arg);\n    const PlainType& T = schurOfA.matrixT();\n    const PlainType& U = schurOfA.matrixU();\n    \n    // Compute square root of T\n    PlainType sqrtT;\n    matrix_sqrt_triangular(T, sqrtT);\n    \n    // Compute square root of arg\n    result = U * (sqrtT.template triangularView<Upper>() * U.adjoint());\n  }\n};\n\n} // end namespace internal\n\n/** \\ingroup MatrixFunctions_Module\n  *\n  * \\brief Proxy for the matrix square root of some matrix (expression).\n  *\n  * \\tparam Derived  Type of the argument to the matrix square root.\n  *\n  * This class holds the argument to the matrix square root until it\n  * is assigned or evaluated for some other reason (so the argument\n  * should not be changed in the meantime). It is the return type of\n  * MatrixBase::sqrt() and most of the time this is the only way it is\n  * used.\n  */\ntemplate<typename Derived> class MatrixSquareRootReturnValue\n: public ReturnByValue<MatrixSquareRootReturnValue<Derived> >\n{\n  protected:\n    typedef typename internal::ref_selector<Derived>::type DerivedNested;\n\n  public:\n    /** \\brief Constructor.\n      *\n      * \\param[in]  src  %Matrix (expression) forming the argument of the\n      * matrix square root.\n      */\n    explicit MatrixSquareRootReturnValue(const Derived& src) : m_src(src) { }\n\n    /** \\brief Compute the matrix square root.\n      *\n      * \\param[out]  result  the matrix square root of \\p src in the\n      * constructor.\n      */\n    template <typename ResultType>\n    inline void evalTo(ResultType& result) const\n    {\n      typedef typename internal::nested_eval<Derived, 10>::type DerivedEvalType;\n      typedef typename internal::remove_all<DerivedEvalType>::type DerivedEvalTypeClean;\n      DerivedEvalType tmp(m_src);\n      internal::matrix_sqrt_compute<DerivedEvalTypeClean>::run(tmp, result);\n    }\n\n    Index rows() const { return m_src.rows(); }\n    Index cols() const { return m_src.cols(); }\n\n  protected:\n    const DerivedNested m_src;\n};\n\nnamespace internal {\ntemplate<typename Derived>\nstruct traits<MatrixSquareRootReturnValue<Derived> >\n{\n  typedef typename Derived::PlainObject ReturnType;\n};\n}\n\ntemplate <typename Derived>\nconst MatrixSquareRootReturnValue<Derived> MatrixBase<Derived>::sqrt() const\n{\n  eigen_assert(rows() == cols());\n  return MatrixSquareRootReturnValue<Derived>(derived());\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_MATRIX_FUNCTION\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/MatrixFunctions/StemFunction.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010, 2013 Jitse Niesen <jitse@maths.leeds.ac.uk>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_STEM_FUNCTION\n#define EIGEN_STEM_FUNCTION\n\nnamespace Eigen { \n\nnamespace internal {\n\n/** \\brief The exponential function (and its derivatives). */\ntemplate <typename Scalar>\nScalar stem_function_exp(Scalar x, int)\n{\n  using std::exp;\n  return exp(x);\n}\n\n/** \\brief Cosine (and its derivatives). */\ntemplate <typename Scalar>\nScalar stem_function_cos(Scalar x, int n)\n{\n  using std::cos;\n  using std::sin;\n  Scalar res;\n\n  switch (n % 4) {\n  case 0: \n    res = std::cos(x);\n    break;\n  case 1:\n    res = -std::sin(x);\n    break;\n  case 2:\n    res = -std::cos(x);\n    break;\n  case 3:\n    res = std::sin(x);\n    break;\n  }\n  return res;\n}\n\n/** \\brief Sine (and its derivatives). */\ntemplate <typename Scalar>\nScalar stem_function_sin(Scalar x, int n)\n{\n  using std::cos;\n  using std::sin;\n  Scalar res;\n\n  switch (n % 4) {\n  case 0:\n    res = std::sin(x);\n    break;\n  case 1:\n    res = std::cos(x);\n    break;\n  case 2:\n    res = -std::sin(x);\n    break;\n  case 3:\n    res = -std::cos(x);\n    break;\n  }\n  return res;\n}\n\n/** \\brief Hyperbolic cosine (and its derivatives). */\ntemplate <typename Scalar>\nScalar stem_function_cosh(Scalar x, int n)\n{\n  using std::cosh;\n  using std::sinh;\n  Scalar res;\n  \n  switch (n % 2) {\n  case 0:\n    res = std::cosh(x);\n    break;\n  case 1:\n    res = std::sinh(x);\n    break;\n  }\n  return res;\n}\n\t\n/** \\brief Hyperbolic sine (and its derivatives). */\ntemplate <typename Scalar>\nScalar stem_function_sinh(Scalar x, int n)\n{\n  using std::cosh;\n  using std::sinh;\n  Scalar res;\n  \n  switch (n % 2) {\n  case 0:\n    res = std::sinh(x);\n    break;\n  case 1:\n    res = std::cosh(x);\n    break;\n  }\n  return res;\n}\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_STEM_FUNCTION\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/MoreVectorization/MathFunctions.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Rohit Garg <rpg.314@gmail.com>\n// Copyright (C) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_MOREVECTORIZATION_MATHFUNCTIONS_H\n#define EIGEN_MOREVECTORIZATION_MATHFUNCTIONS_H\n\nnamespace Eigen { \n\nnamespace internal {\n\n/** \\internal \\returns the arcsin of \\a a (coeff-wise) */\ntemplate<typename Packet> inline static Packet pasin(Packet a) { return std::asin(a); }\n\n#ifdef EIGEN_VECTORIZE_SSE\n\ntemplate<> EIGEN_DONT_INLINE Packet4f pasin(Packet4f x)\n{\n  _EIGEN_DECLARE_CONST_Packet4f(half, 0.5);\n  _EIGEN_DECLARE_CONST_Packet4f(minus_half, -0.5);\n  _EIGEN_DECLARE_CONST_Packet4f(3half, 1.5);\n\n  _EIGEN_DECLARE_CONST_Packet4f_FROM_INT(sign_mask, 0x80000000);\n\n  _EIGEN_DECLARE_CONST_Packet4f(pi, 3.141592654);\n  _EIGEN_DECLARE_CONST_Packet4f(pi_over_2, 3.141592654*0.5);\n\n  _EIGEN_DECLARE_CONST_Packet4f(asin1, 4.2163199048E-2);\n  _EIGEN_DECLARE_CONST_Packet4f(asin2, 2.4181311049E-2);\n  _EIGEN_DECLARE_CONST_Packet4f(asin3, 4.5470025998E-2);\n  _EIGEN_DECLARE_CONST_Packet4f(asin4, 7.4953002686E-2);\n  _EIGEN_DECLARE_CONST_Packet4f(asin5, 1.6666752422E-1);\n\n  Packet4f a = pabs(x);//got the absolute value\n\n  Packet4f sign_bit= _mm_and_ps(x, p4f_sign_mask);//extracted the sign bit\n\n  Packet4f z1,z2;//will need them during computation    \n\n\n//will compute the two branches for asin\n//so first compare with half\n\n  Packet4f branch_mask= _mm_cmpgt_ps(a, p4f_half);//this is to select which branch to take\n//both will be taken, and finally results will be merged\n//the branch for values >0.5\n\n    {\n//the core series expansion \n    z1=pmadd(p4f_minus_half,a,p4f_half);\n    Packet4f x1=psqrt(z1);\n    Packet4f s1=pmadd(p4f_asin1, z1, p4f_asin2);\n    Packet4f s2=pmadd(s1, z1, p4f_asin3);\n    Packet4f s3=pmadd(s2,z1, p4f_asin4);\n    Packet4f s4=pmadd(s3,z1, p4f_asin5);\n    Packet4f temp=pmul(s4,z1);//not really a madd but a mul by z so that the next term can be a madd\n    z1=pmadd(temp,x1,x1);\n    z1=padd(z1,z1);\n    z1=psub(p4f_pi_over_2,z1);\n    }\n\n    {\n//the core series expansion \n    Packet4f x2=a;\n    z2=pmul(x2,x2);\n    Packet4f s1=pmadd(p4f_asin1, z2, p4f_asin2);\n    Packet4f s2=pmadd(s1, z2, p4f_asin3);\n    Packet4f s3=pmadd(s2,z2, p4f_asin4);\n    Packet4f s4=pmadd(s3,z2, p4f_asin5);\n    Packet4f temp=pmul(s4,z2);//not really a madd but a mul by z so that the next term can be a madd\n    z2=pmadd(temp,x2,x2);\n    }\n\n/* select the correct result from the two branch evaluations */\n  z1  = _mm_and_ps(branch_mask, z1);\n  z2  = _mm_andnot_ps(branch_mask, z2);\n  Packet4f z  = _mm_or_ps(z1,z2);\n\n/* update the sign */\n  return _mm_xor_ps(z, sign_bit);\n}\n\n#endif // EIGEN_VECTORIZE_SSE\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_MOREVECTORIZATION_MATHFUNCTIONS_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/NonLinearOptimization/HybridNonLinearSolver.h",
    "content": "// -*- coding: utf-8\n// vim: set fileencoding=utf-8\n\n// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Thomas Capricelli <orzel@freehackers.org>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_HYBRIDNONLINEARSOLVER_H\n#define EIGEN_HYBRIDNONLINEARSOLVER_H\n\nnamespace Eigen { \n\nnamespace HybridNonLinearSolverSpace { \n    enum Status {\n        Running = -1,\n        ImproperInputParameters = 0,\n        RelativeErrorTooSmall = 1,\n        TooManyFunctionEvaluation = 2,\n        TolTooSmall = 3,\n        NotMakingProgressJacobian = 4,\n        NotMakingProgressIterations = 5,\n        UserAsked = 6\n    };\n}\n\n/**\n  * \\ingroup NonLinearOptimization_Module\n  * \\brief Finds a zero of a system of n\n  * nonlinear functions in n variables by a modification of the Powell\n  * hybrid method (\"dogleg\").\n  *\n  * The user must provide a subroutine which calculates the\n  * functions. The Jacobian is either provided by the user, or approximated\n  * using a forward-difference method.\n  *\n  */\ntemplate<typename FunctorType, typename Scalar=double>\nclass HybridNonLinearSolver\n{\npublic:\n    typedef DenseIndex Index;\n\n    HybridNonLinearSolver(FunctorType &_functor)\n        : functor(_functor) { nfev=njev=iter = 0;  fnorm= 0.; useExternalScaling=false;}\n\n    struct Parameters {\n        Parameters()\n            : factor(Scalar(100.))\n            , maxfev(1000)\n            , xtol(std::sqrt(NumTraits<Scalar>::epsilon()))\n            , nb_of_subdiagonals(-1)\n            , nb_of_superdiagonals(-1)\n            , epsfcn(Scalar(0.)) {}\n        Scalar factor;\n        Index maxfev;   // maximum number of function evaluation\n        Scalar xtol;\n        Index nb_of_subdiagonals;\n        Index nb_of_superdiagonals;\n        Scalar epsfcn;\n    };\n    typedef Matrix< Scalar, Dynamic, 1 > FVectorType;\n    typedef Matrix< Scalar, Dynamic, Dynamic > JacobianType;\n    /* TODO: if eigen provides a triangular storage, use it here */\n    typedef Matrix< Scalar, Dynamic, Dynamic > UpperTriangularType;\n\n    HybridNonLinearSolverSpace::Status hybrj1(\n            FVectorType  &x,\n            const Scalar tol = std::sqrt(NumTraits<Scalar>::epsilon())\n            );\n\n    HybridNonLinearSolverSpace::Status solveInit(FVectorType  &x);\n    HybridNonLinearSolverSpace::Status solveOneStep(FVectorType  &x);\n    HybridNonLinearSolverSpace::Status solve(FVectorType  &x);\n\n    HybridNonLinearSolverSpace::Status hybrd1(\n            FVectorType  &x,\n            const Scalar tol = std::sqrt(NumTraits<Scalar>::epsilon())\n            );\n\n    HybridNonLinearSolverSpace::Status solveNumericalDiffInit(FVectorType  &x);\n    HybridNonLinearSolverSpace::Status solveNumericalDiffOneStep(FVectorType  &x);\n    HybridNonLinearSolverSpace::Status solveNumericalDiff(FVectorType  &x);\n\n    void resetParameters(void) { parameters = Parameters(); }\n    Parameters parameters;\n    FVectorType  fvec, qtf, diag;\n    JacobianType fjac;\n    UpperTriangularType R;\n    Index nfev;\n    Index njev;\n    Index iter;\n    Scalar fnorm;\n    bool useExternalScaling; \nprivate:\n    FunctorType &functor;\n    Index n;\n    Scalar sum;\n    bool sing;\n    Scalar temp;\n    Scalar delta;\n    bool jeval;\n    Index ncsuc;\n    Scalar ratio;\n    Scalar pnorm, xnorm, fnorm1;\n    Index nslow1, nslow2;\n    Index ncfail;\n    Scalar actred, prered;\n    FVectorType wa1, wa2, wa3, wa4;\n\n    HybridNonLinearSolver& operator=(const HybridNonLinearSolver&);\n};\n\n\n\ntemplate<typename FunctorType, typename Scalar>\nHybridNonLinearSolverSpace::Status\nHybridNonLinearSolver<FunctorType,Scalar>::hybrj1(\n        FVectorType  &x,\n        const Scalar tol\n        )\n{\n    n = x.size();\n\n    /* check the input parameters for errors. */\n    if (n <= 0 || tol < 0.)\n        return HybridNonLinearSolverSpace::ImproperInputParameters;\n\n    resetParameters();\n    parameters.maxfev = 100*(n+1);\n    parameters.xtol = tol;\n    diag.setConstant(n, 1.);\n    useExternalScaling = true;\n    return solve(x);\n}\n\ntemplate<typename FunctorType, typename Scalar>\nHybridNonLinearSolverSpace::Status\nHybridNonLinearSolver<FunctorType,Scalar>::solveInit(FVectorType  &x)\n{\n    n = x.size();\n\n    wa1.resize(n); wa2.resize(n); wa3.resize(n); wa4.resize(n);\n    fvec.resize(n);\n    qtf.resize(n);\n    fjac.resize(n, n);\n    if (!useExternalScaling)\n        diag.resize(n);\n    eigen_assert( (!useExternalScaling || diag.size()==n) && \"When useExternalScaling is set, the caller must provide a valid 'diag'\");\n\n    /* Function Body */\n    nfev = 0;\n    njev = 0;\n\n    /*     check the input parameters for errors. */\n    if (n <= 0 || parameters.xtol < 0. || parameters.maxfev <= 0 || parameters.factor <= 0. )\n        return HybridNonLinearSolverSpace::ImproperInputParameters;\n    if (useExternalScaling)\n        for (Index j = 0; j < n; ++j)\n            if (diag[j] <= 0.)\n                return HybridNonLinearSolverSpace::ImproperInputParameters;\n\n    /*     evaluate the function at the starting point */\n    /*     and calculate its norm. */\n    nfev = 1;\n    if ( functor(x, fvec) < 0)\n        return HybridNonLinearSolverSpace::UserAsked;\n    fnorm = fvec.stableNorm();\n\n    /*     initialize iteration counter and monitors. */\n    iter = 1;\n    ncsuc = 0;\n    ncfail = 0;\n    nslow1 = 0;\n    nslow2 = 0;\n\n    return HybridNonLinearSolverSpace::Running;\n}\n\ntemplate<typename FunctorType, typename Scalar>\nHybridNonLinearSolverSpace::Status\nHybridNonLinearSolver<FunctorType,Scalar>::solveOneStep(FVectorType  &x)\n{\n    using std::abs;\n    \n    eigen_assert(x.size()==n); // check the caller is not cheating us\n\n    Index j;\n    std::vector<JacobiRotation<Scalar> > v_givens(n), w_givens(n);\n\n    jeval = true;\n\n    /* calculate the jacobian matrix. */\n    if ( functor.df(x, fjac) < 0)\n        return HybridNonLinearSolverSpace::UserAsked;\n    ++njev;\n\n    wa2 = fjac.colwise().blueNorm();\n\n    /* on the first iteration and if external scaling is not used, scale according */\n    /* to the norms of the columns of the initial jacobian. */\n    if (iter == 1) {\n        if (!useExternalScaling)\n            for (j = 0; j < n; ++j)\n                diag[j] = (wa2[j]==0.) ? 1. : wa2[j];\n\n        /* on the first iteration, calculate the norm of the scaled x */\n        /* and initialize the step bound delta. */\n        xnorm = diag.cwiseProduct(x).stableNorm();\n        delta = parameters.factor * xnorm;\n        if (delta == 0.)\n            delta = parameters.factor;\n    }\n\n    /* compute the qr factorization of the jacobian. */\n    HouseholderQR<JacobianType> qrfac(fjac); // no pivoting:\n\n    /* copy the triangular factor of the qr factorization into r. */\n    R = qrfac.matrixQR();\n\n    /* accumulate the orthogonal factor in fjac. */\n    fjac = qrfac.householderQ();\n\n    /* form (q transpose)*fvec and store in qtf. */\n    qtf = fjac.transpose() * fvec;\n\n    /* rescale if necessary. */\n    if (!useExternalScaling)\n        diag = diag.cwiseMax(wa2);\n\n    while (true) {\n        /* determine the direction p. */\n        internal::dogleg<Scalar>(R, diag, qtf, delta, wa1);\n\n        /* store the direction p and x + p. calculate the norm of p. */\n        wa1 = -wa1;\n        wa2 = x + wa1;\n        pnorm = diag.cwiseProduct(wa1).stableNorm();\n\n        /* on the first iteration, adjust the initial step bound. */\n        if (iter == 1)\n            delta = (std::min)(delta,pnorm);\n\n        /* evaluate the function at x + p and calculate its norm. */\n        if ( functor(wa2, wa4) < 0)\n            return HybridNonLinearSolverSpace::UserAsked;\n        ++nfev;\n        fnorm1 = wa4.stableNorm();\n\n        /* compute the scaled actual reduction. */\n        actred = -1.;\n        if (fnorm1 < fnorm) /* Computing 2nd power */\n            actred = 1. - numext::abs2(fnorm1 / fnorm);\n\n        /* compute the scaled predicted reduction. */\n        wa3 = R.template triangularView<Upper>()*wa1 + qtf;\n        temp = wa3.stableNorm();\n        prered = 0.;\n        if (temp < fnorm) /* Computing 2nd power */\n            prered = 1. - numext::abs2(temp / fnorm);\n\n        /* compute the ratio of the actual to the predicted reduction. */\n        ratio = 0.;\n        if (prered > 0.)\n            ratio = actred / prered;\n\n        /* update the step bound. */\n        if (ratio < Scalar(.1)) {\n            ncsuc = 0;\n            ++ncfail;\n            delta = Scalar(.5) * delta;\n        } else {\n            ncfail = 0;\n            ++ncsuc;\n            if (ratio >= Scalar(.5) || ncsuc > 1)\n                delta = (std::max)(delta, pnorm / Scalar(.5));\n            if (abs(ratio - 1.) <= Scalar(.1)) {\n                delta = pnorm / Scalar(.5);\n            }\n        }\n\n        /* test for successful iteration. */\n        if (ratio >= Scalar(1e-4)) {\n            /* successful iteration. update x, fvec, and their norms. */\n            x = wa2;\n            wa2 = diag.cwiseProduct(x);\n            fvec = wa4;\n            xnorm = wa2.stableNorm();\n            fnorm = fnorm1;\n            ++iter;\n        }\n\n        /* determine the progress of the iteration. */\n        ++nslow1;\n        if (actred >= Scalar(.001))\n            nslow1 = 0;\n        if (jeval)\n            ++nslow2;\n        if (actred >= Scalar(.1))\n            nslow2 = 0;\n\n        /* test for convergence. */\n        if (delta <= parameters.xtol * xnorm || fnorm == 0.)\n            return HybridNonLinearSolverSpace::RelativeErrorTooSmall;\n\n        /* tests for termination and stringent tolerances. */\n        if (nfev >= parameters.maxfev)\n            return HybridNonLinearSolverSpace::TooManyFunctionEvaluation;\n        if (Scalar(.1) * (std::max)(Scalar(.1) * delta, pnorm) <= NumTraits<Scalar>::epsilon() * xnorm)\n            return HybridNonLinearSolverSpace::TolTooSmall;\n        if (nslow2 == 5)\n            return HybridNonLinearSolverSpace::NotMakingProgressJacobian;\n        if (nslow1 == 10)\n            return HybridNonLinearSolverSpace::NotMakingProgressIterations;\n\n        /* criterion for recalculating jacobian. */\n        if (ncfail == 2)\n            break; // leave inner loop and go for the next outer loop iteration\n\n        /* calculate the rank one modification to the jacobian */\n        /* and update qtf if necessary. */\n        wa1 = diag.cwiseProduct( diag.cwiseProduct(wa1)/pnorm );\n        wa2 = fjac.transpose() * wa4;\n        if (ratio >= Scalar(1e-4))\n            qtf = wa2;\n        wa2 = (wa2-wa3)/pnorm;\n\n        /* compute the qr factorization of the updated jacobian. */\n        internal::r1updt<Scalar>(R, wa1, v_givens, w_givens, wa2, wa3, &sing);\n        internal::r1mpyq<Scalar>(n, n, fjac.data(), v_givens, w_givens);\n        internal::r1mpyq<Scalar>(1, n, qtf.data(), v_givens, w_givens);\n\n        jeval = false;\n    }\n    return HybridNonLinearSolverSpace::Running;\n}\n\ntemplate<typename FunctorType, typename Scalar>\nHybridNonLinearSolverSpace::Status\nHybridNonLinearSolver<FunctorType,Scalar>::solve(FVectorType  &x)\n{\n    HybridNonLinearSolverSpace::Status status = solveInit(x);\n    if (status==HybridNonLinearSolverSpace::ImproperInputParameters)\n        return status;\n    while (status==HybridNonLinearSolverSpace::Running)\n        status = solveOneStep(x);\n    return status;\n}\n\n\n\ntemplate<typename FunctorType, typename Scalar>\nHybridNonLinearSolverSpace::Status\nHybridNonLinearSolver<FunctorType,Scalar>::hybrd1(\n        FVectorType  &x,\n        const Scalar tol\n        )\n{\n    n = x.size();\n\n    /* check the input parameters for errors. */\n    if (n <= 0 || tol < 0.)\n        return HybridNonLinearSolverSpace::ImproperInputParameters;\n\n    resetParameters();\n    parameters.maxfev = 200*(n+1);\n    parameters.xtol = tol;\n\n    diag.setConstant(n, 1.);\n    useExternalScaling = true;\n    return solveNumericalDiff(x);\n}\n\ntemplate<typename FunctorType, typename Scalar>\nHybridNonLinearSolverSpace::Status\nHybridNonLinearSolver<FunctorType,Scalar>::solveNumericalDiffInit(FVectorType  &x)\n{\n    n = x.size();\n\n    if (parameters.nb_of_subdiagonals<0) parameters.nb_of_subdiagonals= n-1;\n    if (parameters.nb_of_superdiagonals<0) parameters.nb_of_superdiagonals= n-1;\n\n    wa1.resize(n); wa2.resize(n); wa3.resize(n); wa4.resize(n);\n    qtf.resize(n);\n    fjac.resize(n, n);\n    fvec.resize(n);\n    if (!useExternalScaling)\n        diag.resize(n);\n    eigen_assert( (!useExternalScaling || diag.size()==n) && \"When useExternalScaling is set, the caller must provide a valid 'diag'\");\n\n    /* Function Body */\n    nfev = 0;\n    njev = 0;\n\n    /*     check the input parameters for errors. */\n    if (n <= 0 || parameters.xtol < 0. || parameters.maxfev <= 0 || parameters.nb_of_subdiagonals< 0 || parameters.nb_of_superdiagonals< 0 || parameters.factor <= 0. )\n        return HybridNonLinearSolverSpace::ImproperInputParameters;\n    if (useExternalScaling)\n        for (Index j = 0; j < n; ++j)\n            if (diag[j] <= 0.)\n                return HybridNonLinearSolverSpace::ImproperInputParameters;\n\n    /*     evaluate the function at the starting point */\n    /*     and calculate its norm. */\n    nfev = 1;\n    if ( functor(x, fvec) < 0)\n        return HybridNonLinearSolverSpace::UserAsked;\n    fnorm = fvec.stableNorm();\n\n    /*     initialize iteration counter and monitors. */\n    iter = 1;\n    ncsuc = 0;\n    ncfail = 0;\n    nslow1 = 0;\n    nslow2 = 0;\n\n    return HybridNonLinearSolverSpace::Running;\n}\n\ntemplate<typename FunctorType, typename Scalar>\nHybridNonLinearSolverSpace::Status\nHybridNonLinearSolver<FunctorType,Scalar>::solveNumericalDiffOneStep(FVectorType  &x)\n{\n    using std::sqrt;\n    using std::abs;\n    \n    assert(x.size()==n); // check the caller is not cheating us\n\n    Index j;\n    std::vector<JacobiRotation<Scalar> > v_givens(n), w_givens(n);\n\n    jeval = true;\n    if (parameters.nb_of_subdiagonals<0) parameters.nb_of_subdiagonals= n-1;\n    if (parameters.nb_of_superdiagonals<0) parameters.nb_of_superdiagonals= n-1;\n\n    /* calculate the jacobian matrix. */\n    if (internal::fdjac1(functor, x, fvec, fjac, parameters.nb_of_subdiagonals, parameters.nb_of_superdiagonals, parameters.epsfcn) <0)\n        return HybridNonLinearSolverSpace::UserAsked;\n    nfev += (std::min)(parameters.nb_of_subdiagonals+parameters.nb_of_superdiagonals+ 1, n);\n\n    wa2 = fjac.colwise().blueNorm();\n\n    /* on the first iteration and if external scaling is not used, scale according */\n    /* to the norms of the columns of the initial jacobian. */\n    if (iter == 1) {\n        if (!useExternalScaling)\n            for (j = 0; j < n; ++j)\n                diag[j] = (wa2[j]==0.) ? 1. : wa2[j];\n\n        /* on the first iteration, calculate the norm of the scaled x */\n        /* and initialize the step bound delta. */\n        xnorm = diag.cwiseProduct(x).stableNorm();\n        delta = parameters.factor * xnorm;\n        if (delta == 0.)\n            delta = parameters.factor;\n    }\n\n    /* compute the qr factorization of the jacobian. */\n    HouseholderQR<JacobianType> qrfac(fjac); // no pivoting:\n\n    /* copy the triangular factor of the qr factorization into r. */\n    R = qrfac.matrixQR();\n\n    /* accumulate the orthogonal factor in fjac. */\n    fjac = qrfac.householderQ();\n\n    /* form (q transpose)*fvec and store in qtf. */\n    qtf = fjac.transpose() * fvec;\n\n    /* rescale if necessary. */\n    if (!useExternalScaling)\n        diag = diag.cwiseMax(wa2);\n\n    while (true) {\n        /* determine the direction p. */\n        internal::dogleg<Scalar>(R, diag, qtf, delta, wa1);\n\n        /* store the direction p and x + p. calculate the norm of p. */\n        wa1 = -wa1;\n        wa2 = x + wa1;\n        pnorm = diag.cwiseProduct(wa1).stableNorm();\n\n        /* on the first iteration, adjust the initial step bound. */\n        if (iter == 1)\n            delta = (std::min)(delta,pnorm);\n\n        /* evaluate the function at x + p and calculate its norm. */\n        if ( functor(wa2, wa4) < 0)\n            return HybridNonLinearSolverSpace::UserAsked;\n        ++nfev;\n        fnorm1 = wa4.stableNorm();\n\n        /* compute the scaled actual reduction. */\n        actred = -1.;\n        if (fnorm1 < fnorm) /* Computing 2nd power */\n            actred = 1. - numext::abs2(fnorm1 / fnorm);\n\n        /* compute the scaled predicted reduction. */\n        wa3 = R.template triangularView<Upper>()*wa1 + qtf;\n        temp = wa3.stableNorm();\n        prered = 0.;\n        if (temp < fnorm) /* Computing 2nd power */\n            prered = 1. - numext::abs2(temp / fnorm);\n\n        /* compute the ratio of the actual to the predicted reduction. */\n        ratio = 0.;\n        if (prered > 0.)\n            ratio = actred / prered;\n\n        /* update the step bound. */\n        if (ratio < Scalar(.1)) {\n            ncsuc = 0;\n            ++ncfail;\n            delta = Scalar(.5) * delta;\n        } else {\n            ncfail = 0;\n            ++ncsuc;\n            if (ratio >= Scalar(.5) || ncsuc > 1)\n                delta = (std::max)(delta, pnorm / Scalar(.5));\n            if (abs(ratio - 1.) <= Scalar(.1)) {\n                delta = pnorm / Scalar(.5);\n            }\n        }\n\n        /* test for successful iteration. */\n        if (ratio >= Scalar(1e-4)) {\n            /* successful iteration. update x, fvec, and their norms. */\n            x = wa2;\n            wa2 = diag.cwiseProduct(x);\n            fvec = wa4;\n            xnorm = wa2.stableNorm();\n            fnorm = fnorm1;\n            ++iter;\n        }\n\n        /* determine the progress of the iteration. */\n        ++nslow1;\n        if (actred >= Scalar(.001))\n            nslow1 = 0;\n        if (jeval)\n            ++nslow2;\n        if (actred >= Scalar(.1))\n            nslow2 = 0;\n\n        /* test for convergence. */\n        if (delta <= parameters.xtol * xnorm || fnorm == 0.)\n            return HybridNonLinearSolverSpace::RelativeErrorTooSmall;\n\n        /* tests for termination and stringent tolerances. */\n        if (nfev >= parameters.maxfev)\n            return HybridNonLinearSolverSpace::TooManyFunctionEvaluation;\n        if (Scalar(.1) * (std::max)(Scalar(.1) * delta, pnorm) <= NumTraits<Scalar>::epsilon() * xnorm)\n            return HybridNonLinearSolverSpace::TolTooSmall;\n        if (nslow2 == 5)\n            return HybridNonLinearSolverSpace::NotMakingProgressJacobian;\n        if (nslow1 == 10)\n            return HybridNonLinearSolverSpace::NotMakingProgressIterations;\n\n        /* criterion for recalculating jacobian. */\n        if (ncfail == 2)\n            break; // leave inner loop and go for the next outer loop iteration\n\n        /* calculate the rank one modification to the jacobian */\n        /* and update qtf if necessary. */\n        wa1 = diag.cwiseProduct( diag.cwiseProduct(wa1)/pnorm );\n        wa2 = fjac.transpose() * wa4;\n        if (ratio >= Scalar(1e-4))\n            qtf = wa2;\n        wa2 = (wa2-wa3)/pnorm;\n\n        /* compute the qr factorization of the updated jacobian. */\n        internal::r1updt<Scalar>(R, wa1, v_givens, w_givens, wa2, wa3, &sing);\n        internal::r1mpyq<Scalar>(n, n, fjac.data(), v_givens, w_givens);\n        internal::r1mpyq<Scalar>(1, n, qtf.data(), v_givens, w_givens);\n\n        jeval = false;\n    }\n    return HybridNonLinearSolverSpace::Running;\n}\n\ntemplate<typename FunctorType, typename Scalar>\nHybridNonLinearSolverSpace::Status\nHybridNonLinearSolver<FunctorType,Scalar>::solveNumericalDiff(FVectorType  &x)\n{\n    HybridNonLinearSolverSpace::Status status = solveNumericalDiffInit(x);\n    if (status==HybridNonLinearSolverSpace::ImproperInputParameters)\n        return status;\n    while (status==HybridNonLinearSolverSpace::Running)\n        status = solveNumericalDiffOneStep(x);\n    return status;\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_HYBRIDNONLINEARSOLVER_H\n\n//vim: ai ts=4 sts=4 et sw=4\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/NonLinearOptimization/LevenbergMarquardt.h",
    "content": "// -*- coding: utf-8\n// vim: set fileencoding=utf-8\n\n// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Thomas Capricelli <orzel@freehackers.org>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_LEVENBERGMARQUARDT__H\n#define EIGEN_LEVENBERGMARQUARDT__H\n\nnamespace Eigen { \n\nnamespace LevenbergMarquardtSpace {\n    enum Status {\n        NotStarted = -2,\n        Running = -1,\n        ImproperInputParameters = 0,\n        RelativeReductionTooSmall = 1,\n        RelativeErrorTooSmall = 2,\n        RelativeErrorAndReductionTooSmall = 3,\n        CosinusTooSmall = 4,\n        TooManyFunctionEvaluation = 5,\n        FtolTooSmall = 6,\n        XtolTooSmall = 7,\n        GtolTooSmall = 8,\n        UserAsked = 9\n    };\n}\n\n\n\n/**\n  * \\ingroup NonLinearOptimization_Module\n  * \\brief Performs non linear optimization over a non-linear function,\n  * using a variant of the Levenberg Marquardt algorithm.\n  *\n  * Check wikipedia for more information.\n  * http://en.wikipedia.org/wiki/Levenberg%E2%80%93Marquardt_algorithm\n  */\ntemplate<typename FunctorType, typename Scalar=double>\nclass LevenbergMarquardt\n{\n    static Scalar sqrt_epsilon()\n    {\n      using std::sqrt;\n      return sqrt(NumTraits<Scalar>::epsilon());\n    }\n    \npublic:\n    LevenbergMarquardt(FunctorType &_functor)\n        : functor(_functor) { nfev = njev = iter = 0;  fnorm = gnorm = 0.; useExternalScaling=false; }\n\n    typedef DenseIndex Index;\n    \n    struct Parameters {\n        Parameters()\n            : factor(Scalar(100.))\n            , maxfev(400)\n            , ftol(sqrt_epsilon())\n            , xtol(sqrt_epsilon())\n            , gtol(Scalar(0.))\n            , epsfcn(Scalar(0.)) {}\n        Scalar factor;\n        Index maxfev;   // maximum number of function evaluation\n        Scalar ftol;\n        Scalar xtol;\n        Scalar gtol;\n        Scalar epsfcn;\n    };\n\n    typedef Matrix< Scalar, Dynamic, 1 > FVectorType;\n    typedef Matrix< Scalar, Dynamic, Dynamic > JacobianType;\n\n    LevenbergMarquardtSpace::Status lmder1(\n            FVectorType &x,\n            const Scalar tol = sqrt_epsilon()\n            );\n\n    LevenbergMarquardtSpace::Status minimize(FVectorType &x);\n    LevenbergMarquardtSpace::Status minimizeInit(FVectorType &x);\n    LevenbergMarquardtSpace::Status minimizeOneStep(FVectorType &x);\n\n    static LevenbergMarquardtSpace::Status lmdif1(\n            FunctorType &functor,\n            FVectorType &x,\n            Index *nfev,\n            const Scalar tol = sqrt_epsilon()\n            );\n\n    LevenbergMarquardtSpace::Status lmstr1(\n            FVectorType  &x,\n            const Scalar tol = sqrt_epsilon()\n            );\n\n    LevenbergMarquardtSpace::Status minimizeOptimumStorage(FVectorType  &x);\n    LevenbergMarquardtSpace::Status minimizeOptimumStorageInit(FVectorType  &x);\n    LevenbergMarquardtSpace::Status minimizeOptimumStorageOneStep(FVectorType  &x);\n\n    void resetParameters(void) { parameters = Parameters(); }\n\n    Parameters parameters;\n    FVectorType  fvec, qtf, diag;\n    JacobianType fjac;\n    PermutationMatrix<Dynamic,Dynamic> permutation;\n    Index nfev;\n    Index njev;\n    Index iter;\n    Scalar fnorm, gnorm;\n    bool useExternalScaling; \n\n    Scalar lm_param(void) { return par; }\nprivate:\n    \n    FunctorType &functor;\n    Index n;\n    Index m;\n    FVectorType wa1, wa2, wa3, wa4;\n\n    Scalar par, sum;\n    Scalar temp, temp1, temp2;\n    Scalar delta;\n    Scalar ratio;\n    Scalar pnorm, xnorm, fnorm1, actred, dirder, prered;\n\n    LevenbergMarquardt& operator=(const LevenbergMarquardt&);\n};\n\ntemplate<typename FunctorType, typename Scalar>\nLevenbergMarquardtSpace::Status\nLevenbergMarquardt<FunctorType,Scalar>::lmder1(\n        FVectorType  &x,\n        const Scalar tol\n        )\n{\n    n = x.size();\n    m = functor.values();\n\n    /* check the input parameters for errors. */\n    if (n <= 0 || m < n || tol < 0.)\n        return LevenbergMarquardtSpace::ImproperInputParameters;\n\n    resetParameters();\n    parameters.ftol = tol;\n    parameters.xtol = tol;\n    parameters.maxfev = 100*(n+1);\n\n    return minimize(x);\n}\n\n\ntemplate<typename FunctorType, typename Scalar>\nLevenbergMarquardtSpace::Status\nLevenbergMarquardt<FunctorType,Scalar>::minimize(FVectorType  &x)\n{\n    LevenbergMarquardtSpace::Status status = minimizeInit(x);\n    if (status==LevenbergMarquardtSpace::ImproperInputParameters)\n        return status;\n    do {\n        status = minimizeOneStep(x);\n    } while (status==LevenbergMarquardtSpace::Running);\n    return status;\n}\n\ntemplate<typename FunctorType, typename Scalar>\nLevenbergMarquardtSpace::Status\nLevenbergMarquardt<FunctorType,Scalar>::minimizeInit(FVectorType  &x)\n{\n    n = x.size();\n    m = functor.values();\n\n    wa1.resize(n); wa2.resize(n); wa3.resize(n);\n    wa4.resize(m);\n    fvec.resize(m);\n    fjac.resize(m, n);\n    if (!useExternalScaling)\n        diag.resize(n);\n    eigen_assert( (!useExternalScaling || diag.size()==n) && \"When useExternalScaling is set, the caller must provide a valid 'diag'\");\n    qtf.resize(n);\n\n    /* Function Body */\n    nfev = 0;\n    njev = 0;\n\n    /*     check the input parameters for errors. */\n    if (n <= 0 || m < n || parameters.ftol < 0. || parameters.xtol < 0. || parameters.gtol < 0. || parameters.maxfev <= 0 || parameters.factor <= 0.)\n        return LevenbergMarquardtSpace::ImproperInputParameters;\n\n    if (useExternalScaling)\n        for (Index j = 0; j < n; ++j)\n            if (diag[j] <= 0.)\n                return LevenbergMarquardtSpace::ImproperInputParameters;\n\n    /*     evaluate the function at the starting point */\n    /*     and calculate its norm. */\n    nfev = 1;\n    if ( functor(x, fvec) < 0)\n        return LevenbergMarquardtSpace::UserAsked;\n    fnorm = fvec.stableNorm();\n\n    /*     initialize levenberg-marquardt parameter and iteration counter. */\n    par = 0.;\n    iter = 1;\n\n    return LevenbergMarquardtSpace::NotStarted;\n}\n\ntemplate<typename FunctorType, typename Scalar>\nLevenbergMarquardtSpace::Status\nLevenbergMarquardt<FunctorType,Scalar>::minimizeOneStep(FVectorType  &x)\n{\n    using std::abs;\n    using std::sqrt;\n\n    eigen_assert(x.size()==n); // check the caller is not cheating us\n\n    /* calculate the jacobian matrix. */\n    Index df_ret = functor.df(x, fjac);\n    if (df_ret<0)\n        return LevenbergMarquardtSpace::UserAsked;\n    if (df_ret>0)\n        // numerical diff, we evaluated the function df_ret times\n        nfev += df_ret;\n    else njev++;\n\n    /* compute the qr factorization of the jacobian. */\n    wa2 = fjac.colwise().blueNorm();\n    ColPivHouseholderQR<JacobianType> qrfac(fjac);\n    fjac = qrfac.matrixQR();\n    permutation = qrfac.colsPermutation();\n\n    /* on the first iteration and if external scaling is not used, scale according */\n    /* to the norms of the columns of the initial jacobian. */\n    if (iter == 1) {\n        if (!useExternalScaling)\n            for (Index j = 0; j < n; ++j)\n                diag[j] = (wa2[j]==0.)? 1. : wa2[j];\n\n        /* on the first iteration, calculate the norm of the scaled x */\n        /* and initialize the step bound delta. */\n        xnorm = diag.cwiseProduct(x).stableNorm();\n        delta = parameters.factor * xnorm;\n        if (delta == 0.)\n            delta = parameters.factor;\n    }\n\n    /* form (q transpose)*fvec and store the first n components in */\n    /* qtf. */\n    wa4 = fvec;\n    wa4.applyOnTheLeft(qrfac.householderQ().adjoint());\n    qtf = wa4.head(n);\n\n    /* compute the norm of the scaled gradient. */\n    gnorm = 0.;\n    if (fnorm != 0.)\n        for (Index j = 0; j < n; ++j)\n            if (wa2[permutation.indices()[j]] != 0.)\n                gnorm = (std::max)(gnorm, abs( fjac.col(j).head(j+1).dot(qtf.head(j+1)/fnorm) / wa2[permutation.indices()[j]]));\n\n    /* test for convergence of the gradient norm. */\n    if (gnorm <= parameters.gtol)\n        return LevenbergMarquardtSpace::CosinusTooSmall;\n\n    /* rescale if necessary. */\n    if (!useExternalScaling)\n        diag = diag.cwiseMax(wa2);\n\n    do {\n\n        /* determine the levenberg-marquardt parameter. */\n        internal::lmpar2<Scalar>(qrfac, diag, qtf, delta, par, wa1);\n\n        /* store the direction p and x + p. calculate the norm of p. */\n        wa1 = -wa1;\n        wa2 = x + wa1;\n        pnorm = diag.cwiseProduct(wa1).stableNorm();\n\n        /* on the first iteration, adjust the initial step bound. */\n        if (iter == 1)\n            delta = (std::min)(delta,pnorm);\n\n        /* evaluate the function at x + p and calculate its norm. */\n        if ( functor(wa2, wa4) < 0)\n            return LevenbergMarquardtSpace::UserAsked;\n        ++nfev;\n        fnorm1 = wa4.stableNorm();\n\n        /* compute the scaled actual reduction. */\n        actred = -1.;\n        if (Scalar(.1) * fnorm1 < fnorm)\n            actred = 1. - numext::abs2(fnorm1 / fnorm);\n\n        /* compute the scaled predicted reduction and */\n        /* the scaled directional derivative. */\n        wa3 = fjac.template triangularView<Upper>() * (qrfac.colsPermutation().inverse() *wa1);\n        temp1 = numext::abs2(wa3.stableNorm() / fnorm);\n        temp2 = numext::abs2(sqrt(par) * pnorm / fnorm);\n        prered = temp1 + temp2 / Scalar(.5);\n        dirder = -(temp1 + temp2);\n\n        /* compute the ratio of the actual to the predicted */\n        /* reduction. */\n        ratio = 0.;\n        if (prered != 0.)\n            ratio = actred / prered;\n\n        /* update the step bound. */\n        if (ratio <= Scalar(.25)) {\n            if (actred >= 0.)\n                temp = Scalar(.5);\n            if (actred < 0.)\n                temp = Scalar(.5) * dirder / (dirder + Scalar(.5) * actred);\n            if (Scalar(.1) * fnorm1 >= fnorm || temp < Scalar(.1))\n                temp = Scalar(.1);\n            /* Computing MIN */\n            delta = temp * (std::min)(delta, pnorm / Scalar(.1));\n            par /= temp;\n        } else if (!(par != 0. && ratio < Scalar(.75))) {\n            delta = pnorm / Scalar(.5);\n            par = Scalar(.5) * par;\n        }\n\n        /* test for successful iteration. */\n        if (ratio >= Scalar(1e-4)) {\n            /* successful iteration. update x, fvec, and their norms. */\n            x = wa2;\n            wa2 = diag.cwiseProduct(x);\n            fvec = wa4;\n            xnorm = wa2.stableNorm();\n            fnorm = fnorm1;\n            ++iter;\n        }\n\n        /* tests for convergence. */\n        if (abs(actred) <= parameters.ftol && prered <= parameters.ftol && Scalar(.5) * ratio <= 1. && delta <= parameters.xtol * xnorm)\n            return LevenbergMarquardtSpace::RelativeErrorAndReductionTooSmall;\n        if (abs(actred) <= parameters.ftol && prered <= parameters.ftol && Scalar(.5) * ratio <= 1.)\n            return LevenbergMarquardtSpace::RelativeReductionTooSmall;\n        if (delta <= parameters.xtol * xnorm)\n            return LevenbergMarquardtSpace::RelativeErrorTooSmall;\n\n        /* tests for termination and stringent tolerances. */\n        if (nfev >= parameters.maxfev)\n            return LevenbergMarquardtSpace::TooManyFunctionEvaluation;\n        if (abs(actred) <= NumTraits<Scalar>::epsilon() && prered <= NumTraits<Scalar>::epsilon() && Scalar(.5) * ratio <= 1.)\n            return LevenbergMarquardtSpace::FtolTooSmall;\n        if (delta <= NumTraits<Scalar>::epsilon() * xnorm)\n            return LevenbergMarquardtSpace::XtolTooSmall;\n        if (gnorm <= NumTraits<Scalar>::epsilon())\n            return LevenbergMarquardtSpace::GtolTooSmall;\n\n    } while (ratio < Scalar(1e-4));\n\n    return LevenbergMarquardtSpace::Running;\n}\n\ntemplate<typename FunctorType, typename Scalar>\nLevenbergMarquardtSpace::Status\nLevenbergMarquardt<FunctorType,Scalar>::lmstr1(\n        FVectorType  &x,\n        const Scalar tol\n        )\n{\n    n = x.size();\n    m = functor.values();\n\n    /* check the input parameters for errors. */\n    if (n <= 0 || m < n || tol < 0.)\n        return LevenbergMarquardtSpace::ImproperInputParameters;\n\n    resetParameters();\n    parameters.ftol = tol;\n    parameters.xtol = tol;\n    parameters.maxfev = 100*(n+1);\n\n    return minimizeOptimumStorage(x);\n}\n\ntemplate<typename FunctorType, typename Scalar>\nLevenbergMarquardtSpace::Status\nLevenbergMarquardt<FunctorType,Scalar>::minimizeOptimumStorageInit(FVectorType  &x)\n{\n    n = x.size();\n    m = functor.values();\n\n    wa1.resize(n); wa2.resize(n); wa3.resize(n);\n    wa4.resize(m);\n    fvec.resize(m);\n    // Only R is stored in fjac. Q is only used to compute 'qtf', which is\n    // Q.transpose()*rhs. qtf will be updated using givens rotation,\n    // instead of storing them in Q.\n    // The purpose it to only use a nxn matrix, instead of mxn here, so\n    // that we can handle cases where m>>n :\n    fjac.resize(n, n);\n    if (!useExternalScaling)\n        diag.resize(n);\n    eigen_assert( (!useExternalScaling || diag.size()==n) && \"When useExternalScaling is set, the caller must provide a valid 'diag'\");\n    qtf.resize(n);\n\n    /* Function Body */\n    nfev = 0;\n    njev = 0;\n\n    /*     check the input parameters for errors. */\n    if (n <= 0 || m < n || parameters.ftol < 0. || parameters.xtol < 0. || parameters.gtol < 0. || parameters.maxfev <= 0 || parameters.factor <= 0.)\n        return LevenbergMarquardtSpace::ImproperInputParameters;\n\n    if (useExternalScaling)\n        for (Index j = 0; j < n; ++j)\n            if (diag[j] <= 0.)\n                return LevenbergMarquardtSpace::ImproperInputParameters;\n\n    /*     evaluate the function at the starting point */\n    /*     and calculate its norm. */\n    nfev = 1;\n    if ( functor(x, fvec) < 0)\n        return LevenbergMarquardtSpace::UserAsked;\n    fnorm = fvec.stableNorm();\n\n    /*     initialize levenberg-marquardt parameter and iteration counter. */\n    par = 0.;\n    iter = 1;\n\n    return LevenbergMarquardtSpace::NotStarted;\n}\n\n\ntemplate<typename FunctorType, typename Scalar>\nLevenbergMarquardtSpace::Status\nLevenbergMarquardt<FunctorType,Scalar>::minimizeOptimumStorageOneStep(FVectorType  &x)\n{\n    using std::abs;\n    using std::sqrt;\n    \n    eigen_assert(x.size()==n); // check the caller is not cheating us\n\n    Index i, j;\n    bool sing;\n\n    /* compute the qr factorization of the jacobian matrix */\n    /* calculated one row at a time, while simultaneously */\n    /* forming (q transpose)*fvec and storing the first */\n    /* n components in qtf. */\n    qtf.fill(0.);\n    fjac.fill(0.);\n    Index rownb = 2;\n    for (i = 0; i < m; ++i) {\n        if (functor.df(x, wa3, rownb) < 0) return LevenbergMarquardtSpace::UserAsked;\n        internal::rwupdt<Scalar>(fjac, wa3, qtf, fvec[i]);\n        ++rownb;\n    }\n    ++njev;\n\n    /* if the jacobian is rank deficient, call qrfac to */\n    /* reorder its columns and update the components of qtf. */\n    sing = false;\n    for (j = 0; j < n; ++j) {\n        if (fjac(j,j) == 0.)\n            sing = true;\n        wa2[j] = fjac.col(j).head(j).stableNorm();\n    }\n    permutation.setIdentity(n);\n    if (sing) {\n        wa2 = fjac.colwise().blueNorm();\n        // TODO We have no unit test covering this code path, do not modify\n        // until it is carefully tested\n        ColPivHouseholderQR<JacobianType> qrfac(fjac);\n        fjac = qrfac.matrixQR();\n        wa1 = fjac.diagonal();\n        fjac.diagonal() = qrfac.hCoeffs();\n        permutation = qrfac.colsPermutation();\n        // TODO : avoid this:\n        for(Index ii=0; ii< fjac.cols(); ii++) fjac.col(ii).segment(ii+1, fjac.rows()-ii-1) *= fjac(ii,ii); // rescale vectors\n\n        for (j = 0; j < n; ++j) {\n            if (fjac(j,j) != 0.) {\n                sum = 0.;\n                for (i = j; i < n; ++i)\n                    sum += fjac(i,j) * qtf[i];\n                temp = -sum / fjac(j,j);\n                for (i = j; i < n; ++i)\n                    qtf[i] += fjac(i,j) * temp;\n            }\n            fjac(j,j) = wa1[j];\n        }\n    }\n\n    /* on the first iteration and if external scaling is not used, scale according */\n    /* to the norms of the columns of the initial jacobian. */\n    if (iter == 1) {\n        if (!useExternalScaling)\n            for (j = 0; j < n; ++j)\n                diag[j] = (wa2[j]==0.)? 1. : wa2[j];\n\n        /* on the first iteration, calculate the norm of the scaled x */\n        /* and initialize the step bound delta. */\n        xnorm = diag.cwiseProduct(x).stableNorm();\n        delta = parameters.factor * xnorm;\n        if (delta == 0.)\n            delta = parameters.factor;\n    }\n\n    /* compute the norm of the scaled gradient. */\n    gnorm = 0.;\n    if (fnorm != 0.)\n        for (j = 0; j < n; ++j)\n            if (wa2[permutation.indices()[j]] != 0.)\n                gnorm = (std::max)(gnorm, abs( fjac.col(j).head(j+1).dot(qtf.head(j+1)/fnorm) / wa2[permutation.indices()[j]]));\n\n    /* test for convergence of the gradient norm. */\n    if (gnorm <= parameters.gtol)\n        return LevenbergMarquardtSpace::CosinusTooSmall;\n\n    /* rescale if necessary. */\n    if (!useExternalScaling)\n        diag = diag.cwiseMax(wa2);\n\n    do {\n\n        /* determine the levenberg-marquardt parameter. */\n        internal::lmpar<Scalar>(fjac, permutation.indices(), diag, qtf, delta, par, wa1);\n\n        /* store the direction p and x + p. calculate the norm of p. */\n        wa1 = -wa1;\n        wa2 = x + wa1;\n        pnorm = diag.cwiseProduct(wa1).stableNorm();\n\n        /* on the first iteration, adjust the initial step bound. */\n        if (iter == 1)\n            delta = (std::min)(delta,pnorm);\n\n        /* evaluate the function at x + p and calculate its norm. */\n        if ( functor(wa2, wa4) < 0)\n            return LevenbergMarquardtSpace::UserAsked;\n        ++nfev;\n        fnorm1 = wa4.stableNorm();\n\n        /* compute the scaled actual reduction. */\n        actred = -1.;\n        if (Scalar(.1) * fnorm1 < fnorm)\n            actred = 1. - numext::abs2(fnorm1 / fnorm);\n\n        /* compute the scaled predicted reduction and */\n        /* the scaled directional derivative. */\n        wa3 = fjac.topLeftCorner(n,n).template triangularView<Upper>() * (permutation.inverse() * wa1);\n        temp1 = numext::abs2(wa3.stableNorm() / fnorm);\n        temp2 = numext::abs2(sqrt(par) * pnorm / fnorm);\n        prered = temp1 + temp2 / Scalar(.5);\n        dirder = -(temp1 + temp2);\n\n        /* compute the ratio of the actual to the predicted */\n        /* reduction. */\n        ratio = 0.;\n        if (prered != 0.)\n            ratio = actred / prered;\n\n        /* update the step bound. */\n        if (ratio <= Scalar(.25)) {\n            if (actred >= 0.)\n                temp = Scalar(.5);\n            if (actred < 0.)\n                temp = Scalar(.5) * dirder / (dirder + Scalar(.5) * actred);\n            if (Scalar(.1) * fnorm1 >= fnorm || temp < Scalar(.1))\n                temp = Scalar(.1);\n            /* Computing MIN */\n            delta = temp * (std::min)(delta, pnorm / Scalar(.1));\n            par /= temp;\n        } else if (!(par != 0. && ratio < Scalar(.75))) {\n            delta = pnorm / Scalar(.5);\n            par = Scalar(.5) * par;\n        }\n\n        /* test for successful iteration. */\n        if (ratio >= Scalar(1e-4)) {\n            /* successful iteration. update x, fvec, and their norms. */\n            x = wa2;\n            wa2 = diag.cwiseProduct(x);\n            fvec = wa4;\n            xnorm = wa2.stableNorm();\n            fnorm = fnorm1;\n            ++iter;\n        }\n\n        /* tests for convergence. */\n        if (abs(actred) <= parameters.ftol && prered <= parameters.ftol && Scalar(.5) * ratio <= 1. && delta <= parameters.xtol * xnorm)\n            return LevenbergMarquardtSpace::RelativeErrorAndReductionTooSmall;\n        if (abs(actred) <= parameters.ftol && prered <= parameters.ftol && Scalar(.5) * ratio <= 1.)\n            return LevenbergMarquardtSpace::RelativeReductionTooSmall;\n        if (delta <= parameters.xtol * xnorm)\n            return LevenbergMarquardtSpace::RelativeErrorTooSmall;\n\n        /* tests for termination and stringent tolerances. */\n        if (nfev >= parameters.maxfev)\n            return LevenbergMarquardtSpace::TooManyFunctionEvaluation;\n        if (abs(actred) <= NumTraits<Scalar>::epsilon() && prered <= NumTraits<Scalar>::epsilon() && Scalar(.5) * ratio <= 1.)\n            return LevenbergMarquardtSpace::FtolTooSmall;\n        if (delta <= NumTraits<Scalar>::epsilon() * xnorm)\n            return LevenbergMarquardtSpace::XtolTooSmall;\n        if (gnorm <= NumTraits<Scalar>::epsilon())\n            return LevenbergMarquardtSpace::GtolTooSmall;\n\n    } while (ratio < Scalar(1e-4));\n\n    return LevenbergMarquardtSpace::Running;\n}\n\ntemplate<typename FunctorType, typename Scalar>\nLevenbergMarquardtSpace::Status\nLevenbergMarquardt<FunctorType,Scalar>::minimizeOptimumStorage(FVectorType  &x)\n{\n    LevenbergMarquardtSpace::Status status = minimizeOptimumStorageInit(x);\n    if (status==LevenbergMarquardtSpace::ImproperInputParameters)\n        return status;\n    do {\n        status = minimizeOptimumStorageOneStep(x);\n    } while (status==LevenbergMarquardtSpace::Running);\n    return status;\n}\n\ntemplate<typename FunctorType, typename Scalar>\nLevenbergMarquardtSpace::Status\nLevenbergMarquardt<FunctorType,Scalar>::lmdif1(\n        FunctorType &functor,\n        FVectorType  &x,\n        Index *nfev,\n        const Scalar tol\n        )\n{\n    Index n = x.size();\n    Index m = functor.values();\n\n    /* check the input parameters for errors. */\n    if (n <= 0 || m < n || tol < 0.)\n        return LevenbergMarquardtSpace::ImproperInputParameters;\n\n    NumericalDiff<FunctorType> numDiff(functor);\n    // embedded LevenbergMarquardt\n    LevenbergMarquardt<NumericalDiff<FunctorType>, Scalar > lm(numDiff);\n    lm.parameters.ftol = tol;\n    lm.parameters.xtol = tol;\n    lm.parameters.maxfev = 200*(n+1);\n\n    LevenbergMarquardtSpace::Status info = LevenbergMarquardtSpace::Status(lm.minimize(x));\n    if (nfev)\n        * nfev = lm.nfev;\n    return info;\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_LEVENBERGMARQUARDT__H\n\n//vim: ai ts=4 sts=4 et sw=4\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/NonLinearOptimization/chkder.h",
    "content": "#define chkder_log10e 0.43429448190325182765\n#define chkder_factor 100.\n\nnamespace Eigen { \n\nnamespace internal {\n\ntemplate<typename Scalar>\nvoid chkder(\n        const Matrix< Scalar, Dynamic, 1 >  &x,\n        const Matrix< Scalar, Dynamic, 1 >  &fvec,\n        const Matrix< Scalar, Dynamic, Dynamic > &fjac,\n        Matrix< Scalar, Dynamic, 1 >  &xp,\n        const Matrix< Scalar, Dynamic, 1 >  &fvecp,\n        int mode,\n        Matrix< Scalar, Dynamic, 1 >  &err\n        )\n{\n    using std::sqrt;\n    using std::abs;\n    using std::log;\n    \n    typedef DenseIndex Index;\n\n    const Scalar eps = sqrt(NumTraits<Scalar>::epsilon());\n    const Scalar epsf = chkder_factor * NumTraits<Scalar>::epsilon();\n    const Scalar epslog = chkder_log10e * log(eps);\n    Scalar temp;\n\n    const Index m = fvec.size(), n = x.size();\n\n    if (mode != 2) {\n        /* mode = 1. */\n        xp.resize(n);\n        for (Index j = 0; j < n; ++j) {\n            temp = eps * abs(x[j]);\n            if (temp == 0.)\n                temp = eps;\n            xp[j] = x[j] + temp;\n        }\n    }\n    else {\n        /* mode = 2. */\n        err.setZero(m); \n        for (Index j = 0; j < n; ++j) {\n            temp = abs(x[j]);\n            if (temp == 0.)\n                temp = 1.;\n            err += temp * fjac.col(j);\n        }\n        for (Index i = 0; i < m; ++i) {\n            temp = 1.;\n            if (fvec[i] != 0. && fvecp[i] != 0. && abs(fvecp[i] - fvec[i]) >= epsf * abs(fvec[i]))\n                temp = eps * abs((fvecp[i] - fvec[i]) / eps - err[i]) / (abs(fvec[i]) + abs(fvecp[i]));\n            err[i] = 1.;\n            if (temp > NumTraits<Scalar>::epsilon() && temp < eps)\n                err[i] = (chkder_log10e * log(temp) - epslog) / epslog;\n            if (temp >= eps)\n                err[i] = 0.;\n        }\n    }\n}\n\n} // end namespace internal\n\n} // end namespace Eigen\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/NonLinearOptimization/covar.h",
    "content": "namespace Eigen { \n\nnamespace internal {\n\ntemplate <typename Scalar>\nvoid covar(\n        Matrix< Scalar, Dynamic, Dynamic > &r,\n        const VectorXi &ipvt,\n        Scalar tol = std::sqrt(NumTraits<Scalar>::epsilon()) )\n{\n    using std::abs;\n    typedef DenseIndex Index;\n\n    /* Local variables */\n    Index i, j, k, l, ii, jj;\n    bool sing;\n    Scalar temp;\n\n    /* Function Body */\n    const Index n = r.cols();\n    const Scalar tolr = tol * abs(r(0,0));\n    Matrix< Scalar, Dynamic, 1 > wa(n);\n    eigen_assert(ipvt.size()==n);\n\n    /* form the inverse of r in the full upper triangle of r. */\n    l = -1;\n    for (k = 0; k < n; ++k)\n        if (abs(r(k,k)) > tolr) {\n            r(k,k) = 1. / r(k,k);\n            for (j = 0; j <= k-1; ++j) {\n                temp = r(k,k) * r(j,k);\n                r(j,k) = 0.;\n                r.col(k).head(j+1) -= r.col(j).head(j+1) * temp;\n            }\n            l = k;\n        }\n\n    /* form the full upper triangle of the inverse of (r transpose)*r */\n    /* in the full upper triangle of r. */\n    for (k = 0; k <= l; ++k) {\n        for (j = 0; j <= k-1; ++j)\n            r.col(j).head(j+1) += r.col(k).head(j+1) * r(j,k);\n        r.col(k).head(k+1) *= r(k,k);\n    }\n\n    /* form the full lower triangle of the covariance matrix */\n    /* in the strict lower triangle of r and in wa. */\n    for (j = 0; j < n; ++j) {\n        jj = ipvt[j];\n        sing = j > l;\n        for (i = 0; i <= j; ++i) {\n            if (sing)\n                r(i,j) = 0.;\n            ii = ipvt[i];\n            if (ii > jj)\n                r(ii,jj) = r(i,j);\n            if (ii < jj)\n                r(jj,ii) = r(i,j);\n        }\n        wa[jj] = r(j,j);\n    }\n\n    /* symmetrize the covariance matrix in r. */\n    r.topLeftCorner(n,n).template triangularView<StrictlyUpper>() = r.topLeftCorner(n,n).transpose();\n    r.diagonal() = wa;\n}\n\n} // end namespace internal\n\n} // end namespace Eigen\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/NonLinearOptimization/dogleg.h",
    "content": "namespace Eigen { \n\nnamespace internal {\n\ntemplate <typename Scalar>\nvoid dogleg(\n        const Matrix< Scalar, Dynamic, Dynamic >  &qrfac,\n        const Matrix< Scalar, Dynamic, 1 >  &diag,\n        const Matrix< Scalar, Dynamic, 1 >  &qtb,\n        Scalar delta,\n        Matrix< Scalar, Dynamic, 1 >  &x)\n{\n    using std::abs;\n    using std::sqrt;\n    \n    typedef DenseIndex Index;\n\n    /* Local variables */\n    Index i, j;\n    Scalar sum, temp, alpha, bnorm;\n    Scalar gnorm, qnorm;\n    Scalar sgnorm;\n\n    /* Function Body */\n    const Scalar epsmch = NumTraits<Scalar>::epsilon();\n    const Index n = qrfac.cols();\n    eigen_assert(n==qtb.size());\n    eigen_assert(n==x.size());\n    eigen_assert(n==diag.size());\n    Matrix< Scalar, Dynamic, 1 >  wa1(n), wa2(n);\n\n    /* first, calculate the gauss-newton direction. */\n    for (j = n-1; j >=0; --j) {\n        temp = qrfac(j,j);\n        if (temp == 0.) {\n            temp = epsmch * qrfac.col(j).head(j+1).maxCoeff();\n            if (temp == 0.)\n                temp = epsmch;\n        }\n        if (j==n-1)\n            x[j] = qtb[j] / temp;\n        else\n            x[j] = (qtb[j] - qrfac.row(j).tail(n-j-1).dot(x.tail(n-j-1))) / temp;\n    }\n\n    /* test whether the gauss-newton direction is acceptable. */\n    qnorm = diag.cwiseProduct(x).stableNorm();\n    if (qnorm <= delta)\n        return;\n\n    // TODO : this path is not tested by Eigen unit tests\n\n    /* the gauss-newton direction is not acceptable. */\n    /* next, calculate the scaled gradient direction. */\n\n    wa1.fill(0.);\n    for (j = 0; j < n; ++j) {\n        wa1.tail(n-j) += qrfac.row(j).tail(n-j) * qtb[j];\n        wa1[j] /= diag[j];\n    }\n\n    /* calculate the norm of the scaled gradient and test for */\n    /* the special case in which the scaled gradient is zero. */\n    gnorm = wa1.stableNorm();\n    sgnorm = 0.;\n    alpha = delta / qnorm;\n    if (gnorm == 0.)\n        goto algo_end;\n\n    /* calculate the point along the scaled gradient */\n    /* at which the quadratic is minimized. */\n    wa1.array() /= (diag*gnorm).array();\n    // TODO : once unit tests cover this part,:\n    // wa2 = qrfac.template triangularView<Upper>() * wa1;\n    for (j = 0; j < n; ++j) {\n        sum = 0.;\n        for (i = j; i < n; ++i) {\n            sum += qrfac(j,i) * wa1[i];\n        }\n        wa2[j] = sum;\n    }\n    temp = wa2.stableNorm();\n    sgnorm = gnorm / temp / temp;\n\n    /* test whether the scaled gradient direction is acceptable. */\n    alpha = 0.;\n    if (sgnorm >= delta)\n        goto algo_end;\n\n    /* the scaled gradient direction is not acceptable. */\n    /* finally, calculate the point along the dogleg */\n    /* at which the quadratic is minimized. */\n    bnorm = qtb.stableNorm();\n    temp = bnorm / gnorm * (bnorm / qnorm) * (sgnorm / delta);\n    temp = temp - delta / qnorm * numext::abs2(sgnorm / delta) + sqrt(numext::abs2(temp - delta / qnorm) + (1.-numext::abs2(delta / qnorm)) * (1.-numext::abs2(sgnorm / delta)));\n    alpha = delta / qnorm * (1. - numext::abs2(sgnorm / delta)) / temp;\nalgo_end:\n\n    /* form appropriate convex combination of the gauss-newton */\n    /* direction and the scaled gradient direction. */\n    temp = (1.-alpha) * (std::min)(sgnorm,delta);\n    x = temp * wa1 + alpha * x;\n}\n\n} // end namespace internal\n\n} // end namespace Eigen\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/NonLinearOptimization/fdjac1.h",
    "content": "namespace Eigen { \n\nnamespace internal {\n\ntemplate<typename FunctorType, typename Scalar>\nDenseIndex fdjac1(\n        const FunctorType &Functor,\n        Matrix< Scalar, Dynamic, 1 >  &x,\n        Matrix< Scalar, Dynamic, 1 >  &fvec,\n        Matrix< Scalar, Dynamic, Dynamic > &fjac,\n        DenseIndex ml, DenseIndex mu,\n        Scalar epsfcn)\n{\n    using std::sqrt;\n    using std::abs;\n    \n    typedef DenseIndex Index;\n\n    /* Local variables */\n    Scalar h;\n    Index j, k;\n    Scalar eps, temp;\n    Index msum;\n    int iflag;\n    Index start, length;\n\n    /* Function Body */\n    const Scalar epsmch = NumTraits<Scalar>::epsilon();\n    const Index n = x.size();\n    eigen_assert(fvec.size()==n);\n    Matrix< Scalar, Dynamic, 1 >  wa1(n);\n    Matrix< Scalar, Dynamic, 1 >  wa2(n);\n\n    eps = sqrt((std::max)(epsfcn,epsmch));\n    msum = ml + mu + 1;\n    if (msum >= n) {\n        /* computation of dense approximate jacobian. */\n        for (j = 0; j < n; ++j) {\n            temp = x[j];\n            h = eps * abs(temp);\n            if (h == 0.)\n                h = eps;\n            x[j] = temp + h;\n            iflag = Functor(x, wa1);\n            if (iflag < 0)\n                return iflag;\n            x[j] = temp;\n            fjac.col(j) = (wa1-fvec)/h;\n        }\n\n    }else {\n        /* computation of banded approximate jacobian. */\n        for (k = 0; k < msum; ++k) {\n            for (j = k; (msum<0) ? (j>n): (j<n); j += msum) {\n                wa2[j] = x[j];\n                h = eps * abs(wa2[j]);\n                if (h == 0.) h = eps;\n                x[j] = wa2[j] + h;\n            }\n            iflag = Functor(x, wa1);\n            if (iflag < 0)\n                return iflag;\n            for (j = k; (msum<0) ? (j>n): (j<n); j += msum) {\n                x[j] = wa2[j];\n                h = eps * abs(wa2[j]);\n                if (h == 0.) h = eps;\n                fjac.col(j).setZero();\n                start = std::max<Index>(0,j-mu);\n                length = (std::min)(n-1, j+ml) - start + 1;\n                fjac.col(j).segment(start, length) = ( wa1.segment(start, length)-fvec.segment(start, length))/h;\n            }\n        }\n    }\n    return 0;\n}\n\n} // end namespace internal\n\n} // end namespace Eigen\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/NonLinearOptimization/lmpar.h",
    "content": "namespace Eigen { \n\nnamespace internal {\n\ntemplate <typename Scalar>\nvoid lmpar(\n        Matrix< Scalar, Dynamic, Dynamic > &r,\n        const VectorXi &ipvt,\n        const Matrix< Scalar, Dynamic, 1 >  &diag,\n        const Matrix< Scalar, Dynamic, 1 >  &qtb,\n        Scalar delta,\n        Scalar &par,\n        Matrix< Scalar, Dynamic, 1 >  &x)\n{\n    using std::abs;\n    using std::sqrt;\n    typedef DenseIndex Index;\n\n    /* Local variables */\n    Index i, j, l;\n    Scalar fp;\n    Scalar parc, parl;\n    Index iter;\n    Scalar temp, paru;\n    Scalar gnorm;\n    Scalar dxnorm;\n\n\n    /* Function Body */\n    const Scalar dwarf = (std::numeric_limits<Scalar>::min)();\n    const Index n = r.cols();\n    eigen_assert(n==diag.size());\n    eigen_assert(n==qtb.size());\n    eigen_assert(n==x.size());\n\n    Matrix< Scalar, Dynamic, 1 >  wa1, wa2;\n\n    /* compute and store in x the gauss-newton direction. if the */\n    /* jacobian is rank-deficient, obtain a least squares solution. */\n    Index nsing = n-1;\n    wa1 = qtb;\n    for (j = 0; j < n; ++j) {\n        if (r(j,j) == 0. && nsing == n-1)\n            nsing = j - 1;\n        if (nsing < n-1)\n            wa1[j] = 0.;\n    }\n    for (j = nsing; j>=0; --j) {\n        wa1[j] /= r(j,j);\n        temp = wa1[j];\n        for (i = 0; i < j ; ++i)\n            wa1[i] -= r(i,j) * temp;\n    }\n\n    for (j = 0; j < n; ++j)\n        x[ipvt[j]] = wa1[j];\n\n    /* initialize the iteration counter. */\n    /* evaluate the function at the origin, and test */\n    /* for acceptance of the gauss-newton direction. */\n    iter = 0;\n    wa2 = diag.cwiseProduct(x);\n    dxnorm = wa2.blueNorm();\n    fp = dxnorm - delta;\n    if (fp <= Scalar(0.1) * delta) {\n        par = 0;\n        return;\n    }\n\n    /* if the jacobian is not rank deficient, the newton */\n    /* step provides a lower bound, parl, for the zero of */\n    /* the function. otherwise set this bound to zero. */\n    parl = 0.;\n    if (nsing >= n-1) {\n        for (j = 0; j < n; ++j) {\n            l = ipvt[j];\n            wa1[j] = diag[l] * (wa2[l] / dxnorm);\n        }\n        // it's actually a triangularView.solveInplace(), though in a weird\n        // way:\n        for (j = 0; j < n; ++j) {\n            Scalar sum = 0.;\n            for (i = 0; i < j; ++i)\n                sum += r(i,j) * wa1[i];\n            wa1[j] = (wa1[j] - sum) / r(j,j);\n        }\n        temp = wa1.blueNorm();\n        parl = fp / delta / temp / temp;\n    }\n\n    /* calculate an upper bound, paru, for the zero of the function. */\n    for (j = 0; j < n; ++j)\n        wa1[j] = r.col(j).head(j+1).dot(qtb.head(j+1)) / diag[ipvt[j]];\n\n    gnorm = wa1.stableNorm();\n    paru = gnorm / delta;\n    if (paru == 0.)\n        paru = dwarf / (std::min)(delta,Scalar(0.1));\n\n    /* if the input par lies outside of the interval (parl,paru), */\n    /* set par to the closer endpoint. */\n    par = (std::max)(par,parl);\n    par = (std::min)(par,paru);\n    if (par == 0.)\n        par = gnorm / dxnorm;\n\n    /* beginning of an iteration. */\n    while (true) {\n        ++iter;\n\n        /* evaluate the function at the current value of par. */\n        if (par == 0.)\n            par = (std::max)(dwarf,Scalar(.001) * paru); /* Computing MAX */\n        wa1 = sqrt(par)* diag;\n\n        Matrix< Scalar, Dynamic, 1 > sdiag(n);\n        qrsolv<Scalar>(r, ipvt, wa1, qtb, x, sdiag);\n\n        wa2 = diag.cwiseProduct(x);\n        dxnorm = wa2.blueNorm();\n        temp = fp;\n        fp = dxnorm - delta;\n\n        /* if the function is small enough, accept the current value */\n        /* of par. also test for the exceptional cases where parl */\n        /* is zero or the number of iterations has reached 10. */\n        if (abs(fp) <= Scalar(0.1) * delta || (parl == 0. && fp <= temp && temp < 0.) || iter == 10)\n            break;\n\n        /* compute the newton correction. */\n        for (j = 0; j < n; ++j) {\n            l = ipvt[j];\n            wa1[j] = diag[l] * (wa2[l] / dxnorm);\n        }\n        for (j = 0; j < n; ++j) {\n            wa1[j] /= sdiag[j];\n            temp = wa1[j];\n            for (i = j+1; i < n; ++i)\n                wa1[i] -= r(i,j) * temp;\n        }\n        temp = wa1.blueNorm();\n        parc = fp / delta / temp / temp;\n\n        /* depending on the sign of the function, update parl or paru. */\n        if (fp > 0.)\n            parl = (std::max)(parl,par);\n        if (fp < 0.)\n            paru = (std::min)(paru,par);\n\n        /* compute an improved estimate for par. */\n        /* Computing MAX */\n        par = (std::max)(parl,par+parc);\n\n        /* end of an iteration. */\n    }\n\n    /* termination. */\n    if (iter == 0)\n        par = 0.;\n    return;\n}\n\ntemplate <typename Scalar>\nvoid lmpar2(\n        const ColPivHouseholderQR<Matrix< Scalar, Dynamic, Dynamic> > &qr,\n        const Matrix< Scalar, Dynamic, 1 >  &diag,\n        const Matrix< Scalar, Dynamic, 1 >  &qtb,\n        Scalar delta,\n        Scalar &par,\n        Matrix< Scalar, Dynamic, 1 >  &x)\n\n{\n    using std::sqrt;\n    using std::abs;\n    typedef DenseIndex Index;\n\n    /* Local variables */\n    Index j;\n    Scalar fp;\n    Scalar parc, parl;\n    Index iter;\n    Scalar temp, paru;\n    Scalar gnorm;\n    Scalar dxnorm;\n\n\n    /* Function Body */\n    const Scalar dwarf = (std::numeric_limits<Scalar>::min)();\n    const Index n = qr.matrixQR().cols();\n    eigen_assert(n==diag.size());\n    eigen_assert(n==qtb.size());\n\n    Matrix< Scalar, Dynamic, 1 >  wa1, wa2;\n\n    /* compute and store in x the gauss-newton direction. if the */\n    /* jacobian is rank-deficient, obtain a least squares solution. */\n\n//    const Index rank = qr.nonzeroPivots(); // exactly double(0.)\n    const Index rank = qr.rank(); // use a threshold\n    wa1 = qtb;\n    wa1.tail(n-rank).setZero();\n    qr.matrixQR().topLeftCorner(rank, rank).template triangularView<Upper>().solveInPlace(wa1.head(rank));\n\n    x = qr.colsPermutation()*wa1;\n\n    /* initialize the iteration counter. */\n    /* evaluate the function at the origin, and test */\n    /* for acceptance of the gauss-newton direction. */\n    iter = 0;\n    wa2 = diag.cwiseProduct(x);\n    dxnorm = wa2.blueNorm();\n    fp = dxnorm - delta;\n    if (fp <= Scalar(0.1) * delta) {\n        par = 0;\n        return;\n    }\n\n    /* if the jacobian is not rank deficient, the newton */\n    /* step provides a lower bound, parl, for the zero of */\n    /* the function. otherwise set this bound to zero. */\n    parl = 0.;\n    if (rank==n) {\n        wa1 = qr.colsPermutation().inverse() *  diag.cwiseProduct(wa2)/dxnorm;\n        qr.matrixQR().topLeftCorner(n, n).transpose().template triangularView<Lower>().solveInPlace(wa1);\n        temp = wa1.blueNorm();\n        parl = fp / delta / temp / temp;\n    }\n\n    /* calculate an upper bound, paru, for the zero of the function. */\n    for (j = 0; j < n; ++j)\n        wa1[j] = qr.matrixQR().col(j).head(j+1).dot(qtb.head(j+1)) / diag[qr.colsPermutation().indices()(j)];\n\n    gnorm = wa1.stableNorm();\n    paru = gnorm / delta;\n    if (paru == 0.)\n        paru = dwarf / (std::min)(delta,Scalar(0.1));\n\n    /* if the input par lies outside of the interval (parl,paru), */\n    /* set par to the closer endpoint. */\n    par = (std::max)(par,parl);\n    par = (std::min)(par,paru);\n    if (par == 0.)\n        par = gnorm / dxnorm;\n\n    /* beginning of an iteration. */\n    Matrix< Scalar, Dynamic, Dynamic > s = qr.matrixQR();\n    while (true) {\n        ++iter;\n\n        /* evaluate the function at the current value of par. */\n        if (par == 0.)\n            par = (std::max)(dwarf,Scalar(.001) * paru); /* Computing MAX */\n        wa1 = sqrt(par)* diag;\n\n        Matrix< Scalar, Dynamic, 1 > sdiag(n);\n        qrsolv<Scalar>(s, qr.colsPermutation().indices(), wa1, qtb, x, sdiag);\n\n        wa2 = diag.cwiseProduct(x);\n        dxnorm = wa2.blueNorm();\n        temp = fp;\n        fp = dxnorm - delta;\n\n        /* if the function is small enough, accept the current value */\n        /* of par. also test for the exceptional cases where parl */\n        /* is zero or the number of iterations has reached 10. */\n        if (abs(fp) <= Scalar(0.1) * delta || (parl == 0. && fp <= temp && temp < 0.) || iter == 10)\n            break;\n\n        /* compute the newton correction. */\n        wa1 = qr.colsPermutation().inverse() * diag.cwiseProduct(wa2/dxnorm);\n        // we could almost use this here, but the diagonal is outside qr, in sdiag[]\n        // qr.matrixQR().topLeftCorner(n, n).transpose().template triangularView<Lower>().solveInPlace(wa1);\n        for (j = 0; j < n; ++j) {\n            wa1[j] /= sdiag[j];\n            temp = wa1[j];\n            for (Index i = j+1; i < n; ++i)\n                wa1[i] -= s(i,j) * temp;\n        }\n        temp = wa1.blueNorm();\n        parc = fp / delta / temp / temp;\n\n        /* depending on the sign of the function, update parl or paru. */\n        if (fp > 0.)\n            parl = (std::max)(parl,par);\n        if (fp < 0.)\n            paru = (std::min)(paru,par);\n\n        /* compute an improved estimate for par. */\n        par = (std::max)(parl,par+parc);\n    }\n    if (iter == 0)\n        par = 0.;\n    return;\n}\n\n} // end namespace internal\n\n} // end namespace Eigen\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/NonLinearOptimization/qrsolv.h",
    "content": "namespace Eigen { \n\nnamespace internal {\n\n// TODO : once qrsolv2 is removed, use ColPivHouseholderQR or PermutationMatrix instead of ipvt\ntemplate <typename Scalar>\nvoid qrsolv(\n        Matrix< Scalar, Dynamic, Dynamic > &s,\n        // TODO : use a PermutationMatrix once lmpar is no more:\n        const VectorXi &ipvt,\n        const Matrix< Scalar, Dynamic, 1 >  &diag,\n        const Matrix< Scalar, Dynamic, 1 >  &qtb,\n        Matrix< Scalar, Dynamic, 1 >  &x,\n        Matrix< Scalar, Dynamic, 1 >  &sdiag)\n\n{\n    typedef DenseIndex Index;\n\n    /* Local variables */\n    Index i, j, k, l;\n    Scalar temp;\n    Index n = s.cols();\n    Matrix< Scalar, Dynamic, 1 >  wa(n);\n    JacobiRotation<Scalar> givens;\n\n    /* Function Body */\n    // the following will only change the lower triangular part of s, including\n    // the diagonal, though the diagonal is restored afterward\n\n    /*     copy r and (q transpose)*b to preserve input and initialize s. */\n    /*     in particular, save the diagonal elements of r in x. */\n    x = s.diagonal();\n    wa = qtb;\n\n    s.topLeftCorner(n,n).template triangularView<StrictlyLower>() = s.topLeftCorner(n,n).transpose();\n\n    /*     eliminate the diagonal matrix d using a givens rotation. */\n    for (j = 0; j < n; ++j) {\n\n        /*        prepare the row of d to be eliminated, locating the */\n        /*        diagonal element using p from the qr factorization. */\n        l = ipvt[j];\n        if (diag[l] == 0.)\n            break;\n        sdiag.tail(n-j).setZero();\n        sdiag[j] = diag[l];\n\n        /*        the transformations to eliminate the row of d */\n        /*        modify only a single element of (q transpose)*b */\n        /*        beyond the first n, which is initially zero. */\n        Scalar qtbpj = 0.;\n        for (k = j; k < n; ++k) {\n            /*           determine a givens rotation which eliminates the */\n            /*           appropriate element in the current row of d. */\n            givens.makeGivens(-s(k,k), sdiag[k]);\n\n            /*           compute the modified diagonal element of r and */\n            /*           the modified element of ((q transpose)*b,0). */\n            s(k,k) = givens.c() * s(k,k) + givens.s() * sdiag[k];\n            temp = givens.c() * wa[k] + givens.s() * qtbpj;\n            qtbpj = -givens.s() * wa[k] + givens.c() * qtbpj;\n            wa[k] = temp;\n\n            /*           accumulate the transformation in the row of s. */\n            for (i = k+1; i<n; ++i) {\n                temp = givens.c() * s(i,k) + givens.s() * sdiag[i];\n                sdiag[i] = -givens.s() * s(i,k) + givens.c() * sdiag[i];\n                s(i,k) = temp;\n            }\n        }\n    }\n\n    /*     solve the triangular system for z. if the system is */\n    /*     singular, then obtain a least squares solution. */\n    Index nsing;\n    for(nsing=0; nsing<n && sdiag[nsing]!=0; nsing++) {}\n\n    wa.tail(n-nsing).setZero();\n    s.topLeftCorner(nsing, nsing).transpose().template triangularView<Upper>().solveInPlace(wa.head(nsing));\n\n    // restore\n    sdiag = s.diagonal();\n    s.diagonal() = x;\n\n    /*     permute the components of z back to components of x. */\n    for (j = 0; j < n; ++j) x[ipvt[j]] = wa[j];\n}\n\n} // end namespace internal\n\n} // end namespace Eigen\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/NonLinearOptimization/r1mpyq.h",
    "content": "namespace Eigen { \n\nnamespace internal {\n\n// TODO : move this to GivensQR once there's such a thing in Eigen\n\ntemplate <typename Scalar>\nvoid r1mpyq(DenseIndex m, DenseIndex n, Scalar *a, const std::vector<JacobiRotation<Scalar> > &v_givens, const std::vector<JacobiRotation<Scalar> > &w_givens)\n{\n    typedef DenseIndex Index;\n\n    /*     apply the first set of givens rotations to a. */\n    for (Index j = n-2; j>=0; --j)\n        for (Index i = 0; i<m; ++i) {\n            Scalar temp = v_givens[j].c() * a[i+m*j] - v_givens[j].s() * a[i+m*(n-1)];\n            a[i+m*(n-1)] = v_givens[j].s() * a[i+m*j] + v_givens[j].c() * a[i+m*(n-1)];\n            a[i+m*j] = temp;\n        }\n    /*     apply the second set of givens rotations to a. */\n    for (Index j = 0; j<n-1; ++j)\n        for (Index i = 0; i<m; ++i) {\n            Scalar temp = w_givens[j].c() * a[i+m*j] + w_givens[j].s() * a[i+m*(n-1)];\n            a[i+m*(n-1)] = -w_givens[j].s() * a[i+m*j] + w_givens[j].c() * a[i+m*(n-1)];\n            a[i+m*j] = temp;\n        }\n}\n\n} // end namespace internal\n\n} // end namespace Eigen\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/NonLinearOptimization/r1updt.h",
    "content": "namespace Eigen { \n\nnamespace internal {\n\ntemplate <typename Scalar>\nvoid r1updt(\n        Matrix< Scalar, Dynamic, Dynamic > &s,\n        const Matrix< Scalar, Dynamic, 1> &u,\n        std::vector<JacobiRotation<Scalar> > &v_givens,\n        std::vector<JacobiRotation<Scalar> > &w_givens,\n        Matrix< Scalar, Dynamic, 1> &v,\n        Matrix< Scalar, Dynamic, 1> &w,\n        bool *sing)\n{\n    typedef DenseIndex Index;\n    const JacobiRotation<Scalar> IdentityRotation = JacobiRotation<Scalar>(1,0);\n\n    /* Local variables */\n    const Index m = s.rows();\n    const Index n = s.cols();\n    Index i, j=1;\n    Scalar temp;\n    JacobiRotation<Scalar> givens;\n\n    // r1updt had a broader usecase, but we don't use it here. And, more\n    // importantly, we can not test it.\n    eigen_assert(m==n);\n    eigen_assert(u.size()==m);\n    eigen_assert(v.size()==n);\n    eigen_assert(w.size()==n);\n\n    /* move the nontrivial part of the last column of s into w. */\n    w[n-1] = s(n-1,n-1);\n\n    /* rotate the vector v into a multiple of the n-th unit vector */\n    /* in such a way that a spike is introduced into w. */\n    for (j=n-2; j>=0; --j) {\n        w[j] = 0.;\n        if (v[j] != 0.) {\n            /* determine a givens rotation which eliminates the */\n            /* j-th element of v. */\n            givens.makeGivens(-v[n-1], v[j]);\n\n            /* apply the transformation to v and store the information */\n            /* necessary to recover the givens rotation. */\n            v[n-1] = givens.s() * v[j] + givens.c() * v[n-1];\n            v_givens[j] = givens;\n\n            /* apply the transformation to s and extend the spike in w. */\n            for (i = j; i < m; ++i) {\n                temp = givens.c() * s(j,i) - givens.s() * w[i];\n                w[i] = givens.s() * s(j,i) + givens.c() * w[i];\n                s(j,i) = temp;\n            }\n        } else\n            v_givens[j] = IdentityRotation;\n    }\n\n    /* add the spike from the rank 1 update to w. */\n    w += v[n-1] * u;\n\n    /* eliminate the spike. */\n    *sing = false;\n    for (j = 0; j < n-1; ++j) {\n        if (w[j] != 0.) {\n            /* determine a givens rotation which eliminates the */\n            /* j-th element of the spike. */\n            givens.makeGivens(-s(j,j), w[j]);\n\n            /* apply the transformation to s and reduce the spike in w. */\n            for (i = j; i < m; ++i) {\n                temp = givens.c() * s(j,i) + givens.s() * w[i];\n                w[i] = -givens.s() * s(j,i) + givens.c() * w[i];\n                s(j,i) = temp;\n            }\n\n            /* store the information necessary to recover the */\n            /* givens rotation. */\n            w_givens[j] = givens;\n        } else\n            v_givens[j] = IdentityRotation;\n\n        /* test for zero diagonal elements in the output s. */\n        if (s(j,j) == 0.) {\n            *sing = true;\n        }\n    }\n    /* move w back into the last column of the output s. */\n    s(n-1,n-1) = w[n-1];\n\n    if (s(j,j) == 0.) {\n        *sing = true;\n    }\n    return;\n}\n\n} // end namespace internal\n\n} // end namespace Eigen\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/NonLinearOptimization/rwupdt.h",
    "content": "namespace Eigen { \n\nnamespace internal {\n\ntemplate <typename Scalar>\nvoid rwupdt(\n        Matrix< Scalar, Dynamic, Dynamic >  &r,\n        const Matrix< Scalar, Dynamic, 1>  &w,\n        Matrix< Scalar, Dynamic, 1>  &b,\n        Scalar alpha)\n{\n    typedef DenseIndex Index;\n\n    const Index n = r.cols();\n    eigen_assert(r.rows()>=n);\n    std::vector<JacobiRotation<Scalar> > givens(n);\n\n    /* Local variables */\n    Scalar temp, rowj;\n\n    /* Function Body */\n    for (Index j = 0; j < n; ++j) {\n        rowj = w[j];\n\n        /* apply the previous transformations to */\n        /* r(i,j), i=0,1,...,j-1, and to w(j). */\n        for (Index i = 0; i < j; ++i) {\n            temp = givens[i].c() * r(i,j) + givens[i].s() * rowj;\n            rowj = -givens[i].s() * r(i,j) + givens[i].c() * rowj;\n            r(i,j) = temp;\n        }\n\n        /* determine a givens rotation which eliminates w(j). */\n        givens[j].makeGivens(-r(j,j), rowj);\n\n        if (rowj == 0.)\n            continue; // givens[j] is identity\n\n        /* apply the current transformation to r(j,j), b(j), and alpha. */\n        r(j,j) = givens[j].c() * r(j,j) + givens[j].s() * rowj;\n        temp = givens[j].c() * b[j] + givens[j].s() * alpha;\n        alpha = -givens[j].s() * b[j] + givens[j].c() * alpha;\n        b[j] = temp;\n    }\n}\n\n} // end namespace internal\n\n} // end namespace Eigen\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/NumericalDiff/NumericalDiff.h",
    "content": "// -*- coding: utf-8\n// vim: set fileencoding=utf-8\n\n// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Thomas Capricelli <orzel@freehackers.org>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_NUMERICAL_DIFF_H\n#define EIGEN_NUMERICAL_DIFF_H\n\nnamespace Eigen { \n\nenum NumericalDiffMode {\n    Forward,\n    Central\n};\n\n\n/**\n  * This class allows you to add a method df() to your functor, which will \n  * use numerical differentiation to compute an approximate of the\n  * derivative for the functor. Of course, if you have an analytical form\n  * for the derivative, you should rather implement df() by yourself.\n  *\n  * More information on\n  * http://en.wikipedia.org/wiki/Numerical_differentiation\n  *\n  * Currently only \"Forward\" and \"Central\" scheme are implemented.\n  */\ntemplate<typename _Functor, NumericalDiffMode mode=Forward>\nclass NumericalDiff : public _Functor\n{\npublic:\n    typedef _Functor Functor;\n    typedef typename Functor::Scalar Scalar;\n    typedef typename Functor::InputType InputType;\n    typedef typename Functor::ValueType ValueType;\n    typedef typename Functor::JacobianType JacobianType;\n\n    NumericalDiff(Scalar _epsfcn=0.) : Functor(), epsfcn(_epsfcn) {}\n    NumericalDiff(const Functor& f, Scalar _epsfcn=0.) : Functor(f), epsfcn(_epsfcn) {}\n\n    // forward constructors\n    template<typename T0>\n        NumericalDiff(const T0& a0) : Functor(a0), epsfcn(0) {}\n    template<typename T0, typename T1>\n        NumericalDiff(const T0& a0, const T1& a1) : Functor(a0, a1), epsfcn(0) {}\n    template<typename T0, typename T1, typename T2>\n        NumericalDiff(const T0& a0, const T1& a1, const T2& a2) : Functor(a0, a1, a2), epsfcn(0) {}\n\n    enum {\n        InputsAtCompileTime = Functor::InputsAtCompileTime,\n        ValuesAtCompileTime = Functor::ValuesAtCompileTime\n    };\n\n    /**\n      * return the number of evaluation of functor\n     */\n    int df(const InputType& _x, JacobianType &jac) const\n    {\n        using std::sqrt;\n        using std::abs;\n        /* Local variables */\n        Scalar h;\n        int nfev=0;\n        const typename InputType::Index n = _x.size();\n        const Scalar eps = sqrt(((std::max)(epsfcn,NumTraits<Scalar>::epsilon() )));\n        ValueType val1, val2;\n        InputType x = _x;\n        // TODO : we should do this only if the size is not already known\n        val1.resize(Functor::values());\n        val2.resize(Functor::values());\n\n        // initialization\n        switch(mode) {\n            case Forward:\n                // compute f(x)\n                Functor::operator()(x, val1); nfev++;\n                break;\n            case Central:\n                // do nothing\n                break;\n            default:\n                eigen_assert(false);\n        };\n\n        // Function Body\n        for (int j = 0; j < n; ++j) {\n            h = eps * abs(x[j]);\n            if (h == 0.) {\n                h = eps;\n            }\n            switch(mode) {\n                case Forward:\n                    x[j] += h;\n                    Functor::operator()(x, val2);\n                    nfev++;\n                    x[j] = _x[j];\n                    jac.col(j) = (val2-val1)/h;\n                    break;\n                case Central:\n                    x[j] += h;\n                    Functor::operator()(x, val2); nfev++;\n                    x[j] -= 2*h;\n                    Functor::operator()(x, val1); nfev++;\n                    x[j] = _x[j];\n                    jac.col(j) = (val2-val1)/(2*h);\n                    break;\n                default:\n                    eigen_assert(false);\n            };\n        }\n        return nfev;\n    }\nprivate:\n    Scalar epsfcn;\n\n    NumericalDiff& operator=(const NumericalDiff&);\n};\n\n} // end namespace Eigen\n\n//vim: ai ts=4 sts=4 et sw=4\n#endif // EIGEN_NUMERICAL_DIFF_H\n\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/Polynomials/Companion.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010 Manuel Yguel <manuel.yguel@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_COMPANION_H\n#define EIGEN_COMPANION_H\n\n// This file requires the user to include\n// * Eigen/Core\n// * Eigen/src/PolynomialSolver.h\n\nnamespace Eigen { \n\nnamespace internal {\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\n\ntemplate <typename T>\nT radix(){ return 2; }\n\ntemplate <typename T>\nT radix2(){ return radix<T>()*radix<T>(); }\n\ntemplate<int Size>\nstruct decrement_if_fixed_size\n{\n  enum {\n    ret = (Size == Dynamic) ? Dynamic : Size-1 };\n};\n\n#endif\n\ntemplate< typename _Scalar, int _Deg >\nclass companion\n{\n  public:\n    EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_Deg==Dynamic ? Dynamic : _Deg)\n\n    enum {\n      Deg = _Deg,\n      Deg_1=decrement_if_fixed_size<Deg>::ret\n    };\n\n    typedef _Scalar                                Scalar;\n    typedef typename NumTraits<Scalar>::Real       RealScalar;\n    typedef Matrix<Scalar, Deg, 1>                 RightColumn;\n    //typedef DiagonalMatrix< Scalar, Deg_1, Deg_1 > BottomLeftDiagonal;\n    typedef Matrix<Scalar, Deg_1, 1>               BottomLeftDiagonal;\n\n    typedef Matrix<Scalar, Deg, Deg>               DenseCompanionMatrixType;\n    typedef Matrix< Scalar, _Deg, Deg_1 >          LeftBlock;\n    typedef Matrix< Scalar, Deg_1, Deg_1 >         BottomLeftBlock;\n    typedef Matrix< Scalar, 1, Deg_1 >             LeftBlockFirstRow;\n\n    typedef DenseIndex Index;\n\n  public:\n    EIGEN_STRONG_INLINE const _Scalar operator()(Index row, Index col ) const\n    {\n      if( m_bl_diag.rows() > col )\n      {\n        if( 0 < row ){ return m_bl_diag[col]; }\n        else{ return 0; }\n      }\n      else{ return m_monic[row]; }\n    }\n\n  public:\n    template<typename VectorType>\n    void setPolynomial( const VectorType& poly )\n    {\n      const Index deg = poly.size()-1;\n      m_monic = -poly.head(deg)/poly[deg];\n      m_bl_diag.setOnes(deg-1);\n    }\n\n    template<typename VectorType>\n    companion( const VectorType& poly ){\n      setPolynomial( poly ); }\n\n  public:\n    DenseCompanionMatrixType denseMatrix() const\n    {\n      const Index deg   = m_monic.size();\n      const Index deg_1 = deg-1;\n      DenseCompanionMatrixType companMat(deg,deg);\n      companMat <<\n        ( LeftBlock(deg,deg_1)\n          << LeftBlockFirstRow::Zero(1,deg_1),\n          BottomLeftBlock::Identity(deg-1,deg-1)*m_bl_diag.asDiagonal() ).finished()\n        , m_monic;\n      return companMat;\n    }\n\n\n\n  protected:\n    /** Helper function for the balancing algorithm.\n     * \\returns true if the row and the column, having colNorm and rowNorm\n     * as norms, are balanced, false otherwise.\n     * colB and rowB are respectively the multipliers for\n     * the column and the row in order to balance them.\n     * */\n    bool balanced( RealScalar colNorm, RealScalar rowNorm,\n        bool& isBalanced, RealScalar& colB, RealScalar& rowB );\n\n    /** Helper function for the balancing algorithm.\n     * \\returns true if the row and the column, having colNorm and rowNorm\n     * as norms, are balanced, false otherwise.\n     * colB and rowB are respectively the multipliers for\n     * the column and the row in order to balance them.\n     * */\n    bool balancedR( RealScalar colNorm, RealScalar rowNorm,\n        bool& isBalanced, RealScalar& colB, RealScalar& rowB );\n\n  public:\n    /**\n     * Balancing algorithm from B. N. PARLETT and C. REINSCH (1969)\n     * \"Balancing a matrix for calculation of eigenvalues and eigenvectors\"\n     * adapted to the case of companion matrices.\n     * A matrix with non zero row and non zero column is balanced\n     * for a certain norm if the i-th row and the i-th column\n     * have same norm for all i.\n     */\n    void balance();\n\n  protected:\n      RightColumn                m_monic;\n      BottomLeftDiagonal         m_bl_diag;\n};\n\n\n\ntemplate< typename _Scalar, int _Deg >\ninline\nbool companion<_Scalar,_Deg>::balanced( RealScalar colNorm, RealScalar rowNorm,\n    bool& isBalanced, RealScalar& colB, RealScalar& rowB )\n{\n  if( RealScalar(0) == colNorm || RealScalar(0) == rowNorm ){ return true; }\n  else\n  {\n    //To find the balancing coefficients, if the radix is 2,\n    //one finds \\f$ \\sigma \\f$ such that\n    // \\f$ 2^{2\\sigma-1} < rowNorm / colNorm \\le 2^{2\\sigma+1} \\f$\n    // then the balancing coefficient for the row is \\f$ 1/2^{\\sigma} \\f$\n    // and the balancing coefficient for the column is \\f$ 2^{\\sigma} \\f$\n    rowB = rowNorm / radix<RealScalar>();\n    colB = RealScalar(1);\n    const RealScalar s = colNorm + rowNorm;\n\n    while (colNorm < rowB)\n    {\n      colB *= radix<RealScalar>();\n      colNorm *= radix2<RealScalar>();\n    }\n\n    rowB = rowNorm * radix<RealScalar>();\n\n    while (colNorm >= rowB)\n    {\n      colB /= radix<RealScalar>();\n      colNorm /= radix2<RealScalar>();\n    }\n\n    //This line is used to avoid insubstantial balancing\n    if ((rowNorm + colNorm) < RealScalar(0.95) * s * colB)\n    {\n      isBalanced = false;\n      rowB = RealScalar(1) / colB;\n      return false;\n    }\n    else{\n      return true; }\n  }\n}\n\ntemplate< typename _Scalar, int _Deg >\ninline\nbool companion<_Scalar,_Deg>::balancedR( RealScalar colNorm, RealScalar rowNorm,\n    bool& isBalanced, RealScalar& colB, RealScalar& rowB )\n{\n  if( RealScalar(0) == colNorm || RealScalar(0) == rowNorm ){ return true; }\n  else\n  {\n    /**\n     * Set the norm of the column and the row to the geometric mean\n     * of the row and column norm\n     */\n    const RealScalar q = colNorm/rowNorm;\n    if( !isApprox( q, _Scalar(1) ) )\n    {\n      rowB = sqrt( colNorm/rowNorm );\n      colB = RealScalar(1)/rowB;\n\n      isBalanced = false;\n      return false;\n    }\n    else{\n      return true; }\n  }\n}\n\n\ntemplate< typename _Scalar, int _Deg >\nvoid companion<_Scalar,_Deg>::balance()\n{\n  using std::abs;\n  EIGEN_STATIC_ASSERT( Deg == Dynamic || 1 < Deg, YOU_MADE_A_PROGRAMMING_MISTAKE );\n  const Index deg   = m_monic.size();\n  const Index deg_1 = deg-1;\n\n  bool hasConverged=false;\n  while( !hasConverged )\n  {\n    hasConverged = true;\n    RealScalar colNorm,rowNorm;\n    RealScalar colB,rowB;\n\n    //First row, first column excluding the diagonal\n    //==============================================\n    colNorm = abs(m_bl_diag[0]);\n    rowNorm = abs(m_monic[0]);\n\n    //Compute balancing of the row and the column\n    if( !balanced( colNorm, rowNorm, hasConverged, colB, rowB ) )\n    {\n      m_bl_diag[0] *= colB;\n      m_monic[0] *= rowB;\n    }\n\n    //Middle rows and columns excluding the diagonal\n    //==============================================\n    for( Index i=1; i<deg_1; ++i )\n    {\n      // column norm, excluding the diagonal\n      colNorm = abs(m_bl_diag[i]);\n\n      // row norm, excluding the diagonal\n      rowNorm = abs(m_bl_diag[i-1]) + abs(m_monic[i]);\n\n      //Compute balancing of the row and the column\n      if( !balanced( colNorm, rowNorm, hasConverged, colB, rowB ) )\n      {\n        m_bl_diag[i]   *= colB;\n        m_bl_diag[i-1] *= rowB;\n        m_monic[i]     *= rowB;\n      }\n    }\n\n    //Last row, last column excluding the diagonal\n    //============================================\n    const Index ebl = m_bl_diag.size()-1;\n    VectorBlock<RightColumn,Deg_1> headMonic( m_monic, 0, deg_1 );\n    colNorm = headMonic.array().abs().sum();\n    rowNorm = abs( m_bl_diag[ebl] );\n\n    //Compute balancing of the row and the column\n    if( !balanced( colNorm, rowNorm, hasConverged, colB, rowB ) )\n    {\n      headMonic      *= colB;\n      m_bl_diag[ebl] *= rowB;\n    }\n  }\n}\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_COMPANION_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/Polynomials/PolynomialSolver.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010 Manuel Yguel <manuel.yguel@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_POLYNOMIAL_SOLVER_H\n#define EIGEN_POLYNOMIAL_SOLVER_H\n\nnamespace Eigen { \n\n/** \\ingroup Polynomials_Module\n *  \\class PolynomialSolverBase.\n *\n * \\brief Defined to be inherited by polynomial solvers: it provides\n * convenient methods such as\n *  - real roots,\n *  - greatest, smallest complex roots,\n *  - real roots with greatest, smallest absolute real value,\n *  - greatest, smallest real roots.\n *\n * It stores the set of roots as a vector of complexes.\n *\n */\ntemplate< typename _Scalar, int _Deg >\nclass PolynomialSolverBase\n{\n  public:\n    EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_Deg==Dynamic ? Dynamic : _Deg)\n\n    typedef _Scalar                             Scalar;\n    typedef typename NumTraits<Scalar>::Real    RealScalar;\n    typedef std::complex<RealScalar>            RootType;\n    typedef Matrix<RootType,_Deg,1>             RootsType;\n\n    typedef DenseIndex Index;\n\n  protected:\n    template< typename OtherPolynomial >\n    inline void setPolynomial( const OtherPolynomial& poly ){\n      m_roots.resize(poly.size()-1); }\n\n  public:\n    template< typename OtherPolynomial >\n    inline PolynomialSolverBase( const OtherPolynomial& poly ){\n      setPolynomial( poly() ); }\n\n    inline PolynomialSolverBase(){}\n\n  public:\n    /** \\returns the complex roots of the polynomial */\n    inline const RootsType& roots() const { return m_roots; }\n\n  public:\n    /** Clear and fills the back insertion sequence with the real roots of the polynomial\n     * i.e. the real part of the complex roots that have an imaginary part which\n     * absolute value is smaller than absImaginaryThreshold.\n     * absImaginaryThreshold takes the dummy_precision associated\n     * with the _Scalar template parameter of the PolynomialSolver class as the default value.\n     *\n     * \\param[out] bi_seq : the back insertion sequence (stl concept)\n     * \\param[in]  absImaginaryThreshold : the maximum bound of the imaginary part of a complex\n     *  number that is considered as real.\n     * */\n    template<typename Stl_back_insertion_sequence>\n    inline void realRoots( Stl_back_insertion_sequence& bi_seq,\n        const RealScalar& absImaginaryThreshold = NumTraits<Scalar>::dummy_precision() ) const\n    {\n      using std::abs;\n      bi_seq.clear();\n      for(Index i=0; i<m_roots.size(); ++i )\n      {\n        if( abs( m_roots[i].imag() ) < absImaginaryThreshold ){\n          bi_seq.push_back( m_roots[i].real() ); }\n      }\n    }\n\n  protected:\n    template<typename squaredNormBinaryPredicate>\n    inline const RootType& selectComplexRoot_withRespectToNorm( squaredNormBinaryPredicate& pred ) const\n    {\n      Index res=0;\n      RealScalar norm2 = numext::abs2( m_roots[0] );\n      for( Index i=1; i<m_roots.size(); ++i )\n      {\n        const RealScalar currNorm2 = numext::abs2( m_roots[i] );\n        if( pred( currNorm2, norm2 ) ){\n          res=i; norm2=currNorm2; }\n      }\n      return m_roots[res];\n    }\n\n  public:\n    /**\n     * \\returns the complex root with greatest norm.\n     */\n    inline const RootType& greatestRoot() const\n    {\n      std::greater<RealScalar> greater;\n      return selectComplexRoot_withRespectToNorm( greater );\n    }\n\n    /**\n     * \\returns the complex root with smallest norm.\n     */\n    inline const RootType& smallestRoot() const\n    {\n      std::less<RealScalar> less;\n      return selectComplexRoot_withRespectToNorm( less );\n    }\n\n  protected:\n    template<typename squaredRealPartBinaryPredicate>\n    inline const RealScalar& selectRealRoot_withRespectToAbsRealPart(\n        squaredRealPartBinaryPredicate& pred,\n        bool& hasArealRoot,\n        const RealScalar& absImaginaryThreshold = NumTraits<Scalar>::dummy_precision() ) const\n    {\n      using std::abs;\n      hasArealRoot = false;\n      Index res=0;\n      RealScalar abs2(0);\n\n      for( Index i=0; i<m_roots.size(); ++i )\n      {\n        if( abs( m_roots[i].imag() ) <= absImaginaryThreshold )\n        {\n          if( !hasArealRoot )\n          {\n            hasArealRoot = true;\n            res = i;\n            abs2 = m_roots[i].real() * m_roots[i].real();\n          }\n          else\n          {\n            const RealScalar currAbs2 = m_roots[i].real() * m_roots[i].real();\n            if( pred( currAbs2, abs2 ) )\n            {\n              abs2 = currAbs2;\n              res = i;\n            }\n          }\n        }\n        else if(!hasArealRoot)\n        {\n          if( abs( m_roots[i].imag() ) < abs( m_roots[res].imag() ) ){\n            res = i;}\n        }\n      }\n      return numext::real_ref(m_roots[res]);\n    }\n\n\n    template<typename RealPartBinaryPredicate>\n    inline const RealScalar& selectRealRoot_withRespectToRealPart(\n        RealPartBinaryPredicate& pred,\n        bool& hasArealRoot,\n        const RealScalar& absImaginaryThreshold = NumTraits<Scalar>::dummy_precision() ) const\n    {\n      using std::abs;\n      hasArealRoot = false;\n      Index res=0;\n      RealScalar val(0);\n\n      for( Index i=0; i<m_roots.size(); ++i )\n      {\n        if( abs( m_roots[i].imag() ) <= absImaginaryThreshold )\n        {\n          if( !hasArealRoot )\n          {\n            hasArealRoot = true;\n            res = i;\n            val = m_roots[i].real();\n          }\n          else\n          {\n            const RealScalar curr = m_roots[i].real();\n            if( pred( curr, val ) )\n            {\n              val = curr;\n              res = i;\n            }\n          }\n        }\n        else\n        {\n          if( abs( m_roots[i].imag() ) < abs( m_roots[res].imag() ) ){\n            res = i; }\n        }\n      }\n      return numext::real_ref(m_roots[res]);\n    }\n\n  public:\n    /**\n     * \\returns a real root with greatest absolute magnitude.\n     * A real root is defined as the real part of a complex root with absolute imaginary\n     * part smallest than absImaginaryThreshold.\n     * absImaginaryThreshold takes the dummy_precision associated\n     * with the _Scalar template parameter of the PolynomialSolver class as the default value.\n     * If no real root is found the boolean hasArealRoot is set to false and the real part of\n     * the root with smallest absolute imaginary part is returned instead.\n     *\n     * \\param[out] hasArealRoot : boolean true if a real root is found according to the\n     *  absImaginaryThreshold criterion, false otherwise.\n     * \\param[in] absImaginaryThreshold : threshold on the absolute imaginary part to decide\n     *  whether or not a root is real.\n     */\n    inline const RealScalar& absGreatestRealRoot(\n        bool& hasArealRoot,\n        const RealScalar& absImaginaryThreshold = NumTraits<Scalar>::dummy_precision() ) const\n    {\n      std::greater<RealScalar> greater;\n      return selectRealRoot_withRespectToAbsRealPart( greater, hasArealRoot, absImaginaryThreshold );\n    }\n\n\n    /**\n     * \\returns a real root with smallest absolute magnitude.\n     * A real root is defined as the real part of a complex root with absolute imaginary\n     * part smallest than absImaginaryThreshold.\n     * absImaginaryThreshold takes the dummy_precision associated\n     * with the _Scalar template parameter of the PolynomialSolver class as the default value.\n     * If no real root is found the boolean hasArealRoot is set to false and the real part of\n     * the root with smallest absolute imaginary part is returned instead.\n     *\n     * \\param[out] hasArealRoot : boolean true if a real root is found according to the\n     *  absImaginaryThreshold criterion, false otherwise.\n     * \\param[in] absImaginaryThreshold : threshold on the absolute imaginary part to decide\n     *  whether or not a root is real.\n     */\n    inline const RealScalar& absSmallestRealRoot(\n        bool& hasArealRoot,\n        const RealScalar& absImaginaryThreshold = NumTraits<Scalar>::dummy_precision() ) const\n    {\n      std::less<RealScalar> less;\n      return selectRealRoot_withRespectToAbsRealPart( less, hasArealRoot, absImaginaryThreshold );\n    }\n\n\n    /**\n     * \\returns the real root with greatest value.\n     * A real root is defined as the real part of a complex root with absolute imaginary\n     * part smallest than absImaginaryThreshold.\n     * absImaginaryThreshold takes the dummy_precision associated\n     * with the _Scalar template parameter of the PolynomialSolver class as the default value.\n     * If no real root is found the boolean hasArealRoot is set to false and the real part of\n     * the root with smallest absolute imaginary part is returned instead.\n     *\n     * \\param[out] hasArealRoot : boolean true if a real root is found according to the\n     *  absImaginaryThreshold criterion, false otherwise.\n     * \\param[in] absImaginaryThreshold : threshold on the absolute imaginary part to decide\n     *  whether or not a root is real.\n     */\n    inline const RealScalar& greatestRealRoot(\n        bool& hasArealRoot,\n        const RealScalar& absImaginaryThreshold = NumTraits<Scalar>::dummy_precision() ) const\n    {\n      std::greater<RealScalar> greater;\n      return selectRealRoot_withRespectToRealPart( greater, hasArealRoot, absImaginaryThreshold );\n    }\n\n\n    /**\n     * \\returns the real root with smallest value.\n     * A real root is defined as the real part of a complex root with absolute imaginary\n     * part smallest than absImaginaryThreshold.\n     * absImaginaryThreshold takes the dummy_precision associated\n     * with the _Scalar template parameter of the PolynomialSolver class as the default value.\n     * If no real root is found the boolean hasArealRoot is set to false and the real part of\n     * the root with smallest absolute imaginary part is returned instead.\n     *\n     * \\param[out] hasArealRoot : boolean true if a real root is found according to the\n     *  absImaginaryThreshold criterion, false otherwise.\n     * \\param[in] absImaginaryThreshold : threshold on the absolute imaginary part to decide\n     *  whether or not a root is real.\n     */\n    inline const RealScalar& smallestRealRoot(\n        bool& hasArealRoot,\n        const RealScalar& absImaginaryThreshold = NumTraits<Scalar>::dummy_precision() ) const\n    {\n      std::less<RealScalar> less;\n      return selectRealRoot_withRespectToRealPart( less, hasArealRoot, absImaginaryThreshold );\n    }\n\n  protected:\n    RootsType               m_roots;\n};\n\n#define EIGEN_POLYNOMIAL_SOLVER_BASE_INHERITED_TYPES( BASE )  \\\n  typedef typename BASE::Scalar                 Scalar;       \\\n  typedef typename BASE::RealScalar             RealScalar;   \\\n  typedef typename BASE::RootType               RootType;     \\\n  typedef typename BASE::RootsType              RootsType;\n\n\n\n/** \\ingroup Polynomials_Module\n  *\n  * \\class PolynomialSolver\n  *\n  * \\brief A polynomial solver\n  *\n  * Computes the complex roots of a real polynomial.\n  *\n  * \\param _Scalar the scalar type, i.e., the type of the polynomial coefficients\n  * \\param _Deg the degree of the polynomial, can be a compile time value or Dynamic.\n  *             Notice that the number of polynomial coefficients is _Deg+1.\n  *\n  * This class implements a polynomial solver and provides convenient methods such as\n  * - real roots,\n  * - greatest, smallest complex roots,\n  * - real roots with greatest, smallest absolute real value.\n  * - greatest, smallest real roots.\n  *\n  * WARNING: this polynomial solver is experimental, part of the unsupported Eigen modules.\n  *\n  *\n  * Currently a QR algorithm is used to compute the eigenvalues of the companion matrix of\n  * the polynomial to compute its roots.\n  * This supposes that the complex moduli of the roots are all distinct: e.g. there should\n  * be no multiple roots or conjugate roots for instance.\n  * With 32bit (float) floating types this problem shows up frequently.\n  * However, almost always, correct accuracy is reached even in these cases for 64bit\n  * (double) floating types and small polynomial degree (<20).\n  */\ntemplate<typename _Scalar, int _Deg>\nclass PolynomialSolver : public PolynomialSolverBase<_Scalar,_Deg>\n{\n  public:\n    EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_Deg==Dynamic ? Dynamic : _Deg)\n\n    typedef PolynomialSolverBase<_Scalar,_Deg>    PS_Base;\n    EIGEN_POLYNOMIAL_SOLVER_BASE_INHERITED_TYPES( PS_Base )\n\n    typedef Matrix<Scalar,_Deg,_Deg>                 CompanionMatrixType;\n    typedef typename internal::conditional<NumTraits<Scalar>::IsComplex,\n                                          ComplexEigenSolver<CompanionMatrixType>,\n                                          EigenSolver<CompanionMatrixType> >::type EigenSolverType;\n    typedef typename internal::conditional<NumTraits<Scalar>::IsComplex, Scalar, std::complex<Scalar> >::type ComplexScalar;\n\n  public:\n    /** Computes the complex roots of a new polynomial. */\n    template< typename OtherPolynomial >\n    void compute( const OtherPolynomial& poly )\n    {\n      eigen_assert( Scalar(0) != poly[poly.size()-1] );\n      eigen_assert( poly.size() > 1 );\n      if(poly.size() >  2 )\n      {\n        internal::companion<Scalar,_Deg> companion( poly );\n        companion.balance();\n        m_eigenSolver.compute( companion.denseMatrix() );\n        m_roots = m_eigenSolver.eigenvalues();\n        // cleanup noise in imaginary part of real roots:\n        // if the imaginary part is rather small compared to the real part\n        // and that cancelling the imaginary part yield a smaller evaluation,\n        // then it's safe to keep the real part only.\n        RealScalar coarse_prec = RealScalar(std::pow(4,poly.size()+1))*NumTraits<RealScalar>::epsilon();\n        for(Index i = 0; i<m_roots.size(); ++i)\n        {\n          if( internal::isMuchSmallerThan(numext::abs(numext::imag(m_roots[i])),\n                                          numext::abs(numext::real(m_roots[i])),\n                                          coarse_prec) )\n          {\n            ComplexScalar as_real_root = ComplexScalar(numext::real(m_roots[i]));\n            if(    numext::abs(poly_eval(poly, as_real_root))\n                <= numext::abs(poly_eval(poly, m_roots[i])))\n            {\n              m_roots[i] = as_real_root;\n            }\n          }\n        }\n      }\n      else if(poly.size () == 2)\n      {\n        m_roots.resize(1);\n        m_roots[0] = -poly[0]/poly[1];\n      }\n    }\n\n  public:\n    template< typename OtherPolynomial >\n    inline PolynomialSolver( const OtherPolynomial& poly ){\n      compute( poly ); }\n\n    inline PolynomialSolver(){}\n\n  protected:\n    using                   PS_Base::m_roots;\n    EigenSolverType         m_eigenSolver;\n};\n\n\ntemplate< typename _Scalar >\nclass PolynomialSolver<_Scalar,1> : public PolynomialSolverBase<_Scalar,1>\n{\n  public:\n    typedef PolynomialSolverBase<_Scalar,1>    PS_Base;\n    EIGEN_POLYNOMIAL_SOLVER_BASE_INHERITED_TYPES( PS_Base )\n\n  public:\n    /** Computes the complex roots of a new polynomial. */\n    template< typename OtherPolynomial >\n    void compute( const OtherPolynomial& poly )\n    {\n      eigen_assert( poly.size() == 2 );\n      eigen_assert( Scalar(0) != poly[1] );\n      m_roots[0] = -poly[0]/poly[1];\n    }\n\n  public:\n    template< typename OtherPolynomial >\n    inline PolynomialSolver( const OtherPolynomial& poly ){\n      compute( poly ); }\n\n    inline PolynomialSolver(){}\n\n  protected:\n    using                   PS_Base::m_roots;\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_POLYNOMIAL_SOLVER_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/Polynomials/PolynomialUtils.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010 Manuel Yguel <manuel.yguel@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_POLYNOMIAL_UTILS_H\n#define EIGEN_POLYNOMIAL_UTILS_H\n\nnamespace Eigen { \n\n/** \\ingroup Polynomials_Module\n * \\returns the evaluation of the polynomial at x using Horner algorithm.\n *\n * \\param[in] poly : the vector of coefficients of the polynomial ordered\n *  by degrees i.e. poly[i] is the coefficient of degree i of the polynomial\n *  e.g. \\f$ 1 + 3x^2 \\f$ is stored as a vector \\f$ [ 1, 0, 3 ] \\f$.\n * \\param[in] x : the value to evaluate the polynomial at.\n *\n * \\note for stability:\n *   \\f$ |x| \\le 1 \\f$\n */\ntemplate <typename Polynomials, typename T>\ninline\nT poly_eval_horner( const Polynomials& poly, const T& x )\n{\n  T val=poly[poly.size()-1];\n  for(DenseIndex i=poly.size()-2; i>=0; --i ){\n    val = val*x + poly[i]; }\n  return val;\n}\n\n/** \\ingroup Polynomials_Module\n * \\returns the evaluation of the polynomial at x using stabilized Horner algorithm.\n *\n * \\param[in] poly : the vector of coefficients of the polynomial ordered\n *  by degrees i.e. poly[i] is the coefficient of degree i of the polynomial\n *  e.g. \\f$ 1 + 3x^2 \\f$ is stored as a vector \\f$ [ 1, 0, 3 ] \\f$.\n * \\param[in] x : the value to evaluate the polynomial at.\n */\ntemplate <typename Polynomials, typename T>\ninline\nT poly_eval( const Polynomials& poly, const T& x )\n{\n  typedef typename NumTraits<T>::Real Real;\n\n  if( numext::abs2( x ) <= Real(1) ){\n    return poly_eval_horner( poly, x ); }\n  else\n  {\n    T val=poly[0];\n    T inv_x = T(1)/x;\n    for( DenseIndex i=1; i<poly.size(); ++i ){\n      val = val*inv_x + poly[i]; }\n\n    return numext::pow(x,(T)(poly.size()-1)) * val;\n  }\n}\n\n/** \\ingroup Polynomials_Module\n * \\returns a maximum bound for the absolute value of any root of the polynomial.\n *\n * \\param[in] poly : the vector of coefficients of the polynomial ordered\n *  by degrees i.e. poly[i] is the coefficient of degree i of the polynomial\n *  e.g. \\f$ 1 + 3x^2 \\f$ is stored as a vector \\f$ [ 1, 0, 3 ] \\f$.\n *\n *  \\pre\n *   the leading coefficient of the input polynomial poly must be non zero\n */\ntemplate <typename Polynomial>\ninline\ntypename NumTraits<typename Polynomial::Scalar>::Real cauchy_max_bound( const Polynomial& poly )\n{\n  using std::abs;\n  typedef typename Polynomial::Scalar Scalar;\n  typedef typename NumTraits<Scalar>::Real Real;\n\n  eigen_assert( Scalar(0) != poly[poly.size()-1] );\n  const Scalar inv_leading_coeff = Scalar(1)/poly[poly.size()-1];\n  Real cb(0);\n\n  for( DenseIndex i=0; i<poly.size()-1; ++i ){\n    cb += abs(poly[i]*inv_leading_coeff); }\n  return cb + Real(1);\n}\n\n/** \\ingroup Polynomials_Module\n * \\returns a minimum bound for the absolute value of any non zero root of the polynomial.\n * \\param[in] poly : the vector of coefficients of the polynomial ordered\n *  by degrees i.e. poly[i] is the coefficient of degree i of the polynomial\n *  e.g. \\f$ 1 + 3x^2 \\f$ is stored as a vector \\f$ [ 1, 0, 3 ] \\f$.\n */\ntemplate <typename Polynomial>\ninline\ntypename NumTraits<typename Polynomial::Scalar>::Real cauchy_min_bound( const Polynomial& poly )\n{\n  using std::abs;\n  typedef typename Polynomial::Scalar Scalar;\n  typedef typename NumTraits<Scalar>::Real Real;\n\n  DenseIndex i=0;\n  while( i<poly.size()-1 && Scalar(0) == poly(i) ){ ++i; }\n  if( poly.size()-1 == i ){\n    return Real(1); }\n\n  const Scalar inv_min_coeff = Scalar(1)/poly[i];\n  Real cb(1);\n  for( DenseIndex j=i+1; j<poly.size(); ++j ){\n    cb += abs(poly[j]*inv_min_coeff); }\n  return Real(1)/cb;\n}\n\n/** \\ingroup Polynomials_Module\n * Given the roots of a polynomial compute the coefficients in the\n * monomial basis of the monic polynomial with same roots and minimal degree.\n * If RootVector is a vector of complexes, Polynomial should also be a vector\n * of complexes.\n * \\param[in] rv : a vector containing the roots of a polynomial.\n * \\param[out] poly : the vector of coefficients of the polynomial ordered\n *  by degrees i.e. poly[i] is the coefficient of degree i of the polynomial\n *  e.g. \\f$ 3 + x^2 \\f$ is stored as a vector \\f$ [ 3, 0, 1 ] \\f$.\n */\ntemplate <typename RootVector, typename Polynomial>\nvoid roots_to_monicPolynomial( const RootVector& rv, Polynomial& poly )\n{\n\n  typedef typename Polynomial::Scalar Scalar;\n\n  poly.setZero( rv.size()+1 );\n  poly[0] = -rv[0]; poly[1] = Scalar(1);\n  for( DenseIndex i=1; i< rv.size(); ++i )\n  {\n    for( DenseIndex j=i+1; j>0; --j ){ poly[j] = poly[j-1] - rv[i]*poly[j]; }\n    poly[0] = -rv[i]*poly[0];\n  }\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_POLYNOMIAL_UTILS_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/Skyline/SkylineInplaceLU.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Guillaume Saupin <guillaume.saupin@cea.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SKYLINEINPLACELU_H\n#define EIGEN_SKYLINEINPLACELU_H\n\nnamespace Eigen { \n\n/** \\ingroup Skyline_Module\n *\n * \\class SkylineInplaceLU\n *\n * \\brief Inplace LU decomposition of a skyline matrix and associated features\n *\n * \\param MatrixType the type of the matrix of which we are computing the LU factorization\n *\n */\ntemplate<typename MatrixType>\nclass SkylineInplaceLU {\nprotected:\n    typedef typename MatrixType::Scalar Scalar;\n    typedef typename MatrixType::Index Index;\n    \n    typedef typename NumTraits<typename MatrixType::Scalar>::Real RealScalar;\n\npublic:\n\n    /** Creates a LU object and compute the respective factorization of \\a matrix using\n     * flags \\a flags. */\n    SkylineInplaceLU(MatrixType& matrix, int flags = 0)\n    : /*m_matrix(matrix.rows(), matrix.cols()),*/ m_flags(flags), m_status(0), m_lu(matrix) {\n        m_precision = RealScalar(0.1) * Eigen::dummy_precision<RealScalar > ();\n        m_lu.IsRowMajor ? computeRowMajor() : compute();\n    }\n\n    /** Sets the relative threshold value used to prune zero coefficients during the decomposition.\n     *\n     * Setting a value greater than zero speeds up computation, and yields to an incomplete\n     * factorization with fewer non zero coefficients. Such approximate factors are especially\n     * useful to initialize an iterative solver.\n     *\n     * Note that the exact meaning of this parameter might depends on the actual\n     * backend. Moreover, not all backends support this feature.\n     *\n     * \\sa precision() */\n    void setPrecision(RealScalar v) {\n        m_precision = v;\n    }\n\n    /** \\returns the current precision.\n     *\n     * \\sa setPrecision() */\n    RealScalar precision() const {\n        return m_precision;\n    }\n\n    /** Sets the flags. Possible values are:\n     *  - CompleteFactorization\n     *  - IncompleteFactorization\n     *  - MemoryEfficient\n     *  - one of the ordering methods\n     *  - etc...\n     *\n     * \\sa flags() */\n    void setFlags(int f) {\n        m_flags = f;\n    }\n\n    /** \\returns the current flags */\n    int flags() const {\n        return m_flags;\n    }\n\n    void setOrderingMethod(int m) {\n        m_flags = m;\n    }\n\n    int orderingMethod() const {\n        return m_flags;\n    }\n\n    /** Computes/re-computes the LU factorization */\n    void compute();\n    void computeRowMajor();\n\n    /** \\returns the lower triangular matrix L */\n    //inline const MatrixType& matrixL() const { return m_matrixL; }\n\n    /** \\returns the upper triangular matrix U */\n    //inline const MatrixType& matrixU() const { return m_matrixU; }\n\n    template<typename BDerived, typename XDerived>\n    bool solve(const MatrixBase<BDerived> &b, MatrixBase<XDerived>* x,\n            const int transposed = 0) const;\n\n    /** \\returns true if the factorization succeeded */\n    inline bool succeeded(void) const {\n        return m_succeeded;\n    }\n\nprotected:\n    RealScalar m_precision;\n    int m_flags;\n    mutable int m_status;\n    bool m_succeeded;\n    MatrixType& m_lu;\n};\n\n/** Computes / recomputes the in place LU decomposition of the SkylineInplaceLU.\n * using the default algorithm.\n */\ntemplate<typename MatrixType>\n//template<typename _Scalar>\nvoid SkylineInplaceLU<MatrixType>::compute() {\n    const size_t rows = m_lu.rows();\n    const size_t cols = m_lu.cols();\n\n    eigen_assert(rows == cols && \"We do not (yet) support rectangular LU.\");\n    eigen_assert(!m_lu.IsRowMajor && \"LU decomposition does not work with rowMajor Storage\");\n\n    for (Index row = 0; row < rows; row++) {\n        const double pivot = m_lu.coeffDiag(row);\n\n        //Lower matrix Columns update\n        const Index& col = row;\n        for (typename MatrixType::InnerLowerIterator lIt(m_lu, col); lIt; ++lIt) {\n            lIt.valueRef() /= pivot;\n        }\n\n        //Upper matrix update -> contiguous memory access\n        typename MatrixType::InnerLowerIterator lIt(m_lu, col);\n        for (Index rrow = row + 1; rrow < m_lu.rows(); rrow++) {\n            typename MatrixType::InnerUpperIterator uItPivot(m_lu, row);\n            typename MatrixType::InnerUpperIterator uIt(m_lu, rrow);\n            const double coef = lIt.value();\n\n            uItPivot += (rrow - row - 1);\n\n            //update upper part  -> contiguous memory access\n            for (++uItPivot; uIt && uItPivot;) {\n                uIt.valueRef() -= uItPivot.value() * coef;\n\n                ++uIt;\n                ++uItPivot;\n            }\n            ++lIt;\n        }\n\n        //Upper matrix update -> non contiguous memory access\n        typename MatrixType::InnerLowerIterator lIt3(m_lu, col);\n        for (Index rrow = row + 1; rrow < m_lu.rows(); rrow++) {\n            typename MatrixType::InnerUpperIterator uItPivot(m_lu, row);\n            const double coef = lIt3.value();\n\n            //update lower part ->  non contiguous memory access\n            for (Index i = 0; i < rrow - row - 1; i++) {\n                m_lu.coeffRefLower(rrow, row + i + 1) -= uItPivot.value() * coef;\n                ++uItPivot;\n            }\n            ++lIt3;\n        }\n        //update diag -> contiguous\n        typename MatrixType::InnerLowerIterator lIt2(m_lu, col);\n        for (Index rrow = row + 1; rrow < m_lu.rows(); rrow++) {\n\n            typename MatrixType::InnerUpperIterator uItPivot(m_lu, row);\n            typename MatrixType::InnerUpperIterator uIt(m_lu, rrow);\n            const double coef = lIt2.value();\n\n            uItPivot += (rrow - row - 1);\n            m_lu.coeffRefDiag(rrow) -= uItPivot.value() * coef;\n            ++lIt2;\n        }\n    }\n}\n\ntemplate<typename MatrixType>\nvoid SkylineInplaceLU<MatrixType>::computeRowMajor() {\n    const size_t rows = m_lu.rows();\n    const size_t cols = m_lu.cols();\n\n    eigen_assert(rows == cols && \"We do not (yet) support rectangular LU.\");\n    eigen_assert(m_lu.IsRowMajor && \"You're trying to apply rowMajor decomposition on a ColMajor matrix !\");\n\n    for (Index row = 0; row < rows; row++) {\n        typename MatrixType::InnerLowerIterator llIt(m_lu, row);\n\n\n        for (Index col = llIt.col(); col < row; col++) {\n            if (m_lu.coeffExistLower(row, col)) {\n                const double diag = m_lu.coeffDiag(col);\n\n                typename MatrixType::InnerLowerIterator lIt(m_lu, row);\n                typename MatrixType::InnerUpperIterator uIt(m_lu, col);\n\n\n                const Index offset = lIt.col() - uIt.row();\n\n\n                Index stop = offset > 0 ? col - lIt.col() : col - uIt.row();\n\n                //#define VECTORIZE\n#ifdef VECTORIZE\n                Map<VectorXd > rowVal(lIt.valuePtr() + (offset > 0 ? 0 : -offset), stop);\n                Map<VectorXd > colVal(uIt.valuePtr() + (offset > 0 ? offset : 0), stop);\n\n\n                Scalar newCoeff = m_lu.coeffLower(row, col) - rowVal.dot(colVal);\n#else\n                if (offset > 0) //Skip zero value of lIt\n                    uIt += offset;\n                else //Skip zero values of uIt\n                    lIt += -offset;\n                Scalar newCoeff = m_lu.coeffLower(row, col);\n\n                for (Index k = 0; k < stop; ++k) {\n                    const Scalar tmp = newCoeff;\n                    newCoeff = tmp - lIt.value() * uIt.value();\n                    ++lIt;\n                    ++uIt;\n                }\n#endif\n\n                m_lu.coeffRefLower(row, col) = newCoeff / diag;\n            }\n        }\n\n        //Upper matrix update\n        const Index col = row;\n        typename MatrixType::InnerUpperIterator uuIt(m_lu, col);\n        for (Index rrow = uuIt.row(); rrow < col; rrow++) {\n\n            typename MatrixType::InnerLowerIterator lIt(m_lu, rrow);\n            typename MatrixType::InnerUpperIterator uIt(m_lu, col);\n            const Index offset = lIt.col() - uIt.row();\n\n            Index stop = offset > 0 ? rrow - lIt.col() : rrow - uIt.row();\n\n#ifdef VECTORIZE\n            Map<VectorXd > rowVal(lIt.valuePtr() + (offset > 0 ? 0 : -offset), stop);\n            Map<VectorXd > colVal(uIt.valuePtr() + (offset > 0 ? offset : 0), stop);\n\n            Scalar newCoeff = m_lu.coeffUpper(rrow, col) - rowVal.dot(colVal);\n#else\n            if (offset > 0) //Skip zero value of lIt\n                uIt += offset;\n            else //Skip zero values of uIt\n                lIt += -offset;\n            Scalar newCoeff = m_lu.coeffUpper(rrow, col);\n            for (Index k = 0; k < stop; ++k) {\n                const Scalar tmp = newCoeff;\n                newCoeff = tmp - lIt.value() * uIt.value();\n\n                ++lIt;\n                ++uIt;\n            }\n#endif\n            m_lu.coeffRefUpper(rrow, col) = newCoeff;\n        }\n\n\n        //Diag matrix update\n        typename MatrixType::InnerLowerIterator lIt(m_lu, row);\n        typename MatrixType::InnerUpperIterator uIt(m_lu, row);\n\n        const Index offset = lIt.col() - uIt.row();\n\n\n        Index stop = offset > 0 ? lIt.size() : uIt.size();\n#ifdef VECTORIZE\n        Map<VectorXd > rowVal(lIt.valuePtr() + (offset > 0 ? 0 : -offset), stop);\n        Map<VectorXd > colVal(uIt.valuePtr() + (offset > 0 ? offset : 0), stop);\n        Scalar newCoeff = m_lu.coeffDiag(row) - rowVal.dot(colVal);\n#else\n        if (offset > 0) //Skip zero value of lIt\n            uIt += offset;\n        else //Skip zero values of uIt\n            lIt += -offset;\n        Scalar newCoeff = m_lu.coeffDiag(row);\n        for (Index k = 0; k < stop; ++k) {\n            const Scalar tmp = newCoeff;\n            newCoeff = tmp - lIt.value() * uIt.value();\n            ++lIt;\n            ++uIt;\n        }\n#endif\n        m_lu.coeffRefDiag(row) = newCoeff;\n    }\n}\n\n/** Computes *x = U^-1 L^-1 b\n *\n * If \\a transpose is set to SvTranspose or SvAdjoint, the solution\n * of the transposed/adjoint system is computed instead.\n *\n * Not all backends implement the solution of the transposed or\n * adjoint system.\n */\ntemplate<typename MatrixType>\ntemplate<typename BDerived, typename XDerived>\nbool SkylineInplaceLU<MatrixType>::solve(const MatrixBase<BDerived> &b, MatrixBase<XDerived>* x, const int transposed) const {\n    const size_t rows = m_lu.rows();\n    const size_t cols = m_lu.cols();\n\n\n    for (Index row = 0; row < rows; row++) {\n        x->coeffRef(row) = b.coeff(row);\n        Scalar newVal = x->coeff(row);\n        typename MatrixType::InnerLowerIterator lIt(m_lu, row);\n\n        Index col = lIt.col();\n        while (lIt.col() < row) {\n\n            newVal -= x->coeff(col++) * lIt.value();\n            ++lIt;\n        }\n\n        x->coeffRef(row) = newVal;\n    }\n\n\n    for (Index col = rows - 1; col > 0; col--) {\n        x->coeffRef(col) = x->coeff(col) / m_lu.coeffDiag(col);\n\n        const Scalar x_col = x->coeff(col);\n\n        typename MatrixType::InnerUpperIterator uIt(m_lu, col);\n        uIt += uIt.size()-1;\n\n\n        while (uIt) {\n            x->coeffRef(uIt.row()) -= x_col * uIt.value();\n            //TODO : introduce --operator\n            uIt += -1;\n        }\n\n\n    }\n    x->coeffRef(0) = x->coeff(0) / m_lu.coeffDiag(0);\n\n    return true;\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_SKYLINEINPLACELU_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/Skyline/SkylineMatrix.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Guillaume Saupin <guillaume.saupin@cea.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SKYLINEMATRIX_H\n#define EIGEN_SKYLINEMATRIX_H\n\n#include \"SkylineStorage.h\"\n#include \"SkylineMatrixBase.h\"\n\nnamespace Eigen { \n\n/** \\ingroup Skyline_Module\n *\n * \\class SkylineMatrix\n *\n * \\brief The main skyline matrix class\n *\n * This class implements a skyline matrix using the very uncommon storage\n * scheme.\n *\n * \\param _Scalar the scalar type, i.e. the type of the coefficients\n * \\param _Options Union of bit flags controlling the storage scheme. Currently the only possibility\n *                 is RowMajor. The default is 0 which means column-major.\n *\n *\n */\nnamespace internal {\ntemplate<typename _Scalar, int _Options>\nstruct traits<SkylineMatrix<_Scalar, _Options> > {\n    typedef _Scalar Scalar;\n    typedef Sparse StorageKind;\n\n    enum {\n        RowsAtCompileTime = Dynamic,\n        ColsAtCompileTime = Dynamic,\n        MaxRowsAtCompileTime = Dynamic,\n        MaxColsAtCompileTime = Dynamic,\n        Flags = SkylineBit | _Options,\n        CoeffReadCost = NumTraits<Scalar>::ReadCost,\n    };\n};\n}\n\ntemplate<typename _Scalar, int _Options>\nclass SkylineMatrix\n: public SkylineMatrixBase<SkylineMatrix<_Scalar, _Options> > {\npublic:\n    EIGEN_SKYLINE_GENERIC_PUBLIC_INTERFACE(SkylineMatrix)\n    EIGEN_SKYLINE_INHERIT_ASSIGNMENT_OPERATOR(SkylineMatrix, +=)\n    EIGEN_SKYLINE_INHERIT_ASSIGNMENT_OPERATOR(SkylineMatrix, -=)\n\n    using Base::IsRowMajor;\n\nprotected:\n\n    typedef SkylineMatrix<Scalar, (Flags&~RowMajorBit) | (IsRowMajor ? RowMajorBit : 0) > TransposedSkylineMatrix;\n\n    Index m_outerSize;\n    Index m_innerSize;\n\npublic:\n    Index* m_colStartIndex;\n    Index* m_rowStartIndex;\n    SkylineStorage<Scalar> m_data;\n\npublic:\n\n    inline Index rows() const {\n        return IsRowMajor ? m_outerSize : m_innerSize;\n    }\n\n    inline Index cols() const {\n        return IsRowMajor ? m_innerSize : m_outerSize;\n    }\n\n    inline Index innerSize() const {\n        return m_innerSize;\n    }\n\n    inline Index outerSize() const {\n        return m_outerSize;\n    }\n\n    inline Index upperNonZeros() const {\n        return m_data.upperSize();\n    }\n\n    inline Index lowerNonZeros() const {\n        return m_data.lowerSize();\n    }\n\n    inline Index upperNonZeros(Index j) const {\n        return m_colStartIndex[j + 1] - m_colStartIndex[j];\n    }\n\n    inline Index lowerNonZeros(Index j) const {\n        return m_rowStartIndex[j + 1] - m_rowStartIndex[j];\n    }\n\n    inline const Scalar* _diagPtr() const {\n        return &m_data.diag(0);\n    }\n\n    inline Scalar* _diagPtr() {\n        return &m_data.diag(0);\n    }\n\n    inline const Scalar* _upperPtr() const {\n        return &m_data.upper(0);\n    }\n\n    inline Scalar* _upperPtr() {\n        return &m_data.upper(0);\n    }\n\n    inline const Scalar* _lowerPtr() const {\n        return &m_data.lower(0);\n    }\n\n    inline Scalar* _lowerPtr() {\n        return &m_data.lower(0);\n    }\n\n    inline const Index* _upperProfilePtr() const {\n        return &m_data.upperProfile(0);\n    }\n\n    inline Index* _upperProfilePtr() {\n        return &m_data.upperProfile(0);\n    }\n\n    inline const Index* _lowerProfilePtr() const {\n        return &m_data.lowerProfile(0);\n    }\n\n    inline Index* _lowerProfilePtr() {\n        return &m_data.lowerProfile(0);\n    }\n\n    inline Scalar coeff(Index row, Index col) const {\n        const Index outer = IsRowMajor ? row : col;\n        const Index inner = IsRowMajor ? col : row;\n\n        eigen_assert(outer < outerSize());\n        eigen_assert(inner < innerSize());\n\n        if (outer == inner)\n            return this->m_data.diag(outer);\n\n        if (IsRowMajor) {\n            if (inner > outer) //upper matrix\n            {\n                const Index minOuterIndex = inner - m_data.upperProfile(inner);\n                if (outer >= minOuterIndex)\n                    return this->m_data.upper(m_colStartIndex[inner] + outer - (inner - m_data.upperProfile(inner)));\n                else\n                    return Scalar(0);\n            }\n            if (inner < outer) //lower matrix\n            {\n                const Index minInnerIndex = outer - m_data.lowerProfile(outer);\n                if (inner >= minInnerIndex)\n                    return this->m_data.lower(m_rowStartIndex[outer] + inner - (outer - m_data.lowerProfile(outer)));\n                else\n                    return Scalar(0);\n            }\n            return m_data.upper(m_colStartIndex[inner] + outer - inner);\n        } else {\n            if (outer > inner) //upper matrix\n            {\n                const Index maxOuterIndex = inner + m_data.upperProfile(inner);\n                if (outer <= maxOuterIndex)\n                    return this->m_data.upper(m_colStartIndex[inner] + (outer - inner));\n                else\n                    return Scalar(0);\n            }\n            if (outer < inner) //lower matrix\n            {\n                const Index maxInnerIndex = outer + m_data.lowerProfile(outer);\n\n                if (inner <= maxInnerIndex)\n                    return this->m_data.lower(m_rowStartIndex[outer] + (inner - outer));\n                else\n                    return Scalar(0);\n            }\n        }\n    }\n\n    inline Scalar& coeffRef(Index row, Index col) {\n        const Index outer = IsRowMajor ? row : col;\n        const Index inner = IsRowMajor ? col : row;\n\n        eigen_assert(outer < outerSize());\n        eigen_assert(inner < innerSize());\n\n        if (outer == inner)\n            return this->m_data.diag(outer);\n\n        if (IsRowMajor) {\n            if (col > row) //upper matrix\n            {\n                const Index minOuterIndex = inner - m_data.upperProfile(inner);\n                eigen_assert(outer >= minOuterIndex && \"You tried to access a coeff that does not exist in the storage\");\n                return this->m_data.upper(m_colStartIndex[inner] + outer - (inner - m_data.upperProfile(inner)));\n            }\n            if (col < row) //lower matrix\n            {\n                const Index minInnerIndex = outer - m_data.lowerProfile(outer);\n                eigen_assert(inner >= minInnerIndex && \"You tried to access a coeff that does not exist in the storage\");\n                return this->m_data.lower(m_rowStartIndex[outer] + inner - (outer - m_data.lowerProfile(outer)));\n            }\n        } else {\n            if (outer > inner) //upper matrix\n            {\n                const Index maxOuterIndex = inner + m_data.upperProfile(inner);\n                eigen_assert(outer <= maxOuterIndex && \"You tried to access a coeff that does not exist in the storage\");\n                return this->m_data.upper(m_colStartIndex[inner] + (outer - inner));\n            }\n            if (outer < inner) //lower matrix\n            {\n                const Index maxInnerIndex = outer + m_data.lowerProfile(outer);\n                eigen_assert(inner <= maxInnerIndex && \"You tried to access a coeff that does not exist in the storage\");\n                return this->m_data.lower(m_rowStartIndex[outer] + (inner - outer));\n            }\n        }\n    }\n\n    inline Scalar coeffDiag(Index idx) const {\n        eigen_assert(idx < outerSize());\n        eigen_assert(idx < innerSize());\n        return this->m_data.diag(idx);\n    }\n\n    inline Scalar coeffLower(Index row, Index col) const {\n        const Index outer = IsRowMajor ? row : col;\n        const Index inner = IsRowMajor ? col : row;\n\n        eigen_assert(outer < outerSize());\n        eigen_assert(inner < innerSize());\n        eigen_assert(inner != outer);\n\n        if (IsRowMajor) {\n            const Index minInnerIndex = outer - m_data.lowerProfile(outer);\n            if (inner >= minInnerIndex)\n                return this->m_data.lower(m_rowStartIndex[outer] + inner - (outer - m_data.lowerProfile(outer)));\n            else\n                return Scalar(0);\n\n        } else {\n            const Index maxInnerIndex = outer + m_data.lowerProfile(outer);\n            if (inner <= maxInnerIndex)\n                return this->m_data.lower(m_rowStartIndex[outer] + (inner - outer));\n            else\n                return Scalar(0);\n        }\n    }\n\n    inline Scalar coeffUpper(Index row, Index col) const {\n        const Index outer = IsRowMajor ? row : col;\n        const Index inner = IsRowMajor ? col : row;\n\n        eigen_assert(outer < outerSize());\n        eigen_assert(inner < innerSize());\n        eigen_assert(inner != outer);\n\n        if (IsRowMajor) {\n            const Index minOuterIndex = inner - m_data.upperProfile(inner);\n            if (outer >= minOuterIndex)\n                return this->m_data.upper(m_colStartIndex[inner] + outer - (inner - m_data.upperProfile(inner)));\n            else\n                return Scalar(0);\n        } else {\n            const Index maxOuterIndex = inner + m_data.upperProfile(inner);\n            if (outer <= maxOuterIndex)\n                return this->m_data.upper(m_colStartIndex[inner] + (outer - inner));\n            else\n                return Scalar(0);\n        }\n    }\n\n    inline Scalar& coeffRefDiag(Index idx) {\n        eigen_assert(idx < outerSize());\n        eigen_assert(idx < innerSize());\n        return this->m_data.diag(idx);\n    }\n\n    inline Scalar& coeffRefLower(Index row, Index col) {\n        const Index outer = IsRowMajor ? row : col;\n        const Index inner = IsRowMajor ? col : row;\n\n        eigen_assert(outer < outerSize());\n        eigen_assert(inner < innerSize());\n        eigen_assert(inner != outer);\n\n        if (IsRowMajor) {\n            const Index minInnerIndex = outer - m_data.lowerProfile(outer);\n            eigen_assert(inner >= minInnerIndex && \"You tried to access a coeff that does not exist in the storage\");\n            return this->m_data.lower(m_rowStartIndex[outer] + inner - (outer - m_data.lowerProfile(outer)));\n        } else {\n            const Index maxInnerIndex = outer + m_data.lowerProfile(outer);\n            eigen_assert(inner <= maxInnerIndex && \"You tried to access a coeff that does not exist in the storage\");\n            return this->m_data.lower(m_rowStartIndex[outer] + (inner - outer));\n        }\n    }\n\n    inline bool coeffExistLower(Index row, Index col) {\n        const Index outer = IsRowMajor ? row : col;\n        const Index inner = IsRowMajor ? col : row;\n\n        eigen_assert(outer < outerSize());\n        eigen_assert(inner < innerSize());\n        eigen_assert(inner != outer);\n\n        if (IsRowMajor) {\n            const Index minInnerIndex = outer - m_data.lowerProfile(outer);\n            return inner >= minInnerIndex;\n        } else {\n            const Index maxInnerIndex = outer + m_data.lowerProfile(outer);\n            return inner <= maxInnerIndex;\n        }\n    }\n\n    inline Scalar& coeffRefUpper(Index row, Index col) {\n        const Index outer = IsRowMajor ? row : col;\n        const Index inner = IsRowMajor ? col : row;\n\n        eigen_assert(outer < outerSize());\n        eigen_assert(inner < innerSize());\n        eigen_assert(inner != outer);\n\n        if (IsRowMajor) {\n            const Index minOuterIndex = inner - m_data.upperProfile(inner);\n            eigen_assert(outer >= minOuterIndex && \"You tried to access a coeff that does not exist in the storage\");\n            return this->m_data.upper(m_colStartIndex[inner] + outer - (inner - m_data.upperProfile(inner)));\n        } else {\n            const Index maxOuterIndex = inner + m_data.upperProfile(inner);\n            eigen_assert(outer <= maxOuterIndex && \"You tried to access a coeff that does not exist in the storage\");\n            return this->m_data.upper(m_colStartIndex[inner] + (outer - inner));\n        }\n    }\n\n    inline bool coeffExistUpper(Index row, Index col) {\n        const Index outer = IsRowMajor ? row : col;\n        const Index inner = IsRowMajor ? col : row;\n\n        eigen_assert(outer < outerSize());\n        eigen_assert(inner < innerSize());\n        eigen_assert(inner != outer);\n\n        if (IsRowMajor) {\n            const Index minOuterIndex = inner - m_data.upperProfile(inner);\n            return outer >= minOuterIndex;\n        } else {\n            const Index maxOuterIndex = inner + m_data.upperProfile(inner);\n            return outer <= maxOuterIndex;\n        }\n    }\n\n\nprotected:\n\npublic:\n    class InnerUpperIterator;\n    class InnerLowerIterator;\n\n    class OuterUpperIterator;\n    class OuterLowerIterator;\n\n    /** Removes all non zeros */\n    inline void setZero() {\n        m_data.clear();\n        memset(m_colStartIndex, 0, (m_outerSize + 1) * sizeof (Index));\n        memset(m_rowStartIndex, 0, (m_outerSize + 1) * sizeof (Index));\n    }\n\n    /** \\returns the number of non zero coefficients */\n    inline Index nonZeros() const {\n        return m_data.diagSize() + m_data.upperSize() + m_data.lowerSize();\n    }\n\n    /** Preallocates \\a reserveSize non zeros */\n    inline void reserve(Index reserveSize, Index reserveUpperSize, Index reserveLowerSize) {\n        m_data.reserve(reserveSize, reserveUpperSize, reserveLowerSize);\n    }\n\n    /** \\returns a reference to a novel non zero coefficient with coordinates \\a row x \\a col.\n\n     *\n     * \\warning This function can be extremely slow if the non zero coefficients\n     * are not inserted in a coherent order.\n     *\n     * After an insertion session, you should call the finalize() function.\n     */\n    EIGEN_DONT_INLINE Scalar & insert(Index row, Index col) {\n        const Index outer = IsRowMajor ? row : col;\n        const Index inner = IsRowMajor ? col : row;\n\n        eigen_assert(outer < outerSize());\n        eigen_assert(inner < innerSize());\n\n        if (outer == inner)\n            return m_data.diag(col);\n\n        if (IsRowMajor) {\n            if (outer < inner) //upper matrix\n            {\n                Index minOuterIndex = 0;\n                minOuterIndex = inner - m_data.upperProfile(inner);\n\n                if (outer < minOuterIndex) //The value does not yet exist\n                {\n                    const Index previousProfile = m_data.upperProfile(inner);\n\n                    m_data.upperProfile(inner) = inner - outer;\n\n\n                    const Index bandIncrement = m_data.upperProfile(inner) - previousProfile;\n                    //shift data stored after this new one\n                    const Index stop = m_colStartIndex[cols()];\n                    const Index start = m_colStartIndex[inner];\n\n\n                    for (Index innerIdx = stop; innerIdx >= start; innerIdx--) {\n                        m_data.upper(innerIdx + bandIncrement) = m_data.upper(innerIdx);\n                    }\n\n                    for (Index innerIdx = cols(); innerIdx > inner; innerIdx--) {\n                        m_colStartIndex[innerIdx] += bandIncrement;\n                    }\n\n                    //zeros new data\n                    memset(this->_upperPtr() + start, 0, (bandIncrement - 1) * sizeof (Scalar));\n\n                    return m_data.upper(m_colStartIndex[inner]);\n                } else {\n                    return m_data.upper(m_colStartIndex[inner] + outer - (inner - m_data.upperProfile(inner)));\n                }\n            }\n\n            if (outer > inner) //lower matrix\n            {\n                const Index minInnerIndex = outer - m_data.lowerProfile(outer);\n                if (inner < minInnerIndex) //The value does not yet exist\n                {\n                    const Index previousProfile = m_data.lowerProfile(outer);\n                    m_data.lowerProfile(outer) = outer - inner;\n\n                    const Index bandIncrement = m_data.lowerProfile(outer) - previousProfile;\n                    //shift data stored after this new one\n                    const Index stop = m_rowStartIndex[rows()];\n                    const Index start = m_rowStartIndex[outer];\n\n\n                    for (Index innerIdx = stop; innerIdx >= start; innerIdx--) {\n                        m_data.lower(innerIdx + bandIncrement) = m_data.lower(innerIdx);\n                    }\n\n                    for (Index innerIdx = rows(); innerIdx > outer; innerIdx--) {\n                        m_rowStartIndex[innerIdx] += bandIncrement;\n                    }\n\n                    //zeros new data\n                    memset(this->_lowerPtr() + start, 0, (bandIncrement - 1) * sizeof (Scalar));\n                    return m_data.lower(m_rowStartIndex[outer]);\n                } else {\n                    return m_data.lower(m_rowStartIndex[outer] + inner - (outer - m_data.lowerProfile(outer)));\n                }\n            }\n        } else {\n            if (outer > inner) //upper matrix\n            {\n                const Index maxOuterIndex = inner + m_data.upperProfile(inner);\n                if (outer > maxOuterIndex) //The value does not yet exist\n                {\n                    const Index previousProfile = m_data.upperProfile(inner);\n                    m_data.upperProfile(inner) = outer - inner;\n\n                    const Index bandIncrement = m_data.upperProfile(inner) - previousProfile;\n                    //shift data stored after this new one\n                    const Index stop = m_rowStartIndex[rows()];\n                    const Index start = m_rowStartIndex[inner + 1];\n\n                    for (Index innerIdx = stop; innerIdx >= start; innerIdx--) {\n                        m_data.upper(innerIdx + bandIncrement) = m_data.upper(innerIdx);\n                    }\n\n                    for (Index innerIdx = inner + 1; innerIdx < outerSize() + 1; innerIdx++) {\n                        m_rowStartIndex[innerIdx] += bandIncrement;\n                    }\n                    memset(this->_upperPtr() + m_rowStartIndex[inner] + previousProfile + 1, 0, (bandIncrement - 1) * sizeof (Scalar));\n                    return m_data.upper(m_rowStartIndex[inner] + m_data.upperProfile(inner));\n                } else {\n                    return m_data.upper(m_rowStartIndex[inner] + (outer - inner));\n                }\n            }\n\n            if (outer < inner) //lower matrix\n            {\n                const Index maxInnerIndex = outer + m_data.lowerProfile(outer);\n                if (inner > maxInnerIndex) //The value does not yet exist\n                {\n                    const Index previousProfile = m_data.lowerProfile(outer);\n                    m_data.lowerProfile(outer) = inner - outer;\n\n                    const Index bandIncrement = m_data.lowerProfile(outer) - previousProfile;\n                    //shift data stored after this new one\n                    const Index stop = m_colStartIndex[cols()];\n                    const Index start = m_colStartIndex[outer + 1];\n\n                    for (Index innerIdx = stop; innerIdx >= start; innerIdx--) {\n                        m_data.lower(innerIdx + bandIncrement) = m_data.lower(innerIdx);\n                    }\n\n                    for (Index innerIdx = outer + 1; innerIdx < outerSize() + 1; innerIdx++) {\n                        m_colStartIndex[innerIdx] += bandIncrement;\n                    }\n                    memset(this->_lowerPtr() + m_colStartIndex[outer] + previousProfile + 1, 0, (bandIncrement - 1) * sizeof (Scalar));\n                    return m_data.lower(m_colStartIndex[outer] + m_data.lowerProfile(outer));\n                } else {\n                    return m_data.lower(m_colStartIndex[outer] + (inner - outer));\n                }\n            }\n        }\n    }\n\n    /** Must be called after inserting a set of non zero entries.\n     */\n    inline void finalize() {\n        if (IsRowMajor) {\n            if (rows() > cols())\n                m_data.resize(cols(), cols(), rows(), m_colStartIndex[cols()] + 1, m_rowStartIndex[rows()] + 1);\n            else\n                m_data.resize(rows(), cols(), rows(), m_colStartIndex[cols()] + 1, m_rowStartIndex[rows()] + 1);\n\n            //            eigen_assert(rows() == cols() && \"memory reorganisatrion only works with suare matrix\");\n            //\n            //            Scalar* newArray = new Scalar[m_colStartIndex[cols()] + 1 + m_rowStartIndex[rows()] + 1];\n            //            Index dataIdx = 0;\n            //            for (Index row = 0; row < rows(); row++) {\n            //\n            //                const Index nbLowerElts = m_rowStartIndex[row + 1] - m_rowStartIndex[row];\n            //                //                std::cout << \"nbLowerElts\" << nbLowerElts << std::endl;\n            //                memcpy(newArray + dataIdx, m_data.m_lower + m_rowStartIndex[row], nbLowerElts * sizeof (Scalar));\n            //                m_rowStartIndex[row] = dataIdx;\n            //                dataIdx += nbLowerElts;\n            //\n            //                const Index nbUpperElts = m_colStartIndex[row + 1] - m_colStartIndex[row];\n            //                memcpy(newArray + dataIdx, m_data.m_upper + m_colStartIndex[row], nbUpperElts * sizeof (Scalar));\n            //                m_colStartIndex[row] = dataIdx;\n            //                dataIdx += nbUpperElts;\n            //\n            //\n            //            }\n            //            //todo : don't access m_data profile directly : add an accessor from SkylineMatrix\n            //            m_rowStartIndex[rows()] = m_rowStartIndex[rows()-1] + m_data.lowerProfile(rows()-1);\n            //            m_colStartIndex[cols()] = m_colStartIndex[cols()-1] + m_data.upperProfile(cols()-1);\n            //\n            //            delete[] m_data.m_lower;\n            //            delete[] m_data.m_upper;\n            //\n            //            m_data.m_lower = newArray;\n            //            m_data.m_upper = newArray;\n        } else {\n            if (rows() > cols())\n                m_data.resize(cols(), rows(), cols(), m_rowStartIndex[cols()] + 1, m_colStartIndex[cols()] + 1);\n            else\n                m_data.resize(rows(), rows(), cols(), m_rowStartIndex[rows()] + 1, m_colStartIndex[rows()] + 1);\n        }\n    }\n\n    inline void squeeze() {\n        finalize();\n        m_data.squeeze();\n    }\n\n    void prune(Scalar reference, RealScalar epsilon = dummy_precision<RealScalar > ()) {\n        //TODO\n    }\n\n    /** Resizes the matrix to a \\a rows x \\a cols matrix and initializes it to zero\n     * \\sa resizeNonZeros(Index), reserve(), setZero()\n     */\n    void resize(size_t rows, size_t cols) {\n        const Index diagSize = rows > cols ? cols : rows;\n        m_innerSize = IsRowMajor ? cols : rows;\n\n        eigen_assert(rows == cols && \"Skyline matrix must be square matrix\");\n\n        if (diagSize % 2) { // diagSize is odd\n            const Index k = (diagSize - 1) / 2;\n\n            m_data.resize(diagSize, IsRowMajor ? cols : rows, IsRowMajor ? rows : cols,\n                    2 * k * k + k + 1,\n                    2 * k * k + k + 1);\n\n        } else // diagSize is even\n        {\n            const Index k = diagSize / 2;\n            m_data.resize(diagSize, IsRowMajor ? cols : rows, IsRowMajor ? rows : cols,\n                    2 * k * k - k + 1,\n                    2 * k * k - k + 1);\n        }\n\n        if (m_colStartIndex && m_rowStartIndex) {\n            delete[] m_colStartIndex;\n            delete[] m_rowStartIndex;\n        }\n        m_colStartIndex = new Index [cols + 1];\n        m_rowStartIndex = new Index [rows + 1];\n        m_outerSize = diagSize;\n\n        m_data.reset();\n        m_data.clear();\n\n        m_outerSize = diagSize;\n        memset(m_colStartIndex, 0, (cols + 1) * sizeof (Index));\n        memset(m_rowStartIndex, 0, (rows + 1) * sizeof (Index));\n    }\n\n    void resizeNonZeros(Index size) {\n        m_data.resize(size);\n    }\n\n    inline SkylineMatrix()\n    : m_outerSize(-1), m_innerSize(0), m_colStartIndex(0), m_rowStartIndex(0) {\n        resize(0, 0);\n    }\n\n    inline SkylineMatrix(size_t rows, size_t cols)\n    : m_outerSize(0), m_innerSize(0), m_colStartIndex(0), m_rowStartIndex(0) {\n        resize(rows, cols);\n    }\n\n    template<typename OtherDerived>\n    inline SkylineMatrix(const SkylineMatrixBase<OtherDerived>& other)\n    : m_outerSize(0), m_innerSize(0), m_colStartIndex(0), m_rowStartIndex(0) {\n        *this = other.derived();\n    }\n\n    inline SkylineMatrix(const SkylineMatrix & other)\n    : Base(), m_outerSize(0), m_innerSize(0), m_colStartIndex(0), m_rowStartIndex(0) {\n        *this = other.derived();\n    }\n\n    inline void swap(SkylineMatrix & other) {\n        //EIGEN_DBG_SKYLINE(std::cout << \"SkylineMatrix:: swap\\n\");\n        std::swap(m_colStartIndex, other.m_colStartIndex);\n        std::swap(m_rowStartIndex, other.m_rowStartIndex);\n        std::swap(m_innerSize, other.m_innerSize);\n        std::swap(m_outerSize, other.m_outerSize);\n        m_data.swap(other.m_data);\n    }\n\n    inline SkylineMatrix & operator=(const SkylineMatrix & other) {\n        std::cout << \"SkylineMatrix& operator=(const SkylineMatrix& other)\\n\";\n        if (other.isRValue()) {\n            swap(other.const_cast_derived());\n        } else {\n            resize(other.rows(), other.cols());\n            memcpy(m_colStartIndex, other.m_colStartIndex, (m_outerSize + 1) * sizeof (Index));\n            memcpy(m_rowStartIndex, other.m_rowStartIndex, (m_outerSize + 1) * sizeof (Index));\n            m_data = other.m_data;\n        }\n        return *this;\n    }\n\n    template<typename OtherDerived>\n            inline SkylineMatrix & operator=(const SkylineMatrixBase<OtherDerived>& other) {\n        const bool needToTranspose = (Flags & RowMajorBit) != (OtherDerived::Flags & RowMajorBit);\n        if (needToTranspose) {\n            //         TODO\n            //            return *this;\n        } else {\n            // there is no special optimization\n            return SkylineMatrixBase<SkylineMatrix>::operator=(other.derived());\n        }\n    }\n\n    friend std::ostream & operator <<(std::ostream & s, const SkylineMatrix & m) {\n\n        EIGEN_DBG_SKYLINE(\n        std::cout << \"upper elements : \" << std::endl;\n        for (Index i = 0; i < m.m_data.upperSize(); i++)\n            std::cout << m.m_data.upper(i) << \"\\t\";\n        std::cout << std::endl;\n        std::cout << \"upper profile : \" << std::endl;\n        for (Index i = 0; i < m.m_data.upperProfileSize(); i++)\n            std::cout << m.m_data.upperProfile(i) << \"\\t\";\n        std::cout << std::endl;\n        std::cout << \"lower startIdx : \" << std::endl;\n        for (Index i = 0; i < m.m_data.upperProfileSize(); i++)\n            std::cout << (IsRowMajor ? m.m_colStartIndex[i] : m.m_rowStartIndex[i]) << \"\\t\";\n        std::cout << std::endl;\n\n\n        std::cout << \"lower elements : \" << std::endl;\n        for (Index i = 0; i < m.m_data.lowerSize(); i++)\n            std::cout << m.m_data.lower(i) << \"\\t\";\n        std::cout << std::endl;\n        std::cout << \"lower profile : \" << std::endl;\n        for (Index i = 0; i < m.m_data.lowerProfileSize(); i++)\n            std::cout << m.m_data.lowerProfile(i) << \"\\t\";\n        std::cout << std::endl;\n        std::cout << \"lower startIdx : \" << std::endl;\n        for (Index i = 0; i < m.m_data.lowerProfileSize(); i++)\n            std::cout << (IsRowMajor ? m.m_rowStartIndex[i] : m.m_colStartIndex[i]) << \"\\t\";\n        std::cout << std::endl;\n        );\n        for (Index rowIdx = 0; rowIdx < m.rows(); rowIdx++) {\n            for (Index colIdx = 0; colIdx < m.cols(); colIdx++) {\n                s << m.coeff(rowIdx, colIdx) << \"\\t\";\n            }\n            s << std::endl;\n        }\n        return s;\n    }\n\n    /** Destructor */\n    inline ~SkylineMatrix() {\n        delete[] m_colStartIndex;\n        delete[] m_rowStartIndex;\n    }\n\n    /** Overloaded for performance */\n    Scalar sum() const;\n};\n\ntemplate<typename Scalar, int _Options>\nclass SkylineMatrix<Scalar, _Options>::InnerUpperIterator {\npublic:\n\n    InnerUpperIterator(const SkylineMatrix& mat, Index outer)\n    : m_matrix(mat), m_outer(outer),\n    m_id(_Options == RowMajor ? mat.m_colStartIndex[outer] : mat.m_rowStartIndex[outer] + 1),\n    m_start(m_id),\n    m_end(_Options == RowMajor ? mat.m_colStartIndex[outer + 1] : mat.m_rowStartIndex[outer + 1] + 1) {\n    }\n\n    inline InnerUpperIterator & operator++() {\n        m_id++;\n        return *this;\n    }\n\n    inline InnerUpperIterator & operator+=(Index shift) {\n        m_id += shift;\n        return *this;\n    }\n\n    inline Scalar value() const {\n        return m_matrix.m_data.upper(m_id);\n    }\n\n    inline Scalar* valuePtr() {\n        return const_cast<Scalar*> (&(m_matrix.m_data.upper(m_id)));\n    }\n\n    inline Scalar& valueRef() {\n        return const_cast<Scalar&> (m_matrix.m_data.upper(m_id));\n    }\n\n    inline Index index() const {\n        return IsRowMajor ? m_outer - m_matrix.m_data.upperProfile(m_outer) + (m_id - m_start) :\n                m_outer + (m_id - m_start) + 1;\n    }\n\n    inline Index row() const {\n        return IsRowMajor ? index() : m_outer;\n    }\n\n    inline Index col() const {\n        return IsRowMajor ? m_outer : index();\n    }\n\n    inline size_t size() const {\n        return m_matrix.m_data.upperProfile(m_outer);\n    }\n\n    inline operator bool() const {\n        return (m_id < m_end) && (m_id >= m_start);\n    }\n\nprotected:\n    const SkylineMatrix& m_matrix;\n    const Index m_outer;\n    Index m_id;\n    const Index m_start;\n    const Index m_end;\n};\n\ntemplate<typename Scalar, int _Options>\nclass SkylineMatrix<Scalar, _Options>::InnerLowerIterator {\npublic:\n\n    InnerLowerIterator(const SkylineMatrix& mat, Index outer)\n    : m_matrix(mat),\n    m_outer(outer),\n    m_id(_Options == RowMajor ? mat.m_rowStartIndex[outer] : mat.m_colStartIndex[outer] + 1),\n    m_start(m_id),\n    m_end(_Options == RowMajor ? mat.m_rowStartIndex[outer + 1] : mat.m_colStartIndex[outer + 1] + 1) {\n    }\n\n    inline InnerLowerIterator & operator++() {\n        m_id++;\n        return *this;\n    }\n\n    inline InnerLowerIterator & operator+=(Index shift) {\n        m_id += shift;\n        return *this;\n    }\n\n    inline Scalar value() const {\n        return m_matrix.m_data.lower(m_id);\n    }\n\n    inline Scalar* valuePtr() {\n        return const_cast<Scalar*> (&(m_matrix.m_data.lower(m_id)));\n    }\n\n    inline Scalar& valueRef() {\n        return const_cast<Scalar&> (m_matrix.m_data.lower(m_id));\n    }\n\n    inline Index index() const {\n        return IsRowMajor ? m_outer - m_matrix.m_data.lowerProfile(m_outer) + (m_id - m_start) :\n                m_outer + (m_id - m_start) + 1;\n        ;\n    }\n\n    inline Index row() const {\n        return IsRowMajor ? m_outer : index();\n    }\n\n    inline Index col() const {\n        return IsRowMajor ? index() : m_outer;\n    }\n\n    inline size_t size() const {\n        return m_matrix.m_data.lowerProfile(m_outer);\n    }\n\n    inline operator bool() const {\n        return (m_id < m_end) && (m_id >= m_start);\n    }\n\nprotected:\n    const SkylineMatrix& m_matrix;\n    const Index m_outer;\n    Index m_id;\n    const Index m_start;\n    const Index m_end;\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_SKYLINEMATRIX_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/Skyline/SkylineMatrixBase.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Guillaume Saupin <guillaume.saupin@cea.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SKYLINEMATRIXBASE_H\n#define EIGEN_SKYLINEMATRIXBASE_H\n\n#include \"SkylineUtil.h\"\n\nnamespace Eigen { \n\n/** \\ingroup Skyline_Module\n *\n * \\class SkylineMatrixBase\n *\n * \\brief Base class of any skyline matrices or skyline expressions\n *\n * \\param Derived\n *\n */\ntemplate<typename Derived> class SkylineMatrixBase : public EigenBase<Derived> {\npublic:\n\n    typedef typename internal::traits<Derived>::Scalar Scalar;\n    typedef typename internal::traits<Derived>::StorageKind StorageKind;\n    typedef typename internal::index<StorageKind>::type Index;\n\n    enum {\n        RowsAtCompileTime = internal::traits<Derived>::RowsAtCompileTime,\n        /**< The number of rows at compile-time. This is just a copy of the value provided\n         * by the \\a Derived type. If a value is not known at compile-time,\n         * it is set to the \\a Dynamic constant.\n         * \\sa MatrixBase::rows(), MatrixBase::cols(), ColsAtCompileTime, SizeAtCompileTime */\n\n        ColsAtCompileTime = internal::traits<Derived>::ColsAtCompileTime,\n        /**< The number of columns at compile-time. This is just a copy of the value provided\n         * by the \\a Derived type. If a value is not known at compile-time,\n         * it is set to the \\a Dynamic constant.\n         * \\sa MatrixBase::rows(), MatrixBase::cols(), RowsAtCompileTime, SizeAtCompileTime */\n\n\n        SizeAtCompileTime = (internal::size_at_compile_time<internal::traits<Derived>::RowsAtCompileTime,\n        internal::traits<Derived>::ColsAtCompileTime>::ret),\n        /**< This is equal to the number of coefficients, i.e. the number of\n         * rows times the number of columns, or to \\a Dynamic if this is not\n         * known at compile-time. \\sa RowsAtCompileTime, ColsAtCompileTime */\n\n        MaxRowsAtCompileTime = RowsAtCompileTime,\n        MaxColsAtCompileTime = ColsAtCompileTime,\n\n        MaxSizeAtCompileTime = (internal::size_at_compile_time<MaxRowsAtCompileTime,\n        MaxColsAtCompileTime>::ret),\n\n        IsVectorAtCompileTime = RowsAtCompileTime == 1 || ColsAtCompileTime == 1,\n        /**< This is set to true if either the number of rows or the number of\n         * columns is known at compile-time to be equal to 1. Indeed, in that case,\n         * we are dealing with a column-vector (if there is only one column) or with\n         * a row-vector (if there is only one row). */\n\n        Flags = internal::traits<Derived>::Flags,\n        /**< This stores expression \\ref flags flags which may or may not be inherited by new expressions\n         * constructed from this one. See the \\ref flags \"list of flags\".\n         */\n\n        CoeffReadCost = internal::traits<Derived>::CoeffReadCost,\n        /**< This is a rough measure of how expensive it is to read one coefficient from\n         * this expression.\n         */\n\n        IsRowMajor = Flags & RowMajorBit ? 1 : 0\n    };\n\n#ifndef EIGEN_PARSED_BY_DOXYGEN\n    /** This is the \"real scalar\" type; if the \\a Scalar type is already real numbers\n     * (e.g. int, float or double) then \\a RealScalar is just the same as \\a Scalar. If\n     * \\a Scalar is \\a std::complex<T> then RealScalar is \\a T.\n     *\n     * \\sa class NumTraits\n     */\n    typedef typename NumTraits<Scalar>::Real RealScalar;\n\n    /** type of the equivalent square matrix */\n    typedef Matrix<Scalar, EIGEN_SIZE_MAX(RowsAtCompileTime, ColsAtCompileTime),\n                           EIGEN_SIZE_MAX(RowsAtCompileTime, ColsAtCompileTime) > SquareMatrixType;\n\n    inline const Derived& derived() const {\n        return *static_cast<const Derived*> (this);\n    }\n\n    inline Derived& derived() {\n        return *static_cast<Derived*> (this);\n    }\n\n    inline Derived& const_cast_derived() const {\n        return *static_cast<Derived*> (const_cast<SkylineMatrixBase*> (this));\n    }\n#endif // not EIGEN_PARSED_BY_DOXYGEN\n\n    /** \\returns the number of rows. \\sa cols(), RowsAtCompileTime */\n    inline Index rows() const {\n        return derived().rows();\n    }\n\n    /** \\returns the number of columns. \\sa rows(), ColsAtCompileTime*/\n    inline Index cols() const {\n        return derived().cols();\n    }\n\n    /** \\returns the number of coefficients, which is \\a rows()*cols().\n     * \\sa rows(), cols(), SizeAtCompileTime. */\n    inline Index size() const {\n        return rows() * cols();\n    }\n\n    /** \\returns the number of nonzero coefficients which is in practice the number\n     * of stored coefficients. */\n    inline Index nonZeros() const {\n        return derived().nonZeros();\n    }\n\n    /** \\returns the size of the storage major dimension,\n     * i.e., the number of columns for a columns major matrix, and the number of rows otherwise */\n    Index outerSize() const {\n        return (int(Flags) & RowMajorBit) ? this->rows() : this->cols();\n    }\n\n    /** \\returns the size of the inner dimension according to the storage order,\n     * i.e., the number of rows for a columns major matrix, and the number of cols otherwise */\n    Index innerSize() const {\n        return (int(Flags) & RowMajorBit) ? this->cols() : this->rows();\n    }\n\n    bool isRValue() const {\n        return m_isRValue;\n    }\n\n    Derived& markAsRValue() {\n        m_isRValue = true;\n        return derived();\n    }\n\n    SkylineMatrixBase() : m_isRValue(false) {\n        /* TODO check flags */\n    }\n\n    inline Derived & operator=(const Derived& other) {\n        this->operator=<Derived > (other);\n        return derived();\n    }\n\n    template<typename OtherDerived>\n    inline void assignGeneric(const OtherDerived& other) {\n        derived().resize(other.rows(), other.cols());\n        for (Index row = 0; row < rows(); row++)\n            for (Index col = 0; col < cols(); col++) {\n                if (other.coeff(row, col) != Scalar(0))\n                    derived().insert(row, col) = other.coeff(row, col);\n            }\n        derived().finalize();\n    }\n\n    template<typename OtherDerived>\n            inline Derived & operator=(const SkylineMatrixBase<OtherDerived>& other) {\n        //TODO\n    }\n\n    template<typename Lhs, typename Rhs>\n            inline Derived & operator=(const SkylineProduct<Lhs, Rhs, SkylineTimeSkylineProduct>& product);\n\n    friend std::ostream & operator <<(std::ostream & s, const SkylineMatrixBase& m) {\n        s << m.derived();\n        return s;\n    }\n\n    template<typename OtherDerived>\n    const typename SkylineProductReturnType<Derived, OtherDerived>::Type\n    operator*(const MatrixBase<OtherDerived> &other) const;\n\n    /** \\internal use operator= */\n    template<typename DenseDerived>\n    void evalTo(MatrixBase<DenseDerived>& dst) const {\n        dst.setZero();\n        for (Index i = 0; i < rows(); i++)\n            for (Index j = 0; j < rows(); j++)\n                dst(i, j) = derived().coeff(i, j);\n    }\n\n    Matrix<Scalar, RowsAtCompileTime, ColsAtCompileTime> toDense() const {\n        return derived();\n    }\n\n    /** \\returns the matrix or vector obtained by evaluating this expression.\n     *\n     * Notice that in the case of a plain matrix or vector (not an expression) this function just returns\n     * a const reference, in order to avoid a useless copy.\n     */\n    EIGEN_STRONG_INLINE const typename internal::eval<Derived, IsSkyline>::type eval() const {\n        return typename internal::eval<Derived>::type(derived());\n    }\n\nprotected:\n    bool m_isRValue;\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_SKYLINEMATRIXBASE_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/Skyline/SkylineProduct.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Guillaume Saupin <guillaume.saupin@cea.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SKYLINEPRODUCT_H\n#define EIGEN_SKYLINEPRODUCT_H\n\nnamespace Eigen { \n\ntemplate<typename Lhs, typename Rhs, int ProductMode>\nstruct SkylineProductReturnType {\n    typedef const typename internal::nested_eval<Lhs, Rhs::RowsAtCompileTime>::type LhsNested;\n    typedef const typename internal::nested_eval<Rhs, Lhs::RowsAtCompileTime>::type RhsNested;\n\n    typedef SkylineProduct<LhsNested, RhsNested, ProductMode> Type;\n};\n\ntemplate<typename LhsNested, typename RhsNested, int ProductMode>\nstruct internal::traits<SkylineProduct<LhsNested, RhsNested, ProductMode> > {\n    // clean the nested types:\n    typedef typename internal::remove_all<LhsNested>::type _LhsNested;\n    typedef typename internal::remove_all<RhsNested>::type _RhsNested;\n    typedef typename _LhsNested::Scalar Scalar;\n\n    enum {\n        LhsCoeffReadCost = _LhsNested::CoeffReadCost,\n        RhsCoeffReadCost = _RhsNested::CoeffReadCost,\n        LhsFlags = _LhsNested::Flags,\n        RhsFlags = _RhsNested::Flags,\n\n        RowsAtCompileTime = _LhsNested::RowsAtCompileTime,\n        ColsAtCompileTime = _RhsNested::ColsAtCompileTime,\n        InnerSize = EIGEN_SIZE_MIN_PREFER_FIXED(_LhsNested::ColsAtCompileTime, _RhsNested::RowsAtCompileTime),\n\n        MaxRowsAtCompileTime = _LhsNested::MaxRowsAtCompileTime,\n        MaxColsAtCompileTime = _RhsNested::MaxColsAtCompileTime,\n\n        EvalToRowMajor = (RhsFlags & LhsFlags & RowMajorBit),\n        ResultIsSkyline = ProductMode == SkylineTimeSkylineProduct,\n\n        RemovedBits = ~((EvalToRowMajor ? 0 : RowMajorBit) | (ResultIsSkyline ? 0 : SkylineBit)),\n\n        Flags = (int(LhsFlags | RhsFlags) & HereditaryBits & RemovedBits)\n        | EvalBeforeAssigningBit\n        | EvalBeforeNestingBit,\n\n        CoeffReadCost = HugeCost\n    };\n\n    typedef typename internal::conditional<ResultIsSkyline,\n            SkylineMatrixBase<SkylineProduct<LhsNested, RhsNested, ProductMode> >,\n            MatrixBase<SkylineProduct<LhsNested, RhsNested, ProductMode> > >::type Base;\n};\n\nnamespace internal {\ntemplate<typename LhsNested, typename RhsNested, int ProductMode>\nclass SkylineProduct : no_assignment_operator,\npublic traits<SkylineProduct<LhsNested, RhsNested, ProductMode> >::Base {\npublic:\n\n    EIGEN_GENERIC_PUBLIC_INTERFACE(SkylineProduct)\n\nprivate:\n\n    typedef typename traits<SkylineProduct>::_LhsNested _LhsNested;\n    typedef typename traits<SkylineProduct>::_RhsNested _RhsNested;\n\npublic:\n\n    template<typename Lhs, typename Rhs>\n    EIGEN_STRONG_INLINE SkylineProduct(const Lhs& lhs, const Rhs& rhs)\n    : m_lhs(lhs), m_rhs(rhs) {\n        eigen_assert(lhs.cols() == rhs.rows());\n\n        enum {\n            ProductIsValid = _LhsNested::ColsAtCompileTime == Dynamic\n            || _RhsNested::RowsAtCompileTime == Dynamic\n            || int(_LhsNested::ColsAtCompileTime) == int(_RhsNested::RowsAtCompileTime),\n            AreVectors = _LhsNested::IsVectorAtCompileTime && _RhsNested::IsVectorAtCompileTime,\n            SameSizes = EIGEN_PREDICATE_SAME_MATRIX_SIZE(_LhsNested, _RhsNested)\n        };\n        // note to the lost user:\n        //    * for a dot product use: v1.dot(v2)\n        //    * for a coeff-wise product use: v1.cwise()*v2\n        EIGEN_STATIC_ASSERT(ProductIsValid || !(AreVectors && SameSizes),\n                INVALID_VECTOR_VECTOR_PRODUCT__IF_YOU_WANTED_A_DOT_OR_COEFF_WISE_PRODUCT_YOU_MUST_USE_THE_EXPLICIT_FUNCTIONS)\n                EIGEN_STATIC_ASSERT(ProductIsValid || !(SameSizes && !AreVectors),\n                INVALID_MATRIX_PRODUCT__IF_YOU_WANTED_A_COEFF_WISE_PRODUCT_YOU_MUST_USE_THE_EXPLICIT_FUNCTION)\n                EIGEN_STATIC_ASSERT(ProductIsValid || SameSizes, INVALID_MATRIX_PRODUCT)\n    }\n\n    EIGEN_STRONG_INLINE Index rows() const {\n        return m_lhs.rows();\n    }\n\n    EIGEN_STRONG_INLINE Index cols() const {\n        return m_rhs.cols();\n    }\n\n    EIGEN_STRONG_INLINE const _LhsNested& lhs() const {\n        return m_lhs;\n    }\n\n    EIGEN_STRONG_INLINE const _RhsNested& rhs() const {\n        return m_rhs;\n    }\n\nprotected:\n    LhsNested m_lhs;\n    RhsNested m_rhs;\n};\n\n// dense = skyline * dense\n// Note that here we force no inlining and separate the setZero() because GCC messes up otherwise\n\ntemplate<typename Lhs, typename Rhs, typename Dest>\nEIGEN_DONT_INLINE void skyline_row_major_time_dense_product(const Lhs& lhs, const Rhs& rhs, Dest& dst) {\n    typedef typename remove_all<Lhs>::type _Lhs;\n    typedef typename remove_all<Rhs>::type _Rhs;\n    typedef typename traits<Lhs>::Scalar Scalar;\n\n    enum {\n        LhsIsRowMajor = (_Lhs::Flags & RowMajorBit) == RowMajorBit,\n        LhsIsSelfAdjoint = (_Lhs::Flags & SelfAdjointBit) == SelfAdjointBit,\n        ProcessFirstHalf = LhsIsSelfAdjoint\n        && (((_Lhs::Flags & (UpperTriangularBit | LowerTriangularBit)) == 0)\n        || ((_Lhs::Flags & UpperTriangularBit) && !LhsIsRowMajor)\n        || ((_Lhs::Flags & LowerTriangularBit) && LhsIsRowMajor)),\n        ProcessSecondHalf = LhsIsSelfAdjoint && (!ProcessFirstHalf)\n    };\n\n    //Use matrix diagonal part <- Improvement : use inner iterator on dense matrix.\n    for (Index col = 0; col < rhs.cols(); col++) {\n        for (Index row = 0; row < lhs.rows(); row++) {\n            dst(row, col) = lhs.coeffDiag(row) * rhs(row, col);\n        }\n    }\n    //Use matrix lower triangular part\n    for (Index row = 0; row < lhs.rows(); row++) {\n        typename _Lhs::InnerLowerIterator lIt(lhs, row);\n        const Index stop = lIt.col() + lIt.size();\n        for (Index col = 0; col < rhs.cols(); col++) {\n\n            Index k = lIt.col();\n            Scalar tmp = 0;\n            while (k < stop) {\n                tmp +=\n                        lIt.value() *\n                        rhs(k++, col);\n                ++lIt;\n            }\n            dst(row, col) += tmp;\n            lIt += -lIt.size();\n        }\n\n    }\n\n    //Use matrix upper triangular part\n    for (Index lhscol = 0; lhscol < lhs.cols(); lhscol++) {\n        typename _Lhs::InnerUpperIterator uIt(lhs, lhscol);\n        const Index stop = uIt.size() + uIt.row();\n        for (Index rhscol = 0; rhscol < rhs.cols(); rhscol++) {\n\n\n            const Scalar rhsCoeff = rhs.coeff(lhscol, rhscol);\n            Index k = uIt.row();\n            while (k < stop) {\n                dst(k++, rhscol) +=\n                        uIt.value() *\n                        rhsCoeff;\n                ++uIt;\n            }\n            uIt += -uIt.size();\n        }\n    }\n\n}\n\ntemplate<typename Lhs, typename Rhs, typename Dest>\nEIGEN_DONT_INLINE void skyline_col_major_time_dense_product(const Lhs& lhs, const Rhs& rhs, Dest& dst) {\n    typedef typename remove_all<Lhs>::type _Lhs;\n    typedef typename remove_all<Rhs>::type _Rhs;\n    typedef typename traits<Lhs>::Scalar Scalar;\n\n    enum {\n        LhsIsRowMajor = (_Lhs::Flags & RowMajorBit) == RowMajorBit,\n        LhsIsSelfAdjoint = (_Lhs::Flags & SelfAdjointBit) == SelfAdjointBit,\n        ProcessFirstHalf = LhsIsSelfAdjoint\n        && (((_Lhs::Flags & (UpperTriangularBit | LowerTriangularBit)) == 0)\n        || ((_Lhs::Flags & UpperTriangularBit) && !LhsIsRowMajor)\n        || ((_Lhs::Flags & LowerTriangularBit) && LhsIsRowMajor)),\n        ProcessSecondHalf = LhsIsSelfAdjoint && (!ProcessFirstHalf)\n    };\n\n    //Use matrix diagonal part <- Improvement : use inner iterator on dense matrix.\n    for (Index col = 0; col < rhs.cols(); col++) {\n        for (Index row = 0; row < lhs.rows(); row++) {\n            dst(row, col) = lhs.coeffDiag(row) * rhs(row, col);\n        }\n    }\n\n    //Use matrix upper triangular part\n    for (Index row = 0; row < lhs.rows(); row++) {\n        typename _Lhs::InnerUpperIterator uIt(lhs, row);\n        const Index stop = uIt.col() + uIt.size();\n        for (Index col = 0; col < rhs.cols(); col++) {\n\n            Index k = uIt.col();\n            Scalar tmp = 0;\n            while (k < stop) {\n                tmp +=\n                        uIt.value() *\n                        rhs(k++, col);\n                ++uIt;\n            }\n\n\n            dst(row, col) += tmp;\n            uIt += -uIt.size();\n        }\n    }\n\n    //Use matrix lower triangular part\n    for (Index lhscol = 0; lhscol < lhs.cols(); lhscol++) {\n        typename _Lhs::InnerLowerIterator lIt(lhs, lhscol);\n        const Index stop = lIt.size() + lIt.row();\n        for (Index rhscol = 0; rhscol < rhs.cols(); rhscol++) {\n\n            const Scalar rhsCoeff = rhs.coeff(lhscol, rhscol);\n            Index k = lIt.row();\n            while (k < stop) {\n                dst(k++, rhscol) +=\n                        lIt.value() *\n                        rhsCoeff;\n                ++lIt;\n            }\n            lIt += -lIt.size();\n        }\n    }\n\n}\n\ntemplate<typename Lhs, typename Rhs, typename ResultType,\n        int LhsStorageOrder = traits<Lhs>::Flags&RowMajorBit>\n        struct skyline_product_selector;\n\ntemplate<typename Lhs, typename Rhs, typename ResultType>\nstruct skyline_product_selector<Lhs, Rhs, ResultType, RowMajor> {\n    typedef typename traits<typename remove_all<Lhs>::type>::Scalar Scalar;\n\n    static void run(const Lhs& lhs, const Rhs& rhs, ResultType & res) {\n        skyline_row_major_time_dense_product<Lhs, Rhs, ResultType > (lhs, rhs, res);\n    }\n};\n\ntemplate<typename Lhs, typename Rhs, typename ResultType>\nstruct skyline_product_selector<Lhs, Rhs, ResultType, ColMajor> {\n    typedef typename traits<typename remove_all<Lhs>::type>::Scalar Scalar;\n\n    static void run(const Lhs& lhs, const Rhs& rhs, ResultType & res) {\n        skyline_col_major_time_dense_product<Lhs, Rhs, ResultType > (lhs, rhs, res);\n    }\n};\n\n} // end namespace internal\n\n// template<typename Derived>\n// template<typename Lhs, typename Rhs >\n// Derived & MatrixBase<Derived>::lazyAssign(const SkylineProduct<Lhs, Rhs, SkylineTimeDenseProduct>& product) {\n//     typedef typename internal::remove_all<Lhs>::type _Lhs;\n//     internal::skyline_product_selector<typename internal::remove_all<Lhs>::type,\n//             typename internal::remove_all<Rhs>::type,\n//             Derived>::run(product.lhs(), product.rhs(), derived());\n// \n//     return derived();\n// }\n\n// skyline * dense\n\ntemplate<typename Derived>\ntemplate<typename OtherDerived >\nEIGEN_STRONG_INLINE const typename SkylineProductReturnType<Derived, OtherDerived>::Type\nSkylineMatrixBase<Derived>::operator*(const MatrixBase<OtherDerived> &other) const {\n\n    return typename SkylineProductReturnType<Derived, OtherDerived>::Type(derived(), other.derived());\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_SKYLINEPRODUCT_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/Skyline/SkylineStorage.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Guillaume Saupin <guillaume.saupin@cea.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SKYLINE_STORAGE_H\n#define EIGEN_SKYLINE_STORAGE_H\n\nnamespace Eigen { \n\n/** Stores a skyline set of values in three structures :\n * The diagonal elements\n * The upper elements\n * The lower elements\n *\n */\ntemplate<typename Scalar>\nclass SkylineStorage {\n    typedef typename NumTraits<Scalar>::Real RealScalar;\n    typedef SparseIndex Index;\npublic:\n\n    SkylineStorage()\n    : m_diag(0),\n    m_lower(0),\n    m_upper(0),\n    m_lowerProfile(0),\n    m_upperProfile(0),\n    m_diagSize(0),\n    m_upperSize(0),\n    m_lowerSize(0),\n    m_upperProfileSize(0),\n    m_lowerProfileSize(0),\n    m_allocatedSize(0) {\n    }\n\n    SkylineStorage(const SkylineStorage& other)\n    : m_diag(0),\n    m_lower(0),\n    m_upper(0),\n    m_lowerProfile(0),\n    m_upperProfile(0),\n    m_diagSize(0),\n    m_upperSize(0),\n    m_lowerSize(0),\n    m_upperProfileSize(0),\n    m_lowerProfileSize(0),\n    m_allocatedSize(0) {\n        *this = other;\n    }\n\n    SkylineStorage & operator=(const SkylineStorage& other) {\n        resize(other.diagSize(), other.m_upperProfileSize, other.m_lowerProfileSize, other.upperSize(), other.lowerSize());\n        memcpy(m_diag, other.m_diag, m_diagSize * sizeof (Scalar));\n        memcpy(m_upper, other.m_upper, other.upperSize() * sizeof (Scalar));\n        memcpy(m_lower, other.m_lower, other.lowerSize() * sizeof (Scalar));\n        memcpy(m_upperProfile, other.m_upperProfile, m_upperProfileSize * sizeof (Index));\n        memcpy(m_lowerProfile, other.m_lowerProfile, m_lowerProfileSize * sizeof (Index));\n        return *this;\n    }\n\n    void swap(SkylineStorage& other) {\n        std::swap(m_diag, other.m_diag);\n        std::swap(m_upper, other.m_upper);\n        std::swap(m_lower, other.m_lower);\n        std::swap(m_upperProfile, other.m_upperProfile);\n        std::swap(m_lowerProfile, other.m_lowerProfile);\n        std::swap(m_diagSize, other.m_diagSize);\n        std::swap(m_upperSize, other.m_upperSize);\n        std::swap(m_lowerSize, other.m_lowerSize);\n        std::swap(m_allocatedSize, other.m_allocatedSize);\n    }\n\n    ~SkylineStorage() {\n        delete[] m_diag;\n        delete[] m_upper;\n        if (m_upper != m_lower)\n            delete[] m_lower;\n        delete[] m_upperProfile;\n        delete[] m_lowerProfile;\n    }\n\n    void reserve(Index size, Index upperProfileSize, Index lowerProfileSize, Index upperSize, Index lowerSize) {\n        Index newAllocatedSize = size + upperSize + lowerSize;\n        if (newAllocatedSize > m_allocatedSize)\n            reallocate(size, upperProfileSize, lowerProfileSize, upperSize, lowerSize);\n    }\n\n    void squeeze() {\n        if (m_allocatedSize > m_diagSize + m_upperSize + m_lowerSize)\n            reallocate(m_diagSize, m_upperProfileSize, m_lowerProfileSize, m_upperSize, m_lowerSize);\n    }\n\n    void resize(Index diagSize, Index upperProfileSize, Index lowerProfileSize, Index upperSize, Index lowerSize, float reserveSizeFactor = 0) {\n        if (m_allocatedSize < diagSize + upperSize + lowerSize)\n            reallocate(diagSize, upperProfileSize, lowerProfileSize, upperSize + Index(reserveSizeFactor * upperSize), lowerSize + Index(reserveSizeFactor * lowerSize));\n        m_diagSize = diagSize;\n        m_upperSize = upperSize;\n        m_lowerSize = lowerSize;\n        m_upperProfileSize = upperProfileSize;\n        m_lowerProfileSize = lowerProfileSize;\n    }\n\n    inline Index diagSize() const {\n        return m_diagSize;\n    }\n\n    inline Index upperSize() const {\n        return m_upperSize;\n    }\n\n    inline Index lowerSize() const {\n        return m_lowerSize;\n    }\n\n    inline Index upperProfileSize() const {\n        return m_upperProfileSize;\n    }\n\n    inline Index lowerProfileSize() const {\n        return m_lowerProfileSize;\n    }\n\n    inline Index allocatedSize() const {\n        return m_allocatedSize;\n    }\n\n    inline void clear() {\n        m_diagSize = 0;\n    }\n\n    inline Scalar& diag(Index i) {\n        return m_diag[i];\n    }\n\n    inline const Scalar& diag(Index i) const {\n        return m_diag[i];\n    }\n\n    inline Scalar& upper(Index i) {\n        return m_upper[i];\n    }\n\n    inline const Scalar& upper(Index i) const {\n        return m_upper[i];\n    }\n\n    inline Scalar& lower(Index i) {\n        return m_lower[i];\n    }\n\n    inline const Scalar& lower(Index i) const {\n        return m_lower[i];\n    }\n\n    inline Index& upperProfile(Index i) {\n        return m_upperProfile[i];\n    }\n\n    inline const Index& upperProfile(Index i) const {\n        return m_upperProfile[i];\n    }\n\n    inline Index& lowerProfile(Index i) {\n        return m_lowerProfile[i];\n    }\n\n    inline const Index& lowerProfile(Index i) const {\n        return m_lowerProfile[i];\n    }\n\n    static SkylineStorage Map(Index* upperProfile, Index* lowerProfile, Scalar* diag, Scalar* upper, Scalar* lower, Index size, Index upperSize, Index lowerSize) {\n        SkylineStorage res;\n        res.m_upperProfile = upperProfile;\n        res.m_lowerProfile = lowerProfile;\n        res.m_diag = diag;\n        res.m_upper = upper;\n        res.m_lower = lower;\n        res.m_allocatedSize = res.m_diagSize = size;\n        res.m_upperSize = upperSize;\n        res.m_lowerSize = lowerSize;\n        return res;\n    }\n\n    inline void reset() {\n        memset(m_diag, 0, m_diagSize * sizeof (Scalar));\n        memset(m_upper, 0, m_upperSize * sizeof (Scalar));\n        memset(m_lower, 0, m_lowerSize * sizeof (Scalar));\n        memset(m_upperProfile, 0, m_diagSize * sizeof (Index));\n        memset(m_lowerProfile, 0, m_diagSize * sizeof (Index));\n    }\n\n    void prune(Scalar reference, RealScalar epsilon = dummy_precision<RealScalar>()) {\n        //TODO\n    }\n\nprotected:\n\n    inline void reallocate(Index diagSize, Index upperProfileSize, Index lowerProfileSize, Index upperSize, Index lowerSize) {\n\n        Scalar* diag = new Scalar[diagSize];\n        Scalar* upper = new Scalar[upperSize];\n        Scalar* lower = new Scalar[lowerSize];\n        Index* upperProfile = new Index[upperProfileSize];\n        Index* lowerProfile = new Index[lowerProfileSize];\n\n        Index copyDiagSize = (std::min)(diagSize, m_diagSize);\n        Index copyUpperSize = (std::min)(upperSize, m_upperSize);\n        Index copyLowerSize = (std::min)(lowerSize, m_lowerSize);\n        Index copyUpperProfileSize = (std::min)(upperProfileSize, m_upperProfileSize);\n        Index copyLowerProfileSize = (std::min)(lowerProfileSize, m_lowerProfileSize);\n\n        // copy\n        memcpy(diag, m_diag, copyDiagSize * sizeof (Scalar));\n        memcpy(upper, m_upper, copyUpperSize * sizeof (Scalar));\n        memcpy(lower, m_lower, copyLowerSize * sizeof (Scalar));\n        memcpy(upperProfile, m_upperProfile, copyUpperProfileSize * sizeof (Index));\n        memcpy(lowerProfile, m_lowerProfile, copyLowerProfileSize * sizeof (Index));\n\n\n\n        // delete old stuff\n        delete[] m_diag;\n        delete[] m_upper;\n        delete[] m_lower;\n        delete[] m_upperProfile;\n        delete[] m_lowerProfile;\n        m_diag = diag;\n        m_upper = upper;\n        m_lower = lower;\n        m_upperProfile = upperProfile;\n        m_lowerProfile = lowerProfile;\n        m_allocatedSize = diagSize + upperSize + lowerSize;\n        m_upperSize = upperSize;\n        m_lowerSize = lowerSize;\n    }\n\npublic:\n    Scalar* m_diag;\n    Scalar* m_upper;\n    Scalar* m_lower;\n    Index* m_upperProfile;\n    Index* m_lowerProfile;\n    Index m_diagSize;\n    Index m_upperSize;\n    Index m_lowerSize;\n    Index m_upperProfileSize;\n    Index m_lowerProfileSize;\n    Index m_allocatedSize;\n\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_SKYLINE_STORAGE_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/Skyline/SkylineUtil.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Guillaume Saupin <guillaume.saupin@cea.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SKYLINEUTIL_H\n#define EIGEN_SKYLINEUTIL_H\n\nnamespace Eigen { \n\n#ifdef NDEBUG\n#define EIGEN_DBG_SKYLINE(X)\n#else\n#define EIGEN_DBG_SKYLINE(X) X\n#endif\n\nconst unsigned int SkylineBit = 0x1200;\ntemplate<typename Lhs, typename Rhs, int ProductMode> class SkylineProduct;\nenum AdditionalProductEvaluationMode {SkylineTimeDenseProduct, SkylineTimeSkylineProduct, DenseTimeSkylineProduct};\nenum {IsSkyline = SkylineBit};\n\n\n#define EIGEN_SKYLINE_INHERIT_ASSIGNMENT_OPERATOR(Derived, Op) \\\ntemplate<typename OtherDerived> \\\nEIGEN_STRONG_INLINE Derived& operator Op(const Eigen::SkylineMatrixBase<OtherDerived>& other) \\\n{ \\\n  return Base::operator Op(other.derived()); \\\n} \\\nEIGEN_STRONG_INLINE Derived& operator Op(const Derived& other) \\\n{ \\\n  return Base::operator Op(other); \\\n}\n\n#define EIGEN_SKYLINE_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Derived, Op) \\\ntemplate<typename Other> \\\nEIGEN_STRONG_INLINE Derived& operator Op(const Other& scalar) \\\n{ \\\n  return Base::operator Op(scalar); \\\n}\n\n#define EIGEN_SKYLINE_INHERIT_ASSIGNMENT_OPERATORS(Derived) \\\n  EIGEN_SKYLINE_INHERIT_ASSIGNMENT_OPERATOR(Derived, =) \\\n  EIGEN_SKYLINE_INHERIT_ASSIGNMENT_OPERATOR(Derived, +=) \\\n  EIGEN_SKYLINE_INHERIT_ASSIGNMENT_OPERATOR(Derived, -=) \\\n  EIGEN_SKYLINE_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Derived, *=) \\\n  EIGEN_SKYLINE_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Derived, /=)\n\n#define _EIGEN_SKYLINE_GENERIC_PUBLIC_INTERFACE(Derived, BaseClass) \\\n  typedef BaseClass Base; \\\n  typedef typename Eigen::internal::traits<Derived>::Scalar Scalar; \\\n  typedef typename Eigen::NumTraits<Scalar>::Real RealScalar; \\\n  typedef typename Eigen::internal::traits<Derived>::StorageKind StorageKind; \\\n  typedef typename Eigen::internal::index<StorageKind>::type Index; \\\n  enum {  Flags = Eigen::internal::traits<Derived>::Flags, };\n\n#define EIGEN_SKYLINE_GENERIC_PUBLIC_INTERFACE(Derived) \\\n  _EIGEN_SKYLINE_GENERIC_PUBLIC_INTERFACE(Derived, Eigen::SkylineMatrixBase<Derived>)\n\ntemplate<typename Derived> class SkylineMatrixBase;\ntemplate<typename _Scalar, int _Flags = 0> class SkylineMatrix;\ntemplate<typename _Scalar, int _Flags = 0> class DynamicSkylineMatrix;\ntemplate<typename _Scalar, int _Flags = 0> class SkylineVector;\ntemplate<typename _Scalar, int _Flags = 0> class MappedSkylineMatrix;\n\nnamespace internal {\n\ntemplate<typename Lhs, typename Rhs> struct skyline_product_mode;\ntemplate<typename Lhs, typename Rhs, int ProductMode = skyline_product_mode<Lhs,Rhs>::value> struct SkylineProductReturnType;\n\ntemplate<typename T> class eval<T,IsSkyline>\n{\n    typedef typename traits<T>::Scalar _Scalar;\n    enum {\n          _Flags = traits<T>::Flags\n    };\n\n  public:\n    typedef SkylineMatrix<_Scalar, _Flags> type;\n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_SKYLINEUTIL_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/SparseExtra/BlockOfDynamicSparseMatrix.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPARSE_BLOCKFORDYNAMICMATRIX_H\n#define EIGEN_SPARSE_BLOCKFORDYNAMICMATRIX_H\n\nnamespace Eigen { \n\n#if 0\n\n// NOTE Have to be reimplemented as a specialization of BlockImpl< DynamicSparseMatrix<_Scalar, _Options, _Index>, ... >\n// See SparseBlock.h for an example\n\n\n/***************************************************************************\n* specialisation for DynamicSparseMatrix\n***************************************************************************/\n\ntemplate<typename _Scalar, int _Options, typename _Index, int Size>\nclass SparseInnerVectorSet<DynamicSparseMatrix<_Scalar, _Options, _Index>, Size>\n  : public SparseMatrixBase<SparseInnerVectorSet<DynamicSparseMatrix<_Scalar, _Options, _Index>, Size> >\n{\n    typedef DynamicSparseMatrix<_Scalar, _Options, _Index> MatrixType;\n  public:\n\n    enum { IsRowMajor = internal::traits<SparseInnerVectorSet>::IsRowMajor };\n\n    EIGEN_SPARSE_PUBLIC_INTERFACE(SparseInnerVectorSet)\n    class InnerIterator: public MatrixType::InnerIterator\n    {\n      public:\n        inline InnerIterator(const SparseInnerVectorSet& xpr, Index outer)\n          : MatrixType::InnerIterator(xpr.m_matrix, xpr.m_outerStart + outer), m_outer(outer)\n        {}\n        inline Index row() const { return IsRowMajor ? m_outer : this->index(); }\n        inline Index col() const { return IsRowMajor ? this->index() : m_outer; }\n      protected:\n        Index m_outer;\n    };\n\n    inline SparseInnerVectorSet(const MatrixType& matrix, Index outerStart, Index outerSize)\n      : m_matrix(matrix), m_outerStart(outerStart), m_outerSize(outerSize)\n    {\n      eigen_assert( (outerStart>=0) && ((outerStart+outerSize)<=matrix.outerSize()) );\n    }\n\n    inline SparseInnerVectorSet(const MatrixType& matrix, Index outer)\n      : m_matrix(matrix), m_outerStart(outer), m_outerSize(Size)\n    {\n      eigen_assert(Size!=Dynamic);\n      eigen_assert( (outer>=0) && (outer<matrix.outerSize()) );\n    }\n\n    template<typename OtherDerived>\n    inline SparseInnerVectorSet& operator=(const SparseMatrixBase<OtherDerived>& other)\n    {\n      if (IsRowMajor != ((OtherDerived::Flags&RowMajorBit)==RowMajorBit))\n      {\n        // need to transpose => perform a block evaluation followed by a big swap\n        DynamicSparseMatrix<Scalar,IsRowMajor?RowMajorBit:0> aux(other);\n        *this = aux.markAsRValue();\n      }\n      else\n      {\n        // evaluate/copy vector per vector\n        for (Index j=0; j<m_outerSize.value(); ++j)\n        {\n          SparseVector<Scalar,IsRowMajor ? RowMajorBit : 0> aux(other.innerVector(j));\n          m_matrix.const_cast_derived()._data()[m_outerStart+j].swap(aux._data());\n        }\n      }\n      return *this;\n    }\n\n    inline SparseInnerVectorSet& operator=(const SparseInnerVectorSet& other)\n    {\n      return operator=<SparseInnerVectorSet>(other);\n    }\n\n    Index nonZeros() const\n    {\n      Index count = 0;\n      for (Index j=0; j<m_outerSize.value(); ++j)\n        count += m_matrix._data()[m_outerStart+j].size();\n      return count;\n    }\n\n    const Scalar& lastCoeff() const\n    {\n      EIGEN_STATIC_ASSERT_VECTOR_ONLY(SparseInnerVectorSet);\n      eigen_assert(m_matrix.data()[m_outerStart].size()>0);\n      return m_matrix.data()[m_outerStart].vale(m_matrix.data()[m_outerStart].size()-1);\n    }\n\n//     template<typename Sparse>\n//     inline SparseInnerVectorSet& operator=(const SparseMatrixBase<OtherDerived>& other)\n//     {\n//       return *this;\n//     }\n\n    EIGEN_STRONG_INLINE Index rows() const { return IsRowMajor ? m_outerSize.value() : m_matrix.rows(); }\n    EIGEN_STRONG_INLINE Index cols() const { return IsRowMajor ? m_matrix.cols() : m_outerSize.value(); }\n\n  protected:\n\n    const typename MatrixType::Nested m_matrix;\n    Index m_outerStart;\n    const internal::variable_if_dynamic<Index, Size> m_outerSize;\n\n};\n\n#endif\n\n} // end namespace Eigen\n\n#endif // EIGEN_SPARSE_BLOCKFORDYNAMICMATRIX_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/SparseExtra/BlockSparseMatrix.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2013 Desire Nuentsa <desire.nuentsa_wakam@inria.fr>\n// Copyright (C) 2013 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPARSEBLOCKMATRIX_H\n#define EIGEN_SPARSEBLOCKMATRIX_H\n\nnamespace Eigen { \n/** \\ingroup SparseCore_Module\n  *\n  * \\class BlockSparseMatrix\n  *\n  * \\brief A versatile sparse matrix representation where each element is a block\n  *\n  * This class provides routines to manipulate block sparse matrices stored in a\n  * BSR-like representation. There are two main types :\n  *\n  * 1. All blocks have the same number of rows and columns, called block size\n  * in the following. In this case, if this block size is known at compile time,\n  * it can be given as a template parameter like\n  * \\code\n  * BlockSparseMatrix<Scalar, 3, ColMajor> bmat(b_rows, b_cols);\n  * \\endcode\n  * Here, bmat is a b_rows x b_cols block sparse matrix\n  * where each coefficient is a 3x3 dense matrix.\n  * If the block size is fixed but will be given at runtime,\n  * \\code\n  * BlockSparseMatrix<Scalar, Dynamic, ColMajor> bmat(b_rows, b_cols);\n  * bmat.setBlockSize(block_size);\n  * \\endcode\n  *\n  * 2. The second case is for variable-block sparse matrices.\n  * Here each block has its own dimensions. The only restriction is that all the blocks\n  * in a row (resp. a column) should have the same number of rows (resp. of columns).\n  * It is thus required in this case to describe the layout of the matrix by calling\n  * setBlockLayout(rowBlocks, colBlocks).\n  *\n  * In any of the previous case, the matrix can be filled by calling setFromTriplets().\n  * A regular sparse matrix can be converted to a block sparse matrix and vice versa.\n  * It is obviously required to describe the block layout beforehand by calling either\n  * setBlockSize() for fixed-size blocks or setBlockLayout for variable-size blocks.\n  *\n  * \\tparam _Scalar The Scalar type\n  * \\tparam _BlockAtCompileTime The block layout option. It takes the following values\n  * Dynamic : block size known at runtime\n  * a numeric number : fixed-size block known at compile time\n  */\ntemplate<typename _Scalar, int _BlockAtCompileTime=Dynamic, int _Options=ColMajor, typename _StorageIndex=int> class BlockSparseMatrix;\n\ntemplate<typename BlockSparseMatrixT> class BlockSparseMatrixView;\n\nnamespace internal {\ntemplate<typename _Scalar, int _BlockAtCompileTime, int _Options, typename _Index>\nstruct traits<BlockSparseMatrix<_Scalar,_BlockAtCompileTime,_Options, _Index> >\n{\n  typedef _Scalar Scalar;\n  typedef _Index Index;\n  typedef Sparse StorageKind; // FIXME Where is it used ??\n  typedef MatrixXpr XprKind;\n  enum {\n    RowsAtCompileTime = Dynamic,\n    ColsAtCompileTime = Dynamic,\n    MaxRowsAtCompileTime = Dynamic,\n    MaxColsAtCompileTime = Dynamic,\n    BlockSize = _BlockAtCompileTime,\n    Flags = _Options | NestByRefBit | LvalueBit,\n    CoeffReadCost = NumTraits<Scalar>::ReadCost,\n    SupportedAccessPatterns = InnerRandomAccessPattern\n  };\n};\ntemplate<typename BlockSparseMatrixT>\nstruct traits<BlockSparseMatrixView<BlockSparseMatrixT> >\n{\n  typedef Ref<Matrix<typename BlockSparseMatrixT::Scalar, BlockSparseMatrixT::BlockSize, BlockSparseMatrixT::BlockSize> > Scalar;\n  typedef Ref<Matrix<typename BlockSparseMatrixT::RealScalar, BlockSparseMatrixT::BlockSize, BlockSparseMatrixT::BlockSize> > RealScalar;\n\n};\n\n// Function object to sort a triplet list\ntemplate<typename Iterator, bool IsColMajor>\nstruct TripletComp\n{\n  typedef typename Iterator::value_type Triplet;\n  bool operator()(const Triplet& a, const Triplet& b)\n  { if(IsColMajor)\n      return ((a.col() == b.col() && a.row() < b.row()) || (a.col() < b.col()));\n    else\n      return ((a.row() == b.row() && a.col() < b.col()) || (a.row() < b.row()));\n  }\n};\n} // end namespace internal\n\n\n/* Proxy to view the block sparse matrix as a regular sparse matrix */\ntemplate<typename BlockSparseMatrixT>\nclass BlockSparseMatrixView : public SparseMatrixBase<BlockSparseMatrixT>\n{\n  public:\n    typedef Ref<typename BlockSparseMatrixT::BlockScalar> Scalar;\n    typedef Ref<typename BlockSparseMatrixT::BlockRealScalar> RealScalar;\n    typedef typename BlockSparseMatrixT::Index Index;\n    typedef  BlockSparseMatrixT Nested;\n    enum {\n      Flags = BlockSparseMatrixT::Options,\n      Options = BlockSparseMatrixT::Options,\n      RowsAtCompileTime = BlockSparseMatrixT::RowsAtCompileTime,\n      ColsAtCompileTime = BlockSparseMatrixT::ColsAtCompileTime,\n      MaxColsAtCompileTime = BlockSparseMatrixT::MaxColsAtCompileTime,\n      MaxRowsAtCompileTime = BlockSparseMatrixT::MaxRowsAtCompileTime\n    };\n  public:\n    BlockSparseMatrixView(const BlockSparseMatrixT& spblockmat)\n     : m_spblockmat(spblockmat)\n    {}\n\n    Index outerSize() const\n    {\n      return (Flags&RowMajorBit) == 1 ? this->rows() : this->cols();\n    }\n    Index cols() const\n    {\n      return m_spblockmat.blockCols();\n    }\n    Index rows() const\n    {\n      return m_spblockmat.blockRows();\n    }\n    Scalar coeff(Index row, Index col)\n    {\n      return m_spblockmat.coeff(row, col);\n    }\n    Scalar coeffRef(Index row, Index col)\n    {\n      return m_spblockmat.coeffRef(row, col);\n    }\n    // Wrapper to iterate over all blocks\n    class InnerIterator : public BlockSparseMatrixT::BlockInnerIterator\n    {\n      public:\n      InnerIterator(const BlockSparseMatrixView& mat, Index outer)\n          : BlockSparseMatrixT::BlockInnerIterator(mat.m_spblockmat, outer)\n      {}\n\n    };\n\n  protected:\n    const BlockSparseMatrixT& m_spblockmat;\n};\n\n// Proxy to view a regular vector as a block vector\ntemplate<typename BlockSparseMatrixT, typename VectorType>\nclass BlockVectorView\n{\n  public:\n    enum {\n      BlockSize = BlockSparseMatrixT::BlockSize,\n      ColsAtCompileTime = VectorType::ColsAtCompileTime,\n      RowsAtCompileTime = VectorType::RowsAtCompileTime,\n      Flags = VectorType::Flags\n    };\n    typedef Ref<const Matrix<typename BlockSparseMatrixT::Scalar, (RowsAtCompileTime==1)? 1 : BlockSize, (ColsAtCompileTime==1)? 1 : BlockSize> >Scalar;\n    typedef typename BlockSparseMatrixT::Index Index;\n  public:\n    BlockVectorView(const BlockSparseMatrixT& spblockmat, const VectorType& vec)\n    : m_spblockmat(spblockmat),m_vec(vec)\n    { }\n    inline Index cols() const\n    {\n      return m_vec.cols();\n    }\n    inline Index size() const\n    {\n      return m_spblockmat.blockRows();\n    }\n    inline Scalar coeff(Index bi) const\n    {\n      Index startRow = m_spblockmat.blockRowsIndex(bi);\n      Index rowSize = m_spblockmat.blockRowsIndex(bi+1) - startRow;\n      return m_vec.middleRows(startRow, rowSize);\n    }\n    inline Scalar coeff(Index bi, Index j) const\n    {\n      Index startRow = m_spblockmat.blockRowsIndex(bi);\n      Index rowSize = m_spblockmat.blockRowsIndex(bi+1) - startRow;\n      return m_vec.block(startRow, j, rowSize, 1);\n    }\n  protected:\n    const BlockSparseMatrixT& m_spblockmat;\n    const VectorType& m_vec;\n};\n\ntemplate<typename VectorType, typename Index> class BlockVectorReturn;\n\n\n// Proxy to view a regular vector as a block vector\ntemplate<typename BlockSparseMatrixT, typename VectorType>\nclass BlockVectorReturn\n{\n  public:\n    enum {\n      ColsAtCompileTime = VectorType::ColsAtCompileTime,\n      RowsAtCompileTime = VectorType::RowsAtCompileTime,\n      Flags = VectorType::Flags\n    };\n    typedef Ref<Matrix<typename VectorType::Scalar, RowsAtCompileTime, ColsAtCompileTime> > Scalar;\n    typedef typename BlockSparseMatrixT::Index Index;\n  public:\n    BlockVectorReturn(const BlockSparseMatrixT& spblockmat, VectorType& vec)\n    : m_spblockmat(spblockmat),m_vec(vec)\n    { }\n    inline Index size() const\n    {\n      return m_spblockmat.blockRows();\n    }\n    inline Scalar coeffRef(Index bi)\n    {\n      Index startRow = m_spblockmat.blockRowsIndex(bi);\n      Index rowSize = m_spblockmat.blockRowsIndex(bi+1) - startRow;\n      return m_vec.middleRows(startRow, rowSize);\n    }\n    inline Scalar coeffRef(Index bi, Index j)\n    {\n      Index startRow = m_spblockmat.blockRowsIndex(bi);\n      Index rowSize = m_spblockmat.blockRowsIndex(bi+1) - startRow;\n      return m_vec.block(startRow, j, rowSize, 1);\n    }\n\n  protected:\n    const BlockSparseMatrixT& m_spblockmat;\n    VectorType& m_vec;\n};\n\n// Block version of the sparse dense product\ntemplate<typename Lhs, typename Rhs>\nclass BlockSparseTimeDenseProduct;\n\nnamespace internal {\n\ntemplate<typename BlockSparseMatrixT, typename VecType>\nstruct traits<BlockSparseTimeDenseProduct<BlockSparseMatrixT, VecType> >\n{\n  typedef Dense StorageKind;\n  typedef MatrixXpr XprKind;\n  typedef typename BlockSparseMatrixT::Scalar Scalar;\n  typedef typename BlockSparseMatrixT::Index Index;\n  enum {\n    RowsAtCompileTime = Dynamic,\n    ColsAtCompileTime = Dynamic,\n    MaxRowsAtCompileTime = Dynamic,\n    MaxColsAtCompileTime = Dynamic,\n    Flags = 0,\n    CoeffReadCost = internal::traits<BlockSparseMatrixT>::CoeffReadCost\n  };\n};\n} // end namespace internal\n\ntemplate<typename Lhs, typename Rhs>\nclass BlockSparseTimeDenseProduct\n  : public ProductBase<BlockSparseTimeDenseProduct<Lhs,Rhs>, Lhs, Rhs>\n{\n  public:\n    EIGEN_PRODUCT_PUBLIC_INTERFACE(BlockSparseTimeDenseProduct)\n\n    BlockSparseTimeDenseProduct(const Lhs& lhs, const Rhs& rhs) : Base(lhs,rhs)\n    {}\n\n    template<typename Dest> void scaleAndAddTo(Dest& dest, const typename Rhs::Scalar& alpha) const\n    {\n      BlockVectorReturn<Lhs,Dest> tmpDest(m_lhs, dest);\n      internal::sparse_time_dense_product( BlockSparseMatrixView<Lhs>(m_lhs),  BlockVectorView<Lhs, Rhs>(m_lhs, m_rhs), tmpDest, alpha);\n    }\n\n  private:\n    BlockSparseTimeDenseProduct& operator=(const BlockSparseTimeDenseProduct&);\n};\n\ntemplate<typename _Scalar, int _BlockAtCompileTime, int _Options, typename _StorageIndex>\nclass BlockSparseMatrix : public SparseMatrixBase<BlockSparseMatrix<_Scalar,_BlockAtCompileTime, _Options,_StorageIndex> >\n{\n  public:\n    typedef _Scalar Scalar;\n    typedef typename NumTraits<Scalar>::Real RealScalar;\n    typedef _StorageIndex StorageIndex;\n    typedef typename internal::ref_selector<BlockSparseMatrix<_Scalar, _BlockAtCompileTime, _Options, _StorageIndex> >::type Nested;\n\n    enum {\n      Options = _Options,\n      Flags = Options,\n      BlockSize=_BlockAtCompileTime,\n      RowsAtCompileTime = Dynamic,\n      ColsAtCompileTime = Dynamic,\n      MaxRowsAtCompileTime = Dynamic,\n      MaxColsAtCompileTime = Dynamic,\n      IsVectorAtCompileTime = 0,\n      IsColMajor = Flags&RowMajorBit ? 0 : 1\n    };\n    typedef Matrix<Scalar, _BlockAtCompileTime, _BlockAtCompileTime,IsColMajor ? ColMajor : RowMajor> BlockScalar;\n    typedef Matrix<RealScalar, _BlockAtCompileTime, _BlockAtCompileTime,IsColMajor ? ColMajor : RowMajor> BlockRealScalar;\n    typedef typename internal::conditional<_BlockAtCompileTime==Dynamic, Scalar, BlockScalar>::type BlockScalarReturnType;\n    typedef BlockSparseMatrix<Scalar, BlockSize, IsColMajor ? ColMajor : RowMajor, StorageIndex> PlainObject;\n  public:\n    // Default constructor\n    BlockSparseMatrix()\n    : m_innerBSize(0),m_outerBSize(0),m_innerOffset(0),m_outerOffset(0),\n      m_nonzerosblocks(0),m_values(0),m_blockPtr(0),m_indices(0),\n      m_outerIndex(0),m_blockSize(BlockSize)\n    { }\n\n\n    /**\n     * \\brief Construct and resize\n     *\n     */\n    BlockSparseMatrix(Index brow, Index bcol)\n      : m_innerBSize(IsColMajor ? brow : bcol),\n        m_outerBSize(IsColMajor ? bcol : brow),\n        m_innerOffset(0),m_outerOffset(0),m_nonzerosblocks(0),\n        m_values(0),m_blockPtr(0),m_indices(0),\n        m_outerIndex(0),m_blockSize(BlockSize)\n    { }\n\n    /**\n     * \\brief Copy-constructor\n     */\n    BlockSparseMatrix(const BlockSparseMatrix& other)\n      : m_innerBSize(other.m_innerBSize),m_outerBSize(other.m_outerBSize),\n        m_nonzerosblocks(other.m_nonzerosblocks),m_nonzeros(other.m_nonzeros),\n        m_blockPtr(0),m_blockSize(other.m_blockSize)\n    {\n      // should we allow copying between variable-size blocks and fixed-size blocks ??\n      eigen_assert(m_blockSize == BlockSize && \" CAN NOT COPY BETWEEN FIXED-SIZE AND VARIABLE-SIZE BLOCKS\");\n\n      std::copy(other.m_innerOffset, other.m_innerOffset+m_innerBSize+1, m_innerOffset);\n      std::copy(other.m_outerOffset, other.m_outerOffset+m_outerBSize+1, m_outerOffset);\n      std::copy(other.m_values, other.m_values+m_nonzeros, m_values);\n\n      if(m_blockSize != Dynamic)\n        std::copy(other.m_blockPtr, other.m_blockPtr+m_nonzerosblocks, m_blockPtr);\n\n      std::copy(other.m_indices, other.m_indices+m_nonzerosblocks, m_indices);\n      std::copy(other.m_outerIndex, other.m_outerIndex+m_outerBSize, m_outerIndex);\n    }\n\n    friend void swap(BlockSparseMatrix& first, BlockSparseMatrix& second)\n    {\n      std::swap(first.m_innerBSize, second.m_innerBSize);\n      std::swap(first.m_outerBSize, second.m_outerBSize);\n      std::swap(first.m_innerOffset, second.m_innerOffset);\n      std::swap(first.m_outerOffset, second.m_outerOffset);\n      std::swap(first.m_nonzerosblocks, second.m_nonzerosblocks);\n      std::swap(first.m_nonzeros, second.m_nonzeros);\n      std::swap(first.m_values, second.m_values);\n      std::swap(first.m_blockPtr, second.m_blockPtr);\n      std::swap(first.m_indices, second.m_indices);\n      std::swap(first.m_outerIndex, second.m_outerIndex);\n      std::swap(first.m_BlockSize, second.m_blockSize);\n    }\n\n    BlockSparseMatrix& operator=(BlockSparseMatrix other)\n    {\n      //Copy-and-swap paradigm ... avoid leaked data if thrown\n      swap(*this, other);\n      return *this;\n    }\n\n    // Destructor\n    ~BlockSparseMatrix()\n    {\n      delete[] m_outerIndex;\n      delete[] m_innerOffset;\n      delete[] m_outerOffset;\n      delete[] m_indices;\n      delete[] m_blockPtr;\n      delete[] m_values;\n    }\n\n\n    /**\n      * \\brief Constructor from a sparse matrix\n      *\n      */\n    template<typename MatrixType>\n    inline BlockSparseMatrix(const MatrixType& spmat) : m_blockSize(BlockSize)\n    {\n      EIGEN_STATIC_ASSERT((m_blockSize != Dynamic), THIS_METHOD_IS_ONLY_FOR_FIXED_SIZE);\n\n      *this = spmat;\n    }\n\n    /**\n      * \\brief Assignment from a sparse matrix with the same storage order\n      *\n      * Convert from a sparse matrix to block sparse matrix.\n      * \\warning Before calling this function, tt is necessary to call\n      * either setBlockLayout() (matrices with variable-size blocks)\n      * or setBlockSize() (for fixed-size blocks).\n      */\n    template<typename MatrixType>\n    inline BlockSparseMatrix& operator=(const MatrixType& spmat)\n    {\n      eigen_assert((m_innerBSize != 0 && m_outerBSize != 0)\n                   && \"Trying to assign to a zero-size matrix, call resize() first\");\n      eigen_assert(((MatrixType::Options&RowMajorBit) != IsColMajor) && \"Wrong storage order\");\n      typedef SparseMatrix<bool,MatrixType::Options,typename MatrixType::Index> MatrixPatternType;\n      MatrixPatternType  blockPattern(blockRows(), blockCols());\n      m_nonzeros = 0;\n\n      // First, compute the number of nonzero blocks and their locations\n      for(StorageIndex bj = 0; bj < m_outerBSize; ++bj)\n      {\n        // Browse each outer block and compute the structure\n        std::vector<bool> nzblocksFlag(m_innerBSize,false);  // Record the existing blocks\n        blockPattern.startVec(bj);\n        for(StorageIndex j = blockOuterIndex(bj); j < blockOuterIndex(bj+1); ++j)\n        {\n          typename MatrixType::InnerIterator it_spmat(spmat, j);\n          for(; it_spmat; ++it_spmat)\n          {\n            StorageIndex bi = innerToBlock(it_spmat.index()); // Index of the current nonzero block\n            if(!nzblocksFlag[bi])\n            {\n              // Save the index of this nonzero block\n              nzblocksFlag[bi] = true;\n              blockPattern.insertBackByOuterInnerUnordered(bj, bi) = true;\n              // Compute the total number of nonzeros (including explicit zeros in blocks)\n              m_nonzeros += blockOuterSize(bj) * blockInnerSize(bi);\n            }\n          }\n        } // end current outer block\n      }\n      blockPattern.finalize();\n\n      // Allocate the internal arrays\n      setBlockStructure(blockPattern);\n\n      for(StorageIndex nz = 0; nz < m_nonzeros; ++nz) m_values[nz] = Scalar(0);\n      for(StorageIndex bj = 0; bj < m_outerBSize; ++bj)\n      {\n        // Now copy the values\n        for(StorageIndex j = blockOuterIndex(bj); j < blockOuterIndex(bj+1); ++j)\n        {\n          // Browse the outer block column by column (for column-major matrices)\n          typename MatrixType::InnerIterator it_spmat(spmat, j);\n          for(; it_spmat; ++it_spmat)\n          {\n            StorageIndex idx = 0; // Position of this block in the column block\n            StorageIndex bi = innerToBlock(it_spmat.index()); // Index of the current nonzero block\n            // Go to the inner block where this element belongs to\n            while(bi > m_indices[m_outerIndex[bj]+idx]) ++idx; // Not expensive for ordered blocks\n            StorageIndex idxVal;// Get the right position in the array of values for this element\n            if(m_blockSize == Dynamic)\n            {\n              // Offset from all blocks before ...\n              idxVal =  m_blockPtr[m_outerIndex[bj]+idx];\n              // ... and offset inside the block\n              idxVal += (j - blockOuterIndex(bj)) * blockOuterSize(bj) + it_spmat.index() - m_innerOffset[bi];\n            }\n            else\n            {\n              // All blocks before\n              idxVal = (m_outerIndex[bj] + idx) * m_blockSize * m_blockSize;\n              // inside the block\n              idxVal += (j - blockOuterIndex(bj)) * m_blockSize + (it_spmat.index()%m_blockSize);\n            }\n            // Insert the value\n            m_values[idxVal] = it_spmat.value();\n          } // end of this column\n        } // end of this block\n      } // end of this outer block\n\n      return *this;\n    }\n\n    /**\n      * \\brief Set the nonzero block pattern of the matrix\n      *\n      * Given a sparse matrix describing the nonzero block pattern,\n      * this function prepares the internal pointers for values.\n      * After calling this function, any *nonzero* block (bi, bj) can be set\n      * with a simple call to coeffRef(bi,bj).\n      *\n      *\n      * \\warning Before calling this function, tt is necessary to call\n      * either setBlockLayout() (matrices with variable-size blocks)\n      * or setBlockSize() (for fixed-size blocks).\n      *\n      * \\param blockPattern Sparse matrix of boolean elements describing the block structure\n      *\n      * \\sa setBlockLayout() \\sa setBlockSize()\n      */\n    template<typename MatrixType>\n    void setBlockStructure(const MatrixType& blockPattern)\n    {\n      resize(blockPattern.rows(), blockPattern.cols());\n      reserve(blockPattern.nonZeros());\n\n      // Browse the block pattern and set up the various pointers\n      m_outerIndex[0] = 0;\n      if(m_blockSize == Dynamic) m_blockPtr[0] = 0;\n      for(StorageIndex nz = 0; nz < m_nonzeros; ++nz) m_values[nz] = Scalar(0);\n      for(StorageIndex bj = 0; bj < m_outerBSize; ++bj)\n      {\n        //Browse each outer block\n\n        //First, copy and save the indices of nonzero blocks\n        //FIXME : find a way to avoid this ...\n        std::vector<int> nzBlockIdx;\n        typename MatrixType::InnerIterator it(blockPattern, bj);\n        for(; it; ++it)\n        {\n          nzBlockIdx.push_back(it.index());\n        }\n        std::sort(nzBlockIdx.begin(), nzBlockIdx.end());\n\n        // Now, fill block indices and (eventually) pointers to blocks\n        for(StorageIndex idx = 0; idx < nzBlockIdx.size(); ++idx)\n        {\n          StorageIndex offset = m_outerIndex[bj]+idx; // offset in m_indices\n          m_indices[offset] = nzBlockIdx[idx];\n          if(m_blockSize == Dynamic)\n            m_blockPtr[offset] = m_blockPtr[offset-1] + blockInnerSize(nzBlockIdx[idx]) * blockOuterSize(bj);\n          // There is no blockPtr for fixed-size blocks... not needed !???\n        }\n        // Save the pointer to the next outer block\n        m_outerIndex[bj+1] = m_outerIndex[bj] + nzBlockIdx.size();\n      }\n    }\n\n    /**\n      * \\brief Set the number of rows and columns blocks\n      */\n    inline void resize(Index brow, Index bcol)\n    {\n      m_innerBSize = IsColMajor ? brow : bcol;\n      m_outerBSize = IsColMajor ? bcol : brow;\n    }\n\n    /**\n      * \\brief set the block size at runtime for fixed-size block layout\n      *\n      * Call this only for fixed-size blocks\n      */\n    inline void setBlockSize(Index blockSize)\n    {\n      m_blockSize = blockSize;\n    }\n\n    /**\n      * \\brief Set the row and column block layouts,\n      *\n      * This function set the size of each row and column block.\n      * So this function should be used only for blocks with variable size.\n      * \\param rowBlocks : Number of rows per row block\n      * \\param colBlocks : Number of columns per column block\n      * \\sa resize(), setBlockSize()\n      */\n    inline void setBlockLayout(const VectorXi& rowBlocks, const VectorXi& colBlocks)\n    {\n      const VectorXi& innerBlocks = IsColMajor ? rowBlocks : colBlocks;\n      const VectorXi& outerBlocks = IsColMajor ? colBlocks : rowBlocks;\n      eigen_assert(m_innerBSize == innerBlocks.size() && \"CHECK THE NUMBER OF ROW OR COLUMN BLOCKS\");\n      eigen_assert(m_outerBSize == outerBlocks.size() && \"CHECK THE NUMBER OF ROW OR COLUMN BLOCKS\");\n      m_outerBSize = outerBlocks.size();\n      //  starting index of blocks... cumulative sums\n      m_innerOffset = new StorageIndex[m_innerBSize+1];\n      m_outerOffset = new StorageIndex[m_outerBSize+1];\n      m_innerOffset[0] = 0;\n      m_outerOffset[0] = 0;\n      std::partial_sum(&innerBlocks[0], &innerBlocks[m_innerBSize-1]+1, &m_innerOffset[1]);\n      std::partial_sum(&outerBlocks[0], &outerBlocks[m_outerBSize-1]+1, &m_outerOffset[1]);\n\n      // Compute the total number of nonzeros\n      m_nonzeros = 0;\n      for(StorageIndex bj = 0; bj < m_outerBSize; ++bj)\n        for(StorageIndex bi = 0; bi < m_innerBSize; ++bi)\n          m_nonzeros += outerBlocks[bj] * innerBlocks[bi];\n\n    }\n\n    /**\n      * \\brief Allocate the internal array of pointers to blocks and their inner indices\n      *\n      * \\note For fixed-size blocks, call setBlockSize() to set the block.\n      * And For variable-size blocks, call setBlockLayout() before using this function\n      *\n      * \\param nonzerosblocks Number of nonzero blocks. The total number of nonzeros is\n      * is computed in setBlockLayout() for variable-size blocks\n      * \\sa setBlockSize()\n      */\n    inline void reserve(const Index nonzerosblocks)\n    {\n      eigen_assert((m_innerBSize != 0 && m_outerBSize != 0) &&\n          \"TRYING TO RESERVE ZERO-SIZE MATRICES, CALL resize() first\");\n\n      //FIXME Should free if already allocated\n      m_outerIndex = new StorageIndex[m_outerBSize+1];\n\n      m_nonzerosblocks = nonzerosblocks;\n      if(m_blockSize != Dynamic)\n      {\n        m_nonzeros = nonzerosblocks * (m_blockSize * m_blockSize);\n        m_blockPtr = 0;\n      }\n      else\n      {\n        // m_nonzeros  is already computed in setBlockLayout()\n        m_blockPtr = new StorageIndex[m_nonzerosblocks+1];\n      }\n      m_indices = new StorageIndex[m_nonzerosblocks+1];\n      m_values = new Scalar[m_nonzeros];\n    }\n\n\n    /**\n      * \\brief Fill values in a matrix  from a triplet list.\n      *\n      * Each triplet item has a block stored in an Eigen dense matrix.\n      * The InputIterator class should provide the functions row(), col() and value()\n      *\n      * \\note For fixed-size blocks, call setBlockSize() before this function.\n      *\n      * FIXME Do not accept duplicates\n      */\n    template<typename InputIterator>\n    void setFromTriplets(const InputIterator& begin, const InputIterator& end)\n    {\n      eigen_assert((m_innerBSize!=0 && m_outerBSize !=0) && \"ZERO BLOCKS, PLEASE CALL resize() before\");\n\n      /* First, sort the triplet list\n        * FIXME This can be unnecessarily expensive since only the inner indices have to be sorted\n        * The best approach is like in SparseMatrix::setFromTriplets()\n        */\n      internal::TripletComp<InputIterator, IsColMajor> tripletcomp;\n      std::sort(begin, end, tripletcomp);\n\n      /* Count the number of rows and column blocks,\n       * and the number of nonzero blocks per outer dimension\n       */\n      VectorXi rowBlocks(m_innerBSize); // Size of each block row\n      VectorXi colBlocks(m_outerBSize); // Size of each block column\n      rowBlocks.setZero(); colBlocks.setZero();\n      VectorXi nzblock_outer(m_outerBSize); // Number of nz blocks per outer vector\n      VectorXi nz_outer(m_outerBSize); // Number of nz per outer vector...for variable-size blocks\n      nzblock_outer.setZero();\n      nz_outer.setZero();\n      for(InputIterator it(begin); it !=end; ++it)\n      {\n        eigen_assert(it->row() >= 0 && it->row() < this->blockRows() && it->col() >= 0 && it->col() < this->blockCols());\n        eigen_assert((it->value().rows() == it->value().cols() && (it->value().rows() == m_blockSize))\n                     || (m_blockSize == Dynamic));\n\n        if(m_blockSize == Dynamic)\n        {\n          eigen_assert((rowBlocks[it->row()] == 0 || rowBlocks[it->row()] == it->value().rows()) &&\n              \"NON CORRESPONDING SIZES FOR ROW BLOCKS\");\n          eigen_assert((colBlocks[it->col()] == 0 || colBlocks[it->col()] == it->value().cols()) &&\n              \"NON CORRESPONDING SIZES FOR COLUMN BLOCKS\");\n          rowBlocks[it->row()] =it->value().rows();\n          colBlocks[it->col()] = it->value().cols();\n        }\n        nz_outer(IsColMajor ? it->col() : it->row()) += it->value().rows() * it->value().cols();\n        nzblock_outer(IsColMajor ? it->col() : it->row())++;\n      }\n      // Allocate member arrays\n      if(m_blockSize == Dynamic) setBlockLayout(rowBlocks, colBlocks);\n      StorageIndex nzblocks = nzblock_outer.sum();\n      reserve(nzblocks);\n\n       // Temporary markers\n      VectorXi block_id(m_outerBSize); // To be used as a block marker during insertion\n\n      // Setup outer index pointers and markers\n      m_outerIndex[0] = 0;\n      if (m_blockSize == Dynamic)  m_blockPtr[0] =  0;\n      for(StorageIndex bj = 0; bj < m_outerBSize; ++bj)\n      {\n        m_outerIndex[bj+1] = m_outerIndex[bj] + nzblock_outer(bj);\n        block_id(bj) = m_outerIndex[bj];\n        if(m_blockSize==Dynamic)\n        {\n          m_blockPtr[m_outerIndex[bj+1]] = m_blockPtr[m_outerIndex[bj]] + nz_outer(bj);\n        }\n      }\n\n      // Fill the matrix\n      for(InputIterator it(begin); it!=end; ++it)\n      {\n        StorageIndex outer = IsColMajor ? it->col() : it->row();\n        StorageIndex inner = IsColMajor ? it->row() : it->col();\n        m_indices[block_id(outer)] = inner;\n        StorageIndex block_size = it->value().rows()*it->value().cols();\n        StorageIndex nz_marker = blockPtr(block_id[outer]);\n        memcpy(&(m_values[nz_marker]), it->value().data(), block_size * sizeof(Scalar));\n        if(m_blockSize == Dynamic)\n        {\n          m_blockPtr[block_id(outer)+1] = m_blockPtr[block_id(outer)] + block_size;\n        }\n        block_id(outer)++;\n      }\n\n      // An alternative when the outer indices are sorted...no need to use an array of markers\n//      for(Index bcol = 0; bcol < m_outerBSize; ++bcol)\n//      {\n//      Index id = 0, id_nz = 0, id_nzblock = 0;\n//      for(InputIterator it(begin); it!=end; ++it)\n//      {\n//        while (id<bcol) // one pass should do the job unless there are empty columns\n//        {\n//          id++;\n//          m_outerIndex[id+1]=m_outerIndex[id];\n//        }\n//        m_outerIndex[id+1] += 1;\n//        m_indices[id_nzblock]=brow;\n//        Index block_size = it->value().rows()*it->value().cols();\n//        m_blockPtr[id_nzblock+1] = m_blockPtr[id_nzblock] + block_size;\n//        id_nzblock++;\n//        memcpy(&(m_values[id_nz]),it->value().data(), block_size*sizeof(Scalar));\n//        id_nz += block_size;\n//      }\n//      while(id < m_outerBSize-1) // Empty columns at the end\n//      {\n//        id++;\n//        m_outerIndex[id+1]=m_outerIndex[id];\n//      }\n//      }\n    }\n\n\n    /**\n      * \\returns the number of rows\n      */\n    inline Index rows() const\n    {\n//      return blockRows();\n      return (IsColMajor ? innerSize() : outerSize());\n    }\n\n    /**\n      * \\returns the number of cols\n      */\n    inline Index cols() const\n    {\n//      return blockCols();\n      return (IsColMajor ? outerSize() : innerSize());\n    }\n\n    inline Index innerSize() const\n    {\n      if(m_blockSize == Dynamic) return m_innerOffset[m_innerBSize];\n      else return  (m_innerBSize * m_blockSize) ;\n    }\n\n    inline Index outerSize() const\n    {\n      if(m_blockSize == Dynamic) return m_outerOffset[m_outerBSize];\n      else return  (m_outerBSize * m_blockSize) ;\n    }\n    /** \\returns the number of rows grouped by blocks */\n    inline Index blockRows() const\n    {\n      return (IsColMajor ? m_innerBSize : m_outerBSize);\n    }\n    /** \\returns the number of columns grouped by blocks */\n    inline Index blockCols() const\n    {\n      return (IsColMajor ? m_outerBSize : m_innerBSize);\n    }\n\n    inline Index outerBlocks() const { return m_outerBSize; }\n    inline Index innerBlocks() const { return m_innerBSize; }\n\n    /** \\returns the block index where outer belongs to */\n    inline Index outerToBlock(Index outer) const\n    {\n      eigen_assert(outer < outerSize() && \"OUTER INDEX OUT OF BOUNDS\");\n\n      if(m_blockSize != Dynamic)\n        return (outer / m_blockSize); // Integer division\n\n      StorageIndex b_outer = 0;\n      while(m_outerOffset[b_outer] <= outer) ++b_outer;\n      return b_outer - 1;\n    }\n    /** \\returns  the block index where inner belongs to */\n    inline Index innerToBlock(Index inner) const\n    {\n      eigen_assert(inner < innerSize() && \"OUTER INDEX OUT OF BOUNDS\");\n\n      if(m_blockSize != Dynamic)\n        return (inner / m_blockSize); // Integer division\n\n      StorageIndex b_inner = 0;\n      while(m_innerOffset[b_inner] <= inner) ++b_inner;\n      return b_inner - 1;\n    }\n\n    /**\n      *\\returns a reference to the (i,j) block as an Eigen Dense Matrix\n      */\n    Ref<BlockScalar> coeffRef(Index brow, Index bcol)\n    {\n      eigen_assert(brow < blockRows() && \"BLOCK ROW INDEX OUT OF BOUNDS\");\n      eigen_assert(bcol < blockCols() && \"BLOCK nzblocksFlagCOLUMN OUT OF BOUNDS\");\n\n      StorageIndex rsize = IsColMajor ? blockInnerSize(brow): blockOuterSize(bcol);\n      StorageIndex csize = IsColMajor ? blockOuterSize(bcol) : blockInnerSize(brow);\n      StorageIndex inner = IsColMajor ? brow : bcol;\n      StorageIndex outer = IsColMajor ? bcol : brow;\n      StorageIndex offset = m_outerIndex[outer];\n      while(offset < m_outerIndex[outer+1] && m_indices[offset] != inner)\n        offset++;\n      if(m_indices[offset] == inner)\n      {\n        return Map<BlockScalar>(&(m_values[blockPtr(offset)]), rsize, csize);\n      }\n      else\n      {\n        //FIXME the block does not exist, Insert it !!!!!!!!!\n        eigen_assert(\"DYNAMIC INSERTION IS NOT YET SUPPORTED\");\n      }\n    }\n\n    /**\n      * \\returns the value of the (i,j) block as an Eigen Dense Matrix\n      */\n    Map<const BlockScalar> coeff(Index brow, Index bcol) const\n    {\n      eigen_assert(brow < blockRows() && \"BLOCK ROW INDEX OUT OF BOUNDS\");\n      eigen_assert(bcol < blockCols() && \"BLOCK COLUMN OUT OF BOUNDS\");\n\n      StorageIndex rsize = IsColMajor ? blockInnerSize(brow): blockOuterSize(bcol);\n      StorageIndex csize = IsColMajor ? blockOuterSize(bcol) : blockInnerSize(brow);\n      StorageIndex inner = IsColMajor ? brow : bcol;\n      StorageIndex outer = IsColMajor ? bcol : brow;\n      StorageIndex offset = m_outerIndex[outer];\n      while(offset < m_outerIndex[outer+1] && m_indices[offset] != inner) offset++;\n      if(m_indices[offset] == inner)\n      {\n        return Map<const BlockScalar> (&(m_values[blockPtr(offset)]), rsize, csize);\n      }\n      else\n//        return BlockScalar::Zero(rsize, csize);\n        eigen_assert(\"NOT YET SUPPORTED\");\n    }\n\n    // Block Matrix times vector product\n    template<typename VecType>\n    BlockSparseTimeDenseProduct<BlockSparseMatrix, VecType> operator*(const VecType& lhs) const\n    {\n      return BlockSparseTimeDenseProduct<BlockSparseMatrix, VecType>(*this, lhs);\n    }\n\n    /** \\returns the number of nonzero blocks */\n    inline Index nonZerosBlocks() const { return m_nonzerosblocks; }\n    /** \\returns the total number of nonzero elements, including eventual explicit zeros in blocks */\n    inline Index nonZeros() const { return m_nonzeros; }\n\n    inline BlockScalarReturnType *valuePtr() {return static_cast<BlockScalarReturnType *>(m_values);}\n//    inline Scalar *valuePtr(){ return m_values; }\n    inline StorageIndex *innerIndexPtr() {return m_indices; }\n    inline const StorageIndex *innerIndexPtr() const {return m_indices; }\n    inline StorageIndex *outerIndexPtr() {return m_outerIndex; }\n    inline const StorageIndex* outerIndexPtr() const {return m_outerIndex; }\n\n    /** \\brief for compatibility purposes with the SparseMatrix class */\n    inline bool isCompressed() const {return true;}\n    /**\n      * \\returns the starting index of the bi row block\n      */\n    inline Index blockRowsIndex(Index bi) const\n    {\n      return IsColMajor ? blockInnerIndex(bi) : blockOuterIndex(bi);\n    }\n\n    /**\n      * \\returns the starting index of the bj col block\n      */\n    inline Index blockColsIndex(Index bj) const\n    {\n      return IsColMajor ? blockOuterIndex(bj) : blockInnerIndex(bj);\n    }\n\n    inline Index blockOuterIndex(Index bj) const\n    {\n      return (m_blockSize == Dynamic) ? m_outerOffset[bj] : (bj * m_blockSize);\n    }\n    inline Index blockInnerIndex(Index bi) const\n    {\n      return (m_blockSize == Dynamic) ? m_innerOffset[bi] : (bi * m_blockSize);\n    }\n\n    // Not needed ???\n    inline Index blockInnerSize(Index bi) const\n    {\n      return (m_blockSize == Dynamic) ? (m_innerOffset[bi+1] - m_innerOffset[bi]) : m_blockSize;\n    }\n    inline Index blockOuterSize(Index bj) const\n    {\n      return (m_blockSize == Dynamic) ? (m_outerOffset[bj+1]- m_outerOffset[bj]) : m_blockSize;\n    }\n\n    /**\n      * \\brief Browse the matrix by outer index\n      */\n    class InnerIterator; // Browse column by column\n\n    /**\n      * \\brief Browse the matrix by block outer index\n      */\n    class BlockInnerIterator; // Browse block by block\n\n    friend std::ostream & operator << (std::ostream & s, const BlockSparseMatrix& m)\n    {\n      for (StorageIndex j = 0; j < m.outerBlocks(); ++j)\n      {\n        BlockInnerIterator itb(m, j);\n        for(; itb; ++itb)\n        {\n          s << \"(\"<<itb.row() << \", \" << itb.col() << \")\\n\";\n          s << itb.value() <<\"\\n\";\n        }\n      }\n      s << std::endl;\n      return s;\n    }\n\n    /**\n      * \\returns the starting position of the block \\p id in the array of values\n      */\n    Index blockPtr(Index id) const\n    {\n      if(m_blockSize == Dynamic) return m_blockPtr[id];\n      else return id * m_blockSize * m_blockSize;\n      //return blockDynIdx(id, typename internal::conditional<(BlockSize==Dynamic), internal::true_type, internal::false_type>::type());\n    }\n\n\n  protected:\n//    inline Index blockDynIdx(Index id, internal::true_type) const\n//    {\n//      return m_blockPtr[id];\n//    }\n//    inline Index blockDynIdx(Index id, internal::false_type) const\n//    {\n//      return id * BlockSize * BlockSize;\n//    }\n\n    // To be implemented\n    // Insert a block at a particular location... need to make a room for that\n    Map<BlockScalar> insert(Index brow, Index bcol);\n\n    Index m_innerBSize; // Number of block rows\n    Index m_outerBSize; // Number of block columns\n    StorageIndex *m_innerOffset; // Starting index of each inner block (size m_innerBSize+1)\n    StorageIndex *m_outerOffset; // Starting index of each outer block (size m_outerBSize+1)\n    Index m_nonzerosblocks; // Total nonzeros blocks (lower than  m_innerBSize x m_outerBSize)\n    Index m_nonzeros; // Total nonzeros elements\n    Scalar *m_values; //Values stored block column after block column (size m_nonzeros)\n    StorageIndex *m_blockPtr; // Pointer to the beginning of each block in m_values, size m_nonzeroblocks ... null for fixed-size blocks\n    StorageIndex *m_indices; //Inner block indices, size m_nonzerosblocks ... OK\n    StorageIndex *m_outerIndex; // Starting pointer of each block column in m_indices (size m_outerBSize)... OK\n    Index m_blockSize; // Size of a block for fixed-size blocks, otherwise -1\n};\n\ntemplate<typename _Scalar, int _BlockAtCompileTime, int _Options, typename _StorageIndex>\nclass BlockSparseMatrix<_Scalar, _BlockAtCompileTime, _Options, _StorageIndex>::BlockInnerIterator\n{\n  public:\n\n    enum{\n      Flags = _Options\n    };\n\n    BlockInnerIterator(const BlockSparseMatrix& mat, const Index outer)\n    : m_mat(mat),m_outer(outer),\n      m_id(mat.m_outerIndex[outer]),\n      m_end(mat.m_outerIndex[outer+1])\n    {\n    }\n\n    inline BlockInnerIterator& operator++() {m_id++; return *this; }\n\n    inline const Map<const BlockScalar> value() const\n    {\n      return Map<const BlockScalar>(&(m_mat.m_values[m_mat.blockPtr(m_id)]),\n          rows(),cols());\n    }\n    inline Map<BlockScalar> valueRef()\n    {\n      return Map<BlockScalar>(&(m_mat.m_values[m_mat.blockPtr(m_id)]),\n          rows(),cols());\n    }\n    // Block inner index\n    inline Index index() const {return m_mat.m_indices[m_id]; }\n    inline Index outer() const { return m_outer; }\n    // block row index\n    inline Index row() const  {return index(); }\n    // block column index\n    inline Index col() const {return outer(); }\n    // FIXME Number of rows in the current block\n    inline Index rows() const { return (m_mat.m_blockSize==Dynamic) ? (m_mat.m_innerOffset[index()+1] - m_mat.m_innerOffset[index()]) : m_mat.m_blockSize; }\n    // Number of columns in the current block ...\n    inline Index cols() const { return (m_mat.m_blockSize==Dynamic) ? (m_mat.m_outerOffset[m_outer+1]-m_mat.m_outerOffset[m_outer]) : m_mat.m_blockSize;}\n    inline operator bool() const { return (m_id < m_end); }\n\n  protected:\n    const BlockSparseMatrix<_Scalar, _BlockAtCompileTime, _Options, StorageIndex>& m_mat;\n    const Index m_outer;\n    Index m_id;\n    Index m_end;\n};\n\ntemplate<typename _Scalar, int _BlockAtCompileTime, int _Options, typename _StorageIndex>\nclass BlockSparseMatrix<_Scalar, _BlockAtCompileTime, _Options, _StorageIndex>::InnerIterator\n{\n  public:\n    InnerIterator(const BlockSparseMatrix& mat, Index outer)\n    : m_mat(mat),m_outerB(mat.outerToBlock(outer)),m_outer(outer),\n      itb(mat, mat.outerToBlock(outer)),\n      m_offset(outer - mat.blockOuterIndex(m_outerB))\n     {\n        if (itb)\n        {\n          m_id = m_mat.blockInnerIndex(itb.index());\n          m_start = m_id;\n          m_end = m_mat.blockInnerIndex(itb.index()+1);\n        }\n     }\n    inline InnerIterator& operator++()\n    {\n      m_id++;\n      if (m_id >= m_end)\n      {\n        ++itb;\n        if (itb)\n        {\n          m_id = m_mat.blockInnerIndex(itb.index());\n          m_start = m_id;\n          m_end = m_mat.blockInnerIndex(itb.index()+1);\n        }\n      }\n      return *this;\n    }\n    inline const Scalar& value() const\n    {\n      return itb.value().coeff(m_id - m_start, m_offset);\n    }\n    inline Scalar& valueRef()\n    {\n      return itb.valueRef().coeff(m_id - m_start, m_offset);\n    }\n    inline Index index() const { return m_id; }\n    inline Index outer() const {return m_outer; }\n    inline Index col() const {return outer(); }\n    inline Index row() const { return index();}\n    inline operator bool() const\n    {\n      return itb;\n    }\n  protected:\n    const BlockSparseMatrix& m_mat;\n    const Index m_outer;\n    const Index m_outerB;\n    BlockInnerIterator itb; // Iterator through the blocks\n    const Index m_offset; // Position of this column in the block\n    Index m_start; // starting inner index of this block\n    Index m_id; // current inner index in the block\n    Index m_end; // starting inner index of the next block\n\n};\n} // end namespace Eigen\n\n#endif // EIGEN_SPARSEBLOCKMATRIX_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/SparseExtra/DynamicSparseMatrix.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_DYNAMIC_SPARSEMATRIX_H\n#define EIGEN_DYNAMIC_SPARSEMATRIX_H\n\nnamespace Eigen { \n\n/** \\deprecated use a SparseMatrix in an uncompressed mode\n  *\n  * \\class DynamicSparseMatrix\n  *\n  * \\brief A sparse matrix class designed for matrix assembly purpose\n  *\n  * \\param _Scalar the scalar type, i.e. the type of the coefficients\n  *\n  * Unlike SparseMatrix, this class provides a much higher degree of flexibility. In particular, it allows\n  * random read/write accesses in log(rho*outer_size) where \\c rho is the probability that a coefficient is\n  * nonzero and outer_size is the number of columns if the matrix is column-major and the number of rows\n  * otherwise.\n  *\n  * Internally, the data are stored as a std::vector of compressed vector. The performances of random writes might\n  * decrease as the number of nonzeros per inner-vector increase. In practice, we observed very good performance\n  * till about 100 nonzeros/vector, and the performance remains relatively good till 500 nonzeros/vectors.\n  *\n  * \\see SparseMatrix\n  */\n\nnamespace internal {\ntemplate<typename _Scalar, int _Options, typename _StorageIndex>\nstruct traits<DynamicSparseMatrix<_Scalar, _Options, _StorageIndex> >\n{\n  typedef _Scalar Scalar;\n  typedef _StorageIndex StorageIndex;\n  typedef Sparse StorageKind;\n  typedef MatrixXpr XprKind;\n  enum {\n    RowsAtCompileTime = Dynamic,\n    ColsAtCompileTime = Dynamic,\n    MaxRowsAtCompileTime = Dynamic,\n    MaxColsAtCompileTime = Dynamic,\n    Flags = _Options | NestByRefBit | LvalueBit,\n    CoeffReadCost = NumTraits<Scalar>::ReadCost,\n    SupportedAccessPatterns = OuterRandomAccessPattern\n  };\n};\n}\n\ntemplate<typename _Scalar, int _Options, typename _StorageIndex>\n class  DynamicSparseMatrix\n  : public SparseMatrixBase<DynamicSparseMatrix<_Scalar, _Options, _StorageIndex> >\n{\n    typedef SparseMatrixBase<DynamicSparseMatrix> Base;\n    using Base::convert_index;\n  public:\n    EIGEN_SPARSE_PUBLIC_INTERFACE(DynamicSparseMatrix)\n    // FIXME: why are these operator already alvailable ???\n    // EIGEN_SPARSE_INHERIT_ASSIGNMENT_OPERATOR(DynamicSparseMatrix, +=)\n    // EIGEN_SPARSE_INHERIT_ASSIGNMENT_OPERATOR(DynamicSparseMatrix, -=)\n    typedef MappedSparseMatrix<Scalar,Flags> Map;\n    using Base::IsRowMajor;\n    using Base::operator=;\n    enum {\n      Options = _Options\n    };\n\n  protected:\n\n    typedef DynamicSparseMatrix<Scalar,(Flags&~RowMajorBit)|(IsRowMajor?RowMajorBit:0), StorageIndex> TransposedSparseMatrix;\n\n    Index m_innerSize;\n    std::vector<internal::CompressedStorage<Scalar,StorageIndex> > m_data;\n\n  public:\n\n    inline Index rows() const { return IsRowMajor ? outerSize() : m_innerSize; }\n    inline Index cols() const { return IsRowMajor ? m_innerSize : outerSize(); }\n    inline Index innerSize() const { return m_innerSize; }\n    inline Index outerSize() const { return convert_index(m_data.size()); }\n    inline Index innerNonZeros(Index j) const { return m_data[j].size(); }\n\n    std::vector<internal::CompressedStorage<Scalar,StorageIndex> >& _data() { return m_data; }\n    const std::vector<internal::CompressedStorage<Scalar,StorageIndex> >& _data() const { return m_data; }\n\n    /** \\returns the coefficient value at given position \\a row, \\a col\n      * This operation involes a log(rho*outer_size) binary search.\n      */\n    inline Scalar coeff(Index row, Index col) const\n    {\n      const Index outer = IsRowMajor ? row : col;\n      const Index inner = IsRowMajor ? col : row;\n      return m_data[outer].at(inner);\n    }\n\n    /** \\returns a reference to the coefficient value at given position \\a row, \\a col\n      * This operation involes a log(rho*outer_size) binary search. If the coefficient does not\n      * exist yet, then a sorted insertion into a sequential buffer is performed.\n      */\n    inline Scalar& coeffRef(Index row, Index col)\n    {\n      const Index outer = IsRowMajor ? row : col;\n      const Index inner = IsRowMajor ? col : row;\n      return m_data[outer].atWithInsertion(inner);\n    }\n\n    class InnerIterator;\n    class ReverseInnerIterator;\n\n    void setZero()\n    {\n      for (Index j=0; j<outerSize(); ++j)\n        m_data[j].clear();\n    }\n\n    /** \\returns the number of non zero coefficients */\n    Index nonZeros() const\n    {\n      Index res = 0;\n      for (Index j=0; j<outerSize(); ++j)\n        res += m_data[j].size();\n      return res;\n    }\n\n\n\n    void reserve(Index reserveSize = 1000)\n    {\n      if (outerSize()>0)\n      {\n        Index reserveSizePerVector = (std::max)(reserveSize/outerSize(),Index(4));\n        for (Index j=0; j<outerSize(); ++j)\n        {\n          m_data[j].reserve(reserveSizePerVector);\n        }\n      }\n    }\n\n    /** Does nothing: provided for compatibility with SparseMatrix */\n    inline void startVec(Index /*outer*/) {}\n\n    /** \\returns a reference to the non zero coefficient at position \\a row, \\a col assuming that:\n      * - the nonzero does not already exist\n      * - the new coefficient is the last one of the given inner vector.\n      *\n      * \\sa insert, insertBackByOuterInner */\n    inline Scalar& insertBack(Index row, Index col)\n    {\n      return insertBackByOuterInner(IsRowMajor?row:col, IsRowMajor?col:row);\n    }\n\n    /** \\sa insertBack */\n    inline Scalar& insertBackByOuterInner(Index outer, Index inner)\n    {\n      eigen_assert(outer<Index(m_data.size()) && inner<m_innerSize && \"out of range\");\n      eigen_assert(((m_data[outer].size()==0) || (m_data[outer].index(m_data[outer].size()-1)<inner))\n                && \"wrong sorted insertion\");\n      m_data[outer].append(0, inner);\n      return m_data[outer].value(m_data[outer].size()-1);\n    }\n\n    inline Scalar& insert(Index row, Index col)\n    {\n      const Index outer = IsRowMajor ? row : col;\n      const Index inner = IsRowMajor ? col : row;\n\n      Index startId = 0;\n      Index id = static_cast<Index>(m_data[outer].size()) - 1;\n      m_data[outer].resize(id+2,1);\n\n      while ( (id >= startId) && (m_data[outer].index(id) > inner) )\n      {\n        m_data[outer].index(id+1) = m_data[outer].index(id);\n        m_data[outer].value(id+1) = m_data[outer].value(id);\n        --id;\n      }\n      m_data[outer].index(id+1) = inner;\n      m_data[outer].value(id+1) = 0;\n      return m_data[outer].value(id+1);\n    }\n\n    /** Does nothing: provided for compatibility with SparseMatrix */\n    inline void finalize() {}\n\n    /** Suppress all nonzeros which are smaller than \\a reference under the tolerance \\a epsilon */\n    void prune(Scalar reference, RealScalar epsilon = NumTraits<RealScalar>::dummy_precision())\n    {\n      for (Index j=0; j<outerSize(); ++j)\n        m_data[j].prune(reference,epsilon);\n    }\n\n    /** Resize the matrix without preserving the data (the matrix is set to zero)\n      */\n    void resize(Index rows, Index cols)\n    {\n      const Index outerSize = IsRowMajor ? rows : cols;\n      m_innerSize = convert_index(IsRowMajor ? cols : rows);\n      setZero();\n      if (Index(m_data.size()) != outerSize)\n      {\n        m_data.resize(outerSize);\n      }\n    }\n\n    void resizeAndKeepData(Index rows, Index cols)\n    {\n      const Index outerSize = IsRowMajor ? rows : cols;\n      const Index innerSize = IsRowMajor ? cols : rows;\n      if (m_innerSize>innerSize)\n      {\n        // remove all coefficients with innerCoord>=innerSize\n        // TODO\n        //std::cerr << \"not implemented yet\\n\";\n        exit(2);\n      }\n      if (m_data.size() != outerSize)\n      {\n        m_data.resize(outerSize);\n      }\n    }\n\n    /** The class DynamicSparseMatrix is deprecated */\n    EIGEN_DEPRECATED inline DynamicSparseMatrix()\n      : m_innerSize(0), m_data(0)\n    {\n      #ifdef EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN\n        EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN\n      #endif\n      eigen_assert(innerSize()==0 && outerSize()==0);\n    }\n\n    /** The class DynamicSparseMatrix is deprecated */\n    EIGEN_DEPRECATED inline DynamicSparseMatrix(Index rows, Index cols)\n      : m_innerSize(0)\n    {\n      #ifdef EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN\n        EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN\n      #endif\n      resize(rows, cols);\n    }\n\n    /** The class DynamicSparseMatrix is deprecated */\n    template<typename OtherDerived>\n    EIGEN_DEPRECATED explicit inline DynamicSparseMatrix(const SparseMatrixBase<OtherDerived>& other)\n      : m_innerSize(0)\n    {\n      #ifdef EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN\n        EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN\n      #endif\n      Base::operator=(other.derived());\n    }\n\n    inline DynamicSparseMatrix(const DynamicSparseMatrix& other)\n      : Base(), m_innerSize(0)\n    {\n      #ifdef EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN\n        EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN\n      #endif\n      *this = other.derived();\n    }\n\n    inline void swap(DynamicSparseMatrix& other)\n    {\n      //EIGEN_DBG_SPARSE(std::cout << \"SparseMatrix:: swap\\n\");\n      std::swap(m_innerSize, other.m_innerSize);\n      //std::swap(m_outerSize, other.m_outerSize);\n      m_data.swap(other.m_data);\n    }\n\n    inline DynamicSparseMatrix& operator=(const DynamicSparseMatrix& other)\n    {\n      if (other.isRValue())\n      {\n        swap(other.const_cast_derived());\n      }\n      else\n      {\n        resize(other.rows(), other.cols());\n        m_data = other.m_data;\n      }\n      return *this;\n    }\n\n    /** Destructor */\n    inline ~DynamicSparseMatrix() {}\n\n  public:\n\n    /** \\deprecated\n      * Set the matrix to zero and reserve the memory for \\a reserveSize nonzero coefficients. */\n    EIGEN_DEPRECATED void startFill(Index reserveSize = 1000)\n    {\n      setZero();\n      reserve(reserveSize);\n    }\n\n    /** \\deprecated use insert()\n      * inserts a nonzero coefficient at given coordinates \\a row, \\a col and returns its reference assuming that:\n      *  1 - the coefficient does not exist yet\n      *  2 - this the coefficient with greater inner coordinate for the given outer coordinate.\n      * In other words, assuming \\c *this is column-major, then there must not exists any nonzero coefficient of coordinates\n      * \\c i \\c x \\a col such that \\c i >= \\a row. Otherwise the matrix is invalid.\n      *\n      * \\see fillrand(), coeffRef()\n      */\n    EIGEN_DEPRECATED Scalar& fill(Index row, Index col)\n    {\n      const Index outer = IsRowMajor ? row : col;\n      const Index inner = IsRowMajor ? col : row;\n      return insertBack(outer,inner);\n    }\n\n    /** \\deprecated use insert()\n      * Like fill() but with random inner coordinates.\n      * Compared to the generic coeffRef(), the unique limitation is that we assume\n      * the coefficient does not exist yet.\n      */\n    EIGEN_DEPRECATED Scalar& fillrand(Index row, Index col)\n    {\n      return insert(row,col);\n    }\n\n    /** \\deprecated use finalize()\n      * Does nothing. Provided for compatibility with SparseMatrix. */\n    EIGEN_DEPRECATED void endFill() {}\n    \n#   ifdef EIGEN_DYNAMICSPARSEMATRIX_PLUGIN\n#     include EIGEN_DYNAMICSPARSEMATRIX_PLUGIN\n#   endif\n };\n\ntemplate<typename Scalar, int _Options, typename _StorageIndex>\nclass DynamicSparseMatrix<Scalar,_Options,_StorageIndex>::InnerIterator : public SparseVector<Scalar,_Options,_StorageIndex>::InnerIterator\n{\n    typedef typename SparseVector<Scalar,_Options,_StorageIndex>::InnerIterator Base;\n  public:\n    InnerIterator(const DynamicSparseMatrix& mat, Index outer)\n      : Base(mat.m_data[outer]), m_outer(outer)\n    {}\n\n    inline Index row() const { return IsRowMajor ? m_outer : Base::index(); }\n    inline Index col() const { return IsRowMajor ? Base::index() : m_outer; }\n    inline Index outer() const { return m_outer; }\n\n  protected:\n    const Index m_outer;\n};\n\ntemplate<typename Scalar, int _Options, typename _StorageIndex>\nclass DynamicSparseMatrix<Scalar,_Options,_StorageIndex>::ReverseInnerIterator : public SparseVector<Scalar,_Options,_StorageIndex>::ReverseInnerIterator\n{\n    typedef typename SparseVector<Scalar,_Options,_StorageIndex>::ReverseInnerIterator Base;\n  public:\n    ReverseInnerIterator(const DynamicSparseMatrix& mat, Index outer)\n      : Base(mat.m_data[outer]), m_outer(outer)\n    {}\n\n    inline Index row() const { return IsRowMajor ? m_outer : Base::index(); }\n    inline Index col() const { return IsRowMajor ? Base::index() : m_outer; }\n    inline Index outer() const { return m_outer; }\n\n  protected:\n    const Index m_outer;\n};\n\nnamespace internal {\n\ntemplate<typename _Scalar, int _Options, typename _StorageIndex>\nstruct evaluator<DynamicSparseMatrix<_Scalar,_Options,_StorageIndex> >\n  : evaluator_base<DynamicSparseMatrix<_Scalar,_Options,_StorageIndex> >\n{\n  typedef _Scalar Scalar;\n  typedef DynamicSparseMatrix<_Scalar,_Options,_StorageIndex> SparseMatrixType;\n  typedef typename SparseMatrixType::InnerIterator InnerIterator;\n  typedef typename SparseMatrixType::ReverseInnerIterator ReverseInnerIterator;\n  \n  enum {\n    CoeffReadCost = NumTraits<_Scalar>::ReadCost,\n    Flags = SparseMatrixType::Flags\n  };\n  \n  evaluator() : m_matrix(0) {}\n  evaluator(const SparseMatrixType &mat) : m_matrix(&mat) {}\n  \n  operator SparseMatrixType&() { return m_matrix->const_cast_derived(); }\n  operator const SparseMatrixType&() const { return *m_matrix; }\n  \n  Scalar coeff(Index row, Index col) const { return m_matrix->coeff(row,col); }\n  \n  Index nonZerosEstimate() const { return m_matrix->nonZeros(); }\n\n  const SparseMatrixType *m_matrix;\n};\n\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_DYNAMIC_SPARSEMATRIX_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/SparseExtra/MarketIO.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2011 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2012 Desire NUENTSA WAKAM <desire.nuentsa_wakam@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPARSE_MARKET_IO_H\n#define EIGEN_SPARSE_MARKET_IO_H\n\n#include <iostream>\n#include <vector>\n\nnamespace Eigen { \n\nnamespace internal \n{\n  template <typename Scalar, typename StorageIndex>\n  inline void GetMarketLine (const char* line, StorageIndex& i, StorageIndex& j, Scalar& value)\n  {\n    std::stringstream sline(line);\n    sline >> i >> j >> value;\n  }\n\n  template<> inline void GetMarketLine (const char* line, int& i, int& j, float& value)\n  { std::sscanf(line, \"%d %d %g\", &i, &j, &value); }\n\n  template<> inline void GetMarketLine (const char* line, int& i, int& j, double& value)\n  { std::sscanf(line, \"%d %d %lg\", &i, &j, &value); }\n\n  template<> inline void GetMarketLine (const char* line, int& i, int& j, std::complex<float>& value)\n  { std::sscanf(line, \"%d %d %g %g\", &i, &j, &numext::real_ref(value), &numext::imag_ref(value)); }\n\n  template<> inline void GetMarketLine (const char* line, int& i, int& j, std::complex<double>& value)\n  { std::sscanf(line, \"%d %d %lg %lg\", &i, &j, &numext::real_ref(value), &numext::imag_ref(value)); }\n\n  template <typename Scalar, typename StorageIndex>\n  inline void GetMarketLine (const char* line, StorageIndex& i, StorageIndex& j, std::complex<Scalar>& value)\n  {\n    std::stringstream sline(line);\n    Scalar valR, valI;\n    sline >> i >> j >> valR >> valI;\n    value = std::complex<Scalar>(valR,valI);\n  }\n\n  template <typename RealScalar>\n  inline void  GetVectorElt (const std::string& line, RealScalar& val)\n  {\n    std::istringstream newline(line);\n    newline >> val;  \n  }\n\n  template <typename RealScalar>\n  inline void GetVectorElt (const std::string& line, std::complex<RealScalar>& val)\n  {\n    RealScalar valR, valI; \n    std::istringstream newline(line);\n    newline >> valR >> valI; \n    val = std::complex<RealScalar>(valR, valI);\n  }\n  \n  template<typename Scalar>\n  inline void putMarketHeader(std::string& header,int sym)\n  {\n    header= \"%%MatrixMarket matrix coordinate \";\n    if(internal::is_same<Scalar, std::complex<float> >::value || internal::is_same<Scalar, std::complex<double> >::value)\n    {\n      header += \" complex\"; \n      if(sym == Symmetric) header += \" symmetric\";\n      else if (sym == SelfAdjoint) header += \" Hermitian\";\n      else header += \" general\";\n    }\n    else\n    {\n      header += \" real\"; \n      if(sym == Symmetric) header += \" symmetric\";\n      else header += \" general\";\n    }\n  }\n\n  template<typename Scalar, typename StorageIndex>\n  inline void PutMatrixElt(Scalar value, StorageIndex row, StorageIndex col, std::ofstream& out)\n  {\n    out << row << \" \"<< col << \" \" << value << \"\\n\";\n  }\n  template<typename Scalar, typename StorageIndex>\n  inline void PutMatrixElt(std::complex<Scalar> value, StorageIndex row, StorageIndex col, std::ofstream& out)\n  {\n    out << row << \" \" << col << \" \" << value.real() << \" \" << value.imag() << \"\\n\";\n  }\n\n\n  template<typename Scalar>\n  inline void putVectorElt(Scalar value, std::ofstream& out)\n  {\n    out << value << \"\\n\"; \n  }\n  template<typename Scalar>\n  inline void putVectorElt(std::complex<Scalar> value, std::ofstream& out)\n  {\n    out << value.real << \" \" << value.imag()<< \"\\n\"; \n  }\n\n} // end namespace internal\n\ninline bool getMarketHeader(const std::string& filename, int& sym, bool& iscomplex, bool& isvector)\n{\n  sym = 0; \n  iscomplex = false;\n  isvector = false;\n  std::ifstream in(filename.c_str(),std::ios::in);\n  if(!in)\n    return false;\n  \n  std::string line; \n  // The matrix header is always the first line in the file \n  std::getline(in, line); eigen_assert(in.good());\n  \n  std::stringstream fmtline(line); \n  std::string substr[5];\n  fmtline>> substr[0] >> substr[1] >> substr[2] >> substr[3] >> substr[4];\n  if(substr[2].compare(\"array\") == 0) isvector = true;\n  if(substr[3].compare(\"complex\") == 0) iscomplex = true;\n  if(substr[4].compare(\"symmetric\") == 0) sym = Symmetric;\n  else if (substr[4].compare(\"Hermitian\") == 0) sym = SelfAdjoint;\n  \n  return true;\n}\n  \ntemplate<typename SparseMatrixType>\nbool loadMarket(SparseMatrixType& mat, const std::string& filename)\n{\n  typedef typename SparseMatrixType::Scalar Scalar;\n  typedef typename SparseMatrixType::StorageIndex StorageIndex;\n  std::ifstream input(filename.c_str(),std::ios::in);\n  if(!input)\n    return false;\n\n  char rdbuffer[4096];\n  input.rdbuf()->pubsetbuf(rdbuffer, 4096);\n  \n  const int maxBuffersize = 2048;\n  char buffer[maxBuffersize];\n  \n  bool readsizes = false;\n\n  typedef Triplet<Scalar,StorageIndex> T;\n  std::vector<T> elements;\n  \n  Index M(-1), N(-1), NNZ(-1);\n  Index count = 0;\n  while(input.getline(buffer, maxBuffersize))\n  {\n    // skip comments   \n    //NOTE An appropriate test should be done on the header to get the  symmetry\n    if(buffer[0]=='%')\n      continue;\n\n    if(!readsizes)\n    {\n      std::stringstream line(buffer);\n      line >> M >> N >> NNZ;\n      if(M > 0 && N > 0)\n      {\n        readsizes = true;\n        mat.resize(M,N);\n        mat.reserve(NNZ);\n      }\n    }\n    else\n    { \n      StorageIndex i(-1), j(-1);\n      Scalar value; \n      internal::GetMarketLine(buffer, i, j, value);\n\n      i--;\n      j--;\n      if(i>=0 && j>=0 && i<M && j<N)\n      {\n        ++count;\n        elements.push_back(T(i,j,value));\n      }\n      else\n        std::cerr << \"Invalid read: \" << i << \",\" << j << \"\\n\";        \n    }\n  }\n\n  mat.setFromTriplets(elements.begin(), elements.end());\n  if(count!=NNZ)\n    std::cerr << count << \"!=\" << NNZ << \"\\n\";\n  \n  input.close();\n  return true;\n}\n\ntemplate<typename VectorType>\nbool loadMarketVector(VectorType& vec, const std::string& filename)\n{\n   typedef typename VectorType::Scalar Scalar;\n  std::ifstream in(filename.c_str(), std::ios::in);\n  if(!in)\n    return false;\n  \n  std::string line; \n  int n(0), col(0); \n  do \n  { // Skip comments\n    std::getline(in, line); eigen_assert(in.good());\n  } while (line[0] == '%');\n  std::istringstream newline(line);\n  newline  >> n >> col; \n  eigen_assert(n>0 && col>0);\n  vec.resize(n);\n  int i = 0; \n  Scalar value; \n  while ( std::getline(in, line) && (i < n) ){\n    internal::GetVectorElt(line, value); \n    vec(i++) = value; \n  }\n  in.close();\n  if (i!=n){\n    std::cerr<< \"Unable to read all elements from file \" << filename << \"\\n\";\n    return false;\n  }\n  return true;\n}\n\ntemplate<typename SparseMatrixType>\nbool saveMarket(const SparseMatrixType& mat, const std::string& filename, int sym = 0)\n{\n  typedef typename SparseMatrixType::Scalar Scalar;\n  typedef typename SparseMatrixType::RealScalar RealScalar;\n  std::ofstream out(filename.c_str(),std::ios::out);\n  if(!out)\n    return false;\n  \n  out.flags(std::ios_base::scientific);\n  out.precision(std::numeric_limits<RealScalar>::digits10 + 2);\n  std::string header; \n  internal::putMarketHeader<Scalar>(header, sym); \n  out << header << std::endl; \n  out << mat.rows() << \" \" << mat.cols() << \" \" << mat.nonZeros() << \"\\n\";\n  int count = 0;\n  for(int j=0; j<mat.outerSize(); ++j)\n    for(typename SparseMatrixType::InnerIterator it(mat,j); it; ++it)\n    {\n      ++ count;\n      internal::PutMatrixElt(it.value(), it.row()+1, it.col()+1, out);\n    }\n  out.close();\n  return true;\n}\n\ntemplate<typename VectorType>\nbool saveMarketVector (const VectorType& vec, const std::string& filename)\n{\n typedef typename VectorType::Scalar Scalar;\n typedef typename VectorType::RealScalar RealScalar;\n std::ofstream out(filename.c_str(),std::ios::out);\n  if(!out)\n    return false;\n  \n  out.flags(std::ios_base::scientific);\n  out.precision(std::numeric_limits<RealScalar>::digits10 + 2);\n  if(internal::is_same<Scalar, std::complex<float> >::value || internal::is_same<Scalar, std::complex<double> >::value)\n      out << \"%%MatrixMarket matrix array complex general\\n\"; \n  else\n    out << \"%%MatrixMarket matrix array real general\\n\"; \n  out << vec.size() << \" \"<< 1 << \"\\n\";\n  for (int i=0; i < vec.size(); i++){\n    internal::putVectorElt(vec(i), out); \n  }\n  out.close();\n  return true; \n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_SPARSE_MARKET_IO_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/SparseExtra/MatrixMarketIterator.h",
    "content": "\n// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Desire NUENTSA WAKAM <desire.nuentsa_wakam@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_BROWSE_MATRICES_H\n#define EIGEN_BROWSE_MATRICES_H\n\nnamespace Eigen {\n\nenum {\n  SPD = 0x100,\n  NonSymmetric = 0x0\n}; \n\n/** \n * @brief Iterator to browse matrices from a specified folder\n * \n * This is used to load all the matrices from a folder. \n * The matrices should be in Matrix Market format\n * It is assumed that the matrices are named as matname.mtx\n * and matname_SPD.mtx if the matrix is Symmetric and positive definite (or Hermitian)\n * The right hand side vectors are loaded as well, if they exist.\n * They should be named as matname_b.mtx. \n * Note that the right hand side for a SPD matrix is named as matname_SPD_b.mtx\n * \n * Sometimes a reference solution is available. In this case, it should be named as matname_x.mtx\n * \n * Sample code\n * \\code\n * \n * \\endcode\n * \n * \\tparam Scalar The scalar type \n */\ntemplate <typename Scalar>\nclass MatrixMarketIterator \n{\n    typedef typename NumTraits<Scalar>::Real RealScalar;\n  public:\n    typedef Matrix<Scalar,Dynamic,1> VectorType; \n    typedef SparseMatrix<Scalar,ColMajor> MatrixType; \n  \n  public:\n    MatrixMarketIterator(const std::string &folder)\n      : m_sym(0), m_isvalid(false), m_matIsLoaded(false), m_hasRhs(false), m_hasrefX(false), m_folder(folder)\n    {\n      m_folder_id = opendir(folder.c_str());\n      if(m_folder_id)\n        Getnextvalidmatrix();\n    }\n    \n    ~MatrixMarketIterator()\n    {\n      if (m_folder_id) closedir(m_folder_id); \n    }\n    \n    inline MatrixMarketIterator& operator++()\n    {\n      m_matIsLoaded = false;\n      m_hasrefX = false;\n      m_hasRhs = false;\n      Getnextvalidmatrix();\n      return *this;\n    }\n    inline operator bool() const { return m_isvalid;}\n    \n    /** Return the sparse matrix corresponding to the current file */\n    inline MatrixType& matrix() \n    { \n      // Read the matrix\n      if (m_matIsLoaded) return m_mat;\n      \n      std::string matrix_file = m_folder + \"/\" + m_matname + \".mtx\";\n      if ( !loadMarket(m_mat, matrix_file)) \n      {\n        std::cerr << \"Warning loadMarket failed when loading \\\"\" << matrix_file << \"\\\"\" << std::endl;\n        m_matIsLoaded = false;\n        return m_mat;\n      }\n      m_matIsLoaded = true; \n\n      if (m_sym != NonSymmetric) \n      {\n        // Check whether we need to restore a full matrix:\n        RealScalar diag_norm  = m_mat.diagonal().norm();\n        RealScalar lower_norm = m_mat.template triangularView<Lower>().norm();\n        RealScalar upper_norm = m_mat.template triangularView<Upper>().norm();\n        if(lower_norm>diag_norm && upper_norm==diag_norm)\n        {\n          // only the lower part is stored\n          MatrixType tmp(m_mat);\n          m_mat = tmp.template selfadjointView<Lower>();\n        }\n        else if(upper_norm>diag_norm && lower_norm==diag_norm)\n        {\n          // only the upper part is stored\n          MatrixType tmp(m_mat);\n          m_mat = tmp.template selfadjointView<Upper>();\n        }\n      }\n      return m_mat; \n    }\n    \n    /** Return the right hand side corresponding to the current matrix. \n     * If the rhs file is not provided, a random rhs is generated\n     */\n    inline VectorType& rhs() \n    { \n       // Get the right hand side\n      if (m_hasRhs) return m_rhs;\n      \n      std::string rhs_file;\n      rhs_file = m_folder + \"/\" + m_matname + \"_b.mtx\"; // The pattern is matname_b.mtx\n      m_hasRhs = Fileexists(rhs_file);\n      if (m_hasRhs)\n      {\n        m_rhs.resize(m_mat.cols());\n        m_hasRhs = loadMarketVector(m_rhs, rhs_file);\n      }\n      if (!m_hasRhs)\n      {\n        // Generate a random right hand side\n        if (!m_matIsLoaded) this->matrix(); \n        m_refX.resize(m_mat.cols());\n        m_refX.setRandom();\n        m_rhs = m_mat * m_refX;\n        m_hasrefX = true;\n        m_hasRhs = true;\n      }\n      return m_rhs; \n    }\n    \n    /** Return a reference solution\n     * If it is not provided and if the right hand side is not available\n     * then refX is randomly generated such that A*refX = b \n     * where A and b are the matrix and the rhs. \n     * Note that when a rhs is provided, refX is not available \n     */\n    inline VectorType& refX() \n    { \n      // Check if a reference solution is provided\n      if (m_hasrefX) return m_refX;\n      \n      std::string lhs_file;\n      lhs_file = m_folder + \"/\" + m_matname + \"_x.mtx\"; \n      m_hasrefX = Fileexists(lhs_file);\n      if (m_hasrefX)\n      {\n        m_refX.resize(m_mat.cols());\n        m_hasrefX = loadMarketVector(m_refX, lhs_file);\n      }\n      else\n        m_refX.resize(0);\n      return m_refX; \n    }\n    \n    inline std::string& matname() { return m_matname; }\n    \n    inline int sym() { return m_sym; }\n    \n    bool hasRhs() {return m_hasRhs; }\n    bool hasrefX() {return m_hasrefX; }\n    bool isFolderValid() { return bool(m_folder_id); }\n    \n  protected:\n    \n    inline bool Fileexists(std::string file)\n    {\n      std::ifstream file_id(file.c_str());\n      if (!file_id.good() ) \n      {\n        return false;\n      }\n      else \n      {\n        file_id.close();\n        return true;\n      }\n    }\n    \n    void Getnextvalidmatrix( )\n    {\n      m_isvalid = false;\n      // Here, we return with the next valid matrix in the folder\n      while ( (m_curs_id = readdir(m_folder_id)) != NULL) {\n        m_isvalid = false;\n        std::string curfile;\n        curfile = m_folder + \"/\" + m_curs_id->d_name;\n        // Discard if it is a folder\n        if (m_curs_id->d_type == DT_DIR) continue; //FIXME This may not be available on non BSD systems\n//         struct stat st_buf; \n//         stat (curfile.c_str(), &st_buf);\n//         if (S_ISDIR(st_buf.st_mode)) continue;\n        \n        // Determine from the header if it is a matrix or a right hand side \n        bool isvector,iscomplex=false;\n        if(!getMarketHeader(curfile,m_sym,iscomplex,isvector)) continue;\n        if(isvector) continue;\n        if (!iscomplex)\n        {\n          if(internal::is_same<Scalar, std::complex<float> >::value || internal::is_same<Scalar, std::complex<double> >::value)\n            continue; \n        }\n        if (iscomplex)\n        {\n          if(internal::is_same<Scalar, float>::value || internal::is_same<Scalar, double>::value)\n            continue; \n        }\n        \n        \n        // Get the matrix name\n        std::string filename = m_curs_id->d_name;\n        m_matname = filename.substr(0, filename.length()-4); \n        \n        // Find if the matrix is SPD \n        size_t found = m_matname.find(\"SPD\");\n        if( (found!=std::string::npos) && (m_sym != NonSymmetric) )\n          m_sym = SPD;\n       \n        m_isvalid = true;\n        break; \n      }\n    }\n    int m_sym; // Symmetry of the matrix\n    MatrixType m_mat; // Current matrix  \n    VectorType m_rhs;  // Current vector\n    VectorType m_refX; // The reference solution, if exists\n    std::string m_matname; // Matrix Name\n    bool m_isvalid; \n    bool m_matIsLoaded; // Determine if the matrix has already been loaded from the file\n    bool m_hasRhs; // The right hand side exists\n    bool m_hasrefX; // A reference solution is provided\n    std::string m_folder;\n    DIR * m_folder_id;\n    struct dirent *m_curs_id; \n    \n};\n\n} // end namespace Eigen\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/SparseExtra/RandomSetter.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_RANDOMSETTER_H\n#define EIGEN_RANDOMSETTER_H\n\nnamespace Eigen { \n\n/** Represents a std::map\n  *\n  * \\see RandomSetter\n  */\ntemplate<typename Scalar> struct StdMapTraits\n{\n  typedef int KeyType;\n  typedef std::map<KeyType,Scalar> Type;\n  enum {\n    IsSorted = 1\n  };\n\n  static void setInvalidKey(Type&, const KeyType&) {}\n};\n\n#ifdef EIGEN_UNORDERED_MAP_SUPPORT\n/** Represents a std::unordered_map\n  *\n  * To use it you need to both define EIGEN_UNORDERED_MAP_SUPPORT and include the unordered_map header file\n  * yourself making sure that unordered_map is defined in the std namespace.\n  *\n  * For instance, with current version of gcc you can either enable C++0x standard (-std=c++0x) or do:\n  * \\code\n  * #include <tr1/unordered_map>\n  * #define EIGEN_UNORDERED_MAP_SUPPORT\n  * namespace std {\n  *   using std::tr1::unordered_map;\n  * }\n  * \\endcode\n  *\n  * \\see RandomSetter\n  */\ntemplate<typename Scalar> struct StdUnorderedMapTraits\n{\n  typedef int KeyType;\n  typedef std::unordered_map<KeyType,Scalar> Type;\n  enum {\n    IsSorted = 0\n  };\n\n  static void setInvalidKey(Type&, const KeyType&) {}\n};\n#endif // EIGEN_UNORDERED_MAP_SUPPORT\n\n#ifdef _DENSE_HASH_MAP_H_\n/** Represents a google::dense_hash_map\n  *\n  * \\see RandomSetter\n  */\ntemplate<typename Scalar> struct GoogleDenseHashMapTraits\n{\n  typedef int KeyType;\n  typedef google::dense_hash_map<KeyType,Scalar> Type;\n  enum {\n    IsSorted = 0\n  };\n\n  static void setInvalidKey(Type& map, const KeyType& k)\n  { map.set_empty_key(k); }\n};\n#endif\n\n#ifdef _SPARSE_HASH_MAP_H_\n/** Represents a google::sparse_hash_map\n  *\n  * \\see RandomSetter\n  */\ntemplate<typename Scalar> struct GoogleSparseHashMapTraits\n{\n  typedef int KeyType;\n  typedef google::sparse_hash_map<KeyType,Scalar> Type;\n  enum {\n    IsSorted = 0\n  };\n\n  static void setInvalidKey(Type&, const KeyType&) {}\n};\n#endif\n\n/** \\class RandomSetter\n  *\n  * \\brief The RandomSetter is a wrapper object allowing to set/update a sparse matrix with random access\n  *\n  * \\tparam SparseMatrixType the type of the sparse matrix we are updating\n  * \\tparam MapTraits a traits class representing the map implementation used for the temporary sparse storage.\n  *                  Its default value depends on the system.\n  * \\tparam OuterPacketBits defines the number of rows (or columns) manage by a single map object\n  *                        as a power of two exponent.\n  *\n  * This class temporarily represents a sparse matrix object using a generic map implementation allowing for\n  * efficient random access. The conversion from the compressed representation to a hash_map object is performed\n  * in the RandomSetter constructor, while the sparse matrix is updated back at destruction time. This strategy\n  * suggest the use of nested blocks as in this example:\n  *\n  * \\code\n  * SparseMatrix<double> m(rows,cols);\n  * {\n  *   RandomSetter<SparseMatrix<double> > w(m);\n  *   // don't use m but w instead with read/write random access to the coefficients:\n  *   for(;;)\n  *     w(rand(),rand()) = rand;\n  * }\n  * // when w is deleted, the data are copied back to m\n  * // and m is ready to use.\n  * \\endcode\n  *\n  * Since hash_map objects are not fully sorted, representing a full matrix as a single hash_map would\n  * involve a big and costly sort to update the compressed matrix back. To overcome this issue, a RandomSetter\n  * use multiple hash_map, each representing 2^OuterPacketBits columns or rows according to the storage order.\n  * To reach optimal performance, this value should be adjusted according to the average number of nonzeros\n  * per rows/columns.\n  *\n  * The possible values for the template parameter MapTraits are:\n  *  - \\b StdMapTraits: corresponds to std::map. (does not perform very well)\n  *  - \\b GnuHashMapTraits: corresponds to __gnu_cxx::hash_map (available only with GCC)\n  *  - \\b GoogleDenseHashMapTraits: corresponds to google::dense_hash_map (best efficiency, reasonable memory consumption)\n  *  - \\b GoogleSparseHashMapTraits: corresponds to google::sparse_hash_map (best memory consumption, relatively good performance)\n  *\n  * The default map implementation depends on the availability, and the preferred order is:\n  * GoogleSparseHashMapTraits, GnuHashMapTraits, and finally StdMapTraits.\n  *\n  * For performance and memory consumption reasons it is highly recommended to use one of\n  * the Google's hash_map implementation. To enable the support for them, you have two options:\n  *  - \\#include <google/dense_hash_map> yourself \\b before Eigen/Sparse header\n  *  - define EIGEN_GOOGLEHASH_SUPPORT\n  * In the later case the inclusion of <google/dense_hash_map> is made for you.\n  *\n  * \\see http://code.google.com/p/google-sparsehash/\n  */\ntemplate<typename SparseMatrixType,\n         template <typename T> class MapTraits =\n#if defined _DENSE_HASH_MAP_H_\n          GoogleDenseHashMapTraits\n#elif defined _HASH_MAP\n          GnuHashMapTraits\n#else\n          StdMapTraits\n#endif\n         ,int OuterPacketBits = 6>\nclass RandomSetter\n{\n    typedef typename SparseMatrixType::Scalar Scalar;\n    typedef typename SparseMatrixType::StorageIndex StorageIndex;\n\n    struct ScalarWrapper\n    {\n      ScalarWrapper() : value(0) {}\n      Scalar value;\n    };\n    typedef typename MapTraits<ScalarWrapper>::KeyType KeyType;\n    typedef typename MapTraits<ScalarWrapper>::Type HashMapType;\n    static const int OuterPacketMask = (1 << OuterPacketBits) - 1;\n    enum {\n      SwapStorage = 1 - MapTraits<ScalarWrapper>::IsSorted,\n      TargetRowMajor = (SparseMatrixType::Flags & RowMajorBit) ? 1 : 0,\n      SetterRowMajor = SwapStorage ? 1-TargetRowMajor : TargetRowMajor\n    };\n\n  public:\n\n    /** Constructs a random setter object from the sparse matrix \\a target\n      *\n      * Note that the initial value of \\a target are imported. If you want to re-set\n      * a sparse matrix from scratch, then you must set it to zero first using the\n      * setZero() function.\n      */\n    inline RandomSetter(SparseMatrixType& target)\n      : mp_target(&target)\n    {\n      const Index outerSize = SwapStorage ? target.innerSize() : target.outerSize();\n      const Index innerSize = SwapStorage ? target.outerSize() : target.innerSize();\n      m_outerPackets = outerSize >> OuterPacketBits;\n      if (outerSize&OuterPacketMask)\n        m_outerPackets += 1;\n      m_hashmaps = new HashMapType[m_outerPackets];\n      // compute number of bits needed to store inner indices\n      Index aux = innerSize - 1;\n      m_keyBitsOffset = 0;\n      while (aux)\n      {\n        ++m_keyBitsOffset;\n        aux = aux >> 1;\n      }\n      KeyType ik = (1<<(OuterPacketBits+m_keyBitsOffset));\n      for (Index k=0; k<m_outerPackets; ++k)\n        MapTraits<ScalarWrapper>::setInvalidKey(m_hashmaps[k],ik);\n\n      // insert current coeffs\n      for (Index j=0; j<mp_target->outerSize(); ++j)\n        for (typename SparseMatrixType::InnerIterator it(*mp_target,j); it; ++it)\n          (*this)(TargetRowMajor?j:it.index(), TargetRowMajor?it.index():j) = it.value();\n    }\n\n    /** Destructor updating back the sparse matrix target */\n    ~RandomSetter()\n    {\n      KeyType keyBitsMask = (1<<m_keyBitsOffset)-1;\n      if (!SwapStorage) // also means the map is sorted\n      {\n        mp_target->setZero();\n        mp_target->makeCompressed();\n        mp_target->reserve(nonZeros());\n        Index prevOuter = -1;\n        for (Index k=0; k<m_outerPackets; ++k)\n        {\n          const Index outerOffset = (1<<OuterPacketBits) * k;\n          typename HashMapType::iterator end = m_hashmaps[k].end();\n          for (typename HashMapType::iterator it = m_hashmaps[k].begin(); it!=end; ++it)\n          {\n            const Index outer = (it->first >> m_keyBitsOffset) + outerOffset;\n            const Index inner = it->first & keyBitsMask;\n            if (prevOuter!=outer)\n            {\n              for (Index j=prevOuter+1;j<=outer;++j)\n                mp_target->startVec(j);\n              prevOuter = outer;\n            }\n            mp_target->insertBackByOuterInner(outer, inner) = it->second.value;\n          }\n        }\n        mp_target->finalize();\n      }\n      else\n      {\n        VectorXi positions(mp_target->outerSize());\n        positions.setZero();\n        // pass 1\n        for (Index k=0; k<m_outerPackets; ++k)\n        {\n          typename HashMapType::iterator end = m_hashmaps[k].end();\n          for (typename HashMapType::iterator it = m_hashmaps[k].begin(); it!=end; ++it)\n          {\n            const Index outer = it->first & keyBitsMask;\n            ++positions[outer];\n          }\n        }\n        // prefix sum\n        StorageIndex count = 0;\n        for (Index j=0; j<mp_target->outerSize(); ++j)\n        {\n          StorageIndex tmp = positions[j];\n          mp_target->outerIndexPtr()[j] = count;\n          positions[j] = count;\n          count += tmp;\n        }\n        mp_target->makeCompressed();\n        mp_target->outerIndexPtr()[mp_target->outerSize()] = count;\n        mp_target->resizeNonZeros(count);\n        // pass 2\n        for (Index k=0; k<m_outerPackets; ++k)\n        {\n          const Index outerOffset = (1<<OuterPacketBits) * k;\n          typename HashMapType::iterator end = m_hashmaps[k].end();\n          for (typename HashMapType::iterator it = m_hashmaps[k].begin(); it!=end; ++it)\n          {\n            const Index inner = (it->first >> m_keyBitsOffset) + outerOffset;\n            const Index outer = it->first & keyBitsMask;\n            // sorted insertion\n            // Note that we have to deal with at most 2^OuterPacketBits unsorted coefficients,\n            // moreover those 2^OuterPacketBits coeffs are likely to be sparse, an so only a\n            // small fraction of them have to be sorted, whence the following simple procedure:\n            Index posStart = mp_target->outerIndexPtr()[outer];\n            Index i = (positions[outer]++) - 1;\n            while ( (i >= posStart) && (mp_target->innerIndexPtr()[i] > inner) )\n            {\n              mp_target->valuePtr()[i+1] = mp_target->valuePtr()[i];\n              mp_target->innerIndexPtr()[i+1] = mp_target->innerIndexPtr()[i];\n              --i;\n            }\n            mp_target->innerIndexPtr()[i+1] = internal::convert_index<StorageIndex>(inner);\n            mp_target->valuePtr()[i+1] = it->second.value;\n          }\n        }\n      }\n      delete[] m_hashmaps;\n    }\n\n    /** \\returns a reference to the coefficient at given coordinates \\a row, \\a col */\n    Scalar& operator() (Index row, Index col)\n    {\n      const Index outer = SetterRowMajor ? row : col;\n      const Index inner = SetterRowMajor ? col : row;\n      const Index outerMajor = outer >> OuterPacketBits; // index of the packet/map\n      const Index outerMinor = outer & OuterPacketMask;  // index of the inner vector in the packet\n      const KeyType key = internal::convert_index<KeyType>((outerMinor<<m_keyBitsOffset) | inner);\n      return m_hashmaps[outerMajor][key].value;\n    }\n\n    /** \\returns the number of non zero coefficients\n      *\n      * \\note According to the underlying map/hash_map implementation,\n      * this function might be quite expensive.\n      */\n    Index nonZeros() const\n    {\n      Index nz = 0;\n      for (Index k=0; k<m_outerPackets; ++k)\n        nz += static_cast<Index>(m_hashmaps[k].size());\n      return nz;\n    }\n\n\n  protected:\n\n    HashMapType* m_hashmaps;\n    SparseMatrixType* mp_target;\n    Index m_outerPackets;\n    unsigned char m_keyBitsOffset;\n};\n\n} // end namespace Eigen\n\n#endif // EIGEN_RANDOMSETTER_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/SpecialFunctions/BesselFunctionsArrayAPI.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n\n#ifndef EIGEN_BESSELFUNCTIONS_ARRAYAPI_H\n#define EIGEN_BESSELFUNCTIONS_ARRAYAPI_H\n\nnamespace Eigen {\n\n/** \\returns an expression of the coefficient-wise i0(\\a x) to the given\n * arrays.\n  *\n  * It returns the modified Bessel function of the first kind of order zero.\n  *\n  * \\param x is the argument\n  *\n  * \\note This function supports only float and double scalar types. To support\n  * other scalar types, the user has to provide implementations of i0(T) for\n  * any scalar type T to be supported.\n  *\n  * \\sa ArrayBase::bessel_i0()\n  */\ntemplate <typename Derived>\nEIGEN_STRONG_INLINE const Eigen::CwiseUnaryOp<\n    Eigen::internal::scalar_bessel_i0_op<typename Derived::Scalar>, const Derived>\nbessel_i0(const Eigen::ArrayBase<Derived>& x) {\n  return Eigen::CwiseUnaryOp<\n      Eigen::internal::scalar_bessel_i0_op<typename Derived::Scalar>,\n      const Derived>(x.derived());\n}\n\n/** \\returns an expression of the coefficient-wise i0e(\\a x) to the given\n * arrays.\n  *\n  * It returns the exponentially scaled modified Bessel\n  * function of the first kind of order zero.\n  *\n  * \\param x is the argument\n  *\n  * \\note This function supports only float and double scalar types. To support\n  * other scalar types, the user has to provide implementations of i0e(T) for\n  * any scalar type T to be supported.\n  *\n  * \\sa ArrayBase::bessel_i0e()\n  */\ntemplate <typename Derived>\nEIGEN_STRONG_INLINE const Eigen::CwiseUnaryOp<\n    Eigen::internal::scalar_bessel_i0e_op<typename Derived::Scalar>, const Derived>\nbessel_i0e(const Eigen::ArrayBase<Derived>& x) {\n  return Eigen::CwiseUnaryOp<\n      Eigen::internal::scalar_bessel_i0e_op<typename Derived::Scalar>,\n      const Derived>(x.derived());\n}\n\n/** \\returns an expression of the coefficient-wise i1(\\a x) to the given\n * arrays.\n  *\n  * It returns the modified Bessel function of the first kind of order one.\n  *\n  * \\param x is the argument\n  *\n  * \\note This function supports only float and double scalar types. To support\n  * other scalar types, the user has to provide implementations of i1(T) for\n  * any scalar type T to be supported.\n  *\n  * \\sa ArrayBase::bessel_i1()\n  */\ntemplate <typename Derived>\nEIGEN_STRONG_INLINE const Eigen::CwiseUnaryOp<\n    Eigen::internal::scalar_bessel_i1_op<typename Derived::Scalar>, const Derived>\nbessel_i1(const Eigen::ArrayBase<Derived>& x) {\n  return Eigen::CwiseUnaryOp<\n      Eigen::internal::scalar_bessel_i1_op<typename Derived::Scalar>,\n      const Derived>(x.derived());\n}\n\n/** \\returns an expression of the coefficient-wise i1e(\\a x) to the given\n * arrays.\n  *\n  * It returns the exponentially scaled modified Bessel\n  * function of the first kind of order one.\n  *\n  * \\param x is the argument\n  *\n  * \\note This function supports only float and double scalar types. To support\n  * other scalar types, the user has to provide implementations of i1e(T) for\n  * any scalar type T to be supported.\n  *\n  * \\sa ArrayBase::bessel_i1e()\n  */\ntemplate <typename Derived>\nEIGEN_STRONG_INLINE const Eigen::CwiseUnaryOp<\n    Eigen::internal::scalar_bessel_i1e_op<typename Derived::Scalar>, const Derived>\nbessel_i1e(const Eigen::ArrayBase<Derived>& x) {\n  return Eigen::CwiseUnaryOp<\n      Eigen::internal::scalar_bessel_i1e_op<typename Derived::Scalar>,\n      const Derived>(x.derived());\n}\n\n/** \\returns an expression of the coefficient-wise k0(\\a x) to the given\n * arrays.\n  *\n  * It returns the modified Bessel function of the second kind of order zero.\n  *\n  * \\param x is the argument\n  *\n  * \\note This function supports only float and double scalar types. To support\n  * other scalar types, the user has to provide implementations of k0(T) for\n  * any scalar type T to be supported.\n  *\n  * \\sa ArrayBase::bessel_k0()\n  */\ntemplate <typename Derived>\nEIGEN_STRONG_INLINE const Eigen::CwiseUnaryOp<\n    Eigen::internal::scalar_bessel_k0_op<typename Derived::Scalar>, const Derived>\nbessel_k0(const Eigen::ArrayBase<Derived>& x) {\n  return Eigen::CwiseUnaryOp<\n      Eigen::internal::scalar_bessel_k0_op<typename Derived::Scalar>,\n      const Derived>(x.derived());\n}\n\n/** \\returns an expression of the coefficient-wise k0e(\\a x) to the given\n * arrays.\n  *\n  * It returns the exponentially scaled modified Bessel\n  * function of the second kind of order zero.\n  *\n  * \\param x is the argument\n  *\n  * \\note This function supports only float and double scalar types. To support\n  * other scalar types, the user has to provide implementations of k0e(T) for\n  * any scalar type T to be supported.\n  *\n  * \\sa ArrayBase::bessel_k0e()\n  */\ntemplate <typename Derived>\nEIGEN_STRONG_INLINE const Eigen::CwiseUnaryOp<\n    Eigen::internal::scalar_bessel_k0e_op<typename Derived::Scalar>, const Derived>\nbessel_k0e(const Eigen::ArrayBase<Derived>& x) {\n  return Eigen::CwiseUnaryOp<\n      Eigen::internal::scalar_bessel_k0e_op<typename Derived::Scalar>,\n      const Derived>(x.derived());\n}\n\n/** \\returns an expression of the coefficient-wise k1(\\a x) to the given\n * arrays.\n  *\n  * It returns the modified Bessel function of the second kind of order one.\n  *\n  * \\param x is the argument\n  *\n  * \\note This function supports only float and double scalar types. To support\n  * other scalar types, the user has to provide implementations of k1(T) for\n  * any scalar type T to be supported.\n  *\n  * \\sa ArrayBase::bessel_k1()\n  */\ntemplate <typename Derived>\nEIGEN_STRONG_INLINE const Eigen::CwiseUnaryOp<\n    Eigen::internal::scalar_bessel_k1_op<typename Derived::Scalar>, const Derived>\nbessel_k1(const Eigen::ArrayBase<Derived>& x) {\n  return Eigen::CwiseUnaryOp<\n      Eigen::internal::scalar_bessel_k1_op<typename Derived::Scalar>,\n      const Derived>(x.derived());\n}\n\n/** \\returns an expression of the coefficient-wise k1e(\\a x) to the given\n * arrays.\n  *\n  * It returns the exponentially scaled modified Bessel\n  * function of the second kind of order one.\n  *\n  * \\param x is the argument\n  *\n  * \\note This function supports only float and double scalar types. To support\n  * other scalar types, the user has to provide implementations of k1e(T) for\n  * any scalar type T to be supported.\n  *\n  * \\sa ArrayBase::bessel_k1e()\n  */\ntemplate <typename Derived>\nEIGEN_STRONG_INLINE const Eigen::CwiseUnaryOp<\n    Eigen::internal::scalar_bessel_k1e_op<typename Derived::Scalar>, const Derived>\nbessel_k1e(const Eigen::ArrayBase<Derived>& x) {\n  return Eigen::CwiseUnaryOp<\n      Eigen::internal::scalar_bessel_k1e_op<typename Derived::Scalar>,\n      const Derived>(x.derived());\n}\n\n/** \\returns an expression of the coefficient-wise j0(\\a x) to the given\n * arrays.\n  *\n  * It returns the Bessel function of the first kind of order zero.\n  *\n  * \\param x is the argument\n  *\n  * \\note This function supports only float and double scalar types. To support\n  * other scalar types, the user has to provide implementations of j0(T) for\n  * any scalar type T to be supported.\n  *\n  * \\sa ArrayBase::bessel_j0()\n  */\ntemplate <typename Derived>\nEIGEN_STRONG_INLINE const Eigen::CwiseUnaryOp<\n    Eigen::internal::scalar_bessel_j0_op<typename Derived::Scalar>, const Derived>\nbessel_j0(const Eigen::ArrayBase<Derived>& x) {\n  return Eigen::CwiseUnaryOp<\n      Eigen::internal::scalar_bessel_j0_op<typename Derived::Scalar>,\n      const Derived>(x.derived());\n}\n\n/** \\returns an expression of the coefficient-wise y0(\\a x) to the given\n * arrays.\n  *\n  * It returns the Bessel function of the second kind of order zero.\n  *\n  * \\param x is the argument\n  *\n  * \\note This function supports only float and double scalar types. To support\n  * other scalar types, the user has to provide implementations of y0(T) for\n  * any scalar type T to be supported.\n  *\n  * \\sa ArrayBase::bessel_y0()\n  */\ntemplate <typename Derived>\nEIGEN_STRONG_INLINE const Eigen::CwiseUnaryOp<\n    Eigen::internal::scalar_bessel_y0_op<typename Derived::Scalar>, const Derived>\nbessel_y0(const Eigen::ArrayBase<Derived>& x) {\n  return Eigen::CwiseUnaryOp<\n      Eigen::internal::scalar_bessel_y0_op<typename Derived::Scalar>,\n      const Derived>(x.derived());\n}\n\n/** \\returns an expression of the coefficient-wise j1(\\a x) to the given\n * arrays.\n  *\n  * It returns the modified Bessel function of the first kind of order one.\n  *\n  * \\param x is the argument\n  *\n  * \\note This function supports only float and double scalar types. To support\n  * other scalar types, the user has to provide implementations of j1(T) for\n  * any scalar type T to be supported.\n  *\n  * \\sa ArrayBase::bessel_j1()\n  */\ntemplate <typename Derived>\nEIGEN_STRONG_INLINE const Eigen::CwiseUnaryOp<\n    Eigen::internal::scalar_bessel_j1_op<typename Derived::Scalar>, const Derived>\nbessel_j1(const Eigen::ArrayBase<Derived>& x) {\n  return Eigen::CwiseUnaryOp<\n      Eigen::internal::scalar_bessel_j1_op<typename Derived::Scalar>,\n      const Derived>(x.derived());\n}\n\n/** \\returns an expression of the coefficient-wise y1(\\a x) to the given\n * arrays.\n  *\n  * It returns the Bessel function of the second kind of order one.\n  *\n  * \\param x is the argument\n  *\n  * \\note This function supports only float and double scalar types. To support\n  * other scalar types, the user has to provide implementations of y1(T) for\n  * any scalar type T to be supported.\n  *\n  * \\sa ArrayBase::bessel_y1()\n  */\ntemplate <typename Derived>\nEIGEN_STRONG_INLINE const Eigen::CwiseUnaryOp<\n    Eigen::internal::scalar_bessel_y1_op<typename Derived::Scalar>, const Derived>\nbessel_y1(const Eigen::ArrayBase<Derived>& x) {\n  return Eigen::CwiseUnaryOp<\n      Eigen::internal::scalar_bessel_y1_op<typename Derived::Scalar>,\n      const Derived>(x.derived());\n}\n\n} // end namespace Eigen\n\n#endif // EIGEN_BESSELFUNCTIONS_ARRAYAPI_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/SpecialFunctions/BesselFunctionsFunctors.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Eugene Brevdo <ebrevdo@gmail.com>\n// Copyright (C) 2016 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_BESSELFUNCTIONS_FUNCTORS_H\n#define EIGEN_BESSELFUNCTIONS_FUNCTORS_H\n\nnamespace Eigen {\n\nnamespace internal {\n\n/** \\internal\n * \\brief Template functor to compute the modified Bessel function of the first\n * kind of order zero.\n * \\sa class CwiseUnaryOp, Cwise::bessel_i0()\n */\ntemplate <typename Scalar>\nstruct scalar_bessel_i0_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_bessel_i0_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator()(const Scalar& x) const {\n    using numext::bessel_i0;\n    return bessel_i0(x);\n  }\n  typedef typename packet_traits<Scalar>::type Packet;\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet& x) const {\n    return internal::pbessel_i0(x);\n  }\n};\ntemplate <typename Scalar>\nstruct functor_traits<scalar_bessel_i0_op<Scalar> > {\n  enum {\n    // On average, a Chebyshev polynomial of order N=20 is computed.\n    // The cost is N multiplications and 2N additions. We also add\n    // the cost of an additional exp over i0e.\n    Cost = 28 * NumTraits<Scalar>::MulCost + 48 * NumTraits<Scalar>::AddCost,\n    PacketAccess = packet_traits<Scalar>::HasBessel\n  };\n};\n\n/** \\internal\n * \\brief Template functor to compute the exponentially scaled modified Bessel\n * function of the first kind of order zero\n * \\sa class CwiseUnaryOp, Cwise::bessel_i0e()\n */\ntemplate <typename Scalar>\nstruct scalar_bessel_i0e_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_bessel_i0e_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator()(const Scalar& x) const {\n    using numext::bessel_i0e;\n    return bessel_i0e(x);\n  }\n  typedef typename packet_traits<Scalar>::type Packet;\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet& x) const {\n    return internal::pbessel_i0e(x);\n  }\n};\ntemplate <typename Scalar>\nstruct functor_traits<scalar_bessel_i0e_op<Scalar> > {\n  enum {\n    // On average, a Chebyshev polynomial of order N=20 is computed.\n    // The cost is N multiplications and 2N additions.\n    Cost = 20 * NumTraits<Scalar>::MulCost + 40 * NumTraits<Scalar>::AddCost,\n    PacketAccess = packet_traits<Scalar>::HasBessel\n  };\n};\n\n/** \\internal\n * \\brief Template functor to compute the modified Bessel function of the first\n * kind of order one\n * \\sa class CwiseUnaryOp, Cwise::bessel_i1()\n */\ntemplate <typename Scalar>\nstruct scalar_bessel_i1_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_bessel_i1_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator()(const Scalar& x) const {\n    using numext::bessel_i1;\n    return bessel_i1(x);\n  }\n  typedef typename packet_traits<Scalar>::type Packet;\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet& x) const {\n    return internal::pbessel_i1(x);\n  }\n};\ntemplate <typename Scalar>\nstruct functor_traits<scalar_bessel_i1_op<Scalar> > {\n  enum {\n    // On average, a Chebyshev polynomial of order N=20 is computed.\n    // The cost is N multiplications and 2N additions. We also add\n    // the cost of an additional exp over i1e.\n    Cost = 28 * NumTraits<Scalar>::MulCost + 48 * NumTraits<Scalar>::AddCost,\n    PacketAccess = packet_traits<Scalar>::HasBessel\n  };\n};\n\n/** \\internal\n * \\brief Template functor to compute the exponentially scaled modified Bessel\n * function of the first kind of order zero\n * \\sa class CwiseUnaryOp, Cwise::bessel_i1e()\n */\ntemplate <typename Scalar>\nstruct scalar_bessel_i1e_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_bessel_i1e_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator()(const Scalar& x) const {\n    using numext::bessel_i1e;\n    return bessel_i1e(x);\n  }\n  typedef typename packet_traits<Scalar>::type Packet;\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet& x) const {\n    return internal::pbessel_i1e(x);\n  }\n};\ntemplate <typename Scalar>\nstruct functor_traits<scalar_bessel_i1e_op<Scalar> > {\n  enum {\n    // On average, a Chebyshev polynomial of order N=20 is computed.\n    // The cost is N multiplications and 2N additions.\n    Cost = 20 * NumTraits<Scalar>::MulCost + 40 * NumTraits<Scalar>::AddCost,\n    PacketAccess = packet_traits<Scalar>::HasBessel\n  };\n};\n\n/** \\internal\n * \\brief Template functor to compute the Bessel function of the second kind of\n * order zero\n * \\sa class CwiseUnaryOp, Cwise::bessel_j0()\n */\ntemplate <typename Scalar>\nstruct scalar_bessel_j0_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_bessel_j0_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator()(const Scalar& x) const {\n    using numext::bessel_j0;\n    return bessel_j0(x);\n  }\n  typedef typename packet_traits<Scalar>::type Packet;\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet& x) const {\n    return internal::pbessel_j0(x);\n  }\n};\ntemplate <typename Scalar>\nstruct functor_traits<scalar_bessel_j0_op<Scalar> > {\n  enum {\n    // 6 polynomial of order ~N=8 is computed.\n    // The cost is N multiplications and N additions each, along with a\n    // sine, cosine and rsqrt cost.\n    Cost = 63 * NumTraits<Scalar>::MulCost + 48 * NumTraits<Scalar>::AddCost,\n    PacketAccess = packet_traits<Scalar>::HasBessel\n  };\n};\n\n/** \\internal\n * \\brief Template functor to compute the Bessel function of the second kind of\n * order zero\n * \\sa class CwiseUnaryOp, Cwise::bessel_y0()\n */\ntemplate <typename Scalar>\nstruct scalar_bessel_y0_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_bessel_y0_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator()(const Scalar& x) const {\n    using numext::bessel_y0;\n    return bessel_y0(x);\n  }\n  typedef typename packet_traits<Scalar>::type Packet;\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet& x) const {\n    return internal::pbessel_y0(x);\n  }\n};\ntemplate <typename Scalar>\nstruct functor_traits<scalar_bessel_y0_op<Scalar> > {\n  enum {\n    // 6 polynomial of order ~N=8 is computed.\n    // The cost is N multiplications and N additions each, along with a\n    // sine, cosine, rsqrt and j0 cost.\n    Cost = 126 * NumTraits<Scalar>::MulCost + 96 * NumTraits<Scalar>::AddCost,\n    PacketAccess = packet_traits<Scalar>::HasBessel\n  };\n};\n\n/** \\internal\n * \\brief Template functor to compute the Bessel function of the first kind of\n * order one\n * \\sa class CwiseUnaryOp, Cwise::bessel_j1()\n */\ntemplate <typename Scalar>\nstruct scalar_bessel_j1_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_bessel_j1_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator()(const Scalar& x) const {\n    using numext::bessel_j1;\n    return bessel_j1(x);\n  }\n  typedef typename packet_traits<Scalar>::type Packet;\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet& x) const {\n    return internal::pbessel_j1(x);\n  }\n};\ntemplate <typename Scalar>\nstruct functor_traits<scalar_bessel_j1_op<Scalar> > {\n  enum {\n    // 6 polynomial of order ~N=8 is computed.\n    // The cost is N multiplications and N additions each, along with a\n    // sine, cosine and rsqrt cost.\n    Cost = 63 * NumTraits<Scalar>::MulCost + 48 * NumTraits<Scalar>::AddCost,\n    PacketAccess = packet_traits<Scalar>::HasBessel\n  };\n};\n\n/** \\internal\n * \\brief Template functor to compute the Bessel function of the second kind of\n * order one\n * \\sa class CwiseUnaryOp, Cwise::bessel_j1e()\n */\ntemplate <typename Scalar>\nstruct scalar_bessel_y1_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_bessel_y1_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator()(const Scalar& x) const {\n    using numext::bessel_y1;\n    return bessel_y1(x);\n  }\n  typedef typename packet_traits<Scalar>::type Packet;\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet& x) const {\n    return internal::pbessel_y1(x);\n  }\n};\ntemplate <typename Scalar>\nstruct functor_traits<scalar_bessel_y1_op<Scalar> > {\n  enum {\n    // 6 polynomial of order ~N=8 is computed.\n    // The cost is N multiplications and N additions each, along with a\n    // sine, cosine, rsqrt and j1 cost.\n    Cost = 126 * NumTraits<Scalar>::MulCost + 96 * NumTraits<Scalar>::AddCost,\n    PacketAccess = packet_traits<Scalar>::HasBessel\n  };\n};\n\n/** \\internal\n * \\brief Template functor to compute the modified Bessel function of the second\n * kind of order zero\n * \\sa class CwiseUnaryOp, Cwise::bessel_k0()\n */\ntemplate <typename Scalar>\nstruct scalar_bessel_k0_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_bessel_k0_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator()(const Scalar& x) const {\n    using numext::bessel_k0;\n    return bessel_k0(x);\n  }\n  typedef typename packet_traits<Scalar>::type Packet;\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet& x) const {\n    return internal::pbessel_k0(x);\n  }\n};\ntemplate <typename Scalar>\nstruct functor_traits<scalar_bessel_k0_op<Scalar> > {\n  enum {\n    // On average, a Chebyshev polynomial of order N=10 is computed.\n    // The cost is N multiplications and 2N additions. In addition we compute\n    // i0, a log, exp and prsqrt and sin and cos.\n    Cost = 68 * NumTraits<Scalar>::MulCost + 88 * NumTraits<Scalar>::AddCost,\n    PacketAccess = packet_traits<Scalar>::HasBessel\n  };\n};\n\n/** \\internal\n * \\brief Template functor to compute the exponentially scaled modified Bessel\n * function of the second kind of order zero\n * \\sa class CwiseUnaryOp, Cwise::bessel_k0e()\n */\ntemplate <typename Scalar>\nstruct scalar_bessel_k0e_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_bessel_k0e_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator()(const Scalar& x) const {\n    using numext::bessel_k0e;\n    return bessel_k0e(x);\n  }\n  typedef typename packet_traits<Scalar>::type Packet;\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet& x) const {\n    return internal::pbessel_k0e(x);\n  }\n};\ntemplate <typename Scalar>\nstruct functor_traits<scalar_bessel_k0e_op<Scalar> > {\n  enum {\n    // On average, a Chebyshev polynomial of order N=10 is computed.\n    // The cost is N multiplications and 2N additions. In addition we compute\n    // i0, a log, exp and prsqrt and sin and cos.\n    Cost = 68 * NumTraits<Scalar>::MulCost + 88 * NumTraits<Scalar>::AddCost,\n    PacketAccess = packet_traits<Scalar>::HasBessel\n  };\n};\n\n/** \\internal\n * \\brief Template functor to compute the modified Bessel function of the\n * second kind of order one\n * \\sa class CwiseUnaryOp, Cwise::bessel_k1()\n */\ntemplate <typename Scalar>\nstruct scalar_bessel_k1_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_bessel_k1_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator()(const Scalar& x) const {\n    using numext::bessel_k1;\n    return bessel_k1(x);\n  }\n  typedef typename packet_traits<Scalar>::type Packet;\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet& x) const {\n    return internal::pbessel_k1(x);\n  }\n};\ntemplate <typename Scalar>\nstruct functor_traits<scalar_bessel_k1_op<Scalar> > {\n  enum {\n    // On average, a Chebyshev polynomial of order N=10 is computed.\n    // The cost is N multiplications and 2N additions. In addition we compute\n    // i1, a log, exp and prsqrt and sin and cos.\n    Cost = 68 * NumTraits<Scalar>::MulCost + 88 * NumTraits<Scalar>::AddCost,\n    PacketAccess = packet_traits<Scalar>::HasBessel\n  };\n};\n\n/** \\internal\n * \\brief Template functor to compute the exponentially scaled modified Bessel\n * function of the second kind of order one\n * \\sa class CwiseUnaryOp, Cwise::bessel_k1e()\n */\ntemplate <typename Scalar>\nstruct scalar_bessel_k1e_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_bessel_k1e_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator()(const Scalar& x) const {\n    using numext::bessel_k1e;\n    return bessel_k1e(x);\n  }\n  typedef typename packet_traits<Scalar>::type Packet;\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet& x) const {\n    return internal::pbessel_k1e(x);\n  }\n};\ntemplate <typename Scalar>\nstruct functor_traits<scalar_bessel_k1e_op<Scalar> > {\n  enum {\n    // On average, a Chebyshev polynomial of order N=10 is computed.\n    // The cost is N multiplications and 2N additions. In addition we compute\n    // i1, a log, exp and prsqrt and sin and cos.\n    Cost = 68 * NumTraits<Scalar>::MulCost + 88 * NumTraits<Scalar>::AddCost,\n    PacketAccess = packet_traits<Scalar>::HasBessel\n  };\n};\n\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_BESSELFUNCTIONS_FUNCTORS_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/SpecialFunctions/BesselFunctionsHalf.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_BESSELFUNCTIONS_HALF_H\n#define EIGEN_BESSELFUNCTIONS_HALF_H\n\nnamespace Eigen {\nnamespace numext {\n\n#if EIGEN_HAS_C99_MATH\ntemplate <>\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half bessel_i0(const Eigen::half& x) {\n  return Eigen::half(Eigen::numext::bessel_i0(static_cast<float>(x)));\n}\ntemplate <>\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half bessel_i0e(const Eigen::half& x) {\n  return Eigen::half(Eigen::numext::bessel_i0e(static_cast<float>(x)));\n}\ntemplate <>\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half bessel_i1(const Eigen::half& x) {\n  return Eigen::half(Eigen::numext::bessel_i1(static_cast<float>(x)));\n}\ntemplate <>\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half bessel_i1e(const Eigen::half& x) {\n  return Eigen::half(Eigen::numext::bessel_i1e(static_cast<float>(x)));\n}\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half bessel_j0(const Eigen::half& x) {\n  return Eigen::half(Eigen::numext::bessel_j0(static_cast<float>(x)));\n}\ntemplate <>\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half bessel_j1(const Eigen::half& x) {\n  return Eigen::half(Eigen::numext::bessel_j1(static_cast<float>(x)));\n}\ntemplate <>\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half bessel_y0(const Eigen::half& x) {\n  return Eigen::half(Eigen::numext::bessel_y0(static_cast<float>(x)));\n}\ntemplate <>\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half bessel_y1(const Eigen::half& x) {\n  return Eigen::half(Eigen::numext::bessel_y1(static_cast<float>(x)));\n}\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half bessel_k0(const Eigen::half& x) {\n  return Eigen::half(Eigen::numext::bessel_k0(static_cast<float>(x)));\n}\ntemplate <>\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half bessel_k0e(const Eigen::half& x) {\n  return Eigen::half(Eigen::numext::bessel_k0e(static_cast<float>(x)));\n}\ntemplate <>\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half bessel_k1(const Eigen::half& x) {\n  return Eigen::half(Eigen::numext::bessel_k1(static_cast<float>(x)));\n}\ntemplate <>\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half bessel_k1e(const Eigen::half& x) {\n  return Eigen::half(Eigen::numext::bessel_k1e(static_cast<float>(x)));\n}\n#endif\n\n}  // end namespace numext\n}  // end namespace Eigen\n\n#endif  // EIGEN_BESSELFUNCTIONS_HALF_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/SpecialFunctions/BesselFunctionsImpl.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Eugene Brevdo <ebrevdo@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_BESSEL_FUNCTIONS_H\n#define EIGEN_BESSEL_FUNCTIONS_H\n\nnamespace Eigen {\nnamespace internal {\n\n//  Parts of this code are based on the Cephes Math Library.\n//\n//  Cephes Math Library Release 2.8:  June, 2000\n//  Copyright 1984, 1987, 1992, 2000 by Stephen L. Moshier\n//\n//  Permission has been kindly provided by the original author\n//  to incorporate the Cephes software into the Eigen codebase:\n//\n//    From: Stephen Moshier\n//    To: Eugene Brevdo\n//    Subject: Re: Permission to wrap several cephes functions in Eigen\n//\n//    Hello Eugene,\n//\n//    Thank you for writing.\n//\n//    If your licensing is similar to BSD, the formal way that has been\n//    handled is simply to add a statement to the effect that you are incorporating\n//    the Cephes software by permission of the author.\n//\n//    Good luck with your project,\n//    Steve\n\n\n/****************************************************************************\n * Implementation of Bessel function, based on Cephes                       *\n ****************************************************************************/\n\ntemplate <typename Scalar>\nstruct bessel_i0e_retval {\n  typedef Scalar type;\n};\n\ntemplate <typename T, typename ScalarType>\nstruct generic_i0e {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE T run(const T&) {\n    EIGEN_STATIC_ASSERT((internal::is_same<T, T>::value == false),\n                        THIS_TYPE_IS_NOT_SUPPORTED);\n    return ScalarType(0);\n  }\n};\n\ntemplate <typename T>\nstruct generic_i0e<T, float> {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE T run(const T& x) {\n    /*  i0ef.c\n     *\n     *  Modified Bessel function of order zero,\n     *  exponentially scaled\n     *\n     *\n     *\n     * SYNOPSIS:\n     *\n     * float x, y, i0ef();\n     *\n     * y = i0ef( x );\n     *\n     *\n     *\n     * DESCRIPTION:\n     *\n     * Returns exponentially scaled modified Bessel function\n     * of order zero of the argument.\n     *\n     * The function is defined as i0e(x) = exp(-|x|) j0( ix ).\n     *\n     *\n     *\n     * ACCURACY:\n     *\n     *                      Relative error:\n     * arithmetic   domain     # trials      peak         rms\n     *    IEEE      0,30        100000      3.7e-7      7.0e-8\n     * See i0f().\n     *\n     */\n\n    const float A[] = {-1.30002500998624804212E-8f, 6.04699502254191894932E-8f,\n                       -2.67079385394061173391E-7f, 1.11738753912010371815E-6f,\n                       -4.41673835845875056359E-6f, 1.64484480707288970893E-5f,\n                       -5.75419501008210370398E-5f, 1.88502885095841655729E-4f,\n                       -5.76375574538582365885E-4f, 1.63947561694133579842E-3f,\n                       -4.32430999505057594430E-3f, 1.05464603945949983183E-2f,\n                       -2.37374148058994688156E-2f, 4.93052842396707084878E-2f,\n                       -9.49010970480476444210E-2f, 1.71620901522208775349E-1f,\n                       -3.04682672343198398683E-1f, 6.76795274409476084995E-1f};\n\n    const float B[] = {3.39623202570838634515E-9f, 2.26666899049817806459E-8f,\n                       2.04891858946906374183E-7f, 2.89137052083475648297E-6f,\n                       6.88975834691682398426E-5f, 3.36911647825569408990E-3f,\n                       8.04490411014108831608E-1f};\n    T y = pabs(x);\n    T y_le_eight = internal::pchebevl<T, 18>::run(\n        pmadd(pset1<T>(0.5f), y, pset1<T>(-2.0f)), A);\n    T y_gt_eight = pmul(\n        internal::pchebevl<T, 7>::run(\n            psub(pdiv(pset1<T>(32.0f), y), pset1<T>(2.0f)), B),\n        prsqrt(y));\n    // TODO: Perhaps instead check whether all packet elements are in\n    // [-8, 8] and evaluate a branch based off of that. It's possible\n    // in practice most elements are in this region.\n    return pselect(pcmp_le(y, pset1<T>(8.0f)), y_le_eight, y_gt_eight);\n  }\n};\n\ntemplate <typename T>\nstruct generic_i0e<T, double> {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE T run(const T& x) {\n    /*  i0e.c\n     *\n     *  Modified Bessel function of order zero,\n     *  exponentially scaled\n     *\n     *\n     *\n     * SYNOPSIS:\n     *\n     * double x, y, i0e();\n     *\n     * y = i0e( x );\n     *\n     *\n     *\n     * DESCRIPTION:\n     *\n     * Returns exponentially scaled modified Bessel function\n     * of order zero of the argument.\n     *\n     * The function is defined as i0e(x) = exp(-|x|) j0( ix ).\n     *\n     *\n     *\n     * ACCURACY:\n     *\n     *                      Relative error:\n     * arithmetic   domain     # trials      peak         rms\n     *    IEEE      0,30        30000       5.4e-16     1.2e-16\n     * See i0().\n     *\n     */\n\n    const double A[] = {-4.41534164647933937950E-18, 3.33079451882223809783E-17,\n                        -2.43127984654795469359E-16, 1.71539128555513303061E-15,\n                        -1.16853328779934516808E-14, 7.67618549860493561688E-14,\n                        -4.85644678311192946090E-13, 2.95505266312963983461E-12,\n                        -1.72682629144155570723E-11, 9.67580903537323691224E-11,\n                        -5.18979560163526290666E-10, 2.65982372468238665035E-9,\n                        -1.30002500998624804212E-8,  6.04699502254191894932E-8,\n                        -2.67079385394061173391E-7,  1.11738753912010371815E-6,\n                        -4.41673835845875056359E-6,  1.64484480707288970893E-5,\n                        -5.75419501008210370398E-5,  1.88502885095841655729E-4,\n                        -5.76375574538582365885E-4,  1.63947561694133579842E-3,\n                        -4.32430999505057594430E-3,  1.05464603945949983183E-2,\n                        -2.37374148058994688156E-2,  4.93052842396707084878E-2,\n                        -9.49010970480476444210E-2,  1.71620901522208775349E-1,\n                        -3.04682672343198398683E-1,  6.76795274409476084995E-1};\n    const double B[] = {\n        -7.23318048787475395456E-18, -4.83050448594418207126E-18,\n        4.46562142029675999901E-17,  3.46122286769746109310E-17,\n        -2.82762398051658348494E-16, -3.42548561967721913462E-16,\n        1.77256013305652638360E-15,  3.81168066935262242075E-15,\n        -9.55484669882830764870E-15, -4.15056934728722208663E-14,\n        1.54008621752140982691E-14,  3.85277838274214270114E-13,\n        7.18012445138366623367E-13,  -1.79417853150680611778E-12,\n        -1.32158118404477131188E-11, -3.14991652796324136454E-11,\n        1.18891471078464383424E-11,  4.94060238822496958910E-10,\n        3.39623202570838634515E-9,   2.26666899049817806459E-8,\n        2.04891858946906374183E-7,   2.89137052083475648297E-6,\n        6.88975834691682398426E-5,   3.36911647825569408990E-3,\n        8.04490411014108831608E-1};\n    T y = pabs(x);\n    T y_le_eight = internal::pchebevl<T, 30>::run(\n        pmadd(pset1<T>(0.5), y, pset1<T>(-2.0)), A);\n    T y_gt_eight = pmul(\n        internal::pchebevl<T, 25>::run(\n            psub(pdiv(pset1<T>(32.0), y), pset1<T>(2.0)), B),\n        prsqrt(y));\n    // TODO: Perhaps instead check whether all packet elements are in\n    // [-8, 8] and evaluate a branch based off of that. It's possible\n    // in practice most elements are in this region.\n    return pselect(pcmp_le(y, pset1<T>(8.0)), y_le_eight, y_gt_eight);\n  }\n};\n\ntemplate <typename Scalar>\nstruct bessel_i0e_impl {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE Scalar run(const Scalar x) {\n    return generic_i0e<Scalar, Scalar>::run(x);\n  }\n};\n\ntemplate <typename Scalar>\nstruct bessel_i0_retval {\n  typedef Scalar type;\n};\n\ntemplate <typename T, typename ScalarType>\nstruct generic_i0 {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE T run(const T& x) {\n    return pmul(\n        pexp(pabs(x)),\n        generic_i0e<T, ScalarType>::run(x));\n  }\n};\n\ntemplate <typename Scalar>\nstruct bessel_i0_impl {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE Scalar run(const Scalar x) {\n    return generic_i0<Scalar, Scalar>::run(x);\n  }\n};\n\ntemplate <typename Scalar>\nstruct bessel_i1e_retval {\n  typedef Scalar type;\n};\n\ntemplate <typename T, typename ScalarType>\nstruct generic_i1e {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE T run(const T&) {\n    EIGEN_STATIC_ASSERT((internal::is_same<T, T>::value == false),\n                        THIS_TYPE_IS_NOT_SUPPORTED);\n    return ScalarType(0);\n  }\n};\n\ntemplate <typename T>\nstruct generic_i1e<T, float> {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE T run(const T& x) {\n    /* i1ef.c\n     *\n     *  Modified Bessel function of order one,\n     *  exponentially scaled\n     *\n     *\n     *\n     * SYNOPSIS:\n     *\n     * float x, y, i1ef();\n     *\n     * y = i1ef( x );\n     *\n     *\n     *\n     * DESCRIPTION:\n     *\n     * Returns exponentially scaled modified Bessel function\n     * of order one of the argument.\n     *\n     * The function is defined as i1(x) = -i exp(-|x|) j1( ix ).\n     *\n     *\n     *\n     * ACCURACY:\n     *\n     *                      Relative error:\n     * arithmetic   domain     # trials      peak         rms\n     *    IEEE      0, 30       30000       1.5e-6      1.5e-7\n     * See i1().\n     *\n     */\n    const float A[] = {9.38153738649577178388E-9f, -4.44505912879632808065E-8f,\n                       2.00329475355213526229E-7f, -8.56872026469545474066E-7f,\n                       3.47025130813767847674E-6f, -1.32731636560394358279E-5f,\n                       4.78156510755005422638E-5f, -1.61760815825896745588E-4f,\n                       5.12285956168575772895E-4f, -1.51357245063125314899E-3f,\n                       4.15642294431288815669E-3f, -1.05640848946261981558E-2f,\n                       2.47264490306265168283E-2f, -5.29459812080949914269E-2f,\n                       1.02643658689847095384E-1f, -1.76416518357834055153E-1f,\n                       2.52587186443633654823E-1f};\n\n    const float B[] = {-3.83538038596423702205E-9f, -2.63146884688951950684E-8f,\n                       -2.51223623787020892529E-7f, -3.88256480887769039346E-6f,\n                       -1.10588938762623716291E-4f, -9.76109749136146840777E-3f,\n                       7.78576235018280120474E-1f};\n\n\n    T y = pabs(x);\n    T y_le_eight = pmul(y, internal::pchebevl<T, 17>::run(\n        pmadd(pset1<T>(0.5f), y, pset1<T>(-2.0f)), A));\n    T y_gt_eight = pmul(\n        internal::pchebevl<T, 7>::run(\n            psub(pdiv(pset1<T>(32.0f), y),\n                 pset1<T>(2.0f)), B),\n        prsqrt(y));\n    // TODO: Perhaps instead check whether all packet elements are in\n    // [-8, 8] and evaluate a branch based off of that. It's possible\n    // in practice most elements are in this region.\n    y = pselect(pcmp_le(y, pset1<T>(8.0f)), y_le_eight, y_gt_eight);\n    return pselect(pcmp_lt(x, pset1<T>(0.0f)), pnegate(y), y);\n  }\n};\n\ntemplate <typename T>\nstruct generic_i1e<T, double> {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE T run(const T& x) {\n    /*  i1e.c\n     *\n     *  Modified Bessel function of order one,\n     *  exponentially scaled\n     *\n     *\n     *\n     * SYNOPSIS:\n     *\n     * double x, y, i1e();\n     *\n     * y = i1e( x );\n     *\n     *\n     *\n     * DESCRIPTION:\n     *\n     * Returns exponentially scaled modified Bessel function\n     * of order one of the argument.\n     *\n     * The function is defined as i1(x) = -i exp(-|x|) j1( ix ).\n     *\n     *\n     *\n     * ACCURACY:\n     *\n     *                      Relative error:\n     * arithmetic   domain     # trials      peak         rms\n     *    IEEE      0, 30       30000       2.0e-15     2.0e-16\n     * See i1().\n     *\n     */\n    const double A[] = {2.77791411276104639959E-18, -2.11142121435816608115E-17,\n                        1.55363195773620046921E-16, -1.10559694773538630805E-15,\n                        7.60068429473540693410E-15, -5.04218550472791168711E-14,\n                        3.22379336594557470981E-13, -1.98397439776494371520E-12,\n                        1.17361862988909016308E-11, -6.66348972350202774223E-11,\n                        3.62559028155211703701E-10, -1.88724975172282928790E-9,\n                        9.38153738649577178388E-9,  -4.44505912879632808065E-8,\n                        2.00329475355213526229E-7,  -8.56872026469545474066E-7,\n                        3.47025130813767847674E-6,  -1.32731636560394358279E-5,\n                        4.78156510755005422638E-5,  -1.61760815825896745588E-4,\n                        5.12285956168575772895E-4,  -1.51357245063125314899E-3,\n                        4.15642294431288815669E-3,  -1.05640848946261981558E-2,\n                        2.47264490306265168283E-2,  -5.29459812080949914269E-2,\n                        1.02643658689847095384E-1,  -1.76416518357834055153E-1,\n                        2.52587186443633654823E-1};\n    const double B[] = {\n        7.51729631084210481353E-18,  4.41434832307170791151E-18,\n        -4.65030536848935832153E-17, -3.20952592199342395980E-17,\n        2.96262899764595013876E-16,  3.30820231092092828324E-16,\n        -1.88035477551078244854E-15, -3.81440307243700780478E-15,\n        1.04202769841288027642E-14,  4.27244001671195135429E-14,\n        -2.10154184277266431302E-14, -4.08355111109219731823E-13,\n        -7.19855177624590851209E-13, 2.03562854414708950722E-12,\n        1.41258074366137813316E-11,  3.25260358301548823856E-11,\n        -1.89749581235054123450E-11, -5.58974346219658380687E-10,\n        -3.83538038596423702205E-9,  -2.63146884688951950684E-8,\n        -2.51223623787020892529E-7,  -3.88256480887769039346E-6,\n        -1.10588938762623716291E-4,  -9.76109749136146840777E-3,\n        7.78576235018280120474E-1};\n    T y = pabs(x);\n    T y_le_eight = pmul(y, internal::pchebevl<T, 29>::run(\n        pmadd(pset1<T>(0.5), y, pset1<T>(-2.0)), A));\n    T y_gt_eight = pmul(\n        internal::pchebevl<T, 25>::run(\n            psub(pdiv(pset1<T>(32.0), y),\n                 pset1<T>(2.0)), B),\n        prsqrt(y));\n    // TODO: Perhaps instead check whether all packet elements are in\n    // [-8, 8] and evaluate a branch based off of that. It's possible\n    // in practice most elements are in this region.\n    y = pselect(pcmp_le(y, pset1<T>(8.0)), y_le_eight, y_gt_eight);\n    return pselect(pcmp_lt(x, pset1<T>(0.0)), pnegate(y), y);\n  }\n};\n\ntemplate <typename Scalar>\nstruct bessel_i1e_impl {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE Scalar run(const Scalar x) {\n    return generic_i1e<Scalar, Scalar>::run(x);\n  }\n};\n\ntemplate <typename Scalar>\nstruct bessel_i1_retval {\n  typedef Scalar type;\n};\n\ntemplate <typename T, typename ScalarType>\nstruct generic_i1 {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE T run(const T& x) {\n    return pmul(\n        pexp(pabs(x)),\n        generic_i1e<T, ScalarType>::run(x));\n  }\n};\n\ntemplate <typename Scalar>\nstruct bessel_i1_impl {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE Scalar run(const Scalar x) {\n    return generic_i1<Scalar, Scalar>::run(x);\n  }\n};\n\ntemplate <typename Scalar>\nstruct bessel_k0e_retval {\n  typedef Scalar type;\n};\n\ntemplate <typename T, typename ScalarType>\nstruct generic_k0e {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE T run(const T&) {\n    EIGEN_STATIC_ASSERT((internal::is_same<T, T>::value == false),\n                        THIS_TYPE_IS_NOT_SUPPORTED);\n    return ScalarType(0);\n  }\n};\n\ntemplate <typename T>\nstruct generic_k0e<T, float> {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE T run(const T& x) {\n    /*  k0ef.c\n     *\tModified Bessel function, third kind, order zero,\n     *\texponentially scaled\n     *\n     *\n     *\n     * SYNOPSIS:\n     *\n     * float x, y, k0ef();\n     *\n     * y = k0ef( x );\n     *\n     *\n     *\n     * DESCRIPTION:\n     *\n     * Returns exponentially scaled modified Bessel function\n     * of the third kind of order zero of the argument.\n     *\n     *\n     *\n     * ACCURACY:\n     *\n     *                      Relative error:\n     * arithmetic   domain     # trials      peak         rms\n     *    IEEE      0, 30       30000       8.1e-7      7.8e-8\n     * See k0().\n     *\n     */\n\n    const float A[] = {1.90451637722020886025E-9f, 2.53479107902614945675E-7f,\n                       2.28621210311945178607E-5f, 1.26461541144692592338E-3f,\n                       3.59799365153615016266E-2f, 3.44289899924628486886E-1f,\n                       -5.35327393233902768720E-1f};\n\n    const float B[] = {-1.69753450938905987466E-9f, 8.57403401741422608519E-9f,\n                       -4.66048989768794782956E-8f, 2.76681363944501510342E-7f,\n                       -1.83175552271911948767E-6f, 1.39498137188764993662E-5f,\n                       -1.28495495816278026384E-4f, 1.56988388573005337491E-3f,\n                       -3.14481013119645005427E-2f, 2.44030308206595545468E0f};\n    const T MAXNUM = pset1<T>(NumTraits<float>::infinity());\n    const T two = pset1<T>(2.0);\n    T x_le_two = internal::pchebevl<T, 7>::run(\n        pmadd(x, x, pset1<T>(-2.0)), A);\n    x_le_two = pmadd(\n        generic_i0<T, float>::run(x), pnegate(\n            plog(pmul(pset1<T>(0.5), x))), x_le_two);\n    x_le_two = pmul(pexp(x), x_le_two);\n    T x_gt_two = pmul(\n            internal::pchebevl<T, 10>::run(\n                psub(pdiv(pset1<T>(8.0), x), two), B),\n            prsqrt(x));\n    return pselect(\n        pcmp_le(x, pset1<T>(0.0)),\n        MAXNUM,\n        pselect(pcmp_le(x, two), x_le_two, x_gt_two));\n  }\n};\n\ntemplate <typename T>\nstruct generic_k0e<T, double> {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE T run(const T& x) {\n    /*  k0e.c\n     *\tModified Bessel function, third kind, order zero,\n     *\texponentially scaled\n     *\n     *\n     *\n     * SYNOPSIS:\n     *\n     * double x, y, k0e();\n     *\n     * y = k0e( x );\n     *\n     *\n     *\n     * DESCRIPTION:\n     *\n     * Returns exponentially scaled modified Bessel function\n     * of the third kind of order zero of the argument.\n     *\n     *\n     *\n     * ACCURACY:\n     *\n     *                      Relative error:\n     * arithmetic   domain     # trials      peak         rms\n     *    IEEE      0, 30       30000       1.4e-15     1.4e-16\n     * See k0().\n     *\n     */\n\n    const double A[] = {\n      1.37446543561352307156E-16,\n      4.25981614279661018399E-14,\n      1.03496952576338420167E-11,\n      1.90451637722020886025E-9,\n      2.53479107902614945675E-7,\n      2.28621210311945178607E-5,\n      1.26461541144692592338E-3,\n      3.59799365153615016266E-2,\n      3.44289899924628486886E-1,\n      -5.35327393233902768720E-1};\n    const double B[] = {\n       5.30043377268626276149E-18, -1.64758043015242134646E-17,\n       5.21039150503902756861E-17, -1.67823109680541210385E-16,\n       5.51205597852431940784E-16, -1.84859337734377901440E-15,\n       6.34007647740507060557E-15, -2.22751332699166985548E-14,\n       8.03289077536357521100E-14, -2.98009692317273043925E-13,\n       1.14034058820847496303E-12, -4.51459788337394416547E-12,\n       1.85594911495471785253E-11, -7.95748924447710747776E-11,\n       3.57739728140030116597E-10, -1.69753450938905987466E-9,\n       8.57403401741422608519E-9, -4.66048989768794782956E-8,\n       2.76681363944501510342E-7, -1.83175552271911948767E-6,\n       1.39498137188764993662E-5, -1.28495495816278026384E-4,\n       1.56988388573005337491E-3, -3.14481013119645005427E-2,\n       2.44030308206595545468E0\n    };\n    const T MAXNUM = pset1<T>(NumTraits<double>::infinity());\n    const T two = pset1<T>(2.0);\n    T x_le_two = internal::pchebevl<T, 10>::run(\n        pmadd(x, x, pset1<T>(-2.0)), A);\n    x_le_two = pmadd(\n        generic_i0<T, double>::run(x), pmul(\n            pset1<T>(-1.0), plog(pmul(pset1<T>(0.5), x))), x_le_two);\n    x_le_two = pmul(pexp(x), x_le_two);\n    x_le_two = pselect(pcmp_le(x, pset1<T>(0.0)), MAXNUM, x_le_two);\n    T x_gt_two = pmul(\n            internal::pchebevl<T, 25>::run(\n                psub(pdiv(pset1<T>(8.0), x), two), B),\n            prsqrt(x));\n    return pselect(pcmp_le(x, two), x_le_two, x_gt_two);\n  }\n};\n\ntemplate <typename Scalar>\nstruct bessel_k0e_impl {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE Scalar run(const Scalar x) {\n    return generic_k0e<Scalar, Scalar>::run(x);\n  }\n};\n\ntemplate <typename Scalar>\nstruct bessel_k0_retval {\n  typedef Scalar type;\n};\n\ntemplate <typename T, typename ScalarType>\nstruct generic_k0 {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE T run(const T&) {\n    EIGEN_STATIC_ASSERT((internal::is_same<T, T>::value == false),\n                        THIS_TYPE_IS_NOT_SUPPORTED);\n    return ScalarType(0);\n  }\n};\n\ntemplate <typename T>\nstruct generic_k0<T, float> {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE T run(const T& x) {\n    /*  k0f.c\n     *\tModified Bessel function, third kind, order zero\n     *\n     *\n     *\n     * SYNOPSIS:\n     *\n     * float x, y, k0f();\n     *\n     * y = k0f( x );\n     *\n     *\n     *\n     * DESCRIPTION:\n     *\n     * Returns modified Bessel function of the third kind\n     * of order zero of the argument.\n     *\n     * The range is partitioned into the two intervals [0,8] and\n     * (8, infinity).  Chebyshev polynomial expansions are employed\n     * in each interval.\n     *\n     *\n     *\n     * ACCURACY:\n     *\n     * Tested at 2000 random points between 0 and 8.  Peak absolute\n     * error (relative when K0 > 1) was 1.46e-14; rms, 4.26e-15.\n     *                      Relative error:\n     * arithmetic   domain     # trials      peak         rms\n     *    IEEE      0, 30       30000       7.8e-7      8.5e-8\n     *\n     * ERROR MESSAGES:\n     *\n     *   message         condition      value returned\n     *  K0 domain          x <= 0          MAXNUM\n     *\n     */\n\n    const float A[] = {1.90451637722020886025E-9f, 2.53479107902614945675E-7f,\n                       2.28621210311945178607E-5f, 1.26461541144692592338E-3f,\n                       3.59799365153615016266E-2f, 3.44289899924628486886E-1f,\n                       -5.35327393233902768720E-1f};\n\n    const float B[] = {-1.69753450938905987466E-9f, 8.57403401741422608519E-9f,\n                       -4.66048989768794782956E-8f, 2.76681363944501510342E-7f,\n                       -1.83175552271911948767E-6f, 1.39498137188764993662E-5f,\n                       -1.28495495816278026384E-4f, 1.56988388573005337491E-3f,\n                       -3.14481013119645005427E-2f, 2.44030308206595545468E0f};\n    const T MAXNUM = pset1<T>(NumTraits<float>::infinity());\n    const T two = pset1<T>(2.0);\n    T x_le_two = internal::pchebevl<T, 7>::run(\n        pmadd(x, x, pset1<T>(-2.0)), A);\n    x_le_two = pmadd(\n        generic_i0<T, float>::run(x), pnegate(\n            plog(pmul(pset1<T>(0.5), x))), x_le_two);\n    x_le_two = pselect(pcmp_le(x, pset1<T>(0.0)), MAXNUM, x_le_two);\n    T x_gt_two = pmul(\n        pmul(\n            pexp(pnegate(x)),\n            internal::pchebevl<T, 10>::run(\n                psub(pdiv(pset1<T>(8.0), x), two), B)),\n        prsqrt(x));\n    return pselect(pcmp_le(x, two), x_le_two, x_gt_two);\n  }\n};\n\ntemplate <typename T>\nstruct generic_k0<T, double> {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE T run(const T& x) {\n    /*\n     *\n     *\tModified Bessel function, third kind, order zero,\n     *\texponentially scaled\n     *\n     *\n     *\n     * SYNOPSIS:\n     *\n     * double x, y, k0();\n     *\n     * y = k0( x );\n     *\n     *\n     *\n     * DESCRIPTION:\n     *\n     * Returns exponentially scaled modified Bessel function\n     * of the third kind of order zero of the argument.\n     *\n     *\n     *\n     * ACCURACY:\n     *\n     *                      Relative error:\n     * arithmetic   domain     # trials      peak         rms\n     *    IEEE      0, 30       30000       1.4e-15     1.4e-16\n     * See k0().\n     *\n     */\n    const double A[] = {\n      1.37446543561352307156E-16,\n      4.25981614279661018399E-14,\n      1.03496952576338420167E-11,\n      1.90451637722020886025E-9,\n      2.53479107902614945675E-7,\n      2.28621210311945178607E-5,\n      1.26461541144692592338E-3,\n      3.59799365153615016266E-2,\n      3.44289899924628486886E-1,\n      -5.35327393233902768720E-1};\n    const double B[] = {\n       5.30043377268626276149E-18, -1.64758043015242134646E-17,\n       5.21039150503902756861E-17, -1.67823109680541210385E-16,\n       5.51205597852431940784E-16, -1.84859337734377901440E-15,\n       6.34007647740507060557E-15, -2.22751332699166985548E-14,\n       8.03289077536357521100E-14, -2.98009692317273043925E-13,\n       1.14034058820847496303E-12, -4.51459788337394416547E-12,\n       1.85594911495471785253E-11, -7.95748924447710747776E-11,\n       3.57739728140030116597E-10, -1.69753450938905987466E-9,\n       8.57403401741422608519E-9, -4.66048989768794782956E-8,\n       2.76681363944501510342E-7, -1.83175552271911948767E-6,\n       1.39498137188764993662E-5, -1.28495495816278026384E-4,\n       1.56988388573005337491E-3, -3.14481013119645005427E-2,\n       2.44030308206595545468E0\n    };\n    const T MAXNUM = pset1<T>(NumTraits<double>::infinity());\n    const T two = pset1<T>(2.0);\n    T x_le_two = internal::pchebevl<T, 10>::run(\n        pmadd(x, x, pset1<T>(-2.0)), A);\n    x_le_two = pmadd(\n        generic_i0<T, double>::run(x), pnegate(\n            plog(pmul(pset1<T>(0.5), x))), x_le_two);\n    x_le_two = pselect(pcmp_le(x, pset1<T>(0.0)), MAXNUM, x_le_two);\n    T x_gt_two = pmul(\n        pmul(\n            pexp(-x),\n            internal::pchebevl<T, 25>::run(\n                psub(pdiv(pset1<T>(8.0), x), two), B)),\n        prsqrt(x));\n    return pselect(pcmp_le(x, two), x_le_two, x_gt_two);\n  }\n};\n\ntemplate <typename Scalar>\nstruct bessel_k0_impl {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE Scalar run(const Scalar x) {\n    return generic_k0<Scalar, Scalar>::run(x);\n  }\n};\n\ntemplate <typename Scalar>\nstruct bessel_k1e_retval {\n  typedef Scalar type;\n};\n\ntemplate <typename T, typename ScalarType>\nstruct generic_k1e {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE T run(const T&) {\n    EIGEN_STATIC_ASSERT((internal::is_same<T, T>::value == false),\n                        THIS_TYPE_IS_NOT_SUPPORTED);\n    return ScalarType(0);\n  }\n};\n\ntemplate <typename T>\nstruct generic_k1e<T, float> {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE T run(const T& x) {\n    /* k1ef.c\n     *\n     *\tModified Bessel function, third kind, order one,\n     *\texponentially scaled\n     *\n     *\n     *\n     * SYNOPSIS:\n     *\n     * float x, y, k1ef();\n     *\n     * y = k1ef( x );\n     *\n     *\n     *\n     * DESCRIPTION:\n     *\n     * Returns exponentially scaled modified Bessel function\n     * of the third kind of order one of the argument:\n     *\n     *      k1e(x) = exp(x) * k1(x).\n     *\n     *\n     *\n     * ACCURACY:\n     *\n     *                      Relative error:\n     * arithmetic   domain     # trials      peak         rms\n     *    IEEE      0, 30       30000       4.9e-7      6.7e-8\n     * See k1().\n     *\n     */\n\n    const float A[] = {-2.21338763073472585583E-8f, -2.43340614156596823496E-6f,\n                        -1.73028895751305206302E-4f, -6.97572385963986435018E-3f,\n                        -1.22611180822657148235E-1f, -3.53155960776544875667E-1f,\n                        1.52530022733894777053E0f};\n    const float B[] = {2.01504975519703286596E-9f, -1.03457624656780970260E-8f,\n                       5.74108412545004946722E-8f, -3.50196060308781257119E-7f,\n                       2.40648494783721712015E-6f, -1.93619797416608296024E-5f,\n                       1.95215518471351631108E-4f, -2.85781685962277938680E-3f,\n                       1.03923736576817238437E-1f, 2.72062619048444266945E0f};\n    const T MAXNUM = pset1<T>(NumTraits<float>::infinity());\n    const T two = pset1<T>(2.0);\n    T x_le_two = pdiv(internal::pchebevl<T, 7>::run(\n        pmadd(x, x, pset1<T>(-2.0)), A), x);\n    x_le_two = pmadd(\n        generic_i1<T, float>::run(x), plog(pmul(pset1<T>(0.5), x)), x_le_two);\n    x_le_two = pmul(x_le_two, pexp(x));\n    x_le_two = pselect(pcmp_le(x, pset1<T>(0.0)), MAXNUM, x_le_two);\n    T x_gt_two = pmul(\n        internal::pchebevl<T, 10>::run(\n            psub(pdiv(pset1<T>(8.0), x), two), B),\n        prsqrt(x));\n    return pselect(pcmp_le(x, two), x_le_two, x_gt_two);\n  }\n};\n\ntemplate <typename T>\nstruct generic_k1e<T, double> {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE T run(const T& x) {\n    /*  k1e.c\n     *\n     *\tModified Bessel function, third kind, order one,\n     *\texponentially scaled\n     *\n     *\n     *\n     * SYNOPSIS:\n     *\n     * double x, y, k1e();\n     *\n     * y = k1e( x );\n     *\n     *\n     *\n     * DESCRIPTION:\n     *\n     * Returns exponentially scaled modified Bessel function\n     * of the third kind of order one of the argument:\n     *\n     *      k1e(x) = exp(x) * k1(x).\n     *\n     *\n     *\n     * ACCURACY:\n     *\n     *                      Relative error:\n     * arithmetic   domain     # trials      peak         rms\n     *    IEEE      0, 30       30000       7.8e-16     1.2e-16\n     * See k1().\n     *\n     */\n    const double A[] = {-7.02386347938628759343E-18, -2.42744985051936593393E-15,\n                        -6.66690169419932900609E-13, -1.41148839263352776110E-10,\n                        -2.21338763073472585583E-8, -2.43340614156596823496E-6,\n                        -1.73028895751305206302E-4, -6.97572385963986435018E-3,\n                        -1.22611180822657148235E-1, -3.53155960776544875667E-1,\n                        1.52530022733894777053E0};\n    const double B[] = {-5.75674448366501715755E-18, 1.79405087314755922667E-17,\n                        -5.68946255844285935196E-17, 1.83809354436663880070E-16,\n                        -6.05704724837331885336E-16, 2.03870316562433424052E-15,\n                        -7.01983709041831346144E-15, 2.47715442448130437068E-14,\n                        -8.97670518232499435011E-14, 3.34841966607842919884E-13,\n                        -1.28917396095102890680E-12, 5.13963967348173025100E-12,\n                        -2.12996783842756842877E-11, 9.21831518760500529508E-11,\n                        -4.19035475934189648750E-10, 2.01504975519703286596E-9,\n                        -1.03457624656780970260E-8, 5.74108412545004946722E-8,\n                        -3.50196060308781257119E-7, 2.40648494783721712015E-6,\n                        -1.93619797416608296024E-5, 1.95215518471351631108E-4,\n                        -2.85781685962277938680E-3, 1.03923736576817238437E-1,\n                        2.72062619048444266945E0};\n    const T MAXNUM = pset1<T>(NumTraits<double>::infinity());\n    const T two = pset1<T>(2.0);\n    T x_le_two = pdiv(internal::pchebevl<T, 11>::run(\n        pmadd(x, x, pset1<T>(-2.0)), A), x);\n    x_le_two = pmadd(\n        generic_i1<T, double>::run(x), plog(pmul(pset1<T>(0.5), x)), x_le_two);\n    x_le_two = pmul(x_le_two, pexp(x));\n    x_le_two = pselect(pcmp_le(x, pset1<T>(0.0)), MAXNUM, x_le_two);\n    T x_gt_two = pmul(\n        internal::pchebevl<T, 25>::run(\n            psub(pdiv(pset1<T>(8.0), x), two), B),\n        prsqrt(x));\n    return pselect(pcmp_le(x, two), x_le_two, x_gt_two);\n  }\n};\n\ntemplate <typename Scalar>\nstruct bessel_k1e_impl {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE Scalar run(const Scalar x) {\n    return generic_k1e<Scalar, Scalar>::run(x);\n  }\n};\n\ntemplate <typename Scalar>\nstruct bessel_k1_retval {\n  typedef Scalar type;\n};\n\ntemplate <typename T, typename ScalarType>\nstruct generic_k1 {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE T run(const T&) {\n    EIGEN_STATIC_ASSERT((internal::is_same<T, T>::value == false),\n                        THIS_TYPE_IS_NOT_SUPPORTED);\n    return ScalarType(0);\n  }\n};\n\ntemplate <typename T>\nstruct generic_k1<T, float> {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE T run(const T& x) {\n    /* k1f.c\n     *\tModified Bessel function, third kind, order one\n     *\n     *\n     *\n     * SYNOPSIS:\n     *\n     * float x, y, k1f();\n     *\n     * y = k1f( x );\n     *\n     *\n     *\n     * DESCRIPTION:\n     *\n     * Computes the modified Bessel function of the third kind\n     * of order one of the argument.\n     *\n     * The range is partitioned into the two intervals [0,2] and\n     * (2, infinity).  Chebyshev polynomial expansions are employed\n     * in each interval.\n     *\n     *\n     *\n     * ACCURACY:\n     *\n     *                      Relative error:\n     * arithmetic   domain     # trials      peak         rms\n     *    IEEE      0, 30       30000       4.6e-7      7.6e-8\n     *\n     * ERROR MESSAGES:\n     *\n     *   message         condition      value returned\n     * k1 domain          x <= 0          MAXNUM\n     *\n     */\n\n    const float A[] = {-2.21338763073472585583E-8f, -2.43340614156596823496E-6f,\n                        -1.73028895751305206302E-4f, -6.97572385963986435018E-3f,\n                        -1.22611180822657148235E-1f, -3.53155960776544875667E-1f,\n                        1.52530022733894777053E0f};\n    const float B[] = {2.01504975519703286596E-9f, -1.03457624656780970260E-8f,\n                       5.74108412545004946722E-8f, -3.50196060308781257119E-7f,\n                       2.40648494783721712015E-6f, -1.93619797416608296024E-5f,\n                       1.95215518471351631108E-4f, -2.85781685962277938680E-3f,\n                       1.03923736576817238437E-1f, 2.72062619048444266945E0f};\n    const T MAXNUM = pset1<T>(NumTraits<float>::infinity());\n    const T two = pset1<T>(2.0);\n    T x_le_two = pdiv(internal::pchebevl<T, 7>::run(\n        pmadd(x, x, pset1<T>(-2.0)), A), x);\n    x_le_two = pmadd(\n        generic_i1<T, float>::run(x), plog(pmul(pset1<T>(0.5), x)), x_le_two);\n    x_le_two = pselect(pcmp_le(x, pset1<T>(0.0)), MAXNUM, x_le_two);\n    T x_gt_two = pmul(\n        pexp(pnegate(x)),\n        pmul(\n            internal::pchebevl<T, 10>::run(\n                psub(pdiv(pset1<T>(8.0), x), two), B),\n            prsqrt(x)));\n    return pselect(pcmp_le(x, two), x_le_two, x_gt_two);\n  }\n};\n\ntemplate <typename T>\nstruct generic_k1<T, double> {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE T run(const T& x) {\n    /*  k1.c\n     *\tModified Bessel function, third kind, order one\n     *\n     *\n     *\n     * SYNOPSIS:\n     *\n     * float x, y, k1f();\n     *\n     * y = k1f( x );\n     *\n     *\n     *\n     * DESCRIPTION:\n     *\n     * Computes the modified Bessel function of the third kind\n     * of order one of the argument.\n     *\n     * The range is partitioned into the two intervals [0,2] and\n     * (2, infinity).  Chebyshev polynomial expansions are employed\n     * in each interval.\n     *\n     *\n     *\n     * ACCURACY:\n     *\n     *                      Relative error:\n     * arithmetic   domain     # trials      peak         rms\n     *    IEEE      0, 30       30000       4.6e-7      7.6e-8\n     *\n     * ERROR MESSAGES:\n     *\n     *   message         condition      value returned\n     * k1 domain          x <= 0          MAXNUM\n     *\n     */\n    const double A[] = {-7.02386347938628759343E-18, -2.42744985051936593393E-15,\n                        -6.66690169419932900609E-13, -1.41148839263352776110E-10,\n                        -2.21338763073472585583E-8, -2.43340614156596823496E-6,\n                        -1.73028895751305206302E-4, -6.97572385963986435018E-3,\n                        -1.22611180822657148235E-1, -3.53155960776544875667E-1,\n                        1.52530022733894777053E0};\n    const double B[] = {-5.75674448366501715755E-18, 1.79405087314755922667E-17,\n                        -5.68946255844285935196E-17, 1.83809354436663880070E-16,\n                        -6.05704724837331885336E-16, 2.03870316562433424052E-15,\n                        -7.01983709041831346144E-15, 2.47715442448130437068E-14,\n                        -8.97670518232499435011E-14, 3.34841966607842919884E-13,\n                        -1.28917396095102890680E-12, 5.13963967348173025100E-12,\n                        -2.12996783842756842877E-11, 9.21831518760500529508E-11,\n                        -4.19035475934189648750E-10, 2.01504975519703286596E-9,\n                        -1.03457624656780970260E-8, 5.74108412545004946722E-8,\n                        -3.50196060308781257119E-7, 2.40648494783721712015E-6,\n                        -1.93619797416608296024E-5, 1.95215518471351631108E-4,\n                        -2.85781685962277938680E-3, 1.03923736576817238437E-1,\n                        2.72062619048444266945E0};\n    const T MAXNUM = pset1<T>(NumTraits<double>::infinity());\n    const T two = pset1<T>(2.0);\n    T x_le_two = pdiv(internal::pchebevl<T, 11>::run(\n        pmadd(x, x, pset1<T>(-2.0)), A), x);\n    x_le_two = pmadd(\n        generic_i1<T, double>::run(x), plog(pmul(pset1<T>(0.5), x)), x_le_two);\n    x_le_two = pselect(pcmp_le(x, pset1<T>(0.0)), MAXNUM, x_le_two);\n    T x_gt_two = pmul(\n        pexp(-x),\n        pmul(\n            internal::pchebevl<T, 25>::run(\n                psub(pdiv(pset1<T>(8.0), x), two), B),\n            prsqrt(x)));\n    return pselect(pcmp_le(x, two), x_le_two, x_gt_two);\n  }\n};\n\ntemplate <typename Scalar>\nstruct bessel_k1_impl {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE Scalar run(const Scalar x) {\n    return generic_k1<Scalar, Scalar>::run(x);\n  }\n};\n\ntemplate <typename Scalar>\nstruct bessel_j0_retval {\n  typedef Scalar type;\n};\n\ntemplate <typename T, typename ScalarType>\nstruct generic_j0 {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE T run(const T&) {\n    EIGEN_STATIC_ASSERT((internal::is_same<T, T>::value == false),\n                        THIS_TYPE_IS_NOT_SUPPORTED);\n    return ScalarType(0);\n  }\n};\n\ntemplate <typename T>\nstruct generic_j0<T, float> {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE T run(const T& x) {\n    /* j0f.c\n     *\tBessel function of order zero\n     *\n     *\n     *\n     * SYNOPSIS:\n     *\n     * float x, y, j0f();\n     *\n     * y = j0f( x );\n     *\n     *\n     *\n     * DESCRIPTION:\n     *\n     * Returns Bessel function of order zero of the argument.\n     *\n     * The domain is divided into the intervals [0, 2] and\n     * (2, infinity). In the first interval the following polynomial\n     * approximation is used:\n     *\n     *\n     *        2         2         2\n     * (w - r  ) (w - r  ) (w - r  ) P(w)\n     *       1         2         3\n     *\n     *            2\n     * where w = x  and the three r's are zeros of the function.\n     *\n     * In the second interval, the modulus and phase are approximated\n     * by polynomials of the form Modulus(x) = sqrt(1/x) Q(1/x)\n     * and Phase(x) = x + 1/x R(1/x^2) - pi/4.  The function is\n     *\n     *   j0(x) = Modulus(x) cos( Phase(x) ).\n     *\n     *\n     *\n     * ACCURACY:\n     *\n     *                      Absolute error:\n     * arithmetic   domain     # trials      peak         rms\n     *    IEEE      0, 2        100000      1.3e-7      3.6e-8\n     *    IEEE      2, 32       100000      1.9e-7      5.4e-8\n     *\n     */\n\n    const float JP[] = {-6.068350350393235E-008f, 6.388945720783375E-006f,\n                        -3.969646342510940E-004f, 1.332913422519003E-002f,\n                        -1.729150680240724E-001f};\n    const float MO[] = {-6.838999669318810E-002f, 1.864949361379502E-001f,\n                        -2.145007480346739E-001f, 1.197549369473540E-001f,\n                        -3.560281861530129E-003f, -4.969382655296620E-002f,\n                        -3.355424622293709E-006f, 7.978845717621440E-001f};\n    const float PH[] = {3.242077816988247E+001f, -3.630592630518434E+001f,\n                        1.756221482109099E+001f, -4.974978466280903E+000f,\n                        1.001973420681837E+000f, -1.939906941791308E-001f,\n                        6.490598792654666E-002f, -1.249992184872738E-001f};\n    const T DR1 =  pset1<T>(5.78318596294678452118f);\n    const T NEG_PIO4F = pset1<T>(-0.7853981633974483096f); /* -pi / 4 */\n    T y = pabs(x);\n    T z = pmul(y, y);\n    T y_le_two = pselect(\n        pcmp_lt(y, pset1<T>(1.0e-3f)),\n        pmadd(z, pset1<T>(-0.25f), pset1<T>(1.0f)),\n        pmul(psub(z, DR1), internal::ppolevl<T, 4>::run(z, JP)));\n    T q = pdiv(pset1<T>(1.0f), y);\n    T w = prsqrt(y);\n    T p = pmul(w, internal::ppolevl<T, 7>::run(q, MO));\n    w = pmul(q, q);\n    T yn = pmadd(q, internal::ppolevl<T, 7>::run(w, PH), NEG_PIO4F);\n    T y_gt_two = pmul(p, pcos(padd(yn, y)));\n    return pselect(pcmp_le(y, pset1<T>(2.0)), y_le_two, y_gt_two);\n  }\n};\n\ntemplate <typename T>\nstruct generic_j0<T, double> {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE T run(const T& x) {\n    /*  j0.c\n     *\tBessel function of order zero\n     *\n     *\n     *\n     * SYNOPSIS:\n     *\n     * double x, y, j0();\n     *\n     * y = j0( x );\n     *\n     *\n     *\n     * DESCRIPTION:\n     *\n     * Returns Bessel function of order zero of the argument.\n     *\n     * The domain is divided into the intervals [0, 5] and\n     * (5, infinity). In the first interval the following rational\n     * approximation is used:\n     *\n     *\n     *        2         2\n     * (w - r  ) (w - r  ) P (w) / Q (w)\n     *       1         2    3       8\n     *\n     *            2\n     * where w = x  and the two r's are zeros of the function.\n     *\n     * In the second interval, the Hankel asymptotic expansion\n     * is employed with two rational functions of degree 6/6\n     * and 7/7.\n     *\n     *\n     *\n     * ACCURACY:\n     *\n     *                      Absolute error:\n     * arithmetic   domain     # trials      peak         rms\n     *    DEC       0, 30       10000       4.4e-17     6.3e-18\n     *    IEEE      0, 30       60000       4.2e-16     1.1e-16\n     *\n     */\n    const double PP[] = {7.96936729297347051624E-4, 8.28352392107440799803E-2,\n                        1.23953371646414299388E0, 5.44725003058768775090E0,\n                        8.74716500199817011941E0, 5.30324038235394892183E0,\n                        9.99999999999999997821E-1};\n    const double PQ[] = {9.24408810558863637013E-4, 8.56288474354474431428E-2,\n                         1.25352743901058953537E0, 5.47097740330417105182E0,\n                         8.76190883237069594232E0, 5.30605288235394617618E0,\n                         1.00000000000000000218E0};\n    const double QP[] = {-1.13663838898469149931E-2, -1.28252718670509318512E0,\n                         -1.95539544257735972385E1, -9.32060152123768231369E1,\n                         -1.77681167980488050595E2, -1.47077505154951170175E2,\n                         -5.14105326766599330220E1, -6.05014350600728481186E0};\n    const double QQ[] = {1.00000000000000000000E0, 6.43178256118178023184E1,\n                         8.56430025976980587198E2, 3.88240183605401609683E3,\n                         7.24046774195652478189E3, 5.93072701187316984827E3,\n                         2.06209331660327847417E3, 2.42005740240291393179E2};\n    const double RP[] = {-4.79443220978201773821E9, 1.95617491946556577543E12,\n                         -2.49248344360967716204E14, 9.70862251047306323952E15};\n    const double RQ[] = {1.00000000000000000000E0, 4.99563147152651017219E2,\n                         1.73785401676374683123E5, 4.84409658339962045305E7,\n                         1.11855537045356834862E10, 2.11277520115489217587E12,\n                         3.10518229857422583814E14, 3.18121955943204943306E16,\n                         1.71086294081043136091E18};\n    const T DR1 = pset1<T>(5.78318596294678452118E0);\n    const T DR2 = pset1<T>(3.04712623436620863991E1);\n    const T SQ2OPI = pset1<T>(7.9788456080286535587989E-1); /* sqrt(2 / pi) */\n    const T NEG_PIO4 = pset1<T>(-0.7853981633974483096); /* pi / 4 */\n\n    T y = pabs(x);\n    T z = pmul(y, y);\n    T y_le_five = pselect(\n        pcmp_lt(y, pset1<T>(1.0e-5)),\n        pmadd(z, pset1<T>(-0.25), pset1<T>(1.0)),\n        pmul(pmul(psub(z, DR1), psub(z, DR2)),\n             pdiv(internal::ppolevl<T, 3>::run(z, RP),\n                  internal::ppolevl<T, 8>::run(z, RQ))));\n    T s = pdiv(pset1<T>(25.0), z);\n    T p = pdiv(\n        internal::ppolevl<T, 6>::run(s, PP),\n        internal::ppolevl<T, 6>::run(s, PQ));\n    T q = pdiv(\n        internal::ppolevl<T, 7>::run(s, QP),\n        internal::ppolevl<T, 7>::run(s, QQ));\n    T yn = padd(y, NEG_PIO4);\n    T w = pdiv(pset1<T>(-5.0), y);\n    p = pmadd(p, pcos(yn), pmul(w, pmul(q, psin(yn))));\n    T y_gt_five = pmul(p, pmul(SQ2OPI, prsqrt(y)));\n    return pselect(pcmp_le(y, pset1<T>(5.0)), y_le_five, y_gt_five);\n  }\n};\n\ntemplate <typename Scalar>\nstruct bessel_j0_impl {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE Scalar run(const Scalar x) {\n    return generic_j0<Scalar, Scalar>::run(x);\n  }\n};\n\ntemplate <typename Scalar>\nstruct bessel_y0_retval {\n  typedef Scalar type;\n};\n\ntemplate <typename T, typename ScalarType>\nstruct generic_y0 {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE T run(const T&) {\n    EIGEN_STATIC_ASSERT((internal::is_same<T, T>::value == false),\n                        THIS_TYPE_IS_NOT_SUPPORTED);\n    return ScalarType(0);\n  }\n};\n\ntemplate <typename T>\nstruct generic_y0<T, float> {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE T run(const T& x) {\n    /* j0f.c\n     * \tBessel function of the second kind, order zero\n     *\n     *\n     *\n     * SYNOPSIS:\n     *\n     * float x, y, y0f();\n     *\n     * y = y0f( x );\n     *\n     *\n     *\n     * DESCRIPTION:\n     *\n     * Returns Bessel function of the second kind, of order\n     * zero, of the argument.\n     *\n     * The domain is divided into the intervals [0, 2] and\n     * (2, infinity). In the first interval a rational approximation\n     * R(x) is employed to compute\n     *\n     *                  2         2         2\n     * y0(x)  =  (w - r  ) (w - r  ) (w - r  ) R(x)  +  2/pi ln(x) j0(x).\n     *                 1         2         3\n     *\n     * Thus a call to j0() is required.  The three zeros are removed\n     * from R(x) to improve its numerical stability.\n     *\n     * In the second interval, the modulus and phase are approximated\n     * by polynomials of the form Modulus(x) = sqrt(1/x) Q(1/x)\n     * and Phase(x) = x + 1/x S(1/x^2) - pi/4.  Then the function is\n     *\n     *   y0(x) = Modulus(x) sin( Phase(x) ).\n     *\n     *\n     *\n     *\n     * ACCURACY:\n     *\n     *  Absolute error, when y0(x) < 1; else relative error:\n     *\n     * arithmetic   domain     # trials      peak         rms\n     *    IEEE      0,  2       100000      2.4e-7      3.4e-8\n     *    IEEE      2, 32       100000      1.8e-7      5.3e-8\n     *\n     */\n\n    const float YP[] = {9.454583683980369E-008f, -9.413212653797057E-006f,\n                        5.344486707214273E-004f, -1.584289289821316E-002f,\n                        1.707584643733568E-001f};\n    const float MO[] = {-6.838999669318810E-002f, 1.864949361379502E-001f,\n                        -2.145007480346739E-001f, 1.197549369473540E-001f,\n                        -3.560281861530129E-003f, -4.969382655296620E-002f,\n                        -3.355424622293709E-006f, 7.978845717621440E-001f};\n    const float PH[] = {3.242077816988247E+001f, -3.630592630518434E+001f,\n                        1.756221482109099E+001f, -4.974978466280903E+000f,\n                        1.001973420681837E+000f, -1.939906941791308E-001f,\n                        6.490598792654666E-002f, -1.249992184872738E-001f};\n    const T YZ1 = pset1<T>(0.43221455686510834878f);\n    const T TWOOPI =  pset1<T>(0.636619772367581343075535f); /* 2 / pi */\n    const T NEG_PIO4F = pset1<T>(-0.7853981633974483096f); /* -pi / 4 */\n    const T NEG_MAXNUM = pset1<T>(-NumTraits<float>::infinity());\n    T z = pmul(x, x);\n    T x_le_two = pmul(TWOOPI, pmul(plog(x), generic_j0<T, float>::run(x)));\n    x_le_two = pmadd(\n        psub(z, YZ1), internal::ppolevl<T, 4>::run(z, YP), x_le_two);\n    x_le_two = pselect(pcmp_le(x, pset1<T>(0.0)), NEG_MAXNUM, x_le_two);\n    T q = pdiv(pset1<T>(1.0), x);\n    T w = prsqrt(x);\n    T p = pmul(w, internal::ppolevl<T, 7>::run(q, MO));\n    T u = pmul(q, q);\n    T xn = pmadd(q, internal::ppolevl<T, 7>::run(u, PH), NEG_PIO4F);\n    T x_gt_two = pmul(p, psin(padd(xn, x)));\n    return pselect(pcmp_le(x, pset1<T>(2.0)), x_le_two, x_gt_two);\n  }\n};\n\ntemplate <typename T>\nstruct generic_y0<T, double> {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE T run(const T& x) {\n    /*  j0.c\n     *\tBessel function of the second kind, order zero\n     *\n     *\n     *\n     * SYNOPSIS:\n     *\n     * double x, y, y0();\n     *\n     * y = y0( x );\n     *\n     *\n     *\n     * DESCRIPTION:\n     *\n     * Returns Bessel function of the second kind, of order\n     * zero, of the argument.\n     *\n     * The domain is divided into the intervals [0, 5] and\n     * (5, infinity). In the first interval a rational approximation\n     * R(x) is employed to compute\n     *   y0(x)  = R(x)  +   2 * log(x) * j0(x) / PI.\n     * Thus a call to j0() is required.\n     *\n     * In the second interval, the Hankel asymptotic expansion\n     * is employed with two rational functions of degree 6/6\n     * and 7/7.\n     *\n     *\n     *\n     * ACCURACY:\n     *\n     *  Absolute error, when y0(x) < 1; else relative error:\n     *\n     * arithmetic   domain     # trials      peak         rms\n     *    DEC       0, 30        9400       7.0e-17     7.9e-18\n     *    IEEE      0, 30       30000       1.3e-15     1.6e-16\n     *\n     */\n    const double PP[] = {7.96936729297347051624E-4, 8.28352392107440799803E-2,\n                        1.23953371646414299388E0, 5.44725003058768775090E0,\n                        8.74716500199817011941E0, 5.30324038235394892183E0,\n                        9.99999999999999997821E-1};\n    const double PQ[] = {9.24408810558863637013E-4, 8.56288474354474431428E-2,\n                         1.25352743901058953537E0, 5.47097740330417105182E0,\n                         8.76190883237069594232E0, 5.30605288235394617618E0,\n                         1.00000000000000000218E0};\n    const double QP[] = {-1.13663838898469149931E-2, -1.28252718670509318512E0,\n                         -1.95539544257735972385E1, -9.32060152123768231369E1,\n                         -1.77681167980488050595E2, -1.47077505154951170175E2,\n                         -5.14105326766599330220E1, -6.05014350600728481186E0};\n    const double QQ[] = {1.00000000000000000000E0, 6.43178256118178023184E1,\n                         8.56430025976980587198E2, 3.88240183605401609683E3,\n                         7.24046774195652478189E3, 5.93072701187316984827E3,\n                         2.06209331660327847417E3, 2.42005740240291393179E2};\n    const double YP[] = {1.55924367855235737965E4, -1.46639295903971606143E7,\n                         5.43526477051876500413E9, -9.82136065717911466409E11,\n                         8.75906394395366999549E13, -3.46628303384729719441E15,\n                         4.42733268572569800351E16, -1.84950800436986690637E16};\n    const double YQ[] = {1.00000000000000000000E0,  1.04128353664259848412E3,\n                         6.26107330137134956842E5, 2.68919633393814121987E8,\n                         8.64002487103935000337E10, 2.02979612750105546709E13,\n                         3.17157752842975028269E15, 2.50596256172653059228E17};\n    const T SQ2OPI = pset1<T>(7.9788456080286535587989E-1); /* sqrt(2 / pi) */\n    const T TWOOPI =  pset1<T>(0.636619772367581343075535); /* 2 / pi */\n    const T NEG_PIO4 = pset1<T>(-0.7853981633974483096); /* -pi / 4 */\n    const T NEG_MAXNUM = pset1<T>(-NumTraits<double>::infinity());\n\n    T z = pmul(x, x);\n    T x_le_five = pdiv(internal::ppolevl<T, 7>::run(z, YP),\n                       internal::ppolevl<T, 7>::run(z, YQ));\n    x_le_five = pmadd(\n        pmul(TWOOPI, plog(x)), generic_j0<T, double>::run(x), x_le_five);\n    x_le_five = pselect(pcmp_le(x, pset1<T>(0.0)), NEG_MAXNUM, x_le_five);\n    T s = pdiv(pset1<T>(25.0), z);\n    T p = pdiv(\n        internal::ppolevl<T, 6>::run(s, PP),\n        internal::ppolevl<T, 6>::run(s, PQ));\n    T q = pdiv(\n        internal::ppolevl<T, 7>::run(s, QP),\n        internal::ppolevl<T, 7>::run(s, QQ));\n    T xn = padd(x, NEG_PIO4);\n    T w = pdiv(pset1<T>(5.0), x);\n    p = pmadd(p, psin(xn), pmul(w, pmul(q, pcos(xn))));\n    T x_gt_five = pmul(p, pmul(SQ2OPI, prsqrt(x)));\n    return pselect(pcmp_le(x, pset1<T>(5.0)), x_le_five, x_gt_five);\n  }\n};\n\ntemplate <typename Scalar>\nstruct bessel_y0_impl {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE Scalar run(const Scalar x) {\n    return generic_y0<Scalar, Scalar>::run(x);\n  }\n};\n\ntemplate <typename Scalar>\nstruct bessel_j1_retval {\n  typedef Scalar type;\n};\n\ntemplate <typename T, typename ScalarType>\nstruct generic_j1 {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE T run(const T&) {\n    EIGEN_STATIC_ASSERT((internal::is_same<T, T>::value == false),\n                        THIS_TYPE_IS_NOT_SUPPORTED);\n    return ScalarType(0);\n  }\n};\n\ntemplate <typename T>\nstruct generic_j1<T, float> {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE T run(const T& x) {\n    /* j1f.c\n     *\tBessel function of order one\n     *\n     *\n     *\n     * SYNOPSIS:\n     *\n     * float x, y, j1f();\n     *\n     * y = j1f( x );\n     *\n     *\n     *\n     * DESCRIPTION:\n     *\n     * Returns Bessel function of order one of the argument.\n     *\n     * The domain is divided into the intervals [0, 2] and\n     * (2, infinity). In the first interval a polynomial approximation\n     *        2\n     * (w - r  ) x P(w)\n     *       1\n     *                     2\n     * is used, where w = x  and r is the first zero of the function.\n     *\n     * In the second interval, the modulus and phase are approximated\n     * by polynomials of the form Modulus(x) = sqrt(1/x) Q(1/x)\n     * and Phase(x) = x + 1/x R(1/x^2) - 3pi/4.  The function is\n     *\n     *   j0(x) = Modulus(x) cos( Phase(x) ).\n     *\n     *\n     *\n     * ACCURACY:\n     *\n     *                      Absolute error:\n     * arithmetic   domain      # trials      peak       rms\n     *    IEEE      0,  2       100000       1.2e-7     2.5e-8\n     *    IEEE      2, 32       100000       2.0e-7     5.3e-8\n     *\n     *\n     */\n\n    const float JP[] = {-4.878788132172128E-009f, 6.009061827883699E-007f,\n                        -4.541343896997497E-005f, 1.937383947804541E-003f,\n                        -3.405537384615824E-002f};\n    const float MO1[] = {6.913942741265801E-002f, -2.284801500053359E-001f,\n                        3.138238455499697E-001f, -2.102302420403875E-001f,\n                        5.435364690523026E-003f, 1.493389585089498E-001f,\n                        4.976029650847191E-006f, 7.978845453073848E-001f};\n    const float PH1[] = {-4.497014141919556E+001f, 5.073465654089319E+001f,\n                        -2.485774108720340E+001f, 7.222973196770240E+000f,\n                        -1.544842782180211E+000f, 3.503787691653334E-001f,\n                        -1.637986776941202E-001f, 3.749989509080821E-001f};\n    const T Z1 = pset1<T>(1.46819706421238932572E1f);\n    const T NEG_THPIO4F = pset1<T>(-2.35619449019234492885f);    /* -3*pi/4 */\n\n    T y = pabs(x);\n    T z = pmul(y, y);\n    T y_le_two = pmul(\n        psub(z, Z1),\n        pmul(x, internal::ppolevl<T, 4>::run(z, JP)));\n    T q = pdiv(pset1<T>(1.0f), y);\n    T w = prsqrt(y);\n    T p = pmul(w, internal::ppolevl<T, 7>::run(q, MO1));\n    w = pmul(q, q);\n    T yn = pmadd(q, internal::ppolevl<T, 7>::run(w, PH1), NEG_THPIO4F);\n    T y_gt_two = pmul(p, pcos(padd(yn, y)));\n    // j1 is an odd function. This implementation differs from cephes to\n    // take this fact in to account. Cephes returns -j1(x) for y > 2 range.\n    y_gt_two = pselect(\n        pcmp_lt(x, pset1<T>(0.0f)), pnegate(y_gt_two), y_gt_two);\n    return pselect(pcmp_le(y, pset1<T>(2.0f)), y_le_two, y_gt_two);\n  }\n};\n\ntemplate <typename T>\nstruct generic_j1<T, double> {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE T run(const T& x) {\n    /*  j1.c\n     *\tBessel function of order one\n     *\n     *\n     *\n     * SYNOPSIS:\n     *\n     * double x, y, j1();\n     *\n     * y = j1( x );\n     *\n     *\n     *\n     * DESCRIPTION:\n     *\n     * Returns Bessel function of order one of the argument.\n     *\n     * The domain is divided into the intervals [0, 8] and\n     * (8, infinity). In the first interval a 24 term Chebyshev\n     * expansion is used. In the second, the asymptotic\n     * trigonometric representation is employed using two\n     * rational functions of degree 5/5.\n     *\n     *\n     *\n     * ACCURACY:\n     *\n     *                      Absolute error:\n     * arithmetic   domain      # trials      peak         rms\n     *    DEC       0, 30       10000       4.0e-17     1.1e-17\n     *    IEEE      0, 30       30000       2.6e-16     1.1e-16\n     *\n     */\n    const double PP[] = {7.62125616208173112003E-4, 7.31397056940917570436E-2,\n                         1.12719608129684925192E0, 5.11207951146807644818E0,\n                         8.42404590141772420927E0, 5.21451598682361504063E0,\n                         1.00000000000000000254E0};\n    const double PQ[] = {5.71323128072548699714E-4, 6.88455908754495404082E-2,\n                         1.10514232634061696926E0, 5.07386386128601488557E0,\n                         8.39985554327604159757E0, 5.20982848682361821619E0,\n                         9.99999999999999997461E-1};\n    const double QP[] = {5.10862594750176621635E-2, 4.98213872951233449420E0,\n                         7.58238284132545283818E1, 3.66779609360150777800E2,\n                         7.10856304998926107277E2, 5.97489612400613639965E2,\n                         2.11688757100572135698E2, 2.52070205858023719784E1};\n    const double QQ[] = {1.00000000000000000000E0, 7.42373277035675149943E1,\n                         1.05644886038262816351E3, 4.98641058337653607651E3,\n                         9.56231892404756170795E3, 7.99704160447350683650E3,\n                         2.82619278517639096600E3, 3.36093607810698293419E2};\n    const double RP[] = {-8.99971225705559398224E8, 4.52228297998194034323E11,\n                         -7.27494245221818276015E13, 3.68295732863852883286E15};\n    const double RQ[] = {1.00000000000000000000E0, 6.20836478118054335476E2,\n                         2.56987256757748830383E5, 8.35146791431949253037E7,\n                         2.21511595479792499675E10, 4.74914122079991414898E12,\n                         7.84369607876235854894E14, 8.95222336184627338078E16,\n                         5.32278620332680085395E18};\n    const T Z1 = pset1<T>(1.46819706421238932572E1);\n    const T Z2 = pset1<T>(4.92184563216946036703E1);\n    const T NEG_THPIO4 = pset1<T>(-2.35619449019234492885);    /* -3*pi/4 */\n    const T SQ2OPI = pset1<T>(7.9788456080286535587989E-1); /* sqrt(2 / pi) */\n    T y = pabs(x);\n    T z = pmul(y, y);\n    T y_le_five = pdiv(internal::ppolevl<T, 3>::run(z, RP),\n                       internal::ppolevl<T, 8>::run(z, RQ));\n    y_le_five = pmul(pmul(pmul(y_le_five, x), psub(z, Z1)), psub(z, Z2));\n    T s = pdiv(pset1<T>(25.0), z);\n    T p = pdiv(\n        internal::ppolevl<T, 6>::run(s, PP),\n        internal::ppolevl<T, 6>::run(s, PQ));\n    T q = pdiv(\n        internal::ppolevl<T, 7>::run(s, QP),\n        internal::ppolevl<T, 7>::run(s, QQ));\n    T yn = padd(y, NEG_THPIO4);\n    T w = pdiv(pset1<T>(-5.0), y);\n    p = pmadd(p, pcos(yn), pmul(w, pmul(q, psin(yn))));\n    T y_gt_five = pmul(p, pmul(SQ2OPI, prsqrt(y)));\n    // j1 is an odd function. This implementation differs from cephes to\n    // take this fact in to account. Cephes returns -j1(x) for y > 5 range.\n    y_gt_five = pselect(\n        pcmp_lt(x, pset1<T>(0.0)), pnegate(y_gt_five), y_gt_five);\n    return pselect(pcmp_le(y, pset1<T>(5.0)), y_le_five, y_gt_five);\n  }\n};\n\ntemplate <typename Scalar>\nstruct bessel_j1_impl {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE Scalar run(const Scalar x) {\n    return generic_j1<Scalar, Scalar>::run(x);\n  }\n};\n\ntemplate <typename Scalar>\nstruct bessel_y1_retval {\n  typedef Scalar type;\n};\n\ntemplate <typename T, typename ScalarType>\nstruct generic_y1 {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE T run(const T&) {\n    EIGEN_STATIC_ASSERT((internal::is_same<T, T>::value == false),\n                        THIS_TYPE_IS_NOT_SUPPORTED);\n    return ScalarType(0);\n  }\n};\n\ntemplate <typename T>\nstruct generic_y1<T, float> {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE T run(const T& x) {\n    /* j1f.c\n     *\tBessel function of second kind of order one\n     *\n     *\n     *\n     * SYNOPSIS:\n     *\n     * double x, y, y1();\n     *\n     * y = y1( x );\n     *\n     *\n     *\n     * DESCRIPTION:\n     *\n     * Returns Bessel function of the second kind of order one\n     * of the argument.\n     *\n     * The domain is divided into the intervals [0, 2] and\n     * (2, infinity). In the first interval a rational approximation\n     * R(x) is employed to compute\n     *\n     *                  2\n     * y0(x)  =  (w - r  ) x R(x^2)  +  2/pi (ln(x) j1(x) - 1/x) .\n     *                 1\n     *\n     * Thus a call to j1() is required.\n     *\n     * In the second interval, the modulus and phase are approximated\n     * by polynomials of the form Modulus(x) = sqrt(1/x) Q(1/x)\n     * and Phase(x) = x + 1/x S(1/x^2) - 3pi/4.  Then the function is\n     *\n     *   y0(x) = Modulus(x) sin( Phase(x) ).\n     *\n     *\n     *\n     *\n     * ACCURACY:\n     *\n     *                      Absolute error:\n     * arithmetic   domain      # trials      peak         rms\n     *    IEEE      0,  2       100000       2.2e-7     4.6e-8\n     *    IEEE      2, 32       100000       1.9e-7     5.3e-8\n     *\n     * (error criterion relative when |y1| > 1).\n     *\n     */\n\n    const float YP[] = {8.061978323326852E-009f, -9.496460629917016E-007f,\n                        6.719543806674249E-005f, -2.641785726447862E-003f,\n                        4.202369946500099E-002f};\n    const float MO1[] = {6.913942741265801E-002f, -2.284801500053359E-001f,\n                        3.138238455499697E-001f, -2.102302420403875E-001f,\n                        5.435364690523026E-003f, 1.493389585089498E-001f,\n                        4.976029650847191E-006f, 7.978845453073848E-001f};\n    const float PH1[] = {-4.497014141919556E+001f, 5.073465654089319E+001f,\n                        -2.485774108720340E+001f, 7.222973196770240E+000f,\n                        -1.544842782180211E+000f, 3.503787691653334E-001f,\n                        -1.637986776941202E-001f, 3.749989509080821E-001f};\n    const T YO1 = pset1<T>(4.66539330185668857532f);\n    const T NEG_THPIO4F = pset1<T>(-2.35619449019234492885f);    /* -3*pi/4 */\n    const T TWOOPI = pset1<T>(0.636619772367581343075535f); /* 2/pi */\n    const T NEG_MAXNUM = pset1<T>(-NumTraits<float>::infinity());\n\n    T z = pmul(x, x);\n    T x_le_two = pmul(psub(z, YO1), internal::ppolevl<T, 4>::run(z, YP));\n    x_le_two = pmadd(\n       x_le_two, x,\n       pmul(TWOOPI, pmadd(\n           generic_j1<T, float>::run(x), plog(x),\n           pdiv(pset1<T>(-1.0f), x))));\n    x_le_two = pselect(pcmp_lt(x, pset1<T>(0.0f)), NEG_MAXNUM, x_le_two);\n\n    T q = pdiv(pset1<T>(1.0), x);\n    T w = prsqrt(x);\n    T p = pmul(w, internal::ppolevl<T, 7>::run(q, MO1));\n    w = pmul(q, q);\n    T xn = pmadd(q, internal::ppolevl<T, 7>::run(w, PH1), NEG_THPIO4F);\n    T x_gt_two = pmul(p, psin(padd(xn, x)));\n    return pselect(pcmp_le(x, pset1<T>(2.0)), x_le_two, x_gt_two);\n  }\n};\n\ntemplate <typename T>\nstruct generic_y1<T, double> {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE T run(const T& x) {\n    /*  j1.c\n     *\tBessel function of second kind of order one\n     *\n     *\n     *\n     * SYNOPSIS:\n     *\n     * double x, y, y1();\n     *\n     * y = y1( x );\n     *\n     *\n     *\n     * DESCRIPTION:\n     *\n     * Returns Bessel function of the second kind of order one\n     * of the argument.\n     *\n     * The domain is divided into the intervals [0, 8] and\n     * (8, infinity). In the first interval a 25 term Chebyshev\n     * expansion is used, and a call to j1() is required.\n     * In the second, the asymptotic trigonometric representation\n     * is employed using two rational functions of degree 5/5.\n     *\n     *\n     *\n     * ACCURACY:\n     *\n     *                      Absolute error:\n     * arithmetic   domain      # trials      peak         rms\n     *    DEC       0, 30       10000       8.6e-17     1.3e-17\n     *    IEEE      0, 30       30000       1.0e-15     1.3e-16\n     *\n     * (error criterion relative when |y1| > 1).\n     *\n     */\n    const double PP[] = {7.62125616208173112003E-4, 7.31397056940917570436E-2,\n                         1.12719608129684925192E0, 5.11207951146807644818E0,\n                         8.42404590141772420927E0, 5.21451598682361504063E0,\n                         1.00000000000000000254E0};\n    const double PQ[] = {5.71323128072548699714E-4, 6.88455908754495404082E-2,\n                         1.10514232634061696926E0, 5.07386386128601488557E0,\n                         8.39985554327604159757E0, 5.20982848682361821619E0,\n                         9.99999999999999997461E-1};\n    const double QP[] = {5.10862594750176621635E-2, 4.98213872951233449420E0,\n                         7.58238284132545283818E1, 3.66779609360150777800E2,\n                         7.10856304998926107277E2, 5.97489612400613639965E2,\n                         2.11688757100572135698E2, 2.52070205858023719784E1};\n    const double QQ[] = {1.00000000000000000000E0, 7.42373277035675149943E1,\n                         1.05644886038262816351E3, 4.98641058337653607651E3,\n                         9.56231892404756170795E3, 7.99704160447350683650E3,\n                         2.82619278517639096600E3, 3.36093607810698293419E2};\n    const double YP[] = {1.26320474790178026440E9, -6.47355876379160291031E11,\n                         1.14509511541823727583E14, -8.12770255501325109621E15,\n                         2.02439475713594898196E17, -7.78877196265950026825E17};\n    const double YQ[] = {1.00000000000000000000E0, 5.94301592346128195359E2,\n                         2.35564092943068577943E5, 7.34811944459721705660E7,\n                         1.87601316108706159478E10, 3.88231277496238566008E12,\n                         6.20557727146953693363E14, 6.87141087355300489866E16,\n                         3.97270608116560655612E18};\n    const T SQ2OPI = pset1<T>(.79788456080286535588);\n    const T NEG_THPIO4 = pset1<T>(-2.35619449019234492885);    /* -3*pi/4 */\n    const T TWOOPI = pset1<T>(0.636619772367581343075535); /* 2/pi */\n    const T NEG_MAXNUM = pset1<T>(-NumTraits<double>::infinity());\n\n    T z = pmul(x, x);\n    T x_le_five = pdiv(internal::ppolevl<T, 5>::run(z, YP),\n                   internal::ppolevl<T, 8>::run(z, YQ));\n    x_le_five = pmadd(\n        x_le_five, x, pmul(\n            TWOOPI, pmadd(generic_j1<T, double>::run(x), plog(x),\n                          pdiv(pset1<T>(-1.0), x))));\n\n    x_le_five = pselect(pcmp_le(x, pset1<T>(0.0)), NEG_MAXNUM, x_le_five);\n    T s = pdiv(pset1<T>(25.0), z);\n    T p = pdiv(\n        internal::ppolevl<T, 6>::run(s, PP),\n        internal::ppolevl<T, 6>::run(s, PQ));\n    T q = pdiv(\n        internal::ppolevl<T, 7>::run(s, QP),\n        internal::ppolevl<T, 7>::run(s, QQ));\n    T xn = padd(x, NEG_THPIO4);\n    T w = pdiv(pset1<T>(5.0), x);\n    p = pmadd(p, psin(xn), pmul(w, pmul(q, pcos(xn))));\n    T x_gt_five = pmul(p, pmul(SQ2OPI, prsqrt(x)));\n    return pselect(pcmp_le(x, pset1<T>(5.0)), x_le_five, x_gt_five);\n  }\n};\n\ntemplate <typename Scalar>\nstruct bessel_y1_impl {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE Scalar run(const Scalar x) {\n    return generic_y1<Scalar, Scalar>::run(x);\n  }\n};\n\n}  // end namespace internal\n\nnamespace numext {\n\ntemplate <typename Scalar>\nEIGEN_DEVICE_FUNC inline EIGEN_MATHFUNC_RETVAL(bessel_i0, Scalar)\n    bessel_i0(const Scalar& x) {\n  return EIGEN_MATHFUNC_IMPL(bessel_i0, Scalar)::run(x);\n}\n\ntemplate <typename Scalar>\nEIGEN_DEVICE_FUNC inline EIGEN_MATHFUNC_RETVAL(bessel_i0e, Scalar)\n    bessel_i0e(const Scalar& x) {\n  return EIGEN_MATHFUNC_IMPL(bessel_i0e, Scalar)::run(x);\n}\n\ntemplate <typename Scalar>\nEIGEN_DEVICE_FUNC inline EIGEN_MATHFUNC_RETVAL(bessel_i1, Scalar)\n    bessel_i1(const Scalar& x) {\n  return EIGEN_MATHFUNC_IMPL(bessel_i1, Scalar)::run(x);\n}\n\ntemplate <typename Scalar>\nEIGEN_DEVICE_FUNC inline EIGEN_MATHFUNC_RETVAL(bessel_i1e, Scalar)\n    bessel_i1e(const Scalar& x) {\n  return EIGEN_MATHFUNC_IMPL(bessel_i1e, Scalar)::run(x);\n}\n\ntemplate <typename Scalar>\nEIGEN_DEVICE_FUNC inline EIGEN_MATHFUNC_RETVAL(bessel_k0, Scalar)\n    bessel_k0(const Scalar& x) {\n  return EIGEN_MATHFUNC_IMPL(bessel_k0, Scalar)::run(x);\n}\n\ntemplate <typename Scalar>\nEIGEN_DEVICE_FUNC inline EIGEN_MATHFUNC_RETVAL(bessel_k0e, Scalar)\n    bessel_k0e(const Scalar& x) {\n  return EIGEN_MATHFUNC_IMPL(bessel_k0e, Scalar)::run(x);\n}\n\ntemplate <typename Scalar>\nEIGEN_DEVICE_FUNC inline EIGEN_MATHFUNC_RETVAL(bessel_k1, Scalar)\n    bessel_k1(const Scalar& x) {\n  return EIGEN_MATHFUNC_IMPL(bessel_k1, Scalar)::run(x);\n}\n\ntemplate <typename Scalar>\nEIGEN_DEVICE_FUNC inline EIGEN_MATHFUNC_RETVAL(bessel_k1e, Scalar)\n    bessel_k1e(const Scalar& x) {\n  return EIGEN_MATHFUNC_IMPL(bessel_k1e, Scalar)::run(x);\n}\n\ntemplate <typename Scalar>\nEIGEN_DEVICE_FUNC inline EIGEN_MATHFUNC_RETVAL(bessel_j0, Scalar)\n    bessel_j0(const Scalar& x) {\n  return EIGEN_MATHFUNC_IMPL(bessel_j0, Scalar)::run(x);\n}\n\ntemplate <typename Scalar>\nEIGEN_DEVICE_FUNC inline EIGEN_MATHFUNC_RETVAL(bessel_y0, Scalar)\n    bessel_y0(const Scalar& x) {\n  return EIGEN_MATHFUNC_IMPL(bessel_y0, Scalar)::run(x);\n}\n\ntemplate <typename Scalar>\nEIGEN_DEVICE_FUNC inline EIGEN_MATHFUNC_RETVAL(bessel_j1, Scalar)\n    bessel_j1(const Scalar& x) {\n  return EIGEN_MATHFUNC_IMPL(bessel_j1, Scalar)::run(x);\n}\n\ntemplate <typename Scalar>\nEIGEN_DEVICE_FUNC inline EIGEN_MATHFUNC_RETVAL(bessel_y1, Scalar)\n    bessel_y1(const Scalar& x) {\n  return EIGEN_MATHFUNC_IMPL(bessel_y1, Scalar)::run(x);\n}\n\n}  // end namespace numext\n\n}  // end namespace Eigen\n\n#endif  // EIGEN_BESSEL_FUNCTIONS_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/SpecialFunctions/BesselFunctionsPacketMath.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_BESSELFUNCTIONS_PACKETMATH_H\n#define EIGEN_BESSELFUNCTIONS_PACKETMATH_H\n\nnamespace Eigen {\n\nnamespace internal {\n\n/** \\internal \\returns the exponentially scaled modified Bessel function of\n * order zero i0(\\a a) (coeff-wise) */\ntemplate <typename Packet>\nEIGEN_DEVICE_FUNC EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nPacket pbessel_i0(const Packet& x) {\n  typedef typename unpacket_traits<Packet>::type ScalarType;\n  using internal::generic_i0; return generic_i0<Packet, ScalarType>::run(x);\n}\n\n/** \\internal \\returns the exponentially scaled modified Bessel function of\n * order zero i0e(\\a a) (coeff-wise) */\ntemplate <typename Packet>\nEIGEN_DEVICE_FUNC EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nPacket pbessel_i0e(const Packet& x) {\n  typedef typename unpacket_traits<Packet>::type ScalarType;\n  using internal::generic_i0e; return generic_i0e<Packet, ScalarType>::run(x);\n}\n\n/** \\internal \\returns the exponentially scaled modified Bessel function of\n * order one i1(\\a a) (coeff-wise) */\ntemplate <typename Packet>\nEIGEN_DEVICE_FUNC EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nPacket pbessel_i1(const Packet& x) {\n  typedef typename unpacket_traits<Packet>::type ScalarType;\n  using internal::generic_i1; return generic_i1<Packet, ScalarType>::run(x);\n}\n\n/** \\internal \\returns the exponentially scaled modified Bessel function of\n * order one i1e(\\a a) (coeff-wise) */\ntemplate <typename Packet>\nEIGEN_DEVICE_FUNC EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nPacket pbessel_i1e(const Packet& x) {\n  typedef typename unpacket_traits<Packet>::type ScalarType;\n  using internal::generic_i1e; return generic_i1e<Packet, ScalarType>::run(x);\n}\n\n/** \\internal \\returns the exponentially scaled modified Bessel function of\n * order zero j0(\\a a) (coeff-wise) */\ntemplate <typename Packet>\nEIGEN_DEVICE_FUNC EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nPacket pbessel_j0(const Packet& x) {\n  typedef typename unpacket_traits<Packet>::type ScalarType;\n  using internal::generic_j0; return generic_j0<Packet, ScalarType>::run(x);\n}\n\n/** \\internal \\returns the exponentially scaled modified Bessel function of\n * order zero j1(\\a a) (coeff-wise) */\ntemplate <typename Packet>\nEIGEN_DEVICE_FUNC EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nPacket pbessel_j1(const Packet& x) {\n  typedef typename unpacket_traits<Packet>::type ScalarType;\n  using internal::generic_j1; return generic_j1<Packet, ScalarType>::run(x);\n}\n\n/** \\internal \\returns the exponentially scaled modified Bessel function of\n * order one y0(\\a a) (coeff-wise) */\ntemplate <typename Packet>\nEIGEN_DEVICE_FUNC EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nPacket pbessel_y0(const Packet& x) {\n  typedef typename unpacket_traits<Packet>::type ScalarType;\n  using internal::generic_y0; return generic_y0<Packet, ScalarType>::run(x);\n}\n\n/** \\internal \\returns the exponentially scaled modified Bessel function of\n * order one y1(\\a a) (coeff-wise) */\ntemplate <typename Packet>\nEIGEN_DEVICE_FUNC EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nPacket pbessel_y1(const Packet& x) {\n  typedef typename unpacket_traits<Packet>::type ScalarType;\n  using internal::generic_y1; return generic_y1<Packet, ScalarType>::run(x);\n}\n\n/** \\internal \\returns the exponentially scaled modified Bessel function of\n * order zero k0(\\a a) (coeff-wise) */\ntemplate <typename Packet>\nEIGEN_DEVICE_FUNC EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nPacket pbessel_k0(const Packet& x) {\n  typedef typename unpacket_traits<Packet>::type ScalarType;\n  using internal::generic_k0; return generic_k0<Packet, ScalarType>::run(x);\n}\n\n/** \\internal \\returns the exponentially scaled modified Bessel function of\n * order zero k0e(\\a a) (coeff-wise) */\ntemplate <typename Packet>\nEIGEN_DEVICE_FUNC EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nPacket pbessel_k0e(const Packet& x) {\n  typedef typename unpacket_traits<Packet>::type ScalarType;\n  using internal::generic_k0e; return generic_k0e<Packet, ScalarType>::run(x);\n}\n\n/** \\internal \\returns the exponentially scaled modified Bessel function of\n * order one k1e(\\a a) (coeff-wise) */\ntemplate <typename Packet>\nEIGEN_DEVICE_FUNC EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nPacket pbessel_k1(const Packet& x) {\n  typedef typename unpacket_traits<Packet>::type ScalarType;\n  using internal::generic_k1; return generic_k1<Packet, ScalarType>::run(x);\n}\n\n/** \\internal \\returns the exponentially scaled modified Bessel function of\n * order one k1e(\\a a) (coeff-wise) */\ntemplate <typename Packet>\nEIGEN_DEVICE_FUNC EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nPacket pbessel_k1e(const Packet& x) {\n  typedef typename unpacket_traits<Packet>::type ScalarType;\n  using internal::generic_k1e; return generic_k1e<Packet, ScalarType>::run(x);\n}\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_BESSELFUNCTIONS_PACKETMATH_H\n\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/SpecialFunctions/HipVectorCompatibility.h",
    "content": "#ifndef HIP_VECTOR_COMPATIBILITY_H\n#define HIP_VECTOR_COMPATIBILITY_H\n\nnamespace hip_impl {\n  template <typename, typename, unsigned int> struct Scalar_accessor;\n}   // end namespace hip_impl\n\nnamespace Eigen {\nnamespace internal {\n\n#define HIP_SCALAR_ACCESSOR_BUILDER(NAME) \\\ntemplate <typename T, typename U, unsigned int n> \\\nstruct NAME <hip_impl::Scalar_accessor<T, U, n>> : NAME <T> {};\n\n#define HIP_SCALAR_ACCESSOR_BUILDER_RETVAL(NAME) \\\ntemplate <typename T, typename U, unsigned int n> \\\nstruct NAME##_impl <hip_impl::Scalar_accessor<T, U, n>> : NAME##_impl <T> {}; \\\ntemplate <typename T, typename U, unsigned int n> \\\nstruct NAME##_retval <hip_impl::Scalar_accessor<T, U, n>> : NAME##_retval <T> {};\n\n#define HIP_SCALAR_ACCESSOR_BUILDER_IGAMMA(NAME) \\\ntemplate <typename T, typename U, unsigned int n, IgammaComputationMode mode> \\\nstruct NAME <hip_impl::Scalar_accessor<T, U, n>, mode> : NAME <T, mode> {};\n\n#if EIGEN_HAS_C99_MATH\nHIP_SCALAR_ACCESSOR_BUILDER(betainc_helper)\nHIP_SCALAR_ACCESSOR_BUILDER(incbeta_cfe)\n\nHIP_SCALAR_ACCESSOR_BUILDER_RETVAL(erf)\nHIP_SCALAR_ACCESSOR_BUILDER_RETVAL(erfc)\nHIP_SCALAR_ACCESSOR_BUILDER_RETVAL(igammac)\nHIP_SCALAR_ACCESSOR_BUILDER_RETVAL(lgamma)\nHIP_SCALAR_ACCESSOR_BUILDER_RETVAL(ndtri)\nHIP_SCALAR_ACCESSOR_BUILDER_RETVAL(polygamma)\n\nHIP_SCALAR_ACCESSOR_BUILDER_IGAMMA(igamma_generic_impl)\n#endif\n\nHIP_SCALAR_ACCESSOR_BUILDER(digamma_impl_maybe_poly)\nHIP_SCALAR_ACCESSOR_BUILDER(zeta_impl_series)\n\nHIP_SCALAR_ACCESSOR_BUILDER_RETVAL(bessel_i0)\nHIP_SCALAR_ACCESSOR_BUILDER_RETVAL(bessel_i0e)\nHIP_SCALAR_ACCESSOR_BUILDER_RETVAL(bessel_i1)\nHIP_SCALAR_ACCESSOR_BUILDER_RETVAL(bessel_i1e)\nHIP_SCALAR_ACCESSOR_BUILDER_RETVAL(bessel_j0)\nHIP_SCALAR_ACCESSOR_BUILDER_RETVAL(bessel_j1)\nHIP_SCALAR_ACCESSOR_BUILDER_RETVAL(bessel_k0)\nHIP_SCALAR_ACCESSOR_BUILDER_RETVAL(bessel_k0e)\nHIP_SCALAR_ACCESSOR_BUILDER_RETVAL(bessel_k1)\nHIP_SCALAR_ACCESSOR_BUILDER_RETVAL(bessel_k1e)\nHIP_SCALAR_ACCESSOR_BUILDER_RETVAL(bessel_y0)\nHIP_SCALAR_ACCESSOR_BUILDER_RETVAL(bessel_y1)\nHIP_SCALAR_ACCESSOR_BUILDER_RETVAL(betainc)\nHIP_SCALAR_ACCESSOR_BUILDER_RETVAL(digamma)\nHIP_SCALAR_ACCESSOR_BUILDER_RETVAL(gamma_sample_der_alpha)\nHIP_SCALAR_ACCESSOR_BUILDER_RETVAL(igamma_der_a)\nHIP_SCALAR_ACCESSOR_BUILDER_RETVAL(igamma)\nHIP_SCALAR_ACCESSOR_BUILDER_RETVAL(zeta)\n\nHIP_SCALAR_ACCESSOR_BUILDER_IGAMMA(igamma_series_impl)\nHIP_SCALAR_ACCESSOR_BUILDER_IGAMMA(igammac_cf_impl)\n\n}  // end namespace internal\n}  // end namespace Eigen\n\n#endif  // HIP_VECTOR_COMPATIBILITY_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/SpecialFunctions/SpecialFunctionsArrayAPI.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n\n#ifndef EIGEN_SPECIALFUNCTIONS_ARRAYAPI_H\n#define EIGEN_SPECIALFUNCTIONS_ARRAYAPI_H\n\nnamespace Eigen {\n\n/** \\cpp11 \\returns an expression of the coefficient-wise igamma(\\a a, \\a x) to the given arrays.\n  *\n  * This function computes the coefficient-wise incomplete gamma function.\n  *\n  * \\note This function supports only float and double scalar types in c++11 mode. To support other scalar types,\n  * or float/double in non c++11 mode, the user has to provide implementations of igammac(T,T) for any scalar\n  * type T to be supported.\n  *\n  * \\sa Eigen::igammac(), Eigen::lgamma()\n  */\ntemplate<typename Derived,typename ExponentDerived>\nEIGEN_STRONG_INLINE const Eigen::CwiseBinaryOp<Eigen::internal::scalar_igamma_op<typename Derived::Scalar>, const Derived, const ExponentDerived>\nigamma(const Eigen::ArrayBase<Derived>& a, const Eigen::ArrayBase<ExponentDerived>& x)\n{\n  return Eigen::CwiseBinaryOp<Eigen::internal::scalar_igamma_op<typename Derived::Scalar>, const Derived, const ExponentDerived>(\n    a.derived(),\n    x.derived()\n  );\n}\n\n/** \\cpp11 \\returns an expression of the coefficient-wise igamma_der_a(\\a a, \\a x) to the given arrays.\n  *\n  * This function computes the coefficient-wise derivative of the incomplete\n  * gamma function with respect to the parameter a.\n  *\n  * \\note This function supports only float and double scalar types in c++11\n  * mode. To support other scalar types,\n  * or float/double in non c++11 mode, the user has to provide implementations\n  * of igamma_der_a(T,T) for any scalar\n  * type T to be supported.\n  *\n  * \\sa Eigen::igamma(), Eigen::lgamma()\n  */\ntemplate <typename Derived, typename ExponentDerived>\nEIGEN_STRONG_INLINE const Eigen::CwiseBinaryOp<Eigen::internal::scalar_igamma_der_a_op<typename Derived::Scalar>, const Derived, const ExponentDerived>\nigamma_der_a(const Eigen::ArrayBase<Derived>& a, const Eigen::ArrayBase<ExponentDerived>& x) {\n  return Eigen::CwiseBinaryOp<Eigen::internal::scalar_igamma_der_a_op<typename Derived::Scalar>, const Derived, const ExponentDerived>(\n    a.derived(),\n    x.derived());\n}\n\n/** \\cpp11 \\returns an expression of the coefficient-wise gamma_sample_der_alpha(\\a alpha, \\a sample) to the given arrays.\n  *\n  * This function computes the coefficient-wise derivative of the sample\n  * of a Gamma(alpha, 1) random variable with respect to the parameter alpha.\n  *\n  * \\note This function supports only float and double scalar types in c++11\n  * mode. To support other scalar types,\n  * or float/double in non c++11 mode, the user has to provide implementations\n  * of gamma_sample_der_alpha(T,T) for any scalar\n  * type T to be supported.\n  *\n  * \\sa Eigen::igamma(), Eigen::lgamma()\n  */\ntemplate <typename AlphaDerived, typename SampleDerived>\nEIGEN_STRONG_INLINE const Eigen::CwiseBinaryOp<Eigen::internal::scalar_gamma_sample_der_alpha_op<typename AlphaDerived::Scalar>, const AlphaDerived, const SampleDerived>\ngamma_sample_der_alpha(const Eigen::ArrayBase<AlphaDerived>& alpha, const Eigen::ArrayBase<SampleDerived>& sample) {\n  return Eigen::CwiseBinaryOp<Eigen::internal::scalar_gamma_sample_der_alpha_op<typename AlphaDerived::Scalar>, const AlphaDerived, const SampleDerived>(\n      alpha.derived(),\n      sample.derived());\n}\n\n/** \\cpp11 \\returns an expression of the coefficient-wise igammac(\\a a, \\a x) to the given arrays.\n  *\n  * This function computes the coefficient-wise complementary incomplete gamma function.\n  *\n  * \\note This function supports only float and double scalar types in c++11 mode. To support other scalar types,\n  * or float/double in non c++11 mode, the user has to provide implementations of igammac(T,T) for any scalar\n  * type T to be supported.\n  *\n  * \\sa Eigen::igamma(), Eigen::lgamma()\n  */\ntemplate<typename Derived,typename ExponentDerived>\nEIGEN_STRONG_INLINE const Eigen::CwiseBinaryOp<Eigen::internal::scalar_igammac_op<typename Derived::Scalar>, const Derived, const ExponentDerived>\nigammac(const Eigen::ArrayBase<Derived>& a, const Eigen::ArrayBase<ExponentDerived>& x)\n{\n  return Eigen::CwiseBinaryOp<Eigen::internal::scalar_igammac_op<typename Derived::Scalar>, const Derived, const ExponentDerived>(\n    a.derived(),\n    x.derived()\n  );\n}\n\n/** \\cpp11 \\returns an expression of the coefficient-wise polygamma(\\a n, \\a x) to the given arrays.\n  *\n  * It returns the \\a n -th derivative of the digamma(psi) evaluated at \\c x.\n  *\n  * \\note This function supports only float and double scalar types in c++11 mode. To support other scalar types,\n  * or float/double in non c++11 mode, the user has to provide implementations of polygamma(T,T) for any scalar\n  * type T to be supported.\n  *\n  * \\sa Eigen::digamma()\n  */\n// * \\warning Be careful with the order of the parameters: x.polygamma(n) is equivalent to polygamma(n,x)\n// * \\sa ArrayBase::polygamma()\ntemplate<typename DerivedN,typename DerivedX>\nEIGEN_STRONG_INLINE const Eigen::CwiseBinaryOp<Eigen::internal::scalar_polygamma_op<typename DerivedX::Scalar>, const DerivedN, const DerivedX>\npolygamma(const Eigen::ArrayBase<DerivedN>& n, const Eigen::ArrayBase<DerivedX>& x)\n{\n  return Eigen::CwiseBinaryOp<Eigen::internal::scalar_polygamma_op<typename DerivedX::Scalar>, const DerivedN, const DerivedX>(\n    n.derived(),\n    x.derived()\n  );\n}\n\n/** \\cpp11 \\returns an expression of the coefficient-wise betainc(\\a x, \\a a, \\a b) to the given arrays.\n  *\n  * This function computes the regularized incomplete beta function (integral).\n  *\n  * \\note This function supports only float and double scalar types in c++11 mode. To support other scalar types,\n  * or float/double in non c++11 mode, the user has to provide implementations of betainc(T,T,T) for any scalar\n  * type T to be supported.\n  *\n  * \\sa Eigen::betainc(), Eigen::lgamma()\n  */\ntemplate<typename ArgADerived, typename ArgBDerived, typename ArgXDerived>\nEIGEN_STRONG_INLINE const Eigen::CwiseTernaryOp<Eigen::internal::scalar_betainc_op<typename ArgXDerived::Scalar>, const ArgADerived, const ArgBDerived, const ArgXDerived>\nbetainc(const Eigen::ArrayBase<ArgADerived>& a, const Eigen::ArrayBase<ArgBDerived>& b, const Eigen::ArrayBase<ArgXDerived>& x)\n{\n  return Eigen::CwiseTernaryOp<Eigen::internal::scalar_betainc_op<typename ArgXDerived::Scalar>, const ArgADerived, const ArgBDerived, const ArgXDerived>(\n    a.derived(),\n    b.derived(),\n    x.derived()\n  );\n}\n\n\n/** \\returns an expression of the coefficient-wise zeta(\\a x, \\a q) to the given arrays.\n  *\n  * It returns the Riemann zeta function of two arguments \\a x and \\a q:\n  *\n  * \\param x is the exponent, it must be > 1\n  * \\param q is the shift, it must be > 0\n  *\n  * \\note This function supports only float and double scalar types. To support other scalar types, the user has\n  * to provide implementations of zeta(T,T) for any scalar type T to be supported.\n  *\n  * \\sa ArrayBase::zeta()\n  */\ntemplate<typename DerivedX,typename DerivedQ>\nEIGEN_STRONG_INLINE const Eigen::CwiseBinaryOp<Eigen::internal::scalar_zeta_op<typename DerivedX::Scalar>, const DerivedX, const DerivedQ>\nzeta(const Eigen::ArrayBase<DerivedX>& x, const Eigen::ArrayBase<DerivedQ>& q)\n{\n  return Eigen::CwiseBinaryOp<Eigen::internal::scalar_zeta_op<typename DerivedX::Scalar>, const DerivedX, const DerivedQ>(\n    x.derived(),\n    q.derived()\n  );\n}\n\n\n} // end namespace Eigen\n\n#endif // EIGEN_SPECIALFUNCTIONS_ARRAYAPI_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/SpecialFunctions/SpecialFunctionsFunctors.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Eugene Brevdo <ebrevdo@gmail.com>\n// Copyright (C) 2016 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPECIALFUNCTIONS_FUNCTORS_H\n#define EIGEN_SPECIALFUNCTIONS_FUNCTORS_H\n\nnamespace Eigen {\n\nnamespace internal {\n\n\n/** \\internal\n  * \\brief Template functor to compute the incomplete gamma function igamma(a, x)\n  *\n  * \\sa class CwiseBinaryOp, Cwise::igamma\n  */\ntemplate<typename Scalar> struct scalar_igamma_op : binary_op_base<Scalar,Scalar>\n{\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_igamma_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a, const Scalar& x) const {\n    using numext::igamma; return igamma(a, x);\n  }\n  template<typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a, const Packet& x) const {\n    return internal::pigamma(a, x);\n  }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_igamma_op<Scalar> > {\n  enum {\n    // Guesstimate\n    Cost = 20 * NumTraits<Scalar>::MulCost + 10 * NumTraits<Scalar>::AddCost,\n    PacketAccess = packet_traits<Scalar>::HasIGamma\n  };\n};\n\n/** \\internal\n  * \\brief Template functor to compute the derivative of the incomplete gamma\n  * function igamma_der_a(a, x)\n  *\n  * \\sa class CwiseBinaryOp, Cwise::igamma_der_a\n  */\ntemplate <typename Scalar>\nstruct scalar_igamma_der_a_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_igamma_der_a_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator()(const Scalar& a, const Scalar& x) const {\n    using numext::igamma_der_a;\n    return igamma_der_a(a, x);\n  }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a, const Packet& x) const {\n    return internal::pigamma_der_a(a, x);\n  }\n};\ntemplate <typename Scalar>\nstruct functor_traits<scalar_igamma_der_a_op<Scalar> > {\n  enum {\n    // 2x the cost of igamma\n    Cost = 40 * NumTraits<Scalar>::MulCost + 20 * NumTraits<Scalar>::AddCost,\n    PacketAccess = packet_traits<Scalar>::HasIGammaDerA\n  };\n};\n\n/** \\internal\n  * \\brief Template functor to compute the derivative of the sample\n  * of a Gamma(alpha, 1) random variable with respect to the parameter alpha\n  * gamma_sample_der_alpha(alpha, sample)\n  *\n  * \\sa class CwiseBinaryOp, Cwise::gamma_sample_der_alpha\n  */\ntemplate <typename Scalar>\nstruct scalar_gamma_sample_der_alpha_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_gamma_sample_der_alpha_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator()(const Scalar& alpha, const Scalar& sample) const {\n    using numext::gamma_sample_der_alpha;\n    return gamma_sample_der_alpha(alpha, sample);\n  }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& alpha, const Packet& sample) const {\n    return internal::pgamma_sample_der_alpha(alpha, sample);\n  }\n};\ntemplate <typename Scalar>\nstruct functor_traits<scalar_gamma_sample_der_alpha_op<Scalar> > {\n  enum {\n    // 2x the cost of igamma, minus the lgamma cost (the lgamma cancels out)\n    Cost = 30 * NumTraits<Scalar>::MulCost + 15 * NumTraits<Scalar>::AddCost,\n    PacketAccess = packet_traits<Scalar>::HasGammaSampleDerAlpha\n  };\n};\n\n/** \\internal\n  * \\brief Template functor to compute the complementary incomplete gamma function igammac(a, x)\n  *\n  * \\sa class CwiseBinaryOp, Cwise::igammac\n  */\ntemplate<typename Scalar> struct scalar_igammac_op : binary_op_base<Scalar,Scalar>\n{\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_igammac_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a, const Scalar& x) const {\n    using numext::igammac; return igammac(a, x);\n  }\n  template<typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a, const Packet& x) const\n  {\n    return internal::pigammac(a, x);\n  }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_igammac_op<Scalar> > {\n  enum {\n    // Guesstimate\n    Cost = 20 * NumTraits<Scalar>::MulCost + 10 * NumTraits<Scalar>::AddCost,\n    PacketAccess = packet_traits<Scalar>::HasIGammac\n  };\n};\n\n\n/** \\internal\n  * \\brief Template functor to compute the incomplete beta integral betainc(a, b, x)\n  *\n  */\ntemplate<typename Scalar> struct scalar_betainc_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_betainc_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& x, const Scalar& a, const Scalar& b) const {\n    using numext::betainc; return betainc(x, a, b);\n  }\n  template<typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& x, const Packet& a, const Packet& b) const\n  {\n    return internal::pbetainc(x, a, b);\n  }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_betainc_op<Scalar> > {\n  enum {\n    // Guesstimate\n    Cost = 400 * NumTraits<Scalar>::MulCost + 400 * NumTraits<Scalar>::AddCost,\n    PacketAccess = packet_traits<Scalar>::HasBetaInc\n  };\n};\n\n\n/** \\internal\n * \\brief Template functor to compute the natural log of the absolute\n * value of Gamma of a scalar\n * \\sa class CwiseUnaryOp, Cwise::lgamma()\n */\ntemplate<typename Scalar> struct scalar_lgamma_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_lgamma_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a) const {\n    using numext::lgamma; return lgamma(a);\n  }\n  typedef typename packet_traits<Scalar>::type Packet;\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet& a) const { return internal::plgamma(a); }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_lgamma_op<Scalar> >\n{\n  enum {\n    // Guesstimate\n    Cost = 10 * NumTraits<Scalar>::MulCost + 5 * NumTraits<Scalar>::AddCost,\n    PacketAccess = packet_traits<Scalar>::HasLGamma\n  };\n};\n\n/** \\internal\n * \\brief Template functor to compute psi, the derivative of lgamma of a scalar.\n * \\sa class CwiseUnaryOp, Cwise::digamma()\n */\ntemplate<typename Scalar> struct scalar_digamma_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_digamma_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a) const {\n    using numext::digamma; return digamma(a);\n  }\n  typedef typename packet_traits<Scalar>::type Packet;\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet& a) const { return internal::pdigamma(a); }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_digamma_op<Scalar> >\n{\n  enum {\n    // Guesstimate\n    Cost = 10 * NumTraits<Scalar>::MulCost + 5 * NumTraits<Scalar>::AddCost,\n    PacketAccess = packet_traits<Scalar>::HasDiGamma\n  };\n};\n\n/** \\internal\n * \\brief Template functor to compute the Riemann Zeta function of two arguments.\n * \\sa class CwiseUnaryOp, Cwise::zeta()\n */\ntemplate<typename Scalar> struct scalar_zeta_op {\n    EIGEN_EMPTY_STRUCT_CTOR(scalar_zeta_op)\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& x, const Scalar& q) const {\n        using numext::zeta; return zeta(x, q);\n    }\n    typedef typename packet_traits<Scalar>::type Packet;\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet& x, const Packet& q) const { return internal::pzeta(x, q); }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_zeta_op<Scalar> >\n{\n    enum {\n        // Guesstimate\n        Cost = 10 * NumTraits<Scalar>::MulCost + 5 * NumTraits<Scalar>::AddCost,\n        PacketAccess = packet_traits<Scalar>::HasZeta\n    };\n};\n\n/** \\internal\n * \\brief Template functor to compute the polygamma function.\n * \\sa class CwiseUnaryOp, Cwise::polygamma()\n */\ntemplate<typename Scalar> struct scalar_polygamma_op {\n    EIGEN_EMPTY_STRUCT_CTOR(scalar_polygamma_op)\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& n, const Scalar& x) const {\n        using numext::polygamma; return polygamma(n, x);\n    }\n    typedef typename packet_traits<Scalar>::type Packet;\n    EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet& n, const Packet& x) const { return internal::ppolygamma(n, x); }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_polygamma_op<Scalar> >\n{\n    enum {\n        // Guesstimate\n        Cost = 10 * NumTraits<Scalar>::MulCost + 5 * NumTraits<Scalar>::AddCost,\n        PacketAccess = packet_traits<Scalar>::HasPolygamma\n    };\n};\n\n/** \\internal\n * \\brief Template functor to compute the error function of a scalar\n * \\sa class CwiseUnaryOp, ArrayBase::erf()\n */\ntemplate<typename Scalar> struct scalar_erf_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_erf_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar\n  operator()(const Scalar& a) const {\n    return numext::erf(a);\n  }\n  template <typename Packet>\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet& x) const {\n    return perf(x);\n  }\n};\ntemplate <typename Scalar>\nstruct functor_traits<scalar_erf_op<Scalar> > {\n  enum {\n    PacketAccess = packet_traits<Scalar>::HasErf,\n    Cost =\n        (PacketAccess\n#ifdef EIGEN_VECTORIZE_FMA\n             // TODO(rmlarsen): Move the FMA cost model to a central location.\n             // Haswell can issue 2 add/mul/madd per cycle.\n             // 10 pmadd, 2 pmul, 1 div, 2 other\n             ? (2 * NumTraits<Scalar>::AddCost +\n                7 * NumTraits<Scalar>::MulCost +\n                scalar_div_cost<Scalar, packet_traits<Scalar>::HasDiv>::value)\n#else\n             ? (12 * NumTraits<Scalar>::AddCost +\n                12 * NumTraits<Scalar>::MulCost +\n                scalar_div_cost<Scalar, packet_traits<Scalar>::HasDiv>::value)\n#endif\n             // Assume for simplicity that this is as expensive as an exp().\n             : (functor_traits<scalar_exp_op<Scalar> >::Cost))\n  };\n};\n\n/** \\internal\n * \\brief Template functor to compute the Complementary Error Function\n * of a scalar\n * \\sa class CwiseUnaryOp, Cwise::erfc()\n */\ntemplate<typename Scalar> struct scalar_erfc_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_erfc_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a) const {\n    using numext::erfc; return erfc(a);\n  }\n  typedef typename packet_traits<Scalar>::type Packet;\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet& a) const { return internal::perfc(a); }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_erfc_op<Scalar> >\n{\n  enum {\n    // Guesstimate\n    Cost = 10 * NumTraits<Scalar>::MulCost + 5 * NumTraits<Scalar>::AddCost,\n    PacketAccess = packet_traits<Scalar>::HasErfc\n  };\n};\n\n/** \\internal\n * \\brief Template functor to compute the Inverse of the normal distribution\n * function of a scalar\n * \\sa class CwiseUnaryOp, Cwise::ndtri()\n */\ntemplate<typename Scalar> struct scalar_ndtri_op {\n  EIGEN_EMPTY_STRUCT_CTOR(scalar_ndtri_op)\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a) const {\n    using numext::ndtri; return ndtri(a);\n  }\n  typedef typename packet_traits<Scalar>::type Packet;\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet& a) const { return internal::pndtri(a); }\n};\ntemplate<typename Scalar>\nstruct functor_traits<scalar_ndtri_op<Scalar> >\n{\n  enum {\n    // On average, We are evaluating rational functions with degree N=9 in the\n    // numerator and denominator. This results in 2*N additions and 2*N\n    // multiplications.\n    Cost = 18 * NumTraits<Scalar>::MulCost + 18 * NumTraits<Scalar>::AddCost,\n    PacketAccess = packet_traits<Scalar>::HasNdtri\n  };\n};\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_SPECIALFUNCTIONS_FUNCTORS_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/SpecialFunctions/SpecialFunctionsHalf.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPECIALFUNCTIONS_HALF_H\n#define EIGEN_SPECIALFUNCTIONS_HALF_H\n\nnamespace Eigen {\nnamespace numext {\n\n#if EIGEN_HAS_C99_MATH\ntemplate<> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half lgamma(const Eigen::half& a) {\n  return Eigen::half(Eigen::numext::lgamma(static_cast<float>(a)));\n}\ntemplate<> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half digamma(const Eigen::half& a) {\n  return Eigen::half(Eigen::numext::digamma(static_cast<float>(a)));\n}\ntemplate<> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half zeta(const Eigen::half& x, const Eigen::half& q) {\n  return Eigen::half(Eigen::numext::zeta(static_cast<float>(x), static_cast<float>(q)));\n}\ntemplate<> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half polygamma(const Eigen::half& n, const Eigen::half& x) {\n  return Eigen::half(Eigen::numext::polygamma(static_cast<float>(n), static_cast<float>(x)));\n}\ntemplate<> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half erf(const Eigen::half& a) {\n  return Eigen::half(Eigen::numext::erf(static_cast<float>(a)));\n}\ntemplate<> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half erfc(const Eigen::half& a) {\n  return Eigen::half(Eigen::numext::erfc(static_cast<float>(a)));\n}\ntemplate<> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half ndtri(const Eigen::half& a) {\n  return Eigen::half(Eigen::numext::ndtri(static_cast<float>(a)));\n}\ntemplate<> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half igamma(const Eigen::half& a, const Eigen::half& x) {\n  return Eigen::half(Eigen::numext::igamma(static_cast<float>(a), static_cast<float>(x)));\n}\ntemplate <>\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half igamma_der_a(const Eigen::half& a, const Eigen::half& x) {\n  return Eigen::half(Eigen::numext::igamma_der_a(static_cast<float>(a), static_cast<float>(x)));\n}\ntemplate <>\nEIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half gamma_sample_der_alpha(const Eigen::half& alpha, const Eigen::half& sample) {\n  return Eigen::half(Eigen::numext::gamma_sample_der_alpha(static_cast<float>(alpha), static_cast<float>(sample)));\n}\ntemplate<> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half igammac(const Eigen::half& a, const Eigen::half& x) {\n  return Eigen::half(Eigen::numext::igammac(static_cast<float>(a), static_cast<float>(x)));\n}\ntemplate<> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half betainc(const Eigen::half& a, const Eigen::half& b, const Eigen::half& x) {\n  return Eigen::half(Eigen::numext::betainc(static_cast<float>(a), static_cast<float>(b), static_cast<float>(x)));\n}\n#endif\n\n}  // end namespace numext\n}  // end namespace Eigen\n\n#endif  // EIGEN_SPECIALFUNCTIONS_HALF_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/SpecialFunctions/SpecialFunctionsImpl.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Eugene Brevdo <ebrevdo@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPECIAL_FUNCTIONS_H\n#define EIGEN_SPECIAL_FUNCTIONS_H\n\nnamespace Eigen {\nnamespace internal {\n\n//  Parts of this code are based on the Cephes Math Library.\n//\n//  Cephes Math Library Release 2.8:  June, 2000\n//  Copyright 1984, 1987, 1992, 2000 by Stephen L. Moshier\n//\n//  Permission has been kindly provided by the original author\n//  to incorporate the Cephes software into the Eigen codebase:\n//\n//    From: Stephen Moshier\n//    To: Eugene Brevdo\n//    Subject: Re: Permission to wrap several cephes functions in Eigen\n//\n//    Hello Eugene,\n//\n//    Thank you for writing.\n//\n//    If your licensing is similar to BSD, the formal way that has been\n//    handled is simply to add a statement to the effect that you are incorporating\n//    the Cephes software by permission of the author.\n//\n//    Good luck with your project,\n//    Steve\n\n\n/****************************************************************************\n * Implementation of lgamma, requires C++11/C99                             *\n ****************************************************************************/\n\ntemplate <typename Scalar>\nstruct lgamma_impl {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE Scalar run(const Scalar) {\n    EIGEN_STATIC_ASSERT((internal::is_same<Scalar, Scalar>::value == false),\n                        THIS_TYPE_IS_NOT_SUPPORTED);\n    return Scalar(0);\n  }\n};\n\ntemplate <typename Scalar>\nstruct lgamma_retval {\n  typedef Scalar type;\n};\n\n#if EIGEN_HAS_C99_MATH\ntemplate <>\nstruct lgamma_impl<float> {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE float run(float x) {\n#if !defined(EIGEN_GPU_COMPILE_PHASE) && (defined(_BSD_SOURCE) || defined(_SVID_SOURCE)) && !defined(__APPLE__)\n    int dummy;\n    return ::lgammaf_r(x, &dummy);\n#elif defined(SYCL_DEVICE_ONLY)\n    return cl::sycl::lgamma(x);\n#else\n    return ::lgammaf(x);\n#endif\n  }\n};\n\ntemplate <>\nstruct lgamma_impl<double> {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE double run(double x) {\n#if !defined(EIGEN_GPU_COMPILE_PHASE) && (defined(_BSD_SOURCE) || defined(_SVID_SOURCE)) && !defined(__APPLE__)\n    int dummy;\n    return ::lgamma_r(x, &dummy);\n#elif defined(SYCL_DEVICE_ONLY)\n    return cl::sycl::lgamma(x);\n#else\n    return ::lgamma(x);\n#endif\n  }\n};\n#endif\n\n/****************************************************************************\n * Implementation of digamma (psi), based on Cephes                         *\n ****************************************************************************/\n\ntemplate <typename Scalar>\nstruct digamma_retval {\n  typedef Scalar type;\n};\n\n/*\n *\n * Polynomial evaluation helper for the Psi (digamma) function.\n *\n * digamma_impl_maybe_poly::run(s) evaluates the asymptotic Psi expansion for\n * input Scalar s, assuming s is above 10.0.\n *\n * If s is above a certain threshold for the given Scalar type, zero\n * is returned.  Otherwise the polynomial is evaluated with enough\n * coefficients for results matching Scalar machine precision.\n *\n *\n */\ntemplate <typename Scalar>\nstruct digamma_impl_maybe_poly {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE Scalar run(const Scalar) {\n    EIGEN_STATIC_ASSERT((internal::is_same<Scalar, Scalar>::value == false),\n                        THIS_TYPE_IS_NOT_SUPPORTED);\n    return Scalar(0);\n  }\n};\n\n\ntemplate <>\nstruct digamma_impl_maybe_poly<float> {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE float run(const float s) {\n    const float A[] = {\n      -4.16666666666666666667E-3f,\n      3.96825396825396825397E-3f,\n      -8.33333333333333333333E-3f,\n      8.33333333333333333333E-2f\n    };\n\n    float z;\n    if (s < 1.0e8f) {\n      z = 1.0f / (s * s);\n      return z * internal::ppolevl<float, 3>::run(z, A);\n    } else return 0.0f;\n  }\n};\n\ntemplate <>\nstruct digamma_impl_maybe_poly<double> {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE double run(const double s) {\n    const double A[] = {\n      8.33333333333333333333E-2,\n      -2.10927960927960927961E-2,\n      7.57575757575757575758E-3,\n      -4.16666666666666666667E-3,\n      3.96825396825396825397E-3,\n      -8.33333333333333333333E-3,\n      8.33333333333333333333E-2\n    };\n\n    double z;\n    if (s < 1.0e17) {\n      z = 1.0 / (s * s);\n      return z * internal::ppolevl<double, 6>::run(z, A);\n    }\n    else return 0.0;\n  }\n};\n\ntemplate <typename Scalar>\nstruct digamma_impl {\n  EIGEN_DEVICE_FUNC\n  static Scalar run(Scalar x) {\n    /*\n     *\n     *     Psi (digamma) function (modified for Eigen)\n     *\n     *\n     * SYNOPSIS:\n     *\n     * double x, y, psi();\n     *\n     * y = psi( x );\n     *\n     *\n     * DESCRIPTION:\n     *\n     *              d      -\n     *   psi(x)  =  -- ln | (x)\n     *              dx\n     *\n     * is the logarithmic derivative of the gamma function.\n     * For integer x,\n     *                   n-1\n     *                    -\n     * psi(n) = -EUL  +   >  1/k.\n     *                    -\n     *                   k=1\n     *\n     * If x is negative, it is transformed to a positive argument by the\n     * reflection formula  psi(1-x) = psi(x) + pi cot(pi x).\n     * For general positive x, the argument is made greater than 10\n     * using the recurrence  psi(x+1) = psi(x) + 1/x.\n     * Then the following asymptotic expansion is applied:\n     *\n     *                           inf.   B\n     *                            -      2k\n     * psi(x) = log(x) - 1/2x -   >   -------\n     *                            -        2k\n     *                           k=1   2k x\n     *\n     * where the B2k are Bernoulli numbers.\n     *\n     * ACCURACY (float):\n     *    Relative error (except absolute when |psi| < 1):\n     * arithmetic   domain     # trials      peak         rms\n     *    IEEE      0,30        30000       1.3e-15     1.4e-16\n     *    IEEE      -30,0       40000       1.5e-15     2.2e-16\n     *\n     * ACCURACY (double):\n     *    Absolute error,  relative when |psi| > 1 :\n     * arithmetic   domain     # trials      peak         rms\n     *    IEEE      -33,0        30000      8.2e-7      1.2e-7\n     *    IEEE      0,33        100000      7.3e-7      7.7e-8\n     *\n     * ERROR MESSAGES:\n     *     message         condition      value returned\n     * psi singularity    x integer <=0      INFINITY\n     */\n\n    Scalar p, q, nz, s, w, y;\n    bool negative = false;\n\n    const Scalar maxnum = NumTraits<Scalar>::infinity();\n    const Scalar m_pi = Scalar(EIGEN_PI);\n\n    const Scalar zero = Scalar(0);\n    const Scalar one = Scalar(1);\n    const Scalar half = Scalar(0.5);\n    nz = zero;\n\n    if (x <= zero) {\n      negative = true;\n      q = x;\n      p = numext::floor(q);\n      if (p == q) {\n        return maxnum;\n      }\n      /* Remove the zeros of tan(m_pi x)\n       * by subtracting the nearest integer from x\n       */\n      nz = q - p;\n      if (nz != half) {\n        if (nz > half) {\n          p += one;\n          nz = q - p;\n        }\n        nz = m_pi / numext::tan(m_pi * nz);\n      }\n      else {\n        nz = zero;\n      }\n      x = one - x;\n    }\n\n    /* use the recurrence psi(x+1) = psi(x) + 1/x. */\n    s = x;\n    w = zero;\n    while (s < Scalar(10)) {\n      w += one / s;\n      s += one;\n    }\n\n    y = digamma_impl_maybe_poly<Scalar>::run(s);\n\n    y = numext::log(s) - (half / s) - y - w;\n\n    return (negative) ? y - nz : y;\n  }\n};\n\n/****************************************************************************\n * Implementation of erf, requires C++11/C99                                *\n ****************************************************************************/\n\n/** \\internal \\returns the error function of \\a a (coeff-wise)\n    Doesn't do anything fancy, just a 13/8-degree rational interpolant which\n    is accurate up to a couple of ulp in the range [-4, 4], outside of which\n    fl(erf(x)) = +/-1.\n\n    This implementation works on both scalars and Ts.\n*/\ntemplate <typename T>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T generic_fast_erf_float(const T& a_x) {\n  // Clamp the inputs to the range [-4, 4] since anything outside\n  // this range is +/-1.0f in single-precision.\n  const T plus_4 = pset1<T>(4.f);\n  const T minus_4 = pset1<T>(-4.f);\n  const T x = pmax(pmin(a_x, plus_4), minus_4);\n  // The monomial coefficients of the numerator polynomial (odd).\n  const T alpha_1 = pset1<T>(-1.60960333262415e-02f);\n  const T alpha_3 = pset1<T>(-2.95459980854025e-03f);\n  const T alpha_5 = pset1<T>(-7.34990630326855e-04f);\n  const T alpha_7 = pset1<T>(-5.69250639462346e-05f);\n  const T alpha_9 = pset1<T>(-2.10102402082508e-06f);\n  const T alpha_11 = pset1<T>(2.77068142495902e-08f);\n  const T alpha_13 = pset1<T>(-2.72614225801306e-10f);\n\n  // The monomial coefficients of the denominator polynomial (even).\n  const T beta_0 = pset1<T>(-1.42647390514189e-02f);\n  const T beta_2 = pset1<T>(-7.37332916720468e-03f);\n  const T beta_4 = pset1<T>(-1.68282697438203e-03f);\n  const T beta_6 = pset1<T>(-2.13374055278905e-04f);\n  const T beta_8 = pset1<T>(-1.45660718464996e-05f);\n\n  // Since the polynomials are odd/even, we need x^2.\n  const T x2 = pmul(x, x);\n\n  // Evaluate the numerator polynomial p.\n  T p = pmadd(x2, alpha_13, alpha_11);\n  p = pmadd(x2, p, alpha_9);\n  p = pmadd(x2, p, alpha_7);\n  p = pmadd(x2, p, alpha_5);\n  p = pmadd(x2, p, alpha_3);\n  p = pmadd(x2, p, alpha_1);\n  p = pmul(x, p);\n\n  // Evaluate the denominator polynomial p.\n  T q = pmadd(x2, beta_8, beta_6);\n  q = pmadd(x2, q, beta_4);\n  q = pmadd(x2, q, beta_2);\n  q = pmadd(x2, q, beta_0);\n\n  // Divide the numerator by the denominator.\n  return pdiv(p, q);\n}\n\ntemplate <typename T>\nstruct erf_impl {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE T run(const T x) {\n    return generic_fast_erf_float(x);\n  }\n};\n\ntemplate <typename Scalar>\nstruct erf_retval {\n  typedef Scalar type;\n};\n\n#if EIGEN_HAS_C99_MATH\ntemplate <>\nstruct erf_impl<float> {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE float run(float x) {\n#if defined(SYCL_DEVICE_ONLY)\n    return cl::sycl::erf(x);\n#else\n    return generic_fast_erf_float(x);\n#endif\n  }\n};\n\ntemplate <>\nstruct erf_impl<double> {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE double run(double x) {\n#if defined(SYCL_DEVICE_ONLY)\n    return cl::sycl::erf(x);\n#else\n    return ::erf(x);\n#endif\n  }\n};\n#endif  // EIGEN_HAS_C99_MATH\n\n/***************************************************************************\n* Implementation of erfc, requires C++11/C99                               *\n****************************************************************************/\n\ntemplate <typename Scalar>\nstruct erfc_impl {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE Scalar run(const Scalar) {\n    EIGEN_STATIC_ASSERT((internal::is_same<Scalar, Scalar>::value == false),\n                        THIS_TYPE_IS_NOT_SUPPORTED);\n    return Scalar(0);\n  }\n};\n\ntemplate <typename Scalar>\nstruct erfc_retval {\n  typedef Scalar type;\n};\n\n#if EIGEN_HAS_C99_MATH\ntemplate <>\nstruct erfc_impl<float> {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE float run(const float x) {\n#if defined(SYCL_DEVICE_ONLY)\n    return cl::sycl::erfc(x);\n#else\n    return ::erfcf(x);\n#endif\n  }\n};\n\ntemplate <>\nstruct erfc_impl<double> {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE double run(const double x) {\n#if defined(SYCL_DEVICE_ONLY)\n    return cl::sycl::erfc(x);\n#else\n    return ::erfc(x);\n#endif\n  }\n};\n#endif  // EIGEN_HAS_C99_MATH\n\n\n/***************************************************************************\n* Implementation of ndtri.                                                 *\n****************************************************************************/\n\n/* Inverse of Normal distribution function (modified for Eigen).\n *\n *\n * SYNOPSIS:\n *\n * double x, y, ndtri();\n *\n * x = ndtri( y );\n *\n *\n *\n * DESCRIPTION:\n *\n * Returns the argument, x, for which the area under the\n * Gaussian probability density function (integrated from\n * minus infinity to x) is equal to y.\n *\n *\n * For small arguments 0 < y < exp(-2), the program computes\n * z = sqrt( -2.0 * log(y) );  then the approximation is\n * x = z - log(z)/z  - (1/z) P(1/z) / Q(1/z).\n * There are two rational functions P/Q, one for 0 < y < exp(-32)\n * and the other for y up to exp(-2).  For larger arguments,\n * w = y - 0.5, and  x/sqrt(2pi) = w + w**3 R(w**2)/S(w**2)).\n *\n *\n * ACCURACY:\n *\n *                      Relative error:\n * arithmetic   domain        # trials      peak         rms\n *    DEC      0.125, 1         5500       9.5e-17     2.1e-17\n *    DEC      6e-39, 0.135     3500       5.7e-17     1.3e-17\n *    IEEE     0.125, 1        20000       7.2e-16     1.3e-16\n *    IEEE     3e-308, 0.135   50000       4.6e-16     9.8e-17\n *\n *\n * ERROR MESSAGES:\n *\n *   message         condition    value returned\n * ndtri domain       x <= 0        -MAXNUM\n * ndtri domain       x >= 1         MAXNUM\n *\n */\n /*\n   Cephes Math Library Release 2.2: June, 1992\n   Copyright 1985, 1987, 1992 by Stephen L. Moshier\n   Direct inquiries to 30 Frost Street, Cambridge, MA 02140\n */\n\n\n// TODO: Add a cheaper approximation for float.\n\n\ntemplate<typename T>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T flipsign(\n    const T& should_flipsign, const T& x) {\n  const T sign_mask = pset1<T>(-0.0);\n  T sign_bit = pand<T>(should_flipsign, sign_mask);\n  return pxor<T>(sign_bit, x);\n}\n\ntemplate<>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double flipsign<double>(\n    const double& should_flipsign, const double& x) {\n  return should_flipsign == 0 ? x : -x;\n}\n\ntemplate<>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float flipsign<float>(\n    const float& should_flipsign, const float& x) {\n  return should_flipsign == 0 ? x : -x;\n}\n\n// We split this computation in to two so that in the scalar path\n// only one branch is evaluated (due to our template specialization of pselect\n// being an if statement.)\n\ntemplate <typename T, typename ScalarType>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T generic_ndtri_gt_exp_neg_two(const T& b) {\n  const ScalarType p0[] = {\n    ScalarType(-5.99633501014107895267e1),\n    ScalarType(9.80010754185999661536e1),\n    ScalarType(-5.66762857469070293439e1),\n    ScalarType(1.39312609387279679503e1),\n    ScalarType(-1.23916583867381258016e0)\n  };\n  const ScalarType q0[] = {\n    ScalarType(1.0),\n    ScalarType(1.95448858338141759834e0),\n    ScalarType(4.67627912898881538453e0),\n    ScalarType(8.63602421390890590575e1),\n    ScalarType(-2.25462687854119370527e2),\n    ScalarType(2.00260212380060660359e2),\n    ScalarType(-8.20372256168333339912e1),\n    ScalarType(1.59056225126211695515e1),\n    ScalarType(-1.18331621121330003142e0)\n  };\n  const T sqrt2pi = pset1<T>(ScalarType(2.50662827463100050242e0));\n  const T half = pset1<T>(ScalarType(0.5));\n  T c, c2, ndtri_gt_exp_neg_two;\n\n  c = psub(b, half);\n  c2 = pmul(c, c);\n  ndtri_gt_exp_neg_two = pmadd(c, pmul(\n      c2, pdiv(\n          internal::ppolevl<T, 4>::run(c2, p0),\n          internal::ppolevl<T, 8>::run(c2, q0))), c);\n  return pmul(ndtri_gt_exp_neg_two, sqrt2pi);\n}\n\ntemplate <typename T, typename ScalarType>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T generic_ndtri_lt_exp_neg_two(\n    const T& b, const T& should_flipsign) {\n  /* Approximation for interval z = sqrt(-2 log a ) between 2 and 8\n   * i.e., a between exp(-2) = .135 and exp(-32) = 1.27e-14.\n   */\n  const ScalarType p1[] = {\n    ScalarType(4.05544892305962419923e0),\n    ScalarType(3.15251094599893866154e1),\n    ScalarType(5.71628192246421288162e1),\n    ScalarType(4.40805073893200834700e1),\n    ScalarType(1.46849561928858024014e1),\n    ScalarType(2.18663306850790267539e0),\n    ScalarType(-1.40256079171354495875e-1),\n    ScalarType(-3.50424626827848203418e-2),\n    ScalarType(-8.57456785154685413611e-4)\n  };\n  const ScalarType q1[] = {\n    ScalarType(1.0),\n    ScalarType(1.57799883256466749731e1),\n    ScalarType(4.53907635128879210584e1),\n    ScalarType(4.13172038254672030440e1),\n    ScalarType(1.50425385692907503408e1),\n    ScalarType(2.50464946208309415979e0),\n    ScalarType(-1.42182922854787788574e-1),\n    ScalarType(-3.80806407691578277194e-2),\n    ScalarType(-9.33259480895457427372e-4)\n  };\n  /* Approximation for interval z = sqrt(-2 log a ) between 8 and 64\n   * i.e., a between exp(-32) = 1.27e-14 and exp(-2048) = 3.67e-890.\n   */\n  const ScalarType p2[] = {\n    ScalarType(3.23774891776946035970e0),\n    ScalarType(6.91522889068984211695e0),\n    ScalarType(3.93881025292474443415e0),\n    ScalarType(1.33303460815807542389e0),\n    ScalarType(2.01485389549179081538e-1),\n    ScalarType(1.23716634817820021358e-2),\n    ScalarType(3.01581553508235416007e-4),\n    ScalarType(2.65806974686737550832e-6),\n    ScalarType(6.23974539184983293730e-9)\n  };\n  const ScalarType q2[] = {\n    ScalarType(1.0),\n    ScalarType(6.02427039364742014255e0),\n    ScalarType(3.67983563856160859403e0),\n    ScalarType(1.37702099489081330271e0),\n    ScalarType(2.16236993594496635890e-1),\n    ScalarType(1.34204006088543189037e-2),\n    ScalarType(3.28014464682127739104e-4),\n    ScalarType(2.89247864745380683936e-6),\n    ScalarType(6.79019408009981274425e-9)\n  };\n  const T eight = pset1<T>(ScalarType(8.0));\n  const T one = pset1<T>(ScalarType(1));\n  const T neg_two = pset1<T>(ScalarType(-2));\n  T x, x0, x1, z;\n\n  x = psqrt(pmul(neg_two, plog(b)));\n  x0 = psub(x, pdiv(plog(x), x));\n  z = pdiv(one, x);\n  x1 = pmul(\n      z, pselect(\n          pcmp_lt(x, eight),\n          pdiv(internal::ppolevl<T, 8>::run(z, p1),\n               internal::ppolevl<T, 8>::run(z, q1)),\n          pdiv(internal::ppolevl<T, 8>::run(z, p2),\n               internal::ppolevl<T, 8>::run(z, q2))));\n  return flipsign(should_flipsign, psub(x0, x1));\n}\n\ntemplate <typename T, typename ScalarType>\nEIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\nT generic_ndtri(const T& a) {\n  const T maxnum = pset1<T>(NumTraits<ScalarType>::infinity());\n  const T neg_maxnum = pset1<T>(-NumTraits<ScalarType>::infinity());\n\n  const T zero = pset1<T>(ScalarType(0));\n  const T one = pset1<T>(ScalarType(1));\n  // exp(-2)\n  const T exp_neg_two = pset1<T>(ScalarType(0.13533528323661269189));\n  T b, ndtri, should_flipsign;\n\n  should_flipsign = pcmp_le(a, psub(one, exp_neg_two));\n  b = pselect(should_flipsign, a, psub(one, a));\n\n  ndtri = pselect(\n      pcmp_lt(exp_neg_two, b),\n      generic_ndtri_gt_exp_neg_two<T, ScalarType>(b),\n      generic_ndtri_lt_exp_neg_two<T, ScalarType>(b, should_flipsign));\n\n  return pselect(\n      pcmp_le(a, zero), neg_maxnum,\n      pselect(pcmp_le(one, a), maxnum, ndtri));\n}\n\ntemplate <typename Scalar>\nstruct ndtri_retval {\n  typedef Scalar type;\n};\n\n#if !EIGEN_HAS_C99_MATH\n\ntemplate <typename Scalar>\nstruct ndtri_impl {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE Scalar run(const Scalar) {\n    EIGEN_STATIC_ASSERT((internal::is_same<Scalar, Scalar>::value == false),\n                        THIS_TYPE_IS_NOT_SUPPORTED);\n    return Scalar(0);\n  }\n};\n\n# else\n\ntemplate <typename Scalar>\nstruct ndtri_impl {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE Scalar run(const Scalar x) {\n    return generic_ndtri<Scalar, Scalar>(x);\n  }\n};\n\n#endif  // EIGEN_HAS_C99_MATH\n\n\n/**************************************************************************************************************\n * Implementation of igammac (complemented incomplete gamma integral), based on Cephes but requires C++11/C99 *\n **************************************************************************************************************/\n\ntemplate <typename Scalar>\nstruct igammac_retval {\n  typedef Scalar type;\n};\n\n// NOTE: cephes_helper is also used to implement zeta\ntemplate <typename Scalar>\nstruct cephes_helper {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE Scalar machep() { assert(false && \"machep not supported for this type\"); return 0.0; }\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE Scalar big() { assert(false && \"big not supported for this type\"); return 0.0; }\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE Scalar biginv() { assert(false && \"biginv not supported for this type\"); return 0.0; }\n};\n\ntemplate <>\nstruct cephes_helper<float> {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE float machep() {\n    return NumTraits<float>::epsilon() / 2;  // 1.0 - machep == 1.0\n  }\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE float big() {\n    // use epsneg (1.0 - epsneg == 1.0)\n    return 1.0f / (NumTraits<float>::epsilon() / 2);\n  }\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE float biginv() {\n    // epsneg\n    return machep();\n  }\n};\n\ntemplate <>\nstruct cephes_helper<double> {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE double machep() {\n    return NumTraits<double>::epsilon() / 2;  // 1.0 - machep == 1.0\n  }\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE double big() {\n    return 1.0 / NumTraits<double>::epsilon();\n  }\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE double biginv() {\n    // inverse of eps\n    return NumTraits<double>::epsilon();\n  }\n};\n\nenum IgammaComputationMode { VALUE, DERIVATIVE, SAMPLE_DERIVATIVE };\n\ntemplate <typename Scalar>\nEIGEN_DEVICE_FUNC\nstatic EIGEN_STRONG_INLINE Scalar main_igamma_term(Scalar a, Scalar x) {\n    /* Compute  x**a * exp(-x) / gamma(a)  */\n    Scalar logax = a * numext::log(x) - x - lgamma_impl<Scalar>::run(a);\n    if (logax < -numext::log(NumTraits<Scalar>::highest()) ||\n        // Assuming x and a aren't Nan.\n        (numext::isnan)(logax)) {\n      return Scalar(0);\n    }\n    return numext::exp(logax);\n}\n\ntemplate <typename Scalar, IgammaComputationMode mode>\nEIGEN_DEVICE_FUNC\nint igamma_num_iterations() {\n  /* Returns the maximum number of internal iterations for igamma computation.\n   */\n  if (mode == VALUE) {\n    return 2000;\n  }\n\n  if (internal::is_same<Scalar, float>::value) {\n    return 200;\n  } else if (internal::is_same<Scalar, double>::value) {\n    return 500;\n  } else {\n    return 2000;\n  }\n}\n\ntemplate <typename Scalar, IgammaComputationMode mode>\nstruct igammac_cf_impl {\n  /* Computes igamc(a, x) or derivative (depending on the mode)\n   * using the continued fraction expansion of the complementary\n   * incomplete Gamma function.\n   *\n   * Preconditions:\n   *   a > 0\n   *   x >= 1\n   *   x >= a\n   */\n  EIGEN_DEVICE_FUNC\n  static Scalar run(Scalar a, Scalar x) {\n    const Scalar zero = 0;\n    const Scalar one = 1;\n    const Scalar two = 2;\n    const Scalar machep = cephes_helper<Scalar>::machep();\n    const Scalar big = cephes_helper<Scalar>::big();\n    const Scalar biginv = cephes_helper<Scalar>::biginv();\n\n    if ((numext::isinf)(x)) {\n      return zero;\n    }\n\n    Scalar ax = main_igamma_term<Scalar>(a, x);\n    // This is independent of mode. If this value is zero,\n    // then the function value is zero. If the function value is zero,\n    // then we are in a neighborhood where the function value evalutes to zero,\n    // so the derivative is zero.\n    if (ax == zero) {\n      return zero;\n    }\n\n    // continued fraction\n    Scalar y = one - a;\n    Scalar z = x + y + one;\n    Scalar c = zero;\n    Scalar pkm2 = one;\n    Scalar qkm2 = x;\n    Scalar pkm1 = x + one;\n    Scalar qkm1 = z * x;\n    Scalar ans = pkm1 / qkm1;\n\n    Scalar dpkm2_da = zero;\n    Scalar dqkm2_da = zero;\n    Scalar dpkm1_da = zero;\n    Scalar dqkm1_da = -x;\n    Scalar dans_da = (dpkm1_da - ans * dqkm1_da) / qkm1;\n\n    for (int i = 0; i < igamma_num_iterations<Scalar, mode>(); i++) {\n      c += one;\n      y += one;\n      z += two;\n\n      Scalar yc = y * c;\n      Scalar pk = pkm1 * z - pkm2 * yc;\n      Scalar qk = qkm1 * z - qkm2 * yc;\n\n      Scalar dpk_da = dpkm1_da * z - pkm1 - dpkm2_da * yc + pkm2 * c;\n      Scalar dqk_da = dqkm1_da * z - qkm1 - dqkm2_da * yc + qkm2 * c;\n\n      if (qk != zero) {\n        Scalar ans_prev = ans;\n        ans = pk / qk;\n\n        Scalar dans_da_prev = dans_da;\n        dans_da = (dpk_da - ans * dqk_da) / qk;\n\n        if (mode == VALUE) {\n          if (numext::abs(ans_prev - ans) <= machep * numext::abs(ans)) {\n            break;\n          }\n        } else {\n          if (numext::abs(dans_da - dans_da_prev) <= machep) {\n            break;\n          }\n        }\n      }\n\n      pkm2 = pkm1;\n      pkm1 = pk;\n      qkm2 = qkm1;\n      qkm1 = qk;\n\n      dpkm2_da = dpkm1_da;\n      dpkm1_da = dpk_da;\n      dqkm2_da = dqkm1_da;\n      dqkm1_da = dqk_da;\n\n      if (numext::abs(pk) > big) {\n        pkm2 *= biginv;\n        pkm1 *= biginv;\n        qkm2 *= biginv;\n        qkm1 *= biginv;\n\n        dpkm2_da *= biginv;\n        dpkm1_da *= biginv;\n        dqkm2_da *= biginv;\n        dqkm1_da *= biginv;\n      }\n    }\n\n    /* Compute  x**a * exp(-x) / gamma(a)  */\n    Scalar dlogax_da = numext::log(x) - digamma_impl<Scalar>::run(a);\n    Scalar dax_da = ax * dlogax_da;\n\n    switch (mode) {\n      case VALUE:\n        return ans * ax;\n      case DERIVATIVE:\n        return ans * dax_da + dans_da * ax;\n      case SAMPLE_DERIVATIVE:\n      default: // this is needed to suppress clang warning\n        return -(dans_da + ans * dlogax_da) * x;\n    }\n  }\n};\n\ntemplate <typename Scalar, IgammaComputationMode mode>\nstruct igamma_series_impl {\n  /* Computes igam(a, x) or its derivative (depending on the mode)\n   * using the series expansion of the incomplete Gamma function.\n   *\n   * Preconditions:\n   *   x > 0\n   *   a > 0\n   *   !(x > 1 && x > a)\n   */\n  EIGEN_DEVICE_FUNC\n  static Scalar run(Scalar a, Scalar x) {\n    const Scalar zero = 0;\n    const Scalar one = 1;\n    const Scalar machep = cephes_helper<Scalar>::machep();\n\n    Scalar ax = main_igamma_term<Scalar>(a, x);\n\n    // This is independent of mode. If this value is zero,\n    // then the function value is zero. If the function value is zero,\n    // then we are in a neighborhood where the function value evalutes to zero,\n    // so the derivative is zero.\n    if (ax == zero) {\n      return zero;\n    }\n\n    ax /= a;\n\n    /* power series */\n    Scalar r = a;\n    Scalar c = one;\n    Scalar ans = one;\n\n    Scalar dc_da = zero;\n    Scalar dans_da = zero;\n\n    for (int i = 0; i < igamma_num_iterations<Scalar, mode>(); i++) {\n      r += one;\n      Scalar term = x / r;\n      Scalar dterm_da = -x / (r * r);\n      dc_da = term * dc_da + dterm_da * c;\n      dans_da += dc_da;\n      c *= term;\n      ans += c;\n\n      if (mode == VALUE) {\n        if (c <= machep * ans) {\n          break;\n        }\n      } else {\n        if (numext::abs(dc_da) <= machep * numext::abs(dans_da)) {\n          break;\n        }\n      }\n    }\n\n    Scalar dlogax_da = numext::log(x) - digamma_impl<Scalar>::run(a + one);\n    Scalar dax_da = ax * dlogax_da;\n\n    switch (mode) {\n      case VALUE:\n        return ans * ax;\n      case DERIVATIVE:\n        return ans * dax_da + dans_da * ax;\n      case SAMPLE_DERIVATIVE:\n      default: // this is needed to suppress clang warning\n        return -(dans_da + ans * dlogax_da) * x / a;\n    }\n  }\n};\n\n#if !EIGEN_HAS_C99_MATH\n\ntemplate <typename Scalar>\nstruct igammac_impl {\n  EIGEN_DEVICE_FUNC\n  static Scalar run(Scalar a, Scalar x) {\n    EIGEN_STATIC_ASSERT((internal::is_same<Scalar, Scalar>::value == false),\n                        THIS_TYPE_IS_NOT_SUPPORTED);\n    return Scalar(0);\n  }\n};\n\n#else\n\ntemplate <typename Scalar>\nstruct igammac_impl {\n  EIGEN_DEVICE_FUNC\n  static Scalar run(Scalar a, Scalar x) {\n    /*  igamc()\n     *\n     *\tIncomplete gamma integral (modified for Eigen)\n     *\n     *\n     *\n     * SYNOPSIS:\n     *\n     * double a, x, y, igamc();\n     *\n     * y = igamc( a, x );\n     *\n     * DESCRIPTION:\n     *\n     * The function is defined by\n     *\n     *\n     *  igamc(a,x)   =   1 - igam(a,x)\n     *\n     *                            inf.\n     *                              -\n     *                     1       | |  -t  a-1\n     *               =   -----     |   e   t   dt.\n     *                    -      | |\n     *                   | (a)    -\n     *                             x\n     *\n     *\n     * In this implementation both arguments must be positive.\n     * The integral is evaluated by either a power series or\n     * continued fraction expansion, depending on the relative\n     * values of a and x.\n     *\n     * ACCURACY (float):\n     *\n     *                      Relative error:\n     * arithmetic   domain     # trials      peak         rms\n     *    IEEE      0,30        30000       7.8e-6      5.9e-7\n     *\n     *\n     * ACCURACY (double):\n     *\n     * Tested at random a, x.\n     *                a         x                      Relative error:\n     * arithmetic   domain   domain     # trials      peak         rms\n     *    IEEE     0.5,100   0,100      200000       1.9e-14     1.7e-15\n     *    IEEE     0.01,0.5  0,100      200000       1.4e-13     1.6e-15\n     *\n     */\n    /*\n      Cephes Math Library Release 2.2: June, 1992\n      Copyright 1985, 1987, 1992 by Stephen L. Moshier\n      Direct inquiries to 30 Frost Street, Cambridge, MA 02140\n    */\n    const Scalar zero = 0;\n    const Scalar one = 1;\n    const Scalar nan = NumTraits<Scalar>::quiet_NaN();\n\n    if ((x < zero) || (a <= zero)) {\n      // domain error\n      return nan;\n    }\n\n    if ((numext::isnan)(a) || (numext::isnan)(x)) {  // propagate nans\n      return nan;\n    }\n\n    if ((x < one) || (x < a)) {\n      return (one - igamma_series_impl<Scalar, VALUE>::run(a, x));\n    }\n\n    return igammac_cf_impl<Scalar, VALUE>::run(a, x);\n  }\n};\n\n#endif  // EIGEN_HAS_C99_MATH\n\n/************************************************************************************************\n * Implementation of igamma (incomplete gamma integral), based on Cephes but requires C++11/C99 *\n ************************************************************************************************/\n\n#if !EIGEN_HAS_C99_MATH\n\ntemplate <typename Scalar, IgammaComputationMode mode>\nstruct igamma_generic_impl {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE Scalar run(Scalar a, Scalar x) {\n    EIGEN_STATIC_ASSERT((internal::is_same<Scalar, Scalar>::value == false),\n                        THIS_TYPE_IS_NOT_SUPPORTED);\n    return Scalar(0);\n  }\n};\n\n#else\n\ntemplate <typename Scalar, IgammaComputationMode mode>\nstruct igamma_generic_impl {\n  EIGEN_DEVICE_FUNC\n  static Scalar run(Scalar a, Scalar x) {\n    /* Depending on the mode, returns\n     * - VALUE: incomplete Gamma function igamma(a, x)\n     * - DERIVATIVE: derivative of incomplete Gamma function d/da igamma(a, x)\n     * - SAMPLE_DERIVATIVE: implicit derivative of a Gamma random variable\n     * x ~ Gamma(x | a, 1), dx/da = -1 / Gamma(x | a, 1) * d igamma(a, x) / dx\n     *\n     * Derivatives are implemented by forward-mode differentiation.\n     */\n    const Scalar zero = 0;\n    const Scalar one = 1;\n    const Scalar nan = NumTraits<Scalar>::quiet_NaN();\n\n    if (x == zero) return zero;\n\n    if ((x < zero) || (a <= zero)) {  // domain error\n      return nan;\n    }\n\n    if ((numext::isnan)(a) || (numext::isnan)(x)) {  // propagate nans\n      return nan;\n    }\n\n    if ((x > one) && (x > a)) {\n      Scalar ret = igammac_cf_impl<Scalar, mode>::run(a, x);\n      if (mode == VALUE) {\n        return one - ret;\n      } else {\n        return -ret;\n      }\n    }\n\n    return igamma_series_impl<Scalar, mode>::run(a, x);\n  }\n};\n\n#endif  // EIGEN_HAS_C99_MATH\n\ntemplate <typename Scalar>\nstruct igamma_retval {\n  typedef Scalar type;\n};\n\ntemplate <typename Scalar>\nstruct igamma_impl : igamma_generic_impl<Scalar, VALUE> {\n  /* igam()\n   * Incomplete gamma integral.\n   *\n   * The CDF of Gamma(a, 1) random variable at the point x.\n   *\n   * Accuracy estimation. For each a in [10^-2, 10^-1...10^3] we sample\n   * 50 Gamma random variables x ~ Gamma(x | a, 1), a total of 300 points.\n   * The ground truth is computed by mpmath. Mean absolute error:\n   * float: 1.26713e-05\n   * double: 2.33606e-12\n   *\n   * Cephes documentation below.\n   *\n   * SYNOPSIS:\n   *\n   * double a, x, y, igam();\n   *\n   * y = igam( a, x );\n   *\n   * DESCRIPTION:\n   *\n   * The function is defined by\n   *\n   *                           x\n   *                            -\n   *                   1       | |  -t  a-1\n   *  igam(a,x)  =   -----     |   e   t   dt.\n   *                  -      | |\n   *                 | (a)    -\n   *                           0\n   *\n   *\n   * In this implementation both arguments must be positive.\n   * The integral is evaluated by either a power series or\n   * continued fraction expansion, depending on the relative\n   * values of a and x.\n   *\n   * ACCURACY (double):\n   *\n   *                      Relative error:\n   * arithmetic   domain     # trials      peak         rms\n   *    IEEE      0,30       200000       3.6e-14     2.9e-15\n   *    IEEE      0,100      300000       9.9e-14     1.5e-14\n   *\n   *\n   * ACCURACY (float):\n   *\n   *                      Relative error:\n   * arithmetic   domain     # trials      peak         rms\n   *    IEEE      0,30        20000       7.8e-6      5.9e-7\n   *\n   */\n  /*\n    Cephes Math Library Release 2.2: June, 1992\n    Copyright 1985, 1987, 1992 by Stephen L. Moshier\n    Direct inquiries to 30 Frost Street, Cambridge, MA 02140\n  */\n\n  /* left tail of incomplete gamma function:\n   *\n   *          inf.      k\n   *   a  -x   -       x\n   *  x  e     >   ----------\n   *           -     -\n   *          k=0   | (a+k+1)\n   *\n   */\n};\n\ntemplate <typename Scalar>\nstruct igamma_der_a_retval : igamma_retval<Scalar> {};\n\ntemplate <typename Scalar>\nstruct igamma_der_a_impl : igamma_generic_impl<Scalar, DERIVATIVE> {\n  /* Derivative of the incomplete Gamma function with respect to a.\n   *\n   * Computes d/da igamma(a, x) by forward differentiation of the igamma code.\n   *\n   * Accuracy estimation. For each a in [10^-2, 10^-1...10^3] we sample\n   * 50 Gamma random variables x ~ Gamma(x | a, 1), a total of 300 points.\n   * The ground truth is computed by mpmath. Mean absolute error:\n   * float: 6.17992e-07\n   * double: 4.60453e-12\n   *\n   * Reference:\n   * R. Moore. \"Algorithm AS 187: Derivatives of the incomplete gamma\n   * integral\". Journal of the Royal Statistical Society. 1982\n   */\n};\n\ntemplate <typename Scalar>\nstruct gamma_sample_der_alpha_retval : igamma_retval<Scalar> {};\n\ntemplate <typename Scalar>\nstruct gamma_sample_der_alpha_impl\n    : igamma_generic_impl<Scalar, SAMPLE_DERIVATIVE> {\n  /* Derivative of a Gamma random variable sample with respect to alpha.\n   *\n   * Consider a sample of a Gamma random variable with the concentration\n   * parameter alpha: sample ~ Gamma(alpha, 1). The reparameterization\n   * derivative that we want to compute is dsample / dalpha =\n   * d igammainv(alpha, u) / dalpha, where u = igamma(alpha, sample).\n   * However, this formula is numerically unstable and expensive, so instead\n   * we use implicit differentiation:\n   *\n   * igamma(alpha, sample) = u, where u ~ Uniform(0, 1).\n   * Apply d / dalpha to both sides:\n   * d igamma(alpha, sample) / dalpha\n   *     + d igamma(alpha, sample) / dsample * dsample/dalpha  = 0\n   * d igamma(alpha, sample) / dalpha\n   *     + Gamma(sample | alpha, 1) dsample / dalpha = 0\n   * dsample/dalpha = - (d igamma(alpha, sample) / dalpha)\n   *                   / Gamma(sample | alpha, 1)\n   *\n   * Here Gamma(sample | alpha, 1) is the PDF of the Gamma distribution\n   * (note that the derivative of the CDF w.r.t. sample is the PDF).\n   * See the reference below for more details.\n   *\n   * The derivative of igamma(alpha, sample) is computed by forward\n   * differentiation of the igamma code. Division by the Gamma PDF is performed\n   * in the same code, increasing the accuracy and speed due to cancellation\n   * of some terms.\n   *\n   * Accuracy estimation. For each alpha in [10^-2, 10^-1...10^3] we sample\n   * 50 Gamma random variables sample ~ Gamma(sample | alpha, 1), a total of 300\n   * points. The ground truth is computed by mpmath. Mean absolute error:\n   * float: 2.1686e-06\n   * double: 1.4774e-12\n   *\n   * Reference:\n   * M. Figurnov, S. Mohamed, A. Mnih \"Implicit Reparameterization Gradients\".\n   * 2018\n   */\n};\n\n/*****************************************************************************\n * Implementation of Riemann zeta function of two arguments, based on Cephes *\n *****************************************************************************/\n\ntemplate <typename Scalar>\nstruct zeta_retval {\n    typedef Scalar type;\n};\n\ntemplate <typename Scalar>\nstruct zeta_impl_series {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE Scalar run(const Scalar) {\n    EIGEN_STATIC_ASSERT((internal::is_same<Scalar, Scalar>::value == false),\n                        THIS_TYPE_IS_NOT_SUPPORTED);\n    return Scalar(0);\n  }\n};\n\ntemplate <>\nstruct zeta_impl_series<float> {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE bool run(float& a, float& b, float& s, const float x, const float machep) {\n    int i = 0;\n    while(i < 9)\n    {\n        i += 1;\n        a += 1.0f;\n        b = numext::pow( a, -x );\n        s += b;\n        if( numext::abs(b/s) < machep )\n            return true;\n    }\n\n    //Return whether we are done\n    return false;\n  }\n};\n\ntemplate <>\nstruct zeta_impl_series<double> {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE bool run(double& a, double& b, double& s, const double x, const double machep) {\n    int i = 0;\n    while( (i < 9) || (a <= 9.0) )\n    {\n        i += 1;\n        a += 1.0;\n        b = numext::pow( a, -x );\n        s += b;\n        if( numext::abs(b/s) < machep )\n            return true;\n    }\n\n    //Return whether we are done\n    return false;\n  }\n};\n\ntemplate <typename Scalar>\nstruct zeta_impl {\n    EIGEN_DEVICE_FUNC\n    static Scalar run(Scalar x, Scalar q) {\n        /*\t\t\t\t\t\t\tzeta.c\n         *\n         *\tRiemann zeta function of two arguments\n         *\n         *\n         *\n         * SYNOPSIS:\n         *\n         * double x, q, y, zeta();\n         *\n         * y = zeta( x, q );\n         *\n         *\n         *\n         * DESCRIPTION:\n         *\n         *\n         *\n         *                 inf.\n         *                  -        -x\n         *   zeta(x,q)  =   >   (k+q)\n         *                  -\n         *                 k=0\n         *\n         * where x > 1 and q is not a negative integer or zero.\n         * The Euler-Maclaurin summation formula is used to obtain\n         * the expansion\n         *\n         *                n\n         *                -       -x\n         * zeta(x,q)  =   >  (k+q)\n         *                -\n         *               k=1\n         *\n         *           1-x                 inf.  B   x(x+1)...(x+2j)\n         *      (n+q)           1         -     2j\n         *  +  ---------  -  -------  +   >    --------------------\n         *        x-1              x      -                   x+2j+1\n         *                   2(n+q)      j=1       (2j)! (n+q)\n         *\n         * where the B2j are Bernoulli numbers.  Note that (see zetac.c)\n         * zeta(x,1) = zetac(x) + 1.\n         *\n         *\n         *\n         * ACCURACY:\n         *\n         * Relative error for single precision:\n         * arithmetic   domain     # trials      peak         rms\n         *    IEEE      0,25        10000       6.9e-7      1.0e-7\n         *\n         * Large arguments may produce underflow in powf(), in which\n         * case the results are inaccurate.\n         *\n         * REFERENCE:\n         *\n         * Gradshteyn, I. S., and I. M. Ryzhik, Tables of Integrals,\n         * Series, and Products, p. 1073; Academic Press, 1980.\n         *\n         */\n\n        int i;\n        Scalar p, r, a, b, k, s, t, w;\n\n        const Scalar A[] = {\n            Scalar(12.0),\n            Scalar(-720.0),\n            Scalar(30240.0),\n            Scalar(-1209600.0),\n            Scalar(47900160.0),\n            Scalar(-1.8924375803183791606e9), /*1.307674368e12/691*/\n            Scalar(7.47242496e10),\n            Scalar(-2.950130727918164224e12), /*1.067062284288e16/3617*/\n            Scalar(1.1646782814350067249e14), /*5.109094217170944e18/43867*/\n            Scalar(-4.5979787224074726105e15), /*8.028576626982912e20/174611*/\n            Scalar(1.8152105401943546773e17), /*1.5511210043330985984e23/854513*/\n            Scalar(-7.1661652561756670113e18) /*1.6938241367317436694528e27/236364091*/\n            };\n\n        const Scalar maxnum = NumTraits<Scalar>::infinity();\n        const Scalar zero = 0.0, half = 0.5, one = 1.0;\n        const Scalar machep = cephes_helper<Scalar>::machep();\n        const Scalar nan = NumTraits<Scalar>::quiet_NaN();\n\n        if( x == one )\n            return maxnum;\n\n        if( x < one )\n        {\n            return nan;\n        }\n\n        if( q <= zero )\n        {\n            if(q == numext::floor(q))\n            {\n                return maxnum;\n            }\n            p = x;\n            r = numext::floor(p);\n            if (p != r)\n                return nan;\n        }\n\n        /* Permit negative q but continue sum until n+q > +9 .\n         * This case should be handled by a reflection formula.\n         * If q<0 and x is an integer, there is a relation to\n         * the polygamma function.\n         */\n        s = numext::pow( q, -x );\n        a = q;\n        b = zero;\n        // Run the summation in a helper function that is specific to the floating precision\n        if (zeta_impl_series<Scalar>::run(a, b, s, x, machep)) {\n            return s;\n        }\n\n        w = a;\n        s += b*w/(x-one);\n        s -= half * b;\n        a = one;\n        k = zero;\n        for( i=0; i<12; i++ )\n        {\n            a *= x + k;\n            b /= w;\n            t = a*b/A[i];\n            s = s + t;\n            t = numext::abs(t/s);\n            if( t < machep ) {\n              break;\n            }\n            k += one;\n            a *= x + k;\n            b /= w;\n            k += one;\n        }\n        return s;\n  }\n};\n\n/****************************************************************************\n * Implementation of polygamma function, requires C++11/C99                 *\n ****************************************************************************/\n\ntemplate <typename Scalar>\nstruct polygamma_retval {\n    typedef Scalar type;\n};\n\n#if !EIGEN_HAS_C99_MATH\n\ntemplate <typename Scalar>\nstruct polygamma_impl {\n    EIGEN_DEVICE_FUNC\n    static EIGEN_STRONG_INLINE Scalar run(Scalar n, Scalar x) {\n        EIGEN_STATIC_ASSERT((internal::is_same<Scalar, Scalar>::value == false),\n                            THIS_TYPE_IS_NOT_SUPPORTED);\n        return Scalar(0);\n    }\n};\n\n#else\n\ntemplate <typename Scalar>\nstruct polygamma_impl {\n    EIGEN_DEVICE_FUNC\n    static Scalar run(Scalar n, Scalar x) {\n        Scalar zero = 0.0, one = 1.0;\n        Scalar nplus = n + one;\n        const Scalar nan = NumTraits<Scalar>::quiet_NaN();\n\n        // Check that n is an integer\n        if (numext::floor(n) != n) {\n            return nan;\n        }\n        // Just return the digamma function for n = 1\n        else if (n == zero) {\n            return digamma_impl<Scalar>::run(x);\n        }\n        // Use the same implementation as scipy\n        else {\n            Scalar factorial = numext::exp(lgamma_impl<Scalar>::run(nplus));\n            return numext::pow(-one, nplus) * factorial * zeta_impl<Scalar>::run(nplus, x);\n        }\n  }\n};\n\n#endif  // EIGEN_HAS_C99_MATH\n\n/************************************************************************************************\n * Implementation of betainc (incomplete beta integral), based on Cephes but requires C++11/C99 *\n ************************************************************************************************/\n\ntemplate <typename Scalar>\nstruct betainc_retval {\n  typedef Scalar type;\n};\n\n#if !EIGEN_HAS_C99_MATH\n\ntemplate <typename Scalar>\nstruct betainc_impl {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE Scalar run(Scalar a, Scalar b, Scalar x) {\n    EIGEN_STATIC_ASSERT((internal::is_same<Scalar, Scalar>::value == false),\n                        THIS_TYPE_IS_NOT_SUPPORTED);\n    return Scalar(0);\n  }\n};\n\n#else\n\ntemplate <typename Scalar>\nstruct betainc_impl {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE Scalar run(Scalar, Scalar, Scalar) {\n    /*\tbetaincf.c\n     *\n     *\tIncomplete beta integral\n     *\n     *\n     * SYNOPSIS:\n     *\n     * float a, b, x, y, betaincf();\n     *\n     * y = betaincf( a, b, x );\n     *\n     *\n     * DESCRIPTION:\n     *\n     * Returns incomplete beta integral of the arguments, evaluated\n     * from zero to x.  The function is defined as\n     *\n     *                  x\n     *     -            -\n     *    | (a+b)      | |  a-1     b-1\n     *  -----------    |   t   (1-t)   dt.\n     *   -     -     | |\n     *  | (a) | (b)   -\n     *                 0\n     *\n     * The domain of definition is 0 <= x <= 1.  In this\n     * implementation a and b are restricted to positive values.\n     * The integral from x to 1 may be obtained by the symmetry\n     * relation\n     *\n     *    1 - betainc( a, b, x )  =  betainc( b, a, 1-x ).\n     *\n     * The integral is evaluated by a continued fraction expansion.\n     * If a < 1, the function calls itself recursively after a\n     * transformation to increase a to a+1.\n     *\n     * ACCURACY (float):\n     *\n     * Tested at random points (a,b,x) with a and b in the indicated\n     * interval and x between 0 and 1.\n     *\n     * arithmetic   domain     # trials      peak         rms\n     * Relative error:\n     *    IEEE       0,30       10000       3.7e-5      5.1e-6\n     *    IEEE       0,100      10000       1.7e-4      2.5e-5\n     * The useful domain for relative error is limited by underflow\n     * of the single precision exponential function.\n     * Absolute error:\n     *    IEEE       0,30      100000       2.2e-5      9.6e-7\n     *    IEEE       0,100      10000       6.5e-5      3.7e-6\n     *\n     * Larger errors may occur for extreme ratios of a and b.\n     *\n     * ACCURACY (double):\n     * arithmetic   domain     # trials      peak         rms\n     *    IEEE      0,5         10000       6.9e-15     4.5e-16\n     *    IEEE      0,85       250000       2.2e-13     1.7e-14\n     *    IEEE      0,1000      30000       5.3e-12     6.3e-13\n     *    IEEE      0,10000    250000       9.3e-11     7.1e-12\n     *    IEEE      0,100000    10000       8.7e-10     4.8e-11\n     * Outputs smaller than the IEEE gradual underflow threshold\n     * were excluded from these statistics.\n     *\n     * ERROR MESSAGES:\n     *   message         condition      value returned\n     * incbet domain      x<0, x>1          nan\n     * incbet underflow                     nan\n     */\n\n    EIGEN_STATIC_ASSERT((internal::is_same<Scalar, Scalar>::value == false),\n                        THIS_TYPE_IS_NOT_SUPPORTED);\n    return Scalar(0);\n  }\n};\n\n/* Continued fraction expansion #1 for incomplete beta integral (small_branch = True)\n * Continued fraction expansion #2 for incomplete beta integral (small_branch = False)\n */\ntemplate <typename Scalar>\nstruct incbeta_cfe {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE Scalar run(Scalar a, Scalar b, Scalar x, bool small_branch) {\n    EIGEN_STATIC_ASSERT((internal::is_same<Scalar, float>::value ||\n                         internal::is_same<Scalar, double>::value),\n                        THIS_TYPE_IS_NOT_SUPPORTED);\n    const Scalar big = cephes_helper<Scalar>::big();\n    const Scalar machep = cephes_helper<Scalar>::machep();\n    const Scalar biginv = cephes_helper<Scalar>::biginv();\n\n    const Scalar zero = 0;\n    const Scalar one = 1;\n    const Scalar two = 2;\n\n    Scalar xk, pk, pkm1, pkm2, qk, qkm1, qkm2;\n    Scalar k1, k2, k3, k4, k5, k6, k7, k8, k26update;\n    Scalar ans;\n    int n;\n\n    const int num_iters = (internal::is_same<Scalar, float>::value) ? 100 : 300;\n    const Scalar thresh =\n        (internal::is_same<Scalar, float>::value) ? machep : Scalar(3) * machep;\n    Scalar r = (internal::is_same<Scalar, float>::value) ? zero : one;\n\n    if (small_branch) {\n      k1 = a;\n      k2 = a + b;\n      k3 = a;\n      k4 = a + one;\n      k5 = one;\n      k6 = b - one;\n      k7 = k4;\n      k8 = a + two;\n      k26update = one;\n    } else {\n      k1 = a;\n      k2 = b - one;\n      k3 = a;\n      k4 = a + one;\n      k5 = one;\n      k6 = a + b;\n      k7 = a + one;\n      k8 = a + two;\n      k26update = -one;\n      x = x / (one - x);\n    }\n\n    pkm2 = zero;\n    qkm2 = one;\n    pkm1 = one;\n    qkm1 = one;\n    ans = one;\n    n = 0;\n\n    do {\n      xk = -(x * k1 * k2) / (k3 * k4);\n      pk = pkm1 + pkm2 * xk;\n      qk = qkm1 + qkm2 * xk;\n      pkm2 = pkm1;\n      pkm1 = pk;\n      qkm2 = qkm1;\n      qkm1 = qk;\n\n      xk = (x * k5 * k6) / (k7 * k8);\n      pk = pkm1 + pkm2 * xk;\n      qk = qkm1 + qkm2 * xk;\n      pkm2 = pkm1;\n      pkm1 = pk;\n      qkm2 = qkm1;\n      qkm1 = qk;\n\n      if (qk != zero) {\n        r = pk / qk;\n        if (numext::abs(ans - r) < numext::abs(r) * thresh) {\n          return r;\n        }\n        ans = r;\n      }\n\n      k1 += one;\n      k2 += k26update;\n      k3 += two;\n      k4 += two;\n      k5 += one;\n      k6 -= k26update;\n      k7 += two;\n      k8 += two;\n\n      if ((numext::abs(qk) + numext::abs(pk)) > big) {\n        pkm2 *= biginv;\n        pkm1 *= biginv;\n        qkm2 *= biginv;\n        qkm1 *= biginv;\n      }\n      if ((numext::abs(qk) < biginv) || (numext::abs(pk) < biginv)) {\n        pkm2 *= big;\n        pkm1 *= big;\n        qkm2 *= big;\n        qkm1 *= big;\n      }\n    } while (++n < num_iters);\n\n    return ans;\n  }\n};\n\n/* Helper functions depending on the Scalar type */\ntemplate <typename Scalar>\nstruct betainc_helper {};\n\ntemplate <>\nstruct betainc_helper<float> {\n  /* Core implementation, assumes a large (> 1.0) */\n  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE float incbsa(float aa, float bb,\n                                                            float xx) {\n    float ans, a, b, t, x, onemx;\n    bool reversed_a_b = false;\n\n    onemx = 1.0f - xx;\n\n    /* see if x is greater than the mean */\n    if (xx > (aa / (aa + bb))) {\n      reversed_a_b = true;\n      a = bb;\n      b = aa;\n      t = xx;\n      x = onemx;\n    } else {\n      a = aa;\n      b = bb;\n      t = onemx;\n      x = xx;\n    }\n\n    /* Choose expansion for optimal convergence */\n    if (b > 10.0f) {\n      if (numext::abs(b * x / a) < 0.3f) {\n        t = betainc_helper<float>::incbps(a, b, x);\n        if (reversed_a_b) t = 1.0f - t;\n        return t;\n      }\n    }\n\n    ans = x * (a + b - 2.0f) / (a - 1.0f);\n    if (ans < 1.0f) {\n      ans = incbeta_cfe<float>::run(a, b, x, true /* small_branch */);\n      t = b * numext::log(t);\n    } else {\n      ans = incbeta_cfe<float>::run(a, b, x, false /* small_branch */);\n      t = (b - 1.0f) * numext::log(t);\n    }\n\n    t += a * numext::log(x) + lgamma_impl<float>::run(a + b) -\n         lgamma_impl<float>::run(a) - lgamma_impl<float>::run(b);\n    t += numext::log(ans / a);\n    t = numext::exp(t);\n\n    if (reversed_a_b) t = 1.0f - t;\n    return t;\n  }\n\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE float incbps(float a, float b, float x) {\n    float t, u, y, s;\n    const float machep = cephes_helper<float>::machep();\n\n    y = a * numext::log(x) + (b - 1.0f) * numext::log1p(-x) - numext::log(a);\n    y -= lgamma_impl<float>::run(a) + lgamma_impl<float>::run(b);\n    y += lgamma_impl<float>::run(a + b);\n\n    t = x / (1.0f - x);\n    s = 0.0f;\n    u = 1.0f;\n    do {\n      b -= 1.0f;\n      if (b == 0.0f) {\n        break;\n      }\n      a += 1.0f;\n      u *= t * b / a;\n      s += u;\n    } while (numext::abs(u) > machep);\n\n    return numext::exp(y) * (1.0f + s);\n  }\n};\n\ntemplate <>\nstruct betainc_impl<float> {\n  EIGEN_DEVICE_FUNC\n  static float run(float a, float b, float x) {\n    const float nan = NumTraits<float>::quiet_NaN();\n    float ans, t;\n\n    if (a <= 0.0f) return nan;\n    if (b <= 0.0f) return nan;\n    if ((x <= 0.0f) || (x >= 1.0f)) {\n      if (x == 0.0f) return 0.0f;\n      if (x == 1.0f) return 1.0f;\n      // mtherr(\"betaincf\", DOMAIN);\n      return nan;\n    }\n\n    /* transformation for small aa */\n    if (a <= 1.0f) {\n      ans = betainc_helper<float>::incbsa(a + 1.0f, b, x);\n      t = a * numext::log(x) + b * numext::log1p(-x) +\n          lgamma_impl<float>::run(a + b) - lgamma_impl<float>::run(a + 1.0f) -\n          lgamma_impl<float>::run(b);\n      return (ans + numext::exp(t));\n    } else {\n      return betainc_helper<float>::incbsa(a, b, x);\n    }\n  }\n};\n\ntemplate <>\nstruct betainc_helper<double> {\n  EIGEN_DEVICE_FUNC\n  static EIGEN_STRONG_INLINE double incbps(double a, double b, double x) {\n    const double machep = cephes_helper<double>::machep();\n\n    double s, t, u, v, n, t1, z, ai;\n\n    ai = 1.0 / a;\n    u = (1.0 - b) * x;\n    v = u / (a + 1.0);\n    t1 = v;\n    t = u;\n    n = 2.0;\n    s = 0.0;\n    z = machep * ai;\n    while (numext::abs(v) > z) {\n      u = (n - b) * x / n;\n      t *= u;\n      v = t / (a + n);\n      s += v;\n      n += 1.0;\n    }\n    s += t1;\n    s += ai;\n\n    u = a * numext::log(x);\n    // TODO: gamma() is not directly implemented in Eigen.\n    /*\n    if ((a + b) < maxgam && numext::abs(u) < maxlog) {\n      t = gamma(a + b) / (gamma(a) * gamma(b));\n      s = s * t * pow(x, a);\n    }\n    */\n    t = lgamma_impl<double>::run(a + b) - lgamma_impl<double>::run(a) -\n        lgamma_impl<double>::run(b) + u + numext::log(s);\n    return s = numext::exp(t);\n  }\n};\n\ntemplate <>\nstruct betainc_impl<double> {\n  EIGEN_DEVICE_FUNC\n  static double run(double aa, double bb, double xx) {\n    const double nan = NumTraits<double>::quiet_NaN();\n    const double machep = cephes_helper<double>::machep();\n    // const double maxgam = 171.624376956302725;\n\n    double a, b, t, x, xc, w, y;\n    bool reversed_a_b = false;\n\n    if (aa <= 0.0 || bb <= 0.0) {\n      return nan;  // goto domerr;\n    }\n\n    if ((xx <= 0.0) || (xx >= 1.0)) {\n      if (xx == 0.0) return (0.0);\n      if (xx == 1.0) return (1.0);\n      // mtherr(\"incbet\", DOMAIN);\n      return nan;\n    }\n\n    if ((bb * xx) <= 1.0 && xx <= 0.95) {\n      return betainc_helper<double>::incbps(aa, bb, xx);\n    }\n\n    w = 1.0 - xx;\n\n    /* Reverse a and b if x is greater than the mean. */\n    if (xx > (aa / (aa + bb))) {\n      reversed_a_b = true;\n      a = bb;\n      b = aa;\n      xc = xx;\n      x = w;\n    } else {\n      a = aa;\n      b = bb;\n      xc = w;\n      x = xx;\n    }\n\n    if (reversed_a_b && (b * x) <= 1.0 && x <= 0.95) {\n      t = betainc_helper<double>::incbps(a, b, x);\n      if (t <= machep) {\n        t = 1.0 - machep;\n      } else {\n        t = 1.0 - t;\n      }\n      return t;\n    }\n\n    /* Choose expansion for better convergence. */\n    y = x * (a + b - 2.0) - (a - 1.0);\n    if (y < 0.0) {\n      w = incbeta_cfe<double>::run(a, b, x, true /* small_branch */);\n    } else {\n      w = incbeta_cfe<double>::run(a, b, x, false /* small_branch */) / xc;\n    }\n\n    /* Multiply w by the factor\n         a      b   _             _     _\n        x  (1-x)   | (a+b) / ( a | (a) | (b) ) .   */\n\n    y = a * numext::log(x);\n    t = b * numext::log(xc);\n    // TODO: gamma is not directly implemented in Eigen.\n    /*\n    if ((a + b) < maxgam && numext::abs(y) < maxlog && numext::abs(t) < maxlog)\n    {\n      t = pow(xc, b);\n      t *= pow(x, a);\n      t /= a;\n      t *= w;\n      t *= gamma(a + b) / (gamma(a) * gamma(b));\n    } else {\n    */\n    /* Resort to logarithms.  */\n    y += t + lgamma_impl<double>::run(a + b) - lgamma_impl<double>::run(a) -\n         lgamma_impl<double>::run(b);\n    y += numext::log(w / a);\n    t = numext::exp(y);\n\n    /* } */\n    // done:\n\n    if (reversed_a_b) {\n      if (t <= machep) {\n        t = 1.0 - machep;\n      } else {\n        t = 1.0 - t;\n      }\n    }\n    return t;\n  }\n};\n\n#endif  // EIGEN_HAS_C99_MATH\n\n}  // end namespace internal\n\nnamespace numext {\n\ntemplate <typename Scalar>\nEIGEN_DEVICE_FUNC inline EIGEN_MATHFUNC_RETVAL(lgamma, Scalar)\n    lgamma(const Scalar& x) {\n  return EIGEN_MATHFUNC_IMPL(lgamma, Scalar)::run(x);\n}\n\ntemplate <typename Scalar>\nEIGEN_DEVICE_FUNC inline EIGEN_MATHFUNC_RETVAL(digamma, Scalar)\n    digamma(const Scalar& x) {\n  return EIGEN_MATHFUNC_IMPL(digamma, Scalar)::run(x);\n}\n\ntemplate <typename Scalar>\nEIGEN_DEVICE_FUNC inline EIGEN_MATHFUNC_RETVAL(zeta, Scalar)\nzeta(const Scalar& x, const Scalar& q) {\n    return EIGEN_MATHFUNC_IMPL(zeta, Scalar)::run(x, q);\n}\n\ntemplate <typename Scalar>\nEIGEN_DEVICE_FUNC inline EIGEN_MATHFUNC_RETVAL(polygamma, Scalar)\npolygamma(const Scalar& n, const Scalar& x) {\n    return EIGEN_MATHFUNC_IMPL(polygamma, Scalar)::run(n, x);\n}\n\ntemplate <typename Scalar>\nEIGEN_DEVICE_FUNC inline EIGEN_MATHFUNC_RETVAL(erf, Scalar)\n    erf(const Scalar& x) {\n  return EIGEN_MATHFUNC_IMPL(erf, Scalar)::run(x);\n}\n\ntemplate <typename Scalar>\nEIGEN_DEVICE_FUNC inline EIGEN_MATHFUNC_RETVAL(erfc, Scalar)\n    erfc(const Scalar& x) {\n  return EIGEN_MATHFUNC_IMPL(erfc, Scalar)::run(x);\n}\n\ntemplate <typename Scalar>\nEIGEN_DEVICE_FUNC inline EIGEN_MATHFUNC_RETVAL(ndtri, Scalar)\n    ndtri(const Scalar& x) {\n  return EIGEN_MATHFUNC_IMPL(ndtri, Scalar)::run(x);\n}\n\ntemplate <typename Scalar>\nEIGEN_DEVICE_FUNC inline EIGEN_MATHFUNC_RETVAL(igamma, Scalar)\n    igamma(const Scalar& a, const Scalar& x) {\n  return EIGEN_MATHFUNC_IMPL(igamma, Scalar)::run(a, x);\n}\n\ntemplate <typename Scalar>\nEIGEN_DEVICE_FUNC inline EIGEN_MATHFUNC_RETVAL(igamma_der_a, Scalar)\n    igamma_der_a(const Scalar& a, const Scalar& x) {\n  return EIGEN_MATHFUNC_IMPL(igamma_der_a, Scalar)::run(a, x);\n}\n\ntemplate <typename Scalar>\nEIGEN_DEVICE_FUNC inline EIGEN_MATHFUNC_RETVAL(gamma_sample_der_alpha, Scalar)\n    gamma_sample_der_alpha(const Scalar& a, const Scalar& x) {\n  return EIGEN_MATHFUNC_IMPL(gamma_sample_der_alpha, Scalar)::run(a, x);\n}\n\ntemplate <typename Scalar>\nEIGEN_DEVICE_FUNC inline EIGEN_MATHFUNC_RETVAL(igammac, Scalar)\n    igammac(const Scalar& a, const Scalar& x) {\n  return EIGEN_MATHFUNC_IMPL(igammac, Scalar)::run(a, x);\n}\n\ntemplate <typename Scalar>\nEIGEN_DEVICE_FUNC inline EIGEN_MATHFUNC_RETVAL(betainc, Scalar)\n    betainc(const Scalar& a, const Scalar& b, const Scalar& x) {\n  return EIGEN_MATHFUNC_IMPL(betainc, Scalar)::run(a, b, x);\n}\n\n}  // end namespace numext\n}  // end namespace Eigen\n\n#endif  // EIGEN_SPECIAL_FUNCTIONS_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/SpecialFunctions/SpecialFunctionsPacketMath.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPECIALFUNCTIONS_PACKETMATH_H\n#define EIGEN_SPECIALFUNCTIONS_PACKETMATH_H\n\nnamespace Eigen {\n\nnamespace internal {\n\n/** \\internal \\returns the ln(|gamma(\\a a)|) (coeff-wise) */\ntemplate<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nPacket plgamma(const Packet& a) { using numext::lgamma; return lgamma(a); }\n\n/** \\internal \\returns the derivative of lgamma, psi(\\a a) (coeff-wise) */\ntemplate<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nPacket pdigamma(const Packet& a) { using numext::digamma; return digamma(a); }\n\n/** \\internal \\returns the zeta function of two arguments (coeff-wise) */\ntemplate<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nPacket pzeta(const Packet& x, const Packet& q) { using numext::zeta; return zeta(x, q); }\n\n/** \\internal \\returns the polygamma function (coeff-wise) */\ntemplate<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nPacket ppolygamma(const Packet& n, const Packet& x) { using numext::polygamma; return polygamma(n, x); }\n\n/** \\internal \\returns the erf(\\a a) (coeff-wise) */\ntemplate<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nPacket perf(const Packet& a) { using numext::erf; return erf(a); }\n\n/** \\internal \\returns the erfc(\\a a) (coeff-wise) */\ntemplate<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nPacket perfc(const Packet& a) { using numext::erfc; return erfc(a); }\n\n/** \\internal \\returns the ndtri(\\a a) (coeff-wise) */\ntemplate<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS\nPacket pndtri(const Packet& a) {\n  typedef typename unpacket_traits<Packet>::type ScalarType;\n  using internal::generic_ndtri; return generic_ndtri<Packet, ScalarType>(a);\n}\n\n/** \\internal \\returns the incomplete gamma function igamma(\\a a, \\a x) */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nPacket pigamma(const Packet& a, const Packet& x) { using numext::igamma; return igamma(a, x); }\n\n/** \\internal \\returns the derivative of the incomplete gamma function\n * igamma_der_a(\\a a, \\a x) */\ntemplate <typename Packet>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet pigamma_der_a(const Packet& a, const Packet& x) {\n  using numext::igamma_der_a; return igamma_der_a(a, x);\n}\n\n/** \\internal \\returns compute the derivative of the sample\n  * of Gamma(alpha, 1) random variable with respect to the parameter a\n  * gamma_sample_der_alpha(\\a alpha, \\a sample) */\ntemplate <typename Packet>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet pgamma_sample_der_alpha(const Packet& alpha, const Packet& sample) {\n  using numext::gamma_sample_der_alpha; return gamma_sample_der_alpha(alpha, sample);\n}\n\n/** \\internal \\returns the complementary incomplete gamma function igammac(\\a a, \\a x) */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nPacket pigammac(const Packet& a, const Packet& x) { using numext::igammac; return igammac(a, x); }\n\n/** \\internal \\returns the complementary incomplete gamma function betainc(\\a a, \\a b, \\a x) */\ntemplate<typename Packet> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nPacket pbetainc(const Packet& a, const Packet& b,const Packet& x) { using numext::betainc; return betainc(a, b, x); }\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_SPECIALFUNCTIONS_PACKETMATH_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/SpecialFunctions/arch/GPU/GpuSpecialFunctions.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_GPU_SPECIALFUNCTIONS_H\n#define EIGEN_GPU_SPECIALFUNCTIONS_H\n\nnamespace Eigen {\n\nnamespace internal {\n\n// Make sure this is only available when targeting a GPU: we don't want to\n// introduce conflicts between these packet_traits definitions and the ones\n// we'll use on the host side (SSE, AVX, ...)\n#if defined(EIGEN_GPUCC) && defined(EIGEN_USE_GPU)\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nfloat4 plgamma<float4>(const float4& a)\n{\n  return make_float4(lgammaf(a.x), lgammaf(a.y), lgammaf(a.z), lgammaf(a.w));\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ndouble2 plgamma<double2>(const double2& a)\n{\n  using numext::lgamma;\n  return make_double2(lgamma(a.x), lgamma(a.y));\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nfloat4 pdigamma<float4>(const float4& a)\n{\n  using numext::digamma;\n  return make_float4(digamma(a.x), digamma(a.y), digamma(a.z), digamma(a.w));\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ndouble2 pdigamma<double2>(const double2& a)\n{\n  using numext::digamma;\n  return make_double2(digamma(a.x), digamma(a.y));\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nfloat4 pzeta<float4>(const float4& x, const float4& q)\n{\n    using numext::zeta;\n    return make_float4(zeta(x.x, q.x), zeta(x.y, q.y), zeta(x.z, q.z), zeta(x.w, q.w));\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ndouble2 pzeta<double2>(const double2& x, const double2& q)\n{\n    using numext::zeta;\n    return make_double2(zeta(x.x, q.x), zeta(x.y, q.y));\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nfloat4 ppolygamma<float4>(const float4& n, const float4& x)\n{\n    using numext::polygamma;\n    return make_float4(polygamma(n.x, x.x), polygamma(n.y, x.y), polygamma(n.z, x.z), polygamma(n.w, x.w));\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ndouble2 ppolygamma<double2>(const double2& n, const double2& x)\n{\n    using numext::polygamma;\n    return make_double2(polygamma(n.x, x.x), polygamma(n.y, x.y));\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nfloat4 perf<float4>(const float4& a)\n{\n  return make_float4(erff(a.x), erff(a.y), erff(a.z), erff(a.w));\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ndouble2 perf<double2>(const double2& a)\n{\n  using numext::erf;\n  return make_double2(erf(a.x), erf(a.y));\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nfloat4 perfc<float4>(const float4& a)\n{\n  using numext::erfc;\n  return make_float4(erfc(a.x), erfc(a.y), erfc(a.z), erfc(a.w));\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ndouble2 perfc<double2>(const double2& a)\n{\n  using numext::erfc;\n  return make_double2(erfc(a.x), erfc(a.y));\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nfloat4 pndtri<float4>(const float4& a)\n{\n  using numext::ndtri;\n  return make_float4(ndtri(a.x), ndtri(a.y), ndtri(a.z), ndtri(a.w));\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ndouble2 pndtri<double2>(const double2& a)\n{\n  using numext::ndtri;\n  return make_double2(ndtri(a.x), ndtri(a.y));\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nfloat4 pigamma<float4>(const float4& a, const float4& x)\n{\n  using numext::igamma;\n  return make_float4(\n      igamma(a.x, x.x),\n      igamma(a.y, x.y),\n      igamma(a.z, x.z),\n      igamma(a.w, x.w));\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ndouble2 pigamma<double2>(const double2& a, const double2& x)\n{\n  using numext::igamma;\n  return make_double2(igamma(a.x, x.x), igamma(a.y, x.y));\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 pigamma_der_a<float4>(\n    const float4& a, const float4& x) {\n  using numext::igamma_der_a;\n  return make_float4(igamma_der_a(a.x, x.x), igamma_der_a(a.y, x.y),\n                     igamma_der_a(a.z, x.z), igamma_der_a(a.w, x.w));\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2\npigamma_der_a<double2>(const double2& a, const double2& x) {\n  using numext::igamma_der_a;\n  return make_double2(igamma_der_a(a.x, x.x), igamma_der_a(a.y, x.y));\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 pgamma_sample_der_alpha<float4>(\n    const float4& alpha, const float4& sample) {\n  using numext::gamma_sample_der_alpha;\n  return make_float4(\n      gamma_sample_der_alpha(alpha.x, sample.x),\n      gamma_sample_der_alpha(alpha.y, sample.y),\n      gamma_sample_der_alpha(alpha.z, sample.z),\n      gamma_sample_der_alpha(alpha.w, sample.w));\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2\npgamma_sample_der_alpha<double2>(const double2& alpha, const double2& sample) {\n  using numext::gamma_sample_der_alpha;\n  return make_double2(\n      gamma_sample_der_alpha(alpha.x, sample.x),\n      gamma_sample_der_alpha(alpha.y, sample.y));\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nfloat4 pigammac<float4>(const float4& a, const float4& x)\n{\n  using numext::igammac;\n  return make_float4(\n      igammac(a.x, x.x),\n      igammac(a.y, x.y),\n      igammac(a.z, x.z),\n      igammac(a.w, x.w));\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ndouble2 pigammac<double2>(const double2& a, const double2& x)\n{\n  using numext::igammac;\n  return make_double2(igammac(a.x, x.x), igammac(a.y, x.y));\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\nfloat4 pbetainc<float4>(const float4& a, const float4& b, const float4& x)\n{\n  using numext::betainc;\n  return make_float4(\n      betainc(a.x, b.x, x.x),\n      betainc(a.y, b.y, x.y),\n      betainc(a.z, b.z, x.z),\n      betainc(a.w, b.w, x.w));\n}\n\ntemplate<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE\ndouble2 pbetainc<double2>(const double2& a, const double2& b, const double2& x)\n{\n  using numext::betainc;\n  return make_double2(betainc(a.x, b.x, x.x), betainc(a.y, b.y, x.y));\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 pbessel_i0e<float4>(const float4& x) {\n  using numext::bessel_i0e;\n  return make_float4(bessel_i0e(x.x), bessel_i0e(x.y), bessel_i0e(x.z), bessel_i0e(x.w));\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2\npbessel_i0e<double2>(const double2& x) {\n  using numext::bessel_i0e;\n  return make_double2(bessel_i0e(x.x), bessel_i0e(x.y));\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 pbessel_i0<float4>(const float4& x) {\n  using numext::bessel_i0;\n  return make_float4(bessel_i0(x.x), bessel_i0(x.y), bessel_i0(x.z), bessel_i0(x.w));\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2\npbessel_i0<double2>(const double2& x) {\n  using numext::bessel_i0;\n  return make_double2(bessel_i0(x.x), bessel_i0(x.y));\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 pbessel_i1e<float4>(const float4& x) {\n  using numext::bessel_i1e;\n  return make_float4(bessel_i1e(x.x), bessel_i1e(x.y), bessel_i1e(x.z), bessel_i1e(x.w));\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2\npbessel_i1e<double2>(const double2& x) {\n  using numext::bessel_i1e;\n  return make_double2(bessel_i1e(x.x), bessel_i1e(x.y));\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 pbessel_i1<float4>(const float4& x) {\n  using numext::bessel_i1;\n  return make_float4(bessel_i1(x.x), bessel_i1(x.y), bessel_i1(x.z), bessel_i1(x.w));\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2\npbessel_i1<double2>(const double2& x) {\n  using numext::bessel_i1;\n  return make_double2(bessel_i1(x.x), bessel_i1(x.y));\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 pbessel_k0e<float4>(const float4& x) {\n  using numext::bessel_k0e;\n  return make_float4(bessel_k0e(x.x), bessel_k0e(x.y), bessel_k0e(x.z), bessel_k0e(x.w));\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2\npbessel_k0e<double2>(const double2& x) {\n  using numext::bessel_k0e;\n  return make_double2(bessel_k0e(x.x), bessel_k0e(x.y));\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 pbessel_k0<float4>(const float4& x) {\n  using numext::bessel_k0;\n  return make_float4(bessel_k0(x.x), bessel_k0(x.y), bessel_k0(x.z), bessel_k0(x.w));\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2\npbessel_k0<double2>(const double2& x) {\n  using numext::bessel_k0;\n  return make_double2(bessel_k0(x.x), bessel_k0(x.y));\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 pbessel_k1e<float4>(const float4& x) {\n  using numext::bessel_k1e;\n  return make_float4(bessel_k1e(x.x), bessel_k1e(x.y), bessel_k1e(x.z), bessel_k1e(x.w));\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2\npbessel_k1e<double2>(const double2& x) {\n  using numext::bessel_k1e;\n  return make_double2(bessel_k1e(x.x), bessel_k1e(x.y));\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 pbessel_k1<float4>(const float4& x) {\n  using numext::bessel_k1;\n  return make_float4(bessel_k1(x.x), bessel_k1(x.y), bessel_k1(x.z), bessel_k1(x.w));\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2\npbessel_k1<double2>(const double2& x) {\n  using numext::bessel_k1;\n  return make_double2(bessel_k1(x.x), bessel_k1(x.y));\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 pbessel_j0<float4>(const float4& x) {\n  using numext::bessel_j0;\n  return make_float4(bessel_j0(x.x), bessel_j0(x.y), bessel_j0(x.z), bessel_j0(x.w));\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2\npbessel_j0<double2>(const double2& x) {\n  using numext::bessel_j0;\n  return make_double2(bessel_j0(x.x), bessel_j0(x.y));\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 pbessel_j1<float4>(const float4& x) {\n  using numext::bessel_j1;\n  return make_float4(bessel_j1(x.x), bessel_j1(x.y), bessel_j1(x.z), bessel_j1(x.w));\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2\npbessel_j1<double2>(const double2& x) {\n  using numext::bessel_j1;\n  return make_double2(bessel_j1(x.x), bessel_j1(x.y));\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 pbessel_y0<float4>(const float4& x) {\n  using numext::bessel_y0;\n  return make_float4(bessel_y0(x.x), bessel_y0(x.y), bessel_y0(x.z), bessel_y0(x.w));\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2\npbessel_y0<double2>(const double2& x) {\n  using numext::bessel_y0;\n  return make_double2(bessel_y0(x.x), bessel_y0(x.y));\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 pbessel_y1<float4>(const float4& x) {\n  using numext::bessel_y1;\n  return make_float4(bessel_y1(x.x), bessel_y1(x.y), bessel_y1(x.z), bessel_y1(x.w));\n}\n\ntemplate <>\nEIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double2\npbessel_y1<double2>(const double2& x) {\n  using numext::bessel_y1;\n  return make_double2(bessel_y1(x.x), bessel_y1(x.y));\n}\n\n#endif\n\n} // end namespace internal\n\n} // end namespace Eigen\n\n#endif // EIGEN_GPU_SPECIALFUNCTIONS_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/Splines/Spline.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 20010-2011 Hauke Heibel <hauke.heibel@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPLINE_H\n#define EIGEN_SPLINE_H\n\n#include \"SplineFwd.h\"\n\nnamespace Eigen\n{\n    /**\n     * \\ingroup Splines_Module\n     * \\class Spline\n     * \\brief A class representing multi-dimensional spline curves.\n     *\n     * The class represents B-splines with non-uniform knot vectors. Each control\n     * point of the B-spline is associated with a basis function\n     * \\f{align*}\n     *   C(u) & = \\sum_{i=0}^{n}N_{i,p}(u)P_i\n     * \\f}\n     *\n     * \\tparam _Scalar The underlying data type (typically float or double)\n     * \\tparam _Dim The curve dimension (e.g. 2 or 3)\n     * \\tparam _Degree Per default set to Dynamic; could be set to the actual desired\n     *                degree for optimization purposes (would result in stack allocation\n     *                of several temporary variables).\n     **/\n  template <typename _Scalar, int _Dim, int _Degree>\n  class Spline\n  {\n  public:\n    typedef _Scalar Scalar; /*!< The spline curve's scalar type. */\n    enum { Dimension = _Dim /*!< The spline curve's dimension. */ };\n    enum { Degree = _Degree /*!< The spline curve's degree. */ };\n\n    /** \\brief The point type the spline is representing. */\n    typedef typename SplineTraits<Spline>::PointType PointType;\n    \n    /** \\brief The data type used to store knot vectors. */\n    typedef typename SplineTraits<Spline>::KnotVectorType KnotVectorType;\n\n    /** \\brief The data type used to store parameter vectors. */\n    typedef typename SplineTraits<Spline>::ParameterVectorType ParameterVectorType;\n    \n    /** \\brief The data type used to store non-zero basis functions. */\n    typedef typename SplineTraits<Spline>::BasisVectorType BasisVectorType;\n\n    /** \\brief The data type used to store the values of the basis function derivatives. */\n    typedef typename SplineTraits<Spline>::BasisDerivativeType BasisDerivativeType;\n    \n    /** \\brief The data type representing the spline's control points. */\n    typedef typename SplineTraits<Spline>::ControlPointVectorType ControlPointVectorType;\n    \n    /**\n    * \\brief Creates a (constant) zero spline.\n    * For Splines with dynamic degree, the resulting degree will be 0.\n    **/\n    Spline() \n    : m_knots(1, (Degree==Dynamic ? 2 : 2*Degree+2))\n    , m_ctrls(ControlPointVectorType::Zero(Dimension,(Degree==Dynamic ? 1 : Degree+1))) \n    {\n      // in theory this code can go to the initializer list but it will get pretty\n      // much unreadable ...\n      enum { MinDegree = (Degree==Dynamic ? 0 : Degree) };\n      m_knots.template segment<MinDegree+1>(0) = Array<Scalar,1,MinDegree+1>::Zero();\n      m_knots.template segment<MinDegree+1>(MinDegree+1) = Array<Scalar,1,MinDegree+1>::Ones();\n    }\n\n    /**\n    * \\brief Creates a spline from a knot vector and control points.\n    * \\param knots The spline's knot vector.\n    * \\param ctrls The spline's control point vector.\n    **/\n    template <typename OtherVectorType, typename OtherArrayType>\n    Spline(const OtherVectorType& knots, const OtherArrayType& ctrls) : m_knots(knots), m_ctrls(ctrls) {}\n\n    /**\n    * \\brief Copy constructor for splines.\n    * \\param spline The input spline.\n    **/\n    template <int OtherDegree>\n    Spline(const Spline<Scalar, Dimension, OtherDegree>& spline) : \n    m_knots(spline.knots()), m_ctrls(spline.ctrls()) {}\n\n    /**\n     * \\brief Returns the knots of the underlying spline.\n     **/\n    const KnotVectorType& knots() const { return m_knots; }\n    \n    /**\n     * \\brief Returns the ctrls of the underlying spline.\n     **/    \n    const ControlPointVectorType& ctrls() const { return m_ctrls; }\n\n    /**\n     * \\brief Returns the spline value at a given site \\f$u\\f$.\n     *\n     * The function returns\n     * \\f{align*}\n     *   C(u) & = \\sum_{i=0}^{n}N_{i,p}P_i\n     * \\f}\n     *\n     * \\param u Parameter \\f$u \\in [0;1]\\f$ at which the spline is evaluated.\n     * \\return The spline value at the given location \\f$u\\f$.\n     **/\n    PointType operator()(Scalar u) const;\n\n    /**\n     * \\brief Evaluation of spline derivatives of up-to given order.\n     *\n     * The function returns\n     * \\f{align*}\n     *   \\frac{d^i}{du^i}C(u) & = \\sum_{i=0}^{n} \\frac{d^i}{du^i} N_{i,p}(u)P_i\n     * \\f}\n     * for i ranging between 0 and order.\n     *\n     * \\param u Parameter \\f$u \\in [0;1]\\f$ at which the spline derivative is evaluated.\n     * \\param order The order up to which the derivatives are computed.\n     **/\n    typename SplineTraits<Spline>::DerivativeType\n      derivatives(Scalar u, DenseIndex order) const;\n\n    /**\n     * \\copydoc Spline::derivatives\n     * Using the template version of this function is more efficieent since\n     * temporary objects are allocated on the stack whenever this is possible.\n     **/    \n    template <int DerivativeOrder>\n    typename SplineTraits<Spline,DerivativeOrder>::DerivativeType\n      derivatives(Scalar u, DenseIndex order = DerivativeOrder) const;\n\n    /**\n     * \\brief Computes the non-zero basis functions at the given site.\n     *\n     * Splines have local support and a point from their image is defined\n     * by exactly \\f$p+1\\f$ control points \\f$P_i\\f$ where \\f$p\\f$ is the\n     * spline degree.\n     *\n     * This function computes the \\f$p+1\\f$ non-zero basis function values\n     * for a given parameter value \\f$u\\f$. It returns\n     * \\f{align*}{\n     *   N_{i,p}(u), \\hdots, N_{i+p+1,p}(u)\n     * \\f}\n     *\n     * \\param u Parameter \\f$u \\in [0;1]\\f$ at which the non-zero basis functions \n     *          are computed.\n     **/\n    typename SplineTraits<Spline>::BasisVectorType\n      basisFunctions(Scalar u) const;\n\n    /**\n     * \\brief Computes the non-zero spline basis function derivatives up to given order.\n     *\n     * The function computes\n     * \\f{align*}{\n     *   \\frac{d^i}{du^i} N_{i,p}(u), \\hdots, \\frac{d^i}{du^i} N_{i+p+1,p}(u)\n     * \\f}\n     * with i ranging from 0 up to the specified order.\n     *\n     * \\param u Parameter \\f$u \\in [0;1]\\f$ at which the non-zero basis function\n     *          derivatives are computed.\n     * \\param order The order up to which the basis function derivatives are computes.\n     **/\n    typename SplineTraits<Spline>::BasisDerivativeType\n      basisFunctionDerivatives(Scalar u, DenseIndex order) const;\n\n    /**\n     * \\copydoc Spline::basisFunctionDerivatives\n     * Using the template version of this function is more efficieent since\n     * temporary objects are allocated on the stack whenever this is possible.\n     **/    \n    template <int DerivativeOrder>\n    typename SplineTraits<Spline,DerivativeOrder>::BasisDerivativeType\n      basisFunctionDerivatives(Scalar u, DenseIndex order = DerivativeOrder) const;\n\n    /**\n     * \\brief Returns the spline degree.\n     **/ \n    DenseIndex degree() const;\n\n    /** \n     * \\brief Returns the span within the knot vector in which u is falling.\n     * \\param u The site for which the span is determined.\n     **/\n    DenseIndex span(Scalar u) const;\n\n    /**\n     * \\brief Computes the span within the provided knot vector in which u is falling.\n     **/\n    static DenseIndex Span(typename SplineTraits<Spline>::Scalar u, DenseIndex degree, const typename SplineTraits<Spline>::KnotVectorType& knots);\n    \n    /**\n     * \\brief Returns the spline's non-zero basis functions.\n     *\n     * The function computes and returns\n     * \\f{align*}{\n     *   N_{i,p}(u), \\hdots, N_{i+p+1,p}(u)\n     * \\f}\n     *\n     * \\param u The site at which the basis functions are computed.\n     * \\param degree The degree of the underlying spline.\n     * \\param knots The underlying spline's knot vector.\n     **/\n    static BasisVectorType BasisFunctions(Scalar u, DenseIndex degree, const KnotVectorType& knots);\n\n    /**\n     * \\copydoc Spline::basisFunctionDerivatives\n     * \\param degree The degree of the underlying spline\n     * \\param knots The underlying spline's knot vector.\n     **/    \n    static BasisDerivativeType BasisFunctionDerivatives(\n      const Scalar u, const DenseIndex order, const DenseIndex degree, const KnotVectorType& knots);\n\n  private:\n    KnotVectorType m_knots; /*!< Knot vector. */\n    ControlPointVectorType  m_ctrls; /*!< Control points. */\n\n    template <typename DerivativeType>\n    static void BasisFunctionDerivativesImpl(\n      const typename Spline<_Scalar, _Dim, _Degree>::Scalar u,\n      const DenseIndex order,\n      const DenseIndex p, \n      const typename Spline<_Scalar, _Dim, _Degree>::KnotVectorType& U,\n      DerivativeType& N_);\n  };\n\n  template <typename _Scalar, int _Dim, int _Degree>\n  DenseIndex Spline<_Scalar, _Dim, _Degree>::Span(\n    typename SplineTraits< Spline<_Scalar, _Dim, _Degree> >::Scalar u,\n    DenseIndex degree,\n    const typename SplineTraits< Spline<_Scalar, _Dim, _Degree> >::KnotVectorType& knots)\n  {\n    // Piegl & Tiller, \"The NURBS Book\", A2.1 (p. 68)\n    if (u <= knots(0)) return degree;\n    const Scalar* pos = std::upper_bound(knots.data()+degree-1, knots.data()+knots.size()-degree-1, u);\n    return static_cast<DenseIndex>( std::distance(knots.data(), pos) - 1 );\n  }\n\n  template <typename _Scalar, int _Dim, int _Degree>\n  typename Spline<_Scalar, _Dim, _Degree>::BasisVectorType\n    Spline<_Scalar, _Dim, _Degree>::BasisFunctions(\n    typename Spline<_Scalar, _Dim, _Degree>::Scalar u,\n    DenseIndex degree,\n    const typename Spline<_Scalar, _Dim, _Degree>::KnotVectorType& knots)\n  {\n    const DenseIndex p = degree;\n    const DenseIndex i = Spline::Span(u, degree, knots);\n\n    const KnotVectorType& U = knots;\n\n    BasisVectorType left(p+1); left(0) = Scalar(0);\n    BasisVectorType right(p+1); right(0) = Scalar(0);\n\n    VectorBlock<BasisVectorType,Degree>(left,1,p) = u - VectorBlock<const KnotVectorType,Degree>(U,i+1-p,p).reverse();\n    VectorBlock<BasisVectorType,Degree>(right,1,p) = VectorBlock<const KnotVectorType,Degree>(U,i+1,p) - u;\n\n    BasisVectorType N(1,p+1);\n    N(0) = Scalar(1);\n    for (DenseIndex j=1; j<=p; ++j)\n    {\n      Scalar saved = Scalar(0);\n      for (DenseIndex r=0; r<j; r++)\n      {\n        const Scalar tmp = N(r)/(right(r+1)+left(j-r));\n        N[r] = saved + right(r+1)*tmp;\n        saved = left(j-r)*tmp;\n      }\n      N(j) = saved;\n    }\n    return N;\n  }\n\n  template <typename _Scalar, int _Dim, int _Degree>\n  DenseIndex Spline<_Scalar, _Dim, _Degree>::degree() const\n  {\n    if (_Degree == Dynamic)\n      return m_knots.size() - m_ctrls.cols() - 1;\n    else\n      return _Degree;\n  }\n\n  template <typename _Scalar, int _Dim, int _Degree>\n  DenseIndex Spline<_Scalar, _Dim, _Degree>::span(Scalar u) const\n  {\n    return Spline::Span(u, degree(), knots());\n  }\n\n  template <typename _Scalar, int _Dim, int _Degree>\n  typename Spline<_Scalar, _Dim, _Degree>::PointType Spline<_Scalar, _Dim, _Degree>::operator()(Scalar u) const\n  {\n    enum { Order = SplineTraits<Spline>::OrderAtCompileTime };\n\n    const DenseIndex span = this->span(u);\n    const DenseIndex p = degree();\n    const BasisVectorType basis_funcs = basisFunctions(u);\n\n    const Replicate<BasisVectorType,Dimension,1> ctrl_weights(basis_funcs);\n    const Block<const ControlPointVectorType,Dimension,Order> ctrl_pts(ctrls(),0,span-p,Dimension,p+1);\n    return (ctrl_weights * ctrl_pts).rowwise().sum();\n  }\n\n  /* --------------------------------------------------------------------------------------------- */\n\n  template <typename SplineType, typename DerivativeType>\n  void derivativesImpl(const SplineType& spline, typename SplineType::Scalar u, DenseIndex order, DerivativeType& der)\n  {    \n    enum { Dimension = SplineTraits<SplineType>::Dimension };\n    enum { Order = SplineTraits<SplineType>::OrderAtCompileTime };\n    enum { DerivativeOrder = DerivativeType::ColsAtCompileTime };\n\n    typedef typename SplineTraits<SplineType>::ControlPointVectorType ControlPointVectorType;\n    typedef typename SplineTraits<SplineType,DerivativeOrder>::BasisDerivativeType BasisDerivativeType;\n    typedef typename BasisDerivativeType::ConstRowXpr BasisDerivativeRowXpr;    \n\n    const DenseIndex p = spline.degree();\n    const DenseIndex span = spline.span(u);\n\n    const DenseIndex n = (std::min)(p, order);\n\n    der.resize(Dimension,n+1);\n\n    // Retrieve the basis function derivatives up to the desired order...    \n    const BasisDerivativeType basis_func_ders = spline.template basisFunctionDerivatives<DerivativeOrder>(u, n+1);\n\n    // ... and perform the linear combinations of the control points.\n    for (DenseIndex der_order=0; der_order<n+1; ++der_order)\n    {\n      const Replicate<BasisDerivativeRowXpr,Dimension,1> ctrl_weights( basis_func_ders.row(der_order) );\n      const Block<const ControlPointVectorType,Dimension,Order> ctrl_pts(spline.ctrls(),0,span-p,Dimension,p+1);\n      der.col(der_order) = (ctrl_weights * ctrl_pts).rowwise().sum();\n    }\n  }\n\n  template <typename _Scalar, int _Dim, int _Degree>\n  typename SplineTraits< Spline<_Scalar, _Dim, _Degree> >::DerivativeType\n    Spline<_Scalar, _Dim, _Degree>::derivatives(Scalar u, DenseIndex order) const\n  {\n    typename SplineTraits< Spline >::DerivativeType res;\n    derivativesImpl(*this, u, order, res);\n    return res;\n  }\n\n  template <typename _Scalar, int _Dim, int _Degree>\n  template <int DerivativeOrder>\n  typename SplineTraits< Spline<_Scalar, _Dim, _Degree>, DerivativeOrder >::DerivativeType\n    Spline<_Scalar, _Dim, _Degree>::derivatives(Scalar u, DenseIndex order) const\n  {\n    typename SplineTraits< Spline, DerivativeOrder >::DerivativeType res;\n    derivativesImpl(*this, u, order, res);\n    return res;\n  }\n\n  template <typename _Scalar, int _Dim, int _Degree>\n  typename SplineTraits< Spline<_Scalar, _Dim, _Degree> >::BasisVectorType\n    Spline<_Scalar, _Dim, _Degree>::basisFunctions(Scalar u) const\n  {\n    return Spline::BasisFunctions(u, degree(), knots());\n  }\n\n  /* --------------------------------------------------------------------------------------------- */\n  \n  \n  template <typename _Scalar, int _Dim, int _Degree>\n  template <typename DerivativeType>\n  void Spline<_Scalar, _Dim, _Degree>::BasisFunctionDerivativesImpl(\n    const typename Spline<_Scalar, _Dim, _Degree>::Scalar u,\n    const DenseIndex order,\n    const DenseIndex p, \n    const typename Spline<_Scalar, _Dim, _Degree>::KnotVectorType& U,\n    DerivativeType& N_)\n  {\n    typedef Spline<_Scalar, _Dim, _Degree> SplineType;\n    enum { Order = SplineTraits<SplineType>::OrderAtCompileTime };\n\n    const DenseIndex span = SplineType::Span(u, p, U);\n\n    const DenseIndex n = (std::min)(p, order);\n\n    N_.resize(n+1, p+1);\n\n    BasisVectorType left = BasisVectorType::Zero(p+1);\n    BasisVectorType right = BasisVectorType::Zero(p+1);\n\n    Matrix<Scalar,Order,Order> ndu(p+1,p+1);\n\n    Scalar saved, temp; // FIXME These were double instead of Scalar. Was there a reason for that?\n\n    ndu(0,0) = 1.0;\n\n    DenseIndex j;\n    for (j=1; j<=p; ++j)\n    {\n      left[j] = u-U[span+1-j];\n      right[j] = U[span+j]-u;\n      saved = 0.0;\n\n      for (DenseIndex r=0; r<j; ++r)\n      {\n        /* Lower triangle */\n        ndu(j,r) = right[r+1]+left[j-r];\n        temp = ndu(r,j-1)/ndu(j,r);\n        /* Upper triangle */\n        ndu(r,j) = static_cast<Scalar>(saved+right[r+1] * temp);\n        saved = left[j-r] * temp;\n      }\n\n      ndu(j,j) = static_cast<Scalar>(saved);\n    }\n\n    for (j = p; j>=0; --j) \n      N_(0,j) = ndu(j,p);\n\n    // Compute the derivatives\n    DerivativeType a(n+1,p+1);\n    DenseIndex r=0;\n    for (; r<=p; ++r)\n    {\n      DenseIndex s1,s2;\n      s1 = 0; s2 = 1; // alternate rows in array a\n      a(0,0) = 1.0;\n\n      // Compute the k-th derivative\n      for (DenseIndex k=1; k<=static_cast<DenseIndex>(n); ++k)\n      {\n        Scalar d = 0.0;\n        DenseIndex rk,pk,j1,j2;\n        rk = r-k; pk = p-k;\n\n        if (r>=k)\n        {\n          a(s2,0) = a(s1,0)/ndu(pk+1,rk);\n          d = a(s2,0)*ndu(rk,pk);\n        }\n\n        if (rk>=-1) j1 = 1;\n        else        j1 = -rk;\n\n        if (r-1 <= pk) j2 = k-1;\n        else           j2 = p-r;\n\n        for (j=j1; j<=j2; ++j)\n        {\n          a(s2,j) = (a(s1,j)-a(s1,j-1))/ndu(pk+1,rk+j);\n          d += a(s2,j)*ndu(rk+j,pk);\n        }\n\n        if (r<=pk)\n        {\n          a(s2,k) = -a(s1,k-1)/ndu(pk+1,r);\n          d += a(s2,k)*ndu(r,pk);\n        }\n\n        N_(k,r) = static_cast<Scalar>(d);\n        j = s1; s1 = s2; s2 = j; // Switch rows\n      }\n    }\n\n    /* Multiply through by the correct factors */\n    /* (Eq. [2.9])                             */\n    r = p;\n    for (DenseIndex k=1; k<=static_cast<DenseIndex>(n); ++k)\n    {\n      for (j=p; j>=0; --j) N_(k,j) *= r;\n      r *= p-k;\n    }\n  }\n\n  template <typename _Scalar, int _Dim, int _Degree>\n  typename SplineTraits< Spline<_Scalar, _Dim, _Degree> >::BasisDerivativeType\n    Spline<_Scalar, _Dim, _Degree>::basisFunctionDerivatives(Scalar u, DenseIndex order) const\n  {\n    typename SplineTraits<Spline<_Scalar, _Dim, _Degree> >::BasisDerivativeType der;\n    BasisFunctionDerivativesImpl(u, order, degree(), knots(), der);\n    return der;\n  }\n\n  template <typename _Scalar, int _Dim, int _Degree>\n  template <int DerivativeOrder>\n  typename SplineTraits< Spline<_Scalar, _Dim, _Degree>, DerivativeOrder >::BasisDerivativeType\n    Spline<_Scalar, _Dim, _Degree>::basisFunctionDerivatives(Scalar u, DenseIndex order) const\n  {\n    typename SplineTraits< Spline<_Scalar, _Dim, _Degree>, DerivativeOrder >::BasisDerivativeType der;\n    BasisFunctionDerivativesImpl(u, order, degree(), knots(), der);\n    return der;\n  }\n\n  template <typename _Scalar, int _Dim, int _Degree>\n  typename SplineTraits<Spline<_Scalar, _Dim, _Degree> >::BasisDerivativeType\n  Spline<_Scalar, _Dim, _Degree>::BasisFunctionDerivatives(\n    const typename Spline<_Scalar, _Dim, _Degree>::Scalar u,\n    const DenseIndex order,\n    const DenseIndex degree,\n    const typename Spline<_Scalar, _Dim, _Degree>::KnotVectorType& knots)\n  {\n    typename SplineTraits<Spline>::BasisDerivativeType der;\n    BasisFunctionDerivativesImpl(u, order, degree, knots, der);\n    return der;\n  }\n}\n\n#endif // EIGEN_SPLINE_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/Splines/SplineFitting.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 20010-2011 Hauke Heibel <hauke.heibel@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPLINE_FITTING_H\n#define EIGEN_SPLINE_FITTING_H\n\n#include <algorithm>\n#include <functional>\n#include <numeric>\n#include <vector>\n\n#include \"SplineFwd.h\"\n\n#include \"../../../../Eigen/LU\"\n#include \"../../../../Eigen/QR\"\n\nnamespace Eigen\n{\n  /**\n   * \\brief Computes knot averages.\n   * \\ingroup Splines_Module\n   *\n   * The knots are computed as\n   * \\f{align*}\n   *  u_0 & = \\hdots = u_p = 0 \\\\\n   *  u_{m-p} & = \\hdots = u_{m} = 1 \\\\\n   *  u_{j+p} & = \\frac{1}{p}\\sum_{i=j}^{j+p-1}\\bar{u}_i \\quad\\quad j=1,\\hdots,n-p\n   * \\f}\n   * where \\f$p\\f$ is the degree and \\f$m+1\\f$ the number knots\n   * of the desired interpolating spline.\n   *\n   * \\param[in] parameters The input parameters. During interpolation one for each data point.\n   * \\param[in] degree The spline degree which is used during the interpolation.\n   * \\param[out] knots The output knot vector.\n   *\n   * \\sa Les Piegl and Wayne Tiller, The NURBS book (2nd ed.), 1997, 9.2.1 Global Curve Interpolation to Point Data\n   **/\n  template <typename KnotVectorType>\n  void KnotAveraging(const KnotVectorType& parameters, DenseIndex degree, KnotVectorType& knots)\n  {\n    knots.resize(parameters.size()+degree+1);      \n\n    for (DenseIndex j=1; j<parameters.size()-degree; ++j)\n      knots(j+degree) = parameters.segment(j,degree).mean();\n\n    knots.segment(0,degree+1) = KnotVectorType::Zero(degree+1);\n    knots.segment(knots.size()-degree-1,degree+1) = KnotVectorType::Ones(degree+1);\n  }\n\n  /**\n   * \\brief Computes knot averages when derivative constraints are present.\n   * Note that this is a technical interpretation of the referenced article\n   * since the algorithm contained therein is incorrect as written.\n   * \\ingroup Splines_Module\n   *\n   * \\param[in] parameters The parameters at which the interpolation B-Spline\n   *            will intersect the given interpolation points. The parameters\n   *            are assumed to be a non-decreasing sequence.\n   * \\param[in] degree The degree of the interpolating B-Spline. This must be\n   *            greater than zero.\n   * \\param[in] derivativeIndices The indices corresponding to parameters at\n   *            which there are derivative constraints. The indices are assumed\n   *            to be a non-decreasing sequence.\n   * \\param[out] knots The calculated knot vector. These will be returned as a\n   *             non-decreasing sequence\n   *\n   * \\sa Les A. Piegl, Khairan Rajab, Volha Smarodzinana. 2008.\n   * Curve interpolation with directional constraints for engineering design. \n   * Engineering with Computers\n   **/\n  template <typename KnotVectorType, typename ParameterVectorType, typename IndexArray>\n  void KnotAveragingWithDerivatives(const ParameterVectorType& parameters,\n                                    const unsigned int degree,\n                                    const IndexArray& derivativeIndices,\n                                    KnotVectorType& knots)\n  {\n    typedef typename ParameterVectorType::Scalar Scalar;\n\n    DenseIndex numParameters = parameters.size();\n    DenseIndex numDerivatives = derivativeIndices.size();\n\n    if (numDerivatives < 1)\n    {\n      KnotAveraging(parameters, degree, knots);\n      return;\n    }\n\n    DenseIndex startIndex;\n    DenseIndex endIndex;\n  \n    DenseIndex numInternalDerivatives = numDerivatives;\n    \n    if (derivativeIndices[0] == 0)\n    {\n      startIndex = 0;\n      --numInternalDerivatives;\n    }\n    else\n    {\n      startIndex = 1;\n    }\n    if (derivativeIndices[numDerivatives - 1] == numParameters - 1)\n    {\n      endIndex = numParameters - degree;\n      --numInternalDerivatives;\n    }\n    else\n    {\n      endIndex = numParameters - degree - 1;\n    }\n\n    // There are (endIndex - startIndex + 1) knots obtained from the averaging\n    // and 2 for the first and last parameters.\n    DenseIndex numAverageKnots = endIndex - startIndex + 3;\n    KnotVectorType averageKnots(numAverageKnots);\n    averageKnots[0] = parameters[0];\n\n    int newKnotIndex = 0;\n    for (DenseIndex i = startIndex; i <= endIndex; ++i)\n      averageKnots[++newKnotIndex] = parameters.segment(i, degree).mean();\n    averageKnots[++newKnotIndex] = parameters[numParameters - 1];\n\n    newKnotIndex = -1;\n  \n    ParameterVectorType temporaryParameters(numParameters + 1);\n    KnotVectorType derivativeKnots(numInternalDerivatives);\n    for (DenseIndex i = 0; i < numAverageKnots - 1; ++i)\n    {\n      temporaryParameters[0] = averageKnots[i];\n      ParameterVectorType parameterIndices(numParameters);\n      int temporaryParameterIndex = 1;\n      for (DenseIndex j = 0; j < numParameters; ++j)\n      {\n        Scalar parameter = parameters[j];\n        if (parameter >= averageKnots[i] && parameter < averageKnots[i + 1])\n        {\n          parameterIndices[temporaryParameterIndex] = j;\n          temporaryParameters[temporaryParameterIndex++] = parameter;\n        }\n      }\n      temporaryParameters[temporaryParameterIndex] = averageKnots[i + 1];\n\n      for (int j = 0; j <= temporaryParameterIndex - 2; ++j)\n      {\n        for (DenseIndex k = 0; k < derivativeIndices.size(); ++k)\n        {\n          if (parameterIndices[j + 1] == derivativeIndices[k]\n              && parameterIndices[j + 1] != 0\n              && parameterIndices[j + 1] != numParameters - 1)\n          {\n            derivativeKnots[++newKnotIndex] = temporaryParameters.segment(j, 3).mean();\n            break;\n          }\n        }\n      }\n    }\n    \n    KnotVectorType temporaryKnots(averageKnots.size() + derivativeKnots.size());\n\n    std::merge(averageKnots.data(), averageKnots.data() + averageKnots.size(),\n               derivativeKnots.data(), derivativeKnots.data() + derivativeKnots.size(),\n               temporaryKnots.data());\n\n    // Number of knots (one for each point and derivative) plus spline order.\n    DenseIndex numKnots = numParameters + numDerivatives + degree + 1;\n    knots.resize(numKnots);\n\n    knots.head(degree).fill(temporaryKnots[0]);\n    knots.tail(degree).fill(temporaryKnots.template tail<1>()[0]);\n    knots.segment(degree, temporaryKnots.size()) = temporaryKnots;\n  }\n\n  /**\n   * \\brief Computes chord length parameters which are required for spline interpolation.\n   * \\ingroup Splines_Module\n   *\n   * \\param[in] pts The data points to which a spline should be fit.\n   * \\param[out] chord_lengths The resulting chord length vector.\n   *\n   * \\sa Les Piegl and Wayne Tiller, The NURBS book (2nd ed.), 1997, 9.2.1 Global Curve Interpolation to Point Data\n   **/   \n  template <typename PointArrayType, typename KnotVectorType>\n  void ChordLengths(const PointArrayType& pts, KnotVectorType& chord_lengths)\n  {\n    typedef typename KnotVectorType::Scalar Scalar;\n\n    const DenseIndex n = pts.cols();\n\n    // 1. compute the column-wise norms\n    chord_lengths.resize(pts.cols());\n    chord_lengths[0] = 0;\n    chord_lengths.rightCols(n-1) = (pts.array().leftCols(n-1) - pts.array().rightCols(n-1)).matrix().colwise().norm();\n\n    // 2. compute the partial sums\n    std::partial_sum(chord_lengths.data(), chord_lengths.data()+n, chord_lengths.data());\n\n    // 3. normalize the data\n    chord_lengths /= chord_lengths(n-1);\n    chord_lengths(n-1) = Scalar(1);\n  }\n\n  /**\n   * \\brief Spline fitting methods.\n   * \\ingroup Splines_Module\n   **/     \n  template <typename SplineType>\n  struct SplineFitting\n  {\n    typedef typename SplineType::KnotVectorType KnotVectorType;\n    typedef typename SplineType::ParameterVectorType ParameterVectorType;\n\n    /**\n     * \\brief Fits an interpolating Spline to the given data points.\n     *\n     * \\param pts The points for which an interpolating spline will be computed.\n     * \\param degree The degree of the interpolating spline.\n     *\n     * \\returns A spline interpolating the initially provided points.\n     **/\n    template <typename PointArrayType>\n    static SplineType Interpolate(const PointArrayType& pts, DenseIndex degree);\n\n    /**\n     * \\brief Fits an interpolating Spline to the given data points.\n     *\n     * \\param pts The points for which an interpolating spline will be computed.\n     * \\param degree The degree of the interpolating spline.\n     * \\param knot_parameters The knot parameters for the interpolation.\n     *\n     * \\returns A spline interpolating the initially provided points.\n     **/\n    template <typename PointArrayType>\n    static SplineType Interpolate(const PointArrayType& pts, DenseIndex degree, const KnotVectorType& knot_parameters);\n\n    /**\n     * \\brief Fits an interpolating spline to the given data points and\n     * derivatives.\n     * \n     * \\param points The points for which an interpolating spline will be computed.\n     * \\param derivatives The desired derivatives of the interpolating spline at interpolation\n     *                    points.\n     * \\param derivativeIndices An array indicating which point each derivative belongs to. This\n     *                          must be the same size as @a derivatives.\n     * \\param degree The degree of the interpolating spline.\n     *\n     * \\returns A spline interpolating @a points with @a derivatives at those points.\n     *\n     * \\sa Les A. Piegl, Khairan Rajab, Volha Smarodzinana. 2008.\n     * Curve interpolation with directional constraints for engineering design. \n     * Engineering with Computers\n     **/\n    template <typename PointArrayType, typename IndexArray>\n    static SplineType InterpolateWithDerivatives(const PointArrayType& points,\n                                                 const PointArrayType& derivatives,\n                                                 const IndexArray& derivativeIndices,\n                                                 const unsigned int degree);\n\n    /**\n     * \\brief Fits an interpolating spline to the given data points and derivatives.\n     * \n     * \\param points The points for which an interpolating spline will be computed.\n     * \\param derivatives The desired derivatives of the interpolating spline at interpolation points.\n     * \\param derivativeIndices An array indicating which point each derivative belongs to. This\n     *                          must be the same size as @a derivatives.\n     * \\param degree The degree of the interpolating spline.\n     * \\param parameters The parameters corresponding to the interpolation points.\n     *\n     * \\returns A spline interpolating @a points with @a derivatives at those points.\n     *\n     * \\sa Les A. Piegl, Khairan Rajab, Volha Smarodzinana. 2008.\n     * Curve interpolation with directional constraints for engineering design. \n     * Engineering with Computers\n     */\n    template <typename PointArrayType, typename IndexArray>\n    static SplineType InterpolateWithDerivatives(const PointArrayType& points,\n                                                 const PointArrayType& derivatives,\n                                                 const IndexArray& derivativeIndices,\n                                                 const unsigned int degree,\n                                                 const ParameterVectorType& parameters);\n  };\n\n  template <typename SplineType>\n  template <typename PointArrayType>\n  SplineType SplineFitting<SplineType>::Interpolate(const PointArrayType& pts, DenseIndex degree, const KnotVectorType& knot_parameters)\n  {\n    typedef typename SplineType::KnotVectorType::Scalar Scalar;      \n    typedef typename SplineType::ControlPointVectorType ControlPointVectorType;      \n\n    typedef Matrix<Scalar,Dynamic,Dynamic> MatrixType;\n\n    KnotVectorType knots;\n    KnotAveraging(knot_parameters, degree, knots);\n\n    DenseIndex n = pts.cols();\n    MatrixType A = MatrixType::Zero(n,n);\n    for (DenseIndex i=1; i<n-1; ++i)\n    {\n      const DenseIndex span = SplineType::Span(knot_parameters[i], degree, knots);\n\n      // The segment call should somehow be told the spline order at compile time.\n      A.row(i).segment(span-degree, degree+1) = SplineType::BasisFunctions(knot_parameters[i], degree, knots);\n    }\n    A(0,0) = 1.0;\n    A(n-1,n-1) = 1.0;\n\n    HouseholderQR<MatrixType> qr(A);\n\n    // Here, we are creating a temporary due to an Eigen issue.\n    ControlPointVectorType ctrls = qr.solve(MatrixType(pts.transpose())).transpose();\n\n    return SplineType(knots, ctrls);\n  }\n\n  template <typename SplineType>\n  template <typename PointArrayType>\n  SplineType SplineFitting<SplineType>::Interpolate(const PointArrayType& pts, DenseIndex degree)\n  {\n    KnotVectorType chord_lengths; // knot parameters\n    ChordLengths(pts, chord_lengths);\n    return Interpolate(pts, degree, chord_lengths);\n  }\n  \n  template <typename SplineType>\n  template <typename PointArrayType, typename IndexArray>\n  SplineType \n  SplineFitting<SplineType>::InterpolateWithDerivatives(const PointArrayType& points,\n                                                        const PointArrayType& derivatives,\n                                                        const IndexArray& derivativeIndices,\n                                                        const unsigned int degree,\n                                                        const ParameterVectorType& parameters)\n  {\n    typedef typename SplineType::KnotVectorType::Scalar Scalar;      \n    typedef typename SplineType::ControlPointVectorType ControlPointVectorType;\n\n    typedef Matrix<Scalar, Dynamic, Dynamic> MatrixType;\n\n    const DenseIndex n = points.cols() + derivatives.cols();\n    \n    KnotVectorType knots;\n\n    KnotAveragingWithDerivatives(parameters, degree, derivativeIndices, knots);\n    \n    // fill matrix\n    MatrixType A = MatrixType::Zero(n, n);\n\n    // Use these dimensions for quicker populating, then transpose for solving.\n    MatrixType b(points.rows(), n);\n\n    DenseIndex startRow;\n    DenseIndex derivativeStart;\n\n    // End derivatives.\n    if (derivativeIndices[0] == 0)\n    {\n      A.template block<1, 2>(1, 0) << -1, 1;\n      \n      Scalar y = (knots(degree + 1) - knots(0)) / degree;\n      b.col(1) = y*derivatives.col(0);\n      \n      startRow = 2;\n      derivativeStart = 1;\n    }\n    else\n    {\n      startRow = 1;\n      derivativeStart = 0;\n    }\n    if (derivativeIndices[derivatives.cols() - 1] == points.cols() - 1)\n    {\n      A.template block<1, 2>(n - 2, n - 2) << -1, 1;\n\n      Scalar y = (knots(knots.size() - 1) - knots(knots.size() - (degree + 2))) / degree;\n      b.col(b.cols() - 2) = y*derivatives.col(derivatives.cols() - 1);\n    }\n    \n    DenseIndex row = startRow;\n    DenseIndex derivativeIndex = derivativeStart;\n    for (DenseIndex i = 1; i < parameters.size() - 1; ++i)\n    {\n      const DenseIndex span = SplineType::Span(parameters[i], degree, knots);\n\n      if (derivativeIndex < derivativeIndices.size() && derivativeIndices[derivativeIndex] == i)\n      {\n        A.block(row, span - degree, 2, degree + 1)\n          = SplineType::BasisFunctionDerivatives(parameters[i], 1, degree, knots);\n\n        b.col(row++) = points.col(i);\n        b.col(row++) = derivatives.col(derivativeIndex++);\n      }\n      else\n      {\n        A.row(row).segment(span - degree, degree + 1)\n          = SplineType::BasisFunctions(parameters[i], degree, knots);\n        b.col(row++) = points.col(i);\n      }\n    }\n    b.col(0) = points.col(0);\n    b.col(b.cols() - 1) = points.col(points.cols() - 1);\n    A(0,0) = 1;\n    A(n - 1, n - 1) = 1;\n    \n    // Solve\n    FullPivLU<MatrixType> lu(A);\n    ControlPointVectorType controlPoints = lu.solve(MatrixType(b.transpose())).transpose();\n\n    SplineType spline(knots, controlPoints);\n    \n    return spline;\n  }\n  \n  template <typename SplineType>\n  template <typename PointArrayType, typename IndexArray>\n  SplineType\n  SplineFitting<SplineType>::InterpolateWithDerivatives(const PointArrayType& points,\n                                                        const PointArrayType& derivatives,\n                                                        const IndexArray& derivativeIndices,\n                                                        const unsigned int degree)\n  {\n    ParameterVectorType parameters;\n    ChordLengths(points, parameters);\n    return InterpolateWithDerivatives(points, derivatives, derivativeIndices, degree, parameters);\n  }\n}\n\n#endif // EIGEN_SPLINE_FITTING_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/Eigen/src/Splines/SplineFwd.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 20010-2011 Hauke Heibel <hauke.heibel@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SPLINES_FWD_H\n#define EIGEN_SPLINES_FWD_H\n\n#include \"../../../../Eigen/Core\"\n\nnamespace Eigen\n{\n    template <typename Scalar, int Dim, int Degree = Dynamic> class Spline;\n\n    template < typename SplineType, int DerivativeOrder = Dynamic > struct SplineTraits {};\n\n    /**\n     * \\ingroup Splines_Module\n     * \\brief Compile-time attributes of the Spline class for Dynamic degree.\n     **/\n    template <typename _Scalar, int _Dim, int _Degree>\n    struct SplineTraits< Spline<_Scalar, _Dim, _Degree>, Dynamic >\n    {\n      typedef _Scalar Scalar; /*!< The spline curve's scalar type. */\n      enum { Dimension = _Dim /*!< The spline curve's dimension. */ };\n      enum { Degree = _Degree /*!< The spline curve's degree. */ };\n\n      enum { OrderAtCompileTime = _Degree==Dynamic ? Dynamic : _Degree+1 /*!< The spline curve's order at compile-time. */ };\n      enum { NumOfDerivativesAtCompileTime = OrderAtCompileTime /*!< The number of derivatives defined for the current spline. */ };\n      \n      enum { DerivativeMemoryLayout = Dimension==1 ? RowMajor : ColMajor /*!< The derivative type's memory layout. */ };\n\n      /** \\brief The data type used to store non-zero basis functions. */\n      typedef Array<Scalar,1,OrderAtCompileTime> BasisVectorType;\n\n      /** \\brief The data type used to store the values of the basis function derivatives. */\n      typedef Array<Scalar,Dynamic,Dynamic,RowMajor,NumOfDerivativesAtCompileTime,OrderAtCompileTime> BasisDerivativeType;\n      \n      /** \\brief The data type used to store the spline's derivative values. */\n      typedef Array<Scalar,Dimension,Dynamic,DerivativeMemoryLayout,Dimension,NumOfDerivativesAtCompileTime> DerivativeType;\n\n      /** \\brief The point type the spline is representing. */\n      typedef Array<Scalar,Dimension,1> PointType;\n      \n      /** \\brief The data type used to store knot vectors. */\n      typedef Array<Scalar,1,Dynamic> KnotVectorType;\n\n      /** \\brief The data type used to store parameter vectors. */\n      typedef Array<Scalar,1,Dynamic> ParameterVectorType;\n      \n      /** \\brief The data type representing the spline's control points. */\n      typedef Array<Scalar,Dimension,Dynamic> ControlPointVectorType;\n    };\n\n    /**\n     * \\ingroup Splines_Module\n     * \\brief Compile-time attributes of the Spline class for fixed degree.\n     *\n     * The traits class inherits all attributes from the SplineTraits of Dynamic degree.\n     **/\n    template < typename _Scalar, int _Dim, int _Degree, int _DerivativeOrder >\n    struct SplineTraits< Spline<_Scalar, _Dim, _Degree>, _DerivativeOrder > : public SplineTraits< Spline<_Scalar, _Dim, _Degree> >\n    {\n      enum { OrderAtCompileTime = _Degree==Dynamic ? Dynamic : _Degree+1 /*!< The spline curve's order at compile-time. */ };\n      enum { NumOfDerivativesAtCompileTime = _DerivativeOrder==Dynamic ? Dynamic : _DerivativeOrder+1 /*!< The number of derivatives defined for the current spline. */ };\n      \n      enum { DerivativeMemoryLayout = _Dim==1 ? RowMajor : ColMajor /*!< The derivative type's memory layout. */ };\n\n      /** \\brief The data type used to store the values of the basis function derivatives. */\n      typedef Array<_Scalar,Dynamic,Dynamic,RowMajor,NumOfDerivativesAtCompileTime,OrderAtCompileTime> BasisDerivativeType;\n      \n      /** \\brief The data type used to store the spline's derivative values. */      \n      typedef Array<_Scalar,_Dim,Dynamic,DerivativeMemoryLayout,_Dim,NumOfDerivativesAtCompileTime> DerivativeType;\n    };\n\n    /** \\brief 2D float B-spline with dynamic degree. */\n    typedef Spline<float,2> Spline2f;\n    \n    /** \\brief 3D float B-spline with dynamic degree. */\n    typedef Spline<float,3> Spline3f;\n\n    /** \\brief 2D double B-spline with dynamic degree. */\n    typedef Spline<double,2> Spline2d;\n    \n    /** \\brief 3D double B-spline with dynamic degree. */\n    typedef Spline<double,3> Spline3d;\n}\n\n#endif // EIGEN_SPLINES_FWD_H\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/README.txt",
    "content": "This directory contains contributions from various users.\nThey are provided \"as is\", without any support. Nevertheless,\nmost of them are subject to be included in Eigen in the future.\n\nIn order to use an unsupported module you have to do either:\n\n - add the path_to_eigen/unsupported directory to your include path and do:\n   #include <Eigen/ModuleHeader>\n\n - or directly do:\n   #include <unsupported/Eigen/ModuleHeader>\n\n\nIf you are interested in contributing to one of them, or have other stuff\nyou would like to share, feel free to contact us:\nhttp://eigen.tuxfamily.org/index.php?title=Main_Page#Mailing_list\n\nAny kind of contributions are much appreciated, even very preliminary ones.\nHowever, it:\n - must rely on Eigen,\n - must be highly related to math,\n - should have some general purpose in the sense that it could\n   potentially become an official Eigen module (or be merged into another one).\n\nIn doubt feel free to contact us. For instance, if your addons is very too specific\nbut it shows an interesting way of using Eigen, then it could be a nice demo.\n\n\nThis directory is organized as follow:\n\nunsupported/Eigen/ModuleHeader1\nunsupported/Eigen/ModuleHeader2\nunsupported/Eigen/...\nunsupported/Eigen/src/Module1/SourceFile1.h\nunsupported/Eigen/src/Module1/SourceFile2.h\nunsupported/Eigen/src/Module1/...\nunsupported/Eigen/src/Module2/SourceFile1.h\nunsupported/Eigen/src/Module2/SourceFile2.h\nunsupported/Eigen/src/Module2/...\nunsupported/Eigen/src/...\nunsupported/doc/snippets/.cpp   <- code snippets for the doc\nunsupported/doc/examples/.cpp   <- examples for the doc\nunsupported/doc/TutorialModule1.dox\nunsupported/doc/TutorialModule2.dox\nunsupported/doc/...\nunsupported/test/.cpp           <- unit test files\n\nThe documentation is generated at the same time than the main Eigen documentation.\nThe .html files are generated in: build_dir/doc/html/unsupported/\n\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/bench/bench_svd.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2013 Gauthier Brun <brun.gauthier@gmail.com>\n// Copyright (C) 2013 Nicolas Carre <nicolas.carre@ensimag.fr>\n// Copyright (C) 2013 Jean Ceccato <jean.ceccato@ensimag.fr>\n// Copyright (C) 2013 Pierre Zoppitelli <pierre.zoppitelli@ensimag.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/\n\n// Bench to compare the efficiency of SVD algorithms\n\n#include <iostream>\n#include <bench/BenchTimer.h>\n#include <unsupported/Eigen/SVD>\n\n\nusing namespace Eigen;\nusing namespace std;\n\n// number of computations of each algorithm before the print of the time\n#ifndef REPEAT\n#define REPEAT 10\n#endif\n\n// number of tests of the same type\n#ifndef NUMBER_SAMPLE\n#define NUMBER_SAMPLE 2\n#endif\n\ntemplate<typename MatrixType>\nvoid bench_svd(const MatrixType& a = MatrixType())\n{\n  MatrixType m = MatrixType::Random(a.rows(), a.cols());\n  BenchTimer timerJacobi;\n  BenchTimer timerBDC;\n  timerJacobi.reset();\n  timerBDC.reset();\n\n  cout << \" Only compute Singular Values\" <<endl;\n  for (int k=1; k<=NUMBER_SAMPLE; ++k)\n  {\n    timerBDC.start();\n    for (int i=0; i<REPEAT; ++i) \n    {\n      BDCSVD<MatrixType> bdc_matrix(m);\n    }\n    timerBDC.stop();\n    \n    timerJacobi.start();\n    for (int i=0; i<REPEAT; ++i) \n    {\n      JacobiSVD<MatrixType> jacobi_matrix(m);\n    }\n    timerJacobi.stop();\n\n\n    cout << \"Sample \" << k << \" : \" << REPEAT << \" computations :  Jacobi : \" << fixed << timerJacobi.value() << \"s \";\n    cout << \" || \" << \" BDC : \" << timerBDC.value() << \"s \" <<endl <<endl;\n      \n    if (timerBDC.value() >= timerJacobi.value())  \n      cout << \"KO : BDC is \" <<  timerJacobi.value() / timerBDC.value() << \"  times faster than Jacobi\" <<endl;\n    else \n      cout << \"OK : BDC is \" << timerJacobi.value() / timerBDC.value() << \"  times faster than Jacobi\"  <<endl;\n      \n  }\n  cout << \"       =================\" <<endl;\n  std::cout<< std::endl;\n  timerJacobi.reset();\n  timerBDC.reset();\n  cout << \" Computes rotation matrix\" <<endl;\n  for (int k=1; k<=NUMBER_SAMPLE; ++k)\n  {\n    timerBDC.start();\n    for (int i=0; i<REPEAT; ++i) \n    {\n      BDCSVD<MatrixType> bdc_matrix(m, ComputeFullU|ComputeFullV);\n    }\n    timerBDC.stop();\n    \n    timerJacobi.start();\n    for (int i=0; i<REPEAT; ++i) \n    {\n      JacobiSVD<MatrixType> jacobi_matrix(m, ComputeFullU|ComputeFullV);\n    }\n    timerJacobi.stop();\n\n\n    cout << \"Sample \" << k << \" : \" << REPEAT << \" computations :  Jacobi : \" << fixed << timerJacobi.value() << \"s \";\n    cout << \" || \" << \" BDC : \" << timerBDC.value() << \"s \" <<endl <<endl;\n      \n    if (timerBDC.value() >= timerJacobi.value())  \n      cout << \"KO : BDC is \" <<  timerJacobi.value() / timerBDC.value() << \"  times faster than Jacobi\" <<endl;\n    else \n      cout << \"OK : BDC is \" << timerJacobi.value() / timerBDC.value() << \"  times faster than Jacobi\"  <<endl;\n      \n  }\n  std::cout<< std::endl;\n}\n\n\n\nint main(int argc, char* argv[])\n{\n  std::cout<< std::endl;\n\n  std::cout<<\"On a (Dynamic, Dynamic) (6, 6) Matrix\" <<std::endl;\n  bench_svd<Matrix<double,Dynamic,Dynamic> >(Matrix<double,Dynamic,Dynamic>(6, 6));\n  \n  std::cout<<\"On a (Dynamic, Dynamic) (32, 32) Matrix\" <<std::endl;\n  bench_svd<Matrix<double,Dynamic,Dynamic> >(Matrix<double,Dynamic,Dynamic>(32, 32));\n\n  //std::cout<<\"On a (Dynamic, Dynamic) (128, 128) Matrix\" <<std::endl;\n  //bench_svd<Matrix<double,Dynamic,Dynamic> >(Matrix<double,Dynamic,Dynamic>(128, 128));\n\n  std::cout<<\"On a (Dynamic, Dynamic) (160, 160) Matrix\" <<std::endl;\n  bench_svd<Matrix<double,Dynamic,Dynamic> >(Matrix<double,Dynamic,Dynamic>(160, 160));\n  \n  std::cout<< \"--------------------------------------------------------------------\"<< std::endl;\n           \n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/doc/CMakeLists.txt",
    "content": "set_directory_properties(PROPERTIES EXCLUDE_FROM_ALL TRUE)\n\nadd_subdirectory(examples)\nadd_subdirectory(snippets)\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/doc/Overview.dox",
    "content": "/// \\brief Namespace containing all symbols from the %Eigen library.\nnamespace Eigen {\n\n/** \\mainpage %Eigen's unsupported modules\n\nThis is the API documentation for %Eigen's unsupported modules.\n\nThese modules are contributions from various users. They are provided \"as is\", without any support.\n\nClick on the \\e Modules tab at the top of this page to get a list of all unsupported modules.\n\nDon't miss the <a href=\"../index.html\">official Eigen documentation</a>.\n\n \\subpage SYCL_EIGEN \"SYCL backend for Eigen\"\n\n*/\n\n/*\n\n\\defgroup Unsupported_modules Unsupported modules\n\nThe unsupported modules are contributions from various users. They are\nprovided \"as is\", without any support. Nevertheless, some of them are\nsubject to be included in %Eigen in the future.\n\n*/\n\n/// \\internal \\brief Namespace containing low-level routines from the %Eigen library.\nnamespace internal {}\n}\n\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/doc/SYCL.dox",
    "content": "/** \\page SYCL_EIGEN Eigen SYCL Backend\n\nUseful information for Eigen SYCL Backend:\n\n- <a href=\"https://developer.codeplay.com/computecppce/latest/getting-started-with-eigen\">Getting Started with Eigen</a> \n\n- <a href=\"https://developer.codeplay.com/computecppce/latest/options-for-building-eigen-sycl\">Options for Building Eigen SYCL</a>  \n\n*/\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/doc/eigendoxy_layout.xml.in",
    "content": "<?xml version=\"1.0\"?>\n<doxygenlayout version=\"1.0\">\n  <!-- Navigation index tabs for HTML output -->\n  <navindex>\n    <tab type=\"user\" url=\"index.html\" title=\"Overview\" />\n    <tab type=\"modules\" visible=\"yes\" title=\"Unsupported Modules\" intro=\"\"/>\n<!--     <tab type=\"mainpage\" visible=\"yes\" title=\"\"/> -->\n    <tab type=\"classlist\" visible=\"yes\" title=\"\" intro=\"\"/>\n<!--     <tab type=\"classmembers\" visible=\"yes\" title=\"\" intro=\"\"/> -->\n  </navindex>\n\n  <!-- Layout definition for a class page -->\n  <class>\n    <briefdescription visible=\"no\"/>\n    <includes visible=\"$SHOW_INCLUDE_FILES\"/>\n    <detaileddescription title=\"\"/>\n    <inheritancegraph visible=\"$CLASS_GRAPH\"/>\n    <collaborationgraph visible=\"$COLLABORATION_GRAPH\"/>\n    <allmemberslink visible=\"yes\"/>\n    <memberdecl>\n      <nestedclasses visible=\"yes\" title=\"\"/>\n      <publictypes title=\"\"/>\n      <publicslots title=\"\"/>\n      <signals title=\"\"/>\n      <publicmethods title=\"\"/>\n      <publicstaticmethods title=\"\"/>\n      <publicattributes title=\"\"/>\n      <publicstaticattributes title=\"\"/>\n      <protectedtypes title=\"\"/>\n      <protectedslots title=\"\"/>\n      <protectedmethods title=\"\"/>\n      <protectedstaticmethods title=\"\"/>\n      <protectedattributes title=\"\"/>\n      <protectedstaticattributes title=\"\"/>\n      <packagetypes title=\"\"/>\n      <packagemethods title=\"\"/>\n      <packagestaticmethods title=\"\"/>\n      <packageattributes title=\"\"/>\n      <packagestaticattributes title=\"\"/>\n      <properties title=\"\"/>\n      <events title=\"\"/>\n      <privatetypes title=\"\"/>\n      <privateslots title=\"\"/>\n      <privatemethods title=\"\"/>\n      <privatestaticmethods title=\"\"/>\n      <privateattributes title=\"\"/>\n      <privatestaticattributes title=\"\"/>\n      <friends title=\"\"/>\n      <related title=\"\" subtitle=\"\"/>\n      <membergroups visible=\"yes\"/>\n    </memberdecl>\n    \n    <memberdef>\n      <inlineclasses title=\"\"/>\n      <typedefs title=\"\"/>\n      <enums title=\"\"/>\n      <constructors title=\"\"/>\n      <functions title=\"\"/>\n      <related title=\"\"/>\n      <variables title=\"\"/>\n      <properties title=\"\"/>\n      <events title=\"\"/>\n    </memberdef>\n    <usedfiles visible=\"$SHOW_USED_FILES\"/>\n    <authorsection visible=\"yes\"/>\n  </class>\n\n  <!-- Layout definition for a namespace page -->\n  <namespace>\n    <briefdescription visible=\"yes\"/>\n    <memberdecl>\n      <nestednamespaces visible=\"yes\" title=\"\"/>\n      <classes visible=\"yes\" title=\"\"/>\n      <typedefs title=\"\"/>\n      <enums title=\"\"/>\n      <functions title=\"\"/>\n      <variables title=\"\"/>\n      <membergroups visible=\"yes\"/>\n    </memberdecl>\n    <detaileddescription title=\"\"/>\n    <memberdef>\n      <inlineclasses title=\"\"/>\n      <typedefs title=\"\"/>\n      <enums title=\"\"/>\n      <functions title=\"\"/>\n      <variables title=\"\"/>\n    </memberdef>\n    <authorsection visible=\"yes\"/>\n  </namespace>\n\n  <!-- Layout definition for a file page -->\n  <file>\n    <briefdescription visible=\"yes\"/>\n    <includes visible=\"$SHOW_INCLUDE_FILES\"/>\n    <includegraph visible=\"$INCLUDE_GRAPH\"/>\n    <includedbygraph visible=\"$INCLUDED_BY_GRAPH\"/>\n    <sourcelink visible=\"yes\"/>\n    <memberdecl>\n      <classes visible=\"yes\" title=\"\"/>\n      <namespaces visible=\"yes\" title=\"\"/>\n      <defines title=\"\"/>\n      <typedefs title=\"\"/>\n      <enums title=\"\"/>\n      <functions title=\"\"/>\n      <variables title=\"\"/>\n      <membergroups visible=\"yes\"/>\n    </memberdecl>\n    <detaileddescription title=\"\"/>\n    <memberdef>\n      <inlineclasses title=\"\"/>\n      <defines title=\"\"/>\n      <typedefs title=\"\"/>\n      <enums title=\"\"/>\n      <functions title=\"\"/>\n      <variables title=\"\"/>\n    </memberdef>\n    <authorsection/>\n  </file>\n\n  <!-- Layout definition for a group page -->\n  <group>\n    <briefdescription visible=\"no\"/>\n    <detaileddescription title=\"\"/>\n    <groupgraph visible=\"$GROUP_GRAPHS\"/>\n    <memberdecl>\n      <nestedgroups visible=\"yes\" title=\"\"/>\n      <dirs visible=\"yes\" title=\"\"/>\n      <files visible=\"yes\" title=\"\"/>\n      <namespaces visible=\"yes\" title=\"\"/>\n      <classes visible=\"yes\" title=\"\"/>\n      <defines title=\"\"/>\n      <typedefs title=\"\"/>\n      <enums title=\"\"/>\n      <enumvalues title=\"\"/>\n      <functions title=\"\"/>\n      <variables title=\"\"/>\n      <signals title=\"\"/>\n      <publicslots title=\"\"/>\n      <protectedslots title=\"\"/>\n      <privateslots title=\"\"/>\n      <events title=\"\"/>\n      <properties title=\"\"/>\n      <friends title=\"\"/>\n      <membergroups visible=\"yes\"/>\n    </memberdecl>\n    \n    <memberdef>\n      <pagedocs/>\n      <inlineclasses title=\"\"/>\n      <defines title=\"\"/>\n      <typedefs title=\"\"/>\n      <enums title=\"\"/>\n      <enumvalues title=\"\"/>\n      <functions title=\"\"/>\n      <variables title=\"\"/>\n      <signals title=\"\"/>\n      <publicslots title=\"\"/>\n      <protectedslots title=\"\"/>\n      <privateslots title=\"\"/>\n      <events title=\"\"/>\n      <properties title=\"\"/>\n      <friends title=\"\"/>\n    </memberdef>\n    <authorsection visible=\"yes\"/>\n  </group>\n\n  <!-- Layout definition for a directory page -->\n  <directory>\n    <briefdescription visible=\"yes\"/>\n    <directorygraph visible=\"yes\"/>\n    <memberdecl>\n      <dirs visible=\"yes\"/>\n      <files visible=\"yes\"/>\n    </memberdecl>\n    <detaileddescription title=\"\"/>\n  </directory>\n</doxygenlayout>\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/doc/examples/BVH_Example.cpp",
    "content": "#include <Eigen/StdVector>\n#include <unsupported/Eigen/BVH>\n#include <iostream>\n\nusing namespace Eigen;\ntypedef AlignedBox<double, 2> Box2d;\n\nnamespace Eigen {\n  Box2d bounding_box(const Vector2d &v) { return Box2d(v, v); } //compute the bounding box of a single point\n}\n\nstruct PointPointMinimizer //how to compute squared distances between points and rectangles\n{\n  PointPointMinimizer() : calls(0) {}\n  typedef double Scalar;\n\n  double minimumOnVolumeVolume(const Box2d &r1, const Box2d &r2) { ++calls; return r1.squaredExteriorDistance(r2); }\n  double minimumOnVolumeObject(const Box2d &r, const Vector2d &v) { ++calls; return r.squaredExteriorDistance(v); }\n  double minimumOnObjectVolume(const Vector2d &v, const Box2d &r) { ++calls; return r.squaredExteriorDistance(v); }\n  double minimumOnObjectObject(const Vector2d &v1, const Vector2d &v2) { ++calls; return (v1 - v2).squaredNorm(); }\n\n  int calls;\n};\n\nint main()\n{\n  typedef std::vector<Vector2d, aligned_allocator<Vector2d> > StdVectorOfVector2d;\n  StdVectorOfVector2d redPoints, bluePoints;\n  for(int i = 0; i < 100; ++i) { //initialize random set of red points and blue points\n    redPoints.push_back(Vector2d::Random());\n    bluePoints.push_back(Vector2d::Random());\n  }\n\n  PointPointMinimizer minimizer;\n  double minDistSq = std::numeric_limits<double>::max();\n\n  //brute force to find closest red-blue pair\n  for(int i = 0; i < (int)redPoints.size(); ++i)\n    for(int j = 0; j < (int)bluePoints.size(); ++j)\n      minDistSq = std::min(minDistSq, minimizer.minimumOnObjectObject(redPoints[i], bluePoints[j]));\n  std::cout << \"Brute force distance = \" << sqrt(minDistSq) << \", calls = \" << minimizer.calls << std::endl;\n\n  //using BVH to find closest red-blue pair\n  minimizer.calls = 0;\n  KdBVH<double, 2, Vector2d> redTree(redPoints.begin(), redPoints.end()), blueTree(bluePoints.begin(), bluePoints.end()); //construct the trees\n  minDistSq = BVMinimize(redTree, blueTree, minimizer); //actual BVH minimization call\n  std::cout << \"BVH distance         = \" << sqrt(minDistSq) << \", calls = \" << minimizer.calls << std::endl;\n\n  return 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/doc/examples/CMakeLists.txt",
    "content": "file(GLOB examples_SRCS \"*.cpp\")\n\nadd_custom_target(unsupported_examples)\n\ninclude_directories(../../../unsupported ../../../unsupported/test)\n\nforeach(example_src ${examples_SRCS})\n  get_filename_component(example ${example_src} NAME_WE)\n  add_executable(example_${example} ${example_src})\n  if(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO)\n    target_link_libraries(example_${example} ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO})\n  endif()\n  add_custom_command(\n    TARGET example_${example}\n    POST_BUILD\n    COMMAND example_${example}\n    ARGS >${CMAKE_CURRENT_BINARY_DIR}/${example}.out\n  )\n  add_dependencies(unsupported_examples example_${example})\nendforeach(example_src)\n\nif(EIGEN_TEST_SYCL)\n  add_subdirectory(SYCL)\nendif(EIGEN_TEST_SYCL)\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/doc/examples/EulerAngles.cpp",
    "content": "#include <unsupported/Eigen/EulerAngles>\n#include <iostream>\n\nusing namespace Eigen;\n\nint main()\n{\n  // A common Euler system by many armies around the world,\n  //  where the first one is the azimuth(the angle from the north -\n  //   the same angle that is show in compass)\n  //  and the second one is elevation(the angle from the horizon)\n  //  and the third one is roll(the angle between the horizontal body\n  //   direction and the plane ground surface)\n  // Keep remembering we're using radian angles here!\n  typedef EulerSystem<-EULER_Z, EULER_Y, EULER_X> MyArmySystem;\n  typedef EulerAngles<double, MyArmySystem> MyArmyAngles;\n  \n  MyArmyAngles vehicleAngles(\n    3.14/*PI*/ / 2, /* heading to east, notice that this angle is counter-clockwise */\n    -0.3, /* going down from a mountain */\n    0.1); /* slightly rolled to the right */\n  \n  // Some Euler angles representation that our plane use.\n  EulerAnglesZYZd planeAngles(0.78474, 0.5271, -0.513794);\n  \n  MyArmyAngles planeAnglesInMyArmyAngles(planeAngles);\n  \n  std::cout << \"vehicle angles(MyArmy):     \" << vehicleAngles << std::endl;\n  std::cout << \"plane angles(ZYZ):        \" << planeAngles << std::endl;\n  std::cout << \"plane angles(MyArmy):     \" << planeAnglesInMyArmyAngles << std::endl;\n  \n  // Now lets rotate the plane a little bit\n  std::cout << \"==========================================================\\n\";\n  std::cout << \"rotating plane now!\\n\";\n  std::cout << \"==========================================================\\n\";\n  \n  Quaterniond planeRotated = AngleAxisd(-0.342, Vector3d::UnitY()) * planeAngles;\n  \n  planeAngles = planeRotated;\n  planeAnglesInMyArmyAngles = planeRotated;\n  \n  std::cout << \"new plane angles(ZYZ):     \" << planeAngles << std::endl;\n  std::cout << \"new plane angles(MyArmy): \" << planeAnglesInMyArmyAngles << std::endl;\n  \n  return 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/doc/examples/FFT.cpp",
    "content": "//  To use the simple FFT implementation\n//  g++ -o demofft -I.. -Wall -O3 FFT.cpp \n\n//  To use the FFTW implementation\n//  g++ -o demofft -I.. -DUSE_FFTW -Wall -O3 FFT.cpp -lfftw3 -lfftw3f -lfftw3l\n\n#ifdef USE_FFTW\n#include <fftw3.h>\n#endif\n\n#include <vector>\n#include <complex>\n#include <algorithm>\n#include <iterator>\n#include <iostream>\n#include <Eigen/Core>\n#include <unsupported/Eigen/FFT>\n\nusing namespace std;\nusing namespace Eigen;\n\ntemplate <typename T>\nT mag2(T a)\n{\n    return a*a;\n}\ntemplate <typename T>\nT mag2(std::complex<T> a)\n{\n    return norm(a);\n}\n\ntemplate <typename T>\nT mag2(const std::vector<T> & vec)\n{\n    T out=0;\n    for (size_t k=0;k<vec.size();++k)\n        out += mag2(vec[k]);\n    return out;\n}\n\ntemplate <typename T>\nT mag2(const std::vector<std::complex<T> > & vec)\n{\n    T out=0;\n    for (size_t k=0;k<vec.size();++k)\n        out += mag2(vec[k]);\n    return out;\n}\n\ntemplate <typename T>\nvector<T> operator-(const vector<T> & a,const vector<T> & b )\n{\n    vector<T> c(a);\n    for (size_t k=0;k<b.size();++k) \n        c[k] -= b[k];\n    return c;\n}\n\ntemplate <typename T>\nvoid RandomFill(std::vector<T> & vec)\n{\n    for (size_t k=0;k<vec.size();++k)\n        vec[k] = T( rand() )/T(RAND_MAX) - T(.5);\n}\n\ntemplate <typename T>\nvoid RandomFill(std::vector<std::complex<T> > & vec)\n{\n    for (size_t k=0;k<vec.size();++k)\n        vec[k] = std::complex<T> ( T( rand() )/T(RAND_MAX) - T(.5), T( rand() )/T(RAND_MAX) - T(.5));\n}\n\ntemplate <typename T_time,typename T_freq>\nvoid fwd_inv(size_t nfft)\n{\n    typedef typename NumTraits<T_freq>::Real Scalar;\n    vector<T_time> timebuf(nfft);\n    RandomFill(timebuf);\n\n    vector<T_freq> freqbuf;\n    static FFT<Scalar> fft;\n    fft.fwd(freqbuf,timebuf);\n\n    vector<T_time> timebuf2;\n    fft.inv(timebuf2,freqbuf);\n\n    T_time rmse = mag2(timebuf - timebuf2) / mag2(timebuf);\n    cout << \"roundtrip rmse: \" << rmse << endl;\n}\n\ntemplate <typename T_scalar>\nvoid two_demos(int nfft)\n{\n    cout << \"     scalar \";\n    fwd_inv<T_scalar,std::complex<T_scalar> >(nfft);\n    cout << \"    complex \";\n    fwd_inv<std::complex<T_scalar>,std::complex<T_scalar> >(nfft);\n}\n\nvoid demo_all_types(int nfft)\n{\n    cout << \"nfft=\" << nfft << endl;\n    cout << \"   float\" << endl;\n    two_demos<float>(nfft);\n    cout << \"   double\" << endl;\n    two_demos<double>(nfft);\n    cout << \"   long double\" << endl;\n    two_demos<long double>(nfft);\n}\n\nint main()\n{\n    demo_all_types( 2*3*4*5*7 );\n    demo_all_types( 2*9*16*25 );\n    demo_all_types( 1024 );\n    return 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/doc/examples/MatrixExponential.cpp",
    "content": "#include <unsupported/Eigen/MatrixFunctions>\n#include <iostream>\n\nusing namespace Eigen;\n\nint main()\n{\n  const double pi = std::acos(-1.0);\n\n  MatrixXd A(3,3);\n  A << 0,    -pi/4, 0,\n       pi/4, 0,     0,\n       0,    0,     0;\n  std::cout << \"The matrix A is:\\n\" << A << \"\\n\\n\";\n  std::cout << \"The matrix exponential of A is:\\n\" << A.exp() << \"\\n\\n\";\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/doc/examples/MatrixFunction.cpp",
    "content": "#include <unsupported/Eigen/MatrixFunctions>\n#include <iostream>\n\nusing namespace Eigen;\n\nstd::complex<double> expfn(std::complex<double> x, int)\n{\n  return std::exp(x);\n}\n\nint main()\n{\n  const double pi = std::acos(-1.0);\n\n  MatrixXd A(3,3);\n  A << 0,    -pi/4, 0,\n       pi/4, 0,     0,\n       0,    0,     0;\n\n  std::cout << \"The matrix A is:\\n\" << A << \"\\n\\n\";\n  std::cout << \"The matrix exponential of A is:\\n\" \n            << A.matrixFunction(expfn) << \"\\n\\n\";\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/doc/examples/MatrixLogarithm.cpp",
    "content": "#include <unsupported/Eigen/MatrixFunctions>\n#include <iostream>\n\nusing namespace Eigen;\n\nint main()\n{\n  using std::sqrt;\n  MatrixXd A(3,3);\n  A << 0.5*sqrt(2), -0.5*sqrt(2), 0,\n       0.5*sqrt(2),  0.5*sqrt(2), 0,\n       0,            0,           1;\n  std::cout << \"The matrix A is:\\n\" << A << \"\\n\\n\";\n  std::cout << \"The matrix logarithm of A is:\\n\" << A.log() << \"\\n\";\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/doc/examples/MatrixPower.cpp",
    "content": "#include <unsupported/Eigen/MatrixFunctions>\n#include <iostream>\n\nusing namespace Eigen;\n\nint main()\n{\n  const double pi = std::acos(-1.0);\n  Matrix3d A;\n  A << cos(1), -sin(1), 0,\n       sin(1),  cos(1), 0,\n\t   0 ,      0 , 1;\n  std::cout << \"The matrix A is:\\n\" << A << \"\\n\\n\"\n\t       \"The matrix power A^(pi/4) is:\\n\" << A.pow(pi/4) << std::endl;\n  return 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/doc/examples/MatrixPower_optimal.cpp",
    "content": "#include <unsupported/Eigen/MatrixFunctions>\n#include <iostream>\n\nusing namespace Eigen;\n\nint main()\n{\n  Matrix4cd A = Matrix4cd::Random();\n  MatrixPower<Matrix4cd> Apow(A);\n\n  std::cout << \"The matrix A is:\\n\" << A << \"\\n\\n\"\n\t       \"A^3.1 is:\\n\" << Apow(3.1) << \"\\n\\n\"\n\t       \"A^3.3 is:\\n\" << Apow(3.3) << \"\\n\\n\"\n\t       \"A^3.7 is:\\n\" << Apow(3.7) << \"\\n\\n\"\n\t       \"A^3.9 is:\\n\" << Apow(3.9) << std::endl;\n  return 0;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/doc/examples/MatrixSine.cpp",
    "content": "#include <unsupported/Eigen/MatrixFunctions>\n#include <iostream>\n\nusing namespace Eigen;\n\nint main()\n{\n  MatrixXd A = MatrixXd::Random(3,3);\n  std::cout << \"A = \\n\" << A << \"\\n\\n\";\n\n  MatrixXd sinA = A.sin();\n  std::cout << \"sin(A) = \\n\" << sinA << \"\\n\\n\";\n\n  MatrixXd cosA = A.cos();\n  std::cout << \"cos(A) = \\n\" << cosA << \"\\n\\n\";\n  \n  // The matrix functions satisfy sin^2(A) + cos^2(A) = I, \n  // like the scalar functions.\n  std::cout << \"sin^2(A) + cos^2(A) = \\n\" << sinA*sinA + cosA*cosA << \"\\n\\n\";\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/doc/examples/MatrixSinh.cpp",
    "content": "#include <unsupported/Eigen/MatrixFunctions>\n#include <iostream>\n\nusing namespace Eigen;\n\nint main()\n{\n  MatrixXf A = MatrixXf::Random(3,3);\n  std::cout << \"A = \\n\" << A << \"\\n\\n\";\n\n  MatrixXf sinhA = A.sinh();\n  std::cout << \"sinh(A) = \\n\" << sinhA << \"\\n\\n\";\n\n  MatrixXf coshA = A.cosh();\n  std::cout << \"cosh(A) = \\n\" << coshA << \"\\n\\n\";\n  \n  // The matrix functions satisfy cosh^2(A) - sinh^2(A) = I, \n  // like the scalar functions.\n  std::cout << \"cosh^2(A) - sinh^2(A) = \\n\" << coshA*coshA - sinhA*sinhA << \"\\n\\n\";\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/doc/examples/MatrixSquareRoot.cpp",
    "content": "#include <unsupported/Eigen/MatrixFunctions>\n#include <iostream>\n\nusing namespace Eigen;\n\nint main()\n{\n  const double pi = std::acos(-1.0);\n\n  MatrixXd A(2,2);\n  A << cos(pi/3), -sin(pi/3), \n       sin(pi/3),  cos(pi/3);\n  std::cout << \"The matrix A is:\\n\" << A << \"\\n\\n\";\n  std::cout << \"The matrix square root of A is:\\n\" << A.sqrt() << \"\\n\\n\";\n  std::cout << \"The square of the last matrix is:\\n\" << A.sqrt() * A.sqrt() << \"\\n\";\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/doc/examples/PolynomialSolver1.cpp",
    "content": "#include <unsupported/Eigen/Polynomials>\n#include <vector>\n#include <iostream>\n\nusing namespace Eigen;\nusing namespace std;\n\nint main()\n{\n  typedef Matrix<double,5,1> Vector5d;\n\n  Vector5d roots = Vector5d::Random();\n  cout << \"Roots: \" << roots.transpose() << endl;\n  Eigen::Matrix<double,6,1> polynomial;\n  roots_to_monicPolynomial( roots, polynomial );\n\n  PolynomialSolver<double,5> psolve( polynomial );\n  cout << \"Complex roots: \" << psolve.roots().transpose() << endl;\n\n  std::vector<double> realRoots;\n  psolve.realRoots( realRoots );\n  Map<Vector5d> mapRR( &realRoots[0] );\n  cout << \"Real roots: \" << mapRR.transpose() << endl;\n\n  cout << endl;\n  cout << \"Illustration of the convergence problem with the QR algorithm: \" << endl;\n  cout << \"---------------------------------------------------------------\" << endl;\n  Eigen::Matrix<float,7,1> hardCase_polynomial;\n  hardCase_polynomial <<\n  -0.957, 0.9219, 0.3516, 0.9453, -0.4023, -0.5508, -0.03125;\n  cout << \"Hard case polynomial defined by floats: \" << hardCase_polynomial.transpose() << endl;\n  PolynomialSolver<float,6> psolvef( hardCase_polynomial );\n  cout << \"Complex roots: \" << psolvef.roots().transpose() << endl;\n  Eigen::Matrix<float,6,1> evals;\n  for( int i=0; i<6; ++i ){ evals[i] = std::abs( poly_eval( hardCase_polynomial, psolvef.roots()[i] ) ); }\n  cout << \"Norms of the evaluations of the polynomial at the roots: \" << evals.transpose() << endl << endl;\n\n  cout << \"Using double's almost always solves the problem for small degrees: \" << endl;\n  cout << \"-------------------------------------------------------------------\" << endl;\n  PolynomialSolver<double,6> psolve6d( hardCase_polynomial.cast<double>() );\n  cout << \"Complex roots: \" << psolve6d.roots().transpose() << endl;\n  for( int i=0; i<6; ++i )\n  {\n    std::complex<float> castedRoot( psolve6d.roots()[i].real(), psolve6d.roots()[i].imag() );\n    evals[i] = std::abs( poly_eval( hardCase_polynomial, castedRoot ) );\n  }\n  cout << \"Norms of the evaluations of the polynomial at the roots: \" << evals.transpose() << endl << endl;\n\n  cout.precision(10);\n  cout << \"The last root in float then in double: \" << psolvef.roots()[5] << \"\\t\" << psolve6d.roots()[5] << endl;\n  std::complex<float> castedRoot( psolve6d.roots()[5].real(), psolve6d.roots()[5].imag() );\n  cout << \"Norm of the difference: \" << std::abs( psolvef.roots()[5] - castedRoot ) << endl;\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/doc/examples/PolynomialUtils1.cpp",
    "content": "#include <unsupported/Eigen/Polynomials>\n#include <iostream>\n\nusing namespace Eigen;\nusing namespace std;\n\nint main()\n{\n  Vector4d roots = Vector4d::Random();\n  cout << \"Roots: \" << roots.transpose() << endl;\n  Eigen::Matrix<double,5,1> polynomial;\n  roots_to_monicPolynomial( roots, polynomial );\n  cout << \"Polynomial: \";\n  for( int i=0; i<4; ++i ){ cout << polynomial[i] << \".x^\" << i << \"+ \"; }\n  cout << polynomial[4] << \".x^4\" << endl;\n  Vector4d evaluation;\n  for( int i=0; i<4; ++i ){\n    evaluation[i] = poly_eval( polynomial, roots[i] ); }\n  cout << \"Evaluation of the polynomial at the roots: \" << evaluation.transpose();\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/doc/examples/SYCL/CMakeLists.txt",
    "content": "FILE(GLOB examples_SRCS \"*.cpp\")\n\nset(EIGEN_SYCL ON)\nlist(APPEND CMAKE_EXE_LINKER_FLAGS -pthread)\nif(EIGEN_SYCL_TRISYCL)\n  set(CMAKE_CXX_STANDARD 14)\n  set(STD_CXX_FLAG \"-std=c++1z\")\nelse(EIGEN_SYCL_TRISYCL)\n  if(MSVC)\n    # Set the host and device compilers C++ standard to C++14. On Windows setting this to C++11\n    # can cause issues with the ComputeCpp device compiler parsing Visual Studio Headers.\n    set(CMAKE_CXX_STANDARD 14)\n    list(APPEND COMPUTECPP_USER_FLAGS -DWIN32)\n  else()\n    set(CMAKE_CXX_STANDARD 11)\n    list(APPEND COMPUTECPP_USER_FLAGS -Wall)\n  endif()\n  # The following flags are not supported by Clang and can cause warnings\n  # if used with -Werror so they are removed here.\n  if(COMPUTECPP_USE_COMPILER_DRIVER)\n    set(CMAKE_CXX_COMPILER ${ComputeCpp_DEVICE_COMPILER_EXECUTABLE})\n    string(REPLACE \"-Wlogical-op\" \"\" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})\n    string(REPLACE \"-Wno-psabi\" \"\" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})\n    string(REPLACE \"-ansi\" \"\" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})\n  endif()\n  list(APPEND COMPUTECPP_USER_FLAGS\n      -DEIGEN_NO_ASSERTION_CHECKING=1\n      -no-serial-memop\n      -Xclang\n      -cl-mad-enable)\nendif(EIGEN_SYCL_TRISYCL)\n\nFOREACH(example_src ${examples_SRCS})\n  GET_FILENAME_COMPONENT(example ${example_src} NAME_WE)\n  ei_add_test_internal(${example} example_${example})\n  ADD_DEPENDENCIES(unsupported_examples example_${example})\nENDFOREACH(example_src)\nset(EIGEN_SYCL OFF)\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/doc/examples/SYCL/CwiseMul.cpp",
    "content": "#include <iostream>\n#define EIGEN_USE_SYCL\n#include <unsupported/Eigen/CXX11/Tensor>\n\nusing Eigen::array;\nusing Eigen::SyclDevice;\nusing Eigen::Tensor;\nusing Eigen::TensorMap;\n\nint main()\n{\n  using DataType = float;\n  using IndexType = int64_t;\n  constexpr auto DataLayout = Eigen::RowMajor;\n\n  auto devices = Eigen::get_sycl_supported_devices();\n  const auto device_selector = *devices.begin();\n  Eigen::QueueInterface queueInterface(device_selector);\n  auto sycl_device = Eigen::SyclDevice(&queueInterface);\n  \n  // create the tensors to be used in the operation\n  IndexType sizeDim1 = 3;\n  IndexType sizeDim2 = 3;\n  IndexType sizeDim3 = 3;\n  array<IndexType, 3> tensorRange = {{sizeDim1, sizeDim2, sizeDim3}};\n\n  // initialize the tensors with the data we want manipulate to\n  Tensor<DataType, 3,DataLayout, IndexType> in1(tensorRange);\n  Tensor<DataType, 3,DataLayout, IndexType> in2(tensorRange);\n  Tensor<DataType, 3,DataLayout, IndexType> out(tensorRange);\n\n  // set up some random data in the tensors to be multiplied\n  in1 = in1.random();\n  in2 = in2.random();\n\n  // allocate memory for the tensors\n  DataType * gpu_in1_data  = static_cast<DataType*>(sycl_device.allocate(in1.size()*sizeof(DataType)));\n  DataType * gpu_in2_data  = static_cast<DataType*>(sycl_device.allocate(in2.size()*sizeof(DataType)));\n  DataType * gpu_out_data =  static_cast<DataType*>(sycl_device.allocate(out.size()*sizeof(DataType)));\n\n  // \n  TensorMap<Tensor<DataType, 3, DataLayout, IndexType>> gpu_in1(gpu_in1_data, tensorRange);\n  TensorMap<Tensor<DataType, 3, DataLayout, IndexType>> gpu_in2(gpu_in2_data, tensorRange);\n  TensorMap<Tensor<DataType, 3, DataLayout, IndexType>> gpu_out(gpu_out_data, tensorRange);\n\n  // copy the memory to the device and do the c=a*b calculation\n  sycl_device.memcpyHostToDevice(gpu_in1_data, in1.data(),(in1.size())*sizeof(DataType));\n  sycl_device.memcpyHostToDevice(gpu_in2_data, in2.data(),(in2.size())*sizeof(DataType));\n  gpu_out.device(sycl_device) = gpu_in1 * gpu_in2;\n  sycl_device.memcpyDeviceToHost(out.data(), gpu_out_data,(out.size())*sizeof(DataType));\n  sycl_device.synchronize();\n\n  // print out the results\n   for (IndexType i = 0; i < sizeDim1; ++i) {\n    for (IndexType j = 0; j < sizeDim2; ++j) {\n      for (IndexType k = 0; k < sizeDim3; ++k) {\n        std::cout << \"device_out\" << \"(\" << i << \", \" << j << \", \" << k << \") : \" << out(i,j,k) \n                  << \" vs host_out\" << \"(\" << i << \", \" << j << \", \" << k << \") : \" << in1(i,j,k) * in2(i,j,k) << \"\\n\";\n      }\n    }\n  }\n  printf(\"c=a*b Done\\n\");\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/doc/snippets/CMakeLists.txt",
    "content": "file(GLOB snippets_SRCS \"*.cpp\")\n\nadd_custom_target(unsupported_snippets)\n\nforeach(snippet_src ${snippets_SRCS})\n  get_filename_component(snippet ${snippet_src} NAME_WE)\n  set(compile_snippet_target compile_${snippet})\n  set(compile_snippet_src ${compile_snippet_target}.cpp)\n  file(READ ${snippet_src} snippet_source_code)\n  configure_file(${PROJECT_SOURCE_DIR}/doc/snippets/compile_snippet.cpp.in\n                 ${CMAKE_CURRENT_BINARY_DIR}/${compile_snippet_src})\n  add_executable(${compile_snippet_target}\n                 ${CMAKE_CURRENT_BINARY_DIR}/${compile_snippet_src})\n  if(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO)\n    target_link_libraries(${compile_snippet_target} ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO})\n  endif()\n  add_custom_command(\n    TARGET ${compile_snippet_target}\n    POST_BUILD\n    COMMAND ${compile_snippet_target}\n    ARGS >${CMAKE_CURRENT_BINARY_DIR}/${snippet}.out\n  )\n  add_dependencies(unsupported_snippets ${compile_snippet_target})\n  set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${compile_snippet_src}\n                              PROPERTIES OBJECT_DEPENDS ${snippet_src})\nendforeach(snippet_src)\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/BVH.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Ilya Baran <ibaran@mit.edu>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <Eigen/StdVector>\n#include <Eigen/Geometry>\n#include <unsupported/Eigen/BVH>\n\nnamespace Eigen {\n\ntemplate<typename Scalar, int Dim> AlignedBox<Scalar, Dim> bounding_box(const Matrix<Scalar, Dim, 1> &v) { return AlignedBox<Scalar, Dim>(v); }\n\n}\n\n\ntemplate<int Dim>\nstruct Ball\n{\nEIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(double, Dim)\n\n  typedef Matrix<double, Dim, 1> VectorType;\n\n  Ball() {}\n  Ball(const VectorType &c, double r) : center(c), radius(r) {}\n\n  VectorType center;\n  double radius;\n};\ntemplate<int Dim> AlignedBox<double, Dim> bounding_box(const Ball<Dim> &b)\n{ return AlignedBox<double, Dim>(b.center.array() - b.radius, b.center.array() + b.radius); }\n\ninline double SQR(double x) { return x * x; }\n\ntemplate<int Dim>\nstruct BallPointStuff //this class provides functions to be both an intersector and a minimizer, both for a ball and a point and for two trees\n{\n  typedef double Scalar;\n  typedef Matrix<double, Dim, 1> VectorType;\n  typedef Ball<Dim> BallType;\n  typedef AlignedBox<double, Dim> BoxType;\n\n  BallPointStuff() : calls(0), count(0) {}\n  BallPointStuff(const VectorType &inP) : p(inP), calls(0), count(0) {}\n\n\n  bool intersectVolume(const BoxType &r) { ++calls; return r.contains(p); }\n  bool intersectObject(const BallType &b) {\n    ++calls;\n    if((b.center - p).squaredNorm() < SQR(b.radius))\n      ++count;\n    return false; //continue\n  }\n\n  bool intersectVolumeVolume(const BoxType &r1, const BoxType &r2) { ++calls; return !(r1.intersection(r2)).isNull(); }\n  bool intersectVolumeObject(const BoxType &r, const BallType &b) { ++calls; return r.squaredExteriorDistance(b.center) < SQR(b.radius); }\n  bool intersectObjectVolume(const BallType &b, const BoxType &r) { ++calls; return r.squaredExteriorDistance(b.center) < SQR(b.radius); }\n  bool intersectObjectObject(const BallType &b1, const BallType &b2){\n    ++calls;\n    if((b1.center - b2.center).norm() < b1.radius + b2.radius)\n      ++count;\n    return false;\n  }\n  bool intersectVolumeObject(const BoxType &r, const VectorType &v) { ++calls; return r.contains(v); }\n  bool intersectObjectObject(const BallType &b, const VectorType &v){\n    ++calls;\n    if((b.center - v).squaredNorm() < SQR(b.radius))\n      ++count;\n    return false;\n  }\n\n  double minimumOnVolume(const BoxType &r) { ++calls; return r.squaredExteriorDistance(p); }\n  double minimumOnObject(const BallType &b) { ++calls; return (std::max)(0., (b.center - p).squaredNorm() - SQR(b.radius)); }\n  double minimumOnVolumeVolume(const BoxType &r1, const BoxType &r2) { ++calls; return r1.squaredExteriorDistance(r2); }\n  double minimumOnVolumeObject(const BoxType &r, const BallType &b) { ++calls; return SQR((std::max)(0., r.exteriorDistance(b.center) - b.radius)); }\n  double minimumOnObjectVolume(const BallType &b, const BoxType &r) { ++calls; return SQR((std::max)(0., r.exteriorDistance(b.center) - b.radius)); }\n  double minimumOnObjectObject(const BallType &b1, const BallType &b2){ ++calls; return SQR((std::max)(0., (b1.center - b2.center).norm() - b1.radius - b2.radius)); }\n  double minimumOnVolumeObject(const BoxType &r, const VectorType &v) { ++calls; return r.squaredExteriorDistance(v); }\n  double minimumOnObjectObject(const BallType &b, const VectorType &v){ ++calls; return SQR((std::max)(0., (b.center - v).norm() - b.radius)); }\n\n  VectorType p;\n  int calls;\n  int count;\n};\n\n\ntemplate<int Dim>\nstruct TreeTest\n{\n  typedef Matrix<double, Dim, 1> VectorType;\n  typedef std::vector<VectorType, aligned_allocator<VectorType> > VectorTypeList;\n  typedef Ball<Dim> BallType;\n  typedef std::vector<BallType, aligned_allocator<BallType> > BallTypeList;\n  typedef AlignedBox<double, Dim> BoxType;\n\n  void testIntersect1()\n  {\n    BallTypeList b;\n    for(int i = 0; i < 500; ++i) {\n        b.push_back(BallType(VectorType::Random(), 0.5 * internal::random(0., 1.)));\n    }\n    KdBVH<double, Dim, BallType> tree(b.begin(), b.end());\n\n    VectorType pt = VectorType::Random();\n    BallPointStuff<Dim> i1(pt), i2(pt);\n\n    for(int i = 0; i < (int)b.size(); ++i)\n      i1.intersectObject(b[i]);\n\n    BVIntersect(tree, i2);\n\n    VERIFY(i1.count == i2.count);\n  }\n\n  void testMinimize1()\n  {\n    BallTypeList b;\n    for(int i = 0; i < 500; ++i) {\n        b.push_back(BallType(VectorType::Random(), 0.01 * internal::random(0., 1.)));\n    }\n    KdBVH<double, Dim, BallType> tree(b.begin(), b.end());\n\n    VectorType pt = VectorType::Random();\n    BallPointStuff<Dim> i1(pt), i2(pt);\n\n    double m1 = (std::numeric_limits<double>::max)(), m2 = m1;\n\n    for(int i = 0; i < (int)b.size(); ++i)\n      m1 = (std::min)(m1, i1.minimumOnObject(b[i]));\n\n    m2 = BVMinimize(tree, i2);\n\n    VERIFY_IS_APPROX(m1, m2);\n  }\n\n  void testIntersect2()\n  {\n    BallTypeList b;\n    VectorTypeList v;\n\n    for(int i = 0; i < 50; ++i) {\n        b.push_back(BallType(VectorType::Random(), 0.5 * internal::random(0., 1.)));\n        for(int j = 0; j < 3; ++j)\n            v.push_back(VectorType::Random());\n    }\n\n    KdBVH<double, Dim, BallType> tree(b.begin(), b.end());\n    KdBVH<double, Dim, VectorType> vTree(v.begin(), v.end());\n\n    BallPointStuff<Dim> i1, i2;\n\n    for(int i = 0; i < (int)b.size(); ++i)\n        for(int j = 0; j < (int)v.size(); ++j)\n            i1.intersectObjectObject(b[i], v[j]);\n\n    BVIntersect(tree, vTree, i2);\n\n    VERIFY(i1.count == i2.count);\n  }\n\n  void testMinimize2()\n  {\n    BallTypeList b;\n    VectorTypeList v;\n\n    for(int i = 0; i < 50; ++i) {\n        b.push_back(BallType(VectorType::Random(), 1e-7 + 1e-6 * internal::random(0., 1.)));\n        for(int j = 0; j < 3; ++j)\n            v.push_back(VectorType::Random());\n    }\n\n    KdBVH<double, Dim, BallType> tree(b.begin(), b.end());\n    KdBVH<double, Dim, VectorType> vTree(v.begin(), v.end());\n\n    BallPointStuff<Dim> i1, i2;\n\n    double m1 = (std::numeric_limits<double>::max)(), m2 = m1;\n\n    for(int i = 0; i < (int)b.size(); ++i)\n        for(int j = 0; j < (int)v.size(); ++j)\n            m1 = (std::min)(m1, i1.minimumOnObjectObject(b[i], v[j]));\n\n    m2 = BVMinimize(tree, vTree, i2);\n\n    VERIFY_IS_APPROX(m1, m2);\n  }\n};\n\n\nEIGEN_DECLARE_TEST(BVH)\n{\n  for(int i = 0; i < g_repeat; i++) {\n#ifdef EIGEN_TEST_PART_1\n    TreeTest<2> test2;\n    CALL_SUBTEST(test2.testIntersect1());\n    CALL_SUBTEST(test2.testMinimize1());\n    CALL_SUBTEST(test2.testIntersect2());\n    CALL_SUBTEST(test2.testMinimize2());\n#endif\n\n#ifdef EIGEN_TEST_PART_2\n    TreeTest<3> test3;\n    CALL_SUBTEST(test3.testIntersect1());\n    CALL_SUBTEST(test3.testMinimize1());\n    CALL_SUBTEST(test3.testIntersect2());\n    CALL_SUBTEST(test3.testMinimize2());\n#endif\n\n#ifdef EIGEN_TEST_PART_3\n    TreeTest<4> test4;\n    CALL_SUBTEST(test4.testIntersect1());\n    CALL_SUBTEST(test4.testMinimize1());\n    CALL_SUBTEST(test4.testIntersect2());\n    CALL_SUBTEST(test4.testMinimize2());\n#endif\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/CMakeLists.txt",
    "content": "# # The file split_test_helper.h was generated at first run,\n# # it is now included in test/\n# if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/split_test_helper.h)\n#   file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/split_test_helper.h)\n# endif()\n\n# set_property(GLOBAL PROPERTY EIGEN_CURRENT_SUBPROJECT \"Unsupported\")\n# add_custom_target(BuildUnsupported)\n\n# include_directories(../../test ../../unsupported ../../Eigen\n#                     ${CMAKE_CURRENT_BINARY_DIR}/../../test)\n\n# find_package (Threads)\n\n# find_package(GoogleHash)\n# if(GOOGLEHASH_FOUND)\n#   add_definitions(\"-DEIGEN_GOOGLEHASH_SUPPORT\")\n#   include_directories(${GOOGLEHASH_INCLUDES})\n#   ei_add_property(EIGEN_TESTED_BACKENDS  \"GoogleHash, \")\n# else()\n#   ei_add_property(EIGEN_MISSING_BACKENDS  \"GoogleHash, \")\n# endif()\n\n\n# find_package(Adolc)\n# if(ADOLC_FOUND)\n#   include_directories(${ADOLC_INCLUDES})\n#   ei_add_property(EIGEN_TESTED_BACKENDS \"Adolc, \")\n#   if(EIGEN_TEST_CXX11)\n#     ei_add_test(forward_adolc \"\" ${ADOLC_LIBRARIES})\n#   else()\n#     message(STATUS \"Adolc found, but tests require C++11 mode\")\n#   endif()\n# else()\n#   ei_add_property(EIGEN_MISSING_BACKENDS \"Adolc, \")\n# endif()\n\n# # this test seems to never have been successful on x87, so is considered to contain a FP-related bug.\n# # see thread: \"non-linear optimization test summary\"\n# ei_add_test(NonLinearOptimization)\n\n# ei_add_test(NumericalDiff)\n# ei_add_test(autodiff_scalar)\n# ei_add_test(autodiff)\n\n# ei_add_test(BVH)\n\n# ei_add_test(matrix_exponential)\n# ei_add_test(matrix_function)\n# ei_add_test(matrix_power)\n# ei_add_test(matrix_square_root)\n# ei_add_test(alignedvector3)\n\n# ei_add_test(FFT)\n\n# ei_add_test(EulerAngles)\n\n# find_package(MPFR 2.3.0)\n# find_package(GMP)\n# if(MPFR_FOUND AND EIGEN_COMPILER_SUPPORT_CPP11)\n#   include_directories(${MPFR_INCLUDES} ./mpreal)\n#   ei_add_property(EIGEN_TESTED_BACKENDS \"MPFR C++, \")\n#   set(EIGEN_MPFR_TEST_LIBRARIES ${MPFR_LIBRARIES} ${GMP_LIBRARIES})\n#  ei_add_test(mpreal_support \"-std=c++11\" \"${EIGEN_MPFR_TEST_LIBRARIES}\" )\n# else()\n#   ei_add_property(EIGEN_MISSING_BACKENDS \"MPFR C++, \")\n# endif()\n\n# ei_add_test(sparse_extra   \"\" \"\")\n\n# find_package(FFTW)\n# if(FFTW_FOUND)\n#   ei_add_property(EIGEN_TESTED_BACKENDS \"fftw, \")\n#   include_directories( ${FFTW_INCLUDES} )\n#   if(FFTWL_LIB)\n#     ei_add_test(FFTW  \"-DEIGEN_FFTW_DEFAULT -DEIGEN_HAS_FFTWL\" \"${FFTW_LIBRARIES}\" )\n#   else()\n#     ei_add_test(FFTW  \"-DEIGEN_FFTW_DEFAULT\" \"${FFTW_LIBRARIES}\" )\n#   endif()\n# else()\n#   ei_add_property(EIGEN_MISSING_BACKENDS \"fftw, \")\n# endif()\n\n# option(EIGEN_TEST_NO_OPENGL \"Disable OpenGL support in unit tests\" OFF)\n# if(NOT EIGEN_TEST_NO_OPENGL)\n#   find_package(OpenGL)\n#   find_package(GLUT)\n#   find_package(GLEW)\n#   if(OPENGL_FOUND AND GLUT_FOUND AND GLEW_FOUND)\n#     include_directories(${OPENGL_INCLUDE_DIR} ${GLUT_INCLUDE_DIR} ${GLEW_INCLUDE_DIRS})\n#     ei_add_property(EIGEN_TESTED_BACKENDS \"OpenGL, \")\n#     set(EIGEN_GL_LIB ${GLUT_LIBRARIES} ${GLEW_LIBRARIES} ${OPENGL_LIBRARIES})\n#     ei_add_test(openglsupport  \"\" \"${EIGEN_GL_LIB}\" )\n#   else()\n#     ei_add_property(EIGEN_MISSING_BACKENDS \"OpenGL, \")\n#   endif()\n# else()\n#     ei_add_property(EIGEN_MISSING_BACKENDS \"OpenGL, \")\n# endif()\n\n# ei_add_test(polynomialsolver)\n# ei_add_test(polynomialutils)\n# ei_add_test(splines)\n# ei_add_test(gmres)\n# ei_add_test(dgmres)\n# ei_add_test(minres)\n# ei_add_test(levenberg_marquardt)\n# ei_add_test(kronecker_product)\n# ei_add_test(bessel_functions)\n# ei_add_test(special_functions)\n# ei_add_test(special_packetmath \"-DEIGEN_FAST_MATH=1\")\n\n# if(EIGEN_TEST_CXX11)\n#   if(EIGEN_TEST_SYCL)\n#     set(EIGEN_SYCL ON)\n#     # Forward CMake options as preprocessor definitions\n#     if(EIGEN_SYCL_USE_DEFAULT_SELECTOR)\n#       add_definitions(-DEIGEN_SYCL_USE_DEFAULT_SELECTOR=${EIGEN_SYCL_USE_DEFAULT_SELECTOR})\n#     endif()\n#     if(EIGEN_SYCL_NO_LOCAL_MEM)\n#       add_definitions(-DEIGEN_SYCL_NO_LOCAL_MEM=${EIGEN_SYCL_NO_LOCAL_MEM})\n#     endif()\n#     if(EIGEN_SYCL_LOCAL_MEM)\n#       add_definitions(-DEIGEN_SYCL_LOCAL_MEM=${EIGEN_SYCL_LOCAL_MEM})\n#     endif()\n#     if(EIGEN_SYCL_MAX_GLOBAL_RANGE)\n#       add_definitions(-DEIGEN_SYCL_MAX_GLOBAL_RANGE=${EIGEN_SYCL_MAX_GLOBAL_RANGE})\n#     endif()\n#     if(EIGEN_SYCL_LOCAL_THREAD_DIM0)\n#       add_definitions(-DEIGEN_SYCL_LOCAL_THREAD_DIM0=${EIGEN_SYCL_LOCAL_THREAD_DIM0})\n#     endif()\n#     if(EIGEN_SYCL_LOCAL_THREAD_DIM1)\n#       add_definitions(-DEIGEN_SYCL_LOCAL_THREAD_DIM1=${EIGEN_SYCL_LOCAL_THREAD_DIM1})\n#     endif()\n#     if(EIGEN_SYCL_REG_M)\n#       add_definitions(-DEIGEN_SYCL_REG_M=${EIGEN_SYCL_REG_M})\n#     endif()\n#     if(EIGEN_SYCL_REG_N)\n#       add_definitions(-DEIGEN_SYCL_REG_N=${EIGEN_SYCL_REG_N})\n#     endif()\n#     if(EIGEN_SYCL_USE_PROGRAM_CLASS)\n#       add_definitions(-DEIGEN_SYCL_USE_PROGRAM_CLASS=${EIGEN_SYCL_USE_PROGRAM_CLASS})\n#     endif()\n#     if(EIGEN_SYCL_ASYNC_EXECUTION)\n#       add_definitions(-DEIGEN_SYCL_ASYNC_EXECUTION=${EIGEN_SYCL_ASYNC_EXECUTION})\n#     endif()\n#     if(EIGEN_SYCL_DISABLE_SKINNY)\n#       add_definitions(-DEIGEN_SYCL_DISABLE_SKINNY=${EIGEN_SYCL_DISABLE_SKINNY})\n#     endif()\n#     if(EIGEN_SYCL_DISABLE_DOUBLE_BUFFER)\n#     add_definitions(-DEIGEN_SYCL_DISABLE_DOUBLE_BUFFER=${EIGEN_SYCL_DISABLE_DOUBLE_BUFFER})\n#   endif()\n#     if(EIGEN_SYCL_DISABLE_RANK1)\n#       add_definitions(-DEIGEN_SYCL_DISABLE_RANK1=${EIGEN_SYCL_DISABLE_RANK1})\n#     endif()\n#     if(EIGEN_SYCL_DISABLE_SCALAR)\n#       add_definitions(-DEIGEN_SYCL_DISABLE_SCALAR=${EIGEN_SYCL_DISABLE_SCALAR})\n#     endif()\n#     if(EIGEN_SYCL_DISABLE_GEMV)\n#       add_definitions(-DEIGEN_SYCL_DISABLE_GEMV=${EIGEN_SYCL_DISABLE_GEMV})\n#     endif()\n#     if(EIGEN_SYCL_DISABLE_ARM_GPU_CACHE_OPTIMISATION)\n#       add_definitions(-DEIGEN_SYCL_DISABLE_ARM_GPU_CACHE_OPTIMISATION=${EIGEN_SYCL_DISABLE_ARM_GPU_CACHE_OPTIMISATION})\n#     endif()\n\n#     if(EIGEN_SYCL_TRISYCL)\n#       set(CMAKE_CXX_STANDARD 14)\n#       set(STD_CXX_FLAG \"-std=c++1z\")\n#     else()\n#       if(MSVC)\n#         # Set the host and device compilers C++ standard to C++14. On Windows setting this to C++11\n#         # can cause issues with the ComputeCpp device compiler parsing Visual Studio Headers.\n#         set(CMAKE_CXX_STANDARD 14)\n#         list(APPEND COMPUTECPP_USER_FLAGS -DWIN32)\n#       else()\n#         set(CMAKE_CXX_STANDARD 11)\n#         list(APPEND COMPUTECPP_USER_FLAGS -Wall)\n#       endif()\n#       # The following flags are not supported by Clang and can cause warnings\n#       # if used with -Werror so they are removed here.\n#       if(COMPUTECPP_USE_COMPILER_DRIVER)\n#         set(CMAKE_CXX_COMPILER ${ComputeCpp_DEVICE_COMPILER_EXECUTABLE})\n#         string(REPLACE \"-Wlogical-op\" \"\" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})\n#         string(REPLACE \"-Wno-psabi\" \"\" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})\n#         string(REPLACE \"-ansi\" \"\" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})\n#       endif()\n#       list(APPEND COMPUTECPP_USER_FLAGS\n#           -DEIGEN_NO_ASSERTION_CHECKING=1\n#           -no-serial-memop\n#           -Xclang\n#           -cl-mad-enable)\n#     endif()\n\n#     ei_add_test(cxx11_tensor_sycl ${STD_CXX_FLAG})\n#     ei_add_test(cxx11_tensor_image_op_sycl ${STD_CXX_FLAG})\n#     ei_add_test(cxx11_tensor_math_sycl ${STD_CXX_FLAG})\n#     ei_add_test(cxx11_tensor_forced_eval_sycl ${STD_CXX_FLAG})\n#     ei_add_test(cxx11_tensor_broadcast_sycl ${STD_CXX_FLAG})\n#     ei_add_test(cxx11_tensor_device_sycl ${STD_CXX_FLAG})\n#     ei_add_test(cxx11_tensor_reduction_sycl ${STD_CXX_FLAG})\n#     ei_add_test(cxx11_tensor_morphing_sycl ${STD_CXX_FLAG})\n#     ei_add_test(cxx11_tensor_shuffling_sycl ${STD_CXX_FLAG})\n#     ei_add_test(cxx11_tensor_padding_sycl ${STD_CXX_FLAG})\n#     ei_add_test(cxx11_tensor_builtins_sycl ${STD_CXX_FLAG})\n#     ei_add_test(cxx11_tensor_contract_sycl ${STD_CXX_FLAG})\n#     ei_add_test(cxx11_tensor_concatenation_sycl ${STD_CXX_FLAG})\n#     ei_add_test(cxx11_tensor_reverse_sycl ${STD_CXX_FLAG})\n#     ei_add_test(cxx11_tensor_convolution_sycl ${STD_CXX_FLAG})\n#     ei_add_test(cxx11_tensor_striding_sycl ${STD_CXX_FLAG})\n#     ei_add_test(cxx11_tensor_chipping_sycl ${STD_CXX_FLAG})\n#     ei_add_test(cxx11_tensor_layout_swap_sycl ${STD_CXX_FLAG})\n#     ei_add_test(cxx11_tensor_inflation_sycl ${STD_CXX_FLAG})\n#     ei_add_test(cxx11_tensor_random_sycl ${STD_CXX_FLAG})\n#     ei_add_test(cxx11_tensor_generator_sycl ${STD_CXX_FLAG})\n#     ei_add_test(cxx11_tensor_patch_sycl ${STD_CXX_FLAG})\n#     ei_add_test(cxx11_tensor_image_patch_sycl ${STD_CXX_FLAG})\n#     ei_add_test(cxx11_tensor_volume_patch_sycl ${STD_CXX_FLAG})\n#     ei_add_test(cxx11_tensor_argmax_sycl ${STD_CXX_FLAG})\n#     ei_add_test(cxx11_tensor_custom_op_sycl ${STD_CXX_FLAG})\n#     ei_add_test(cxx11_tensor_scan_sycl ${STD_CXX_FLAG})\n#     set(EIGEN_SYCL OFF)\n#   endif()\n\n#   ei_add_test(cxx11_eventcount \"-pthread\" \"${CMAKE_THREAD_LIBS_INIT}\")\n#   ei_add_test(cxx11_runqueue \"-pthread\" \"${CMAKE_THREAD_LIBS_INIT}\")\n#   ei_add_test(cxx11_non_blocking_thread_pool \"-pthread\" \"${CMAKE_THREAD_LIBS_INIT}\")\n\n#   ei_add_test(cxx11_meta)\n#   ei_add_test(cxx11_maxsizevector)\n#   ei_add_test(cxx11_tensor_argmax)\n#   ei_add_test(cxx11_tensor_assign)\n#   ei_add_test(cxx11_tensor_block_access)\n#   ei_add_test(cxx11_tensor_block_eval)\n#   ei_add_test(cxx11_tensor_block_io)\n#   ei_add_test(cxx11_tensor_broadcasting)\n#   ei_add_test(cxx11_tensor_casts)\n#   ei_add_test(cxx11_tensor_chipping)\n#   ei_add_test(cxx11_tensor_comparisons)\n#   ei_add_test(cxx11_tensor_concatenation)\n#   ei_add_test(cxx11_tensor_const)\n#   ei_add_test(cxx11_tensor_contraction)\n#   ei_add_test(cxx11_tensor_convolution)\n#   ei_add_test(cxx11_tensor_custom_index)\n#   ei_add_test(cxx11_tensor_custom_op)\n#   ei_add_test(cxx11_tensor_dimension)\n#   ei_add_test(cxx11_tensor_empty)\n#   ei_add_test(cxx11_tensor_executor \"-pthread\" \"${CMAKE_THREAD_LIBS_INIT}\")\n#   ei_add_test(cxx11_tensor_expr)\n#   ei_add_test(cxx11_tensor_fft)\n#   ei_add_test(cxx11_tensor_fixed_size)\n#   ei_add_test(cxx11_tensor_forced_eval)\n#   ei_add_test(cxx11_tensor_generator)\n#   ei_add_test(cxx11_tensor_ifft)\n#   ei_add_test(cxx11_tensor_image_patch)\n#   ei_add_test(cxx11_tensor_index_list)\n#   ei_add_test(cxx11_tensor_inflation)\n#   ei_add_test(cxx11_tensor_intdiv)\n#   ei_add_test(cxx11_tensor_io)\n#   ei_add_test(cxx11_tensor_layout_swap)\n#   ei_add_test(cxx11_tensor_lvalue)\n#   ei_add_test(cxx11_tensor_map)\n#   ei_add_test(cxx11_tensor_math)\n#   ei_add_test(cxx11_tensor_mixed_indices)\n#   ei_add_test(cxx11_tensor_morphing)\n#   ei_add_test(cxx11_tensor_move)\n#   ei_add_test(cxx11_tensor_notification \"-pthread\" \"${CMAKE_THREAD_LIBS_INIT}\")\n#   ei_add_test(cxx11_tensor_of_complex)\n#   ei_add_test(cxx11_tensor_of_const_values)\n#   ei_add_test(cxx11_tensor_of_strings)\n#   ei_add_test(cxx11_tensor_padding)\n#   ei_add_test(cxx11_tensor_patch)\n#   ei_add_test(cxx11_tensor_random)\n#   ei_add_test(cxx11_tensor_reduction)\n#   ei_add_test(cxx11_tensor_ref)\n#   ei_add_test(cxx11_tensor_roundings)\n#   ei_add_test(cxx11_tensor_scan)\n#   ei_add_test(cxx11_tensor_shuffling)\n#   ei_add_test(cxx11_tensor_simple)\n#   ei_add_test(cxx11_tensor_striding)\n#   ei_add_test(cxx11_tensor_sugar)\n#   ei_add_test(cxx11_tensor_thread_local \"-pthread\" \"${CMAKE_THREAD_LIBS_INIT}\")\n#   ei_add_test(cxx11_tensor_thread_pool \"-pthread\" \"${CMAKE_THREAD_LIBS_INIT}\")\n#   ei_add_test(cxx11_tensor_trace)\n#   ei_add_test(cxx11_tensor_volume_patch)\n# #  ei_add_test(cxx11_tensor_symmetry)\n# if(\"${CMAKE_SIZEOF_VOID_P}\" EQUAL \"8\" AND NOT CMAKE_CXX_COMPILER_ID STREQUAL \"MSVC\")\n#   # This test requires __uint128_t which is only available on 64bit systems\n#   ei_add_test(cxx11_tensor_uint128)\n# endif()\n\n# endif()\n\n# # These tests needs nvcc\n# find_package(CUDA 7.0)\n# if(CUDA_FOUND AND EIGEN_TEST_CUDA)\n#   # Make sure to compile without the -pedantic, -Wundef, -Wnon-virtual-dtor\n#   # and -fno-check-new flags since they trigger thousands of compilation warnings\n#   # in the CUDA runtime\n#   # Also remove -ansi that is incompatible with std=c++11.\n#   string(REPLACE \"-pedantic\" \"\" CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS}\")\n#   string(REPLACE \"-Wundef\" \"\" CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS}\")\n#   string(REPLACE \"-Wnon-virtual-dtor\" \"\" CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS}\")\n#   string(REPLACE \"-fno-check-new\" \"\" CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS}\")\n#   string(REPLACE \"-ansi\" \"\" CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS}\")\n\n#   message(STATUS \"Flags used to compile cuda code: \" ${CMAKE_CXX_FLAGS})\n\n#   if(\"${CMAKE_CXX_COMPILER_ID}\" STREQUAL \"Clang\")\n#     set(CUDA_NVCC_FLAGS \"-ccbin ${CMAKE_C_COMPILER}\" CACHE STRING \"nvcc flags\" FORCE)\n#   endif()\n#   if(EIGEN_TEST_CUDA_CLANG)\n#     set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -std=c++11\")\n#     string(APPEND CMAKE_CXX_FLAGS \" --cuda-path=${CUDA_TOOLKIT_ROOT_DIR}\")\n#     foreach(ARCH IN LISTS EIGEN_CUDA_COMPUTE_ARCH)\n#         string(APPEND CMAKE_CXX_FLAGS \" --cuda-gpu-arch=sm_${ARCH}\")\n#     endforeach()\n#   endif()\n\n#   set(EIGEN_CUDA_RELAXED_CONSTEXPR \"--expt-relaxed-constexpr\")\n#   if (${CUDA_VERSION} STREQUAL \"7.0\")\n#     set(EIGEN_CUDA_RELAXED_CONSTEXPR \"--relaxed-constexpr\")\n#   endif()\n\n#   if(( (NOT EIGEN_TEST_CXX11) OR (CMAKE_VERSION VERSION_LESS 3.3)) AND EIGEN_TEST_CXX11)\n#     set(EIGEN_CUDA_CXX11_FLAG \"-std=c++11\")\n#   else()\n#     # otherwise the flag has already been added because of the above set(CMAKE_CXX_STANDARD 11)\n#     set(EIGEN_CUDA_CXX11_FLAG \"\")\n#   endif()\n\n#   set(NVCC_ARCH_FLAGS)\n#   foreach(ARCH IN LISTS EIGEN_CUDA_COMPUTE_ARCH)\n#     string(APPEND NVCC_ARCH_FLAGS \" -gencode arch=compute_${ARCH},code=sm_${ARCH}\")\n#   endforeach()\n#   set(CUDA_NVCC_FLAGS  \"${EIGEN_CUDA_CXX11_FLAG} ${EIGEN_CUDA_RELAXED_CONSTEXPR} -Xcudafe \\\"--display_error_number\\\" ${NVCC_ARCH_FLAGS} ${CUDA_NVCC_FLAGS}\")\n#   cuda_include_directories(\"${CMAKE_CURRENT_BINARY_DIR}\" \"${CUDA_TOOLKIT_ROOT_DIR}/include\")\n#   set(EIGEN_ADD_TEST_FILENAME_EXTENSION \"cu\")\n\n#   ei_add_test(cxx11_tensor_complex_gpu)\n#   ei_add_test(cxx11_tensor_complex_cwise_ops_gpu)\n#   ei_add_test(cxx11_tensor_reduction_gpu)\n#   ei_add_test(cxx11_tensor_argmax_gpu)\n#   ei_add_test(cxx11_tensor_cast_float16_gpu)\n#   ei_add_test(cxx11_tensor_scan_gpu)\n\n#   set(EIGEN_CUDA_OLDEST_COMPUTE_ARCH 9999)\n#   foreach(ARCH IN LISTS EIGEN_CUDA_COMPUTE_ARCH)\n#     if(${ARCH} LESS ${EIGEN_CUDA_OLDEST_COMPUTE_ARCH})\n#       set(EIGEN_CUDA_OLDEST_COMPUTE_ARCH ${ARCH})\n#     endif()\n#   endforeach()\n\n#   # Contractions require arch 3.0 or higher\n#   if (${EIGEN_CUDA_OLDEST_COMPUTE_ARCH} GREATER 29)\n#     ei_add_test(cxx11_tensor_device)\n#     ei_add_test(cxx11_tensor_gpu)\n#     ei_add_test(cxx11_tensor_contract_gpu)\n#     ei_add_test(cxx11_tensor_of_float16_gpu)\n#   endif()\n\n#   # The random number generation code requires arch 3.5 or greater.\n#   if (${EIGEN_CUDA_OLDEST_COMPUTE_ARCH} GREATER 34)\n#     ei_add_test(cxx11_tensor_random_gpu)\n#   endif()\n\n\n#   unset(EIGEN_ADD_TEST_FILENAME_EXTENSION)\n# endif()\n\n# # Add HIP specific tests\n# if (EIGEN_TEST_HIP)\n\n#   set(HIP_PATH \"/opt/rocm/hip\" CACHE STRING \"Path to the HIP installation.\")\n\n#   if (EXISTS ${HIP_PATH})\n\n#     list(APPEND CMAKE_MODULE_PATH ${HIP_PATH}/cmake)\n\n#     find_package(HIP REQUIRED)\n#     if (HIP_FOUND)\n\n#       execute_process(COMMAND ${HIP_PATH}/bin/hipconfig --platform OUTPUT_VARIABLE HIP_PLATFORM)\n\n#       if (${HIP_PLATFORM} STREQUAL \"hcc\")\n\n# \tinclude_directories(${CMAKE_CURRENT_BINARY_DIR})\n# \tinclude_directories(${HIP_PATH}/include)\n\n# \tset(EIGEN_ADD_TEST_FILENAME_EXTENSION  \"cu\")\n# \t#\n# \t# complex datatype is not yet supported by HIP\n# \t# so leaving out those tests for now\n# \t#\n# \t# ei_add_test(cxx11_tensor_complex_gpu)\n# \t# ei_add_test(cxx11_tensor_complex_cwise_ops_gpu)\n# \t#\n# \tei_add_test(cxx11_tensor_reduction_gpu)\n# \tei_add_test(cxx11_tensor_argmax_gpu)\n# \tei_add_test(cxx11_tensor_cast_float16_gpu)\n# \tei_add_test(cxx11_tensor_scan_gpu)\n# \tei_add_test(cxx11_tensor_device)\n\n# \tei_add_test(cxx11_tensor_gpu)\n# \tei_add_test(cxx11_tensor_contract_gpu)\n# \tei_add_test(cxx11_tensor_of_float16_gpu)\n# \tei_add_test(cxx11_tensor_random_gpu)\n\n# \tunset(EIGEN_ADD_TEST_FILENAME_EXTENSION)\n\n#       elseif (${HIP_PLATFORM} STREQUAL \"nvcc\")\n# \tmessage(FATAL_ERROR \"HIP_PLATFORM = nvcc is not supported within Eigen\")\n#       else ()\n# \tmessage(FATAL_ERROR \"Unknown HIP_PLATFORM = ${HIP_PLATFORM}\")\n#       endif()\n\n#     endif()\n\n#   else ()\n\n#     message(FATAL_ERROR \"EIGEN_TEST_HIP is ON, but the specified HIP_PATH (${HIP_PATH}) does not exist\")\n\n#   endif()\n\n# endif()\n\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/EulerAngles.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Tal Hadad <tal_hd@hotmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <unsupported/Eigen/EulerAngles>\n\nusing namespace Eigen;\n\n// Unfortunately, we need to specialize it in order to work. (We could add it in main.h test framework)\ntemplate <typename Scalar, class System>\nbool verifyIsApprox(const Eigen::EulerAngles<Scalar, System>& a, const Eigen::EulerAngles<Scalar, System>& b)\n{\n  return verifyIsApprox(a.angles(), b.angles());\n}\n\n// Verify that x is in the approxed range [a, b]\n#define VERIFY_APPROXED_RANGE(a, x, b) \\\n  do { \\\n  VERIFY_IS_APPROX_OR_LESS_THAN(a, x); \\\n  VERIFY_IS_APPROX_OR_LESS_THAN(x, b); \\\n  } while(0)\n\nconst char X = EULER_X;\nconst char Y = EULER_Y;\nconst char Z = EULER_Z;\n\ntemplate<typename Scalar, class EulerSystem>\nvoid verify_euler(const EulerAngles<Scalar, EulerSystem>& e)\n{\n  typedef EulerAngles<Scalar, EulerSystem> EulerAnglesType;\n  typedef Matrix<Scalar,3,3> Matrix3;\n  typedef Matrix<Scalar,3,1> Vector3;\n  typedef Quaternion<Scalar> QuaternionType;\n  typedef AngleAxis<Scalar> AngleAxisType;\n  \n  const Scalar ONE = Scalar(1);\n  const Scalar HALF_PI = Scalar(EIGEN_PI / 2);\n  const Scalar PI = Scalar(EIGEN_PI);\n  \n  // It's very important calc the acceptable precision depending on the distance from the pole.\n  const Scalar longitudeRadius = std::abs(\n    EulerSystem::IsTaitBryan ?\n    std::cos(e.beta()) :\n    std::sin(e.beta())\n    );\n  Scalar precision = test_precision<Scalar>() / longitudeRadius;\n  \n  Scalar betaRangeStart, betaRangeEnd;\n  if (EulerSystem::IsTaitBryan)\n  {\n    betaRangeStart = -HALF_PI;\n    betaRangeEnd = HALF_PI;\n  }\n  else\n  {\n    if (!EulerSystem::IsBetaOpposite)\n    {\n      betaRangeStart = 0;\n      betaRangeEnd = PI;\n    }\n    else\n    {\n      betaRangeStart = -PI;\n      betaRangeEnd = 0;\n    }\n  }\n  \n  const Vector3 I_ = EulerAnglesType::AlphaAxisVector();\n  const Vector3 J_ = EulerAnglesType::BetaAxisVector();\n  const Vector3 K_ = EulerAnglesType::GammaAxisVector();\n  \n  // Is approx checks\n  VERIFY(e.isApprox(e));\n  VERIFY_IS_APPROX(e, e);\n  VERIFY_IS_NOT_APPROX(e, EulerAnglesType(e.alpha() + ONE, e.beta() + ONE, e.gamma() + ONE));\n\n  const Matrix3 m(e);\n  VERIFY_IS_APPROX(Scalar(m.determinant()), ONE);\n\n  EulerAnglesType ebis(m);\n  \n  // When no roll(acting like polar representation), we have the best precision.\n  // One of those cases is when the Euler angles are on the pole, and because it's singular case,\n  //  the computation returns no roll.\n  if (ebis.beta() == 0)\n    precision = test_precision<Scalar>();\n  \n  // Check that eabis in range\n  VERIFY_APPROXED_RANGE(-PI, ebis.alpha(), PI);\n  VERIFY_APPROXED_RANGE(betaRangeStart, ebis.beta(), betaRangeEnd);\n  VERIFY_APPROXED_RANGE(-PI, ebis.gamma(), PI);\n\n  const Matrix3 mbis(AngleAxisType(ebis.alpha(), I_) * AngleAxisType(ebis.beta(), J_) * AngleAxisType(ebis.gamma(), K_));\n  VERIFY_IS_APPROX(Scalar(mbis.determinant()), ONE);\n  VERIFY_IS_APPROX(mbis, ebis.toRotationMatrix());\n  /*std::cout << \"===================\\n\" <<\n    \"e: \" << e << std::endl <<\n    \"eabis: \" << eabis.transpose() << std::endl <<\n    \"m: \" << m << std::endl <<\n    \"mbis: \" << mbis << std::endl <<\n    \"X: \" << (m * Vector3::UnitX()).transpose() << std::endl <<\n    \"X: \" << (mbis * Vector3::UnitX()).transpose() << std::endl;*/\n  VERIFY(m.isApprox(mbis, precision));\n\n  // Test if ea and eabis are the same\n  // Need to check both singular and non-singular cases\n  // There are two singular cases.\n  // 1. When I==K and sin(ea(1)) == 0\n  // 2. When I!=K and cos(ea(1)) == 0\n\n  // TODO: Make this test work well, and use range saturation function.\n  /*// If I==K, and ea[1]==0, then there no unique solution.\n  // The remark apply in the case where I!=K, and |ea[1]| is close to +-pi/2.\n  if( (i!=k || ea[1]!=0) && (i==k || !internal::isApprox(abs(ea[1]),Scalar(EIGEN_PI/2),test_precision<Scalar>())) ) \n      VERIFY_IS_APPROX(ea, eabis);*/\n  \n  // Quaternions\n  const QuaternionType q(e);\n  ebis = q;\n  const QuaternionType qbis(ebis);\n  VERIFY(internal::isApprox<Scalar>(std::abs(q.dot(qbis)), ONE, precision));\n  //VERIFY_IS_APPROX(eabis, eabis2);// Verify that the euler angles are still the same\n  \n  // A suggestion for simple product test when will be supported.\n  /*EulerAnglesType e2(PI/2, PI/2, PI/2);\n  Matrix3 m2(e2);\n  VERIFY_IS_APPROX(e*e2, m*m2);*/\n}\n\ntemplate<signed char A, signed char B, signed char C, typename Scalar>\nvoid verify_euler_vec(const Matrix<Scalar,3,1>& ea)\n{\n  verify_euler(EulerAngles<Scalar, EulerSystem<A, B, C> >(ea[0], ea[1], ea[2]));\n}\n\ntemplate<signed char A, signed char B, signed char C, typename Scalar>\nvoid verify_euler_all_neg(const Matrix<Scalar,3,1>& ea)\n{\n  verify_euler_vec<+A,+B,+C>(ea);\n  verify_euler_vec<+A,+B,-C>(ea);\n  verify_euler_vec<+A,-B,+C>(ea);\n  verify_euler_vec<+A,-B,-C>(ea);\n  \n  verify_euler_vec<-A,+B,+C>(ea);\n  verify_euler_vec<-A,+B,-C>(ea);\n  verify_euler_vec<-A,-B,+C>(ea);\n  verify_euler_vec<-A,-B,-C>(ea);\n}\n\ntemplate<typename Scalar> void check_all_var(const Matrix<Scalar,3,1>& ea)\n{\n  verify_euler_all_neg<X,Y,Z>(ea);\n  verify_euler_all_neg<X,Y,X>(ea);\n  verify_euler_all_neg<X,Z,Y>(ea);\n  verify_euler_all_neg<X,Z,X>(ea);\n  \n  verify_euler_all_neg<Y,Z,X>(ea);\n  verify_euler_all_neg<Y,Z,Y>(ea);\n  verify_euler_all_neg<Y,X,Z>(ea);\n  verify_euler_all_neg<Y,X,Y>(ea);\n  \n  verify_euler_all_neg<Z,X,Y>(ea);\n  verify_euler_all_neg<Z,X,Z>(ea);\n  verify_euler_all_neg<Z,Y,X>(ea);\n  verify_euler_all_neg<Z,Y,Z>(ea);\n}\n\ntemplate<typename Scalar> void check_singular_cases(const Scalar& singularBeta)\n{\n  typedef Matrix<Scalar,3,1> Vector3;\n  const Scalar PI = Scalar(EIGEN_PI);\n  \n  for (Scalar epsilon = NumTraits<Scalar>::epsilon(); epsilon < 1; epsilon *= Scalar(1.2))\n  {\n    check_all_var(Vector3(PI/4, singularBeta, PI/3));\n    check_all_var(Vector3(PI/4, singularBeta - epsilon, PI/3));\n    check_all_var(Vector3(PI/4, singularBeta - Scalar(1.5)*epsilon, PI/3));\n    check_all_var(Vector3(PI/4, singularBeta - 2*epsilon, PI/3));\n    check_all_var(Vector3(PI*Scalar(0.8), singularBeta - epsilon, Scalar(0.9)*PI));\n    check_all_var(Vector3(PI*Scalar(-0.9), singularBeta + epsilon, PI*Scalar(0.3)));\n    check_all_var(Vector3(PI*Scalar(-0.6), singularBeta + Scalar(1.5)*epsilon, PI*Scalar(0.3)));\n    check_all_var(Vector3(PI*Scalar(-0.5), singularBeta + 2*epsilon, PI*Scalar(0.4)));\n    check_all_var(Vector3(PI*Scalar(0.9), singularBeta + epsilon, Scalar(0.8)*PI));\n  }\n  \n  // This one for sanity, it had a problem with near pole cases in float scalar.\n  check_all_var(Vector3(PI*Scalar(0.8), singularBeta - Scalar(1E-6), Scalar(0.9)*PI));\n}\n\ntemplate<typename Scalar> void eulerangles_manual()\n{\n  typedef Matrix<Scalar,3,1> Vector3;\n  typedef Matrix<Scalar,Dynamic,1> VectorX;\n  const Vector3 Zero = Vector3::Zero();\n  const Scalar PI = Scalar(EIGEN_PI);\n  \n  check_all_var(Zero);\n  \n  // singular cases\n  check_singular_cases(PI/2);\n  check_singular_cases(-PI/2);\n  \n  check_singular_cases(Scalar(0));\n  check_singular_cases(Scalar(-0));\n  \n  check_singular_cases(PI);\n  check_singular_cases(-PI);\n  \n  // non-singular cases\n  VectorX alpha = VectorX::LinSpaced(20, Scalar(-0.99) * PI, PI);\n  VectorX beta =  VectorX::LinSpaced(20, Scalar(-0.49) * PI, Scalar(0.49) * PI);\n  VectorX gamma = VectorX::LinSpaced(20, Scalar(-0.99) * PI, PI);\n  for (int i = 0; i < alpha.size(); ++i) {\n    for (int j = 0; j < beta.size(); ++j) {\n      for (int k = 0; k < gamma.size(); ++k) {\n        check_all_var(Vector3(alpha(i), beta(j), gamma(k)));\n      }\n    }\n  }\n}\n\ntemplate<typename Scalar> void eulerangles_rand()\n{\n  typedef Matrix<Scalar,3,3> Matrix3;\n  typedef Matrix<Scalar,3,1> Vector3;\n  typedef Array<Scalar,3,1> Array3;\n  typedef Quaternion<Scalar> Quaternionx;\n  typedef AngleAxis<Scalar> AngleAxisType;\n\n  Scalar a = internal::random<Scalar>(-Scalar(EIGEN_PI), Scalar(EIGEN_PI));\n  Quaternionx q1;\n  q1 = AngleAxisType(a, Vector3::Random().normalized());\n  Matrix3 m;\n  m = q1;\n  \n  Vector3 ea = m.eulerAngles(0,1,2);\n  check_all_var(ea);\n  ea = m.eulerAngles(0,1,0);\n  check_all_var(ea);\n  \n  // Check with purely random Quaternion:\n  q1.coeffs() = Quaternionx::Coefficients::Random().normalized();\n  m = q1;\n  ea = m.eulerAngles(0,1,2);\n  check_all_var(ea);\n  ea = m.eulerAngles(0,1,0);\n  check_all_var(ea);\n  \n  // Check with random angles in range [0:pi]x[-pi:pi]x[-pi:pi].\n  ea = (Array3::Random() + Array3(1,0,0))*Scalar(EIGEN_PI)*Array3(0.5,1,1);\n  check_all_var(ea);\n  \n  ea[2] = ea[0] = internal::random<Scalar>(0,Scalar(EIGEN_PI));\n  check_all_var(ea);\n  \n  ea[0] = ea[1] = internal::random<Scalar>(0,Scalar(EIGEN_PI));\n  check_all_var(ea);\n  \n  ea[1] = 0;\n  check_all_var(ea);\n  \n  ea.head(2).setZero();\n  check_all_var(ea);\n  \n  ea.setZero();\n  check_all_var(ea);\n}\n\nEIGEN_DECLARE_TEST(EulerAngles)\n{\n  // Simple cast test\n  EulerAnglesXYZd onesEd(1, 1, 1);\n  EulerAnglesXYZf onesEf = onesEd.cast<float>();\n  VERIFY_IS_APPROX(onesEd, onesEf.cast<double>());\n\n  // Simple Construction from Vector3 test\n  VERIFY_IS_APPROX(onesEd, EulerAnglesXYZd(Vector3d::Ones()));\n  \n  CALL_SUBTEST_1( eulerangles_manual<float>() );\n  CALL_SUBTEST_2( eulerangles_manual<double>() );\n  \n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_3( eulerangles_rand<float>() );\n    CALL_SUBTEST_4( eulerangles_rand<double>() );\n  }\n  \n  // TODO: Add tests for auto diff\n  // TODO: Add tests for complex numbers\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/FFT.cpp",
    "content": "#define test_FFTW test_FFT\n#include \"FFTW.cpp\"\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/FFTW.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Mark Borgerding mark a borgerding net\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <unsupported/Eigen/FFT>\n\ntemplate <typename T> \nstd::complex<T> RandomCpx() { return std::complex<T>( (T)(rand()/(T)RAND_MAX - .5), (T)(rand()/(T)RAND_MAX - .5) ); }\n\nusing namespace std;\nusing namespace Eigen;\n\n\ntemplate < typename T>\ncomplex<long double>  promote(complex<T> x) { return complex<long double>((long double)x.real(),(long double)x.imag()); }\n\ncomplex<long double>  promote(float x) { return complex<long double>((long double)x); }\ncomplex<long double>  promote(double x) { return complex<long double>((long double)x); }\ncomplex<long double>  promote(long double x) { return complex<long double>((long double)x); }\n    \n\n    template <typename VT1,typename VT2>\n    long double fft_rmse( const VT1 & fftbuf,const VT2 & timebuf)\n    {\n        long double totalpower=0;\n        long double difpower=0;\n        long double pi = acos((long double)-1 );\n        for (size_t k0=0;k0<(size_t)fftbuf.size();++k0) {\n            complex<long double> acc = 0;\n            long double phinc = (long double)(-2.)*k0* pi / timebuf.size();\n            for (size_t k1=0;k1<(size_t)timebuf.size();++k1) {\n                acc +=  promote( timebuf[k1] ) * exp( complex<long double>(0,k1*phinc) );\n            }\n            totalpower += numext::abs2(acc);\n            complex<long double> x = promote(fftbuf[k0]); \n            complex<long double> dif = acc - x;\n            difpower += numext::abs2(dif);\n            //cerr << k0 << \"\\t\" << acc << \"\\t\" <<  x << \"\\t\" << sqrt(numext::abs2(dif)) << endl;\n        }\n        cerr << \"rmse:\" << sqrt(difpower/totalpower) << endl;\n        return sqrt(difpower/totalpower);\n    }\n\n    template <typename VT1,typename VT2>\n    long double dif_rmse( const VT1 buf1,const VT2 buf2)\n    {\n        long double totalpower=0;\n        long double difpower=0;\n        size_t n = (min)( buf1.size(),buf2.size() );\n        for (size_t k=0;k<n;++k) {\n            totalpower += (long double)((numext::abs2( buf1[k] ) + numext::abs2(buf2[k]) )/2);\n            difpower += (long double)(numext::abs2(buf1[k] - buf2[k]));\n        }\n        return sqrt(difpower/totalpower);\n    }\n\nenum { StdVectorContainer, EigenVectorContainer };\n\ntemplate<int Container, typename Scalar> struct VectorType;\n\ntemplate<typename Scalar> struct VectorType<StdVectorContainer,Scalar>\n{\n  typedef vector<Scalar> type;\n};\n\ntemplate<typename Scalar> struct VectorType<EigenVectorContainer,Scalar>\n{\n  typedef Matrix<Scalar,Dynamic,1> type;\n};\n\ntemplate <int Container, typename T>\nvoid test_scalar_generic(int nfft)\n{\n    typedef typename FFT<T>::Complex Complex;\n    typedef typename FFT<T>::Scalar Scalar;\n    typedef typename VectorType<Container,Scalar>::type ScalarVector;\n    typedef typename VectorType<Container,Complex>::type ComplexVector;\n\n    FFT<T> fft;\n    ScalarVector tbuf(nfft);\n    ComplexVector freqBuf;\n    for (int k=0;k<nfft;++k)\n        tbuf[k]= (T)( rand()/(double)RAND_MAX - .5);\n\n    // make sure it DOESN'T give the right full spectrum answer\n    // if we've asked for half-spectrum\n    fft.SetFlag(fft.HalfSpectrum );\n    fft.fwd( freqBuf,tbuf);\n    VERIFY((size_t)freqBuf.size() == (size_t)( (nfft>>1)+1) );\n    VERIFY( T(fft_rmse(freqBuf,tbuf)) < test_precision<T>()  );// gross check\n\n    fft.ClearFlag(fft.HalfSpectrum );\n    fft.fwd( freqBuf,tbuf);\n    VERIFY( (size_t)freqBuf.size() == (size_t)nfft);\n    VERIFY( T(fft_rmse(freqBuf,tbuf)) < test_precision<T>()  );// gross check\n\n    if (nfft&1)\n        return; // odd FFTs get the wrong size inverse FFT\n\n    ScalarVector tbuf2;\n    fft.inv( tbuf2 , freqBuf);\n    VERIFY( T(dif_rmse(tbuf,tbuf2)) < test_precision<T>()  );// gross check\n\n\n    // verify that the Unscaled flag takes effect\n    ScalarVector tbuf3;\n    fft.SetFlag(fft.Unscaled);\n\n    fft.inv( tbuf3 , freqBuf);\n\n    for (int k=0;k<nfft;++k)\n        tbuf3[k] *= T(1./nfft);\n\n\n    //for (size_t i=0;i<(size_t) tbuf.size();++i)\n    //    cout << \"freqBuf=\" << freqBuf[i] << \" in2=\" << tbuf3[i] << \" -  in=\" << tbuf[i] << \" => \" << (tbuf3[i] - tbuf[i] ) <<  endl;\n\n    VERIFY( T(dif_rmse(tbuf,tbuf3)) < test_precision<T>()  );// gross check\n\n    // verify that ClearFlag works\n    fft.ClearFlag(fft.Unscaled);\n    fft.inv( tbuf2 , freqBuf);\n    VERIFY( T(dif_rmse(tbuf,tbuf2)) < test_precision<T>()  );// gross check\n}\n\ntemplate <typename T>\nvoid test_scalar(int nfft)\n{\n  test_scalar_generic<StdVectorContainer,T>(nfft);\n  //test_scalar_generic<EigenVectorContainer,T>(nfft);\n}\n\n\ntemplate <int Container, typename T>\nvoid test_complex_generic(int nfft)\n{\n    typedef typename FFT<T>::Complex Complex;\n    typedef typename VectorType<Container,Complex>::type ComplexVector;\n\n    FFT<T> fft;\n\n    ComplexVector inbuf(nfft);\n    ComplexVector outbuf;\n    ComplexVector buf3;\n    for (int k=0;k<nfft;++k)\n        inbuf[k]= Complex( (T)(rand()/(double)RAND_MAX - .5), (T)(rand()/(double)RAND_MAX - .5) );\n    fft.fwd( outbuf , inbuf);\n\n    VERIFY( T(fft_rmse(outbuf,inbuf)) < test_precision<T>()  );// gross check\n    fft.inv( buf3 , outbuf);\n\n    VERIFY( T(dif_rmse(inbuf,buf3)) < test_precision<T>()  );// gross check\n\n    // verify that the Unscaled flag takes effect\n    ComplexVector buf4;\n    fft.SetFlag(fft.Unscaled);\n    fft.inv( buf4 , outbuf);\n    for (int k=0;k<nfft;++k)\n        buf4[k] *= T(1./nfft);\n    VERIFY( T(dif_rmse(inbuf,buf4)) < test_precision<T>()  );// gross check\n\n    // verify that ClearFlag works\n    fft.ClearFlag(fft.Unscaled);\n    fft.inv( buf3 , outbuf);\n    VERIFY( T(dif_rmse(inbuf,buf3)) < test_precision<T>()  );// gross check\n}\n\ntemplate <typename T>\nvoid test_complex(int nfft)\n{\n  test_complex_generic<StdVectorContainer,T>(nfft);\n  test_complex_generic<EigenVectorContainer,T>(nfft);\n}\n/*\ntemplate <typename T,int nrows,int ncols>\nvoid test_complex2d()\n{\n    typedef typename Eigen::FFT<T>::Complex Complex;\n    FFT<T> fft;\n    Eigen::Matrix<Complex,nrows,ncols> src,src2,dst,dst2;\n\n    src = Eigen::Matrix<Complex,nrows,ncols>::Random();\n    //src =  Eigen::Matrix<Complex,nrows,ncols>::Identity();\n\n    for (int k=0;k<ncols;k++) {\n        Eigen::Matrix<Complex,nrows,1> tmpOut;\n        fft.fwd( tmpOut,src.col(k) );\n        dst2.col(k) = tmpOut;\n    }\n\n    for (int k=0;k<nrows;k++) {\n        Eigen::Matrix<Complex,1,ncols> tmpOut;\n        fft.fwd( tmpOut,  dst2.row(k) );\n        dst2.row(k) = tmpOut;\n    }\n\n    fft.fwd2(dst.data(),src.data(),ncols,nrows);\n    fft.inv2(src2.data(),dst.data(),ncols,nrows);\n    VERIFY( (src-src2).norm() < test_precision<T>() );\n    VERIFY( (dst-dst2).norm() < test_precision<T>() );\n}\n*/\n\n\nvoid test_return_by_value(int len)\n{\n    VectorXf in;\n    VectorXf in1;\n    in.setRandom( len );\n    VectorXcf out1,out2;\n    FFT<float> fft;\n\n    fft.SetFlag(fft.HalfSpectrum );\n\n    fft.fwd(out1,in);\n    out2 = fft.fwd(in);\n    VERIFY( (out1-out2).norm() < test_precision<float>() );\n    in1 = fft.inv(out1);\n    VERIFY( (in1-in).norm() < test_precision<float>() );\n}\n\nEIGEN_DECLARE_TEST(FFTW)\n{\n  CALL_SUBTEST( test_return_by_value(32) );\n  //CALL_SUBTEST( ( test_complex2d<float,4,8> () ) ); CALL_SUBTEST( ( test_complex2d<double,4,8> () ) );\n  //CALL_SUBTEST( ( test_complex2d<long double,4,8> () ) );\n  CALL_SUBTEST( test_complex<float>(32) ); CALL_SUBTEST( test_complex<double>(32) ); \n  CALL_SUBTEST( test_complex<float>(256) ); CALL_SUBTEST( test_complex<double>(256) ); \n  CALL_SUBTEST( test_complex<float>(3*8) ); CALL_SUBTEST( test_complex<double>(3*8) ); \n  CALL_SUBTEST( test_complex<float>(5*32) ); CALL_SUBTEST( test_complex<double>(5*32) ); \n  CALL_SUBTEST( test_complex<float>(2*3*4) ); CALL_SUBTEST( test_complex<double>(2*3*4) ); \n  CALL_SUBTEST( test_complex<float>(2*3*4*5) ); CALL_SUBTEST( test_complex<double>(2*3*4*5) ); \n  CALL_SUBTEST( test_complex<float>(2*3*4*5*7) ); CALL_SUBTEST( test_complex<double>(2*3*4*5*7) ); \n\n  CALL_SUBTEST( test_scalar<float>(32) ); CALL_SUBTEST( test_scalar<double>(32) ); \n  CALL_SUBTEST( test_scalar<float>(45) ); CALL_SUBTEST( test_scalar<double>(45) ); \n  CALL_SUBTEST( test_scalar<float>(50) ); CALL_SUBTEST( test_scalar<double>(50) ); \n  CALL_SUBTEST( test_scalar<float>(256) ); CALL_SUBTEST( test_scalar<double>(256) ); \n  CALL_SUBTEST( test_scalar<float>(2*3*4*5*7) ); CALL_SUBTEST( test_scalar<double>(2*3*4*5*7) ); \n  \n  #ifdef EIGEN_HAS_FFTWL\n  CALL_SUBTEST( test_complex<long double>(32) );\n  CALL_SUBTEST( test_complex<long double>(256) );\n  CALL_SUBTEST( test_complex<long double>(3*8) );\n  CALL_SUBTEST( test_complex<long double>(5*32) );\n  CALL_SUBTEST( test_complex<long double>(2*3*4) );\n  CALL_SUBTEST( test_complex<long double>(2*3*4*5) );\n  CALL_SUBTEST( test_complex<long double>(2*3*4*5*7) );\n  \n  CALL_SUBTEST( test_scalar<long double>(32) );\n  CALL_SUBTEST( test_scalar<long double>(45) );\n  CALL_SUBTEST( test_scalar<long double>(50) );\n  CALL_SUBTEST( test_scalar<long double>(256) );\n  CALL_SUBTEST( test_scalar<long double>(2*3*4*5*7) );\n  #endif\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/NonLinearOptimization.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Thomas Capricelli <orzel@freehackers.org>\n\n#include <stdio.h>\n\n#include \"main.h\"\n#include <unsupported/Eigen/NonLinearOptimization>\n\n// This disables some useless Warnings on MSVC.\n// It is intended to be done for this test only.\n#include <Eigen/src/Core/util/DisableStupidWarnings.h>\n\n// tolerance for chekcing number of iterations\n#define LM_EVAL_COUNT_TOL 4/3\n\n#define LM_CHECK_N_ITERS(SOLVER,NFEV,NJEV) { \\\n            ++g_test_level; \\\n            VERIFY_IS_EQUAL(SOLVER.nfev, NFEV); \\\n            VERIFY_IS_EQUAL(SOLVER.njev, NJEV); \\\n            --g_test_level; \\\n            VERIFY(SOLVER.nfev <= NFEV * LM_EVAL_COUNT_TOL); \\\n            VERIFY(SOLVER.njev <= NJEV * LM_EVAL_COUNT_TOL); \\\n        }\n\nint fcn_chkder(const VectorXd &x, VectorXd &fvec, MatrixXd &fjac, int iflag)\n{\n    /*      subroutine fcn for chkder example. */\n\n    int i;\n    assert(15 ==  fvec.size());\n    assert(3 ==  x.size());\n    double tmp1, tmp2, tmp3, tmp4;\n    static const double y[15]={1.4e-1, 1.8e-1, 2.2e-1, 2.5e-1, 2.9e-1, 3.2e-1, 3.5e-1,\n        3.9e-1, 3.7e-1, 5.8e-1, 7.3e-1, 9.6e-1, 1.34, 2.1, 4.39};\n\n\n    if (iflag == 0)\n        return 0;\n\n    if (iflag != 2)\n        for (i=0; i<15; i++) {\n            tmp1 = i+1;\n            tmp2 = 16-i-1;\n            tmp3 = tmp1;\n            if (i >= 8) tmp3 = tmp2;\n            fvec[i] = y[i] - (x[0] + tmp1/(x[1]*tmp2 + x[2]*tmp3));\n        }\n    else {\n        for (i = 0; i < 15; i++) {\n            tmp1 = i+1;\n            tmp2 = 16-i-1;\n\n            /* error introduced into next statement for illustration. */\n            /* corrected statement should read    tmp3 = tmp1 . */\n\n            tmp3 = tmp2;\n            if (i >= 8) tmp3 = tmp2;\n            tmp4 = (x[1]*tmp2 + x[2]*tmp3); tmp4=tmp4*tmp4;\n            fjac(i,0) = -1.;\n            fjac(i,1) = tmp1*tmp2/tmp4;\n            fjac(i,2) = tmp1*tmp3/tmp4;\n        }\n    }\n    return 0;\n}\n\n\nvoid testChkder()\n{\n  const int m=15, n=3;\n  VectorXd x(n), fvec(m), xp, fvecp(m), err;\n  MatrixXd fjac(m,n);\n  VectorXi ipvt;\n\n  /*      the following values should be suitable for */\n  /*      checking the jacobian matrix. */\n  x << 9.2e-1, 1.3e-1, 5.4e-1;\n\n  internal::chkder(x, fvec, fjac, xp, fvecp, 1, err);\n  fcn_chkder(x, fvec, fjac, 1);\n  fcn_chkder(x, fvec, fjac, 2);\n  fcn_chkder(xp, fvecp, fjac, 1);\n  internal::chkder(x, fvec, fjac, xp, fvecp, 2, err);\n\n  fvecp -= fvec;\n\n  // check those\n  VectorXd fvec_ref(m), fvecp_ref(m), err_ref(m);\n  fvec_ref <<\n      -1.181606, -1.429655, -1.606344,\n      -1.745269, -1.840654, -1.921586,\n      -1.984141, -2.022537, -2.468977,\n      -2.827562, -3.473582, -4.437612,\n      -6.047662, -9.267761, -18.91806;\n  fvecp_ref <<\n      -7.724666e-09, -3.432406e-09, -2.034843e-10,\n      2.313685e-09,  4.331078e-09,  5.984096e-09,\n      7.363281e-09,   8.53147e-09,  1.488591e-08,\n      2.33585e-08,  3.522012e-08,  5.301255e-08,\n      8.26666e-08,  1.419747e-07,   3.19899e-07;\n  err_ref <<\n      0.1141397,  0.09943516,  0.09674474,\n      0.09980447,  0.1073116, 0.1220445,\n      0.1526814, 1, 1,\n      1, 1, 1,\n      1, 1, 1;\n\n  VERIFY_IS_APPROX(fvec, fvec_ref);\n  VERIFY_IS_APPROX(fvecp, fvecp_ref);\n  VERIFY_IS_APPROX(err, err_ref);\n}\n\n// Generic functor\ntemplate<typename _Scalar, int NX=Dynamic, int NY=Dynamic>\nstruct Functor\n{\n  typedef _Scalar Scalar;\n  enum {\n    InputsAtCompileTime = NX,\n    ValuesAtCompileTime = NY\n  };\n  typedef Matrix<Scalar,InputsAtCompileTime,1> InputType;\n  typedef Matrix<Scalar,ValuesAtCompileTime,1> ValueType;\n  typedef Matrix<Scalar,ValuesAtCompileTime,InputsAtCompileTime> JacobianType;\n\n  const int m_inputs, m_values;\n\n  Functor() : m_inputs(InputsAtCompileTime), m_values(ValuesAtCompileTime) {}\n  Functor(int inputs, int values) : m_inputs(inputs), m_values(values) {}\n\n  int inputs() const { return m_inputs; }\n  int values() const { return m_values; }\n\n  // you should define that in the subclass :\n//  void operator() (const InputType& x, ValueType* v, JacobianType* _j=0) const;\n};\n\nstruct lmder_functor : Functor<double>\n{\n    lmder_functor(void): Functor<double>(3,15) {}\n    int operator()(const VectorXd &x, VectorXd &fvec) const\n    {\n        double tmp1, tmp2, tmp3;\n        static const double y[15] = {1.4e-1, 1.8e-1, 2.2e-1, 2.5e-1, 2.9e-1, 3.2e-1, 3.5e-1,\n            3.9e-1, 3.7e-1, 5.8e-1, 7.3e-1, 9.6e-1, 1.34, 2.1, 4.39};\n\n        for (int i = 0; i < values(); i++)\n        {\n            tmp1 = i+1;\n            tmp2 = 16 - i - 1;\n            tmp3 = (i>=8)? tmp2 : tmp1;\n            fvec[i] = y[i] - (x[0] + tmp1/(x[1]*tmp2 + x[2]*tmp3));\n        }\n        return 0;\n    }\n\n    int df(const VectorXd &x, MatrixXd &fjac) const\n    {\n        double tmp1, tmp2, tmp3, tmp4;\n        for (int i = 0; i < values(); i++)\n        {\n            tmp1 = i+1;\n            tmp2 = 16 - i - 1;\n            tmp3 = (i>=8)? tmp2 : tmp1;\n            tmp4 = (x[1]*tmp2 + x[2]*tmp3); tmp4 = tmp4*tmp4;\n            fjac(i,0) = -1;\n            fjac(i,1) = tmp1*tmp2/tmp4;\n            fjac(i,2) = tmp1*tmp3/tmp4;\n        }\n        return 0;\n    }\n};\n\nvoid testLmder1()\n{\n  int n=3, info;\n\n  VectorXd x;\n\n  /* the following starting values provide a rough fit. */\n  x.setConstant(n, 1.);\n\n  // do the computation\n  lmder_functor functor;\n  LevenbergMarquardt<lmder_functor> lm(functor);\n  info = lm.lmder1(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  LM_CHECK_N_ITERS(lm, 6, 5);\n\n  // check norm\n  VERIFY_IS_APPROX(lm.fvec.blueNorm(), 0.09063596);\n\n  // check x\n  VectorXd x_ref(n);\n  x_ref << 0.08241058, 1.133037, 2.343695;\n  VERIFY_IS_APPROX(x, x_ref);\n}\n\nvoid testLmder()\n{\n  const int m=15, n=3;\n  int info;\n  double fnorm, covfac;\n  VectorXd x;\n\n  /* the following starting values provide a rough fit. */\n  x.setConstant(n, 1.);\n\n  // do the computation\n  lmder_functor functor;\n  LevenbergMarquardt<lmder_functor> lm(functor);\n  info = lm.minimize(x);\n\n  // check return values\n  VERIFY_IS_EQUAL(info, 1);\n  LM_CHECK_N_ITERS(lm, 6, 5);\n\n  // check norm\n  fnorm = lm.fvec.blueNorm();\n  VERIFY_IS_APPROX(fnorm, 0.09063596);\n\n  // check x\n  VectorXd x_ref(n);\n  x_ref << 0.08241058, 1.133037, 2.343695;\n  VERIFY_IS_APPROX(x, x_ref);\n\n  // check covariance\n  covfac = fnorm*fnorm/(m-n);\n  internal::covar(lm.fjac, lm.permutation.indices()); // TODO : move this as a function of lm\n\n  MatrixXd cov_ref(n,n);\n  cov_ref <<\n      0.0001531202,   0.002869941,  -0.002656662,\n      0.002869941,    0.09480935,   -0.09098995,\n      -0.002656662,   -0.09098995,    0.08778727;\n\n//  std::cout << fjac*covfac << std::endl;\n\n  MatrixXd cov;\n  cov =  covfac*lm.fjac.topLeftCorner<n,n>();\n  VERIFY_IS_APPROX( cov, cov_ref);\n  // TODO: why isn't this allowed ? :\n  // VERIFY_IS_APPROX( covfac*fjac.topLeftCorner<n,n>() , cov_ref);\n}\n\nstruct hybrj_functor : Functor<double>\n{\n    hybrj_functor(void) : Functor<double>(9,9) {}\n\n    int operator()(const VectorXd &x, VectorXd &fvec)\n    {\n        double temp, temp1, temp2;\n        const VectorXd::Index n = x.size();\n        assert(fvec.size()==n);\n        for (VectorXd::Index k = 0; k < n; k++)\n        {\n            temp = (3. - 2.*x[k])*x[k];\n            temp1 = 0.;\n            if (k) temp1 = x[k-1];\n            temp2 = 0.;\n            if (k != n-1) temp2 = x[k+1];\n            fvec[k] = temp - temp1 - 2.*temp2 + 1.;\n        }\n        return 0;\n    }\n    int df(const VectorXd &x, MatrixXd &fjac)\n    {\n        const VectorXd::Index n = x.size();\n        assert(fjac.rows()==n);\n        assert(fjac.cols()==n);\n        for (VectorXd::Index k = 0; k < n; k++)\n        {\n            for (VectorXd::Index j = 0; j < n; j++)\n                fjac(k,j) = 0.;\n            fjac(k,k) = 3.- 4.*x[k];\n            if (k) fjac(k,k-1) = -1.;\n            if (k != n-1) fjac(k,k+1) = -2.;\n        }\n        return 0;\n    }\n};\n\n\nvoid testHybrj1()\n{\n  const int n=9;\n  int info;\n  VectorXd x(n);\n\n  /* the following starting values provide a rough fit. */\n  x.setConstant(n, -1.);\n\n  // do the computation\n  hybrj_functor functor;\n  HybridNonLinearSolver<hybrj_functor> solver(functor);\n  info = solver.hybrj1(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  LM_CHECK_N_ITERS(solver, 11, 1);\n\n  // check norm\n  VERIFY_IS_APPROX(solver.fvec.blueNorm(), 1.192636e-08);\n\n\n// check x\n  VectorXd x_ref(n);\n  x_ref <<\n     -0.5706545,    -0.6816283,    -0.7017325,\n     -0.7042129,     -0.701369,    -0.6918656,\n     -0.665792,    -0.5960342,    -0.4164121;\n  VERIFY_IS_APPROX(x, x_ref);\n}\n\nvoid testHybrj()\n{\n  const int n=9;\n  int info;\n  VectorXd x(n);\n\n  /* the following starting values provide a rough fit. */\n  x.setConstant(n, -1.);\n\n\n  // do the computation\n  hybrj_functor functor;\n  HybridNonLinearSolver<hybrj_functor> solver(functor);\n  solver.diag.setConstant(n, 1.);\n  solver.useExternalScaling = true;\n  info = solver.solve(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  LM_CHECK_N_ITERS(solver, 11, 1);\n\n  // check norm\n  VERIFY_IS_APPROX(solver.fvec.blueNorm(), 1.192636e-08);\n\n\n// check x\n  VectorXd x_ref(n);\n  x_ref <<\n     -0.5706545,    -0.6816283,    -0.7017325,\n     -0.7042129,     -0.701369,    -0.6918656,\n     -0.665792,    -0.5960342,    -0.4164121;\n  VERIFY_IS_APPROX(x, x_ref);\n\n}\n\nstruct hybrd_functor : Functor<double>\n{\n    hybrd_functor(void) : Functor<double>(9,9) {}\n    int operator()(const VectorXd &x, VectorXd &fvec) const\n    {\n        double temp, temp1, temp2;\n        const VectorXd::Index n = x.size();\n\n        assert(fvec.size()==n);\n        for (VectorXd::Index k=0; k < n; k++)\n        {\n            temp = (3. - 2.*x[k])*x[k];\n            temp1 = 0.;\n            if (k) temp1 = x[k-1];\n            temp2 = 0.;\n            if (k != n-1) temp2 = x[k+1];\n            fvec[k] = temp - temp1 - 2.*temp2 + 1.;\n        }\n        return 0;\n    }\n};\n\nvoid testHybrd1()\n{\n  int n=9, info;\n  VectorXd x(n);\n\n  /* the following starting values provide a rough solution. */\n  x.setConstant(n, -1.);\n\n  // do the computation\n  hybrd_functor functor;\n  HybridNonLinearSolver<hybrd_functor> solver(functor);\n  info = solver.hybrd1(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  VERIFY_IS_EQUAL(solver.nfev, 20);\n\n  // check norm\n  VERIFY_IS_APPROX(solver.fvec.blueNorm(), 1.192636e-08);\n\n  // check x\n  VectorXd x_ref(n);\n  x_ref << -0.5706545, -0.6816283, -0.7017325, -0.7042129, -0.701369, -0.6918656, -0.665792, -0.5960342, -0.4164121;\n  VERIFY_IS_APPROX(x, x_ref);\n}\n\nvoid testHybrd()\n{\n  const int n=9;\n  int info;\n  VectorXd x;\n\n  /* the following starting values provide a rough fit. */\n  x.setConstant(n, -1.);\n\n  // do the computation\n  hybrd_functor functor;\n  HybridNonLinearSolver<hybrd_functor> solver(functor);\n  solver.parameters.nb_of_subdiagonals = 1;\n  solver.parameters.nb_of_superdiagonals = 1;\n  solver.diag.setConstant(n, 1.);\n  solver.useExternalScaling = true;\n  info = solver.solveNumericalDiff(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  VERIFY_IS_EQUAL(solver.nfev, 14);\n\n  // check norm\n  VERIFY_IS_APPROX(solver.fvec.blueNorm(), 1.192636e-08);\n\n  // check x\n  VectorXd x_ref(n);\n  x_ref <<\n      -0.5706545,    -0.6816283,    -0.7017325,\n      -0.7042129,     -0.701369,    -0.6918656,\n      -0.665792,    -0.5960342,    -0.4164121;\n  VERIFY_IS_APPROX(x, x_ref);\n}\n\nstruct lmstr_functor : Functor<double>\n{\n    lmstr_functor(void) : Functor<double>(3,15) {}\n    int operator()(const VectorXd &x, VectorXd &fvec)\n    {\n        /*  subroutine fcn for lmstr1 example. */\n        double tmp1, tmp2, tmp3;\n        static const double y[15]={1.4e-1, 1.8e-1, 2.2e-1, 2.5e-1, 2.9e-1, 3.2e-1, 3.5e-1,\n            3.9e-1, 3.7e-1, 5.8e-1, 7.3e-1, 9.6e-1, 1.34, 2.1, 4.39};\n\n        assert(15==fvec.size());\n        assert(3==x.size());\n\n        for (int i=0; i<15; i++)\n        {\n            tmp1 = i+1;\n            tmp2 = 16 - i - 1;\n            tmp3 = (i>=8)? tmp2 : tmp1;\n            fvec[i] = y[i] - (x[0] + tmp1/(x[1]*tmp2 + x[2]*tmp3));\n        }\n        return 0;\n    }\n    int df(const VectorXd &x, VectorXd &jac_row, VectorXd::Index rownb)\n    {\n        assert(x.size()==3);\n        assert(jac_row.size()==x.size());\n        double tmp1, tmp2, tmp3, tmp4;\n\n        VectorXd::Index i = rownb-2;\n        tmp1 = i+1;\n        tmp2 = 16 - i - 1;\n        tmp3 = (i>=8)? tmp2 : tmp1;\n        tmp4 = (x[1]*tmp2 + x[2]*tmp3); tmp4 = tmp4*tmp4;\n        jac_row[0] = -1;\n        jac_row[1] = tmp1*tmp2/tmp4;\n        jac_row[2] = tmp1*tmp3/tmp4;\n        return 0;\n    }\n};\n\nvoid testLmstr1()\n{\n  const int n=3;\n  int info;\n\n  VectorXd x(n);\n\n  /* the following starting values provide a rough fit. */\n  x.setConstant(n, 1.);\n\n  // do the computation\n  lmstr_functor functor;\n  LevenbergMarquardt<lmstr_functor> lm(functor);\n  info = lm.lmstr1(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  LM_CHECK_N_ITERS(lm, 6, 5);\n\n  // check norm\n  VERIFY_IS_APPROX(lm.fvec.blueNorm(), 0.09063596);\n\n  // check x\n  VectorXd x_ref(n);\n  x_ref << 0.08241058, 1.133037, 2.343695 ;\n  VERIFY_IS_APPROX(x, x_ref);\n}\n\nvoid testLmstr()\n{\n  const int n=3;\n  int info;\n  double fnorm;\n  VectorXd x(n);\n\n  /* the following starting values provide a rough fit. */\n  x.setConstant(n, 1.);\n\n  // do the computation\n  lmstr_functor functor;\n  LevenbergMarquardt<lmstr_functor> lm(functor);\n  info = lm.minimizeOptimumStorage(x);\n\n  // check return values\n  VERIFY_IS_EQUAL(info, 1);\n  LM_CHECK_N_ITERS(lm, 6, 5);\n\n  // check norm\n  fnorm = lm.fvec.blueNorm();\n  VERIFY_IS_APPROX(fnorm, 0.09063596);\n\n  // check x\n  VectorXd x_ref(n);\n  x_ref << 0.08241058, 1.133037, 2.343695;\n  VERIFY_IS_APPROX(x, x_ref);\n\n}\n\nstruct lmdif_functor : Functor<double>\n{\n    lmdif_functor(void) : Functor<double>(3,15) {}\n    int operator()(const VectorXd &x, VectorXd &fvec) const\n    {\n        int i;\n        double tmp1,tmp2,tmp3;\n        static const double y[15]={1.4e-1,1.8e-1,2.2e-1,2.5e-1,2.9e-1,3.2e-1,3.5e-1,3.9e-1,\n            3.7e-1,5.8e-1,7.3e-1,9.6e-1,1.34e0,2.1e0,4.39e0};\n\n        assert(x.size()==3);\n        assert(fvec.size()==15);\n        for (i=0; i<15; i++)\n        {\n            tmp1 = i+1;\n            tmp2 = 15 - i;\n            tmp3 = tmp1;\n\n            if (i >= 8) tmp3 = tmp2;\n            fvec[i] = y[i] - (x[0] + tmp1/(x[1]*tmp2 + x[2]*tmp3));\n        }\n        return 0;\n    }\n};\n\nvoid testLmdif1()\n{\n  const int n=3;\n  int info;\n\n  VectorXd x(n), fvec(15);\n\n  /* the following starting values provide a rough fit. */\n  x.setConstant(n, 1.);\n\n  // do the computation\n  lmdif_functor functor;\n  DenseIndex nfev = -1; // initialize to avoid maybe-uninitialized warning\n  info = LevenbergMarquardt<lmdif_functor>::lmdif1(functor, x, &nfev);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  VERIFY_IS_EQUAL(nfev, 26);\n\n  // check norm\n  functor(x, fvec);\n  VERIFY_IS_APPROX(fvec.blueNorm(), 0.09063596);\n\n  // check x\n  VectorXd x_ref(n);\n  x_ref << 0.0824106, 1.1330366, 2.3436947;\n  VERIFY_IS_APPROX(x, x_ref);\n\n}\n\nvoid testLmdif()\n{\n  const int m=15, n=3;\n  int info;\n  double fnorm, covfac;\n  VectorXd x(n);\n\n  /* the following starting values provide a rough fit. */\n  x.setConstant(n, 1.);\n\n  // do the computation\n  lmdif_functor functor;\n  NumericalDiff<lmdif_functor> numDiff(functor);\n  LevenbergMarquardt<NumericalDiff<lmdif_functor> > lm(numDiff);\n  info = lm.minimize(x);\n\n  // check return values\n  VERIFY_IS_EQUAL(info, 1);\n  VERIFY_IS_EQUAL(lm.nfev, 26);\n\n  // check norm\n  fnorm = lm.fvec.blueNorm();\n  VERIFY_IS_APPROX(fnorm, 0.09063596);\n\n  // check x\n  VectorXd x_ref(n);\n  x_ref << 0.08241058, 1.133037, 2.343695;\n  VERIFY_IS_APPROX(x, x_ref);\n\n  // check covariance\n  covfac = fnorm*fnorm/(m-n);\n  internal::covar(lm.fjac, lm.permutation.indices()); // TODO : move this as a function of lm\n\n  MatrixXd cov_ref(n,n);\n  cov_ref <<\n      0.0001531202,   0.002869942,  -0.002656662,\n      0.002869942,    0.09480937,   -0.09098997,\n      -0.002656662,   -0.09098997,    0.08778729;\n\n//  std::cout << fjac*covfac << std::endl;\n\n  MatrixXd cov;\n  cov =  covfac*lm.fjac.topLeftCorner<n,n>();\n  VERIFY_IS_APPROX( cov, cov_ref);\n  // TODO: why isn't this allowed ? :\n  // VERIFY_IS_APPROX( covfac*fjac.topLeftCorner<n,n>() , cov_ref);\n}\n\nstruct chwirut2_functor : Functor<double>\n{\n    chwirut2_functor(void) : Functor<double>(3,54) {}\n    static const double m_x[54];\n    static const double m_y[54];\n    int operator()(const VectorXd &b, VectorXd &fvec)\n    {\n        int i;\n\n        assert(b.size()==3);\n        assert(fvec.size()==54);\n        for(i=0; i<54; i++) {\n            double x = m_x[i];\n            fvec[i] = exp(-b[0]*x)/(b[1]+b[2]*x) - m_y[i];\n        }\n        return 0;\n    }\n    int df(const VectorXd &b, MatrixXd &fjac)\n    {\n        assert(b.size()==3);\n        assert(fjac.rows()==54);\n        assert(fjac.cols()==3);\n        for(int i=0; i<54; i++) {\n            double x = m_x[i];\n            double factor = 1./(b[1]+b[2]*x);\n            double e = exp(-b[0]*x);\n            fjac(i,0) = -x*e*factor;\n            fjac(i,1) = -e*factor*factor;\n            fjac(i,2) = -x*e*factor*factor;\n        }\n        return 0;\n    }\n};\nconst double chwirut2_functor::m_x[54] = { 0.500E0, 1.000E0, 1.750E0, 3.750E0, 5.750E0, 0.875E0, 2.250E0, 3.250E0, 5.250E0, 0.750E0, 1.750E0, 2.750E0, 4.750E0, 0.625E0, 1.250E0, 2.250E0, 4.250E0, .500E0, 3.000E0, .750E0, 3.000E0, 1.500E0, 6.000E0, 3.000E0, 6.000E0, 1.500E0, 3.000E0, .500E0, 2.000E0, 4.000E0, .750E0, 2.000E0, 5.000E0, .750E0, 2.250E0, 3.750E0, 5.750E0, 3.000E0, .750E0, 2.500E0, 4.000E0, .750E0, 2.500E0, 4.000E0, .750E0, 2.500E0, 4.000E0, .500E0, 6.000E0, 3.000E0, .500E0, 2.750E0, .500E0, 1.750E0};\nconst double chwirut2_functor::m_y[54] = { 92.9000E0 ,57.1000E0 ,31.0500E0 ,11.5875E0 ,8.0250E0 ,63.6000E0 ,21.4000E0 ,14.2500E0 ,8.4750E0 ,63.8000E0 ,26.8000E0 ,16.4625E0 ,7.1250E0 ,67.3000E0 ,41.0000E0 ,21.1500E0 ,8.1750E0 ,81.5000E0 ,13.1200E0 ,59.9000E0 ,14.6200E0 ,32.9000E0 ,5.4400E0 ,12.5600E0 ,5.4400E0 ,32.0000E0 ,13.9500E0 ,75.8000E0 ,20.0000E0 ,10.4200E0 ,59.5000E0 ,21.6700E0 ,8.5500E0 ,62.0000E0 ,20.2000E0 ,7.7600E0 ,3.7500E0 ,11.8100E0 ,54.7000E0 ,23.7000E0 ,11.5500E0 ,61.3000E0 ,17.7000E0 ,8.7400E0 ,59.2000E0 ,16.3000E0 ,8.6200E0 ,81.0000E0 ,4.8700E0 ,14.6200E0 ,81.7000E0 ,17.1700E0 ,81.3000E0 ,28.9000E0  };\n\n// http://www.itl.nist.gov/div898/strd/nls/data/chwirut2.shtml\nvoid testNistChwirut2(void)\n{\n  const int n=3;\n  int info;\n\n  VectorXd x(n);\n\n  /*\n   * First try\n   */\n  x<< 0.1, 0.01, 0.02;\n  // do the computation\n  chwirut2_functor functor;\n  LevenbergMarquardt<chwirut2_functor> lm(functor);\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  LM_CHECK_N_ITERS(lm, 10, 8);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec.squaredNorm(), 5.1304802941E+02);\n  // check x\n  VERIFY_IS_APPROX(x[0], 1.6657666537E-01);\n  VERIFY_IS_APPROX(x[1], 5.1653291286E-03);\n  VERIFY_IS_APPROX(x[2], 1.2150007096E-02);\n\n  /*\n   * Second try\n   */\n  x<< 0.15, 0.008, 0.010;\n  // do the computation\n  lm.resetParameters();\n  lm.parameters.ftol = 1.E6*NumTraits<double>::epsilon();\n  lm.parameters.xtol = 1.E6*NumTraits<double>::epsilon();\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  LM_CHECK_N_ITERS(lm, 7, 6);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec.squaredNorm(), 5.1304802941E+02);\n  // check x\n  VERIFY_IS_APPROX(x[0], 1.6657666537E-01);\n  VERIFY_IS_APPROX(x[1], 5.1653291286E-03);\n  VERIFY_IS_APPROX(x[2], 1.2150007096E-02);\n}\n\n\nstruct misra1a_functor : Functor<double>\n{\n    misra1a_functor(void) : Functor<double>(2,14) {}\n    static const double m_x[14];\n    static const double m_y[14];\n    int operator()(const VectorXd &b, VectorXd &fvec)\n    {\n        assert(b.size()==2);\n        assert(fvec.size()==14);\n        for(int i=0; i<14; i++) {\n            fvec[i] = b[0]*(1.-exp(-b[1]*m_x[i])) - m_y[i] ;\n        }\n        return 0;\n    }\n    int df(const VectorXd &b, MatrixXd &fjac)\n    {\n        assert(b.size()==2);\n        assert(fjac.rows()==14);\n        assert(fjac.cols()==2);\n        for(int i=0; i<14; i++) {\n            fjac(i,0) = (1.-exp(-b[1]*m_x[i]));\n            fjac(i,1) = (b[0]*m_x[i]*exp(-b[1]*m_x[i]));\n        }\n        return 0;\n    }\n};\nconst double misra1a_functor::m_x[14] = { 77.6E0, 114.9E0, 141.1E0, 190.8E0, 239.9E0, 289.0E0, 332.8E0, 378.4E0, 434.8E0, 477.3E0, 536.8E0, 593.1E0, 689.1E0, 760.0E0};\nconst double misra1a_functor::m_y[14] = { 10.07E0, 14.73E0, 17.94E0, 23.93E0, 29.61E0, 35.18E0, 40.02E0, 44.82E0, 50.76E0, 55.05E0, 61.01E0, 66.40E0, 75.47E0, 81.78E0};\n\n// http://www.itl.nist.gov/div898/strd/nls/data/misra1a.shtml\nvoid testNistMisra1a(void)\n{\n  const int n=2;\n  int info;\n\n  VectorXd x(n);\n\n  /*\n   * First try\n   */\n  x<< 500., 0.0001;\n  // do the computation\n  misra1a_functor functor;\n  LevenbergMarquardt<misra1a_functor> lm(functor);\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  LM_CHECK_N_ITERS(lm, 19, 15);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec.squaredNorm(), 1.2455138894E-01);\n  // check x\n  VERIFY_IS_APPROX(x[0], 2.3894212918E+02);\n  VERIFY_IS_APPROX(x[1], 5.5015643181E-04);\n\n  /*\n   * Second try\n   */\n  x<< 250., 0.0005;\n  // do the computation\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  LM_CHECK_N_ITERS(lm, 5, 4);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec.squaredNorm(), 1.2455138894E-01);\n  // check x\n  VERIFY_IS_APPROX(x[0], 2.3894212918E+02);\n  VERIFY_IS_APPROX(x[1], 5.5015643181E-04);\n}\n\nstruct hahn1_functor : Functor<double>\n{\n    hahn1_functor(void) : Functor<double>(7,236) {}\n    static const double m_x[236];\n    int operator()(const VectorXd &b, VectorXd &fvec)\n    {\n        static const double m_y[236] = { .591E0 , 1.547E0 , 2.902E0 , 2.894E0 , 4.703E0 , 6.307E0 , 7.03E0  , 7.898E0 , 9.470E0 , 9.484E0 , 10.072E0 , 10.163E0 , 11.615E0 , 12.005E0 , 12.478E0 , 12.982E0 , 12.970E0 , 13.926E0 , 14.452E0 , 14.404E0 , 15.190E0 , 15.550E0 , 15.528E0 , 15.499E0 , 16.131E0 , 16.438E0 , 16.387E0 , 16.549E0 , 16.872E0 , 16.830E0 , 16.926E0 , 16.907E0 , 16.966E0 , 17.060E0 , 17.122E0 , 17.311E0 , 17.355E0 , 17.668E0 , 17.767E0 , 17.803E0 , 17.765E0 , 17.768E0 , 17.736E0 , 17.858E0 , 17.877E0 , 17.912E0 , 18.046E0 , 18.085E0 , 18.291E0 , 18.357E0 , 18.426E0 , 18.584E0 , 18.610E0 , 18.870E0 , 18.795E0 , 19.111E0 , .367E0 , .796E0 , 0.892E0 , 1.903E0 , 2.150E0 , 3.697E0 , 5.870E0 , 6.421E0 , 7.422E0 , 9.944E0 , 11.023E0 , 11.87E0  , 12.786E0 , 14.067E0 , 13.974E0 , 14.462E0 , 14.464E0 , 15.381E0 , 15.483E0 , 15.59E0  , 16.075E0 , 16.347E0 , 16.181E0 , 16.915E0 , 17.003E0 , 16.978E0 , 17.756E0 , 17.808E0 , 17.868E0 , 18.481E0 , 18.486E0 , 19.090E0 , 16.062E0 , 16.337E0 , 16.345E0 ,\n        16.388E0 , 17.159E0 , 17.116E0 , 17.164E0 , 17.123E0 , 17.979E0 , 17.974E0 , 18.007E0 , 17.993E0 , 18.523E0 , 18.669E0 , 18.617E0 , 19.371E0 , 19.330E0 , 0.080E0 , 0.248E0 , 1.089E0 , 1.418E0 , 2.278E0 , 3.624E0 , 4.574E0 , 5.556E0 , 7.267E0 , 7.695E0 , 9.136E0 , 9.959E0 , 9.957E0 , 11.600E0 , 13.138E0 , 13.564E0 , 13.871E0 , 13.994E0 , 14.947E0 , 15.473E0 , 15.379E0 , 15.455E0 , 15.908E0 , 16.114E0 , 17.071E0 , 17.135E0 , 17.282E0 , 17.368E0 , 17.483E0 , 17.764E0 , 18.185E0 , 18.271E0 , 18.236E0 , 18.237E0 , 18.523E0 , 18.627E0 , 18.665E0 , 19.086E0 , 0.214E0 , 0.943E0 , 1.429E0 , 2.241E0 , 2.951E0 , 3.782E0 , 4.757E0 , 5.602E0 , 7.169E0 , 8.920E0 , 10.055E0 , 12.035E0 , 12.861E0 , 13.436E0 , 14.167E0 , 14.755E0 , 15.168E0 , 15.651E0 , 15.746E0 , 16.216E0 , 16.445E0 , 16.965E0 , 17.121E0 , 17.206E0 , 17.250E0 , 17.339E0 , 17.793E0 , 18.123E0 , 18.49E0  , 18.566E0 , 18.645E0 , 18.706E0 , 18.924E0 , 19.1E0   , 0.375E0 , 0.471E0 , 1.504E0 , 2.204E0 , 2.813E0 , 4.765E0 , 9.835E0 , 10.040E0 , 11.946E0 , 12.596E0 , \n13.303E0 , 13.922E0 , 14.440E0 , 14.951E0 , 15.627E0 , 15.639E0 , 15.814E0 , 16.315E0 , 16.334E0 , 16.430E0 , 16.423E0 , 17.024E0 , 17.009E0 , 17.165E0 , 17.134E0 , 17.349E0 , 17.576E0 , 17.848E0 , 18.090E0 , 18.276E0 , 18.404E0 , 18.519E0 , 19.133E0 , 19.074E0 , 19.239E0 , 19.280E0 , 19.101E0 , 19.398E0 , 19.252E0 , 19.89E0  , 20.007E0 , 19.929E0 , 19.268E0 , 19.324E0 , 20.049E0 , 20.107E0 , 20.062E0 , 20.065E0 , 19.286E0 , 19.972E0 , 20.088E0 , 20.743E0 , 20.83E0  , 20.935E0 , 21.035E0 , 20.93E0  , 21.074E0 , 21.085E0 , 20.935E0 };\n\n        //        int called=0; printf(\"call hahn1_functor with  iflag=%d, called=%d\\n\", iflag, called); if (iflag==1) called++;\n\n        assert(b.size()==7);\n        assert(fvec.size()==236);\n        for(int i=0; i<236; i++) {\n            double x=m_x[i], xx=x*x, xxx=xx*x;\n            fvec[i] = (b[0]+b[1]*x+b[2]*xx+b[3]*xxx) / (1.+b[4]*x+b[5]*xx+b[6]*xxx) - m_y[i];\n        }\n        return 0;\n    }\n\n    int df(const VectorXd &b, MatrixXd &fjac)\n    {\n        assert(b.size()==7);\n        assert(fjac.rows()==236);\n        assert(fjac.cols()==7);\n        for(int i=0; i<236; i++) {\n            double x=m_x[i], xx=x*x, xxx=xx*x;\n            double fact = 1./(1.+b[4]*x+b[5]*xx+b[6]*xxx);\n            fjac(i,0) = 1.*fact;\n            fjac(i,1) = x*fact;\n            fjac(i,2) = xx*fact;\n            fjac(i,3) = xxx*fact;\n            fact = - (b[0]+b[1]*x+b[2]*xx+b[3]*xxx) * fact * fact;\n            fjac(i,4) = x*fact;\n            fjac(i,5) = xx*fact;\n            fjac(i,6) = xxx*fact;\n        }\n        return 0;\n    }\n};\nconst double hahn1_functor::m_x[236] = { 24.41E0 , 34.82E0 , 44.09E0 , 45.07E0 , 54.98E0 , 65.51E0 , 70.53E0 , 75.70E0 , 89.57E0 , 91.14E0 , 96.40E0 , 97.19E0 , 114.26E0 , 120.25E0 , 127.08E0 , 133.55E0 , 133.61E0 , 158.67E0 , 172.74E0 , 171.31E0 , 202.14E0 , 220.55E0 , 221.05E0 , 221.39E0 , 250.99E0 , 268.99E0 , 271.80E0 , 271.97E0 , 321.31E0 , 321.69E0 , 330.14E0 , 333.03E0 , 333.47E0 , 340.77E0 , 345.65E0 , 373.11E0 , 373.79E0 , 411.82E0 , 419.51E0 , 421.59E0 , 422.02E0 , 422.47E0 , 422.61E0 , 441.75E0 , 447.41E0 , 448.7E0  , 472.89E0 , 476.69E0 , 522.47E0 , 522.62E0 , 524.43E0 , 546.75E0 , 549.53E0 , 575.29E0 , 576.00E0 , 625.55E0 , 20.15E0 , 28.78E0 , 29.57E0 , 37.41E0 , 39.12E0 , 50.24E0 , 61.38E0 , 66.25E0 , 73.42E0 , 95.52E0 , 107.32E0 , 122.04E0 , 134.03E0 , 163.19E0 , 163.48E0 , 175.70E0 , 179.86E0 , 211.27E0 , 217.78E0 , 219.14E0 , 262.52E0 , 268.01E0 , 268.62E0 , 336.25E0 , 337.23E0 , 339.33E0 , 427.38E0 , 428.58E0 , 432.68E0 , 528.99E0 , 531.08E0 , 628.34E0 , 253.24E0 , 273.13E0 , 273.66E0 ,\n282.10E0 , 346.62E0 , 347.19E0 , 348.78E0 , 351.18E0 , 450.10E0 , 450.35E0 , 451.92E0 , 455.56E0 , 552.22E0 , 553.56E0 , 555.74E0 , 652.59E0 , 656.20E0 , 14.13E0 , 20.41E0 , 31.30E0 , 33.84E0 , 39.70E0 , 48.83E0 , 54.50E0 , 60.41E0 , 72.77E0 , 75.25E0 , 86.84E0 , 94.88E0 , 96.40E0 , 117.37E0 , 139.08E0 , 147.73E0 , 158.63E0 , 161.84E0 , 192.11E0 , 206.76E0 , 209.07E0 , 213.32E0 , 226.44E0 , 237.12E0 , 330.90E0 , 358.72E0 , 370.77E0 , 372.72E0 , 396.24E0 , 416.59E0 , 484.02E0 , 495.47E0 , 514.78E0 , 515.65E0 , 519.47E0 , 544.47E0 , 560.11E0 , 620.77E0 , 18.97E0 , 28.93E0 , 33.91E0 , 40.03E0 , 44.66E0 , 49.87E0 , 55.16E0 , 60.90E0 , 72.08E0 , 85.15E0 , 97.06E0 , 119.63E0 , 133.27E0 , 143.84E0 , 161.91E0 , 180.67E0 , 198.44E0 , 226.86E0 , 229.65E0 , 258.27E0 , 273.77E0 , 339.15E0 , 350.13E0 , 362.75E0 , 371.03E0 , 393.32E0 , 448.53E0 , 473.78E0 , 511.12E0 , 524.70E0 , 548.75E0 , 551.64E0 , 574.02E0 , 623.86E0 , 21.46E0 , 24.33E0 , 33.43E0 , 39.22E0 , 44.18E0 , 55.02E0 , 94.33E0 , 96.44E0 , 118.82E0 , 128.48E0 ,\n141.94E0 , 156.92E0 , 171.65E0 , 190.00E0 , 223.26E0 , 223.88E0 , 231.50E0 , 265.05E0 , 269.44E0 , 271.78E0 , 273.46E0 , 334.61E0 , 339.79E0 , 349.52E0 , 358.18E0 , 377.98E0 , 394.77E0 , 429.66E0 , 468.22E0 , 487.27E0 , 519.54E0 , 523.03E0 , 612.99E0 , 638.59E0 , 641.36E0 , 622.05E0 , 631.50E0 , 663.97E0 , 646.9E0  , 748.29E0 , 749.21E0 , 750.14E0 , 647.04E0 , 646.89E0 , 746.9E0  , 748.43E0 , 747.35E0 , 749.27E0 , 647.61E0 , 747.78E0 , 750.51E0 , 851.37E0 , 845.97E0 , 847.54E0 , 849.93E0 , 851.61E0 , 849.75E0 , 850.98E0 , 848.23E0};\n\n// http://www.itl.nist.gov/div898/strd/nls/data/hahn1.shtml\nvoid testNistHahn1(void)\n{\n  const int  n=7;\n  int info;\n\n  VectorXd x(n);\n\n  /*\n   * First try\n   */\n  x<< 10., -1., .05, -.00001, -.05, .001, -.000001;\n  // do the computation\n  hahn1_functor functor;\n  LevenbergMarquardt<hahn1_functor> lm(functor);\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  LM_CHECK_N_ITERS(lm, 11, 10);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec.squaredNorm(), 1.5324382854E+00);\n  // check x\n  VERIFY_IS_APPROX(x[0], 1.0776351733E+00);\n  VERIFY_IS_APPROX(x[1],-1.2269296921E-01);\n  VERIFY_IS_APPROX(x[2], 4.0863750610E-03);\n  VERIFY_IS_APPROX(x[3],-1.426264e-06); // shoulde be : -1.4262662514E-06\n  VERIFY_IS_APPROX(x[4],-5.7609940901E-03);\n  VERIFY_IS_APPROX(x[5], 2.4053735503E-04);\n  VERIFY_IS_APPROX(x[6],-1.2314450199E-07);\n\n  /*\n   * Second try\n   */\n  x<< .1, -.1, .005, -.000001, -.005, .0001, -.0000001;\n  // do the computation\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  LM_CHECK_N_ITERS(lm, 11, 10);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec.squaredNorm(), 1.5324382854E+00);\n  // check x\n  VERIFY_IS_APPROX(x[0], 1.077640); // should be :  1.0776351733E+00\n  VERIFY_IS_APPROX(x[1], -0.1226933); // should be : -1.2269296921E-01\n  VERIFY_IS_APPROX(x[2], 0.004086383); // should be : 4.0863750610E-03\n  VERIFY_IS_APPROX(x[3], -1.426277e-06); // shoulde be : -1.4262662514E-06\n  VERIFY_IS_APPROX(x[4],-5.7609940901E-03);\n  VERIFY_IS_APPROX(x[5], 0.00024053772); // should be : 2.4053735503E-04\n  VERIFY_IS_APPROX(x[6], -1.231450e-07); // should be : -1.2314450199E-07\n\n}\n\nstruct misra1d_functor : Functor<double>\n{\n    misra1d_functor(void) : Functor<double>(2,14) {}\n    static const double x[14];\n    static const double y[14];\n    int operator()(const VectorXd &b, VectorXd &fvec)\n    {\n        assert(b.size()==2);\n        assert(fvec.size()==14);\n        for(int i=0; i<14; i++) {\n            fvec[i] = b[0]*b[1]*x[i]/(1.+b[1]*x[i]) - y[i];\n        }\n        return 0;\n    }\n    int df(const VectorXd &b, MatrixXd &fjac)\n    {\n        assert(b.size()==2);\n        assert(fjac.rows()==14);\n        assert(fjac.cols()==2);\n        for(int i=0; i<14; i++) {\n            double den = 1.+b[1]*x[i];\n            fjac(i,0) = b[1]*x[i] / den;\n            fjac(i,1) = b[0]*x[i]*(den-b[1]*x[i])/den/den;\n        }\n        return 0;\n    }\n};\nconst double misra1d_functor::x[14] = { 77.6E0, 114.9E0, 141.1E0, 190.8E0, 239.9E0, 289.0E0, 332.8E0, 378.4E0, 434.8E0, 477.3E0, 536.8E0, 593.1E0, 689.1E0, 760.0E0};\nconst double misra1d_functor::y[14] = { 10.07E0, 14.73E0, 17.94E0, 23.93E0, 29.61E0, 35.18E0, 40.02E0, 44.82E0, 50.76E0, 55.05E0, 61.01E0, 66.40E0, 75.47E0, 81.78E0};\n\n// http://www.itl.nist.gov/div898/strd/nls/data/misra1d.shtml\nvoid testNistMisra1d(void)\n{\n  const int n=2;\n  int info;\n\n  VectorXd x(n);\n\n  /*\n   * First try\n   */\n  x<< 500., 0.0001;\n  // do the computation\n  misra1d_functor functor;\n  LevenbergMarquardt<misra1d_functor> lm(functor);\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 3);\n  LM_CHECK_N_ITERS(lm, 9, 7);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec.squaredNorm(), 5.6419295283E-02);\n  // check x\n  VERIFY_IS_APPROX(x[0], 4.3736970754E+02);\n  VERIFY_IS_APPROX(x[1], 3.0227324449E-04);\n\n  /*\n   * Second try\n   */\n  x<< 450., 0.0003;\n  // do the computation\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  LM_CHECK_N_ITERS(lm, 4, 3);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec.squaredNorm(), 5.6419295283E-02);\n  // check x\n  VERIFY_IS_APPROX(x[0], 4.3736970754E+02);\n  VERIFY_IS_APPROX(x[1], 3.0227324449E-04);\n}\n\n\nstruct lanczos1_functor : Functor<double>\n{\n    lanczos1_functor(void) : Functor<double>(6,24) {}\n    static const double x[24];\n    static const double y[24];\n    int operator()(const VectorXd &b, VectorXd &fvec)\n    {\n        assert(b.size()==6);\n        assert(fvec.size()==24);\n        for(int i=0; i<24; i++)\n            fvec[i] = b[0]*exp(-b[1]*x[i]) + b[2]*exp(-b[3]*x[i]) + b[4]*exp(-b[5]*x[i])  - y[i];\n        return 0;\n    }\n    int df(const VectorXd &b, MatrixXd &fjac)\n    {\n        assert(b.size()==6);\n        assert(fjac.rows()==24);\n        assert(fjac.cols()==6);\n        for(int i=0; i<24; i++) {\n            fjac(i,0) = exp(-b[1]*x[i]);\n            fjac(i,1) = -b[0]*x[i]*exp(-b[1]*x[i]);\n            fjac(i,2) = exp(-b[3]*x[i]);\n            fjac(i,3) = -b[2]*x[i]*exp(-b[3]*x[i]);\n            fjac(i,4) = exp(-b[5]*x[i]);\n            fjac(i,5) = -b[4]*x[i]*exp(-b[5]*x[i]);\n        }\n        return 0;\n    }\n};\nconst double lanczos1_functor::x[24] = { 0.000000000000E+00, 5.000000000000E-02, 1.000000000000E-01, 1.500000000000E-01, 2.000000000000E-01, 2.500000000000E-01, 3.000000000000E-01, 3.500000000000E-01, 4.000000000000E-01, 4.500000000000E-01, 5.000000000000E-01, 5.500000000000E-01, 6.000000000000E-01, 6.500000000000E-01, 7.000000000000E-01, 7.500000000000E-01, 8.000000000000E-01, 8.500000000000E-01, 9.000000000000E-01, 9.500000000000E-01, 1.000000000000E+00, 1.050000000000E+00, 1.100000000000E+00, 1.150000000000E+00 };\nconst double lanczos1_functor::y[24] = { 2.513400000000E+00 ,2.044333373291E+00 ,1.668404436564E+00 ,1.366418021208E+00 ,1.123232487372E+00 ,9.268897180037E-01 ,7.679338563728E-01 ,6.388775523106E-01 ,5.337835317402E-01 ,4.479363617347E-01 ,3.775847884350E-01 ,3.197393199326E-01 ,2.720130773746E-01 ,2.324965529032E-01 ,1.996589546065E-01 ,1.722704126914E-01 ,1.493405660168E-01 ,1.300700206922E-01 ,1.138119324644E-01 ,1.000415587559E-01 ,8.833209084540E-02 ,7.833544019350E-02 ,6.976693743449E-02 ,6.239312536719E-02 };\n\n// http://www.itl.nist.gov/div898/strd/nls/data/lanczos1.shtml\nvoid testNistLanczos1(void)\n{\n  const int n=6;\n  int info;\n\n  VectorXd x(n);\n\n  /*\n   * First try\n   */\n  x<< 1.2, 0.3, 5.6, 5.5, 6.5, 7.6;\n  // do the computation\n  lanczos1_functor functor;\n  LevenbergMarquardt<lanczos1_functor> lm(functor);\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 2);\n  LM_CHECK_N_ITERS(lm, 79, 72);\n  // check norm^2\n  std::cout.precision(30);\n  std::cout << lm.fvec.squaredNorm() << \"\\n\";\n  VERIFY(lm.fvec.squaredNorm() <= 1.4307867721E-25);\n  // check x\n  VERIFY_IS_APPROX(x[0], 9.5100000027E-02);\n  VERIFY_IS_APPROX(x[1], 1.0000000001E+00);\n  VERIFY_IS_APPROX(x[2], 8.6070000013E-01);\n  VERIFY_IS_APPROX(x[3], 3.0000000002E+00);\n  VERIFY_IS_APPROX(x[4], 1.5575999998E+00);\n  VERIFY_IS_APPROX(x[5], 5.0000000001E+00);\n\n  /*\n   * Second try\n   */\n  x<< 0.5, 0.7, 3.6, 4.2, 4., 6.3;\n  // do the computation\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 2);\n  LM_CHECK_N_ITERS(lm, 9, 8);\n  // check norm^2\n  VERIFY(lm.fvec.squaredNorm() <= 1.4307867721E-25);\n  // check x\n  VERIFY_IS_APPROX(x[0], 9.5100000027E-02);\n  VERIFY_IS_APPROX(x[1], 1.0000000001E+00);\n  VERIFY_IS_APPROX(x[2], 8.6070000013E-01);\n  VERIFY_IS_APPROX(x[3], 3.0000000002E+00);\n  VERIFY_IS_APPROX(x[4], 1.5575999998E+00);\n  VERIFY_IS_APPROX(x[5], 5.0000000001E+00);\n\n}\n\nstruct rat42_functor : Functor<double>\n{\n    rat42_functor(void) : Functor<double>(3,9) {}\n    static const double x[9];\n    static const double y[9];\n    int operator()(const VectorXd &b, VectorXd &fvec)\n    {\n        assert(b.size()==3);\n        assert(fvec.size()==9);\n        for(int i=0; i<9; i++) {\n            fvec[i] = b[0] / (1.+exp(b[1]-b[2]*x[i])) - y[i];\n        }\n        return 0;\n    }\n\n    int df(const VectorXd &b, MatrixXd &fjac)\n    {\n        assert(b.size()==3);\n        assert(fjac.rows()==9);\n        assert(fjac.cols()==3);\n        for(int i=0; i<9; i++) {\n            double e = exp(b[1]-b[2]*x[i]);\n            fjac(i,0) = 1./(1.+e);\n            fjac(i,1) = -b[0]*e/(1.+e)/(1.+e);\n            fjac(i,2) = +b[0]*e*x[i]/(1.+e)/(1.+e);\n        }\n        return 0;\n    }\n};\nconst double rat42_functor::x[9] = { 9.000E0, 14.000E0, 21.000E0, 28.000E0, 42.000E0, 57.000E0, 63.000E0, 70.000E0, 79.000E0 };\nconst double rat42_functor::y[9] = { 8.930E0 ,10.800E0 ,18.590E0 ,22.330E0 ,39.350E0 ,56.110E0 ,61.730E0 ,64.620E0 ,67.080E0 };\n\n// http://www.itl.nist.gov/div898/strd/nls/data/ratkowsky2.shtml\nvoid testNistRat42(void)\n{\n  const int n=3;\n  int info;\n\n  VectorXd x(n);\n\n  /*\n   * First try\n   */\n  x<< 100., 1., 0.1;\n  // do the computation\n  rat42_functor functor;\n  LevenbergMarquardt<rat42_functor> lm(functor);\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  LM_CHECK_N_ITERS(lm, 10, 8);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec.squaredNorm(), 8.0565229338E+00);\n  // check x\n  VERIFY_IS_APPROX(x[0], 7.2462237576E+01);\n  VERIFY_IS_APPROX(x[1], 2.6180768402E+00);\n  VERIFY_IS_APPROX(x[2], 6.7359200066E-02);\n\n  /*\n   * Second try\n   */\n  x<< 75., 2.5, 0.07;\n  // do the computation\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  LM_CHECK_N_ITERS(lm, 6, 5);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec.squaredNorm(), 8.0565229338E+00);\n  // check x\n  VERIFY_IS_APPROX(x[0], 7.2462237576E+01);\n  VERIFY_IS_APPROX(x[1], 2.6180768402E+00);\n  VERIFY_IS_APPROX(x[2], 6.7359200066E-02);\n}\n\nstruct MGH10_functor : Functor<double>\n{\n    MGH10_functor(void) : Functor<double>(3,16) {}\n    static const double x[16];\n    static const double y[16];\n    int operator()(const VectorXd &b, VectorXd &fvec)\n    {\n        assert(b.size()==3);\n        assert(fvec.size()==16);\n        for(int i=0; i<16; i++)\n            fvec[i] =  b[0] * exp(b[1]/(x[i]+b[2])) - y[i];\n        return 0;\n    }\n    int df(const VectorXd &b, MatrixXd &fjac)\n    {\n        assert(b.size()==3);\n        assert(fjac.rows()==16);\n        assert(fjac.cols()==3);\n        for(int i=0; i<16; i++) {\n            double factor = 1./(x[i]+b[2]);\n            double e = exp(b[1]*factor);\n            fjac(i,0) = e;\n            fjac(i,1) = b[0]*factor*e;\n            fjac(i,2) = -b[1]*b[0]*factor*factor*e;\n        }\n        return 0;\n    }\n};\nconst double MGH10_functor::x[16] = { 5.000000E+01, 5.500000E+01, 6.000000E+01, 6.500000E+01, 7.000000E+01, 7.500000E+01, 8.000000E+01, 8.500000E+01, 9.000000E+01, 9.500000E+01, 1.000000E+02, 1.050000E+02, 1.100000E+02, 1.150000E+02, 1.200000E+02, 1.250000E+02 };\nconst double MGH10_functor::y[16] = { 3.478000E+04, 2.861000E+04, 2.365000E+04, 1.963000E+04, 1.637000E+04, 1.372000E+04, 1.154000E+04, 9.744000E+03, 8.261000E+03, 7.030000E+03, 6.005000E+03, 5.147000E+03, 4.427000E+03, 3.820000E+03, 3.307000E+03, 2.872000E+03 };\n\n// http://www.itl.nist.gov/div898/strd/nls/data/mgh10.shtml\nvoid testNistMGH10(void)\n{\n  const int n=3;\n  int info;\n\n  VectorXd x(n);\n\n  /*\n   * First try\n   */\n  x<< 2., 400000., 25000.;\n  // do the computation\n  MGH10_functor functor;\n  LevenbergMarquardt<MGH10_functor> lm(functor);\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 2); \n  LM_CHECK_N_ITERS(lm, 284, 249); \n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec.squaredNorm(), 8.7945855171E+01);\n  // check x\n  VERIFY_IS_APPROX(x[0], 5.6096364710E-03);\n  VERIFY_IS_APPROX(x[1], 6.1813463463E+03);\n  VERIFY_IS_APPROX(x[2], 3.4522363462E+02);\n\n  /*\n   * Second try\n   */\n  x<< 0.02, 4000., 250.;\n  // do the computation\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 3);\n  LM_CHECK_N_ITERS(lm, 126, 116);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec.squaredNorm(), 8.7945855171E+01);\n  // check x\n  VERIFY_IS_APPROX(x[0], 5.6096364710E-03);\n  VERIFY_IS_APPROX(x[1], 6.1813463463E+03);\n  VERIFY_IS_APPROX(x[2], 3.4522363462E+02);\n}\n\n\nstruct BoxBOD_functor : Functor<double>\n{\n    BoxBOD_functor(void) : Functor<double>(2,6) {}\n    static const double x[6];\n    int operator()(const VectorXd &b, VectorXd &fvec)\n    {\n        static const double y[6] = { 109., 149., 149., 191., 213., 224. };\n        assert(b.size()==2);\n        assert(fvec.size()==6);\n        for(int i=0; i<6; i++)\n            fvec[i] =  b[0]*(1.-exp(-b[1]*x[i])) - y[i];\n        return 0;\n    }\n    int df(const VectorXd &b, MatrixXd &fjac)\n    {\n        assert(b.size()==2);\n        assert(fjac.rows()==6);\n        assert(fjac.cols()==2);\n        for(int i=0; i<6; i++) {\n            double e = exp(-b[1]*x[i]);\n            fjac(i,0) = 1.-e;\n            fjac(i,1) = b[0]*x[i]*e;\n        }\n        return 0;\n    }\n};\nconst double BoxBOD_functor::x[6] = { 1., 2., 3., 5., 7., 10. };\n\n// http://www.itl.nist.gov/div898/strd/nls/data/boxbod.shtml\nvoid testNistBoxBOD(void)\n{\n  const int n=2;\n  int info;\n\n  VectorXd x(n);\n\n  /*\n   * First try\n   */\n  x<< 1., 1.;\n  // do the computation\n  BoxBOD_functor functor;\n  LevenbergMarquardt<BoxBOD_functor> lm(functor);\n  lm.parameters.ftol = 1.E6*NumTraits<double>::epsilon();\n  lm.parameters.xtol = 1.E6*NumTraits<double>::epsilon();\n  lm.parameters.factor = 10.;\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  LM_CHECK_N_ITERS(lm, 31, 25);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec.squaredNorm(), 1.1680088766E+03);\n  // check x\n  VERIFY_IS_APPROX(x[0], 2.1380940889E+02);\n  VERIFY_IS_APPROX(x[1], 5.4723748542E-01);\n\n  /*\n   * Second try\n   */\n  x<< 100., 0.75;\n  // do the computation\n  lm.resetParameters();\n  lm.parameters.ftol = NumTraits<double>::epsilon();\n  lm.parameters.xtol = NumTraits<double>::epsilon();\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  LM_CHECK_N_ITERS(lm, 15, 14);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec.squaredNorm(), 1.1680088766E+03);\n  // check x\n  VERIFY_IS_APPROX(x[0], 2.1380940889E+02);\n  VERIFY_IS_APPROX(x[1], 5.4723748542E-01);\n}\n\nstruct MGH17_functor : Functor<double>\n{\n    MGH17_functor(void) : Functor<double>(5,33) {}\n    static const double x[33];\n    static const double y[33];\n    int operator()(const VectorXd &b, VectorXd &fvec)\n    {\n        assert(b.size()==5);\n        assert(fvec.size()==33);\n        for(int i=0; i<33; i++)\n            fvec[i] =  b[0] + b[1]*exp(-b[3]*x[i]) +  b[2]*exp(-b[4]*x[i]) - y[i];\n        return 0;\n    }\n    int df(const VectorXd &b, MatrixXd &fjac)\n    {\n        assert(b.size()==5);\n        assert(fjac.rows()==33);\n        assert(fjac.cols()==5);\n        for(int i=0; i<33; i++) {\n            fjac(i,0) = 1.;\n            fjac(i,1) = exp(-b[3]*x[i]);\n            fjac(i,2) = exp(-b[4]*x[i]);\n            fjac(i,3) = -x[i]*b[1]*exp(-b[3]*x[i]);\n            fjac(i,4) = -x[i]*b[2]*exp(-b[4]*x[i]);\n        }\n        return 0;\n    }\n};\nconst double MGH17_functor::x[33] = { 0.000000E+00, 1.000000E+01, 2.000000E+01, 3.000000E+01, 4.000000E+01, 5.000000E+01, 6.000000E+01, 7.000000E+01, 8.000000E+01, 9.000000E+01, 1.000000E+02, 1.100000E+02, 1.200000E+02, 1.300000E+02, 1.400000E+02, 1.500000E+02, 1.600000E+02, 1.700000E+02, 1.800000E+02, 1.900000E+02, 2.000000E+02, 2.100000E+02, 2.200000E+02, 2.300000E+02, 2.400000E+02, 2.500000E+02, 2.600000E+02, 2.700000E+02, 2.800000E+02, 2.900000E+02, 3.000000E+02, 3.100000E+02, 3.200000E+02 };\nconst double MGH17_functor::y[33] = { 8.440000E-01, 9.080000E-01, 9.320000E-01, 9.360000E-01, 9.250000E-01, 9.080000E-01, 8.810000E-01, 8.500000E-01, 8.180000E-01, 7.840000E-01, 7.510000E-01, 7.180000E-01, 6.850000E-01, 6.580000E-01, 6.280000E-01, 6.030000E-01, 5.800000E-01, 5.580000E-01, 5.380000E-01, 5.220000E-01, 5.060000E-01, 4.900000E-01, 4.780000E-01, 4.670000E-01, 4.570000E-01, 4.480000E-01, 4.380000E-01, 4.310000E-01, 4.240000E-01, 4.200000E-01, 4.140000E-01, 4.110000E-01, 4.060000E-01 };\n\n// http://www.itl.nist.gov/div898/strd/nls/data/mgh17.shtml\nvoid testNistMGH17(void)\n{\n  const int n=5;\n  int info;\n\n  VectorXd x(n);\n\n  /*\n   * First try\n   */\n  x<< 50., 150., -100., 1., 2.;\n  // do the computation\n  MGH17_functor functor;\n  LevenbergMarquardt<MGH17_functor> lm(functor);\n  lm.parameters.ftol = NumTraits<double>::epsilon();\n  lm.parameters.xtol = NumTraits<double>::epsilon();\n  lm.parameters.maxfev = 1000;\n  info = lm.minimize(x);\n\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec.squaredNorm(), 5.4648946975E-05);\n  // check x\n  VERIFY_IS_APPROX(x[0], 3.7541005211E-01);\n  VERIFY_IS_APPROX(x[1], 1.9358469127E+00);\n  VERIFY_IS_APPROX(x[2], -1.4646871366E+00);\n  VERIFY_IS_APPROX(x[3], 1.2867534640E-02);\n  VERIFY_IS_APPROX(x[4], 2.2122699662E-02);\n  \n  // check return value\n  VERIFY_IS_EQUAL(info, 2); \n  LM_CHECK_N_ITERS(lm, 602, 545);\n\n  /*\n   * Second try\n   */\n  x<< 0.5  ,1.5  ,-1   ,0.01 ,0.02;\n  // do the computation\n  lm.resetParameters();\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  LM_CHECK_N_ITERS(lm, 18, 15);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec.squaredNorm(), 5.4648946975E-05);\n  // check x\n  VERIFY_IS_APPROX(x[0], 3.7541005211E-01);\n  VERIFY_IS_APPROX(x[1], 1.9358469127E+00);\n  VERIFY_IS_APPROX(x[2], -1.4646871366E+00);\n  VERIFY_IS_APPROX(x[3], 1.2867534640E-02);\n  VERIFY_IS_APPROX(x[4], 2.2122699662E-02);\n}\n\nstruct MGH09_functor : Functor<double>\n{\n    MGH09_functor(void) : Functor<double>(4,11) {}\n    static const double _x[11];\n    static const double y[11];\n    int operator()(const VectorXd &b, VectorXd &fvec)\n    {\n        assert(b.size()==4);\n        assert(fvec.size()==11);\n        for(int i=0; i<11; i++) {\n            double x = _x[i], xx=x*x;\n            fvec[i] = b[0]*(xx+x*b[1])/(xx+x*b[2]+b[3]) - y[i];\n        }\n        return 0;\n    }\n    int df(const VectorXd &b, MatrixXd &fjac)\n    {\n        assert(b.size()==4);\n        assert(fjac.rows()==11);\n        assert(fjac.cols()==4);\n        for(int i=0; i<11; i++) {\n            double x = _x[i], xx=x*x;\n            double factor = 1./(xx+x*b[2]+b[3]);\n            fjac(i,0) = (xx+x*b[1]) * factor;\n            fjac(i,1) = b[0]*x* factor;\n            fjac(i,2) = - b[0]*(xx+x*b[1]) * x * factor * factor;\n            fjac(i,3) = - b[0]*(xx+x*b[1]) * factor * factor;\n        }\n        return 0;\n    }\n};\nconst double MGH09_functor::_x[11] = { 4., 2., 1., 5.E-1 , 2.5E-01, 1.670000E-01, 1.250000E-01,  1.E-01, 8.330000E-02, 7.140000E-02, 6.250000E-02 };\nconst double MGH09_functor::y[11] = { 1.957000E-01, 1.947000E-01, 1.735000E-01, 1.600000E-01, 8.440000E-02, 6.270000E-02, 4.560000E-02, 3.420000E-02, 3.230000E-02, 2.350000E-02, 2.460000E-02 };\n\n// http://www.itl.nist.gov/div898/strd/nls/data/mgh09.shtml\nvoid testNistMGH09(void)\n{\n  const int n=4;\n  int info;\n\n  VectorXd x(n);\n\n  /*\n   * First try\n   */\n  x<< 25., 39, 41.5, 39.;\n  // do the computation\n  MGH09_functor functor;\n  LevenbergMarquardt<MGH09_functor> lm(functor);\n  lm.parameters.maxfev = 1000;\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  LM_CHECK_N_ITERS(lm, 490, 376);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec.squaredNorm(), 3.0750560385E-04);\n  // check x\n  VERIFY_IS_APPROX(x[0], 0.1928077089); // should be 1.9280693458E-01\n  VERIFY_IS_APPROX(x[1], 0.19126423573); // should be 1.9128232873E-01\n  VERIFY_IS_APPROX(x[2], 0.12305309914); // should be 1.2305650693E-01\n  VERIFY_IS_APPROX(x[3], 0.13605395375); // should be 1.3606233068E-01\n\n  /*\n   * Second try\n   */\n  x<< 0.25, 0.39, 0.415, 0.39;\n  // do the computation\n  lm.resetParameters();\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  LM_CHECK_N_ITERS(lm, 18, 16);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec.squaredNorm(), 3.0750560385E-04);\n  // check x\n  VERIFY_IS_APPROX(x[0], 0.19280781); // should be 1.9280693458E-01\n  VERIFY_IS_APPROX(x[1], 0.19126265); // should be 1.9128232873E-01\n  VERIFY_IS_APPROX(x[2], 0.12305280); // should be 1.2305650693E-01\n  VERIFY_IS_APPROX(x[3], 0.13605322); // should be 1.3606233068E-01\n}\n\n\n\nstruct Bennett5_functor : Functor<double>\n{\n    Bennett5_functor(void) : Functor<double>(3,154) {}\n    static const double x[154];\n    static const double y[154];\n    int operator()(const VectorXd &b, VectorXd &fvec)\n    {\n        assert(b.size()==3);\n        assert(fvec.size()==154);\n        for(int i=0; i<154; i++)\n            fvec[i] = b[0]* pow(b[1]+x[i],-1./b[2]) - y[i];\n        return 0;\n    }\n    int df(const VectorXd &b, MatrixXd &fjac)\n    {\n        assert(b.size()==3);\n        assert(fjac.rows()==154);\n        assert(fjac.cols()==3);\n        for(int i=0; i<154; i++) {\n            double e = pow(b[1]+x[i],-1./b[2]);\n            fjac(i,0) = e;\n            fjac(i,1) = - b[0]*e/b[2]/(b[1]+x[i]);\n            fjac(i,2) = b[0]*e*log(b[1]+x[i])/b[2]/b[2];\n        }\n        return 0;\n    }\n};\nconst double Bennett5_functor::x[154] = { 7.447168E0, 8.102586E0, 8.452547E0, 8.711278E0, 8.916774E0, 9.087155E0, 9.232590E0, 9.359535E0, 9.472166E0, 9.573384E0, 9.665293E0, 9.749461E0, 9.827092E0, 9.899128E0, 9.966321E0, 10.029280E0, 10.088510E0, 10.144430E0, 10.197380E0, 10.247670E0, 10.295560E0, 10.341250E0, 10.384950E0, 10.426820E0, 10.467000E0, 10.505640E0, 10.542830E0, 10.578690E0, 10.613310E0, 10.646780E0, 10.679150E0, 10.710520E0, 10.740920E0, 10.770440E0, 10.799100E0, 10.826970E0, 10.854080E0, 10.880470E0, 10.906190E0, 10.931260E0, 10.955720E0, 10.979590E0, 11.002910E0, 11.025700E0, 11.047980E0, 11.069770E0, 11.091100E0, 11.111980E0, 11.132440E0, 11.152480E0, 11.172130E0, 11.191410E0, 11.210310E0, 11.228870E0, 11.247090E0, 11.264980E0, 11.282560E0, 11.299840E0, 11.316820E0, 11.333520E0, 11.349940E0, 11.366100E0, 11.382000E0, 11.397660E0, 11.413070E0, 11.428240E0, 11.443200E0, 11.457930E0, 11.472440E0, 11.486750E0, 11.500860E0, 11.514770E0, 11.528490E0, 11.542020E0, 11.555380E0, 11.568550E0,\n11.581560E0, 11.594420E0, 11.607121E0, 11.619640E0, 11.632000E0, 11.644210E0, 11.656280E0, 11.668200E0, 11.679980E0, 11.691620E0, 11.703130E0, 11.714510E0, 11.725760E0, 11.736880E0, 11.747890E0, 11.758780E0, 11.769550E0, 11.780200E0, 11.790730E0, 11.801160E0, 11.811480E0, 11.821700E0, 11.831810E0, 11.841820E0, 11.851730E0, 11.861550E0, 11.871270E0, 11.880890E0, 11.890420E0, 11.899870E0, 11.909220E0, 11.918490E0, 11.927680E0, 11.936780E0, 11.945790E0, 11.954730E0, 11.963590E0, 11.972370E0, 11.981070E0, 11.989700E0, 11.998260E0, 12.006740E0, 12.015150E0, 12.023490E0, 12.031760E0, 12.039970E0, 12.048100E0, 12.056170E0, 12.064180E0, 12.072120E0, 12.080010E0, 12.087820E0, 12.095580E0, 12.103280E0, 12.110920E0, 12.118500E0, 12.126030E0, 12.133500E0, 12.140910E0, 12.148270E0, 12.155570E0, 12.162830E0, 12.170030E0, 12.177170E0, 12.184270E0, 12.191320E0, 12.198320E0, 12.205270E0, 12.212170E0, 12.219030E0, 12.225840E0, 12.232600E0, 12.239320E0, 12.245990E0, 12.252620E0, 12.259200E0, 12.265750E0, 12.272240E0 };\nconst double Bennett5_functor::y[154] = { -34.834702E0 ,-34.393200E0 ,-34.152901E0 ,-33.979099E0 ,-33.845901E0 ,-33.732899E0 ,-33.640301E0 ,-33.559200E0 ,-33.486801E0 ,-33.423100E0 ,-33.365101E0 ,-33.313000E0 ,-33.260899E0 ,-33.217400E0 ,-33.176899E0 ,-33.139198E0 ,-33.101601E0 ,-33.066799E0 ,-33.035000E0 ,-33.003101E0 ,-32.971298E0 ,-32.942299E0 ,-32.916302E0 ,-32.890202E0 ,-32.864101E0 ,-32.841000E0 ,-32.817799E0 ,-32.797501E0 ,-32.774300E0 ,-32.757000E0 ,-32.733799E0 ,-32.716400E0 ,-32.699100E0 ,-32.678799E0 ,-32.661400E0 ,-32.644001E0 ,-32.626701E0 ,-32.612202E0 ,-32.597698E0 ,-32.583199E0 ,-32.568699E0 ,-32.554298E0 ,-32.539799E0 ,-32.525299E0 ,-32.510799E0 ,-32.499199E0 ,-32.487598E0 ,-32.473202E0 ,-32.461601E0 ,-32.435501E0 ,-32.435501E0 ,-32.426800E0 ,-32.412300E0 ,-32.400799E0 ,-32.392101E0 ,-32.380501E0 ,-32.366001E0 ,-32.357300E0 ,-32.348598E0 ,-32.339901E0 ,-32.328400E0 ,-32.319698E0 ,-32.311001E0 ,-32.299400E0 ,-32.290699E0 ,-32.282001E0 ,-32.273300E0 ,-32.264599E0 ,-32.256001E0 ,-32.247299E0\n,-32.238602E0 ,-32.229900E0 ,-32.224098E0 ,-32.215401E0 ,-32.203800E0 ,-32.198002E0 ,-32.189400E0 ,-32.183601E0 ,-32.174900E0 ,-32.169102E0 ,-32.163300E0 ,-32.154598E0 ,-32.145901E0 ,-32.140099E0 ,-32.131401E0 ,-32.125599E0 ,-32.119801E0 ,-32.111198E0 ,-32.105400E0 ,-32.096699E0 ,-32.090900E0 ,-32.088001E0 ,-32.079300E0 ,-32.073502E0 ,-32.067699E0 ,-32.061901E0 ,-32.056099E0 ,-32.050301E0 ,-32.044498E0 ,-32.038799E0 ,-32.033001E0 ,-32.027199E0 ,-32.024300E0 ,-32.018501E0 ,-32.012699E0 ,-32.004002E0 ,-32.001099E0 ,-31.995300E0 ,-31.989500E0 ,-31.983700E0 ,-31.977900E0 ,-31.972099E0 ,-31.969299E0 ,-31.963501E0 ,-31.957701E0 ,-31.951900E0 ,-31.946100E0 ,-31.940300E0 ,-31.937401E0 ,-31.931601E0 ,-31.925800E0 ,-31.922899E0 ,-31.917101E0 ,-31.911301E0 ,-31.908400E0 ,-31.902599E0 ,-31.896900E0 ,-31.893999E0 ,-31.888201E0 ,-31.885300E0 ,-31.882401E0 ,-31.876600E0 ,-31.873699E0 ,-31.867901E0 ,-31.862101E0 ,-31.859200E0 ,-31.856300E0 ,-31.850500E0 ,-31.844700E0 ,-31.841801E0 ,-31.838900E0 ,-31.833099E0 ,-31.830200E0 ,\n-31.827299E0 ,-31.821600E0 ,-31.818701E0 ,-31.812901E0 ,-31.809999E0 ,-31.807100E0 ,-31.801300E0 ,-31.798401E0 ,-31.795500E0 ,-31.789700E0 ,-31.786800E0 };\n\n// http://www.itl.nist.gov/div898/strd/nls/data/bennett5.shtml\nvoid testNistBennett5(void)\n{\n  const int  n=3;\n  int info;\n\n  VectorXd x(n);\n\n  /*\n   * First try\n   */\n  x<< -2000., 50., 0.8;\n  // do the computation\n  Bennett5_functor functor;\n  LevenbergMarquardt<Bennett5_functor> lm(functor);\n  lm.parameters.maxfev = 1000;\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  LM_CHECK_N_ITERS(lm, 758, 744);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec.squaredNorm(), 5.2404744073E-04);\n  // check x\n  VERIFY_IS_APPROX(x[0], -2.5235058043E+03);\n  VERIFY_IS_APPROX(x[1], 4.6736564644E+01);\n  VERIFY_IS_APPROX(x[2], 9.3218483193E-01);\n  /*\n   * Second try\n   */\n  x<< -1500., 45., 0.85;\n  // do the computation\n  lm.resetParameters();\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  LM_CHECK_N_ITERS(lm, 203, 192);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec.squaredNorm(), 5.2404744073E-04);\n  // check x\n  VERIFY_IS_APPROX(x[0], -2523.3007865); // should be -2.5235058043E+03\n  VERIFY_IS_APPROX(x[1], 46.735705771); // should be 4.6736564644E+01);\n  VERIFY_IS_APPROX(x[2], 0.93219881891); // should be 9.3218483193E-01);\n}\n\nstruct thurber_functor : Functor<double>\n{\n    thurber_functor(void) : Functor<double>(7,37) {}\n    static const double _x[37];\n    static const double _y[37];\n    int operator()(const VectorXd &b, VectorXd &fvec)\n    {\n        //        int called=0; printf(\"call hahn1_functor with  iflag=%d, called=%d\\n\", iflag, called); if (iflag==1) called++;\n        assert(b.size()==7);\n        assert(fvec.size()==37);\n        for(int i=0; i<37; i++) {\n            double x=_x[i], xx=x*x, xxx=xx*x;\n            fvec[i] = (b[0]+b[1]*x+b[2]*xx+b[3]*xxx) / (1.+b[4]*x+b[5]*xx+b[6]*xxx) - _y[i];\n        }\n        return 0;\n    }\n    int df(const VectorXd &b, MatrixXd &fjac)\n    {\n        assert(b.size()==7);\n        assert(fjac.rows()==37);\n        assert(fjac.cols()==7);\n        for(int i=0; i<37; i++) {\n            double x=_x[i], xx=x*x, xxx=xx*x;\n            double fact = 1./(1.+b[4]*x+b[5]*xx+b[6]*xxx);\n            fjac(i,0) = 1.*fact;\n            fjac(i,1) = x*fact;\n            fjac(i,2) = xx*fact;\n            fjac(i,3) = xxx*fact;\n            fact = - (b[0]+b[1]*x+b[2]*xx+b[3]*xxx) * fact * fact;\n            fjac(i,4) = x*fact;\n            fjac(i,5) = xx*fact;\n            fjac(i,6) = xxx*fact;\n        }\n        return 0;\n    }\n};\nconst double thurber_functor::_x[37] = { -3.067E0, -2.981E0, -2.921E0, -2.912E0, -2.840E0, -2.797E0, -2.702E0, -2.699E0, -2.633E0, -2.481E0, -2.363E0, -2.322E0, -1.501E0, -1.460E0, -1.274E0, -1.212E0, -1.100E0, -1.046E0, -0.915E0, -0.714E0, -0.566E0, -0.545E0, -0.400E0, -0.309E0, -0.109E0, -0.103E0, 0.010E0, 0.119E0, 0.377E0, 0.790E0, 0.963E0, 1.006E0, 1.115E0, 1.572E0, 1.841E0, 2.047E0, 2.200E0 };\nconst double thurber_functor::_y[37] = { 80.574E0, 84.248E0, 87.264E0, 87.195E0, 89.076E0, 89.608E0, 89.868E0, 90.101E0, 92.405E0, 95.854E0, 100.696E0, 101.060E0, 401.672E0, 390.724E0, 567.534E0, 635.316E0, 733.054E0, 759.087E0, 894.206E0, 990.785E0, 1090.109E0, 1080.914E0, 1122.643E0, 1178.351E0, 1260.531E0, 1273.514E0, 1288.339E0, 1327.543E0, 1353.863E0, 1414.509E0, 1425.208E0, 1421.384E0, 1442.962E0, 1464.350E0, 1468.705E0, 1447.894E0, 1457.628E0};\n\n// http://www.itl.nist.gov/div898/strd/nls/data/thurber.shtml\nvoid testNistThurber(void)\n{\n  const int n=7;\n  int info;\n\n  VectorXd x(n);\n\n  /*\n   * First try\n   */\n  x<< 1000 ,1000 ,400 ,40 ,0.7,0.3,0.0 ;\n  // do the computation\n  thurber_functor functor;\n  LevenbergMarquardt<thurber_functor> lm(functor);\n  lm.parameters.ftol = 1.E4*NumTraits<double>::epsilon();\n  lm.parameters.xtol = 1.E4*NumTraits<double>::epsilon();\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  LM_CHECK_N_ITERS(lm, 39,36);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec.squaredNorm(), 5.6427082397E+03);\n  // check x\n  VERIFY_IS_APPROX(x[0], 1.2881396800E+03);\n  VERIFY_IS_APPROX(x[1], 1.4910792535E+03);\n  VERIFY_IS_APPROX(x[2], 5.8323836877E+02);\n  VERIFY_IS_APPROX(x[3], 7.5416644291E+01);\n  VERIFY_IS_APPROX(x[4], 9.6629502864E-01);\n  VERIFY_IS_APPROX(x[5], 3.9797285797E-01);\n  VERIFY_IS_APPROX(x[6], 4.9727297349E-02);\n\n  /*\n   * Second try\n   */\n  x<< 1300 ,1500 ,500  ,75   ,1    ,0.4  ,0.05  ;\n  // do the computation\n  lm.resetParameters();\n  lm.parameters.ftol = 1.E4*NumTraits<double>::epsilon();\n  lm.parameters.xtol = 1.E4*NumTraits<double>::epsilon();\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  LM_CHECK_N_ITERS(lm, 29, 28);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec.squaredNorm(), 5.6427082397E+03);\n  // check x\n  VERIFY_IS_APPROX(x[0], 1.2881396800E+03);\n  VERIFY_IS_APPROX(x[1], 1.4910792535E+03);\n  VERIFY_IS_APPROX(x[2], 5.8323836877E+02);\n  VERIFY_IS_APPROX(x[3], 7.5416644291E+01);\n  VERIFY_IS_APPROX(x[4], 9.6629502864E-01);\n  VERIFY_IS_APPROX(x[5], 3.9797285797E-01);\n  VERIFY_IS_APPROX(x[6], 4.9727297349E-02);\n}\n\nstruct rat43_functor : Functor<double>\n{\n    rat43_functor(void) : Functor<double>(4,15) {}\n    static const double x[15];\n    static const double y[15];\n    int operator()(const VectorXd &b, VectorXd &fvec)\n    {\n        assert(b.size()==4);\n        assert(fvec.size()==15);\n        for(int i=0; i<15; i++)\n            fvec[i] = b[0] * pow(1.+exp(b[1]-b[2]*x[i]),-1./b[3]) - y[i];\n        return 0;\n    }\n    int df(const VectorXd &b, MatrixXd &fjac)\n    {\n        assert(b.size()==4);\n        assert(fjac.rows()==15);\n        assert(fjac.cols()==4);\n        for(int i=0; i<15; i++) {\n            double e = exp(b[1]-b[2]*x[i]);\n            double power = -1./b[3];\n            fjac(i,0) = pow(1.+e, power);\n            fjac(i,1) = power*b[0]*e*pow(1.+e, power-1.);\n            fjac(i,2) = -power*b[0]*e*x[i]*pow(1.+e, power-1.);\n            fjac(i,3) = b[0]*power*power*log(1.+e)*pow(1.+e, power);\n        }\n        return 0;\n    }\n};\nconst double rat43_functor::x[15] = { 1., 2., 3., 4., 5., 6., 7., 8., 9., 10., 11., 12., 13., 14., 15. };\nconst double rat43_functor::y[15] = { 16.08, 33.83, 65.80, 97.20, 191.55, 326.20, 386.87, 520.53, 590.03, 651.92, 724.93, 699.56, 689.96, 637.56, 717.41 };\n\n// http://www.itl.nist.gov/div898/strd/nls/data/ratkowsky3.shtml\nvoid testNistRat43(void)\n{\n  const int n=4;\n  int info;\n\n  VectorXd x(n);\n\n  /*\n   * First try\n   */\n  x<< 100., 10., 1., 1.;\n  // do the computation\n  rat43_functor functor;\n  LevenbergMarquardt<rat43_functor> lm(functor);\n  lm.parameters.ftol = 1.E6*NumTraits<double>::epsilon();\n  lm.parameters.xtol = 1.E6*NumTraits<double>::epsilon();\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  LM_CHECK_N_ITERS(lm, 27, 20);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec.squaredNorm(), 8.7864049080E+03);\n  // check x\n  VERIFY_IS_APPROX(x[0], 6.9964151270E+02);\n  VERIFY_IS_APPROX(x[1], 5.2771253025E+00);\n  VERIFY_IS_APPROX(x[2], 7.5962938329E-01);\n  VERIFY_IS_APPROX(x[3], 1.2792483859E+00);\n\n  /*\n   * Second try\n   */\n  x<< 700., 5., 0.75, 1.3;\n  // do the computation\n  lm.resetParameters();\n  lm.parameters.ftol = 1.E5*NumTraits<double>::epsilon();\n  lm.parameters.xtol = 1.E5*NumTraits<double>::epsilon();\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  LM_CHECK_N_ITERS(lm, 9, 8);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec.squaredNorm(), 8.7864049080E+03);\n  // check x\n  VERIFY_IS_APPROX(x[0], 6.9964151270E+02);\n  VERIFY_IS_APPROX(x[1], 5.2771253025E+00);\n  VERIFY_IS_APPROX(x[2], 7.5962938329E-01);\n  VERIFY_IS_APPROX(x[3], 1.2792483859E+00);\n}\n\n\n\nstruct eckerle4_functor : Functor<double>\n{\n    eckerle4_functor(void) : Functor<double>(3,35) {}\n    static const double x[35];\n    static const double y[35];\n    int operator()(const VectorXd &b, VectorXd &fvec)\n    {\n        assert(b.size()==3);\n        assert(fvec.size()==35);\n        for(int i=0; i<35; i++)\n            fvec[i] = b[0]/b[1] * exp(-0.5*(x[i]-b[2])*(x[i]-b[2])/(b[1]*b[1])) - y[i];\n        return 0;\n    }\n    int df(const VectorXd &b, MatrixXd &fjac)\n    {\n        assert(b.size()==3);\n        assert(fjac.rows()==35);\n        assert(fjac.cols()==3);\n        for(int i=0; i<35; i++) {\n            double b12 = b[1]*b[1];\n            double e = exp(-0.5*(x[i]-b[2])*(x[i]-b[2])/b12);\n            fjac(i,0) = e / b[1];\n            fjac(i,1) = ((x[i]-b[2])*(x[i]-b[2])/b12-1.) * b[0]*e/b12;\n            fjac(i,2) = (x[i]-b[2])*e*b[0]/b[1]/b12;\n        }\n        return 0;\n    }\n};\nconst double eckerle4_functor::x[35] = { 400.0, 405.0, 410.0, 415.0, 420.0, 425.0, 430.0, 435.0, 436.5, 438.0, 439.5, 441.0, 442.5, 444.0, 445.5, 447.0, 448.5, 450.0, 451.5, 453.0, 454.5, 456.0, 457.5, 459.0, 460.5, 462.0, 463.5, 465.0, 470.0, 475.0, 480.0, 485.0, 490.0, 495.0, 500.0};\nconst double eckerle4_functor::y[35] = { 0.0001575, 0.0001699, 0.0002350, 0.0003102, 0.0004917, 0.0008710, 0.0017418, 0.0046400, 0.0065895, 0.0097302, 0.0149002, 0.0237310, 0.0401683, 0.0712559, 0.1264458, 0.2073413, 0.2902366, 0.3445623, 0.3698049, 0.3668534, 0.3106727, 0.2078154, 0.1164354, 0.0616764, 0.0337200, 0.0194023, 0.0117831, 0.0074357, 0.0022732, 0.0008800, 0.0004579, 0.0002345, 0.0001586, 0.0001143, 0.0000710 };\n\n// http://www.itl.nist.gov/div898/strd/nls/data/eckerle4.shtml\nvoid testNistEckerle4(void)\n{\n  const int n=3;\n  int info;\n\n  VectorXd x(n);\n\n  /*\n   * First try\n   */\n  x<< 1., 10., 500.;\n  // do the computation\n  eckerle4_functor functor;\n  LevenbergMarquardt<eckerle4_functor> lm(functor);\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  LM_CHECK_N_ITERS(lm, 18, 15);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec.squaredNorm(), 1.4635887487E-03);\n  // check x\n  VERIFY_IS_APPROX(x[0], 1.5543827178);\n  VERIFY_IS_APPROX(x[1], 4.0888321754);\n  VERIFY_IS_APPROX(x[2], 4.5154121844E+02);\n\n  /*\n   * Second try\n   */\n  x<< 1.5, 5., 450.;\n  // do the computation\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  LM_CHECK_N_ITERS(lm, 7, 6);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec.squaredNorm(), 1.4635887487E-03);\n  // check x\n  VERIFY_IS_APPROX(x[0], 1.5543827178);\n  VERIFY_IS_APPROX(x[1], 4.0888321754);\n  VERIFY_IS_APPROX(x[2], 4.5154121844E+02);\n}\n\nEIGEN_DECLARE_TEST(NonLinearOptimization)\n{\n    // Tests using the examples provided by (c)minpack\n    CALL_SUBTEST/*_1*/(testChkder());\n    CALL_SUBTEST/*_1*/(testLmder1());\n    CALL_SUBTEST/*_1*/(testLmder());\n    CALL_SUBTEST/*_2*/(testHybrj1());\n    CALL_SUBTEST/*_2*/(testHybrj());\n    CALL_SUBTEST/*_2*/(testHybrd1());\n    CALL_SUBTEST/*_2*/(testHybrd());\n    CALL_SUBTEST/*_3*/(testLmstr1());\n    CALL_SUBTEST/*_3*/(testLmstr());\n    CALL_SUBTEST/*_3*/(testLmdif1());\n    CALL_SUBTEST/*_3*/(testLmdif());\n\n    // NIST tests, level of difficulty = \"Lower\"\n    CALL_SUBTEST/*_4*/(testNistMisra1a());\n    CALL_SUBTEST/*_4*/(testNistChwirut2());\n\n    // NIST tests, level of difficulty = \"Average\"\n    CALL_SUBTEST/*_5*/(testNistHahn1());\n    CALL_SUBTEST/*_6*/(testNistMisra1d());\n    CALL_SUBTEST/*_7*/(testNistMGH17());\n    CALL_SUBTEST/*_8*/(testNistLanczos1());\n\n//     // NIST tests, level of difficulty = \"Higher\"\n    CALL_SUBTEST/*_9*/(testNistRat42());\n//     CALL_SUBTEST/*_10*/(testNistMGH10());\n    CALL_SUBTEST/*_11*/(testNistBoxBOD());\n//     CALL_SUBTEST/*_12*/(testNistMGH09());\n    CALL_SUBTEST/*_13*/(testNistBennett5());\n    CALL_SUBTEST/*_14*/(testNistThurber());\n    CALL_SUBTEST/*_15*/(testNistRat43());\n    CALL_SUBTEST/*_16*/(testNistEckerle4());\n}\n\n/*\n * Can be useful for debugging...\n  printf(\"info, nfev : %d, %d\\n\", info, lm.nfev);\n  printf(\"info, nfev, njev : %d, %d, %d\\n\", info, solver.nfev, solver.njev);\n  printf(\"info, nfev : %d, %d\\n\", info, solver.nfev);\n  printf(\"x[0] : %.32g\\n\", x[0]);\n  printf(\"x[1] : %.32g\\n\", x[1]);\n  printf(\"x[2] : %.32g\\n\", x[2]);\n  printf(\"x[3] : %.32g\\n\", x[3]);\n  printf(\"fvec.blueNorm() : %.32g\\n\", solver.fvec.blueNorm());\n  printf(\"fvec.blueNorm() : %.32g\\n\", lm.fvec.blueNorm());\n\n  printf(\"info, nfev, njev : %d, %d, %d\\n\", info, lm.nfev, lm.njev);\n  printf(\"fvec.squaredNorm() : %.13g\\n\", lm.fvec.squaredNorm());\n  std::cout << x << std::endl;\n  std::cout.precision(9);\n  std::cout << x[0] << std::endl;\n  std::cout << x[1] << std::endl;\n  std::cout << x[2] << std::endl;\n  std::cout << x[3] << std::endl;\n*/\n\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/NumericalDiff.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Thomas Capricelli <orzel@freehackers.org>\n\n#include <stdio.h>\n\n#include \"main.h\"\n#include <unsupported/Eigen/NumericalDiff>\n    \n// Generic functor\ntemplate<typename _Scalar, int NX=Dynamic, int NY=Dynamic>\nstruct Functor\n{\n  typedef _Scalar Scalar;\n  enum {\n    InputsAtCompileTime = NX,\n    ValuesAtCompileTime = NY\n  };\n  typedef Matrix<Scalar,InputsAtCompileTime,1> InputType;\n  typedef Matrix<Scalar,ValuesAtCompileTime,1> ValueType;\n  typedef Matrix<Scalar,ValuesAtCompileTime,InputsAtCompileTime> JacobianType;\n  \n  int m_inputs, m_values;\n  \n  Functor() : m_inputs(InputsAtCompileTime), m_values(ValuesAtCompileTime) {}\n  Functor(int inputs_, int values_) : m_inputs(inputs_), m_values(values_) {}\n  \n  int inputs() const { return m_inputs; }\n  int values() const { return m_values; }\n\n};\n\nstruct my_functor : Functor<double>\n{\n    my_functor(void): Functor<double>(3,15) {}\n    int operator()(const VectorXd &x, VectorXd &fvec) const\n    {\n        double tmp1, tmp2, tmp3;\n        double y[15] = {1.4e-1, 1.8e-1, 2.2e-1, 2.5e-1, 2.9e-1, 3.2e-1, 3.5e-1,\n            3.9e-1, 3.7e-1, 5.8e-1, 7.3e-1, 9.6e-1, 1.34, 2.1, 4.39};\n\n        for (int i = 0; i < values(); i++)\n        {\n            tmp1 = i+1;\n            tmp2 = 16 - i - 1;\n            tmp3 = (i>=8)? tmp2 : tmp1;\n            fvec[i] = y[i] - (x[0] + tmp1/(x[1]*tmp2 + x[2]*tmp3));\n        }\n        return 0;\n    }\n\n    int actual_df(const VectorXd &x, MatrixXd &fjac) const\n    {\n        double tmp1, tmp2, tmp3, tmp4;\n        for (int i = 0; i < values(); i++)\n        {\n            tmp1 = i+1;\n            tmp2 = 16 - i - 1;\n            tmp3 = (i>=8)? tmp2 : tmp1;\n            tmp4 = (x[1]*tmp2 + x[2]*tmp3); tmp4 = tmp4*tmp4;\n            fjac(i,0) = -1;\n            fjac(i,1) = tmp1*tmp2/tmp4;\n            fjac(i,2) = tmp1*tmp3/tmp4;\n        }\n        return 0;\n    }\n};\n\nvoid test_forward()\n{\n    VectorXd x(3);\n    MatrixXd jac(15,3);\n    MatrixXd actual_jac(15,3);\n    my_functor functor;\n\n    x << 0.082, 1.13, 2.35;\n\n    // real one \n    functor.actual_df(x, actual_jac);\n//    std::cout << actual_jac << std::endl << std::endl;\n\n    // using NumericalDiff\n    NumericalDiff<my_functor> numDiff(functor);\n    numDiff.df(x, jac);\n//    std::cout << jac << std::endl;\n\n    VERIFY_IS_APPROX(jac, actual_jac);\n}\n\nvoid test_central()\n{\n    VectorXd x(3);\n    MatrixXd jac(15,3);\n    MatrixXd actual_jac(15,3);\n    my_functor functor;\n\n    x << 0.082, 1.13, 2.35;\n\n    // real one \n    functor.actual_df(x, actual_jac);\n\n    // using NumericalDiff\n    NumericalDiff<my_functor,Central> numDiff(functor);\n    numDiff.df(x, jac);\n\n    VERIFY_IS_APPROX(jac, actual_jac);\n}\n\nEIGEN_DECLARE_TEST(NumericalDiff)\n{\n    CALL_SUBTEST(test_forward());\n    CALL_SUBTEST(test_central());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/alignedvector3.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael Guennebaud <g.gael@free.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <unsupported/Eigen/AlignedVector3>\n\nnamespace Eigen {\n\ntemplate<typename T,typename Derived>\nT test_relative_error(const AlignedVector3<T> &a, const MatrixBase<Derived> &b)\n{\n  return test_relative_error(a.coeffs().template head<3>(), b);\n}\n\n}\n\ntemplate<typename Scalar>\nvoid alignedvector3()\n{\n  Scalar s1 = internal::random<Scalar>();\n  Scalar s2 = internal::random<Scalar>();\n  typedef Matrix<Scalar,3,1> RefType;\n  typedef Matrix<Scalar,3,3> Mat33;\n  typedef AlignedVector3<Scalar> FastType;\n  RefType  r1(RefType::Random()), r2(RefType::Random()), r3(RefType::Random()),\n           r4(RefType::Random()), r5(RefType::Random());\n  FastType f1(r1), f2(r2), f3(r3), f4(r4), f5(r5);\n  Mat33 m1(Mat33::Random());\n  \n  VERIFY_IS_APPROX(f1,r1);\n  VERIFY_IS_APPROX(f4,r4);\n\n  VERIFY_IS_APPROX(f4+f1,r4+r1);\n  VERIFY_IS_APPROX(f4-f1,r4-r1);\n  VERIFY_IS_APPROX(f4+f1-f2,r4+r1-r2);\n  VERIFY_IS_APPROX(f4+=f3,r4+=r3);\n  VERIFY_IS_APPROX(f4-=f5,r4-=r5);\n  VERIFY_IS_APPROX(f4-=f5+f1,r4-=r5+r1);\n  VERIFY_IS_APPROX(f5+f1-s1*f2,r5+r1-s1*r2);\n  VERIFY_IS_APPROX(f5+f1/s2-s1*f2,r5+r1/s2-s1*r2);\n  \n  VERIFY_IS_APPROX(m1*f4,m1*r4);\n  VERIFY_IS_APPROX(f4.transpose()*m1,r4.transpose()*m1);\n  \n  VERIFY_IS_APPROX(f2.dot(f3),r2.dot(r3));\n  VERIFY_IS_APPROX(f2.cross(f3),r2.cross(r3));\n  VERIFY_IS_APPROX(f2.norm(),r2.norm());\n\n  VERIFY_IS_APPROX(f2.normalized(),r2.normalized());\n\n  VERIFY_IS_APPROX((f2+f1).normalized(),(r2+r1).normalized());\n  \n  f2.normalize();\n  r2.normalize();\n  VERIFY_IS_APPROX(f2,r2);\n  \n  {\n    FastType f6 = RefType::Zero();\n    FastType f7 = FastType::Zero();\n    VERIFY_IS_APPROX(f6,f7);\n    f6 = r4+r1;\n    VERIFY_IS_APPROX(f6,r4+r1);\n    f6 -= Scalar(2)*r4;\n    VERIFY_IS_APPROX(f6,r1-r4);\n  }\n  \n  FastType f8, f9(0,0,0);\n  VERIFY_IS_APPROX(f9-f1,-f1);\n\n  std::stringstream ss1, ss2;\n  ss1 << f1;\n  ss2 << r1;\n  VERIFY(ss1.str()==ss2.str());\n}\n\nEIGEN_DECLARE_TEST(alignedvector3)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST( alignedvector3<float>() );\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/autodiff.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Gael Guennebaud <g.gael@free.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <unsupported/Eigen/AutoDiff>\n\ntemplate<typename Scalar>\nEIGEN_DONT_INLINE Scalar foo(const Scalar& x, const Scalar& y)\n{\n  using namespace std;\n//   return x+std::sin(y);\n  EIGEN_ASM_COMMENT(\"mybegin\");\n  // pow(float, int) promotes to pow(double, double)\n  return x*2 - 1 + static_cast<Scalar>(pow(1+x,2)) + 2*sqrt(y*y+0) - 4 * sin(0+x) + 2 * cos(y+0) - exp(Scalar(-0.5)*x*x+0);\n  //return x+2*y*x;//x*2 -std::pow(x,2);//(2*y/x);// - y*2;\n  EIGEN_ASM_COMMENT(\"myend\");\n}\n\ntemplate<typename Vector>\nEIGEN_DONT_INLINE typename Vector::Scalar foo(const Vector& p)\n{\n  typedef typename Vector::Scalar Scalar;\n  return (p-Vector(Scalar(-1),Scalar(1.))).norm() + (p.array() * p.array()).sum() + p.dot(p);\n}\n\ntemplate<typename _Scalar, int NX=Dynamic, int NY=Dynamic>\nstruct TestFunc1\n{\n  typedef _Scalar Scalar;\n  enum {\n    InputsAtCompileTime = NX,\n    ValuesAtCompileTime = NY\n  };\n  typedef Matrix<Scalar,InputsAtCompileTime,1> InputType;\n  typedef Matrix<Scalar,ValuesAtCompileTime,1> ValueType;\n  typedef Matrix<Scalar,ValuesAtCompileTime,InputsAtCompileTime> JacobianType;\n\n  int m_inputs, m_values;\n\n  TestFunc1() : m_inputs(InputsAtCompileTime), m_values(ValuesAtCompileTime) {}\n  TestFunc1(int inputs_, int values_) : m_inputs(inputs_), m_values(values_) {}\n\n  int inputs() const { return m_inputs; }\n  int values() const { return m_values; }\n\n  template<typename T>\n  void operator() (const Matrix<T,InputsAtCompileTime,1>& x, Matrix<T,ValuesAtCompileTime,1>* _v) const\n  {\n    Matrix<T,ValuesAtCompileTime,1>& v = *_v;\n\n    v[0] = 2 * x[0] * x[0] + x[0] * x[1];\n    v[1] = 3 * x[1] * x[0] + 0.5 * x[1] * x[1];\n    if(inputs()>2)\n    {\n      v[0] += 0.5 * x[2];\n      v[1] += x[2];\n    }\n    if(values()>2)\n    {\n      v[2] = 3 * x[1] * x[0] * x[0];\n    }\n    if (inputs()>2 && values()>2)\n      v[2] *= x[2];\n  }\n\n  void operator() (const InputType& x, ValueType* v, JacobianType* _j) const\n  {\n    (*this)(x, v);\n\n    if(_j)\n    {\n      JacobianType& j = *_j;\n\n      j(0,0) = 4 * x[0] + x[1];\n      j(1,0) = 3 * x[1];\n\n      j(0,1) = x[0];\n      j(1,1) = 3 * x[0] + 2 * 0.5 * x[1];\n\n      if (inputs()>2)\n      {\n        j(0,2) = 0.5;\n        j(1,2) = 1;\n      }\n      if(values()>2)\n      {\n        j(2,0) = 3 * x[1] * 2 * x[0];\n        j(2,1) = 3 * x[0] * x[0];\n      }\n      if (inputs()>2 && values()>2)\n      {\n        j(2,0) *= x[2];\n        j(2,1) *= x[2];\n\n        j(2,2) = 3 * x[1] * x[0] * x[0];\n        j(2,2) = 3 * x[1] * x[0] * x[0];\n      }\n    }\n  }\n};\n\n\n#if EIGEN_HAS_VARIADIC_TEMPLATES\n/* Test functor for the C++11 features. */\ntemplate <typename Scalar>\nstruct integratorFunctor\n{\n    typedef Matrix<Scalar, 2, 1> InputType;\n    typedef Matrix<Scalar, 2, 1> ValueType;\n\n    /*\n     * Implementation starts here.\n     */\n    integratorFunctor(const Scalar gain) : _gain(gain) {}\n    integratorFunctor(const integratorFunctor& f) : _gain(f._gain) {}\n    const Scalar _gain;\n\n    template <typename T1, typename T2>\n    void operator() (const T1 &input, T2 *output, const Scalar dt) const\n    {\n        T2 &o = *output;\n\n        /* Integrator to test the AD. */\n        o[0] = input[0] + input[1] * dt * _gain;\n        o[1] = input[1] * _gain;\n    }\n\n    /* Only needed for the test */\n    template <typename T1, typename T2, typename T3>\n    void operator() (const T1 &input, T2 *output, T3 *jacobian, const Scalar dt) const\n    {\n        T2 &o = *output;\n\n        /* Integrator to test the AD. */\n        o[0] = input[0] + input[1] * dt * _gain;\n        o[1] = input[1] * _gain;\n\n        if (jacobian)\n        {\n            T3 &j = *jacobian;\n\n            j(0, 0) = 1;\n            j(0, 1) = dt * _gain;\n            j(1, 0) = 0;\n            j(1, 1) = _gain;\n        }\n    }\n\n};\n\ntemplate<typename Func> void forward_jacobian_cpp11(const Func& f)\n{\n    typedef typename Func::ValueType::Scalar Scalar;\n    typedef typename Func::ValueType ValueType;\n    typedef typename Func::InputType InputType;\n    typedef typename AutoDiffJacobian<Func>::JacobianType JacobianType;\n\n    InputType x = InputType::Random(InputType::RowsAtCompileTime);\n    ValueType y, yref;\n    JacobianType j, jref;\n\n    const Scalar dt = internal::random<double>();\n\n    jref.setZero();\n    yref.setZero();\n    f(x, &yref, &jref, dt);\n\n    //std::cerr << \"y, yref, jref: \" << \"\\n\";\n    //std::cerr << y.transpose() << \"\\n\\n\";\n    //std::cerr << yref << \"\\n\\n\";\n    //std::cerr << jref << \"\\n\\n\";\n\n    AutoDiffJacobian<Func> autoj(f);\n    autoj(x, &y, &j, dt);\n\n    //std::cerr << \"y j (via autodiff): \" << \"\\n\";\n    //std::cerr << y.transpose() << \"\\n\\n\";\n    //std::cerr << j << \"\\n\\n\";\n\n    VERIFY_IS_APPROX(y, yref);\n    VERIFY_IS_APPROX(j, jref);\n}\n#endif\n\ntemplate<typename Func> void forward_jacobian(const Func& f)\n{\n    typename Func::InputType x = Func::InputType::Random(f.inputs());\n    typename Func::ValueType y(f.values()), yref(f.values());\n    typename Func::JacobianType j(f.values(),f.inputs()), jref(f.values(),f.inputs());\n\n    jref.setZero();\n    yref.setZero();\n    f(x,&yref,&jref);\n//     std::cerr << y.transpose() << \"\\n\\n\";;\n//     std::cerr << j << \"\\n\\n\";;\n\n    j.setZero();\n    y.setZero();\n    AutoDiffJacobian<Func> autoj(f);\n    autoj(x, &y, &j);\n//     std::cerr << y.transpose() << \"\\n\\n\";;\n//     std::cerr << j << \"\\n\\n\";;\n\n    VERIFY_IS_APPROX(y, yref);\n    VERIFY_IS_APPROX(j, jref);\n}\n\n// TODO also check actual derivatives!\ntemplate <int>\nvoid test_autodiff_scalar()\n{\n  Vector2f p = Vector2f::Random();\n  typedef AutoDiffScalar<Vector2f> AD;\n  AD ax(p.x(),Vector2f::UnitX());\n  AD ay(p.y(),Vector2f::UnitY());\n  AD res = foo<AD>(ax,ay);\n  VERIFY_IS_APPROX(res.value(), foo(p.x(),p.y()));\n}\n\n\n// TODO also check actual derivatives!\ntemplate <int>\nvoid test_autodiff_vector()\n{\n  Vector2f p = Vector2f::Random();\n  typedef AutoDiffScalar<Vector2f> AD;\n  typedef Matrix<AD,2,1> VectorAD;\n  VectorAD ap = p.cast<AD>();\n  ap.x().derivatives() = Vector2f::UnitX();\n  ap.y().derivatives() = Vector2f::UnitY();\n\n  AD res = foo<VectorAD>(ap);\n  VERIFY_IS_APPROX(res.value(), foo(p));\n}\n\ntemplate <int>\nvoid test_autodiff_jacobian()\n{\n  CALL_SUBTEST(( forward_jacobian(TestFunc1<double,2,2>()) ));\n  CALL_SUBTEST(( forward_jacobian(TestFunc1<double,2,3>()) ));\n  CALL_SUBTEST(( forward_jacobian(TestFunc1<double,3,2>()) ));\n  CALL_SUBTEST(( forward_jacobian(TestFunc1<double,3,3>()) ));\n  CALL_SUBTEST(( forward_jacobian(TestFunc1<double>(3,3)) ));\n#if EIGEN_HAS_VARIADIC_TEMPLATES\n  CALL_SUBTEST(( forward_jacobian_cpp11(integratorFunctor<double>(10)) ));\n#endif\n}\n\n\ntemplate <int>\nvoid test_autodiff_hessian()\n{\n  typedef AutoDiffScalar<VectorXd> AD;\n  typedef Matrix<AD,Eigen::Dynamic,1> VectorAD;\n  typedef AutoDiffScalar<VectorAD> ADD;\n  typedef Matrix<ADD,Eigen::Dynamic,1> VectorADD;\n  VectorADD x(2);\n  double s1 = internal::random<double>(), s2 = internal::random<double>(), s3 = internal::random<double>(), s4 = internal::random<double>();\n  x(0).value()=s1;\n  x(1).value()=s2;\n\n  //set unit vectors for the derivative directions (partial derivatives of the input vector)\n  x(0).derivatives().resize(2);\n  x(0).derivatives().setZero();\n  x(0).derivatives()(0)= 1;\n  x(1).derivatives().resize(2);\n  x(1).derivatives().setZero();\n  x(1).derivatives()(1)=1;\n\n  //repeat partial derivatives for the inner AutoDiffScalar\n  x(0).value().derivatives() = VectorXd::Unit(2,0);\n  x(1).value().derivatives() = VectorXd::Unit(2,1);\n\n  //set the hessian matrix to zero\n  for(int idx=0; idx<2; idx++) {\n      x(0).derivatives()(idx).derivatives()  = VectorXd::Zero(2);\n      x(1).derivatives()(idx).derivatives()  = VectorXd::Zero(2);\n  }\n\n  ADD y = sin(AD(s3)*x(0) + AD(s4)*x(1));\n\n  VERIFY_IS_APPROX(y.value().derivatives()(0), y.derivatives()(0).value());\n  VERIFY_IS_APPROX(y.value().derivatives()(1), y.derivatives()(1).value());\n  VERIFY_IS_APPROX(y.value().derivatives()(0), s3*std::cos(s1*s3+s2*s4));\n  VERIFY_IS_APPROX(y.value().derivatives()(1), s4*std::cos(s1*s3+s2*s4));\n  VERIFY_IS_APPROX(y.derivatives()(0).derivatives(), -std::sin(s1*s3+s2*s4)*Vector2d(s3*s3,s4*s3));\n  VERIFY_IS_APPROX(y.derivatives()(1).derivatives(),  -std::sin(s1*s3+s2*s4)*Vector2d(s3*s4,s4*s4));\n\n  ADD z = x(0)*x(1);\n  VERIFY_IS_APPROX(z.derivatives()(0).derivatives(), Vector2d(0,1));\n  VERIFY_IS_APPROX(z.derivatives()(1).derivatives(), Vector2d(1,0));\n}\n\ndouble bug_1222() {\n  typedef Eigen::AutoDiffScalar<Eigen::Vector3d> AD;\n  const double _cv1_3 = 1.0;\n  const AD chi_3 = 1.0;\n  // this line did not work, because operator+ returns ADS<DerType&>, which then cannot be converted to ADS<DerType>\n  const AD denom = chi_3 + _cv1_3;\n  return denom.value();\n}\n\n#ifdef EIGEN_TEST_PART_5\n\ndouble bug_1223() {\n  using std::min;\n  typedef Eigen::AutoDiffScalar<Eigen::Vector3d> AD;\n\n  const double _cv1_3 = 1.0;\n  const AD chi_3 = 1.0;\n  const AD denom = 1.0;\n\n  // failed because implementation of min attempts to construct ADS<DerType&> via constructor AutoDiffScalar(const Real& value)\n  // without initializing m_derivatives (which is a reference in this case)\n  #define EIGEN_TEST_SPACE\n  const AD t = min EIGEN_TEST_SPACE (denom / chi_3, 1.0);\n\n  const AD t2 = min EIGEN_TEST_SPACE (denom / (chi_3 * _cv1_3), 1.0);\n\n  return t.value() + t2.value();\n}\n\n// regression test for some compilation issues with specializations of ScalarBinaryOpTraits\nvoid bug_1260() {\n  Matrix4d A = Matrix4d::Ones();\n  Vector4d v = Vector4d::Ones();\n  A*v;\n}\n\n// check a compilation issue with numext::max\ndouble bug_1261() {\n  typedef AutoDiffScalar<Matrix2d> AD;\n  typedef Matrix<AD,2,1> VectorAD;\n\n  VectorAD v(0.,0.);\n  const AD maxVal = v.maxCoeff();\n  const AD minVal = v.minCoeff();\n  return maxVal.value() + minVal.value();\n}\n\ndouble bug_1264() {\n  typedef AutoDiffScalar<Vector2d> AD;\n  const AD s = 0.;\n  const Matrix<AD, 3, 1> v1(0.,0.,0.);\n  const Matrix<AD, 3, 1> v2 = (s + 3.0) * v1;\n  return v2(0).value();\n}\n\n// check with expressions on constants\ndouble bug_1281() {\n  int n = 2;\n  typedef AutoDiffScalar<VectorXd> AD;\n  const AD c = 1.;\n  AD x0(2,n,0);\n  AD y1 = (AD(c)+AD(c))*x0;\n  y1 = x0 * (AD(c)+AD(c));\n  AD y2 = (-AD(c))+x0;\n  y2 = x0+(-AD(c));\n  AD y3 = (AD(c)*(-AD(c))+AD(c))*x0;\n  y3 = x0 * (AD(c)*(-AD(c))+AD(c));\n  return (y1+y2+y3).value();\n}\n\n#endif\n\nEIGEN_DECLARE_TEST(autodiff)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( test_autodiff_scalar<1>() );\n    CALL_SUBTEST_2( test_autodiff_vector<1>() );\n    CALL_SUBTEST_3( test_autodiff_jacobian<1>() );\n    CALL_SUBTEST_4( test_autodiff_hessian<1>() );\n  }\n\n  CALL_SUBTEST_5( bug_1222() );\n  CALL_SUBTEST_5( bug_1223() );\n  CALL_SUBTEST_5( bug_1260() );\n  CALL_SUBTEST_5( bug_1261() );\n  CALL_SUBTEST_5( bug_1281() );\n}\n\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/autodiff_scalar.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2013 Christoph Hertzberg <chtz@informatik.uni-bremen.de>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <unsupported/Eigen/AutoDiff>\n\n/*\n * In this file scalar derivations are tested for correctness.\n * TODO add more tests!\n */\n\ntemplate<typename Scalar> void check_atan2()\n{\n  typedef Matrix<Scalar, 1, 1> Deriv1;\n  typedef AutoDiffScalar<Deriv1> AD;\n  \n  AD x(internal::random<Scalar>(-3.0, 3.0), Deriv1::UnitX());\n  \n  using std::exp;\n  Scalar r = exp(internal::random<Scalar>(-10, 10));\n  \n  AD s = sin(x), c = cos(x);\n  AD res = atan2(r*s, r*c);\n  \n  VERIFY_IS_APPROX(res.value(), x.value());\n  VERIFY_IS_APPROX(res.derivatives(), x.derivatives());\n\n  res = atan2(r*s+0, r*c+0);\n  VERIFY_IS_APPROX(res.value(), x.value());\n  VERIFY_IS_APPROX(res.derivatives(), x.derivatives());\n}\n\ntemplate<typename Scalar> void check_hyperbolic_functions()\n{\n  using std::sinh;\n  using std::cosh;\n  using std::tanh;\n  typedef Matrix<Scalar, 1, 1> Deriv1;\n  typedef AutoDiffScalar<Deriv1> AD;\n  Deriv1 p = Deriv1::Random();\n  AD val(p.x(),Deriv1::UnitX());\n\n  Scalar cosh_px = std::cosh(p.x());\n  AD res1 = tanh(val);\n  VERIFY_IS_APPROX(res1.value(), std::tanh(p.x()));\n  VERIFY_IS_APPROX(res1.derivatives().x(), Scalar(1.0) / (cosh_px * cosh_px));\n\n  AD res2 = sinh(val);\n  VERIFY_IS_APPROX(res2.value(), std::sinh(p.x()));\n  VERIFY_IS_APPROX(res2.derivatives().x(), cosh_px);\n\n  AD res3 = cosh(val);\n  VERIFY_IS_APPROX(res3.value(), cosh_px);\n  VERIFY_IS_APPROX(res3.derivatives().x(), std::sinh(p.x()));\n\n  // Check constant values.\n  const Scalar sample_point = Scalar(1) / Scalar(3); \n  val = AD(sample_point,Deriv1::UnitX());\n  res1 = tanh(val);\n  VERIFY_IS_APPROX(res1.derivatives().x(), Scalar(0.896629559604914));\n\n  res2 = sinh(val);\n  VERIFY_IS_APPROX(res2.derivatives().x(), Scalar(1.056071867829939));\n\n  res3 = cosh(val);\n  VERIFY_IS_APPROX(res3.derivatives().x(), Scalar(0.339540557256150));\n}\n\ntemplate <typename Scalar>\nvoid check_limits_specialization()\n{\n  typedef Eigen::Matrix<Scalar, 1, 1> Deriv;\n  typedef Eigen::AutoDiffScalar<Deriv> AD;\n\n  typedef std::numeric_limits<AD> A;\n  typedef std::numeric_limits<Scalar> B;\n\n  // workaround \"unused typedef\" warning:\n  VERIFY(!bool(internal::is_same<B, A>::value));\n\n#if EIGEN_HAS_CXX11\n  VERIFY(bool(std::is_base_of<B, A>::value));\n#endif\n}\n\nEIGEN_DECLARE_TEST(autodiff_scalar)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1( check_atan2<float>() );\n    CALL_SUBTEST_2( check_atan2<double>() );\n    CALL_SUBTEST_3( check_hyperbolic_functions<float>() );\n    CALL_SUBTEST_4( check_hyperbolic_functions<double>() );\n    CALL_SUBTEST_5( check_limits_specialization<double>());\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/bessel_functions.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include \"../Eigen/SpecialFunctions\"\n\ntemplate<typename X, typename Y>\nvoid verify_component_wise(const X& x, const Y& y)\n{\n  for(Index i=0; i<x.size(); ++i)\n  {\n    if((numext::isfinite)(y(i))) {\n      VERIFY_IS_APPROX( x(i), y(i) );\n    }\n    else if((numext::isnan)(y(i)))\n      VERIFY((numext::isnan)(x(i)));\n    else\n      VERIFY_IS_EQUAL( x(i), y(i) );\n  }\n}\n\ntemplate<typename ArrayType> void array_bessel_functions() \n{\n  // Test Bessel function i0. Reference results obtained with SciPy.\n  {\n    ArrayType x(21);\n    ArrayType expected(21);\n    ArrayType res(21);\n\n    x << -20.0, -18.0, -16.0, -14.0, -12.0, -10.0, -8.0, -6.0, -4.0, -2.0, 0.0,\n        2.0, 4.0, 6.0, 8.0, 10.0, 12.0, 14.0, 16.0, 18.0, 20.0;\n\n    expected << 4.35582826e+07, 6.21841242e+06, 8.93446228e+05, 1.29418563e+05,\n       1.89489253e+04, 2.81571663e+03, 4.27564116e+02, 6.72344070e+01,\n       1.13019220e+01, 2.27958530e+00, 1.00000000e+00, 2.27958530e+00,\n       1.13019220e+01, 6.72344070e+01, 4.27564116e+02, 2.81571663e+03,\n       1.89489253e+04, 1.29418563e+05, 8.93446228e+05, 6.21841242e+06,\n       4.35582826e+07;\n\n    CALL_SUBTEST(res = bessel_i0(x);\n                 verify_component_wise(res, expected););\n  }\n\n  // Test Bessel function i0e. Reference results obtained with SciPy.\n  {\n    ArrayType x(21);\n    ArrayType expected(21);\n    ArrayType res(21);\n\n    x << -20.0, -18.0, -16.0, -14.0, -12.0, -10.0, -8.0, -6.0, -4.0, -2.0, 0.0,\n        2.0, 4.0, 6.0, 8.0, 10.0, 12.0, 14.0, 16.0, 18.0, 20.0;\n\n    expected << 0.0897803118848, 0.0947062952128, 0.100544127361,\n        0.107615251671, 0.116426221213, 0.127833337163, 0.143431781857,\n        0.16665743264, 0.207001921224, 0.308508322554, 1.0, 0.308508322554,\n        0.207001921224, 0.16665743264, 0.143431781857, 0.127833337163,\n        0.116426221213, 0.107615251671, 0.100544127361, 0.0947062952128,\n        0.0897803118848;\n\n    CALL_SUBTEST(res = bessel_i0e(x);\n                 verify_component_wise(res, expected););\n  }\n\n  // Test Bessel function i1. Reference results obtained with SciPy.\n  {\n    ArrayType x(21);\n    ArrayType expected(21);\n    ArrayType res(21);\n\n    x << -20.0, -18.0, -16.0, -14.0, -12.0, -10.0, -8.0, -6.0, -4.0, -2.0, 0.0,\n        2.0, 4.0, 6.0, 8.0, 10.0, 12.0, 14.0, 16.0, 18.0, 20.0;\n\n    expected << -4.24549734e+07, -6.04313324e+06, -8.65059436e+05, -1.24707259e+05,\n       -1.81413488e+04, -2.67098830e+03, -3.99873137e+02, -6.13419368e+01,\n       -9.75946515e+00, -1.59063685e+00,  0.00000000e+00,  1.59063685e+00,\n        9.75946515e+00,  6.13419368e+01,  3.99873137e+02,  2.67098830e+03,\n        1.81413488e+04,  1.24707259e+05,  8.65059436e+05,  6.04313324e+06,\n        4.24549734e+07;\n\n    CALL_SUBTEST(res = bessel_i1(x);\n                 verify_component_wise(res, expected););\n  }\n\n  // Test Bessel function i1e. Reference results obtained with SciPy.\n  {\n    ArrayType x(21);\n    ArrayType expected(21);\n    ArrayType res(21);\n\n    x << -20.0, -18.0, -16.0, -14.0, -12.0, -10.0, -8.0, -6.0, -4.0, -2.0, 0.0,\n        2.0, 4.0, 6.0, 8.0, 10.0, 12.0, 14.0, 16.0, 18.0, 20.0;\n\n    expected << -0.0875062221833, -0.092036796872, -0.0973496147565,\n        -0.103697667463, -0.11146429929, -0.121262681384, -0.134142493293,\n        -0.152051459309, -0.178750839502, -0.215269289249, 0.0, 0.215269289249,\n        0.178750839502, 0.152051459309, 0.134142493293, 0.121262681384,\n        0.11146429929, 0.103697667463, 0.0973496147565, 0.092036796872,\n        0.0875062221833;\n\n    CALL_SUBTEST(res = bessel_i1e(x);\n                 verify_component_wise(res, expected););\n  }\n\n  // Test Bessel function j0. Reference results obtained with SciPy.\n  {\n    ArrayType x(77);\n    ArrayType expected(77);\n    ArrayType res(77);\n\n    x << -38., -37., -36., -35., -34., -33., -32., -31., -30.,\n      -29., -28., -27., -26., -25., -24., -23., -22., -21., -20., -19.,\n      -18., -17., -16., -15., -14., -13., -12., -11., -10.,  -9.,  -8.,\n       -7.,  -6.,  -5.,  -4.,  -3.,  -2.,  -1.,   0.,   1.,   2.,   3.,\n        4.,   5.,   6.,   7.,   8.,   9.,  10.,  11.,  12.,  13.,  14.,\n       15.,  16.,  17.,  18.,  19.,  20.,  21.,  22.,  23.,  24.,  25.,\n       26.,  27.,  28.,  29.,  30.,  31.,  32.,  33.,  34.,  35.,  36.,\n       37.,  38.;\n\n    expected << 0.11433274,  0.01086237, -0.10556738,\n             -0.12684568, -0.03042119,  0.09727067,  0.13807901,  0.05120815,\n             -0.08636798, -0.14784876, -0.07315701,  0.07274192,  0.15599932,\n              0.09626678, -0.05623027, -0.16241278, -0.12065148,  0.03657907,\n              0.16702466,  0.14662944, -0.01335581, -0.16985425, -0.17489907,\n             -0.01422447,  0.17107348,  0.2069261 ,  0.04768931, -0.1711903 ,\n             -0.24593576, -0.09033361,  0.17165081,  0.30007927,  0.15064526,\n             -0.17759677, -0.39714981, -0.26005195,  0.22389078,  0.76519769,\n              1.        ,  0.76519769,  0.22389078, -0.26005195, -0.39714981,\n             -0.17759677,  0.15064526,  0.30007927,  0.17165081, -0.09033361,\n             -0.24593576, -0.1711903 ,  0.04768931,  0.2069261 ,  0.17107348,\n             -0.01422447, -0.17489907, -0.16985425, -0.01335581,  0.14662944,\n              0.16702466,  0.03657907, -0.12065148, -0.16241278, -0.05623027,\n              0.09626678,  0.15599932,  0.07274192, -0.07315701, -0.14784876,\n             -0.08636798,  0.05120815,  0.13807901,  0.09727067, -0.03042119,\n             -0.12684568, -0.10556738,  0.01086237,  0.11433274;\n\n    CALL_SUBTEST(res = bessel_j0(x);\n                 verify_component_wise(res, expected););\n  }\n\n  // Test Bessel function j1. Reference results obtained with SciPy.\n  {\n    ArrayType x(81);\n    ArrayType expected(81);\n    ArrayType res(81);\n\n    x << -40., -39., -38., -37., -36., -35., -34., -33., -32., -31., -30.,\n      -29., -28., -27., -26., -25., -24., -23., -22., -21., -20., -19.,\n      -18., -17., -16., -15., -14., -13., -12., -11., -10.,  -9.,  -8.,\n       -7.,  -6.,  -5.,  -4.,  -3.,  -2.,  -1.,   0.,   1.,   2.,   3.,\n        4.,   5.,   6.,   7.,   8.,   9.,  10.,  11.,  12.,  13.,  14.,\n       15.,  16.,  17.,  18.,  19.,  20.,  21.,  22.,  23.,  24.,  25.,\n       26.,  27.,  28.,  29.,  30.,  31.,  32.,  33.,  34.,  35.,  36.,\n       37.,  38.,  39.,  40.;\n\n    expected << -0.12603832, -0.0640561 ,  0.05916189,  0.13058004,  0.08232981,\n             -0.04399094, -0.13297118, -0.10061965,  0.02658903,  0.13302432,\n              0.11875106, -0.0069342 , -0.13055149, -0.13658472, -0.01504573,\n              0.12535025,  0.15403807,  0.03951932, -0.11717779, -0.17112027,\n             -0.06683312,  0.10570143,  0.18799489,  0.09766849, -0.09039718,\n             -0.20510404, -0.13337515,  0.07031805,  0.2234471 ,  0.1767853 ,\n             -0.04347275, -0.24531179, -0.23463635,  0.00468282,  0.27668386,\n              0.32757914,  0.06604333, -0.33905896, -0.57672481, -0.44005059,\n              0.        ,  0.44005059,  0.57672481,  0.33905896, -0.06604333,\n             -0.32757914, -0.27668386, -0.00468282,  0.23463635,  0.24531179,\n              0.04347275, -0.1767853 , -0.2234471 , -0.07031805,  0.13337515,\n              0.20510404,  0.09039718, -0.09766849, -0.18799489, -0.10570143,\n              0.06683312,  0.17112027,  0.11717779, -0.03951932, -0.15403807,\n             -0.12535025,  0.01504573,  0.13658472,  0.13055149,  0.0069342 ,\n             -0.11875106, -0.13302432, -0.02658903,  0.10061965,  0.13297118,\n              0.04399094, -0.08232981, -0.13058004, -0.05916189,  0.0640561 ,\n              0.12603832;\n\n    CALL_SUBTEST(res = bessel_j1(x);\n                 verify_component_wise(res, expected););\n  }\n  // Test Bessel function k0e. Reference results obtained with SciPy.\n  {\n    ArrayType x(42);\n    ArrayType expected(42);\n    ArrayType res(42);\n\n    x << 0.25, 0.5,  1.,  2.,  3.,  4.,  5.,  6.,  7.,  8.,  9., 10., 11., 12.,\n       13., 14., 15., 16., 17., 18., 19., 20., 21., 22., 23., 24., 25.,\n       26., 27., 28., 29., 30., 31., 32., 33., 34., 35., 36., 37., 38.,\n       39., 40.;\n\n    expected << 1.97933385, 1.52410939, 1.14446308, 0.84156822,\n             0.6977616 , 0.60929767, 0.54780756, 0.50186313, 0.4658451 ,\n             0.43662302, 0.41229555, 0.39163193, 0.3737955 , 0.35819488,\n             0.34439865, 0.33208364, 0.32100235, 0.31096159, 0.30180802,\n             0.29341821, 0.28569149, 0.27854488, 0.2719092 , 0.26572635,\n             0.25994703, 0.25452917, 0.2494366 , 0.24463801, 0.24010616,\n             0.23581722, 0.23175022, 0.22788667, 0.22421014, 0.22070602,\n             0.21736123, 0.21416406, 0.21110397, 0.20817141, 0.20535778,\n             0.20265524, 0.20005668, 0.19755558;\n\n    CALL_SUBTEST(res = bessel_k0e(x);\n                 verify_component_wise(res, expected););\n  }\n\n  // Test Bessel function k0. Reference results obtained with SciPy.\n  {\n    ArrayType x(42);\n    ArrayType expected(42);\n    ArrayType res(42);\n\n    x << 0.25, 0.5,  1.,  2.,  3.,  4.,  5.,  6.,  7.,  8.,  9., 10., 11., 12.,\n       13., 14., 15., 16., 17., 18., 19., 20., 21., 22., 23., 24., 25.,\n       26., 27., 28., 29., 30., 31., 32., 33., 34., 35., 36., 37., 38.,\n       39., 40.;\n\n    expected << 1.54150675, 0.92441907, 4.21024438e-01, 1.13893873e-01,\n             3.47395044e-02, 1.11596761e-02, 3.69109833e-03, 1.24399433e-03,\n             4.24795742e-04, 1.46470705e-04, 5.08813130e-05, 1.77800623e-05,\n             6.24302055e-06, 2.20082540e-06, 7.78454386e-07, 2.76137082e-07,\n             9.81953648e-08, 3.49941166e-08, 1.24946640e-08, 4.46875334e-09,\n             1.60067129e-09, 5.74123782e-10, 2.06176797e-10, 7.41235161e-11,\n             2.66754511e-11, 9.60881878e-12, 3.46416156e-12, 1.24987740e-12,\n             4.51286453e-13, 1.63053459e-13, 5.89495073e-14, 2.13247750e-14,\n             7.71838266e-15, 2.79505752e-15, 1.01266123e-15, 3.67057597e-16,\n             1.33103515e-16, 4.82858338e-17, 1.75232770e-17, 6.36161716e-18,\n             2.31029936e-18, 8.39286110e-19;\n\n    CALL_SUBTEST(res = bessel_k0(x);\n                 verify_component_wise(res, expected););\n  }\n\n  // Test Bessel function k0e. Reference results obtained with SciPy.\n  {\n    ArrayType x(42);\n    ArrayType expected(42);\n    ArrayType res(42);\n\n    x << 0.25, 0.5,  1.,  2.,  3.,  4.,  5.,  6.,  7.,  8.,  9., 10., 11., 12.,\n       13., 14., 15., 16., 17., 18., 19., 20., 21., 22., 23., 24., 25.,\n       26., 27., 28., 29., 30., 31., 32., 33., 34., 35., 36., 37., 38.,\n       39., 40.;\n\n    expected << 1.97933385, 1.52410939, 1.14446308, 0.84156822,\n             0.6977616 , 0.60929767, 0.54780756, 0.50186313,\n             0.4658451 , 0.43662302, 0.41229555, 0.39163193,\n             0.3737955 , 0.35819488, 0.34439865, 0.33208364,\n             0.32100235, 0.31096159, 0.30180802, 0.29341821,\n             0.28569149, 0.27854488, 0.2719092 , 0.26572635,\n             0.25994703, 0.25452917, 0.2494366 , 0.24463801,\n             0.24010616, 0.23581722, 0.23175022, 0.22788667,\n             0.22421014, 0.22070602, 0.21736123, 0.21416406,\n             0.21110397, 0.20817141, 0.20535778, 0.20265524,\n             0.20005668, 0.19755558;\n\n    CALL_SUBTEST(res = bessel_k0e(x);\n                 verify_component_wise(res, expected););\n  }\n\n  // Test Bessel function k1. Reference results obtained with SciPy.\n  {\n    ArrayType x(42);\n    ArrayType expected(42);\n    ArrayType res(42);\n\n    x << 0.25, 0.5,  1.,  2.,  3.,  4.,  5.,  6.,  7.,  8.,  9., 10., 11., 12.,\n       13., 14., 15., 16., 17., 18., 19., 20., 21., 22., 23., 24., 25.,\n       26., 27., 28., 29., 30., 31., 32., 33., 34., 35., 36., 37., 38.,\n       39., 40.;\n\n    expected << 3.74702597, 1.65644112, 6.01907230e-01, 1.39865882e-01,\n             4.01564311e-02, 1.24834989e-02, 4.04461345e-03, 1.34391972e-03,\n             4.54182487e-04, 1.55369212e-04, 5.36370164e-05, 1.86487735e-05,\n             6.52086067e-06, 2.29075746e-06, 8.07858841e-07, 2.85834365e-07,\n             1.01417294e-07, 3.60715712e-08, 1.28570417e-08, 4.59124963e-09,\n             1.64226697e-09, 5.88305797e-10, 2.11029922e-10, 7.57898116e-11,\n             2.72493059e-11, 9.80699893e-12, 3.53277807e-12, 1.27369078e-12,\n             4.59568940e-13, 1.65940011e-13, 5.99574032e-14, 2.16773200e-14,\n             7.84189960e-15, 2.83839927e-15, 1.02789171e-15, 3.72416929e-16,\n             1.34991783e-16, 4.89519373e-17, 1.77585196e-17, 6.44478588e-18,\n             2.33973340e-18, 8.49713195e-19;\n\n    CALL_SUBTEST(res = bessel_k1(x);\n                 verify_component_wise(res, expected););\n  }\n\n  // Test Bessel function k1e. Reference results obtained with SciPy.\n  {\n    ArrayType x(42);\n    ArrayType expected(42);\n    ArrayType res(42);\n\n    x << 0.25, 0.5,  1.,  2.,  3.,  4.,  5.,  6.,  7.,  8.,  9., 10., 11., 12.,\n       13., 14., 15., 16., 17., 18., 19., 20., 21., 22., 23., 24., 25.,\n       26., 27., 28., 29., 30., 31., 32., 33., 34., 35., 36., 37., 38.,\n       39., 40.;\n\n    expected << 4.81127659, 2.73100971, 1.63615349, 1.03347685,\n             0.80656348, 0.68157595, 0.60027386, 0.54217591,\n             0.49807158, 0.46314909, 0.43462525, 0.41076657,\n             0.39043094, 0.37283175, 0.35740757, 0.34374563,\n             0.33153489, 0.32053597, 0.31056123, 0.30146131,\n             0.29311559, 0.2854255 , 0.27830958, 0.27169987,\n             0.26553913, 0.25977879, 0.25437733, 0.249299  ,\n             0.24451285, 0.23999191, 0.2357126 , 0.23165413,\n             0.22779816, 0.22412841, 0.22063036, 0.21729103,\n             0.21409878, 0.21104314, 0.20811462, 0.20530466,\n             0.20260547, 0.20000997;\n\n    CALL_SUBTEST(res = bessel_k1e(x);\n                 verify_component_wise(res, expected););\n  }\n\n  // Test Bessel function y0. Reference results obtained with SciPy.\n  {\n    ArrayType x(42);\n    ArrayType expected(42);\n    ArrayType res(42);\n\n    x << 0.25, 0.5,  1.,  2.,  3.,  4.,  5.,  6.,  7.,  8.,  9., 10., 11., 12.,\n       13., 14., 15., 16., 17., 18., 19., 20., 21., 22., 23., 24., 25.,\n       26., 27., 28., 29., 30., 31., 32., 33., 34., 35., 36., 37., 38.,\n       39., 40.;\n\n    expected << -0.93157302, -0.44451873, 0.08825696,  0.51037567,  0.37685001,\n             -0.01694074, -0.30851763, -0.28819468, -0.02594974,  0.22352149,\n             0.2499367 ,  0.05567117, -0.16884732, -0.22523731, -0.07820786,\n             0.12719257,  0.2054643 , 0.095811  , -0.0926372 , -0.18755216,\n             -0.10951969,  0.0626406 , 0.17020176,  0.1198876 , -0.03598179,\n             -0.15283403, -0.12724943, 0.01204463,  0.13521498,  0.13183647,\n             0.00948116, -0.11729573, -0.13383266, -0.02874248,  0.09913483,\n             0.13340405,  0.04579799, -0.08085609, -0.13071488, -0.06066076,\n             0.06262353,  0.12593642;\n\n    CALL_SUBTEST(res = bessel_y0(x);\n                 verify_component_wise(res, expected););\n  }\n\n  // Test Bessel function y1. Reference results obtained with SciPy.\n  {\n    ArrayType x(42);\n    ArrayType expected(42);\n    ArrayType res(42);\n\n    x << 0.25, 0.5,  1.,  2.,  3.,  4.,  5.,  6.,  7.,  8.,  9., 10., 11., 12.,\n       13., 14., 15., 16., 17., 18., 19., 20., 21., 22., 23., 24., 25.,\n       26., 27., 28., 29., 30., 31., 32., 33., 34., 35., 36., 37., 38.,\n       39., 40.;\n\n    expected << -2.70410523, -1.47147239, -0.78121282, -0.10703243,\n             0.32467442,  0.39792571,  0.14786314, -0.17501034, -0.30266724,\n             -0.15806046,  0.10431458,  0.24901542, 0.16370554, -0.05709922,\n             -0.21008141, -0.16664484,  0.02107363, 0.17797517,  0.16720504,\n             0.00815513, -0.14956011, -0.16551161, -0.03253926,  0.12340586,\n             0.1616692 ,  0.05305978, -0.09882996, -0.15579655, -0.07025124,\n             0.07552213,  0.14803412,  0.08442557, -0.05337283, -0.13854483,\n             -0.09578012,  0.03238588,  0.12751273, 0.10445477, -0.01262946,\n             -0.11514066, -0.11056411, -0.00579351;\n\n    CALL_SUBTEST(res = bessel_y1(x);\n                 verify_component_wise(res, expected););\n  }\n}\n\nEIGEN_DECLARE_TEST(bessel_functions)\n{\n  CALL_SUBTEST_1(array_bessel_functions<ArrayXf>());\n  CALL_SUBTEST_2(array_bessel_functions<ArrayXd>());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_eventcount.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Dmitry Vyukov <dvyukov@google.com>\n// Copyright (C) 2016 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_USE_THREADS\n#include \"main.h\"\n#include <Eigen/CXX11/ThreadPool>\n\n// Visual studio doesn't implement a rand_r() function since its\n// implementation of rand() is already thread safe\nint rand_reentrant(unsigned int* s) {\n#ifdef EIGEN_COMP_MSVC_STRICT\n  EIGEN_UNUSED_VARIABLE(s);\n  return rand();\n#else\n  return rand_r(s);\n#endif\n}\n\nstatic void test_basic_eventcount()\n{\n  MaxSizeVector<EventCount::Waiter> waiters(1);\n  waiters.resize(1);\n  EventCount ec(waiters);\n  EventCount::Waiter& w = waiters[0];\n  ec.Notify(false);\n  ec.Prewait();\n  ec.Notify(true);\n  ec.CommitWait(&w);\n  ec.Prewait();\n  ec.CancelWait();\n}\n\n// Fake bounded counter-based queue.\nstruct TestQueue {\n  std::atomic<int> val_;\n  static const int kQueueSize = 10;\n\n  TestQueue() : val_() {}\n\n  ~TestQueue() { VERIFY_IS_EQUAL(val_.load(), 0); }\n\n  bool Push() {\n    int val = val_.load(std::memory_order_relaxed);\n    for (;;) {\n      VERIFY_GE(val, 0);\n      VERIFY_LE(val, kQueueSize);\n      if (val == kQueueSize) return false;\n      if (val_.compare_exchange_weak(val, val + 1, std::memory_order_relaxed))\n        return true;\n    }\n  }\n\n  bool Pop() {\n    int val = val_.load(std::memory_order_relaxed);\n    for (;;) {\n      VERIFY_GE(val, 0);\n      VERIFY_LE(val, kQueueSize);\n      if (val == 0) return false;\n      if (val_.compare_exchange_weak(val, val - 1, std::memory_order_relaxed))\n        return true;\n    }\n  }\n\n  bool Empty() { return val_.load(std::memory_order_relaxed) == 0; }\n};\n\nconst int TestQueue::kQueueSize;\n\n// A number of producers send messages to a set of consumers using a set of\n// fake queues. Ensure that it does not crash, consumers don't deadlock and\n// number of blocked and unblocked threads match.\nstatic void test_stress_eventcount()\n{\n  const int kThreads = std::thread::hardware_concurrency();\n  static const int kEvents = 1 << 16;\n  static const int kQueues = 10;\n\n  MaxSizeVector<EventCount::Waiter> waiters(kThreads);\n  waiters.resize(kThreads);\n  EventCount ec(waiters);\n  TestQueue queues[kQueues];\n\n  std::vector<std::unique_ptr<std::thread>> producers;\n  for (int i = 0; i < kThreads; i++) {\n    producers.emplace_back(new std::thread([&ec, &queues]() {\n      unsigned int rnd = static_cast<unsigned int>(std::hash<std::thread::id>()(std::this_thread::get_id()));\n      for (int j = 0; j < kEvents; j++) {\n        unsigned idx = rand_reentrant(&rnd) % kQueues;\n        if (queues[idx].Push()) {\n          ec.Notify(false);\n          continue;\n        }\n        EIGEN_THREAD_YIELD();\n        j--;\n      }\n    }));\n  }\n\n  std::vector<std::unique_ptr<std::thread>> consumers;\n  for (int i = 0; i < kThreads; i++) {\n    consumers.emplace_back(new std::thread([&ec, &queues, &waiters, i]() {\n      EventCount::Waiter& w = waiters[i];\n      unsigned int rnd = static_cast<unsigned int>(std::hash<std::thread::id>()(std::this_thread::get_id()));\n      for (int j = 0; j < kEvents; j++) {\n        unsigned idx = rand_reentrant(&rnd) % kQueues;\n        if (queues[idx].Pop()) continue;\n        j--;\n        ec.Prewait();\n        bool empty = true;\n        for (int q = 0; q < kQueues; q++) {\n          if (!queues[q].Empty()) {\n            empty = false;\n            break;\n          }\n        }\n        if (!empty) {\n          ec.CancelWait();\n          continue;\n        }\n        ec.CommitWait(&w);\n      }\n    }));\n  }\n\n  for (int i = 0; i < kThreads; i++) {\n    producers[i]->join();\n    consumers[i]->join();\n  }\n}\n\nEIGEN_DECLARE_TEST(cxx11_eventcount)\n{\n  CALL_SUBTEST(test_basic_eventcount());\n  CALL_SUBTEST(test_stress_eventcount());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_maxsizevector.cpp",
    "content": "#include \"main.h\"\n\n#include <exception>  // std::exception\n\n#include <unsupported/Eigen/CXX11/Tensor>\n\nstruct Foo\n{\n  static Index object_count;\n  static Index object_limit;\n  EIGEN_ALIGN_TO_BOUNDARY(128) int dummy;\n\n  Foo(int x=0) : dummy(x)\n  {\n#ifdef EIGEN_EXCEPTIONS\n    // TODO: Is this the correct way to handle this?\n    if (Foo::object_count > Foo::object_limit) { std::cout << \"\\nThrow!\\n\"; throw Foo::Fail(); }\n#endif\n    std::cout << '+';\n    ++Foo::object_count;\n    eigen_assert((internal::UIntPtr(this) & (127)) == 0);\n  }\n  Foo(const Foo&)\n  {\n    std::cout << 'c';\n    ++Foo::object_count;\n    eigen_assert((internal::UIntPtr(this) & (127)) == 0);\n  }\n\n  ~Foo()\n  {\n    std::cout << '~';\n    --Foo::object_count;\n  }\n\n  class Fail : public std::exception {};\n};\n\nIndex Foo::object_count = 0;\nIndex Foo::object_limit = 0;\n\n\n\nEIGEN_DECLARE_TEST(cxx11_maxsizevector)\n{\n  typedef MaxSizeVector<Foo> VectorX;\n  Foo::object_count = 0;\n  for(int r = 0; r < g_repeat; r++) {\n    Index rows = internal::random<Index>(3,30);\n    Foo::object_limit = internal::random<Index>(0, rows - 2);\n    std::cout << \"object_limit = \" << Foo::object_limit << std::endl;\n    bool exception_raised = false;\n#ifdef EIGEN_EXCEPTIONS\n    try\n    {\n#endif\n      std::cout <<       \"\\nVectorX m(\" << rows << \");\\n\";\n      VectorX vect(rows);\n      for(int i=0; i<rows; ++i)\n          vect.push_back(Foo());\n#ifdef EIGEN_EXCEPTIONS\n      VERIFY(false);  // not reached if exceptions are enabled\n    }\n    catch (const Foo::Fail&) { exception_raised = true; }\n    VERIFY(exception_raised);\n#endif\n    VERIFY_IS_EQUAL(Index(0), Foo::object_count);\n\n    {\n      Foo::object_limit = rows+1;\n      VectorX vect2(rows, Foo());\n      VERIFY_IS_EQUAL(Foo::object_count, rows);\n    }\n    VERIFY_IS_EQUAL(Index(0), Foo::object_count);\n    std::cout << '\\n';\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_meta.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2013 Christian Seiler <christian@iwakd.de>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <array>\n#include <Eigen/CXX11/src/util/CXX11Meta.h>\n\nusing Eigen::internal::is_same;\nusing Eigen::internal::type_list;\nusing Eigen::internal::numeric_list;\nusing Eigen::internal::gen_numeric_list;\nusing Eigen::internal::gen_numeric_list_reversed;\nusing Eigen::internal::gen_numeric_list_swapped_pair;\nusing Eigen::internal::gen_numeric_list_repeated;\nusing Eigen::internal::concat;\nusing Eigen::internal::mconcat;\nusing Eigen::internal::take;\nusing Eigen::internal::skip;\nusing Eigen::internal::slice;\nusing Eigen::internal::get;\nusing Eigen::internal::id_numeric;\nusing Eigen::internal::id_type;\nusing Eigen::internal::is_same_gf;\nusing Eigen::internal::apply_op_from_left;\nusing Eigen::internal::apply_op_from_right;\nusing Eigen::internal::contained_in_list;\nusing Eigen::internal::contained_in_list_gf;\nusing Eigen::internal::arg_prod;\nusing Eigen::internal::arg_sum;\nusing Eigen::internal::sum_op;\nusing Eigen::internal::product_op;\nusing Eigen::internal::array_reverse;\nusing Eigen::internal::array_sum;\nusing Eigen::internal::array_prod;\nusing Eigen::internal::array_reduce;\nusing Eigen::internal::array_zip;\nusing Eigen::internal::array_zip_and_reduce;\nusing Eigen::internal::array_apply;\nusing Eigen::internal::array_apply_and_reduce;\nusing Eigen::internal::repeat;\nusing Eigen::internal::instantiate_by_c_array;\n\nstruct dummy_a {};\nstruct dummy_b {};\nstruct dummy_c {};\nstruct dummy_d {};\nstruct dummy_e {};\n\n// dummy operation for testing apply\ntemplate<typename A, typename B> struct dummy_op;\ntemplate<> struct dummy_op<dummy_a, dummy_b> { typedef dummy_c type; };\ntemplate<> struct dummy_op<dummy_b, dummy_a> { typedef dummy_d type; };\ntemplate<> struct dummy_op<dummy_b, dummy_c> { typedef dummy_a type; };\ntemplate<> struct dummy_op<dummy_c, dummy_b> { typedef dummy_d type; };\ntemplate<> struct dummy_op<dummy_c, dummy_a> { typedef dummy_b type; };\ntemplate<> struct dummy_op<dummy_a, dummy_c> { typedef dummy_d type; };\ntemplate<> struct dummy_op<dummy_a, dummy_a> { typedef dummy_e type; };\ntemplate<> struct dummy_op<dummy_b, dummy_b> { typedef dummy_e type; };\ntemplate<> struct dummy_op<dummy_c, dummy_c> { typedef dummy_e type; };\n\ntemplate<typename A, typename B> struct dummy_test { constexpr static bool value = false; constexpr static int global_flags = 0; };\ntemplate<> struct dummy_test<dummy_a, dummy_a>     { constexpr static bool value = true;  constexpr static int global_flags = 1; };\ntemplate<> struct dummy_test<dummy_b, dummy_b>     { constexpr static bool value = true;  constexpr static int global_flags = 2; };\ntemplate<> struct dummy_test<dummy_c, dummy_c>     { constexpr static bool value = true;  constexpr static int global_flags = 4; };\n\nstruct times2_op { template<typename A> static A run(A v) { return v * 2; } };\n\nstruct dummy_inst\n{\n  int c;\n\n  dummy_inst() : c(0) {}\n  explicit dummy_inst(int) : c(1) {}\n  dummy_inst(int, int) : c(2) {}\n  dummy_inst(int, int, int) : c(3) {}\n  dummy_inst(int, int, int, int) : c(4) {}\n  dummy_inst(int, int, int, int, int) : c(5) {}\n};\n\nstatic void test_gen_numeric_list()\n{\n  VERIFY((is_same<typename gen_numeric_list<int, 0>::type, numeric_list<int>>::value));\n  VERIFY((is_same<typename gen_numeric_list<int, 1>::type, numeric_list<int, 0>>::value));\n  VERIFY((is_same<typename gen_numeric_list<int, 2>::type, numeric_list<int, 0, 1>>::value));\n  VERIFY((is_same<typename gen_numeric_list<int, 5>::type, numeric_list<int, 0, 1, 2, 3, 4>>::value));\n  VERIFY((is_same<typename gen_numeric_list<int, 10>::type, numeric_list<int, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9>>::value));\n\n  VERIFY((is_same<typename gen_numeric_list<int, 0, 42>::type, numeric_list<int>>::value));\n  VERIFY((is_same<typename gen_numeric_list<int, 1, 42>::type, numeric_list<int, 42>>::value));\n  VERIFY((is_same<typename gen_numeric_list<int, 2, 42>::type, numeric_list<int, 42, 43>>::value));\n  VERIFY((is_same<typename gen_numeric_list<int, 5, 42>::type, numeric_list<int, 42, 43, 44, 45, 46>>::value));\n  VERIFY((is_same<typename gen_numeric_list<int, 10, 42>::type, numeric_list<int, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51>>::value));\n\n  VERIFY((is_same<typename gen_numeric_list_reversed<int, 0>::type, numeric_list<int>>::value));\n  VERIFY((is_same<typename gen_numeric_list_reversed<int, 1>::type, numeric_list<int, 0>>::value));\n  VERIFY((is_same<typename gen_numeric_list_reversed<int, 2>::type, numeric_list<int, 1, 0>>::value));\n  VERIFY((is_same<typename gen_numeric_list_reversed<int, 5>::type, numeric_list<int, 4, 3, 2, 1, 0>>::value));\n  VERIFY((is_same<typename gen_numeric_list_reversed<int, 10>::type, numeric_list<int, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0>>::value));\n\n  VERIFY((is_same<typename gen_numeric_list_reversed<int, 0, 42>::type, numeric_list<int>>::value));\n  VERIFY((is_same<typename gen_numeric_list_reversed<int, 1, 42>::type, numeric_list<int, 42>>::value));\n  VERIFY((is_same<typename gen_numeric_list_reversed<int, 2, 42>::type, numeric_list<int, 43, 42>>::value));\n  VERIFY((is_same<typename gen_numeric_list_reversed<int, 5, 42>::type, numeric_list<int, 46, 45, 44, 43, 42>>::value));\n  VERIFY((is_same<typename gen_numeric_list_reversed<int, 10, 42>::type, numeric_list<int, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42>>::value));\n\n  VERIFY((is_same<typename gen_numeric_list_swapped_pair<int, 0, 2, 3>::type, numeric_list<int>>::value));\n  VERIFY((is_same<typename gen_numeric_list_swapped_pair<int, 1, 2, 3>::type, numeric_list<int, 0>>::value));\n  VERIFY((is_same<typename gen_numeric_list_swapped_pair<int, 2, 2, 3>::type, numeric_list<int, 0, 1>>::value));\n  VERIFY((is_same<typename gen_numeric_list_swapped_pair<int, 5, 2, 3>::type, numeric_list<int, 0, 1, 3, 2, 4>>::value));\n  VERIFY((is_same<typename gen_numeric_list_swapped_pair<int, 10, 2, 3>::type, numeric_list<int, 0, 1, 3, 2, 4, 5, 6, 7, 8, 9>>::value));\n\n  VERIFY((is_same<typename gen_numeric_list_swapped_pair<int, 0, 44, 45, 42>::type, numeric_list<int>>::value));\n  VERIFY((is_same<typename gen_numeric_list_swapped_pair<int, 1, 44, 45, 42>::type, numeric_list<int, 42>>::value));\n  VERIFY((is_same<typename gen_numeric_list_swapped_pair<int, 2, 44, 45, 42>::type, numeric_list<int, 42, 43>>::value));\n  VERIFY((is_same<typename gen_numeric_list_swapped_pair<int, 5, 44, 45, 42>::type, numeric_list<int, 42, 43, 45, 44, 46>>::value));\n  VERIFY((is_same<typename gen_numeric_list_swapped_pair<int, 10, 44, 45, 42>::type, numeric_list<int, 42, 43, 45, 44, 46, 47, 48, 49, 50, 51>>::value));\n\n  VERIFY((is_same<typename gen_numeric_list_repeated<int, 0, 0>::type, numeric_list<int>>::value));\n  VERIFY((is_same<typename gen_numeric_list_repeated<int, 1, 0>::type, numeric_list<int, 0>>::value));\n  VERIFY((is_same<typename gen_numeric_list_repeated<int, 2, 0>::type, numeric_list<int, 0, 0>>::value));\n  VERIFY((is_same<typename gen_numeric_list_repeated<int, 5, 0>::type, numeric_list<int, 0, 0, 0, 0, 0>>::value));\n  VERIFY((is_same<typename gen_numeric_list_repeated<int, 10, 0>::type, numeric_list<int, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0>>::value));\n}\n\nstatic void test_concat()\n{\n  VERIFY((is_same<typename concat<type_list<dummy_a, dummy_a>, type_list<>>::type, type_list<dummy_a, dummy_a>>::value));\n  VERIFY((is_same<typename concat<type_list<>, type_list<dummy_a, dummy_a>>::type, type_list<dummy_a, dummy_a>>::value));\n  VERIFY((is_same<typename concat<type_list<dummy_a, dummy_a>, type_list<dummy_a, dummy_a>>::type, type_list<dummy_a, dummy_a, dummy_a, dummy_a>>::value));\n  VERIFY((is_same<typename concat<type_list<dummy_a, dummy_a>, type_list<dummy_b, dummy_c>>::type, type_list<dummy_a, dummy_a, dummy_b, dummy_c>>::value));\n  VERIFY((is_same<typename concat<type_list<dummy_a>, type_list<dummy_b, dummy_c>>::type, type_list<dummy_a, dummy_b, dummy_c>>::value));\n\n  VERIFY((is_same<typename concat<numeric_list<int, 0, 0>, numeric_list<int>>::type, numeric_list<int, 0, 0>>::value));\n  VERIFY((is_same<typename concat<numeric_list<int>, numeric_list<int, 0, 0>>::type, numeric_list<int, 0, 0>>::value));\n  VERIFY((is_same<typename concat<numeric_list<int, 0, 0>, numeric_list<int, 0, 0>>::type, numeric_list<int, 0, 0, 0, 0>>::value));\n  VERIFY((is_same<typename concat<numeric_list<int, 0, 0>, numeric_list<int, 1, 2>>::type, numeric_list<int, 0, 0, 1, 2>>::value));\n  VERIFY((is_same<typename concat<numeric_list<int, 0>, numeric_list<int, 1, 2>>::type, numeric_list<int, 0, 1, 2>>::value));\n\n  VERIFY((is_same<typename mconcat<type_list<dummy_a>>::type, type_list<dummy_a>>::value));\n  VERIFY((is_same<typename mconcat<type_list<dummy_a>, type_list<dummy_b>>::type, type_list<dummy_a, dummy_b>>::value));\n  VERIFY((is_same<typename mconcat<type_list<dummy_a>, type_list<dummy_b>, type_list<dummy_c>>::type, type_list<dummy_a, dummy_b, dummy_c>>::value));\n  VERIFY((is_same<typename mconcat<type_list<dummy_a>, type_list<dummy_b, dummy_c>>::type, type_list<dummy_a, dummy_b, dummy_c>>::value));\n  VERIFY((is_same<typename mconcat<type_list<dummy_a, dummy_b>, type_list<dummy_c>>::type, type_list<dummy_a, dummy_b, dummy_c>>::value));\n\n  VERIFY((is_same<typename mconcat<numeric_list<int, 0>>::type, numeric_list<int, 0>>::value));\n  VERIFY((is_same<typename mconcat<numeric_list<int, 0>, numeric_list<int, 1>>::type, numeric_list<int, 0, 1>>::value));\n  VERIFY((is_same<typename mconcat<numeric_list<int, 0>, numeric_list<int, 1>, numeric_list<int, 2>>::type, numeric_list<int, 0, 1, 2>>::value));\n  VERIFY((is_same<typename mconcat<numeric_list<int, 0>, numeric_list<int, 1, 2>>::type, numeric_list<int, 0, 1, 2>>::value));\n  VERIFY((is_same<typename mconcat<numeric_list<int, 0, 1>, numeric_list<int, 2>>::type, numeric_list<int, 0, 1, 2>>::value));\n}\n\nstatic void test_slice()\n{\n  typedef type_list<dummy_a, dummy_a, dummy_b, dummy_b, dummy_c, dummy_c> tl;\n  typedef numeric_list<int, 0, 1, 2, 3, 4, 5> il;\n\n  VERIFY((is_same<typename take<0, tl>::type, type_list<>>::value));\n  VERIFY((is_same<typename take<1, tl>::type, type_list<dummy_a>>::value));\n  VERIFY((is_same<typename take<2, tl>::type, type_list<dummy_a, dummy_a>>::value));\n  VERIFY((is_same<typename take<3, tl>::type, type_list<dummy_a, dummy_a, dummy_b>>::value));\n  VERIFY((is_same<typename take<4, tl>::type, type_list<dummy_a, dummy_a, dummy_b, dummy_b>>::value));\n  VERIFY((is_same<typename take<5, tl>::type, type_list<dummy_a, dummy_a, dummy_b, dummy_b, dummy_c>>::value));\n  VERIFY((is_same<typename take<6, tl>::type, type_list<dummy_a, dummy_a, dummy_b, dummy_b, dummy_c, dummy_c>>::value));\n\n  VERIFY((is_same<typename take<0, il>::type, numeric_list<int>>::value));\n  VERIFY((is_same<typename take<1, il>::type, numeric_list<int, 0>>::value));\n  VERIFY((is_same<typename take<2, il>::type, numeric_list<int, 0, 1>>::value));\n  VERIFY((is_same<typename take<3, il>::type, numeric_list<int, 0, 1, 2>>::value));\n  VERIFY((is_same<typename take<4, il>::type, numeric_list<int, 0, 1, 2, 3>>::value));\n  VERIFY((is_same<typename take<5, il>::type, numeric_list<int, 0, 1, 2, 3, 4>>::value));\n  VERIFY((is_same<typename take<6, il>::type, numeric_list<int, 0, 1, 2, 3, 4, 5>>::value));\n  \n  VERIFY((is_same<typename skip<0, tl>::type, type_list<dummy_a, dummy_a, dummy_b, dummy_b, dummy_c, dummy_c>>::value));\n  VERIFY((is_same<typename skip<1, tl>::type, type_list<dummy_a, dummy_b, dummy_b, dummy_c, dummy_c>>::value));\n  VERIFY((is_same<typename skip<2, tl>::type, type_list<dummy_b, dummy_b, dummy_c, dummy_c>>::value));\n  VERIFY((is_same<typename skip<3, tl>::type, type_list<dummy_b, dummy_c, dummy_c>>::value));\n  VERIFY((is_same<typename skip<4, tl>::type, type_list<dummy_c, dummy_c>>::value));\n  VERIFY((is_same<typename skip<5, tl>::type, type_list<dummy_c>>::value));\n  VERIFY((is_same<typename skip<6, tl>::type, type_list<>>::value));\n\n  VERIFY((is_same<typename skip<0, il>::type, numeric_list<int, 0, 1, 2, 3, 4, 5>>::value));\n  VERIFY((is_same<typename skip<1, il>::type, numeric_list<int, 1, 2, 3, 4, 5>>::value));\n  VERIFY((is_same<typename skip<2, il>::type, numeric_list<int, 2, 3, 4, 5>>::value));\n  VERIFY((is_same<typename skip<3, il>::type, numeric_list<int, 3, 4, 5>>::value));\n  VERIFY((is_same<typename skip<4, il>::type, numeric_list<int, 4, 5>>::value));\n  VERIFY((is_same<typename skip<5, il>::type, numeric_list<int, 5>>::value));\n  VERIFY((is_same<typename skip<6, il>::type, numeric_list<int>>::value));\n\n  VERIFY((is_same<typename slice<0, 3, tl>::type, typename take<3, tl>::type>::value));\n  VERIFY((is_same<typename slice<0, 3, il>::type, typename take<3, il>::type>::value));\n  VERIFY((is_same<typename slice<1, 3, tl>::type, type_list<dummy_a, dummy_b, dummy_b>>::value));\n  VERIFY((is_same<typename slice<1, 3, il>::type, numeric_list<int, 1, 2, 3>>::value));\n}\n\nstatic void test_get()\n{\n  typedef type_list<dummy_a, dummy_a, dummy_b, dummy_b, dummy_c, dummy_c> tl;\n  typedef numeric_list<int, 4, 8, 15, 16, 23, 42> il;\n\n  VERIFY((is_same<typename get<0, tl>::type, dummy_a>::value));\n  VERIFY((is_same<typename get<1, tl>::type, dummy_a>::value));\n  VERIFY((is_same<typename get<2, tl>::type, dummy_b>::value));\n  VERIFY((is_same<typename get<3, tl>::type, dummy_b>::value));\n  VERIFY((is_same<typename get<4, tl>::type, dummy_c>::value));\n  VERIFY((is_same<typename get<5, tl>::type, dummy_c>::value));\n\n  VERIFY_IS_EQUAL(((int)get<0, il>::value), 4);\n  VERIFY_IS_EQUAL(((int)get<1, il>::value), 8);\n  VERIFY_IS_EQUAL(((int)get<2, il>::value), 15);\n  VERIFY_IS_EQUAL(((int)get<3, il>::value), 16);\n  VERIFY_IS_EQUAL(((int)get<4, il>::value), 23);\n  VERIFY_IS_EQUAL(((int)get<5, il>::value), 42);\n}\n\nstatic void test_id_helper(dummy_a a, dummy_a b, dummy_a c)\n{\n  (void)a;\n  (void)b;\n  (void)c;\n}\n\ntemplate<int... ii>\nstatic void test_id_numeric()\n{\n  test_id_helper(typename id_numeric<int, ii, dummy_a>::type()...);\n}\n\ntemplate<typename... tt>\nstatic void test_id_type()\n{\n  test_id_helper(typename id_type<tt, dummy_a>::type()...);\n}\n\nstatic void test_id()\n{\n  // don't call VERIFY here, just assume it works if it compiles\n  // (otherwise it will complain that it can't find the function)\n  test_id_numeric<1, 4, 6>();\n  test_id_type<dummy_a, dummy_b, dummy_c>();\n}\n\nstatic void test_is_same_gf()\n{\n  VERIFY((!is_same_gf<dummy_a, dummy_b>::value));\n  VERIFY((!!is_same_gf<dummy_a, dummy_a>::value));\n  VERIFY_IS_EQUAL((!!is_same_gf<dummy_a, dummy_b>::global_flags), false);\n  VERIFY_IS_EQUAL((!!is_same_gf<dummy_a, dummy_a>::global_flags), false);\n}\n\nstatic void test_apply_op()\n{\n  typedef type_list<dummy_a, dummy_b, dummy_c> tl;\n  VERIFY((!!is_same<typename apply_op_from_left<dummy_op, dummy_a, tl>::type, type_list<dummy_e, dummy_c, dummy_d>>::value));\n  VERIFY((!!is_same<typename apply_op_from_right<dummy_op, dummy_a, tl>::type, type_list<dummy_e, dummy_d, dummy_b>>::value));\n}\n\nstatic void test_contained_in_list()\n{\n  typedef type_list<dummy_a, dummy_b, dummy_c> tl;\n\n  VERIFY((!!contained_in_list<is_same, dummy_a, tl>::value));\n  VERIFY((!!contained_in_list<is_same, dummy_b, tl>::value));\n  VERIFY((!!contained_in_list<is_same, dummy_c, tl>::value));\n  VERIFY((!contained_in_list<is_same, dummy_d, tl>::value));\n  VERIFY((!contained_in_list<is_same, dummy_e, tl>::value));\n\n  VERIFY((!!contained_in_list_gf<dummy_test, dummy_a, tl>::value));\n  VERIFY((!!contained_in_list_gf<dummy_test, dummy_b, tl>::value));\n  VERIFY((!!contained_in_list_gf<dummy_test, dummy_c, tl>::value));\n  VERIFY((!contained_in_list_gf<dummy_test, dummy_d, tl>::value));\n  VERIFY((!contained_in_list_gf<dummy_test, dummy_e, tl>::value));\n\n  VERIFY_IS_EQUAL(((int)contained_in_list_gf<dummy_test, dummy_a, tl>::global_flags), 1);\n  VERIFY_IS_EQUAL(((int)contained_in_list_gf<dummy_test, dummy_b, tl>::global_flags), 2);\n  VERIFY_IS_EQUAL(((int)contained_in_list_gf<dummy_test, dummy_c, tl>::global_flags), 4);\n  VERIFY_IS_EQUAL(((int)contained_in_list_gf<dummy_test, dummy_d, tl>::global_flags), 0);\n  VERIFY_IS_EQUAL(((int)contained_in_list_gf<dummy_test, dummy_e, tl>::global_flags), 0);\n}\n\nstatic void test_arg_reductions()\n{\n  VERIFY_IS_EQUAL(arg_sum(1,2,3,4), 10);\n  VERIFY_IS_EQUAL(arg_prod(1,2,3,4), 24);\n  VERIFY_IS_APPROX(arg_sum(0.5, 2, 5), 7.5);\n  VERIFY_IS_APPROX(arg_prod(0.5, 2, 5), 5.0);\n}\n\nstatic void test_array_reverse_and_reduce()\n{\n  array<int, 6> a{{4, 8, 15, 16, 23, 42}};\n  array<int, 6> b{{42, 23, 16, 15, 8, 4}};\n\n  // there is no operator<< for std::array, so VERIFY_IS_EQUAL will\n  // not compile\n  VERIFY((array_reverse(a) == b));\n  VERIFY((array_reverse(b) == a));\n  VERIFY_IS_EQUAL((array_sum(a)), 108);\n  VERIFY_IS_EQUAL((array_sum(b)), 108);\n  VERIFY_IS_EQUAL((array_prod(a)), 7418880);\n  VERIFY_IS_EQUAL((array_prod(b)), 7418880);\n}\n\nstatic void test_array_zip_and_apply()\n{\n  array<int, 6> a{{4, 8, 15, 16, 23, 42}};\n  array<int, 6> b{{0, 1, 2, 3, 4, 5}};\n  array<int, 6> c{{4, 9, 17, 19, 27, 47}};\n  array<int, 6> d{{0, 8, 30, 48, 92, 210}};\n  array<int, 6> e{{0, 2, 4, 6, 8, 10}};\n\n  VERIFY((array_zip<sum_op>(a, b) == c));\n  VERIFY((array_zip<product_op>(a, b) == d));\n  VERIFY((array_apply<times2_op>(b) == e));\n  VERIFY_IS_EQUAL((array_apply_and_reduce<sum_op, times2_op>(a)), 216);\n  VERIFY_IS_EQUAL((array_apply_and_reduce<sum_op, times2_op>(b)), 30);\n  VERIFY_IS_EQUAL((array_zip_and_reduce<product_op, sum_op>(a, b)), 14755932);\n  VERIFY_IS_EQUAL((array_zip_and_reduce<sum_op, product_op>(a, b)), 388);\n}\n\nstatic void test_array_misc()\n{\n  array<int, 3> a3{{1, 1, 1}};\n  array<int, 6> a6{{2, 2, 2, 2, 2, 2}};\n  VERIFY((repeat<3, int>(1) == a3));\n  VERIFY((repeat<6, int>(2) == a6));\n\n  int data[5] = { 0, 1, 2, 3, 4 };\n  VERIFY_IS_EQUAL((instantiate_by_c_array<dummy_inst, int, 0>(data).c), 0);\n  VERIFY_IS_EQUAL((instantiate_by_c_array<dummy_inst, int, 1>(data).c), 1);\n  VERIFY_IS_EQUAL((instantiate_by_c_array<dummy_inst, int, 2>(data).c), 2);\n  VERIFY_IS_EQUAL((instantiate_by_c_array<dummy_inst, int, 3>(data).c), 3);\n  VERIFY_IS_EQUAL((instantiate_by_c_array<dummy_inst, int, 4>(data).c), 4);\n  VERIFY_IS_EQUAL((instantiate_by_c_array<dummy_inst, int, 5>(data).c), 5);\n}\n\nEIGEN_DECLARE_TEST(cxx11_meta)\n{\n  CALL_SUBTEST(test_gen_numeric_list());\n  CALL_SUBTEST(test_concat());\n  CALL_SUBTEST(test_slice());\n  CALL_SUBTEST(test_get());\n  CALL_SUBTEST(test_id());\n  CALL_SUBTEST(test_is_same_gf());\n  CALL_SUBTEST(test_apply_op());\n  CALL_SUBTEST(test_contained_in_list());\n  CALL_SUBTEST(test_arg_reductions());\n  CALL_SUBTEST(test_array_reverse_and_reduce());\n  CALL_SUBTEST(test_array_zip_and_apply());\n  CALL_SUBTEST(test_array_misc());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_non_blocking_thread_pool.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Dmitry Vyukov <dvyukov@google.com>\n// Copyright (C) 2016 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_USE_THREADS\n#include \"main.h\"\n#include \"Eigen/CXX11/ThreadPool\"\n#include \"Eigen/CXX11/Tensor\"\n\nstatic void test_create_destroy_empty_pool()\n{\n  // Just create and destroy the pool. This will wind up and tear down worker\n  // threads. Ensure there are no issues in that logic.\n  for (int i = 0; i < 16; ++i) {\n    ThreadPool tp(i);\n  }\n}\n\n\nstatic void test_parallelism(bool allow_spinning)\n{\n  // Test we never-ever fail to match available tasks with idle threads.\n  const int kThreads = 16;  // code below expects that this is a multiple of 4\n  ThreadPool tp(kThreads, allow_spinning);\n  VERIFY_IS_EQUAL(tp.NumThreads(), kThreads);\n  VERIFY_IS_EQUAL(tp.CurrentThreadId(), -1);\n  for (int iter = 0; iter < 100; ++iter) {\n    std::atomic<int> running(0);\n    std::atomic<int> done(0);\n    std::atomic<int> phase(0);\n    // Schedule kThreads tasks and ensure that they all are running.\n    for (int i = 0; i < kThreads; ++i) {\n      tp.Schedule([&]() {\n        const int thread_id = tp.CurrentThreadId();\n        VERIFY_GE(thread_id, 0);\n        VERIFY_LE(thread_id, kThreads - 1);\n        running++;\n        while (phase < 1) {\n        }\n        done++;\n      });\n    }\n    while (running != kThreads) {\n    }\n    running = 0;\n    phase = 1;\n    // Now, while the previous tasks exit, schedule another kThreads tasks and\n    // ensure that they are running.\n    for (int i = 0; i < kThreads; ++i) {\n      tp.Schedule([&, i]() {\n        running++;\n        while (phase < 2) {\n        }\n        // When all tasks are running, half of tasks exit, quarter of tasks\n        // continue running and quarter of tasks schedule another 2 tasks each.\n        // Concurrently main thread schedules another quarter of tasks.\n        // This gives us another kThreads tasks and we ensure that they all\n        // are running.\n        if (i < kThreads / 2) {\n        } else if (i < 3 * kThreads / 4) {\n          running++;\n          while (phase < 3) {\n          }\n          done++;\n        } else {\n          for (int j = 0; j < 2; ++j) {\n            tp.Schedule([&]() {\n              running++;\n              while (phase < 3) {\n              }\n              done++;\n            });\n          }\n        }\n        done++;\n      });\n    }\n    while (running != kThreads) {\n    }\n    running = 0;\n    phase = 2;\n    for (int i = 0; i < kThreads / 4; ++i) {\n      tp.Schedule([&]() {\n        running++;\n        while (phase < 3) {\n        }\n        done++;\n      });\n    }\n    while (running != kThreads) {\n    }\n    phase = 3;\n    while (done != 3 * kThreads) {\n    }\n  }\n}\n\n\nstatic void test_cancel()\n{\n  ThreadPool tp(2);\n\n  // Schedule a large number of closure that each sleeps for one second. This\n  // will keep the thread pool busy for much longer than the default test timeout.\n  for (int i = 0; i < 1000; ++i) {\n    tp.Schedule([]() { EIGEN_SLEEP(2000); });\n  }\n\n  // Cancel the processing of all the closures that are still pending.\n  tp.Cancel();\n}\n\nstatic void test_pool_partitions() {\n  const int kThreads = 2;\n  ThreadPool tp(kThreads);\n\n  // Assign each thread to its own partition, so that stealing other work only\n  // occurs globally when a thread is idle.\n  std::vector<std::pair<unsigned, unsigned>> steal_partitions(kThreads);\n  for (int i = 0; i < kThreads; ++i) {\n    steal_partitions[i] = std::make_pair(i, i + 1);\n  }\n  tp.SetStealPartitions(steal_partitions);\n\n  std::atomic<int> running(0);\n  std::atomic<int> done(0);\n  std::atomic<int> phase(0);\n\n  // Schedule kThreads tasks and ensure that they all are running.\n  for (int i = 0; i < kThreads; ++i) {\n    tp.Schedule([&]() {\n      const int thread_id = tp.CurrentThreadId();\n      VERIFY_GE(thread_id, 0);\n      VERIFY_LE(thread_id, kThreads - 1);\n      ++running;\n      while (phase < 1) {\n      }\n      ++done;\n    });\n  }\n  while (running != kThreads) {\n  }\n  // Schedule each closure to only run on thread 'i' and verify that it does.\n  for (int i = 0; i < kThreads; ++i) {\n    tp.ScheduleWithHint(\n        [&, i]() {\n          ++running;\n          const int thread_id = tp.CurrentThreadId();\n          VERIFY_IS_EQUAL(thread_id, i);\n          while (phase < 2) {\n          }\n          ++done;\n        },\n        i, i + 1);\n  }\n  running = 0;\n  phase = 1;\n  while (running != kThreads) {\n  }\n  running = 0;\n  phase = 2;\n}\n\n\nEIGEN_DECLARE_TEST(cxx11_non_blocking_thread_pool)\n{\n  CALL_SUBTEST(test_create_destroy_empty_pool());\n  CALL_SUBTEST(test_parallelism(true));\n  CALL_SUBTEST(test_parallelism(false));\n  CALL_SUBTEST(test_cancel());\n  CALL_SUBTEST(test_pool_partitions());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_runqueue.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Dmitry Vyukov <dvyukov@google.com>\n// Copyright (C) 2016 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_USE_THREADS\n#include <cstdlib>\n#include \"main.h\"\n#include <Eigen/CXX11/ThreadPool>\n\n\n// Visual studio doesn't implement a rand_r() function since its\n// implementation of rand() is already thread safe\nint rand_reentrant(unsigned int* s) {\n#ifdef EIGEN_COMP_MSVC_STRICT\n  EIGEN_UNUSED_VARIABLE(s);\n  return rand();\n#else\n  return rand_r(s);\n#endif\n}\n\nvoid test_basic_runqueue()\n{\n  RunQueue<int, 4> q;\n  // Check empty state.\n  VERIFY(q.Empty());\n  VERIFY_IS_EQUAL(0u, q.Size());\n  VERIFY_IS_EQUAL(0, q.PopFront());\n  std::vector<int> stolen;\n  VERIFY_IS_EQUAL(0u, q.PopBackHalf(&stolen));\n  VERIFY_IS_EQUAL(0u, stolen.size());\n  // Push one front, pop one front.\n  VERIFY_IS_EQUAL(0, q.PushFront(1));\n  VERIFY_IS_EQUAL(1u, q.Size());\n  VERIFY_IS_EQUAL(1, q.PopFront());\n  VERIFY_IS_EQUAL(0u, q.Size());\n  // Push front to overflow.\n  VERIFY_IS_EQUAL(0, q.PushFront(2));\n  VERIFY_IS_EQUAL(1u, q.Size());\n  VERIFY_IS_EQUAL(0, q.PushFront(3));\n  VERIFY_IS_EQUAL(2u, q.Size());\n  VERIFY_IS_EQUAL(0, q.PushFront(4));\n  VERIFY_IS_EQUAL(3u, q.Size());\n  VERIFY_IS_EQUAL(0, q.PushFront(5));\n  VERIFY_IS_EQUAL(4u, q.Size());\n  VERIFY_IS_EQUAL(6, q.PushFront(6));\n  VERIFY_IS_EQUAL(4u, q.Size());\n  VERIFY_IS_EQUAL(5, q.PopFront());\n  VERIFY_IS_EQUAL(3u, q.Size());\n  VERIFY_IS_EQUAL(4, q.PopFront());\n  VERIFY_IS_EQUAL(2u, q.Size());\n  VERIFY_IS_EQUAL(3, q.PopFront());\n  VERIFY_IS_EQUAL(1u, q.Size());\n  VERIFY_IS_EQUAL(2, q.PopFront());\n  VERIFY_IS_EQUAL(0u, q.Size());\n  VERIFY_IS_EQUAL(0, q.PopFront());\n  // Push one back, pop one back.\n  VERIFY_IS_EQUAL(0, q.PushBack(7));\n  VERIFY_IS_EQUAL(1u, q.Size());\n  VERIFY_IS_EQUAL(1u, q.PopBackHalf(&stolen));\n  VERIFY_IS_EQUAL(1u, stolen.size());\n  VERIFY_IS_EQUAL(7, stolen[0]);\n  VERIFY_IS_EQUAL(0u, q.Size());\n  stolen.clear();\n  // Push back to overflow.\n  VERIFY_IS_EQUAL(0, q.PushBack(8));\n  VERIFY_IS_EQUAL(1u, q.Size());\n  VERIFY_IS_EQUAL(0, q.PushBack(9));\n  VERIFY_IS_EQUAL(2u, q.Size());\n  VERIFY_IS_EQUAL(0, q.PushBack(10));\n  VERIFY_IS_EQUAL(3u, q.Size());\n  VERIFY_IS_EQUAL(0, q.PushBack(11));\n  VERIFY_IS_EQUAL(4u, q.Size());\n  VERIFY_IS_EQUAL(12, q.PushBack(12));\n  VERIFY_IS_EQUAL(4u, q.Size());\n  // Pop back in halves.\n  VERIFY_IS_EQUAL(2u, q.PopBackHalf(&stolen));\n  VERIFY_IS_EQUAL(2u, stolen.size());\n  VERIFY_IS_EQUAL(10, stolen[0]);\n  VERIFY_IS_EQUAL(11, stolen[1]);\n  VERIFY_IS_EQUAL(2u, q.Size());\n  stolen.clear();\n  VERIFY_IS_EQUAL(1u, q.PopBackHalf(&stolen));\n  VERIFY_IS_EQUAL(1u, stolen.size());\n  VERIFY_IS_EQUAL(9, stolen[0]);\n  VERIFY_IS_EQUAL(1u, q.Size());\n  stolen.clear();\n  VERIFY_IS_EQUAL(1u, q.PopBackHalf(&stolen));\n  VERIFY_IS_EQUAL(1u, stolen.size());\n  VERIFY_IS_EQUAL(8, stolen[0]);\n  stolen.clear();\n  VERIFY_IS_EQUAL(0u, q.PopBackHalf(&stolen));\n  VERIFY_IS_EQUAL(0u, stolen.size());\n  // Empty again.\n  VERIFY(q.Empty());\n  VERIFY_IS_EQUAL(0u, q.Size());\n  VERIFY_IS_EQUAL(0, q.PushFront(1));\n  VERIFY_IS_EQUAL(0, q.PushFront(2));\n  VERIFY_IS_EQUAL(0, q.PushFront(3));\n  VERIFY_IS_EQUAL(1, q.PopBack());\n  VERIFY_IS_EQUAL(2, q.PopBack());\n  VERIFY_IS_EQUAL(3, q.PopBack());\n  VERIFY(q.Empty());\n  VERIFY_IS_EQUAL(0u, q.Size());\n}\n\n// Empty tests that the queue is not claimed to be empty when is is in fact not.\n// Emptiness property is crucial part of thread pool blocking scheme,\n// so we go to great effort to ensure this property. We create a queue with\n// 1 element and then push 1 element (either front or back at random) and pop\n// 1 element (either front or back at random). So queue always contains at least\n// 1 element, but otherwise changes chaotically. Another thread constantly tests\n// that the queue is not claimed to be empty.\nvoid test_empty_runqueue()\n{\n  RunQueue<int, 4> q;\n  q.PushFront(1);\n  std::atomic<bool> done(false);\n  std::thread mutator([&q, &done]() {\n    unsigned rnd = 0;\n    std::vector<int> stolen;\n    for (int i = 0; i < 1 << 18; i++) {\n      if (rand_reentrant(&rnd) % 2)\n        VERIFY_IS_EQUAL(0, q.PushFront(1));\n      else\n        VERIFY_IS_EQUAL(0, q.PushBack(1));\n      if (rand_reentrant(&rnd) % 2)\n        VERIFY_IS_EQUAL(1, q.PopFront());\n      else {\n        for (;;) {\n          if (q.PopBackHalf(&stolen) == 1) {\n            stolen.clear();\n            break;\n          }\n          VERIFY_IS_EQUAL(0u, stolen.size());\n        }\n      }\n    }\n    done = true;\n  });\n  while (!done) {\n    VERIFY(!q.Empty());\n    int size = q.Size();\n    VERIFY_GE(size, 1);\n    VERIFY_LE(size, 2);\n  }\n  VERIFY_IS_EQUAL(1, q.PopFront());\n  mutator.join();\n}\n\n// Stress is a chaotic random test.\n// One thread (owner) calls PushFront/PopFront, other threads call PushBack/\n// PopBack. Ensure that we don't crash, deadlock, and all sanity checks pass.\nvoid test_stress_runqueue()\n{\n  static const int kEvents = 1 << 18;\n  RunQueue<int, 8> q;\n  std::atomic<int> total(0);\n  std::vector<std::unique_ptr<std::thread>> threads;\n  threads.emplace_back(new std::thread([&q, &total]() {\n    int sum = 0;\n    int pushed = 1;\n    int popped = 1;\n    while (pushed < kEvents || popped < kEvents) {\n      if (pushed < kEvents) {\n        if (q.PushFront(pushed) == 0) {\n          sum += pushed;\n          pushed++;\n        }\n      }\n      if (popped < kEvents) {\n        int v = q.PopFront();\n        if (v != 0) {\n          sum -= v;\n          popped++;\n        }\n      }\n    }\n    total += sum;\n  }));\n  for (int i = 0; i < 2; i++) {\n    threads.emplace_back(new std::thread([&q, &total]() {\n      int sum = 0;\n      for (int j = 1; j < kEvents; j++) {\n        if (q.PushBack(j) == 0) {\n          sum += j;\n          continue;\n        }\n        EIGEN_THREAD_YIELD();\n        j--;\n      }\n      total += sum;\n    }));\n    threads.emplace_back(new std::thread([&q, &total]() {\n      int sum = 0;\n      std::vector<int> stolen;\n      for (int j = 1; j < kEvents;) {\n        if (q.PopBackHalf(&stolen) == 0) {\n          EIGEN_THREAD_YIELD();\n          continue;\n        }\n        while (stolen.size() && j < kEvents) {\n          int v = stolen.back();\n          stolen.pop_back();\n          VERIFY_IS_NOT_EQUAL(v, 0);\n          sum += v;\n          j++;\n        }\n      }\n      while (stolen.size()) {\n        int v = stolen.back();\n        stolen.pop_back();\n        VERIFY_IS_NOT_EQUAL(v, 0);\n        while ((v = q.PushBack(v)) != 0) EIGEN_THREAD_YIELD();\n      }\n      total -= sum;\n    }));\n  }\n  for (size_t i = 0; i < threads.size(); i++) threads[i]->join();\n  VERIFY(q.Empty());\n  VERIFY(total.load() == 0);\n}\n\nEIGEN_DECLARE_TEST(cxx11_runqueue)\n{\n  CALL_SUBTEST_1(test_basic_runqueue());\n  CALL_SUBTEST_2(test_empty_runqueue());\n  CALL_SUBTEST_3(test_stress_runqueue());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_argmax.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Eugene Brevdo <ebrevdo@google.com>\n//                    Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\nusing Eigen::array;\nusing Eigen::Tuple;\n\ntemplate <int DataLayout>\nstatic void test_simple_index_tuples()\n{\n  Tensor<float, 4, DataLayout> tensor(2,3,5,7);\n  tensor.setRandom();\n  tensor = (tensor + tensor.constant(0.5)).log();\n\n  Tensor<Tuple<DenseIndex, float>, 4, DataLayout> index_tuples(2,3,5,7);\n  index_tuples = tensor.index_tuples();\n\n  for (DenseIndex n = 0; n < 2*3*5*7; ++n) {\n    const Tuple<DenseIndex, float>& v = index_tuples.coeff(n);\n    VERIFY_IS_EQUAL(v.first, n);\n    VERIFY_IS_EQUAL(v.second, tensor.coeff(n));\n  }\n}\n\ntemplate <int DataLayout>\nstatic void test_index_tuples_dim()\n{\n  Tensor<float, 4, DataLayout> tensor(2,3,5,7);\n  tensor.setRandom();\n  tensor = (tensor + tensor.constant(0.5)).log();\n\n  Tensor<Tuple<DenseIndex, float>, 4, DataLayout> index_tuples(2,3,5,7);\n\n  index_tuples = tensor.index_tuples();\n\n  for (Eigen::DenseIndex n = 0; n < tensor.size(); ++n) {\n    const Tuple<DenseIndex, float>& v = index_tuples(n); //(i, j, k, l);\n    VERIFY_IS_EQUAL(v.first, n);\n    VERIFY_IS_EQUAL(v.second, tensor(n));\n  }\n}\n\ntemplate <int DataLayout>\nstatic void test_argmax_tuple_reducer()\n{\n  Tensor<float, 4, DataLayout> tensor(2,3,5,7);\n  tensor.setRandom();\n  tensor = (tensor + tensor.constant(0.5)).log();\n\n  Tensor<Tuple<DenseIndex, float>, 4, DataLayout> index_tuples(2,3,5,7);\n  index_tuples = tensor.index_tuples();\n\n  Tensor<Tuple<DenseIndex, float>, 0, DataLayout> reduced;\n  DimensionList<DenseIndex, 4> dims;\n  reduced = index_tuples.reduce(\n      dims, internal::ArgMaxTupleReducer<Tuple<DenseIndex, float> >());\n\n  Tensor<float, 0, DataLayout> maxi = tensor.maximum();\n\n  VERIFY_IS_EQUAL(maxi(), reduced(0).second);\n\n  array<DenseIndex, 3> reduce_dims;\n  for (int d = 0; d < 3; ++d) reduce_dims[d] = d;\n  Tensor<Tuple<DenseIndex, float>, 1, DataLayout> reduced_by_dims(7);\n  reduced_by_dims = index_tuples.reduce(\n      reduce_dims, internal::ArgMaxTupleReducer<Tuple<DenseIndex, float> >());\n\n  Tensor<float, 1, DataLayout> max_by_dims = tensor.maximum(reduce_dims);\n\n  for (int l = 0; l < 7; ++l) {\n    VERIFY_IS_EQUAL(max_by_dims(l), reduced_by_dims(l).second);\n  }\n}\n\ntemplate <int DataLayout>\nstatic void test_argmin_tuple_reducer()\n{\n  Tensor<float, 4, DataLayout> tensor(2,3,5,7);\n  tensor.setRandom();\n  tensor = (tensor + tensor.constant(0.5)).log();\n\n  Tensor<Tuple<DenseIndex, float>, 4, DataLayout> index_tuples(2,3,5,7);\n  index_tuples = tensor.index_tuples();\n\n  Tensor<Tuple<DenseIndex, float>, 0, DataLayout> reduced;\n  DimensionList<DenseIndex, 4> dims;\n  reduced = index_tuples.reduce(\n      dims, internal::ArgMinTupleReducer<Tuple<DenseIndex, float> >());\n\n  Tensor<float, 0, DataLayout> mini = tensor.minimum();\n\n  VERIFY_IS_EQUAL(mini(), reduced(0).second);\n\n  array<DenseIndex, 3> reduce_dims;\n  for (int d = 0; d < 3; ++d) reduce_dims[d] = d;\n  Tensor<Tuple<DenseIndex, float>, 1, DataLayout> reduced_by_dims(7);\n  reduced_by_dims = index_tuples.reduce(\n      reduce_dims, internal::ArgMinTupleReducer<Tuple<DenseIndex, float> >());\n\n  Tensor<float, 1, DataLayout> min_by_dims = tensor.minimum(reduce_dims);\n\n  for (int l = 0; l < 7; ++l) {\n    VERIFY_IS_EQUAL(min_by_dims(l), reduced_by_dims(l).second);\n  }\n}\n\ntemplate <int DataLayout>\nstatic void test_simple_argmax()\n{\n  Tensor<float, 4, DataLayout> tensor(2,3,5,7);\n  tensor.setRandom();\n  tensor = (tensor + tensor.constant(0.5)).log();\n  tensor(0,0,0,0) = 10.0;\n\n  Tensor<DenseIndex, 0, DataLayout> tensor_argmax;\n\n  tensor_argmax = tensor.argmax();\n\n  VERIFY_IS_EQUAL(tensor_argmax(0), 0);\n\n  tensor(1,2,4,6) = 20.0;\n\n  tensor_argmax = tensor.argmax();\n\n  VERIFY_IS_EQUAL(tensor_argmax(0), 2*3*5*7 - 1);\n}\n\ntemplate <int DataLayout>\nstatic void test_simple_argmin()\n{\n  Tensor<float, 4, DataLayout> tensor(2,3,5,7);\n  tensor.setRandom();\n  tensor = (tensor + tensor.constant(0.5)).log();\n  tensor(0,0,0,0) = -10.0;\n\n  Tensor<DenseIndex, 0, DataLayout> tensor_argmin;\n\n  tensor_argmin = tensor.argmin();\n\n  VERIFY_IS_EQUAL(tensor_argmin(0), 0);\n\n  tensor(1,2,4,6) = -20.0;\n\n  tensor_argmin = tensor.argmin();\n\n  VERIFY_IS_EQUAL(tensor_argmin(0), 2*3*5*7 - 1);\n}\n\ntemplate <int DataLayout>\nstatic void test_argmax_dim()\n{\n  Tensor<float, 4, DataLayout> tensor(2,3,5,7);\n  std::vector<int> dims {2, 3, 5, 7};\n\n  for (int dim = 0; dim < 4; ++dim) {\n    tensor.setRandom();\n    tensor = (tensor + tensor.constant(0.5)).log();\n\n    Tensor<DenseIndex, 3, DataLayout> tensor_argmax;\n    array<DenseIndex, 4> ix;\n    for (int i = 0; i < 2; ++i) {\n      for (int j = 0; j < 3; ++j) {\n        for (int k = 0; k < 5; ++k) {\n          for (int l = 0; l < 7; ++l) {\n            ix[0] = i; ix[1] = j; ix[2] = k; ix[3] = l;\n            if (ix[dim] != 0) continue;\n            // suppose dim == 1, then for all i, k, l, set tensor(i, 0, k, l) = 10.0\n            tensor(ix) = 10.0;\n          }\n        }\n      }\n    }\n\n    tensor_argmax = tensor.argmax(dim);\n\n    VERIFY_IS_EQUAL(tensor_argmax.size(),\n                    ptrdiff_t(2*3*5*7 / tensor.dimension(dim)));\n    for (ptrdiff_t n = 0; n < tensor_argmax.size(); ++n) {\n      // Expect max to be in the first index of the reduced dimension\n      VERIFY_IS_EQUAL(tensor_argmax.data()[n], 0);\n    }\n\n    for (int i = 0; i < 2; ++i) {\n      for (int j = 0; j < 3; ++j) {\n        for (int k = 0; k < 5; ++k) {\n          for (int l = 0; l < 7; ++l) {\n            ix[0] = i; ix[1] = j; ix[2] = k; ix[3] = l;\n            if (ix[dim] != tensor.dimension(dim) - 1) continue;\n            // suppose dim == 1, then for all i, k, l, set tensor(i, 2, k, l) = 20.0\n            tensor(ix) = 20.0;\n          }\n        }\n      }\n    }\n\n    tensor_argmax = tensor.argmax(dim);\n\n    VERIFY_IS_EQUAL(tensor_argmax.size(),\n                    ptrdiff_t(2*3*5*7 / tensor.dimension(dim)));\n    for (ptrdiff_t n = 0; n < tensor_argmax.size(); ++n) {\n      // Expect max to be in the last index of the reduced dimension\n      VERIFY_IS_EQUAL(tensor_argmax.data()[n], tensor.dimension(dim) - 1);\n    }\n  }\n}\n\ntemplate <int DataLayout>\nstatic void test_argmin_dim()\n{\n  Tensor<float, 4, DataLayout> tensor(2,3,5,7);\n  std::vector<int> dims {2, 3, 5, 7};\n\n  for (int dim = 0; dim < 4; ++dim) {\n    tensor.setRandom();\n    tensor = (tensor + tensor.constant(0.5)).log();\n\n    Tensor<DenseIndex, 3, DataLayout> tensor_argmin;\n    array<DenseIndex, 4> ix;\n    for (int i = 0; i < 2; ++i) {\n      for (int j = 0; j < 3; ++j) {\n        for (int k = 0; k < 5; ++k) {\n          for (int l = 0; l < 7; ++l) {\n            ix[0] = i; ix[1] = j; ix[2] = k; ix[3] = l;\n            if (ix[dim] != 0) continue;\n            // suppose dim == 1, then for all i, k, l, set tensor(i, 0, k, l) = -10.0\n            tensor(ix) = -10.0;\n          }\n        }\n      }\n    }\n\n    tensor_argmin = tensor.argmin(dim);\n\n    VERIFY_IS_EQUAL(tensor_argmin.size(),\n                    ptrdiff_t(2*3*5*7 / tensor.dimension(dim)));\n    for (ptrdiff_t n = 0; n < tensor_argmin.size(); ++n) {\n      // Expect min to be in the first index of the reduced dimension\n      VERIFY_IS_EQUAL(tensor_argmin.data()[n], 0);\n    }\n\n    for (int i = 0; i < 2; ++i) {\n      for (int j = 0; j < 3; ++j) {\n        for (int k = 0; k < 5; ++k) {\n          for (int l = 0; l < 7; ++l) {\n            ix[0] = i; ix[1] = j; ix[2] = k; ix[3] = l;\n            if (ix[dim] != tensor.dimension(dim) - 1) continue;\n            // suppose dim == 1, then for all i, k, l, set tensor(i, 2, k, l) = -20.0\n            tensor(ix) = -20.0;\n          }\n        }\n      }\n    }\n\n    tensor_argmin = tensor.argmin(dim);\n\n    VERIFY_IS_EQUAL(tensor_argmin.size(),\n                    ptrdiff_t(2*3*5*7 / tensor.dimension(dim)));\n    for (ptrdiff_t n = 0; n < tensor_argmin.size(); ++n) {\n      // Expect min to be in the last index of the reduced dimension\n      VERIFY_IS_EQUAL(tensor_argmin.data()[n], tensor.dimension(dim) - 1);\n    }\n  }\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_argmax)\n{\n  CALL_SUBTEST(test_simple_index_tuples<RowMajor>());\n  CALL_SUBTEST(test_simple_index_tuples<ColMajor>());\n  CALL_SUBTEST(test_index_tuples_dim<RowMajor>());\n  CALL_SUBTEST(test_index_tuples_dim<ColMajor>());\n  CALL_SUBTEST(test_argmax_tuple_reducer<RowMajor>());\n  CALL_SUBTEST(test_argmax_tuple_reducer<ColMajor>());\n  CALL_SUBTEST(test_argmin_tuple_reducer<RowMajor>());\n  CALL_SUBTEST(test_argmin_tuple_reducer<ColMajor>());\n  CALL_SUBTEST(test_simple_argmax<RowMajor>());\n  CALL_SUBTEST(test_simple_argmax<ColMajor>());\n  CALL_SUBTEST(test_simple_argmin<RowMajor>());\n  CALL_SUBTEST(test_simple_argmin<ColMajor>());\n  CALL_SUBTEST(test_argmax_dim<RowMajor>());\n  CALL_SUBTEST(test_argmax_dim<ColMajor>());\n  CALL_SUBTEST(test_argmin_dim<RowMajor>());\n  CALL_SUBTEST(test_argmin_dim<ColMajor>());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_argmax_gpu.cu",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n\n#define EIGEN_TEST_NO_LONGDOUBLE\n\n#define EIGEN_USE_GPU\n\n#include \"main.h\"\n#include <unsupported/Eigen/CXX11/Tensor>\n\n#include <unsupported/Eigen/CXX11/src/Tensor/TensorGpuHipCudaDefines.h>\n\nusing Eigen::Tensor;\n\ntemplate <int Layout>\nvoid test_gpu_simple_argmax()\n{\n  Tensor<double, 3, Layout> in(Eigen::array<DenseIndex, 3>(72,53,97));\n  Tensor<DenseIndex, 1, Layout> out_max(Eigen::array<DenseIndex, 1>(1));\n  Tensor<DenseIndex, 1, Layout> out_min(Eigen::array<DenseIndex, 1>(1));\n  in.setRandom();\n  in *= in.constant(100.0);\n  in(0, 0, 0) = -1000.0;\n  in(71, 52, 96) = 1000.0;\n\n  std::size_t in_bytes = in.size() * sizeof(double);\n  std::size_t out_bytes = out_max.size() * sizeof(DenseIndex);\n\n  double* d_in;\n  DenseIndex* d_out_max;\n  DenseIndex* d_out_min;\n  gpuMalloc((void**)(&d_in), in_bytes);\n  gpuMalloc((void**)(&d_out_max), out_bytes);\n  gpuMalloc((void**)(&d_out_min), out_bytes);\n\n  gpuMemcpy(d_in, in.data(), in_bytes, gpuMemcpyHostToDevice);\n\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n\n  Eigen::TensorMap<Eigen::Tensor<double, 3, Layout>, Aligned > gpu_in(d_in, Eigen::array<DenseIndex, 3>(72,53,97));\n  Eigen::TensorMap<Eigen::Tensor<DenseIndex, 1, Layout>, Aligned > gpu_out_max(d_out_max, Eigen::array<DenseIndex, 1>(1));\n  Eigen::TensorMap<Eigen::Tensor<DenseIndex, 1, Layout>, Aligned > gpu_out_min(d_out_min, Eigen::array<DenseIndex, 1>(1));\n\n  gpu_out_max.device(gpu_device) = gpu_in.argmax();\n  gpu_out_min.device(gpu_device) = gpu_in.argmin();\n\n  assert(gpuMemcpyAsync(out_max.data(), d_out_max, out_bytes, gpuMemcpyDeviceToHost, gpu_device.stream()) == gpuSuccess);\n  assert(gpuMemcpyAsync(out_min.data(), d_out_min, out_bytes, gpuMemcpyDeviceToHost, gpu_device.stream()) == gpuSuccess);\n  assert(gpuStreamSynchronize(gpu_device.stream()) == gpuSuccess);\n\n  VERIFY_IS_EQUAL(out_max(Eigen::array<DenseIndex, 1>(0)), 72*53*97 - 1);\n  VERIFY_IS_EQUAL(out_min(Eigen::array<DenseIndex, 1>(0)), 0);\n\n  gpuFree(d_in);\n  gpuFree(d_out_max);\n  gpuFree(d_out_min);\n}\n\ntemplate <int DataLayout>\nvoid test_gpu_argmax_dim()\n{\n  Tensor<float, 4, DataLayout> tensor(2,3,5,7);\n  std::vector<int> dims;\n  dims.push_back(2); dims.push_back(3); dims.push_back(5); dims.push_back(7);\n\n  for (int dim = 0; dim < 4; ++dim) {\n    tensor.setRandom();\n    tensor = (tensor + tensor.constant(0.5)).log();\n\n    array<DenseIndex, 3> out_shape;\n    for (int d = 0; d < 3; ++d) out_shape[d] = (d < dim) ? dims[d] : dims[d+1];\n\n    Tensor<DenseIndex, 3, DataLayout> tensor_arg(out_shape);\n\n    array<DenseIndex, 4> ix;\n    for (int i = 0; i < 2; ++i) {\n      for (int j = 0; j < 3; ++j) {\n        for (int k = 0; k < 5; ++k) {\n          for (int l = 0; l < 7; ++l) {\n            ix[0] = i; ix[1] = j; ix[2] = k; ix[3] = l;\n            if (ix[dim] != 0) continue;\n            // suppose dim == 1, then for all i, k, l, set tensor(i, 0, k, l) = 10.0\n            tensor(ix) = 10.0;\n          }\n        }\n      }\n    }\n\n    std::size_t in_bytes = tensor.size() * sizeof(float);\n    std::size_t out_bytes = tensor_arg.size() * sizeof(DenseIndex);\n\n    float* d_in;\n    DenseIndex* d_out;\n    gpuMalloc((void**)(&d_in), in_bytes);\n    gpuMalloc((void**)(&d_out), out_bytes);\n\n    gpuMemcpy(d_in, tensor.data(), in_bytes, gpuMemcpyHostToDevice);\n\n    Eigen::GpuStreamDevice stream;\n    Eigen::GpuDevice gpu_device(&stream);\n\n    Eigen::TensorMap<Eigen::Tensor<float, 4, DataLayout>, Aligned > gpu_in(d_in, Eigen::array<DenseIndex, 4>(2, 3, 5, 7));\n    Eigen::TensorMap<Eigen::Tensor<DenseIndex, 3, DataLayout>, Aligned > gpu_out(d_out, out_shape);\n\n    gpu_out.device(gpu_device) = gpu_in.argmax(dim);\n\n    assert(gpuMemcpyAsync(tensor_arg.data(), d_out, out_bytes, gpuMemcpyDeviceToHost, gpu_device.stream()) == gpuSuccess);\n    assert(gpuStreamSynchronize(gpu_device.stream()) == gpuSuccess);\n\n    VERIFY_IS_EQUAL(tensor_arg.size(),\n                    size_t(2*3*5*7 / tensor.dimension(dim)));\n\n    for (DenseIndex n = 0; n < tensor_arg.size(); ++n) {\n      // Expect max to be in the first index of the reduced dimension\n      VERIFY_IS_EQUAL(tensor_arg.data()[n], 0);\n    }\n\n    for (int i = 0; i < 2; ++i) {\n      for (int j = 0; j < 3; ++j) {\n        for (int k = 0; k < 5; ++k) {\n          for (int l = 0; l < 7; ++l) {\n            ix[0] = i; ix[1] = j; ix[2] = k; ix[3] = l;\n            if (ix[dim] != tensor.dimension(dim) - 1) continue;\n            // suppose dim == 1, then for all i, k, l, set tensor(i, 2, k, l) = 20.0\n            tensor(ix) = 20.0;\n          }\n        }\n      }\n    }\n\n    gpuMemcpy(d_in, tensor.data(), in_bytes, gpuMemcpyHostToDevice);\n\n    gpu_out.device(gpu_device) = gpu_in.argmax(dim);\n\n    assert(gpuMemcpyAsync(tensor_arg.data(), d_out, out_bytes, gpuMemcpyDeviceToHost, gpu_device.stream()) == gpuSuccess);\n    assert(gpuStreamSynchronize(gpu_device.stream()) == gpuSuccess);\n\n    for (DenseIndex n = 0; n < tensor_arg.size(); ++n) {\n      // Expect max to be in the last index of the reduced dimension\n      VERIFY_IS_EQUAL(tensor_arg.data()[n], tensor.dimension(dim) - 1);\n    }\n\n    gpuFree(d_in);\n    gpuFree(d_out);\n  }\n}\n\ntemplate <int DataLayout>\nvoid test_gpu_argmin_dim()\n{\n  Tensor<float, 4, DataLayout> tensor(2,3,5,7);\n  std::vector<int> dims;\n  dims.push_back(2); dims.push_back(3); dims.push_back(5); dims.push_back(7);\n\n  for (int dim = 0; dim < 4; ++dim) {\n    tensor.setRandom();\n    tensor = (tensor + tensor.constant(0.5)).log();\n\n    array<DenseIndex, 3> out_shape;\n    for (int d = 0; d < 3; ++d) out_shape[d] = (d < dim) ? dims[d] : dims[d+1];\n\n    Tensor<DenseIndex, 3, DataLayout> tensor_arg(out_shape);\n\n    array<DenseIndex, 4> ix;\n    for (int i = 0; i < 2; ++i) {\n      for (int j = 0; j < 3; ++j) {\n        for (int k = 0; k < 5; ++k) {\n          for (int l = 0; l < 7; ++l) {\n            ix[0] = i; ix[1] = j; ix[2] = k; ix[3] = l;\n            if (ix[dim] != 0) continue;\n            // suppose dim == 1, then for all i, k, l, set tensor(i, 0, k, l) = 10.0\n            tensor(ix) = -10.0;\n          }\n        }\n      }\n    }\n\n    std::size_t in_bytes = tensor.size() * sizeof(float);\n    std::size_t out_bytes = tensor_arg.size() * sizeof(DenseIndex);\n\n    float* d_in;\n    DenseIndex* d_out;\n    gpuMalloc((void**)(&d_in), in_bytes);\n    gpuMalloc((void**)(&d_out), out_bytes);\n\n    gpuMemcpy(d_in, tensor.data(), in_bytes, gpuMemcpyHostToDevice);\n\n    Eigen::GpuStreamDevice stream;\n    Eigen::GpuDevice gpu_device(&stream);\n\n    Eigen::TensorMap<Eigen::Tensor<float, 4, DataLayout>, Aligned > gpu_in(d_in, Eigen::array<DenseIndex, 4>(2, 3, 5, 7));\n    Eigen::TensorMap<Eigen::Tensor<DenseIndex, 3, DataLayout>, Aligned > gpu_out(d_out, out_shape);\n\n    gpu_out.device(gpu_device) = gpu_in.argmin(dim);\n\n    assert(gpuMemcpyAsync(tensor_arg.data(), d_out, out_bytes, gpuMemcpyDeviceToHost, gpu_device.stream()) == gpuSuccess);\n    assert(gpuStreamSynchronize(gpu_device.stream()) == gpuSuccess);\n\n    VERIFY_IS_EQUAL(tensor_arg.size(),\n                    2*3*5*7 / tensor.dimension(dim));\n\n    for (DenseIndex n = 0; n < tensor_arg.size(); ++n) {\n      // Expect min to be in the first index of the reduced dimension\n      VERIFY_IS_EQUAL(tensor_arg.data()[n], 0);\n    }\n\n    for (int i = 0; i < 2; ++i) {\n      for (int j = 0; j < 3; ++j) {\n        for (int k = 0; k < 5; ++k) {\n          for (int l = 0; l < 7; ++l) {\n            ix[0] = i; ix[1] = j; ix[2] = k; ix[3] = l;\n            if (ix[dim] != tensor.dimension(dim) - 1) continue;\n            // suppose dim == 1, then for all i, k, l, set tensor(i, 2, k, l) = 20.0\n            tensor(ix) = -20.0;\n          }\n        }\n      }\n    }\n\n    gpuMemcpy(d_in, tensor.data(), in_bytes, gpuMemcpyHostToDevice);\n\n    gpu_out.device(gpu_device) = gpu_in.argmin(dim);\n\n    assert(gpuMemcpyAsync(tensor_arg.data(), d_out, out_bytes, gpuMemcpyDeviceToHost, gpu_device.stream()) == gpuSuccess);\n    assert(gpuStreamSynchronize(gpu_device.stream()) == gpuSuccess);\n\n    for (DenseIndex n = 0; n < tensor_arg.size(); ++n) {\n      // Expect max to be in the last index of the reduced dimension\n      VERIFY_IS_EQUAL(tensor_arg.data()[n], tensor.dimension(dim) - 1);\n    }\n\n    gpuFree(d_in);\n    gpuFree(d_out);\n  }\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_argmax_gpu)\n{\n  CALL_SUBTEST_1(test_gpu_simple_argmax<RowMajor>());\n  CALL_SUBTEST_1(test_gpu_simple_argmax<ColMajor>());\n  CALL_SUBTEST_2(test_gpu_argmax_dim<RowMajor>());\n  CALL_SUBTEST_2(test_gpu_argmax_dim<ColMajor>());\n  CALL_SUBTEST_3(test_gpu_argmin_dim<RowMajor>());\n  CALL_SUBTEST_3(test_gpu_argmin_dim<ColMajor>());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_argmax_sycl.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016\n// Mehdi Goli    Codeplay Software Ltd.\n// Ralph Potter  Codeplay Software Ltd.\n// Luke Iwanski  Codeplay Software Ltd.\n// Contact: <eigen@codeplay.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_TEST_NO_LONGDOUBLE\n#define EIGEN_TEST_NO_COMPLEX\n\n#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int64_t\n#define EIGEN_USE_SYCL\n\n#include \"main.h\"\n\n#include <unsupported/Eigen/CXX11/Tensor>\n\nusing Eigen::array;\nusing Eigen::SyclDevice;\nusing Eigen::Tensor;\nusing Eigen::TensorMap;\n\ntemplate <typename DataType, int Layout, typename DenseIndex>\nstatic void test_sycl_simple_argmax(const Eigen::SyclDevice& sycl_device) {\n  Tensor<DataType, 3, Layout, DenseIndex> in(Eigen::array<DenseIndex, 3>{{2, 2, 2}});\n  Tensor<DenseIndex, 0, Layout, DenseIndex> out_max;\n  Tensor<DenseIndex, 0, Layout, DenseIndex> out_min;\n  in.setRandom();\n  in *= in.constant(100.0);\n  in(0, 0, 0) = -1000.0;\n  in(1, 1, 1) = 1000.0;\n\n  std::size_t in_bytes = in.size() * sizeof(DataType);\n  std::size_t out_bytes = out_max.size() * sizeof(DenseIndex);\n\n  DataType* d_in = static_cast<DataType*>(sycl_device.allocate(in_bytes));\n  DenseIndex* d_out_max = static_cast<DenseIndex*>(sycl_device.allocate(out_bytes));\n  DenseIndex* d_out_min = static_cast<DenseIndex*>(sycl_device.allocate(out_bytes));\n\n  Eigen::TensorMap<Eigen::Tensor<DataType, 3, Layout, DenseIndex> > gpu_in(d_in,\n                                                                           Eigen::array<DenseIndex, 3>{{2, 2, 2}});\n  Eigen::TensorMap<Eigen::Tensor<DenseIndex, 0, Layout, DenseIndex> > gpu_out_max(d_out_max);\n  Eigen::TensorMap<Eigen::Tensor<DenseIndex, 0, Layout, DenseIndex> > gpu_out_min(d_out_min);\n  sycl_device.memcpyHostToDevice(d_in, in.data(), in_bytes);\n\n  gpu_out_max.device(sycl_device) = gpu_in.argmax();\n  gpu_out_min.device(sycl_device) = gpu_in.argmin();\n\n  sycl_device.memcpyDeviceToHost(out_max.data(), d_out_max, out_bytes);\n  sycl_device.memcpyDeviceToHost(out_min.data(), d_out_min, out_bytes);\n\n  VERIFY_IS_EQUAL(out_max(), 2 * 2 * 2 - 1);\n  VERIFY_IS_EQUAL(out_min(), 0);\n\n  sycl_device.deallocate(d_in);\n  sycl_device.deallocate(d_out_max);\n  sycl_device.deallocate(d_out_min);\n}\n\ntemplate <typename DataType, int DataLayout, typename DenseIndex>\nstatic void test_sycl_argmax_dim(const Eigen::SyclDevice& sycl_device) {\n  DenseIndex sizeDim0 = 9;\n  DenseIndex sizeDim1 = 3;\n  DenseIndex sizeDim2 = 5;\n  DenseIndex sizeDim3 = 7;\n  Tensor<DataType, 4, DataLayout, DenseIndex> tensor(sizeDim0, sizeDim1, sizeDim2, sizeDim3);\n\n  std::vector<DenseIndex> dims;\n  dims.push_back(sizeDim0);\n  dims.push_back(sizeDim1);\n  dims.push_back(sizeDim2);\n  dims.push_back(sizeDim3);\n  for (DenseIndex dim = 0; dim < 4; ++dim) {\n    array<DenseIndex, 3> out_shape;\n    for (DenseIndex d = 0; d < 3; ++d) out_shape[d] = (d < dim) ? dims[d] : dims[d + 1];\n\n    Tensor<DenseIndex, 3, DataLayout, DenseIndex> tensor_arg(out_shape);\n\n    array<DenseIndex, 4> ix;\n    for (DenseIndex i = 0; i < sizeDim0; ++i) {\n      for (DenseIndex j = 0; j < sizeDim1; ++j) {\n        for (DenseIndex k = 0; k < sizeDim2; ++k) {\n          for (DenseIndex l = 0; l < sizeDim3; ++l) {\n            ix[0] = i;\n            ix[1] = j;\n            ix[2] = k;\n            ix[3] = l;\n            // suppose dim == 1, then for all i, k, l, set tensor(i, 0, k, l)\n            // = 10.0\n            tensor(ix) = (ix[dim] != 0) ? -1.0 : 10.0;\n          }\n        }\n      }\n    }\n\n    std::size_t in_bytes = tensor.size() * sizeof(DataType);\n    std::size_t out_bytes = tensor_arg.size() * sizeof(DenseIndex);\n\n    DataType* d_in = static_cast<DataType*>(sycl_device.allocate(in_bytes));\n    DenseIndex* d_out = static_cast<DenseIndex*>(sycl_device.allocate(out_bytes));\n\n    Eigen::TensorMap<Eigen::Tensor<DataType, 4, DataLayout, DenseIndex> > gpu_in(\n        d_in, Eigen::array<DenseIndex, 4>{{sizeDim0, sizeDim1, sizeDim2, sizeDim3}});\n    Eigen::TensorMap<Eigen::Tensor<DenseIndex, 3, DataLayout, DenseIndex> > gpu_out(d_out, out_shape);\n\n    sycl_device.memcpyHostToDevice(d_in, tensor.data(), in_bytes);\n    gpu_out.device(sycl_device) = gpu_in.argmax(dim);\n    sycl_device.memcpyDeviceToHost(tensor_arg.data(), d_out, out_bytes);\n\n    VERIFY_IS_EQUAL(static_cast<size_t>(tensor_arg.size()),\n                    size_t(sizeDim0 * sizeDim1 * sizeDim2 * sizeDim3 / tensor.dimension(dim)));\n\n    for (DenseIndex n = 0; n < tensor_arg.size(); ++n) {\n      // Expect max to be in the first index of the reduced dimension\n      VERIFY_IS_EQUAL(tensor_arg.data()[n], 0);\n    }\n\n    sycl_device.synchronize();\n\n    for (DenseIndex i = 0; i < sizeDim0; ++i) {\n      for (DenseIndex j = 0; j < sizeDim1; ++j) {\n        for (DenseIndex k = 0; k < sizeDim2; ++k) {\n          for (DenseIndex l = 0; l < sizeDim3; ++l) {\n            ix[0] = i;\n            ix[1] = j;\n            ix[2] = k;\n            ix[3] = l;\n            // suppose dim == 1, then for all i, k, l, set tensor(i, 2, k, l) = 20.0\n            tensor(ix) = (ix[dim] != tensor.dimension(dim) - 1) ? -1.0 : 20.0;\n          }\n        }\n      }\n    }\n\n    sycl_device.memcpyHostToDevice(d_in, tensor.data(), in_bytes);\n    gpu_out.device(sycl_device) = gpu_in.argmax(dim);\n    sycl_device.memcpyDeviceToHost(tensor_arg.data(), d_out, out_bytes);\n\n    for (DenseIndex n = 0; n < tensor_arg.size(); ++n) {\n      // Expect max to be in the last index of the reduced dimension\n      VERIFY_IS_EQUAL(tensor_arg.data()[n], tensor.dimension(dim) - 1);\n    }\n    sycl_device.deallocate(d_in);\n    sycl_device.deallocate(d_out);\n  }\n}\n\ntemplate <typename DataType, int DataLayout, typename DenseIndex>\nstatic void test_sycl_argmin_dim(const Eigen::SyclDevice& sycl_device) {\n  DenseIndex sizeDim0 = 9;\n  DenseIndex sizeDim1 = 3;\n  DenseIndex sizeDim2 = 5;\n  DenseIndex sizeDim3 = 7;\n  Tensor<DataType, 4, DataLayout, DenseIndex> tensor(sizeDim0, sizeDim1, sizeDim2, sizeDim3);\n\n  std::vector<DenseIndex> dims;\n  dims.push_back(sizeDim0);\n  dims.push_back(sizeDim1);\n  dims.push_back(sizeDim2);\n  dims.push_back(sizeDim3);\n  for (DenseIndex dim = 0; dim < 4; ++dim) {\n    array<DenseIndex, 3> out_shape;\n    for (DenseIndex d = 0; d < 3; ++d) out_shape[d] = (d < dim) ? dims[d] : dims[d + 1];\n\n    Tensor<DenseIndex, 3, DataLayout, DenseIndex> tensor_arg(out_shape);\n\n    array<DenseIndex, 4> ix;\n    for (DenseIndex i = 0; i < sizeDim0; ++i) {\n      for (DenseIndex j = 0; j < sizeDim1; ++j) {\n        for (DenseIndex k = 0; k < sizeDim2; ++k) {\n          for (DenseIndex l = 0; l < sizeDim3; ++l) {\n            ix[0] = i;\n            ix[1] = j;\n            ix[2] = k;\n            ix[3] = l;\n            // suppose dim == 1, then for all i, k, l, set tensor(i, 0, k, l) = -10.0\n            tensor(ix) = (ix[dim] != 0) ? 1.0 : -10.0;\n          }\n        }\n      }\n    }\n\n    std::size_t in_bytes = tensor.size() * sizeof(DataType);\n    std::size_t out_bytes = tensor_arg.size() * sizeof(DenseIndex);\n\n    DataType* d_in = static_cast<DataType*>(sycl_device.allocate(in_bytes));\n    DenseIndex* d_out = static_cast<DenseIndex*>(sycl_device.allocate(out_bytes));\n\n    Eigen::TensorMap<Eigen::Tensor<DataType, 4, DataLayout, DenseIndex> > gpu_in(\n        d_in, Eigen::array<DenseIndex, 4>{{sizeDim0, sizeDim1, sizeDim2, sizeDim3}});\n    Eigen::TensorMap<Eigen::Tensor<DenseIndex, 3, DataLayout, DenseIndex> > gpu_out(d_out, out_shape);\n\n    sycl_device.memcpyHostToDevice(d_in, tensor.data(), in_bytes);\n    gpu_out.device(sycl_device) = gpu_in.argmin(dim);\n    sycl_device.memcpyDeviceToHost(tensor_arg.data(), d_out, out_bytes);\n\n    VERIFY_IS_EQUAL(static_cast<size_t>(tensor_arg.size()),\n                    size_t(sizeDim0 * sizeDim1 * sizeDim2 * sizeDim3 / tensor.dimension(dim)));\n\n    for (DenseIndex n = 0; n < tensor_arg.size(); ++n) {\n      // Expect max to be in the first index of the reduced dimension\n      VERIFY_IS_EQUAL(tensor_arg.data()[n], 0);\n    }\n\n    sycl_device.synchronize();\n\n    for (DenseIndex i = 0; i < sizeDim0; ++i) {\n      for (DenseIndex j = 0; j < sizeDim1; ++j) {\n        for (DenseIndex k = 0; k < sizeDim2; ++k) {\n          for (DenseIndex l = 0; l < sizeDim3; ++l) {\n            ix[0] = i;\n            ix[1] = j;\n            ix[2] = k;\n            ix[3] = l;\n            // suppose dim == 1, then for all i, k, l, set tensor(i, 2, k, l) = -20.0\n            tensor(ix) = (ix[dim] != tensor.dimension(dim) - 1) ? 1.0 : -20.0;\n          }\n        }\n      }\n    }\n\n    sycl_device.memcpyHostToDevice(d_in, tensor.data(), in_bytes);\n    gpu_out.device(sycl_device) = gpu_in.argmin(dim);\n    sycl_device.memcpyDeviceToHost(tensor_arg.data(), d_out, out_bytes);\n\n    for (DenseIndex n = 0; n < tensor_arg.size(); ++n) {\n      // Expect max to be in the last index of the reduced dimension\n      VERIFY_IS_EQUAL(tensor_arg.data()[n], tensor.dimension(dim) - 1);\n    }\n    sycl_device.deallocate(d_in);\n    sycl_device.deallocate(d_out);\n  }\n}\n\ntemplate <typename DataType, typename Device_Selector>\nvoid sycl_argmax_test_per_device(const Device_Selector& d) {\n  QueueInterface queueInterface(d);\n  auto sycl_device = Eigen::SyclDevice(&queueInterface);\n  test_sycl_simple_argmax<DataType, RowMajor, int64_t>(sycl_device);\n  test_sycl_simple_argmax<DataType, ColMajor, int64_t>(sycl_device);\n  test_sycl_argmax_dim<DataType, ColMajor, int64_t>(sycl_device);\n  test_sycl_argmax_dim<DataType, RowMajor, int64_t>(sycl_device);\n  test_sycl_argmin_dim<DataType, ColMajor, int64_t>(sycl_device);\n  test_sycl_argmin_dim<DataType, RowMajor, int64_t>(sycl_device);\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_argmax_sycl) {\n  for (const auto& device : Eigen::get_sycl_supported_devices()) {\n    CALL_SUBTEST(sycl_argmax_test_per_device<float>(device));\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_assign.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\nusing Eigen::RowMajor;\n\nstatic void test_1d()\n{\n  Tensor<int, 1> vec1(6);\n  Tensor<int, 1, RowMajor> vec2(6);\n  vec1(0) = 4;  vec2(0) = 0;\n  vec1(1) = 8;  vec2(1) = 1;\n  vec1(2) = 15; vec2(2) = 2;\n  vec1(3) = 16; vec2(3) = 3;\n  vec1(4) = 23; vec2(4) = 4;\n  vec1(5) = 42; vec2(5) = 5;\n\n  int col_major[6];\n  int row_major[6];\n  memset(col_major, 0, 6*sizeof(int));\n  memset(row_major, 0, 6*sizeof(int));\n  TensorMap<Tensor<int, 1> > vec3(col_major, 6);\n  TensorMap<Tensor<int, 1, RowMajor> > vec4(row_major, 6);\n\n  vec3 = vec1;\n  vec4 = vec2;\n\n  VERIFY_IS_EQUAL(vec3(0), 4);\n  VERIFY_IS_EQUAL(vec3(1), 8);\n  VERIFY_IS_EQUAL(vec3(2), 15);\n  VERIFY_IS_EQUAL(vec3(3), 16);\n  VERIFY_IS_EQUAL(vec3(4), 23);\n  VERIFY_IS_EQUAL(vec3(5), 42);\n\n  VERIFY_IS_EQUAL(vec4(0), 0);\n  VERIFY_IS_EQUAL(vec4(1), 1);\n  VERIFY_IS_EQUAL(vec4(2), 2);\n  VERIFY_IS_EQUAL(vec4(3), 3);\n  VERIFY_IS_EQUAL(vec4(4), 4);\n  VERIFY_IS_EQUAL(vec4(5), 5);\n\n  vec1.setZero();\n  vec2.setZero();\n  vec1 = vec3;\n  vec2 = vec4;\n\n  VERIFY_IS_EQUAL(vec1(0), 4);\n  VERIFY_IS_EQUAL(vec1(1), 8);\n  VERIFY_IS_EQUAL(vec1(2), 15);\n  VERIFY_IS_EQUAL(vec1(3), 16);\n  VERIFY_IS_EQUAL(vec1(4), 23);\n  VERIFY_IS_EQUAL(vec1(5), 42);\n\n  VERIFY_IS_EQUAL(vec2(0), 0);\n  VERIFY_IS_EQUAL(vec2(1), 1);\n  VERIFY_IS_EQUAL(vec2(2), 2);\n  VERIFY_IS_EQUAL(vec2(3), 3);\n  VERIFY_IS_EQUAL(vec2(4), 4);\n  VERIFY_IS_EQUAL(vec2(5), 5);\n}\n\nstatic void test_2d()\n{\n  Tensor<int, 2> mat1(2,3);\n  Tensor<int, 2, RowMajor> mat2(2,3);\n\n  mat1(0,0) = 0;\n  mat1(0,1) = 1;\n  mat1(0,2) = 2;\n  mat1(1,0) = 3;\n  mat1(1,1) = 4;\n  mat1(1,2) = 5;\n\n  mat2(0,0) = 0;\n  mat2(0,1) = 1;\n  mat2(0,2) = 2;\n  mat2(1,0) = 3;\n  mat2(1,1) = 4;\n  mat2(1,2) = 5;\n\n  int col_major[6];\n  int row_major[6];\n  memset(col_major, 0, 6*sizeof(int));\n  memset(row_major, 0, 6*sizeof(int));\n  TensorMap<Tensor<int, 2> > mat3(row_major, 2, 3);\n  TensorMap<Tensor<int, 2, RowMajor> > mat4(col_major, 2, 3);\n\n  mat3 = mat1;\n  mat4 = mat2;\n\n  VERIFY_IS_EQUAL(mat3(0,0), 0);\n  VERIFY_IS_EQUAL(mat3(0,1), 1);\n  VERIFY_IS_EQUAL(mat3(0,2), 2);\n  VERIFY_IS_EQUAL(mat3(1,0), 3);\n  VERIFY_IS_EQUAL(mat3(1,1), 4);\n  VERIFY_IS_EQUAL(mat3(1,2), 5);\n\n  VERIFY_IS_EQUAL(mat4(0,0), 0);\n  VERIFY_IS_EQUAL(mat4(0,1), 1);\n  VERIFY_IS_EQUAL(mat4(0,2), 2);\n  VERIFY_IS_EQUAL(mat4(1,0), 3);\n  VERIFY_IS_EQUAL(mat4(1,1), 4);\n  VERIFY_IS_EQUAL(mat4(1,2), 5);\n\n  mat1.setZero();\n  mat2.setZero();\n  mat1 = mat3;\n  mat2 = mat4;\n\n  VERIFY_IS_EQUAL(mat1(0,0), 0);\n  VERIFY_IS_EQUAL(mat1(0,1), 1);\n  VERIFY_IS_EQUAL(mat1(0,2), 2);\n  VERIFY_IS_EQUAL(mat1(1,0), 3);\n  VERIFY_IS_EQUAL(mat1(1,1), 4);\n  VERIFY_IS_EQUAL(mat1(1,2), 5);\n\n  VERIFY_IS_EQUAL(mat2(0,0), 0);\n  VERIFY_IS_EQUAL(mat2(0,1), 1);\n  VERIFY_IS_EQUAL(mat2(0,2), 2);\n  VERIFY_IS_EQUAL(mat2(1,0), 3);\n  VERIFY_IS_EQUAL(mat2(1,1), 4);\n  VERIFY_IS_EQUAL(mat2(1,2), 5);\n}\n\nstatic void test_3d()\n{\n  Tensor<int, 3> mat1(2,3,7);\n  Tensor<int, 3, RowMajor> mat2(2,3,7);\n\n  int val = 0;\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        mat1(i,j,k) = val;\n        mat2(i,j,k) = val;\n        val++;\n      }\n    }\n  }\n\n  int col_major[2*3*7];\n  int row_major[2*3*7];\n  memset(col_major, 0, 2*3*7*sizeof(int));\n  memset(row_major, 0, 2*3*7*sizeof(int));\n  TensorMap<Tensor<int, 3> > mat3(col_major, 2, 3, 7);\n  TensorMap<Tensor<int, 3, RowMajor> > mat4(row_major, 2, 3, 7);\n\n  mat3 = mat1;\n  mat4 = mat2;\n\n  val = 0;\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        VERIFY_IS_EQUAL(mat3(i,j,k), val);\n        VERIFY_IS_EQUAL(mat4(i,j,k), val);\n        val++;\n      }\n    }\n  }\n\n  mat1.setZero();\n  mat2.setZero();\n  mat1 = mat3;\n  mat2 = mat4;\n\n  val = 0;\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        VERIFY_IS_EQUAL(mat1(i,j,k), val);\n        VERIFY_IS_EQUAL(mat2(i,j,k), val);\n        val++;\n      }\n    }\n  }\n}\n\nstatic void test_same_type()\n{\n  Tensor<int, 1> orig_tensor(5);\n  Tensor<int, 1> dest_tensor(5);\n  orig_tensor.setRandom();\n  dest_tensor.setRandom();\n  int* orig_data = orig_tensor.data();\n  int* dest_data = dest_tensor.data();\n  dest_tensor = orig_tensor;\n  VERIFY_IS_EQUAL(orig_tensor.data(), orig_data);\n  VERIFY_IS_EQUAL(dest_tensor.data(), dest_data);\n  for (int i = 0; i < 5; ++i) {\n    VERIFY_IS_EQUAL(dest_tensor(i), orig_tensor(i));\n  }\n\n  TensorFixedSize<int, Sizes<5> > orig_array;\n  TensorFixedSize<int, Sizes<5> > dest_array;\n  orig_array.setRandom();\n  dest_array.setRandom();\n  orig_data = orig_array.data();\n  dest_data = dest_array.data();\n  dest_array = orig_array;\n  VERIFY_IS_EQUAL(orig_array.data(), orig_data);\n  VERIFY_IS_EQUAL(dest_array.data(), dest_data);\n  for (int i = 0; i < 5; ++i) {\n    VERIFY_IS_EQUAL(dest_array(i), orig_array(i));\n  }\n\n  int orig[5] = {1, 2, 3, 4, 5};\n  int dest[5] = {6, 7, 8, 9, 10};\n  TensorMap<Tensor<int, 1> > orig_map(orig, 5);\n  TensorMap<Tensor<int, 1> > dest_map(dest, 5);\n  orig_data = orig_map.data();\n  dest_data = dest_map.data();\n  dest_map = orig_map;\n  VERIFY_IS_EQUAL(orig_map.data(), orig_data);\n  VERIFY_IS_EQUAL(dest_map.data(), dest_data);\n  for (int i = 0; i < 5; ++i) {\n    VERIFY_IS_EQUAL(dest[i], i+1);\n  }\n}\n\nstatic void test_auto_resize()\n{\n  Tensor<int, 1> tensor1;\n  Tensor<int, 1> tensor2(3);\n  Tensor<int, 1> tensor3(5);\n  Tensor<int, 1> tensor4(7);\n\n  Tensor<int, 1> new_tensor(5);\n  new_tensor.setRandom();\n\n  tensor1 = tensor2 = tensor3 = tensor4 = new_tensor;\n\n  VERIFY_IS_EQUAL(tensor1.dimension(0), new_tensor.dimension(0));\n  VERIFY_IS_EQUAL(tensor2.dimension(0), new_tensor.dimension(0));\n  VERIFY_IS_EQUAL(tensor3.dimension(0), new_tensor.dimension(0));\n  VERIFY_IS_EQUAL(tensor4.dimension(0), new_tensor.dimension(0));\n  for (int i = 0; i < new_tensor.dimension(0); ++i) {\n    VERIFY_IS_EQUAL(tensor1(i), new_tensor(i));\n    VERIFY_IS_EQUAL(tensor2(i), new_tensor(i));\n    VERIFY_IS_EQUAL(tensor3(i), new_tensor(i));\n    VERIFY_IS_EQUAL(tensor4(i), new_tensor(i));\n  }\n}\n\n\nstatic void test_compound_assign()\n{\n  Tensor<int, 1> start_tensor(10);\n  Tensor<int, 1> offset_tensor(10);\n  start_tensor.setRandom();\n  offset_tensor.setRandom();\n\n  Tensor<int, 1> tensor = start_tensor;\n  tensor += offset_tensor;\n  for (int i = 0; i < 10; ++i) {\n    VERIFY_IS_EQUAL(tensor(i), start_tensor(i) + offset_tensor(i));\n  }\n\n  tensor = start_tensor;\n  tensor -= offset_tensor;\n  for (int i = 0; i < 10; ++i) {\n    VERIFY_IS_EQUAL(tensor(i), start_tensor(i) - offset_tensor(i));\n  }\n\n  tensor = start_tensor;\n  tensor *= offset_tensor;\n  for (int i = 0; i < 10; ++i) {\n    VERIFY_IS_EQUAL(tensor(i), start_tensor(i) * offset_tensor(i));\n  }\n\n  tensor = start_tensor;\n  tensor /= offset_tensor;\n  for (int i = 0; i < 10; ++i) {\n    VERIFY_IS_EQUAL(tensor(i), start_tensor(i) / offset_tensor(i));\n  }\n}\n\nstatic void test_std_initializers_tensor() {\n#if EIGEN_HAS_VARIADIC_TEMPLATES\n  Tensor<int, 1> a(3);\n  a.setValues({0, 1, 2});\n  VERIFY_IS_EQUAL(a(0), 0);\n  VERIFY_IS_EQUAL(a(1), 1);\n  VERIFY_IS_EQUAL(a(2), 2);\n\n  // It fills the top-left slice.\n  a.setValues({10, 20});\n  VERIFY_IS_EQUAL(a(0), 10);\n  VERIFY_IS_EQUAL(a(1), 20);\n  VERIFY_IS_EQUAL(a(2), 2);\n\n  // Chaining.\n  Tensor<int, 1> a2(3);\n  a2 = a.setValues({100, 200, 300});\n  VERIFY_IS_EQUAL(a(0), 100);\n  VERIFY_IS_EQUAL(a(1), 200);\n  VERIFY_IS_EQUAL(a(2), 300);\n  VERIFY_IS_EQUAL(a2(0), 100);\n  VERIFY_IS_EQUAL(a2(1), 200);\n  VERIFY_IS_EQUAL(a2(2), 300);\n\n  Tensor<int, 2> b(2, 3);\n  b.setValues({{0, 1, 2}, {3, 4, 5}});\n  VERIFY_IS_EQUAL(b(0, 0), 0);\n  VERIFY_IS_EQUAL(b(0, 1), 1);\n  VERIFY_IS_EQUAL(b(0, 2), 2);\n  VERIFY_IS_EQUAL(b(1, 0), 3);\n  VERIFY_IS_EQUAL(b(1, 1), 4);\n  VERIFY_IS_EQUAL(b(1, 2), 5);\n\n  // It fills the top-left slice.\n  b.setValues({{10, 20}, {30}});\n  VERIFY_IS_EQUAL(b(0, 0), 10);\n  VERIFY_IS_EQUAL(b(0, 1), 20);\n  VERIFY_IS_EQUAL(b(0, 2), 2);\n  VERIFY_IS_EQUAL(b(1, 0), 30);\n  VERIFY_IS_EQUAL(b(1, 1), 4);\n  VERIFY_IS_EQUAL(b(1, 2), 5);\n\n  Eigen::Tensor<int, 3> c(3, 2, 4);\n  c.setValues({{{0, 1, 2, 3}, {4, 5, 6, 7}},\n               {{10, 11, 12, 13}, {14, 15, 16, 17}},\n               {{20, 21, 22, 23}, {24, 25, 26, 27}}});\n  VERIFY_IS_EQUAL(c(0, 0, 0), 0);\n  VERIFY_IS_EQUAL(c(0, 0, 1), 1);\n  VERIFY_IS_EQUAL(c(0, 0, 2), 2);\n  VERIFY_IS_EQUAL(c(0, 0, 3), 3);\n  VERIFY_IS_EQUAL(c(0, 1, 0), 4);\n  VERIFY_IS_EQUAL(c(0, 1, 1), 5);\n  VERIFY_IS_EQUAL(c(0, 1, 2), 6);\n  VERIFY_IS_EQUAL(c(0, 1, 3), 7);\n  VERIFY_IS_EQUAL(c(1, 0, 0), 10);\n  VERIFY_IS_EQUAL(c(1, 0, 1), 11);\n  VERIFY_IS_EQUAL(c(1, 0, 2), 12);\n  VERIFY_IS_EQUAL(c(1, 0, 3), 13);\n  VERIFY_IS_EQUAL(c(1, 1, 0), 14);\n  VERIFY_IS_EQUAL(c(1, 1, 1), 15);\n  VERIFY_IS_EQUAL(c(1, 1, 2), 16);\n  VERIFY_IS_EQUAL(c(1, 1, 3), 17);\n  VERIFY_IS_EQUAL(c(2, 0, 0), 20);\n  VERIFY_IS_EQUAL(c(2, 0, 1), 21);\n  VERIFY_IS_EQUAL(c(2, 0, 2), 22);\n  VERIFY_IS_EQUAL(c(2, 0, 3), 23);\n  VERIFY_IS_EQUAL(c(2, 1, 0), 24);\n  VERIFY_IS_EQUAL(c(2, 1, 1), 25);\n  VERIFY_IS_EQUAL(c(2, 1, 2), 26);\n  VERIFY_IS_EQUAL(c(2, 1, 3), 27);\n#endif  // EIGEN_HAS_VARIADIC_TEMPLATES\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_assign)\n{\n  CALL_SUBTEST(test_1d());\n  CALL_SUBTEST(test_2d());\n  CALL_SUBTEST(test_3d());\n  CALL_SUBTEST(test_same_type());\n  CALL_SUBTEST(test_auto_resize());\n  CALL_SUBTEST(test_compound_assign());\n  CALL_SUBTEST(test_std_initializers_tensor());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_block_access.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2018 Andy Davis <andydavis@google.com>\n// Copyright (C) 2018 Eugene Zhulenev <ezhulenev@google.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <algorithm>\n#include <set>\n\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\nusing Eigen::Index;\nusing Eigen::RowMajor;\nusing Eigen::ColMajor;\nusing Eigen::internal::TensorBlockShapeType;\n\nstatic TensorOpCost zeroCost() { return {0, 0, 0}; }\n\ntemplate<typename T>\nstatic const T& choose(int layout, const T& col, const T& row) {\n  return layout == ColMajor ? col : row;\n}\n\nstatic TensorBlockShapeType RandomShape() {\n  return internal::random<bool>()\n         ? TensorBlockShapeType::kUniformAllDims\n         : TensorBlockShapeType::kSkewedInnerDims;\n}\n\ntemplate <int NumDims>\nstatic size_t RandomTargetSize(const DSizes<Index, NumDims>& dims) {\n  return internal::random<size_t>(1, dims.TotalSize());\n}\n\ntemplate <int NumDims>\nstatic DSizes<Index, NumDims> RandomDims() {\n  array<Index, NumDims> dims;\n  for (int i = 0; i < NumDims; ++i) {\n    dims[i] = internal::random<int>(1, 20);\n  }\n  return DSizes<Index, NumDims>(dims);\n}\n\ntemplate <typename T>\nstatic T* GenerateRandomData(const Index& size) {\n  T* data = new T[size];\n  for (int i = 0; i < size; ++i) {\n    data[i] = internal::random<T>();\n  }\n  return data;\n}\n\ntemplate <int NumDims>\nstatic void Debug(DSizes<Index, NumDims> dims) {\n  for (int i = 0; i < NumDims; ++i) {\n    std::cout << dims[i] << \"; \";\n  }\n  std::cout << std::endl;\n}\n\ntemplate <int Layout>\nstatic void test_block_mapper_sanity()\n{\n  typedef internal::TensorBlockMapper<2, Layout> TensorBlockMapper;\n\n  DSizes<Index, 2> tensor_dims(100, 100);\n\n  // Test uniform blocks.\n  TensorBlockMapper uniform_block_mapper(\n      tensor_dims, {TensorBlockShapeType::kUniformAllDims, 100, zeroCost()});\n\n  VERIFY_IS_EQUAL(uniform_block_mapper.blockCount(), 100);\n  VERIFY_IS_EQUAL(uniform_block_mapper.blockTotalSize(), 100);\n\n  // 10x10 blocks\n  auto uniform_b0 = uniform_block_mapper.blockDescriptor(0);\n  VERIFY_IS_EQUAL(uniform_b0.dimensions().at(0), 10);\n  VERIFY_IS_EQUAL(uniform_b0.dimensions().at(1), 10);\n\n  // Test skewed to inner dims blocks.\n  TensorBlockMapper skewed_block_mapper(\n      tensor_dims, {TensorBlockShapeType::kSkewedInnerDims, 100, zeroCost()});\n\n  VERIFY_IS_EQUAL(skewed_block_mapper.blockCount(), 100);\n  VERIFY_IS_EQUAL(skewed_block_mapper.blockTotalSize(), 100);\n\n  // 1x100 (100x1) rows/cols depending on a tensor layout.\n  auto skewed_b0 = skewed_block_mapper.blockDescriptor(0);\n  VERIFY_IS_EQUAL(skewed_b0.dimensions().at(0), choose(Layout, 100, 1));\n  VERIFY_IS_EQUAL(skewed_b0.dimensions().at(1), choose(Layout, 1, 100));\n}\n\n// Given a TensorBlock \"visit\" every element accessible though it, and a keep an\n// index in the visited set. Verify that every coeff accessed only once.\ntemplate<int NumDims, int Layout>\nstatic void UpdateCoeffSet(\n    const DSizes<Index, NumDims>& tensor_strides,\n    const internal::TensorBlockDescriptor<NumDims>& block,\n    Index first_coeff_index, int dim_index, std::set<Index>* visited_coeffs) {\n  const DSizes<Index, NumDims>& block_sizes = block.dimensions();\n\n  for (int i = 0; i < block_sizes[dim_index]; ++i) {\n    if (tensor_strides[dim_index] == 1) {\n      typedef std::pair<std::set<Index>::iterator, bool> ReturnType;\n      ReturnType inserted = visited_coeffs->insert(first_coeff_index + i);\n      VERIFY_IS_EQUAL(inserted.second, true);\n    } else {\n      int next_dim_index = dim_index + choose(Layout, -1, 1);\n      UpdateCoeffSet<NumDims, Layout>(tensor_strides, block, first_coeff_index,\n                                         next_dim_index, visited_coeffs);\n      first_coeff_index += tensor_strides[dim_index];\n    }\n  }\n}\n\ntemplate <typename T, int NumDims, int Layout>\nstatic void test_block_mapper_maps_every_element() {\n  typedef internal::TensorBlockMapper<NumDims, Layout> TensorBlockMapper;\n\n  DSizes<Index, NumDims> dims = RandomDims<NumDims>();\n  DSizes<Index, NumDims> strides = internal::strides<Layout>(dims);\n\n  // Keep track of elements indices available via block access.\n  std::set<Index> coeff_set;\n\n  // Try different combinations of block types and sizes.\n  TensorBlockMapper block_mapper(\n      dims, {RandomShape(), RandomTargetSize(dims), zeroCost()});\n\n  for (int i = 0; i < block_mapper.blockCount(); ++i) {\n    auto block = block_mapper.blockDescriptor(i);\n    UpdateCoeffSet<NumDims, Layout>(strides, block, block.offset(),\n                                    choose(Layout, NumDims - 1, 0),\n                                    &coeff_set);\n  }\n\n  // Verify that every coefficient in the original Tensor is accessible through\n  // TensorBlock only once.\n  Index total_coeffs = dims.TotalSize();\n  VERIFY_IS_EQUAL(Index(coeff_set.size()), total_coeffs);\n  VERIFY_IS_EQUAL(*coeff_set.begin(), 0);\n  VERIFY_IS_EQUAL(*coeff_set.rbegin(), total_coeffs - 1);\n}\n\ntemplate <int Layout, int NumDims>\nstatic Index GetInputIndex(Index output_index,\n                         const array<Index, NumDims>& output_to_input_dim_map,\n                         const array<Index, NumDims>& input_strides,\n                         const array<Index, NumDims>& output_strides) {\n  int input_index = 0;\n  if (Layout == ColMajor) {\n    for (int i = NumDims - 1; i > 0; --i) {\n      const Index idx = output_index / output_strides[i];\n      input_index += idx * input_strides[output_to_input_dim_map[i]];\n      output_index -= idx * output_strides[i];\n    }\n    return input_index +\n           output_index * input_strides[output_to_input_dim_map[0]];\n  } else {\n    for (int i = 0; i < NumDims - 1; ++i) {\n      const Index idx = output_index / output_strides[i];\n      input_index += idx * input_strides[output_to_input_dim_map[i]];\n      output_index -= idx * output_strides[i];\n    }\n    return input_index +\n           output_index * input_strides[output_to_input_dim_map[NumDims - 1]];\n  }\n}\n\ntemplate <int Layout, int NumDims>\nstatic array<Index, NumDims> ComputeStrides(\n    const array<Index, NumDims>& sizes) {\n  array<Index, NumDims> strides;\n  if (Layout == ColMajor) {\n    strides[0] = 1;\n    for (int i = 1; i < NumDims; ++i) {\n      strides[i] = strides[i - 1] * sizes[i - 1];\n    }\n  } else {\n    strides[NumDims - 1] = 1;\n    for (int i = NumDims - 2; i >= 0; --i) {\n      strides[i] = strides[i + 1] * sizes[i + 1];\n    }\n  }\n  return strides;\n}\n\ntemplate<typename Scalar, typename StorageIndex, int Dim>\nclass EqualityChecker\n{\n    const Scalar* input_data;\n    const DSizes<StorageIndex, Dim> &input_dims, &input_strides, &output_dims, &output_strides;\n    void check_recursive(const Scalar* input, const Scalar* output, int depth=0) const\n    {\n        if(depth==Dim)\n        {\n            VERIFY_IS_EQUAL(*input, *output);\n            return;\n        }\n\n        for(int i=0; i<output_dims[depth]; ++i)\n        {\n            check_recursive(input + i % input_dims[depth] * input_strides[depth], output + i*output_strides[depth], depth+1);\n        }\n    }\npublic:\n    EqualityChecker(const Scalar* input_data_,\n            const DSizes<StorageIndex, Dim> &input_dims_, const DSizes<StorageIndex, Dim> &input_strides_,\n            const DSizes<StorageIndex, Dim> &output_dims_, const DSizes<StorageIndex, Dim> &output_strides_)\n        : input_data(input_data_)\n        , input_dims(input_dims_), input_strides(input_strides_)\n        , output_dims(output_dims_), output_strides(output_strides_)\n        {}\n\n    void operator()(const Scalar* output_data) const\n    {\n        check_recursive(input_data, output_data);\n    }\n};\n\ntemplate <int Layout>\nstatic void test_uniform_block_shape()\n{\n  typedef internal::TensorBlockDescriptor<5> TensorBlock;\n  typedef internal::TensorBlockMapper<5, Layout> TensorBlockMapper;\n\n  {\n    // Test shape 'UniformAllDims' with uniform 'max_coeff count'.\n    DSizes<Index, 5> dims(11, 5, 6, 17, 7);\n    const Index max_coeff_count = 5 * 5 * 5 * 5 * 5;\n    TensorBlockMapper block_mapper(dims, {TensorBlockShapeType::kUniformAllDims,\n                                          max_coeff_count, zeroCost()});\n    TensorBlock block = block_mapper.blockDescriptor(0);\n    for (int i = 0; i < 5; ++i) {\n      VERIFY_IS_EQUAL(5, block.dimensions()[i]);\n    }\n    VERIFY(block.dimensions().TotalSize() <= max_coeff_count);\n  }\n\n  // Test shape 'UniformAllDims' with larger 'max_coeff count' which spills\n  // partially into first inner-most dimension.\n  if (Layout == ColMajor) {\n    DSizes<Index, 5> dims(11, 5, 6, 17, 7);\n    const Index max_coeff_count = 7 * 5 * 5 * 5 * 5;\n    TensorBlockMapper block_mapper(dims, {TensorBlockShapeType::kUniformAllDims,\n                                          max_coeff_count, zeroCost()});\n    TensorBlock block = block_mapper.blockDescriptor(0);\n    VERIFY_IS_EQUAL(7, block.dimensions()[0]);\n    for (int i = 1; i < 5; ++i) {\n      VERIFY_IS_EQUAL(5, block.dimensions()[i]);\n    }\n    VERIFY(block.dimensions().TotalSize() <= max_coeff_count);\n  } else {\n    DSizes<Index, 5> dims(11, 5, 6, 17, 7);\n    const Index max_coeff_count = 5 * 5 * 5 * 5 * 6;\n    TensorBlockMapper block_mapper(dims, {TensorBlockShapeType::kUniformAllDims,\n                                          max_coeff_count, zeroCost()});\n    TensorBlock block = block_mapper.blockDescriptor(0);\n    VERIFY_IS_EQUAL(6, block.dimensions()[4]);\n    for (int i = 3; i >= 0; --i) {\n      VERIFY_IS_EQUAL(5, block.dimensions()[i]);\n    }\n    VERIFY(block.dimensions().TotalSize() <= max_coeff_count);\n  }\n\n  // Test shape 'UniformAllDims' with larger 'max_coeff count' which spills\n  // fully into first inner-most dimension.\n  if (Layout == ColMajor) {\n    DSizes<Index, 5> dims(11, 5, 6, 17, 7);\n    const Index max_coeff_count = 11 * 5 * 5 * 5 * 5;\n    TensorBlockMapper block_mapper(dims, {TensorBlockShapeType::kUniformAllDims,\n                                          max_coeff_count, zeroCost()});\n    TensorBlock block = block_mapper.blockDescriptor(0);\n    VERIFY_IS_EQUAL(11, block.dimensions()[0]);\n    for (int i = 1; i < 5; ++i) {\n      VERIFY_IS_EQUAL(5, block.dimensions()[i]);\n    }\n    VERIFY(block.dimensions().TotalSize() <= max_coeff_count);\n  } else {\n    DSizes<Index, 5> dims(11, 5, 6, 17, 7);\n    const Index max_coeff_count = 5 * 5 * 5 * 5 * 7;\n    TensorBlockMapper block_mapper(dims, {TensorBlockShapeType::kUniformAllDims,\n                                          max_coeff_count, zeroCost()});\n    TensorBlock block = block_mapper.blockDescriptor(0);\n    VERIFY_IS_EQUAL(7, block.dimensions()[4]);\n    for (int i = 3; i >= 0; --i) {\n      VERIFY_IS_EQUAL(5, block.dimensions()[i]);\n    }\n    VERIFY(block.dimensions().TotalSize() <= max_coeff_count);\n  }\n\n  // Test shape 'UniformAllDims' with larger 'max_coeff count' which spills\n  // fully into first few inner-most dimensions.\n  if (Layout == ColMajor) {\n    DSizes<Index, 5> dims(7, 5, 6, 17, 7);\n    const Index max_coeff_count = 7 * 5 * 6 * 7 * 5;\n    TensorBlockMapper block_mapper(dims, {TensorBlockShapeType::kUniformAllDims,\n                                          max_coeff_count, zeroCost()});\n    TensorBlock block = block_mapper.blockDescriptor(0);\n    VERIFY_IS_EQUAL(7, block.dimensions()[0]);\n    VERIFY_IS_EQUAL(5, block.dimensions()[1]);\n    VERIFY_IS_EQUAL(6, block.dimensions()[2]);\n    VERIFY_IS_EQUAL(7, block.dimensions()[3]);\n    VERIFY_IS_EQUAL(5, block.dimensions()[4]);\n    VERIFY(block.dimensions().TotalSize() <= max_coeff_count);\n  } else {\n    DSizes<Index, 5> dims(7, 5, 6, 9, 7);\n    const Index max_coeff_count = 5 * 5 * 5 * 6 * 7;\n    TensorBlockMapper block_mapper(dims, {TensorBlockShapeType::kUniformAllDims,\n                                          max_coeff_count, zeroCost()});\n    TensorBlock block = block_mapper.blockDescriptor(0);\n    VERIFY_IS_EQUAL(7, block.dimensions()[4]);\n    VERIFY_IS_EQUAL(6, block.dimensions()[3]);\n    VERIFY_IS_EQUAL(5, block.dimensions()[2]);\n    VERIFY_IS_EQUAL(5, block.dimensions()[1]);\n    VERIFY_IS_EQUAL(5, block.dimensions()[0]);\n    VERIFY(block.dimensions().TotalSize() <= max_coeff_count);\n  }\n\n  // Test shape 'UniformAllDims' with full allocation to all dims.\n  if (Layout == ColMajor) {\n    DSizes<Index, 5> dims(7, 5, 6, 17, 7);\n    const Index max_coeff_count = 7 * 5 * 6 * 17 * 7;\n    TensorBlockMapper block_mapper(dims, {TensorBlockShapeType::kUniformAllDims,\n                                          max_coeff_count, zeroCost()});\n    TensorBlock block = block_mapper.blockDescriptor(0);\n    VERIFY_IS_EQUAL(7, block.dimensions()[0]);\n    VERIFY_IS_EQUAL(5, block.dimensions()[1]);\n    VERIFY_IS_EQUAL(6, block.dimensions()[2]);\n    VERIFY_IS_EQUAL(17, block.dimensions()[3]);\n    VERIFY_IS_EQUAL(7, block.dimensions()[4]);\n    VERIFY(block.dimensions().TotalSize() <= max_coeff_count);\n  } else {\n    DSizes<Index, 5> dims(7, 5, 6, 9, 7);\n    const Index max_coeff_count = 7 * 5 * 6 * 9 * 7;\n    TensorBlockMapper block_mapper(dims, {TensorBlockShapeType::kUniformAllDims,\n                                          max_coeff_count, zeroCost()});\n    TensorBlock block = block_mapper.blockDescriptor(0);\n    VERIFY_IS_EQUAL(7, block.dimensions()[4]);\n    VERIFY_IS_EQUAL(9, block.dimensions()[3]);\n    VERIFY_IS_EQUAL(6, block.dimensions()[2]);\n    VERIFY_IS_EQUAL(5, block.dimensions()[1]);\n    VERIFY_IS_EQUAL(7, block.dimensions()[0]);\n    VERIFY(block.dimensions().TotalSize() <= max_coeff_count);\n  }\n}\n\ntemplate <int Layout>\nstatic void test_skewed_inner_dim_block_shape()\n{\n  typedef internal::TensorBlockDescriptor<5> TensorBlock;\n  typedef internal::TensorBlockMapper<5, Layout> TensorBlockMapper;\n\n  // Test shape 'SkewedInnerDims' with partial allocation to inner-most dim.\n  if (Layout == ColMajor) {\n    DSizes<Index, 5> dims(11, 5, 6, 17, 7);\n    const Index max_coeff_count = 10 * 1 * 1 * 1 * 1;\n    TensorBlockMapper block_mapper(\n        dims,\n        {TensorBlockShapeType::kSkewedInnerDims, max_coeff_count, zeroCost()});\n    TensorBlock block = block_mapper.blockDescriptor(0);\n    VERIFY_IS_EQUAL(10, block.dimensions()[0]);\n    for (int i = 1; i < 5; ++i) {\n      VERIFY_IS_EQUAL(1, block.dimensions()[i]);\n    }\n    VERIFY(block.dimensions().TotalSize() <= max_coeff_count);\n  } else {\n    DSizes<Index, 5> dims(11, 5, 6, 17, 7);\n    const Index max_coeff_count = 1 * 1 * 1 * 1 * 6;\n    TensorBlockMapper block_mapper(\n        dims,\n        {TensorBlockShapeType::kSkewedInnerDims, max_coeff_count, zeroCost()});\n    TensorBlock block = block_mapper.blockDescriptor(0);\n    VERIFY_IS_EQUAL(6, block.dimensions()[4]);\n    for (int i = 3; i >= 0; --i) {\n      VERIFY_IS_EQUAL(1, block.dimensions()[i]);\n    }\n    VERIFY(block.dimensions().TotalSize() <= max_coeff_count);\n  }\n\n  // Test shape 'SkewedInnerDims' with full allocation to inner-most dim.\n  if (Layout == ColMajor) {\n    DSizes<Index, 5> dims(11, 5, 6, 17, 7);\n    const Index max_coeff_count = 11 * 1 * 1 * 1 * 1;\n    TensorBlockMapper block_mapper(\n        dims,\n        {TensorBlockShapeType::kSkewedInnerDims, max_coeff_count, zeroCost()});\n    TensorBlock block = block_mapper.blockDescriptor(0);\n    VERIFY_IS_EQUAL(11, block.dimensions()[0]);\n    for (int i = 1; i < 5; ++i) {\n      VERIFY_IS_EQUAL(1, block.dimensions()[i]);\n    }\n    VERIFY(block.dimensions().TotalSize() <= max_coeff_count);\n  } else {\n    DSizes<Index, 5> dims(11, 5, 6, 17, 7);\n    const Index max_coeff_count = 1 * 1 * 1 * 1 * 7;\n    TensorBlockMapper block_mapper(\n        dims,\n        {TensorBlockShapeType::kSkewedInnerDims, max_coeff_count, zeroCost()});\n    TensorBlock block = block_mapper.blockDescriptor(0);\n    VERIFY_IS_EQUAL(7, block.dimensions()[4]);\n    for (int i = 3; i >= 0; --i) {\n      VERIFY_IS_EQUAL(1, block.dimensions()[i]);\n    }\n    VERIFY(block.dimensions().TotalSize() <= max_coeff_count);\n  }\n\n  // Test shape 'SkewedInnerDims' with full allocation to inner-most dim,\n  // and partial allocation to second inner-dim.\n  if (Layout == ColMajor) {\n    DSizes<Index, 5> dims(11, 5, 6, 17, 7);\n    const Index max_coeff_count = 11 * 3 * 1 * 1 * 1;\n    TensorBlockMapper block_mapper(\n        dims,\n        {TensorBlockShapeType::kSkewedInnerDims, max_coeff_count, zeroCost()});\n    TensorBlock block = block_mapper.blockDescriptor(0);\n    VERIFY_IS_EQUAL(11, block.dimensions()[0]);\n    VERIFY_IS_EQUAL(3, block.dimensions()[1]);\n    for (int i = 2; i < 5; ++i) {\n      VERIFY_IS_EQUAL(1, block.dimensions()[i]);\n    }\n    VERIFY(block.dimensions().TotalSize() <= max_coeff_count);\n  } else {\n    DSizes<Index, 5> dims(11, 5, 6, 17, 7);\n    const Index max_coeff_count = 1 * 1 * 1 * 15 * 7;\n    TensorBlockMapper block_mapper(\n        dims,\n        {TensorBlockShapeType::kSkewedInnerDims, max_coeff_count, zeroCost()});\n    TensorBlock block = block_mapper.blockDescriptor(0);\n    VERIFY_IS_EQUAL(7, block.dimensions()[4]);\n    VERIFY_IS_EQUAL(15, block.dimensions()[3]);\n    for (int i = 2; i >= 0; --i) {\n      VERIFY_IS_EQUAL(1, block.dimensions()[i]);\n    }\n    VERIFY(block.dimensions().TotalSize() <= max_coeff_count);\n  }\n\n  // Test shape 'SkewedInnerDims' with full allocation to inner-most dim,\n  // and partial allocation to third inner-dim.\n  if (Layout == ColMajor) {\n    DSizes<Index, 5> dims(11, 5, 6, 17, 7);\n    const Index max_coeff_count = 11 * 5 * 5 * 1 * 1;\n    TensorBlockMapper block_mapper(\n        dims,\n        {TensorBlockShapeType::kSkewedInnerDims, max_coeff_count, zeroCost()});\n    TensorBlock block = block_mapper.blockDescriptor(0);\n    VERIFY_IS_EQUAL(11, block.dimensions()[0]);\n    VERIFY_IS_EQUAL(5, block.dimensions()[1]);\n    VERIFY_IS_EQUAL(5, block.dimensions()[2]);\n    for (int i = 3; i < 5; ++i) {\n      VERIFY_IS_EQUAL(1, block.dimensions()[i]);\n    }\n    VERIFY(block.dimensions().TotalSize() <= max_coeff_count);\n  } else {\n    DSizes<Index, 5> dims(11, 5, 6, 17, 7);\n    const Index max_coeff_count = 1 * 1 * 5 * 17 * 7;\n    TensorBlockMapper block_mapper(\n        dims,\n        {TensorBlockShapeType::kSkewedInnerDims, max_coeff_count, zeroCost()});\n    TensorBlock block = block_mapper.blockDescriptor(0);\n    VERIFY_IS_EQUAL(7, block.dimensions()[4]);\n    VERIFY_IS_EQUAL(17, block.dimensions()[3]);\n    VERIFY_IS_EQUAL(5, block.dimensions()[2]);\n    for (int i = 1; i >= 0; --i) {\n      VERIFY_IS_EQUAL(1, block.dimensions()[i]);\n    }\n    VERIFY(block.dimensions().TotalSize() <= max_coeff_count);\n  }\n\n  // Test shape 'SkewedInnerDims' with full allocation to all dims.\n  if (Layout == ColMajor) {\n    DSizes<Index, 5> dims(11, 5, 6, 17, 7);\n    const Index max_coeff_count = 11 * 5 * 6 * 17 * 7;\n    TensorBlockMapper block_mapper(\n        dims,\n        {TensorBlockShapeType::kSkewedInnerDims, max_coeff_count, zeroCost()});\n    TensorBlock block = block_mapper.blockDescriptor(0);\n    VERIFY_IS_EQUAL(11, block.dimensions()[0]);\n    VERIFY_IS_EQUAL(5, block.dimensions()[1]);\n    VERIFY_IS_EQUAL(6, block.dimensions()[2]);\n    VERIFY_IS_EQUAL(17, block.dimensions()[3]);\n    VERIFY_IS_EQUAL(7, block.dimensions()[4]);\n    VERIFY(block.dimensions().TotalSize() <= max_coeff_count);\n  } else {\n    DSizes<Index, 5> dims(11, 5, 6, 17, 7);\n    const Index max_coeff_count = 11 * 5 * 6 * 17 * 7;\n    TensorBlockMapper block_mapper(\n        dims,\n        {TensorBlockShapeType::kSkewedInnerDims, max_coeff_count, zeroCost()});\n    TensorBlock block = block_mapper.blockDescriptor(0);\n    VERIFY_IS_EQUAL(7, block.dimensions()[4]);\n    VERIFY_IS_EQUAL(17, block.dimensions()[3]);\n    VERIFY_IS_EQUAL(6, block.dimensions()[2]);\n    VERIFY_IS_EQUAL(5, block.dimensions()[1]);\n    VERIFY_IS_EQUAL(11, block.dimensions()[0]);\n    VERIFY(block.dimensions().TotalSize() <= max_coeff_count);\n  }\n}\n\ntemplate <int Layout>\nstatic void test_empty_dims(const internal::TensorBlockShapeType block_shape)\n{\n  // Test blocking of tensors with zero dimensions:\n  //  - we must not crash on asserts and divisions by zero\n  //  - we must not return block with zero dimensions\n  //    (recipe for overflows/underflows, divisions by zero and NaNs later)\n  //  - total block count must be zero\n  {\n    typedef internal::TensorBlockMapper<1, Layout> TensorBlockMapper;\n\n    DSizes<Index, 1> dims(0);\n    for (size_t max_coeff_count = 0; max_coeff_count < 2; ++max_coeff_count) {\n      TensorBlockMapper block_mapper(\n          dims, {block_shape, max_coeff_count, zeroCost()});\n      VERIFY_IS_EQUAL(block_mapper.blockCount(), 0);\n      VERIFY(block_mapper.blockTotalSize() >= 1);\n    }\n  }\n\n  {\n    typedef internal::TensorBlockMapper<2, Layout> TensorBlockMapper;\n\n    for (int dim1 = 0; dim1 < 3; ++dim1) {\n      for (int dim2 = 0; dim2 < 3; ++dim2) {\n        DSizes<Index, 2> dims(dim1, dim2);\n        for (size_t max_coeff_count = 0; max_coeff_count < 2; ++max_coeff_count) {\n          TensorBlockMapper block_mapper(\n              dims, {block_shape, max_coeff_count, zeroCost()});\n          if (dim1 * dim2 == 0) {\n            VERIFY_IS_EQUAL(block_mapper.blockCount(), 0);\n          }\n          VERIFY(block_mapper.blockTotalSize() >= 1);\n        }\n      }\n    }\n  }\n}\n\n#define TEST_LAYOUTS(NAME) \\\n  CALL_SUBTEST(NAME<ColMajor>()); \\\n  CALL_SUBTEST(NAME<RowMajor>())\n\n#define TEST_LAYOUTS_AND_DIMS(TYPE, NAME)    \\\n  CALL_SUBTEST((NAME<TYPE, 1, ColMajor>())); \\\n  CALL_SUBTEST((NAME<TYPE, 1, RowMajor>())); \\\n  CALL_SUBTEST((NAME<TYPE, 2, ColMajor>())); \\\n  CALL_SUBTEST((NAME<TYPE, 2, RowMajor>())); \\\n  CALL_SUBTEST((NAME<TYPE, 3, ColMajor>())); \\\n  CALL_SUBTEST((NAME<TYPE, 3, RowMajor>())); \\\n  CALL_SUBTEST((NAME<TYPE, 4, ColMajor>())); \\\n  CALL_SUBTEST((NAME<TYPE, 4, RowMajor>())); \\\n  CALL_SUBTEST((NAME<TYPE, 5, ColMajor>())); \\\n  CALL_SUBTEST((NAME<TYPE, 5, RowMajor>()))\n\n#define TEST_LAYOUTS_WITH_ARG(NAME, ARG) \\\n  CALL_SUBTEST(NAME<ColMajor>(ARG)); \\\n  CALL_SUBTEST(NAME<RowMajor>(ARG))\n\nEIGEN_DECLARE_TEST(cxx11_tensor_block_access) {\n  TEST_LAYOUTS(test_block_mapper_sanity);\n  TEST_LAYOUTS_AND_DIMS(float, test_block_mapper_maps_every_element);\n  TEST_LAYOUTS(test_uniform_block_shape);\n  TEST_LAYOUTS(test_skewed_inner_dim_block_shape);\n  TEST_LAYOUTS_WITH_ARG(test_empty_dims, TensorBlockShapeType::kUniformAllDims);\n  TEST_LAYOUTS_WITH_ARG(test_empty_dims, TensorBlockShapeType::kSkewedInnerDims);\n}\n\n#undef TEST_LAYOUTS\n#undef TEST_LAYOUTS_WITH_ARG\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_block_eval.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n// clang-format off\n#include \"main.h\"\n#include <Eigen/CXX11/Tensor>\n// clang-format on\n\nusing Eigen::internal::TensorBlockDescriptor;\nusing Eigen::internal::TensorExecutor;\n\n// -------------------------------------------------------------------------- //\n// Utility functions to generate random tensors, blocks, and evaluate them.\n\ntemplate <int NumDims>\nstatic DSizes<Index, NumDims> RandomDims(Index min, Index max) {\n  DSizes<Index, NumDims> dims;\n  for (int i = 0; i < NumDims; ++i) {\n    dims[i] = internal::random<Index>(min, max);\n  }\n  return DSizes<Index, NumDims>(dims);\n}\n\n// Block offsets and extents allows to construct a TensorSlicingOp corresponding\n// to a TensorBlockDescriptor.\ntemplate <int NumDims>\nstruct TensorBlockParams {\n  DSizes<Index, NumDims> offsets;\n  DSizes<Index, NumDims> sizes;\n  TensorBlockDescriptor<NumDims, Index> desc;\n};\n\ntemplate <int Layout, int NumDims>\nstatic TensorBlockParams<NumDims> RandomBlock(DSizes<Index, NumDims> dims,\n                                              Index min, Index max) {\n  // Choose random offsets and sizes along all tensor dimensions.\n  DSizes<Index, NumDims> offsets(RandomDims<NumDims>(min, max));\n  DSizes<Index, NumDims> sizes(RandomDims<NumDims>(min, max));\n\n  // Make sure that offset + size do not overflow dims.\n  for (int i = 0; i < NumDims; ++i) {\n    offsets[i] = numext::mini(dims[i] - 1, offsets[i]);\n    sizes[i] = numext::mini(sizes[i], dims[i] - offsets[i]);\n  }\n\n  Index offset = 0;\n  DSizes<Index, NumDims> strides = Eigen::internal::strides<Layout>(dims);\n  for (int i = 0; i < NumDims; ++i) {\n    offset += strides[i] * offsets[i];\n  }\n\n  return {offsets, sizes, TensorBlockDescriptor<NumDims, Index>(offset, sizes)};\n}\n\n// Generate block with block sizes skewed towards inner dimensions. This type of\n// block is required for evaluating broadcast expressions.\ntemplate <int Layout, int NumDims>\nstatic TensorBlockParams<NumDims> SkewedInnerBlock(\n    DSizes<Index, NumDims> dims) {\n  using BlockMapper = internal::TensorBlockMapper<NumDims, Layout, Index>;\n  BlockMapper block_mapper(dims,\n                           {internal::TensorBlockShapeType::kSkewedInnerDims,\n                            internal::random<size_t>(1, dims.TotalSize()),\n                            {0, 0, 0}});\n\n  Index total_blocks = block_mapper.blockCount();\n  Index block_index = internal::random<Index>(0, total_blocks - 1);\n  auto block = block_mapper.blockDescriptor(block_index);\n  DSizes<Index, NumDims> sizes = block.dimensions();\n\n  auto strides = internal::strides<Layout>(dims);\n  DSizes<Index, NumDims> offsets;\n\n  // Compute offsets for the first block coefficient.\n  Index index = block.offset();\n  if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {\n    for (int i = NumDims - 1; i > 0; --i) {\n      const Index idx = index / strides[i];\n      index -= idx * strides[i];\n      offsets[i] = idx;\n    }\n    if (NumDims > 0) offsets[0] = index;\n  } else {\n    for (int i = 0; i < NumDims - 1; ++i) {\n      const Index idx = index / strides[i];\n      index -= idx * strides[i];\n      offsets[i] = idx;\n    }\n    if (NumDims > 0) offsets[NumDims - 1] = index;\n  }\n\n  return {offsets, sizes, block};\n}\n\ntemplate <int NumDims>\nstatic TensorBlockParams<NumDims> FixedSizeBlock(DSizes<Index, NumDims> dims) {\n  DSizes<Index, NumDims> offsets;\n  for (int i = 0; i < NumDims; ++i) offsets[i] = 0;\n\n  return {offsets, dims, TensorBlockDescriptor<NumDims, Index>(0, dims)};\n}\n\ninline Eigen::IndexList<Index, Eigen::type2index<1>> NByOne(Index n) {\n  Eigen::IndexList<Index, Eigen::type2index<1>> ret;\n  ret.set(0, n);\n  return ret;\n}\ninline Eigen::IndexList<Eigen::type2index<1>, Index> OneByM(Index m) {\n  Eigen::IndexList<Eigen::type2index<1>, Index> ret;\n  ret.set(1, m);\n  return ret;\n}\n\n// -------------------------------------------------------------------------- //\n// Verify that block expression evaluation produces the same result as a\n// TensorSliceOp (reading a tensor block is same to taking a tensor slice).\n\ntemplate <typename T, int NumDims, int Layout, typename Expression,\n          typename GenBlockParams>\nstatic void VerifyBlockEvaluator(Expression expr, GenBlockParams gen_block) {\n  using Device = DefaultDevice;\n  auto d = Device();\n\n  // Scratch memory allocator for block evaluation.\n  typedef internal::TensorBlockScratchAllocator<Device> TensorBlockScratch;\n  TensorBlockScratch scratch(d);\n\n  // TensorEvaluator is needed to produce tensor blocks of the expression.\n  auto eval = TensorEvaluator<const decltype(expr), Device>(expr, d);\n  eval.evalSubExprsIfNeeded(nullptr);\n\n  // Choose a random offsets, sizes and TensorBlockDescriptor.\n  TensorBlockParams<NumDims> block_params = gen_block();\n\n  // Evaluate TensorBlock expression into a tensor.\n  Tensor<T, NumDims, Layout> block(block_params.desc.dimensions());\n\n  // Dimensions for the potential destination buffer.\n  DSizes<Index, NumDims> dst_dims;\n  if (internal::random<bool>()) {\n    dst_dims = block_params.desc.dimensions();\n  } else {\n    for (int i = 0; i < NumDims; ++i) {\n      Index extent = internal::random<Index>(0, 5);\n      dst_dims[i] = block_params.desc.dimension(i) + extent;\n    }\n  }\n\n  // Maybe use this tensor as a block desc destination.\n  Tensor<T, NumDims, Layout> dst(dst_dims);\n  dst.setZero();\n  if (internal::random<bool>()) {\n    block_params.desc.template AddDestinationBuffer<Layout>(\n        dst.data(), internal::strides<Layout>(dst.dimensions()));\n  }\n\n  const bool root_of_expr = internal::random<bool>();\n  auto tensor_block = eval.block(block_params.desc, scratch, root_of_expr);\n\n  if (tensor_block.kind() == internal::TensorBlockKind::kMaterializedInOutput) {\n    // Copy data from destination buffer.\n    if (dimensions_match(dst.dimensions(), block.dimensions())) {\n      block = dst;\n    } else {\n      DSizes<Index, NumDims> offsets;\n      for (int i = 0; i < NumDims; ++i) offsets[i] = 0;\n      block = dst.slice(offsets, block.dimensions());\n    }\n\n  } else {\n    // Assign to block from expression.\n    auto b_expr = tensor_block.expr();\n\n    // We explicitly disable vectorization and tiling, to run a simple coefficient\n    // wise assignment loop, because it's very simple and should be correct.\n    using BlockAssign = TensorAssignOp<decltype(block), const decltype(b_expr)>;\n    using BlockExecutor = TensorExecutor<const BlockAssign, Device, false,\n                                         internal::TiledEvaluation::Off>;\n    BlockExecutor::run(BlockAssign(block, b_expr), d);\n  }\n\n  // Cleanup temporary buffers owned by a tensor block.\n  tensor_block.cleanup();\n\n  // Compute a Tensor slice corresponding to a Tensor block.\n  Tensor<T, NumDims, Layout> slice(block_params.desc.dimensions());\n  auto s_expr = expr.slice(block_params.offsets, block_params.sizes);\n\n  // Explicitly use coefficient assignment to evaluate slice expression.\n  using SliceAssign = TensorAssignOp<decltype(slice), const decltype(s_expr)>;\n  using SliceExecutor = TensorExecutor<const SliceAssign, Device, false,\n                                       internal::TiledEvaluation::Off>;\n  SliceExecutor::run(SliceAssign(slice, s_expr), d);\n\n  // Tensor block and tensor slice must be the same.\n  for (Index i = 0; i < block.dimensions().TotalSize(); ++i) {\n    VERIFY_IS_EQUAL(block.coeff(i), slice.coeff(i));\n  }\n}\n\n// -------------------------------------------------------------------------- //\n\ntemplate <typename T, int NumDims, int Layout>\nstatic void test_eval_tensor_block() {\n  DSizes<Index, NumDims> dims = RandomDims<NumDims>(10, 20);\n  Tensor<T, NumDims, Layout> input(dims);\n  input.setRandom();\n\n  // Identity tensor expression transformation.\n  VerifyBlockEvaluator<T, NumDims, Layout>(\n      input, [&dims]() { return RandomBlock<Layout>(dims, 1, 10); });\n}\n\ntemplate <typename T, int NumDims, int Layout>\nstatic void test_eval_tensor_unary_expr_block() {\n  DSizes<Index, NumDims> dims = RandomDims<NumDims>(10, 20);\n  Tensor<T, NumDims, Layout> input(dims);\n  input.setRandom();\n\n  VerifyBlockEvaluator<T, NumDims, Layout>(\n      input.square(), [&dims]() { return RandomBlock<Layout>(dims, 1, 10); });\n}\n\ntemplate <typename T, int NumDims, int Layout>\nstatic void test_eval_tensor_binary_expr_block() {\n  DSizes<Index, NumDims> dims = RandomDims<NumDims>(10, 20);\n  Tensor<T, NumDims, Layout> lhs(dims), rhs(dims);\n  lhs.setRandom();\n  rhs.setRandom();\n\n  VerifyBlockEvaluator<T, NumDims, Layout>(\n      lhs + rhs, [&dims]() { return RandomBlock<Layout>(dims, 1, 10); });\n}\n\ntemplate <typename T, int NumDims, int Layout>\nstatic void test_eval_tensor_binary_with_unary_expr_block() {\n  DSizes<Index, NumDims> dims = RandomDims<NumDims>(10, 20);\n  Tensor<T, NumDims, Layout> lhs(dims), rhs(dims);\n  lhs.setRandom();\n  rhs.setRandom();\n\n  VerifyBlockEvaluator<T, NumDims, Layout>(\n      (lhs.square() + rhs.square()).sqrt(),\n      [&dims]() { return RandomBlock<Layout>(dims, 1, 10); });\n}\n\ntemplate <typename T, int NumDims, int Layout>\nstatic void test_eval_tensor_broadcast() {\n  DSizes<Index, NumDims> dims = RandomDims<NumDims>(1, 10);\n  Tensor<T, NumDims, Layout> input(dims);\n  input.setRandom();\n\n  DSizes<Index, NumDims> bcast = RandomDims<NumDims>(1, 5);\n\n  DSizes<Index, NumDims> bcasted_dims;\n  for (int i = 0; i < NumDims; ++i) bcasted_dims[i] = dims[i] * bcast[i];\n\n  VerifyBlockEvaluator<T, NumDims, Layout>(\n      input.broadcast(bcast),\n      [&bcasted_dims]() { return SkewedInnerBlock<Layout>(bcasted_dims); });\n\n  VerifyBlockEvaluator<T, NumDims, Layout>(\n      input.broadcast(bcast),\n      [&bcasted_dims]() { return RandomBlock<Layout>(bcasted_dims, 5, 10); });\n\n  VerifyBlockEvaluator<T, NumDims, Layout>(\n      input.broadcast(bcast),\n      [&bcasted_dims]() { return FixedSizeBlock(bcasted_dims); });\n\n  // Check that desc.destination() memory is not shared between two broadcast\n  // materializations.\n  VerifyBlockEvaluator<T, NumDims, Layout>(\n      input.broadcast(bcast) + input.square().broadcast(bcast),\n      [&bcasted_dims]() { return SkewedInnerBlock<Layout>(bcasted_dims); });\n}\n\ntemplate <typename T, int NumDims, int Layout>\nstatic void test_eval_tensor_reshape() {\n  DSizes<Index, NumDims> dims = RandomDims<NumDims>(1, 10);\n\n  DSizes<Index, NumDims> shuffled = dims;\n  std::shuffle(&shuffled[0], &shuffled[NumDims - 1], std::mt19937(g_seed));\n\n  Tensor<T, NumDims, Layout> input(dims);\n  input.setRandom();\n\n  VerifyBlockEvaluator<T, NumDims, Layout>(\n      input.reshape(shuffled),\n      [&shuffled]() { return RandomBlock<Layout>(shuffled, 1, 10); });\n\n  VerifyBlockEvaluator<T, NumDims, Layout>(\n      input.reshape(shuffled),\n      [&shuffled]() { return SkewedInnerBlock<Layout>(shuffled); });\n}\n\ntemplate <typename T, int NumDims, int Layout>\nstatic void test_eval_tensor_cast() {\n  DSizes<Index, NumDims> dims = RandomDims<NumDims>(10, 20);\n  Tensor<T, NumDims, Layout> input(dims);\n  input.setRandom();\n\n  VerifyBlockEvaluator<T, NumDims, Layout>(\n      input.template cast<int>().template cast<T>(),\n      [&dims]() { return RandomBlock<Layout>(dims, 1, 10); });\n}\n\ntemplate <typename T, int NumDims, int Layout>\nstatic void test_eval_tensor_select() {\n  DSizes<Index, NumDims> dims = RandomDims<NumDims>(10, 20);\n  Tensor<T, NumDims, Layout> lhs(dims);\n  Tensor<T, NumDims, Layout> rhs(dims);\n  Tensor<bool, NumDims, Layout> cond(dims);\n  lhs.setRandom();\n  rhs.setRandom();\n  cond.setRandom();\n\n  VerifyBlockEvaluator<T, NumDims, Layout>(cond.select(lhs, rhs), [&dims]() {\n    return RandomBlock<Layout>(dims, 1, 20);\n  });\n}\n\ntemplate <typename T, int NumDims, int Layout>\nstatic void test_eval_tensor_padding() {\n  const int inner_dim = Layout == static_cast<int>(ColMajor) ? 0 : NumDims - 1;\n\n  DSizes<Index, NumDims> dims = RandomDims<NumDims>(10, 20);\n  Tensor<T, NumDims, Layout> input(dims);\n  input.setRandom();\n\n  DSizes<Index, NumDims> pad_before = RandomDims<NumDims>(0, 4);\n  DSizes<Index, NumDims> pad_after = RandomDims<NumDims>(0, 4);\n  array<std::pair<Index, Index>, NumDims> paddings;\n  for (int i = 0; i < NumDims; ++i) {\n    paddings[i] = std::make_pair(pad_before[i], pad_after[i]);\n  }\n\n  // Test squeezing reads from inner dim.\n  if (internal::random<bool>()) {\n    pad_before[inner_dim] = 0;\n    pad_after[inner_dim] = 0;\n    paddings[inner_dim] = std::make_pair(0, 0);\n  }\n\n  DSizes<Index, NumDims> padded_dims;\n  for (int i = 0; i < NumDims; ++i) {\n    padded_dims[i] = dims[i] + pad_before[i] + pad_after[i];\n  }\n\n  VerifyBlockEvaluator<T, NumDims, Layout>(\n      input.pad(paddings),\n      [&padded_dims]() { return FixedSizeBlock(padded_dims); });\n\n  VerifyBlockEvaluator<T, NumDims, Layout>(\n      input.pad(paddings),\n      [&padded_dims]() { return RandomBlock<Layout>(padded_dims, 1, 10); });\n\n  VerifyBlockEvaluator<T, NumDims, Layout>(\n      input.pad(paddings),\n      [&padded_dims]() { return SkewedInnerBlock<Layout>(padded_dims); });\n}\n\ntemplate <typename T, int NumDims, int Layout>\nstatic void test_eval_tensor_chipping() {\n  DSizes<Index, NumDims> dims = RandomDims<NumDims>(10, 20);\n  Tensor<T, NumDims, Layout> input(dims);\n  input.setRandom();\n\n  Index chip_dim = internal::random<int>(0, NumDims - 1);\n  Index chip_offset = internal::random<Index>(0, dims[chip_dim] - 2);\n\n  DSizes<Index, NumDims - 1> chipped_dims;\n  for (Index i = 0; i < chip_dim; ++i) {\n    chipped_dims[i] = dims[i];\n  }\n  for (Index i = chip_dim + 1; i < NumDims; ++i) {\n    chipped_dims[i - 1] = dims[i];\n  }\n\n  // Block buffer forwarding.\n  VerifyBlockEvaluator<T, NumDims - 1, Layout>(\n      input.chip(chip_offset, chip_dim),\n      [&chipped_dims]() { return FixedSizeBlock(chipped_dims); });\n\n  VerifyBlockEvaluator<T, NumDims - 1, Layout>(\n      input.chip(chip_offset, chip_dim),\n      [&chipped_dims]() { return RandomBlock<Layout>(chipped_dims, 1, 10); });\n\n  // Block expression assignment.\n  VerifyBlockEvaluator<T, NumDims - 1, Layout>(\n      input.square().chip(chip_offset, chip_dim),\n      [&chipped_dims]() { return FixedSizeBlock(chipped_dims); });\n\n  VerifyBlockEvaluator<T, NumDims - 1, Layout>(\n      input.square().chip(chip_offset, chip_dim),\n      [&chipped_dims]() { return RandomBlock<Layout>(chipped_dims, 1, 10); });\n}\n\ntemplate <typename T, int NumDims, int Layout>\nstatic void test_eval_tensor_generator() {\n  DSizes<Index, NumDims> dims = RandomDims<NumDims>(10, 20);\n  Tensor<T, NumDims, Layout> input(dims);\n  input.setRandom();\n\n  auto generator = [](const array<Index, NumDims>& coords) -> T {\n    T result = static_cast<T>(0);\n    for (int i = 0; i < NumDims; ++i) {\n      result += static_cast<T>((i + 1) * coords[i]);\n    }\n    return result;\n  };\n\n  VerifyBlockEvaluator<T, NumDims, Layout>(\n      input.generate(generator), [&dims]() { return FixedSizeBlock(dims); });\n\n  VerifyBlockEvaluator<T, NumDims, Layout>(\n      input.generate(generator),\n      [&dims]() { return RandomBlock<Layout>(dims, 1, 10); });\n}\n\ntemplate <typename T, int NumDims, int Layout>\nstatic void test_eval_tensor_reverse() {\n  DSizes<Index, NumDims> dims = RandomDims<NumDims>(10, 20);\n  Tensor<T, NumDims, Layout> input(dims);\n  input.setRandom();\n\n  // Randomly reverse dimensions.\n  Eigen::DSizes<bool, NumDims> reverse;\n  for (int i = 0; i < NumDims; ++i) reverse[i] = internal::random<bool>();\n\n  VerifyBlockEvaluator<T, NumDims, Layout>(\n      input.reverse(reverse), [&dims]() { return FixedSizeBlock(dims); });\n\n  VerifyBlockEvaluator<T, NumDims, Layout>(input.reverse(reverse), [&dims]() {\n    return RandomBlock<Layout>(dims, 1, 10);\n  });\n}\n\ntemplate <typename T, int NumDims, int Layout>\nstatic void test_eval_tensor_slice() {\n  DSizes<Index, NumDims> dims = RandomDims<NumDims>(10, 20);\n  Tensor<T, NumDims, Layout> input(dims);\n  input.setRandom();\n\n  // Pick a random slice of an input tensor.\n  DSizes<Index, NumDims> slice_start = RandomDims<NumDims>(5, 10);\n  DSizes<Index, NumDims> slice_size = RandomDims<NumDims>(5, 10);\n\n  // Make sure that slice start + size do not overflow tensor dims.\n  for (int i = 0; i < NumDims; ++i) {\n    slice_start[i] = numext::mini(dims[i] - 1, slice_start[i]);\n    slice_size[i] = numext::mini(slice_size[i], dims[i] - slice_start[i]);\n  }\n\n  VerifyBlockEvaluator<T, NumDims, Layout>(\n      input.slice(slice_start, slice_size),\n      [&slice_size]() { return FixedSizeBlock(slice_size); });\n\n  VerifyBlockEvaluator<T, NumDims, Layout>(\n      input.slice(slice_start, slice_size),\n      [&slice_size]() { return RandomBlock<Layout>(slice_size, 1, 10); });\n}\n\ntemplate <typename T, int NumDims, int Layout>\nstatic void test_eval_tensor_shuffle() {\n  DSizes<Index, NumDims> dims = RandomDims<NumDims>(5, 15);\n  Tensor<T, NumDims, Layout> input(dims);\n  input.setRandom();\n\n  DSizes<Index, NumDims> shuffle;\n  for (int i = 0; i < NumDims; ++i) shuffle[i] = i;\n\n  do {\n    DSizes<Index, NumDims> shuffled_dims;\n    for (int i = 0; i < NumDims; ++i) shuffled_dims[i] = dims[shuffle[i]];\n\n    VerifyBlockEvaluator<T, NumDims, Layout>(\n        input.shuffle(shuffle),\n        [&shuffled_dims]() { return FixedSizeBlock(shuffled_dims); });\n\n    VerifyBlockEvaluator<T, NumDims, Layout>(\n        input.shuffle(shuffle), [&shuffled_dims]() {\n          return RandomBlock<Layout>(shuffled_dims, 1, 5);\n        });\n\n    break;\n\n  } while (std::next_permutation(&shuffle[0], &shuffle[0] + NumDims));\n}\n\ntemplate <typename T, int Layout>\nstatic void test_eval_tensor_reshape_with_bcast() {\n  Index dim = internal::random<Index>(1, 100);\n\n  Tensor<T, 2, Layout> lhs(1, dim);\n  Tensor<T, 2, Layout> rhs(dim, 1);\n  lhs.setRandom();\n  rhs.setRandom();\n\n  auto reshapeLhs = NByOne(dim);\n  auto reshapeRhs = OneByM(dim);\n\n  auto bcastLhs = OneByM(dim);\n  auto bcastRhs = NByOne(dim);\n\n  DSizes<Index, 2> dims(dim, dim);\n\n  VerifyBlockEvaluator<T, 2, Layout>(\n      lhs.reshape(reshapeLhs).broadcast(bcastLhs) +\n          rhs.reshape(reshapeRhs).broadcast(bcastRhs),\n      [dims]() { return SkewedInnerBlock<Layout, 2>(dims); });\n}\n\ntemplate <typename T, int Layout>\nstatic void test_eval_tensor_forced_eval() {\n  Index dim = internal::random<Index>(1, 100);\n\n  Tensor<T, 2, Layout> lhs(dim, 1);\n  Tensor<T, 2, Layout> rhs(1, dim);\n  lhs.setRandom();\n  rhs.setRandom();\n\n  auto bcastLhs = OneByM(dim);\n  auto bcastRhs = NByOne(dim);\n\n  DSizes<Index, 2> dims(dim, dim);\n\n  VerifyBlockEvaluator<T, 2, Layout>(\n      (lhs.broadcast(bcastLhs) + rhs.broadcast(bcastRhs)).eval().reshape(dims),\n      [dims]() { return SkewedInnerBlock<Layout, 2>(dims); });\n\n  VerifyBlockEvaluator<T, 2, Layout>(\n      (lhs.broadcast(bcastLhs) + rhs.broadcast(bcastRhs)).eval().reshape(dims),\n      [dims]() { return RandomBlock<Layout, 2>(dims, 1, 50); });\n}\n\ntemplate <typename T, int Layout>\nstatic void test_eval_tensor_chipping_of_bcast() {\n  if (Layout != static_cast<int>(RowMajor)) return;\n\n  Index dim0 = internal::random<Index>(1, 10);\n  Index dim1 = internal::random<Index>(1, 10);\n  Index dim2 = internal::random<Index>(1, 10);\n\n  Tensor<T, 3, Layout> input(1, dim1, dim2);\n  input.setRandom();\n\n  Eigen::array<Index, 3> bcast = {{dim0, 1, 1}};\n  DSizes<Index, 2> chipped_dims(dim0, dim2);\n\n  VerifyBlockEvaluator<T, 2, Layout>(\n      input.broadcast(bcast).chip(0, 1),\n      [chipped_dims]() { return FixedSizeBlock(chipped_dims); });\n\n  VerifyBlockEvaluator<T, 2, Layout>(\n      input.broadcast(bcast).chip(0, 1),\n      [chipped_dims]() { return SkewedInnerBlock<Layout, 2>(chipped_dims); });\n\n  VerifyBlockEvaluator<T, 2, Layout>(\n      input.broadcast(bcast).chip(0, 1),\n      [chipped_dims]() { return RandomBlock<Layout, 2>(chipped_dims, 1, 5); });\n}\n\n// -------------------------------------------------------------------------- //\n// Verify that assigning block to a Tensor expression produces the same result\n// as an assignment to TensorSliceOp (writing a block is is identical to\n// assigning one tensor to a slice of another tensor).\n\ntemplate <typename T, int NumDims, int Layout, int NumExprDims = NumDims,\n          typename Expression, typename GenBlockParams>\nstatic void VerifyBlockAssignment(Tensor<T, NumDims, Layout>& tensor,\n                                  Expression expr, GenBlockParams gen_block) {\n  using Device = DefaultDevice;\n  auto d = Device();\n\n  // We use tensor evaluator as a target for block and slice assignments.\n  auto eval = TensorEvaluator<decltype(expr), Device>(expr, d);\n\n  // Generate a random block, or choose a block that fits in full expression.\n  TensorBlockParams<NumExprDims> block_params = gen_block();\n\n  // Generate random data of the selected block size.\n  Tensor<T, NumExprDims, Layout> block(block_params.desc.dimensions());\n  block.setRandom();\n\n  // ************************************************************************ //\n  // (1) Assignment from a block.\n\n  // Construct a materialize block from a random generated block tensor.\n  internal::TensorMaterializedBlock<T, NumExprDims, Layout> blk(\n      internal::TensorBlockKind::kView, block.data(), block.dimensions());\n\n  // Reset all underlying tensor values to zero.\n  tensor.setZero();\n\n  // Use evaluator to write block into a tensor.\n  eval.writeBlock(block_params.desc, blk);\n\n  // Make a copy of the result after assignment.\n  Tensor<T, NumDims, Layout> block_assigned = tensor;\n\n  // ************************************************************************ //\n  // (2) Assignment to a slice\n\n  // Reset all underlying tensor values to zero.\n  tensor.setZero();\n\n  // Assign block to a slice of original expression\n  auto s_expr = expr.slice(block_params.offsets, block_params.sizes);\n\n  // Explicitly use coefficient assignment to evaluate slice expression.\n  using SliceAssign = TensorAssignOp<decltype(s_expr), const decltype(block)>;\n  using SliceExecutor = TensorExecutor<const SliceAssign, Device, false,\n                                       internal::TiledEvaluation::Off>;\n  SliceExecutor::run(SliceAssign(s_expr, block), d);\n\n  // Make a copy of the result after assignment.\n  Tensor<T, NumDims, Layout> slice_assigned = tensor;\n\n  for (Index i = 0; i < tensor.dimensions().TotalSize(); ++i) {\n    VERIFY_IS_EQUAL(block_assigned.coeff(i), slice_assigned.coeff(i));\n  }\n}\n\n// -------------------------------------------------------------------------- //\n\ntemplate <typename T, int NumDims, int Layout>\nstatic void test_assign_to_tensor() {\n  DSizes<Index, NumDims> dims = RandomDims<NumDims>(10, 20);\n  Tensor<T, NumDims, Layout> tensor(dims);\n\n  TensorMap<Tensor<T, NumDims, Layout>> map(tensor.data(), dims);\n\n  VerifyBlockAssignment<T, NumDims, Layout>(\n      tensor, map, [&dims]() { return RandomBlock<Layout>(dims, 10, 20); });\n  VerifyBlockAssignment<T, NumDims, Layout>(\n      tensor, map, [&dims]() { return FixedSizeBlock(dims); });\n}\n\ntemplate <typename T, int NumDims, int Layout>\nstatic void test_assign_to_tensor_reshape() {\n  DSizes<Index, NumDims> dims = RandomDims<NumDims>(10, 20);\n  Tensor<T, NumDims, Layout> tensor(dims);\n\n  TensorMap<Tensor<T, NumDims, Layout>> map(tensor.data(), dims);\n\n  DSizes<Index, NumDims> shuffled = dims;\n  std::shuffle(&shuffled[0], &shuffled[NumDims - 1], std::mt19937(g_seed));\n\n  VerifyBlockAssignment<T, NumDims, Layout>(\n      tensor, map.reshape(shuffled),\n      [&shuffled]() { return RandomBlock<Layout>(shuffled, 1, 10); });\n\n  VerifyBlockAssignment<T, NumDims, Layout>(\n      tensor, map.reshape(shuffled),\n      [&shuffled]() { return SkewedInnerBlock<Layout>(shuffled); });\n\n  VerifyBlockAssignment<T, NumDims, Layout>(\n      tensor, map.reshape(shuffled),\n      [&shuffled]() { return FixedSizeBlock(shuffled); });\n}\n\ntemplate <typename T, int NumDims, int Layout>\nstatic void test_assign_to_tensor_chipping() {\n  DSizes<Index, NumDims> dims = RandomDims<NumDims>(10, 20);\n  Tensor<T, NumDims, Layout> tensor(dims);\n\n  Index chip_dim = internal::random<int>(0, NumDims - 1);\n  Index chip_offset = internal::random<Index>(0, dims[chip_dim] - 2);\n\n  DSizes<Index, NumDims - 1> chipped_dims;\n  for (Index i = 0; i < chip_dim; ++i) {\n    chipped_dims[i] = dims[i];\n  }\n  for (Index i = chip_dim + 1; i < NumDims; ++i) {\n    chipped_dims[i - 1] = dims[i];\n  }\n\n  TensorMap<Tensor<T, NumDims, Layout>> map(tensor.data(), dims);\n\n  VerifyBlockAssignment<T, NumDims, Layout, NumDims - 1>(\n      tensor, map.chip(chip_offset, chip_dim),\n      [&chipped_dims]() { return RandomBlock<Layout>(chipped_dims, 1, 10); });\n\n  VerifyBlockAssignment<T, NumDims, Layout, NumDims - 1>(\n      tensor, map.chip(chip_offset, chip_dim),\n      [&chipped_dims]() { return SkewedInnerBlock<Layout>(chipped_dims); });\n\n  VerifyBlockAssignment<T, NumDims, Layout, NumDims - 1>(\n      tensor, map.chip(chip_offset, chip_dim),\n      [&chipped_dims]() { return FixedSizeBlock(chipped_dims); });\n}\n\ntemplate <typename T, int NumDims, int Layout>\nstatic void test_assign_to_tensor_slice() {\n  DSizes<Index, NumDims> dims = RandomDims<NumDims>(10, 20);\n  Tensor<T, NumDims, Layout> tensor(dims);\n\n  // Pick a random slice of tensor.\n  DSizes<Index, NumDims> slice_start = RandomDims<NumDims>(5, 10);\n  DSizes<Index, NumDims> slice_size = RandomDims<NumDims>(5, 10);\n\n  // Make sure that slice start + size do not overflow tensor dims.\n  for (int i = 0; i < NumDims; ++i) {\n    slice_start[i] = numext::mini(dims[i] - 1, slice_start[i]);\n    slice_size[i] = numext::mini(slice_size[i], dims[i] - slice_start[i]);\n  }\n\n  TensorMap<Tensor<T, NumDims, Layout>> map(tensor.data(), dims);\n\n  VerifyBlockAssignment<T, NumDims, Layout>(\n      tensor, map.slice(slice_start, slice_size),\n      [&slice_size]() { return RandomBlock<Layout>(slice_size, 1, 10); });\n\n  VerifyBlockAssignment<T, NumDims, Layout>(\n      tensor, map.slice(slice_start, slice_size),\n      [&slice_size]() { return SkewedInnerBlock<Layout>(slice_size); });\n\n  VerifyBlockAssignment<T, NumDims, Layout>(\n      tensor, map.slice(slice_start, slice_size),\n      [&slice_size]() { return FixedSizeBlock(slice_size); });\n}\n\ntemplate <typename T, int NumDims, int Layout>\nstatic void test_assign_to_tensor_shuffle() {\n  DSizes<Index, NumDims> dims = RandomDims<NumDims>(5, 15);\n  Tensor<T, NumDims, Layout> tensor(dims);\n\n  DSizes<Index, NumDims> shuffle;\n  for (int i = 0; i < NumDims; ++i) shuffle[i] = i;\n\n  TensorMap<Tensor<T, NumDims, Layout>> map(tensor.data(), dims);\n\n  do {\n    DSizes<Index, NumDims> shuffled_dims;\n    for (int i = 0; i < NumDims; ++i) shuffled_dims[i] = dims[shuffle[i]];\n\n    VerifyBlockAssignment<T, NumDims, Layout>(\n        tensor, map.shuffle(shuffle),\n        [&shuffled_dims]() { return FixedSizeBlock(shuffled_dims); });\n\n    VerifyBlockAssignment<T, NumDims, Layout>(\n        tensor, map.shuffle(shuffle), [&shuffled_dims]() {\n          return RandomBlock<Layout>(shuffled_dims, 1, 5);\n        });\n\n  } while (std::next_permutation(&shuffle[0], &shuffle[0] + NumDims));\n}\n\n// -------------------------------------------------------------------------- //\n\n#define CALL_SUBTEST_PART(PART) \\\n  CALL_SUBTEST_##PART\n\n#define CALL_SUBTESTS_DIMS_LAYOUTS(PART, NAME)           \\\n  CALL_SUBTEST_PART(PART)((NAME<float, 1, RowMajor>())); \\\n  CALL_SUBTEST_PART(PART)((NAME<float, 2, RowMajor>())); \\\n  CALL_SUBTEST_PART(PART)((NAME<float, 3, RowMajor>())); \\\n  CALL_SUBTEST_PART(PART)((NAME<float, 4, RowMajor>())); \\\n  CALL_SUBTEST_PART(PART)((NAME<float, 5, RowMajor>())); \\\n  CALL_SUBTEST_PART(PART)((NAME<float, 1, ColMajor>())); \\\n  CALL_SUBTEST_PART(PART)((NAME<float, 2, ColMajor>())); \\\n  CALL_SUBTEST_PART(PART)((NAME<float, 4, ColMajor>())); \\\n  CALL_SUBTEST_PART(PART)((NAME<float, 4, ColMajor>())); \\\n  CALL_SUBTEST_PART(PART)((NAME<float, 5, ColMajor>()))\n\n#define CALL_SUBTESTS_LAYOUTS(PART, NAME)             \\\n  CALL_SUBTEST_PART(PART)((NAME<float, RowMajor>())); \\\n  CALL_SUBTEST_PART(PART)((NAME<float, ColMajor>()))\n\nEIGEN_DECLARE_TEST(cxx11_tensor_block_eval) {\n  // clang-format off\n  CALL_SUBTESTS_DIMS_LAYOUTS(1, test_eval_tensor_block);\n  CALL_SUBTESTS_DIMS_LAYOUTS(1, test_eval_tensor_unary_expr_block);\n  CALL_SUBTESTS_DIMS_LAYOUTS(1, test_eval_tensor_binary_expr_block);\n  CALL_SUBTESTS_DIMS_LAYOUTS(2, test_eval_tensor_binary_with_unary_expr_block);\n  CALL_SUBTESTS_DIMS_LAYOUTS(2, test_eval_tensor_broadcast);\n  CALL_SUBTESTS_DIMS_LAYOUTS(2, test_eval_tensor_reshape);\n  CALL_SUBTESTS_DIMS_LAYOUTS(3, test_eval_tensor_cast);\n  CALL_SUBTESTS_DIMS_LAYOUTS(3, test_eval_tensor_select);\n  CALL_SUBTESTS_DIMS_LAYOUTS(3, test_eval_tensor_padding);\n  CALL_SUBTESTS_DIMS_LAYOUTS(4, test_eval_tensor_chipping);\n  CALL_SUBTESTS_DIMS_LAYOUTS(4, test_eval_tensor_generator);\n  CALL_SUBTESTS_DIMS_LAYOUTS(4, test_eval_tensor_reverse);\n  CALL_SUBTESTS_DIMS_LAYOUTS(5, test_eval_tensor_slice);\n  CALL_SUBTESTS_DIMS_LAYOUTS(5, test_eval_tensor_shuffle);\n\n  CALL_SUBTESTS_LAYOUTS(6, test_eval_tensor_reshape_with_bcast);\n  CALL_SUBTESTS_LAYOUTS(6, test_eval_tensor_forced_eval);\n  CALL_SUBTESTS_LAYOUTS(6, test_eval_tensor_chipping_of_bcast);\n\n  CALL_SUBTESTS_DIMS_LAYOUTS(7, test_assign_to_tensor);\n  CALL_SUBTESTS_DIMS_LAYOUTS(7, test_assign_to_tensor_reshape);\n  CALL_SUBTESTS_DIMS_LAYOUTS(7, test_assign_to_tensor_chipping);\n  CALL_SUBTESTS_DIMS_LAYOUTS(8, test_assign_to_tensor_slice);\n  CALL_SUBTESTS_DIMS_LAYOUTS(8, test_assign_to_tensor_shuffle);\n\n  // Force CMake to split this test.\n  // EIGEN_SUFFIXES;1;2;3;4;5;6;7;8\n\n  // clang-format on\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_block_io.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n// clang-format off\n#include \"main.h\"\n#include <Eigen/CXX11/Tensor>\n// clang-format on\n\n// -------------------------------------------------------------------------- //\n// A set of tests for TensorBlockIO: copying data between tensor blocks.\n\ntemplate <int NumDims>\nstatic DSizes<Index, NumDims> RandomDims(Index min, Index max) {\n  DSizes<Index, NumDims> dims;\n  for (int i = 0; i < NumDims; ++i) {\n    dims[i] = internal::random<Index>(min, max);\n  }\n  return DSizes<Index, NumDims>(dims);\n}\n\nstatic internal::TensorBlockShapeType RandomBlockShape() {\n  return internal::random<bool>()\n         ? internal::TensorBlockShapeType::kUniformAllDims\n         : internal::TensorBlockShapeType::kSkewedInnerDims;\n}\n\ntemplate <int NumDims>\nstatic size_t RandomTargetBlockSize(const DSizes<Index, NumDims>& dims) {\n  return internal::random<size_t>(1, dims.TotalSize());\n}\n\ntemplate <int Layout, int NumDims>\nstatic Index GetInputIndex(Index output_index,\n                           const array<Index, NumDims>& output_to_input_dim_map,\n                           const array<Index, NumDims>& input_strides,\n                           const array<Index, NumDims>& output_strides) {\n  int input_index = 0;\n  if (Layout == ColMajor) {\n    for (int i = NumDims - 1; i > 0; --i) {\n      const Index idx = output_index / output_strides[i];\n      input_index += idx * input_strides[output_to_input_dim_map[i]];\n      output_index -= idx * output_strides[i];\n    }\n    return input_index +\n           output_index * input_strides[output_to_input_dim_map[0]];\n  } else {\n    for (int i = 0; i < NumDims - 1; ++i) {\n      const Index idx = output_index / output_strides[i];\n      input_index += idx * input_strides[output_to_input_dim_map[i]];\n      output_index -= idx * output_strides[i];\n    }\n    return input_index +\n           output_index * input_strides[output_to_input_dim_map[NumDims - 1]];\n  }\n}\n\ntemplate <typename T, int NumDims, int Layout>\nstatic void test_block_io_copy_data_from_source_to_target() {\n  using TensorBlockIO = internal::TensorBlockIO<T, Index, NumDims, Layout>;\n  using IODst = typename TensorBlockIO::Dst;\n  using IOSrc = typename TensorBlockIO::Src;\n\n  // Generate a random input Tensor.\n  DSizes<Index, NumDims> dims = RandomDims<NumDims>(1, 30);\n  Tensor<T, NumDims, Layout> input(dims);\n  input.setRandom();\n\n  // Write data to an output Tensor.\n  Tensor<T, NumDims, Layout> output(dims);\n\n  // Construct a tensor block mapper.\n  using TensorBlockMapper =\n      internal::TensorBlockMapper<NumDims, Layout, Index>;\n  TensorBlockMapper block_mapper(\n      dims, {RandomBlockShape(), RandomTargetBlockSize(dims), {0, 0, 0}});\n\n  // We will copy data from input to output through this buffer.\n  Tensor<T, NumDims, Layout> block(block_mapper.blockDimensions());\n\n  // Precompute strides for TensorBlockIO::Copy.\n  auto input_strides = internal::strides<Layout>(dims);\n  auto output_strides = internal::strides<Layout>(dims);\n\n  const T* input_data = input.data();\n  T* output_data = output.data();\n  T* block_data = block.data();\n\n  for (int i = 0; i < block_mapper.blockCount(); ++i) {\n    auto desc = block_mapper.blockDescriptor(i);\n\n    auto blk_dims = desc.dimensions();\n    auto blk_strides = internal::strides<Layout>(blk_dims);\n\n    {\n      // Read from input into a block buffer.\n      IODst dst(blk_dims, blk_strides, block_data, 0);\n      IOSrc src(input_strides, input_data, desc.offset());\n\n      TensorBlockIO::Copy(dst, src);\n    }\n\n    {\n      // Write from block buffer to output.\n      IODst dst(blk_dims, output_strides, output_data, desc.offset());\n      IOSrc src(blk_strides, block_data, 0);\n\n      TensorBlockIO::Copy(dst, src);\n    }\n  }\n\n  for (int i = 0; i < dims.TotalSize(); ++i) {\n    VERIFY_IS_EQUAL(input_data[i], output_data[i]);\n  }\n}\n\ntemplate <typename T, int NumDims, int Layout>\nstatic void test_block_io_copy_using_reordered_dimensions() {\n  // Generate a random input Tensor.\n  DSizes<Index, NumDims> dims = RandomDims<NumDims>(1, 30);\n  Tensor<T, NumDims, Layout> input(dims);\n  input.setRandom();\n\n  // Create a random dimension re-ordering/shuffle.\n  std::vector<int> shuffle;\n\n  for (int i = 0; i < NumDims; ++i) shuffle.push_back(i);\n  std::shuffle(shuffle.begin(), shuffle.end(), std::mt19937(g_seed));\n\n  DSizes<Index, NumDims> output_tensor_dims;\n  DSizes<Index, NumDims> input_to_output_dim_map;\n  DSizes<Index, NumDims> output_to_input_dim_map;\n  for (Index i = 0; i < NumDims; ++i) {\n    output_tensor_dims[shuffle[i]] = dims[i];\n    input_to_output_dim_map[i] = shuffle[i];\n    output_to_input_dim_map[shuffle[i]] = i;\n  }\n\n  // Write data to an output Tensor.\n  Tensor<T, NumDims, Layout> output(output_tensor_dims);\n\n  // Construct a tensor block mapper.\n  // NOTE: Tensor block mapper works with shuffled dimensions.\n  using TensorBlockMapper =\n      internal::TensorBlockMapper<NumDims, Layout, Index>;\n  TensorBlockMapper block_mapper(output_tensor_dims,\n                                 {RandomBlockShape(),\n                                  RandomTargetBlockSize(output_tensor_dims),\n                                  {0, 0, 0}});\n\n  // We will copy data from input to output through this buffer.\n  Tensor<T, NumDims, Layout> block(block_mapper.blockDimensions());\n\n  // Precompute strides for TensorBlockIO::Copy.\n  auto input_strides = internal::strides<Layout>(dims);\n  auto output_strides = internal::strides<Layout>(output_tensor_dims);\n\n  const T* input_data = input.data();\n  T* output_data = output.data();\n  T* block_data = block.data();\n\n  for (Index i = 0; i < block_mapper.blockCount(); ++i) {\n    auto desc = block_mapper.blockDescriptor(i);\n\n    const Index first_coeff_index = GetInputIndex<Layout, NumDims>(\n        desc.offset(), output_to_input_dim_map, input_strides,\n        output_strides);\n\n    // NOTE: Block dimensions are in the same order as output dimensions.\n\n    using TensorBlockIO = internal::TensorBlockIO<T, Index, NumDims, Layout>;\n    using IODst = typename TensorBlockIO::Dst;\n    using IOSrc = typename TensorBlockIO::Src;\n\n    auto blk_dims = desc.dimensions();\n    auto blk_strides = internal::strides<Layout>(blk_dims);\n\n    {\n      // Read from input into a block buffer.\n      IODst dst(blk_dims, blk_strides, block_data, 0);\n      IOSrc src(input_strides, input_data, first_coeff_index);\n\n      // TODO(ezhulenev): Remove when fully switched to TensorBlock.\n      DSizes<int, NumDims> dim_map;\n      for (int j = 0; j < NumDims; ++j)\n        dim_map[j] = static_cast<int>(output_to_input_dim_map[j]);\n      TensorBlockIO::Copy(dst, src, /*dst_to_src_dim_map=*/dim_map);\n    }\n\n    {\n      // We need to convert block dimensions from output to input order.\n      auto dst_dims = blk_dims;\n      for (int out_dim = 0; out_dim < NumDims; ++out_dim) {\n        dst_dims[output_to_input_dim_map[out_dim]] = blk_dims[out_dim];\n      }\n\n      // Write from block buffer to output.\n      IODst dst(dst_dims, input_strides, output_data, first_coeff_index);\n      IOSrc src(blk_strides, block_data, 0);\n\n      // TODO(ezhulenev): Remove when fully switched to TensorBlock.\n      DSizes<int, NumDims> dim_map;\n      for (int j = 0; j < NumDims; ++j)\n        dim_map[j] = static_cast<int>(input_to_output_dim_map[j]);\n      TensorBlockIO::Copy(dst, src, /*dst_to_src_dim_map=*/dim_map);\n    }\n  }\n\n  for (Index i = 0; i < dims.TotalSize(); ++i) {\n    VERIFY_IS_EQUAL(input_data[i], output_data[i]);\n  }\n}\n\n// This is the special case for reading data with reordering, when dimensions\n// before/after reordering are the same. Squeezing reads along inner dimensions\n// in this case is illegal, because we reorder innermost dimension.\ntemplate <int Layout>\nstatic void test_block_io_copy_using_reordered_dimensions_do_not_squeeze() {\n  DSizes<Index, 3> tensor_dims(7, 9, 7);\n  DSizes<Index, 3> block_dims = tensor_dims;\n\n  DSizes<int, 3> block_to_tensor_dim;\n  block_to_tensor_dim[0] = 2;\n  block_to_tensor_dim[1] = 1;\n  block_to_tensor_dim[2] = 0;\n\n  auto tensor_strides = internal::strides<Layout>(tensor_dims);\n  auto block_strides = internal::strides<Layout>(block_dims);\n\n  Tensor<float, 3, Layout> block(block_dims);\n  Tensor<float, 3, Layout> tensor(tensor_dims);\n  tensor.setRandom();\n\n  float* tensor_data = tensor.data();\n  float* block_data = block.data();\n\n  using TensorBlockIO = internal::TensorBlockIO<float, Index, 3, Layout>;\n  using IODst = typename TensorBlockIO::Dst;\n  using IOSrc = typename TensorBlockIO::Src;\n\n  // Read from a tensor into a block.\n  IODst dst(block_dims, block_strides, block_data, 0);\n  IOSrc src(tensor_strides, tensor_data, 0);\n\n  TensorBlockIO::Copy(dst, src, /*dst_to_src_dim_map=*/block_to_tensor_dim);\n\n  TensorMap<Tensor<float, 3, Layout> > block_tensor(block_data, block_dims);\n  TensorMap<Tensor<float, 3, Layout> > tensor_tensor(tensor_data, tensor_dims);\n\n  for (Index d0 = 0; d0 < tensor_dims[0]; ++d0) {\n    for (Index d1 = 0; d1 < tensor_dims[1]; ++d1) {\n      for (Index d2 = 0; d2 < tensor_dims[2]; ++d2) {\n        float block_value = block_tensor(d2, d1, d0);\n        float tensor_value = tensor_tensor(d0, d1, d2);\n        VERIFY_IS_EQUAL(block_value, tensor_value);\n      }\n    }\n  }\n}\n\n// This is the special case for reading data with reordering, when dimensions\n// before/after reordering are the same. Squeezing reads in this case is allowed\n// because we reorder outer dimensions.\ntemplate <int Layout>\nstatic void test_block_io_copy_using_reordered_dimensions_squeeze() {\n  DSizes<Index, 4> tensor_dims(7, 5, 9, 9);\n  DSizes<Index, 4> block_dims = tensor_dims;\n\n  DSizes<int, 4> block_to_tensor_dim;\n  block_to_tensor_dim[0] = 0;\n  block_to_tensor_dim[1] = 1;\n  block_to_tensor_dim[2] = 3;\n  block_to_tensor_dim[3] = 2;\n\n  auto tensor_strides = internal::strides<Layout>(tensor_dims);\n  auto block_strides = internal::strides<Layout>(block_dims);\n\n  Tensor<float, 4, Layout> block(block_dims);\n  Tensor<float, 4, Layout> tensor(tensor_dims);\n  tensor.setRandom();\n\n  float* tensor_data = tensor.data();\n  float* block_data = block.data();\n\n  using TensorBlockIO = internal::TensorBlockIO<float, Index, 4, Layout>;\n  using IODst = typename TensorBlockIO::Dst;\n  using IOSrc = typename TensorBlockIO::Src;\n\n  // Read from a tensor into a block.\n  IODst dst(block_dims, block_strides, block_data, 0);\n  IOSrc src(tensor_strides, tensor_data, 0);\n\n  TensorBlockIO::Copy(dst, src, /*dst_to_src_dim_map=*/block_to_tensor_dim);\n\n  TensorMap<Tensor<float, 4, Layout> > block_tensor(block_data, block_dims);\n  TensorMap<Tensor<float, 4, Layout> > tensor_tensor(tensor_data, tensor_dims);\n\n  for (Index d0 = 0; d0 < tensor_dims[0]; ++d0) {\n    for (Index d1 = 0; d1 < tensor_dims[1]; ++d1) {\n      for (Index d2 = 0; d2 < tensor_dims[2]; ++d2) {\n        for (Index d3 = 0; d3 < tensor_dims[3]; ++d3) {\n          float block_value = block_tensor(d0, d1, d3, d2);\n          float tensor_value = tensor_tensor(d0, d1, d2, d3);\n          VERIFY_IS_EQUAL(block_value, tensor_value);\n        }\n      }\n    }\n  }\n}\n\ntemplate <int Layout>\nstatic void test_block_io_zero_stride() {\n  DSizes<Index, 5> rnd_dims = RandomDims<5>(1, 30);\n\n  DSizes<Index, 5> input_tensor_dims = rnd_dims;\n  input_tensor_dims[0] = 1;\n  input_tensor_dims[2] = 1;\n  input_tensor_dims[4] = 1;\n\n  Tensor<float, 5, Layout> input(input_tensor_dims);\n  input.setRandom();\n\n  DSizes<Index, 5> output_tensor_dims = rnd_dims;\n\n  auto input_tensor_strides = internal::strides<Layout>(input_tensor_dims);\n  auto output_tensor_strides = internal::strides<Layout>(output_tensor_dims);\n\n  auto input_tensor_strides_with_zeros = input_tensor_strides;\n  input_tensor_strides_with_zeros[0] = 0;\n  input_tensor_strides_with_zeros[2] = 0;\n  input_tensor_strides_with_zeros[4] = 0;\n\n  Tensor<float, 5, Layout> output(output_tensor_dims);\n  output.setRandom();\n\n  using TensorBlockIO = internal::TensorBlockIO<float, Index, 5, Layout>;\n  using IODst = typename TensorBlockIO::Dst;\n  using IOSrc = typename TensorBlockIO::Src;\n\n  // Write data from input to output with broadcasting in dims [0, 2, 4].\n  IODst dst(output_tensor_dims, output_tensor_strides, output.data(), 0);\n  IOSrc src(input_tensor_strides_with_zeros, input.data(), 0);\n  TensorBlockIO::Copy(dst, src);\n\n  for (int i = 0; i < output_tensor_dims[0]; ++i) {\n    for (int j = 0; j < output_tensor_dims[1]; ++j) {\n      for (int k = 0; k < output_tensor_dims[2]; ++k) {\n        for (int l = 0; l < output_tensor_dims[3]; ++l) {\n          for (int m = 0; m < output_tensor_dims[4]; ++m) {\n            float input_value = input(0, j, 0, l, 0);\n            float output_value = output(i, j, k, l, m);\n            VERIFY_IS_EQUAL(input_value, output_value);\n          }\n        }\n      }\n    }\n  }\n}\n\ntemplate <int Layout>\nstatic void test_block_io_squeeze_ones() {\n  using TensorBlockIO = internal::TensorBlockIO<float, Index, 5, Layout>;\n  using IODst = typename TensorBlockIO::Dst;\n  using IOSrc = typename TensorBlockIO::Src;\n\n  // Total size > 1.\n  {\n    DSizes<Index, 5> block_sizes(1, 2, 1, 2, 1);\n    auto strides = internal::strides<Layout>(block_sizes);\n\n    // Create a random input tensor.\n    Tensor<float, 5> input(block_sizes);\n    input.setRandom();\n\n    Tensor<float, 5> output(block_sizes);\n\n    IODst dst(block_sizes, strides, output.data(), 0);\n    IOSrc src(strides, input.data());\n    TensorBlockIO::Copy(dst, src);\n\n    for (Index i = 0; i < block_sizes.TotalSize(); ++i) {\n      VERIFY_IS_EQUAL(output.data()[i], input.data()[i]);\n    }\n  }\n\n  // Total size == 1.\n  {\n    DSizes<Index, 5> block_sizes(1, 1, 1, 1, 1);\n    auto strides = internal::strides<Layout>(block_sizes);\n\n    // Create a random input tensor.\n    Tensor<float, 5> input(block_sizes);\n    input.setRandom();\n\n    Tensor<float, 5> output(block_sizes);\n\n    IODst dst(block_sizes, strides, output.data(), 0);\n    IOSrc src(strides, input.data());\n    TensorBlockIO::Copy(dst, src);\n\n    for (Index i = 0; i < block_sizes.TotalSize(); ++i) {\n      VERIFY_IS_EQUAL(output.data()[i], input.data()[i]);\n    }\n  }\n}\n\n#define CALL_SUBTESTS(NAME)                   \\\n  CALL_SUBTEST((NAME<float, 1, RowMajor>())); \\\n  CALL_SUBTEST((NAME<float, 2, RowMajor>())); \\\n  CALL_SUBTEST((NAME<float, 4, RowMajor>())); \\\n  CALL_SUBTEST((NAME<float, 5, RowMajor>())); \\\n  CALL_SUBTEST((NAME<float, 1, ColMajor>())); \\\n  CALL_SUBTEST((NAME<float, 2, ColMajor>())); \\\n  CALL_SUBTEST((NAME<float, 4, ColMajor>())); \\\n  CALL_SUBTEST((NAME<float, 5, ColMajor>()))\n\nEIGEN_DECLARE_TEST(cxx11_tensor_block_io) {\n  // clang-format off\n  CALL_SUBTESTS(test_block_io_copy_data_from_source_to_target);\n  CALL_SUBTESTS(test_block_io_copy_using_reordered_dimensions);\n\n  CALL_SUBTEST(test_block_io_copy_using_reordered_dimensions_do_not_squeeze<RowMajor>());\n  CALL_SUBTEST(test_block_io_copy_using_reordered_dimensions_do_not_squeeze<ColMajor>());\n\n  CALL_SUBTEST(test_block_io_copy_using_reordered_dimensions_squeeze<RowMajor>());\n  CALL_SUBTEST(test_block_io_copy_using_reordered_dimensions_squeeze<ColMajor>());\n\n  CALL_SUBTEST(test_block_io_zero_stride<RowMajor>());\n  CALL_SUBTEST(test_block_io_zero_stride<ColMajor>());\n\n  CALL_SUBTEST(test_block_io_squeeze_ones<RowMajor>());\n  CALL_SUBTEST(test_block_io_squeeze_ones<ColMajor>());\n  // clang-format on\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_broadcast_sycl.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016\n// Mehdi Goli    Codeplay Software Ltd.\n// Ralph Potter  Codeplay Software Ltd.\n// Luke Iwanski  Codeplay Software Ltd.\n// Contact: <eigen@codeplay.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_TEST_NO_LONGDOUBLE\n#define EIGEN_TEST_NO_COMPLEX\n\n#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int64_t\n#define EIGEN_USE_SYCL\n\n#include \"main.h\"\n#include <unsupported/Eigen/CXX11/Tensor>\n\nusing Eigen::array;\nusing Eigen::SyclDevice;\nusing Eigen::Tensor;\nusing Eigen::TensorMap;\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_broadcast_sycl_fixed(const Eigen::SyclDevice &sycl_device){\n\n  // BROADCAST test:\n  IndexType inDim1=2;\n  IndexType inDim2=3;\n  IndexType inDim3=5;\n  IndexType inDim4=7;\n  IndexType bDim1=2;\n  IndexType bDim2=3;\n  IndexType bDim3=1;\n  IndexType bDim4=4;\n  array<IndexType, 4> in_range   = {{inDim1, inDim2, inDim3, inDim4}};\n  array<IndexType, 4> broadcasts = {{bDim1, bDim2, bDim3, bDim4}};\n  array<IndexType, 4> out_range;  // = in_range * broadcasts\n  for (size_t i = 0; i < out_range.size(); ++i)\n    out_range[i] = in_range[i] * broadcasts[i];\n\n  Tensor<DataType, 4, DataLayout, IndexType>  input(in_range);\n  Tensor<DataType, 4, DataLayout, IndexType> out(out_range);\n\n  for (size_t i = 0; i < in_range.size(); ++i)\n    VERIFY_IS_EQUAL(out.dimension(i), out_range[i]);\n\n\n  for (IndexType i = 0; i < input.size(); ++i)\n    input(i) = static_cast<DataType>(i);\n\n  DataType * gpu_in_data  = static_cast<DataType*>(sycl_device.allocate(input.dimensions().TotalSize()*sizeof(DataType)));\n  DataType * gpu_out_data  = static_cast<DataType*>(sycl_device.allocate(out.dimensions().TotalSize()*sizeof(DataType)));\n\n  TensorMap<TensorFixedSize<DataType, Sizes<2, 3, 5, 7>, DataLayout, IndexType>> gpu_in(gpu_in_data, in_range);\n  TensorMap<Tensor<DataType, 4, DataLayout, IndexType>> gpu_out(gpu_out_data, out_range);\n  sycl_device.memcpyHostToDevice(gpu_in_data, input.data(),(input.dimensions().TotalSize())*sizeof(DataType));\n  gpu_out.device(sycl_device) = gpu_in.broadcast(broadcasts);\n  sycl_device.memcpyDeviceToHost(out.data(), gpu_out_data,(out.dimensions().TotalSize())*sizeof(DataType));\n\n  for (IndexType i = 0; i < inDim1*bDim1; ++i) {\n    for (IndexType j = 0; j < inDim2*bDim2; ++j) {\n      for (IndexType k = 0; k < inDim3*bDim3; ++k) {\n        for (IndexType l = 0; l < inDim4*bDim4; ++l) {\n          VERIFY_IS_APPROX(input(i%2,j%3,k%5,l%7), out(i,j,k,l));\n        }\n      }\n    }\n  }\n  printf(\"Broadcast Test with fixed size Passed\\n\");\n  sycl_device.deallocate(gpu_in_data);\n  sycl_device.deallocate(gpu_out_data);\n}\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_broadcast_sycl(const Eigen::SyclDevice &sycl_device){\n\n  // BROADCAST test:\n  IndexType inDim1=2;\n  IndexType inDim2=3;\n  IndexType inDim3=5;\n  IndexType inDim4=7;\n  IndexType bDim1=2;\n  IndexType bDim2=3;\n  IndexType bDim3=1;\n  IndexType bDim4=4;\n  array<IndexType, 4> in_range   = {{inDim1, inDim2, inDim3, inDim4}};\n  array<IndexType, 4> broadcasts = {{bDim1, bDim2, bDim3, bDim4}};\n  array<IndexType, 4> out_range;  // = in_range * broadcasts\n  for (size_t i = 0; i < out_range.size(); ++i)\n    out_range[i] = in_range[i] * broadcasts[i];\n\n  Tensor<DataType, 4, DataLayout, IndexType>  input(in_range);\n  Tensor<DataType, 4, DataLayout, IndexType> out(out_range);\n\n  for (size_t i = 0; i < in_range.size(); ++i)\n    VERIFY_IS_EQUAL(out.dimension(i), out_range[i]);\n\n\n  for (IndexType i = 0; i < input.size(); ++i)\n    input(i) = static_cast<DataType>(i);\n\n  DataType * gpu_in_data  = static_cast<DataType*>(sycl_device.allocate(input.dimensions().TotalSize()*sizeof(DataType)));\n  DataType * gpu_out_data  = static_cast<DataType*>(sycl_device.allocate(out.dimensions().TotalSize()*sizeof(DataType)));\n\n  TensorMap<Tensor<DataType, 4, DataLayout, IndexType>>  gpu_in(gpu_in_data, in_range);\n  TensorMap<Tensor<DataType, 4, DataLayout, IndexType>> gpu_out(gpu_out_data, out_range);\n  sycl_device.memcpyHostToDevice(gpu_in_data, input.data(),(input.dimensions().TotalSize())*sizeof(DataType));\n  gpu_out.device(sycl_device) = gpu_in.broadcast(broadcasts);\n  sycl_device.memcpyDeviceToHost(out.data(), gpu_out_data,(out.dimensions().TotalSize())*sizeof(DataType));\n\n  for (IndexType i = 0; i < inDim1*bDim1; ++i) {\n    for (IndexType j = 0; j < inDim2*bDim2; ++j) {\n      for (IndexType k = 0; k < inDim3*bDim3; ++k) {\n        for (IndexType l = 0; l < inDim4*bDim4; ++l) {\n          VERIFY_IS_APPROX(input(i%inDim1,j%inDim2,k%inDim3,l%inDim4), out(i,j,k,l));\n        }\n      }\n    }\n  }\n  printf(\"Broadcast Test Passed\\n\");\n  sycl_device.deallocate(gpu_in_data);\n  sycl_device.deallocate(gpu_out_data);\n}\n\ntemplate<typename DataType> void sycl_broadcast_test_per_device(const cl::sycl::device& d){\n  std::cout << \"Running on \" << d.template get_info<cl::sycl::info::device::name>() << std::endl;\n  QueueInterface queueInterface(d);\n  auto sycl_device = Eigen::SyclDevice(&queueInterface);\n  test_broadcast_sycl<DataType, RowMajor, int64_t>(sycl_device);\n  test_broadcast_sycl<DataType, ColMajor, int64_t>(sycl_device);\n  test_broadcast_sycl_fixed<DataType, RowMajor, int64_t>(sycl_device);\n  test_broadcast_sycl_fixed<DataType, ColMajor, int64_t>(sycl_device);\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_broadcast_sycl) {\n  for (const auto& device :Eigen::get_sycl_supported_devices()) {\n    CALL_SUBTEST(sycl_broadcast_test_per_device<float>(device));\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_broadcasting.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\n\ntemplate <int DataLayout>\nstatic void test_simple_broadcasting()\n{\n  Tensor<float, 4, DataLayout> tensor(2,3,5,7);\n  tensor.setRandom();\n  array<ptrdiff_t, 4> broadcasts;\n  broadcasts[0] = 1;\n  broadcasts[1] = 1;\n  broadcasts[2] = 1;\n  broadcasts[3] = 1;\n\n  Tensor<float, 4, DataLayout> no_broadcast;\n  no_broadcast = tensor.broadcast(broadcasts);\n\n  VERIFY_IS_EQUAL(no_broadcast.dimension(0), 2);\n  VERIFY_IS_EQUAL(no_broadcast.dimension(1), 3);\n  VERIFY_IS_EQUAL(no_broadcast.dimension(2), 5);\n  VERIFY_IS_EQUAL(no_broadcast.dimension(3), 7);\n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 5; ++k) {\n        for (int l = 0; l < 7; ++l) {\n          VERIFY_IS_EQUAL(tensor(i,j,k,l), no_broadcast(i,j,k,l));\n        }\n      }\n    }\n  }\n\n  broadcasts[0] = 2;\n  broadcasts[1] = 3;\n  broadcasts[2] = 1;\n  broadcasts[3] = 4;\n  Tensor<float, 4, DataLayout> broadcast;\n  broadcast = tensor.broadcast(broadcasts);\n\n  VERIFY_IS_EQUAL(broadcast.dimension(0), 4);\n  VERIFY_IS_EQUAL(broadcast.dimension(1), 9);\n  VERIFY_IS_EQUAL(broadcast.dimension(2), 5);\n  VERIFY_IS_EQUAL(broadcast.dimension(3), 28);\n\n  for (int i = 0; i < 4; ++i) {\n    for (int j = 0; j < 9; ++j) {\n      for (int k = 0; k < 5; ++k) {\n        for (int l = 0; l < 28; ++l) {\n          VERIFY_IS_EQUAL(tensor(i%2,j%3,k%5,l%7), broadcast(i,j,k,l));\n        }\n      }\n    }\n  }\n}\n\n\ntemplate <int DataLayout>\nstatic void test_vectorized_broadcasting()\n{\n  Tensor<float, 3, DataLayout> tensor(8,3,5);\n  tensor.setRandom();\n  array<ptrdiff_t, 3> broadcasts;\n  broadcasts[0] = 2;\n  broadcasts[1] = 3;\n  broadcasts[2] = 4;\n\n  Tensor<float, 3, DataLayout> broadcast;\n  broadcast = tensor.broadcast(broadcasts);\n\n  VERIFY_IS_EQUAL(broadcast.dimension(0), 16);\n  VERIFY_IS_EQUAL(broadcast.dimension(1), 9);\n  VERIFY_IS_EQUAL(broadcast.dimension(2), 20);\n\n  for (int i = 0; i < 16; ++i) {\n    for (int j = 0; j < 9; ++j) {\n      for (int k = 0; k < 20; ++k) {\n        VERIFY_IS_EQUAL(tensor(i%8,j%3,k%5), broadcast(i,j,k));\n      }\n    }\n  }\n\n#if EIGEN_HAS_VARIADIC_TEMPLATES\n  tensor.resize(11,3,5);\n#else\n  array<Index, 3> new_dims;\n  new_dims[0] = 11;\n  new_dims[1] = 3;\n  new_dims[2] = 5;\n  tensor.resize(new_dims);\n#endif\n\n  tensor.setRandom();\n  broadcast = tensor.broadcast(broadcasts);\n\n  VERIFY_IS_EQUAL(broadcast.dimension(0), 22);\n  VERIFY_IS_EQUAL(broadcast.dimension(1), 9);\n  VERIFY_IS_EQUAL(broadcast.dimension(2), 20);\n\n  for (int i = 0; i < 22; ++i) {\n    for (int j = 0; j < 9; ++j) {\n      for (int k = 0; k < 20; ++k) {\n        VERIFY_IS_EQUAL(tensor(i%11,j%3,k%5), broadcast(i,j,k));\n      }\n    }\n  }\n}\n\n\ntemplate <int DataLayout>\nstatic void test_static_broadcasting()\n{\n  Tensor<float, 3, DataLayout> tensor(8,3,5);\n  tensor.setRandom();\n\n#if defined(EIGEN_HAS_INDEX_LIST)\n  Eigen::IndexList<Eigen::type2index<2>, Eigen::type2index<3>, Eigen::type2index<4>> broadcasts;\n#else\n  Eigen::array<int, 3> broadcasts;\n  broadcasts[0] = 2;\n  broadcasts[1] = 3;\n  broadcasts[2] = 4;\n#endif\n\n  Tensor<float, 3, DataLayout> broadcast;\n  broadcast = tensor.broadcast(broadcasts);\n\n  VERIFY_IS_EQUAL(broadcast.dimension(0), 16);\n  VERIFY_IS_EQUAL(broadcast.dimension(1), 9);\n  VERIFY_IS_EQUAL(broadcast.dimension(2), 20);\n\n  for (int i = 0; i < 16; ++i) {\n    for (int j = 0; j < 9; ++j) {\n      for (int k = 0; k < 20; ++k) {\n        VERIFY_IS_EQUAL(tensor(i%8,j%3,k%5), broadcast(i,j,k));\n      }\n    }\n  }\n\n#if EIGEN_HAS_VARIADIC_TEMPLATES\n  tensor.resize(11,3,5);\n#else\n  array<Index, 3> new_dims;\n  new_dims[0] = 11;\n  new_dims[1] = 3;\n  new_dims[2] = 5;\n  tensor.resize(new_dims);\n#endif\n\n  tensor.setRandom();\n  broadcast = tensor.broadcast(broadcasts);\n\n  VERIFY_IS_EQUAL(broadcast.dimension(0), 22);\n  VERIFY_IS_EQUAL(broadcast.dimension(1), 9);\n  VERIFY_IS_EQUAL(broadcast.dimension(2), 20);\n\n  for (int i = 0; i < 22; ++i) {\n    for (int j = 0; j < 9; ++j) {\n      for (int k = 0; k < 20; ++k) {\n        VERIFY_IS_EQUAL(tensor(i%11,j%3,k%5), broadcast(i,j,k));\n      }\n    }\n  }\n}\n\n\ntemplate <int DataLayout>\nstatic void test_fixed_size_broadcasting()\n{\n  // Need to add a [] operator to the Size class for this to work\n#if 0\n  Tensor<float, 1, DataLayout> t1(10);\n  t1.setRandom();\n  TensorFixedSize<float, Sizes<1>, DataLayout> t2;\n  t2 = t2.constant(20.0f);\n\n  Tensor<float, 1, DataLayout> t3 = t1 + t2.broadcast(Eigen::array<int, 1>{{10}});\n  for (int i = 0; i < 10; ++i) {\n    VERIFY_IS_APPROX(t3(i), t1(i) + t2(0));\n  }\n\n  TensorMap<TensorFixedSize<float, Sizes<1>, DataLayout> > t4(t2.data(), {{1}});\n  Tensor<float, 1, DataLayout> t5 = t1 + t4.broadcast(Eigen::array<int, 1>{{10}});\n  for (int i = 0; i < 10; ++i) {\n    VERIFY_IS_APPROX(t5(i), t1(i) + t2(0));\n  }\n#endif\n}\n\ntemplate <int DataLayout>\nstatic void test_simple_broadcasting_one_by_n()\n{\n  Tensor<float, 4, DataLayout> tensor(1,13,5,7);\n  tensor.setRandom();\n  array<ptrdiff_t, 4> broadcasts;\n  broadcasts[0] = 9;\n  broadcasts[1] = 1;\n  broadcasts[2] = 1;\n  broadcasts[3] = 1;\n  Tensor<float, 4, DataLayout> broadcast;\n  broadcast = tensor.broadcast(broadcasts);\n\n  VERIFY_IS_EQUAL(broadcast.dimension(0), 9);\n  VERIFY_IS_EQUAL(broadcast.dimension(1), 13);\n  VERIFY_IS_EQUAL(broadcast.dimension(2), 5);\n  VERIFY_IS_EQUAL(broadcast.dimension(3), 7);\n\n  for (int i = 0; i < 9; ++i) {\n    for (int j = 0; j < 13; ++j) {\n      for (int k = 0; k < 5; ++k) {\n        for (int l = 0; l < 7; ++l) {\n          VERIFY_IS_EQUAL(tensor(i%1,j%13,k%5,l%7), broadcast(i,j,k,l));\n        }\n      }\n    }\n  }\n}\n\ntemplate <int DataLayout>\nstatic void test_simple_broadcasting_n_by_one()\n{\n  Tensor<float, 4, DataLayout> tensor(7,3,5,1);\n  tensor.setRandom();\n  array<ptrdiff_t, 4> broadcasts;\n  broadcasts[0] = 1;\n  broadcasts[1] = 1;\n  broadcasts[2] = 1;\n  broadcasts[3] = 19;\n  Tensor<float, 4, DataLayout> broadcast;\n  broadcast = tensor.broadcast(broadcasts);\n\n  VERIFY_IS_EQUAL(broadcast.dimension(0), 7);\n  VERIFY_IS_EQUAL(broadcast.dimension(1), 3);\n  VERIFY_IS_EQUAL(broadcast.dimension(2), 5);\n  VERIFY_IS_EQUAL(broadcast.dimension(3), 19);\n\n  for (int i = 0; i < 7; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 5; ++k) {\n        for (int l = 0; l < 19; ++l) {\n          VERIFY_IS_EQUAL(tensor(i%7,j%3,k%5,l%1), broadcast(i,j,k,l));\n        }\n      }\n    }\n  }\n}\n\ntemplate <int DataLayout>\nstatic void test_simple_broadcasting_one_by_n_by_one_1d()\n{\n  Tensor<float, 3, DataLayout> tensor(1,7,1);\n  tensor.setRandom();\n  array<ptrdiff_t, 3> broadcasts;\n  broadcasts[0] = 5;\n  broadcasts[1] = 1;\n  broadcasts[2] = 13;\n  Tensor<float, 3, DataLayout> broadcasted;\n  broadcasted = tensor.broadcast(broadcasts);\n\n  VERIFY_IS_EQUAL(broadcasted.dimension(0), 5);\n  VERIFY_IS_EQUAL(broadcasted.dimension(1), 7);\n  VERIFY_IS_EQUAL(broadcasted.dimension(2), 13);\n\n  for (int i = 0; i < 5; ++i) {\n    for (int j = 0; j < 7; ++j) {\n      for (int k = 0; k < 13; ++k) {\n        VERIFY_IS_EQUAL(tensor(0,j%7,0), broadcasted(i,j,k));\n      }\n    }\n  }\n}\n\ntemplate <int DataLayout>\nstatic void test_simple_broadcasting_one_by_n_by_one_2d()\n{\n  Tensor<float, 4, DataLayout> tensor(1,7,13,1);\n  tensor.setRandom();\n  array<ptrdiff_t, 4> broadcasts;\n  broadcasts[0] = 5;\n  broadcasts[1] = 1;\n  broadcasts[2] = 1;\n  broadcasts[3] = 19;\n  Tensor<float, 4, DataLayout> broadcast;\n  broadcast = tensor.broadcast(broadcasts);\n\n  VERIFY_IS_EQUAL(broadcast.dimension(0), 5);\n  VERIFY_IS_EQUAL(broadcast.dimension(1), 7);\n  VERIFY_IS_EQUAL(broadcast.dimension(2), 13);\n  VERIFY_IS_EQUAL(broadcast.dimension(3), 19);\n\n  for (int i = 0; i < 5; ++i) {\n    for (int j = 0; j < 7; ++j) {\n      for (int k = 0; k < 13; ++k) {\n        for (int l = 0; l < 19; ++l) {\n          VERIFY_IS_EQUAL(tensor(0,j%7,k%13,0), broadcast(i,j,k,l));\n        }\n      }\n    }\n  }\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_broadcasting)\n{\n  CALL_SUBTEST(test_simple_broadcasting<ColMajor>());\n  CALL_SUBTEST(test_simple_broadcasting<RowMajor>());\n  CALL_SUBTEST(test_vectorized_broadcasting<ColMajor>());\n  CALL_SUBTEST(test_vectorized_broadcasting<RowMajor>());\n  CALL_SUBTEST(test_static_broadcasting<ColMajor>());\n  CALL_SUBTEST(test_static_broadcasting<RowMajor>());\n  CALL_SUBTEST(test_fixed_size_broadcasting<ColMajor>());\n  CALL_SUBTEST(test_fixed_size_broadcasting<RowMajor>());\n  CALL_SUBTEST(test_simple_broadcasting_one_by_n<RowMajor>());\n  CALL_SUBTEST(test_simple_broadcasting_n_by_one<RowMajor>());\n  CALL_SUBTEST(test_simple_broadcasting_one_by_n<ColMajor>());\n  CALL_SUBTEST(test_simple_broadcasting_n_by_one<ColMajor>());\n  CALL_SUBTEST(test_simple_broadcasting_one_by_n_by_one_1d<ColMajor>());\n  CALL_SUBTEST(test_simple_broadcasting_one_by_n_by_one_2d<ColMajor>());\n  CALL_SUBTEST(test_simple_broadcasting_one_by_n_by_one_1d<RowMajor>());\n  CALL_SUBTEST(test_simple_broadcasting_one_by_n_by_one_2d<RowMajor>());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_builtins_sycl.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016\n// Mehdi Goli    Codeplay Software Ltd.\n// Ralph Potter  Codeplay Software Ltd.\n// Luke Iwanski  Codeplay Software Ltd.\n// Contact: <eigen@codeplay.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_TEST_NO_LONGDOUBLE\n#define EIGEN_TEST_NO_COMPLEX\n\n#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int64_t\n#define EIGEN_USE_SYCL\n\n#include \"main.h\"\n#include <unsupported/Eigen/CXX11/Tensor>\n\nusing Eigen::array;\nusing Eigen::SyclDevice;\nusing Eigen::Tensor;\nusing Eigen::TensorMap;\n\n// Functions used to compare the TensorMap implementation on the device with\n// the equivalent on the host\nnamespace cl {\nnamespace sycl {\ntemplate <typename T> T abs(T x) { return cl::sycl::fabs(x); }\ntemplate <typename T> T square(T x) { return x * x; }\ntemplate <typename T> T cube(T x) { return x * x * x; }\ntemplate <typename T> T inverse(T x) { return T(1) / x; }\ntemplate <typename T> T cwiseMax(T x, T y) { return cl::sycl::max(x, y); }\ntemplate <typename T> T cwiseMin(T x, T y) { return cl::sycl::min(x, y); }\n}\n}\n\nstruct EqualAssignement {\n  template <typename Lhs, typename Rhs>\n  void operator()(Lhs& lhs, const Rhs& rhs) { lhs = rhs; }\n};\n\nstruct PlusEqualAssignement {\n  template <typename Lhs, typename Rhs>\n  void operator()(Lhs& lhs, const Rhs& rhs) { lhs += rhs; }\n};\n\ntemplate <typename DataType, int DataLayout,\n          typename Assignement, typename Operator>\nvoid test_unary_builtins_for_scalar(const Eigen::SyclDevice& sycl_device,\n                                    const array<int64_t, 3>& tensor_range) {\n  Operator op;\n  Assignement asgn;\n  {\n    /* Assignement(out, Operator(in)) */\n    Tensor<DataType, 3, DataLayout, int64_t> in(tensor_range);\n    Tensor<DataType, 3, DataLayout, int64_t> out(tensor_range);\n    in = in.random() + DataType(0.01);\n    out = out.random() + DataType(0.01);\n    Tensor<DataType, 3, DataLayout, int64_t> reference(out);\n    DataType *gpu_data = static_cast<DataType *>(\n        sycl_device.allocate(in.size() * sizeof(DataType)));\n    DataType *gpu_data_out = static_cast<DataType *>(\n        sycl_device.allocate(out.size() * sizeof(DataType)));\n    TensorMap<Tensor<DataType, 3, DataLayout, int64_t>> gpu(gpu_data, tensor_range);\n    TensorMap<Tensor<DataType, 3, DataLayout, int64_t>> gpu_out(gpu_data_out, tensor_range);\n    sycl_device.memcpyHostToDevice(gpu_data, in.data(),\n                                   (in.size()) * sizeof(DataType));\n    sycl_device.memcpyHostToDevice(gpu_data_out, out.data(),\n                                   (out.size()) * sizeof(DataType));\n    auto device_expr = gpu_out.device(sycl_device);\n    asgn(device_expr, op(gpu));\n    sycl_device.memcpyDeviceToHost(out.data(), gpu_data_out,\n                                   (out.size()) * sizeof(DataType));\n    for (int64_t i = 0; i < out.size(); ++i) {\n      DataType ver = reference(i);\n      asgn(ver, op(in(i)));\n      VERIFY_IS_APPROX(out(i), ver);\n    }\n    sycl_device.deallocate(gpu_data);\n    sycl_device.deallocate(gpu_data_out);\n  }\n  {\n    /* Assignement(out, Operator(out)) */\n    Tensor<DataType, 3, DataLayout, int64_t> out(tensor_range);\n    out = out.random() + DataType(0.01);\n    Tensor<DataType, 3, DataLayout, int64_t> reference(out);\n    DataType *gpu_data_out = static_cast<DataType *>(\n        sycl_device.allocate(out.size() * sizeof(DataType)));\n    TensorMap<Tensor<DataType, 3, DataLayout, int64_t>> gpu_out(gpu_data_out, tensor_range);\n    sycl_device.memcpyHostToDevice(gpu_data_out, out.data(),\n                                   (out.size()) * sizeof(DataType));\n    auto device_expr = gpu_out.device(sycl_device);\n    asgn(device_expr, op(gpu_out));\n    sycl_device.memcpyDeviceToHost(out.data(), gpu_data_out,\n                                   (out.size()) * sizeof(DataType));\n    for (int64_t i = 0; i < out.size(); ++i) {\n      DataType ver = reference(i);\n      asgn(ver, op(reference(i)));\n      VERIFY_IS_APPROX(out(i), ver);\n    }\n    sycl_device.deallocate(gpu_data_out);\n  }\n}\n\n#define DECLARE_UNARY_STRUCT(FUNC)                                 \\\n  struct op_##FUNC {                                               \\\n    template <typename T>                                          \\\n    auto operator()(const T& x) -> decltype(cl::sycl::FUNC(x)) {   \\\n      return cl::sycl::FUNC(x);                                    \\\n    }                                                              \\\n    template <typename T>                                          \\\n    auto operator()(const TensorMap<T>& x) -> decltype(x.FUNC()) { \\\n      return x.FUNC();                                             \\\n    }                                                              \\\n  };\n\nDECLARE_UNARY_STRUCT(abs)\nDECLARE_UNARY_STRUCT(sqrt)\nDECLARE_UNARY_STRUCT(rsqrt)\nDECLARE_UNARY_STRUCT(square)\nDECLARE_UNARY_STRUCT(cube)\nDECLARE_UNARY_STRUCT(inverse)\nDECLARE_UNARY_STRUCT(tanh)\nDECLARE_UNARY_STRUCT(exp)\nDECLARE_UNARY_STRUCT(expm1)\nDECLARE_UNARY_STRUCT(log)\nDECLARE_UNARY_STRUCT(ceil)\nDECLARE_UNARY_STRUCT(floor)\nDECLARE_UNARY_STRUCT(round)\nDECLARE_UNARY_STRUCT(log1p)\nDECLARE_UNARY_STRUCT(sign)\nDECLARE_UNARY_STRUCT(isnan)\nDECLARE_UNARY_STRUCT(isfinite)\nDECLARE_UNARY_STRUCT(isinf)\n\ntemplate <typename DataType, int DataLayout, typename Assignement>\nvoid test_unary_builtins_for_assignement(const Eigen::SyclDevice& sycl_device,\n                                         const array<int64_t, 3>& tensor_range) {\n#define RUN_UNARY_TEST(FUNC) \\\n  test_unary_builtins_for_scalar<DataType, DataLayout, Assignement, \\\n                                 op_##FUNC>(sycl_device, tensor_range)\n  RUN_UNARY_TEST(abs);\n  RUN_UNARY_TEST(sqrt);\n  RUN_UNARY_TEST(rsqrt);\n  RUN_UNARY_TEST(square);\n  RUN_UNARY_TEST(cube);\n  RUN_UNARY_TEST(inverse);\n  RUN_UNARY_TEST(tanh);\n  RUN_UNARY_TEST(exp);\n  RUN_UNARY_TEST(expm1);\n  RUN_UNARY_TEST(log);\n  RUN_UNARY_TEST(ceil);\n  RUN_UNARY_TEST(floor);\n  RUN_UNARY_TEST(round);\n  RUN_UNARY_TEST(log1p);\n  RUN_UNARY_TEST(sign);\n}\n\ntemplate <typename DataType, int DataLayout, typename Operator>\nvoid test_unary_builtins_return_bool(const Eigen::SyclDevice& sycl_device,\n                                     const array<int64_t, 3>& tensor_range) {\n  /* out = op(in) */\n  Operator op;\n  Tensor<DataType, 3, DataLayout, int64_t> in(tensor_range);\n  Tensor<bool, 3, DataLayout, int64_t> out(tensor_range);\n  in = in.random() + DataType(0.01);\n  DataType *gpu_data = static_cast<DataType *>(\n      sycl_device.allocate(in.size() * sizeof(DataType)));\n  bool *gpu_data_out =\n      static_cast<bool *>(sycl_device.allocate(out.size() * sizeof(bool)));\n  TensorMap<Tensor<DataType, 3, DataLayout, int64_t>> gpu(gpu_data, tensor_range);\n  TensorMap<Tensor<bool, 3, DataLayout, int64_t>> gpu_out(gpu_data_out, tensor_range);\n  sycl_device.memcpyHostToDevice(gpu_data, in.data(),\n                                 (in.size()) * sizeof(DataType));\n  gpu_out.device(sycl_device) = op(gpu);\n  sycl_device.memcpyDeviceToHost(out.data(), gpu_data_out,\n                                 (out.size()) * sizeof(bool));\n  for (int64_t i = 0; i < out.size(); ++i) {\n    VERIFY_IS_EQUAL(out(i), op(in(i)));\n  }\n  sycl_device.deallocate(gpu_data);\n  sycl_device.deallocate(gpu_data_out);\n}\n\ntemplate <typename DataType, int DataLayout>\nvoid test_unary_builtins(const Eigen::SyclDevice& sycl_device,\n                         const array<int64_t, 3>& tensor_range) {\n  test_unary_builtins_for_assignement<DataType, DataLayout,\n                                      PlusEqualAssignement>(sycl_device, tensor_range);\n  test_unary_builtins_for_assignement<DataType, DataLayout,\n                                      EqualAssignement>(sycl_device, tensor_range);\n  test_unary_builtins_return_bool<DataType, DataLayout,\n                                  op_isnan>(sycl_device, tensor_range);\n  test_unary_builtins_return_bool<DataType, DataLayout,\n                                  op_isfinite>(sycl_device, tensor_range);\n  test_unary_builtins_return_bool<DataType, DataLayout,\n                                  op_isinf>(sycl_device, tensor_range);\n}\n\ntemplate <typename DataType>\nstatic void test_builtin_unary_sycl(const Eigen::SyclDevice &sycl_device) {\n  int64_t sizeDim1 = 10;\n  int64_t sizeDim2 = 10;\n  int64_t sizeDim3 = 10;\n  array<int64_t, 3> tensor_range = {{sizeDim1, sizeDim2, sizeDim3}};\n\n  test_unary_builtins<DataType, RowMajor>(sycl_device, tensor_range);\n  test_unary_builtins<DataType, ColMajor>(sycl_device, tensor_range);\n}\n\ntemplate <typename DataType, int DataLayout, typename Operator>\nvoid test_binary_builtins_func(const Eigen::SyclDevice& sycl_device,\n                               const array<int64_t, 3>& tensor_range) {\n  /* out = op(in_1, in_2) */\n  Operator op;\n  Tensor<DataType, 3, DataLayout, int64_t> in_1(tensor_range);\n  Tensor<DataType, 3, DataLayout, int64_t> in_2(tensor_range);\n  Tensor<DataType, 3, DataLayout, int64_t> out(tensor_range);\n  in_1 = in_1.random() + DataType(0.01);\n  in_2 = in_2.random() + DataType(0.01);\n  Tensor<DataType, 3, DataLayout, int64_t> reference(out);\n  DataType *gpu_data_1 = static_cast<DataType *>(\n      sycl_device.allocate(in_1.size() * sizeof(DataType)));\n  DataType *gpu_data_2 = static_cast<DataType *>(\n      sycl_device.allocate(in_2.size() * sizeof(DataType)));\n  DataType *gpu_data_out = static_cast<DataType *>(\n      sycl_device.allocate(out.size() * sizeof(DataType)));\n  TensorMap<Tensor<DataType, 3, DataLayout, int64_t>> gpu_1(gpu_data_1, tensor_range);\n  TensorMap<Tensor<DataType, 3, DataLayout, int64_t>> gpu_2(gpu_data_2, tensor_range);\n  TensorMap<Tensor<DataType, 3, DataLayout, int64_t>> gpu_out(gpu_data_out, tensor_range);\n  sycl_device.memcpyHostToDevice(gpu_data_1, in_1.data(),\n                                 (in_1.size()) * sizeof(DataType));\n  sycl_device.memcpyHostToDevice(gpu_data_2, in_2.data(),\n                                 (in_2.size()) * sizeof(DataType));\n  gpu_out.device(sycl_device) = op(gpu_1, gpu_2);\n  sycl_device.memcpyDeviceToHost(out.data(), gpu_data_out,\n                                 (out.size()) * sizeof(DataType));\n  for (int64_t i = 0; i < out.size(); ++i) {\n    VERIFY_IS_APPROX(out(i), op(in_1(i), in_2(i)));\n  }\n  sycl_device.deallocate(gpu_data_1);\n  sycl_device.deallocate(gpu_data_2);\n  sycl_device.deallocate(gpu_data_out);\n}\n\ntemplate <typename DataType, int DataLayout, typename Operator>\nvoid test_binary_builtins_fixed_arg2(const Eigen::SyclDevice& sycl_device,\n                                     const array<int64_t, 3>& tensor_range) {\n  /* out = op(in_1, 2) */\n  Operator op;\n  const DataType arg2(2);\n  Tensor<DataType, 3, DataLayout, int64_t> in_1(tensor_range);\n  Tensor<DataType, 3, DataLayout, int64_t> out(tensor_range);\n  in_1 = in_1.random();\n  Tensor<DataType, 3, DataLayout, int64_t> reference(out);\n  DataType *gpu_data_1 = static_cast<DataType *>(\n      sycl_device.allocate(in_1.size() * sizeof(DataType)));\n  DataType *gpu_data_out = static_cast<DataType *>(\n      sycl_device.allocate(out.size() * sizeof(DataType)));\n  TensorMap<Tensor<DataType, 3, DataLayout, int64_t>> gpu_1(gpu_data_1, tensor_range);\n  TensorMap<Tensor<DataType, 3, DataLayout, int64_t>> gpu_out(gpu_data_out, tensor_range);\n  sycl_device.memcpyHostToDevice(gpu_data_1, in_1.data(),\n                                 (in_1.size()) * sizeof(DataType));\n  gpu_out.device(sycl_device) = op(gpu_1, arg2);\n  sycl_device.memcpyDeviceToHost(out.data(), gpu_data_out,\n                                 (out.size()) * sizeof(DataType));\n  for (int64_t i = 0; i < out.size(); ++i) {\n    VERIFY_IS_APPROX(out(i), op(in_1(i), arg2));\n  }\n  sycl_device.deallocate(gpu_data_1);\n  sycl_device.deallocate(gpu_data_out);\n}\n\n#define DECLARE_BINARY_STRUCT(FUNC)                                                          \\\n  struct op_##FUNC {                                                                         \\\n    template <typename T1, typename T2>                                                      \\\n    auto operator()(const T1& x, const T2& y) -> decltype(cl::sycl::FUNC(x, y)) {            \\\n      return cl::sycl::FUNC(x, y);                                                           \\\n    }                                                                                        \\\n    template <typename T1, typename T2>                                                      \\\n    auto operator()(const TensorMap<T1>& x, const TensorMap<T2>& y) -> decltype(x.FUNC(y)) { \\\n      return x.FUNC(y);                                                                      \\\n    }                                                                                        \\\n  };\n\nDECLARE_BINARY_STRUCT(cwiseMax)\nDECLARE_BINARY_STRUCT(cwiseMin)\n\n#define DECLARE_BINARY_STRUCT_OP(NAME, OPERATOR)                          \\\n  struct op_##NAME {                                                      \\\n    template <typename T1, typename T2>                                   \\\n    auto operator()(const T1& x, const T2& y) -> decltype(x OPERATOR y) { \\\n      return x OPERATOR y;                                                \\\n    }                                                                     \\\n  };\n\nDECLARE_BINARY_STRUCT_OP(plus, +)\nDECLARE_BINARY_STRUCT_OP(minus, -)\nDECLARE_BINARY_STRUCT_OP(times, *)\nDECLARE_BINARY_STRUCT_OP(divide, /)\nDECLARE_BINARY_STRUCT_OP(modulo, %)\n\ntemplate <typename DataType, int DataLayout>\nvoid test_binary_builtins(const Eigen::SyclDevice& sycl_device,\n                          const array<int64_t, 3>& tensor_range) {\n  test_binary_builtins_func<DataType, DataLayout,\n                            op_cwiseMax>(sycl_device, tensor_range);\n  test_binary_builtins_func<DataType, DataLayout,\n                            op_cwiseMin>(sycl_device, tensor_range);\n  test_binary_builtins_func<DataType, DataLayout,\n                            op_plus>(sycl_device, tensor_range);\n  test_binary_builtins_func<DataType, DataLayout,\n                            op_minus>(sycl_device, tensor_range);\n  test_binary_builtins_func<DataType, DataLayout,\n                            op_times>(sycl_device, tensor_range);\n  test_binary_builtins_func<DataType, DataLayout,\n                            op_divide>(sycl_device, tensor_range);\n}\n\ntemplate <typename DataType>\nstatic void test_floating_builtin_binary_sycl(const Eigen::SyclDevice &sycl_device) {\n  int64_t sizeDim1 = 10;\n  int64_t sizeDim2 = 10;\n  int64_t sizeDim3 = 10;\n  array<int64_t, 3> tensor_range = {{sizeDim1, sizeDim2, sizeDim3}};\n  test_binary_builtins<DataType, RowMajor>(sycl_device, tensor_range);\n  test_binary_builtins<DataType, ColMajor>(sycl_device, tensor_range);\n}\n\ntemplate <typename DataType>\nstatic void test_integer_builtin_binary_sycl(const Eigen::SyclDevice &sycl_device) {\n  int64_t sizeDim1 = 10;\n  int64_t sizeDim2 = 10;\n  int64_t sizeDim3 = 10;\n  array<int64_t, 3> tensor_range = {{sizeDim1, sizeDim2, sizeDim3}};\n  test_binary_builtins_fixed_arg2<DataType, RowMajor,\n                                  op_modulo>(sycl_device, tensor_range);\n  test_binary_builtins_fixed_arg2<DataType, ColMajor,\n                                  op_modulo>(sycl_device, tensor_range);\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_builtins_sycl) {\n  for (const auto& device :Eigen::get_sycl_supported_devices()) {\n    QueueInterface queueInterface(device);\n    Eigen::SyclDevice sycl_device(&queueInterface);\n    CALL_SUBTEST_1(test_builtin_unary_sycl<float>(sycl_device));\n    CALL_SUBTEST_2(test_floating_builtin_binary_sycl<float>(sycl_device));\n    CALL_SUBTEST_3(test_integer_builtin_binary_sycl<int>(sycl_device));\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_cast_float16_gpu.cu",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_TEST_NO_LONGDOUBLE\n#define EIGEN_TEST_NO_COMPLEX\n\n#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int\n#define EIGEN_USE_GPU\n\n#include \"main.h\"\n#include <unsupported/Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\n\nvoid test_gpu_conversion() {\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n  int num_elem = 101;\n\n  Tensor<float, 1> floats(num_elem);\n  floats.setRandom();\n\n  float* d_float = (float*)gpu_device.allocate(num_elem * sizeof(float));\n  Eigen::half* d_half = (Eigen::half*)gpu_device.allocate(num_elem * sizeof(Eigen::half));\n  float* d_conv = (float*)gpu_device.allocate(num_elem * sizeof(float));\n\n  Eigen::TensorMap<Eigen::Tensor<float, 1>, Eigen::Aligned> gpu_float(\n      d_float, num_elem);\n  Eigen::TensorMap<Eigen::Tensor<Eigen::half, 1>, Eigen::Aligned> gpu_half(\n      d_half, num_elem);\n  Eigen::TensorMap<Eigen::Tensor<float, 1>, Eigen::Aligned> gpu_conv(\n      d_conv, num_elem);\n\n  gpu_device.memcpyHostToDevice(d_float, floats.data(), num_elem*sizeof(float));\n\n  gpu_half.device(gpu_device) = gpu_float.cast<Eigen::half>();\n  gpu_conv.device(gpu_device) = gpu_half.cast<float>();\n\n  Tensor<float, 1> initial(num_elem);\n  Tensor<float, 1> final(num_elem);\n  gpu_device.memcpyDeviceToHost(initial.data(), d_float, num_elem*sizeof(float));\n  gpu_device.memcpyDeviceToHost(final.data(), d_conv, num_elem*sizeof(float));\n  gpu_device.synchronize();\n\n  for (int i = 0; i < num_elem; ++i) {\n    VERIFY_IS_APPROX(initial(i), final(i));\n  }\n\n  gpu_device.deallocate(d_float);\n  gpu_device.deallocate(d_half);\n  gpu_device.deallocate(d_conv);\n}\n\n\nvoid test_fallback_conversion() {\n  int num_elem = 101;\n  Tensor<float, 1> floats(num_elem);\n  floats.setRandom();\n\n  Eigen::Tensor<Eigen::half, 1> halfs = floats.cast<Eigen::half>();\n  Eigen::Tensor<float, 1> conv = halfs.cast<float>();\n\n  for (int i = 0; i < num_elem; ++i) {\n    VERIFY_IS_APPROX(floats(i), conv(i));\n  }\n}\n\n\nEIGEN_DECLARE_TEST(cxx11_tensor_cast_float16_gpu)\n{\n  CALL_SUBTEST(test_gpu_conversion());\n  CALL_SUBTEST(test_fallback_conversion());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_casts.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\nusing Eigen::array;\n\nstatic void test_simple_cast()\n{\n  Tensor<float, 2> ftensor(20,30);\n  ftensor = ftensor.random() * 100.f;\n  Tensor<char, 2> chartensor(20,30);\n  chartensor.setRandom();\n  Tensor<std::complex<float>, 2> cplextensor(20,30);\n  cplextensor.setRandom();\n\n  chartensor = ftensor.cast<char>();\n  cplextensor = ftensor.cast<std::complex<float> >();\n\n  for (int i = 0; i < 20; ++i) {\n    for (int j = 0; j < 30; ++j) {\n      VERIFY_IS_EQUAL(chartensor(i,j), static_cast<char>(ftensor(i,j)));\n      VERIFY_IS_EQUAL(cplextensor(i,j), static_cast<std::complex<float> >(ftensor(i,j)));\n    }\n  }\n}\n\n\nstatic void test_vectorized_cast()\n{\n  Tensor<int, 2> itensor(20,30);\n  itensor = itensor.random() / 1000;\n  Tensor<float, 2> ftensor(20,30);\n  ftensor.setRandom();\n  Tensor<double, 2> dtensor(20,30);\n  dtensor.setRandom();\n\n  ftensor = itensor.cast<float>();\n  dtensor = itensor.cast<double>();\n\n  for (int i = 0; i < 20; ++i) {\n    for (int j = 0; j < 30; ++j) {\n      VERIFY_IS_EQUAL(itensor(i,j), static_cast<int>(ftensor(i,j)));\n      VERIFY_IS_EQUAL(dtensor(i,j), static_cast<double>(ftensor(i,j)));\n    }\n  }\n}\n\n\nstatic void test_float_to_int_cast()\n{\n  Tensor<float, 2> ftensor(20,30);\n  ftensor = ftensor.random() * 1000.0f;\n  Tensor<double, 2> dtensor(20,30);\n  dtensor = dtensor.random() * 1000.0;\n\n  Tensor<int, 2> i1tensor = ftensor.cast<int>();\n  Tensor<int, 2> i2tensor = dtensor.cast<int>();\n\n  for (int i = 0; i < 20; ++i) {\n    for (int j = 0; j < 30; ++j) {\n      VERIFY_IS_EQUAL(i1tensor(i,j), static_cast<int>(ftensor(i,j)));\n      VERIFY_IS_EQUAL(i2tensor(i,j), static_cast<int>(dtensor(i,j)));\n    }\n  }\n}\n\n\nstatic void test_big_to_small_type_cast()\n{\n  Tensor<double, 2> dtensor(20, 30);\n  dtensor.setRandom();\n  Tensor<float, 2> ftensor(20, 30);\n  ftensor = dtensor.cast<float>();\n\n  for (int i = 0; i < 20; ++i) {\n    for (int j = 0; j < 30; ++j) {\n      VERIFY_IS_APPROX(dtensor(i,j), static_cast<double>(ftensor(i,j)));\n    }\n  }\n}\n\n\nstatic void test_small_to_big_type_cast()\n{\n  Tensor<float, 2> ftensor(20, 30);\n  ftensor.setRandom();\n  Tensor<double, 2> dtensor(20, 30);\n  dtensor = ftensor.cast<double>();\n\n  for (int i = 0; i < 20; ++i) {\n    for (int j = 0; j < 30; ++j) {\n      VERIFY_IS_APPROX(dtensor(i,j), static_cast<double>(ftensor(i,j)));\n    }\n  }\n}\n\n\nEIGEN_DECLARE_TEST(cxx11_tensor_casts)\n{\n   CALL_SUBTEST(test_simple_cast());\n   CALL_SUBTEST(test_vectorized_cast());\n   CALL_SUBTEST(test_float_to_int_cast());\n   CALL_SUBTEST(test_big_to_small_type_cast());\n   CALL_SUBTEST(test_small_to_big_type_cast());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_chipping.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\n\ntemplate<int DataLayout>\nstatic void test_simple_chip()\n{\n  Tensor<float, 5, DataLayout> tensor(2,3,5,7,11);\n  tensor.setRandom();\n\n  Tensor<float, 4, DataLayout> chip1;\n  chip1 = tensor.template chip<0>(1);\n\n  VERIFY_IS_EQUAL(chip1.dimension(0), 3);\n  VERIFY_IS_EQUAL(chip1.dimension(1), 5);\n  VERIFY_IS_EQUAL(chip1.dimension(2), 7);\n  VERIFY_IS_EQUAL(chip1.dimension(3), 11);\n\n  for (int i = 0; i < 3; ++i) {\n    for (int j = 0; j < 5; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        for (int l = 0; l < 11; ++l) {\n          VERIFY_IS_EQUAL(chip1(i,j,k,l), tensor(1,i,j,k,l));\n        }\n      }\n    }\n  }\n\n  Tensor<float, 4, DataLayout> chip2 = tensor.template chip<1>(1);\n  VERIFY_IS_EQUAL(chip2.dimension(0), 2);\n  VERIFY_IS_EQUAL(chip2.dimension(1), 5);\n  VERIFY_IS_EQUAL(chip2.dimension(2), 7);\n  VERIFY_IS_EQUAL(chip2.dimension(3), 11);\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 5; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        for (int l = 0; l < 11; ++l) {\n          VERIFY_IS_EQUAL(chip2(i,j,k,l), tensor(i,1,j,k,l));\n        }\n      }\n    }\n  }\n\n  Tensor<float, 4, DataLayout> chip3 = tensor.template chip<2>(2);\n  VERIFY_IS_EQUAL(chip3.dimension(0), 2);\n  VERIFY_IS_EQUAL(chip3.dimension(1), 3);\n  VERIFY_IS_EQUAL(chip3.dimension(2), 7);\n  VERIFY_IS_EQUAL(chip3.dimension(3), 11);\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        for (int l = 0; l < 11; ++l) {\n          VERIFY_IS_EQUAL(chip3(i,j,k,l), tensor(i,j,2,k,l));\n        }\n      }\n    }\n  }\n\n  Tensor<float, 4, DataLayout> chip4(tensor.template chip<3>(5));\n  VERIFY_IS_EQUAL(chip4.dimension(0), 2);\n  VERIFY_IS_EQUAL(chip4.dimension(1), 3);\n  VERIFY_IS_EQUAL(chip4.dimension(2), 5);\n  VERIFY_IS_EQUAL(chip4.dimension(3), 11);\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 5; ++k) {\n        for (int l = 0; l < 11; ++l) {\n          VERIFY_IS_EQUAL(chip4(i,j,k,l), tensor(i,j,k,5,l));\n        }\n      }\n    }\n  }\n\n  Tensor<float, 4, DataLayout> chip5(tensor.template chip<4>(7));\n  VERIFY_IS_EQUAL(chip5.dimension(0), 2);\n  VERIFY_IS_EQUAL(chip5.dimension(1), 3);\n  VERIFY_IS_EQUAL(chip5.dimension(2), 5);\n  VERIFY_IS_EQUAL(chip5.dimension(3), 7);\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 5; ++k) {\n        for (int l = 0; l < 7; ++l) {\n          VERIFY_IS_EQUAL(chip5(i,j,k,l), tensor(i,j,k,l,7));\n        }\n      }\n    }\n  }\n}\n\ntemplate<int DataLayout>\nstatic void test_dynamic_chip()\n{\n  Tensor<float, 5, DataLayout> tensor(2,3,5,7,11);\n  tensor.setRandom();\n\n  Tensor<float, 4, DataLayout> chip1;\n  chip1 = tensor.chip(1, 0);\n  VERIFY_IS_EQUAL(chip1.dimension(0), 3);\n  VERIFY_IS_EQUAL(chip1.dimension(1), 5);\n  VERIFY_IS_EQUAL(chip1.dimension(2), 7);\n  VERIFY_IS_EQUAL(chip1.dimension(3), 11);\n  for (int i = 0; i < 3; ++i) {\n    for (int j = 0; j < 5; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        for (int l = 0; l < 11; ++l) {\n          VERIFY_IS_EQUAL(chip1(i,j,k,l), tensor(1,i,j,k,l));\n        }\n      }\n    }\n  }\n\n  Tensor<float, 4, DataLayout> chip2 = tensor.chip(1, 1);\n  VERIFY_IS_EQUAL(chip2.dimension(0), 2);\n  VERIFY_IS_EQUAL(chip2.dimension(1), 5);\n  VERIFY_IS_EQUAL(chip2.dimension(2), 7);\n  VERIFY_IS_EQUAL(chip2.dimension(3), 11);\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 5; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        for (int l = 0; l < 11; ++l) {\n          VERIFY_IS_EQUAL(chip2(i,j,k,l), tensor(i,1,j,k,l));\n        }\n      }\n    }\n  }\n\n  Tensor<float, 4, DataLayout> chip3 = tensor.chip(2, 2);\n  VERIFY_IS_EQUAL(chip3.dimension(0), 2);\n  VERIFY_IS_EQUAL(chip3.dimension(1), 3);\n  VERIFY_IS_EQUAL(chip3.dimension(2), 7);\n  VERIFY_IS_EQUAL(chip3.dimension(3), 11);\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        for (int l = 0; l < 11; ++l) {\n          VERIFY_IS_EQUAL(chip3(i,j,k,l), tensor(i,j,2,k,l));\n        }\n      }\n    }\n  }\n\n  Tensor<float, 4, DataLayout> chip4(tensor.chip(5, 3));\n  VERIFY_IS_EQUAL(chip4.dimension(0), 2);\n  VERIFY_IS_EQUAL(chip4.dimension(1), 3);\n  VERIFY_IS_EQUAL(chip4.dimension(2), 5);\n  VERIFY_IS_EQUAL(chip4.dimension(3), 11);\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 5; ++k) {\n        for (int l = 0; l < 11; ++l) {\n          VERIFY_IS_EQUAL(chip4(i,j,k,l), tensor(i,j,k,5,l));\n        }\n      }\n    }\n  }\n\n  Tensor<float, 4, DataLayout> chip5(tensor.chip(7, 4));\n  VERIFY_IS_EQUAL(chip5.dimension(0), 2);\n  VERIFY_IS_EQUAL(chip5.dimension(1), 3);\n  VERIFY_IS_EQUAL(chip5.dimension(2), 5);\n  VERIFY_IS_EQUAL(chip5.dimension(3), 7);\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 5; ++k) {\n        for (int l = 0; l < 7; ++l) {\n          VERIFY_IS_EQUAL(chip5(i,j,k,l), tensor(i,j,k,l,7));\n        }\n      }\n    }\n  }\n}\n\ntemplate<int DataLayout>\nstatic void test_chip_in_expr() {\n  Tensor<float, 5, DataLayout> input1(2,3,5,7,11);\n  input1.setRandom();\n  Tensor<float, 4, DataLayout> input2(3,5,7,11);\n  input2.setRandom();\n\n  Tensor<float, 4, DataLayout> result = input1.template chip<0>(0) + input2;\n  for (int i = 0; i < 3; ++i) {\n    for (int j = 0; j < 5; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        for (int l = 0; l < 11; ++l) {\n          float expected = input1(0,i,j,k,l) + input2(i,j,k,l);\n          VERIFY_IS_EQUAL(result(i,j,k,l), expected);\n        }\n      }\n    }\n  }\n\n  Tensor<float, 3, DataLayout> input3(3,7,11);\n  input3.setRandom();\n  Tensor<float, 3, DataLayout> result2 = input1.template chip<0>(0).template chip<1>(2) + input3;\n  for (int i = 0; i < 3; ++i) {\n    for (int j = 0; j < 7; ++j) {\n      for (int k = 0; k < 11; ++k) {\n        float expected = input1(0,i,2,j,k) + input3(i,j,k);\n        VERIFY_IS_EQUAL(result2(i,j,k), expected);\n      }\n    }\n  }\n}\n\ntemplate<int DataLayout>\nstatic void test_chip_as_lvalue()\n{\n  Tensor<float, 5, DataLayout> input1(2,3,5,7,11);\n  input1.setRandom();\n\n  Tensor<float, 4, DataLayout> input2(3,5,7,11);\n  input2.setRandom();\n  Tensor<float, 5, DataLayout> tensor = input1;\n  tensor.template chip<0>(1) = input2;\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 5; ++k) {\n        for (int l = 0; l < 7; ++l) {\n          for (int m = 0; m < 11; ++m) {\n            if (i != 1) {\n              VERIFY_IS_EQUAL(tensor(i,j,k,l,m), input1(i,j,k,l,m));\n            } else {\n              VERIFY_IS_EQUAL(tensor(i,j,k,l,m), input2(j,k,l,m));\n            }\n          }\n        }\n      }\n    }\n  }\n\n  Tensor<float, 4, DataLayout> input3(2,5,7,11);\n  input3.setRandom();\n  tensor = input1;\n  tensor.template chip<1>(1) = input3;\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 5; ++k) {\n        for (int l = 0; l < 7; ++l) {\n          for (int m = 0; m < 11; ++m) {\n            if (j != 1) {\n              VERIFY_IS_EQUAL(tensor(i,j,k,l,m), input1(i,j,k,l,m));\n            } else {\n              VERIFY_IS_EQUAL(tensor(i,j,k,l,m), input3(i,k,l,m));\n            }\n          }\n        }\n      }\n    }\n  }\n\n  Tensor<float, 4, DataLayout> input4(2,3,7,11);\n  input4.setRandom();\n  tensor = input1;\n  tensor.template chip<2>(3) = input4;\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 5; ++k) {\n        for (int l = 0; l < 7; ++l) {\n          for (int m = 0; m < 11; ++m) {\n            if (k != 3) {\n              VERIFY_IS_EQUAL(tensor(i,j,k,l,m), input1(i,j,k,l,m));\n            } else {\n              VERIFY_IS_EQUAL(tensor(i,j,k,l,m), input4(i,j,l,m));\n            }\n          }\n        }\n      }\n    }\n  }\n\n  Tensor<float, 4, DataLayout> input5(2,3,5,11);\n  input5.setRandom();\n  tensor = input1;\n  tensor.template chip<3>(4) = input5;\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 5; ++k) {\n        for (int l = 0; l < 7; ++l) {\n          for (int m = 0; m < 11; ++m) {\n            if (l != 4) {\n              VERIFY_IS_EQUAL(tensor(i,j,k,l,m), input1(i,j,k,l,m));\n            } else {\n              VERIFY_IS_EQUAL(tensor(i,j,k,l,m), input5(i,j,k,m));\n            }\n          }\n        }\n      }\n    }\n  }\n\n  Tensor<float, 4, DataLayout> input6(2,3,5,7);\n  input6.setRandom();\n  tensor = input1;\n  tensor.template chip<4>(5) = input6;\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 5; ++k) {\n        for (int l = 0; l < 7; ++l) {\n          for (int m = 0; m < 11; ++m) {\n            if (m != 5) {\n              VERIFY_IS_EQUAL(tensor(i,j,k,l,m), input1(i,j,k,l,m));\n            } else {\n              VERIFY_IS_EQUAL(tensor(i,j,k,l,m), input6(i,j,k,l));\n            }\n          }\n        }\n      }\n    }\n  }\n\n  Tensor<float, 5, DataLayout> input7(2,3,5,7,11);\n  input7.setRandom();\n  tensor = input1;\n  tensor.chip(0, 0) = input7.chip(0, 0);\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 5; ++k) {\n        for (int l = 0; l < 7; ++l) {\n          for (int m = 0; m < 11; ++m) {\n            if (i != 0) {\n              VERIFY_IS_EQUAL(tensor(i,j,k,l,m), input1(i,j,k,l,m));\n            } else {\n              VERIFY_IS_EQUAL(tensor(i,j,k,l,m), input7(i,j,k,l,m));\n            }\n          }\n        }\n      }\n    }\n  }\n}\n\nstatic void test_chip_raw_data_col_major()\n{\n  Tensor<float, 5, ColMajor> tensor(2,3,5,7,11);\n  tensor.setRandom();\n\n  typedef TensorEvaluator<decltype(tensor.chip<4>(3)), DefaultDevice> Evaluator4;\n  auto chip = Evaluator4(tensor.chip<4>(3), DefaultDevice());\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 5; ++k) {\n        for (int l = 0; l < 7; ++l) {\n          int chip_index = i + 2 * (j + 3 * (k + 5 * l));\n          VERIFY_IS_EQUAL(chip.data()[chip_index], tensor(i,j,k,l,3));\n        }\n      }\n    }\n  }\n\n  typedef TensorEvaluator<decltype(tensor.chip<0>(0)), DefaultDevice> Evaluator0;\n  auto chip0 = Evaluator0(tensor.chip<0>(0), DefaultDevice());\n  VERIFY_IS_EQUAL(chip0.data(), static_cast<float*>(0));\n\n  typedef TensorEvaluator<decltype(tensor.chip<1>(0)), DefaultDevice> Evaluator1;\n  auto chip1 = Evaluator1(tensor.chip<1>(0), DefaultDevice());\n  VERIFY_IS_EQUAL(chip1.data(), static_cast<float*>(0));\n\n  typedef TensorEvaluator<decltype(tensor.chip<2>(0)), DefaultDevice> Evaluator2;\n  auto chip2 = Evaluator2(tensor.chip<2>(0), DefaultDevice());\n  VERIFY_IS_EQUAL(chip2.data(), static_cast<float*>(0));\n\n  typedef TensorEvaluator<decltype(tensor.chip<3>(0)), DefaultDevice> Evaluator3;\n  auto chip3 = Evaluator3(tensor.chip<3>(0), DefaultDevice());\n  VERIFY_IS_EQUAL(chip3.data(), static_cast<float*>(0));\n}\n\nstatic void test_chip_raw_data_row_major()\n{\n  Tensor<float, 5, RowMajor> tensor(11,7,5,3,2);\n  tensor.setRandom();\n\n  typedef TensorEvaluator<decltype(tensor.chip<0>(3)), DefaultDevice> Evaluator0;\n  auto chip = Evaluator0(tensor.chip<0>(3), DefaultDevice());\n  for (int i = 0; i < 7; ++i) {\n    for (int j = 0; j < 5; ++j) {\n      for (int k = 0; k < 3; ++k) {\n        for (int l = 0; l < 2; ++l) {\n          int chip_index = l + 2 * (k + 3 * (j + 5 * i));\n          VERIFY_IS_EQUAL(chip.data()[chip_index], tensor(3,i,j,k,l));\n        }\n      }\n    }\n  }\n\n  typedef TensorEvaluator<decltype(tensor.chip<1>(0)), DefaultDevice> Evaluator1;\n  auto chip1 = Evaluator1(tensor.chip<1>(0), DefaultDevice());\n  VERIFY_IS_EQUAL(chip1.data(), static_cast<float*>(0));\n\n  typedef TensorEvaluator<decltype(tensor.chip<2>(0)), DefaultDevice> Evaluator2;\n  auto chip2 = Evaluator2(tensor.chip<2>(0), DefaultDevice());\n  VERIFY_IS_EQUAL(chip2.data(), static_cast<float*>(0));\n\n  typedef TensorEvaluator<decltype(tensor.chip<3>(0)), DefaultDevice> Evaluator3;\n  auto chip3 = Evaluator3(tensor.chip<3>(0), DefaultDevice());\n  VERIFY_IS_EQUAL(chip3.data(), static_cast<float*>(0));\n\n  typedef TensorEvaluator<decltype(tensor.chip<4>(0)), DefaultDevice> Evaluator4;\n  auto chip4 = Evaluator4(tensor.chip<4>(0), DefaultDevice());\n  VERIFY_IS_EQUAL(chip4.data(), static_cast<float*>(0));\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_chipping)\n{\n  CALL_SUBTEST(test_simple_chip<ColMajor>());\n  CALL_SUBTEST(test_simple_chip<RowMajor>());\n  CALL_SUBTEST(test_dynamic_chip<ColMajor>());\n  CALL_SUBTEST(test_dynamic_chip<RowMajor>());\n  CALL_SUBTEST(test_chip_in_expr<ColMajor>());\n  CALL_SUBTEST(test_chip_in_expr<RowMajor>());\n  CALL_SUBTEST(test_chip_as_lvalue<ColMajor>());\n  CALL_SUBTEST(test_chip_as_lvalue<RowMajor>());\n  CALL_SUBTEST(test_chip_raw_data_col_major());\n  CALL_SUBTEST(test_chip_raw_data_row_major());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_chipping_sycl.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016\n// Mehdi Goli    Codeplay Software Ltd.\n// Ralph Potter  Codeplay Software Ltd.\n// Luke Iwanski  Codeplay Software Ltd.\n// Contact: <eigen@codeplay.com>\n// Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n\n#define EIGEN_TEST_NO_LONGDOUBLE\n#define EIGEN_TEST_NO_COMPLEX\n\n#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int64_t\n#define EIGEN_USE_SYCL\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_static_chip_sycl(const Eigen::SyclDevice& sycl_device)\n{\n  IndexType sizeDim1 = 2;\n  IndexType sizeDim2 = 3;\n  IndexType sizeDim3 = 5;\n  IndexType sizeDim4 = 7;\n  IndexType sizeDim5 = 11;\n\n  array<IndexType, 5> tensorRange = {{sizeDim1, sizeDim2, sizeDim3, sizeDim4, sizeDim5}};\n  array<IndexType, 4> chip1TensorRange = {{sizeDim2, sizeDim3, sizeDim4, sizeDim5}};\n\n  Tensor<DataType, 5, DataLayout,IndexType> tensor(tensorRange);\n  Tensor<DataType, 4, DataLayout,IndexType> chip1(chip1TensorRange);\n\n  tensor.setRandom();\n\n  const size_t tensorBuffSize =tensor.size()*sizeof(DataType);\n  const size_t chip1TensorBuffSize =chip1.size()*sizeof(DataType);\n  DataType* gpu_data_tensor  = static_cast<DataType*>(sycl_device.allocate(tensorBuffSize));\n  DataType* gpu_data_chip1  = static_cast<DataType*>(sycl_device.allocate(chip1TensorBuffSize));\n\n  TensorMap<Tensor<DataType, 5, DataLayout,IndexType>> gpu_tensor(gpu_data_tensor, tensorRange);\n  TensorMap<Tensor<DataType, 4, DataLayout,IndexType>> gpu_chip1(gpu_data_chip1, chip1TensorRange);\n\n  sycl_device.memcpyHostToDevice(gpu_data_tensor, tensor.data(), tensorBuffSize);\n  gpu_chip1.device(sycl_device)=gpu_tensor.template chip<0l>(1l);\n  sycl_device.memcpyDeviceToHost(chip1.data(), gpu_data_chip1, chip1TensorBuffSize);\n\n  VERIFY_IS_EQUAL(chip1.dimension(0), sizeDim2);\n  VERIFY_IS_EQUAL(chip1.dimension(1), sizeDim3);\n  VERIFY_IS_EQUAL(chip1.dimension(2), sizeDim4);\n  VERIFY_IS_EQUAL(chip1.dimension(3), sizeDim5);\n\n  for (IndexType i = 0; i < sizeDim2; ++i) {\n    for (IndexType j = 0; j < sizeDim3; ++j) {\n      for (IndexType k = 0; k < sizeDim4; ++k) {\n        for (IndexType l = 0; l < sizeDim5; ++l) {\n          VERIFY_IS_EQUAL(chip1(i,j,k,l), tensor(1l,i,j,k,l));\n        }\n      }\n    }\n  }\n\n  array<IndexType, 4> chip2TensorRange = {{sizeDim1, sizeDim3, sizeDim4, sizeDim5}};\n  Tensor<DataType, 4, DataLayout,IndexType> chip2(chip2TensorRange);\n  const size_t chip2TensorBuffSize =chip2.size()*sizeof(DataType);\n  DataType* gpu_data_chip2  = static_cast<DataType*>(sycl_device.allocate(chip2TensorBuffSize));\n  TensorMap<Tensor<DataType, 4, DataLayout,IndexType>> gpu_chip2(gpu_data_chip2, chip2TensorRange);\n\n  gpu_chip2.device(sycl_device)=gpu_tensor.template chip<1l>(1l);\n  sycl_device.memcpyDeviceToHost(chip2.data(), gpu_data_chip2, chip2TensorBuffSize);\n\n  VERIFY_IS_EQUAL(chip2.dimension(0), sizeDim1);\n  VERIFY_IS_EQUAL(chip2.dimension(1), sizeDim3);\n  VERIFY_IS_EQUAL(chip2.dimension(2), sizeDim4);\n  VERIFY_IS_EQUAL(chip2.dimension(3), sizeDim5);\n\n  for (IndexType i = 0; i < sizeDim1; ++i) {\n    for (IndexType j = 0; j < sizeDim3; ++j) {\n      for (IndexType k = 0; k < sizeDim4; ++k) {\n        for (IndexType l = 0; l < sizeDim5; ++l) {\n          VERIFY_IS_EQUAL(chip2(i,j,k,l), tensor(i,1l,j,k,l));\n        }\n      }\n    }\n  }\n\n  array<IndexType, 4> chip3TensorRange = {{sizeDim1, sizeDim2, sizeDim4, sizeDim5}};\n  Tensor<DataType, 4, DataLayout,IndexType> chip3(chip3TensorRange);\n  const size_t chip3TensorBuffSize =chip3.size()*sizeof(DataType);\n  DataType* gpu_data_chip3  = static_cast<DataType*>(sycl_device.allocate(chip3TensorBuffSize));\n  TensorMap<Tensor<DataType, 4, DataLayout,IndexType>> gpu_chip3(gpu_data_chip3, chip3TensorRange);\n\n  gpu_chip3.device(sycl_device)=gpu_tensor.template chip<2l>(2l);\n  sycl_device.memcpyDeviceToHost(chip3.data(), gpu_data_chip3, chip3TensorBuffSize);\n\n  VERIFY_IS_EQUAL(chip3.dimension(0), sizeDim1);\n  VERIFY_IS_EQUAL(chip3.dimension(1), sizeDim2);\n  VERIFY_IS_EQUAL(chip3.dimension(2), sizeDim4);\n  VERIFY_IS_EQUAL(chip3.dimension(3), sizeDim5);\n\n  for (IndexType i = 0; i < sizeDim1; ++i) {\n    for (IndexType j = 0; j < sizeDim2; ++j) {\n      for (IndexType k = 0; k < sizeDim4; ++k) {\n        for (IndexType l = 0; l < sizeDim5; ++l) {\n          VERIFY_IS_EQUAL(chip3(i,j,k,l), tensor(i,j,2l,k,l));\n        }\n      }\n    }\n  }\n\n  array<IndexType, 4> chip4TensorRange = {{sizeDim1, sizeDim2, sizeDim3, sizeDim5}};\n  Tensor<DataType, 4, DataLayout,IndexType> chip4(chip4TensorRange);\n  const size_t chip4TensorBuffSize =chip4.size()*sizeof(DataType);\n  DataType* gpu_data_chip4  = static_cast<DataType*>(sycl_device.allocate(chip4TensorBuffSize));\n  TensorMap<Tensor<DataType, 4, DataLayout,IndexType>> gpu_chip4(gpu_data_chip4, chip4TensorRange);\n\n  gpu_chip4.device(sycl_device)=gpu_tensor.template chip<3l>(5l);\n  sycl_device.memcpyDeviceToHost(chip4.data(), gpu_data_chip4, chip4TensorBuffSize);\n\n  VERIFY_IS_EQUAL(chip4.dimension(0), sizeDim1);\n  VERIFY_IS_EQUAL(chip4.dimension(1), sizeDim2);\n  VERIFY_IS_EQUAL(chip4.dimension(2), sizeDim3);\n  VERIFY_IS_EQUAL(chip4.dimension(3), sizeDim5);\n\n  for (IndexType i = 0; i < sizeDim1; ++i) {\n    for (IndexType j = 0; j < sizeDim2; ++j) {\n      for (IndexType k = 0; k < sizeDim3; ++k) {\n        for (IndexType l = 0; l < sizeDim5; ++l) {\n          VERIFY_IS_EQUAL(chip4(i,j,k,l), tensor(i,j,k,5l,l));\n        }\n      }\n    }\n  }\n\n\n  array<IndexType, 4> chip5TensorRange = {{sizeDim1, sizeDim2, sizeDim3, sizeDim4}};\n  Tensor<DataType, 4, DataLayout,IndexType> chip5(chip5TensorRange);\n  const size_t chip5TensorBuffSize =chip5.size()*sizeof(DataType);\n  DataType* gpu_data_chip5  = static_cast<DataType*>(sycl_device.allocate(chip5TensorBuffSize));\n  TensorMap<Tensor<DataType, 4, DataLayout,IndexType>> gpu_chip5(gpu_data_chip5, chip5TensorRange);\n\n  gpu_chip5.device(sycl_device)=gpu_tensor.template chip<4l>(7l);\n  sycl_device.memcpyDeviceToHost(chip5.data(), gpu_data_chip5, chip5TensorBuffSize);\n\n  VERIFY_IS_EQUAL(chip5.dimension(0), sizeDim1);\n  VERIFY_IS_EQUAL(chip5.dimension(1), sizeDim2);\n  VERIFY_IS_EQUAL(chip5.dimension(2), sizeDim3);\n  VERIFY_IS_EQUAL(chip5.dimension(3), sizeDim4);\n\n  for (IndexType i = 0; i < sizeDim1; ++i) {\n    for (IndexType j = 0; j < sizeDim2; ++j) {\n      for (IndexType k = 0; k < sizeDim3; ++k) {\n        for (IndexType l = 0; l < sizeDim4; ++l) {\n          VERIFY_IS_EQUAL(chip5(i,j,k,l), tensor(i,j,k,l,7l));\n        }\n      }\n    }\n  }\n\n  sycl_device.deallocate(gpu_data_tensor);\n  sycl_device.deallocate(gpu_data_chip1);\n  sycl_device.deallocate(gpu_data_chip2);\n  sycl_device.deallocate(gpu_data_chip3);\n  sycl_device.deallocate(gpu_data_chip4);\n  sycl_device.deallocate(gpu_data_chip5);\n}\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_dynamic_chip_sycl(const Eigen::SyclDevice& sycl_device)\n{\n  IndexType sizeDim1 = 2;\n  IndexType sizeDim2 = 3;\n  IndexType sizeDim3 = 5;\n  IndexType sizeDim4 = 7;\n  IndexType sizeDim5 = 11;\n\n  array<IndexType, 5> tensorRange = {{sizeDim1, sizeDim2, sizeDim3, sizeDim4, sizeDim5}};\n  array<IndexType, 4> chip1TensorRange = {{sizeDim2, sizeDim3, sizeDim4, sizeDim5}};\n\n  Tensor<DataType, 5, DataLayout,IndexType> tensor(tensorRange);\n  Tensor<DataType, 4, DataLayout,IndexType> chip1(chip1TensorRange);\n\n  tensor.setRandom();\n\n  const size_t tensorBuffSize =tensor.size()*sizeof(DataType);\n  const size_t chip1TensorBuffSize =chip1.size()*sizeof(DataType);\n  DataType* gpu_data_tensor  = static_cast<DataType*>(sycl_device.allocate(tensorBuffSize));\n  DataType* gpu_data_chip1  = static_cast<DataType*>(sycl_device.allocate(chip1TensorBuffSize));\n\n  TensorMap<Tensor<DataType, 5, DataLayout,IndexType>> gpu_tensor(gpu_data_tensor, tensorRange);\n  TensorMap<Tensor<DataType, 4, DataLayout,IndexType>> gpu_chip1(gpu_data_chip1, chip1TensorRange);\n\n  sycl_device.memcpyHostToDevice(gpu_data_tensor, tensor.data(), tensorBuffSize);\n  gpu_chip1.device(sycl_device)=gpu_tensor.chip(1l,0l);\n  sycl_device.memcpyDeviceToHost(chip1.data(), gpu_data_chip1, chip1TensorBuffSize);\n\n  VERIFY_IS_EQUAL(chip1.dimension(0), sizeDim2);\n  VERIFY_IS_EQUAL(chip1.dimension(1), sizeDim3);\n  VERIFY_IS_EQUAL(chip1.dimension(2), sizeDim4);\n  VERIFY_IS_EQUAL(chip1.dimension(3), sizeDim5);\n\n  for (IndexType i = 0; i < sizeDim2; ++i) {\n    for (IndexType j = 0; j < sizeDim3; ++j) {\n      for (IndexType k = 0; k < sizeDim4; ++k) {\n        for (IndexType l = 0; l < sizeDim5; ++l) {\n          VERIFY_IS_EQUAL(chip1(i,j,k,l), tensor(1l,i,j,k,l));\n        }\n      }\n    }\n  }\n\n  array<IndexType, 4> chip2TensorRange = {{sizeDim1, sizeDim3, sizeDim4, sizeDim5}};\n  Tensor<DataType, 4, DataLayout,IndexType> chip2(chip2TensorRange);\n  const size_t chip2TensorBuffSize =chip2.size()*sizeof(DataType);\n  DataType* gpu_data_chip2  = static_cast<DataType*>(sycl_device.allocate(chip2TensorBuffSize));\n  TensorMap<Tensor<DataType, 4, DataLayout,IndexType>> gpu_chip2(gpu_data_chip2, chip2TensorRange);\n\n  gpu_chip2.device(sycl_device)=gpu_tensor.chip(1l,1l);\n  sycl_device.memcpyDeviceToHost(chip2.data(), gpu_data_chip2, chip2TensorBuffSize);\n\n  VERIFY_IS_EQUAL(chip2.dimension(0), sizeDim1);\n  VERIFY_IS_EQUAL(chip2.dimension(1), sizeDim3);\n  VERIFY_IS_EQUAL(chip2.dimension(2), sizeDim4);\n  VERIFY_IS_EQUAL(chip2.dimension(3), sizeDim5);\n\n  for (IndexType i = 0; i < sizeDim1; ++i) {\n    for (IndexType j = 0; j < sizeDim3; ++j) {\n      for (IndexType k = 0; k < sizeDim4; ++k) {\n        for (IndexType l = 0; l < sizeDim5; ++l) {\n          VERIFY_IS_EQUAL(chip2(i,j,k,l), tensor(i,1l,j,k,l));\n        }\n      }\n    }\n  }\n\n  array<IndexType, 4> chip3TensorRange = {{sizeDim1, sizeDim2, sizeDim4, sizeDim5}};\n  Tensor<DataType, 4, DataLayout,IndexType> chip3(chip3TensorRange);\n  const size_t chip3TensorBuffSize =chip3.size()*sizeof(DataType);\n  DataType* gpu_data_chip3  = static_cast<DataType*>(sycl_device.allocate(chip3TensorBuffSize));\n  TensorMap<Tensor<DataType, 4, DataLayout,IndexType>> gpu_chip3(gpu_data_chip3, chip3TensorRange);\n\n  gpu_chip3.device(sycl_device)=gpu_tensor.chip(2l,2l);\n  sycl_device.memcpyDeviceToHost(chip3.data(), gpu_data_chip3, chip3TensorBuffSize);\n\n  VERIFY_IS_EQUAL(chip3.dimension(0), sizeDim1);\n  VERIFY_IS_EQUAL(chip3.dimension(1), sizeDim2);\n  VERIFY_IS_EQUAL(chip3.dimension(2), sizeDim4);\n  VERIFY_IS_EQUAL(chip3.dimension(3), sizeDim5);\n\n  for (IndexType i = 0; i < sizeDim1; ++i) {\n    for (IndexType j = 0; j < sizeDim2; ++j) {\n      for (IndexType k = 0; k < sizeDim4; ++k) {\n        for (IndexType l = 0; l < sizeDim5; ++l) {\n          VERIFY_IS_EQUAL(chip3(i,j,k,l), tensor(i,j,2l,k,l));\n        }\n      }\n    }\n  }\n\n  array<IndexType, 4> chip4TensorRange = {{sizeDim1, sizeDim2, sizeDim3, sizeDim5}};\n  Tensor<DataType, 4, DataLayout,IndexType> chip4(chip4TensorRange);\n  const size_t chip4TensorBuffSize =chip4.size()*sizeof(DataType);\n  DataType* gpu_data_chip4  = static_cast<DataType*>(sycl_device.allocate(chip4TensorBuffSize));\n  TensorMap<Tensor<DataType, 4, DataLayout,IndexType>> gpu_chip4(gpu_data_chip4, chip4TensorRange);\n\n  gpu_chip4.device(sycl_device)=gpu_tensor.chip(5l,3l);\n  sycl_device.memcpyDeviceToHost(chip4.data(), gpu_data_chip4, chip4TensorBuffSize);\n\n  VERIFY_IS_EQUAL(chip4.dimension(0), sizeDim1);\n  VERIFY_IS_EQUAL(chip4.dimension(1), sizeDim2);\n  VERIFY_IS_EQUAL(chip4.dimension(2), sizeDim3);\n  VERIFY_IS_EQUAL(chip4.dimension(3), sizeDim5);\n\n  for (IndexType i = 0; i < sizeDim1; ++i) {\n    for (IndexType j = 0; j < sizeDim2; ++j) {\n      for (IndexType k = 0; k < sizeDim3; ++k) {\n        for (IndexType l = 0; l < sizeDim5; ++l) {\n          VERIFY_IS_EQUAL(chip4(i,j,k,l), tensor(i,j,k,5l,l));\n        }\n      }\n    }\n  }\n\n\n  array<IndexType, 4> chip5TensorRange = {{sizeDim1, sizeDim2, sizeDim3, sizeDim4}};\n  Tensor<DataType, 4, DataLayout,IndexType> chip5(chip5TensorRange);\n  const size_t chip5TensorBuffSize =chip5.size()*sizeof(DataType);\n  DataType* gpu_data_chip5  = static_cast<DataType*>(sycl_device.allocate(chip5TensorBuffSize));\n  TensorMap<Tensor<DataType, 4, DataLayout,IndexType>> gpu_chip5(gpu_data_chip5, chip5TensorRange);\n\n  gpu_chip5.device(sycl_device)=gpu_tensor.chip(7l,4l);\n  sycl_device.memcpyDeviceToHost(chip5.data(), gpu_data_chip5, chip5TensorBuffSize);\n\n  VERIFY_IS_EQUAL(chip5.dimension(0), sizeDim1);\n  VERIFY_IS_EQUAL(chip5.dimension(1), sizeDim2);\n  VERIFY_IS_EQUAL(chip5.dimension(2), sizeDim3);\n  VERIFY_IS_EQUAL(chip5.dimension(3), sizeDim4);\n\n  for (IndexType i = 0; i < sizeDim1; ++i) {\n    for (IndexType j = 0; j < sizeDim2; ++j) {\n      for (IndexType k = 0; k < sizeDim3; ++k) {\n        for (IndexType l = 0; l < sizeDim4; ++l) {\n          VERIFY_IS_EQUAL(chip5(i,j,k,l), tensor(i,j,k,l,7l));\n        }\n      }\n    }\n  }\n  sycl_device.deallocate(gpu_data_tensor);\n  sycl_device.deallocate(gpu_data_chip1);\n  sycl_device.deallocate(gpu_data_chip2);\n  sycl_device.deallocate(gpu_data_chip3);\n  sycl_device.deallocate(gpu_data_chip4);\n  sycl_device.deallocate(gpu_data_chip5);\n}\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_chip_in_expr(const Eigen::SyclDevice& sycl_device) {\n\n  IndexType sizeDim1 = 2;\n  IndexType sizeDim2 = 3;\n  IndexType sizeDim3 = 5;\n  IndexType sizeDim4 = 7;\n  IndexType sizeDim5 = 11;\n\n  array<IndexType, 5> tensorRange = {{sizeDim1, sizeDim2, sizeDim3, sizeDim4, sizeDim5}};\n  array<IndexType, 4> chip1TensorRange = {{sizeDim2, sizeDim3, sizeDim4, sizeDim5}};\n\n  Tensor<DataType, 5, DataLayout,IndexType> tensor(tensorRange);\n\n  Tensor<DataType, 4, DataLayout,IndexType> chip1(chip1TensorRange);\n  Tensor<DataType, 4, DataLayout,IndexType> tensor1(chip1TensorRange);\n  tensor.setRandom();\n  tensor1.setRandom();\n\n  const size_t tensorBuffSize =tensor.size()*sizeof(DataType);\n  const size_t chip1TensorBuffSize =chip1.size()*sizeof(DataType);\n  DataType* gpu_data_tensor  = static_cast<DataType*>(sycl_device.allocate(tensorBuffSize));\n  DataType* gpu_data_chip1  = static_cast<DataType*>(sycl_device.allocate(chip1TensorBuffSize));\n  DataType* gpu_data_tensor1  = static_cast<DataType*>(sycl_device.allocate(chip1TensorBuffSize));\n\n  TensorMap<Tensor<DataType, 5, DataLayout,IndexType>> gpu_tensor(gpu_data_tensor, tensorRange);\n  TensorMap<Tensor<DataType, 4, DataLayout,IndexType>> gpu_chip1(gpu_data_chip1, chip1TensorRange);\n  TensorMap<Tensor<DataType, 4, DataLayout,IndexType>> gpu_tensor1(gpu_data_tensor1, chip1TensorRange);\n\n\n  sycl_device.memcpyHostToDevice(gpu_data_tensor, tensor.data(), tensorBuffSize);\n  sycl_device.memcpyHostToDevice(gpu_data_tensor1, tensor1.data(), chip1TensorBuffSize);\n  gpu_chip1.device(sycl_device)=gpu_tensor.template chip<0l>(0l) + gpu_tensor1;\n  sycl_device.memcpyDeviceToHost(chip1.data(), gpu_data_chip1, chip1TensorBuffSize);\n\n  for (int i = 0; i < sizeDim2; ++i) {\n    for (int j = 0; j < sizeDim3; ++j) {\n      for (int k = 0; k < sizeDim4; ++k) {\n        for (int l = 0; l < sizeDim5; ++l) {\n          float expected = tensor(0l,i,j,k,l) + tensor1(i,j,k,l);\n          VERIFY_IS_EQUAL(chip1(i,j,k,l), expected);\n        }\n      }\n    }\n  }\n\n  array<IndexType, 3> chip2TensorRange = {{sizeDim2, sizeDim4, sizeDim5}};\n  Tensor<DataType, 3, DataLayout,IndexType> tensor2(chip2TensorRange);\n  Tensor<DataType, 3, DataLayout,IndexType> chip2(chip2TensorRange);\n  tensor2.setRandom();\n  const size_t chip2TensorBuffSize =tensor2.size()*sizeof(DataType);\n  DataType* gpu_data_tensor2  = static_cast<DataType*>(sycl_device.allocate(chip2TensorBuffSize));\n  DataType* gpu_data_chip2  = static_cast<DataType*>(sycl_device.allocate(chip2TensorBuffSize));\n  TensorMap<Tensor<DataType, 3, DataLayout,IndexType>> gpu_tensor2(gpu_data_tensor2, chip2TensorRange);\n  TensorMap<Tensor<DataType, 3, DataLayout,IndexType>> gpu_chip2(gpu_data_chip2, chip2TensorRange);\n\n  sycl_device.memcpyHostToDevice(gpu_data_tensor2, tensor2.data(), chip2TensorBuffSize);\n  gpu_chip2.device(sycl_device)=gpu_tensor.template chip<0l>(0l).template chip<1l>(2l) + gpu_tensor2;\n  sycl_device.memcpyDeviceToHost(chip2.data(), gpu_data_chip2, chip2TensorBuffSize);\n\n  for (int i = 0; i < sizeDim2; ++i) {\n    for (int j = 0; j < sizeDim4; ++j) {\n      for (int k = 0; k < sizeDim5; ++k) {\n        float expected = tensor(0l,i,2l,j,k) + tensor2(i,j,k);\n        VERIFY_IS_EQUAL(chip2(i,j,k), expected);\n      }\n    }\n  }\n  sycl_device.deallocate(gpu_data_tensor);\n  sycl_device.deallocate(gpu_data_tensor1);\n  sycl_device.deallocate(gpu_data_chip1);\n  sycl_device.deallocate(gpu_data_tensor2);\n  sycl_device.deallocate(gpu_data_chip2);\n}\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_chip_as_lvalue_sycl(const Eigen::SyclDevice& sycl_device)\n{\n\n  IndexType sizeDim1 = 2;\n  IndexType sizeDim2 = 3;\n  IndexType sizeDim3 = 5;\n  IndexType sizeDim4 = 7;\n  IndexType sizeDim5 = 11;\n\n  array<IndexType, 5> tensorRange = {{sizeDim1, sizeDim2, sizeDim3, sizeDim4, sizeDim5}};\n  array<IndexType, 4> input2TensorRange = {{sizeDim2, sizeDim3, sizeDim4, sizeDim5}};\n\n  Tensor<DataType, 5, DataLayout,IndexType> tensor(tensorRange);\n  Tensor<DataType, 5, DataLayout,IndexType> input1(tensorRange);\n  Tensor<DataType, 4, DataLayout,IndexType> input2(input2TensorRange);\n  input1.setRandom();\n  input2.setRandom();\n\n\n  const size_t tensorBuffSize =tensor.size()*sizeof(DataType);\n  const size_t input2TensorBuffSize =input2.size()*sizeof(DataType);\n  std::cout << tensorBuffSize << \" , \"<<  input2TensorBuffSize << std::endl;\n  DataType* gpu_data_tensor  = static_cast<DataType*>(sycl_device.allocate(tensorBuffSize));\n  DataType* gpu_data_input1  = static_cast<DataType*>(sycl_device.allocate(tensorBuffSize));\n  DataType* gpu_data_input2  = static_cast<DataType*>(sycl_device.allocate(input2TensorBuffSize));\n\n  TensorMap<Tensor<DataType, 5, DataLayout,IndexType>> gpu_tensor(gpu_data_tensor, tensorRange);\n  TensorMap<Tensor<DataType, 5, DataLayout,IndexType>> gpu_input1(gpu_data_input1, tensorRange);\n  TensorMap<Tensor<DataType, 4, DataLayout,IndexType>> gpu_input2(gpu_data_input2, input2TensorRange);\n\n  sycl_device.memcpyHostToDevice(gpu_data_input1, input1.data(), tensorBuffSize);\n  gpu_tensor.device(sycl_device)=gpu_input1;\n  sycl_device.memcpyHostToDevice(gpu_data_input2, input2.data(), input2TensorBuffSize);\n  gpu_tensor.template chip<0l>(1l).device(sycl_device)=gpu_input2;\n  sycl_device.memcpyDeviceToHost(tensor.data(), gpu_data_tensor, tensorBuffSize);\n\n  for (int i = 0; i < sizeDim1; ++i) {\n    for (int j = 0; j < sizeDim2; ++j) {\n      for (int k = 0; k < sizeDim3; ++k) {\n        for (int l = 0; l < sizeDim4; ++l) {\n          for (int m = 0; m < sizeDim5; ++m) {\n            if (i != 1) {\n              VERIFY_IS_EQUAL(tensor(i,j,k,l,m), input1(i,j,k,l,m));\n            } else {\n              VERIFY_IS_EQUAL(tensor(i,j,k,l,m), input2(j,k,l,m));\n            }\n          }\n        }\n      }\n    }\n  }\n\n  gpu_tensor.device(sycl_device)=gpu_input1;\n  array<IndexType, 4> input3TensorRange = {{sizeDim1, sizeDim3, sizeDim4, sizeDim5}};\n  Tensor<DataType, 4, DataLayout,IndexType> input3(input3TensorRange);\n  input3.setRandom();\n\n  const size_t input3TensorBuffSize =input3.size()*sizeof(DataType);\n  DataType* gpu_data_input3  = static_cast<DataType*>(sycl_device.allocate(input3TensorBuffSize));\n  TensorMap<Tensor<DataType, 4, DataLayout,IndexType>> gpu_input3(gpu_data_input3, input3TensorRange);\n\n  sycl_device.memcpyHostToDevice(gpu_data_input3, input3.data(), input3TensorBuffSize);\n  gpu_tensor.template chip<1l>(1l).device(sycl_device)=gpu_input3;\n  sycl_device.memcpyDeviceToHost(tensor.data(), gpu_data_tensor, tensorBuffSize);\n\n  for (int i = 0; i < sizeDim1; ++i) {\n    for (int j = 0; j < sizeDim2; ++j) {\n      for (int k = 0; k <sizeDim3; ++k) {\n        for (int l = 0; l < sizeDim4; ++l) {\n          for (int m = 0; m < sizeDim5; ++m) {\n            if (j != 1) {\n              VERIFY_IS_EQUAL(tensor(i,j,k,l,m), input1(i,j,k,l,m));\n            } else {\n              VERIFY_IS_EQUAL(tensor(i,j,k,l,m), input3(i,k,l,m));\n            }\n          }\n        }\n      }\n    }\n  }\n\n  gpu_tensor.device(sycl_device)=gpu_input1;\n  array<IndexType, 4> input4TensorRange = {{sizeDim1, sizeDim2, sizeDim4, sizeDim5}};\n  Tensor<DataType, 4, DataLayout,IndexType> input4(input4TensorRange);\n  input4.setRandom();\n\n  const size_t input4TensorBuffSize =input4.size()*sizeof(DataType);\n  DataType* gpu_data_input4  = static_cast<DataType*>(sycl_device.allocate(input4TensorBuffSize));\n  TensorMap<Tensor<DataType, 4, DataLayout,IndexType>> gpu_input4(gpu_data_input4, input4TensorRange);\n\n  sycl_device.memcpyHostToDevice(gpu_data_input4, input4.data(), input4TensorBuffSize);\n  gpu_tensor.template chip<2l>(3l).device(sycl_device)=gpu_input4;\n  sycl_device.memcpyDeviceToHost(tensor.data(), gpu_data_tensor, tensorBuffSize);\n\n  for (int i = 0; i < sizeDim1; ++i) {\n    for (int j = 0; j < sizeDim2; ++j) {\n      for (int k = 0; k <sizeDim3; ++k) {\n        for (int l = 0; l < sizeDim4; ++l) {\n          for (int m = 0; m < sizeDim5; ++m) {\n            if (k != 3) {\n              VERIFY_IS_EQUAL(tensor(i,j,k,l,m), input1(i,j,k,l,m));\n            } else {\n              VERIFY_IS_EQUAL(tensor(i,j,k,l,m), input4(i,j,l,m));\n            }\n          }\n        }\n      }\n    }\n  }\n\n  gpu_tensor.device(sycl_device)=gpu_input1;\n  array<IndexType, 4> input5TensorRange = {{sizeDim1, sizeDim2, sizeDim3, sizeDim5}};\n  Tensor<DataType, 4, DataLayout,IndexType> input5(input5TensorRange);\n  input5.setRandom();\n\n  const size_t input5TensorBuffSize =input5.size()*sizeof(DataType);\n  DataType* gpu_data_input5  = static_cast<DataType*>(sycl_device.allocate(input5TensorBuffSize));\n  TensorMap<Tensor<DataType, 4, DataLayout,IndexType>> gpu_input5(gpu_data_input5, input5TensorRange);\n\n  sycl_device.memcpyHostToDevice(gpu_data_input5, input5.data(), input5TensorBuffSize);\n  gpu_tensor.template chip<3l>(4l).device(sycl_device)=gpu_input5;\n  sycl_device.memcpyDeviceToHost(tensor.data(), gpu_data_tensor, tensorBuffSize);\n\n  for (int i = 0; i < sizeDim1; ++i) {\n    for (int j = 0; j < sizeDim2; ++j) {\n      for (int k = 0; k <sizeDim3; ++k) {\n        for (int l = 0; l < sizeDim4; ++l) {\n          for (int m = 0; m < sizeDim5; ++m) {\n            if (l != 4) {\n              VERIFY_IS_EQUAL(tensor(i,j,k,l,m), input1(i,j,k,l,m));\n            } else {\n              VERIFY_IS_EQUAL(tensor(i,j,k,l,m), input5(i,j,k,m));\n            }\n          }\n        }\n      }\n    }\n  }\n  gpu_tensor.device(sycl_device)=gpu_input1;\n  array<IndexType, 4> input6TensorRange = {{sizeDim1, sizeDim2, sizeDim3, sizeDim4}};\n  Tensor<DataType, 4, DataLayout,IndexType> input6(input6TensorRange);\n  input6.setRandom();\n\n  const size_t input6TensorBuffSize =input6.size()*sizeof(DataType);\n  DataType* gpu_data_input6  = static_cast<DataType*>(sycl_device.allocate(input6TensorBuffSize));\n  TensorMap<Tensor<DataType, 4, DataLayout,IndexType>> gpu_input6(gpu_data_input6, input6TensorRange);\n\n  sycl_device.memcpyHostToDevice(gpu_data_input6, input6.data(), input6TensorBuffSize);\n  gpu_tensor.template chip<4l>(5l).device(sycl_device)=gpu_input6;\n  sycl_device.memcpyDeviceToHost(tensor.data(), gpu_data_tensor, tensorBuffSize);\n\n  for (int i = 0; i < sizeDim1; ++i) {\n    for (int j = 0; j < sizeDim2; ++j) {\n      for (int k = 0; k <sizeDim3; ++k) {\n        for (int l = 0; l < sizeDim4; ++l) {\n          for (int m = 0; m < sizeDim5; ++m) {\n            if (m != 5) {\n              VERIFY_IS_EQUAL(tensor(i,j,k,l,m), input1(i,j,k,l,m));\n            } else {\n              VERIFY_IS_EQUAL(tensor(i,j,k,l,m), input6(i,j,k,l));\n            }\n          }\n        }\n      }\n    }\n  }\n\n\n  gpu_tensor.device(sycl_device)=gpu_input1;\n  Tensor<DataType, 5, DataLayout,IndexType> input7(tensorRange);\n  input7.setRandom();\n\n  DataType* gpu_data_input7  = static_cast<DataType*>(sycl_device.allocate(tensorBuffSize));\n  TensorMap<Tensor<DataType, 5, DataLayout,IndexType>> gpu_input7(gpu_data_input7, tensorRange);\n\n  sycl_device.memcpyHostToDevice(gpu_data_input7, input7.data(), tensorBuffSize);\n  gpu_tensor.chip(0l,0l).device(sycl_device)=gpu_input7.chip(0l,0l);\n  sycl_device.memcpyDeviceToHost(tensor.data(), gpu_data_tensor, tensorBuffSize);\n\n  for (int i = 0; i < sizeDim1; ++i) {\n    for (int j = 0; j < sizeDim2; ++j) {\n      for (int k = 0; k <sizeDim3; ++k) {\n        for (int l = 0; l < sizeDim4; ++l) {\n          for (int m = 0; m < sizeDim5; ++m) {\n            if (i != 0) {\n              VERIFY_IS_EQUAL(tensor(i,j,k,l,m), input1(i,j,k,l,m));\n            } else {\n              VERIFY_IS_EQUAL(tensor(i,j,k,l,m), input7(i,j,k,l,m));\n            }\n          }\n        }\n      }\n    }\n  }\n  sycl_device.deallocate(gpu_data_tensor);\n  sycl_device.deallocate(gpu_data_input1);\n  sycl_device.deallocate(gpu_data_input2);\n  sycl_device.deallocate(gpu_data_input3);\n  sycl_device.deallocate(gpu_data_input4);\n  sycl_device.deallocate(gpu_data_input5);\n  sycl_device.deallocate(gpu_data_input6);\n  sycl_device.deallocate(gpu_data_input7);\n\n}\n\ntemplate<typename DataType, typename dev_Selector> void sycl_chipping_test_per_device(dev_Selector s){\n  QueueInterface queueInterface(s);\n  auto sycl_device = Eigen::SyclDevice(&queueInterface);\n /* test_static_chip_sycl<DataType, RowMajor, int64_t>(sycl_device);\n  test_static_chip_sycl<DataType, ColMajor, int64_t>(sycl_device);\n  test_dynamic_chip_sycl<DataType, RowMajor, int64_t>(sycl_device);\n  test_dynamic_chip_sycl<DataType, ColMajor, int64_t>(sycl_device);\n  test_chip_in_expr<DataType, RowMajor, int64_t>(sycl_device);\n  test_chip_in_expr<DataType, ColMajor, int64_t>(sycl_device);*/\n  test_chip_as_lvalue_sycl<DataType, RowMajor, int64_t>(sycl_device);\n // test_chip_as_lvalue_sycl<DataType, ColMajor, int64_t>(sycl_device);\n}\nEIGEN_DECLARE_TEST(cxx11_tensor_chipping_sycl)\n{\n  for (const auto& device :Eigen::get_sycl_supported_devices()) {\n    CALL_SUBTEST(sycl_chipping_test_per_device<float>(device));\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_comparisons.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\nusing Eigen::RowMajor;\n\nstatic void test_orderings()\n{\n  Tensor<float, 3> mat1(2,3,7);\n  Tensor<float, 3> mat2(2,3,7);\n  Tensor<bool, 3> lt(2,3,7);\n  Tensor<bool, 3> le(2,3,7);\n  Tensor<bool, 3> gt(2,3,7);\n  Tensor<bool, 3> ge(2,3,7);\n\n  mat1.setRandom();\n  mat2.setRandom();\n\n  lt = mat1 < mat2;\n  le = mat1 <= mat2;\n  gt = mat1 > mat2;\n  ge = mat1 >= mat2;\n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        VERIFY_IS_EQUAL(lt(i,j,k), mat1(i,j,k) < mat2(i,j,k));\n        VERIFY_IS_EQUAL(le(i,j,k), mat1(i,j,k) <= mat2(i,j,k));\n        VERIFY_IS_EQUAL(gt(i,j,k), mat1(i,j,k) > mat2(i,j,k));\n        VERIFY_IS_EQUAL(ge(i,j,k), mat1(i,j,k) >= mat2(i,j,k));\n      }\n    }\n  }\n}\n\n\nstatic void test_equality()\n{\n  Tensor<float, 3> mat1(2,3,7);\n  Tensor<float, 3> mat2(2,3,7);\n\n  mat1.setRandom();\n  mat2.setRandom();\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        if (internal::random<bool>()) {\n          mat2(i,j,k) = mat1(i,j,k);\n        }\n      }\n    }\n  }\n\n  Tensor<bool, 3> eq(2,3,7);\n  Tensor<bool, 3> ne(2,3,7);\n  eq = (mat1 == mat2);\n  ne = (mat1 != mat2);\n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        VERIFY_IS_EQUAL(eq(i,j,k), mat1(i,j,k) == mat2(i,j,k));\n        VERIFY_IS_EQUAL(ne(i,j,k), mat1(i,j,k) != mat2(i,j,k));\n      }\n    }\n  }\n}\n\n\nEIGEN_DECLARE_TEST(cxx11_tensor_comparisons)\n{\n  CALL_SUBTEST(test_orderings());\n  CALL_SUBTEST(test_equality());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_complex_cwise_ops_gpu.cu",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_TEST_NO_LONGDOUBLE\n\n#define EIGEN_USE_GPU\n\n#include \"main.h\"\n#include <unsupported/Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\n\ntemplate<typename T>\nvoid test_cuda_complex_cwise_ops() {\n  const int kNumItems = 2;\n  std::size_t complex_bytes = kNumItems * sizeof(std::complex<T>);\n\n  std::complex<T>* d_in1;\n  std::complex<T>* d_in2;\n  std::complex<T>* d_out;\n  cudaMalloc((void**)(&d_in1), complex_bytes);\n  cudaMalloc((void**)(&d_in2), complex_bytes);\n  cudaMalloc((void**)(&d_out), complex_bytes);\n\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n\n  Eigen::TensorMap<Eigen::Tensor<std::complex<T>, 1, 0, int>, Eigen::Aligned> gpu_in1(\n      d_in1, kNumItems);\n  Eigen::TensorMap<Eigen::Tensor<std::complex<T>, 1, 0, int>, Eigen::Aligned> gpu_in2(\n      d_in2, kNumItems);\n  Eigen::TensorMap<Eigen::Tensor<std::complex<T>, 1, 0, int>, Eigen::Aligned> gpu_out(\n      d_out, kNumItems);\n\n  const std::complex<T> a(3.14f, 2.7f);\n  const std::complex<T> b(-10.6f, 1.4f);\n\n  gpu_in1.device(gpu_device) = gpu_in1.constant(a);\n  gpu_in2.device(gpu_device) = gpu_in2.constant(b);\n\n  enum CwiseOp {\n    Add = 0,\n    Sub,\n    Mul,\n    Div,\n    Neg,\n    NbOps\n  };\n\n  Tensor<std::complex<T>, 1, 0, int> actual(kNumItems);\n  for (int op = Add; op < NbOps; op++) {\n    std::complex<T> expected;\n    switch (static_cast<CwiseOp>(op)) {\n      case Add:\n        gpu_out.device(gpu_device) = gpu_in1 + gpu_in2;\n        expected = a + b;\n        break;\n      case Sub:\n        gpu_out.device(gpu_device) = gpu_in1 - gpu_in2;\n        expected = a - b;\n        break;\n      case Mul:\n        gpu_out.device(gpu_device) = gpu_in1 * gpu_in2;\n        expected = a * b;\n        break;\n      case Div:\n        gpu_out.device(gpu_device) = gpu_in1 / gpu_in2;\n        expected = a / b;\n        break;\n      case Neg:\n        gpu_out.device(gpu_device) = -gpu_in1;\n        expected = -a;\n        break;\n    }\n    assert(cudaMemcpyAsync(actual.data(), d_out, complex_bytes, cudaMemcpyDeviceToHost,\n                           gpu_device.stream()) == cudaSuccess);\n    assert(cudaStreamSynchronize(gpu_device.stream()) == cudaSuccess);\n\n    for (int i = 0; i < kNumItems; ++i) {\n      VERIFY_IS_APPROX(actual(i), expected);\n    }\n  }\n\n  cudaFree(d_in1);\n  cudaFree(d_in2);\n  cudaFree(d_out);\n}\n\n\nEIGEN_DECLARE_TEST(test_cxx11_tensor_complex_cwise_ops)\n{\n  CALL_SUBTEST(test_cuda_complex_cwise_ops<float>());\n  CALL_SUBTEST(test_cuda_complex_cwise_ops<double>());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_complex_gpu.cu",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_TEST_NO_LONGDOUBLE\n\n#define EIGEN_USE_GPU\n\n#include \"main.h\"\n#include <unsupported/Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\n\nvoid test_cuda_nullary() {\n  Tensor<std::complex<float>, 1, 0, int> in1(2);\n  Tensor<std::complex<float>, 1, 0, int> in2(2);\n  in1.setRandom();\n  in2.setRandom();\n\n  std::size_t float_bytes = in1.size() * sizeof(float);\n  std::size_t complex_bytes = in1.size() * sizeof(std::complex<float>);\n\n  std::complex<float>* d_in1;\n  std::complex<float>* d_in2;\n  float* d_out2;\n  cudaMalloc((void**)(&d_in1), complex_bytes);\n  cudaMalloc((void**)(&d_in2), complex_bytes);\n  cudaMalloc((void**)(&d_out2), float_bytes);\n  cudaMemcpy(d_in1, in1.data(), complex_bytes, cudaMemcpyHostToDevice);\n  cudaMemcpy(d_in2, in2.data(), complex_bytes, cudaMemcpyHostToDevice);\n\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n\n  Eigen::TensorMap<Eigen::Tensor<std::complex<float>, 1, 0, int>, Eigen::Aligned> gpu_in1(\n      d_in1, 2);\n  Eigen::TensorMap<Eigen::Tensor<std::complex<float>, 1, 0, int>, Eigen::Aligned> gpu_in2(\n      d_in2, 2);\n  Eigen::TensorMap<Eigen::Tensor<float, 1, 0, int>, Eigen::Aligned> gpu_out2(\n      d_out2, 2);\n\n  gpu_in1.device(gpu_device) = gpu_in1.constant(std::complex<float>(3.14f, 2.7f));\n  gpu_out2.device(gpu_device) = gpu_in2.abs();\n\n  Tensor<std::complex<float>, 1, 0, int> new1(2);\n  Tensor<float, 1, 0, int> new2(2);\n\n  assert(cudaMemcpyAsync(new1.data(), d_in1, complex_bytes, cudaMemcpyDeviceToHost,\n                         gpu_device.stream()) == cudaSuccess);\n  assert(cudaMemcpyAsync(new2.data(), d_out2, float_bytes, cudaMemcpyDeviceToHost,\n                         gpu_device.stream()) == cudaSuccess);\n\n  assert(cudaStreamSynchronize(gpu_device.stream()) == cudaSuccess);\n\n  for (int i = 0; i < 2; ++i) {\n    VERIFY_IS_APPROX(new1(i), std::complex<float>(3.14f, 2.7f));\n    VERIFY_IS_APPROX(new2(i), std::abs(in2(i)));\n  }\n\n  cudaFree(d_in1);\n  cudaFree(d_in2);\n  cudaFree(d_out2);\n}\n\n\nstatic void test_cuda_sum_reductions() {\n\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n\n  const int num_rows = internal::random<int>(1024, 5*1024);\n  const int num_cols = internal::random<int>(1024, 5*1024);\n\n  Tensor<std::complex<float>, 2> in(num_rows, num_cols);\n  in.setRandom();\n\n  Tensor<std::complex<float>, 0> full_redux;\n  full_redux = in.sum();\n\n  std::size_t in_bytes = in.size() * sizeof(std::complex<float>);\n  std::size_t out_bytes = full_redux.size() * sizeof(std::complex<float>);\n  std::complex<float>* gpu_in_ptr = static_cast<std::complex<float>*>(gpu_device.allocate(in_bytes));\n  std::complex<float>* gpu_out_ptr = static_cast<std::complex<float>*>(gpu_device.allocate(out_bytes));\n  gpu_device.memcpyHostToDevice(gpu_in_ptr, in.data(), in_bytes);\n\n  TensorMap<Tensor<std::complex<float>, 2> > in_gpu(gpu_in_ptr, num_rows, num_cols);\n  TensorMap<Tensor<std::complex<float>, 0> > out_gpu(gpu_out_ptr);\n\n  out_gpu.device(gpu_device) = in_gpu.sum();\n\n  Tensor<std::complex<float>, 0> full_redux_gpu;\n  gpu_device.memcpyDeviceToHost(full_redux_gpu.data(), gpu_out_ptr, out_bytes);\n  gpu_device.synchronize();\n\n  // Check that the CPU and GPU reductions return the same result.\n  VERIFY_IS_APPROX(full_redux(), full_redux_gpu());\n\n  gpu_device.deallocate(gpu_in_ptr);\n  gpu_device.deallocate(gpu_out_ptr);\n}\n\nstatic void test_cuda_mean_reductions() {\n\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n\n  const int num_rows = internal::random<int>(1024, 5*1024);\n  const int num_cols = internal::random<int>(1024, 5*1024);\n\n  Tensor<std::complex<float>, 2> in(num_rows, num_cols);\n  in.setRandom();\n\n  Tensor<std::complex<float>, 0> full_redux;\n  full_redux = in.mean();\n\n  std::size_t in_bytes = in.size() * sizeof(std::complex<float>);\n  std::size_t out_bytes = full_redux.size() * sizeof(std::complex<float>);\n  std::complex<float>* gpu_in_ptr = static_cast<std::complex<float>*>(gpu_device.allocate(in_bytes));\n  std::complex<float>* gpu_out_ptr = static_cast<std::complex<float>*>(gpu_device.allocate(out_bytes));\n  gpu_device.memcpyHostToDevice(gpu_in_ptr, in.data(), in_bytes);\n\n  TensorMap<Tensor<std::complex<float>, 2> > in_gpu(gpu_in_ptr, num_rows, num_cols);\n  TensorMap<Tensor<std::complex<float>, 0> > out_gpu(gpu_out_ptr);\n\n  out_gpu.device(gpu_device) = in_gpu.mean();\n\n  Tensor<std::complex<float>, 0> full_redux_gpu;\n  gpu_device.memcpyDeviceToHost(full_redux_gpu.data(), gpu_out_ptr, out_bytes);\n  gpu_device.synchronize();\n\n  // Check that the CPU and GPU reductions return the same result.\n  VERIFY_IS_APPROX(full_redux(), full_redux_gpu());\n\n  gpu_device.deallocate(gpu_in_ptr);\n  gpu_device.deallocate(gpu_out_ptr);\n}\n\nstatic void test_cuda_product_reductions() {\n\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n\n  const int num_rows = internal::random<int>(1024, 5*1024);\n  const int num_cols = internal::random<int>(1024, 5*1024);\n\n  Tensor<std::complex<float>, 2> in(num_rows, num_cols);\n  in.setRandom();\n\n  Tensor<std::complex<float>, 0> full_redux;\n  full_redux = in.prod();\n\n  std::size_t in_bytes = in.size() * sizeof(std::complex<float>);\n  std::size_t out_bytes = full_redux.size() * sizeof(std::complex<float>);\n  std::complex<float>* gpu_in_ptr = static_cast<std::complex<float>*>(gpu_device.allocate(in_bytes));\n  std::complex<float>* gpu_out_ptr = static_cast<std::complex<float>*>(gpu_device.allocate(out_bytes));\n  gpu_device.memcpyHostToDevice(gpu_in_ptr, in.data(), in_bytes);\n\n  TensorMap<Tensor<std::complex<float>, 2> > in_gpu(gpu_in_ptr, num_rows, num_cols);\n  TensorMap<Tensor<std::complex<float>, 0> > out_gpu(gpu_out_ptr);\n\n  out_gpu.device(gpu_device) = in_gpu.prod();\n\n  Tensor<std::complex<float>, 0> full_redux_gpu;\n  gpu_device.memcpyDeviceToHost(full_redux_gpu.data(), gpu_out_ptr, out_bytes);\n  gpu_device.synchronize();\n\n  // Check that the CPU and GPU reductions return the same result.\n  VERIFY_IS_APPROX(full_redux(), full_redux_gpu());\n\n  gpu_device.deallocate(gpu_in_ptr);\n  gpu_device.deallocate(gpu_out_ptr);\n}\n\n\nEIGEN_DECLARE_TEST(test_cxx11_tensor_complex)\n{\n  CALL_SUBTEST(test_cuda_nullary());\n  CALL_SUBTEST(test_cuda_sum_reductions());\n  CALL_SUBTEST(test_cuda_mean_reductions());\n  CALL_SUBTEST(test_cuda_product_reductions());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_concatenation.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\n\ntemplate<int DataLayout>\nstatic void test_dimension_failures()\n{\n  Tensor<int, 3, DataLayout> left(2, 3, 1);\n  Tensor<int, 3, DataLayout> right(3, 3, 1);\n  left.setRandom();\n  right.setRandom();\n\n  // Okay; other dimensions are equal.\n  Tensor<int, 3, DataLayout> concatenation = left.concatenate(right, 0);\n\n  // Dimension mismatches.\n  VERIFY_RAISES_ASSERT(concatenation = left.concatenate(right, 1));\n  VERIFY_RAISES_ASSERT(concatenation = left.concatenate(right, 2));\n\n  // Axis > NumDims or < 0.\n  VERIFY_RAISES_ASSERT(concatenation = left.concatenate(right, 3));\n  VERIFY_RAISES_ASSERT(concatenation = left.concatenate(right, -1));\n}\n\ntemplate<int DataLayout>\nstatic void test_static_dimension_failure()\n{\n  Tensor<int, 2, DataLayout> left(2, 3);\n  Tensor<int, 3, DataLayout> right(2, 3, 1);\n\n#ifdef CXX11_TENSOR_CONCATENATION_STATIC_DIMENSION_FAILURE\n  // Technically compatible, but we static assert that the inputs have same\n  // NumDims.\n  Tensor<int, 3, DataLayout> concatenation = left.concatenate(right, 0);\n#endif\n\n  // This can be worked around in this case.\n  Tensor<int, 3, DataLayout> concatenation = left\n      .reshape(Tensor<int, 3>::Dimensions(2, 3, 1))\n      .concatenate(right, 0);\n  Tensor<int, 2, DataLayout> alternative = left\n   // Clang compiler break with {{{}}} with an ambiguous error on copy constructor\n  // the variadic DSize constructor added for #ifndef EIGEN_EMULATE_CXX11_META_H.\n  // Solution:\n  // either the code should change to \n  //  Tensor<int, 2>::Dimensions{{2, 3}}\n  // or Tensor<int, 2>::Dimensions{Tensor<int, 2>::Dimensions{{2, 3}}}\n      .concatenate(right.reshape(Tensor<int, 2>::Dimensions(2, 3)), 0);\n}\n\ntemplate<int DataLayout>\nstatic void test_simple_concatenation()\n{\n  Tensor<int, 3, DataLayout> left(2, 3, 1);\n  Tensor<int, 3, DataLayout> right(2, 3, 1);\n  left.setRandom();\n  right.setRandom();\n\n  Tensor<int, 3, DataLayout> concatenation = left.concatenate(right, 0);\n  VERIFY_IS_EQUAL(concatenation.dimension(0), 4);\n  VERIFY_IS_EQUAL(concatenation.dimension(1), 3);\n  VERIFY_IS_EQUAL(concatenation.dimension(2), 1);\n  for (int j = 0; j < 3; ++j) {\n    for (int i = 0; i < 2; ++i) {\n      VERIFY_IS_EQUAL(concatenation(i, j, 0), left(i, j, 0));\n    }\n    for (int i = 2; i < 4; ++i) {\n      VERIFY_IS_EQUAL(concatenation(i, j, 0), right(i - 2, j, 0));\n    }\n  }\n\n  concatenation = left.concatenate(right, 1);\n  VERIFY_IS_EQUAL(concatenation.dimension(0), 2);\n  VERIFY_IS_EQUAL(concatenation.dimension(1), 6);\n  VERIFY_IS_EQUAL(concatenation.dimension(2), 1);\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      VERIFY_IS_EQUAL(concatenation(i, j, 0), left(i, j, 0));\n    }\n    for (int j = 3; j < 6; ++j) {\n      VERIFY_IS_EQUAL(concatenation(i, j, 0), right(i, j - 3, 0));\n    }\n  }\n\n  concatenation = left.concatenate(right, 2);\n  VERIFY_IS_EQUAL(concatenation.dimension(0), 2);\n  VERIFY_IS_EQUAL(concatenation.dimension(1), 3);\n  VERIFY_IS_EQUAL(concatenation.dimension(2), 2);\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      VERIFY_IS_EQUAL(concatenation(i, j, 0), left(i, j, 0));\n      VERIFY_IS_EQUAL(concatenation(i, j, 1), right(i, j, 0));\n    }\n  }\n}\n\n\n// TODO(phli): Add test once we have a real vectorized implementation.\n// static void test_vectorized_concatenation() {}\n\nstatic void test_concatenation_as_lvalue()\n{\n  Tensor<int, 2> t1(2, 3);\n  Tensor<int, 2> t2(2, 3);\n  t1.setRandom();\n  t2.setRandom();\n\n  Tensor<int, 2> result(4, 3);\n  result.setRandom();\n  t1.concatenate(t2, 0) = result;\n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      VERIFY_IS_EQUAL(t1(i, j), result(i, j));\n      VERIFY_IS_EQUAL(t2(i, j), result(i+2, j));\n    }\n  }\n}\n\n\nEIGEN_DECLARE_TEST(cxx11_tensor_concatenation)\n{\n   CALL_SUBTEST(test_dimension_failures<ColMajor>());\n   CALL_SUBTEST(test_dimension_failures<RowMajor>());\n   CALL_SUBTEST(test_static_dimension_failure<ColMajor>());\n   CALL_SUBTEST(test_static_dimension_failure<RowMajor>());\n   CALL_SUBTEST(test_simple_concatenation<ColMajor>());\n   CALL_SUBTEST(test_simple_concatenation<RowMajor>());\n   // CALL_SUBTEST(test_vectorized_concatenation());\n   CALL_SUBTEST(test_concatenation_as_lvalue());\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_concatenation_sycl.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016\n// Mehdi Goli    Codeplay Software Ltd.\n// Ralph Potter  Codeplay Software Ltd.\n// Luke Iwanski  Codeplay Software Ltd.\n// Contact: <eigen@codeplay.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_TEST_NO_LONGDOUBLE\n#define EIGEN_TEST_NO_COMPLEX\n\n#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int64_t\n#define EIGEN_USE_SYCL\n\n#include \"main.h\"\n#include <unsupported/Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\n\ntemplate<typename DataType, int DataLayout, typename IndexType>\nstatic void test_simple_concatenation(const Eigen::SyclDevice& sycl_device)\n{\n  IndexType leftDim1 = 2;\n  IndexType leftDim2 = 3;\n  IndexType leftDim3 = 1;\n  Eigen::array<IndexType, 3> leftRange = {{leftDim1, leftDim2, leftDim3}};\n  IndexType rightDim1 = 2;\n  IndexType rightDim2 = 3;\n  IndexType rightDim3 = 1;\n  Eigen::array<IndexType, 3> rightRange = {{rightDim1, rightDim2, rightDim3}};\n\n  //IndexType concatDim1 = 3;\n//\tIndexType concatDim2 = 3;\n//\tIndexType concatDim3 = 1;\n  //Eigen::array<IndexType, 3> concatRange = {{concatDim1, concatDim2, concatDim3}};\n\n  Tensor<DataType, 3, DataLayout, IndexType> left(leftRange);\n  Tensor<DataType, 3, DataLayout, IndexType> right(rightRange);\n  left.setRandom();\n  right.setRandom();\n\n  DataType * gpu_in1_data  = static_cast<DataType*>(sycl_device.allocate(left.dimensions().TotalSize()*sizeof(DataType)));\n  DataType * gpu_in2_data  = static_cast<DataType*>(sycl_device.allocate(right.dimensions().TotalSize()*sizeof(DataType)));\n\n  Eigen::TensorMap<Eigen::Tensor<DataType, 3, DataLayout, IndexType>> gpu_in1(gpu_in1_data, leftRange);\n  Eigen::TensorMap<Eigen::Tensor<DataType, 3, DataLayout, IndexType>> gpu_in2(gpu_in2_data, rightRange);\n  sycl_device.memcpyHostToDevice(gpu_in1_data, left.data(),(left.dimensions().TotalSize())*sizeof(DataType));\n  sycl_device.memcpyHostToDevice(gpu_in2_data, right.data(),(right.dimensions().TotalSize())*sizeof(DataType));\n  ///\n  Tensor<DataType, 3, DataLayout, IndexType> concatenation1(leftDim1+rightDim1, leftDim2, leftDim3);\n  DataType * gpu_out_data1 =  static_cast<DataType*>(sycl_device.allocate(concatenation1.dimensions().TotalSize()*sizeof(DataType)));\n  Eigen::TensorMap<Eigen::Tensor<DataType, 3, DataLayout, IndexType>> gpu_out1(gpu_out_data1, concatenation1.dimensions());\n\n  //concatenation = left.concatenate(right, 0);\n  gpu_out1.device(sycl_device) =gpu_in1.concatenate(gpu_in2, 0);\n  sycl_device.memcpyDeviceToHost(concatenation1.data(), gpu_out_data1,(concatenation1.dimensions().TotalSize())*sizeof(DataType));\n\n  VERIFY_IS_EQUAL(concatenation1.dimension(0), 4);\n  VERIFY_IS_EQUAL(concatenation1.dimension(1), 3);\n  VERIFY_IS_EQUAL(concatenation1.dimension(2), 1);\n  for (IndexType j = 0; j < 3; ++j) {\n    for (IndexType i = 0; i < 2; ++i) {\n      VERIFY_IS_EQUAL(concatenation1(i, j, 0), left(i, j, 0));\n    }\n    for (IndexType i = 2; i < 4; ++i) {\n      VERIFY_IS_EQUAL(concatenation1(i, j, 0), right(i - 2, j, 0));\n    }\n  }\n\n  sycl_device.deallocate(gpu_out_data1);\n  Tensor<DataType, 3, DataLayout, IndexType> concatenation2(leftDim1, leftDim2 +rightDim2, leftDim3);\n  DataType * gpu_out_data2 =  static_cast<DataType*>(sycl_device.allocate(concatenation2.dimensions().TotalSize()*sizeof(DataType)));\n  Eigen::TensorMap<Eigen::Tensor<DataType, 3, DataLayout, IndexType>> gpu_out2(gpu_out_data2, concatenation2.dimensions());\n  gpu_out2.device(sycl_device) =gpu_in1.concatenate(gpu_in2, 1);\n  sycl_device.memcpyDeviceToHost(concatenation2.data(), gpu_out_data2,(concatenation2.dimensions().TotalSize())*sizeof(DataType));\n\n  //concatenation = left.concatenate(right, 1);\n  VERIFY_IS_EQUAL(concatenation2.dimension(0), 2);\n  VERIFY_IS_EQUAL(concatenation2.dimension(1), 6);\n  VERIFY_IS_EQUAL(concatenation2.dimension(2), 1);\n  for (IndexType i = 0; i < 2; ++i) {\n    for (IndexType j = 0; j < 3; ++j) {\n      VERIFY_IS_EQUAL(concatenation2(i, j, 0), left(i, j, 0));\n    }\n    for (IndexType j = 3; j < 6; ++j) {\n      VERIFY_IS_EQUAL(concatenation2(i, j, 0), right(i, j - 3, 0));\n    }\n  }\n  sycl_device.deallocate(gpu_out_data2);\n  Tensor<DataType, 3, DataLayout, IndexType> concatenation3(leftDim1, leftDim2, leftDim3+rightDim3);\n  DataType * gpu_out_data3 =  static_cast<DataType*>(sycl_device.allocate(concatenation3.dimensions().TotalSize()*sizeof(DataType)));\n  Eigen::TensorMap<Eigen::Tensor<DataType, 3, DataLayout, IndexType>> gpu_out3(gpu_out_data3, concatenation3.dimensions());\n  gpu_out3.device(sycl_device) =gpu_in1.concatenate(gpu_in2, 2);\n  sycl_device.memcpyDeviceToHost(concatenation3.data(), gpu_out_data3,(concatenation3.dimensions().TotalSize())*sizeof(DataType));\n\n  //concatenation = left.concatenate(right, 2);\n  VERIFY_IS_EQUAL(concatenation3.dimension(0), 2);\n  VERIFY_IS_EQUAL(concatenation3.dimension(1), 3);\n  VERIFY_IS_EQUAL(concatenation3.dimension(2), 2);\n  for (IndexType i = 0; i < 2; ++i) {\n    for (IndexType j = 0; j < 3; ++j) {\n      VERIFY_IS_EQUAL(concatenation3(i, j, 0), left(i, j, 0));\n      VERIFY_IS_EQUAL(concatenation3(i, j, 1), right(i, j, 0));\n    }\n  }\n  sycl_device.deallocate(gpu_out_data3);\n  sycl_device.deallocate(gpu_in1_data);\n  sycl_device.deallocate(gpu_in2_data);\n}\ntemplate<typename DataType, int DataLayout, typename IndexType>\nstatic void test_concatenation_as_lvalue(const Eigen::SyclDevice& sycl_device)\n{\n\n  IndexType leftDim1 = 2;\n  IndexType leftDim2 = 3;\n  Eigen::array<IndexType, 2> leftRange = {{leftDim1, leftDim2}};\n\n  IndexType rightDim1 = 2;\n  IndexType rightDim2 = 3;\n  Eigen::array<IndexType, 2> rightRange = {{rightDim1, rightDim2}};\n\n  IndexType concatDim1 = 4;\n  IndexType concatDim2 = 3;\n  Eigen::array<IndexType, 2> resRange = {{concatDim1, concatDim2}};\n\n  Tensor<DataType, 2, DataLayout, IndexType> left(leftRange);\n  Tensor<DataType, 2, DataLayout, IndexType> right(rightRange);\n  Tensor<DataType, 2, DataLayout, IndexType> result(resRange);\n\n  left.setRandom();\n  right.setRandom();\n  result.setRandom();\n\n  DataType * gpu_in1_data  = static_cast<DataType*>(sycl_device.allocate(left.dimensions().TotalSize()*sizeof(DataType)));\n  DataType * gpu_in2_data  = static_cast<DataType*>(sycl_device.allocate(right.dimensions().TotalSize()*sizeof(DataType)));\n  DataType * gpu_out_data =  static_cast<DataType*>(sycl_device.allocate(result.dimensions().TotalSize()*sizeof(DataType)));\n\n\n  Eigen::TensorMap<Eigen::Tensor<DataType, 2, DataLayout, IndexType>> gpu_in1(gpu_in1_data, leftRange);\n  Eigen::TensorMap<Eigen::Tensor<DataType, 2, DataLayout, IndexType>> gpu_in2(gpu_in2_data, rightRange);\n  Eigen::TensorMap<Eigen::Tensor<DataType, 2, DataLayout, IndexType>> gpu_out(gpu_out_data, resRange);\n\n  sycl_device.memcpyHostToDevice(gpu_in1_data, left.data(),(left.dimensions().TotalSize())*sizeof(DataType));\n  sycl_device.memcpyHostToDevice(gpu_in2_data, right.data(),(right.dimensions().TotalSize())*sizeof(DataType));\n  sycl_device.memcpyHostToDevice(gpu_out_data, result.data(),(result.dimensions().TotalSize())*sizeof(DataType));\n\n//  t1.concatenate(t2, 0) = result;\n gpu_in1.concatenate(gpu_in2, 0).device(sycl_device) =gpu_out;\n sycl_device.memcpyDeviceToHost(left.data(), gpu_in1_data,(left.dimensions().TotalSize())*sizeof(DataType));\n sycl_device.memcpyDeviceToHost(right.data(), gpu_in2_data,(right.dimensions().TotalSize())*sizeof(DataType));\n\n  for (IndexType i = 0; i < 2; ++i) {\n    for (IndexType j = 0; j < 3; ++j) {\n      VERIFY_IS_EQUAL(left(i, j), result(i, j));\n      VERIFY_IS_EQUAL(right(i, j), result(i+2, j));\n    }\n  }\n  sycl_device.deallocate(gpu_in1_data);\n  sycl_device.deallocate(gpu_in2_data);\n  sycl_device.deallocate(gpu_out_data);\n}\n\n\ntemplate <typename DataType, typename Dev_selector> void tensorConcat_perDevice(Dev_selector s){\n  QueueInterface queueInterface(s);\n  auto sycl_device = Eigen::SyclDevice(&queueInterface);\n  test_simple_concatenation<DataType, RowMajor, int64_t>(sycl_device);\n  test_simple_concatenation<DataType, ColMajor, int64_t>(sycl_device);\n  test_concatenation_as_lvalue<DataType, ColMajor, int64_t>(sycl_device);\n}\nEIGEN_DECLARE_TEST(cxx11_tensor_concatenation_sycl) {\n  for (const auto& device :Eigen::get_sycl_supported_devices()) {\n    CALL_SUBTEST(tensorConcat_perDevice<float>(device));\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_const.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\nusing Eigen::Tensor;\n\n\nstatic void test_simple_assign()\n{\n  Tensor<int, 3> random(2,3,7);\n  random.setRandom();\n\n  TensorMap<Tensor<const int, 3> > constant(random.data(), 2, 3, 7);\n  Tensor<int, 3> result(2,3,7);\n  result = constant;\n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        VERIFY_IS_EQUAL((result(i,j,k)), random(i,j,k));\n      }\n    }\n  }\n}\n\n\nstatic void test_assign_of_const_tensor()\n{\n  Tensor<int, 3> random(2,3,7);\n  random.setRandom();\n\n  TensorMap<Tensor<const int, 3> > constant1(random.data(), 2, 3, 7);\n  TensorMap<const Tensor<int, 3> > constant2(random.data(), 2, 3, 7);\n  const TensorMap<Tensor<int, 3> > constant3(random.data(), 2, 3, 7);\n\n  Tensor<int, 2> result1 = constant1.chip(0, 2);\n  Tensor<int, 2> result2 = constant2.chip(0, 2);\n  Tensor<int, 2> result3 = constant3.chip(0, 2);\n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      VERIFY_IS_EQUAL((result1(i,j)), random(i,j,0));\n      VERIFY_IS_EQUAL((result2(i,j)), random(i,j,0));\n      VERIFY_IS_EQUAL((result3(i,j)), random(i,j,0));\n    }\n  }\n}\n\n\nEIGEN_DECLARE_TEST(cxx11_tensor_const)\n{\n  CALL_SUBTEST(test_simple_assign());\n  CALL_SUBTEST(test_assign_of_const_tensor());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_contract_gpu.cu",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n// Copyright (C) 2014 Navdeep Jaitly <ndjaitly@google.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_TEST_NO_LONGDOUBLE\n#define EIGEN_TEST_NO_COMPLEX\n\n#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int\n#define EIGEN_USE_GPU\n\n#include \"main.h\"\n#include <unsupported/Eigen/CXX11/Tensor>\n\n#include <unsupported/Eigen/CXX11/src/Tensor/TensorGpuHipCudaDefines.h>\n\nusing Eigen::Tensor;\ntypedef Tensor<float, 1>::DimensionPair DimPair;\n\ntemplate<int DataLayout>\nvoid test_gpu_contraction(int m_size, int k_size, int n_size)\n{\n  std::cout << \"Testing for (\" << m_size << \",\" << k_size << \",\" << n_size << \")\" << std::endl;\n  // with these dimensions, the output has 300 * 140 elements, which is\n  // more than 30 * 1024, which is the number of threads in blocks on\n  // a 15 SM GK110 GPU\n  Tensor<float, 2, DataLayout> t_left(m_size, k_size);\n  Tensor<float, 2, DataLayout> t_right(k_size, n_size);\n  Tensor<float, 2, DataLayout> t_result(m_size, n_size);\n  Tensor<float, 2, DataLayout> t_result_gpu(m_size, n_size);\n  Eigen::array<DimPair, 1> dims(DimPair(1, 0));\n\n  t_left.setRandom();\n  t_right.setRandom();\n\n  std::size_t t_left_bytes = t_left.size()  * sizeof(float);\n  std::size_t t_right_bytes = t_right.size() * sizeof(float);\n  std::size_t t_result_bytes = t_result.size() * sizeof(float);\n\n  float* d_t_left;\n  float* d_t_right;\n  float* d_t_result;\n\n  gpuMalloc((void**)(&d_t_left), t_left_bytes);\n  gpuMalloc((void**)(&d_t_right), t_right_bytes);\n  gpuMalloc((void**)(&d_t_result), t_result_bytes);\n\n  gpuMemcpy(d_t_left, t_left.data(), t_left_bytes, gpuMemcpyHostToDevice);\n  gpuMemcpy(d_t_right, t_right.data(), t_right_bytes, gpuMemcpyHostToDevice);\n\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n\n  Eigen::TensorMap<Eigen::Tensor<float, 2, DataLayout> >\n      gpu_t_left(d_t_left, Eigen::array<int, 2>(m_size, k_size));\n  Eigen::TensorMap<Eigen::Tensor<float, 2, DataLayout> >\n      gpu_t_right(d_t_right, Eigen::array<int, 2>(k_size, n_size));\n  Eigen::TensorMap<Eigen::Tensor<float, 2, DataLayout> >\n      gpu_t_result(d_t_result, Eigen::array<int, 2>(m_size, n_size));\n\n\n  gpu_t_result.device(gpu_device) = gpu_t_left.contract(gpu_t_right, dims);\n  t_result = t_left.contract(t_right, dims);\n\n  gpuMemcpy(t_result_gpu.data(), d_t_result, t_result_bytes, gpuMemcpyDeviceToHost);\n  for (DenseIndex i = 0; i < t_result.size(); i++) {\n    if (fabs(t_result(i) - t_result_gpu(i)) < 1e-4f) {\n      continue;\n    }\n    if (Eigen::internal::isApprox(t_result(i), t_result_gpu(i), 1e-4f)) {\n      continue;\n    }\n    std::cout << \"mismatch detected at index \" << i << \": \" << t_result(i)\n              << \" vs \" <<  t_result_gpu(i) << std::endl;\n    assert(false);\n  }\n\n  gpuFree((void*)d_t_left);\n  gpuFree((void*)d_t_right);\n  gpuFree((void*)d_t_result);\n}\n\n\ntemplate<int DataLayout>\nvoid test_scalar(int m_size, int k_size, int n_size)\n{\n  std::cout << \"Testing for (\" << m_size << \",\" << k_size << \",\" << n_size << \")\" << std::endl;\n  // with these dimensions, the output has 300 * 140 elements, which is\n  // more than 30 * 1024, which is the number of threads in blocks on\n  // a 15 SM GK110 GPU\n  Tensor<float, 2, DataLayout> t_left(m_size, k_size);\n  Tensor<float, 2, DataLayout> t_right(k_size, n_size);\n  Tensor<float, 0, DataLayout> t_result;\n  Tensor<float, 0, DataLayout> t_result_gpu;\n  Eigen::array<DimPair, 2> dims(DimPair(0, 0), DimPair(1, 1));\n\n  t_left.setRandom();\n  t_right.setRandom();\n\n  std::size_t t_left_bytes = t_left.size()  * sizeof(float);\n  std::size_t t_right_bytes = t_right.size() * sizeof(float);\n  std::size_t t_result_bytes = sizeof(float);\n\n  float* d_t_left;\n  float* d_t_right;\n  float* d_t_result;\n\n  gpuMalloc((void**)(&d_t_left), t_left_bytes);\n  gpuMalloc((void**)(&d_t_right), t_right_bytes);\n  gpuMalloc((void**)(&d_t_result), t_result_bytes);\n\n  gpuMemcpy(d_t_left, t_left.data(), t_left_bytes, gpuMemcpyHostToDevice);\n  gpuMemcpy(d_t_right, t_right.data(), t_right_bytes, gpuMemcpyHostToDevice);\n\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n\n  Eigen::TensorMap<Eigen::Tensor<float, 2, DataLayout> >\n      gpu_t_left(d_t_left, m_size, k_size);\n  Eigen::TensorMap<Eigen::Tensor<float, 2, DataLayout> >\n      gpu_t_right(d_t_right, k_size, n_size);\n  Eigen::TensorMap<Eigen::Tensor<float, 0, DataLayout> >\n      gpu_t_result(d_t_result);\n\n  gpu_t_result.device(gpu_device) = gpu_t_left.contract(gpu_t_right, dims);\n  t_result = t_left.contract(t_right, dims);\n\n  gpuMemcpy(t_result_gpu.data(), d_t_result, t_result_bytes, gpuMemcpyDeviceToHost);\n  if (fabs(t_result() - t_result_gpu()) > 1e-4f &&\n      !Eigen::internal::isApprox(t_result(), t_result_gpu(), 1e-4f)) {\n    std::cout << \"mismatch detected: \" << t_result()\n              << \" vs \" <<  t_result_gpu() << std::endl;\n    assert(false);\n  }\n\n  gpuFree((void*)d_t_left);\n  gpuFree((void*)d_t_right);\n  gpuFree((void*)d_t_result);\n}\n\n\ntemplate<int DataLayout>\nvoid test_gpu_contraction_m() {\n  for (int k = 32; k < 256; k++) {\n    test_gpu_contraction<ColMajor>(k, 128, 128);\n    test_gpu_contraction<RowMajor>(k, 128, 128);\n  }\n}\n\ntemplate<int DataLayout>\nvoid test_gpu_contraction_k() {\n  for (int k = 32; k < 256; k++) {\n    test_gpu_contraction<ColMajor>(128, k, 128);\n    test_gpu_contraction<RowMajor>(128, k, 128);\n  }\n}\n\ntemplate<int DataLayout>\nvoid test_gpu_contraction_n() {\n  for (int k = 32; k < 256; k++) {\n    test_gpu_contraction<ColMajor>(128, 128, k);\n    test_gpu_contraction<RowMajor>(128, 128, k);\n  }\n}\n\n\ntemplate<int DataLayout>\nvoid test_gpu_contraction_sizes() {\n  int m_sizes[] = { 31,  39,   63,   64,   65,\n                   127, 129,  255,  257 , 511,\n                   512, 513, 1023, 1024, 1025};\n\n  int n_sizes[] = { 31,  39,   63,   64,   65,\n                   127, 129,  255,  257,  511,\n                   512, 513, 1023, 1024, 1025};\n\n  int k_sizes[] = {  31,   39,  63,  64,   65,\n                     95,   96, 127, 129,  255,\n                    257,  511, 512, 513, 1023,\n                   1024, 1025};\n\n  for (int i = 0; i < 15; i++) {\n    for (int j = 0; j < 15; j++) {\n      for (int k = 0; k < 17; k++) {\n        test_gpu_contraction<DataLayout>(m_sizes[i], n_sizes[j], k_sizes[k]);\n      }\n    }\n  }\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_contract_gpu)\n{\n  CALL_SUBTEST_1(test_gpu_contraction<ColMajor>(128, 128, 128));\n  CALL_SUBTEST_1(test_gpu_contraction<RowMajor>(128, 128, 128));\n\n  CALL_SUBTEST_1(test_scalar<ColMajor>(128, 128, 128));\n  CALL_SUBTEST_1(test_scalar<RowMajor>(128, 128, 128));\n\n  CALL_SUBTEST_2(test_gpu_contraction_m<ColMajor>());\n  CALL_SUBTEST_3(test_gpu_contraction_m<RowMajor>());\n\n  CALL_SUBTEST_4(test_gpu_contraction_k<ColMajor>());\n  CALL_SUBTEST_5(test_gpu_contraction_k<RowMajor>());\n\n  CALL_SUBTEST_6(test_gpu_contraction_n<ColMajor>());\n  CALL_SUBTEST_7(test_gpu_contraction_n<RowMajor>());\n\n#if !defined(EIGEN_USE_HIP)\n// disable these subtests for HIP\n  CALL_SUBTEST_8(test_gpu_contraction_sizes<ColMajor>());\n  CALL_SUBTEST_9(test_gpu_contraction_sizes<RowMajor>());\n#endif\t\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_contract_sycl.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016\n// Mehdi Goli    Codeplay Software Ltd.\n// Ralph Potter  Codeplay Software Ltd.\n// Luke Iwanski  Codeplay Software Ltd.\n// Contact: <eigen@codeplay.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_TEST_NO_LONGDOUBLE\n#define EIGEN_TEST_NO_COMPLEX\n\n#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int64_t\n#define EIGEN_USE_SYCL\n\n#include <algorithm>\n#include <chrono>\n#include <ctime>\n#include <iostream>\n\n#include \"main.h\"\n\n#include <unsupported/Eigen/CXX11/Tensor>\n\nusing Eigen::array;\nusing Eigen::SyclDevice;\nusing Eigen::Tensor;\nusing Eigen::TensorMap;\n\ntemplate <int DataLayout, typename DataType, typename IndexType,\n          typename Device>\nvoid static test_sycl_contraction(const Device &sycl_device, IndexType m_size,\n                                  IndexType k_size, IndexType n_size) {\n  typedef typename Tensor<DataType, 1, DataLayout, IndexType>::DimensionPair\n      DimPair;\n  static const DataType error_threshold = DataType(1e-4);\n  // with these dimensions, the output has 300 * 140 elements, which is\n  // more than 30 * 1024, which is the number of threads in blocks on\n  // a 15 SM GK110 GPU\n  Tensor<DataType, 2, DataLayout, IndexType> t_left(m_size, k_size);\n  Tensor<DataType, 2, DataLayout, IndexType> t_right(k_size, n_size);\n  Tensor<DataType, 2, DataLayout, IndexType> t_result(m_size, n_size);\n  Tensor<DataType, 2, DataLayout, IndexType> t_result_gpu(m_size, n_size);\n  Eigen::array<DimPair, 1> dims = {{DimPair(1, 0)}};\n  Eigen::array<IndexType, 2> left_dims = {{m_size, k_size}};\n  Eigen::array<IndexType, 2> right_dims = {{k_size, n_size}};\n  Eigen::array<IndexType, 2> result_dims = {{m_size, n_size}};\n\n  t_left.setRandom();\n  t_right.setRandom();\n\n  std::size_t t_left_bytes = t_left.size() * sizeof(DataType);\n  std::size_t t_right_bytes = t_right.size() * sizeof(DataType);\n  std::size_t t_result_bytes = t_result.size() * sizeof(DataType);\n\n  DataType *d_t_left =\n      static_cast<DataType *>(sycl_device.allocate(t_left_bytes));\n  DataType *d_t_right =\n      static_cast<DataType *>(sycl_device.allocate(t_right_bytes));\n  DataType *d_t_result =\n      static_cast<DataType *>(sycl_device.allocate(t_result_bytes));\n\n  Eigen::TensorMap<Eigen::Tensor<DataType, 2, DataLayout, IndexType>>\n      gpu_t_left(d_t_left, left_dims);\n  Eigen::TensorMap<Eigen::Tensor<DataType, 2, DataLayout, IndexType>>\n      gpu_t_right(d_t_right, right_dims);\n  Eigen::TensorMap<Eigen::Tensor<DataType, 2, DataLayout, IndexType>>\n      gpu_t_result(d_t_result, result_dims);\n\n  sycl_device.memcpyHostToDevice(d_t_left, t_left.data(), t_left_bytes);\n  sycl_device.memcpyHostToDevice(d_t_right, t_right.data(), t_right_bytes);\n\n  gpu_t_result.device(sycl_device) = gpu_t_left.contract(gpu_t_right, dims);\n  sycl_device.memcpyDeviceToHost(t_result_gpu.data(), d_t_result,\n                                 t_result_bytes);\n\n  t_result = t_left.contract(t_right, dims);\n\n  for (IndexType i = 0; i < t_result.size(); i++) {\n    if (static_cast<DataType>(std::fabs(static_cast<DataType>(\n            t_result(i) - t_result_gpu(i)))) < error_threshold) {\n      continue;\n    }\n    if (Eigen::internal::isApprox(t_result(i), t_result_gpu(i),\n                                  error_threshold)) {\n      continue;\n    }\n\n    std::cout << \"M : \" << m_size << \", N : \" << n_size << \", K : \" << k_size\n              << \", mismatch detected at IndexType \" << i << \": \" << t_result(i)\n              << \" vs \" << t_result_gpu(i) << std::endl;\n    VERIFY_IS_APPROX(t_result_gpu(i), t_result(i));\n  }\n  sycl_device.deallocate(d_t_left);\n  sycl_device.deallocate(d_t_right);\n  sycl_device.deallocate(d_t_result);\n}\n\ntemplate <int DataLayout, typename DataType, typename IndexType,\n          typename Device>\nvoid test_sycl_contraction_m(const Device &sycl_device) {\n  for (IndexType k = 32; k < 256; k++) {\n    test_sycl_contraction<DataLayout, DataType, IndexType>(sycl_device, k, 128,\n                                                           128);\n  }\n}\n\ntemplate <int DataLayout, typename DataType, typename IndexType,\n          typename Device>\nvoid test_sycl_contraction_k(const Device &sycl_device) {\n  for (IndexType k = 32; k < 256; k++) {\n    test_sycl_contraction<DataLayout, DataType, IndexType>(sycl_device, 128, k,\n                                                           128);\n  }\n}\n\ntemplate <int DataLayout, typename DataType, typename IndexType,\n          typename Device>\nvoid test_sycl_contraction_n(const Device &sycl_device) {\n  for (IndexType k = 32; k < 256; k++) {\n    test_sycl_contraction<DataLayout, DataType, IndexType>(sycl_device, 128,\n                                                           128, k);\n  }\n}\n\ntemplate <int DataLayout, typename DataType, typename IndexType,\n          typename Device>\nvoid test_sycl_contraction_sizes(const Device &sycl_device) {\n  IndexType m_sizes[] = {31,  39,  63,  64,  65,   127,  129, 255,\n                         257, 511, 512, 513, 1023, 1024, 1025};\n\n  IndexType n_sizes[] = {31,  39,  63,  64,  65,   127,  129, 255,\n                         257, 511, 512, 513, 1023, 1024, 1025};\n\n  IndexType k_sizes[] = {31,  39,  63,  64,  65,  95,   96,   127, 129,\n                         255, 257, 511, 512, 513, 1023, 1024, 1025};\n\n  for (IndexType i = 0; i < 15; i++) {\n    for (IndexType j = 0; j < 15; j++) {\n      for (IndexType k = 0; k < 17; k++) {\n        test_sycl_contraction<DataLayout, DataType, IndexType>(\n            sycl_device, m_sizes[i], n_sizes[j], k_sizes[k]);\n      }\n    }\n  }\n}\n\ntemplate <int DataLayout, typename DataType, typename IndexType,\n          typename Device>\nvoid static test_no_out_of_bounds(const Device &sycl_device, IndexType m_size,\n                                  IndexType k_size, IndexType n_size) {\n  typedef typename Tensor<DataType, 1, DataLayout, IndexType>::DimensionPair\n      DimPair;\n  static const DataType error_threshold = DataType(1e-4);\n  Tensor<DataType, 2, DataLayout, IndexType> t_left(m_size, k_size);\n  Tensor<DataType, 2, DataLayout, IndexType> t_right(k_size, n_size);\n  Tensor<DataType, 2, DataLayout, IndexType> t_result(m_size, n_size);\n\n  Eigen::array<DimPair, 1> dims = {{DimPair(1, 0)}};\n  Eigen::array<IndexType, 2> left_dims = {{m_size, k_size}};\n  Eigen::array<IndexType, 2> right_dims = {{k_size, n_size}};\n  Eigen::array<IndexType, 2> result_dims = {{m_size, n_size}};\n\n  t_left.setRandom();\n  t_right.setRandom();\n\n  // Allocate buffers twice as big to check for invalid read and write\n  auto padded_left_size = 2 * t_left.size();\n  auto padded_right_size = 2 * t_right.size();\n  auto padded_result_size = 2 * t_result.size();\n\n  std::size_t t_left_bytes = padded_left_size * sizeof(DataType);\n  std::size_t t_right_bytes = padded_right_size * sizeof(DataType);\n  std::size_t t_result_bytes = padded_result_size * sizeof(DataType);\n\n  DataType *d_t_left =\n      static_cast<DataType *>(sycl_device.allocate(t_left_bytes));\n  DataType *d_t_right =\n      static_cast<DataType *>(sycl_device.allocate(t_right_bytes));\n  DataType *d_t_result =\n      static_cast<DataType *>(sycl_device.allocate(t_result_bytes));\n\n  // TensorMaps are still of the same size than the Tensors\n  Eigen::TensorMap<Eigen::Tensor<DataType, 2, DataLayout, IndexType>>\n      gpu_t_left(d_t_left, left_dims);\n  Eigen::TensorMap<Eigen::Tensor<DataType, 2, DataLayout, IndexType>>\n      gpu_t_right(d_t_right, right_dims);\n  Eigen::TensorMap<Eigen::Tensor<DataType, 2, DataLayout, IndexType>>\n      gpu_t_result(d_t_result, result_dims);\n\n  // Write nan after the actual buffer to propagate nans everywhere in case of\n  // invalid reads\n  DataType nan = std::numeric_limits<DataType>::quiet_NaN();\n  auto host_left_data = new DataType[padded_left_size];\n  std::copy_n(t_left.data(), t_left.size(), host_left_data);\n  std::fill_n(host_left_data + t_left.size(), t_left.size(), nan);\n  auto host_right_data = new DataType[padded_right_size];\n  std::copy_n(t_right.data(), t_right.size(), host_right_data);\n  std::fill_n(host_right_data + t_right.size(), t_right.size(), nan);\n  auto host_result_data = new DataType[padded_result_size];\n  std::fill_n(host_result_data, padded_result_size, nan);\n\n  sycl_device.memcpyHostToDevice(d_t_left, host_left_data, t_left_bytes);\n  sycl_device.memcpyHostToDevice(d_t_right, host_right_data, t_right_bytes);\n  sycl_device.memcpyHostToDevice(d_t_result, host_result_data, t_result_bytes);\n\n  gpu_t_result.device(sycl_device) = gpu_t_left.contract(gpu_t_right, dims);\n  sycl_device.memcpyDeviceToHost(host_result_data, d_t_result, t_result_bytes);\n\n  t_result = t_left.contract(t_right, dims);\n\n  for (IndexType i = 0; i < t_result.size(); i++) {\n    if (static_cast<DataType>(std::fabs(static_cast<DataType>(\n            t_result(i) - host_result_data[i]))) < error_threshold) {\n      continue;\n    }\n    if (Eigen::internal::isApprox(t_result(i), host_result_data[i],\n                                  error_threshold)) {\n      continue;\n    }\n    if (std::isnan(host_result_data[i])) {\n      std::cout << \"M : \" << m_size << \", N : \" << n_size << \", K : \" << k_size\n                << \", invalid read detected at IndexType \" << i << \": \"\n                << t_result(i) << \" vs \" << host_result_data[i] << std::endl;\n    } else {\n      std::cout << \"M : \" << m_size << \", N : \" << n_size << \", K : \" << k_size\n                << \", mismatch detected at IndexType \" << i << \": \"\n                << t_result(i) << \" vs \" << host_result_data[i] << std::endl;\n    }\n    VERIFY_IS_APPROX(host_result_data[i], t_result(i));\n  }\n  // Make sure that the rest of the result is still nans\n  for (IndexType i = t_result.size(); i < padded_result_size; i++) {\n    if (std::isnan(host_result_data[i])) {\n      continue;\n    }\n    std::cout << \"M : \" << m_size << \", N : \" << n_size << \", K : \" << k_size\n              << \", invalid write detected at IndexType \" << i << \": \"\n              << host_result_data[i] << std::endl;\n    VERIFY_IS_APPROX(host_result_data[i], t_result(i));\n  }\n  sycl_device.deallocate(d_t_left);\n  sycl_device.deallocate(d_t_right);\n  sycl_device.deallocate(d_t_result);\n\n  delete[] host_left_data;\n  delete[] host_right_data;\n  delete[] host_result_data;\n}\n\ntemplate <int DataLayout, typename DataType, typename IndexType,\n          typename Device>\nvoid test_scalar(const Device &sycl_device, IndexType m_size, IndexType k_size,\n                 IndexType n_size) {\n  // std::cout << \"Testing for (\" << m_size << \",\" << k_size << \",\" << n_size <<\n  // \")\" << std::endl;\n  // with these dimensions, the output has 300 * 140 elements, which is\n  // more than 30 * 1024, which is the number of threads in blocks on\n  // a 15 SM GK110 GPU\n  typedef typename Tensor<DataType, 1, DataLayout, IndexType>::DimensionPair\n      DimPair;\n  static const DataType error_threshold = DataType(1e-4);\n  Tensor<DataType, 2, DataLayout, IndexType> t_left(m_size, k_size);\n  Tensor<DataType, 2, DataLayout, IndexType> t_right(k_size, n_size);\n  Tensor<DataType, 0, DataLayout, IndexType> t_result;\n  Tensor<DataType, 0, DataLayout, IndexType> t_result_gpu;\n  Eigen::array<DimPair, 2> dims = {{DimPair(0, 0), DimPair(1, 1)}};\n  Eigen::array<IndexType, 2> left_dims = {{m_size, k_size}};\n  Eigen::array<IndexType, 2> right_dims = {{k_size, n_size}};\n  t_left.setRandom();\n  t_right.setRandom();\n\n  std::size_t t_left_bytes = t_left.size() * sizeof(DataType);\n  std::size_t t_right_bytes = t_right.size() * sizeof(DataType);\n  std::size_t t_result_bytes = sizeof(DataType);\n\n  DataType *d_t_left =\n      static_cast<DataType *>(sycl_device.allocate(t_left_bytes));\n  DataType *d_t_right =\n      static_cast<DataType *>(sycl_device.allocate(t_right_bytes));\n  DataType *d_t_result =\n      static_cast<DataType *>(sycl_device.allocate(t_result_bytes));\n\n  Eigen::TensorMap<Eigen::Tensor<DataType, 2, DataLayout, IndexType>>\n      gpu_t_left(d_t_left, left_dims);\n  Eigen::TensorMap<Eigen::Tensor<DataType, 2, DataLayout, IndexType>>\n      gpu_t_right(d_t_right, right_dims);\n  Eigen::TensorMap<Eigen::Tensor<DataType, 0, DataLayout, IndexType>>\n      gpu_t_result(d_t_result);\n\n  sycl_device.memcpyHostToDevice(d_t_left, t_left.data(), t_left_bytes);\n  sycl_device.memcpyHostToDevice(d_t_right, t_right.data(), t_right_bytes);\n\n  gpu_t_result.device(sycl_device) = gpu_t_left.contract(gpu_t_right, dims);\n  sycl_device.memcpyDeviceToHost(t_result_gpu.data(), d_t_result,\n                                 t_result_bytes);\n\n  t_result = t_left.contract(t_right, dims);\n\n  if (static_cast<DataType>(std::fabs(static_cast<DataType>(\n          t_result() - t_result_gpu()))) > error_threshold &&\n      !Eigen::internal::isApprox(t_result(), t_result_gpu(), error_threshold)) {\n    std::cout << \"K: \" << k_size << \", N: \" << n_size << \", M: \" << m_size\n              << \" : mismatch detected: \" << t_result() << \" vs \"\n              << t_result_gpu() << std::endl;\n    VERIFY_IS_APPROX(t_result_gpu(), t_result());\n  }\n\n  sycl_device.deallocate(d_t_left);\n  sycl_device.deallocate(d_t_right);\n  sycl_device.deallocate(d_t_result);\n}\n\ntemplate <int DataLayout, typename DataType, typename IndexType,\n          typename Device>\nvoid contraction_batch(const Device &sycl_device, IndexType m_size,\n                       IndexType k_size, IndexType n_size, IndexType m_batch,\n                       IndexType start, IndexType limit) {\n  typedef typename Tensor<DataType, 1, DataLayout, IndexType>::DimensionPair\n      DimPair;\n  static const DataType error_threshold = DataType(1e-4);\n  typedef Eigen::array<IndexType, 3> TensorDim;\n  typedef Eigen::Tensor<DataType, 3, DataLayout, IndexType> TensorType;\n  TensorDim left_dims = {{m_batch, k_size, m_size}};\n  TensorDim right_dims = {{m_batch, n_size, k_size}};\n  TensorDim res_dims = {{m_batch, m_size, n_size}};\n  Eigen::array<DimPair, 1> contract_pairs = {{DimPair(0, 1)}};\n\n  TensorType t_left(left_dims);\n  TensorType t_right(right_dims);\n  TensorType t_result_gpu(res_dims);\n  TensorType t_result(res_dims);\n\n  t_left.setRandom();\n  t_right.setRandom();\n\n  std::size_t t_left_bytes = t_left.size() * sizeof(DataType);\n  std::size_t t_right_bytes = t_right.size() * sizeof(DataType);\n  std::size_t t_result_bytes = t_result.size() * sizeof(DataType);\n\n  DataType *d_t_left =\n      static_cast<DataType *>(sycl_device.allocate(t_left_bytes));\n  DataType *d_t_right =\n      static_cast<DataType *>(sycl_device.allocate(t_right_bytes));\n  DataType *d_t_result =\n      static_cast<DataType *>(sycl_device.allocate(t_result_bytes));\n\n  Eigen::TensorMap<TensorType> gpu_t_left(d_t_left, left_dims);\n  Eigen::TensorMap<TensorType> gpu_t_right(d_t_right, right_dims);\n  Eigen::TensorMap<TensorType> gpu_t_result(d_t_result, res_dims);\n\n  sycl_device.memcpyHostToDevice(d_t_left, t_left.data(), t_left_bytes);\n  sycl_device.memcpyHostToDevice(d_t_right, t_right.data(), t_right_bytes);\n  for (int i = start; i < limit; ++i) {\n    auto x = gpu_t_left.template chip<0>(i);\n    auto y = gpu_t_right.template chip<0>(i);\n    auto z = gpu_t_result.template chip<0>(i);\n    z.device(sycl_device) = x.contract(y, contract_pairs);\n  }\n  sycl_device.memcpyDeviceToHost(t_result_gpu.data(), d_t_result,\n                                 t_result_bytes);\n\n  for (int i = start; i < limit; ++i) {\n    auto x = t_left.template chip<0>(i);\n    auto y = t_right.template chip<0>(i);\n    auto z = t_result.template chip<0>(i);\n    z = x.contract(y, contract_pairs);\n  }\n\n  for (IndexType i = 0; i < t_result.size(); i++) {\n    if (static_cast<DataType>(std::fabs(static_cast<DataType>(\n            t_result(i) - t_result_gpu(i)))) < error_threshold) {\n      continue;\n    }\n    if (Eigen::internal::isApprox(t_result(i), t_result_gpu(i),\n                                  error_threshold)) {\n      continue;\n    }\n    std::cout << \"mismatch detected at IndexType \" << i << \": \" << t_result(i)\n              << \" vs \" << t_result_gpu(i) << std::endl;\n    VERIFY_IS_APPROX(t_result_gpu(i), t_result(i));\n  }\n  sycl_device.deallocate(d_t_left);\n  sycl_device.deallocate(d_t_right);\n  sycl_device.deallocate(d_t_result);\n}\n\ntemplate <int DataLayout, typename DataType, typename IndexType,\n          typename Device>\nvoid contraction_rhs_transposed(const Device &sycl_device, IndexType m_size,\n                                IndexType k_size, IndexType n_size) {\n  typedef typename Tensor<DataType, 1, DataLayout, IndexType>::DimensionPair\n      DimPair;\n  static const DataType error_threshold = DataType(1e-4);\n  Eigen::array<IndexType, 2> left_dims = {{m_size, k_size}};\n  Eigen::array<IndexType, 2> right_dims = {{n_size, k_size}};\n  Eigen::array<IndexType, 2> res_dims = {{m_size, n_size}};\n  Eigen::array<DimPair, 1> dims = {{DimPair(1, 1)}};\n\n  Tensor<DataType, 2, DataLayout, IndexType> t_left(left_dims);\n  Tensor<DataType, 2, DataLayout, IndexType> t_right(right_dims);\n  Tensor<DataType, 2, DataLayout, IndexType> t_result_gpu(res_dims);\n  Tensor<DataType, 2, DataLayout, IndexType> t_result(res_dims);\n\n  t_left.setRandom();\n  t_right.setRandom();\n\n  std::size_t t_left_bytes = t_left.size() * sizeof(DataType);\n  std::size_t t_right_bytes = t_right.size() * sizeof(DataType);\n  std::size_t t_result_bytes = t_result.size() * sizeof(DataType);\n\n  DataType *d_t_left =\n      static_cast<DataType *>(sycl_device.allocate(t_left_bytes));\n  DataType *d_t_right =\n      static_cast<DataType *>(sycl_device.allocate(t_right_bytes));\n  DataType *d_t_result =\n      static_cast<DataType *>(sycl_device.allocate(t_result_bytes));\n\n  Eigen::TensorMap<Eigen::Tensor<DataType, 2, DataLayout, IndexType>>\n      gpu_t_left(d_t_left, left_dims);\n  Eigen::TensorMap<Eigen::Tensor<DataType, 2, DataLayout, IndexType>>\n      gpu_t_right(d_t_right, right_dims);\n  Eigen::TensorMap<Eigen::Tensor<DataType, 2, DataLayout, IndexType>>\n      gpu_t_result(d_t_result, res_dims);\n\n  sycl_device.memcpyHostToDevice(d_t_left, t_left.data(), t_left_bytes);\n  sycl_device.memcpyHostToDevice(d_t_right, t_right.data(), t_right_bytes);\n\n  gpu_t_result.device(sycl_device) = gpu_t_left.contract(gpu_t_right, dims);\n  sycl_device.memcpyDeviceToHost(t_result_gpu.data(), d_t_result,\n                                 t_result_bytes);\n\n  t_result = t_left.contract(t_right, dims);\n\n  for (IndexType j = 0; j < m_size; j++) {\n    for (IndexType i = 0; i < n_size; i++) {\n      if (static_cast<DataType>(std::fabs(static_cast<DataType>(\n              t_result(j, i) - t_result_gpu(j, i)))) < error_threshold) {\n        continue;\n      }\n      if (Eigen::internal::isApprox(t_result(j, i), t_result_gpu(j, i),\n                                    error_threshold)) {\n        continue;\n      }\n      std::cout << \"M : \" << m_size << \", N : \" << n_size << \", K : \" << k_size\n                << \", mismatch detected at IndexType m: \" << j << \" n: \" << i\n                << \" CPU : \" << t_result(j, i)\n                << \" vs SYCL:\" << t_result_gpu(j, i) << std::endl;\n      VERIFY_IS_APPROX(t_result_gpu(j, i), t_result(j, i));\n    }\n  }\n  sycl_device.deallocate(d_t_left);\n  sycl_device.deallocate(d_t_right);\n  sycl_device.deallocate(d_t_result);\n}\n\ntemplate <int DataLayout, typename DataType, typename IndexType,\n          typename Device>\nvoid contraction_lhs_transposed(const Device &sycl_device, IndexType m_size,\n                                IndexType k_size, IndexType n_size) {\n  typedef typename Tensor<DataType, 1, DataLayout, IndexType>::DimensionPair\n      DimPair;\n  static const DataType error_threshold = DataType(1e-4);\n  Eigen::array<IndexType, 2> left_dims = {{k_size, m_size}};\n  Eigen::array<IndexType, 2> right_dims = {{k_size, n_size}};\n  Eigen::array<IndexType, 2> res_dims = {{m_size, n_size}};\n  Eigen::array<DimPair, 1> dims = {{DimPair(0, 0)}};\n\n  Tensor<DataType, 2, DataLayout, IndexType> t_left(left_dims);\n  Tensor<DataType, 2, DataLayout, IndexType> t_right(right_dims);\n  Tensor<DataType, 2, DataLayout, IndexType> t_result_gpu(res_dims);\n  Tensor<DataType, 2, DataLayout, IndexType> t_result(res_dims);\n\n  t_left.setRandom();\n  t_right.setRandom();\n\n  std::size_t t_left_bytes = t_left.size() * sizeof(DataType);\n  std::size_t t_right_bytes = t_right.size() * sizeof(DataType);\n  std::size_t t_result_bytes = t_result.size() * sizeof(DataType);\n\n  DataType *d_t_left =\n      static_cast<DataType *>(sycl_device.allocate(t_left_bytes));\n  DataType *d_t_right =\n      static_cast<DataType *>(sycl_device.allocate(t_right_bytes));\n  DataType *d_t_result =\n      static_cast<DataType *>(sycl_device.allocate(t_result_bytes));\n\n  Eigen::TensorMap<Eigen::Tensor<DataType, 2, DataLayout, IndexType>>\n      gpu_t_left(d_t_left, left_dims);\n  Eigen::TensorMap<Eigen::Tensor<DataType, 2, DataLayout, IndexType>>\n      gpu_t_right(d_t_right, right_dims);\n  Eigen::TensorMap<Eigen::Tensor<DataType, 2, DataLayout, IndexType>>\n      gpu_t_result(d_t_result, res_dims);\n\n  sycl_device.memcpyHostToDevice(d_t_left, t_left.data(), t_left_bytes);\n  sycl_device.memcpyHostToDevice(d_t_right, t_right.data(), t_right_bytes);\n\n  gpu_t_result.device(sycl_device) = gpu_t_left.contract(gpu_t_right, dims);\n  sycl_device.memcpyDeviceToHost(t_result_gpu.data(), d_t_result,\n                                 t_result_bytes);\n\n  t_result = t_left.contract(t_right, dims);\n\n  for (IndexType i = 0; i < t_result.size(); i++) {\n    if (static_cast<DataType>(std::fabs(static_cast<DataType>(\n            t_result(i) - t_result_gpu(i)))) < error_threshold) {\n      continue;\n    }\n    if (Eigen::internal::isApprox(t_result(i), t_result_gpu(i),\n                                  error_threshold)) {\n      continue;\n    }\n    std::cout << \"M : \" << m_size << \", N : \" << n_size << \", K : \" << k_size\n              << \", mismatch detected at IndexType \" << i << \": \" << t_result(i)\n              << \" vs \" << t_result_gpu(i) << std::endl;\n    VERIFY_IS_APPROX(t_result_gpu(i), t_result(i));\n  }\n  sycl_device.deallocate(d_t_left);\n  sycl_device.deallocate(d_t_right);\n  sycl_device.deallocate(d_t_result);\n}\n\ntemplate <int DataLayout, typename DataType, typename IndexType,\n          typename Device>\nvoid contraction_both_transposed(const Device &sycl_device, IndexType m_size,\n                                 IndexType k_size, IndexType n_size) {\n  typedef typename Tensor<DataType, 1, DataLayout, IndexType>::DimensionPair\n      DimPair;\n  static const DataType error_threshold = DataType(1e-4);\n  Eigen::array<IndexType, 2> left_dims = {{k_size, m_size}};\n  Eigen::array<IndexType, 2> right_dims = {{n_size, k_size}};\n  Eigen::array<IndexType, 2> res_dims = {{m_size, n_size}};\n  Eigen::array<DimPair, 1> dims = {{DimPair(0, 1)}};\n\n  Tensor<DataType, 2, DataLayout, IndexType> t_left(left_dims);\n  Tensor<DataType, 2, DataLayout, IndexType> t_right(right_dims);\n  Tensor<DataType, 2, DataLayout, IndexType> t_result_gpu(res_dims);\n  Tensor<DataType, 2, DataLayout, IndexType> t_result(res_dims);\n\n  t_left.setRandom();\n  t_right.setRandom();\n\n  std::size_t t_left_bytes = t_left.size() * sizeof(DataType);\n  std::size_t t_right_bytes = t_right.size() * sizeof(DataType);\n  std::size_t t_result_bytes = t_result.size() * sizeof(DataType);\n\n  DataType *d_t_left =\n      static_cast<DataType *>(sycl_device.allocate(t_left_bytes));\n  DataType *d_t_right =\n      static_cast<DataType *>(sycl_device.allocate(t_right_bytes));\n  DataType *d_t_result =\n      static_cast<DataType *>(sycl_device.allocate(t_result_bytes));\n\n  Eigen::TensorMap<Eigen::Tensor<DataType, 2, DataLayout, IndexType>>\n      gpu_t_left(d_t_left, left_dims);\n  Eigen::TensorMap<Eigen::Tensor<DataType, 2, DataLayout, IndexType>>\n      gpu_t_right(d_t_right, right_dims);\n  Eigen::TensorMap<Eigen::Tensor<DataType, 2, DataLayout, IndexType>>\n      gpu_t_result(d_t_result, res_dims);\n\n  sycl_device.memcpyHostToDevice(d_t_left, t_left.data(), t_left_bytes);\n  sycl_device.memcpyHostToDevice(d_t_right, t_right.data(), t_right_bytes);\n\n  gpu_t_result.device(sycl_device) = gpu_t_left.contract(gpu_t_right, dims);\n  sycl_device.memcpyDeviceToHost(t_result_gpu.data(), d_t_result,\n                                 t_result_bytes);\n\n  t_result = t_left.contract(t_right, dims);\n\n  for (IndexType i = 0; i < t_result.size(); i++) {\n    if (static_cast<DataType>(std::fabs(static_cast<DataType>(\n            t_result(i) - t_result_gpu(i)))) < error_threshold) {\n      continue;\n    }\n    if (Eigen::internal::isApprox(t_result(i), t_result_gpu(i),\n                                  error_threshold)) {\n      continue;\n    }\n    std::cout << \"M : \" << m_size << \", N : \" << n_size << \", K : \" << k_size\n              << \", mismatch detected at IndexType \" << i << \": \" << t_result(i)\n              << \" vs \" << t_result_gpu(i) << std::endl;\n\n    VERIFY_IS_APPROX(t_result_gpu(i), t_result(i));\n  }\n  sycl_device.deallocate(d_t_left);\n  sycl_device.deallocate(d_t_right);\n  sycl_device.deallocate(d_t_result);\n}\n\ntemplate <typename Dev>\nvoid inline tensorOutofBound(const Dev &sycl_device) {\n  typedef float DataType;\n  typedef int64_t IndexType;\n  std::chrono::time_point<std::chrono::system_clock> start, end;\n  start = std::chrono::system_clock::now();\n  // Test out of bound for Tensor-Tensor\n  test_no_out_of_bounds<RowMajor, DataType, IndexType>(sycl_device, 10, 1024,\n                                                       1024);\n  test_no_out_of_bounds<RowMajor, DataType, IndexType>(sycl_device, 1024, 1024,\n                                                       4096);\n  test_no_out_of_bounds<RowMajor, DataType, IndexType>(sycl_device, 4096, 1024,\n                                                       2048);\n  test_no_out_of_bounds<ColMajor, DataType, IndexType>(sycl_device, 784, 2048,\n                                                       1024);\n  test_no_out_of_bounds<ColMajor, DataType, IndexType>(sycl_device, 2048, 1024,\n                                                       784);\n  test_no_out_of_bounds<RowMajor, DataType, IndexType>(sycl_device, 10, 1024,\n                                                       10);\n  test_no_out_of_bounds<RowMajor, DataType, IndexType>(sycl_device, 513, 4096,\n                                                       513);\n  test_no_out_of_bounds<RowMajor, DataType, IndexType>(sycl_device, 783, 1024,\n                                                       783);\n  test_no_out_of_bounds<ColMajor, DataType, IndexType>(sycl_device, 784, 2048,\n                                                       784);\n  test_no_out_of_bounds<ColMajor, DataType, IndexType>(sycl_device, 11, 1024,\n                                                       11);\n  end = std::chrono::system_clock::now();\n  std::chrono::duration<double> elapsed_seconds = end - start;\n  std::time_t end_time = std::chrono::system_clock::to_time_t(end);\n  std::cout << \"tensor out of bound tests finished computation at \"\n            << std::ctime(&end_time)\n            << \"elapsed time: \" << elapsed_seconds.count() << \"s\\n\";\n}\n\ntemplate <typename Dev>\nvoid inline tensorTensor(const Dev &sycl_device) {\n  typedef float DataType;\n  typedef int64_t IndexType;\n  std::chrono::time_point<std::chrono::system_clock> start, end;\n  start = std::chrono::system_clock::now();\n  // Tensor Tensor Contraction\n  test_sycl_contraction<ColMajor, DataType, IndexType>(sycl_device, 128, 128,\n                                                       128);\n  test_sycl_contraction<RowMajor, DataType, IndexType>(sycl_device, 128, 128,\n                                                       128);\n  end = std::chrono::system_clock::now();\n  std::chrono::duration<double> elapsed_seconds = end - start;\n  std::time_t end_time = std::chrono::system_clock::to_time_t(end);\n  std::cout << \"tensor tensor tests finished computation at \"\n            << std::ctime(&end_time)\n            << \"elapsed time: \" << elapsed_seconds.count() << \"s\\n\";\n}\n\ntemplate <typename Dev>\nvoid inline tensorTensor_m(const Dev &sycl_device) {\n  typedef float DataType;\n  typedef int64_t IndexType;\n  std::chrono::time_point<std::chrono::system_clock> start, end;\n  start = std::chrono::system_clock::now();\n  // Tensor Tensor Contraction\n  test_sycl_contraction_m<ColMajor, DataType, IndexType>(sycl_device);\n  test_sycl_contraction_m<RowMajor, DataType, IndexType>(sycl_device);\n\n  end = std::chrono::system_clock::now();\n  std::chrono::duration<double> elapsed_seconds = end - start;\n  std::time_t end_time = std::chrono::system_clock::to_time_t(end);\n  std::cout << \"tensor tensor tests finished computation at \"\n            << std::ctime(&end_time)\n            << \"elapsed time: \" << elapsed_seconds.count() << \"s\\n\";\n}\n\ntemplate <typename Dev>\nvoid inline tensorTensor_n(const Dev &sycl_device) {\n  typedef float DataType;\n  typedef int64_t IndexType;\n  std::chrono::time_point<std::chrono::system_clock> start, end;\n  start = std::chrono::system_clock::now();\n  // Tensor Tensor Contraction\n  test_sycl_contraction_n<ColMajor, DataType, IndexType>(sycl_device);\n  test_sycl_contraction_n<RowMajor, DataType, IndexType>(sycl_device);\n\n  end = std::chrono::system_clock::now();\n  std::chrono::duration<double> elapsed_seconds = end - start;\n  std::time_t end_time = std::chrono::system_clock::to_time_t(end);\n  std::cout << \"tensor tensor tests finished computation at \"\n            << std::ctime(&end_time)\n            << \"elapsed time: \" << elapsed_seconds.count() << \"s\\n\";\n}\n\ntemplate <typename Dev>\nvoid inline tensorTensor_k(const Dev &sycl_device) {\n  typedef float DataType;\n  typedef int64_t IndexType;\n  std::chrono::time_point<std::chrono::system_clock> start, end;\n  start = std::chrono::system_clock::now();\n  test_sycl_contraction_k<ColMajor, DataType, IndexType>(sycl_device);\n  test_sycl_contraction_k<RowMajor, DataType, IndexType>(sycl_device);\n\n  end = std::chrono::system_clock::now();\n  std::chrono::duration<double> elapsed_seconds = end - start;\n  std::time_t end_time = std::chrono::system_clock::to_time_t(end);\n  std::cout << \"tensor tensor tests finished computation at \"\n            << std::ctime(&end_time)\n            << \"elapsed time: \" << elapsed_seconds.count() << \"s\\n\";\n}\n\ntemplate <typename Dev>\nvoid inline tensorTensor_sizes(const Dev &sycl_device) {\n  typedef float DataType;\n  typedef int64_t IndexType;\n  std::chrono::time_point<std::chrono::system_clock> start, end;\n  start = std::chrono::system_clock::now();\n  // Tensor Tensor Contraction\n  test_sycl_contraction_sizes<ColMajor, DataType, IndexType>(sycl_device);\n  test_sycl_contraction_sizes<RowMajor, DataType, IndexType>(sycl_device);\n\n  end = std::chrono::system_clock::now();\n  std::chrono::duration<double> elapsed_seconds = end - start;\n  std::time_t end_time = std::chrono::system_clock::to_time_t(end);\n  std::cout << \"tensor tensor tests finished computation at \"\n            << std::ctime(&end_time)\n            << \"elapsed time: \" << elapsed_seconds.count() << \"s\\n\";\n}\ntemplate <typename Dev>\nvoid inline vectorVector(const Dev &sycl_device) {\n  typedef float DataType;\n  typedef int64_t IndexType;\n  std::chrono::time_point<std::chrono::system_clock> start, end;\n  start = std::chrono::system_clock::now();\n  // VECTOR-VECTOR\n  test_sycl_contraction<ColMajor, DataType, IndexType>(sycl_device, 1025, 1,\n                                                       1025);\n  test_sycl_contraction<RowMajor, DataType, IndexType>(sycl_device, 1025, 1,\n                                                       1025);\n  test_sycl_contraction<ColMajor, DataType, IndexType>(sycl_device, 1024, 1,\n                                                       1024);\n  test_sycl_contraction<RowMajor, DataType, IndexType>(sycl_device, 1024, 1,\n                                                       1024);\n  test_sycl_contraction<ColMajor, DataType, IndexType>(sycl_device, 1023, 1,\n                                                       1023);\n  test_sycl_contraction<RowMajor, DataType, IndexType>(sycl_device, 1023, 1,\n                                                       1023);\n\n  end = std::chrono::system_clock::now();\n  std::chrono::duration<double> elapsed_seconds = end - start;\n  std::time_t end_time = std::chrono::system_clock::to_time_t(end);\n  std::cout << \"contracted tensor tests finished computation at \"\n            << std::ctime(&end_time)\n            << \"elapsed time: \" << elapsed_seconds.count() << \"s\\n\";\n}\n\ntemplate <typename Dev>\nvoid inline vectorTensor(const Dev &sycl_device) {\n  typedef float DataType;\n  typedef int64_t IndexType;\n  std::chrono::time_point<std::chrono::system_clock> start, end;\n  start = std::chrono::system_clock::now();\n  // Vector-Tensor\n  test_sycl_contraction<ColMajor, DataType, IndexType>(sycl_device, 1, 1025,\n                                                       1025);\n  test_sycl_contraction<RowMajor, DataType, IndexType>(sycl_device, 1, 1025,\n                                                       1025);\n  test_sycl_contraction<ColMajor, DataType, IndexType>(sycl_device, 1, 1024,\n                                                       1024);\n  test_sycl_contraction<RowMajor, DataType, IndexType>(sycl_device, 1, 1024,\n                                                       1024);\n  test_sycl_contraction<ColMajor, DataType, IndexType>(sycl_device, 1, 1023,\n                                                       1023);\n  test_sycl_contraction<RowMajor, DataType, IndexType>(sycl_device, 1, 1023,\n                                                       1023);\n\n  test_sycl_contraction<ColMajor, DataType, IndexType>(sycl_device, 1, 4097,\n                                                       4097);\n  test_sycl_contraction<RowMajor, DataType, IndexType>(sycl_device, 1, 4097,\n                                                       4097);\n  test_sycl_contraction<ColMajor, DataType, IndexType>(sycl_device, 1, 4096,\n                                                       4096);\n  test_sycl_contraction<RowMajor, DataType, IndexType>(sycl_device, 1, 4096,\n                                                       4096);\n  test_sycl_contraction<ColMajor, DataType, IndexType>(sycl_device, 1, 4095,\n                                                       4095);\n  test_sycl_contraction<RowMajor, DataType, IndexType>(sycl_device, 1, 4095,\n                                                       4095);\n  test_sycl_contraction<ColMajor, DataType, IndexType>(sycl_device, 1, 802816,\n                                                       32);\n\n  end = std::chrono::system_clock::now();\n  std::chrono::duration<double> elapsed_seconds = end - start;\n  std::time_t end_time = std::chrono::system_clock::to_time_t(end);\n  std::cout << \"finished computation at \" << std::ctime(&end_time)\n            << \"elapsed time: \" << elapsed_seconds.count() << \"s\\n\";\n}\n\ntemplate <typename Dev>\nvoid inline tensorVector(const Dev &sycl_device) {\n  typedef float DataType;\n  typedef int64_t IndexType;\n  std::chrono::time_point<std::chrono::system_clock> start, end;\n  start = std::chrono::system_clock::now();\n  // Matrix-Vector\n  test_sycl_contraction<ColMajor, DataType, IndexType>(sycl_device, 1025, 1025,\n                                                       1);\n  test_sycl_contraction<RowMajor, DataType, IndexType>(sycl_device, 1125, 1025,\n                                                       1);\n  test_sycl_contraction<ColMajor, DataType, IndexType>(sycl_device, 1224, 1024,\n                                                       1);\n  test_sycl_contraction<RowMajor, DataType, IndexType>(sycl_device, 1024, 1024,\n                                                       1);\n  test_sycl_contraction<ColMajor, DataType, IndexType>(sycl_device, 1023, 1023,\n                                                       1);\n  test_sycl_contraction<RowMajor, DataType, IndexType>(sycl_device, 1023, 1023,\n                                                       1);\n  test_sycl_contraction<ColMajor, DataType, IndexType>(sycl_device, 4097, 4197,\n                                                       1);\n  test_sycl_contraction<RowMajor, DataType, IndexType>(sycl_device, 4097, 4097,\n                                                       1);\n  test_sycl_contraction<ColMajor, DataType, IndexType>(sycl_device, 4096, 4096,\n                                                       1);\n  test_sycl_contraction<RowMajor, DataType, IndexType>(sycl_device, 4096, 8196,\n                                                       1);\n  test_sycl_contraction<ColMajor, DataType, IndexType>(sycl_device, 4095, 4095,\n                                                       1);\n  test_sycl_contraction<RowMajor, DataType, IndexType>(sycl_device, 4095, 4095,\n                                                       1);\n// If the GEMV disabled it will creates one kernel to calculate the contraction.\n// Therefore the acumuation of float number will overflow the precision\n// threshold for float and cause the test to fail. While it the GMV multiple\n// kernel will be created and each one run the overflow of accumutation breaks\n// among the kernels.\n#ifndef EIGEN_SYCL_DISABLE_GEMV\n  test_sycl_contraction<ColMajor, DataType, IndexType>(sycl_device, 32, 802032,\n                                                       1);\n#endif\n\n  end = std::chrono::system_clock::now();\n  std::chrono::duration<double> elapsed_seconds = end - start;\n  std::time_t end_time = std::chrono::system_clock::to_time_t(end);\n  std::cout << \"finished computation at \" << std::ctime(&end_time)\n            << \"elapsed time: \" << elapsed_seconds.count() << \"s\\n\";\n}\n\ntemplate <typename Dev>\nvoid inline tensorScalar(const Dev &sycl_device) {\n  typedef float DataType;\n  typedef int64_t IndexType;\n  std::chrono::time_point<std::chrono::system_clock> start, end;\n  start = std::chrono::system_clock::now();\n  // SCALAR Contraction\n  test_scalar<ColMajor, DataType, IndexType>(sycl_device, 127, 127, 127);\n  test_scalar<RowMajor, DataType, IndexType>(sycl_device, 127, 127, 127);\n  test_scalar<ColMajor, DataType, IndexType>(sycl_device, 128, 128, 128);\n  test_scalar<RowMajor, DataType, IndexType>(sycl_device, 128, 128, 128);\n  test_scalar<ColMajor, DataType, IndexType>(sycl_device, 129, 129, 129);\n  test_scalar<RowMajor, DataType, IndexType>(sycl_device, 129, 129, 129);\n\n  end = std::chrono::system_clock::now();\n  std::chrono::duration<double> elapsed_seconds = end - start;\n  std::time_t end_time = std::chrono::system_clock::to_time_t(end);\n  std::cout << \"finished computation at \" << std::ctime(&end_time)\n            << \"elapsed time: \" << elapsed_seconds.count() << \"s\\n\";\n}\n\ntemplate <typename Dev>\nvoid inline skinnyTensor_row(const Dev &sycl_device) {\n  typedef float DataType;\n  typedef int64_t IndexType;\n  std::chrono::time_point<std::chrono::system_clock> start, end;\n  start = std::chrono::system_clock::now();\n  // Tensor Tensor Contraction\n  test_sycl_contraction<RowMajor, DataType, IndexType>(sycl_device, 16, 4, 16);\n  test_sycl_contraction<RowMajor, DataType, IndexType>(sycl_device, 257, 131073,\n                                                       257);\n  test_sycl_contraction<RowMajor, DataType, IndexType>(sycl_device, 256, 131072,\n                                                       256);\n  test_sycl_contraction<RowMajor, DataType, IndexType>(sycl_device, 16, 131073,\n                                                       16);\n  test_sycl_contraction<RowMajor, DataType, IndexType>(sycl_device, 17, 131072,\n                                                       17);\n  end = std::chrono::system_clock::now();\n  std::chrono::duration<double> elapsed_seconds = end - start;\n  std::time_t end_time = std::chrono::system_clock::to_time_t(end);\n  std::cout << \"finished computation at \" << std::ctime(&end_time)\n            << \"elapsed time: \" << elapsed_seconds.count() << \"s\\n\";\n}\n\ntemplate <typename Dev>\nvoid inline skinnyTensor_col(const Dev &sycl_device) {\n  typedef float DataType;\n  typedef int64_t IndexType;\n  std::chrono::time_point<std::chrono::system_clock> start, end;\n  start = std::chrono::system_clock::now();\n  // Tensor Tensor Contraction\n  test_sycl_contraction<ColMajor, DataType, IndexType>(sycl_device, 16, 4, 16);\n  test_sycl_contraction<ColMajor, DataType, IndexType>(sycl_device, 257, 131073,\n                                                       257);\n  test_sycl_contraction<ColMajor, DataType, IndexType>(sycl_device, 256, 131072,\n                                                       256);\n  test_sycl_contraction<ColMajor, DataType, IndexType>(sycl_device, 16, 131073,\n                                                       16);\n  test_sycl_contraction<ColMajor, DataType, IndexType>(sycl_device, 17, 131072,\n                                                       17);\n  end = std::chrono::system_clock::now();\n  std::chrono::duration<double> elapsed_seconds = end - start;\n  std::time_t end_time = std::chrono::system_clock::to_time_t(end);\n  std::cout << \"finished computation at \" << std::ctime(&end_time)\n            << \"elapsed time: \" << elapsed_seconds.count() << \"s\\n\";\n}\n\ntemplate <typename Dev>\nvoid inline tensor_contraction_batch_per_device(const Dev &sycl_device) {\n  typedef float DataType;\n  typedef int64_t IndexType;\n  std::chrono::time_point<std::chrono::system_clock> start, end;\n  start = std::chrono::system_clock::now();\n\n  contraction_batch<RowMajor, DataType, IndexType>(sycl_device, 64, 75, 30, 4,\n                                                   0, 4);\n  contraction_batch<ColMajor, DataType, IndexType>(sycl_device, 64, 75, 30, 4,\n                                                   0, 4);\n  end = std::chrono::system_clock::now();\n  std::chrono::duration<double> elapsed_seconds = end - start;\n  std::time_t end_time = std::chrono::system_clock::to_time_t(end);\n  std::cout << \"finished computation at \" << std::ctime(&end_time)\n            << \"elapsed time: \" << elapsed_seconds.count() << \"s\\n\";\n}\n\ntemplate <typename Dev>\nvoid inline tensor_contraction_lhs_transposed_per_device(\n    const Dev &sycl_device) {\n  typedef float DataType;\n  typedef int64_t IndexType;\n  std::chrono::time_point<std::chrono::system_clock> start, end;\n  start = std::chrono::system_clock::now();\n\n  contraction_lhs_transposed<RowMajor, DataType, IndexType>(sycl_device, 8, 4,\n                                                            8);\n  contraction_lhs_transposed<RowMajor, DataType, IndexType>(sycl_device, 32, 8,\n                                                            32);\n  contraction_lhs_transposed<RowMajor, DataType, IndexType>(sycl_device, 64, 16,\n                                                            64);\n  contraction_lhs_transposed<RowMajor, DataType, IndexType>(sycl_device, 784,\n                                                            2048, 1024);\n  contraction_lhs_transposed<RowMajor, DataType, IndexType>(sycl_device, 1024,\n                                                            10, 1024);\n  contraction_lhs_transposed<RowMajor, DataType, IndexType>(sycl_device, 4096,\n                                                            1024, 1024);\n  contraction_lhs_transposed<RowMajor, DataType, IndexType>(sycl_device, 2048,\n                                                            4096, 1024);\n  end = std::chrono::system_clock::now();\n  std::chrono::duration<double> elapsed_seconds = end - start;\n  std::time_t end_time = std::chrono::system_clock::to_time_t(end);\n  std::cout << \"finished computation at \" << std::ctime(&end_time)\n            << \"elapsed time: \" << elapsed_seconds.count() << \"s\\n\";\n}\n\ntemplate <typename Dev>\nvoid inline tensor_contraction_rhs_transposed_per_device(\n    const Dev &sycl_device) {\n  typedef float DataType;\n  typedef int64_t IndexType;\n  std::chrono::time_point<std::chrono::system_clock> start, end;\n  start = std::chrono::system_clock::now();\n\n  contraction_rhs_transposed<RowMajor, DataType, IndexType>(sycl_device, 16, 4,\n                                                            16);\n  contraction_rhs_transposed<RowMajor, DataType, IndexType>(sycl_device, 17, 5,\n                                                            17);\n  contraction_rhs_transposed<RowMajor, DataType, IndexType>(sycl_device, 32, 8,\n                                                            32);\n  contraction_rhs_transposed<RowMajor, DataType, IndexType>(sycl_device, 64, 16,\n                                                            64);\n  contraction_rhs_transposed<RowMajor, DataType, IndexType>(sycl_device, 10,\n                                                            1024, 1024);\n  contraction_rhs_transposed<RowMajor, DataType, IndexType>(sycl_device, 1024,\n                                                            1024, 4096);\n  contraction_rhs_transposed<RowMajor, DataType, IndexType>(sycl_device, 4096,\n                                                            1024, 2048);\n  contraction_rhs_transposed<RowMajor, DataType, IndexType>(sycl_device, 2048,\n                                                            1024, 784);\n  end = std::chrono::system_clock::now();\n  std::chrono::duration<double> elapsed_seconds = end - start;\n  std::time_t end_time = std::chrono::system_clock::to_time_t(end);\n  std::cout << \"finished computation at \" << std::ctime(&end_time)\n            << \"elapsed time: \" << elapsed_seconds.count() << \"s\\n\";\n}\n\ntemplate <typename Dev>\nvoid inline tensor_contraction_both_transposed_per_device(\n    const Dev &sycl_device) {\n  typedef float DataType;\n  typedef int64_t IndexType;\n  std::chrono::time_point<std::chrono::system_clock> start, end;\n  start = std::chrono::system_clock::now();\n\n  contraction_both_transposed<RowMajor, DataType, IndexType>(sycl_device, 17, 5,\n                                                             17);\n  contraction_both_transposed<RowMajor, DataType, IndexType>(sycl_device, 32, 8,\n                                                             32);\n  contraction_both_transposed<RowMajor, DataType, IndexType>(sycl_device, 64,\n                                                             16, 64);\n  end = std::chrono::system_clock::now();\n  std::chrono::duration<double> elapsed_seconds = end - start;\n  std::time_t end_time = std::chrono::system_clock::to_time_t(end);\n  std::cout << \"finished computation at \" << std::ctime(&end_time)\n            << \"elapsed time: \" << elapsed_seconds.count() << \"s\\n\";\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_contract_sycl) {\n  for (const auto &device : Eigen::get_sycl_supported_devices()) {\n    std::cout << \"Running on \"\n              << device.template get_info<cl::sycl::info::device::name>()\n              << std::endl;\n    QueueInterface queueInterface(device);\n    auto sycl_device = Eigen::SyclDevice(&queueInterface);\n    CALL_SUBTEST_1(tensorOutofBound(sycl_device));\n    CALL_SUBTEST_2(tensorTensor(sycl_device));\n    CALL_SUBTEST_2(tensorTensor_m(sycl_device));\n    CALL_SUBTEST_2(tensorTensor_n(sycl_device));\n    CALL_SUBTEST_2(tensorTensor_k(sycl_device));\n    CALL_SUBTEST_2(tensorTensor_sizes(sycl_device));\n    CALL_SUBTEST_3(vectorVector(sycl_device));\n    CALL_SUBTEST_4(vectorTensor(sycl_device));\n    CALL_SUBTEST_5(tensorVector(sycl_device));\n    CALL_SUBTEST_6(tensorScalar(sycl_device));\n    CALL_SUBTEST_7(skinnyTensor_row(sycl_device));\n    CALL_SUBTEST_7(skinnyTensor_col(sycl_device));\n    CALL_SUBTEST_8(tensor_contraction_batch_per_device(sycl_device));\n    CALL_SUBTEST_9(tensor_contraction_lhs_transposed_per_device(sycl_device));\n    CALL_SUBTEST_10(tensor_contraction_rhs_transposed_per_device(sycl_device));\n    CALL_SUBTEST_11(tensor_contraction_both_transposed_per_device(sycl_device));\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_contraction.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::DefaultDevice;\nusing Eigen::Tensor;\n\ntypedef Tensor<float, 1>::DimensionPair DimPair;\n\ntemplate<int DataLayout>\nstatic void test_evals()\n{\n  Tensor<float, 2, DataLayout> mat1(2, 3);\n  Tensor<float, 2, DataLayout> mat2(2, 3);\n  Tensor<float, 2, DataLayout> mat3(3, 2);\n\n  mat1.setRandom();\n  mat2.setRandom();\n  mat3.setRandom();\n\n  Tensor<float, 2, DataLayout> mat4(3,3);\n  mat4.setZero();\n  Eigen::array<DimPair, 1> dims3 = {{DimPair(0, 0)}};\n  typedef TensorEvaluator<decltype(mat1.contract(mat2, dims3)), DefaultDevice> Evaluator;\n  Evaluator eval(mat1.contract(mat2, dims3), DefaultDevice());\n  eval.evalTo(mat4.data());\n  EIGEN_STATIC_ASSERT(Evaluator::NumDims==2ul, YOU_MADE_A_PROGRAMMING_MISTAKE);\n  VERIFY_IS_EQUAL(eval.dimensions()[0], 3);\n  VERIFY_IS_EQUAL(eval.dimensions()[1], 3);\n\n  VERIFY_IS_APPROX(mat4(0,0), mat1(0,0)*mat2(0,0) + mat1(1,0)*mat2(1,0));\n  VERIFY_IS_APPROX(mat4(0,1), mat1(0,0)*mat2(0,1) + mat1(1,0)*mat2(1,1));\n  VERIFY_IS_APPROX(mat4(0,2), mat1(0,0)*mat2(0,2) + mat1(1,0)*mat2(1,2));\n  VERIFY_IS_APPROX(mat4(1,0), mat1(0,1)*mat2(0,0) + mat1(1,1)*mat2(1,0));\n  VERIFY_IS_APPROX(mat4(1,1), mat1(0,1)*mat2(0,1) + mat1(1,1)*mat2(1,1));\n  VERIFY_IS_APPROX(mat4(1,2), mat1(0,1)*mat2(0,2) + mat1(1,1)*mat2(1,2));\n  VERIFY_IS_APPROX(mat4(2,0), mat1(0,2)*mat2(0,0) + mat1(1,2)*mat2(1,0));\n  VERIFY_IS_APPROX(mat4(2,1), mat1(0,2)*mat2(0,1) + mat1(1,2)*mat2(1,1));\n  VERIFY_IS_APPROX(mat4(2,2), mat1(0,2)*mat2(0,2) + mat1(1,2)*mat2(1,2));\n\n  Tensor<float, 2, DataLayout> mat5(2,2);\n  mat5.setZero();\n  Eigen::array<DimPair, 1> dims4 = {{DimPair(1, 1)}};\n  typedef TensorEvaluator<decltype(mat1.contract(mat2, dims4)), DefaultDevice> Evaluator2;\n  Evaluator2 eval2(mat1.contract(mat2, dims4), DefaultDevice());\n  eval2.evalTo(mat5.data());\n  EIGEN_STATIC_ASSERT(Evaluator2::NumDims==2ul, YOU_MADE_A_PROGRAMMING_MISTAKE);\n  VERIFY_IS_EQUAL(eval2.dimensions()[0], 2);\n  VERIFY_IS_EQUAL(eval2.dimensions()[1], 2);\n\n  VERIFY_IS_APPROX(mat5(0,0), mat1(0,0)*mat2(0,0) + mat1(0,1)*mat2(0,1) + mat1(0,2)*mat2(0,2));\n  VERIFY_IS_APPROX(mat5(0,1), mat1(0,0)*mat2(1,0) + mat1(0,1)*mat2(1,1) + mat1(0,2)*mat2(1,2));\n  VERIFY_IS_APPROX(mat5(1,0), mat1(1,0)*mat2(0,0) + mat1(1,1)*mat2(0,1) + mat1(1,2)*mat2(0,2));\n  VERIFY_IS_APPROX(mat5(1,1), mat1(1,0)*mat2(1,0) + mat1(1,1)*mat2(1,1) + mat1(1,2)*mat2(1,2));\n\n  Tensor<float, 2, DataLayout> mat6(2,2);\n  mat6.setZero();\n  Eigen::array<DimPair, 1> dims6 = {{DimPair(1, 0)}};\n  typedef TensorEvaluator<decltype(mat1.contract(mat3, dims6)), DefaultDevice> Evaluator3;\n  Evaluator3 eval3(mat1.contract(mat3, dims6), DefaultDevice());\n  eval3.evalTo(mat6.data());\n  EIGEN_STATIC_ASSERT(Evaluator3::NumDims==2ul, YOU_MADE_A_PROGRAMMING_MISTAKE);\n  VERIFY_IS_EQUAL(eval3.dimensions()[0], 2);\n  VERIFY_IS_EQUAL(eval3.dimensions()[1], 2);\n\n  VERIFY_IS_APPROX(mat6(0,0), mat1(0,0)*mat3(0,0) + mat1(0,1)*mat3(1,0) + mat1(0,2)*mat3(2,0));\n  VERIFY_IS_APPROX(mat6(0,1), mat1(0,0)*mat3(0,1) + mat1(0,1)*mat3(1,1) + mat1(0,2)*mat3(2,1));\n  VERIFY_IS_APPROX(mat6(1,0), mat1(1,0)*mat3(0,0) + mat1(1,1)*mat3(1,0) + mat1(1,2)*mat3(2,0));\n  VERIFY_IS_APPROX(mat6(1,1), mat1(1,0)*mat3(0,1) + mat1(1,1)*mat3(1,1) + mat1(1,2)*mat3(2,1));\n}\n\ntemplate<int DataLayout>\nstatic void test_scalar()\n{\n  Tensor<float, 1, DataLayout> vec1({6});\n  Tensor<float, 1, DataLayout> vec2({6});\n\n  vec1.setRandom();\n  vec2.setRandom();\n\n  Eigen::array<DimPair, 1> dims = {{DimPair(0, 0)}};\n  Tensor<float, 0, DataLayout> scalar = vec1.contract(vec2, dims);\n\n  float expected = 0.0f;\n  for (int i = 0; i < 6; ++i) {\n    expected += vec1(i) * vec2(i);\n  }\n  VERIFY_IS_APPROX(scalar(), expected);\n}\n\ntemplate<int DataLayout>\nstatic void test_multidims()\n{\n  Tensor<float, 3, DataLayout> mat1(2, 2, 2);\n  Tensor<float, 4, DataLayout> mat2(2, 2, 2, 2);\n\n  mat1.setRandom();\n  mat2.setRandom();\n\n  Tensor<float, 3, DataLayout> mat3(2, 2, 2);\n  mat3.setZero();\n  Eigen::array<DimPair, 2> dims = {{DimPair(1, 2), DimPair(2, 3)}};\n  typedef TensorEvaluator<decltype(mat1.contract(mat2, dims)), DefaultDevice> Evaluator;\n  Evaluator eval(mat1.contract(mat2, dims), DefaultDevice());\n  eval.evalTo(mat3.data());\n  EIGEN_STATIC_ASSERT(Evaluator::NumDims==3ul, YOU_MADE_A_PROGRAMMING_MISTAKE);\n  VERIFY_IS_EQUAL(eval.dimensions()[0], 2);\n  VERIFY_IS_EQUAL(eval.dimensions()[1], 2);\n  VERIFY_IS_EQUAL(eval.dimensions()[2], 2);\n\n  VERIFY_IS_APPROX(mat3(0,0,0), mat1(0,0,0)*mat2(0,0,0,0) + mat1(0,1,0)*mat2(0,0,1,0) +\n                                mat1(0,0,1)*mat2(0,0,0,1) + mat1(0,1,1)*mat2(0,0,1,1));\n  VERIFY_IS_APPROX(mat3(0,0,1), mat1(0,0,0)*mat2(0,1,0,0) + mat1(0,1,0)*mat2(0,1,1,0) +\n                                mat1(0,0,1)*mat2(0,1,0,1) + mat1(0,1,1)*mat2(0,1,1,1));\n  VERIFY_IS_APPROX(mat3(0,1,0), mat1(0,0,0)*mat2(1,0,0,0) + mat1(0,1,0)*mat2(1,0,1,0) +\n                                mat1(0,0,1)*mat2(1,0,0,1) + mat1(0,1,1)*mat2(1,0,1,1));\n  VERIFY_IS_APPROX(mat3(0,1,1), mat1(0,0,0)*mat2(1,1,0,0) + mat1(0,1,0)*mat2(1,1,1,0) +\n                                mat1(0,0,1)*mat2(1,1,0,1) + mat1(0,1,1)*mat2(1,1,1,1));\n  VERIFY_IS_APPROX(mat3(1,0,0), mat1(1,0,0)*mat2(0,0,0,0) + mat1(1,1,0)*mat2(0,0,1,0) +\n                                mat1(1,0,1)*mat2(0,0,0,1) + mat1(1,1,1)*mat2(0,0,1,1));\n  VERIFY_IS_APPROX(mat3(1,0,1), mat1(1,0,0)*mat2(0,1,0,0) + mat1(1,1,0)*mat2(0,1,1,0) +\n                                mat1(1,0,1)*mat2(0,1,0,1) + mat1(1,1,1)*mat2(0,1,1,1));\n  VERIFY_IS_APPROX(mat3(1,1,0), mat1(1,0,0)*mat2(1,0,0,0) + mat1(1,1,0)*mat2(1,0,1,0) +\n                                mat1(1,0,1)*mat2(1,0,0,1) + mat1(1,1,1)*mat2(1,0,1,1));\n  VERIFY_IS_APPROX(mat3(1,1,1), mat1(1,0,0)*mat2(1,1,0,0) + mat1(1,1,0)*mat2(1,1,1,0) +\n                                mat1(1,0,1)*mat2(1,1,0,1) + mat1(1,1,1)*mat2(1,1,1,1));\n\n  Tensor<float, 2, DataLayout> mat4(2, 2);\n  Tensor<float, 3, DataLayout> mat5(2, 2, 2);\n\n  mat4.setRandom();\n  mat5.setRandom();\n\n  Tensor<float, 1, DataLayout> mat6(2);\n  mat6.setZero();\n  Eigen::array<DimPair, 2> dims2({{DimPair(0, 1), DimPair(1, 0)}});\n  typedef TensorEvaluator<decltype(mat4.contract(mat5, dims2)), DefaultDevice> Evaluator2;\n  Evaluator2 eval2(mat4.contract(mat5, dims2), DefaultDevice());\n  eval2.evalTo(mat6.data());\n  EIGEN_STATIC_ASSERT(Evaluator2::NumDims==1ul, YOU_MADE_A_PROGRAMMING_MISTAKE);\n  VERIFY_IS_EQUAL(eval2.dimensions()[0], 2);\n\n  VERIFY_IS_APPROX(mat6(0), mat4(0,0)*mat5(0,0,0) + mat4(1,0)*mat5(0,1,0) +\n                   mat4(0,1)*mat5(1,0,0) + mat4(1,1)*mat5(1,1,0));\n  VERIFY_IS_APPROX(mat6(1), mat4(0,0)*mat5(0,0,1) + mat4(1,0)*mat5(0,1,1) +\n                   mat4(0,1)*mat5(1,0,1) + mat4(1,1)*mat5(1,1,1));\n}\n\ntemplate<int DataLayout>\nstatic void test_holes() {\n  Tensor<float, 4, DataLayout> t1(2, 5, 7, 3);\n  Tensor<float, 5, DataLayout> t2(2, 7, 11, 13, 3);\n  t1.setRandom();\n  t2.setRandom();\n\n  Eigen::array<DimPair, 2> dims = {{DimPair(0, 0), DimPair(3, 4)}};\n  Tensor<float, 5, DataLayout> result = t1.contract(t2, dims);\n  VERIFY_IS_EQUAL(result.dimension(0), 5);\n  VERIFY_IS_EQUAL(result.dimension(1), 7);\n  VERIFY_IS_EQUAL(result.dimension(2), 7);\n  VERIFY_IS_EQUAL(result.dimension(3), 11);\n  VERIFY_IS_EQUAL(result.dimension(4), 13);\n\n  for (int i = 0; i < 5; ++i) {\n    for (int j = 0; j < 5; ++j) {\n      for (int k = 0; k < 5; ++k) {\n        for (int l = 0; l < 5; ++l) {\n          for (int m = 0; m < 5; ++m) {\n            VERIFY_IS_APPROX(result(i, j, k, l, m),\n                             t1(0, i, j, 0) * t2(0, k, l, m, 0) +\n                             t1(1, i, j, 0) * t2(1, k, l, m, 0) +\n                             t1(0, i, j, 1) * t2(0, k, l, m, 1) +\n                             t1(1, i, j, 1) * t2(1, k, l, m, 1) +\n                             t1(0, i, j, 2) * t2(0, k, l, m, 2) +\n                             t1(1, i, j, 2) * t2(1, k, l, m, 2));\n          }\n        }\n      }\n    }\n  }\n}\n\ntemplate<int DataLayout>\nstatic void test_full_redux()\n{\n  Tensor<float, 2, DataLayout> t1(2, 2);\n  Tensor<float, 3, DataLayout> t2(2, 2, 2);\n  t1.setRandom();\n  t2.setRandom();\n\n  Eigen::array<DimPair, 2> dims = {{DimPair(0, 0), DimPair(1, 1)}};\n  Tensor<float, 1, DataLayout> result = t1.contract(t2, dims);\n  VERIFY_IS_EQUAL(result.dimension(0), 2);\n  VERIFY_IS_APPROX(result(0), t1(0, 0) * t2(0, 0, 0) +  t1(1, 0) * t2(1, 0, 0)\n                            + t1(0, 1) * t2(0, 1, 0) +  t1(1, 1) * t2(1, 1, 0));\n  VERIFY_IS_APPROX(result(1), t1(0, 0) * t2(0, 0, 1) +  t1(1, 0) * t2(1, 0, 1)\n                            + t1(0, 1) * t2(0, 1, 1) +  t1(1, 1) * t2(1, 1, 1));\n\n  dims[0] = DimPair(1, 0);\n  dims[1] = DimPair(2, 1);\n  result = t2.contract(t1, dims);\n  VERIFY_IS_EQUAL(result.dimension(0), 2);\n  VERIFY_IS_APPROX(result(0), t1(0, 0) * t2(0, 0, 0) +  t1(1, 0) * t2(0, 1, 0)\n                            + t1(0, 1) * t2(0, 0, 1) +  t1(1, 1) * t2(0, 1, 1));\n  VERIFY_IS_APPROX(result(1), t1(0, 0) * t2(1, 0, 0) +  t1(1, 0) * t2(1, 1, 0)\n                            + t1(0, 1) * t2(1, 0, 1) +  t1(1, 1) * t2(1, 1, 1));\n}\n\ntemplate<int DataLayout>\nstatic void test_contraction_of_contraction()\n{\n  Tensor<float, 2, DataLayout> t1(2, 2);\n  Tensor<float, 2, DataLayout> t2(2, 2);\n  Tensor<float, 2, DataLayout> t3(2, 2);\n  Tensor<float, 2, DataLayout> t4(2, 2);\n  t1.setRandom();\n  t2.setRandom();\n  t3.setRandom();\n  t4.setRandom();\n\n  Eigen::array<DimPair, 1> dims = {{DimPair(1, 0)}};\n  auto contract1 = t1.contract(t2, dims);\n  auto diff = t3 - contract1;\n  auto contract2 = t1.contract(t4, dims);\n  Tensor<float, 2, DataLayout> result = contract2.contract(diff, dims);\n\n  VERIFY_IS_EQUAL(result.dimension(0), 2);\n  VERIFY_IS_EQUAL(result.dimension(1), 2);\n\n  Eigen::Map<Eigen::Matrix<float, Dynamic, Dynamic, DataLayout>>\n      m1(t1.data(), 2, 2), m2(t2.data(), 2, 2), m3(t3.data(), 2, 2),\n      m4(t4.data(), 2, 2);\n  Eigen::Matrix<float, Dynamic, Dynamic, DataLayout>\n      expected = (m1 * m4) * (m3 - m1 * m2);\n\n  VERIFY_IS_APPROX(result(0, 0), expected(0, 0));\n  VERIFY_IS_APPROX(result(0, 1), expected(0, 1));\n  VERIFY_IS_APPROX(result(1, 0), expected(1, 0));\n  VERIFY_IS_APPROX(result(1, 1), expected(1, 1));\n}\n\ntemplate<int DataLayout>\nstatic void test_expr()\n{\n  Tensor<float, 2, DataLayout> mat1(2, 3);\n  Tensor<float, 2, DataLayout> mat2(3, 2);\n  mat1.setRandom();\n  mat2.setRandom();\n\n  Tensor<float, 2, DataLayout> mat3(2,2);\n\n  Eigen::array<DimPair, 1> dims = {{DimPair(1, 0)}};\n  mat3 = mat1.contract(mat2, dims);\n\n  VERIFY_IS_APPROX(mat3(0,0), mat1(0,0)*mat2(0,0) + mat1(0,1)*mat2(1,0) + mat1(0,2)*mat2(2,0));\n  VERIFY_IS_APPROX(mat3(0,1), mat1(0,0)*mat2(0,1) + mat1(0,1)*mat2(1,1) + mat1(0,2)*mat2(2,1));\n  VERIFY_IS_APPROX(mat3(1,0), mat1(1,0)*mat2(0,0) + mat1(1,1)*mat2(1,0) + mat1(1,2)*mat2(2,0));\n  VERIFY_IS_APPROX(mat3(1,1), mat1(1,0)*mat2(0,1) + mat1(1,1)*mat2(1,1) + mat1(1,2)*mat2(2,1));\n}\n\ntemplate<int DataLayout>\nstatic void test_out_of_order_contraction()\n{\n  Tensor<float, 3, DataLayout> mat1(2, 2, 2);\n  Tensor<float, 3, DataLayout> mat2(2, 2, 2);\n\n  mat1.setRandom();\n  mat2.setRandom();\n\n  Tensor<float, 2, DataLayout> mat3(2, 2);\n\n  Eigen::array<DimPair, 2> dims = {{DimPair(2, 0), DimPair(0, 2)}};\n  mat3 = mat1.contract(mat2, dims);\n\n  VERIFY_IS_APPROX(mat3(0, 0),\n                   mat1(0,0,0)*mat2(0,0,0) + mat1(1,0,0)*mat2(0,0,1) +\n                   mat1(0,0,1)*mat2(1,0,0) + mat1(1,0,1)*mat2(1,0,1));\n  VERIFY_IS_APPROX(mat3(1, 0),\n                   mat1(0,1,0)*mat2(0,0,0) + mat1(1,1,0)*mat2(0,0,1) +\n                   mat1(0,1,1)*mat2(1,0,0) + mat1(1,1,1)*mat2(1,0,1));\n  VERIFY_IS_APPROX(mat3(0, 1),\n                   mat1(0,0,0)*mat2(0,1,0) + mat1(1,0,0)*mat2(0,1,1) +\n                   mat1(0,0,1)*mat2(1,1,0) + mat1(1,0,1)*mat2(1,1,1));\n  VERIFY_IS_APPROX(mat3(1, 1),\n                   mat1(0,1,0)*mat2(0,1,0) + mat1(1,1,0)*mat2(0,1,1) +\n                   mat1(0,1,1)*mat2(1,1,0) + mat1(1,1,1)*mat2(1,1,1));\n\n  Eigen::array<DimPair, 2> dims2 = {{DimPair(0, 2), DimPair(2, 0)}};\n  mat3 = mat1.contract(mat2, dims2);\n\n  VERIFY_IS_APPROX(mat3(0, 0),\n                   mat1(0,0,0)*mat2(0,0,0) + mat1(1,0,0)*mat2(0,0,1) +\n                   mat1(0,0,1)*mat2(1,0,0) + mat1(1,0,1)*mat2(1,0,1));\n  VERIFY_IS_APPROX(mat3(1, 0),\n                   mat1(0,1,0)*mat2(0,0,0) + mat1(1,1,0)*mat2(0,0,1) +\n                   mat1(0,1,1)*mat2(1,0,0) + mat1(1,1,1)*mat2(1,0,1));\n  VERIFY_IS_APPROX(mat3(0, 1),\n                   mat1(0,0,0)*mat2(0,1,0) + mat1(1,0,0)*mat2(0,1,1) +\n                   mat1(0,0,1)*mat2(1,1,0) + mat1(1,0,1)*mat2(1,1,1));\n  VERIFY_IS_APPROX(mat3(1, 1),\n                   mat1(0,1,0)*mat2(0,1,0) + mat1(1,1,0)*mat2(0,1,1) +\n                   mat1(0,1,1)*mat2(1,1,0) + mat1(1,1,1)*mat2(1,1,1));\n\n}\n\ntemplate<int DataLayout>\nstatic void test_consistency()\n{\n  // this does something like testing (A*B)^T = (B^T * A^T)\n\n  Tensor<float, 3, DataLayout> mat1(4, 3, 5);\n  Tensor<float, 5, DataLayout> mat2(3, 2, 1, 5, 4);\n  mat1.setRandom();\n  mat2.setRandom();\n\n  Tensor<float, 4, DataLayout> mat3(5, 2, 1, 5);\n  Tensor<float, 4, DataLayout> mat4(2, 1, 5, 5);\n\n  // contract on dimensions of size 4 and 3\n  Eigen::array<DimPair, 2> dims1 = {{DimPair(0, 4), DimPair(1, 0)}};\n  Eigen::array<DimPair, 2> dims2 = {{DimPair(4, 0), DimPair(0, 1)}};\n\n  mat3 = mat1.contract(mat2, dims1);\n  mat4 = mat2.contract(mat1, dims2);\n\n  // check that these are equal except for ordering of dimensions\n  if (DataLayout == ColMajor) {\n    for (size_t i = 0; i < 5; i++) {\n      for (size_t j = 0; j < 10; j++) {\n        VERIFY_IS_APPROX(mat3.data()[i + 5 * j], mat4.data()[j + 10 * i]);\n      }\n    }\n  } else {\n    // Row major\n    for (size_t i = 0; i < 5; i++) {\n      for (size_t j = 0; j < 10; j++) {\n        VERIFY_IS_APPROX(mat3.data()[10 * i + j], mat4.data()[i + 5 * j]);\n      }\n    }\n  }\n}\n\ntemplate<int DataLayout>\nstatic void test_large_contraction()\n{\n  Tensor<float, 4, DataLayout> t_left(30, 50, 8, 31);\n  Tensor<float, 5, DataLayout> t_right(8, 31, 7, 20, 10);\n  Tensor<float, 5, DataLayout> t_result(30, 50, 7, 20, 10);\n\n  t_left.setRandom();\n  t_right.setRandom();\n\n  // Add a little offset so that the results won't be close to zero.\n  t_left += t_left.constant(1.0f);\n  t_right += t_right.constant(1.0f);\n\n  typedef Map<Eigen::Matrix<float, Dynamic, Dynamic, DataLayout>> MapXf;\n  MapXf m_left(t_left.data(), 1500, 248);\n  MapXf m_right(t_right.data(), 248, 1400);\n  Eigen::Matrix<float, Dynamic, Dynamic, DataLayout> m_result(1500, 1400);\n\n  // this contraction should be equivalent to a single matrix multiplication\n  Eigen::array<DimPair, 2> dims = {{DimPair(2, 0), DimPair(3, 1)}};\n\n  // compute results by separate methods\n  t_result = t_left.contract(t_right, dims);\n  m_result = m_left * m_right;\n\n  for (int i = 0; i < t_result.dimensions().TotalSize(); i++) {\n    VERIFY(&t_result.data()[i] != &m_result.data()[i]);\n    VERIFY_IS_APPROX(t_result.data()[i], m_result.data()[i]);\n  }\n}\n\ntemplate<int DataLayout>\nstatic void test_matrix_vector()\n{\n  Tensor<float, 2, DataLayout> t_left(30, 50);\n  Tensor<float, 1, DataLayout> t_right(50);\n  Tensor<float, 1, DataLayout> t_result(30);\n\n  t_left.setRandom();\n  t_right.setRandom();\n\n  typedef Map<Eigen::Matrix<float, Dynamic, Dynamic, DataLayout>> MapXf;\n  MapXf m_left(t_left.data(), 30, 50);\n  MapXf m_right(t_right.data(), 50, 1);\n  Eigen::Matrix<float, Dynamic, Dynamic, DataLayout> m_result(30, 1);\n\n  // this contraction should be equivalent to a single matrix multiplication\n  Eigen::array<DimPair, 1> dims{{DimPair(1, 0)}};\n\n  // compute results by separate methods\n  t_result = t_left.contract(t_right, dims);\n  m_result = m_left * m_right;\n\n  for (int i = 0; i < t_result.dimensions().TotalSize(); i++) {\n    VERIFY(internal::isApprox(t_result(i), m_result(i, 0), 1));\n  }\n}\n\n\ntemplate<int DataLayout>\nstatic void test_tensor_vector()\n{\n  Tensor<float, 3, DataLayout> t_left(7, 13, 17);\n  Tensor<float, 2, DataLayout> t_right(1, 7);\n\n  t_left.setRandom();\n  t_right.setRandom();\n\n  typedef typename Tensor<float, 1, DataLayout>::DimensionPair DimensionPair;\n  Eigen::array<DimensionPair, 1> dim_pair01{{{0, 1}}};\n  Tensor<float, 3, DataLayout> t_result = t_left.contract(t_right, dim_pair01);\n\n  typedef Map<Eigen::Matrix<float, Dynamic, Dynamic, DataLayout>> MapXf;\n  MapXf m_left(t_left.data(), 7, 13*17);\n  MapXf m_right(t_right.data(), 1, 7);\n  Eigen::Matrix<float, Dynamic, Dynamic, DataLayout> m_result = m_left.transpose() * m_right.transpose();\n\n  for (int i = 0; i < t_result.dimensions().TotalSize(); i++) {\n    VERIFY(internal::isApprox(t_result(i), m_result(i, 0), 1));\n  }\n}\n\n\ntemplate<int DataLayout>\nstatic void test_small_blocking_factors()\n{\n  Tensor<float, 4, DataLayout> t_left(30, 5, 3, 31);\n  Tensor<float, 5, DataLayout> t_right(3, 31, 7, 20, 1);\n  t_left.setRandom();\n  t_right.setRandom();\n\n  // Add a little offset so that the results won't be close to zero.\n  t_left += t_left.constant(1.0f);\n  t_right += t_right.constant(1.0f);\n\n  // Force the cache sizes, which results in smaller blocking factors.\n  Eigen::setCpuCacheSizes(896, 1920, 2944);\n\n  // this contraction should be equivalent to a single matrix multiplication\n  Eigen::array<DimPair, 2> dims = {{DimPair(2, 0), DimPair(3, 1)}};\n  Tensor<float, 5, DataLayout> t_result;\n  t_result = t_left.contract(t_right, dims);\n\n  // compute result using a simple eigen matrix product\n  Map<Eigen::Matrix<float, Dynamic, Dynamic, DataLayout>> m_left(t_left.data(), 150, 93);\n  Map<Eigen::Matrix<float, Dynamic, Dynamic, DataLayout>> m_right(t_right.data(), 93, 140);\n  Eigen::Matrix<float, Dynamic, Dynamic, DataLayout> m_result = m_left * m_right;\n\n  for (int i = 0; i < t_result.dimensions().TotalSize(); i++) {\n    VERIFY_IS_APPROX(t_result.data()[i], m_result.data()[i]);\n  }\n}\n\ntemplate<int DataLayout>\nstatic void test_tensor_product()\n{\n  Tensor<float, 2, DataLayout> mat1(2, 3);\n  Tensor<float, 2, DataLayout> mat2(4, 1);\n  mat1.setRandom();\n  mat2.setRandom();\n\n  Eigen::array<DimPair, 0> dims;\n  Tensor<float, 4, DataLayout> result = mat1.contract(mat2, dims);\n\n  VERIFY_IS_EQUAL(result.dimension(0), 2);\n  VERIFY_IS_EQUAL(result.dimension(1), 3);\n  VERIFY_IS_EQUAL(result.dimension(2), 4);\n  VERIFY_IS_EQUAL(result.dimension(3), 1);\n  for (int i = 0; i < result.dimension(0); ++i) {\n    for (int j = 0; j < result.dimension(1); ++j) {\n      for (int k = 0; k < result.dimension(2); ++k) {\n        for (int l = 0; l < result.dimension(3); ++l) {\n\t\t\tVERIFY_IS_APPROX(result(i, j, k, l), mat1(i, j) * mat2(k, l) );\n        }\n      }\n    }\n  }\n}\n\n\ntemplate<int DataLayout>\nstatic void test_const_inputs()\n{\n  Tensor<float, 2, DataLayout> in1(2, 3);\n  Tensor<float, 2, DataLayout> in2(3, 2);\n  in1.setRandom();\n  in2.setRandom();\n\n  TensorMap<Tensor<const float, 2, DataLayout> > mat1(in1.data(), 2, 3);\n  TensorMap<Tensor<const float, 2, DataLayout> > mat2(in2.data(), 3, 2);\n  Tensor<float, 2, DataLayout> mat3(2,2);\n\n  Eigen::array<DimPair, 1> dims = {{DimPair(1, 0)}};\n  mat3 = mat1.contract(mat2, dims);\n\n  VERIFY_IS_APPROX(mat3(0,0), mat1(0,0)*mat2(0,0) + mat1(0,1)*mat2(1,0) + mat1(0,2)*mat2(2,0));\n  VERIFY_IS_APPROX(mat3(0,1), mat1(0,0)*mat2(0,1) + mat1(0,1)*mat2(1,1) + mat1(0,2)*mat2(2,1));\n  VERIFY_IS_APPROX(mat3(1,0), mat1(1,0)*mat2(0,0) + mat1(1,1)*mat2(1,0) + mat1(1,2)*mat2(2,0));\n  VERIFY_IS_APPROX(mat3(1,1), mat1(1,0)*mat2(0,1) + mat1(1,1)*mat2(1,1) + mat1(1,2)*mat2(2,1));\n}\n\n// Apply Sqrt to all output elements.\nstruct SqrtOutputKernel {\n  template <typename Index, typename Scalar>\n  EIGEN_ALWAYS_INLINE void operator()(\n      const internal::blas_data_mapper<Scalar, Index, ColMajor>& output_mapper,\n      const TensorContractionParams&, Index, Index, Index num_rows,\n      Index num_cols) const {\n    for (int i = 0; i < num_rows; ++i) {\n      for (int j = 0; j < num_cols; ++j) {\n        output_mapper(i, j) = std::sqrt(output_mapper(i, j));\n      }\n    }\n  }\n};\n\ntemplate <int DataLayout>\nstatic void test_large_contraction_with_output_kernel() {\n  Tensor<float, 4, DataLayout> t_left(30, 50, 8, 31);\n  Tensor<float, 5, DataLayout> t_right(8, 31, 7, 20, 10);\n  Tensor<float, 5, DataLayout> t_result(30, 50, 7, 20, 10);\n\n  t_left.setRandom();\n  t_right.setRandom();\n  // Put trash in mat4 to verify contraction clears output memory.\n  t_result.setRandom();\n\n  // Add a little offset so that the results won't be close to zero.\n  t_left += t_left.constant(1.0f);\n  t_right += t_right.constant(1.0f);\n\n  typedef Map<Eigen::Matrix<float, Dynamic, Dynamic, DataLayout>> MapXf;\n  MapXf m_left(t_left.data(), 1500, 248);\n  MapXf m_right(t_right.data(), 248, 1400);\n  Eigen::Matrix<float, Dynamic, Dynamic, DataLayout> m_result(1500, 1400);\n\n  // this contraction should be equivalent to a single matrix multiplication\n  Eigen::array<DimPair, 2> dims({{DimPair(2, 0), DimPair(3, 1)}});\n\n  // compute results by separate methods\n  t_result = t_left.contract(t_right, dims, SqrtOutputKernel());\n\n  m_result = m_left * m_right;\n\n  for (std::ptrdiff_t i = 0; i < t_result.dimensions().TotalSize(); i++) {\n    VERIFY(&t_result.data()[i] != &m_result.data()[i]);\n    VERIFY_IS_APPROX(t_result.data()[i], std::sqrt(m_result.data()[i]));\n  }\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_contraction)\n{\n  CALL_SUBTEST(test_evals<ColMajor>());\n  CALL_SUBTEST(test_evals<RowMajor>());\n  CALL_SUBTEST(test_scalar<ColMajor>());\n  CALL_SUBTEST(test_scalar<RowMajor>());\n  CALL_SUBTEST(test_multidims<ColMajor>());\n  CALL_SUBTEST(test_multidims<RowMajor>());\n  CALL_SUBTEST(test_holes<ColMajor>());\n  CALL_SUBTEST(test_holes<RowMajor>());\n  CALL_SUBTEST(test_full_redux<ColMajor>());\n  CALL_SUBTEST(test_full_redux<RowMajor>());\n  CALL_SUBTEST(test_contraction_of_contraction<ColMajor>());\n  CALL_SUBTEST(test_contraction_of_contraction<RowMajor>());\n  CALL_SUBTEST(test_expr<ColMajor>());\n  CALL_SUBTEST(test_expr<RowMajor>());\n  CALL_SUBTEST(test_out_of_order_contraction<ColMajor>());\n  CALL_SUBTEST(test_out_of_order_contraction<RowMajor>());\n  CALL_SUBTEST(test_consistency<ColMajor>());\n  CALL_SUBTEST(test_consistency<RowMajor>());\n  CALL_SUBTEST(test_large_contraction<ColMajor>());\n  CALL_SUBTEST(test_large_contraction<RowMajor>());\n  CALL_SUBTEST(test_matrix_vector<ColMajor>());\n  CALL_SUBTEST(test_matrix_vector<RowMajor>());\n  CALL_SUBTEST(test_tensor_vector<ColMajor>());\n  CALL_SUBTEST(test_tensor_vector<RowMajor>());\n  CALL_SUBTEST(test_small_blocking_factors<ColMajor>());\n  CALL_SUBTEST(test_small_blocking_factors<RowMajor>());\n  CALL_SUBTEST(test_tensor_product<ColMajor>());\n  CALL_SUBTEST(test_tensor_product<RowMajor>());\n  CALL_SUBTEST(test_const_inputs<ColMajor>());\n  CALL_SUBTEST(test_const_inputs<RowMajor>());\n  CALL_SUBTEST(test_large_contraction_with_output_kernel<ColMajor>());\n  CALL_SUBTEST(test_large_contraction_with_output_kernel<RowMajor>());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_convolution.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\nusing Eigen::DefaultDevice;\n\ntemplate <int DataLayout>\nstatic void test_evals()\n{\n  Tensor<float, 2, DataLayout> input(3, 3);\n  Tensor<float, 1, DataLayout> kernel(2);\n\n  input.setRandom();\n  kernel.setRandom();\n\n  Tensor<float, 2, DataLayout> result(2,3);\n  result.setZero();\n  Eigen::array<Tensor<float, 2>::Index, 1> dims3;\n  dims3[0] = 0;\n\n  typedef TensorEvaluator<decltype(input.convolve(kernel, dims3)), DefaultDevice> Evaluator;\n  Evaluator eval(input.convolve(kernel, dims3), DefaultDevice());\n  eval.evalTo(result.data());\n  EIGEN_STATIC_ASSERT(Evaluator::NumDims==2ul, YOU_MADE_A_PROGRAMMING_MISTAKE);\n  VERIFY_IS_EQUAL(eval.dimensions()[0], 2);\n  VERIFY_IS_EQUAL(eval.dimensions()[1], 3);\n\n  VERIFY_IS_APPROX(result(0,0), input(0,0)*kernel(0) + input(1,0)*kernel(1));  // index 0\n  VERIFY_IS_APPROX(result(0,1), input(0,1)*kernel(0) + input(1,1)*kernel(1));  // index 2\n  VERIFY_IS_APPROX(result(0,2), input(0,2)*kernel(0) + input(1,2)*kernel(1));  // index 4\n  VERIFY_IS_APPROX(result(1,0), input(1,0)*kernel(0) + input(2,0)*kernel(1));  // index 1\n  VERIFY_IS_APPROX(result(1,1), input(1,1)*kernel(0) + input(2,1)*kernel(1));  // index 3\n  VERIFY_IS_APPROX(result(1,2), input(1,2)*kernel(0) + input(2,2)*kernel(1));  // index 5\n}\n\ntemplate <int DataLayout>\nstatic void test_expr()\n{\n  Tensor<float, 2, DataLayout> input(3, 3);\n  Tensor<float, 2, DataLayout> kernel(2, 2);\n  input.setRandom();\n  kernel.setRandom();\n\n  Tensor<float, 2, DataLayout> result(2,2);\n  Eigen::array<ptrdiff_t, 2> dims;\n  dims[0] = 0;\n  dims[1] = 1;\n  result = input.convolve(kernel, dims);\n\n  VERIFY_IS_APPROX(result(0,0), input(0,0)*kernel(0,0) + input(0,1)*kernel(0,1) +\n                                input(1,0)*kernel(1,0) + input(1,1)*kernel(1,1));\n  VERIFY_IS_APPROX(result(0,1), input(0,1)*kernel(0,0) + input(0,2)*kernel(0,1) +\n                                input(1,1)*kernel(1,0) + input(1,2)*kernel(1,1));\n  VERIFY_IS_APPROX(result(1,0), input(1,0)*kernel(0,0) + input(1,1)*kernel(0,1) +\n                                input(2,0)*kernel(1,0) + input(2,1)*kernel(1,1));\n  VERIFY_IS_APPROX(result(1,1), input(1,1)*kernel(0,0) + input(1,2)*kernel(0,1) +\n                                input(2,1)*kernel(1,0) + input(2,2)*kernel(1,1));\n}\n\ntemplate <int DataLayout>\nstatic void test_modes() {\n  Tensor<float, 1, DataLayout> input(3);\n  Tensor<float, 1, DataLayout> kernel(3);\n  input(0) = 1.0f;\n  input(1) = 2.0f;\n  input(2) = 3.0f;\n  kernel(0) = 0.5f;\n  kernel(1) = 1.0f;\n  kernel(2) = 0.0f;\n\n  Eigen::array<ptrdiff_t, 1> dims;\n  dims[0] = 0;\n  Eigen::array<std::pair<ptrdiff_t, ptrdiff_t>, 1> padding;\n\n  // Emulate VALID mode (as defined in\n  // http://docs.scipy.org/doc/numpy/reference/generated/numpy.convolve.html).\n  padding[0] = std::make_pair(0, 0);\n  Tensor<float, 1, DataLayout> valid(1);\n  valid = input.pad(padding).convolve(kernel, dims);\n  VERIFY_IS_EQUAL(valid.dimension(0), 1);\n  VERIFY_IS_APPROX(valid(0), 2.5f);\n\n  // Emulate SAME mode (as defined in\n  // http://docs.scipy.org/doc/numpy/reference/generated/numpy.convolve.html).\n  padding[0] = std::make_pair(1, 1);\n  Tensor<float, 1, DataLayout> same(3);\n  same = input.pad(padding).convolve(kernel, dims);\n  VERIFY_IS_EQUAL(same.dimension(0), 3);\n  VERIFY_IS_APPROX(same(0), 1.0f);\n  VERIFY_IS_APPROX(same(1), 2.5f);\n  VERIFY_IS_APPROX(same(2), 4.0f);\n\n  // Emulate FULL mode (as defined in\n  // http://docs.scipy.org/doc/numpy/reference/generated/numpy.convolve.html).\n  padding[0] = std::make_pair(2, 2);\n  Tensor<float, 1, DataLayout> full(5);\n  full = input.pad(padding).convolve(kernel, dims);\n  VERIFY_IS_EQUAL(full.dimension(0), 5);\n  VERIFY_IS_APPROX(full(0), 0.0f);\n  VERIFY_IS_APPROX(full(1), 1.0f);\n  VERIFY_IS_APPROX(full(2), 2.5f);\n  VERIFY_IS_APPROX(full(3), 4.0f);\n  VERIFY_IS_APPROX(full(4), 1.5f);\n}\n\ntemplate <int DataLayout>\nstatic void test_strides() {\n  Tensor<float, 1, DataLayout> input(13);\n  Tensor<float, 1, DataLayout> kernel(3);\n  input.setRandom();\n  kernel.setRandom();\n\n  Eigen::array<ptrdiff_t, 1> dims;\n  dims[0] = 0;\n  Eigen::array<ptrdiff_t, 1> stride_of_3;\n  stride_of_3[0] = 3;\n  Eigen::array<ptrdiff_t, 1> stride_of_2;\n  stride_of_2[0] = 2;\n\n  Tensor<float, 1, DataLayout> result;\n  result = input.stride(stride_of_3).convolve(kernel, dims).stride(stride_of_2);\n\n  VERIFY_IS_EQUAL(result.dimension(0), 2);\n  VERIFY_IS_APPROX(result(0), (input(0)*kernel(0) + input(3)*kernel(1) +\n                               input(6)*kernel(2)));\n  VERIFY_IS_APPROX(result(1), (input(6)*kernel(0) + input(9)*kernel(1) +\n                               input(12)*kernel(2)));\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_convolution)\n{\n  CALL_SUBTEST(test_evals<ColMajor>());\n  CALL_SUBTEST(test_evals<RowMajor>());\n  CALL_SUBTEST(test_expr<ColMajor>());\n  CALL_SUBTEST(test_expr<RowMajor>());\n  CALL_SUBTEST(test_modes<ColMajor>());\n  CALL_SUBTEST(test_modes<RowMajor>());\n  CALL_SUBTEST(test_strides<ColMajor>());\n  CALL_SUBTEST(test_strides<RowMajor>());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_convolution_sycl.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016\n// Mehdi Goli    Codeplay Software Ltd.\n// Ralph Potter  Codeplay Software Ltd.\n// Luke Iwanski  Codeplay Software Ltd.\n// Contact: <eigen@codeplay.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_TEST_NO_LONGDOUBLE\n#define EIGEN_TEST_NO_COMPLEX\n\n#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int64_t\n#define EIGEN_USE_SYCL\n\n#include <iostream>\n#include <chrono>\n#include <ctime>\n\n#include \"main.h\"\n#include <unsupported/Eigen/CXX11/Tensor>\n#include <iomanip>\n\nusing Eigen::array;\nusing Eigen::SyclDevice;\nusing Eigen::Tensor;\nusing Eigen::TensorMap;\nstatic const float error_threshold =1e-4f;\n\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_larg_expr1D(const Eigen::SyclDevice& sycl_device)\n{\n  IndexType indim0 =53;\n  IndexType indim1= 55;\n  IndexType indim2= 51;\n  IndexType outdim0=50;\n  IndexType outdim1=55;\n  IndexType outdim2=51;\n  Eigen::array<IndexType, 3> input_dims = {{indim0, indim1, indim2}};\n  Eigen::array<IndexType, 1> kernel_dims = {{4}};\n  Eigen::array<IndexType, 3> result_dims = {{outdim0, outdim1, outdim2}};\n\n  Tensor<DataType, 3, DataLayout, IndexType> input(input_dims);\n  Tensor<DataType, 1, DataLayout,IndexType> kernel(kernel_dims);\n  Tensor<DataType, 3, DataLayout,IndexType> result(result_dims);\n  Tensor<DataType, 3, DataLayout,IndexType> result_host(result_dims);\n\n  Eigen::array<IndexType, 1> dims3{{0}};\n\n  input.setRandom();\n  kernel.setRandom();\n  result.setZero();\n  result_host.setZero();\n\n  std::size_t input_bytes = input.size()  * sizeof(DataType);\n  std::size_t kernel_bytes = kernel.size() * sizeof(DataType);\n  std::size_t result_bytes = result.size() * sizeof(DataType);\n\n  DataType * d_input  = static_cast<DataType*>(sycl_device.allocate(input_bytes));\n  DataType * d_kernel  = static_cast<DataType*>(sycl_device.allocate(kernel_bytes));\n  DataType * d_result =  static_cast<DataType*>(sycl_device.allocate(result_bytes));\n\n  Eigen::TensorMap<Eigen::Tensor<DataType, 3, DataLayout, IndexType> > gpu_input(d_input, input_dims);\n  Eigen::TensorMap<Eigen::Tensor<DataType, 1, DataLayout, IndexType> > gpu_kernel(d_kernel, kernel_dims);\n  Eigen::TensorMap<Eigen::Tensor<DataType, 3, DataLayout, IndexType> > gpu_result(d_result, result_dims);\n  sycl_device.memcpyHostToDevice(d_input, input.data(), input_bytes);\n  sycl_device.memcpyHostToDevice(d_kernel, kernel.data(), kernel_bytes);\n\n  gpu_result.device(sycl_device)=gpu_input.convolve(gpu_kernel, dims3);\n  sycl_device.memcpyDeviceToHost(result.data(), d_result, result_bytes);\n\n  result_host=input.convolve(kernel, dims3);\n\nfor(IndexType i=0; i< outdim0; i++ ){\n  for(IndexType j=0; j< outdim1; j++ ){\n    for(IndexType k=0; k< outdim2; k++ ){\n      if (!(Eigen::internal::isApprox(result(i,j,k), result_host(i,j,k), error_threshold))) {\n        std::cout <<std::setprecision(16)<< \"mismatch detected at index  ( \"<< i  << \" , \"  << j  << \", \" << k << \" ) \" << \" \\t \" << result(i,j,k) << \" vs \"<<  result_host(i,j,k) << std::endl;\n        assert(false);\n      }\n    }\n  }\n}\n  sycl_device.deallocate(d_input);\n  sycl_device.deallocate(d_kernel);\n  sycl_device.deallocate(d_result);\n\n}\n\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_larg_expr2D(const Eigen::SyclDevice& sycl_device)\n{\n  IndexType indim0 =53;\n  IndexType indim1= 55;\n  IndexType indim2= 51;\n  IndexType outdim0=50;\n  IndexType outdim1=51;\n  IndexType outdim2=51;\n  Eigen::array<IndexType, 3> input_dims = {{indim0, indim1, indim2}};\n  Eigen::array<IndexType, 2> kernel_dims = {{4,5}};\n  Eigen::array<IndexType, 3> result_dims = {{outdim0, outdim1, outdim2}};\n\n  Tensor<DataType, 3, DataLayout, IndexType> input(input_dims);\n  Tensor<DataType, 2, DataLayout,IndexType> kernel(kernel_dims);\n  Tensor<DataType, 3, DataLayout,IndexType> result(result_dims);\n  Tensor<DataType, 3, DataLayout,IndexType> result_host(result_dims);\n\n  Eigen::array<IndexType, 2> dims3{{0,1}};\n\n  input.setRandom();\n  kernel.setRandom();\n  result.setZero();\n  result_host.setZero();\n\n  std::size_t input_bytes = input.size()  * sizeof(DataType);\n  std::size_t kernel_bytes = kernel.size() * sizeof(DataType);\n  std::size_t result_bytes = result.size() * sizeof(DataType);\n\n  DataType * d_input  = static_cast<DataType*>(sycl_device.allocate(input_bytes));\n  DataType * d_kernel  = static_cast<DataType*>(sycl_device.allocate(kernel_bytes));\n  DataType * d_result =  static_cast<DataType*>(sycl_device.allocate(result_bytes));\n\n  Eigen::TensorMap<Eigen::Tensor<DataType, 3, DataLayout, IndexType> > gpu_input(d_input, input_dims);\n  Eigen::TensorMap<Eigen::Tensor<DataType, 2, DataLayout, IndexType> > gpu_kernel(d_kernel, kernel_dims);\n  Eigen::TensorMap<Eigen::Tensor<DataType, 3, DataLayout, IndexType> > gpu_result(d_result, result_dims);\n  sycl_device.memcpyHostToDevice(d_input, input.data(), input_bytes);\n  sycl_device.memcpyHostToDevice(d_kernel, kernel.data(), kernel_bytes);\n\n  gpu_result.device(sycl_device)=gpu_input.convolve(gpu_kernel, dims3);\n  sycl_device.memcpyDeviceToHost(result.data(), d_result, result_bytes);\n\n  result_host=input.convolve(kernel, dims3);\n\nfor(IndexType i=0; i< outdim0; i++ ){\n  for(IndexType j=0; j< outdim1; j++ ){\n    for(IndexType k=0; k< outdim2; k++ ){\n      if (!(Eigen::internal::isApprox(result(i,j,k), result_host(i,j,k), error_threshold))) {\n        std::cout <<std::setprecision(16)<< \"mismatch detected at index  ( \"<< i  << \" , \"  << j  << \", \" << k << \" ) \" << \" \\t \" << result(i,j,k) << \" vs \"<<  result_host(i,j,k) << std::endl;\n        assert(false);\n      }\n    }\n  }\n}\n  sycl_device.deallocate(d_input);\n  sycl_device.deallocate(d_kernel);\n  sycl_device.deallocate(d_result);\n\n}\n\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_larg_expr3D(const Eigen::SyclDevice& sycl_device)\n{\n  IndexType indim0 =53;\n  IndexType indim1= 55;\n  IndexType indim2= 51;\n  IndexType outdim0=50;\n  IndexType outdim1=51;\n  IndexType outdim2=49;\n  Eigen::array<IndexType, 3> input_dims = {{indim0, indim1, indim2}};\n  Eigen::array<IndexType, 3> kernel_dims = {{4,5,3}};\n  Eigen::array<IndexType, 3> result_dims = {{outdim0, outdim1, outdim2}};\n\n  Tensor<DataType, 3, DataLayout, IndexType> input(input_dims);\n  Tensor<DataType, 3, DataLayout,IndexType> kernel(kernel_dims);\n  Tensor<DataType, 3, DataLayout,IndexType> result(result_dims);\n  Tensor<DataType, 3, DataLayout,IndexType> result_host(result_dims);\n\n  Eigen::array<IndexType, 3> dims3{{0,1,2}};\n\n  input.setRandom();\n  kernel.setRandom();\n  result.setZero();\n  result_host.setZero();\n\n  std::size_t input_bytes = input.size()  * sizeof(DataType);\n  std::size_t kernel_bytes = kernel.size() * sizeof(DataType);\n  std::size_t result_bytes = result.size() * sizeof(DataType);\n\n  DataType * d_input  = static_cast<DataType*>(sycl_device.allocate(input_bytes));\n  DataType * d_kernel  = static_cast<DataType*>(sycl_device.allocate(kernel_bytes));\n  DataType * d_result =  static_cast<DataType*>(sycl_device.allocate(result_bytes));\n\n  Eigen::TensorMap<Eigen::Tensor<DataType, 3, DataLayout, IndexType> > gpu_input(d_input, input_dims);\n  Eigen::TensorMap<Eigen::Tensor<DataType, 3, DataLayout, IndexType> > gpu_kernel(d_kernel, kernel_dims);\n  Eigen::TensorMap<Eigen::Tensor<DataType, 3, DataLayout, IndexType> > gpu_result(d_result, result_dims);\n  sycl_device.memcpyHostToDevice(d_input, input.data(), input_bytes);\n  sycl_device.memcpyHostToDevice(d_kernel, kernel.data(), kernel_bytes);\n\n  gpu_result.device(sycl_device)=gpu_input.convolve(gpu_kernel, dims3);\n  sycl_device.memcpyDeviceToHost(result.data(), d_result, result_bytes);\n\n  result_host=input.convolve(kernel, dims3);\n\nfor(IndexType i=0; i< outdim0; i++ ){\n  for(IndexType j=0; j< outdim1; j++ ){\n    for(IndexType k=0; k< outdim2; k++ ){\n      if (!(Eigen::internal::isApprox(result(i,j,k), result_host(i,j,k), error_threshold))) {\n        std::cout <<std::setprecision(16)<< \"mismatch detected at index  ( \"<< i  << \" , \"  << j  << \", \" << k << \" ) \" << \" \\t \" << result(i,j,k) << \" vs \"<<  result_host(i,j,k) << std::endl;\n        assert(false);\n      }\n    }\n  }\n}\n  sycl_device.deallocate(d_input);\n  sycl_device.deallocate(d_kernel);\n  sycl_device.deallocate(d_result);\n\n}\n\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_evals(const Eigen::SyclDevice& sycl_device)\n{\n  Eigen::array<IndexType, 2> input_dims = {{3, 3}};\n  Eigen::array<IndexType, 1> kernel_dims = {{2}};\n  Eigen::array<IndexType, 2> result_dims = {{2, 3}};\n\n  Tensor<DataType, 2, DataLayout, IndexType> input(input_dims);\n  Tensor<DataType, 1, DataLayout,IndexType> kernel(kernel_dims);\n  Tensor<DataType, 2, DataLayout,IndexType> result(result_dims);\n\n  Eigen::array<IndexType, 1> dims3{{0}};\n\n  input.setRandom();\n  kernel.setRandom();\n  result.setZero();\n\n  std::size_t input_bytes = input.size()  * sizeof(DataType);\n  std::size_t kernel_bytes = kernel.size() * sizeof(DataType);\n  std::size_t result_bytes = result.size() * sizeof(DataType);\n\n  DataType * d_input  = static_cast<DataType*>(sycl_device.allocate(input_bytes));\n  DataType * d_kernel  = static_cast<DataType*>(sycl_device.allocate(kernel_bytes));\n  DataType * d_result =  static_cast<DataType*>(sycl_device.allocate(result_bytes));\n\n  Eigen::TensorMap<Eigen::Tensor<DataType, 2, DataLayout, IndexType> > gpu_input(d_input, input_dims);\n  Eigen::TensorMap<Eigen::Tensor<DataType, 1, DataLayout, IndexType> > gpu_kernel(d_kernel, kernel_dims);\n  Eigen::TensorMap<Eigen::Tensor<DataType, 2, DataLayout, IndexType> > gpu_result(d_result, result_dims);\n  sycl_device.memcpyHostToDevice(d_input, input.data(), input_bytes);\n  sycl_device.memcpyHostToDevice(d_kernel, kernel.data(), kernel_bytes);\n\n  gpu_result.device(sycl_device)=gpu_input.convolve(gpu_kernel, dims3);\n  sycl_device.memcpyDeviceToHost(result.data(), d_result, result_bytes);\n\n  VERIFY_IS_APPROX(result(0,0), input(0,0)*kernel(0) + input(1,0)*kernel(1));  // index 0\n  VERIFY_IS_APPROX(result(0,1), input(0,1)*kernel(0) + input(1,1)*kernel(1));  // index 2\n  VERIFY_IS_APPROX(result(0,2), input(0,2)*kernel(0) + input(1,2)*kernel(1));  // index 4\n  VERIFY_IS_APPROX(result(1,0), input(1,0)*kernel(0) + input(2,0)*kernel(1));  // index 1\n  VERIFY_IS_APPROX(result(1,1), input(1,1)*kernel(0) + input(2,1)*kernel(1));  // index 3\n  VERIFY_IS_APPROX(result(1,2), input(1,2)*kernel(0) + input(2,2)*kernel(1));  // index 5\n\n  sycl_device.deallocate(d_input);\n  sycl_device.deallocate(d_kernel);\n  sycl_device.deallocate(d_result);\n}\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_expr(const Eigen::SyclDevice& sycl_device)\n{\n  Eigen::array<IndexType, 2> input_dims = {{3, 3}};\n  Eigen::array<IndexType, 2> kernel_dims = {{2, 2}};\n  Eigen::array<IndexType, 2> result_dims = {{2, 2}};\n\n  Tensor<DataType, 2, DataLayout, IndexType> input(input_dims);\n  Tensor<DataType, 2, DataLayout, IndexType> kernel(kernel_dims);\n  Tensor<DataType, 2, DataLayout, IndexType> result(result_dims);\n\n  input.setRandom();\n  kernel.setRandom();\n  Eigen::array<IndexType, 2> dims;\n  dims[0] = 0;\n  dims[1] = 1;\n\n  std::size_t input_bytes = input.size()  * sizeof(DataType);\n  std::size_t kernel_bytes = kernel.size() * sizeof(DataType);\n  std::size_t result_bytes = result.size() * sizeof(DataType);\n\n  DataType * d_input  = static_cast<DataType*>(sycl_device.allocate(input_bytes));\n  DataType * d_kernel  = static_cast<DataType*>(sycl_device.allocate(kernel_bytes));\n  DataType * d_result =  static_cast<DataType*>(sycl_device.allocate(result_bytes));\n\n  Eigen::TensorMap<Eigen::Tensor<DataType, 2, DataLayout,IndexType> > gpu_input(d_input, input_dims);\n  Eigen::TensorMap<Eigen::Tensor<DataType, 2, DataLayout,IndexType> > gpu_kernel(d_kernel, kernel_dims);\n  Eigen::TensorMap<Eigen::Tensor<DataType, 2, DataLayout,IndexType> > gpu_result(d_result, result_dims);\n  sycl_device.memcpyHostToDevice(d_input, input.data(), input_bytes);\n  sycl_device.memcpyHostToDevice(d_kernel, kernel.data(), kernel_bytes);\n\n  gpu_result.device(sycl_device)=gpu_input.convolve(gpu_kernel, dims);\n  sycl_device.memcpyDeviceToHost(result.data(), d_result, result_bytes);\n\n  VERIFY_IS_APPROX(result(0,0), input(0,0)*kernel(0,0) + input(0,1)*kernel(0,1) +\n                                input(1,0)*kernel(1,0) + input(1,1)*kernel(1,1));\n  VERIFY_IS_APPROX(result(0,1), input(0,1)*kernel(0,0) + input(0,2)*kernel(0,1) +\n                                input(1,1)*kernel(1,0) + input(1,2)*kernel(1,1));\n  VERIFY_IS_APPROX(result(1,0), input(1,0)*kernel(0,0) + input(1,1)*kernel(0,1) +\n                                input(2,0)*kernel(1,0) + input(2,1)*kernel(1,1));\n  VERIFY_IS_APPROX(result(1,1), input(1,1)*kernel(0,0) + input(1,2)*kernel(0,1) +\n                                input(2,1)*kernel(1,0) + input(2,2)*kernel(1,1));\n\n  sycl_device.deallocate(d_input);\n  sycl_device.deallocate(d_kernel);\n  sycl_device.deallocate(d_result);\n}\n\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_modes(const Eigen::SyclDevice& sycl_device){\n\nEigen::array<IndexType, 1> input_dims = {{3}};\nEigen::array<IndexType, 1> kernel_dims = {{3}};\n\nTensor<DataType, 1, DataLayout, IndexType> input(input_dims);\nTensor<DataType, 1, DataLayout, IndexType> kernel(kernel_dims);\n\ninput.setRandom();\nkernel.setRandom();\nEigen::array<IndexType, 1> dims;\ndims[0] = 0;\n\n  input(0) = 1.0f;\n  input(1) = 2.0f;\n  input(2) = 3.0f;\n  kernel(0) = 0.5f;\n  kernel(1) = 1.0f;\n  kernel(2) = 0.0f;\n\n  Eigen::array<std::pair<IndexType, IndexType>, 1> padding;\n\n  // Emulate VALID mode (as defined in\n  // http://docs.scipy.org/doc/numpy/reference/generated/numpy.convolve.html).\n  padding[0] = std::make_pair(0, 0);\n  Tensor<DataType, 1, DataLayout, IndexType> valid(1);\n\n  std::size_t input_bytes = input.size()  * sizeof(DataType);\n  std::size_t kernel_bytes = kernel.size() * sizeof(DataType);\n  std::size_t valid_bytes = valid.size() * sizeof(DataType);\n\n  DataType * d_input  = static_cast<DataType*>(sycl_device.allocate(input_bytes));\n  DataType * d_kernel  = static_cast<DataType*>(sycl_device.allocate(kernel_bytes));\n  DataType * d_valid =  static_cast<DataType*>(sycl_device.allocate(valid_bytes));\n\n  Eigen::TensorMap<Eigen::Tensor<DataType, 1, DataLayout,IndexType> > gpu_input(d_input, input_dims);\n  Eigen::TensorMap<Eigen::Tensor<DataType, 1, DataLayout,IndexType> > gpu_kernel(d_kernel, kernel_dims);\n  Eigen::TensorMap<Eigen::Tensor<DataType, 1, DataLayout,IndexType> > gpu_valid(d_valid, valid.dimensions());\n  sycl_device.memcpyHostToDevice(d_input, input.data(), input_bytes);\n  sycl_device.memcpyHostToDevice(d_kernel, kernel.data(), kernel_bytes);\n\n  gpu_valid.device(sycl_device)=gpu_input.pad(padding).convolve(gpu_kernel, dims);\n  sycl_device.memcpyDeviceToHost(valid.data(), d_valid, valid_bytes);\n\n  VERIFY_IS_EQUAL(valid.dimension(0), 1);\n  VERIFY_IS_APPROX(valid(0), 2.5f);\n\n  // Emulate SAME mode (as defined in\n  // http://docs.scipy.org/doc/numpy/reference/generated/numpy.convolve.html).\n  padding[0] = std::make_pair(1, 1);\n  Tensor<DataType, 1, DataLayout, IndexType> same(3);\n  std::size_t same_bytes = same.size() * sizeof(DataType);\n  DataType * d_same =  static_cast<DataType*>(sycl_device.allocate(same_bytes));\n  Eigen::TensorMap<Eigen::Tensor<DataType, 1, DataLayout,IndexType> > gpu_same(d_same, same.dimensions());\n  gpu_same.device(sycl_device)=gpu_input.pad(padding).convolve(gpu_kernel, dims);\n  sycl_device.memcpyDeviceToHost(same.data(), d_same, same_bytes);\n\n  VERIFY_IS_EQUAL(same.dimension(0), 3);\n  VERIFY_IS_APPROX(same(0), 1.0f);\n  VERIFY_IS_APPROX(same(1), 2.5f);\n  VERIFY_IS_APPROX(same(2), 4.0f);\n\n  // Emulate FULL mode (as defined in\n  // http://docs.scipy.org/doc/numpy/reference/generated/numpy.convolve.html).\n  padding[0] = std::make_pair(2, 2);\n\n  Tensor<DataType, 1, DataLayout, IndexType> full(5);\n  std::size_t full_bytes = full.size() * sizeof(DataType);\n  DataType * d_full =  static_cast<DataType*>(sycl_device.allocate(full_bytes));\n  Eigen::TensorMap<Eigen::Tensor<DataType, 1, DataLayout,IndexType> > gpu_full(d_full, full.dimensions());\n  gpu_full.device(sycl_device)=gpu_input.pad(padding).convolve(gpu_kernel, dims);\n  sycl_device.memcpyDeviceToHost(full.data(), d_full, full_bytes);\n\n  VERIFY_IS_EQUAL(full.dimension(0), 5);\n  VERIFY_IS_APPROX(full(0), 0.0f);\n  VERIFY_IS_APPROX(full(1), 1.0f);\n  VERIFY_IS_APPROX(full(2), 2.5f);\n  VERIFY_IS_APPROX(full(3), 4.0f);\n  VERIFY_IS_APPROX(full(4), 1.5f);\n\n  sycl_device.deallocate(d_input);\n  sycl_device.deallocate(d_kernel);\n  sycl_device.deallocate(d_valid);\n  sycl_device.deallocate(d_same);\n  sycl_device.deallocate(d_full);\n\n}\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_strides(const Eigen::SyclDevice& sycl_device){\n\n  Eigen::array<IndexType, 1> input_dims = {{13}};\n  Eigen::array<IndexType, 1> kernel_dims = {{3}};\n\n  Tensor<DataType, 1, DataLayout, IndexType> input(input_dims);\n  Tensor<DataType, 1, DataLayout, IndexType> kernel(kernel_dims);\n  Tensor<DataType, 1, DataLayout, IndexType> result(2);\n\n  input.setRandom();\n  kernel.setRandom();\n  Eigen::array<IndexType, 1> dims;\n  dims[0] = 0;\n\n  Eigen::array<IndexType, 1> stride_of_3;\n  stride_of_3[0] = 3;\n  Eigen::array<IndexType, 1> stride_of_2;\n  stride_of_2[0] = 2;\n\n  std::size_t input_bytes = input.size()  * sizeof(DataType);\n  std::size_t kernel_bytes = kernel.size() * sizeof(DataType);\n  std::size_t result_bytes = result.size() * sizeof(DataType);\n\n  DataType * d_input  = static_cast<DataType*>(sycl_device.allocate(input_bytes));\n  DataType * d_kernel  = static_cast<DataType*>(sycl_device.allocate(kernel_bytes));\n  DataType * d_result =  static_cast<DataType*>(sycl_device.allocate(result_bytes));\n\n  Eigen::TensorMap<Eigen::Tensor<DataType, 1, DataLayout,IndexType> > gpu_input(d_input, input_dims);\n  Eigen::TensorMap<Eigen::Tensor<DataType, 1, DataLayout,IndexType> > gpu_kernel(d_kernel, kernel_dims);\n  Eigen::TensorMap<Eigen::Tensor<DataType, 1, DataLayout,IndexType> > gpu_result(d_result, result.dimensions());\n  sycl_device.memcpyHostToDevice(d_input, input.data(), input_bytes);\n  sycl_device.memcpyHostToDevice(d_kernel, kernel.data(), kernel_bytes);\n\n  gpu_result.device(sycl_device)=gpu_input.stride(stride_of_3).convolve(gpu_kernel, dims).stride(stride_of_2);\n  sycl_device.memcpyDeviceToHost(result.data(), d_result, result_bytes);\n\n  VERIFY_IS_EQUAL(result.dimension(0), 2);\n  VERIFY_IS_APPROX(result(0), (input(0)*kernel(0) + input(3)*kernel(1) +\n                               input(6)*kernel(2)));\n  VERIFY_IS_APPROX(result(1), (input(6)*kernel(0) + input(9)*kernel(1) +\n                               input(12)*kernel(2)));\n}\n\ntemplate <typename Dev_selector> void tensorConvolutionPerDevice(Dev_selector& s){\n  QueueInterface queueInterface(s);\n  auto sycl_device=Eigen::SyclDevice(&queueInterface);\n  test_larg_expr1D<float, RowMajor, int64_t>(sycl_device);\n  test_larg_expr1D<float, ColMajor, int64_t>(sycl_device);\n  test_larg_expr2D<float, RowMajor, int64_t>(sycl_device);\n  test_larg_expr2D<float, ColMajor, int64_t>(sycl_device);\n  test_larg_expr3D<float, RowMajor, int64_t>(sycl_device);\n  test_larg_expr3D<float, ColMajor, int64_t>(sycl_device);\n  test_evals<float, ColMajor, int64_t>(sycl_device);\n  test_evals<float, RowMajor, int64_t>(sycl_device);\n  test_expr<float, ColMajor, int64_t>(sycl_device);\n  test_expr<float, RowMajor, int64_t>(sycl_device);\n  test_modes<float, ColMajor, int64_t>(sycl_device);\n  test_modes<float, RowMajor, int64_t>(sycl_device);\n  test_strides<float, ColMajor, int64_t>(sycl_device);\n  test_strides<float, RowMajor, int64_t>(sycl_device);\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_convolution_sycl) {\n  for (const auto& device :Eigen::get_sycl_supported_devices()) {\n    CALL_SUBTEST(tensorConvolutionPerDevice(device));\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_custom_index.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <limits>\n#include <map>\n\n#include <Eigen/Dense>\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\n\n\ntemplate <int DataLayout>\nstatic void test_map_as_index()\n{\n#ifdef EIGEN_HAS_SFINAE\n  Tensor<float, 4, DataLayout> tensor(2, 3, 5, 7);\n  tensor.setRandom();\n\n  using NormalIndex = DSizes<ptrdiff_t, 4>;\n  using CustomIndex = std::map<ptrdiff_t, ptrdiff_t>;\n  CustomIndex coeffC;\n  coeffC[0] = 1;\n  coeffC[1] = 2;\n  coeffC[2] = 4;\n  coeffC[3] = 1;\n  NormalIndex coeff(1,2,4,1);\n\n  VERIFY_IS_EQUAL(tensor.coeff(coeffC), tensor.coeff(coeff));\n  VERIFY_IS_EQUAL(tensor.coeffRef(coeffC), tensor.coeffRef(coeff));\n#endif\n}\n\n\ntemplate <int DataLayout>\nstatic void test_matrix_as_index()\n{\n#ifdef EIGEN_HAS_SFINAE\n  Tensor<float, 4, DataLayout> tensor(2, 3, 5, 7);\n  tensor.setRandom();\n\n  using NormalIndex = DSizes<ptrdiff_t, 4>;\n  using CustomIndex = Matrix<unsigned int, 4, 1>;\n  CustomIndex coeffC(1,2,4,1);\n  NormalIndex coeff(1,2,4,1);\n\n  VERIFY_IS_EQUAL(tensor.coeff(coeffC), tensor.coeff(coeff));\n  VERIFY_IS_EQUAL(tensor.coeffRef(coeffC), tensor.coeffRef(coeff));\n#endif\n}\n\n\ntemplate <int DataLayout>\nstatic void test_varlist_as_index()\n{\n#ifdef EIGEN_HAS_SFINAE\n  Tensor<float, 4, DataLayout> tensor(2, 3, 5, 7);\n  tensor.setRandom();\n\n  DSizes<ptrdiff_t, 4> coeff(1,2,4,1);\n\n  VERIFY_IS_EQUAL(tensor.coeff({1,2,4,1}), tensor.coeff(coeff));\n  VERIFY_IS_EQUAL(tensor.coeffRef({1,2,4,1}), tensor.coeffRef(coeff));\n#endif\n}\n\n\ntemplate <int DataLayout>\nstatic void test_sizes_as_index()\n{\n#ifdef EIGEN_HAS_SFINAE\n  Tensor<float, 4, DataLayout> tensor(2, 3, 5, 7);\n  tensor.setRandom();\n\n  DSizes<ptrdiff_t, 4> coeff(1,2,4,1);\n  Sizes<1,2,4,1> coeffC;\n\n  VERIFY_IS_EQUAL(tensor.coeff(coeffC), tensor.coeff(coeff));\n  VERIFY_IS_EQUAL(tensor.coeffRef(coeffC), tensor.coeffRef(coeff));\n#endif\n}\n\n\nEIGEN_DECLARE_TEST(cxx11_tensor_custom_index) {\n  test_map_as_index<ColMajor>();\n  test_map_as_index<RowMajor>();\n  test_matrix_as_index<ColMajor>();\n  test_matrix_as_index<RowMajor>();\n  test_varlist_as_index<ColMajor>();\n  test_varlist_as_index<RowMajor>();\n  test_sizes_as_index<ColMajor>();\n  test_sizes_as_index<RowMajor>();\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_custom_op.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\n\n\nstruct InsertZeros {\n  DSizes<DenseIndex, 2> dimensions(const Tensor<float, 2>& input) const {\n    DSizes<DenseIndex, 2> result;\n    result[0] = input.dimension(0) * 2;\n    result[1] = input.dimension(1) * 2;\n    return result;\n  }\n\n  template <typename Output, typename Device>\n  void eval(const Tensor<float, 2>& input, Output& output, const Device& device) const\n  {\n    array<DenseIndex, 2> strides;\n    strides[0] = 2;\n    strides[1] = 2;\n    output.stride(strides).device(device) = input;\n\n    Eigen::DSizes<DenseIndex, 2> offsets(1,1);\n    Eigen::DSizes<DenseIndex, 2> extents(output.dimension(0)-1, output.dimension(1)-1);\n    output.slice(offsets, extents).stride(strides).device(device) = input.constant(0.0f);\n  }\n};\n\nstatic void test_custom_unary_op()\n{\n  Tensor<float, 2> tensor(3,5);\n  tensor.setRandom();\n\n  Tensor<float, 2> result = tensor.customOp(InsertZeros());\n  VERIFY_IS_EQUAL(result.dimension(0), 6);\n  VERIFY_IS_EQUAL(result.dimension(1), 10);\n\n  for (int i = 0; i < 6; i+=2) {\n    for (int j = 0; j < 10; j+=2) {\n      VERIFY_IS_EQUAL(result(i, j), tensor(i/2, j/2));\n    }\n  }\n  for (int i = 1; i < 6; i+=2) {\n    for (int j = 1; j < 10; j+=2) {\n      VERIFY_IS_EQUAL(result(i, j), 0);\n    }\n  }\n}\n\n\nstruct BatchMatMul {\n  DSizes<DenseIndex, 3> dimensions(const Tensor<float, 3>& input1, const Tensor<float, 3>& input2) const {\n    DSizes<DenseIndex, 3> result;\n    result[0] = input1.dimension(0);\n    result[1] = input2.dimension(1);\n    result[2] = input2.dimension(2);\n    return result;\n  }\n\n  template <typename Output, typename Device>\n  void eval(const Tensor<float, 3>& input1, const Tensor<float, 3>& input2,\n            Output& output, const Device& device) const\n  {\n    typedef Tensor<float, 3>::DimensionPair DimPair;\n    array<DimPair, 1> dims;\n    dims[0] = DimPair(1, 0);\n    for (int i = 0; i < output.dimension(2); ++i) {\n      output.template chip<2>(i).device(device) = input1.chip<2>(i).contract(input2.chip<2>(i), dims);\n    }\n  }\n};\n\n\nstatic void test_custom_binary_op()\n{\n  Tensor<float, 3> tensor1(2,3,5);\n  tensor1.setRandom();\n  Tensor<float, 3> tensor2(3,7,5);\n  tensor2.setRandom();\n\n  Tensor<float, 3> result = tensor1.customOp(tensor2, BatchMatMul());\n  for (int i = 0; i < 5; ++i) {\n    typedef Tensor<float, 3>::DimensionPair DimPair;\n    array<DimPair, 1> dims;\n    dims[0] = DimPair(1, 0);\n    Tensor<float, 2> reference = tensor1.chip<2>(i).contract(tensor2.chip<2>(i), dims);\n    TensorRef<Tensor<float, 2> > val = result.chip<2>(i);\n    for (int j = 0; j < 2; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        VERIFY_IS_APPROX(val(j, k), reference(j, k));\n      }\n    }\n  }\n}\n\n\nEIGEN_DECLARE_TEST(cxx11_tensor_custom_op)\n{\n  CALL_SUBTEST(test_custom_unary_op());\n  CALL_SUBTEST(test_custom_binary_op());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_custom_op_sycl.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016\n// Mehdi Goli    Codeplay Software Ltd.\n// Ralph Potter  Codeplay Software Ltd.\n// Luke Iwanski  Codeplay Software Ltd.\n// Contact: <eigen@codeplay.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_TEST_NO_LONGDOUBLE\n#define EIGEN_TEST_NO_COMPLEX\n\n#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int64_t\n#define EIGEN_USE_SYCL\n\n#include \"main.h\"\n#include <unsupported/Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\ntemplate<typename TensorType>\nstruct InsertZeros {\n  DSizes<DenseIndex, 2> dimensions(const TensorType& input) const {\n    DSizes<DenseIndex, 2> result;\n    result[0] = input.dimension(0) * 2;\n    result[1] = input.dimension(1) * 2;\n    return result;\n  }\n\n  template <typename Output, typename Device>\n  void eval(const TensorType& input, Output& output, const Device& device) const\n  {\n    array<DenseIndex, 2> strides;\n    strides[0] = 2;\n    strides[1] = 2;\n    output.stride(strides).device(device) = input;\n\n    Eigen::DSizes<DenseIndex, 2> offsets(1,1);\n    Eigen::DSizes<DenseIndex, 2> extents(output.dimension(0)-1, output.dimension(1)-1);\n    output.slice(offsets, extents).stride(strides).device(device) = input.constant(0.0f);\n  }\n};\n\ntemplate<typename DataType, int DataLayout, typename IndexType>\nstatic void test_custom_unary_op_sycl(const Eigen::SyclDevice &sycl_device)\n{\n  IndexType sizeDim1 = 3;\n  IndexType sizeDim2 = 5;\n  Eigen::array<IndexType, 2> tensorRange = {{sizeDim1, sizeDim2}};\n  Eigen::array<IndexType, 2> tensorResultRange = {{6, 10}};\n\n  Eigen::Tensor<DataType, 2, DataLayout, IndexType> in1(tensorRange);\n  Eigen::Tensor<DataType, 2, DataLayout, IndexType> out(tensorResultRange);\n\n  DataType * gpu_in1_data  = static_cast<DataType*>(sycl_device.allocate(in1.dimensions().TotalSize()*sizeof(DataType)));\n  DataType * gpu_out_data =  static_cast<DataType*>(sycl_device.allocate(out.dimensions().TotalSize()*sizeof(DataType)));\n\n  typedef Eigen::TensorMap<Eigen::Tensor<DataType, 2, DataLayout, IndexType> > TensorType;\n  TensorType gpu_in1(gpu_in1_data, tensorRange);\n  TensorType gpu_out(gpu_out_data, tensorResultRange);\n\n  in1.setRandom();\n  sycl_device.memcpyHostToDevice(gpu_in1_data, in1.data(),(in1.dimensions().TotalSize())*sizeof(DataType));\n  gpu_out.device(sycl_device) = gpu_in1.customOp(InsertZeros<TensorType>());\n  sycl_device.memcpyDeviceToHost(out.data(), gpu_out_data,(out.dimensions().TotalSize())*sizeof(DataType));\n\n  VERIFY_IS_EQUAL(out.dimension(0), 6);\n  VERIFY_IS_EQUAL(out.dimension(1), 10);\n\n  for (int i = 0; i < 6; i+=2) {\n    for (int j = 0; j < 10; j+=2) {\n      VERIFY_IS_EQUAL(out(i, j), in1(i/2, j/2));\n    }\n  }\n  for (int i = 1; i < 6; i+=2) {\n    for (int j = 1; j < 10; j+=2) {\n      VERIFY_IS_EQUAL(out(i, j), 0);\n    }\n  }\n  sycl_device.deallocate(gpu_in1_data);\nsycl_device.deallocate(gpu_out_data);\n}\n\ntemplate<typename TensorType>\nstruct BatchMatMul {\n  DSizes<DenseIndex, 3> dimensions(const TensorType& input1, const TensorType& input2) const {\n    DSizes<DenseIndex, 3> result;\n    result[0] = input1.dimension(0);\n    result[1] = input2.dimension(1);\n    result[2] = input2.dimension(2);\n    return result;\n  }\n\n  template <typename Output, typename Device>\n  void eval(const TensorType& input1, const TensorType& input2,\n            Output& output, const Device& device) const\n  {\n    typedef typename TensorType::DimensionPair DimPair;\n    array<DimPair, 1> dims;\n    dims[0] = DimPair(1, 0);\n    for (int64_t i = 0; i < output.dimension(2); ++i) {\n      output.template chip<2>(i).device(device) = input1.template chip<2>(i).contract(input2.template chip<2>(i), dims);\n    }\n  }\n};\n\ntemplate<typename DataType, int DataLayout, typename IndexType>\nstatic void test_custom_binary_op_sycl(const Eigen::SyclDevice &sycl_device)\n{\n\n  Eigen::array<IndexType, 3> tensorRange1 = {{2, 3, 5}};\n  Eigen::array<IndexType, 3> tensorRange2 = {{3,7,5}};\n  Eigen::array<IndexType, 3> tensorResultRange  = {{2, 7, 5}};\n\n  Eigen::Tensor<DataType, 3, DataLayout, IndexType> in1(tensorRange1);\n  Eigen::Tensor<DataType, 3, DataLayout, IndexType> in2(tensorRange2);\n  Eigen::Tensor<DataType, 3, DataLayout, IndexType> out(tensorResultRange);\n\n  DataType * gpu_in1_data  = static_cast<DataType*>(sycl_device.allocate(in1.dimensions().TotalSize()*sizeof(DataType)));\n  DataType * gpu_in2_data  = static_cast<DataType*>(sycl_device.allocate(in2.dimensions().TotalSize()*sizeof(DataType)));\n  DataType * gpu_out_data =  static_cast<DataType*>(sycl_device.allocate(out.dimensions().TotalSize()*sizeof(DataType)));\n\n  typedef Eigen::TensorMap<Eigen::Tensor<DataType, 3, DataLayout, IndexType> > TensorType;\n  TensorType gpu_in1(gpu_in1_data, tensorRange1);\n  TensorType gpu_in2(gpu_in2_data, tensorRange2);\n  TensorType gpu_out(gpu_out_data, tensorResultRange);\n\n  in1.setRandom();\n  in2.setRandom();\n\n  sycl_device.memcpyHostToDevice(gpu_in1_data, in1.data(),(in1.dimensions().TotalSize())*sizeof(DataType));\n  sycl_device.memcpyHostToDevice(gpu_in2_data, in2.data(),(in2.dimensions().TotalSize())*sizeof(DataType));\n\n  gpu_out.device(sycl_device) = gpu_in1.customOp(gpu_in2, BatchMatMul<TensorType>());\n  sycl_device.memcpyDeviceToHost(out.data(), gpu_out_data,(out.dimensions().TotalSize())*sizeof(DataType));\n\n  for (IndexType i = 0; i < 5; ++i) {\n    typedef typename Eigen::Tensor<DataType, 3, DataLayout, IndexType>::DimensionPair DimPair;\n    array<DimPair, 1> dims;\n    dims[0] = DimPair(1, 0);\n    Eigen::Tensor<DataType, 2, DataLayout, IndexType> reference = in1.template chip<2>(i).contract(in2.template chip<2>(i), dims);\n    TensorRef<Eigen::Tensor<DataType, 2, DataLayout, IndexType> > val = out.template chip<2>(i);\n    for (IndexType j = 0; j < 2; ++j) {\n      for (IndexType k = 0; k < 7; ++k) {\n        VERIFY_IS_APPROX(val(j, k), reference(j, k));\n      }\n    }\n  }\n  sycl_device.deallocate(gpu_in1_data);\n  sycl_device.deallocate(gpu_in2_data);\n  sycl_device.deallocate(gpu_out_data);\n}\n\ntemplate <typename DataType, typename Dev_selector> void custom_op_perDevice(Dev_selector s){\n  QueueInterface queueInterface(s);\n  auto sycl_device = Eigen::SyclDevice(&queueInterface);\n  test_custom_unary_op_sycl<DataType, RowMajor, int64_t>(sycl_device);\n  test_custom_unary_op_sycl<DataType, ColMajor, int64_t>(sycl_device);\n  test_custom_binary_op_sycl<DataType, ColMajor, int64_t>(sycl_device);\n  test_custom_binary_op_sycl<DataType, RowMajor, int64_t>(sycl_device);\n\n}\nEIGEN_DECLARE_TEST(cxx11_tensor_custom_op_sycl) {\n  for (const auto& device :Eigen::get_sycl_supported_devices()) {\n    CALL_SUBTEST(custom_op_perDevice<float>(device));\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_device.cu",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_TEST_NO_LONGDOUBLE\n#define EIGEN_TEST_NO_COMPLEX\n\n#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int\n#define EIGEN_USE_GPU\n\n#include \"main.h\"\n#include <unsupported/Eigen/CXX11/Tensor>\n\n#include <unsupported/Eigen/CXX11/src/Tensor/TensorGpuHipCudaDefines.h>\n\nusing Eigen::Tensor;\nusing Eigen::RowMajor;\n\n// Context for evaluation on cpu\nstruct CPUContext {\n  CPUContext(const Eigen::Tensor<float, 3>& in1, Eigen::Tensor<float, 3>& in2, Eigen::Tensor<float, 3>& out) : in1_(in1), in2_(in2), out_(out), kernel_1d_(2), kernel_2d_(2,2), kernel_3d_(2,2,2) {\n    kernel_1d_(0) = 3.14f;\n    kernel_1d_(1) = 2.7f;\n\n    kernel_2d_(0,0) = 3.14f;\n    kernel_2d_(1,0) = 2.7f;\n    kernel_2d_(0,1) = 0.2f;\n    kernel_2d_(1,1) = 7.0f;\n\n    kernel_3d_(0,0,0) = 3.14f;\n    kernel_3d_(0,1,0) = 2.7f;\n    kernel_3d_(0,0,1) = 0.2f;\n    kernel_3d_(0,1,1) = 7.0f;\n    kernel_3d_(1,0,0) = -1.0f;\n    kernel_3d_(1,1,0) = -0.3f;\n    kernel_3d_(1,0,1) = -0.7f;\n    kernel_3d_(1,1,1) = -0.5f;\n  }\n\n  const Eigen::DefaultDevice& device() const { return cpu_device_; }\n\n  const Eigen::Tensor<float, 3>& in1() const { return in1_; }\n  const Eigen::Tensor<float, 3>& in2() const { return in2_; }\n  Eigen::Tensor<float, 3>& out() { return out_; }\n  const Eigen::Tensor<float, 1>& kernel1d() const { return kernel_1d_; }\n  const Eigen::Tensor<float, 2>& kernel2d() const { return kernel_2d_; }\n  const Eigen::Tensor<float, 3>& kernel3d() const { return kernel_3d_; }\n\n private:\n  const Eigen::Tensor<float, 3>& in1_;\n  const Eigen::Tensor<float, 3>& in2_;\n  Eigen::Tensor<float, 3>& out_;\n\n  Eigen::Tensor<float, 1> kernel_1d_;\n  Eigen::Tensor<float, 2> kernel_2d_;\n  Eigen::Tensor<float, 3> kernel_3d_;\n\n  Eigen::DefaultDevice cpu_device_;\n};\n\n\n// Context for evaluation on GPU\nstruct GPUContext {\n  GPUContext(const Eigen::TensorMap<Eigen::Tensor<float, 3> >& in1, Eigen::TensorMap<Eigen::Tensor<float, 3> >& in2, Eigen::TensorMap<Eigen::Tensor<float, 3> >& out) : in1_(in1), in2_(in2), out_(out), gpu_device_(&stream_) {\n    assert(gpuMalloc((void**)(&kernel_1d_), 2*sizeof(float)) == gpuSuccess);\n    float kernel_1d_val[] = {3.14f, 2.7f};\n    assert(gpuMemcpy(kernel_1d_, kernel_1d_val, 2*sizeof(float), gpuMemcpyHostToDevice) == gpuSuccess);\n\n    assert(gpuMalloc((void**)(&kernel_2d_), 4*sizeof(float)) == gpuSuccess);\n    float kernel_2d_val[] = {3.14f, 2.7f, 0.2f, 7.0f};\n    assert(gpuMemcpy(kernel_2d_, kernel_2d_val, 4*sizeof(float), gpuMemcpyHostToDevice) == gpuSuccess);\n\n    assert(gpuMalloc((void**)(&kernel_3d_), 8*sizeof(float)) == gpuSuccess);\n    float kernel_3d_val[] = {3.14f, -1.0f, 2.7f, -0.3f, 0.2f, -0.7f, 7.0f, -0.5f};\n    assert(gpuMemcpy(kernel_3d_, kernel_3d_val, 8*sizeof(float), gpuMemcpyHostToDevice) == gpuSuccess);\n  }\n  ~GPUContext() {\n    assert(gpuFree(kernel_1d_) == gpuSuccess);\n    assert(gpuFree(kernel_2d_) == gpuSuccess);\n    assert(gpuFree(kernel_3d_) == gpuSuccess);\n  }\n\n  const Eigen::GpuDevice& device() const { return gpu_device_; }\n\n  const Eigen::TensorMap<Eigen::Tensor<float, 3> >& in1() const { return in1_; }\n  const Eigen::TensorMap<Eigen::Tensor<float, 3> >& in2() const { return in2_; }\n  Eigen::TensorMap<Eigen::Tensor<float, 3> >& out() { return out_; }\n  Eigen::TensorMap<Eigen::Tensor<float, 1> > kernel1d() const { return Eigen::TensorMap<Eigen::Tensor<float, 1> >(kernel_1d_, 2); }\n  Eigen::TensorMap<Eigen::Tensor<float, 2> > kernel2d() const { return Eigen::TensorMap<Eigen::Tensor<float, 2> >(kernel_2d_, 2, 2); }\n  Eigen::TensorMap<Eigen::Tensor<float, 3> > kernel3d() const { return Eigen::TensorMap<Eigen::Tensor<float, 3> >(kernel_3d_, 2, 2, 2); }\n\n private:\n  const Eigen::TensorMap<Eigen::Tensor<float, 3> >& in1_;\n  const Eigen::TensorMap<Eigen::Tensor<float, 3> >& in2_;\n  Eigen::TensorMap<Eigen::Tensor<float, 3> >& out_;\n\n  float* kernel_1d_;\n  float* kernel_2d_;\n  float* kernel_3d_;\n\n  Eigen::GpuStreamDevice stream_;\n  Eigen::GpuDevice gpu_device_;\n};\n\n\n// The actual expression to evaluate\ntemplate <typename Context>\nvoid test_contextual_eval(Context* context)\n{\n  context->out().device(context->device()) = context->in1() + context->in2() * 3.14f + context->in1().constant(2.718f);\n}\n\ntemplate <typename Context>\nvoid test_forced_contextual_eval(Context* context)\n{\n  context->out().device(context->device()) = (context->in1() + context->in2()).eval() * 3.14f + context->in1().constant(2.718f);\n}\n\ntemplate <typename Context>\nvoid test_compound_assignment(Context* context)\n{\n  context->out().device(context->device()) = context->in1().constant(2.718f);\n  context->out().device(context->device()) += context->in1() + context->in2() * 3.14f;\n}\n\n\ntemplate <typename Context>\nvoid test_contraction(Context* context)\n{\n  Eigen::array<std::pair<int, int>, 2> dims;\n  dims[0] = std::make_pair(1, 1);\n  dims[1] = std::make_pair(2, 2);\n\n  Eigen::array<int, 2> shape(40, 50*70);\n\n  Eigen::DSizes<int, 2> indices(0,0);\n  Eigen::DSizes<int, 2> sizes(40,40);\n\n  context->out().reshape(shape).slice(indices, sizes).device(context->device()) = context->in1().contract(context->in2(), dims);\n}\n\n\ntemplate <typename Context>\nvoid test_1d_convolution(Context* context)\n{\n  Eigen::DSizes<int, 3> indices(0,0,0);\n  Eigen::DSizes<int, 3> sizes(40,49,70);\n\n  Eigen::array<int, 1> dims(1);\n  context->out().slice(indices, sizes).device(context->device()) = context->in1().convolve(context->kernel1d(), dims);\n}\n\ntemplate <typename Context>\nvoid test_2d_convolution(Context* context)\n{\n  Eigen::DSizes<int, 3> indices(0,0,0);\n  Eigen::DSizes<int, 3> sizes(40,49,69);\n\n  Eigen::array<int, 2> dims(1,2);\n  context->out().slice(indices, sizes).device(context->device()) = context->in1().convolve(context->kernel2d(), dims);\n}\n\ntemplate <typename Context>\nvoid test_3d_convolution(Context* context)\n{\n  Eigen::DSizes<int, 3> indices(0,0,0);\n  Eigen::DSizes<int, 3> sizes(39,49,69);\n\n  Eigen::array<int, 3> dims(0,1,2);\n  context->out().slice(indices, sizes).device(context->device()) = context->in1().convolve(context->kernel3d(), dims);\n}\n\n\nvoid test_cpu() {\n  Eigen::Tensor<float, 3> in1(40,50,70);\n  Eigen::Tensor<float, 3> in2(40,50,70);\n  Eigen::Tensor<float, 3> out(40,50,70);\n\n  in1 = in1.random() + in1.constant(10.0f);\n  in2 = in2.random() + in2.constant(10.0f);\n\n  CPUContext context(in1, in2, out);\n  test_contextual_eval(&context);\n  for (int i = 0; i < 40; ++i) {\n    for (int j = 0; j < 50; ++j) {\n      for (int k = 0; k < 70; ++k) {\n        VERIFY_IS_APPROX(out(i,j,k), in1(i,j,k) + in2(i,j,k) * 3.14f + 2.718f);\n      }\n    }\n  }\n\n  test_forced_contextual_eval(&context);\n  for (int i = 0; i < 40; ++i) {\n    for (int j = 0; j < 50; ++j) {\n      for (int k = 0; k < 70; ++k) {\n        VERIFY_IS_APPROX(out(i,j,k), (in1(i,j,k) + in2(i,j,k)) * 3.14f + 2.718f);\n      }\n    }\n  }\n\n  test_compound_assignment(&context);\n  for (int i = 0; i < 40; ++i) {\n    for (int j = 0; j < 50; ++j) {\n      for (int k = 0; k < 70; ++k) {\n        VERIFY_IS_APPROX(out(i,j,k), in1(i,j,k) + in2(i,j,k) * 3.14f + 2.718f);\n      }\n    }\n  }\n\n  test_contraction(&context);\n  for (int i = 0; i < 40; ++i) {\n    for (int j = 0; j < 40; ++j) {\n      const float result = out(i,j,0);\n      float expected = 0;\n      for (int k = 0; k < 50; ++k) {\n        for (int l = 0; l < 70; ++l) {\n          expected += in1(i, k, l) * in2(j, k, l);\n        }\n      }\n      VERIFY_IS_APPROX(expected, result);\n    }\n  }\n\n  test_1d_convolution(&context);\n  for (int i = 0; i < 40; ++i) {\n    for (int j = 0; j < 49; ++j) {\n      for (int k = 0; k < 70; ++k) {\n        VERIFY_IS_APPROX(out(i,j,k), (in1(i,j,k) * 3.14f + in1(i,j+1,k) * 2.7f));\n      }\n    }\n  }\n\n  test_2d_convolution(&context);\n  for (int i = 0; i < 40; ++i) {\n    for (int j = 0; j < 49; ++j) {\n      for (int k = 0; k < 69; ++k) {\n        const float result = out(i,j,k);\n        const float expected = (in1(i,j,k) * 3.14f + in1(i,j+1,k) * 2.7f) +\n                               (in1(i,j,k+1) * 0.2f + in1(i,j+1,k+1) * 7.0f);\n        if (fabs(expected) < 1e-4f && fabs(result) < 1e-4f) {\n          continue;\n        }\n        VERIFY_IS_APPROX(expected, result);\n      }\n    }\n  }\n\n  test_3d_convolution(&context);\n  for (int i = 0; i < 39; ++i) {\n    for (int j = 0; j < 49; ++j) {\n      for (int k = 0; k < 69; ++k) {\n        const float result = out(i,j,k);\n        const float expected = (in1(i,j,k) * 3.14f + in1(i,j+1,k) * 2.7f +\n                                in1(i,j,k+1) * 0.2f + in1(i,j+1,k+1) * 7.0f) +\n                               (in1(i+1,j,k) * -1.0f + in1(i+1,j+1,k) * -0.3f +\n                                in1(i+1,j,k+1) * -0.7f + in1(i+1,j+1,k+1) * -0.5f);\n        if (fabs(expected) < 1e-4f && fabs(result) < 1e-4f) {\n          continue;\n        }\n        VERIFY_IS_APPROX(expected, result);\n      }\n    }\n  }\n}\n\nvoid test_gpu() {\n  Eigen::Tensor<float, 3> in1(40,50,70);\n  Eigen::Tensor<float, 3> in2(40,50,70);\n  Eigen::Tensor<float, 3> out(40,50,70);\n  in1 = in1.random() + in1.constant(10.0f);\n  in2 = in2.random() + in2.constant(10.0f);\n\n  std::size_t in1_bytes = in1.size() * sizeof(float);\n  std::size_t in2_bytes = in2.size() * sizeof(float);\n  std::size_t out_bytes = out.size() * sizeof(float);\n\n  float* d_in1;\n  float* d_in2;\n  float* d_out;\n  gpuMalloc((void**)(&d_in1), in1_bytes);\n  gpuMalloc((void**)(&d_in2), in2_bytes);\n  gpuMalloc((void**)(&d_out), out_bytes);\n\n  gpuMemcpy(d_in1, in1.data(), in1_bytes, gpuMemcpyHostToDevice);\n  gpuMemcpy(d_in2, in2.data(), in2_bytes, gpuMemcpyHostToDevice);\n\n  Eigen::TensorMap<Eigen::Tensor<float, 3> > gpu_in1(d_in1, 40,50,70);\n  Eigen::TensorMap<Eigen::Tensor<float, 3> > gpu_in2(d_in2, 40,50,70);\n  Eigen::TensorMap<Eigen::Tensor<float, 3> > gpu_out(d_out, 40,50,70);\n\n  GPUContext context(gpu_in1, gpu_in2, gpu_out);\n  test_contextual_eval(&context);\n  assert(gpuMemcpy(out.data(), d_out, out_bytes, gpuMemcpyDeviceToHost) == gpuSuccess);\n  for (int i = 0; i < 40; ++i) {\n    for (int j = 0; j < 50; ++j) {\n      for (int k = 0; k < 70; ++k) {\n        VERIFY_IS_APPROX(out(i,j,k), in1(i,j,k) + in2(i,j,k) * 3.14f + 2.718f);\n      }\n    }\n  }\n\n  test_forced_contextual_eval(&context);\n  assert(gpuMemcpy(out.data(), d_out, out_bytes, gpuMemcpyDeviceToHost) == gpuSuccess);\n  for (int i = 0; i < 40; ++i) {\n    for (int j = 0; j < 50; ++j) {\n      for (int k = 0; k < 70; ++k) {\n        VERIFY_IS_APPROX(out(i,j,k), (in1(i,j,k) + in2(i,j,k)) * 3.14f + 2.718f);\n      }\n    }\n  }\n\n  test_compound_assignment(&context);\n  assert(gpuMemcpy(out.data(), d_out, out_bytes, gpuMemcpyDeviceToHost) == gpuSuccess);\n  for (int i = 0; i < 40; ++i) {\n    for (int j = 0; j < 50; ++j) {\n      for (int k = 0; k < 70; ++k) {\n        VERIFY_IS_APPROX(out(i,j,k), in1(i,j,k) + in2(i,j,k) * 3.14f + 2.718f);\n      }\n    }\n  }\n\n  test_contraction(&context);\n  assert(gpuMemcpy(out.data(), d_out, out_bytes, gpuMemcpyDeviceToHost) == gpuSuccess);\n  for (int i = 0; i < 40; ++i) {\n    for (int j = 0; j < 40; ++j) {\n      const float result = out(i,j,0);\n      float expected = 0;\n      for (int k = 0; k < 50; ++k) {\n        for (int l = 0; l < 70; ++l) {\n          expected += in1(i, k, l) * in2(j, k, l);\n        }\n      }\n      VERIFY_IS_APPROX(expected, result);\n    }\n  }\n\n  test_1d_convolution(&context);\n  assert(gpuMemcpyAsync(out.data(), d_out, out_bytes, gpuMemcpyDeviceToHost, context.device().stream()) == gpuSuccess);\n  assert(gpuStreamSynchronize(context.device().stream()) == gpuSuccess);\n  for (int i = 0; i < 40; ++i) {\n    for (int j = 0; j < 49; ++j) {\n      for (int k = 0; k < 70; ++k) {\n        VERIFY_IS_APPROX(out(i,j,k), (in1(i,j,k) * 3.14f + in1(i,j+1,k) * 2.7f));\n      }\n    }\n  }\n\n  test_2d_convolution(&context);\n  assert(gpuMemcpyAsync(out.data(), d_out, out_bytes, gpuMemcpyDeviceToHost, context.device().stream()) == gpuSuccess);\n  assert(gpuStreamSynchronize(context.device().stream()) == gpuSuccess);\n  for (int i = 0; i < 40; ++i) {\n    for (int j = 0; j < 49; ++j) {\n      for (int k = 0; k < 69; ++k) {\n        const float result = out(i,j,k);\n        const float expected = (in1(i,j,k) * 3.14f + in1(i,j+1,k) * 2.7f +\n                                in1(i,j,k+1) * 0.2f + in1(i,j+1,k+1) * 7.0f);\n        VERIFY_IS_APPROX(expected, result);\n      }\n    }\n  }\n\n#if !defined(EIGEN_USE_HIP)\n// disable this test on the HIP platform\n// 3D tensor convolutions seem to hang on the HIP platform\n\n  test_3d_convolution(&context);\n  assert(gpuMemcpyAsync(out.data(), d_out, out_bytes, gpuMemcpyDeviceToHost, context.device().stream()) == gpuSuccess);\n  assert(gpuStreamSynchronize(context.device().stream()) == gpuSuccess);\n  for (int i = 0; i < 39; ++i) {\n    for (int j = 0; j < 49; ++j) {\n      for (int k = 0; k < 69; ++k) {\n       const float result = out(i,j,k);\n        const float expected = (in1(i,j,k) * 3.14f + in1(i,j+1,k) * 2.7f +\n                                in1(i,j,k+1) * 0.2f + in1(i,j+1,k+1) * 7.0f +\n                                in1(i+1,j,k) * -1.0f + in1(i+1,j+1,k) * -0.3f +\n                                in1(i+1,j,k+1) * -0.7f + in1(i+1,j+1,k+1) * -0.5f);\n        VERIFY_IS_APPROX(expected, result);\n      }\n    }\n  }\n\n#endif\n \n}\n\n\nEIGEN_DECLARE_TEST(cxx11_tensor_device)\n{\n  CALL_SUBTEST_1(test_cpu());\n  CALL_SUBTEST_2(test_gpu());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_device_sycl.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016\n// Mehdi Goli    Codeplay Software Ltd.\n// Ralph Potter  Codeplay Software Ltd.\n// Luke Iwanski  Codeplay Software Ltd.\n// Contact: <eigen@codeplay.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_TEST_NO_LONGDOUBLE\n#define EIGEN_TEST_NO_COMPLEX\n\n#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int64_t\n#define EIGEN_USE_SYCL\n\n#include \"main.h\"\n#include <unsupported/Eigen/CXX11/Tensor>\n#include <stdint.h>\n#include <iostream>\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nvoid test_device_memory(const Eigen::SyclDevice &sycl_device) {\n  std::cout << \"Running on : \"\n            << sycl_device.sycl_queue().get_device(). template get_info<cl::sycl::info::device::name>()\n            <<std::endl;\n  IndexType sizeDim1 = 100;\n  array<IndexType, 1> tensorRange = {{sizeDim1}};\n  Tensor<DataType, 1, DataLayout,IndexType> in(tensorRange);\n  Tensor<DataType, 1, DataLayout,IndexType> in1(tensorRange);\n  memset(in1.data(), 1, in1.size() * sizeof(DataType));\n  DataType* gpu_in_data  = static_cast<DataType*>(sycl_device.allocate(in.size()*sizeof(DataType)));\n  sycl_device.memset(gpu_in_data, 1, in.size()*sizeof(DataType));\n  sycl_device.memcpyDeviceToHost(in.data(), gpu_in_data, in.size()*sizeof(DataType));\n  for (IndexType i=0; i<in.size(); i++) {\n    VERIFY_IS_EQUAL(in(i), in1(i));\n  }\n  sycl_device.deallocate(gpu_in_data);\n}\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nvoid test_device_exceptions(const Eigen::SyclDevice &sycl_device) {\n  VERIFY(sycl_device.ok());\n  IndexType sizeDim1 = 100;\n  array<IndexType, 1> tensorDims = {{sizeDim1}};\n  DataType* gpu_data = static_cast<DataType*>(sycl_device.allocate(sizeDim1*sizeof(DataType)));\n  sycl_device.memset(gpu_data, 1, sizeDim1*sizeof(DataType));\n\n  TensorMap<Tensor<DataType, 1, DataLayout,IndexType>> in(gpu_data, tensorDims);\n  TensorMap<Tensor<DataType, 1, DataLayout,IndexType>> out(gpu_data, tensorDims);\n  out.device(sycl_device) = in / in.constant(0);\n\n  sycl_device.synchronize();\n  VERIFY(!sycl_device.ok());\n  sycl_device.deallocate(gpu_data);\n}\n\ntemplate<typename DataType> void sycl_device_test_per_device(const cl::sycl::device& d){\n  std::cout << \"Running on \" << d.template get_info<cl::sycl::info::device::name>() << std::endl;\n  QueueInterface queueInterface(d);\n  auto sycl_device = Eigen::SyclDevice(&queueInterface);\n  test_device_memory<DataType, RowMajor, int64_t>(sycl_device);\n  test_device_memory<DataType, ColMajor, int64_t>(sycl_device);\n  /// this test throw an exception. enable it if you want to see the exception\n  //test_device_exceptions<DataType, RowMajor>(sycl_device);\n  /// this test throw an exception. enable it if you want to see the exception\n  //test_device_exceptions<DataType, ColMajor>(sycl_device);\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_device_sycl) {\n  for (const auto& device :Eigen::get_sycl_supported_devices()) {\n    CALL_SUBTEST(sycl_device_test_per_device<float>(device));\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_dimension.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\n\n\nstatic void test_dynamic_size()\n{\n  Eigen::DSizes<int, 3> dimensions(2,3,7);\n\n  VERIFY_IS_EQUAL((int)Eigen::internal::array_get<0>(dimensions), 2);\n  VERIFY_IS_EQUAL((int)Eigen::internal::array_get<1>(dimensions), 3);\n  VERIFY_IS_EQUAL((int)Eigen::internal::array_get<2>(dimensions), 7);\n  VERIFY_IS_EQUAL((int)dimensions.TotalSize(), 2*3*7);\n  VERIFY_IS_EQUAL((int)dimensions[0], 2);\n  VERIFY_IS_EQUAL((int)dimensions[1], 3);\n  VERIFY_IS_EQUAL((int)dimensions[2], 7);\n}\n\nstatic void test_fixed_size()\n{\n  Eigen::Sizes<2,3,7> dimensions;\n\n  VERIFY_IS_EQUAL((int)Eigen::internal::array_get<0>(dimensions), 2);\n  VERIFY_IS_EQUAL((int)Eigen::internal::array_get<1>(dimensions), 3);\n  VERIFY_IS_EQUAL((int)Eigen::internal::array_get<2>(dimensions), 7);\n  VERIFY_IS_EQUAL((int)dimensions.TotalSize(), 2*3*7);\n}\n\nstatic void test_match()\n{\n  Eigen::DSizes<unsigned int, 3> dyn((unsigned int)2,(unsigned int)3,(unsigned int)7);\n  Eigen::Sizes<2,3,7> stat;\n  VERIFY_IS_EQUAL(Eigen::dimensions_match(dyn, stat), true);\n\n  Eigen::DSizes<int, 3> dyn1(2,3,7);\n  Eigen::DSizes<int, 2> dyn2(2,3);\n  VERIFY_IS_EQUAL(Eigen::dimensions_match(dyn1, dyn2), false);\n}\n\nstatic void test_rank_zero()\n{\n  Eigen::Sizes<> scalar;\n  VERIFY_IS_EQUAL((int)scalar.TotalSize(), 1);\n  VERIFY_IS_EQUAL((int)scalar.rank(), 0);\n  VERIFY_IS_EQUAL((int)internal::array_prod(scalar), 1);\n\n  Eigen::DSizes<ptrdiff_t, 0> dscalar;\n  VERIFY_IS_EQUAL((int)dscalar.TotalSize(), 1);\n  VERIFY_IS_EQUAL((int)dscalar.rank(), 0);\n}\n\nstatic void test_index_type_promotion() {\n  Eigen::DSizes<int, 3> src0(1, 2, 3);\n  Eigen::array<int, 3> src1;\n  src1[0] = 4;\n  src1[1] = 5;\n  src1[2] = 6;\n\n  Eigen::DSizes<long, 3> dst0(src0);\n  Eigen::DSizes<long, 3> dst1(src1);\n\n  VERIFY_IS_EQUAL(dst0[0], 1L);\n  VERIFY_IS_EQUAL(dst0[1], 2L);\n  VERIFY_IS_EQUAL(dst0[2], 3L);\n  VERIFY_IS_EQUAL(dst1[0], 4L);\n  VERIFY_IS_EQUAL(dst1[1], 5L);\n  VERIFY_IS_EQUAL(dst1[2], 6L);\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_dimension)\n{\n  CALL_SUBTEST(test_dynamic_size());\n  CALL_SUBTEST(test_fixed_size());\n  CALL_SUBTEST(test_match());\n  CALL_SUBTEST(test_rank_zero());\n  CALL_SUBTEST(test_index_type_promotion());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_empty.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\n\nstatic void test_empty_tensor()\n{\n  Tensor<float, 2> source;\n  Tensor<float, 2> tgt1 = source;\n  Tensor<float, 2> tgt2(source);\n  Tensor<float, 2> tgt3;\n  tgt3 = tgt1;\n  tgt3 = tgt2;\n}\n\nstatic void test_empty_fixed_size_tensor()\n{\n  TensorFixedSize<float, Sizes<0> > source;\n  TensorFixedSize<float, Sizes<0> > tgt1 = source;\n  TensorFixedSize<float, Sizes<0> > tgt2(source);\n  TensorFixedSize<float, Sizes<0> > tgt3;\n  tgt3 = tgt1;\n  tgt3 = tgt2;\n}\n\n\nEIGEN_DECLARE_TEST(cxx11_tensor_empty)\n{\n   CALL_SUBTEST(test_empty_tensor());\n   CALL_SUBTEST(test_empty_fixed_size_tensor());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_executor.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2018 Eugene Zhulenev <ezhulenev@google.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_USE_THREADS\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\nusing Eigen::RowMajor;\nusing Eigen::ColMajor;\nusing Eigen::internal::TiledEvaluation;\n\n// A set of tests to verify that different TensorExecutor strategies yields the\n// same results for all the ops, supporting tiled evaluation.\n\n// Default assignment that does no use block evaluation or vectorization.\n// We assume that default coefficient evaluation is well tested and correct.\ntemplate <typename Dst, typename Expr>\nstatic void DefaultAssign(Dst& dst, Expr expr) {\n  using Assign = Eigen::TensorAssignOp<Dst, const Expr>;\n  using Executor =\n      Eigen::internal::TensorExecutor<const Assign, DefaultDevice,\n                                      /*Vectorizable=*/false,\n                                      /*Tiling=*/TiledEvaluation::Off>;\n\n  Executor::run(Assign(dst, expr), DefaultDevice());\n}\n\n// Assignment with specified device and tiling strategy.\ntemplate <bool Vectorizable, TiledEvaluation Tiling, typename Device,\n          typename Dst, typename Expr>\nstatic void DeviceAssign(Device& d, Dst& dst, Expr expr) {\n  using Assign = Eigen::TensorAssignOp<Dst, const Expr>;\n  using Executor = Eigen::internal::TensorExecutor<const Assign, Device,\n                                                   Vectorizable, Tiling>;\n\n  Executor::run(Assign(dst, expr), d);\n}\n\ntemplate <int NumDims>\nstatic array<Index, NumDims> RandomDims(int min_dim = 1, int max_dim = 20) {\n  array<Index, NumDims> dims;\n  for (int i = 0; i < NumDims; ++i) {\n    dims[i] = internal::random<int>(min_dim, max_dim);\n  }\n  return dims;\n}\n\ntemplate <typename T, int NumDims, typename Device, bool Vectorizable,\n          TiledEvaluation Tiling, int Layout>\nstatic void test_execute_unary_expr(Device d)\n{\n  static constexpr int Options = 0 | Layout;\n\n  // Pick a large enough tensor size to bypass small tensor block evaluation\n  // optimization.\n  auto dims = RandomDims<NumDims>(50 / NumDims, 100 / NumDims);\n\n  Tensor<T, NumDims, Options, Index> src(dims);\n  Tensor<T, NumDims, Options, Index> dst(dims);\n\n  src.setRandom();\n  const auto expr = src.square();\n\n  using Assign = TensorAssignOp<decltype(dst), const decltype(expr)>;\n  using Executor =\n      internal::TensorExecutor<const Assign, Device, Vectorizable, Tiling>;\n\n  Executor::run(Assign(dst, expr), d);\n\n  for (Index i = 0; i < dst.dimensions().TotalSize(); ++i) {\n    T square = src.coeff(i) * src.coeff(i);\n    VERIFY_IS_EQUAL(square, dst.coeff(i));\n  }\n}\n\ntemplate <typename T, int NumDims, typename Device, bool Vectorizable,\n          TiledEvaluation Tiling, int Layout>\nstatic void test_execute_binary_expr(Device d)\n{\n  static constexpr int Options = 0 | Layout;\n\n  // Pick a large enough tensor size to bypass small tensor block evaluation\n  // optimization.\n  auto dims = RandomDims<NumDims>(50 / NumDims, 100 / NumDims);\n\n  Tensor<T, NumDims, Options, Index> lhs(dims);\n  Tensor<T, NumDims, Options, Index> rhs(dims);\n  Tensor<T, NumDims, Options, Index> dst(dims);\n\n  lhs.setRandom();\n  rhs.setRandom();\n\n  const auto expr = lhs + rhs;\n\n  using Assign = TensorAssignOp<decltype(dst), const decltype(expr)>;\n  using Executor =\n      internal::TensorExecutor<const Assign, Device, Vectorizable, Tiling>;\n\n  Executor::run(Assign(dst, expr), d);\n\n  for (Index i = 0; i < dst.dimensions().TotalSize(); ++i) {\n    T sum = lhs.coeff(i) + rhs.coeff(i);\n    VERIFY_IS_EQUAL(sum, dst.coeff(i));\n  }\n}\n\ntemplate <typename T, int NumDims, typename Device, bool Vectorizable,\n          TiledEvaluation Tiling, int Layout>\nstatic void test_execute_broadcasting(Device d)\n{\n  static constexpr int Options = 0 | Layout;\n\n  auto dims = RandomDims<NumDims>(1, 10);\n  Tensor<T, NumDims, Options, Index> src(dims);\n  src.setRandom();\n\n  const auto broadcasts = RandomDims<NumDims>(1, 7);\n  const auto expr = src.broadcast(broadcasts);\n\n  // We assume that broadcasting on a default device is tested and correct, so\n  // we can rely on it to verify correctness of tensor executor and tiling.\n  Tensor<T, NumDims, Options, Index> golden;\n  golden = expr;\n\n  // Now do the broadcasting using configured tensor executor.\n  Tensor<T, NumDims, Options, Index> dst(golden.dimensions());\n\n  using Assign = TensorAssignOp<decltype(dst), const decltype(expr)>;\n  using Executor =\n      internal::TensorExecutor<const Assign, Device, Vectorizable, Tiling>;\n\n  Executor::run(Assign(dst, expr), d);\n\n  for (Index i = 0; i < dst.dimensions().TotalSize(); ++i) {\n    VERIFY_IS_EQUAL(dst.coeff(i), golden.coeff(i));\n  }\n}\n\ntemplate <typename T, int NumDims, typename Device, bool Vectorizable,\n          TiledEvaluation Tiling, int Layout>\nstatic void test_execute_chipping_rvalue(Device d)\n{\n  auto dims = RandomDims<NumDims>(1, 10);\n  Tensor<T, NumDims, Layout, Index> src(dims);\n  src.setRandom();\n\n#define TEST_CHIPPING(CHIP_DIM)                                           \\\n  if (NumDims > (CHIP_DIM)) {                                             \\\n    const auto offset = internal::random<Index>(0, dims[(CHIP_DIM)] - 1); \\\n    const auto expr = src.template chip<(CHIP_DIM)>(offset);              \\\n                                                                          \\\n    Tensor<T, NumDims - 1, Layout, Index> golden;                         \\\n    golden = expr;                                                        \\\n                                                                          \\\n    Tensor<T, NumDims - 1, Layout, Index> dst(golden.dimensions());       \\\n                                                                          \\\n    using Assign = TensorAssignOp<decltype(dst), const decltype(expr)>;   \\\n    using Executor = internal::TensorExecutor<const Assign, Device,       \\\n                                              Vectorizable, Tiling>;      \\\n                                                                          \\\n    Executor::run(Assign(dst, expr), d);                                  \\\n                                                                          \\\n    for (Index i = 0; i < dst.dimensions().TotalSize(); ++i) {            \\\n      VERIFY_IS_EQUAL(dst.coeff(i), golden.coeff(i));                     \\\n    }                                                                     \\\n  }\n\n  TEST_CHIPPING(0)\n  TEST_CHIPPING(1)\n  TEST_CHIPPING(2)\n  TEST_CHIPPING(3)\n  TEST_CHIPPING(4)\n  TEST_CHIPPING(5)\n\n#undef TEST_CHIPPING\n}\n\ntemplate <typename T, int NumDims, typename Device, bool Vectorizable,\n    TiledEvaluation Tiling, int Layout>\nstatic void test_execute_chipping_lvalue(Device d)\n{\n  auto dims = RandomDims<NumDims>(1, 10);\n\n#define TEST_CHIPPING(CHIP_DIM)                                             \\\n  if (NumDims > (CHIP_DIM)) {                                               \\\n    /* Generate random data that we'll assign to the chipped tensor dim. */ \\\n    array<Index, NumDims - 1> src_dims;                                     \\\n    for (int i = 0; i < NumDims - 1; ++i) {                                 \\\n      int dim = i < (CHIP_DIM) ? i : i + 1;                                 \\\n      src_dims[i] = dims[dim];                                              \\\n    }                                                                       \\\n                                                                            \\\n    Tensor<T, NumDims - 1, Layout, Index> src(src_dims);                    \\\n    src.setRandom();                                                        \\\n                                                                            \\\n    const auto offset = internal::random<Index>(0, dims[(CHIP_DIM)] - 1);   \\\n                                                                            \\\n    Tensor<T, NumDims, Layout, Index> random(dims);                         \\\n    random.setZero();                                                       \\\n                                                                            \\\n    Tensor<T, NumDims, Layout, Index> golden(dims);                         \\\n    golden = random;                                                        \\\n    golden.template chip<(CHIP_DIM)>(offset) = src;                         \\\n                                                                            \\\n    Tensor<T, NumDims, Layout, Index> dst(dims);                            \\\n    dst = random;                                                           \\\n    auto expr = dst.template chip<(CHIP_DIM)>(offset);                      \\\n                                                                            \\\n    using Assign = TensorAssignOp<decltype(expr), const decltype(src)>;     \\\n    using Executor = internal::TensorExecutor<const Assign, Device,         \\\n                                              Vectorizable, Tiling>;        \\\n                                                                            \\\n    Executor::run(Assign(expr, src), d);                                    \\\n                                                                            \\\n    for (Index i = 0; i < dst.dimensions().TotalSize(); ++i) {              \\\n      VERIFY_IS_EQUAL(dst.coeff(i), golden.coeff(i));                       \\\n    }                                                                       \\\n  }\n\n  TEST_CHIPPING(0)\n  TEST_CHIPPING(1)\n  TEST_CHIPPING(2)\n  TEST_CHIPPING(3)\n  TEST_CHIPPING(4)\n  TEST_CHIPPING(5)\n\n#undef TEST_CHIPPING\n}\n\ntemplate <typename T, int NumDims, typename Device, bool Vectorizable,\n          TiledEvaluation Tiling, int Layout>\nstatic void test_execute_shuffle_rvalue(Device d)\n{\n  static constexpr int Options = 0 | Layout;\n\n  auto dims = RandomDims<NumDims>(1, 10);\n  Tensor<T, NumDims, Options, Index> src(dims);\n  src.setRandom();\n\n  DSizes<Index, NumDims> shuffle;\n  for (int i = 0; i < NumDims; ++i) shuffle[i] = i;\n\n  // Test all possible shuffle permutations.\n  do {\n    DSizes<Index, NumDims> shuffled_dims;\n    for (int i = 0; i < NumDims; ++i) {\n      shuffled_dims[i] = dims[shuffle[i]];\n    }\n\n    const auto expr = src.shuffle(shuffle);\n\n    // We assume that shuffling on a default device is tested and correct, so\n    // we can rely on it to verify correctness of tensor executor and tiling.\n    Tensor<T, NumDims, Options, Index> golden(shuffled_dims);\n    DefaultAssign(golden, expr);\n\n    // Now do the shuffling using configured tensor executor.\n    Tensor<T, NumDims, Options, Index> dst(shuffled_dims);\n    DeviceAssign<Vectorizable, Tiling>(d, dst, expr);\n\n    for (Index i = 0; i < dst.dimensions().TotalSize(); ++i) {\n      VERIFY_IS_EQUAL(dst.coeff(i), golden.coeff(i));\n    }\n\n  } while (std::next_permutation(&shuffle[0], &shuffle[0] + NumDims));\n}\n\ntemplate <typename T, int NumDims, typename Device, bool Vectorizable,\n          TiledEvaluation Tiling, int Layout>\nstatic void test_execute_shuffle_lvalue(Device d)\n{\n  static constexpr int Options = 0 | Layout;\n\n  auto dims = RandomDims<NumDims>(5, 10);\n  Tensor<T, NumDims, Options, Index> src(dims);\n  src.setRandom();\n\n  DSizes<Index, NumDims> shuffle;\n  for (int i = 0; i < NumDims; ++i) shuffle[i] = i;\n\n  // Test all possible shuffle permutations.\n  do {\n    DSizes<Index, NumDims> shuffled_dims;\n    for (int i = 0; i < NumDims; ++i) shuffled_dims[shuffle[i]] = dims[i];\n\n    // We assume that shuffling on a default device is tested and correct, so\n    // we can rely on it to verify correctness of tensor executor and tiling.\n    Tensor<T, NumDims, Options, Index> golden(shuffled_dims);\n    auto golden_shuffle = golden.shuffle(shuffle);\n    DefaultAssign(golden_shuffle, src);\n\n    // Now do the shuffling using configured tensor executor.\n    Tensor<T, NumDims, Options, Index> dst(shuffled_dims);\n    auto dst_shuffle = dst.shuffle(shuffle);\n    DeviceAssign<Vectorizable, Tiling>(d, dst_shuffle, src);\n\n    for (Index i = 0; i < dst.dimensions().TotalSize(); ++i) {\n      VERIFY_IS_EQUAL(dst.coeff(i), golden.coeff(i));\n    }\n\n  } while (std::next_permutation(&shuffle[0], &shuffle[0] + NumDims));\n}\n\ntemplate <typename T, int NumDims, typename Device, bool Vectorizable,\n    TiledEvaluation Tiling, int Layout>\nstatic void test_execute_reshape(Device d)\n{\n  static_assert(NumDims >= 2, \"NumDims must be greater or equal than 2\");\n\n  static constexpr int ReshapedDims = NumDims - 1;\n  static constexpr int Options = 0 | Layout;\n\n  auto dims = RandomDims<NumDims>(5, 10);\n  Tensor<T, NumDims, Options, Index> src(dims);\n  src.setRandom();\n\n  // Multiple 0th dimension and then shuffle.\n  std::vector<Index> shuffle;\n  for (int i = 0; i < ReshapedDims; ++i) shuffle.push_back(i);\n  std::shuffle(shuffle.begin(), shuffle.end(), std::mt19937());\n\n  DSizes<Index, ReshapedDims> reshaped_dims;\n  reshaped_dims[shuffle[0]] = dims[0] * dims[1];\n  for (int i = 1; i < ReshapedDims; ++i) reshaped_dims[shuffle[i]] = dims[i + 1];\n\n  Tensor<T, ReshapedDims, Options, Index> golden = src.reshape(reshaped_dims);\n\n  // Now reshape using configured tensor executor.\n  Tensor<T, ReshapedDims, Options, Index> dst(golden.dimensions());\n\n  auto expr = src.reshape(reshaped_dims);\n\n  using Assign = TensorAssignOp<decltype(dst), const decltype(expr)>;\n  using Executor =\n      internal::TensorExecutor<const Assign, Device, Vectorizable, Tiling>;\n\n  Executor::run(Assign(dst, expr), d);\n\n  for (Index i = 0; i < dst.dimensions().TotalSize(); ++i) {\n    VERIFY_IS_EQUAL(dst.coeff(i), golden.coeff(i));\n  }\n}\n\ntemplate <typename T, int NumDims, typename Device, bool Vectorizable,\n          TiledEvaluation Tiling, int Layout>\nstatic void test_execute_slice_rvalue(Device d)\n{\n  static_assert(NumDims >= 2, \"NumDims must be greater or equal than 2\");\n  static constexpr int Options = 0 | Layout;\n\n  auto dims = RandomDims<NumDims>(5, 10);\n  Tensor<T, NumDims, Options, Index> src(dims);\n  src.setRandom();\n\n  // Pick a random slice of src tensor.\n  auto slice_start = DSizes<Index, NumDims>(RandomDims<NumDims>());\n  auto slice_size = DSizes<Index, NumDims>(RandomDims<NumDims>());\n\n  // Make sure that slice start + size do not overflow tensor dims.\n  for (int i = 0; i < NumDims; ++i) {\n    slice_start[i] = numext::mini(dims[i] - 1, slice_start[i]);\n    slice_size[i] = numext::mini(slice_size[i], dims[i] - slice_start[i]);\n  }\n\n  Tensor<T, NumDims, Options, Index> golden =\n      src.slice(slice_start, slice_size);\n\n  // Now reshape using configured tensor executor.\n  Tensor<T, NumDims, Options, Index> dst(golden.dimensions());\n\n  auto expr = src.slice(slice_start, slice_size);\n\n  using Assign = TensorAssignOp<decltype(dst), const decltype(expr)>;\n  using Executor =\n      internal::TensorExecutor<const Assign, Device, Vectorizable, Tiling>;\n\n  Executor::run(Assign(dst, expr), d);\n\n  for (Index i = 0; i < dst.dimensions().TotalSize(); ++i) {\n    VERIFY_IS_EQUAL(dst.coeff(i), golden.coeff(i));\n  }\n}\n\ntemplate <typename T, int NumDims, typename Device, bool Vectorizable,\n    TiledEvaluation Tiling, int Layout>\nstatic void test_execute_slice_lvalue(Device d)\n{\n  static_assert(NumDims >= 2, \"NumDims must be greater or equal than 2\");\n  static constexpr int Options = 0 | Layout;\n\n  auto dims = RandomDims<NumDims>(5, 10);\n  Tensor<T, NumDims, Options, Index> src(dims);\n  src.setRandom();\n\n  // Pick a random slice of src tensor.\n  auto slice_start = DSizes<Index, NumDims>(RandomDims<NumDims>(1, 10));\n  auto slice_size = DSizes<Index, NumDims>(RandomDims<NumDims>(1, 10));\n\n  // Make sure that slice start + size do not overflow tensor dims.\n  for (int i = 0; i < NumDims; ++i) {\n    slice_start[i] = numext::mini(dims[i] - 1, slice_start[i]);\n    slice_size[i] = numext::mini(slice_size[i], dims[i] - slice_start[i]);\n  }\n\n  Tensor<T, NumDims, Options, Index> slice(slice_size);\n  slice.setRandom();\n\n  // Assign a slice using default executor.\n  Tensor<T, NumDims, Options, Index> golden = src;\n  golden.slice(slice_start, slice_size) = slice;\n\n  // And using configured execution strategy.\n  Tensor<T, NumDims, Options, Index> dst = src;\n  auto expr = dst.slice(slice_start, slice_size);\n\n  using Assign = TensorAssignOp<decltype(expr), const decltype(slice)>;\n  using Executor =\n      internal::TensorExecutor<const Assign, Device, Vectorizable, Tiling>;\n\n  Executor::run(Assign(expr, slice), d);\n\n  for (Index i = 0; i < dst.dimensions().TotalSize(); ++i) {\n    VERIFY_IS_EQUAL(dst.coeff(i), golden.coeff(i));\n  }\n}\n\ntemplate <typename T, int NumDims, typename Device, bool Vectorizable,\n    TiledEvaluation Tiling, int Layout>\nstatic void test_execute_broadcasting_of_forced_eval(Device d)\n{\n  static constexpr int Options = 0 | Layout;\n\n  auto dims = RandomDims<NumDims>(1, 10);\n  Tensor<T, NumDims, Options, Index> src(dims);\n  src.setRandom();\n\n  const auto broadcasts = RandomDims<NumDims>(1, 7);\n  const auto expr = src.square().eval().broadcast(broadcasts);\n\n  // We assume that broadcasting on a default device is tested and correct, so\n  // we can rely on it to verify correctness of tensor executor and tiling.\n  Tensor<T, NumDims, Options, Index> golden;\n  golden = expr;\n\n  // Now do the broadcasting using configured tensor executor.\n  Tensor<T, NumDims, Options, Index> dst(golden.dimensions());\n\n  using Assign = TensorAssignOp<decltype(dst), const decltype(expr)>;\n  using Executor =\n      internal::TensorExecutor<const Assign, Device, Vectorizable, Tiling>;\n\n  Executor::run(Assign(dst, expr), d);\n\n  for (Index i = 0; i < dst.dimensions().TotalSize(); ++i) {\n    VERIFY_IS_EQUAL(dst.coeff(i), golden.coeff(i));\n  }\n}\n\ntemplate<typename T, int NumDims>\nstruct DummyGenerator {\n  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE\n  T operator()(const array <Index, NumDims>& dims) const {\n    T result = static_cast<T>(0);\n    for (int i = 0; i < NumDims; ++i) {\n      result += static_cast<T>((i + 1) * dims[i]);\n    }\n    return result;\n  }\n};\n\ntemplate <typename T, int NumDims, typename Device, bool Vectorizable,\n    TiledEvaluation Tiling, int Layout>\nstatic void test_execute_generator_op(Device d)\n{\n  static constexpr int Options = 0 | Layout;\n\n  auto dims = RandomDims<NumDims>(20, 30);\n  Tensor<T, NumDims, Options, Index> src(dims);\n  src.setRandom();\n\n  const auto expr = src.generate(DummyGenerator<T, NumDims>());\n\n  // We assume that generator on a default device is tested and correct, so\n  // we can rely on it to verify correctness of tensor executor and tiling.\n  Tensor<T, NumDims, Options, Index> golden;\n  golden = expr;\n\n  // Now do the broadcasting using configured tensor executor.\n  Tensor<T, NumDims, Options, Index> dst(golden.dimensions());\n\n  using Assign = TensorAssignOp<decltype(dst), const decltype(expr)>;\n  using Executor =\n    internal::TensorExecutor<const Assign, Device, Vectorizable, Tiling>;\n\n  Executor::run(Assign(dst, expr), d);\n\n  for (Index i = 0; i < dst.dimensions().TotalSize(); ++i) {\n    VERIFY_IS_EQUAL(dst.coeff(i), golden.coeff(i));\n  }\n}\n\ntemplate <typename T, int NumDims, typename Device, bool Vectorizable,\n    TiledEvaluation Tiling, int Layout>\nstatic void test_execute_reverse_rvalue(Device d)\n{\n  static constexpr int Options = 0 | Layout;\n\n  auto dims = RandomDims<NumDims>(1, numext::pow(1000000.0, 1.0 / NumDims));\n  Tensor <T, NumDims, Options, Index> src(dims);\n  src.setRandom();\n\n  // Reverse half of the dimensions.\n  Eigen::array<bool, NumDims> reverse;\n  for (int i = 0; i < NumDims; ++i) reverse[i] = internal::random<bool>();\n\n  const auto expr = src.reverse(reverse);\n\n  // We assume that reversing on a default device is tested and correct, so\n  // we can rely on it to verify correctness of tensor executor and tiling.\n  Tensor <T, NumDims, Options, Index> golden;\n  golden = expr;\n\n  // Now do the reversing using configured tensor executor.\n  Tensor <T, NumDims, Options, Index> dst(golden.dimensions());\n\n  using Assign = TensorAssignOp<decltype(dst), const decltype(expr)>;\n  using Executor =\n    internal::TensorExecutor<const Assign, Device, Vectorizable, Tiling>;\n\n  Executor::run(Assign(dst, expr), d);\n\n  for (Index i = 0; i < dst.dimensions().TotalSize(); ++i) {\n    VERIFY_IS_EQUAL(dst.coeff(i), golden.coeff(i));\n  }\n}\n\ntemplate <typename T, int NumDims, typename Device, bool Vectorizable,\n          TiledEvaluation Tiling, int Layout>\nstatic void test_async_execute_unary_expr(Device d)\n{\n  static constexpr int Options = 0 | Layout;\n\n  // Pick a large enough tensor size to bypass small tensor block evaluation\n  // optimization.\n  auto dims = RandomDims<NumDims>(50 / NumDims, 100 / NumDims);\n\n  Tensor<T, NumDims, Options, Index> src(dims);\n  Tensor<T, NumDims, Options, Index> dst(dims);\n\n  src.setRandom();\n  const auto expr = src.square();\n\n  Eigen::Barrier done(1);\n  auto on_done = [&done]() { done.Notify(); };\n\n  using Assign = TensorAssignOp<decltype(dst), const decltype(expr)>;\n  using DoneCallback = decltype(on_done);\n  using Executor = internal::TensorAsyncExecutor<const Assign, Device, DoneCallback,\n                                                 Vectorizable, Tiling>;\n\n  Executor::runAsync(Assign(dst, expr), d, on_done);\n  done.Wait();\n\n  for (Index i = 0; i < dst.dimensions().TotalSize(); ++i) {\n    T square = src.coeff(i) * src.coeff(i);\n    VERIFY_IS_EQUAL(square, dst.coeff(i));\n  }\n}\n\ntemplate <typename T, int NumDims, typename Device, bool Vectorizable,\n          TiledEvaluation Tiling, int Layout>\nstatic void test_async_execute_binary_expr(Device d)\n{\n  static constexpr int Options = 0 | Layout;\n\n  // Pick a large enough tensor size to bypass small tensor block evaluation\n  // optimization.\n  auto dims = RandomDims<NumDims>(50 / NumDims, 100 / NumDims);\n\n  Tensor<T, NumDims, Options, Index> lhs(dims);\n  Tensor<T, NumDims, Options, Index> rhs(dims);\n  Tensor<T, NumDims, Options, Index> dst(dims);\n\n  lhs.setRandom();\n  rhs.setRandom();\n\n  const auto expr = lhs + rhs;\n\n  Eigen::Barrier done(1);\n  auto on_done = [&done]() { done.Notify(); };\n\n  using Assign = TensorAssignOp<decltype(dst), const decltype(expr)>;\n  using DoneCallback = decltype(on_done);\n  using Executor = internal::TensorAsyncExecutor<const Assign, Device, DoneCallback,\n                                                 Vectorizable, Tiling>;\n\n  Executor::runAsync(Assign(dst, expr), d, on_done);\n  done.Wait();\n\n  for (Index i = 0; i < dst.dimensions().TotalSize(); ++i) {\n    T sum = lhs.coeff(i) + rhs.coeff(i);\n    VERIFY_IS_EQUAL(sum, dst.coeff(i));\n  }\n}\n\n#ifdef EIGEN_DONT_VECTORIZE\n#define VECTORIZABLE(VAL) !EIGEN_DONT_VECTORIZE && VAL\n#else\n#define VECTORIZABLE(VAL) VAL\n#endif\n\n#define CALL_SUBTEST_PART(PART) \\\n  CALL_SUBTEST_##PART\n\n#define CALL_SUBTEST_COMBINATIONS(PART, NAME, T, NUM_DIMS)                                                                                 \\\n  CALL_SUBTEST_PART(PART)((NAME<T, NUM_DIMS, DefaultDevice,    false,               TiledEvaluation::Off,     ColMajor>(default_device))); \\\n  CALL_SUBTEST_PART(PART)((NAME<T, NUM_DIMS, DefaultDevice,    false,               TiledEvaluation::On,  ColMajor>(default_device)));     \\\n  CALL_SUBTEST_PART(PART)((NAME<T, NUM_DIMS, DefaultDevice,    VECTORIZABLE(true),  TiledEvaluation::Off,     ColMajor>(default_device))); \\\n  CALL_SUBTEST_PART(PART)((NAME<T, NUM_DIMS, DefaultDevice,    VECTORIZABLE(true),  TiledEvaluation::On,  ColMajor>(default_device)));     \\\n  CALL_SUBTEST_PART(PART)((NAME<T, NUM_DIMS, DefaultDevice,    false,               TiledEvaluation::Off,     RowMajor>(default_device))); \\\n  CALL_SUBTEST_PART(PART)((NAME<T, NUM_DIMS, DefaultDevice,    false,               TiledEvaluation::On,  RowMajor>(default_device)));     \\\n  CALL_SUBTEST_PART(PART)((NAME<T, NUM_DIMS, DefaultDevice,    VECTORIZABLE(true),  TiledEvaluation::Off,     RowMajor>(default_device))); \\\n  CALL_SUBTEST_PART(PART)((NAME<T, NUM_DIMS, DefaultDevice,    VECTORIZABLE(true),  TiledEvaluation::On,  RowMajor>(default_device)));     \\\n  CALL_SUBTEST_PART(PART)((NAME<T, NUM_DIMS, ThreadPoolDevice, false,               TiledEvaluation::Off,     ColMajor>(tp_device)));      \\\n  CALL_SUBTEST_PART(PART)((NAME<T, NUM_DIMS, ThreadPoolDevice, false,               TiledEvaluation::On,  ColMajor>(tp_device)));          \\\n  CALL_SUBTEST_PART(PART)((NAME<T, NUM_DIMS, ThreadPoolDevice, VECTORIZABLE(true),  TiledEvaluation::Off,     ColMajor>(tp_device)));      \\\n  CALL_SUBTEST_PART(PART)((NAME<T, NUM_DIMS, ThreadPoolDevice, VECTORIZABLE(true),  TiledEvaluation::On,  ColMajor>(tp_device)));          \\\n  CALL_SUBTEST_PART(PART)((NAME<T, NUM_DIMS, ThreadPoolDevice, false,               TiledEvaluation::Off,     RowMajor>(tp_device)));      \\\n  CALL_SUBTEST_PART(PART)((NAME<T, NUM_DIMS, ThreadPoolDevice, false,               TiledEvaluation::On,  RowMajor>(tp_device)));          \\\n  CALL_SUBTEST_PART(PART)((NAME<T, NUM_DIMS, ThreadPoolDevice, VECTORIZABLE(true),  TiledEvaluation::Off,     RowMajor>(tp_device)));      \\\n  CALL_SUBTEST_PART(PART)((NAME<T, NUM_DIMS, ThreadPoolDevice, VECTORIZABLE(true),  TiledEvaluation::On,  RowMajor>(tp_device)))\n\n// NOTE: Currently only ThreadPoolDevice supports async expression evaluation.\n#define CALL_ASYNC_SUBTEST_COMBINATIONS(PART, NAME, T, NUM_DIMS)                                                                      \\\n  CALL_SUBTEST_PART(PART)((NAME<T, NUM_DIMS, ThreadPoolDevice, false,               TiledEvaluation::Off,     ColMajor>(tp_device))); \\\n  CALL_SUBTEST_PART(PART)((NAME<T, NUM_DIMS, ThreadPoolDevice, false,               TiledEvaluation::On,  ColMajor>(tp_device)));     \\\n  CALL_SUBTEST_PART(PART)((NAME<T, NUM_DIMS, ThreadPoolDevice, VECTORIZABLE(true),  TiledEvaluation::Off,     ColMajor>(tp_device))); \\\n  CALL_SUBTEST_PART(PART)((NAME<T, NUM_DIMS, ThreadPoolDevice, VECTORIZABLE(true),  TiledEvaluation::On,  ColMajor>(tp_device)));     \\\n  CALL_SUBTEST_PART(PART)((NAME<T, NUM_DIMS, ThreadPoolDevice, false,               TiledEvaluation::Off,     RowMajor>(tp_device))); \\\n  CALL_SUBTEST_PART(PART)((NAME<T, NUM_DIMS, ThreadPoolDevice, false,               TiledEvaluation::On,  RowMajor>(tp_device)));     \\\n  CALL_SUBTEST_PART(PART)((NAME<T, NUM_DIMS, ThreadPoolDevice, VECTORIZABLE(true),  TiledEvaluation::Off,     RowMajor>(tp_device))); \\\n  CALL_SUBTEST_PART(PART)((NAME<T, NUM_DIMS, ThreadPoolDevice, VECTORIZABLE(true),  TiledEvaluation::On,  RowMajor>(tp_device)))\n\nEIGEN_DECLARE_TEST(cxx11_tensor_executor) {\n  Eigen::DefaultDevice default_device;\n  // Default device is unused in ASYNC tests.\n  EIGEN_UNUSED_VARIABLE(default_device);\n\n  const auto num_threads = internal::random<int>(20, 24);\n  Eigen::ThreadPool tp(num_threads);\n  Eigen::ThreadPoolDevice tp_device(&tp, num_threads);\n\n  CALL_SUBTEST_COMBINATIONS(1, test_execute_unary_expr, float, 3);\n  CALL_SUBTEST_COMBINATIONS(1, test_execute_unary_expr, float, 4);\n  CALL_SUBTEST_COMBINATIONS(1, test_execute_unary_expr, float, 5);\n\n  CALL_SUBTEST_COMBINATIONS(2, test_execute_binary_expr, float, 3);\n  CALL_SUBTEST_COMBINATIONS(2, test_execute_binary_expr, float, 4);\n  CALL_SUBTEST_COMBINATIONS(2, test_execute_binary_expr, float, 5);\n\n  CALL_SUBTEST_COMBINATIONS(3, test_execute_broadcasting, float, 3);\n  CALL_SUBTEST_COMBINATIONS(3, test_execute_broadcasting, float, 4);\n  CALL_SUBTEST_COMBINATIONS(3, test_execute_broadcasting, float, 5);\n\n  CALL_SUBTEST_COMBINATIONS(4, test_execute_chipping_rvalue, float, 3);\n  CALL_SUBTEST_COMBINATIONS(4, test_execute_chipping_rvalue, float, 4);\n  CALL_SUBTEST_COMBINATIONS(4, test_execute_chipping_rvalue, float, 5);\n\n  CALL_SUBTEST_COMBINATIONS(5, test_execute_chipping_lvalue, float, 3);\n  CALL_SUBTEST_COMBINATIONS(5, test_execute_chipping_lvalue, float, 4);\n  CALL_SUBTEST_COMBINATIONS(5, test_execute_chipping_lvalue, float, 5);\n\n  CALL_SUBTEST_COMBINATIONS(6, test_execute_shuffle_rvalue, float, 3);\n  CALL_SUBTEST_COMBINATIONS(6, test_execute_shuffle_rvalue, float, 4);\n  CALL_SUBTEST_COMBINATIONS(6, test_execute_shuffle_rvalue, float, 5);\n\n  CALL_SUBTEST_COMBINATIONS(7, test_execute_shuffle_lvalue, float, 3);\n  CALL_SUBTEST_COMBINATIONS(7, test_execute_shuffle_lvalue, float, 4);\n  CALL_SUBTEST_COMBINATIONS(7, test_execute_shuffle_lvalue, float, 5);\n\n  CALL_SUBTEST_COMBINATIONS(9, test_execute_reshape, float, 2);\n  CALL_SUBTEST_COMBINATIONS(9, test_execute_reshape, float, 3);\n  CALL_SUBTEST_COMBINATIONS(9, test_execute_reshape, float, 4);\n  CALL_SUBTEST_COMBINATIONS(9, test_execute_reshape, float, 5);\n\n  CALL_SUBTEST_COMBINATIONS(10, test_execute_slice_rvalue, float, 2);\n  CALL_SUBTEST_COMBINATIONS(10, test_execute_slice_rvalue, float, 3);\n  CALL_SUBTEST_COMBINATIONS(10, test_execute_slice_rvalue, float, 4);\n  CALL_SUBTEST_COMBINATIONS(10, test_execute_slice_rvalue, float, 5);\n\n  CALL_SUBTEST_COMBINATIONS(11, test_execute_slice_lvalue, float, 2);\n  CALL_SUBTEST_COMBINATIONS(11, test_execute_slice_lvalue, float, 3);\n  CALL_SUBTEST_COMBINATIONS(11, test_execute_slice_lvalue, float, 4);\n  CALL_SUBTEST_COMBINATIONS(11, test_execute_slice_lvalue, float, 5);\n\n  CALL_SUBTEST_COMBINATIONS(12, test_execute_broadcasting_of_forced_eval, float, 2);\n  CALL_SUBTEST_COMBINATIONS(12, test_execute_broadcasting_of_forced_eval, float, 3);\n  CALL_SUBTEST_COMBINATIONS(12, test_execute_broadcasting_of_forced_eval, float, 4);\n  CALL_SUBTEST_COMBINATIONS(12, test_execute_broadcasting_of_forced_eval, float, 5);\n\n  CALL_SUBTEST_COMBINATIONS(13, test_execute_generator_op, float, 2);\n  CALL_SUBTEST_COMBINATIONS(13, test_execute_generator_op, float, 3);\n  CALL_SUBTEST_COMBINATIONS(13, test_execute_generator_op, float, 4);\n  CALL_SUBTEST_COMBINATIONS(13, test_execute_generator_op, float, 5);\n\n  CALL_SUBTEST_COMBINATIONS(14, test_execute_reverse_rvalue, float, 1);\n  CALL_SUBTEST_COMBINATIONS(14, test_execute_reverse_rvalue, float, 2);\n  CALL_SUBTEST_COMBINATIONS(14, test_execute_reverse_rvalue, float, 3);\n  CALL_SUBTEST_COMBINATIONS(14, test_execute_reverse_rvalue, float, 4);\n  CALL_SUBTEST_COMBINATIONS(14, test_execute_reverse_rvalue, float, 5);\n\n  CALL_ASYNC_SUBTEST_COMBINATIONS(15, test_async_execute_unary_expr, float, 3);\n  CALL_ASYNC_SUBTEST_COMBINATIONS(15, test_async_execute_unary_expr, float, 4);\n  CALL_ASYNC_SUBTEST_COMBINATIONS(15, test_async_execute_unary_expr, float, 5);\n\n  CALL_ASYNC_SUBTEST_COMBINATIONS(16, test_async_execute_binary_expr, float, 3);\n  CALL_ASYNC_SUBTEST_COMBINATIONS(16, test_async_execute_binary_expr, float, 4);\n  CALL_ASYNC_SUBTEST_COMBINATIONS(16, test_async_execute_binary_expr, float, 5);\n\n  // Force CMake to split this test.\n  // EIGEN_SUFFIXES;1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_expr.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include <numeric>\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\nusing Eigen::RowMajor;\n\nstatic void test_1d()\n{\n  Tensor<float, 1> vec1(6);\n  Tensor<float, 1, RowMajor> vec2(6);\n\n  vec1(0) = 4.0;  vec2(0) = 0.0;\n  vec1(1) = 8.0;  vec2(1) = 1.0;\n  vec1(2) = 15.0; vec2(2) = 2.0;\n  vec1(3) = 16.0; vec2(3) = 3.0;\n  vec1(4) = 23.0; vec2(4) = 4.0;\n  vec1(5) = 42.0; vec2(5) = 5.0;\n\n  float data3[6];\n  TensorMap<Tensor<float, 1>> vec3(data3, 6);\n  vec3 = vec1.sqrt();\n  float data4[6];\n  TensorMap<Tensor<float, 1, RowMajor>> vec4(data4, 6);\n  vec4 = vec2.square();\n  float data5[6];\n  TensorMap<Tensor<float, 1, RowMajor>> vec5(data5, 6);\n  vec5 = vec2.cube();\n\n  VERIFY_IS_APPROX(vec3(0), sqrtf(4.0));\n  VERIFY_IS_APPROX(vec3(1), sqrtf(8.0));\n  VERIFY_IS_APPROX(vec3(2), sqrtf(15.0));\n  VERIFY_IS_APPROX(vec3(3), sqrtf(16.0));\n  VERIFY_IS_APPROX(vec3(4), sqrtf(23.0));\n  VERIFY_IS_APPROX(vec3(5), sqrtf(42.0));\n\n  VERIFY_IS_APPROX(vec4(0), 0.0f);\n  VERIFY_IS_APPROX(vec4(1), 1.0f);\n  VERIFY_IS_APPROX(vec4(2), 2.0f * 2.0f);\n  VERIFY_IS_APPROX(vec4(3), 3.0f * 3.0f);\n  VERIFY_IS_APPROX(vec4(4), 4.0f * 4.0f);\n  VERIFY_IS_APPROX(vec4(5), 5.0f * 5.0f);\n\n  VERIFY_IS_APPROX(vec5(0), 0.0f);\n  VERIFY_IS_APPROX(vec5(1), 1.0f);\n  VERIFY_IS_APPROX(vec5(2), 2.0f * 2.0f * 2.0f);\n  VERIFY_IS_APPROX(vec5(3), 3.0f * 3.0f * 3.0f);\n  VERIFY_IS_APPROX(vec5(4), 4.0f * 4.0f * 4.0f);\n  VERIFY_IS_APPROX(vec5(5), 5.0f * 5.0f * 5.0f);\n\n  vec3 = vec1 + vec2;\n  VERIFY_IS_APPROX(vec3(0), 4.0f + 0.0f);\n  VERIFY_IS_APPROX(vec3(1), 8.0f + 1.0f);\n  VERIFY_IS_APPROX(vec3(2), 15.0f + 2.0f);\n  VERIFY_IS_APPROX(vec3(3), 16.0f + 3.0f);\n  VERIFY_IS_APPROX(vec3(4), 23.0f + 4.0f);\n  VERIFY_IS_APPROX(vec3(5), 42.0f + 5.0f);\n}\n\nstatic void test_2d()\n{\n  float data1[6];\n  TensorMap<Tensor<float, 2>> mat1(data1, 2, 3);\n  float data2[6];\n  TensorMap<Tensor<float, 2, RowMajor>> mat2(data2, 2, 3);\n\n  mat1(0,0) = 0.0;\n  mat1(0,1) = 1.0;\n  mat1(0,2) = 2.0;\n  mat1(1,0) = 3.0;\n  mat1(1,1) = 4.0;\n  mat1(1,2) = 5.0;\n\n  mat2(0,0) = -0.0;\n  mat2(0,1) = -1.0;\n  mat2(0,2) = -2.0;\n  mat2(1,0) = -3.0;\n  mat2(1,1) = -4.0;\n  mat2(1,2) = -5.0;\n\n  Tensor<float, 2> mat3(2,3);\n  Tensor<float, 2, RowMajor> mat4(2,3);\n  mat3 = mat1.abs();\n  mat4 = mat2.abs();\n\n  VERIFY_IS_APPROX(mat3(0,0), 0.0f);\n  VERIFY_IS_APPROX(mat3(0,1), 1.0f);\n  VERIFY_IS_APPROX(mat3(0,2), 2.0f);\n  VERIFY_IS_APPROX(mat3(1,0), 3.0f);\n  VERIFY_IS_APPROX(mat3(1,1), 4.0f);\n  VERIFY_IS_APPROX(mat3(1,2), 5.0f);\n\n  VERIFY_IS_APPROX(mat4(0,0), 0.0f);\n  VERIFY_IS_APPROX(mat4(0,1), 1.0f);\n  VERIFY_IS_APPROX(mat4(0,2), 2.0f);\n  VERIFY_IS_APPROX(mat4(1,0), 3.0f);\n  VERIFY_IS_APPROX(mat4(1,1), 4.0f);\n  VERIFY_IS_APPROX(mat4(1,2), 5.0f);\n}\n\nstatic void test_3d()\n{\n  Tensor<float, 3> mat1(2,3,7);\n  Tensor<float, 3, RowMajor> mat2(2,3,7);\n\n  float val = 1.0f;\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        mat1(i,j,k) = val;\n        mat2(i,j,k) = val;\n        val += 1.0f;\n      }\n    }\n  }\n\n  Tensor<float, 3> mat3(2,3,7);\n  mat3 = mat1 + mat1;\n  Tensor<float, 3, RowMajor> mat4(2,3,7);\n  mat4 = mat2 * 3.14f;\n  Tensor<float, 3> mat5(2,3,7);\n  mat5 = mat1.inverse().log();\n  Tensor<float, 3, RowMajor> mat6(2,3,7);\n  mat6 = mat2.pow(0.5f) * 3.14f;\n  Tensor<float, 3> mat7(2,3,7);\n  mat7 = mat1.cwiseMax(mat5 * 2.0f).exp();\n  Tensor<float, 3, RowMajor> mat8(2,3,7);\n  mat8 = (-mat2).exp() * 3.14f;\n  Tensor<float, 3, RowMajor> mat9(2,3,7);\n  mat9 = mat2 + 3.14f;\n  Tensor<float, 3, RowMajor> mat10(2,3,7);\n  mat10 = mat2 - 3.14f;\n  Tensor<float, 3, RowMajor> mat11(2,3,7);\n  mat11 = mat2 / 3.14f;\n\n  val = 1.0f;\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        VERIFY_IS_APPROX(mat3(i,j,k), val + val);\n        VERIFY_IS_APPROX(mat4(i,j,k), val * 3.14f);\n        VERIFY_IS_APPROX(mat5(i,j,k), logf(1.0f/val));\n        VERIFY_IS_APPROX(mat6(i,j,k), sqrtf(val) * 3.14f);\n        VERIFY_IS_APPROX(mat7(i,j,k), expf((std::max)(val, mat5(i,j,k) * 2.0f)));\n        VERIFY_IS_APPROX(mat8(i,j,k), expf(-val) * 3.14f);\n        VERIFY_IS_APPROX(mat9(i,j,k), val + 3.14f);\n        VERIFY_IS_APPROX(mat10(i,j,k), val - 3.14f);\n        VERIFY_IS_APPROX(mat11(i,j,k), val / 3.14f);\n        val += 1.0f;\n      }\n    }\n  }\n}\n\nstatic void test_constants()\n{\n  Tensor<float, 3> mat1(2,3,7);\n  Tensor<float, 3> mat2(2,3,7);\n  Tensor<float, 3> mat3(2,3,7);\n\n  float val = 1.0f;\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        mat1(i,j,k) = val;\n        val += 1.0f;\n      }\n    }\n  }\n  mat2 = mat1.constant(3.14f);\n  mat3 = mat1.cwiseMax(7.3f).exp();\n\n  val = 1.0f;\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        VERIFY_IS_APPROX(mat2(i,j,k), 3.14f);\n        VERIFY_IS_APPROX(mat3(i,j,k), expf((std::max)(val, 7.3f)));\n        val += 1.0f;\n      }\n    }\n  }\n}\n\nstatic void test_boolean()\n{\n  Tensor<int, 1> vec(31);\n  std::iota(vec.data(), vec.data() + 31, 0);\n\n  // Test ||.\n  Tensor<bool, 1> bool1 = vec < vec.constant(1) || vec > vec.constant(4);\n  VERIFY_IS_EQUAL(bool1[0], true);\n  VERIFY_IS_EQUAL(bool1[1], false);\n  VERIFY_IS_EQUAL(bool1[2], false);\n  VERIFY_IS_EQUAL(bool1[3], false);\n  VERIFY_IS_EQUAL(bool1[4], false);\n  VERIFY_IS_EQUAL(bool1[5], true);\n\n  // Test &&, including cast of operand vec.\n  Tensor<bool, 1> bool2 = vec.cast<bool>() && vec < vec.constant(4);\n  VERIFY_IS_EQUAL(bool2[0], false);\n  VERIFY_IS_EQUAL(bool2[1], true);\n  VERIFY_IS_EQUAL(bool2[2], true);\n  VERIFY_IS_EQUAL(bool2[3], true);\n  VERIFY_IS_EQUAL(bool2[4], false);\n  VERIFY_IS_EQUAL(bool2[5], false);\n\n  // Compilation tests:\n  // Test Tensor<bool> against results of cast or comparison; verifies that\n  // CoeffReturnType is set to match Op return type of bool for Unary and Binary\n  // Ops.\n  Tensor<bool, 1> bool3 = vec.cast<bool>() && bool2;\n  bool3 = vec < vec.constant(4) && bool2;\n}\n\nstatic void test_functors()\n{\n  Tensor<float, 3> mat1(2,3,7);\n  Tensor<float, 3> mat2(2,3,7);\n  Tensor<float, 3> mat3(2,3,7);\n\n  float val = 1.0f;\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        mat1(i,j,k) = val;\n        val += 1.0f;\n      }\n    }\n  }\n  mat2 = mat1.inverse().unaryExpr(&asinf);\n  mat3 = mat1.unaryExpr(&tanhf);\n\n  val = 1.0f;\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        VERIFY_IS_APPROX(mat2(i,j,k), asinf(1.0f / mat1(i,j,k)));\n        VERIFY_IS_APPROX(mat3(i,j,k), tanhf(mat1(i,j,k)));\n        val += 1.0f;\n      }\n    }\n  }\n}\n\nstatic void test_type_casting()\n{\n  Tensor<bool, 3> mat1(2,3,7);\n  Tensor<float, 3> mat2(2,3,7);\n  Tensor<double, 3> mat3(2,3,7);\n  mat1.setRandom();\n  mat2.setRandom();\n\n  mat3 = mat1.cast<double>();\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        VERIFY_IS_APPROX(mat3(i,j,k), mat1(i,j,k) ? 1.0 : 0.0);\n      }\n    }\n  }\n\n  mat3 = mat2.cast<double>();\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        VERIFY_IS_APPROX(mat3(i,j,k), static_cast<double>(mat2(i,j,k)));\n      }\n    }\n  }\n}\n\nstatic void test_select()\n{\n  Tensor<float, 3> selector(2,3,7);\n  Tensor<float, 3> mat1(2,3,7);\n  Tensor<float, 3> mat2(2,3,7);\n  Tensor<float, 3> result(2,3,7);\n\n  selector.setRandom();\n  mat1.setRandom();\n  mat2.setRandom();\n  result = (selector > selector.constant(0.5f)).select(mat1, mat2);\n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        VERIFY_IS_APPROX(result(i,j,k), (selector(i,j,k) > 0.5f) ? mat1(i,j,k) : mat2(i,j,k));\n      }\n    }\n  }\n}\n\ntemplate <typename Scalar>\nvoid test_minmax_nan_propagation_templ() {\n  for (int size = 1; size < 17; ++size) {\n    const Scalar kNan = std::numeric_limits<Scalar>::quiet_NaN();\n    Tensor<Scalar, 1> vec_nan(size);\n    Tensor<Scalar, 1> vec_zero(size);\n    Tensor<Scalar, 1> vec_res(size);\n    vec_nan.setConstant(kNan);\n    vec_zero.setZero();\n    vec_res.setZero();\n\n    // Test that we propagate NaNs in the tensor when applying the\n    // cwiseMax(scalar) operator, which is used for the Relu operator.\n    vec_res = vec_nan.cwiseMax(Scalar(0));\n    for (int i = 0; i < size; ++i) {\n      VERIFY((numext::isnan)(vec_res(i)));\n    }\n\n    // Test that NaNs do not propagate if we reverse the arguments.\n    vec_res = vec_zero.cwiseMax(kNan);\n    for (int i = 0; i < size; ++i) {\n      VERIFY_IS_EQUAL(vec_res(i), Scalar(0));\n    }\n\n    // Test that we propagate NaNs in the tensor when applying the\n    // cwiseMin(scalar) operator.\n    vec_res.setZero();\n    vec_res = vec_nan.cwiseMin(Scalar(0));\n    for (int i = 0; i < size; ++i) {\n      VERIFY((numext::isnan)(vec_res(i)));\n    }\n\n    // Test that NaNs do not propagate if we reverse the arguments.\n    vec_res = vec_zero.cwiseMin(kNan);\n    for (int i = 0; i < size; ++i) {\n      VERIFY_IS_EQUAL(vec_res(i), Scalar(0));\n    }\n  }\n}\n\nstatic void test_clip()\n{\n  Tensor<float, 1> vec(6);\n  vec(0) = 4.0;\n  vec(1) = 8.0;\n  vec(2) = 15.0;\n  vec(3) = 16.0;\n  vec(4) = 23.0;\n  vec(5) = 42.0;\n\n  float kMin = 20;\n  float kMax = 30;\n\n  Tensor<float, 1> vec_clipped(6);\n  vec_clipped = vec.clip(kMin, kMax);\n  for (int i = 0; i < 6; ++i) {\n    VERIFY_IS_EQUAL(vec_clipped(i), numext::mini(numext::maxi(vec(i), kMin), kMax));\n  }\n}\n\nstatic void test_minmax_nan_propagation()\n{\n  test_minmax_nan_propagation_templ<float>();\n  test_minmax_nan_propagation_templ<double>();\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_expr)\n{\n  CALL_SUBTEST(test_1d());\n  CALL_SUBTEST(test_2d());\n  CALL_SUBTEST(test_3d());\n  CALL_SUBTEST(test_constants());\n  CALL_SUBTEST(test_boolean());\n  CALL_SUBTEST(test_functors());\n  CALL_SUBTEST(test_type_casting());\n  CALL_SUBTEST(test_select());\n  CALL_SUBTEST(test_clip());\n  CALL_SUBTEST(test_minmax_nan_propagation());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_fft.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Jianwei Cui <thucjw@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\n\ntemplate <int DataLayout>\nstatic void test_fft_2D_golden() {\n  Tensor<float, 2, DataLayout> input(2, 3);\n  input(0, 0) = 1;\n  input(0, 1) = 2;\n  input(0, 2) = 3;\n  input(1, 0) = 4;\n  input(1, 1) = 5;\n  input(1, 2) = 6;\n\n  array<ptrdiff_t, 2> fft;\n  fft[0] = 0;\n  fft[1] = 1;\n\n  Tensor<std::complex<float>, 2, DataLayout> output = input.template fft<Eigen::BothParts, Eigen::FFT_FORWARD>(fft);\n\n  std::complex<float> output_golden[6]; // in ColMajor order\n  output_golden[0] = std::complex<float>(21, 0);\n  output_golden[1] = std::complex<float>(-9, 0);\n  output_golden[2] = std::complex<float>(-3, 1.73205);\n  output_golden[3] = std::complex<float>( 0, 0);\n  output_golden[4] = std::complex<float>(-3, -1.73205);\n  output_golden[5] = std::complex<float>(0 ,0);\n\n  std::complex<float> c_offset = std::complex<float>(1.0, 1.0);\n\n  if (DataLayout == ColMajor) {\n    VERIFY_IS_APPROX(output(0) + c_offset, output_golden[0] + c_offset);\n    VERIFY_IS_APPROX(output(1) + c_offset, output_golden[1] + c_offset);\n    VERIFY_IS_APPROX(output(2) + c_offset, output_golden[2] + c_offset);\n    VERIFY_IS_APPROX(output(3) + c_offset, output_golden[3] + c_offset);\n    VERIFY_IS_APPROX(output(4) + c_offset, output_golden[4] + c_offset);\n    VERIFY_IS_APPROX(output(5) + c_offset, output_golden[5] + c_offset);\n  }\n  else {\n    VERIFY_IS_APPROX(output(0)+ c_offset, output_golden[0]+ c_offset);\n    VERIFY_IS_APPROX(output(1)+ c_offset, output_golden[2]+ c_offset);\n    VERIFY_IS_APPROX(output(2)+ c_offset, output_golden[4]+ c_offset);\n    VERIFY_IS_APPROX(output(3)+ c_offset, output_golden[1]+ c_offset);\n    VERIFY_IS_APPROX(output(4)+ c_offset, output_golden[3]+ c_offset);\n    VERIFY_IS_APPROX(output(5)+ c_offset, output_golden[5]+ c_offset);\n  }\n}\n\nstatic void test_fft_complex_input_golden() {\n  Tensor<std::complex<float>, 1, ColMajor> input(5);\n  input(0) = std::complex<float>(1, 1);\n  input(1) = std::complex<float>(2, 2);\n  input(2) = std::complex<float>(3, 3);\n  input(3) = std::complex<float>(4, 4);\n  input(4) = std::complex<float>(5, 5);\n\n  array<ptrdiff_t, 1> fft;\n  fft[0] = 0;\n\n  Tensor<std::complex<float>, 1, ColMajor> forward_output_both_parts = input.fft<BothParts, FFT_FORWARD>(fft);\n  Tensor<std::complex<float>, 1, ColMajor> reverse_output_both_parts = input.fft<BothParts, FFT_REVERSE>(fft);\n\n  Tensor<float, 1, ColMajor> forward_output_real_part = input.fft<RealPart, FFT_FORWARD>(fft);\n  Tensor<float, 1, ColMajor> reverse_output_real_part = input.fft<RealPart, FFT_REVERSE>(fft);\n\n  Tensor<float, 1, ColMajor> forward_output_imag_part = input.fft<ImagPart, FFT_FORWARD>(fft);\n  Tensor<float, 1, ColMajor> reverse_output_imag_part = input.fft<ImagPart, FFT_REVERSE>(fft);\n\n  VERIFY_IS_EQUAL(forward_output_both_parts.dimension(0), input.dimension(0));\n  VERIFY_IS_EQUAL(reverse_output_both_parts.dimension(0), input.dimension(0));\n\n  VERIFY_IS_EQUAL(forward_output_real_part.dimension(0), input.dimension(0));\n  VERIFY_IS_EQUAL(reverse_output_real_part.dimension(0), input.dimension(0));\n\n  VERIFY_IS_EQUAL(forward_output_imag_part.dimension(0), input.dimension(0));\n  VERIFY_IS_EQUAL(reverse_output_imag_part.dimension(0), input.dimension(0));\n\n  std::complex<float> forward_golden_result[5];\n  std::complex<float> reverse_golden_result[5];\n\n  forward_golden_result[0] = std::complex<float>(15.000000000000000,+15.000000000000000);\n  forward_golden_result[1] = std::complex<float>(-5.940954801177935, +0.940954801177934);\n  forward_golden_result[2] = std::complex<float>(-3.312299240582266, -1.687700759417735);\n  forward_golden_result[3] = std::complex<float>(-1.687700759417735, -3.312299240582266);\n  forward_golden_result[4] = std::complex<float>( 0.940954801177934, -5.940954801177935);\n\n  reverse_golden_result[0] = std::complex<float>( 3.000000000000000, + 3.000000000000000);\n  reverse_golden_result[1] = std::complex<float>( 0.188190960235587, - 1.188190960235587);\n  reverse_golden_result[2] = std::complex<float>(-0.337540151883547, - 0.662459848116453);\n  reverse_golden_result[3] = std::complex<float>(-0.662459848116453, - 0.337540151883547);\n  reverse_golden_result[4] = std::complex<float>(-1.188190960235587, + 0.188190960235587);\n\n  for(int i = 0; i < 5; ++i) {\n    VERIFY_IS_APPROX(forward_output_both_parts(i), forward_golden_result[i]);\n    VERIFY_IS_APPROX(forward_output_real_part(i), forward_golden_result[i].real());\n    VERIFY_IS_APPROX(forward_output_imag_part(i), forward_golden_result[i].imag());\n  }\n\n  for(int i = 0; i < 5; ++i) {\n    VERIFY_IS_APPROX(reverse_output_both_parts(i), reverse_golden_result[i]);\n    VERIFY_IS_APPROX(reverse_output_real_part(i), reverse_golden_result[i].real());\n    VERIFY_IS_APPROX(reverse_output_imag_part(i), reverse_golden_result[i].imag());\n  }\n}\n\nstatic void test_fft_real_input_golden() {\n  Tensor<float, 1, ColMajor> input(5);\n  input(0) = 1.0;\n  input(1) = 2.0;\n  input(2) = 3.0;\n  input(3) = 4.0;\n  input(4) = 5.0;\n\n  array<ptrdiff_t, 1> fft;\n  fft[0] = 0;\n\n  Tensor<std::complex<float>, 1, ColMajor> forward_output_both_parts = input.fft<BothParts, FFT_FORWARD>(fft);\n  Tensor<std::complex<float>, 1, ColMajor> reverse_output_both_parts = input.fft<BothParts, FFT_REVERSE>(fft);\n\n  Tensor<float, 1, ColMajor> forward_output_real_part = input.fft<RealPart, FFT_FORWARD>(fft);\n  Tensor<float, 1, ColMajor> reverse_output_real_part = input.fft<RealPart, FFT_REVERSE>(fft);\n\n  Tensor<float, 1, ColMajor> forward_output_imag_part = input.fft<ImagPart, FFT_FORWARD>(fft);\n  Tensor<float, 1, ColMajor> reverse_output_imag_part = input.fft<ImagPart, FFT_REVERSE>(fft);\n\n  VERIFY_IS_EQUAL(forward_output_both_parts.dimension(0), input.dimension(0));\n  VERIFY_IS_EQUAL(reverse_output_both_parts.dimension(0), input.dimension(0));\n\n  VERIFY_IS_EQUAL(forward_output_real_part.dimension(0), input.dimension(0));\n  VERIFY_IS_EQUAL(reverse_output_real_part.dimension(0), input.dimension(0));\n\n  VERIFY_IS_EQUAL(forward_output_imag_part.dimension(0), input.dimension(0));\n  VERIFY_IS_EQUAL(reverse_output_imag_part.dimension(0), input.dimension(0));\n\n  std::complex<float> forward_golden_result[5];\n  std::complex<float> reverse_golden_result[5];\n\n\n  forward_golden_result[0] = std::complex<float>(  15, 0);\n  forward_golden_result[1] = std::complex<float>(-2.5, +3.44095480117793);\n  forward_golden_result[2] = std::complex<float>(-2.5, +0.81229924058227);\n  forward_golden_result[3] = std::complex<float>(-2.5, -0.81229924058227);\n  forward_golden_result[4] = std::complex<float>(-2.5, -3.44095480117793);\n\n  reverse_golden_result[0] = std::complex<float>( 3.0, 0);\n  reverse_golden_result[1] = std::complex<float>(-0.5, -0.688190960235587);\n  reverse_golden_result[2] = std::complex<float>(-0.5, -0.162459848116453);\n  reverse_golden_result[3] = std::complex<float>(-0.5, +0.162459848116453);\n  reverse_golden_result[4] = std::complex<float>(-0.5, +0.688190960235587);\n\n  std::complex<float> c_offset(1.0, 1.0);\n  float r_offset = 1.0;\n\n  for(int i = 0; i < 5; ++i) {\n    VERIFY_IS_APPROX(forward_output_both_parts(i) + c_offset, forward_golden_result[i] + c_offset);\n    VERIFY_IS_APPROX(forward_output_real_part(i)  + r_offset, forward_golden_result[i].real() + r_offset);\n    VERIFY_IS_APPROX(forward_output_imag_part(i)  + r_offset, forward_golden_result[i].imag() + r_offset);\n  }\n\n  for(int i = 0; i < 5; ++i) {\n    VERIFY_IS_APPROX(reverse_output_both_parts(i) + c_offset, reverse_golden_result[i] + c_offset);\n    VERIFY_IS_APPROX(reverse_output_real_part(i)  + r_offset, reverse_golden_result[i].real() + r_offset);\n    VERIFY_IS_APPROX(reverse_output_imag_part(i)  + r_offset, reverse_golden_result[i].imag() + r_offset);\n  }\n}\n\n\ntemplate <int DataLayout, typename RealScalar, bool isComplexInput, int FFTResultType, int FFTDirection, int TensorRank>\nstatic void test_fft_real_input_energy() {\n\n  Eigen::DSizes<ptrdiff_t, TensorRank> dimensions;\n  ptrdiff_t total_size = 1;\n  for (int i = 0; i < TensorRank; ++i) {\n    dimensions[i] = rand() % 20 + 1;\n    total_size *= dimensions[i];\n  }\n  const DSizes<ptrdiff_t, TensorRank> arr = dimensions;\n\n  typedef typename internal::conditional<isComplexInput == true, std::complex<RealScalar>, RealScalar>::type InputScalar;\n\n  Tensor<InputScalar, TensorRank, DataLayout> input;\n  input.resize(arr);\n  input.setRandom();\n\n  array<ptrdiff_t, TensorRank> fft;\n  for (int i = 0; i < TensorRank; ++i) {\n    fft[i] = i;\n  }\n\n  typedef typename internal::conditional<FFTResultType == Eigen::BothParts, std::complex<RealScalar>, RealScalar>::type OutputScalar;\n  Tensor<OutputScalar, TensorRank, DataLayout> output;\n  output = input.template fft<FFTResultType, FFTDirection>(fft);\n\n  for (int i = 0; i < TensorRank; ++i) {\n    VERIFY_IS_EQUAL(output.dimension(i), input.dimension(i));\n  }\n\n  RealScalar energy_original = 0.0;\n  RealScalar energy_after_fft = 0.0;\n\n  for (int i = 0; i < total_size; ++i) {\n    energy_original += numext::abs2(input(i));\n  }\n\n  for (int i = 0; i < total_size; ++i) {\n    energy_after_fft += numext::abs2(output(i));\n  }\n\n  if(FFTDirection == FFT_FORWARD) {\n    VERIFY_IS_APPROX(energy_original, energy_after_fft / total_size);\n  }\n  else {\n    VERIFY_IS_APPROX(energy_original, energy_after_fft * total_size);\n  }\n}\n\ntemplate <typename RealScalar>\nstatic void test_fft_non_power_of_2_round_trip(int exponent) {\n  int n = (1 << exponent) + 1;\n\n  Eigen::DSizes<std::int64_t, 1> dimensions;\n  dimensions[0] = n;\n  const DSizes<std::int64_t, 1> arr = dimensions;\n  Tensor<RealScalar, 1, ColMajor, std::int64_t> input;\n\n  input.resize(arr);\n  input.setRandom();\n\n  array<int, 1> fft;\n  fft[0] = 0;\n\n  Tensor<std::complex<RealScalar>, 1, ColMajor> forward =\n      input.template fft<BothParts, FFT_FORWARD>(fft);\n\n  Tensor<RealScalar, 1, ColMajor, std::int64_t> output =\n      forward.template fft<RealPart, FFT_REVERSE>(fft);\n\n  for (int i = 0; i < n; ++i) {\n    RealScalar tol = test_precision<RealScalar>() *\n                     (std::abs(input[i]) + std::abs(output[i]) + 1);\n    VERIFY_IS_APPROX_OR_LESS_THAN(std::abs(input[i] - output[i]), tol);\n  }\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_fft) {\n    test_fft_complex_input_golden();\n    test_fft_real_input_golden();\n\n    test_fft_2D_golden<ColMajor>();\n    test_fft_2D_golden<RowMajor>();\n\n    test_fft_real_input_energy<ColMajor, float,  true,  Eigen::BothParts, FFT_FORWARD, 1>();\n    test_fft_real_input_energy<ColMajor, double, true,  Eigen::BothParts, FFT_FORWARD, 1>();\n    test_fft_real_input_energy<ColMajor, float,  false,  Eigen::BothParts, FFT_FORWARD, 1>();\n    test_fft_real_input_energy<ColMajor, double, false,  Eigen::BothParts, FFT_FORWARD, 1>();\n\n    test_fft_real_input_energy<ColMajor, float,  true,  Eigen::BothParts, FFT_FORWARD, 2>();\n    test_fft_real_input_energy<ColMajor, double, true,  Eigen::BothParts, FFT_FORWARD, 2>();\n    test_fft_real_input_energy<ColMajor, float,  false,  Eigen::BothParts, FFT_FORWARD, 2>();\n    test_fft_real_input_energy<ColMajor, double, false,  Eigen::BothParts, FFT_FORWARD, 2>();\n\n    test_fft_real_input_energy<ColMajor, float,  true,  Eigen::BothParts, FFT_FORWARD, 3>();\n    test_fft_real_input_energy<ColMajor, double, true,  Eigen::BothParts, FFT_FORWARD, 3>();\n    test_fft_real_input_energy<ColMajor, float,  false,  Eigen::BothParts, FFT_FORWARD, 3>();\n    test_fft_real_input_energy<ColMajor, double, false,  Eigen::BothParts, FFT_FORWARD, 3>();\n\n    test_fft_real_input_energy<ColMajor, float,  true,  Eigen::BothParts, FFT_FORWARD, 4>();\n    test_fft_real_input_energy<ColMajor, double, true,  Eigen::BothParts, FFT_FORWARD, 4>();\n    test_fft_real_input_energy<ColMajor, float,  false,  Eigen::BothParts, FFT_FORWARD, 4>();\n    test_fft_real_input_energy<ColMajor, double, false,  Eigen::BothParts, FFT_FORWARD, 4>();\n\n    test_fft_real_input_energy<RowMajor, float,  true,  Eigen::BothParts, FFT_FORWARD, 1>();\n    test_fft_real_input_energy<RowMajor, double, true,  Eigen::BothParts, FFT_FORWARD, 1>();\n    test_fft_real_input_energy<RowMajor, float,  false,  Eigen::BothParts, FFT_FORWARD, 1>();\n    test_fft_real_input_energy<RowMajor, double, false,  Eigen::BothParts, FFT_FORWARD, 1>();\n\n    test_fft_real_input_energy<RowMajor, float,  true,  Eigen::BothParts, FFT_FORWARD, 2>();\n    test_fft_real_input_energy<RowMajor, double, true,  Eigen::BothParts, FFT_FORWARD, 2>();\n    test_fft_real_input_energy<RowMajor, float,  false,  Eigen::BothParts, FFT_FORWARD, 2>();\n    test_fft_real_input_energy<RowMajor, double, false,  Eigen::BothParts, FFT_FORWARD, 2>();\n\n    test_fft_real_input_energy<RowMajor, float,  true,  Eigen::BothParts, FFT_FORWARD, 3>();\n    test_fft_real_input_energy<RowMajor, double, true,  Eigen::BothParts, FFT_FORWARD, 3>();\n    test_fft_real_input_energy<RowMajor, float,  false,  Eigen::BothParts, FFT_FORWARD, 3>();\n    test_fft_real_input_energy<RowMajor, double, false,  Eigen::BothParts, FFT_FORWARD, 3>();\n\n    test_fft_real_input_energy<RowMajor, float,  true,  Eigen::BothParts, FFT_FORWARD, 4>();\n    test_fft_real_input_energy<RowMajor, double, true,  Eigen::BothParts, FFT_FORWARD, 4>();\n    test_fft_real_input_energy<RowMajor, float,  false,  Eigen::BothParts, FFT_FORWARD, 4>();\n    test_fft_real_input_energy<RowMajor, double, false,  Eigen::BothParts, FFT_FORWARD, 4>();\n\n    test_fft_non_power_of_2_round_trip<float>(7);\n    test_fft_non_power_of_2_round_trip<double>(7);\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_fixed_size.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\nusing Eigen::RowMajor;\n\n\nstatic void test_0d()\n{\n  TensorFixedSize<float, Sizes<> > scalar1;\n  TensorFixedSize<float, Sizes<>, RowMajor> scalar2;\n  VERIFY_IS_EQUAL(scalar1.rank(), 0);\n  VERIFY_IS_EQUAL(scalar1.size(), 1);\n  VERIFY_IS_EQUAL(internal::array_prod(scalar1.dimensions()), 1);\n\n  scalar1() = 7.0;\n  scalar2() = 13.0;\n\n  // Test against shallow copy.\n  TensorFixedSize<float, Sizes<> > copy = scalar1;\n  VERIFY_IS_NOT_EQUAL(scalar1.data(), copy.data());\n  VERIFY_IS_APPROX(scalar1(), copy());\n  copy = scalar1;\n  VERIFY_IS_NOT_EQUAL(scalar1.data(), copy.data());\n  VERIFY_IS_APPROX(scalar1(), copy());\n\n  TensorFixedSize<float, Sizes<> > scalar3 = scalar1.sqrt();\n  TensorFixedSize<float, Sizes<>, RowMajor> scalar4 = scalar2.sqrt();\n  VERIFY_IS_EQUAL(scalar3.rank(), 0);\n  VERIFY_IS_APPROX(scalar3(), sqrtf(7.0));\n  VERIFY_IS_APPROX(scalar4(), sqrtf(13.0));\n\n  scalar3 = scalar1 + scalar2;\n  VERIFY_IS_APPROX(scalar3(), 7.0f + 13.0f);\n}\n\nstatic void test_1d()\n{\n  TensorFixedSize<float, Sizes<6> > vec1;\n  TensorFixedSize<float, Sizes<6>, RowMajor> vec2;\n\n  VERIFY_IS_EQUAL((vec1.size()), 6);\n  //  VERIFY_IS_EQUAL((vec1.dimensions()[0]), 6);\n  //  VERIFY_IS_EQUAL((vec1.dimension(0)), 6);\n\n  vec1(0) = 4.0;  vec2(0) = 0.0;\n  vec1(1) = 8.0;  vec2(1) = 1.0;\n  vec1(2) = 15.0; vec2(2) = 2.0;\n  vec1(3) = 16.0; vec2(3) = 3.0;\n  vec1(4) = 23.0; vec2(4) = 4.0;\n  vec1(5) = 42.0; vec2(5) = 5.0;\n\n  // Test against shallow copy.\n  TensorFixedSize<float, Sizes<6> > copy = vec1;\n  VERIFY_IS_NOT_EQUAL(vec1.data(), copy.data());\n  for (int i = 0; i < 6; ++i) {\n    VERIFY_IS_APPROX(vec1(i), copy(i));\n  }\n  copy = vec1;\n  VERIFY_IS_NOT_EQUAL(vec1.data(), copy.data());\n  for (int i = 0; i < 6; ++i) {\n    VERIFY_IS_APPROX(vec1(i), copy(i));\n  }\n\n  TensorFixedSize<float, Sizes<6> > vec3 = vec1.sqrt();\n  TensorFixedSize<float, Sizes<6>, RowMajor> vec4 = vec2.sqrt();\n\n  VERIFY_IS_EQUAL((vec3.size()), 6);\n  VERIFY_IS_EQUAL(vec3.rank(), 1);\n  //  VERIFY_IS_EQUAL((vec3.dimensions()[0]), 6);\n  //  VERIFY_IS_EQUAL((vec3.dimension(0)), 6);\n\n  VERIFY_IS_APPROX(vec3(0), sqrtf(4.0));\n  VERIFY_IS_APPROX(vec3(1), sqrtf(8.0));\n  VERIFY_IS_APPROX(vec3(2), sqrtf(15.0));\n  VERIFY_IS_APPROX(vec3(3), sqrtf(16.0));\n  VERIFY_IS_APPROX(vec3(4), sqrtf(23.0));\n  VERIFY_IS_APPROX(vec3(5), sqrtf(42.0));\n\n  VERIFY_IS_APPROX(vec4(0), sqrtf(0.0));\n  VERIFY_IS_APPROX(vec4(1), sqrtf(1.0));\n  VERIFY_IS_APPROX(vec4(2), sqrtf(2.0));\n  VERIFY_IS_APPROX(vec4(3), sqrtf(3.0));\n  VERIFY_IS_APPROX(vec4(4), sqrtf(4.0));\n  VERIFY_IS_APPROX(vec4(5), sqrtf(5.0));\n\n  vec3 = vec1 + vec2;\n  VERIFY_IS_APPROX(vec3(0), 4.0f + 0.0f);\n  VERIFY_IS_APPROX(vec3(1), 8.0f + 1.0f);\n  VERIFY_IS_APPROX(vec3(2), 15.0f + 2.0f);\n  VERIFY_IS_APPROX(vec3(3), 16.0f + 3.0f);\n  VERIFY_IS_APPROX(vec3(4), 23.0f + 4.0f);\n  VERIFY_IS_APPROX(vec3(5), 42.0f + 5.0f);\n}\n\nstatic void test_tensor_map()\n{\n  TensorFixedSize<float, Sizes<6> > vec1;\n  TensorFixedSize<float, Sizes<6>, RowMajor> vec2;\n\n  vec1(0) = 4.0;  vec2(0) = 0.0;\n  vec1(1) = 8.0;  vec2(1) = 1.0;\n  vec1(2) = 15.0; vec2(2) = 2.0;\n  vec1(3) = 16.0; vec2(3) = 3.0;\n  vec1(4) = 23.0; vec2(4) = 4.0;\n  vec1(5) = 42.0; vec2(5) = 5.0;\n\n  float data3[6];\n  TensorMap<TensorFixedSize<float, Sizes<6> > > vec3(data3, 6);\n  vec3 = vec1.sqrt() + vec2;\n\n  VERIFY_IS_APPROX(vec3(0), sqrtf(4.0));\n  VERIFY_IS_APPROX(vec3(1), sqrtf(8.0) + 1.0f);\n  VERIFY_IS_APPROX(vec3(2), sqrtf(15.0) + 2.0f);\n  VERIFY_IS_APPROX(vec3(3), sqrtf(16.0) + 3.0f);\n  VERIFY_IS_APPROX(vec3(4), sqrtf(23.0) + 4.0f);\n  VERIFY_IS_APPROX(vec3(5), sqrtf(42.0) + 5.0f);\n}\n\nstatic void test_2d()\n{\n  float data1[6];\n  TensorMap<TensorFixedSize<float, Sizes<2, 3> > > mat1(data1,2,3);\n  float data2[6];\n  TensorMap<TensorFixedSize<float, Sizes<2, 3>, RowMajor> > mat2(data2,2,3);\n\n  VERIFY_IS_EQUAL((mat1.size()), 2*3);\n  VERIFY_IS_EQUAL(mat1.rank(), 2);\n  //  VERIFY_IS_EQUAL((mat1.dimension(0)), 2);\n  //  VERIFY_IS_EQUAL((mat1.dimension(1)), 3);\n\n  mat1(0,0) = 0.0;\n  mat1(0,1) = 1.0;\n  mat1(0,2) = 2.0;\n  mat1(1,0) = 3.0;\n  mat1(1,1) = 4.0;\n  mat1(1,2) = 5.0;\n\n  mat2(0,0) = -0.0;\n  mat2(0,1) = -1.0;\n  mat2(0,2) = -2.0;\n  mat2(1,0) = -3.0;\n  mat2(1,1) = -4.0;\n  mat2(1,2) = -5.0;\n\n  TensorFixedSize<float, Sizes<2, 3> > mat3;\n  TensorFixedSize<float, Sizes<2, 3>, RowMajor> mat4;\n  mat3 = mat1.abs();\n  mat4 = mat2.abs();\n\n  VERIFY_IS_EQUAL((mat3.size()), 2*3);\n    //  VERIFY_IS_EQUAL((mat3.dimension(0)), 2);\n    //  VERIFY_IS_EQUAL((mat3.dimension(1)), 3);\n\n  VERIFY_IS_APPROX(mat3(0,0), 0.0f);\n  VERIFY_IS_APPROX(mat3(0,1), 1.0f);\n  VERIFY_IS_APPROX(mat3(0,2), 2.0f);\n  VERIFY_IS_APPROX(mat3(1,0), 3.0f);\n  VERIFY_IS_APPROX(mat3(1,1), 4.0f);\n  VERIFY_IS_APPROX(mat3(1,2), 5.0f);\n\n  VERIFY_IS_APPROX(mat4(0,0), 0.0f);\n  VERIFY_IS_APPROX(mat4(0,1), 1.0f);\n  VERIFY_IS_APPROX(mat4(0,2), 2.0f);\n  VERIFY_IS_APPROX(mat4(1,0), 3.0f);\n  VERIFY_IS_APPROX(mat4(1,1), 4.0f);\n  VERIFY_IS_APPROX(mat4(1,2), 5.0f);\n}\n\nstatic void test_3d()\n{\n  TensorFixedSize<float, Sizes<2, 3, 7> > mat1;\n  TensorFixedSize<float, Sizes<2, 3, 7>, RowMajor> mat2;\n\n  VERIFY_IS_EQUAL((mat1.size()), 2*3*7);\n  VERIFY_IS_EQUAL(mat1.rank(), 3);\n  //  VERIFY_IS_EQUAL((mat1.dimension(0)), 2);\n  //  VERIFY_IS_EQUAL((mat1.dimension(1)), 3);\n  //  VERIFY_IS_EQUAL((mat1.dimension(2)), 7);\n\n  float val = 0.0f;\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        mat1(i,j,k) = val;\n        mat2(i,j,k) = val;\n        val += 1.0f;\n      }\n    }\n  }\n\n  TensorFixedSize<float, Sizes<2, 3, 7> > mat3;\n  mat3 = mat1.sqrt();\n  TensorFixedSize<float, Sizes<2, 3, 7>, RowMajor> mat4;\n  mat4 = mat2.sqrt();\n\n  VERIFY_IS_EQUAL((mat3.size()), 2*3*7);\n  //  VERIFY_IS_EQUAL((mat3.dimension(0)), 2);\n  //  VERIFY_IS_EQUAL((mat3.dimension(1)), 3);\n  //  VERIFY_IS_EQUAL((mat3.dimension(2)), 7);\n\n\n  val = 0.0f;\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        VERIFY_IS_APPROX(mat3(i,j,k), sqrtf(val));\n        VERIFY_IS_APPROX(mat4(i,j,k), sqrtf(val));\n        val += 1.0f;\n      }\n    }\n  }\n}\n\n\nstatic void test_array()\n{\n  TensorFixedSize<float, Sizes<2, 3, 7> > mat1;\n  float val = 0.0f;\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        mat1(i,j,k) = val;\n        val += 1.0f;\n      }\n    }\n  }\n\n  TensorFixedSize<float, Sizes<2, 3, 7> > mat3;\n  mat3 = mat1.pow(3.5f);\n\n  val = 0.0f;\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        VERIFY_IS_APPROX(mat3(i,j,k), powf(val, 3.5f));\n        val += 1.0f;\n      }\n    }\n  }\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_fixed_size)\n{\n  CALL_SUBTEST(test_0d());\n  CALL_SUBTEST(test_1d());\n  CALL_SUBTEST(test_tensor_map());\n  CALL_SUBTEST(test_2d());\n  CALL_SUBTEST(test_3d());\n  CALL_SUBTEST(test_array());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_forced_eval.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/Core>\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::MatrixXf;\nusing Eigen::Tensor;\n\nstatic void test_simple()\n{\n  MatrixXf m1(3,3);\n  MatrixXf m2(3,3);\n  m1.setRandom();\n  m2.setRandom();\n\n  TensorMap<Tensor<float, 2> > mat1(m1.data(), 3,3);\n  TensorMap<Tensor<float, 2> > mat2(m2.data(), 3,3);\n\n  Tensor<float, 2> mat3(3,3);\n  mat3 = mat1;\n\n  typedef Tensor<float, 1>::DimensionPair DimPair;\n  Eigen::array<DimPair, 1> dims;\n  dims[0] = DimPair(1, 0);\n\n  mat3 = mat3.contract(mat2, dims).eval();\n\n  VERIFY_IS_APPROX(mat3(0, 0), (m1*m2).eval()(0,0));\n  VERIFY_IS_APPROX(mat3(0, 1), (m1*m2).eval()(0,1));\n  VERIFY_IS_APPROX(mat3(0, 2), (m1*m2).eval()(0,2));\n  VERIFY_IS_APPROX(mat3(1, 0), (m1*m2).eval()(1,0));\n  VERIFY_IS_APPROX(mat3(1, 1), (m1*m2).eval()(1,1));\n  VERIFY_IS_APPROX(mat3(1, 2), (m1*m2).eval()(1,2));\n  VERIFY_IS_APPROX(mat3(2, 0), (m1*m2).eval()(2,0));\n  VERIFY_IS_APPROX(mat3(2, 1), (m1*m2).eval()(2,1));\n  VERIFY_IS_APPROX(mat3(2, 2), (m1*m2).eval()(2,2));\n}\n\n\nstatic void test_const()\n{\n  MatrixXf input(3,3);\n  input.setRandom();\n  MatrixXf output = input;\n  output.rowwise() -= input.colwise().maxCoeff();\n\n  Eigen::array<int, 1> depth_dim;\n  depth_dim[0] = 0;\n  Tensor<float, 2>::Dimensions dims2d;\n  dims2d[0] = 1;\n  dims2d[1] = 3;\n  Eigen::array<int, 2> bcast;\n  bcast[0] = 3;\n  bcast[1] = 1;\n  const TensorMap<const Tensor<float, 2> > input_tensor(input.data(), 3, 3);\n  Tensor<float, 2> output_tensor= (input_tensor - input_tensor.maximum(depth_dim).eval().reshape(dims2d).broadcast(bcast));\n\n  for (int i = 0; i < 3; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      VERIFY_IS_APPROX(output(i, j), output_tensor(i, j));\n    }\n  }\n}\n\n\nEIGEN_DECLARE_TEST(cxx11_tensor_forced_eval)\n{\n  CALL_SUBTEST(test_simple());\n  CALL_SUBTEST(test_const());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_forced_eval_sycl.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016\n// Mehdi Goli    Codeplay Software Ltd.\n// Ralph Potter  Codeplay Software Ltd.\n// Luke Iwanski  Codeplay Software Ltd.\n// Contact: <eigen@codeplay.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_TEST_NO_LONGDOUBLE\n#define EIGEN_TEST_NO_COMPLEX\n\n#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int64_t\n#define EIGEN_USE_SYCL\n\n#include \"main.h\"\n#include <unsupported/Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\ntemplate <typename DataType, int DataLayout, typename IndexType>\nvoid test_forced_eval_sycl(const Eigen::SyclDevice &sycl_device) {\n\n  IndexType sizeDim1 = 100;\n  IndexType sizeDim2 = 20;\n  IndexType sizeDim3 = 20;\n  Eigen::array<IndexType, 3> tensorRange = {{sizeDim1, sizeDim2, sizeDim3}};\n  Eigen::Tensor<DataType, 3, DataLayout, IndexType> in1(tensorRange);\n  Eigen::Tensor<DataType, 3, DataLayout, IndexType> in2(tensorRange);\n  Eigen::Tensor<DataType, 3, DataLayout, IndexType> out(tensorRange);\n\n  DataType * gpu_in1_data  = static_cast<DataType*>(sycl_device.allocate(in1.dimensions().TotalSize()*sizeof(DataType)));\n  DataType * gpu_in2_data  = static_cast<DataType*>(sycl_device.allocate(in2.dimensions().TotalSize()*sizeof(DataType)));\n  DataType * gpu_out_data =  static_cast<DataType*>(sycl_device.allocate(out.dimensions().TotalSize()*sizeof(DataType)));\n\n  in1 = in1.random() + in1.constant(static_cast<DataType>(10.0f));\n  in2 = in2.random() + in2.constant(static_cast<DataType>(10.0f));\n\n  // creating TensorMap from tensor\n  Eigen::TensorMap<Eigen::Tensor<DataType, 3, DataLayout, IndexType>> gpu_in1(gpu_in1_data, tensorRange);\n  Eigen::TensorMap<Eigen::Tensor<DataType, 3, DataLayout, IndexType>> gpu_in2(gpu_in2_data, tensorRange);\n  Eigen::TensorMap<Eigen::Tensor<DataType, 3, DataLayout, IndexType>> gpu_out(gpu_out_data, tensorRange);\n  sycl_device.memcpyHostToDevice(gpu_in1_data, in1.data(),(in1.dimensions().TotalSize())*sizeof(DataType));\n  sycl_device.memcpyHostToDevice(gpu_in2_data, in2.data(),(in2.dimensions().TotalSize())*sizeof(DataType));\n  /// c=(a+b)*b\n  gpu_out.device(sycl_device) =(gpu_in1 + gpu_in2).eval() * gpu_in2;\n  sycl_device.memcpyDeviceToHost(out.data(), gpu_out_data,(out.dimensions().TotalSize())*sizeof(DataType));\n  for (IndexType i = 0; i < sizeDim1; ++i) {\n    for (IndexType j = 0; j < sizeDim2; ++j) {\n      for (IndexType k = 0; k < sizeDim3; ++k) {\n        VERIFY_IS_APPROX(out(i, j, k),\n                         (in1(i, j, k) + in2(i, j, k)) * in2(i, j, k));\n      }\n    }\n  }\n  printf(\"(a+b)*b Test Passed\\n\");\n  sycl_device.deallocate(gpu_in1_data);\n  sycl_device.deallocate(gpu_in2_data);\n  sycl_device.deallocate(gpu_out_data);\n\n}\n\ntemplate <typename DataType, typename Dev_selector> void tensorForced_evalperDevice(Dev_selector s){\n  QueueInterface queueInterface(s);\n  auto sycl_device = Eigen::SyclDevice(&queueInterface);\n  test_forced_eval_sycl<DataType, RowMajor, int64_t>(sycl_device);\n  test_forced_eval_sycl<DataType, ColMajor, int64_t>(sycl_device);\n}\nEIGEN_DECLARE_TEST(cxx11_tensor_forced_eval_sycl) {\n  for (const auto& device :Eigen::get_sycl_supported_devices()) {\n    CALL_SUBTEST(tensorForced_evalperDevice<float>(device));\n    CALL_SUBTEST(tensorForced_evalperDevice<half>(device));\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_generator.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\nstruct Generator1D {\n  Generator1D() { }\n\n  float operator()(const array<Eigen::DenseIndex, 1>& coordinates) const {\n    return coordinates[0];\n  }\n};\n\ntemplate <int DataLayout>\nstatic void test_1D()\n{\n  Tensor<float, 1> vec(6);\n  Tensor<float, 1> result = vec.generate(Generator1D());\n\n  for (int i = 0; i < 6; ++i) {\n    VERIFY_IS_EQUAL(result(i), i);\n  }\n}\n\n\nstruct Generator2D {\n  Generator2D() { }\n\n  float operator()(const array<Eigen::DenseIndex, 2>& coordinates) const {\n    return 3 * coordinates[0] + 11 * coordinates[1];\n  }\n};\n\ntemplate <int DataLayout>\nstatic void test_2D()\n{\n  Tensor<float, 2> matrix(512, 512);\n  Tensor<float, 2> result = matrix.generate(Generator2D());\n\n  for (int i = 0; i < 512; ++i) {\n    for (int j = 0; j < 512; ++j) {\n      VERIFY_IS_EQUAL(result(i, j), 3*i + 11*j);\n    }\n  }\n}\n\n\ntemplate <int DataLayout>\nstatic void test_gaussian()\n{\n  int rows = 32;\n  int cols = 48;\n  array<float, 2> means;\n  means[0] = rows / 2.0f;\n  means[1] = cols / 2.0f;\n  array<float, 2> std_devs;\n  std_devs[0] = 3.14f;\n  std_devs[1] = 2.7f;\n  internal::GaussianGenerator<float, Eigen::DenseIndex, 2> gaussian_gen(means, std_devs);\n\n  Tensor<float, 2> matrix(rows, cols);\n  Tensor<float, 2> result = matrix.generate(gaussian_gen);\n\n  for (int i = 0; i < rows; ++i) {\n    for (int j = 0; j < cols; ++j) {\n      float g_rows = powf(rows/2.0f - i, 2) / (3.14f * 3.14f) * 0.5f;\n      float g_cols = powf(cols/2.0f - j, 2) / (2.7f * 2.7f) * 0.5f;\n      float gaussian = expf(-g_rows - g_cols);\n      VERIFY_IS_EQUAL(result(i, j), gaussian);\n    }\n  }\n}\n\n\nEIGEN_DECLARE_TEST(cxx11_tensor_generator)\n{\n  CALL_SUBTEST(test_1D<ColMajor>());\n  CALL_SUBTEST(test_1D<RowMajor>());\n  CALL_SUBTEST(test_2D<ColMajor>());\n  CALL_SUBTEST(test_2D<RowMajor>());\n  CALL_SUBTEST(test_gaussian<ColMajor>());\n  CALL_SUBTEST(test_gaussian<RowMajor>());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_generator_sycl.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016\n// Mehdi Goli    Codeplay Software Ltd.\n// Ralph Potter  Codeplay Software Ltd.\n// Luke Iwanski  Codeplay Software Ltd.\n// Contact: <eigen@codeplay.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_TEST_NO_LONGDOUBLE\n#define EIGEN_TEST_NO_COMPLEX\n\n#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int64_t\n#define EIGEN_USE_SYCL\nstatic const float error_threshold =1e-8f;\n\n#include \"main.h\"\n#include <unsupported/Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\nstruct Generator1D {\n  Generator1D() { }\n\n  float operator()(const array<Eigen::DenseIndex, 1>& coordinates) const {\n    return coordinates[0];\n  }\n};\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_1D_sycl(const Eigen::SyclDevice& sycl_device)\n{\n\n  IndexType sizeDim1 = 6;\n  array<IndexType, 1> tensorRange = {{sizeDim1}};\n  Tensor<DataType, 1, DataLayout,IndexType> vec(tensorRange);\n  Tensor<DataType, 1, DataLayout,IndexType> result(tensorRange);\n\n  const size_t tensorBuffSize =vec.size()*sizeof(DataType);\n  DataType* gpu_data_vec  = static_cast<DataType*>(sycl_device.allocate(tensorBuffSize));\n  DataType* gpu_data_result  = static_cast<DataType*>(sycl_device.allocate(tensorBuffSize));\n\n  TensorMap<Tensor<DataType, 1, DataLayout,IndexType>> gpu_vec(gpu_data_vec, tensorRange);\n  TensorMap<Tensor<DataType, 1, DataLayout,IndexType>> gpu_result(gpu_data_result, tensorRange);\n\n  sycl_device.memcpyHostToDevice(gpu_data_vec, vec.data(), tensorBuffSize);\n  gpu_result.device(sycl_device)=gpu_vec.generate(Generator1D());\n  sycl_device.memcpyDeviceToHost(result.data(), gpu_data_result, tensorBuffSize);\n\n  for (IndexType i = 0; i < 6; ++i) {\n    VERIFY_IS_EQUAL(result(i), i);\n  }\n}\n\n\nstruct Generator2D {\n  Generator2D() { }\n\n  float operator()(const array<Eigen::DenseIndex, 2>& coordinates) const {\n    return 3 * coordinates[0] + 11 * coordinates[1];\n  }\n};\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_2D_sycl(const Eigen::SyclDevice& sycl_device)\n{\n  IndexType sizeDim1 = 5;\n  IndexType sizeDim2 = 7;\n  array<IndexType, 2> tensorRange = {{sizeDim1, sizeDim2}};\n  Tensor<DataType, 2, DataLayout,IndexType> matrix(tensorRange);\n  Tensor<DataType, 2, DataLayout,IndexType> result(tensorRange);\n\n  const size_t tensorBuffSize =matrix.size()*sizeof(DataType);\n  DataType* gpu_data_matrix  = static_cast<DataType*>(sycl_device.allocate(tensorBuffSize));\n  DataType* gpu_data_result  = static_cast<DataType*>(sycl_device.allocate(tensorBuffSize));\n\n  TensorMap<Tensor<DataType, 2, DataLayout,IndexType>> gpu_matrix(gpu_data_matrix, tensorRange);\n  TensorMap<Tensor<DataType, 2, DataLayout,IndexType>> gpu_result(gpu_data_result, tensorRange);\n\n  sycl_device.memcpyHostToDevice(gpu_data_matrix, matrix.data(), tensorBuffSize);\n  gpu_result.device(sycl_device)=gpu_matrix.generate(Generator2D());\n  sycl_device.memcpyDeviceToHost(result.data(), gpu_data_result, tensorBuffSize);\n\n  for (IndexType i = 0; i < 5; ++i) {\n    for (IndexType j = 0; j < 5; ++j) {\n      VERIFY_IS_EQUAL(result(i, j), 3*i + 11*j);\n    }\n  }\n}\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_gaussian_sycl(const Eigen::SyclDevice& sycl_device)\n{\n  IndexType rows = 32;\n  IndexType cols = 48;\n  array<DataType, 2> means;\n  means[0] = rows / 2.0f;\n  means[1] = cols / 2.0f;\n  array<DataType, 2> std_devs;\n  std_devs[0] = 3.14f;\n  std_devs[1] = 2.7f;\n  internal::GaussianGenerator<DataType, Eigen::DenseIndex, 2> gaussian_gen(means, std_devs);\n\n  array<IndexType, 2> tensorRange = {{rows, cols}};\n  Tensor<DataType, 2, DataLayout,IndexType> matrix(tensorRange);\n  Tensor<DataType, 2, DataLayout,IndexType> result(tensorRange);\n\n  const size_t tensorBuffSize =matrix.size()*sizeof(DataType);\n  DataType* gpu_data_matrix  = static_cast<DataType*>(sycl_device.allocate(tensorBuffSize));\n  DataType* gpu_data_result  = static_cast<DataType*>(sycl_device.allocate(tensorBuffSize));\n\n  TensorMap<Tensor<DataType, 2, DataLayout,IndexType>> gpu_matrix(gpu_data_matrix, tensorRange);\n  TensorMap<Tensor<DataType, 2, DataLayout,IndexType>> gpu_result(gpu_data_result, tensorRange);\n\n  sycl_device.memcpyHostToDevice(gpu_data_matrix, matrix.data(), tensorBuffSize);\n  gpu_result.device(sycl_device)=gpu_matrix.generate(gaussian_gen);\n  sycl_device.memcpyDeviceToHost(result.data(), gpu_data_result, tensorBuffSize);\n\n  for (IndexType i = 0; i < rows; ++i) {\n    for (IndexType j = 0; j < cols; ++j) {\n      DataType g_rows = powf(rows/2.0f - i, 2) / (3.14f * 3.14f) * 0.5f;\n      DataType g_cols = powf(cols/2.0f - j, 2) / (2.7f * 2.7f) * 0.5f;\n      DataType gaussian = expf(-g_rows - g_cols);\n      Eigen::internal::isApprox(result(i, j), gaussian, error_threshold);\n    }\n  }\n}\n\ntemplate<typename DataType, typename dev_Selector> void sycl_generator_test_per_device(dev_Selector s){\n  QueueInterface queueInterface(s);\n  auto sycl_device = Eigen::SyclDevice(&queueInterface);\n  test_1D_sycl<DataType, RowMajor, int64_t>(sycl_device);\n  test_1D_sycl<DataType, ColMajor, int64_t>(sycl_device);\n  test_2D_sycl<DataType, RowMajor, int64_t>(sycl_device);\n  test_2D_sycl<DataType, ColMajor, int64_t>(sycl_device);\n  test_gaussian_sycl<DataType, RowMajor, int64_t>(sycl_device);\n  test_gaussian_sycl<DataType, ColMajor, int64_t>(sycl_device);\n}\nEIGEN_DECLARE_TEST(cxx11_tensor_generator_sycl)\n{\n  for (const auto& device :Eigen::get_sycl_supported_devices()) {\n    CALL_SUBTEST(sycl_generator_test_per_device<float>(device));\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_gpu.cu",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_TEST_NO_LONGDOUBLE\n#define EIGEN_TEST_NO_COMPLEX\n\n#define EIGEN_USE_GPU\n\n#include \"main.h\"\n#include <unsupported/Eigen/CXX11/Tensor>\n\n#include <unsupported/Eigen/CXX11/src/Tensor/TensorGpuHipCudaDefines.h>\n\n#define EIGEN_GPU_TEST_C99_MATH  EIGEN_HAS_CXX11\n\nusing Eigen::Tensor;\n\nvoid test_gpu_nullary() {\n  Tensor<float, 1, 0, int> in1(2);\n  Tensor<float, 1, 0, int> in2(2);\n  in1.setRandom();\n  in2.setRandom();\n\n  std::size_t tensor_bytes = in1.size() * sizeof(float);\n\n  float* d_in1;\n  float* d_in2;\n  gpuMalloc((void**)(&d_in1), tensor_bytes);\n  gpuMalloc((void**)(&d_in2), tensor_bytes);\n  gpuMemcpy(d_in1, in1.data(), tensor_bytes, gpuMemcpyHostToDevice);\n  gpuMemcpy(d_in2, in2.data(), tensor_bytes, gpuMemcpyHostToDevice);\n\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n\n  Eigen::TensorMap<Eigen::Tensor<float, 1, 0, int>, Eigen::Aligned> gpu_in1(\n      d_in1, 2);\n  Eigen::TensorMap<Eigen::Tensor<float, 1, 0, int>, Eigen::Aligned> gpu_in2(\n      d_in2, 2);\n\n  gpu_in1.device(gpu_device) = gpu_in1.constant(3.14f);\n  gpu_in2.device(gpu_device) = gpu_in2.random();\n\n  Tensor<float, 1, 0, int> new1(2);\n  Tensor<float, 1, 0, int> new2(2);\n\n  assert(gpuMemcpyAsync(new1.data(), d_in1, tensor_bytes, gpuMemcpyDeviceToHost,\n                         gpu_device.stream()) == gpuSuccess);\n  assert(gpuMemcpyAsync(new2.data(), d_in2, tensor_bytes, gpuMemcpyDeviceToHost,\n                         gpu_device.stream()) == gpuSuccess);\n\n  assert(gpuStreamSynchronize(gpu_device.stream()) == gpuSuccess);\n\n  for (int i = 0; i < 2; ++i) {\n    VERIFY_IS_APPROX(new1(i), 3.14f);\n    VERIFY_IS_NOT_EQUAL(new2(i), in2(i));\n  }\n\n  gpuFree(d_in1);\n  gpuFree(d_in2);\n}\n\nvoid test_gpu_elementwise_small() {\n  Tensor<float, 1> in1(Eigen::array<Eigen::DenseIndex, 1>(2));\n  Tensor<float, 1> in2(Eigen::array<Eigen::DenseIndex, 1>(2));\n  Tensor<float, 1> out(Eigen::array<Eigen::DenseIndex, 1>(2));\n  in1.setRandom();\n  in2.setRandom();\n\n  std::size_t in1_bytes = in1.size() * sizeof(float);\n  std::size_t in2_bytes = in2.size() * sizeof(float);\n  std::size_t out_bytes = out.size() * sizeof(float);\n\n  float* d_in1;\n  float* d_in2;\n  float* d_out;\n  gpuMalloc((void**)(&d_in1), in1_bytes);\n  gpuMalloc((void**)(&d_in2), in2_bytes);\n  gpuMalloc((void**)(&d_out), out_bytes);\n\n  gpuMemcpy(d_in1, in1.data(), in1_bytes, gpuMemcpyHostToDevice);\n  gpuMemcpy(d_in2, in2.data(), in2_bytes, gpuMemcpyHostToDevice);\n\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n\n  Eigen::TensorMap<Eigen::Tensor<float, 1>, Eigen::Aligned> gpu_in1(\n      d_in1, Eigen::array<Eigen::DenseIndex, 1>(2));\n  Eigen::TensorMap<Eigen::Tensor<float, 1>, Eigen::Aligned> gpu_in2(\n      d_in2, Eigen::array<Eigen::DenseIndex, 1>(2));\n  Eigen::TensorMap<Eigen::Tensor<float, 1>, Eigen::Aligned> gpu_out(\n      d_out, Eigen::array<Eigen::DenseIndex, 1>(2));\n\n  gpu_out.device(gpu_device) = gpu_in1 + gpu_in2;\n\n  assert(gpuMemcpyAsync(out.data(), d_out, out_bytes, gpuMemcpyDeviceToHost,\n                         gpu_device.stream()) == gpuSuccess);\n  assert(gpuStreamSynchronize(gpu_device.stream()) == gpuSuccess);\n\n  for (int i = 0; i < 2; ++i) {\n    VERIFY_IS_APPROX(\n        out(Eigen::array<Eigen::DenseIndex, 1>(i)),\n        in1(Eigen::array<Eigen::DenseIndex, 1>(i)) + in2(Eigen::array<Eigen::DenseIndex, 1>(i)));\n  }\n\n  gpuFree(d_in1);\n  gpuFree(d_in2);\n  gpuFree(d_out);\n}\n\nvoid test_gpu_elementwise()\n{\n  Tensor<float, 3> in1(Eigen::array<Eigen::DenseIndex, 3>(72,53,97));\n  Tensor<float, 3> in2(Eigen::array<Eigen::DenseIndex, 3>(72,53,97));\n  Tensor<float, 3> in3(Eigen::array<Eigen::DenseIndex, 3>(72,53,97));\n  Tensor<float, 3> out(Eigen::array<Eigen::DenseIndex, 3>(72,53,97));\n  in1.setRandom();\n  in2.setRandom();\n  in3.setRandom();\n\n  std::size_t in1_bytes = in1.size() * sizeof(float);\n  std::size_t in2_bytes = in2.size() * sizeof(float);\n  std::size_t in3_bytes = in3.size() * sizeof(float);\n  std::size_t out_bytes = out.size() * sizeof(float);\n\n  float* d_in1;\n  float* d_in2;\n  float* d_in3;\n  float* d_out;\n  gpuMalloc((void**)(&d_in1), in1_bytes);\n  gpuMalloc((void**)(&d_in2), in2_bytes);\n  gpuMalloc((void**)(&d_in3), in3_bytes);\n  gpuMalloc((void**)(&d_out), out_bytes);\n\n  gpuMemcpy(d_in1, in1.data(), in1_bytes, gpuMemcpyHostToDevice);\n  gpuMemcpy(d_in2, in2.data(), in2_bytes, gpuMemcpyHostToDevice);\n  gpuMemcpy(d_in3, in3.data(), in3_bytes, gpuMemcpyHostToDevice);\n\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n\n  Eigen::TensorMap<Eigen::Tensor<float, 3> > gpu_in1(d_in1, Eigen::array<Eigen::DenseIndex, 3>(72,53,97));\n  Eigen::TensorMap<Eigen::Tensor<float, 3> > gpu_in2(d_in2, Eigen::array<Eigen::DenseIndex, 3>(72,53,97));\n  Eigen::TensorMap<Eigen::Tensor<float, 3> > gpu_in3(d_in3, Eigen::array<Eigen::DenseIndex, 3>(72,53,97));\n  Eigen::TensorMap<Eigen::Tensor<float, 3> > gpu_out(d_out, Eigen::array<Eigen::DenseIndex, 3>(72,53,97));\n\n  gpu_out.device(gpu_device) = gpu_in1 + gpu_in2 * gpu_in3;\n\n  assert(gpuMemcpyAsync(out.data(), d_out, out_bytes, gpuMemcpyDeviceToHost, gpu_device.stream()) == gpuSuccess);\n  assert(gpuStreamSynchronize(gpu_device.stream()) == gpuSuccess);\n\n  for (int i = 0; i < 72; ++i) {\n    for (int j = 0; j < 53; ++j) {\n      for (int k = 0; k < 97; ++k) {\n        VERIFY_IS_APPROX(out(Eigen::array<Eigen::DenseIndex, 3>(i,j,k)), in1(Eigen::array<Eigen::DenseIndex, 3>(i,j,k)) + in2(Eigen::array<Eigen::DenseIndex, 3>(i,j,k)) * in3(Eigen::array<Eigen::DenseIndex, 3>(i,j,k)));\n      }\n    }\n  }\n\n  gpuFree(d_in1);\n  gpuFree(d_in2);\n  gpuFree(d_in3);\n  gpuFree(d_out);\n}\n\nvoid test_gpu_props() {\n  Tensor<float, 1> in1(200);\n  Tensor<bool, 1> out(200);\n  in1.setRandom();\n\n  std::size_t in1_bytes = in1.size() * sizeof(float);\n  std::size_t out_bytes = out.size() * sizeof(bool);\n\n  float* d_in1;\n  bool* d_out;\n  gpuMalloc((void**)(&d_in1), in1_bytes);\n  gpuMalloc((void**)(&d_out), out_bytes);\n\n  gpuMemcpy(d_in1, in1.data(), in1_bytes, gpuMemcpyHostToDevice);\n\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n\n  Eigen::TensorMap<Eigen::Tensor<float, 1>, Eigen::Aligned> gpu_in1(\n      d_in1, 200);\n  Eigen::TensorMap<Eigen::Tensor<bool, 1>, Eigen::Aligned> gpu_out(\n      d_out, 200);\n\n  gpu_out.device(gpu_device) = (gpu_in1.isnan)();\n\n  assert(gpuMemcpyAsync(out.data(), d_out, out_bytes, gpuMemcpyDeviceToHost,\n                         gpu_device.stream()) == gpuSuccess);\n  assert(gpuStreamSynchronize(gpu_device.stream()) == gpuSuccess);\n\n  for (int i = 0; i < 200; ++i) {\n    VERIFY_IS_EQUAL(out(i), (std::isnan)(in1(i)));\n  }\n\n  gpuFree(d_in1);\n  gpuFree(d_out);\n}\n\nvoid test_gpu_reduction()\n{\n  Tensor<float, 4> in1(72,53,97,113);\n  Tensor<float, 2> out(72,97);\n  in1.setRandom();\n\n  std::size_t in1_bytes = in1.size() * sizeof(float);\n  std::size_t out_bytes = out.size() * sizeof(float);\n\n  float* d_in1;\n  float* d_out;\n  gpuMalloc((void**)(&d_in1), in1_bytes);\n  gpuMalloc((void**)(&d_out), out_bytes);\n\n  gpuMemcpy(d_in1, in1.data(), in1_bytes, gpuMemcpyHostToDevice);\n\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n\n  Eigen::TensorMap<Eigen::Tensor<float, 4> > gpu_in1(d_in1, 72,53,97,113);\n  Eigen::TensorMap<Eigen::Tensor<float, 2> > gpu_out(d_out, 72,97);\n\n  array<Eigen::DenseIndex, 2> reduction_axis;\n  reduction_axis[0] = 1;\n  reduction_axis[1] = 3;\n\n  gpu_out.device(gpu_device) = gpu_in1.maximum(reduction_axis);\n\n  assert(gpuMemcpyAsync(out.data(), d_out, out_bytes, gpuMemcpyDeviceToHost, gpu_device.stream()) == gpuSuccess);\n  assert(gpuStreamSynchronize(gpu_device.stream()) == gpuSuccess);\n\n  for (int i = 0; i < 72; ++i) {\n    for (int j = 0; j < 97; ++j) {\n      float expected = 0;\n      for (int k = 0; k < 53; ++k) {\n        for (int l = 0; l < 113; ++l) {\n          expected =\n              std::max<float>(expected, in1(i, k, j, l));\n        }\n      }\n      VERIFY_IS_APPROX(out(i,j), expected);\n    }\n  }\n\n  gpuFree(d_in1);\n  gpuFree(d_out);\n}\n\ntemplate<int DataLayout>\nvoid test_gpu_contraction()\n{\n  // with these dimensions, the output has 300 * 140 elements, which is\n  // more than 30 * 1024, which is the number of threads in blocks on\n  // a 15 SM GK110 GPU\n  Tensor<float, 4, DataLayout> t_left(6, 50, 3, 31);\n  Tensor<float, 5, DataLayout> t_right(Eigen::array<Eigen::DenseIndex, 5>(3, 31, 7, 20, 1));\n  Tensor<float, 5, DataLayout> t_result(Eigen::array<Eigen::DenseIndex, 5>(6, 50, 7, 20, 1));\n\n  t_left.setRandom();\n  t_right.setRandom();\n\n  std::size_t t_left_bytes = t_left.size()  * sizeof(float);\n  std::size_t t_right_bytes = t_right.size() * sizeof(float);\n  std::size_t t_result_bytes = t_result.size() * sizeof(float);\n\n  float* d_t_left;\n  float* d_t_right;\n  float* d_t_result;\n\n  gpuMalloc((void**)(&d_t_left), t_left_bytes);\n  gpuMalloc((void**)(&d_t_right), t_right_bytes);\n  gpuMalloc((void**)(&d_t_result), t_result_bytes);\n\n  gpuMemcpy(d_t_left, t_left.data(), t_left_bytes, gpuMemcpyHostToDevice);\n  gpuMemcpy(d_t_right, t_right.data(), t_right_bytes, gpuMemcpyHostToDevice);\n\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n\n  Eigen::TensorMap<Eigen::Tensor<float, 4, DataLayout> > gpu_t_left(d_t_left, 6, 50, 3, 31);\n  Eigen::TensorMap<Eigen::Tensor<float, 5, DataLayout> > gpu_t_right(d_t_right, 3, 31, 7, 20, 1);\n  Eigen::TensorMap<Eigen::Tensor<float, 5, DataLayout> > gpu_t_result(d_t_result, 6, 50, 7, 20, 1);\n\n  typedef Eigen::Map<Eigen::Matrix<float, Dynamic, Dynamic, DataLayout> > MapXf;\n  MapXf m_left(t_left.data(), 300, 93);\n  MapXf m_right(t_right.data(), 93, 140);\n  Eigen::Matrix<float, Dynamic, Dynamic, DataLayout> m_result(300, 140);\n\n  typedef Tensor<float, 1>::DimensionPair DimPair;\n  Eigen::array<DimPair, 2> dims;\n  dims[0] = DimPair(2, 0);\n  dims[1] = DimPair(3, 1);\n\n  m_result = m_left * m_right;\n  gpu_t_result.device(gpu_device) = gpu_t_left.contract(gpu_t_right, dims);\n\n  gpuMemcpy(t_result.data(), d_t_result, t_result_bytes, gpuMemcpyDeviceToHost);\n\n  for (DenseIndex i = 0; i < t_result.size(); i++) {\n    if (fabs(t_result.data()[i] - m_result.data()[i]) >= 1e-4f) {\n      std::cout << \"mismatch detected at index \" << i << \": \" << t_result.data()[i] << \" vs \" <<  m_result.data()[i] << std::endl;\n      assert(false);\n    }\n  }\n\n  gpuFree(d_t_left);\n  gpuFree(d_t_right);\n  gpuFree(d_t_result);\n}\n\ntemplate<int DataLayout>\nvoid test_gpu_convolution_1d()\n{\n  Tensor<float, 4, DataLayout> input(74,37,11,137);\n  Tensor<float, 1, DataLayout> kernel(4);\n  Tensor<float, 4, DataLayout> out(74,34,11,137);\n  input = input.constant(10.0f) + input.random();\n  kernel = kernel.constant(7.0f) + kernel.random();\n\n  std::size_t input_bytes = input.size() * sizeof(float);\n  std::size_t kernel_bytes = kernel.size() * sizeof(float);\n  std::size_t out_bytes = out.size() * sizeof(float);\n\n  float* d_input;\n  float* d_kernel;\n  float* d_out;\n  gpuMalloc((void**)(&d_input), input_bytes);\n  gpuMalloc((void**)(&d_kernel), kernel_bytes);\n  gpuMalloc((void**)(&d_out), out_bytes);\n\n  gpuMemcpy(d_input, input.data(), input_bytes, gpuMemcpyHostToDevice);\n  gpuMemcpy(d_kernel, kernel.data(), kernel_bytes, gpuMemcpyHostToDevice);\n\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n\n  Eigen::TensorMap<Eigen::Tensor<float, 4, DataLayout> > gpu_input(d_input, 74,37,11,137);\n  Eigen::TensorMap<Eigen::Tensor<float, 1, DataLayout> > gpu_kernel(d_kernel, 4);\n  Eigen::TensorMap<Eigen::Tensor<float, 4, DataLayout> > gpu_out(d_out, 74,34,11,137);\n\n  Eigen::array<Eigen::DenseIndex, 1> dims(1);\n  gpu_out.device(gpu_device) = gpu_input.convolve(gpu_kernel, dims);\n\n  assert(gpuMemcpyAsync(out.data(), d_out, out_bytes, gpuMemcpyDeviceToHost, gpu_device.stream()) == gpuSuccess);\n  assert(gpuStreamSynchronize(gpu_device.stream()) == gpuSuccess);\n\n  for (int i = 0; i < 74; ++i) {\n    for (int j = 0; j < 34; ++j) {\n      for (int k = 0; k < 11; ++k) {\n        for (int l = 0; l < 137; ++l) {\n          const float result = out(i,j,k,l);\n          const float expected = input(i,j+0,k,l) * kernel(0) + input(i,j+1,k,l) * kernel(1) +\n                                 input(i,j+2,k,l) * kernel(2) + input(i,j+3,k,l) * kernel(3);\n          VERIFY_IS_APPROX(result, expected);\n        }\n      }\n    }\n  }\n\n  gpuFree(d_input);\n  gpuFree(d_kernel);\n  gpuFree(d_out);\n}\n\nvoid test_gpu_convolution_inner_dim_col_major_1d()\n{\n  Tensor<float, 4, ColMajor> input(74,9,11,7);\n  Tensor<float, 1, ColMajor> kernel(4);\n  Tensor<float, 4, ColMajor> out(71,9,11,7);\n  input = input.constant(10.0f) + input.random();\n  kernel = kernel.constant(7.0f) + kernel.random();\n\n  std::size_t input_bytes = input.size() * sizeof(float);\n  std::size_t kernel_bytes = kernel.size() * sizeof(float);\n  std::size_t out_bytes = out.size() * sizeof(float);\n\n  float* d_input;\n  float* d_kernel;\n  float* d_out;\n  gpuMalloc((void**)(&d_input), input_bytes);\n  gpuMalloc((void**)(&d_kernel), kernel_bytes);\n  gpuMalloc((void**)(&d_out), out_bytes);\n\n  gpuMemcpy(d_input, input.data(), input_bytes, gpuMemcpyHostToDevice);\n  gpuMemcpy(d_kernel, kernel.data(), kernel_bytes, gpuMemcpyHostToDevice);\n\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n\n  Eigen::TensorMap<Eigen::Tensor<float, 4, ColMajor> > gpu_input(d_input,74,9,11,7);\n  Eigen::TensorMap<Eigen::Tensor<float, 1, ColMajor> > gpu_kernel(d_kernel,4);\n  Eigen::TensorMap<Eigen::Tensor<float, 4, ColMajor> > gpu_out(d_out,71,9,11,7);\n\n  Eigen::array<Eigen::DenseIndex, 1> dims(0);\n  gpu_out.device(gpu_device) = gpu_input.convolve(gpu_kernel, dims);\n\n  assert(gpuMemcpyAsync(out.data(), d_out, out_bytes, gpuMemcpyDeviceToHost, gpu_device.stream()) == gpuSuccess);\n  assert(gpuStreamSynchronize(gpu_device.stream()) == gpuSuccess);\n\n  for (int i = 0; i < 71; ++i) {\n    for (int j = 0; j < 9; ++j) {\n      for (int k = 0; k < 11; ++k) {\n        for (int l = 0; l < 7; ++l) {\n          const float result = out(i,j,k,l);\n          const float expected = input(i+0,j,k,l) * kernel(0) + input(i+1,j,k,l) * kernel(1) +\n                                 input(i+2,j,k,l) * kernel(2) + input(i+3,j,k,l) * kernel(3);\n          VERIFY_IS_APPROX(result, expected);\n        }\n      }\n    }\n  }\n\n  gpuFree(d_input);\n  gpuFree(d_kernel);\n  gpuFree(d_out);\n}\n\nvoid test_gpu_convolution_inner_dim_row_major_1d()\n{\n  Tensor<float, 4, RowMajor> input(7,9,11,74);\n  Tensor<float, 1, RowMajor> kernel(4);\n  Tensor<float, 4, RowMajor> out(7,9,11,71);\n  input = input.constant(10.0f) + input.random();\n  kernel = kernel.constant(7.0f) + kernel.random();\n\n  std::size_t input_bytes = input.size() * sizeof(float);\n  std::size_t kernel_bytes = kernel.size() * sizeof(float);\n  std::size_t out_bytes = out.size() * sizeof(float);\n\n  float* d_input;\n  float* d_kernel;\n  float* d_out;\n  gpuMalloc((void**)(&d_input), input_bytes);\n  gpuMalloc((void**)(&d_kernel), kernel_bytes);\n  gpuMalloc((void**)(&d_out), out_bytes);\n\n  gpuMemcpy(d_input, input.data(), input_bytes, gpuMemcpyHostToDevice);\n  gpuMemcpy(d_kernel, kernel.data(), kernel_bytes, gpuMemcpyHostToDevice);\n\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n\n  Eigen::TensorMap<Eigen::Tensor<float, 4, RowMajor> > gpu_input(d_input, 7,9,11,74);\n  Eigen::TensorMap<Eigen::Tensor<float, 1, RowMajor> > gpu_kernel(d_kernel, 4);\n  Eigen::TensorMap<Eigen::Tensor<float, 4, RowMajor> > gpu_out(d_out, 7,9,11,71);\n\n  Eigen::array<Eigen::DenseIndex, 1> dims(3);\n  gpu_out.device(gpu_device) = gpu_input.convolve(gpu_kernel, dims);\n\n  assert(gpuMemcpyAsync(out.data(), d_out, out_bytes, gpuMemcpyDeviceToHost, gpu_device.stream()) == gpuSuccess);\n  assert(gpuStreamSynchronize(gpu_device.stream()) == gpuSuccess);\n\n  for (int i = 0; i < 7; ++i) {\n    for (int j = 0; j < 9; ++j) {\n      for (int k = 0; k < 11; ++k) {\n        for (int l = 0; l < 71; ++l) {\n          const float result = out(i,j,k,l);\n          const float expected = input(i,j,k,l+0) * kernel(0) + input(i,j,k,l+1) * kernel(1) +\n                                 input(i,j,k,l+2) * kernel(2) + input(i,j,k,l+3) * kernel(3);\n          VERIFY_IS_APPROX(result, expected);\n        }\n      }\n    }\n  }\n\n  gpuFree(d_input);\n  gpuFree(d_kernel);\n  gpuFree(d_out);\n}\n\ntemplate<int DataLayout>\nvoid test_gpu_convolution_2d()\n{\n  Tensor<float, 4, DataLayout> input(74,37,11,137);\n  Tensor<float, 2, DataLayout> kernel(3,4);\n  Tensor<float, 4, DataLayout> out(74,35,8,137);\n  input = input.constant(10.0f) + input.random();\n  kernel = kernel.constant(7.0f) + kernel.random();\n\n  std::size_t input_bytes = input.size() * sizeof(float);\n  std::size_t kernel_bytes = kernel.size() * sizeof(float);\n  std::size_t out_bytes = out.size() * sizeof(float);\n\n  float* d_input;\n  float* d_kernel;\n  float* d_out;\n  gpuMalloc((void**)(&d_input), input_bytes);\n  gpuMalloc((void**)(&d_kernel), kernel_bytes);\n  gpuMalloc((void**)(&d_out), out_bytes);\n\n  gpuMemcpy(d_input, input.data(), input_bytes, gpuMemcpyHostToDevice);\n  gpuMemcpy(d_kernel, kernel.data(), kernel_bytes, gpuMemcpyHostToDevice);\n\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n\n  Eigen::TensorMap<Eigen::Tensor<float, 4, DataLayout> > gpu_input(d_input,74,37,11,137);\n  Eigen::TensorMap<Eigen::Tensor<float, 2, DataLayout> > gpu_kernel(d_kernel,3,4);\n  Eigen::TensorMap<Eigen::Tensor<float, 4, DataLayout> > gpu_out(d_out,74,35,8,137);\n\n  Eigen::array<Eigen::DenseIndex, 2> dims(1,2);\n  gpu_out.device(gpu_device) = gpu_input.convolve(gpu_kernel, dims);\n\n  assert(gpuMemcpyAsync(out.data(), d_out, out_bytes, gpuMemcpyDeviceToHost, gpu_device.stream()) == gpuSuccess);\n  assert(gpuStreamSynchronize(gpu_device.stream()) == gpuSuccess);\n\n  for (int i = 0; i < 74; ++i) {\n    for (int j = 0; j < 35; ++j) {\n      for (int k = 0; k < 8; ++k) {\n        for (int l = 0; l < 137; ++l) {\n          const float result = out(i,j,k,l);\n          const float expected = input(i,j+0,k+0,l) * kernel(0,0) +\n                                 input(i,j+1,k+0,l) * kernel(1,0) +\n                                 input(i,j+2,k+0,l) * kernel(2,0) +\n                                 input(i,j+0,k+1,l) * kernel(0,1) +\n                                 input(i,j+1,k+1,l) * kernel(1,1) +\n                                 input(i,j+2,k+1,l) * kernel(2,1) +\n                                 input(i,j+0,k+2,l) * kernel(0,2) +\n                                 input(i,j+1,k+2,l) * kernel(1,2) +\n                                 input(i,j+2,k+2,l) * kernel(2,2) +\n                                 input(i,j+0,k+3,l) * kernel(0,3) +\n                                 input(i,j+1,k+3,l) * kernel(1,3) +\n                                 input(i,j+2,k+3,l) * kernel(2,3);\n          VERIFY_IS_APPROX(result, expected);\n        }\n      }\n    }\n  }\n\n  gpuFree(d_input);\n  gpuFree(d_kernel);\n  gpuFree(d_out);\n}\n\ntemplate<int DataLayout>\nvoid test_gpu_convolution_3d()\n{\n  Tensor<float, 5, DataLayout> input(Eigen::array<Eigen::DenseIndex, 5>(74,37,11,137,17));\n  Tensor<float, 3, DataLayout> kernel(3,4,2);\n  Tensor<float, 5, DataLayout> out(Eigen::array<Eigen::DenseIndex, 5>(74,35,8,136,17));\n  input = input.constant(10.0f) + input.random();\n  kernel = kernel.constant(7.0f) + kernel.random();\n\n  std::size_t input_bytes = input.size() * sizeof(float);\n  std::size_t kernel_bytes = kernel.size() * sizeof(float);\n  std::size_t out_bytes = out.size() * sizeof(float);\n\n  float* d_input;\n  float* d_kernel;\n  float* d_out;\n  gpuMalloc((void**)(&d_input), input_bytes);\n  gpuMalloc((void**)(&d_kernel), kernel_bytes);\n  gpuMalloc((void**)(&d_out), out_bytes);\n\n  gpuMemcpy(d_input, input.data(), input_bytes, gpuMemcpyHostToDevice);\n  gpuMemcpy(d_kernel, kernel.data(), kernel_bytes, gpuMemcpyHostToDevice);\n\n  Eigen::GpuStreamDevice stream;    \n  Eigen::GpuDevice gpu_device(&stream);\n\n  Eigen::TensorMap<Eigen::Tensor<float, 5, DataLayout> > gpu_input(d_input,74,37,11,137,17);\n  Eigen::TensorMap<Eigen::Tensor<float, 3, DataLayout> > gpu_kernel(d_kernel,3,4,2);\n  Eigen::TensorMap<Eigen::Tensor<float, 5, DataLayout> > gpu_out(d_out,74,35,8,136,17);\n\n  Eigen::array<Eigen::DenseIndex, 3> dims(1,2,3);\n  gpu_out.device(gpu_device) = gpu_input.convolve(gpu_kernel, dims);\n\n  assert(gpuMemcpyAsync(out.data(), d_out, out_bytes, gpuMemcpyDeviceToHost, gpu_device.stream()) == gpuSuccess);\n  assert(gpuStreamSynchronize(gpu_device.stream()) == gpuSuccess);\n\n  for (int i = 0; i < 74; ++i) {\n    for (int j = 0; j < 35; ++j) {\n      for (int k = 0; k < 8; ++k) {\n        for (int l = 0; l < 136; ++l) {\n          for (int m = 0; m < 17; ++m) {\n            const float result = out(i,j,k,l,m);\n            const float expected = input(i,j+0,k+0,l+0,m) * kernel(0,0,0) +\n                                   input(i,j+1,k+0,l+0,m) * kernel(1,0,0) +\n                                   input(i,j+2,k+0,l+0,m) * kernel(2,0,0) +\n                                   input(i,j+0,k+1,l+0,m) * kernel(0,1,0) +\n                                   input(i,j+1,k+1,l+0,m) * kernel(1,1,0) +\n                                   input(i,j+2,k+1,l+0,m) * kernel(2,1,0) +\n                                   input(i,j+0,k+2,l+0,m) * kernel(0,2,0) +\n                                   input(i,j+1,k+2,l+0,m) * kernel(1,2,0) +\n                                   input(i,j+2,k+2,l+0,m) * kernel(2,2,0) +\n                                   input(i,j+0,k+3,l+0,m) * kernel(0,3,0) +\n                                   input(i,j+1,k+3,l+0,m) * kernel(1,3,0) +\n                                   input(i,j+2,k+3,l+0,m) * kernel(2,3,0) +\n                                   input(i,j+0,k+0,l+1,m) * kernel(0,0,1) +\n                                   input(i,j+1,k+0,l+1,m) * kernel(1,0,1) +\n                                   input(i,j+2,k+0,l+1,m) * kernel(2,0,1) +\n                                   input(i,j+0,k+1,l+1,m) * kernel(0,1,1) +\n                                   input(i,j+1,k+1,l+1,m) * kernel(1,1,1) +\n                                   input(i,j+2,k+1,l+1,m) * kernel(2,1,1) +\n                                   input(i,j+0,k+2,l+1,m) * kernel(0,2,1) +\n                                   input(i,j+1,k+2,l+1,m) * kernel(1,2,1) +\n                                   input(i,j+2,k+2,l+1,m) * kernel(2,2,1) +\n                                   input(i,j+0,k+3,l+1,m) * kernel(0,3,1) +\n                                   input(i,j+1,k+3,l+1,m) * kernel(1,3,1) +\n                                   input(i,j+2,k+3,l+1,m) * kernel(2,3,1);\n            VERIFY_IS_APPROX(result, expected);\n          }\n        }\n      }\n    }\n  }\n\n  gpuFree(d_input);\n  gpuFree(d_kernel);\n  gpuFree(d_out);\n}\n\n\n#if EIGEN_GPU_TEST_C99_MATH\ntemplate <typename Scalar>\nvoid test_gpu_lgamma(const Scalar stddev)\n{\n  Tensor<Scalar, 2> in(72,97);\n  in.setRandom();\n  in *= in.constant(stddev);\n  Tensor<Scalar, 2> out(72,97);\n  out.setZero();\n\n  std::size_t bytes = in.size() * sizeof(Scalar);\n\n  Scalar* d_in;\n  Scalar* d_out;\n  gpuMalloc((void**)(&d_in), bytes);\n  gpuMalloc((void**)(&d_out), bytes);\n\n  gpuMemcpy(d_in, in.data(), bytes, gpuMemcpyHostToDevice);\n\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n\n  Eigen::TensorMap<Eigen::Tensor<Scalar, 2> > gpu_in(d_in, 72, 97);\n  Eigen::TensorMap<Eigen::Tensor<Scalar, 2> > gpu_out(d_out, 72, 97);\n\n  gpu_out.device(gpu_device) = gpu_in.lgamma();\n\n  assert(gpuMemcpyAsync(out.data(), d_out, bytes, gpuMemcpyDeviceToHost, gpu_device.stream()) == gpuSuccess);\n  assert(gpuStreamSynchronize(gpu_device.stream()) == gpuSuccess);\n\n  for (int i = 0; i < 72; ++i) {\n    for (int j = 0; j < 97; ++j) {\n      VERIFY_IS_APPROX(out(i,j), (std::lgamma)(in(i,j)));\n    }\n  }\n\n  gpuFree(d_in);\n  gpuFree(d_out);\n}\n#endif\n\ntemplate <typename Scalar>\nvoid test_gpu_digamma()\n{\n  Tensor<Scalar, 1> in(7);\n  Tensor<Scalar, 1> out(7);\n  Tensor<Scalar, 1> expected_out(7);\n  out.setZero();\n\n  in(0) = Scalar(1);\n  in(1) = Scalar(1.5);\n  in(2) = Scalar(4);\n  in(3) = Scalar(-10.5);\n  in(4) = Scalar(10000.5);\n  in(5) = Scalar(0);\n  in(6) = Scalar(-1);\n\n  expected_out(0) = Scalar(-0.5772156649015329);\n  expected_out(1) = Scalar(0.03648997397857645);\n  expected_out(2) = Scalar(1.2561176684318);\n  expected_out(3) = Scalar(2.398239129535781);\n  expected_out(4) = Scalar(9.210340372392849);\n  expected_out(5) = std::numeric_limits<Scalar>::infinity();\n  expected_out(6) = std::numeric_limits<Scalar>::infinity();\n\n  std::size_t bytes = in.size() * sizeof(Scalar);\n\n  Scalar* d_in;\n  Scalar* d_out;\n  gpuMalloc((void**)(&d_in), bytes);\n  gpuMalloc((void**)(&d_out), bytes);\n\n  gpuMemcpy(d_in, in.data(), bytes, gpuMemcpyHostToDevice);\n\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n\n  Eigen::TensorMap<Eigen::Tensor<Scalar, 1> > gpu_in(d_in, 7);\n  Eigen::TensorMap<Eigen::Tensor<Scalar, 1> > gpu_out(d_out, 7);\n\n  gpu_out.device(gpu_device) = gpu_in.digamma();\n\n  assert(gpuMemcpyAsync(out.data(), d_out, bytes, gpuMemcpyDeviceToHost, gpu_device.stream()) == gpuSuccess);\n  assert(gpuStreamSynchronize(gpu_device.stream()) == gpuSuccess);\n\n  for (int i = 0; i < 5; ++i) {\n    VERIFY_IS_APPROX(out(i), expected_out(i));\n  }\n  for (int i = 5; i < 7; ++i) {\n    VERIFY_IS_EQUAL(out(i), expected_out(i));\n  }\n\n  gpuFree(d_in);\n  gpuFree(d_out);\n}\n\ntemplate <typename Scalar>\nvoid test_gpu_zeta()\n{\n  Tensor<Scalar, 1> in_x(6);\n  Tensor<Scalar, 1> in_q(6);\n  Tensor<Scalar, 1> out(6);\n  Tensor<Scalar, 1> expected_out(6);\n  out.setZero();\n\n  in_x(0) = Scalar(1);\n  in_x(1) = Scalar(1.5);\n  in_x(2) = Scalar(4);\n  in_x(3) = Scalar(-10.5);\n  in_x(4) = Scalar(10000.5);\n  in_x(5) = Scalar(3);\n  \n  in_q(0) = Scalar(1.2345);\n  in_q(1) = Scalar(2);\n  in_q(2) = Scalar(1.5);\n  in_q(3) = Scalar(3);\n  in_q(4) = Scalar(1.0001);\n  in_q(5) = Scalar(-2.5);\n\n  expected_out(0) = std::numeric_limits<Scalar>::infinity();\n  expected_out(1) = Scalar(1.61237534869);\n  expected_out(2) = Scalar(0.234848505667);\n  expected_out(3) = Scalar(1.03086757337e-5);\n  expected_out(4) = Scalar(0.367879440865);\n  expected_out(5) = Scalar(0.054102025820864097);\n\n  std::size_t bytes = in_x.size() * sizeof(Scalar);\n\n  Scalar* d_in_x;\n  Scalar* d_in_q;\n  Scalar* d_out;\n  gpuMalloc((void**)(&d_in_x), bytes);\n  gpuMalloc((void**)(&d_in_q), bytes);\n  gpuMalloc((void**)(&d_out), bytes);\n\n  gpuMemcpy(d_in_x, in_x.data(), bytes, gpuMemcpyHostToDevice);\n  gpuMemcpy(d_in_q, in_q.data(), bytes, gpuMemcpyHostToDevice);\n  \n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n\n  Eigen::TensorMap<Eigen::Tensor<Scalar, 1> > gpu_in_x(d_in_x, 6);\n  Eigen::TensorMap<Eigen::Tensor<Scalar, 1> > gpu_in_q(d_in_q, 6);\n  Eigen::TensorMap<Eigen::Tensor<Scalar, 1> > gpu_out(d_out, 6);\n\n  gpu_out.device(gpu_device) = gpu_in_x.zeta(gpu_in_q);\n\n  assert(gpuMemcpyAsync(out.data(), d_out, bytes, gpuMemcpyDeviceToHost, gpu_device.stream()) == gpuSuccess);\n  assert(gpuStreamSynchronize(gpu_device.stream()) == gpuSuccess);\n\n  VERIFY_IS_EQUAL(out(0), expected_out(0));\n  VERIFY((std::isnan)(out(3)));\n\n  for (int i = 1; i < 6; ++i) {\n    if (i != 3) {\n      VERIFY_IS_APPROX(out(i), expected_out(i));\n    }\n  }\n\n  gpuFree(d_in_x);\n  gpuFree(d_in_q);\n  gpuFree(d_out);\n}\n\ntemplate <typename Scalar>\nvoid test_gpu_polygamma()\n{\n  Tensor<Scalar, 1> in_x(7);\n  Tensor<Scalar, 1> in_n(7);\n  Tensor<Scalar, 1> out(7);\n  Tensor<Scalar, 1> expected_out(7);\n  out.setZero();\n\n  in_n(0) = Scalar(1);\n  in_n(1) = Scalar(1);\n  in_n(2) = Scalar(1);\n  in_n(3) = Scalar(17);\n  in_n(4) = Scalar(31);\n  in_n(5) = Scalar(28);\n  in_n(6) = Scalar(8);\n  \n  in_x(0) = Scalar(2);\n  in_x(1) = Scalar(3);\n  in_x(2) = Scalar(25.5);\n  in_x(3) = Scalar(4.7);\n  in_x(4) = Scalar(11.8);\n  in_x(5) = Scalar(17.7);\n  in_x(6) = Scalar(30.2);\n\n  expected_out(0) = Scalar(0.644934066848);\n  expected_out(1) = Scalar(0.394934066848);\n  expected_out(2) = Scalar(0.0399946696496);\n  expected_out(3) = Scalar(293.334565435);\n  expected_out(4) = Scalar(0.445487887616);\n  expected_out(5) = Scalar(-2.47810300902e-07);\n  expected_out(6) = Scalar(-8.29668781082e-09);\n\n  std::size_t bytes = in_x.size() * sizeof(Scalar);\n\n  Scalar* d_in_x;\n  Scalar* d_in_n;\n  Scalar* d_out;\n  gpuMalloc((void**)(&d_in_x), bytes);\n  gpuMalloc((void**)(&d_in_n), bytes);\n  gpuMalloc((void**)(&d_out), bytes);\n\n  gpuMemcpy(d_in_x, in_x.data(), bytes, gpuMemcpyHostToDevice);\n  gpuMemcpy(d_in_n, in_n.data(), bytes, gpuMemcpyHostToDevice);\n  \n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n\n  Eigen::TensorMap<Eigen::Tensor<Scalar, 1> > gpu_in_x(d_in_x, 7);\n  Eigen::TensorMap<Eigen::Tensor<Scalar, 1> > gpu_in_n(d_in_n, 7);\n  Eigen::TensorMap<Eigen::Tensor<Scalar, 1> > gpu_out(d_out, 7);\n\n  gpu_out.device(gpu_device) = gpu_in_n.polygamma(gpu_in_x);\n\n  assert(gpuMemcpyAsync(out.data(), d_out, bytes, gpuMemcpyDeviceToHost, gpu_device.stream()) == gpuSuccess);\n  assert(gpuStreamSynchronize(gpu_device.stream()) == gpuSuccess);\n\n  for (int i = 0; i < 7; ++i) {\n    VERIFY_IS_APPROX(out(i), expected_out(i));\n  }\n\n  gpuFree(d_in_x);\n  gpuFree(d_in_n);\n  gpuFree(d_out);\n}\n\ntemplate <typename Scalar>\nvoid test_gpu_igamma()\n{\n  Tensor<Scalar, 2> a(6, 6);\n  Tensor<Scalar, 2> x(6, 6);\n  Tensor<Scalar, 2> out(6, 6);\n  out.setZero();\n\n  Scalar a_s[] = {Scalar(0), Scalar(1), Scalar(1.5), Scalar(4), Scalar(0.0001), Scalar(1000.5)};\n  Scalar x_s[] = {Scalar(0), Scalar(1), Scalar(1.5), Scalar(4), Scalar(0.0001), Scalar(1000.5)};\n\n  for (int i = 0; i < 6; ++i) {\n    for (int j = 0; j < 6; ++j) {\n      a(i, j) = a_s[i];\n      x(i, j) = x_s[j];\n    }\n  }\n\n  Scalar nan = std::numeric_limits<Scalar>::quiet_NaN();\n  Scalar igamma_s[][6] = {{0.0, nan, nan, nan, nan, nan},\n                          {0.0, 0.6321205588285578, 0.7768698398515702,\n                           0.9816843611112658, 9.999500016666262e-05, 1.0},\n                          {0.0, 0.4275932955291202, 0.608374823728911,\n                           0.9539882943107686, 7.522076445089201e-07, 1.0},\n                          {0.0, 0.01898815687615381, 0.06564245437845008,\n                           0.5665298796332909, 4.166333347221828e-18, 1.0},\n                          {0.0, 0.9999780593618628, 0.9999899967080838,\n                           0.9999996219837988, 0.9991370418689945, 1.0},\n                          {0.0, 0.0, 0.0, 0.0, 0.0, 0.5042041932513908}};\n\n\n\n  std::size_t bytes = a.size() * sizeof(Scalar);\n\n  Scalar* d_a;\n  Scalar* d_x;\n  Scalar* d_out;\n  assert(gpuMalloc((void**)(&d_a), bytes) == gpuSuccess);\n  assert(gpuMalloc((void**)(&d_x), bytes) == gpuSuccess);\n  assert(gpuMalloc((void**)(&d_out), bytes) == gpuSuccess);\n\n  gpuMemcpy(d_a, a.data(), bytes, gpuMemcpyHostToDevice);\n  gpuMemcpy(d_x, x.data(), bytes, gpuMemcpyHostToDevice);\n\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n\n  Eigen::TensorMap<Eigen::Tensor<Scalar, 2> > gpu_a(d_a, 6, 6);\n  Eigen::TensorMap<Eigen::Tensor<Scalar, 2> > gpu_x(d_x, 6, 6);\n  Eigen::TensorMap<Eigen::Tensor<Scalar, 2> > gpu_out(d_out, 6, 6);\n\n  gpu_out.device(gpu_device) = gpu_a.igamma(gpu_x);\n\n  assert(gpuMemcpyAsync(out.data(), d_out, bytes, gpuMemcpyDeviceToHost, gpu_device.stream()) == gpuSuccess);\n  assert(gpuStreamSynchronize(gpu_device.stream()) == gpuSuccess);\n\n  for (int i = 0; i < 6; ++i) {\n    for (int j = 0; j < 6; ++j) {\n      if ((std::isnan)(igamma_s[i][j])) {\n        VERIFY((std::isnan)(out(i, j)));\n      } else {\n        VERIFY_IS_APPROX(out(i, j), igamma_s[i][j]);\n      }\n    }\n  }\n\n  gpuFree(d_a);\n  gpuFree(d_x);\n  gpuFree(d_out);\n}\n\ntemplate <typename Scalar>\nvoid test_gpu_igammac()\n{\n  Tensor<Scalar, 2> a(6, 6);\n  Tensor<Scalar, 2> x(6, 6);\n  Tensor<Scalar, 2> out(6, 6);\n  out.setZero();\n\n  Scalar a_s[] = {Scalar(0), Scalar(1), Scalar(1.5), Scalar(4), Scalar(0.0001), Scalar(1000.5)};\n  Scalar x_s[] = {Scalar(0), Scalar(1), Scalar(1.5), Scalar(4), Scalar(0.0001), Scalar(1000.5)};\n\n  for (int i = 0; i < 6; ++i) {\n    for (int j = 0; j < 6; ++j) {\n      a(i, j) = a_s[i];\n      x(i, j) = x_s[j];\n    }\n  }\n\n  Scalar nan = std::numeric_limits<Scalar>::quiet_NaN();\n  Scalar igammac_s[][6] = {{nan, nan, nan, nan, nan, nan},\n                           {1.0, 0.36787944117144233, 0.22313016014842982,\n                            0.018315638888734182, 0.9999000049998333, 0.0},\n                           {1.0, 0.5724067044708798, 0.3916251762710878,\n                            0.04601170568923136, 0.9999992477923555, 0.0},\n                           {1.0, 0.9810118431238462, 0.9343575456215499,\n                            0.4334701203667089, 1.0, 0.0},\n                           {1.0, 2.1940638138146658e-05, 1.0003291916285e-05,\n                            3.7801620118431334e-07, 0.0008629581310054535,\n                            0.0},\n                           {1.0, 1.0, 1.0, 1.0, 1.0, 0.49579580674813944}};\n\n  std::size_t bytes = a.size() * sizeof(Scalar);\n\n  Scalar* d_a;\n  Scalar* d_x;\n  Scalar* d_out;\n  gpuMalloc((void**)(&d_a), bytes);\n  gpuMalloc((void**)(&d_x), bytes);\n  gpuMalloc((void**)(&d_out), bytes);\n\n  gpuMemcpy(d_a, a.data(), bytes, gpuMemcpyHostToDevice);\n  gpuMemcpy(d_x, x.data(), bytes, gpuMemcpyHostToDevice);\n\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n\n  Eigen::TensorMap<Eigen::Tensor<Scalar, 2> > gpu_a(d_a, 6, 6);\n  Eigen::TensorMap<Eigen::Tensor<Scalar, 2> > gpu_x(d_x, 6, 6);\n  Eigen::TensorMap<Eigen::Tensor<Scalar, 2> > gpu_out(d_out, 6, 6);\n\n  gpu_out.device(gpu_device) = gpu_a.igammac(gpu_x);\n\n  assert(gpuMemcpyAsync(out.data(), d_out, bytes, gpuMemcpyDeviceToHost, gpu_device.stream()) == gpuSuccess);\n  assert(gpuStreamSynchronize(gpu_device.stream()) == gpuSuccess);\n\n  for (int i = 0; i < 6; ++i) {\n    for (int j = 0; j < 6; ++j) {\n      if ((std::isnan)(igammac_s[i][j])) {\n        VERIFY((std::isnan)(out(i, j)));\n      } else {\n        VERIFY_IS_APPROX(out(i, j), igammac_s[i][j]);\n      }\n    }\n  }\n\n  gpuFree(d_a);\n  gpuFree(d_x);\n  gpuFree(d_out);\n}\n\n#if EIGEN_GPU_TEST_C99_MATH\ntemplate <typename Scalar>\nvoid test_gpu_erf(const Scalar stddev)\n{\n  Tensor<Scalar, 2> in(72,97);\n  in.setRandom();\n  in *= in.constant(stddev);\n  Tensor<Scalar, 2> out(72,97);\n  out.setZero();\n\n  std::size_t bytes = in.size() * sizeof(Scalar);\n\n  Scalar* d_in;\n  Scalar* d_out;\n  assert(gpuMalloc((void**)(&d_in), bytes) == gpuSuccess);\n  assert(gpuMalloc((void**)(&d_out), bytes) == gpuSuccess);\n\n  gpuMemcpy(d_in, in.data(), bytes, gpuMemcpyHostToDevice);\n\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n\n  Eigen::TensorMap<Eigen::Tensor<Scalar, 2> > gpu_in(d_in, 72, 97);\n  Eigen::TensorMap<Eigen::Tensor<Scalar, 2> > gpu_out(d_out, 72, 97);\n\n  gpu_out.device(gpu_device) = gpu_in.erf();\n\n  assert(gpuMemcpyAsync(out.data(), d_out, bytes, gpuMemcpyDeviceToHost, gpu_device.stream()) == gpuSuccess);\n  assert(gpuStreamSynchronize(gpu_device.stream()) == gpuSuccess);\n\n  for (int i = 0; i < 72; ++i) {\n    for (int j = 0; j < 97; ++j) {\n      VERIFY_IS_APPROX(out(i,j), (std::erf)(in(i,j)));\n    }\n  }\n\n  gpuFree(d_in);\n  gpuFree(d_out);\n}\n\ntemplate <typename Scalar>\nvoid test_gpu_erfc(const Scalar stddev)\n{\n  Tensor<Scalar, 2> in(72,97);\n  in.setRandom();\n  in *= in.constant(stddev);\n  Tensor<Scalar, 2> out(72,97);\n  out.setZero();\n\n  std::size_t bytes = in.size() * sizeof(Scalar);\n\n  Scalar* d_in;\n  Scalar* d_out;\n  gpuMalloc((void**)(&d_in), bytes);\n  gpuMalloc((void**)(&d_out), bytes);\n\n  gpuMemcpy(d_in, in.data(), bytes, gpuMemcpyHostToDevice);\n\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n\n  Eigen::TensorMap<Eigen::Tensor<Scalar, 2> > gpu_in(d_in, 72, 97);\n  Eigen::TensorMap<Eigen::Tensor<Scalar, 2> > gpu_out(d_out, 72, 97);\n\n  gpu_out.device(gpu_device) = gpu_in.erfc();\n\n  assert(gpuMemcpyAsync(out.data(), d_out, bytes, gpuMemcpyDeviceToHost, gpu_device.stream()) == gpuSuccess);\n  assert(gpuStreamSynchronize(gpu_device.stream()) == gpuSuccess);\n\n  for (int i = 0; i < 72; ++i) {\n    for (int j = 0; j < 97; ++j) {\n      VERIFY_IS_APPROX(out(i,j), (std::erfc)(in(i,j)));\n    }\n  }\n\n  gpuFree(d_in);\n  gpuFree(d_out);\n}\n#endif\ntemplate <typename Scalar>\nvoid test_gpu_ndtri()\n{\n  Tensor<Scalar, 1> in_x(8);\n  Tensor<Scalar, 1> out(8);\n  Tensor<Scalar, 1> expected_out(8);\n  out.setZero();\n\n  in_x(0) = Scalar(1);\n  in_x(1) = Scalar(0.);\n  in_x(2) = Scalar(0.5);\n  in_x(3) = Scalar(0.2);\n  in_x(4) = Scalar(0.8);\n  in_x(5) = Scalar(0.9);\n  in_x(6) = Scalar(0.1);\n  in_x(7) = Scalar(0.99);\n  in_x(8) = Scalar(0.01);\n\n  expected_out(0) = std::numeric_limits<Scalar>::infinity();\n  expected_out(1) = -std::numeric_limits<Scalar>::infinity();\n  expected_out(2) = Scalar(0.0);\n  expected_out(3) = Scalar(-0.8416212335729142);\n  expected_out(4) = Scalar(0.8416212335729142);\n  expected_out(5) = Scalar(1.2815515655446004);\n  expected_out(6) = Scalar(-1.2815515655446004);\n  expected_out(7) = Scalar(2.3263478740408408);\n  expected_out(8) = Scalar(-2.3263478740408408);\n\n  std::size_t bytes = in_x.size() * sizeof(Scalar);\n\n  Scalar* d_in_x;\n  Scalar* d_out;\n  gpuMalloc((void**)(&d_in_x), bytes);\n  gpuMalloc((void**)(&d_out), bytes);\n\n  gpuMemcpy(d_in_x, in_x.data(), bytes, gpuMemcpyHostToDevice);\n\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n\n  Eigen::TensorMap<Eigen::Tensor<Scalar, 1> > gpu_in_x(d_in_x, 6);\n  Eigen::TensorMap<Eigen::Tensor<Scalar, 1> > gpu_out(d_out, 6);\n\n  gpu_out.device(gpu_device) = gpu_in_x.ndtri();\n\n  assert(gpuMemcpyAsync(out.data(), d_out, bytes, gpuMemcpyDeviceToHost, gpu_device.stream()) == gpuSuccess);\n  assert(gpuStreamSynchronize(gpu_device.stream()) == gpuSuccess);\n\n  VERIFY_IS_EQUAL(out(0), expected_out(0));\n  VERIFY((std::isnan)(out(3)));\n\n  for (int i = 1; i < 6; ++i) {\n    if (i != 3) {\n      VERIFY_IS_APPROX(out(i), expected_out(i));\n    }\n  }\n\n  gpuFree(d_in_x);\n  gpuFree(d_out);\n}\n\ntemplate <typename Scalar>\nvoid test_gpu_betainc()\n{\n  Tensor<Scalar, 1> in_x(125);\n  Tensor<Scalar, 1> in_a(125);\n  Tensor<Scalar, 1> in_b(125);\n  Tensor<Scalar, 1> out(125);\n  Tensor<Scalar, 1> expected_out(125);\n  out.setZero();\n\n  Scalar nan = std::numeric_limits<Scalar>::quiet_NaN();\n\n  Array<Scalar, 1, Dynamic> x(125);\n  Array<Scalar, 1, Dynamic> a(125);\n  Array<Scalar, 1, Dynamic> b(125);\n  Array<Scalar, 1, Dynamic> v(125);\n\n  a << 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,\n      0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,\n      0.03062277660168379, 0.03062277660168379, 0.03062277660168379,\n      0.03062277660168379, 0.03062277660168379, 0.03062277660168379,\n      0.03062277660168379, 0.03062277660168379, 0.03062277660168379,\n      0.03062277660168379, 0.03062277660168379, 0.03062277660168379,\n      0.03062277660168379, 0.03062277660168379, 0.03062277660168379,\n      0.03062277660168379, 0.03062277660168379, 0.03062277660168379,\n      0.03062277660168379, 0.03062277660168379, 0.03062277660168379,\n      0.03062277660168379, 0.03062277660168379, 0.03062277660168379,\n      0.03062277660168379, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999,\n      0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999,\n      0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 31.62177660168379,\n      31.62177660168379, 31.62177660168379, 31.62177660168379,\n      31.62177660168379, 31.62177660168379, 31.62177660168379,\n      31.62177660168379, 31.62177660168379, 31.62177660168379,\n      31.62177660168379, 31.62177660168379, 31.62177660168379,\n      31.62177660168379, 31.62177660168379, 31.62177660168379,\n      31.62177660168379, 31.62177660168379, 31.62177660168379,\n      31.62177660168379, 31.62177660168379, 31.62177660168379,\n      31.62177660168379, 31.62177660168379, 31.62177660168379, 999.999, 999.999,\n      999.999, 999.999, 999.999, 999.999, 999.999, 999.999, 999.999, 999.999,\n      999.999, 999.999, 999.999, 999.999, 999.999, 999.999, 999.999, 999.999,\n      999.999, 999.999, 999.999, 999.999, 999.999, 999.999, 999.999;\n\n  b << 0.0, 0.0, 0.0, 0.0, 0.0, 0.03062277660168379, 0.03062277660168379,\n      0.03062277660168379, 0.03062277660168379, 0.03062277660168379, 0.999,\n      0.999, 0.999, 0.999, 0.999, 31.62177660168379, 31.62177660168379,\n      31.62177660168379, 31.62177660168379, 31.62177660168379, 999.999, 999.999,\n      999.999, 999.999, 999.999, 0.0, 0.0, 0.0, 0.0, 0.0, 0.03062277660168379,\n      0.03062277660168379, 0.03062277660168379, 0.03062277660168379,\n      0.03062277660168379, 0.999, 0.999, 0.999, 0.999, 0.999, 31.62177660168379,\n      31.62177660168379, 31.62177660168379, 31.62177660168379,\n      31.62177660168379, 999.999, 999.999, 999.999, 999.999, 999.999, 0.0, 0.0,\n      0.0, 0.0, 0.0, 0.03062277660168379, 0.03062277660168379,\n      0.03062277660168379, 0.03062277660168379, 0.03062277660168379, 0.999,\n      0.999, 0.999, 0.999, 0.999, 31.62177660168379, 31.62177660168379,\n      31.62177660168379, 31.62177660168379, 31.62177660168379, 999.999, 999.999,\n      999.999, 999.999, 999.999, 0.0, 0.0, 0.0, 0.0, 0.0, 0.03062277660168379,\n      0.03062277660168379, 0.03062277660168379, 0.03062277660168379,\n      0.03062277660168379, 0.999, 0.999, 0.999, 0.999, 0.999, 31.62177660168379,\n      31.62177660168379, 31.62177660168379, 31.62177660168379,\n      31.62177660168379, 999.999, 999.999, 999.999, 999.999, 999.999, 0.0, 0.0,\n      0.0, 0.0, 0.0, 0.03062277660168379, 0.03062277660168379,\n      0.03062277660168379, 0.03062277660168379, 0.03062277660168379, 0.999,\n      0.999, 0.999, 0.999, 0.999, 31.62177660168379, 31.62177660168379,\n      31.62177660168379, 31.62177660168379, 31.62177660168379, 999.999, 999.999,\n      999.999, 999.999, 999.999;\n\n  x << -0.1, 0.2, 0.5, 0.8, 1.1, -0.1, 0.2, 0.5, 0.8, 1.1, -0.1, 0.2, 0.5, 0.8,\n      1.1, -0.1, 0.2, 0.5, 0.8, 1.1, -0.1, 0.2, 0.5, 0.8, 1.1, -0.1, 0.2, 0.5,\n      0.8, 1.1, -0.1, 0.2, 0.5, 0.8, 1.1, -0.1, 0.2, 0.5, 0.8, 1.1, -0.1, 0.2,\n      0.5, 0.8, 1.1, -0.1, 0.2, 0.5, 0.8, 1.1, -0.1, 0.2, 0.5, 0.8, 1.1, -0.1,\n      0.2, 0.5, 0.8, 1.1, -0.1, 0.2, 0.5, 0.8, 1.1, -0.1, 0.2, 0.5, 0.8, 1.1,\n      -0.1, 0.2, 0.5, 0.8, 1.1, -0.1, 0.2, 0.5, 0.8, 1.1, -0.1, 0.2, 0.5, 0.8,\n      1.1, -0.1, 0.2, 0.5, 0.8, 1.1, -0.1, 0.2, 0.5, 0.8, 1.1, -0.1, 0.2, 0.5,\n      0.8, 1.1, -0.1, 0.2, 0.5, 0.8, 1.1, -0.1, 0.2, 0.5, 0.8, 1.1, -0.1, 0.2,\n      0.5, 0.8, 1.1, -0.1, 0.2, 0.5, 0.8, 1.1, -0.1, 0.2, 0.5, 0.8, 1.1;\n\n  v << nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan,\n      nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan,\n      nan, nan, 0.47972119876364683, 0.5, 0.5202788012363533, nan, nan,\n      0.9518683957740043, 0.9789663010413743, 0.9931729188073435, nan, nan,\n      0.999995949033062, 0.9999999999993698, 0.9999999999999999, nan, nan,\n      0.9999999999999999, 0.9999999999999999, 0.9999999999999999, nan, nan, nan,\n      nan, nan, nan, nan, 0.006827081192655869, 0.0210336989586256,\n      0.04813160422599567, nan, nan, 0.20014344256217678, 0.5000000000000001,\n      0.7998565574378232, nan, nan, 0.9991401428435834, 0.999999999698403,\n      0.9999999999999999, nan, nan, 0.9999999999999999, 0.9999999999999999,\n      0.9999999999999999, nan, nan, nan, nan, nan, nan, nan,\n      1.0646600232370887e-25, 6.301722877826246e-13, 4.050966937974938e-06, nan,\n      nan, 7.864342668429763e-23, 3.015969667594166e-10, 0.0008598571564165444,\n      nan, nan, 6.031987710123844e-08, 0.5000000000000007, 0.9999999396801229,\n      nan, nan, 0.9999999999999999, 0.9999999999999999, 0.9999999999999999, nan,\n      nan, nan, nan, nan, nan, nan, 0.0, 7.029920380986636e-306,\n      2.2450728208591345e-101, nan, nan, 0.0, 9.275871147869727e-302,\n      1.2232913026152827e-97, nan, nan, 0.0, 3.0891393081932924e-252,\n      2.9303043666183996e-60, nan, nan, 2.248913486879199e-196,\n      0.5000000000004947, 0.9999999999999999, nan;\n\n  for (int i = 0; i < 125; ++i) {\n    in_x(i) = x(i);\n    in_a(i) = a(i);\n    in_b(i) = b(i);\n    expected_out(i) = v(i);\n  }\n\n  std::size_t bytes = in_x.size() * sizeof(Scalar);\n\n  Scalar* d_in_x;\n  Scalar* d_in_a;\n  Scalar* d_in_b;\n  Scalar* d_out;\n  gpuMalloc((void**)(&d_in_x), bytes);\n  gpuMalloc((void**)(&d_in_a), bytes);\n  gpuMalloc((void**)(&d_in_b), bytes);\n  gpuMalloc((void**)(&d_out), bytes);\n\n  gpuMemcpy(d_in_x, in_x.data(), bytes, gpuMemcpyHostToDevice);\n  gpuMemcpy(d_in_a, in_a.data(), bytes, gpuMemcpyHostToDevice);\n  gpuMemcpy(d_in_b, in_b.data(), bytes, gpuMemcpyHostToDevice);\n\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n\n  Eigen::TensorMap<Eigen::Tensor<Scalar, 1> > gpu_in_x(d_in_x, 125);\n  Eigen::TensorMap<Eigen::Tensor<Scalar, 1> > gpu_in_a(d_in_a, 125);\n  Eigen::TensorMap<Eigen::Tensor<Scalar, 1> > gpu_in_b(d_in_b, 125);\n  Eigen::TensorMap<Eigen::Tensor<Scalar, 1> > gpu_out(d_out, 125);\n\n  gpu_out.device(gpu_device) = betainc(gpu_in_a, gpu_in_b, gpu_in_x);\n\n  assert(gpuMemcpyAsync(out.data(), d_out, bytes, gpuMemcpyDeviceToHost, gpu_device.stream()) == gpuSuccess);\n  assert(gpuStreamSynchronize(gpu_device.stream()) == gpuSuccess);\n\n  for (int i = 1; i < 125; ++i) {\n    if ((std::isnan)(expected_out(i))) {\n      VERIFY((std::isnan)(out(i)));\n    } else {\n      VERIFY_IS_APPROX(out(i), expected_out(i));\n    }\n  }\n\n  gpuFree(d_in_x);\n  gpuFree(d_in_a);\n  gpuFree(d_in_b);\n  gpuFree(d_out);\n}\n\ntemplate <typename Scalar>\nvoid test_gpu_i0e()\n{\n  Tensor<Scalar, 1> in_x(21);\n  Tensor<Scalar, 1> out(21);\n  Tensor<Scalar, 1> expected_out(21);\n  out.setZero();\n\n  Array<Scalar, 1, Dynamic> in_x_array(21);\n  Array<Scalar, 1, Dynamic> expected_out_array(21);\n\n  in_x_array << -20.0, -18.0, -16.0, -14.0, -12.0, -10.0, -8.0, -6.0, -4.0,\n      -2.0, 0.0, 2.0, 4.0, 6.0, 8.0, 10.0, 12.0, 14.0, 16.0, 18.0, 20.0;\n\n  expected_out_array << 0.0897803118848, 0.0947062952128, 0.100544127361,\n      0.107615251671, 0.116426221213, 0.127833337163, 0.143431781857,\n      0.16665743264, 0.207001921224, 0.308508322554, 1.0, 0.308508322554,\n      0.207001921224, 0.16665743264, 0.143431781857, 0.127833337163,\n      0.116426221213, 0.107615251671, 0.100544127361, 0.0947062952128,\n      0.0897803118848;\n\n  for (int i = 0; i < 21; ++i) {\n    in_x(i) = in_x_array(i);\n    expected_out(i) = expected_out_array(i);\n  }\n\n  std::size_t bytes = in_x.size() * sizeof(Scalar);\n\n  Scalar* d_in;\n  Scalar* d_out;\n  gpuMalloc((void**)(&d_in), bytes);\n  gpuMalloc((void**)(&d_out), bytes);\n\n  gpuMemcpy(d_in, in_x.data(), bytes, gpuMemcpyHostToDevice);\n\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n\n  Eigen::TensorMap<Eigen::Tensor<Scalar, 1> > gpu_in(d_in, 21);\n  Eigen::TensorMap<Eigen::Tensor<Scalar, 1> > gpu_out(d_out, 21);\n\n  gpu_out.device(gpu_device) = gpu_in.bessel_i0e();\n\n  assert(gpuMemcpyAsync(out.data(), d_out, bytes, gpuMemcpyDeviceToHost,\n                         gpu_device.stream()) == gpuSuccess);\n  assert(gpuStreamSynchronize(gpu_device.stream()) == gpuSuccess);\n\n  for (int i = 0; i < 21; ++i) {\n    VERIFY_IS_APPROX(out(i), expected_out(i));\n  }\n\n  gpuFree(d_in);\n  gpuFree(d_out);\n}\n\ntemplate <typename Scalar>\nvoid test_gpu_i1e()\n{\n  Tensor<Scalar, 1> in_x(21);\n  Tensor<Scalar, 1> out(21);\n  Tensor<Scalar, 1> expected_out(21);\n  out.setZero();\n\n  Array<Scalar, 1, Dynamic> in_x_array(21);\n  Array<Scalar, 1, Dynamic> expected_out_array(21);\n\n  in_x_array << -20.0, -18.0, -16.0, -14.0, -12.0, -10.0, -8.0, -6.0, -4.0,\n      -2.0, 0.0, 2.0, 4.0, 6.0, 8.0, 10.0, 12.0, 14.0, 16.0, 18.0, 20.0;\n\n  expected_out_array << -0.0875062221833, -0.092036796872, -0.0973496147565,\n      -0.103697667463, -0.11146429929, -0.121262681384, -0.134142493293,\n      -0.152051459309, -0.178750839502, -0.215269289249, 0.0, 0.215269289249,\n      0.178750839502, 0.152051459309, 0.134142493293, 0.121262681384,\n      0.11146429929, 0.103697667463, 0.0973496147565, 0.092036796872,\n      0.0875062221833;\n\n  for (int i = 0; i < 21; ++i) {\n    in_x(i) = in_x_array(i);\n    expected_out(i) = expected_out_array(i);\n  }\n\n  std::size_t bytes = in_x.size() * sizeof(Scalar);\n\n  Scalar* d_in;\n  Scalar* d_out;\n  gpuMalloc((void**)(&d_in), bytes);\n  gpuMalloc((void**)(&d_out), bytes);\n\n  gpuMemcpy(d_in, in_x.data(), bytes, gpuMemcpyHostToDevice);\n\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n\n  Eigen::TensorMap<Eigen::Tensor<Scalar, 1> > gpu_in(d_in, 21);\n  Eigen::TensorMap<Eigen::Tensor<Scalar, 1> > gpu_out(d_out, 21);\n\n  gpu_out.device(gpu_device) = gpu_in.bessel_i1e();\n\n  assert(gpuMemcpyAsync(out.data(), d_out, bytes, gpuMemcpyDeviceToHost,\n                         gpu_device.stream()) == gpuSuccess);\n  assert(gpuStreamSynchronize(gpu_device.stream()) == gpuSuccess);\n\n  for (int i = 0; i < 21; ++i) {\n    VERIFY_IS_APPROX(out(i), expected_out(i));\n  }\n\n  gpuFree(d_in);\n  gpuFree(d_out);\n}\n\ntemplate <typename Scalar>\nvoid test_gpu_igamma_der_a()\n{\n  Tensor<Scalar, 1> in_x(30);\n  Tensor<Scalar, 1> in_a(30);\n  Tensor<Scalar, 1> out(30);\n  Tensor<Scalar, 1> expected_out(30);\n  out.setZero();\n\n  Array<Scalar, 1, Dynamic> in_a_array(30);\n  Array<Scalar, 1, Dynamic> in_x_array(30);\n  Array<Scalar, 1, Dynamic> expected_out_array(30);\n\n  // See special_functions.cpp for the Python code that generates the test data.\n\n  in_a_array << 0.01, 0.01, 0.01, 0.01, 0.01, 0.1, 0.1, 0.1, 0.1, 0.1, 1.0, 1.0,\n      1.0, 1.0, 1.0, 10.0, 10.0, 10.0, 10.0, 10.0, 100.0, 100.0, 100.0, 100.0,\n      100.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0;\n\n  in_x_array << 1.25668890405e-26, 1.17549435082e-38, 1.20938905072e-05,\n      1.17549435082e-38, 1.17549435082e-38, 5.66572070696e-16, 0.0132865061065,\n      0.0200034203853, 6.29263709118e-17, 1.37160367764e-06, 0.333412038288,\n      1.18135687766, 0.580629033777, 0.170631439426, 0.786686768458,\n      7.63873279537, 13.1944344379, 11.896042354, 10.5830172417, 10.5020942233,\n      92.8918587747, 95.003720371, 86.3715926467, 96.0330217672, 82.6389930677,\n      968.702906754, 969.463546828, 1001.79726022, 955.047416547, 1044.27458568;\n\n  expected_out_array << -32.7256441441, -36.4394150514, -9.66467612263,\n      -36.4394150514, -36.4394150514, -1.0891900302, -2.66351229645,\n      -2.48666868596, -0.929700494428, -3.56327722764, -0.455320135314,\n      -0.391437214323, -0.491352055991, -0.350454834292, -0.471773162921,\n      -0.104084440522, -0.0723646747909, -0.0992828975532, -0.121638215446,\n      -0.122619605294, -0.0317670267286, -0.0359974812869, -0.0154359225363,\n      -0.0375775365921, -0.00794899153653, -0.00777303219211, -0.00796085782042,\n      -0.0125850719397, -0.00455500206958, -0.00476436993148;\n\n  for (int i = 0; i < 30; ++i) {\n    in_x(i) = in_x_array(i);\n    in_a(i) = in_a_array(i);\n    expected_out(i) = expected_out_array(i);\n  }\n\n  std::size_t bytes = in_x.size() * sizeof(Scalar);\n\n  Scalar* d_a;\n  Scalar* d_x;\n  Scalar* d_out;\n  gpuMalloc((void**)(&d_a), bytes);\n  gpuMalloc((void**)(&d_x), bytes);\n  gpuMalloc((void**)(&d_out), bytes);\n\n  gpuMemcpy(d_a, in_a.data(), bytes, gpuMemcpyHostToDevice);\n  gpuMemcpy(d_x, in_x.data(), bytes, gpuMemcpyHostToDevice);\n\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n\n  Eigen::TensorMap<Eigen::Tensor<Scalar, 1> > gpu_a(d_a, 30);\n  Eigen::TensorMap<Eigen::Tensor<Scalar, 1> > gpu_x(d_x, 30);\n  Eigen::TensorMap<Eigen::Tensor<Scalar, 1> > gpu_out(d_out, 30);\n\n  gpu_out.device(gpu_device) = gpu_a.igamma_der_a(gpu_x);\n\n  assert(gpuMemcpyAsync(out.data(), d_out, bytes, gpuMemcpyDeviceToHost,\n                         gpu_device.stream()) == gpuSuccess);\n  assert(gpuStreamSynchronize(gpu_device.stream()) == gpuSuccess);\n\n  for (int i = 0; i < 30; ++i) {\n    VERIFY_IS_APPROX(out(i), expected_out(i));\n  }\n\n  gpuFree(d_a);\n  gpuFree(d_x);\n  gpuFree(d_out);\n}\n\ntemplate <typename Scalar>\nvoid test_gpu_gamma_sample_der_alpha()\n{\n  Tensor<Scalar, 1> in_alpha(30);\n  Tensor<Scalar, 1> in_sample(30);\n  Tensor<Scalar, 1> out(30);\n  Tensor<Scalar, 1> expected_out(30);\n  out.setZero();\n\n  Array<Scalar, 1, Dynamic> in_alpha_array(30);\n  Array<Scalar, 1, Dynamic> in_sample_array(30);\n  Array<Scalar, 1, Dynamic> expected_out_array(30);\n\n  // See special_functions.cpp for the Python code that generates the test data.\n\n  in_alpha_array << 0.01, 0.01, 0.01, 0.01, 0.01, 0.1, 0.1, 0.1, 0.1, 0.1, 1.0,\n      1.0, 1.0, 1.0, 1.0, 10.0, 10.0, 10.0, 10.0, 10.0, 100.0, 100.0, 100.0,\n      100.0, 100.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0;\n\n  in_sample_array << 1.25668890405e-26, 1.17549435082e-38, 1.20938905072e-05,\n      1.17549435082e-38, 1.17549435082e-38, 5.66572070696e-16, 0.0132865061065,\n      0.0200034203853, 6.29263709118e-17, 1.37160367764e-06, 0.333412038288,\n      1.18135687766, 0.580629033777, 0.170631439426, 0.786686768458,\n      7.63873279537, 13.1944344379, 11.896042354, 10.5830172417, 10.5020942233,\n      92.8918587747, 95.003720371, 86.3715926467, 96.0330217672, 82.6389930677,\n      968.702906754, 969.463546828, 1001.79726022, 955.047416547, 1044.27458568;\n\n  expected_out_array << 7.42424742367e-23, 1.02004297287e-34, 0.0130155240738,\n      1.02004297287e-34, 1.02004297287e-34, 1.96505168277e-13, 0.525575786243,\n      0.713903991771, 2.32077561808e-14, 0.000179348049886, 0.635500453302,\n      1.27561284917, 0.878125852156, 0.41565819538, 1.03606488534,\n      0.885964824887, 1.16424049334, 1.10764479598, 1.04590810812,\n      1.04193666963, 0.965193152414, 0.976217589464, 0.93008035061,\n      0.98153216096, 0.909196397698, 0.98434963993, 0.984738050206,\n      1.00106492525, 0.97734200649, 1.02198794179;\n\n  for (int i = 0; i < 30; ++i) {\n    in_alpha(i) = in_alpha_array(i);\n    in_sample(i) = in_sample_array(i);\n    expected_out(i) = expected_out_array(i);\n  }\n\n  std::size_t bytes = in_alpha.size() * sizeof(Scalar);\n\n  Scalar* d_alpha;\n  Scalar* d_sample;\n  Scalar* d_out;\n  gpuMalloc((void**)(&d_alpha), bytes);\n  gpuMalloc((void**)(&d_sample), bytes);\n  gpuMalloc((void**)(&d_out), bytes);\n\n  gpuMemcpy(d_alpha, in_alpha.data(), bytes, gpuMemcpyHostToDevice);\n  gpuMemcpy(d_sample, in_sample.data(), bytes, gpuMemcpyHostToDevice);\n\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n\n  Eigen::TensorMap<Eigen::Tensor<Scalar, 1> > gpu_alpha(d_alpha, 30);\n  Eigen::TensorMap<Eigen::Tensor<Scalar, 1> > gpu_sample(d_sample, 30);\n  Eigen::TensorMap<Eigen::Tensor<Scalar, 1> > gpu_out(d_out, 30);\n\n  gpu_out.device(gpu_device) = gpu_alpha.gamma_sample_der_alpha(gpu_sample);\n\n  assert(gpuMemcpyAsync(out.data(), d_out, bytes, gpuMemcpyDeviceToHost,\n                         gpu_device.stream()) == gpuSuccess);\n  assert(gpuStreamSynchronize(gpu_device.stream()) == gpuSuccess);\n\n  for (int i = 0; i < 30; ++i) {\n    VERIFY_IS_APPROX(out(i), expected_out(i));\n  }\n\n  gpuFree(d_alpha);\n  gpuFree(d_sample);\n  gpuFree(d_out);\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_gpu)\n{\n  CALL_SUBTEST_1(test_gpu_nullary());\n  CALL_SUBTEST_1(test_gpu_elementwise_small());\n  CALL_SUBTEST_1(test_gpu_elementwise());\n  CALL_SUBTEST_1(test_gpu_props());\n  CALL_SUBTEST_1(test_gpu_reduction());\n  CALL_SUBTEST_2(test_gpu_contraction<ColMajor>());\n  CALL_SUBTEST_2(test_gpu_contraction<RowMajor>());\n  CALL_SUBTEST_3(test_gpu_convolution_1d<ColMajor>());\n  CALL_SUBTEST_3(test_gpu_convolution_1d<RowMajor>());\n  CALL_SUBTEST_3(test_gpu_convolution_inner_dim_col_major_1d());\n  CALL_SUBTEST_3(test_gpu_convolution_inner_dim_row_major_1d());\n  CALL_SUBTEST_3(test_gpu_convolution_2d<ColMajor>());\n  CALL_SUBTEST_3(test_gpu_convolution_2d<RowMajor>());\n#if !defined(EIGEN_USE_HIP)\n// disable these tests on HIP for now.\n// they hang..need to investigate and fix\n  CALL_SUBTEST_3(test_gpu_convolution_3d<ColMajor>());\n  CALL_SUBTEST_3(test_gpu_convolution_3d<RowMajor>());\n#endif\n\n#if EIGEN_GPU_TEST_C99_MATH\n  // std::erf, std::erfc, and so on where only added in c++11. We use them\n  // as a golden reference to validate the results produced by Eigen. Therefore\n  // we can only run these tests if we use a c++11 compiler.\n  CALL_SUBTEST_4(test_gpu_lgamma<float>(1.0f));\n  CALL_SUBTEST_4(test_gpu_lgamma<float>(100.0f));\n  CALL_SUBTEST_4(test_gpu_lgamma<float>(0.01f));\n  CALL_SUBTEST_4(test_gpu_lgamma<float>(0.001f));\n\n  CALL_SUBTEST_4(test_gpu_lgamma<double>(1.0));\n  CALL_SUBTEST_4(test_gpu_lgamma<double>(100.0));\n  CALL_SUBTEST_4(test_gpu_lgamma<double>(0.01));\n  CALL_SUBTEST_4(test_gpu_lgamma<double>(0.001));\n\n  CALL_SUBTEST_4(test_gpu_erf<float>(1.0f));\n  CALL_SUBTEST_4(test_gpu_erf<float>(100.0f));\n  CALL_SUBTEST_4(test_gpu_erf<float>(0.01f));\n  CALL_SUBTEST_4(test_gpu_erf<float>(0.001f));\n\n  CALL_SUBTEST_4(test_gpu_erfc<float>(1.0f));\n  // CALL_SUBTEST(test_gpu_erfc<float>(100.0f));\n  CALL_SUBTEST_4(test_gpu_erfc<float>(5.0f)); // GPU erfc lacks precision for large inputs\n  CALL_SUBTEST_4(test_gpu_erfc<float>(0.01f));\n  CALL_SUBTEST_4(test_gpu_erfc<float>(0.001f));\n\n  CALL_SUBTEST_4(test_gpu_erf<double>(1.0));\n  CALL_SUBTEST_4(test_gpu_erf<double>(100.0));\n  CALL_SUBTEST_4(test_gpu_erf<double>(0.01));\n  CALL_SUBTEST_4(test_gpu_erf<double>(0.001));\n\n  CALL_SUBTEST_4(test_gpu_erfc<double>(1.0));\n  // CALL_SUBTEST(test_gpu_erfc<double>(100.0));\n  CALL_SUBTEST_4(test_gpu_erfc<double>(5.0)); // GPU erfc lacks precision for large inputs\n  CALL_SUBTEST_4(test_gpu_erfc<double>(0.01));\n  CALL_SUBTEST_4(test_gpu_erfc<double>(0.001));\n\n#if !defined(EIGEN_USE_HIP)\n// disable these tests on HIP for now.\n\n  CALL_SUBTEST_5(test_gpu_ndtri<float>());\n  CALL_SUBTEST_5(test_gpu_ndtri<double>());\n\n  CALL_SUBTEST_5(test_gpu_digamma<float>());\n  CALL_SUBTEST_5(test_gpu_digamma<double>());\n\n  CALL_SUBTEST_5(test_gpu_polygamma<float>());\n  CALL_SUBTEST_5(test_gpu_polygamma<double>());\n\n  CALL_SUBTEST_5(test_gpu_zeta<float>());\n  CALL_SUBTEST_5(test_gpu_zeta<double>());\n#endif\n\n  CALL_SUBTEST_5(test_gpu_igamma<float>());\n  CALL_SUBTEST_5(test_gpu_igammac<float>());\n\n  CALL_SUBTEST_5(test_gpu_igamma<double>());\n  CALL_SUBTEST_5(test_gpu_igammac<double>());\n\n#if !defined(EIGEN_USE_HIP)\n// disable these tests on HIP for now.\n  CALL_SUBTEST_6(test_gpu_betainc<float>());\n  CALL_SUBTEST_6(test_gpu_betainc<double>());\n\n  CALL_SUBTEST_6(test_gpu_i0e<float>());\n  CALL_SUBTEST_6(test_gpu_i0e<double>());\n\n  CALL_SUBTEST_6(test_gpu_i1e<float>());\n  CALL_SUBTEST_6(test_gpu_i1e<double>());\n\n  CALL_SUBTEST_6(test_gpu_i1e<float>());\n  CALL_SUBTEST_6(test_gpu_i1e<double>());\n\n  CALL_SUBTEST_6(test_gpu_igamma_der_a<float>());\n  CALL_SUBTEST_6(test_gpu_igamma_der_a<double>());\n\n  CALL_SUBTEST_6(test_gpu_gamma_sample_der_alpha<float>());\n  CALL_SUBTEST_6(test_gpu_gamma_sample_der_alpha<double>());\n#endif\n\n#endif\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_ifft.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Jianwei Cui <thucjw@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <complex>\n#include <cmath>\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\n\ntemplate <int DataLayout>\nstatic void test_1D_fft_ifft_invariant(int sequence_length) {\n  Tensor<double, 1, DataLayout> tensor(sequence_length);\n  tensor.setRandom();\n\n  array<int, 1> fft;\n  fft[0] = 0;\n\n  Tensor<std::complex<double>, 1, DataLayout> tensor_after_fft;\n  Tensor<std::complex<double>, 1, DataLayout> tensor_after_fft_ifft;\n\n  tensor_after_fft = tensor.template fft<Eigen::BothParts, Eigen::FFT_FORWARD>(fft);\n  tensor_after_fft_ifft = tensor_after_fft.template fft<Eigen::BothParts, Eigen::FFT_REVERSE>(fft);\n\n  VERIFY_IS_EQUAL(tensor_after_fft.dimension(0), sequence_length);\n  VERIFY_IS_EQUAL(tensor_after_fft_ifft.dimension(0), sequence_length);\n\n  for (int i = 0; i < sequence_length; ++i) {\n    VERIFY_IS_APPROX(static_cast<float>(tensor(i)), static_cast<float>(std::real(tensor_after_fft_ifft(i))));\n  }\n}\n\ntemplate <int DataLayout>\nstatic void test_2D_fft_ifft_invariant(int dim0, int dim1) {\n  Tensor<double, 2, DataLayout> tensor(dim0, dim1);\n  tensor.setRandom();\n\n  array<int, 2> fft;\n  fft[0] = 0;\n  fft[1] = 1;\n\n  Tensor<std::complex<double>, 2, DataLayout> tensor_after_fft;\n  Tensor<std::complex<double>, 2, DataLayout> tensor_after_fft_ifft;\n\n  tensor_after_fft = tensor.template fft<Eigen::BothParts, Eigen::FFT_FORWARD>(fft);\n  tensor_after_fft_ifft = tensor_after_fft.template fft<Eigen::BothParts, Eigen::FFT_REVERSE>(fft);\n\n  VERIFY_IS_EQUAL(tensor_after_fft.dimension(0), dim0);\n  VERIFY_IS_EQUAL(tensor_after_fft.dimension(1), dim1);\n  VERIFY_IS_EQUAL(tensor_after_fft_ifft.dimension(0), dim0);\n  VERIFY_IS_EQUAL(tensor_after_fft_ifft.dimension(1), dim1);\n\n  for (int i = 0; i < dim0; ++i) {\n    for (int j = 0; j < dim1; ++j) {\n      //std::cout << \"[\" << i << \"][\" << j << \"]\" <<  \"  Original data: \" << tensor(i,j) << \" Transformed data:\" << tensor_after_fft_ifft(i,j) << std::endl;\n      VERIFY_IS_APPROX(static_cast<float>(tensor(i,j)), static_cast<float>(std::real(tensor_after_fft_ifft(i,j))));\n    }\n  }\n}\n\ntemplate <int DataLayout>\nstatic void test_3D_fft_ifft_invariant(int dim0, int dim1, int dim2) {\n  Tensor<double, 3, DataLayout> tensor(dim0, dim1, dim2);\n  tensor.setRandom();\n\n  array<int, 3> fft;\n  fft[0] = 0;\n  fft[1] = 1;\n  fft[2] = 2;\n\n  Tensor<std::complex<double>, 3, DataLayout> tensor_after_fft;\n  Tensor<std::complex<double>, 3, DataLayout> tensor_after_fft_ifft;\n\n  tensor_after_fft = tensor.template fft<Eigen::BothParts, Eigen::FFT_FORWARD>(fft);\n  tensor_after_fft_ifft = tensor_after_fft.template fft<Eigen::BothParts, Eigen::FFT_REVERSE>(fft);\n\n  VERIFY_IS_EQUAL(tensor_after_fft.dimension(0), dim0);\n  VERIFY_IS_EQUAL(tensor_after_fft.dimension(1), dim1);\n  VERIFY_IS_EQUAL(tensor_after_fft.dimension(2), dim2);\n  VERIFY_IS_EQUAL(tensor_after_fft_ifft.dimension(0), dim0);\n  VERIFY_IS_EQUAL(tensor_after_fft_ifft.dimension(1), dim1);\n  VERIFY_IS_EQUAL(tensor_after_fft_ifft.dimension(2), dim2);\n\n  for (int i = 0; i < dim0; ++i) {\n    for (int j = 0; j < dim1; ++j) {\n      for (int k = 0; k < dim2; ++k) {\n        VERIFY_IS_APPROX(static_cast<float>(tensor(i,j,k)), static_cast<float>(std::real(tensor_after_fft_ifft(i,j,k))));\n      }\n    }\n  }\n}\n\ntemplate <int DataLayout>\nstatic void test_sub_fft_ifft_invariant(int dim0, int dim1, int dim2, int dim3) {\n  Tensor<double, 4, DataLayout> tensor(dim0, dim1, dim2, dim3);\n  tensor.setRandom();\n\n  array<int, 2> fft;\n  fft[0] = 2;\n  fft[1] = 0;\n\n  Tensor<std::complex<double>, 4, DataLayout> tensor_after_fft;\n  Tensor<double, 4, DataLayout> tensor_after_fft_ifft;\n\n  tensor_after_fft = tensor.template fft<Eigen::BothParts, Eigen::FFT_FORWARD>(fft);\n  tensor_after_fft_ifft = tensor_after_fft.template fft<Eigen::RealPart, Eigen::FFT_REVERSE>(fft);\n\n  VERIFY_IS_EQUAL(tensor_after_fft.dimension(0), dim0);\n  VERIFY_IS_EQUAL(tensor_after_fft.dimension(1), dim1);\n  VERIFY_IS_EQUAL(tensor_after_fft.dimension(2), dim2);\n  VERIFY_IS_EQUAL(tensor_after_fft.dimension(3), dim3);\n  VERIFY_IS_EQUAL(tensor_after_fft_ifft.dimension(0), dim0);\n  VERIFY_IS_EQUAL(tensor_after_fft_ifft.dimension(1), dim1);\n  VERIFY_IS_EQUAL(tensor_after_fft_ifft.dimension(2), dim2);\n  VERIFY_IS_EQUAL(tensor_after_fft_ifft.dimension(3), dim3);\n\n  for (int i = 0; i < dim0; ++i) {\n    for (int j = 0; j < dim1; ++j) {\n      for (int k = 0; k < dim2; ++k) {\n        for (int l = 0; l < dim3; ++l) {\n          VERIFY_IS_APPROX(static_cast<float>(tensor(i,j,k,l)), static_cast<float>(tensor_after_fft_ifft(i,j,k,l)));\n        }\n      }\n    }\n  }\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_ifft) {\n  CALL_SUBTEST(test_1D_fft_ifft_invariant<ColMajor>(4));\n  CALL_SUBTEST(test_1D_fft_ifft_invariant<ColMajor>(16));\n  CALL_SUBTEST(test_1D_fft_ifft_invariant<ColMajor>(32));\n  CALL_SUBTEST(test_1D_fft_ifft_invariant<ColMajor>(1024*1024));\n\n  CALL_SUBTEST(test_2D_fft_ifft_invariant<ColMajor>(4,4));\n  CALL_SUBTEST(test_2D_fft_ifft_invariant<ColMajor>(8,16));\n  CALL_SUBTEST(test_2D_fft_ifft_invariant<ColMajor>(16,32));\n  CALL_SUBTEST(test_2D_fft_ifft_invariant<ColMajor>(1024,1024));\n\n  CALL_SUBTEST(test_3D_fft_ifft_invariant<ColMajor>(4,4,4));\n  CALL_SUBTEST(test_3D_fft_ifft_invariant<ColMajor>(8,16,32));\n  CALL_SUBTEST(test_3D_fft_ifft_invariant<ColMajor>(16,4,8));\n  CALL_SUBTEST(test_3D_fft_ifft_invariant<ColMajor>(256,256,256));\n\n  CALL_SUBTEST(test_sub_fft_ifft_invariant<ColMajor>(4,4,4,4));\n  CALL_SUBTEST(test_sub_fft_ifft_invariant<ColMajor>(8,16,32,64));\n  CALL_SUBTEST(test_sub_fft_ifft_invariant<ColMajor>(16,4,8,12));\n  CALL_SUBTEST(test_sub_fft_ifft_invariant<ColMajor>(64,64,64,64));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_image_op_sycl.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016\n// Mehdi Goli    Codeplay Software Ltd.\n// Ralph Potter  Codeplay Software Ltd.\n// Luke Iwanski  Codeplay Software Ltd.\n// Contact: <eigen@codeplay.com>\n// Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_TEST_NO_LONGDOUBLE\n#define EIGEN_TEST_NO_COMPLEX\n#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int64_t\n#define EIGEN_USE_SYCL\n\n#include \"main.h\"\n#include <unsupported/Eigen/CXX11/Tensor>\n\nusing Eigen::array;\nusing Eigen::SyclDevice;\nusing Eigen::Tensor;\nusing Eigen::TensorMap;\n\nusing Eigen::Tensor;\nusing Eigen::RowMajor;\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_image_op_sycl(const Eigen::SyclDevice &sycl_device)\n{\n  IndexType sizeDim1 = 245;\n  IndexType sizeDim2 = 343;\n  IndexType sizeDim3 = 577;\n\n  array<IndexType, 3> input_range ={{sizeDim1, sizeDim2, sizeDim3}};\n  array<IndexType, 3> slice_range ={{sizeDim1-1, sizeDim2, sizeDim3}};\n\n  Tensor<DataType, 3,DataLayout, IndexType> tensor1(input_range);\n  Tensor<DataType, 3,DataLayout, IndexType> tensor2(input_range);\n  Tensor<DataType, 3, DataLayout, IndexType> tensor3(slice_range);\n  Tensor<DataType, 3, DataLayout, IndexType> tensor3_cpu(slice_range);\n\n\n\n  typedef Eigen::DSizes<IndexType, 3> Index3;\n  Index3 strides1(1L,1L, 1L);\n  Index3 indicesStart1(1L, 0L, 0L);\n  Index3 indicesStop1(sizeDim1, sizeDim2, sizeDim3);\n\n  Index3 strides2(1L,1L, 1L);\n  Index3 indicesStart2(0L, 0L, 0L);\n  Index3 indicesStop2(sizeDim1-1, sizeDim2, sizeDim3);\n  Eigen::DSizes<IndexType, 3> sizes(sizeDim1-1,sizeDim2,sizeDim3);\n\n  tensor1.setRandom();\n  tensor2.setRandom();\n\n\n  DataType* gpu_data1  = static_cast<DataType*>(sycl_device.allocate(tensor1.size()*sizeof(DataType)));\n  DataType* gpu_data2  = static_cast<DataType*>(sycl_device.allocate(tensor2.size()*sizeof(DataType)));\n  DataType* gpu_data3  = static_cast<DataType*>(sycl_device.allocate(tensor3.size()*sizeof(DataType)));\n\n  TensorMap<Tensor<DataType, 3, DataLayout, IndexType>> gpu1(gpu_data1, input_range);\n  TensorMap<Tensor<DataType, 3, DataLayout, IndexType>> gpu2(gpu_data2, input_range);\n  TensorMap<Tensor<DataType, 3, DataLayout, IndexType>> gpu3(gpu_data3, slice_range);\n\n  sycl_device.memcpyHostToDevice(gpu_data1, tensor1.data(),(tensor1.size())*sizeof(DataType));\n  sycl_device.memcpyHostToDevice(gpu_data2, tensor2.data(),(tensor2.size())*sizeof(DataType));\n  gpu3.device(sycl_device)= gpu1.slice(indicesStart1, sizes) - gpu2.slice(indicesStart2, sizes);\n  sycl_device.memcpyDeviceToHost(tensor3.data(), gpu_data3,(tensor3.size())*sizeof(DataType));\n\n  tensor3_cpu = tensor1.stridedSlice(indicesStart1,indicesStop1,strides1) - tensor2.stridedSlice(indicesStart2,indicesStop2,strides2);\n\n\n  for (IndexType i = 0; i <slice_range[0] ; ++i) {\n    for (IndexType j = 0; j < slice_range[1]; ++j) {\n      for (IndexType k = 0; k < slice_range[2]; ++k) {\n        VERIFY_IS_EQUAL(tensor3_cpu(i,j,k), tensor3(i,j,k));\n      }\n    }\n  }\n  sycl_device.deallocate(gpu_data1);\n  sycl_device.deallocate(gpu_data2);\n  sycl_device.deallocate(gpu_data3);\n}\n\n\ntemplate<typename DataType, typename dev_Selector> void sycl_computing_test_per_device(dev_Selector s){\n  QueueInterface queueInterface(s);\n  auto sycl_device = Eigen::SyclDevice(&queueInterface);\n  test_image_op_sycl<DataType, RowMajor, int64_t>(sycl_device);\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_image_op_sycl) {\n  for (const auto& device :Eigen::get_sycl_supported_devices()) { \n   CALL_SUBTEST(sycl_computing_test_per_device<float>(device));\n#ifdef EIGEN_SYCL_DOUBLE_SUPPORT\n   CALL_SUBTEST(sycl_computing_test_per_device<double>(device));\n#endif\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_image_patch.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\n\nvoid test_simple_patch()\n{\n  Tensor<float, 4> tensor(2,3,5,7);\n  tensor.setRandom();\n  Tensor<float, 4, RowMajor> tensor_row_major = tensor.swap_layout();\n  VERIFY_IS_EQUAL(tensor.dimension(0), tensor_row_major.dimension(3));\n  VERIFY_IS_EQUAL(tensor.dimension(1), tensor_row_major.dimension(2));\n  VERIFY_IS_EQUAL(tensor.dimension(2), tensor_row_major.dimension(1));\n  VERIFY_IS_EQUAL(tensor.dimension(3), tensor_row_major.dimension(0));\n\n  // Single pixel patch: ColMajor\n  Tensor<float, 5> single_pixel_patch;\n  single_pixel_patch = tensor.extract_image_patches(1, 1);\n  VERIFY_IS_EQUAL(single_pixel_patch.dimension(0), 2);\n  VERIFY_IS_EQUAL(single_pixel_patch.dimension(1), 1);\n  VERIFY_IS_EQUAL(single_pixel_patch.dimension(2), 1);\n  VERIFY_IS_EQUAL(single_pixel_patch.dimension(3), 3*5);\n  VERIFY_IS_EQUAL(single_pixel_patch.dimension(4), 7);\n\n  // Single pixel patch: RowMajor\n  Tensor<float, 5, RowMajor> single_pixel_patch_row_major;\n  single_pixel_patch_row_major = tensor_row_major.extract_image_patches(1, 1);\n  VERIFY_IS_EQUAL(single_pixel_patch_row_major.dimension(0), 7);\n  VERIFY_IS_EQUAL(single_pixel_patch_row_major.dimension(1), 3*5);\n  VERIFY_IS_EQUAL(single_pixel_patch_row_major.dimension(2), 1);\n  VERIFY_IS_EQUAL(single_pixel_patch_row_major.dimension(3), 1);\n  VERIFY_IS_EQUAL(single_pixel_patch_row_major.dimension(4), 2);\n\n  for (int i = 0; i < tensor.size(); ++i) {\n    // ColMajor\n    if (tensor.data()[i] != single_pixel_patch.data()[i]) {\n      std::cout << \"Mismatch detected at index \" << i << \" : \"\n           << tensor.data()[i] << \" vs \" << single_pixel_patch.data()[i]\n           << std::endl;\n    }\n    VERIFY_IS_EQUAL(single_pixel_patch.data()[i], tensor.data()[i]);\n    // RowMajor\n    if (tensor_row_major.data()[i] != single_pixel_patch_row_major.data()[i]) {\n      std::cout << \"Mismatch detected at index \" << i << \" : \"\n           << tensor.data()[i] << \" vs \"\n           << single_pixel_patch_row_major.data()[i] << std::endl;\n    }\n    VERIFY_IS_EQUAL(single_pixel_patch_row_major.data()[i],\n                    tensor_row_major.data()[i]);\n    VERIFY_IS_EQUAL(tensor.data()[i], tensor_row_major.data()[i]);\n    VERIFY_IS_EQUAL(single_pixel_patch.data()[i],\n                    single_pixel_patch_row_major.data()[i]);\n  }\n\n  // Entire image patch: ColMajor\n  Tensor<float, 5> entire_image_patch;\n  entire_image_patch = tensor.extract_image_patches(3, 5);\n  VERIFY_IS_EQUAL(entire_image_patch.dimension(0), 2);\n  VERIFY_IS_EQUAL(entire_image_patch.dimension(1), 3);\n  VERIFY_IS_EQUAL(entire_image_patch.dimension(2), 5);\n  VERIFY_IS_EQUAL(entire_image_patch.dimension(3), 3*5);\n  VERIFY_IS_EQUAL(entire_image_patch.dimension(4), 7);\n\n  // Entire image patch: RowMajor\n  Tensor<float, 5, RowMajor> entire_image_patch_row_major;\n  entire_image_patch_row_major = tensor_row_major.extract_image_patches(3, 5);\n  VERIFY_IS_EQUAL(entire_image_patch_row_major.dimension(0), 7);\n  VERIFY_IS_EQUAL(entire_image_patch_row_major.dimension(1), 3*5);\n  VERIFY_IS_EQUAL(entire_image_patch_row_major.dimension(2), 5);\n  VERIFY_IS_EQUAL(entire_image_patch_row_major.dimension(3), 3);\n  VERIFY_IS_EQUAL(entire_image_patch_row_major.dimension(4), 2);\n\n  for (int i = 0; i < 3; ++i) {\n    for (int j = 0; j < 5; ++j) {\n      int patchId = i+3*j;\n      for (int r = 0; r < 3; ++r) {\n        for (int c = 0; c < 5; ++c) {\n          for (int d = 0; d < 2; ++d) {\n            for (int b = 0; b < 7; ++b) {\n              float expected = 0.0f;\n              float expected_row_major = 0.0f;\n              if (r-1+i >= 0 && c-2+j >= 0 && r-1+i < 3 && c-2+j < 5) {\n                expected = tensor(d, r-1+i, c-2+j, b);\n                expected_row_major = tensor_row_major(b, c-2+j, r-1+i, d);\n              }\n              // ColMajor\n              if (entire_image_patch(d, r, c, patchId, b) != expected) {\n                std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << \" b=\" << b << std::endl;\n              }\n              VERIFY_IS_EQUAL(entire_image_patch(d, r, c, patchId, b), expected);\n              // RowMajor\n              if (entire_image_patch_row_major(b, patchId, c, r, d) !=\n                  expected_row_major) {\n                std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j\n                     << \" r=\" << r << \" c=\" << c << \" d=\" << d << \" b=\" << b\n                     << std::endl;\n              }\n              VERIFY_IS_EQUAL(entire_image_patch_row_major(b, patchId, c, r, d),\n                              expected_row_major);\n              // Check that ColMajor and RowMajor agree.\n              VERIFY_IS_EQUAL(expected, expected_row_major);\n            }\n          }\n        }\n      }\n    }\n  }\n\n  // 2D patch: ColMajor\n  Tensor<float, 5> twod_patch;\n  twod_patch = tensor.extract_image_patches(2, 2);\n  VERIFY_IS_EQUAL(twod_patch.dimension(0), 2);\n  VERIFY_IS_EQUAL(twod_patch.dimension(1), 2);\n  VERIFY_IS_EQUAL(twod_patch.dimension(2), 2);\n  VERIFY_IS_EQUAL(twod_patch.dimension(3), 3*5);\n  VERIFY_IS_EQUAL(twod_patch.dimension(4), 7);\n\n  // 2D patch: RowMajor\n  Tensor<float, 5, RowMajor> twod_patch_row_major;\n  twod_patch_row_major = tensor_row_major.extract_image_patches(2, 2);\n  VERIFY_IS_EQUAL(twod_patch_row_major.dimension(0), 7);\n  VERIFY_IS_EQUAL(twod_patch_row_major.dimension(1), 3*5);\n  VERIFY_IS_EQUAL(twod_patch_row_major.dimension(2), 2);\n  VERIFY_IS_EQUAL(twod_patch_row_major.dimension(3), 2);\n  VERIFY_IS_EQUAL(twod_patch_row_major.dimension(4), 2);\n\n\n  // Based on the calculation described in TensorTraits.h, padding happens to be 0.\n  int row_padding = 0;\n  int col_padding = 0;\n  int stride = 1;\n\n  for (int i = 0; i < 3; ++i) {\n    for (int j = 0; j < 5; ++j) {\n      int patchId = i+3*j;\n      for (int r = 0; r < 2; ++r) {\n        for (int c = 0; c < 2; ++c) {\n          for (int d = 0; d < 2; ++d) {\n            for (int b = 0; b < 7; ++b) {\n              float expected = 0.0f;\n              float expected_row_major = 0.0f;\n              int row_offset = r*stride + i - row_padding;\n              int col_offset = c*stride + j - col_padding;\n              // ColMajor\n              if (row_offset >= 0 && col_offset >= 0 && row_offset < tensor.dimension(1) && col_offset < tensor.dimension(2)) {\n                expected = tensor(d, row_offset, col_offset, b);\n              }\n              if (twod_patch(d, r, c, patchId, b) != expected) {\n                std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << \" b=\" << b << std::endl;\n              }\n              VERIFY_IS_EQUAL(twod_patch(d, r, c, patchId, b), expected);\n\n              // RowMajor\n              if (row_offset >= 0 && col_offset >= 0 && row_offset < tensor_row_major.dimension(2) && col_offset < tensor_row_major.dimension(1)) {\n                expected_row_major = tensor_row_major(b, col_offset, row_offset, d);\n\n              }\n              if (twod_patch_row_major(b, patchId, c, r, d) != expected_row_major) {\n                std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << \" b=\" << b << std::endl;\n              }\n              VERIFY_IS_EQUAL(twod_patch_row_major(b, patchId, c, r, d), expected_row_major);\n              // Check that ColMajor and RowMajor agree.\n              VERIFY_IS_EQUAL(expected, expected_row_major);\n            }\n          }\n        }\n      }\n    }\n  }\n}\n\n// Verifies VALID padding (no padding) with incrementing values.\nvoid test_patch_padding_valid()\n{\n  int input_depth = 3;\n  int input_rows = 3;\n  int input_cols = 3;\n  int input_batches = 1;\n  int ksize = 2;  // Corresponds to the Rows and Cols for tensor.extract_image_patches<>.\n  int stride = 2;  // Only same stride is supported.\n  Tensor<float, 4> tensor(input_depth, input_rows, input_cols, input_batches);\n  // Initializes tensor with incrementing numbers.\n  for (int i = 0; i < tensor.size(); ++i) {\n    tensor.data()[i] = i + 1;\n  }\n  // ColMajor\n  Tensor<float, 5> result = tensor.extract_image_patches(ksize, ksize, stride, stride, 1, 1, PADDING_VALID);\n\n  VERIFY_IS_EQUAL(result.dimension(0), input_depth);  // depth\n  VERIFY_IS_EQUAL(result.dimension(1), ksize);  // kernel rows\n  VERIFY_IS_EQUAL(result.dimension(2), ksize);  // kernel cols\n  VERIFY_IS_EQUAL(result.dimension(3), 1);  // number of patches\n  VERIFY_IS_EQUAL(result.dimension(4), input_batches);  // number of batches\n\n  // RowMajor\n  Tensor<float, 4, RowMajor> tensor_row_major = tensor.swap_layout();\n  VERIFY_IS_EQUAL(tensor.dimension(0), tensor_row_major.dimension(3));\n  VERIFY_IS_EQUAL(tensor.dimension(1), tensor_row_major.dimension(2));\n  VERIFY_IS_EQUAL(tensor.dimension(2), tensor_row_major.dimension(1));\n  VERIFY_IS_EQUAL(tensor.dimension(3), tensor_row_major.dimension(0));\n\n  Tensor<float, 5, RowMajor> result_row_major = tensor_row_major.extract_image_patches(ksize, ksize, stride, stride, 1, 1, PADDING_VALID);\n  VERIFY_IS_EQUAL(result.dimension(0), result_row_major.dimension(4));\n  VERIFY_IS_EQUAL(result.dimension(1), result_row_major.dimension(3));\n  VERIFY_IS_EQUAL(result.dimension(2), result_row_major.dimension(2));\n  VERIFY_IS_EQUAL(result.dimension(3), result_row_major.dimension(1));\n  VERIFY_IS_EQUAL(result.dimension(4), result_row_major.dimension(0));\n\n  // No padding is carried out.\n  int row_padding = 0;\n  int col_padding = 0;\n\n  for (int i = 0; (i+stride+ksize-1) < input_rows; i += stride) {  // input rows\n    for (int j = 0; (j+stride+ksize-1) < input_cols; j += stride) {  // input cols\n      int patchId = i+input_rows*j;\n      for (int r = 0; r < ksize; ++r) {  // patch rows\n        for (int c = 0; c < ksize; ++c) {  // patch cols\n          for (int d = 0; d < input_depth; ++d) {  // depth\n            for (int b = 0; b < input_batches; ++b) {  // batch\n              float expected = 0.0f;\n              float expected_row_major = 0.0f;\n              int row_offset = r + i - row_padding;\n              int col_offset = c + j - col_padding;\n              if (row_offset >= 0 && col_offset >= 0 && row_offset < input_rows && col_offset < input_cols) {\n                expected = tensor(d, row_offset, col_offset, b);\n                expected_row_major = tensor_row_major(b, col_offset, row_offset, d);\n              }\n              // ColMajor\n              if (result(d, r, c, patchId, b) != expected) {\n                std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << \" b=\" << b << std::endl;\n              }\n              VERIFY_IS_EQUAL(result(d, r, c, patchId, b), expected);\n              // RowMajor\n              if (result_row_major(b, patchId, c, r, d) != expected_row_major) {\n                std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << \" b=\" << b << std::endl;\n              }\n              VERIFY_IS_EQUAL(result_row_major(b, patchId, c, r, d), expected_row_major);\n              // Check that ColMajor and RowMajor agree.\n              VERIFY_IS_EQUAL(expected, expected_row_major);\n            }\n          }\n        }\n      }\n    }\n  }\n}\n\n// Verifies VALID padding (no padding) with the same value.\nvoid test_patch_padding_valid_same_value()\n{\n  int input_depth = 1;\n  int input_rows = 5;\n  int input_cols = 5;\n  int input_batches = 2;\n  int ksize = 3;  // Corresponds to the Rows and Cols for tensor.extract_image_patches<>.\n  int stride = 2;  // Only same stride is supported.\n  // ColMajor\n  Tensor<float, 4> tensor(input_depth, input_rows, input_cols, input_batches);\n  tensor = tensor.constant(11.0f);\n  Tensor<float, 5> result = tensor.extract_image_patches(ksize, ksize, stride, stride, 1, 1, PADDING_VALID);\n\n  VERIFY_IS_EQUAL(result.dimension(0), input_depth);  // depth\n  VERIFY_IS_EQUAL(result.dimension(1), ksize);  // kernel rows\n  VERIFY_IS_EQUAL(result.dimension(2), ksize);  // kernel cols\n  VERIFY_IS_EQUAL(result.dimension(3), 4);  // number of patches\n  VERIFY_IS_EQUAL(result.dimension(4), input_batches);  // number of batches\n\n  // RowMajor\n  Tensor<float, 4, RowMajor> tensor_row_major = tensor.swap_layout();\n  VERIFY_IS_EQUAL(tensor.dimension(0), tensor_row_major.dimension(3));\n  VERIFY_IS_EQUAL(tensor.dimension(1), tensor_row_major.dimension(2));\n  VERIFY_IS_EQUAL(tensor.dimension(2), tensor_row_major.dimension(1));\n  VERIFY_IS_EQUAL(tensor.dimension(3), tensor_row_major.dimension(0));\n\n  Tensor<float, 5, RowMajor> result_row_major = tensor_row_major.extract_image_patches(ksize, ksize, stride, stride, 1, 1, PADDING_VALID);\n  VERIFY_IS_EQUAL(result.dimension(0), result_row_major.dimension(4));\n  VERIFY_IS_EQUAL(result.dimension(1), result_row_major.dimension(3));\n  VERIFY_IS_EQUAL(result.dimension(2), result_row_major.dimension(2));\n  VERIFY_IS_EQUAL(result.dimension(3), result_row_major.dimension(1));\n  VERIFY_IS_EQUAL(result.dimension(4), result_row_major.dimension(0));\n\n  // No padding is carried out.\n  int row_padding = 0;\n  int col_padding = 0;\n\n  for (int i = 0; (i+stride+ksize-1) <= input_rows; i += stride) {  // input rows\n    for (int j = 0; (j+stride+ksize-1) <= input_cols; j += stride) {  // input cols\n      int patchId = i+input_rows*j;\n      for (int r = 0; r < ksize; ++r) {  // patch rows\n        for (int c = 0; c < ksize; ++c) {  // patch cols\n          for (int d = 0; d < input_depth; ++d) {  // depth\n            for (int b = 0; b < input_batches; ++b) {  // batch\n              float expected = 0.0f;\n              float expected_row_major = 0.0f;\n              int row_offset = r + i - row_padding;\n              int col_offset = c + j - col_padding;\n              if (row_offset >= 0 && col_offset >= 0 && row_offset < input_rows && col_offset < input_cols) {\n                expected = tensor(d, row_offset, col_offset, b);\n                expected_row_major = tensor_row_major(b, col_offset, row_offset, d);\n              }\n              // ColMajor\n              if (result(d, r, c, patchId, b) != expected) {\n                std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << \" b=\" << b << std::endl;\n              }\n              VERIFY_IS_EQUAL(result(d, r, c, patchId, b), expected);\n              // RowMajor\n              if (result_row_major(b, patchId, c, r, d) != expected_row_major) {\n                std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << \" b=\" << b << std::endl;\n              }\n              VERIFY_IS_EQUAL(result_row_major(b, patchId, c, r, d), expected_row_major);\n              // Check that ColMajor and RowMajor agree.\n              VERIFY_IS_EQUAL(expected, expected_row_major);\n            }\n          }\n        }\n      }\n    }\n  }\n}\n\n// Verifies SAME padding.\nvoid test_patch_padding_same()\n{\n  int input_depth = 3;\n  int input_rows = 4;\n  int input_cols = 2;\n  int input_batches = 1;\n  int ksize = 2;  // Corresponds to the Rows and Cols for tensor.extract_image_patches<>.\n  int stride = 2;  // Only same stride is supported.\n  // ColMajor\n  Tensor<float, 4> tensor(input_depth, input_rows, input_cols, input_batches);\n  // Initializes tensor with incrementing numbers.\n  for (int i = 0; i < tensor.size(); ++i) {\n    tensor.data()[i] = i + 1;\n  }\n  Tensor<float, 5> result = tensor.extract_image_patches(ksize, ksize, stride, stride, PADDING_SAME);\n\n  VERIFY_IS_EQUAL(result.dimension(0), input_depth);  // depth\n  VERIFY_IS_EQUAL(result.dimension(1), ksize);  // kernel rows\n  VERIFY_IS_EQUAL(result.dimension(2), ksize);  // kernel cols\n  VERIFY_IS_EQUAL(result.dimension(3), 2);  // number of patches\n  VERIFY_IS_EQUAL(result.dimension(4), input_batches);  // number of batches\n\n  // RowMajor\n  Tensor<float, 4, RowMajor> tensor_row_major = tensor.swap_layout();\n  VERIFY_IS_EQUAL(tensor.dimension(0), tensor_row_major.dimension(3));\n  VERIFY_IS_EQUAL(tensor.dimension(1), tensor_row_major.dimension(2));\n  VERIFY_IS_EQUAL(tensor.dimension(2), tensor_row_major.dimension(1));\n  VERIFY_IS_EQUAL(tensor.dimension(3), tensor_row_major.dimension(0));\n\n  Tensor<float, 5, RowMajor> result_row_major = tensor_row_major.extract_image_patches(ksize, ksize, stride, stride, PADDING_SAME);\n  VERIFY_IS_EQUAL(result.dimension(0), result_row_major.dimension(4));\n  VERIFY_IS_EQUAL(result.dimension(1), result_row_major.dimension(3));\n  VERIFY_IS_EQUAL(result.dimension(2), result_row_major.dimension(2));\n  VERIFY_IS_EQUAL(result.dimension(3), result_row_major.dimension(1));\n  VERIFY_IS_EQUAL(result.dimension(4), result_row_major.dimension(0));\n\n  // Based on the calculation described in TensorTraits.h, padding happens to be\n  // 0.\n  int row_padding = 0;\n  int col_padding = 0;\n\n  for (int i = 0; (i+stride+ksize-1) <= input_rows; i += stride) {  // input rows\n    for (int j = 0; (j+stride+ksize-1) <= input_cols; j += stride) {  // input cols\n      int patchId = i+input_rows*j;\n      for (int r = 0; r < ksize; ++r) {  // patch rows\n        for (int c = 0; c < ksize; ++c) {  // patch cols\n          for (int d = 0; d < input_depth; ++d) {  // depth\n            for (int b = 0; b < input_batches; ++b) {  // batch\n              float expected = 0.0f;\n              float expected_row_major = 0.0f;\n              int row_offset = r*stride + i - row_padding;\n              int col_offset = c*stride + j - col_padding;\n              if (row_offset >= 0 && col_offset >= 0 && row_offset < input_rows && col_offset < input_cols) {\n                expected = tensor(d, row_offset, col_offset, b);\n                expected_row_major = tensor_row_major(b, col_offset, row_offset, d);\n              }\n              // ColMajor\n              if (result(d, r, c, patchId, b) != expected) {\n                std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << \" b=\" << b << std::endl;\n              }\n              VERIFY_IS_EQUAL(result(d, r, c, patchId, b), expected);\n              // RowMajor\n              if (result_row_major(b, patchId, c, r, d) != expected_row_major) {\n                std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << \" b=\" << b << std::endl;\n              }\n              VERIFY_IS_EQUAL(result_row_major(b, patchId, c, r, d), expected_row_major);\n              // Check that ColMajor and RowMajor agree.\n              VERIFY_IS_EQUAL(expected, expected_row_major);\n            }\n          }\n        }\n      }\n    }\n  }\n}\n\n// Verifies that SAME padding, when computed as negative values, will be clipped\n// to zero.\nvoid test_patch_padding_same_negative_padding_clip_to_zero() {\n  int input_depth = 1;\n  int input_rows = 15;\n  int input_cols = 1;\n  int input_batches = 1;\n  int ksize = 1;  // Corresponds to the Rows and Cols for\n                  // tensor.extract_image_patches<>.\n  int row_stride = 5;\n  int col_stride = 1;\n  // ColMajor\n  Tensor<float, 4> tensor(input_depth, input_rows, input_cols, input_batches);\n  // Initializes tensor with incrementing numbers.\n  for (int i = 0; i < tensor.size(); ++i) {\n    tensor.data()[i] = i + 1;\n  }\n  Tensor<float, 5> result = tensor.extract_image_patches(\n      ksize, ksize, row_stride, col_stride, 1, 1, PADDING_SAME);\n  // row padding will be computed as -2 originally and then be clipped to 0.\n  VERIFY_IS_EQUAL(result.coeff(0), 1.0f);\n  VERIFY_IS_EQUAL(result.coeff(1), 6.0f);\n  VERIFY_IS_EQUAL(result.coeff(2), 11.0f);\n\n  VERIFY_IS_EQUAL(result.dimension(0), input_depth);    // depth\n  VERIFY_IS_EQUAL(result.dimension(1), ksize);          // kernel rows\n  VERIFY_IS_EQUAL(result.dimension(2), ksize);          // kernel cols\n  VERIFY_IS_EQUAL(result.dimension(3), 3);              // number of patches\n  VERIFY_IS_EQUAL(result.dimension(4), input_batches);  // number of batches\n\n  // RowMajor\n  Tensor<float, 4, RowMajor> tensor_row_major = tensor.swap_layout();\n  VERIFY_IS_EQUAL(tensor.dimension(0), tensor_row_major.dimension(3));\n  VERIFY_IS_EQUAL(tensor.dimension(1), tensor_row_major.dimension(2));\n  VERIFY_IS_EQUAL(tensor.dimension(2), tensor_row_major.dimension(1));\n  VERIFY_IS_EQUAL(tensor.dimension(3), tensor_row_major.dimension(0));\n\n  Tensor<float, 5, RowMajor> result_row_major =\n      tensor_row_major.extract_image_patches(ksize, ksize, row_stride,\n                                             col_stride, 1, 1, PADDING_SAME);\n  VERIFY_IS_EQUAL(result_row_major.coeff(0), 1.0f);\n  VERIFY_IS_EQUAL(result_row_major.coeff(1), 6.0f);\n  VERIFY_IS_EQUAL(result_row_major.coeff(2), 11.0f);\n\n  VERIFY_IS_EQUAL(result.dimension(0), result_row_major.dimension(4));\n  VERIFY_IS_EQUAL(result.dimension(1), result_row_major.dimension(3));\n  VERIFY_IS_EQUAL(result.dimension(2), result_row_major.dimension(2));\n  VERIFY_IS_EQUAL(result.dimension(3), result_row_major.dimension(1));\n  VERIFY_IS_EQUAL(result.dimension(4), result_row_major.dimension(0));\n}\n\nvoid test_patch_no_extra_dim()\n{\n  Tensor<float, 3> tensor(2,3,5);\n  tensor.setRandom();\n  Tensor<float, 3, RowMajor> tensor_row_major = tensor.swap_layout();\n  VERIFY_IS_EQUAL(tensor.dimension(0), tensor_row_major.dimension(2));\n  VERIFY_IS_EQUAL(tensor.dimension(1), tensor_row_major.dimension(1));\n  VERIFY_IS_EQUAL(tensor.dimension(2), tensor_row_major.dimension(0));\n\n  // Single pixel patch: ColMajor\n  Tensor<float, 4> single_pixel_patch;\n  single_pixel_patch = tensor.extract_image_patches(1, 1);\n  VERIFY_IS_EQUAL(single_pixel_patch.dimension(0), 2);\n  VERIFY_IS_EQUAL(single_pixel_patch.dimension(1), 1);\n  VERIFY_IS_EQUAL(single_pixel_patch.dimension(2), 1);\n  VERIFY_IS_EQUAL(single_pixel_patch.dimension(3), 3*5);\n\n  // Single pixel patch: RowMajor\n  Tensor<float, 4, RowMajor> single_pixel_patch_row_major;\n  single_pixel_patch_row_major = tensor_row_major.extract_image_patches(1, 1);\n  VERIFY_IS_EQUAL(single_pixel_patch_row_major.dimension(0), 3*5);\n  VERIFY_IS_EQUAL(single_pixel_patch_row_major.dimension(1), 1);\n  VERIFY_IS_EQUAL(single_pixel_patch_row_major.dimension(2), 1);\n  VERIFY_IS_EQUAL(single_pixel_patch_row_major.dimension(3), 2);\n\n  for (int i = 0; i < tensor.size(); ++i) {\n    // ColMajor\n    if (tensor.data()[i] != single_pixel_patch.data()[i]) {\n      std::cout << \"Mismatch detected at index \" << i << \" : \" << tensor.data()[i] << \" vs \" << single_pixel_patch.data()[i] << std::endl;\n    }\n    VERIFY_IS_EQUAL(single_pixel_patch.data()[i], tensor.data()[i]);\n    // RowMajor\n    if (tensor_row_major.data()[i] != single_pixel_patch_row_major.data()[i]) {\n      std::cout << \"Mismatch detected at index \" << i << \" : \"\n           << tensor.data()[i] << \" vs \"\n           << single_pixel_patch_row_major.data()[i] << std::endl;\n    }\n    VERIFY_IS_EQUAL(single_pixel_patch_row_major.data()[i],\n                    tensor_row_major.data()[i]);\n    VERIFY_IS_EQUAL(tensor.data()[i], tensor_row_major.data()[i]);\n    VERIFY_IS_EQUAL(single_pixel_patch.data()[i],\n                    single_pixel_patch_row_major.data()[i]);\n  }\n\n  // Entire image patch: ColMajor\n  Tensor<float, 4> entire_image_patch;\n  entire_image_patch = tensor.extract_image_patches(3, 5);\n  VERIFY_IS_EQUAL(entire_image_patch.dimension(0), 2);\n  VERIFY_IS_EQUAL(entire_image_patch.dimension(1), 3);\n  VERIFY_IS_EQUAL(entire_image_patch.dimension(2), 5);\n  VERIFY_IS_EQUAL(entire_image_patch.dimension(3), 3*5);\n\n  // Entire image patch: RowMajor\n  Tensor<float, 4, RowMajor> entire_image_patch_row_major;\n  entire_image_patch_row_major = tensor_row_major.extract_image_patches(3, 5);\n  VERIFY_IS_EQUAL(entire_image_patch_row_major.dimension(0), 3*5);\n  VERIFY_IS_EQUAL(entire_image_patch_row_major.dimension(1), 5);\n  VERIFY_IS_EQUAL(entire_image_patch_row_major.dimension(2), 3);\n  VERIFY_IS_EQUAL(entire_image_patch_row_major.dimension(3), 2);\n\n  for (int i = 0; i < 3; ++i) {\n    for (int j = 0; j < 5; ++j) {\n      int patchId = i+3*j;\n      for (int r = 0; r < 3; ++r) {\n        for (int c = 0; c < 5; ++c) {\n          for (int d = 0; d < 2; ++d) {\n            float expected = 0.0f;\n            float expected_row_major = 0.0f;\n            if (r-1+i >= 0 && c-2+j >= 0 && r-1+i < 3 && c-2+j < 5) {\n              expected = tensor(d, r-1+i, c-2+j);\n              expected_row_major = tensor_row_major(c-2+j, r-1+i, d);\n            }\n            // ColMajor\n            if (entire_image_patch(d, r, c, patchId) != expected) {\n              std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << std::endl;\n            }\n            VERIFY_IS_EQUAL(entire_image_patch(d, r, c, patchId), expected);\n            // RowMajor\n            if (entire_image_patch_row_major(patchId, c, r, d) !=\n                expected_row_major) {\n              std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << std::endl;\n            }\n            VERIFY_IS_EQUAL(entire_image_patch_row_major(patchId, c, r, d),\n                            expected_row_major);\n            // Check that ColMajor and RowMajor agree.\n            VERIFY_IS_EQUAL(expected, expected_row_major);\n          }\n        }\n      }\n    }\n  }\n\n  // 2D patch: ColMajor\n  Tensor<float, 4> twod_patch;\n  twod_patch = tensor.extract_image_patches(2, 2);\n  VERIFY_IS_EQUAL(twod_patch.dimension(0), 2);\n  VERIFY_IS_EQUAL(twod_patch.dimension(1), 2);\n  VERIFY_IS_EQUAL(twod_patch.dimension(2), 2);\n  VERIFY_IS_EQUAL(twod_patch.dimension(3), 3*5);\n\n  // 2D patch: RowMajor\n  Tensor<float, 4, RowMajor> twod_patch_row_major;\n  twod_patch_row_major = tensor_row_major.extract_image_patches(2, 2);\n  VERIFY_IS_EQUAL(twod_patch_row_major.dimension(0), 3*5);\n  VERIFY_IS_EQUAL(twod_patch_row_major.dimension(1), 2);\n  VERIFY_IS_EQUAL(twod_patch_row_major.dimension(2), 2);\n  VERIFY_IS_EQUAL(twod_patch_row_major.dimension(3), 2);\n\n  // Based on the calculation described in TensorTraits.h, padding happens to be 0.\n  int row_padding = 0;\n  int col_padding = 0;\n  int stride = 1;\n\n  for (int i = 0; i < 3; ++i) {\n    for (int j = 0; j < 5; ++j) {\n      int patchId = i+3*j;\n      for (int r = 0; r < 2; ++r) {\n        for (int c = 0; c < 2; ++c) {\n          for (int d = 0; d < 2; ++d) {\n            float expected = 0.0f;\n            float expected_row_major = 0.0f;\n            int row_offset = r*stride + i - row_padding;\n            int col_offset = c*stride + j - col_padding;\n            // ColMajor\n            if (row_offset >= 0 && col_offset >= 0 && row_offset < tensor.dimension(1) && col_offset < tensor.dimension(2)) {\n              expected = tensor(d, row_offset, col_offset);\n            }\n            if (twod_patch(d, r, c, patchId) != expected) {\n              std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << std::endl;\n            }\n            VERIFY_IS_EQUAL(twod_patch(d, r, c, patchId), expected);\n            // RowMajor\n            if (row_offset >= 0 && col_offset >= 0 && row_offset < tensor_row_major.dimension(1) && col_offset < tensor_row_major.dimension(0)) {\n              expected_row_major = tensor_row_major(col_offset, row_offset, d);\n            }\n            if (twod_patch_row_major(patchId, c, r, d) != expected_row_major) {\n              std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << std::endl;\n            }\n            VERIFY_IS_EQUAL(twod_patch_row_major(patchId, c, r, d), expected_row_major);\n            // Check that ColMajor and RowMajor agree.\n            VERIFY_IS_EQUAL(expected, expected_row_major);\n          }\n        }\n      }\n    }\n  }\n}\n\nvoid test_imagenet_patches()\n{\n  // Test the code on typical configurations used by the 'imagenet' benchmarks at\n  // https://github.com/soumith/convnet-benchmarks\n  // ColMajor\n  Tensor<float, 4> l_in(3, 128, 128, 16);\n  l_in.setRandom();\n  Tensor<float, 5> l_out = l_in.extract_image_patches(11, 11);\n  VERIFY_IS_EQUAL(l_out.dimension(0), 3);\n  VERIFY_IS_EQUAL(l_out.dimension(1), 11);\n  VERIFY_IS_EQUAL(l_out.dimension(2), 11);\n  VERIFY_IS_EQUAL(l_out.dimension(3), 128*128);\n  VERIFY_IS_EQUAL(l_out.dimension(4), 16);\n\n  // RowMajor\n  Tensor<float, 5, RowMajor> l_out_row_major = l_in.swap_layout().extract_image_patches(11, 11);\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(0), 16);\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(1), 128*128);\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(2), 11);\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(3), 11);\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(4), 3);\n\n  for (int b = 0; b < 16; ++b) {\n    for (int i = 0; i < 128; ++i) {\n      for (int j = 0; j < 128; ++j) {\n        int patchId = i+128*j;\n        for (int c = 0; c < 11; ++c) {\n          for (int r = 0; r < 11; ++r) {\n            for (int d = 0; d < 3; ++d) {\n              float expected = 0.0f;\n              if (r-5+i >= 0 && c-5+j >= 0 && r-5+i < 128 && c-5+j < 128) {\n                expected = l_in(d, r-5+i, c-5+j, b);\n              }\n              // ColMajor\n              if (l_out(d, r, c, patchId, b) != expected) {\n                std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << \" b=\" << b << std::endl;\n              }\n              VERIFY_IS_EQUAL(l_out(d, r, c, patchId, b), expected);\n              // RowMajor\n              if (l_out_row_major(b, patchId, c, r, d) !=\n                  expected) {\n                std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j\n                     << \" r=\" << r << \" c=\" << c << \" d=\" << d << \" b=\" << b\n                     << std::endl;\n              }\n              VERIFY_IS_EQUAL(l_out_row_major(b, patchId, c, r, d),\n                              expected);\n            }\n          }\n        }\n      }\n    }\n  }\n\n  // ColMajor\n  l_in.resize(16, 64, 64, 32);\n  l_in.setRandom();\n  l_out = l_in.extract_image_patches(9, 9);\n  VERIFY_IS_EQUAL(l_out.dimension(0), 16);\n  VERIFY_IS_EQUAL(l_out.dimension(1), 9);\n  VERIFY_IS_EQUAL(l_out.dimension(2), 9);\n  VERIFY_IS_EQUAL(l_out.dimension(3), 64*64);\n  VERIFY_IS_EQUAL(l_out.dimension(4), 32);\n\n  // RowMajor\n  l_out_row_major = l_in.swap_layout().extract_image_patches(9, 9);\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(0), 32);\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(1), 64*64);\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(2), 9);\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(3), 9);\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(4), 16);\n\n  for (int b = 0; b < 32; ++b) {\n    for (int i = 0; i < 64; ++i) {\n      for (int j = 0; j < 64; ++j) {\n        int patchId = i+64*j;\n        for (int c = 0; c < 9; ++c) {\n          for (int r = 0; r < 9; ++r) {\n            for (int d = 0; d < 16; ++d) {\n              float expected = 0.0f;\n              if (r-4+i >= 0 && c-4+j >= 0 && r-4+i < 64 && c-4+j < 64) {\n                expected = l_in(d, r-4+i, c-4+j, b);\n              }\n              // ColMajor\n              if (l_out(d, r, c, patchId, b) != expected) {\n                std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << \" b=\" << b << std::endl;\n              }\n              VERIFY_IS_EQUAL(l_out(d, r, c, patchId, b), expected);\n              // RowMajor\n              if (l_out_row_major(b, patchId, c, r, d) != expected) {\n                std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << \" b=\" << b << std::endl;\n              }\n              VERIFY_IS_EQUAL(l_out_row_major(b, patchId, c, r, d), expected);\n            }\n          }\n        }\n      }\n    }\n  }\n\n  // ColMajor\n  l_in.resize(32, 16, 16, 32);\n  l_in.setRandom();\n  l_out = l_in.extract_image_patches(7, 7);\n  VERIFY_IS_EQUAL(l_out.dimension(0), 32);\n  VERIFY_IS_EQUAL(l_out.dimension(1), 7);\n  VERIFY_IS_EQUAL(l_out.dimension(2), 7);\n  VERIFY_IS_EQUAL(l_out.dimension(3), 16*16);\n  VERIFY_IS_EQUAL(l_out.dimension(4), 32);\n\n  // RowMajor\n  l_out_row_major = l_in.swap_layout().extract_image_patches(7, 7);\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(0), 32);\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(1), 16*16);\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(2), 7);\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(3), 7);\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(4), 32);\n\n  for (int b = 0; b < 32; ++b) {\n    for (int i = 0; i < 16; ++i) {\n      for (int j = 0; j < 16; ++j) {\n        int patchId = i+16*j;\n        for (int c = 0; c < 7; ++c) {\n          for (int r = 0; r < 7; ++r) {\n            for (int d = 0; d < 32; ++d) {\n              float expected = 0.0f;\n              if (r-3+i >= 0 && c-3+j >= 0 && r-3+i < 16 && c-3+j < 16) {\n                expected = l_in(d, r-3+i, c-3+j, b);\n              }\n              // ColMajor\n              if (l_out(d, r, c, patchId, b) != expected) {\n                std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << \" b=\" << b << std::endl;\n              }\n              VERIFY_IS_EQUAL(l_out(d, r, c, patchId, b), expected);\n              // RowMajor\n              if (l_out_row_major(b, patchId, c, r, d) != expected) {\n                std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << \" b=\" << b << std::endl;\n              }\n              VERIFY_IS_EQUAL(l_out_row_major(b, patchId, c, r, d), expected);\n            }\n          }\n        }\n      }\n    }\n  }\n\n  // ColMajor\n  l_in.resize(64, 13, 13, 32);\n  l_in.setRandom();\n  l_out = l_in.extract_image_patches(3, 3);\n  VERIFY_IS_EQUAL(l_out.dimension(0), 64);\n  VERIFY_IS_EQUAL(l_out.dimension(1), 3);\n  VERIFY_IS_EQUAL(l_out.dimension(2), 3);\n  VERIFY_IS_EQUAL(l_out.dimension(3), 13*13);\n  VERIFY_IS_EQUAL(l_out.dimension(4), 32);\n\n  // RowMajor\n  l_out_row_major = l_in.swap_layout().extract_image_patches(3, 3);\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(0), 32);\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(1), 13*13);\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(2), 3);\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(3), 3);\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(4), 64);\n\n  for (int b = 0; b < 32; ++b) {\n    for (int i = 0; i < 13; ++i) {\n      for (int j = 0; j < 13; ++j) {\n        int patchId = i+13*j;\n        for (int c = 0; c < 3; ++c) {\n          for (int r = 0; r < 3; ++r) {\n            for (int d = 0; d < 64; ++d) {\n              float expected = 0.0f;\n              if (r-1+i >= 0 && c-1+j >= 0 && r-1+i < 13 && c-1+j < 13) {\n                expected = l_in(d, r-1+i, c-1+j, b);\n              }\n              // ColMajor\n              if (l_out(d, r, c, patchId, b) != expected) {\n                std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << \" b=\" << b << std::endl;\n              }\n              VERIFY_IS_EQUAL(l_out(d, r, c, patchId, b), expected);\n              // RowMajor\n              if (l_out_row_major(b, patchId, c, r, d) != expected) {\n                std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << \" b=\" << b << std::endl;\n              }\n              VERIFY_IS_EQUAL(l_out_row_major(b, patchId, c, r, d), expected);\n            }\n          }\n        }\n      }\n    }\n  }\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_image_patch)\n{\n  CALL_SUBTEST_1(test_simple_patch());\n  CALL_SUBTEST_2(test_patch_no_extra_dim());\n  CALL_SUBTEST_3(test_patch_padding_valid());\n  CALL_SUBTEST_4(test_patch_padding_valid_same_value());\n  CALL_SUBTEST_5(test_patch_padding_same());\n  CALL_SUBTEST_6(test_imagenet_patches());\n  CALL_SUBTEST_7(test_patch_padding_same_negative_padding_clip_to_zero());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_image_patch_sycl.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016\n// Mehdi Goli    Codeplay Software Ltd.\n// Ralph Potter  Codeplay Software Ltd.\n// Luke Iwanski  Codeplay Software Ltd.\n// Contact: <eigen@codeplay.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_TEST_NO_LONGDOUBLE\n#define EIGEN_TEST_NO_COMPLEX\n\n#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int64_t\n#define EIGEN_USE_SYCL\n\n#include \"main.h\"\n#include <unsupported/Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\nstatic const int DataLayout = ColMajor;\n\ntemplate <typename DataType, typename IndexType>\nstatic void test_simple_image_patch_sycl(const Eigen::SyclDevice& sycl_device)\n{\n  IndexType sizeDim1 = 2;\n  IndexType sizeDim2 = 3;\n  IndexType sizeDim3 = 5;\n  IndexType sizeDim4 = 7;\n  array<IndexType, 4> tensorColMajorRange = {{sizeDim1, sizeDim2, sizeDim3, sizeDim4}};\n  array<IndexType, 4> tensorRowMajorRange = {{sizeDim4, sizeDim3, sizeDim2, sizeDim1}};\n  Tensor<DataType, 4, DataLayout,IndexType> tensor_col_major(tensorColMajorRange);\n  Tensor<DataType, 4, RowMajor,IndexType> tensor_row_major(tensorRowMajorRange);\n  tensor_col_major.setRandom();\n\n  DataType* gpu_data_col_major  = static_cast<DataType*>(sycl_device.allocate(tensor_col_major.size()*sizeof(DataType)));\n  DataType* gpu_data_row_major  = static_cast<DataType*>(sycl_device.allocate(tensor_row_major.size()*sizeof(DataType)));\n  TensorMap<Tensor<DataType, 4, ColMajor, IndexType>> gpu_col_major(gpu_data_col_major, tensorColMajorRange);\n  TensorMap<Tensor<DataType, 4, RowMajor, IndexType>> gpu_row_major(gpu_data_row_major, tensorRowMajorRange);\n\n  sycl_device.memcpyHostToDevice(gpu_data_col_major, tensor_col_major.data(),(tensor_col_major.size())*sizeof(DataType));\n  gpu_row_major.device(sycl_device)=gpu_col_major.swap_layout();\n  sycl_device.memcpyDeviceToHost(tensor_row_major.data(), gpu_data_row_major, (tensor_col_major.size())*sizeof(DataType));\n\n  VERIFY_IS_EQUAL(tensor_col_major.dimension(0), tensor_row_major.dimension(3));\n  VERIFY_IS_EQUAL(tensor_col_major.dimension(1), tensor_row_major.dimension(2));\n  VERIFY_IS_EQUAL(tensor_col_major.dimension(2), tensor_row_major.dimension(1));\n  VERIFY_IS_EQUAL(tensor_col_major.dimension(3), tensor_row_major.dimension(0));\n\n  // Single pixel patch: ColMajor\n  array<IndexType, 5> patchColMajorTensorRange={{sizeDim1, 1, 1, sizeDim2*sizeDim3, sizeDim4}};\n  Tensor<DataType, 5, DataLayout,IndexType> single_patch_col_major(patchColMajorTensorRange);\n  size_t patchTensorBuffSize =single_patch_col_major.size()*sizeof(DataType);\n  DataType* gpu_data_single_patch_col_major  = static_cast<DataType*>(sycl_device.allocate(patchTensorBuffSize));\n  TensorMap<Tensor<DataType, 5, DataLayout,IndexType>> gpu_single_patch_col_major(gpu_data_single_patch_col_major, patchColMajorTensorRange);\n  gpu_single_patch_col_major.device(sycl_device)=gpu_col_major.extract_image_patches(1, 1);\n  sycl_device.memcpyDeviceToHost(single_patch_col_major.data(), gpu_data_single_patch_col_major, patchTensorBuffSize);\n\n  VERIFY_IS_EQUAL(single_patch_col_major.dimension(0), 2);\n  VERIFY_IS_EQUAL(single_patch_col_major.dimension(1), 1);\n  VERIFY_IS_EQUAL(single_patch_col_major.dimension(2), 1);\n  VERIFY_IS_EQUAL(single_patch_col_major.dimension(3), 3*5);\n  VERIFY_IS_EQUAL(single_patch_col_major.dimension(4), 7);\n\n  // Single pixel patch: RowMajor\n  array<IndexType, 5> patchRowMajorTensorRange={{sizeDim4, sizeDim2*sizeDim3, 1, 1, sizeDim1}};\n  Tensor<DataType, 5, RowMajor,IndexType> single_patch_row_major(patchRowMajorTensorRange);\n  patchTensorBuffSize =single_patch_row_major.size()*sizeof(DataType);\n  DataType* gpu_data_single_patch_row_major  = static_cast<DataType*>(sycl_device.allocate(patchTensorBuffSize));\n  TensorMap<Tensor<DataType, 5, RowMajor,IndexType>> gpu_single_patch_row_major(gpu_data_single_patch_row_major, patchRowMajorTensorRange);\n  gpu_single_patch_row_major.device(sycl_device)=gpu_row_major.extract_image_patches(1, 1);\n  sycl_device.memcpyDeviceToHost(single_patch_row_major.data(), gpu_data_single_patch_row_major, patchTensorBuffSize);\n\n  VERIFY_IS_EQUAL(single_patch_row_major.dimension(0), 7);\n  VERIFY_IS_EQUAL(single_patch_row_major.dimension(1), 3*5);\n  VERIFY_IS_EQUAL(single_patch_row_major.dimension(2), 1);\n  VERIFY_IS_EQUAL(single_patch_row_major.dimension(3), 1);\n  VERIFY_IS_EQUAL(single_patch_row_major.dimension(4), 2);\n\n  for (IndexType i = 0; i < tensor_col_major.size(); ++i) {\n    // ColMajor\n    if (tensor_col_major.data()[i] != single_patch_col_major.data()[i]) {\n      std::cout << \"Mismatch detected at index colmajor \" << i << \" : \"\n           << tensor_col_major.data()[i] << \" vs \" << single_patch_col_major.data()[i]\n           << std::endl;\n    }\n    VERIFY_IS_EQUAL(single_patch_col_major.data()[i], tensor_col_major.data()[i]);\n    // RowMajor\n    if (tensor_row_major.data()[i] != single_patch_row_major.data()[i]) {\n      std::cout << \"Mismatch detected at index row major\" << i << \" : \"\n           << tensor_row_major.data()[i] << \" vs \"\n           << single_patch_row_major.data()[i] << std::endl;\n    }\n    VERIFY_IS_EQUAL(single_patch_row_major.data()[i],\n                    tensor_row_major.data()[i]);\n    VERIFY_IS_EQUAL(tensor_col_major.data()[i], tensor_row_major.data()[i]);\n    VERIFY_IS_EQUAL(single_patch_col_major.data()[i],\n                    single_patch_row_major.data()[i]);\n  }\n\n\n  // Entire image patch: ColMajor\n  patchColMajorTensorRange={{sizeDim1, sizeDim2, sizeDim3, sizeDim2*sizeDim3, sizeDim4}};\n  Tensor<DataType, 5, DataLayout,IndexType> entire_image_patch_col_major(patchColMajorTensorRange);\n  patchTensorBuffSize =entire_image_patch_col_major.size()*sizeof(DataType);\n  DataType* gpu_data_entire_image_patch_col_major  = static_cast<DataType*>(sycl_device.allocate(patchTensorBuffSize));\n  TensorMap<Tensor<DataType, 5, DataLayout,IndexType>> gpu_entire_image_patch_col_major(gpu_data_entire_image_patch_col_major, patchColMajorTensorRange);\n  gpu_entire_image_patch_col_major.device(sycl_device)=gpu_col_major.extract_image_patches(3, 5);\n  sycl_device.memcpyDeviceToHost(entire_image_patch_col_major.data(), gpu_data_entire_image_patch_col_major, patchTensorBuffSize);\n\n  VERIFY_IS_EQUAL(entire_image_patch_col_major.dimension(0), 2);\n  VERIFY_IS_EQUAL(entire_image_patch_col_major.dimension(1), 3);\n  VERIFY_IS_EQUAL(entire_image_patch_col_major.dimension(2), 5);\n  VERIFY_IS_EQUAL(entire_image_patch_col_major.dimension(3), 3*5);\n  VERIFY_IS_EQUAL(entire_image_patch_col_major.dimension(4), 7);\n\n  // Entire image patch: RowMajor\n  patchRowMajorTensorRange={{sizeDim4, sizeDim2*sizeDim3, sizeDim3, sizeDim2, sizeDim1}};\n  Tensor<DataType, 5, RowMajor,IndexType> entire_image_patch_row_major(patchRowMajorTensorRange);\n  patchTensorBuffSize =entire_image_patch_row_major.size()*sizeof(DataType);\n  DataType* gpu_data_entire_image_patch_row_major  = static_cast<DataType*>(sycl_device.allocate(patchTensorBuffSize));\n  TensorMap<Tensor<DataType, 5, RowMajor,IndexType>> gpu_entire_image_patch_row_major(gpu_data_entire_image_patch_row_major, patchRowMajorTensorRange);\n  gpu_entire_image_patch_row_major.device(sycl_device)=gpu_row_major.extract_image_patches(3, 5);\n  sycl_device.memcpyDeviceToHost(entire_image_patch_row_major.data(), gpu_data_entire_image_patch_row_major, patchTensorBuffSize);\n\n  VERIFY_IS_EQUAL(entire_image_patch_row_major.dimension(0), 7);\n  VERIFY_IS_EQUAL(entire_image_patch_row_major.dimension(1), 3*5);\n  VERIFY_IS_EQUAL(entire_image_patch_row_major.dimension(2), 5);\n  VERIFY_IS_EQUAL(entire_image_patch_row_major.dimension(3), 3);\n  VERIFY_IS_EQUAL(entire_image_patch_row_major.dimension(4), 2);\n\n  for (IndexType i = 0; i < 3; ++i) {\n    for (IndexType j = 0; j < 5; ++j) {\n      IndexType patchId = i+3*j;\n      for (IndexType r = 0; r < 3; ++r) {\n        for (IndexType c = 0; c < 5; ++c) {\n          for (IndexType d = 0; d < 2; ++d) {\n            for (IndexType b = 0; b < 7; ++b) {\n              DataType expected_col_major = 0.0f;\n              DataType expected_row_major = 0.0f;\n              if (r-1+i >= 0 && c-2+j >= 0 && r-1+i < 3 && c-2+j < 5) {\n                expected_col_major = tensor_col_major(d, r-1+i, c-2+j, b);\n                expected_row_major = tensor_row_major(b, c-2+j, r-1+i, d);\n              }\n              // ColMajor\n              if (entire_image_patch_col_major(d, r, c, patchId, b) != expected_col_major) {\n                std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << \" b=\" << b << std::endl;\n              }\n              VERIFY_IS_EQUAL(entire_image_patch_col_major(d, r, c, patchId, b), expected_col_major);\n              // RowMajor\n              if (entire_image_patch_row_major(b, patchId, c, r, d) !=\n                  expected_row_major) {\n                std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j\n                     << \" r=\" << r << \" c=\" << c << \" d=\" << d << \" b=\" << b\n                     << std::endl;\n              }\n              VERIFY_IS_EQUAL(entire_image_patch_row_major(b, patchId, c, r, d),\n                              expected_row_major);\n              // Check that ColMajor and RowMajor agree.\n              VERIFY_IS_EQUAL(expected_col_major, expected_row_major);\n            }\n          }\n        }\n      }\n    }\n  }\n\n  // 2D patch: ColMajor\n  patchColMajorTensorRange={{sizeDim1, 2, 2, sizeDim2*sizeDim3, sizeDim4}};\n  Tensor<DataType, 5, DataLayout,IndexType> twod_patch_col_major(patchColMajorTensorRange);\n  patchTensorBuffSize =twod_patch_col_major.size()*sizeof(DataType);\n  DataType* gpu_data_twod_patch_col_major  = static_cast<DataType*>(sycl_device.allocate(patchTensorBuffSize));\n  TensorMap<Tensor<DataType, 5, DataLayout,IndexType>> gpu_twod_patch_col_major(gpu_data_twod_patch_col_major, patchColMajorTensorRange);\n  gpu_twod_patch_col_major.device(sycl_device)=gpu_col_major.extract_image_patches(2, 2);\n  sycl_device.memcpyDeviceToHost(twod_patch_col_major.data(), gpu_data_twod_patch_col_major, patchTensorBuffSize);\n\n  VERIFY_IS_EQUAL(twod_patch_col_major.dimension(0), 2);\n  VERIFY_IS_EQUAL(twod_patch_col_major.dimension(1), 2);\n  VERIFY_IS_EQUAL(twod_patch_col_major.dimension(2), 2);\n  VERIFY_IS_EQUAL(twod_patch_col_major.dimension(3), 3*5);\n  VERIFY_IS_EQUAL(twod_patch_col_major.dimension(4), 7);\n\n  // 2D patch: RowMajor\n  patchRowMajorTensorRange={{sizeDim4, sizeDim2*sizeDim3, 2, 2, sizeDim1}};\n  Tensor<DataType, 5, RowMajor,IndexType> twod_patch_row_major(patchRowMajorTensorRange);\n  patchTensorBuffSize =twod_patch_row_major.size()*sizeof(DataType);\n  DataType* gpu_data_twod_patch_row_major  = static_cast<DataType*>(sycl_device.allocate(patchTensorBuffSize));\n  TensorMap<Tensor<DataType, 5, RowMajor,IndexType>> gpu_twod_patch_row_major(gpu_data_twod_patch_row_major, patchRowMajorTensorRange);\n  gpu_twod_patch_row_major.device(sycl_device)=gpu_row_major.extract_image_patches(2, 2);\n  sycl_device.memcpyDeviceToHost(twod_patch_row_major.data(), gpu_data_twod_patch_row_major, patchTensorBuffSize);\n\n  VERIFY_IS_EQUAL(twod_patch_row_major.dimension(0), 7);\n  VERIFY_IS_EQUAL(twod_patch_row_major.dimension(1), 3*5);\n  VERIFY_IS_EQUAL(twod_patch_row_major.dimension(2), 2);\n  VERIFY_IS_EQUAL(twod_patch_row_major.dimension(3), 2);\n  VERIFY_IS_EQUAL(twod_patch_row_major.dimension(4), 2);\n\n\n  // Based on the calculation described in TensorTraits.h, padding happens to be 0.\n  IndexType row_padding = 0;\n  IndexType col_padding = 0;\n  IndexType stride = 1;\n\n  for (IndexType i = 0; i < 3; ++i) {\n    for (IndexType j = 0; j < 5; ++j) {\n      IndexType patchId = i+3*j;\n      for (IndexType r = 0; r < 2; ++r) {\n        for (IndexType c = 0; c < 2; ++c) {\n          for (IndexType d = 0; d < 2; ++d) {\n            for (IndexType b = 0; b < 7; ++b) {\n              DataType expected_col_major = 0.0f;\n              DataType expected_row_major = 0.0f;\n              IndexType row_offset = r*stride + i - row_padding;\n              IndexType col_offset = c*stride + j - col_padding;\n              // ColMajor\n              if (row_offset >= 0 && col_offset >= 0 && row_offset < tensor_col_major.dimension(1) && col_offset < tensor_col_major.dimension(2)) {\n                expected_col_major = tensor_col_major(d, row_offset, col_offset, b);\n              }\n              if (twod_patch_col_major(d, r, c, patchId, b) != expected_col_major) {\n                std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << \" b=\" << b << std::endl;\n              }\n              VERIFY_IS_EQUAL(twod_patch_col_major(d, r, c, patchId, b), expected_col_major);\n\n              // RowMajor\n              if (row_offset >= 0 && col_offset >= 0 && row_offset < tensor_row_major.dimension(2) && col_offset < tensor_row_major.dimension(1)) {\n                expected_row_major = tensor_row_major(b, col_offset, row_offset, d);\n\n              }\n              if (twod_patch_row_major(b, patchId, c, r, d) != expected_row_major) {\n                std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << \" b=\" << b << std::endl;\n              }\n              VERIFY_IS_EQUAL(twod_patch_row_major(b, patchId, c, r, d), expected_row_major);\n              // Check that ColMajor and RowMajor agree.\n              VERIFY_IS_EQUAL(expected_col_major, expected_row_major);\n            }\n          }\n        }\n      }\n    }\n  }\n\n  sycl_device.deallocate(gpu_data_col_major);\n  sycl_device.deallocate(gpu_data_row_major);\n  sycl_device.deallocate(gpu_data_single_patch_col_major);\n  sycl_device.deallocate(gpu_data_single_patch_row_major);\n  sycl_device.deallocate(gpu_data_entire_image_patch_col_major);\n  sycl_device.deallocate(gpu_data_entire_image_patch_row_major);\n  sycl_device.deallocate(gpu_data_twod_patch_col_major);\n  sycl_device.deallocate(gpu_data_twod_patch_row_major);\n\n}\n\n\n// Verifies VALID padding (no padding) with incrementing values.\ntemplate <typename DataType, typename IndexType>\nstatic void test_patch_padding_valid_sycl(const Eigen::SyclDevice& sycl_device){\n  IndexType input_depth = 3;\n  IndexType input_rows = 3;\n  IndexType input_cols = 3;\n  IndexType input_batches = 1;\n  IndexType ksize = 2;  // Corresponds to the Rows and Cols for tensor.extract_image_patches<>.\n  IndexType stride = 2;  // Only same stride is supported.\n\n  array<IndexType, 4> tensorColMajorRange = {{input_depth, input_rows, input_cols, input_batches}};\n  array<IndexType, 4> tensorRowMajorRange = {{input_batches, input_cols, input_rows, input_depth}};\n  Tensor<DataType, 4, DataLayout,IndexType> tensor_col_major(tensorColMajorRange);\n  Tensor<DataType, 4, RowMajor,IndexType> tensor_row_major(tensorRowMajorRange);\n\n  DataType* gpu_data_col_major  = static_cast<DataType*>(sycl_device.allocate(tensor_col_major.size()*sizeof(DataType)));\n  DataType* gpu_data_row_major  = static_cast<DataType*>(sycl_device.allocate(tensor_row_major.size()*sizeof(DataType)));\n  TensorMap<Tensor<DataType, 4, ColMajor, IndexType>> gpu_col_major(gpu_data_col_major, tensorColMajorRange);\n  TensorMap<Tensor<DataType, 4, RowMajor, IndexType>> gpu_row_major(gpu_data_row_major, tensorRowMajorRange);\n\n  sycl_device.memcpyHostToDevice(gpu_data_col_major, tensor_col_major.data(),(tensor_col_major.size())*sizeof(DataType));\n  gpu_row_major.device(sycl_device)=gpu_col_major.swap_layout();\n  sycl_device.memcpyDeviceToHost(tensor_row_major.data(), gpu_data_row_major, (tensor_col_major.size())*sizeof(DataType));\n\n  VERIFY_IS_EQUAL(tensor_col_major.dimension(0), tensor_row_major.dimension(3));\n  VERIFY_IS_EQUAL(tensor_col_major.dimension(1), tensor_row_major.dimension(2));\n  VERIFY_IS_EQUAL(tensor_col_major.dimension(2), tensor_row_major.dimension(1));\n  VERIFY_IS_EQUAL(tensor_col_major.dimension(3), tensor_row_major.dimension(0));\n\n  // Initializes tensor with incrementing numbers.\n  for (IndexType i = 0; i < tensor_col_major.size(); ++i) {\n    tensor_col_major.data()[i] = i + 1;\n  }\n  // ColMajor\n  array<IndexType, 5> patchColMajorTensorRange={{input_depth, ksize, ksize, 1, input_batches}};\n  Tensor<DataType, 5, DataLayout,IndexType> result_col_major(patchColMajorTensorRange);\n  size_t patchTensorBuffSize =result_col_major.size()*sizeof(DataType);\n  DataType* gpu_data_result_col_major  = static_cast<DataType*>(sycl_device.allocate(patchTensorBuffSize));\n  TensorMap<Tensor<DataType, 5, DataLayout,IndexType>> gpu_result_col_major(gpu_data_result_col_major, patchColMajorTensorRange);\n  gpu_result_col_major.device(sycl_device)=gpu_col_major.extract_image_patches(ksize, ksize, stride, stride, 1, 1, PADDING_VALID);\n  sycl_device.memcpyDeviceToHost(result_col_major.data(), gpu_data_result_col_major, patchTensorBuffSize);\n\n  VERIFY_IS_EQUAL(result_col_major.dimension(0), input_depth);  // depth\n  VERIFY_IS_EQUAL(result_col_major.dimension(1), ksize);  // kernel rows\n  VERIFY_IS_EQUAL(result_col_major.dimension(2), ksize);  // kernel cols\n  VERIFY_IS_EQUAL(result_col_major.dimension(3), 1);  // number of patches\n  VERIFY_IS_EQUAL(result_col_major.dimension(4), input_batches);  // number of batches\n\n  // RowMajor\n  array<IndexType, 5> patchRowMajorTensorRange={{input_batches, 1, ksize, ksize, input_depth }};\n  Tensor<DataType, 5, RowMajor,IndexType> result_row_major(patchRowMajorTensorRange);\n  patchTensorBuffSize =result_row_major.size()*sizeof(DataType);\n  DataType* gpu_data_result_row_major  = static_cast<DataType*>(sycl_device.allocate(patchTensorBuffSize));\n  TensorMap<Tensor<DataType, 5, RowMajor,IndexType>> gpu_result_row_major(gpu_data_result_row_major, patchRowMajorTensorRange);\n  gpu_result_row_major.device(sycl_device)=gpu_row_major.extract_image_patches(ksize, ksize, stride, stride, 1, 1, PADDING_VALID);\n  sycl_device.memcpyDeviceToHost(result_row_major.data(), gpu_data_result_row_major, patchTensorBuffSize);\n\n  VERIFY_IS_EQUAL(result_col_major.dimension(0), result_row_major.dimension(4));\n  VERIFY_IS_EQUAL(result_col_major.dimension(1), result_row_major.dimension(3));\n  VERIFY_IS_EQUAL(result_col_major.dimension(2), result_row_major.dimension(2));\n  VERIFY_IS_EQUAL(result_col_major.dimension(3), result_row_major.dimension(1));\n  VERIFY_IS_EQUAL(result_col_major.dimension(4), result_row_major.dimension(0));\n\n  // No padding is carried out.\n  IndexType row_padding = 0;\n  IndexType col_padding = 0;\n\n  for (IndexType i = 0; (i+stride+ksize-1) < input_rows; i += stride) {  // input rows\n    for (IndexType j = 0; (j+stride+ksize-1) < input_cols; j += stride) {  // input cols\n      IndexType patchId = i+input_rows*j;\n      for (IndexType r = 0; r < ksize; ++r) {  // patch rows\n        for (IndexType c = 0; c < ksize; ++c) {  // patch cols\n          for (IndexType d = 0; d < input_depth; ++d) {  // depth\n            for (IndexType b = 0; b < input_batches; ++b) {  // batch\n              DataType expected_col_major = 0.0f;\n              DataType expected_row_major = 0.0f;\n              IndexType row_offset = r + i - row_padding;\n              IndexType col_offset = c + j - col_padding;\n              if (row_offset >= 0 && col_offset >= 0 && row_offset < input_rows && col_offset < input_cols) {\n                expected_col_major = tensor_col_major(d, row_offset, col_offset, b);\n                expected_row_major = tensor_row_major(b, col_offset, row_offset, d);\n              }\n              // ColMajor\n              if (result_col_major(d, r, c, patchId, b) != expected_col_major) {\n                std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << \" b=\" << b << std::endl;\n              }\n              VERIFY_IS_EQUAL(result_col_major(d, r, c, patchId, b), expected_col_major);\n              // RowMajor\n              if (result_row_major(b, patchId, c, r, d) != expected_row_major) {\n                std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << \" b=\" << b << std::endl;\n              }\n              VERIFY_IS_EQUAL(result_row_major(b, patchId, c, r, d), expected_row_major);\n              // Check that ColMajor and RowMajor agree.\n              VERIFY_IS_EQUAL(expected_col_major, expected_row_major);\n            }\n          }\n        }\n      }\n    }\n  }\n  sycl_device.deallocate(gpu_data_col_major);\n  sycl_device.deallocate(gpu_data_row_major);\n  sycl_device.deallocate(gpu_data_result_col_major);\n  sycl_device.deallocate(gpu_data_result_row_major);\n}\n\n// Verifies VALID padding (no padding) with the same value.\ntemplate <typename DataType, typename IndexType>\nstatic void test_patch_padding_valid_same_value_sycl(const Eigen::SyclDevice& sycl_device){\n  IndexType input_depth = 1;\n  IndexType input_rows = 5;\n  IndexType input_cols = 5;\n  IndexType input_batches = 2;\n  IndexType ksize = 3;  // Corresponds to the Rows and Cols for tensor.extract_image_patches<>.\n  IndexType stride = 2;  // Only same stride is supported.\n  // ColMajor\n\n  array<IndexType, 4> tensorColMajorRange = {{input_depth, input_rows, input_cols, input_batches}};\n  array<IndexType, 4> tensorRowMajorRange = {{input_batches, input_cols, input_rows, input_depth}};\n  Tensor<DataType, 4, DataLayout,IndexType> tensor_col_major(tensorColMajorRange);\n  Tensor<DataType, 4, RowMajor,IndexType> tensor_row_major(tensorRowMajorRange);\n\n  DataType* gpu_data_col_major  = static_cast<DataType*>(sycl_device.allocate(tensor_col_major.size()*sizeof(DataType)));\n  DataType* gpu_data_row_major  = static_cast<DataType*>(sycl_device.allocate(tensor_row_major.size()*sizeof(DataType)));\n  TensorMap<Tensor<DataType, 4, ColMajor, IndexType>> gpu_col_major(gpu_data_col_major, tensorColMajorRange);\n  TensorMap<Tensor<DataType, 4, RowMajor, IndexType>> gpu_row_major(gpu_data_row_major, tensorRowMajorRange);\n  gpu_col_major.device(sycl_device)=gpu_col_major.constant(11.0f);\n  gpu_row_major.device(sycl_device)=gpu_col_major.swap_layout();\n  sycl_device.memcpyDeviceToHost(tensor_col_major.data(), gpu_data_col_major, (tensor_col_major.size())*sizeof(DataType));\n  sycl_device.memcpyDeviceToHost(tensor_row_major.data(), gpu_data_row_major, (tensor_row_major.size())*sizeof(DataType));\n  VERIFY_IS_EQUAL(tensor_col_major.dimension(0), tensor_row_major.dimension(3));\n  VERIFY_IS_EQUAL(tensor_col_major.dimension(1), tensor_row_major.dimension(2));\n  VERIFY_IS_EQUAL(tensor_col_major.dimension(2), tensor_row_major.dimension(1));\n  VERIFY_IS_EQUAL(tensor_col_major.dimension(3), tensor_row_major.dimension(0));\n\n  array<IndexType, 5> patchColMajorTensorRange={{input_depth, ksize, ksize, 4, input_batches}};\n  Tensor<DataType, 5, DataLayout,IndexType> result_col_major(patchColMajorTensorRange);\n  size_t patchTensorBuffSize =result_col_major.size()*sizeof(DataType);\n  DataType* gpu_data_result_col_major  = static_cast<DataType*>(sycl_device.allocate(patchTensorBuffSize));\n  TensorMap<Tensor<DataType, 5, DataLayout,IndexType>> gpu_result_col_major(gpu_data_result_col_major, patchColMajorTensorRange);\n  gpu_result_col_major.device(sycl_device)=gpu_col_major.extract_image_patches(ksize, ksize, stride, stride, 1, 1, PADDING_VALID);\n  sycl_device.memcpyDeviceToHost(result_col_major.data(), gpu_data_result_col_major, patchTensorBuffSize);\n\n  VERIFY_IS_EQUAL(result_col_major.dimension(0), input_depth);  // depth\n  VERIFY_IS_EQUAL(result_col_major.dimension(1), ksize);  // kernel rows\n  VERIFY_IS_EQUAL(result_col_major.dimension(2), ksize);  // kernel cols\n  VERIFY_IS_EQUAL(result_col_major.dimension(3), 4);  // number of patches\n  VERIFY_IS_EQUAL(result_col_major.dimension(4), input_batches);  // number of batches\n\n  // RowMajor\n  array<IndexType, 5> patchRowMajorTensorRange={{input_batches, 4, ksize, ksize, input_depth }};\n  Tensor<DataType, 5, RowMajor,IndexType> result_row_major(patchRowMajorTensorRange);\n  patchTensorBuffSize =result_row_major.size()*sizeof(DataType);\n  DataType* gpu_data_result_row_major  = static_cast<DataType*>(sycl_device.allocate(patchTensorBuffSize));\n  TensorMap<Tensor<DataType, 5, RowMajor,IndexType>> gpu_result_row_major(gpu_data_result_row_major, patchRowMajorTensorRange);\n  gpu_result_row_major.device(sycl_device)=gpu_row_major.extract_image_patches(ksize, ksize, stride, stride, 1, 1, PADDING_VALID);\n  sycl_device.memcpyDeviceToHost(result_row_major.data(), gpu_data_result_row_major, patchTensorBuffSize);\n\n  VERIFY_IS_EQUAL(result_col_major.dimension(0), result_row_major.dimension(4));\n  VERIFY_IS_EQUAL(result_col_major.dimension(1), result_row_major.dimension(3));\n  VERIFY_IS_EQUAL(result_col_major.dimension(2), result_row_major.dimension(2));\n  VERIFY_IS_EQUAL(result_col_major.dimension(3), result_row_major.dimension(1));\n  VERIFY_IS_EQUAL(result_col_major.dimension(4), result_row_major.dimension(0));\n\n  // No padding is carried out.\n  IndexType row_padding = 0;\n  IndexType col_padding = 0;\n\n  for (IndexType i = 0; (i+stride+ksize-1) <= input_rows; i += stride) {  // input rows\n    for (IndexType j = 0; (j+stride+ksize-1) <= input_cols; j += stride) {  // input cols\n      IndexType patchId = i+input_rows*j;\n      for (IndexType r = 0; r < ksize; ++r) {  // patch rows\n        for (IndexType c = 0; c < ksize; ++c) {  // patch cols\n          for (IndexType d = 0; d < input_depth; ++d) {  // depth\n            for (IndexType b = 0; b < input_batches; ++b) {  // batch\n              DataType expected_col_major = 0.0f;\n              DataType expected_row_major = 0.0f;\n              IndexType row_offset = r + i - row_padding;\n              IndexType col_offset = c + j - col_padding;\n              if (row_offset >= 0 && col_offset >= 0 && row_offset < input_rows && col_offset < input_cols) {\n                expected_col_major = tensor_col_major(d, row_offset, col_offset, b);\n                expected_row_major = tensor_row_major(b, col_offset, row_offset, d);\n              }\n              // ColMajor\n              if (result_col_major(d, r, c, patchId, b) != expected_col_major) {\n                std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << \" b=\" << b << std::endl;\n              }\n              VERIFY_IS_EQUAL(result_col_major(d, r, c, patchId, b), expected_col_major);\n              // RowMajor\n              if (result_row_major(b, patchId, c, r, d) != expected_row_major) {\n                std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << \" b=\" << b << std::endl;\n              }\n              VERIFY_IS_EQUAL(result_row_major(b, patchId, c, r, d), expected_row_major);\n              // Check that ColMajor and RowMajor agree.\n              VERIFY_IS_EQUAL(expected_col_major, expected_row_major);\n            }\n          }\n        }\n      }\n    }\n  }\n}\n\n// Verifies SAME padding.\ntemplate <typename DataType, typename IndexType>\nstatic void test_patch_padding_same_sycl(const Eigen::SyclDevice& sycl_device){\n  IndexType input_depth = 3;\n  IndexType input_rows = 4;\n  IndexType input_cols = 2;\n  IndexType input_batches = 1;\n  IndexType ksize = 2;  // Corresponds to the Rows and Cols for tensor.extract_image_patches<>.\n  IndexType stride = 2;  // Only same stride is supported.\n\n  // ColMajor\n  array<IndexType, 4> tensorColMajorRange = {{input_depth, input_rows, input_cols, input_batches}};\n  array<IndexType, 4> tensorRowMajorRange = {{input_batches, input_cols, input_rows, input_depth}};\n  Tensor<DataType, 4, DataLayout,IndexType> tensor_col_major(tensorColMajorRange);\n  Tensor<DataType, 4, RowMajor,IndexType> tensor_row_major(tensorRowMajorRange);\n\n  DataType* gpu_data_col_major  = static_cast<DataType*>(sycl_device.allocate(tensor_col_major.size()*sizeof(DataType)));\n  DataType* gpu_data_row_major  = static_cast<DataType*>(sycl_device.allocate(tensor_row_major.size()*sizeof(DataType)));\n  TensorMap<Tensor<DataType, 4, ColMajor, IndexType>> gpu_col_major(gpu_data_col_major, tensorColMajorRange);\n  TensorMap<Tensor<DataType, 4, RowMajor, IndexType>> gpu_row_major(gpu_data_row_major, tensorRowMajorRange);\n\n  sycl_device.memcpyHostToDevice(gpu_data_col_major, tensor_col_major.data(),(tensor_col_major.size())*sizeof(DataType));\n  gpu_row_major.device(sycl_device)=gpu_col_major.swap_layout();\n  sycl_device.memcpyDeviceToHost(tensor_row_major.data(), gpu_data_row_major, (tensor_col_major.size())*sizeof(DataType));\n\n  VERIFY_IS_EQUAL(tensor_col_major.dimension(0), tensor_row_major.dimension(3));\n  VERIFY_IS_EQUAL(tensor_col_major.dimension(1), tensor_row_major.dimension(2));\n  VERIFY_IS_EQUAL(tensor_col_major.dimension(2), tensor_row_major.dimension(1));\n  VERIFY_IS_EQUAL(tensor_col_major.dimension(3), tensor_row_major.dimension(0));\n\n  // Initializes tensor with incrementing numbers.\n  for (IndexType i = 0; i < tensor_col_major.size(); ++i) {\n    tensor_col_major.data()[i] = i + 1;\n  }\n\narray<IndexType, 5> patchColMajorTensorRange={{input_depth, ksize, ksize, 2, input_batches}};\nTensor<DataType, 5, DataLayout,IndexType> result_col_major(patchColMajorTensorRange);\nsize_t patchTensorBuffSize =result_col_major.size()*sizeof(DataType);\nDataType* gpu_data_result_col_major  = static_cast<DataType*>(sycl_device.allocate(patchTensorBuffSize));\nTensorMap<Tensor<DataType, 5, DataLayout,IndexType>> gpu_result_col_major(gpu_data_result_col_major, patchColMajorTensorRange);\ngpu_result_col_major.device(sycl_device)=gpu_col_major.extract_image_patches(ksize, ksize, stride, stride, PADDING_SAME);\nsycl_device.memcpyDeviceToHost(result_col_major.data(), gpu_data_result_col_major, patchTensorBuffSize);\n\n\n  VERIFY_IS_EQUAL(result_col_major.dimension(0), input_depth);  // depth\n  VERIFY_IS_EQUAL(result_col_major.dimension(1), ksize);  // kernel rows\n  VERIFY_IS_EQUAL(result_col_major.dimension(2), ksize);  // kernel cols\n  VERIFY_IS_EQUAL(result_col_major.dimension(3), 2);  // number of patches\n  VERIFY_IS_EQUAL(result_col_major.dimension(4), input_batches);  // number of batches\n\n  // RowMajor\n\n  array<IndexType, 5> patchRowMajorTensorRange={{input_batches, 2, ksize, ksize, input_depth }};\n  Tensor<DataType, 5, RowMajor,IndexType> result_row_major(patchRowMajorTensorRange);\n  patchTensorBuffSize =result_row_major.size()*sizeof(DataType);\n  DataType* gpu_data_result_row_major  = static_cast<DataType*>(sycl_device.allocate(patchTensorBuffSize));\n  TensorMap<Tensor<DataType, 5, RowMajor,IndexType>> gpu_result_row_major(gpu_data_result_row_major, patchRowMajorTensorRange);\n  gpu_result_row_major.device(sycl_device)=gpu_row_major.extract_image_patches(ksize, ksize, stride, stride, PADDING_SAME);\n  sycl_device.memcpyDeviceToHost(result_row_major.data(), gpu_data_result_row_major, patchTensorBuffSize);\n\n  VERIFY_IS_EQUAL(result_col_major.dimension(0), result_row_major.dimension(4));\n  VERIFY_IS_EQUAL(result_col_major.dimension(1), result_row_major.dimension(3));\n  VERIFY_IS_EQUAL(result_col_major.dimension(2), result_row_major.dimension(2));\n  VERIFY_IS_EQUAL(result_col_major.dimension(3), result_row_major.dimension(1));\n  VERIFY_IS_EQUAL(result_col_major.dimension(4), result_row_major.dimension(0));\n\n  // Based on the calculation described in TensorTraits.h, padding happens to be 0.\n  IndexType row_padding = 0;\n  IndexType col_padding = 0;\n\n  for (IndexType i = 0; (i+stride+ksize-1) <= input_rows; i += stride) {  // input rows\n    for (IndexType j = 0; (j+stride+ksize-1) <= input_cols; j += stride) {  // input cols\n      IndexType patchId = i+input_rows*j;\n      for (IndexType r = 0; r < ksize; ++r) {  // patch rows\n        for (IndexType c = 0; c < ksize; ++c) {  // patch cols\n          for (IndexType d = 0; d < input_depth; ++d) {  // depth\n            for (IndexType b = 0; b < input_batches; ++b) {  // batch\n              DataType expected_col_major = 0.0f;\n              DataType expected_row_major = 0.0f;\n              IndexType row_offset = r*stride + i - row_padding;\n              IndexType col_offset = c*stride + j - col_padding;\n              if (row_offset >= 0 && col_offset >= 0 && row_offset < input_rows && col_offset < input_cols) {\n                expected_col_major = tensor_col_major(d, row_offset, col_offset, b);\n                expected_row_major = tensor_row_major(b, col_offset, row_offset, d);\n              }\n              // ColMajor\n              if (result_col_major(d, r, c, patchId, b) != expected_col_major) {\n                std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << \" b=\" << b << std::endl;\n              }\n              VERIFY_IS_EQUAL(result_col_major(d, r, c, patchId, b), expected_col_major);\n              // RowMajor\n              if (result_row_major(b, patchId, c, r, d) != expected_row_major) {\n                std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << \" b=\" << b << std::endl;\n              }\n              VERIFY_IS_EQUAL(result_row_major(b, patchId, c, r, d), expected_row_major);\n              // Check that ColMajor and RowMajor agree.\n              VERIFY_IS_EQUAL(expected_col_major, expected_row_major);\n            }\n          }\n        }\n      }\n    }\n  }\n}\n\n\ntemplate <typename DataType, typename IndexType>\nstatic void test_patch_no_extra_dim_sycl(const Eigen::SyclDevice& sycl_device){\n\n  IndexType sizeDim1 = 2;\n  IndexType sizeDim2 = 3;\n  IndexType sizeDim3 = 5;\n\n  // ColMajor\n  array<IndexType, 3> tensorColMajorRange = {{sizeDim1, sizeDim2, sizeDim3}};\n  array<IndexType, 3> tensorRowMajorRange = {{sizeDim3, sizeDim2, sizeDim1}};\n  Tensor<DataType, 3, DataLayout,IndexType> tensor_col_major(tensorColMajorRange);\n  tensor_col_major.setRandom();\n  Tensor<DataType, 3, RowMajor,IndexType> tensor_row_major(tensorRowMajorRange);\n\n  DataType* gpu_data_col_major  = static_cast<DataType*>(sycl_device.allocate(tensor_col_major.size()*sizeof(DataType)));\n  DataType* gpu_data_row_major  = static_cast<DataType*>(sycl_device.allocate(tensor_row_major.size()*sizeof(DataType)));\n  TensorMap<Tensor<DataType, 3, ColMajor, IndexType>> gpu_col_major(gpu_data_col_major, tensorColMajorRange);\n  TensorMap<Tensor<DataType, 3, RowMajor, IndexType>> gpu_row_major(gpu_data_row_major, tensorRowMajorRange);\n\n  sycl_device.memcpyHostToDevice(gpu_data_col_major, tensor_col_major.data(),(tensor_col_major.size())*sizeof(DataType));\n  gpu_row_major.device(sycl_device)=gpu_col_major.swap_layout();\n  sycl_device.memcpyDeviceToHost(tensor_row_major.data(), gpu_data_row_major, (tensor_row_major.size())*sizeof(DataType));\n\n  VERIFY_IS_EQUAL(tensor_col_major.dimension(0), tensor_row_major.dimension(2));\n  VERIFY_IS_EQUAL(tensor_col_major.dimension(1), tensor_row_major.dimension(1));\n  VERIFY_IS_EQUAL(tensor_col_major.dimension(2), tensor_row_major.dimension(0));\n\n\n  // Single pixel patch: ColMajor\n  array<IndexType, 4> patchColMajorTensorRange={{sizeDim1, 1, 1, sizeDim2*sizeDim3}};\n  Tensor<DataType, 4, DataLayout,IndexType> single_patch_col_major(patchColMajorTensorRange);\n  size_t patchTensorBuffSize =single_patch_col_major.size()*sizeof(DataType);\n  DataType* gpu_data_single_patch_col_major  = static_cast<DataType*>(sycl_device.allocate(patchTensorBuffSize));\n  TensorMap<Tensor<DataType, 4, DataLayout,IndexType>> gpu_single_patch_col_major(gpu_data_single_patch_col_major, patchColMajorTensorRange);\n  gpu_single_patch_col_major.device(sycl_device)=gpu_col_major.extract_image_patches(1, 1);\n  sycl_device.memcpyDeviceToHost(single_patch_col_major.data(), gpu_data_single_patch_col_major, patchTensorBuffSize);\n\n  VERIFY_IS_EQUAL(single_patch_col_major.dimension(0), sizeDim1);\n  VERIFY_IS_EQUAL(single_patch_col_major.dimension(1), 1);\n  VERIFY_IS_EQUAL(single_patch_col_major.dimension(2), 1);\n  VERIFY_IS_EQUAL(single_patch_col_major.dimension(3), sizeDim2*sizeDim3);\n\n  // Single pixel patch: RowMajor\n  array<IndexType, 4> patchRowMajorTensorRange={{sizeDim2*sizeDim3, 1, 1, sizeDim1}};\n  Tensor<DataType, 4, RowMajor,IndexType> single_patch_row_major(patchRowMajorTensorRange);\n  patchTensorBuffSize =single_patch_row_major.size()*sizeof(DataType);\n  DataType* gpu_data_single_patch_row_major  = static_cast<DataType*>(sycl_device.allocate(patchTensorBuffSize));\n  TensorMap<Tensor<DataType, 4, RowMajor,IndexType>> gpu_single_patch_row_major(gpu_data_single_patch_row_major, patchRowMajorTensorRange);\n  gpu_single_patch_row_major.device(sycl_device)=gpu_row_major.extract_image_patches(1, 1);\n  sycl_device.memcpyDeviceToHost(single_patch_row_major.data(), gpu_data_single_patch_row_major, patchTensorBuffSize);\n\n  VERIFY_IS_EQUAL(single_patch_row_major.dimension(0), sizeDim2*sizeDim3);\n  VERIFY_IS_EQUAL(single_patch_row_major.dimension(1), 1);\n  VERIFY_IS_EQUAL(single_patch_row_major.dimension(2), 1);\n  VERIFY_IS_EQUAL(single_patch_row_major.dimension(3), sizeDim1);\n\n  for (IndexType i = 0; i < tensor_col_major.size(); ++i) {\n    // ColMajor\n    if (tensor_col_major.data()[i] != single_patch_col_major.data()[i]) {\n      std::cout << \"Mismatch detected at index \" << i << \" : \" << tensor_col_major.data()[i] << \" vs \" << single_patch_col_major.data()[i] << std::endl;\n    }\n    VERIFY_IS_EQUAL(single_patch_col_major.data()[i], tensor_col_major.data()[i]);\n    // RowMajor\n    if (tensor_row_major.data()[i] != single_patch_row_major.data()[i]) {\n      std::cout << \"Mismatch detected at index \" << i << \" : \"\n           << tensor_col_major.data()[i] << \" vs \"\n           << single_patch_row_major.data()[i] << std::endl;\n    }\n    VERIFY_IS_EQUAL(single_patch_row_major.data()[i],\n                    tensor_row_major.data()[i]);\n    VERIFY_IS_EQUAL(tensor_col_major.data()[i], tensor_row_major.data()[i]);\n    VERIFY_IS_EQUAL(single_patch_col_major.data()[i],\n                    single_patch_row_major.data()[i]);\n  }\n\n  // Entire image patch: ColMajor\n  patchColMajorTensorRange={{sizeDim1, sizeDim2, sizeDim3, sizeDim2*sizeDim3}};\n  Tensor<DataType, 4, DataLayout,IndexType> entire_image_patch_col_major(patchColMajorTensorRange);\n  patchTensorBuffSize =entire_image_patch_col_major.size()*sizeof(DataType);\n  DataType* gpu_data_entire_image_patch_col_major  = static_cast<DataType*>(sycl_device.allocate(patchTensorBuffSize));\n  TensorMap<Tensor<DataType, 4, DataLayout,IndexType>> gpu_entire_image_patch_col_major(gpu_data_entire_image_patch_col_major, patchColMajorTensorRange);\n  gpu_entire_image_patch_col_major.device(sycl_device)=gpu_col_major.extract_image_patches(3, 5);\n  sycl_device.memcpyDeviceToHost(entire_image_patch_col_major.data(), gpu_data_entire_image_patch_col_major, patchTensorBuffSize);\n\n  VERIFY_IS_EQUAL(entire_image_patch_col_major.dimension(0), 2);\n  VERIFY_IS_EQUAL(entire_image_patch_col_major.dimension(1), 3);\n  VERIFY_IS_EQUAL(entire_image_patch_col_major.dimension(2), 5);\n  VERIFY_IS_EQUAL(entire_image_patch_col_major.dimension(3), 3*5);\n\n  // Entire image patch: RowMajor\npatchRowMajorTensorRange={{sizeDim2*sizeDim3, sizeDim3, sizeDim2, sizeDim1}};\nTensor<DataType, 4, RowMajor,IndexType> entire_image_patch_row_major(patchRowMajorTensorRange);\npatchTensorBuffSize =entire_image_patch_row_major.size()*sizeof(DataType);\nDataType* gpu_data_entire_image_patch_row_major  = static_cast<DataType*>(sycl_device.allocate(patchTensorBuffSize));\nTensorMap<Tensor<DataType, 4, RowMajor,IndexType>> gpu_entire_image_patch_row_major(gpu_data_entire_image_patch_row_major, patchRowMajorTensorRange);\ngpu_entire_image_patch_row_major.device(sycl_device)=gpu_row_major.extract_image_patches(3, 5);\nsycl_device.memcpyDeviceToHost(entire_image_patch_row_major.data(), gpu_data_entire_image_patch_row_major, patchTensorBuffSize);\n  VERIFY_IS_EQUAL(entire_image_patch_row_major.dimension(0), 3*5);\n  VERIFY_IS_EQUAL(entire_image_patch_row_major.dimension(1), 5);\n  VERIFY_IS_EQUAL(entire_image_patch_row_major.dimension(2), 3);\n  VERIFY_IS_EQUAL(entire_image_patch_row_major.dimension(3), 2);\n\n  for (IndexType i = 0; i < 3; ++i) {\n    for (IndexType j = 0; j < 5; ++j) {\n      IndexType patchId = i+3*j;\n      for (IndexType r = 0; r < 3; ++r) {\n        for (IndexType c = 0; c < 5; ++c) {\n          for (IndexType d = 0; d < 2; ++d) {\n            DataType expected_col_major = 0.0f;\n            DataType expected_row_major = 0.0f;\n            if (r-1+i >= 0 && c-2+j >= 0 && r-1+i < 3 && c-2+j < 5) {\n              expected_col_major = tensor_col_major(d, r-1+i, c-2+j);\n              expected_row_major = tensor_row_major(c-2+j, r-1+i, d);\n            }\n            // ColMajor\n            if (entire_image_patch_col_major(d, r, c, patchId) != expected_col_major) {\n              std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << std::endl;\n            }\n            VERIFY_IS_EQUAL(entire_image_patch_col_major(d, r, c, patchId), expected_col_major);\n            // RowMajor\n            if (entire_image_patch_row_major(patchId, c, r, d) !=\n                expected_row_major) {\n              std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << std::endl;\n            }\n            VERIFY_IS_EQUAL(entire_image_patch_row_major(patchId, c, r, d),\n                            expected_row_major);\n            // Check that ColMajor and RowMajor agree.\n            VERIFY_IS_EQUAL(expected_col_major, expected_row_major);\n          }\n        }\n      }\n    }\n  }\n\n  // 2D patch: ColMajor\n  patchColMajorTensorRange={{sizeDim1, 2, 2, sizeDim2*sizeDim3}};\n  Tensor<DataType, 4, DataLayout,IndexType> twod_patch_col_major(patchColMajorTensorRange);\n  patchTensorBuffSize =twod_patch_col_major.size()*sizeof(DataType);\n  DataType* gpu_data_twod_patch_col_major  = static_cast<DataType*>(sycl_device.allocate(patchTensorBuffSize));\n  TensorMap<Tensor<DataType, 4, DataLayout,IndexType>> gpu_twod_patch_col_major(gpu_data_twod_patch_col_major, patchColMajorTensorRange);\n  gpu_twod_patch_col_major.device(sycl_device)=gpu_col_major.extract_image_patches(2, 2);\n  sycl_device.memcpyDeviceToHost(twod_patch_col_major.data(), gpu_data_twod_patch_col_major, patchTensorBuffSize);\n\n  VERIFY_IS_EQUAL(twod_patch_col_major.dimension(0), 2);\n  VERIFY_IS_EQUAL(twod_patch_col_major.dimension(1), 2);\n  VERIFY_IS_EQUAL(twod_patch_col_major.dimension(2), 2);\n  VERIFY_IS_EQUAL(twod_patch_col_major.dimension(3), 3*5);\n\n  // 2D patch: RowMajor\n  patchRowMajorTensorRange={{sizeDim2*sizeDim3, 2, 2, sizeDim1}};\n  Tensor<DataType, 4, RowMajor,IndexType> twod_patch_row_major(patchRowMajorTensorRange);\n  patchTensorBuffSize =twod_patch_row_major.size()*sizeof(DataType);\n  DataType* gpu_data_twod_patch_row_major  = static_cast<DataType*>(sycl_device.allocate(patchTensorBuffSize));\n  TensorMap<Tensor<DataType, 4, RowMajor,IndexType>> gpu_twod_patch_row_major(gpu_data_twod_patch_row_major, patchRowMajorTensorRange);\n  gpu_twod_patch_row_major.device(sycl_device)=gpu_row_major.extract_image_patches(2, 2);\n  sycl_device.memcpyDeviceToHost(twod_patch_row_major.data(), gpu_data_twod_patch_row_major, patchTensorBuffSize);\n  VERIFY_IS_EQUAL(twod_patch_row_major.dimension(0), 3*5);\n  VERIFY_IS_EQUAL(twod_patch_row_major.dimension(1), 2);\n  VERIFY_IS_EQUAL(twod_patch_row_major.dimension(2), 2);\n  VERIFY_IS_EQUAL(twod_patch_row_major.dimension(3), 2);\n\n  // Based on the calculation described in TensorTraits.h, padding happens to be 0.\n  IndexType row_padding = 0;\n  IndexType col_padding = 0;\n  IndexType stride = 1;\n\n  for (IndexType i = 0; i < 3; ++i) {\n    for (IndexType j = 0; j < 5; ++j) {\n      IndexType patchId = i+3*j;\n      for (IndexType r = 0; r < 2; ++r) {\n        for (IndexType c = 0; c < 2; ++c) {\n          for (IndexType d = 0; d < 2; ++d) {\n            DataType expected_col_major = 0.0f;\n            DataType expected_row_major = 0.0f;\n            IndexType row_offset = r*stride + i - row_padding;\n            IndexType col_offset = c*stride + j - col_padding;\n            // ColMajor\n            if (row_offset >= 0 && col_offset >= 0 && row_offset < tensor_col_major.dimension(1) && col_offset < tensor_col_major.dimension(2)) {\n              expected_col_major = tensor_col_major(d, row_offset, col_offset);\n            }\n            if (twod_patch_col_major(d, r, c, patchId) != expected_col_major) {\n              std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << std::endl;\n            }\n            VERIFY_IS_EQUAL(twod_patch_col_major(d, r, c, patchId), expected_col_major);\n            // RowMajor\n            if (row_offset >= 0 && col_offset >= 0 && row_offset < tensor_row_major.dimension(1) && col_offset < tensor_row_major.dimension(0)) {\n              expected_row_major = tensor_row_major(col_offset, row_offset, d);\n            }\n            if (twod_patch_row_major(patchId, c, r, d) != expected_row_major) {\n              std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << std::endl;\n            }\n            VERIFY_IS_EQUAL(twod_patch_row_major(patchId, c, r, d), expected_row_major);\n            // Check that ColMajor and RowMajor agree.\n            VERIFY_IS_EQUAL(expected_col_major, expected_row_major);\n          }\n        }\n      }\n    }\n  }\n\n  sycl_device.deallocate(gpu_data_col_major);\n  sycl_device.deallocate(gpu_data_row_major);\n  sycl_device.deallocate(gpu_data_single_patch_col_major);\n  sycl_device.deallocate(gpu_data_single_patch_row_major);\n  sycl_device.deallocate(gpu_data_entire_image_patch_col_major);\n  sycl_device.deallocate(gpu_data_entire_image_patch_row_major);\n  sycl_device.deallocate(gpu_data_twod_patch_col_major);\n  sycl_device.deallocate(gpu_data_twod_patch_row_major);\n}\n\ntemplate <typename DataType, typename IndexType>\nstatic void test_imagenet_patches_sycl(const Eigen::SyclDevice& sycl_device)\n{\n  // Test the code on typical configurations used by the 'imagenet' benchmarks at\n  // https://github.com/soumith/convnet-benchmarks\n  // ColMajor\n  IndexType sizeDim1 = 3;\n  IndexType sizeDim2 = 128;\n  IndexType sizeDim3 = 128;\n  IndexType sizeDim4 = 16;\n  array<IndexType, 4> tensorColMajorRange = {{sizeDim1, sizeDim2, sizeDim3, sizeDim4}};\n  Tensor<DataType, 4, DataLayout,IndexType> l_in_col_major(tensorColMajorRange);\n  l_in_col_major.setRandom();\n\n  DataType* gpu_data_l_in_col_major  = static_cast<DataType*>(sycl_device.allocate(l_in_col_major.size()*sizeof(DataType)));\n  TensorMap<Tensor<DataType, 4, ColMajor, IndexType>> gpu_l_in_col_major(gpu_data_l_in_col_major, tensorColMajorRange);\n\n  sycl_device.memcpyHostToDevice(gpu_data_l_in_col_major, l_in_col_major.data(),(l_in_col_major.size())*sizeof(DataType));\n\n  array<IndexType, 5> patchTensorRange={{sizeDim1, 11, 11, sizeDim2*sizeDim3, sizeDim4}};\n  Tensor<DataType, 5, DataLayout,IndexType> l_out_col_major(patchTensorRange);\n  size_t patchTensorBuffSize =l_out_col_major.size()*sizeof(DataType);\n  DataType* gpu_data_l_out_col_major  = static_cast<DataType*>(sycl_device.allocate(patchTensorBuffSize));\n  TensorMap<Tensor<DataType, 5, DataLayout,IndexType>> gpu_l_out_col_major(gpu_data_l_out_col_major, patchTensorRange);\n  gpu_l_out_col_major.device(sycl_device)=gpu_l_in_col_major.extract_image_patches(11, 11);\n  sycl_device.memcpyDeviceToHost(l_out_col_major.data(), gpu_data_l_out_col_major, patchTensorBuffSize);\n\n  VERIFY_IS_EQUAL(l_out_col_major.dimension(0), sizeDim1);\n  VERIFY_IS_EQUAL(l_out_col_major.dimension(1), 11);\n  VERIFY_IS_EQUAL(l_out_col_major.dimension(2), 11);\n  VERIFY_IS_EQUAL(l_out_col_major.dimension(3), sizeDim2*sizeDim3);\n  VERIFY_IS_EQUAL(l_out_col_major.dimension(4), sizeDim4);\n\n  // RowMajor\n  patchTensorRange={{sizeDim4, sizeDim2*sizeDim3, 11, 11, sizeDim1}};\n  Tensor<DataType, 5, RowMajor,IndexType> l_out_row_major(patchTensorRange);\n  patchTensorBuffSize =l_out_row_major.size()*sizeof(DataType);\n  DataType* gpu_data_l_out_row_major  = static_cast<DataType*>(sycl_device.allocate(patchTensorBuffSize));\n  TensorMap<Tensor<DataType, 5, RowMajor,IndexType>> gpu_l_out_row_major(gpu_data_l_out_row_major, patchTensorRange);\n  gpu_l_out_row_major.device(sycl_device)=gpu_l_in_col_major.swap_layout().extract_image_patches(11, 11);\n  sycl_device.memcpyDeviceToHost(l_out_row_major.data(), gpu_data_l_out_row_major, patchTensorBuffSize);\n\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(0), sizeDim4);\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(1), sizeDim2*sizeDim3);\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(2), 11);\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(3), 11);\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(4), sizeDim1);\n\n  for (IndexType b = 0; b < 16; ++b) {\n    for (IndexType i = 0; i < 128; ++i) {\n      for (IndexType j = 0; j < 128; ++j) {\n        IndexType patchId = i+128*j;\n        for (IndexType c = 0; c < 11; ++c) {\n          for (IndexType r = 0; r < 11; ++r) {\n            for (IndexType d = 0; d < 3; ++d) {\n              DataType expected = 0.0f;\n              if (r-5+i >= 0 && c-5+j >= 0 && r-5+i < 128 && c-5+j < 128) {\n                expected = l_in_col_major(d, r-5+i, c-5+j, b);\n              }\n              // ColMajor\n              if (l_out_col_major(d, r, c, patchId, b) != expected) {\n                std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << \" b=\" << b << std::endl;\n              }\n              VERIFY_IS_EQUAL(l_out_col_major(d, r, c, patchId, b), expected);\n              // RowMajor\n              if (l_out_row_major(b, patchId, c, r, d) !=\n                  expected) {\n                std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j\n                     << \" r=\" << r << \" c=\" << c << \" d=\" << d << \" b=\" << b\n                     << std::endl;\n              }\n              VERIFY_IS_EQUAL(l_out_row_major(b, patchId, c, r, d),\n                              expected);\n            }\n          }\n        }\n      }\n    }\n  }\n\n  // ColMajor\n  sycl_device.deallocate(gpu_data_l_in_col_major);\n  sycl_device.deallocate(gpu_data_l_out_col_major);\n  sizeDim1 = 16;\n  sizeDim2 = 64;\n  sizeDim3 = 64;\n  sizeDim4 = 32;\n  tensorColMajorRange = {{sizeDim1, sizeDim2, sizeDim3, sizeDim4}};\n  l_in_col_major.resize(tensorColMajorRange);\n  l_in_col_major.setRandom();\n  gpu_data_l_in_col_major  = static_cast<DataType*>(sycl_device.allocate(l_in_col_major.size()*sizeof(DataType)));\n  TensorMap<Tensor<DataType, 4, ColMajor, IndexType>>gpu_l_in_col_major_resize1(gpu_data_l_in_col_major, tensorColMajorRange);\n\n  patchTensorRange={{sizeDim1, 9, 9, sizeDim2*sizeDim3, sizeDim4}};\n  l_out_col_major.resize(patchTensorRange);\n  patchTensorBuffSize =l_out_col_major.size()*sizeof(DataType);\n  gpu_data_l_out_col_major  = static_cast<DataType*>(sycl_device.allocate(patchTensorBuffSize));\n  TensorMap<Tensor<DataType, 5, DataLayout,IndexType>>gpu_l_out_col_major_resize1(gpu_data_l_out_col_major, patchTensorRange);\n  sycl_device.memcpyHostToDevice(gpu_data_l_in_col_major, l_in_col_major.data(),(l_in_col_major.size())*sizeof(DataType));\n  gpu_l_out_col_major_resize1.device(sycl_device)=gpu_l_in_col_major_resize1.extract_image_patches(9, 9);\n  sycl_device.memcpyDeviceToHost(l_out_col_major.data(), gpu_data_l_out_col_major, patchTensorBuffSize);\n  VERIFY_IS_EQUAL(l_out_col_major.dimension(0), 16);\n  VERIFY_IS_EQUAL(l_out_col_major.dimension(1), 9);\n  VERIFY_IS_EQUAL(l_out_col_major.dimension(2), 9);\n  VERIFY_IS_EQUAL(l_out_col_major.dimension(3), 64*64);\n  VERIFY_IS_EQUAL(l_out_col_major.dimension(4), 32);\n\n// RowMajor\n  sycl_device.deallocate(gpu_data_l_out_row_major);\n  patchTensorRange={{sizeDim4, sizeDim2*sizeDim3, 9, 9 ,sizeDim1}};\n  l_out_row_major.resize(patchTensorRange);\n  patchTensorBuffSize =l_out_row_major.size()*sizeof(DataType);\n  gpu_data_l_out_row_major  = static_cast<DataType*>(sycl_device.allocate(patchTensorBuffSize));\n  TensorMap<Tensor<DataType, 5, RowMajor,IndexType>>gpu_l_out_row_major_resize1(gpu_data_l_out_row_major, patchTensorRange);\n  gpu_l_out_row_major_resize1.device(sycl_device)=gpu_l_in_col_major_resize1.swap_layout().extract_image_patches(9, 9);\n  sycl_device.memcpyDeviceToHost(l_out_row_major.data(), gpu_data_l_out_row_major, patchTensorBuffSize);\n\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(0), 32);\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(1), 64*64);\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(2), 9);\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(3), 9);\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(4), 16);\n\n  for (IndexType b = 0; b < 32; ++b) {\n    for (IndexType i = 0; i < 64; ++i) {\n      for (IndexType j = 0; j < 64; ++j) {\n        IndexType patchId = i+64*j;\n        for (IndexType c = 0; c < 9; ++c) {\n          for (IndexType r = 0; r < 9; ++r) {\n            for (IndexType d = 0; d < 16; ++d) {\n              DataType expected = 0.0f;\n              if (r-4+i >= 0 && c-4+j >= 0 && r-4+i < 64 && c-4+j < 64) {\n                expected = l_in_col_major(d, r-4+i, c-4+j, b);\n              }\n              // ColMajor\n              if (l_out_col_major(d, r, c, patchId, b) != expected) {\n                std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << \" b=\" << b << std::endl;\n              }\n              VERIFY_IS_EQUAL(l_out_col_major(d, r, c, patchId, b), expected);\n              // RowMajor\n              if (l_out_row_major(b, patchId, c, r, d) != expected) {\n                std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << \" b=\" << b << std::endl;\n              }\n              VERIFY_IS_EQUAL(l_out_row_major(b, patchId, c, r, d), expected);\n            }\n          }\n        }\n      }\n    }\n  }\n\n  // ColMajor\n\n  sycl_device.deallocate(gpu_data_l_in_col_major);\n  sycl_device.deallocate(gpu_data_l_out_col_major);\n  sizeDim1 = 32;\n  sizeDim2 = 16;\n  sizeDim3 = 16;\n  sizeDim4 = 32;\n  tensorColMajorRange = {{sizeDim1, sizeDim2, sizeDim3, sizeDim4}};\n  l_in_col_major.resize(tensorColMajorRange);\n  l_in_col_major.setRandom();\n  gpu_data_l_in_col_major  = static_cast<DataType*>(sycl_device.allocate(l_in_col_major.size()*sizeof(DataType)));\n  TensorMap<Tensor<DataType, 4, ColMajor, IndexType>>gpu_l_in_col_major_resize2(gpu_data_l_in_col_major, tensorColMajorRange);\n\n  patchTensorRange={{sizeDim1, 7, 7, sizeDim2*sizeDim3, sizeDim4}};\n  l_out_col_major.resize(patchTensorRange);\n  patchTensorBuffSize =l_out_col_major.size()*sizeof(DataType);\n  gpu_data_l_out_col_major  = static_cast<DataType*>(sycl_device.allocate(patchTensorBuffSize));\n  TensorMap<Tensor<DataType, 5, DataLayout,IndexType>>gpu_l_out_col_major_resize2(gpu_data_l_out_col_major, patchTensorRange);\n  sycl_device.memcpyHostToDevice(gpu_data_l_in_col_major, l_in_col_major.data(),(l_in_col_major.size())*sizeof(DataType));\n  gpu_l_out_col_major_resize2.device(sycl_device)=gpu_l_in_col_major_resize2.extract_image_patches(7, 7);\n  sycl_device.memcpyDeviceToHost(l_out_col_major.data(), gpu_data_l_out_col_major, patchTensorBuffSize);\n\n  VERIFY_IS_EQUAL(l_out_col_major.dimension(0), 32);\n  VERIFY_IS_EQUAL(l_out_col_major.dimension(1), 7);\n  VERIFY_IS_EQUAL(l_out_col_major.dimension(2), 7);\n  VERIFY_IS_EQUAL(l_out_col_major.dimension(3), 16*16);\n  VERIFY_IS_EQUAL(l_out_col_major.dimension(4), 32);\n\n  // RowMajor\n  sycl_device.deallocate(gpu_data_l_out_row_major);\n  patchTensorRange={{sizeDim4, sizeDim2*sizeDim3, 7, 7 ,sizeDim1}};\n  l_out_row_major.resize(patchTensorRange);\n  patchTensorBuffSize =l_out_row_major.size()*sizeof(DataType);\n  gpu_data_l_out_row_major  = static_cast<DataType*>(sycl_device.allocate(patchTensorBuffSize));\n  TensorMap<Tensor<DataType, 5, RowMajor,IndexType>>gpu_l_out_row_major_resize2(gpu_data_l_out_row_major, patchTensorRange);\n  gpu_l_out_row_major_resize2.device(sycl_device)=gpu_l_in_col_major_resize2.swap_layout().extract_image_patches(7, 7);\n  sycl_device.memcpyDeviceToHost(l_out_row_major.data(), gpu_data_l_out_row_major, patchTensorBuffSize);\n\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(0), 32);\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(1), 16*16);\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(2), 7);\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(3), 7);\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(4), 32);\n\n  for (IndexType b = 0; b < 32; ++b) {\n    for (IndexType i = 0; i < 16; ++i) {\n      for (IndexType j = 0; j < 16; ++j) {\n        IndexType patchId = i+16*j;\n        for (IndexType c = 0; c < 7; ++c) {\n          for (IndexType r = 0; r < 7; ++r) {\n            for (IndexType d = 0; d < 32; ++d) {\n              DataType expected = 0.0f;\n              if (r-3+i >= 0 && c-3+j >= 0 && r-3+i < 16 && c-3+j < 16) {\n                expected = l_in_col_major(d, r-3+i, c-3+j, b);\n              }\n              // ColMajor\n              if (l_out_col_major(d, r, c, patchId, b) != expected) {\n                std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << \" b=\" << b << std::endl;\n              }\n              VERIFY_IS_EQUAL(l_out_col_major(d, r, c, patchId, b), expected);\n              // RowMajor\n              if (l_out_row_major(b, patchId, c, r, d) != expected) {\n                std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << \" b=\" << b << std::endl;\n              }\n              VERIFY_IS_EQUAL(l_out_row_major(b, patchId, c, r, d), expected);\n            }\n          }\n        }\n      }\n    }\n  }\n\n  // ColMajor\n  sycl_device.deallocate(gpu_data_l_in_col_major);\n  sycl_device.deallocate(gpu_data_l_out_col_major);\n  sizeDim1 = 64;\n  sizeDim2 = 13;\n  sizeDim3 = 13;\n  sizeDim4 = 32;\n  tensorColMajorRange = {{sizeDim1, sizeDim2, sizeDim3, sizeDim4}};\n  l_in_col_major.resize(tensorColMajorRange);\n  l_in_col_major.setRandom();\n  gpu_data_l_in_col_major  = static_cast<DataType*>(sycl_device.allocate(l_in_col_major.size()*sizeof(DataType)));\n  TensorMap<Tensor<DataType, 4, ColMajor, IndexType>>gpu_l_in_col_major_resize3(gpu_data_l_in_col_major, tensorColMajorRange);\n\n  patchTensorRange={{sizeDim1, 3, 3, sizeDim2*sizeDim3, sizeDim4}};\n  l_out_col_major.resize(patchTensorRange);\n  patchTensorBuffSize =l_out_col_major.size()*sizeof(DataType);\n  gpu_data_l_out_col_major  = static_cast<DataType*>(sycl_device.allocate(patchTensorBuffSize));\n  TensorMap<Tensor<DataType, 5, DataLayout,IndexType>>gpu_l_out_col_major_resize3(gpu_data_l_out_col_major, patchTensorRange);\n  sycl_device.memcpyHostToDevice(gpu_data_l_in_col_major, l_in_col_major.data(),(l_in_col_major.size())*sizeof(DataType));\n  gpu_l_out_col_major_resize3.device(sycl_device)=gpu_l_in_col_major_resize3.extract_image_patches(3, 3);\n  sycl_device.memcpyDeviceToHost(l_out_col_major.data(), gpu_data_l_out_col_major, patchTensorBuffSize);\n\n  VERIFY_IS_EQUAL(l_out_col_major.dimension(0), 64);\n  VERIFY_IS_EQUAL(l_out_col_major.dimension(1), 3);\n  VERIFY_IS_EQUAL(l_out_col_major.dimension(2), 3);\n  VERIFY_IS_EQUAL(l_out_col_major.dimension(3), 13*13);\n  VERIFY_IS_EQUAL(l_out_col_major.dimension(4), 32);\n\n  // RowMajor\n  sycl_device.deallocate(gpu_data_l_out_row_major);\n  patchTensorRange={{sizeDim4, sizeDim2*sizeDim3, 3, 3 ,sizeDim1}};\n  l_out_row_major.resize(patchTensorRange);\n  patchTensorBuffSize =l_out_row_major.size()*sizeof(DataType);\n  gpu_data_l_out_row_major  = static_cast<DataType*>(sycl_device.allocate(patchTensorBuffSize));\n  TensorMap<Tensor<DataType, 5, RowMajor,IndexType>>gpu_l_out_row_major_resize3(gpu_data_l_out_row_major, patchTensorRange);\n  gpu_l_out_row_major_resize3.device(sycl_device)=gpu_l_in_col_major_resize3.swap_layout().extract_image_patches(3, 3);\n  sycl_device.memcpyDeviceToHost(l_out_row_major.data(), gpu_data_l_out_row_major, patchTensorBuffSize);\n\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(0), 32);\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(1), 13*13);\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(2), 3);\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(3), 3);\n  VERIFY_IS_EQUAL(l_out_row_major.dimension(4), 64);\n\n  for (IndexType b = 0; b < 32; ++b) {\n    for (IndexType i = 0; i < 13; ++i) {\n      for (IndexType j = 0; j < 13; ++j) {\n        IndexType patchId = i+13*j;\n        for (IndexType c = 0; c < 3; ++c) {\n          for (IndexType r = 0; r < 3; ++r) {\n            for (IndexType d = 0; d < 64; ++d) {\n              DataType expected = 0.0f;\n              if (r-1+i >= 0 && c-1+j >= 0 && r-1+i < 13 && c-1+j < 13) {\n                expected = l_in_col_major(d, r-1+i, c-1+j, b);\n              }\n              // ColMajor\n              if (l_out_col_major(d, r, c, patchId, b) != expected) {\n                std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << \" b=\" << b << std::endl;\n              }\n              VERIFY_IS_EQUAL(l_out_col_major(d, r, c, patchId, b), expected);\n              // RowMajor\n              if (l_out_row_major(b, patchId, c, r, d) != expected) {\n                std::cout << \"Mismatch detected at index i=\" << i << \" j=\" << j << \" r=\" << r << \" c=\" << c << \" d=\" << d << \" b=\" << b << std::endl;\n              }\n              VERIFY_IS_EQUAL(l_out_row_major(b, patchId, c, r, d), expected);\n            }\n          }\n        }\n      }\n    }\n  }\n  sycl_device.deallocate(gpu_data_l_in_col_major);\n  sycl_device.deallocate(gpu_data_l_out_col_major);\n  sycl_device.deallocate(gpu_data_l_out_row_major);\n}\n\n\ntemplate<typename DataType, typename dev_Selector> void sycl_tensor_image_patch_test_per_device(dev_Selector s){\nQueueInterface queueInterface(s);\nauto sycl_device = Eigen::SyclDevice(&queueInterface);\ntest_simple_image_patch_sycl<DataType, int64_t>(sycl_device);\ntest_patch_padding_valid_sycl<DataType, int64_t>(sycl_device);\ntest_patch_padding_valid_same_value_sycl<DataType, int64_t>(sycl_device);\ntest_patch_padding_same_sycl<DataType, int64_t>(sycl_device);\ntest_patch_no_extra_dim_sycl<DataType, int64_t>(sycl_device);\ntest_imagenet_patches_sycl<DataType, int64_t>(sycl_device);\n}\nEIGEN_DECLARE_TEST(cxx11_tensor_image_patch_sycl)\n{\nfor (const auto& device :Eigen::get_sycl_supported_devices()) {\n  CALL_SUBTEST(sycl_tensor_image_patch_test_per_device<float>(device));\n}\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_index_list.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\n#ifdef EIGEN_HAS_INDEX_LIST\n\nstatic void test_static_index_list()\n{\n  Tensor<float, 4> tensor(2,3,5,7);\n  tensor.setRandom();\n\n  constexpr auto reduction_axis = make_index_list(0, 1, 2);\n  VERIFY_IS_EQUAL(internal::array_get<0>(reduction_axis), 0);\n  VERIFY_IS_EQUAL(internal::array_get<1>(reduction_axis), 1);\n  VERIFY_IS_EQUAL(internal::array_get<2>(reduction_axis), 2);\n  VERIFY_IS_EQUAL(static_cast<Index>(reduction_axis[0]), 0);\n  VERIFY_IS_EQUAL(static_cast<Index>(reduction_axis[1]), 1);\n  VERIFY_IS_EQUAL(static_cast<Index>(reduction_axis[2]), 2);\n\n  EIGEN_STATIC_ASSERT((internal::array_get<0>(reduction_axis) == 0), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((internal::array_get<1>(reduction_axis) == 1), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((internal::array_get<2>(reduction_axis) == 2), YOU_MADE_A_PROGRAMMING_MISTAKE);\n\n  Tensor<float, 1> result = tensor.sum(reduction_axis);\n  for (int i = 0; i < result.size(); ++i) {\n    float expected = 0.0f;\n    for (int j = 0; j < 2; ++j) {\n      for (int k = 0; k < 3; ++k) {\n        for (int l = 0; l < 5; ++l) {\n          expected += tensor(j,k,l,i);\n        }\n      }\n    }\n    VERIFY_IS_APPROX(result(i), expected);\n  }\n}\n\n\nstatic void test_type2index_list()\n{\n  Tensor<float, 5> tensor(2,3,5,7,11);\n  tensor.setRandom();\n  tensor += tensor.constant(10.0f);\n\n  typedef Eigen::IndexList<Eigen::type2index<0>> Dims0;\n  typedef Eigen::IndexList<Eigen::type2index<0>, Eigen::type2index<1>> Dims1;\n  typedef Eigen::IndexList<Eigen::type2index<0>, Eigen::type2index<1>, Eigen::type2index<2>> Dims2;\n  typedef Eigen::IndexList<Eigen::type2index<0>, Eigen::type2index<1>, Eigen::type2index<2>, Eigen::type2index<3>> Dims3;\n  typedef Eigen::IndexList<Eigen::type2index<0>, Eigen::type2index<1>, Eigen::type2index<2>, Eigen::type2index<3>, Eigen::type2index<4>> Dims4;\n\n#if 0\n  EIGEN_STATIC_ASSERT((internal::indices_statically_known_to_increase<Dims0>() == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((internal::indices_statically_known_to_increase<Dims1>() == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((internal::indices_statically_known_to_increase<Dims2>() == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((internal::indices_statically_known_to_increase<Dims3>() == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((internal::indices_statically_known_to_increase<Dims4>() == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n#endif\n\n  EIGEN_STATIC_ASSERT((internal::are_inner_most_dims<Dims0, 1, ColMajor>::value == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((internal::are_inner_most_dims<Dims1, 2, ColMajor>::value == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((internal::are_inner_most_dims<Dims2, 3, ColMajor>::value == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((internal::are_inner_most_dims<Dims3, 4, ColMajor>::value == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((internal::are_inner_most_dims<Dims4, 5, ColMajor>::value == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n\n  EIGEN_STATIC_ASSERT((internal::are_inner_most_dims<Dims0, 1, RowMajor>::value == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((internal::are_inner_most_dims<Dims1, 2, RowMajor>::value == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((internal::are_inner_most_dims<Dims2, 3, RowMajor>::value == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((internal::are_inner_most_dims<Dims3, 4, RowMajor>::value == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((internal::are_inner_most_dims<Dims4, 5, RowMajor>::value == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n\n  const Dims0 reduction_axis0;\n  Tensor<float, 4> result0 = tensor.sum(reduction_axis0);\n  for (int m = 0; m < 11; ++m) {\n    for (int l = 0; l < 7; ++l) {\n      for (int k = 0; k < 5; ++k) {\n        for (int j = 0; j < 3; ++j) {\n          float expected = 0.0f;\n          for (int i = 0; i < 2; ++i) {\n            expected += tensor(i,j,k,l,m);\n          }\n          VERIFY_IS_APPROX(result0(j,k,l,m), expected);\n        }\n      }\n    }\n  }\n\n  const Dims1 reduction_axis1;\n  Tensor<float, 3> result1 = tensor.sum(reduction_axis1);\n  for (int m = 0; m < 11; ++m) {\n    for (int l = 0; l < 7; ++l) {\n      for (int k = 0; k < 5; ++k) {\n        float expected = 0.0f;\n        for (int j = 0; j < 3; ++j) {\n          for (int i = 0; i < 2; ++i) {\n            expected += tensor(i,j,k,l,m);\n          }\n        }\n        VERIFY_IS_APPROX(result1(k,l,m), expected);\n      }\n    }\n  }\n\n  const Dims2 reduction_axis2;\n  Tensor<float, 2> result2 = tensor.sum(reduction_axis2);\n  for (int m = 0; m < 11; ++m) {\n    for (int l = 0; l < 7; ++l) {\n      float expected = 0.0f;\n      for (int k = 0; k < 5; ++k) {\n        for (int j = 0; j < 3; ++j) {\n          for (int i = 0; i < 2; ++i) {\n            expected += tensor(i,j,k,l,m);\n          }\n        }\n      }\n      VERIFY_IS_APPROX(result2(l,m), expected);\n    }\n  }\n\n  const Dims3 reduction_axis3;\n  Tensor<float, 1> result3 = tensor.sum(reduction_axis3);\n  for (int m = 0; m < 11; ++m) {\n    float expected = 0.0f;\n    for (int l = 0; l < 7; ++l) {\n      for (int k = 0; k < 5; ++k) {\n        for (int j = 0; j < 3; ++j) {\n          for (int i = 0; i < 2; ++i) {\n            expected += tensor(i,j,k,l,m);\n          }\n        }\n      }\n    }\n    VERIFY_IS_APPROX(result3(m), expected);\n  }\n\n  const Dims4 reduction_axis4;\n  Tensor<float, 0> result4 = tensor.sum(reduction_axis4);\n  float expected = 0.0f;\n  for (int m = 0; m < 11; ++m) {\n    for (int l = 0; l < 7; ++l) {\n      for (int k = 0; k < 5; ++k) {\n        for (int j = 0; j < 3; ++j) {\n          for (int i = 0; i < 2; ++i) {\n            expected += tensor(i,j,k,l,m);\n          }\n        }\n      }\n    }\n  }\n  VERIFY_IS_APPROX(result4(), expected);\n}\n\n\nstatic void test_type2indexpair_list()\n{\n  Tensor<float, 5> tensor(2,3,5,7,11);\n  tensor.setRandom();\n  tensor += tensor.constant(10.0f);\n\n  typedef Eigen::IndexPairList<Eigen::type2indexpair<0,10>> Dims0;\n  typedef Eigen::IndexPairList<Eigen::type2indexpair<0,10>, Eigen::type2indexpair<1,11>, Eigen::type2indexpair<2,12>> Dims2_a;\n  typedef Eigen::IndexPairList<Eigen::type2indexpair<0,10>, Eigen::IndexPair<Index>, Eigen::type2indexpair<2,12>> Dims2_b;\n  typedef Eigen::IndexPairList<Eigen::IndexPair<Index>, Eigen::type2indexpair<1,11>, Eigen::IndexPair<Index>> Dims2_c;\n\n  Dims2_a d2_a;\n\n  Dims2_b d2_b;\n  d2_b.set(1, Eigen::IndexPair<Index>(1,11));\n\n  Dims2_c d2_c;\n  d2_c.set(0, Eigen::IndexPair<Index>(Eigen::IndexPair<Index>(0,10)));\n  d2_c.set(1, Eigen::IndexPair<Index>(1,11));  // setting type2indexpair to correct value.\n  d2_c.set(2, Eigen::IndexPair<Index>(2,12));\n\n  VERIFY_IS_EQUAL(d2_a[0].first, 0);\n  VERIFY_IS_EQUAL(d2_a[0].second, 10);\n  VERIFY_IS_EQUAL(d2_a[1].first, 1);\n  VERIFY_IS_EQUAL(d2_a[1].second, 11);\n  VERIFY_IS_EQUAL(d2_a[2].first, 2);\n  VERIFY_IS_EQUAL(d2_a[2].second, 12);\n\n  VERIFY_IS_EQUAL(d2_b[0].first, 0);\n  VERIFY_IS_EQUAL(d2_b[0].second, 10);\n  VERIFY_IS_EQUAL(d2_b[1].first, 1);\n  VERIFY_IS_EQUAL(d2_b[1].second, 11);\n  VERIFY_IS_EQUAL(d2_b[2].first, 2);\n  VERIFY_IS_EQUAL(d2_b[2].second, 12);\n\n  VERIFY_IS_EQUAL(d2_c[0].first, 0);\n  VERIFY_IS_EQUAL(d2_c[0].second, 10);\n  VERIFY_IS_EQUAL(d2_c[1].first, 1);\n  VERIFY_IS_EQUAL(d2_c[1].second, 11);\n  VERIFY_IS_EQUAL(d2_c[2].first, 2);\n  VERIFY_IS_EQUAL(d2_c[2].second, 12);\n\n  EIGEN_STATIC_ASSERT((d2_a.value_known_statically(0) == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((d2_a.value_known_statically(1) == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((d2_a.value_known_statically(2) == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n\n  EIGEN_STATIC_ASSERT((d2_b.value_known_statically(0) == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((d2_b.value_known_statically(1) == false), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((d2_b.value_known_statically(2) == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n\n  EIGEN_STATIC_ASSERT((d2_c.value_known_statically(0) == false), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((d2_c.value_known_statically(1) == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((d2_c.value_known_statically(2) == false), YOU_MADE_A_PROGRAMMING_MISTAKE);\n\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_first_statically_eq<Dims0>(0, 0) == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_first_statically_eq<Dims0>(0, 1) == false), YOU_MADE_A_PROGRAMMING_MISTAKE);\n\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_first_statically_eq<Dims2_a>(0, 0) == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_first_statically_eq<Dims2_a>(0, 1) == false), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_first_statically_eq<Dims2_a>(1, 1) == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_first_statically_eq<Dims2_a>(1, 2) == false), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_first_statically_eq<Dims2_a>(2, 2) == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_first_statically_eq<Dims2_a>(2, 3) == false), YOU_MADE_A_PROGRAMMING_MISTAKE);\n\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_first_statically_eq<Dims2_b>(0, 0) == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_first_statically_eq<Dims2_b>(0, 1) == false), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_first_statically_eq<Dims2_b>(1, 1) == false), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_first_statically_eq<Dims2_b>(1, 2) == false), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_first_statically_eq<Dims2_b>(2, 2) == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_first_statically_eq<Dims2_b>(2, 3) == false), YOU_MADE_A_PROGRAMMING_MISTAKE);\n\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_first_statically_eq<Dims2_c>(0, 0) == false), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_first_statically_eq<Dims2_c>(0, 1) == false), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_first_statically_eq<Dims2_c>(1, 1) == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_first_statically_eq<Dims2_c>(1, 2) == false), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_first_statically_eq<Dims2_c>(2, 2) == false), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_first_statically_eq<Dims2_c>(2, 3) == false), YOU_MADE_A_PROGRAMMING_MISTAKE);\n\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_second_statically_eq<Dims0>(0, 10) == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_second_statically_eq<Dims0>(0, 11) == false), YOU_MADE_A_PROGRAMMING_MISTAKE);\n\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_second_statically_eq<Dims2_a>(0, 10) == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_second_statically_eq<Dims2_a>(0, 11) == false), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_second_statically_eq<Dims2_a>(1, 11) == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_second_statically_eq<Dims2_a>(1, 12) == false), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_second_statically_eq<Dims2_a>(2, 12) == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_second_statically_eq<Dims2_a>(2, 13) == false), YOU_MADE_A_PROGRAMMING_MISTAKE);\n\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_second_statically_eq<Dims2_b>(0, 10) == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_second_statically_eq<Dims2_b>(0, 11) == false), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_second_statically_eq<Dims2_b>(1, 11) == false), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_second_statically_eq<Dims2_b>(1, 12) == false), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_second_statically_eq<Dims2_b>(2, 12) == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_second_statically_eq<Dims2_b>(2, 13) == false), YOU_MADE_A_PROGRAMMING_MISTAKE);\n\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_second_statically_eq<Dims2_c>(0, 10) == false), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_second_statically_eq<Dims2_c>(0, 11) == false), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_second_statically_eq<Dims2_c>(1, 11) == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_second_statically_eq<Dims2_c>(1, 12) == false), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_second_statically_eq<Dims2_c>(2, 12) == false), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((Eigen::internal::index_pair_second_statically_eq<Dims2_c>(2, 13) == false), YOU_MADE_A_PROGRAMMING_MISTAKE);\n}\n\n\nstatic void test_dynamic_index_list()\n{\n  Tensor<float, 4> tensor(2,3,5,7);\n  tensor.setRandom();\n\n  int dim1 = 2;\n  int dim2 = 1;\n  int dim3 = 0;\n\n  auto reduction_axis = make_index_list(dim1, dim2, dim3);\n\n  VERIFY_IS_EQUAL(internal::array_get<0>(reduction_axis), 2);\n  VERIFY_IS_EQUAL(internal::array_get<1>(reduction_axis), 1);\n  VERIFY_IS_EQUAL(internal::array_get<2>(reduction_axis), 0);\n  VERIFY_IS_EQUAL(static_cast<Index>(reduction_axis[0]), 2);\n  VERIFY_IS_EQUAL(static_cast<Index>(reduction_axis[1]), 1);\n  VERIFY_IS_EQUAL(static_cast<Index>(reduction_axis[2]), 0);\n\n  Tensor<float, 1> result = tensor.sum(reduction_axis);\n  for (int i = 0; i < result.size(); ++i) {\n    float expected = 0.0f;\n    for (int j = 0; j < 2; ++j) {\n      for (int k = 0; k < 3; ++k) {\n        for (int l = 0; l < 5; ++l) {\n          expected += tensor(j,k,l,i);\n        }\n      }\n    }\n    VERIFY_IS_APPROX(result(i), expected);\n  }\n}\n\nstatic void test_mixed_index_list()\n{\n  Tensor<float, 4> tensor(2,3,5,7);\n  tensor.setRandom();\n\n  int dim2 = 1;\n  int dim4 = 3;\n\n  auto reduction_axis = make_index_list(0, dim2, 2, dim4);\n\n  VERIFY_IS_EQUAL(internal::array_get<0>(reduction_axis), 0);\n  VERIFY_IS_EQUAL(internal::array_get<1>(reduction_axis), 1);\n  VERIFY_IS_EQUAL(internal::array_get<2>(reduction_axis), 2);\n  VERIFY_IS_EQUAL(internal::array_get<3>(reduction_axis), 3);\n  VERIFY_IS_EQUAL(static_cast<Index>(reduction_axis[0]), 0);\n  VERIFY_IS_EQUAL(static_cast<Index>(reduction_axis[1]), 1);\n  VERIFY_IS_EQUAL(static_cast<Index>(reduction_axis[2]), 2);\n  VERIFY_IS_EQUAL(static_cast<Index>(reduction_axis[3]), 3);\n\n  typedef IndexList<type2index<0>, int, type2index<2>, int> ReductionIndices;\n  ReductionIndices reduction_indices;\n  reduction_indices.set(1, 1);\n  reduction_indices.set(3, 3);\n  EIGEN_STATIC_ASSERT((internal::array_get<0>(reduction_indices) == 0), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((internal::array_get<2>(reduction_indices) == 2), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((internal::index_known_statically<ReductionIndices>(0) == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((internal::index_known_statically<ReductionIndices>(2) == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((internal::index_statically_eq<ReductionIndices>(0, 0) == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((internal::index_statically_eq<ReductionIndices>(2, 2) == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n#if 0\n  EIGEN_STATIC_ASSERT((internal::all_indices_known_statically<ReductionIndices>() == false), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((internal::indices_statically_known_to_increase<ReductionIndices>() == false), YOU_MADE_A_PROGRAMMING_MISTAKE);\n#endif\n\n  typedef IndexList<type2index<0>, type2index<1>, type2index<2>, type2index<3>> ReductionList;\n  ReductionList reduction_list;\n  EIGEN_STATIC_ASSERT((internal::index_statically_eq<ReductionList>(0, 0) == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((internal::index_statically_eq<ReductionList>(1, 1) == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((internal::index_statically_eq<ReductionList>(2, 2) == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((internal::index_statically_eq<ReductionList>(3, 3) == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n#if 0\n  EIGEN_STATIC_ASSERT((internal::all_indices_known_statically<ReductionList>() == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((internal::indices_statically_known_to_increase<ReductionList>() == true), YOU_MADE_A_PROGRAMMING_MISTAKE);\n#endif\n\n  Tensor<float, 0> result1 = tensor.sum(reduction_axis);\n  Tensor<float, 0> result2 = tensor.sum(reduction_indices);\n  Tensor<float, 0> result3 = tensor.sum(reduction_list);\n\n  float expected = 0.0f;\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 5; ++k) {\n        for (int l = 0; l < 7; ++l) {\n          expected += tensor(i,j,k,l);\n        }\n      }\n    }\n  }\n  VERIFY_IS_APPROX(result1(), expected);\n  VERIFY_IS_APPROX(result2(), expected);\n  VERIFY_IS_APPROX(result3(), expected);\n}\n\n\nstatic void test_dim_check()\n{\n  Eigen::IndexList<Eigen::type2index<1>, int> dim1;\n  dim1.set(1, 2);\n  Eigen::IndexList<Eigen::type2index<1>, int> dim2;\n  dim2.set(1, 2);\n  VERIFY(dimensions_match(dim1, dim2));\n}\n\n\n#endif\n\nEIGEN_DECLARE_TEST(cxx11_tensor_index_list)\n{\n#ifdef EIGEN_HAS_INDEX_LIST\n  CALL_SUBTEST(test_static_index_list());\n  CALL_SUBTEST(test_type2index_list());\n  CALL_SUBTEST(test_type2indexpair_list());\n  CALL_SUBTEST(test_dynamic_index_list());\n  CALL_SUBTEST(test_mixed_index_list());\n  CALL_SUBTEST(test_dim_check());\n#endif\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_inflation.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Ke Yang <yangke@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\n\ntemplate<int DataLayout>\nstatic void test_simple_inflation()\n{\n  Tensor<float, 4, DataLayout> tensor(2,3,5,7);\n  tensor.setRandom();\n  array<ptrdiff_t, 4> strides;\n\n  strides[0] = 1;\n  strides[1] = 1;\n  strides[2] = 1;\n  strides[3] = 1;\n\n  Tensor<float, 4, DataLayout> no_stride;\n  no_stride = tensor.inflate(strides);\n\n  VERIFY_IS_EQUAL(no_stride.dimension(0), 2);\n  VERIFY_IS_EQUAL(no_stride.dimension(1), 3);\n  VERIFY_IS_EQUAL(no_stride.dimension(2), 5);\n  VERIFY_IS_EQUAL(no_stride.dimension(3), 7);\n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 5; ++k) {\n        for (int l = 0; l < 7; ++l) {\n          VERIFY_IS_EQUAL(tensor(i,j,k,l), no_stride(i,j,k,l));\n        }\n      }\n    }\n  }\n\n  strides[0] = 2;\n  strides[1] = 4;\n  strides[2] = 2;\n  strides[3] = 3;\n  Tensor<float, 4, DataLayout> inflated;\n  inflated = tensor.inflate(strides);\n\n  VERIFY_IS_EQUAL(inflated.dimension(0), 3);\n  VERIFY_IS_EQUAL(inflated.dimension(1), 9);\n  VERIFY_IS_EQUAL(inflated.dimension(2), 9);\n  VERIFY_IS_EQUAL(inflated.dimension(3), 19);\n\n  for (int i = 0; i < 3; ++i) {\n    for (int j = 0; j < 9; ++j) {\n      for (int k = 0; k < 9; ++k) {\n        for (int l = 0; l < 19; ++l) {\n          if (i % 2 == 0 &&\n              j % 4 == 0 &&\n              k % 2 == 0 &&\n              l % 3 == 0) {\n            VERIFY_IS_EQUAL(inflated(i,j,k,l),\n                            tensor(i/2, j/4, k/2, l/3));\n          } else {\n            VERIFY_IS_EQUAL(0, inflated(i,j,k,l));\n          }\n        }\n      }\n    }\n  }\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_inflation)\n{\n  CALL_SUBTEST(test_simple_inflation<ColMajor>());\n  CALL_SUBTEST(test_simple_inflation<RowMajor>());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_inflation_sycl.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016\n// Mehdi Goli    Codeplay Software Ltd.\n// Ralph Potter  Codeplay Software Ltd.\n// Luke Iwanski  Codeplay Software Ltd.\n// Contact: <eigen@codeplay.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_TEST_NO_LONGDOUBLE\n#define EIGEN_TEST_NO_COMPLEX\n\n#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int64_t\n#define EIGEN_USE_SYCL\n\n#include \"main.h\"\n#include <unsupported/Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\n\n// Inflation Definition for each dimension the inflated val would be\n//((dim-1)*strid[dim] +1)\n\n// for 1 dimension vector of size 3 with value (4,4,4) with the inflated stride value of 3 would be changed to\n// tensor of size (2*3) +1 = 7 with the value of\n// (4, 0, 0, 4, 0, 0, 4).\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nvoid test_simple_inflation_sycl(const Eigen::SyclDevice &sycl_device) {\n\n\n  IndexType sizeDim1 = 2;\n  IndexType sizeDim2 = 3;\n  IndexType sizeDim3 = 5;\n  IndexType sizeDim4 = 7;\n  array<IndexType, 4> tensorRange = {{sizeDim1, sizeDim2, sizeDim3, sizeDim4}};\n  Tensor<DataType, 4, DataLayout,IndexType> tensor(tensorRange);\n  Tensor<DataType, 4, DataLayout,IndexType> no_stride(tensorRange);\n  tensor.setRandom();\n\n  array<IndexType, 4> strides;\n  strides[0] = 1;\n  strides[1] = 1;\n  strides[2] = 1;\n  strides[3] = 1;\n\n\n  const size_t tensorBuffSize =tensor.size()*sizeof(DataType);\n  DataType* gpu_data_tensor  = static_cast<DataType*>(sycl_device.allocate(tensorBuffSize));\n  DataType* gpu_data_no_stride  = static_cast<DataType*>(sycl_device.allocate(tensorBuffSize));\n\n  TensorMap<Tensor<DataType, 4, DataLayout,IndexType>> gpu_tensor(gpu_data_tensor, tensorRange);\n  TensorMap<Tensor<DataType, 4, DataLayout,IndexType>> gpu_no_stride(gpu_data_no_stride, tensorRange);\n\n  sycl_device.memcpyHostToDevice(gpu_data_tensor, tensor.data(), tensorBuffSize);\n  gpu_no_stride.device(sycl_device)=gpu_tensor.inflate(strides);\n  sycl_device.memcpyDeviceToHost(no_stride.data(), gpu_data_no_stride, tensorBuffSize);\n\n  VERIFY_IS_EQUAL(no_stride.dimension(0), sizeDim1);\n  VERIFY_IS_EQUAL(no_stride.dimension(1), sizeDim2);\n  VERIFY_IS_EQUAL(no_stride.dimension(2), sizeDim3);\n  VERIFY_IS_EQUAL(no_stride.dimension(3), sizeDim4);\n\n  for (IndexType i = 0; i < 2; ++i) {\n    for (IndexType j = 0; j < 3; ++j) {\n      for (IndexType k = 0; k < 5; ++k) {\n        for (IndexType l = 0; l < 7; ++l) {\n          VERIFY_IS_EQUAL(tensor(i,j,k,l), no_stride(i,j,k,l));\n        }\n      }\n    }\n  }\n\n\n  strides[0] = 2;\n  strides[1] = 4;\n  strides[2] = 2;\n  strides[3] = 3;\n\n  IndexType inflatedSizeDim1 = 3;\n  IndexType inflatedSizeDim2 = 9;\n  IndexType inflatedSizeDim3 = 9;\n  IndexType inflatedSizeDim4 = 19;\n  array<IndexType, 4> inflatedTensorRange = {{inflatedSizeDim1, inflatedSizeDim2, inflatedSizeDim3, inflatedSizeDim4}};\n\n  Tensor<DataType, 4, DataLayout, IndexType> inflated(inflatedTensorRange);\n\n  const size_t inflatedTensorBuffSize =inflated.size()*sizeof(DataType);\n  DataType* gpu_data_inflated  = static_cast<DataType*>(sycl_device.allocate(inflatedTensorBuffSize));\n  TensorMap<Tensor<DataType, 4, DataLayout, IndexType>> gpu_inflated(gpu_data_inflated, inflatedTensorRange);\n  gpu_inflated.device(sycl_device)=gpu_tensor.inflate(strides);\n  sycl_device.memcpyDeviceToHost(inflated.data(), gpu_data_inflated, inflatedTensorBuffSize);\n\n  VERIFY_IS_EQUAL(inflated.dimension(0), inflatedSizeDim1);\n  VERIFY_IS_EQUAL(inflated.dimension(1), inflatedSizeDim2);\n  VERIFY_IS_EQUAL(inflated.dimension(2), inflatedSizeDim3);\n  VERIFY_IS_EQUAL(inflated.dimension(3), inflatedSizeDim4);\n\n  for (IndexType i = 0; i < inflatedSizeDim1; ++i) {\n    for (IndexType j = 0; j < inflatedSizeDim2; ++j) {\n      for (IndexType k = 0; k < inflatedSizeDim3; ++k) {\n        for (IndexType l = 0; l < inflatedSizeDim4; ++l) {\n          if (i % strides[0] == 0 &&\n              j % strides[1] == 0 &&\n              k % strides[2] == 0 &&\n              l % strides[3] == 0) {\n            VERIFY_IS_EQUAL(inflated(i,j,k,l),\n                            tensor(i/strides[0], j/strides[1], k/strides[2], l/strides[3]));\n          } else {\n            VERIFY_IS_EQUAL(0, inflated(i,j,k,l));\n          }\n        }\n      }\n    }\n  }\n  sycl_device.deallocate(gpu_data_tensor);\n  sycl_device.deallocate(gpu_data_no_stride);\n  sycl_device.deallocate(gpu_data_inflated);\n}\n\ntemplate<typename DataType, typename dev_Selector> void sycl_inflation_test_per_device(dev_Selector s){\n  QueueInterface queueInterface(s);\n  auto sycl_device = Eigen::SyclDevice(&queueInterface);\n  test_simple_inflation_sycl<DataType, RowMajor, int64_t>(sycl_device);\n  test_simple_inflation_sycl<DataType, ColMajor, int64_t>(sycl_device);\n}\nEIGEN_DECLARE_TEST(cxx11_tensor_inflation_sycl)\n{\n  for (const auto& device :Eigen::get_sycl_supported_devices()) {\n    CALL_SUBTEST(sycl_inflation_test_per_device<float>(device));\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_intdiv.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014-2015 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\n\nvoid test_signed_32bit()\n{\n  // Divide by one\n  const Eigen::internal::TensorIntDivisor<int32_t, false> div_by_one(1);\n\n  for (int32_t j = 0; j < 25000; ++j) {\n    const int32_t fast_div = j / div_by_one;\n    const int32_t slow_div = j / 1;\n    VERIFY_IS_EQUAL(fast_div, slow_div);\n  }\n\n  // Standard divide by 2 or more\n  for (int32_t i = 2; i < 25000; ++i) {\n    const Eigen::internal::TensorIntDivisor<int32_t, false> div(i);\n\n    for (int32_t j = 0; j < 25000; ++j) {\n      const int32_t fast_div = j / div;\n      const int32_t slow_div = j / i;\n      VERIFY_IS_EQUAL(fast_div, slow_div);\n    }\n  }\n\n  // Optimized divide by 2 or more\n  for (int32_t i = 2; i < 25000; ++i) {\n    const Eigen::internal::TensorIntDivisor<int32_t, true> div(i);\n\n    for (int32_t j = 0; j < 25000; ++j) {\n      const int32_t fast_div = j / div;\n      const int32_t slow_div = j / i;\n      VERIFY_IS_EQUAL(fast_div, slow_div);\n    }\n  }\n}\n\n\nvoid test_unsigned_32bit()\n{\n  for (uint32_t i = 1; i < 25000; ++i) {\n    const Eigen::internal::TensorIntDivisor<uint32_t> div(i);\n\n    for (uint32_t j = 0; j < 25000; ++j) {\n      const uint32_t fast_div = j / div;\n      const uint32_t slow_div = j / i;\n      VERIFY_IS_EQUAL(fast_div, slow_div);\n    }\n  }\n}\n\n\nvoid test_signed_64bit()\n{\n  for (int64_t i = 1; i < 25000; ++i) {\n    const Eigen::internal::TensorIntDivisor<int64_t> div(i);\n\n    for (int64_t j = 0; j < 25000; ++j) {\n      const int64_t fast_div = j / div;\n      const int64_t slow_div = j / i;\n      VERIFY_IS_EQUAL(fast_div, slow_div);\n    }\n  }\n}\n\n\nvoid test_unsigned_64bit()\n{\n  for (uint64_t i = 1; i < 25000; ++i) {\n    const Eigen::internal::TensorIntDivisor<uint64_t> div(i);\n\n    for (uint64_t j = 0; j < 25000; ++j) {\n      const uint64_t fast_div = j / div;\n      const uint64_t slow_div = j / i;\n      VERIFY_IS_EQUAL(fast_div, slow_div);\n    }\n  }\n}\n\nvoid test_powers_32bit() {\n  for (int expon = 1; expon < 31; expon++) {\n    int32_t div = (1 << expon);\n    for (int num_expon = 0; num_expon < 32; num_expon++) {\n      int32_t start_num = (1 << num_expon) - 100;\n      int32_t end_num = (1 << num_expon) + 100;\n      if (start_num < 0)\n        start_num = 0;\n      for (int32_t num = start_num; num < end_num; num++) {\n        Eigen::internal::TensorIntDivisor<int32_t> divider =\n          Eigen::internal::TensorIntDivisor<int32_t>(div);\n        int32_t result = num/div;\n        int32_t result_op = divider.divide(num);\n        VERIFY_IS_EQUAL(result_op, result);\n      }\n    }\n  }\n}\n\nvoid test_powers_64bit() {\n  for (int expon = 0; expon < 63; expon++) {\n    int64_t div = (1ull << expon);\n    for (int num_expon = 0; num_expon < 63; num_expon++) {\n      int64_t start_num = (1ull << num_expon) - 10;\n      int64_t end_num = (1ull << num_expon) + 10;\n      if (start_num < 0)\n        start_num = 0;\n      for (int64_t num = start_num; num < end_num; num++) {\n        Eigen::internal::TensorIntDivisor<int64_t> divider(div);\n        int64_t result = num/div;\n        int64_t result_op = divider.divide(num);\n        VERIFY_IS_EQUAL(result_op, result);\n      }\n    }\n  }\n}\n\nvoid test_specific() {\n  // A particular combination that was previously failing\n  int64_t div = 209715200;\n  int64_t num = 3238002688ll;\n  Eigen::internal::TensorIntDivisor<int64_t> divider(div);\n  int64_t result = num/div;\n  int64_t result_op = divider.divide(num);\n  VERIFY_IS_EQUAL(result, result_op);\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_intdiv)\n{\n  CALL_SUBTEST_1(test_signed_32bit());\n  CALL_SUBTEST_2(test_unsigned_32bit());\n  CALL_SUBTEST_3(test_signed_64bit());\n  CALL_SUBTEST_4(test_unsigned_64bit());\n  CALL_SUBTEST_5(test_powers_32bit());\n  CALL_SUBTEST_6(test_powers_64bit());\n  CALL_SUBTEST_7(test_specific());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_io.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <sstream>\n#include <string>\n#include <Eigen/CXX11/Tensor>\n\n\ntemplate<int DataLayout>\nstatic void test_output_0d()\n{\n  Tensor<int, 0, DataLayout> tensor;\n  tensor() = 123;\n\n  std::stringstream os;\n  os << tensor;\n\n  std::string expected(\"123\");\n  VERIFY_IS_EQUAL(std::string(os.str()), expected);\n}\n\n\ntemplate<int DataLayout>\nstatic void test_output_1d()\n{\n  Tensor<int, 1, DataLayout> tensor(5);\n  for (int i = 0; i < 5; ++i) {\n    tensor(i) = i;\n  }\n\n  std::stringstream os;\n  os << tensor;\n\n  std::string expected(\"0\\n1\\n2\\n3\\n4\");\n  VERIFY_IS_EQUAL(std::string(os.str()), expected);\n\n  Eigen::Tensor<double,1,DataLayout> empty_tensor(0);\n  std::stringstream empty_os;\n  empty_os << empty_tensor;\n  std::string empty_string;\n  VERIFY_IS_EQUAL(std::string(empty_os.str()), empty_string);\n}\n\n\ntemplate<int DataLayout>\nstatic void test_output_2d()\n{\n  Tensor<int, 2, DataLayout> tensor(5, 3);\n  for (int i = 0; i < 5; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      tensor(i, j) = i*j;\n    }\n  }\n\n  std::stringstream os;\n  os << tensor;\n\n  std::string expected(\"0  0  0\\n0  1  2\\n0  2  4\\n0  3  6\\n0  4  8\");\n  VERIFY_IS_EQUAL(std::string(os.str()), expected);\n}\n\n\ntemplate<int DataLayout>\nstatic void test_output_expr()\n{\n  Tensor<int, 1, DataLayout> tensor1(5);\n  Tensor<int, 1, DataLayout> tensor2(5);\n  for (int i = 0; i < 5; ++i) {\n    tensor1(i) = i;\n    tensor2(i) = 7;\n  }\n\n  std::stringstream os;\n  os << tensor1 + tensor2;\n\n  std::string expected(\" 7\\n 8\\n 9\\n10\\n11\");\n  VERIFY_IS_EQUAL(std::string(os.str()), expected);\n}\n\n\ntemplate<int DataLayout>\nstatic void test_output_string()\n{\n  Tensor<std::string, 2, DataLayout> tensor(5, 3);\n  tensor.setConstant(std::string(\"foo\"));\n\n  std::cout << tensor << std::endl;\n\n  std::stringstream os;\n  os << tensor;\n\n  std::string expected(\"foo  foo  foo\\nfoo  foo  foo\\nfoo  foo  foo\\nfoo  foo  foo\\nfoo  foo  foo\");\n  VERIFY_IS_EQUAL(std::string(os.str()), expected);\n}\n\n\ntemplate<int DataLayout>\nstatic void test_output_const()\n{\n  Tensor<int, 1, DataLayout> tensor(5);\n  for (int i = 0; i < 5; ++i) {\n    tensor(i) = i;\n  }\n\n  TensorMap<Tensor<const int, 1, DataLayout> > tensor_map(tensor.data(), 5);\n\n  std::stringstream os;\n  os << tensor_map;\n\n  std::string expected(\"0\\n1\\n2\\n3\\n4\");\n  VERIFY_IS_EQUAL(std::string(os.str()), expected);\n}\n\n\nEIGEN_DECLARE_TEST(cxx11_tensor_io)\n{\n  CALL_SUBTEST(test_output_0d<ColMajor>());\n  CALL_SUBTEST(test_output_0d<RowMajor>());\n  CALL_SUBTEST(test_output_1d<ColMajor>());\n  CALL_SUBTEST(test_output_1d<RowMajor>());\n  CALL_SUBTEST(test_output_2d<ColMajor>());\n  CALL_SUBTEST(test_output_2d<RowMajor>());\n  CALL_SUBTEST(test_output_expr<ColMajor>());\n  CALL_SUBTEST(test_output_expr<RowMajor>());\n  CALL_SUBTEST(test_output_string<ColMajor>());\n  CALL_SUBTEST(test_output_string<RowMajor>());\n  CALL_SUBTEST(test_output_const<ColMajor>());\n  CALL_SUBTEST(test_output_const<RowMajor>());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_layout_swap.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\n\nstatic void test_simple_swap()\n{\n  Tensor<float, 3, ColMajor> tensor(2,3,7);\n  tensor.setRandom();\n\n  Tensor<float, 3, RowMajor> tensor2 = tensor.swap_layout();\n  VERIFY_IS_EQUAL(tensor.dimension(0), tensor2.dimension(2));\n  VERIFY_IS_EQUAL(tensor.dimension(1), tensor2.dimension(1));\n  VERIFY_IS_EQUAL(tensor.dimension(2), tensor2.dimension(0));\n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        VERIFY_IS_EQUAL(tensor(i,j,k), tensor2(k,j,i));\n      }\n    }\n  }\n}\n\n\nstatic void test_swap_as_lvalue()\n{\n  Tensor<float, 3, ColMajor> tensor(2,3,7);\n  tensor.setRandom();\n\n  Tensor<float, 3, RowMajor> tensor2(7,3,2);\n  tensor2.swap_layout() = tensor;\n  VERIFY_IS_EQUAL(tensor.dimension(0), tensor2.dimension(2));\n  VERIFY_IS_EQUAL(tensor.dimension(1), tensor2.dimension(1));\n  VERIFY_IS_EQUAL(tensor.dimension(2), tensor2.dimension(0));\n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        VERIFY_IS_EQUAL(tensor(i,j,k), tensor2(k,j,i));\n      }\n    }\n  }\n}\n\n\nEIGEN_DECLARE_TEST(cxx11_tensor_layout_swap)\n{\n  CALL_SUBTEST(test_simple_swap());\n  CALL_SUBTEST(test_swap_as_lvalue());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_layout_swap_sycl.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016\n// Mehdi Goli    Codeplay Software Ltd.\n// Ralph Potter  Codeplay Software Ltd.\n// Luke Iwanski  Codeplay Software Ltd.\n// Contact: <eigen@codeplay.com>\n// Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_TEST_NO_LONGDOUBLE\n#define EIGEN_TEST_NO_COMPLEX\n\n#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int64_t\n#define EIGEN_USE_SYCL\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\n\ntemplate <typename DataType, typename IndexType>\nstatic void test_simple_swap_sycl(const Eigen::SyclDevice& sycl_device)\n{\n  IndexType sizeDim1 = 2;\n  IndexType sizeDim2 = 3;\n  IndexType sizeDim3 = 7;\n  array<IndexType, 3> tensorColRange = {{sizeDim1, sizeDim2, sizeDim3}};\n  array<IndexType, 3> tensorRowRange = {{sizeDim3, sizeDim2, sizeDim1}};\n\n\n  Tensor<DataType, 3, ColMajor, IndexType> tensor1(tensorColRange);\n  Tensor<DataType, 3, RowMajor, IndexType> tensor2(tensorRowRange);\n  tensor1.setRandom();\n\n  DataType* gpu_data1  = static_cast<DataType*>(sycl_device.allocate(tensor1.size()*sizeof(DataType)));\n  DataType* gpu_data2  = static_cast<DataType*>(sycl_device.allocate(tensor2.size()*sizeof(DataType)));\n  TensorMap<Tensor<DataType, 3, ColMajor, IndexType>> gpu1(gpu_data1, tensorColRange);\n  TensorMap<Tensor<DataType, 3, RowMajor, IndexType>> gpu2(gpu_data2, tensorRowRange);\n\n  sycl_device.memcpyHostToDevice(gpu_data1, tensor1.data(),(tensor1.size())*sizeof(DataType));\n  gpu2.device(sycl_device)=gpu1.swap_layout();\n  sycl_device.memcpyDeviceToHost(tensor2.data(), gpu_data2,(tensor2.size())*sizeof(DataType));\n\n\n//  Tensor<float, 3, ColMajor> tensor(2,3,7);\n  //tensor.setRandom();\n\n//  Tensor<float, 3, RowMajor> tensor2 = tensor.swap_layout();\n  VERIFY_IS_EQUAL(tensor1.dimension(0), tensor2.dimension(2));\n  VERIFY_IS_EQUAL(tensor1.dimension(1), tensor2.dimension(1));\n  VERIFY_IS_EQUAL(tensor1.dimension(2), tensor2.dimension(0));\n\n  for (IndexType i = 0; i < 2; ++i) {\n    for (IndexType j = 0; j < 3; ++j) {\n      for (IndexType k = 0; k < 7; ++k) {\n        VERIFY_IS_EQUAL(tensor1(i,j,k), tensor2(k,j,i));\n      }\n    }\n  }\n  sycl_device.deallocate(gpu_data1);\n  sycl_device.deallocate(gpu_data2);\n}\n\ntemplate <typename DataType, typename IndexType>\nstatic void test_swap_as_lvalue_sycl(const Eigen::SyclDevice& sycl_device)\n{\n\n  IndexType sizeDim1 = 2;\n  IndexType sizeDim2 = 3;\n  IndexType sizeDim3 = 7;\n  array<IndexType, 3> tensorColRange = {{sizeDim1, sizeDim2, sizeDim3}};\n  array<IndexType, 3> tensorRowRange = {{sizeDim3, sizeDim2, sizeDim1}};\n\n  Tensor<DataType, 3, ColMajor, IndexType> tensor1(tensorColRange);\n  Tensor<DataType, 3, RowMajor, IndexType> tensor2(tensorRowRange);\n  tensor1.setRandom();\n\n  DataType* gpu_data1  = static_cast<DataType*>(sycl_device.allocate(tensor1.size()*sizeof(DataType)));\n  DataType* gpu_data2  = static_cast<DataType*>(sycl_device.allocate(tensor2.size()*sizeof(DataType)));\n  TensorMap<Tensor<DataType, 3, ColMajor, IndexType>> gpu1(gpu_data1, tensorColRange);\n  TensorMap<Tensor<DataType, 3, RowMajor, IndexType>> gpu2(gpu_data2, tensorRowRange);\n\n  sycl_device.memcpyHostToDevice(gpu_data1, tensor1.data(),(tensor1.size())*sizeof(DataType));\n  gpu2.swap_layout().device(sycl_device)=gpu1;\n  sycl_device.memcpyDeviceToHost(tensor2.data(), gpu_data2,(tensor2.size())*sizeof(DataType));\n\n\n//  Tensor<float, 3, ColMajor> tensor(2,3,7);\n//  tensor.setRandom();\n\n  //Tensor<float, 3, RowMajor> tensor2(7,3,2);\n//  tensor2.swap_layout() = tensor;\n  VERIFY_IS_EQUAL(tensor1.dimension(0), tensor2.dimension(2));\n  VERIFY_IS_EQUAL(tensor1.dimension(1), tensor2.dimension(1));\n  VERIFY_IS_EQUAL(tensor1.dimension(2), tensor2.dimension(0));\n\n  for (IndexType i = 0; i < 2; ++i) {\n    for (IndexType j = 0; j < 3; ++j) {\n      for (IndexType k = 0; k < 7; ++k) {\n        VERIFY_IS_EQUAL(tensor1(i,j,k), tensor2(k,j,i));\n      }\n    }\n  }\n  sycl_device.deallocate(gpu_data1);\n  sycl_device.deallocate(gpu_data2);\n}\n\n\ntemplate<typename DataType, typename dev_Selector> void sycl_tensor_layout_swap_test_per_device(dev_Selector s){\n  QueueInterface queueInterface(s);\n  auto sycl_device = Eigen::SyclDevice(&queueInterface);\n  test_simple_swap_sycl<DataType, int64_t>(sycl_device);\n  test_swap_as_lvalue_sycl<DataType, int64_t>(sycl_device);\n}\nEIGEN_DECLARE_TEST(cxx11_tensor_layout_swap_sycl)\n{\n  for (const auto& device :Eigen::get_sycl_supported_devices()) {\n    CALL_SUBTEST(sycl_tensor_layout_swap_test_per_device<float>(device));\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_lvalue.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\nusing Eigen::RowMajor;\n\n\nstatic void test_compound_assignment()\n{\n  Tensor<float, 3> mat1(2,3,7);\n  Tensor<float, 3> mat2(2,3,7);\n  Tensor<float, 3> mat3(2,3,7);\n\n  mat1.setRandom();\n  mat2.setRandom();\n  mat3 = mat1;\n  mat3 += mat2;\n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        VERIFY_IS_APPROX(mat3(i,j,k), mat1(i,j,k) + mat2(i,j,k));\n      }\n    }\n  }\n}\n\n\nEIGEN_DECLARE_TEST(cxx11_tensor_lvalue)\n{\n  CALL_SUBTEST(test_compound_assignment());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_map.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\nusing Eigen::RowMajor;\n\nstatic void test_0d()\n{\n  Tensor<int, 0> scalar1;\n  Tensor<int, 0, RowMajor> scalar2;\n\n  TensorMap<const Tensor<int, 0> > scalar3(scalar1.data());\n  TensorMap<const Tensor<int, 0, RowMajor> > scalar4(scalar2.data());\n\n  scalar1() = 7;\n  scalar2() = 13;\n\n  VERIFY_IS_EQUAL(scalar1.rank(), 0);\n  VERIFY_IS_EQUAL(scalar1.size(), 1);\n\n  VERIFY_IS_EQUAL(scalar3(), 7);\n  VERIFY_IS_EQUAL(scalar4(), 13);\n}\n\nstatic void test_1d()\n{\n  Tensor<int, 1> vec1(6);\n  Tensor<int, 1, RowMajor> vec2(6);\n\n  TensorMap<const Tensor<int, 1> > vec3(vec1.data(), 6);\n  TensorMap<const Tensor<int, 1, RowMajor> > vec4(vec2.data(), 6);\n\n  vec1(0) = 4;  vec2(0) = 0;\n  vec1(1) = 8;  vec2(1) = 1;\n  vec1(2) = 15; vec2(2) = 2;\n  vec1(3) = 16; vec2(3) = 3;\n  vec1(4) = 23; vec2(4) = 4;\n  vec1(5) = 42; vec2(5) = 5;\n\n  VERIFY_IS_EQUAL(vec1.rank(), 1);\n  VERIFY_IS_EQUAL(vec1.size(), 6);\n  VERIFY_IS_EQUAL(vec1.dimension(0), 6);\n\n  VERIFY_IS_EQUAL(vec3(0), 4);\n  VERIFY_IS_EQUAL(vec3(1), 8);\n  VERIFY_IS_EQUAL(vec3(2), 15);\n  VERIFY_IS_EQUAL(vec3(3), 16);\n  VERIFY_IS_EQUAL(vec3(4), 23);\n  VERIFY_IS_EQUAL(vec3(5), 42);\n\n  VERIFY_IS_EQUAL(vec4(0), 0);\n  VERIFY_IS_EQUAL(vec4(1), 1);\n  VERIFY_IS_EQUAL(vec4(2), 2);\n  VERIFY_IS_EQUAL(vec4(3), 3);\n  VERIFY_IS_EQUAL(vec4(4), 4);\n  VERIFY_IS_EQUAL(vec4(5), 5);\n}\n\nstatic void test_2d()\n{\n  Tensor<int, 2> mat1(2,3);\n  Tensor<int, 2, RowMajor> mat2(2,3);\n\n  mat1(0,0) = 0;\n  mat1(0,1) = 1;\n  mat1(0,2) = 2;\n  mat1(1,0) = 3;\n  mat1(1,1) = 4;\n  mat1(1,2) = 5;\n\n  mat2(0,0) = 0;\n  mat2(0,1) = 1;\n  mat2(0,2) = 2;\n  mat2(1,0) = 3;\n  mat2(1,1) = 4;\n  mat2(1,2) = 5;\n\n  TensorMap<const Tensor<int, 2> > mat3(mat1.data(), 2, 3);\n  TensorMap<const Tensor<int, 2, RowMajor> > mat4(mat2.data(), 2, 3);\n\n  VERIFY_IS_EQUAL(mat3.rank(), 2);\n  VERIFY_IS_EQUAL(mat3.size(), 6);\n  VERIFY_IS_EQUAL(mat3.dimension(0), 2);\n  VERIFY_IS_EQUAL(mat3.dimension(1), 3);\n\n  VERIFY_IS_EQUAL(mat4.rank(), 2);\n  VERIFY_IS_EQUAL(mat4.size(), 6);\n  VERIFY_IS_EQUAL(mat4.dimension(0), 2);\n  VERIFY_IS_EQUAL(mat4.dimension(1), 3);\n\n  VERIFY_IS_EQUAL(mat3(0,0), 0);\n  VERIFY_IS_EQUAL(mat3(0,1), 1);\n  VERIFY_IS_EQUAL(mat3(0,2), 2);\n  VERIFY_IS_EQUAL(mat3(1,0), 3);\n  VERIFY_IS_EQUAL(mat3(1,1), 4);\n  VERIFY_IS_EQUAL(mat3(1,2), 5);\n\n  VERIFY_IS_EQUAL(mat4(0,0), 0);\n  VERIFY_IS_EQUAL(mat4(0,1), 1);\n  VERIFY_IS_EQUAL(mat4(0,2), 2);\n  VERIFY_IS_EQUAL(mat4(1,0), 3);\n  VERIFY_IS_EQUAL(mat4(1,1), 4);\n  VERIFY_IS_EQUAL(mat4(1,2), 5);\n}\n\nstatic void test_3d()\n{\n  Tensor<int, 3> mat1(2,3,7);\n  Tensor<int, 3, RowMajor> mat2(2,3,7);\n\n  int val = 0;\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        mat1(i,j,k) = val;\n        mat2(i,j,k) = val;\n        val++;\n      }\n    }\n  }\n\n  TensorMap<const Tensor<int, 3> > mat3(mat1.data(), 2, 3, 7);\n  TensorMap<const Tensor<int, 3, RowMajor> > mat4(mat2.data(), 2, 3, 7);\n\n  VERIFY_IS_EQUAL(mat3.rank(), 3);\n  VERIFY_IS_EQUAL(mat3.size(), 2*3*7);\n  VERIFY_IS_EQUAL(mat3.dimension(0), 2);\n  VERIFY_IS_EQUAL(mat3.dimension(1), 3);\n  VERIFY_IS_EQUAL(mat3.dimension(2), 7);\n\n  VERIFY_IS_EQUAL(mat4.rank(), 3);\n  VERIFY_IS_EQUAL(mat4.size(), 2*3*7);\n  VERIFY_IS_EQUAL(mat4.dimension(0), 2);\n  VERIFY_IS_EQUAL(mat4.dimension(1), 3);\n  VERIFY_IS_EQUAL(mat4.dimension(2), 7);\n\n  val = 0;\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        VERIFY_IS_EQUAL(mat3(i,j,k), val);\n        VERIFY_IS_EQUAL(mat4(i,j,k), val);\n        val++;\n      }\n    }\n  }\n}\n\n\nstatic void test_from_tensor()\n{\n  Tensor<int, 3> mat1(2,3,7);\n  Tensor<int, 3, RowMajor> mat2(2,3,7);\n\n  int val = 0;\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        mat1(i,j,k) = val;\n        mat2(i,j,k) = val;\n        val++;\n      }\n    }\n  }\n\n  TensorMap<Tensor<int, 3> > mat3(mat1);\n  TensorMap<Tensor<int, 3, RowMajor> > mat4(mat2);\n\n  VERIFY_IS_EQUAL(mat3.rank(), 3);\n  VERIFY_IS_EQUAL(mat3.size(), 2*3*7);\n  VERIFY_IS_EQUAL(mat3.dimension(0), 2);\n  VERIFY_IS_EQUAL(mat3.dimension(1), 3);\n  VERIFY_IS_EQUAL(mat3.dimension(2), 7);\n\n  VERIFY_IS_EQUAL(mat4.rank(), 3);\n  VERIFY_IS_EQUAL(mat4.size(), 2*3*7);\n  VERIFY_IS_EQUAL(mat4.dimension(0), 2);\n  VERIFY_IS_EQUAL(mat4.dimension(1), 3);\n  VERIFY_IS_EQUAL(mat4.dimension(2), 7);\n\n  val = 0;\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        VERIFY_IS_EQUAL(mat3(i,j,k), val);\n        VERIFY_IS_EQUAL(mat4(i,j,k), val);\n        val++;\n      }\n    }\n  }\n\n  TensorFixedSize<int, Sizes<2,3,7> > mat5;\n\n  val = 0;\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        array<ptrdiff_t, 3> coords;\n        coords[0] = i;\n        coords[1] = j;\n        coords[2] = k;\n        mat5(coords) = val;\n        val++;\n      }\n    }\n  }\n\n  TensorMap<TensorFixedSize<int, Sizes<2,3,7> > > mat6(mat5);\n\n  VERIFY_IS_EQUAL(mat6.rank(), 3);\n  VERIFY_IS_EQUAL(mat6.size(), 2*3*7);\n  VERIFY_IS_EQUAL(mat6.dimension(0), 2);\n  VERIFY_IS_EQUAL(mat6.dimension(1), 3);\n  VERIFY_IS_EQUAL(mat6.dimension(2), 7);\n\n  val = 0;\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        VERIFY_IS_EQUAL(mat6(i,j,k), val);\n        val++;\n      }\n    }\n  }\n}\n\n\nstatic int f(const TensorMap<Tensor<int, 3> >& tensor) {\n  //  Size<0> empty;\n  EIGEN_STATIC_ASSERT((internal::array_size<Sizes<> >::value == 0), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  EIGEN_STATIC_ASSERT((internal::array_size<DSizes<int, 0> >::value == 0), YOU_MADE_A_PROGRAMMING_MISTAKE);\n  Tensor<int, 0> result = tensor.sum();\n  return result();\n}\n\nstatic void test_casting()\n{\n  Tensor<int, 3> tensor(2,3,7);\n\n  int val = 0;\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        tensor(i,j,k) = val;\n        val++;\n      }\n    }\n  }\n\n  TensorMap<Tensor<int, 3> > map(tensor);\n  int sum1 = f(map);\n  int sum2 = f(tensor);\n\n  VERIFY_IS_EQUAL(sum1, sum2);\n  VERIFY_IS_EQUAL(sum1, 861);\n}\n\ntemplate<typename T>\nstatic const T& add_const(T& value) {\n  return value;\n}\n\nstatic void test_0d_const_tensor()\n{\n  Tensor<int, 0> scalar1;\n  Tensor<int, 0, RowMajor> scalar2;\n\n  TensorMap<const Tensor<int, 0> > scalar3(add_const(scalar1).data());\n  TensorMap<const Tensor<int, 0, RowMajor> > scalar4(add_const(scalar2).data());\n\n  scalar1() = 7;\n  scalar2() = 13;\n\n  VERIFY_IS_EQUAL(scalar1.rank(), 0);\n  VERIFY_IS_EQUAL(scalar1.size(), 1);\n\n  VERIFY_IS_EQUAL(scalar3(), 7);\n  VERIFY_IS_EQUAL(scalar4(), 13);\n}\n\nstatic void test_0d_const_tensor_map()\n{\n  Tensor<int, 0> scalar1;\n  Tensor<int, 0, RowMajor> scalar2;\n\n  const TensorMap<Tensor<int, 0> > scalar3(scalar1.data());\n  const TensorMap<Tensor<int, 0, RowMajor> > scalar4(scalar2.data());\n\n  // Although TensorMap is constant, we still can write to the underlying\n  // storage, because we map over non-constant Tensor.\n  scalar3() = 7;\n  scalar4() = 13;\n\n  VERIFY_IS_EQUAL(scalar1(), 7);\n  VERIFY_IS_EQUAL(scalar2(), 13);\n\n  // Pointer to the underlying storage is also non-const.\n  scalar3.data()[0] = 8;\n  scalar4.data()[0] = 14;\n\n  VERIFY_IS_EQUAL(scalar1(), 8);\n  VERIFY_IS_EQUAL(scalar2(), 14);\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_map)\n{\n  CALL_SUBTEST(test_0d());\n  CALL_SUBTEST(test_1d());\n  CALL_SUBTEST(test_2d());\n  CALL_SUBTEST(test_3d());\n\n  CALL_SUBTEST(test_from_tensor());\n  CALL_SUBTEST(test_casting());\n\n  CALL_SUBTEST(test_0d_const_tensor());\n  CALL_SUBTEST(test_0d_const_tensor_map());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_math.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\nusing Eigen::RowMajor;\n\nstatic void test_tanh()\n{\n  Tensor<float, 1> vec1(6);\n  vec1.setRandom();\n\n  Tensor<float, 1> vec2 = vec1.tanh();\n\n  for (int i = 0; i < 6; ++i) {\n    VERIFY_IS_APPROX(vec2(i), tanhf(vec1(i)));\n  }\n}\n\nstatic void test_sigmoid()\n{\n  Tensor<float, 1> vec1(6);\n  vec1.setRandom();\n\n  Tensor<float, 1> vec2 = vec1.sigmoid();\n\n  for (int i = 0; i < 6; ++i) {\n    VERIFY_IS_APPROX(vec2(i), 1.0f / (1.0f + std::exp(-vec1(i))));\n  }\n}\n\n\nEIGEN_DECLARE_TEST(cxx11_tensor_math)\n{\n  CALL_SUBTEST(test_tanh());\n  CALL_SUBTEST(test_sigmoid());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_math_sycl.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016\n// Mehdi Goli    Codeplay Software Ltd.\n// Ralph Potter  Codeplay Software Ltd.\n// Luke Iwanski  Codeplay Software Ltd.\n// Contact: <eigen@codeplay.com>\n// Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_TEST_NO_LONGDOUBLE\n#define EIGEN_TEST_NO_COMPLEX\n#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int64_t\n#define EIGEN_USE_SYCL\n\n#include \"main.h\"\n#include <unsupported/Eigen/CXX11/Tensor>\n\nusing Eigen::array;\nusing Eigen::SyclDevice;\nusing Eigen::Tensor;\nusing Eigen::TensorMap;\n\nusing Eigen::Tensor;\nusing Eigen::RowMajor;\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_tanh_sycl(const Eigen::SyclDevice &sycl_device)\n{\n\n  IndexType sizeDim1 = 4;\n  IndexType sizeDim2 = 4;\n  IndexType sizeDim3 = 1;\n  array<IndexType, 3> tensorRange = {{sizeDim1, sizeDim2, sizeDim3}};\n  Tensor<DataType, 3, DataLayout, IndexType> in(tensorRange);\n  Tensor<DataType, 3, DataLayout, IndexType> out(tensorRange);\n  Tensor<DataType, 3, DataLayout, IndexType> out_cpu(tensorRange);\n\n  in = in.random();\n\n  DataType* gpu_data1  = static_cast<DataType*>(sycl_device.allocate(in.size()*sizeof(DataType)));\n  DataType* gpu_data2  = static_cast<DataType*>(sycl_device.allocate(out.size()*sizeof(DataType)));\n\n  TensorMap<Tensor<DataType, 3, DataLayout, IndexType>> gpu1(gpu_data1, tensorRange);\n  TensorMap<Tensor<DataType, 3, DataLayout, IndexType>> gpu2(gpu_data2, tensorRange);\n\n  sycl_device.memcpyHostToDevice(gpu_data1, in.data(),(in.size())*sizeof(DataType));\n  gpu2.device(sycl_device) = gpu1.tanh();\n  sycl_device.memcpyDeviceToHost(out.data(), gpu_data2,(out.size())*sizeof(DataType));\n\n  out_cpu=in.tanh();\n\n  for (int i = 0; i < in.size(); ++i) {\n    VERIFY_IS_APPROX(out(i), out_cpu(i));\n  }\n}\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_sigmoid_sycl(const Eigen::SyclDevice &sycl_device)\n{\n\n  IndexType sizeDim1 = 4;\n  IndexType sizeDim2 = 4;\n  IndexType sizeDim3 = 1;\n  array<IndexType, 3> tensorRange = {{sizeDim1, sizeDim2, sizeDim3}};\n  Tensor<DataType, 3, DataLayout, IndexType> in(tensorRange);\n  Tensor<DataType, 3, DataLayout, IndexType> out(tensorRange);\n  Tensor<DataType, 3, DataLayout, IndexType> out_cpu(tensorRange);\n\n  in = in.random();\n\n  DataType* gpu_data1  = static_cast<DataType*>(sycl_device.allocate(in.size()*sizeof(DataType)));\n  DataType* gpu_data2  = static_cast<DataType*>(sycl_device.allocate(out.size()*sizeof(DataType)));\n\n  TensorMap<Tensor<DataType, 3, DataLayout, IndexType>> gpu1(gpu_data1, tensorRange);\n  TensorMap<Tensor<DataType, 3, DataLayout, IndexType>> gpu2(gpu_data2, tensorRange);\n\n  sycl_device.memcpyHostToDevice(gpu_data1, in.data(),(in.size())*sizeof(DataType));\n  gpu2.device(sycl_device) = gpu1.sigmoid();\n  sycl_device.memcpyDeviceToHost(out.data(), gpu_data2,(out.size())*sizeof(DataType));\n\n  out_cpu=in.sigmoid();\n\n  for (int i = 0; i < in.size(); ++i) {\n    VERIFY_IS_APPROX(out(i), out_cpu(i));\n  }\n}\n\n\ntemplate<typename DataType, typename dev_Selector> void sycl_computing_test_per_device(dev_Selector s){\n  QueueInterface queueInterface(s);\n  auto sycl_device = Eigen::SyclDevice(&queueInterface);\n  test_tanh_sycl<DataType, RowMajor, int64_t>(sycl_device);\n  test_tanh_sycl<DataType, ColMajor, int64_t>(sycl_device);\n  test_sigmoid_sycl<DataType, RowMajor, int64_t>(sycl_device);\n  test_sigmoid_sycl<DataType, ColMajor, int64_t>(sycl_device);\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_math_sycl) {\n  for (const auto& device :Eigen::get_sycl_supported_devices()) {\n    CALL_SUBTEST(sycl_computing_test_per_device<float>(device));\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_mixed_indices.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\n\nstatic void test_simple()\n{\n  Tensor<float, 1, ColMajor> vec1(6);\n  Tensor<float, 1, ColMajor, int> vec2(6);\n\n  vec1(0) = 4.0;  vec2(0) = 0.0;\n  vec1(1) = 8.0;  vec2(1) = 1.0;\n  vec1(2) = 15.0; vec2(2) = 2.0;\n  vec1(3) = 16.0; vec2(3) = 3.0;\n  vec1(4) = 23.0; vec2(4) = 4.0;\n  vec1(5) = 42.0; vec2(5) = 5.0;\n\n  float data3[6];\n  TensorMap<Tensor<float, 1, ColMajor>> vec3(data3, 6);\n  vec3 = vec1.sqrt();\n  float data4[6];\n  TensorMap<Tensor<float, 1, ColMajor, int>> vec4(data4, 6);\n  vec4 = vec2.square();\n\n  VERIFY_IS_APPROX(vec3(0), sqrtf(4.0));\n  VERIFY_IS_APPROX(vec3(1), sqrtf(8.0));\n  VERIFY_IS_APPROX(vec3(2), sqrtf(15.0));\n  VERIFY_IS_APPROX(vec3(3), sqrtf(16.0));\n  VERIFY_IS_APPROX(vec3(4), sqrtf(23.0));\n  VERIFY_IS_APPROX(vec3(5), sqrtf(42.0));\n\n  VERIFY_IS_APPROX(vec4(0), 0.0f);\n  VERIFY_IS_APPROX(vec4(1), 1.0f);\n  VERIFY_IS_APPROX(vec4(2), 2.0f * 2.0f);\n  VERIFY_IS_APPROX(vec4(3), 3.0f * 3.0f);\n  VERIFY_IS_APPROX(vec4(4), 4.0f * 4.0f);\n  VERIFY_IS_APPROX(vec4(5), 5.0f * 5.0f);\n}\n\n\nEIGEN_DECLARE_TEST(cxx11_tensor_mixed_indices)\n{\n  CALL_SUBTEST(test_simple());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_morphing.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\n\ntemplate<typename>\nstatic void test_simple_reshape()\n{\n  Tensor<float, 5> tensor1(2,3,1,7,1);\n  tensor1.setRandom();\n\n  Tensor<float, 3> tensor2(2,3,7);\n  Tensor<float, 2> tensor3(6,7);\n  Tensor<float, 2> tensor4(2,21);\n\n  Tensor<float, 3>::Dimensions dim1(2,3,7);\n  tensor2 = tensor1.reshape(dim1);\n  Tensor<float, 2>::Dimensions dim2(6,7);\n  tensor3 = tensor1.reshape(dim2);\n  Tensor<float, 2>::Dimensions dim3(2,21);\n  tensor4 = tensor1.reshape(dim1).reshape(dim3);\n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        VERIFY_IS_EQUAL(tensor1(i,j,0,k,0), tensor2(i,j,k));\n        VERIFY_IS_EQUAL(tensor1(i,j,0,k,0), tensor3(i+2*j,k));\n        VERIFY_IS_EQUAL(tensor1(i,j,0,k,0), tensor4(i,j+3*k));\n      }\n    }\n  }\n}\n\ntemplate <typename>\nstatic void test_static_reshape() {\n#if defined(EIGEN_HAS_INDEX_LIST)\n  using Eigen::type2index;\n\n  Tensor<float, 5> tensor(2, 3, 1, 7, 1);\n  tensor.setRandom();\n\n  // New dimensions: [2, 3, 7]\n  Eigen::IndexList<type2index<2>, type2index<3>, type2index<7>> dim;\n  Tensor<float, 3> reshaped = tensor.reshape(static_cast<Eigen::DSizes<long,3>>(dim));\n  \n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        VERIFY_IS_EQUAL(tensor(i, j, 0, k, 0), reshaped(i, j, k));\n      }\n    }\n  }\n#endif\n}\n\ntemplate<typename>\nstatic void test_reshape_in_expr() {\n  MatrixXf m1(2,3*5*7*11);\n  MatrixXf m2(3*5*7*11,13);\n  m1.setRandom();\n  m2.setRandom();\n  MatrixXf m3 = m1 * m2;\n\n  TensorMap<Tensor<float, 5>> tensor1(m1.data(), 2,3,5,7,11);\n  TensorMap<Tensor<float, 5>> tensor2(m2.data(), 3,5,7,11,13);\n  Tensor<float, 2>::Dimensions newDims1(2,3*5*7*11);\n  Tensor<float, 2>::Dimensions newDims2(3*5*7*11,13);\n  typedef Tensor<float, 1>::DimensionPair DimPair;\n  array<DimPair, 1> contract_along{{DimPair(1, 0)}};\n  Tensor<float, 2> tensor3(2,13);\n  tensor3 = tensor1.reshape(newDims1).contract(tensor2.reshape(newDims2), contract_along);\n\n  Map<MatrixXf> res(tensor3.data(), 2, 13);\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 13; ++j) {\n      VERIFY_IS_APPROX(res(i,j), m3(i,j));\n    }\n  }\n}\n\ntemplate<typename>\nstatic void test_reshape_as_lvalue()\n{\n  Tensor<float, 3> tensor(2,3,7);\n  tensor.setRandom();\n\n  Tensor<float, 2> tensor2d(6,7);\n  Tensor<float, 3>::Dimensions dim(2,3,7);\n  tensor2d.reshape(dim) = tensor;\n\n  float scratch[2*3*1*7*1];\n  TensorMap<Tensor<float, 5>> tensor5d(scratch, 2,3,1,7,1);\n  tensor5d.reshape(dim).device(Eigen::DefaultDevice()) = tensor;\n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        VERIFY_IS_EQUAL(tensor2d(i+2*j,k), tensor(i,j,k));\n        VERIFY_IS_EQUAL(tensor5d(i,j,0,k,0), tensor(i,j,k));\n      }\n    }\n  }\n}\n\ntemplate<int DataLayout>\nstatic void test_simple_slice()\n{\n  Tensor<float, 5, DataLayout> tensor(2,3,5,7,11);\n  tensor.setRandom();\n\n  Tensor<float, 5, DataLayout> slice1(1,1,1,1,1);\n  Eigen::DSizes<ptrdiff_t, 5> indices(1,2,3,4,5);\n  Eigen::DSizes<ptrdiff_t, 5> sizes(1,1,1,1,1);\n  slice1 = tensor.slice(indices, sizes);\n  VERIFY_IS_EQUAL(slice1(0,0,0,0,0), tensor(1,2,3,4,5));\n\n  Tensor<float, 5, DataLayout> slice2(1,1,2,2,3);\n  Eigen::DSizes<ptrdiff_t, 5> indices2(1,1,3,4,5);\n  Eigen::DSizes<ptrdiff_t, 5> sizes2(1,1,2,2,3);\n  slice2 = tensor.slice(indices2, sizes2);\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 2; ++j) {\n      for (int k = 0; k < 3; ++k) {\n        VERIFY_IS_EQUAL(slice2(0,0,i,j,k), tensor(1,1,3+i,4+j,5+k));\n      }\n    }\n  }\n}\n\ntemplate<typename=void>\nstatic void test_const_slice()\n{\n  const float b[1] = {42};\n  TensorMap<Tensor<const float, 1> > m(b, 1);\n  DSizes<DenseIndex, 1> offsets;\n  offsets[0] = 0;\n  TensorRef<Tensor<const float, 1> > slice_ref(m.slice(offsets, m.dimensions()));\n  VERIFY_IS_EQUAL(slice_ref(0), 42);\n}\n\ntemplate<int DataLayout>\nstatic void test_slice_in_expr() {\n  typedef Matrix<float, Dynamic, Dynamic, DataLayout> Mtx;\n  Mtx m1(7,7);\n  Mtx m2(3,3);\n  m1.setRandom();\n  m2.setRandom();\n\n  Mtx m3 = m1.block(1, 2, 3, 3) * m2.block(0, 2, 3, 1);\n\n  TensorMap<Tensor<float, 2, DataLayout>> tensor1(m1.data(), 7, 7);\n  TensorMap<Tensor<float, 2, DataLayout>> tensor2(m2.data(), 3, 3);\n  Tensor<float, 2, DataLayout> tensor3(3,1);\n  typedef Tensor<float, 1>::DimensionPair DimPair;\n  array<DimPair, 1> contract_along{{DimPair(1, 0)}};\n\n  Eigen::DSizes<ptrdiff_t, 2> indices1(1,2);\n  Eigen::DSizes<ptrdiff_t, 2> sizes1(3,3);\n  Eigen::DSizes<ptrdiff_t, 2> indices2(0,2);\n  Eigen::DSizes<ptrdiff_t, 2> sizes2(3,1);\n  tensor3 = tensor1.slice(indices1, sizes1).contract(tensor2.slice(indices2, sizes2), contract_along);\n\n  Map<Mtx> res(tensor3.data(), 3, 1);\n  for (int i = 0; i < 3; ++i) {\n    for (int j = 0; j < 1; ++j) {\n      VERIFY_IS_APPROX(res(i,j), m3(i,j));\n    }\n  }\n\n  // Take an arbitrary slice of an arbitrarily sized tensor.\n  TensorMap<Tensor<const float, 2, DataLayout>> tensor4(m1.data(), 7, 7);\n  Tensor<float, 1, DataLayout> tensor6 = tensor4.reshape(DSizes<ptrdiff_t, 1>(7*7)).exp().slice(DSizes<ptrdiff_t, 1>(0), DSizes<ptrdiff_t, 1>(35));\n  for (int i = 0; i < 35; ++i) {\n    VERIFY_IS_APPROX(tensor6(i), expf(tensor4.data()[i]));\n  }\n}\n\ntemplate<int DataLayout>\nstatic void test_slice_as_lvalue()\n{\n  Tensor<float, 3, DataLayout> tensor1(2,2,7);\n  tensor1.setRandom();\n  Tensor<float, 3, DataLayout> tensor2(2,2,7);\n  tensor2.setRandom();\n  Tensor<float, 3, DataLayout> tensor3(4,3,5);\n  tensor3.setRandom();\n  Tensor<float, 3, DataLayout> tensor4(4,3,2);\n  tensor4.setRandom();\n  Tensor<float, 3, DataLayout> tensor5(10,13,12);\n  tensor5.setRandom();\n\n  Tensor<float, 3, DataLayout> result(4,5,7);\n  Eigen::DSizes<ptrdiff_t, 3> sizes12(2,2,7);\n  Eigen::DSizes<ptrdiff_t, 3> first_slice(0,0,0);\n  result.slice(first_slice, sizes12) = tensor1;\n  Eigen::DSizes<ptrdiff_t, 3> second_slice(2,0,0);\n  result.slice(second_slice, sizes12).device(Eigen::DefaultDevice()) = tensor2;\n\n  Eigen::DSizes<ptrdiff_t, 3> sizes3(4,3,5);\n  Eigen::DSizes<ptrdiff_t, 3> third_slice(0,2,0);\n  result.slice(third_slice, sizes3) = tensor3;\n\n  Eigen::DSizes<ptrdiff_t, 3> sizes4(4,3,2);\n  Eigen::DSizes<ptrdiff_t, 3> fourth_slice(0,2,5);\n  result.slice(fourth_slice, sizes4) = tensor4;\n\n  for (int j = 0; j < 2; ++j) {\n    for (int k = 0; k < 7; ++k) {\n      for (int i = 0; i < 2; ++i) {\n        VERIFY_IS_EQUAL(result(i,j,k), tensor1(i,j,k));\n        VERIFY_IS_EQUAL(result(i+2,j,k), tensor2(i,j,k));\n      }\n    }\n  }\n  for (int i = 0; i < 4; ++i) {\n    for (int j = 2; j < 5; ++j) {\n      for (int k = 0; k < 5; ++k) {\n        VERIFY_IS_EQUAL(result(i,j,k), tensor3(i,j-2,k));\n      }\n      for (int k = 5; k < 7; ++k) {\n        VERIFY_IS_EQUAL(result(i,j,k), tensor4(i,j-2,k-5));\n      }\n    }\n  }\n\n  Eigen::DSizes<ptrdiff_t, 3> sizes5(4,5,7);\n  Eigen::DSizes<ptrdiff_t, 3> fifth_slice(0,0,0);\n  result.slice(fifth_slice, sizes5) = tensor5.slice(fifth_slice, sizes5);\n  for (int i = 0; i < 4; ++i) {\n    for (int j = 2; j < 5; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        VERIFY_IS_EQUAL(result(i,j,k), tensor5(i,j,k));\n      }\n    }\n  }\n}\n\ntemplate<int DataLayout>\nstatic void test_slice_raw_data()\n{\n  Tensor<float, 4, DataLayout> tensor(3,5,7,11);\n  tensor.setRandom();\n\n  Eigen::DSizes<ptrdiff_t, 4> offsets(1,2,3,4);\n  Eigen::DSizes<ptrdiff_t, 4> extents(1,1,1,1);\n  typedef TensorEvaluator<decltype(tensor.slice(offsets, extents)), DefaultDevice> SliceEvaluator;\n  auto slice1 = SliceEvaluator(tensor.slice(offsets, extents), DefaultDevice());\n  VERIFY_IS_EQUAL(slice1.dimensions().TotalSize(), 1);\n  VERIFY_IS_EQUAL(slice1.data()[0], tensor(1,2,3,4));\n\n  if (DataLayout == ColMajor) {\n    extents = Eigen::DSizes<ptrdiff_t, 4>(2,1,1,1);\n    auto slice2 = SliceEvaluator(tensor.slice(offsets, extents), DefaultDevice());\n    VERIFY_IS_EQUAL(slice2.dimensions().TotalSize(), 2);\n    VERIFY_IS_EQUAL(slice2.data()[0], tensor(1,2,3,4));\n    VERIFY_IS_EQUAL(slice2.data()[1], tensor(2,2,3,4));\n  } else {\n    extents = Eigen::DSizes<ptrdiff_t, 4>(1,1,1,2);\n    auto slice2 = SliceEvaluator(tensor.slice(offsets, extents), DefaultDevice());\n    VERIFY_IS_EQUAL(slice2.dimensions().TotalSize(), 2);\n    VERIFY_IS_EQUAL(slice2.data()[0], tensor(1,2,3,4));\n    VERIFY_IS_EQUAL(slice2.data()[1], tensor(1,2,3,5));\n  }\n\n  extents = Eigen::DSizes<ptrdiff_t, 4>(1,2,1,1);\n  auto slice3 = SliceEvaluator(tensor.slice(offsets, extents), DefaultDevice());\n  VERIFY_IS_EQUAL(slice3.dimensions().TotalSize(), 2);\n  VERIFY_IS_EQUAL(slice3.data(), static_cast<float*>(0));\n\n  if (DataLayout == ColMajor) {\n    offsets = Eigen::DSizes<ptrdiff_t, 4>(0,2,3,4);\n    extents = Eigen::DSizes<ptrdiff_t, 4>(3,2,1,1);\n    auto slice4 = SliceEvaluator(tensor.slice(offsets, extents), DefaultDevice());\n    VERIFY_IS_EQUAL(slice4.dimensions().TotalSize(), 6);\n    for (int i = 0; i < 3; ++i) {\n      for (int j = 0; j < 2; ++j) {\n        VERIFY_IS_EQUAL(slice4.data()[i+3*j], tensor(i,2+j,3,4));\n      }\n    }\n  } else {\n    offsets = Eigen::DSizes<ptrdiff_t, 4>(1,2,3,0);\n    extents = Eigen::DSizes<ptrdiff_t, 4>(1,1,2,11);\n    auto slice4 = SliceEvaluator(tensor.slice(offsets, extents), DefaultDevice());\n    VERIFY_IS_EQUAL(slice4.dimensions().TotalSize(), 22);\n    for (int l = 0; l < 11; ++l) {\n      for (int k = 0; k < 2; ++k) {\n        VERIFY_IS_EQUAL(slice4.data()[l+11*k], tensor(1,2,3+k,l));\n      }\n    }\n  }\n\n  if (DataLayout == ColMajor) {\n    offsets = Eigen::DSizes<ptrdiff_t, 4>(0,0,0,4);\n    extents = Eigen::DSizes<ptrdiff_t, 4>(3,5,7,2);\n    auto slice5 = SliceEvaluator(tensor.slice(offsets, extents), DefaultDevice());\n    VERIFY_IS_EQUAL(slice5.dimensions().TotalSize(), 210);\n    for (int i = 0; i < 3; ++i) {\n      for (int j = 0; j < 5; ++j) {\n        for (int k = 0; k < 7; ++k) {\n          for (int l = 0; l < 2; ++l) {\n            int slice_index = i + 3 * (j + 5 * (k + 7 * l));\n            VERIFY_IS_EQUAL(slice5.data()[slice_index], tensor(i,j,k,l+4));\n          }\n        }\n      }\n    }\n  } else {\n    offsets = Eigen::DSizes<ptrdiff_t, 4>(1,0,0,0);\n    extents = Eigen::DSizes<ptrdiff_t, 4>(2,5,7,11);\n    auto slice5 = SliceEvaluator(tensor.slice(offsets, extents), DefaultDevice());\n    VERIFY_IS_EQUAL(slice5.dimensions().TotalSize(), 770);\n    for (int l = 0; l < 11; ++l) {\n      for (int k = 0; k < 7; ++k) {\n        for (int j = 0; j < 5; ++j) {\n          for (int i = 0; i < 2; ++i) {\n            int slice_index = l + 11 * (k + 7 * (j + 5 * i));\n            VERIFY_IS_EQUAL(slice5.data()[slice_index], tensor(i+1,j,k,l));\n          }\n        }\n      }\n    }\n\n  }\n\n  offsets = Eigen::DSizes<ptrdiff_t, 4>(0,0,0,0);\n  extents = Eigen::DSizes<ptrdiff_t, 4>(3,5,7,11);\n  auto slice6 = SliceEvaluator(tensor.slice(offsets, extents), DefaultDevice());\n  VERIFY_IS_EQUAL(slice6.dimensions().TotalSize(), 3*5*7*11);\n  VERIFY_IS_EQUAL(slice6.data(), tensor.data());\n}\n\n\ntemplate<int DataLayout>\nstatic void test_strided_slice()\n{\n  typedef Tensor<float, 5, DataLayout> Tensor5f;\n  typedef Eigen::DSizes<Eigen::DenseIndex, 5> Index5;\n  typedef Tensor<float, 2, DataLayout> Tensor2f;\n  typedef Eigen::DSizes<Eigen::DenseIndex, 2> Index2;\n  Tensor<float, 5, DataLayout> tensor(2,3,5,7,11);\n  Tensor<float, 2, DataLayout> tensor2(7,11);\n  tensor.setRandom();\n  tensor2.setRandom();\n\n  if (true) {\n    Tensor2f slice(2,3);\n    Index2 strides(-2,-1);\n    Index2 indicesStart(5,7);\n    Index2 indicesStop(0,4);\n    slice = tensor2.stridedSlice(indicesStart, indicesStop, strides);\n    for (int j = 0; j < 2; ++j) {\n      for (int k = 0; k < 3; ++k) {\n        VERIFY_IS_EQUAL(slice(j,k), tensor2(5-2*j,7-k));\n      }\n    }\n  }\n\n  if(true) {\n    Tensor2f slice(0,1);\n    Index2 strides(1,1);\n    Index2 indicesStart(5,4);\n    Index2 indicesStop(5,5);\n    slice = tensor2.stridedSlice(indicesStart, indicesStop, strides);\n  }\n\n  if(true) { // test clamped degenerate interavls\n    Tensor2f slice(7,11);\n    Index2 strides(1,-1);\n    Index2 indicesStart(-3,20); // should become 0,10\n    Index2 indicesStop(20,-11); // should become 11, -1\n    slice = tensor2.stridedSlice(indicesStart, indicesStop, strides);\n    for (int j = 0; j < 7; ++j) {\n      for (int k = 0; k < 11; ++k) {\n        VERIFY_IS_EQUAL(slice(j,k), tensor2(j,10-k));\n      }\n    }\n  }\n\n  if(true) {\n    Tensor5f slice1(1,1,1,1,1);\n    Eigen::DSizes<Eigen::DenseIndex, 5> indicesStart(1, 2, 3, 4, 5);\n    Eigen::DSizes<Eigen::DenseIndex, 5> indicesStop(2, 3, 4, 5, 6);\n    Eigen::DSizes<Eigen::DenseIndex, 5> strides(1, 1, 1, 1, 1);\n    slice1 = tensor.stridedSlice(indicesStart, indicesStop, strides);\n    VERIFY_IS_EQUAL(slice1(0,0,0,0,0), tensor(1,2,3,4,5));\n  }\n\n  if(true) {\n    Tensor5f slice(1,1,2,2,3);\n    Index5 start(1, 1, 3, 4, 5);\n    Index5 stop(2, 2, 5, 6, 8);\n    Index5 strides(1, 1, 1, 1, 1);\n    slice = tensor.stridedSlice(start, stop, strides);\n    for (int i = 0; i < 2; ++i) {\n      for (int j = 0; j < 2; ++j) {\n        for (int k = 0; k < 3; ++k) {\n          VERIFY_IS_EQUAL(slice(0,0,i,j,k), tensor(1,1,3+i,4+j,5+k));\n        }\n      }\n    }\n  }\n\n  if(true) {\n    Tensor5f slice(1,1,2,2,3);\n    Index5 strides3(1, 1, -2, 1, -1);\n    Index5 indices3Start(1, 1, 4, 4, 7);\n    Index5 indices3Stop(2, 2, 0, 6, 4);\n    slice = tensor.stridedSlice(indices3Start, indices3Stop, strides3);\n    for (int i = 0; i < 2; ++i) {\n      for (int j = 0; j < 2; ++j) {\n        for (int k = 0; k < 3; ++k) {\n          VERIFY_IS_EQUAL(slice(0,0,i,j,k), tensor(1,1,4-2*i,4+j,7-k));\n        }\n      }\n    }\n  }\n\n  if(false) { // tests degenerate interval\n    Tensor5f slice(1,1,2,2,3);\n    Index5 strides3(1, 1, 2, 1, 1);\n    Index5 indices3Start(1, 1, 4, 4, 7);\n    Index5 indices3Stop(2, 2, 0, 6, 4);\n    slice = tensor.stridedSlice(indices3Start, indices3Stop, strides3);\n  }\n}\n\ntemplate<int DataLayout>\nstatic void test_strided_slice_write()\n{\n  typedef Tensor<float, 2, DataLayout> Tensor2f;\n  typedef Eigen::DSizes<Eigen::DenseIndex, 2> Index2;\n\n  Tensor<float, 2, DataLayout> tensor(7,11),tensor2(7,11);\n  tensor.setRandom();\n  tensor2=tensor;\n  Tensor2f slice(2,3);\n\n  slice.setRandom();\n\n  Index2 strides(1,1);\n  Index2 indicesStart(3,4);\n  Index2 indicesStop(5,7);\n  Index2 lengths(2,3);\n\n  tensor.slice(indicesStart,lengths)=slice;\n  tensor2.stridedSlice(indicesStart,indicesStop,strides)=slice;\n\n  for(int i=0;i<7;i++) for(int j=0;j<11;j++){\n    VERIFY_IS_EQUAL(tensor(i,j), tensor2(i,j));\n  }\n}\n\n\ntemplate<int DataLayout>\nstatic void test_composition()\n{\n  Eigen::Tensor<float, 2, DataLayout> matrix(7, 11);\n  matrix.setRandom();\n\n  const DSizes<ptrdiff_t, 3> newDims(1, 1, 11);\n  Eigen::Tensor<float, 3, DataLayout> tensor =\n      matrix.slice(DSizes<ptrdiff_t, 2>(2, 0), DSizes<ptrdiff_t, 2>(1, 11)).reshape(newDims);\n\n  VERIFY_IS_EQUAL(tensor.dimensions().TotalSize(), 11);\n  VERIFY_IS_EQUAL(tensor.dimension(0), 1);\n  VERIFY_IS_EQUAL(tensor.dimension(1), 1);\n  VERIFY_IS_EQUAL(tensor.dimension(2), 11);\n  for (int i = 0; i < 11; ++i) {\n    VERIFY_IS_EQUAL(tensor(0,0,i), matrix(2,i));\n  }\n}\n\n\nEIGEN_DECLARE_TEST(cxx11_tensor_morphing)\n{\n  CALL_SUBTEST_1(test_simple_reshape<void>());\n  CALL_SUBTEST_1(test_static_reshape<void>());\n  CALL_SUBTEST_1(test_reshape_in_expr<void>());\n  CALL_SUBTEST_1(test_reshape_as_lvalue<void>());\n\n  CALL_SUBTEST_1(test_simple_slice<ColMajor>());\n  CALL_SUBTEST_1(test_simple_slice<RowMajor>());\n  CALL_SUBTEST_1(test_const_slice());\n  CALL_SUBTEST_2(test_slice_in_expr<ColMajor>());\n  CALL_SUBTEST_3(test_slice_in_expr<RowMajor>());\n  CALL_SUBTEST_4(test_slice_as_lvalue<ColMajor>());\n  CALL_SUBTEST_4(test_slice_as_lvalue<RowMajor>());\n  CALL_SUBTEST_5(test_slice_raw_data<ColMajor>());\n  CALL_SUBTEST_5(test_slice_raw_data<RowMajor>());\n\n  CALL_SUBTEST_6(test_strided_slice_write<ColMajor>());\n  CALL_SUBTEST_6(test_strided_slice<ColMajor>());\n  CALL_SUBTEST_6(test_strided_slice_write<RowMajor>());\n  CALL_SUBTEST_6(test_strided_slice<RowMajor>());\n\n  CALL_SUBTEST_7(test_composition<ColMajor>());\n  CALL_SUBTEST_7(test_composition<RowMajor>());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_morphing_sycl.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016\n// Mehdi Goli    Codeplay Software Ltd.\n// Ralph Potter  Codeplay Software Ltd.\n// Luke Iwanski  Codeplay Software Ltd.\n// Contact: <eigen@codeplay.com>\n// Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n\n#define EIGEN_TEST_NO_LONGDOUBLE\n#define EIGEN_TEST_NO_COMPLEX\n\n#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int64_t\n#define EIGEN_USE_SYCL\n\n\n#include \"main.h\"\n#include <unsupported/Eigen/CXX11/Tensor>\n\nusing Eigen::array;\nusing Eigen::SyclDevice;\nusing Eigen::Tensor;\nusing Eigen::TensorMap;\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_simple_reshape(const Eigen::SyclDevice& sycl_device)\n{\n  typename Tensor<DataType, 5 ,DataLayout, IndexType>::Dimensions dim1(2,3,1,7,1);\n  typename Tensor<DataType, 3 ,DataLayout, IndexType>::Dimensions dim2(2,3,7);\n  typename Tensor<DataType, 2 ,DataLayout, IndexType>::Dimensions dim3(6,7);\n  typename Tensor<DataType, 2 ,DataLayout, IndexType>::Dimensions dim4(2,21);\n\n  Tensor<DataType, 5, DataLayout, IndexType> tensor1(dim1);\n  Tensor<DataType, 3, DataLayout, IndexType> tensor2(dim2);\n  Tensor<DataType, 2, DataLayout, IndexType> tensor3(dim3);\n  Tensor<DataType, 2, DataLayout, IndexType> tensor4(dim4);\n\n  tensor1.setRandom();\n\n  DataType* gpu_data1  = static_cast<DataType*>(sycl_device.allocate(tensor1.size()*sizeof(DataType)));\n  DataType* gpu_data2  = static_cast<DataType*>(sycl_device.allocate(tensor2.size()*sizeof(DataType)));\n  DataType* gpu_data3  = static_cast<DataType*>(sycl_device.allocate(tensor3.size()*sizeof(DataType)));\n  DataType* gpu_data4  = static_cast<DataType*>(sycl_device.allocate(tensor4.size()*sizeof(DataType)));\n\n  TensorMap<Tensor<DataType, 5,DataLayout, IndexType>> gpu1(gpu_data1, dim1);\n  TensorMap<Tensor<DataType, 3,DataLayout, IndexType>> gpu2(gpu_data2, dim2);\n  TensorMap<Tensor<DataType, 2,DataLayout, IndexType>> gpu3(gpu_data3, dim3);\n  TensorMap<Tensor<DataType, 2,DataLayout, IndexType>> gpu4(gpu_data4, dim4);\n\n  sycl_device.memcpyHostToDevice(gpu_data1, tensor1.data(),(tensor1.size())*sizeof(DataType));\n\n  gpu2.device(sycl_device)=gpu1.reshape(dim2);\n  sycl_device.memcpyDeviceToHost(tensor2.data(), gpu_data2,(tensor1.size())*sizeof(DataType));\n\n  gpu3.device(sycl_device)=gpu1.reshape(dim3);\n  sycl_device.memcpyDeviceToHost(tensor3.data(), gpu_data3,(tensor3.size())*sizeof(DataType));\n\n  gpu4.device(sycl_device)=gpu1.reshape(dim2).reshape(dim4);\n  sycl_device.memcpyDeviceToHost(tensor4.data(), gpu_data4,(tensor4.size())*sizeof(DataType));\n  for (IndexType i = 0; i < 2; ++i){\n    for (IndexType j = 0; j < 3; ++j){\n      for (IndexType k = 0; k < 7; ++k){\n        VERIFY_IS_EQUAL(tensor1(i,j,0,k,0), tensor2(i,j,k));      ///ColMajor\n        if (static_cast<int>(DataLayout) == static_cast<int>(ColMajor)) {\n          VERIFY_IS_EQUAL(tensor1(i,j,0,k,0), tensor3(i+2*j,k));    ///ColMajor\n          VERIFY_IS_EQUAL(tensor1(i,j,0,k,0), tensor4(i,j+3*k));    ///ColMajor\n        }\n        else{\n          //VERIFY_IS_EQUAL(tensor1(i,j,0,k,0), tensor2(i,j,k));      /// RowMajor\n          VERIFY_IS_EQUAL(tensor1(i,j,0,k,0), tensor4(i,j*7 +k));   /// RowMajor\n          VERIFY_IS_EQUAL(tensor1(i,j,0,k,0), tensor3(i*3 +j,k));   /// RowMajor\n        }\n      }\n    }\n  }\n  sycl_device.deallocate(gpu_data1);\n  sycl_device.deallocate(gpu_data2);\n  sycl_device.deallocate(gpu_data3);\n  sycl_device.deallocate(gpu_data4);\n}\n\n\ntemplate<typename DataType, int DataLayout, typename IndexType>\nstatic void test_reshape_as_lvalue(const Eigen::SyclDevice& sycl_device)\n{\n  typename Tensor<DataType, 3, DataLayout, IndexType>::Dimensions dim1(2,3,7);\n  typename Tensor<DataType, 2, DataLayout, IndexType>::Dimensions dim2(6,7);\n  typename Tensor<DataType, 5, DataLayout, IndexType>::Dimensions dim3(2,3,1,7,1);\n  Tensor<DataType, 3, DataLayout, IndexType> tensor(dim1);\n  Tensor<DataType, 2, DataLayout, IndexType> tensor2d(dim2);\n  Tensor<DataType, 5, DataLayout, IndexType> tensor5d(dim3);\n\n  tensor.setRandom();\n\n  DataType* gpu_data1  = static_cast<DataType*>(sycl_device.allocate(tensor.size()*sizeof(DataType)));\n  DataType* gpu_data2  = static_cast<DataType*>(sycl_device.allocate(tensor2d.size()*sizeof(DataType)));\n  DataType* gpu_data3  = static_cast<DataType*>(sycl_device.allocate(tensor5d.size()*sizeof(DataType)));\n\n  TensorMap< Tensor<DataType, 3, DataLayout, IndexType> > gpu1(gpu_data1, dim1);\n  TensorMap< Tensor<DataType, 2, DataLayout, IndexType> > gpu2(gpu_data2, dim2);\n  TensorMap< Tensor<DataType, 5, DataLayout, IndexType> > gpu3(gpu_data3, dim3);\n\n  sycl_device.memcpyHostToDevice(gpu_data1, tensor.data(),(tensor.size())*sizeof(DataType));\n\n  gpu2.reshape(dim1).device(sycl_device)=gpu1;\n  sycl_device.memcpyDeviceToHost(tensor2d.data(), gpu_data2,(tensor2d.size())*sizeof(DataType));\n\n  gpu3.reshape(dim1).device(sycl_device)=gpu1;\n  sycl_device.memcpyDeviceToHost(tensor5d.data(), gpu_data3,(tensor5d.size())*sizeof(DataType));\n\n\n  for (IndexType i = 0; i < 2; ++i){\n    for (IndexType j = 0; j < 3; ++j){\n      for (IndexType k = 0; k < 7; ++k){\n        VERIFY_IS_EQUAL(tensor5d(i,j,0,k,0), tensor(i,j,k));\n        if (static_cast<int>(DataLayout) == static_cast<int>(ColMajor)) {\n          VERIFY_IS_EQUAL(tensor2d(i+2*j,k), tensor(i,j,k));    ///ColMajor\n        }\n        else{\n          VERIFY_IS_EQUAL(tensor2d(i*3 +j,k),tensor(i,j,k));   /// RowMajor\n        }\n      }\n    }\n  }\n  sycl_device.deallocate(gpu_data1);\n  sycl_device.deallocate(gpu_data2);\n  sycl_device.deallocate(gpu_data3);\n}\n\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_simple_slice(const Eigen::SyclDevice &sycl_device)\n{\n  IndexType sizeDim1 = 2;\n  IndexType sizeDim2 = 3;\n  IndexType sizeDim3 = 5;\n  IndexType sizeDim4 = 7;\n  IndexType sizeDim5 = 11;\n  array<IndexType, 5> tensorRange = {{sizeDim1, sizeDim2, sizeDim3, sizeDim4, sizeDim5}};\n  Tensor<DataType, 5,DataLayout, IndexType> tensor(tensorRange);\n  tensor.setRandom();\n  array<IndexType, 5> slice1_range ={{1, 1, 1, 1, 1}};\n  Tensor<DataType, 5,DataLayout, IndexType> slice1(slice1_range);\n\n  DataType* gpu_data1  = static_cast<DataType*>(sycl_device.allocate(tensor.size()*sizeof(DataType)));\n  DataType* gpu_data2  = static_cast<DataType*>(sycl_device.allocate(slice1.size()*sizeof(DataType)));\n  TensorMap<Tensor<DataType, 5,DataLayout, IndexType>> gpu1(gpu_data1, tensorRange);\n  TensorMap<Tensor<DataType, 5,DataLayout, IndexType>> gpu2(gpu_data2, slice1_range);\n  Eigen::DSizes<IndexType, 5> indices(1,2,3,4,5);\n  Eigen::DSizes<IndexType, 5> sizes(1,1,1,1,1);\n  sycl_device.memcpyHostToDevice(gpu_data1, tensor.data(),(tensor.size())*sizeof(DataType));\n  gpu2.device(sycl_device)=gpu1.slice(indices, sizes);\n  sycl_device.memcpyDeviceToHost(slice1.data(), gpu_data2,(slice1.size())*sizeof(DataType));\n  VERIFY_IS_EQUAL(slice1(0,0,0,0,0), tensor(1,2,3,4,5));\n\n\n  array<IndexType, 5> slice2_range ={{1,1,2,2,3}};\n  Tensor<DataType, 5,DataLayout, IndexType> slice2(slice2_range);\n  DataType* gpu_data3  = static_cast<DataType*>(sycl_device.allocate(slice2.size()*sizeof(DataType)));\n  TensorMap<Tensor<DataType, 5,DataLayout, IndexType>> gpu3(gpu_data3, slice2_range);\n  Eigen::DSizes<IndexType, 5> indices2(1,1,3,4,5);\n  Eigen::DSizes<IndexType, 5> sizes2(1,1,2,2,3);\n  gpu3.device(sycl_device)=gpu1.slice(indices2, sizes2);\n  sycl_device.memcpyDeviceToHost(slice2.data(), gpu_data3,(slice2.size())*sizeof(DataType));\n  for (IndexType i = 0; i < 2; ++i) {\n    for (IndexType j = 0; j < 2; ++j) {\n      for (IndexType k = 0; k < 3; ++k) {\n        VERIFY_IS_EQUAL(slice2(0,0,i,j,k), tensor(1,1,3+i,4+j,5+k));\n      }\n    }\n  }\n  sycl_device.deallocate(gpu_data1);\n  sycl_device.deallocate(gpu_data2);\n  sycl_device.deallocate(gpu_data3);\n}\n\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_strided_slice_as_rhs_sycl(const Eigen::SyclDevice &sycl_device)\n{\n  IndexType sizeDim1 = 2;\n  IndexType sizeDim2 = 3;\n  IndexType sizeDim3 = 5;\n  IndexType sizeDim4 = 7;\n  IndexType sizeDim5 = 11;\n  typedef Eigen::DSizes<IndexType, 5> Index5;\n  Index5 strides(1L,1L,1L,1L,1L);\n  Index5 indicesStart(1L,2L,3L,4L,5L);\n  Index5 indicesStop(2L,3L,4L,5L,6L);\n  Index5 lengths(1L,1L,1L,1L,1L);\n\n  array<IndexType, 5> tensorRange = {{sizeDim1, sizeDim2, sizeDim3, sizeDim4, sizeDim5}};\n  Tensor<DataType, 5, DataLayout, IndexType> tensor(tensorRange);\n  tensor.setRandom();\n\n  array<IndexType, 5> slice1_range ={{1, 1, 1, 1, 1}};\n  Tensor<DataType, 5,DataLayout, IndexType> slice1(slice1_range);\n  Tensor<DataType, 5, DataLayout, IndexType> slice_stride1(slice1_range);\n\n  DataType* gpu_data1  = static_cast<DataType*>(sycl_device.allocate(tensor.size()*sizeof(DataType)));\n  DataType* gpu_data2  = static_cast<DataType*>(sycl_device.allocate(slice1.size()*sizeof(DataType)));\n  DataType* gpu_data_stride2  = static_cast<DataType*>(sycl_device.allocate(slice_stride1.size()*sizeof(DataType)));\n\n  TensorMap<Tensor<DataType, 5,DataLayout, IndexType>> gpu1(gpu_data1, tensorRange);\n  TensorMap<Tensor<DataType, 5,DataLayout, IndexType>> gpu2(gpu_data2, slice1_range);\n  TensorMap<Tensor<DataType, 5,DataLayout, IndexType>> gpu_stride2(gpu_data_stride2, slice1_range);\n\n  Eigen::DSizes<IndexType, 5> indices(1,2,3,4,5);\n  Eigen::DSizes<IndexType, 5> sizes(1,1,1,1,1);\n  sycl_device.memcpyHostToDevice(gpu_data1, tensor.data(),(tensor.size())*sizeof(DataType));\n  gpu2.device(sycl_device)=gpu1.slice(indices, sizes);\n  sycl_device.memcpyDeviceToHost(slice1.data(), gpu_data2,(slice1.size())*sizeof(DataType));\n\n  gpu_stride2.device(sycl_device)=gpu1.stridedSlice(indicesStart,indicesStop,strides);\n  sycl_device.memcpyDeviceToHost(slice_stride1.data(), gpu_data_stride2,(slice_stride1.size())*sizeof(DataType));\n\n  VERIFY_IS_EQUAL(slice1(0,0,0,0,0), tensor(1,2,3,4,5));\n  VERIFY_IS_EQUAL(slice_stride1(0,0,0,0,0), tensor(1,2,3,4,5));\n\n  array<IndexType, 5> slice2_range ={{1,1,2,2,3}};\n  Tensor<DataType, 5,DataLayout, IndexType> slice2(slice2_range);\n  Tensor<DataType, 5, DataLayout, IndexType> strideSlice2(slice2_range);\n\n  DataType* gpu_data3  = static_cast<DataType*>(sycl_device.allocate(slice2.size()*sizeof(DataType)));\n  DataType* gpu_data_stride3  = static_cast<DataType*>(sycl_device.allocate(strideSlice2.size()*sizeof(DataType)));\n  TensorMap<Tensor<DataType, 5,DataLayout, IndexType>> gpu3(gpu_data3, slice2_range);\n  TensorMap<Tensor<DataType, 5,DataLayout, IndexType>> gpu_stride3(gpu_data_stride3, slice2_range);\n  Eigen::DSizes<IndexType, 5> indices2(1,1,3,4,5);\n  Eigen::DSizes<IndexType, 5> sizes2(1,1,2,2,3);\n  Index5 strides2(1L,1L,1L,1L,1L);\n  Index5 indicesStart2(1L,1L,3L,4L,5L);\n  Index5 indicesStop2(2L,2L,5L,6L,8L);\n\n  gpu3.device(sycl_device)=gpu1.slice(indices2, sizes2);\n  sycl_device.memcpyDeviceToHost(slice2.data(), gpu_data3,(slice2.size())*sizeof(DataType));\n\n  gpu_stride3.device(sycl_device)=gpu1.stridedSlice(indicesStart2,indicesStop2,strides2);\n  sycl_device.memcpyDeviceToHost(strideSlice2.data(), gpu_data_stride3,(strideSlice2.size())*sizeof(DataType));\n\n  for (IndexType i = 0; i < 2; ++i) {\n    for (IndexType j = 0; j < 2; ++j) {\n      for (IndexType k = 0; k < 3; ++k) {\n        VERIFY_IS_EQUAL(slice2(0,0,i,j,k), tensor(1,1,3+i,4+j,5+k));\n        VERIFY_IS_EQUAL(strideSlice2(0,0,i,j,k), tensor(1,1,3+i,4+j,5+k));\n      }\n    }\n  }\n  sycl_device.deallocate(gpu_data1);\n  sycl_device.deallocate(gpu_data2);\n  sycl_device.deallocate(gpu_data3);\n}\n\ntemplate<typename DataType, int DataLayout, typename IndexType>\nstatic void test_strided_slice_write_sycl(const Eigen::SyclDevice& sycl_device)\n{\n  typedef Tensor<DataType, 2, DataLayout, IndexType> Tensor2f;\n  typedef Eigen::DSizes<IndexType, 2> Index2;\n  IndexType sizeDim1 = 7L;\n  IndexType sizeDim2 = 11L;\n  array<IndexType, 2> tensorRange = {{sizeDim1, sizeDim2}};\n  Tensor<DataType, 2, DataLayout, IndexType> tensor(tensorRange),tensor2(tensorRange);\n  IndexType sliceDim1 = 2;\n  IndexType sliceDim2 = 3;\n  array<IndexType, 2> sliceRange = {{sliceDim1, sliceDim2}};\n  Tensor2f slice(sliceRange);\n  Index2 strides(1L,1L);\n  Index2 indicesStart(3L,4L);\n  Index2 indicesStop(5L,7L);\n  Index2 lengths(2L,3L);\n\n  DataType* gpu_data1  = static_cast<DataType*>(sycl_device.allocate(tensor.size()*sizeof(DataType)));\n  DataType* gpu_data2  = static_cast<DataType*>(sycl_device.allocate(tensor2.size()*sizeof(DataType)));\n  DataType* gpu_data3  = static_cast<DataType*>(sycl_device.allocate(slice.size()*sizeof(DataType)));\n  TensorMap<Tensor<DataType, 2,DataLayout,IndexType>> gpu1(gpu_data1, tensorRange);\n  TensorMap<Tensor<DataType, 2,DataLayout,IndexType>> gpu2(gpu_data2, tensorRange);\n  TensorMap<Tensor<DataType, 2,DataLayout,IndexType>> gpu3(gpu_data3, sliceRange);\n\n\n  tensor.setRandom();\n  sycl_device.memcpyHostToDevice(gpu_data1, tensor.data(),(tensor.size())*sizeof(DataType));\n  gpu2.device(sycl_device)=gpu1;\n\n  slice.setRandom();\n  sycl_device.memcpyHostToDevice(gpu_data3, slice.data(),(slice.size())*sizeof(DataType));\n\n\n  gpu1.slice(indicesStart,lengths).device(sycl_device)=gpu3;\n  gpu2.stridedSlice(indicesStart,indicesStop,strides).device(sycl_device)=gpu3;\n  sycl_device.memcpyDeviceToHost(tensor.data(), gpu_data1,(tensor.size())*sizeof(DataType));\n  sycl_device.memcpyDeviceToHost(tensor2.data(), gpu_data2,(tensor2.size())*sizeof(DataType));\n\n  for(IndexType i=0;i<sizeDim1;i++)\n    for(IndexType j=0;j<sizeDim2;j++){\n    VERIFY_IS_EQUAL(tensor(i,j), tensor2(i,j));\n  }\n  sycl_device.deallocate(gpu_data1);\n  sycl_device.deallocate(gpu_data2);\n  sycl_device.deallocate(gpu_data3);\n}\n\ntemplate <typename OutIndex, typename DSizes>\nEigen::array<OutIndex, DSizes::count> To32BitDims(const DSizes& in) {\n  Eigen::array<OutIndex, DSizes::count> out;\n  for (int i = 0; i < DSizes::count; ++i) {\n    out[i] = in[i];\n  }\n  return out;\n}\n\ntemplate <class DataType, int DataLayout, typename IndexType, typename ConvertedIndexType>\nint run_eigen(const SyclDevice& sycl_device) {\n  using TensorI64 = Tensor<DataType, 5, DataLayout, IndexType>;\n  using TensorI32 = Tensor<DataType, 5, DataLayout, ConvertedIndexType>;\n  using TensorMI64 = TensorMap<TensorI64>;\n  using TensorMI32 = TensorMap<TensorI32>;\n  Eigen::array<IndexType, 5> tensor_range{{4, 1, 1, 1, 6}};\n  Eigen::array<IndexType, 5> slice_range{{4, 1, 1, 1, 3}};\n\n  TensorI64 out_tensor_gpu(tensor_range);\n  TensorI64 out_tensor_cpu(tensor_range);\n  out_tensor_cpu.setRandom();\n\n  TensorI64 sub_tensor(slice_range);\n  sub_tensor.setRandom();\n\n  DataType* out_gpu_data = static_cast<DataType*>(sycl_device.allocate(out_tensor_cpu.size() * sizeof(DataType)));\n  DataType* sub_gpu_data = static_cast<DataType*>(sycl_device.allocate(sub_tensor.size() * sizeof(DataType)));\n  TensorMI64 out_gpu(out_gpu_data, tensor_range);\n  TensorMI64 sub_gpu(sub_gpu_data, slice_range);\n\n  sycl_device.memcpyHostToDevice(out_gpu_data, out_tensor_cpu.data(), out_tensor_cpu.size() * sizeof(DataType));\n  sycl_device.memcpyHostToDevice(sub_gpu_data, sub_tensor.data(), sub_tensor.size() * sizeof(DataType));\n\n  Eigen::array<ConvertedIndexType, 5> slice_offset_32{{0, 0, 0, 0, 3}};\n  Eigen::array<ConvertedIndexType, 5> slice_range_32{{4, 1, 1, 1, 3}};\n  TensorMI32 out_cpu_32(out_tensor_cpu.data(), To32BitDims<ConvertedIndexType>(out_tensor_cpu.dimensions()));\n  TensorMI32 sub_cpu_32(sub_tensor.data(), To32BitDims<ConvertedIndexType>(sub_tensor.dimensions()));\n  TensorMI32 out_gpu_32(out_gpu.data(), To32BitDims<ConvertedIndexType>(out_gpu.dimensions()));\n  TensorMI32 sub_gpu_32(sub_gpu.data(), To32BitDims<ConvertedIndexType>(sub_gpu.dimensions()));\n\n  out_gpu_32.slice(slice_offset_32, slice_range_32).device(sycl_device) = sub_gpu_32;\n\n  out_cpu_32.slice(slice_offset_32, slice_range_32) = sub_cpu_32;\n\n  sycl_device.memcpyDeviceToHost(out_tensor_gpu.data(), out_gpu_data, out_tensor_cpu.size() * sizeof(DataType));\n  int has_err = 0;\n  for (IndexType i = 0; i < out_tensor_cpu.size(); ++i) {\n    auto exp = out_tensor_cpu(i);\n    auto val = out_tensor_gpu(i);\n    if (val != exp) {\n      std::cout << \"#\" << i << \" got \" << val << \" but expected \" << exp << std::endl;\n      has_err = 1;\n    }\n  }\n  sycl_device.deallocate(out_gpu_data);\n  sycl_device.deallocate(sub_gpu_data);\n  return has_err;\n}\n\ntemplate<typename DataType, typename dev_Selector> void sycl_morphing_test_per_device(dev_Selector s){\n  QueueInterface queueInterface(s);\n  auto sycl_device = Eigen::SyclDevice(&queueInterface);\n  test_simple_slice<DataType, RowMajor, int64_t>(sycl_device);\n  test_simple_slice<DataType, ColMajor, int64_t>(sycl_device);\n  test_simple_reshape<DataType, RowMajor, int64_t>(sycl_device);\n  test_simple_reshape<DataType, ColMajor, int64_t>(sycl_device);\n  test_reshape_as_lvalue<DataType, RowMajor, int64_t>(sycl_device);\n  test_reshape_as_lvalue<DataType, ColMajor, int64_t>(sycl_device);\n  test_strided_slice_write_sycl<DataType, ColMajor, int64_t>(sycl_device);\n  test_strided_slice_write_sycl<DataType, RowMajor, int64_t>(sycl_device);\n  test_strided_slice_as_rhs_sycl<DataType, ColMajor, int64_t>(sycl_device);\n  test_strided_slice_as_rhs_sycl<DataType, RowMajor, int64_t>(sycl_device);\n  run_eigen<float, RowMajor, long, int>(sycl_device); \n}\nEIGEN_DECLARE_TEST(cxx11_tensor_morphing_sycl)\n{\n  for (const auto& device :Eigen::get_sycl_supported_devices()) {\n    CALL_SUBTEST(sycl_morphing_test_per_device<float>(device));\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_move.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2017 Viktor Csomor <viktor.csomor@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n#include <utility>\n\nusing Eigen::Tensor;\nusing Eigen::RowMajor;\n\nstatic void calc_indices(int i, int& x, int& y, int& z)\n{\n  x = i / 4;\n  y = (i % 4) / 2;\n  z = i % 2;\n}\n\nstatic void test_move()\n{\n  int x;\n  int y;\n  int z;\n\n  Tensor<int,3> tensor1(2, 2, 2);\n  Tensor<int,3,RowMajor> tensor2(2, 2, 2);\n\n  for (int i = 0; i < 8; i++)\n  {\n    calc_indices(i, x, y, z);\n    tensor1(x,y,z) = i;\n    tensor2(x,y,z) = 2 * i;\n  }\n\n  // Invokes the move constructor.\n  Tensor<int,3> moved_tensor1 = std::move(tensor1);\n  Tensor<int,3,RowMajor> moved_tensor2 = std::move(tensor2);\n\n  VERIFY_IS_EQUAL(tensor1.size(), 0);\n  VERIFY_IS_EQUAL(tensor2.size(), 0);\n\n  for (int i = 0; i < 8; i++)\n  {\n    calc_indices(i, x, y, z);\n    VERIFY_IS_EQUAL(moved_tensor1(x,y,z), i);\n    VERIFY_IS_EQUAL(moved_tensor2(x,y,z), 2 * i);\n  }\n\n  Tensor<int,3> moved_tensor3(2,2,2);\n  Tensor<int,3,RowMajor> moved_tensor4(2,2,2);\n\n  moved_tensor3.setZero();\n  moved_tensor4.setZero();\n\n  // Invokes the move assignment operator.\n  moved_tensor3 = std::move(moved_tensor1);\n  moved_tensor4 = std::move(moved_tensor2);\n\n  VERIFY_IS_EQUAL(moved_tensor1.size(), 8);\n  VERIFY_IS_EQUAL(moved_tensor2.size(), 8);\n\n  for (int i = 0; i < 8; i++)\n  {\n    calc_indices(i, x, y, z);\n    VERIFY_IS_EQUAL(moved_tensor1(x,y,z), 0);\n    VERIFY_IS_EQUAL(moved_tensor2(x,y,z), 0);\n    VERIFY_IS_EQUAL(moved_tensor3(x,y,z), i);\n    VERIFY_IS_EQUAL(moved_tensor4(x,y,z), 2 * i);\n  }\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_move)\n{\n  CALL_SUBTEST(test_move());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_notification.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Vijay Vasudevan <vrv@google.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_USE_THREADS\n\n#include <atomic>\n\n#include <stdlib.h>\n#include \"main.h\"\n#include <Eigen/CXX11/Tensor>\n\nstatic void test_notification_single()\n{\n  ThreadPool thread_pool(1);\n\n  std::atomic<int> counter(0);\n  Eigen::Notification n;\n  auto func = [&n, &counter](){ n.Wait(); ++counter;};\n  thread_pool.Schedule(func);\n  EIGEN_SLEEP(1000);\n\n  // The thread should be waiting for the notification.\n  VERIFY_IS_EQUAL(counter, 0);\n\n  // Unblock the thread\n  n.Notify();\n\n  EIGEN_SLEEP(1000);\n\n  // Verify the counter has been incremented\n  VERIFY_IS_EQUAL(counter, 1);\n}\n\n// Like test_notification_single() but enqueues multiple threads to\n// validate that all threads get notified by Notify().\nstatic void test_notification_multiple()\n{\n  ThreadPool thread_pool(1);\n\n  std::atomic<int> counter(0);\n  Eigen::Notification n;\n  auto func = [&n, &counter](){ n.Wait(); ++counter;};\n  thread_pool.Schedule(func);\n  thread_pool.Schedule(func);\n  thread_pool.Schedule(func);\n  thread_pool.Schedule(func);\n  EIGEN_SLEEP(1000);\n  VERIFY_IS_EQUAL(counter, 0);\n  n.Notify();\n  EIGEN_SLEEP(1000);\n  VERIFY_IS_EQUAL(counter, 4);\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_notification)\n{\n  CALL_SUBTEST(test_notification_single());\n  CALL_SUBTEST(test_notification_multiple());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_of_complex.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\nusing Eigen::TensorMap;\n\n\n\nstatic void test_additions()\n{\n  Tensor<std::complex<float>, 1> data1(3);\n  Tensor<std::complex<float>, 1> data2(3);\n  for (int i = 0; i < 3; ++i) {\n    data1(i) = std::complex<float>(i, -i);\n    data2(i) = std::complex<float>(i, 7 * i);\n  }\n\n  Tensor<std::complex<float>, 1> sum = data1 + data2;\n  for (int i = 0; i < 3; ++i) {\n    VERIFY_IS_EQUAL(sum(i),  std::complex<float>(2*i, 6*i));\n  }\n}\n\n\nstatic void test_abs()\n{\n  Tensor<std::complex<float>, 1> data1(3);\n  Tensor<std::complex<double>, 1> data2(3);\n  data1.setRandom();\n  data2.setRandom();\n\n  Tensor<float, 1> abs1 = data1.abs();\n  Tensor<double, 1> abs2 = data2.abs();\n  for (int i = 0; i < 3; ++i) {\n    VERIFY_IS_APPROX(abs1(i), std::abs(data1(i)));\n    VERIFY_IS_APPROX(abs2(i), std::abs(data2(i)));\n  }\n}\n\n\nstatic void test_conjugate()\n{\n  Tensor<std::complex<float>, 1> data1(3);\n  Tensor<std::complex<double>, 1> data2(3);\n  Tensor<int, 1> data3(3);\n  data1.setRandom();\n  data2.setRandom();\n  data3.setRandom();\n\n  Tensor<std::complex<float>, 1> conj1 = data1.conjugate();\n  Tensor<std::complex<double>, 1> conj2 = data2.conjugate();\n  Tensor<int, 1> conj3 = data3.conjugate();\n  for (int i = 0; i < 3; ++i) {\n    VERIFY_IS_APPROX(conj1(i), std::conj(data1(i)));\n    VERIFY_IS_APPROX(conj2(i), std::conj(data2(i)));\n    VERIFY_IS_APPROX(conj3(i), data3(i));\n  }\n}\n\nstatic void test_contractions()\n{\n  Tensor<std::complex<float>, 4> t_left(30, 50, 8, 31);\n  Tensor<std::complex<float>, 5> t_right(8, 31, 7, 20, 10);\n  Tensor<std::complex<float>, 5> t_result(30, 50, 7, 20, 10);\n\n  t_left.setRandom();\n  t_right.setRandom();\n\n  typedef Map<Matrix<std::complex<float>, Dynamic, Dynamic>> MapXcf;\n  MapXcf m_left(t_left.data(), 1500, 248);\n  MapXcf m_right(t_right.data(), 248, 1400);\n  Matrix<std::complex<float>, Dynamic, Dynamic> m_result(1500, 1400);\n\n  // This contraction should be equivalent to a regular matrix multiplication\n  typedef Tensor<float, 1>::DimensionPair DimPair;\n  Eigen::array<DimPair, 2> dims;\n  dims[0] = DimPair(2, 0);\n  dims[1] = DimPair(3, 1);\n  t_result = t_left.contract(t_right, dims);\n  m_result = m_left * m_right;\n  for (int i = 0; i < t_result.dimensions().TotalSize(); i++) {\n    VERIFY_IS_APPROX(t_result.data()[i], m_result.data()[i]);\n  }\n}\n\n\nEIGEN_DECLARE_TEST(cxx11_tensor_of_complex)\n{\n  CALL_SUBTEST(test_additions());\n  CALL_SUBTEST(test_abs());\n  CALL_SUBTEST(test_conjugate());\n  CALL_SUBTEST(test_contractions());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_of_const_values.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\nusing Eigen::RowMajor;\n\nstatic void test_assign()\n{\n  float data1[6];\n  TensorMap<Tensor<const float, 2>> mat1(data1, 2, 3);\n  float data2[6];\n  const TensorMap<Tensor<float, 2>> mat2(data2, 2, 3);\n\n  for (int i = 0; i < 6; ++i) {\n    data1[i] = i;\n    data2[i] = -i;\n  }\n\n  Tensor<float, 2> rslt1;\n  rslt1 = mat1;\n  Tensor<float, 2> rslt2;\n  rslt2 = mat2;\n\n  Tensor<float, 2> rslt3 = mat1;\n  Tensor<float, 2> rslt4 = mat2;\n\n  Tensor<float, 2> rslt5(mat1);\n  Tensor<float, 2> rslt6(mat2);\n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      VERIFY_IS_APPROX(rslt1(i,j), static_cast<float>(i + 2*j));\n      VERIFY_IS_APPROX(rslt2(i,j), static_cast<float>(-i - 2*j));\n      VERIFY_IS_APPROX(rslt3(i,j), static_cast<float>(i + 2*j));\n      VERIFY_IS_APPROX(rslt4(i,j), static_cast<float>(-i - 2*j));\n      VERIFY_IS_APPROX(rslt5(i,j), static_cast<float>(i + 2*j));\n      VERIFY_IS_APPROX(rslt6(i,j), static_cast<float>(-i - 2*j));\n    }\n  }\n}\n\n\nstatic void test_plus()\n{\n  float data1[6];\n  TensorMap<Tensor<const float, 2>> mat1(data1, 2, 3);\n  float data2[6];\n  TensorMap<Tensor<float, 2>> mat2(data2, 2, 3);\n\n  for (int i = 0; i < 6; ++i) {\n    data1[i] = i;\n    data2[i] = -i;\n  }\n\n  Tensor<float, 2> sum1;\n  sum1 = mat1 + mat2;\n  Tensor<float, 2> sum2;\n  sum2 = mat2 + mat1;\n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      VERIFY_IS_APPROX(sum1(i,j), 0.0f);\n      VERIFY_IS_APPROX(sum2(i,j), 0.0f);\n    }\n  }\n}\n\n\nstatic void test_plus_equal()\n{\n  float data1[6];\n  TensorMap<Tensor<const float, 2>> mat1(data1, 2, 3);\n  float data2[6];\n  TensorMap<Tensor<float, 2>> mat2(data2, 2, 3);\n\n  for (int i = 0; i < 6; ++i) {\n    data1[i] = i;\n    data2[i] = -i;\n  }\n  mat2 += mat1;\n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      VERIFY_IS_APPROX(mat2(i,j), 0.0f);\n    }\n  }\n}\n\n\nEIGEN_DECLARE_TEST(cxx11_tensor_of_const_values)\n{\n  CALL_SUBTEST(test_assign());\n  CALL_SUBTEST(test_plus());\n  CALL_SUBTEST(test_plus_equal());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_of_float16_gpu.cu",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_TEST_NO_LONGDOUBLE\n#define EIGEN_TEST_NO_COMPLEX\n\n#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int\n#define EIGEN_USE_GPU\n\n#include \"main.h\"\n#include <unsupported/Eigen/CXX11/Tensor>\n\n\nusing Eigen::Tensor;\n\ntemplate<typename>\nvoid test_gpu_numext() {\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n  int num_elem = 101;\n\n  float* d_float = (float*)gpu_device.allocate(num_elem * sizeof(float));\n  bool* d_res_half = (bool*)gpu_device.allocate(num_elem * sizeof(bool));\n  bool* d_res_float = (bool*)gpu_device.allocate(num_elem * sizeof(bool));\n\n  Eigen::TensorMap<Eigen::Tensor<float, 1>, Eigen::Aligned> gpu_float(\n      d_float, num_elem);\n  Eigen::TensorMap<Eigen::Tensor<bool, 1>, Eigen::Aligned> gpu_res_half(\n      d_res_half, num_elem);\n  Eigen::TensorMap<Eigen::Tensor<bool, 1>, Eigen::Aligned> gpu_res_float(\n      d_res_float, num_elem);\n\n  gpu_float.device(gpu_device) = gpu_float.random() - gpu_float.constant(0.5f);\n  gpu_res_float.device(gpu_device) = gpu_float.unaryExpr(Eigen::internal::scalar_isnan_op<float>());\n  gpu_res_half.device(gpu_device) = gpu_float.cast<Eigen::half>().unaryExpr(Eigen::internal::scalar_isnan_op<Eigen::half>());\n\n  Tensor<bool, 1> half_prec(num_elem);\n  Tensor<bool, 1> full_prec(num_elem);\n  gpu_device.memcpyDeviceToHost(half_prec.data(), d_res_half, num_elem*sizeof(bool));\n  gpu_device.memcpyDeviceToHost(full_prec.data(), d_res_float, num_elem*sizeof(bool));\n  gpu_device.synchronize();\n\n  for (int i = 0; i < num_elem; ++i) {\n    std::cout << \"Checking numext \" << i << std::endl;\n    VERIFY_IS_EQUAL(full_prec(i), half_prec(i));\n  }\n\n  gpu_device.deallocate(d_float);\n  gpu_device.deallocate(d_res_half);\n  gpu_device.deallocate(d_res_float);\n}\n\n\n#ifdef EIGEN_HAS_GPU_FP16\n\ntemplate<typename>\nvoid test_gpu_conversion() {\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n  int num_elem = 101;\n  \n  float* d_float = (float*)gpu_device.allocate(num_elem * sizeof(float));\n  Eigen::half* d_half = (Eigen::half*)gpu_device.allocate(num_elem * sizeof(Eigen::half));\n  float* d_conv = (float*)gpu_device.allocate(num_elem * sizeof(float));\n\n  Eigen::TensorMap<Eigen::Tensor<float, 1>, Eigen::Aligned> gpu_float(\n      d_float, num_elem);\n  Eigen::TensorMap<Eigen::Tensor<Eigen::half, 1>, Eigen::Aligned> gpu_half(\n      d_half, num_elem);\n  Eigen::TensorMap<Eigen::Tensor<float, 1>, Eigen::Aligned> gpu_conv(\n      d_conv, num_elem);\n\n  gpu_float.device(gpu_device) = gpu_float.random();\n  gpu_half.device(gpu_device) = gpu_float.cast<Eigen::half>();\n  gpu_conv.device(gpu_device) = gpu_half.cast<float>();\n\n  Tensor<float, 1> initial(num_elem);\n  Tensor<float, 1> final(num_elem);\n  gpu_device.memcpyDeviceToHost(initial.data(), d_float, num_elem*sizeof(float));\n  gpu_device.memcpyDeviceToHost(final.data(), d_conv, num_elem*sizeof(float));\n\n  for (int i = 0; i < num_elem; ++i) {\n    VERIFY_IS_APPROX(initial(i), final(i));\n  }\n\n  gpu_device.deallocate(d_float);\n  gpu_device.deallocate(d_half);\n  gpu_device.deallocate(d_conv);\n}\n\ntemplate<typename>\nvoid test_gpu_unary() {\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n  int num_elem = 101;\n\n  float* d_float = (float*)gpu_device.allocate(num_elem * sizeof(float));\n  float* d_res_half = (float*)gpu_device.allocate(num_elem * sizeof(float));\n  float* d_res_float = (float*)gpu_device.allocate(num_elem * sizeof(float));\n\n  Eigen::TensorMap<Eigen::Tensor<float, 1>, Eigen::Aligned> gpu_float(\n      d_float, num_elem);\n  Eigen::TensorMap<Eigen::Tensor<float, 1>, Eigen::Aligned> gpu_res_half(\n      d_res_half, num_elem);\n  Eigen::TensorMap<Eigen::Tensor<float, 1>, Eigen::Aligned> gpu_res_float(\n      d_res_float, num_elem);\n\n  gpu_float.device(gpu_device) = gpu_float.random() - gpu_float.constant(0.5f);\n  gpu_res_float.device(gpu_device) = gpu_float.abs();\n  gpu_res_half.device(gpu_device) = gpu_float.cast<Eigen::half>().abs().cast<float>();\n\n  Tensor<float, 1> half_prec(num_elem);\n  Tensor<float, 1> full_prec(num_elem);\n  gpu_device.memcpyDeviceToHost(half_prec.data(), d_res_half, num_elem*sizeof(float));\n  gpu_device.memcpyDeviceToHost(full_prec.data(), d_res_float, num_elem*sizeof(float));\n  gpu_device.synchronize();\n\n  for (int i = 0; i < num_elem; ++i) {\n    std::cout << \"Checking unary \" << i << std::endl;\n    VERIFY_IS_APPROX(full_prec(i), half_prec(i));\n  }\n\n  gpu_device.deallocate(d_float);\n  gpu_device.deallocate(d_res_half);\n  gpu_device.deallocate(d_res_float);\n}\n\ntemplate<typename>\nvoid test_gpu_elementwise() {\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n  int num_elem = 101;\n\n  float* d_float1 = (float*)gpu_device.allocate(num_elem * sizeof(float));\n  float* d_float2 = (float*)gpu_device.allocate(num_elem * sizeof(float));\n  float* d_res_half = (float*)gpu_device.allocate(num_elem * sizeof(float));\n  float* d_res_float = (float*)gpu_device.allocate(num_elem * sizeof(float));\n\n  Eigen::TensorMap<Eigen::Tensor<float, 1>, Eigen::Aligned> gpu_float1(\n      d_float1, num_elem);\n  Eigen::TensorMap<Eigen::Tensor<float, 1>, Eigen::Aligned> gpu_float2(\n      d_float2, num_elem);\n  Eigen::TensorMap<Eigen::Tensor<float, 1>, Eigen::Aligned> gpu_res_half(\n      d_res_half, num_elem);\n  Eigen::TensorMap<Eigen::Tensor<float, 1>, Eigen::Aligned> gpu_res_float(\n      d_res_float, num_elem);\n\n  gpu_float1.device(gpu_device) = gpu_float1.random();\n  gpu_float2.device(gpu_device) = gpu_float2.random();\n  gpu_res_float.device(gpu_device) = (gpu_float1 + gpu_float2) * gpu_float1;\n  gpu_res_half.device(gpu_device) = ((gpu_float1.cast<Eigen::half>() + gpu_float2.cast<Eigen::half>()) * gpu_float1.cast<Eigen::half>()).cast<float>();\n\n  Tensor<float, 1> half_prec(num_elem);\n  Tensor<float, 1> full_prec(num_elem);\n  gpu_device.memcpyDeviceToHost(half_prec.data(), d_res_half, num_elem*sizeof(float));\n  gpu_device.memcpyDeviceToHost(full_prec.data(), d_res_float, num_elem*sizeof(float));\n  gpu_device.synchronize();\n\n  for (int i = 0; i < num_elem; ++i) {\n    std::cout << \"Checking elemwise \" << i << \": full prec = \" << full_prec(i) << \" vs half prec = \" << half_prec(i) << std::endl;\n    VERIFY_IS_APPROX(static_cast<Eigen::half>(full_prec(i)), static_cast<Eigen::half>(half_prec(i)));\n  }\n\n  gpu_device.deallocate(d_float1);\n  gpu_device.deallocate(d_float2);\n  gpu_device.deallocate(d_res_half);\n  gpu_device.deallocate(d_res_float);\n}\n\ntemplate<typename>\nvoid test_gpu_trancendental() {\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n  int num_elem = 101;\n\n  float* d_float1 = (float*)gpu_device.allocate(num_elem * sizeof(float));\n  float* d_float2 = (float*)gpu_device.allocate(num_elem * sizeof(float));\n  float* d_float3 = (float*)gpu_device.allocate(num_elem * sizeof(float));\n  Eigen::half* d_res1_half = (Eigen::half*)gpu_device.allocate(num_elem * sizeof(Eigen::half));\n  Eigen::half* d_res1_float = (Eigen::half*)gpu_device.allocate(num_elem * sizeof(Eigen::half));\n  Eigen::half* d_res2_half = (Eigen::half*)gpu_device.allocate(num_elem * sizeof(Eigen::half));\n  Eigen::half* d_res2_float = (Eigen::half*)gpu_device.allocate(num_elem * sizeof(Eigen::half));\n  Eigen::half* d_res3_half = (Eigen::half*)gpu_device.allocate(num_elem * sizeof(Eigen::half));\n  Eigen::half* d_res3_float = (Eigen::half*)gpu_device.allocate(num_elem * sizeof(Eigen::half));\n\n  Eigen::TensorMap<Eigen::Tensor<float, 1>, Eigen::Aligned> gpu_float1(d_float1, num_elem);\n  Eigen::TensorMap<Eigen::Tensor<float, 1>, Eigen::Aligned> gpu_float2(d_float2, num_elem);\n  Eigen::TensorMap<Eigen::Tensor<float, 1>, Eigen::Aligned> gpu_float3(d_float3, num_elem);\n  Eigen::TensorMap<Eigen::Tensor<Eigen::half, 1>, Eigen::Aligned> gpu_res1_half(d_res1_half, num_elem);\n  Eigen::TensorMap<Eigen::Tensor<Eigen::half, 1>, Eigen::Aligned> gpu_res1_float(d_res1_float, num_elem);\n  Eigen::TensorMap<Eigen::Tensor<Eigen::half, 1>, Eigen::Aligned> gpu_res2_half(d_res2_half, num_elem);\n  Eigen::TensorMap<Eigen::Tensor<Eigen::half, 1>, Eigen::Aligned> gpu_res2_float(d_res2_float, num_elem);\n  Eigen::TensorMap<Eigen::Tensor<Eigen::half, 1>, Eigen::Aligned> gpu_res3_half(d_res3_half, num_elem);\n  Eigen::TensorMap<Eigen::Tensor<Eigen::half, 1>, Eigen::Aligned> gpu_res3_float(d_res3_float, num_elem);\n  Eigen::TensorMap<Eigen::Tensor<Eigen::half, 1>, Eigen::Aligned> gpu_res4_half(d_res3_half, num_elem);\n  Eigen::TensorMap<Eigen::Tensor<Eigen::half, 1>, Eigen::Aligned> gpu_res4_float(d_res3_float, num_elem);\n\n  gpu_float1.device(gpu_device) = gpu_float1.random() - gpu_float1.constant(0.5f);\n  gpu_float2.device(gpu_device) = gpu_float2.random() + gpu_float1.constant(0.5f);\n  gpu_float3.device(gpu_device) = gpu_float3.random();\n  gpu_res1_float.device(gpu_device) = gpu_float1.exp().cast<Eigen::half>();\n  gpu_res2_float.device(gpu_device) = gpu_float2.log().cast<Eigen::half>();\n  gpu_res3_float.device(gpu_device) = gpu_float3.log1p().cast<Eigen::half>();\n  gpu_res4_float.device(gpu_device) = gpu_float3.expm1().cast<Eigen::half>();\n\n  gpu_res1_half.device(gpu_device) = gpu_float1.cast<Eigen::half>();\n  gpu_res1_half.device(gpu_device) = gpu_res1_half.exp();\n\n  gpu_res2_half.device(gpu_device) = gpu_float2.cast<Eigen::half>();\n  gpu_res2_half.device(gpu_device) = gpu_res2_half.log();\n\n  gpu_res3_half.device(gpu_device) = gpu_float3.cast<Eigen::half>();\n  gpu_res3_half.device(gpu_device) = gpu_res3_half.log1p();\n\n  gpu_res3_half.device(gpu_device) = gpu_float3.cast<Eigen::half>();\n  gpu_res3_half.device(gpu_device) = gpu_res3_half.expm1();\n\n  Tensor<float, 1> input1(num_elem);\n  Tensor<Eigen::half, 1> half_prec1(num_elem);\n  Tensor<Eigen::half, 1> full_prec1(num_elem);\n  Tensor<float, 1> input2(num_elem);\n  Tensor<Eigen::half, 1> half_prec2(num_elem);\n  Tensor<Eigen::half, 1> full_prec2(num_elem);\n  Tensor<float, 1> input3(num_elem);\n  Tensor<Eigen::half, 1> half_prec3(num_elem);\n  Tensor<Eigen::half, 1> full_prec3(num_elem);\n  gpu_device.memcpyDeviceToHost(input1.data(), d_float1, num_elem*sizeof(float));\n  gpu_device.memcpyDeviceToHost(input2.data(), d_float2, num_elem*sizeof(float));\n  gpu_device.memcpyDeviceToHost(input3.data(), d_float3, num_elem*sizeof(float));\n  gpu_device.memcpyDeviceToHost(half_prec1.data(), d_res1_half, num_elem*sizeof(Eigen::half));\n  gpu_device.memcpyDeviceToHost(full_prec1.data(), d_res1_float, num_elem*sizeof(Eigen::half));\n  gpu_device.memcpyDeviceToHost(half_prec2.data(), d_res2_half, num_elem*sizeof(Eigen::half));\n  gpu_device.memcpyDeviceToHost(full_prec2.data(), d_res2_float, num_elem*sizeof(Eigen::half));\n  gpu_device.memcpyDeviceToHost(half_prec3.data(), d_res3_half, num_elem*sizeof(Eigen::half));\n  gpu_device.memcpyDeviceToHost(full_prec3.data(), d_res3_float, num_elem*sizeof(Eigen::half));\n  gpu_device.synchronize();\n\n  for (int i = 0; i < num_elem; ++i) {\n    std::cout << \"Checking elemwise exp \" << i << \" input = \" << input1(i) << \" full = \" << full_prec1(i) << \" half = \" << half_prec1(i) << std::endl;\n    VERIFY_IS_APPROX(full_prec1(i), half_prec1(i));\n  }\n  for (int i = 0; i < num_elem; ++i) {\n    std::cout << \"Checking elemwise log \" << i << \" input = \" << input2(i) << \" full = \" << full_prec2(i) << \" half = \" << half_prec2(i) << std::endl;\n    if(std::abs(input2(i)-1.f)<0.05f) // log lacks accuracy nearby 1\n      VERIFY_IS_APPROX(full_prec2(i)+Eigen::half(0.1f), half_prec2(i)+Eigen::half(0.1f));\n    else\n      VERIFY_IS_APPROX(full_prec2(i), half_prec2(i));\n  }\n  for (int i = 0; i < num_elem; ++i) {\n    std::cout << \"Checking elemwise plog1 \" << i << \" input = \" << input3(i) << \" full = \" << full_prec3(i) << \" half = \" << half_prec3(i) << std::endl;\n    VERIFY_IS_APPROX(full_prec3(i), half_prec3(i));\n  }\n  gpu_device.deallocate(d_float1);\n  gpu_device.deallocate(d_float2);\n  gpu_device.deallocate(d_float3);\n  gpu_device.deallocate(d_res1_half);\n  gpu_device.deallocate(d_res1_float);\n  gpu_device.deallocate(d_res2_half);\n  gpu_device.deallocate(d_res2_float);\n  gpu_device.deallocate(d_res3_float);\n  gpu_device.deallocate(d_res3_half);\n}\n\ntemplate<typename>\nvoid test_gpu_contractions() {\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n  int rows = 23;\n  int cols = 23;\n  int num_elem = rows*cols;\n\n  float* d_float1 = (float*)gpu_device.allocate(num_elem * sizeof(float));\n  float* d_float2 = (float*)gpu_device.allocate(num_elem * sizeof(float));\n  Eigen::half* d_res_half = (Eigen::half*)gpu_device.allocate(num_elem * sizeof(Eigen::half));\n  Eigen::half* d_res_float = (Eigen::half*)gpu_device.allocate(num_elem * sizeof(Eigen::half));\n\n  Eigen::TensorMap<Eigen::Tensor<float, 2>, Eigen::Aligned> gpu_float1(\n      d_float1, rows, cols);\n  Eigen::TensorMap<Eigen::Tensor<float, 2>, Eigen::Aligned> gpu_float2(\n      d_float2, rows, cols);\n  Eigen::TensorMap<Eigen::Tensor<Eigen::half, 2>, Eigen::Aligned> gpu_res_half(\n      d_res_half, rows, cols);\n  Eigen::TensorMap<Eigen::Tensor<Eigen::half, 2>, Eigen::Aligned> gpu_res_float(\n      d_res_float, rows, cols);\n\n  gpu_float1.device(gpu_device) = gpu_float1.random() - gpu_float1.constant(0.5f);\n  gpu_float2.device(gpu_device) = gpu_float2.random() - gpu_float2.constant(0.5f);\n\n  typedef Tensor<float, 2>::DimensionPair DimPair;\n  Eigen::array<DimPair, 1> dims(DimPair(1, 0));\n  gpu_res_float.device(gpu_device) = gpu_float1.contract(gpu_float2, dims).cast<Eigen::half>();\n  gpu_res_half.device(gpu_device) = gpu_float1.cast<Eigen::half>().contract(gpu_float2.cast<Eigen::half>(), dims);\n\n  Tensor<Eigen::half, 2> half_prec(rows, cols);\n  Tensor<Eigen::half, 2> full_prec(rows, cols);\n  gpu_device.memcpyDeviceToHost(half_prec.data(), d_res_half, num_elem*sizeof(Eigen::half));\n  gpu_device.memcpyDeviceToHost(full_prec.data(), d_res_float, num_elem*sizeof(Eigen::half));\n  gpu_device.synchronize();\n\n  for (int i = 0; i < rows; ++i) {\n    for (int j = 0; j < cols; ++j) {\n      std::cout << \"Checking contract \" << i << \" \" << j << full_prec(i, j) << \" \" << half_prec(i, j) << std::endl;\n      if (numext::abs(full_prec(i, j) - half_prec(i, j)) > Eigen::half(1e-2f)) {\n        VERIFY_IS_APPROX(full_prec(i, j), half_prec(i, j));\n      }\n    }\n  }\n\n  gpu_device.deallocate(d_float1);\n  gpu_device.deallocate(d_float2);\n  gpu_device.deallocate(d_res_half);\n  gpu_device.deallocate(d_res_float);\n}\n\ntemplate<typename>\nvoid test_gpu_reductions(int size1, int size2, int redux) {\n\n   std::cout << \"Reducing \" << size1 << \" by \" << size2\n             << \" tensor along dim \" << redux << std::endl; \n\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n  int num_elem = size1*size2;\n  int result_size = (redux == 1 ? size1 : size2);\n\n  float* d_float1 = (float*)gpu_device.allocate(num_elem * sizeof(float));\n  float* d_float2 = (float*)gpu_device.allocate(num_elem * sizeof(float));\n  Eigen::half* d_res_half = (Eigen::half*)gpu_device.allocate(result_size * sizeof(Eigen::half));\n  Eigen::half* d_res_float = (Eigen::half*)gpu_device.allocate(result_size * sizeof(Eigen::half));\n\n  Eigen::TensorMap<Eigen::Tensor<float, 2>, Eigen::Aligned> gpu_float1(\n      d_float1, size1, size2);\n  Eigen::TensorMap<Eigen::Tensor<float, 2>, Eigen::Aligned> gpu_float2(\n      d_float2, size1, size2);\n  Eigen::TensorMap<Eigen::Tensor<Eigen::half, 1>, Eigen::Aligned> gpu_res_half(\n      d_res_half, result_size);\n  Eigen::TensorMap<Eigen::Tensor<Eigen::half, 1>, Eigen::Aligned> gpu_res_float(\n      d_res_float, result_size);\n\n  gpu_float1.device(gpu_device) = gpu_float1.random() * 2.0f;\n  gpu_float2.device(gpu_device) = gpu_float2.random() * 2.0f;\n\n  Eigen::array<int, 1> redux_dim = {{redux}};\n  gpu_res_float.device(gpu_device) = gpu_float1.sum(redux_dim).cast<Eigen::half>();\n  gpu_res_half.device(gpu_device) = gpu_float1.cast<Eigen::half>().sum(redux_dim);\n\n  Tensor<Eigen::half, 1> half_prec(result_size);\n  Tensor<Eigen::half, 1> full_prec(result_size);\n  gpu_device.memcpyDeviceToHost(half_prec.data(), d_res_half, result_size*sizeof(Eigen::half));\n  gpu_device.memcpyDeviceToHost(full_prec.data(), d_res_float, result_size*sizeof(Eigen::half));\n  gpu_device.synchronize();\n\n  for (int i = 0; i < result_size; ++i) {\n    std::cout << \"EXPECTED \" << full_prec(i) << \" GOT \" << half_prec(i) << std::endl;\n    VERIFY_IS_APPROX(full_prec(i), half_prec(i));\n  }\n\n  gpu_device.deallocate(d_float1);\n  gpu_device.deallocate(d_float2);\n  gpu_device.deallocate(d_res_half);\n  gpu_device.deallocate(d_res_float);\n}\n\ntemplate<typename>\nvoid test_gpu_reductions() {\n  test_gpu_reductions<void>(13, 13, 0);\n  test_gpu_reductions<void>(13, 13, 1);\n\n  test_gpu_reductions<void>(35, 36, 0);\n  test_gpu_reductions<void>(35, 36, 1);\n\n  test_gpu_reductions<void>(36, 35, 0);\n  test_gpu_reductions<void>(36, 35, 1);\n}\n\ntemplate<typename>\nvoid test_gpu_full_reductions() {\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n  int size = 13;\n  int num_elem = size*size;\n\n  float* d_float1 = (float*)gpu_device.allocate(num_elem * sizeof(float));\n  float* d_float2 = (float*)gpu_device.allocate(num_elem * sizeof(float));\n  Eigen::half* d_res_half = (Eigen::half*)gpu_device.allocate(1 * sizeof(Eigen::half));\n  Eigen::half* d_res_float = (Eigen::half*)gpu_device.allocate(1 * sizeof(Eigen::half));\n\n  Eigen::TensorMap<Eigen::Tensor<float, 2>, Eigen::Aligned> gpu_float1(\n      d_float1, size, size);\n  Eigen::TensorMap<Eigen::Tensor<float, 2>, Eigen::Aligned> gpu_float2(\n      d_float2, size, size);\n  Eigen::TensorMap<Eigen::Tensor<Eigen::half, 0>, Eigen::Aligned> gpu_res_half(\n      d_res_half);\n  Eigen::TensorMap<Eigen::Tensor<Eigen::half, 0>, Eigen::Aligned> gpu_res_float(\n      d_res_float);\n\n  gpu_float1.device(gpu_device) = gpu_float1.random();\n  gpu_float2.device(gpu_device) = gpu_float2.random();\n\n  gpu_res_float.device(gpu_device) = gpu_float1.sum().cast<Eigen::half>();\n  gpu_res_half.device(gpu_device) = gpu_float1.cast<Eigen::half>().sum();\n\n  Tensor<Eigen::half, 0> half_prec;\n  Tensor<Eigen::half, 0> full_prec;\n  gpu_device.memcpyDeviceToHost(half_prec.data(), d_res_half, sizeof(Eigen::half));\n  gpu_device.memcpyDeviceToHost(full_prec.data(), d_res_float, sizeof(Eigen::half));\n  gpu_device.synchronize();\n\n  VERIFY_IS_APPROX(full_prec(), half_prec());\n\n  gpu_res_float.device(gpu_device) = gpu_float1.maximum().cast<Eigen::half>();\n  gpu_res_half.device(gpu_device) = gpu_float1.cast<Eigen::half>().maximum();\n  gpu_device.memcpyDeviceToHost(half_prec.data(), d_res_half, sizeof(Eigen::half));\n  gpu_device.memcpyDeviceToHost(full_prec.data(), d_res_float, sizeof(Eigen::half));\n  gpu_device.synchronize();\n\n  VERIFY_IS_APPROX(full_prec(), half_prec());\n\n  gpu_device.deallocate(d_float1);\n  gpu_device.deallocate(d_float2);\n  gpu_device.deallocate(d_res_half);\n  gpu_device.deallocate(d_res_float);\n}\n\ntemplate<typename>\nvoid test_gpu_forced_evals() {\n\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n  int num_elem = 101;\n\n  float* d_float = (float*)gpu_device.allocate(num_elem * sizeof(float));\n  float* d_res_half1 = (float*)gpu_device.allocate(num_elem * sizeof(float));\n  float* d_res_half2 = (float*)gpu_device.allocate(num_elem * sizeof(float));\n  float* d_res_float = (float*)gpu_device.allocate(num_elem * sizeof(float));\n\n  Eigen::TensorMap<Eigen::Tensor<float, 1>, Eigen::Aligned> gpu_float(\n      d_float, num_elem);\n  Eigen::TensorMap<Eigen::Tensor<float, 1>, Eigen::Aligned> gpu_res_half1(\n      d_res_half1, num_elem);\n Eigen::TensorMap<Eigen::Tensor<float, 1>, Eigen::Unaligned> gpu_res_half2(\n      d_res_half2, num_elem);\n  Eigen::TensorMap<Eigen::Tensor<float, 1>, Eigen::Aligned> gpu_res_float(\n      d_res_float, num_elem);\n\n  Eigen::array<int, 1> no_bcast;\n  no_bcast[0] = 1;\n\n  gpu_float.device(gpu_device) = gpu_float.random() - gpu_float.constant(0.5f);\n  gpu_res_float.device(gpu_device) = gpu_float.abs();\n  gpu_res_half1.device(gpu_device) = gpu_float.cast<Eigen::half>().abs().eval().cast<float>();\n  gpu_res_half2.device(gpu_device) = gpu_float.cast<Eigen::half>().abs().broadcast(no_bcast).eval().cast<float>();\n\n  Tensor<float, 1> half_prec1(num_elem);\n  Tensor<float, 1> half_prec2(num_elem);\n  Tensor<float, 1> full_prec(num_elem);\n  gpu_device.memcpyDeviceToHost(half_prec1.data(), d_res_half1, num_elem*sizeof(float));\n  gpu_device.memcpyDeviceToHost(half_prec2.data(), d_res_half1, num_elem*sizeof(float));\n  gpu_device.memcpyDeviceToHost(full_prec.data(), d_res_float, num_elem*sizeof(float));\n  gpu_device.synchronize();\n\n  for (int i = 0; i < num_elem; ++i) {\n    std::cout << \"Checking forced eval \" << i << full_prec(i) << \" vs \" << half_prec1(i) << \" vs \" << half_prec2(i) << std::endl;\n    VERIFY_IS_APPROX(full_prec(i), half_prec1(i));\n    VERIFY_IS_APPROX(full_prec(i), half_prec2(i));\n  }\n\n  gpu_device.deallocate(d_float);\n  gpu_device.deallocate(d_res_half1);\n  gpu_device.deallocate(d_res_half2);\n  gpu_device.deallocate(d_res_float);\n}\n#endif\n\n\nEIGEN_DECLARE_TEST(cxx11_tensor_of_float16_gpu)\n{\n  CALL_SUBTEST_1(test_gpu_numext<void>());\n\n#ifdef EIGEN_HAS_GPU_FP16\n  CALL_SUBTEST_1(test_gpu_conversion<void>());\n  CALL_SUBTEST_1(test_gpu_unary<void>());\n  CALL_SUBTEST_1(test_gpu_elementwise<void>());\n  CALL_SUBTEST_1(test_gpu_trancendental<void>());\n  CALL_SUBTEST_2(test_gpu_contractions<void>());\n  CALL_SUBTEST_3(test_gpu_reductions<void>());\n  CALL_SUBTEST_4(test_gpu_full_reductions<void>());\n  CALL_SUBTEST_5(test_gpu_forced_evals<void>());\n#else\n  std::cout << \"Half floats are not supported by this version of gpu: skipping the test\" << std::endl;\n#endif\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_of_strings.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\nusing Eigen::TensorMap;\n\nstatic void test_assign()\n{\n  std::string data1[6];\n  TensorMap<Tensor<std::string, 2>> mat1(data1, 2, 3);\n  std::string data2[6];\n  const TensorMap<Tensor<const std::string, 2>> mat2(data2, 2, 3);\n\n  for (int i = 0; i < 6; ++i) {\n    std::ostringstream s1;\n    s1 << \"abc\" << i*3;\n    data1[i] = s1.str();\n    std::ostringstream s2;\n    s2 << \"def\" << i*5;\n    data2[i] = s2.str();\n  }\n\n  Tensor<std::string, 2> rslt1;\n  rslt1 = mat1;\n  Tensor<std::string, 2> rslt2;\n  rslt2 = mat2;\n\n  Tensor<std::string, 2> rslt3 = mat1;\n  Tensor<std::string, 2> rslt4 = mat2;\n\n  Tensor<std::string, 2> rslt5(mat1);\n  Tensor<std::string, 2> rslt6(mat2);\n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      VERIFY_IS_EQUAL(rslt1(i,j), data1[i+2*j]);\n      VERIFY_IS_EQUAL(rslt2(i,j), data2[i+2*j]);\n      VERIFY_IS_EQUAL(rslt3(i,j), data1[i+2*j]);\n      VERIFY_IS_EQUAL(rslt4(i,j), data2[i+2*j]);\n      VERIFY_IS_EQUAL(rslt5(i,j), data1[i+2*j]);\n      VERIFY_IS_EQUAL(rslt6(i,j), data2[i+2*j]);\n    }\n  }\n}\n\n\nstatic void test_concat()\n{\n  Tensor<std::string, 2> t1(2, 3);\n  Tensor<std::string, 2> t2(2, 3);\n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      std::ostringstream s1;\n      s1 << \"abc\" << i + j*2;\n      t1(i, j) = s1.str();\n      std::ostringstream s2;\n      s2 << \"def\" << i*5 + j*32;\n      t2(i, j) = s2.str();\n    }\n  }\n\n  Tensor<std::string, 2> result = t1.concatenate(t2, 1);\n  VERIFY_IS_EQUAL(result.dimension(0), 2);\n  VERIFY_IS_EQUAL(result.dimension(1), 6);\n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      VERIFY_IS_EQUAL(result(i, j),   t1(i, j));\n      VERIFY_IS_EQUAL(result(i, j+3), t2(i, j));\n    }\n  }\n}\n\n\nstatic void test_slices()\n{\n  Tensor<std::string, 2> data(2, 6);\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      std::ostringstream s1;\n      s1 << \"abc\" << i + j*2;\n      data(i, j) = s1.str();\n    }\n  }\n\n  const Eigen::DSizes<ptrdiff_t, 2> half_size(2, 3);\n  const Eigen::DSizes<ptrdiff_t, 2> first_half(0, 0);\n  const Eigen::DSizes<ptrdiff_t, 2> second_half(0, 3);\n\n  Tensor<std::string, 2> t1 = data.slice(first_half, half_size);\n  Tensor<std::string, 2> t2 = data.slice(second_half, half_size);\n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      VERIFY_IS_EQUAL(data(i, j),   t1(i, j));\n      VERIFY_IS_EQUAL(data(i, j+3), t2(i, j));\n    }\n  }\n}\n\n\nstatic void test_additions()\n{\n  Tensor<std::string, 1> data1(3);\n  Tensor<std::string, 1> data2(3);\n  for (int i = 0; i < 3; ++i) {\n    data1(i) = \"abc\";\n    std::ostringstream s1;\n    s1 << i;\n    data2(i) = s1.str();\n  }\n\n  Tensor<std::string, 1> sum = data1 + data2;\n  for (int i = 0; i < 3; ++i) {\n    std::ostringstream concat;\n    concat << \"abc\" << i;\n    std::string expected = concat.str();\n    VERIFY_IS_EQUAL(sum(i), expected);\n  }\n}\n\n\nstatic void test_initialization()\n{\n  Tensor<std::string, 2> a(2, 3);\n  a.setConstant(std::string(\"foo\"));\n  for (int i = 0; i < 2*3; ++i) {\n    VERIFY_IS_EQUAL(a(i), std::string(\"foo\"));\n  }\n}\n\n\nEIGEN_DECLARE_TEST(cxx11_tensor_of_strings)\n{\n  // Beware: none of this is likely to ever work on a GPU.\n  CALL_SUBTEST(test_assign());\n  CALL_SUBTEST(test_concat());\n  CALL_SUBTEST(test_slices());\n  CALL_SUBTEST(test_additions());\n  CALL_SUBTEST(test_initialization());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_padding.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\n\ntemplate<int DataLayout>\nstatic void test_simple_padding()\n{\n  Tensor<float, 4, DataLayout> tensor(2,3,5,7);\n  tensor.setRandom();\n\n  array<std::pair<ptrdiff_t, ptrdiff_t>, 4> paddings;\n  paddings[0] = std::make_pair(0, 0);\n  paddings[1] = std::make_pair(2, 1);\n  paddings[2] = std::make_pair(3, 4);\n  paddings[3] = std::make_pair(0, 0);\n\n  Tensor<float, 4, DataLayout> padded;\n  padded = tensor.pad(paddings);\n\n  VERIFY_IS_EQUAL(padded.dimension(0), 2+0);\n  VERIFY_IS_EQUAL(padded.dimension(1), 3+3);\n  VERIFY_IS_EQUAL(padded.dimension(2), 5+7);\n  VERIFY_IS_EQUAL(padded.dimension(3), 7+0);\n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 6; ++j) {\n      for (int k = 0; k < 12; ++k) {\n        for (int l = 0; l < 7; ++l) {\n          if (j >= 2 && j < 5 && k >= 3 && k < 8) {\n            VERIFY_IS_EQUAL(padded(i,j,k,l), tensor(i,j-2,k-3,l));\n          } else {\n            VERIFY_IS_EQUAL(padded(i,j,k,l), 0.0f);\n          }\n        }\n      }\n    }\n  }\n}\n\ntemplate<int DataLayout>\nstatic void test_padded_expr()\n{\n  Tensor<float, 4, DataLayout> tensor(2,3,5,7);\n  tensor.setRandom();\n\n  array<std::pair<ptrdiff_t, ptrdiff_t>, 4> paddings;\n  paddings[0] = std::make_pair(0, 0);\n  paddings[1] = std::make_pair(2, 1);\n  paddings[2] = std::make_pair(3, 4);\n  paddings[3] = std::make_pair(0, 0);\n\n  Eigen::DSizes<ptrdiff_t, 2> reshape_dims;\n  reshape_dims[0] = 12;\n  reshape_dims[1] = 84;\n\n  Tensor<float, 2, DataLayout> result;\n  result = tensor.pad(paddings).reshape(reshape_dims);\n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 6; ++j) {\n      for (int k = 0; k < 12; ++k) {\n        for (int l = 0; l < 7; ++l) {\n          const float result_value = DataLayout == ColMajor ?\n              result(i+2*j,k+12*l) : result(j+6*i,l+7*k);\n          if (j >= 2 && j < 5 && k >= 3 && k < 8) {\n            VERIFY_IS_EQUAL(result_value, tensor(i,j-2,k-3,l));\n          } else {\n            VERIFY_IS_EQUAL(result_value, 0.0f);\n          }\n        }\n      }\n    }\n  }\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_padding)\n{\n  CALL_SUBTEST(test_simple_padding<ColMajor>());\n  CALL_SUBTEST(test_simple_padding<RowMajor>());\n  CALL_SUBTEST(test_padded_expr<ColMajor>());\n  CALL_SUBTEST(test_padded_expr<RowMajor>());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_padding_sycl.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016\n// Mehdi Goli    Codeplay Software Ltd.\n// Ralph Potter  Codeplay Software Ltd.\n// Luke Iwanski  Codeplay Software Ltd.\n// Contact: <eigen@codeplay.com>\n// Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n\n#define EIGEN_TEST_NO_LONGDOUBLE\n#define EIGEN_TEST_NO_COMPLEX\n\n#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int64_t\n#define EIGEN_USE_SYCL\n\n\n#include \"main.h\"\n#include <unsupported/Eigen/CXX11/Tensor>\n\nusing Eigen::array;\nusing Eigen::SyclDevice;\nusing Eigen::Tensor;\nusing Eigen::TensorMap;\n\n\ntemplate<typename DataType, int DataLayout, typename IndexType>\nstatic void test_simple_padding(const Eigen::SyclDevice& sycl_device)\n{\n\n  IndexType sizeDim1 = 2;\n  IndexType sizeDim2 = 3;\n  IndexType sizeDim3 = 5;\n  IndexType sizeDim4 = 7;\n  array<IndexType, 4> tensorRange = {{sizeDim1, sizeDim2, sizeDim3, sizeDim4}};\n\n  Tensor<DataType, 4, DataLayout, IndexType> tensor(tensorRange);\n  tensor.setRandom();\n\n  array<std::pair<IndexType, IndexType>, 4> paddings;\n  paddings[0] = std::make_pair(0, 0);\n  paddings[1] = std::make_pair(2, 1);\n  paddings[2] = std::make_pair(3, 4);\n  paddings[3] = std::make_pair(0, 0);\n\n  IndexType padedSizeDim1 = 2;\n  IndexType padedSizeDim2 = 6;\n  IndexType padedSizeDim3 = 12;\n  IndexType padedSizeDim4 = 7;\n  array<IndexType, 4> padedtensorRange = {{padedSizeDim1, padedSizeDim2, padedSizeDim3, padedSizeDim4}};\n\n  Tensor<DataType, 4, DataLayout, IndexType> padded(padedtensorRange);\n\n\n  DataType* gpu_data1  = static_cast<DataType*>(sycl_device.allocate(tensor.size()*sizeof(DataType)));\n  DataType* gpu_data2  = static_cast<DataType*>(sycl_device.allocate(padded.size()*sizeof(DataType)));\n  TensorMap<Tensor<DataType, 4,DataLayout,IndexType>> gpu1(gpu_data1, tensorRange);\n  TensorMap<Tensor<DataType, 4,DataLayout,IndexType>> gpu2(gpu_data2, padedtensorRange);\n\n  VERIFY_IS_EQUAL(padded.dimension(0), 2+0);\n  VERIFY_IS_EQUAL(padded.dimension(1), 3+3);\n  VERIFY_IS_EQUAL(padded.dimension(2), 5+7);\n  VERIFY_IS_EQUAL(padded.dimension(3), 7+0);\n  sycl_device.memcpyHostToDevice(gpu_data1, tensor.data(),(tensor.size())*sizeof(DataType));\n  gpu2.device(sycl_device)=gpu1.pad(paddings);\n  sycl_device.memcpyDeviceToHost(padded.data(), gpu_data2,(padded.size())*sizeof(DataType));\n  for (IndexType i = 0; i < padedSizeDim1; ++i) {\n    for (IndexType j = 0; j < padedSizeDim2; ++j) {\n      for (IndexType k = 0; k < padedSizeDim3; ++k) {\n        for (IndexType l = 0; l < padedSizeDim4; ++l) {\n          if (j >= 2 && j < 5 && k >= 3 && k < 8) {\n            VERIFY_IS_EQUAL(padded(i,j,k,l), tensor(i,j-2,k-3,l));\n          } else {\n            VERIFY_IS_EQUAL(padded(i,j,k,l), 0.0f);\n          }\n        }\n      }\n    }\n  }\n  sycl_device.deallocate(gpu_data1);\n  sycl_device.deallocate(gpu_data2);\n}\n\ntemplate<typename DataType, int DataLayout, typename IndexType>\nstatic void test_padded_expr(const Eigen::SyclDevice& sycl_device)\n{\n  IndexType sizeDim1 = 2;\n  IndexType sizeDim2 = 3;\n  IndexType sizeDim3 = 5;\n  IndexType sizeDim4 = 7;\n  array<IndexType, 4> tensorRange = {{sizeDim1, sizeDim2, sizeDim3, sizeDim4}};\n\n  Tensor<DataType, 4, DataLayout, IndexType> tensor(tensorRange);\n  tensor.setRandom();\n\n  array<std::pair<IndexType, IndexType>, 4> paddings;\n  paddings[0] = std::make_pair(0, 0);\n  paddings[1] = std::make_pair(2, 1);\n  paddings[2] = std::make_pair(3, 4);\n  paddings[3] = std::make_pair(0, 0);\n\n  Eigen::DSizes<IndexType, 2> reshape_dims;\n  reshape_dims[0] = 12;\n  reshape_dims[1] = 84;\n\n\n  Tensor<DataType, 2, DataLayout, IndexType>  result(reshape_dims);\n\n  DataType* gpu_data1  = static_cast<DataType*>(sycl_device.allocate(tensor.size()*sizeof(DataType)));\n  DataType* gpu_data2  = static_cast<DataType*>(sycl_device.allocate(result.size()*sizeof(DataType)));\n  TensorMap<Tensor<DataType, 4,DataLayout,IndexType>> gpu1(gpu_data1, tensorRange);\n  TensorMap<Tensor<DataType, 2,DataLayout,IndexType>> gpu2(gpu_data2, reshape_dims);\n\n\n  sycl_device.memcpyHostToDevice(gpu_data1, tensor.data(),(tensor.size())*sizeof(DataType));\n  gpu2.device(sycl_device)=gpu1.pad(paddings).reshape(reshape_dims);\n  sycl_device.memcpyDeviceToHost(result.data(), gpu_data2,(result.size())*sizeof(DataType));\n\n  for (IndexType i = 0; i < 2; ++i) {\n    for (IndexType j = 0; j < 6; ++j) {\n      for (IndexType k = 0; k < 12; ++k) {\n        for (IndexType l = 0; l < 7; ++l) {\n          const float result_value = DataLayout == ColMajor ?\n              result(i+2*j,k+12*l) : result(j+6*i,l+7*k);\n          if (j >= 2 && j < 5 && k >= 3 && k < 8) {\n            VERIFY_IS_EQUAL(result_value, tensor(i,j-2,k-3,l));\n          } else {\n            VERIFY_IS_EQUAL(result_value, 0.0f);\n          }\n        }\n      }\n    }\n  }\n  sycl_device.deallocate(gpu_data1);\n  sycl_device.deallocate(gpu_data2);\n}\n\ntemplate<typename DataType, typename dev_Selector> void sycl_padding_test_per_device(dev_Selector s){\n  QueueInterface queueInterface(s);\n  auto sycl_device = Eigen::SyclDevice(&queueInterface);\n  test_simple_padding<DataType, RowMajor, int64_t>(sycl_device);\n  test_simple_padding<DataType, ColMajor, int64_t>(sycl_device);\n  test_padded_expr<DataType, RowMajor, int64_t>(sycl_device);\n  test_padded_expr<DataType, ColMajor, int64_t>(sycl_device);\n\n}\nEIGEN_DECLARE_TEST(cxx11_tensor_padding_sycl)\n{\n  for (const auto& device :Eigen::get_sycl_supported_devices()) {\n    CALL_SUBTEST(sycl_padding_test_per_device<float>(device));\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_patch.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\n\ntemplate<int DataLayout>\nstatic void test_simple_patch()\n{\n  Tensor<float, 4, DataLayout> tensor(2,3,5,7);\n  tensor.setRandom();\n  array<ptrdiff_t, 4> patch_dims;\n\n  patch_dims[0] = 1;\n  patch_dims[1] = 1;\n  patch_dims[2] = 1;\n  patch_dims[3] = 1;\n\n  Tensor<float, 5, DataLayout> no_patch;\n  no_patch = tensor.extract_patches(patch_dims);\n\n  if (DataLayout == ColMajor) {\n    VERIFY_IS_EQUAL(no_patch.dimension(0), 1);\n    VERIFY_IS_EQUAL(no_patch.dimension(1), 1);\n    VERIFY_IS_EQUAL(no_patch.dimension(2), 1);\n    VERIFY_IS_EQUAL(no_patch.dimension(3), 1);\n    VERIFY_IS_EQUAL(no_patch.dimension(4), tensor.size());\n  } else {\n    VERIFY_IS_EQUAL(no_patch.dimension(0), tensor.size());\n    VERIFY_IS_EQUAL(no_patch.dimension(1), 1);\n    VERIFY_IS_EQUAL(no_patch.dimension(2), 1);\n    VERIFY_IS_EQUAL(no_patch.dimension(3), 1);\n    VERIFY_IS_EQUAL(no_patch.dimension(4), 1);\n  }\n\n  for (int i = 0; i < tensor.size(); ++i) {\n    VERIFY_IS_EQUAL(tensor.data()[i], no_patch.data()[i]);\n  }\n\n  patch_dims[0] = 2;\n  patch_dims[1] = 3;\n  patch_dims[2] = 5;\n  patch_dims[3] = 7;\n  Tensor<float, 5, DataLayout> single_patch;\n  single_patch = tensor.extract_patches(patch_dims);\n\n  if (DataLayout == ColMajor) {\n    VERIFY_IS_EQUAL(single_patch.dimension(0), 2);\n    VERIFY_IS_EQUAL(single_patch.dimension(1), 3);\n    VERIFY_IS_EQUAL(single_patch.dimension(2), 5);\n    VERIFY_IS_EQUAL(single_patch.dimension(3), 7);\n    VERIFY_IS_EQUAL(single_patch.dimension(4), 1);\n  } else {\n    VERIFY_IS_EQUAL(single_patch.dimension(0), 1);\n    VERIFY_IS_EQUAL(single_patch.dimension(1), 2);\n    VERIFY_IS_EQUAL(single_patch.dimension(2), 3);\n    VERIFY_IS_EQUAL(single_patch.dimension(3), 5);\n    VERIFY_IS_EQUAL(single_patch.dimension(4), 7);\n  }\n\n  for (int i = 0; i < tensor.size(); ++i) {\n    VERIFY_IS_EQUAL(tensor.data()[i], single_patch.data()[i]);\n  }\n\n  patch_dims[0] = 1;\n  patch_dims[1] = 2;\n  patch_dims[2] = 2;\n  patch_dims[3] = 1;\n  Tensor<float, 5, DataLayout> twod_patch;\n  twod_patch = tensor.extract_patches(patch_dims);\n\n  if (DataLayout == ColMajor) {\n    VERIFY_IS_EQUAL(twod_patch.dimension(0), 1);\n    VERIFY_IS_EQUAL(twod_patch.dimension(1), 2);\n    VERIFY_IS_EQUAL(twod_patch.dimension(2), 2);\n    VERIFY_IS_EQUAL(twod_patch.dimension(3), 1);\n    VERIFY_IS_EQUAL(twod_patch.dimension(4), 2*2*4*7);\n  } else {\n    VERIFY_IS_EQUAL(twod_patch.dimension(0), 2*2*4*7);\n    VERIFY_IS_EQUAL(twod_patch.dimension(1), 1);\n    VERIFY_IS_EQUAL(twod_patch.dimension(2), 2);\n    VERIFY_IS_EQUAL(twod_patch.dimension(3), 2);\n    VERIFY_IS_EQUAL(twod_patch.dimension(4), 1);\n  }\n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 2; ++j) {\n      for (int k = 0; k < 4; ++k) {\n        for (int l = 0; l < 7; ++l) {\n          int patch_loc;\n          if (DataLayout == ColMajor) {\n            patch_loc = i + 2 * (j + 2 * (k + 4 * l));\n          } else {\n            patch_loc = l + 7 * (k + 4 * (j + 2 * i));\n          }\n          for (int x = 0; x < 2; ++x) {\n            for (int y = 0; y < 2; ++y) {\n              if (DataLayout == ColMajor) {\n                VERIFY_IS_EQUAL(tensor(i,j+x,k+y,l), twod_patch(0,x,y,0,patch_loc));\n              } else {\n                VERIFY_IS_EQUAL(tensor(i,j+x,k+y,l), twod_patch(patch_loc,0,x,y,0));\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n\n  patch_dims[0] = 1;\n  patch_dims[1] = 2;\n  patch_dims[2] = 3;\n  patch_dims[3] = 5;\n  Tensor<float, 5, DataLayout> threed_patch;\n  threed_patch = tensor.extract_patches(patch_dims);\n\n  if (DataLayout == ColMajor) {\n    VERIFY_IS_EQUAL(threed_patch.dimension(0), 1);\n    VERIFY_IS_EQUAL(threed_patch.dimension(1), 2);\n    VERIFY_IS_EQUAL(threed_patch.dimension(2), 3);\n    VERIFY_IS_EQUAL(threed_patch.dimension(3), 5);\n    VERIFY_IS_EQUAL(threed_patch.dimension(4), 2*2*3*3);\n  } else {\n    VERIFY_IS_EQUAL(threed_patch.dimension(0), 2*2*3*3);\n    VERIFY_IS_EQUAL(threed_patch.dimension(1), 1);\n    VERIFY_IS_EQUAL(threed_patch.dimension(2), 2);\n    VERIFY_IS_EQUAL(threed_patch.dimension(3), 3);\n    VERIFY_IS_EQUAL(threed_patch.dimension(4), 5);\n  }\n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 2; ++j) {\n      for (int k = 0; k < 3; ++k) {\n        for (int l = 0; l < 3; ++l) {\n          int patch_loc;\n          if (DataLayout == ColMajor) {\n            patch_loc = i + 2 * (j + 2 * (k + 3 * l));\n          } else {\n            patch_loc = l + 3 * (k + 3 * (j + 2 * i));\n          }\n          for (int x = 0; x < 2; ++x) {\n            for (int y = 0; y < 3; ++y) {\n              for (int z = 0; z < 5; ++z) {\n                if (DataLayout == ColMajor) {\n                  VERIFY_IS_EQUAL(tensor(i,j+x,k+y,l+z), threed_patch(0,x,y,z,patch_loc));\n                } else {\n                  VERIFY_IS_EQUAL(tensor(i,j+x,k+y,l+z), threed_patch(patch_loc,0,x,y,z));\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_patch)\n{\n   CALL_SUBTEST(test_simple_patch<ColMajor>());\n   CALL_SUBTEST(test_simple_patch<RowMajor>());\n   //   CALL_SUBTEST(test_expr_shuffling());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_patch_sycl.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016\n// Mehdi Goli    Codeplay Software Ltd.\n// Ralph Potter  Codeplay Software Ltd.\n// Luke Iwanski  Codeplay Software Ltd.\n// Contact: <eigen@codeplay.com>\n// Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_TEST_NO_LONGDOUBLE\n#define EIGEN_TEST_NO_COMPLEX\n\n#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int64_t\n#define EIGEN_USE_SYCL\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_simple_patch_sycl(const Eigen::SyclDevice& sycl_device){\n\n  IndexType sizeDim1 = 2;\n  IndexType sizeDim2 = 3;\n  IndexType sizeDim3 = 5;\n  IndexType sizeDim4 = 7;\n  array<IndexType, 4> tensorRange = {{sizeDim1, sizeDim2, sizeDim3, sizeDim4}};\n  array<IndexType, 5> patchTensorRange;\n  if (DataLayout == ColMajor) {\n   patchTensorRange = {{1, 1, 1, 1, sizeDim1*sizeDim2*sizeDim3*sizeDim4}};\n  }else{\n     patchTensorRange = {{sizeDim1*sizeDim2*sizeDim3*sizeDim4,1, 1, 1, 1}};\n  }\n\n  Tensor<DataType, 4, DataLayout,IndexType> tensor(tensorRange);\n  Tensor<DataType, 5, DataLayout,IndexType> no_patch(patchTensorRange);\n\n  tensor.setRandom();\n\n  array<ptrdiff_t, 4> patch_dims;\n  patch_dims[0] = 1;\n  patch_dims[1] = 1;\n  patch_dims[2] = 1;\n  patch_dims[3] = 1;\n\n  const size_t tensorBuffSize =tensor.size()*sizeof(DataType);\n  size_t patchTensorBuffSize =no_patch.size()*sizeof(DataType);\n  DataType* gpu_data_tensor  = static_cast<DataType*>(sycl_device.allocate(tensorBuffSize));\n  DataType* gpu_data_no_patch  = static_cast<DataType*>(sycl_device.allocate(patchTensorBuffSize));\n\n  TensorMap<Tensor<DataType, 4, DataLayout,IndexType>> gpu_tensor(gpu_data_tensor, tensorRange);\n  TensorMap<Tensor<DataType, 5, DataLayout,IndexType>> gpu_no_patch(gpu_data_no_patch, patchTensorRange);\n\n  sycl_device.memcpyHostToDevice(gpu_data_tensor, tensor.data(), tensorBuffSize);\n  gpu_no_patch.device(sycl_device)=gpu_tensor.extract_patches(patch_dims);\n  sycl_device.memcpyDeviceToHost(no_patch.data(), gpu_data_no_patch, patchTensorBuffSize);\n\n  if (DataLayout == ColMajor) {\n    VERIFY_IS_EQUAL(no_patch.dimension(0), 1);\n    VERIFY_IS_EQUAL(no_patch.dimension(1), 1);\n    VERIFY_IS_EQUAL(no_patch.dimension(2), 1);\n    VERIFY_IS_EQUAL(no_patch.dimension(3), 1);\n    VERIFY_IS_EQUAL(no_patch.dimension(4), tensor.size());\n  } else {\n    VERIFY_IS_EQUAL(no_patch.dimension(0), tensor.size());\n    VERIFY_IS_EQUAL(no_patch.dimension(1), 1);\n    VERIFY_IS_EQUAL(no_patch.dimension(2), 1);\n    VERIFY_IS_EQUAL(no_patch.dimension(3), 1);\n    VERIFY_IS_EQUAL(no_patch.dimension(4), 1);\n  }\n\n  for (int i = 0; i < tensor.size(); ++i) {\n    VERIFY_IS_EQUAL(tensor.data()[i], no_patch.data()[i]);\n  }\n\n  patch_dims[0] = 2;\n  patch_dims[1] = 3;\n  patch_dims[2] = 5;\n  patch_dims[3] = 7;\n\n  if (DataLayout == ColMajor) {\n   patchTensorRange = {{sizeDim1,sizeDim2,sizeDim3,sizeDim4,1}};\n  }else{\n     patchTensorRange = {{1,sizeDim1,sizeDim2,sizeDim3,sizeDim4}};\n  }\n  Tensor<DataType, 5, DataLayout,IndexType> single_patch(patchTensorRange);\n  patchTensorBuffSize =single_patch.size()*sizeof(DataType);\n  DataType* gpu_data_single_patch  = static_cast<DataType*>(sycl_device.allocate(patchTensorBuffSize));\n  TensorMap<Tensor<DataType, 5, DataLayout,IndexType>> gpu_single_patch(gpu_data_single_patch, patchTensorRange);\n\n  gpu_single_patch.device(sycl_device)=gpu_tensor.extract_patches(patch_dims);\n  sycl_device.memcpyDeviceToHost(single_patch.data(), gpu_data_single_patch, patchTensorBuffSize);\n\n  if (DataLayout == ColMajor) {\n    VERIFY_IS_EQUAL(single_patch.dimension(0), 2);\n    VERIFY_IS_EQUAL(single_patch.dimension(1), 3);\n    VERIFY_IS_EQUAL(single_patch.dimension(2), 5);\n    VERIFY_IS_EQUAL(single_patch.dimension(3), 7);\n    VERIFY_IS_EQUAL(single_patch.dimension(4), 1);\n  } else {\n    VERIFY_IS_EQUAL(single_patch.dimension(0), 1);\n    VERIFY_IS_EQUAL(single_patch.dimension(1), 2);\n    VERIFY_IS_EQUAL(single_patch.dimension(2), 3);\n    VERIFY_IS_EQUAL(single_patch.dimension(3), 5);\n    VERIFY_IS_EQUAL(single_patch.dimension(4), 7);\n  }\n\n  for (int i = 0; i < tensor.size(); ++i) {\n    VERIFY_IS_EQUAL(tensor.data()[i], single_patch.data()[i]);\n  }\n  patch_dims[0] = 1;\n  patch_dims[1] = 2;\n  patch_dims[2] = 2;\n  patch_dims[3] = 1;\n  \n  if (DataLayout == ColMajor) {\n   patchTensorRange = {{1,2,2,1,2*2*4*7}};\n  }else{\n     patchTensorRange = {{2*2*4*7, 1, 2,2,1}};\n  }\n  Tensor<DataType, 5, DataLayout,IndexType> twod_patch(patchTensorRange);\n  patchTensorBuffSize =twod_patch.size()*sizeof(DataType);\n  DataType* gpu_data_twod_patch  = static_cast<DataType*>(sycl_device.allocate(patchTensorBuffSize));\n  TensorMap<Tensor<DataType, 5, DataLayout,IndexType>> gpu_twod_patch(gpu_data_twod_patch, patchTensorRange);\n\n  gpu_twod_patch.device(sycl_device)=gpu_tensor.extract_patches(patch_dims);\n  sycl_device.memcpyDeviceToHost(twod_patch.data(), gpu_data_twod_patch, patchTensorBuffSize);\n\n  if (DataLayout == ColMajor) {\n    VERIFY_IS_EQUAL(twod_patch.dimension(0), 1);\n    VERIFY_IS_EQUAL(twod_patch.dimension(1), 2);\n    VERIFY_IS_EQUAL(twod_patch.dimension(2), 2);\n    VERIFY_IS_EQUAL(twod_patch.dimension(3), 1);\n    VERIFY_IS_EQUAL(twod_patch.dimension(4), 2*2*4*7);\n  } else {\n    VERIFY_IS_EQUAL(twod_patch.dimension(0), 2*2*4*7);\n    VERIFY_IS_EQUAL(twod_patch.dimension(1), 1);\n    VERIFY_IS_EQUAL(twod_patch.dimension(2), 2);\n    VERIFY_IS_EQUAL(twod_patch.dimension(3), 2);\n    VERIFY_IS_EQUAL(twod_patch.dimension(4), 1);\n  }\n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 2; ++j) {\n      for (int k = 0; k < 4; ++k) {\n        for (int l = 0; l < 7; ++l) {\n          int patch_loc;\n          if (DataLayout == ColMajor) {\n            patch_loc = i + 2 * (j + 2 * (k + 4 * l));\n          } else {\n            patch_loc = l + 7 * (k + 4 * (j + 2 * i));\n          }\n          for (int x = 0; x < 2; ++x) {\n            for (int y = 0; y < 2; ++y) {\n              if (DataLayout == ColMajor) {\n                VERIFY_IS_EQUAL(tensor(i,j+x,k+y,l), twod_patch(0,x,y,0,patch_loc));\n              } else {\n                VERIFY_IS_EQUAL(tensor(i,j+x,k+y,l), twod_patch(patch_loc,0,x,y,0));\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n\n  patch_dims[0] = 1;\n  patch_dims[1] = 2;\n  patch_dims[2] = 3;\n  patch_dims[3] = 5;\n\n  if (DataLayout == ColMajor) {\n   patchTensorRange = {{1,2,3,5,2*2*3*3}};\n  }else{\n     patchTensorRange = {{2*2*3*3, 1, 2,3,5}};\n  }\n  Tensor<DataType, 5, DataLayout,IndexType> threed_patch(patchTensorRange);\n  patchTensorBuffSize =threed_patch.size()*sizeof(DataType);\n  DataType* gpu_data_threed_patch  = static_cast<DataType*>(sycl_device.allocate(patchTensorBuffSize));\n  TensorMap<Tensor<DataType, 5, DataLayout,IndexType>> gpu_threed_patch(gpu_data_threed_patch, patchTensorRange);\n\n  gpu_threed_patch.device(sycl_device)=gpu_tensor.extract_patches(patch_dims);\n  sycl_device.memcpyDeviceToHost(threed_patch.data(), gpu_data_threed_patch, patchTensorBuffSize);\n\n  if (DataLayout == ColMajor) {\n    VERIFY_IS_EQUAL(threed_patch.dimension(0), 1);\n    VERIFY_IS_EQUAL(threed_patch.dimension(1), 2);\n    VERIFY_IS_EQUAL(threed_patch.dimension(2), 3);\n    VERIFY_IS_EQUAL(threed_patch.dimension(3), 5);\n    VERIFY_IS_EQUAL(threed_patch.dimension(4), 2*2*3*3);\n  } else {\n    VERIFY_IS_EQUAL(threed_patch.dimension(0), 2*2*3*3);\n    VERIFY_IS_EQUAL(threed_patch.dimension(1), 1);\n    VERIFY_IS_EQUAL(threed_patch.dimension(2), 2);\n    VERIFY_IS_EQUAL(threed_patch.dimension(3), 3);\n    VERIFY_IS_EQUAL(threed_patch.dimension(4), 5);\n  }\n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 2; ++j) {\n      for (int k = 0; k < 3; ++k) {\n        for (int l = 0; l < 3; ++l) {\n          int patch_loc;\n          if (DataLayout == ColMajor) {\n            patch_loc = i + 2 * (j + 2 * (k + 3 * l));\n          } else {\n            patch_loc = l + 3 * (k + 3 * (j + 2 * i));\n          }\n          for (int x = 0; x < 2; ++x) {\n            for (int y = 0; y < 3; ++y) {\n              for (int z = 0; z < 5; ++z) {\n                if (DataLayout == ColMajor) {\n                  VERIFY_IS_EQUAL(tensor(i,j+x,k+y,l+z), threed_patch(0,x,y,z,patch_loc));\n                } else {\n                  VERIFY_IS_EQUAL(tensor(i,j+x,k+y,l+z), threed_patch(patch_loc,0,x,y,z));\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  sycl_device.deallocate(gpu_data_tensor);\n  sycl_device.deallocate(gpu_data_no_patch);\n  sycl_device.deallocate(gpu_data_single_patch);\n  sycl_device.deallocate(gpu_data_twod_patch);\n  sycl_device.deallocate(gpu_data_threed_patch);\n}\n\ntemplate<typename DataType, typename dev_Selector> void sycl_tensor_patch_test_per_device(dev_Selector s){\n  QueueInterface queueInterface(s);\n  auto sycl_device = Eigen::SyclDevice(&queueInterface);\n  test_simple_patch_sycl<DataType, RowMajor, int64_t>(sycl_device);\n  test_simple_patch_sycl<DataType, ColMajor, int64_t>(sycl_device);\n}\nEIGEN_DECLARE_TEST(cxx11_tensor_patch_sycl)\n{\n  for (const auto& device :Eigen::get_sycl_supported_devices()) {\n    CALL_SUBTEST(sycl_tensor_patch_test_per_device<float>(device));\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_random.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\nstatic void test_default()\n{\n  Tensor<float, 1> vec(6);\n  vec.setRandom();\n\n  // Fixme: we should check that the generated numbers follow a uniform\n  // distribution instead.\n  for (int i = 1; i < 6; ++i) {\n    VERIFY_IS_NOT_EQUAL(vec(i), vec(i-1));\n  }\n}\n\nstatic void test_normal()\n{\n  Tensor<float, 1> vec(6);\n  vec.setRandom<Eigen::internal::NormalRandomGenerator<float>>();\n\n  // Fixme: we should check that the generated numbers follow a gaussian\n  // distribution instead.\n  for (int i = 1; i < 6; ++i) {\n    VERIFY_IS_NOT_EQUAL(vec(i), vec(i-1));\n  }\n}\n\n\nstruct MyGenerator {\n  MyGenerator() { }\n  MyGenerator(const MyGenerator&) { }\n\n  // Return a random value to be used.  \"element_location\" is the\n  // location of the entry to set in the tensor, it can typically\n  // be ignored.\n  int operator()(Eigen::DenseIndex element_location, Eigen::DenseIndex /*unused*/ = 0) const {\n    return static_cast<int>(3 * element_location);\n  }\n\n  // Same as above but generates several numbers at a time.\n  internal::packet_traits<int>::type packetOp(\n      Eigen::DenseIndex packet_location, Eigen::DenseIndex /*unused*/ = 0) const {\n    const int packetSize = internal::packet_traits<int>::size;\n    EIGEN_ALIGN_MAX int values[packetSize];\n    for (int i = 0; i < packetSize; ++i) {\n      values[i] = static_cast<int>(3 * (packet_location + i));\n    }\n    return internal::pload<typename internal::packet_traits<int>::type>(values);\n  }\n};\n\n\nstatic void test_custom()\n{\n  Tensor<int, 1> vec(6);\n  vec.setRandom<MyGenerator>();\n\n  for (int i = 0; i < 6; ++i) {\n    VERIFY_IS_EQUAL(vec(i), 3*i);\n  }\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_random)\n{\n  CALL_SUBTEST(test_default());\n  CALL_SUBTEST(test_normal());\n  CALL_SUBTEST(test_custom());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_random_gpu.cu",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_TEST_NO_LONGDOUBLE\n#define EIGEN_TEST_NO_COMPLEX\n\n#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int\n#define EIGEN_USE_GPU\n\n#include \"main.h\"\n#include <Eigen/CXX11/Tensor>\n\n#include <Eigen/CXX11/src/Tensor/TensorGpuHipCudaDefines.h>\n\nvoid test_gpu_random_uniform()\n{\n  Tensor<float, 2> out(72,97);\n  out.setZero();\n\n  std::size_t out_bytes = out.size() * sizeof(float);\n\n  float* d_out;\n  gpuMalloc((void**)(&d_out), out_bytes);\n\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n\n  Eigen::TensorMap<Eigen::Tensor<float, 2> > gpu_out(d_out, 72,97);\n\n  gpu_out.device(gpu_device) = gpu_out.random();\n\n  assert(gpuMemcpyAsync(out.data(), d_out, out_bytes, gpuMemcpyDeviceToHost, gpu_device.stream()) == gpuSuccess);\n  assert(gpuStreamSynchronize(gpu_device.stream()) == gpuSuccess);\n\n  // For now we just check this code doesn't crash.\n  // TODO: come up with a valid test of randomness\n}\n\n\nvoid test_gpu_random_normal()\n{\n  Tensor<float, 2> out(72,97);\n  out.setZero();\n\n  std::size_t out_bytes = out.size() * sizeof(float);\n\n  float* d_out;\n  gpuMalloc((void**)(&d_out), out_bytes);\n\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n\n  Eigen::TensorMap<Eigen::Tensor<float, 2> > gpu_out(d_out, 72,97);\n\n  Eigen::internal::NormalRandomGenerator<float> gen(true);\n  gpu_out.device(gpu_device) = gpu_out.random(gen);\n\n  assert(gpuMemcpyAsync(out.data(), d_out, out_bytes, gpuMemcpyDeviceToHost, gpu_device.stream()) == gpuSuccess);\n  assert(gpuStreamSynchronize(gpu_device.stream()) == gpuSuccess);\n}\n\nstatic void test_complex()\n{\n  Tensor<std::complex<float>, 1> vec(6);\n  vec.setRandom();\n\n  // Fixme: we should check that the generated numbers follow a uniform\n  // distribution instead.\n  for (int i = 1; i < 6; ++i) {\n    VERIFY_IS_NOT_EQUAL(vec(i), vec(i-1));\n  }\n}\n\n\nEIGEN_DECLARE_TEST(cxx11_tensor_random_gpu)\n{\n  CALL_SUBTEST(test_gpu_random_uniform());\n  CALL_SUBTEST(test_gpu_random_normal());\n  CALL_SUBTEST(test_complex());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_random_sycl.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016\n// Mehdi Goli    Codeplay Software Ltd.\n// Ralph Potter  Codeplay Software Ltd.\n// Luke Iwanski  Codeplay Software Ltd.\n// Contact: <eigen@codeplay.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_TEST_NO_LONGDOUBLE\n#define EIGEN_TEST_NO_COMPLEX\n#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int64_t\n#define EIGEN_USE_SYCL\n\n#include \"main.h\"\n#include <unsupported/Eigen/CXX11/Tensor>\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_sycl_random_uniform(const Eigen::SyclDevice& sycl_device)\n{\n  Tensor<DataType, 2,DataLayout, IndexType> out(72,97);\n  out.setZero();\n\n  std::size_t out_bytes = out.size() * sizeof(DataType);\n\n  IndexType sizeDim0 = 72;\n  IndexType sizeDim1 = 97;\n\n  array<IndexType, 2> tensorRange = {{sizeDim0, sizeDim1}};\n\n  DataType* d_out  = static_cast<DataType*>(sycl_device.allocate(out_bytes));\n  TensorMap<Tensor<DataType, 2, DataLayout, IndexType>> gpu_out(d_out, tensorRange);\n\n  gpu_out.device(sycl_device)=gpu_out.random();\n  sycl_device.memcpyDeviceToHost(out.data(), d_out,out_bytes);\n  for(IndexType i=1; i<sizeDim0; i++)\n    for(IndexType j=1; j<sizeDim1; j++)\n    {\n      VERIFY_IS_NOT_EQUAL(out(i,j), out(i-1,j));\n      VERIFY_IS_NOT_EQUAL(out(i,j), out(i,j-1));\n      VERIFY_IS_NOT_EQUAL(out(i,j), out(i-1,j-1));    }\n\n  // For now we just check thes code doesn't crash.\n  // TODO: come up with a valid test of randomness\n  sycl_device.deallocate(d_out);\n}\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nvoid test_sycl_random_normal(const Eigen::SyclDevice& sycl_device)\n{\n  Tensor<DataType, 2,DataLayout,IndexType> out(72,97);\n  out.setZero();\n  std::size_t out_bytes = out.size() * sizeof(DataType);\n\n  IndexType sizeDim0 = 72;\n  IndexType sizeDim1 = 97;\n\n  array<IndexType, 2> tensorRange = {{sizeDim0, sizeDim1}};\n\n  DataType* d_out  = static_cast<DataType*>(sycl_device.allocate(out_bytes));\n  TensorMap<Tensor<DataType, 2, DataLayout, IndexType>> gpu_out(d_out, tensorRange);\n  Eigen::internal::NormalRandomGenerator<DataType> gen(true);\n  gpu_out.device(sycl_device)=gpu_out.random(gen);\n  sycl_device.memcpyDeviceToHost(out.data(), d_out,out_bytes);\n  for(IndexType i=1; i<sizeDim0; i++)\n    for(IndexType j=1; j<sizeDim1; j++)\n    {\n      VERIFY_IS_NOT_EQUAL(out(i,j), out(i-1,j));\n      VERIFY_IS_NOT_EQUAL(out(i,j), out(i,j-1));\n      VERIFY_IS_NOT_EQUAL(out(i,j), out(i-1,j-1));\n\n    }\n\n  // For now we just check thes code doesn't crash.\n  // TODO: come up with a valid test of randomness\n  sycl_device.deallocate(d_out);\n}\n\ntemplate<typename DataType, typename dev_Selector> void sycl_random_test_per_device(dev_Selector s){\n  QueueInterface queueInterface(s);\n  auto sycl_device = Eigen::SyclDevice(&queueInterface);\n  test_sycl_random_uniform<DataType, RowMajor, int64_t>(sycl_device);\n  test_sycl_random_uniform<DataType, ColMajor, int64_t>(sycl_device);\n  test_sycl_random_normal<DataType, RowMajor, int64_t>(sycl_device);\n  test_sycl_random_normal<DataType, ColMajor, int64_t>(sycl_device);\n\n}\nEIGEN_DECLARE_TEST(cxx11_tensor_random_sycl)\n{\n  for (const auto& device :Eigen::get_sycl_supported_devices()) {\n    CALL_SUBTEST(sycl_random_test_per_device<float>(device));\n#ifdef EIGEN_SYCL_DOUBLE_SUPPORT\n    CALL_SUBTEST(sycl_random_test_per_device<double>(device));\n#endif\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_reduction.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <limits>\n#include <numeric>\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\n\ntemplate <int DataLayout>\nstatic void test_trivial_reductions() {\n  {\n    Tensor<float, 0, DataLayout> tensor;\n    tensor.setRandom();\n    array<ptrdiff_t, 0> reduction_axis;\n\n    Tensor<float, 0, DataLayout> result = tensor.sum(reduction_axis);\n    VERIFY_IS_EQUAL(result(), tensor());\n  }\n\n  {\n    Tensor<float, 1, DataLayout> tensor(7);\n    tensor.setRandom();\n    array<ptrdiff_t, 0> reduction_axis;\n\n    Tensor<float, 1, DataLayout> result = tensor.sum(reduction_axis);\n    VERIFY_IS_EQUAL(result.dimension(0), 7);\n    for (int i = 0; i < 7; ++i) {\n      VERIFY_IS_EQUAL(result(i), tensor(i));\n    }\n  }\n\n  {\n    Tensor<float, 2, DataLayout> tensor(2, 3);\n    tensor.setRandom();\n    array<ptrdiff_t, 0> reduction_axis;\n\n    Tensor<float, 2, DataLayout> result = tensor.sum(reduction_axis);\n    VERIFY_IS_EQUAL(result.dimension(0), 2);\n    VERIFY_IS_EQUAL(result.dimension(1), 3);\n    for (int i = 0; i < 2; ++i) {\n      for (int j = 0; j < 3; ++j) {\n        VERIFY_IS_EQUAL(result(i, j), tensor(i, j));\n      }\n    }\n  }\n}\n\ntemplate <typename Scalar,int DataLayout>\nstatic void test_simple_reductions() {\n  Tensor<Scalar, 4, DataLayout> tensor(2, 3, 5, 7);\n  tensor.setRandom();\n  // Add a little offset so that the product reductions won't be close to zero.\n  tensor += tensor.constant(Scalar(0.5f));\n  array<ptrdiff_t, 2> reduction_axis2;\n  reduction_axis2[0] = 1;\n  reduction_axis2[1] = 3;\n\n  Tensor<Scalar, 2, DataLayout> result = tensor.sum(reduction_axis2);\n  VERIFY_IS_EQUAL(result.dimension(0), 2);\n  VERIFY_IS_EQUAL(result.dimension(1), 5);\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 5; ++j) {\n      Scalar sum = Scalar(0.0f);\n      for (int k = 0; k < 3; ++k) {\n        for (int l = 0; l < 7; ++l) {\n          sum += tensor(i, k, j, l);\n        }\n      }\n      VERIFY_IS_APPROX(result(i, j), sum);\n    }\n  }\n\n  {\n    Tensor<Scalar, 0, DataLayout> sum1 = tensor.sum();\n    VERIFY_IS_EQUAL(sum1.rank(), 0);\n\n    array<ptrdiff_t, 4> reduction_axis4;\n    reduction_axis4[0] = 0;\n    reduction_axis4[1] = 1;\n    reduction_axis4[2] = 2;\n    reduction_axis4[3] = 3;\n    Tensor<Scalar, 0, DataLayout> sum2 = tensor.sum(reduction_axis4);\n    VERIFY_IS_EQUAL(sum2.rank(), 0);\n\n    VERIFY_IS_APPROX(sum1(), sum2());\n  }\n\n  reduction_axis2[0] = 0;\n  reduction_axis2[1] = 2;\n  result = tensor.prod(reduction_axis2);\n  VERIFY_IS_EQUAL(result.dimension(0), 3);\n  VERIFY_IS_EQUAL(result.dimension(1), 7);\n  for (int i = 0; i < 3; ++i) {\n    for (int j = 0; j < 7; ++j) {\n      Scalar prod = Scalar(1.0f);\n      for (int k = 0; k < 2; ++k) {\n        for (int l = 0; l < 5; ++l) {\n          prod *= tensor(k, i, l, j);\n        }\n      }\n      VERIFY_IS_APPROX(result(i, j), prod);\n    }\n  }\n\n  {\n    Tensor<Scalar, 0, DataLayout> prod1 = tensor.prod();\n    VERIFY_IS_EQUAL(prod1.rank(), 0);\n\n    array<ptrdiff_t, 4> reduction_axis4;\n    reduction_axis4[0] = 0;\n    reduction_axis4[1] = 1;\n    reduction_axis4[2] = 2;\n    reduction_axis4[3] = 3;\n    Tensor<Scalar, 0, DataLayout> prod2 = tensor.prod(reduction_axis4);\n    VERIFY_IS_EQUAL(prod2.rank(), 0);\n\n    VERIFY_IS_APPROX(prod1(), prod2());\n  }\n\n  reduction_axis2[0] = 0;\n  reduction_axis2[1] = 2;\n  result = tensor.maximum(reduction_axis2);\n  VERIFY_IS_EQUAL(result.dimension(0), 3);\n  VERIFY_IS_EQUAL(result.dimension(1), 7);\n  for (int i = 0; i < 3; ++i) {\n    for (int j = 0; j < 7; ++j) {\n      Scalar max_val = std::numeric_limits<Scalar>::lowest();\n      for (int k = 0; k < 2; ++k) {\n        for (int l = 0; l < 5; ++l) {\n          max_val = (std::max)(max_val, tensor(k, i, l, j));\n        }\n      }\n      VERIFY_IS_APPROX(result(i, j), max_val);\n    }\n  }\n\n  {\n    Tensor<Scalar, 0, DataLayout> max1 = tensor.maximum();\n    VERIFY_IS_EQUAL(max1.rank(), 0);\n\n    array<ptrdiff_t, 4> reduction_axis4;\n    reduction_axis4[0] = 0;\n    reduction_axis4[1] = 1;\n    reduction_axis4[2] = 2;\n    reduction_axis4[3] = 3;\n    Tensor<Scalar, 0, DataLayout> max2 = tensor.maximum(reduction_axis4);\n    VERIFY_IS_EQUAL(max2.rank(), 0);\n\n    VERIFY_IS_APPROX(max1(), max2());\n  }\n\n  reduction_axis2[0] = 0;\n  reduction_axis2[1] = 1;\n  result = tensor.minimum(reduction_axis2);\n  VERIFY_IS_EQUAL(result.dimension(0), 5);\n  VERIFY_IS_EQUAL(result.dimension(1), 7);\n  for (int i = 0; i < 5; ++i) {\n    for (int j = 0; j < 7; ++j) {\n      Scalar min_val = (std::numeric_limits<Scalar>::max)();\n      for (int k = 0; k < 2; ++k) {\n        for (int l = 0; l < 3; ++l) {\n          min_val = (std::min)(min_val, tensor(k, l, i, j));\n        }\n      }\n      VERIFY_IS_APPROX(result(i, j), min_val);\n    }\n  }\n\n  {\n    Tensor<Scalar, 0, DataLayout> min1 = tensor.minimum();\n    VERIFY_IS_EQUAL(min1.rank(), 0);\n\n    array<ptrdiff_t, 4> reduction_axis4;\n    reduction_axis4[0] = 0;\n    reduction_axis4[1] = 1;\n    reduction_axis4[2] = 2;\n    reduction_axis4[3] = 3;\n    Tensor<Scalar, 0, DataLayout> min2 = tensor.minimum(reduction_axis4);\n    VERIFY_IS_EQUAL(min2.rank(), 0);\n\n    VERIFY_IS_APPROX(min1(), min2());\n  }\n\n  reduction_axis2[0] = 0;\n  reduction_axis2[1] = 1;\n  result = tensor.mean(reduction_axis2);\n  VERIFY_IS_EQUAL(result.dimension(0), 5);\n  VERIFY_IS_EQUAL(result.dimension(1), 7);\n  for (int i = 0; i < 5; ++i) {\n    for (int j = 0; j < 7; ++j) {\n      Scalar sum = Scalar(0.0f);\n      int count = 0;\n      for (int k = 0; k < 2; ++k) {\n        for (int l = 0; l < 3; ++l) {\n          sum += tensor(k, l, i, j);\n          ++count;\n        }\n      }\n      VERIFY_IS_APPROX(result(i, j), sum / count);\n    }\n  }\n\n  {\n    Tensor<Scalar, 0, DataLayout> mean1 = tensor.mean();\n    VERIFY_IS_EQUAL(mean1.rank(), 0);\n\n    array<ptrdiff_t, 4> reduction_axis4;\n    reduction_axis4[0] = 0;\n    reduction_axis4[1] = 1;\n    reduction_axis4[2] = 2;\n    reduction_axis4[3] = 3;\n    Tensor<Scalar, 0, DataLayout> mean2 = tensor.mean(reduction_axis4);\n    VERIFY_IS_EQUAL(mean2.rank(), 0);\n\n    VERIFY_IS_APPROX(mean1(), mean2());\n  }\n\n  {\n    Tensor<int, 1> ints(10);\n    std::iota(ints.data(), ints.data() + ints.dimension(0), 0);\n\n    TensorFixedSize<bool, Sizes<> > all_;\n    all_ = ints.all();\n    VERIFY(!all_());\n    all_ = (ints >= ints.constant(0)).all();\n    VERIFY(all_());\n\n    TensorFixedSize<bool, Sizes<> > any;\n    any = (ints > ints.constant(10)).any();\n    VERIFY(!any());\n    any = (ints < ints.constant(1)).any();\n    VERIFY(any());\n  }\n}\n\n\ntemplate <int DataLayout>\nstatic void test_reductions_in_expr() {\n  Tensor<float, 4, DataLayout> tensor(2, 3, 5, 7);\n  tensor.setRandom();\n  array<ptrdiff_t, 2> reduction_axis2;\n  reduction_axis2[0] = 1;\n  reduction_axis2[1] = 3;\n\n  Tensor<float, 2, DataLayout> result(2, 5);\n  result = result.constant(1.0f) - tensor.sum(reduction_axis2);\n  VERIFY_IS_EQUAL(result.dimension(0), 2);\n  VERIFY_IS_EQUAL(result.dimension(1), 5);\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 5; ++j) {\n      float sum = 0.0f;\n      for (int k = 0; k < 3; ++k) {\n        for (int l = 0; l < 7; ++l) {\n          sum += tensor(i, k, j, l);\n        }\n      }\n      VERIFY_IS_APPROX(result(i, j), 1.0f - sum);\n    }\n  }\n}\n\n\ntemplate <int DataLayout>\nstatic void test_full_reductions() {\n  Tensor<float, 2, DataLayout> tensor(2, 3);\n  tensor.setRandom();\n  array<ptrdiff_t, 2> reduction_axis;\n  reduction_axis[0] = 0;\n  reduction_axis[1] = 1;\n\n  Tensor<float, 0, DataLayout> result = tensor.sum(reduction_axis);\n  VERIFY_IS_EQUAL(result.rank(), 0);\n\n  float sum = 0.0f;\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      sum += tensor(i, j);\n    }\n  }\n  VERIFY_IS_APPROX(result(0), sum);\n\n  result = tensor.square().sum(reduction_axis).sqrt();\n  VERIFY_IS_EQUAL(result.rank(), 0);\n\n  sum = 0.0f;\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      sum += tensor(i, j) * tensor(i, j);\n    }\n  }\n  VERIFY_IS_APPROX(result(), sqrtf(sum));\n}\n\nstruct UserReducer {\n  static const bool PacketAccess = false;\n  UserReducer(float offset) : offset_(offset) {}\n  void reduce(const float val, float* accum) { *accum += val * val; }\n  float initialize() const { return 0; }\n  float finalize(const float accum) const { return 1.0f / (accum + offset_); }\n\n private:\n  const float offset_;\n};\n\ntemplate <int DataLayout>\nstatic void test_user_defined_reductions() {\n  Tensor<float, 2, DataLayout> tensor(5, 7);\n  tensor.setRandom();\n  array<ptrdiff_t, 1> reduction_axis;\n  reduction_axis[0] = 1;\n\n  UserReducer reducer(10.0f);\n  Tensor<float, 1, DataLayout> result = tensor.reduce(reduction_axis, reducer);\n  VERIFY_IS_EQUAL(result.dimension(0), 5);\n  for (int i = 0; i < 5; ++i) {\n    float expected = 10.0f;\n    for (int j = 0; j < 7; ++j) {\n      expected += tensor(i, j) * tensor(i, j);\n    }\n    expected = 1.0f / expected;\n    VERIFY_IS_APPROX(result(i), expected);\n  }\n}\n\ntemplate <int DataLayout>\nstatic void test_tensor_maps() {\n  int inputs[2 * 3 * 5 * 7];\n  TensorMap<Tensor<int, 4, DataLayout> > tensor_map(inputs, 2, 3, 5, 7);\n  TensorMap<Tensor<const int, 4, DataLayout> > tensor_map_const(inputs, 2, 3, 5,\n                                                                7);\n  const TensorMap<Tensor<const int, 4, DataLayout> > tensor_map_const_const(\n      inputs, 2, 3, 5, 7);\n\n  tensor_map.setRandom();\n  array<ptrdiff_t, 2> reduction_axis;\n  reduction_axis[0] = 1;\n  reduction_axis[1] = 3;\n\n  Tensor<int, 2, DataLayout> result = tensor_map.sum(reduction_axis);\n  Tensor<int, 2, DataLayout> result2 = tensor_map_const.sum(reduction_axis);\n  Tensor<int, 2, DataLayout> result3 =\n      tensor_map_const_const.sum(reduction_axis);\n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 5; ++j) {\n      int sum = 0;\n      for (int k = 0; k < 3; ++k) {\n        for (int l = 0; l < 7; ++l) {\n          sum += tensor_map(i, k, j, l);\n        }\n      }\n      VERIFY_IS_EQUAL(result(i, j), sum);\n      VERIFY_IS_EQUAL(result2(i, j), sum);\n      VERIFY_IS_EQUAL(result3(i, j), sum);\n    }\n  }\n}\n\ntemplate <int DataLayout>\nstatic void test_static_dims() {\n  Tensor<float, 4, DataLayout> in(72, 53, 97, 113);\n  Tensor<float, 2, DataLayout> out(72, 97);\n  in.setRandom();\n\n#if !EIGEN_HAS_CONSTEXPR\n  array<int, 2> reduction_axis;\n  reduction_axis[0] = 1;\n  reduction_axis[1] = 3;\n#else\n  Eigen::IndexList<Eigen::type2index<1>, Eigen::type2index<3> > reduction_axis;\n#endif\n\n  out = in.maximum(reduction_axis);\n\n  for (int i = 0; i < 72; ++i) {\n    for (int j = 0; j < 97; ++j) {\n      float expected = -1e10f;\n      for (int k = 0; k < 53; ++k) {\n        for (int l = 0; l < 113; ++l) {\n          expected = (std::max)(expected, in(i, k, j, l));\n        }\n      }\n      VERIFY_IS_EQUAL(out(i, j), expected);\n    }\n  }\n}\n\ntemplate <int DataLayout>\nstatic void test_innermost_last_dims() {\n  Tensor<float, 4, DataLayout> in(72, 53, 97, 113);\n  Tensor<float, 2, DataLayout> out(97, 113);\n  in.setRandom();\n\n// Reduce on the innermost dimensions.\n#if !EIGEN_HAS_CONSTEXPR\n  array<int, 2> reduction_axis;\n  reduction_axis[0] = 0;\n  reduction_axis[1] = 1;\n#else\n  // This triggers the use of packets for ColMajor.\n  Eigen::IndexList<Eigen::type2index<0>, Eigen::type2index<1> > reduction_axis;\n#endif\n\n  out = in.maximum(reduction_axis);\n\n  for (int i = 0; i < 97; ++i) {\n    for (int j = 0; j < 113; ++j) {\n      float expected = -1e10f;\n      for (int k = 0; k < 53; ++k) {\n        for (int l = 0; l < 72; ++l) {\n          expected = (std::max)(expected, in(l, k, i, j));\n        }\n      }\n      VERIFY_IS_EQUAL(out(i, j), expected);\n    }\n  }\n}\n\ntemplate <int DataLayout>\nstatic void test_innermost_first_dims() {\n  Tensor<float, 4, DataLayout> in(72, 53, 97, 113);\n  Tensor<float, 2, DataLayout> out(72, 53);\n  in.setRandom();\n\n// Reduce on the innermost dimensions.\n#if !EIGEN_HAS_CONSTEXPR\n  array<int, 2> reduction_axis;\n  reduction_axis[0] = 2;\n  reduction_axis[1] = 3;\n#else\n  // This triggers the use of packets for RowMajor.\n  Eigen::IndexList<Eigen::type2index<2>, Eigen::type2index<3>> reduction_axis;\n#endif\n\n  out = in.maximum(reduction_axis);\n\n  for (int i = 0; i < 72; ++i) {\n    for (int j = 0; j < 53; ++j) {\n      float expected = -1e10f;\n      for (int k = 0; k < 97; ++k) {\n        for (int l = 0; l < 113; ++l) {\n          expected = (std::max)(expected, in(i, j, k, l));\n        }\n      }\n      VERIFY_IS_EQUAL(out(i, j), expected);\n    }\n  }\n}\n\ntemplate <int DataLayout>\nstatic void test_reduce_middle_dims() {\n  Tensor<float, 4, DataLayout> in(72, 53, 97, 113);\n  Tensor<float, 2, DataLayout> out(72, 53);\n  in.setRandom();\n\n// Reduce on the innermost dimensions.\n#if !EIGEN_HAS_CONSTEXPR\n  array<int, 2> reduction_axis;\n  reduction_axis[0] = 1;\n  reduction_axis[1] = 2;\n#else\n  // This triggers the use of packets for RowMajor.\n  Eigen::IndexList<Eigen::type2index<1>, Eigen::type2index<2>> reduction_axis;\n#endif\n\n  out = in.maximum(reduction_axis);\n\n  for (int i = 0; i < 72; ++i) {\n    for (int j = 0; j < 113; ++j) {\n      float expected = -1e10f;\n      for (int k = 0; k < 53; ++k) {\n        for (int l = 0; l < 97; ++l) {\n          expected = (std::max)(expected, in(i, k, l, j));\n        }\n      }\n      VERIFY_IS_EQUAL(out(i, j), expected);\n    }\n  }\n}\n\nstatic void test_sum_accuracy() {\n  Tensor<float, 3> tensor(101, 101, 101);\n  for (float prescribed_mean : {1.0f, 10.0f, 100.0f, 1000.0f, 10000.0f}) {\n    tensor.setRandom();\n    tensor += tensor.constant(prescribed_mean);\n\n    Tensor<float, 0> sum = tensor.sum();\n    double expected_sum = 0.0;\n    for (int i = 0; i < 101; ++i) {\n      for (int j = 0; j < 101; ++j) {\n        for (int k = 0; k < 101; ++k) {\n          expected_sum += static_cast<double>(tensor(i, j, k));\n        }\n      }\n    }\n    VERIFY_IS_APPROX(sum(), static_cast<float>(expected_sum));\n  }\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_reduction) {\n  CALL_SUBTEST(test_trivial_reductions<ColMajor>());\n  CALL_SUBTEST(test_trivial_reductions<RowMajor>());\n  CALL_SUBTEST(( test_simple_reductions<float,ColMajor>() ));\n  CALL_SUBTEST(( test_simple_reductions<float,RowMajor>() ));\n  CALL_SUBTEST(( test_simple_reductions<Eigen::half,ColMajor>() ));\n  CALL_SUBTEST(test_reductions_in_expr<ColMajor>());\n  CALL_SUBTEST(test_reductions_in_expr<RowMajor>());\n  CALL_SUBTEST(test_full_reductions<ColMajor>());\n  CALL_SUBTEST(test_full_reductions<RowMajor>());\n  CALL_SUBTEST(test_user_defined_reductions<ColMajor>());\n  CALL_SUBTEST(test_user_defined_reductions<RowMajor>());\n  CALL_SUBTEST(test_tensor_maps<ColMajor>());\n  CALL_SUBTEST(test_tensor_maps<RowMajor>());\n  CALL_SUBTEST(test_static_dims<ColMajor>());\n  CALL_SUBTEST(test_static_dims<RowMajor>());\n  CALL_SUBTEST(test_innermost_last_dims<ColMajor>());\n  CALL_SUBTEST(test_innermost_last_dims<RowMajor>());\n  CALL_SUBTEST(test_innermost_first_dims<ColMajor>());\n  CALL_SUBTEST(test_innermost_first_dims<RowMajor>());\n  CALL_SUBTEST(test_reduce_middle_dims<ColMajor>());\n  CALL_SUBTEST(test_reduce_middle_dims<RowMajor>());\n  CALL_SUBTEST(test_sum_accuracy());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_reduction_gpu.cu",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_TEST_NO_LONGDOUBLE\n#define EIGEN_TEST_NO_COMPLEX\n\n#define EIGEN_USE_GPU\n\n#include \"main.h\"\n#include <unsupported/Eigen/CXX11/Tensor>\n\n\ntemplate<typename Type, int DataLayout>\nstatic void test_full_reductions() {\n\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n\n  const int num_rows = internal::random<int>(1024, 5*1024);\n  const int num_cols = internal::random<int>(1024, 5*1024);\n\n  Tensor<Type, 2, DataLayout> in(num_rows, num_cols);\n  in.setRandom();\n\n  Tensor<Type, 0, DataLayout> full_redux;\n  full_redux = in.sum();\n\n  std::size_t in_bytes = in.size() * sizeof(Type);\n  std::size_t out_bytes = full_redux.size() * sizeof(Type);\n  Type* gpu_in_ptr = static_cast<Type*>(gpu_device.allocate(in_bytes));\n  Type* gpu_out_ptr = static_cast<Type*>(gpu_device.allocate(out_bytes));\n  gpu_device.memcpyHostToDevice(gpu_in_ptr, in.data(), in_bytes);\n\n  TensorMap<Tensor<Type, 2, DataLayout> > in_gpu(gpu_in_ptr, num_rows, num_cols);\n  TensorMap<Tensor<Type, 0, DataLayout> > out_gpu(gpu_out_ptr);\n\n  out_gpu.device(gpu_device) = in_gpu.sum();\n\n  Tensor<Type, 0, DataLayout> full_redux_gpu;\n  gpu_device.memcpyDeviceToHost(full_redux_gpu.data(), gpu_out_ptr, out_bytes);\n  gpu_device.synchronize();\n\n  // Check that the CPU and GPU reductions return the same result.\n  VERIFY_IS_APPROX(full_redux(), full_redux_gpu());\n\n  gpu_device.deallocate(gpu_in_ptr);\n  gpu_device.deallocate(gpu_out_ptr);\n}\n\ntemplate<typename Type, int DataLayout>\nstatic void test_first_dim_reductions() {\n  int dim_x = 33;\n  int dim_y = 1;\n  int dim_z = 128;\n\n  Tensor<Type, 3, DataLayout> in(dim_x, dim_y, dim_z);\n  in.setRandom();\n\n  Eigen::array<int, 1> red_axis;\n  red_axis[0] = 0;\n  Tensor<Type, 2, DataLayout> redux = in.sum(red_axis);\n\n  // Create device\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice dev(&stream);\n  \n  // Create data(T)\n  Type* in_data = (Type*)dev.allocate(dim_x*dim_y*dim_z*sizeof(Type));\n  Type* out_data = (Type*)dev.allocate(dim_z*dim_y*sizeof(Type));\n  Eigen::TensorMap<Eigen::Tensor<Type, 3, DataLayout> > gpu_in(in_data, dim_x, dim_y, dim_z);\n  Eigen::TensorMap<Eigen::Tensor<Type, 2, DataLayout> > gpu_out(out_data, dim_y, dim_z);\n  \n  // Perform operation\n  dev.memcpyHostToDevice(in_data, in.data(), in.size()*sizeof(Type));\n  gpu_out.device(dev) = gpu_in.sum(red_axis);\n  gpu_out.device(dev) += gpu_in.sum(red_axis);\n  Tensor<Type, 2, DataLayout> redux_gpu(dim_y, dim_z);\n  dev.memcpyDeviceToHost(redux_gpu.data(), out_data, gpu_out.size()*sizeof(Type));\n  dev.synchronize();\n\n  // Check that the CPU and GPU reductions return the same result.\n  for (int i = 0; i < gpu_out.size(); ++i) {\n    VERIFY_IS_APPROX(2*redux(i), redux_gpu(i));\n  }\n\n  dev.deallocate(in_data);\n  dev.deallocate(out_data);\n}\n\ntemplate<typename Type, int DataLayout>\nstatic void test_last_dim_reductions() {\n  int dim_x = 128;\n  int dim_y = 1;\n  int dim_z = 33;\n\n  Tensor<Type, 3, DataLayout> in(dim_x, dim_y, dim_z);\n  in.setRandom();\n\n  Eigen::array<int, 1> red_axis;\n  red_axis[0] = 2;\n  Tensor<Type, 2, DataLayout> redux = in.sum(red_axis);\n\n  // Create device\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice dev(&stream);\n  \n  // Create data\n  Type* in_data = (Type*)dev.allocate(dim_x*dim_y*dim_z*sizeof(Type));\n  Type* out_data = (Type*)dev.allocate(dim_x*dim_y*sizeof(Type));\n  Eigen::TensorMap<Eigen::Tensor<Type, 3, DataLayout> > gpu_in(in_data, dim_x, dim_y, dim_z);\n  Eigen::TensorMap<Eigen::Tensor<Type, 2, DataLayout> > gpu_out(out_data, dim_x, dim_y);\n  \n  // Perform operation\n  dev.memcpyHostToDevice(in_data, in.data(), in.size()*sizeof(Type));\n  gpu_out.device(dev) = gpu_in.sum(red_axis);\n  gpu_out.device(dev) += gpu_in.sum(red_axis);\n  Tensor<Type, 2, DataLayout> redux_gpu(dim_x, dim_y);\n  dev.memcpyDeviceToHost(redux_gpu.data(), out_data, gpu_out.size()*sizeof(Type));\n  dev.synchronize();\n\n  // Check that the CPU and GPU reductions return the same result.\n  for (int i = 0; i < gpu_out.size(); ++i) {\n    VERIFY_IS_APPROX(2*redux(i), redux_gpu(i));\n  }\n\n  dev.deallocate(in_data);\n  dev.deallocate(out_data);\n}\n\n\nEIGEN_DECLARE_TEST(cxx11_tensor_reduction_gpu) {\n  CALL_SUBTEST_1((test_full_reductions<float, ColMajor>()));\n  CALL_SUBTEST_1((test_full_reductions<double, ColMajor>()));\n  CALL_SUBTEST_2((test_full_reductions<float, RowMajor>()));\n  CALL_SUBTEST_2((test_full_reductions<double, RowMajor>()));\n  \n  CALL_SUBTEST_3((test_first_dim_reductions<float, ColMajor>()));\n  CALL_SUBTEST_3((test_first_dim_reductions<double, ColMajor>()));\n  CALL_SUBTEST_4((test_first_dim_reductions<float, RowMajor>()));\n// Outer reductions of doubles aren't supported just yet.  \t\t\t\t\t      \n//  CALL_SUBTEST_4((test_first_dim_reductions<double, RowMajor>()))\n\n  CALL_SUBTEST_5((test_last_dim_reductions<float, ColMajor>()));\n// Outer reductions of doubles aren't supported just yet.  \t\t\t\t\t      \n//  CALL_SUBTEST_5((test_last_dim_reductions<double, ColMajor>()));\n  CALL_SUBTEST_6((test_last_dim_reductions<float, RowMajor>()));\n  CALL_SUBTEST_6((test_last_dim_reductions<double, RowMajor>()));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_reduction_sycl.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015\n// Mehdi Goli    Codeplay Software Ltd.\n// Ralph Potter  Codeplay Software Ltd.\n// Luke Iwanski  Codeplay Software Ltd.\n// Contact: <eigen@codeplay.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_TEST_NO_LONGDOUBLE\n#define EIGEN_TEST_NO_COMPLEX\n\n#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int64_t\n#define EIGEN_USE_SYCL\n#define EIGEN_HAS_CONSTEXPR 1\n\n#include \"main.h\"\n\n#include <unsupported/Eigen/CXX11/Tensor>\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_full_reductions_sum_sycl(\n    const Eigen::SyclDevice& sycl_device) {\n  const IndexType num_rows = 753;\n  const IndexType num_cols = 537;\n  array<IndexType, 2> tensorRange = {{num_rows, num_cols}};\n\n  array<IndexType, 2> outRange = {{1, 1}};\n\n  Tensor<DataType, 2, DataLayout, IndexType> in(tensorRange);\n  Tensor<DataType, 2, DataLayout, IndexType> full_redux(outRange);\n  Tensor<DataType, 2, DataLayout, IndexType> full_redux_gpu(outRange);\n\n  in.setRandom();\n  auto dim = DSizes<IndexType, 2>(1, 1);\n  full_redux = in.sum().reshape(dim);\n\n  DataType* gpu_in_data = static_cast<DataType*>(\n      sycl_device.allocate(in.dimensions().TotalSize() * sizeof(DataType)));\n  DataType* gpu_out_data = (DataType*)sycl_device.allocate(\n      sizeof(DataType) * (full_redux_gpu.dimensions().TotalSize()));\n\n  TensorMap<Tensor<DataType, 2, DataLayout, IndexType>> in_gpu(gpu_in_data,\n                                                               tensorRange);\n  TensorMap<Tensor<DataType, 2, DataLayout, IndexType>> out_gpu(gpu_out_data,\n                                                                outRange);\n  sycl_device.memcpyHostToDevice(\n      gpu_in_data, in.data(), (in.dimensions().TotalSize()) * sizeof(DataType));\n  out_gpu.device(sycl_device) = in_gpu.sum().reshape(dim);\n  sycl_device.memcpyDeviceToHost(\n      full_redux_gpu.data(), gpu_out_data,\n      (full_redux_gpu.dimensions().TotalSize()) * sizeof(DataType));\n  // Check that the CPU and GPU reductions return the same result.\n  std::cout << \"SYCL FULL :\" << full_redux_gpu(0, 0)\n            << \", CPU FULL: \" << full_redux(0, 0) << \"\\n\";\n  VERIFY_IS_APPROX(full_redux_gpu(0, 0), full_redux(0, 0));\n  sycl_device.deallocate(gpu_in_data);\n  sycl_device.deallocate(gpu_out_data);\n}\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_full_reductions_sum_with_offset_sycl(\n    const Eigen::SyclDevice& sycl_device) {\n  using data_tensor = Tensor<DataType, 2, DataLayout, IndexType>;\n  using scalar_tensor = Tensor<DataType, 0, DataLayout, IndexType>;\n  const IndexType num_rows = 64;\n  const IndexType num_cols = 64;\n  array<IndexType, 2> tensor_range = {{num_rows, num_cols}};\n  const IndexType n_elems = internal::array_prod(tensor_range);\n\n  data_tensor in(tensor_range);\n  scalar_tensor full_redux;\n  scalar_tensor full_redux_gpu;\n\n  in.setRandom();\n  array<IndexType, 2> tensor_offset_range(tensor_range);\n  tensor_offset_range[0] -= 1;\n\n  const IndexType offset = 64;\n  TensorMap<data_tensor> in_offset(in.data() + offset, tensor_offset_range);\n  full_redux = in_offset.sum();\n\n  DataType* gpu_in_data =\n      static_cast<DataType*>(sycl_device.allocate(n_elems * sizeof(DataType)));\n  DataType* gpu_out_data =\n      static_cast<DataType*>(sycl_device.allocate(sizeof(DataType)));\n\n  TensorMap<data_tensor> in_gpu(gpu_in_data + offset, tensor_offset_range);\n  TensorMap<scalar_tensor> out_gpu(gpu_out_data);\n  sycl_device.memcpyHostToDevice(gpu_in_data, in.data(),\n                                 n_elems * sizeof(DataType));\n  out_gpu.device(sycl_device) = in_gpu.sum();\n  sycl_device.memcpyDeviceToHost(full_redux_gpu.data(), gpu_out_data,\n                                 sizeof(DataType));\n\n  // Check that the CPU and GPU reductions return the same result.\n  VERIFY_IS_APPROX(full_redux_gpu(), full_redux());\n\n  sycl_device.deallocate(gpu_in_data);\n  sycl_device.deallocate(gpu_out_data);\n}\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_full_reductions_max_sycl(\n    const Eigen::SyclDevice& sycl_device) {\n  const IndexType num_rows = 4096;\n  const IndexType num_cols = 4096;\n  array<IndexType, 2> tensorRange = {{num_rows, num_cols}};\n\n  Tensor<DataType, 2, DataLayout, IndexType> in(tensorRange);\n  Tensor<DataType, 0, DataLayout, IndexType> full_redux;\n  Tensor<DataType, 0, DataLayout, IndexType> full_redux_gpu;\n\n  in.setRandom();\n\n  full_redux = in.maximum();\n\n  DataType* gpu_in_data = static_cast<DataType*>(\n      sycl_device.allocate(in.dimensions().TotalSize() * sizeof(DataType)));\n  DataType* gpu_out_data = (DataType*)sycl_device.allocate(sizeof(DataType));\n\n  TensorMap<Tensor<DataType, 2, DataLayout, IndexType>> in_gpu(gpu_in_data,\n                                                               tensorRange);\n  TensorMap<Tensor<DataType, 0, DataLayout, IndexType>> out_gpu(gpu_out_data);\n  sycl_device.memcpyHostToDevice(\n      gpu_in_data, in.data(), (in.dimensions().TotalSize()) * sizeof(DataType));\n  out_gpu.device(sycl_device) = in_gpu.maximum();\n  sycl_device.memcpyDeviceToHost(full_redux_gpu.data(), gpu_out_data,\n                                 sizeof(DataType));\n  VERIFY_IS_APPROX(full_redux_gpu(), full_redux());\n  sycl_device.deallocate(gpu_in_data);\n  sycl_device.deallocate(gpu_out_data);\n}\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_full_reductions_max_with_offset_sycl(\n    const Eigen::SyclDevice& sycl_device) {\n  using data_tensor = Tensor<DataType, 2, DataLayout, IndexType>;\n  using scalar_tensor = Tensor<DataType, 0, DataLayout, IndexType>;\n  const IndexType num_rows = 64;\n  const IndexType num_cols = 64;\n  array<IndexType, 2> tensor_range = {{num_rows, num_cols}};\n  const IndexType n_elems = internal::array_prod(tensor_range);\n\n  data_tensor in(tensor_range);\n  scalar_tensor full_redux;\n  scalar_tensor full_redux_gpu;\n\n  in.setRandom();\n  array<IndexType, 2> tensor_offset_range(tensor_range);\n  tensor_offset_range[0] -= 1;\n  // Set the initial value to be the max.\n  // As we don't include this in the reduction the result should not be 2.\n  in(0) = static_cast<DataType>(2);\n\n  const IndexType offset = 64;\n  TensorMap<data_tensor> in_offset(in.data() + offset, tensor_offset_range);\n  full_redux = in_offset.maximum();\n  VERIFY_IS_NOT_EQUAL(full_redux(), in(0));\n\n  DataType* gpu_in_data =\n      static_cast<DataType*>(sycl_device.allocate(n_elems * sizeof(DataType)));\n  DataType* gpu_out_data =\n      static_cast<DataType*>(sycl_device.allocate(sizeof(DataType)));\n\n  TensorMap<data_tensor> in_gpu(gpu_in_data + offset, tensor_offset_range);\n  TensorMap<scalar_tensor> out_gpu(gpu_out_data);\n  sycl_device.memcpyHostToDevice(gpu_in_data, in.data(),\n                                 n_elems * sizeof(DataType));\n  out_gpu.device(sycl_device) = in_gpu.maximum();\n  sycl_device.memcpyDeviceToHost(full_redux_gpu.data(), gpu_out_data,\n                                 sizeof(DataType));\n\n  // Check that the CPU and GPU reductions return the same result.\n  VERIFY_IS_APPROX(full_redux_gpu(), full_redux());\n\n  sycl_device.deallocate(gpu_in_data);\n  sycl_device.deallocate(gpu_out_data);\n}\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_full_reductions_mean_sycl(\n    const Eigen::SyclDevice& sycl_device) {\n  const IndexType num_rows = 4096;\n  const IndexType num_cols = 4096;\n  array<IndexType, 2> tensorRange = {{num_rows, num_cols}};\n  array<IndexType, 1> argRange = {{num_cols}};\n  Eigen::array<IndexType, 1> red_axis;\n  red_axis[0] = 0;\n  //  red_axis[1]=1;\n  Tensor<DataType, 2, DataLayout, IndexType> in(tensorRange);\n  Tensor<DataType, 2, DataLayout, IndexType> in_arg1(tensorRange);\n  Tensor<DataType, 2, DataLayout, IndexType> in_arg2(tensorRange);\n  Tensor<bool, 1, DataLayout, IndexType> out_arg_cpu(argRange);\n  Tensor<bool, 1, DataLayout, IndexType> out_arg_gpu(argRange);\n  Tensor<bool, 1, DataLayout, IndexType> out_arg_gpu_helper(argRange);\n  Tensor<DataType, 0, DataLayout, IndexType> full_redux;\n  Tensor<DataType, 0, DataLayout, IndexType> full_redux_gpu;\n\n  in.setRandom();\n  in_arg1.setRandom();\n  in_arg2.setRandom();\n\n  DataType* gpu_in_data = static_cast<DataType*>(\n      sycl_device.allocate(in.dimensions().TotalSize() * sizeof(DataType)));\n  DataType* gpu_in_arg1_data = static_cast<DataType*>(sycl_device.allocate(\n      in_arg1.dimensions().TotalSize() * sizeof(DataType)));\n  DataType* gpu_in_arg2_data = static_cast<DataType*>(sycl_device.allocate(\n      in_arg2.dimensions().TotalSize() * sizeof(DataType)));\n  bool* gpu_out_arg__gpu_helper_data = static_cast<bool*>(sycl_device.allocate(\n      out_arg_gpu.dimensions().TotalSize() * sizeof(DataType)));\n  bool* gpu_out_arg_data = static_cast<bool*>(sycl_device.allocate(\n      out_arg_gpu.dimensions().TotalSize() * sizeof(DataType)));\n\n  DataType* gpu_out_data = (DataType*)sycl_device.allocate(sizeof(DataType));\n\n  TensorMap<Tensor<DataType, 2, DataLayout, IndexType>> in_gpu(gpu_in_data,\n                                                               tensorRange);\n  TensorMap<Tensor<DataType, 2, DataLayout, IndexType>> in_Arg1_gpu(\n      gpu_in_arg1_data, tensorRange);\n  TensorMap<Tensor<DataType, 2, DataLayout, IndexType>> in_Arg2_gpu(\n      gpu_in_arg2_data, tensorRange);\n  TensorMap<Tensor<bool, 1, DataLayout, IndexType>> out_Argout_gpu(\n      gpu_out_arg_data, argRange);\n  TensorMap<Tensor<bool, 1, DataLayout, IndexType>> out_Argout_gpu_helper(\n      gpu_out_arg__gpu_helper_data, argRange);\n  TensorMap<Tensor<DataType, 0, DataLayout, IndexType>> out_gpu(gpu_out_data);\n\n  // CPU VERSION\n  out_arg_cpu =\n      (in_arg1.argmax(1) == in_arg2.argmax(1))\n          .select(out_arg_cpu.constant(true), out_arg_cpu.constant(false));\n  full_redux = (out_arg_cpu.template cast<float>())\n                   .reduce(red_axis, Eigen::internal::MeanReducer<DataType>());\n\n  // GPU VERSION\n  sycl_device.memcpyHostToDevice(\n      gpu_in_data, in.data(), (in.dimensions().TotalSize()) * sizeof(DataType));\n  sycl_device.memcpyHostToDevice(\n      gpu_in_arg1_data, in_arg1.data(),\n      (in_arg1.dimensions().TotalSize()) * sizeof(DataType));\n  sycl_device.memcpyHostToDevice(\n      gpu_in_arg2_data, in_arg2.data(),\n      (in_arg2.dimensions().TotalSize()) * sizeof(DataType));\n  out_Argout_gpu_helper.device(sycl_device) =\n      (in_Arg1_gpu.argmax(1) == in_Arg2_gpu.argmax(1));\n  out_Argout_gpu.device(sycl_device) =\n      (out_Argout_gpu_helper)\n          .select(out_Argout_gpu.constant(true),\n                  out_Argout_gpu.constant(false));\n  out_gpu.device(sycl_device) =\n      (out_Argout_gpu.template cast<float>())\n          .reduce(red_axis, Eigen::internal::MeanReducer<DataType>());\n  sycl_device.memcpyDeviceToHost(full_redux_gpu.data(), gpu_out_data,\n                                 sizeof(DataType));\n  // Check that the CPU and GPU reductions return the same result.\n  std::cout << \"SYCL : \" << full_redux_gpu() << \" , CPU : \" << full_redux()\n            << '\\n';\n  VERIFY_IS_EQUAL(full_redux_gpu(), full_redux());\n  sycl_device.deallocate(gpu_in_data);\n  sycl_device.deallocate(gpu_in_arg1_data);\n  sycl_device.deallocate(gpu_in_arg2_data);\n  sycl_device.deallocate(gpu_out_arg__gpu_helper_data);\n  sycl_device.deallocate(gpu_out_arg_data);\n  sycl_device.deallocate(gpu_out_data);\n}\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_full_reductions_mean_with_offset_sycl(\n    const Eigen::SyclDevice& sycl_device) {\n  using data_tensor = Tensor<DataType, 2, DataLayout, IndexType>;\n  using scalar_tensor = Tensor<DataType, 0, DataLayout, IndexType>;\n  const IndexType num_rows = 64;\n  const IndexType num_cols = 64;\n  array<IndexType, 2> tensor_range = {{num_rows, num_cols}};\n  const IndexType n_elems = internal::array_prod(tensor_range);\n\n  data_tensor in(tensor_range);\n  scalar_tensor full_redux;\n  scalar_tensor full_redux_gpu;\n\n  in.setRandom();\n  array<IndexType, 2> tensor_offset_range(tensor_range);\n  tensor_offset_range[0] -= 1;\n\n  const IndexType offset = 64;\n  TensorMap<data_tensor> in_offset(in.data() + offset, tensor_offset_range);\n  full_redux = in_offset.mean();\n  VERIFY_IS_NOT_EQUAL(full_redux(), in(0));\n\n  DataType* gpu_in_data =\n      static_cast<DataType*>(sycl_device.allocate(n_elems * sizeof(DataType)));\n  DataType* gpu_out_data =\n      static_cast<DataType*>(sycl_device.allocate(sizeof(DataType)));\n\n  TensorMap<data_tensor> in_gpu(gpu_in_data + offset, tensor_offset_range);\n  TensorMap<scalar_tensor> out_gpu(gpu_out_data);\n  sycl_device.memcpyHostToDevice(gpu_in_data, in.data(),\n                                 n_elems * sizeof(DataType));\n  out_gpu.device(sycl_device) = in_gpu.mean();\n  sycl_device.memcpyDeviceToHost(full_redux_gpu.data(), gpu_out_data,\n                                 sizeof(DataType));\n\n  // Check that the CPU and GPU reductions return the same result.\n  VERIFY_IS_APPROX(full_redux_gpu(), full_redux());\n\n  sycl_device.deallocate(gpu_in_data);\n  sycl_device.deallocate(gpu_out_data);\n}\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_full_reductions_mean_with_odd_offset_sycl(\n    const Eigen::SyclDevice& sycl_device) {\n  // This is a particular case which illustrates a possible problem when the\n  // number of local threads in a workgroup is even, but is not a power of two.\n  using data_tensor = Tensor<DataType, 1, DataLayout, IndexType>;\n  using scalar_tensor = Tensor<DataType, 0, DataLayout, IndexType>;\n  // 2177 = (17 * 128) + 1 gives rise to 18 local threads.\n  // 8708 = 4 * 2177 = 4 * (17 * 128) + 4 uses 18 vectorised local threads.\n  const IndexType n_elems = 8707;\n  array<IndexType, 1> tensor_range = {{n_elems}};\n\n  data_tensor in(tensor_range);\n  DataType full_redux;\n  DataType full_redux_gpu;\n  TensorMap<scalar_tensor> red_cpu(&full_redux);\n  TensorMap<scalar_tensor> red_gpu(&full_redux_gpu);\n\n  const DataType const_val = static_cast<DataType>(0.6391);\n  in = in.constant(const_val);\n\n  Eigen::IndexList<Eigen::type2index<0>> red_axis;\n  red_cpu = in.reduce(red_axis, Eigen::internal::MeanReducer<DataType>());\n  VERIFY_IS_APPROX(const_val, red_cpu());\n\n  DataType* gpu_in_data =\n      static_cast<DataType*>(sycl_device.allocate(n_elems * sizeof(DataType)));\n  DataType* gpu_out_data =\n      static_cast<DataType*>(sycl_device.allocate(sizeof(DataType)));\n\n  TensorMap<data_tensor> in_gpu(gpu_in_data, tensor_range);\n  TensorMap<scalar_tensor> out_gpu(gpu_out_data);\n  sycl_device.memcpyHostToDevice(gpu_in_data, in.data(),\n                                 n_elems * sizeof(DataType));\n  out_gpu.device(sycl_device) =\n      in_gpu.reduce(red_axis, Eigen::internal::MeanReducer<DataType>());\n  sycl_device.memcpyDeviceToHost(red_gpu.data(), gpu_out_data,\n                                 sizeof(DataType));\n\n  // Check that the CPU and GPU reductions return the same result.\n  VERIFY_IS_APPROX(full_redux_gpu, full_redux);\n\n  sycl_device.deallocate(gpu_in_data);\n  sycl_device.deallocate(gpu_out_data);\n}\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_full_reductions_min_sycl(\n    const Eigen::SyclDevice& sycl_device) {\n  const IndexType num_rows = 876;\n  const IndexType num_cols = 953;\n  array<IndexType, 2> tensorRange = {{num_rows, num_cols}};\n\n  Tensor<DataType, 2, DataLayout, IndexType> in(tensorRange);\n  Tensor<DataType, 0, DataLayout, IndexType> full_redux;\n  Tensor<DataType, 0, DataLayout, IndexType> full_redux_gpu;\n\n  in.setRandom();\n\n  full_redux = in.minimum();\n\n  DataType* gpu_in_data = static_cast<DataType*>(\n      sycl_device.allocate(in.dimensions().TotalSize() * sizeof(DataType)));\n  DataType* gpu_out_data = (DataType*)sycl_device.allocate(sizeof(DataType));\n\n  TensorMap<Tensor<DataType, 2, DataLayout, IndexType>> in_gpu(gpu_in_data,\n                                                               tensorRange);\n  TensorMap<Tensor<DataType, 0, DataLayout, IndexType>> out_gpu(gpu_out_data);\n\n  sycl_device.memcpyHostToDevice(\n      gpu_in_data, in.data(), (in.dimensions().TotalSize()) * sizeof(DataType));\n  out_gpu.device(sycl_device) = in_gpu.minimum();\n  sycl_device.memcpyDeviceToHost(full_redux_gpu.data(), gpu_out_data,\n                                 sizeof(DataType));\n  // Check that the CPU and GPU reductions return the same result.\n  VERIFY_IS_APPROX(full_redux_gpu(), full_redux());\n  sycl_device.deallocate(gpu_in_data);\n  sycl_device.deallocate(gpu_out_data);\n}\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_full_reductions_min_with_offset_sycl(\n    const Eigen::SyclDevice& sycl_device) {\n  using data_tensor = Tensor<DataType, 2, DataLayout, IndexType>;\n  using scalar_tensor = Tensor<DataType, 0, DataLayout, IndexType>;\n  const IndexType num_rows = 64;\n  const IndexType num_cols = 64;\n  array<IndexType, 2> tensor_range = {{num_rows, num_cols}};\n  const IndexType n_elems = internal::array_prod(tensor_range);\n\n  data_tensor in(tensor_range);\n  scalar_tensor full_redux;\n  scalar_tensor full_redux_gpu;\n\n  in.setRandom();\n  array<IndexType, 2> tensor_offset_range(tensor_range);\n  tensor_offset_range[0] -= 1;\n  // Set the initial value to be the min.\n  // As we don't include this in the reduction the result should not be -2.\n  in(0) = static_cast<DataType>(-2);\n\n  const IndexType offset = 64;\n  TensorMap<data_tensor> in_offset(in.data() + offset, tensor_offset_range);\n  full_redux = in_offset.minimum();\n  VERIFY_IS_NOT_EQUAL(full_redux(), in(0));\n\n  DataType* gpu_in_data =\n      static_cast<DataType*>(sycl_device.allocate(n_elems * sizeof(DataType)));\n  DataType* gpu_out_data =\n      static_cast<DataType*>(sycl_device.allocate(sizeof(DataType)));\n\n  TensorMap<data_tensor> in_gpu(gpu_in_data + offset, tensor_offset_range);\n  TensorMap<scalar_tensor> out_gpu(gpu_out_data);\n  sycl_device.memcpyHostToDevice(gpu_in_data, in.data(),\n                                 n_elems * sizeof(DataType));\n  out_gpu.device(sycl_device) = in_gpu.minimum();\n  sycl_device.memcpyDeviceToHost(full_redux_gpu.data(), gpu_out_data,\n                                 sizeof(DataType));\n\n  // Check that the CPU and GPU reductions return the same result.\n  VERIFY_IS_APPROX(full_redux_gpu(), full_redux());\n\n  sycl_device.deallocate(gpu_in_data);\n  sycl_device.deallocate(gpu_out_data);\n}\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_first_dim_reductions_max_sycl(\n    const Eigen::SyclDevice& sycl_device) {\n  IndexType dim_x = 145;\n  IndexType dim_y = 1;\n  IndexType dim_z = 67;\n\n  array<IndexType, 3> tensorRange = {{dim_x, dim_y, dim_z}};\n  Eigen::array<IndexType, 1> red_axis;\n  red_axis[0] = 0;\n  array<IndexType, 2> reduced_tensorRange = {{dim_y, dim_z}};\n\n  Tensor<DataType, 3, DataLayout, IndexType> in(tensorRange);\n  Tensor<DataType, 2, DataLayout, IndexType> redux(reduced_tensorRange);\n  Tensor<DataType, 2, DataLayout, IndexType> redux_gpu(reduced_tensorRange);\n\n  in.setRandom();\n\n  redux = in.maximum(red_axis);\n\n  DataType* gpu_in_data = static_cast<DataType*>(\n      sycl_device.allocate(in.dimensions().TotalSize() * sizeof(DataType)));\n  DataType* gpu_out_data = static_cast<DataType*>(sycl_device.allocate(\n      redux_gpu.dimensions().TotalSize() * sizeof(DataType)));\n\n  TensorMap<Tensor<DataType, 3, DataLayout, IndexType>> in_gpu(gpu_in_data,\n                                                               tensorRange);\n  TensorMap<Tensor<DataType, 2, DataLayout, IndexType>> out_gpu(\n      gpu_out_data, reduced_tensorRange);\n\n  sycl_device.memcpyHostToDevice(\n      gpu_in_data, in.data(), (in.dimensions().TotalSize()) * sizeof(DataType));\n  out_gpu.device(sycl_device) = in_gpu.maximum(red_axis);\n  sycl_device.memcpyDeviceToHost(\n      redux_gpu.data(), gpu_out_data,\n      redux_gpu.dimensions().TotalSize() * sizeof(DataType));\n\n  // Check that the CPU and GPU reductions return the same result.\n  for (IndexType j = 0; j < reduced_tensorRange[0]; j++)\n    for (IndexType k = 0; k < reduced_tensorRange[1]; k++)\n      VERIFY_IS_APPROX(redux_gpu(j, k), redux(j, k));\n\n  sycl_device.deallocate(gpu_in_data);\n  sycl_device.deallocate(gpu_out_data);\n}\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_first_dim_reductions_max_with_offset_sycl(\n    const Eigen::SyclDevice& sycl_device) {\n  using data_tensor = Tensor<DataType, 2, DataLayout, IndexType>;\n  using reduced_tensor = Tensor<DataType, 1, DataLayout, IndexType>;\n\n  const IndexType num_rows = 64;\n  const IndexType num_cols = 64;\n  array<IndexType, 2> tensor_range = {{num_rows, num_cols}};\n  array<IndexType, 1> reduced_range = {{num_cols}};\n  const IndexType n_elems = internal::array_prod(tensor_range);\n  const IndexType n_reduced = num_cols;\n\n  data_tensor in(tensor_range);\n  reduced_tensor redux;\n  reduced_tensor redux_gpu(reduced_range);\n\n  in.setRandom();\n  array<IndexType, 2> tensor_offset_range(tensor_range);\n  tensor_offset_range[0] -= 1;\n  // Set maximum value outside of the considered range.\n  for (IndexType i = 0; i < n_reduced; i++) {\n    in(i) = static_cast<DataType>(2);\n  }\n\n  Eigen::array<IndexType, 1> red_axis;\n  red_axis[0] = 0;\n\n  const IndexType offset = 64;\n  TensorMap<data_tensor> in_offset(in.data() + offset, tensor_offset_range);\n  redux = in_offset.maximum(red_axis);\n  for (IndexType i = 0; i < n_reduced; i++) {\n    VERIFY_IS_NOT_EQUAL(redux(i), in(i));\n  }\n\n  DataType* gpu_in_data =\n      static_cast<DataType*>(sycl_device.allocate(n_elems * sizeof(DataType)));\n  DataType* gpu_out_data = static_cast<DataType*>(\n      sycl_device.allocate(n_reduced * sizeof(DataType)));\n\n  TensorMap<data_tensor> in_gpu(gpu_in_data + offset, tensor_offset_range);\n  TensorMap<reduced_tensor> out_gpu(gpu_out_data, reduced_range);\n  sycl_device.memcpyHostToDevice(gpu_in_data, in.data(),\n                                 n_elems * sizeof(DataType));\n  out_gpu.device(sycl_device) = in_gpu.maximum(red_axis);\n  sycl_device.memcpyDeviceToHost(redux_gpu.data(), gpu_out_data,\n                                 n_reduced * sizeof(DataType));\n\n  // Check that the CPU and GPU reductions return the same result.\n  for (IndexType i = 0; i < n_reduced; i++) {\n    VERIFY_IS_APPROX(redux_gpu(i), redux(i));\n  }\n\n  sycl_device.deallocate(gpu_in_data);\n  sycl_device.deallocate(gpu_out_data);\n}\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_last_dim_reductions_max_with_offset_sycl(\n    const Eigen::SyclDevice& sycl_device) {\n  using data_tensor = Tensor<DataType, 2, DataLayout, IndexType>;\n  using reduced_tensor = Tensor<DataType, 1, DataLayout, IndexType>;\n\n  const IndexType num_rows = 64;\n  const IndexType num_cols = 64;\n  array<IndexType, 2> tensor_range = {{num_rows, num_cols}};\n  array<IndexType, 1> full_reduced_range = {{num_rows}};\n  array<IndexType, 1> reduced_range = {{num_rows - 1}};\n  const IndexType n_elems = internal::array_prod(tensor_range);\n  const IndexType n_reduced = reduced_range[0];\n\n  data_tensor in(tensor_range);\n  reduced_tensor redux(full_reduced_range);\n  reduced_tensor redux_gpu(reduced_range);\n\n  in.setRandom();\n  redux.setZero();\n  array<IndexType, 2> tensor_offset_range(tensor_range);\n  tensor_offset_range[0] -= 1;\n  // Set maximum value outside of the considered range.\n  for (IndexType i = 0; i < n_reduced; i++) {\n    in(i) = static_cast<DataType>(2);\n  }\n\n  Eigen::array<IndexType, 1> red_axis;\n  red_axis[0] = 1;\n\n  const IndexType offset = 64;\n  // Introduce an offset in both the input and the output.\n  TensorMap<data_tensor> in_offset(in.data() + offset, tensor_offset_range);\n  TensorMap<reduced_tensor> red_offset(redux.data() + 1, reduced_range);\n  red_offset = in_offset.maximum(red_axis);\n\n  // Check that the first value hasn't been changed and that the reduced values\n  // are not equal to the previously set maximum in the input outside the range.\n  VERIFY_IS_EQUAL(redux(0), static_cast<DataType>(0));\n  for (IndexType i = 0; i < n_reduced; i++) {\n    VERIFY_IS_NOT_EQUAL(red_offset(i), in(i));\n  }\n\n  DataType* gpu_in_data =\n      static_cast<DataType*>(sycl_device.allocate(n_elems * sizeof(DataType)));\n  DataType* gpu_out_data = static_cast<DataType*>(\n      sycl_device.allocate((n_reduced + 1) * sizeof(DataType)));\n\n  TensorMap<data_tensor> in_gpu(gpu_in_data + offset, tensor_offset_range);\n  TensorMap<reduced_tensor> out_gpu(gpu_out_data + 1, reduced_range);\n  sycl_device.memcpyHostToDevice(gpu_in_data, in.data(),\n                                 n_elems * sizeof(DataType));\n  out_gpu.device(sycl_device) = in_gpu.maximum(red_axis);\n  sycl_device.memcpyDeviceToHost(redux_gpu.data(), out_gpu.data(),\n                                 n_reduced * sizeof(DataType));\n\n  // Check that the CPU and GPU reductions return the same result.\n  for (IndexType i = 0; i < n_reduced; i++) {\n    VERIFY_IS_APPROX(redux_gpu(i), red_offset(i));\n  }\n\n  sycl_device.deallocate(gpu_in_data);\n  sycl_device.deallocate(gpu_out_data);\n}\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_first_dim_reductions_sum_sycl(\n    const Eigen::SyclDevice& sycl_device, IndexType dim_x, IndexType dim_y) {\n  array<IndexType, 2> tensorRange = {{dim_x, dim_y}};\n  Eigen::array<IndexType, 1> red_axis;\n  red_axis[0] = 0;\n  array<IndexType, 1> reduced_tensorRange = {{dim_y}};\n\n  Tensor<DataType, 2, DataLayout, IndexType> in(tensorRange);\n  Tensor<DataType, 1, DataLayout, IndexType> redux(reduced_tensorRange);\n  Tensor<DataType, 1, DataLayout, IndexType> redux_gpu(reduced_tensorRange);\n\n  in.setRandom();\n  redux = in.sum(red_axis);\n\n  DataType* gpu_in_data = static_cast<DataType*>(\n      sycl_device.allocate(in.dimensions().TotalSize() * sizeof(DataType)));\n  DataType* gpu_out_data = static_cast<DataType*>(sycl_device.allocate(\n      redux_gpu.dimensions().TotalSize() * sizeof(DataType)));\n\n  TensorMap<Tensor<DataType, 2, DataLayout, IndexType>> in_gpu(gpu_in_data,\n                                                               tensorRange);\n  TensorMap<Tensor<DataType, 1, DataLayout, IndexType>> out_gpu(\n      gpu_out_data, reduced_tensorRange);\n\n  sycl_device.memcpyHostToDevice(\n      gpu_in_data, in.data(), (in.dimensions().TotalSize()) * sizeof(DataType));\n  out_gpu.device(sycl_device) = in_gpu.sum(red_axis);\n  sycl_device.memcpyDeviceToHost(\n      redux_gpu.data(), gpu_out_data,\n      redux_gpu.dimensions().TotalSize() * sizeof(DataType));\n\n  // Check that the CPU and GPU reductions return the same result.\n  for (IndexType i = 0; i < redux.size(); i++) {\n    VERIFY_IS_APPROX(redux_gpu.data()[i], redux.data()[i]);\n  }\n  sycl_device.deallocate(gpu_in_data);\n  sycl_device.deallocate(gpu_out_data);\n}\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_first_dim_reductions_mean_sycl(\n    const Eigen::SyclDevice& sycl_device) {\n  IndexType dim_x = 145;\n  IndexType dim_y = 1;\n  IndexType dim_z = 67;\n\n  array<IndexType, 3> tensorRange = {{dim_x, dim_y, dim_z}};\n  Eigen::array<IndexType, 1> red_axis;\n  red_axis[0] = 0;\n  array<IndexType, 2> reduced_tensorRange = {{dim_y, dim_z}};\n\n  Tensor<DataType, 3, DataLayout, IndexType> in(tensorRange);\n  Tensor<DataType, 2, DataLayout, IndexType> redux(reduced_tensorRange);\n  Tensor<DataType, 2, DataLayout, IndexType> redux_gpu(reduced_tensorRange);\n\n  in.setRandom();\n\n  redux = in.mean(red_axis);\n\n  DataType* gpu_in_data = static_cast<DataType*>(\n      sycl_device.allocate(in.dimensions().TotalSize() * sizeof(DataType)));\n  DataType* gpu_out_data = static_cast<DataType*>(sycl_device.allocate(\n      redux_gpu.dimensions().TotalSize() * sizeof(DataType)));\n\n  TensorMap<Tensor<DataType, 3, DataLayout, IndexType>> in_gpu(gpu_in_data,\n                                                               tensorRange);\n  TensorMap<Tensor<DataType, 2, DataLayout, IndexType>> out_gpu(\n      gpu_out_data, reduced_tensorRange);\n\n  sycl_device.memcpyHostToDevice(\n      gpu_in_data, in.data(), (in.dimensions().TotalSize()) * sizeof(DataType));\n  out_gpu.device(sycl_device) = in_gpu.mean(red_axis);\n  sycl_device.memcpyDeviceToHost(\n      redux_gpu.data(), gpu_out_data,\n      redux_gpu.dimensions().TotalSize() * sizeof(DataType));\n\n  // Check that the CPU and GPU reductions return the same result.\n  for (IndexType j = 0; j < reduced_tensorRange[0]; j++)\n    for (IndexType k = 0; k < reduced_tensorRange[1]; k++)\n      VERIFY_IS_APPROX(redux_gpu(j, k), redux(j, k));\n\n  sycl_device.deallocate(gpu_in_data);\n  sycl_device.deallocate(gpu_out_data);\n}\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_last_dim_reductions_mean_sycl(\n    const Eigen::SyclDevice& sycl_device) {\n  IndexType dim_x = 64;\n  IndexType dim_y = 1;\n  IndexType dim_z = 32;\n\n  array<IndexType, 3> tensorRange = {{dim_x, dim_y, dim_z}};\n  Eigen::array<IndexType, 1> red_axis;\n  red_axis[0] = 2;\n  array<IndexType, 2> reduced_tensorRange = {{dim_x, dim_y}};\n\n  Tensor<DataType, 3, DataLayout, IndexType> in(tensorRange);\n  Tensor<DataType, 2, DataLayout, IndexType> redux(reduced_tensorRange);\n  Tensor<DataType, 2, DataLayout, IndexType> redux_gpu(reduced_tensorRange);\n\n  in.setRandom();\n\n  redux = in.mean(red_axis);\n\n  DataType* gpu_in_data = static_cast<DataType*>(\n      sycl_device.allocate(in.dimensions().TotalSize() * sizeof(DataType)));\n  DataType* gpu_out_data = static_cast<DataType*>(sycl_device.allocate(\n      redux_gpu.dimensions().TotalSize() * sizeof(DataType)));\n\n  TensorMap<Tensor<DataType, 3, DataLayout, IndexType>> in_gpu(gpu_in_data,\n                                                               tensorRange);\n  TensorMap<Tensor<DataType, 2, DataLayout, IndexType>> out_gpu(\n      gpu_out_data, reduced_tensorRange);\n\n  sycl_device.memcpyHostToDevice(\n      gpu_in_data, in.data(), (in.dimensions().TotalSize()) * sizeof(DataType));\n  out_gpu.device(sycl_device) = in_gpu.mean(red_axis);\n  sycl_device.memcpyDeviceToHost(\n      redux_gpu.data(), gpu_out_data,\n      redux_gpu.dimensions().TotalSize() * sizeof(DataType));\n  // Check that the CPU and GPU reductions return the same result.\n  for (IndexType j = 0; j < reduced_tensorRange[0]; j++)\n    for (IndexType k = 0; k < reduced_tensorRange[1]; k++)\n      VERIFY_IS_APPROX(redux_gpu(j, k), redux(j, k));\n\n  sycl_device.deallocate(gpu_in_data);\n  sycl_device.deallocate(gpu_out_data);\n}\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_last_dim_reductions_sum_sycl(\n    const Eigen::SyclDevice& sycl_device) {\n  IndexType dim_x = 64;\n  IndexType dim_y = 1;\n  IndexType dim_z = 32;\n\n  array<IndexType, 3> tensorRange = {{dim_x, dim_y, dim_z}};\n  Eigen::array<IndexType, 1> red_axis;\n  red_axis[0] = 2;\n  array<IndexType, 2> reduced_tensorRange = {{dim_x, dim_y}};\n\n  Tensor<DataType, 3, DataLayout, IndexType> in(tensorRange);\n  Tensor<DataType, 2, DataLayout, IndexType> redux(reduced_tensorRange);\n  Tensor<DataType, 2, DataLayout, IndexType> redux_gpu(reduced_tensorRange);\n\n  in.setRandom();\n\n  redux = in.sum(red_axis);\n\n  DataType* gpu_in_data = static_cast<DataType*>(\n      sycl_device.allocate(in.dimensions().TotalSize() * sizeof(DataType)));\n  DataType* gpu_out_data = static_cast<DataType*>(sycl_device.allocate(\n      redux_gpu.dimensions().TotalSize() * sizeof(DataType)));\n\n  TensorMap<Tensor<DataType, 3, DataLayout, IndexType>> in_gpu(gpu_in_data,\n                                                               tensorRange);\n  TensorMap<Tensor<DataType, 2, DataLayout, IndexType>> out_gpu(\n      gpu_out_data, reduced_tensorRange);\n\n  sycl_device.memcpyHostToDevice(\n      gpu_in_data, in.data(), (in.dimensions().TotalSize()) * sizeof(DataType));\n  out_gpu.device(sycl_device) = in_gpu.sum(red_axis);\n  sycl_device.memcpyDeviceToHost(\n      redux_gpu.data(), gpu_out_data,\n      redux_gpu.dimensions().TotalSize() * sizeof(DataType));\n  // Check that the CPU and GPU reductions return the same result.\n  for (IndexType j = 0; j < reduced_tensorRange[0]; j++)\n    for (IndexType k = 0; k < reduced_tensorRange[1]; k++)\n      VERIFY_IS_APPROX(redux_gpu(j, k), redux(j, k));\n\n  sycl_device.deallocate(gpu_in_data);\n  sycl_device.deallocate(gpu_out_data);\n}\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_last_reductions_sum_sycl(\n    const Eigen::SyclDevice& sycl_device) {\n  auto tensorRange = Sizes<64, 32>(64, 32);\n  // auto red_axis =  Sizes<0,1>(0,1);\n  Eigen::IndexList<Eigen::type2index<1>> red_axis;\n  auto reduced_tensorRange = Sizes<64>(64);\n  TensorFixedSize<DataType, Sizes<64, 32>, DataLayout> in_fix;\n  TensorFixedSize<DataType, Sizes<64>, DataLayout> redux_fix;\n  TensorFixedSize<DataType, Sizes<64>, DataLayout> redux_gpu_fix;\n\n  in_fix.setRandom();\n\n  redux_fix = in_fix.sum(red_axis);\n\n  DataType* gpu_in_data = static_cast<DataType*>(\n      sycl_device.allocate(in_fix.dimensions().TotalSize() * sizeof(DataType)));\n  DataType* gpu_out_data = static_cast<DataType*>(sycl_device.allocate(\n      redux_gpu_fix.dimensions().TotalSize() * sizeof(DataType)));\n\n  TensorMap<TensorFixedSize<DataType, Sizes<64, 32>, DataLayout>> in_gpu_fix(\n      gpu_in_data, tensorRange);\n  TensorMap<TensorFixedSize<DataType, Sizes<64>, DataLayout>> out_gpu_fix(\n      gpu_out_data, reduced_tensorRange);\n\n  sycl_device.memcpyHostToDevice(\n      gpu_in_data, in_fix.data(),\n      (in_fix.dimensions().TotalSize()) * sizeof(DataType));\n  out_gpu_fix.device(sycl_device) = in_gpu_fix.sum(red_axis);\n  sycl_device.memcpyDeviceToHost(\n      redux_gpu_fix.data(), gpu_out_data,\n      redux_gpu_fix.dimensions().TotalSize() * sizeof(DataType));\n  // Check that the CPU and GPU reductions return the same result.\n  for (IndexType j = 0; j < reduced_tensorRange[0]; j++) {\n    VERIFY_IS_APPROX(redux_gpu_fix(j), redux_fix(j));\n  }\n\n  sycl_device.deallocate(gpu_in_data);\n  sycl_device.deallocate(gpu_out_data);\n}\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_last_reductions_mean_sycl(\n    const Eigen::SyclDevice& sycl_device) {\n  auto tensorRange = Sizes<64, 32>(64, 32);\n  Eigen::IndexList<Eigen::type2index<1>> red_axis;\n  auto reduced_tensorRange = Sizes<64>(64);\n  TensorFixedSize<DataType, Sizes<64, 32>, DataLayout> in_fix;\n  TensorFixedSize<DataType, Sizes<64>, DataLayout> redux_fix;\n  TensorFixedSize<DataType, Sizes<64>, DataLayout> redux_gpu_fix;\n\n  in_fix.setRandom();\n  redux_fix = in_fix.mean(red_axis);\n\n  DataType* gpu_in_data = static_cast<DataType*>(\n      sycl_device.allocate(in_fix.dimensions().TotalSize() * sizeof(DataType)));\n  DataType* gpu_out_data = static_cast<DataType*>(sycl_device.allocate(\n      redux_gpu_fix.dimensions().TotalSize() * sizeof(DataType)));\n\n  TensorMap<TensorFixedSize<DataType, Sizes<64, 32>, DataLayout>> in_gpu_fix(\n      gpu_in_data, tensorRange);\n  TensorMap<TensorFixedSize<DataType, Sizes<64>, DataLayout>> out_gpu_fix(\n      gpu_out_data, reduced_tensorRange);\n\n  sycl_device.memcpyHostToDevice(\n      gpu_in_data, in_fix.data(),\n      (in_fix.dimensions().TotalSize()) * sizeof(DataType));\n  out_gpu_fix.device(sycl_device) = in_gpu_fix.mean(red_axis);\n  sycl_device.memcpyDeviceToHost(\n      redux_gpu_fix.data(), gpu_out_data,\n      redux_gpu_fix.dimensions().TotalSize() * sizeof(DataType));\n  sycl_device.synchronize();\n  // Check that the CPU and GPU reductions return the same result.\n  for (IndexType j = 0; j < reduced_tensorRange[0]; j++) {\n    VERIFY_IS_APPROX(redux_gpu_fix(j), redux_fix(j));\n  }\n\n  sycl_device.deallocate(gpu_in_data);\n  sycl_device.deallocate(gpu_out_data);\n}\n\n// SYCL supports a generic case of reduction where the accumulator is a\n// different type than the input data This is an example on how to get if a\n// Tensor contains nan and/or inf in one reduction\ntemplate <typename InT, typename OutT>\nstruct CustomReducer {\n  static const bool PacketAccess = false;\n  static const bool IsStateful = false;\n\n  static constexpr OutT InfBit = 1;\n  static constexpr OutT NanBit = 2;\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void reduce(const InT x,\n                                                    OutT* accum) const {\n    if (Eigen::numext::isinf(x))\n      *accum |= InfBit;\n    else if (Eigen::numext::isnan(x))\n      *accum |= NanBit;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void reduce(const OutT x,\n                                                    OutT* accum) const {\n    *accum |= x;\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE OutT initialize() const {\n    return OutT(0);\n  }\n\n  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE OutT finalize(const OutT accum) const {\n    return accum;\n  }\n};\n\ntemplate <typename DataType, typename AccumType, int DataLayout,\n          typename IndexType>\nstatic void test_full_reductions_custom_sycl(\n    const Eigen::SyclDevice& sycl_device) {\n  constexpr IndexType InSize = 64;\n  auto tensorRange = Sizes<InSize>(InSize);\n  Eigen::IndexList<Eigen::type2index<0>> dims;\n  auto reduced_tensorRange = Sizes<>();\n  TensorFixedSize<DataType, Sizes<InSize>, DataLayout> in_fix;\n  TensorFixedSize<AccumType, Sizes<>, DataLayout> redux_gpu_fix;\n\n  CustomReducer<DataType, AccumType> reducer;\n\n  in_fix.setRandom();\n\n  size_t in_size_bytes = in_fix.dimensions().TotalSize() * sizeof(DataType);\n  DataType* gpu_in_data =\n      static_cast<DataType*>(sycl_device.allocate(in_size_bytes));\n  AccumType* gpu_out_data =\n      static_cast<AccumType*>(sycl_device.allocate(sizeof(AccumType)));\n\n  TensorMap<TensorFixedSize<DataType, Sizes<InSize>, DataLayout>> in_gpu_fix(\n      gpu_in_data, tensorRange);\n  TensorMap<TensorFixedSize<AccumType, Sizes<>, DataLayout>> out_gpu_fix(\n      gpu_out_data, reduced_tensorRange);\n\n  sycl_device.memcpyHostToDevice(gpu_in_data, in_fix.data(), in_size_bytes);\n  out_gpu_fix.device(sycl_device) = in_gpu_fix.reduce(dims, reducer);\n  sycl_device.memcpyDeviceToHost(redux_gpu_fix.data(), gpu_out_data,\n                                 sizeof(AccumType));\n  VERIFY_IS_EQUAL(redux_gpu_fix(0), AccumType(0));\n\n  sycl_device.deallocate(gpu_in_data);\n  sycl_device.deallocate(gpu_out_data);\n}\n\ntemplate <typename DataType, typename Dev>\nvoid sycl_reduction_test_full_per_device(const Dev& sycl_device) {\n  test_full_reductions_sum_sycl<DataType, RowMajor, int64_t>(sycl_device);\n  test_full_reductions_sum_sycl<DataType, ColMajor, int64_t>(sycl_device);\n  test_full_reductions_min_sycl<DataType, ColMajor, int64_t>(sycl_device);\n  test_full_reductions_min_sycl<DataType, RowMajor, int64_t>(sycl_device);\n  test_full_reductions_max_sycl<DataType, ColMajor, int64_t>(sycl_device);\n  test_full_reductions_max_sycl<DataType, RowMajor, int64_t>(sycl_device);\n\n  test_full_reductions_mean_sycl<DataType, ColMajor, int64_t>(sycl_device);\n  test_full_reductions_mean_sycl<DataType, RowMajor, int64_t>(sycl_device);\n  test_full_reductions_custom_sycl<DataType, int, RowMajor, int64_t>(\n      sycl_device);\n  test_full_reductions_custom_sycl<DataType, int, ColMajor, int64_t>(\n      sycl_device);\n  sycl_device.synchronize();\n}\n\ntemplate <typename DataType, typename Dev>\nvoid sycl_reduction_full_offset_per_device(const Dev& sycl_device) {\n  test_full_reductions_sum_with_offset_sycl<DataType, RowMajor, int64_t>(\n      sycl_device);\n  test_full_reductions_sum_with_offset_sycl<DataType, ColMajor, int64_t>(\n      sycl_device);\n  test_full_reductions_min_with_offset_sycl<DataType, RowMajor, int64_t>(\n      sycl_device);\n  test_full_reductions_min_with_offset_sycl<DataType, ColMajor, int64_t>(\n      sycl_device);\n  test_full_reductions_max_with_offset_sycl<DataType, ColMajor, int64_t>(\n      sycl_device);\n  test_full_reductions_max_with_offset_sycl<DataType, RowMajor, int64_t>(\n      sycl_device);\n  test_full_reductions_mean_with_offset_sycl<DataType, RowMajor, int64_t>(\n      sycl_device);\n  test_full_reductions_mean_with_offset_sycl<DataType, ColMajor, int64_t>(\n      sycl_device);\n  test_full_reductions_mean_with_odd_offset_sycl<DataType, RowMajor, int64_t>(\n      sycl_device);\n  sycl_device.synchronize();\n}\n\ntemplate <typename DataType, typename Dev>\nvoid sycl_reduction_test_first_dim_per_device(const Dev& sycl_device) {\n  test_first_dim_reductions_sum_sycl<DataType, ColMajor, int64_t>(sycl_device,\n                                                                  4197, 4097);\n  test_first_dim_reductions_sum_sycl<DataType, RowMajor, int64_t>(sycl_device,\n                                                                  4197, 4097);\n  test_first_dim_reductions_sum_sycl<DataType, RowMajor, int64_t>(sycl_device,\n                                                                  129, 8);\n  test_first_dim_reductions_max_sycl<DataType, RowMajor, int64_t>(sycl_device);\n  test_first_dim_reductions_max_with_offset_sycl<DataType, RowMajor, int64_t>(\n      sycl_device);\n  sycl_device.synchronize();\n}\n\ntemplate <typename DataType, typename Dev>\nvoid sycl_reduction_test_last_dim_per_device(const Dev& sycl_device) {\n  test_last_dim_reductions_sum_sycl<DataType, RowMajor, int64_t>(sycl_device);\n  test_last_dim_reductions_max_with_offset_sycl<DataType, RowMajor, int64_t>(\n      sycl_device);\n  test_last_reductions_sum_sycl<DataType, ColMajor, int64_t>(sycl_device);\n  test_last_reductions_sum_sycl<DataType, RowMajor, int64_t>(sycl_device);\n  test_last_reductions_mean_sycl<DataType, ColMajor, int64_t>(sycl_device);\n  test_last_reductions_mean_sycl<DataType, RowMajor, int64_t>(sycl_device);\n  sycl_device.synchronize();\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_reduction_sycl) {\n  for (const auto& device : Eigen::get_sycl_supported_devices()) {\n    std::cout << \"Running on \"\n              << device.template get_info<cl::sycl::info::device::name>()\n              << std::endl;\n    QueueInterface queueInterface(device);\n    auto sycl_device = Eigen::SyclDevice(&queueInterface);\n    CALL_SUBTEST_1(sycl_reduction_test_full_per_device<float>(sycl_device));\n    CALL_SUBTEST_2(sycl_reduction_full_offset_per_device<float>(sycl_device));\n    CALL_SUBTEST_3(\n        sycl_reduction_test_first_dim_per_device<float>(sycl_device));\n    CALL_SUBTEST_4(sycl_reduction_test_last_dim_per_device<float>(sycl_device));\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_ref.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\nusing Eigen::RowMajor;\n\nstatic void test_simple_lvalue_ref()\n{\n  Tensor<int, 1> input(6);\n  input.setRandom();\n\n  TensorRef<Tensor<int, 1>> ref3(input);\n  TensorRef<Tensor<int, 1>> ref4 = input;\n\n  VERIFY_IS_EQUAL(ref3.data(), input.data());\n  VERIFY_IS_EQUAL(ref4.data(), input.data());\n\n  for (int i = 0; i < 6; ++i) {\n    VERIFY_IS_EQUAL(ref3(i), input(i));\n    VERIFY_IS_EQUAL(ref4(i), input(i));\n  }\n\n  for (int i = 0; i < 6; ++i) {\n    ref3.coeffRef(i) = i;\n  }\n  for (int i = 0; i < 6; ++i) {\n    VERIFY_IS_EQUAL(input(i), i);\n  }\n  for (int i = 0; i < 6; ++i) {\n    ref4.coeffRef(i) = -i * 2;\n  }\n  for (int i = 0; i < 6; ++i) {\n    VERIFY_IS_EQUAL(input(i), -i*2);\n  }\n}\n\n\nstatic void test_simple_rvalue_ref()\n{\n  Tensor<int, 1> input1(6);\n  input1.setRandom();\n  Tensor<int, 1> input2(6);\n  input2.setRandom();\n\n  TensorRef<Tensor<int, 1>> ref3(input1 + input2);\n  TensorRef<Tensor<int, 1>> ref4 = input1 + input2;\n\n  VERIFY_IS_NOT_EQUAL(ref3.data(), input1.data());\n  VERIFY_IS_NOT_EQUAL(ref4.data(), input1.data());\n  VERIFY_IS_NOT_EQUAL(ref3.data(), input2.data());\n  VERIFY_IS_NOT_EQUAL(ref4.data(), input2.data());\n\n  for (int i = 0; i < 6; ++i) {\n    VERIFY_IS_EQUAL(ref3(i), input1(i) + input2(i));\n    VERIFY_IS_EQUAL(ref4(i), input1(i) + input2(i));\n  }\n}\n\n\nstatic void test_multiple_dims()\n{\n  Tensor<float, 3> input(3,5,7);\n  input.setRandom();\n\n  TensorRef<Tensor<float, 3>> ref(input);\n  VERIFY_IS_EQUAL(ref.data(), input.data());\n  VERIFY_IS_EQUAL(ref.dimension(0), 3);\n  VERIFY_IS_EQUAL(ref.dimension(1), 5);\n  VERIFY_IS_EQUAL(ref.dimension(2), 7);\n\n  for (int i = 0; i < 3; ++i) {\n    for (int j = 0; j < 5; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        VERIFY_IS_EQUAL(ref(i,j,k), input(i,j,k));\n      }\n    }\n  }\n}\n\n\nstatic void test_slice()\n{\n  Tensor<float, 5> tensor(2,3,5,7,11);\n  tensor.setRandom();\n\n  Eigen::DSizes<ptrdiff_t, 5> indices(1,2,3,4,5);\n  Eigen::DSizes<ptrdiff_t, 5> sizes(1,1,1,1,1);\n  TensorRef<Tensor<float, 5>> slice = tensor.slice(indices, sizes);\n  VERIFY_IS_EQUAL(slice(0,0,0,0,0), tensor(1,2,3,4,5));\n\n  Eigen::DSizes<ptrdiff_t, 5> indices2(1,1,3,4,5);\n  Eigen::DSizes<ptrdiff_t, 5> sizes2(1,1,2,2,3);\n  slice = tensor.slice(indices2, sizes2);\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 2; ++j) {\n      for (int k = 0; k < 3; ++k) {\n        VERIFY_IS_EQUAL(slice(0,0,i,j,k), tensor(1,1,3+i,4+j,5+k));\n      }\n    }\n  }\n\n  Eigen::DSizes<ptrdiff_t, 5> indices3(0,0,0,0,0);\n  Eigen::DSizes<ptrdiff_t, 5> sizes3(2,3,1,1,1);\n  slice = tensor.slice(indices3, sizes3);\n  VERIFY_IS_EQUAL(slice.data(), tensor.data());\n}\n\n\nstatic void test_ref_of_ref()\n{\n  Tensor<float, 3> input(3,5,7);\n  input.setRandom();\n\n  TensorRef<Tensor<float, 3>> ref(input);\n  TensorRef<Tensor<float, 3>> ref_of_ref(ref);\n  TensorRef<Tensor<float, 3>> ref_of_ref2;\n  ref_of_ref2 = ref;\n\n  VERIFY_IS_EQUAL(ref_of_ref.data(), input.data());\n  VERIFY_IS_EQUAL(ref_of_ref.dimension(0), 3);\n  VERIFY_IS_EQUAL(ref_of_ref.dimension(1), 5);\n  VERIFY_IS_EQUAL(ref_of_ref.dimension(2), 7);\n\n  VERIFY_IS_EQUAL(ref_of_ref2.data(), input.data());\n  VERIFY_IS_EQUAL(ref_of_ref2.dimension(0), 3);\n  VERIFY_IS_EQUAL(ref_of_ref2.dimension(1), 5);\n  VERIFY_IS_EQUAL(ref_of_ref2.dimension(2), 7);\n\n  for (int i = 0; i < 3; ++i) {\n    for (int j = 0; j < 5; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        VERIFY_IS_EQUAL(ref_of_ref(i,j,k), input(i,j,k));\n        VERIFY_IS_EQUAL(ref_of_ref2(i,j,k), input(i,j,k));\n     }\n    }\n  }\n}\n\n\nstatic void test_ref_in_expr()\n{\n  Tensor<float, 3> input(3,5,7);\n  input.setRandom();\n  TensorRef<Tensor<float, 3>> input_ref(input);\n\n  Tensor<float, 3> result(3,5,7);\n  result.setRandom();\n  TensorRef<Tensor<float, 3>> result_ref(result);\n\n  Tensor<float, 3> bias(3,5,7);\n  bias.setRandom();\n\n  result_ref = input_ref + bias;\n  for (int i = 0; i < 3; ++i) {\n    for (int j = 0; j < 5; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        VERIFY_IS_EQUAL(result_ref(i,j,k), input(i,j,k) + bias(i,j,k));\n        VERIFY_IS_NOT_EQUAL(result(i,j,k), input(i,j,k) + bias(i,j,k));\n      }\n    }\n  }\n\n  result = result_ref;\n  for (int i = 0; i < 3; ++i) {\n    for (int j = 0; j < 5; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        VERIFY_IS_EQUAL(result(i,j,k), input(i,j,k) + bias(i,j,k));\n      }\n    }\n  }\n}\n\n\nstatic void test_coeff_ref()\n{\n  Tensor<float, 5> tensor(2,3,5,7,11);\n  tensor.setRandom();\n  Tensor<float, 5> original = tensor;\n\n  TensorRef<Tensor<float, 4>> slice = tensor.chip(7, 4);\n  slice.coeffRef(0, 0, 0, 0) = 1.0f;\n  slice.coeffRef(1, 0, 0, 0) += 2.0f;\n\n  VERIFY_IS_EQUAL(tensor(0,0,0,0,7), 1.0f);\n  VERIFY_IS_EQUAL(tensor(1,0,0,0,7), original(1,0,0,0,7) + 2.0f);\n}\n\n\nstatic void test_nested_ops_with_ref()\n{\n  Tensor<float, 4> t(2, 3, 5, 7);\n  t.setRandom();\n  TensorMap<Tensor<const float, 4> > m(t.data(), 2, 3, 5, 7);\n  array<std::pair<ptrdiff_t, ptrdiff_t>, 4> paddings;\n  paddings[0] = std::make_pair(0, 0);\n  paddings[1] = std::make_pair(2, 1);\n  paddings[2] = std::make_pair(3, 4);\n  paddings[3] = std::make_pair(0, 0);\n  DSizes<Eigen::DenseIndex, 4> shuffle_dims(0, 1, 2, 3);\n  TensorRef<Tensor<const float, 4> > ref(m.pad(paddings));\n  array<std::pair<ptrdiff_t, ptrdiff_t>, 4> trivial;\n  trivial[0] = std::make_pair(0, 0);\n  trivial[1] = std::make_pair(0, 0);\n  trivial[2] = std::make_pair(0, 0);\n  trivial[3] = std::make_pair(0, 0);\n  Tensor<float, 4> padded = ref.shuffle(shuffle_dims).pad(trivial);\n  VERIFY_IS_EQUAL(padded.dimension(0), 2+0);\n  VERIFY_IS_EQUAL(padded.dimension(1), 3+3);\n  VERIFY_IS_EQUAL(padded.dimension(2), 5+7);\n  VERIFY_IS_EQUAL(padded.dimension(3), 7+0);\n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 6; ++j) {\n      for (int k = 0; k < 12; ++k) {\n        for (int l = 0; l < 7; ++l) {\n          if (j >= 2 && j < 5 && k >= 3 && k < 8) {\n            VERIFY_IS_EQUAL(padded(i,j,k,l), t(i,j-2,k-3,l));\n          } else {\n            VERIFY_IS_EQUAL(padded(i,j,k,l), 0.0f);\n          }\n        }\n      }\n    }\n  }\n}\n\n\nEIGEN_DECLARE_TEST(cxx11_tensor_ref)\n{\n  CALL_SUBTEST(test_simple_lvalue_ref());\n  CALL_SUBTEST(test_simple_rvalue_ref());\n  CALL_SUBTEST(test_multiple_dims());\n  CALL_SUBTEST(test_slice());\n  CALL_SUBTEST(test_ref_of_ref());\n  CALL_SUBTEST(test_ref_in_expr());\n  CALL_SUBTEST(test_coeff_ref());\n  CALL_SUBTEST(test_nested_ops_with_ref());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_reverse.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Navdeep Jaitly <ndjaitly@google.com and\n//                    Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\nusing Eigen::array;\n\ntemplate <int DataLayout>\nstatic void test_simple_reverse()\n{\n  Tensor<float, 4, DataLayout> tensor(2,3,5,7);\n  tensor.setRandom();\n\n  array<bool, 4> dim_rev;\n  dim_rev[0] = false;\n  dim_rev[1] = true;\n  dim_rev[2] = true;\n  dim_rev[3] = false;\n\n  Tensor<float, 4, DataLayout> reversed_tensor;\n  reversed_tensor = tensor.reverse(dim_rev);\n\n  VERIFY_IS_EQUAL(reversed_tensor.dimension(0), 2);\n  VERIFY_IS_EQUAL(reversed_tensor.dimension(1), 3);\n  VERIFY_IS_EQUAL(reversed_tensor.dimension(2), 5);\n  VERIFY_IS_EQUAL(reversed_tensor.dimension(3), 7);\n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 5; ++k) {\n        for (int l = 0; l < 7; ++l) {\n          VERIFY_IS_EQUAL(tensor(i,j,k,l), reversed_tensor(i,2-j,4-k,l));\n        }\n      }\n    }\n  }\n\n  dim_rev[0] = true;\n  dim_rev[1] = false;\n  dim_rev[2] = false;\n  dim_rev[3] = false;\n\n  reversed_tensor = tensor.reverse(dim_rev);\n\n  VERIFY_IS_EQUAL(reversed_tensor.dimension(0), 2);\n  VERIFY_IS_EQUAL(reversed_tensor.dimension(1), 3);\n  VERIFY_IS_EQUAL(reversed_tensor.dimension(2), 5);\n  VERIFY_IS_EQUAL(reversed_tensor.dimension(3), 7);\n\n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 5; ++k) {\n        for (int l = 0; l < 7; ++l) {\n          VERIFY_IS_EQUAL(tensor(i,j,k,l), reversed_tensor(1-i,j,k,l));\n        }\n      }\n    }\n  }\n\n  dim_rev[0] = true;\n  dim_rev[1] = false;\n  dim_rev[2] = false;\n  dim_rev[3] = true;\n\n  reversed_tensor = tensor.reverse(dim_rev);\n\n  VERIFY_IS_EQUAL(reversed_tensor.dimension(0), 2);\n  VERIFY_IS_EQUAL(reversed_tensor.dimension(1), 3);\n  VERIFY_IS_EQUAL(reversed_tensor.dimension(2), 5);\n  VERIFY_IS_EQUAL(reversed_tensor.dimension(3), 7);\n\n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 5; ++k) {\n        for (int l = 0; l < 7; ++l) {\n          VERIFY_IS_EQUAL(tensor(i,j,k,l), reversed_tensor(1-i,j,k,6-l));\n        }\n      }\n    }\n  }\n}\n\n\ntemplate <int DataLayout>\nstatic void test_expr_reverse(bool LValue)\n{\n  Tensor<float, 4, DataLayout> tensor(2,3,5,7);\n  tensor.setRandom();\n\n  array<bool, 4> dim_rev;\n  dim_rev[0] = false;\n  dim_rev[1] = true;\n  dim_rev[2] = false;\n  dim_rev[3] = true;\n\n  Tensor<float, 4, DataLayout> expected(2, 3, 5, 7);\n  if (LValue) {\n    expected.reverse(dim_rev) = tensor;\n  } else {\n    expected = tensor.reverse(dim_rev);\n  }\n\n  Tensor<float, 4, DataLayout> result(2,3,5,7);\n\n  array<ptrdiff_t, 4> src_slice_dim;\n  src_slice_dim[0] = 2;\n  src_slice_dim[1] = 3;\n  src_slice_dim[2] = 1;\n  src_slice_dim[3] = 7;\n  array<ptrdiff_t, 4> src_slice_start;\n  src_slice_start[0] = 0;\n  src_slice_start[1] = 0;\n  src_slice_start[2] = 0;\n  src_slice_start[3] = 0;\n  array<ptrdiff_t, 4> dst_slice_dim = src_slice_dim;\n  array<ptrdiff_t, 4> dst_slice_start = src_slice_start;\n\n  for (int i = 0; i < 5; ++i) {\n    if (LValue) {\n      result.slice(dst_slice_start, dst_slice_dim).reverse(dim_rev) =\n          tensor.slice(src_slice_start, src_slice_dim);\n    } else {\n      result.slice(dst_slice_start, dst_slice_dim) =\n          tensor.slice(src_slice_start, src_slice_dim).reverse(dim_rev);\n    }\n    src_slice_start[2] += 1;\n    dst_slice_start[2] += 1;\n  }\n\n  VERIFY_IS_EQUAL(result.dimension(0), 2);\n  VERIFY_IS_EQUAL(result.dimension(1), 3);\n  VERIFY_IS_EQUAL(result.dimension(2), 5);\n  VERIFY_IS_EQUAL(result.dimension(3), 7);\n\n  for (int i = 0; i < expected.dimension(0); ++i) {\n    for (int j = 0; j < expected.dimension(1); ++j) {\n      for (int k = 0; k < expected.dimension(2); ++k) {\n        for (int l = 0; l < expected.dimension(3); ++l) {\n          VERIFY_IS_EQUAL(result(i,j,k,l), expected(i,j,k,l));\n        }\n      }\n    }\n  }\n\n  dst_slice_start[2] = 0;\n  result.setRandom();\n  for (int i = 0; i < 5; ++i) {\n     if (LValue) {\n       result.slice(dst_slice_start, dst_slice_dim).reverse(dim_rev) =\n           tensor.slice(dst_slice_start, dst_slice_dim);\n     } else {\n       result.slice(dst_slice_start, dst_slice_dim) =\n           tensor.reverse(dim_rev).slice(dst_slice_start, dst_slice_dim);\n     }\n    dst_slice_start[2] += 1;\n  }\n\n  for (int i = 0; i < expected.dimension(0); ++i) {\n    for (int j = 0; j < expected.dimension(1); ++j) {\n      for (int k = 0; k < expected.dimension(2); ++k) {\n        for (int l = 0; l < expected.dimension(3); ++l) {\n          VERIFY_IS_EQUAL(result(i,j,k,l), expected(i,j,k,l));\n        }\n      }\n    }\n  }\n}\n\n\nEIGEN_DECLARE_TEST(cxx11_tensor_reverse)\n{\n  CALL_SUBTEST(test_simple_reverse<ColMajor>());\n  CALL_SUBTEST(test_simple_reverse<RowMajor>());\n  CALL_SUBTEST(test_expr_reverse<ColMajor>(true));\n  CALL_SUBTEST(test_expr_reverse<RowMajor>(true));\n  CALL_SUBTEST(test_expr_reverse<ColMajor>(false));\n  CALL_SUBTEST(test_expr_reverse<RowMajor>(false));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_reverse_sycl.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015\n// Mehdi Goli    Codeplay Software Ltd.\n// Ralph Potter  Codeplay Software Ltd.\n// Luke Iwanski  Codeplay Software Ltd.\n// Contact: <eigen@codeplay.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_TEST_NO_LONGDOUBLE\n#define EIGEN_TEST_NO_COMPLEX\n\n#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int64_t\n#define EIGEN_USE_SYCL\n\n#include \"main.h\"\n#include <unsupported/Eigen/CXX11/Tensor>\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_simple_reverse(const Eigen::SyclDevice& sycl_device) {\n  IndexType dim1 = 2;\n  IndexType dim2 = 3;\n  IndexType dim3 = 5;\n  IndexType dim4 = 7;\n\n  array<IndexType, 4> tensorRange = {{dim1, dim2, dim3, dim4}};\n  Tensor<DataType, 4, DataLayout, IndexType> tensor(tensorRange);\n  Tensor<DataType, 4, DataLayout, IndexType> reversed_tensor(tensorRange);\n  tensor.setRandom();\n\n  array<bool, 4> dim_rev;\n  dim_rev[0] = false;\n  dim_rev[1] = true;\n  dim_rev[2] = true;\n  dim_rev[3] = false;\n\n  DataType* gpu_in_data = static_cast<DataType*>(\n      sycl_device.allocate(tensor.dimensions().TotalSize() * sizeof(DataType)));\n  DataType* gpu_out_data = static_cast<DataType*>(sycl_device.allocate(\n      reversed_tensor.dimensions().TotalSize() * sizeof(DataType)));\n\n  TensorMap<Tensor<DataType, 4, DataLayout, IndexType> > in_gpu(gpu_in_data,\n                                                                tensorRange);\n  TensorMap<Tensor<DataType, 4, DataLayout, IndexType> > out_gpu(gpu_out_data,\n                                                                 tensorRange);\n\n  sycl_device.memcpyHostToDevice(\n      gpu_in_data, tensor.data(),\n      (tensor.dimensions().TotalSize()) * sizeof(DataType));\n  out_gpu.device(sycl_device) = in_gpu.reverse(dim_rev);\n  sycl_device.memcpyDeviceToHost(\n      reversed_tensor.data(), gpu_out_data,\n      reversed_tensor.dimensions().TotalSize() * sizeof(DataType));\n  // Check that the CPU and GPU reductions return the same result.\n  for (IndexType i = 0; i < 2; ++i) {\n    for (IndexType j = 0; j < 3; ++j) {\n      for (IndexType k = 0; k < 5; ++k) {\n        for (IndexType l = 0; l < 7; ++l) {\n          VERIFY_IS_EQUAL(tensor(i, j, k, l),\n                          reversed_tensor(i, 2 - j, 4 - k, l));\n        }\n      }\n    }\n  }\n  dim_rev[0] = true;\n  dim_rev[1] = false;\n  dim_rev[2] = false;\n  dim_rev[3] = false;\n\n  out_gpu.device(sycl_device) = in_gpu.reverse(dim_rev);\n  sycl_device.memcpyDeviceToHost(\n      reversed_tensor.data(), gpu_out_data,\n      reversed_tensor.dimensions().TotalSize() * sizeof(DataType));\n\n  for (IndexType i = 0; i < 2; ++i) {\n    for (IndexType j = 0; j < 3; ++j) {\n      for (IndexType k = 0; k < 5; ++k) {\n        for (IndexType l = 0; l < 7; ++l) {\n          VERIFY_IS_EQUAL(tensor(i, j, k, l), reversed_tensor(1 - i, j, k, l));\n        }\n      }\n    }\n  }\n\n  dim_rev[0] = true;\n  dim_rev[1] = false;\n  dim_rev[2] = false;\n  dim_rev[3] = true;\n  out_gpu.device(sycl_device) = in_gpu.reverse(dim_rev);\n  sycl_device.memcpyDeviceToHost(\n      reversed_tensor.data(), gpu_out_data,\n      reversed_tensor.dimensions().TotalSize() * sizeof(DataType));\n\n  for (IndexType i = 0; i < 2; ++i) {\n    for (IndexType j = 0; j < 3; ++j) {\n      for (IndexType k = 0; k < 5; ++k) {\n        for (IndexType l = 0; l < 7; ++l) {\n          VERIFY_IS_EQUAL(tensor(i, j, k, l),\n                          reversed_tensor(1 - i, j, k, 6 - l));\n        }\n      }\n    }\n  }\n\n  sycl_device.deallocate(gpu_in_data);\n  sycl_device.deallocate(gpu_out_data);\n}\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_expr_reverse(const Eigen::SyclDevice& sycl_device,\n                              bool LValue) {\n  IndexType dim1 = 2;\n  IndexType dim2 = 3;\n  IndexType dim3 = 5;\n  IndexType dim4 = 7;\n\n  array<IndexType, 4> tensorRange = {{dim1, dim2, dim3, dim4}};\n  Tensor<DataType, 4, DataLayout, IndexType> tensor(tensorRange);\n  Tensor<DataType, 4, DataLayout, IndexType> expected(tensorRange);\n  Tensor<DataType, 4, DataLayout, IndexType> result(tensorRange);\n  tensor.setRandom();\n\n  array<bool, 4> dim_rev;\n  dim_rev[0] = false;\n  dim_rev[1] = true;\n  dim_rev[2] = false;\n  dim_rev[3] = true;\n\n  DataType* gpu_in_data = static_cast<DataType*>(\n      sycl_device.allocate(tensor.dimensions().TotalSize() * sizeof(DataType)));\n  DataType* gpu_out_data_expected = static_cast<DataType*>(sycl_device.allocate(\n      expected.dimensions().TotalSize() * sizeof(DataType)));\n  DataType* gpu_out_data_result = static_cast<DataType*>(\n      sycl_device.allocate(result.dimensions().TotalSize() * sizeof(DataType)));\n\n  TensorMap<Tensor<DataType, 4, DataLayout, IndexType> > in_gpu(gpu_in_data,\n                                                                tensorRange);\n  TensorMap<Tensor<DataType, 4, DataLayout, IndexType> > out_gpu_expected(\n      gpu_out_data_expected, tensorRange);\n  TensorMap<Tensor<DataType, 4, DataLayout, IndexType> > out_gpu_result(\n      gpu_out_data_result, tensorRange);\n\n  sycl_device.memcpyHostToDevice(\n      gpu_in_data, tensor.data(),\n      (tensor.dimensions().TotalSize()) * sizeof(DataType));\n\n  if (LValue) {\n    out_gpu_expected.reverse(dim_rev).device(sycl_device) = in_gpu;\n  } else {\n    out_gpu_expected.device(sycl_device) = in_gpu.reverse(dim_rev);\n  }\n  sycl_device.memcpyDeviceToHost(\n      expected.data(), gpu_out_data_expected,\n      expected.dimensions().TotalSize() * sizeof(DataType));\n\n  array<IndexType, 4> src_slice_dim;\n  src_slice_dim[0] = 2;\n  src_slice_dim[1] = 3;\n  src_slice_dim[2] = 1;\n  src_slice_dim[3] = 7;\n  array<IndexType, 4> src_slice_start;\n  src_slice_start[0] = 0;\n  src_slice_start[1] = 0;\n  src_slice_start[2] = 0;\n  src_slice_start[3] = 0;\n  array<IndexType, 4> dst_slice_dim = src_slice_dim;\n  array<IndexType, 4> dst_slice_start = src_slice_start;\n\n  for (IndexType i = 0; i < 5; ++i) {\n    if (LValue) {\n      out_gpu_result.slice(dst_slice_start, dst_slice_dim)\n          .reverse(dim_rev)\n          .device(sycl_device) = in_gpu.slice(src_slice_start, src_slice_dim);\n    } else {\n      out_gpu_result.slice(dst_slice_start, dst_slice_dim).device(sycl_device) =\n          in_gpu.slice(src_slice_start, src_slice_dim).reverse(dim_rev);\n    }\n    src_slice_start[2] += 1;\n    dst_slice_start[2] += 1;\n  }\n  sycl_device.memcpyDeviceToHost(\n      result.data(), gpu_out_data_result,\n      result.dimensions().TotalSize() * sizeof(DataType));\n\n  for (IndexType i = 0; i < expected.dimension(0); ++i) {\n    for (IndexType j = 0; j < expected.dimension(1); ++j) {\n      for (IndexType k = 0; k < expected.dimension(2); ++k) {\n        for (IndexType l = 0; l < expected.dimension(3); ++l) {\n          VERIFY_IS_EQUAL(result(i, j, k, l), expected(i, j, k, l));\n        }\n      }\n    }\n  }\n\n  dst_slice_start[2] = 0;\n  result.setRandom();\n  sycl_device.memcpyHostToDevice(\n      gpu_out_data_result, result.data(),\n      (result.dimensions().TotalSize()) * sizeof(DataType));\n  for (IndexType i = 0; i < 5; ++i) {\n    if (LValue) {\n      out_gpu_result.slice(dst_slice_start, dst_slice_dim)\n          .reverse(dim_rev)\n          .device(sycl_device) = in_gpu.slice(dst_slice_start, dst_slice_dim);\n    } else {\n      out_gpu_result.slice(dst_slice_start, dst_slice_dim).device(sycl_device) =\n          in_gpu.reverse(dim_rev).slice(dst_slice_start, dst_slice_dim);\n    }\n    dst_slice_start[2] += 1;\n  }\n  sycl_device.memcpyDeviceToHost(\n      result.data(), gpu_out_data_result,\n      result.dimensions().TotalSize() * sizeof(DataType));\n\n  for (IndexType i = 0; i < expected.dimension(0); ++i) {\n    for (IndexType j = 0; j < expected.dimension(1); ++j) {\n      for (IndexType k = 0; k < expected.dimension(2); ++k) {\n        for (IndexType l = 0; l < expected.dimension(3); ++l) {\n          VERIFY_IS_EQUAL(result(i, j, k, l), expected(i, j, k, l));\n        }\n      }\n    }\n  }\n}\n\ntemplate <typename DataType>\nvoid sycl_reverse_test_per_device(const cl::sycl::device& d) {\n  QueueInterface queueInterface(d);\n  auto sycl_device = Eigen::SyclDevice(&queueInterface);\n  test_simple_reverse<DataType, RowMajor, int64_t>(sycl_device);\n  test_simple_reverse<DataType, ColMajor, int64_t>(sycl_device);\n  test_expr_reverse<DataType, RowMajor, int64_t>(sycl_device, false);\n  test_expr_reverse<DataType, ColMajor, int64_t>(sycl_device, false);\n  test_expr_reverse<DataType, RowMajor, int64_t>(sycl_device, true);\n  test_expr_reverse<DataType, ColMajor, int64_t>(sycl_device, true);\n}\nEIGEN_DECLARE_TEST(cxx11_tensor_reverse_sycl) {\n  for (const auto& device : Eigen::get_sycl_supported_devices()) {\n    std::cout << \"Running on \"\n              << device.get_info<cl::sycl::info::device::name>() << std::endl;\n    CALL_SUBTEST_1(sycl_reverse_test_per_device<short>(device));\n    CALL_SUBTEST_2(sycl_reverse_test_per_device<int>(device));\n    CALL_SUBTEST_3(sycl_reverse_test_per_device<unsigned int>(device));\n#ifdef EIGEN_SYCL_DOUBLE_SUPPORT\n    CALL_SUBTEST_4(sycl_reverse_test_per_device<double>(device));\n#endif\n    CALL_SUBTEST_5(sycl_reverse_test_per_device<float>(device));\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_roundings.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\n\nstatic void test_float_rounding()\n{\n  Tensor<float, 2> ftensor(20,30);\n  ftensor = ftensor.random() * 100.f;\n\n  Tensor<float, 2> result = ftensor.round();\n\n  for (int i = 0; i < 20; ++i) {\n    for (int j = 0; j < 30; ++j) {\n      VERIFY_IS_EQUAL(result(i,j), numext::round(ftensor(i,j)));\n    }\n  }\n}\n\nstatic void test_float_flooring()\n{\n  Tensor<float, 2> ftensor(20,30);\n  ftensor = ftensor.random() * 100.f;\n\n  Tensor<float, 2> result = ftensor.floor();\n\n  for (int i = 0; i < 20; ++i) {\n    for (int j = 0; j < 30; ++j) {\n      VERIFY_IS_EQUAL(result(i,j), numext::floor(ftensor(i,j)));\n    }\n  }\n}\n\nstatic void test_float_ceiling()\n{\n  Tensor<float, 2> ftensor(20,30);\n  ftensor = ftensor.random() * 100.f;\n\n  Tensor<float, 2> result = ftensor.ceil();\n\n  for (int i = 0; i < 20; ++i) {\n    for (int j = 0; j < 30; ++j) {\n      VERIFY_IS_EQUAL(result(i,j), numext::ceil(ftensor(i,j)));\n    }\n  }\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_roundings)\n{\n   CALL_SUBTEST(test_float_rounding());\n   CALL_SUBTEST(test_float_ceiling());\n   CALL_SUBTEST(test_float_flooring());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_scan.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Igor Babuschkin <igor@babuschk.in>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <limits>\n#include <numeric>\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\n\ntemplate <int DataLayout, typename Type=float, bool Exclusive = false>\nstatic void test_1d_scan()\n{\n  int size = 50;\n  Tensor<Type, 1, DataLayout> tensor(size);\n  tensor.setRandom();\n  Tensor<Type, 1, DataLayout> result = tensor.cumsum(0, Exclusive);\n\n  VERIFY_IS_EQUAL(tensor.dimension(0), result.dimension(0));\n\n  float accum = 0;\n  for (int i = 0; i < size; i++) {\n    if (Exclusive) {\n      VERIFY_IS_EQUAL(result(i), accum);\n      accum += tensor(i);\n    } else {\n      accum += tensor(i);\n      VERIFY_IS_EQUAL(result(i), accum);\n    }\n  }\n\n  accum = 1;\n  result = tensor.cumprod(0, Exclusive);\n  for (int i = 0; i < size; i++) {\n    if (Exclusive) {\n      VERIFY_IS_EQUAL(result(i), accum);\n      accum *= tensor(i);\n    } else {\n      accum *= tensor(i);\n      VERIFY_IS_EQUAL(result(i), accum);\n    }\n  }\n}\n\ntemplate <int DataLayout, typename Type=float>\nstatic void test_4d_scan()\n{\n  int size = 5;\n  Tensor<Type, 4, DataLayout> tensor(size, size, size, size);\n  tensor.setRandom();\n\n  Tensor<Type, 4, DataLayout> result(size, size, size, size);\n\n  result = tensor.cumsum(0);\n  float accum = 0;\n  for (int i = 0; i < size; i++) {\n    accum += tensor(i, 1, 2, 3);\n    VERIFY_IS_EQUAL(result(i, 1, 2, 3), accum);\n  }\n  result = tensor.cumsum(1);\n  accum = 0;\n  for (int i = 0; i < size; i++) {\n    accum += tensor(1, i, 2, 3);\n    VERIFY_IS_EQUAL(result(1, i, 2, 3), accum);\n  }\n  result = tensor.cumsum(2);\n  accum = 0;\n  for (int i = 0; i < size; i++) {\n    accum += tensor(1, 2, i, 3);\n    VERIFY_IS_EQUAL(result(1, 2, i, 3), accum);\n  }\n  result = tensor.cumsum(3);\n  accum = 0;\n  for (int i = 0; i < size; i++) {\n    accum += tensor(1, 2, 3, i);\n    VERIFY_IS_EQUAL(result(1, 2, 3, i), accum);\n  }\n}\n\ntemplate <int DataLayout>\nstatic void test_tensor_maps() {\n  int inputs[20];\n  TensorMap<Tensor<int, 1, DataLayout> > tensor_map(inputs, 20);\n  tensor_map.setRandom();\n\n  Tensor<int, 1, DataLayout> result = tensor_map.cumsum(0);\n\n  int accum = 0;\n  for (int i = 0; i < 20; ++i) {\n    accum += tensor_map(i);\n    VERIFY_IS_EQUAL(result(i), accum);\n  }\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_scan) {\n  CALL_SUBTEST((test_1d_scan<ColMajor, float, true>()));\n  CALL_SUBTEST((test_1d_scan<ColMajor, float, false>()));\n  CALL_SUBTEST((test_1d_scan<RowMajor, float, true>()));\n  CALL_SUBTEST((test_1d_scan<RowMajor, float, false>()));\n  CALL_SUBTEST(test_4d_scan<ColMajor>());\n  CALL_SUBTEST(test_4d_scan<RowMajor>());\n  CALL_SUBTEST(test_tensor_maps<ColMajor>());\n  CALL_SUBTEST(test_tensor_maps<RowMajor>());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_scan_gpu.cu",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_TEST_NO_LONGDOUBLE\n#define EIGEN_TEST_NO_COMPLEX\n\n#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int\n#define EIGEN_USE_GPU\n\n#include \"main.h\"\n#include <unsupported/Eigen/CXX11/Tensor>\n\n#include <Eigen/CXX11/src/Tensor/TensorGpuHipCudaDefines.h>\n\nusing Eigen::Tensor;\ntypedef Tensor<float, 1>::DimensionPair DimPair;\n\ntemplate<int DataLayout>\nvoid test_gpu_cumsum(int m_size, int k_size, int n_size)\n{\n  std::cout << \"Testing for (\" << m_size << \",\" << k_size << \",\" << n_size << \")\" << std::endl;\n  Tensor<float, 3, DataLayout> t_input(m_size, k_size, n_size);\n  Tensor<float, 3, DataLayout> t_result(m_size, k_size, n_size);\n  Tensor<float, 3, DataLayout> t_result_gpu(m_size, k_size, n_size);\n\n  t_input.setRandom();\n\n  std::size_t t_input_bytes = t_input.size()  * sizeof(float);\n  std::size_t t_result_bytes = t_result.size() * sizeof(float);\n\n  float* d_t_input;\n  float* d_t_result;\n\n  gpuMalloc((void**)(&d_t_input), t_input_bytes);\n  gpuMalloc((void**)(&d_t_result), t_result_bytes);\n\n  gpuMemcpy(d_t_input, t_input.data(), t_input_bytes, gpuMemcpyHostToDevice);\n\n  Eigen::GpuStreamDevice stream;\n  Eigen::GpuDevice gpu_device(&stream);\n\n  Eigen::TensorMap<Eigen::Tensor<float, 3, DataLayout> >\n      gpu_t_input(d_t_input, Eigen::array<int, 3>(m_size, k_size, n_size));\n  Eigen::TensorMap<Eigen::Tensor<float, 3, DataLayout> >\n      gpu_t_result(d_t_result, Eigen::array<int, 3>(m_size, k_size, n_size));\n\n  gpu_t_result.device(gpu_device) = gpu_t_input.cumsum(1);\n  t_result = t_input.cumsum(1);\n\n  gpuMemcpy(t_result_gpu.data(), d_t_result, t_result_bytes, gpuMemcpyDeviceToHost);\n  for (DenseIndex i = 0; i < t_result.size(); i++) {\n    if (fabs(t_result(i) - t_result_gpu(i)) < 1e-4f) {\n      continue;\n    }\n    if (Eigen::internal::isApprox(t_result(i), t_result_gpu(i), 1e-4f)) {\n      continue;\n    }\n    std::cout << \"mismatch detected at index \" << i << \": \" << t_result(i)\n              << \" vs \" <<  t_result_gpu(i) << std::endl;\n    assert(false);\n  }\n\n  gpuFree((void*)d_t_input);\n  gpuFree((void*)d_t_result);\n}\n\n\nEIGEN_DECLARE_TEST(cxx11_tensor_scan_gpu)\n{\n  CALL_SUBTEST_1(test_gpu_cumsum<ColMajor>(128, 128, 128));\n  CALL_SUBTEST_2(test_gpu_cumsum<RowMajor>(128, 128, 128));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_scan_sycl.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016\n// Mehdi Goli    Codeplay Software Ltd.\n// Ralph Potter  Codeplay Software Ltd.\n// Luke Iwanski  Codeplay Software Ltd.\n// Contact: <eigen@codeplay.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_TEST_NO_LONGDOUBLE\n#define EIGEN_TEST_NO_COMPLEX\n#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int64_t\n#define EIGEN_USE_SYCL\n\n#include \"main.h\"\n#include <unsupported/Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\ntypedef Tensor<float, 1>::DimensionPair DimPair;\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nvoid test_sycl_cumsum(const Eigen::SyclDevice& sycl_device, IndexType m_size,\n                      IndexType k_size, IndexType n_size, int consume_dim,\n                      bool exclusive) {\n  static const DataType error_threshold = 1e-4f;\n  std::cout << \"Testing for (\" << m_size << \",\" << k_size << \",\" << n_size\n            << \" consume_dim : \" << consume_dim << \")\" << std::endl;\n  Tensor<DataType, 3, DataLayout, IndexType> t_input(m_size, k_size, n_size);\n  Tensor<DataType, 3, DataLayout, IndexType> t_result(m_size, k_size, n_size);\n  Tensor<DataType, 3, DataLayout, IndexType> t_result_gpu(m_size, k_size,\n                                                          n_size);\n\n  t_input.setRandom();\n  std::size_t t_input_bytes = t_input.size() * sizeof(DataType);\n  std::size_t t_result_bytes = t_result.size() * sizeof(DataType);\n\n  DataType* gpu_data_in =\n      static_cast<DataType*>(sycl_device.allocate(t_input_bytes));\n  DataType* gpu_data_out =\n      static_cast<DataType*>(sycl_device.allocate(t_result_bytes));\n\n  array<IndexType, 3> tensorRange = {{m_size, k_size, n_size}};\n  TensorMap<Tensor<DataType, 3, DataLayout, IndexType>> gpu_t_input(\n      gpu_data_in, tensorRange);\n  TensorMap<Tensor<DataType, 3, DataLayout, IndexType>> gpu_t_result(\n      gpu_data_out, tensorRange);\n  sycl_device.memcpyHostToDevice(gpu_data_in, t_input.data(), t_input_bytes);\n  sycl_device.memcpyHostToDevice(gpu_data_out, t_input.data(), t_input_bytes);\n\n  gpu_t_result.device(sycl_device) = gpu_t_input.cumsum(consume_dim, exclusive);\n\n  t_result = t_input.cumsum(consume_dim, exclusive);\n\n  sycl_device.memcpyDeviceToHost(t_result_gpu.data(), gpu_data_out,\n                                 t_result_bytes);\n  sycl_device.synchronize();\n\n  for (IndexType i = 0; i < t_result.size(); i++) {\n    if (static_cast<DataType>(std::fabs(static_cast<DataType>(\n            t_result(i) - t_result_gpu(i)))) < error_threshold) {\n      continue;\n    }\n    if (Eigen::internal::isApprox(t_result(i), t_result_gpu(i),\n                                  error_threshold)) {\n      continue;\n    }\n    std::cout << \"mismatch detected at index \" << i << \" CPU : \" << t_result(i)\n              << \" vs SYCL : \" << t_result_gpu(i) << std::endl;\n    assert(false);\n  }\n  sycl_device.deallocate(gpu_data_in);\n  sycl_device.deallocate(gpu_data_out);\n}\n\ntemplate <typename DataType, typename Dev>\nvoid sycl_scan_test_exclusive_dim0_per_device(const Dev& sycl_device) {\n  test_sycl_cumsum<DataType, ColMajor, int64_t>(sycl_device, 2049, 1023, 127, 0,\n                                                true);\n  test_sycl_cumsum<DataType, RowMajor, int64_t>(sycl_device, 2049, 1023, 127, 0,\n                                                true);\n}\ntemplate <typename DataType, typename Dev>\nvoid sycl_scan_test_exclusive_dim1_per_device(const Dev& sycl_device) {\n  test_sycl_cumsum<DataType, ColMajor, int64_t>(sycl_device, 1023, 2049, 127, 1,\n                                                true);\n  test_sycl_cumsum<DataType, RowMajor, int64_t>(sycl_device, 1023, 2049, 127, 1,\n                                                true);\n}\ntemplate <typename DataType, typename Dev>\nvoid sycl_scan_test_exclusive_dim2_per_device(const Dev& sycl_device) {\n  test_sycl_cumsum<DataType, ColMajor, int64_t>(sycl_device, 1023, 127, 2049, 2,\n                                                true);\n  test_sycl_cumsum<DataType, RowMajor, int64_t>(sycl_device, 1023, 127, 2049, 2,\n                                                true);\n}\ntemplate <typename DataType, typename Dev>\nvoid sycl_scan_test_inclusive_dim0_per_device(const Dev& sycl_device) {\n  test_sycl_cumsum<DataType, ColMajor, int64_t>(sycl_device, 2049, 1023, 127, 0,\n                                                false);\n  test_sycl_cumsum<DataType, RowMajor, int64_t>(sycl_device, 2049, 1023, 127, 0,\n                                                false);\n}\ntemplate <typename DataType, typename Dev>\nvoid sycl_scan_test_inclusive_dim1_per_device(const Dev& sycl_device) {\n  test_sycl_cumsum<DataType, ColMajor, int64_t>(sycl_device, 1023, 2049, 127, 1,\n                                                false);\n  test_sycl_cumsum<DataType, RowMajor, int64_t>(sycl_device, 1023, 2049, 127, 1,\n                                                false);\n}\ntemplate <typename DataType, typename Dev>\nvoid sycl_scan_test_inclusive_dim2_per_device(const Dev& sycl_device) {\n  test_sycl_cumsum<DataType, ColMajor, int64_t>(sycl_device, 1023, 127, 2049, 2,\n                                                false);\n  test_sycl_cumsum<DataType, RowMajor, int64_t>(sycl_device, 1023, 127, 2049, 2,\n                                                false);\n}\nEIGEN_DECLARE_TEST(cxx11_tensor_scan_sycl) {\n  for (const auto& device : Eigen::get_sycl_supported_devices()) {\n    std::cout << \"Running on \"\n              << device.template get_info<cl::sycl::info::device::name>()\n              << std::endl;\n    QueueInterface queueInterface(device);\n    auto sycl_device = Eigen::SyclDevice(&queueInterface);\n    CALL_SUBTEST_1(\n        sycl_scan_test_exclusive_dim0_per_device<float>(sycl_device));\n    CALL_SUBTEST_2(\n        sycl_scan_test_exclusive_dim1_per_device<float>(sycl_device));\n    CALL_SUBTEST_3(\n        sycl_scan_test_exclusive_dim2_per_device<float>(sycl_device));\n    CALL_SUBTEST_4(\n        sycl_scan_test_inclusive_dim0_per_device<float>(sycl_device));\n    CALL_SUBTEST_5(\n        sycl_scan_test_inclusive_dim1_per_device<float>(sycl_device));\n    CALL_SUBTEST_6(\n        sycl_scan_test_inclusive_dim2_per_device<float>(sycl_device));\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_shuffling.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\nusing Eigen::array;\n\ntemplate <int DataLayout>\nstatic void test_simple_shuffling()\n{\n  Tensor<float, 4, DataLayout> tensor(2,3,5,7);\n  tensor.setRandom();\n  array<ptrdiff_t, 4> shuffles;\n  shuffles[0] = 0;\n  shuffles[1] = 1;\n  shuffles[2] = 2;\n  shuffles[3] = 3;\n\n  Tensor<float, 4, DataLayout> no_shuffle;\n  no_shuffle = tensor.shuffle(shuffles);\n\n  VERIFY_IS_EQUAL(no_shuffle.dimension(0), 2);\n  VERIFY_IS_EQUAL(no_shuffle.dimension(1), 3);\n  VERIFY_IS_EQUAL(no_shuffle.dimension(2), 5);\n  VERIFY_IS_EQUAL(no_shuffle.dimension(3), 7);\n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 5; ++k) {\n        for (int l = 0; l < 7; ++l) {\n          VERIFY_IS_EQUAL(tensor(i,j,k,l), no_shuffle(i,j,k,l));\n        }\n      }\n    }\n  }\n\n  shuffles[0] = 2;\n  shuffles[1] = 3;\n  shuffles[2] = 1;\n  shuffles[3] = 0;\n  Tensor<float, 4, DataLayout> shuffle;\n  shuffle = tensor.shuffle(shuffles);\n\n  VERIFY_IS_EQUAL(shuffle.dimension(0), 5);\n  VERIFY_IS_EQUAL(shuffle.dimension(1), 7);\n  VERIFY_IS_EQUAL(shuffle.dimension(2), 3);\n  VERIFY_IS_EQUAL(shuffle.dimension(3), 2);\n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 5; ++k) {\n        for (int l = 0; l < 7; ++l) {\n          VERIFY_IS_EQUAL(tensor(i,j,k,l), shuffle(k,l,j,i));\n        }\n      }\n    }\n  }\n}\n\n\ntemplate <int DataLayout>\nstatic void test_expr_shuffling()\n{\n  Tensor<float, 4, DataLayout> tensor(2,3,5,7);\n  tensor.setRandom();\n\n  array<ptrdiff_t, 4> shuffles;\n  shuffles[0] = 2;\n  shuffles[1] = 3;\n  shuffles[2] = 1;\n  shuffles[3] = 0;\n  Tensor<float, 4, DataLayout> expected;\n  expected = tensor.shuffle(shuffles);\n\n  Tensor<float, 4, DataLayout> result(5, 7, 3, 2);\n\n  array<ptrdiff_t, 4> src_slice_dim{{2, 3, 1, 7}};\n  array<ptrdiff_t, 4> src_slice_start{{0, 0, 0, 0}};\n  array<ptrdiff_t, 4> dst_slice_dim{{1, 7, 3, 2}};\n  array<ptrdiff_t, 4> dst_slice_start{{0, 0, 0, 0}};\n\n  for (int i = 0; i < 5; ++i) {\n    result.slice(dst_slice_start, dst_slice_dim) =\n        tensor.slice(src_slice_start, src_slice_dim).shuffle(shuffles);\n    src_slice_start[2] += 1;\n    dst_slice_start[0] += 1;\n  }\n\n  VERIFY_IS_EQUAL(result.dimension(0), 5);\n  VERIFY_IS_EQUAL(result.dimension(1), 7);\n  VERIFY_IS_EQUAL(result.dimension(2), 3);\n  VERIFY_IS_EQUAL(result.dimension(3), 2);\n\n  for (int i = 0; i < expected.dimension(0); ++i) {\n    for (int j = 0; j < expected.dimension(1); ++j) {\n      for (int k = 0; k < expected.dimension(2); ++k) {\n        for (int l = 0; l < expected.dimension(3); ++l) {\n          VERIFY_IS_EQUAL(result(i,j,k,l), expected(i,j,k,l));\n        }\n      }\n    }\n  }\n\n  dst_slice_start[0] = 0;\n  result.setRandom();\n  for (int i = 0; i < 5; ++i) {\n    result.slice(dst_slice_start, dst_slice_dim) =\n        tensor.shuffle(shuffles).slice(dst_slice_start, dst_slice_dim);\n    dst_slice_start[0] += 1;\n  }\n\n  for (int i = 0; i < expected.dimension(0); ++i) {\n    for (int j = 0; j < expected.dimension(1); ++j) {\n      for (int k = 0; k < expected.dimension(2); ++k) {\n        for (int l = 0; l < expected.dimension(3); ++l) {\n          VERIFY_IS_EQUAL(result(i,j,k,l), expected(i,j,k,l));\n        }\n      }\n    }\n  }\n}\n\n\ntemplate <int DataLayout>\nstatic void test_shuffling_as_value()\n{\n  Tensor<float, 4, DataLayout> tensor(2,3,5,7);\n  tensor.setRandom();\n  array<ptrdiff_t, 4> shuffles;\n  shuffles[2] = 0;\n  shuffles[3] = 1;\n  shuffles[1] = 2;\n  shuffles[0] = 3;\n  Tensor<float, 4, DataLayout> shuffle(5,7,3,2);\n  shuffle.shuffle(shuffles) = tensor;\n\n  VERIFY_IS_EQUAL(shuffle.dimension(0), 5);\n  VERIFY_IS_EQUAL(shuffle.dimension(1), 7);\n  VERIFY_IS_EQUAL(shuffle.dimension(2), 3);\n  VERIFY_IS_EQUAL(shuffle.dimension(3), 2);\n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 5; ++k) {\n        for (int l = 0; l < 7; ++l) {\n          VERIFY_IS_EQUAL(tensor(i,j,k,l), shuffle(k,l,j,i));\n        }\n      }\n    }\n  }\n\n  array<ptrdiff_t, 4> no_shuffle;\n  no_shuffle[0] = 0;\n  no_shuffle[1] = 1;\n  no_shuffle[2] = 2;\n  no_shuffle[3] = 3;\n  Tensor<float, 4, DataLayout> shuffle2(5,7,3,2);\n  shuffle2.shuffle(shuffles) = tensor.shuffle(no_shuffle);\n  for (int i = 0; i < 5; ++i) {\n    for (int j = 0; j < 7; ++j) {\n      for (int k = 0; k < 3; ++k) {\n        for (int l = 0; l < 2; ++l) {\n          VERIFY_IS_EQUAL(shuffle2(i,j,k,l), shuffle(i,j,k,l));\n        }\n      }\n    }\n  }\n}\n\n\ntemplate <int DataLayout>\nstatic void test_shuffle_unshuffle()\n{\n  Tensor<float, 4, DataLayout> tensor(2,3,5,7);\n  tensor.setRandom();\n\n  // Choose a random permutation.\n  array<ptrdiff_t, 4> shuffles;\n  for (int i = 0; i < 4; ++i) {\n    shuffles[i] = i;\n  }\n  array<ptrdiff_t, 4> shuffles_inverse;\n  for (int i = 0; i < 4; ++i) {\n    const ptrdiff_t index = internal::random<ptrdiff_t>(i, 3);\n    shuffles_inverse[shuffles[index]] = i;\n    std::swap(shuffles[i], shuffles[index]);\n  }\n\n  Tensor<float, 4, DataLayout> shuffle;\n  shuffle = tensor.shuffle(shuffles).shuffle(shuffles_inverse);\n\n  VERIFY_IS_EQUAL(shuffle.dimension(0), 2);\n  VERIFY_IS_EQUAL(shuffle.dimension(1), 3);\n  VERIFY_IS_EQUAL(shuffle.dimension(2), 5);\n  VERIFY_IS_EQUAL(shuffle.dimension(3), 7);\n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 5; ++k) {\n        for (int l = 0; l < 7; ++l) {\n          VERIFY_IS_EQUAL(tensor(i,j,k,l), shuffle(i,j,k,l));\n        }\n      }\n    }\n  }\n}\n\n\nEIGEN_DECLARE_TEST(cxx11_tensor_shuffling)\n{\n  CALL_SUBTEST(test_simple_shuffling<ColMajor>());\n  CALL_SUBTEST(test_simple_shuffling<RowMajor>());\n  CALL_SUBTEST(test_expr_shuffling<ColMajor>());\n  CALL_SUBTEST(test_expr_shuffling<RowMajor>());\n  CALL_SUBTEST(test_shuffling_as_value<ColMajor>());\n  CALL_SUBTEST(test_shuffling_as_value<RowMajor>());\n  CALL_SUBTEST(test_shuffle_unshuffle<ColMajor>());\n  CALL_SUBTEST(test_shuffle_unshuffle<RowMajor>());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_shuffling_sycl.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016\n// Mehdi Goli    Codeplay Software Ltd.\n// Ralph Potter  Codeplay Software Ltd.\n// Luke Iwanski  Codeplay Software Ltd.\n// Contact: <eigen@codeplay.com>\n// Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_TEST_NO_LONGDOUBLE\n#define EIGEN_TEST_NO_COMPLEX\n\n#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int64_t\n#define EIGEN_USE_SYCL\n\n#include \"main.h\"\n#include <unsupported/Eigen/CXX11/Tensor>\n\nusing Eigen::array;\nusing Eigen::SyclDevice;\nusing Eigen::Tensor;\nusing Eigen::TensorMap;\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_simple_shuffling_sycl(const Eigen::SyclDevice& sycl_device) {\n  IndexType sizeDim1 = 2;\n  IndexType sizeDim2 = 3;\n  IndexType sizeDim3 = 5;\n  IndexType sizeDim4 = 7;\n  array<IndexType, 4> tensorRange = {{sizeDim1, sizeDim2, sizeDim3, sizeDim4}};\n  Tensor<DataType, 4, DataLayout, IndexType> tensor(tensorRange);\n  Tensor<DataType, 4, DataLayout, IndexType> no_shuffle(tensorRange);\n  tensor.setRandom();\n\n  const size_t buffSize = tensor.size() * sizeof(DataType);\n  array<IndexType, 4> shuffles;\n  shuffles[0] = 0;\n  shuffles[1] = 1;\n  shuffles[2] = 2;\n  shuffles[3] = 3;\n  DataType* gpu_data1 = static_cast<DataType*>(sycl_device.allocate(buffSize));\n  DataType* gpu_data2 = static_cast<DataType*>(sycl_device.allocate(buffSize));\n\n  TensorMap<Tensor<DataType, 4, DataLayout, IndexType>> gpu1(gpu_data1,\n                                                             tensorRange);\n  TensorMap<Tensor<DataType, 4, DataLayout, IndexType>> gpu2(gpu_data2,\n                                                             tensorRange);\n\n  sycl_device.memcpyHostToDevice(gpu_data1, tensor.data(), buffSize);\n\n  gpu2.device(sycl_device) = gpu1.shuffle(shuffles);\n  sycl_device.memcpyDeviceToHost(no_shuffle.data(), gpu_data2, buffSize);\n  sycl_device.synchronize();\n\n  VERIFY_IS_EQUAL(no_shuffle.dimension(0), sizeDim1);\n  VERIFY_IS_EQUAL(no_shuffle.dimension(1), sizeDim2);\n  VERIFY_IS_EQUAL(no_shuffle.dimension(2), sizeDim3);\n  VERIFY_IS_EQUAL(no_shuffle.dimension(3), sizeDim4);\n\n  for (IndexType i = 0; i < sizeDim1; ++i) {\n    for (IndexType j = 0; j < sizeDim2; ++j) {\n      for (IndexType k = 0; k < sizeDim3; ++k) {\n        for (IndexType l = 0; l < sizeDim4; ++l) {\n          VERIFY_IS_EQUAL(tensor(i, j, k, l), no_shuffle(i, j, k, l));\n        }\n      }\n    }\n  }\n\n  shuffles[0] = 2;\n  shuffles[1] = 3;\n  shuffles[2] = 1;\n  shuffles[3] = 0;\n  array<IndexType, 4> tensorrangeShuffle = {\n      {sizeDim3, sizeDim4, sizeDim2, sizeDim1}};\n  Tensor<DataType, 4, DataLayout, IndexType> shuffle(tensorrangeShuffle);\n  DataType* gpu_data3 = static_cast<DataType*>(sycl_device.allocate(buffSize));\n  TensorMap<Tensor<DataType, 4, DataLayout, IndexType>> gpu3(\n      gpu_data3, tensorrangeShuffle);\n\n  gpu3.device(sycl_device) = gpu1.shuffle(shuffles);\n  sycl_device.memcpyDeviceToHost(shuffle.data(), gpu_data3, buffSize);\n  sycl_device.synchronize();\n\n  VERIFY_IS_EQUAL(shuffle.dimension(0), sizeDim3);\n  VERIFY_IS_EQUAL(shuffle.dimension(1), sizeDim4);\n  VERIFY_IS_EQUAL(shuffle.dimension(2), sizeDim2);\n  VERIFY_IS_EQUAL(shuffle.dimension(3), sizeDim1);\n\n  for (IndexType i = 0; i < sizeDim1; ++i) {\n    for (IndexType j = 0; j < sizeDim2; ++j) {\n      for (IndexType k = 0; k < sizeDim3; ++k) {\n        for (IndexType l = 0; l < sizeDim4; ++l) {\n          VERIFY_IS_EQUAL(tensor(i, j, k, l), shuffle(k, l, j, i));\n        }\n      }\n    }\n  }\n}\n\ntemplate <typename DataType, typename dev_Selector>\nvoid sycl_shuffling_test_per_device(dev_Selector s) {\n  QueueInterface queueInterface(s);\n  auto sycl_device = Eigen::SyclDevice(&queueInterface);\n  test_simple_shuffling_sycl<DataType, RowMajor, int64_t>(sycl_device);\n  test_simple_shuffling_sycl<DataType, ColMajor, int64_t>(sycl_device);\n}\nEIGEN_DECLARE_TEST(cxx11_tensor_shuffling_sycl) {\n  for (const auto& device : Eigen::get_sycl_supported_devices()) {\n    CALL_SUBTEST(sycl_shuffling_test_per_device<float>(device));\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_simple.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2013 Christian Seiler <christian@iwakd.de>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\nusing Eigen::RowMajor;\n\nstatic void test_0d()\n{\n  Tensor<int, 0> scalar1;\n  Tensor<int, 0, RowMajor> scalar2;\n  Tensor<int, 0> scalar3;\n  Tensor<int, 0, RowMajor> scalar4;\n\n  scalar3.resize();\n  scalar4.resize();\n\n  scalar1() = 7;\n  scalar2() = 13;\n  scalar3.setValues(17);\n  scalar4.setZero();\n\n  VERIFY_IS_EQUAL(scalar1.rank(), 0);\n  VERIFY_IS_EQUAL(scalar1.size(), 1);\n\n  VERIFY_IS_EQUAL(scalar1(), 7);\n  VERIFY_IS_EQUAL(scalar2(), 13);\n  VERIFY_IS_EQUAL(scalar3(), 17);\n  VERIFY_IS_EQUAL(scalar4(), 0);\n\n  Tensor<int, 0> scalar5(scalar1);\n\n  VERIFY_IS_EQUAL(scalar5(), 7);\n  VERIFY_IS_EQUAL(scalar5.data()[0], 7);\n}\n\nstatic void test_1d()\n{\n  Tensor<int, 1> vec1(6);\n  Tensor<int, 1, RowMajor> vec2(6);\n  Tensor<int, 1> vec3;\n  Tensor<int, 1, RowMajor> vec4;\n\n  vec3.resize(6);\n  vec4.resize(6);\n\n  vec1(0) = 4;  vec2(0) = 0; vec3(0) = 5;\n  vec1(1) = 8;  vec2(1) = 1; vec3(1) = 4;\n  vec1(2) = 15; vec2(2) = 2; vec3(2) = 3;\n  vec1(3) = 16; vec2(3) = 3; vec3(3) = 2;\n  vec1(4) = 23; vec2(4) = 4; vec3(4) = 1;\n  vec1(5) = 42; vec2(5) = 5; vec3(5) = 0;\n  vec4.setZero();\n\n  VERIFY_IS_EQUAL((vec1.rank()), 1);\n  VERIFY_IS_EQUAL((vec1.size()), 6);\n  VERIFY_IS_EQUAL((vec1.dimensions()[0]), 6);\n\n  VERIFY_IS_EQUAL((vec1[0]), 4);\n  VERIFY_IS_EQUAL((vec1[1]), 8);\n  VERIFY_IS_EQUAL((vec1[2]), 15);\n  VERIFY_IS_EQUAL((vec1[3]), 16);\n  VERIFY_IS_EQUAL((vec1[4]), 23);\n  VERIFY_IS_EQUAL((vec1[5]), 42);\n\n  VERIFY_IS_EQUAL((vec2[0]), 0);\n  VERIFY_IS_EQUAL((vec2[1]), 1);\n  VERIFY_IS_EQUAL((vec2[2]), 2);\n  VERIFY_IS_EQUAL((vec2[3]), 3);\n  VERIFY_IS_EQUAL((vec2[4]), 4);\n  VERIFY_IS_EQUAL((vec2[5]), 5);\n\n  VERIFY_IS_EQUAL((vec3[0]), 5);\n  VERIFY_IS_EQUAL((vec3[1]), 4);\n  VERIFY_IS_EQUAL((vec3[2]), 3);\n  VERIFY_IS_EQUAL((vec3[3]), 2);\n  VERIFY_IS_EQUAL((vec3[4]), 1);\n  VERIFY_IS_EQUAL((vec3[5]), 0);\n\n  VERIFY_IS_EQUAL((vec4[0]), 0);\n  VERIFY_IS_EQUAL((vec4[1]), 0);\n  VERIFY_IS_EQUAL((vec4[2]), 0);\n  VERIFY_IS_EQUAL((vec4[3]), 0);\n  VERIFY_IS_EQUAL((vec4[4]), 0);\n  VERIFY_IS_EQUAL((vec4[5]), 0);\n\n  Tensor<int, 1> vec5(vec1);\n\n  VERIFY_IS_EQUAL((vec5(0)), 4);\n  VERIFY_IS_EQUAL((vec5(1)), 8);\n  VERIFY_IS_EQUAL((vec5(2)), 15);\n  VERIFY_IS_EQUAL((vec5(3)), 16);\n  VERIFY_IS_EQUAL((vec5(4)), 23);\n  VERIFY_IS_EQUAL((vec5(5)), 42);\n\n  VERIFY_IS_EQUAL((vec5.data()[0]), 4);\n  VERIFY_IS_EQUAL((vec5.data()[1]), 8);\n  VERIFY_IS_EQUAL((vec5.data()[2]), 15);\n  VERIFY_IS_EQUAL((vec5.data()[3]), 16);\n  VERIFY_IS_EQUAL((vec5.data()[4]), 23);\n  VERIFY_IS_EQUAL((vec5.data()[5]), 42);\n}\n\nstatic void test_2d()\n{\n  Tensor<int, 2> mat1(2,3);\n  Tensor<int, 2, RowMajor> mat2(2,3);\n\n  mat1(0,0) = 0;\n  mat1(0,1) = 1;\n  mat1(0,2) = 2;\n  mat1(1,0) = 3;\n  mat1(1,1) = 4;\n  mat1(1,2) = 5;\n\n  mat2(0,0) = 0;\n  mat2(0,1) = 1;\n  mat2(0,2) = 2;\n  mat2(1,0) = 3;\n  mat2(1,1) = 4;\n  mat2(1,2) = 5;\n\n  VERIFY_IS_EQUAL((mat1.rank()), 2);\n  VERIFY_IS_EQUAL((mat1.size()), 6);\n  VERIFY_IS_EQUAL((mat1.dimensions()[0]), 2);\n  VERIFY_IS_EQUAL((mat1.dimensions()[1]), 3);\n\n  VERIFY_IS_EQUAL((mat2.rank()), 2);\n  VERIFY_IS_EQUAL((mat2.size()), 6);\n  VERIFY_IS_EQUAL((mat2.dimensions()[0]), 2);\n  VERIFY_IS_EQUAL((mat2.dimensions()[1]), 3);\n\n  VERIFY_IS_EQUAL((mat1.data()[0]), 0);\n  VERIFY_IS_EQUAL((mat1.data()[1]), 3);\n  VERIFY_IS_EQUAL((mat1.data()[2]), 1);\n  VERIFY_IS_EQUAL((mat1.data()[3]), 4);\n  VERIFY_IS_EQUAL((mat1.data()[4]), 2);\n  VERIFY_IS_EQUAL((mat1.data()[5]), 5);\n\n  VERIFY_IS_EQUAL((mat2.data()[0]), 0);\n  VERIFY_IS_EQUAL((mat2.data()[1]), 1);\n  VERIFY_IS_EQUAL((mat2.data()[2]), 2);\n  VERIFY_IS_EQUAL((mat2.data()[3]), 3);\n  VERIFY_IS_EQUAL((mat2.data()[4]), 4);\n  VERIFY_IS_EQUAL((mat2.data()[5]), 5);\n}\n\nstatic void test_3d()\n{\n  Tensor<int, 3> epsilon(3,3,3);\n  epsilon.setZero();\n  epsilon(0,1,2) = epsilon(2,0,1) = epsilon(1,2,0) = 1;\n  epsilon(2,1,0) = epsilon(0,2,1) = epsilon(1,0,2) = -1;\n\n  VERIFY_IS_EQUAL((epsilon.size()), 27);\n  VERIFY_IS_EQUAL((epsilon.dimensions()[0]), 3);\n  VERIFY_IS_EQUAL((epsilon.dimensions()[1]), 3);\n  VERIFY_IS_EQUAL((epsilon.dimensions()[2]), 3);\n\n  VERIFY_IS_EQUAL((epsilon(0,0,0)), 0);\n  VERIFY_IS_EQUAL((epsilon(0,0,1)), 0);\n  VERIFY_IS_EQUAL((epsilon(0,0,2)), 0);\n  VERIFY_IS_EQUAL((epsilon(0,1,0)), 0);\n  VERIFY_IS_EQUAL((epsilon(0,1,1)), 0);\n  VERIFY_IS_EQUAL((epsilon(0,2,0)), 0);\n  VERIFY_IS_EQUAL((epsilon(0,2,2)), 0);\n  VERIFY_IS_EQUAL((epsilon(1,0,0)), 0);\n  VERIFY_IS_EQUAL((epsilon(1,0,1)), 0);\n  VERIFY_IS_EQUAL((epsilon(1,1,0)), 0);\n  VERIFY_IS_EQUAL((epsilon(1,1,1)), 0);\n  VERIFY_IS_EQUAL((epsilon(1,1,2)), 0);\n  VERIFY_IS_EQUAL((epsilon(1,2,1)), 0);\n  VERIFY_IS_EQUAL((epsilon(1,2,2)), 0);\n  VERIFY_IS_EQUAL((epsilon(2,0,0)), 0);\n  VERIFY_IS_EQUAL((epsilon(2,0,2)), 0);\n  VERIFY_IS_EQUAL((epsilon(2,1,1)), 0);\n  VERIFY_IS_EQUAL((epsilon(2,1,2)), 0);\n  VERIFY_IS_EQUAL((epsilon(2,2,0)), 0);\n  VERIFY_IS_EQUAL((epsilon(2,2,1)), 0);\n  VERIFY_IS_EQUAL((epsilon(2,2,2)), 0);\n\n  VERIFY_IS_EQUAL((epsilon(0,1,2)), 1);\n  VERIFY_IS_EQUAL((epsilon(2,0,1)), 1);\n  VERIFY_IS_EQUAL((epsilon(1,2,0)), 1);\n  VERIFY_IS_EQUAL((epsilon(2,1,0)), -1);\n  VERIFY_IS_EQUAL((epsilon(0,2,1)), -1);\n  VERIFY_IS_EQUAL((epsilon(1,0,2)), -1);\n\n  array<Eigen::DenseIndex, 3> dims;\n  dims[0] = 2;\n  dims[1] = 3;\n  dims[2] = 4;\n  Tensor<int, 3> t1(dims);\n  Tensor<int, 3, RowMajor> t2(dims);\n\n  VERIFY_IS_EQUAL((t1.size()), 24);\n  VERIFY_IS_EQUAL((t1.dimensions()[0]), 2);\n  VERIFY_IS_EQUAL((t1.dimensions()[1]), 3);\n  VERIFY_IS_EQUAL((t1.dimensions()[2]), 4);\n\n  VERIFY_IS_EQUAL((t2.size()), 24);\n  VERIFY_IS_EQUAL((t2.dimensions()[0]), 2);\n  VERIFY_IS_EQUAL((t2.dimensions()[1]), 3);\n  VERIFY_IS_EQUAL((t2.dimensions()[2]), 4);\n\n  for (int i = 0; i < 2; i++) {\n    for (int j = 0; j < 3; j++) {\n      for (int k = 0; k < 4; k++) {\n        t1(i, j, k) = 100 * i + 10 * j + k;\n        t2(i, j, k) = 100 * i + 10 * j + k;\n      }\n    }\n  }\n\n  VERIFY_IS_EQUAL((t1.data()[0]),    0);\n  VERIFY_IS_EQUAL((t1.data()[1]),  100);\n  VERIFY_IS_EQUAL((t1.data()[2]),   10);\n  VERIFY_IS_EQUAL((t1.data()[3]),  110);\n  VERIFY_IS_EQUAL((t1.data()[4]),   20);\n  VERIFY_IS_EQUAL((t1.data()[5]),  120);\n  VERIFY_IS_EQUAL((t1.data()[6]),    1);\n  VERIFY_IS_EQUAL((t1.data()[7]),  101);\n  VERIFY_IS_EQUAL((t1.data()[8]),   11);\n  VERIFY_IS_EQUAL((t1.data()[9]),  111);\n  VERIFY_IS_EQUAL((t1.data()[10]),  21);\n  VERIFY_IS_EQUAL((t1.data()[11]), 121);\n  VERIFY_IS_EQUAL((t1.data()[12]),   2);\n  VERIFY_IS_EQUAL((t1.data()[13]), 102);\n  VERIFY_IS_EQUAL((t1.data()[14]),  12);\n  VERIFY_IS_EQUAL((t1.data()[15]), 112);\n  VERIFY_IS_EQUAL((t1.data()[16]),  22);\n  VERIFY_IS_EQUAL((t1.data()[17]), 122);\n  VERIFY_IS_EQUAL((t1.data()[18]),   3);\n  VERIFY_IS_EQUAL((t1.data()[19]), 103);\n  VERIFY_IS_EQUAL((t1.data()[20]),  13);\n  VERIFY_IS_EQUAL((t1.data()[21]), 113);\n  VERIFY_IS_EQUAL((t1.data()[22]),  23);\n  VERIFY_IS_EQUAL((t1.data()[23]), 123);\n\n  VERIFY_IS_EQUAL((t2.data()[0]),    0);\n  VERIFY_IS_EQUAL((t2.data()[1]),    1);\n  VERIFY_IS_EQUAL((t2.data()[2]),    2);\n  VERIFY_IS_EQUAL((t2.data()[3]),    3);\n  VERIFY_IS_EQUAL((t2.data()[4]),   10);\n  VERIFY_IS_EQUAL((t2.data()[5]),   11);\n  VERIFY_IS_EQUAL((t2.data()[6]),   12);\n  VERIFY_IS_EQUAL((t2.data()[7]),   13);\n  VERIFY_IS_EQUAL((t2.data()[8]),   20);\n  VERIFY_IS_EQUAL((t2.data()[9]),   21);\n  VERIFY_IS_EQUAL((t2.data()[10]),  22);\n  VERIFY_IS_EQUAL((t2.data()[11]),  23);\n  VERIFY_IS_EQUAL((t2.data()[12]), 100);\n  VERIFY_IS_EQUAL((t2.data()[13]), 101);\n  VERIFY_IS_EQUAL((t2.data()[14]), 102);\n  VERIFY_IS_EQUAL((t2.data()[15]), 103);\n  VERIFY_IS_EQUAL((t2.data()[16]), 110);\n  VERIFY_IS_EQUAL((t2.data()[17]), 111);\n  VERIFY_IS_EQUAL((t2.data()[18]), 112);\n  VERIFY_IS_EQUAL((t2.data()[19]), 113);\n  VERIFY_IS_EQUAL((t2.data()[20]), 120);\n  VERIFY_IS_EQUAL((t2.data()[21]), 121);\n  VERIFY_IS_EQUAL((t2.data()[22]), 122);\n  VERIFY_IS_EQUAL((t2.data()[23]), 123);\n}\n\nstatic void test_simple_assign()\n{\n  Tensor<int, 3> epsilon(3,3,3);\n  epsilon.setZero();\n  epsilon(0,1,2) = epsilon(2,0,1) = epsilon(1,2,0) = 1;\n  epsilon(2,1,0) = epsilon(0,2,1) = epsilon(1,0,2) = -1;\n\n  Tensor<int, 3> e2(3,3,3);\n  e2.setZero();\n  VERIFY_IS_EQUAL((e2(1,2,0)), 0);\n\n  e2 = epsilon;\n  VERIFY_IS_EQUAL((e2(1,2,0)), 1);\n  VERIFY_IS_EQUAL((e2(0,1,2)), 1);\n  VERIFY_IS_EQUAL((e2(2,0,1)), 1);\n  VERIFY_IS_EQUAL((e2(2,1,0)), -1);\n  VERIFY_IS_EQUAL((e2(0,2,1)), -1);\n  VERIFY_IS_EQUAL((e2(1,0,2)), -1);\n}\n\nstatic void test_resize()\n{\n  Tensor<int, 3> epsilon;\n  epsilon.resize(2,3,7);\n  VERIFY_IS_EQUAL(epsilon.dimension(0), 2);\n  VERIFY_IS_EQUAL(epsilon.dimension(1), 3);\n  VERIFY_IS_EQUAL(epsilon.dimension(2), 7);\n  VERIFY_IS_EQUAL(epsilon.size(), 2*3*7);\n\n  const int* old_data = epsilon.data();\n  epsilon.resize(3,2,7);\n  VERIFY_IS_EQUAL(epsilon.dimension(0), 3);\n  VERIFY_IS_EQUAL(epsilon.dimension(1), 2);\n  VERIFY_IS_EQUAL(epsilon.dimension(2), 7);\n  VERIFY_IS_EQUAL(epsilon.size(), 2*3*7);\n  VERIFY_IS_EQUAL(epsilon.data(), old_data);\n\n  epsilon.resize(3,5,7);\n  VERIFY_IS_EQUAL(epsilon.dimension(0), 3);\n  VERIFY_IS_EQUAL(epsilon.dimension(1), 5);\n  VERIFY_IS_EQUAL(epsilon.dimension(2), 7);\n  VERIFY_IS_EQUAL(epsilon.size(), 3*5*7);\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_simple)\n{\n  CALL_SUBTEST(test_0d());\n  CALL_SUBTEST(test_1d());\n  CALL_SUBTEST(test_2d());\n  CALL_SUBTEST(test_3d());\n  CALL_SUBTEST(test_simple_assign());\n  CALL_SUBTEST(test_resize());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_striding.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\n\ntemplate<int DataLayout>\nstatic void test_simple_striding()\n{\n  Tensor<float, 4, DataLayout> tensor(2,3,5,7);\n  tensor.setRandom();\n  array<ptrdiff_t, 4> strides;\n  strides[0] = 1;\n  strides[1] = 1;\n  strides[2] = 1;\n  strides[3] = 1;\n\n  Tensor<float, 4, DataLayout> no_stride;\n  no_stride = tensor.stride(strides);\n\n  VERIFY_IS_EQUAL(no_stride.dimension(0), 2);\n  VERIFY_IS_EQUAL(no_stride.dimension(1), 3);\n  VERIFY_IS_EQUAL(no_stride.dimension(2), 5);\n  VERIFY_IS_EQUAL(no_stride.dimension(3), 7);\n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 5; ++k) {\n        for (int l = 0; l < 7; ++l) {\n          VERIFY_IS_EQUAL(tensor(i,j,k,l), no_stride(i,j,k,l));\n        }\n      }\n    }\n  }\n\n  strides[0] = 2;\n  strides[1] = 4;\n  strides[2] = 2;\n  strides[3] = 3;\n  Tensor<float, 4, DataLayout> stride;\n  stride = tensor.stride(strides);\n\n  VERIFY_IS_EQUAL(stride.dimension(0), 1);\n  VERIFY_IS_EQUAL(stride.dimension(1), 1);\n  VERIFY_IS_EQUAL(stride.dimension(2), 3);\n  VERIFY_IS_EQUAL(stride.dimension(3), 3);\n\n  for (int i = 0; i < 1; ++i) {\n    for (int j = 0; j < 1; ++j) {\n      for (int k = 0; k < 3; ++k) {\n        for (int l = 0; l < 3; ++l) {\n          VERIFY_IS_EQUAL(tensor(2*i,4*j,2*k,3*l), stride(i,j,k,l));\n        }\n      }\n    }\n  }\n}\n\n\ntemplate<int DataLayout>\nstatic void test_striding_as_lvalue()\n{\n  Tensor<float, 4, DataLayout> tensor(2,3,5,7);\n  tensor.setRandom();\n  array<ptrdiff_t, 4> strides;\n  strides[0] = 2;\n  strides[1] = 4;\n  strides[2] = 2;\n  strides[3] = 3;\n\n  Tensor<float, 4, DataLayout> result(3, 12, 10, 21);\n  result.stride(strides) = tensor;\n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 5; ++k) {\n        for (int l = 0; l < 7; ++l) {\n          VERIFY_IS_EQUAL(tensor(i,j,k,l), result(2*i,4*j,2*k,3*l));\n        }\n      }\n    }\n  }\n\n  array<ptrdiff_t, 4> no_strides;\n  no_strides[0] = 1;\n  no_strides[1] = 1;\n  no_strides[2] = 1;\n  no_strides[3] = 1;\n  Tensor<float, 4, DataLayout> result2(3, 12, 10, 21);\n  result2.stride(strides) = tensor.stride(no_strides);\n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 5; ++k) {\n        for (int l = 0; l < 7; ++l) {\n          VERIFY_IS_EQUAL(tensor(i,j,k,l), result2(2*i,4*j,2*k,3*l));\n        }\n      }\n    }\n  }\n}\n\n\nEIGEN_DECLARE_TEST(cxx11_tensor_striding)\n{\n  CALL_SUBTEST(test_simple_striding<ColMajor>());\n  CALL_SUBTEST(test_simple_striding<RowMajor>());\n  CALL_SUBTEST(test_striding_as_lvalue<ColMajor>());\n  CALL_SUBTEST(test_striding_as_lvalue<RowMajor>());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_striding_sycl.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016\n// Mehdi Goli    Codeplay Software Ltd.\n// Ralph Potter  Codeplay Software Ltd.\n// Luke Iwanski  Codeplay Software Ltd.\n// Contact: <eigen@codeplay.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_TEST_NO_LONGDOUBLE\n#define EIGEN_TEST_NO_COMPLEX\n\n#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int64_t\n#define EIGEN_USE_SYCL\n\n#include <iostream>\n#include <chrono>\n#include <ctime>\n\n#include \"main.h\"\n#include <unsupported/Eigen/CXX11/Tensor>\n\nusing Eigen::array;\nusing Eigen::SyclDevice;\nusing Eigen::Tensor;\nusing Eigen::TensorMap;\n\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_simple_striding(const Eigen::SyclDevice& sycl_device)\n{\n\n  Eigen::array<IndexType, 4> tensor_dims = {{2,3,5,7}};\n  Eigen::array<IndexType, 4> stride_dims = {{1,1,3,3}};\n\n\n  Tensor<DataType, 4, DataLayout, IndexType> tensor(tensor_dims);\n  Tensor<DataType, 4, DataLayout,IndexType> no_stride(tensor_dims);\n  Tensor<DataType, 4, DataLayout,IndexType> stride(stride_dims);\n\n\n  std::size_t tensor_bytes = tensor.size()  * sizeof(DataType);\n  std::size_t no_stride_bytes = no_stride.size() * sizeof(DataType);\n  std::size_t stride_bytes = stride.size() * sizeof(DataType);\n  DataType * d_tensor = static_cast<DataType*>(sycl_device.allocate(tensor_bytes));\n  DataType * d_no_stride = static_cast<DataType*>(sycl_device.allocate(no_stride_bytes));\n  DataType * d_stride = static_cast<DataType*>(sycl_device.allocate(stride_bytes));\n\n  Eigen::TensorMap<Eigen::Tensor<DataType, 4, DataLayout, IndexType> > gpu_tensor(d_tensor, tensor_dims);\n  Eigen::TensorMap<Eigen::Tensor<DataType, 4, DataLayout, IndexType> > gpu_no_stride(d_no_stride, tensor_dims);\n  Eigen::TensorMap<Eigen::Tensor<DataType, 4, DataLayout, IndexType> > gpu_stride(d_stride, stride_dims);\n\n\n  tensor.setRandom();\n  array<IndexType, 4> strides;\n  strides[0] = 1;\n  strides[1] = 1;\n  strides[2] = 1;\n  strides[3] = 1;\n  sycl_device.memcpyHostToDevice(d_tensor, tensor.data(), tensor_bytes);\n  gpu_no_stride.device(sycl_device)=gpu_tensor.stride(strides);\n  sycl_device.memcpyDeviceToHost(no_stride.data(), d_no_stride, no_stride_bytes);\n\n  //no_stride = tensor.stride(strides);\n\n  VERIFY_IS_EQUAL(no_stride.dimension(0), 2);\n  VERIFY_IS_EQUAL(no_stride.dimension(1), 3);\n  VERIFY_IS_EQUAL(no_stride.dimension(2), 5);\n  VERIFY_IS_EQUAL(no_stride.dimension(3), 7);\n\n  for (IndexType i = 0; i < 2; ++i) {\n    for (IndexType j = 0; j < 3; ++j) {\n      for (IndexType k = 0; k < 5; ++k) {\n        for (IndexType l = 0; l < 7; ++l) {\n          VERIFY_IS_EQUAL(tensor(i,j,k,l), no_stride(i,j,k,l));\n        }\n      }\n    }\n  }\n\n  strides[0] = 2;\n  strides[1] = 4;\n  strides[2] = 2;\n  strides[3] = 3;\n//Tensor<float, 4, DataLayout> stride;\n//  stride = tensor.stride(strides);\n\n  gpu_stride.device(sycl_device)=gpu_tensor.stride(strides);\n  sycl_device.memcpyDeviceToHost(stride.data(), d_stride, stride_bytes);\n\n  VERIFY_IS_EQUAL(stride.dimension(0), 1);\n  VERIFY_IS_EQUAL(stride.dimension(1), 1);\n  VERIFY_IS_EQUAL(stride.dimension(2), 3);\n  VERIFY_IS_EQUAL(stride.dimension(3), 3);\n\n  for (IndexType i = 0; i < 1; ++i) {\n    for (IndexType j = 0; j < 1; ++j) {\n      for (IndexType k = 0; k < 3; ++k) {\n        for (IndexType l = 0; l < 3; ++l) {\n          VERIFY_IS_EQUAL(tensor(2*i,4*j,2*k,3*l), stride(i,j,k,l));\n        }\n      }\n    }\n  }\n\n  sycl_device.deallocate(d_tensor);\n  sycl_device.deallocate(d_no_stride);\n  sycl_device.deallocate(d_stride);\n}\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nstatic void test_striding_as_lvalue(const Eigen::SyclDevice& sycl_device)\n{\n\n  Eigen::array<IndexType, 4> tensor_dims = {{2,3,5,7}};\n  Eigen::array<IndexType, 4> stride_dims = {{3,12,10,21}};\n\n\n  Tensor<DataType, 4, DataLayout, IndexType> tensor(tensor_dims);\n  Tensor<DataType, 4, DataLayout,IndexType> no_stride(stride_dims);\n  Tensor<DataType, 4, DataLayout,IndexType> stride(stride_dims);\n\n\n  std::size_t tensor_bytes = tensor.size()  * sizeof(DataType);\n  std::size_t no_stride_bytes = no_stride.size() * sizeof(DataType);\n  std::size_t stride_bytes = stride.size() * sizeof(DataType);\n\n  DataType * d_tensor = static_cast<DataType*>(sycl_device.allocate(tensor_bytes));\n  DataType * d_no_stride = static_cast<DataType*>(sycl_device.allocate(no_stride_bytes));\n  DataType * d_stride = static_cast<DataType*>(sycl_device.allocate(stride_bytes));\n\n  Eigen::TensorMap<Eigen::Tensor<DataType, 4, DataLayout, IndexType> > gpu_tensor(d_tensor, tensor_dims);\n  Eigen::TensorMap<Eigen::Tensor<DataType, 4, DataLayout, IndexType> > gpu_no_stride(d_no_stride, stride_dims);\n  Eigen::TensorMap<Eigen::Tensor<DataType, 4, DataLayout, IndexType> > gpu_stride(d_stride, stride_dims);\n\n  //Tensor<float, 4, DataLayout> tensor(2,3,5,7);\n  tensor.setRandom();\n  array<IndexType, 4> strides;\n  strides[0] = 2;\n  strides[1] = 4;\n  strides[2] = 2;\n  strides[3] = 3;\n\n//  Tensor<float, 4, DataLayout> result(3, 12, 10, 21);\n//  result.stride(strides) = tensor;\n  sycl_device.memcpyHostToDevice(d_tensor, tensor.data(), tensor_bytes);\n  gpu_stride.stride(strides).device(sycl_device)=gpu_tensor;\n  sycl_device.memcpyDeviceToHost(stride.data(), d_stride, stride_bytes);\n\n  for (IndexType i = 0; i < 2; ++i) {\n    for (IndexType j = 0; j < 3; ++j) {\n      for (IndexType k = 0; k < 5; ++k) {\n        for (IndexType l = 0; l < 7; ++l) {\n          VERIFY_IS_EQUAL(tensor(i,j,k,l), stride(2*i,4*j,2*k,3*l));\n        }\n      }\n    }\n  }\n\n  array<IndexType, 4> no_strides;\n  no_strides[0] = 1;\n  no_strides[1] = 1;\n  no_strides[2] = 1;\n  no_strides[3] = 1;\n//  Tensor<float, 4, DataLayout> result2(3, 12, 10, 21);\n//  result2.stride(strides) = tensor.stride(no_strides);\n\n  gpu_no_stride.stride(strides).device(sycl_device)=gpu_tensor.stride(no_strides);\n  sycl_device.memcpyDeviceToHost(no_stride.data(), d_no_stride, no_stride_bytes);\n\n  for (IndexType i = 0; i < 2; ++i) {\n    for (IndexType j = 0; j < 3; ++j) {\n      for (IndexType k = 0; k < 5; ++k) {\n        for (IndexType l = 0; l < 7; ++l) {\n          VERIFY_IS_EQUAL(tensor(i,j,k,l), no_stride(2*i,4*j,2*k,3*l));\n        }\n      }\n    }\n  }\n  sycl_device.deallocate(d_tensor);\n  sycl_device.deallocate(d_no_stride);\n  sycl_device.deallocate(d_stride);\n}\n\n\ntemplate <typename Dev_selector> void tensorStridingPerDevice(Dev_selector& s){\n  QueueInterface queueInterface(s);\n  auto sycl_device=Eigen::SyclDevice(&queueInterface);\n  test_simple_striding<float, ColMajor, int64_t>(sycl_device);\n  test_simple_striding<float, RowMajor, int64_t>(sycl_device);\n  test_striding_as_lvalue<float, ColMajor, int64_t>(sycl_device);\n  test_striding_as_lvalue<float, RowMajor, int64_t>(sycl_device);\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_striding_sycl) {\n  for (const auto& device :Eigen::get_sycl_supported_devices()) {\n    CALL_SUBTEST(tensorStridingPerDevice(device));\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_sugar.cpp",
    "content": "#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\nusing Eigen::RowMajor;\n\nstatic void test_comparison_sugar() {\n  // we already trust comparisons between tensors, we're simply checking that\n  // the sugared versions are doing the same thing\n  Tensor<int, 3> t(6, 7, 5);\n\n  t.setRandom();\n  // make sure we have at least one value == 0\n  t(0,0,0) = 0;\n\n  Tensor<bool,0> b;\n\n#define TEST_TENSOR_EQUAL(e1, e2) \\\n  b = ((e1) == (e2)).all();       \\\n  VERIFY(b())\n\n#define TEST_OP(op) TEST_TENSOR_EQUAL(t op 0, t op t.constant(0))\n\n  TEST_OP(==);\n  TEST_OP(!=);\n  TEST_OP(<=);\n  TEST_OP(>=);\n  TEST_OP(<);\n  TEST_OP(>);\n#undef TEST_OP\n#undef TEST_TENSOR_EQUAL\n}\n\n\nstatic void test_scalar_sugar_add_mul() {\n  Tensor<float, 3> A(6, 7, 5);\n  Tensor<float, 3> B(6, 7, 5);\n  A.setRandom();\n  B.setRandom();\n\n  const float alpha = 0.43f;\n  const float beta = 0.21f;\n  const float gamma = 0.14f;\n\n  Tensor<float, 3> R = A.constant(gamma) + A * A.constant(alpha) + B * B.constant(beta);\n  Tensor<float, 3> S = A * alpha + B * beta + gamma;\n  Tensor<float, 3> T = gamma + alpha * A + beta * B;\n\n  for (int i = 0; i < 6*7*5; ++i) {\n    VERIFY_IS_APPROX(R(i), S(i));\n    VERIFY_IS_APPROX(R(i), T(i));\n  }\n}\n\nstatic void test_scalar_sugar_sub_div() {\n  Tensor<float, 3> A(6, 7, 5);\n  Tensor<float, 3> B(6, 7, 5);\n  A.setRandom();\n  B.setRandom();\n\n  const float alpha = 0.43f;\n  const float beta = 0.21f;\n  const float gamma = 0.14f;\n  const float delta = 0.32f;\n\n  Tensor<float, 3> R = A.constant(gamma) - A / A.constant(alpha)\n      - B.constant(beta) / B - A.constant(delta);\n  Tensor<float, 3> S = gamma - A / alpha - beta / B - delta;\n\n  for (int i = 0; i < 6*7*5; ++i) {\n    VERIFY_IS_APPROX(R(i), S(i));\n  }\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_sugar)\n{\n  CALL_SUBTEST(test_comparison_sugar());\n  CALL_SUBTEST(test_scalar_sugar_add_mul());\n  CALL_SUBTEST(test_scalar_sugar_sub_div());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_sycl.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016\n// Mehdi Goli    Codeplay Software Ltd.\n// Ralph Potter  Codeplay Software Ltd.\n// Luke Iwanski  Codeplay Software Ltd.\n// Contact: <eigen@codeplay.com>\n// Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n\n#define EIGEN_TEST_NO_LONGDOUBLE\n#define EIGEN_TEST_NO_COMPLEX\n\n#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int64_t\n#define EIGEN_USE_SYCL\n\n#include \"main.h\"\n#include <unsupported/Eigen/CXX11/Tensor>\n\nusing Eigen::array;\nusing Eigen::SyclDevice;\nusing Eigen::Tensor;\nusing Eigen::TensorMap;\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nvoid test_sycl_mem_transfers(const Eigen::SyclDevice &sycl_device) {\n  IndexType sizeDim1 = 5;\n  IndexType sizeDim2 = 5;\n  IndexType sizeDim3 = 1;\n  array<IndexType, 3> tensorRange = {{sizeDim1, sizeDim2, sizeDim3}};\n  Tensor<DataType, 3, DataLayout, IndexType> in1(tensorRange);\n  Tensor<DataType, 3, DataLayout, IndexType> out1(tensorRange);\n  Tensor<DataType, 3, DataLayout, IndexType> out2(tensorRange);\n  Tensor<DataType, 3, DataLayout, IndexType> out3(tensorRange);\n\n  in1 = in1.random();\n\n  DataType* gpu_data1  = static_cast<DataType*>(sycl_device.allocate(in1.size()*sizeof(DataType)));\n  DataType* gpu_data2  = static_cast<DataType*>(sycl_device.allocate(out1.size()*sizeof(DataType)));\n\n  TensorMap<Tensor<DataType, 3, DataLayout, IndexType>> gpu1(gpu_data1, tensorRange);\n  TensorMap<Tensor<DataType, 3, DataLayout, IndexType>> gpu2(gpu_data2, tensorRange);\n\n  sycl_device.memcpyHostToDevice(gpu_data1, in1.data(),(in1.size())*sizeof(DataType));\n  sycl_device.memcpyHostToDevice(gpu_data2, in1.data(),(in1.size())*sizeof(DataType));\n  gpu1.device(sycl_device) = gpu1 * 3.14f;\n  gpu2.device(sycl_device) = gpu2 * 2.7f;\n  sycl_device.memcpyDeviceToHost(out1.data(), gpu_data1,(out1.size())*sizeof(DataType));\n  sycl_device.memcpyDeviceToHost(out2.data(), gpu_data1,(out2.size())*sizeof(DataType));\n  sycl_device.memcpyDeviceToHost(out3.data(), gpu_data2,(out3.size())*sizeof(DataType));\n  sycl_device.synchronize();\n\n  for (IndexType i = 0; i < in1.size(); ++i) {\n  //  std::cout << \"SYCL DATA : \" << out1(i) << \"  vs  CPU DATA : \" << in1(i) * 3.14f << \"\\n\";\n    VERIFY_IS_APPROX(out1(i), in1(i) * 3.14f);\n    VERIFY_IS_APPROX(out2(i), in1(i) * 3.14f);\n    VERIFY_IS_APPROX(out3(i), in1(i) * 2.7f);\n  }\n\n  sycl_device.deallocate(gpu_data1);\n  sycl_device.deallocate(gpu_data2);\n}\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nvoid test_sycl_mem_sync(const Eigen::SyclDevice &sycl_device) {\n  IndexType size = 20;\n  array<IndexType, 1> tensorRange = {{size}};\n  Tensor<DataType, 1, DataLayout, IndexType> in1(tensorRange);\n  Tensor<DataType, 1, DataLayout, IndexType> in2(tensorRange);\n  Tensor<DataType, 1, DataLayout, IndexType> out(tensorRange);\n\n  in1 = in1.random();\n  in2 = in1;\n\n  DataType* gpu_data  = static_cast<DataType*>(sycl_device.allocate(in1.size()*sizeof(DataType)));\n\n  TensorMap<Tensor<DataType, 1, DataLayout, IndexType>> gpu1(gpu_data, tensorRange);\n  sycl_device.memcpyHostToDevice(gpu_data, in1.data(),(in1.size())*sizeof(DataType));\n  sycl_device.synchronize();\n  in1.setZero();\n\n  sycl_device.memcpyDeviceToHost(out.data(), gpu_data, out.size()*sizeof(DataType));\n  sycl_device.synchronize();\n\n  for (IndexType i = 0; i < in1.size(); ++i) {\n    VERIFY_IS_APPROX(out(i), in2(i));\n  }\n\n  sycl_device.deallocate(gpu_data);\n}\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nvoid test_sycl_mem_sync_offsets(const Eigen::SyclDevice &sycl_device) {\n  using tensor_type = Tensor<DataType, 1, DataLayout, IndexType>;\n  IndexType full_size = 32;\n  IndexType half_size = full_size / 2;\n  array<IndexType, 1> tensorRange = {{full_size}};\n  tensor_type in1(tensorRange);\n  tensor_type out(tensorRange);\n\n  DataType* gpu_data  = static_cast<DataType*>(sycl_device.allocate(full_size * sizeof(DataType)));\n  TensorMap<tensor_type> gpu1(gpu_data, tensorRange);\n\n  in1 = in1.random();\n  // Copy all data to device, then permute on copy back to host\n  sycl_device.memcpyHostToDevice(gpu_data, in1.data(), full_size * sizeof(DataType));\n  sycl_device.memcpyDeviceToHost(out.data(), gpu_data + half_size, half_size * sizeof(DataType));\n  sycl_device.memcpyDeviceToHost(out.data() + half_size, gpu_data, half_size * sizeof(DataType));\n\n  for (IndexType i = 0; i < half_size; ++i) {\n    VERIFY_IS_APPROX(out(i), in1(i + half_size));\n    VERIFY_IS_APPROX(out(i + half_size), in1(i));\n  }\n\n  in1 = in1.random();\n  out.setZero();\n  // Permute copies to device, then copy all back to host\n  sycl_device.memcpyHostToDevice(gpu_data + half_size, in1.data(), half_size * sizeof(DataType));\n  sycl_device.memcpyHostToDevice(gpu_data, in1.data() + half_size, half_size * sizeof(DataType));\n  sycl_device.memcpyDeviceToHost(out.data(), gpu_data, full_size * sizeof(DataType));\n\n  for (IndexType i = 0; i < half_size; ++i) {\n    VERIFY_IS_APPROX(out(i), in1(i + half_size));\n    VERIFY_IS_APPROX(out(i + half_size), in1(i));\n  }\n\n  in1 = in1.random();\n  out.setZero();\n  DataType* gpu_data_out  = static_cast<DataType*>(sycl_device.allocate(full_size * sizeof(DataType)));\n  TensorMap<tensor_type> gpu2(gpu_data_out, tensorRange);\n  // Copy all to device, permute copies on device, then copy all back to host\n  sycl_device.memcpyHostToDevice(gpu_data, in1.data(), full_size * sizeof(DataType));\n  sycl_device.memcpy(gpu_data_out + half_size, gpu_data, half_size * sizeof(DataType));\n  sycl_device.memcpy(gpu_data_out, gpu_data + half_size, half_size * sizeof(DataType));\n  sycl_device.memcpyDeviceToHost(out.data(), gpu_data_out, full_size * sizeof(DataType));\n\n  for (IndexType i = 0; i < half_size; ++i) {\n    VERIFY_IS_APPROX(out(i), in1(i + half_size));\n    VERIFY_IS_APPROX(out(i + half_size), in1(i));\n  }\n\n  sycl_device.deallocate(gpu_data_out);\n  sycl_device.deallocate(gpu_data);\n}\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nvoid test_sycl_memset_offsets(const Eigen::SyclDevice &sycl_device) {\n  using tensor_type = Tensor<DataType, 1, DataLayout, IndexType>;\n  IndexType full_size = 32;\n  IndexType half_size = full_size / 2;\n  array<IndexType, 1> tensorRange = {{full_size}};\n  tensor_type cpu_out(tensorRange);\n  tensor_type out(tensorRange);\n\n  cpu_out.setZero();\n\n  std::memset(cpu_out.data(), 0, half_size * sizeof(DataType));\n  std::memset(cpu_out.data() + half_size, 1, half_size * sizeof(DataType));\n\n  DataType* gpu_data  = static_cast<DataType*>(sycl_device.allocate(full_size * sizeof(DataType)));\n  TensorMap<tensor_type> gpu1(gpu_data, tensorRange);\n\n  sycl_device.memset(gpu_data, 0, half_size * sizeof(DataType));\n  sycl_device.memset(gpu_data + half_size, 1, half_size * sizeof(DataType));\n  sycl_device.memcpyDeviceToHost(out.data(), gpu_data, full_size * sizeof(DataType));\n\n  for (IndexType i = 0; i < full_size; ++i) {\n    VERIFY_IS_APPROX(out(i), cpu_out(i));\n  }\n\n  sycl_device.deallocate(gpu_data);\n}\n\ntemplate <typename DataType, int DataLayout, typename IndexType>\nvoid test_sycl_computations(const Eigen::SyclDevice &sycl_device) {\n\n  IndexType sizeDim1 = 100;\n  IndexType sizeDim2 = 10;\n  IndexType sizeDim3 = 20;\n  array<IndexType, 3> tensorRange = {{sizeDim1, sizeDim2, sizeDim3}};\n  Tensor<DataType, 3,DataLayout, IndexType> in1(tensorRange);\n  Tensor<DataType, 3,DataLayout, IndexType> in2(tensorRange);\n  Tensor<DataType, 3,DataLayout, IndexType> in3(tensorRange);\n  Tensor<DataType, 3,DataLayout, IndexType> out(tensorRange);\n\n  in2 = in2.random();\n  in3 = in3.random();\n\n  DataType * gpu_in1_data  = static_cast<DataType*>(sycl_device.allocate(in1.size()*sizeof(DataType)));\n  DataType * gpu_in2_data  = static_cast<DataType*>(sycl_device.allocate(in2.size()*sizeof(DataType)));\n  DataType * gpu_in3_data  = static_cast<DataType*>(sycl_device.allocate(in3.size()*sizeof(DataType)));\n  DataType * gpu_out_data =  static_cast<DataType*>(sycl_device.allocate(out.size()*sizeof(DataType)));\n\n  TensorMap<Tensor<DataType, 3, DataLayout, IndexType>> gpu_in1(gpu_in1_data, tensorRange);\n  TensorMap<Tensor<DataType, 3, DataLayout, IndexType>> gpu_in2(gpu_in2_data, tensorRange);\n  TensorMap<Tensor<DataType, 3, DataLayout, IndexType>> gpu_in3(gpu_in3_data, tensorRange);\n  TensorMap<Tensor<DataType, 3, DataLayout, IndexType>> gpu_out(gpu_out_data, tensorRange);\n\n  /// a=1.2f\n  gpu_in1.device(sycl_device) = gpu_in1.constant(1.2f);\n  sycl_device.memcpyDeviceToHost(in1.data(), gpu_in1_data ,(in1.size())*sizeof(DataType));\n  sycl_device.synchronize();\n\n  for (IndexType i = 0; i < sizeDim1; ++i) {\n    for (IndexType j = 0; j < sizeDim2; ++j) {\n      for (IndexType k = 0; k < sizeDim3; ++k) {\n        VERIFY_IS_APPROX(in1(i,j,k), 1.2f);\n      }\n    }\n  }\n  printf(\"a=1.2f Test passed\\n\");\n\n  /// a=b*1.2f\n  gpu_out.device(sycl_device) = gpu_in1 * 1.2f;\n  sycl_device.memcpyDeviceToHost(out.data(), gpu_out_data ,(out.size())*sizeof(DataType));\n  sycl_device.synchronize();\n\n  for (IndexType i = 0; i < sizeDim1; ++i) {\n    for (IndexType j = 0; j < sizeDim2; ++j) {\n      for (IndexType k = 0; k < sizeDim3; ++k) {\n        VERIFY_IS_APPROX(out(i,j,k),\n                         in1(i,j,k) * 1.2f);\n      }\n    }\n  }\n  printf(\"a=b*1.2f Test Passed\\n\");\n\n  /// c=a*b\n  sycl_device.memcpyHostToDevice(gpu_in2_data, in2.data(),(in2.size())*sizeof(DataType));\n  gpu_out.device(sycl_device) = gpu_in1 * gpu_in2;\n  sycl_device.memcpyDeviceToHost(out.data(), gpu_out_data,(out.size())*sizeof(DataType));\n  sycl_device.synchronize();\n\n  for (IndexType i = 0; i < sizeDim1; ++i) {\n    for (IndexType j = 0; j < sizeDim2; ++j) {\n      for (IndexType k = 0; k < sizeDim3; ++k) {\n        VERIFY_IS_APPROX(out(i,j,k),\n                         in1(i,j,k) *\n                             in2(i,j,k));\n      }\n    }\n  }\n  printf(\"c=a*b Test Passed\\n\");\n\n  /// c=a+b\n  gpu_out.device(sycl_device) = gpu_in1 + gpu_in2;\n  sycl_device.memcpyDeviceToHost(out.data(), gpu_out_data,(out.size())*sizeof(DataType));\n  sycl_device.synchronize();\n  for (IndexType i = 0; i < sizeDim1; ++i) {\n    for (IndexType j = 0; j < sizeDim2; ++j) {\n      for (IndexType k = 0; k < sizeDim3; ++k) {\n        VERIFY_IS_APPROX(out(i,j,k),\n                         in1(i,j,k) +\n                             in2(i,j,k));\n      }\n    }\n  }\n  printf(\"c=a+b Test Passed\\n\");\n\n  /// c=a*a\n  gpu_out.device(sycl_device) = gpu_in1 * gpu_in1;\n  sycl_device.memcpyDeviceToHost(out.data(), gpu_out_data,(out.size())*sizeof(DataType));\n  sycl_device.synchronize();\n  for (IndexType i = 0; i < sizeDim1; ++i) {\n    for (IndexType j = 0; j < sizeDim2; ++j) {\n      for (IndexType k = 0; k < sizeDim3; ++k) {\n        VERIFY_IS_APPROX(out(i,j,k),\n                         in1(i,j,k) *\n                             in1(i,j,k));\n      }\n    }\n  }\n  printf(\"c= a*a Test Passed\\n\");\n\n  //a*3.14f + b*2.7f\n  gpu_out.device(sycl_device) =  gpu_in1 * gpu_in1.constant(3.14f) + gpu_in2 * gpu_in2.constant(2.7f);\n  sycl_device.memcpyDeviceToHost(out.data(),gpu_out_data,(out.size())*sizeof(DataType));\n  sycl_device.synchronize();\n  for (IndexType i = 0; i < sizeDim1; ++i) {\n    for (IndexType j = 0; j < sizeDim2; ++j) {\n      for (IndexType k = 0; k < sizeDim3; ++k) {\n        VERIFY_IS_APPROX(out(i,j,k),\n                         in1(i,j,k) * 3.14f\n                       + in2(i,j,k) * 2.7f);\n      }\n    }\n  }\n  printf(\"a*3.14f + b*2.7f Test Passed\\n\");\n\n  ///d= (a>0.5? b:c)\n  sycl_device.memcpyHostToDevice(gpu_in3_data, in3.data(),(in3.size())*sizeof(DataType));\n  gpu_out.device(sycl_device) =(gpu_in1 > gpu_in1.constant(0.5f)).select(gpu_in2, gpu_in3);\n  sycl_device.memcpyDeviceToHost(out.data(), gpu_out_data,(out.size())*sizeof(DataType));\n  sycl_device.synchronize();\n  for (IndexType i = 0; i < sizeDim1; ++i) {\n    for (IndexType j = 0; j < sizeDim2; ++j) {\n      for (IndexType k = 0; k < sizeDim3; ++k) {\n        VERIFY_IS_APPROX(out(i, j, k), (in1(i, j, k) > 0.5f)\n                                                ? in2(i, j, k)\n                                                : in3(i, j, k));\n      }\n    }\n  }\n  printf(\"d= (a>0.5? b:c) Test Passed\\n\");\n  sycl_device.deallocate(gpu_in1_data);\n  sycl_device.deallocate(gpu_in2_data);\n  sycl_device.deallocate(gpu_in3_data);\n  sycl_device.deallocate(gpu_out_data);\n}\ntemplate<typename Scalar1, typename Scalar2,  int DataLayout, typename IndexType>\nstatic void test_sycl_cast(const Eigen::SyclDevice& sycl_device){\n    IndexType size = 20;\n    array<IndexType, 1> tensorRange = {{size}};\n    Tensor<Scalar1, 1, DataLayout, IndexType> in(tensorRange);\n    Tensor<Scalar2, 1, DataLayout, IndexType> out(tensorRange);\n    Tensor<Scalar2, 1, DataLayout, IndexType> out_host(tensorRange);\n\n    in = in.random();\n\n    Scalar1* gpu_in_data  = static_cast<Scalar1*>(sycl_device.allocate(in.size()*sizeof(Scalar1)));\n    Scalar2 * gpu_out_data =  static_cast<Scalar2*>(sycl_device.allocate(out.size()*sizeof(Scalar2)));\n\n    TensorMap<Tensor<Scalar1, 1, DataLayout, IndexType>> gpu_in(gpu_in_data, tensorRange);\n    TensorMap<Tensor<Scalar2, 1, DataLayout, IndexType>> gpu_out(gpu_out_data, tensorRange);\n    sycl_device.memcpyHostToDevice(gpu_in_data, in.data(),(in.size())*sizeof(Scalar1));\n    gpu_out.device(sycl_device) = gpu_in. template cast<Scalar2>();\n    sycl_device.memcpyDeviceToHost(out.data(), gpu_out_data, out.size()*sizeof(Scalar2));\n    out_host = in. template cast<Scalar2>();\n    for(IndexType i=0; i< size; i++)\n    {\n      VERIFY_IS_APPROX(out(i), out_host(i));\n    }\n    printf(\"cast Test Passed\\n\");\n    sycl_device.deallocate(gpu_in_data);\n    sycl_device.deallocate(gpu_out_data);\n}\ntemplate<typename DataType, typename dev_Selector> void sycl_computing_test_per_device(dev_Selector s){\n  QueueInterface queueInterface(s);\n  auto sycl_device = Eigen::SyclDevice(&queueInterface);\n  test_sycl_mem_transfers<DataType, RowMajor, int64_t>(sycl_device);\n  test_sycl_computations<DataType, RowMajor, int64_t>(sycl_device);\n  test_sycl_mem_sync<DataType, RowMajor, int64_t>(sycl_device);\n  test_sycl_mem_sync_offsets<DataType, RowMajor, int64_t>(sycl_device);\n  test_sycl_memset_offsets<DataType, RowMajor, int64_t>(sycl_device);\n  test_sycl_mem_transfers<DataType, ColMajor, int64_t>(sycl_device);\n  test_sycl_computations<DataType, ColMajor, int64_t>(sycl_device);\n  test_sycl_mem_sync<DataType, ColMajor, int64_t>(sycl_device);\n  test_sycl_cast<DataType, int, RowMajor, int64_t>(sycl_device);\n  test_sycl_cast<DataType, int, ColMajor, int64_t>(sycl_device);\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_sycl) {\n  for (const auto& device :Eigen::get_sycl_supported_devices()) {\n    CALL_SUBTEST(sycl_computing_test_per_device<float>(device));\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_symmetry.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2013 Christian Seiler <christian@iwakd.de>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n#include <Eigen/CXX11/TensorSymmetry>\n\n#include <map>\n#include <set>\n\nusing Eigen::Tensor;\nusing Eigen::SGroup;\nusing Eigen::DynamicSGroup;\nusing Eigen::StaticSGroup;\nusing Eigen::Symmetry;\nusing Eigen::AntiSymmetry;\nusing Eigen::Hermiticity;\nusing Eigen::AntiHermiticity;\n\nusing Eigen::NegationFlag;\nusing Eigen::ConjugationFlag;\nusing Eigen::GlobalZeroFlag;\nusing Eigen::GlobalRealFlag;\nusing Eigen::GlobalImagFlag;\n\n// helper function to determine if the compiler intantiated a static\n// or dynamic symmetry group\ntemplate<typename... Sym>\nbool isDynGroup(StaticSGroup<Sym...> const& dummy)\n{\n  (void)dummy;\n  return false;\n}\n\nbool isDynGroup(DynamicSGroup const& dummy)\n{\n  (void)dummy;\n  return true;\n}\n\n// helper class for checking that the symmetry groups are correct\nstruct checkIdx {\n  template<typename ArrType>\n  static inline int doCheck_(ArrType e, int flags, int dummy, std::set<uint64_t>& found, std::map<uint64_t, int> const& expected)\n  {\n    // use decimal representation of value\n    uint64_t value = e[0];\n    for (std::size_t i = 1; i < e.size(); i++)\n      value = value * 10 + e[i];\n\n    // we want to make sure that we find each element\n    auto it = expected.find(value);\n    VERIFY((it != expected.end()));\n    VERIFY_IS_EQUAL(it->second, flags);\n\n    // we want to make sure we only have each element once;\n    // set::insert returns true for the second part of the pair\n    // if the element was really inserted and not already there\n    auto p = found.insert(value);\n    VERIFY((p.second));\n\n    return dummy;\n  }\n\n  static inline int run(std::vector<int> e, int flags, int dummy, std::set<uint64_t>& found, std::map<uint64_t, int> const& expected)\n  {\n    return doCheck_(e, flags, dummy, found, expected);\n  }\n\n  template<std::size_t N>\n  static inline int run(std::array<int, N> e, int flags, int dummy, std::set<uint64_t>& found, std::map<uint64_t, int> const& expected)\n  {\n    return doCheck_(e, flags, dummy, found, expected);\n  }\n};\n\nstatic void test_symgroups_static()\n{\n  std::array<int, 7> identity{{0,1,2,3,4,5,6}};\n\n  // Simple static symmetry group\n  StaticSGroup<\n    AntiSymmetry<0,1>,\n    Hermiticity<0,2>\n  > group;\n\n  std::set<uint64_t> found;\n  std::map<uint64_t, int> expected;\n  expected[ 123456] = 0;\n  expected[1023456] = NegationFlag;\n  expected[2103456] = ConjugationFlag;\n  expected[1203456] = ConjugationFlag | NegationFlag;\n  expected[2013456] = ConjugationFlag | NegationFlag;\n  expected[ 213456] = ConjugationFlag;\n\n  VERIFY_IS_EQUAL(group.size(), 6u);\n  VERIFY_IS_EQUAL(group.globalFlags(), GlobalImagFlag);\n  group.apply<checkIdx, int>(identity, 0, found, expected);\n  VERIFY_IS_EQUAL(found.size(), 6u);\n}\n\nstatic void test_symgroups_dynamic()\n{\n  std::vector<int> identity;\n  for (int i = 0; i <= 6; i++)\n    identity.push_back(i);\n\n  // Simple dynamic symmetry group\n  DynamicSGroup group;\n  group.add(0,1,NegationFlag);\n  group.add(0,2,ConjugationFlag);\n\n  VERIFY_IS_EQUAL(group.size(), 6u);\n  VERIFY_IS_EQUAL(group.globalFlags(), GlobalImagFlag);\n\n  std::set<uint64_t> found;\n  std::map<uint64_t, int> expected;\n  expected[ 123456] = 0;\n  expected[1023456] = NegationFlag;\n  expected[2103456] = ConjugationFlag;\n  expected[1203456] = ConjugationFlag | NegationFlag;\n  expected[2013456] = ConjugationFlag | NegationFlag;\n  expected[ 213456] = ConjugationFlag;\n\n  VERIFY_IS_EQUAL(group.size(), 6u);\n  VERIFY_IS_EQUAL(group.globalFlags(), GlobalImagFlag);\n  group.apply<checkIdx, int>(identity, 0, found, expected);\n  VERIFY_IS_EQUAL(found.size(), 6u);\n}\n\nstatic void test_symgroups_selection()\n{\n  std::array<int, 7> identity7{{0,1,2,3,4,5,6}};\n  std::array<int, 10> identity10{{0,1,2,3,4,5,6,7,8,9}};\n\n  {\n    // Do the same test as in test_symgroups_static but\n    // require selection via SGroup\n    SGroup<\n      AntiSymmetry<0,1>,\n      Hermiticity<0,2>\n    > group;\n\n    std::set<uint64_t> found;\n    std::map<uint64_t, int> expected;\n    expected[ 123456] = 0;\n    expected[1023456] = NegationFlag;\n    expected[2103456] = ConjugationFlag;\n    expected[1203456] = ConjugationFlag | NegationFlag;\n    expected[2013456] = ConjugationFlag | NegationFlag;\n    expected[ 213456] = ConjugationFlag;\n\n    VERIFY(!isDynGroup(group));\n    VERIFY_IS_EQUAL(group.size(), 6u);\n    VERIFY_IS_EQUAL(group.globalFlags(), GlobalImagFlag);\n    group.apply<checkIdx, int>(identity7, 0, found, expected);\n    VERIFY_IS_EQUAL(found.size(), 6u);\n  }\n\n  {\n    // simple factorizing group: 5 generators, 2^5 = 32 elements\n    // selection should make this dynamic, although static group\n    // can still be reasonably generated\n    SGroup<\n      Symmetry<0,1>,\n      Symmetry<2,3>,\n      Symmetry<4,5>,\n      Symmetry<6,7>,\n      Symmetry<8,9>\n    > group;\n\n    std::set<uint64_t> found;\n    std::map<uint64_t, int> expected;\n    expected[ 123456789] = 0; expected[ 123456798] = 0; expected[ 123457689] = 0; expected[ 123457698] = 0;\n    expected[ 123546789] = 0; expected[ 123546798] = 0; expected[ 123547689] = 0; expected[ 123547698] = 0;\n    expected[ 132456789] = 0; expected[ 132456798] = 0; expected[ 132457689] = 0; expected[ 132457698] = 0;\n    expected[ 132546789] = 0; expected[ 132546798] = 0; expected[ 132547689] = 0; expected[ 132547698] = 0;\n    expected[1023456789] = 0; expected[1023456798] = 0; expected[1023457689] = 0; expected[1023457698] = 0;\n    expected[1023546789] = 0; expected[1023546798] = 0; expected[1023547689] = 0; expected[1023547698] = 0;\n    expected[1032456789] = 0; expected[1032456798] = 0; expected[1032457689] = 0; expected[1032457698] = 0;\n    expected[1032546789] = 0; expected[1032546798] = 0; expected[1032547689] = 0; expected[1032547698] = 0;\n\n    VERIFY(isDynGroup(group));\n    VERIFY_IS_EQUAL(group.size(), 32u);\n    VERIFY_IS_EQUAL(group.globalFlags(), 0);\n    group.apply<checkIdx, int>(identity10, 0, found, expected);\n    VERIFY_IS_EQUAL(found.size(), 32u);\n\n    // no verify that we could also generate a static group\n    // with these generators\n    found.clear();\n    StaticSGroup<\n      Symmetry<0,1>,\n      Symmetry<2,3>,\n      Symmetry<4,5>,\n      Symmetry<6,7>,\n      Symmetry<8,9>\n    > group_static;\n    VERIFY_IS_EQUAL(group_static.size(), 32u);\n    VERIFY_IS_EQUAL(group_static.globalFlags(), 0);\n    group_static.apply<checkIdx, int>(identity10, 0, found, expected);\n    VERIFY_IS_EQUAL(found.size(), 32u);\n  }\n\n  {\n    // try to create a HUGE group\n    SGroup<\n      Symmetry<0,1>,\n      Symmetry<1,2>,\n      Symmetry<2,3>,\n      Symmetry<3,4>,\n      Symmetry<4,5>,\n      Symmetry<5,6>\n    > group;\n\n    std::set<uint64_t> found;\n    uint64_t pre_expected[5040] = {\n       123456, 1023456,  213456, 2013456, 1203456, 2103456,  132456, 1032456,  312456, 3012456, 1302456, 3102456,\n       231456, 2031456,  321456, 3021456, 2301456, 3201456, 1230456, 2130456, 1320456, 3120456, 2310456, 3210456,\n       124356, 1024356,  214356, 2014356, 1204356, 2104356,  142356, 1042356,  412356, 4012356, 1402356, 4102356,\n       241356, 2041356,  421356, 4021356, 2401356, 4201356, 1240356, 2140356, 1420356, 4120356, 2410356, 4210356,\n       134256, 1034256,  314256, 3014256, 1304256, 3104256,  143256, 1043256,  413256, 4013256, 1403256, 4103256,\n       341256, 3041256,  431256, 4031256, 3401256, 4301256, 1340256, 3140256, 1430256, 4130256, 3410256, 4310256,\n       234156, 2034156,  324156, 3024156, 2304156, 3204156,  243156, 2043156,  423156, 4023156, 2403156, 4203156,\n       342156, 3042156,  432156, 4032156, 3402156, 4302156, 2340156, 3240156, 2430156, 4230156, 3420156, 4320156,\n      1234056, 2134056, 1324056, 3124056, 2314056, 3214056, 1243056, 2143056, 1423056, 4123056, 2413056, 4213056,\n      1342056, 3142056, 1432056, 4132056, 3412056, 4312056, 2341056, 3241056, 2431056, 4231056, 3421056, 4321056,\n       123546, 1023546,  213546, 2013546, 1203546, 2103546,  132546, 1032546,  312546, 3012546, 1302546, 3102546,\n       231546, 2031546,  321546, 3021546, 2301546, 3201546, 1230546, 2130546, 1320546, 3120546, 2310546, 3210546,\n       125346, 1025346,  215346, 2015346, 1205346, 2105346,  152346, 1052346,  512346, 5012346, 1502346, 5102346,\n       251346, 2051346,  521346, 5021346, 2501346, 5201346, 1250346, 2150346, 1520346, 5120346, 2510346, 5210346,\n       135246, 1035246,  315246, 3015246, 1305246, 3105246,  153246, 1053246,  513246, 5013246, 1503246, 5103246,\n       351246, 3051246,  531246, 5031246, 3501246, 5301246, 1350246, 3150246, 1530246, 5130246, 3510246, 5310246,\n       235146, 2035146,  325146, 3025146, 2305146, 3205146,  253146, 2053146,  523146, 5023146, 2503146, 5203146,\n       352146, 3052146,  532146, 5032146, 3502146, 5302146, 2350146, 3250146, 2530146, 5230146, 3520146, 5320146,\n      1235046, 2135046, 1325046, 3125046, 2315046, 3215046, 1253046, 2153046, 1523046, 5123046, 2513046, 5213046,\n      1352046, 3152046, 1532046, 5132046, 3512046, 5312046, 2351046, 3251046, 2531046, 5231046, 3521046, 5321046,\n       124536, 1024536,  214536, 2014536, 1204536, 2104536,  142536, 1042536,  412536, 4012536, 1402536, 4102536,\n       241536, 2041536,  421536, 4021536, 2401536, 4201536, 1240536, 2140536, 1420536, 4120536, 2410536, 4210536,\n       125436, 1025436,  215436, 2015436, 1205436, 2105436,  152436, 1052436,  512436, 5012436, 1502436, 5102436,\n       251436, 2051436,  521436, 5021436, 2501436, 5201436, 1250436, 2150436, 1520436, 5120436, 2510436, 5210436,\n       145236, 1045236,  415236, 4015236, 1405236, 4105236,  154236, 1054236,  514236, 5014236, 1504236, 5104236,\n       451236, 4051236,  541236, 5041236, 4501236, 5401236, 1450236, 4150236, 1540236, 5140236, 4510236, 5410236,\n       245136, 2045136,  425136, 4025136, 2405136, 4205136,  254136, 2054136,  524136, 5024136, 2504136, 5204136,\n       452136, 4052136,  542136, 5042136, 4502136, 5402136, 2450136, 4250136, 2540136, 5240136, 4520136, 5420136,\n      1245036, 2145036, 1425036, 4125036, 2415036, 4215036, 1254036, 2154036, 1524036, 5124036, 2514036, 5214036,\n      1452036, 4152036, 1542036, 5142036, 4512036, 5412036, 2451036, 4251036, 2541036, 5241036, 4521036, 5421036,\n       134526, 1034526,  314526, 3014526, 1304526, 3104526,  143526, 1043526,  413526, 4013526, 1403526, 4103526,\n       341526, 3041526,  431526, 4031526, 3401526, 4301526, 1340526, 3140526, 1430526, 4130526, 3410526, 4310526,\n       135426, 1035426,  315426, 3015426, 1305426, 3105426,  153426, 1053426,  513426, 5013426, 1503426, 5103426,\n       351426, 3051426,  531426, 5031426, 3501426, 5301426, 1350426, 3150426, 1530426, 5130426, 3510426, 5310426,\n       145326, 1045326,  415326, 4015326, 1405326, 4105326,  154326, 1054326,  514326, 5014326, 1504326, 5104326,\n       451326, 4051326,  541326, 5041326, 4501326, 5401326, 1450326, 4150326, 1540326, 5140326, 4510326, 5410326,\n       345126, 3045126,  435126, 4035126, 3405126, 4305126,  354126, 3054126,  534126, 5034126, 3504126, 5304126,\n       453126, 4053126,  543126, 5043126, 4503126, 5403126, 3450126, 4350126, 3540126, 5340126, 4530126, 5430126,\n      1345026, 3145026, 1435026, 4135026, 3415026, 4315026, 1354026, 3154026, 1534026, 5134026, 3514026, 5314026,\n      1453026, 4153026, 1543026, 5143026, 4513026, 5413026, 3451026, 4351026, 3541026, 5341026, 4531026, 5431026,\n       234516, 2034516,  324516, 3024516, 2304516, 3204516,  243516, 2043516,  423516, 4023516, 2403516, 4203516,\n       342516, 3042516,  432516, 4032516, 3402516, 4302516, 2340516, 3240516, 2430516, 4230516, 3420516, 4320516,\n       235416, 2035416,  325416, 3025416, 2305416, 3205416,  253416, 2053416,  523416, 5023416, 2503416, 5203416,\n       352416, 3052416,  532416, 5032416, 3502416, 5302416, 2350416, 3250416, 2530416, 5230416, 3520416, 5320416,\n       245316, 2045316,  425316, 4025316, 2405316, 4205316,  254316, 2054316,  524316, 5024316, 2504316, 5204316,\n       452316, 4052316,  542316, 5042316, 4502316, 5402316, 2450316, 4250316, 2540316, 5240316, 4520316, 5420316,\n       345216, 3045216,  435216, 4035216, 3405216, 4305216,  354216, 3054216,  534216, 5034216, 3504216, 5304216,\n       453216, 4053216,  543216, 5043216, 4503216, 5403216, 3450216, 4350216, 3540216, 5340216, 4530216, 5430216,\n      2345016, 3245016, 2435016, 4235016, 3425016, 4325016, 2354016, 3254016, 2534016, 5234016, 3524016, 5324016,\n      2453016, 4253016, 2543016, 5243016, 4523016, 5423016, 3452016, 4352016, 3542016, 5342016, 4532016, 5432016,\n      1234506, 2134506, 1324506, 3124506, 2314506, 3214506, 1243506, 2143506, 1423506, 4123506, 2413506, 4213506,\n      1342506, 3142506, 1432506, 4132506, 3412506, 4312506, 2341506, 3241506, 2431506, 4231506, 3421506, 4321506,\n      1235406, 2135406, 1325406, 3125406, 2315406, 3215406, 1253406, 2153406, 1523406, 5123406, 2513406, 5213406,\n      1352406, 3152406, 1532406, 5132406, 3512406, 5312406, 2351406, 3251406, 2531406, 5231406, 3521406, 5321406,\n      1245306, 2145306, 1425306, 4125306, 2415306, 4215306, 1254306, 2154306, 1524306, 5124306, 2514306, 5214306,\n      1452306, 4152306, 1542306, 5142306, 4512306, 5412306, 2451306, 4251306, 2541306, 5241306, 4521306, 5421306,\n      1345206, 3145206, 1435206, 4135206, 3415206, 4315206, 1354206, 3154206, 1534206, 5134206, 3514206, 5314206,\n      1453206, 4153206, 1543206, 5143206, 4513206, 5413206, 3451206, 4351206, 3541206, 5341206, 4531206, 5431206,\n      2345106, 3245106, 2435106, 4235106, 3425106, 4325106, 2354106, 3254106, 2534106, 5234106, 3524106, 5324106,\n      2453106, 4253106, 2543106, 5243106, 4523106, 5423106, 3452106, 4352106, 3542106, 5342106, 4532106, 5432106,\n       123465, 1023465,  213465, 2013465, 1203465, 2103465,  132465, 1032465,  312465, 3012465, 1302465, 3102465,\n       231465, 2031465,  321465, 3021465, 2301465, 3201465, 1230465, 2130465, 1320465, 3120465, 2310465, 3210465,\n       124365, 1024365,  214365, 2014365, 1204365, 2104365,  142365, 1042365,  412365, 4012365, 1402365, 4102365,\n       241365, 2041365,  421365, 4021365, 2401365, 4201365, 1240365, 2140365, 1420365, 4120365, 2410365, 4210365,\n       134265, 1034265,  314265, 3014265, 1304265, 3104265,  143265, 1043265,  413265, 4013265, 1403265, 4103265,\n       341265, 3041265,  431265, 4031265, 3401265, 4301265, 1340265, 3140265, 1430265, 4130265, 3410265, 4310265,\n       234165, 2034165,  324165, 3024165, 2304165, 3204165,  243165, 2043165,  423165, 4023165, 2403165, 4203165,\n       342165, 3042165,  432165, 4032165, 3402165, 4302165, 2340165, 3240165, 2430165, 4230165, 3420165, 4320165,\n      1234065, 2134065, 1324065, 3124065, 2314065, 3214065, 1243065, 2143065, 1423065, 4123065, 2413065, 4213065,\n      1342065, 3142065, 1432065, 4132065, 3412065, 4312065, 2341065, 3241065, 2431065, 4231065, 3421065, 4321065,\n       123645, 1023645,  213645, 2013645, 1203645, 2103645,  132645, 1032645,  312645, 3012645, 1302645, 3102645,\n       231645, 2031645,  321645, 3021645, 2301645, 3201645, 1230645, 2130645, 1320645, 3120645, 2310645, 3210645,\n       126345, 1026345,  216345, 2016345, 1206345, 2106345,  162345, 1062345,  612345, 6012345, 1602345, 6102345,\n       261345, 2061345,  621345, 6021345, 2601345, 6201345, 1260345, 2160345, 1620345, 6120345, 2610345, 6210345,\n       136245, 1036245,  316245, 3016245, 1306245, 3106245,  163245, 1063245,  613245, 6013245, 1603245, 6103245,\n       361245, 3061245,  631245, 6031245, 3601245, 6301245, 1360245, 3160245, 1630245, 6130245, 3610245, 6310245,\n       236145, 2036145,  326145, 3026145, 2306145, 3206145,  263145, 2063145,  623145, 6023145, 2603145, 6203145,\n       362145, 3062145,  632145, 6032145, 3602145, 6302145, 2360145, 3260145, 2630145, 6230145, 3620145, 6320145,\n      1236045, 2136045, 1326045, 3126045, 2316045, 3216045, 1263045, 2163045, 1623045, 6123045, 2613045, 6213045,\n      1362045, 3162045, 1632045, 6132045, 3612045, 6312045, 2361045, 3261045, 2631045, 6231045, 3621045, 6321045,\n       124635, 1024635,  214635, 2014635, 1204635, 2104635,  142635, 1042635,  412635, 4012635, 1402635, 4102635,\n       241635, 2041635,  421635, 4021635, 2401635, 4201635, 1240635, 2140635, 1420635, 4120635, 2410635, 4210635,\n       126435, 1026435,  216435, 2016435, 1206435, 2106435,  162435, 1062435,  612435, 6012435, 1602435, 6102435,\n       261435, 2061435,  621435, 6021435, 2601435, 6201435, 1260435, 2160435, 1620435, 6120435, 2610435, 6210435,\n       146235, 1046235,  416235, 4016235, 1406235, 4106235,  164235, 1064235,  614235, 6014235, 1604235, 6104235,\n       461235, 4061235,  641235, 6041235, 4601235, 6401235, 1460235, 4160235, 1640235, 6140235, 4610235, 6410235,\n       246135, 2046135,  426135, 4026135, 2406135, 4206135,  264135, 2064135,  624135, 6024135, 2604135, 6204135,\n       462135, 4062135,  642135, 6042135, 4602135, 6402135, 2460135, 4260135, 2640135, 6240135, 4620135, 6420135,\n      1246035, 2146035, 1426035, 4126035, 2416035, 4216035, 1264035, 2164035, 1624035, 6124035, 2614035, 6214035,\n      1462035, 4162035, 1642035, 6142035, 4612035, 6412035, 2461035, 4261035, 2641035, 6241035, 4621035, 6421035,\n       134625, 1034625,  314625, 3014625, 1304625, 3104625,  143625, 1043625,  413625, 4013625, 1403625, 4103625,\n       341625, 3041625,  431625, 4031625, 3401625, 4301625, 1340625, 3140625, 1430625, 4130625, 3410625, 4310625,\n       136425, 1036425,  316425, 3016425, 1306425, 3106425,  163425, 1063425,  613425, 6013425, 1603425, 6103425,\n       361425, 3061425,  631425, 6031425, 3601425, 6301425, 1360425, 3160425, 1630425, 6130425, 3610425, 6310425,\n       146325, 1046325,  416325, 4016325, 1406325, 4106325,  164325, 1064325,  614325, 6014325, 1604325, 6104325,\n       461325, 4061325,  641325, 6041325, 4601325, 6401325, 1460325, 4160325, 1640325, 6140325, 4610325, 6410325,\n       346125, 3046125,  436125, 4036125, 3406125, 4306125,  364125, 3064125,  634125, 6034125, 3604125, 6304125,\n       463125, 4063125,  643125, 6043125, 4603125, 6403125, 3460125, 4360125, 3640125, 6340125, 4630125, 6430125,\n      1346025, 3146025, 1436025, 4136025, 3416025, 4316025, 1364025, 3164025, 1634025, 6134025, 3614025, 6314025,\n      1463025, 4163025, 1643025, 6143025, 4613025, 6413025, 3461025, 4361025, 3641025, 6341025, 4631025, 6431025,\n       234615, 2034615,  324615, 3024615, 2304615, 3204615,  243615, 2043615,  423615, 4023615, 2403615, 4203615,\n       342615, 3042615,  432615, 4032615, 3402615, 4302615, 2340615, 3240615, 2430615, 4230615, 3420615, 4320615,\n       236415, 2036415,  326415, 3026415, 2306415, 3206415,  263415, 2063415,  623415, 6023415, 2603415, 6203415,\n       362415, 3062415,  632415, 6032415, 3602415, 6302415, 2360415, 3260415, 2630415, 6230415, 3620415, 6320415,\n       246315, 2046315,  426315, 4026315, 2406315, 4206315,  264315, 2064315,  624315, 6024315, 2604315, 6204315,\n       462315, 4062315,  642315, 6042315, 4602315, 6402315, 2460315, 4260315, 2640315, 6240315, 4620315, 6420315,\n       346215, 3046215,  436215, 4036215, 3406215, 4306215,  364215, 3064215,  634215, 6034215, 3604215, 6304215,\n       463215, 4063215,  643215, 6043215, 4603215, 6403215, 3460215, 4360215, 3640215, 6340215, 4630215, 6430215,\n      2346015, 3246015, 2436015, 4236015, 3426015, 4326015, 2364015, 3264015, 2634015, 6234015, 3624015, 6324015,\n      2463015, 4263015, 2643015, 6243015, 4623015, 6423015, 3462015, 4362015, 3642015, 6342015, 4632015, 6432015,\n      1234605, 2134605, 1324605, 3124605, 2314605, 3214605, 1243605, 2143605, 1423605, 4123605, 2413605, 4213605,\n      1342605, 3142605, 1432605, 4132605, 3412605, 4312605, 2341605, 3241605, 2431605, 4231605, 3421605, 4321605,\n      1236405, 2136405, 1326405, 3126405, 2316405, 3216405, 1263405, 2163405, 1623405, 6123405, 2613405, 6213405,\n      1362405, 3162405, 1632405, 6132405, 3612405, 6312405, 2361405, 3261405, 2631405, 6231405, 3621405, 6321405,\n      1246305, 2146305, 1426305, 4126305, 2416305, 4216305, 1264305, 2164305, 1624305, 6124305, 2614305, 6214305,\n      1462305, 4162305, 1642305, 6142305, 4612305, 6412305, 2461305, 4261305, 2641305, 6241305, 4621305, 6421305,\n      1346205, 3146205, 1436205, 4136205, 3416205, 4316205, 1364205, 3164205, 1634205, 6134205, 3614205, 6314205,\n      1463205, 4163205, 1643205, 6143205, 4613205, 6413205, 3461205, 4361205, 3641205, 6341205, 4631205, 6431205,\n      2346105, 3246105, 2436105, 4236105, 3426105, 4326105, 2364105, 3264105, 2634105, 6234105, 3624105, 6324105,\n      2463105, 4263105, 2643105, 6243105, 4623105, 6423105, 3462105, 4362105, 3642105, 6342105, 4632105, 6432105,\n       123564, 1023564,  213564, 2013564, 1203564, 2103564,  132564, 1032564,  312564, 3012564, 1302564, 3102564,\n       231564, 2031564,  321564, 3021564, 2301564, 3201564, 1230564, 2130564, 1320564, 3120564, 2310564, 3210564,\n       125364, 1025364,  215364, 2015364, 1205364, 2105364,  152364, 1052364,  512364, 5012364, 1502364, 5102364,\n       251364, 2051364,  521364, 5021364, 2501364, 5201364, 1250364, 2150364, 1520364, 5120364, 2510364, 5210364,\n       135264, 1035264,  315264, 3015264, 1305264, 3105264,  153264, 1053264,  513264, 5013264, 1503264, 5103264,\n       351264, 3051264,  531264, 5031264, 3501264, 5301264, 1350264, 3150264, 1530264, 5130264, 3510264, 5310264,\n       235164, 2035164,  325164, 3025164, 2305164, 3205164,  253164, 2053164,  523164, 5023164, 2503164, 5203164,\n       352164, 3052164,  532164, 5032164, 3502164, 5302164, 2350164, 3250164, 2530164, 5230164, 3520164, 5320164,\n      1235064, 2135064, 1325064, 3125064, 2315064, 3215064, 1253064, 2153064, 1523064, 5123064, 2513064, 5213064,\n      1352064, 3152064, 1532064, 5132064, 3512064, 5312064, 2351064, 3251064, 2531064, 5231064, 3521064, 5321064,\n       123654, 1023654,  213654, 2013654, 1203654, 2103654,  132654, 1032654,  312654, 3012654, 1302654, 3102654,\n       231654, 2031654,  321654, 3021654, 2301654, 3201654, 1230654, 2130654, 1320654, 3120654, 2310654, 3210654,\n       126354, 1026354,  216354, 2016354, 1206354, 2106354,  162354, 1062354,  612354, 6012354, 1602354, 6102354,\n       261354, 2061354,  621354, 6021354, 2601354, 6201354, 1260354, 2160354, 1620354, 6120354, 2610354, 6210354,\n       136254, 1036254,  316254, 3016254, 1306254, 3106254,  163254, 1063254,  613254, 6013254, 1603254, 6103254,\n       361254, 3061254,  631254, 6031254, 3601254, 6301254, 1360254, 3160254, 1630254, 6130254, 3610254, 6310254,\n       236154, 2036154,  326154, 3026154, 2306154, 3206154,  263154, 2063154,  623154, 6023154, 2603154, 6203154,\n       362154, 3062154,  632154, 6032154, 3602154, 6302154, 2360154, 3260154, 2630154, 6230154, 3620154, 6320154,\n      1236054, 2136054, 1326054, 3126054, 2316054, 3216054, 1263054, 2163054, 1623054, 6123054, 2613054, 6213054,\n      1362054, 3162054, 1632054, 6132054, 3612054, 6312054, 2361054, 3261054, 2631054, 6231054, 3621054, 6321054,\n       125634, 1025634,  215634, 2015634, 1205634, 2105634,  152634, 1052634,  512634, 5012634, 1502634, 5102634,\n       251634, 2051634,  521634, 5021634, 2501634, 5201634, 1250634, 2150634, 1520634, 5120634, 2510634, 5210634,\n       126534, 1026534,  216534, 2016534, 1206534, 2106534,  162534, 1062534,  612534, 6012534, 1602534, 6102534,\n       261534, 2061534,  621534, 6021534, 2601534, 6201534, 1260534, 2160534, 1620534, 6120534, 2610534, 6210534,\n       156234, 1056234,  516234, 5016234, 1506234, 5106234,  165234, 1065234,  615234, 6015234, 1605234, 6105234,\n       561234, 5061234,  651234, 6051234, 5601234, 6501234, 1560234, 5160234, 1650234, 6150234, 5610234, 6510234,\n       256134, 2056134,  526134, 5026134, 2506134, 5206134,  265134, 2065134,  625134, 6025134, 2605134, 6205134,\n       562134, 5062134,  652134, 6052134, 5602134, 6502134, 2560134, 5260134, 2650134, 6250134, 5620134, 6520134,\n      1256034, 2156034, 1526034, 5126034, 2516034, 5216034, 1265034, 2165034, 1625034, 6125034, 2615034, 6215034,\n      1562034, 5162034, 1652034, 6152034, 5612034, 6512034, 2561034, 5261034, 2651034, 6251034, 5621034, 6521034,\n       135624, 1035624,  315624, 3015624, 1305624, 3105624,  153624, 1053624,  513624, 5013624, 1503624, 5103624,\n       351624, 3051624,  531624, 5031624, 3501624, 5301624, 1350624, 3150624, 1530624, 5130624, 3510624, 5310624,\n       136524, 1036524,  316524, 3016524, 1306524, 3106524,  163524, 1063524,  613524, 6013524, 1603524, 6103524,\n       361524, 3061524,  631524, 6031524, 3601524, 6301524, 1360524, 3160524, 1630524, 6130524, 3610524, 6310524,\n       156324, 1056324,  516324, 5016324, 1506324, 5106324,  165324, 1065324,  615324, 6015324, 1605324, 6105324,\n       561324, 5061324,  651324, 6051324, 5601324, 6501324, 1560324, 5160324, 1650324, 6150324, 5610324, 6510324,\n       356124, 3056124,  536124, 5036124, 3506124, 5306124,  365124, 3065124,  635124, 6035124, 3605124, 6305124,\n       563124, 5063124,  653124, 6053124, 5603124, 6503124, 3560124, 5360124, 3650124, 6350124, 5630124, 6530124,\n      1356024, 3156024, 1536024, 5136024, 3516024, 5316024, 1365024, 3165024, 1635024, 6135024, 3615024, 6315024,\n      1563024, 5163024, 1653024, 6153024, 5613024, 6513024, 3561024, 5361024, 3651024, 6351024, 5631024, 6531024,\n       235614, 2035614,  325614, 3025614, 2305614, 3205614,  253614, 2053614,  523614, 5023614, 2503614, 5203614,\n       352614, 3052614,  532614, 5032614, 3502614, 5302614, 2350614, 3250614, 2530614, 5230614, 3520614, 5320614,\n       236514, 2036514,  326514, 3026514, 2306514, 3206514,  263514, 2063514,  623514, 6023514, 2603514, 6203514,\n       362514, 3062514,  632514, 6032514, 3602514, 6302514, 2360514, 3260514, 2630514, 6230514, 3620514, 6320514,\n       256314, 2056314,  526314, 5026314, 2506314, 5206314,  265314, 2065314,  625314, 6025314, 2605314, 6205314,\n       562314, 5062314,  652314, 6052314, 5602314, 6502314, 2560314, 5260314, 2650314, 6250314, 5620314, 6520314,\n       356214, 3056214,  536214, 5036214, 3506214, 5306214,  365214, 3065214,  635214, 6035214, 3605214, 6305214,\n       563214, 5063214,  653214, 6053214, 5603214, 6503214, 3560214, 5360214, 3650214, 6350214, 5630214, 6530214,\n      2356014, 3256014, 2536014, 5236014, 3526014, 5326014, 2365014, 3265014, 2635014, 6235014, 3625014, 6325014,\n      2563014, 5263014, 2653014, 6253014, 5623014, 6523014, 3562014, 5362014, 3652014, 6352014, 5632014, 6532014,\n      1235604, 2135604, 1325604, 3125604, 2315604, 3215604, 1253604, 2153604, 1523604, 5123604, 2513604, 5213604,\n      1352604, 3152604, 1532604, 5132604, 3512604, 5312604, 2351604, 3251604, 2531604, 5231604, 3521604, 5321604,\n      1236504, 2136504, 1326504, 3126504, 2316504, 3216504, 1263504, 2163504, 1623504, 6123504, 2613504, 6213504,\n      1362504, 3162504, 1632504, 6132504, 3612504, 6312504, 2361504, 3261504, 2631504, 6231504, 3621504, 6321504,\n      1256304, 2156304, 1526304, 5126304, 2516304, 5216304, 1265304, 2165304, 1625304, 6125304, 2615304, 6215304,\n      1562304, 5162304, 1652304, 6152304, 5612304, 6512304, 2561304, 5261304, 2651304, 6251304, 5621304, 6521304,\n      1356204, 3156204, 1536204, 5136204, 3516204, 5316204, 1365204, 3165204, 1635204, 6135204, 3615204, 6315204,\n      1563204, 5163204, 1653204, 6153204, 5613204, 6513204, 3561204, 5361204, 3651204, 6351204, 5631204, 6531204,\n      2356104, 3256104, 2536104, 5236104, 3526104, 5326104, 2365104, 3265104, 2635104, 6235104, 3625104, 6325104,\n      2563104, 5263104, 2653104, 6253104, 5623104, 6523104, 3562104, 5362104, 3652104, 6352104, 5632104, 6532104,\n       124563, 1024563,  214563, 2014563, 1204563, 2104563,  142563, 1042563,  412563, 4012563, 1402563, 4102563,\n       241563, 2041563,  421563, 4021563, 2401563, 4201563, 1240563, 2140563, 1420563, 4120563, 2410563, 4210563,\n       125463, 1025463,  215463, 2015463, 1205463, 2105463,  152463, 1052463,  512463, 5012463, 1502463, 5102463,\n       251463, 2051463,  521463, 5021463, 2501463, 5201463, 1250463, 2150463, 1520463, 5120463, 2510463, 5210463,\n       145263, 1045263,  415263, 4015263, 1405263, 4105263,  154263, 1054263,  514263, 5014263, 1504263, 5104263,\n       451263, 4051263,  541263, 5041263, 4501263, 5401263, 1450263, 4150263, 1540263, 5140263, 4510263, 5410263,\n       245163, 2045163,  425163, 4025163, 2405163, 4205163,  254163, 2054163,  524163, 5024163, 2504163, 5204163,\n       452163, 4052163,  542163, 5042163, 4502163, 5402163, 2450163, 4250163, 2540163, 5240163, 4520163, 5420163,\n      1245063, 2145063, 1425063, 4125063, 2415063, 4215063, 1254063, 2154063, 1524063, 5124063, 2514063, 5214063,\n      1452063, 4152063, 1542063, 5142063, 4512063, 5412063, 2451063, 4251063, 2541063, 5241063, 4521063, 5421063,\n       124653, 1024653,  214653, 2014653, 1204653, 2104653,  142653, 1042653,  412653, 4012653, 1402653, 4102653,\n       241653, 2041653,  421653, 4021653, 2401653, 4201653, 1240653, 2140653, 1420653, 4120653, 2410653, 4210653,\n       126453, 1026453,  216453, 2016453, 1206453, 2106453,  162453, 1062453,  612453, 6012453, 1602453, 6102453,\n       261453, 2061453,  621453, 6021453, 2601453, 6201453, 1260453, 2160453, 1620453, 6120453, 2610453, 6210453,\n       146253, 1046253,  416253, 4016253, 1406253, 4106253,  164253, 1064253,  614253, 6014253, 1604253, 6104253,\n       461253, 4061253,  641253, 6041253, 4601253, 6401253, 1460253, 4160253, 1640253, 6140253, 4610253, 6410253,\n       246153, 2046153,  426153, 4026153, 2406153, 4206153,  264153, 2064153,  624153, 6024153, 2604153, 6204153,\n       462153, 4062153,  642153, 6042153, 4602153, 6402153, 2460153, 4260153, 2640153, 6240153, 4620153, 6420153,\n      1246053, 2146053, 1426053, 4126053, 2416053, 4216053, 1264053, 2164053, 1624053, 6124053, 2614053, 6214053,\n      1462053, 4162053, 1642053, 6142053, 4612053, 6412053, 2461053, 4261053, 2641053, 6241053, 4621053, 6421053,\n       125643, 1025643,  215643, 2015643, 1205643, 2105643,  152643, 1052643,  512643, 5012643, 1502643, 5102643,\n       251643, 2051643,  521643, 5021643, 2501643, 5201643, 1250643, 2150643, 1520643, 5120643, 2510643, 5210643,\n       126543, 1026543,  216543, 2016543, 1206543, 2106543,  162543, 1062543,  612543, 6012543, 1602543, 6102543,\n       261543, 2061543,  621543, 6021543, 2601543, 6201543, 1260543, 2160543, 1620543, 6120543, 2610543, 6210543,\n       156243, 1056243,  516243, 5016243, 1506243, 5106243,  165243, 1065243,  615243, 6015243, 1605243, 6105243,\n       561243, 5061243,  651243, 6051243, 5601243, 6501243, 1560243, 5160243, 1650243, 6150243, 5610243, 6510243,\n       256143, 2056143,  526143, 5026143, 2506143, 5206143,  265143, 2065143,  625143, 6025143, 2605143, 6205143,\n       562143, 5062143,  652143, 6052143, 5602143, 6502143, 2560143, 5260143, 2650143, 6250143, 5620143, 6520143,\n      1256043, 2156043, 1526043, 5126043, 2516043, 5216043, 1265043, 2165043, 1625043, 6125043, 2615043, 6215043,\n      1562043, 5162043, 1652043, 6152043, 5612043, 6512043, 2561043, 5261043, 2651043, 6251043, 5621043, 6521043,\n       145623, 1045623,  415623, 4015623, 1405623, 4105623,  154623, 1054623,  514623, 5014623, 1504623, 5104623,\n       451623, 4051623,  541623, 5041623, 4501623, 5401623, 1450623, 4150623, 1540623, 5140623, 4510623, 5410623,\n       146523, 1046523,  416523, 4016523, 1406523, 4106523,  164523, 1064523,  614523, 6014523, 1604523, 6104523,\n       461523, 4061523,  641523, 6041523, 4601523, 6401523, 1460523, 4160523, 1640523, 6140523, 4610523, 6410523,\n       156423, 1056423,  516423, 5016423, 1506423, 5106423,  165423, 1065423,  615423, 6015423, 1605423, 6105423,\n       561423, 5061423,  651423, 6051423, 5601423, 6501423, 1560423, 5160423, 1650423, 6150423, 5610423, 6510423,\n       456123, 4056123,  546123, 5046123, 4506123, 5406123,  465123, 4065123,  645123, 6045123, 4605123, 6405123,\n       564123, 5064123,  654123, 6054123, 5604123, 6504123, 4560123, 5460123, 4650123, 6450123, 5640123, 6540123,\n      1456023, 4156023, 1546023, 5146023, 4516023, 5416023, 1465023, 4165023, 1645023, 6145023, 4615023, 6415023,\n      1564023, 5164023, 1654023, 6154023, 5614023, 6514023, 4561023, 5461023, 4651023, 6451023, 5641023, 6541023,\n       245613, 2045613,  425613, 4025613, 2405613, 4205613,  254613, 2054613,  524613, 5024613, 2504613, 5204613,\n       452613, 4052613,  542613, 5042613, 4502613, 5402613, 2450613, 4250613, 2540613, 5240613, 4520613, 5420613,\n       246513, 2046513,  426513, 4026513, 2406513, 4206513,  264513, 2064513,  624513, 6024513, 2604513, 6204513,\n       462513, 4062513,  642513, 6042513, 4602513, 6402513, 2460513, 4260513, 2640513, 6240513, 4620513, 6420513,\n       256413, 2056413,  526413, 5026413, 2506413, 5206413,  265413, 2065413,  625413, 6025413, 2605413, 6205413,\n       562413, 5062413,  652413, 6052413, 5602413, 6502413, 2560413, 5260413, 2650413, 6250413, 5620413, 6520413,\n       456213, 4056213,  546213, 5046213, 4506213, 5406213,  465213, 4065213,  645213, 6045213, 4605213, 6405213,\n       564213, 5064213,  654213, 6054213, 5604213, 6504213, 4560213, 5460213, 4650213, 6450213, 5640213, 6540213,\n      2456013, 4256013, 2546013, 5246013, 4526013, 5426013, 2465013, 4265013, 2645013, 6245013, 4625013, 6425013,\n      2564013, 5264013, 2654013, 6254013, 5624013, 6524013, 4562013, 5462013, 4652013, 6452013, 5642013, 6542013,\n      1245603, 2145603, 1425603, 4125603, 2415603, 4215603, 1254603, 2154603, 1524603, 5124603, 2514603, 5214603,\n      1452603, 4152603, 1542603, 5142603, 4512603, 5412603, 2451603, 4251603, 2541603, 5241603, 4521603, 5421603,\n      1246503, 2146503, 1426503, 4126503, 2416503, 4216503, 1264503, 2164503, 1624503, 6124503, 2614503, 6214503,\n      1462503, 4162503, 1642503, 6142503, 4612503, 6412503, 2461503, 4261503, 2641503, 6241503, 4621503, 6421503,\n      1256403, 2156403, 1526403, 5126403, 2516403, 5216403, 1265403, 2165403, 1625403, 6125403, 2615403, 6215403,\n      1562403, 5162403, 1652403, 6152403, 5612403, 6512403, 2561403, 5261403, 2651403, 6251403, 5621403, 6521403,\n      1456203, 4156203, 1546203, 5146203, 4516203, 5416203, 1465203, 4165203, 1645203, 6145203, 4615203, 6415203,\n      1564203, 5164203, 1654203, 6154203, 5614203, 6514203, 4561203, 5461203, 4651203, 6451203, 5641203, 6541203,\n      2456103, 4256103, 2546103, 5246103, 4526103, 5426103, 2465103, 4265103, 2645103, 6245103, 4625103, 6425103,\n      2564103, 5264103, 2654103, 6254103, 5624103, 6524103, 4562103, 5462103, 4652103, 6452103, 5642103, 6542103,\n       134562, 1034562,  314562, 3014562, 1304562, 3104562,  143562, 1043562,  413562, 4013562, 1403562, 4103562,\n       341562, 3041562,  431562, 4031562, 3401562, 4301562, 1340562, 3140562, 1430562, 4130562, 3410562, 4310562,\n       135462, 1035462,  315462, 3015462, 1305462, 3105462,  153462, 1053462,  513462, 5013462, 1503462, 5103462,\n       351462, 3051462,  531462, 5031462, 3501462, 5301462, 1350462, 3150462, 1530462, 5130462, 3510462, 5310462,\n       145362, 1045362,  415362, 4015362, 1405362, 4105362,  154362, 1054362,  514362, 5014362, 1504362, 5104362,\n       451362, 4051362,  541362, 5041362, 4501362, 5401362, 1450362, 4150362, 1540362, 5140362, 4510362, 5410362,\n       345162, 3045162,  435162, 4035162, 3405162, 4305162,  354162, 3054162,  534162, 5034162, 3504162, 5304162,\n       453162, 4053162,  543162, 5043162, 4503162, 5403162, 3450162, 4350162, 3540162, 5340162, 4530162, 5430162,\n      1345062, 3145062, 1435062, 4135062, 3415062, 4315062, 1354062, 3154062, 1534062, 5134062, 3514062, 5314062,\n      1453062, 4153062, 1543062, 5143062, 4513062, 5413062, 3451062, 4351062, 3541062, 5341062, 4531062, 5431062,\n       134652, 1034652,  314652, 3014652, 1304652, 3104652,  143652, 1043652,  413652, 4013652, 1403652, 4103652,\n       341652, 3041652,  431652, 4031652, 3401652, 4301652, 1340652, 3140652, 1430652, 4130652, 3410652, 4310652,\n       136452, 1036452,  316452, 3016452, 1306452, 3106452,  163452, 1063452,  613452, 6013452, 1603452, 6103452,\n       361452, 3061452,  631452, 6031452, 3601452, 6301452, 1360452, 3160452, 1630452, 6130452, 3610452, 6310452,\n       146352, 1046352,  416352, 4016352, 1406352, 4106352,  164352, 1064352,  614352, 6014352, 1604352, 6104352,\n       461352, 4061352,  641352, 6041352, 4601352, 6401352, 1460352, 4160352, 1640352, 6140352, 4610352, 6410352,\n       346152, 3046152,  436152, 4036152, 3406152, 4306152,  364152, 3064152,  634152, 6034152, 3604152, 6304152,\n       463152, 4063152,  643152, 6043152, 4603152, 6403152, 3460152, 4360152, 3640152, 6340152, 4630152, 6430152,\n      1346052, 3146052, 1436052, 4136052, 3416052, 4316052, 1364052, 3164052, 1634052, 6134052, 3614052, 6314052,\n      1463052, 4163052, 1643052, 6143052, 4613052, 6413052, 3461052, 4361052, 3641052, 6341052, 4631052, 6431052,\n       135642, 1035642,  315642, 3015642, 1305642, 3105642,  153642, 1053642,  513642, 5013642, 1503642, 5103642,\n       351642, 3051642,  531642, 5031642, 3501642, 5301642, 1350642, 3150642, 1530642, 5130642, 3510642, 5310642,\n       136542, 1036542,  316542, 3016542, 1306542, 3106542,  163542, 1063542,  613542, 6013542, 1603542, 6103542,\n       361542, 3061542,  631542, 6031542, 3601542, 6301542, 1360542, 3160542, 1630542, 6130542, 3610542, 6310542,\n       156342, 1056342,  516342, 5016342, 1506342, 5106342,  165342, 1065342,  615342, 6015342, 1605342, 6105342,\n       561342, 5061342,  651342, 6051342, 5601342, 6501342, 1560342, 5160342, 1650342, 6150342, 5610342, 6510342,\n       356142, 3056142,  536142, 5036142, 3506142, 5306142,  365142, 3065142,  635142, 6035142, 3605142, 6305142,\n       563142, 5063142,  653142, 6053142, 5603142, 6503142, 3560142, 5360142, 3650142, 6350142, 5630142, 6530142,\n      1356042, 3156042, 1536042, 5136042, 3516042, 5316042, 1365042, 3165042, 1635042, 6135042, 3615042, 6315042,\n      1563042, 5163042, 1653042, 6153042, 5613042, 6513042, 3561042, 5361042, 3651042, 6351042, 5631042, 6531042,\n       145632, 1045632,  415632, 4015632, 1405632, 4105632,  154632, 1054632,  514632, 5014632, 1504632, 5104632,\n       451632, 4051632,  541632, 5041632, 4501632, 5401632, 1450632, 4150632, 1540632, 5140632, 4510632, 5410632,\n       146532, 1046532,  416532, 4016532, 1406532, 4106532,  164532, 1064532,  614532, 6014532, 1604532, 6104532,\n       461532, 4061532,  641532, 6041532, 4601532, 6401532, 1460532, 4160532, 1640532, 6140532, 4610532, 6410532,\n       156432, 1056432,  516432, 5016432, 1506432, 5106432,  165432, 1065432,  615432, 6015432, 1605432, 6105432,\n       561432, 5061432,  651432, 6051432, 5601432, 6501432, 1560432, 5160432, 1650432, 6150432, 5610432, 6510432,\n       456132, 4056132,  546132, 5046132, 4506132, 5406132,  465132, 4065132,  645132, 6045132, 4605132, 6405132,\n       564132, 5064132,  654132, 6054132, 5604132, 6504132, 4560132, 5460132, 4650132, 6450132, 5640132, 6540132,\n      1456032, 4156032, 1546032, 5146032, 4516032, 5416032, 1465032, 4165032, 1645032, 6145032, 4615032, 6415032,\n      1564032, 5164032, 1654032, 6154032, 5614032, 6514032, 4561032, 5461032, 4651032, 6451032, 5641032, 6541032,\n       345612, 3045612,  435612, 4035612, 3405612, 4305612,  354612, 3054612,  534612, 5034612, 3504612, 5304612,\n       453612, 4053612,  543612, 5043612, 4503612, 5403612, 3450612, 4350612, 3540612, 5340612, 4530612, 5430612,\n       346512, 3046512,  436512, 4036512, 3406512, 4306512,  364512, 3064512,  634512, 6034512, 3604512, 6304512,\n       463512, 4063512,  643512, 6043512, 4603512, 6403512, 3460512, 4360512, 3640512, 6340512, 4630512, 6430512,\n       356412, 3056412,  536412, 5036412, 3506412, 5306412,  365412, 3065412,  635412, 6035412, 3605412, 6305412,\n       563412, 5063412,  653412, 6053412, 5603412, 6503412, 3560412, 5360412, 3650412, 6350412, 5630412, 6530412,\n       456312, 4056312,  546312, 5046312, 4506312, 5406312,  465312, 4065312,  645312, 6045312, 4605312, 6405312,\n       564312, 5064312,  654312, 6054312, 5604312, 6504312, 4560312, 5460312, 4650312, 6450312, 5640312, 6540312,\n      3456012, 4356012, 3546012, 5346012, 4536012, 5436012, 3465012, 4365012, 3645012, 6345012, 4635012, 6435012,\n      3564012, 5364012, 3654012, 6354012, 5634012, 6534012, 4563012, 5463012, 4653012, 6453012, 5643012, 6543012,\n      1345602, 3145602, 1435602, 4135602, 3415602, 4315602, 1354602, 3154602, 1534602, 5134602, 3514602, 5314602,\n      1453602, 4153602, 1543602, 5143602, 4513602, 5413602, 3451602, 4351602, 3541602, 5341602, 4531602, 5431602,\n      1346502, 3146502, 1436502, 4136502, 3416502, 4316502, 1364502, 3164502, 1634502, 6134502, 3614502, 6314502,\n      1463502, 4163502, 1643502, 6143502, 4613502, 6413502, 3461502, 4361502, 3641502, 6341502, 4631502, 6431502,\n      1356402, 3156402, 1536402, 5136402, 3516402, 5316402, 1365402, 3165402, 1635402, 6135402, 3615402, 6315402,\n      1563402, 5163402, 1653402, 6153402, 5613402, 6513402, 3561402, 5361402, 3651402, 6351402, 5631402, 6531402,\n      1456302, 4156302, 1546302, 5146302, 4516302, 5416302, 1465302, 4165302, 1645302, 6145302, 4615302, 6415302,\n      1564302, 5164302, 1654302, 6154302, 5614302, 6514302, 4561302, 5461302, 4651302, 6451302, 5641302, 6541302,\n      3456102, 4356102, 3546102, 5346102, 4536102, 5436102, 3465102, 4365102, 3645102, 6345102, 4635102, 6435102,\n      3564102, 5364102, 3654102, 6354102, 5634102, 6534102, 4563102, 5463102, 4653102, 6453102, 5643102, 6543102,\n       234561, 2034561,  324561, 3024561, 2304561, 3204561,  243561, 2043561,  423561, 4023561, 2403561, 4203561,\n       342561, 3042561,  432561, 4032561, 3402561, 4302561, 2340561, 3240561, 2430561, 4230561, 3420561, 4320561,\n       235461, 2035461,  325461, 3025461, 2305461, 3205461,  253461, 2053461,  523461, 5023461, 2503461, 5203461,\n       352461, 3052461,  532461, 5032461, 3502461, 5302461, 2350461, 3250461, 2530461, 5230461, 3520461, 5320461,\n       245361, 2045361,  425361, 4025361, 2405361, 4205361,  254361, 2054361,  524361, 5024361, 2504361, 5204361,\n       452361, 4052361,  542361, 5042361, 4502361, 5402361, 2450361, 4250361, 2540361, 5240361, 4520361, 5420361,\n       345261, 3045261,  435261, 4035261, 3405261, 4305261,  354261, 3054261,  534261, 5034261, 3504261, 5304261,\n       453261, 4053261,  543261, 5043261, 4503261, 5403261, 3450261, 4350261, 3540261, 5340261, 4530261, 5430261,\n      2345061, 3245061, 2435061, 4235061, 3425061, 4325061, 2354061, 3254061, 2534061, 5234061, 3524061, 5324061,\n      2453061, 4253061, 2543061, 5243061, 4523061, 5423061, 3452061, 4352061, 3542061, 5342061, 4532061, 5432061,\n       234651, 2034651,  324651, 3024651, 2304651, 3204651,  243651, 2043651,  423651, 4023651, 2403651, 4203651,\n       342651, 3042651,  432651, 4032651, 3402651, 4302651, 2340651, 3240651, 2430651, 4230651, 3420651, 4320651,\n       236451, 2036451,  326451, 3026451, 2306451, 3206451,  263451, 2063451,  623451, 6023451, 2603451, 6203451,\n       362451, 3062451,  632451, 6032451, 3602451, 6302451, 2360451, 3260451, 2630451, 6230451, 3620451, 6320451,\n       246351, 2046351,  426351, 4026351, 2406351, 4206351,  264351, 2064351,  624351, 6024351, 2604351, 6204351,\n       462351, 4062351,  642351, 6042351, 4602351, 6402351, 2460351, 4260351, 2640351, 6240351, 4620351, 6420351,\n       346251, 3046251,  436251, 4036251, 3406251, 4306251,  364251, 3064251,  634251, 6034251, 3604251, 6304251,\n       463251, 4063251,  643251, 6043251, 4603251, 6403251, 3460251, 4360251, 3640251, 6340251, 4630251, 6430251,\n      2346051, 3246051, 2436051, 4236051, 3426051, 4326051, 2364051, 3264051, 2634051, 6234051, 3624051, 6324051,\n      2463051, 4263051, 2643051, 6243051, 4623051, 6423051, 3462051, 4362051, 3642051, 6342051, 4632051, 6432051,\n       235641, 2035641,  325641, 3025641, 2305641, 3205641,  253641, 2053641,  523641, 5023641, 2503641, 5203641,\n       352641, 3052641,  532641, 5032641, 3502641, 5302641, 2350641, 3250641, 2530641, 5230641, 3520641, 5320641,\n       236541, 2036541,  326541, 3026541, 2306541, 3206541,  263541, 2063541,  623541, 6023541, 2603541, 6203541,\n       362541, 3062541,  632541, 6032541, 3602541, 6302541, 2360541, 3260541, 2630541, 6230541, 3620541, 6320541,\n       256341, 2056341,  526341, 5026341, 2506341, 5206341,  265341, 2065341,  625341, 6025341, 2605341, 6205341,\n       562341, 5062341,  652341, 6052341, 5602341, 6502341, 2560341, 5260341, 2650341, 6250341, 5620341, 6520341,\n       356241, 3056241,  536241, 5036241, 3506241, 5306241,  365241, 3065241,  635241, 6035241, 3605241, 6305241,\n       563241, 5063241,  653241, 6053241, 5603241, 6503241, 3560241, 5360241, 3650241, 6350241, 5630241, 6530241,\n      2356041, 3256041, 2536041, 5236041, 3526041, 5326041, 2365041, 3265041, 2635041, 6235041, 3625041, 6325041,\n      2563041, 5263041, 2653041, 6253041, 5623041, 6523041, 3562041, 5362041, 3652041, 6352041, 5632041, 6532041,\n       245631, 2045631,  425631, 4025631, 2405631, 4205631,  254631, 2054631,  524631, 5024631, 2504631, 5204631,\n       452631, 4052631,  542631, 5042631, 4502631, 5402631, 2450631, 4250631, 2540631, 5240631, 4520631, 5420631,\n       246531, 2046531,  426531, 4026531, 2406531, 4206531,  264531, 2064531,  624531, 6024531, 2604531, 6204531,\n       462531, 4062531,  642531, 6042531, 4602531, 6402531, 2460531, 4260531, 2640531, 6240531, 4620531, 6420531,\n       256431, 2056431,  526431, 5026431, 2506431, 5206431,  265431, 2065431,  625431, 6025431, 2605431, 6205431,\n       562431, 5062431,  652431, 6052431, 5602431, 6502431, 2560431, 5260431, 2650431, 6250431, 5620431, 6520431,\n       456231, 4056231,  546231, 5046231, 4506231, 5406231,  465231, 4065231,  645231, 6045231, 4605231, 6405231,\n       564231, 5064231,  654231, 6054231, 5604231, 6504231, 4560231, 5460231, 4650231, 6450231, 5640231, 6540231,\n      2456031, 4256031, 2546031, 5246031, 4526031, 5426031, 2465031, 4265031, 2645031, 6245031, 4625031, 6425031,\n      2564031, 5264031, 2654031, 6254031, 5624031, 6524031, 4562031, 5462031, 4652031, 6452031, 5642031, 6542031,\n       345621, 3045621,  435621, 4035621, 3405621, 4305621,  354621, 3054621,  534621, 5034621, 3504621, 5304621,\n       453621, 4053621,  543621, 5043621, 4503621, 5403621, 3450621, 4350621, 3540621, 5340621, 4530621, 5430621,\n       346521, 3046521,  436521, 4036521, 3406521, 4306521,  364521, 3064521,  634521, 6034521, 3604521, 6304521,\n       463521, 4063521,  643521, 6043521, 4603521, 6403521, 3460521, 4360521, 3640521, 6340521, 4630521, 6430521,\n       356421, 3056421,  536421, 5036421, 3506421, 5306421,  365421, 3065421,  635421, 6035421, 3605421, 6305421,\n       563421, 5063421,  653421, 6053421, 5603421, 6503421, 3560421, 5360421, 3650421, 6350421, 5630421, 6530421,\n       456321, 4056321,  546321, 5046321, 4506321, 5406321,  465321, 4065321,  645321, 6045321, 4605321, 6405321,\n       564321, 5064321,  654321, 6054321, 5604321, 6504321, 4560321, 5460321, 4650321, 6450321, 5640321, 6540321,\n      3456021, 4356021, 3546021, 5346021, 4536021, 5436021, 3465021, 4365021, 3645021, 6345021, 4635021, 6435021,\n      3564021, 5364021, 3654021, 6354021, 5634021, 6534021, 4563021, 5463021, 4653021, 6453021, 5643021, 6543021,\n      2345601, 3245601, 2435601, 4235601, 3425601, 4325601, 2354601, 3254601, 2534601, 5234601, 3524601, 5324601,\n      2453601, 4253601, 2543601, 5243601, 4523601, 5423601, 3452601, 4352601, 3542601, 5342601, 4532601, 5432601,\n      2346501, 3246501, 2436501, 4236501, 3426501, 4326501, 2364501, 3264501, 2634501, 6234501, 3624501, 6324501,\n      2463501, 4263501, 2643501, 6243501, 4623501, 6423501, 3462501, 4362501, 3642501, 6342501, 4632501, 6432501,\n      2356401, 3256401, 2536401, 5236401, 3526401, 5326401, 2365401, 3265401, 2635401, 6235401, 3625401, 6325401,\n      2563401, 5263401, 2653401, 6253401, 5623401, 6523401, 3562401, 5362401, 3652401, 6352401, 5632401, 6532401,\n      2456301, 4256301, 2546301, 5246301, 4526301, 5426301, 2465301, 4265301, 2645301, 6245301, 4625301, 6425301,\n      2564301, 5264301, 2654301, 6254301, 5624301, 6524301, 4562301, 5462301, 4652301, 6452301, 5642301, 6542301,\n      3456201, 4356201, 3546201, 5346201, 4536201, 5436201, 3465201, 4365201, 3645201, 6345201, 4635201, 6435201,\n      3564201, 5364201, 3654201, 6354201, 5634201, 6534201, 4563201, 5463201, 4653201, 6453201, 5643201, 6543201,\n      1234560, 2134560, 1324560, 3124560, 2314560, 3214560, 1243560, 2143560, 1423560, 4123560, 2413560, 4213560,\n      1342560, 3142560, 1432560, 4132560, 3412560, 4312560, 2341560, 3241560, 2431560, 4231560, 3421560, 4321560,\n      1235460, 2135460, 1325460, 3125460, 2315460, 3215460, 1253460, 2153460, 1523460, 5123460, 2513460, 5213460,\n      1352460, 3152460, 1532460, 5132460, 3512460, 5312460, 2351460, 3251460, 2531460, 5231460, 3521460, 5321460,\n      1245360, 2145360, 1425360, 4125360, 2415360, 4215360, 1254360, 2154360, 1524360, 5124360, 2514360, 5214360,\n      1452360, 4152360, 1542360, 5142360, 4512360, 5412360, 2451360, 4251360, 2541360, 5241360, 4521360, 5421360,\n      1345260, 3145260, 1435260, 4135260, 3415260, 4315260, 1354260, 3154260, 1534260, 5134260, 3514260, 5314260,\n      1453260, 4153260, 1543260, 5143260, 4513260, 5413260, 3451260, 4351260, 3541260, 5341260, 4531260, 5431260,\n      2345160, 3245160, 2435160, 4235160, 3425160, 4325160, 2354160, 3254160, 2534160, 5234160, 3524160, 5324160,\n      2453160, 4253160, 2543160, 5243160, 4523160, 5423160, 3452160, 4352160, 3542160, 5342160, 4532160, 5432160,\n      1234650, 2134650, 1324650, 3124650, 2314650, 3214650, 1243650, 2143650, 1423650, 4123650, 2413650, 4213650,\n      1342650, 3142650, 1432650, 4132650, 3412650, 4312650, 2341650, 3241650, 2431650, 4231650, 3421650, 4321650,\n      1236450, 2136450, 1326450, 3126450, 2316450, 3216450, 1263450, 2163450, 1623450, 6123450, 2613450, 6213450,\n      1362450, 3162450, 1632450, 6132450, 3612450, 6312450, 2361450, 3261450, 2631450, 6231450, 3621450, 6321450,\n      1246350, 2146350, 1426350, 4126350, 2416350, 4216350, 1264350, 2164350, 1624350, 6124350, 2614350, 6214350,\n      1462350, 4162350, 1642350, 6142350, 4612350, 6412350, 2461350, 4261350, 2641350, 6241350, 4621350, 6421350,\n      1346250, 3146250, 1436250, 4136250, 3416250, 4316250, 1364250, 3164250, 1634250, 6134250, 3614250, 6314250,\n      1463250, 4163250, 1643250, 6143250, 4613250, 6413250, 3461250, 4361250, 3641250, 6341250, 4631250, 6431250,\n      2346150, 3246150, 2436150, 4236150, 3426150, 4326150, 2364150, 3264150, 2634150, 6234150, 3624150, 6324150,\n      2463150, 4263150, 2643150, 6243150, 4623150, 6423150, 3462150, 4362150, 3642150, 6342150, 4632150, 6432150,\n      1235640, 2135640, 1325640, 3125640, 2315640, 3215640, 1253640, 2153640, 1523640, 5123640, 2513640, 5213640,\n      1352640, 3152640, 1532640, 5132640, 3512640, 5312640, 2351640, 3251640, 2531640, 5231640, 3521640, 5321640,\n      1236540, 2136540, 1326540, 3126540, 2316540, 3216540, 1263540, 2163540, 1623540, 6123540, 2613540, 6213540,\n      1362540, 3162540, 1632540, 6132540, 3612540, 6312540, 2361540, 3261540, 2631540, 6231540, 3621540, 6321540,\n      1256340, 2156340, 1526340, 5126340, 2516340, 5216340, 1265340, 2165340, 1625340, 6125340, 2615340, 6215340,\n      1562340, 5162340, 1652340, 6152340, 5612340, 6512340, 2561340, 5261340, 2651340, 6251340, 5621340, 6521340,\n      1356240, 3156240, 1536240, 5136240, 3516240, 5316240, 1365240, 3165240, 1635240, 6135240, 3615240, 6315240,\n      1563240, 5163240, 1653240, 6153240, 5613240, 6513240, 3561240, 5361240, 3651240, 6351240, 5631240, 6531240,\n      2356140, 3256140, 2536140, 5236140, 3526140, 5326140, 2365140, 3265140, 2635140, 6235140, 3625140, 6325140,\n      2563140, 5263140, 2653140, 6253140, 5623140, 6523140, 3562140, 5362140, 3652140, 6352140, 5632140, 6532140,\n      1245630, 2145630, 1425630, 4125630, 2415630, 4215630, 1254630, 2154630, 1524630, 5124630, 2514630, 5214630,\n      1452630, 4152630, 1542630, 5142630, 4512630, 5412630, 2451630, 4251630, 2541630, 5241630, 4521630, 5421630,\n      1246530, 2146530, 1426530, 4126530, 2416530, 4216530, 1264530, 2164530, 1624530, 6124530, 2614530, 6214530,\n      1462530, 4162530, 1642530, 6142530, 4612530, 6412530, 2461530, 4261530, 2641530, 6241530, 4621530, 6421530,\n      1256430, 2156430, 1526430, 5126430, 2516430, 5216430, 1265430, 2165430, 1625430, 6125430, 2615430, 6215430,\n      1562430, 5162430, 1652430, 6152430, 5612430, 6512430, 2561430, 5261430, 2651430, 6251430, 5621430, 6521430,\n      1456230, 4156230, 1546230, 5146230, 4516230, 5416230, 1465230, 4165230, 1645230, 6145230, 4615230, 6415230,\n      1564230, 5164230, 1654230, 6154230, 5614230, 6514230, 4561230, 5461230, 4651230, 6451230, 5641230, 6541230,\n      2456130, 4256130, 2546130, 5246130, 4526130, 5426130, 2465130, 4265130, 2645130, 6245130, 4625130, 6425130,\n      2564130, 5264130, 2654130, 6254130, 5624130, 6524130, 4562130, 5462130, 4652130, 6452130, 5642130, 6542130,\n      1345620, 3145620, 1435620, 4135620, 3415620, 4315620, 1354620, 3154620, 1534620, 5134620, 3514620, 5314620,\n      1453620, 4153620, 1543620, 5143620, 4513620, 5413620, 3451620, 4351620, 3541620, 5341620, 4531620, 5431620,\n      1346520, 3146520, 1436520, 4136520, 3416520, 4316520, 1364520, 3164520, 1634520, 6134520, 3614520, 6314520,\n      1463520, 4163520, 1643520, 6143520, 4613520, 6413520, 3461520, 4361520, 3641520, 6341520, 4631520, 6431520,\n      1356420, 3156420, 1536420, 5136420, 3516420, 5316420, 1365420, 3165420, 1635420, 6135420, 3615420, 6315420,\n      1563420, 5163420, 1653420, 6153420, 5613420, 6513420, 3561420, 5361420, 3651420, 6351420, 5631420, 6531420,\n      1456320, 4156320, 1546320, 5146320, 4516320, 5416320, 1465320, 4165320, 1645320, 6145320, 4615320, 6415320,\n      1564320, 5164320, 1654320, 6154320, 5614320, 6514320, 4561320, 5461320, 4651320, 6451320, 5641320, 6541320,\n      3456120, 4356120, 3546120, 5346120, 4536120, 5436120, 3465120, 4365120, 3645120, 6345120, 4635120, 6435120,\n      3564120, 5364120, 3654120, 6354120, 5634120, 6534120, 4563120, 5463120, 4653120, 6453120, 5643120, 6543120,\n      2345610, 3245610, 2435610, 4235610, 3425610, 4325610, 2354610, 3254610, 2534610, 5234610, 3524610, 5324610,\n      2453610, 4253610, 2543610, 5243610, 4523610, 5423610, 3452610, 4352610, 3542610, 5342610, 4532610, 5432610,\n      2346510, 3246510, 2436510, 4236510, 3426510, 4326510, 2364510, 3264510, 2634510, 6234510, 3624510, 6324510,\n      2463510, 4263510, 2643510, 6243510, 4623510, 6423510, 3462510, 4362510, 3642510, 6342510, 4632510, 6432510,\n      2356410, 3256410, 2536410, 5236410, 3526410, 5326410, 2365410, 3265410, 2635410, 6235410, 3625410, 6325410,\n      2563410, 5263410, 2653410, 6253410, 5623410, 6523410, 3562410, 5362410, 3652410, 6352410, 5632410, 6532410,\n      2456310, 4256310, 2546310, 5246310, 4526310, 5426310, 2465310, 4265310, 2645310, 6245310, 4625310, 6425310,\n      2564310, 5264310, 2654310, 6254310, 5624310, 6524310, 4562310, 5462310, 4652310, 6452310, 5642310, 6542310,\n      3456210, 4356210, 3546210, 5346210, 4536210, 5436210, 3465210, 4365210, 3645210, 6345210, 4635210, 6435210,\n      3564210, 5364210, 3654210, 6354210, 5634210, 6534210, 4563210, 5463210, 4653210, 6453210, 5643210, 6543210\n    };\n    std::map<uint64_t, int> expected;\n    for (std::size_t i = 0; i < 5040; i++)\n      expected[pre_expected[i]] = 0; // flags are 0, everything is symmetric here\n\n    VERIFY(isDynGroup(group));\n    VERIFY_IS_EQUAL(group.size(), 5040u);\n    VERIFY_IS_EQUAL(group.globalFlags(), 0);\n    group.apply<checkIdx, int>(identity7, 0, found, expected);\n    VERIFY_IS_EQUAL(found.size(), 5040u);\n  }\n}\n\nstatic void test_tensor_epsilon()\n{\n  SGroup<AntiSymmetry<0,1>, AntiSymmetry<1,2>> sym;\n  Tensor<int, 3> epsilon(3,3,3);\n\n  epsilon.setZero();\n  sym(epsilon, 0, 1, 2) = 1;\n\n  for (int i = 0; i < 3; i++) {\n    for (int j = 0; j < 3; j++) {\n      for (int k = 0; k < 3; k++) {\n        VERIFY_IS_EQUAL((epsilon(i,j,k)), (- (j - i) * (k - j) * (i - k) / 2) );\n      }\n    }\n  }\n}\n\nstatic void test_tensor_sym()\n{\n  SGroup<Symmetry<0,1>, Symmetry<2,3>> sym;\n  Tensor<int, 4> t(10,10,10,10);\n\n  t.setZero();\n\n  for (int l = 0; l < 10; l++) {\n    for (int k = l; k < 10; k++) {\n      for (int j = 0; j < 10; j++) {\n        for (int i = j; i < 10; i++) {\n          sym(t, i, j, k, l) = (i + j) * (k + l);\n        }\n      }\n    }\n  }\n\n  for (int l = 0; l < 10; l++) {\n    for (int k = 0; k < 10; k++) {\n      for (int j = 0; j < 10; j++) {\n        for (int i = 0; i < 10; i++) {\n          VERIFY_IS_EQUAL((t(i, j, k, l)), ((i + j) * (k + l)));\n        }\n      }\n    }\n  }\n\n}\n\nstatic void test_tensor_asym()\n{\n  SGroup<AntiSymmetry<0,1>, AntiSymmetry<2,3>> sym;\n  Tensor<int, 4> t(10,10,10,10);\n\n  t.setZero();\n\n  for (int l = 0; l < 10; l++) {\n    for (int k = l + 1; k < 10; k++) {\n      for (int j = 0; j < 10; j++) {\n        for (int i = j + 1; i < 10; i++) {\n          sym(t, i, j, k, l) = ((i * j) + (k * l));\n        }\n      }\n    }\n  }\n\n  for (int l = 0; l < 10; l++) {\n    for (int k = 0; k < 10; k++) {\n      for (int j = 0; j < 10; j++) {\n        for (int i = 0; i < 10; i++) {\n          if (i < j && k < l)\n            VERIFY_IS_EQUAL((t(i, j, k, l)), (((i * j) + (k * l))));\n          else if (i > j && k > l)\n            VERIFY_IS_EQUAL((t(i, j, k, l)), (((i * j) + (k * l))));\n          else if (i < j && k > l)\n            VERIFY_IS_EQUAL((t(i, j, k, l)), (- ((i * j) + (k * l))));\n          else if (i > j && k < l)\n            VERIFY_IS_EQUAL((t(i, j, k, l)), (- ((i * j) + (k * l))));\n          else\n            VERIFY_IS_EQUAL((t(i, j, k, l)), 0);\n        }\n      }\n    }\n  }\n}\n\nstatic void test_tensor_dynsym()\n{\n  DynamicSGroup sym;\n  sym.addSymmetry(0,1);\n  sym.addSymmetry(2,3);\n  Tensor<int, 4> t(10,10,10,10);\n\n  t.setZero();\n\n  for (int l = 0; l < 10; l++) {\n    for (int k = l; k < 10; k++) {\n      for (int j = 0; j < 10; j++) {\n        for (int i = j; i < 10; i++) {\n          sym(t, i, j, k, l) = (i + j) * (k + l);\n        }\n      }\n    }\n  }\n\n  for (int l = 0; l < 10; l++) {\n    for (int k = 0; k < 10; k++) {\n      for (int j = 0; j < 10; j++) {\n        for (int i = 0; i < 10; i++) {\n          VERIFY_IS_EQUAL((t(i, j, k, l)), ((i + j) * (k + l)));\n        }\n      }\n    }\n  }\n}\n\nstatic void test_tensor_randacc()\n{\n  SGroup<Symmetry<0,1>, Symmetry<2,3>> sym;\n  Tensor<int, 4> t(10,10,10,10);\n\n  t.setZero();\n\n  // set elements 1 million times, that way we access the\n  // entire matrix\n  for (int n = 0; n < 1000000; n++) {\n    int i = rand() % 10;\n    int j = rand() % 10;\n    int k = rand() % 10;\n    int l = rand() % 10;\n    // only access those indices in a given order\n    if (i < j)\n      std::swap(i, j);\n    if (k < l)\n      std::swap(k, l);\n    sym(t, i, j, k, l) = (i + j) * (k + l);\n  }\n\n  for (int l = 0; l < 10; l++) {\n    for (int k = 0; k < 10; k++) {\n      for (int j = 0; j < 10; j++) {\n        for (int i = 0; i < 10; i++) {\n          VERIFY_IS_EQUAL((t(i, j, k, l)), ((i + j) * (k + l)));\n        }\n      }\n    }\n  }\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_symmetry)\n{\n  CALL_SUBTEST(test_symgroups_static());\n  CALL_SUBTEST(test_symgroups_dynamic());\n  CALL_SUBTEST(test_symgroups_selection());\n  CALL_SUBTEST(test_tensor_epsilon());\n  CALL_SUBTEST(test_tensor_sym());\n  CALL_SUBTEST(test_tensor_asym());\n  CALL_SUBTEST(test_tensor_dynsym());\n  CALL_SUBTEST(test_tensor_randacc());\n}\n\n/*\n * kate: space-indent on; indent-width 2; mixedindent off; indent-mode cstyle;\n */\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_thread_local.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_USE_THREADS\n\n#include <iostream>\n#include <unordered_set>\n\n#include \"main.h\"\n#include <Eigen/CXX11/ThreadPool>\n\nstruct Counter {\n  Counter() = default;\n\n  void inc() {\n    // Check that mutation happens only in a thread that created this counter.\n    VERIFY_IS_EQUAL(std::this_thread::get_id(), created_by);\n    counter_value++;\n  }\n  int value() { return counter_value; }\n\n  std::thread::id created_by;\n  int counter_value = 0;\n};\n\nstruct InitCounter {\n  void operator()(Counter& counter) {\n    counter.created_by = std::this_thread::get_id();\n  }\n};\n\nvoid test_simple_thread_local() {\n  int num_threads = internal::random<int>(4, 32);\n  Eigen::ThreadPool thread_pool(num_threads);\n  Eigen::ThreadLocal<Counter, InitCounter> counter(num_threads, InitCounter());\n\n  int num_tasks = 3 * num_threads;\n  Eigen::Barrier barrier(num_tasks);\n\n  for (int i = 0; i < num_tasks; ++i) {\n    thread_pool.Schedule([&counter, &barrier]() {\n      Counter& local = counter.local();\n      local.inc();\n\n      std::this_thread::sleep_for(std::chrono::milliseconds(100));\n      barrier.Notify();\n    });\n  }\n\n  barrier.Wait();\n\n  counter.ForEach(\n      [](std::thread::id, Counter& cnt) { VERIFY_IS_EQUAL(cnt.value(), 3); });\n}\n\nvoid test_zero_sized_thread_local() {\n  Eigen::ThreadLocal<Counter, InitCounter> counter(0, InitCounter());\n\n  Counter& local = counter.local();\n  local.inc();\n\n  int total = 0;\n  counter.ForEach([&total](std::thread::id, Counter& cnt) {\n    total += cnt.value();\n    VERIFY_IS_EQUAL(cnt.value(), 1);\n  });\n\n  VERIFY_IS_EQUAL(total, 1);\n}\n\n// All thread local values fits into the lock-free storage.\nvoid test_large_number_of_tasks_no_spill() {\n  int num_threads = internal::random<int>(4, 32);\n  Eigen::ThreadPool thread_pool(num_threads);\n  Eigen::ThreadLocal<Counter, InitCounter> counter(num_threads, InitCounter());\n\n  int num_tasks = 10000;\n  Eigen::Barrier barrier(num_tasks);\n\n  for (int i = 0; i < num_tasks; ++i) {\n    thread_pool.Schedule([&counter, &barrier]() {\n      Counter& local = counter.local();\n      local.inc();\n      barrier.Notify();\n    });\n  }\n\n  barrier.Wait();\n\n  int total = 0;\n  std::unordered_set<std::thread::id> unique_threads;\n\n  counter.ForEach([&](std::thread::id id, Counter& cnt) {\n    total += cnt.value();\n    unique_threads.insert(id);\n  });\n\n  VERIFY_IS_EQUAL(total, num_tasks);\n  // Not all threads in a pool might be woken up to execute submitted tasks.\n  // Also thread_pool.Schedule() might use current thread if queue is full.\n  VERIFY_IS_EQUAL(\n      unique_threads.size() <= (static_cast<size_t>(num_threads + 1)), true);\n}\n\n// Lock free thread local storage is too small to fit all the unique threads,\n// and it spills to a map guarded by a mutex.\nvoid test_large_number_of_tasks_with_spill() {\n  int num_threads = internal::random<int>(4, 32);\n  Eigen::ThreadPool thread_pool(num_threads);\n  Eigen::ThreadLocal<Counter, InitCounter> counter(1, InitCounter());\n\n  int num_tasks = 10000;\n  Eigen::Barrier barrier(num_tasks);\n\n  for (int i = 0; i < num_tasks; ++i) {\n    thread_pool.Schedule([&counter, &barrier]() {\n      Counter& local = counter.local();\n      local.inc();\n      barrier.Notify();\n    });\n  }\n\n  barrier.Wait();\n\n  int total = 0;\n  std::unordered_set<std::thread::id> unique_threads;\n\n  counter.ForEach([&](std::thread::id id, Counter& cnt) {\n    total += cnt.value();\n    unique_threads.insert(id);\n  });\n\n  VERIFY_IS_EQUAL(total, num_tasks);\n  // Not all threads in a pool might be woken up to execute submitted tasks.\n  // Also thread_pool.Schedule() might use current thread if queue is full.\n  VERIFY_IS_EQUAL(\n      unique_threads.size() <= (static_cast<size_t>(num_threads + 1)), true);\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_thread_local) {\n  CALL_SUBTEST(test_simple_thread_local());\n  CALL_SUBTEST(test_zero_sized_thread_local());\n  CALL_SUBTEST(test_large_number_of_tasks_no_spill());\n  CALL_SUBTEST(test_large_number_of_tasks_with_spill());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_thread_pool.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_USE_THREADS\n\n\n#include \"main.h\"\n#include <iostream>\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\n\nclass TestAllocator : public Allocator {\n public:\n  ~TestAllocator() EIGEN_OVERRIDE {}\n  EIGEN_DEVICE_FUNC void* allocate(size_t num_bytes) const EIGEN_OVERRIDE {\n    const_cast<TestAllocator*>(this)->alloc_count_++;\n    return internal::aligned_malloc(num_bytes);\n  }\n  EIGEN_DEVICE_FUNC void deallocate(void* buffer) const EIGEN_OVERRIDE {\n    const_cast<TestAllocator*>(this)->dealloc_count_++;\n    internal::aligned_free(buffer);\n  }\n\n  int alloc_count() const { return alloc_count_; }\n  int dealloc_count() const { return dealloc_count_; }\n\n private:\n  int alloc_count_ = 0;\n  int dealloc_count_ = 0;\n};\n\nvoid test_multithread_elementwise()\n{\n  Tensor<float, 3> in1(200, 30, 70);\n  Tensor<float, 3> in2(200, 30, 70);\n  Tensor<double, 3> out(200, 30, 70);\n\n  in1.setRandom();\n  in2.setRandom();\n\n  Eigen::ThreadPool tp(internal::random<int>(3, 11));\n  Eigen::ThreadPoolDevice thread_pool_device(&tp, internal::random<int>(3, 11));\n  out.device(thread_pool_device) = (in1 + in2 * 3.14f).cast<double>();\n\n  for (int i = 0; i < 200; ++i) {\n    for (int j = 0; j < 30; ++j) {\n      for (int k = 0; k < 70; ++k) {\n        VERIFY_IS_APPROX(out(i, j, k), static_cast<double>(in1(i, j, k) + in2(i, j, k) * 3.14f));\n      }\n    }\n  }\n}\n\nvoid test_async_multithread_elementwise()\n{\n  Tensor<float, 3> in1(200, 30, 70);\n  Tensor<float, 3> in2(200, 30, 70);\n  Tensor<double, 3> out(200, 30, 70);\n\n  in1.setRandom();\n  in2.setRandom();\n\n  Eigen::ThreadPool tp(internal::random<int>(3, 11));\n  Eigen::ThreadPoolDevice thread_pool_device(&tp, internal::random<int>(3, 11));\n\n  Eigen::Barrier b(1);\n  out.device(thread_pool_device, [&b]() { b.Notify(); }) = (in1 + in2 * 3.14f).cast<double>();\n  b.Wait();\n\n  for (int i = 0; i < 200; ++i) {\n    for (int j = 0; j < 30; ++j) {\n      for (int k = 0; k < 70; ++k) {\n        VERIFY_IS_APPROX(out(i, j, k), static_cast<double>(in1(i, j, k) + in2(i, j, k) * 3.14f));\n      }\n    }\n  }\n}\n\nvoid test_multithread_compound_assignment()\n{\n  Tensor<float, 3> in1(2,3,7);\n  Tensor<float, 3> in2(2,3,7);\n  Tensor<float, 3> out(2,3,7);\n\n  in1.setRandom();\n  in2.setRandom();\n\n  Eigen::ThreadPool tp(internal::random<int>(3, 11));\n  Eigen::ThreadPoolDevice thread_pool_device(&tp, internal::random<int>(3, 11));\n  out.device(thread_pool_device) = in1;\n  out.device(thread_pool_device) += in2 * 3.14f;\n\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 3; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        VERIFY_IS_APPROX(out(i,j,k), in1(i,j,k) + in2(i,j,k) * 3.14f);\n      }\n    }\n  }\n}\n\ntemplate<int DataLayout>\nvoid test_multithread_contraction()\n{\n  Tensor<float, 4, DataLayout> t_left(30, 50, 37, 31);\n  Tensor<float, 5, DataLayout> t_right(37, 31, 70, 2, 10);\n  Tensor<float, 5, DataLayout> t_result(30, 50, 70, 2, 10);\n\n  t_left.setRandom();\n  t_right.setRandom();\n\n  // this contraction should be equivalent to a single matrix multiplication\n  typedef Tensor<float, 1>::DimensionPair DimPair;\n  Eigen::array<DimPair, 2> dims({{DimPair(2, 0), DimPair(3, 1)}});\n\n  typedef Map<Matrix<float, Dynamic, Dynamic, DataLayout>> MapXf;\n  MapXf m_left(t_left.data(), 1500, 1147);\n  MapXf m_right(t_right.data(), 1147, 1400);\n  Matrix<float, Dynamic, Dynamic, DataLayout> m_result(1500, 1400);\n\n  Eigen::ThreadPool tp(4);\n  Eigen::ThreadPoolDevice thread_pool_device(&tp, 4);\n\n  // compute results by separate methods\n  t_result.device(thread_pool_device) = t_left.contract(t_right, dims);\n  m_result = m_left * m_right;\n\n for (ptrdiff_t i = 0; i < t_result.size(); i++) {\n    VERIFY(&t_result.data()[i] != &m_result.data()[i]);\n    if (fabsf(t_result(i) - m_result(i)) < 1e-4f) {\n      continue;\n    }\n    if (Eigen::internal::isApprox(t_result(i), m_result(i), 1e-4f)) {\n      continue;\n    }\n    std::cout << \"mismatch detected at index \" << i << \": \" << t_result(i)\n              << \" vs \" <<  m_result(i) << std::endl;\n    assert(false);\n  }\n}\n\ntemplate<int DataLayout>\nvoid test_contraction_corner_cases()\n{\n  Tensor<float, 2, DataLayout> t_left(32, 500);\n  Tensor<float, 2, DataLayout> t_right(32, 28*28);\n  Tensor<float, 2, DataLayout> t_result(500, 28*28);\n\n  t_left = (t_left.constant(-0.5f) + t_left.random()) * 2.0f;\n  t_right = (t_right.constant(-0.6f) + t_right.random()) * 2.0f;\n  t_result = t_result.constant(NAN);\n\n  // this contraction should be equivalent to a single matrix multiplication\n  typedef Tensor<float, 1>::DimensionPair DimPair;\n  Eigen::array<DimPair, 1> dims{{DimPair(0, 0)}};\n\n  typedef Map<Matrix<float, Dynamic, Dynamic, DataLayout>> MapXf;\n  MapXf m_left(t_left.data(), 32, 500);\n  MapXf m_right(t_right.data(), 32, 28*28);\n  Matrix<float, Dynamic, Dynamic, DataLayout> m_result(500, 28*28);\n\n  Eigen::ThreadPool tp(12);\n  Eigen::ThreadPoolDevice thread_pool_device(&tp, 12);\n\n  // compute results by separate methods\n  t_result.device(thread_pool_device) = t_left.contract(t_right, dims);\n  m_result = m_left.transpose() * m_right;\n\n  for (ptrdiff_t i = 0; i < t_result.size(); i++) {\n    assert(!(numext::isnan)(t_result.data()[i]));\n    if (fabsf(t_result.data()[i] - m_result.data()[i]) >= 1e-4f) {\n      std::cout << \"mismatch detected at index \" << i << \" : \" << t_result.data()[i] << \" vs \" <<  m_result.data()[i] << std::endl;\n      assert(false);\n    }\n  }\n\n  t_left.resize(32, 1);\n  t_left = (t_left.constant(-0.5f) + t_left.random()) * 2.0f;\n  t_result.resize (1, 28*28);\n  t_result = t_result.constant(NAN);\n  t_result.device(thread_pool_device) = t_left.contract(t_right, dims);\n  new(&m_left) MapXf(t_left.data(), 32, 1);\n  m_result = m_left.transpose() * m_right;\n  for (ptrdiff_t i = 0; i < t_result.size(); i++) {\n    assert(!(numext::isnan)(t_result.data()[i]));\n    if (fabsf(t_result.data()[i] - m_result.data()[i]) >= 1e-4f) {\n      std::cout << \"mismatch detected: \" << t_result.data()[i] << \" vs \" <<  m_result.data()[i] << std::endl;\n      assert(false);\n    }\n  }\n\n  t_left.resize(32, 500);\n  t_right.resize(32, 4);\n  t_left = (t_left.constant(-0.5f) + t_left.random()) * 2.0f;\n  t_right = (t_right.constant(-0.6f) + t_right.random()) * 2.0f;\n  t_result.resize (500, 4);\n  t_result = t_result.constant(NAN);\n  t_result.device(thread_pool_device) = t_left.contract(t_right, dims);\n  new(&m_left) MapXf(t_left.data(), 32, 500);\n  new(&m_right) MapXf(t_right.data(), 32, 4);\n  m_result = m_left.transpose() * m_right;\n  for (ptrdiff_t i = 0; i < t_result.size(); i++) {\n    assert(!(numext::isnan)(t_result.data()[i]));\n    if (fabsf(t_result.data()[i] - m_result.data()[i]) >= 1e-4f) {\n      std::cout << \"mismatch detected: \" << t_result.data()[i] << \" vs \" <<  m_result.data()[i] << std::endl;\n      assert(false);\n    }\n  }\n\n  t_left.resize(32, 1);\n  t_right.resize(32, 4);\n  t_left = (t_left.constant(-0.5f) + t_left.random()) * 2.0f;\n  t_right = (t_right.constant(-0.6f) + t_right.random()) * 2.0f;\n  t_result.resize (1, 4);\n  t_result = t_result.constant(NAN);\n  t_result.device(thread_pool_device) = t_left.contract(t_right, dims);\n  new(&m_left) MapXf(t_left.data(), 32, 1);\n  new(&m_right) MapXf(t_right.data(), 32, 4);\n  m_result = m_left.transpose() * m_right;\n  for (ptrdiff_t i = 0; i < t_result.size(); i++) {\n    assert(!(numext::isnan)(t_result.data()[i]));\n    if (fabsf(t_result.data()[i] - m_result.data()[i]) >= 1e-4f) {\n      std::cout << \"mismatch detected: \" << t_result.data()[i] << \" vs \" <<  m_result.data()[i] << std::endl;\n      assert(false);\n    }\n  }\n}\n\ntemplate<int DataLayout>\nvoid test_multithread_contraction_agrees_with_singlethread() {\n  int contract_size = internal::random<int>(1, 5000);\n\n  Tensor<float, 3, DataLayout> left(internal::random<int>(1, 80),\n                                    contract_size,\n                                    internal::random<int>(1, 100));\n\n  Tensor<float, 4, DataLayout> right(internal::random<int>(1, 25),\n                                     internal::random<int>(1, 37),\n                                     contract_size,\n                                     internal::random<int>(1, 51));\n\n  left.setRandom();\n  right.setRandom();\n\n  // add constants to shift values away from 0 for more precision\n  left += left.constant(1.5f);\n  right += right.constant(1.5f);\n\n  typedef Tensor<float, 1>::DimensionPair DimPair;\n  Eigen::array<DimPair, 1> dims({{DimPair(1, 2)}});\n\n  Eigen::ThreadPool tp(internal::random<int>(2, 11));\n  Eigen::ThreadPoolDevice thread_pool_device(&tp, internal::random<int>(2, 11));\n\n  Tensor<float, 5, DataLayout> st_result;\n  st_result = left.contract(right, dims);\n\n  Tensor<float, 5, DataLayout> tp_result(st_result.dimensions());\n  tp_result.device(thread_pool_device) = left.contract(right, dims);\n\n  VERIFY(dimensions_match(st_result.dimensions(), tp_result.dimensions()));\n  for (ptrdiff_t i = 0; i < st_result.size(); i++) {\n    // if both of the values are very small, then do nothing (because the test will fail\n    // due to numerical precision issues when values are small)\n    if (numext::abs(st_result.data()[i] - tp_result.data()[i]) >= 1e-4f) {\n      VERIFY_IS_APPROX(st_result.data()[i], tp_result.data()[i]);\n    }\n  }\n}\n\n// Apply Sqrt to all output elements.\nstruct SqrtOutputKernel {\n  template <typename Index, typename Scalar>\n  EIGEN_ALWAYS_INLINE void operator()(\n      const internal::blas_data_mapper<Scalar, Index, ColMajor>& output_mapper,\n      const TensorContractionParams&, Index, Index, Index num_rows,\n      Index num_cols) const {\n    for (int i = 0; i < num_rows; ++i) {\n      for (int j = 0; j < num_cols; ++j) {\n        output_mapper(i, j) = std::sqrt(output_mapper(i, j));\n      }\n    }\n  }\n};\n\ntemplate <int DataLayout>\nstatic void test_multithread_contraction_with_output_kernel() {\n  typedef Tensor<float, 1>::DimensionPair DimPair;\n\n  const int num_threads = internal::random<int>(2, 11);\n  ThreadPool threads(num_threads);\n  Eigen::ThreadPoolDevice device(&threads, num_threads);\n\n  Tensor<float, 4, DataLayout> t_left(30, 50, 8, 31);\n  Tensor<float, 5, DataLayout> t_right(8, 31, 7, 20, 10);\n  Tensor<float, 5, DataLayout> t_result(30, 50, 7, 20, 10);\n\n  t_left.setRandom();\n  t_right.setRandom();\n  // Put trash in mat4 to verify contraction clears output memory.\n  t_result.setRandom();\n\n  // Add a little offset so that the results won't be close to zero.\n  t_left += t_left.constant(1.0f);\n  t_right += t_right.constant(1.0f);\n\n  typedef Map<Eigen::Matrix<float, Dynamic, Dynamic, DataLayout>> MapXf;\n  MapXf m_left(t_left.data(), 1500, 248);\n  MapXf m_right(t_right.data(), 248, 1400);\n  Eigen::Matrix<float, Dynamic, Dynamic, DataLayout> m_result(1500, 1400);\n\n  // this contraction should be equivalent to a single matrix multiplication\n  Eigen::array<DimPair, 2> dims({{DimPair(2, 0), DimPair(3, 1)}});\n\n  // compute results by separate methods\n  t_result.device(device) = t_left.contract(t_right, dims, SqrtOutputKernel());\n\n  m_result = m_left * m_right;\n\n  for (Index i = 0; i < t_result.dimensions().TotalSize(); i++) {\n    VERIFY(&t_result.data()[i] != &m_result.data()[i]);\n    VERIFY_IS_APPROX(t_result.data()[i], std::sqrt(m_result.data()[i]));\n  }\n}\n\ntemplate<int DataLayout>\nvoid test_async_multithread_contraction_agrees_with_singlethread()\n{\n  int contract_size = internal::random<int>(100, 500);\n\n  Tensor<float, 3, DataLayout> left(internal::random<int>(10, 40),\n                                    contract_size,\n                                    internal::random<int>(10, 40));\n\n  Tensor<float, 4, DataLayout> right(\n      internal::random<int>(1, 20), internal::random<int>(1, 20), contract_size,\n      internal::random<int>(1, 20));\n\n  left.setRandom();\n  right.setRandom();\n\n  // add constants to shift values away from 0 for more precision\n  left += left.constant(1.5f);\n  right += right.constant(1.5f);\n\n  typedef Tensor<float, 1>::DimensionPair DimPair;\n  Eigen::array<DimPair, 1> dims({{DimPair(1, 2)}});\n\n  Eigen::ThreadPool tp(internal::random<int>(2, 11));\n  Eigen::ThreadPoolDevice thread_pool_device(&tp, internal::random<int>(8, 32));\n\n  Tensor<float, 5, DataLayout> st_result;\n  st_result = left.contract(right, dims);\n\n  Tensor<float, 5, DataLayout> tp_result(st_result.dimensions());\n\n  Eigen::Barrier barrier(1);\n  tp_result.device(thread_pool_device, [&barrier]() { barrier.Notify(); }) =\n      left.contract(right, dims);\n  barrier.Wait();\n\n  VERIFY(dimensions_match(st_result.dimensions(), tp_result.dimensions()));\n  for (ptrdiff_t i = 0; i < st_result.size(); i++) {\n    // if both of the values are very small, then do nothing (because the test\n    // will fail due to numerical precision issues when values are small)\n    if (numext::abs(st_result.data()[i] - tp_result.data()[i]) >= 1e-4f) {\n      VERIFY_IS_APPROX(st_result.data()[i], tp_result.data()[i]);\n    }\n  }\n}\n\n// We are triggering 'evalShardedByInnerDim' optimization.\ntemplate <int DataLayout>\nstatic void test_sharded_by_inner_dim_contraction()\n{\n  typedef Tensor<float, 1>::DimensionPair DimPair;\n\n  const int num_threads = internal::random<int>(4, 16);\n  ThreadPool threads(num_threads);\n  Eigen::ThreadPoolDevice device(&threads, num_threads);\n\n  Tensor<float, 2, DataLayout> t_left(2, 10000);\n  Tensor<float, 2, DataLayout> t_right(10000, 10);\n  Tensor<float, 2, DataLayout> t_result(2, 10);\n\n  t_left.setRandom();\n  t_right.setRandom();\n  // Put trash in t_result to verify contraction clears output memory.\n  t_result.setRandom();\n\n  // Add a little offset so that the results won't be close to zero.\n  t_left += t_left.constant(1.0f);\n  t_right += t_right.constant(1.0f);\n\n  typedef Map<Eigen::Matrix<float, Dynamic, Dynamic, DataLayout>> MapXf;\n  MapXf m_left(t_left.data(), 2, 10000);\n  MapXf m_right(t_right.data(), 10000, 10);\n  Eigen::Matrix<float, Dynamic, Dynamic, DataLayout> m_result(2, 10);\n\n  // this contraction should be equivalent to a single matrix multiplication\n  Eigen::array<DimPair, 1> dims({{DimPair(1, 0)}});\n\n  // compute results by separate methods\n  t_result.device(device) = t_left.contract(t_right, dims);\n  m_result = m_left * m_right;\n\n  for (Index i = 0; i < t_result.dimensions().TotalSize(); i++) {\n    VERIFY_IS_APPROX(t_result.data()[i], m_result.data()[i]);\n  }\n}\n\n// We are triggering 'evalShardedByInnerDim' optimization with output kernel.\ntemplate <int DataLayout>\nstatic void test_sharded_by_inner_dim_contraction_with_output_kernel()\n{\n  typedef Tensor<float, 1>::DimensionPair DimPair;\n\n  const int num_threads = internal::random<int>(4, 16);\n  ThreadPool threads(num_threads);\n  Eigen::ThreadPoolDevice device(&threads, num_threads);\n\n  Tensor<float, 2, DataLayout> t_left(2, 10000);\n  Tensor<float, 2, DataLayout> t_right(10000, 10);\n  Tensor<float, 2, DataLayout> t_result(2, 10);\n\n  t_left.setRandom();\n  t_right.setRandom();\n  // Put trash in t_result to verify contraction clears output memory.\n  t_result.setRandom();\n\n  // Add a little offset so that the results won't be close to zero.\n  t_left += t_left.constant(1.0f);\n  t_right += t_right.constant(1.0f);\n\n  typedef Map<Eigen::Matrix<float, Dynamic, Dynamic, DataLayout>> MapXf;\n  MapXf m_left(t_left.data(), 2, 10000);\n  MapXf m_right(t_right.data(), 10000, 10);\n  Eigen::Matrix<float, Dynamic, Dynamic, DataLayout> m_result(2, 10);\n\n  // this contraction should be equivalent to a single matrix multiplication\n  Eigen::array<DimPair, 1> dims({{DimPair(1, 0)}});\n\n  // compute results by separate methods\n  t_result.device(device) = t_left.contract(t_right, dims, SqrtOutputKernel());\n  m_result = m_left * m_right;\n\n  for (Index i = 0; i < t_result.dimensions().TotalSize(); i++) {\n    VERIFY_IS_APPROX(t_result.data()[i], std::sqrt(m_result.data()[i]));\n  }\n}\n\n// We are triggering 'evalShardedByInnerDim' optimization.\ntemplate <int DataLayout>\nstatic void test_async_sharded_by_inner_dim_contraction()\n{\n  typedef Tensor<float, 1>::DimensionPair DimPair;\n\n  const int num_threads = internal::random<int>(4, 16);\n  ThreadPool threads(num_threads);\n  Eigen::ThreadPoolDevice device(&threads, num_threads);\n\n  Tensor<float, 2, DataLayout> t_left(2, 10000);\n  Tensor<float, 2, DataLayout> t_right(10000, 10);\n  Tensor<float, 2, DataLayout> t_result(2, 10);\n\n  t_left.setRandom();\n  t_right.setRandom();\n  // Put trash in t_result to verify contraction clears output memory.\n  t_result.setRandom();\n\n  // Add a little offset so that the results won't be close to zero.\n  t_left += t_left.constant(1.0f);\n  t_right += t_right.constant(1.0f);\n\n  typedef Map<Eigen::Matrix<float, Dynamic, Dynamic, DataLayout>> MapXf;\n  MapXf m_left(t_left.data(), 2, 10000);\n  MapXf m_right(t_right.data(), 10000, 10);\n  Eigen::Matrix<float, Dynamic, Dynamic, DataLayout> m_result(2, 10);\n\n  // this contraction should be equivalent to a single matrix multiplication\n  Eigen::array<DimPair, 1> dims({{DimPair(1, 0)}});\n\n  // compute results by separate methods\n  Eigen::Barrier barrier(1);\n  t_result.device(device, [&barrier]() { barrier.Notify(); }) =\n      t_left.contract(t_right, dims);\n  barrier.Wait();\n\n  m_result = m_left * m_right;\n\n  for (Index i = 0; i < t_result.dimensions().TotalSize(); i++) {\n    VERIFY_IS_APPROX(t_result.data()[i], m_result.data()[i]);\n  }\n}\n\n// We are triggering 'evalShardedByInnerDim' optimization with output kernel.\ntemplate <int DataLayout>\nstatic void test_async_sharded_by_inner_dim_contraction_with_output_kernel()\n{\n  typedef Tensor<float, 1>::DimensionPair DimPair;\n\n  const int num_threads = internal::random<int>(4, 16);\n  ThreadPool threads(num_threads);\n  Eigen::ThreadPoolDevice device(&threads, num_threads);\n\n  Tensor<float, 2, DataLayout> t_left(2, 10000);\n  Tensor<float, 2, DataLayout> t_right(10000, 10);\n  Tensor<float, 2, DataLayout> t_result(2, 10);\n\n  t_left.setRandom();\n  t_right.setRandom();\n  // Put trash in t_result to verify contraction clears output memory.\n  t_result.setRandom();\n\n  // Add a little offset so that the results won't be close to zero.\n  t_left += t_left.constant(1.0f);\n  t_right += t_right.constant(1.0f);\n\n  typedef Map<Eigen::Matrix<float, Dynamic, Dynamic, DataLayout>> MapXf;\n  MapXf m_left(t_left.data(), 2, 10000);\n  MapXf m_right(t_right.data(), 10000, 10);\n  Eigen::Matrix<float, Dynamic, Dynamic, DataLayout> m_result(2, 10);\n\n  // this contraction should be equivalent to a single matrix multiplication\n  Eigen::array<DimPair, 1> dims({{DimPair(1, 0)}});\n\n  // compute results by separate methods\n  Eigen::Barrier barrier(1);\n  t_result.device(device, [&barrier]() { barrier.Notify(); }) =\n      t_left.contract(t_right, dims, SqrtOutputKernel());\n  barrier.Wait();\n  m_result = m_left * m_right;\n\n  for (Index i = 0; i < t_result.dimensions().TotalSize(); i++) {\n    VERIFY_IS_APPROX(t_result.data()[i], std::sqrt(m_result.data()[i]));\n  }\n}\n\ntemplate<int DataLayout>\nvoid test_full_contraction() {\n  int contract_size1 = internal::random<int>(1, 500);\n  int contract_size2 = internal::random<int>(1, 500);\n\n  Tensor<float, 2, DataLayout> left(contract_size1,\n                                    contract_size2);\n  Tensor<float, 2, DataLayout> right(contract_size1,\n                                    contract_size2);\n  left.setRandom();\n  right.setRandom();\n\n  // add constants to shift values away from 0 for more precision\n  left += left.constant(1.5f);\n  right += right.constant(1.5f);\n\n  typedef Tensor<float, 2>::DimensionPair DimPair;\n  Eigen::array<DimPair, 2> dims({{DimPair(0, 0), DimPair(1, 1)}});\n\n  Eigen::ThreadPool tp(internal::random<int>(2, 11));\n  Eigen::ThreadPoolDevice thread_pool_device(&tp, internal::random<int>(2, 11));\n\n  Tensor<float, 0, DataLayout> st_result;\n  st_result = left.contract(right, dims);\n\n  Tensor<float, 0, DataLayout> tp_result;\n  tp_result.device(thread_pool_device) = left.contract(right, dims);\n\n  VERIFY(dimensions_match(st_result.dimensions(), tp_result.dimensions()));\n  // if both of the values are very small, then do nothing (because the test will fail\n  // due to numerical precision issues when values are small)\n  if (numext::abs(st_result() - tp_result()) >= 1e-4f) {\n    VERIFY_IS_APPROX(st_result(), tp_result());\n  }\n}\n\ntemplate<int DataLayout>\nvoid test_multithreaded_reductions() {\n  const int num_threads = internal::random<int>(3, 11);\n  ThreadPool thread_pool(num_threads);\n  Eigen::ThreadPoolDevice thread_pool_device(&thread_pool, num_threads);\n\n  const int num_rows = internal::random<int>(13, 732);\n  const int num_cols = internal::random<int>(13, 732);\n  Tensor<float, 2, DataLayout> t1(num_rows, num_cols);\n  t1.setRandom();\n\n  Tensor<float, 0, DataLayout> full_redux;\n  full_redux = t1.sum();\n\n  Tensor<float, 0, DataLayout> full_redux_tp;\n  full_redux_tp.device(thread_pool_device) = t1.sum();\n\n  // Check that the single threaded and the multi threaded reductions return\n  // the same result.\n  VERIFY_IS_APPROX(full_redux(), full_redux_tp());\n}\n\n\nvoid test_memcpy() {\n\n  for (int i = 0; i < 5; ++i) {\n    const int num_threads = internal::random<int>(3, 11);\n    Eigen::ThreadPool tp(num_threads);\n    Eigen::ThreadPoolDevice thread_pool_device(&tp, num_threads);\n\n    const int size = internal::random<int>(13, 7632);\n    Tensor<float, 1> t1(size);\n    t1.setRandom();\n    std::vector<float> result(size);\n    thread_pool_device.memcpy(&result[0], t1.data(), size*sizeof(float));\n    for (int j = 0; j < size; j++) {\n      VERIFY_IS_EQUAL(t1(j), result[j]);\n    }\n  }\n}\n\n\nvoid test_multithread_random()\n{\n  Eigen::ThreadPool tp(2);\n  Eigen::ThreadPoolDevice device(&tp, 2);\n  Tensor<float, 1> t(1 << 20);\n  t.device(device) = t.random<Eigen::internal::NormalRandomGenerator<float>>();\n}\n\ntemplate<int DataLayout>\nvoid test_multithread_shuffle(Allocator* allocator)\n{\n  Tensor<float, 4, DataLayout> tensor(17,5,7,11);\n  tensor.setRandom();\n\n  const int num_threads = internal::random<int>(2, 11);\n  ThreadPool threads(num_threads);\n  Eigen::ThreadPoolDevice device(&threads, num_threads, allocator);\n\n  Tensor<float, 4, DataLayout> shuffle(7,5,11,17);\n  array<ptrdiff_t, 4> shuffles = {{2,1,3,0}};\n  shuffle.device(device) = tensor.shuffle(shuffles);\n\n  for (int i = 0; i < 17; ++i) {\n    for (int j = 0; j < 5; ++j) {\n      for (int k = 0; k < 7; ++k) {\n        for (int l = 0; l < 11; ++l) {\n          VERIFY_IS_EQUAL(tensor(i,j,k,l), shuffle(k,j,l,i));\n        }\n      }\n    }\n  }\n}\n\nvoid test_threadpool_allocate(TestAllocator* allocator)\n{\n  const int num_threads = internal::random<int>(2, 11);\n  const int num_allocs = internal::random<int>(2, 11);\n  ThreadPool threads(num_threads);\n  Eigen::ThreadPoolDevice device(&threads, num_threads, allocator);\n\n  for (int a = 0; a < num_allocs; ++a) {\n    void* ptr = device.allocate(512);\n    device.deallocate(ptr);\n  }\n  VERIFY(allocator != NULL);\n  VERIFY_IS_EQUAL(allocator->alloc_count(), num_allocs);\n  VERIFY_IS_EQUAL(allocator->dealloc_count(), num_allocs);\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_thread_pool)\n{\n  CALL_SUBTEST_1(test_multithread_elementwise());\n  CALL_SUBTEST_1(test_async_multithread_elementwise());\n  CALL_SUBTEST_1(test_multithread_compound_assignment());\n\n  CALL_SUBTEST_2(test_multithread_contraction<ColMajor>());\n  CALL_SUBTEST_2(test_multithread_contraction<RowMajor>());\n\n  CALL_SUBTEST_3(test_multithread_contraction_agrees_with_singlethread<ColMajor>());\n  CALL_SUBTEST_3(test_multithread_contraction_agrees_with_singlethread<RowMajor>());\n  CALL_SUBTEST_3(test_multithread_contraction_with_output_kernel<ColMajor>());\n  CALL_SUBTEST_3(test_multithread_contraction_with_output_kernel<RowMajor>());\n\n  CALL_SUBTEST_4(test_async_multithread_contraction_agrees_with_singlethread<ColMajor>());\n  CALL_SUBTEST_4(test_async_multithread_contraction_agrees_with_singlethread<RowMajor>());\n\n  // Test EvalShardedByInnerDimContext parallelization strategy.\n  CALL_SUBTEST_5(test_sharded_by_inner_dim_contraction<ColMajor>());\n  CALL_SUBTEST_5(test_sharded_by_inner_dim_contraction<RowMajor>());\n  CALL_SUBTEST_5(test_sharded_by_inner_dim_contraction_with_output_kernel<ColMajor>());\n  CALL_SUBTEST_5(test_sharded_by_inner_dim_contraction_with_output_kernel<RowMajor>());\n\n  CALL_SUBTEST_6(test_async_sharded_by_inner_dim_contraction<ColMajor>());\n  CALL_SUBTEST_6(test_async_sharded_by_inner_dim_contraction<RowMajor>());\n  CALL_SUBTEST_6(test_async_sharded_by_inner_dim_contraction_with_output_kernel<ColMajor>());\n  CALL_SUBTEST_6(test_async_sharded_by_inner_dim_contraction_with_output_kernel<RowMajor>());\n\n  // Exercise various cases that have been problematic in the past.\n  CALL_SUBTEST_7(test_contraction_corner_cases<ColMajor>());\n  CALL_SUBTEST_7(test_contraction_corner_cases<RowMajor>());\n\n  CALL_SUBTEST_8(test_full_contraction<ColMajor>());\n  CALL_SUBTEST_8(test_full_contraction<RowMajor>());\n\n  CALL_SUBTEST_9(test_multithreaded_reductions<ColMajor>());\n  CALL_SUBTEST_9(test_multithreaded_reductions<RowMajor>());\n\n  CALL_SUBTEST_10(test_memcpy());\n  CALL_SUBTEST_10(test_multithread_random());\n\n  TestAllocator test_allocator;\n  CALL_SUBTEST_11(test_multithread_shuffle<ColMajor>(NULL));\n  CALL_SUBTEST_11(test_multithread_shuffle<RowMajor>(&test_allocator));\n  CALL_SUBTEST_11(test_threadpool_allocate(&test_allocator));\n\n  // Force CMake to split this test.\n  // EIGEN_SUFFIXES;1;2;3;4;5;6;7;8;9;10;11\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_trace.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2017 Gagan Goel <gagan.nith@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\nusing Eigen::array;\n\ntemplate <int DataLayout>\nstatic void test_0D_trace() {\n  Tensor<float, 0, DataLayout> tensor;\n  tensor.setRandom();\n  array<ptrdiff_t, 0> dims;\n  Tensor<float, 0, DataLayout> result = tensor.trace(dims);\n  VERIFY_IS_EQUAL(result(), tensor());\n}\n\n\ntemplate <int DataLayout>\nstatic void test_all_dimensions_trace() {\n  Tensor<float, 3, DataLayout> tensor1(5, 5, 5);\n  tensor1.setRandom();\n  Tensor<float, 0, DataLayout> result1 = tensor1.trace();\n  VERIFY_IS_EQUAL(result1.rank(), 0);\n  float sum = 0.0f;\n  for (int i = 0; i < 5; ++i) {\n    sum += tensor1(i, i, i);\n  }\n  VERIFY_IS_EQUAL(result1(), sum);\n\n  Tensor<float, 5, DataLayout> tensor2(7, 7, 7, 7, 7);\n  tensor2.setRandom();\n  array<ptrdiff_t, 5> dims = { { 2, 1, 0, 3, 4 } };\n  Tensor<float, 0, DataLayout> result2 = tensor2.trace(dims);\n  VERIFY_IS_EQUAL(result2.rank(), 0);\n  sum = 0.0f;\n  for (int i = 0; i < 7; ++i) {\n    sum += tensor2(i, i, i, i, i);\n  }\n  VERIFY_IS_EQUAL(result2(), sum);\n}\n\n\ntemplate <int DataLayout>\nstatic void test_simple_trace() {\n  Tensor<float, 3, DataLayout> tensor1(3, 5, 3);\n  tensor1.setRandom();\n  array<ptrdiff_t, 2> dims1 = { { 0, 2 } };\n  Tensor<float, 1, DataLayout> result1 = tensor1.trace(dims1);\n  VERIFY_IS_EQUAL(result1.rank(), 1);\n  VERIFY_IS_EQUAL(result1.dimension(0), 5);\n  float sum = 0.0f;\n  for (int i = 0; i < 5; ++i) {\n    sum = 0.0f;\n    for (int j = 0; j < 3; ++j) {\n      sum += tensor1(j, i, j);\n    }\n    VERIFY_IS_EQUAL(result1(i), sum);\n  }\n\n  Tensor<float, 4, DataLayout> tensor2(5, 5, 7, 7);\n  tensor2.setRandom();\n  array<ptrdiff_t, 2> dims2 = { { 2, 3 } };\n  Tensor<float, 2, DataLayout> result2 = tensor2.trace(dims2);\n  VERIFY_IS_EQUAL(result2.rank(), 2);\n  VERIFY_IS_EQUAL(result2.dimension(0), 5);\n  VERIFY_IS_EQUAL(result2.dimension(1), 5);\n  for (int i = 0; i < 5; ++i) {\n    for (int j = 0; j < 5; ++j) {\n      sum = 0.0f;\n      for (int k = 0; k < 7; ++k) {\n        sum += tensor2(i, j, k, k);\n      }\n      VERIFY_IS_EQUAL(result2(i, j), sum);\n    }\n  }\n\n  array<ptrdiff_t, 2> dims3 = { { 1, 0 } };\n  Tensor<float, 2, DataLayout> result3 = tensor2.trace(dims3);\n  VERIFY_IS_EQUAL(result3.rank(), 2);\n  VERIFY_IS_EQUAL(result3.dimension(0), 7);\n  VERIFY_IS_EQUAL(result3.dimension(1), 7);\n  for (int i = 0; i < 7; ++i) {\n    for (int j = 0; j < 7; ++j) {\n      sum = 0.0f;\n      for (int k = 0; k < 5; ++k) {\n        sum += tensor2(k, k, i, j);\n      }\n      VERIFY_IS_EQUAL(result3(i, j), sum);\n    }\n  }\n\n  Tensor<float, 5, DataLayout> tensor3(3, 7, 3, 7, 3);\n  tensor3.setRandom();\n  array<ptrdiff_t, 3> dims4 = { { 0, 2, 4 } };\n  Tensor<float, 2, DataLayout> result4 = tensor3.trace(dims4);\n  VERIFY_IS_EQUAL(result4.rank(), 2);\n  VERIFY_IS_EQUAL(result4.dimension(0), 7);\n  VERIFY_IS_EQUAL(result4.dimension(1), 7);\n  for (int i = 0; i < 7; ++i) {\n    for (int j = 0; j < 7; ++j) {\n      sum = 0.0f;\n      for (int k = 0; k < 3; ++k) {\n        sum += tensor3(k, i, k, j, k);\n      }\n      VERIFY_IS_EQUAL(result4(i, j), sum);\n    }\n  }\n\n  Tensor<float, 5, DataLayout> tensor4(3, 7, 4, 7, 5);\n  tensor4.setRandom();\n  array<ptrdiff_t, 2> dims5 = { { 1, 3 } };\n  Tensor<float, 3, DataLayout> result5 = tensor4.trace(dims5);\n  VERIFY_IS_EQUAL(result5.rank(), 3);\n  VERIFY_IS_EQUAL(result5.dimension(0), 3);\n  VERIFY_IS_EQUAL(result5.dimension(1), 4);\n  VERIFY_IS_EQUAL(result5.dimension(2), 5);\n  for (int i = 0; i < 3; ++i) {\n    for (int j = 0; j < 4; ++j) {\n      for (int k = 0; k < 5; ++k) {\n        sum = 0.0f;\n        for (int l = 0; l < 7; ++l) {\n          sum += tensor4(i, l, j, l, k);\n        }\n        VERIFY_IS_EQUAL(result5(i, j, k), sum);\n      }\n    }\n  }\n}\n\n\ntemplate<int DataLayout>\nstatic void test_trace_in_expr() {\n  Tensor<float, 4, DataLayout> tensor(2, 3, 5, 3);\n  tensor.setRandom();\n  array<ptrdiff_t, 2> dims = { { 1, 3 } };\n  Tensor<float, 2, DataLayout> result(2, 5);\n  result = result.constant(1.0f) - tensor.trace(dims);\n  VERIFY_IS_EQUAL(result.rank(), 2);\n  VERIFY_IS_EQUAL(result.dimension(0), 2);\n  VERIFY_IS_EQUAL(result.dimension(1), 5);\n  float sum = 0.0f;\n  for (int i = 0; i < 2; ++i) {\n    for (int j = 0; j < 5; ++j) {\n      sum = 0.0f;\n      for (int k = 0; k < 3; ++k) {\n        sum += tensor(i, k, j, k);\n      }\n      VERIFY_IS_EQUAL(result(i, j), 1.0f - sum);\n    }\n  }\n}\n\n\nEIGEN_DECLARE_TEST(cxx11_tensor_trace) {\n  CALL_SUBTEST(test_0D_trace<ColMajor>());\n  CALL_SUBTEST(test_0D_trace<RowMajor>());\n  CALL_SUBTEST(test_all_dimensions_trace<ColMajor>());\n  CALL_SUBTEST(test_all_dimensions_trace<RowMajor>());\n  CALL_SUBTEST(test_simple_trace<ColMajor>());\n  CALL_SUBTEST(test_simple_trace<RowMajor>());\n  CALL_SUBTEST(test_trace_in_expr<ColMajor>());\n  CALL_SUBTEST(test_trace_in_expr<RowMajor>());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_uint128.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2015 Benoit Steiner <benoit.steiner.goog@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\n\n#if EIGEN_COMP_MSVC\n#define EIGEN_NO_INT128\n#else\ntypedef __uint128_t uint128_t;\n#endif\n\n// Only run the test on compilers that support 128bit integers natively\n#ifndef EIGEN_NO_INT128\n\nusing Eigen::internal::TensorUInt128;\nusing Eigen::internal::static_val;\n\nvoid VERIFY_EQUAL(TensorUInt128<uint64_t, uint64_t> actual, uint128_t expected) {\n  bool matchl = actual.lower() == static_cast<uint64_t>(expected);\n  bool matchh = actual.upper() == static_cast<uint64_t>(expected >> 64);\n  if (!matchl || !matchh) {\n    const char* testname = g_test_stack.back().c_str();\n    std::cerr << \"Test \" << testname << \" failed in \" << __FILE__\n              << \" (\" << __LINE__ << \")\"\n              << std::endl;\n    abort();\n  }\n}\n\n\nvoid test_add() {\n  uint64_t incr = internal::random<uint64_t>(1, 9999999999);\n  for (uint64_t i1 = 0; i1 < 100; ++i1) {\n    for (uint64_t i2 = 1; i2 < 100 * incr; i2 += incr) {\n      TensorUInt128<uint64_t, uint64_t> i(i1, i2);\n      uint128_t a = (static_cast<uint128_t>(i1) << 64) + static_cast<uint128_t>(i2);\n      for (uint64_t j1 = 0; j1 < 100; ++j1) {\n        for (uint64_t j2 = 1; j2 < 100 * incr; j2 += incr) {\n          TensorUInt128<uint64_t, uint64_t> j(j1, j2);\n          uint128_t b = (static_cast<uint128_t>(j1) << 64) + static_cast<uint128_t>(j2);\n          TensorUInt128<uint64_t, uint64_t> actual = i + j;\n          uint128_t expected = a + b;\n          VERIFY_EQUAL(actual, expected);\n        }\n      }\n    }\n  }\n}\n\nvoid test_sub() {\n  uint64_t incr = internal::random<uint64_t>(1, 9999999999);\n  for (uint64_t i1 = 0; i1 < 100; ++i1) {\n    for (uint64_t i2 = 1; i2 < 100 * incr; i2 += incr) {\n      TensorUInt128<uint64_t, uint64_t> i(i1, i2);\n      uint128_t a = (static_cast<uint128_t>(i1) << 64) + static_cast<uint128_t>(i2);\n      for (uint64_t j1 = 0; j1 < 100; ++j1) {\n        for (uint64_t j2 = 1; j2 < 100 * incr; j2 += incr) {\n          TensorUInt128<uint64_t, uint64_t> j(j1, j2);\n          uint128_t b = (static_cast<uint128_t>(j1) << 64) + static_cast<uint128_t>(j2);\n          TensorUInt128<uint64_t, uint64_t> actual = i - j;\n          uint128_t expected = a - b;\n          VERIFY_EQUAL(actual, expected);\n        }\n      }\n    }\n  }\n}\n\nvoid test_mul() {\n  uint64_t incr = internal::random<uint64_t>(1, 9999999999);\n  for (uint64_t i1 = 0; i1 < 100; ++i1) {\n    for (uint64_t i2 = 1; i2 < 100 * incr; i2 += incr) {\n      TensorUInt128<uint64_t, uint64_t> i(i1, i2);\n      uint128_t a = (static_cast<uint128_t>(i1) << 64) + static_cast<uint128_t>(i2);\n      for (uint64_t j1 = 0; j1 < 100; ++j1) {\n        for (uint64_t j2 = 1; j2 < 100 * incr; j2 += incr) {\n          TensorUInt128<uint64_t, uint64_t> j(j1, j2);\n          uint128_t b = (static_cast<uint128_t>(j1) << 64) + static_cast<uint128_t>(j2);\n          TensorUInt128<uint64_t, uint64_t> actual = i * j;\n          uint128_t expected = a * b;\n          VERIFY_EQUAL(actual, expected);\n        }\n      }\n    }\n  }\n}\n\nvoid test_div() {\n  uint64_t incr = internal::random<uint64_t>(1, 9999999999);\n  for (uint64_t i1 = 0; i1 < 100; ++i1) {\n    for (uint64_t i2 = 1; i2 < 100 * incr; i2 += incr) {\n      TensorUInt128<uint64_t, uint64_t> i(i1, i2);\n      uint128_t a = (static_cast<uint128_t>(i1) << 64) + static_cast<uint128_t>(i2);\n      for (uint64_t j1 = 0; j1 < 100; ++j1) {\n        for (uint64_t j2 = 1; j2 < 100 * incr; j2 += incr) {\n          TensorUInt128<uint64_t, uint64_t> j(j1, j2);\n          uint128_t b = (static_cast<uint128_t>(j1) << 64) + static_cast<uint128_t>(j2);\n          TensorUInt128<uint64_t, uint64_t> actual = i / j;\n          uint128_t expected = a / b;\n          VERIFY_EQUAL(actual, expected);\n        }\n      }\n    }\n  }\n}\n\nvoid test_misc1() {\n  uint64_t incr = internal::random<uint64_t>(1, 9999999999);\n  for (uint64_t i2 = 1; i2 < 100 * incr; i2 += incr) {\n    TensorUInt128<static_val<0>, uint64_t> i(0, i2);\n    uint128_t a = static_cast<uint128_t>(i2);\n    for (uint64_t j2 = 1; j2 < 100 * incr; j2 += incr) {\n      TensorUInt128<static_val<0>, uint64_t> j(0, j2);\n      uint128_t b = static_cast<uint128_t>(j2);\n      uint64_t actual = (i * j).upper();\n      uint64_t expected = (a * b) >> 64;\n      VERIFY_IS_EQUAL(actual, expected);\n    }\n  }\n}\n\nvoid test_misc2() {\n  int64_t incr = internal::random<int64_t>(1, 100);\n  for (int64_t log_div = 0; log_div < 63; ++log_div) {\n    for (int64_t divider = 1; divider <= 1000000 * incr; divider += incr) {\n      uint64_t expected = (static_cast<uint128_t>(1) << (64+log_div)) / static_cast<uint128_t>(divider) - (static_cast<uint128_t>(1) << 64) + 1;\n      uint64_t shift = 1ULL << log_div;\n\n      TensorUInt128<uint64_t, uint64_t> result = (TensorUInt128<uint64_t, static_val<0> >(shift, 0) / TensorUInt128<static_val<0>, uint64_t>(divider) - TensorUInt128<static_val<1>, static_val<0> >(1, 0) + TensorUInt128<static_val<0>, static_val<1> >(1));\n      uint64_t actual = static_cast<uint64_t>(result);\n      VERIFY_IS_EQUAL(actual, expected);\n    }\n  }\n}\n#endif\n\n\nEIGEN_DECLARE_TEST(cxx11_tensor_uint128)\n{\n#ifdef EIGEN_NO_INT128\n  // Skip the test on compilers that don't support 128bit integers natively\n  return;\n#else\n  CALL_SUBTEST_1(test_add());\n  CALL_SUBTEST_2(test_sub());\n  CALL_SUBTEST_3(test_mul());\n  CALL_SUBTEST_4(test_div());\n  CALL_SUBTEST_5(test_misc1());\n  CALL_SUBTEST_6(test_misc2());\n#endif\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_volume_patch.cpp",
    "content": "#include \"main.h\"\n\n#include <Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\n\nstatic void test_single_voxel_patch()\n{\n  Tensor<float, 5> tensor(4,2,3,5,7);\n  tensor.setRandom();\n  Tensor<float, 5, RowMajor> tensor_row_major = tensor.swap_layout();\n\n  Tensor<float, 6> single_voxel_patch;\n  single_voxel_patch = tensor.extract_volume_patches(1, 1, 1);\n  VERIFY_IS_EQUAL(single_voxel_patch.dimension(0), 4);\n  VERIFY_IS_EQUAL(single_voxel_patch.dimension(1), 1);\n  VERIFY_IS_EQUAL(single_voxel_patch.dimension(2), 1);\n  VERIFY_IS_EQUAL(single_voxel_patch.dimension(3), 1);\n  VERIFY_IS_EQUAL(single_voxel_patch.dimension(4), 2 * 3 * 5);\n  VERIFY_IS_EQUAL(single_voxel_patch.dimension(5), 7);\n\n  Tensor<float, 6, RowMajor> single_voxel_patch_row_major;\n  single_voxel_patch_row_major = tensor_row_major.extract_volume_patches(1, 1, 1);\n  VERIFY_IS_EQUAL(single_voxel_patch_row_major.dimension(0), 7);\n  VERIFY_IS_EQUAL(single_voxel_patch_row_major.dimension(1), 2 * 3 * 5);\n  VERIFY_IS_EQUAL(single_voxel_patch_row_major.dimension(2), 1);\n  VERIFY_IS_EQUAL(single_voxel_patch_row_major.dimension(3), 1);\n  VERIFY_IS_EQUAL(single_voxel_patch_row_major.dimension(4), 1);\n  VERIFY_IS_EQUAL(single_voxel_patch_row_major.dimension(5), 4);\n\n  for (int i = 0; i < tensor.size(); ++i) {\n    VERIFY_IS_EQUAL(tensor.data()[i], single_voxel_patch.data()[i]);\n    VERIFY_IS_EQUAL(tensor_row_major.data()[i], single_voxel_patch_row_major.data()[i]);\n    VERIFY_IS_EQUAL(tensor.data()[i], tensor_row_major.data()[i]);\n  }\n}\n\n\nstatic void test_entire_volume_patch()\n{\n  const int depth = 4;\n  const int patch_z = 2;\n  const int patch_y = 3;\n  const int patch_x = 5;\n  const int batch = 7;\n\n  Tensor<float, 5> tensor(depth, patch_z, patch_y, patch_x, batch);\n  tensor.setRandom();\n  Tensor<float, 5, RowMajor> tensor_row_major = tensor.swap_layout();\n\n  Tensor<float, 6> entire_volume_patch;\n  entire_volume_patch = tensor.extract_volume_patches(patch_z, patch_y, patch_x);\n  VERIFY_IS_EQUAL(entire_volume_patch.dimension(0), depth);\n  VERIFY_IS_EQUAL(entire_volume_patch.dimension(1), patch_z);\n  VERIFY_IS_EQUAL(entire_volume_patch.dimension(2), patch_y);\n  VERIFY_IS_EQUAL(entire_volume_patch.dimension(3), patch_x);\n  VERIFY_IS_EQUAL(entire_volume_patch.dimension(4), patch_z * patch_y * patch_x);\n  VERIFY_IS_EQUAL(entire_volume_patch.dimension(5), batch);\n\n  Tensor<float, 6, RowMajor> entire_volume_patch_row_major;\n  entire_volume_patch_row_major = tensor_row_major.extract_volume_patches(patch_z, patch_y, patch_x);\n  VERIFY_IS_EQUAL(entire_volume_patch_row_major.dimension(0), batch);\n  VERIFY_IS_EQUAL(entire_volume_patch_row_major.dimension(1), patch_z * patch_y * patch_x);\n  VERIFY_IS_EQUAL(entire_volume_patch_row_major.dimension(2), patch_x);\n  VERIFY_IS_EQUAL(entire_volume_patch_row_major.dimension(3), patch_y);\n  VERIFY_IS_EQUAL(entire_volume_patch_row_major.dimension(4), patch_z);\n  VERIFY_IS_EQUAL(entire_volume_patch_row_major.dimension(5), depth);\n\n  const int dz = patch_z - 1;\n  const int dy = patch_y - 1;\n  const int dx = patch_x - 1;\n\n  const int forward_pad_z = dz - dz / 2;\n  const int forward_pad_y = dy - dy / 2;\n  const int forward_pad_x = dx - dx / 2;\n\n  for (int pz = 0; pz < patch_z; pz++) {\n    for (int py = 0; py < patch_y; py++) {\n      for (int px = 0; px < patch_x; px++) {\n        const int patchId = pz + patch_z * (py + px * patch_y);\n        for (int z = 0; z < patch_z; z++) {\n          for (int y = 0; y < patch_y; y++) {\n            for (int x = 0; x < patch_x; x++) {\n              for (int b = 0; b < batch; b++) {\n                for (int d = 0; d < depth; d++) {\n                  float expected = 0.0f;\n                  float expected_row_major = 0.0f;\n                  const int eff_z = z - forward_pad_z + pz;\n                  const int eff_y = y - forward_pad_y + py;\n                  const int eff_x = x - forward_pad_x + px;\n                  if (eff_z >= 0 && eff_y >= 0 && eff_x >= 0 &&\n                      eff_z < patch_z && eff_y < patch_y && eff_x < patch_x) {\n                    expected = tensor(d, eff_z, eff_y, eff_x, b);\n                    expected_row_major = tensor_row_major(b, eff_x, eff_y, eff_z, d);\n                  }\n                  VERIFY_IS_EQUAL(entire_volume_patch(d, z, y, x, patchId, b), expected);\n                  VERIFY_IS_EQUAL(entire_volume_patch_row_major(b, patchId, x, y, z, d), expected_row_major);\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n\nEIGEN_DECLARE_TEST(cxx11_tensor_volume_patch)\n{\n  CALL_SUBTEST(test_single_voxel_patch());\n  CALL_SUBTEST(test_entire_volume_patch());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/cxx11_tensor_volume_patch_sycl.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016\n// Mehdi Goli    Codeplay Software Ltd.\n// Ralph Potter  Codeplay Software Ltd.\n// Luke Iwanski  Codeplay Software Ltd.\n// Contact: <eigen@codeplay.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#define EIGEN_TEST_NO_LONGDOUBLE\n#define EIGEN_TEST_NO_COMPLEX\n\n#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int64_t\n#define EIGEN_USE_SYCL\n\n#include \"main.h\"\n#include <unsupported/Eigen/CXX11/Tensor>\n\nusing Eigen::Tensor;\nstatic const int DataLayout = ColMajor;\n\ntemplate <typename DataType, typename IndexType>\nstatic void test_single_voxel_patch_sycl(const Eigen::SyclDevice& sycl_device)\n{\n\nIndexType sizeDim0 = 4;\nIndexType sizeDim1 = 2;\nIndexType sizeDim2 = 3;\nIndexType sizeDim3 = 5;\nIndexType sizeDim4 = 7;\narray<IndexType, 5> tensorColMajorRange = {{sizeDim0, sizeDim1, sizeDim2, sizeDim3, sizeDim4}};\narray<IndexType, 5> tensorRowMajorRange = {{sizeDim4, sizeDim3, sizeDim2, sizeDim1, sizeDim0}};\nTensor<DataType, 5, DataLayout,IndexType> tensor_col_major(tensorColMajorRange);\nTensor<DataType, 5, RowMajor,IndexType> tensor_row_major(tensorRowMajorRange);\ntensor_col_major.setRandom();\n\n\n  DataType* gpu_data_col_major  = static_cast<DataType*>(sycl_device.allocate(tensor_col_major.size()*sizeof(DataType)));\n  DataType* gpu_data_row_major  = static_cast<DataType*>(sycl_device.allocate(tensor_row_major.size()*sizeof(DataType)));\n  TensorMap<Tensor<DataType, 5, ColMajor, IndexType>> gpu_col_major(gpu_data_col_major, tensorColMajorRange);\n  TensorMap<Tensor<DataType, 5, RowMajor, IndexType>> gpu_row_major(gpu_data_row_major, tensorRowMajorRange);\n\n  sycl_device.memcpyHostToDevice(gpu_data_col_major, tensor_col_major.data(),(tensor_col_major.size())*sizeof(DataType));\n  gpu_row_major.device(sycl_device)=gpu_col_major.swap_layout();\n\n\n  // single volume patch: ColMajor\n  array<IndexType, 6> patchColMajorTensorRange={{sizeDim0,1, 1, 1, sizeDim1*sizeDim2*sizeDim3, sizeDim4}};\n  Tensor<DataType, 6, DataLayout,IndexType> single_voxel_patch_col_major(patchColMajorTensorRange);\n  size_t patchTensorBuffSize =single_voxel_patch_col_major.size()*sizeof(DataType);\n  DataType* gpu_data_single_voxel_patch_col_major  = static_cast<DataType*>(sycl_device.allocate(patchTensorBuffSize));\n  TensorMap<Tensor<DataType, 6, DataLayout,IndexType>> gpu_single_voxel_patch_col_major(gpu_data_single_voxel_patch_col_major, patchColMajorTensorRange);\n  gpu_single_voxel_patch_col_major.device(sycl_device)=gpu_col_major.extract_volume_patches(1, 1, 1);\n  sycl_device.memcpyDeviceToHost(single_voxel_patch_col_major.data(), gpu_data_single_voxel_patch_col_major, patchTensorBuffSize);\n\n\n  VERIFY_IS_EQUAL(single_voxel_patch_col_major.dimension(0), 4);\n  VERIFY_IS_EQUAL(single_voxel_patch_col_major.dimension(1), 1);\n  VERIFY_IS_EQUAL(single_voxel_patch_col_major.dimension(2), 1);\n  VERIFY_IS_EQUAL(single_voxel_patch_col_major.dimension(3), 1);\n  VERIFY_IS_EQUAL(single_voxel_patch_col_major.dimension(4), 2 * 3 * 5);\n  VERIFY_IS_EQUAL(single_voxel_patch_col_major.dimension(5), 7);\n\n  array<IndexType, 6> patchRowMajorTensorRange={{sizeDim4, sizeDim1*sizeDim2*sizeDim3, 1, 1, 1, sizeDim0}};\n  Tensor<DataType, 6, RowMajor,IndexType> single_voxel_patch_row_major(patchRowMajorTensorRange);\n  patchTensorBuffSize =single_voxel_patch_row_major.size()*sizeof(DataType);\n  DataType* gpu_data_single_voxel_patch_row_major  = static_cast<DataType*>(sycl_device.allocate(patchTensorBuffSize));\n  TensorMap<Tensor<DataType, 6, RowMajor,IndexType>> gpu_single_voxel_patch_row_major(gpu_data_single_voxel_patch_row_major, patchRowMajorTensorRange);\n  gpu_single_voxel_patch_row_major.device(sycl_device)=gpu_row_major.extract_volume_patches(1, 1, 1);\n  sycl_device.memcpyDeviceToHost(single_voxel_patch_row_major.data(), gpu_data_single_voxel_patch_row_major, patchTensorBuffSize);\n\n  VERIFY_IS_EQUAL(single_voxel_patch_row_major.dimension(0), 7);\n  VERIFY_IS_EQUAL(single_voxel_patch_row_major.dimension(1), 2 * 3 * 5);\n  VERIFY_IS_EQUAL(single_voxel_patch_row_major.dimension(2), 1);\n  VERIFY_IS_EQUAL(single_voxel_patch_row_major.dimension(3), 1);\n  VERIFY_IS_EQUAL(single_voxel_patch_row_major.dimension(4), 1);\n  VERIFY_IS_EQUAL(single_voxel_patch_row_major.dimension(5), 4);\n\n sycl_device.memcpyDeviceToHost(tensor_row_major.data(), gpu_data_row_major, (tensor_col_major.size())*sizeof(DataType));\n for (IndexType i = 0; i < tensor_col_major.size(); ++i) {\n       VERIFY_IS_EQUAL(tensor_col_major.data()[i], single_voxel_patch_col_major.data()[i]);\n    VERIFY_IS_EQUAL(tensor_row_major.data()[i], single_voxel_patch_row_major.data()[i]);\n    VERIFY_IS_EQUAL(tensor_col_major.data()[i], tensor_row_major.data()[i]);\n  }\n\n\n  sycl_device.deallocate(gpu_data_col_major);\n  sycl_device.deallocate(gpu_data_row_major);\n  sycl_device.deallocate(gpu_data_single_voxel_patch_col_major);\n  sycl_device.deallocate(gpu_data_single_voxel_patch_row_major);\n}\n\ntemplate <typename DataType, typename IndexType>\nstatic void test_entire_volume_patch_sycl(const Eigen::SyclDevice& sycl_device)\n{\n  const int depth = 4;\n  const int patch_z = 2;\n  const int patch_y = 3;\n  const int patch_x = 5;\n  const int batch = 7;\n\n  array<IndexType, 5> tensorColMajorRange = {{depth, patch_z, patch_y, patch_x, batch}};\n  array<IndexType, 5> tensorRowMajorRange = {{batch, patch_x, patch_y, patch_z, depth}};\n  Tensor<DataType, 5, DataLayout,IndexType> tensor_col_major(tensorColMajorRange);\n  Tensor<DataType, 5, RowMajor,IndexType> tensor_row_major(tensorRowMajorRange);\n  tensor_col_major.setRandom();\n\n\n    DataType* gpu_data_col_major  = static_cast<DataType*>(sycl_device.allocate(tensor_col_major.size()*sizeof(DataType)));\n    DataType* gpu_data_row_major  = static_cast<DataType*>(sycl_device.allocate(tensor_row_major.size()*sizeof(DataType)));\n    TensorMap<Tensor<DataType, 5, ColMajor, IndexType>> gpu_col_major(gpu_data_col_major, tensorColMajorRange);\n    TensorMap<Tensor<DataType, 5, RowMajor, IndexType>> gpu_row_major(gpu_data_row_major, tensorRowMajorRange);\n\n    sycl_device.memcpyHostToDevice(gpu_data_col_major, tensor_col_major.data(),(tensor_col_major.size())*sizeof(DataType));\n    gpu_row_major.device(sycl_device)=gpu_col_major.swap_layout();\n    sycl_device.memcpyDeviceToHost(tensor_row_major.data(), gpu_data_row_major, (tensor_col_major.size())*sizeof(DataType));\n\n\n    // single volume patch: ColMajor\n    array<IndexType, 6> patchColMajorTensorRange={{depth,patch_z, patch_y, patch_x, patch_z*patch_y*patch_x, batch}};\n    Tensor<DataType, 6, DataLayout,IndexType> entire_volume_patch_col_major(patchColMajorTensorRange);\n    size_t patchTensorBuffSize =entire_volume_patch_col_major.size()*sizeof(DataType);\n    DataType* gpu_data_entire_volume_patch_col_major  = static_cast<DataType*>(sycl_device.allocate(patchTensorBuffSize));\n    TensorMap<Tensor<DataType, 6, DataLayout,IndexType>> gpu_entire_volume_patch_col_major(gpu_data_entire_volume_patch_col_major, patchColMajorTensorRange);\n    gpu_entire_volume_patch_col_major.device(sycl_device)=gpu_col_major.extract_volume_patches(patch_z, patch_y, patch_x);\n    sycl_device.memcpyDeviceToHost(entire_volume_patch_col_major.data(), gpu_data_entire_volume_patch_col_major, patchTensorBuffSize);\n\n\n//  Tensor<float, 5> tensor(depth, patch_z, patch_y, patch_x, batch);\n//  tensor.setRandom();\n//  Tensor<float, 5, RowMajor> tensor_row_major = tensor.swap_layout();\n\n  //Tensor<float, 6> entire_volume_patch;\n  //entire_volume_patch = tensor.extract_volume_patches(patch_z, patch_y, patch_x);\n  VERIFY_IS_EQUAL(entire_volume_patch_col_major.dimension(0), depth);\n  VERIFY_IS_EQUAL(entire_volume_patch_col_major.dimension(1), patch_z);\n  VERIFY_IS_EQUAL(entire_volume_patch_col_major.dimension(2), patch_y);\n  VERIFY_IS_EQUAL(entire_volume_patch_col_major.dimension(3), patch_x);\n  VERIFY_IS_EQUAL(entire_volume_patch_col_major.dimension(4), patch_z * patch_y * patch_x);\n  VERIFY_IS_EQUAL(entire_volume_patch_col_major.dimension(5), batch);\n\n//  Tensor<float, 6, RowMajor> entire_volume_patch_row_major;\n  //entire_volume_patch_row_major = tensor_row_major.extract_volume_patches(patch_z, patch_y, patch_x);\n\n  array<IndexType, 6> patchRowMajorTensorRange={{batch,patch_z*patch_y*patch_x, patch_x, patch_y, patch_z, depth}};\n  Tensor<DataType, 6, RowMajor,IndexType> entire_volume_patch_row_major(patchRowMajorTensorRange);\n  patchTensorBuffSize =entire_volume_patch_row_major.size()*sizeof(DataType);\n  DataType* gpu_data_entire_volume_patch_row_major  = static_cast<DataType*>(sycl_device.allocate(patchTensorBuffSize));\n  TensorMap<Tensor<DataType, 6, RowMajor,IndexType>> gpu_entire_volume_patch_row_major(gpu_data_entire_volume_patch_row_major, patchRowMajorTensorRange);\n  gpu_entire_volume_patch_row_major.device(sycl_device)=gpu_row_major.extract_volume_patches(patch_z, patch_y, patch_x);\n  sycl_device.memcpyDeviceToHost(entire_volume_patch_row_major.data(), gpu_data_entire_volume_patch_row_major, patchTensorBuffSize);\n\n\n  VERIFY_IS_EQUAL(entire_volume_patch_row_major.dimension(0), batch);\n  VERIFY_IS_EQUAL(entire_volume_patch_row_major.dimension(1), patch_z * patch_y * patch_x);\n  VERIFY_IS_EQUAL(entire_volume_patch_row_major.dimension(2), patch_x);\n  VERIFY_IS_EQUAL(entire_volume_patch_row_major.dimension(3), patch_y);\n  VERIFY_IS_EQUAL(entire_volume_patch_row_major.dimension(4), patch_z);\n  VERIFY_IS_EQUAL(entire_volume_patch_row_major.dimension(5), depth);\n\n  const int dz = patch_z - 1;\n  const int dy = patch_y - 1;\n  const int dx = patch_x - 1;\n\n  const int forward_pad_z = dz - dz / 2;\n  const int forward_pad_y = dy - dy / 2;\n  const int forward_pad_x = dx - dx / 2;\n\n  for (int pz = 0; pz < patch_z; pz++) {\n    for (int py = 0; py < patch_y; py++) {\n      for (int px = 0; px < patch_x; px++) {\n        const int patchId = pz + patch_z * (py + px * patch_y);\n        for (int z = 0; z < patch_z; z++) {\n          for (int y = 0; y < patch_y; y++) {\n            for (int x = 0; x < patch_x; x++) {\n              for (int b = 0; b < batch; b++) {\n                for (int d = 0; d < depth; d++) {\n                  float expected = 0.0f;\n                  float expected_row_major = 0.0f;\n                  const int eff_z = z - forward_pad_z + pz;\n                  const int eff_y = y - forward_pad_y + py;\n                  const int eff_x = x - forward_pad_x + px;\n                  if (eff_z >= 0 && eff_y >= 0 && eff_x >= 0 &&\n                      eff_z < patch_z && eff_y < patch_y && eff_x < patch_x) {\n                    expected = tensor_col_major(d, eff_z, eff_y, eff_x, b);\n                    expected_row_major = tensor_row_major(b, eff_x, eff_y, eff_z, d);\n                  }\n                  VERIFY_IS_EQUAL(entire_volume_patch_col_major(d, z, y, x, patchId, b), expected);\n                  VERIFY_IS_EQUAL(entire_volume_patch_row_major(b, patchId, x, y, z, d), expected_row_major);\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  sycl_device.deallocate(gpu_data_col_major);\n  sycl_device.deallocate(gpu_data_row_major);\n  sycl_device.deallocate(gpu_data_entire_volume_patch_col_major);\n  sycl_device.deallocate(gpu_data_entire_volume_patch_row_major);\n}\n\n\n\ntemplate<typename DataType, typename dev_Selector> void sycl_tensor_volume_patch_test_per_device(dev_Selector s){\nQueueInterface queueInterface(s);\nauto sycl_device = Eigen::SyclDevice(&queueInterface);\nstd::cout << \"Running on \" << s.template get_info<cl::sycl::info::device::name>() << std::endl;\ntest_single_voxel_patch_sycl<DataType, int64_t>(sycl_device);\ntest_entire_volume_patch_sycl<DataType, int64_t>(sycl_device);\n}\nEIGEN_DECLARE_TEST(cxx11_tensor_volume_patch_sycl)\n{\nfor (const auto& device :Eigen::get_sycl_supported_devices()) {\n  CALL_SUBTEST(sycl_tensor_volume_patch_test_per_device<float>(device));\n}\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/dgmres.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2011 Gael Guennebaud <g.gael@free.fr>\n// Copyright (C) 2012 desire Nuentsa <desire.nuentsa_wakam@inria.fr\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"../../test/sparse_solver.h\"\n#include <unsupported/Eigen/IterativeSolvers>\n\ntemplate<typename T> void test_dgmres_T()\n{\n  DGMRES<SparseMatrix<T>, DiagonalPreconditioner<T> > dgmres_colmajor_diag;\n  DGMRES<SparseMatrix<T>, IdentityPreconditioner    > dgmres_colmajor_I;\n  DGMRES<SparseMatrix<T>, IncompleteLUT<T> >           dgmres_colmajor_ilut;\n  //GMRES<SparseMatrix<T>, SSORPreconditioner<T> >     dgmres_colmajor_ssor;\n\n  CALL_SUBTEST( check_sparse_square_solving(dgmres_colmajor_diag)  );\n//   CALL_SUBTEST( check_sparse_square_solving(dgmres_colmajor_I)     );\n  CALL_SUBTEST( check_sparse_square_solving(dgmres_colmajor_ilut)     );\n  //CALL_SUBTEST( check_sparse_square_solving(dgmres_colmajor_ssor)     );\n}\n\nEIGEN_DECLARE_TEST(dgmres)\n{\n  CALL_SUBTEST_1(test_dgmres_T<double>());\n  CALL_SUBTEST_2(test_dgmres_T<std::complex<double> >());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/forward_adolc.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008 Gael Guennebaud <g.gael@free.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <Eigen/Dense>\n\n#define NUMBER_DIRECTIONS 16\n#include <unsupported/Eigen/AdolcForward>\n\ntemplate<typename Vector>\nEIGEN_DONT_INLINE typename Vector::Scalar foo(const Vector& p)\n{\n  typedef typename Vector::Scalar Scalar;\n  return (p-Vector(Scalar(-1),Scalar(1.))).norm() + (p.array().sqrt().abs() * p.array().sin()).sum() + p.dot(p);\n}\n\ntemplate<typename _Scalar, int NX=Dynamic, int NY=Dynamic>\nstruct TestFunc1\n{\n  typedef _Scalar Scalar;\n  enum {\n    InputsAtCompileTime = NX,\n    ValuesAtCompileTime = NY\n  };\n  typedef Matrix<Scalar,InputsAtCompileTime,1> InputType;\n  typedef Matrix<Scalar,ValuesAtCompileTime,1> ValueType;\n  typedef Matrix<Scalar,ValuesAtCompileTime,InputsAtCompileTime> JacobianType;\n\n  int m_inputs, m_values;\n\n  TestFunc1() : m_inputs(InputsAtCompileTime), m_values(ValuesAtCompileTime) {}\n  TestFunc1(int inputs_, int values_) : m_inputs(inputs_), m_values(values_) {}\n\n  int inputs() const { return m_inputs; }\n  int values() const { return m_values; }\n\n  template<typename T>\n  void operator() (const Matrix<T,InputsAtCompileTime,1>& x, Matrix<T,ValuesAtCompileTime,1>* _v) const\n  {\n    Matrix<T,ValuesAtCompileTime,1>& v = *_v;\n\n    v[0] = 2 * x[0] * x[0] + x[0] * x[1];\n    v[1] = 3 * x[1] * x[0] + 0.5 * x[1] * x[1];\n    if(inputs()>2)\n    {\n      v[0] += 0.5 * x[2];\n      v[1] += x[2];\n    }\n    if(values()>2)\n    {\n      v[2] = 3 * x[1] * x[0] * x[0];\n    }\n    if (inputs()>2 && values()>2)\n      v[2] *= x[2];\n  }\n\n  void operator() (const InputType& x, ValueType* v, JacobianType* _j) const\n  {\n    (*this)(x, v);\n\n    if(_j)\n    {\n      JacobianType& j = *_j;\n\n      j(0,0) = 4 * x[0] + x[1];\n      j(1,0) = 3 * x[1];\n\n      j(0,1) = x[0];\n      j(1,1) = 3 * x[0] + 2 * 0.5 * x[1];\n\n      if (inputs()>2)\n      {\n        j(0,2) = 0.5;\n        j(1,2) = 1;\n      }\n      if(values()>2)\n      {\n        j(2,0) = 3 * x[1] * 2 * x[0];\n        j(2,1) = 3 * x[0] * x[0];\n      }\n      if (inputs()>2 && values()>2)\n      {\n        j(2,0) *= x[2];\n        j(2,1) *= x[2];\n\n        j(2,2) = 3 * x[1] * x[0] * x[0];\n        j(2,2) = 3 * x[1] * x[0] * x[0];\n      }\n    }\n  }\n};\n\ntemplate<typename Func> void adolc_forward_jacobian(const Func& f)\n{\n    typename Func::InputType x = Func::InputType::Random(f.inputs());\n    typename Func::ValueType y(f.values()), yref(f.values());\n    typename Func::JacobianType j(f.values(),f.inputs()), jref(f.values(),f.inputs());\n\n    jref.setZero();\n    yref.setZero();\n    f(x,&yref,&jref);\n//     std::cerr << y.transpose() << \"\\n\\n\";;\n//     std::cerr << j << \"\\n\\n\";;\n\n    j.setZero();\n    y.setZero();\n    AdolcForwardJacobian<Func> autoj(f);\n    autoj(x, &y, &j);\n//     std::cerr << y.transpose() << \"\\n\\n\";;\n//     std::cerr << j << \"\\n\\n\";;\n\n    VERIFY_IS_APPROX(y, yref);\n    VERIFY_IS_APPROX(j, jref);\n}\n\nEIGEN_DECLARE_TEST(forward_adolc)\n{\n  adtl::setNumDir(NUMBER_DIRECTIONS);\n\n  for(int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST(( adolc_forward_jacobian(TestFunc1<double,2,2>()) ));\n    CALL_SUBTEST(( adolc_forward_jacobian(TestFunc1<double,2,3>()) ));\n    CALL_SUBTEST(( adolc_forward_jacobian(TestFunc1<double,3,2>()) ));\n    CALL_SUBTEST(( adolc_forward_jacobian(TestFunc1<double,3,3>()) ));\n    CALL_SUBTEST(( adolc_forward_jacobian(TestFunc1<double>(3,3)) ));\n  }\n\n  {\n    // simple instantiation tests\n    Matrix<adtl::adouble,2,1> x;\n    foo(x);\n    Matrix<adtl::adouble,Dynamic,Dynamic> A(4,4);;\n    A.selfadjointView<Lower>().eigenvalues();\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/gmres.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2011 Gael Guennebaud <g.gael@free.fr>\n// Copyright (C) 2012 Kolja Brix <brix@igpm.rwth-aaachen.de>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"../../test/sparse_solver.h\"\n#include <Eigen/IterativeSolvers>\n\ntemplate<typename T> void test_gmres_T()\n{\n  GMRES<SparseMatrix<T>, DiagonalPreconditioner<T> > gmres_colmajor_diag;\n  GMRES<SparseMatrix<T>, IdentityPreconditioner    > gmres_colmajor_I;\n  GMRES<SparseMatrix<T>, IncompleteLUT<T> >           gmres_colmajor_ilut;\n  //GMRES<SparseMatrix<T>, SSORPreconditioner<T> >     gmres_colmajor_ssor;\n\n  CALL_SUBTEST( check_sparse_square_solving(gmres_colmajor_diag)  );\n//   CALL_SUBTEST( check_sparse_square_solving(gmres_colmajor_I)     );\n  CALL_SUBTEST( check_sparse_square_solving(gmres_colmajor_ilut)     );\n  //CALL_SUBTEST( check_sparse_square_solving(gmres_colmajor_ssor)     );\n}\n\nEIGEN_DECLARE_TEST(gmres)\n{\n  CALL_SUBTEST_1(test_gmres_T<double>());\n  CALL_SUBTEST_2(test_gmres_T<std::complex<double> >());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/kronecker_product.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2011 Kolja Brix <brix@igpm.rwth-aachen.de>\n// Copyright (C) 2011 Andreas Platen <andiplaten@gmx.de>\n// Copyright (C) 2012 Chen-Pang He <jdh8@ms63.hinet.net>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n\n#ifdef EIGEN_TEST_PART_1\n\n#include \"sparse.h\"\n#include <Eigen/SparseExtra>\n#include <Eigen/KroneckerProduct>\n\ntemplate<typename MatrixType>\nvoid check_dimension(const MatrixType& ab, const int rows,  const int cols)\n{\n  VERIFY_IS_EQUAL(ab.rows(), rows);\n  VERIFY_IS_EQUAL(ab.cols(), cols);\n}\n\n\ntemplate<typename MatrixType>\nvoid check_kronecker_product(const MatrixType& ab)\n{\n  VERIFY_IS_EQUAL(ab.rows(), 6);\n  VERIFY_IS_EQUAL(ab.cols(), 6);\n  VERIFY_IS_EQUAL(ab.nonZeros(),  36);\n  VERIFY_IS_APPROX(ab.coeff(0,0), -0.4017367630386106);\n  VERIFY_IS_APPROX(ab.coeff(0,1),  0.1056863433932735);\n  VERIFY_IS_APPROX(ab.coeff(0,2), -0.7255206194554212);\n  VERIFY_IS_APPROX(ab.coeff(0,3),  0.1908653336744706);\n  VERIFY_IS_APPROX(ab.coeff(0,4),  0.350864567234111);\n  VERIFY_IS_APPROX(ab.coeff(0,5), -0.0923032108308013);\n  VERIFY_IS_APPROX(ab.coeff(1,0),  0.415417514804677);\n  VERIFY_IS_APPROX(ab.coeff(1,1), -0.2369227701722048);\n  VERIFY_IS_APPROX(ab.coeff(1,2),  0.7502275131458511);\n  VERIFY_IS_APPROX(ab.coeff(1,3), -0.4278731019742696);\n  VERIFY_IS_APPROX(ab.coeff(1,4), -0.3628129162264507);\n  VERIFY_IS_APPROX(ab.coeff(1,5),  0.2069210808481275);\n  VERIFY_IS_APPROX(ab.coeff(2,0),  0.05465890160863986);\n  VERIFY_IS_APPROX(ab.coeff(2,1), -0.2634092511419858);\n  VERIFY_IS_APPROX(ab.coeff(2,2),  0.09871180285793758);\n  VERIFY_IS_APPROX(ab.coeff(2,3), -0.4757066334017702);\n  VERIFY_IS_APPROX(ab.coeff(2,4), -0.04773740823058334);\n  VERIFY_IS_APPROX(ab.coeff(2,5),  0.2300535609645254);\n  VERIFY_IS_APPROX(ab.coeff(3,0), -0.8172945853260133);\n  VERIFY_IS_APPROX(ab.coeff(3,1),  0.2150086428359221);\n  VERIFY_IS_APPROX(ab.coeff(3,2),  0.5825113847292743);\n  VERIFY_IS_APPROX(ab.coeff(3,3), -0.1532433770097174);\n  VERIFY_IS_APPROX(ab.coeff(3,4), -0.329383387282399);\n  VERIFY_IS_APPROX(ab.coeff(3,5),  0.08665207912033064);\n  VERIFY_IS_APPROX(ab.coeff(4,0),  0.8451267514863225);\n  VERIFY_IS_APPROX(ab.coeff(4,1), -0.481996458918977);\n  VERIFY_IS_APPROX(ab.coeff(4,2), -0.6023482390791535);\n  VERIFY_IS_APPROX(ab.coeff(4,3),  0.3435339347164565);\n  VERIFY_IS_APPROX(ab.coeff(4,4),  0.3406002157428891);\n  VERIFY_IS_APPROX(ab.coeff(4,5), -0.1942526344200915);\n  VERIFY_IS_APPROX(ab.coeff(5,0),  0.1111982482925399);\n  VERIFY_IS_APPROX(ab.coeff(5,1), -0.5358806424754169);\n  VERIFY_IS_APPROX(ab.coeff(5,2), -0.07925446559335647);\n  VERIFY_IS_APPROX(ab.coeff(5,3),  0.3819388757769038);\n  VERIFY_IS_APPROX(ab.coeff(5,4),  0.04481475387219876);\n  VERIFY_IS_APPROX(ab.coeff(5,5), -0.2159688616158057);\n}\n\n\ntemplate<typename MatrixType>\nvoid check_sparse_kronecker_product(const MatrixType& ab)\n{\n  VERIFY_IS_EQUAL(ab.rows(), 12);\n  VERIFY_IS_EQUAL(ab.cols(), 10);\n  VERIFY_IS_EQUAL(ab.nonZeros(), 3*2);\n  VERIFY_IS_APPROX(ab.coeff(3,0), -0.04);\n  VERIFY_IS_APPROX(ab.coeff(5,1),  0.05);\n  VERIFY_IS_APPROX(ab.coeff(0,6), -0.08);\n  VERIFY_IS_APPROX(ab.coeff(2,7),  0.10);\n  VERIFY_IS_APPROX(ab.coeff(6,8),  0.12);\n  VERIFY_IS_APPROX(ab.coeff(8,9), -0.15);\n}\n\n\nEIGEN_DECLARE_TEST(kronecker_product)\n{\n  // DM = dense matrix; SM = sparse matrix\n\n  Matrix<double, 2, 3> DM_a;\n  SparseMatrix<double> SM_a(2,3);\n  SM_a.insert(0,0) = DM_a.coeffRef(0,0) = -0.4461540300782201;\n  SM_a.insert(0,1) = DM_a.coeffRef(0,1) = -0.8057364375283049;\n  SM_a.insert(0,2) = DM_a.coeffRef(0,2) =  0.3896572459516341;\n  SM_a.insert(1,0) = DM_a.coeffRef(1,0) = -0.9076572187376921;\n  SM_a.insert(1,1) = DM_a.coeffRef(1,1) =  0.6469156566545853;\n  SM_a.insert(1,2) = DM_a.coeffRef(1,2) = -0.3658010398782789;\n\n  MatrixXd             DM_b(3,2);\n  SparseMatrix<double> SM_b(3,2);\n  SM_b.insert(0,0) = DM_b.coeffRef(0,0) =  0.9004440976767099;\n  SM_b.insert(0,1) = DM_b.coeffRef(0,1) = -0.2368830858139832;\n  SM_b.insert(1,0) = DM_b.coeffRef(1,0) = -0.9311078389941825;\n  SM_b.insert(1,1) = DM_b.coeffRef(1,1) =  0.5310335762980047;\n  SM_b.insert(2,0) = DM_b.coeffRef(2,0) = -0.1225112806872035;\n  SM_b.insert(2,1) = DM_b.coeffRef(2,1) =  0.5903998022741264;\n\n  SparseMatrix<double,RowMajor> SM_row_a(SM_a), SM_row_b(SM_b);\n\n  // test DM_fixedSize = kroneckerProduct(DM_block,DM)\n  Matrix<double, 6, 6> DM_fix_ab = kroneckerProduct(DM_a.topLeftCorner<2,3>(),DM_b);\n\n  CALL_SUBTEST(check_kronecker_product(DM_fix_ab));\n  CALL_SUBTEST(check_kronecker_product(kroneckerProduct(DM_a.topLeftCorner<2,3>(),DM_b)));\n\n  for(int i=0;i<DM_fix_ab.rows();++i)\n    for(int j=0;j<DM_fix_ab.cols();++j)\n       VERIFY_IS_APPROX(kroneckerProduct(DM_a,DM_b).coeff(i,j), DM_fix_ab(i,j));\n\n  // test DM_block = kroneckerProduct(DM,DM)\n  MatrixXd DM_block_ab(10,15);\n  DM_block_ab.block<6,6>(2,5) = kroneckerProduct(DM_a,DM_b);\n  CALL_SUBTEST(check_kronecker_product(DM_block_ab.block<6,6>(2,5)));\n\n  // test DM = kroneckerProduct(DM,DM)\n  MatrixXd DM_ab = kroneckerProduct(DM_a,DM_b);\n  CALL_SUBTEST(check_kronecker_product(DM_ab));\n  CALL_SUBTEST(check_kronecker_product(kroneckerProduct(DM_a,DM_b)));\n\n  // test SM = kroneckerProduct(SM,DM)\n  SparseMatrix<double> SM_ab = kroneckerProduct(SM_a,DM_b);\n  CALL_SUBTEST(check_kronecker_product(SM_ab));\n  SparseMatrix<double,RowMajor> SM_ab2 = kroneckerProduct(SM_a,DM_b);\n  CALL_SUBTEST(check_kronecker_product(SM_ab2));\n  CALL_SUBTEST(check_kronecker_product(kroneckerProduct(SM_a,DM_b)));\n\n  // test SM = kroneckerProduct(DM,SM)\n  SM_ab.setZero();\n  SM_ab.insert(0,0)=37.0;\n  SM_ab = kroneckerProduct(DM_a,SM_b);\n  CALL_SUBTEST(check_kronecker_product(SM_ab));\n  SM_ab2.setZero();\n  SM_ab2.insert(0,0)=37.0;\n  SM_ab2 = kroneckerProduct(DM_a,SM_b);\n  CALL_SUBTEST(check_kronecker_product(SM_ab2));\n  CALL_SUBTEST(check_kronecker_product(kroneckerProduct(DM_a,SM_b)));\n\n  // test SM = kroneckerProduct(SM,SM)\n  SM_ab.resize(2,33);\n  SM_ab.insert(0,0)=37.0;\n  SM_ab = kroneckerProduct(SM_a,SM_b);\n  CALL_SUBTEST(check_kronecker_product(SM_ab));\n  SM_ab2.resize(5,11);\n  SM_ab2.insert(0,0)=37.0;\n  SM_ab2 = kroneckerProduct(SM_a,SM_b);\n  CALL_SUBTEST(check_kronecker_product(SM_ab2));\n  CALL_SUBTEST(check_kronecker_product(kroneckerProduct(SM_a,SM_b)));\n\n  // test SM = kroneckerProduct(SM,SM) with sparse pattern\n  SM_a.resize(4,5);\n  SM_b.resize(3,2);\n  SM_a.resizeNonZeros(0);\n  SM_b.resizeNonZeros(0);\n  SM_a.insert(1,0) = -0.1;\n  SM_a.insert(0,3) = -0.2;\n  SM_a.insert(2,4) =  0.3;\n  SM_a.finalize();\n\n  SM_b.insert(0,0) =  0.4;\n  SM_b.insert(2,1) = -0.5;\n  SM_b.finalize();\n  SM_ab.resize(1,1);\n  SM_ab.insert(0,0)=37.0;\n  SM_ab = kroneckerProduct(SM_a,SM_b);\n  CALL_SUBTEST(check_sparse_kronecker_product(SM_ab));\n\n  // test dimension of result of DM = kroneckerProduct(DM,DM)\n  MatrixXd DM_a2(2,1);\n  MatrixXd DM_b2(5,4);\n  MatrixXd DM_ab2 = kroneckerProduct(DM_a2,DM_b2);\n  CALL_SUBTEST(check_dimension(DM_ab2,2*5,1*4));\n  DM_a2.resize(10,9);\n  DM_b2.resize(4,8);\n  DM_ab2 = kroneckerProduct(DM_a2,DM_b2);\n  CALL_SUBTEST(check_dimension(DM_ab2,10*4,9*8));\n\n  for(int i = 0; i < g_repeat; i++)\n  {\n    double density = Eigen::internal::random<double>(0.01,0.5);\n    int ra = Eigen::internal::random<int>(1,50);\n    int ca = Eigen::internal::random<int>(1,50);\n    int rb = Eigen::internal::random<int>(1,50);\n    int cb = Eigen::internal::random<int>(1,50);\n    SparseMatrix<float,ColMajor> sA(ra,ca), sB(rb,cb), sC;\n    SparseMatrix<float,RowMajor> sC2;\n    MatrixXf dA(ra,ca), dB(rb,cb), dC;\n    initSparse(density, dA, sA);\n    initSparse(density, dB, sB);\n\n    sC = kroneckerProduct(sA,sB);\n    dC = kroneckerProduct(dA,dB);\n    VERIFY_IS_APPROX(MatrixXf(sC),dC);\n\n    sC = kroneckerProduct(sA.transpose(),sB);\n    dC = kroneckerProduct(dA.transpose(),dB);\n    VERIFY_IS_APPROX(MatrixXf(sC),dC);\n\n    sC = kroneckerProduct(sA.transpose(),sB.transpose());\n    dC = kroneckerProduct(dA.transpose(),dB.transpose());\n    VERIFY_IS_APPROX(MatrixXf(sC),dC);\n\n    sC = kroneckerProduct(sA,sB.transpose());\n    dC = kroneckerProduct(dA,dB.transpose());\n    VERIFY_IS_APPROX(MatrixXf(sC),dC);\n\n    sC2 = kroneckerProduct(sA,sB);\n    dC = kroneckerProduct(dA,dB);\n    VERIFY_IS_APPROX(MatrixXf(sC2),dC);\n\n    sC2 = kroneckerProduct(dA,sB);\n    dC = kroneckerProduct(dA,dB);\n    VERIFY_IS_APPROX(MatrixXf(sC2),dC);\n\n    sC2 = kroneckerProduct(sA,dB);\n    dC = kroneckerProduct(dA,dB);\n    VERIFY_IS_APPROX(MatrixXf(sC2),dC);\n\n    sC2 = kroneckerProduct(2*sA,sB);\n    dC = kroneckerProduct(2*dA,dB);\n    VERIFY_IS_APPROX(MatrixXf(sC2),dC);\n  }\n}\n\n#endif\n\n#ifdef EIGEN_TEST_PART_2\n\n// simply check that for a dense kronecker product, sparse module is not needed\n#include \"main.h\"\n#include <Eigen/KroneckerProduct>\n\nEIGEN_DECLARE_TEST(kronecker_product)\n{\n  MatrixXd a(2,2), b(3,3), c;\n  a.setRandom();\n  b.setRandom();\n  c = kroneckerProduct(a,b);\n  VERIFY_IS_APPROX(c.block(3,3,3,3), a(1,1)*b);\n}\n\n#endif\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/levenberg_marquardt.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Thomas Capricelli <orzel@freehackers.org>\n// Copyright (C) 2012 desire Nuentsa <desire.nuentsa_wakam@inria.fr\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n\n// FIXME: These tests all check for hard-coded values. Ideally, parameters and start estimates should be randomized.\n\n\n#include <stdio.h>\n\n#include \"main.h\"\n#include <unsupported/Eigen/LevenbergMarquardt>\n\n// This disables some useless Warnings on MSVC.\n// It is intended to be done for this test only.\n#include <Eigen/src/Core/util/DisableStupidWarnings.h>\n\nusing std::sqrt;\n\n// tolerance for chekcing number of iterations\n#define LM_EVAL_COUNT_TOL 4/3\n\nstruct lmder_functor : DenseFunctor<double>\n{\n    lmder_functor(void): DenseFunctor<double>(3,15) {}\n    int operator()(const VectorXd &x, VectorXd &fvec) const\n    {\n        double tmp1, tmp2, tmp3;\n        static const double y[15] = {1.4e-1, 1.8e-1, 2.2e-1, 2.5e-1, 2.9e-1, 3.2e-1, 3.5e-1,\n            3.9e-1, 3.7e-1, 5.8e-1, 7.3e-1, 9.6e-1, 1.34, 2.1, 4.39};\n\n        for (int i = 0; i < values(); i++)\n        {\n            tmp1 = i+1;\n            tmp2 = 16 - i - 1;\n            tmp3 = (i>=8)? tmp2 : tmp1;\n            fvec[i] = y[i] - (x[0] + tmp1/(x[1]*tmp2 + x[2]*tmp3));\n        }\n        return 0;\n    }\n\n    int df(const VectorXd &x, MatrixXd &fjac) const\n    {\n        double tmp1, tmp2, tmp3, tmp4;\n        for (int i = 0; i < values(); i++)\n        {\n            tmp1 = i+1;\n            tmp2 = 16 - i - 1;\n            tmp3 = (i>=8)? tmp2 : tmp1;\n            tmp4 = (x[1]*tmp2 + x[2]*tmp3); tmp4 = tmp4*tmp4;\n            fjac(i,0) = -1;\n            fjac(i,1) = tmp1*tmp2/tmp4;\n            fjac(i,2) = tmp1*tmp3/tmp4;\n        }\n        return 0;\n    }\n};\n\nvoid testLmder1()\n{\n  int n=3, info;\n\n  VectorXd x;\n\n  /* the following starting values provide a rough fit. */\n  x.setConstant(n, 1.);\n\n  // do the computation\n  lmder_functor functor;\n  LevenbergMarquardt<lmder_functor> lm(functor);\n  info = lm.lmder1(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  VERIFY_IS_EQUAL(lm.nfev(), 6);\n  VERIFY_IS_EQUAL(lm.njev(), 5);\n\n  // check norm\n  VERIFY_IS_APPROX(lm.fvec().blueNorm(), 0.09063596);\n\n  // check x\n  VectorXd x_ref(n);\n  x_ref << 0.08241058, 1.133037, 2.343695;\n  VERIFY_IS_APPROX(x, x_ref);\n}\n\nvoid testLmder()\n{\n  const int m=15, n=3;\n  int info;\n  double fnorm, covfac;\n  VectorXd x;\n\n  /* the following starting values provide a rough fit. */\n  x.setConstant(n, 1.);\n\n  // do the computation\n  lmder_functor functor;\n  LevenbergMarquardt<lmder_functor> lm(functor);\n  info = lm.minimize(x);\n\n  // check return values\n  VERIFY_IS_EQUAL(info, 1);\n  VERIFY_IS_EQUAL(lm.nfev(), 6);\n  VERIFY_IS_EQUAL(lm.njev(), 5);\n\n  // check norm\n  fnorm = lm.fvec().blueNorm();\n  VERIFY_IS_APPROX(fnorm, 0.09063596);\n\n  // check x\n  VectorXd x_ref(n);\n  x_ref << 0.08241058, 1.133037, 2.343695;\n  VERIFY_IS_APPROX(x, x_ref);\n\n  // check covariance\n  covfac = fnorm*fnorm/(m-n);\n  internal::covar(lm.matrixR(), lm.permutation().indices()); // TODO : move this as a function of lm\n\n  MatrixXd cov_ref(n,n);\n  cov_ref <<\n      0.0001531202,   0.002869941,  -0.002656662,\n      0.002869941,    0.09480935,   -0.09098995,\n      -0.002656662,   -0.09098995,    0.08778727;\n\n//  std::cout << fjac*covfac << std::endl;\n\n  MatrixXd cov;\n  cov =  covfac*lm.matrixR().topLeftCorner<n,n>();\n  VERIFY_IS_APPROX( cov, cov_ref);\n  // TODO: why isn't this allowed ? :\n  // VERIFY_IS_APPROX( covfac*fjac.topLeftCorner<n,n>() , cov_ref);\n}\n\nstruct lmdif_functor : DenseFunctor<double>\n{\n    lmdif_functor(void) : DenseFunctor<double>(3,15) {}\n    int operator()(const VectorXd &x, VectorXd &fvec) const\n    {\n        int i;\n        double tmp1,tmp2,tmp3;\n        static const double y[15]={1.4e-1,1.8e-1,2.2e-1,2.5e-1,2.9e-1,3.2e-1,3.5e-1,3.9e-1,\n            3.7e-1,5.8e-1,7.3e-1,9.6e-1,1.34e0,2.1e0,4.39e0};\n\n        assert(x.size()==3);\n        assert(fvec.size()==15);\n        for (i=0; i<15; i++)\n        {\n            tmp1 = i+1;\n            tmp2 = 15 - i;\n            tmp3 = tmp1;\n\n            if (i >= 8) tmp3 = tmp2;\n            fvec[i] = y[i] - (x[0] + tmp1/(x[1]*tmp2 + x[2]*tmp3));\n        }\n        return 0;\n    }\n};\n\nvoid testLmdif1()\n{\n  const int n=3;\n  int info;\n\n  VectorXd x(n), fvec(15);\n\n  /* the following starting values provide a rough fit. */\n  x.setConstant(n, 1.);\n\n  // do the computation\n  lmdif_functor functor;\n  DenseIndex nfev;\n  info = LevenbergMarquardt<lmdif_functor>::lmdif1(functor, x, &nfev);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n//   VERIFY_IS_EQUAL(nfev, 26);\n\n  // check norm\n  functor(x, fvec);\n  VERIFY_IS_APPROX(fvec.blueNorm(), 0.09063596);\n\n  // check x\n  VectorXd x_ref(n);\n  x_ref << 0.0824106, 1.1330366, 2.3436947;\n  VERIFY_IS_APPROX(x, x_ref);\n\n}\n\nvoid testLmdif()\n{\n  const int m=15, n=3;\n  int info;\n  double fnorm, covfac;\n  VectorXd x(n);\n\n  /* the following starting values provide a rough fit. */\n  x.setConstant(n, 1.);\n\n  // do the computation\n  lmdif_functor functor;\n  NumericalDiff<lmdif_functor> numDiff(functor);\n  LevenbergMarquardt<NumericalDiff<lmdif_functor> > lm(numDiff);\n  info = lm.minimize(x);\n\n  // check return values\n  VERIFY_IS_EQUAL(info, 1);\n//   VERIFY_IS_EQUAL(lm.nfev(), 26);\n\n  // check norm\n  fnorm = lm.fvec().blueNorm();\n  VERIFY_IS_APPROX(fnorm, 0.09063596);\n\n  // check x\n  VectorXd x_ref(n);\n  x_ref << 0.08241058, 1.133037, 2.343695;\n  VERIFY_IS_APPROX(x, x_ref);\n\n  // check covariance\n  covfac = fnorm*fnorm/(m-n);\n  internal::covar(lm.matrixR(), lm.permutation().indices()); // TODO : move this as a function of lm\n\n  MatrixXd cov_ref(n,n);\n  cov_ref <<\n      0.0001531202,   0.002869942,  -0.002656662,\n      0.002869942,    0.09480937,   -0.09098997,\n      -0.002656662,   -0.09098997,    0.08778729;\n\n//  std::cout << fjac*covfac << std::endl;\n\n  MatrixXd cov;\n  cov =  covfac*lm.matrixR().topLeftCorner<n,n>();\n  VERIFY_IS_APPROX( cov, cov_ref);\n  // TODO: why isn't this allowed ? :\n  // VERIFY_IS_APPROX( covfac*fjac.topLeftCorner<n,n>() , cov_ref);\n}\n\nstruct chwirut2_functor : DenseFunctor<double>\n{\n    chwirut2_functor(void) : DenseFunctor<double>(3,54) {}\n    static const double m_x[54];\n    static const double m_y[54];\n    int operator()(const VectorXd &b, VectorXd &fvec)\n    {\n        int i;\n\n        assert(b.size()==3);\n        assert(fvec.size()==54);\n        for(i=0; i<54; i++) {\n            double x = m_x[i];\n            fvec[i] = exp(-b[0]*x)/(b[1]+b[2]*x) - m_y[i];\n        }\n        return 0;\n    }\n    int df(const VectorXd &b, MatrixXd &fjac)\n    {\n        assert(b.size()==3);\n        assert(fjac.rows()==54);\n        assert(fjac.cols()==3);\n        for(int i=0; i<54; i++) {\n            double x = m_x[i];\n            double factor = 1./(b[1]+b[2]*x);\n            double e = exp(-b[0]*x);\n            fjac(i,0) = -x*e*factor;\n            fjac(i,1) = -e*factor*factor;\n            fjac(i,2) = -x*e*factor*factor;\n        }\n        return 0;\n    }\n};\nconst double chwirut2_functor::m_x[54] = { 0.500E0, 1.000E0, 1.750E0, 3.750E0, 5.750E0, 0.875E0, 2.250E0, 3.250E0, 5.250E0, 0.750E0, 1.750E0, 2.750E0, 4.750E0, 0.625E0, 1.250E0, 2.250E0, 4.250E0, .500E0, 3.000E0, .750E0, 3.000E0, 1.500E0, 6.000E0, 3.000E0, 6.000E0, 1.500E0, 3.000E0, .500E0, 2.000E0, 4.000E0, .750E0, 2.000E0, 5.000E0, .750E0, 2.250E0, 3.750E0, 5.750E0, 3.000E0, .750E0, 2.500E0, 4.000E0, .750E0, 2.500E0, 4.000E0, .750E0, 2.500E0, 4.000E0, .500E0, 6.000E0, 3.000E0, .500E0, 2.750E0, .500E0, 1.750E0};\nconst double chwirut2_functor::m_y[54] = { 92.9000E0 ,57.1000E0 ,31.0500E0 ,11.5875E0 ,8.0250E0 ,63.6000E0 ,21.4000E0 ,14.2500E0 ,8.4750E0 ,63.8000E0 ,26.8000E0 ,16.4625E0 ,7.1250E0 ,67.3000E0 ,41.0000E0 ,21.1500E0 ,8.1750E0 ,81.5000E0 ,13.1200E0 ,59.9000E0 ,14.6200E0 ,32.9000E0 ,5.4400E0 ,12.5600E0 ,5.4400E0 ,32.0000E0 ,13.9500E0 ,75.8000E0 ,20.0000E0 ,10.4200E0 ,59.5000E0 ,21.6700E0 ,8.5500E0 ,62.0000E0 ,20.2000E0 ,7.7600E0 ,3.7500E0 ,11.8100E0 ,54.7000E0 ,23.7000E0 ,11.5500E0 ,61.3000E0 ,17.7000E0 ,8.7400E0 ,59.2000E0 ,16.3000E0 ,8.6200E0 ,81.0000E0 ,4.8700E0 ,14.6200E0 ,81.7000E0 ,17.1700E0 ,81.3000E0 ,28.9000E0  };\n\n// http://www.itl.nist.gov/div898/strd/nls/data/chwirut2.shtml\nvoid testNistChwirut2(void)\n{\n  const int n=3;\n  LevenbergMarquardtSpace::Status info;\n\n  VectorXd x(n);\n\n  /*\n   * First try\n   */\n  x<< 0.1, 0.01, 0.02;\n  // do the computation\n  chwirut2_functor functor;\n  LevenbergMarquardt<chwirut2_functor> lm(functor);\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n//   VERIFY_IS_EQUAL(lm.nfev(), 10);\n  VERIFY_IS_EQUAL(lm.njev(), 8);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec().squaredNorm(), 5.1304802941E+02);\n  // check x\n  VERIFY_IS_APPROX(x[0], 1.6657666537E-01);\n  VERIFY_IS_APPROX(x[1], 5.1653291286E-03);\n  VERIFY_IS_APPROX(x[2], 1.2150007096E-02);\n\n  /*\n   * Second try\n   */\n  x<< 0.15, 0.008, 0.010;\n  // do the computation\n  lm.resetParameters();\n  lm.setFtol(1.E6*NumTraits<double>::epsilon());\n  lm.setXtol(1.E6*NumTraits<double>::epsilon());\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n//   VERIFY_IS_EQUAL(lm.nfev(), 7);\n  VERIFY_IS_EQUAL(lm.njev(), 6);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec().squaredNorm(), 5.1304802941E+02);\n  // check x\n  VERIFY_IS_APPROX(x[0], 1.6657666537E-01);\n  VERIFY_IS_APPROX(x[1], 5.1653291286E-03);\n  VERIFY_IS_APPROX(x[2], 1.2150007096E-02);\n}\n\n\nstruct misra1a_functor : DenseFunctor<double>\n{\n    misra1a_functor(void) : DenseFunctor<double>(2,14) {}\n    static const double m_x[14];\n    static const double m_y[14];\n    int operator()(const VectorXd &b, VectorXd &fvec)\n    {\n        assert(b.size()==2);\n        assert(fvec.size()==14);\n        for(int i=0; i<14; i++) {\n            fvec[i] = b[0]*(1.-exp(-b[1]*m_x[i])) - m_y[i] ;\n        }\n        return 0;\n    }\n    int df(const VectorXd &b, MatrixXd &fjac)\n    {\n        assert(b.size()==2);\n        assert(fjac.rows()==14);\n        assert(fjac.cols()==2);\n        for(int i=0; i<14; i++) {\n            fjac(i,0) = (1.-exp(-b[1]*m_x[i]));\n            fjac(i,1) = (b[0]*m_x[i]*exp(-b[1]*m_x[i]));\n        }\n        return 0;\n    }\n};\nconst double misra1a_functor::m_x[14] = { 77.6E0, 114.9E0, 141.1E0, 190.8E0, 239.9E0, 289.0E0, 332.8E0, 378.4E0, 434.8E0, 477.3E0, 536.8E0, 593.1E0, 689.1E0, 760.0E0};\nconst double misra1a_functor::m_y[14] = { 10.07E0, 14.73E0, 17.94E0, 23.93E0, 29.61E0, 35.18E0, 40.02E0, 44.82E0, 50.76E0, 55.05E0, 61.01E0, 66.40E0, 75.47E0, 81.78E0};\n\n// http://www.itl.nist.gov/div898/strd/nls/data/misra1a.shtml\nvoid testNistMisra1a(void)\n{\n  const int n=2;\n  int info;\n\n  VectorXd x(n);\n\n  /*\n   * First try\n   */\n  x<< 500., 0.0001;\n  // do the computation\n  misra1a_functor functor;\n  LevenbergMarquardt<misra1a_functor> lm(functor);\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  VERIFY_IS_EQUAL(lm.nfev(), 19);\n  VERIFY_IS_EQUAL(lm.njev(), 15);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec().squaredNorm(), 1.2455138894E-01);\n  // check x\n  VERIFY_IS_APPROX(x[0], 2.3894212918E+02);\n  VERIFY_IS_APPROX(x[1], 5.5015643181E-04);\n\n  /*\n   * Second try\n   */\n  x<< 250., 0.0005;\n  // do the computation\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  VERIFY_IS_EQUAL(lm.nfev(), 5);\n  VERIFY_IS_EQUAL(lm.njev(), 4);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec().squaredNorm(), 1.2455138894E-01);\n  // check x\n  VERIFY_IS_APPROX(x[0], 2.3894212918E+02);\n  VERIFY_IS_APPROX(x[1], 5.5015643181E-04);\n}\n\nstruct hahn1_functor : DenseFunctor<double>\n{\n    hahn1_functor(void) : DenseFunctor<double>(7,236) {}\n    static const double m_x[236];\n    int operator()(const VectorXd &b, VectorXd &fvec)\n    {\n        static const double m_y[236] = { .591E0 , 1.547E0 , 2.902E0 , 2.894E0 , 4.703E0 , 6.307E0 , 7.03E0  , 7.898E0 , 9.470E0 , 9.484E0 , 10.072E0 , 10.163E0 , 11.615E0 , 12.005E0 , 12.478E0 , 12.982E0 , 12.970E0 , 13.926E0 , 14.452E0 , 14.404E0 , 15.190E0 , 15.550E0 , 15.528E0 , 15.499E0 , 16.131E0 , 16.438E0 , 16.387E0 , 16.549E0 , 16.872E0 , 16.830E0 , 16.926E0 , 16.907E0 , 16.966E0 , 17.060E0 , 17.122E0 , 17.311E0 , 17.355E0 , 17.668E0 , 17.767E0 , 17.803E0 , 17.765E0 , 17.768E0 , 17.736E0 , 17.858E0 , 17.877E0 , 17.912E0 , 18.046E0 , 18.085E0 , 18.291E0 , 18.357E0 , 18.426E0 , 18.584E0 , 18.610E0 , 18.870E0 , 18.795E0 , 19.111E0 , .367E0 , .796E0 , 0.892E0 , 1.903E0 , 2.150E0 , 3.697E0 , 5.870E0 , 6.421E0 , 7.422E0 , 9.944E0 , 11.023E0 , 11.87E0  , 12.786E0 , 14.067E0 , 13.974E0 , 14.462E0 , 14.464E0 , 15.381E0 , 15.483E0 , 15.59E0  , 16.075E0 , 16.347E0 , 16.181E0 , 16.915E0 , 17.003E0 , 16.978E0 , 17.756E0 , 17.808E0 , 17.868E0 , 18.481E0 , 18.486E0 , 19.090E0 , 16.062E0 , 16.337E0 , 16.345E0 ,\n        16.388E0 , 17.159E0 , 17.116E0 , 17.164E0 , 17.123E0 , 17.979E0 , 17.974E0 , 18.007E0 , 17.993E0 , 18.523E0 , 18.669E0 , 18.617E0 , 19.371E0 , 19.330E0 , 0.080E0 , 0.248E0 , 1.089E0 , 1.418E0 , 2.278E0 , 3.624E0 , 4.574E0 , 5.556E0 , 7.267E0 , 7.695E0 , 9.136E0 , 9.959E0 , 9.957E0 , 11.600E0 , 13.138E0 , 13.564E0 , 13.871E0 , 13.994E0 , 14.947E0 , 15.473E0 , 15.379E0 , 15.455E0 , 15.908E0 , 16.114E0 , 17.071E0 , 17.135E0 , 17.282E0 , 17.368E0 , 17.483E0 , 17.764E0 , 18.185E0 , 18.271E0 , 18.236E0 , 18.237E0 , 18.523E0 , 18.627E0 , 18.665E0 , 19.086E0 , 0.214E0 , 0.943E0 , 1.429E0 , 2.241E0 , 2.951E0 , 3.782E0 , 4.757E0 , 5.602E0 , 7.169E0 , 8.920E0 , 10.055E0 , 12.035E0 , 12.861E0 , 13.436E0 , 14.167E0 , 14.755E0 , 15.168E0 , 15.651E0 , 15.746E0 , 16.216E0 , 16.445E0 , 16.965E0 , 17.121E0 , 17.206E0 , 17.250E0 , 17.339E0 , 17.793E0 , 18.123E0 , 18.49E0  , 18.566E0 , 18.645E0 , 18.706E0 , 18.924E0 , 19.1E0   , 0.375E0 , 0.471E0 , 1.504E0 , 2.204E0 , 2.813E0 , 4.765E0 , 9.835E0 , 10.040E0 , 11.946E0 , \n12.596E0 , \n13.303E0 , 13.922E0 , 14.440E0 , 14.951E0 , 15.627E0 , 15.639E0 , 15.814E0 , 16.315E0 , 16.334E0 , 16.430E0 , 16.423E0 , 17.024E0 , 17.009E0 , 17.165E0 , 17.134E0 , 17.349E0 , 17.576E0 , 17.848E0 , 18.090E0 , 18.276E0 , 18.404E0 , 18.519E0 , 19.133E0 , 19.074E0 , 19.239E0 , 19.280E0 , 19.101E0 , 19.398E0 , 19.252E0 , 19.89E0  , 20.007E0 , 19.929E0 , 19.268E0 , 19.324E0 , 20.049E0 , 20.107E0 , 20.062E0 , 20.065E0 , 19.286E0 , 19.972E0 , 20.088E0 , 20.743E0 , 20.83E0  , 20.935E0 , 21.035E0 , 20.93E0  , 21.074E0 , 21.085E0 , 20.935E0 };\n\n        //        int called=0; printf(\"call hahn1_functor with  iflag=%d, called=%d\\n\", iflag, called); if (iflag==1) called++;\n\n        assert(b.size()==7);\n        assert(fvec.size()==236);\n        for(int i=0; i<236; i++) {\n            double x=m_x[i], xx=x*x, xxx=xx*x;\n            fvec[i] = (b[0]+b[1]*x+b[2]*xx+b[3]*xxx) / (1.+b[4]*x+b[5]*xx+b[6]*xxx) - m_y[i];\n        }\n        return 0;\n    }\n\n    int df(const VectorXd &b, MatrixXd &fjac)\n    {\n        assert(b.size()==7);\n        assert(fjac.rows()==236);\n        assert(fjac.cols()==7);\n        for(int i=0; i<236; i++) {\n            double x=m_x[i], xx=x*x, xxx=xx*x;\n            double fact = 1./(1.+b[4]*x+b[5]*xx+b[6]*xxx);\n            fjac(i,0) = 1.*fact;\n            fjac(i,1) = x*fact;\n            fjac(i,2) = xx*fact;\n            fjac(i,3) = xxx*fact;\n            fact = - (b[0]+b[1]*x+b[2]*xx+b[3]*xxx) * fact * fact;\n            fjac(i,4) = x*fact;\n            fjac(i,5) = xx*fact;\n            fjac(i,6) = xxx*fact;\n        }\n        return 0;\n    }\n};\nconst double hahn1_functor::m_x[236] = { 24.41E0 , 34.82E0 , 44.09E0 , 45.07E0 , 54.98E0 , 65.51E0 , 70.53E0 , 75.70E0 , 89.57E0 , 91.14E0 , 96.40E0 , 97.19E0 , 114.26E0 , 120.25E0 , 127.08E0 , 133.55E0 , 133.61E0 , 158.67E0 , 172.74E0 , 171.31E0 , 202.14E0 , 220.55E0 , 221.05E0 , 221.39E0 , 250.99E0 , 268.99E0 , 271.80E0 , 271.97E0 , 321.31E0 , 321.69E0 , 330.14E0 , 333.03E0 , 333.47E0 , 340.77E0 , 345.65E0 , 373.11E0 , 373.79E0 , 411.82E0 , 419.51E0 , 421.59E0 , 422.02E0 , 422.47E0 , 422.61E0 , 441.75E0 , 447.41E0 , 448.7E0  , 472.89E0 , 476.69E0 , 522.47E0 , 522.62E0 , 524.43E0 , 546.75E0 , 549.53E0 , 575.29E0 , 576.00E0 , 625.55E0 , 20.15E0 , 28.78E0 , 29.57E0 , 37.41E0 , 39.12E0 , 50.24E0 , 61.38E0 , 66.25E0 , 73.42E0 , 95.52E0 , 107.32E0 , 122.04E0 , 134.03E0 , 163.19E0 , 163.48E0 , 175.70E0 , 179.86E0 , 211.27E0 , 217.78E0 , 219.14E0 , 262.52E0 , 268.01E0 , 268.62E0 , 336.25E0 , 337.23E0 , 339.33E0 , 427.38E0 , 428.58E0 , 432.68E0 , 528.99E0 , 531.08E0 , 628.34E0 , 253.24E0 , 273.13E0 , 273.66E0 ,\n282.10E0 , 346.62E0 , 347.19E0 , 348.78E0 , 351.18E0 , 450.10E0 , 450.35E0 , 451.92E0 , 455.56E0 , 552.22E0 , 553.56E0 , 555.74E0 , 652.59E0 , 656.20E0 , 14.13E0 , 20.41E0 , 31.30E0 , 33.84E0 , 39.70E0 , 48.83E0 , 54.50E0 , 60.41E0 , 72.77E0 , 75.25E0 , 86.84E0 , 94.88E0 , 96.40E0 , 117.37E0 , 139.08E0 , 147.73E0 , 158.63E0 , 161.84E0 , 192.11E0 , 206.76E0 , 209.07E0 , 213.32E0 , 226.44E0 , 237.12E0 , 330.90E0 , 358.72E0 , 370.77E0 , 372.72E0 , 396.24E0 , 416.59E0 , 484.02E0 , 495.47E0 , 514.78E0 , 515.65E0 , 519.47E0 , 544.47E0 , 560.11E0 , 620.77E0 , 18.97E0 , 28.93E0 , 33.91E0 , 40.03E0 , 44.66E0 , 49.87E0 , 55.16E0 , 60.90E0 , 72.08E0 , 85.15E0 , 97.06E0 , 119.63E0 , 133.27E0 , 143.84E0 , 161.91E0 , 180.67E0 , 198.44E0 , 226.86E0 , 229.65E0 , 258.27E0 , 273.77E0 , 339.15E0 , 350.13E0 , 362.75E0 , 371.03E0 , 393.32E0 , 448.53E0 , 473.78E0 , 511.12E0 , 524.70E0 , 548.75E0 , 551.64E0 , 574.02E0 , 623.86E0 , 21.46E0 , 24.33E0 , 33.43E0 , 39.22E0 , 44.18E0 , 55.02E0 , 94.33E0 , 96.44E0 , 118.82E0 , 128.48E0 ,\n141.94E0 , 156.92E0 , 171.65E0 , 190.00E0 , 223.26E0 , 223.88E0 , 231.50E0 , 265.05E0 , 269.44E0 , 271.78E0 , 273.46E0 , 334.61E0 , 339.79E0 , 349.52E0 , 358.18E0 , 377.98E0 , 394.77E0 , 429.66E0 , 468.22E0 , 487.27E0 , 519.54E0 , 523.03E0 , 612.99E0 , 638.59E0 , 641.36E0 , 622.05E0 , 631.50E0 , 663.97E0 , 646.9E0  , 748.29E0 , 749.21E0 , 750.14E0 , 647.04E0 , 646.89E0 , 746.9E0  , 748.43E0 , 747.35E0 , 749.27E0 , 647.61E0 , 747.78E0 , 750.51E0 , 851.37E0 , 845.97E0 , 847.54E0 , 849.93E0 , 851.61E0 , 849.75E0 , 850.98E0 , 848.23E0};\n\n// http://www.itl.nist.gov/div898/strd/nls/data/hahn1.shtml\nvoid testNistHahn1(void)\n{\n  const int  n=7;\n  int info;\n\n  VectorXd x(n);\n\n  /*\n   * First try\n   */\n  x<< 10., -1., .05, -.00001, -.05, .001, -.000001;\n  // do the computation\n  hahn1_functor functor;\n  LevenbergMarquardt<hahn1_functor> lm(functor);\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  VERIFY_IS_EQUAL(lm.nfev(), 11);\n  VERIFY_IS_EQUAL(lm.njev(), 10);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec().squaredNorm(), 1.5324382854E+00);\n  // check x\n  VERIFY_IS_APPROX(x[0], 1.0776351733E+00);\n  VERIFY_IS_APPROX(x[1],-1.2269296921E-01);\n  VERIFY_IS_APPROX(x[2], 4.0863750610E-03);\n  VERIFY_IS_APPROX(x[3],-1.426264e-06); // shoulde be : -1.4262662514E-06\n  VERIFY_IS_APPROX(x[4],-5.7609940901E-03);\n  VERIFY_IS_APPROX(x[5], 2.4053735503E-04);\n  VERIFY_IS_APPROX(x[6],-1.2314450199E-07);\n\n  /*\n   * Second try\n   */\n  x<< .1, -.1, .005, -.000001, -.005, .0001, -.0000001;\n  // do the computation\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n//   VERIFY_IS_EQUAL(lm.nfev(), 11);\n  VERIFY_IS_EQUAL(lm.njev(), 10);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec().squaredNorm(), 1.5324382854E+00);\n  // check x\n  VERIFY_IS_APPROX(x[0], 1.077640); // should be :  1.0776351733E+00\n  VERIFY_IS_APPROX(x[1], -0.1226933); // should be : -1.2269296921E-01\n  VERIFY_IS_APPROX(x[2], 0.004086383); // should be : 4.0863750610E-03\n  VERIFY_IS_APPROX(x[3], -1.426277e-06); // shoulde be : -1.4262662514E-06\n  VERIFY_IS_APPROX(x[4],-5.7609940901E-03);\n  VERIFY_IS_APPROX(x[5], 0.00024053772); // should be : 2.4053735503E-04\n  VERIFY_IS_APPROX(x[6], -1.231450e-07); // should be : -1.2314450199E-07\n\n}\n\nstruct misra1d_functor : DenseFunctor<double>\n{\n    misra1d_functor(void) : DenseFunctor<double>(2,14) {}\n    static const double x[14];\n    static const double y[14];\n    int operator()(const VectorXd &b, VectorXd &fvec)\n    {\n        assert(b.size()==2);\n        assert(fvec.size()==14);\n        for(int i=0; i<14; i++) {\n            fvec[i] = b[0]*b[1]*x[i]/(1.+b[1]*x[i]) - y[i];\n        }\n        return 0;\n    }\n    int df(const VectorXd &b, MatrixXd &fjac)\n    {\n        assert(b.size()==2);\n        assert(fjac.rows()==14);\n        assert(fjac.cols()==2);\n        for(int i=0; i<14; i++) {\n            double den = 1.+b[1]*x[i];\n            fjac(i,0) = b[1]*x[i] / den;\n            fjac(i,1) = b[0]*x[i]*(den-b[1]*x[i])/den/den;\n        }\n        return 0;\n    }\n};\nconst double misra1d_functor::x[14] = { 77.6E0, 114.9E0, 141.1E0, 190.8E0, 239.9E0, 289.0E0, 332.8E0, 378.4E0, 434.8E0, 477.3E0, 536.8E0, 593.1E0, 689.1E0, 760.0E0};\nconst double misra1d_functor::y[14] = { 10.07E0, 14.73E0, 17.94E0, 23.93E0, 29.61E0, 35.18E0, 40.02E0, 44.82E0, 50.76E0, 55.05E0, 61.01E0, 66.40E0, 75.47E0, 81.78E0};\n\n// http://www.itl.nist.gov/div898/strd/nls/data/misra1d.shtml\nvoid testNistMisra1d(void)\n{\n  const int n=2;\n  int info;\n\n  VectorXd x(n);\n\n  /*\n   * First try\n   */\n  x<< 500., 0.0001;\n  // do the computation\n  misra1d_functor functor;\n  LevenbergMarquardt<misra1d_functor> lm(functor);\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  VERIFY_IS_EQUAL(lm.nfev(), 9);\n  VERIFY_IS_EQUAL(lm.njev(), 7);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec().squaredNorm(), 5.6419295283E-02);\n  // check x\n  VERIFY_IS_APPROX(x[0], 4.3736970754E+02);\n  VERIFY_IS_APPROX(x[1], 3.0227324449E-04);\n\n  /*\n   * Second try\n   */\n  x<< 450., 0.0003;\n  // do the computation\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  VERIFY_IS_EQUAL(lm.nfev(), 4);\n  VERIFY_IS_EQUAL(lm.njev(), 3);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec().squaredNorm(), 5.6419295283E-02);\n  // check x\n  VERIFY_IS_APPROX(x[0], 4.3736970754E+02);\n  VERIFY_IS_APPROX(x[1], 3.0227324449E-04);\n}\n\n\nstruct lanczos1_functor : DenseFunctor<double>\n{\n    lanczos1_functor(void) : DenseFunctor<double>(6,24) {}\n    static const double x[24];\n    static const double y[24];\n    int operator()(const VectorXd &b, VectorXd &fvec)\n    {\n        assert(b.size()==6);\n        assert(fvec.size()==24);\n        for(int i=0; i<24; i++)\n            fvec[i] = b[0]*exp(-b[1]*x[i]) + b[2]*exp(-b[3]*x[i]) + b[4]*exp(-b[5]*x[i])  - y[i];\n        return 0;\n    }\n    int df(const VectorXd &b, MatrixXd &fjac)\n    {\n        assert(b.size()==6);\n        assert(fjac.rows()==24);\n        assert(fjac.cols()==6);\n        for(int i=0; i<24; i++) {\n            fjac(i,0) = exp(-b[1]*x[i]);\n            fjac(i,1) = -b[0]*x[i]*exp(-b[1]*x[i]);\n            fjac(i,2) = exp(-b[3]*x[i]);\n            fjac(i,3) = -b[2]*x[i]*exp(-b[3]*x[i]);\n            fjac(i,4) = exp(-b[5]*x[i]);\n            fjac(i,5) = -b[4]*x[i]*exp(-b[5]*x[i]);\n        }\n        return 0;\n    }\n};\nconst double lanczos1_functor::x[24] = { 0.000000000000E+00, 5.000000000000E-02, 1.000000000000E-01, 1.500000000000E-01, 2.000000000000E-01, 2.500000000000E-01, 3.000000000000E-01, 3.500000000000E-01, 4.000000000000E-01, 4.500000000000E-01, 5.000000000000E-01, 5.500000000000E-01, 6.000000000000E-01, 6.500000000000E-01, 7.000000000000E-01, 7.500000000000E-01, 8.000000000000E-01, 8.500000000000E-01, 9.000000000000E-01, 9.500000000000E-01, 1.000000000000E+00, 1.050000000000E+00, 1.100000000000E+00, 1.150000000000E+00 };\nconst double lanczos1_functor::y[24] = { 2.513400000000E+00 ,2.044333373291E+00 ,1.668404436564E+00 ,1.366418021208E+00 ,1.123232487372E+00 ,9.268897180037E-01 ,7.679338563728E-01 ,6.388775523106E-01 ,5.337835317402E-01 ,4.479363617347E-01 ,3.775847884350E-01 ,3.197393199326E-01 ,2.720130773746E-01 ,2.324965529032E-01 ,1.996589546065E-01 ,1.722704126914E-01 ,1.493405660168E-01 ,1.300700206922E-01 ,1.138119324644E-01 ,1.000415587559E-01 ,8.833209084540E-02 ,7.833544019350E-02 ,6.976693743449E-02 ,6.239312536719E-02 };\n\n// http://www.itl.nist.gov/div898/strd/nls/data/lanczos1.shtml\nvoid testNistLanczos1(void)\n{\n  const int n=6;\n  LevenbergMarquardtSpace::Status info;\n\n  VectorXd x(n);\n\n  /*\n   * First try\n   */\n  x<< 1.2, 0.3, 5.6, 5.5, 6.5, 7.6;\n  // do the computation\n  lanczos1_functor functor;\n  LevenbergMarquardt<lanczos1_functor> lm(functor);\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, LevenbergMarquardtSpace::RelativeErrorTooSmall);\n  VERIFY_IS_EQUAL(lm.nfev(), 79);\n  VERIFY_IS_EQUAL(lm.njev(), 72);\n  // check norm^2\n  VERIFY(lm.fvec().squaredNorm() <= 1.4307867721E-25);\n  // check x\n  VERIFY_IS_APPROX(x[0], 9.5100000027E-02);\n  VERIFY_IS_APPROX(x[1], 1.0000000001E+00);\n  VERIFY_IS_APPROX(x[2], 8.6070000013E-01);\n  VERIFY_IS_APPROX(x[3], 3.0000000002E+00);\n  VERIFY_IS_APPROX(x[4], 1.5575999998E+00);\n  VERIFY_IS_APPROX(x[5], 5.0000000001E+00);\n\n  /*\n   * Second try\n   */\n  x<< 0.5, 0.7, 3.6, 4.2, 4., 6.3;\n  // do the computation\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, LevenbergMarquardtSpace::RelativeErrorTooSmall);\n  VERIFY_IS_EQUAL(lm.nfev(), 9);\n  VERIFY_IS_EQUAL(lm.njev(), 8);\n  // check norm^2\n  VERIFY(lm.fvec().squaredNorm() <= 1.4307867721E-25);\n  // check x\n  VERIFY_IS_APPROX(x[0], 9.5100000027E-02);\n  VERIFY_IS_APPROX(x[1], 1.0000000001E+00);\n  VERIFY_IS_APPROX(x[2], 8.6070000013E-01);\n  VERIFY_IS_APPROX(x[3], 3.0000000002E+00);\n  VERIFY_IS_APPROX(x[4], 1.5575999998E+00);\n  VERIFY_IS_APPROX(x[5], 5.0000000001E+00);\n\n}\n\nstruct rat42_functor : DenseFunctor<double>\n{\n    rat42_functor(void) : DenseFunctor<double>(3,9) {}\n    static const double x[9];\n    static const double y[9];\n    int operator()(const VectorXd &b, VectorXd &fvec)\n    {\n        assert(b.size()==3);\n        assert(fvec.size()==9);\n        for(int i=0; i<9; i++) {\n            fvec[i] = b[0] / (1.+exp(b[1]-b[2]*x[i])) - y[i];\n        }\n        return 0;\n    }\n\n    int df(const VectorXd &b, MatrixXd &fjac)\n    {\n        assert(b.size()==3);\n        assert(fjac.rows()==9);\n        assert(fjac.cols()==3);\n        for(int i=0; i<9; i++) {\n            double e = exp(b[1]-b[2]*x[i]);\n            fjac(i,0) = 1./(1.+e);\n            fjac(i,1) = -b[0]*e/(1.+e)/(1.+e);\n            fjac(i,2) = +b[0]*e*x[i]/(1.+e)/(1.+e);\n        }\n        return 0;\n    }\n};\nconst double rat42_functor::x[9] = { 9.000E0, 14.000E0, 21.000E0, 28.000E0, 42.000E0, 57.000E0, 63.000E0, 70.000E0, 79.000E0 };\nconst double rat42_functor::y[9] = { 8.930E0 ,10.800E0 ,18.590E0 ,22.330E0 ,39.350E0 ,56.110E0 ,61.730E0 ,64.620E0 ,67.080E0 };\n\n// http://www.itl.nist.gov/div898/strd/nls/data/ratkowsky2.shtml\nvoid testNistRat42(void)\n{\n  const int n=3;\n  LevenbergMarquardtSpace::Status info;\n\n  VectorXd x(n);\n\n  /*\n   * First try\n   */\n  x<< 100., 1., 0.1;\n  // do the computation\n  rat42_functor functor;\n  LevenbergMarquardt<rat42_functor> lm(functor);\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, LevenbergMarquardtSpace::RelativeReductionTooSmall);\n  VERIFY_IS_EQUAL(lm.nfev(), 10);\n  VERIFY_IS_EQUAL(lm.njev(), 8);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec().squaredNorm(), 8.0565229338E+00);\n  // check x\n  VERIFY_IS_APPROX(x[0], 7.2462237576E+01);\n  VERIFY_IS_APPROX(x[1], 2.6180768402E+00);\n  VERIFY_IS_APPROX(x[2], 6.7359200066E-02);\n\n  /*\n   * Second try\n   */\n  x<< 75., 2.5, 0.07;\n  // do the computation\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, LevenbergMarquardtSpace::RelativeReductionTooSmall);\n  VERIFY_IS_EQUAL(lm.nfev(), 6);\n  VERIFY_IS_EQUAL(lm.njev(), 5);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec().squaredNorm(), 8.0565229338E+00);\n  // check x\n  VERIFY_IS_APPROX(x[0], 7.2462237576E+01);\n  VERIFY_IS_APPROX(x[1], 2.6180768402E+00);\n  VERIFY_IS_APPROX(x[2], 6.7359200066E-02);\n}\n\nstruct MGH10_functor : DenseFunctor<double>\n{\n    MGH10_functor(void) : DenseFunctor<double>(3,16) {}\n    static const double x[16];\n    static const double y[16];\n    int operator()(const VectorXd &b, VectorXd &fvec)\n    {\n        assert(b.size()==3);\n        assert(fvec.size()==16);\n        for(int i=0; i<16; i++)\n            fvec[i] =  b[0] * exp(b[1]/(x[i]+b[2])) - y[i];\n        return 0;\n    }\n    int df(const VectorXd &b, MatrixXd &fjac)\n    {\n        assert(b.size()==3);\n        assert(fjac.rows()==16);\n        assert(fjac.cols()==3);\n        for(int i=0; i<16; i++) {\n            double factor = 1./(x[i]+b[2]);\n            double e = exp(b[1]*factor);\n            fjac(i,0) = e;\n            fjac(i,1) = b[0]*factor*e;\n            fjac(i,2) = -b[1]*b[0]*factor*factor*e;\n        }\n        return 0;\n    }\n};\nconst double MGH10_functor::x[16] = { 5.000000E+01, 5.500000E+01, 6.000000E+01, 6.500000E+01, 7.000000E+01, 7.500000E+01, 8.000000E+01, 8.500000E+01, 9.000000E+01, 9.500000E+01, 1.000000E+02, 1.050000E+02, 1.100000E+02, 1.150000E+02, 1.200000E+02, 1.250000E+02 };\nconst double MGH10_functor::y[16] = { 3.478000E+04, 2.861000E+04, 2.365000E+04, 1.963000E+04, 1.637000E+04, 1.372000E+04, 1.154000E+04, 9.744000E+03, 8.261000E+03, 7.030000E+03, 6.005000E+03, 5.147000E+03, 4.427000E+03, 3.820000E+03, 3.307000E+03, 2.872000E+03 };\n\n// http://www.itl.nist.gov/div898/strd/nls/data/mgh10.shtml\nvoid testNistMGH10(void)\n{\n  const int n=3;\n  LevenbergMarquardtSpace::Status info;\n\n  VectorXd x(n);\n\n  /*\n   * First try\n   */\n  x<< 2., 400000., 25000.;\n  // do the computation\n  MGH10_functor functor;\n  LevenbergMarquardt<MGH10_functor> lm(functor);\n  info = lm.minimize(x);\n  ++g_test_level;\n  VERIFY_IS_EQUAL(info, LevenbergMarquardtSpace::RelativeReductionTooSmall);\n  --g_test_level;\n  // was: VERIFY_IS_EQUAL(info, 1);\n\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec().squaredNorm(), 8.7945855171E+01);\n  // check x\n  VERIFY_IS_APPROX(x[0], 5.6096364710E-03);\n  VERIFY_IS_APPROX(x[1], 6.1813463463E+03);\n  VERIFY_IS_APPROX(x[2], 3.4522363462E+02);\n  \n  // check return value\n\n  ++g_test_level;\n  VERIFY_IS_EQUAL(lm.nfev(), 284 );\n  VERIFY_IS_EQUAL(lm.njev(), 249 );\n  --g_test_level;\n  VERIFY(lm.nfev() < 284 * LM_EVAL_COUNT_TOL);\n  VERIFY(lm.njev() < 249 * LM_EVAL_COUNT_TOL);\n\n  /*\n   * Second try\n   */\n  x<< 0.02, 4000., 250.;\n  // do the computation\n  info = lm.minimize(x);\n  ++g_test_level;\n  VERIFY_IS_EQUAL(info, LevenbergMarquardtSpace::RelativeReductionTooSmall);\n  // was: VERIFY_IS_EQUAL(info, 1);\n  --g_test_level;\n\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec().squaredNorm(), 8.7945855171E+01);\n  // check x\n  VERIFY_IS_APPROX(x[0], 5.6096364710E-03);\n  VERIFY_IS_APPROX(x[1], 6.1813463463E+03);\n  VERIFY_IS_APPROX(x[2], 3.4522363462E+02);\n  \n  // check return value\n  ++g_test_level;\n  VERIFY_IS_EQUAL(lm.nfev(), 126);\n  VERIFY_IS_EQUAL(lm.njev(), 116);\n  --g_test_level;\n  VERIFY(lm.nfev() < 126 * LM_EVAL_COUNT_TOL);\n  VERIFY(lm.njev() < 116 * LM_EVAL_COUNT_TOL);\n}\n\n\nstruct BoxBOD_functor : DenseFunctor<double>\n{\n    BoxBOD_functor(void) : DenseFunctor<double>(2,6) {}\n    static const double x[6];\n    int operator()(const VectorXd &b, VectorXd &fvec)\n    {\n        static const double y[6] = { 109., 149., 149., 191., 213., 224. };\n        assert(b.size()==2);\n        assert(fvec.size()==6);\n        for(int i=0; i<6; i++)\n            fvec[i] =  b[0]*(1.-exp(-b[1]*x[i])) - y[i];\n        return 0;\n    }\n    int df(const VectorXd &b, MatrixXd &fjac)\n    {\n        assert(b.size()==2);\n        assert(fjac.rows()==6);\n        assert(fjac.cols()==2);\n        for(int i=0; i<6; i++) {\n            double e = exp(-b[1]*x[i]);\n            fjac(i,0) = 1.-e;\n            fjac(i,1) = b[0]*x[i]*e;\n        }\n        return 0;\n    }\n};\nconst double BoxBOD_functor::x[6] = { 1., 2., 3., 5., 7., 10. };\n\n// http://www.itl.nist.gov/div898/strd/nls/data/boxbod.shtml\nvoid testNistBoxBOD(void)\n{\n  const int n=2;\n  int info;\n\n  VectorXd x(n);\n\n  /*\n   * First try\n   */\n  x<< 1., 1.;\n  // do the computation\n  BoxBOD_functor functor;\n  LevenbergMarquardt<BoxBOD_functor> lm(functor);\n  lm.setFtol(1.E6*NumTraits<double>::epsilon());\n  lm.setXtol(1.E6*NumTraits<double>::epsilon());\n  lm.setFactor(10);\n  info = lm.minimize(x);\n\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec().squaredNorm(), 1.1680088766E+03);\n  // check x\n  VERIFY_IS_APPROX(x[0], 2.1380940889E+02);\n  VERIFY_IS_APPROX(x[1], 5.4723748542E-01);\n  \n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  VERIFY(lm.nfev() < 31); // 31\n  VERIFY(lm.njev() < 25); // 25\n\n  /*\n   * Second try\n   */\n  x<< 100., 0.75;\n  // do the computation\n  lm.resetParameters();\n  lm.setFtol(NumTraits<double>::epsilon());\n  lm.setXtol( NumTraits<double>::epsilon());\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1); \n  ++g_test_level;\n  VERIFY_IS_EQUAL(lm.nfev(), 16 );\n  VERIFY_IS_EQUAL(lm.njev(), 15 );\n  --g_test_level;\n  VERIFY(lm.nfev() < 16 * LM_EVAL_COUNT_TOL);\n  VERIFY(lm.njev() < 15 * LM_EVAL_COUNT_TOL);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec().squaredNorm(), 1.1680088766E+03);\n  // check x\n  VERIFY_IS_APPROX(x[0], 2.1380940889E+02);\n  VERIFY_IS_APPROX(x[1], 5.4723748542E-01);\n}\n\nstruct MGH17_functor : DenseFunctor<double>\n{\n    MGH17_functor(void) : DenseFunctor<double>(5,33) {}\n    static const double x[33];\n    static const double y[33];\n    int operator()(const VectorXd &b, VectorXd &fvec)\n    {\n        assert(b.size()==5);\n        assert(fvec.size()==33);\n        for(int i=0; i<33; i++)\n            fvec[i] =  b[0] + b[1]*exp(-b[3]*x[i]) +  b[2]*exp(-b[4]*x[i]) - y[i];\n        return 0;\n    }\n    int df(const VectorXd &b, MatrixXd &fjac)\n    {\n        assert(b.size()==5);\n        assert(fjac.rows()==33);\n        assert(fjac.cols()==5);\n        for(int i=0; i<33; i++) {\n            fjac(i,0) = 1.;\n            fjac(i,1) = exp(-b[3]*x[i]);\n            fjac(i,2) = exp(-b[4]*x[i]);\n            fjac(i,3) = -x[i]*b[1]*exp(-b[3]*x[i]);\n            fjac(i,4) = -x[i]*b[2]*exp(-b[4]*x[i]);\n        }\n        return 0;\n    }\n};\nconst double MGH17_functor::x[33] = { 0.000000E+00, 1.000000E+01, 2.000000E+01, 3.000000E+01, 4.000000E+01, 5.000000E+01, 6.000000E+01, 7.000000E+01, 8.000000E+01, 9.000000E+01, 1.000000E+02, 1.100000E+02, 1.200000E+02, 1.300000E+02, 1.400000E+02, 1.500000E+02, 1.600000E+02, 1.700000E+02, 1.800000E+02, 1.900000E+02, 2.000000E+02, 2.100000E+02, 2.200000E+02, 2.300000E+02, 2.400000E+02, 2.500000E+02, 2.600000E+02, 2.700000E+02, 2.800000E+02, 2.900000E+02, 3.000000E+02, 3.100000E+02, 3.200000E+02 };\nconst double MGH17_functor::y[33] = { 8.440000E-01, 9.080000E-01, 9.320000E-01, 9.360000E-01, 9.250000E-01, 9.080000E-01, 8.810000E-01, 8.500000E-01, 8.180000E-01, 7.840000E-01, 7.510000E-01, 7.180000E-01, 6.850000E-01, 6.580000E-01, 6.280000E-01, 6.030000E-01, 5.800000E-01, 5.580000E-01, 5.380000E-01, 5.220000E-01, 5.060000E-01, 4.900000E-01, 4.780000E-01, 4.670000E-01, 4.570000E-01, 4.480000E-01, 4.380000E-01, 4.310000E-01, 4.240000E-01, 4.200000E-01, 4.140000E-01, 4.110000E-01, 4.060000E-01 };\n\n// http://www.itl.nist.gov/div898/strd/nls/data/mgh17.shtml\nvoid testNistMGH17(void)\n{\n  const int n=5;\n  int info;\n\n  VectorXd x(n);\n\n  /*\n   * First try\n   */\n  x<< 50., 150., -100., 1., 2.;\n  // do the computation\n  MGH17_functor functor;\n  LevenbergMarquardt<MGH17_functor> lm(functor);\n  lm.setFtol(NumTraits<double>::epsilon());\n  lm.setXtol(NumTraits<double>::epsilon());\n  lm.setMaxfev(1000);\n  info = lm.minimize(x);\n\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec().squaredNorm(), 5.4648946975E-05);\n  // check x\n  VERIFY_IS_APPROX(x[0], 3.7541005211E-01);\n  VERIFY_IS_APPROX(x[1], 1.9358469127E+00);\n  VERIFY_IS_APPROX(x[2], -1.4646871366E+00);\n  VERIFY_IS_APPROX(x[3], 1.2867534640E-02);\n  VERIFY_IS_APPROX(x[4], 2.2122699662E-02);\n  \n    // check return value\n//   VERIFY_IS_EQUAL(info, 2);  //FIXME Use (lm.info() == Success)\n  VERIFY(lm.nfev() < 700 ); // 602\n  VERIFY(lm.njev() < 600 ); // 545\n\n  /*\n   * Second try\n   */\n  x<< 0.5  ,1.5  ,-1   ,0.01 ,0.02;\n  // do the computation\n  lm.resetParameters();\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  VERIFY_IS_EQUAL(lm.nfev(), 18);\n  VERIFY_IS_EQUAL(lm.njev(), 15);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec().squaredNorm(), 5.4648946975E-05);\n  // check x\n  VERIFY_IS_APPROX(x[0], 3.7541005211E-01);\n  VERIFY_IS_APPROX(x[1], 1.9358469127E+00);\n  VERIFY_IS_APPROX(x[2], -1.4646871366E+00);\n  VERIFY_IS_APPROX(x[3], 1.2867534640E-02);\n  VERIFY_IS_APPROX(x[4], 2.2122699662E-02);\n}\n\nstruct MGH09_functor : DenseFunctor<double>\n{\n    MGH09_functor(void) : DenseFunctor<double>(4,11) {}\n    static const double _x[11];\n    static const double y[11];\n    int operator()(const VectorXd &b, VectorXd &fvec)\n    {\n        assert(b.size()==4);\n        assert(fvec.size()==11);\n        for(int i=0; i<11; i++) {\n            double x = _x[i], xx=x*x;\n            fvec[i] = b[0]*(xx+x*b[1])/(xx+x*b[2]+b[3]) - y[i];\n        }\n        return 0;\n    }\n    int df(const VectorXd &b, MatrixXd &fjac)\n    {\n        assert(b.size()==4);\n        assert(fjac.rows()==11);\n        assert(fjac.cols()==4);\n        for(int i=0; i<11; i++) {\n            double x = _x[i], xx=x*x;\n            double factor = 1./(xx+x*b[2]+b[3]);\n            fjac(i,0) = (xx+x*b[1]) * factor;\n            fjac(i,1) = b[0]*x* factor;\n            fjac(i,2) = - b[0]*(xx+x*b[1]) * x * factor * factor;\n            fjac(i,3) = - b[0]*(xx+x*b[1]) * factor * factor;\n        }\n        return 0;\n    }\n};\nconst double MGH09_functor::_x[11] = { 4., 2., 1., 5.E-1 , 2.5E-01, 1.670000E-01, 1.250000E-01,  1.E-01, 8.330000E-02, 7.140000E-02, 6.250000E-02 };\nconst double MGH09_functor::y[11] = { 1.957000E-01, 1.947000E-01, 1.735000E-01, 1.600000E-01, 8.440000E-02, 6.270000E-02, 4.560000E-02, 3.420000E-02, 3.230000E-02, 2.350000E-02, 2.460000E-02 };\n\n// http://www.itl.nist.gov/div898/strd/nls/data/mgh09.shtml\nvoid testNistMGH09(void)\n{\n  const int n=4;\n  int info;\n\n  VectorXd x(n);\n\n  /*\n   * First try\n   */\n  x<< 25., 39, 41.5, 39.;\n  // do the computation\n  MGH09_functor functor;\n  LevenbergMarquardt<MGH09_functor> lm(functor);\n  lm.setMaxfev(1000);\n  info = lm.minimize(x);\n\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec().squaredNorm(), 3.0750560385E-04);\n  // check x\n  VERIFY_IS_APPROX(x[0], 0.1928077089); // should be 1.9280693458E-01\n  VERIFY_IS_APPROX(x[1], 0.19126423573); // should be 1.9128232873E-01\n  VERIFY_IS_APPROX(x[2], 0.12305309914); // should be 1.2305650693E-01\n  VERIFY_IS_APPROX(x[3], 0.13605395375); // should be 1.3606233068E-01\n  // check return value\n  VERIFY_IS_EQUAL(info, 1); \n  VERIFY(lm.nfev() < 510 ); // 490\n  VERIFY(lm.njev() < 400 ); // 376\n\n  /*\n   * Second try\n   */\n  x<< 0.25, 0.39, 0.415, 0.39;\n  // do the computation\n  lm.resetParameters();\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  VERIFY_IS_EQUAL(lm.nfev(), 18);\n  VERIFY_IS_EQUAL(lm.njev(), 16);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec().squaredNorm(), 3.0750560385E-04);\n  // check x\n  VERIFY_IS_APPROX(x[0], 0.19280781); // should be 1.9280693458E-01\n  VERIFY_IS_APPROX(x[1], 0.19126265); // should be 1.9128232873E-01\n  VERIFY_IS_APPROX(x[2], 0.12305280); // should be 1.2305650693E-01\n  VERIFY_IS_APPROX(x[3], 0.13605322); // should be 1.3606233068E-01\n}\n\n\n\nstruct Bennett5_functor : DenseFunctor<double>\n{\n    Bennett5_functor(void) : DenseFunctor<double>(3,154) {}\n    static const double x[154];\n    static const double y[154];\n    int operator()(const VectorXd &b, VectorXd &fvec)\n    {\n        assert(b.size()==3);\n        assert(fvec.size()==154);\n        for(int i=0; i<154; i++)\n            fvec[i] = b[0]* pow(b[1]+x[i],-1./b[2]) - y[i];\n        return 0;\n    }\n    int df(const VectorXd &b, MatrixXd &fjac)\n    {\n        assert(b.size()==3);\n        assert(fjac.rows()==154);\n        assert(fjac.cols()==3);\n        for(int i=0; i<154; i++) {\n            double e = pow(b[1]+x[i],-1./b[2]);\n            fjac(i,0) = e;\n            fjac(i,1) = - b[0]*e/b[2]/(b[1]+x[i]);\n            fjac(i,2) = b[0]*e*log(b[1]+x[i])/b[2]/b[2];\n        }\n        return 0;\n    }\n};\nconst double Bennett5_functor::x[154] = { 7.447168E0, 8.102586E0, 8.452547E0, 8.711278E0, 8.916774E0, 9.087155E0, 9.232590E0, 9.359535E0, 9.472166E0, 9.573384E0, 9.665293E0, 9.749461E0, 9.827092E0, 9.899128E0, 9.966321E0, 10.029280E0, 10.088510E0, 10.144430E0, 10.197380E0, 10.247670E0, 10.295560E0, 10.341250E0, 10.384950E0, 10.426820E0, 10.467000E0, 10.505640E0, 10.542830E0, 10.578690E0, 10.613310E0, 10.646780E0, 10.679150E0, 10.710520E0, 10.740920E0, 10.770440E0, 10.799100E0, 10.826970E0, 10.854080E0, 10.880470E0, 10.906190E0, 10.931260E0, 10.955720E0, 10.979590E0, 11.002910E0, 11.025700E0, 11.047980E0, 11.069770E0, 11.091100E0, 11.111980E0, 11.132440E0, 11.152480E0, 11.172130E0, 11.191410E0, 11.210310E0, 11.228870E0, 11.247090E0, 11.264980E0, 11.282560E0, 11.299840E0, 11.316820E0, 11.333520E0, 11.349940E0, 11.366100E0, 11.382000E0, 11.397660E0, 11.413070E0, 11.428240E0, 11.443200E0, 11.457930E0, 11.472440E0, 11.486750E0, 11.500860E0, 11.514770E0, 11.528490E0, 11.542020E0, 11.555380E0, 11.568550E0,\n11.581560E0, 11.594420E0, 11.607121E0, 11.619640E0, 11.632000E0, 11.644210E0, 11.656280E0, 11.668200E0, 11.679980E0, 11.691620E0, 11.703130E0, 11.714510E0, 11.725760E0, 11.736880E0, 11.747890E0, 11.758780E0, 11.769550E0, 11.780200E0, 11.790730E0, 11.801160E0, 11.811480E0, 11.821700E0, 11.831810E0, 11.841820E0, 11.851730E0, 11.861550E0, 11.871270E0, 11.880890E0, 11.890420E0, 11.899870E0, 11.909220E0, 11.918490E0, 11.927680E0, 11.936780E0, 11.945790E0, 11.954730E0, 11.963590E0, 11.972370E0, 11.981070E0, 11.989700E0, 11.998260E0, 12.006740E0, 12.015150E0, 12.023490E0, 12.031760E0, 12.039970E0, 12.048100E0, 12.056170E0, 12.064180E0, 12.072120E0, 12.080010E0, 12.087820E0, 12.095580E0, 12.103280E0, 12.110920E0, 12.118500E0, 12.126030E0, 12.133500E0, 12.140910E0, 12.148270E0, 12.155570E0, 12.162830E0, 12.170030E0, 12.177170E0, 12.184270E0, 12.191320E0, 12.198320E0, 12.205270E0, 12.212170E0, 12.219030E0, 12.225840E0, 12.232600E0, 12.239320E0, 12.245990E0, 12.252620E0, 12.259200E0, 12.265750E0, 12.272240E0 };\nconst double Bennett5_functor::y[154] = { -34.834702E0 ,-34.393200E0 ,-34.152901E0 ,-33.979099E0 ,-33.845901E0 ,-33.732899E0 ,-33.640301E0 ,-33.559200E0 ,-33.486801E0 ,-33.423100E0 ,-33.365101E0 ,-33.313000E0 ,-33.260899E0 ,-33.217400E0 ,-33.176899E0 ,-33.139198E0 ,-33.101601E0 ,-33.066799E0 ,-33.035000E0 ,-33.003101E0 ,-32.971298E0 ,-32.942299E0 ,-32.916302E0 ,-32.890202E0 ,-32.864101E0 ,-32.841000E0 ,-32.817799E0 ,-32.797501E0 ,-32.774300E0 ,-32.757000E0 ,-32.733799E0 ,-32.716400E0 ,-32.699100E0 ,-32.678799E0 ,-32.661400E0 ,-32.644001E0 ,-32.626701E0 ,-32.612202E0 ,-32.597698E0 ,-32.583199E0 ,-32.568699E0 ,-32.554298E0 ,-32.539799E0 ,-32.525299E0 ,-32.510799E0 ,-32.499199E0 ,-32.487598E0 ,-32.473202E0 ,-32.461601E0 ,-32.435501E0 ,-32.435501E0 ,-32.426800E0 ,-32.412300E0 ,-32.400799E0 ,-32.392101E0 ,-32.380501E0 ,-32.366001E0 ,-32.357300E0 ,-32.348598E0 ,-32.339901E0 ,-32.328400E0 ,-32.319698E0 ,-32.311001E0 ,-32.299400E0 ,-32.290699E0 ,-32.282001E0 ,-32.273300E0 ,-32.264599E0 ,-32.256001E0 ,-32.247299E0\n,-32.238602E0 ,-32.229900E0 ,-32.224098E0 ,-32.215401E0 ,-32.203800E0 ,-32.198002E0 ,-32.189400E0 ,-32.183601E0 ,-32.174900E0 ,-32.169102E0 ,-32.163300E0 ,-32.154598E0 ,-32.145901E0 ,-32.140099E0 ,-32.131401E0 ,-32.125599E0 ,-32.119801E0 ,-32.111198E0 ,-32.105400E0 ,-32.096699E0 ,-32.090900E0 ,-32.088001E0 ,-32.079300E0 ,-32.073502E0 ,-32.067699E0 ,-32.061901E0 ,-32.056099E0 ,-32.050301E0 ,-32.044498E0 ,-32.038799E0 ,-32.033001E0 ,-32.027199E0 ,-32.024300E0 ,-32.018501E0 ,-32.012699E0 ,-32.004002E0 ,-32.001099E0 ,-31.995300E0 ,-31.989500E0 ,-31.983700E0 ,-31.977900E0 ,-31.972099E0 ,-31.969299E0 ,-31.963501E0 ,-31.957701E0 ,-31.951900E0 ,-31.946100E0 ,-31.940300E0 ,-31.937401E0 ,-31.931601E0 ,-31.925800E0 ,-31.922899E0 ,-31.917101E0 ,-31.911301E0 ,-31.908400E0 ,-31.902599E0 ,-31.896900E0 ,-31.893999E0 ,-31.888201E0 ,-31.885300E0 ,-31.882401E0 ,-31.876600E0 ,-31.873699E0 ,-31.867901E0 ,-31.862101E0 ,-31.859200E0 ,-31.856300E0 ,-31.850500E0 ,-31.844700E0 ,-31.841801E0 ,-31.838900E0 ,-31.833099E0 ,-31.830200E0 ,\n-31.827299E0 ,-31.821600E0 ,-31.818701E0 ,-31.812901E0 ,-31.809999E0 ,-31.807100E0 ,-31.801300E0 ,-31.798401E0 ,-31.795500E0 ,-31.789700E0 ,-31.786800E0 };\n\n// http://www.itl.nist.gov/div898/strd/nls/data/bennett5.shtml\nvoid testNistBennett5(void)\n{\n  const int  n=3;\n  int info;\n\n  VectorXd x(n);\n\n  /*\n   * First try\n   */\n  x<< -2000., 50., 0.8;\n  // do the computation\n  Bennett5_functor functor;\n  LevenbergMarquardt<Bennett5_functor> lm(functor);\n  lm.setMaxfev(1000);\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  VERIFY_IS_EQUAL(lm.nfev(), 758);\n  VERIFY_IS_EQUAL(lm.njev(), 744);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec().squaredNorm(), 5.2404744073E-04);\n  // check x\n  VERIFY_IS_APPROX(x[0], -2.5235058043E+03);\n  VERIFY_IS_APPROX(x[1], 4.6736564644E+01);\n  VERIFY_IS_APPROX(x[2], 9.3218483193E-01);\n  /*\n   * Second try\n   */\n  x<< -1500., 45., 0.85;\n  // do the computation\n  lm.resetParameters();\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  VERIFY_IS_EQUAL(lm.nfev(), 203);\n  VERIFY_IS_EQUAL(lm.njev(), 192);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec().squaredNorm(), 5.2404744073E-04);\n  // check x\n  VERIFY_IS_APPROX(x[0], -2523.3007865); // should be -2.5235058043E+03\n  VERIFY_IS_APPROX(x[1], 46.735705771); // should be 4.6736564644E+01);\n  VERIFY_IS_APPROX(x[2], 0.93219881891); // should be 9.3218483193E-01);\n}\n\nstruct thurber_functor : DenseFunctor<double>\n{\n    thurber_functor(void) : DenseFunctor<double>(7,37) {}\n    static const double _x[37];\n    static const double _y[37];\n    int operator()(const VectorXd &b, VectorXd &fvec)\n    {\n        //        int called=0; printf(\"call hahn1_functor with  iflag=%d, called=%d\\n\", iflag, called); if (iflag==1) called++;\n        assert(b.size()==7);\n        assert(fvec.size()==37);\n        for(int i=0; i<37; i++) {\n            double x=_x[i], xx=x*x, xxx=xx*x;\n            fvec[i] = (b[0]+b[1]*x+b[2]*xx+b[3]*xxx) / (1.+b[4]*x+b[5]*xx+b[6]*xxx) - _y[i];\n        }\n        return 0;\n    }\n    int df(const VectorXd &b, MatrixXd &fjac)\n    {\n        assert(b.size()==7);\n        assert(fjac.rows()==37);\n        assert(fjac.cols()==7);\n        for(int i=0; i<37; i++) {\n            double x=_x[i], xx=x*x, xxx=xx*x;\n            double fact = 1./(1.+b[4]*x+b[5]*xx+b[6]*xxx);\n            fjac(i,0) = 1.*fact;\n            fjac(i,1) = x*fact;\n            fjac(i,2) = xx*fact;\n            fjac(i,3) = xxx*fact;\n            fact = - (b[0]+b[1]*x+b[2]*xx+b[3]*xxx) * fact * fact;\n            fjac(i,4) = x*fact;\n            fjac(i,5) = xx*fact;\n            fjac(i,6) = xxx*fact;\n        }\n        return 0;\n    }\n};\nconst double thurber_functor::_x[37] = { -3.067E0, -2.981E0, -2.921E0, -2.912E0, -2.840E0, -2.797E0, -2.702E0, -2.699E0, -2.633E0, -2.481E0, -2.363E0, -2.322E0, -1.501E0, -1.460E0, -1.274E0, -1.212E0, -1.100E0, -1.046E0, -0.915E0, -0.714E0, -0.566E0, -0.545E0, -0.400E0, -0.309E0, -0.109E0, -0.103E0, 0.010E0, 0.119E0, 0.377E0, 0.790E0, 0.963E0, 1.006E0, 1.115E0, 1.572E0, 1.841E0, 2.047E0, 2.200E0 };\nconst double thurber_functor::_y[37] = { 80.574E0, 84.248E0, 87.264E0, 87.195E0, 89.076E0, 89.608E0, 89.868E0, 90.101E0, 92.405E0, 95.854E0, 100.696E0, 101.060E0, 401.672E0, 390.724E0, 567.534E0, 635.316E0, 733.054E0, 759.087E0, 894.206E0, 990.785E0, 1090.109E0, 1080.914E0, 1122.643E0, 1178.351E0, 1260.531E0, 1273.514E0, 1288.339E0, 1327.543E0, 1353.863E0, 1414.509E0, 1425.208E0, 1421.384E0, 1442.962E0, 1464.350E0, 1468.705E0, 1447.894E0, 1457.628E0};\n\n// http://www.itl.nist.gov/div898/strd/nls/data/thurber.shtml\nvoid testNistThurber(void)\n{\n  const int n=7;\n  int info;\n\n  VectorXd x(n);\n\n  /*\n   * First try\n   */\n  x<< 1000 ,1000 ,400 ,40 ,0.7,0.3,0.0 ;\n  // do the computation\n  thurber_functor functor;\n  LevenbergMarquardt<thurber_functor> lm(functor);\n  lm.setFtol(1.E4*NumTraits<double>::epsilon());\n  lm.setXtol(1.E4*NumTraits<double>::epsilon());\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  VERIFY_IS_EQUAL(lm.nfev(), 39);\n  VERIFY_IS_EQUAL(lm.njev(), 36);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec().squaredNorm(), 5.6427082397E+03);\n  // check x\n  VERIFY_IS_APPROX(x[0], 1.2881396800E+03);\n  VERIFY_IS_APPROX(x[1], 1.4910792535E+03);\n  VERIFY_IS_APPROX(x[2], 5.8323836877E+02);\n  VERIFY_IS_APPROX(x[3], 7.5416644291E+01);\n  VERIFY_IS_APPROX(x[4], 9.6629502864E-01);\n  VERIFY_IS_APPROX(x[5], 3.9797285797E-01);\n  VERIFY_IS_APPROX(x[6], 4.9727297349E-02);\n\n  /*\n   * Second try\n   */\n  x<< 1300 ,1500 ,500  ,75   ,1    ,0.4  ,0.05  ;\n  // do the computation\n  lm.resetParameters();\n  lm.setFtol(1.E4*NumTraits<double>::epsilon());\n  lm.setXtol(1.E4*NumTraits<double>::epsilon());\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  VERIFY_IS_EQUAL(lm.nfev(), 29);\n  VERIFY_IS_EQUAL(lm.njev(), 28);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec().squaredNorm(), 5.6427082397E+03);\n  // check x\n  VERIFY_IS_APPROX(x[0], 1.2881396800E+03);\n  VERIFY_IS_APPROX(x[1], 1.4910792535E+03);\n  VERIFY_IS_APPROX(x[2], 5.8323836877E+02);\n  VERIFY_IS_APPROX(x[3], 7.5416644291E+01);\n  VERIFY_IS_APPROX(x[4], 9.6629502864E-01);\n  VERIFY_IS_APPROX(x[5], 3.9797285797E-01);\n  VERIFY_IS_APPROX(x[6], 4.9727297349E-02);\n}\n\nstruct rat43_functor : DenseFunctor<double>\n{\n    rat43_functor(void) : DenseFunctor<double>(4,15) {}\n    static const double x[15];\n    static const double y[15];\n    int operator()(const VectorXd &b, VectorXd &fvec)\n    {\n        assert(b.size()==4);\n        assert(fvec.size()==15);\n        for(int i=0; i<15; i++)\n            fvec[i] = b[0] * pow(1.+exp(b[1]-b[2]*x[i]),-1./b[3]) - y[i];\n        return 0;\n    }\n    int df(const VectorXd &b, MatrixXd &fjac)\n    {\n        assert(b.size()==4);\n        assert(fjac.rows()==15);\n        assert(fjac.cols()==4);\n        for(int i=0; i<15; i++) {\n            double e = exp(b[1]-b[2]*x[i]);\n            double power = -1./b[3];\n            fjac(i,0) = pow(1.+e, power);\n            fjac(i,1) = power*b[0]*e*pow(1.+e, power-1.);\n            fjac(i,2) = -power*b[0]*e*x[i]*pow(1.+e, power-1.);\n            fjac(i,3) = b[0]*power*power*log(1.+e)*pow(1.+e, power);\n        }\n        return 0;\n    }\n};\nconst double rat43_functor::x[15] = { 1., 2., 3., 4., 5., 6., 7., 8., 9., 10., 11., 12., 13., 14., 15. };\nconst double rat43_functor::y[15] = { 16.08, 33.83, 65.80, 97.20, 191.55, 326.20, 386.87, 520.53, 590.03, 651.92, 724.93, 699.56, 689.96, 637.56, 717.41 };\n\n// http://www.itl.nist.gov/div898/strd/nls/data/ratkowsky3.shtml\nvoid testNistRat43(void)\n{\n  const int n=4;\n  int info;\n\n  VectorXd x(n);\n\n  /*\n   * First try\n   */\n  x<< 100., 10., 1., 1.;\n  // do the computation\n  rat43_functor functor;\n  LevenbergMarquardt<rat43_functor> lm(functor);\n  lm.setFtol(1.E6*NumTraits<double>::epsilon());\n  lm.setXtol(1.E6*NumTraits<double>::epsilon());\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  VERIFY_IS_EQUAL(lm.nfev(), 27);\n  VERIFY_IS_EQUAL(lm.njev(), 20);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec().squaredNorm(), 8.7864049080E+03);\n  // check x\n  VERIFY_IS_APPROX(x[0], 6.9964151270E+02);\n  VERIFY_IS_APPROX(x[1], 5.2771253025E+00);\n  VERIFY_IS_APPROX(x[2], 7.5962938329E-01);\n  VERIFY_IS_APPROX(x[3], 1.2792483859E+00);\n\n  /*\n   * Second try\n   */\n  x<< 700., 5., 0.75, 1.3;\n  // do the computation\n  lm.resetParameters();\n  lm.setFtol(1.E5*NumTraits<double>::epsilon());\n  lm.setXtol(1.E5*NumTraits<double>::epsilon());\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  VERIFY_IS_EQUAL(lm.nfev(), 9);\n  VERIFY_IS_EQUAL(lm.njev(), 8);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec().squaredNorm(), 8.7864049080E+03);\n  // check x\n  VERIFY_IS_APPROX(x[0], 6.9964151270E+02);\n  VERIFY_IS_APPROX(x[1], 5.2771253025E+00);\n  VERIFY_IS_APPROX(x[2], 7.5962938329E-01);\n  VERIFY_IS_APPROX(x[3], 1.2792483859E+00);\n}\n\n\n\nstruct eckerle4_functor : DenseFunctor<double>\n{\n    eckerle4_functor(void) : DenseFunctor<double>(3,35) {}\n    static const double x[35];\n    static const double y[35];\n    int operator()(const VectorXd &b, VectorXd &fvec)\n    {\n        assert(b.size()==3);\n        assert(fvec.size()==35);\n        for(int i=0; i<35; i++)\n            fvec[i] = b[0]/b[1] * exp(-0.5*(x[i]-b[2])*(x[i]-b[2])/(b[1]*b[1])) - y[i];\n        return 0;\n    }\n    int df(const VectorXd &b, MatrixXd &fjac)\n    {\n        assert(b.size()==3);\n        assert(fjac.rows()==35);\n        assert(fjac.cols()==3);\n        for(int i=0; i<35; i++) {\n            double b12 = b[1]*b[1];\n            double e = exp(-0.5*(x[i]-b[2])*(x[i]-b[2])/b12);\n            fjac(i,0) = e / b[1];\n            fjac(i,1) = ((x[i]-b[2])*(x[i]-b[2])/b12-1.) * b[0]*e/b12;\n            fjac(i,2) = (x[i]-b[2])*e*b[0]/b[1]/b12;\n        }\n        return 0;\n    }\n};\nconst double eckerle4_functor::x[35] = { 400.0, 405.0, 410.0, 415.0, 420.0, 425.0, 430.0, 435.0, 436.5, 438.0, 439.5, 441.0, 442.5, 444.0, 445.5, 447.0, 448.5, 450.0, 451.5, 453.0, 454.5, 456.0, 457.5, 459.0, 460.5, 462.0, 463.5, 465.0, 470.0, 475.0, 480.0, 485.0, 490.0, 495.0, 500.0};\nconst double eckerle4_functor::y[35] = { 0.0001575, 0.0001699, 0.0002350, 0.0003102, 0.0004917, 0.0008710, 0.0017418, 0.0046400, 0.0065895, 0.0097302, 0.0149002, 0.0237310, 0.0401683, 0.0712559, 0.1264458, 0.2073413, 0.2902366, 0.3445623, 0.3698049, 0.3668534, 0.3106727, 0.2078154, 0.1164354, 0.0616764, 0.0337200, 0.0194023, 0.0117831, 0.0074357, 0.0022732, 0.0008800, 0.0004579, 0.0002345, 0.0001586, 0.0001143, 0.0000710 };\n\n// http://www.itl.nist.gov/div898/strd/nls/data/eckerle4.shtml\nvoid testNistEckerle4(void)\n{\n  const int n=3;\n  int info;\n\n  VectorXd x(n);\n\n  /*\n   * First try\n   */\n  x<< 1., 10., 500.;\n  // do the computation\n  eckerle4_functor functor;\n  LevenbergMarquardt<eckerle4_functor> lm(functor);\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  VERIFY_IS_EQUAL(lm.nfev(), 18);\n  VERIFY_IS_EQUAL(lm.njev(), 15);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec().squaredNorm(), 1.4635887487E-03);\n  // check x\n  VERIFY_IS_APPROX(x[0], 1.5543827178);\n  VERIFY_IS_APPROX(x[1], 4.0888321754);\n  VERIFY_IS_APPROX(x[2], 4.5154121844E+02);\n\n  /*\n   * Second try\n   */\n  x<< 1.5, 5., 450.;\n  // do the computation\n  info = lm.minimize(x);\n\n  // check return value\n  VERIFY_IS_EQUAL(info, 1);\n  VERIFY_IS_EQUAL(lm.nfev(), 7);\n  VERIFY_IS_EQUAL(lm.njev(), 6);\n  // check norm^2\n  VERIFY_IS_APPROX(lm.fvec().squaredNorm(), 1.4635887487E-03);\n  // check x\n  VERIFY_IS_APPROX(x[0], 1.5543827178);\n  VERIFY_IS_APPROX(x[1], 4.0888321754);\n  VERIFY_IS_APPROX(x[2], 4.5154121844E+02);\n}\n\nEIGEN_DECLARE_TEST(levenberg_marquardt)\n{\n    // Tests using the examples provided by (c)minpack\n    CALL_SUBTEST(testLmder1());\n    CALL_SUBTEST(testLmder());\n    CALL_SUBTEST(testLmdif1());\n//     CALL_SUBTEST(testLmstr1());\n//     CALL_SUBTEST(testLmstr());\n    CALL_SUBTEST(testLmdif());\n\n    // NIST tests, level of difficulty = \"Lower\"\n    CALL_SUBTEST(testNistMisra1a());\n    CALL_SUBTEST(testNistChwirut2());\n\n    // NIST tests, level of difficulty = \"Average\"\n    CALL_SUBTEST(testNistHahn1());\n    CALL_SUBTEST(testNistMisra1d());\n    CALL_SUBTEST(testNistMGH17());\n    CALL_SUBTEST(testNistLanczos1());\n\n//     // NIST tests, level of difficulty = \"Higher\"\n    CALL_SUBTEST(testNistRat42());\n    CALL_SUBTEST(testNistMGH10());\n    CALL_SUBTEST(testNistBoxBOD());\n//     CALL_SUBTEST(testNistMGH09());\n    CALL_SUBTEST(testNistBennett5());\n    CALL_SUBTEST(testNistThurber());\n    CALL_SUBTEST(testNistRat43());\n    CALL_SUBTEST(testNistEckerle4());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/matrix_exponential.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009 Jitse Niesen <jitse@maths.leeds.ac.uk>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"matrix_functions.h\"\n\ndouble binom(int n, int k)\n{\n  double res = 1;\n  for (int i=0; i<k; i++)\n    res = res * (n-k+i+1) / (i+1);\n  return res;\n}\n\ntemplate <typename T>\nT expfn(T x, int)\n{\n  return std::exp(x);\n}\n\ntemplate <typename T>\nvoid test2dRotation(double tol)\n{\n  Matrix<T,2,2> A, B, C;\n  T angle;\n\n  A << 0, 1, -1, 0;\n  for (int i=0; i<=20; i++)\n  {\n    angle = static_cast<T>(pow(10, i / 5. - 2));\n    B << std::cos(angle), std::sin(angle), -std::sin(angle), std::cos(angle);\n\n    C = (angle*A).matrixFunction(expfn);\n    std::cout << \"test2dRotation: i = \" << i << \"   error funm = \" << relerr(C, B);\n    VERIFY(C.isApprox(B, static_cast<T>(tol)));\n\n    C = (angle*A).exp();\n    std::cout << \"   error expm = \" << relerr(C, B) << \"\\n\";\n    VERIFY(C.isApprox(B, static_cast<T>(tol)));\n  }\n}\n\ntemplate <typename T>\nvoid test2dHyperbolicRotation(double tol)\n{\n  Matrix<std::complex<T>,2,2> A, B, C;\n  std::complex<T> imagUnit(0,1);\n  T angle, ch, sh;\n\n  for (int i=0; i<=20; i++)\n  {\n    angle = static_cast<T>((i-10) / 2.0);\n    ch = std::cosh(angle);\n    sh = std::sinh(angle);\n    A << 0, angle*imagUnit, -angle*imagUnit, 0;\n    B << ch, sh*imagUnit, -sh*imagUnit, ch;\n\n    C = A.matrixFunction(expfn);\n    std::cout << \"test2dHyperbolicRotation: i = \" << i << \"   error funm = \" << relerr(C, B);\n    VERIFY(C.isApprox(B, static_cast<T>(tol)));\n\n    C = A.exp();\n    std::cout << \"   error expm = \" << relerr(C, B) << \"\\n\";\n    VERIFY(C.isApprox(B, static_cast<T>(tol)));\n  }\n}\n\ntemplate <typename T>\nvoid testPascal(double tol)\n{\n  for (int size=1; size<20; size++)\n  {\n    Matrix<T,Dynamic,Dynamic> A(size,size), B(size,size), C(size,size);\n    A.setZero();\n    for (int i=0; i<size-1; i++)\n      A(i+1,i) = static_cast<T>(i+1);\n    B.setZero();\n    for (int i=0; i<size; i++)\n      for (int j=0; j<=i; j++)\n    B(i,j) = static_cast<T>(binom(i,j));\n\n    C = A.matrixFunction(expfn);\n    std::cout << \"testPascal: size = \" << size << \"   error funm = \" << relerr(C, B);\n    VERIFY(C.isApprox(B, static_cast<T>(tol)));\n\n    C = A.exp();\n    std::cout << \"   error expm = \" << relerr(C, B) << \"\\n\";\n    VERIFY(C.isApprox(B, static_cast<T>(tol)));\n  }\n}\n\ntemplate<typename MatrixType>\nvoid randomTest(const MatrixType& m, double tol)\n{\n  /* this test covers the following files:\n     Inverse.h\n  */\n  typename MatrixType::Index rows = m.rows();\n  typename MatrixType::Index cols = m.cols();\n  MatrixType m1(rows, cols), m2(rows, cols), identity = MatrixType::Identity(rows, cols);\n\n  typedef typename NumTraits<typename internal::traits<MatrixType>::Scalar>::Real RealScalar;\n\n  for(int i = 0; i < g_repeat; i++) {\n    m1 = MatrixType::Random(rows, cols);\n\n    m2 = m1.matrixFunction(expfn) * (-m1).matrixFunction(expfn);\n    std::cout << \"randomTest: error funm = \" << relerr(identity, m2);\n    VERIFY(identity.isApprox(m2, static_cast<RealScalar>(tol)));\n\n    m2 = m1.exp() * (-m1).exp();\n    std::cout << \"   error expm = \" << relerr(identity, m2) << \"\\n\";\n    VERIFY(identity.isApprox(m2, static_cast<RealScalar>(tol)));\n  }\n}\n\nEIGEN_DECLARE_TEST(matrix_exponential)\n{\n  CALL_SUBTEST_2(test2dRotation<double>(1e-13));\n  CALL_SUBTEST_1(test2dRotation<float>(2e-5));  // was 1e-5, relaxed for clang 2.8 / linux / x86-64\n  CALL_SUBTEST_8(test2dRotation<long double>(1e-13)); \n  CALL_SUBTEST_2(test2dHyperbolicRotation<double>(1e-14));\n  CALL_SUBTEST_1(test2dHyperbolicRotation<float>(1e-5));\n  CALL_SUBTEST_8(test2dHyperbolicRotation<long double>(1e-14));\n  CALL_SUBTEST_6(testPascal<float>(1e-6));\n  CALL_SUBTEST_5(testPascal<double>(1e-15));\n  CALL_SUBTEST_2(randomTest(Matrix2d(), 1e-13));\n  CALL_SUBTEST_7(randomTest(Matrix<double,3,3,RowMajor>(), 1e-13));\n  CALL_SUBTEST_3(randomTest(Matrix4cd(), 1e-13));\n  CALL_SUBTEST_4(randomTest(MatrixXd(8,8), 1e-13));\n  CALL_SUBTEST_1(randomTest(Matrix2f(), 1e-4));\n  CALL_SUBTEST_5(randomTest(Matrix3cf(), 1e-4));\n  CALL_SUBTEST_1(randomTest(Matrix4f(), 1e-4));\n  CALL_SUBTEST_6(randomTest(MatrixXf(8,8), 1e-4));\n  CALL_SUBTEST_9(randomTest(Matrix<long double,Dynamic,Dynamic>(7,7), 1e-13));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/matrix_function.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010 Jitse Niesen <jitse@maths.leeds.ac.uk>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <unsupported/Eigen/MatrixFunctions>\n\n// Variant of VERIFY_IS_APPROX which uses absolute error instead of\n// relative error.\n#define VERIFY_IS_APPROX_ABS(a, b) VERIFY(test_isApprox_abs(a, b))\n\ntemplate<typename Type1, typename Type2>\ninline bool test_isApprox_abs(const Type1& a, const Type2& b)\n{\n  return ((a-b).array().abs() < test_precision<typename Type1::RealScalar>()).all();\n}\n\n\n// Returns a matrix with eigenvalues clustered around 0, 1 and 2.\ntemplate<typename MatrixType>\nMatrixType randomMatrixWithRealEivals(const Index size)\n{\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename MatrixType::RealScalar RealScalar;\n  MatrixType diag = MatrixType::Zero(size, size);\n  for (Index i = 0; i < size; ++i) {\n    diag(i, i) = Scalar(RealScalar(internal::random<int>(0,2)))\n      + internal::random<Scalar>() * Scalar(RealScalar(0.01));\n  }\n  MatrixType A = MatrixType::Random(size, size);\n  HouseholderQR<MatrixType> QRofA(A);\n  return QRofA.householderQ().inverse() * diag * QRofA.householderQ();\n}\n\ntemplate <typename MatrixType, int IsComplex = NumTraits<typename internal::traits<MatrixType>::Scalar>::IsComplex>\nstruct randomMatrixWithImagEivals\n{\n  // Returns a matrix with eigenvalues clustered around 0 and +/- i.\n  static MatrixType run(const Index size);\n};\n\n// Partial specialization for real matrices\ntemplate<typename MatrixType>\nstruct randomMatrixWithImagEivals<MatrixType, 0>\n{\n  static MatrixType run(const Index size)\n  {\n    typedef typename MatrixType::Scalar Scalar;\n    MatrixType diag = MatrixType::Zero(size, size);\n    Index i = 0;\n    while (i < size) {\n      Index randomInt = internal::random<Index>(-1, 1);\n      if (randomInt == 0 || i == size-1) {\n        diag(i, i) = internal::random<Scalar>() * Scalar(0.01);\n        ++i;\n      } else {\n        Scalar alpha = Scalar(randomInt) + internal::random<Scalar>() * Scalar(0.01);\n        diag(i, i+1) = alpha;\n        diag(i+1, i) = -alpha;\n        i += 2;\n      }\n    }\n    MatrixType A = MatrixType::Random(size, size);\n    HouseholderQR<MatrixType> QRofA(A);\n    return QRofA.householderQ().inverse() * diag * QRofA.householderQ();\n  }\n};\n\n// Partial specialization for complex matrices\ntemplate<typename MatrixType>\nstruct randomMatrixWithImagEivals<MatrixType, 1>\n{\n  static MatrixType run(const Index size)\n  {\n    typedef typename MatrixType::Scalar Scalar;\n    typedef typename MatrixType::RealScalar RealScalar;\n    const Scalar imagUnit(0, 1);\n    MatrixType diag = MatrixType::Zero(size, size);\n    for (Index i = 0; i < size; ++i) {\n      diag(i, i) = Scalar(RealScalar(internal::random<Index>(-1, 1))) * imagUnit\n        + internal::random<Scalar>() * Scalar(RealScalar(0.01));\n    }\n    MatrixType A = MatrixType::Random(size, size);\n    HouseholderQR<MatrixType> QRofA(A);\n    return QRofA.householderQ().inverse() * diag * QRofA.householderQ();\n  }\n};\n\n\ntemplate<typename MatrixType>\nvoid testMatrixExponential(const MatrixType& A)\n{\n  typedef typename internal::traits<MatrixType>::Scalar Scalar;\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  typedef std::complex<RealScalar> ComplexScalar;\n\n  VERIFY_IS_APPROX(A.exp(), A.matrixFunction(internal::stem_function_exp<ComplexScalar>));\n}\n\ntemplate<typename MatrixType>\nvoid testMatrixLogarithm(const MatrixType& A)\n{\n  typedef typename internal::traits<MatrixType>::Scalar Scalar;\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n\n  MatrixType scaledA;\n  RealScalar maxImagPartOfSpectrum = A.eigenvalues().imag().cwiseAbs().maxCoeff();\n  if (maxImagPartOfSpectrum >= RealScalar(0.9L * EIGEN_PI))\n    scaledA = A * RealScalar(0.9L * EIGEN_PI) / maxImagPartOfSpectrum;\n  else\n    scaledA = A;\n\n  // identity X.exp().log() = X only holds if Im(lambda) < pi for all eigenvalues of X\n  MatrixType expA = scaledA.exp();\n  MatrixType logExpA = expA.log();\n  VERIFY_IS_APPROX(logExpA, scaledA);\n}\n\ntemplate<typename MatrixType>\nvoid testHyperbolicFunctions(const MatrixType& A)\n{\n  // Need to use absolute error because of possible cancellation when\n  // adding/subtracting expA and expmA.\n  VERIFY_IS_APPROX_ABS(A.sinh(), (A.exp() - (-A).exp()) / 2);\n  VERIFY_IS_APPROX_ABS(A.cosh(), (A.exp() + (-A).exp()) / 2);\n}\n\ntemplate<typename MatrixType>\nvoid testGonioFunctions(const MatrixType& A)\n{\n  typedef typename MatrixType::Scalar Scalar;\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n  typedef std::complex<RealScalar> ComplexScalar;\n  typedef Matrix<ComplexScalar, MatrixType::RowsAtCompileTime, \n                 MatrixType::ColsAtCompileTime, MatrixType::Options> ComplexMatrix;\n\n  ComplexScalar imagUnit(0,1);\n  ComplexScalar two(2,0);\n\n  ComplexMatrix Ac = A.template cast<ComplexScalar>();\n  \n  ComplexMatrix exp_iA = (imagUnit * Ac).exp();\n  ComplexMatrix exp_miA = (-imagUnit * Ac).exp();\n  \n  ComplexMatrix sinAc = A.sin().template cast<ComplexScalar>();\n  VERIFY_IS_APPROX_ABS(sinAc, (exp_iA - exp_miA) / (two*imagUnit));\n  \n  ComplexMatrix cosAc = A.cos().template cast<ComplexScalar>();\n  VERIFY_IS_APPROX_ABS(cosAc, (exp_iA + exp_miA) / 2);\n}\n\ntemplate<typename MatrixType>\nvoid testMatrix(const MatrixType& A)\n{\n  testMatrixExponential(A);\n  testMatrixLogarithm(A);\n  testHyperbolicFunctions(A);\n  testGonioFunctions(A);\n}\n\ntemplate<typename MatrixType>\nvoid testMatrixType(const MatrixType& m)\n{\n  // Matrices with clustered eigenvalue lead to different code paths\n  // in MatrixFunction.h and are thus useful for testing.\n\n  const Index size = m.rows();\n  for (int i = 0; i < g_repeat; i++) {\n    testMatrix(MatrixType::Random(size, size).eval());\n    testMatrix(randomMatrixWithRealEivals<MatrixType>(size));\n    testMatrix(randomMatrixWithImagEivals<MatrixType>::run(size));\n  }\n}\n\ntemplate<typename MatrixType>\nvoid testMapRef(const MatrixType& A)\n{\n  // Test if passing Ref and Map objects is possible\n  // (Regression test for Bug #1796)\n  Index size = A.rows();\n  MatrixType X; X.setRandom(size, size);\n  MatrixType Y(size,size);\n  Ref<      MatrixType> R(Y);\n  Ref<const MatrixType> Rc(X);\n  Map<      MatrixType> M(Y.data(), size, size);\n  Map<const MatrixType> Mc(X.data(), size, size);\n\n  X = X*X; // make sure sqrt is possible\n  Y = X.sqrt();\n  R = Rc.sqrt();\n  M = Mc.sqrt();\n  Y = X.exp();\n  R = Rc.exp();\n  M = Mc.exp();\n  X = Y; // make sure log is possible\n  Y = X.log();\n  R = Rc.log();\n  M = Mc.log();\n\n  Y = X.cos() + Rc.cos() + Mc.cos();\n  Y = X.sin() + Rc.sin() + Mc.sin();\n\n  Y = X.cosh() + Rc.cosh() + Mc.cosh();\n  Y = X.sinh() + Rc.sinh() + Mc.sinh();\n}\n\n\nEIGEN_DECLARE_TEST(matrix_function)\n{\n  CALL_SUBTEST_1(testMatrixType(Matrix<float,1,1>()));\n  CALL_SUBTEST_2(testMatrixType(Matrix3cf()));\n  CALL_SUBTEST_3(testMatrixType(MatrixXf(8,8)));\n  CALL_SUBTEST_4(testMatrixType(Matrix2d()));\n  CALL_SUBTEST_5(testMatrixType(Matrix<double,5,5,RowMajor>()));\n  CALL_SUBTEST_6(testMatrixType(Matrix4cd()));\n  CALL_SUBTEST_7(testMatrixType(MatrixXd(13,13)));\n\n  CALL_SUBTEST_1(testMapRef(Matrix<float,1,1>()));\n  CALL_SUBTEST_2(testMapRef(Matrix3cf()));\n  CALL_SUBTEST_3(testMapRef(MatrixXf(8,8)));\n  CALL_SUBTEST_7(testMapRef(MatrixXd(13,13)));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/matrix_functions.h",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2009-2011 Jitse Niesen <jitse@maths.leeds.ac.uk>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <unsupported/Eigen/MatrixFunctions>\n\n// For complex matrices, any matrix is fine.\ntemplate<typename MatrixType, int IsComplex = NumTraits<typename internal::traits<MatrixType>::Scalar>::IsComplex>\nstruct processTriangularMatrix\n{\n  static void run(MatrixType&, MatrixType&, const MatrixType&)\n  { }\n};\n\n// For real matrices, make sure none of the eigenvalues are negative.\ntemplate<typename MatrixType>\nstruct processTriangularMatrix<MatrixType,0>\n{\n  static void run(MatrixType& m, MatrixType& T, const MatrixType& U)\n  {\n    const Index size = m.cols();\n\n    for (Index i=0; i < size; ++i) {\n      if (i == size - 1 || T.coeff(i+1,i) == 0)\n        T.coeffRef(i,i) = std::abs(T.coeff(i,i));\n      else\n        ++i;\n    }\n    m = U * T * U.transpose();\n  }\n};\n\ntemplate <typename MatrixType, int IsComplex = NumTraits<typename internal::traits<MatrixType>::Scalar>::IsComplex>\nstruct generateTestMatrix;\n\ntemplate <typename MatrixType>\nstruct generateTestMatrix<MatrixType,0>\n{\n  static void run(MatrixType& result, typename MatrixType::Index size)\n  {\n    result = MatrixType::Random(size, size);\n    RealSchur<MatrixType> schur(result);\n    MatrixType T = schur.matrixT();\n    processTriangularMatrix<MatrixType>::run(result, T, schur.matrixU());\n  }\n};\n\ntemplate <typename MatrixType>\nstruct generateTestMatrix<MatrixType,1>\n{\n  static void run(MatrixType& result, typename MatrixType::Index size)\n  {\n    result = MatrixType::Random(size, size);\n  }\n};\n\ntemplate <typename Derived, typename OtherDerived>\ntypename Derived::RealScalar relerr(const MatrixBase<Derived>& A, const MatrixBase<OtherDerived>& B)\n{\n  return std::sqrt((A - B).cwiseAbs2().sum() / (std::min)(A.cwiseAbs2().sum(), B.cwiseAbs2().sum()));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/matrix_power.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012, 2013 Chen-Pang He <jdh8@ms63.hinet.net>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"matrix_functions.h\"\n\ntemplate<typename T>\nvoid test2dRotation(const T& tol)\n{\n  Matrix<T,2,2> A, B, C;\n  T angle, c, s;\n\n  A << 0, 1, -1, 0;\n  MatrixPower<Matrix<T,2,2> > Apow(A);\n\n  for (int i=0; i<=20; ++i) {\n    angle = std::pow(T(10), T(i-10) / T(5.));\n    c = std::cos(angle);\n    s = std::sin(angle);\n    B << c, s, -s, c;\n\n    C = Apow(std::ldexp(angle,1) / T(EIGEN_PI));\n    std::cout << \"test2dRotation: i = \" << i << \"   error powerm = \" << relerr(C,B) << '\\n';\n    VERIFY(C.isApprox(B, tol));\n  }\n}\n\ntemplate<typename T>\nvoid test2dHyperbolicRotation(const T& tol)\n{\n  Matrix<std::complex<T>,2,2> A, B, C;\n  T angle, ch = std::cosh((T)1);\n  std::complex<T> ish(0, std::sinh((T)1));\n\n  A << ch, ish, -ish, ch;\n  MatrixPower<Matrix<std::complex<T>,2,2> > Apow(A);\n\n  for (int i=0; i<=20; ++i) {\n    angle = std::ldexp(static_cast<T>(i-10), -1);\n    ch = std::cosh(angle);\n    ish = std::complex<T>(0, std::sinh(angle));\n    B << ch, ish, -ish, ch;\n\n    C = Apow(angle);\n    std::cout << \"test2dHyperbolicRotation: i = \" << i << \"   error powerm = \" << relerr(C,B) << '\\n';\n    VERIFY(C.isApprox(B, tol));\n  }\n}\n\ntemplate<typename T>\nvoid test3dRotation(const T& tol)\n{\n  Matrix<T,3,1> v;\n  T angle;\n\n  for (int i=0; i<=20; ++i) {\n    v = Matrix<T,3,1>::Random();\n    v.normalize();\n    angle = std::pow(T(10), T(i-10) / T(5.));\n    VERIFY(AngleAxis<T>(angle, v).matrix().isApprox(AngleAxis<T>(1,v).matrix().pow(angle), tol));\n  }\n}\n\ntemplate<typename MatrixType>\nvoid testGeneral(const MatrixType& m, const typename MatrixType::RealScalar& tol)\n{\n  typedef typename MatrixType::RealScalar RealScalar;\n  MatrixType m1, m2, m3, m4, m5;\n  RealScalar x, y;\n\n  for (int i=0; i < g_repeat; ++i) {\n    generateTestMatrix<MatrixType>::run(m1, m.rows());\n    MatrixPower<MatrixType> mpow(m1);\n\n    x = internal::random<RealScalar>();\n    y = internal::random<RealScalar>();\n    m2 = mpow(x);\n    m3 = mpow(y);\n\n    m4 = mpow(x+y);\n    m5.noalias() = m2 * m3;\n    VERIFY(m4.isApprox(m5, tol));\n\n    m4 = mpow(x*y);\n    m5 = m2.pow(y);\n    VERIFY(m4.isApprox(m5, tol));\n\n    m4 = (std::abs(x) * m1).pow(y);\n    m5 = std::pow(std::abs(x), y) * m3;\n    VERIFY(m4.isApprox(m5, tol));\n  }\n}\n\ntemplate<typename MatrixType>\nvoid testSingular(const MatrixType& m_const, const typename MatrixType::RealScalar& tol)\n{\n  // we need to pass by reference in order to prevent errors with\n  // MSVC for aligned data types ...\n  MatrixType& m = const_cast<MatrixType&>(m_const);\n\n  const int IsComplex = NumTraits<typename internal::traits<MatrixType>::Scalar>::IsComplex;\n  typedef typename internal::conditional<IsComplex, TriangularView<MatrixType,Upper>, const MatrixType&>::type TriangularType;\n  typename internal::conditional< IsComplex, ComplexSchur<MatrixType>, RealSchur<MatrixType> >::type schur;\n  MatrixType T;\n\n  for (int i=0; i < g_repeat; ++i) {\n    m.setRandom();\n    m.col(0).fill(0);\n\n    schur.compute(m);\n    T = schur.matrixT();\n    const MatrixType& U = schur.matrixU();\n    processTriangularMatrix<MatrixType>::run(m, T, U);\n    MatrixPower<MatrixType> mpow(m);\n\n    T = T.sqrt();\n    VERIFY(mpow(0.5L).isApprox(U * (TriangularType(T) * U.adjoint()), tol));\n\n    T = T.sqrt();\n    VERIFY(mpow(0.25L).isApprox(U * (TriangularType(T) * U.adjoint()), tol));\n\n    T = T.sqrt();\n    VERIFY(mpow(0.125L).isApprox(U * (TriangularType(T) * U.adjoint()), tol));\n  }\n}\n\ntemplate<typename MatrixType>\nvoid testLogThenExp(const MatrixType& m_const, const typename MatrixType::RealScalar& tol)\n{\n  // we need to pass by reference in order to prevent errors with\n  // MSVC for aligned data types ...\n  MatrixType& m = const_cast<MatrixType&>(m_const);\n\n  typedef typename MatrixType::Scalar Scalar;\n  Scalar x;\n\n  for (int i=0; i < g_repeat; ++i) {\n    generateTestMatrix<MatrixType>::run(m, m.rows());\n    x = internal::random<Scalar>();\n    VERIFY(m.pow(x).isApprox((x * m.log()).exp(), tol));\n  }\n}\n\ntypedef Matrix<double,3,3,RowMajor>         Matrix3dRowMajor;\ntypedef Matrix<long double,3,3>             Matrix3e;\ntypedef Matrix<long double,Dynamic,Dynamic> MatrixXe;\n \nEIGEN_DECLARE_TEST(matrix_power)\n{\n  CALL_SUBTEST_2(test2dRotation<double>(1e-13));\n  CALL_SUBTEST_1(test2dRotation<float>(2e-5f));  // was 1e-5, relaxed for clang 2.8 / linux / x86-64\n  CALL_SUBTEST_9(test2dRotation<long double>(1e-13L));\n  CALL_SUBTEST_2(test2dHyperbolicRotation<double>(1e-14));\n  CALL_SUBTEST_1(test2dHyperbolicRotation<float>(1e-5f));\n  CALL_SUBTEST_9(test2dHyperbolicRotation<long double>(1e-14L));\n\n  CALL_SUBTEST_10(test3dRotation<double>(1e-13));\n  CALL_SUBTEST_11(test3dRotation<float>(1e-5f));\n  CALL_SUBTEST_12(test3dRotation<long double>(1e-13L));\n\n  CALL_SUBTEST_2(testGeneral(Matrix2d(),         1e-13));\n  CALL_SUBTEST_7(testGeneral(Matrix3dRowMajor(), 1e-13));\n  CALL_SUBTEST_3(testGeneral(Matrix4cd(),        1e-13));\n  CALL_SUBTEST_4(testGeneral(MatrixXd(8,8),      2e-12));\n  CALL_SUBTEST_1(testGeneral(Matrix2f(),         1e-4f));\n  CALL_SUBTEST_5(testGeneral(Matrix3cf(),        1e-4f));\n  CALL_SUBTEST_8(testGeneral(Matrix4f(),         1e-4f));\n  CALL_SUBTEST_6(testGeneral(MatrixXf(2,2),      1e-3f)); // see bug 614\n  CALL_SUBTEST_9(testGeneral(MatrixXe(7,7),      1e-13L));\n  CALL_SUBTEST_10(testGeneral(Matrix3d(),        1e-13));\n  CALL_SUBTEST_11(testGeneral(Matrix3f(),        1e-4f));\n  CALL_SUBTEST_12(testGeneral(Matrix3e(),        1e-13L));\n\n  CALL_SUBTEST_2(testSingular(Matrix2d(),         1e-13));\n  CALL_SUBTEST_7(testSingular(Matrix3dRowMajor(), 1e-13));\n  CALL_SUBTEST_3(testSingular(Matrix4cd(),        1e-13));\n  CALL_SUBTEST_4(testSingular(MatrixXd(8,8),      2e-12));\n  CALL_SUBTEST_1(testSingular(Matrix2f(),         1e-4f));\n  CALL_SUBTEST_5(testSingular(Matrix3cf(),        1e-4f));\n  CALL_SUBTEST_8(testSingular(Matrix4f(),         1e-4f));\n  CALL_SUBTEST_6(testSingular(MatrixXf(2,2),      1e-3f));\n  CALL_SUBTEST_9(testSingular(MatrixXe(7,7),      1e-13L));\n  CALL_SUBTEST_10(testSingular(Matrix3d(),        1e-13));\n  CALL_SUBTEST_11(testSingular(Matrix3f(),        1e-4f));\n  CALL_SUBTEST_12(testSingular(Matrix3e(),        1e-13L));\n\n  CALL_SUBTEST_2(testLogThenExp(Matrix2d(),         1e-13));\n  CALL_SUBTEST_7(testLogThenExp(Matrix3dRowMajor(), 1e-13));\n  CALL_SUBTEST_3(testLogThenExp(Matrix4cd(),        1e-13));\n  CALL_SUBTEST_4(testLogThenExp(MatrixXd(8,8),      2e-12));\n  CALL_SUBTEST_1(testLogThenExp(Matrix2f(),         1e-4f));\n  CALL_SUBTEST_5(testLogThenExp(Matrix3cf(),        1e-4f));\n  CALL_SUBTEST_8(testLogThenExp(Matrix4f(),         1e-4f));\n  CALL_SUBTEST_6(testLogThenExp(MatrixXf(2,2),      1e-3f));\n  CALL_SUBTEST_9(testLogThenExp(MatrixXe(7,7),      1e-13L));\n  CALL_SUBTEST_10(testLogThenExp(Matrix3d(),        1e-13));\n  CALL_SUBTEST_11(testLogThenExp(Matrix3f(),        1e-4f));\n  CALL_SUBTEST_12(testLogThenExp(Matrix3e(),        1e-13L));\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/matrix_square_root.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2011 Jitse Niesen <jitse@maths.leeds.ac.uk>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"matrix_functions.h\"\n\ntemplate<typename MatrixType>\nvoid testMatrixSqrt(const MatrixType& m)\n{\n  MatrixType A;\n  generateTestMatrix<MatrixType>::run(A, m.rows());\n  MatrixType sqrtA = A.sqrt();\n  VERIFY_IS_APPROX(sqrtA * sqrtA, A);\n}\n\nEIGEN_DECLARE_TEST(matrix_square_root)\n{\n  for (int i = 0; i < g_repeat; i++) {\n    CALL_SUBTEST_1(testMatrixSqrt(Matrix3cf()));\n    CALL_SUBTEST_2(testMatrixSqrt(MatrixXcd(12,12)));\n    CALL_SUBTEST_3(testMatrixSqrt(Matrix4f()));\n    CALL_SUBTEST_4(testMatrixSqrt(Matrix<double,Dynamic,Dynamic,RowMajor>(9, 9)));\n    CALL_SUBTEST_5(testMatrixSqrt(Matrix<float,1,1>()));\n    CALL_SUBTEST_5(testMatrixSqrt(Matrix<std::complex<float>,1,1>()));\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/minres.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Giacomo Po <gpo@ucla.edu>\n// Copyright (C) 2011 Gael Guennebaud <g.gael@free.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n#include <cmath>\n\n#include \"../../test/sparse_solver.h\"\n#include <Eigen/IterativeSolvers>\n\ntemplate<typename T> void test_minres_T()\n{\n  // Identity preconditioner\n  MINRES<SparseMatrix<T>, Lower, IdentityPreconditioner    > minres_colmajor_lower_I;\n  MINRES<SparseMatrix<T>, Upper, IdentityPreconditioner    > minres_colmajor_upper_I;\n\n  // Diagonal preconditioner\n  MINRES<SparseMatrix<T>, Lower, DiagonalPreconditioner<T> > minres_colmajor_lower_diag;\n  MINRES<SparseMatrix<T>, Upper, DiagonalPreconditioner<T> > minres_colmajor_upper_diag;\n  MINRES<SparseMatrix<T>, Lower|Upper, DiagonalPreconditioner<T> > minres_colmajor_uplo_diag;\n  \n  // call tests for SPD matrix\n  CALL_SUBTEST( check_sparse_spd_solving(minres_colmajor_lower_I) );\n  CALL_SUBTEST( check_sparse_spd_solving(minres_colmajor_upper_I) );\n    \n  CALL_SUBTEST( check_sparse_spd_solving(minres_colmajor_lower_diag)  );\n  CALL_SUBTEST( check_sparse_spd_solving(minres_colmajor_upper_diag)  );\n  CALL_SUBTEST( check_sparse_spd_solving(minres_colmajor_uplo_diag)  );\n    \n  // TO DO: symmetric semi-definite matrix\n  // TO DO: symmetric indefinite matrix\n\n}\n\nEIGEN_DECLARE_TEST(minres)\n{\n  CALL_SUBTEST_1(test_minres_T<double>());\n//  CALL_SUBTEST_2(test_minres_T<std::compex<double> >());\n\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/mpreal/mpreal.h",
    "content": "/*\n    MPFR C++: Multi-precision floating point number class for C++. \n    Based on MPFR library:    http://mpfr.org\n\n    Project homepage:    http://www.holoborodko.com/pavel/mpfr\n    Contact e-mail:      pavel@holoborodko.com\n\n    Copyright (c) 2008-2016 Pavel Holoborodko\n\n    Contributors:\n    Dmitriy Gubanov, Konstantin Holoborodko, Brian Gladman, \n    Helmut Jarausch, Fokko Beekhof, Ulrich Mutze, Heinz van Saanen, \n    Pere Constans, Peter van Hoof, Gael Guennebaud, Tsai Chia Cheng, \n    Alexei Zubanov, Jauhien Piatlicki, Victor Berger, John Westwood,\n    Petr Aleksandrov, Orion Poplawski, Charles Karney, Arash Partow,\n    Rodney James, Jorge Leitao, Jerome Benoit.\n\n    Licensing:\n    (A) MPFR C++ is under GNU General Public License (\"GPL\").\n    \n    (B) Non-free licenses may also be purchased from the author, for users who \n        do not want their programs protected by the GPL.\n\n        The non-free licenses are for users that wish to use MPFR C++ in \n        their products but are unwilling to release their software \n        under the GPL (which would require them to release source code \n        and allow free redistribution).\n\n        Such users can purchase an unlimited-use license from the author.\n        Contact us for more details.\n    \n    GNU General Public License (\"GPL\") copyright permissions statement:\n    **************************************************************************\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <http://www.gnu.org/licenses/>.\n*/\n\n#ifndef __MPREAL_H__\n#define __MPREAL_H__\n\n#include <string>\n#include <iostream>\n#include <sstream>\n#include <stdexcept>\n#include <cfloat>\n#include <cmath>\n#include <cstring>\n#include <limits>\n#include <complex>\n#include <algorithm>\n#include <stdint.h>\n\n// Options\n#define MPREAL_HAVE_MSVC_DEBUGVIEW              // Enable Debugger Visualizer for \"Debug\" builds in MSVC.\n#define MPREAL_HAVE_DYNAMIC_STD_NUMERIC_LIMITS  // Enable extended std::numeric_limits<mpfr::mpreal> specialization.\n                                                // Meaning that \"digits\", \"round_style\" and similar members are defined as functions, not constants.\n                                                // See std::numeric_limits<mpfr::mpreal> at the end of the file for more information.\n\n// Library version\n#define MPREAL_VERSION_MAJOR 3\n#define MPREAL_VERSION_MINOR 6\n#define MPREAL_VERSION_PATCHLEVEL 5\n#define MPREAL_VERSION_STRING \"3.6.5\"\n\n// Detect compiler using signatures from http://predef.sourceforge.net/\n#if defined(__GNUC__) && defined(__INTEL_COMPILER)\n    #define IsInf(x) isinf EIGEN_NOT_A_MACRO (x)                   // Intel ICC compiler on Linux \n\n#elif defined(_MSC_VER)                         // Microsoft Visual C++ \n    #define IsInf(x) (!_finite(x))                           \n\n#else\n    #define IsInf(x) std::isinf EIGEN_NOT_A_MACRO  (x)              // GNU C/C++ (and/or other compilers), just hope for C99 conformance\n#endif\n\n// A Clang feature extension to determine compiler features.\n#ifndef __has_feature\n    #define __has_feature(x) 0\n#endif\n\n// Detect support for r-value references (move semantic).\n// Move semantic should be enabled with great care in multi-threading environments,\n// especially if MPFR uses custom memory allocators.\n// Everything should be thread-safe and support passing ownership over thread boundary.\n#if (__has_feature(cxx_rvalue_references) || \\\n       defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L || \\\n      (defined(_MSC_VER) && _MSC_VER >= 1600) && !defined(MPREAL_DISABLE_MOVE_SEMANTIC))\n\n    #define MPREAL_HAVE_MOVE_SUPPORT\n\n    // Use fields in mpfr_t structure to check if it was initialized / set dummy initialization \n    #define mpfr_is_initialized(x)      (0 != (x)->_mpfr_d)\n    #define mpfr_set_uninitialized(x)   ((x)->_mpfr_d = 0 )\n#endif\n\n// Detect support for explicit converters. \n#if (__has_feature(cxx_explicit_conversions) || \\\n       (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GNUC_MINOR__ >= 5) || __cplusplus >= 201103L || \\\n       (defined(_MSC_VER) && _MSC_VER >= 1800) || \\\n       (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1300))\n\n    #define MPREAL_HAVE_EXPLICIT_CONVERTERS\n#endif\n\n#define MPFR_USE_INTMAX_T   // Enable 64-bit integer types - should be defined before mpfr.h\n\n#if defined(MPREAL_HAVE_MSVC_DEBUGVIEW) && defined(_MSC_VER) && defined(_DEBUG)\n    #define MPREAL_MSVC_DEBUGVIEW_CODE     DebugView = toString();\n    #define MPREAL_MSVC_DEBUGVIEW_DATA     std::string DebugView;\n#else\n    #define MPREAL_MSVC_DEBUGVIEW_CODE \n    #define MPREAL_MSVC_DEBUGVIEW_DATA \n#endif\n\n#include <mpfr.h>\n\n#if (MPFR_VERSION < MPFR_VERSION_NUM(3,0,0))\n    #include <cstdlib>                          // Needed for random()\n#endif\n\n// Less important options\n#define MPREAL_DOUBLE_BITS_OVERFLOW -1          // Triggers overflow exception during conversion to double if mpreal \n                                                // cannot fit in MPREAL_DOUBLE_BITS_OVERFLOW bits\n                                                // = -1 disables overflow checks (default)\n\n// Fast replacement for mpfr_set_zero(x, +1):\n// (a) uses low-level data members, might not be forward compatible\n// (b) sign is not set, add (x)->_mpfr_sign = 1;\n#define mpfr_set_zero_fast(x)  ((x)->_mpfr_exp = __MPFR_EXP_ZERO)\n\n#if defined(__GNUC__)\n  #define MPREAL_PERMISSIVE_EXPR __extension__\n#else\n  #define MPREAL_PERMISSIVE_EXPR\n#endif\n\nnamespace mpfr {\n\nclass mpreal {\nprivate:\n    mpfr_t mp;\n    \npublic:\n    \n    // Get default rounding mode & precision\n    inline static mp_rnd_t   get_default_rnd()    {    return (mp_rnd_t)(mpfr_get_default_rounding_mode());       }\n    inline static mp_prec_t  get_default_prec()   {    return (mpfr_get_default_prec)();                          }\n\n    // Constructors && type conversions\n    mpreal();\n    mpreal(const mpreal& u);\n    mpreal(const mpf_t u);    \n    mpreal(const mpz_t u,                  mp_prec_t prec = mpreal::get_default_prec(), mp_rnd_t mode = mpreal::get_default_rnd());    \n    mpreal(const mpq_t u,                  mp_prec_t prec = mpreal::get_default_prec(), mp_rnd_t mode = mpreal::get_default_rnd());    \n    mpreal(const double u,                 mp_prec_t prec = mpreal::get_default_prec(), mp_rnd_t mode = mpreal::get_default_rnd());\n    mpreal(const long double u,            mp_prec_t prec = mpreal::get_default_prec(), mp_rnd_t mode = mpreal::get_default_rnd());\n    mpreal(const unsigned long long int u, mp_prec_t prec = mpreal::get_default_prec(), mp_rnd_t mode = mpreal::get_default_rnd());\n    mpreal(const long long int u,          mp_prec_t prec = mpreal::get_default_prec(), mp_rnd_t mode = mpreal::get_default_rnd());\n    mpreal(const unsigned long int u,      mp_prec_t prec = mpreal::get_default_prec(), mp_rnd_t mode = mpreal::get_default_rnd());\n    mpreal(const unsigned int u,           mp_prec_t prec = mpreal::get_default_prec(), mp_rnd_t mode = mpreal::get_default_rnd());\n    mpreal(const long int u,               mp_prec_t prec = mpreal::get_default_prec(), mp_rnd_t mode = mpreal::get_default_rnd());\n    mpreal(const int u,                    mp_prec_t prec = mpreal::get_default_prec(), mp_rnd_t mode = mpreal::get_default_rnd());\n    \n    // Construct mpreal from mpfr_t structure.\n    // shared = true allows to avoid deep copy, so that mpreal and 'u' share the same data & pointers.    \n    mpreal(const mpfr_t  u, bool shared = false);   \n\n    mpreal(const char* s,             mp_prec_t prec = mpreal::get_default_prec(), int base = 10, mp_rnd_t mode = mpreal::get_default_rnd());\n    mpreal(const std::string& s,      mp_prec_t prec = mpreal::get_default_prec(), int base = 10, mp_rnd_t mode = mpreal::get_default_rnd());\n\n    ~mpreal();                           \n\n#ifdef MPREAL_HAVE_MOVE_SUPPORT\n    mpreal& operator=(mpreal&& v);\n    mpreal(mpreal&& u);\n#endif\n\n    // Operations\n    // =\n    // +, -, *, /, ++, --, <<, >> \n    // *=, +=, -=, /=,\n    // <, >, ==, <=, >=\n\n    // =\n    mpreal& operator=(const mpreal& v);\n    mpreal& operator=(const mpf_t v);\n    mpreal& operator=(const mpz_t v);\n    mpreal& operator=(const mpq_t v);\n    mpreal& operator=(const long double v);\n    mpreal& operator=(const double v);        \n    mpreal& operator=(const unsigned long int v);\n    mpreal& operator=(const unsigned long long int v);\n    mpreal& operator=(const long long int v);\n    mpreal& operator=(const unsigned int v);\n    mpreal& operator=(const long int v);\n    mpreal& operator=(const int v);\n    mpreal& operator=(const char* s);\n    mpreal& operator=(const std::string& s);\n    template <typename real_t> mpreal& operator= (const std::complex<real_t>& z);\n\n    // +\n    mpreal& operator+=(const mpreal& v);\n    mpreal& operator+=(const mpf_t v);\n    mpreal& operator+=(const mpz_t v);\n    mpreal& operator+=(const mpq_t v);\n    mpreal& operator+=(const long double u);\n    mpreal& operator+=(const double u);\n    mpreal& operator+=(const unsigned long int u);\n    mpreal& operator+=(const unsigned int u);\n    mpreal& operator+=(const long int u);\n    mpreal& operator+=(const int u);\n\n    mpreal& operator+=(const long long int  u);\n    mpreal& operator+=(const unsigned long long int u);\n    mpreal& operator-=(const long long int  u);\n    mpreal& operator-=(const unsigned long long int u);\n    mpreal& operator*=(const long long int  u);\n    mpreal& operator*=(const unsigned long long int u);\n    mpreal& operator/=(const long long int  u);\n    mpreal& operator/=(const unsigned long long int u);\n\n    const mpreal operator+() const;\n    mpreal& operator++ ();\n    const mpreal  operator++ (int); \n\n    // -\n    mpreal& operator-=(const mpreal& v);\n    mpreal& operator-=(const mpz_t v);\n    mpreal& operator-=(const mpq_t v);\n    mpreal& operator-=(const long double u);\n    mpreal& operator-=(const double u);\n    mpreal& operator-=(const unsigned long int u);\n    mpreal& operator-=(const unsigned int u);\n    mpreal& operator-=(const long int u);\n    mpreal& operator-=(const int u);\n    const mpreal operator-() const;\n    friend const mpreal operator-(const unsigned long int b, const mpreal& a);\n    friend const mpreal operator-(const unsigned int b,      const mpreal& a);\n    friend const mpreal operator-(const long int b,          const mpreal& a);\n    friend const mpreal operator-(const int b,               const mpreal& a);\n    friend const mpreal operator-(const double b,            const mpreal& a);\n    mpreal& operator-- ();    \n    const mpreal  operator-- (int);\n\n    // *\n    mpreal& operator*=(const mpreal& v);\n    mpreal& operator*=(const mpz_t v);\n    mpreal& operator*=(const mpq_t v);\n    mpreal& operator*=(const long double v);\n    mpreal& operator*=(const double v);\n    mpreal& operator*=(const unsigned long int v);\n    mpreal& operator*=(const unsigned int v);\n    mpreal& operator*=(const long int v);\n    mpreal& operator*=(const int v);\n    \n    // /\n    mpreal& operator/=(const mpreal& v);\n    mpreal& operator/=(const mpz_t v);\n    mpreal& operator/=(const mpq_t v);\n    mpreal& operator/=(const long double v);\n    mpreal& operator/=(const double v);\n    mpreal& operator/=(const unsigned long int v);\n    mpreal& operator/=(const unsigned int v);\n    mpreal& operator/=(const long int v);\n    mpreal& operator/=(const int v);\n    friend const mpreal operator/(const unsigned long int b, const mpreal& a);\n    friend const mpreal operator/(const unsigned int b,      const mpreal& a);\n    friend const mpreal operator/(const long int b,          const mpreal& a);\n    friend const mpreal operator/(const int b,               const mpreal& a);\n    friend const mpreal operator/(const double b,            const mpreal& a);\n\n    //<<= Fast Multiplication by 2^u\n    mpreal& operator<<=(const unsigned long int u);\n    mpreal& operator<<=(const unsigned int u);\n    mpreal& operator<<=(const long int u);\n    mpreal& operator<<=(const int u);\n\n    //>>= Fast Division by 2^u\n    mpreal& operator>>=(const unsigned long int u);\n    mpreal& operator>>=(const unsigned int u);\n    mpreal& operator>>=(const long int u);\n    mpreal& operator>>=(const int u);\n\n    // Type Conversion operators\n    bool               toBool      (                        )    const;\n    long               toLong      (mp_rnd_t mode = GMP_RNDZ)    const;\n    unsigned long      toULong     (mp_rnd_t mode = GMP_RNDZ)    const;\n    long long          toLLong     (mp_rnd_t mode = GMP_RNDZ)    const;\n    unsigned long long toULLong    (mp_rnd_t mode = GMP_RNDZ)    const;\n    float              toFloat     (mp_rnd_t mode = GMP_RNDN)    const;\n    double             toDouble    (mp_rnd_t mode = GMP_RNDN)    const;\n    long double        toLDouble   (mp_rnd_t mode = GMP_RNDN)    const;\n\n#if defined (MPREAL_HAVE_EXPLICIT_CONVERTERS)\n    explicit operator bool               () const { return toBool();                 }\n    explicit operator int                () const { return int(toLong());            }\n    explicit operator long               () const { return toLong();                 }\n    explicit operator long long          () const { return toLLong();                }\n    explicit operator unsigned           () const { return unsigned(toULong());      }\n    explicit operator unsigned long      () const { return toULong();                }\n    explicit operator unsigned long long () const { return toULLong();               }\n    explicit operator float              () const { return toFloat();                }\n    explicit operator double             () const { return toDouble();               }\n    explicit operator long double        () const { return toLDouble();              }\n#endif\n\n    // Get raw pointers so that mpreal can be directly used in raw mpfr_* functions\n    ::mpfr_ptr    mpfr_ptr();\n    ::mpfr_srcptr mpfr_ptr()    const;\n    ::mpfr_srcptr mpfr_srcptr() const;\n\n    // Convert mpreal to string with n significant digits in base b\n    // n = -1 -> convert with the maximum available digits\n    std::string toString(int n = -1, int b = 10, mp_rnd_t mode = mpreal::get_default_rnd()) const;\n\n#if (MPFR_VERSION >= MPFR_VERSION_NUM(2,4,0))\n    std::string toString(const std::string& format) const;\n#endif\n\n    std::ostream& output(std::ostream& os) const;\n\n    // Math Functions\n    friend const mpreal sqr (const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal sqrt(const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal sqrt(const unsigned long int v, mp_rnd_t rnd_mode);\n    friend const mpreal cbrt(const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal root(const mpreal& v, unsigned long int k, mp_rnd_t rnd_mode);\n    friend const mpreal pow (const mpreal& a, const mpreal& b, mp_rnd_t rnd_mode);\n    friend const mpreal pow (const mpreal& a, const mpz_t b, mp_rnd_t rnd_mode);\n    friend const mpreal pow (const mpreal& a, const unsigned long int b, mp_rnd_t rnd_mode);\n    friend const mpreal pow (const mpreal& a, const long int b, mp_rnd_t rnd_mode);\n    friend const mpreal pow (const unsigned long int a, const mpreal& b, mp_rnd_t rnd_mode);\n    friend const mpreal pow (const unsigned long int a, const unsigned long int b, mp_rnd_t rnd_mode);\n    friend const mpreal fabs(const mpreal& v, mp_rnd_t rnd_mode);\n\n    friend const mpreal abs(const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal dim(const mpreal& a, const mpreal& b, mp_rnd_t rnd_mode);\n    friend inline const mpreal mul_2ui(const mpreal& v, unsigned long int k, mp_rnd_t rnd_mode);\n    friend inline const mpreal mul_2si(const mpreal& v, long int k, mp_rnd_t rnd_mode);\n    friend inline const mpreal div_2ui(const mpreal& v, unsigned long int k, mp_rnd_t rnd_mode);\n    friend inline const mpreal div_2si(const mpreal& v, long int k, mp_rnd_t rnd_mode);\n    friend int cmpabs(const mpreal& a,const mpreal& b);\n    \n    friend const mpreal log  (const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal log2 (const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal logb (const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal log10(const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal exp  (const mpreal& v, mp_rnd_t rnd_mode); \n    friend const mpreal exp2 (const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal exp10(const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal log1p(const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal expm1(const mpreal& v, mp_rnd_t rnd_mode);\n\n    friend const mpreal nextpow2(const mpreal& v, mp_rnd_t rnd_mode);\n\n    friend const mpreal cos(const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal sin(const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal tan(const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal sec(const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal csc(const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal cot(const mpreal& v, mp_rnd_t rnd_mode);\n    friend int sin_cos(mpreal& s, mpreal& c, const mpreal& v, mp_rnd_t rnd_mode);\n\n    friend const mpreal acos  (const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal asin  (const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal atan  (const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal atan2 (const mpreal& y, const mpreal& x, mp_rnd_t rnd_mode);\n    friend const mpreal acot  (const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal asec  (const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal acsc  (const mpreal& v, mp_rnd_t rnd_mode);\n\n    friend const mpreal cosh  (const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal sinh  (const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal tanh  (const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal sech  (const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal csch  (const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal coth  (const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal acosh (const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal asinh (const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal atanh (const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal acoth (const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal asech (const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal acsch (const mpreal& v, mp_rnd_t rnd_mode);\n\n    friend const mpreal hypot (const mpreal& x, const mpreal& y, mp_rnd_t rnd_mode);\n\n    friend const mpreal fac_ui (unsigned long int v,  mp_prec_t prec, mp_rnd_t rnd_mode);\n    friend const mpreal eint   (const mpreal& v, mp_rnd_t rnd_mode);\n\n    friend const mpreal gamma    (const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal tgamma   (const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal lngamma  (const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal lgamma   (const mpreal& v, int *signp, mp_rnd_t rnd_mode);\n    friend const mpreal zeta     (const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal erf      (const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal erfc     (const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal besselj0 (const mpreal& v, mp_rnd_t rnd_mode); \n    friend const mpreal besselj1 (const mpreal& v, mp_rnd_t rnd_mode); \n    friend const mpreal besseljn (long n, const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal bessely0 (const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal bessely1 (const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal besselyn (long n, const mpreal& v, mp_rnd_t rnd_mode); \n    friend const mpreal fma      (const mpreal& v1, const mpreal& v2, const mpreal& v3, mp_rnd_t rnd_mode);\n    friend const mpreal fms      (const mpreal& v1, const mpreal& v2, const mpreal& v3, mp_rnd_t rnd_mode);\n    friend const mpreal agm      (const mpreal& v1, const mpreal& v2, mp_rnd_t rnd_mode);\n    friend const mpreal sum      (const mpreal tab[], const unsigned long int n, int& status, mp_rnd_t rnd_mode);\n    friend int          sgn      (const mpreal& v);\n\n// MPFR 2.4.0 Specifics\n#if (MPFR_VERSION >= MPFR_VERSION_NUM(2,4,0))\n    friend int          sinh_cosh   (mpreal& s, mpreal& c, const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal li2         (const mpreal& v,                       mp_rnd_t rnd_mode);\n    friend const mpreal fmod        (const mpreal& x, const mpreal& y,      mp_rnd_t rnd_mode);\n    friend const mpreal rec_sqrt    (const mpreal& v,                       mp_rnd_t rnd_mode);\n\n    // MATLAB's semantic equivalents\n    friend const mpreal rem (const mpreal& x, const mpreal& y, mp_rnd_t rnd_mode); // Remainder after division\n    friend const mpreal mod (const mpreal& x, const mpreal& y, mp_rnd_t rnd_mode); // Modulus after division\n#endif\n\n#if (MPFR_VERSION >= MPFR_VERSION_NUM(3,0,0))\n    friend const mpreal digamma (const mpreal& v,        mp_rnd_t rnd_mode);\n    friend const mpreal ai      (const mpreal& v,        mp_rnd_t rnd_mode);\n    friend const mpreal urandom (gmp_randstate_t& state, mp_rnd_t rnd_mode);     // use gmp_randinit_default() to init state, gmp_randclear() to clear\n#endif\n\n#if (MPFR_VERSION >= MPFR_VERSION_NUM(3,1,0))\n    friend const mpreal grandom (gmp_randstate_t& state, mp_rnd_t rnd_mode);     // use gmp_randinit_default() to init state, gmp_randclear() to clear\n    friend const mpreal grandom (unsigned int seed);\n#endif\n\n    // Uniformly distributed random number generation in [0,1] using\n    // Mersenne-Twister algorithm by default.\n    // Use parameter to setup seed, e.g.: random((unsigned)time(NULL))\n    // Check urandom() for more precise control.\n    friend const mpreal random(unsigned int seed);\n\n    // Splits mpreal value into fractional and integer parts.\n    // Returns fractional part and stores integer part in n.\n    friend const mpreal modf(const mpreal& v, mpreal& n);    \n\n    // Constants\n    // don't forget to call mpfr_free_cache() for every thread where you are using const-functions\n    friend const mpreal const_log2      (mp_prec_t prec, mp_rnd_t rnd_mode);\n    friend const mpreal const_pi        (mp_prec_t prec, mp_rnd_t rnd_mode);\n    friend const mpreal const_euler     (mp_prec_t prec, mp_rnd_t rnd_mode);\n    friend const mpreal const_catalan   (mp_prec_t prec, mp_rnd_t rnd_mode);\n\n    // returns +inf iff sign>=0 otherwise -inf\n    friend const mpreal const_infinity(int sign, mp_prec_t prec);\n\n    // Output/ Input\n    friend std::ostream& operator<<(std::ostream& os, const mpreal& v);\n    friend std::istream& operator>>(std::istream& is, mpreal& v);\n\n    // Integer Related Functions\n    friend const mpreal rint (const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal ceil (const mpreal& v);\n    friend const mpreal floor(const mpreal& v);\n    friend const mpreal round(const mpreal& v);\n    friend const mpreal trunc(const mpreal& v);\n    friend const mpreal rint_ceil   (const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal rint_floor  (const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal rint_round  (const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal rint_trunc  (const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal frac        (const mpreal& v, mp_rnd_t rnd_mode);\n    friend const mpreal remainder   (         const mpreal& x, const mpreal& y, mp_rnd_t rnd_mode);\n    friend const mpreal remquo      (long* q, const mpreal& x, const mpreal& y, mp_rnd_t rnd_mode);\n    \n    // Miscellaneous Functions\n    friend const mpreal nexttoward (const mpreal& x, const mpreal& y);\n    friend const mpreal nextabove  (const mpreal& x);\n    friend const mpreal nextbelow  (const mpreal& x);\n\n    // use gmp_randinit_default() to init state, gmp_randclear() to clear\n    friend const mpreal urandomb (gmp_randstate_t& state); \n\n// MPFR < 2.4.2 Specifics\n#if (MPFR_VERSION <= MPFR_VERSION_NUM(2,4,2))\n    friend const mpreal random2 (mp_size_t size, mp_exp_t exp);\n#endif\n\n    // Instance Checkers\n    friend bool isnan EIGEN_NOT_A_MACRO     (const mpreal& v);\n    friend bool (isinf)    (const mpreal& v);\n    friend bool (isfinite) (const mpreal& v);\n\n    friend bool isnum    (const mpreal& v);\n    friend bool iszero   (const mpreal& v);\n    friend bool isint    (const mpreal& v);\n\n#if (MPFR_VERSION >= MPFR_VERSION_NUM(3,0,0))\n    friend bool isregular(const mpreal& v);\n#endif\n\n    // Set/Get instance properties\n    inline mp_prec_t    get_prec() const;\n    inline void         set_prec(mp_prec_t prec, mp_rnd_t rnd_mode = get_default_rnd());    // Change precision with rounding mode\n\n    // Aliases for get_prec(), set_prec() - needed for compatibility with std::complex<mpreal> interface\n    inline mpreal&      setPrecision(int Precision, mp_rnd_t RoundingMode = get_default_rnd());\n    inline int          getPrecision() const;\n    \n    // Set mpreal to +/- inf, NaN, +/-0\n    mpreal&        setInf  (int Sign = +1);    \n    mpreal&        setNan  ();\n    mpreal&        setZero (int Sign = +1);\n    mpreal&        setSign (int Sign, mp_rnd_t RoundingMode = get_default_rnd());\n\n    //Exponent\n    mp_exp_t get_exp() const;\n    int set_exp(mp_exp_t e);\n    int check_range  (int t, mp_rnd_t rnd_mode = get_default_rnd());\n    int subnormalize (int t, mp_rnd_t rnd_mode = get_default_rnd());\n\n    // Inexact conversion from float\n    inline bool fits_in_bits(double x, int n);\n\n    // Set/Get global properties\n    static void            set_default_prec(mp_prec_t prec);\n    static void            set_default_rnd(mp_rnd_t rnd_mode);\n\n    static mp_exp_t  get_emin (void);\n    static mp_exp_t  get_emax (void);\n    static mp_exp_t  get_emin_min (void);\n    static mp_exp_t  get_emin_max (void);\n    static mp_exp_t  get_emax_min (void);\n    static mp_exp_t  get_emax_max (void);\n    static int       set_emin (mp_exp_t exp);\n    static int       set_emax (mp_exp_t exp);\n\n    // Efficient swapping of two mpreal values - needed for std algorithms\n    friend void swap(mpreal& x, mpreal& y);\n    \n    friend const mpreal fmax(const mpreal& x, const mpreal& y, mp_rnd_t rnd_mode);\n    friend const mpreal fmin(const mpreal& x, const mpreal& y, mp_rnd_t rnd_mode);\n\nprivate:\n    // Human friendly Debug Preview in Visual Studio.\n    // Put one of these lines:\n    //\n    // mpfr::mpreal=<DebugView>                              ; Show value only\n    // mpfr::mpreal=<DebugView>, <mp[0]._mpfr_prec,u>bits    ; Show value & precision\n    // \n    // at the beginning of\n    // [Visual Studio Installation Folder]\\Common7\\Packages\\Debugger\\autoexp.dat\n    MPREAL_MSVC_DEBUGVIEW_DATA\n\n    // \"Smart\" resources deallocation. Checks if instance initialized before deletion.\n    void clear(::mpfr_ptr);\n};\n\n//////////////////////////////////////////////////////////////////////////\n// Exceptions\nclass conversion_overflow : public std::exception {\npublic:\n    std::string why() { return \"inexact conversion from floating point\"; }\n};\n\n//////////////////////////////////////////////////////////////////////////\n// Constructors & converters\n// Default constructor: creates mp number and initializes it to 0.\ninline mpreal::mpreal() \n{ \n    mpfr_init2(mpfr_ptr(), mpreal::get_default_prec()); \n    mpfr_set_zero_fast(mpfr_ptr());\n\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n}\n\ninline mpreal::mpreal(const mpreal& u) \n{\n    mpfr_init2(mpfr_ptr(),mpfr_get_prec(u.mpfr_srcptr()));\n    mpfr_set  (mpfr_ptr(),u.mpfr_srcptr(),mpreal::get_default_rnd());\n\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n}\n\n#ifdef MPREAL_HAVE_MOVE_SUPPORT\ninline mpreal::mpreal(mpreal&& other)\n{\n    mpfr_set_uninitialized(mpfr_ptr());      // make sure \"other\" holds null-pointer (in uninitialized state)\n    mpfr_swap(mpfr_ptr(), other.mpfr_ptr());\n\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n}\n\ninline mpreal& mpreal::operator=(mpreal&& other)\n{\n    if (this != &other)\n    {\n        mpfr_swap(mpfr_ptr(), other.mpfr_ptr()); // destructor for \"other\" will be called just afterwards\n        MPREAL_MSVC_DEBUGVIEW_CODE;\n    }\n    return *this;\n}\n#endif\n\ninline mpreal::mpreal(const mpfr_t  u, bool shared)\n{\n    if(shared)\n    {\n        std::memcpy(mpfr_ptr(), u, sizeof(mpfr_t));\n    }\n    else\n    {\n        mpfr_init2(mpfr_ptr(), mpfr_get_prec(u));\n        mpfr_set  (mpfr_ptr(), u, mpreal::get_default_rnd());\n    }\n\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n}\n\ninline mpreal::mpreal(const mpf_t u)\n{\n    mpfr_init2(mpfr_ptr(),(mp_prec_t) mpf_get_prec(u)); // (gmp: mp_bitcnt_t) unsigned long -> long (mpfr: mp_prec_t)\n    mpfr_set_f(mpfr_ptr(),u,mpreal::get_default_rnd());\n\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n}\n\ninline mpreal::mpreal(const mpz_t u, mp_prec_t prec, mp_rnd_t mode)\n{\n    mpfr_init2(mpfr_ptr(), prec);\n    mpfr_set_z(mpfr_ptr(), u, mode);\n\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n}\n\ninline mpreal::mpreal(const mpq_t u, mp_prec_t prec, mp_rnd_t mode)\n{\n    mpfr_init2(mpfr_ptr(), prec);\n    mpfr_set_q(mpfr_ptr(), u, mode);\n\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n}\n\ninline mpreal::mpreal(const double u, mp_prec_t prec, mp_rnd_t mode)\n{\n     mpfr_init2(mpfr_ptr(), prec);\n\n#if (MPREAL_DOUBLE_BITS_OVERFLOW > -1)\n\tif(fits_in_bits(u, MPREAL_DOUBLE_BITS_OVERFLOW))\n\t{\n\t\tmpfr_set_d(mpfr_ptr(), u, mode);\n\t}else\n\t\tthrow conversion_overflow();\n#else\n\tmpfr_set_d(mpfr_ptr(), u, mode);\n#endif\n\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n}\n\ninline mpreal::mpreal(const long double u, mp_prec_t prec, mp_rnd_t mode)\n{ \n    mpfr_init2 (mpfr_ptr(), prec);\n    mpfr_set_ld(mpfr_ptr(), u, mode);\n\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n}\n\ninline mpreal::mpreal(const unsigned long long int u, mp_prec_t prec, mp_rnd_t mode)\n{ \n    mpfr_init2 (mpfr_ptr(), prec);\n    mpfr_set_uj(mpfr_ptr(), u, mode);\n\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n}\n\ninline mpreal::mpreal(const long long int u, mp_prec_t prec, mp_rnd_t mode)\n{ \n    mpfr_init2 (mpfr_ptr(), prec);\n    mpfr_set_sj(mpfr_ptr(), u, mode);\n\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n}\n\ninline mpreal::mpreal(const unsigned long int u, mp_prec_t prec, mp_rnd_t mode)\n{ \n    mpfr_init2 (mpfr_ptr(), prec);\n    mpfr_set_ui(mpfr_ptr(), u, mode);\n\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n}\n\ninline mpreal::mpreal(const unsigned int u, mp_prec_t prec, mp_rnd_t mode)\n{ \n    mpfr_init2 (mpfr_ptr(), prec);\n    mpfr_set_ui(mpfr_ptr(), u, mode);\n\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n}\n\ninline mpreal::mpreal(const long int u, mp_prec_t prec, mp_rnd_t mode)\n{ \n    mpfr_init2 (mpfr_ptr(), prec);\n    mpfr_set_si(mpfr_ptr(), u, mode);\n\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n}\n\ninline mpreal::mpreal(const int u, mp_prec_t prec, mp_rnd_t mode)\n{ \n    mpfr_init2 (mpfr_ptr(), prec);\n    mpfr_set_si(mpfr_ptr(), u, mode);\n\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n}\n\ninline mpreal::mpreal(const char* s, mp_prec_t prec, int base, mp_rnd_t mode)\n{\n    mpfr_init2  (mpfr_ptr(), prec);\n    mpfr_set_str(mpfr_ptr(), s, base, mode); \n\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n}\n\ninline mpreal::mpreal(const std::string& s, mp_prec_t prec, int base, mp_rnd_t mode)\n{\n    mpfr_init2  (mpfr_ptr(), prec);\n    mpfr_set_str(mpfr_ptr(), s.c_str(), base, mode); \n\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n}\n\ninline void mpreal::clear(::mpfr_ptr x)\n{\n#ifdef MPREAL_HAVE_MOVE_SUPPORT\n    if(mpfr_is_initialized(x)) \n#endif\n    mpfr_clear(x);\n}\n\ninline mpreal::~mpreal() \n{ \n    clear(mpfr_ptr());\n}                           \n\n// internal namespace needed for template magic\nnamespace internal{\n\n    // Use SFINAE to restrict arithmetic operations instantiation only for numeric types\n    // This is needed for smooth integration with libraries based on expression templates, like Eigen.\n    // TODO: Do the same for boolean operators.\n    template <typename ArgumentType> struct result_type {};    \n    \n    template <> struct result_type<mpreal>              {typedef mpreal type;};    \n    template <> struct result_type<mpz_t>               {typedef mpreal type;};    \n    template <> struct result_type<mpq_t>               {typedef mpreal type;};    \n    template <> struct result_type<long double>         {typedef mpreal type;};    \n    template <> struct result_type<double>              {typedef mpreal type;};    \n    template <> struct result_type<unsigned long int>   {typedef mpreal type;};    \n    template <> struct result_type<unsigned int>        {typedef mpreal type;};    \n    template <> struct result_type<long int>            {typedef mpreal type;};    \n    template <> struct result_type<int>                 {typedef mpreal type;};    \n    template <> struct result_type<long long>           {typedef mpreal type;};    \n    template <> struct result_type<unsigned long long>  {typedef mpreal type;};    \n}\n\n// + Addition\ntemplate <typename Rhs> \ninline const typename internal::result_type<Rhs>::type \n    operator+(const mpreal& lhs, const Rhs& rhs){ return mpreal(lhs) += rhs;    }\n\ntemplate <typename Lhs> \ninline const typename internal::result_type<Lhs>::type \n    operator+(const Lhs& lhs, const mpreal& rhs){ return mpreal(rhs) += lhs;    } \n\n// - Subtraction\ntemplate <typename Rhs> \ninline const typename internal::result_type<Rhs>::type \n    operator-(const mpreal& lhs, const Rhs& rhs){ return mpreal(lhs) -= rhs;    }\n\ntemplate <typename Lhs> \ninline const typename internal::result_type<Lhs>::type \n    operator-(const Lhs& lhs, const mpreal& rhs){ return mpreal(lhs) -= rhs;    }\n\n// * Multiplication\ntemplate <typename Rhs> \ninline const typename internal::result_type<Rhs>::type \n    operator*(const mpreal& lhs, const Rhs& rhs){ return mpreal(lhs) *= rhs;    }\n\ntemplate <typename Lhs> \ninline const typename internal::result_type<Lhs>::type \n    operator*(const Lhs& lhs, const mpreal& rhs){ return mpreal(rhs) *= lhs;    } \n\n// / Division\ntemplate <typename Rhs> \ninline const typename internal::result_type<Rhs>::type \n    operator/(const mpreal& lhs, const Rhs& rhs){ return mpreal(lhs) /= rhs;    }\n\ntemplate <typename Lhs> \ninline const typename internal::result_type<Lhs>::type \n    operator/(const Lhs& lhs, const mpreal& rhs){ return mpreal(lhs) /= rhs;    }\n\n//////////////////////////////////////////////////////////////////////////\n// sqrt\nconst mpreal sqrt(const unsigned int v, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\nconst mpreal sqrt(const long int v, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\nconst mpreal sqrt(const int v, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\nconst mpreal sqrt(const long double v, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\nconst mpreal sqrt(const double v, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\n\n// abs\ninline const mpreal abs(const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd());\n\n//////////////////////////////////////////////////////////////////////////\n// pow\nconst mpreal pow(const mpreal& a, const unsigned int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\nconst mpreal pow(const mpreal& a, const int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\nconst mpreal pow(const mpreal& a, const long double b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\nconst mpreal pow(const mpreal& a, const double b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\n\nconst mpreal pow(const unsigned int a, const mpreal& b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\nconst mpreal pow(const long int a, const mpreal& b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\nconst mpreal pow(const int a, const mpreal& b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\nconst mpreal pow(const long double a, const mpreal& b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\nconst mpreal pow(const double a, const mpreal& b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\n\nconst mpreal pow(const unsigned long int a, const unsigned int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\nconst mpreal pow(const unsigned long int a, const long int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\nconst mpreal pow(const unsigned long int a, const int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\nconst mpreal pow(const unsigned long int a, const long double b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\nconst mpreal pow(const unsigned long int a, const double b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\n\nconst mpreal pow(const unsigned int a, const unsigned long int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\nconst mpreal pow(const unsigned int a, const unsigned int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\nconst mpreal pow(const unsigned int a, const long int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\nconst mpreal pow(const unsigned int a, const int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\nconst mpreal pow(const unsigned int a, const long double b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\nconst mpreal pow(const unsigned int a, const double b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\n\nconst mpreal pow(const long int a, const unsigned long int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\nconst mpreal pow(const long int a, const unsigned int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\nconst mpreal pow(const long int a, const long int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\nconst mpreal pow(const long int a, const int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\nconst mpreal pow(const long int a, const long double b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\nconst mpreal pow(const long int a, const double b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\n\nconst mpreal pow(const int a, const unsigned long int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\nconst mpreal pow(const int a, const unsigned int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\nconst mpreal pow(const int a, const long int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\nconst mpreal pow(const int a, const int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd()); \nconst mpreal pow(const int a, const long double b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\nconst mpreal pow(const int a, const double b, mp_rnd_t rnd_mode = mpreal::get_default_rnd()); \n\nconst mpreal pow(const long double a, const long double b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());    \nconst mpreal pow(const long double a, const unsigned long int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\nconst mpreal pow(const long double a, const unsigned int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\nconst mpreal pow(const long double a, const long int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\nconst mpreal pow(const long double a, const int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\n\nconst mpreal pow(const double a, const double b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());    \nconst mpreal pow(const double a, const unsigned long int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\nconst mpreal pow(const double a, const unsigned int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\nconst mpreal pow(const double a, const long int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\nconst mpreal pow(const double a, const int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\n\ninline const mpreal mul_2ui(const mpreal& v, unsigned long int k, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\ninline const mpreal mul_2si(const mpreal& v, long int k, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\ninline const mpreal div_2ui(const mpreal& v, unsigned long int k, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\ninline const mpreal div_2si(const mpreal& v, long int k, mp_rnd_t rnd_mode = mpreal::get_default_rnd());\n\n//////////////////////////////////////////////////////////////////////////\n// Estimate machine epsilon for the given precision\n// Returns smallest eps such that 1.0 + eps != 1.0\ninline mpreal machine_epsilon(mp_prec_t prec = mpreal::get_default_prec());\n\n// Returns smallest eps such that x + eps != x (relative machine epsilon)\ninline mpreal machine_epsilon(const mpreal& x);        \n\n// Gives max & min values for the required precision, \n// minval is 'safe' meaning 1 / minval does not overflow\n// maxval is 'safe' meaning 1 / maxval does not underflow\ninline mpreal minval(mp_prec_t prec = mpreal::get_default_prec());\ninline mpreal maxval(mp_prec_t prec = mpreal::get_default_prec());\n\n// 'Dirty' equality check 1: |a-b| < min{|a|,|b|} * eps\ninline bool isEqualFuzzy(const mpreal& a, const mpreal& b, const mpreal& eps);\n\n// 'Dirty' equality check 2: |a-b| < min{|a|,|b|} * eps( min{|a|,|b|} )\ninline bool isEqualFuzzy(const mpreal& a, const mpreal& b);\n\n// 'Bitwise' equality check\n//  maxUlps - a and b can be apart by maxUlps binary numbers. \ninline bool isEqualUlps(const mpreal& a, const mpreal& b, int maxUlps);\n\n//////////////////////////////////////////////////////////////////////////\n// Convert precision in 'bits' to decimal digits and vice versa.\n//    bits   = ceil(digits*log[2](10))\n//    digits = floor(bits*log[10](2))\n\ninline mp_prec_t digits2bits(int d);\ninline int       bits2digits(mp_prec_t b);\n\n//////////////////////////////////////////////////////////////////////////\n// min, max\nconst mpreal (max)(const mpreal& x, const mpreal& y);\nconst mpreal (min)(const mpreal& x, const mpreal& y);\n\n//////////////////////////////////////////////////////////////////////////\n// Implementation\n//////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////\n// Operators - Assignment\ninline mpreal& mpreal::operator=(const mpreal& v)\n{\n    if (this != &v)\n    {\n\t\tmp_prec_t tp = mpfr_get_prec(  mpfr_srcptr());\n\t\tmp_prec_t vp = mpfr_get_prec(v.mpfr_srcptr());\n\n\t\tif(tp != vp){\n\t\t\tclear(mpfr_ptr());\n\t\t\tmpfr_init2(mpfr_ptr(), vp);\n\t\t}\n\n        mpfr_set(mpfr_ptr(), v.mpfr_srcptr(), mpreal::get_default_rnd());\n\n        MPREAL_MSVC_DEBUGVIEW_CODE;\n    }\n    return *this;\n}\n\ninline mpreal& mpreal::operator=(const mpf_t v)\n{\n    mpfr_set_f(mpfr_ptr(), v, mpreal::get_default_rnd());\n    \n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator=(const mpz_t v)\n{\n    mpfr_set_z(mpfr_ptr(), v, mpreal::get_default_rnd());\n    \n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator=(const mpq_t v)\n{\n    mpfr_set_q(mpfr_ptr(), v, mpreal::get_default_rnd());\n\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator=(const long double v)        \n{    \n    mpfr_set_ld(mpfr_ptr(), v, mpreal::get_default_rnd());\n\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator=(const double v)                \n{   \n#if (MPREAL_DOUBLE_BITS_OVERFLOW > -1)\n\tif(fits_in_bits(v, MPREAL_DOUBLE_BITS_OVERFLOW))\n\t{\n\t\tmpfr_set_d(mpfr_ptr(),v,mpreal::get_default_rnd());\n\t}else\n\t\tthrow conversion_overflow();\n#else\n\tmpfr_set_d(mpfr_ptr(),v,mpreal::get_default_rnd());\n#endif\n\n\tMPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator=(const unsigned long int v)    \n{    \n    mpfr_set_ui(mpfr_ptr(), v, mpreal::get_default_rnd());    \n\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator=(const unsigned int v)        \n{    \n    mpfr_set_ui(mpfr_ptr(), v, mpreal::get_default_rnd());    \n\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator=(const unsigned long long int v)    \n{    \n    mpfr_set_uj(mpfr_ptr(), v, mpreal::get_default_rnd());    \n\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator=(const long long int v)    \n{    \n    mpfr_set_sj(mpfr_ptr(), v, mpreal::get_default_rnd());    \n\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator=(const long int v)            \n{    \n    mpfr_set_si(mpfr_ptr(), v, mpreal::get_default_rnd());    \n\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator=(const int v)\n{    \n    mpfr_set_si(mpfr_ptr(), v, mpreal::get_default_rnd());    \n\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator=(const char* s)\n{\n    // Use other converters for more precise control on base & precision & rounding:\n    //\n    //        mpreal(const char* s,        mp_prec_t prec, int base, mp_rnd_t mode)\n    //        mpreal(const std::string& s,mp_prec_t prec, int base, mp_rnd_t mode)\n    //\n    // Here we assume base = 10 and we use precision of target variable.\n\n    mpfr_t t;\n\n    mpfr_init2(t, mpfr_get_prec(mpfr_srcptr()));\n\n    if(0 == mpfr_set_str(t, s, 10, mpreal::get_default_rnd()))\n    {\n        mpfr_set(mpfr_ptr(), t, mpreal::get_default_rnd()); \n        MPREAL_MSVC_DEBUGVIEW_CODE;\n    }\n\n    clear(t);\n    return *this;\n}\n\ninline mpreal& mpreal::operator=(const std::string& s)\n{\n    // Use other converters for more precise control on base & precision & rounding:\n    //\n    //        mpreal(const char* s,        mp_prec_t prec, int base, mp_rnd_t mode)\n    //        mpreal(const std::string& s,mp_prec_t prec, int base, mp_rnd_t mode)\n    //\n    // Here we assume base = 10 and we use precision of target variable.\n\n    mpfr_t t;\n\n    mpfr_init2(t, mpfr_get_prec(mpfr_srcptr()));\n\n    if(0 == mpfr_set_str(t, s.c_str(), 10, mpreal::get_default_rnd()))\n    {\n        mpfr_set(mpfr_ptr(), t, mpreal::get_default_rnd()); \n        MPREAL_MSVC_DEBUGVIEW_CODE;\n    }\n\n    clear(t);\n    return *this;\n}\n\ntemplate <typename real_t> \ninline mpreal& mpreal::operator= (const std::complex<real_t>& z)\n{\n    return *this = z.real();\n}\n\n//////////////////////////////////////////////////////////////////////////\n// + Addition\ninline mpreal& mpreal::operator+=(const mpreal& v)\n{\n    mpfr_add(mpfr_ptr(), mpfr_srcptr(), v.mpfr_srcptr(), mpreal::get_default_rnd());\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator+=(const mpf_t u)\n{\n    *this += mpreal(u);\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator+=(const mpz_t u)\n{\n    mpfr_add_z(mpfr_ptr(),mpfr_srcptr(),u,mpreal::get_default_rnd());\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator+=(const mpq_t u)\n{\n    mpfr_add_q(mpfr_ptr(),mpfr_srcptr(),u,mpreal::get_default_rnd());\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator+= (const long double u)\n{\n    *this += mpreal(u);    \n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;    \n}\n\ninline mpreal& mpreal::operator+= (const double u)\n{\n#if (MPFR_VERSION >= MPFR_VERSION_NUM(2,4,0))\n    mpfr_add_d(mpfr_ptr(),mpfr_srcptr(),u,mpreal::get_default_rnd());\n#else\n    *this += mpreal(u);\n#endif\n\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator+=(const unsigned long int u)\n{\n    mpfr_add_ui(mpfr_ptr(),mpfr_srcptr(),u,mpreal::get_default_rnd());\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator+=(const unsigned int u)\n{\n    mpfr_add_ui(mpfr_ptr(),mpfr_srcptr(),u,mpreal::get_default_rnd());\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator+=(const long int u)\n{\n    mpfr_add_si(mpfr_ptr(),mpfr_srcptr(),u,mpreal::get_default_rnd());\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator+=(const int u)\n{\n    mpfr_add_si(mpfr_ptr(),mpfr_srcptr(),u,mpreal::get_default_rnd());\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator+=(const long long int u)         {    *this += mpreal(u); MPREAL_MSVC_DEBUGVIEW_CODE; return *this;    }\ninline mpreal& mpreal::operator+=(const unsigned long long int u){    *this += mpreal(u); MPREAL_MSVC_DEBUGVIEW_CODE; return *this;    }\ninline mpreal& mpreal::operator-=(const long long int  u)        {    *this -= mpreal(u); MPREAL_MSVC_DEBUGVIEW_CODE; return *this;    }\ninline mpreal& mpreal::operator-=(const unsigned long long int u){    *this -= mpreal(u); MPREAL_MSVC_DEBUGVIEW_CODE; return *this;    }\ninline mpreal& mpreal::operator*=(const long long int  u)        {    *this *= mpreal(u); MPREAL_MSVC_DEBUGVIEW_CODE; return *this;    }\ninline mpreal& mpreal::operator*=(const unsigned long long int u){    *this *= mpreal(u); MPREAL_MSVC_DEBUGVIEW_CODE; return *this;    }\ninline mpreal& mpreal::operator/=(const long long int  u)        {    *this /= mpreal(u); MPREAL_MSVC_DEBUGVIEW_CODE; return *this;    }\ninline mpreal& mpreal::operator/=(const unsigned long long int u){    *this /= mpreal(u); MPREAL_MSVC_DEBUGVIEW_CODE; return *this;    }\n\ninline const mpreal mpreal::operator+()const    {    return mpreal(*this); }\n\ninline const mpreal operator+(const mpreal& a, const mpreal& b)\n{\n\tmpreal c(0, (std::max)(mpfr_get_prec(a.mpfr_ptr()), mpfr_get_prec(b.mpfr_ptr())));\n\tmpfr_add(c.mpfr_ptr(), a.mpfr_srcptr(), b.mpfr_srcptr(), mpreal::get_default_rnd());\n\treturn c;\n}\n\ninline mpreal& mpreal::operator++() \n{\n    return *this += 1;\n}\n\ninline const mpreal mpreal::operator++ (int)\n{\n    mpreal x(*this);\n    *this += 1;\n    return x;\n}\n\ninline mpreal& mpreal::operator--() \n{\n    return *this -= 1;\n}\n\ninline const mpreal mpreal::operator-- (int)\n{\n    mpreal x(*this);\n    *this -= 1;\n    return x;\n}\n\n//////////////////////////////////////////////////////////////////////////\n// - Subtraction\ninline mpreal& mpreal::operator-=(const mpreal& v)\n{\n    mpfr_sub(mpfr_ptr(),mpfr_srcptr(),v.mpfr_srcptr(),mpreal::get_default_rnd());\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator-=(const mpz_t v)\n{\n    mpfr_sub_z(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator-=(const mpq_t v)\n{\n    mpfr_sub_q(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator-=(const long double v)\n{\n    *this -= mpreal(v);    \n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;    \n}\n\ninline mpreal& mpreal::operator-=(const double v)\n{\n#if (MPFR_VERSION >= MPFR_VERSION_NUM(2,4,0))\n    mpfr_sub_d(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());\n#else\n    *this -= mpreal(v);    \n#endif\n\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator-=(const unsigned long int v)\n{\n    mpfr_sub_ui(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator-=(const unsigned int v)\n{\n    mpfr_sub_ui(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator-=(const long int v)\n{\n    mpfr_sub_si(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator-=(const int v)\n{\n    mpfr_sub_si(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline const mpreal mpreal::operator-()const\n{\n    mpreal u(*this);\n    mpfr_neg(u.mpfr_ptr(),u.mpfr_srcptr(),mpreal::get_default_rnd());\n    return u;\n}\n\ninline const mpreal operator-(const mpreal& a, const mpreal& b)\n{\n\tmpreal c(0, (std::max)(mpfr_get_prec(a.mpfr_ptr()), mpfr_get_prec(b.mpfr_ptr())));\n\tmpfr_sub(c.mpfr_ptr(), a.mpfr_srcptr(), b.mpfr_srcptr(), mpreal::get_default_rnd());\n\treturn c;\n}\n\ninline const mpreal operator-(const double  b, const mpreal& a)\n{\n#if (MPFR_VERSION >= MPFR_VERSION_NUM(2,4,0))\n    mpreal x(0, mpfr_get_prec(a.mpfr_ptr()));\n    mpfr_d_sub(x.mpfr_ptr(), b, a.mpfr_srcptr(), mpreal::get_default_rnd());\n    return x;\n#else\n    mpreal x(b, mpfr_get_prec(a.mpfr_ptr()));\n    x -= a;\n    return x;\n#endif\n}\n\ninline const mpreal operator-(const unsigned long int b, const mpreal& a)\n{\n    mpreal x(0, mpfr_get_prec(a.mpfr_ptr()));\n    mpfr_ui_sub(x.mpfr_ptr(), b, a.mpfr_srcptr(), mpreal::get_default_rnd());\n    return x;\n}\n\ninline const mpreal operator-(const unsigned int b, const mpreal& a)\n{\n    mpreal x(0, mpfr_get_prec(a.mpfr_ptr()));\n    mpfr_ui_sub(x.mpfr_ptr(), b, a.mpfr_srcptr(), mpreal::get_default_rnd());\n    return x;\n}\n\ninline const mpreal operator-(const long int b, const mpreal& a)\n{\n    mpreal x(0, mpfr_get_prec(a.mpfr_ptr()));\n    mpfr_si_sub(x.mpfr_ptr(), b, a.mpfr_srcptr(), mpreal::get_default_rnd());\n    return x;\n}\n\ninline const mpreal operator-(const int b, const mpreal& a)\n{\n    mpreal x(0, mpfr_get_prec(a.mpfr_ptr()));\n    mpfr_si_sub(x.mpfr_ptr(), b, a.mpfr_srcptr(), mpreal::get_default_rnd());\n    return x;\n}\n\n//////////////////////////////////////////////////////////////////////////\n// * Multiplication\ninline mpreal& mpreal::operator*= (const mpreal& v)\n{\n    mpfr_mul(mpfr_ptr(),mpfr_srcptr(),v.mpfr_srcptr(),mpreal::get_default_rnd());\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator*=(const mpz_t v)\n{\n    mpfr_mul_z(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator*=(const mpq_t v)\n{\n    mpfr_mul_q(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator*=(const long double v)\n{\n    *this *= mpreal(v);    \n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;    \n}\n\ninline mpreal& mpreal::operator*=(const double v)\n{\n#if (MPFR_VERSION >= MPFR_VERSION_NUM(2,4,0))\n    mpfr_mul_d(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());\n#else\n    *this *= mpreal(v);    \n#endif\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator*=(const unsigned long int v)\n{\n    mpfr_mul_ui(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator*=(const unsigned int v)\n{\n    mpfr_mul_ui(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator*=(const long int v)\n{\n    mpfr_mul_si(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator*=(const int v)\n{\n    mpfr_mul_si(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline const mpreal operator*(const mpreal& a, const mpreal& b)\n{\n\tmpreal c(0, (std::max)(mpfr_get_prec(a.mpfr_ptr()), mpfr_get_prec(b.mpfr_ptr())));\n\tmpfr_mul(c.mpfr_ptr(), a.mpfr_srcptr(), b.mpfr_srcptr(), mpreal::get_default_rnd());\n\treturn c;\n}\n\n//////////////////////////////////////////////////////////////////////////\n// / Division\ninline mpreal& mpreal::operator/=(const mpreal& v)\n{\n    mpfr_div(mpfr_ptr(),mpfr_srcptr(),v.mpfr_srcptr(),mpreal::get_default_rnd());\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator/=(const mpz_t v)\n{\n    mpfr_div_z(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator/=(const mpq_t v)\n{\n    mpfr_div_q(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator/=(const long double v)\n{\n    *this /= mpreal(v);\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;    \n}\n\ninline mpreal& mpreal::operator/=(const double v)\n{\n#if (MPFR_VERSION >= MPFR_VERSION_NUM(2,4,0))\n    mpfr_div_d(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());\n#else\n    *this /= mpreal(v);    \n#endif\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator/=(const unsigned long int v)\n{\n    mpfr_div_ui(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator/=(const unsigned int v)\n{\n    mpfr_div_ui(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator/=(const long int v)\n{\n    mpfr_div_si(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator/=(const int v)\n{\n    mpfr_div_si(mpfr_ptr(),mpfr_srcptr(),v,mpreal::get_default_rnd());\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline const mpreal operator/(const mpreal& a, const mpreal& b)\n{\n\tmpreal c(0, (std::max)(mpfr_get_prec(a.mpfr_srcptr()), mpfr_get_prec(b.mpfr_srcptr())));\n\tmpfr_div(c.mpfr_ptr(), a.mpfr_srcptr(), b.mpfr_srcptr(), mpreal::get_default_rnd());\n\treturn c;\n}\n\ninline const mpreal operator/(const unsigned long int b, const mpreal& a)\n{\n    mpreal x(0, mpfr_get_prec(a.mpfr_srcptr()));\n    mpfr_ui_div(x.mpfr_ptr(), b, a.mpfr_srcptr(), mpreal::get_default_rnd());\n    return x;\n}\n\ninline const mpreal operator/(const unsigned int b, const mpreal& a)\n{\n    mpreal x(0, mpfr_get_prec(a.mpfr_srcptr()));\n    mpfr_ui_div(x.mpfr_ptr(), b, a.mpfr_srcptr(), mpreal::get_default_rnd());\n    return x;\n}\n\ninline const mpreal operator/(const long int b, const mpreal& a)\n{\n    mpreal x(0, mpfr_get_prec(a.mpfr_srcptr()));\n    mpfr_si_div(x.mpfr_ptr(), b, a.mpfr_srcptr(), mpreal::get_default_rnd());\n    return x;\n}\n\ninline const mpreal operator/(const int b, const mpreal& a)\n{\n    mpreal x(0, mpfr_get_prec(a.mpfr_srcptr()));\n    mpfr_si_div(x.mpfr_ptr(), b, a.mpfr_srcptr(), mpreal::get_default_rnd());\n    return x;\n}\n\ninline const mpreal operator/(const double  b, const mpreal& a)\n{\n#if (MPFR_VERSION >= MPFR_VERSION_NUM(2,4,0))\n    mpreal x(0, mpfr_get_prec(a.mpfr_srcptr()));\n    mpfr_d_div(x.mpfr_ptr(), b, a.mpfr_srcptr(), mpreal::get_default_rnd());\n    return x;\n#else\n    mpreal x(0, mpfr_get_prec(a.mpfr_ptr()));\n    x /= a;\n    return x;\n#endif\n}\n\n//////////////////////////////////////////////////////////////////////////\n// Shifts operators - Multiplication/Division by power of 2\ninline mpreal& mpreal::operator<<=(const unsigned long int u)\n{\n    mpfr_mul_2ui(mpfr_ptr(),mpfr_srcptr(),u,mpreal::get_default_rnd());\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator<<=(const unsigned int u)\n{\n    mpfr_mul_2ui(mpfr_ptr(),mpfr_srcptr(),static_cast<unsigned long int>(u),mpreal::get_default_rnd());\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator<<=(const long int u)\n{\n    mpfr_mul_2si(mpfr_ptr(),mpfr_srcptr(),u,mpreal::get_default_rnd());\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator<<=(const int u)\n{\n    mpfr_mul_2si(mpfr_ptr(),mpfr_srcptr(),static_cast<long int>(u),mpreal::get_default_rnd());\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator>>=(const unsigned long int u)\n{\n    mpfr_div_2ui(mpfr_ptr(),mpfr_srcptr(),u,mpreal::get_default_rnd());\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator>>=(const unsigned int u)\n{\n    mpfr_div_2ui(mpfr_ptr(),mpfr_srcptr(),static_cast<unsigned long int>(u),mpreal::get_default_rnd());\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator>>=(const long int u)\n{\n    mpfr_div_2si(mpfr_ptr(),mpfr_srcptr(),u,mpreal::get_default_rnd());\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::operator>>=(const int u)\n{\n    mpfr_div_2si(mpfr_ptr(),mpfr_srcptr(),static_cast<long int>(u),mpreal::get_default_rnd());\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline const mpreal operator<<(const mpreal& v, const unsigned long int k)\n{\n    return mul_2ui(v,k);\n}\n\ninline const mpreal operator<<(const mpreal& v, const unsigned int k)\n{\n    return mul_2ui(v,static_cast<unsigned long int>(k));\n}\n\ninline const mpreal operator<<(const mpreal& v, const long int k)\n{\n    return mul_2si(v,k);\n}\n\ninline const mpreal operator<<(const mpreal& v, const int k)\n{\n    return mul_2si(v,static_cast<long int>(k));\n}\n\ninline const mpreal operator>>(const mpreal& v, const unsigned long int k)\n{\n    return div_2ui(v,k);\n}\n\ninline const mpreal operator>>(const mpreal& v, const long int k)\n{\n    return div_2si(v,k);\n}\n\ninline const mpreal operator>>(const mpreal& v, const unsigned int k)\n{\n    return div_2ui(v,static_cast<unsigned long int>(k));\n}\n\ninline const mpreal operator>>(const mpreal& v, const int k)\n{\n    return div_2si(v,static_cast<long int>(k));\n}\n\n// mul_2ui\ninline const mpreal mul_2ui(const mpreal& v, unsigned long int k, mp_rnd_t rnd_mode)\n{\n    mpreal x(v);\n    mpfr_mul_2ui(x.mpfr_ptr(),v.mpfr_srcptr(),k,rnd_mode);\n    return x;\n}\n\n// mul_2si\ninline const mpreal mul_2si(const mpreal& v, long int k, mp_rnd_t rnd_mode)\n{\n    mpreal x(v);\n    mpfr_mul_2si(x.mpfr_ptr(),v.mpfr_srcptr(),k,rnd_mode);\n    return x;\n}\n\ninline const mpreal div_2ui(const mpreal& v, unsigned long int k, mp_rnd_t rnd_mode)\n{\n    mpreal x(v);\n    mpfr_div_2ui(x.mpfr_ptr(),v.mpfr_srcptr(),k,rnd_mode);\n    return x;\n}\n\ninline const mpreal div_2si(const mpreal& v, long int k, mp_rnd_t rnd_mode)\n{\n    mpreal x(v);\n    mpfr_div_2si(x.mpfr_ptr(),v.mpfr_srcptr(),k,rnd_mode);\n    return x;\n}\n\n//////////////////////////////////////////////////////////////////////////\n//Relational operators\n\n// WARNING: \n//\n// Please note that following checks for double-NaN are guaranteed to work only in IEEE math mode: \n//\n// isnan(b) =  (b != b)\n// isnan(b) = !(b == b)  (we use in code below)\n//\n// Be cautions if you use compiler options which break strict IEEE compliance (e.g. -ffast-math in GCC).\n// Use std::isnan instead (C++11).\n\ninline bool operator >  (const mpreal& a, const mpreal& b           ){  return (mpfr_greater_p(a.mpfr_srcptr(),b.mpfr_srcptr()) != 0 );            }\ninline bool operator >  (const mpreal& a, const unsigned long int b ){  return !isnan EIGEN_NOT_A_MACRO (a) && (mpfr_cmp_ui(a.mpfr_srcptr(),b) > 0 );                 }\ninline bool operator >  (const mpreal& a, const unsigned int b      ){  return !isnan EIGEN_NOT_A_MACRO (a) && (mpfr_cmp_ui(a.mpfr_srcptr(),b) > 0 );                 }\ninline bool operator >  (const mpreal& a, const long int b          ){  return !isnan EIGEN_NOT_A_MACRO (a) && (mpfr_cmp_si(a.mpfr_srcptr(),b) > 0 );                 }\ninline bool operator >  (const mpreal& a, const int b               ){  return !isnan EIGEN_NOT_A_MACRO (a) && (mpfr_cmp_si(a.mpfr_srcptr(),b) > 0 );                 }\ninline bool operator >  (const mpreal& a, const long double b       ){  return !isnan EIGEN_NOT_A_MACRO (a) && (b == b) && (mpfr_cmp_ld(a.mpfr_srcptr(),b) > 0 );    }\ninline bool operator >  (const mpreal& a, const double b            ){  return !isnan EIGEN_NOT_A_MACRO (a) && (b == b) && (mpfr_cmp_d (a.mpfr_srcptr(),b) > 0 );    }\n\ninline bool operator >= (const mpreal& a, const mpreal& b           ){  return (mpfr_greaterequal_p(a.mpfr_srcptr(),b.mpfr_srcptr()) != 0 );       }\ninline bool operator >= (const mpreal& a, const unsigned long int b ){  return !isnan EIGEN_NOT_A_MACRO (a) && (mpfr_cmp_ui(a.mpfr_srcptr(),b) >= 0 );                }\ninline bool operator >= (const mpreal& a, const unsigned int b      ){  return !isnan EIGEN_NOT_A_MACRO (a) && (mpfr_cmp_ui(a.mpfr_srcptr(),b) >= 0 );                }\ninline bool operator >= (const mpreal& a, const long int b          ){  return !isnan EIGEN_NOT_A_MACRO (a) && (mpfr_cmp_si(a.mpfr_srcptr(),b) >= 0 );                }\ninline bool operator >= (const mpreal& a, const int b               ){  return !isnan EIGEN_NOT_A_MACRO (a) && (mpfr_cmp_si(a.mpfr_srcptr(),b) >= 0 );                }\ninline bool operator >= (const mpreal& a, const long double b       ){  return !isnan EIGEN_NOT_A_MACRO (a) && (b == b) && (mpfr_cmp_ld(a.mpfr_srcptr(),b) >= 0 );   }\ninline bool operator >= (const mpreal& a, const double b            ){  return !isnan EIGEN_NOT_A_MACRO (a) && (b == b) && (mpfr_cmp_d (a.mpfr_srcptr(),b) >= 0 );   }\n\ninline bool operator <  (const mpreal& a, const mpreal& b           ){  return (mpfr_less_p(a.mpfr_srcptr(),b.mpfr_srcptr()) != 0 );               }\ninline bool operator <  (const mpreal& a, const unsigned long int b ){  return !isnan EIGEN_NOT_A_MACRO (a) && (mpfr_cmp_ui(a.mpfr_srcptr(),b) < 0 );                 }\ninline bool operator <  (const mpreal& a, const unsigned int b      ){  return !isnan EIGEN_NOT_A_MACRO (a) && (mpfr_cmp_ui(a.mpfr_srcptr(),b) < 0 );                 }\ninline bool operator <  (const mpreal& a, const long int b          ){  return !isnan EIGEN_NOT_A_MACRO (a) && (mpfr_cmp_si(a.mpfr_srcptr(),b) < 0 );                 }\ninline bool operator <  (const mpreal& a, const int b               ){  return !isnan EIGEN_NOT_A_MACRO (a) && (mpfr_cmp_si(a.mpfr_srcptr(),b) < 0 );                 }\ninline bool operator <  (const mpreal& a, const long double b       ){  return !isnan EIGEN_NOT_A_MACRO (a) && (b == b) && (mpfr_cmp_ld(a.mpfr_srcptr(),b) < 0 );    }\ninline bool operator <  (const mpreal& a, const double b            ){  return !isnan EIGEN_NOT_A_MACRO (a) && (b == b) && (mpfr_cmp_d (a.mpfr_srcptr(),b) < 0 );    }\n\ninline bool operator <= (const mpreal& a, const mpreal& b           ){  return (mpfr_lessequal_p(a.mpfr_srcptr(),b.mpfr_srcptr()) != 0 );          }\ninline bool operator <= (const mpreal& a, const unsigned long int b ){  return !isnan EIGEN_NOT_A_MACRO (a) && (mpfr_cmp_ui(a.mpfr_srcptr(),b) <= 0 );                }\ninline bool operator <= (const mpreal& a, const unsigned int b      ){  return !isnan EIGEN_NOT_A_MACRO (a) && (mpfr_cmp_ui(a.mpfr_srcptr(),b) <= 0 );                }\ninline bool operator <= (const mpreal& a, const long int b          ){  return !isnan EIGEN_NOT_A_MACRO (a) && (mpfr_cmp_si(a.mpfr_srcptr(),b) <= 0 );                }\ninline bool operator <= (const mpreal& a, const int b               ){  return !isnan EIGEN_NOT_A_MACRO (a) && (mpfr_cmp_si(a.mpfr_srcptr(),b) <= 0 );                }\ninline bool operator <= (const mpreal& a, const long double b       ){  return !isnan EIGEN_NOT_A_MACRO (a) && (b == b) && (mpfr_cmp_ld(a.mpfr_srcptr(),b) <= 0 );   }\ninline bool operator <= (const mpreal& a, const double b            ){  return !isnan EIGEN_NOT_A_MACRO (a) && (b == b) && (mpfr_cmp_d (a.mpfr_srcptr(),b) <= 0 );   }\n\ninline bool operator == (const mpreal& a, const mpreal& b           ){  return (mpfr_equal_p(a.mpfr_srcptr(),b.mpfr_srcptr()) != 0 );              }\ninline bool operator == (const mpreal& a, const unsigned long int b ){  return !isnan EIGEN_NOT_A_MACRO (a) && (mpfr_cmp_ui(a.mpfr_srcptr(),b) == 0 );                }\ninline bool operator == (const mpreal& a, const unsigned int b      ){  return !isnan EIGEN_NOT_A_MACRO (a) && (mpfr_cmp_ui(a.mpfr_srcptr(),b) == 0 );                }\ninline bool operator == (const mpreal& a, const long int b          ){  return !isnan EIGEN_NOT_A_MACRO (a) && (mpfr_cmp_si(a.mpfr_srcptr(),b) == 0 );                }\ninline bool operator == (const mpreal& a, const int b               ){  return !isnan EIGEN_NOT_A_MACRO (a) && (mpfr_cmp_si(a.mpfr_srcptr(),b) == 0 );                }\ninline bool operator == (const mpreal& a, const long double b       ){  return !isnan EIGEN_NOT_A_MACRO (a) && (b == b) && (mpfr_cmp_ld(a.mpfr_srcptr(),b) == 0 );   }\ninline bool operator == (const mpreal& a, const double b            ){  return !isnan EIGEN_NOT_A_MACRO (a) && (b == b) && (mpfr_cmp_d (a.mpfr_srcptr(),b) == 0 );   }\n\ninline bool operator != (const mpreal& a, const mpreal& b           ){  return !(a == b);  }\ninline bool operator != (const mpreal& a, const unsigned long int b ){  return !(a == b);  }\ninline bool operator != (const mpreal& a, const unsigned int b      ){  return !(a == b);  }\ninline bool operator != (const mpreal& a, const long int b          ){  return !(a == b);  }\ninline bool operator != (const mpreal& a, const int b               ){  return !(a == b);  }\ninline bool operator != (const mpreal& a, const long double b       ){  return !(a == b);  }\ninline bool operator != (const mpreal& a, const double b            ){  return !(a == b);  }\n\ninline bool isnan EIGEN_NOT_A_MACRO     (const mpreal& op){    return (mpfr_nan_p    (op.mpfr_srcptr()) != 0 );    }\ninline bool (isinf)    (const mpreal& op){    return (mpfr_inf_p    (op.mpfr_srcptr()) != 0 );    }\ninline bool (isfinite) (const mpreal& op){    return (mpfr_number_p (op.mpfr_srcptr()) != 0 );    }\ninline bool iszero   (const mpreal& op){    return (mpfr_zero_p   (op.mpfr_srcptr()) != 0 );    }\ninline bool isint    (const mpreal& op){    return (mpfr_integer_p(op.mpfr_srcptr()) != 0 );    }\n\n#if (MPFR_VERSION >= MPFR_VERSION_NUM(3,0,0))\ninline bool isregular(const mpreal& op){    return (mpfr_regular_p(op.mpfr_srcptr()));}\n#endif \n\n//////////////////////////////////////////////////////////////////////////\n// Type Converters\ninline bool               mpreal::toBool   (             )  const    {    return  mpfr_zero_p (mpfr_srcptr()) == 0;     }\ninline long               mpreal::toLong   (mp_rnd_t mode)  const    {    return  mpfr_get_si (mpfr_srcptr(), mode);    }\ninline unsigned long      mpreal::toULong  (mp_rnd_t mode)  const    {    return  mpfr_get_ui (mpfr_srcptr(), mode);    }\ninline float              mpreal::toFloat  (mp_rnd_t mode)  const    {    return  mpfr_get_flt(mpfr_srcptr(), mode);    }\ninline double             mpreal::toDouble (mp_rnd_t mode)  const    {    return  mpfr_get_d  (mpfr_srcptr(), mode);    }\ninline long double        mpreal::toLDouble(mp_rnd_t mode)  const    {    return  mpfr_get_ld (mpfr_srcptr(), mode);    }\ninline long long          mpreal::toLLong  (mp_rnd_t mode)  const    {    return  mpfr_get_sj (mpfr_srcptr(), mode);    }\ninline unsigned long long mpreal::toULLong (mp_rnd_t mode)  const    {    return  mpfr_get_uj (mpfr_srcptr(), mode);    }\n\ninline ::mpfr_ptr     mpreal::mpfr_ptr()             { return mp; }\ninline ::mpfr_srcptr  mpreal::mpfr_ptr()    const    { return mp; }\ninline ::mpfr_srcptr  mpreal::mpfr_srcptr() const    { return mp; }\n\ntemplate <class T>\ninline std::string toString(T t, std::ios_base & (*f)(std::ios_base&))\n{\n    std::ostringstream oss;\n    oss << f << t;\n    return oss.str();\n}\n\n#if (MPFR_VERSION >= MPFR_VERSION_NUM(2,4,0))\n\ninline std::string mpreal::toString(const std::string& format) const\n{\n    char *s = NULL;\n    std::string out;\n\n    if( !format.empty() )\n    {\n        if(!(mpfr_asprintf(&s, format.c_str(), mpfr_srcptr()) < 0))\n        {\n            out = std::string(s);\n\n            mpfr_free_str(s);\n        }\n    }\n\n    return out;\n}\n\n#endif\n\ninline std::string mpreal::toString(int n, int b, mp_rnd_t mode) const\n{\n    // TODO: Add extended format specification (f, e, rounding mode) as it done in output operator\n    (void)b;\n    (void)mode;\n\n#if (MPFR_VERSION >= MPFR_VERSION_NUM(2,4,0))\n\n    std::ostringstream format;\n\n    int digits = (n >= 0) ? n : 2 + bits2digits(mpfr_get_prec(mpfr_srcptr()));\n    \n    format << \"%.\" << digits << \"RNg\";\n\n    return toString(format.str());\n\n#else\n\n    char *s, *ns = NULL; \n    size_t slen, nslen;\n    mp_exp_t exp;\n    std::string out;\n\n    if(mpfr_inf_p(mp))\n    { \n        if(mpfr_sgn(mp)>0) return \"+Inf\";\n        else               return \"-Inf\";\n    }\n\n    if(mpfr_zero_p(mp)) return \"0\";\n    if(mpfr_nan_p(mp))  return \"NaN\";\n\n    s  = mpfr_get_str(NULL, &exp, b, 0, mp, mode);\n    ns = mpfr_get_str(NULL, &exp, b, (std::max)(0,n), mp, mode);\n\n    if(s!=NULL && ns!=NULL)\n    {\n        slen  = strlen(s);\n        nslen = strlen(ns);\n        if(nslen<=slen) \n        {\n            mpfr_free_str(s);\n            s = ns;\n            slen = nslen;\n        }\n        else {\n            mpfr_free_str(ns);\n        }\n\n        // Make human eye-friendly formatting if possible\n        if (exp>0 && static_cast<size_t>(exp)<slen)\n        {\n            if(s[0]=='-')\n            {\n                // Remove zeros starting from right end\n                char* ptr = s+slen-1;\n                while (*ptr=='0' && ptr>s+exp) ptr--; \n\n                if(ptr==s+exp) out = std::string(s,exp+1);\n                else           out = std::string(s,exp+1)+'.'+std::string(s+exp+1,ptr-(s+exp+1)+1);\n\n                //out = string(s,exp+1)+'.'+string(s+exp+1);\n            }\n            else\n            {\n                // Remove zeros starting from right end\n                char* ptr = s+slen-1;\n                while (*ptr=='0' && ptr>s+exp-1) ptr--; \n\n                if(ptr==s+exp-1) out = std::string(s,exp);\n                else             out = std::string(s,exp)+'.'+std::string(s+exp,ptr-(s+exp)+1);\n\n                //out = string(s,exp)+'.'+string(s+exp);\n            }\n\n        }else{ // exp<0 || exp>slen\n            if(s[0]=='-')\n            {\n                // Remove zeros starting from right end\n                char* ptr = s+slen-1;\n                while (*ptr=='0' && ptr>s+1) ptr--; \n\n                if(ptr==s+1) out = std::string(s,2);\n                else         out = std::string(s,2)+'.'+std::string(s+2,ptr-(s+2)+1);\n\n                //out = string(s,2)+'.'+string(s+2);\n            }\n            else\n            {\n                // Remove zeros starting from right end\n                char* ptr = s+slen-1;\n                while (*ptr=='0' && ptr>s) ptr--; \n\n                if(ptr==s) out = std::string(s,1);\n                else       out = std::string(s,1)+'.'+std::string(s+1,ptr-(s+1)+1);\n\n                //out = string(s,1)+'.'+string(s+1);\n            }\n\n            // Make final string\n            if(--exp)\n            {\n                if(exp>0) out += \"e+\"+mpfr::toString<mp_exp_t>(exp,std::dec);\n                else       out += \"e\"+mpfr::toString<mp_exp_t>(exp,std::dec);\n            }\n        }\n\n        mpfr_free_str(s);\n        return out;\n    }else{\n        return \"conversion error!\";\n    }\n#endif\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n// I/O\ninline std::ostream& mpreal::output(std::ostream& os) const \n{\n    std::ostringstream format;\n    const std::ios::fmtflags flags = os.flags();\n\n    format << ((flags & std::ios::showpos) ? \"%+\" : \"%\");\n    if (os.precision() >= 0)\n        format << '.' << os.precision() << \"R*\"\n               << ((flags & std::ios::floatfield) == std::ios::fixed ? 'f' :\n                   (flags & std::ios::floatfield) == std::ios::scientific ? 'e' :\n                   'g');\n    else\n        format << \"R*e\";\n\n    char *s = NULL;\n    if(!(mpfr_asprintf(&s, format.str().c_str(),\n                        mpfr::mpreal::get_default_rnd(),\n                        mpfr_srcptr())\n        < 0))\n    {\n        os << std::string(s);\n        mpfr_free_str(s);\n    }\n    return os;\n}\n\ninline std::ostream& operator<<(std::ostream& os, const mpreal& v)\n{\n    return v.output(os);\n}\n\ninline std::istream& operator>>(std::istream &is, mpreal& v)\n{\n    // TODO: use cout::hexfloat and other flags to setup base\n    std::string tmp;\n    is >> tmp;\n    mpfr_set_str(v.mpfr_ptr(), tmp.c_str(), 10, mpreal::get_default_rnd());\n    return is;\n}\n\n//////////////////////////////////////////////////////////////////////////\n//     Bits - decimal digits relation\n//        bits   = ceil(digits*log[2](10))\n//        digits = floor(bits*log[10](2))\n\ninline mp_prec_t digits2bits(int d)\n{\n    const double LOG2_10 = 3.3219280948873624;\n\n    return mp_prec_t(std::ceil( d * LOG2_10 ));\n}\n\ninline int bits2digits(mp_prec_t b)\n{\n    const double LOG10_2 = 0.30102999566398119;\n\n    return int(std::floor( b * LOG10_2 ));\n}\n\n//////////////////////////////////////////////////////////////////////////\n// Set/Get number properties\ninline mpreal& mpreal::setSign(int sign, mp_rnd_t RoundingMode)\n{\n    mpfr_setsign(mpfr_ptr(), mpfr_srcptr(), sign < 0, RoundingMode);\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline int mpreal::getPrecision() const\n{\n    return int(mpfr_get_prec(mpfr_srcptr()));\n}\n\ninline mpreal& mpreal::setPrecision(int Precision, mp_rnd_t RoundingMode)\n{\n    mpfr_prec_round(mpfr_ptr(), Precision, RoundingMode);\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::setInf(int sign) \n{ \n    mpfr_set_inf(mpfr_ptr(), sign);\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}    \n\ninline mpreal& mpreal::setNan() \n{\n    mpfr_set_nan(mpfr_ptr());\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mpreal& mpreal::setZero(int sign)\n{\n#if (MPFR_VERSION >= MPFR_VERSION_NUM(3,0,0))\n    mpfr_set_zero(mpfr_ptr(), sign);\n#else\n    mpfr_set_si(mpfr_ptr(), 0, (mpfr_get_default_rounding_mode)());\n    setSign(sign);\n#endif \n\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return *this;\n}\n\ninline mp_prec_t mpreal::get_prec() const\n{\n    return mpfr_get_prec(mpfr_srcptr());\n}\n\ninline void mpreal::set_prec(mp_prec_t prec, mp_rnd_t rnd_mode)\n{\n    mpfr_prec_round(mpfr_ptr(),prec,rnd_mode);\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n}\n\ninline mp_exp_t mpreal::get_exp () const\n{\n    return mpfr_get_exp(mpfr_srcptr());\n}\n\ninline int mpreal::set_exp (mp_exp_t e)\n{\n    int x = mpfr_set_exp(mpfr_ptr(), e);\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return x;\n}\n\ninline const mpreal frexp(const mpreal& x, mp_exp_t* exp, mp_rnd_t mode = mpreal::get_default_rnd())\n{\n    mpreal y(x);\n#if (MPFR_VERSION >= MPFR_VERSION_NUM(3,1,0))\n    mpfr_frexp(exp,y.mpfr_ptr(),x.mpfr_srcptr(),mode);\n#else\n    *exp = mpfr_get_exp(y.mpfr_srcptr());\n    mpfr_set_exp(y.mpfr_ptr(),0);\n#endif\n    return y;\n}\n\ninline const mpreal ldexp(const mpreal& v, mp_exp_t exp)\n{\n    mpreal x(v);\n\n    // rounding is not important since we are just increasing the exponent (= exact operation)\n    mpfr_mul_2si(x.mpfr_ptr(), x.mpfr_srcptr(), exp, mpreal::get_default_rnd()); \n    return x;\n}\n\ninline const mpreal scalbn(const mpreal& v, mp_exp_t exp)\n{\n    return ldexp(v, exp);\n}\n\ninline mpreal machine_epsilon(mp_prec_t prec)\n{\n    /* the smallest eps such that 1 + eps != 1 */\n    return machine_epsilon(mpreal(1, prec));\n}\n\ninline mpreal machine_epsilon(const mpreal& x)\n{    \n    /* the smallest eps such that x + eps != x */\n    if( x < 0)\n    {\n        return nextabove(-x) + x;\n    }else{\n        return nextabove( x) - x;\n    }\n}\n\n// minval is 'safe' meaning 1 / minval does not overflow\ninline mpreal minval(mp_prec_t prec)\n{\n    /* min = 1/2 * 2^emin = 2^(emin - 1) */\n    return mpreal(1, prec) << mpreal::get_emin()-1;\n}\n\n// maxval is 'safe' meaning 1 / maxval does not underflow\ninline mpreal maxval(mp_prec_t prec)\n{\n    /* max = (1 - eps) * 2^emax, eps is machine epsilon */\n    return (mpreal(1, prec) - machine_epsilon(prec)) << mpreal::get_emax(); \n}\n\ninline bool isEqualUlps(const mpreal& a, const mpreal& b, int maxUlps)\n{\n    return abs(a - b) <= machine_epsilon((max)(abs(a), abs(b))) * maxUlps;\n}\n\ninline bool isEqualFuzzy(const mpreal& a, const mpreal& b, const mpreal& eps)\n{\n    return abs(a - b) <= eps;\n}\n\ninline bool isEqualFuzzy(const mpreal& a, const mpreal& b)\n{\n    return isEqualFuzzy(a, b, machine_epsilon((max)(1, (min)(abs(a), abs(b)))));\n}\n\n//////////////////////////////////////////////////////////////////////////\n// C++11 sign functions.\ninline mpreal copysign(const mpreal& x, const  mpreal& y, mp_rnd_t rnd_mode = mpreal::get_default_rnd())\n{\n    mpreal rop(0, mpfr_get_prec(x.mpfr_ptr()));\n    mpfr_setsign(rop.mpfr_ptr(), x.mpfr_srcptr(), mpfr_signbit(y.mpfr_srcptr()), rnd_mode);\n    return rop;\n}\n\ninline bool signbit(const mpreal& x)\n{\n    return mpfr_signbit(x.mpfr_srcptr());\n}\n\ninline mpreal& setsignbit(mpreal& x, bool minus, mp_rnd_t rnd_mode = mpreal::get_default_rnd())\n{\n    mpfr_setsign(x.mpfr_ptr(), x.mpfr_srcptr(), minus, rnd_mode);\n    return x;\n}\n\ninline const mpreal modf(const mpreal& v, mpreal& n)\n{\n    mpreal f(v);\n\n    // rounding is not important since we are using the same number\n    mpfr_frac (f.mpfr_ptr(),f.mpfr_srcptr(),mpreal::get_default_rnd());    \n    mpfr_trunc(n.mpfr_ptr(),v.mpfr_srcptr());\n    return f;\n}\n\ninline int mpreal::check_range (int t, mp_rnd_t rnd_mode)\n{\n    return mpfr_check_range(mpfr_ptr(),t,rnd_mode);\n}\n\ninline int mpreal::subnormalize (int t,mp_rnd_t rnd_mode)\n{\n    int r = mpfr_subnormalize(mpfr_ptr(),t,rnd_mode);\n    MPREAL_MSVC_DEBUGVIEW_CODE;\n    return r;\n}\n\ninline mp_exp_t mpreal::get_emin (void)\n{\n    return mpfr_get_emin();\n}\n\ninline int mpreal::set_emin (mp_exp_t exp)\n{\n    return mpfr_set_emin(exp);\n}\n\ninline mp_exp_t mpreal::get_emax (void)\n{\n    return mpfr_get_emax();\n}\n\ninline int mpreal::set_emax (mp_exp_t exp)\n{\n    return mpfr_set_emax(exp);\n}\n\ninline mp_exp_t mpreal::get_emin_min (void)\n{\n    return mpfr_get_emin_min();\n}\n\ninline mp_exp_t mpreal::get_emin_max (void)\n{\n    return mpfr_get_emin_max();\n}\n\ninline mp_exp_t mpreal::get_emax_min (void)\n{\n    return mpfr_get_emax_min();\n}\n\ninline mp_exp_t mpreal::get_emax_max (void)\n{\n    return mpfr_get_emax_max();\n}\n\n//////////////////////////////////////////////////////////////////////////\n// Mathematical Functions\n//////////////////////////////////////////////////////////////////////////\n#define MPREAL_UNARY_MATH_FUNCTION_BODY(f)                    \\\n        mpreal y(0, mpfr_get_prec(x.mpfr_srcptr()));          \\\n        mpfr_##f(y.mpfr_ptr(), x.mpfr_srcptr(), r);           \\\n        return y; \n\ninline const mpreal sqr  (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd())\n{   MPREAL_UNARY_MATH_FUNCTION_BODY(sqr );    }\n\ninline const mpreal sqrt (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd())\n{   MPREAL_UNARY_MATH_FUNCTION_BODY(sqrt);    }\n\ninline const mpreal sqrt(const unsigned long int x, mp_rnd_t r)\n{\n    mpreal y;\n    mpfr_sqrt_ui(y.mpfr_ptr(), x, r);\n    return y;\n}\n\ninline const mpreal sqrt(const unsigned int v, mp_rnd_t rnd_mode)\n{\n    return sqrt(static_cast<unsigned long int>(v),rnd_mode);\n}\n\ninline const mpreal sqrt(const long int v, mp_rnd_t rnd_mode)\n{\n    if (v>=0)   return sqrt(static_cast<unsigned long int>(v),rnd_mode);\n    else        return mpreal().setNan(); // NaN  \n}\n\ninline const mpreal sqrt(const int v, mp_rnd_t rnd_mode)\n{\n    if (v>=0)   return sqrt(static_cast<unsigned long int>(v),rnd_mode);\n    else        return mpreal().setNan(); // NaN\n}\n\ninline const mpreal root(const mpreal& x, unsigned long int k, mp_rnd_t r = mpreal::get_default_rnd())\n{\n    mpreal y(0, mpfr_get_prec(x.mpfr_srcptr())); \n    #if (MPFR_VERSION >= MPFR_VERSION_NUM(4,0,0))\n    mpfr_rootn_ui(y.mpfr_ptr(), x.mpfr_srcptr(), k, r);\n    #else\n    mpfr_root(y.mpfr_ptr(), x.mpfr_srcptr(), k, r);\n    #endif\n    return y; \n}\n\ninline const mpreal dim(const mpreal& a, const mpreal& b, mp_rnd_t r = mpreal::get_default_rnd())\n{\n    mpreal y(0, mpfr_get_prec(a.mpfr_srcptr()));\n    mpfr_dim(y.mpfr_ptr(), a.mpfr_srcptr(), b.mpfr_srcptr(), r);\n    return y;\n}\n\ninline int cmpabs(const mpreal& a,const mpreal& b)\n{\n    return mpfr_cmpabs(a.mpfr_ptr(), b.mpfr_srcptr());\n}\n\ninline int sin_cos(mpreal& s, mpreal& c, const mpreal& v, mp_rnd_t rnd_mode = mpreal::get_default_rnd())\n{\n    return mpfr_sin_cos(s.mpfr_ptr(), c.mpfr_ptr(), v.mpfr_srcptr(), rnd_mode);\n}\n\ninline const mpreal sqrt  (const long double v, mp_rnd_t rnd_mode)    {   return sqrt(mpreal(v),rnd_mode);    }\ninline const mpreal sqrt  (const double v, mp_rnd_t rnd_mode)         {   return sqrt(mpreal(v),rnd_mode);    }\n\ninline const mpreal cbrt  (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(cbrt );    }\ninline const mpreal fabs  (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(abs  );    }\ninline const mpreal abs   (const mpreal& x, mp_rnd_t r)                             {   MPREAL_UNARY_MATH_FUNCTION_BODY(abs  );    }\ninline const mpreal log   (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(log  );    }\ninline const mpreal log2  (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(log2 );    }\ninline const mpreal log10 (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(log10);    }\ninline const mpreal exp   (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(exp  );    }\ninline const mpreal exp2  (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(exp2 );    }\ninline const mpreal exp10 (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(exp10);    }\ninline const mpreal cos   (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(cos  );    }\ninline const mpreal sin   (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(sin  );    }\ninline const mpreal tan   (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(tan  );    }\ninline const mpreal sec   (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(sec  );    }\ninline const mpreal csc   (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(csc  );    }\ninline const mpreal cot   (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(cot  );    }\ninline const mpreal acos  (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(acos );    }\ninline const mpreal asin  (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(asin );    }\ninline const mpreal atan  (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(atan );    }\n\ninline const mpreal logb  (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   return log2 (abs(x),r);                    }\n\ninline const mpreal acot  (const mpreal& v, mp_rnd_t r = mpreal::get_default_rnd()) {   return atan (1/v, r);                      }\ninline const mpreal asec  (const mpreal& v, mp_rnd_t r = mpreal::get_default_rnd()) {   return acos (1/v, r);                      }\ninline const mpreal acsc  (const mpreal& v, mp_rnd_t r = mpreal::get_default_rnd()) {   return asin (1/v, r);                      }\ninline const mpreal acoth (const mpreal& v, mp_rnd_t r = mpreal::get_default_rnd()) {   return atanh(1/v, r);                      }\ninline const mpreal asech (const mpreal& v, mp_rnd_t r = mpreal::get_default_rnd()) {   return acosh(1/v, r);                      }\ninline const mpreal acsch (const mpreal& v, mp_rnd_t r = mpreal::get_default_rnd()) {   return asinh(1/v, r);                      }\n\ninline const mpreal cosh  (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(cosh );    }\ninline const mpreal sinh  (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(sinh );    }\ninline const mpreal tanh  (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(tanh );    }\ninline const mpreal sech  (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(sech );    }\ninline const mpreal csch  (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(csch );    }\ninline const mpreal coth  (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(coth );    }\ninline const mpreal acosh (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(acosh);    }\ninline const mpreal asinh (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(asinh);    }\ninline const mpreal atanh (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(atanh);    }\n\ninline const mpreal log1p   (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(log1p  );    }\ninline const mpreal expm1   (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(expm1  );    }\ninline const mpreal eint    (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(eint   );    }\ninline const mpreal gamma   (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(gamma  );    }\ninline const mpreal tgamma  (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(gamma  );    }\ninline const mpreal lngamma (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(lngamma);    }\ninline const mpreal zeta    (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(zeta   );    }\ninline const mpreal erf     (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(erf    );    }\ninline const mpreal erfc    (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(erfc   );    }\ninline const mpreal besselj0(const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(j0     );    }\ninline const mpreal besselj1(const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(j1     );    }\ninline const mpreal bessely0(const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(y0     );    }\ninline const mpreal bessely1(const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(y1     );    }\n\ninline const mpreal nextpow2(const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) \n{   \n    mpreal y(0, x.getPrecision());\n\n    if(!iszero(x)) \n        y = ceil(log2(abs(x,r),r));\n\n    return y;\n}\n\ninline const mpreal atan2 (const mpreal& y, const mpreal& x, mp_rnd_t rnd_mode = mpreal::get_default_rnd())\n{\n    mpreal a(0,(std::max)(y.getPrecision(), x.getPrecision()));\n    mpfr_atan2(a.mpfr_ptr(), y.mpfr_srcptr(), x.mpfr_srcptr(), rnd_mode);\n    return a;\n}\n\ninline const mpreal hypot (const mpreal& x, const mpreal& y, mp_rnd_t rnd_mode = mpreal::get_default_rnd())\n{\n    mpreal a(0,(std::max)(y.getPrecision(), x.getPrecision()));\n    mpfr_hypot(a.mpfr_ptr(), x.mpfr_srcptr(), y.mpfr_srcptr(), rnd_mode);\n    return a;\n}\n\ninline const mpreal hypot(const mpreal& a, const mpreal& b, const mpreal& c)  \n{\n    if(isnan EIGEN_NOT_A_MACRO (a) || isnan EIGEN_NOT_A_MACRO (b) || isnan EIGEN_NOT_A_MACRO(c)) return mpreal().setNan();\n    else\n    {\n        mpreal absa = abs(a), absb = abs(b), absc = abs(c);\n        mpreal w = (std::max)(absa, (std::max)(absb, absc));\n        mpreal r;\n\n        if (!iszero(w))\n        {\n            mpreal iw = 1/w;\n            r = w * sqrt(sqr(absa*iw) + sqr(absb*iw) + sqr(absc*iw));\n        }\n\n        return r; \n    }\n}\n\ninline const mpreal hypot(const mpreal& a, const mpreal& b, const mpreal& c, const mpreal& d)  \n{\n    if(isnan EIGEN_NOT_A_MACRO (a) || isnan EIGEN_NOT_A_MACRO (b) || isnan EIGEN_NOT_A_MACRO (c) || isnan EIGEN_NOT_A_MACRO (d)) return mpreal().setNan();\n    else\n    {\n        mpreal absa = abs(a), absb = abs(b), absc = abs(c), absd = abs(d);\n        mpreal w = (std::max)(absa, (std::max)(absb, (std::max)(absc, absd)));\n        mpreal r;\n\n        if (!iszero(w))\n        {\n            mpreal iw = 1/w;\n            r = w * sqrt(sqr(absa*iw) + sqr(absb*iw) + sqr(absc*iw) + sqr(absd*iw));\n        }\n\n        return r; \n    }\n}\n\ninline const mpreal remainder (const mpreal& x, const mpreal& y, mp_rnd_t rnd_mode = mpreal::get_default_rnd())\n{    \n    mpreal a(0,(std::max)(y.getPrecision(), x.getPrecision()));\n    mpfr_remainder(a.mpfr_ptr(), x.mpfr_srcptr(), y.mpfr_srcptr(), rnd_mode);\n    return a;\n}\n\ninline const mpreal remquo (long* q, const mpreal& x, const mpreal& y, mp_rnd_t rnd_mode = mpreal::get_default_rnd())\n{\n    mpreal a(0,(std::max)(y.getPrecision(), x.getPrecision()));\n    mpfr_remquo(a.mpfr_ptr(),q, x.mpfr_srcptr(), y.mpfr_srcptr(), rnd_mode);\n    return a;\n}\n\ninline const mpreal fac_ui (unsigned long int v, mp_prec_t prec     = mpreal::get_default_prec(),\n\t\t\t                                     mp_rnd_t  rnd_mode = mpreal::get_default_rnd())\n{\n    mpreal x(0, prec);\n    mpfr_fac_ui(x.mpfr_ptr(),v,rnd_mode);\n    return x;\n}\n\n\ninline const mpreal lgamma (const mpreal& v, int *signp = 0, mp_rnd_t rnd_mode = mpreal::get_default_rnd())\n{\n    mpreal x(v);\n    int tsignp;\n\n    if(signp)   mpfr_lgamma(x.mpfr_ptr(),  signp,v.mpfr_srcptr(),rnd_mode);\n    else        mpfr_lgamma(x.mpfr_ptr(),&tsignp,v.mpfr_srcptr(),rnd_mode);\n\n    return x;\n}\n\n\ninline const mpreal besseljn (long n, const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd())\n{\n    mpreal  y(0, x.getPrecision());\n    mpfr_jn(y.mpfr_ptr(), n, x.mpfr_srcptr(), r);\n    return y;\n}\n\ninline const mpreal besselyn (long n, const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd())\n{\n    mpreal  y(0, x.getPrecision());\n    mpfr_yn(y.mpfr_ptr(), n, x.mpfr_srcptr(), r);\n    return y;\n}\n\ninline const mpreal fma (const mpreal& v1, const mpreal& v2, const mpreal& v3, mp_rnd_t rnd_mode = mpreal::get_default_rnd())\n{\n    mpreal a;\n    mp_prec_t p1, p2, p3;\n\n    p1 = v1.get_prec(); \n    p2 = v2.get_prec(); \n    p3 = v3.get_prec(); \n\n    a.set_prec(p3>p2?(p3>p1?p3:p1):(p2>p1?p2:p1));\n\n    mpfr_fma(a.mp,v1.mp,v2.mp,v3.mp,rnd_mode);\n    return a;\n}\n\ninline const mpreal fms (const mpreal& v1, const mpreal& v2, const mpreal& v3, mp_rnd_t rnd_mode = mpreal::get_default_rnd())\n{\n    mpreal a;\n    mp_prec_t p1, p2, p3;\n\n    p1 = v1.get_prec(); \n    p2 = v2.get_prec(); \n    p3 = v3.get_prec(); \n\n    a.set_prec(p3>p2?(p3>p1?p3:p1):(p2>p1?p2:p1));\n\n    mpfr_fms(a.mp,v1.mp,v2.mp,v3.mp,rnd_mode);\n    return a;\n}\n\ninline const mpreal agm (const mpreal& v1, const mpreal& v2, mp_rnd_t rnd_mode = mpreal::get_default_rnd())\n{\n    mpreal a;\n    mp_prec_t p1, p2;\n\n    p1 = v1.get_prec(); \n    p2 = v2.get_prec(); \n\n    a.set_prec(p1>p2?p1:p2);\n\n    mpfr_agm(a.mp, v1.mp, v2.mp, rnd_mode);\n\n    return a;\n}\n\ninline const mpreal sum (const mpreal tab[], const unsigned long int n, int& status, mp_rnd_t mode = mpreal::get_default_rnd())\n{\n    mpfr_srcptr *p = new mpfr_srcptr[n];\n\n    for (unsigned long int  i = 0; i < n; i++)\n        p[i] = tab[i].mpfr_srcptr();\n\n    mpreal x;\n    status = mpfr_sum(x.mpfr_ptr(), (mpfr_ptr*)p, n, mode);\n    \n    delete [] p;\n    return x;\n}\n\n//////////////////////////////////////////////////////////////////////////\n// MPFR 2.4.0 Specifics\n#if (MPFR_VERSION >= MPFR_VERSION_NUM(2,4,0))\n\ninline int sinh_cosh(mpreal& s, mpreal& c, const mpreal& v, mp_rnd_t rnd_mode = mpreal::get_default_rnd())\n{\n    return mpfr_sinh_cosh(s.mp,c.mp,v.mp,rnd_mode);\n}\n\ninline const mpreal li2 (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) \n{   \n    MPREAL_UNARY_MATH_FUNCTION_BODY(li2);    \n}\n\ninline const mpreal rem (const mpreal& x, const mpreal& y, mp_rnd_t rnd_mode = mpreal::get_default_rnd())\n{\n    /*  R = rem(X,Y) if Y != 0, returns X - n * Y where n = trunc(X/Y). */\n    return fmod(x, y, rnd_mode);\n}\n\ninline const mpreal mod (const mpreal& x, const mpreal& y, mp_rnd_t rnd_mode = mpreal::get_default_rnd())\n{\n    (void)rnd_mode;\n    \n    /*  \n\n    m = mod(x,y) if y != 0, returns x - n*y where n = floor(x/y)\n\n    The following are true by convention:\n    - mod(x,0) is x\n    - mod(x,x) is 0\n    - mod(x,y) for x != y and y != 0 has the same sign as y.    \n    \n    */\n\n    if(iszero(y)) return x;\n    if(x == y) return 0;\n\n    mpreal m = x - floor(x / y) * y;\n\n    return copysign(abs(m),y); // make sure result has the same sign as Y\n}\n\ninline const mpreal fmod (const mpreal& x, const mpreal& y, mp_rnd_t rnd_mode = mpreal::get_default_rnd())\n{\n    mpreal a;\n    mp_prec_t yp, xp;\n\n    yp = y.get_prec(); \n    xp = x.get_prec(); \n\n    a.set_prec(yp>xp?yp:xp);\n\n    mpfr_fmod(a.mp, x.mp, y.mp, rnd_mode);\n\n    return a;\n}\n\ninline const mpreal rec_sqrt(const mpreal& v, mp_rnd_t rnd_mode = mpreal::get_default_rnd())\n{\n    mpreal x(v);\n    mpfr_rec_sqrt(x.mp,v.mp,rnd_mode);\n    return x;\n}\n#endif //  MPFR 2.4.0 Specifics\n\n//////////////////////////////////////////////////////////////////////////\n// MPFR 3.0.0 Specifics\n#if (MPFR_VERSION >= MPFR_VERSION_NUM(3,0,0))\ninline const mpreal digamma (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(digamma);     }\ninline const mpreal ai      (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(ai);          }\n#endif // MPFR 3.0.0 Specifics\n\n//////////////////////////////////////////////////////////////////////////\n// Constants\ninline const mpreal const_log2 (mp_prec_t p = mpreal::get_default_prec(), mp_rnd_t r = mpreal::get_default_rnd())\n{\n    mpreal x(0, p);\n    mpfr_const_log2(x.mpfr_ptr(), r);\n    return x;\n}\n\ninline const mpreal const_pi (mp_prec_t p = mpreal::get_default_prec(), mp_rnd_t r = mpreal::get_default_rnd())\n{\n    mpreal x(0, p);\n    mpfr_const_pi(x.mpfr_ptr(), r);\n    return x;\n}\n\ninline const mpreal const_euler (mp_prec_t p = mpreal::get_default_prec(), mp_rnd_t r = mpreal::get_default_rnd())\n{\n    mpreal x(0, p);\n    mpfr_const_euler(x.mpfr_ptr(), r);\n    return x;\n}\n\ninline const mpreal const_catalan (mp_prec_t p = mpreal::get_default_prec(), mp_rnd_t r = mpreal::get_default_rnd())\n{\n    mpreal x(0, p);\n    mpfr_const_catalan(x.mpfr_ptr(), r);\n    return x;\n}\n\ninline const mpreal const_infinity (int sign = 1, mp_prec_t p = mpreal::get_default_prec())\n{\n    mpreal x(0, p);\n    mpfr_set_inf(x.mpfr_ptr(), sign);\n    return x;\n}\n\n//////////////////////////////////////////////////////////////////////////\n// Integer Related Functions\ninline const mpreal ceil(const mpreal& v)\n{\n    mpreal x(v);\n    mpfr_ceil(x.mp,v.mp);\n    return x;\n}\n\ninline const mpreal floor(const mpreal& v)\n{\n    mpreal x(v);\n    mpfr_floor(x.mp,v.mp);\n    return x;\n}\n\ninline const mpreal round(const mpreal& v)\n{\n    mpreal x(v);\n    mpfr_round(x.mp,v.mp);\n    return x;\n}\n\ninline const mpreal trunc(const mpreal& v)\n{\n    mpreal x(v);\n    mpfr_trunc(x.mp,v.mp);\n    return x;\n}\n\ninline const mpreal rint       (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(rint      );     }\ninline const mpreal rint_ceil  (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(rint_ceil );     }\ninline const mpreal rint_floor (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(rint_floor);     }\ninline const mpreal rint_round (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(rint_round);     }\ninline const mpreal rint_trunc (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(rint_trunc);     }\ninline const mpreal frac       (const mpreal& x, mp_rnd_t r = mpreal::get_default_rnd()) {   MPREAL_UNARY_MATH_FUNCTION_BODY(frac      );     }\n\n//////////////////////////////////////////////////////////////////////////\n// Miscellaneous Functions\ninline int sgn(const mpreal& op)\n{\n    // Please note, this is classic signum function which ignores sign of zero.\n    // Use signbit if you need sign of zero.\n    return mpfr_sgn(op.mpfr_srcptr());\n}\n\n//////////////////////////////////////////////////////////////////////////\n// Miscellaneous Functions\ninline void         swap (mpreal& a, mpreal& b)            {    mpfr_swap(a.mpfr_ptr(),b.mpfr_ptr());   }\ninline const mpreal (max)(const mpreal& x, const mpreal& y){    return (x>y?x:y);       }\ninline const mpreal (min)(const mpreal& x, const mpreal& y){    return (x<y?x:y);       }\n\ninline const mpreal fmax(const mpreal& x, const mpreal& y, mp_rnd_t rnd_mode = mpreal::get_default_rnd())\n{\n    mpreal a;\n    mpfr_max(a.mp,x.mp,y.mp,rnd_mode);\n    return a;\n}\n\ninline const mpreal fmin(const mpreal& x, const mpreal& y,  mp_rnd_t rnd_mode = mpreal::get_default_rnd())\n{\n    mpreal a;\n    mpfr_min(a.mp,x.mp,y.mp,rnd_mode);\n    return a;\n}\n\ninline const mpreal nexttoward (const mpreal& x, const mpreal& y)\n{\n    mpreal a(x);\n    mpfr_nexttoward(a.mp,y.mp);\n    return a;\n}\n\ninline const mpreal nextabove  (const mpreal& x)\n{\n    mpreal a(x);\n    mpfr_nextabove(a.mp);\n    return a;\n}\n\ninline const mpreal nextbelow  (const mpreal& x)\n{\n    mpreal a(x);\n    mpfr_nextbelow(a.mp);\n    return a;\n}\n\ninline const mpreal urandomb (gmp_randstate_t& state)\n{\n    mpreal x;\n    mpfr_urandomb(x.mpfr_ptr(),state);\n    return x;\n}\n\n#if (MPFR_VERSION >= MPFR_VERSION_NUM(3,0,0))\ninline const mpreal urandom (gmp_randstate_t& state, mp_rnd_t rnd_mode = mpreal::get_default_rnd())\n{\n    mpreal x;\n    mpfr_urandom(x.mpfr_ptr(), state, rnd_mode);\n    return x;\n}\n#endif\n\n#if (MPFR_VERSION <= MPFR_VERSION_NUM(2,4,2))\ninline const mpreal random2 (mp_size_t size, mp_exp_t exp)\n{\n    mpreal x;\n    mpfr_random2(x.mpfr_ptr(),size,exp);\n    return x;\n}\n#endif\n\n// Uniformly distributed random number generation\n// a = random(seed); <- initialization & first random number generation\n// a = random();     <- next random numbers generation\n// seed != 0\ninline const mpreal random(unsigned int seed = 0)\n{\n#if (MPFR_VERSION >= MPFR_VERSION_NUM(3,0,0))\n    static gmp_randstate_t state;\n    static bool initialize = true;\n\n    if(initialize)\n    {\n        gmp_randinit_default(state);\n        gmp_randseed_ui(state,0);\n        initialize = false;\n    }\n\n    if(seed != 0)    gmp_randseed_ui(state,seed);\n\n    return mpfr::urandom(state);\n#else\n    if(seed != 0)    std::srand(seed);\n    return mpfr::mpreal(std::rand()/(double)RAND_MAX);\n#endif\n\n}\n\n#if (MPFR_VERSION >= MPFR_VERSION_NUM(3,1,0) && MPFR_VERSION < MPFR_VERSION_NUM(4,0,0))\n\n// TODO: \n// Use mpfr_nrandom since mpfr_grandom is deprecated\n#if defined(_MSC_VER)\n#pragma warning( push )\n#pragma warning( disable : 1478)\n#endif\ninline const mpreal grandom (gmp_randstate_t& state, mp_rnd_t rnd_mode = mpreal::get_default_rnd())\n{\n    mpreal x;\n    mpfr_grandom(x.mpfr_ptr(), NULL, state, rnd_mode);\n    return x;\n}\n#if defined(_MSC_VER)\n#pragma warning( pop )\n#endif\n\ninline const mpreal grandom(unsigned int seed = 0)\n{\n    static gmp_randstate_t state;\n    static bool initialize = true;\n\n    if(initialize)\n    {\n        gmp_randinit_default(state);\n        gmp_randseed_ui(state,0);\n        initialize = false;\n    }\n\n    if(seed != 0) gmp_randseed_ui(state,seed);\n\n    return mpfr::grandom(state);\n}\n#endif\n\n//////////////////////////////////////////////////////////////////////////\n// Set/Get global properties\ninline void mpreal::set_default_prec(mp_prec_t prec)\n{ \n    mpfr_set_default_prec(prec); \n}\n\ninline void mpreal::set_default_rnd(mp_rnd_t rnd_mode)\n{ \n    mpfr_set_default_rounding_mode(rnd_mode); \n}\n\ninline bool mpreal::fits_in_bits(double x, int n)\n{   \n    int i;\n    double t;\n    return IsInf(x) || (std::modf ( std::ldexp ( std::frexp ( x, &i ), n ), &t ) == 0.0);\n}\n\ninline const mpreal pow(const mpreal& a, const mpreal& b, mp_rnd_t rnd_mode = mpreal::get_default_rnd())\n{\n    mpreal x(a);\n    mpfr_pow(x.mp,x.mp,b.mp,rnd_mode);\n    return x;\n}\n\ninline const mpreal pow(const mpreal& a, const mpz_t b, mp_rnd_t rnd_mode = mpreal::get_default_rnd())\n{\n    mpreal x(a);\n    mpfr_pow_z(x.mp,x.mp,b,rnd_mode);\n    return x;\n}\n\ninline const mpreal pow(const mpreal& a, const unsigned long int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd())\n{\n    mpreal x(a);\n    mpfr_pow_ui(x.mp,x.mp,b,rnd_mode);\n    return x;\n}\n\ninline const mpreal pow(const mpreal& a, const unsigned int b, mp_rnd_t rnd_mode)\n{\n    return pow(a,static_cast<unsigned long int>(b),rnd_mode);\n}\n\ninline const mpreal pow(const mpreal& a, const long int b, mp_rnd_t rnd_mode = mpreal::get_default_rnd())\n{\n    mpreal x(a);\n    mpfr_pow_si(x.mp,x.mp,b,rnd_mode);\n    return x;\n}\n\ninline const mpreal pow(const mpreal& a, const int b, mp_rnd_t rnd_mode)\n{\n    return pow(a,static_cast<long int>(b),rnd_mode);\n}\n\ninline const mpreal pow(const mpreal& a, const long double b, mp_rnd_t rnd_mode)\n{\n    return pow(a,mpreal(b),rnd_mode);\n}\n\ninline const mpreal pow(const mpreal& a, const double b, mp_rnd_t rnd_mode)\n{\n    return pow(a,mpreal(b),rnd_mode);\n}\n\ninline const mpreal pow(const unsigned long int a, const mpreal& b, mp_rnd_t rnd_mode = mpreal::get_default_rnd())\n{\n    mpreal x(a);\n    mpfr_ui_pow(x.mp,a,b.mp,rnd_mode);\n    return x;\n}\n\ninline const mpreal pow(const unsigned int a, const mpreal& b, mp_rnd_t rnd_mode)\n{\n    return pow(static_cast<unsigned long int>(a),b,rnd_mode);\n}\n\ninline const mpreal pow(const long int a, const mpreal& b, mp_rnd_t rnd_mode)\n{\n    if (a>=0)     return pow(static_cast<unsigned long int>(a),b,rnd_mode);\n    else          return pow(mpreal(a),b,rnd_mode);\n}\n\ninline const mpreal pow(const int a, const mpreal& b, mp_rnd_t rnd_mode)\n{\n    if (a>=0)     return pow(static_cast<unsigned long int>(a),b,rnd_mode);\n    else          return pow(mpreal(a),b,rnd_mode);\n}\n\ninline const mpreal pow(const long double a, const mpreal& b, mp_rnd_t rnd_mode)\n{\n    return pow(mpreal(a),b,rnd_mode);\n}\n\ninline const mpreal pow(const double a, const mpreal& b, mp_rnd_t rnd_mode)\n{\n    return pow(mpreal(a),b,rnd_mode);\n}\n\n// pow unsigned long int\ninline const mpreal pow(const unsigned long int a, const unsigned long int b, mp_rnd_t rnd_mode)\n{\n    mpreal x(a);\n    mpfr_ui_pow_ui(x.mp,a,b,rnd_mode);\n    return x;\n}\n\ninline const mpreal pow(const unsigned long int a, const unsigned int b, mp_rnd_t rnd_mode)\n{\n    return pow(a,static_cast<unsigned long int>(b),rnd_mode); //mpfr_ui_pow_ui\n}\n\ninline const mpreal pow(const unsigned long int a, const long int b, mp_rnd_t rnd_mode)\n{\n    if(b>0)    return pow(a,static_cast<unsigned long int>(b),rnd_mode); //mpfr_ui_pow_ui\n    else       return pow(a,mpreal(b),rnd_mode); //mpfr_ui_pow\n}\n\ninline const mpreal pow(const unsigned long int a, const int b, mp_rnd_t rnd_mode)\n{\n    if(b>0)    return pow(a,static_cast<unsigned long int>(b),rnd_mode); //mpfr_ui_pow_ui\n    else       return pow(a,mpreal(b),rnd_mode); //mpfr_ui_pow\n}\n\ninline const mpreal pow(const unsigned long int a, const long double b, mp_rnd_t rnd_mode)\n{\n    return pow(a,mpreal(b),rnd_mode); //mpfr_ui_pow\n}\n\ninline const mpreal pow(const unsigned long int a, const double b, mp_rnd_t rnd_mode)\n{\n    return pow(a,mpreal(b),rnd_mode); //mpfr_ui_pow\n}\n\n// pow unsigned int\ninline const mpreal pow(const unsigned int a, const unsigned long int b, mp_rnd_t rnd_mode)\n{\n    return pow(static_cast<unsigned long int>(a),b,rnd_mode); //mpfr_ui_pow_ui\n}\n\ninline const mpreal pow(const unsigned int a, const unsigned int b, mp_rnd_t rnd_mode)\n{\n    return pow(static_cast<unsigned long int>(a),static_cast<unsigned long int>(b),rnd_mode); //mpfr_ui_pow_ui\n}\n\ninline const mpreal pow(const unsigned int a, const long int b, mp_rnd_t rnd_mode)\n{\n    if(b>0) return pow(static_cast<unsigned long int>(a),static_cast<unsigned long int>(b),rnd_mode); //mpfr_ui_pow_ui\n    else    return pow(static_cast<unsigned long int>(a),mpreal(b),rnd_mode); //mpfr_ui_pow\n}\n\ninline const mpreal pow(const unsigned int a, const int b, mp_rnd_t rnd_mode)\n{\n    if(b>0) return pow(static_cast<unsigned long int>(a),static_cast<unsigned long int>(b),rnd_mode); //mpfr_ui_pow_ui\n    else    return pow(static_cast<unsigned long int>(a),mpreal(b),rnd_mode); //mpfr_ui_pow\n}\n\ninline const mpreal pow(const unsigned int a, const long double b, mp_rnd_t rnd_mode)\n{\n    return pow(static_cast<unsigned long int>(a),mpreal(b),rnd_mode); //mpfr_ui_pow\n}\n\ninline const mpreal pow(const unsigned int a, const double b, mp_rnd_t rnd_mode)\n{\n    return pow(static_cast<unsigned long int>(a),mpreal(b),rnd_mode); //mpfr_ui_pow\n}\n\n// pow long int\ninline const mpreal pow(const long int a, const unsigned long int b, mp_rnd_t rnd_mode)\n{\n    if (a>0) return pow(static_cast<unsigned long int>(a),b,rnd_mode); //mpfr_ui_pow_ui\n    else     return pow(mpreal(a),b,rnd_mode); //mpfr_pow_ui\n}\n\ninline const mpreal pow(const long int a, const unsigned int b, mp_rnd_t rnd_mode)\n{\n    if (a>0) return pow(static_cast<unsigned long int>(a),static_cast<unsigned long int>(b),rnd_mode);  //mpfr_ui_pow_ui\n    else     return pow(mpreal(a),static_cast<unsigned long int>(b),rnd_mode); //mpfr_pow_ui\n}\n\ninline const mpreal pow(const long int a, const long int b, mp_rnd_t rnd_mode)\n{\n    if (a>0)\n    {\n        if(b>0) return pow(static_cast<unsigned long int>(a),static_cast<unsigned long int>(b),rnd_mode); //mpfr_ui_pow_ui\n        else    return pow(static_cast<unsigned long int>(a),mpreal(b),rnd_mode); //mpfr_ui_pow\n    }else{\n        return pow(mpreal(a),b,rnd_mode); // mpfr_pow_si\n    }\n}\n\ninline const mpreal pow(const long int a, const int b, mp_rnd_t rnd_mode)\n{\n    if (a>0)\n    {\n        if(b>0) return pow(static_cast<unsigned long int>(a),static_cast<unsigned long int>(b),rnd_mode); //mpfr_ui_pow_ui\n        else    return pow(static_cast<unsigned long int>(a),mpreal(b),rnd_mode); //mpfr_ui_pow\n    }else{\n        return pow(mpreal(a),static_cast<long int>(b),rnd_mode); // mpfr_pow_si\n    }\n}\n\ninline const mpreal pow(const long int a, const long double b, mp_rnd_t rnd_mode)\n{\n    if (a>=0)   return pow(static_cast<unsigned long int>(a),mpreal(b),rnd_mode); //mpfr_ui_pow\n    else        return pow(mpreal(a),mpreal(b),rnd_mode); //mpfr_pow\n}\n\ninline const mpreal pow(const long int a, const double b, mp_rnd_t rnd_mode)\n{\n    if (a>=0)   return pow(static_cast<unsigned long int>(a),mpreal(b),rnd_mode); //mpfr_ui_pow\n    else        return pow(mpreal(a),mpreal(b),rnd_mode); //mpfr_pow\n}\n\n// pow int\ninline const mpreal pow(const int a, const unsigned long int b, mp_rnd_t rnd_mode)\n{\n    if (a>0) return pow(static_cast<unsigned long int>(a),b,rnd_mode); //mpfr_ui_pow_ui\n    else     return pow(mpreal(a),b,rnd_mode); //mpfr_pow_ui\n}\n\ninline const mpreal pow(const int a, const unsigned int b, mp_rnd_t rnd_mode)\n{\n    if (a>0) return pow(static_cast<unsigned long int>(a),static_cast<unsigned long int>(b),rnd_mode);  //mpfr_ui_pow_ui\n    else     return pow(mpreal(a),static_cast<unsigned long int>(b),rnd_mode); //mpfr_pow_ui\n}\n\ninline const mpreal pow(const int a, const long int b, mp_rnd_t rnd_mode)\n{\n    if (a>0)\n    {\n        if(b>0) return pow(static_cast<unsigned long int>(a),static_cast<unsigned long int>(b),rnd_mode); //mpfr_ui_pow_ui\n        else    return pow(static_cast<unsigned long int>(a),mpreal(b),rnd_mode); //mpfr_ui_pow\n    }else{\n        return pow(mpreal(a),b,rnd_mode); // mpfr_pow_si\n    }\n}\n\ninline const mpreal pow(const int a, const int b, mp_rnd_t rnd_mode)\n{\n    if (a>0)\n    {\n        if(b>0) return pow(static_cast<unsigned long int>(a),static_cast<unsigned long int>(b),rnd_mode); //mpfr_ui_pow_ui\n        else    return pow(static_cast<unsigned long int>(a),mpreal(b),rnd_mode); //mpfr_ui_pow\n    }else{\n        return pow(mpreal(a),static_cast<long int>(b),rnd_mode); // mpfr_pow_si\n    }\n}\n\ninline const mpreal pow(const int a, const long double b, mp_rnd_t rnd_mode)\n{\n    if (a>=0)   return pow(static_cast<unsigned long int>(a),mpreal(b),rnd_mode); //mpfr_ui_pow\n    else        return pow(mpreal(a),mpreal(b),rnd_mode); //mpfr_pow\n}\n\ninline const mpreal pow(const int a, const double b, mp_rnd_t rnd_mode)\n{\n    if (a>=0)   return pow(static_cast<unsigned long int>(a),mpreal(b),rnd_mode); //mpfr_ui_pow\n    else        return pow(mpreal(a),mpreal(b),rnd_mode); //mpfr_pow\n}\n\n// pow long double \ninline const mpreal pow(const long double a, const long double b, mp_rnd_t rnd_mode)\n{\n    return pow(mpreal(a),mpreal(b),rnd_mode);\n}\n\ninline const mpreal pow(const long double a, const unsigned long int b, mp_rnd_t rnd_mode)\n{\n    return pow(mpreal(a),b,rnd_mode); //mpfr_pow_ui\n}\n\ninline const mpreal pow(const long double a, const unsigned int b, mp_rnd_t rnd_mode)\n{\n    return pow(mpreal(a),static_cast<unsigned long int>(b),rnd_mode); //mpfr_pow_ui\n}\n\ninline const mpreal pow(const long double a, const long int b, mp_rnd_t rnd_mode)\n{\n    return pow(mpreal(a),b,rnd_mode); // mpfr_pow_si\n}\n\ninline const mpreal pow(const long double a, const int b, mp_rnd_t rnd_mode)\n{\n    return pow(mpreal(a),static_cast<long int>(b),rnd_mode); // mpfr_pow_si\n}\n\ninline const mpreal pow(const double a, const double b, mp_rnd_t rnd_mode)\n{\n    return pow(mpreal(a),mpreal(b),rnd_mode);\n}\n\ninline const mpreal pow(const double a, const unsigned long int b, mp_rnd_t rnd_mode)\n{\n    return pow(mpreal(a),b,rnd_mode); // mpfr_pow_ui\n}\n\ninline const mpreal pow(const double a, const unsigned int b, mp_rnd_t rnd_mode)\n{\n    return pow(mpreal(a),static_cast<unsigned long int>(b),rnd_mode); // mpfr_pow_ui\n}\n\ninline const mpreal pow(const double a, const long int b, mp_rnd_t rnd_mode)\n{\n    return pow(mpreal(a),b,rnd_mode); // mpfr_pow_si\n}\n\ninline const mpreal pow(const double a, const int b, mp_rnd_t rnd_mode)\n{\n    return pow(mpreal(a),static_cast<long int>(b),rnd_mode); // mpfr_pow_si\n}\n} // End of mpfr namespace\n\n// Explicit specialization of std::swap for mpreal numbers\n// Thus standard algorithms will use efficient version of swap (due to Koenig lookup)\n// Non-throwing swap C++ idiom: http://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/Non-throwing_swap\nnamespace std\n{\n\t// we are allowed to extend namespace std with specializations only\n    template <>\n    inline void swap(mpfr::mpreal& x, mpfr::mpreal& y) \n    { \n        return mpfr::swap(x, y); \n    }\n\n    template<>\n    class numeric_limits<mpfr::mpreal>\n    {\n    public:\n        static const bool is_specialized    = true;\n        static const bool is_signed         = true;\n        static const bool is_integer        = false;\n        static const bool is_exact          = false;\n        static const int  radix             = 2;    \n\n        static const bool has_infinity      = true;\n        static const bool has_quiet_NaN     = true;\n        static const bool has_signaling_NaN = true;\n\n        static const bool is_iec559         = true;        // = IEEE 754\n        static const bool is_bounded        = true;\n        static const bool is_modulo         = false;\n        static const bool traps             = true;\n        static const bool tinyness_before   = true;\n\n        static const float_denorm_style has_denorm  = denorm_absent;\n\n        inline static mpfr::mpreal (min)    (mp_prec_t precision = mpfr::mpreal::get_default_prec()) {  return  mpfr::minval(precision);  }\n        inline static mpfr::mpreal (max)    (mp_prec_t precision = mpfr::mpreal::get_default_prec()) {  return  mpfr::maxval(precision);  }\n        inline static mpfr::mpreal lowest   (mp_prec_t precision = mpfr::mpreal::get_default_prec()) {  return -mpfr::maxval(precision);  }\n\n        // Returns smallest eps such that 1 + eps != 1 (classic machine epsilon)\n        inline static mpfr::mpreal epsilon(mp_prec_t precision = mpfr::mpreal::get_default_prec()) {  return  mpfr::machine_epsilon(precision); }\n\t\t\n        // Returns smallest eps such that x + eps != x (relative machine epsilon)\n        inline static mpfr::mpreal epsilon(const mpfr::mpreal& x) {  return mpfr::machine_epsilon(x);  }\n\n        inline static mpfr::mpreal round_error(mp_prec_t precision = mpfr::mpreal::get_default_prec())\n        {\n            mp_rnd_t r = mpfr::mpreal::get_default_rnd();\n\n            if(r == GMP_RNDN)  return mpfr::mpreal(0.5, precision); \n            else               return mpfr::mpreal(1.0, precision);    \n        }\n\n        inline static const mpfr::mpreal infinity()         { return mpfr::const_infinity();     }\n        inline static const mpfr::mpreal quiet_NaN()        { return mpfr::mpreal().setNan();    }\n        inline static const mpfr::mpreal signaling_NaN()    { return mpfr::mpreal().setNan();    }\n        inline static const mpfr::mpreal denorm_min()       { return (min)();                    }\n\n        // Please note, exponent range is not fixed in MPFR\n        static const int min_exponent = MPFR_EMIN_DEFAULT;\n        static const int max_exponent = MPFR_EMAX_DEFAULT;\n        MPREAL_PERMISSIVE_EXPR static const int min_exponent10 = (int) (MPFR_EMIN_DEFAULT * 0.3010299956639811); \n        MPREAL_PERMISSIVE_EXPR static const int max_exponent10 = (int) (MPFR_EMAX_DEFAULT * 0.3010299956639811); \n\n#ifdef MPREAL_HAVE_DYNAMIC_STD_NUMERIC_LIMITS\n\n        // Following members should be constant according to standard, but they can be variable in MPFR\n        // So we define them as functions here. \n        //\n        // This is preferable way for std::numeric_limits<mpfr::mpreal> specialization.\n        // But it is incompatible with standard std::numeric_limits and might not work with other libraries, e.g. boost. \n        // See below for compatible implementation. \n        inline static float_round_style round_style()\n        {\n            mp_rnd_t r = mpfr::mpreal::get_default_rnd();\n\n            switch (r)\n            {\n            case GMP_RNDN: return round_to_nearest;\n            case GMP_RNDZ: return round_toward_zero; \n            case GMP_RNDU: return round_toward_infinity; \n            case GMP_RNDD: return round_toward_neg_infinity; \n            default: return round_indeterminate;\n            }\n        }\n\n        inline static int digits()                        {    return int(mpfr::mpreal::get_default_prec());    }\n        inline static int digits(const mpfr::mpreal& x)   {    return x.getPrecision();                         }\n\n        inline static int digits10(mp_prec_t precision = mpfr::mpreal::get_default_prec())\n        {\n            return mpfr::bits2digits(precision);\n        }\n\n        inline static int digits10(const mpfr::mpreal& x)\n        {\n            return mpfr::bits2digits(x.getPrecision());\n        }\n\n        inline static int max_digits10(mp_prec_t precision = mpfr::mpreal::get_default_prec())\n        {\n            return digits10(precision);\n        }\n#else\n        // Digits and round_style are NOT constants when it comes to mpreal.\n        // If possible, please use functions digits() and round_style() defined above.\n        //\n        // These (default) values are preserved for compatibility with existing libraries, e.g. boost.\n        // Change them accordingly to your application. \n        //\n        // For example, if you use 256 bits of precision uniformly in your program, then:\n        // digits       = 256\n        // digits10     = 77 \n        // max_digits10 = 78\n        // \n        // Approximate formula for decimal digits is: digits10 = floor(log10(2) * digits). See bits2digits() for more details.\n\n        static const std::float_round_style round_style = round_to_nearest;\n        static const int digits       = 53;\n        static const int digits10     = 15;\n        static const int max_digits10 = 16;\n#endif\n    };\n\n}\n\n#endif /* __MPREAL_H__ */\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/mpreal_support.cpp",
    "content": "#include \"main.h\"\n#include <Eigen/MPRealSupport>\n#include <Eigen/LU>\n#include <Eigen/Eigenvalues>\n#include <sstream>\n\nusing namespace mpfr;\nusing namespace Eigen;\n\nEIGEN_DECLARE_TEST(mpreal_support)\n{\n  // set precision to 256 bits (double has only 53 bits)\n  mpreal::set_default_prec(256);\n  typedef Matrix<mpreal,Eigen::Dynamic,Eigen::Dynamic> MatrixXmp;\n  typedef Matrix<std::complex<mpreal>,Eigen::Dynamic,Eigen::Dynamic> MatrixXcmp;\n\n  std::cerr << \"epsilon =         \" << NumTraits<mpreal>::epsilon() << \"\\n\";\n  std::cerr << \"dummy_precision = \" << NumTraits<mpreal>::dummy_precision() << \"\\n\";\n  std::cerr << \"highest =         \" << NumTraits<mpreal>::highest() << \"\\n\";\n  std::cerr << \"lowest =          \" << NumTraits<mpreal>::lowest() << \"\\n\";\n  std::cerr << \"digits10 =        \" << NumTraits<mpreal>::digits10() << \"\\n\";\n\n  for(int i = 0; i < g_repeat; i++) {\n    int s = Eigen::internal::random<int>(1,100);\n    MatrixXmp A = MatrixXmp::Random(s,s);\n    MatrixXmp B = MatrixXmp::Random(s,s);\n    MatrixXmp S = A.adjoint() * A;\n    MatrixXmp X;\n    MatrixXcmp Ac = MatrixXcmp::Random(s,s);\n    MatrixXcmp Bc = MatrixXcmp::Random(s,s);\n    MatrixXcmp Sc = Ac.adjoint() * Ac;\n    MatrixXcmp Xc;\n    \n    // Basic stuffs\n    VERIFY_IS_APPROX(A.real(), A);\n    VERIFY(Eigen::internal::isApprox(A.array().abs2().sum(), A.squaredNorm()));\n    VERIFY_IS_APPROX(A.array().exp(),         exp(A.array()));\n    VERIFY_IS_APPROX(A.array().abs2().sqrt(), A.array().abs());\n    VERIFY_IS_APPROX(A.array().sin(),         sin(A.array()));\n    VERIFY_IS_APPROX(A.array().cos(),         cos(A.array()));\n\n    // Cholesky\n    X = S.selfadjointView<Lower>().llt().solve(B);\n    VERIFY_IS_APPROX((S.selfadjointView<Lower>()*X).eval(),B);\n\n    Xc = Sc.selfadjointView<Lower>().llt().solve(Bc);\n    VERIFY_IS_APPROX((Sc.selfadjointView<Lower>()*Xc).eval(),Bc);\n    \n    // partial LU\n    X = A.lu().solve(B);\n    VERIFY_IS_APPROX((A*X).eval(),B);\n\n    // symmetric eigenvalues\n    SelfAdjointEigenSolver<MatrixXmp> eig(S);\n    VERIFY_IS_EQUAL(eig.info(), Success);\n    VERIFY( (S.selfadjointView<Lower>() * eig.eigenvectors()).isApprox(eig.eigenvectors() * eig.eigenvalues().asDiagonal(), NumTraits<mpreal>::dummy_precision()*1e3) );\n  }\n  \n  {\n    MatrixXmp A(8,3); A.setRandom();\n    // test output (interesting things happen in this code)\n    std::stringstream stream;\n    stream << A;\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/openglsupport.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include <main.h>\n#include <iostream>\n#include <GL/glew.h>\n#include <Eigen/OpenGLSupport>\n#include <GL/glut.h>\nusing namespace Eigen;\n\n\n\n\n#define VERIFY_MATRIX(CODE,REF) { \\\n    glLoadIdentity(); \\\n    CODE; \\\n    Matrix<float,4,4,ColMajor> m; m.setZero(); \\\n    glGet(GL_MODELVIEW_MATRIX, m); \\\n    if(!(REF).cast<float>().isApprox(m)) { \\\n      std::cerr << \"Expected:\\n\" << ((REF).cast<float>()) << \"\\n\" << \"got\\n\" << m << \"\\n\\n\"; \\\n    } \\\n    VERIFY_IS_APPROX((REF).cast<float>(), m); \\\n  }\n\n#define VERIFY_UNIFORM(SUFFIX,NAME,TYPE) { \\\n    TYPE value; value.setRandom(); \\\n    TYPE data; \\\n    int loc = glGetUniformLocation(prg_id, #NAME); \\\n    VERIFY((loc!=-1) && \"uniform not found\"); \\\n    glUniform(loc,value); \\\n    EIGEN_CAT(glGetUniform,SUFFIX)(prg_id,loc,data.data()); \\\n    if(!value.isApprox(data)) { \\\n      std::cerr << \"Expected:\\n\" << value << \"\\n\" << \"got\\n\" << data << \"\\n\\n\"; \\\n    } \\\n    VERIFY_IS_APPROX(value, data); \\\n  }\n  \n#define VERIFY_UNIFORMi(NAME,TYPE) { \\\n    TYPE value = TYPE::Random().eval().cast<float>().cast<TYPE::Scalar>(); \\\n    TYPE data; \\\n    int loc = glGetUniformLocation(prg_id, #NAME); \\\n    VERIFY((loc!=-1) && \"uniform not found\"); \\\n    glUniform(loc,value); \\\n    glGetUniformiv(prg_id,loc,(GLint*)data.data()); \\\n    if(!value.isApprox(data)) { \\\n      std::cerr << \"Expected:\\n\" << value << \"\\n\" << \"got\\n\" << data << \"\\n\\n\"; \\\n    } \\\n    VERIFY_IS_APPROX(value, data); \\\n  }\n  \nvoid printInfoLog(GLuint objectID)\n{\n    int infologLength, charsWritten;\n    GLchar *infoLog;\n    glGetProgramiv(objectID,GL_INFO_LOG_LENGTH, &infologLength);\n    if(infologLength > 0)\n    {\n        infoLog = new GLchar[infologLength];\n        glGetProgramInfoLog(objectID, infologLength, &charsWritten, infoLog);\n        if (charsWritten>0)\n          std::cerr << \"Shader info : \\n\" << infoLog << std::endl;\n        delete[] infoLog;\n    }\n}\n\nGLint createShader(const char* vtx, const char* frg)\n{\n  GLint prg_id = glCreateProgram();\n  GLint vtx_id = glCreateShader(GL_VERTEX_SHADER);\n  GLint frg_id = glCreateShader(GL_FRAGMENT_SHADER);\n  GLint ok;\n  \n  glShaderSource(vtx_id, 1, &vtx, 0);\n  glCompileShader(vtx_id);\n  glGetShaderiv(vtx_id,GL_COMPILE_STATUS,&ok);\n  if(!ok)\n  {\n    std::cerr << \"vtx compilation failed\\n\";\n  }\n  \n  glShaderSource(frg_id, 1, &frg, 0);\n  glCompileShader(frg_id);\n  glGetShaderiv(frg_id,GL_COMPILE_STATUS,&ok);\n  if(!ok)\n  {\n    std::cerr << \"frg compilation failed\\n\";\n  }\n  \n  glAttachShader(prg_id, vtx_id);\n  glAttachShader(prg_id, frg_id);\n  glLinkProgram(prg_id);\n  glGetProgramiv(prg_id,GL_LINK_STATUS,&ok);\n  if(!ok)\n  {\n    std::cerr << \"linking failed\\n\";\n  }\n  printInfoLog(prg_id);\n  \n  glUseProgram(prg_id);\n  return prg_id;\n}\n\nEIGEN_DECLARE_TEST(openglsupport)\n{\n  int argc = 0;\n  glutInit(&argc, 0);\n  glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);\n  glutInitWindowPosition (0,0);\n  glutInitWindowSize(10, 10);\n\n  if(glutCreateWindow(\"Eigen\") <= 0)\n  {\n    std::cerr << \"Error: Unable to create GLUT Window.\\n\";\n    exit(1);\n  }\n  \n  glewExperimental = GL_TRUE;\n  if(glewInit() != GLEW_OK)\n  {\n    std::cerr << \"Warning: Failed to initialize GLEW\\n\";\n  }\n\n  Vector3f v3f;\n  Matrix3f rot;\n  glBegin(GL_POINTS);\n  \n  glVertex(v3f);\n  glVertex(2*v3f+v3f);\n  glVertex(rot*v3f);\n  \n  glEnd();\n  \n  // 4x4 matrices\n  Matrix4f mf44; mf44.setRandom();\n  VERIFY_MATRIX(glLoadMatrix(mf44), mf44);\n  VERIFY_MATRIX(glMultMatrix(mf44), mf44);\n  Matrix4d md44; md44.setRandom();\n  VERIFY_MATRIX(glLoadMatrix(md44), md44);\n  VERIFY_MATRIX(glMultMatrix(md44), md44);\n  \n  // Quaternion\n  Quaterniond qd(AngleAxisd(internal::random<double>(), Vector3d::Random()));\n  VERIFY_MATRIX(glRotate(qd), Projective3d(qd).matrix());\n  \n  Quaternionf qf(AngleAxisf(internal::random<double>(), Vector3f::Random()));\n  VERIFY_MATRIX(glRotate(qf), Projective3f(qf).matrix());\n  \n  // 3D Transform\n  Transform<float,3,AffineCompact> acf3; acf3.matrix().setRandom();\n  VERIFY_MATRIX(glLoadMatrix(acf3), Projective3f(acf3).matrix());\n  VERIFY_MATRIX(glMultMatrix(acf3), Projective3f(acf3).matrix());\n  \n  Transform<float,3,Affine> af3(acf3);\n  VERIFY_MATRIX(glLoadMatrix(af3), Projective3f(af3).matrix());\n  VERIFY_MATRIX(glMultMatrix(af3), Projective3f(af3).matrix());\n  \n  Transform<float,3,Projective> pf3; pf3.matrix().setRandom();\n  VERIFY_MATRIX(glLoadMatrix(pf3), Projective3f(pf3).matrix());\n  VERIFY_MATRIX(glMultMatrix(pf3), Projective3f(pf3).matrix());\n  \n  Transform<double,3,AffineCompact> acd3; acd3.matrix().setRandom();\n  VERIFY_MATRIX(glLoadMatrix(acd3), Projective3d(acd3).matrix());\n  VERIFY_MATRIX(glMultMatrix(acd3), Projective3d(acd3).matrix());\n  \n  Transform<double,3,Affine> ad3(acd3);\n  VERIFY_MATRIX(glLoadMatrix(ad3), Projective3d(ad3).matrix());\n  VERIFY_MATRIX(glMultMatrix(ad3), Projective3d(ad3).matrix());\n  \n  Transform<double,3,Projective> pd3; pd3.matrix().setRandom();\n  VERIFY_MATRIX(glLoadMatrix(pd3), Projective3d(pd3).matrix());\n  VERIFY_MATRIX(glMultMatrix(pd3), Projective3d(pd3).matrix());\n  \n  // translations (2D and 3D)\n  {\n    Vector2f vf2; vf2.setRandom(); Vector3f vf23; vf23 << vf2, 0;\n    VERIFY_MATRIX(glTranslate(vf2), Projective3f(Translation3f(vf23)).matrix());\n    Vector2d vd2; vd2.setRandom(); Vector3d vd23; vd23 << vd2, 0;\n    VERIFY_MATRIX(glTranslate(vd2), Projective3d(Translation3d(vd23)).matrix());\n    \n    Vector3f vf3; vf3.setRandom();\n    VERIFY_MATRIX(glTranslate(vf3), Projective3f(Translation3f(vf3)).matrix());\n    Vector3d vd3; vd3.setRandom();\n    VERIFY_MATRIX(glTranslate(vd3), Projective3d(Translation3d(vd3)).matrix());\n    \n    Translation<float,3> tf3; tf3.vector().setRandom();\n    VERIFY_MATRIX(glTranslate(tf3), Projective3f(tf3).matrix());\n    \n    Translation<double,3> td3;  td3.vector().setRandom();\n    VERIFY_MATRIX(glTranslate(td3), Projective3d(td3).matrix());\n  }\n  \n  // scaling (2D and 3D)\n  {\n    Vector2f vf2; vf2.setRandom(); Vector3f vf23; vf23 << vf2, 1;\n    VERIFY_MATRIX(glScale(vf2), Projective3f(Scaling(vf23)).matrix());\n    Vector2d vd2; vd2.setRandom(); Vector3d vd23; vd23 << vd2, 1;\n    VERIFY_MATRIX(glScale(vd2), Projective3d(Scaling(vd23)).matrix());\n    \n    Vector3f vf3; vf3.setRandom();\n    VERIFY_MATRIX(glScale(vf3), Projective3f(Scaling(vf3)).matrix());\n    Vector3d vd3; vd3.setRandom();\n    VERIFY_MATRIX(glScale(vd3), Projective3d(Scaling(vd3)).matrix());\n    \n    UniformScaling<float> usf(internal::random<float>());\n    VERIFY_MATRIX(glScale(usf), Projective3f(usf).matrix());\n    \n    UniformScaling<double> usd(internal::random<double>());\n    VERIFY_MATRIX(glScale(usd), Projective3d(usd).matrix());\n  }\n  \n  // uniform\n  {\n    const char* vtx = \"void main(void) { gl_Position = gl_Vertex; }\\n\";\n    \n    if(GLEW_VERSION_2_0)\n    {\n      #ifdef GL_VERSION_2_0\n      const char* frg = \"\"\n        \"uniform vec2 v2f;\\n\"\n        \"uniform vec3 v3f;\\n\"\n        \"uniform vec4 v4f;\\n\"\n        \"uniform ivec2 v2i;\\n\"\n        \"uniform ivec3 v3i;\\n\"\n        \"uniform ivec4 v4i;\\n\"\n        \"uniform mat2 m2f;\\n\"\n        \"uniform mat3 m3f;\\n\"\n        \"uniform mat4 m4f;\\n\"\n        \"void main(void) { gl_FragColor = vec4(v2f[0]+v3f[0]+v4f[0])+vec4(v2i[0]+v3i[0]+v4i[0])+vec4(m2f[0][0]+m3f[0][0]+m4f[0][0]); }\\n\";\n        \n      GLint prg_id = createShader(vtx,frg);\n      \n      VERIFY_UNIFORM(fv,v2f, Vector2f);\n      VERIFY_UNIFORM(fv,v3f, Vector3f);\n      VERIFY_UNIFORM(fv,v4f, Vector4f);\n      VERIFY_UNIFORMi(v2i, Vector2i);\n      VERIFY_UNIFORMi(v3i, Vector3i);\n      VERIFY_UNIFORMi(v4i, Vector4i);\n      VERIFY_UNIFORM(fv,m2f, Matrix2f);\n      VERIFY_UNIFORM(fv,m3f, Matrix3f);\n      VERIFY_UNIFORM(fv,m4f, Matrix4f);\n      #endif\n    }\n    else\n      std::cerr << \"Warning: opengl 2.0 was not tested\\n\";\n    \n    if(GLEW_VERSION_2_1)\n    {\n      #ifdef GL_VERSION_2_1\n      const char* frg = \"#version 120\\n\"\n        \"uniform mat2x3 m23f;\\n\"\n        \"uniform mat3x2 m32f;\\n\"\n        \"uniform mat2x4 m24f;\\n\"\n        \"uniform mat4x2 m42f;\\n\"\n        \"uniform mat3x4 m34f;\\n\"\n        \"uniform mat4x3 m43f;\\n\"\n        \"void main(void) { gl_FragColor = vec4(m23f[0][0]+m32f[0][0]+m24f[0][0]+m42f[0][0]+m34f[0][0]+m43f[0][0]); }\\n\";\n        \n      GLint prg_id = createShader(vtx,frg);\n      \n      typedef Matrix<float,2,3> Matrix23f;\n      typedef Matrix<float,3,2> Matrix32f;\n      typedef Matrix<float,2,4> Matrix24f;\n      typedef Matrix<float,4,2> Matrix42f;\n      typedef Matrix<float,3,4> Matrix34f;\n      typedef Matrix<float,4,3> Matrix43f;\n      \n      VERIFY_UNIFORM(fv,m23f, Matrix23f);\n      VERIFY_UNIFORM(fv,m32f, Matrix32f);\n      VERIFY_UNIFORM(fv,m24f, Matrix24f);\n      VERIFY_UNIFORM(fv,m42f, Matrix42f);\n      VERIFY_UNIFORM(fv,m34f, Matrix34f);\n      VERIFY_UNIFORM(fv,m43f, Matrix43f);\n      #endif\n    }\n    else\n      std::cerr << \"Warning: opengl 2.1 was not tested\\n\";\n    \n    if(GLEW_VERSION_3_0)\n    {\n      #ifdef GL_VERSION_3_0\n      const char* frg = \"#version 150\\n\"\n        \"uniform uvec2 v2ui;\\n\"\n        \"uniform uvec3 v3ui;\\n\"\n        \"uniform uvec4 v4ui;\\n\"\n        \"out vec4 data;\\n\"\n        \"void main(void) { data = vec4(v2ui[0]+v3ui[0]+v4ui[0]); }\\n\";\n        \n      GLint prg_id = createShader(vtx,frg);\n      \n      typedef Matrix<unsigned int,2,1> Vector2ui;\n      typedef Matrix<unsigned int,3,1> Vector3ui;\n      typedef Matrix<unsigned int,4,1> Vector4ui;\n      \n      VERIFY_UNIFORMi(v2ui, Vector2ui);\n      VERIFY_UNIFORMi(v3ui, Vector3ui);\n      VERIFY_UNIFORMi(v4ui, Vector4ui);\n      #endif\n    }\n    else\n      std::cerr << \"Warning: opengl 3.0 was not tested\\n\";\n    \n    #ifdef GLEW_ARB_gpu_shader_fp64\n    if(GLEW_ARB_gpu_shader_fp64)\n    {\n      #ifdef GL_ARB_gpu_shader_fp64\n      const char* frg = \"#version 150\\n\"\n        \"uniform dvec2 v2d;\\n\"\n        \"uniform dvec3 v3d;\\n\"\n        \"uniform dvec4 v4d;\\n\"\n        \"out vec4 data;\\n\"\n        \"void main(void) { data = vec4(v2d[0]+v3d[0]+v4d[0]); }\\n\";\n        \n      GLint prg_id = createShader(vtx,frg);\n      \n      VERIFY_UNIFORM(dv,v2d, Vector2d);\n      VERIFY_UNIFORM(dv,v3d, Vector3d);\n      VERIFY_UNIFORM(dv,v4d, Vector4d);\n      #endif\n    }\n    else\n      std::cerr << \"Warning: GLEW_ARB_gpu_shader_fp64 was not tested\\n\";\n    #else\n      std::cerr << \"Warning: GLEW_ARB_gpu_shader_fp64 was not tested\\n\";\n    #endif\n  }\n  \n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/polynomialsolver.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010 Manuel Yguel <manuel.yguel@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <unsupported/Eigen/Polynomials>\n#include <iostream>\n#include <algorithm>\n\nusing namespace std;\n\nnamespace Eigen {\nnamespace internal {\ntemplate<int Size>\nstruct increment_if_fixed_size\n{\n  enum {\n    ret = (Size == Dynamic) ? Dynamic : Size+1\n  };\n};\n}\n}\n\ntemplate<typename PolynomialType>\nPolynomialType polyder(const PolynomialType& p)\n{\n  typedef typename PolynomialType::Scalar Scalar;\n  PolynomialType res(p.size());\n  for(Index i=1; i<p.size(); ++i)\n    res[i-1] = p[i]*Scalar(i);\n  res[p.size()-1] = 0.;\n  return res;\n}\n\ntemplate<int Deg, typename POLYNOMIAL, typename SOLVER>\nbool aux_evalSolver( const POLYNOMIAL& pols, SOLVER& psolve )\n{\n  typedef typename POLYNOMIAL::Scalar Scalar;\n  typedef typename POLYNOMIAL::RealScalar RealScalar;\n\n  typedef typename SOLVER::RootsType    RootsType;\n  typedef Matrix<RealScalar,Deg,1>      EvalRootsType;\n\n  const Index deg = pols.size()-1;\n\n  // Test template constructor from coefficient vector\n  SOLVER solve_constr (pols);\n\n  psolve.compute( pols );\n  const RootsType& roots( psolve.roots() );\n  EvalRootsType evr( deg );\n  POLYNOMIAL pols_der = polyder(pols);\n  EvalRootsType der( deg );\n  for( int i=0; i<roots.size(); ++i ){\n    evr[i] = std::abs( poly_eval( pols, roots[i] ) );\n    der[i] = numext::maxi(RealScalar(1.), std::abs( poly_eval( pols_der, roots[i] ) ));\n  }\n\n  // we need to divide by the magnitude of the derivative because\n  // with a high derivative is very small error in the value of the root\n  // yiels a very large error in the polynomial evaluation.\n  bool evalToZero = (evr.cwiseQuotient(der)).isZero( test_precision<Scalar>() );\n  if( !evalToZero )\n  {\n    cerr << \"WRONG root: \" << endl;\n    cerr << \"Polynomial: \" << pols.transpose() << endl;\n    cerr << \"Roots found: \" << roots.transpose() << endl;\n    cerr << \"Abs value of the polynomial at the roots: \" << evr.transpose() << endl;\n    cerr << endl;\n  }\n\n  std::vector<RealScalar> rootModuli( roots.size() );\n  Map< EvalRootsType > aux( &rootModuli[0], roots.size() );\n  aux = roots.array().abs();\n  std::sort( rootModuli.begin(), rootModuli.end() );\n  bool distinctModuli=true;\n  for( size_t i=1; i<rootModuli.size() && distinctModuli; ++i )\n  {\n    if( internal::isApprox( rootModuli[i], rootModuli[i-1] ) ){\n      distinctModuli = false; }\n  }\n  VERIFY( evalToZero || !distinctModuli );\n\n  return distinctModuli;\n}\n\n\n\n\n\n\n\ntemplate<int Deg, typename POLYNOMIAL>\nvoid evalSolver( const POLYNOMIAL& pols )\n{\n  typedef typename POLYNOMIAL::Scalar Scalar;\n\n  typedef PolynomialSolver<Scalar, Deg > PolynomialSolverType;\n\n  PolynomialSolverType psolve;\n  aux_evalSolver<Deg, POLYNOMIAL, PolynomialSolverType>( pols, psolve );\n}\n\n\n\n\ntemplate< int Deg, typename POLYNOMIAL, typename ROOTS, typename REAL_ROOTS >\nvoid evalSolverSugarFunction( const POLYNOMIAL& pols, const ROOTS& roots, const REAL_ROOTS& real_roots )\n{\n  using std::sqrt;\n  typedef typename POLYNOMIAL::Scalar Scalar;\n  typedef typename POLYNOMIAL::RealScalar RealScalar;\n\n  typedef PolynomialSolver<Scalar, Deg >              PolynomialSolverType;\n\n  PolynomialSolverType psolve;\n  if( aux_evalSolver<Deg, POLYNOMIAL, PolynomialSolverType>( pols, psolve ) )\n  {\n    //It is supposed that\n    // 1) the roots found are correct\n    // 2) the roots have distinct moduli\n\n    //Test realRoots\n    std::vector< RealScalar > calc_realRoots;\n    psolve.realRoots( calc_realRoots,  test_precision<RealScalar>());\n    VERIFY_IS_EQUAL( calc_realRoots.size() , (size_t)real_roots.size() );\n\n    const RealScalar psPrec = sqrt( test_precision<RealScalar>() );\n\n    for( size_t i=0; i<calc_realRoots.size(); ++i )\n    {\n      bool found = false;\n      for( size_t j=0; j<calc_realRoots.size()&& !found; ++j )\n      {\n        if( internal::isApprox( calc_realRoots[i], real_roots[j], psPrec ) ){\n          found = true; }\n      }\n      VERIFY( found );\n    }\n\n    //Test greatestRoot\n    VERIFY( internal::isApprox( roots.array().abs().maxCoeff(),\n          abs( psolve.greatestRoot() ), psPrec ) );\n\n    //Test smallestRoot\n    VERIFY( internal::isApprox( roots.array().abs().minCoeff(),\n          abs( psolve.smallestRoot() ), psPrec ) );\n\n    bool hasRealRoot;\n    //Test absGreatestRealRoot\n    RealScalar r = psolve.absGreatestRealRoot( hasRealRoot );\n    VERIFY( hasRealRoot == (real_roots.size() > 0 ) );\n    if( hasRealRoot ){\n      VERIFY( internal::isApprox( real_roots.array().abs().maxCoeff(), abs(r), psPrec ) );  }\n\n    //Test absSmallestRealRoot\n    r = psolve.absSmallestRealRoot( hasRealRoot );\n    VERIFY( hasRealRoot == (real_roots.size() > 0 ) );\n    if( hasRealRoot ){\n      VERIFY( internal::isApprox( real_roots.array().abs().minCoeff(), abs( r ), psPrec ) ); }\n\n    //Test greatestRealRoot\n    r = psolve.greatestRealRoot( hasRealRoot );\n    VERIFY( hasRealRoot == (real_roots.size() > 0 ) );\n    if( hasRealRoot ){\n      VERIFY( internal::isApprox( real_roots.array().maxCoeff(), r, psPrec ) ); }\n\n    //Test smallestRealRoot\n    r = psolve.smallestRealRoot( hasRealRoot );\n    VERIFY( hasRealRoot == (real_roots.size() > 0 ) );\n    if( hasRealRoot ){\n    VERIFY( internal::isApprox( real_roots.array().minCoeff(), r, psPrec ) ); }\n  }\n}\n\n\ntemplate<typename _Scalar, int _Deg>\nvoid polynomialsolver(int deg)\n{\n  typedef typename NumTraits<_Scalar>::Real RealScalar;\n  typedef internal::increment_if_fixed_size<_Deg>     Dim;\n  typedef Matrix<_Scalar,Dim::ret,1>                  PolynomialType;\n  typedef Matrix<_Scalar,_Deg,1>                      EvalRootsType;\n  typedef Matrix<RealScalar,_Deg,1>                   RealRootsType;\n\n  cout << \"Standard cases\" << endl;\n  PolynomialType pols = PolynomialType::Random(deg+1);\n  evalSolver<_Deg,PolynomialType>( pols );\n\n  cout << \"Hard cases\" << endl;\n  _Scalar multipleRoot = internal::random<_Scalar>();\n  EvalRootsType allRoots = EvalRootsType::Constant(deg,multipleRoot);\n  roots_to_monicPolynomial( allRoots, pols );\n  evalSolver<_Deg,PolynomialType>( pols );\n\n  cout << \"Test sugar\" << endl;\n  RealRootsType realRoots = RealRootsType::Random(deg);\n  roots_to_monicPolynomial( realRoots, pols );\n  evalSolverSugarFunction<_Deg>(\n      pols,\n      realRoots.template cast <std::complex<RealScalar> >().eval(),\n      realRoots );\n}\n\nEIGEN_DECLARE_TEST(polynomialsolver)\n{\n  for(int i = 0; i < g_repeat; i++)\n  {\n    CALL_SUBTEST_1( (polynomialsolver<float,1>(1)) );\n    CALL_SUBTEST_2( (polynomialsolver<double,2>(2)) );\n    CALL_SUBTEST_3( (polynomialsolver<double,3>(3)) );\n    CALL_SUBTEST_4( (polynomialsolver<float,4>(4)) );\n    CALL_SUBTEST_5( (polynomialsolver<double,5>(5)) );\n    CALL_SUBTEST_6( (polynomialsolver<float,6>(6)) );\n    CALL_SUBTEST_7( (polynomialsolver<float,7>(7)) );\n    CALL_SUBTEST_8( (polynomialsolver<double,8>(8)) );\n\n    CALL_SUBTEST_9( (polynomialsolver<float,Dynamic>(\n            internal::random<int>(9,13)\n            )) );\n    CALL_SUBTEST_10((polynomialsolver<double,Dynamic>(\n            internal::random<int>(9,13)\n            )) );\n    CALL_SUBTEST_11((polynomialsolver<float,Dynamic>(1)) );\n    CALL_SUBTEST_12((polynomialsolver<std::complex<double>,Dynamic>(internal::random<int>(2,13))) );\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/polynomialutils.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010 Manuel Yguel <manuel.yguel@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n#include <unsupported/Eigen/Polynomials>\n#include <iostream>\n\nusing namespace std;\n\nnamespace Eigen {\nnamespace internal {\ntemplate<int Size>\nstruct increment_if_fixed_size\n{\n  enum {\n    ret = (Size == Dynamic) ? Dynamic : Size+1\n  };\n};\n}\n}\n\ntemplate<typename _Scalar, int _Deg>\nvoid realRoots_to_monicPolynomial_test(int deg)\n{\n  typedef internal::increment_if_fixed_size<_Deg>            Dim;\n  typedef Matrix<_Scalar,Dim::ret,1>                  PolynomialType;\n  typedef Matrix<_Scalar,_Deg,1>                      EvalRootsType;\n\n  PolynomialType pols(deg+1);\n  EvalRootsType roots = EvalRootsType::Random(deg);\n  roots_to_monicPolynomial( roots, pols );\n\n  EvalRootsType evr( deg );\n  for( int i=0; i<roots.size(); ++i ){\n    evr[i] = std::abs( poly_eval( pols, roots[i] ) ); }\n\n  bool evalToZero = evr.isZero( test_precision<_Scalar>() );\n  if( !evalToZero ){\n    cerr << evr.transpose() << endl; }\n  VERIFY( evalToZero );\n}\n\ntemplate<typename _Scalar> void realRoots_to_monicPolynomial_scalar()\n{\n  CALL_SUBTEST_2( (realRoots_to_monicPolynomial_test<_Scalar,2>(2)) );\n  CALL_SUBTEST_3( (realRoots_to_monicPolynomial_test<_Scalar,3>(3)) );\n  CALL_SUBTEST_4( (realRoots_to_monicPolynomial_test<_Scalar,4>(4)) );\n  CALL_SUBTEST_5( (realRoots_to_monicPolynomial_test<_Scalar,5>(5)) );\n  CALL_SUBTEST_6( (realRoots_to_monicPolynomial_test<_Scalar,6>(6)) );\n  CALL_SUBTEST_7( (realRoots_to_monicPolynomial_test<_Scalar,7>(7)) );\n  CALL_SUBTEST_8( (realRoots_to_monicPolynomial_test<_Scalar,17>(17)) );\n\n  CALL_SUBTEST_9( (realRoots_to_monicPolynomial_test<_Scalar,Dynamic>(\n          internal::random<int>(18,26) )) );\n}\n\n\n\n\ntemplate<typename _Scalar, int _Deg>\nvoid CauchyBounds(int deg)\n{\n  typedef internal::increment_if_fixed_size<_Deg>            Dim;\n  typedef Matrix<_Scalar,Dim::ret,1>                  PolynomialType;\n  typedef Matrix<_Scalar,_Deg,1>                      EvalRootsType;\n\n  PolynomialType pols(deg+1);\n  EvalRootsType roots = EvalRootsType::Random(deg);\n  roots_to_monicPolynomial( roots, pols );\n  _Scalar M = cauchy_max_bound( pols );\n  _Scalar m = cauchy_min_bound( pols );\n  _Scalar Max = roots.array().abs().maxCoeff();\n  _Scalar min = roots.array().abs().minCoeff();\n  bool eval = (M >= Max) && (m <= min);\n  if( !eval )\n  {\n    cerr << \"Roots: \" << roots << endl;\n    cerr << \"Bounds: (\" << m << \", \" << M << \")\" << endl;\n    cerr << \"Min,Max: (\" << min << \", \" << Max << \")\" << endl;\n  }\n  VERIFY( eval );\n}\n\ntemplate<typename _Scalar> void CauchyBounds_scalar()\n{\n  CALL_SUBTEST_2( (CauchyBounds<_Scalar,2>(2)) );\n  CALL_SUBTEST_3( (CauchyBounds<_Scalar,3>(3)) );\n  CALL_SUBTEST_4( (CauchyBounds<_Scalar,4>(4)) );\n  CALL_SUBTEST_5( (CauchyBounds<_Scalar,5>(5)) );\n  CALL_SUBTEST_6( (CauchyBounds<_Scalar,6>(6)) );\n  CALL_SUBTEST_7( (CauchyBounds<_Scalar,7>(7)) );\n  CALL_SUBTEST_8( (CauchyBounds<_Scalar,17>(17)) );\n\n  CALL_SUBTEST_9( (CauchyBounds<_Scalar,Dynamic>(\n          internal::random<int>(18,26) )) );\n}\n\nEIGEN_DECLARE_TEST(polynomialutils)\n{\n  for(int i = 0; i < g_repeat; i++)\n  {\n    realRoots_to_monicPolynomial_scalar<double>();\n    realRoots_to_monicPolynomial_scalar<float>();\n    CauchyBounds_scalar<double>();\n    CauchyBounds_scalar<float>();\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/sparse_extra.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2010 Gael Guennebaud <g.gael@free.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n\n// import basic and product tests for deprecated DynamicSparseMatrix\n#if 0 // sparse_basic(DynamicSparseMatrix) does not compile at all -> disabled\nstatic long g_realloc_count = 0;\n#define EIGEN_SPARSE_COMPRESSED_STORAGE_REALLOCATE_PLUGIN g_realloc_count++;\n\nstatic long g_dense_op_sparse_count = 0;\n#define EIGEN_SPARSE_ASSIGNMENT_FROM_DENSE_OP_SPARSE_PLUGIN g_dense_op_sparse_count++;\n#define EIGEN_SPARSE_ASSIGNMENT_FROM_SPARSE_ADD_DENSE_PLUGIN g_dense_op_sparse_count+=10;\n#define EIGEN_SPARSE_ASSIGNMENT_FROM_SPARSE_SUB_DENSE_PLUGIN g_dense_op_sparse_count+=20;\n\n#define EIGEN_SPARSE_TEST_INCLUDED_FROM_SPARSE_EXTRA 1\n#endif\n\n#define EIGEN_NO_DEPRECATED_WARNING\n#include \"sparse_product.cpp\"\n\n#if 0 // sparse_basic(DynamicSparseMatrix) does not compile at all -> disabled\n#include \"sparse_basic.cpp\"\n#endif\n\n#include <Eigen/SparseExtra>\n\ntemplate<typename SetterType,typename DenseType, typename Scalar, int Options>\nbool test_random_setter(SparseMatrix<Scalar,Options>& sm, const DenseType& ref, const std::vector<Vector2i>& nonzeroCoords)\n{\n  {\n    sm.setZero();\n    SetterType w(sm);\n    std::vector<Vector2i> remaining = nonzeroCoords;\n    while(!remaining.empty())\n    {\n      int i = internal::random<int>(0,static_cast<int>(remaining.size())-1);\n      w(remaining[i].x(),remaining[i].y()) = ref.coeff(remaining[i].x(),remaining[i].y());\n      remaining[i] = remaining.back();\n      remaining.pop_back();\n    }\n  }\n  return sm.isApprox(ref);\n}\n\ntemplate<typename SetterType,typename DenseType, typename T>\nbool test_random_setter(DynamicSparseMatrix<T>& sm, const DenseType& ref, const std::vector<Vector2i>& nonzeroCoords)\n{\n  sm.setZero();\n  std::vector<Vector2i> remaining = nonzeroCoords;\n  while(!remaining.empty())\n  {\n    int i = internal::random<int>(0,static_cast<int>(remaining.size())-1);\n    sm.coeffRef(remaining[i].x(),remaining[i].y()) = ref.coeff(remaining[i].x(),remaining[i].y());\n    remaining[i] = remaining.back();\n    remaining.pop_back();\n  }\n  return sm.isApprox(ref);\n}\n\ntemplate<typename SparseMatrixType> void sparse_extra(const SparseMatrixType& ref)\n{\n  const Index rows = ref.rows();\n  const Index cols = ref.cols();\n  typedef typename SparseMatrixType::Scalar Scalar;\n  enum { Flags = SparseMatrixType::Flags };\n\n  double density = (std::max)(8./(rows*cols), 0.01);\n  typedef Matrix<Scalar,Dynamic,Dynamic> DenseMatrix;\n  typedef Matrix<Scalar,Dynamic,1> DenseVector;\n  Scalar eps = 1e-6;\n\n  SparseMatrixType m(rows, cols);\n  DenseMatrix refMat = DenseMatrix::Zero(rows, cols);\n  DenseVector vec1 = DenseVector::Random(rows);\n\n  std::vector<Vector2i> zeroCoords;\n  std::vector<Vector2i> nonzeroCoords;\n  initSparse<Scalar>(density, refMat, m, 0, &zeroCoords, &nonzeroCoords);\n\n  if (zeroCoords.size()==0 || nonzeroCoords.size()==0)\n    return;\n\n  // test coeff and coeffRef\n  for (int i=0; i<(int)zeroCoords.size(); ++i)\n  {\n    VERIFY_IS_MUCH_SMALLER_THAN( m.coeff(zeroCoords[i].x(),zeroCoords[i].y()), eps );\n    if(internal::is_same<SparseMatrixType,SparseMatrix<Scalar,Flags> >::value)\n      VERIFY_RAISES_ASSERT( m.coeffRef(zeroCoords[0].x(),zeroCoords[0].y()) = 5 );\n  }\n  VERIFY_IS_APPROX(m, refMat);\n\n  m.coeffRef(nonzeroCoords[0].x(), nonzeroCoords[0].y()) = Scalar(5);\n  refMat.coeffRef(nonzeroCoords[0].x(), nonzeroCoords[0].y()) = Scalar(5);\n\n  VERIFY_IS_APPROX(m, refMat);\n\n  // random setter\n//   {\n//     m.setZero();\n//     VERIFY_IS_NOT_APPROX(m, refMat);\n//     SparseSetter<SparseMatrixType, RandomAccessPattern> w(m);\n//     std::vector<Vector2i> remaining = nonzeroCoords;\n//     while(!remaining.empty())\n//     {\n//       int i = internal::random<int>(0,remaining.size()-1);\n//       w->coeffRef(remaining[i].x(),remaining[i].y()) = refMat.coeff(remaining[i].x(),remaining[i].y());\n//       remaining[i] = remaining.back();\n//       remaining.pop_back();\n//     }\n//   }\n//   VERIFY_IS_APPROX(m, refMat);\n\n    VERIFY(( test_random_setter<RandomSetter<SparseMatrixType, StdMapTraits> >(m,refMat,nonzeroCoords) ));\n    #ifdef EIGEN_UNORDERED_MAP_SUPPORT\n    VERIFY(( test_random_setter<RandomSetter<SparseMatrixType, StdUnorderedMapTraits> >(m,refMat,nonzeroCoords) ));\n    #endif\n    #ifdef _DENSE_HASH_MAP_H_\n    VERIFY(( test_random_setter<RandomSetter<SparseMatrixType, GoogleDenseHashMapTraits> >(m,refMat,nonzeroCoords) ));\n    #endif\n    #ifdef _SPARSE_HASH_MAP_H_\n    VERIFY(( test_random_setter<RandomSetter<SparseMatrixType, GoogleSparseHashMapTraits> >(m,refMat,nonzeroCoords) ));\n    #endif\n\n\n  // test RandomSetter\n  /*{\n    SparseMatrixType m1(rows,cols), m2(rows,cols);\n    DenseMatrix refM1 = DenseMatrix::Zero(rows, rows);\n    initSparse<Scalar>(density, refM1, m1);\n    {\n      Eigen::RandomSetter<SparseMatrixType > setter(m2);\n      for (int j=0; j<m1.outerSize(); ++j)\n        for (typename SparseMatrixType::InnerIterator i(m1,j); i; ++i)\n          setter(i.index(), j) = i.value();\n    }\n    VERIFY_IS_APPROX(m1, m2);\n  }*/\n\n\n}\n\ntemplate<typename SparseMatrixType>\nvoid check_marketio()\n{\n  typedef Matrix<typename SparseMatrixType::Scalar, Dynamic, Dynamic> DenseMatrix;\n  Index rows = internal::random<Index>(1,100);\n  Index cols = internal::random<Index>(1,100);\n  SparseMatrixType m1, m2;\n  m1 = DenseMatrix::Random(rows, cols).sparseView();\n  saveMarket(m1, \"sparse_extra.mtx\");\n  loadMarket(m2, \"sparse_extra.mtx\");\n  VERIFY_IS_EQUAL(DenseMatrix(m1),DenseMatrix(m2));\n}\n\nEIGEN_DECLARE_TEST(sparse_extra)\n{\n  for(int i = 0; i < g_repeat; i++) {\n    int s = Eigen::internal::random<int>(1,50);\n    CALL_SUBTEST_1( sparse_extra(SparseMatrix<double>(8, 8)) );\n    CALL_SUBTEST_2( sparse_extra(SparseMatrix<std::complex<double> >(s, s)) );\n    CALL_SUBTEST_1( sparse_extra(SparseMatrix<double>(s, s)) );\n\n    CALL_SUBTEST_3( sparse_extra(DynamicSparseMatrix<double>(s, s)) );\n//    CALL_SUBTEST_3(( sparse_basic(DynamicSparseMatrix<double>(s, s)) ));\n//    CALL_SUBTEST_3(( sparse_basic(DynamicSparseMatrix<double,ColMajor,long int>(s, s)) ));\n\n    CALL_SUBTEST_3( (sparse_product<DynamicSparseMatrix<float, ColMajor> >()) );\n    CALL_SUBTEST_3( (sparse_product<DynamicSparseMatrix<float, RowMajor> >()) );\n\n    CALL_SUBTEST_4( (check_marketio<SparseMatrix<float,ColMajor,int> >()) );\n    CALL_SUBTEST_4( (check_marketio<SparseMatrix<double,ColMajor,int> >()) );\n    CALL_SUBTEST_4( (check_marketio<SparseMatrix<std::complex<float>,ColMajor,int> >()) );\n    CALL_SUBTEST_4( (check_marketio<SparseMatrix<std::complex<double>,ColMajor,int> >()) );\n    CALL_SUBTEST_4( (check_marketio<SparseMatrix<float,ColMajor,long int> >()) );\n    CALL_SUBTEST_4( (check_marketio<SparseMatrix<double,ColMajor,long int> >()) );\n    CALL_SUBTEST_4( (check_marketio<SparseMatrix<std::complex<float>,ColMajor,long int> >()) );\n    CALL_SUBTEST_4( (check_marketio<SparseMatrix<std::complex<double>,ColMajor,long int> >()) );\n    TEST_SET_BUT_UNUSED_VARIABLE(s);\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/special_functions.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2016 Gael Guennebaud <gael.guennebaud@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include <limits.h>\n#include \"main.h\"\n#include \"../Eigen/SpecialFunctions\"\n\ntemplate<typename X, typename Y>\nvoid verify_component_wise(const X& x, const Y& y)\n{\n  for(Index i=0; i<x.size(); ++i)\n  {\n    if((numext::isfinite)(y(i)))\n      VERIFY_IS_APPROX( x(i), y(i) );\n    else if((numext::isnan)(y(i)))\n      VERIFY((numext::isnan)(x(i)));\n    else\n      VERIFY_IS_EQUAL( x(i), y(i) );\n  }\n}\n\ntemplate<typename ArrayType> void array_special_functions()\n{\n  using std::abs;\n  using std::sqrt;\n  typedef typename ArrayType::Scalar Scalar;\n  typedef typename NumTraits<Scalar>::Real RealScalar;\n\n  Scalar plusinf = std::numeric_limits<Scalar>::infinity();\n  Scalar nan = std::numeric_limits<Scalar>::quiet_NaN();\n\n  Index rows = internal::random<Index>(1,30);\n  Index cols = 1;\n\n  // API\n  {\n    ArrayType m1 = ArrayType::Random(rows,cols);\n#if EIGEN_HAS_C99_MATH\n    VERIFY_IS_APPROX(m1.lgamma(), lgamma(m1));\n    VERIFY_IS_APPROX(m1.digamma(), digamma(m1));\n    VERIFY_IS_APPROX(m1.erf(), erf(m1));\n    VERIFY_IS_APPROX(m1.erfc(), erfc(m1));\n#endif  // EIGEN_HAS_C99_MATH\n  }\n\n\n#if EIGEN_HAS_C99_MATH\n  // check special functions (comparing against numpy implementation)\n  if (!NumTraits<Scalar>::IsComplex)\n  {\n\n    {\n      ArrayType m1 = ArrayType::Random(rows,cols);\n      ArrayType m2 = ArrayType::Random(rows,cols);\n\n      // Test various propreties of igamma & igammac.  These are normalized\n      // gamma integrals where\n      //   igammac(a, x) = Gamma(a, x) / Gamma(a)\n      //   igamma(a, x) = gamma(a, x) / Gamma(a)\n      // where Gamma and gamma are considered the standard unnormalized\n      // upper and lower incomplete gamma functions, respectively.\n      ArrayType a = m1.abs() + 2;\n      ArrayType x = m2.abs() + 2;\n      ArrayType zero = ArrayType::Zero(rows, cols);\n      ArrayType one = ArrayType::Constant(rows, cols, Scalar(1.0));\n      ArrayType a_m1 = a - one;\n      ArrayType Gamma_a_x = Eigen::igammac(a, x) * a.lgamma().exp();\n      ArrayType Gamma_a_m1_x = Eigen::igammac(a_m1, x) * a_m1.lgamma().exp();\n      ArrayType gamma_a_x = Eigen::igamma(a, x) * a.lgamma().exp();\n      ArrayType gamma_a_m1_x = Eigen::igamma(a_m1, x) * a_m1.lgamma().exp();\n\n\n      // Gamma(a, 0) == Gamma(a)\n      VERIFY_IS_APPROX(Eigen::igammac(a, zero), one);\n\n      // Gamma(a, x) + gamma(a, x) == Gamma(a)\n      VERIFY_IS_APPROX(Gamma_a_x + gamma_a_x, a.lgamma().exp());\n\n      // Gamma(a, x) == (a - 1) * Gamma(a-1, x) + x^(a-1) * exp(-x)\n      VERIFY_IS_APPROX(Gamma_a_x, (a - 1) * Gamma_a_m1_x + x.pow(a-1) * (-x).exp());\n\n      // gamma(a, x) == (a - 1) * gamma(a-1, x) - x^(a-1) * exp(-x)\n      VERIFY_IS_APPROX(gamma_a_x, (a - 1) * gamma_a_m1_x - x.pow(a-1) * (-x).exp());\n    }\n    {\n      // Verify for large a and x that values are between 0 and 1.\n      ArrayType m1 = ArrayType::Random(rows,cols);\n      ArrayType m2 = ArrayType::Random(rows,cols);\n      Scalar max_exponent = std::numeric_limits<Scalar>::max_exponent10;\n      ArrayType a = m1.abs() *  pow(10., max_exponent - 1);\n      ArrayType x = m2.abs() *  pow(10., max_exponent - 1);\n      for (int i = 0; i < a.size(); ++i) {\n        Scalar igam = numext::igamma(a(i), x(i));\n        VERIFY(0 <= igam);\n        VERIFY(igam <= 1);\n      }\n    }\n\n    {\n      // Check exact values of igamma and igammac against a third party calculation.\n      Scalar a_s[] = {Scalar(0), Scalar(1), Scalar(1.5), Scalar(4), Scalar(0.0001), Scalar(1000.5)};\n      Scalar x_s[] = {Scalar(0), Scalar(1), Scalar(1.5), Scalar(4), Scalar(0.0001), Scalar(1000.5)};\n\n      // location i*6+j corresponds to a_s[i], x_s[j].\n      Scalar igamma_s[][6] = {{0.0, nan, nan, nan, nan, nan},\n                              {0.0, 0.6321205588285578, 0.7768698398515702,\n                              0.9816843611112658, 9.999500016666262e-05, 1.0},\n                              {0.0, 0.4275932955291202, 0.608374823728911,\n                              0.9539882943107686, 7.522076445089201e-07, 1.0},\n                              {0.0, 0.01898815687615381, 0.06564245437845008,\n                              0.5665298796332909, 4.166333347221828e-18, 1.0},\n                              {0.0, 0.9999780593618628, 0.9999899967080838,\n                              0.9999996219837988, 0.9991370418689945, 1.0},\n                              {0.0, 0.0, 0.0, 0.0, 0.0, 0.5042041932513908}};\n      Scalar igammac_s[][6] = {{nan, nan, nan, nan, nan, nan},\n                              {1.0, 0.36787944117144233, 0.22313016014842982,\n                                0.018315638888734182, 0.9999000049998333, 0.0},\n                              {1.0, 0.5724067044708798, 0.3916251762710878,\n                                0.04601170568923136, 0.9999992477923555, 0.0},\n                              {1.0, 0.9810118431238462, 0.9343575456215499,\n                                0.4334701203667089, 1.0, 0.0},\n                              {1.0, 2.1940638138146658e-05, 1.0003291916285e-05,\n                                3.7801620118431334e-07, 0.0008629581310054535,\n                                0.0},\n                              {1.0, 1.0, 1.0, 1.0, 1.0, 0.49579580674813944}};\n      for (int i = 0; i < 6; ++i) {\n        for (int j = 0; j < 6; ++j) {\n          if ((std::isnan)(igamma_s[i][j])) {\n            VERIFY((std::isnan)(numext::igamma(a_s[i], x_s[j])));\n          } else {\n            VERIFY_IS_APPROX(numext::igamma(a_s[i], x_s[j]), igamma_s[i][j]);\n          }\n\n          if ((std::isnan)(igammac_s[i][j])) {\n            VERIFY((std::isnan)(numext::igammac(a_s[i], x_s[j])));\n          } else {\n            VERIFY_IS_APPROX(numext::igammac(a_s[i], x_s[j]), igammac_s[i][j]);\n          }\n        }\n      }\n    }\n  }\n#endif  // EIGEN_HAS_C99_MATH\n\n  // Check the ndtri function against scipy.special.ndtri\n  {\n    ArrayType x(7), res(7), ref(7);\n    x << 0.5, 0.2, 0.8, 0.9, 0.1, 0.99, 0.01;\n    ref << 0., -0.8416212335729142, 0.8416212335729142, 1.2815515655446004, -1.2815515655446004, 2.3263478740408408, -2.3263478740408408;\n    CALL_SUBTEST( verify_component_wise(ref, ref); );\n    CALL_SUBTEST( res = x.ndtri(); verify_component_wise(res, ref); );\n    CALL_SUBTEST( res = ndtri(x); verify_component_wise(res, ref); );\n\n    // ndtri(normal_cdf(x)) ~= x\n    CALL_SUBTEST(\n        ArrayType m1 = ArrayType::Random(32);\n        using std::sqrt;\n\n        ArrayType cdf_val = (m1 / sqrt(2.)).erf();\n        cdf_val = (cdf_val + 1.) / 2.;\n        verify_component_wise(cdf_val.ndtri(), m1););\n\n  }\n\n  // Check the zeta function against scipy.special.zeta\n  {\n    ArrayType x(7), q(7), res(7), ref(7);\n    x << 1.5,   4, 10.5, 10000.5,    3, 1,        0.9;\n    q << 2,   1.5,    3,  1.0001, -2.5, 1.2345, 1.2345;\n    ref << 1.61237534869, 0.234848505667, 1.03086757337e-5, 0.367879440865, 0.054102025820864097, plusinf, nan;\n    CALL_SUBTEST( verify_component_wise(ref, ref); );\n    CALL_SUBTEST( res = x.zeta(q); verify_component_wise(res, ref); );\n    CALL_SUBTEST( res = zeta(x,q); verify_component_wise(res, ref); );\n  }\n\n  // digamma\n  {\n    ArrayType x(7), res(7), ref(7);\n    x << 1, 1.5, 4, -10.5, 10000.5, 0, -1;\n    ref << -0.5772156649015329, 0.03648997397857645, 1.2561176684318, 2.398239129535781, 9.210340372392849, plusinf, plusinf;\n    CALL_SUBTEST( verify_component_wise(ref, ref); );\n\n    CALL_SUBTEST( res = x.digamma(); verify_component_wise(res, ref); );\n    CALL_SUBTEST( res = digamma(x);  verify_component_wise(res, ref); );\n  }\n\n\n#if EIGEN_HAS_C99_MATH\n  {\n    ArrayType n(11), x(11), res(11), ref(11);\n    n << 1, 1,    1, 1.5,   17,   31,   28,    8, 42, 147, 170;\n    x << 2, 3, 25.5, 1.5,  4.7, 11.8, 17.7, 30.2, 15.8, 54.1, 64;\n    ref << 0.644934066848, 0.394934066848, 0.0399946696496, nan, 293.334565435, 0.445487887616, -2.47810300902e-07, -8.29668781082e-09, -0.434562276666, 0.567742190178, -0.0108615497927;\n    CALL_SUBTEST( verify_component_wise(ref, ref); );\n\n    if(sizeof(RealScalar)>=8) {  // double\n      // Reason for commented line: http://eigen.tuxfamily.org/bz/show_bug.cgi?id=1232\n      //       CALL_SUBTEST( res = x.polygamma(n); verify_component_wise(res, ref); );\n      CALL_SUBTEST( res = polygamma(n,x);  verify_component_wise(res, ref); );\n    }\n    else {\n      //       CALL_SUBTEST( res = x.polygamma(n); verify_component_wise(res.head(8), ref.head(8)); );\n      CALL_SUBTEST( res = polygamma(n,x); verify_component_wise(res.head(8), ref.head(8)); );\n    }\n  }\n#endif\n\n#if EIGEN_HAS_C99_MATH\n  {\n    // Inputs and ground truth generated with scipy via:\n    //   a = np.logspace(-3, 3, 5) - 1e-3\n    //   b = np.logspace(-3, 3, 5) - 1e-3\n    //   x = np.linspace(-0.1, 1.1, 5)\n    //   (full_a, full_b, full_x) = np.vectorize(lambda a, b, x: (a, b, x))(*np.ix_(a, b, x))\n    //   full_a = full_a.flatten().tolist()  # same for full_b, full_x\n    //   v = scipy.special.betainc(full_a, full_b, full_x).flatten().tolist()\n    //\n    // Note in Eigen, we call betainc with arguments in the order (x, a, b).\n    ArrayType a(125);\n    ArrayType b(125);\n    ArrayType x(125);\n    ArrayType v(125);\n    ArrayType res(125);\n\n    a << 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,\n        0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,\n        0.03062277660168379, 0.03062277660168379, 0.03062277660168379,\n        0.03062277660168379, 0.03062277660168379, 0.03062277660168379,\n        0.03062277660168379, 0.03062277660168379, 0.03062277660168379,\n        0.03062277660168379, 0.03062277660168379, 0.03062277660168379,\n        0.03062277660168379, 0.03062277660168379, 0.03062277660168379,\n        0.03062277660168379, 0.03062277660168379, 0.03062277660168379,\n        0.03062277660168379, 0.03062277660168379, 0.03062277660168379,\n        0.03062277660168379, 0.03062277660168379, 0.03062277660168379,\n        0.03062277660168379, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999,\n        0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999,\n        0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999,\n        31.62177660168379, 31.62177660168379, 31.62177660168379,\n        31.62177660168379, 31.62177660168379, 31.62177660168379,\n        31.62177660168379, 31.62177660168379, 31.62177660168379,\n        31.62177660168379, 31.62177660168379, 31.62177660168379,\n        31.62177660168379, 31.62177660168379, 31.62177660168379,\n        31.62177660168379, 31.62177660168379, 31.62177660168379,\n        31.62177660168379, 31.62177660168379, 31.62177660168379,\n        31.62177660168379, 31.62177660168379, 31.62177660168379,\n        31.62177660168379, 999.999, 999.999, 999.999, 999.999, 999.999, 999.999,\n        999.999, 999.999, 999.999, 999.999, 999.999, 999.999, 999.999, 999.999,\n        999.999, 999.999, 999.999, 999.999, 999.999, 999.999, 999.999, 999.999,\n        999.999, 999.999, 999.999;\n\n    b << 0.0, 0.0, 0.0, 0.0, 0.0, 0.03062277660168379, 0.03062277660168379,\n        0.03062277660168379, 0.03062277660168379, 0.03062277660168379, 0.999,\n        0.999, 0.999, 0.999, 0.999, 31.62177660168379, 31.62177660168379,\n        31.62177660168379, 31.62177660168379, 31.62177660168379, 999.999,\n        999.999, 999.999, 999.999, 999.999, 0.0, 0.0, 0.0, 0.0, 0.0,\n        0.03062277660168379, 0.03062277660168379, 0.03062277660168379,\n        0.03062277660168379, 0.03062277660168379, 0.999, 0.999, 0.999, 0.999,\n        0.999, 31.62177660168379, 31.62177660168379, 31.62177660168379,\n        31.62177660168379, 31.62177660168379, 999.999, 999.999, 999.999,\n        999.999, 999.999, 0.0, 0.0, 0.0, 0.0, 0.0, 0.03062277660168379,\n        0.03062277660168379, 0.03062277660168379, 0.03062277660168379,\n        0.03062277660168379, 0.999, 0.999, 0.999, 0.999, 0.999,\n        31.62177660168379, 31.62177660168379, 31.62177660168379,\n        31.62177660168379, 31.62177660168379, 999.999, 999.999, 999.999,\n        999.999, 999.999, 0.0, 0.0, 0.0, 0.0, 0.0, 0.03062277660168379,\n        0.03062277660168379, 0.03062277660168379, 0.03062277660168379,\n        0.03062277660168379, 0.999, 0.999, 0.999, 0.999, 0.999,\n        31.62177660168379, 31.62177660168379, 31.62177660168379,\n        31.62177660168379, 31.62177660168379, 999.999, 999.999, 999.999,\n        999.999, 999.999, 0.0, 0.0, 0.0, 0.0, 0.0, 0.03062277660168379,\n        0.03062277660168379, 0.03062277660168379, 0.03062277660168379,\n        0.03062277660168379, 0.999, 0.999, 0.999, 0.999, 0.999,\n        31.62177660168379, 31.62177660168379, 31.62177660168379,\n        31.62177660168379, 31.62177660168379, 999.999, 999.999, 999.999,\n        999.999, 999.999;\n\n    x << -0.1, 0.2, 0.5, 0.8, 1.1, -0.1, 0.2, 0.5, 0.8, 1.1, -0.1, 0.2, 0.5,\n        0.8, 1.1, -0.1, 0.2, 0.5, 0.8, 1.1, -0.1, 0.2, 0.5, 0.8, 1.1, -0.1, 0.2,\n        0.5, 0.8, 1.1, -0.1, 0.2, 0.5, 0.8, 1.1, -0.1, 0.2, 0.5, 0.8, 1.1, -0.1,\n        0.2, 0.5, 0.8, 1.1, -0.1, 0.2, 0.5, 0.8, 1.1, -0.1, 0.2, 0.5, 0.8, 1.1,\n        -0.1, 0.2, 0.5, 0.8, 1.1, -0.1, 0.2, 0.5, 0.8, 1.1, -0.1, 0.2, 0.5, 0.8,\n        1.1, -0.1, 0.2, 0.5, 0.8, 1.1, -0.1, 0.2, 0.5, 0.8, 1.1, -0.1, 0.2, 0.5,\n        0.8, 1.1, -0.1, 0.2, 0.5, 0.8, 1.1, -0.1, 0.2, 0.5, 0.8, 1.1, -0.1, 0.2,\n        0.5, 0.8, 1.1, -0.1, 0.2, 0.5, 0.8, 1.1, -0.1, 0.2, 0.5, 0.8, 1.1, -0.1,\n        0.2, 0.5, 0.8, 1.1, -0.1, 0.2, 0.5, 0.8, 1.1, -0.1, 0.2, 0.5,\n        0.8, 1.1;\n\n    v << nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan,\n        nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan,\n        nan, nan, nan, 0.47972119876364683, 0.5, 0.5202788012363533, nan, nan,\n        0.9518683957740043, 0.9789663010413743, 0.9931729188073435, nan, nan,\n        0.999995949033062, 0.9999999999993698, 0.9999999999999999, nan, nan,\n        0.9999999999999999, 0.9999999999999999, 0.9999999999999999, nan, nan,\n        nan, nan, nan, nan, nan, 0.006827081192655869, 0.0210336989586256,\n        0.04813160422599567, nan, nan, 0.20014344256217678, 0.5000000000000001,\n        0.7998565574378232, nan, nan, 0.9991401428435834, 0.999999999698403,\n        0.9999999999999999, nan, nan, 0.9999999999999999, 0.9999999999999999,\n        0.9999999999999999, nan, nan, nan, nan, nan, nan, nan,\n        1.0646600232370887e-25, 6.301722877826246e-13, 4.050966937974938e-06,\n        nan, nan, 7.864342668429763e-23, 3.015969667594166e-10,\n        0.0008598571564165444, nan, nan, 6.031987710123844e-08,\n        0.5000000000000007, 0.9999999396801229, nan, nan, 0.9999999999999999,\n        0.9999999999999999, 0.9999999999999999, nan, nan, nan, nan, nan, nan,\n        nan, 0.0, 7.029920380986636e-306, 2.2450728208591345e-101, nan, nan,\n        0.0, 9.275871147869727e-302, 1.2232913026152827e-97, nan, nan, 0.0,\n        3.0891393081932924e-252, 2.9303043666183996e-60, nan, nan,\n        2.248913486879199e-196, 0.5000000000004947, 0.9999999999999999, nan;\n\n    CALL_SUBTEST(res = betainc(a, b, x);\n                 verify_component_wise(res, v););\n  }\n\n  // Test various properties of betainc\n  {\n    ArrayType m1 = ArrayType::Random(32);\n    ArrayType m2 = ArrayType::Random(32);\n    ArrayType m3 = ArrayType::Random(32);\n    ArrayType one = ArrayType::Constant(32, Scalar(1.0));\n    const Scalar eps = std::numeric_limits<Scalar>::epsilon();\n    ArrayType a = (m1 * 4.0).exp();\n    ArrayType b = (m2 * 4.0).exp();\n    ArrayType x = m3.abs();\n\n    // betainc(a, 1, x) == x**a\n    CALL_SUBTEST(\n        ArrayType test = betainc(a, one, x);\n        ArrayType expected = x.pow(a);\n        verify_component_wise(test, expected););\n\n    // betainc(1, b, x) == 1 - (1 - x)**b\n    CALL_SUBTEST(\n        ArrayType test = betainc(one, b, x);\n        ArrayType expected = one - (one - x).pow(b);\n        verify_component_wise(test, expected););\n\n    // betainc(a, b, x) == 1 - betainc(b, a, 1-x)\n    CALL_SUBTEST(\n        ArrayType test = betainc(a, b, x) + betainc(b, a, one - x);\n        ArrayType expected = one;\n        verify_component_wise(test, expected););\n\n    // betainc(a+1, b, x) = betainc(a, b, x) - x**a * (1 - x)**b / (a * beta(a, b))\n    CALL_SUBTEST(\n        ArrayType num = x.pow(a) * (one - x).pow(b);\n        ArrayType denom = a * (a.lgamma() + b.lgamma() - (a + b).lgamma()).exp();\n        // Add eps to rhs and lhs so that component-wise test doesn't result in\n        // nans when both outputs are zeros.\n        ArrayType expected = betainc(a, b, x) - num / denom + eps;\n        ArrayType test = betainc(a + one, b, x) + eps;\n        if (sizeof(Scalar) >= 8) { // double\n          verify_component_wise(test, expected);\n        } else {\n          // Reason for limited test: http://eigen.tuxfamily.org/bz/show_bug.cgi?id=1232\n          verify_component_wise(test.head(8), expected.head(8));\n        });\n\n    // betainc(a, b+1, x) = betainc(a, b, x) + x**a * (1 - x)**b / (b * beta(a, b))\n    CALL_SUBTEST(\n        // Add eps to rhs and lhs so that component-wise test doesn't result in\n        // nans when both outputs are zeros.\n        ArrayType num = x.pow(a) * (one - x).pow(b);\n        ArrayType denom = b * (a.lgamma() + b.lgamma() - (a + b).lgamma()).exp();\n        ArrayType expected = betainc(a, b, x) + num / denom + eps;\n        ArrayType test = betainc(a, b + one, x) + eps;\n        verify_component_wise(test, expected););\n  }\n#endif  // EIGEN_HAS_C99_MATH\n\n    /* Code to generate the data for the following two test cases.\n    N = 5\n    np.random.seed(3)\n\n    a = np.logspace(-2, 3, 6)\n    a = np.ravel(np.tile(np.reshape(a, [-1, 1]), [1, N]))\n    x = np.random.gamma(a, 1.0)\n    x = np.maximum(x, np.finfo(np.float32).tiny)\n\n    def igamma(a, x):\n      return mpmath.gammainc(a, 0, x, regularized=True)\n\n    def igamma_der_a(a, x):\n      res = mpmath.diff(lambda a_prime: igamma(a_prime, x), a)\n      return np.float64(res)\n\n    def gamma_sample_der_alpha(a, x):\n      igamma_x = igamma(a, x)\n      def igammainv_of_igamma(a_prime):\n        return mpmath.findroot(lambda x_prime: igamma(a_prime, x_prime) -\n            igamma_x, x, solver='newton')\n      return np.float64(mpmath.diff(igammainv_of_igamma, a))\n\n    v_igamma_der_a = np.vectorize(igamma_der_a)(a, x)\n    v_gamma_sample_der_alpha = np.vectorize(gamma_sample_der_alpha)(a, x)\n  */\n\n#if EIGEN_HAS_C99_MATH\n  // Test igamma_der_a\n  {\n    ArrayType a(30);\n    ArrayType x(30);\n    ArrayType res(30);\n    ArrayType v(30);\n\n    a << 0.01, 0.01, 0.01, 0.01, 0.01, 0.1, 0.1, 0.1, 0.1, 0.1, 1.0, 1.0, 1.0,\n        1.0, 1.0, 10.0, 10.0, 10.0, 10.0, 10.0, 100.0, 100.0, 100.0, 100.0,\n        100.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0;\n\n    x << 1.25668890405e-26, 1.17549435082e-38, 1.20938905072e-05,\n        1.17549435082e-38, 1.17549435082e-38, 5.66572070696e-16,\n        0.0132865061065, 0.0200034203853, 6.29263709118e-17, 1.37160367764e-06,\n        0.333412038288, 1.18135687766, 0.580629033777, 0.170631439426,\n        0.786686768458, 7.63873279537, 13.1944344379, 11.896042354,\n        10.5830172417, 10.5020942233, 92.8918587747, 95.003720371,\n        86.3715926467, 96.0330217672, 82.6389930677, 968.702906754,\n        969.463546828, 1001.79726022, 955.047416547, 1044.27458568;\n\n    v << -32.7256441441, -36.4394150514, -9.66467612263, -36.4394150514,\n        -36.4394150514, -1.0891900302, -2.66351229645, -2.48666868596,\n        -0.929700494428, -3.56327722764, -0.455320135314, -0.391437214323,\n        -0.491352055991, -0.350454834292, -0.471773162921, -0.104084440522,\n        -0.0723646747909, -0.0992828975532, -0.121638215446, -0.122619605294,\n        -0.0317670267286, -0.0359974812869, -0.0154359225363, -0.0375775365921,\n        -0.00794899153653, -0.00777303219211, -0.00796085782042,\n        -0.0125850719397, -0.00455500206958, -0.00476436993148;\n\n    CALL_SUBTEST(res = igamma_der_a(a, x); verify_component_wise(res, v););\n  }\n\n  // Test gamma_sample_der_alpha\n  {\n    ArrayType alpha(30);\n    ArrayType sample(30);\n    ArrayType res(30);\n    ArrayType v(30);\n\n    alpha << 0.01, 0.01, 0.01, 0.01, 0.01, 0.1, 0.1, 0.1, 0.1, 0.1, 1.0, 1.0,\n        1.0, 1.0, 1.0, 10.0, 10.0, 10.0, 10.0, 10.0, 100.0, 100.0, 100.0, 100.0,\n        100.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0;\n\n    sample << 1.25668890405e-26, 1.17549435082e-38, 1.20938905072e-05,\n        1.17549435082e-38, 1.17549435082e-38, 5.66572070696e-16,\n        0.0132865061065, 0.0200034203853, 6.29263709118e-17, 1.37160367764e-06,\n        0.333412038288, 1.18135687766, 0.580629033777, 0.170631439426,\n        0.786686768458, 7.63873279537, 13.1944344379, 11.896042354,\n        10.5830172417, 10.5020942233, 92.8918587747, 95.003720371,\n        86.3715926467, 96.0330217672, 82.6389930677, 968.702906754,\n        969.463546828, 1001.79726022, 955.047416547, 1044.27458568;\n\n    v << 7.42424742367e-23, 1.02004297287e-34, 0.0130155240738,\n        1.02004297287e-34, 1.02004297287e-34, 1.96505168277e-13, 0.525575786243,\n        0.713903991771, 2.32077561808e-14, 0.000179348049886, 0.635500453302,\n        1.27561284917, 0.878125852156, 0.41565819538, 1.03606488534,\n        0.885964824887, 1.16424049334, 1.10764479598, 1.04590810812,\n        1.04193666963, 0.965193152414, 0.976217589464, 0.93008035061,\n        0.98153216096, 0.909196397698, 0.98434963993, 0.984738050206,\n        1.00106492525, 0.97734200649, 1.02198794179;\n\n    CALL_SUBTEST(res = gamma_sample_der_alpha(alpha, sample);\n                 verify_component_wise(res, v););\n  }\n#endif  // EIGEN_HAS_C99_MATH\n}\n\nEIGEN_DECLARE_TEST(special_functions)\n{\n  CALL_SUBTEST_1(array_special_functions<ArrayXf>());\n  CALL_SUBTEST_2(array_special_functions<ArrayXd>());\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/special_packetmath.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>\n// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"packetmath_test_shared.h\"\n#include \"../Eigen/SpecialFunctions\"\n\ntemplate<typename Scalar,typename Packet> void packetmath_real()\n{\n  using std::abs;\n  typedef internal::packet_traits<Scalar> PacketTraits;\n  const int PacketSize = internal::unpacket_traits<Packet>::size;\n\n  const int size = PacketSize*4;\n  EIGEN_ALIGN_MAX Scalar data1[PacketSize*4];\n  EIGEN_ALIGN_MAX Scalar data2[PacketSize*4];\n  EIGEN_ALIGN_MAX Scalar ref[PacketSize*4];\n\n#if EIGEN_HAS_C99_MATH\n  {\n    data1[0] = std::numeric_limits<Scalar>::quiet_NaN();\n    test::packet_helper<internal::packet_traits<Scalar>::HasLGamma,Packet> h;\n    h.store(data2, internal::plgamma(h.load(data1)));\n    VERIFY((numext::isnan)(data2[0]));\n  }\n  if (internal::packet_traits<Scalar>::HasErf) {\n    data1[0] = std::numeric_limits<Scalar>::quiet_NaN();\n    test::packet_helper<internal::packet_traits<Scalar>::HasErf,Packet> h;\n    h.store(data2, internal::perf(h.load(data1)));\n    VERIFY((numext::isnan)(data2[0]));\n  }\n  {\n    data1[0] = std::numeric_limits<Scalar>::quiet_NaN();\n    test::packet_helper<internal::packet_traits<Scalar>::HasErfc,Packet> h;\n    h.store(data2, internal::perfc(h.load(data1)));\n    VERIFY((numext::isnan)(data2[0]));\n  }\n  {\n    for (int i=0; i<size; ++i) {\n      data1[i] = internal::random<Scalar>(0,1);\n    }\n    CHECK_CWISE1_IF(internal::packet_traits<Scalar>::HasNdtri, numext::ndtri, internal::pndtri);\n  }\n#endif  // EIGEN_HAS_C99_MATH\n\n  // For bessel_i*e and bessel_j*, the valid range is negative reals.\n  for (int i=0; i<size; ++i)\n  {\n    data1[i] = internal::random<Scalar>(-1,1) * std::pow(Scalar(10), internal::random<Scalar>(-6,6));\n    data2[i] = internal::random<Scalar>(-1,1) * std::pow(Scalar(10), internal::random<Scalar>(-6,6));\n  }\n\n  CHECK_CWISE1_IF(PacketTraits::HasBessel, numext::bessel_i0e, internal::pbessel_i0e);\n  CHECK_CWISE1_IF(PacketTraits::HasBessel, numext::bessel_i1e, internal::pbessel_i1e);\n  CHECK_CWISE1_IF(PacketTraits::HasBessel, numext::bessel_j0, internal::pbessel_j0);\n  CHECK_CWISE1_IF(PacketTraits::HasBessel, numext::bessel_j1, internal::pbessel_j1);\n\n  // Use a smaller data range for the bessel_i* as these can become very large.\n  // Following #1693, we also restrict this range further to avoid inf's due to\n  // differences in pexp and exp.\n  for (int i=0; i<size; ++i) {\n      data1[i] = internal::random<Scalar>(0.01,1) * std::pow(\n          Scalar(9), internal::random<Scalar>(-1,2));\n      data2[i] = internal::random<Scalar>(0.01,1) * std::pow(\n          Scalar(9), internal::random<Scalar>(-1,2));\n  }\n  CHECK_CWISE1_IF(PacketTraits::HasBessel, numext::bessel_i0, internal::pbessel_i0);\n  CHECK_CWISE1_IF(PacketTraits::HasBessel, numext::bessel_i1, internal::pbessel_i1);\n\n\n  // y_i, and k_i are valid for x > 0.\n  for (int i=0; i<size; ++i)\n  {\n    data1[i] = internal::random<Scalar>(0.01,1) * std::pow(Scalar(10), internal::random<Scalar>(-2,5));\n    data2[i] = internal::random<Scalar>(0.01,1) * std::pow(Scalar(10), internal::random<Scalar>(-2,5));\n  }\n\n  // TODO(srvasude): Re-enable this test once properly investigated why the\n  // scalar and vector paths differ.\n  // CHECK_CWISE1_IF(PacketTraits::HasBessel, numext::bessel_y0, internal::pbessel_y0);\n  CHECK_CWISE1_IF(PacketTraits::HasBessel, numext::bessel_y1, internal::pbessel_y1);\n  CHECK_CWISE1_IF(PacketTraits::HasBessel, numext::bessel_k0e, internal::pbessel_k0e);\n  CHECK_CWISE1_IF(PacketTraits::HasBessel, numext::bessel_k1e, internal::pbessel_k1e);\n\n  // Following #1693, we restrict the range for exp to avoid zeroing out too\n  // fast.\n  for (int i=0; i<size; ++i) {\n      data1[i] = internal::random<Scalar>(0.01,1) * std::pow(\n          Scalar(9), internal::random<Scalar>(-1,2));\n      data2[i] = internal::random<Scalar>(0.01,1) * std::pow(\n          Scalar(9), internal::random<Scalar>(-1,2));\n  }\n  CHECK_CWISE1_IF(PacketTraits::HasBessel, numext::bessel_k0, internal::pbessel_k0);\n  CHECK_CWISE1_IF(PacketTraits::HasBessel, numext::bessel_k1, internal::pbessel_k1);\n\n\n  for (int i=0; i<size; ++i) {\n      data1[i] = internal::random<Scalar>(0.01,1) * std::pow(\n          Scalar(10), internal::random<Scalar>(-1,2));\n      data2[i] = internal::random<Scalar>(0.01,1) * std::pow(\n          Scalar(10), internal::random<Scalar>(-1,2));\n  }\n\n#if EIGEN_HAS_C99_MATH && (__cplusplus > 199711L)\n  CHECK_CWISE1_IF(internal::packet_traits<Scalar>::HasLGamma, std::lgamma, internal::plgamma);\n  CHECK_CWISE1_IF(internal::packet_traits<Scalar>::HasErf, std::erf, internal::perf);\n  CHECK_CWISE1_IF(internal::packet_traits<Scalar>::HasErfc, std::erfc, internal::perfc);\n#endif\n\n}\n\nnamespace Eigen {\nnamespace test {\n\ntemplate<typename Scalar,typename PacketType, bool IsComplex, bool IsInteger>\nstruct runall {\n  static void run() {\n    packetmath_real<Scalar,PacketType>();\n  }\n};\n\n}\n}\n\nEIGEN_DECLARE_TEST(special_packetmath)\n{\n  g_first_pass = true;\n  for(int i = 0; i < g_repeat; i++) {\n\n    CALL_SUBTEST_1( test::runner<float>::run() );\n    CALL_SUBTEST_2( test::runner<double>::run() );\n    g_first_pass = false;\n  }\n}\n"
  },
  {
    "path": "3rdparty/eigen3/unsupported/test/splines.cpp",
    "content": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2010-2011 Hauke Heibel <heibel@gmail.com>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"main.h\"\n\n#include <unsupported/Eigen/Splines>\n\nnamespace Eigen {\n  \n  // lets do some explicit instantiations and thus\n  // force the compilation of all spline functions...\n  template class Spline<double, 2, Dynamic>;\n  template class Spline<double, 3, Dynamic>;\n\n  template class Spline<double, 2, 2>;\n  template class Spline<double, 2, 3>;\n  template class Spline<double, 2, 4>;\n  template class Spline<double, 2, 5>;\n\n  template class Spline<float, 2, Dynamic>;\n  template class Spline<float, 3, Dynamic>;\n\n  template class Spline<float, 3, 2>;\n  template class Spline<float, 3, 3>;\n  template class Spline<float, 3, 4>;\n  template class Spline<float, 3, 5>;\n\n}\n\nSpline<double, 2, Dynamic> closed_spline2d()\n{\n  RowVectorXd knots(12);\n  knots << 0,\n    0,\n    0,\n    0,\n    0.867193179093898,\n    1.660330955342408,\n    2.605084834823134,\n    3.484154586374428,\n    4.252699478956276,\n    4.252699478956276,\n    4.252699478956276,\n    4.252699478956276;\n\n  MatrixXd ctrls(8,2);\n  ctrls << -0.370967741935484,   0.236842105263158,\n    -0.231401860693277,   0.442245185027632,\n    0.344361228532831,   0.773369994120753,\n    0.828990216203802,   0.106550882647595,\n    0.407270163678382,  -1.043452922172848,\n    -0.488467813584053,  -0.390098582530090,\n    -0.494657189446427,   0.054804824897884,\n    -0.370967741935484,   0.236842105263158;\n  ctrls.transposeInPlace();\n\n  return Spline<double, 2, Dynamic>(knots, ctrls);\n}\n\n/* create a reference spline */\nSpline<double, 3, Dynamic> spline3d()\n{\n  RowVectorXd knots(11);\n  knots << 0,\n    0,\n    0,\n    0.118997681558377,\n    0.162611735194631,\n    0.498364051982143,\n    0.655098003973841,\n    0.679702676853675,\n    1.000000000000000,\n    1.000000000000000,\n    1.000000000000000;\n\n  MatrixXd ctrls(8,3);\n  ctrls <<    0.959743958516081,   0.340385726666133,   0.585267750979777,\n    0.223811939491137,   0.751267059305653,   0.255095115459269,\n    0.505957051665142,   0.699076722656686,   0.890903252535799,\n    0.959291425205444,   0.547215529963803,   0.138624442828679,\n    0.149294005559057,   0.257508254123736,   0.840717255983663,\n    0.254282178971531,   0.814284826068816,   0.243524968724989,\n    0.929263623187228,   0.349983765984809,   0.196595250431208,\n    0.251083857976031,   0.616044676146639,   0.473288848902729;\n  ctrls.transposeInPlace();\n\n  return Spline<double, 3, Dynamic>(knots, ctrls);\n}\n\n/* compares evaluations against known results */\nvoid eval_spline3d()\n{\n  Spline3d spline = spline3d();\n\n  RowVectorXd u(10);\n  u << 0.351659507062997,\n    0.830828627896291,\n    0.585264091152724,\n    0.549723608291140,\n    0.917193663829810,\n    0.285839018820374,\n    0.757200229110721,\n    0.753729094278495,\n    0.380445846975357,\n    0.567821640725221;\n\n  MatrixXd pts(10,3);\n  pts << 0.707620811535916,   0.510258911240815,   0.417485437023409,\n    0.603422256426978,   0.529498282727551,   0.270351549348981,\n    0.228364197569334,   0.423745615677815,   0.637687289287490,\n    0.275556796335168,   0.350856706427970,   0.684295784598905,\n    0.514519311047655,   0.525077224890754,   0.351628308305896,\n    0.724152914315666,   0.574461155457304,   0.469860285484058,\n    0.529365063753288,   0.613328702656816,   0.237837040141739,\n    0.522469395136878,   0.619099658652895,   0.237139665242069,\n    0.677357023849552,   0.480655768435853,   0.422227610314397,\n    0.247046593173758,   0.380604672404750,   0.670065791405019;\n  pts.transposeInPlace();\n\n  for (int i=0; i<u.size(); ++i)\n  {\n    Vector3d pt = spline(u(i));\n    VERIFY( (pt - pts.col(i)).norm() < 1e-14 );\n  }\n}\n\n/* compares evaluations on corner cases */\nvoid eval_spline3d_onbrks()\n{\n  Spline3d spline = spline3d();\n\n  RowVectorXd u = spline.knots();\n\n  MatrixXd pts(11,3);\n  pts <<    0.959743958516081,   0.340385726666133,   0.585267750979777,\n    0.959743958516081,   0.340385726666133,   0.585267750979777,\n    0.959743958516081,   0.340385726666133,   0.585267750979777,\n    0.430282980289940,   0.713074680056118,   0.720373307943349,\n    0.558074875553060,   0.681617921034459,   0.804417124839942,\n    0.407076008291750,   0.349707710518163,   0.617275937419545,\n    0.240037008286602,   0.738739390398014,   0.324554153129411,\n    0.302434111480572,   0.781162443963899,   0.240177089094644,\n    0.251083857976031,   0.616044676146639,   0.473288848902729,\n    0.251083857976031,   0.616044676146639,   0.473288848902729,\n    0.251083857976031,   0.616044676146639,   0.473288848902729;\n  pts.transposeInPlace();\n\n  for (int i=0; i<u.size(); ++i)\n  {\n    Vector3d pt = spline(u(i));\n    VERIFY( (pt - pts.col(i)).norm() < 1e-14 );\n  }\n}\n\nvoid eval_closed_spline2d()\n{\n  Spline2d spline = closed_spline2d();\n\n  RowVectorXd u(12);\n  u << 0,\n    0.332457030395796,\n    0.356467130532952,\n    0.453562180176215,\n    0.648017921874804,\n    0.973770235555003,\n    1.882577647219307,\n    2.289408593930498,\n    3.511951429883045,\n    3.884149321369450,\n    4.236261590369414,\n    4.252699478956276;\n\n  MatrixXd pts(12,2);\n  pts << -0.370967741935484,   0.236842105263158,\n    -0.152576775123250,   0.448975001279334,\n    -0.133417538277668,   0.461615613865667,\n    -0.053199060826740,   0.507630360006299,\n    0.114249591147281,   0.570414135097409,\n    0.377810316891987,   0.560497102875315,\n    0.665052120135908,  -0.157557441109611,\n    0.516006487053228,  -0.559763292174825,\n    -0.379486035348887,  -0.331959640488223,\n    -0.462034726249078,  -0.039105670080824,\n    -0.378730600917982,   0.225127015099919,\n    -0.370967741935484,   0.236842105263158;\n  pts.transposeInPlace();\n\n  for (int i=0; i<u.size(); ++i)\n  {\n    Vector2d pt = spline(u(i));\n    VERIFY( (pt - pts.col(i)).norm() < 1e-14 );\n  }\n}\n\nvoid check_global_interpolation2d()\n{\n  typedef Spline2d::PointType PointType;\n  typedef Spline2d::KnotVectorType KnotVectorType;\n  typedef Spline2d::ControlPointVectorType ControlPointVectorType;\n\n  ControlPointVectorType points = ControlPointVectorType::Random(2,100);\n\n  KnotVectorType chord_lengths; // knot parameters\n  Eigen::ChordLengths(points, chord_lengths);\n\n  // interpolation without knot parameters\n  {\n    const Spline2d spline = SplineFitting<Spline2d>::Interpolate(points,3);  \n\n    for (Eigen::DenseIndex i=0; i<points.cols(); ++i)\n    {\n      PointType pt = spline( chord_lengths(i) );\n      PointType ref = points.col(i);\n      VERIFY( (pt - ref).matrix().norm() < 1e-14 );\n    }\n  }\n\n  // interpolation with given knot parameters\n  {\n    const Spline2d spline = SplineFitting<Spline2d>::Interpolate(points,3,chord_lengths);  \n\n    for (Eigen::DenseIndex i=0; i<points.cols(); ++i)\n    {\n      PointType pt = spline( chord_lengths(i) );\n      PointType ref = points.col(i);\n      VERIFY( (pt - ref).matrix().norm() < 1e-14 );\n    }\n  }\n}\n\nvoid check_global_interpolation_with_derivatives2d()\n{\n  typedef Spline2d::PointType PointType;\n  typedef Spline2d::KnotVectorType KnotVectorType;\n\n  const Eigen::DenseIndex numPoints = 100;\n  const unsigned int dimension = 2;\n  const unsigned int degree = 3;\n\n  ArrayXXd points = ArrayXXd::Random(dimension, numPoints);\n\n  KnotVectorType knots;\n  Eigen::ChordLengths(points, knots);\n\n  ArrayXXd derivatives = ArrayXXd::Random(dimension, numPoints);\n  VectorXd derivativeIndices(numPoints);\n\n  for (Eigen::DenseIndex i = 0; i < numPoints; ++i)\n      derivativeIndices(i) = static_cast<double>(i);\n\n  const Spline2d spline = SplineFitting<Spline2d>::InterpolateWithDerivatives(\n    points, derivatives, derivativeIndices, degree);  \n    \n  for (Eigen::DenseIndex i = 0; i < points.cols(); ++i)\n  {\n    PointType point = spline(knots(i));\n    PointType referencePoint = points.col(i);\n    VERIFY_IS_APPROX(point, referencePoint);\n    PointType derivative = spline.derivatives(knots(i), 1).col(1);\n    PointType referenceDerivative = derivatives.col(i);\n    VERIFY_IS_APPROX(derivative, referenceDerivative);\n  }\n}\n\nEIGEN_DECLARE_TEST(splines)\n{\n  for (int i = 0; i < g_repeat; ++i)\n  {\n    CALL_SUBTEST( eval_spline3d() );\n    CALL_SUBTEST( eval_spline3d_onbrks() );\n    CALL_SUBTEST( eval_closed_spline2d() );\n    CALL_SUBTEST( check_global_interpolation2d() );\n    CALL_SUBTEST( check_global_interpolation_with_derivatives2d() );\n  }\n}\n"
  },
  {
    "path": "CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 2.8.3)\nproject(LiDAR2Camera)\n\nset(CMAKE_CXX_FLAGS \"-std=c++11 -g -Wall\")\n\nset(3RDPARTY_DIR ${CMAKE_SOURCE_DIR}/3rdparty)\nadd_subdirectory(3rdparty)\n\ninclude_directories(${3RDPARTY_DIR}/eigen3)\ninclude_directories(${3RDPARTY_DIR}/ceres/include)\n\nfind_package(OpenCV REQUIRED)\nlink_directories(${OpenCV_LIBRARY_DIRS})\ninclude_directories(${OpenCV_INCLUDE_DIRS})\n\ninclude_directories(${PROJECT_SOURCE_DIR}/include)\ninclude_directories(${PROJECT_SOURCE_DIR}/src)\n\nset(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib)\nset(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)\n\nfile(GLOB_RECURSE PARSER_PATH src/*.cpp)\nadd_library(${PROJECT_NAME} STATIC ${PARSER_PATH})\ntarget_link_libraries(${PROJECT_NAME} ceres libjsoncpp.a ${OpenCV_LIBS})\n\nadd_executable(lidar2camera src/lidar2camera.cpp)\ntarget_link_libraries(lidar2camera ${PROJECT_NAME})\ntarget_link_libraries(lidar2camera ceres)"
  },
  {
    "path": "README.md",
    "content": "# Joint Camera Intrinsic and LiDAR-Camera Extrinsic Calibration. \nThis is a project for LiDAR to camera joint calibration<a href=\"https://arxiv.org/abs/2202.13708\" title=\"paper\">[paper]</a>. For more calibration codes, please refer to the link <a href=\"https://github.com/PJLab-ADG/SensorsCalibration\" title=\"SensorsCalibration\">SensorsCalibration</a>\n\n\n## Prerequisites\n\n- Cmake\n- Opencv 2.4.13\n- PCL 1.9\n\n## Compile\nCompile in their respective folders\n\n```shell\n# mkdir build\nmkdir -p build && cd build\n# build\ncmake .. && make\n```\n\n\n## Usage\n\n1. Two Input files: \n\n   `./lidar2camera camera_dir csv_file`\n\n- **camera_dir**: Collected camera calibration board data\n- **csv_file**: The circles center points corresponding to the images\n\n**Note:** To extract the circles center form PCD files, please refer to [README.md](tool/README.md).\n\n2. Run the test sample:\n\n   The executable file is under the bin folder.\n\n   ```\n   cd ~./lidar2camera/joint_calib\n   ./bin/lidar2camera data/intrinsic/ data/circle.csv\n   ```\n\n3. Calibration result:\n\n   <img src=\"./result/refine0.png\" width=\"100%\" height=\"100%\" alt=\"Calibration result\" div align=center />\n   <img src=\"./result/refine1.png\" width=\"100%\" height=\"100%\" alt=\"Calibration result\" div align=center />\n   <img src=\"./result/refine4.png\" width=\"100%\" height=\"100%\" alt=\"Calibration result\" div align=center />\n   <img src=\"./result/refine8.png\" width=\"100%\" height=\"100%\" alt=\"Calibration result\" div align=center />\n\n### Reference\nThe code is developed based on [camera calibration cpp](https://github.com/enazoe/camera_calibration_cpp)\n"
  },
  {
    "path": "data/circle.csv",
    "content": "left_top_x,left_top_y,left_top_z,right_top_x,right_top_y,right_top_z,right_bottom_x,right_bottom_y,right_bottom_z,left_bottom_x,left_bottom_y,left_bottom_z\r\n5.5,-1.4,0.305,5.5,-0.8,0.305,5.5,-0.8,-0.295,5.5,-1.4,-0.295\r\n5.5,-0.3,0.305,5.5,0.3,0.305,5.5,0.3,-0.295,5.5,-0.3,-0.295\r\n5.5,0.8,0.305,5.5,1.4,0.305,5.5,1.4,-0.295,5.5,0.8,-0.295\r\n5.5,-1.4,-0.295,5.5,-0.8,-0.295,5.5,-0.8,-0.895,5.5,-1.4,-0.895\r\n5.5,-0.3,-0.295,5.5,0.3,-0.295,5.5,0.3,-0.895,5.5,-0.3,-0.895\r\n5.5,0.8,-0.295,5.5,1.4,-0.295,5.5,1.4,-0.895,5.5,0.8,-0.895\r\n5.5,-1.4,-0.895,5.5,-0.8,-0.895,5.5,-0.8,-1.495,5.5,-1.4,-1.495\r\n5.5,-0.3,-0.895,5.5,0.3,-0.895,5.5,0.3,-1.495,5.5,-0.3,-1.495\r\n5.5,0.8,-0.895,5.5,1.4,-0.895,5.5,1.4,-1.495,5.5,0.8,-1.495\r\n6.5,-1.9,0.505,6.5,-1.3,0.505,6.5,-1.3,-0.095,6.5,-1.9,-0.095\r\n6.5,-0.9,0.505,6.5,-0.3,0.505,6.5,-0.3,-0.095,6.5,-0.9,-0.095\r\n6.5,0.3,0.505,6.5,0.9,0.505,6.5,0.9,-0.095,6.5,0.3,-0.095\r\n6.5,1.3,0.505,6.5,1.9,0.505,6.5,1.9,-0.095,6.5,1.3,-0.095\r\n6.5,-1.9,-0.295,6.5,-1.3,-0.295,6.5,-1.3,-0.895,6.5,-1.9,-0.895\r\n6.5,-0.9,-0.295,6.5,-0.3,-0.295,6.5,-0.3,-0.895,6.5,-0.9,-0.895\r\n6.5,0.3,-0.295,6.5,0.9,-0.295,6.5,0.9,-0.895,6.5,0.3,-0.895\r\n6.5,1.3,-0.295,6.5,1.9,-0.295,6.5,1.9,-0.895,6.5,1.3,-0.895\r\n6.5,-1.9,-1.095,6.5,-1.3,-1.095,6.5,-1.3,-1.695,6.5,-1.9,-1.695\r\n6.5,-0.9,-1.095,6.5,-0.3,-1.095,6.5,-0.3,-1.695,6.5,-0.9,-1.695\r\n6.5,0.3,-1.095,6.5,0.9,-1.095,6.5,0.9,-1.695,6.5,0.3,-1.695\r\n6.5,1.3,-1.095,6.5,1.9,-1.095,6.5,1.9,-1.695,6.5,1.3,-1.695\r\n0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0\r\n0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0\r\n0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0\r\n0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0\r\n0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0\r\n0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0\r\n0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0\r\n0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0\r\n0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0\r\n0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0\r\n0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0\r\n0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0"
  },
  {
    "path": "include/camera_calibrator.hpp",
    "content": "#ifndef CAMERA_CALIBRATOR_HPP_\n#define CAMERA_CALIBRATOR_HPP_\n\n#include \"nonlinear_optimizer.hpp\"\n#include <ceres/ceres.h>\n#include <gflags/gflags.h>\n#include <glog/logging.h>\n#include <opencv2/opencv.hpp>\n#include <vector>\n\n#include \"logging.hpp\"\n\nclass CameraCalibrator {\npublic:\n  void set_input(const std::vector<std::string> images_name,\n                 const std::vector<cv::Mat> &vec_mat_,\n                 const cv::Size &chessboard_size_,\n                 const std::vector<std::vector<std::string>> &lidar_3d_pts);\n\n  void get_result(cv::Mat &camera_matrix, cv::Mat &k,\n                  const cv::Size &image_size, std::vector<cv::Mat> &rvecsMat,\n                  std::vector<cv::Mat> &tvecsMat);\n\nprivate:\n  void make_board_points(const cv::Size &chessboard_size_);\n\n  void compute_mean_error(cv::Mat &img, cv::Mat &camera_matrix_, cv::Mat &k_,\n                          std::vector<cv::Mat> &rvecsMat_,\n                          std::vector<cv::Mat> &tvecsMat_);\n\n  void refine_all(Eigen::Matrix3d &camera_matrix_, Eigen::VectorXd &k_,\n                  std::vector<Eigen::MatrixXd> &vec_extrinsics_);\n  void refine_lidar2camera(Eigen::Matrix3d &camera_matrix_, Eigen::VectorXd &k_,\n                           std::vector<Eigen::MatrixXd> &vec_extrinsics_,\n                           Eigen::Matrix<double, 3, 4> &initial_extrinsic,\n                           std::vector<LidarPointPair> &lidar_point_pairs);\n\n  void get_distortion(const Eigen::Matrix3d &camera_matrix_,\n                      const std::vector<Eigen::MatrixXd> &vec_extrinsics_,\n                      Eigen::VectorXd &k_);\n\n  void get_extrinsics(const std::vector<Eigen::Matrix3d> &vec_h_,\n                      const Eigen::Matrix3d &camera_matrix_,\n                      std::vector<Eigen::MatrixXd> &vec_extrinsics_);\n\n  //\n  void create_v(const Eigen::Matrix3d &h_, const int p, const int q,\n                Eigen::RowVectorXd &row_v_);\n\n  void get_camera_instrinsics(const std::vector<Eigen::Matrix3d> &vec_h_,\n                              Eigen::Matrix3d &camera_matrix_);\n\n  void get_homography(std::vector<Eigen::Matrix3d> &vec_h_);\n\n  // normalized DLT algorithm\n  void estimate_H(const std::vector<cv::Point2f> &img_pts_,\n                  const std::vector<cv::Point2f> &board_pts_,\n                  Eigen::Matrix3d &matrix_H_);\n\n  void get_normalization_matrix(const std::vector<cv::Point2f> &pts_,\n                                Eigen::Matrix3d &matrix_trans_);\n\n  void\n  point_undistort(const std::vector<std::vector<cv::Point2f>> &board_imgs_pts,\n                  std::vector<std::vector<cv::Point2f>> &undistort_pts,\n                  const Eigen::Matrix3d camera_intrinsic,\n                  const Eigen::VectorXd distort);\n  void image_undistort(const cv::Mat &img, cv::Mat &undistort_img,\n                       const Eigen::Matrix3d camera_intrinsic,\n                       const Eigen::VectorXd distort);\n\n  void lidar_projection(const Eigen::Matrix3d &camera_intrinsic,\n                        const Eigen::Matrix<double, 3, 4> &extrinsic,\n                        const cv::Point3f &pt, cv::Point2f &img_pt);\n  void DrawCross(cv::Mat &img, cv::Point point);\n\nprivate:\n  bool _b_disp_corners = false;\n  std::vector<std::vector<cv::Point2f>> _imgs_pts;\n  std::vector<std::vector<cv::Point2f>> _boards_pts;\n  std::vector<std::vector<cv::Point3f>> _boards_pts_3d;\n  std::vector<std::vector<cv::Point3f>> _boards_pts_cir; // scl\n  std::vector<std::vector<cv::Point3f>> lidar_3d_pts_;\n  std::vector<std::vector<cv::Point2f>> _imgs_pts_cir2D_true; // scl\n  std::vector<cv::Mat> available_imgs;\n\n  NonlinearOptimizer optimier;\n};\n\n#endif // CAMERA_CALIBRATOR_HPP_\n"
  },
  {
    "path": "include/logging.hpp",
    "content": "/*\n * Copyright (C) 2021 by Autonomous Driving Group, Shanghai AI Laboratory\n * Limited. All rights reserved.\n * Yan Guohang <yanguohang@pjlab.org.cn>\n */\n#ifndef LOGGING_HPP_\n#define LOGGING_HPP_\n\n#define OUTPUT\n#define __FILENAME__                                                           \\\n  (strrchr(__FILE__, '/') ? (strrchr(__FILE__, '/') + 1) : __FILE__)\n\n#ifdef OUTPUT\n#define LOGI(...)                                                              \\\n  (printf(\"[INFO] [%d@%s] \", __LINE__, __FILENAME__), printf(__VA_ARGS__),     \\\n   printf(\"\\n\"))\n#define LOGW(...)                                                              \\\n  (printf(\"\\33[33m[WARN] [%d@%s] \", __LINE__, __FILENAME__),                   \\\n   printf(__VA_ARGS__), printf(\"\\033[0m\\n\"))\n#define LOGE(...)                                                              \\\n  (printf(\"\\33[31m[ERROR] [%d@%s] \", __LINE__, __FILENAME__),                  \\\n   printf(__VA_ARGS__), printf(\"\\033[0m\\n\"))\n#else\n#define LOGI(...) ((void)0)\n#define LOGW(...) ((void)0)\n#define LOGE(...) ((void)0)\n#endif\n\n#ifdef DEBUG\n#define LOGDEBUG(...) (printf(__VA_ARGS__), printf(\"\\n\"))\n#else\n#define LOGDEBUG(...) ((void)0)\n#endif\n\n#endif // LOGGING_HPP_"
  },
  {
    "path": "include/nonlinear_optimizer.hpp",
    "content": "#ifndef NONLINEAR_OPTIMIZER_HPP_\n#define NONLINEAR_OPTIMIZER_HPP_\n\n#include <ceres/ceres.h>\n#include <ceres/rotation.h>\n#include <opencv2/opencv.hpp>\n\n#include \"params.hpp\"\n#include \"reprojection_error.hpp\"\n#include \"termination_checking.hpp\"\n\nclass NonlinearOptimizer {\npublic:\n  NonlinearOptimizer() {}\n  ~NonlinearOptimizer() {}\n\n  void refine_H(const std::vector<cv::Point2f> &img_pts_,\n                const std::vector<cv::Point2f> &board_pts_,\n                const Eigen::Matrix3d &matrix_H_, Eigen::Matrix3d &refined_H_);\n\n  void refine_all_camera_params(\n      const Params &params_,\n      const std::vector<std::vector<cv::Point2f>> &imgs_pts_,\n      const std::vector<std::vector<cv::Point2f>> &bords_pts_,\n      Params &refined_params_);\n\n  void refine_lidar2camera_params(\n      const LidarParams &params_,\n      const std::vector<std::vector<cv::Point2f>> &imgs_pts_,\n      const std::vector<std::vector<cv::Point2f>> &bords_pts_,\n      const std::vector<LidarPointPair> lidar_point_pairs,\n      LidarParams &refined_params_);\n\nprivate:\n  void formate_data(const Eigen::VectorXd &v_camera_matrix_,\n                    const Eigen::VectorXd &v_dist_,\n                    const std::vector<Eigen::VectorXd> &v_rt_, Params &params_);\n  void formate_data(const Eigen::VectorXd &v_camera_matrix_,\n                    const Eigen::VectorXd &v_dist_,\n                    const std::vector<Eigen::VectorXd> &v_rt_,\n                    const Eigen::VectorXd &RT, LidarParams &params_);\n  // Cost functor which computes symmetric geometric distance\n  // used for homography matrix refinement.\n  struct HomographySymmetricGeometricCostFunctor {\n    HomographySymmetricGeometricCostFunctor(const Eigen::Vector2d &x,\n                                            const Eigen::Vector2d &y)\n        : x_(x), y_(y) {}\n\n    template <typename T>\n    bool operator()(const T *homography_parameters, T *residuals) const {\n      typedef Eigen::Matrix<T, 3, 3> Mat3;\n      typedef Eigen::Matrix<T, 2, 1> Vec2;\n\n      Mat3 H(homography_parameters);\n      Vec2 x(T(x_(0)), T(x_(1)));\n      Vec2 y(T(y_(0)), T(y_(1)));\n\n      Utils::SymmetricGeometricDistanceTerms<T>(H, x, y, &residuals[0],\n                                                &residuals[2]);\n      return true;\n    }\n\n    const Eigen::Vector2d x_;\n    const Eigen::Vector2d y_;\n  };\n\n  struct ReprojectionError {\n    ReprojectionError(const Eigen::Vector2d &img_pts_,\n                      const Eigen::Vector2d &board_pts_)\n        : _img_pts(img_pts_), _board_pts(board_pts_) {}\n\n    template <typename T>\n    bool operator()(const T *const instrinsics_, const T *const k_,\n                    const T *const rt_, // 6 : angle axis and translation\n                    T *residuls) const {\n      //\tEigen::Vector3d hom_w(_board_pts(0), _board_pts(1), T(1.));\n      T hom_w_t[3];\n      hom_w_t[0] = T(_board_pts(0));\n      hom_w_t[1] = T(_board_pts(1));\n      hom_w_t[2] = T(1.);\n      T hom_w_trans[3];\n      ceres::AngleAxisRotatePoint(rt_, hom_w_t, hom_w_trans);\n      hom_w_trans[0] += rt_[3];\n      hom_w_trans[1] += rt_[4];\n      hom_w_trans[2] += rt_[5];\n\n      T c_x = hom_w_trans[0] / hom_w_trans[2];\n      T c_y = hom_w_trans[1] / hom_w_trans[2];\n\n      // distortion\n      T r2 = c_x * c_x + c_y * c_y;\n      T r4 = r2 * r2;\n      T r_coeff = (T(1) + k_[0] * r2 + k_[1] * r4);\n      T xd = c_x * r_coeff;\n      T yd = c_y * r_coeff;\n\n      // camera coord => image coord\n      T predict_x = instrinsics_[0] * xd + instrinsics_[2];\n      T predict_y = instrinsics_[3] * yd + instrinsics_[4];\n\n      // residus\n\n      residuls[0] = _img_pts(0) - predict_x;\n      residuls[1] = _img_pts(1) - predict_y;\n\n      return true;\n    }\n    const Eigen::Vector2d _img_pts;\n    const Eigen::Vector2d _board_pts;\n  };\n\n  struct LidarReprojectionError {\n    LidarReprojectionError(const Eigen::Vector2d &img_pts_,\n                           const Eigen::Vector3d &lidar_pts_)\n        : _img_pts(img_pts_), _lidar_pts(lidar_pts_) {}\n\n    template <typename T>\n    bool operator()(const T *const instrinsics_, const T *const k_,\n                    const T *const rt_, // 6 : angle axis and translation\n                    T *residuls) const {\n      T hom_w_t[3];\n      hom_w_t[0] = T(_lidar_pts(0));\n      hom_w_t[1] = T(_lidar_pts(1));\n      hom_w_t[2] = T(_lidar_pts(2));\n      T hom_w_trans[3];\n      ceres::AngleAxisRotatePoint(rt_, hom_w_t, hom_w_trans);\n      hom_w_trans[0] += rt_[3];\n      hom_w_trans[1] += rt_[4];\n      hom_w_trans[2] += rt_[5];\n\n      T c_x = hom_w_trans[0] / hom_w_trans[2];\n      T c_y = hom_w_trans[1] / hom_w_trans[2];\n\n      T xd = c_x;\n      T yd = c_y;\n      // distortion\n      // T r2 = c_x * c_x + c_y * c_y;\n      // T r4 = r2 * r2;\n      // T r_coeff = (T(1) + k_[0] * r2 + k_[1] * r4);\n      // T xd = c_x * r_coeff;\n      // T yd = c_y * r_coeff;\n\n      // // camera coord => image coord\n      T predict_x = instrinsics_[0] * xd + instrinsics_[2];\n      T predict_y = instrinsics_[3] * yd + instrinsics_[4];\n\n      T scale_factor = (T)60.0;\n      residuls[0] = (_img_pts(0) - predict_x) * scale_factor;\n      residuls[1] = (_img_pts(1) - predict_y) * scale_factor;\n\n      return true;\n    }\n    const Eigen::Vector2d _img_pts;\n    const Eigen::Vector3d _lidar_pts;\n  };\n};\n\n#endif // NONLINEAR_OPTIMIZER_HPP_\n"
  },
  {
    "path": "include/params.hpp",
    "content": "#ifndef UTILS_HPP_\n#define UTILS_HPP_\n\n#include <ceres/ceres.h>\n#include <ceres/rotation.h>\n#include <opencv2/opencv.hpp>\n\nstruct Params {\n  Eigen::Matrix3d camera_matrix;\n  Eigen::VectorXd k;\n  std::vector<Eigen::MatrixXd> vec_rt;\n};\n\nstruct LidarParams {\n  Eigen::Matrix3d camera_matrix;\n  Eigen::VectorXd k;\n  std::vector<Eigen::MatrixXd> vec_rt;\n  Eigen::Matrix<double, 3, 4> extrinsic;\n};\n\nstruct LidarPointPair {\n  cv::Point3f lidar_3d_point[4];\n  cv::Point2f lidar_2d_point[4];\n  int img_index = 0;\n};\n\nstruct EstimateHomographyOptions {\n  // Default settings for homography estimation which should be suitable\n  // for a wide range of use cases.\n  EstimateHomographyOptions()\n      : max_num_iterations(50), expected_average_symmetric_distance(1e-16) {}\n\n  int max_num_iterations;\n  double expected_average_symmetric_distance;\n};\n\nclass Utils {\n\npublic:\n  template <typename T>\n  static void SymmetricGeometricDistanceTerms(const Eigen::Matrix<T, 3, 3> &H,\n                                              const Eigen::Matrix<T, 2, 1> &x1,\n                                              const Eigen::Matrix<T, 2, 1> &x2,\n                                              T forward_error[2],\n                                              T backward_error[2]) {\n    typedef Eigen::Matrix<T, 3, 1> Vec3;\n    Vec3 x(x1(0), x1(1), T(1.0));\n    Vec3 y(x2(0), x2(1), T(1.0));\n\n    Vec3 H_x = H * x;\n    Vec3 Hinv_y = H.inverse() * y;\n\n    H_x /= H_x(2);\n    Hinv_y /= Hinv_y(2);\n\n    forward_error[0] = H_x(0) - y(0);\n    forward_error[1] = H_x(1) - y(1);\n    backward_error[0] = Hinv_y(0) - x(0);\n    backward_error[1] = Hinv_y(1) - x(1);\n  }\n  static double SymmetricGeometricDistance(const Eigen::Matrix3d &H,\n                                           const Eigen::Vector2d &x1,\n                                           const Eigen::Vector2d &x2) {\n    Eigen::Vector2d forward_error, backward_error;\n    SymmetricGeometricDistanceTerms<double>(H, x1, x2, forward_error.data(),\n                                            backward_error.data());\n    return forward_error.squaredNorm() + backward_error.squaredNorm();\n  }\n};\n\n#endif // UTILS_HPP_\n"
  },
  {
    "path": "include/reprojection_error.hpp",
    "content": "#ifndef REPROJECTION_HPP_\n#define REPROJECTION_HPP_\n\n#include <ceres/ceres.h>\n#include <ceres/rotation.h>\n#include <opencv2/opencv.hpp>\n\nstruct ReprojectionError {\n  ReprojectionError(const Eigen::Vector2d &img_pts_,\n                    const Eigen::Vector2d &board_pts_)\n      : _img_pts(img_pts_), _board_pts(board_pts_) {}\n\n  template <typename T>\n  bool operator()(const T *const instrinsics_, const T *const k_,\n                  const T *const rt_, // 6 : angle axis and translation\n                  T *residuls) const {\n    //\tEigen::Vector3d hom_w(_board_pts(0), _board_pts(1), T(1.));\n    T hom_w_t[3];\n    hom_w_t[0] = T(_board_pts(0));\n    hom_w_t[1] = T(_board_pts(1));\n    hom_w_t[2] = T(1.);\n    T hom_w_trans[3];\n    ceres::AngleAxisRotatePoint(rt_, hom_w_t, hom_w_trans);\n    hom_w_trans[0] += rt_[3];\n    hom_w_trans[1] += rt_[4];\n    hom_w_trans[2] += rt_[5];\n\n    T c_x = hom_w_trans[0] / hom_w_trans[2];\n    T c_y = hom_w_trans[1] / hom_w_trans[2];\n\n    // distortion\n    T r2 = c_x * c_x + c_y * c_y;\n    T r4 = r2 * r2;\n    T r_coeff = (T(1) + k_[0] * r2 + k_[1] * r4);\n    T xd = c_x * r_coeff;\n    T yd = c_y * r_coeff;\n\n    // camera coord => image coord\n    T predict_x = instrinsics_[0] * xd + instrinsics_[1] * yd + instrinsics_[2];\n    T predict_y = instrinsics_[3] * yd + instrinsics_[4];\n\n    // residus\n\n    residuls[0] = _img_pts(0) - predict_x;\n    residuls[1] = _img_pts(1) - predict_y;\n\n    return true;\n  }\n  const Eigen::Vector2d _img_pts;\n  const Eigen::Vector2d _board_pts;\n};\n\n#endif // REPROJECTION_HPP_\n"
  },
  {
    "path": "include/termination_checking.hpp",
    "content": "#ifndef TERMINATION_CHECKING_HPP_\n#define TERMINATION_CHECKING_HPP_\n\n#include <ceres/ceres.h>\n#include <ceres/rotation.h>\n#include <opencv2/opencv.hpp>\n\n#include \"params.hpp\"\n// Termination checking callback. This is needed to finish the\n// optimization when an absolute error threshold is met, as opposed\n// to Ceres's function_tolerance, which provides for finishing when\n// successful steps reduce the cost function by a fractional amount.\n// In this case, the callback checks for the absolute average reprojection\n// error and terminates when it's below a threshold (for example all\n// points < 0.5px error).\nclass TerminationCheckingCallback : public ceres::IterationCallback {\npublic:\n  TerminationCheckingCallback(const Eigen::MatrixXd &x1,\n                              const Eigen::MatrixXd &x2,\n                              const EstimateHomographyOptions &options,\n                              Eigen::Matrix3d *H)\n      : options_(options), x1_(x1), x2_(x2), H_(H) {}\n\n  virtual ceres::CallbackReturnType\n  operator()(const ceres::IterationSummary &summary) {\n    // If the step wasn't successful, there's nothing to do.\n    if (!summary.step_is_successful) {\n      return ceres::SOLVER_CONTINUE;\n    }\n\n    // Calculate average of symmetric geometric distance.\n    double average_distance = 0.0;\n    for (int i = 0; i < x1_.cols(); i++) {\n      average_distance +=\n          Utils::SymmetricGeometricDistance(*H_, x1_.col(i), x2_.col(i));\n    }\n    average_distance /= x1_.cols();\n\n    if (average_distance <= options_.expected_average_symmetric_distance) {\n      return ceres::SOLVER_TERMINATE_SUCCESSFULLY;\n    }\n    return ceres::SOLVER_CONTINUE;\n  }\n\nprivate:\n  const EstimateHomographyOptions &options_;\n  const Eigen::MatrixXd &x1_;\n  const Eigen::MatrixXd &x2_;\n  Eigen::Matrix3d *H_;\n};\n\n#endif // TERMINATION_CHECKING_HPP_\n"
  },
  {
    "path": "src/camera_calibrator.cpp",
    "content": "/*\n * Copyright (C) 2022 by Autonomous Driving Group, Shanghai AI Laboratory\n * Limited. All rights reserved.\n * Yan Guohang <yanguohang@pjlab.org.cn>\n */\n\n#include \"camera_calibrator.hpp\"\n#include <iomanip>\n\nvoid CameraCalibrator::set_input(\n    const std::vector<std::string> images_name,\n    const std::vector<cv::Mat> &vec_mat_, const cv::Size &chessboard_size_,\n    const std::vector<std::vector<std::string>> &lidar_3d_pts) {\n  // lidar\n  std::vector<std::vector<cv::Point3f>> pts;\n  for (auto src : lidar_3d_pts) {\n    std::vector<cv::Point3f> pt;\n    cv::Point3f left_top(std::stod(src[0]), std::stod(src[1]),\n                         std::stod(src[2]));\n    cv::Point3f right_top(std::stod(src[3]), std::stod(src[4]),\n                          std::stod(src[5]));\n    cv::Point3f left_bottom(std::stod(src[6]), std::stod(src[7]),\n                            std::stod(src[8]));\n    cv::Point3f right_bottom(std::stod(src[9]), std::stod(src[10]),\n                             std::stod(src[11]));\n    pt.push_back(left_top);\n    pt.push_back(right_top);\n    pt.push_back(left_bottom);\n    pt.push_back(right_bottom);\n    pts.push_back(pt);\n  }\n\n  std::cout << \"start\" << std::endl;\n  _boards_pts.clear();\n  _imgs_pts.clear();\n  int i = 0;\n  for (const auto &img : vec_mat_) {\n    CHECK(1 == img.channels()) << \"images must be gray\";\n    std::vector<cv::Point2f> corner_pts;\n    int found = cv::findChessboardCorners(img, chessboard_size_, corner_pts,\n                                          cv::CALIB_CB_ADAPTIVE_THRESH |\n                                              cv::CALIB_CB_FAST_CHECK |\n                                              cv::CALIB_CB_NORMALIZE_IMAGE);\n    if (!found) {\n      continue;\n    }\n    cv::Mat img_copy = img.clone();\n    available_imgs.push_back(img_copy);\n    lidar_3d_pts_.push_back(pts[i]);\n    std::cout << images_name[i] << std::endl;\n    i++;\n    cv::TermCriteria criteria(2, 30, 0.001);\n    cv::cornerSubPix(img, corner_pts, chessboard_size_, cv::Size(-1, -1),\n                     criteria);\n    _imgs_pts.push_back(corner_pts);\n    this->make_board_points(chessboard_size_);\n  }\n}\n\nvoid CameraCalibrator::get_result(cv::Mat &camera_matrix, cv::Mat &k,\n                                  const cv::Size &image_size,\n                                  std::vector<cv::Mat> &rvecsMat,\n                                  std::vector<cv::Mat> &tvecsMat) {\n  double re_error =\n      cv::calibrateCamera(_boards_pts_3d, _imgs_pts, image_size, camera_matrix,\n                          k, rvecsMat, tvecsMat, CV_CALIB_FIX_PRINCIPAL_POINT);\n  std::cout << \"reprojection is \" << re_error << std::endl;\n\n  Eigen::Matrix3d camera_intrinsic;\n  camera_intrinsic << camera_matrix.at<double>(0, 0),\n      camera_matrix.at<double>(0, 1), camera_matrix.at<double>(0, 2),\n      camera_matrix.at<double>(1, 0), camera_matrix.at<double>(1, 1),\n      camera_matrix.at<double>(1, 2), camera_matrix.at<double>(2, 0),\n      camera_matrix.at<double>(2, 1), camera_matrix.at<double>(2, 2);\n\n  Eigen::VectorXd distort(2);\n  distort << k.at<double>(0, 0), k.at<double>(0, 1);\n\n  std::vector<Eigen::MatrixXd> vec_extrinsics;\n  for (size_t i = 0; i < rvecsMat.size(); i++) {\n    cv::Mat rvec = rvecsMat[i];\n    cv::Mat tvec = tvecsMat[i];\n    cv::Mat rot;\n    cv::Rodrigues(rvec, rot);\n    std::vector<cv::Point2f> imgpoints_cir;\n    cv::projectPoints(_boards_pts_cir[i], rvecsMat[i], tvecsMat[i],\n                      camera_matrix, k, imgpoints_cir);\n    size_t y_min = imgpoints_cir[0].y;\n    size_t y_max = imgpoints_cir[0].y;\n    size_t x_min = imgpoints_cir[0].x;\n    size_t x_max = imgpoints_cir[0].x;\n    for (size_t i = 1; i < 4; i++) {\n      if (imgpoints_cir[i].y > y_max)\n        y_max = imgpoints_cir[i].y;\n      if (imgpoints_cir[i].y < y_min)\n        y_min = imgpoints_cir[i].y;\n      if (imgpoints_cir[i].x > x_max)\n        x_max = imgpoints_cir[i].x;\n      if (imgpoints_cir[i].x < x_min)\n        x_min = imgpoints_cir[i].x;\n    }\n    std::vector<cv::Point2f> imgpoints_cir1; // scl\n    for (size_t i = 0; i < 4; i++) {\n      if ((imgpoints_cir[i].x - x_min) <= 50 &&\n          (imgpoints_cir[i].y - y_min) <= 50)\n        imgpoints_cir1.push_back(imgpoints_cir[i]);\n    }\n    for (size_t i = 0; i < 4; i++) {\n      if ((x_max - imgpoints_cir[i].x) <= 50 &&\n          (imgpoints_cir[i].y - y_min) <= 50)\n        imgpoints_cir1.push_back(imgpoints_cir[i]);\n    }\n    for (size_t i = 0; i < 4; i++) {\n      if ((imgpoints_cir[i].x - x_min) <= 50 &&\n          (y_max - imgpoints_cir[i].y) <= 50)\n        imgpoints_cir1.push_back(imgpoints_cir[i]);\n    }\n    for (size_t i = 0; i < 4; i++) {\n      if ((x_max - imgpoints_cir[i].x) <= 50 &&\n          (y_max - imgpoints_cir[i].y) <= 50)\n        imgpoints_cir1.push_back(imgpoints_cir[i]);\n    }\n    if (imgpoints_cir1.size() != 4) {\n      std::cout << \"imgpoints_cir1.size() must = 4\" << std::endl;\n      return;\n    }\n    _imgs_pts_cir2D_true.push_back(imgpoints_cir1);\n    Eigen::Vector3d r0, r1, r2, t;\n    r0 << rot.at<double>(0, 0), rot.at<double>(1, 0), rot.at<double>(2, 0);\n    r1 << rot.at<double>(0, 1), rot.at<double>(1, 1), rot.at<double>(2, 1);\n    r2 << rot.at<double>(0, 2), rot.at<double>(1, 2), rot.at<double>(2, 2);\n    t << tvec.at<double>(0, 0), tvec.at<double>(0, 1), tvec.at<double>(0, 2);\n\n    Eigen::MatrixXd RT(3, 4);\n    RT.block<3, 1>(0, 0) = r0;\n    RT.block<3, 1>(0, 1) = r1;\n    RT.block<3, 1>(0, 2) = r2;\n    RT.block<3, 1>(0, 3) = t;\n    vec_extrinsics.push_back(RT);\n  }\n\n  this->refine_all(camera_intrinsic, distort, vec_extrinsics);\n  std::vector<LidarPointPair> lidar_point_pairs;\n  for (size_t i = 0; i < _imgs_pts_cir2D_true.size(); i++) {\n    cv::Mat img = available_imgs[i].clone();\n    cv::Mat undistort_img = img;\n    std::vector<cv::Point2f> left_top_src, right_top_src, left_bottom_src,\n        right_bottom_src;\n\n    LidarPointPair lidar_point_pair;\n    lidar_point_pair.img_index = i;\n    // left top\n    lidar_point_pair.lidar_2d_point[0] = _imgs_pts_cir2D_true[i][0];\n    lidar_point_pair.lidar_3d_point[0] = lidar_3d_pts_[i][0];\n    // right top\n    lidar_point_pair.lidar_2d_point[1] = _imgs_pts_cir2D_true[i][1];\n    lidar_point_pair.lidar_3d_point[1] = lidar_3d_pts_[i][1];\n\n    // left bottom;\n    lidar_point_pair.lidar_2d_point[2] = _imgs_pts_cir2D_true[i][2];\n    lidar_point_pair.lidar_3d_point[2] = lidar_3d_pts_[i][3];\n\n    // right bottom\n    lidar_point_pair.lidar_2d_point[3] = _imgs_pts_cir2D_true[i][3];\n    lidar_point_pair.lidar_3d_point[3] = lidar_3d_pts_[i][2];\n    if (false) { // Show real LiDAR pixels\n      DrawCross(undistort_img, lidar_point_pair.lidar_2d_point[0]);\n      DrawCross(undistort_img, lidar_point_pair.lidar_2d_point[1]);\n      DrawCross(undistort_img, lidar_point_pair.lidar_2d_point[2]);\n      DrawCross(undistort_img, lidar_point_pair.lidar_2d_point[3]);\n      std::string save_name = \"original\" + std::to_string(i) + \".png\";\n      cv::imwrite(save_name, undistort_img);\n    }\n\n    if (i > 20) // no corresponding circle center for more than 20\n    {\n      continue;\n    }\n\n    lidar_point_pairs.push_back(lidar_point_pair);\n  }\n\n  // an inaccurate initial Lidar-camera extrinsic\n  Eigen::Matrix<double, 3, 4> initial_extrinsic;\n  initial_extrinsic << -0.0000667338, -0.9999999780, 0.0001990654,\n      -0.0010031200, -0.0000409491, 0.0001990681, 0.9999999793, 0.5912607639,\n      -0.9999999969, 0.0000667257, -0.0000409624, 2.5079706347;\n  std::cout << initial_extrinsic << std::endl;\n\n  this->refine_lidar2camera(camera_intrinsic, distort, vec_extrinsics,\n                            initial_extrinsic, lidar_point_pairs);\n\n  double lidar_reprojection_error = 0;\n  int number = 0;\n  if (true) // Show the optimized projection effect\n  {\n    for (size_t i = 0; i < lidar_point_pairs.size(); i++) {\n      int img_index = lidar_point_pairs[i].img_index;\n      cv::Mat img = available_imgs[img_index].clone();\n      cv::Mat undistort_img = img;\n      // image_undistort(img, undistort_img, camera_intrinsic, distort);\n      cv::Point2f img_pt;\n      lidar_projection(camera_intrinsic, initial_extrinsic,\n                       lidar_point_pairs[i].lidar_3d_point[0], img_pt);\n      cv::circle(undistort_img, img_pt, 8, (0, 255, 0), 8);\n\n      cv::Point2f pt = lidar_point_pairs[i].lidar_2d_point[0];\n      double error1 = std::sqrt((img_pt.x - pt.x) * (img_pt.x - pt.x) +\n                                (img_pt.y - pt.y) * (img_pt.y - pt.y));\n\n      lidar_projection(camera_intrinsic, initial_extrinsic,\n                       lidar_point_pairs[i].lidar_3d_point[1], img_pt);\n      cv::circle(undistort_img, img_pt, 8, (0, 255, 0), 8);\n\n      pt = lidar_point_pairs[i].lidar_2d_point[1];\n      double error2 = std::sqrt((img_pt.x - pt.x) * (img_pt.x - pt.x) +\n                                (img_pt.y - pt.y) * (img_pt.y - pt.y));\n\n      lidar_projection(camera_intrinsic, initial_extrinsic,\n                       lidar_point_pairs[i].lidar_3d_point[2], img_pt);\n      cv::circle(undistort_img, img_pt, 8, (0, 255, 0), 8);\n\n      pt = lidar_point_pairs[i].lidar_2d_point[2];\n      double error3 = std::sqrt((img_pt.x - pt.x) * (img_pt.x - pt.x) +\n                                (img_pt.y - pt.y) * (img_pt.y - pt.y));\n\n      lidar_projection(camera_intrinsic, initial_extrinsic,\n                       lidar_point_pairs[i].lidar_3d_point[3], img_pt);\n      cv::circle(undistort_img, img_pt, 8, (0, 255, 0), 8);\n\n      pt = lidar_point_pairs[i].lidar_2d_point[3];\n      double error4 = std::sqrt((img_pt.x - pt.x) * (img_pt.x - pt.x) +\n                                (img_pt.y - pt.y) * (img_pt.y - pt.y));\n      //\n      DrawCross(undistort_img, lidar_point_pairs[i].lidar_2d_point[0]);\n      DrawCross(undistort_img, lidar_point_pairs[i].lidar_2d_point[1]);\n      DrawCross(undistort_img, lidar_point_pairs[i].lidar_2d_point[2]);\n      DrawCross(undistort_img, lidar_point_pairs[i].lidar_2d_point[3]);\n      std::string save_name = \"refine\" + std::to_string(i) + \".png\";\n      cv::imwrite(save_name, undistort_img);\n      double error = (error1 + error2 + error3 + error4) / 4;\n      lidar_reprojection_error += error;\n      number++;\n    }\n  }\n  std::cout << \"lidar reprojection error: \" << lidar_reprojection_error / number\n            << std::endl;\n}\n\nvoid CameraCalibrator::DrawCross(cv::Mat &img, cv::Point point) {\n  double cx = point.x;\n  double cy = point.y;\n  double len = 10;\n  cv::line(img, cv::Point(cx - len, cy), cv::Point(cx + len, cy), (0, 255, 255),\n           3);\n  cv::line(img, cv::Point(cx, cy - len), cv::Point(cx, cy + len), (0, 255, 255),\n           3);\n}\n\nvoid CameraCalibrator::lidar_projection(\n    const Eigen::Matrix3d &camera_intrinsic,\n    const Eigen::Matrix<double, 3, 4> &extrinsic, const cv::Point3f &pt,\n    cv::Point2f &img_pt) {\n  Eigen::Matrix<double, 4, 1> lidar_point;\n  lidar_point << pt.x, pt.y, pt.z, 1.0;\n  // Eigen::Matrix<float, 3, 1> pro_pt;\n  auto pro_pt = camera_intrinsic * extrinsic * lidar_point;\n  img_pt.x = pro_pt(0) / pro_pt(2);\n  img_pt.y = pro_pt(1) / pro_pt(2);\n}\n\nvoid CameraCalibrator::point_undistort(\n    const std::vector<std::vector<cv::Point2f>> &board_imgs_pts,\n    std::vector<std::vector<cv::Point2f>> &undistort_pts,\n    const Eigen::Matrix3d camera_intrinsic, const Eigen::VectorXd distort) {\n  cv::Mat K, D;\n  float d[4], k[9];\n  k[0] = camera_intrinsic(0, 0);\n  k[1] = camera_intrinsic(0, 1);\n  k[2] = camera_intrinsic(0, 2);\n  k[3] = camera_intrinsic(1, 0);\n  k[4] = camera_intrinsic(1, 1);\n  k[5] = camera_intrinsic(1, 2);\n  k[6] = camera_intrinsic(2, 0);\n  k[7] = camera_intrinsic(2, 1);\n  k[8] = camera_intrinsic(2, 2);\n  d[0] = distort(0);\n  d[1] = distort(1);\n  d[2] = 0;\n  d[3] = 0;\n  D = cv::Mat(4, 1, CV_32FC1, d);\n  K = cv::Mat(3, 3, CV_32FC1, k);\n  double fx = camera_intrinsic(0, 0);\n  double fy = camera_intrinsic(1, 1);\n  double cx = camera_intrinsic(0, 2);\n  double cy = camera_intrinsic(1, 2);\n  for (size_t i = 0; i < board_imgs_pts.size(); i++) {\n    std::vector<cv::Point2f> src = board_imgs_pts[i];\n    std::vector<cv::Point2f> dst;\n    cv::undistortPoints(src, dst, K, D);\n    for (size_t i = 0; i < dst.size(); i++) {\n      dst[i].x = dst[i].x * fx + cx;\n      dst[i].y = dst[i].y * fy + cy;\n    }\n\n    undistort_pts.push_back(dst);\n  }\n}\n\nvoid CameraCalibrator::image_undistort(const cv::Mat &img,\n                                       cv::Mat &undistort_img,\n                                       const Eigen::Matrix3d camera_intrinsic,\n                                       const Eigen::VectorXd distort) {\n  cv::Mat K, D;\n  float d[4], k[9];\n  k[0] = camera_intrinsic(0, 0);\n  k[1] = camera_intrinsic(0, 1);\n  k[2] = camera_intrinsic(0, 2);\n  k[3] = camera_intrinsic(1, 0);\n  k[4] = camera_intrinsic(1, 1);\n  k[5] = camera_intrinsic(1, 2);\n  k[6] = camera_intrinsic(2, 0);\n  k[7] = camera_intrinsic(2, 1);\n  k[8] = camera_intrinsic(2, 2);\n  d[0] = distort(0);\n  d[1] = distort(1);\n  d[2] = 0;\n  d[3] = 0;\n  D = cv::Mat(4, 1, CV_32FC1, d);\n  K = cv::Mat(3, 3, CV_32FC1, k);\n\n  cv::Mat I = cv::Mat::eye(3, 3, CV_32FC1);\n  cv::Mat mapX, mapY;\n  cv::Mat outImg = cv::Mat(img.size(), CV_32FC3);\n  cv::initUndistortRectifyMap(K, D, I, K, img.size(), CV_32FC1, mapX, mapY);\n  cv::remap(img, outImg, mapX, mapY, cv::INTER_LINEAR);\n  undistort_img = outImg;\n}\n\nvoid CameraCalibrator::make_board_points(const cv::Size &chessboard_size_) {\n  std::vector<cv::Point2f> vec_points;\n  std::vector<cv::Point3f> vec_points_3d;\n  for (int r = 0; r < chessboard_size_.height; ++r) {\n    for (int c = 0; c < chessboard_size_.width; ++c) {\n      vec_points.emplace_back(c, r);\n      vec_points_3d.emplace_back(c, r, 0);\n    }\n  }\n  _boards_pts.push_back(vec_points);\n  _boards_pts_3d.push_back(vec_points_3d);\n\n  std::vector<cv::Point3f> vec_points_cir;\n  vec_points_cir.emplace_back(1.82f, -3.12f, 0.0f);  // sim\n  vec_points_cir.emplace_back(14.18f, -3.12f, 0.0f); // sim\n  vec_points_cir.emplace_back(1.82f, 9.12f, 0.0f);   // sim\n  vec_points_cir.emplace_back(14.18f, 9.12f, 0.0f);  // sim\n\n  _boards_pts_cir.push_back(vec_points_cir); // scl\n}\n\nvoid CameraCalibrator::refine_all(\n    Eigen::Matrix3d &camera_matrix_, Eigen::VectorXd &k_,\n    std::vector<Eigen::MatrixXd> &vec_extrinsics_) {\n\n  Params params, params_refined;\n  params.camera_matrix = camera_matrix_;\n  params.k = k_;\n  params.vec_rt = vec_extrinsics_;\n  optimier.refine_all_camera_params(params, _imgs_pts, _boards_pts,\n                                    params_refined);\n  camera_matrix_ = params_refined.camera_matrix;\n  k_ = params_refined.k;\n  vec_extrinsics_ = params_refined.vec_rt;\n}\n\nvoid CameraCalibrator::refine_lidar2camera(\n    Eigen::Matrix3d &camera_matrix_, Eigen::VectorXd &k_,\n    std::vector<Eigen::MatrixXd> &vec_extrinsics_,\n    Eigen::Matrix<double, 3, 4> &initial_extrinsic,\n    std::vector<LidarPointPair> &lidar_point_pairs) {\n  LidarParams params, params_refined;\n  params.camera_matrix = camera_matrix_;\n  params.k = k_;\n  params.vec_rt = vec_extrinsics_;\n  params.extrinsic = initial_extrinsic;\n\n  optimier.refine_lidar2camera_params(params, _imgs_pts, _boards_pts,\n                                      lidar_point_pairs, params_refined);\n\n  //\n  camera_matrix_ = params_refined.camera_matrix;\n  k_ = params_refined.k;\n  vec_extrinsics_ = params_refined.vec_rt;\n  initial_extrinsic = params_refined.extrinsic;\n}\n\nvoid CameraCalibrator::get_distortion(\n    const Eigen::Matrix3d &camera_matrix_,\n    const std::vector<Eigen::MatrixXd> &vec_extrinsics_, Eigen::VectorXd &k_) {\n  Eigen::MatrixXd D;\n  Eigen::VectorXd d;\n  double uc = camera_matrix_(0, 2);\n  double vc = camera_matrix_(1, 2);\n  for (int i = 0; i < _imgs_pts.size(); ++i) {\n    for (int j = 0; j < _imgs_pts[i].size(); ++j) {\n      Eigen::Vector4d houm_coor(_boards_pts[i][j].x, _boards_pts[i][j].y, 0, 1);\n      Eigen::Vector3d uv = camera_matrix_ * vec_extrinsics_[i] * houm_coor;\n      Eigen::Vector2d uv_estim(uv(0) / uv(2), uv(1) / uv(2));\n\n      Eigen::Vector3d coor_norm = vec_extrinsics_[i] * houm_coor;\n      coor_norm /= coor_norm(2);\n      Eigen::Vector2d v_r(coor_norm(0), coor_norm(1));\n      double r = v_r.norm();\n\n      Eigen::RowVector2d vu((uv_estim(0) - uc) * r * r,\n                            (uv_estim(0) - uc) * r * r * r * r);\n      D.conservativeResize(D.rows() + 1, 2);\n      D.row(D.rows() - 1) = vu;\n      Eigen::RowVector2d vv((uv_estim(1) - vc) * r * r,\n                            (uv_estim(1) - vc) * r * r * r * r);\n      D.conservativeResize(D.rows() + 1, 2);\n      D.row(D.rows() - 1) = vv;\n\n      d.conservativeResize(d.size() + 1);\n      d(d.size() - 1) = _imgs_pts[i][j].x - uv_estim(0);\n      d.conservativeResize(d.size() + 1);\n      d(d.size() - 1) = _imgs_pts[i][j].y - uv_estim(1);\n    }\n  }\n  Eigen::MatrixXd DTD = D.transpose() * D;\n  Eigen::MatrixXd temp = (DTD.inverse()) * D.transpose();\n  k_ = temp * d;\n}\n\nvoid CameraCalibrator::get_extrinsics(\n    const std::vector<Eigen::Matrix3d> &vec_h_,\n    const Eigen::Matrix3d &camera_matrix_,\n    std::vector<Eigen::MatrixXd> &vec_extrinsics_) {\n  vec_extrinsics_.clear();\n  Eigen::Matrix3d inv_camera_matrix = camera_matrix_.inverse();\n  for (int i = 0; i < vec_h_.size(); ++i) {\n    Eigen::Vector3d s = inv_camera_matrix * vec_h_[i].col(0);\n    double scalar_factor = 1 / s.norm();\n\n    Eigen::Vector3d r0 = scalar_factor * inv_camera_matrix * vec_h_[i].col(0);\n    Eigen::Vector3d r1 = scalar_factor * inv_camera_matrix * vec_h_[i].col(1);\n    Eigen::Vector3d t = scalar_factor * inv_camera_matrix * vec_h_[i].col(2);\n    Eigen::Vector3d r2 = r0.cross(r1);\n\n    Eigen::MatrixXd RT(3, 4);\n    RT.block<3, 1>(0, 0) = r0;\n    RT.block<3, 1>(0, 1) = r1;\n    RT.block<3, 1>(0, 2) = r2;\n    RT.block<3, 1>(0, 3) = t;\n    vec_extrinsics_.push_back(RT);\n  }\n}\n\nvoid CameraCalibrator::create_v(const Eigen::Matrix3d &h_, const int p,\n                                const int q, Eigen::RowVectorXd &row_v_) {\n  row_v_ << h_(0, p) * h_(0, q), h_(0, p) * h_(1, q) + h_(1, p) * h_(0, q),\n      h_(1, p) * h_(1, q), h_(2, p) * h_(0, q) + h_(0, p) * h_(2, q),\n      h_(2, p) * h_(1, q) + h_(1, p) * h_(2, q), h_(2, p) * h_(2, q);\n}\n\nvoid CameraCalibrator::get_camera_instrinsics(\n    const std::vector<Eigen::Matrix3d> &vec_h_,\n    Eigen::Matrix3d &camera_matrix_) {\n  int N = vec_h_.size();\n  Eigen::MatrixXd V(2 * N, 6);\n  V.setZero();\n\n  for (int n = 0; n < N; ++n) {\n    Eigen::RowVectorXd v01(6), v00(6), v11(6);\n    create_v(vec_h_[n], 0, 1, v01);\n    V.row(2 * n) = v01;\n    create_v(vec_h_[n], 0, 0, v00);\n    create_v(vec_h_[n], 1, 1, v11);\n    V.row(2 * n + 1) = v00 - v11;\n  }\n  Eigen::JacobiSVD<Eigen::MatrixXd> svd(V, Eigen::ComputeFullV);\n  Eigen::VectorXd b = svd.matrixV().col(5);\n  //\n  double w = b[0] * b[2] * b[5] - b[1] * b[1] * b[5] - b[0] * b[4] * b[4] +\n             2 * b[1] * b[3] * b[4] - b[2] * b[3] * b[3];\n  double d = b[0] * b[2] - b[1] * b[1];\n\n  double alpha = std::sqrt(w / (d * b[0]));\n  double beta = std::sqrt(w / (d * d) * b[0]);\n  double gamma = std::sqrt(w / (d * d * b[0])) * b[1];\n  double uc = (b[1] * b[4] - b[2] * b[3]) / d;\n  double vc = (b[1] * b[3] - b[0] * b[4]) / d;\n\n  camera_matrix_ << alpha, gamma, uc, 0, beta, vc, 0, 0, 1;\n}\n\nvoid CameraCalibrator::get_homography(std::vector<Eigen::Matrix3d> &vec_h_) {\n  vec_h_.clear();\n  for (int i = 0; i < _imgs_pts.size(); ++i) {\n    Eigen::Matrix3d ini_H, refined_H;\n    this->estimate_H(_imgs_pts[i], _boards_pts[i], ini_H);\n    optimier.refine_H(_imgs_pts[i], _boards_pts[i], ini_H, refined_H);\n    vec_h_.push_back(refined_H);\n  }\n}\n\nvoid CameraCalibrator::estimate_H(const std::vector<cv::Point2f> &img_pts_,\n                                  const std::vector<cv::Point2f> &board_pts_,\n                                  Eigen::Matrix3d &matrix_H_) {\n  Eigen::Matrix3d matrix_normalize_img_pts;\n  Eigen::Matrix3d matrix_normalize_board_pts;\n  int N = img_pts_.size();\n  this->get_normalization_matrix(img_pts_, matrix_normalize_img_pts);\n  this->get_normalization_matrix(board_pts_, matrix_normalize_board_pts);\n  Eigen::MatrixXd M(2 * N, 9);\n  M.setZero();\n\n  for (int i = 0; i < N; ++i) {\n    Eigen::Vector3d norm_img_p =\n        matrix_normalize_img_pts *\n        Eigen::Vector3d(img_pts_[i].x, img_pts_[i].y, 1);\n    Eigen::Vector3d norm_board_p =\n        matrix_normalize_board_pts *\n        Eigen::Vector3d(board_pts_[i].x, board_pts_[i].y, 1);\n    // M\n    M(2 * i, 0) = -norm_board_p(0);\n    M(2 * i, 1) = -norm_board_p(1);\n    M(2 * i, 2) = -1;\n    M(2 * i, 6) = norm_img_p(0) * norm_board_p(0);\n    M(2 * i, 7) = norm_img_p(0) * norm_board_p(1);\n    M(2 * i, 8) = norm_img_p(0);\n\n    M(2 * i + 1, 3) = -norm_board_p(0);\n    M(2 * i + 1, 4) = -norm_board_p(1);\n    M(2 * i + 1, 5) = -1;\n    M(2 * i + 1, 6) = norm_img_p(1) * norm_board_p(0);\n    M(2 * i + 1, 7) = norm_img_p(1) * norm_board_p(1);\n    M(2 * i + 1, 8) = norm_img_p(1);\n  }\n  // svd solve M*h=0\n  Eigen::JacobiSVD<Eigen::MatrixXd> svd(M, Eigen::ComputeFullV);\n  Eigen::VectorXd V = svd.matrixV().col(8);\n  matrix_H_ << V(0), V(1), V(2), V(3), V(4), V(5), V(6), V(7), V(8);\n  matrix_H_ = matrix_normalize_img_pts.inverse() * matrix_H_ *\n              matrix_normalize_board_pts;\n  matrix_H_ /= matrix_H_(2, 2);\n}\n\nvoid CameraCalibrator::get_normalization_matrix(\n    const std::vector<cv::Point2f> &pts_, Eigen::Matrix3d &matrix_trans_) {\n  double sum_x = 0, sum_y = 0;\n  std::for_each(std::begin(pts_), std::end(pts_), [&](const cv::Point2f &p) {\n    sum_x += p.x;\n    sum_y += p.y;\n  });\n  double mean_x = sum_x / pts_.size();\n  double mean_y = sum_y / pts_.size();\n\n  double accmx = 0, accmy = 0;\n  std::for_each(std::begin(pts_), std::end(pts_), [&](const cv::Point2f &p) {\n    accmx += (p.x - mean_x) * (p.x - mean_x);\n    accmy += (p.y - mean_y) * (p.y - mean_y);\n  });\n  double stdx = std::sqrt(accmx / double(pts_.size() - 1));\n  double stdy = std::sqrt(accmy / double(pts_.size() - 1));\n\n  double sx = std::sqrt(2.) / stdx;\n  double sy = std::sqrt(2.) / stdy;\n\n  matrix_trans_ << sx, 0, -sx * mean_x, 0, sy, -sy * mean_y, 0, 0, 1;\n}\n"
  },
  {
    "path": "src/lidar2camera.cpp",
    "content": "/*\n * Copyright (C) 2022 by Autonomous Driving Group, Shanghai AI Laboratory\n * Limited. All rights reserved.\n * Yan Guohang <yanguohang@pjlab.org.cn>\n */\n\n#include <fstream>\n#include <iostream>\n#include <sstream>\n\n#include \"camera_calibrator.hpp\"\n\nint main(int argc, char **argv) {\n  if (argc != 3) {\n    std::cout << \"Usage: ./main camera_dir csv file\"\n                 \"\\nexample:\\n\\t\"\n                 \"./bin/lidar2camera data/intrinsic/ data/circle.csv\"\n              << std::endl;\n    return 0;\n  }\n\n  std::string image_dir = argv[1];\n  std::string csv_file = argv[2];\n  std::cout << csv_file << std::endl;\n  std::ifstream fin(csv_file);\n  std::string line;\n  bool is_first = true;\n  std::vector<std::vector<std::string>> lidar_3d_pts;\n  while (getline(fin, line)) {\n    if (is_first) {\n      is_first = false;\n      continue;\n    }\n\n    std::istringstream sin(line);\n    std::vector<std::string> fields;\n    std::string field;\n    while (getline(sin, field, ',')) {\n      fields.push_back(field);\n    }\n    lidar_3d_pts.push_back(fields);\n  }\n\n  std::cout << image_dir << std::endl;\n  std::vector<cv::String> images;\n  cv::glob(image_dir, images);\n  std::vector<cv::Mat> vec_mat;\n  std::vector<std::string> images_name;\n  for (const auto &path : images) {\n    std::cout << path << std::endl;\n    cv::Mat img = cv::imread(path, cv::IMREAD_GRAYSCALE);\n    vec_mat.push_back(img);\n    images_name.push_back(path);\n  }\n\n  CameraCalibrator m;\n  cv::Mat camera_matrix = cv::Mat(3, 3, CV_32FC1, cv::Scalar::all(0));\n  cv::Mat k = cv::Mat(1, 5, CV_32FC1, cv::Scalar::all(0));\n  std::vector<cv::Mat> tvecsMat;\n  std::vector<cv::Mat> rvecsMat;\n  m.set_input(images_name, vec_mat, cv::Size{17, 7}, lidar_3d_pts);\n  m.get_result(camera_matrix, k, cv::Size{1920, 1200}, rvecsMat, tvecsMat);\n  return 0;\n}"
  },
  {
    "path": "src/nonlinear_optimizer.cpp",
    "content": "#include \"nonlinear_optimizer.hpp\"\n\nvoid NonlinearOptimizer::refine_H(const std::vector<cv::Point2f> &img_pts_,\n                                  const std::vector<cv::Point2f> &board_pts_,\n                                  const Eigen::Matrix3d &matrix_H_,\n                                  Eigen::Matrix3d &refined_H_) {\n  Eigen::MatrixXd x1(2, board_pts_.size());\n  Eigen::MatrixXd x2(2, img_pts_.size());\n\n  for (int i = 0; i < board_pts_.size(); ++i) {\n    x1(0, i) = board_pts_[i].x;\n    x1(1, i) = board_pts_[i].y;\n  }\n  for (int i = 0; i < img_pts_.size(); ++i) {\n    x2(0, i) = img_pts_[i].x;\n    x2(1, i) = img_pts_[i].y;\n  }\n\n  Eigen::Matrix3d H = matrix_H_;\n  // std::cout << \"H:\" << H<< std::endl;\n  // Step 2: Refine matrix using Ceres minimizer.\n  ceres::Problem problem;\n  for (int i = 0; i < x1.cols(); i++) {\n    HomographySymmetricGeometricCostFunctor\n        *homography_symmetric_geometric_cost_function =\n            new HomographySymmetricGeometricCostFunctor(x1.col(i), x2.col(i));\n\n    problem.AddResidualBlock(\n        new ceres::AutoDiffCostFunction<HomographySymmetricGeometricCostFunctor,\n                                        4, // num_residuals\n                                        9>(\n            homography_symmetric_geometric_cost_function),\n        NULL, H.data());\n  }\n  EstimateHomographyOptions options;\n  options.expected_average_symmetric_distance = 0.02;\n  // Configure the solve.\n  ceres::Solver::Options solver_options;\n  solver_options.linear_solver_type = ceres::DENSE_QR;\n  solver_options.max_num_iterations = options.max_num_iterations;\n  solver_options.update_state_every_iteration = true;\n\n  // Terminate if the average symmetric distance is good enough.\n  TerminationCheckingCallback callback(x1, x2, options, &H);\n  solver_options.callbacks.push_back(&callback);\n\n  // Run the solve.\n  ceres::Solver::Summary summary;\n  ceres::Solve(solver_options, &problem, &summary);\n\n  refined_H_ = H / H(2, 2);\n}\n\nvoid NonlinearOptimizer::refine_all_camera_params(\n    const Params &params_,\n    const std::vector<std::vector<cv::Point2f>> &imgs_pts_,\n    const std::vector<std::vector<cv::Point2f>> &bords_pts_,\n    Params &refined_params_) {\n  ceres::Problem problem;\n  Eigen::Matrix3d camera_matrix = params_.camera_matrix;\n  Eigen::VectorXd k = params_.k;\n  std::vector<Eigen::MatrixXd> vec_rt = params_.vec_rt;\n  Eigen::VectorXd v_camera_matrix(5);\n  v_camera_matrix << camera_matrix(0, 0), camera_matrix(0, 1),\n      camera_matrix(0, 2), camera_matrix(1, 1), camera_matrix(1, 2);\n  double *p_camera = v_camera_matrix.data();\n  double *p_k = k.data();\n\n  // package all rt\n  std::vector<Eigen::VectorXd> packet_rt;\n  for (int n = 0; n < params_.vec_rt.size(); ++n) {\n    Eigen::AngleAxisd r(vec_rt[n].block<3, 3>(0, 0));\n    Eigen::VectorXd rot_vec(r.axis() * r.angle());\n    Eigen::VectorXd rt(6);\n    rt << rot_vec(0), rot_vec(1), rot_vec(2), vec_rt[n](0, 3), vec_rt[n](1, 3),\n        vec_rt[n](2, 3);\n    packet_rt.push_back(rt);\n  }\n  for (int n = 0; n < params_.vec_rt.size(); ++n) {\n    Eigen::MatrixXd x1(2, bords_pts_[n].size());\n    Eigen::MatrixXd x2(2, imgs_pts_[n].size());\n\n    for (int i = 0; i < bords_pts_[n].size(); ++i) {\n      x1(0, i) = bords_pts_[n][i].x;\n      x1(1, i) = bords_pts_[n][i].y;\n    }\n    for (int i = 0; i < imgs_pts_[n].size(); ++i) {\n      x2(0, i) = imgs_pts_[n][i].x;\n      x2(1, i) = imgs_pts_[n][i].y;\n    }\n\n    double *p_rt = &packet_rt[n](0);\n    for (int i = 0; i < x1.cols(); i++) {\n      ReprojectionError *cost_function =\n          new ReprojectionError(x2.col(i), x1.col(i));\n\n      problem.AddResidualBlock(\n          new ceres::AutoDiffCostFunction<ReprojectionError,\n                                          2, // num_residuals\n                                          5, 3, 6>(cost_function),\n          NULL, p_camera, p_k, p_rt);\n    }\n  }\n  // Configure the solver.\n  ceres::Solver::Options options;\n  options.linear_solver_type = ceres::DENSE_SCHUR;\n  options.minimizer_progress_to_stdout = false;\n\n  // Solve!\n  ceres::Solver::Summary summary;\n  ceres::Solve(options, &problem, &summary);\n\n  DLOG(INFO) << \"Final Brief Report:\\n\" << summary.BriefReport() << std::endl;\n  this->formate_data(v_camera_matrix, k, packet_rt, refined_params_);\n}\n\nvoid NonlinearOptimizer::formate_data(const Eigen::VectorXd &v_camera_matrix_,\n                                      const Eigen::VectorXd &v_dist_,\n                                      const std::vector<Eigen::VectorXd> &v_rt_,\n                                      Params &params_) {\n  params_.camera_matrix << v_camera_matrix_(0), v_camera_matrix_(1),\n      v_camera_matrix_(2), 0., v_camera_matrix_(3), v_camera_matrix_(4), 0, 0,\n      1.;\n  params_.k = v_dist_;\n  params_.vec_rt.clear();\n  for (const auto &rt : v_rt_) {\n    Eigen::Vector3d rv(rt(0), rt(1), rt(2));\n    Eigen::AngleAxisd r_v(rv.norm(), rv / rv.norm());\n    Eigen::Matrix<double, 3, 4> rt1;\n    rt1.block<3, 3>(0, 0) = r_v.toRotationMatrix();\n    rt1.block<3, 1>(0, 3) = Eigen::Vector3d(rt(3), rt(4), rt(5));\n    params_.vec_rt.push_back(rt1);\n  }\n}\n\nvoid NonlinearOptimizer::refine_lidar2camera_params(\n    const LidarParams &params_,\n    const std::vector<std::vector<cv::Point2f>> &imgs_pts_,\n    const std::vector<std::vector<cv::Point2f>> &bords_pts_,\n    const std::vector<LidarPointPair> lidar_point_pairs,\n    LidarParams &refined_params_) {\n  ceres::Problem problem;\n  Eigen::Matrix3d camera_matrix = params_.camera_matrix;\n  Eigen::VectorXd k = params_.k;\n  std::vector<Eigen::MatrixXd> vec_rt = params_.vec_rt;\n  Eigen::VectorXd v_camera_matrix(5);\n  v_camera_matrix << camera_matrix(0, 0), camera_matrix(0, 1),\n      camera_matrix(0, 2), camera_matrix(1, 1), camera_matrix(1, 2);\n  double *p_camera = v_camera_matrix.data();\n  double *p_k = k.data();\n\n  // package all rt\n  std::vector<Eigen::VectorXd> packet_rt;\n  for (int n = 0; n < params_.vec_rt.size(); ++n) {\n    Eigen::AngleAxisd r(vec_rt[n].block<3, 3>(0, 0));\n    Eigen::VectorXd rot_vec(r.axis() * r.angle());\n    Eigen::VectorXd rt(6);\n    rt << rot_vec(0), rot_vec(1), rot_vec(2), vec_rt[n](0, 3), vec_rt[n](1, 3),\n        vec_rt[n](2, 3);\n    packet_rt.push_back(rt);\n  }\n  for (int n = 0; n < params_.vec_rt.size(); ++n) {\n    Eigen::MatrixXd x1(2, bords_pts_[n].size());\n    Eigen::MatrixXd x2(2, imgs_pts_[n].size());\n\n    for (int i = 0; i < bords_pts_[n].size(); ++i) {\n      x1(0, i) = bords_pts_[n][i].x;\n      x1(1, i) = bords_pts_[n][i].y;\n    }\n    for (int i = 0; i < imgs_pts_[n].size(); ++i) {\n      x2(0, i) = imgs_pts_[n][i].x;\n      x2(1, i) = imgs_pts_[n][i].y;\n    }\n\n    double *p_rt = &packet_rt[n](0);\n    for (int i = 0; i < x1.cols(); i++) {\n      ReprojectionError *cost_function =\n          new ReprojectionError(x2.col(i), x1.col(i));\n\n      problem.AddResidualBlock(\n          new ceres::AutoDiffCostFunction<ReprojectionError,\n                                          2, // num_residuals\n                                          5, 2, 6>(cost_function),\n          NULL, p_camera, p_k, p_rt);\n    }\n  }\n  // lidar2camera\n  Eigen::Matrix<double, 3, 4> initial_rt = params_.extrinsic;\n  Eigen::AngleAxisd r(initial_rt.block<3, 3>(0, 0));\n  Eigen::VectorXd rot_vec(r.axis() * r.angle());\n  Eigen::VectorXd rt(6);\n  rt << rot_vec(0), rot_vec(1), rot_vec(2), initial_rt(0, 3), initial_rt(1, 3),\n      initial_rt(2, 3);\n  double *p_rt = &rt(0);\n  for (size_t i = 0; i < lidar_point_pairs.size(); i++) {\n    LidarPointPair lidar_pair = lidar_point_pairs[i];\n    for (size_t j = 0; j < 4; j++) {\n      Eigen::Vector3d lidar_3d_point(lidar_pair.lidar_3d_point[j].x,\n                                     lidar_pair.lidar_3d_point[j].y,\n                                     lidar_pair.lidar_3d_point[j].z);\n      Eigen::Vector2d lidar_2d_point(lidar_pair.lidar_2d_point[j].x,\n                                     lidar_pair.lidar_2d_point[j].y);\n\n      LidarReprojectionError *cost_function =\n          new LidarReprojectionError(lidar_2d_point, lidar_3d_point);\n\n      problem.AddResidualBlock(\n          new ceres::AutoDiffCostFunction<LidarReprojectionError,\n                                          2, // num_residuals\n                                          5, 2, 6>(cost_function),\n          NULL, p_camera, p_k, p_rt);\n    }\n  }\n\n  // Configure the solver.\n  ceres::Solver::Options options;\n  options.linear_solver_type = ceres::DENSE_SCHUR;\n  options.minimizer_progress_to_stdout = false;\n\n  // Solve!\n  ceres::Solver::Summary summary;\n  ceres::Solve(options, &problem, &summary);\n\n  // DLOG(INFO) << \"Final Brief Report:\\n\" << summary.BriefReport() <<\n  // std::endl;\n  this->formate_data(v_camera_matrix, k, packet_rt, rt, refined_params_);\n}\n\nvoid NonlinearOptimizer::formate_data(const Eigen::VectorXd &v_camera_matrix_,\n                                      const Eigen::VectorXd &v_dist_,\n                                      const std::vector<Eigen::VectorXd> &v_rt_,\n                                      const Eigen::VectorXd &RT,\n                                      LidarParams &params_) {\n  params_.camera_matrix << v_camera_matrix_(0), v_camera_matrix_(1),\n      v_camera_matrix_(2), 0., v_camera_matrix_(3), v_camera_matrix_(4), 0, 0,\n      1.;\n  params_.k = v_dist_;\n  params_.vec_rt.clear();\n  for (const auto &rt : v_rt_) {\n    Eigen::Vector3d rv(rt(0), rt(1), rt(2));\n    Eigen::AngleAxisd r_v(rv.norm(), rv / rv.norm());\n    Eigen::Matrix<double, 3, 4> rt1;\n    rt1.block<3, 3>(0, 0) = r_v.toRotationMatrix();\n    rt1.block<3, 1>(0, 3) = Eigen::Vector3d(rt(3), rt(4), rt(5));\n    params_.vec_rt.push_back(rt1);\n  }\n\n  Eigen::Vector3d rv(RT(0), RT(1), RT(2));\n  Eigen::AngleAxisd r_v(rv.norm(), rv / rv.norm());\n  Eigen::Matrix<double, 3, 4> rt1;\n  rt1.block<3, 3>(0, 0) = r_v.toRotationMatrix();\n  rt1.block<3, 1>(0, 3) = Eigen::Vector3d(RT(3), RT(4), RT(5));\n  std::cout << rv << std::endl;\n  params_.extrinsic = rt1;\n}"
  },
  {
    "path": "tool/LidarCircleDetect/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.5)\nproject(lidar2camera)\n\nset(CMAKE_BUILD_TYPE \"Debug\")\nset(CMAKE_CXX_FLAGS \"-std=c++11\")\nset(CMAKE_CXX_FLAGS_RELEASE \"-O3 -Wall -g\")\n\nfind_package(OpenCV REQUIRED)\ninclude_directories(${OpenCV_INCLUDE_DIRS})\n\n## Get boost\nfind_package(Boost REQUIRED filesystem system)\ninclude_directories(${BOOST_INCLUDE_DIRS})\n\nfind_package(PCL REQUIRED)\ninclude_directories(${PCL_INCLUDE_DIRS})\n\ninclude_directories(${PROJECT_SOURCE_DIR}/include)\n\nset(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib)\nset(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib)\nset(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)\n\nfile(GLOB_RECURSE PARSER_PATH src/*.cpp)\nadd_library(${PROJECT_NAME} STATIC ${PARSER_PATH})\ntarget_link_libraries(${PROJECT_NAME}  ${PCL_LIBRARIES} ${OpenCV_LIBS} ${Boost_SYSTEM_LIBRARY})\n\nadd_executable(run_lidardetection src/run_lidar_detection.cpp )\ntarget_link_libraries(run_lidardetection ${PCL_LIBRARIES} ${OpenCV_LIBS} ${PROJECT_NAME} libjsoncpp.a)\n\n"
  },
  {
    "path": "tool/LidarCircleDetect/include/lidar_pattern.h",
    "content": "#include <eigen3/Eigen/Dense>\n\n#include <pcl/kdtree/kdtree_flann.h>\n#include <pcl/point_cloud.h>\n#include <pcl/point_types.h>\n\nclass LidarDetector {\n\npublic:\n  LidarDetector(){};\n  ~LidarDetector(){};\n\n  void STLidarDetection(std::string pcds_dir);\n};\n"
  },
  {
    "path": "tool/LidarCircleDetect/include/logging.hpp",
    "content": "/*\n * Copyright (C) 2021 by Autonomous Driving Group, Shanghai AI Laboratory\n * Limited. All rights reserved.\n * Yan Guohang <yanguohang@pjlab.org.cn>\n */\n#ifndef LOGGING_HPP_\n#define LOGGING_HPP_\n\n#define OUTPUT\n#define __FILENAME__                                                           \\\n  (strrchr(__FILE__, '/') ? (strrchr(__FILE__, '/') + 1) : __FILE__)\n\n#ifdef OUTPUT\n#define LOGI(...)                                                              \\\n  (printf(\"[INFO] [%d@%s] \", __LINE__, __FILENAME__), printf(__VA_ARGS__),     \\\n   printf(\"\\n\"))\n#define LOGW(...)                                                              \\\n  (printf(\"\\33[33m[WARN] [%d@%s] \", __LINE__, __FILENAME__),                   \\\n   printf(__VA_ARGS__), printf(\"\\033[0m\\n\"))\n#define LOGE(...)                                                              \\\n  (printf(\"\\33[31m[ERROR] [%d@%s] \", __LINE__, __FILENAME__),                  \\\n   printf(__VA_ARGS__), printf(\"\\033[0m\\n\"))\n#else\n#define LOGI(...) ((void)0)\n#define LOGW(...) ((void)0)\n#define LOGE(...) ((void)0)\n#endif\n\n#ifdef DEBUG\n#define LOGDEBUG(...) (printf(__VA_ARGS__), printf(\"\\n\"))\n#else\n#define LOGDEBUG(...) ((void)0)\n#endif\n\n#endif // LOGGING_HPP_"
  },
  {
    "path": "tool/LidarCircleDetect/src/lidar_pattern.cpp",
    "content": "/*\n * Copyright (C) 2022 by Autonomous Driving Group, Shanghai AI Laboratory\n * Limited. All rights reserved.\n * Yan Guohang <yanguohang@pjlab.org.cn>\n */\n\n#include \"lidar_pattern.h\"\n\n#include <dirent.h>\n#include <pcl/common/eigen.h>\n#include <pcl/common/transforms.h>\n#include <pcl/filters/extract_indices.h>\n#include <pcl/filters/passthrough.h>\n#include <pcl/point_cloud.h>\n#include <pcl/point_types.h>\n#include <pcl/segmentation/sac_segmentation.h>\n#include <stdio.h>\n\n#include <pcl/io/pcd_io.h>\n\n#include <opencv2/core.hpp>\n#include <opencv2/highgui.hpp>\n#include <opencv2/opencv.hpp>\n\n#include \"logging.hpp\"\n\nvoid LidarDetector::STLidarDetection(std::string pcds_dir) {\n  pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZ>);\n  pcl::PointCloud<pcl::PointXYZ>::Ptr temp_cloude(\n      new pcl::PointCloud<pcl::PointXYZ>);\n\n  std::string lidar_dir = pcds_dir;\n  if (lidar_dir.rfind('/') != lidar_dir.size() - 1) {\n    lidar_dir = lidar_dir + \"/\";\n  }\n\n  DIR *dir;\n  if ((dir = opendir(lidar_dir.c_str())) == NULL) {\n    std::cout << \"Open dir error !\" << std::endl;\n    exit(1);\n  }\n  struct dirent *ptr;\n  while ((ptr = readdir(dir)) != NULL) {\n    if (strcmp(ptr->d_name, \".\") != 0 && strcmp(ptr->d_name, \"..\") != 0) {\n      std::string pcd_path = pcds_dir + ptr->d_name;\n      if (pcl::io::loadPCDFile<pcl::PointXYZ>(pcd_path, *temp_cloude) == -1) {\n        std::cout << \"Couldn't read file rabbit.pcd\\n\" << std::endl;\n        exit(1);\n      }\n      *cloud += *temp_cloude;\n    }\n  }\n\n  pcl::PointCloud<pcl::PointXYZ>::Ptr velocloud(\n      new pcl::PointCloud<pcl::PointXYZ>),\n      velo_filtered(new pcl::PointCloud<pcl::PointXYZ>),\n      velo_filtered2(new pcl::PointCloud<pcl::PointXYZ>),\n      plane_cloud(new pcl::PointCloud<pcl::PointXYZ>),\n      edges_cloud(new pcl::PointCloud<pcl::PointXYZ>);\n\n  velocloud = cloud;\n\n  pcl::PassThrough<pcl::PointXYZ> pass1;\n  pass1.setInputCloud(velocloud);\n  pass1.setFilterFieldName(\"x\");\n  pass1.setFilterLimits(1, 5);\n  pass1.filter(*velo_filtered);\n\n  pcl::PassThrough<pcl::PointXYZ> pass2;\n  pass2.setInputCloud(velo_filtered);\n  pass2.setFilterFieldName(\"y\");\n  pass2.setFilterLimits(-2, 2);\n  pass2.filter(*velo_filtered2);\n\n  pcl::io::savePCDFileBinary(\"test_filtered.pcd\", *velo_filtered2);\n  // Plane segmentation\n  pcl::ModelCoefficients::Ptr coefficients(new pcl::ModelCoefficients);\n  pcl::PointIndices::Ptr inliers(new pcl::PointIndices);\n  LOGI(\"this is here\");\n  Eigen::Vector3f axis(0, 1, 0);\n  pcl::SACSegmentation<pcl::PointXYZ> plane_segmentation;\n  plane_segmentation.setModelType(pcl::SACMODEL_PARALLEL_PLANE);\n  plane_segmentation.setDistanceThreshold(0.05);\n  plane_segmentation.setMethodType(pcl::SAC_RANSAC);\n  plane_segmentation.setAxis(axis);\n  plane_segmentation.setEpsAngle(0.05);\n  plane_segmentation.setOptimizeCoefficients(true);\n  plane_segmentation.setMaxIterations(10);\n  plane_segmentation.setInputCloud(velo_filtered2);\n  plane_segmentation.segment(*inliers, *coefficients);\n\n  float a_final = coefficients->values[0] / coefficients->values[3];\n  float b_final = coefficients->values[1] / coefficients->values[3];\n  float c_final = coefficients->values[2] / coefficients->values[3];\n\n  pcl::ExtractIndices<pcl::PointXYZ> extract;\n  extract.setInputCloud(velo_filtered2);\n  extract.setIndices(inliers);\n  extract.filter(*plane_cloud);\n  // pcl::io::savePCDFileBinary(\"test_plane.pcd\", *plane_cloud);\n  edges_cloud = plane_cloud;\n  pcl::PointCloud<pcl::PointXYZ>::Ptr plane_edges_cloud(\n      new pcl::PointCloud<pcl::PointXYZ>);\n\n  float theta_z = -atan(b_final / a_final);\n  float theta_y = atan(c_final / a_final);\n  Eigen::MatrixXf R_y(3, 3), R_z(3, 3);\n  R_y << cos(theta_y), 0, sin(theta_y), 0, 1, 0, -sin(theta_y), 0, cos(theta_y);\n  R_z << cos(theta_z), -sin(theta_z), 0, sin(theta_z), cos(theta_z), 0, 0, 0, 1;\n  Eigen::MatrixXf R = R_y * R_z;\n  float average_x = 0.0;\n  int cnt = 0;\n  float min_pt_x = 99, max_pt_x = -99, min_pt_y = 99, max_pt_y = -99;\n  for (pcl::PointCloud<pcl::PointXYZ>::iterator pt =\n           edges_cloud->points.begin();\n       pt < edges_cloud->points.end(); ++pt) {\n    Eigen::MatrixXf tmp(3, 1);\n    tmp << pt->x, pt->y, pt->z;\n    Eigen::MatrixXf changed = R * tmp;\n    pt->x = changed(1, 0);\n    pt->y = changed(2, 0);\n    pt->z = 0;\n    if (pt->x < min_pt_x)\n      min_pt_x = pt->x;\n    if (pt->x > max_pt_x)\n      max_pt_x = pt->x;\n    if (pt->y < min_pt_y)\n      min_pt_y = pt->y;\n    if (pt->y > max_pt_y)\n      max_pt_y = pt->y;\n    average_x += changed(0, 0);\n    cnt++;\n\n    plane_edges_cloud->points.push_back(*pt);\n  }\n  average_x /= cnt;\n  plane_edges_cloud->height = 1;\n  plane_edges_cloud->width = plane_edges_cloud->points.size();\n  // pcl::io::savePCDFileASCII(\"plane_edges_cloud.pcd\", *plane_edges_cloud);\n  std::vector<std::vector<bool>> pro_map(\n      int(max_pt_y * 200) - int(min_pt_y * 200) + 1,\n      std::vector<bool>(int(max_pt_x * 200) - int(min_pt_x * 200) + 1, false));\n  for (pcl::PointCloud<pcl::PointXYZ>::iterator pt =\n           plane_edges_cloud->points.begin();\n       pt < plane_edges_cloud->points.end(); ++pt) {\n    pro_map[int(pt->y * 200) - int(min_pt_y * 200)]\n           [int(pt->x * 200) - int(min_pt_x * 200)] = true;\n  }\n\n  int max_cnt = 0;\n  int max_i, max_j;\n\n  for (int i = 0; i + 240 < pro_map.size(); i += 2) {\n    for (int j = 0; j + 240 < pro_map[0].size(); j += 2) {\n      int cnt = 0;\n      for (int ii = i; ii - i <= 240; ii += 2) {\n        for (int jj = j; jj - j <= 240; jj += 2) {\n          if (pro_map[ii][jj])\n            cnt++;\n        }\n      }\n      if (cnt > max_cnt) {\n        max_cnt = cnt;\n        max_i = i;\n        max_j = j;\n      }\n    }\n  }\n  pcl::PointCloud<pcl::PointXYZ>::Ptr initial_centers(\n      new pcl::PointCloud<pcl::PointXYZ>);\n  pcl::PointXYZ center;\n  center.y = float(max_j) / 200 + min_pt_x + 0.3;\n  center.z = float(max_i) / 200 + min_pt_y + 0.3;\n  std::cout << center.y << ',' << center.z << std::endl;\n  initial_centers->push_back(center);\n  center.y = float(max_j) / 200 + min_pt_x + 0.3;\n  center.z = float(max_i) / 200 + min_pt_y + 0.9;\n  std::cout << center.y << ',' << center.z << std::endl;\n  initial_centers->push_back(center);\n  center.y = float(max_j) / 200 + min_pt_x + 0.9;\n  center.z = float(max_i) / 200 + min_pt_y + 0.3;\n  std::cout << center.y << ',' << center.z << std::endl;\n  initial_centers->push_back(center);\n  center.y = float(max_j) / 200 + min_pt_x + 0.9;\n  center.z = float(max_i) / 200 + min_pt_y + 0.9;\n  std::cout << center.y << ',' << center.z << std::endl;\n  initial_centers->push_back(center);\n  // circle detection\n  pcl::PointCloud<pcl::PointXYZ>::Ptr cloud_f(\n      new pcl::PointCloud<pcl::PointXYZ>),\n      centroid_candidates(new pcl::PointCloud<pcl::PointXYZ>);\n  for (pcl::PointCloud<pcl::PointXYZ>::iterator pt =\n           initial_centers->points.begin();\n       pt < initial_centers->points.end(); ++pt) {\n    int initial_x = int(pt->y * 200) - int(min_pt_x * 200);\n    int initial_y = int(pt->z * 200) - int(min_pt_y * 200);\n    std::cout << \"initial: \" << initial_x << ',' << initial_y << std::endl;\n    int min_cnt = 9999;\n    int cnt_cnt = 0;\n    pcl::PointXYZ refined_center;\n    int final_i, final_j;\n    for (int i = initial_y - 20; i <= initial_y + 20; i++) {\n      for (int j = initial_x - 20; j <= initial_x + 20; j++) {\n        int cnt = 0;\n        for (int ii = i - 21; ii <= i + 21; ii++) {\n          for (int jj = j - 21; jj <= j + 21; jj++) {\n            if (pro_map[ii][jj]) {\n              if ((ii - i) * (ii - i) + (jj - j) * (jj - j) < 21 * 21)\n                cnt++;\n            }\n          }\n        }\n        if (cnt < min_cnt) {\n          cnt_cnt = 1;\n          final_i = i;\n          final_j = j;\n          min_cnt = cnt;\n          refined_center.x = average_x;\n          refined_center.y = float(j) / 200 + min_pt_x;\n          refined_center.z = float(i) / 200 + min_pt_y;\n        } else if (cnt == min_cnt) {\n          refined_center.y =\n              (refined_center.y * cnt_cnt + float(j) / 200 + min_pt_x) /\n              (cnt_cnt + 1);\n          refined_center.z =\n              (refined_center.z * cnt_cnt + float(i) / 200 + min_pt_y) /\n              (cnt_cnt + 1);\n          cnt_cnt++;\n        }\n      }\n    }\n    std::cout << \"pro_map: \" << final_i << ',' << final_j << std::endl;\n    std::cout << \"min_cnt: \" << min_cnt << std::endl;\n    std::cout << \"pro_ct: \" << refined_center.y << ',' << refined_center.z\n              << std::endl;\n    centroid_candidates->push_back(refined_center);\n  }\n  pcl::PointCloud<pcl::PointXYZ>::Ptr circle_cloud(\n      new pcl::PointCloud<pcl::PointXYZ>);\n  Eigen::MatrixXf R_inv = R.inverse();\n  for (pcl::PointCloud<pcl::PointXYZ>::iterator pt =\n           centroid_candidates->points.begin();\n       pt < centroid_candidates->points.end(); ++pt) {\n    Eigen::MatrixXf tmp(3, 1);\n    tmp << pt->x, pt->y, pt->z;\n    Eigen::MatrixXf changed = R_inv * tmp;\n    pt->x = changed(0, 0);\n    pt->y = changed(1, 0);\n    pt->z = changed(2, 0);\n    std::cout << pt->x << \"    \" << pt->y << \"    \" << pt->z << std::endl;\n    circle_cloud->points.push_back(*pt);\n  }\n\n  circle_cloud->height = 1;\n  circle_cloud->width = circle_cloud->points.size();\n  //  pcl::io::savePCDFileASCII(\"final_cloud.pcd\", *plane_cloud+*circle_cloud);\n  pcl::io::savePCDFileASCII(\"circle_cloud.pcd\", *circle_cloud);\n}"
  },
  {
    "path": "tool/LidarCircleDetect/src/run_lidar_detection.cpp",
    "content": "#define PCL_NO_PRECOMPILE\n#include \"lidar_pattern.h\"\n#include <iostream>\n\nint main(int argc, char **argv) {\n  if (argc != 2) {\n    std::cout << \"Usage: ./run_lidardetection <pcd_dir>\"\n                 \"\\nexample:\\n\\t\"\n                 \"./bin/run_lidardetection data/ \"\n              << std::endl;\n    return 0;\n  }\n  bool front = true;\n\n  LidarDetector lidar_detector;\n  lidar_detector.STLidarDetection(argv[1]);\n\n  return 0;\n}\n"
  },
  {
    "path": "tool/README.md",
    "content": "# Introduction\n\nExtract LiDAR circles center coordinates from PCD files. \n\n## Prerequisites\n\n- Cmake\n- PCL1.7 \n- Opencv 2.4.13\n- PCL 1.9\n\n## Compile\nCompile in the LidarCircleDetect folder\n\n```shell\n# mkdir build\nmkdir -p build && cd build\n# build\ncmake .. && make\n```\n\n\n## Usage\n\n\nRun the test sample:\n\n   The executable file is under the bin folder.\n\n   ```\n   cd ~./LidarCircleDetect\n   ./bin/run_lidardetection data/\n   ```\n\n"
  }
]